[
  {
    "path": ".clang-format",
    "content": "---\nLanguage:        Cpp\n# BasedOnStyle:  LLVM\nAccessModifierOffset: -2\nAlignAfterOpenBracket: Align\nAlignConsecutiveMacros: false\nAlignConsecutiveAssignments: false\nAlignConsecutiveBitFields: false\nAlignConsecutiveDeclarations: false\nAlignEscapedNewlines: Right\nAlignOperands:   Align\nAlignTrailingComments: true\nAllowAllArgumentsOnNextLine: true\nAllowAllConstructorInitializersOnNextLine: true\nAllowAllParametersOfDeclarationOnNextLine: true\nAllowShortEnumsOnASingleLine: true\nAllowShortBlocksOnASingleLine: Never\nAllowShortCaseLabelsOnASingleLine: false\nAllowShortFunctionsOnASingleLine: All\nAllowShortLambdasOnASingleLine: All\nAllowShortIfStatementsOnASingleLine: Never\nAllowShortLoopsOnASingleLine: false\nAlwaysBreakAfterDefinitionReturnType: None\nAlwaysBreakAfterReturnType: None\nAlwaysBreakBeforeMultilineStrings: false\nAlwaysBreakTemplateDeclarations: MultiLine\nBinPackArguments: true\nBinPackParameters: true\nBraceWrapping:\n  AfterCaseLabel:  false\n  AfterClass:      false\n  AfterControlStatement: Never\n  AfterEnum:       false\n  AfterFunction:   false\n  AfterNamespace:  false\n  AfterObjCDeclaration: false\n  AfterStruct:     false\n  AfterUnion:      false\n  AfterExternBlock: false\n  BeforeCatch:     false\n  BeforeElse:      false\n  BeforeLambdaBody: false\n  BeforeWhile:     false\n  IndentBraces:    false\n  SplitEmptyFunction: true\n  SplitEmptyRecord: true\n  SplitEmptyNamespace: true\nBreakBeforeBinaryOperators: None\nBreakBeforeBraces: Attach\nBreakBeforeInheritanceComma: false\nBreakInheritanceList: BeforeColon\nBreakBeforeTernaryOperators: true\nBreakConstructorInitializersBeforeComma: false\nBreakConstructorInitializers: BeforeColon\nBreakAfterJavaFieldAnnotations: false\nBreakStringLiterals: true\nColumnLimit:     100\nCommentPragmas:  '^ IWYU pragma:'\nCompactNamespaces: false\nConstructorInitializerAllOnOneLineOrOnePerLine: false\nConstructorInitializerIndentWidth: 4\nContinuationIndentWidth: 4\nCpp11BracedListStyle: true\nDeriveLineEnding: true\nDerivePointerAlignment: false\nDisableFormat:   false\nExperimentalAutoDetectBinPacking: false\nFixNamespaceComments: true\nForEachMacros:\n  - foreach\n  - Q_FOREACH\n  - BOOST_FOREACH\nIncludeBlocks:   Preserve\nIncludeCategories:\n  - Regex:           '^\"(llvm|llvm-c|clang|clang-c)/'\n    Priority:        2\n    SortPriority:    0\n  - Regex:           '^(<|\"(gtest|gmock|isl|json)/)'\n    Priority:        3\n    SortPriority:    0\n  - Regex:           '.*'\n    Priority:        1\n    SortPriority:    0\nIncludeIsMainRegex: '(Test)?$'\nIncludeIsMainSourceRegex: ''\nIndentCaseLabels: false\nIndentCaseBlocks: false\nIndentGotoLabels: true\nIndentPPDirectives: None\nIndentExternBlock: AfterExternBlock\nIndentWidth:     2\nIndentWrappedFunctionNames: false\nInsertTrailingCommas: None\nJavaScriptQuotes: Leave\nJavaScriptWrapImports: true\nKeepEmptyLinesAtTheStartOfBlocks: true\nMacroBlockBegin: ''\nMacroBlockEnd:   ''\nMaxEmptyLinesToKeep: 1\nNamespaceIndentation: None\nObjCBinPackProtocolList: Auto\nObjCBlockIndentWidth: 2\nObjCBreakBeforeNestedBlockParam: true\nObjCSpaceAfterProperty: false\nObjCSpaceBeforeProtocolList: true\nPenaltyBreakAssignment: 2\nPenaltyBreakBeforeFirstCallParameter: 19\nPenaltyBreakComment: 300\nPenaltyBreakFirstLessLess: 120\nPenaltyBreakString: 1000\nPenaltyBreakTemplateDeclaration: 10\nPenaltyExcessCharacter: 1000000\nPenaltyReturnTypeOnItsOwnLine: 60\nPointerAlignment: Right\nReflowComments:  true\nSortIncludes:    true\nSortUsingDeclarations: true\nSpaceAfterCStyleCast: false\nSpaceAfterLogicalNot: false\nSpaceAfterTemplateKeyword: true\nSpaceBeforeAssignmentOperators: true\nSpaceBeforeCpp11BracedList: false\nSpaceBeforeCtorInitializerColon: true\nSpaceBeforeInheritanceColon: true\nSpaceBeforeParens: ControlStatements\nSpaceBeforeRangeBasedForLoopColon: true\nSpaceInEmptyBlock: false\nSpaceInEmptyParentheses: false\nSpacesBeforeTrailingComments: 1\nSpacesInAngles:  false\nSpacesInConditionalStatement: false\nSpacesInContainerLiterals: true\nSpacesInCStyleCastParentheses: false\nSpacesInParentheses: false\nSpacesInSquareBrackets: false\nSpaceBeforeSquareBrackets: false\nStandard:        Latest\nStatementMacros:\n  - Q_UNUSED\n  - QT_REQUIRE_VERSION\nTabWidth:        8\nUseCRLF:         false\nUseTab:          Never\nWhitespaceSensitiveMacros:\n  - STRINGIZE\n  - PP_STRINGIZE\n  - BOOST_PP_STRINGIZE\n...\n\n"
  },
  {
    "path": ".github/dependabot.yml",
    "content": "# To get started with Dependabot version updates, you'll need to specify which\n# package ecosystems to update and where the package manifests are located.\n# Please see the documentation for all configuration options:\n# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates\n\nversion: 2\nupdates:\n  - package-ecosystem: \"cargo\"\n    directory: \"/\"\n    schedule:\n      interval: \"daily\"\n    groups:\n      cargo:\n        patterns:\n          - \"*\"\n    open-pull-requests-limit: 1\n\n\n  - package-ecosystem: \"npm\"\n    directory: \"/integration-tests/js-compute\"\n    schedule:\n      interval: \"daily\"\n    groups:\n      npm:\n        patterns:\n          - \"*\"\n    open-pull-requests-limit: 1"
  },
  {
    "path": ".github/workflows/cleanup.yml",
    "content": "name: 'Cleanup'\non: workflow_dispatch\npermissions:\n  contents: read\nenv:\n  fastly-cli_version: 14.2.0\njobs:\n  cleanup:\n    name: Cleanup\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v4\n    - uses: actions/setup-node@v3\n      with:\n        node-version: 'lts/*'\n    - run: cd ./integration-tests/js-compute && npm install\n    - name: Set up Fastly CLI\n      uses: fastly/compute-actions/setup@v4\n      with:\n        token: ${{ secrets.GITHUB_TOKEN }}\n        cli_version: ${{ env.fastly-cli_version }}\n    - run: node integration-tests/js-compute/cleanupAll.js\n      env:\n        FASTLY_API_TOKEN: ${{ secrets.FASTLY_API_TOKEN }}\n"
  },
  {
    "path": ".github/workflows/dependencies.yml",
    "content": "name: 'Dependency Review'\non: [pull_request]\n\npermissions:\n  contents: read\n\njobs:\n  dependency-review:\n    name: Dependency Review\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/dependency-review-action@v2.2.0\n      with:\n        allow-licenses: Apache-2.0, MIT, BSD-3-Clause, ISC, BSD-2-Clause, MIT OR (CC0-1.0 AND MIT), CC0-1.0 OR MIT OR (CC0-1.0 AND MIT), CC-BY-3.0, CC0-1.0, MIT OR Apache-2.0, MIT AND Apache-2.0, MIT OR WTFPL, BSD-2-Clause OR (MIT OR Apache-2.0), Python-2.0, ISC AND MIT, Apache-2.0 AND MIT, MIT/Apache-2.0, Apache-2.0 OR MIT, (Apache-2.0 OR MIT) AND BSD-3-Clause, Zlib OR Apache-2.0 OR MIT, MIT OR Apache-2.0 OR Zlib, MIT OR (Apache-2.0 OR Zlib), (Apache-2.0 WITH LLVM-exception), 0BSD, CC-BY-4.0, Unlicense, MPL-1.1, LicenseRef-scancode-unicode AND MIT, Unlicense OR MIT\n        fail-on-scopes: runtime\n"
  },
  {
    "path": ".github/workflows/main.yml",
    "content": "name: CI\nconcurrency:\n  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}\n  cancel-in-progress: true\non:\n  pull_request:\n  push:\n    branches: [main]\ndefaults:\n  run:\n    shell: bash\nenv:\n  # Note: when updated, also update version in ensure-cargo-installs\n  viceroy_version: 0.16.5\n  # Note: when updated, also update version in ensure-cargo-installs ! AND ! release-please.yml\n  wasm-tools_version: 1.216.0\n  fastly-cli_version: 14.2.0\n\njobs:\n  check-changelog:\n    if: github.ref != 'refs/heads/main'\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v4\n    - uses: actions/setup-node@v3\n      with:\n        node-version: 'lts/*'\n    - run: npm ci\n    - run: npm run format-changelog\n\n  check-docusaurus:\n    if: github.ref != 'refs/heads/main'\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v4\n    - uses: actions/setup-node@v3\n      with:\n        node-version: 'lts/*'\n    - run: cd documentation && npm run add-fastly-prefix\n    - run: cd documentation && npm ci\n    - run: cd documentation && npm run build\n\n  ensure-cargo-installs:\n    name: Ensure that all required \"cargo install\" commands are run, or we have a cache hit\n    strategy:\n      matrix:\n        include:\n          - crate: viceroy\n            version: 0.16.5 # Note: workflow-level env vars can't be used in matrix definitions\n            options: \"\"\n          - crate: wasm-tools\n            version: 1.216.0 # Note: workflow-level env vars can't be used in matrix definitions\n            options: \"\"\n    runs-on: ubuntu-latest\n    steps:\n    - name: Cache ${{ matrix.crate }} ${{ matrix.version }}\n      id: cache-crate\n      uses: actions/cache@v3\n      with:\n        path: \"/home/runner/.cargo/bin/${{ matrix.crate }}\"\n        key: crate-cache-${{ matrix.crate }}-${{ matrix.version }}\n    - name: Install ${{ matrix.crate }} ${{ matrix.version }}\n      if: steps.cache-crate.outputs.cache-hit != 'true'\n      run: cargo install ${{ matrix.crate }} ${{ matrix.options }} --version ${{ matrix.version }} --force\n\n  shellcheck:\n    env:\n      SHELLCHECK_VERSION: v0.8.0\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v4\n    - uses: actions/cache@v3\n      id: cache-shellcheck\n      with:\n        path: ${{ runner.tool_cache }}/shellcheck\n        key: shellcheck-${{ runner.os }}-${{ env.SHELLCHECK_VERSION }}\n\n    - name: Download shellcheck\n      if: steps.cache-shellcheck.output.cache-hit != 'true'\n      run: |\n        version=\"${{ env.SHELLCHECK_VERSION }}\"\n        baseurl=\"https://github.com/koalaman/shellcheck/releases/download\"\n\n        curl -Lso \"shellcheck.tar.xz\" \\\n          \"${baseurl}/${version}/shellcheck-${version}.linux.x86_64.tar.xz\"\n\n        mkdir -p \"${{ runner.tool_cache }}/shellcheck/bin\"\n\n        tar -xf shellcheck.tar.xz -C \"${{ runner.tool_cache }}/shellcheck/bin\"\n\n    - name: Add shellcheck to path\n      run: echo \"${{ runner.tool_cache }}/shellcheck/bin\" >> $GITHUB_PATH\n\n    - name: Run shellcheck\n      run: ci/shellcheck.sh\n\n  format:\n    if: github.ref != 'refs/heads/main'\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v4\n    - name: \"Install wasi-sdk-20 (linux)\"\n      run: |\n        set -x\n        curl -sS -L -O https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-20/wasi-sdk-20.0-linux.tar.gz\n        tar xf wasi-sdk-20.0-linux.tar.gz\n        sudo mkdir -p /opt/wasi-sdk\n        sudo mv wasi-sdk-20.0/* /opt/wasi-sdk/\n        ls /opt/wasi-sdk/\n    - run: |\n        /opt/wasi-sdk/bin/clang-format --version\n        ci/clang-format.sh\n    - run: |\n        ci/rustfmt.sh\n    - run: npm install\n    - run: npm run format:check\n\n  test-npm-package:\n    if: github.ref != 'refs/heads/main'\n    needs: [build]\n    strategy:\n      matrix:\n        node-version: [18, 22]\n        os: [\n          ubuntu-latest,\n          windows-latest,\n          macos-latest\n        ]\n        exclude:\n        - os: macos-latest\n          node-version: 18\n        - os: windows-latest\n          node-version: 18\n    runs-on: ${{ matrix.os }}\n    steps:\n    - uses: actions/checkout@v4\n    - uses: actions/setup-node@v3\n      with:\n        node-version: ${{ matrix.node-version }}\n    - name: Download Engine\n      uses: actions/download-artifact@v4\n      with:\n        name: fastly-release\n    - name: Download Engine\n      uses: actions/download-artifact@v4\n      with:\n        name: fastly-debug\n    - name: Download Engine\n      uses: actions/download-artifact@v4\n      with:\n        name: fastly-weval\n    - name: Download Engine Weval Cache\n      uses: actions/download-artifact@v4\n      with:\n        name: fastly-weval-ic-cache\n    - run: npm install\n    - name: Build CLI\n      run: npm run build:cli\n    - run: npm test\n\n  build-debug:\n    name: Debug Build\n    needs: [ensure-cargo-installs]\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v4\n      with:\n        submodules: true\n    - name: Set up Node LTS\n      uses: actions/setup-node@v3\n      with:\n        node-version: 'lts/*'\n    - run: npm ci\n    - name: Install Rust 1.81.0\n      run: |\n        rustup toolchain install 1.81.0\n        rustup target add wasm32-wasip1 --toolchain 1.81.0\n    - name: Restore wasm-tools from cache\n      uses: actions/cache@v3\n      id: wasm-tools\n      with:\n        path: \"/home/runner/.cargo/bin/wasm-tools\"\n        key: crate-cache-wasm-tools-${{ env.wasm-tools_version }}\n    - name: Build CLI\n      run: npm run build:cli\n    - name: Build with full debug info\n      run: npm run build:debug:info\n    - uses: actions/upload-artifact@v4\n      with:\n        if-no-files-found: error\n        name: fastly-debug\n        path: fastly.debug.wasm\n\n  build:\n    name: Build\n    needs: [ensure-cargo-installs]\n    runs-on: ubuntu-latest\n    strategy:\n      matrix:\n        profile: [release, weval]\n    steps:\n    - uses: actions/checkout@v4\n      with:\n        submodules: true\n    - name: Set up Node LTS\n      uses: actions/setup-node@v3\n      with:\n        node-version: 'lts/*'\n    - run: npm ci\n    - name: Install Rust 1.81.0\n      run: |\n        rustup toolchain install 1.81.0\n        rustup target add wasm32-wasip1 --toolchain 1.81.0\n    - name: Restore wasm-tools from cache\n      uses: actions/cache@v3\n      id: wasm-tools\n      with:\n        path: \"/home/runner/.cargo/bin/wasm-tools\"\n        key: crate-cache-wasm-tools-${{ env.wasm-tools_version }}\n    - name: Build CLI\n      run: npm run build:cli\n    - name: Build\n      if: matrix.profile == 'release'\n      run: npm run build:release\n    - name: Build\n      if: matrix.profile == 'weval'\n      run: npm run build:weval\n    - uses: actions/upload-artifact@v4\n      with:\n        if-no-files-found: error\n        name: fastly-${{ matrix.profile }}\n        path: fastly${{ matrix.profile == 'debug' && '.debug.wasm' || (matrix.profile == 'weval' && '-weval.wasm' || '.wasm') }}\n    - uses: actions/upload-artifact@v4\n      if: matrix.profile == 'weval'\n      with:\n        name: fastly-${{ matrix.profile }}-ic-cache\n        path: fastly-ics.wevalcache\n\n  run-wpt-debug:\n    if: github.ref != 'refs/heads/main'\n    name: Run Web Platform Tests Debug\n    needs: [build-debug, ensure-cargo-installs]\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v4\n      with:\n        submodules: true\n    - name: Set up Node LTS\n      uses: actions/setup-node@v3\n      with:\n        node-version: 'lts/*'\n    - run: npm ci\n\n    - name: Download Engine\n      uses: actions/download-artifact@v4\n      with:\n        name: fastly-debug\n\n    - name: Restore Viceroy from cache\n      uses: actions/cache@v3\n      with:\n        path: \"/home/runner/.cargo/bin/viceroy\"\n        key: crate-cache-viceroy-${{ env.viceroy_version }}\n\n    - name: Restore wasm-tools from cache\n      uses: actions/cache@v3\n      id: wasm-tools\n      with:\n        path: \"/home/runner/.cargo/bin/wasm-tools\"\n        key: crate-cache-wasm-tools-${{ env.wasm-tools_version }}\n\n    - name: Build CLI\n      run: npm run build:cli\n\n    - name: Build WPT runtime\n      run: tests/wpt-harness/build-wpt-runtime.sh --debug-build\n\n    - name: Prepare WPT hosts\n      run: |\n        cd tests/wpt-harness/wpt\n        ./wpt make-hosts-file | sudo tee -a /etc/hosts\n\n    - name: Run tests\n      timeout-minutes: 20\n      run: node ./tests/wpt-harness/run-wpt.mjs -vv\n\n  run-wpt:\n    strategy:\n      matrix:\n        profile: [release, weval]\n    if: github.ref != 'refs/heads/main'\n    name: Run Web Platform Tests\n    needs: [build, ensure-cargo-installs]\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v4\n      with:\n        submodules: true\n    - name: Set up Node LTS\n      uses: actions/setup-node@v3\n      with:\n        node-version: 'lts/*'\n    - run: npm ci\n\n    - name: Download Engine\n      uses: actions/download-artifact@v4\n      with:\n        name: fastly-${{ matrix.profile }}\n\n    - name: Download Engine Weval Cache\n      if: matrix.profile == 'weval'\n      uses: actions/download-artifact@v4\n      with:\n        name: fastly-weval-ic-cache\n\n    - name: Restore Viceroy from cache\n      uses: actions/cache@v3\n      with:\n        path: \"/home/runner/.cargo/bin/viceroy\"\n        key: crate-cache-viceroy-${{ env.viceroy_version }}\n\n    - name: Restore wasm-tools from cache\n      uses: actions/cache@v3\n      id: wasm-tools\n      with:\n        path: \"/home/runner/.cargo/bin/wasm-tools\"\n        key: crate-cache-wasm-tools-${{ env.wasm-tools_version }}\n\n    - name: Build CLI\n      run: npm run build:cli\n\n    - name: Build WPT runtime\n      run: tests/wpt-harness/build-wpt-runtime.sh ${{matrix.profile == 'weval' && '--enable-experimental-aot' || matrix.profile == 'debug' && '--debug-build' || ''}}\n\n    - name: Prepare WPT hosts\n      run: |\n        cd tests/wpt-harness/wpt\n        ./wpt make-hosts-file | sudo tee -a /etc/hosts\n\n    - name: Run tests\n      timeout-minutes: 20\n      run: node ./tests/wpt-harness/run-wpt.mjs -vv\n\n  sdktest:\n    concurrency:\n      group: ${{ github.head_ref }}--sdktest-${{matrix.profile}}-${{matrix.platform}}\n    if: github.ref != 'refs/heads/main'\n    runs-on: ubuntu-latest\n    strategy:\n      fail-fast: false\n      matrix:\n        platform: [viceroy, compute]\n        profile: [release, weval]\n        features: [none, http-cache]\n        exclude:\n          - platform: viceroy\n            features: http-cache\n    needs: [build, ensure-cargo-installs]\n    steps:\n    - name: Checkout fastly/js-compute-runtime\n      uses: actions/checkout@v6\n      with:\n        submodules: false\n    - uses: actions/setup-node@v3\n      with:\n        node-version: 'lts/*'\n\n    - name: Set up Fastly CLI\n      uses: fastly/compute-actions/setup@v4\n      with:\n        token: ${{ secrets.GITHUB_TOKEN }}\n        cli_version: ${{ env.fastly-cli_version }}\n\n    - name: Restore Viceroy from cache\n      if: matrix.platform == 'viceroy'\n      uses: actions/cache@v3\n      id: viceroy\n      with:\n        path: \"/home/runner/.cargo/bin/viceroy\"\n        key: crate-cache-viceroy-${{ env.viceroy_version }}\n\n    - name: Restore wasm-tools from cache\n      uses: actions/cache@v3\n      id: wasm-tools\n      with:\n        path: \"/home/runner/.cargo/bin/wasm-tools\"\n        key: crate-cache-wasm-tools-${{ env.wasm-tools_version }}\n\n    - name: Download Engine\n      uses: actions/download-artifact@v4\n      with:\n        name: fastly-${{ matrix.profile }}\n    - name: Download Engine (AOT weval cache)\n      uses: actions/download-artifact@v4\n      if: matrix.profile == 'weval'\n      with:\n        name: fastly-${{ matrix.profile }}-ic-cache\n\n    - name: Npm install\n      run: npm install && cd ./integration-tests/js-compute && npm install\n\n    - name: Build CLI\n      run: npm run build:cli\n\n    - name: Run Tests\n      run: SUFFIX_STRING=${{matrix.profile}}-${{ github.run_id }}-${{ github.run_attempt }} node integration-tests/js-compute/test.js --ci --skip-teardown${{ matrix.platform == 'viceroy' && ' --local' || '' }}${{ matrix.profile == 'weval' && ' --aot' || '' }}${{ matrix.features == 'http-cache' && ' --http-cache' || '' }}\n      env:\n        FASTLY_API_TOKEN: ${{ secrets.FASTLY_API_TOKEN }}\n\n    - name: Run Module Mode Tests\n      run: SUFFIX_STRING=${{matrix.profile}}-${{ github.run_id }}-${{ github.run_attempt }} node integration-tests/js-compute/test.js --ci --fixture=module-mode${{ matrix.platform == 'viceroy' && ' --local' || '' }}${{ matrix.profile == 'weval' && ' --aot' || '' }}${{ matrix.features == 'http-cache' && ' --http-cache' || '' }}\n      env:\n        FASTLY_API_TOKEN: ${{ secrets.FASTLY_API_TOKEN }}\n\n    - name: Run Reusable Sandbox Tests\n      if: matrix.platform == 'viceroy'\n      run: SUFFIX_STRING=${{matrix.profile}}-${{ github.run_id }}-${{ github.run_attempt }} node integration-tests/js-compute/test.js --ci --serial --fixture=reusable-sandboxes --local${{ matrix.profile == 'weval' && ' --aot' || '' }}${{ matrix.features == 'http-cache' && ' --http-cache' || '' }}\n      env:\n        FASTLY_API_TOKEN: ${{ secrets.FASTLY_API_TOKEN }}\n\n  sdktest-debug:\n    concurrency:\n      group: ${{ github.head_ref }}--sdktest-debug-${{matrix.platform}}\n    if: github.ref != 'refs/heads/main'\n    runs-on: ubuntu-latest\n    strategy:\n      fail-fast: false\n      matrix:\n        platform: [viceroy, compute]\n        features: [none, http-cache]\n        exclude:\n          - platform: viceroy\n            features: http-cache\n    needs: [build-debug, ensure-cargo-installs]\n    steps:\n    - name: Checkout fastly/js-compute-runtime\n      uses: actions/checkout@v4\n      with:\n        submodules: false\n    - uses: actions/setup-node@v3\n      with:\n        node-version: 'lts/*'\n\n    - name: Set up Fastly CLI\n      uses: fastly/compute-actions/setup@v4\n      with:\n        token: ${{ secrets.GITHUB_TOKEN }}\n        cli_version: ${{ env.fastly-cli_version }}\n\n    - name: Restore Viceroy from cache\n      if: matrix.platform == 'viceroy'\n      uses: actions/cache@v3\n      id: viceroy\n      with:\n        path: \"/home/runner/.cargo/bin/viceroy\"\n        key: crate-cache-viceroy-${{ env.viceroy_version }}\n\n    - name: Restore wasm-tools from cache\n      uses: actions/cache@v3\n      id: wasm-tools\n      with:\n        path: \"/home/runner/.cargo/bin/wasm-tools\"\n        key: crate-cache-wasm-tools-${{ env.wasm-tools_version }}\n\n    - name: Download Engine\n      uses: actions/download-artifact@v4\n      with:\n        name: fastly-debug\n\n    - name: Strip debug sections (compute only)\n      if: matrix.platform == 'compute'\n      run: wasm-tools strip fastly.debug.wasm -d \".debug_(info|loc|ranges|abbrev|line|str)\" -o fastly.debug.wasm\n\n    - name: Npm install\n      run: npm install && cd ./integration-tests/js-compute && npm install\n\n    - name: Build CLI\n      run: npm run build:cli\n\n    - name: Run Tests\n      run: SUFFIX_STRING=debug-${{ github.run_id }}-${{ github.run_attempt }} node integration-tests/js-compute/test.js --ci --skip-teardown --debug-build${{ matrix.platform == 'viceroy' && ' --local' || '' }}${{ matrix.features == 'http-cache' && ' --http-cache' || '' }}\n      env:\n        FASTLY_API_TOKEN: ${{ secrets.FASTLY_API_TOKEN }}\n\n    - name: Run Module Mode Tests\n      run: SUFFIX_STRING=debug-${{ github.run_id }}-${{ github.run_attempt }} node integration-tests/js-compute/test.js --ci --fixture=module-mode --debug-build${{ matrix.platform == 'viceroy' && ' --local' || '' }}${{ matrix.features == 'http-cache' && ' --http-cache' || '' }}\n      env:\n        FASTLY_API_TOKEN: ${{ secrets.FASTLY_API_TOKEN }}\n\n    - name: Run Reusable Sandbox Tests\n      if: matrix.platform == 'viceroy'\n      run: SUFFIX_STRING=debug-${{ github.run_id }}-${{ github.run_attempt }} node integration-tests/js-compute/test.js --ci --serial --fixture=reusable-sandboxes --debug-build${{ matrix.platform == 'viceroy' && ' --local' || '' }}${{ matrix.features == 'http-cache' && ' --http-cache' || '' }}\n      env:\n        FASTLY_API_TOKEN: ${{ secrets.FASTLY_API_TOKEN }}\n"
  },
  {
    "path": ".github/workflows/release-please.yml",
    "content": "on:\n  push:\n    branches:\n      - main\npermissions:\n  id-token: write\n  contents: write\n  issues: write\n  pull-requests: write\n  packages: write\nenv:\n  wasm-tools_version: 1.216.0\nname: release-please\njobs:\n  release:\n    runs-on: ubuntu-latest\n    outputs:\n      releases_created: ${{ steps.release.outputs.releases_created }}\n      pr: ${{ steps.release.outputs.pr }}\n    steps:\n      - uses: google-github-actions/release-please-action@v3\n        id: release\n        with:\n          release-type: node\n          package-name: \"@fastly/js-compute\"\n          changelog-path: \"CHANGELOG.md\"\n          bump-minor-pre-major: true\n          bump-patch-for-minor-pre-major: true\n          draft: false\n          prerelease: false\n          token: ${{ secrets.GITHUB_TOKEN }}\n\n\n  update-lock-and-docs:\n    runs-on: ubuntu-latest\n    needs: release\n    if: ${{ needs.release.outputs.pr && !needs.release.outputs.releases_created }}\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v3\n        with:\n          submodules: true\n          ref: release-please--branches--main--components--js-compute\n          fetch-depth: 2\n          token: ${{ secrets.GITHUB_TOKEN }}\n\n      - name: Setup Node.js\n        uses: actions/setup-node@v3\n        with:\n          node-version: 'lts/*'\n\n      - name: Cache Compute File Server CLI\n        id: cache-compute-file-server-cli\n        uses: actions/cache@v3\n        with:\n          path: \"/home/runner/.cargo/bin/compute-file-server-cli\"\n          key: crate-cache-compute-file-server-cli\n      - name: Install Compute File Server CLI\n        if: steps.cache-compute-file-server-cli.outputs.cache-hit != 'true'\n        run: cd compute-file-server-cli && cargo install --path .\n\n      - run: npm update\n        working-directory: ./documentation\n      - run: npm run add-fastly-prefix\n        working-directory: ./documentation\n      - run: npm run docusaurus docs:version \"$(npm pkg get version --json --prefix=../ | jq -r)\"\n        working-directory: ./documentation\n\n      - run: npm update\n        working-directory: ./documentation/app\n      - run: npm run build:files\n        working-directory: ./documentation/app\n\n      - run: npm install && npm run format-changelog\n\n      - run: npm run remove-fastly-prefix\n        working-directory: ./documentation\n      - name: Committing and push changes\n        run: |\n          git config user.name \"${GITHUB_ACTOR}\"\n          git config user.email \"${GITHUB_ACTOR}@users.noreply.github.com\"\n          git add .\n          git commit -m \"chore: add docs for $(npm pkg get version --json | jq -r)\"\n          git push --force\n\n  build:\n    name: Build\n    runs-on: ubuntu-latest\n    needs: release\n    if: ${{ needs.release.outputs.releases_created }}\n    strategy:\n      matrix:\n        profile: [debug, release, weval]\n    steps:\n    - uses: actions/checkout@v3\n      with:\n        submodules: true\n    - name: Set up Node LTS\n      uses: actions/setup-node@v3\n      with:\n        node-version: 'lts/*'\n    - run: npm ci\n    - name: Install Rust 1.81.0\n      run: |\n        rustup toolchain install 1.81.0\n        rustup target add wasm32-wasip1 --toolchain 1.81.0\n    - name: Restore wasm-tools from cache\n      uses: actions/cache@v3\n      id: wasm-tools\n      with:\n        path: \"/home/runner/.cargo/bin/wasm-tools\"\n        key: crate-cache-wasm-tools-${{ env.wasm-tools_version }}\n    - name: Build CLI\n      run: npm run build:cli\n    - name: Build\n      if: ${{ matrix.profile == 'release' }}\n      run: npm run build:release\n    - name: Build\n      if: ${{ matrix.profile == 'debug' }}\n      run: npm run build:debug\n    - name: Build\n      if: ${{ matrix.profile == 'weval' }}\n      run: npm run build:weval\n    - uses: actions/upload-artifact@v4\n      with:\n        if-no-files-found: error\n        name: fastly-${{ matrix.profile }}\n        path: fastly${{ matrix.profile == 'debug' && '.debug.wasm' || (matrix.profile == 'weval' && '-weval.wasm' || '.wasm') }}\n    - uses: actions/upload-artifact@v4\n      if: ${{ matrix.profile == 'weval' }}\n      with:\n        name: fastly-${{ matrix.profile }}-ic-cache\n        path: fastly-ics.wevalcache\n\n  publish:\n    runs-on: ubuntu-latest\n    needs: [release, build]\n    if: ${{ needs.release.outputs.releases_created }}\n    steps:\n      - uses: actions/checkout@v3\n        with:\n          submodules: true\n\n      - name: Setup Node.js\n        uses: actions/setup-node@v3\n        with:\n          node-version: 'lts/*'\n          registry-url: 'https://registry.npmjs.org'\n      \n      - name: Restore wasm-tools from cache\n        uses: actions/cache@v3\n        id: wasm-tools\n        with:\n          path: \"/home/runner/.cargo/bin/wasm-tools\"\n          key: crate-cache-wasm-tools-${{ env.wasm-tools_version }}\n\n      - name: Cache Compute File Server CLI\n        id: cache-compute-file-server-cli\n        uses: actions/cache@v3\n        with:\n          path: \"/home/runner/.cargo/bin/compute-file-server-cli\"\n          key: crate-cache-compute-file-server-cli\n      - name: Install Compute File Server CLI\n        if: steps.cache-compute-file-server-cli.outputs.cache-hit != 'true'\n        run: cd compute-file-server-cli && cargo install --path .\n\n      - run: npm install --immutable\n\n      - name: Download Engine Release\n        uses: actions/download-artifact@v4\n        with:\n          name: fastly-release\n\n      - name: Download Engine Debug\n        uses: actions/download-artifact@v4\n        with:\n          name: fastly-debug\n\n      - name: Download Engine Weval\n        uses: actions/download-artifact@v4\n        with:\n          name: fastly-weval\n\n      - name: Download Engine Weval Cache\n        uses: actions/download-artifact@v4\n        with:\n          name: fastly-weval-ic-cache\n\n      - name: Build CLI\n        run: npm run build:cli\n\n      - name: npmjs publish\n        run: npm publish\n\n      - name: github package registry publish\n        run: |\n          cat << EOF > .npmrc\n          //npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}\n          @fastly:registry=https://npm.pkg.github.com\n          registry=https://registry.npmjs.org/\n          always-auth=true\n          EOF\n          npm publish\n          rm .npmrc\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n      - run: npm run add-fastly-prefix\n        working-directory: ./documentation\n\n      - run: npm ci\n        working-directory: ./documentation\n\n      - name: Set up Fastly CLI\n        uses: fastly/compute-actions/setup@v2\n        with:\n          token: ${{ secrets.GITHUB_TOKEN }}\n          cli_version: '14.2.0'\n\n      - run: npm run deploy\n        timeout-minutes: 120\n        env:\n          FASTLY_API_TOKEN: ${{secrets.FASTLY_API_TOKEN}}\n        working-directory: ./documentation\n"
  },
  {
    "path": ".gitignore",
    "content": "# TypeScript build output\ndist/\n\n# Integration Tests build output\n/integration-tests/**/fixtures/**/*.tar.gz\n/integration-tests/**/fixtures/**/fastly.toml\n/integration-tests/**/fixtures/**/*.wasm\n/integration-tests/**/fixtures/**/*.js.map\n\n/runtime/fastly/build-*/\n\nnode_modules/\n.DS_Store\n# compiler_flags\n/fastly-weval.wasm\n/fastly.debug.wasm\n/fastly.wasm\n/fastly-ics.wevalcache\ntests/wpt-harness/wpt-test-runner.js\nwpt-runtime.wasm\ndocs-app/bin/main.wasm\ndocs-app/pkg/*.tar.gz\n\nyarn-error.log\n.vscode"
  },
  {
    "path": ".gitmodules",
    "content": "[submodule \"tests/wpt-harness/wpt\"]\n\tpath = tests/wpt-harness/wpt\n\turl = https://github.com/web-platform-tests/wpt.git\n\tshallow = true\n[submodule \"runtime/StarlingMonkey\"]\n\tpath = runtime/StarlingMonkey\n\turl = git@github.com:bytecodealliance/StarlingMonkey\n"
  },
  {
    "path": ".prettierrc.json",
    "content": "{\n  \"singleQuote\": true\n}\n"
  },
  {
    "path": "CHANGELOG.md",
    "content": "# Changelog\n\n## 3.41.2 (2026-05-04)\n\n### Fixed\n\n* `HttpBody::read_all` for large bodies ([#1444](https://github.com/fastly/js-compute-runtime/issues/1444)) ([99f45b5](https://github.com/fastly/js-compute-runtime/commit/99f45b53253d1109202c24cddc3357752873ca90))\n* Check pending exceptions between requests in reusable sandbox mode ([#1425](https://github.com/fastly/js-compute-runtime/issues/1425)) ([64a6b21](https://github.com/fastly/js-compute-runtime/commit/64a6b213c605d2ae714b8a49faad9893284998a5))\n* Memory issues exposed by high GC zeal ([#1442](https://github.com/fastly/js-compute-runtime/issues/1442)) ([f406308](https://github.com/fastly/js-compute-runtime/commit/f406308ce6ced5b8475839ce43736fb588d3e4b5))\n* Memory leak in normalize\\_http\\_method ([#1449](https://github.com/fastly/js-compute-runtime/issues/1449)) ([669b58a](https://github.com/fastly/js-compute-runtime/commit/669b58a0f34a03f56571723c442b3fee61c90b3b))\n* mislabeled `Response::Slots::URL` slot ([#1445](https://github.com/fastly/js-compute-runtime/issues/1445)) ([6d4d268](https://github.com/fastly/js-compute-runtime/commit/6d4d26815acc817365bc41d0784095650847765a))\n* Numeric overflow issue in Core Cache API ([#1448](https://github.com/fastly/js-compute-runtime/issues/1448)) ([360c9bf](https://github.com/fastly/js-compute-runtime/commit/360c9bfff611e226c5dbf5fac61d98e993feded3))\n* Potential buffer size issues in shielding ([#1443](https://github.com/fastly/js-compute-runtime/issues/1443)) ([4bf9d72](https://github.com/fastly/js-compute-runtime/commit/4bf9d722b68893f188a89c1e6019c9a7699a023b))\n* Reset StarlingMonkey engine between requests ([#1426](https://github.com/fastly/js-compute-runtime/issues/1426)) ([238cf70](https://github.com/fastly/js-compute-runtime/commit/238cf70ecd743f73c662ae3757244859d4d2aaad))\n* SSL string cipher intersection ([#1446](https://github.com/fastly/js-compute-runtime/issues/1446)) ([13ef2d5](https://github.com/fastly/js-compute-runtime/commit/13ef2d59a4a0c2e93cc0faa8cd98387e3bdee731))\n* Use length rather than NUL-terminator when copying `HostString`s ([#1429](https://github.com/fastly/js-compute-runtime/issues/1429)) ([8aa3f4c](https://github.com/fastly/js-compute-runtime/commit/8aa3f4c2cfa441585ac5d3ee1a0ac4d58196162a))\n\n## 3.41.1 (2026-04-10)\n\n### Fixed\n\n* Deal with bodyless statuses in CandidateResponse situations ([#1414](https://github.com/fastly/js-compute-runtime/issues/1414)) ([cfd6c4b](https://github.com/fastly/js-compute-runtime/commit/cfd6c4bd0ac41bb3037bbcdfb7ba7c6608ce65e6))\n* Mark FetchEvent as done when we redirect to ws/grip proxies ([9831bd4](https://github.com/fastly/js-compute-runtime/commit/9831bd48f34ad6e80c7932a02b6acd5292ee2799))\n* Support `setCacheKey` for HTTP cache ([#1411](https://github.com/fastly/js-compute-runtime/issues/1411)) ([a707c3d](https://github.com/fastly/js-compute-runtime/commit/a707c3d1156893f969b02da1fec3807c0d095860))\n\n## 3.41.0 (2026-04-08)\n\n### Added\n\n* Add `--gc-frequency` option to `debug-build.sh` ([#1395](https://github.com/fastly/js-compute-runtime/issues/1395)) ([a6e4a1f](https://github.com/fastly/js-compute-runtime/commit/a6e4a1fd11acc62b7ce409f1aa2e017ff85b347c))\n* Allow the use of project-level external config file for js-compute-runtime CLI behavior ([#1405](https://github.com/fastly/js-compute-runtime/issues/1405)) ([9749cab](https://github.com/fastly/js-compute-runtime/commit/9749cab9f87be27a19a3a9c14bbddcfe2c590c1f))\n* Support installation in projects that use TypeScript 6 ([e4273a3](https://github.com/fastly/js-compute-runtime/commit/e4273a3f004e9af0a61d21c67a1cb6c5680cde29))\n\n### Fixed\n\n* Allow `--aot-cache` and `--debug-intermediate-files` flags to be specified with equals ([#1403](https://github.com/fastly/js-compute-runtime/issues/1403)) ([81a75f8](https://github.com/fastly/js-compute-runtime/commit/81a75f8704bd2befa899e55f382920f7da13f26f))\n* Double free in `convertBodyInit` ([#1387](https://github.com/fastly/js-compute-runtime/issues/1387)) ([72acfc3](https://github.com/fastly/js-compute-runtime/commit/72acfc3dc9077026746faaf323e5b11ecf48a4db))\n* GC fixes for edge rate limiter ([#1397](https://github.com/fastly/js-compute-runtime/issues/1397)) ([fd9e322](https://github.com/fastly/js-compute-runtime/commit/fd9e322fd852612f8df5d925b6e3a6c646b56109))\n* GC issue in handoffs ([#1396](https://github.com/fastly/js-compute-runtime/issues/1396)) ([b57fc8f](https://github.com/fastly/js-compute-runtime/commit/b57fc8f720cd530543ba8c8738c9dfe7bdff905e))\n* Shielding GC ([#1401](https://github.com/fastly/js-compute-runtime/issues/1401)) ([6de2f55](https://github.com/fastly/js-compute-runtime/commit/6de2f55b97c45dcd9aa246b22c7dbdafa883ee42))\n\n## 3.40.1 (2026-02-24)\n\n### Fixed\n\n* **early-hints:** early hints don't need to be sync inside a FetchEve… ([#1323](https://github.com/fastly/js-compute-runtime/issues/1323)) ([22ac0cc](https://github.com/fastly/js-compute-runtime/commit/22ac0ccd3205a0136e39621e2cfe93968a5be9f3))\n\n## 3.40.0 (2026-02-17)\n\n### Added\n\n* Allow custom weval binary ([#1315](https://github.com/fastly/js-compute-runtime/issues/1315)) ([b143150](https://github.com/fastly/js-compute-runtime/commit/b143150df609f217e8160759c0cf1dae2f86afb7))\n* Reusable sandboxes ([#1314](https://github.com/fastly/js-compute-runtime/issues/1314)) ([70a9d28](https://github.com/fastly/js-compute-runtime/commit/70a9d282d276176777d3369e164d8f89d3e96209))\n\n### Fixed\n\n* Add `security` to docs rename script ([#1316](https://github.com/fastly/js-compute-runtime/issues/1316)) ([7028c0b](https://github.com/fastly/js-compute-runtime/commit/7028c0bd819c44b870140d1536039f9aad6ddd4e))\n\n## 3.39.4 (2026-02-13)\n\n### Fixed\n\n* Body truncation error in chained extract\\_body requests ([#1310](https://github.com/fastly/js-compute-runtime/issues/1310)) ([b929648](https://github.com/fastly/js-compute-runtime/commit/b929648bef34c0d41fe387fc755a2554372bb946))\n\n## 3.39.3 (2026-02-12)\n\n### Fixed\n\n* Don't throw from `event.client.geo` or `event.client.address` on hostcall error ([#1306](https://github.com/fastly/js-compute-runtime/issues/1306)) ([471b112](https://github.com/fastly/js-compute-runtime/commit/471b1128a32b3a2233a95eb14e2887abbb6183c0))\n\n## 3.39.2 (2026-02-09)\n\n### Fixed\n\n* NPM publication ([f80c089](https://github.com/fastly/js-compute-runtime/commit/f80c089fa9a50835955c0b1a1b42bc24b5eceb3d))\n\n## 3.39.1 (2026-02-09)\n\n### Fixed\n\n* For now, go back to old behavior for default exported types. ([#1298](https://github.com/fastly/js-compute-runtime/issues/1298)) ([e6d96d4](https://github.com/fastly/js-compute-runtime/commit/e6d96d47206821855d80d651bfa248a6d7da4453))\n* TransformStream shortcutting fixes ([#1301](https://github.com/fastly/js-compute-runtime/issues/1301)) ([51369ae](https://github.com/fastly/js-compute-runtime/commit/51369ae51d721199e0bbc6f6d168f4b8f7aee947))\n\n## 3.39.0 (2026-01-28)\n\n### Added\n\n* Add `isBot` support to device detection ([#1287](https://github.com/fastly/js-compute-runtime/issues/1287)) ([fe079b1](https://github.com/fastly/js-compute-runtime/commit/fe079b16858ff18da3fe9210da0f5cc3c6bee0b0))\n* Implement `firstByteTimeout` for shielding ([#1286](https://github.com/fastly/js-compute-runtime/issues/1286)) ([ad445b7](https://github.com/fastly/js-compute-runtime/commit/ad445b70ddd56bcd39d6201ad3f15e860cb85db4))\n* Map the FastlyStatus values into KVStoreError values the same way the Rust SDK does ([#1280](https://github.com/fastly/js-compute-runtime/issues/1280)) ([726f4e2](https://github.com/fastly/js-compute-runtime/commit/726f4e285805e91cfcc0c7fdd58f127e4d2e9094))\n\n### Fixed\n\n* Correct default export ([#1269](https://github.com/fastly/js-compute-runtime/issues/1269)) ([58d872e](https://github.com/fastly/js-compute-runtime/commit/58d872e2ff6b6351ac4018f590f3a27a1e015297))\n* suppress sourcemap for bundle() step when `--enable-stack-traces` is not set ([#1277](https://github.com/fastly/js-compute-runtime/issues/1277)) ([ab8c12e](https://github.com/fastly/js-compute-runtime/commit/ab8c12e6aaf22dcf52ca74834fb5712a7ed83b42))\n\n## 3.38.4 (2026-01-23)\n\n### Fixed\n\n* Don't shortcut transform too early ([#1281](https://github.com/fastly/js-compute-runtime/issues/1281)) ([291814e](https://github.com/fastly/js-compute-runtime/commit/291814e330ae5e1e894f0a57db0dedc8b27fd9bd))\n\n## 3.38.3 (2026-01-22)\n\n### Fixed\n\n* clean script to include TypeScript output directory ([#1270](https://github.com/fastly/js-compute-runtime/issues/1270)) ([015e40c](https://github.com/fastly/js-compute-runtime/commit/015e40c7f6cf6bf95f5a2ff7c52f4225948146a1))\n* pin lol\\_html to 2.7.0 ([#1276](https://github.com/fastly/js-compute-runtime/issues/1276)) ([363550a](https://github.com/fastly/js-compute-runtime/commit/363550ae80056fb0e6fda2c7b67ddf4859d67fa8))\n* Rename shielding docs ([#1272](https://github.com/fastly/js-compute-runtime/issues/1272)) ([e12ab47](https://github.com/fastly/js-compute-runtime/commit/e12ab476821e9656dcdb5025e6ed54f40daf8da5))\n* Try and shortcut transform stream reading before doing a regular read ([#1279](https://github.com/fastly/js-compute-runtime/issues/1279)) ([6b9b939](https://github.com/fastly/js-compute-runtime/commit/6b9b939471e1589091f6cfa2f7864a528df35b1c))\n\n## 3.38.2 (2025-12-19)\n\n### Fixed\n\n* Handle cross-volume renames of intermediate files ([#1264](https://github.com/fastly/js-compute-runtime/issues/1264)) ([94e5671](https://github.com/fastly/js-compute-runtime/commit/94e5671090cbde1c3159032c90aa3f3ad2fdc88a))\n\n## 3.38.1 (2025-12-18)\n\n### Fixed\n\n* Build CLI in npm publish ([#1262](https://github.com/fastly/js-compute-runtime/issues/1262)) ([2fe6e2d](https://github.com/fastly/js-compute-runtime/commit/2fe6e2d5b38c74c4a3f7c4a4941d116ec75b1d88))\n\n## 3.38.0 (2025-12-18)\n\n### Added\n\n* **config:** add support for config store buffers longer than 8k ([#1181](https://github.com/fastly/js-compute-runtime/issues/1181)) ([da4c169](https://github.com/fastly/js-compute-runtime/commit/da4c169f7a302c2e6c2a1796c791b9463c4dc2a8))\n* **inspect:** add support for NGWAF inspect api ([#1212](https://github.com/fastly/js-compute-runtime/issues/1212)) ([98f45e4](https://github.com/fastly/js-compute-runtime/commit/98f45e4d678e294301c21be2ddf16c4482683ef7))\n\n### Fixed\n\n* Correct behaviour of chained body proxy streams in some circumstances ([#1259](https://github.com/fastly/js-compute-runtime/issues/1259)) ([11f9a4b](https://github.com/fastly/js-compute-runtime/commit/11f9a4b5b5fc90f9f2eb9f6a6958e971fbd52e19))\n* make shielding.d.ts ambient ([#1256](https://github.com/fastly/js-compute-runtime/issues/1256)) ([7a0e987](https://github.com/fastly/js-compute-runtime/commit/7a0e9876d0e001ad6c1b87b3701ecfffddc7b5ad))\n\n## 3.37.0 (2025-12-11)\n\n### Added\n\n* Add client fingerprint properties (tlsJA4, h2Fingerprint, ohFingerprint) ([#1248](https://github.com/fastly/js-compute-runtime/issues/1248)) ([9390e8c](https://github.com/fastly/js-compute-runtime/commit/9390e8cdf37206a570512cf8d36335c70bc5ccde))\n* Shielding support ([#1241](https://github.com/fastly/js-compute-runtime/issues/1241)) ([985c55e](https://github.com/fastly/js-compute-runtime/commit/985c55e634227b8dac66aea9b7ba4ca982b41b9c))\n\n## 3.36.0 (2025-11-18)\n\n### Added\n\n* Image Optimizer support ([#1224](https://github.com/fastly/js-compute-runtime/issues/1224)) ([c3dd3de](https://github.com/fastly/js-compute-runtime/commit/c3dd3de7436f999055eb0b3d83a1f59c1c26b5d1))\n* Implement 103 Early Hints ([#1217](https://github.com/fastly/js-compute-runtime/issues/1217)) ([fda6ad3](https://github.com/fastly/js-compute-runtime/commit/fda6ad31d6f8ceee16cd950217be770a4f794bb3))\n\n### Fixed\n\n* **fanout:** commit request headers before fanout handoff ([#1222](https://github.com/fastly/js-compute-runtime/issues/1222)) ([8dfefad](https://github.com/fastly/js-compute-runtime/commit/8dfefadec46a2714be010c4a8c7e59cd43537fec))\n* Fix broken KVStore test ([#1223](https://github.com/fastly/js-compute-runtime/issues/1223)) ([6055d88](https://github.com/fastly/js-compute-runtime/commit/6055d884f617336d8d6326bf26dcfb49265f5ae2))\n\n## 3.35.2 (2025-11-07)\n\n### Fixed\n\n* **compute-file-server:** bump MSRV to fix ICU build issues ([#1221](https://github.com/fastly/js-compute-runtime/issues/1221)) ([379e511](https://github.com/fastly/js-compute-runtime/commit/379e51153e07962972b8a69e645e0f55912122d0))\n* surrogateKeys not being added when using CoreCache ([#1219](https://github.com/fastly/js-compute-runtime/issues/1219)) ([b0efe20](https://github.com/fastly/js-compute-runtime/commit/b0efe20c2f6f96755bb450d139e002797b376802))\n* **ws:** commit ws request headers before upgrading ([#1216](https://github.com/fastly/js-compute-runtime/issues/1216)) ([a15fa61](https://github.com/fastly/js-compute-runtime/commit/a15fa6148427801bbaf4d862b9a21884f21758f9))\n\n## 3.35.1 (2025-09-29)\n\n### Fixed\n\n* Root HTML rewriter variables to ensure no GC ([#1202](https://github.com/fastly/js-compute-runtime/issues/1202)) ([6aaf9f3](https://github.com/fastly/js-compute-runtime/commit/6aaf9f391acccfb68c5a012d92bf324df04d4230))\n\n## 3.35.0 (2025-09-26)\n\n### Added\n\n* HTML Rewriter ([0015ff1](https://github.com/fastly/js-compute-runtime/commit/0015ff155b9f57995ccf63671aee8c112b664678))\n\n### Fixed\n\n* Remove broken CI tests ([5b645f7](https://github.com/fastly/js-compute-runtime/commit/5b645f726f7a4f6eb741db3addda4b45be1dd63c))\n* Update rust toolchain for compute-file-server-cli ([09d5a6d](https://github.com/fastly/js-compute-runtime/commit/09d5a6dc66b0f1befff7268915f13dc4d7ac0854))\n\n## 3.34.0 (2025-04-11)\n\n### Added\n\n* add support for Websocket passthrough ([#1172](https://github.com/fastly/js-compute-runtime/issues/1172)) ([fcf2a54](https://github.com/fastly/js-compute-runtime/commit/fcf2a54e2935061b4d67ccb430d485d79ee0bd04))\n\n## 3.33.4 (2025-04-04)\n\n### Fixed\n\n* publish workflow ([#1166](https://github.com/fastly/js-compute-runtime/issues/1166)) ([3db857c](https://github.com/fastly/js-compute-runtime/commit/3db857c095aabbb15060694c3c84ae985cee13a1))\n\n## 3.33.3 (2025-04-04)\n\n### Fixed\n\n* config store documentation fix ([#1160](https://github.com/fastly/js-compute-runtime/issues/1160)) ([4047c7b](https://github.com/fastly/js-compute-runtime/commit/4047c7b0862bbaa799053cc341674725425f933a))\n* TypeScript declaration for Headers ([#1155](https://github.com/fastly/js-compute-runtime/issues/1155)) ([a6664b9](https://github.com/fastly/js-compute-runtime/commit/a6664b908db4f2f784ddedc53798f7c31474530e))\n\n## 3.33.2 (2025-03-17)\n\n### Fixed\n\n* TypeScript declaration return type of Acl.open() ([#1149](https://github.com/fastly/js-compute-runtime/issues/1149)) ([b9765f6](https://github.com/fastly/js-compute-runtime/commit/b9765f68823529327a8ec75268f4833d308ad6bd))\n* TypeScript type definitions for Blob, File, FormData ([#1150](https://github.com/fastly/js-compute-runtime/issues/1150)) ([4c93d79](https://github.com/fastly/js-compute-runtime/commit/4c93d794390e3f2cb98e8e806744620e2cde3b3b))\n* TypeScript type definitions for Event and EventTarget ([#1151](https://github.com/fastly/js-compute-runtime/issues/1151)) ([eb1ab0d](https://github.com/fastly/js-compute-runtime/commit/eb1ab0d2f693c199947e8b6ffc4a7c1d758024ad))\n\n## 3.33.1 (2025-03-12)\n\n### Fixed\n\n* documentation fix ([#1147](https://github.com/fastly/js-compute-runtime/issues/1147)) ([15b9ea5](https://github.com/fastly/js-compute-runtime/commit/15b9ea5b3121e779f0873a1562cc51ed710135c7))\n\n## 3.33.0 (2025-03-12)\n\n### Added\n\n* add support for EventTarget ([#1145](https://github.com/fastly/js-compute-runtime/issues/1145)) ([a735993](https://github.com/fastly/js-compute-runtime/commit/a735993e609b5e2405a5223e7bc02ef655a47d68))\n* FormData support and Request.formData and Response.formData ([#1144](https://github.com/fastly/js-compute-runtime/issues/1144)) ([0214ae7](https://github.com/fastly/js-compute-runtime/commit/0214ae70b8d5afd1bc66231d779af5b606e89efb))\n\n### Fixed\n\n* Backend.prototype.health method definition ([#1143](https://github.com/fastly/js-compute-runtime/issues/1143)) ([42d429b](https://github.com/fastly/js-compute-runtime/commit/42d429bafdd7ec02854217675bdb58eba1e533a4))\n* Weval stack overflow bug ([#1135](https://github.com/fastly/js-compute-runtime/issues/1135)) ([f6947d9](https://github.com/fastly/js-compute-runtime/commit/f6947d9eb9fcd10f91c8c439a8a5cd6db8169d9e))\n\n## 3.32.2 (2025-02-26)\n\n### Fixed\n\n* ready-based immediate task indexing ([#1129](https://github.com/fastly/js-compute-runtime/issues/1129)) ([8cfad4f](https://github.com/fastly/js-compute-runtime/commit/8cfad4f78c137afbdc0281e92c39e31415a1188b))\n\n## 3.32.1 (2025-02-20)\n\n### Fixed\n\n* docs server toolchain fix ([#1124](https://github.com/fastly/js-compute-runtime/issues/1124)) ([c2490d1](https://github.com/fastly/js-compute-runtime/commit/c2490d117754cb53a88cf3d40a1795a7b5177f54))\n\n## 3.32.0 (2025-02-20)\n\n### Added\n\n* Acl Support ([#1073](https://github.com/fastly/js-compute-runtime/issues/1073)) ([0f93f7b](https://github.com/fastly/js-compute-runtime/commit/0f93f7ba72f3a7cdb3de979af8ef677bccc1bd5b))\n\n## 3.31.0 (2025-02-14)\n\n### Added\n\n* KV store generation integer follow up ([#1029](https://github.com/fastly/js-compute-runtime/issues/1029)) ([#1108](https://github.com/fastly/js-compute-runtime/issues/1108)) ([8a076da](https://github.com/fastly/js-compute-runtime/commit/8a076dae5de19cb23cee0569359a6879667d6275))\n\n## 3.30.1 (2025-02-01)\n\n### Fixed\n\n* docs build ([#1104](https://github.com/fastly/js-compute-runtime/issues/1104)) ([49b4758](https://github.com/fastly/js-compute-runtime/commit/49b47580819b0be4718f7156e7ab8d8eb8375143))\n\n## 3.30.0 (2025-01-31)\n\n### Added\n\n* HTTP Cache API ([#1051](https://github.com/fastly/js-compute-runtime/issues/1051)) ([35e7565](https://github.com/fastly/js-compute-runtime/commit/35e7565eaa64a957445fbfd1b8acd9f78b289ba1))\n\n### Fixed\n\n* forbidden KV key special characters to match documentation ([#1097](https://github.com/fastly/js-compute-runtime/issues/1097)) ([fefc024](https://github.com/fastly/js-compute-runtime/commit/fefc024e9b53cc6e0a8bfa6769817a55e2ac154d))\n\n## 3.29.2 (2025-01-23)\n\n### Fixed\n\n* release workflow artifact version ([#1094](https://github.com/fastly/js-compute-runtime/issues/1094)) ([1c46dd6](https://github.com/fastly/js-compute-runtime/commit/1c46dd6f70908ab9f73d6aa890288056004a8498))\n\n## 3.29.1 (2025-01-23)\n\n### Fixed\n\n* to release process, update upload artifact ([#1092](https://github.com/fastly/js-compute-runtime/issues/1092)) ([fb5d25f](https://github.com/fastly/js-compute-runtime/commit/fb5d25ff2276c40a640c6e83ce521379687ce656))\n\n## 3.29.0 (2025-01-23)\n\n### Added\n\n* Blob support for fetch API ([#1070](https://github.com/fastly/js-compute-runtime/issues/1070)) ([56aa96d](https://github.com/fastly/js-compute-runtime/commit/56aa96d5a223d45d79327f0a19bcfd93f1e90363))\n* Fanout update to redirect\\_to\\_grip\\_proxy\\_v2 passing request handle ([#1079](https://github.com/fastly/js-compute-runtime/issues/1079)) ([baf0a6e](https://github.com/fastly/js-compute-runtime/commit/baf0a6e3f2d655954d7ae73944b7e72709356a2d))\n* support --env option for the runtime build ([#1090](https://github.com/fastly/js-compute-runtime/issues/1090)) ([e81d252](https://github.com/fastly/js-compute-runtime/commit/e81d252e0f1c2a76441cef407c7c1dc84ed93dcc))\n\n### Fixed\n\n* reinstate broken wpt tests ([#1071](https://github.com/fastly/js-compute-runtime/issues/1071)) ([5e2c682](https://github.com/fastly/js-compute-runtime/commit/5e2c68228be24ea6bd286fca0ca1ffbe028199c2))\n\n## 3.28.0 (2024-12-09)\n\n### Added\n\n* configureConsole function for configuring log prefixing and stderr ([#1065](https://github.com/fastly/js-compute-runtime/issues/1065)) ([9ed80ee](https://github.com/fastly/js-compute-runtime/commit/9ed80ee349b4178a54b960081fcae622a6406b70))\n* StarlingMonkey update ([#1067](https://github.com/fastly/js-compute-runtime/issues/1067)) ([857f6fa](https://github.com/fastly/js-compute-runtime/commit/857f6fa497be5e4ba2b48392dbbdc11ab7e98e34))\n\n### Fixed\n\n* do not throw uninitialized for KV ([#1064](https://github.com/fastly/js-compute-runtime/issues/1064)) ([c160c4a](https://github.com/fastly/js-compute-runtime/commit/c160c4ab5378be20052fed66abc9d194a4329065))\n* KVStore lookup fix for if-generation-match option ([#1069](https://github.com/fastly/js-compute-runtime/issues/1069)) ([9e4c795](https://github.com/fastly/js-compute-runtime/commit/9e4c795c3c083a85d36808e1ac26376a3779e0a4))\n\n## 3.27.3 (2024-12-03)\n\n### Fixed\n\n* KVStore error handling ([#1060](https://github.com/fastly/js-compute-runtime/issues/1060)) ([95885d8](https://github.com/fastly/js-compute-runtime/commit/95885d88b471aa17421dc52073df98e055737e40))\n\n## 3.27.2 (2024-11-09)\n\n### Fixed\n\n* docs build, ensuring compute-file-server-cli for publish ([#1044](https://github.com/fastly/js-compute-runtime/issues/1044)) ([40de0b8](https://github.com/fastly/js-compute-runtime/commit/40de0b86a012df7fdba8d764b22ea2893b3d8a0d))\n\n## 3.27.1 (2024-11-09)\n\n### Fixed\n\n* documentation site build ([#1042](https://github.com/fastly/js-compute-runtime/issues/1042)) ([3211ff9](https://github.com/fastly/js-compute-runtime/commit/3211ff989658a4c00bd2198ed32b723d13e7a19c))\n\n## 3.27.0 (2024-11-07)\n\n### Added\n\n* \\--enable-aot AOT compilation flag; no longer experimental. ([#1033](https://github.com/fastly/js-compute-runtime/issues/1033)) ([8128c4d](https://github.com/fastly/js-compute-runtime/commit/8128c4dd4b64b5a9979d7dc690d02b2c7bbcc1f7))\n\n### Fixed\n\n* ensure headers are set on first commit ([#1036](https://github.com/fastly/js-compute-runtime/issues/1036)) ([d622799](https://github.com/fastly/js-compute-runtime/commit/d6227994b896b3e31592231db955ddef3e8356bc))\n* fixup compute-file-server-cli dependency build ([#1037](https://github.com/fastly/js-compute-runtime/issues/1037)) ([206a60e](https://github.com/fastly/js-compute-runtime/commit/206a60ed49ebb209df04c9337d9703f1c12a3153))\n\n## 3.26.0 (2024-10-31)\n\n### Added\n\n* document AOT optimization flag ([#1023](https://github.com/fastly/js-compute-runtime/issues/1023)) ([9ba14cd](https://github.com/fastly/js-compute-runtime/commit/9ba14cdb263341d80476233424c9c2c7d5276c2c))\n* KV Store v2 ([#1004](https://github.com/fastly/js-compute-runtime/issues/1004)) ([fda97cc](https://github.com/fastly/js-compute-runtime/commit/fda97cc423a9eb96bd11ac5a5b9a5d4b6f93b081))\n* module mode ([#1021](https://github.com/fastly/js-compute-runtime/issues/1021)) ([9e47649](https://github.com/fastly/js-compute-runtime/commit/9e4764919c678701accd9cef039de5ff2761f7cc))\n\n### Fixed\n\n* typing file for compute builtin ([#1028](https://github.com/fastly/js-compute-runtime/issues/1028)) ([b328546](https://github.com/fastly/js-compute-runtime/commit/b3285467f0e5fedcca6bd23ee414db1e8d92a83a))\n\n## 3.25.0 (2024-10-22)\n\n### Added\n\n* support backend property on both Request and Response, as a Backend instance ([#1019](https://github.com/fastly/js-compute-runtime/issues/1019)) ([4e3b93d](https://github.com/fastly/js-compute-runtime/commit/4e3b93d9de1f0af9eed7c900eedb8a509d7723da))\n\n### Fixed\n\n* set SSL properly for created dynamic backends ([#1016](https://github.com/fastly/js-compute-runtime/issues/1016)) ([616e898](https://github.com/fastly/js-compute-runtime/commit/616e89827087623b8180665591127143532dc309))\n\n## 3.24.3 (2024-10-16)\n\n### Fixed\n\n* docs build, dependency updates ([#1013](https://github.com/fastly/js-compute-runtime/issues/1013)) ([59dc069](https://github.com/fastly/js-compute-runtime/commit/59dc069b97d5b1ef6fba049d592d727dcc409c97))\n\n## 3.24.2 (2024-10-16)\n\n### Fixed\n\n* doc links for deploy ([#1011](https://github.com/fastly/js-compute-runtime/issues/1011)) ([1c55c91](https://github.com/fastly/js-compute-runtime/commit/1c55c91169611a09517bbeecaaa4a55ae9676503))\n\n## 3.24.1 (2024-10-16)\n\n### Fixed\n\n* release workflow versioning ([#1009](https://github.com/fastly/js-compute-runtime/issues/1009)) ([1922c8a](https://github.com/fastly/js-compute-runtime/commit/1922c8affa3085dedf44e7f8adada3be50649118))\n\n## 3.24.0 (2024-10-15)\n\n### Added\n\n* default enable allowDynamicBackends with better unsupported errors ([#995](https://github.com/fastly/js-compute-runtime/issues/995)) ([bb858fe](https://github.com/fastly/js-compute-runtime/commit/bb858fe71ffa20a6be256fa27c1bfa9e44a503e5))\n* setDefaultDynamicBackendConfig with all backend configuration options ([#993](https://github.com/fastly/js-compute-runtime/issues/993)) ([1847924](https://github.com/fastly/js-compute-runtime/commit/1847924e223f01679017d7f79658b7601ad5bd7a))\n* support backend property hostcalls ([#1002](https://github.com/fastly/js-compute-runtime/issues/1002)) ([1d9f91a](https://github.com/fastly/js-compute-runtime/commit/1d9f91a2cba2b5d2dad8ae03094ed9452fcb0a42))\n\n## 3.23.0 (2024-09-18)\n\n### Added\n\n* grpc backend option ([#971](https://github.com/fastly/js-compute-runtime/issues/971)) ([e10829d](https://github.com/fastly/js-compute-runtime/commit/e10829d73aa0e0ccee20f19ad4c27b79f3c0723e))\n\n### Fixed\n\n* never error for missing client data, return null instead ([#979](https://github.com/fastly/js-compute-runtime/issues/979)) ([7068321](https://github.com/fastly/js-compute-runtime/commit/706832106fce165c5857f9671cb004ce33537225))\n* null return instead of an error for missing geo data ([d4c9b69](https://github.com/fastly/js-compute-runtime/commit/d4c9b699a115b5475b5a06b2ba66e259c8d4e952))\n* simple cache getOrSet inner rejections to reject outer promise ([#981](https://github.com/fastly/js-compute-runtime/issues/981)) ([c1fdc49](https://github.com/fastly/js-compute-runtime/commit/c1fdc49211b88dbf17a195782ac34a5c226f3f9f))\n\n## 3.22.4 (2024-09-13)\n\n### Fixed\n\n* docs build ([#968](https://github.com/fastly/js-compute-runtime/issues/968)) ([796cdc0](https://github.com/fastly/js-compute-runtime/commit/796cdc03b4a123f2edc9d8fdeb21246cc63669ee))\n\n## 3.22.3 (2024-09-12)\n\n### Fixed\n\n* docs version include ([#966](https://github.com/fastly/js-compute-runtime/issues/966)) ([9be970d](https://github.com/fastly/js-compute-runtime/commit/9be970dc68010e7ee292c0383a0ef58100e384cd))\n\n## 3.22.2 (2024-09-12)\n\n### Fixed\n\n* docs deployment ([#964](https://github.com/fastly/js-compute-runtime/issues/964)) ([510c246](https://github.com/fastly/js-compute-runtime/commit/510c246315cfb247485aed05442be93981e965f2))\n\n## 3.22.1 (2024-09-12)\n\n### Fixed\n\n* fastly:compute type index ([#960](https://github.com/fastly/js-compute-runtime/issues/960)) ([9bd25fd](https://github.com/fastly/js-compute-runtime/commit/9bd25fd5481693394669d814738fb3d05fdf2312))\n* windows support & windows ci ([#962](https://github.com/fastly/js-compute-runtime/issues/962)) ([d8e9c5e](https://github.com/fastly/js-compute-runtime/commit/d8e9c5e5a7ec6972ad6018b66a4eb454bef4c8f0))\n\n## 3.22.0 (2024-09-11)\n\n### Added\n\n* Add support for vcpu ms hostcall ([#950](https://github.com/fastly/js-compute-runtime/issues/950)) ([aea826f](https://github.com/fastly/js-compute-runtime/commit/aea826feb65c680f627b9e3b01152bb0534d9fd6))\n* expose purgeSurrogateKey hostcall ([#953](https://github.com/fastly/js-compute-runtime/issues/953)) ([4468e3c](https://github.com/fastly/js-compute-runtime/commit/4468e3c2a70d97b3efd1e76a7053b9d1a01227e0))\n\n### Fixed\n\n* passing direct response body to requests in streaming ([#954](https://github.com/fastly/js-compute-runtime/issues/954)) ([6bf90b9](https://github.com/fastly/js-compute-runtime/commit/6bf90b915379ddab5257672b4778c0b81a5523e4))\n\n## 3.21.4 (2024-09-05)\n\n### Fixed\n\n* \\--experimental-top-level-await support ([#945](https://github.com/fastly/js-compute-runtime/issues/945)) ([edd8ada](https://github.com/fastly/js-compute-runtime/commit/edd8ada770ae3cd2763ee30bfb15a7a6709a1f37))\n\n## 3.21.3 (2024-09-04)\n\n### Fixed\n\n* Device.toJSON() properties ([#937](https://github.com/fastly/js-compute-runtime/issues/937)) ([c4182d3](https://github.com/fastly/js-compute-runtime/commit/c4182d30e8d22d7720acb9d51bd59763ab8b83e5))\n* event loop stall error no longer a panic ([#934](https://github.com/fastly/js-compute-runtime/issues/934)) ([08c9934](https://github.com/fastly/js-compute-runtime/commit/08c9934c59bd00ddd2dde252f6529ee8322be809))\n\n## 3.21.2 (2024-08-27)\n\n### Fixed\n\n* revert documentation website refactoring ([#915](https://github.com/fastly/js-compute-runtime/issues/915)) ([ba1eb66](https://github.com/fastly/js-compute-runtime/commit/ba1eb667cb136c6cdd09938e397ee5cf334561d7))\n\n## 3.21.1 (2024-08-27)\n\n### Fixed\n\n* missing publish file, parallel publish build ([#912](https://github.com/fastly/js-compute-runtime/issues/912)) ([91ae54c](https://github.com/fastly/js-compute-runtime/commit/91ae54cbbd92d83fa9c1896df006b1008a5f8291))\n\n## 3.21.0 (2024-08-27)\n\n### Added\n\n* ship --debug-build CLI flag as public ([#907](https://github.com/fastly/js-compute-runtime/issues/907)) ([2728141](https://github.com/fastly/js-compute-runtime/commit/27281413db682f5e2e87928937456bc1b8345dd7))\n* support getSetCookie on new StarlingMonkey headers implementation ([#844](https://github.com/fastly/js-compute-runtime/issues/844)) ([c102521](https://github.com/fastly/js-compute-runtime/commit/c1025210a591fc99fae9c3b921504a6189552a74))\n\n## 3.20.0 (2024-08-08)\n\n### Added\n\n* Add new CLI name of `js-compute` which matches the published package name `@fastly/js-compute` ([#869](https://github.com/fastly/js-compute-runtime/issues/869)) ([60d1d20](https://github.com/fastly/js-compute-runtime/commit/60d1d2067d846aa15a76820e666004cf56d1df99))\n\n### Fixed\n\n* core-cache headers case ([#889](https://github.com/fastly/js-compute-runtime/issues/889)) ([3f2db5c](https://github.com/fastly/js-compute-runtime/commit/3f2db5c466151efddf1731c6be080c2a2875a43d))\n* ensure we throw an error if FastlyBody.prototype.read is called with a value which is not coercible to a finite positive integer ([#877](https://github.com/fastly/js-compute-runtime/issues/877)) ([1633e02](https://github.com/fastly/js-compute-runtime/commit/1633e025d92be3a1f8b0616685b48e27dc913841))\n* perf: Use wasm-opt -O3 when making a release build ([#870](https://github.com/fastly/js-compute-runtime/issues/870)) ([dd91fa5](https://github.com/fastly/js-compute-runtime/commit/dd91fa506b74487b70dc5bec510e89de95e1c569))\n* When constructing an EdgeRateLimiter, retrieve the PenaltyBox instance's name using PenaltyBox::get\\_name ([#866](https://github.com/fastly/js-compute-runtime/issues/866)) ([9222f1d](https://github.com/fastly/js-compute-runtime/commit/9222f1d16a9c17b080be575affffbb83c461dd81))\n\n### Changed\n\n* only time the fetch event when debug logging is enabled ([#873](https://github.com/fastly/js-compute-runtime/issues/873)) ([e4ddf8a](https://github.com/fastly/js-compute-runtime/commit/e4ddf8ac3c78bea753e8d9418715d1e703e7e7bc))\n* re-order the http methods so the most often requested is first and the least requested is last ([#874](https://github.com/fastly/js-compute-runtime/issues/874)) ([6af7626](https://github.com/fastly/js-compute-runtime/commit/6af7626085af62a14520f14f69a0e64a515fd5ef))\n* Use MOZ\\_ASSERT instead of MOZ\\_RELEASE\\_ASSERT as these methods are already guarded correctly where they are being called ([#876](https://github.com/fastly/js-compute-runtime/issues/876)) ([f089616](https://github.com/fastly/js-compute-runtime/commit/f089616e8febc783cc96363f5ce65fc6f1acafb1))\n\n## 3.19.0 (2024-07-29)\n\n### Added\n\n* Add FetchEvent.server object which contains information about the server which received the incoming HTTP request from the client. ([#855](https://github.com/fastly/js-compute-runtime/issues/855)) ([538ed9c](https://github.com/fastly/js-compute-runtime/commit/538ed9c436105caf4bf906355fcf110752870b2b))\n* use StarlingMonkey by default, --disable-starlingmonkey flag ([#861](https://github.com/fastly/js-compute-runtime/issues/861)) ([475cdf9](https://github.com/fastly/js-compute-runtime/commit/475cdf910d5690d74ff96dccd14dfefc209ea944))\n\n### Fixed\n\n* Correct Class name for the ClientInfo class ([#854](https://github.com/fastly/js-compute-runtime/issues/854)) ([efb5694](https://github.com/fastly/js-compute-runtime/commit/efb569475a285bdeb2dcc1346d718eb26be4fed9))\n* correct spelling in CLI error message ([#849](https://github.com/fastly/js-compute-runtime/issues/849)) ([38b558c](https://github.com/fastly/js-compute-runtime/commit/38b558c3ad7c6871243823a207485ba9cc6282dd))\n\n## 3.18.1 (2024-07-18)\n\n### Fixed\n\n* add type definitions of Performance APIs ([#841](https://github.com/fastly/js-compute-runtime/issues/841)) ([fd95aae](https://github.com/fastly/js-compute-runtime/commit/fd95aaecc5a264860845740a3b60d4a7aa75c578))\n\n## 3.18.0 (2024-07-16)\n\n### Added\n\n* support for Response.prototype.ip and port via get\\_addr\\_dest\\_ip & get\\_addr\\_dest\\_port ([#817](https://github.com/fastly/js-compute-runtime/issues/817)) ([391b3d8](https://github.com/fastly/js-compute-runtime/commit/391b3d8386defe5e1b4ce3c1fb70347a9f0802ca))\n* Update to SpiderMonkey v127.0.2 ([#826](https://github.com/fastly/js-compute-runtime/issues/826)) ([5341f67](https://github.com/fastly/js-compute-runtime/commit/5341f674fe0da5ac5057d3415f59ac807d2f96f7))\n\n## 3.17.3 (2024-07-16)\n\n### Fixed\n\n* Remove accidentally commited debug messages which write to stderr ([#838](https://github.com/fastly/js-compute-runtime/issues/838)) ([040ea8b](https://github.com/fastly/js-compute-runtime/commit/040ea8be352884c3536ac7e786663b4596617e6e))\n\n## 3.17.2 (2024-07-13)\n\n### Fixed\n\n* add documentation for the sdkVersion property ([29361ad](https://github.com/fastly/js-compute-runtime/commit/29361ad65965a7a36cb2ced434af7898844dcab7))\n* correct the documentation for the fastly:logger module ([#834](https://github.com/fastly/js-compute-runtime/issues/834)) ([2790cb9](https://github.com/fastly/js-compute-runtime/commit/2790cb93f5f298b021f46b9030d0e6e795003a51))\n\n## 3.17.1 (2024-07-11)\n\n### Fixed\n\n* documentation site build ([#831](https://github.com/fastly/js-compute-runtime/issues/831)) ([110f1ff](https://github.com/fastly/js-compute-runtime/commit/110f1ffb4e1b80772b9f9541a58456bedfd4ddec))\n\n## 3.17.0 (2024-07-11)\n\n### Added\n\n* Include in the wasm metadata whether we are using StarlingMonkey and/or PBL ([#828](https://github.com/fastly/js-compute-runtime/issues/828)) ([00b971b](https://github.com/fastly/js-compute-runtime/commit/00b971b857e9c35a08e6fc5c0a84fb3c3bc7984e))\n\n### Fixed\n\n* keep sdkVersion property always up-to-date with the correct version of the SDK ([#829](https://github.com/fastly/js-compute-runtime/issues/829)) ([ae42634](https://github.com/fastly/js-compute-runtime/commit/ae4263418a52dfb62fe240584314948072ff30e7))\n\n## 3.16.2 (2024-07-10)\n\n### Fixed\n\n* use same rust version that StarlingMonkey uses so that we can publish ([#823](https://github.com/fastly/js-compute-runtime/issues/823)) ([f0d9ab0](https://github.com/fastly/js-compute-runtime/commit/f0d9ab07ed5a5470322a3b457cc91e308e3e289f))\n\n## 3.16.1 (2024-07-09)\n\n### Fixed\n\n* CLI to allow commands/args in spawnSync() to contain whitespace ([#821](https://github.com/fastly/js-compute-runtime/issues/821)) ([68d77fb](https://github.com/fastly/js-compute-runtime/commit/68d77fbff9f695f53b30ee63d53b41fd8db87424))\n* debug build & tests ([#818](https://github.com/fastly/js-compute-runtime/issues/818)) ([3d9a8da](https://github.com/fastly/js-compute-runtime/commit/3d9a8da2898fffa6b43d005eba3342df4ff67036))\n\n## 3.16.0 (2024-06-21)\n\n### Added\n\n* add out-of-memory callback with stderr log ([#805](https://github.com/fastly/js-compute-runtime/issues/805)) ([a1bd16c](https://github.com/fastly/js-compute-runtime/commit/a1bd16c06924ea1748846d2b8159b9b2939ae61d))\n* Allow early logger initialization ([#804](https://github.com/fastly/js-compute-runtime/issues/804)) ([514d014](https://github.com/fastly/js-compute-runtime/commit/514d0145ba88de3a7114e957457a7f9570e17019))\n\n### Fixed\n\n* Fix string formatting for limit-exceeded errors ([#802](https://github.com/fastly/js-compute-runtime/issues/802)) ([56f5214](https://github.com/fastly/js-compute-runtime/commit/56f5214ad9f431845f6b06cb92e0b98169ceffbe))\n* Fix uses of cabi\\_realloc that were discarding their results ([#811](https://github.com/fastly/js-compute-runtime/issues/811)) ([4e16641](https://github.com/fastly/js-compute-runtime/commit/4e16641ef4e159c4a11b500ac861b8fa8d9ff5d3))\n\n## 3.15.0 (2024-06-03)\n\n### Added\n\n* dynamic backends clientCertificate with SecretStore fromBytes, rawbytes ([#796](https://github.com/fastly/js-compute-runtime/issues/796)) ([7d2b7b7](https://github.com/fastly/js-compute-runtime/commit/7d2b7b781ed808d9bcf1fe9584aa31f788b980a2))\n* support default timeout configurations for dynamic backends ([#792](https://github.com/fastly/js-compute-runtime/issues/792)) ([4dfa8d7](https://github.com/fastly/js-compute-runtime/commit/4dfa8d76aeb4364ed5267ed22de0b9a891781589))\n\n## 3.14.2 (2024-05-21)\n\n### Fixed\n\n* changelog formatting ([1473a87](https://github.com/fastly/js-compute-runtime/commit/1473a87092c6c02e37378897eb0a4042da2f90c8))\n* revert changelog heading changes ([#784](https://github.com/fastly/js-compute-runtime/issues/784)) ([59195b6](https://github.com/fastly/js-compute-runtime/commit/59195b6aec1353adc6f6ad8322f7414d90adc518))\n\n## 3.14.1 (2024-05-17)\n\n### Fixed\n\n* fix documentation build ([#781](https://github.com/fastly/js-compute-runtime/issues/781)) ([864864e](https://github.com/fastly/js-compute-runtime/commit/864864e05ca3cf286f049d2c692401e708008052))\n\n## 3.14.0 (2024-05-16)\n\n### Added\n\n* fastly.sdkVersion implementation ([#776](https://github.com/fastly/js-compute-runtime/issues/776)) ([3eb5a8f](https://github.com/fastly/js-compute-runtime/commit/3eb5a8ff9aaad279dc17deee1c2e8760fea28a49))\n\n### Fixed\n\n* support cacheKey in Request init ([#770](https://github.com/fastly/js-compute-runtime/issues/770)) ([b64b22e](https://github.com/fastly/js-compute-runtime/commit/b64b22e988d8e3ca20c42c13f6cb89be871a5d61))\n\n## 3.13.1 (2024-04-12)\n\n### Fixed\n\n* remove debugging message which got commited ([4219a0a](https://github.com/fastly/js-compute-runtime/commit/4219a0ac87d68d9a9fc57aaea43994a867f5dd0e))\n\n## 3.13.0 (2024-04-11)\n\n### Added\n\n* Add KVStore.prototype.delete method ([578d858](https://github.com/fastly/js-compute-runtime/commit/578d858b6678c27116ead213f58d2f4fe80f1355))\n\n### Changed\n\n* Update to SpiderMonkey 124.0.2 ([e32632e](https://github.com/fastly/js-compute-runtime/commit/e32632e16ba822770dd9b0637185f7266a7952e2))\n  This release includes:\n  \\- An optimization for functions that only use `arguments.length` to avoid allocating the `arguments` object.\n  \\- An optimization for `Object.HasOwn` which for small numbers of atoms just unrolls the loop.\n\n### Fixed\n\n* Correct type definition for the global BackendConfiguration type - there is no `checkCertificate` field ([62fd0ea](https://github.com/fastly/js-compute-runtime/commit/62fd0ea36e6aefd4a3cb281a09716a901f111485))\n* Improve our console.log output for functions ([9a97fc1](https://github.com/fastly/js-compute-runtime/commit/9a97fc1352926ecad8377d72eca1e18e28aa2173))\n* Refactor our async task implementation to be a generic AsyncTask class instead of separate implementations for each async operation ([68dfec7](https://github.com/fastly/js-compute-runtime/commit/68dfec75a0c9c583dc4be39a17cbbf9b70ff8b40))\n\n## 3.12.1 (2024-04-05)\n\n### Changed\n\n* declare support for npm 10 ([#747](https://github.com/fastly/js-compute-runtime/issues/747)) ([1365ee9](https://github.com/fastly/js-compute-runtime/commit/1365ee9b1aa4e830677c840ea43df55bbf19d660))\n\n## 3.12.0 (2024-03-28)\n\n### Changed\n\n* update to SpiderMonkey 123.0.1 ([#744](https://github.com/fastly/js-compute-runtime/issues/744)) ([32bf617](https://github.com/fastly/js-compute-runtime/commit/32bf61707f1133d4a2656913d726d66523398fb1))\n  This update brings with it the below changes:\n  * Performance improvements for `JSON.stringify()`\n  * An optimisation for `Object.keys()` to take advantage of cached for-in iterators if available.\n  * Optimisations for `Object.assign()`\n  * RegExp `v` flag support\n  * Improved JSON parsing to help avoid garbage collection time when parsing very large files\n  * The `String.prototype.isWellFormed()` and `String.prototype.toWellFormed()` methods respectively can be used to check if a string contains well-formed Unicode text (i.e. contains no lone surrogates) and sanitise an ill-formed string to well-formed Unicode text.\n  * The `Object.groupBy()` and `Map.groupBy()` static methods for grouping the elements of an iterable are now supported\n  * `Date.parse()` now accepts several additional date formats:\n    * Year > 9999 for `YYYY-MMM-DD` format (e.g. `19999-Jan-01`)\n    * `MMM-DD-YYYY` (e.g. `Jan-01-1970`)\n    * Milliseconds for non-ISO date formats (e.g. `Jan 1 1970 10:00:00.050`)\n    * Day of week at the beginning of formats which were being rejected, such as:\n      * `Wed, 1970-01-01`\n      * `Wed, 1970-Jan-01`\n    * The day of week does not need to be correct, or a day of week at all; for example, `foo 1970-01-01` works.\n    * Numeric dashed dates which do not meet the formal ISO standard are now accepted, including:\n      * `\"01-12-1999\"` (month first)\n      * `\"1999-1-5\"` (single-digit month or day)\n      * `\"10000-01-12\"` (year > 9999)\n      * `\"99-01-05\"` or `\"01-05-99\"` (2-digit year, year must be >31 if it comes first)\n      * `\"1999-01-05 10:00:00\"` (space between date and time).\n        These dates will be parsed with behavior typical of other non-ISO dates, such as local time zone and month rollover (April 31 rolls over to May 1 since April 31 doesn’t exist).\n    * Requirements for characters directly following numbers have been loosened to accept new formats, including:\n      * `\"DDMonYYYY\"`\n      * `\"Mon.DD.YYYY\"`\n      * `\"DD.Mon.YYYY\"`\n      * `\"YYYY.MM.DD\"`\n      * `\"Mon DD YYYY hh:mmXm\"` (`am`/`pm` directly following time)\n    * Timezone `'Z'` is now accepted for non-ISO formats (e.g. `Jan 1 1970 10:00Z`)\n  * Other `Date.parse()` fixes:\n    * `YYYY-M-DD` and `YYYY-MM-D` are no longer assumed GMT as an ISO date `YYYY-MM-DD` would be.\n    * Milliseconds for all formats are truncated after 3 digits, rather than being rounded.\n  * The `Promise.withResolvers()` static method is now supported. This exposes the `resolve` and `reject` callback functions in the same scope as the returned `Promise`, allowing code that resolves or rejects the promise to be defined after its construction.\n  * The `ArrayBuffer.prototype.transfer()` and `ArrayBuffer.prototype.transferToFixedLength()` methods can now be used to transfer ownership of memory from one ArrayBuffer to another. After transfer, the original buffer is detached from its original memory and hence unusable; the state can be checked using `ArrayBuffer.prototype.detached`.\n\n## 3.11.0 (2024-03-14)\n\n### Added\n\n* add new flag --experimental-enable-top-level-await ([#742](https://github.com/fastly/js-compute-runtime/issues/742)) ([437a20d](https://github.com/fastly/js-compute-runtime/commit/437a20d5f970c00d382673dbf223149b5b20ed37))\n\n### Fixed\n\n* correct type definition of Headers.prototype.values() to indicate it returns an IterableIterator\\<string> ([#740](https://github.com/fastly/js-compute-runtime/issues/740)) ([8959e79](https://github.com/fastly/js-compute-runtime/commit/8959e79a9a7856b0ecc74b33264042c54ac8f867))\n\n## 3.10.0 (2024-03-09)\n\n### Added\n\n* add fastly:device module which allows applications to detect a device based on a user-agent ([#738](https://github.com/fastly/js-compute-runtime/issues/738)) ([5274fd5](https://github.com/fastly/js-compute-runtime/commit/5274fd5280d80b276e6f13d4acbdefc435af6c57))\n\n### Fixed\n\n* correct title for the CoreCache.transactionLookup documentation page ([9892d90](https://github.com/fastly/js-compute-runtime/commit/9892d9074d9a1bd25b9b5db28c12a940f2aac028))\n\n## 3.9.1 (2024-03-04)\n\n### Fixed\n\n* ensure we associate correct memory for the user\\_metadata attached to a cache item ([#734](https://github.com/fastly/js-compute-runtime/issues/734)) ([550c4f5](https://github.com/fastly/js-compute-runtime/commit/550c4f5502e710f0b7cf11d0132270bcc91e7235))\n\n## 3.9.0 (2024-03-02)\n\n### Added\n\n* Add a EdgeRateLimiter JavaScript Class which enables edge-rate-limiting by utilising a RateCounter and a PenaltyBox instance ([#732](https://github.com/fastly/js-compute-runtime/issues/732)) ([4e81fc7](https://github.com/fastly/js-compute-runtime/commit/4e81fc7dbec33a5a90743e389642e0ced5294ff1))\n* Add a PenaltyBox JavaScript Class which can be used standalone for adding and checking if an entry is in the penalty-box ([#731](https://github.com/fastly/js-compute-runtime/issues/731)) ([bfe1e15](https://github.com/fastly/js-compute-runtime/commit/bfe1e15460cb2aa0da3cfa356fbf23d38f5af5ba))\n* Add a RateCounter JavaScript Class which can be used standalone for counting and rate calculations ([#730](https://github.com/fastly/js-compute-runtime/issues/730)) ([0f6036f](https://github.com/fastly/js-compute-runtime/commit/0f6036f02f497345df01dbce731eb502fd406d27))\n* implement and expose JavaScript classes for Fastly's Compute Core Cache feature set ([#566](https://github.com/fastly/js-compute-runtime/issues/566)) ([94f4038](https://github.com/fastly/js-compute-runtime/commit/94f4038df7ca2bfd8beef964865eb7f900b1bc04))\n\n### Fixed\n\n* disable the portable-baseline-tier for async functions for now ([#733](https://github.com/fastly/js-compute-runtime/issues/733)) ([4928243](https://github.com/fastly/js-compute-runtime/commit/4928243a380adfb6073a909e41ab7eb4c0d569b4))\n\n## 3.8.3 (2024-02-21)\n\n### Fixed\n\n* do not use colon character in types for windows support ([#726](https://github.com/fastly/js-compute-runtime/issues/726)) ([25bf1a2](https://github.com/fastly/js-compute-runtime/commit/25bf1a2bb40528bf02e0773e6bc624560a12869a))\n\n## 3.8.2 (2024-01-25)\n\n### Fixed\n\n* ensure we honor first-byte-timeout and between-bytes-timeout for dynamically registered backends ([#719](https://github.com/fastly/js-compute-runtime/issues/719)) ([2851507](https://github.com/fastly/js-compute-runtime/commit/2851507f9ca00a3f272a13c174a2906163f95c40))\n* If request does not have a static backend defined, return `undefined` for the Request.prototype.backend getter ([#722](https://github.com/fastly/js-compute-runtime/issues/722)) ([251c037](https://github.com/fastly/js-compute-runtime/commit/251c037f424ace09e87ec0a47d7579d7b90626a1))\n\n## 3.8.1 (2024-01-17)\n\n### Fixed\n\n* parse latin-1 encoded field values correctly ([#715](https://github.com/fastly/js-compute-runtime/issues/715)) ([9ebb524](https://github.com/fastly/js-compute-runtime/commit/9ebb524d4eef97ba71ae19ee1c2b1e61f3fd391c))\n\n## 3.8.0 (2024-01-11)\n\n### Added\n\n* Add `manualFramingHeaders` on `RequestInit` and `ResponseInit`, and add `Request.prototype.setManualFramingHeaders` and `Response.prototype.setManualFramingHeaders` ([#705](https://github.com/fastly/js-compute-runtime/pull/705))\n* Add `Request.prototype.backend` getter to return the name of the backend assigned to the request ([9c750e5](https://github.com/fastly/js-compute-runtime/commit/9c750e5697bb02676762225e4fdc7589d23e13d9))\n* Allow URL as input on fetch() on TypeScript typings for compat with Node.js ([#707](https://github.com/fastly/js-compute-runtime/issues/707)) ([4f39943](https://github.com/fastly/js-compute-runtime/commit/4f399434c0959e902df03262dfceefdc16592afe))\n\n## 3.7.3 (2023-11-02)\n\n### Fixed\n\n* Make the underlying KVStore.prototype.get implementation be async ([a6a5035](https://github.com/fastly/js-compute-runtime/commit/a6a5035fc932be0e47c7c737bd9060d27c18ab05))\n\n## 3.7.2 (2023-10-25)\n\n### Fixed\n\n* Make Response.redirect headers be immutable ([3527eaf](https://github.com/fastly/js-compute-runtime/commit/3527eaf62266a3cf7ea8ea4020bb5980bb7fa615))\n* Return correct error type (TypeError or RangeError instead of Error) in Request and Response methods ([4ea7de7](https://github.com/fastly/js-compute-runtime/commit/4ea7de71301d841fdc99f45a3251f85c61710fd6))\n\n## 3.7.1 (2023-10-24)\n\n### Added\n\n* Add type defintions for the recently added Backend methods ([#698](https://github.com/fastly/js-compute-runtime/issues/698)) ([24f1ba7](https://github.com/fastly/js-compute-runtime/commit/24f1ba70e68f35205104eaf583c29d4af9b5039c))\n\n## 3.7.0 (2023-10-14)\n\n### Added\n\nThis release of `@fastly/js-compute` includes 4 new methods to the Backend class, which enable the Fastly Service to retrieve information about any backend, this is particularly useful for checking if the backend is “healthy”. ([#523](https://github.com/fastly/js-compute-runtime/issues/523)) ([08f816a](https://github.com/fastly/js-compute-runtime/commit/08f816ae4465316a2316467338e0d33ffbd20e7a))\n\nThe new methods are:\n\n* Backend.exists(name) - Check whether a backend with the given name exists for the Fastly Service.\n* Backend.fromName(name) - Check whether a backend with the given name exists for the Fastly Service and if it does, then returns an instance of Backend for the given name.\n* Backend.health(name) - Returns the health of the backend with the given name.\n* Backend.prototype.toName() - Return the name for the Backend instance.\n\n### Fixed\n\n* bring back support for build-time env vars ([#691](https://github.com/fastly/js-compute-runtime/issues/691)) ([c044ac4](https://github.com/fastly/js-compute-runtime/commit/c044ac4bbbd5629bfc879b7593a0bfa9c5e3cfcb))\n* raise an error during wizening for async functions given to addEventListener ([#689](https://github.com/fastly/js-compute-runtime/issues/689)) ([e6747a2](https://github.com/fastly/js-compute-runtime/commit/e6747a28d70d71bc71da77c9b6e44848b95ea387))\n\n## 3.6.2 (2023-10-05)\n\n### Fixed\n\n* improve fetch error messages ([58ddb20](https://github.com/fastly/js-compute-runtime/commit/58ddb2012f9bff5ad59fb6420bfa31051109a108))\n\n## 3.6.1 (2023-09-27)\n\n### Fixed\n\n* ensure we throw an error when trying to base64 decode \\_ via `atob` ([1b2b2f9](https://github.com/fastly/js-compute-runtime/commit/1b2b2f9d807780cf03964a30801644c8bc3b698b))\n\n## 3.6.0 (2023-09-22)\n\n### Added\n\n* add support for ECDSA keys to be used with SubtleCrypto.prototype.sign and SubtleCrypto.prototype.verify ([#667](https://github.com/fastly/js-compute-runtime/issues/667)) ([51bb170](https://github.com/fastly/js-compute-runtime/commit/51bb1703fb81fddac24b152fc7b1e0f32f976de5))\n\n## 3.5.0 (2023-09-19)\n\n### Added\n\n* implement the \"fastly\" condition ([#660](https://github.com/fastly/js-compute-runtime/issues/660)) ([db7db46](https://github.com/fastly/js-compute-runtime/commit/db7db46266b022afffd351421f56d5d5f7b98a53))\n\nJavaScript dependencies can now target our JavaScript runtime for Fastly Compute explicitly via the recently added “fastly” WinterCG Runtime Key\nThis release updates our internal bundling system to include this functionality\nNote: If you are using a custom bundling system for your JavaScript projects and want this functionality, you will need to update/configure your bundling system\n\n## 3.4.0 (2023-09-13)\n\n### Added\n\n* add ability to import ECDSA JWK keys via crypto.subtle.importKey ([#639](https://github.com/fastly/js-compute-runtime/issues/639)) ([c16b001](https://github.com/fastly/js-compute-runtime/commit/c16b001bddc2dc122c26837023ab9c53664adf8a))\n\n## 3.3.5 (2023-09-11)\n\n### Changed\n\n* use new host\\_api implementation for transactional lookups and inserts ([#651](https://github.com/fastly/js-compute-runtime/issues/651)) ([8c29246](https://github.com/fastly/js-compute-runtime/commit/8c292466e1fef61673ad3d46b747a6c54ed71ddb))\n\n## 3.3.4 (2023-09-07)\n\n### Fixed\n\n* Fix SimpleCache API by reverting host\\_api implementation of the underlying cache apis ([4340375](https://github.com/fastly/js-compute-runtime/commit/4340375409be382c2faec657615c187d99d1fc7e))\n\n## 3.3.3 (2023-09-05)\n\n### Fixed\n\n* remove unused lines of code from docs for SimpleCache/get.mdx ([51fd4af](https://github.com/fastly/js-compute-runtime/commit/51fd4af94f72dd9ae112a967ef05bc67d02f202c))\n* update to latest version of gecko-dev which fixes a bug with the default ecma262 sorting algorithm ([#643](https://github.com/fastly/js-compute-runtime/issues/643)) ([64323e3](https://github.com/fastly/js-compute-runtime/commit/64323e344bc61d4cc52e34710ab7ae208d56e321))\n\n## 3.3.2 (2023-08-31)\n\n### Added\n\n* Add documentation for Request.prototype.clone() ([9d12321](https://github.com/fastly/js-compute-runtime/commit/9d12321bf3da019f6383389098625ca1314d9fb8))\n\n## 3.3.1 (2023-08-24)\n\n### Changed\n\n* update to spidermonkey which includes async resume support when using pbl ([#634](https://github.com/fastly/js-compute-runtime/issues/634)) ([1dea60f](https://github.com/fastly/js-compute-runtime/commit/1dea60f79fc07828785b12fd8a5bf13b3602f88b))\n\n## 3.3.0 (2023-08-22)\n\n### Added\n\n* Add option to enable PBL. ([#628](https://github.com/fastly/js-compute-runtime/issues/628)) ([6ecda6e](https://github.com/fastly/js-compute-runtime/commit/6ecda6e89971f178f623e242d8dd6a8fd25ab63f))\n\n## 3.2.1 (2023-08-16)\n\n### Fixed\n\n* Add documentation and type definitions for the new event.client.\\* fields ([#625](https://github.com/fastly/js-compute-runtime/issues/625)) ([a6f557b](https://github.com/fastly/js-compute-runtime/commit/a6f557ba1b03035869e4c4fb3d9679fb3e28fd1f))\n\n## 3.2.0 (2023-08-10)\n\n### Added\n\n* add ability to automatically decompress gzip responses returned from `fetch` ([#497](https://github.com/fastly/js-compute-runtime/issues/497)) ([e08d060](https://github.com/fastly/js-compute-runtime/commit/e08d060535160b8c934f60f37d8f4a71f412f0c4))\n\n### Changed\n\n* use spidermonkey version 115 ([4a4716d](https://github.com/fastly/js-compute-runtime/commit/4a4716d99fa1e263eae9cf5d7fcc96999519c7fe))\n* reduce memory usage by caching client getters when they are first called ([87ee0cb](https://github.com/fastly/js-compute-runtime/commit/87ee0cb54edab82c0b2f6b986458d2552a8dbcba))\n* update to latest url crate which passes some more wpt url tests ([f0a42fd](https://github.com/fastly/js-compute-runtime/commit/f0a42fd07821190e1ebf66c95762cb8e26b69e8b))\n\n## 3.1.1 (2023-07-14)\n\n### Fixed\n\n* Request.prototype.clone - Do not create a body on the new request if the request instance being cloned does not contain a body ([5debe80](https://github.com/fastly/js-compute-runtime/commit/5debe806a4a40e0d3b07bdd6b71489aa7d739cff))\n\n## 3.1.0 (2023-07-12)\n\n### Added\n\n* Add ability to disable connection-pooling behavior for Dynamic Backends ([#574](https://github.com/fastly/js-compute-runtime/issues/574)) ([718bea8](https://github.com/fastly/js-compute-runtime/commit/718bea8e2b950bc00c43187e479a7a7de41eaa70))\n\n### Changed\n\n* Deprecate SimpleCache.set and recommend SimpleCache.getOrSet as the alternative ([bff1bf5](https://github.com/fastly/js-compute-runtime/commit/bff1bf587c7de6012c617745b059dea24e6299ad))\n\n## 3.0.0 (2023-07-08)\n\n### Changed\n\n*⚠ BREAKING CHANGE*\n\n* Rename SimpleCache.delete to SimpleCache.purge and require purge options to be supplied as the second parameter\n\nWe are renaming because \"purge\" is already a well-known and documented concept for removing content from Fastly's cache.\n\nThe new addition of a second argument allows the caller to decide what scope to purge the content from, currently they can choose to purge from all of Fastly (\"global\") or from the POP that contains the currently executing instance (\"pop\"). We do not provide a default option right now, in the future we may provide a default option, if we discover a common pattern is being used.\n\nHere is an example of migrating an application using SimpleCache.delete to SimpleCache.purge with the same behaviour:\n\n```diff\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const url = new URL(event.request.url);\n  const path = url.pathname;\n  if (url.searchParams.has('delete')) {\n-    SimpleCache.delete(path);\n+    SimpleCache.purge(path, { scope: \"global\" });\n    return new Response(page, { status: 204 });\n  }\n\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n\n```\n\n### Added\n\n* add event.client.tlsCipherOpensslName ([49b0c99](https://github.com/fastly/js-compute-runtime/commit/49b0c99523147998304dc559b836bcc79008e8b0))\n* add event.client.tlsClientCertificate ([cf93b62](https://github.com/fastly/js-compute-runtime/commit/cf93b6226b01ca653688571ed0db27e0f6d39bc2))\n* add event.client.tlsClientHello ([3d87cb2](https://github.com/fastly/js-compute-runtime/commit/3d87cb28a670735441a0d8c6d16291867c8f2244))\n* add event.client.tlsJA3MD5 ([2ecf4af](https://github.com/fastly/js-compute-runtime/commit/2ecf4afcc503e60a1aa972c88d47149b22dbf70c))\n* add event.client.tlsProtocol ([4c91142](https://github.com/fastly/js-compute-runtime/commit/4c9114213343d4dea2a1ac2955980e19540a4463))\n* Rename SimpleCache.delete to SimpleCache.purge and require purge options to be supplied as the second parameter ([20113c1](https://github.com/fastly/js-compute-runtime/commit/20113c1df6ad57a98c5b8c27b06d67117d2029ef))\n\n## 2.5.0 (2023-07-05)\n\n### Added\n\n* add DOMException class ([58b8086](https://github.com/fastly/js-compute-runtime/commit/58b8086edce2d93928743aec462843df369d458b))\n* Add support for HMAC within SubtleCrypto implementation ([96ac02d](https://github.com/fastly/js-compute-runtime/commit/96ac02d1e62b6d34f73a18ba3be30266a4b0f27e))\n\n### Changed\n\n* update types for SubtleCrypto to show we support a subset of importKey/sign/verify ([#568](https://github.com/fastly/js-compute-runtime/issues/568)) ([329b733](https://github.com/fastly/js-compute-runtime/commit/329b733e77d4bcb2b341eb1e1b36a5d6a7c999cc))\n\n## 2.4.0 (2023-06-22)\n\n### Changed\n\n* Update to SpiderMonkey version 114.0.1 ([#563](https://github.com/fastly/js-compute-runtime/issues/563)) ([03e2254](https://github.com/fastly/js-compute-runtime/commit/03e22542cd439990ad530eb1958a12ce8ab85120))\n\n## 2.3.0 (2023-06-12)\n\n### Added\n\n* implement web performance api ([ddfe11e](https://github.com/fastly/js-compute-runtime/commit/ddfe11ec92a48495edd920e48ffad3d20e69c159))\n\n## 2.2.1 (2023-06-09)\n\n### Fixed\n\n* only apply our pipeTo/pipeThrough optimisations to TransformStreams who have no transformers (IdentityStreams). ([#556](https://github.com/fastly/js-compute-runtime/issues/556)) ([a88616c](https://github.com/fastly/js-compute-runtime/commit/a88616c7a5aa4e13d3f1eeef259ba7480416f3f0))\n\n## 2.2.0 (2023-06-08)\n\n### Added\n\n* Implement SimpleCache.getOrSet method ([a1f4517](https://github.com/fastly/js-compute-runtime/commit/a1f4517e5e377354254ee2a635f97a562c87e13c))\n\n## 2.1.0 (2023-06-02)\n\n### Added\n\n* Implement a SimpleCache Class ([#548](https://github.com/fastly/js-compute-runtime/issues/548)) ([865382d](https://github.com/fastly/js-compute-runtime/commit/865382df3a74832abce1f0d40e3627d8339b4aeb))\n\n## 2.0.2 (2023-06-01)\n\n### Fixed\n\n* add fastly:secret-store types ([3805238](https://github.com/fastly/js-compute-runtime/commit/38052381331999d00b6f2cc878ae41c51068ff94))\n\n* update to the latest wizer which brings support for prebuilt linux s390x and aarch64 wizer binaries ([69484c2](https://github.com/fastly/js-compute-runtime/commit/69484c25465a2674513f83f8c9674e1857e01cb9))\n\n## 2.0.1 (2023-05-24)\n\n### Fixed\n\n* When using implicit backends with https protocol, use the hostname for the sni hostname value to match `fetch` behaviour in browsers and other runtimes ([84fb6a2](https://github.com/fastly/js-compute-runtime/commit/84fb6a2fa57408fb13e9319da91d6de3533f1e3c))\n\n## 2.0.0 (2023-05-15)\n\n### Changed\n\n* Object Store renamed to KV Store ([#476](https://github.com/fastly/js-compute-runtime/issues/476))\n\nWe have renamed the `ObjectStore` class to `KVStore`, and the module name from `fastly:object-store` to `fastly:kv-store`.\n\nYou will need to update your code to use the new class name and module name.\n\nBelow is the change that would need to be made for the imported module name:\n\n```diff\n- import { ObjectStore } from 'fastly:object-store';\n+ import { KVStore } from 'fastly:kv-store';\n```\n\nAnd this is the change that would need to be made for constructing an instance of the class:\n\n```diff\n- const store = new ObjectStore('my-store');\n+ const store = new KVStore('my-store');\n```\n\nHere is a full example of migrating an application from ObjectStore to KVStore:\n\n```diff\n/// <reference types=\"@fastly/js-compute\" />\n\n- import { ObjectStore } from 'fastly:object-store';\n+ import { KVStore } from 'fastly:kv-store';\n\nasync function app(event) {\n-   const files = new ObjectStore('files');\n+   const files = new KVStore('files');\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n```\n\n## 1.13.0 (2023-05-11)\n\n### Added\n\n* Implement all the web console methods ([#522](https://github.com/fastly/js-compute-runtime/issues/522)) ([a12a1d3](https://github.com/fastly/js-compute-runtime/commit/a12a1d35f0b68c549d802ea2df87eb5bd5a1cd31))\n\n## 1.12.0 (2023-05-11)\n\n### Added\n\n* Implement Fanout for JS SDK ([5198884](https://github.com/fastly/js-compute-runtime/commit/5198884d35c616785399d1702efa2454f9303421))\n\n## 1.11.2 (2023-04-27)\n\n### Fixed\n\n* Add TypeScript definitions for Response.redirect() and Response.json() ([#512](https://github.com/fastly/js-compute-runtime/issues/512)) ([ebe429f](https://github.com/fastly/js-compute-runtime/commit/ebe429fc895f8da837e47393ebc35fe6dec5159a))\n\n## 1.11.1 (2023-04-26)\n\n### Fixed\n\n* **TextDecoder:** add (nearly) full support for TextDecoder and TextEncoder ([#501](https://github.com/fastly/js-compute-runtime/issues/501)) ([a4c312e](https://github.com/fastly/js-compute-runtime/commit/a4c312e62284147da73d82323ac095670d41cdf3))\n\n## 1.11.0 (2023-04-25)\n\n### Added\n\n* implement Response.json static method ([#499](https://github.com/fastly/js-compute-runtime/issues/499)) ([780067d](https://github.com/fastly/js-compute-runtime/commit/780067d429dbd90bd529f42169c2c1af6c139bb7))\n\n## 1.10.1 (2023-04-24)\n\n### Fixed\n\n* Fix for `ReferenceError: pattern is not defined` ([#506](https://github.com/fastly/js-compute-runtime/issues/506)) ([107c9be](https://github.com/fastly/js-compute-runtime/commit/107c9be4c0b0c41c4d630ba556a10b697a1508f4))\n\n## 1.10.0 (2023-04-21)\n\n### Added\n\n* Add MD5 support into crypto.subtle.digest ([9c8efab](https://github.com/fastly/js-compute-runtime/commit/9c8efabc89c20e5e20f8ef429b555c1d85fe0db1))\n* implement Response.redirect static method and Response.prototype.redirected getter ([1623d74](https://github.com/fastly/js-compute-runtime/commit/1623d740405dcaaa5a8c946981c6840ab611c36a))\n\n## 1.9.0 (2023-04-15)\n\n### Added\n\n* Implement subset of crypto.subtle.importKey which can import a JSONWebKey using RSASSA-PKCS1-v1\\_5 ([b66bf50](https://github.com/fastly/js-compute-runtime/commit/b66bf506a9bf25cf251f7c58a34ba2e1a0e68c5d))\n* Implement subset of crypto.subtle.sign which can sign data with a JSONWebKey using RSASSA-PKCS1-v1\\_5 ([800fb66](https://github.com/fastly/js-compute-runtime/commit/800fb666aca957a62d79dbf4fefa35aad8212de5))\n* Implement subset of crypto.subtle.verify which can verify a signature with a JSONWebKey using RSASSA-PKCS1-v1\\_5 ([077adfd](https://github.com/fastly/js-compute-runtime/commit/077adfd16f870564e945d14e4caf0c21762c64f1))\n\n### Fixed\n\n* free `buf` if an error has occured ([bfa84cc](https://github.com/fastly/js-compute-runtime/commit/bfa84cc4fa22c1d2ea860cad597dd25878a24e20))\n\n## 1.8.1 (2023-04-12)\n\n### Fixed\n\n* Mark NodeJS 19 and 20 as supported ([#492](https://github.com/fastly/js-compute-runtime/issues/492)) ([27b3428](https://github.com/fastly/js-compute-runtime/commit/27b34289988b6ef55ea3ce703b878dbd1da68d7a))\n\n## 1.8.0 (2023-04-12)\n\n### Added\n\n* Add high-resolution timing function \"fastly.now()\" behind feature flag \"--enable-experimental-high-resolution-time-methods\" ([f090838](https://github.com/fastly/js-compute-runtime/commit/f0908384d48d0bc2e5c29083e8a20bed041d47ed))\n\n### Changed\n\n* replace tree-sitter with acorn + magic string ([08a0695](https://github.com/fastly/js-compute-runtime/commit/08a0695a00088fe51c289ea783a771b4f3b993f8))\n\n## 1.7.1 (2023-04-11)\n\n### Fixed\n\n* Lower the supported NodeJS version from 18 or greater to only 18 ([5cc1cd6](https://github.com/fastly/js-compute-runtime/commit/5cc1cd6e5bfb8926944457e81c045682b0a37e4c))\n* When converting a URL to a string, do not add a `?` if there are no query string parameters ([73cdc27](https://github.com/fastly/js-compute-runtime/commit/73cdc279fa8c038a012c050000960577dda21280))\n\n## 1.7.0 (2023-04-11)\n\n### Added\n\n* BYOB streams, basic usage, *pending WPT* ([ab97e75](https://github.com/fastly/js-compute-runtime/commit/ab97e75e3b595911432327b35fcf4716675a0dd0))\n* Implement subset of crypto.subtle.importKey which can import a JSONWebKey using RSASSA-PKCS1-v1\\_5 ([#472](https://github.com/fastly/js-compute-runtime/issues/472)) ([110e7f4](https://github.com/fastly/js-compute-runtime/commit/110e7f42c1a86c4b4b722ea4b6780bb68f7f4523))\n\n## 1.6.0 (2023-03-28)\n\n### Added\n\n* Implement JS CryptoKey Interface ([adb31f7](https://github.com/fastly/js-compute-runtime/commit/adb31f7197acf869af1852c0656847e4ab240089))\n\n## 1.5.2 (2023-03-23)\n\n### Fixed\n\n* Add documentation for FetchEvent, FetchEvent.prototype.respondWith, and FetchEvent.prototype.waitUntil ([78e6d92](https://github.com/fastly/js-compute-runtime/commit/78e6d925d1ec6cdedd4f2678997e333aba9ebae6))\n* fix typo in geolocation example ([f53a06e](https://github.com/fastly/js-compute-runtime/commit/f53a06ecb46c5ad1f91806c1c13ce6215a254192))\n\n## 1.5.1 (2023-03-10)\n\n### Fixed\n\n* handle fallthrough of regex parser bugs ([#447](https://github.com/fastly/js-compute-runtime/issues/447)) ([8f38980](https://github.com/fastly/js-compute-runtime/commit/8f389805d6a88e476f0281df974cb971d7e78896))\n\n## 1.5.0 (2023-03-10)\n\n### Added\n\n* support unicode patterns via precompilation ([87a0dce](https://github.com/fastly/js-compute-runtime/commit/87a0dce62115cfd6d665f1d2aa617cf53a8b6b01))\n\n## 1.4.2 (2023-03-09)\n\n### Fixed\n\n* console logging support improvements ([#434](https://github.com/fastly/js-compute-runtime/issues/434)) ([7a74d76](https://github.com/fastly/js-compute-runtime/commit/7a74d76ed1d03c1c588caf664f471eab226c10a6))\n\n## 1.4.1 (2023-03-01)\n\n### Changed\n\n* modular builtin separation ([#426](https://github.com/fastly/js-compute-runtime/issues/426)) ([c5933ea](https://github.com/fastly/js-compute-runtime/commit/c5933ea2599c0f0952d7314ecbbe93faa8ec9acb))\n\n## 1.4.0 (2023-02-27)\n\n### Added\n\n* implement fastly:secret-store package ([cde22e3](https://github.com/fastly/js-compute-runtime/commit/cde22e3fa232b50e96222301ba40dda5b424bb60))\n\n### Changed\n\n* Bump to spidermonkey 110, and viceroy 0.3.5 ([#420](https://github.com/fastly/js-compute-runtime/issues/420)) ([e17cdfd](https://github.com/fastly/js-compute-runtime/commit/e17cdfda1878fe23a7f331fb20d33c52d580003b))\n\n## 1.3.4 (2023-02-09)\n\n### Changed\n\n* add custom error message when making a request to a backend which does not exist ([#412](https://github.com/fastly/js-compute-runtime/issues/412)) ([486aed1](https://github.com/fastly/js-compute-runtime/commit/486aed1415151a2bba40b736c14555c692bd095a))\n\n## 1.3.3 (2023-02-08)\n\n### Changed\n\n* Remove error codes from external error messaging as these codes are not documented anywhere and subject to change ([8f8f0ef](https://github.com/fastly/js-compute-runtime/commit/8f8f0eff871597b8453fac08b6b114ee5c188ef6))\n\n## 1.3.2 (2023-01-30)\n\n### Changed\n\n* allow a downstream response to contain lots of headers with the same name without crashing ([ba1f0e6](https://github.com/fastly/js-compute-runtime/commit/ba1f0e6699bd0f218fa581b9aad0fdda89a674fc))\n\n## 1.3.1 (2023-01-26)\n\n### Changed\n\n* ensure CacheOverride bitflags are the same value as defined in c-at-e ([#386](https://github.com/fastly/js-compute-runtime/issues/386)) ([8a1c215](https://github.com/fastly/js-compute-runtime/commit/8a1c2158505e8ed1ebb424fc97866da155601d1f))\n\n## 1.3.0 (2023-01-24)\n\n### Added\n\n* implement SubtleCrypto.prototype.digest method ([#372](https://github.com/fastly/js-compute-runtime/issues/372)) ([bbe1754](https://github.com/fastly/js-compute-runtime/commit/bbe1754f0a8018f2124b9a5859a35fde5c4cbb97))\n\n## 1.2.0 (2023-01-17)\n\n### Added\n\n* implement Request.prototype.clone ([3f3a671](https://github.com/fastly/js-compute-runtime/commit/3f3a67199c27ea4500fa861a993163e5d376aafd))\n\n## 1.1.0 (2023-01-06)\n\n### Added\n\n* add crypto.randomUUID function ([2c32b42](https://github.com/fastly/js-compute-runtime/commit/2c32b42d29a1cd2de961a0cef175b96eaab4ae7d))\n\n### Changed\n\n* check that setTimeout/setInterval handler is an object before casting to an object ([62476f5](https://github.com/fastly/js-compute-runtime/commit/62476f5324425c4f4a12ebf4f8ceddb093b753de))\n* ensure retrieving the property definitions of ObjectStoreEntry.prototype.body and ObjectStoreEntry.bodyUsed do not cause panics by ensuring we have a valid entry in their Slots ([311b84c](https://github.com/fastly/js-compute-runtime/commit/311b84c80cbc99cf534ed43f4499a291716068fd))\n* error message is latin1, we need to use JS\\_ReportErrorLatin1 to convert the message from latin1 to UTF8CharsZ, otherwise a panic occurs ([f1a22a4](https://github.com/fastly/js-compute-runtime/commit/f1a22a42c75aea99f47f5f6b44920275735c91e1))\n\n## 1.0.1 (2022-12-16)\n\n### Changed\n\n* do not free the method\\_str.ptr as we still require the memory ([17c5049](https://github.com/fastly/js-compute-runtime/commit/17c50492d6247e746daeb65ab1b7fdeeaec0ae91)), closes [#352](https://github.com/fastly/js-compute-runtime/issues/352)\n\n## 1.0.0 (2022-12-14)\n\n### Added\n\n* implement validation for backend cipher definitions ([157be64](https://github.com/fastly/js-compute-runtime/commit/157be64e84956d24259003331cb51a8c5acec040))\n\n## 0.7.0 (2022-12-10)\n\n### Added\n\n* compute runtime component build ([#326](https://github.com/fastly/js-compute-runtime/issues/326)) ([197504c](https://github.com/fastly/js-compute-runtime/commit/197504c4192e019264011d732a7009786a7a38d0))\n\n#### BREAKING CHANGES\n\n* compute runtime component build ([#326](https://github.com/fastly/js-compute-runtime/issues/326))\n\n### Changed\n\n* Limit to node 16/17/18 as some dependencies do not work on node19 yet ([0d48f77](https://github.com/fastly/js-compute-runtime/commit/0d48f77467fc0c85c837c36b2e3991a2f6b35bcf))\n\n## 0.6.0 (2022-12-09)\n\n### Added\n\n* Disable JS iterator helpers as the feature is at Stage 3 and we should only enable by default Stage 4 features ([c90c145](https://github.com/fastly/js-compute-runtime/commit/c90c14570a0375692da62eb11811e01babe28de8))\n\n### Changed\n\n* Throw TypeErrors in config-store if supplied with invalid parameters or the config-store does not exist ([6b70180](https://github.com/fastly/js-compute-runtime/commit/6b70180560b0c28bbc009af49fa7b25bd890d4a2))\n\n### Removed\n\n* Disable JS iterator helpers as the feature is at Stage 3 and we should only enable by default Stage 4 features\n\n## 0.5.15 (2022-12-08)\n\n### Added\n\n* add `allowDynamicBackends` function to `fastly:experimental` module ([83a003e](https://github.com/fastly/js-compute-runtime/commit/83a003e17307c01876751686620a6a1effbfaa99))\n* upgrade from SpiderMonkey 96 to SpiderMonkey 107 ([#330](https://github.com/fastly/js-compute-runtime/pull/330))\n\n## 0.5.14 (2022-12-07)\n\n### Changed\n\n* when appending headers, if the set-cookie header is set then make sure that each cookie value is sent as a separate set-cookie header to the host ([f6cf559](https://github.com/fastly/js-compute-runtime/commit/f6cf5597ec646717534b59a1002b6a6364a81065))\n\n## 0.5.13 (2022-12-02)\n\n### Changed\n\n* implement validation for Dictionary names and keys ([c0b0822](https://github.com/fastly/js-compute-runtime/commit/c0b082245d9585d8c3cdbc83c6f8ebf1844e8741))\n* fix: When streaming a response to the host, do not close the response body if an error occurs ([8402ecf](https://github.com/fastly/js-compute-runtime/commit/8402ecf93c91bee66217c401a5cc5954e2e71de6))\n\n## 0.5.12 (2022-11-30)\n\n### Added\n\n* add fastly:experimental module which contains all our experimental functions such as includeBytes and enableDebugLogging ([5c6a5d7](https://github.com/fastly/js-compute-runtime/commit/5c6a5d7cf13274f4752fa398d9bc92de658004b8))\n\n## 0.5.11 (2022-11-30)\n\n### Changed\n\n* update nodejs supported versions to 16 - 19 and npm supported version to only 8 ([5ec70b9](https://github.com/fastly/js-compute-runtime/commit/5ec70b95b0d4d3677a522120c9ae5f9a2cea4db6))\n\n## 0.5.10 (2022-11-30)\n\n### Changed\n\n* ensure custom cache keys are uppercased ([f37920d](https://github.com/fastly/js-compute-runtime/commit/f37920d01f5fb9a172ae82a1d6191159be59f561)), closes [#318](https://github.com/fastly/js-compute-runtime/issues/318)\n\n## 0.5.9 (2022-11-29)\n\n### Added\n\n* add fastly:cache-override module ([f433464](https://github.com/fastly/js-compute-runtime/commit/f433464928e70a8f38ecb4dd293cb2ce40098c34))\n* add geo ip lookup function to fastly:geolocation ([24601e5](https://github.com/fastly/js-compute-runtime/commit/24601e5738816ce1597f80d054d312c1a95e4398))\n* Add Logger constructor to \"fastly:logger\" module ([b4818a2](https://github.com/fastly/js-compute-runtime/commit/b4818a2623caaab0fe568c35f7636d0d3d9e8bc7))\n* expose fastly loggers via fastly:logger module ([2d0bcfe](https://github.com/fastly/js-compute-runtime/commit/2d0bcfe4f4e0fd855f589205eee4316d829fd28c))\n* expose the fastly features via 'fastly:' namespaced modules ([c06cd16](https://github.com/fastly/js-compute-runtime/commit/c06cd1677cd96b383284ea6ab6dbcbbc4f6dfcf4))\n* move env function into fastly:env ([327b344](https://github.com/fastly/js-compute-runtime/commit/327b344dc943a53ca4a74aeb16207f02cd6d0b3c))\n\n### Changed\n\n* Add types for setTimeout, clearTimeout, setInterval, clearInterval ([c1ed00c](https://github.com/fastly/js-compute-runtime/commit/c1ed00c8933bc45c9ba8dc84e515d31167596aa6))\n\n## 0.5.8 (2022-11-28)\n\n### Changed\n\n* Allow process.execPath to contain whitespace ([caefe51](https://github.com/fastly/js-compute-runtime/commit/caefe512413675f10a7f1e6501249b3ebe7f5d21))\n\n## 0.5.7 (2022-11-24)\n\n### Changed\n\n* add missing shebang and executable bit to the binary file ([3f0cd69](https://github.com/fastly/js-compute-runtime/commit/3f0cd69e3ec39633f747f0346ae3eda5eb3f3685))\n\n## 0.5.6 (2022-11-24)\n\n### Added\n\n* implement setTimeout, setInterval, clearTimeout, and clearInterval ([128bca9](https://github.com/fastly/js-compute-runtime/commit/128bca901c9ad4b6d6c1084bf13c5c474ef63a41))\n\n## 0.5.5 (2022-11-23)\n\n### Added\n\n* implement Request.prototype.setCacheKey ([457eabe](https://github.com/fastly/js-compute-runtime/commit/457eabe392f44eb296ce593bcabebffb68c57371))\n* implement support in Response.json/text/arrayBuffer methods for guest provided streams ([50cdc44](https://github.com/fastly/js-compute-runtime/commit/50cdc443d38e53f029fbcc1ad19ee56b5849dff0))\n\n### Changed\n\n* respond with 500 Internal Server Error when an unhandled error has occured and no response has already been sent to the client ([e5982d8](https://github.com/fastly/js-compute-runtime/commit/e5982d879223a8e5940717ab74c9f01a64b35ce2))\n\n## 0.5.4 (2022-09-28)\n\n### Added\n\n* Add ConfigStore class ([#270](https://github.com/fastly/js-compute-runtime/pull/270))\n* Add Dynamic Backends support ([#250](https://github.com/fastly/js-compute-runtime/issues/250))\n* Improved performance when constructing a ObjectStore instance ([#272](https://github.com/fastly/js-compute-runtime/pull/272)\n\n#### Dynamic Backend support\n\nNote: This feature is disabled by default for Fastly Services. Please contact [Fastly Support](https://support.fastly.com/hc/en-us/requests/new?ticket_form_id=360000269711) to request the feature be enabled on the Fastly Services which require Dynamic Backends.\n\nThis feature makes it possible to use the standard `fetch` within JavaScript applications.\n\nDynamic Backends is a new feature which enables JavaScript applications to dynamically create new backend server definitions without having to deploy a new version of their Fastly Service. These backends function exactly the same as existing backends, and can be configured in all the same ways as existing backends can via the Fastly Service configuration.\n\nBy default, Dynamic Backends are disabled within a JavaScript application as it can be a potential avenue for third-party JavaScript code to send requests, potentially including sensitive/secret data, off to destinations that the JavaScript project was not intending, which could be a security issue. To enable Dynamic Backends the application will need to set `fastly.allowDynamicBackends` is to `true`.\n\nThere are two ways to make use of Dynamic Backends within JavaScript projects:\n\nThe first way is by omitting the `backend` property definition on the Request instance. The JavaScript Runtime will then create a Dynamic Backend definition using default configuration options. This approach is useful for JavaScript applications as it means that a standard `fetch` call will now be possible, which means libraries that use the standard `fetch` will begin to work for applications deployed to Fastly.\n\nBelow is as an example JavaScript application using the default Dynamic Backend option:\n\n```js\n// Enable dynamic backends -- warning, this is potentially dangerous as third-party dependencies could make requests to their own backends, potentially including your sensitive/secret data\nfastly.allowDynamicBackends = true;\n\n// For any request, return the fastly homepage -- without defining a backend!\naddEventListener(\"fetch\", event => {\n  event.respondWith(fetch('https://www.fastly.com/'));\n});\n```\n\nThe second way is by creating a new Dynamic Backend using the new `Backend` class. This approach is useful for JavaScript applications that want to have full control over the configuration of the new backend defintion, such as only allowing TLS 1.3 and disallowing older versions of TLS for requests made to the new backend.\n\nE.G.\n\n```js\n// Enable dynamic backends -- warning, this is potentially dangerous as third-party dependencies could make requests to their own backends, potentially including your sensitive/secret data\nfastly.allowDynamicBackends = true;\n\n// For any request, return the fastly homepage -- without defining a backend!\naddEventListener(\"fetch\", event => {\n  // We are not defining all the possible fields here, the ones which are not defined will use their default value instead.\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\",\n    sslMinVersion: 1.3,\n    sslMaxVersion: 1.3,\n    sniHostname: \"www.fastly.com\",\n  });\n  event.respondWith(fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the newly defined backend from above.\n  }));\n});\n```\n\n#### Config-store support and Dictionary deprecated\n\nWe have renamed the `Dictionary` class to `ConfigStore`, the old name `Dictionary` still exists but is now deprecated. We recommend replacing `Dictionary` with `ConfigStore` in your code to avoid having to migrate in the future when `Dictionary` is fully removed.\n\nBelow is an example application using the `ConfigStore` class:\n\n```js\nasync function app(event) {\n  const store = new ConfigStore('example')\n  \n  // Retrieve the contents of the 'hello' key\n  const hello = await store.get('hello')\n  \n  return new Response(hello)\n}\n\naddEventListener(\"fetch\", event => {\n  event.respondWith(app(event))\n})\n```\n\n## 0.5.3 (2022-09-16)\n\n### Security\n\n* [CVE-2022-39218](https://github.com/fastly/js-compute-runtime/security/advisories/GHSA-cmr8-5w4c-44v8):\n  Fixed `Math.random` and `crypto.getRandomValues` methods to always use sufficiently random values. The previous versions would use a PRNG (pseudorandom number generator) which we would seed with a random value however due to our use of [Wizer](https://github.com/bytecodealliance/wizer), the initial value to seed the PRNG was baked-in to the final WebAssembly module meaning the sequence of numbers generated was predictable for that specific WebAssembly module. The new implementations of both `Math.random` and `crypto.getRandomValues` do not use a PRNG and instead pull random values from WASI (WebAssembly System Interface) libc’s `random_get` function, which is always a sufficiently random value.\n\n  An attacker with access to the same WebAssembly module that calls the affected methods could use the fixed seed to predict random numbers generated by these functions. This information could be used to bypass cryptographic security controls, for example to disclose sensitive data encrypted by functions that use these generators.\n\n  Developers should update affected modules after applying this patch. Any secrets generated using affected versions should be rotated. Any sensitive ciphertext generated using affected versions should be considered unsafe, e.g. and be deleted or re-generated.\n\n### Fixed\n\n* Updated the Typescript definitions for the `console` methods to indicate that they now accept any number of objects. ([#258](https://github.com/fastly/js-compute-runtime/pull/258))\n\n* Store the Object-Store key string into a native object to avoid it becoming garbage collected before being used within `ObjectStore.prototype.get` or `ObjectStore.prototype.put` (([381242](https://github.com/fastly/js-compute-runtime/commit/3812425a955e52c2fd7229e762ef3e691cb78745))\n\n## 0.5.2 (2022-09-02)\n\n### Fixed\n\n* Explicitly declare void as the return type for functions which return nothing - this allows our package to work with typescript's `strict:true` option ([#253](https://github.com/fastly/js-compute-runtime/pull/253))\n\n* Declare ambient types for our npm package instead of exports as we do not yet export anything from the package ([#252](https://github.com/fastly/js-compute-runtime/pull/252))\n\n## 0.5.1 (2022-08-31)\n\n### Fixed\n\n* Removed `type: \"module\"` from the @fastly/js-compute package.json file as the package still uses `require`\n\n## 0.5.0 (2022-08-30)\n\n### Added\n\n* Implemented ObjectStore and ObjectStoreEntry classes for interacting with Fastly ObjectStore ([#110](https://github.com/fastly/js-compute-runtime/issues/110))\n* add btoa and atob native implementations ([#227](https://github.com/fastly/js-compute-runtime/issues/227)) ([8b8c31f](https://github.com/fastly/js-compute-runtime/commit/8b8c31fa9ad70337b1060a3242b8e3495ae47df3))\n\n#### Object-store support\n\nThis release adds support for Fastly [Object-store](https://developer.fastly.com/reference/api/services/resources/kv-store/), which is globally consistent key-value storage accessible across the Fastly Network. This makes it possible for your Fastly Compute application to read and write from Object-stores.\n\nWe've added two classes, `ObjectStore`, and `ObjectStoreEntry`. `ObjectStore` is used to interact with a particular Object-store and `ObjectStoreEntry` is a particular value within an Object-store. We've made `ObjectStoreEntry` have a similar API as `Response` to make it simpler to read and write from Object-stores. I.e. `ObjectStoreEntry` has a `body` property which is a `ReadableStream` and has `arrayBuffer`/`json`/`text` methods - just like `Response`.\n\nThe way to use these classes is best shown with an example:\n\n```js\nasync function app(event) {\n  // Create a connection the the Object-store named 'example-store'\n  const store = new ObjectStore('example-store')\n  \n  // Create or update the 'hello' key with the contents 'world'\n  await store.put('hello', 'world')\n  \n  // Retrieve the contents of the 'hello' key\n  // Note: Object-stores are eventually consistent, this means that the updated contents associated may not be available to read from all\n  // Fastly edge locations immediately and some edge locations may continue returning the previous contents associated with the key.\n  const hello = await store.get('hello')\n  \n  // Read the contents of the `hello` key into a string\n  const hellotext = await hello.text()\n  return new Response(hellotext)\n}\n\naddEventListener(\"fetch\", event => {\n  event.respondWith(app(event))\n})\n```\n\n#### Added `btoa` and `atob` global functions\n\nThese two functions enable you to encode to ([btoa](https://developer.mozilla.org/en-US/docs/Web/API/btoa)) and decode from ([atob](https://developer.mozilla.org/en-US/docs/Web/API/atob)) Base64 strings. They follow the same specification as the `atob` and `btoa` functions that exist in web-browsers.\n\n```js\naddEventListener(\"fetch\", event => {\n  event.respondWith(new Response(atob(btoa('hello from fastly'))))\n})\n```\n\n#### Improved Console Support\n\nPreviously our console methods only supported a single argument and would convert the argument to a string via `String(argument)`, this unfortunately made it difficult to log out complex objects such as Request objects or similar.\n\nWe've updated our console methods and they now support any number of arguments. As well as supporting any number of arguments, we've also changed the implementation to have better support for logging out complex objects.\n\nThis is a before and after example of what happens when logging a Request with our console methods.\n\nBefore:\n\n```js\nconst request = new Request('https://www.fastly.com', {body:'I am the body', method: 'POST'});\nconsole.log(request); // outputs `[object Object]`.\n```\n\nAfter:\n\n```js\nconst request = new Request('https://www.fastly.com', {body:'I am the body', method: 'POST'});\nconsole.log(request); // outputs `Request: {method: POST, url: https://www.fastly.com/, version: 2, headers: {}, body: null, bodyUsed: false}`.\n```\n\n### Changed\n\n* Improved console output for all types ([#204](https://github.com/fastly/js-compute-runtime/issues/204))\n\n## 0.4.0 (2022-07-28)\n\n### Added\n\n* Implement the DecompressionStream builtin [`#160`](https://github.com/fastly/js-compute-runtime/pull/160)\n* Improve performace of Regular Expression literals via precompilation [`#146`](https://github.com/fastly/js-compute-runtime/pull/146)\n\n### Fixed\n\n* Calling `tee` on the client request no longer causes the application to hang [`#156`](https://github.com/fastly/js-compute-runtime/pull/156)\n\n## 0.3.0 (2022-06-29)\n\n### Added\n\n* Implement the CompressionStream builtin\n  [#84](https://github.com/fastly/js-compute-runtime/pull/84)\n\n### Changed\n\n* Removed the requirement for a fastly.toml file to be present when using js-compute-runtimes CLI to compile a WASM file\n* **Breaking change:** Removed --skip-pkg argument from js-compute-runtime's CLI\n  [#108](https://github.com/fastly/js-compute-runtime/pull/108)\n* **Breaking change:** Removed `console.trace` method\n\n### Fixed\n\n* Fix the response error message text\n* Throw an error if constructors are called as plain functions\n* Fix the behavior of `console.debug`\n* Allow builtin classes to be extended\n\n## 0.2.5 (2022-04-20)\n\n### Changed\n\n* Updated the js-compute-runtime to 0.2.5 : Increased max uri length to 8k, and properly forwards http headers to upstream requests even if the headers aren't ever read from\n\n## 0.2.4 (2022-02-09)\n\n### Changed\n\n* Support streaming upstream request bodies\n\n## 0.2.2 (2022-02-03)\n\n### Added\n\n* Add full support for TransformStreams\n* Support directly piping Request/Response bodies to other Requests/Responses instead of manually copying every chunk\n* Add support for the `queueMicrotask` global function\n* Add support for the `structuredClone` global function\n* Add support for the `location` global object as an instance of `WorkerLocation`\n* Support BigUint64Array and BigInt64Array in crypto.getRandomValues\n* Enable class static blocks syntax\n* Returned the exit code from the JS Compute Runtime, by passing it up through our CLI\n\n### Changed\n\n* Increase max supported header size from 4096 bytes to 69000 bytes\n* Update to SpiderMonkey 96 beta\n\n### Fixed\n\n* Avoid waiting for async tasks that weren't passed to `FetchEvent#waitUntil`\n* Significantly improve spec-compliance of Request and Response builtins\n\n## 0.2.1 (2021-11-10)\n\n### Added\n\n* Updated the js-compute-runtime to `0.2.2` (Which includes fixes to geoip, a way to get environment variables, improves debugging of exceptions in the request handler, and other updates)\n* Added the `Env` namespace for accessing Fastly Compute environment variables.\n\n## 0.2.0 (2021-08-31)\n\n### Added\n\n* Implement the WHATWG URL and URLSearchParam classes\n* Enable private class fields and methods, plus ergonomic brand checks\n* Breaking change: Implement FetchEvent#waitUntil\n* Mark builtins that rely on hostcalls as request-handler-only\n* Add support for including binary files, and for using typed arrays as Response bodies\n* Improve handling of hostcall errors\n\n### Fixed\n\n* Breaking change: Make FetchEvent handling more spec-compliant\n* Normalize HTTP method names when constructing Requests\n* Don't trap when trying to delete a non-existent header\n* Properly support `base` argument in `URL` constructor\n\n## 0.1.0 (2021-07-28)\n\n### Added\n\n* Initial Release\n* Includes TypeScript type definitions for Fastly Compute flavored ServiceWorkers APIs\n* Also includes the `js-compute-runtime` CLI for bundling JavaScript applications\n"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "content": "\n# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nWe as members, contributors, and leaders pledge to make participation in our\ncommunity a harassment-free experience for everyone, regardless of age, body\nsize, visible or invisible disability, ethnicity, sex characteristics, gender\nidentity and expression, level of experience, education, socio-economic status,\nnationality, personal appearance, race, caste, color, religion, or sexual identity\nand orientation.\n\nWe pledge to act and interact in ways that contribute to an open, welcoming,\ndiverse, inclusive, and healthy community.\n\n## Our Standards\n\nExamples of behavior that contributes to a positive environment for our\ncommunity include:\n\n* Demonstrating empathy and kindness toward other people\n* Being respectful of differing opinions, viewpoints, and experiences\n* Giving and gracefully accepting constructive feedback\n* Accepting responsibility and apologizing to those affected by our mistakes,\n  and learning from the experience\n* Focusing on what is best not just for us as individuals, but for the\n  overall community\n\nExamples of unacceptable behavior include:\n\n* The use of sexualized language or imagery, and sexual attention or\n  advances of any kind\n* Trolling, insulting or derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or email\n  address, without their explicit permission\n* Other conduct which could reasonably be considered inappropriate in a\n  professional setting\n\n## Enforcement Responsibilities\n\nCommunity leaders are responsible for clarifying and enforcing our standards of\nacceptable behavior and will take appropriate and fair corrective action in\nresponse to any behavior that they deem inappropriate, threatening, offensive,\nor harmful.\n\nCommunity leaders have the right and responsibility to remove, edit, or reject\ncomments, commits, code, wiki edits, issues, and other contributions that are\nnot aligned to this Code of Conduct, and will communicate reasons for moderation\ndecisions when appropriate.\n\n## Scope\n\nThis Code of Conduct applies within all community spaces, and also applies when\nan individual is officially representing the community in public spaces.\nExamples of representing our community include using an official e-mail address,\nposting via an official social media account, or acting as an appointed\nrepresentative at an online or offline event.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be\nreported to the community leaders responsible for enforcement at\n[oss@fastly.com](mailto:oss@fastly.com).\nAll complaints will be reviewed and investigated promptly and fairly.\n\nAll community leaders are obligated to respect the privacy and security of the\nreporter of any incident.\n\n## Enforcement Guidelines\n\nCommunity leaders will follow these Community Impact Guidelines in determining\nthe consequences for any action they deem in violation of this Code of Conduct:\n\n### 1. Correction\n\n**Community Impact**: Use of inappropriate language or other behavior deemed\nunprofessional or unwelcome in the community.\n\n**Consequence**: A private, written warning from community leaders, providing\nclarity around the nature of the violation and an explanation of why the\nbehavior was inappropriate. A public apology may be requested.\n\n### 2. Warning\n\n**Community Impact**: A violation through a single incident or series\nof actions.\n\n**Consequence**: A warning with consequences for continued behavior. No\ninteraction with the people involved, including unsolicited interaction with\nthose enforcing the Code of Conduct, for a specified period of time. This\nincludes avoiding interactions in community spaces as well as external channels\nlike social media. Violating these terms may lead to a temporary or\npermanent ban.\n\n### 3. Temporary Ban\n\n**Community Impact**: A serious violation of community standards, including\nsustained inappropriate behavior.\n\n**Consequence**: A temporary ban from any sort of interaction or public\ncommunication with the community for a specified period of time. No public or\nprivate interaction with the people involved, including unsolicited interaction\nwith those enforcing the Code of Conduct, is allowed during this period.\nViolating these terms may lead to a permanent ban.\n\n### 4. Permanent Ban\n\n**Community Impact**: Demonstrating a pattern of violation of community\nstandards, including sustained inappropriate behavior,  harassment of an\nindividual, or aggression toward or disparagement of classes of individuals.\n\n**Consequence**: A permanent ban from any sort of public interaction within\nthe community.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage],\nversion 2.0, available at\n[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].\n\nCommunity Impact Guidelines were inspired by \n[Mozilla's code of conduct enforcement ladder][Mozilla CoC].\n\nFor answers to common questions about this code of conduct, see the FAQ at\n[https://www.contributor-covenant.org/faq][FAQ]. Translations are available \nat [https://www.contributor-covenant.org/translations][translations].\n\n[homepage]: https://www.contributor-covenant.org\n[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html\n[Mozilla CoC]: https://github.com/mozilla/diversity\n[FAQ]: https://www.contributor-covenant.org/faq\n[translations]: https://www.contributor-covenant.org/translations\n\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "# Contributing to the JS Compute Runtime\n\nFirst off thank you for wanting to contribute to making the JS Compute Runtime better! We\nappreciate you taking time to improve the Fastly Compute experience for developers\neverywhere. There are many ways you can contribute that include but aren't\nlimited to documentation, opening issues, issue triage, and code contributions.\nWe'll cover some of the ways you can contribute below, but if you don't see\ninstructions for what you want to do, open up an issue and ask us!\n\n## Table of Contents\n1. Documentation\n1. Feature Requests\n1. Bugs\n1. Issue Triage\n1. Code Contributions\n\n## Documentation\n\nWas something in our documentation unclear? Does something have no documentation,\nbut should? This is a perfect way to make an easy contribution to the JS Compute Runtime. If\nyou're not sure what the documentation should contain, please open up an issue!\nWe're happy to guide you with the correct information needed or if you already\nknow what needs to be done, open up a PR and we'll review it for you before\nmerging your changes.\n\n## Feature Requests\n\nDo you think there's something the JS Compute Runtime should have that would make the\nexperience better? Feature requests are a great way to let us know. Before\nopening up a feature request on the issue tracker first make sure that there is\nno currently open issue asking for the same thing. If there's not, open up an\nissue asking for what you want and the motivation behind the change.\n\n## Bugs\n\nSometimes you run into issues and the code is not working properly. If you do\nrun into a bug and you can't figure it out or if you do figure out the bug, open\nup an issue on the issue tracker. Just make sure it's not already an issue that\nhas been filed yet. If you do open up an issue let us know what you expected to\nhappen, what actually happened, what your operating system is, as well as a case\nwe can use to reproduce the issue if you have one!\n\n## Issue Triage\n\nSometimes issues get stale and are no longer an issue, need to be updated, or\nhave been fixed by a PR and were never closed. While we try to stay on top of\nissues and keep the backlog groomed, we are only human and can miss out on\nthings. If you find that an issue can be closed,\n\n## Code Contributions\n\nIf you want to contribute code to the JS Compute Runtime thank you! A few things before you do\nget started adding a change and open up a PR\n\n1. Make sure there's a tracking issue for your code change. We don't want you to\n   do a lot of work only for us to reject the PR because it's a feature change\n   we won't accept for instance.\n1. Before opening your PR make sure things are working locally.\n   You can test your resulting `.wasm` files locally using\n   [Fastly's local testing server](https://developer.fastly.com/learning/compute/testing/#running-a-local-testing-server).\n\nIt also helps to understand how we structure the JS Compute Runtime code base.\n- Under `src` is the code related to bulding a JS file and the JS runtime iself into a\n`.wasm` file.\n- Under `runtime/js-compute-runtime` is the code for the actual JS runtime itself.\n  See below for building the runtime.\n  - The main logic for initializing the JS runtime, reading the JS source code from `stdin`,\n    and evaluating the JS top-level code is in `js-compute-runtime.cpp`.\n  - The various builtins the JS Compute Runtime adds to JS are defined in\n    `js-compute-builtins.cpp`.\n\nThanks again for contributing to the JS Compute Runtime. We really do appreciate you wanting to\nhelp out and make it better!\n"
  },
  {
    "path": "DEVELOPMENT.md",
    "content": "# Fastly Compute JS Runtime\n\nThe JS Compute Runtime for Fastly's [Compute platform](https://www.fastly.com/products/edge-compute/serverless) provides the environment JavaScript is executed in when using the [Fastly Compute JavaScript SDK](https://www.npmjs.com/package/@fastly/js-compute).\n\n**Note**: If you just want to use JavaScript on the Fastly Compute Platform, we recommend using the JavaScript Starter Kits provided by the Fastly CLI tool. For more information please see the [JavaScript documentation on the Fastly Developer Hub](https://developer.fastly.com/learning/compute/javascript/).\n\n## Working with the JS Compute Runtime source\n\nNote that this repository uses Git submodules, so you will need to run\n\n```sh\ngit submodule update --recursive --init\n```\n\nto pull down or update submodules.\n\n### Building the JS Compute Runtime\n\nTo build from source, you need to have the following tools installed to successfully build, depending on your system.\n\n#### Linux\n\n- Build tools\n  ```sh\n  sudo apt install build-essential\n  ```\n- Rust\n  ```\n  curl -so rust.sh https://sh.rustup.rs && sh rust.sh -y\n  restart shell or run source $HOME/.cargo/env\n  ```\n- binaryen\n  ```sh\n  sudo apt install binaryen\n  ```\n- rust target wasm32-wasip1\n  ```sh\n  rustup target add wasm32-wasip1\n  ```\n- [cbindgen](https://github.com/eqrion/cbindgen#quick-start)\n  ```sh\n  cargo install cbindgen\n  ```\n- [wasi-sdk, version 20](https://github.com/WebAssembly/wasi-sdk/releases/tag/wasi-sdk-20),\n  with alternate [install instructions](https://github.com/WebAssembly/wasi-sdk#install)\n  ```sh\n  curl -sS -L -O https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-20/wasi-sdk-20.0-linux.tar.gz\n  tar xf wasi-sdk-20.0-linux.tar.gz\n  sudo mkdir -p /opt/wasi-sdk\n  sudo mv wasi-sdk-20.0/* /opt/wasi-sdk/\n  ```\n\nBuild the runtime using npm:\n\n```sh\nnpm run build\n```\n\n#### macOS (Apple silicon)\n\n- Build tools\n  ```sh\n  # First, install Xcode from the Mac App Store. Then:\n  sudo xcode-select --switch /Applications/Xcode.app\n  sudo xcodebuild -license\n  ```\n- Homebrew\n  ```sh\n  # From homebrew.sh\n  /bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"\n  ```\n- wget\n  ```sh\n  brew install wget\n  ```\n- binaryen\n  ```sh\n  brew install binaryen\n  ```\n- Python\n  ```sh\n  brew install python@3\n  ```\n- Rust\n  ```sh\n  curl -so rust.sh https://sh.rustup.rs && sh rust.sh -y\n  # then, restart shell or run:\n  source $HOME/.cargo/env\n  ```\n- rust target wasm32-wasip1\n  ```sh\n  rustup target add wasm32-wasip1\n  ```\n- [cbindgen](https://github.com/eqrion/cbindgen#quick-start)\n  ```sh\n  cargo install --locked cbindgen\n  ```\n\n- [wasm-tools](https://github.com/bytecodealliance/wasm-tools)\n  ```sh\n  cargo install --locked wasm-tools\n  ```\n\n- [wasi-sdk, version 20](https://github.com/WebAssembly/wasi-sdk/releases/tag/wasi-sdk-20),\n  with alternate [install instructions](https://github.com/WebAssembly/wasi-sdk#install)\n  ```sh\n  curl -sS -L -O https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-20/wasi-sdk-20.0-macos.tar.gz\n  tar xf wasi-sdk-20.0-macos.tar.gz\n  sudo mkdir -p /opt/wasi-sdk\n  sudo mv wasi-sdk-20.0/* /opt/wasi-sdk/\n  ```\n\nBuild the runtime using npm:\n\n```sh\nnpm run build\n```\n\n## Testing a Local build in a Compute application\n\n:warning: **You should not use this for production workloads!!!!!!!!**\n\nYou can test a local build of the JS Compute runtime by installing it in your JavaScript Compute application and running that locally or by uploading it to your Fastly service.\n\n1. First, follow the directions in [Building the JS Compute Runtime](#building-the-js-compute-runtime) for your platform to obtain a local build. The build outputs are the following files:\n\n   - `fastly.wasm`\n   - `fastly.debug.wasm`\n   - `fastly-weval.wasm`\n   - `fastly-ics.wevalcache`\n\n2. Create a local tarball using npm.\n\n   ```shell\n   npm pack\n   ```\n\n   The resulting tarball will have a filename such as `fastly-js-compute-<version>.tgz`.\n\n3. In your Compute application, install the tarball using `npm`:\n\n   ```shell\n   npm install /path/to/fastly-js-compute-<version>.tgz\n   ```\n\n4. Build and test or deploy your application as usual, using `fastly compute serve` or `fastly compute publish`, or an appropriate npm script.\n\n## Testing a Dev Release in a Compute application\n\n:warning: **You should not use this for production workloads!!!!!!!!**\n\nDev builds are released before production releases to allow for further testing. These are not released upstream to NPM, however you can acquire them from the [Releases](https://github.com/fastly/js-compute-runtime/releases/) section. Download the runtime for your platform, extract the executable and place it in the /node_modules/@fastly/js-compute/bin/PLATFORM folder of your Fastly Compute project. Then you can use the normal [Fastly CLI](https://github.com/fastly/cli) to build your service.\n\nPlease submit an [issue](https://github.com/fastly/js-compute-runtime/issues) if you find any problems during testing.\n\n## Tests\n\nAll tests are automatically run on pull requests via CI.\n\n### Unit Testing\n\nUnit tests are run via `npm run test`, currently including:\n\n- CLI tests (`npm run test:cli`)\n- Typing tests (`npm run test:types`)\n\n### Integration Tests\n\nComplete test applications are tested from the `./integration-tests/js-compute/fixtures/app/src` and `./integration-tests/js-compute/fixtures/module-mode/src` directories.\n\nTests themselves are listed in the `./integration-tests/js-compute/fixtures/app/tests.json` and `./integration-tests/js-compute/fixtures/module-mode/tests.json` files.\n\nIntegration tests can be run via `npm run test:integration`, which defaults to the release build.\n\nIn addition the following flags can be added after the command (passed via `npm run test:debug -- ...` after the `--`):\n\n- `--local`: Test locally using Viceroy, instead of publishing to a staging Compute service.\n- `--bail`: Immediately stop testing on the first failure, and report the failure.\n- `--verbose`: Adds verbose logging to `fastly compute publish` and Viceroy (which provides hostcall logging as well).\n- `--debug-build`: Use the debug build\n- `--debug-log`: Enable debug logging for the tests (engine-level DEBUG_LOG)\n- `--fixture=module-mode`: Run the module mode test suite (`fixtures/module-mode` instead of `fixtures/app`).\n- `--fixture=reusable-sandboxes`: Run the reusable sandboxes test suite (`fixtures/reusable-sandboxes`)\n- `--http-cache`: Run the HTTP cache test suite\n- `--serial`: Run tests serially rather than in concurrent batches (mostly useful for reusable sandbox tests)\n- `[...args]`: Additional arguments allow for filtering tests\n\nA typical development test command is therefore something like:\n\n```\nnpm run build:cli && npm run build:debug && npm run test:integration -- --debug-build --debug-log --local --bail /crypto\n```\n\nWhich would build the CLI TypeScript to JavaScript, run a debug build, enable debugging logging, and then that build against all the crypto tests locally on Viceroy, throwing an error as soon as one is found.\n\nSome tests can only be run on Compute and not Viceroy and will be automatically skipped. A green tick is always shown for a test that ran successfully - if it is missing that means it did not run.\n\n### Web Platform Tests\n\nThe Web Platform tests are included as a submodule, and can be run via `npm run test:wpt` or `npm run test:wpt:debug`.\n\nThe WPT test runner supports the following options (passed via `npm run test:wpt -- ...` after the `--`):\n\n- `--update-expectations`: Update the WPT test expectations JSON files based on the current PASS/FAIL test statuses, instead of throwing an error when the current PASS/FAIL lists are not matched.\n- `[...args]`: Filter to apply to WPT tests to run\n\nRun `./tests/wpt-harness/run-wpt.mjs --help` for further options information.\n"
  },
  {
    "path": "LICENSE",
    "content": "                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n    TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n    1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n    2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n    3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n    4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n    5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n    6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n    7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n    8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n    9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n    END OF TERMS AND CONDITIONS\n\n    APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n    Copyright 2020 Fastly, Inc.\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n\n--- LLVM Exceptions to the Apache 2.0 License ----\n\nAs an exception, if, as a result of your compiling your source code, portions\nof this Software are embedded into an Object form of such source code, you\nmay redistribute such embedded portions in such Object form without complying\nwith the conditions of Sections 4(a), 4(b) and 4(d) of the License.\n\nIn addition, if you combine or link compiled forms of this Software with\nsoftware that is licensed under the GPLv2 (\"Combined Software\") and if a\ncourt of competent jurisdiction determines that the patent provision (Section\n3), the indemnity provision (Section 9) or other Section of the License\nconflicts with the conditions of the GPLv2, you may retroactively and\nprospectively choose to deem waived or otherwise exclude such Section(s) of\nthe License, but only in their entirety and only with respect to the Combined\nSoftware.\n\n"
  },
  {
    "path": "README.md",
    "content": "# @fastly/js-compute\n\nJavaScript SDK and CLI for building JavaScript applications on [Fastly Compute](https://www.fastly.com/products/edge-compute/serverless).\n\n![npm version](https://img.shields.io/npm/v/@fastly/js-compute) ![npm downloads per month](https://img.shields.io/npm/dm/@fastly/js-compute)\n\n## Getting Started\n\nWe recommend using the [Fastly CLI](https://github.com/fastly/cli) to create, build, and deploy JavaScript Fastly Compute services, as [described on the Fastly Developer Hub](https://developer.fastly.com/learning/compute/).\n\n[Detailed documentation for JavaScript Fastly Compute services](https://developer.fastly.com/learning/compute/javascript/) is also available on Fastly Developer Hub.\n\n## Usage\n\n### JavaScript Examples\n\nThe Fastly Developer Hub has a collection of [example JavaScript applications](https://developer.fastly.com/solutions/examples/javascript/).\n\nHere is a small example application:\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nasync function app(event) {\n    const request = event.request;\n    return new Response(`You made a request to ${request.url}`)\n}\n\naddEventListener(\"fetch\", event => {\n  event.respondWith(app(event));\n});\n```\n\n### CLI Flags and configuration\n\nThe CLI is typically invoked by the `build` script defined in your project's `package.json` scripts.\n\n```json\n{\n  \"scripts\": {\n    \"build\": \"js-compute-runtime src/index.js bin/main.wasm\"\n  }\n}\n```\n\nThe CLI is invoked as follows:\n\n```sh\njs-compute-runtime [OPTIONS] <input-js-file> <output-wasm-file>\n```\n\nOptions can be specified on the command line or added to a persistent configuration file for the project.  The CLI will search for a configuration starting from the current directory in the following order:\n\n* A `fastlycompute` property in `package.json`\n* `.fastlycomputerc.json`\n* `fastlycompute.config.js`\n\n<details>\n<summary>Click here to see full list</summary>\n\nThe CLI will search for a configuration starting from the current directory in the following order:\n\n- A `fastlycompute` property in `package.json`\n- `.fastlycomputerc` (JSON or YAML)\n- `.fastlycomputerc.json`, `.fastlycomputerc.yaml`, `.fastlycomputerc.yml`\n- `.fastlycomputerc.js`, `.fastlycomputerc.mjs`\n- `fastlycompute.config.js`, `fastlycompute.config.mjs`\n\n</details>\n\nIf an option is defined in both the command line and the configuration file, the command line option takes precedence.\n\n#### Supported Options\n\n| Config Key                                    | CLI Flag                                             | Type                        | Description                                                                                                                                               | \n|:----------------------------------------------|:-----------------------------------------------------|:----------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `enableAOT`                                   | `--enable-aot`                                       | `boolean`                   | Enable AOT compilation for performance                                                                                                                    |\n| `aotCache`                                    | `--aot-cache`                                        | `string` (path)             | Specify a path to the AOT cache file                                                                                                                      |\n| `enableHttpCache`                             | `--enable-http-cache`                                | `boolean`                   | Enable the [HTTP cache hook API](https://www.fastly.com/documentation/guides/concepts/cache/#modifying-a-request-as-it-is-forwarded-to-a-backend)         |\n| `enableExperimentalHighResolutionTimeMethods` | `--enable-experimental-high-resolution-time-methods` | `boolean`                   | Enable experimental fastly.now() method                                                                                                                   |\n| `enableExperimentalTopLevelAwait`             | `--enable-experimental-top-level-await`              | `boolean`                   | Enable experimental top level await                                                                                                                       |\n| `enableStackTraces`                           | `--enable-stack-traces`                              | `boolean`                   | Enable stack traces                                                                                                                                       |\n| `excludeSources`                              | `--exclude-sources`                                  | `boolean`                   | Don't include sources in stack traces                                                                                                                     |\n| `debugIntermediateFiles`                      | `--debug-intermediate-files`                         | `string` (path)             | Output intermediate files in directory                                                                                                                    |\n| `debugBuild`                                  | `--debug-build`                                      | `boolean`                   | Use debug build of the SDK runtime                                                                                                                        |\n| `engineWasm`                                  | `--engine-wasm`                                      | `string` (path)             | Specify a custom Wasm engine (advanced)                                                                                                                   |\n| `wevalBin`                                    | `--weval-bin`                                        | `string` (path)             | Specify a custom weval binary (advanced)                                                                                                                  |\n| `env`                                         | `--env`                                              | `string \\| object \\| array` | Set environment variables, possibly inheriting from the current environment. Multiple variables can be comma-separated (e.g., --env ENV_VAR,OVERRIDE=val) |\n\nNOTE: The `env` field is additive. Values defined on the command-line values append to, rather than replace, the values defined in any configuration file. \n\n#### Example command-line options\n\n```sh\njs-compute-runtime --enable-aot --enable-stack-traces --enable-top-level-await --env=LOG_LEVEL=debug ./src/index.js ./bin/main.wasm\n```\n\n#### Example `.fastlycomputerc.json`\n\n```json\n{\n  \"enableAOT\": true,\n  \"enableStackTraces\": true,\n  \"enableTopLevelAwait\": true,\n  \"env\": {\n    \"LOG_LEVEL\": \"debug\"\n  }\n}\n```\n\n#### Example `package.json`\n\n```json\n{\n  \"name\": \"my-fastly-service\",\n  \"type\": \"module\",\n  \"dependencies\": {\n    \"@fastly/cli\": \"^13.0.0\"\n  },\n  \"scripts\": {\n    \"build\": \"js-compute-runtime ./src/index.js ./bin/main.wasm\",\n    \"dev\": \"fastly compute serve\",\n    \"deploy\": \"fastly compute publish\"\n  },\n  \"fastlycompute\": {\n    \"enableAOT\": true,\n    \"enableStackTraces\": true,\n    \"enableTopLevelAwait\": true,\n    \"env\": {\n      \"LOG_LEVEL\": \"debug\"\n    }\n  }\n}\n```\n\n### API documentation\n\nThe API documentation for the JavaScript SDK is located at [https://js-compute-reference-docs.edgecompute.app](https://js-compute-reference-docs.edgecompute.app).\n\n## Security\n\nIf you find any security issues, see the [Fastly Security Reporting Page](https://www.fastly.com/security/report-security-issue) or send an email to: `security@fastly.com`\n\nWe plan to disclose any found security vulnerabilities per the [GitHub security vulnerability guidance](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing/about-coordinated-disclosure-of-security-vulnerabilities#best-practices-for-maintainers). Note that communications related to security issues in Fastly-maintained OSS as described here are distinct from [Fastly security advisories](https://www.fastly.com/security-advisories).\n\n## Changelog\n\nThe changelog can be found [here](https://github.com/fastly/js-compute-runtime/blob/main/CHANGELOG.md).\n## License\n\n[Apache-2.0 WITH LLVM-exception](./LICENSE)\n"
  },
  {
    "path": "SECURITY.md",
    "content": "## Report a security issue\n\nThe js-compute-runtime project team welcomes security reports and is committed to providing prompt attention to security issues. Security issues should be reported privately via [Fastly’s security issue reporting process](https://www.fastly.com/security/report-security-issue).\n\n## Security advisories\n\nRemediation of security vulnerabilities is prioritized by the project team. The project team endeavors to coordinate remediation with third-party stakeholders, and is committed to transparency in the disclosure process. The team announces security issues via the [Fastly Developer Hub Starter Kits](https://developer.fastly.com/solutions/starters/) site on a best-effort basis.\n\nNote that communications related to security issues in Fastly-maintained OSS as described here are distinct from [Fastly Security Advisories](https://www.fastly.com/security-advisories).\n"
  },
  {
    "path": "ci/build-tarballs.sh",
    "content": "#!/usr/bin/env bash\n\n# A small shell script invoked from CI on the final Linux builder which actually\n# assembles the release artifacts for a particular platform. This will take the\n# binary artifacts of previous builders and create associated tarballs to\n# publish to GitHub.\n#\n# The first argument of this is the \"platform\" name to put into the tarball, and\n# the second argument is the name of the github actions platform which is where\n# we source binaries from. The final third argument is \".exe\" on Windows to\n# handle executable extensions right.\n#\n# Usage: build-tarballs.sh PLATFORM [.exe]\n\n# where PLATFORM is e.g. x86_64-linux, aarch64-linux, ...\n\nset -euo pipefail\n\nset -x\n\nplatform=\"$1\"\nexe=\"${2:-}\"\n\nrm -rf tmp\nmkdir tmp\nmkdir -p dist\n\nmktarball() {\n  dir=\"$1\"\n  if [ \"$exe\" = \"\" ]; then\n    tar -cJf \"dist/$dir.tar.xz\" -C tmp \"$dir\"\n  else\n    (cd tmp && zip -r \"../dist/$dir.zip\" \"$dir\")\n  fi\n}\n\n# Create the main tarball of binaries\nbin_pkgname=\"js-compute-runtime-$TAG-$platform\"\nmkdir \"tmp/$bin_pkgname\"\ncp README.md \"tmp/$bin_pkgname\"\nmv \"bins-$platform/js-compute-runtime$exe\" \"tmp/$bin_pkgname\"\nchmod +x \"tmp/$bin_pkgname/js-compute-runtime$exe\"\nmktarball \"$bin_pkgname\"\n"
  },
  {
    "path": "ci/clang-format.ignore",
    "content": "runtime/js-compute-runtime/third_party/wizer.h\nruntime/js-compute-runtime/rust-url/rust-url.h\nruntime/js-compute-runtime/rust-encoding/rust-encoding.h\nruntime/js-compute-runtime/host_interface/component/fastly_world.h\n"
  },
  {
    "path": "ci/clang-format.sh",
    "content": "#!/usr/bin/env bash\n\nset -euo pipefail\n\nusage() {\n  cat <<EOF\nUsage: $0 [-h] [--fix]\n\n  Format c/c++ source that's tracked by git. Exits with a non-zero return code\n  when formatting is applied.\n\n  -h     Print this message\n  --fix  Format files in-place\nEOF\n}\n\nfix=\nwhile [ \"$#\" -gt 0 ] ; do\n  case $1 in\n\n    -h)\n      usage\n      exit 1\n      ;;\n\n    --fix)\n      fix=1\n      ;;\n\n    *)\n      echo \"Unrecognized option: $1\"\n      echo\n      usage\n      exit 1\n      ;;\n\n  esac\n\n  shift\ndone\n\ncd \"$(dirname \"${BASH_SOURCE[0]}\")/..\"\n\nfailure=\nfor file in $(git ls-files | grep '\\.\\(cpp\\|h\\)$'); do\n  if grep -F -x \"$file\" ci/clang-format.ignore > /dev/null; then\n    continue\n  fi\n\n  formatted=\"${file}.formatted\"\n  /opt/wasi-sdk/bin/clang-format \"$file\" > \"$formatted\"\n  if ! cmp -s \"$file\" \"$formatted\"; then\n    if [ -z \"$fix\" ]; then\n      rm \"$formatted\"\n      echo \"${file} needs formatting\"\n      failure=1\n    else\n      echo \"${file} formatted\"\n      mv \"$formatted\" \"$file\"\n    fi\n  fi\n\n  rm -f \"$formatted\"\ndone\n\nif [ -n \"$failure\" ]; then\n  exit 1\nfi\n"
  },
  {
    "path": "ci/format-changelog.js",
    "content": "#!/usr/bin/env node\n\nimport { readFileSync, writeFileSync } from \"node:fs\";\nimport path from \"node:path\";\nimport process from \"node:process\";\nimport { unified } from \"unified\";\nimport remarkParse from \"remark-parse\";\nimport remarkStringify from \"remark-stringify\";\n\nlet markdownString;\nconst fileFromArgs = process.argv[2];\nconst filePath = path.join(process.cwd(), fileFromArgs);\ntry {\n  markdownString = readFileSync(filePath, \"utf-8\");\n} catch (err) {\n  console.log(\n    `Could not read or maybe even find your markdown file. \\nCheck your file path, name, extension. \\nMake sure you type 'npm run check -- pathtofile.md'\\nError from Node.js: ${err}`\n  );\n  process.exit(1);\n}\n\nlet ast;\ntry {\n  ast = getAst(markdownString);\n} catch (err) {\n  console.log(`Could not parse the markdown into a syntax tree: ${err}`);\n  process.exit(1);\n}\n\ntry {\n  const result = format(ast, filePath);\n\n  if (result.changed) {\n    console.log(\"Updated markdown\");\n  }\n  if (result.correct) {\n    console.log(\"Looks like the markdown was good enough\");\n    process.exit(0);\n  } else {\n    console.log(`There was a problem with the markdown...\\n ${result.reason}`);\n    process.exit(1);\n  }\n} catch (err) {\n  console.log(\n    `I must have made a mistake or not handled an error, soz\\n${err}`\n  );\n  process.exit(1);\n}\n\nfunction getAst(markdownString) {\n  const tree = unified().use(remarkParse).parse(markdownString);\n  return tree;\n}\n\nfunction format(ast, path) {\n  try {\n    let changed = false;\n    const content = ast.children;\n    if (!content.length) {\n      return {\n        correct: false,\n        reason: \"Empty file maybeee\",\n      };\n    }\n\n    // heading 1 is optional so if it's there just get rid of it and check the rest\n    if (content[0].type === \"heading\" && content[0].depth === 1) {\n      content.splice(0, 1);\n    }\n\n    // now we may have removed the h1, the new 'first' item should be a h2\n    // check first item is a heading\n    if (content[0].type !== \"heading\" || content[0].depth !== 2) {\n      return {\n        correct: false,\n        reason:\n          \"There should be a level 2 heading at the top, or immediately after the level 1 heading if you have one. If you have a level 1 heading, make sure there is no text between that and the level 2 heading\",\n      };\n    }\n\n    let changedIdx = -1;\n    for (let i = 0; i < content.length; i++) {\n      // checks on all ## headings\n      const item = content[i];\n      if (item.type === \"heading\" && item.depth === 2) {\n        changedIdx = -1;\n        // check correct amount of text is at heading 2\n        if (\n          item.children.length === 2 &&\n          item.children[0].type === \"link\" &&\n          item.children[0].children.length === 1 &&\n          item.children[0].children[0].type === \"text\" &&\n          item.children[1].type === \"text\"\n        ) {\n          const link = item.children[0];\n          item.children = [item.children[1]];\n          item.children[0].value =\n            link.children[0].value + item.children[0].value;\n          changed = true;\n        } else if (item.children.length !== 1) {\n          console.log(\n            `${path}:${item.position.start.line}:${item.position.start.column}`\n          );\n          return {\n            correct: false,\n            reason:\n              \"Level 2 headings should say version and date, e.g. 1.9.2 (2023-02-10) and contain no other markdown\",\n          };\n        }\n\n        const heading2 = item.children[0];\n        const heading2Text = heading2.value;\n\n        // check heading 2 text can be split into exactly 2 parts at the point of a space\n        let textParts;\n        try {\n          textParts = heading2Text.split(\" \");\n        } catch (err) {\n          console.log(\n            `${path}:${heading2.position.start.line}:${heading2.position.start.column}`\n          );\n          return {\n            correct: false,\n            reason: `Level 2 headings should contain a space. We expect one between the semantic version number and the date. Error message: ${err}`,\n          };\n        }\n\n        if (textParts.length > 2) {\n          console.log(\n            `${path}:${heading2.position.start.line}:${heading2.position.start.column}`\n          );\n          return {\n            correct: false,\n            reason:\n              \"Level 2 headings should only contain one space. We expect one between the semantic version number and the date\",\n          };\n        }\n\n        // check first part of header 2 is a semantic version number\n        const expectedSemanticVersion = textParts[0];\n        if (\n          !/^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/.test(\n            expectedSemanticVersion\n          )\n        ) {\n          console.log(\n            `${path}:${heading2.position.start.line}:${heading2.position.start.column}`\n          );\n          return {\n            correct: false,\n            reason:\n              \"First part of level 2 headings should be a semantic version, e.g. 1.9.2\",\n          };\n        }\n\n        // check second part of header 2 is a date in format YYYY-MM-DD\n        const expectedDate = textParts[1];\n        if (\n          !/^\\((\\d{4,5}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])\\))$/.test(\n            expectedDate\n          )\n        ) {\n          console.log(\n            `${path}:${heading2.position.start.line}:${heading2.position.start.column}`\n          );\n          return {\n            correct: false,\n            reason:\n              \"Second part of level 2 headings should be a hypen-separated date in the format YYYY-MM-DD\",\n          };\n        }\n\n        // check it is followed by at least one level 3 heading\n        if (\n          !content[i + 1] ||\n          content[i + 1].type !== \"heading\" ||\n          content[i + 1].depth !== 3\n        ) {\n          console.log(\n            `${path}:${item.position.start.line}:${item.position.start.column}`\n          );\n          return {\n            correct: false,\n            reason:\n              \"Level 2 headings must be followed by at least one level 3 heading\",\n          };\n        }\n      }\n\n      // checks on all ### headings\n      if (item.type === \"heading\" && item.depth === 3) {\n        // check it only uses one of the fixed options for change types\n        if (item.children.length === 1 && item.children[0].type === \"text\") {\n          const val = item.children[0].value;\n          if (val.toLowerCase().endsWith(\"breaking changes\")) {\n            item.children[0].value = \"Changed\";\n            changed = true;\n          } else if (val.includes(\"Bug Fixes\")) {\n            item.children[0].value = \"Fixed\";\n            changed = true;\n          } else if (val.includes(\"Features\")) {\n            item.children[0].value = \"Added\";\n            changed = true;\n          }\n        }\n\n        if (item.children.length !== 1 || item.children[0].type !== \"text\") {\n          console.log(\n            `${path}:${item.children[0].position.start.line}:${item.children[0].position.start.column}`\n          );\n          return {\n            correct: false,\n            reason: `Level 3 headings should only be text`,\n          };\n        }\n\n        if (item.children[0].value === 'Performance Improvements') {\n          if (i + 1 < content.length && (content[i + 1].type !== 'list' || content[i + 2].type !== 'heading')) {\n            console.log(\n              `${path}:${item.children[0].position.start.line}:${item.children[0].position.start.column}`\n            );\n            return {\n              correct: false,\n              reason: `Performance improvements section must be a single list to fix it`,\n            };\n          }\n\n          if (changedIdx === -1) {\n            for (let j = i + 1; j < content.length; j++) {\n              const curItem = content[j];\n              if (curItem.type === 'heading') {\n                if (curItem.depth < 3)\n                  break;\n                if (curItem.depth === 3 && curItem.children.length === 1 &&\n                    curItem.children[0].type === 'text' && curItem.children[0].value === 'Changed') {\n                  changedIdx = j;\n                  break;\n                }\n              }\n            }\n          }\n\n          if (changedIdx !== -1) {\n            // Merge it into any already-seen changed section\n            const toMerge = content[i + 1];\n            content.splice(i, 2);\n            content.splice(changedIdx + 1, 0, toMerge);\n            changed = true;\n          } else {\n            // Otherwise rename to Changed\n            item.children[0].value = 'Changed';\n            changed = true;\n          }\n          continue;\n        }\n\n        if (![\n            \"Added\",\n            \"Changed\",\n            \"Deprecated\",\n            \"Removed\",\n            \"Fixed\",\n            \"Security\",\n          ].includes(item.children[0].value)\n        ) {\n          console.log(\n            `${path}:${item.children[0].position.start.line}:${item.children[0].position.start.column}`\n          );\n          return {\n            correct: false,\n            reason: `Level 3 headings should only be one of 'Added', 'Changed', 'Deprecated', 'Removed', 'Fixed', 'Security'`,\n          };\n        }\n\n        if (item.children[0].value === 'Changed')\n          changedIdx = i;\n\n        // check that there is something other than a heading following it, which we have to presume describes the change\n        if (!content[i + 1] || content[i + 1].type === \"heading\") {\n          console.log(\n            `${path}:${item.position.start.line}:${item.position.start.column}`\n          );\n          return {\n            correct: false,\n            reason:\n              \"Level 3 headings must be followed by something other than a heading to describe the change\",\n          };\n        }\n      }\n    }\n\n    if (changed) {\n      // ...work around convoluted API...\n      const wat = { data() {} };\n      remarkStringify.call(wat);\n      const output = wat.compiler(ast);\n      writeFileSync(path, `# Changelog\\n\\n${output}`, \"utf8\");\n    }\n\n    return { correct: true, changed };\n  } catch (err) {\n    console.error(\"Must be an error in my checks: \", err);\n    process.exit(1);\n  }\n}\n"
  },
  {
    "path": "ci/rustfmt.sh",
    "content": "#!/usr/bin/env bash\n\nset -euo pipefail\n\ncd \"$(dirname \"${BASH_SOURCE[0]}\")/..\"\n\nfailed=0\nfor manifest in $(git ls-files | grep Cargo.toml); do\n  if ! cargo fmt --manifest-path=\"$manifest\" -- --check; then\n    failed=1\n  fi\ndone\n\nexit \"$failed\"\n"
  },
  {
    "path": "ci/shellcheck.sh",
    "content": "#!/usr/bin/env bash\n\nset -euo pipefail\n\ncd \"$(dirname \"${BASH_SOURCE[0]}\")/..\"\n\nfailed=\nfor file in $(git ls-files | grep '\\.sh$'); do\n  if ! shellcheck \"${file}\"; then\n    failed=1\n  fi\ndone\n\nif [ -n \"${failed}\" ]; then\n  exit 1\nfi\n"
  },
  {
    "path": "compute-file-server-cli/.gitignore",
    "content": "/target\n"
  },
  {
    "path": "compute-file-server-cli/Cargo.toml",
    "content": "[package]\nname = \"compute-file-server-cli\"\nversion = \"1.1.0\"\nedition = \"2021\"\ndescription = \"Uploads files to Fastly for serving directly from within Fastly Compute applications. Upload any type of file: images, text, video etc and serve directly from Fastly. It is ideal for serving files built from a static site generator such as 11ty.\"\nlicense = \"MIT\"\nlicense-file = \"LICENSE\"\nrepository = \"https://github.com/jakeChampion/compute-file-server\"\n\n# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html\n\n[dependencies]\nclap = \"=4.0.10\"\nwalkdir = \"=2.3.2\"\nreqwest = { version = \"=0.11\", features = [\"json\", \"stream\"] }\nopenssl = { version = \"=0.10.72\", features = [\"vendored\"] }\ntokio = { version = \"=1\", features = [\"full\"] }\nsimple-error = \"=0.2.3\"\nserde_derive = \"=1.0.145\"\nserde = \"=1.0.145\"\nphf = { version = \"=0.11\", features = [\"macros\"] }\nfastly-api = \"=1.0.0-beta.0\"\nindicatif = \"=0.17.1\"\nfutures = \"=0.3.24\"\npercent-encoding = \"=2.2.0\"\ntoml_edit = \"=0.14.4\"\nhttpdate = \"=1.0.2\"\nserde_json = \"=1.0.86\"\nsha2 = \"=0.10.6\"\nbase64 = \"=0.13.0\"\n"
  },
  {
    "path": "compute-file-server-cli/LICENSE",
    "content": "MIT License\n\nCopyright (c) 2022 Jake Daniel Champion\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "compute-file-server-cli/README.md",
    "content": "# compute-file-server\n\nFastly File Server uploads files to Fastly for serving directly from within Fastly Compute applications.\n\nUpload any type of file: images, text, video etc and serve directly from Fastly.\n\nIt is ideal for serving files built from a static site generator such as 11ty.\n\n## Install\n\n### Cargo\n\nCompile and install via `cargo`\n\n```sh\ngit clone https://github.com/JakeChampion/compute-file-server\ncd compute-file-server/cli\ncargo install --path .\n```\n\n## Commands\n\n### Upload\n\nUpload files to a Fastly Object Store, creating the Object Store if it does not exist.\n\nExample: `compute-file-server upload --name website-static-files -- ./folder/of/files`\n\n```sh\ncompute-file-server upload\nUpload files\n\nUsage: compute-file-server upload [OPTIONS] --name <NAME> -- <PATH>\n\nArguments:\n  <PATH>  \n\nOptions:\n      --name <NAME>    \n      --token <TOKEN>  \n  -h, --help           Print help information\n```\n\n### Link\n\nConnect a Fastly Object Store to a Fastly Service.\n\nExample: `compute-file-server link --name website-static-files --link-name files --service-id xxyyzz`\n\n```sh\nUsage: compute-file-server link [OPTIONS] --name <NAME> --link-name <LINK_NAME> --service-id <SERVICE_ID>\n\nOptions:\n      --name <NAME>\n      --token <TOKEN>\n      --link-name <LINK_NAME>\n      --service-id <SERVICE_ID>\n  -h, --help                     Print help information\n```\n\n### Local\n\nUpdate `fastly.toml` to contain a local Object Store containing the specified files.\n\nExample: `compute-file-server local --name files --toml fastly.toml -- ./folder/of/files`\n\n```sh\nUsage: compute-file-server local --toml <TOML> --name <NAME> -- <PATH>\n\nArguments:\n  <PATH>\n\nOptions:\n      --toml <TOML>\n      --name <NAME>\n  -h, --help         Print help information\n```\n"
  },
  {
    "path": "compute-file-server-cli/rust-toolchain.toml",
    "content": "[toolchain]\nchannel = \"1.83.0\"\ntargets = [\"wasm32-wasi\"]\nprofile = \"minimal\"\n"
  },
  {
    "path": "compute-file-server-cli/src/main.rs",
    "content": "use base64;\nuse clap::{arg, Command};\nuse fastly_api::apis::configuration::{ApiKey, Configuration};\nuse fastly_api::apis::version_api::{\n    activate_service_version, clone_service_version, list_service_versions,\n    ActivateServiceVersionParams, CloneServiceVersionParams, ListServiceVersionsParams,\n};\nuse futures::{stream, StreamExt};\nuse httpdate::fmt_http_date;\nuse reqwest::Client;\nuse sha2::{Digest, Sha256};\nuse simple_error::bail;\nuse std::error::Error;\nuse std::path::PathBuf;\nuse tokio;\nuse tokio::fs::File;\nuse toml_edit;\nuse walkdir::WalkDir;\n\nconst PARALLEL_REQUESTS: usize = 10;\nconst RETRY_REQUESTS: usize = 5;\n\nuse phf::phf_map;\n\nstatic MIMES: phf::Map<&'static str, &'static str> = phf_map! {\n  \"ez\"=> \"application/andrew-inset\",\n  \"aw\"=> \"application/applixware\",\n  \"atom\"=> \"application/atom+xml\",\n  \"atomcat\"=> \"application/atomcat+xml\",\n  \"atomdeleted\"=> \"application/atomdeleted+xml\",\n  \"atomsvc\"=> \"application/atomsvc+xml\",\n  \"dwd\"=> \"application/atsc-dwd+xml\",\n  \"held\"=> \"application/atsc-held+xml\",\n  \"rsat\"=> \"application/atsc-rsat+xml\",\n  \"bdoc\"=> \"application/bdoc\",\n  \"xcs\"=> \"application/calendar+xml\",\n  \"ccxml\"=> \"application/ccxml+xml\",\n  \"cdfx\"=> \"application/cdfx+xml\",\n  \"cdmia\"=> \"application/cdmi-capability\",\n  \"cdmic\"=> \"application/cdmi-container\",\n  \"cdmid\"=> \"application/cdmi-domain\",\n  \"cdmio\"=> \"application/cdmi-object\",\n  \"cdmiq\"=> \"application/cdmi-queue\",\n  \"cu\"=> \"application/cu-seeme\",\n  \"mpd\"=> \"application/dash+xml\",\n  \"davmount\"=> \"application/davmount+xml\",\n  \"dbk\"=> \"application/docbook+xml\",\n  \"dssc\"=> \"application/dssc+der\",\n  \"xdssc\"=> \"application/dssc+xml\",\n  \"es\"=> \"application/ecmascript\",\n  \"ecma\"=> \"application/ecmascript\",\n  \"emma\"=> \"application/emma+xml\",\n  \"emotionml\"=> \"application/emotionml+xml\",\n  \"epub\"=> \"application/epub+zip\",\n  \"exi\"=> \"application/exi\",\n  \"fdt\"=> \"application/fdt+xml\",\n  \"pfr\"=> \"application/font-tdpfr\",\n  \"geojson\"=> \"application/geo+json\",\n  \"gml\"=> \"application/gml+xml\",\n  \"gpx\"=> \"application/gpx+xml\",\n  \"gxf\"=> \"application/gxf\",\n  \"gz\"=> \"application/gzip\",\n  \"hjson\"=> \"application/hjson\",\n  \"stk\"=> \"application/hyperstudio\",\n  \"ink\"=> \"application/inkml+xml\",\n  \"inkml\"=> \"application/inkml+xml\",\n  \"ipfix\"=> \"application/ipfix\",\n  \"its\"=> \"application/its+xml\",\n  \"jar\"=> \"application/java-archive\",\n  \"war\"=> \"application/java-archive\",\n  \"ear\"=> \"application/java-archive\",\n  \"ser\"=> \"application/java-serialized-object\",\n  \"class\"=> \"application/java-vm\",\n  \"js\"=> \"application/javascript\",\n  \"mjs\"=> \"application/javascript\",\n  \"json\"=> \"application/json\",\n  \"map\"=> \"application/json\",\n  \"json5\"=> \"application/json5\",\n  \"jsonml\"=> \"application/jsonml+json\",\n  \"jsonld\"=> \"application/ld+json\",\n  \"lgr\"=> \"application/lgr+xml\",\n  \"lostxml\"=> \"application/lost+xml\",\n  \"hqx\"=> \"application/mac-binhex40\",\n  \"cpt\"=> \"application/mac-compactpro\",\n  \"mads\"=> \"application/mads+xml\",\n  \"webmanifest\"=> \"application/manifest+json\",\n  \"mrc\"=> \"application/marc\",\n  \"mrcx\"=> \"application/marcxml+xml\",\n  \"ma\"=> \"application/mathematica\",\n  \"nb\"=> \"application/mathematica\",\n  \"mb\"=> \"application/mathematica\",\n  \"mathml\"=> \"application/mathml+xml\",\n  \"mbox\"=> \"application/mbox\",\n  \"mscml\"=> \"application/mediaservercontrol+xml\",\n  \"metalink\"=> \"application/metalink+xml\",\n  \"meta4\"=> \"application/metalink4+xml\",\n  \"mets\"=> \"application/mets+xml\",\n  \"maei\"=> \"application/mmt-aei+xml\",\n  \"musd\"=> \"application/mmt-usd+xml\",\n  \"mods\"=> \"application/mods+xml\",\n  \"m21\"=> \"application/mp21\",\n  \"mp21\"=> \"application/mp21\",\n  \"mp4s\"=> \"application/mp4\",\n  \"m4p\"=> \"application/mp4\",\n  \"doc\"=> \"application/msword\",\n  \"dot\"=> \"application/msword\",\n  \"mxf\"=> \"application/mxf\",\n  \"nq\"=> \"application/n-quads\",\n  \"nt\"=> \"application/n-triples\",\n  \"cjs\"=> \"application/node\",\n  \"bin\"=> \"application/octet-stream\",\n  \"dms\"=> \"application/octet-stream\",\n  \"lrf\"=> \"application/octet-stream\",\n  \"mar\"=> \"application/octet-stream\",\n  \"so\"=> \"application/octet-stream\",\n  \"dist\"=> \"application/octet-stream\",\n  \"distz\"=> \"application/octet-stream\",\n  \"pkg\"=> \"application/octet-stream\",\n  \"bpk\"=> \"application/octet-stream\",\n  \"dump\"=> \"application/octet-stream\",\n  \"elc\"=> \"application/octet-stream\",\n  \"deploy\"=> \"application/octet-stream\",\n  \"exe\"=> \"application/octet-stream\",\n  \"dll\"=> \"application/octet-stream\",\n  \"deb\"=> \"application/octet-stream\",\n  \"dmg\"=> \"application/octet-stream\",\n  \"iso\"=> \"application/octet-stream\",\n  \"img\"=> \"application/octet-stream\",\n  \"msi\"=> \"application/octet-stream\",\n  \"msp\"=> \"application/octet-stream\",\n  \"msm\"=> \"application/octet-stream\",\n  \"buffer\"=> \"application/octet-stream\",\n  \"oda\"=> \"application/oda\",\n  \"opf\"=> \"application/oebps-package+xml\",\n  \"ogx\"=> \"application/ogg\",\n  \"omdoc\"=> \"application/omdoc+xml\",\n  \"onetoc\"=> \"application/onenote\",\n  \"onetoc2\"=> \"application/onenote\",\n  \"onetmp\"=> \"application/onenote\",\n  \"onepkg\"=> \"application/onenote\",\n  \"oxps\"=> \"application/oxps\",\n  \"relo\"=> \"application/p2p-overlay+xml\",\n  \"xer\"=> \"application/patch-ops-error+xml\",\n  \"pdf\"=> \"application/pdf\",\n  \"pgp\"=> \"application/pgp-encrypted\",\n  \"asc\"=> \"application/pgp-signature\",\n  \"sig\"=> \"application/pgp-signature\",\n  \"prf\"=> \"application/pics-rules\",\n  \"p10\"=> \"application/pkcs10\",\n  \"p7m\"=> \"application/pkcs7-mime\",\n  \"p7c\"=> \"application/pkcs7-mime\",\n  \"p7s\"=> \"application/pkcs7-signature\",\n  \"p8\"=> \"application/pkcs8\",\n  \"ac\"=> \"application/pkix-attr-cert\",\n  \"cer\"=> \"application/pkix-cert\",\n  \"crl\"=> \"application/pkix-crl\",\n  \"pkipath\"=> \"application/pkix-pkipath\",\n  \"pki\"=> \"application/pkixcmp\",\n  \"pls\"=> \"application/pls+xml\",\n  \"ai\"=> \"application/postscript\",\n  \"eps\"=> \"application/postscript\",\n  \"ps\"=> \"application/postscript\",\n  \"provx\"=> \"application/provenance+xml\",\n  \"cww\"=> \"application/prs.cww\",\n  \"pskcxml\"=> \"application/pskc+xml\",\n  \"raml\"=> \"application/raml+yaml\",\n  \"rdf\"=> \"application/rdf+xml\",\n  \"owl\"=> \"application/rdf+xml\",\n  \"rif\"=> \"application/reginfo+xml\",\n  \"rnc\"=> \"application/relax-ng-compact-syntax\",\n  \"rl\"=> \"application/resource-lists+xml\",\n  \"rld\"=> \"application/resource-lists-diff+xml\",\n  \"rs\"=> \"application/rls-services+xml\",\n  \"rapd\"=> \"application/route-apd+xml\",\n  \"sls\"=> \"application/route-s-tsid+xml\",\n  \"rusd\"=> \"application/route-usd+xml\",\n  \"gbr\"=> \"application/rpki-ghostbusters\",\n  \"mft\"=> \"application/rpki-manifest\",\n  \"roa\"=> \"application/rpki-roa\",\n  \"rsd\"=> \"application/rsd+xml\",\n  \"rss\"=> \"application/rss+xml\",\n  \"rtf\"=> \"application/rtf\",\n  \"sbml\"=> \"application/sbml+xml\",\n  \"scq\"=> \"application/scvp-cv-request\",\n  \"scs\"=> \"application/scvp-cv-response\",\n  \"spq\"=> \"application/scvp-vp-request\",\n  \"spp\"=> \"application/scvp-vp-response\",\n  \"sdp\"=> \"application/sdp\",\n  \"senmlx\"=> \"application/senml+xml\",\n  \"sensmlx\"=> \"application/sensml+xml\",\n  \"setpay\"=> \"application/set-payment-initiation\",\n  \"setreg\"=> \"application/set-registration-initiation\",\n  \"shf\"=> \"application/shf+xml\",\n  \"siv\"=> \"application/sieve\",\n  \"sieve\"=> \"application/sieve\",\n  \"smi\"=> \"application/smil+xml\",\n  \"smil\"=> \"application/smil+xml\",\n  \"rq\"=> \"application/sparql-query\",\n  \"srx\"=> \"application/sparql-results+xml\",\n  \"gram\"=> \"application/srgs\",\n  \"grxml\"=> \"application/srgs+xml\",\n  \"sru\"=> \"application/sru+xml\",\n  \"ssdl\"=> \"application/ssdl+xml\",\n  \"ssml\"=> \"application/ssml+xml\",\n  \"swidtag\"=> \"application/swid+xml\",\n  \"tei\"=> \"application/tei+xml\",\n  \"teicorpus\"=> \"application/tei+xml\",\n  \"tfi\"=> \"application/thraud+xml\",\n  \"tsd\"=> \"application/timestamped-data\",\n  \"toml\"=> \"application/toml\",\n  \"trig\"=> \"application/trig\",\n  \"ttml\"=> \"application/ttml+xml\",\n  \"ubj\"=> \"application/ubjson\",\n  \"rsheet\"=> \"application/urc-ressheet+xml\",\n  \"td\"=> \"application/urc-targetdesc+xml\",\n  \"vxml\"=> \"application/voicexml+xml\",\n  \"wasm\"=> \"application/wasm\",\n  \"wgt\"=> \"application/widget\",\n  \"hlp\"=> \"application/winhlp\",\n  \"wsdl\"=> \"application/wsdl+xml\",\n  \"wspolicy\"=> \"application/wspolicy+xml\",\n  \"xaml\"=> \"application/xaml+xml\",\n  \"xav\"=> \"application/xcap-att+xml\",\n  \"xca\"=> \"application/xcap-caps+xml\",\n  \"xdf\"=> \"application/xcap-diff+xml\",\n  \"xel\"=> \"application/xcap-el+xml\",\n  \"xns\"=> \"application/xcap-ns+xml\",\n  \"xenc\"=> \"application/xenc+xml\",\n  \"xhtml\"=> \"application/xhtml+xml\",\n  \"xht\"=> \"application/xhtml+xml\",\n  \"xlf\"=> \"application/xliff+xml\",\n  \"xml\"=> \"application/xml\",\n  \"xsl\"=> \"application/xml\",\n  \"xsd\"=> \"application/xml\",\n  \"rng\"=> \"application/xml\",\n  \"dtd\"=> \"application/xml-dtd\",\n  \"xop\"=> \"application/xop+xml\",\n  \"xpl\"=> \"application/xproc+xml\",\n  \"xslt\"=> \"application/xml\",\n  \"xspf\"=> \"application/xspf+xml\",\n  \"mxml\"=> \"application/xv+xml\",\n  \"xhvml\"=> \"application/xv+xml\",\n  \"xvml\"=> \"application/xv+xml\",\n  \"xvm\"=> \"application/xv+xml\",\n  \"yang\"=> \"application/yang\",\n  \"yin\"=> \"application/yin+xml\",\n  \"zip\"=> \"application/zip\",\n  \"3gpp\"=> \"video/3gpp\",\n  \"adp\"=> \"audio/adpcm\",\n  \"amr\"=> \"audio/amr\",\n  \"au\"=> \"audio/basic\",\n  \"snd\"=> \"audio/basic\",\n  \"mid\"=> \"audio/midi\",\n  \"midi\"=> \"audio/midi\",\n  \"kar\"=> \"audio/midi\",\n  \"rmi\"=> \"audio/midi\",\n  \"mxmf\"=> \"audio/mobile-xmf\",\n  \"mp3\"=> \"audio/mpeg\",\n  \"m4a\"=> \"audio/mp4\",\n  \"mp4a\"=> \"audio/mp4\",\n  \"mpga\"=> \"audio/mpeg\",\n  \"mp2\"=> \"audio/mpeg\",\n  \"mp2a\"=> \"audio/mpeg\",\n  \"m2a\"=> \"audio/mpeg\",\n  \"m3a\"=> \"audio/mpeg\",\n  \"oga\"=> \"audio/ogg\",\n  \"ogg\"=> \"audio/ogg\",\n  \"spx\"=> \"audio/ogg\",\n  \"opus\"=> \"audio/ogg\",\n  \"s3m\"=> \"audio/s3m\",\n  \"sil\"=> \"audio/silk\",\n  \"wav\"=> \"audio/wav\",\n  \"weba\"=> \"audio/webm\",\n  \"xm\"=> \"audio/xm\",\n  \"ttc\"=> \"font/collection\",\n  \"otf\"=> \"font/otf\",\n  \"ttf\"=> \"font/ttf\",\n  \"woff\"=> \"font/woff\",\n  \"woff2\"=> \"font/woff2\",\n  \"exr\"=> \"image/aces\",\n  \"apng\"=> \"image/apng\",\n  \"avif\"=> \"image/avif\",\n  \"bmp\"=> \"image/bmp\",\n  \"cgm\"=> \"image/cgm\",\n  \"drle\"=> \"image/dicom-rle\",\n  \"emf\"=> \"image/emf\",\n  \"fits\"=> \"image/fits\",\n  \"g3\"=> \"image/g3fax\",\n  \"gif\"=> \"image/gif\",\n  \"heic\"=> \"image/heic\",\n  \"heics\"=> \"image/heic-sequence\",\n  \"heif\"=> \"image/heif\",\n  \"heifs\"=> \"image/heif-sequence\",\n  \"hej2\"=> \"image/hej2k\",\n  \"hsj2\"=> \"image/hsj2\",\n  \"ief\"=> \"image/ief\",\n  \"jls\"=> \"image/jls\",\n  \"jp2\"=> \"image/jp2\",\n  \"jpg2\"=> \"image/jp2\",\n  \"jpeg\"=> \"image/jpeg\",\n  \"jpg\"=> \"image/jpeg\",\n  \"jpe\"=> \"image/jpeg\",\n  \"jph\"=> \"image/jph\",\n  \"jhc\"=> \"image/jphc\",\n  \"jpm\"=> \"image/jpm\",\n  \"jpx\"=> \"image/jpx\",\n  \"jpf\"=> \"image/jpx\",\n  \"jxr\"=> \"image/jxr\",\n  \"jxra\"=> \"image/jxra\",\n  \"jxrs\"=> \"image/jxrs\",\n  \"jxs\"=> \"image/jxs\",\n  \"jxsc\"=> \"image/jxsc\",\n  \"jxsi\"=> \"image/jxsi\",\n  \"jxss\"=> \"image/jxss\",\n  \"ktx\"=> \"image/ktx\",\n  \"ktx2\"=> \"image/ktx2\",\n  \"png\"=> \"image/png\",\n  \"btif\"=> \"image/prs.btif\",\n  \"pti\"=> \"image/prs.pti\",\n  \"sgi\"=> \"image/sgi\",\n  \"svg\"=> \"image/svg+xml\",\n  \"svgz\"=> \"image/svg+xml\",\n  \"t38\"=> \"image/t38\",\n  \"tif\"=> \"image/tiff\",\n  \"tiff\"=> \"image/tiff\",\n  \"tfx\"=> \"image/tiff-fx\",\n  \"webp\"=> \"image/webp\",\n  \"wmf\"=> \"image/wmf\",\n  \"disposition-notification\"=> \"message/disposition-notification\",\n  \"u8msg\"=> \"message/global\",\n  \"u8dsn\"=> \"message/global-delivery-status\",\n  \"u8mdn\"=> \"message/global-disposition-notification\",\n  \"u8hdr\"=> \"message/global-headers\",\n  \"eml\"=> \"message/rfc822\",\n  \"mime\"=> \"message/rfc822\",\n  \"3mf\"=> \"model/3mf\",\n  \"gltf\"=> \"model/gltf+json\",\n  \"glb\"=> \"model/gltf-binary\",\n  \"igs\"=> \"model/iges\",\n  \"iges\"=> \"model/iges\",\n  \"msh\"=> \"model/mesh\",\n  \"mesh\"=> \"model/mesh\",\n  \"silo\"=> \"model/mesh\",\n  \"mtl\"=> \"model/mtl\",\n  \"obj\"=> \"model/obj\",\n  \"stpz\"=> \"model/step+zip\",\n  \"stpxz\"=> \"model/step-xml+zip\",\n  \"stl\"=> \"model/stl\",\n  \"wrl\"=> \"model/vrml\",\n  \"vrml\"=> \"model/vrml\",\n  \"x3db\"=> \"model/x3d+fastinfoset\",\n  \"x3dbz\"=> \"model/x3d+binary\",\n  \"x3dv\"=> \"model/x3d-vrml\",\n  \"x3dvz\"=> \"model/x3d+vrml\",\n  \"x3d\"=> \"model/x3d+xml\",\n  \"x3dz\"=> \"model/x3d+xml\",\n  \"appcache\"=> \"text/cache-manifest\",\n  \"manifest\"=> \"text/cache-manifest\",\n  \"ics\"=> \"text/calendar\",\n  \"ifb\"=> \"text/calendar\",\n  \"coffee\"=> \"text/coffeescript\",\n  \"litcoffee\"=> \"text/coffeescript\",\n  \"css\"=> \"text/css\",\n  \"csv\"=> \"text/csv\",\n  \"html\"=> \"text/html\",\n  \"htm\"=> \"text/html\",\n  \"shtml\"=> \"text/html\",\n  \"jade\"=> \"text/jade\",\n  \"jsx\"=> \"text/jsx\",\n  \"less\"=> \"text/less\",\n  \"markdown\"=> \"text/markdown\",\n  \"md\"=> \"text/markdown\",\n  \"mml\"=> \"text/mathml\",\n  \"mdx\"=> \"text/mdx\",\n  \"n3\"=> \"text/n3\",\n  \"txt\"=> \"text/plain\",\n  \"text\"=> \"text/plain\",\n  \"conf\"=> \"text/plain\",\n  \"def\"=> \"text/plain\",\n  \"list\"=> \"text/plain\",\n  \"log\"=> \"text/plain\",\n  \"in\"=> \"text/plain\",\n  \"ini\"=> \"text/plain\",\n  \"dsc\"=> \"text/prs.lines.tag\",\n  \"rtx\"=> \"text/richtext\",\n  \"sgml\"=> \"text/sgml\",\n  \"sgm\"=> \"text/sgml\",\n  \"shex\"=> \"text/shex\",\n  \"slim\"=> \"text/slim\",\n  \"slm\"=> \"text/slim\",\n  \"spdx\"=> \"text/spdx\",\n  \"stylus\"=> \"text/stylus\",\n  \"styl\"=> \"text/stylus\",\n  \"tsv\"=> \"text/tab-separated-values\",\n  \"t\"=> \"text/troff\",\n  \"tr\"=> \"text/troff\",\n  \"roff\"=> \"text/troff\",\n  \"man\"=> \"text/troff\",\n  \"me\"=> \"text/troff\",\n  \"ms\"=> \"text/troff\",\n  \"ttl\"=> \"text/turtle\",\n  \"uri\"=> \"text/uri-list\",\n  \"uris\"=> \"text/uri-list\",\n  \"urls\"=> \"text/uri-list\",\n  \"vcard\"=> \"text/vcard\",\n  \"vtt\"=> \"text/vtt\",\n  \"yaml\"=> \"text/yaml\",\n  \"yml\"=> \"text/yaml\",\n  \"3gp\"=> \"video/3gpp\",\n  \"3g2\"=> \"video/3gpp2\",\n  \"h261\"=> \"video/h261\",\n  \"h263\"=> \"video/h263\",\n  \"h264\"=> \"video/h264\",\n  \"m4s\"=> \"video/iso.segment\",\n  \"jpgv\"=> \"video/jpeg\",\n  \"jpgm\"=> \"image/jpm\",\n  \"mj2\"=> \"video/mj2\",\n  \"mjp2\"=> \"video/mj2\",\n  \"ts\"=> \"video/mp2t\",\n  \"mp4\"=> \"video/mp4\",\n  \"mp4v\"=> \"video/mp4\",\n  \"mpg4\"=> \"video/mp4\",\n  \"mpeg\"=> \"video/mpeg\",\n  \"mpg\"=> \"video/mpeg\",\n  \"mpe\"=> \"video/mpeg\",\n  \"m1v\"=> \"video/mpeg\",\n  \"m2v\"=> \"video/mpeg\",\n  \"ogv\"=> \"video/ogg\",\n  \"qt\"=> \"video/quicktime\",\n  \"mov\"=> \"video/quicktime\",\n  \"webm\"=> \"video/webm\"\n};\n\nfn lookup(extn: &str) -> Option<&&str> {\n    let extn = extn.trim().to_lowercase();\n    MIMES.get(&extn)\n}\n\nuse serde_derive::Deserialize;\nuse serde_derive::Serialize;\n\n#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]\n#[serde(rename_all = \"camelCase\")]\nstruct Metadata {\n    #[serde(rename = \"ETag\")]\n    etag: String,\n    #[serde(rename = \"Last-Modified\")]\n    last_modified: String,\n    #[serde(rename = \"Content-Type\")]\n    content_type: Option<String>,\n}\n\n#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]\n#[serde(rename_all = \"camelCase\")]\nstruct KVStores {\n    data: Vec<KVStore>,\n    meta: Meta,\n}\n\n#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]\n#[serde(rename_all = \"camelCase\")]\nstruct KVStore {\n    id: String,\n    name: String,\n    #[serde(rename = \"created_at\")]\n    created_at: String,\n    #[serde(rename = \"updated_at\")]\n    updated_at: String,\n}\n\n#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]\n#[serde(rename_all = \"camelCase\")]\nstruct Meta {\n    limit: i64,\n    total: i64,\n}\n\nasync fn create_store(name: &str, token: &str) -> Result<String, Box<dyn std::error::Error>> {\n    let client = reqwest::Client::new();\n    let res = client\n        .post(\"https://api.fastly.com/resources/stores/kv\")\n        .header(\"Content-Type\", \"application/json\")\n        .header(\"Accept\", \"application/json\")\n        .header(\"Fastly-Key\", token)\n        .body(format!(\"{{\\\"name\\\":\\\"{}\\\"}}\", name))\n        .send()\n        .await?;\n    if res.status() == 201 {\n        Ok(res.json::<KVStore>().await?.id)\n    } else {\n        bail!(format!(\n            \"Failed to create Object Store named `{}`. Response body contained `{}`\",\n            name,\n            res.text().await?\n        ))\n    }\n}\n\nasync fn get_or_create_store(\n    name: &str,\n    token: &str,\n) -> Result<String, Box<dyn std::error::Error>> {\n    // get all stores\n    let client = reqwest::Client::new();\n    let res = client\n        .get(\"https://api.fastly.com/resources/stores/kv\")\n        .header(\"Content-Type\", \"application/json\")\n        .header(\"Accept\", \"application/json\")\n        .header(\"Fastly-Key\", token)\n        .send()\n        .await?;\n    // if no stores at all, create store\n    if res.status() == 404 {\n        create_store(name, token).await\n    } else {\n        // check if store already exists\n        let res = res\n            .json::<KVStores>()\n            .await?\n            .data\n            .into_iter()\n            .find_map(|store| {\n                if store.name == name {\n                    Some(store.id)\n                } else {\n                    None\n                }\n            });\n        // if store does not exist, create store\n        if res.is_none() {\n            create_store(name, token).await\n        } else {\n            Ok(res.unwrap())\n        }\n    }\n}\n\nasync fn get_active_version_of_service(\n    service_id: &str,\n    token: &str,\n) -> Result<i32, Box<dyn std::error::Error>> {\n    let mut cfg = Configuration {\n        api_key: Some(ApiKey {\n            prefix: None,\n            key: token.to_owned(),\n        }),\n        ..Default::default()\n    };\n\n    let params = ListServiceVersionsParams {\n        service_id: service_id.to_owned(),\n        ..Default::default()\n    };\n\n    let result = list_service_versions(&mut cfg, params)\n        .await?\n        .into_iter()\n        .find_map(|v| {\n            if v.active.unwrap() {\n                Some(v.number.unwrap())\n            } else {\n                None\n            }\n        });\n\n    return Ok(result.expect(\"Service should have an active version to clone\"));\n}\n\nasync fn clone_version_of_service(\n    service_id: &str,\n    token: &str,\n    version: i32,\n) -> Result<i32, Box<dyn std::error::Error>> {\n    let mut cfg = Configuration {\n        api_key: Some(ApiKey {\n            prefix: None,\n            key: token.to_owned(),\n        }),\n        ..Default::default()\n    };\n\n    let params = CloneServiceVersionParams {\n        service_id: service_id.to_owned(),\n        version_id: version,\n        ..Default::default()\n    };\n\n    Ok(clone_service_version(&mut cfg, params)\n        .await?\n        .number\n        .unwrap())\n}\n\nasync fn activate_version_of_service(\n    service_id: &str,\n    token: &str,\n    version: i32,\n) -> Result<i32, Box<dyn std::error::Error>> {\n    let mut cfg = Configuration {\n        api_key: Some(ApiKey {\n            prefix: None,\n            key: token.to_owned(),\n        }),\n        ..Default::default()\n    };\n\n    let params = ActivateServiceVersionParams {\n        service_id: service_id.to_string(),\n        version_id: version,\n        ..Default::default()\n    };\n\n    Ok(activate_service_version(&mut cfg, params)\n        .await?\n        .number\n        .unwrap())\n}\n\nfn cli() -> Command {\n    Command::new(\"fastly-file-server\")\n        .about(\"Fastly File Server uploads files to Fastly for serving directly from within Fastly Compute applications. Upload any type of file: images, text, video etc and serve directly from Fastly. It is ideal for serving files built from a static site generator such as 11ty.\")\n        .subcommand_required(true)\n        .arg_required_else_help(true)\n        .subcommand(\n            Command::new(\"upload\")\n                .about(\"Upload files\")\n                .arg(\n                    arg!(path: [PATH])\n                        .last(true)\n                        .required(true)\n                        .value_parser(clap::value_parser!(PathBuf)),\n                )\n                .arg_required_else_help(true)\n                .arg(arg!(--name <NAME>).required(true))\n                .arg(arg!(--token <TOKEN>)),\n        )\n        .subcommand(\n            Command::new(\"local\")\n                .about(\"Setup files\")\n                .arg(\n                    arg!(path: [PATH])\n                        .last(true)\n                        .required(true)\n                        .value_parser(clap::value_parser!(PathBuf)),\n                )\n                .arg_required_else_help(true)\n                .arg(arg!(--toml <TOML>).required(true).value_parser(clap::value_parser!(PathBuf)))\n                .arg(arg!(--name <NAME>).required(true)),\n        )\n        .subcommand(\n            Command::new(\"link\")\n                .about(\"link store to service\")\n                .arg(arg!(--name <NAME>).required(true))\n                .arg(arg!(--token <TOKEN>))\n                .arg(arg!(--\"link-name\" <LINK_NAME>).required(true))\n                .arg(arg!(--\"service-id\" <SERVICE_ID>).required(true)),\n        )\n        .subcommand(\n            Command::new(\"unlink\")\n                .about(\"unlink store to service\")\n                .arg(arg!(--name <NAME>).required(true))\n                .arg(arg!(--token <TOKEN>))\n                .arg(arg!(--\"link-name\" <LINK_NAME>).required(true))\n                .arg(arg!(--\"service-id\" <SERVICE_ID>).required(true)),\n        )\n}\n\nasync fn link(sub_matches: &clap::ArgMatches) -> Result<(), Box<dyn std::error::Error>> {\n    let service_id = sub_matches\n        .get_one::<String>(\"service-id\")\n        .map(|s| s.as_str())\n        .expect(\"required in clap\");\n\n    let link_name = sub_matches\n        .get_one::<String>(\"link-name\")\n        .map(|s| s.as_str())\n        .expect(\"required in clap\");\n\n    let name = sub_matches\n        .get_one::<String>(\"name\")\n        .map(|s| s.as_str())\n        .expect(\"required in clap\");\n\n    let token = sub_matches\n        .get_one::<String>(\"token\")\n        .map(|s| s.to_owned())\n        .or_else(|| match std::env::var(\"FASTLY_API_TOKEN\") {\n            Ok(x) => Some(x),\n            Err(_) => None,\n        });\n    if token.is_none() {\n        bail!(\"Missing Fastly API token. Please provide an API token via the --token argument or the FASTLY_API_TOKEN environment variable.\")\n    }\n    let token = token.unwrap();\n\n    let store_id = get_or_create_store(name, &token).await?;\n\n    let version = get_active_version_of_service(service_id, &token).await?;\n    let version = clone_version_of_service(service_id, &token, version).await?;\n\n    // link\n    let client = reqwest::Client::new();\n    let _res = client\n        .post(format!(\n            \"https://api.fastly.com/service/{}/version/{}/resource\",\n            service_id, version\n        ))\n        .header(\"Content-Type\", \"application/x-www-form-urlencoded\")\n        .header(\"Accept\", \"application/json\")\n        .header(\"Fastly-Key\", &token)\n        .body(format!(\"name={}&resource_id={}\", link_name, store_id))\n        .send()\n        .await?;\n\n    // activate\n    activate_version_of_service(service_id, &token, version).await?;\n\n    Ok(())\n}\n\nasync fn upload(sub_matches: &clap::ArgMatches) -> Result<(), Box<dyn std::error::Error>> {\n    let name = sub_matches\n        .get_one::<String>(\"name\")\n        .map(|s| s.as_str())\n        .expect(\"required in clap\");\n\n    let token = sub_matches\n        .get_one::<String>(\"token\")\n        .map(|s| s.to_owned())\n        .or_else(|| match std::env::var(\"FASTLY_API_TOKEN\") {\n            Ok(x) => Some(x),\n            Err(_) => None,\n        });\n    if token.is_none() {\n        bail!(\"Missing Fastly API token. Please provide an API token via the --token argument or the FASTLY_API_TOKEN environment variable.\")\n    }\n    let token = token.unwrap();\n    let store_id = get_or_create_store(name, &token).await?;\n\n    let path = sub_matches\n        .get_one::<PathBuf>(\"path\")\n        .expect(\"required in clap\");\n\n    let entries = WalkDir::new(path)\n        .follow_links(true)\n        .into_iter()\n        .filter_map(Result::ok)\n        .filter(|e| !e.file_type().is_dir())\n        .collect::<Vec<walkdir::DirEntry>>();\n\n    let pb = indicatif::ProgressBar::new(entries.len().try_into().unwrap());\n    let client = Client::new();\n\n    let bodies = stream::iter(entries)\n        .map(|entry| -> tokio::task::JoinHandle<Result<String, Box<dyn Error + Send + Sync>>> {\n            let path = path.clone();\n            let store_id = store_id.clone();\n            let token = token.clone();\n            let client = client.clone();\n            tokio::spawn(async move {\n                let extension = entry.path().extension().map(|e| e.to_string_lossy().to_string()).unwrap_or(\"\".to_string());\n                let normalised_entry = entry.path().strip_prefix(path).unwrap();\n                let normalised_path = \"/\".to_owned() + &normalised_entry.to_string_lossy();\n                let key = percent_encoding::utf8_percent_encode(\n                    &normalised_path,\n                    percent_encoding::NON_ALPHANUMERIC,\n                );\n                let metadata_key = normalised_path.to_owned() + \"__metadata__\";\n                let metadata_key = percent_encoding::utf8_percent_encode(\n                    &metadata_key,\n                    percent_encoding::NON_ALPHANUMERIC,\n                );\n                let file_contents = tokio::fs::read(entry.path()).await?;\n                let file = File::open(entry.path()).await?;\n                let file_metadata = file.metadata().await?;\n                let length = file.metadata().await?.len();\n                let mut counter = 0;\n                let sha = Sha256::digest(file_contents);\n                let sha = base64::encode(&sha);\n                let metadata = serde_json::to_string(&Metadata {\n                    etag: format!(\"W/\\\"{}\\\"\", sha),\n                    last_modified: fmt_http_date(file_metadata.modified()?),\n                    content_type: lookup(&extension).map(|content_type| content_type.to_string())\n                })?;\n\n                loop {\n                    let res = client\n                        .put(format!(\n                            \"https://api.fastly.com/resources/stores/kv/{}/keys/{}\",\n                            store_id, metadata_key\n                        ))\n                        .header(\"Content-Type\", \"application/json\")\n                        .header(\"Content-Length\", metadata.len().to_string())\n                        .header(\"Accept\", \"application/json\")\n                        .header(\"Fastly-Key\", &token)\n                        .body(metadata.clone())\n                        .send()\n                        .await?;\n                    if res.status() != 200 {\n                        counter = counter + 1;\n                        if counter > RETRY_REQUESTS {\n                            bail!(\n                                \"Error uploading metadata for file named `{}`: Response Status: {} Response Body: {}\",\n                                normalised_path,\n                                res.status(),\n                                res.text().await?\n                            );\n                        }\n                    } else {\n                        break;\n                    }\n                }\n                let mut counter = 0;\n                loop {\n                    let res = client\n                        .put(format!(\n                            \"https://api.fastly.com/resources/stores/kv/{}/keys/{}\",\n                            store_id, key\n                        ))\n                        .header(\"Content-Type\", \"application/json\")\n                        .header(\"Content-Length\", length)\n                        .header(\"Accept\", \"application/json\")\n                        .header(\"Fastly-Key\", &token)\n                        .body(file.try_clone().await?)\n                        .send()\n                        .await?;\n                    if res.status() != 200 {\n                        counter = counter + 1;\n                        if counter > RETRY_REQUESTS {\n                            bail!(\n                                \"Error uploading file named `{}`: Response Status: {} Response Body: {}\",\n                                normalised_path,\n                                res.status(),\n                                res.text().await?\n                            );\n                        }\n                    } else {\n                        return Ok::<String, Box<dyn std::error::Error + Send + Sync>>(\n                            normalised_path,\n                        );\n                    }\n                }\n            })\n        })\n        .buffer_unordered(PARALLEL_REQUESTS);\n\n    bodies\n        .for_each(|b| async {\n            match b {\n                Ok(Ok(normalised_entry)) => {\n                    pb.println(format!(\"[+] uploaded {}\", normalised_entry));\n                    pb.inc(1);\n                }\n                Ok(Err(e)) => eprintln!(\"Got a reqwest::Error: {}\", e),\n                Err(e) => eprintln!(\"Got a tokio::JoinError: {}\", e),\n            }\n        })\n        .await;\n\n    pb.finish_with_message(\"done\");\n    Ok(())\n}\n\nasync fn local(sub_matches: &clap::ArgMatches) -> Result<(), Box<dyn std::error::Error>> {\n    let name = sub_matches\n        .get_one::<String>(\"name\")\n        .map(|s| s.as_str())\n        .expect(\"required in clap\");\n\n    let path = sub_matches\n        .get_one::<PathBuf>(\"path\")\n        .expect(\"required in clap\");\n\n    let toml_path = sub_matches\n        .get_one::<PathBuf>(\"toml\")\n        .expect(\"required in clap\");\n\n    let entries = WalkDir::new(path)\n        .follow_links(true)\n        .into_iter()\n        .filter_map(Result::ok)\n        .filter(|e| !e.file_type().is_dir())\n        .collect::<Vec<walkdir::DirEntry>>();\n\n    let mut toml = std::fs::read_to_string(toml_path)?.parse::<toml_edit::Document>()?;\n    let mut local_server = toml\n        .get_key_value(\"local_server\")\n        .map(|a| a.1.to_owned())\n        .unwrap_or_else(|| toml_edit::table());\n    let mut object_store = local_server\n        .as_table_mut()\n        .unwrap()\n        .get_key_value(&format!(\"object_store\"))\n        .map(|a| a.1.to_owned())\n        .unwrap_or_else(|| toml_edit::table());\n\n    let mut site = toml_edit::array();\n    for entry in entries {\n        let path = path.clone();\n        let entry_path = entry.path().to_string_lossy().to_string();\n        let extension = entry\n            .path()\n            .extension()\n            .map(|e| e.to_string_lossy().to_string())\n            .unwrap_or(\"\".to_string());\n        let normalised_entry = entry.path().strip_prefix(path).unwrap();\n        let normalised_path = \"/\".to_owned() + &normalised_entry.to_string_lossy();\n        let key = &normalised_path;\n        let metadata_key = normalised_path.to_owned() + \"__metadata__\";\n        let file_contents = tokio::fs::read(entry.path()).await?;\n        let file = File::open(entry.path()).await?;\n        let file_metadata = file.metadata().await?;\n        let sha = Sha256::digest(file_contents);\n        let sha = base64::encode(&sha);\n        let metadata = serde_json::to_string(&Metadata {\n            etag: format!(\"W/\\\"{}\\\"\", sha),\n            last_modified: fmt_http_date(file_metadata.modified()?),\n            content_type: lookup(&extension).map(|content_type| content_type.to_string()),\n        })?;\n        let mut entry = toml_edit::table();\n        entry\n            .as_table_mut()\n            .unwrap()\n            .insert(\"key\", toml_edit::value(metadata_key));\n        entry\n            .as_table_mut()\n            .unwrap()\n            .insert(\"data\", toml_edit::value(metadata.clone()));\n        site.as_array_of_tables_mut()\n            .unwrap()\n            .push(entry.as_table().unwrap().to_owned());\n        let mut entry = toml_edit::table();\n        entry\n            .as_table_mut()\n            .unwrap()\n            .insert(\"key\", toml_edit::value(key));\n        entry\n            .as_table_mut()\n            .unwrap()\n            .insert(\"path\", toml_edit::value(entry_path));\n        site.as_array_of_tables_mut()\n            .unwrap()\n            .push(entry.as_table().unwrap().to_owned());\n    }\n    object_store.as_table_mut().unwrap().insert(name, site);\n    local_server\n        .as_table_mut()\n        .unwrap()\n        .insert(&\"object_store\", object_store);\n    toml.as_table_mut().insert(\"local_server\", local_server);\n    std::fs::write(toml_path, toml.to_string())?;\n\n    Ok(())\n}\n\n#[tokio::main]\nasync fn main() -> Result<(), Box<dyn std::error::Error>> {\n    let matches = cli().get_matches();\n\n    match matches.subcommand() {\n        Some((\"link\", sub_matches)) => link(sub_matches).await,\n        Some((\"local\", sub_matches)) => local(sub_matches).await,\n        Some((\"upload\", sub_matches)) => upload(sub_matches).await,\n        _ => unreachable!(),\n    }\n}\n"
  },
  {
    "path": "documentation/.gitignore",
    "content": "# Dependencies\n/node_modules\n\n# Production\n/build\n\n# Generated files\n.docusaurus\n.cache-loader\n\n# Misc\n.DS_Store\n.env.local\n.env.development.local\n.env.test.local\n.env.production.local\n\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n"
  },
  {
    "path": "documentation/LICENSE.md",
    "content": "Creative Commons Attribution-ShareAlike 2.5\n\nCREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN \"AS-IS\" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE.\n\nLicense\n\nTHE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE (\"CCPL\" OR \"LICENSE\"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.\n\nBY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.\n\n    1. Definitions\n        a. \"Collective Work\" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License.\n        b. \"Derivative Work\" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image (\"synching\") will be considered a Derivative Work for the purpose of this License.\n        c. \"Licensor\" means the individual or entity that offers the Work under the terms of this License.\n        d. \"Original Author\" means the individual or entity who created the Work.\n        e. \"Work\" means the copyrightable work of authorship offered under the terms of this License.\n        f. \"You\" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation.\n        g. \"License Elements\" means the following high-level license attributes as selected by Licensor and indicated in the title of this License: Attribution, ShareAlike.\n    2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws.\n    3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below:\n        a. to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works;\n        b. to create and reproduce Derivative Works;\n        c. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works;\n        d. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works.\n        e. For the avoidance of doubt, where the work is a musical composition:\n            i. Performance Royalties Under Blanket Licenses. Licensor waives the exclusive right to collect, whether individually or via a performance rights society (e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital performance (e.g. webcast) of the Work.\n            ii. Mechanical Rights and Statutory Royalties. Licensor waives the exclusive right to collect, whether individually or via a music rights society or designated agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from the Work (\"cover version\") and distribute, subject to the compulsory license created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions).\n        f. Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound recording, Licensor waives the exclusive right to collect, whether individually or via a performance-rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions).\n\n    The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved.\n    4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions:\n        a. You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any credit as required by clause 4(c), as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the extent practicable, remove from the Derivative Work any credit as required by clause 4(c), as requested.\n        b. You may distribute, publicly display, publicly perform, or publicly digitally perform a Derivative Work only under the terms of this License, a later version of this License with the same License Elements as this License, or a Creative Commons iCommons license that contains the same License Elements as this License (e.g. Attribution-ShareAlike 2.5 Japan). You must include a copy of, or the Uniform Resource Identifier for, this License or other license specified in the previous sentence with every copy or phonorecord of each Derivative Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Derivative Works that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder, and You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Derivative Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Derivative Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Derivative Work itself to be made subject to the terms of this License.\n        c. If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works, You must keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or (ii) if the Original Author and/or Licensor designate another party or parties (e.g. a sponsor institute, publishing entity, journal) for attribution in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; the title of the Work if supplied; to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and in the case of a Derivative Work, a credit identifying the use of the Work in the Derivative Work (e.g., \"French translation of the Work by Original Author,\" or \"Screenplay based on original Work by Original Author\"). Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit.\n    5. Representations, Warranties and Disclaimer\n\n    UNLESS OTHERWISE AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE MATERIALS, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.\n    6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n    7. Termination\n        a. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Derivative Works or Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.\n        b. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above.\n    8. Miscellaneous\n        a. Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License.\n        b. Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License.\n        c. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.\n        d. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.\n        e. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You.\n\nCreative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor.\n\nExcept for the limited purpose of indicating to the public that the Work is licensed under the CCPL, neither party will use the trademark \"Creative Commons\" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time.\n\nCreative Commons may be contacted at http://creativecommons.org/."
  },
  {
    "path": "documentation/README.md",
    "content": "# [JS Compute Documentation](https://js-compute-reference-docs.edgecompute.app/)\n\nThis website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.\n\n### Installation\n\n```\n$ yarn\n```\n\n### Local Development\n\n```\n$ yarn start\n```\n\nThis command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.\n\n### Build\n\n```\n$ yarn build\n```\n\nThis command generates static content into the `build` directory and can be served using any static contents hosting service.\n\n### Deployment\n\n```\n$ yarn deploy\n```\n\nThis command will run `yarn build` and then will upload the website to Fastly KV Store and deploy the application to Fastly Compute.\n"
  },
  {
    "path": "documentation/app/.gitignore",
    "content": "# Dependencies\n/node_modules\n\n# Production\n/build\n\n# Generated files\n.docusaurus\n.cache-loader\n\n# Misc\n.DS_Store\n.env.local\n.env.development.local\n.env.test.local\n.env.production.local\n\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n/bin\n/pkg"
  },
  {
    "path": "documentation/app/c-at-e-file-server.js",
    "content": "import parseRange from 'range-parser'\nimport versionRedirects from './version-redirects.json'\n\n/**\n * Check if the request path is for an old minor version and should be redirected\n * to the latest minor version within the same major version.\n * @param {Request} request - The incoming request\n * @returns {Response | null} - Returns a redirect Response if applicable, else null\n */\nfunction redirectMinorVersions(request) {\n    const url = new URL(request.url);\n    const pathMatch = url.pathname.match(/^\\/docs\\/([^\\/]+)(\\/.*)?$/);\n    \n    if (!pathMatch) {\n        return null;\n    }\n    \n    const [, version, restOfPath = ''] = pathMatch;\n    \n    const majorVersion = version.split('.')[0];\n    const targetVersion = versionRedirects.latestByMajor[majorVersion];\n    \n    if (targetVersion === null || (targetVersion && targetVersion !== version)) {\n        // Construct the new URL with the latest version\n        const versionPrefix = targetVersion === null ? '' : `/${targetVersion}`;\n        const newPath = `/docs${versionPrefix}${restOfPath}`;\n        const newUrl = new URL(newPath, url.origin);\n        newUrl.search = url.search; // Preserve query parameters\n        \n        // Return a 301 permanent redirect\n        return new Response(null, {\n            status: 301,\n            headers: {\n                'Location': newUrl.toString(),\n                'Cache-Control': 'public, max-age=3600'\n            }\n        });\n    }\n    \n    return null;\n}\n\n/**\n * Attempt to locate the requested resource from a Fastly KV Store,\n * If the request is a GET or HEAD request and a resource was found in the KV Store, this will return a `Response`.\n * If request is not GET or HEAD, or no resource was found in the KV Store, this will return `null`\n * @param {string} store_name The name of the Fastly KV Store to search within.\n * @param {Request} request The request to attempt to match against a resource within the KV Store.\n * @returns {Promise<Response | null>} Returns a `Response` if a resource was found, else returns `null`.\n */\nexport async function get(store_name, request) {\n    const isHeadRequest = request.method === 'HEAD'\n    // static files should only respond on HEAD and GET requests\n    if (!isHeadRequest && request.method !== 'GET') {\n        return null\n    }\n\n    // Check if this request should be redirected to a newer minor version\n    const redirect = redirectMinorVersions(request);\n    if (redirect) {\n        return redirect;\n    }\n\n    // if path ends in / or does not have an extension\n    // then append /index.html to the end so we can serve a page\n    let path = new URL(request.url).pathname\n    if (path.endsWith('/')) {\n        path += 'index.html'\n    } else if (!path.includes('.')) {\n        path += '/index.html'\n    }\n\n    const metadataPath = path + '__metadata__'\n\n    let metadata = await (new KVStore(store_name)).get(metadataPath)\n    if (metadata == null) {\n        return null\n    }\n    metadata = await metadata.json();\n    const responseHeaders = metadata;\n    responseHeaders['accept-ranges'] = 'bytes'\n\n    const response = checkPreconditions(request, responseHeaders);\n    if (response) {\n        return response;\n    }\n    \n    const item = await (new KVStore(store_name)).get(path)\n    \n    if (item == null) {\n        return null\n    }\n    \n    let range = request.headers.get(\"range\");\n    if (range == null) {\n        return new Response(isHeadRequest ? null : item.body, { status: 200, headers: responseHeaders })\n    } else {\n        return handleRangeRequest(item, range, responseHeaders, isHeadRequest)\n    }\n}\n\nasync function handleRangeRequest(item, range, headers, isHeadRequest) {\n    /**\n     * @type {Uint8Array}\n     */\n    const itemBuffer = new Uint8Array(await item.arrayBuffer())\n    const total = itemBuffer.byteLength\n    const subranges = parseRange(total, range)\n\n    // -1 signals an unsatisfiable range\n    if (subranges == -1) {\n        headers['content-range'] = `bytes */${total}`\n        return new Response(null, { status: 416, headers })\n    }\n    // -2 signals a malformed header string\n    if (subranges == -2) {\n        headers['content-length'] = String(total)\n        return new Response(isHeadRequest ? null : itemBuffer, { status: 200, headers })\n    }\n\n    if (subranges.length == 1) {\n        const { start, end } = subranges[0]\n        headers['content-range'] = `bytes ${start}-${end}/${total}`\n        headers['content-length'] = String(end - start + 1)\n\n        return new Response(isHeadRequest ? null : itemBuffer.slice(start, end), { status: 206, headers })\n    } else {\n        const mime = headers['Content-Type']\n        headers['Content-Type'] = 'multipart/byteranges; boundary=3d6b6a416f9b5'\n        const enc = new TextEncoder();\n        const boundaryString = '--3d6b6a416f9b5';\n        const type = mime ? enc.encode(`Content-Type: ${mime}\\n`) : null\n        const results = []\n        let bufferLength = 0\n        let boundary = enc.encode(`\\n${boundaryString}\\n`)\n        subranges.forEach(function ({ start, end }) {\n            {\n                bufferLength += boundary.byteLength\n                results.push(boundary)\n            }\n            if (type) {\n                results.push(type)\n                bufferLength += type.byteLength\n            }\n            {\n                let content_range = enc.encode(`Content-Range: bytes ${start}-${end}/${total}\\n\\n`)\n                bufferLength += content_range.byteLength\n                results.push(content_range)\n            }\n            {\n                let content = itemBuffer.slice(start, end)\n                bufferLength += content.byteLength\n                results.push(content)\n            }\n        })\n        {\n            results.push(boundary)\n            bufferLength += boundary.byteLength\n        }\n        const body = concat(results, bufferLength)\n        const length = body.byteLength\n        headers['content-length'] = String(length)\n        return new Response(isHeadRequest ? null : body, { status: 206, headers })\n    }\n}\n\nfunction concat(views, length) {\n    console.log({length})\n    const buf = new Uint8Array(length)\n    let offset = 0\n    for (const v of views) {\n        const uint8view = new Uint8Array(v.buffer, v.byteOffset, v.byteLength)\n        buf.set(uint8view, offset)\n        offset += uint8view.byteLength\n    }\n\n    return buf\n}\n\nfunction checkPreconditions(request, responseHeaders) {\n    // https://httpwg.org/specs/rfc9110.html#rfc.section.13.2.2\n    // A recipient cache or origin server MUST evaluate the request preconditions defined by this specification in the following order:\n    // 1. When recipient is the origin server and If-Match is present, evaluate the If-Match precondition:\n    // - if true, continue to step 3\n    // - if false, respond 412 (Precondition Failed) unless it can be determined that the state-changing request has already succeeded (see Section 13.1.1)\n    let header = request.headers.get(\"if-match\");\n    if (typeof header === 'string') {\n        console.log(\"!ifMatch(responseHeaders, header)\", !ifMatch(responseHeaders, header));\n        if (!ifMatch(responseHeaders, header)) {\n            return new Response(null, { status: 412 });\n        }\n    // } else {\n    //     // 2. When recipient is the origin server, If-Match is not present, and If-Unmodified-Since is present, evaluate the If-Unmodified-Since precondition:\n    //     // - if true, continue to step 3\n    //     // - if false, respond 412 (Precondition Failed) unless it can be determined that the state-changing request has already succeeded (see Section 13.1.4)\n    //     header = request.headers.get(\"if-unmodified-since\");\n    //     if (typeof header === 'string') {\n    //         // console.log(\"!ifUnmodifiedSince(responseHeaders, header)\", !ifUnmodifiedSince(responseHeaders, header));\n    //         if (!ifUnmodifiedSince(responseHeaders, header)) {\n    //             return new Response(null, { status: 412 });\n    //         }\n    //     }\n    }\n\n    // 3. When If-None-Match is present, evaluate the If-None-Match precondition:\n    // - if true, continue to step 5\n    // - if false for GET/HEAD, respond 304 (Not Modified)\n    // - if false for other methods, respond 412 (Precondition Failed)\n    header = request.headers.get(\"if-none-match\");\n    const method = request.method;\n    const get = \"GET\";\n    const head = \"HEAD\";\n    if (typeof header === 'string') {\n        // console.log(\"!ifNoneMatch(responseHeaders, header)\", !ifNoneMatch(responseHeaders, header));\n        if (!ifNoneMatch(responseHeaders, header)) {\n            if (method === get || method === head) {\n                return new Response(null, { status: 304, headers: responseHeaders })\n            }\n            return new Response(null, { status: 412 });\n        }\n    } else {\n        // 4. When the method is GET or HEAD, If-None-Match is not present, and If-Modified-Since is present, evaluate the If-Modified-Since precondition:\n        // - if true, continue to step 5\n        // - if false, respond 304 (Not Modified)\n        if (method === get || method === head) {\n            header = request.headers.get(\"if-modified-since\");\n            if (typeof header === 'string') {\n                // console.log(\"!ifModifiedSince(responseHeaders, header)\", !ifModifiedSince(responseHeaders, header));\n                if (!ifModifiedSince(responseHeaders, header)) {\n                    return new Response(null, { status: 304, headers: responseHeaders })\n                }\n            }\n        }\n    }\n\n    // 5. When the method is GET and both Range and If-Range are present, evaluate the If-Range precondition:\n    // - if true and the Range is applicable to the selected representation, respond 206 (Partial Content)\n    // - otherwise, ignore the Range header field and respond 200 (OK)\n    if (method === get) {\n        if (request.headers.get(\"range\")) {\n            header = request.headers.get(\"if-range\");\n            if (typeof header === 'string') {\n                // console.log(\"!ifRange(responseHeaders, header)\", !ifRange(responseHeaders, header));\n                if (!ifRange(responseHeaders, header)) {\n                    // We delete the range headers so that the `get` function will return the full body\n                    request.headers.delete(\"range\")\n                }\n            }\n        }\n    }\n\n    // 6. Otherwise,\n    // - perform the requested method and respond according to its success or failure.\n    return null;\n}\n\nfunction isWeak(etag) {\n    return etag.startsWith(\"W/\\\"\");\n}\n\nfunction isStrong(etag) {\n    return etag.startsWith(\"\\\"\");\n}\n\nfunction opaqueTag(etag) {\n    if (isWeak(etag)) {\n        return etag.substring(2);\n    }\n    return etag;\n}\nfunction weakMatch(a, b) {\n    // https://httpwg.org/specs/rfc9110.html#entity.tag.comparison\n    // two entity tags are equivalent if their opaque-tags match character-by-character, regardless of either or both being tagged as \"weak\".\n    return opaqueTag(a) === opaqueTag(b);\n}\n\nfunction strongMatch(a, b) {\n    // https://httpwg.org/specs/rfc9110.html#entity.tag.comparison\n    // two entity tags are equivalent if both are not weak and their opaque-tags match character-by-character.\n    return isStrong(a) && isStrong(b) && a === b;\n}\n\nfunction splitList(value) {\n    return value.split(\",\").map(s => s.trim());\n}\n\n// https://httpwg.org/specs/rfc9110.html#field.if-match\nfunction ifMatch(validationFields, header) {\n    if (validationFields.ETag === undefined) {\n        return true;\n    }\n\n    // 1. If the field value is \"*\", the condition is true if the origin server has a current representation for the target resource.\n    if (header === \"*\") {\n        if (validationFields.ETag !== undefined) {\n            return true;\n        }\n    } else {\n        // 2. If the field value is a list of entity tags, the condition is true if any of the listed tags match the entity tag of the selected representation.\n        // An origin server MUST use the strong comparison function when comparing entity tags for If-Match (Section 8.8.3.2), \n        // since the client intends this precondition to prevent the method from being applied if there have been any changes to the representation data.\n        if (splitList(header).some(etag => {\n            console.log(`strongMatch(${etag}, ${validationFields.ETag}) -- ${strongMatch(etag, validationFields.ETag)}`);\n            return strongMatch(etag, validationFields.ETag)\n        })) {\n            return true;\n        }\n    }\n\n    // 3. Otherwise, the condition is false.\n    return false;\n}\n\n// https://httpwg.org/specs/rfc9110.html#field.if-none-match\nfunction ifNoneMatch(validationFields, header) {\n    // 1. If the field value is \"*\", the condition is false if the origin server has a current representation for the target resource.\n    if (header === \"*\") {\n        if (validationFields.ETag !== undefined) {\n            return false;\n        }\n    } else {\n        // 2. If the field value is a list of entity tags, the condition is false if one of the listed tags matches the entity tag of the selected representation.\n        // A recipient MUST use the weak comparison function when comparing entity tags for If-None-Match (Section 8.8.3.2), since weak entity tags can be used for cache validation even if there have been changes to the representation data.\n        if (splitList(header).some(etag => weakMatch(etag, validationFields.ETag))) {\n            return false;\n        }\n    }\n\n    // 3. Otherwise, the condition is true.\n    return true;\n}\n\n// https://httpwg.org/specs/rfc9110.html#field.if-modified-since\nfunction ifModifiedSince(validationFields, header) {\n    // A recipient MUST ignore the If-Modified-Since header field if the received field value is not a valid HTTP-date, the field value has more than one member, or if the request method is neither GET nor HEAD.\n    const date = new Date(header);\n    if (isNaN(date)) {\n        return true;\n    }\n\n    // 1. If the selected representation's last modification date is earlier or equal to the date provided in the field value, the condition is false.\n    if (new Date(validationFields[\"Last-Modified\"]) <= date) {\n        return false;\n    }\n    // 2. Otherwise, the condition is true.\n    return true;\n}\n\n// https://httpwg.org/specs/rfc9110.html#field.if-unmodified-since\n// function ifUnmodifiedSince(req, validationFields, header) {\n//     // A recipient MUST ignore the If-Unmodified-Since header field if the received field value is not a valid HTTP-date (including when the field value appears to be a list of dates).\n//     const date = new Date(header);\n//     if (isNaN(date)) {\n//         return true;\n//     }\n\n//     // 1. If the selected representation's last modification date is earlier than or equal to the date provided in the field value, the condition is true.\n//     if (new Date(validationFields[\"Last-Modified\"]) <= date) {\n//         return true;\n//     }\n//     // 2. Otherwise, the condition is false.\n//     return false;\n// }\n\n// https://httpwg.org/specs/rfc9110.html#field.if-range\nfunction ifRange(validationFields, header) {\n    const date = new Date(header);\n    console.log(new Date(validationFields[\"Last-Modified\"]), date);\n    console.log(new Date(validationFields[\"Last-Modified\"]).getTime() === date.getTime());\n    if (!isNaN(date)) {\n        // To evaluate a received If-Range header field containing an HTTP-date:\n        // 1. If the HTTP-date validator provided is not a strong validator in the sense defined by Section 8.8.2.2, the condition is false.\n        // 2. If the HTTP-date validator provided exactly matches the Last-Modified field value for the selected representation, the condition is true.\n        if (new Date(validationFields[\"Last-Modified\"]).getTime() === date.getTime()) {\n            return true;\n        }\n        // 3. Otherwise, the condition is false.\n        return false;\n    } else {\n        // To evaluate a received If-Range header field containing an entity-tag:\n        // 1. If the entity-tag validator provided exactly matches the ETag field value for the selected representation using the strong comparison function (Section 8.8.3.2), the condition is true.\n        if (strongMatch(header, validationFields.ETag)) {\n            return true;\n        }\n        // 2. Otherwise, the condition is false.\n        return false;\n    }\n}\n"
  },
  {
    "path": "documentation/app/fastly.toml",
    "content": "# This file describes a Fastly Compute package. To learn more visit:\n# https://developer.fastly.com/reference/fastly-toml/\n\nauthors = [\"jchampion@fastly.com\"]\ndescription = \"\"\nlanguage = \"javascript\"\nmanifest_version = 2\nname = \"js-compute-reference-docs\"\nservice_id = \"1B3wrEgiLdTaCjsmK5Jq25\"\n\n[scripts]\n  build = \"yarn build\"\n\n[local_server]\n\n[local_server.object_store]\n\n"
  },
  {
    "path": "documentation/app/package.json",
    "content": "{\n  \"license\": \"MIT\",\n  \"devDependencies\": {\n    \"@fastly/js-compute\": \"^3\",\n    \"range-parser\": \"^1.2.1\"\n  },\n  \"type\": \"module\",\n  \"scripts\": {\n    \"build\": \"npm run build:app && npm run build:files\",\n    \"build:app\": \"js-compute-runtime src/index.js\",\n    \"build:files\": \"compute-file-server-cli local --toml fastly.toml --name site -- ../build/\",\n    \"deploy\": \"npm run deploy:app && npm run deploy:files\",\n    \"deploy:app\": \"fastly compute publish\",\n    \"deploy:files\": \"compute-file-server-cli upload --name 'js-docs-site' -- ../build/\",\n    \"start\": \"fastly compute serve\"\n  }\n}\n"
  },
  {
    "path": "documentation/app/src/index.js",
    "content": "/// <reference types=\"@fastly/js-compute\" />\n/* eslint-env serviceworker */\n\nimport { get } from \"../c-at-e-file-server.js\";\nimport { env } from \"fastly:env\";\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)));\n\nasync function app(event) {\n    try {\n        console.log(`FASTLY_SERVICE_VERSION: ${env('FASTLY_SERVICE_VERSION')}`)\n        const response = await get('site', event.request)\n        if (response) {\n            response.headers.set(\"x-compress-hint\", \"on\");\n            return response\n        } else {\n            return new Response(\"Not Found\", { status: 404 });\n        }\n    } catch (error) {\n        console.error(error);\n        return new Response(error.message + '\\n' + error.stack, { status: 500 })\n    }\n}\n"
  },
  {
    "path": "documentation/app/version-redirects.json",
    "content": "{\n  \"latestByMajor\": {\n    \"1\": \"1.13.0\",\n    \"2\": \"2.5.0\",\n    \"3\": null\n  }\n}"
  },
  {
    "path": "documentation/docs/acl/Acl/open.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Acl.open()\n\nOpens the ACL with the given name, returning a new `Acl` instance with the given name on success.\n\n## Syntax\n\n```js\nAcl.open(name)\n```\n\n### Return value\n\nAn `Acl` instance.\n"
  },
  {
    "path": "documentation/docs/acl/Acl/prototype/lookup.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Acl.prototype.lookup()\n\nThe **`lookup(ipAddress)`** method returns the name associated with the `Acl` instance.\n\n## Syntax\n\n```js\nacl.lookup(ipAddress)\n```\n\n### Parameters\n\n- `ipAddress` _: string_\n  - IPv4 or IPv6 address to lookup\n\n### Return value\n\nAn Object of the form `{ action: 'ALLOW' | 'BlOCK', prefix: string }`, where `prefix` is the IP\naddress prefix that was matched in the ACL.\n\n## Example\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Acl } from 'fastly:acl';\naddEventListener('fetch', async (evt) => {\n  const myAcl = Acl.open('myacl');\n  const match = await myAcl.lookup(evt.client.address);\n  evt.respondWith(new Response(match?.action === 'BLOCK' ? 'blocked' : 'allowed'));\n});\n```\n"
  },
  {
    "path": "documentation/docs/backend/Backend/Backend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Backend()`\n\nThe **`Backend` constructor** lets you dynamically create new [Fastly Backends](https://developer.fastly.com/reference/api/services/backend/) for your Fastly Compute service.\n\n>**Note**: Dynamic backends are by default disabled at the Fastly service level. Contact [Fastly Support](https://support.fastly.com/hc/en-us/requests/new?ticket_form_id=360000269711) to request dynamic backends on Fastly Services.\n\nTo disable the usage of dynamic backends, see [enforceExplicitBackends](../enforceExplicitBackends.mdx).\n\n## Syntax\n\n```js\nnew Backend(backendConfiguration)\n```\n\n> **Note:** `Backend()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `backendConfiguration`\n\n  - : An Object which contains all the configuration options to apply to the newly created Backend.\n\n    - `name` _: string_\n      - The name of the backend.\n      - The name has to be between 1 and 254 characters inclusive.\n      - The name can be whatever you would like, as long as it does not match the name of any of the static service backends nor match any other dynamic backends built during a single execution of the application.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n    - `target` _: string_\n      - A hostname, IPv4, or IPv6 address for the backend as well as an optional port.\n      - The target has to be at-least 1 character.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. Is null, undefined, an empty string, not a valid IP address or host, or is the string `::`\n    - `hostOverride` _: string_ _**optional**_\n      - If set, will force the HTTP Host header on connections to this backend to be the supplied value.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `connectTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for a connection to this backend to be established.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `firstByteTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `betweenBytesTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend.\n      - If exceeded, the response received so far will be considered complete and the fetch will end.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `useSSL` _: boolean_ _**optional**_\n      - Whether or not to require TLS for connections to this backend.\n    - `dontPool` _: boolean_ _**optional**_\n      - Determine whether or not connections to the same backend should be pooled across different sessions.\n      - Fastly considers two backends “the same” if they're registered with the same name and the exact same settings.\n      - In those cases, when pooling is enabled, if Session 1 opens a connection to this backend it will be left open, and can be re-used by Session 2.\n      - This can help improve backend latency, by removing the need for the initial network / TLS handshake(s).\n      - By default, pooling is enabled for dynamic backends.\n    - `tlsMinVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Minimum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `tlsMaxVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Maximum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `certificateHostname` _: string_ _**optional**_\n      - Define the hostname that the server certificate should declare.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `caCertificate` _: string_ _**optional**_\n      - The CA certificate to use when checking the validity of the backend.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `ciphers` _: string_ _**optional**_\n      - List of OpenSSL ciphers to support for connections to this origin.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - [List of ciphers supported by Fastly](https://developer.fastly.com/learning/concepts/routing-traffic-to-fastly/#use-a-tls-configuration).\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `sniHostname` _: string_ _**optional**_\n      - The SNI hostname to use on connections to this backend.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `clientCertificate` _: object_ _**optional**_\n      - The client certificate to provide for the TLS handshake\n      - `certificate` _: string_\n        - The PEM certificate string.\n      - `key` _: SecretStoreEntry_\n        - The `SecretStoreEntry` to use for the key, created via [`SecretStore.prototype.get`](../../fastly:secret-store/SecretStore/prototype/get.mdx) or alteratively via [`SecretStore.fromBytes`](../../fastly:secret-store/SecretStore/fromBytes.mdx).\n    - `httpKeepalive` _: number_ _**optional**_\n      - Enable HTTP keepalive, setting the timout in milliseconds.\n    - `tcpKeepalive` _: boolean | object_ _**optional**_\n      - Enable TCP keepalive. When an object, optionally setting the keepalive configuration options.\n      - `timeSecs` _: number_ _**optional**_\n        - Configure how long to wait after the last sent data over the TCP connection before starting to send TCP keepalive probes.\n      - `intervalSecs` _: number_ _**optional**_\n        - Configure how long to wait between each TCP keepalive probe sent to the backend to determine if it is still active.\n      - `probes` _: number_ _**optional**_\n        - Number of probes to send to the backend before it is considered dead.\n    - `grpc` _: boolean_ _**optional**_\n      - **_Experimental feature_**\n      - When enabled, sets that this backend is to be used for gRPC traffic. \n      - _Warning: When using this experimental feature, no guarantees are provided for behaviours for backends that do not provide gRPC traffic._\n\nAll optional generic options can have their defaults set via [`setDefaultDynamicBackendConfig()`](../setDefaultDynamicBackendConfig.mdx).\n\nThis includes all configuration options above except for `name`, `target`, `hostOverride`, `sniHostname` and `grpc`.\n\n### Return value\n\nA new `Backend` object.\n\n## Examples\n\nIn this example an explicit Dynamic Backend is created and supplied to the fetch request, the response is then returned to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Explicit Dynamic Backend Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\",\n    connectTimeout: 1000,\n    firstByteTimeout: 15000,\n    betweenBytesTimeout: 10000,\n    useSSL: true,\n    tlsMinVersion: 1.3,\n    tlsMaxVersion: 1.3,\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\",\n    connectTimeout: 1000,\n    firstByteTimeout: 15000,\n    betweenBytesTimeout: 10000,\n    useSSL: true,\n    tlsMinVersion: 1.3,\n    tlsMaxVersion: 1.3,\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>\n"
  },
  {
    "path": "documentation/docs/backend/Backend/exists.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.exists()\n\nThe **`Backend.exists()`** method returns a boolean indicating if a Backend with the given name exists or not.\n\n## Syntax\n\n```js\nexists(name)\n```\n\n### Return value\n\nA boolean indicating if a Backend with the given name exists or not.\n"
  },
  {
    "path": "documentation/docs/backend/Backend/fromName.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.fromName()\n\nReturns the `Backend` instance with the given name, if one exists. If one does not exist, an error is thrown.\n\n## Syntax\n\n```js\nfromName(name)\n```\n\n### Return value\n\nA `Backend` instance.\n"
  },
  {
    "path": "documentation/docs/backend/Backend/health.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.health()\n\n:::info\n\nThis method is deprecated, use [`Backend.prototype.health`](./prototype/health.mdx) instead.\n\n:::\n\nThe **`Backend.health()`** method returns a string representing the health of the given Backend instance.\n\n## Syntax\n\n```js\nBackend.health(backend)\n```\n\n### Return value\n\nA string representing the health of the specified Backend value.\n\nPossible values are:\n- `\"healthy\"` - The backend's health check has succeeded, indicating the backend is working as expected and should receive requests.\n- `\"unhealthy\"` - The backend's health check has failed, indicating the backend is not working as expected and should not receive requests.\n- `\"unknown\"` - The backend does not have a health check configured.\n"
  },
  {
    "path": "documentation/docs/backend/Backend/prototype/betweenBytesTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.betweenBytesTimeout\n\nThe read-only **`betweenBytesTimeout`** property of a `Backend` instance is an integer number\nproviding the between bytes timeout for this backend in milliseconds.\n\nWhen not set or in environments that do not support this property (such as Viceroy), `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/docs/backend/Backend/prototype/connectTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.connectTimeout\n\nThe read-only **`connectTimeout`** property of a `Backend` instance is an integer number\nproviding the connect timeout for this backend in milliseconds.\n\nWhen not set or in environments that do not support this property (such as Viceroy), `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/docs/backend/Backend/prototype/firstByteTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.firstByteTimeout\n\nThe read-only **`firstByteTimeout`** property of a `Backend` instance is an integer number\nproviding the first byte timeout for this backend in milliseconds.\n\nWhen not set or in environments that do not support this property (such as Viceroy), `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/docs/backend/Backend/prototype/health.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.prototype.health()\n\nThe **`Backend.prototype.health()`** method returns a string representing the health of the given Backend instance.\n\n## Syntax\n\n```js\nhealth()\n```\n\n### Return value\n\nA string representing the health of the specified Backend value.\n\nPossible values are:\n- `\"healthy\"` - The backend's health check has succeeded, indicating the backend is working as expected and should receive requests.\n- `\"unhealthy\"` - The backend's health check has failed, indicating the backend is not working as expected and should not receive requests.\n- `\"unknown\"` - The backend does not have a health check configured.\n"
  },
  {
    "path": "documentation/docs/backend/Backend/prototype/hostOverride.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.hostOverride\n\nThe read-only **`hostOverride`** property of a `Backend` instance is the host header\noverride string used when sending requests to this backend.\n\n## Value\n\nA `string`.\n"
  },
  {
    "path": "documentation/docs/backend/Backend/prototype/httpKeepaliveTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.httpKeepaliveTime\n\nThe read-only **`httpKeepaliveTime`** property of a `Backend` instance is the HTTP keepalive\ntime for this backend in milliseconds, or 0 if no keepalive is set.\n\n## Value\n\nA `number`.\n"
  },
  {
    "path": "documentation/docs/backend/Backend/prototype/isDynamic.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.isDynamic\n\nThe read-only **`isDynamic`** property of a `Backend` instance is a boolean\nindicating if the backend was dynamically created for this service.\n\n## Value\n\nA `boolean`.\n"
  },
  {
    "path": "documentation/docs/backend/Backend/prototype/isSSL.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.isSSL\n\nThe read-only **`isSSL`** property of a `Backend` instance is a boolean\nindicating if the backend is using an SSL connection.\n\n## Value\n\nA `boolean`.\n"
  },
  {
    "path": "documentation/docs/backend/Backend/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# name\n\nThe read-only **`name`** property of the backend returns the backend name string.\n\n## Value\n\nA `string`.\n\n## Description\n\nProvides the name of the backend.\n\n## Examples\n\n### Using name\n\nThe following example logs the string value of a [Backend](../Backend.mdx) object:\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Backend.prototype.name Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\\\"@fastly/js-compute\\\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.name); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.name); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/docs/backend/Backend/prototype/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.port\n\nThe read-only **`port`** property of a `Backend` instance is the port number\nof this backend.\n\n## Value\n\nA `number`.\n"
  },
  {
    "path": "documentation/docs/backend/Backend/prototype/target.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.target\n\nThe read-only **`target`** property of a `Backend` instance is the host string\nthis backend is configured to use.\n\n## Value\n\nA `string`.\n"
  },
  {
    "path": "documentation/docs/backend/Backend/prototype/tcpKeepalive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.tcpKeepalive\n\nThe read-only **`tcpKeepalive`** property of a `Backend` instance returns an object providing\nthe TCP keepalive configuration, if any, otherwise returning `null` if TCP keepalive is not enabled.\n\nThis object has the following properties:\n- `timeSecs` _: number or null._\n  - Configure how long to wait after the last sent data over the TCP connection before starting to send TCP keepalive probes.\n- `intervalSecs` _: number or null._\n  - Configure how long to wait between each TCP keepalive probe sent to the backend to determine if it is still active.\n- `probes` _: number or null._\n  - Number of probes to send to the backend before it is considered dead.\n\n## Value\n\nA `Object` or `null`.\n"
  },
  {
    "path": "documentation/docs/backend/Backend/prototype/tlsMaxVersion.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.tlsMaxVersion\n\nThe read-only **`tlsMaxVersion`** property of a `Backend` instance is the max TLS version\nit is configured to use, as a number, either `1.0`, `1.1`, `1.2`, or `1.3`.\n\nWhen not used, or for environments that do not support this feature, such as Viceroy, `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/docs/backend/Backend/prototype/tlsMinVersion.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.tlsMinVersion\n\nThe read-only **`tlsMinVersion`** property of a `Backend` instance is the max TLS version\nit is configured to use, as a number, either `1.0`, `1.1`, `1.2`, or `1.3`.\n\nWhen not used, or for environments that do not support this feature, such as Viceroy, `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/docs/backend/Backend/prototype/toName.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.prototype.toName()\n\n:::info\n\nThis method is deprecated, use [`Backend.prototype.name`](./name.mdx) instead.\n\n:::\n\nThe **`toName()`** method returns the name associated with the `Backend` instance.\n\n## Syntax\n\n```js\ntoName()\n```\n\n### Return value\n\nA string which contains the name of the Backend.\n"
  },
  {
    "path": "documentation/docs/backend/Backend/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# toString\n\n:::info\n\nThis method is deprecated, use [`Backend.prototype.name`](./name.mdx) instead.\n\n:::\n\nThe **`toString()`** method returns a string representing the specified Backend value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified Backend value.\n\n## Description\n\nThe [Backend](../Backend.mdx) object overrides the `toString()` method of [Object](../../../globals//Object/Object.mdx); it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For [Backend](../Backend.mdx) values, the `toString` method returns the name given to the [Backend](../Backend.mdx) object during construction.\n\nThe `toString()` method requires its `this` value to be a [Backend](../Backend.mdx) object.\n\nIf the `this` value does not inherit from `Backend.prototype`, a [TypeError](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n## Examples\n\n### Using toString()\n\nThe following example logs the string value of a [Backend](../Backend.mdx) object:\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Backend.prototype.toString Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\\\"@fastly/js-compute\\\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.toString()); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.toString()); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/docs/backend/allowDynamicBackends.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# allowDynamicBackends\n\n:::info\n\nThis method is deprecated, and dynamic backends are now always supported when enabled at the service level. See [`enforceExplicitBackends`](./enforceExplicitBackends.mdx) instead.\n\n:::\n\nThe **`allowDynamicBackends()`** function is used to control whether or not Dynamic Backends should be allowed within this Fastly Compute Service.\n\nBy default, Dynamic Backends are enabled, but can be a potential security concern since third-party JavaScript code may send arbitrary requests, potentially including sensitive/secret data, off to destinations that the JavaScript project was not intending.\n\nUsing `allowDynamicBackends(false)` this security property can be restored to only use explicit backend definitions.\n\n>**Note**: By default, while dynamic backends are allowed in the SDK, they are by default disabled at the Fastly service level.\n\n## Syntax\n\n```js\nallowDynamicBackends(enabledOrConfig)\n```\n\n### Parameters\n\n- `enabled` _: boolean_\n  - Whether or not to allow Dynamic Backends\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/docs/backend/enforceExplicitBackends.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# enforceExplicitBackends\n\nCall this function to enforce the security property of explicitly-defined backends, even when dynamic backends are enabled at\nthe Fastly service level.\n\nBy default, if dynamic backends are supported for the Fastly service, they will be automatically used when creating a new\n`fetch()` request. This default behaviour for dynamic backends can be a potential security concern since third-party JavaScript\ncode may send arbitrary requests, including sensitive/secret data, off to destinations that the JavaScript project was not\nintending.\n\nWhen calling this function, an optional default backend name can be provided.\n\n>**Note**: This is a separate option to the service-level dynamic backend support for Fastly services, which is by deault disabled for Fastly services.\n\nThe **`enforceExplicitBackends()`** function is used to control whether or not Dynamic Backends should be allowed within this Fastly Compute Service.\n\nBy default, Dynamic Backends are enabled, but can be a potential security concern since third-party JavaScript code may send arbitrary requests, potentially including sensitive/secret data, off to destinations that the JavaScript project was not intending.\n\nUsing `allowDynamicBackends(false)` this security property can be restored to only use explicit backend definitions.\n\n>**Note**: Dynamic Backends are disabled by default for Fastly Services. Please contact [Fastly Support](https://support.fastly.com/hc/requests/new?ticket_form_id=360000269711) to request the feature be enabled or disabled on Fastly Services.\n\n## Syntax\n\n```js\nenforceExplicitBackends(defaultBackend?)\n```\n\n### Parameters\n\n- `defaultBackend` _: string_ _**optional**_\n  - An optional default backend string name to use in `fetch()` requests.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/docs/backend/setDefaultDynamicBackendConfig.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# setDefaultDynamicBackendConfig()\n\nThe **`setDefaultDynamicBackendConfig()`** allows setting backend configuration defaults that should apply to any newly created dynamic backends via the `new Backend()` constructor.\n\n### Parameters\n\n- `defaultDynamicBackendConfig`\n\n  - : An Object which contains the generic configuration options to apply to newly created Backends.\n    - `connectTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for a connection to this backend to be established.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `firstByteTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `betweenBytesTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend.\n      - If exceeded, the response received so far will be considered complete and the fetch will end.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `useSSL` _: boolean_ _**optional**_\n      - Whether or not to require TLS for connections to this backend.\n    - `dontPool` _: boolean_ _**optional**_\n      - Determine whether or not connections to the same backend should be pooled across different sessions.\n      - Fastly considers two backends “the same” if they're registered with the same name and the exact same settings.\n      - In those cases, when pooling is enabled, if Session 1 opens a connection to this backend it will be left open, and can be re-used by Session 2.\n      - This can help improve backend latency, by removing the need for the initial network / TLS handshake(s).\n      - By default, pooling is enabled for dynamic backends.\n    - `tlsMinVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Minimum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `tlsMaxVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Maximum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `certificateHostname` _: string_ _**optional**_\n      - Define the hostname that the server certificate should declare.\n      - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `caCertificate` _: string_ _**optional**_\n      - The CA certificate to use when checking the validity of the backend.\n      - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `ciphers` _: string_ _**optional**_\n      - List of OpenSSL ciphers to support for connections to this origin.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - [List of ciphers supported by Fastly](https://developer.fastly.com/learning/concepts/routing-traffic-to-fastly/#use-a-tls-configuration).\n      - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `clientCertificate` _: object_ _**optional**_\n      - The client certificate to provide for the TLS handshake\n      - `certificate` _: string_\n        - The PEM certificate string.\n      - `key` _: SecretStoreEntry_\n        - The `SecretStoreEntry` to use for the key, created via [`SecretStore.prototype.get`](../fastly:secret-store/SecretStore/prototype/get.mdx) or alteratively via [`SecretStore.fromBytes`](../fastly:secret-store/SecretStore/fromBytes.mdx).\n    - `httpKeepalive` _: number_ _**optional**_\n      - Enable HTTP keepalive, setting the timout in milliseconds.\n    - `tcpKeepalive` _: boolean | object_ _**optional**_\n      - Enable TCP keepalive. When an object, optionally setting the keepalive configuration options.\n      - `timeSecs` _: number_ _**optional**_\n        - Configure how long to wait after the last sent data over the TCP connection before starting to send TCP keepalive probes.\n      - `intervalSecs` _: number_ _**optional**_\n        - Configure how long to wait between each TCP keepalive probe sent to the backend to determine if it is still active.\n      - `probes` _: number_ _**optional**_\n        - Number of probes to send to the backend before it is considered dead.\n\n## Syntax\n\n```js\nsetDefaultDynamicBackendConfig(defaultConfig)\n```\n\n### Return value\n\nNone.\n\n## Examples\n\nIn this example an explicit Dynamic Backend is created and supplied to the fetch request, with timeouts and TLS options provided from the default backend configuration options.\n\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Explicit Dynamic Backend Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nimport { Backend, setDefaultDynamicBackendConfig } from \"fastly:backend\";\nallowDynamicBackends(true);\nsetDefaultDynamicBackendConfig({\n  connectTimeout: 1000,\n  firstByteTimeout: 15_000,\n  betweenBytesTimeout: 10_000,\n  useSSL: true,\n  sslMinVersion: 1.3,\n  sslMaxVersion: 1.3\n});\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  // Timeouts and TLS configuration still get set from the default backend configuration above.\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\"\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nimport { Backend } from \"fastly:backend\";\nallowDynamicBackends(true);\nsetDefaultDynamicBackendConfig({\n  connectTimeout: 1000,\n  firstByteTimeout: 15_000,\n  betweenBytesTimeout: 10_000,\n  useSSL: true,\n  sslMinVersion: 1.3,\n  sslMaxVersion: 1.3\n});\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\"\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>\n"
  },
  {
    "path": "documentation/docs/cache/CacheEntry/age.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.age\n\nThe **`age`** method of the `CacheEntry` interface returns the current age in milliseconds of the cached item.\n\n## Syntax\n\n```js\nage()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the current age in milliseconds of the cached item."
  },
  {
    "path": "documentation/docs/cache/CacheEntry/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.body\n\nThe **`body`** method of the `CacheEntry` interface retrieves the cached item contents as a `ReadableStream`.\n\nOnly one stream can be active at a time for a given `CacheEntry`. An error will be thrown if a stream is already active for this `CacheEntry`.\n\n## Syntax\n\n```js\nbody(options)\n```\n\n### Parameters\n\n- `options` _: object_ __optional__\n  - `start` _: number_\n    - The offset from which to start the range.\n  - `end` _: number_\n    - How long the range should be.\n\n### Return value\n\nA `ReadableStream` which contains the cached item contents."
  },
  {
    "path": "documentation/docs/cache/CacheEntry/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.close\n\nThe **`close`** method of the `CacheEntry` interface closes the connection to the cache for this `CacheEntry`.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/docs/cache/CacheEntry/hits.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.hits\n\nThe **`hits`** method of the `CacheEntry` interface returns the amount of cache hits for the cached item.\n\nNote: this hit count only reflects the view of the server that supplied the cached item. Due to clustering, this count may vary between potentially many servers within the data center where the item is cached. See the [clustering documentation](https://developer.fastly.com/learning/vcl/clustering/) for details, though note that the exact caching architecture of Compute is different from VCL services.\n\n## Syntax\n\n```js\nhits()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the number of cache hits to this cached item.\n"
  },
  {
    "path": "documentation/docs/cache/CacheEntry/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.length\n\nThe **`length`** method of the `CacheEntry` interface returns the size in bytes of the cached item, if known, otherwise returns `null` if the length is currently unknown.\n\nThe length of the cached item may be unknown if the item is currently being streamed into the cache without a fixed length.\n\n## Syntax\n\n```js\nlength()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` or `null` which represents the current length of the cached item.\n\n`null` is returned if the length is currently unknown."
  },
  {
    "path": "documentation/docs/cache/CacheEntry/maxAge.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.maxAge\n\nThe **`maxAge`** method of the `CacheEntry` interface returns the time in milliseconds for which the cached item is considered fresh.\n\n## Syntax\n\n```js\nmaxAge()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the time in milliseconds for which the cached item is considered fresh."
  },
  {
    "path": "documentation/docs/cache/CacheEntry/staleWhileRevalidate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.staleWhileRevalidate\n\nThe **`staleWhileRevalidate`** method of the `CacheEntry` interface returns the time in milliseconds for which a cached item can safely be used despite being considered stale.\n\n## Syntax\n\n```js\nstaleWhileRevalidate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the time in milliseconds for which a cached item can safely be used despite being considered stale."
  },
  {
    "path": "documentation/docs/cache/CacheEntry/state.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.state\n\nThe **`state`** method of the `CacheEntry` interface returns a `CacheState` instance which reflects the current state of this `CacheEntry` instance.\n\n## Syntax\n\n```js\nstate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `CacheState` instance which reflects the current state of this `CacheEntry` instance."
  },
  {
    "path": "documentation/docs/cache/CacheEntry/userMetadata.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.userMetadata\n\nThe **`userMetadata`** method of the `CacheEntry` interface returns the user-controlled metadata associated with the cached item.\n\n## Syntax\n\n```js\nuserMetadata()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nAn `ArrayBuffer` which contains the user-controlled metadata associated with the cached item."
  },
  {
    "path": "documentation/docs/cache/CacheState/found.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheState.found\n\nThe **`found`** method of the `CacheState` interface returns `true` if a cached item was located.\n\nEven if an cached item is found, the cached item might be stale and require updating. Use `mustInsertOrUpdate()` to determine whether this transaction client is expected to update the cached item.\n\n## Syntax\n\n```js\nfound()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `boolean` which represents whether a cached item was located or not.\n"
  },
  {
    "path": "documentation/docs/cache/CacheState/mustInsertOrUpdate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheState.mustInsertOrUpdate\n\nThe **`mustInsertOrUpdate`** method of the `CacheState` interface returns `true` if a fresh cache item was not found, and this transaction client is expected to insert a new item or update a stale item.\n\n\n## Syntax\n\n```js\nmustInsertOrUpdate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `boolean` which represents whether a fresh cached item was found not.\n"
  },
  {
    "path": "documentation/docs/cache/CacheState/stale.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheState.stale\n\nThe **`stale`** method of the `CacheState` interface returns `true` if the cached item is stale.\n\nA cached item is stale if its age is greater than its `maxAge` period.\n\n## Syntax\n\n```js\nstale()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `boolean` which represents whether the cached item is stale or not.\n"
  },
  {
    "path": "documentation/docs/cache/CacheState/usable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheState.usable\n\nThe **`usable`** method of the `CacheState` interface returns `true` if the cached item is usable.\n\nA cached item is usable if its age is less than the sum of the `maxAge` and `staleWhileRevalidate` periods.\n\n## Syntax\n\n```js\nusable()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `boolean` which represents whether a cached item is usable or not.\n"
  },
  {
    "path": "documentation/docs/cache/CoreCache/insert.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CoreCache.insert\n\nPerforms a non-transactional insertion into the cache, returning a `FastlyBody` instance for providing the cached object itself.\nFor the insertion to complete successfully, the object must be written into the returned `FastlyBody` instance, and then `FastlyBody.protoype.close` must be called.\nIf `FastlyBody.prototype.close` does not get called, the insertion is considered incomplete, and any concurrent lookups that may be reading from the object as it is streamed into the cache may encounter a streaming error.\n\nNote: Like `CoreCache.lookup()`, `CoreCache.insert()` may race with concurrent lookups or insertions, and will unconditionally overwrite existing cached items rather than allowing for revalidation of an existing object.\nThe transactional equivalent of this function is `TransactionCacheEntry.insert()`, which may only be called following a `CoreCache.transactionLookup()` call and the returned `CacheEntry` when has a state where `CacheState.mustInsertOrUpdate()` returns true.\n\n## Syntax\n\n```js\ninsert(key, options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - A cache key which is a string with a length of up to 8,135 that identify a cached item.\n  - The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n- `options` _: object_\n  - `headers` _: HeadersInit_ __optional__\n    - The headers act as additional factors in object selection, and the choice of which headers to factor in is determined during insertion, via the `vary` property within `TransactionInsertOptions`.\n    - A lookup will succeed when there is at least one cached item that matches lookup’s `key`, and all of the lookup’s headers included in the cache items’ `vary` list match the corresponding headers in that cached item.\n    - A typical example is a cached HTTP response, where the request had an \"Accept-Encoding\" header. In that case, the origin server may or may not decide on a given encoding, and whether that same response is suitable for a request with a different (or missing) Accept-Encoding header is determined by whether Accept-Encoding is listed in Vary header in the origin’s response.\n    - Note: These headers are narrowly useful for implementing cache lookups incorporating the semantics of the HTTP Vary header.\n  - `maxAge` _: number_ __optional__\n    - Sets the “time to live” for the cache item in milliseconds: The time for which the item will be considered fresh.\n  - `vary` _: array_ __optional__\n    - Sets the list of headers that must match when looking up this cached item.\n  - `initialAge` _: number_ __optional__\n    - Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n    - The initial age is 0 by default.\n  - `staleWhileRevalidate` _: number_ __optional__\n    - Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n    - Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n    - The methods `CacheState.protoype.usable` and `CacheState.protoype.stale` can be used to determine the current state of an item.\n    - The stale-while-revalidate period is 0 by default.\n  - `surrogateKeys` _: array_ __optional__\n    - Sets the surrogate keys that can be used for purging this cached item.\n    - Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item’s TTL to elapse, or overwriting the item with insert().\n    - Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n    - [See the Fastly surrogate keys guide for details.](https://docs.fastly.com/en/guides/working-with-surrogate-keys)\n  - `length` _: number_ __optional__\n    - Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n    - It is preferable to provide a length, if possible.\n    - Clients that begin streaming the item’s contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n  - `userMetadata` _: ArrayBufferView | ArrayBuffer | URLSearchParams | string_ __optional__\n    - Sets the user-defined metadata to associate with the cached item.\n  - `sensitive` _: boolean_ __optional__\n    - Enable or disable PCI/HIPAA-compliant non-volatile caching.\n    - By default, this is false.\n    - [See the Fastly PCI-Compliant Caching and Delivery documentation for details.](https://docs.fastly.com/products/pci-compliant-caching-and-delivery)\n\n### Return value\n\nReturns a `FastlyBody`.\n\n### Exceptions\n\n- If the provided `key`:\n  - Cannot be coerced to a string\n  - Is an empty string\n  - Is longer than 8135 characters\n"
  },
  {
    "path": "documentation/docs/cache/CoreCache/lookup.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# CoreCache.lookup\n\nPerform a non-transactional lookup into the cache, returning a CacheEntry if a usable cached item was found.\nA cached item is usable if its age is less than the sum of its TTL and its stale-while-revalidate period. Items beyond that age are unusably stale.\n\nNote: A non-transactional lookup will not attempt to coordinate with any concurrent cache lookups.\nIf two instances of the service perform a lookup at the same time for the same cache key, and the item is not yet cached, they will both return `null`.\nWithout further coordination, they may both end up performing the work needed to insert() the item (which usually involves origin requests and/or computation) and racing with each other to insert.\nTo resolve such races between concurrent lookups, use `CoreCache.transactionLookup()` instead.\n\n## Syntax\n\n```js\nlookup(key, options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - A cache key which is a string with a length of up to 8,135 that identify a cached item.\n  - The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n\n- `options` _: object_\n  - `headers` _: HeadersInit_ __optional__\n    - The headers act as additional factors in object selection, and the choice of which headers to factor in is determined during insertion, via the `vary` property within `TransactionInsertOptions`.\n    - A lookup will succeed when there is at least one cached item that matches lookup’s `key`, and all of the lookup’s headers included in the cache items’ `vary` list match the corresponding headers in that cached item.\n    - A typical example is a cached HTTP response, where the request had an \"Accept-Encoding\" header. In that case, the origin server may or may not decide on a given encoding, and whether that same response is suitable for a request with a different (or missing) Accept-Encoding header is determined by whether Accept-Encoding is listed in Vary header in the origin’s response.\n    - Note: These headers are narrowly useful for implementing cache lookups incorporating the semantics of the HTTP Vary header.\n\n### Return value\n\nReturns `CacheEntry` if a usable cached item was found, otherwise returns `null`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n"
  },
  {
    "path": "documentation/docs/cache/CoreCache/transactionLookup.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# CoreCache.transactionLookup\n\nPerform a transactional lookup into the cache, returning a `TransactionCacheEntry` instance.\n\nTransactions coordinate between concurrent actions on the same cache key, incorporating concepts of [request collapsing](https://developer.fastly.com/learning/concepts/request-collapsing/) and [revalidation](https://developer.fastly.com/learning/concepts/stale/), though at a lower level that does not automatically interpret HTTP semantics.\n\nRequest Collapsing:\nIf there are multiple concurrent calls to `CoreCache.transactionLookup()` for the same item and that item is not present,\njust one of the callers will be instructed to insert the item into the cache as part of the transaction.\nThe other callers will block until the metadata for the item has been inserted, and can then begin streaming its contents out of the cache at the same time that the inserting caller streams them into the cache.\n\nRevalidation:\nSimilarly, if an item is usable but stale, and multiple callers attempt a `CoreCache.transactionLookup()` concurrently, they will all be given access to the stale item, but only one will be designated to perform an asynchronous update (or insertion) to freshen the item in the cache.\n\n## Syntax\n\n```js\ntransactionLookup(key, options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - A cache key which is a string with a length of up to 8,135 that identify a cached item.\n  - The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n\n- `options` _: object_\n  - `headers` _: HeadersInit_ __optional__\n    - The headers act as additional factors in object selection, and the choice of which headers to factor in is determined during insertion, via the `vary` property within `TransactionInsertOptions`.\n    - A lookup will succeed when there is at least one cached item that matches lookup’s `key`, and all of the lookup’s headers included in the cache items’ `vary` list match the corresponding headers in that cached item.\n    - A typical example is a cached HTTP response, where the request had an \"Accept-Encoding\" header. In that case, the origin server may or may not decide on a given encoding, and whether that same response is suitable for a request with a different (or missing) Accept-Encoding header is determined by whether Accept-Encoding is listed in Vary header in the origin’s response.\n    - Note: These headers are narrowly useful for implementing cache lookups incorporating the semantics of the HTTP Vary header.\n\n### Return value\n\nReturns an instance of `TransactionCacheEntry`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n"
  },
  {
    "path": "documentation/docs/cache/SimpleCache/SimpleCache.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `SimpleCache`\n\nThe **`SimpleCache` class** provides a simplified interface to inserting and retrieving entries from Fastly's Cache.\n\nAll the methods on the class are static methods, there are no instance methods.\n\n\n## Examples\n\nIn this example we attempt to retrieve an entry from the Fastly Cache, if the entry does not exist, we create the content and insert it into the Fastly Cache before finally returning.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const path = new URL(event.request.url).pathname;\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n```\n"
  },
  {
    "path": "documentation/docs/cache/SimpleCache/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCache.get\n\n▸ **get**(): `string`\n\nGets the entry associated with the key `key` from the cache.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the cache.\n\n### Return value\n\nIf the key does not exist in the cache, this returns `null`.\n\nIf the key does exist in the cache, this returns a `SimpleCacheEntry`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n## Examples\n\nIn this example we attempt to retrieve an entry from the Fastly Cache, and return a message stating whether the entry was in the Fastly Cache or not.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const path = new URL(event.request.url).pathname;\n  let page = SimpleCache.get(path);\n  return new Response(page ? `${path} is in the cache` : `${path} is not in the cache`, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n```\n"
  },
  {
    "path": "documentation/docs/cache/SimpleCache/getOrSet.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCache.getOrSet\n\nThe **`getOrSet()`** method attempts to get an entry from the cache for the supplied `key`. If no entry is found (or has expired), the supplied `set` function is executed and its result is inserted into the cache under the supplied `key` and for the supplied `ttl` (Time-To-Live) duration, provided in seconds.\n\n## Syntax\n\n```js\ngetOrSet(key, set)\ngetOrSet(key, set, length)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to lookup and/or store the supplied entry under within the cache.\n- `set` _:  Function_\n  - The function to execute if and only if the cache does not have a usable entry for the supplied `key`.\n    The function should return a Promise which resolves with the following interface:\n    - `value` _:  ArrayBuffer | TypedArray | DataView | ReadableStream | URLSearchParams | String | string literal_\n      - The value to store within the cache.\n    - `ttl` _: number_\n      - The maximum number of seconds to store the supplied entry in the cache.\n    - `length` _: number_ __optional__\n      - The length of the value being stored within the cache. This is only used when the `value` is a `ReadableStream`.\n\n### Return value\n\nReturns a `SimpleCacheEntry`.\n\n### Exceptions\n\n- If the provided `key`:\n  - Cannot be coerced to a string\n  - Is an empty string\n  - Is longer than 8135 characters\n- If the provided `ttl`:\n  - Cannot be coerced to a number\n  - Is a negative number\n  - Is `NaN`\n  - Is Inifinity\n\n## Examples\n\nIn this example we attempt to retrieve an entry from the Fastly Cache. If the entry does not exist, we create the content and insert it into the Fastly Cache before finally returning.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const path = new URL(event.request.url).pathname;\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n```\n"
  },
  {
    "path": "documentation/docs/cache/SimpleCache/purge.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# SimpleCache.purge\n\npurge the entry associated with the key `key` from the cache.\n\n## Syntax\n\n```js\npurge(key, options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to purge from within the cache.\n\n- `options` _: object_\n  - `scope` _: string_\n    - : Where to purge the content from.\n    - Possible values are:\n      - \"global\" - This will remove the content from all of Fastly.\n      - \"pop\" - This will remove the content from the POP that contains the currently executing instance.\n\n### Return value\n\nReturns `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n## Examples\n\nIn this example, when a request contains a `purge` querystring parameter, we purge the an entry from the cache.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const url = new URL(event.request.url);\n  const path = url.pathname;\n  if (url.searchParams.has('purge')) {\n    SimpleCache.purge(path, { scope: \"global\" });\n    return new Response(page, { status: 204 });\n  }\n\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n```\n"
  },
  {
    "path": "documentation/docs/cache/SimpleCacheEntry/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the `SimpleCacheEntry` interface\ntakes the instance's stream and reads it to completion. It returns a promise\nthat resolves with an `ArrayBuffer`.\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an `ArrayBuffer`.\n"
  },
  {
    "path": "documentation/docs/cache/SimpleCacheEntry/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.body\n\nThe **`body`** read-only property of the `SimpleCacheEntry` interface is a `ReadableStream` of the instance's contents.\n\n## Value\n\nA `ReadableStream`.\n\n"
  },
  {
    "path": "documentation/docs/cache/SimpleCacheEntry/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.bodyUsed\n\nThe **`bodyUsed`** read-only property of the `SimpleCacheEntry` interface is a boolean value that indicates whether the body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/docs/cache/SimpleCacheEntry/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.json()\n\nThe **`json()`** method of the `SimpleCacheEntry` interface takes\na `SimpleCacheEntry` stream and reads it to completion. It returns a promise which\nresolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a JavaScript object. This object could be\nanything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/docs/cache/SimpleCacheEntry/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.text()\n\nThe **`text()`** method of the `SimpleCacheEntry` interface takes the instance's stream and reads it to completion.\nIt returns a promise that resolves with a `String`.\nThe result is _always_ decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Promise that resolves with a `String`.\n\n"
  },
  {
    "path": "documentation/docs/cache/TransactionCacheEntry/age.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.age\n\nThe **`age`** method of the `TransactionCacheEntry` interface returns the current age in milliseconds of the cached item.\n\n## Syntax\n\n```js\nage()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the current age in milliseconds of the cached item."
  },
  {
    "path": "documentation/docs/cache/TransactionCacheEntry/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.body\n\nThe **`body`** method of the `TransactionCacheEntry` interface retrieves the cached item contents as a `ReadableStream`.\n\nOnly one stream can be active at a time for a given `TransactionCacheEntry`. An error will be thrown if a stream is already active for this `TransactionCacheEntry`.\n\n## Syntax\n\n```js\nbody(options)\n```\n\n### Parameters\n\n- `options` _: object_ __optional__\n  - `start` _: number_\n    - The offset from which to start the range.\n  - `end` _: number_\n    - How long the range should be.\n\n### Return value\n\nA `ReadableStream` which contains the cached item contents."
  },
  {
    "path": "documentation/docs/cache/TransactionCacheEntry/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.cancel\n\nThe **`cancel`** method of the `TransactionCacheEntry` interface cancels an obligation to provide an object to the cache.\n\n\n## Syntax\n\n```js\ncancel()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/docs/cache/TransactionCacheEntry/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.close\n\nThe **`close`** method of the `TransactionCacheEntry` interface closes the connection to the cache for this `TransactionCacheEntry`.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/docs/cache/TransactionCacheEntry/hits.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.hits\n\nThe **`hits`** method of the `TransactionCacheEntry` interface returns the amount of cache hits for the cached item.\n\nNote: this hit count only reflects the view of the server that supplied the cached item. Due to clustering, this count may vary between potentially many servers within the data center where the item is cached. See the [clustering documentation](https://developer.fastly.com/learning/vcl/clustering/) for details, though note that the exact caching architecture of Compute is different from VCL services.\n\n## Syntax\n\n```js\nhits()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the number of cache hits to this cached item.\n"
  },
  {
    "path": "documentation/docs/cache/TransactionCacheEntry/insert.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.insert\n\nPerform a transactional cache insertion, returning a `FastlyBody` instance for providing the cached object itself.\n\nThis method should only be called when `TransactionCacheEntry.state().mustInsertOrUpdate()` is true; otherwise, an error will be thrown when attempting to perform the insertion.\n\n## Syntax\n\n```js\ninsert(options)\n```\n\n### Parameters\n\n- `options` _: object_\n  - `maxAge` _: number_ __optional__\n    - Sets the “time to live” for the cache item in milliseconds: The time for which the item will be considered fresh.\n  - `vary` _: array_ __optional__\n    - Sets the list of headers that must match when looking up this cached item.\n  - `initialAge` _: number_ __optional__\n    - Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n    - The initial age is 0 by default.\n  - `staleWhileRevalidate` _: number_ __optional__\n    - Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n    - Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n    - The methods `CacheState.protoype.usable` and `CacheState.protoype.stale` can be used to determine the current state of an item.\n    - The stale-while-revalidate period is 0 by default.\n  - `surrogateKeys` _: array_ __optional__\n    - Sets the surrogate keys that can be used for purging this cached item.\n    - Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item’s TTL to elapse, or overwriting the item with insert().\n    - Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n    - [See the Fastly surrogate keys guide for details.](https://docs.fastly.com/en/guides/working-with-surrogate-keys)\n  - `length` _: number_ __optional__\n    - Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n    - It is preferable to provide a length, if possible.\n    - Clients that begin streaming the item's contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n  - `userMetadata` _: ArrayBufferView | ArrayBuffer | URLSearchParams | string_ __optional__\n    - Sets the user-defined metadata to associate with the cached item.\n  - `sensitive` _: boolean_ __optional__\n    - Enable or disable PCI/HIPAA-compliant non-volatile caching.\n    - By default, this is false.\n    - [See the Fastly PCI-Compliant Caching and Delivery documentation for details.](https://docs.fastly.com/products/pci-compliant-caching-and-delivery)\n\n### Return value\n\nReturns a `FastlyBody`.\n"
  },
  {
    "path": "documentation/docs/cache/TransactionCacheEntry/insertAndStreamBack.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.insertAndStreamBack\n\nPerform a transaction cache insertion, returning a `FastlyBody` instance for providing the cached object itself, and a `CacheEntry` instance which can be used to stream out the newly-inserted cache item.\n\nFor the insertion to complete successfully, the object must be written into the returned `FastlyBody` instance, and then `FastlyBody.protoype.close` must be called.\nIf `FastlyBody.prototype.close` does not get called, the insertion is considered incomplete, and any concurrent lookups that may be reading from the object as it is streamed into the cache may encounter a streaming error.\n\n## Syntax\n\n```js\ninsertAndStreamBack(options)\n```\n\n### Parameters\n\n- `options` _: object_\n  - `maxAge` _: number_ __optional__\n    - Sets the “time to live” for the cache item in milliseconds: The time for which the item will be considered fresh.\n  - `vary` _: array_ __optional__\n    - Sets the list of headers that must match when looking up this cached item.\n  - `initialAge` _: number_ __optional__\n    - Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n    - The initial age is 0 by default.\n  - `staleWhileRevalidate` _: number_ __optional__\n    - Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n    - Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n    - The methods `CacheState.protoype.usable` and `CacheState.protoype.stale` can be used to determine the current state of an item.\n    - The stale-while-revalidate period is 0 by default.\n  - `surrogateKeys` _: array_ __optional__\n    - Sets the surrogate keys that can be used for purging this cached item.\n    - Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item’s TTL to elapse, or overwriting the item with insert().\n    - Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n    - [See the Fastly surrogate keys guide for details.](https://docs.fastly.com/en/guides/working-with-surrogate-keys)\n  - `length` _: number_ __optional__\n    - Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n    - It is preferable to provide a length, if possible.\n    - Clients that begin streaming the item's contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n  - `userMetadata` _: ArrayBufferView | ArrayBuffer | URLSearchParams | string_ __optional__\n    - Sets the user-defined metadata to associate with the cached item.\n  - `sensitive` _: boolean_ __optional__\n    - Enable or disable PCI/HIPAA-compliant non-volatile caching.\n    - By default, this is false.\n    - [See the Fastly PCI-Compliant Caching and Delivery documentation for details.](https://docs.fastly.com/products/pci-compliant-caching-and-delivery)\n\n### Return value\n\nReturns an array where the first item is a `FastlyBody` instance and the second item is a `CacheEntry` instance.\n"
  },
  {
    "path": "documentation/docs/cache/TransactionCacheEntry/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.length\n\nThe **`length`** method of the `TransactionCacheEntry` interface returns the size in bytes of the cached item, if known, otherwise returns `null` if the length is currently unknown.\n\nThe length of the cached item may be unknown if the item is currently being streamed into the cache without a fixed length.\n\n## Syntax\n\n```js\nlength()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` or `null` which represents the current length of the cached item.\n\n`null` is returned if the length is currently unknown."
  },
  {
    "path": "documentation/docs/cache/TransactionCacheEntry/maxAge.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.maxAge\n\nThe **`maxAge`** method of the `TransactionCacheEntry` interface returns the time in milliseconds for which the cached item is considered fresh.\n\n## Syntax\n\n```js\nmaxAge()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the time in milliseconds for which the cached item is considered fresh."
  },
  {
    "path": "documentation/docs/cache/TransactionCacheEntry/staleWhileRevalidate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.staleWhileRevalidate\n\nThe **`staleWhileRevalidate`** method of the `TransactionCacheEntry` interface returns the time in milliseconds for which a cached item can safely be used despite being considered stale.\n\n## Syntax\n\n```js\nstaleWhileRevalidate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the time in milliseconds for which a cached item can safely be used despite being considered stale."
  },
  {
    "path": "documentation/docs/cache/TransactionCacheEntry/state.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.state\n\nThe **`state`** method of the `TransactionCacheEntry` interface returns a `CacheState` instance which reflects the current state of this `TransactionCacheEntry` instance.\n\n## Syntax\n\n```js\nstate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `CacheState` instance which reflects the current state of this `TransactionCacheEntry` instance."
  },
  {
    "path": "documentation/docs/cache/TransactionCacheEntry/update.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.update\n\nPerform an update of the cache item's metadata.\n\n## Syntax\n\n```js\nupdate(options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - A cache key which is a string with a length of up to 8,135 that identify a cached item.\n  - The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n- `options` _: object_\n  - `maxAge` _: number_ __optional__\n    - Sets the “time to live” for the cache item in milliseconds: The time for which the item will be considered fresh.\n  - `vary` _: array_ __optional__\n    - Sets the list of headers that must match when looking up this cached item.\n  - `initialAge` _: number_ __optional__\n    - Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n    - The initial age is 0 by default.\n  - `staleWhileRevalidate` _: number_ __optional__\n    - Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n    - Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n    - The methods `CacheState.protoype.usable` and `CacheState.protoype.stale` can be used to determine the current state of an item.\n    - The stale-while-revalidate period is 0 by default.\n  - `surrogateKeys` _: array_ __optional__\n    - Sets the surrogate keys that can be used for purging this cached item.\n    - Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item’s TTL to elapse, or overwriting the item with insert().\n    - Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n    - [See the Fastly surrogate keys guide for details.](https://docs.fastly.com/en/guides/working-with-surrogate-keys)\n  - `length` _: number_ __optional__\n    - Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n    - It is preferable to provide a length, if possible.\n    - Clients that begin streaming the item's contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n  - `userMetadata` _: ArrayBufferView | ArrayBuffer | URLSearchParams | string_ __optional__\n    - Sets the user-defined metadata to associate with the cached item.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/docs/cache/TransactionCacheEntry/userMetadata.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.userMetadata\n\nThe **`userMetadata`** method of the `TransactionCacheEntry` interface returns the user-controlled metadata associated with the cached item.\n\n## Syntax\n\n```js\nuserMetadata()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nAn `ArrayBuffer` which contains the user-controlled metadata associated with the cached item."
  },
  {
    "path": "documentation/docs/cache-override/CacheOverride/CacheOverride.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `CacheOverride()`\n\nThe **`CacheOverride` constructor** lets you configure the caching behavior of a `Response`.\n\nNormally, the HTTP Headers on a [`Response`](../../globals/Response/Response.mdx) would control how the [`Response`](../../globals/Response/Response.mdx) is cached,\nbut `CacheOverride` can be set on a [`Request`](../../globals/Request/Request.mdx), to define custom caching behavior.\n\n## Syntax\n\n```js\nnew CacheOverride(mode)\nnew CacheOverride(mode, init)\nnew CacheOverride(init)\n```\n\n> **Note:** `CacheOverride()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `mode` _: string_\n  - Sets the cache override mode for a request\n  - If set to:\n    - `\"none\"`: Do not override the behavior specified in the origin response’s cache control headers.\n    - `\"pass\"`: Do not cache the response to this request, regardless of the origin response’s headers.\n    - `\"override\"`: Override particular cache control settings using the `CacheOverride` object's settings.\n       This options is also the default when providing an init object directly as the first argument.\n\n- `init`\n\n  - : An Object which contains all the configuration options to apply to the newly created `CacheOverride`.\n\n    - `pci` _: boolean_ _**optional**_\n      - Override the caching behavior of this request to enable or disable PCI/HIPAA-compliant non-volatile caching.\n      - By default, this is `false`, which means the request may not be PCI/HIPAA-compliant. Set it to `true` to enable compliant caching.\n      - See the [Fastly PCI-Compliant Caching and Delivery documentation](https://docs.fastly.com/products/pci-compliant-caching-and-delivery) for details.\n\n    - `surrogateKey` _: string_ _**optional**_\n      - Override the caching behavior of this request to include the given surrogate key, provided as a header value.\n      - See the [Fastly surrogate keys guide](https://docs.fastly.com/en/guides/purging-api-cache-with-surrogate-keys) for details.\n    - `swr` _: number_ _**optional**_\n      - Override the caching behavior of this request to use the given `stale-while-revalidate` time, in seconds\n\n    - `ttl` _: number_ _**optional**_\n      - Override the caching behavior of this request to use the given Time to Live (TTL), in seconds.\n    \n    - `beforeSend` _:Function_ _**optional**_\n      - `(request: Request) => void | PromiseLike<void>`\n      - Callback to be invoked if a request is going all the way to a backend, allowing the request to be modified beforehand.\n      - See [Modifying a request as it is forwarded to a backend](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/#modifying-a-request-as-it-is-forwarded-to-a-backend) in the Fastly cache interfaces documentation for details.\n\n    - `afterSend` _: Function_ _**optional**_\n      - `(response: Response) => void | CacheOptions | PromiseLike<void | CacheOptions>`\n      - Callback to be invoked after a response has been sent, but before it is stored into the cache.\n      - Where `CacheOptions` contains:\n        - `cache` _: boolean | 'uncacheable'_ _**optional**_\n          - Whether to cache this response. By default, leaving this field empty, responses will be cached based on their cache header information.\n          - Setting this to true or false will override this default cache behaviour, setting in the cache or not setting in the cache, even if the default behaviour would have been otherwise.\n          - Setting to 'uncacheable' the response will not only not be cached, but the cache will record that the originating request led to an uncacheable response, so that future cache lookups will result in immediately going to the backend, rather than attempting to coordinate concurrent requests to reduce backend traffic.\n          - See the [Fastly request collapsing guide](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/request-collapsing/) for more details on the mechanism that `uncacheable` disables.\n        - `bodyTransformFn` _: Function_ _**optional**_\n          - `(body: Uint8Array) => Uint8Array | PromiseLike<Uint8Array>`\n          - Provide a function to be used for transforming the response body prior to caching.\n          - Body transformations are performed by specifying a transform, rather than by directly working with the body during the onAfterSend callback function, because not every response contains a fresh body: 304 Not Modified responses, which are used to revalidate a stale cached response, are valuable precisely because they do not retransmit the body.\n          - For any other response status, the backend response will contain a relevant body, and the `bodyTransformFn` will be applied to it. The original backend body is passed in to the transform function, and the function is expected to return the new body.\n      - See [Controlling cache behavior based on backend response](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/#controlling-cache-behavior-based-on-backend-response) in the Fastly cache interfaces documentation for details.\n\n### Return value\n\nA new `CacheOverride` object.\n\n## Examples\n\nIn this example we override the cache for all the requests prefixed /static/ to have a long TTL (Time To Live),  and the home page to have a short TTL and a long SWR (Stale While Revalidate).\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"CacheOverride Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { CacheOverride } from \"fastly:cache-override\";\n// In this example we override the cache for all the requests prefixed /static/ \n// to have a long TTL (Time To Live), and the home page to have a short TTL and \n// a long SWR (Stale While Revalidate).\nasync function app (event) {\n  const path = (new URL(event.request.url)).pathname;\n  let cacheOverride;\n  if (path == '/') {\n    cacheOverride = new CacheOverride('override', {ttl: 10, swr: 86_400});\n  } else if (path.startsWith('/static/')) {\n    cacheOverride = new CacheOverride('override', {ttl: 86_400});\n  } else {\n    cacheOverride = new CacheOverride('none')\n  }\n  return fetch(event.request.url, {\n    cacheOverride,\n    backend: 'origin_0'\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { CacheOverride } from \"fastly:cache-override\";\n// In this example we override the cache for all the requests prefixed /static/ \n// to have a long TTL (Time To Live), and the home page to have a short TTL and \n// a long SWR (Stale While Revalidate).\nasync function app (event) {\n  const path = (new URL(event.request.url)).pathname;\n  let cacheOverride;\n  if (path == '/') {\n    cacheOverride = new CacheOverride('override', {ttl: 10, swr: 86_400});\n  } else if (path.startsWith('/static/')) {\n    cacheOverride = new CacheOverride('override', {ttl: 86_400});\n  } else {\n    cacheOverride = new CacheOverride('none')\n  }\n  return fetch(event.request.url, {\n    cacheOverride,\n    backend: 'origin_0'\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/docs/compute/purgeSurrogateKey.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# purgeSurrogateKey\n\nThe **`purgeSurrogateKey()`** function is used to purge the given surrogate key string from Fastly's cache.\n\nThere are two purge modes: soft purge and hard purge, with hard purge as the default which clears all items\nfrom the cache immediately. When using a soft purge, stale entries are maintained in the cache, reducing\norgin load, while also enabling stale revalidations.\n\nSee the [Fastly Purge Documentation](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/purging/#surrogate-key-purge) for more information on caching and purge operations.\n\n## Syntax\n\n```js\npurgeSurrogateKey(surrogateKey, soft?)\n```\n\n### Parameters\n\n- `surrogateKey` _: string_\n  - The surrogate key string\n- `soft?` _: boolean_\n  - Enables a soft purge, retaining stale entries in the cache. Default is a hard purge.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/docs/compute/vCpuTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# vCpuTime\n\nThe **`vCpuTime()`** function provides the vCPU time used by the current request handler in milliseconds.\n\n## Syntax\n\n```js\nvCpuTime()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`number`.\n"
  },
  {
    "path": "documentation/docs/config-store/ConfigStore/ConfigStore.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `ConfigStore()`\n\nThe **`ConfigStore` constructor** lets you access a specific [Fastly Config Store](https://www.fastly.com/documentation/reference/api/services/resources/config-store/).\n\n> **Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew ConfigStore(name);\n```\n\n> **Note:** `ConfigStore()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Defines a config store instance using the resource link name.\n\n### Return value\n\nA new `ConfigStore` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Config Store exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name does not start with an ascii alphabetical character \n  - Thrown if the provided name does not contain only ascii alphanumeric, underscore, and whitespace characters\n\n## Examples\n\nIn this example we have a resource link named \"animals\" (which is linked to a config store) and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"ConfigStore Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>\n"
  },
  {
    "path": "documentation/docs/config-store/ConfigStore/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# ConfigStore.prototype.get\n\nThe **`get()`** method returns the value associated with the provided key in the config-store. If the provided key does not exist in the ConfigStore then this returns `null`.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from the dictionary.\n\n### Return value\n\nA `string` representing the specified ConfigStore value or `null` if the key does not exist in the ConfigStore\n\n## Description\n\nGet a value for a key in the config-store. If the provided key does not exist in the ConfigStore then this returns `null`.\n\nThe `get()` method requires its `this` value to be a [`ConfigStore`](../../../fastly%3Aconfig-store/ConfigStore/ConfigStore.mdx) object.\n\nIf the `this` value does not inherit from `ConfigStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided key is longer than 255 in length\n  - Thrown if the provided key is an empty string\n\n## Examples\n\nIn this example we have an Edge Dictionary named \"animals\" and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"ConfigStore Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/docs/device/Device/lookup.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Device.lookup()\n\nLook up the data associated with a particular User-Agent string.\n\n\n## Syntax\n\n```js\nlookup(userAgent)\n```\n\n### Return value\n\nIf there is data associated with the User-Agent, a `Device` instance is returned.\nOtherwise, `null` is returned.\n"
  },
  {
    "path": "documentation/docs/device/Device/prototype/brand.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.brand\n\nThe read-only **`brand`** property of the `Device` interface is\neither a string stating the brand of the device, which can be different from the manufacturer of that device.\nIf no brand is known, the value will be `null`.\n\n\n## Value\n\nEither a string value if a brand is known, otherwise `null`.\n"
  },
  {
    "path": "documentation/docs/device/Device/prototype/hardwareType.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.hardwareType\n\nThe read-only **`hardwareType`** property of the `Device` interface is\neither a string stating the hardware type of the device, or `null` if the hardware type is not known.\n\nA string representation of the device's primary platform hardware. The most commonly used device types are also identified via boolean variables. Because a device may have multiple device types and this variable only has the primary type, we recommend using the boolean variables for logic and using this string representation for logging.\n\n\n\n## Value\n\nEither a string value if a hardware type is known, otherwise `null`.\n"
  },
  {
    "path": "documentation/docs/device/Device/prototype/isBot.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isBot\n\nThe read-only **`isBot`** property of the `Device` interface is\neither a boolean stating if the device is a bot, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a bot, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/docs/device/Device/prototype/isDesktop.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isDesktop\n\nThe read-only **`isDesktop`** property of the `Device` interface is\neither a boolean stating if the device is a desktop web browser, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a desktop web browser, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/docs/device/Device/prototype/isGameConsole.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isGameConsole\n\nThe read-only **`isGameConsole`** property of the `Device` interface is\neither a boolean stating if the device is a video game console, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a video game console, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/docs/device/Device/prototype/isMediaPlayer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isMediaPlayer\n\nThe read-only **`isMediaPlayer`** property of the `Device` interface is\neither a boolean stating if the device is a media player (like Blu-ray players, iPod devices, and smart speakers such as Amazon Echo), or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a media player (like Blu-ray players, iPod devices, and smart speakers such as Amazon Echo), or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/docs/device/Device/prototype/isMobile.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isMobile\n\nThe read-only **`isMobile`** property of the `Device` interface is\neither a boolean stating if the device is a mobile phone, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a mobile phone, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/docs/device/Device/prototype/isSmartTV.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isSmartTV\n\nThe read-only **`isSmartTV`** property of the `Device` interface is\neither a boolean stating if the device is a smart TV, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a smart TV, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/docs/device/Device/prototype/isTablet.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isTablet\n\nThe read-only **`isTablet`** property of the `Device` interface is\neither a boolean stating if the device is a tablet (like an iPad), or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a tablet (like an iPad), or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/docs/device/Device/prototype/isTouchscreen.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isTouchscreen\n\nThe read-only **`isTouchscreen`** property of the `Device` interface is\neither a boolean stating if the device's screen is touch sensitive, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device's screen is touch sensitive, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/docs/device/Device/prototype/model.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.model\n\nThe read-only **`model`** property of the `Device` interface is\neither a string stating the model of the device, or `null` if the model is not known.\n\n\n## Value\n\nEither a string value if a model is known, otherwise `null`.\n"
  },
  {
    "path": "documentation/docs/device/Device/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.name\n\nThe read-only **`name`** property of the `Device` interface is\neither a string stating the name of the device, or `null` if the name is not known.\n\n\n## Value\n\nEither a string value if a name is known, otherwise `null`.\n"
  },
  {
    "path": "documentation/docs/device/Device/prototype/toJSON.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# toJSON\n\nThe `toJSON()` method of the Device interface is a serializer;\nit returns a JSON representation of the Device object.\n\nTo get a JSON string, you can use `JSON.stringify(device)` directly; it will call `toJSON()` automatically.\n\n## Syntax\n\n```js\ntoJSON()\n```\n\n### Return value\n\nA JSON object that is the serialization of the Device object.\n"
  },
  {
    "path": "documentation/docs/dictionary/Dictionary/Dictionary.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Dictionary()`\n\n:::info\n\nThis Class is deprecated\n\n:::\n\nThe **`Dictionary` constructor** lets you access a specific [Fastly Edge Dictionary](https://docs.fastly.com/en/guides/about-edge-dictionaries).\n\n**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew Dictionary(name);\n```\n\n> **Note:** `Dictionary()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - The name of the [Fastly Edge Dictionary](https://docs.fastly.com/en/guides/about-edge-dictionaries) that this `Dictionary` instance should provide access to.\n\n### Return value\n\nA new `Dictionary` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Dictionary exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name does not start with an ascii alphabetical character \n  - Thrown if the provided name does not contain only ascii alphanumeric, underscore, and whitespace characters\n\n## Examples\n\nIn this example we have an Edge Dictionary named \"animals\" and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Dictionary Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/docs/dictionary/Dictionary/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Dictionary.prototype.get\n\n:::info\n\nThis Class is deprecated, it has been renamed to [`ConfigStore`](../../../fastly:config-store/ConfigStore/ConfigStore.mdx) and can be imported via `import { ConfigStore } from 'fastly:config-store'`\n\nThe `get()` method exists on the [`ConfigStore`](../../../fastly:config-store/ConfigStore/ConfigStore.mdx) Class.\n\n:::\n\nThe **`get()`** method returns the value associated with the provided key in the dictionary. If the provided key does not exist in the Dictionary then this returns `null`.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from the dictionary.\n\n### Return value\n\nA `string` representing the specified Dictionary value or `null` if the key does not exist in the Dictionary\n\n## Description\n\nGet a value for a key in the dictionary. If the provided key does not exist in the Dictionary then this returns `null`.\n\nThe `get()` method requires its `this` value to be a [`Dictionary`](../Dictionary.mdx) object.\n\nIf the `this` value does not inherit from `Dictionary.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided key is longer than 255 in length\n  - Thrown if the provided key is an empty string\n\n## Examples\n\nIn this example we have an Edge Dictionary named \"animals\" and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Dictionary Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/docs/edge-rate-limiter/EdgeRateLimiter/EdgeRateLimiter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `EdgeRateLimiter()`\n\nThe **`EdgeRateLimiter` constructor** lets you open an epen a [ERL](https://docs.fastly.com/products/edge-rate-limiting) with the given ratecounter and penaltybox.\n\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew EdgeRateLimiter(rateCounter, penaltyBox)\n```\n\n> **Note:** `EdgeRateLimiter()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `rateCounter` _: RateCounter_\n  - The RateCounter instance to associate with this EdgeRateLimiter instance\n- `penaltyBox` _: PenaltyBox_\n  - The PenaltyBox instance which should be associated with this EdgeRateLimiter instance\n\n### Return value\n\nA new `EdgeRateLimiter` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided rateCounter value is not an instance of RateCounter\n  - Thrown if the provided penaltyBox value is not an instance of PenaltyBox\n\n"
  },
  {
    "path": "documentation/docs/edge-rate-limiter/EdgeRateLimiter/prototype/checkRate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# EdgeRateLimiter.prototype.checkRate\n\nIncrement an entry in the rate counter and check if the entry has exceeded some average number of requests per second (RPS) over the given window.\nIf the entry is over the RPS limit for the window, add to the penaltybox for the given `timeToLive`.\n\nValid `timeToLive` is 1 minute to 60 minutes and `timeToLive` value is truncated to the nearest minute.\n\n## Syntax\n```js\ncheckRate(entry, delta, window, limit, timeToLive)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to increment and check\n- `delta` _: number_\n  - The amount to increment the `entry` by\n- `window` _: number_\n  - The time period to check across, has to be either 1 second, 10 seconds, or 60 seconds\n- `limit` _: number_\n  - The requests-per-second limit\n- `timeToLive` _: number_\n  - In minutes, how long the entry should be added into the penalty-box\n  - Valid `timeToLive` is 1 minute to 60 minutes and `timeToLive` value is truncated to the nearest minute.\n\n\n### Return value\n\nReturns `true` if the entry has exceeded the average RPS for the window, otherwise returns `false`.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `name` value can not be coerced into a string\n  - Thrown if the provided `delta` value is not a positive finite number.\n  - Thrown if the provided `window` value is not either, 1, 10, or 60.\n  - Thrown if the provided `limit` value is not a positive finite number.\n  - Thrown if the provided `timeToLive` value is not either, a number between 1 and 60 inclusively.\n\n"
  },
  {
    "path": "documentation/docs/edge-rate-limiter/PenaltyBox/PenaltyBox.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `PenaltyBox()`\n\nThe **`PenaltyBox` constructor** can be used with a [Edge Rate Limiter](../EdgeRateLimiter/EdgeRateLimiter.mdx) or standalone for adding and checking if some entry is in the dataset.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew PenaltyBox(name)\n```\n\n> **Note:** `PenaltyBox()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Open a PenaltyBox with the given name\n\n\n### Return value\n\nA new `PenaltyBox` object instance.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `name` value can not be coerced into a string\n\n"
  },
  {
    "path": "documentation/docs/edge-rate-limiter/PenaltyBox/prototype/add.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# PenaltyBox.prototype.add\n\nAdd an `entry` into the PenaltyBox for the duration of the given `timeToLive`.\n\n## Syntax\n```js\nadd(entry, timeToLive)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n- `timeToLive` _: number_\n  - In minutes, how long the entry should be added into the PenaltyBox\n  - Valid `timeToLive` is 1 minute to 60 minutes and `timeToLive` value is truncated to the nearest minute.\n\n\n### Return value\n\nReturns `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n  - Thrown if the provided `timeToLive` value is not either, a number between 1 and 60 inclusively.\n"
  },
  {
    "path": "documentation/docs/edge-rate-limiter/PenaltyBox/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# PenaltyBox.prototype.has\n\nCheck if the given entry is contained in in the PenaltyBox instance.\n\n## Syntax\n```js\nhas(entry)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n\n\n### Return value\n\nReturns `true` if the entry is contained in the PenaltyBox instance, otherwise returns `false`.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n"
  },
  {
    "path": "documentation/docs/edge-rate-limiter/RateCounter/RateCounter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `RateCounter()`\n\nThe **`RateCounter` constructor** can be used with a [Edge Rate Limiter](../EdgeRateLimiter/EdgeRateLimiter.mdx) or standalone for counting and rate calculations.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew RateCounter(name)\n```\n\n> **Note:** `RateCounter()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Open a RateCounter with the given name\n\n\n### Return value\n\nA new `RateCounter` object instance.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `name` value can not be coerced into a string\n\n"
  },
  {
    "path": "documentation/docs/edge-rate-limiter/RateCounter/prototype/increment.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RateCounter.prototype.increment\n\nIncrement the given `entry` in the RateCounter instance with the given `delta` value.\n\n## Syntax\n```js\nincrement(entry, delta)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n- `delta` _: number_\n  - The amount to increment the entry by\n\n\n### Return value\n\nReturns `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n  - Thrown if the provided `delta` value is not a positive, finite number.\n"
  },
  {
    "path": "documentation/docs/edge-rate-limiter/RateCounter/prototype/lookupCount.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RateCounter.prototype.lookupCount\n\nLook up the current rate for the given `entry` and the given `duration`.\n\n## Syntax\n```js\nlookupCount(entry, duration)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n- `duration` _: number_\n  - The duration to lookup alongside the entry, has to be either, 10, 20, 30, 40, 50, or 60 seconds.\n\n\n### Return value\n\nReturns a number which is the count for the given `entry` and `duration` in this `RateCounter` instance.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n  - Thrown if the provided `duration` value is not either, 10, 20, 30, 40, 50 or 60.\n"
  },
  {
    "path": "documentation/docs/edge-rate-limiter/RateCounter/prototype/lookupRate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RateCounter.prototype.lookupRate\n\nLook up the current rate for the given `entry` and the given `window`.\n\n## Syntax\n```js\nlookupRate(entry, window)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n- `window` _: number_\n  - The window to look up alongside the entry, has to be either 1 second, 10 seconds, or 60 seconds\n\n\n### Return value\n\nReturns a number which is the rate for the given `entry` and `window` in this `RateCounter` instance.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n  - Thrown if the provided `window` value is not either, 1, 10, or 60.\n"
  },
  {
    "path": "documentation/docs/env/env.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# env\n\nThe **`env()`** function returns the value for the provided environment variable name.\n\nFor a list of available environment variables, see the [Fastly Developer Hub for Compute Environment Variables](https://developer.fastly.com/reference/compute/ecp-env/)\n\n>**Note**: The environment variables can only be retrieved when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nenv(name)\n```\n\n### Parameters\n\n- `name` _: string_\n  - The name of the environment variable to retrieve\n\n### Return value\n\nThe value for the requested environment variable, if no such environment variable exists then an empty string is returned.\n\n## Examples\n\nIn this example we log to stdout the environment variables [`FASTLY_HOSTNAME`](https://developer.fastly.com/reference/compute/ecp-env/fastly-hostname/) and [`FASTLY_TRACE_ID`](https://developer.fastly.com/reference/compute/ecp-env/fastly-trace-id/).\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"env Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { env } from \"fastly:env\";\nfunction app(event) {\n  console.log(\"FASTLY_HOSTNAME:\", env(\"FASTLY_HOSTNAME\"));\n  console.log(\"FASTLY_TRACE_ID:\", env(\"FASTLY_TRACE_ID\"));\n  return new Response(\"\", {\n    status: 200\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { env } from \"fastly:env\";\nfunction app(event) {\n  console.log(\"FASTLY_HOSTNAME:\", env(\"FASTLY_HOSTNAME\"));\n  console.log(\"FASTLY_TRACE_ID:\", env(\"FASTLY_TRACE_ID\"));\n  return new Response(\"\", {\n    status: 200\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/docs/experimental/allowDynamicBackends.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# allowDynamicBackends\n\nThe **`allowDynamicBackends()`** function is used to control whether or not Dynamic Backends should be allowed within this Fastly Compute Service.\n\nBy default, Dynamic Backends are disabled within a JavaScript application as it can be a potential avenue for third-party JavaScript code to send requests, potentially including sensitive/secret data,  off to destinations that the JavaScript project was not intending, which could be a security issue.\n\n>**Note**: This feature is in disabled by default for Fastly Services. Please contact [Fastly Support](https://support.fastly.com/hc/requests/new?ticket_form_id=360000269711) to request the feature be enabled on the Fastly Services which require Dynamic Backends.\n\n## Syntax\n\n```js\nallowDynamicBackends(enabledOrConfig)\n```\n\n### Parameters\n\n- `enabledOrConfig` _: boolean_\n  - Whether or not to allow Dynamic Backends\n\nor\n\n- `enabledOrConfig` _: object_\n  - `connectTimeout` _: number_ _**optional**_\n    - Maximum duration in milliseconds to wait for a connection to this backend to be established.\n    - If exceeded, the connection is aborted and a 503 response will be presented instead.\n    - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n  - `firstByteTimeout` _: number_ _**optional**_\n    - Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent.\n    - If exceeded, the connection is aborted and a 503 response will be presented instead.\n    - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n  - `betweenBytesTimeout` _: number_ _**optional**_\n    - Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend.\n    - If exceeded, the response received so far will be considered complete and the fetch will end.\n    - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n\n### Return value\n\n`undefined`.\n\n## Examples\n\nIn this example an implicit Dynamic Backend is created when making the fetch request to https://www.fastly.com/ and the response is then returned to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Dynamic Backends Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nallowDynamicBackends(true);\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  return fetch('https://www.fastly.com/');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nallowDynamicBackends(true);\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  return fetch('https://www.fastly.com/');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n</Fiddle>"
  },
  {
    "path": "documentation/docs/experimental/includeBytes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# includeBytes\n\nThe **`includeBytes()`** function is used embed a file as a Uint8Array.\n\n>**Note**: Can only be used during build-time initialization, not when processing requests.\n\n## Syntax\n\n```js\nincludeBytes(path)\n```\n\n### Parameters\n\n- `path` _: string_\n  - The path to include, relative to the Fastly Compute application's top-level directory during build-time initialization.\n\n### Return value\n\nReturns a `Uint8Array`\n\n## Examples\n\nIn this example we include the README.md file as a Uint8Array and use it for the body in the response we return to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { includeBytes } from \"fastly:experimental\";\nconst readme = includeBytes('README.md');\nasync function app() {\n    return new Response(readme);\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n"
  },
  {
    "path": "documentation/docs/experimental/mapAndLogError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# mapAndLogError\n\nThe **`mapAndLogError()`** function calls `mapError` on an `Error` object and sends the output to standard error. This includes the error name, message, and a call stack.\n\nIf `--enable-stack-traces` is specified during the build, the call stack will be mapped using source maps.\n\nIf `--enable-stack-traces` is specified and `--exclude-sources` is not specified during the build, then this will also include a code dump of neighboring lines of user code.\n\n## Syntax\n\n```js\nmapAndLogError(error)\n```\n\n### Parameters\n\n- `error` _: Error _ or _string_\n  - The error to retrieve information about. If a `string` is provided, then it is first converted to an `Error`.\n\n### Return value\n\n`undefined`.\n\n## Examples\n\nIn this example, build the application using the `--enable-stack-traces` flag.\n\n```js\naddEventListener('fetch', e => e.respondWith(handler(e)));\nasync function handler(event) {\n  try {\n    throw new TypeError('foo');\n  } catch (err) {\n    mapAndLogError(mapError(err));\n  }\n  return new Response('ok');\n}\n```\n\nThe following is output to the error log.\n\n```\nTypeError: foo\n  at handler (src/index.ts:4:11)\n      1 | addEventListener('fetch', e => e.respondWith(handler(e)));\n      2 | async function handler(event) {\n      3 |   try {\n>     4 |     throw new TypeError('foo');\n                    ^\n      5 |   } catch (err) {\n      6 |     mapAndLogError(mapError(err));\n      7 |   }\n  at src/index.ts:1:45\n```\n"
  },
  {
    "path": "documentation/docs/experimental/mapError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# mapError\n\nThe **`mapError()`** function extracts information from an `Error` object as a human-readable array of strings. This includes the error name, message, and a call stack.\n\nIf `--enable-stack-traces` is specified during the build, the call stack will be mapped using source maps.\n\nIf `--enable-stack-traces` is specified and `--exclude-sources` is not specified during the build, then this will also include a code dump of neighboring lines of user code.\n\n## Syntax\n\n```js\nmapError(error)\n```\n\n### Parameters\n\n- `error` _: Error _ or _string_\n  - The error to retrieve information about. If a `string` is provided, then it is first converted to an `Error`.\n\n### Return value\n\nReturns an array of `string`s.\n\n## Examples\n\nIn this example, build the application using the `--enable-stack-traces` flag.\n\n```js\naddEventListener('fetch', e => e.respondWith(handler(e)));\nasync function handler(event) {\n  try {\n    throw new TypeError('foo');\n  } catch (err) {\n    console.error(mapError(err));\n  }\n  return new Response('ok');\n}\n```\n\nThe following is output to the error log.\n\n```\nTypeError: foo\n  at handler (src/index.ts:4:11)\n      1 | addEventListener('fetch', e => e.respondWith(handler(e)));\n      2 | async function handler(event) {\n      3 |   try {\n>     4 |     throw new TypeError('foo');\n                    ^\n      5 |   } catch (err) {\n      6 |     console.error(mapError(err));\n      7 |   }\n  at src/index.ts:1:45\n```\n"
  },
  {
    "path": "documentation/docs/experimental/sdkVersion.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# sdkVersion\n\nThe read-only **`sdkVersion`** property is a string whose indicates what JavaScript SDK version is being used.\n\n## Value\n\nA string value.\n"
  },
  {
    "path": "documentation/docs/experimental/setReusableSandboxOptions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# setReusableSandboxOptions\n\nThe **`setReusableSandboxOptions()`** function configures the reuse of the same underlying sandbox for multiple requests, which can improve performance by avoiding the overhead of initializing a new sandbox for each request.\n\n>**Note**: Can only be used during build-time initialization, not when processing requests.\n\n## Syntax\n\n```js\nsetReusableSandboxOptions(options)\n```\n\n### Parameters\n\n- `options` _: Object_\n  - The configuration options for the reusable sandbox.\n    - `maxRequests` _: number_ (default: `1`, `0` means unlimited)\n      - The maximum number of requests that can be handled by a single sandbox before it is recycled.\n    - `betweenRequestTimeoutMs` _: number_ (default: not specified)\n      - The amount of time in milliseconds to wait between requests before recycling the sandbox.\n    - `maxMemoryMiB` _: number_ (default: no limit)\n      - The maximum amount of memory in MiB that the sandbox can use before it is recycled.\n    - `sandboxTimeoutMs` _: number_ (default: no timeout)\n      - The maximum amount of time in milliseconds that a sandbox can be active before it is recycled.\n"
  },
  {
    "path": "documentation/docs/fanout/createFanoutHandoff.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# createFanoutHandoff\n\nThe **`createFanoutHandoff()`** function creates a Response instance which informs Fastly to pass the original Request through Fanout, to the declared backend.\n\n## Syntax\n\n```js\ncreateFanoutHandoff(request, backend)\n```\n\n### Parameters\n\n- `request` _: Request_\n  - The request to pass through Fanout.\n- `backend` _: string_\n  - The name of the backend that Fanout should send the request to.\n  - The name has to be between 1 and 254 characters inclusive.\n  - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n\n### Return value\n\nA Response instance is returned, which can then be used via `event.respondWith`.\n\n## Examples\n\nIn this example application requests to the path `/stream` and sent handled via Fanout.\n\n```js\nimport { createFanoutHandoff } from \"fastly:fanout\";\n\nasync function handleRequest(event) {\n  try {\n    const url = new URL(event.request.url);\n    if (url.pathname === '/stream') {\n      return createFanoutHandoff(event.request, 'fanout');\n    } else {\n      return new Response('oopsie, make a request to /stream for some fanout goodies', { status: 404 });\n    }\n  } catch (error) {\n    console.error({error});\n    return new Response(error.message, {status:500})\n  }\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/docs/geolocation/getGeolocationForIpAddress.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# getGeolocationForIpAddress\n\nThe **`getGeolocationForIpAddress()`** function is used to retrieve geolocation information about the given IP address.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\ngetGeolocationForIpAddress(address)\n```\n\n### Parameters\n\n- `address` _: string_\n  - The IPv4 or IPv6 address to query.\n\n### Return value\n\nReturns an `Object`, or `null` if no geolocation data was found.\n\nThe object contains information about the given IP address with the following properties:\n\n- `as_name`  _: string | null_\n  - The name of the organization associated with `as_number`.\n  - For example, fastly is the value given for IP addresses under AS-54113.\n\n- `as_number` _: number | null_\n  - [Autonomous system](https://en.wikipedia.org/wiki/Autonomous_system_(Internet)) (AS) number.\n\n- `area_code` _: number | null_\n  - The telephone area code associated with an IP address.\n  - These are only available for IP addresses in the United States, its territories, and Canada.\n\n- `city` _: string | null_\n  - City or town name.\n\n- `conn_speed` _: string | null_\n  - Connection speed.\n\n- `conn_type` _: string | null_\n  - Connection type.\n\n- `continent` _: string | null_\n  - Continent.\n\n- `country_code` _: string | null_\n  - A two-character [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) country code for the country associated with an IP address.\n  - The US country code is returned for IP addresses associated with overseas United States military bases.\n  - These values include subdivisions that are assigned their own country codes in ISO 3166-1. For example, subdivisions NO-21 and NO-22 are presented with the country code SJ for Svalbard and the Jan Mayen Islands.\n\n- `country_code3` _: string | null_\n  - A three-character [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) country code for the country associated with the IP address.\n  - The USA country code is returned for IP addresses associated with overseas United States military bases.\n\n- `country_name` _: string | null_\n  - Country name.\n  - This field is the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) English short name for a country.\n\n- `gmt_offset` _: string | null_\n  - Time zone offset from Greenwich Mean Time (GMT) for `city`.\n\n- `latitude` _: number | null_\n  - Latitude, in units of degrees from the equator.\n  - Values range from -90.0 to +90.0 inclusive, and are based on the [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System) coordinate reference system.\n\n- `longitude` _: number | null_\n  - Longitude, in units of degrees from the [IERS Reference Meridian](https://en.wikipedia.org/wiki/IERS_Reference_Meridian).\n  - Values range from -180.0 to +180.0 inclusive, and are based on the [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System) coordinate reference system.\n\n- `metro_code` _: number | null_\n  - Metro code, representing designated market areas (DMAs) in the United States.\n\n- `postal_code` _: string | null_\n  - The postal code associated with the IP address.\n  - These are available for some IP addresses in Australia, Canada, France, Germany, Italy, Spain, Switzerland, the United Kingdom, and the United States.\n  - For Canadian postal codes, this is the first 3 characters. For the United Kingdom, this is the first 2-4 characters (outward code). For countries with alphanumeric postal codes, this field is a lowercase transliteration.\n\n- `proxy_description` _: string | null_\n  - Client proxy description.\n\n- `proxy_type` _: string | null_\n  - Client proxy type.\n\n- `region` _: string | null_\n  - [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) country subdivision code.\n  - For countries with multiple levels of subdivision (for example, nations within the United Kingdom), this variable gives the more specific subdivision.\n  - This field can be None for countries that do not have ISO country subdivision codes. For example, None is given for IP addresses assigned to the Åland Islands (country code AX, illustrated below).\n\n- `utc_offset` _: number | null;_\n  - Time zone offset from coordinated universal time (UTC) for `city`.\n\n## Examples\n\nIn this example we return the geolocation details for the provided ip querystring parameter or for the incoming client request if the querystring parameter does not exist.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"getGeolocationForIpAddress Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { getGeolocationForIpAddress } from \"fastly:geolocation\"\nasync function app(event) {\n  try {\n    let ip = new URL(event.request.url).searchParams.get('ip') || event.client.address\n    let geo = getGeolocationForIpAddress(ip);\n    return new Response(JSON.stringify(geo), {\n      headers: {\n        \"Content-Type\": \"application/json\",\n      },\n    });\n  } catch (error) {\n    console.error(error);\n    return new Response(\"Internal Server Error\", {\n      status: 500\n    });\n  }\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { getGeolocationForIpAddress } from \"fastly:geolocation\"\nasync function app(event) {\n  try {\n    let ip = new URL(event.request.url).searchParams.get('ip') || event.client.address\n    let geo = getGeolocationForIpAddress(ip);\n    return new Response(JSON.stringify(geo), {\n      headers: {\n        \"Content-Type\": \"application/json\",\n      },\n    });\n  } catch (error) {\n    console.error(error);\n    return new Response(\"Internal Server Error\", {\n      status: 500\n    });\n  }\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/docs/globals/AggregrateError/AggregrateError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# AggregateError()\n\nThe **`AggregateError()`** constructor creates an error for several errors that need to be wrapped in a single error.\n\n## Syntax\n\n```js\nnew AggregateError(errors)\nnew AggregateError(errors, message)\nnew AggregateError(errors, message, options)\n\nAggregateError(errors)\nAggregateError(errors, message)\nAggregateError(errors, message, options)\n```\n\n> **Note:** `AggregateError()` can be called with or without `new`. Both create a new `AggregateError` instance.\n\n### Parameters\n\n- `errors`\n  - : An iterable of errors, may not actually be [`TypeError`](../Error/Error.mdx) instances.\n- `message` _**optional**_\n  - : An optional human-readable description of the aggregate error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/docs/globals/Array/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array\\[Symbol.species]\n\nThe **`Array[Symbol.species]`** accessor property returns the constructor used to construct return values from array methods.\n\n> **Warning:** The existence of `[Symbol.species]` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Syntax\n\n```js\nArray[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get [Symbol.species]` was called. The return value is used to construct return values from array methods that create new arrays.\n\n## Description\n\nThe `[Symbol.species]` accessor property returns the default constructor for `Array` objects. Subclass constructors may override it to change the constructor assignment. The default implementation is basically:\n\n```js\n// Hypothetical underlying implementation for illustration\nclass Array {\n  static get [Symbol.species]() {\n    return this;\n  }\n}\n```\n\nBecause of this polymorphic implementation, `[Symbol.species]` of derived subclasses would also return the constructor itself by default.\n\n```js\nclass SubArray extends Array {}\nSubArray[Symbol.species] === SubArray; // true\n```\n\nWhen calling array methods that do not mutate the existing array but return a new array instance (for example, `filter()` and `map()`), the array's `constructor[Symbol.species]` will be accessed. The returned constructor will be used to construct the return value of the array method. This makes it technically possible to make array methods return objects unrelated to arrays.\n\n```js\nclass NotAnArray {\n  constructor(length) {\n    this.length = length;\n  }\n}\n\nconst arr = [0, 1, 2];\narr.constructor = { [Symbol.species]: NotAnArray };\narr.map((i) => i); // NotAnArray { '0': 0, '1': 1, '2': 2, length: 3 }\narr.filter((i) => i); // NotAnArray { '0': 1, '1': 2, length: 0 }\narr.concat([1, 2]); // NotAnArray { '0': 0, '1': 1, '2': 2, '3': 1, '4': 2, length: 5 }\n```\n"
  },
  {
    "path": "documentation/docs/globals/Array/Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array()\n\nThe **`Array()`** constructor is used to create `Array` objects.\n\n## Syntax\n\n```js\nnew Array(element0, element1, /* … ,*/ elementN)\nnew Array(arrayLength)\n\nArray(element0, element1, /* … ,*/ elementN)\nArray(arrayLength)\n```\n\n> **Note:** `Array()` can be called with or without `new`. Both create a new `Array` instance.\n\n### Parameters\n\n- `elementN`\n  - : A JavaScript array is initialized with the given elements, except in the case where\n    a single argument is passed to the `Array` constructor and that argument is\n    a number (see the `arrayLength` parameter below). Note that this special case only\n    applies to JavaScript arrays created with the `Array` constructor, not\n    array literals created with the bracket syntax.\n- `arrayLength`\n  - : If the only argument passed to the `Array` constructor is an integer\n    between 0 and 2<sup>32</sup> - 1 (inclusive), this returns a new JavaScript array with\n    its `length` property set to that number (**Note:** this\n    implies an array of `arrayLength` empty slots, not slots with actual\n    `undefined` values).\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if there's only one argument (`arrayLength`) and its value is not between 0 and 2<sup>32</sup> - 1 (inclusive).\n"
  },
  {
    "path": "documentation/docs/globals/Array/from.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.from\n\nThe **`Array.from()`** static method creates a new, shallow-copied `Array` instance from an iterable or array-like object.\n\n## Syntax\n\n```js\nArray.from(arrayLike)\n\n// Arrow function\nArray.from(arrayLike, (element) => { /* … */ })\nArray.from(arrayLike, (element, index) => { /* … */ })\n\n// Mapping function\nArray.from(arrayLike, mapFn)\nArray.from(arrayLike, mapFn, thisArg)\n\n// Inline mapping function\nArray.from(arrayLike, function (element) { /* … */ })\nArray.from(arrayLike, function (element, index) { /* … */ })\nArray.from(arrayLike, function (element) { /* … */ }, thisArg)\nArray.from(arrayLike, function (element, index) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `arrayLike`\n  - : An iterable or array-like object to convert to an array.\n- `mapFn` _**optional**_\n\n  - : Map function to call on every element of the array. If provided, every value to be added to the array is first passed through this function, and `mapFn`'s return value is added to the array instead.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `mapFn`.\n\n### Return value\n\nA new `Array` instance.\n\n## Description\n\n`Array.from()` lets you create `Array`s from:\n\n- [iterable objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) (objects such as [`Map`](../Map/Map.mdx) and [`Set`](../Set/Set.mdx); or, if the object is not iterable,\n- array-like objects (objects with a `length` property and indexed elements).\n\n`Array.from()` never creates a sparse array. If the `arrayLike` object is missing some index properties, they become `undefined` in the new array.\n\n`Array.from()` has an optional parameter `mapFn`, which allows you to execute a function on each element of the array being created, similar to [`Array.prototype.map()`](./prototype/map.mdx). More clearly, `Array.from(obj, mapFn, thisArg)` has the same result as `Array.from(obj).map(mapFn, thisArg)`, except that it does not create an intermediate array, and `mapFn` only receives two arguments (`element`, `index`) without the whole array, because the array is still under construction.\n"
  },
  {
    "path": "documentation/docs/globals/Array/isArray.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.isArray()\n\nThe **`Array.isArray()`** static method determines whether the passed value is an `Array`.\n\n## Syntax\n\n```js\nArray.isArray(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be checked.\n\n### Return value\n\n`true` if `value` is an `Array`; otherwise, `false`. `false` is always returned if `value` is a `TypedArray` instance.\n\n## Description\n\n`Array.isArray()` checks if the passed value is an `Array`. It does not check the value's prototype chain, nor does it rely on the `Array` constructor it is attached to. It returns `true` for any value that was created using the array literal syntax or the `Array` constructor. This makes it safe to use with cross-realm objects, where the identity of the `Array` constructor is different and would therefore cause `instanceof Array` to fail.\n\nSee the article [\"Determining with absolute accuracy whether or not a JavaScript object is an array\"](https://web.mit.edu/jwalden/www/isArray.html) for more details.\n\n`Array.isArray()` also rejects objects with `Array.prototype` in its prototype chain but aren't actual arrays, which `instanceof Array` would accept.\n"
  },
  {
    "path": "documentation/docs/globals/Array/of.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.of()\nThe **`Array.of()`** method creates a new `Array`\ninstance from a variable number of arguments, regardless of number or type of the\narguments.\n\n## Syntax\n\n```js\nArray.of(element0)\nArray.of(element0, element1)\nArray.of(element0, element1, /* … ,*/ elementN)\n```\n\n### Parameters\n\n- `elementN`\n  - : Elements used to create the array.\n\n### Return value\n\nA new `Array` instance.\n\n## Description\n\nThe difference between `Array.of()` and the [`Array()`](./Array.mdx) constructor is in the handling of single arguments: `Array.of(7)` creates an array with a single element, `7`, whereas `Array(7)` creates an empty array with a `length` property of `7`. (That implies an array of 7 empty slots, not slots with actual [`undefined`](../undefined.mdx) values.)\n\n```js\nArray.of(7); // [7]\nArray(7); // array of 7 empty slots\n\nArray.of(1, 2, 3); // [1, 2, 3]\nArray(1, 2, 3); // [1, 2, 3]\n```\n\nThe `Array.of()` method is a generic factory method. For example, if a subclass of `Array` inherits the `of()` method, the inherited `of()` method will return new instances of the subclass instead of `Array` instances. In fact, the `this` value can be any constructor function that accepts a single argument representing the length of the new array, and the constructor will be called with the number of arguments passed to `of()`. The final `length` will be set again when all elements are assigned. If the `this` value is not a constructor function, the plain `Array` constructor is used instead.\n"
  },
  {
    "path": "documentation/docs/globals/Array/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype\\[Symbol.iterator]()\n\nThe **`Symbol.iterator`** method of an `Array` object implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows arrays to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the value of each index in the array.\n\nThe initial value of this property is the same function object as the initial value of the [`Array.prototype.values`](./values.mdx) property.\n\n## Syntax\n\n```js\narray[Symbol.iterator]()\n```\n\n### Return value\n\nThe same return value as [`Array.prototype.values()`](./values.mdx): a new iterable iterator object that yields the value of each index in the array.\n"
  },
  {
    "path": "documentation/docs/globals/Array/prototype/@@unscopables.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype[Symbol.unscopables]\n\nThe **`@@unscopables`** data property of `Array.prototype` is shared by all `Array` instances. It contains property names that were not included in the ECMAScript standard prior to the ES2015 version and that are ignored for [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) statement-binding purposes.\n\n## Value\n\nA [`null`-prototype object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects) with property names given below and their values set to `true`.\n\n## Description\n\nThe default `Array` properties that are ignored for `with` statement-binding purposes are:\n\n- [`at()`](./at.mdx)\n- [`copyWithin()`](./copyWithin.mdx)\n- [`entries()`](./entries.mdx)\n- [`fill()`](./fill.mdx)\n- [`find()`](./find.mdx)\n- [`findIndex()`](./findIndex.mdx)\n- [`flat()`](./flat.mdx)\n- [`flatMap()`](./flatMap.mdx)\n- [`includes()`](./includes.mdx)\n- [`keys()`](./keys.mdx)\n- [`values()`](./values.mdx)\n\n`Array.prototype[@@unscopables]` is an empty object only containing all the above property names with the value `true`. Its [prototype is `null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects), so `Object.prototype` properties like [`toString`](../../Object/prototype/toString.mdx) won't accidentally be made unscopable, and a `toString()` within the `with` statement will continue to be called on the array.\n\nSee [`Symbol.unscopables`](../../Symbol/unscopables.mdx) for how to set unscopable properties for your own objects.\n"
  },
  {
    "path": "documentation/docs/globals/Array/prototype/at.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.at\n\nThe **`at()`** method takes an integer value and returns the item at that index, allowing for positive and negative integers. Negative integers count back from the last item in the array.\n\n## Syntax\n\n```js\nat(index)\n```\n\n### Parameters\n\n- `index`\n  - : Zero-based index of the array element to be returned, converted to an integer. Negative index counts back from the end of the array — if `index < 0`, `index + array.length` is accessed.\n\n### Return value\n\nThe element in the array matching the given index. Always returns [`undefined`](../../../globals/undefined.mdx) if `index < -array.length` or `index >= array.length` without attempting to access the corresponding property.\n\n## Description\n\nThe `at()` method is equivalent to the bracket notation when `index` is non-negative. For example, `array[0]` and `array.at(0)` both return the first item. However, when counting elements from the end of the array, you cannot use `array[-1]` like you may in Python or R, because all values inside the square brackets are treated literally as string properties, so you will end up reading `array[\"-1\"]`, which is just a normal string property instead of an array index.\n\nThe usual practice is to access [`Array.prototype.length`](./length.mdx) and calculate the index from that — for example, `array[array.length - 1]`. The `at()` method allows relative indexing, so this can be shortened to `array.at(-1)`.\n\nThe `at()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/docs/globals/Array/prototype/concat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.concat\n\nThe **`concat()`** method is used to merge two or more arrays.\nThis method does not change the existing arrays, but instead returns a new array.\n\n## Syntax\n\n```js\nconcat()\nconcat(value0)\nconcat(value0, value1)\nconcat(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `valueN` _**optional**_\n  - : Arrays and/or values to concatenate into a new array. If all\n    `valueN` parameters are omitted, `concat` returns a\n    [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of the existing array on which it is called. See the description below\n    for more details.\n\n### Return value\n\nA new `Array` instance.\n\n## Description\n\nThe `concat` method creates a new array. The array will first be populated by the elements in the object on which it is called. Then, for each argument, its value will be concatenated into the array — for normal objects or primitives, the argument itself will become an element of the final array; for arrays or array-like objects with the property [`Symbol.isConcatSpreadable`](../../Symbol/isConcatSpreadable.mdx) set to a truthy value, each element of the argument will be independently added to the final array. The `concat` method does not recurse into nested array arguments.\n\nThe `concat()` method is a copying. It does not alter `this` or any of the arrays provided as arguments but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains the same elements as the ones from the original arrays.\n\nThe `concat()` method preserves empty slots if any of the source arrays is sparse.\n\nThe `concat()` method is generic. The `this` value is treated in the same way as the other arguments (except it will be converted to an object first), which means plain objects will be directly prepended to the resulting array, while array-like objects with truthy `Symbol.isConcatSpreadable` will be spread into the resulting array.\n"
  },
  {
    "path": "documentation/docs/globals/Array/prototype/copyWithin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.copyWithin\n\nThe **`copyWithin()`** method shallow copies part of an array\nto another location in the same array and returns it without modifying its length.\n\n\n\n## Syntax\n\n```js\ncopyWithin(target)\ncopyWithin(target, start)\ncopyWithin(target, start, end)\n```\n\n### Parameters\n\n- `target`\n  - : Zero-based index at which to copy the sequence to, converted to an integer.\n    - Negative index counts back from the end of the array — if `target < 0`, `target + array.length` is used.\n    - If `target < -array.length`, `0` is used.\n    - If `target >= array.length`, nothing is copied.\n    - If `target` is positioned after `start` after normalization, copying only happens until the end of `array.length` (in other words, `copyWithin()` never extends the array).\n- `start` _**optional**_\n  - : Zero-based index at which to start copying elements from, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, nothing is copied.\n- `end` _**optional**_\n  - : Zero-based index at which to end copying elements from, converted to an integer. `copyWithin()` copies up to but not including `end`.\n    - Negative index counts back from the end of the array — if `end < 0`, `end + array.length` is used.\n    - If `end < -array.length`, `0` is used.\n    - If `end >= array.length` or `end` is omitted, `array.length` is used, causing all elements until the end to be copied.\n    - If `end` is positioned before or at `start` after normalization, nothing is copied.\n\n### Return value\n\nThe modified array.\n\n## Description\n\nThe `copyWithin()` method works like C and C++'s `memmove`, and is a high-performance method to shift the data of an `Array`. The sequence is copied and pasted as one operation; the pasted sequence will have the copied values even when the copy and paste region overlap.\n\nThe `copyWithin()` method is a mutating method. It does not alter the length of `this`, but it will change the content of `this` and create new properties or delete existing properties, if necessary.\n\nThe `copyWithin()` method preserves empty slots. If the region to be copied from is sparse, the empty slots' corresponding new indices are [deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) and also become empty slots.\n\nThe `copyWithin()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/docs/globals/Array/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.entries\n\nThe **`entries()`** method returns a new **Array\nIterator** object that contains the key/value pairs for each index in the\narray.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nA new `Array` iterator object.\n\n## Description\n\nWhen used on sparse arrays, the `entries()` method iterates empty slots as if they have the value `undefined`.\n\nThe `entries()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/docs/globals/Array/prototype/every.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.every\n\nThe **`every()`** method tests whether\nall elements in the array pass the test implemented by the provided function. It\nreturns a Boolean value.\n\n## Syntax\n\n```js\n// Arrow function\nevery((element) => { /* … */ })\nevery((element, index) => { /* … */ })\nevery((element, index, array) => { /* … */ })\n\n// Callback function\nevery(callbackFn)\nevery(callbackFn, thisArg)\n\n// Inline callback function\nevery(function (element) { /* … */ })\nevery(function (element, index) { /* … */ })\nevery(function (element, index, array) { /* … */ })\nevery(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value to indicate the element passes the test, and a falsy value otherwise.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `every()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\n`true` if `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value for every array element. Otherwise, `false`.\n\n## Description\n\nThe `every()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array, until the `callbackFn` returns a [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value. If such an element is found, `every()` immediately returns `false` and stops iterating through the array. Otherwise, if `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value for all elements, `every()` returns `true`.\n\n`every` acts like the \"for all\" quantifier in mathematics. In particular, for an empty array, it returns `true`. (It is [vacuously true](https://en.wikipedia.org/wiki/Vacuous_truth) that all elements of the [empty set](https://en.wikipedia.org/wiki/Empty_set#Properties) satisfy any given condition.)\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\n`every()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `every()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `every()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/docs/globals/Array/prototype/fill.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.fill\n\nThe **`fill()`** method changes all elements in an array to a static value, from a start index (default `0`) to an end index (default `array.length`).\nIt returns the modified array.\n\n## Syntax\n\n```js\nfill(value)\nfill(value, start)\nfill(value, start, end)\n```\n\n### Parameters\n\n- `value`\n  - : Value to fill the array with. Note all elements in the array will be this exact value: if `value` is an object, each slot in the array will reference that object.\n- `start` _**optional**_\n  - : Zero-based index at which to start filling, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, no index is filled.\n- `end` _**optional**_\n  - : Zero-based index at which to end filling, converted to an integer. `fill()` fills up to but not including `end`.\n    - Negative index counts back from the end of the array — if `end < 0`, `end + array.length` is used.\n    - If `end < -array.length`, `0` is used.\n    - If `end >= array.length` or `end` is omitted, `array.length` is used, causing all indices until the end to be filled.\n    - If `end` is positioned before or at `start` after normalization, no index is filled.\n\n### Return value\n\nThe modified array, filled with `value`.\n\n## Description\n\nThe `fill()` method is a mutating method. It does not alter the length of `this`, but it will change the content of `this`.\n\nThe `fill()` method fills empty slots in sparse arrays with `value` as well.\n\nThe `fill()` method is generic. It only expects the `this` value to have a `length` property. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/docs/globals/Array/prototype/filter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.filter\n\nThe **`filter()`** method creates a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of a portion of a given array, filtered down to just the elements from the given array that pass the test implemented by the provided function.\n\n## Syntax\n\n```js\n// Arrow function\nfilter((element) => { /* … */ })\nfilter((element, index) => { /* … */ })\nfilter((element, index, array) => { /* … */ })\n\n// Callback function\nfilter(callbackFn)\nfilter(callbackFn, thisArg)\n\n// Inline callback function\nfilter(function (element) { /* … */ })\nfilter(function (element, index) { /* … */ })\nfilter(function (element, index, array) { /* … */ })\nfilter(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) to keep the element in the resulting array, and a falsy value otherwise.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `filter()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\nA [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of a portion of the given array, filtered down to just the elements from the given array that pass the test implemented by the provided function. If no elements pass the test, an empty array will be returned.\n\n## Description\n\nThe `filter()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array, and constructs a new array of all the values for which `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. Array elements which do not pass the `callbackFn` test are not included in the new array.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nThe `filter()` method is a copying method. It does not alter `this` but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains the same elements as the ones from the original array (with some filtered out). However, the function provided as `callbackFn` can mutate the array. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `filter()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\nThe `filter()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/docs/globals/Array/prototype/find.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.find()\n\nThe `find()` method returns the first element in the provided array that satisfies the provided testing function.\nIf no values satisfy the testing function, [`undefined`](../../../globals/undefined.mdx) is returned.\n\n- If you need the **index** of the found element in the array, use [`findIndex()`](./findIndex.mdx).\n- If you need to find the **index of a value**, use [`indexOf()`](./indexOf.mdx).\n  (It's similar to [`findIndex()`](./findIndex.mdx), but checks each element for equality with the value instead of using a testing function.)\n- If you need to find if a value **exists** in an array, use [`includes()`](./includes.mdx).\n  Again, it checks each element for equality with the value instead of using a testing function.\n- If you need to find if any element satisfies the provided testing function, use [`some()`](./some.mdx).\n\n## Syntax\n\n```js\n// Arrow function\nfind((element) => { /* … */ })\nfind((element, index) => { /* … */ })\nfind((element, index, array) => { /* … */ })\n\n// Callback function\nfind(callbackFn)\nfind(callbackFn, thisArg)\n\n// Inline callback function\nfind(function (element) { /* … */ })\nfind(function (element, index) { /* … */ })\nfind(function (element, index, array) { /* … */ })\nfind(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value to indicate a matching element has been found.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `find()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\nThe first element in the array that satisfies the provided testing function.\nOtherwise, [`undefined`](../../../globals/undefined.mdx) is returned.\n\n## Description\n\nThe `find()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array in ascending-index order, until `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. `find()` then returns that element and stops iterating through the array. If `callbackFn` never returns a truthy value, `find()` returns [`undefined`](../../../globals/undefined.mdx).\n\n`callbackFn` is invoked for _every_ index of the array, not just those with assigned values. Empty slots in sparse arrays behave the same as `undefined`.\n\n`find()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `find()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are visited as if they were `undefined`.\n\nThe `find()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/docs/globals/Array/prototype/findIndex.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.findIndex\n\nThe **`findIndex()`** method returns the index of the first element in an array that satisfies the provided testing function.\nIf no elements satisfy the testing function, -1 is returned.\n\nSee also the [`find()`](./find.mdx) method, which returns the first element that satisfies the testing function (rather than its index).\n\n## Syntax\n\n```js\n// Arrow function\nfindIndex((element) => { /* … */ })\nfindIndex((element, index) => { /* … */ })\nfindIndex((element, index, array) => { /* … */ })\n\n// Callback function\nfindIndex(callbackFn)\nfindIndex(callbackFn, thisArg)\n\n// Inline callback function\nfindIndex(function (element) { /* … */ })\nfindIndex(function (element, index) { /* … */ })\nfindIndex(function (element, index, array) { /* … */ })\nfindIndex(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value to indicate a matching element has been found.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `findIndex()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\nThe index of the first element in the array that passes the test. Otherwise, `-1`.\n\n## Description\n\nThe `findIndex()` is an iterative method. It calls a provided `callbackFn` function once for each element in an array in ascending-index order, until `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. `findIndex()` then returns the index of that element and stops iterating through the array. If `callbackFn` never returns a truthy value, `findIndex()` returns `-1`.\n\n`callbackFn` is invoked for _every_ index of the array, not just those with assigned values. Empty slots in sparse arrays behave the same as `undefined`.\n\n`findIndex()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `findIndex()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are visited as if they were `undefined`.\n\nThe `findIndex()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/docs/globals/Array/prototype/flat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.flat\n\nThe **`flat()`** method creates a new array with all sub-array\nelements concatenated into it recursively up to the specified depth.\n\n## Syntax\n\n```js\nflat()\nflat(depth)\n```\n\n### Parameters\n\n- `depth` _**optional**_\n  - : The depth level specifying how deep a nested array structure should be flattened.\n    Defaults to 1.\n\n### Return value\n\nA new array with the sub-array elements concatenated into it.\n\n## Description\n\nThe `flat()` method is a copying method. It does not alter `this` but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains the same elements as the ones from the original array.\n\nThe `flat()` method ignores empty slots if the array being flattened is sparse. For example, if `depth` is 1, both empty slots in the root array and in the first level of nested arrays are ignored, but empty slots in further nested arrays are preserved with the arrays themselves.\n\nThe `flat()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. However, its elements must be arrays if they are to be flattened.\n"
  },
  {
    "path": "documentation/docs/globals/Array/prototype/flatMap.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.flatMap()\n\nThe **`flatMap()`** method returns a new array formed by applying a given callback function to each element of the array, and then flattening the result by one level. It is identical to a [`Array.prototype.map()`](./map.mdx) followed by a [`Array.prototype.flat()`](./flat.mdx) of depth 1 (`arr.map(...args).flat()`), but slightly more efficient than calling those two methods separately.\n\n## Syntax\n\n```js\n// Arrow function\nflatMap((element) => { /* … */ })\nflatMap((element, index) => { /* … */ })\nflatMap((element, index, array) => { /* … */ })\n\n// Callback function\nflatMap(callbackFn)\nflatMap(callbackFn, thisArg)\n\n// Inline callback function\nflatMap(function (element) { /* … */ })\nflatMap(function (element, index) { /* … */ })\nflatMap(function (element, index, array) { /* … */ })\nflatMap(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return an array containing new elements of the new array, or a single non-array value to be added to the new array.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `flatMap()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\nA new array with each element being the result of the callback function and flattened\nby a depth of 1.\n\n## Description\n\nThe `flatMap()` method is an iterative method. See [`Array.prototype.map()`](./map.mdx) for a detailed description of the callback function. The `flatMap()` method is identical to [`map(callbackFn, thisArg)`](./map.mdx) followed by [`flat(1)`](./flat.mdx) — for each element, it produces an array of new elements, and concatenates the resulting arrays together to form a new array.\n\nThe `flatMap()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. However, the value returned from `callbackFn` must be an array if it is to be flattened.\n"
  },
  {
    "path": "documentation/docs/globals/Array/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.forEach()\n\nThe **`forEach()`** method executes a provided function once\nfor each array element.\n\n## Syntax\n\n```js\n// Arrow function\nforEach((element) => { /* … */ })\nforEach((element, index) => { /* … */ })\nforEach((element, index, array) => { /* … */ })\n\n// Callback function\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n\n// Inline callback function\nforEach(function (element) { /* … */ })\nforEach(function (element, index) { /* … */ })\nforEach(function (element, index, array) { /* … */ })\nforEach(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value is discarded.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `forEach()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\n`undefined`.\n\n## Description\n\nThe `forEach()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array in ascending-index order. Unlike [`Array.prototype.map()`](./map.mdx), `forEach()` always returns [`undefined`](../../../globals/undefined.mdx) and is not chainable. The typical use case is to execute side effects at the end of a chain.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\n`forEach()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `forEach()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\nThe `forEach()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n\nThere is no way to stop or break a `forEach()` loop other than by throwing an exception. If you need such behavior, the `forEach()` method is the wrong tool.\n\nEarly termination may be accomplished with looping statements like [`for`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for), [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of), and [`for...in`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...in). Array methods like [`Array.prototype.some()`](./some.mdx), [`Array.prototype.some()`](./some.mdx), [`Array.prototype.find()`](./find.mdx), and [`Array.prototype.findIndex()`](./findIndex.mdx) also stops iteration immediately when further iteration is not necessary.\n\n"
  },
  {
    "path": "documentation/docs/globals/Array/prototype/includes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.includes()\n\nThe **`includes()`** method determines whether an array\nincludes a certain value among its entries, returning `true` or\n`false` as appropriate.\n\n## Syntax\n\n```js\nincludes(searchElement)\nincludes(searchElement, fromIndex)\n```\n\n### Parameters\n\n- `searchElement`\n  - : The value to search for.\n- `fromIndex` _**optional**_\n  - : Zero-based index at which to start searching, converted to an integer.\n    - Negative index counts back from the end of the array — if `fromIndex < 0`, `fromIndex + array.length` is used. However, the array is still searched from front to back in this case.\n    - If `fromIndex < -array.length` or `fromIndex` is omitted, `0` is used, causing the entire array to be searched.\n    - If `fromIndex >= array.length`, the array is not searched and `false` is returned.\n\n### Return value\n\nA boolean value which is `true` if the value `searchElement` is found within the array (or the part of the array indicated by the index `fromIndex`, if specified).\n\n## Description\n\nThe `includes()` method compares `searchElement` to elements of the array using the [SameValueZero](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) algorithm. Values of zero are all considered to be equal, regardless of sign. (That is, `-0` is equal to `0`), but `false` is _not_ considered to be the same as `0`. [`NaN`](../../NaN.mdx) can be correctly searched for.\n\nWhen used on sparse arrays, the `includes()` method iterates empty slots as if they have the value `undefined`.\n\nThe `includes()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/docs/globals/Array/prototype/indexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.indexOf()\n\nThe **`indexOf()`** method returns the first index at which a\ngiven element can be found in the array, or -1 if it is not present.\n\n## Syntax\n\n```js\nindexOf(searchElement)\nindexOf(searchElement, fromIndex)\n```\n\n### Parameters\n\n- `searchElement`\n  - : Element to locate in the array.\n- `fromIndex` _**optional**_\n  - : Zero-based index at which to start searching, converted to an integer.\n    - Negative index counts back from the end of the array — if `fromIndex < 0`, `fromIndex + array.length` is used. Note, the array is still searched from front to back in this case.\n    - If `fromIndex < -array.length` or `fromIndex` is omitted, `0` is used, causing the entire array to be searched.\n    - If `fromIndex >= array.length`, the array is not searched and `-1` is returned.\n\n### Return value\n\nThe first index of the element in the array; **-1** if not found.\n\n## Description\n\nThe `indexOf()` method compares `searchElement` to elements of the array using [strict equality](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) (the same algorithm used by the `===` operator).\n\nThe `indexOf()` method skips empty slots in sparse arrays.\n\nThe `indexOf()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/docs/globals/Array/prototype/join.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.join()\n\nThe **`join()`** method creates and\nreturns a new string by concatenating all of the elements in an array\n(or an [array-like object](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects)),\nseparated by commas or a specified separator string. If the array has\nonly one item, then that item will be returned without using the separator.\n\n## Syntax\n\n```js\njoin()\njoin(separator)\n```\n\n### Parameters\n\n- `separator` _**optional**_\n  - : Specifies a string to separate each pair of adjacent elements of the array. The\n    separator is converted to a string if necessary. If omitted, the array elements are\n    separated with a comma (\",\"). If `separator` is an empty string, all\n    elements are joined without any characters in between them.\n\n### Return value\n\nA string with all array elements joined. If `arr.length` is\n`0`, the empty string is returned.\n\n## Description\n\nThe string conversions of all array elements are joined into one string. If an element is `undefined`, `null`, it is converted to an empty string instead of the string `\"null\"` or `\"undefined\"`.\n\nThe `join` method is accessed internally by [`Array.prototype.toString()`](./toString.mdx) with no arguments. Overriding `join` of an array instance will override its `toString` behavior as well.\n\nWhen used on sparse arrays, the `join()` method iterates empty slots as if they have the value `undefined`.\n\nThe `join()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/docs/globals/Array/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.keys()\n\nThe **`keys()`** method returns a new **Array\nIterator** object that contains the keys for each index in the array.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nA new `Array` iterator object.\n\n## Description\n\nWhen used on sparse arrays, the `keys()` method iterates empty slots as if they have the value `undefined`.\n\nThe `keys()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/docs/globals/Array/prototype/lastIndexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.lastIndexOf()\n\nThe **`lastIndexOf()`** method returns the last index at which\na given element can be found in the array, or -1 if it is not present. The array is\nsearched backwards, starting at `fromIndex`.\n\n## Syntax\n\n```js\nlastIndexOf(searchElement)\nlastIndexOf(searchElement, fromIndex)\n```\n\n### Parameters\n\n- `searchElement`\n  - : Element to locate in the array.\n- `fromIndex` _**optional**_\n  - : Zero-based index at which to start searching backwards, converted to an integer.\n    - Negative index counts back from the end of the array — if `fromIndex < 0`, `fromIndex + array.length` is used.\n    - If `fromIndex < -array.length`, the array is not searched and `-1` is returned. You can think of it conceptually as starting at a nonexistent position before the beginning of the array and going backwards from there. There are no array elements on the way, so `searchElement` is never found.\n    - If `fromIndex >= array.length` or `fromIndex` is omitted, `array.length - 1` is used, causing the entire array to be searched. You can think of it conceptually as starting at a nonexistent position beyond the end of the array and going backwards from there. It eventually reaches the real end position of the array, at which point it starts searching backwards through the actual array elements.\n\n### Return value\n\nThe last index of the element in the array; **-1** if not found.\n\n## Description\n\nThe `lastIndexOf()` method compares `searchElement` to elements of the array using [strict equality](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) (the same algorithm used by the `===` operator).\n\nThe `lastIndexOf()` method skips empty slots in sparse arrays.\n\nThe `lastIndexOf()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/docs/globals/Array/prototype/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.length\n\nThe **`length`** data property of an `Array` instance represents the number of elements in that array. The value is an unsigned, 32-bit integer that is always numerically greater than the highest index in the array.\n\n## Value\n\nA non-negative integer less than 2<sup>32</sup>.\n\n## Description\n\nThe value of the `length` property is a non-negative integer with a value less than 2<sup>32</sup>.\n\n```js\nconst listA = [1, 2, 3];\nconst listB = new Array(6);\n\nconsole.log(listA.length);\n// 3\n\nconsole.log(listB.length);\n// 6\n\nlistB.length = 2 ** 32; // 4294967296\n// RangeError: Invalid array length\n\nconst listC = new Array(-100); // Negative numbers are not allowed\n// RangeError: Invalid array length\n```\n\nThe array object observes the `length` property, and automatically syncs the `length` value with the array's content. This means:\n\n- Setting `length` to a value smaller than the current length truncates the array — elements beyond the new `length` are deleted.\n- Setting any array index (a non-negative integer smaller than 2<sup>32</sup>) beyond the current `length` extends the array — the `length` property is increased to reflect the new highest index.\n- Setting `length` to an invalid value (e.g. a negative number or a non-integer) throws a `RangeError` exception.\n"
  },
  {
    "path": "documentation/docs/globals/Array/prototype/map.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.map()\n\nThe **`map()`** method **creates\na new array** populated with the results of calling a provided function on\nevery element in the calling array.\n\n## Syntax\n\n```js\n// Arrow function\nmap((element) => { /* … */ })\nmap((element, index) => { /* … */ })\nmap((element, index, array) => { /* … */ })\n\n// Callback function\nmap(callbackFn)\nmap(callbackFn, thisArg)\n\n// Inline callback function\nmap(function (element) { /* … */ })\nmap(function (element, index) { /* … */ })\nmap(function (element, index, array) { /* … */ })\nmap(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value is added as a single element in the new array.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `map()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\nA new array with each element being the result of the callback function.\n\n## Description\n\nThe `map()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array and constructs a new array from the results.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nThe `map()` method is a copying method. It does not alter `this`. However, the function provided as `callbackFn` can mutate the array. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `map()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `map()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n\nSince `map` builds a new array, calling it without using the returned\narray is an anti-pattern; use [`Array.prototype.forEach()`](./forEach.mdx) or\n`for...of` instead.\n"
  },
  {
    "path": "documentation/docs/globals/Array/prototype/pop.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.pop()\n\nThe **`pop()`** method removes the **last**\nelement from an array and returns that element. This method changes the length of the\narray.\n\n## Syntax\n\n```js\npop()\n```\n\n### Return value\n\nThe removed element from the array; [`undefined`](../../../globals/undefined.mdx) if the array is empty.\n\n## Description\n\nThe `pop()` method removes the last element from an array and returns that value to the caller. If you call `pop()` on an empty array, it returns [`undefined`](../../../globals/undefined.mdx).\n\n[`Array.prototype.shift()`](./shift.mdx) has similar behavior to `pop()`, but applied to the first element in an array.\n\nThe `pop()` method is a mutating method. It changes the length and the content of `this`. In case you want the value of `this` to be the same, but return a new array with the last element removed, you can use [`arr.slice(0, -1)`](./slice.mdx) instead.\n\nThe `pop()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/docs/globals/Array/prototype/push.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.push()\n\nThe **`push()`** method adds one or more elements to the end of\nan array and returns the new length of the array.\n\n## Syntax\n\n```js\npush(element0)\npush(element0, element1)\npush(element0, element1, /* … ,*/ elementN)\n```\n\n### Parameters\n\n- `elementN`\n  - : The element(s) to add to the end of the array.\n\n### Return value\n\nThe new [`Array.prototype.length`](./length.mdx) property of the object upon which the method was called.\n\n## Description\n\nThe `push()` method appends values to an array.\n\n[`Array.prototype.unshift()`](./unshift.mdx)has similar behavior to `push()`, but applied to the start of an array.\n\nThe `push()` method is a mutating method. It changes the length and the content of `this`. In case you want the value of `this` to be the same, but return a new array with elements appended to the end, you can use [`arr.concat([element0, element1, /* ... ,*/ elementN])`](./concat.mdx) instead. Notice that the elements are wrapped in an extra array — otherwise, if the element is an array itself, it would be spread instead of pushed as a single element due to the behavior of `concat()`.\n\nThe `push()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/docs/globals/Array/prototype/reduce.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.reduce()\n\nThe **`reduce()`** method executes a user-supplied \"reducer\" callback function on each element of the array, in order, passing in the return value from the calculation on the preceding element.\nThe final result of running the reducer across all elements of the array is a single value.\n\nThe first time that the callback is run there is no \"return value of the previous calculation\".\nIf supplied, an initial value may be used in its place.\nOtherwise the array element at index 0 is used as the initial value and iteration starts from the next element (index 1 instead of index 0).\n\nPerhaps the easiest-to-understand case for `reduce()` is to return the sum of all the elements in an array:\n\nThe reducer walks through the array element-by-element, at each step adding the current array value to the result from the previous step (this result is the running sum of all the previous steps) — until there are no more elements to add.\n\n## Syntax\n\n```js\n// Arrow function\nreduce((accumulator, currentValue) => { /* … */ })\nreduce((accumulator, currentValue, currentIndex) => { /* … */ })\nreduce((accumulator, currentValue, currentIndex, array) => { /* … */ })\n\nreduce((accumulator, currentValue) => { /* … */ }, initialValue)\nreduce((accumulator, currentValue, currentIndex) => { /* … */ }, initialValue)\nreduce((accumulator, currentValue, currentIndex, array) => { /* … */ }, initialValue)\n\n// Callback function\nreduce(callbackFn)\nreduce(callbackFn, initialValue)\n\n// Inline callback function\nreduce(function (accumulator, currentValue) { /* … */ })\nreduce(function (accumulator, currentValue, currentIndex) { /* … */ })\nreduce(function (accumulator, currentValue, currentIndex, array) { /* … */ })\n\nreduce(function (accumulator, currentValue) { /* … */ }, initialValue)\nreduce(function (accumulator, currentValue, currentIndex) { /* … */ }, initialValue)\nreduce(function (accumulator, currentValue, currentIndex, array) { /* … */ }, initialValue)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value becomes the value of the `accumulator` parameter on the next invocation of `callbackFn`. For the last invocation, the return value becomes the return value of `reduce()`.\n\n    The function is called with the following arguments:\n\n    - `accumulator`\n      - : The value resulting from the previous call to `callbackFn`. On first call, `initialValue` if specified, otherwise the value of `array[0]`.\n    - `currentValue`\n      - : The value of the current element. On first call, the value of `array[0]` if an `initialValue` was specified, otherwise the value of `array[1]`.\n    - `currentIndex`\n      - : The index position of `currentValue` in the array. On first call, `0` if `initialValue` was specified, otherwise `1`.\n    - `array`\n      - : The array `reduce()` was called upon.\n\n- `initialValue` _**optional**_\n  - : A value to which `accumulator` is initialized the first time the callback is called.\n    If `initialValue` is specified, `callbackFn` starts executing with the first value in the array as `currentValue`.\n    If `initialValue` is _not_ specified, `accumulator` is initialized to the first value in the array, and `callbackFn` starts executing with the second value in the array as `currentValue`. In this case, if the array is empty (so that there's no first value to return as `accumulator`), an error is thrown.\n\n### Return value\n\nThe value that results from running the \"reducer\" callback function to completion over the entire array.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n\n  - : The array contains no elements and `initialValue` is not provided.\n\n## Description\n\nThe `reduce()` method is an iterative method. It runs a \"reducer\" callback function over all elements in the array, in ascending-index order, and accumulates them into a single value. Every time, the return value of `callbackFn` is passed into `callbackFn` again on next invocation as `accumulator`. The final value of `accumulator` (which is the value returned from `callbackFn` on the final iteration of the array) becomes the return value of `reduce()`.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nUnlike other [iterative methods](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array#iterative_methods), `reduce()` does not accept a `thisArg` argument. `callbackFn` is always called with `undefined` as `this`, which gets substituted with `globalThis` if `callbackFn` is non-strict.\n\n`reduce()` is a central concept in [functional programming](https://en.wikipedia.org/wiki/Functional_programming), where it's not possible to mutate any value, so in order to accumulate all values in an array, one must return a new accumulator value on every iteration. This convention propagates to JavaScript's `reduce()`: you should use [spreading](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) or other copying methods where possible to create new arrays and objects as the accumulator, rather than mutating the existing one. If you decided to mutate the accumulator instead of copying it, remember to still return the modified object in the callback, or the next iteration will receive undefined.\n\n`reduce()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `reduce()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `reduce()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n\n### When to not use reduce()\n\nRecursive functions like `reduce()` can be powerful but sometimes difficult to understand, especially for less-experienced JavaScript developers. If code becomes clearer when using other array methods, developers must weigh the readability tradeoff against the other benefits of using `reduce()`. In cases where `reduce()` is the best choice, documentation and semantic variable naming can help mitigate readability drawbacks.\n\n### Edge cases\n\nIf the array only has one element (regardless of position) and no `initialValue` is provided, or if `initialValue` is provided but the array is empty, the solo value will be returned _without_ calling `callbackFn`.\n\nIf `initialValue` is provided and the array is not empty, then the reduce method will always invoke the callback function starting at index 0.\n\nIf `initialValue` is not provided then the reduce method will act differently for arrays with length larger than 1, equal to 1 and 0, as shown in the following example:\n\n```js\nconst getMax = (a, b) => Math.max(a, b);\n\n// callback is invoked for each element in the array starting at index 0\n[1, 100].reduce(getMax, 50); // 100\n[50].reduce(getMax, 10); // 50\n\n// callback is invoked once for element at index 1\n[1, 100].reduce(getMax); // 100\n\n// callback is not invoked\n[50].reduce(getMax); // 50\n[].reduce(getMax, 1); // 1\n\n[].reduce(getMax); // TypeError\n```\n"
  },
  {
    "path": "documentation/docs/globals/Array/prototype/reduceRight.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.reduceRight()\n\nThe **`reduceRight()`** method applies a function against an\naccumulator and each value of the array (from right-to-left) to reduce it to a single\nvalue.\n\nSee also [`Array.prototype.reduce()`](./reduce.mdx) for left-to-right.\n\n## Syntax\n\n```js\n// Arrow function\nreduceRight((accumulator, currentValue) => { /* … */ })\nreduceRight((accumulator, currentValue, index) => { /* … */ })\nreduceRight((accumulator, currentValue, index, array) => { /* … */ })\nreduceRight((accumulator, currentValue, index, array) => { /* … */ }, initialValue)\n\n// Callback function\nreduceRight(callbackFn)\nreduceRight(callbackFn, initialValue)\n\n// Callback reducer function\nreduceRight(function (accumulator, currentValue) { /* … */ })\nreduceRight(function (accumulator, currentValue, index) { /* … */ })\nreduceRight(function (accumulator, currentValue, index, array) { /* … */ })\nreduceRight(function (accumulator, currentValue, index, array) { /* … */ }, initialValue)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value becomes the value of the `accumulator` parameter on the next invocation of `callbackFn`. For the last invocation, the return value becomes the return value of `reduce()`.\n\n    The function is called with the following arguments:\n\n    - `accumulator`\n      - : The value previously returned in the last invocation of the callback, or\n        `initialValue`, if supplied. (See below.)\n    - `currentValue`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `reduceRight()` was called upon.\n\n- `initialValue` _**optional**_\n  - : Value to use as accumulator to the first call of the\n    `callbackFn`. If no initial value is supplied, the last element in\n    the array will be used and skipped. Calling reduce or reduceRight on an empty array\n    without an initial value creates a `TypeError`.\n\n### Return value\n\nThe value that results from the reduction.\n\n## Description\n\nThe `reduceRight()` method is an iterative method. It runs a \"reducer\" callback function over all elements in the array, in descending-index order, and accumulates them into a single value.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nUnlike other [iterative methods](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array#iterative_methods), `reduce()` does not accept a `thisArg` argument. `callbackFn` is always called with `undefined` as `this`, which gets substituted with `globalThis` if `callbackFn` is non-strict.\n\n`reduceRight()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `reduceRight()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `reduceRight()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/docs/globals/Array/prototype/reverse.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.reverse()\n\nThe **`reverse()`** method reverses an array _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_ and returns the reference to the same array, the first array element now becoming the last, and the last array element becoming the first. In other words, elements order in the array will be turned towards the direction opposite to that previously stated.\n\n## Syntax\n\n```js\nreverse()\n```\n\n### Return value\n\nThe reference to the original array, now reversed. Note that the array is reversed _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_, and no copy is made.\n\n## Description\n\nThe `reverse()` method transposes the elements of the calling array object in\nplace, mutating the array, and returning a reference to the array.\n\nThe `reverse()` method preserves empty slots. If the source array is sparse, the empty slots' corresponding new indices are [deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) and also become empty slots.\n\nThe `reverse()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/docs/globals/Array/prototype/shift.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.shift()\n\nThe **`shift()`** method removes the **first**\nelement from an array and returns that removed element. This method changes the length\nof the array.\n\n## Syntax\n\n```js\nshift()\n```\n\n### Return value\n\nThe removed element from the array; [`undefined`](../../../globals/undefined.mdx) if the array is empty.\n\n## Description\n\nThe `shift()` method removes the element at the zeroth index and shifts the\nvalues at consecutive indexes down, then returns the removed value. If the\n[`Array.prototype.length`](./length.mdx) property is 0, [`undefined`](../../../globals/undefined.mdx) is returned.\n\nThe [`Array.prototype.pop()`](./pop.mdx) method has similar behavior to `shift()`, but applied to the last element in an array.\n\nThe `shift()` method is a mutating method. It changes the length and the content of `this`. In case you want the value of `this` to be the same, but return a new array with the first element removed, you can use [`arr.slice(1)`](./slice.mdx) instead.\n\nThe `shift()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/docs/globals/Array/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.slice()\n\nThe **`slice()`** method returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of a portion of\nan array into a new array object selected from `start` to `end`\n(`end` not included) where `start` and `end` represent\nthe index of items in that array. The original array will not be modified.\n\n## Syntax\n\n```js\nslice()\nslice(start)\nslice(start, end)\n```\n\n### Parameters\n\n- `start` _**optional**_\n  - : Zero-based index at which to start extraction, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, nothing is extracted.\n- `end` _**optional**_\n  - : Zero-based index at which to end extraction, converted to an integer. `slice()` extracts up to but not including `end`.\n    - Negative index counts back from the end of the array — if `end < 0`, `end + array.length` is used.\n    - If `end < -array.length`, `0` is used.\n    - If `end >= array.length` or `end` is omitted, `array.length` is used, causing all elements until the end to be extracted.\n    - If `end` is positioned before or at `start` after normalization, nothing is extracted.\n\n### Return value\n\nA new array containing the extracted elements.\n\n## Description\n\nThe `slice()` method is a copying method. It does not alter `this` but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains some of the same elements as the ones from the original array.\n\nThe `slice()` method preserves empty slots. If the sliced portion is sparse, the returned array is sparse as well.\n\nThe `slice()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/docs/globals/Array/prototype/some.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.some()\n\nThe **`some()`** method tests whether\nat least one element in the array passes the test implemented by the provided\nfunction. It returns true if, in the array, it finds an element for which the provided function returns true; otherwise it returns false. It doesn't modify the array.\n\n## Syntax\n\n```js\n// Arrow function\nsome((element) => { /* … */ })\nsome((element, index) => { /* … */ })\nsome((element, index, array) => { /* … */ })\n\n// Callback function\nsome(callbackFn)\nsome(callbackFn, thisArg)\n\n// Inline callback function\nsome(function (element) { /* … */ })\nsome(function (element, index) { /* … */ })\nsome(function (element, index, array) { /* … */ })\nsome(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) to indicate the element passes the test, and a falsy value otherwise.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `some()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\n`true` if the callback function returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value for at least one element in the array. Otherwise, `false`.\n\n## Description\n\nThe `some()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array, until the `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. If such an element is found, `some()` immediately returns `true` and stops iterating through the array. Otherwise, if `callbackFn` returns a [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value for all elements, `some()` returns `false`.\n\n`some()` acts like the \"there exists\" quantifier in mathematics. In particular, for an empty array, it returns `false` for any condition.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\n`some()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `some()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\nThe `some()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/docs/globals/Array/prototype/sort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.sort()\n\nThe **`sort()`** method sorts the elements of an array _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_ and returns the reference to the same array, now sorted. The default sort order is ascending, built upon converting the elements into strings, then comparing their sequences of UTF-16 code units values.\n\nThe time and space complexity of the sort cannot be guaranteed as it depends on the\nimplementation.\n\n## Syntax\n\n```js\n// Functionless\nsort()\n\n// Arrow function\nsort((a, b) => { /* … */ } )\n\n// Compare function\nsort(compareFn)\n\n// Inline compare function\nsort(function compareFn(a, b) { /* … */ })\n```\n\n### Parameters\n\n- `compareFn` _**optional**_\n\n  - : Specifies a function that defines the sort order. If omitted, the array elements are converted to strings, then sorted according to each character's Unicode code point value.\n\n    - `a`\n      - : The first element for comparison.\n    - `b`\n      - : The second element for comparison.\n\n### Return value\n\nThe reference to the original array, now sorted. Note that the array is sorted _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_, and no copy is made.\n\n## Description\n\nIf `compareFn` is not supplied, all non-`undefined` array\nelements are sorted by converting them to strings and comparing strings in UTF-16 code\nunits order. For example, \"banana\" comes before \"cherry\". In a numeric sort, 9 comes\nbefore 80, but because numbers are converted to strings, \"80\" comes before \"9\" in the\nUnicode order. All `undefined` elements are sorted to the end of the array.\n\nThe `sort()` method preserves empty slots. If the source array is sparse, the empty slots are moved to the end of the array, and always come after all the `undefined`.\n\n> **Note:** In UTF-16, Unicode characters above `\\uFFFF` are\n> encoded as two surrogate code units, of the range\n> `\\uD800` - `\\uDFFF`. The value of each code unit is taken\n> separately into account for the comparison. Thus the character formed by the surrogate\n> pair `\\uD855\\uDE51` will be sorted before the character\n> `\\uFF3A`.\n\nIf `compareFn` is supplied, all non-`undefined` array\nelements are sorted according to the return value of the compare function (all\n`undefined` elements are sorted to the end of the array, with no call to\n`compareFn`).\n\n| `compareFn(a, b)` return value | sort order                         |\n| ------------------------------ | ---------------------------------- |\n| > 0                            | sort `a` after `b`                 |\n| < 0                            | sort `a` before `b`                |\n| === 0                          | keep original order of `a` and `b` |\n\nSo, the compare function has the following form:\n\n```js\nfunction compareFn(a, b) {\n  if (a is less than b by some ordering criterion) {\n    return -1;\n  }\n  if (a is greater than b by the ordering criterion) {\n    return 1;\n  }\n  // a must be equal to b\n  return 0;\n}\n```\n\nMore formally, the comparator is expected to have the following properties, in order to ensure proper sort behavior:\n\n- _Pure_: The comparator does not mutate the objects being compared or any external state. (This is important because there's no guarantee _when_ and _how_ the comparator will be called, so any particular call should not produce visible effects to the outside.)\n- _Stable_: The comparator returns the same result with the same pair of input.\n- _Reflexive_: `compareFn(a, a) === 0`.\n- _Anti-symmetric_: `compareFn(a, b)` and `compareFn(b, a)` must both be `0` or have opposite signs.\n- _Transitive_: If `compareFn(a, b)` and `compareFn(b, c)` are both positive, zero, or negative, then `compareFn(a, c)` has the same positivity as the previous two.\n\nA comparator conforming to the constraints above will always be able to return all of `1`, `0`, and `-1`, or consistently return `0`. For example, if a comparator only returns `1` and `0`, or only returns `0` and `-1`, it will not be able to sort reliably because _anti-symmetry_ is broken. A comparator that always returns `0` will cause the array to not be changed at all, but is reliable nonetheless.\n\nThe default lexicographic comparator satisfies all constraints above.\n\nTo compare numbers instead of strings, the compare function can subtract `b`\nfrom `a`. The following function will sort the array in ascending order (if\nit doesn't contain `Infinity` and `NaN`):\n\n```js\nfunction compareNumbers(a, b) {\n  return a - b;\n}\n```\n\nThe `sort()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/docs/globals/Array/prototype/splice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.splice()\n\nThe **`splice()`** method changes the contents of an array by\nremoving or replacing existing elements and/or adding new elements [in place](https://en.wikipedia.org/wiki/In-place_algorithm). To access part of an array without modifying it, see [`Array.prototype.slice()`](./slice.mdx).\n\n## Syntax\n\n```js\nsplice(start)\nsplice(start, deleteCount)\nsplice(start, deleteCount, item1)\nsplice(start, deleteCount, item1, item2, itemN)\n```\n\n### Parameters\n\n- `start`\n\n  - : Zero-based index at which to start changing the array, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, no element will be deleted, but the method will behave as an adding function, adding as many elements as provided.\n\n- `deleteCount` _**optional**_\n\n  - : An integer indicating the number of elements in the array to remove from `start`.\n\n    If `deleteCount` is omitted, or if its value is greater than or equal to the number of elements after the position specified by `start`, then all the elements from `start` to the end of the array will be deleted. However, if you wish to pass any `itemN` parameter, you should pass `Infinity` as `deleteCount` to delete all elements after `start`, because an explicit `undefined` gets [converted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#integer_conversion) to `0`.\n\n    If `deleteCount` is `0` or negative, no elements are removed.\n    In this case, you should specify at least one new element (see below).\n\n- `item1`, …, `itemN` _**optional**_\n\n  - : The elements to add to the array, beginning from `start`.\n\n    If you do not specify any elements, `splice()` will only remove elements from the array.\n\n### Return value\n\nAn array containing the deleted elements.\n\nIf only one element is removed, an array of one element is returned.\n\nIf no elements are removed, an empty array is returned.\n\n## Description\n\nThe `splice()` method is a mutating method. It may change the content of `this`. If the specified number of elements to insert differs from the number of elements being removed, the array's `length` will be changed as well. At the same time, it uses [`@@species`](../@@species.mdx) to create a new array instance to be returned.\n\nIf the deleted portion is sparse, the array returned by `splice()` is sparse as well, with those corresponding indices being empty slots.\n\nThe `splice()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/docs/globals/Array/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string representing\nthe elements of the array. The elements are converted to Strings using their\n`toLocaleString` methods and these Strings are separated by a locale-specific\nString (such as a comma \",\").\n\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\n- `locales` _**optional**_\n  - : A string with a BCP 47 language tag, or an array of such strings. For the general form and interpretation of the `locales` argument, see [Locale identification and negotiation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation).\n- `options` _**optional**_\n  - : An object with configuration properties. For numbers, see [`Number.prototype.toLocaleString()`](../../../globals/Number/prototype/toLocaleString.mdx); for dates, see [`Date.prototype.toLocaleString()`](../../../globals/Date/prototype/toLocaleString.mdx).\n\n### Return value\n\nA string representing the elements of the array.\n\n## Description\n\nThe `Array.prototype.toLocaleString` method traverses its content, calling the `toLocaleString` method of every element with the `locales` and `options` parameters provided, and concatenates them with an implementation-defined separator (such as a comma \",\"). Note that the method itself does not consume the two parameters — it only passes them to the `toLocaleString()` of each element. The choice of the separator string depends on the host's current locale, not the `locales` parameter.\n\nIf an element is `undefined`, `null`, it is converted to an empty string instead of the string `\"null\"` or `\"undefined\"`.\n\nWhen used on sparse arrays, the `toLocaleString()` method iterates empty slots as if they have the value `undefined`.\n\nThe `toLocaleString()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/docs/globals/Array/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.toString()\n\nThe **`toString()`** method returns a string representing the\nspecified array and its elements.\n\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the elements of the array.\n\n## Description\n\nThe `Array` object overrides the `toString` method of `Object`. The `toString` method of arrays calls [`join()`](../../../globals/Array/prototype/join.mdx) internally, which joins the array and returns one string containing each array element separated by commas. If the `join` method is unavailable or is not a function, [`Object.prototype.toString`](../../../globals/Object/prototype/toString.mdx) is used instead, returning `[object Array]`.\n\n```js\nconst arr = [];\narr.join = 1; // re-assign `join` with a non-function\nconsole.log(arr.toString()); // [object Array]\n\nconsole.log(Array.prototype.toString.call({ join: () => 1 })); // 1\n```\n\nJavaScript calls the `toString` method automatically when an array is to be represented as a text value or when an array is referred to in a string concatenation.\n"
  },
  {
    "path": "documentation/docs/globals/Array/prototype/unshift.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.unshift()\n\nThe **`unshift()`** method adds one or more elements to the\nbeginning of an array and returns the new length of the array.\n\n## Syntax\n\n```js\nunshift(element0)\nunshift(element0, element1)\nunshift(element0, element1, /* … ,*/ elementN)\n```\n\n### Parameters\n\n- `elementN`\n  - : The elements to add to the front of the `arr`.\n\n### Return value\n\nThe new [`Array.prototype.length`](./length.mdx) property of the object upon which the\nmethod was called.\n\n## Description\n\nThe `unshift()` method inserts the given values to the beginning of an\narray-like object.\n\n[`Array.prototype.push()`](./push.mdx) has similar behavior to `unshift()`, but applied to the end of an array.\n\nPlease note that, if multiple elements are passed as parameters, they're inserted in\nchunk at the beginning of the object, in the exact same order they were passed as\nparameters. Hence, calling `unshift()` with `n`\narguments **once**, or calling it `n` times with\n**1** argument (with a loop, for example), don't yield the same results.\n\nSee example:\n\n```js\nlet arr = [4, 5, 6];\n\narr.unshift(1, 2, 3);\nconsole.log(arr);\n// [1, 2, 3, 4, 5, 6]\n\narr = [4, 5, 6]; // resetting the array\n\narr.unshift(1);\narr.unshift(2);\narr.unshift(3);\n\nconsole.log(arr);\n// [3, 2, 1, 4, 5, 6]\n```\n\nThe `unshift()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/docs/globals/Array/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.values()\n\nThe **`values()`** method returns a new _array [iterator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterator_protocol)_ object that iterates the value of each index in the array.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nA new iterable iterator object.\n\n## Description\n\n`Array.prototype.values()` is the default implementation of [`Array.prototype[@@iterator]()`](./@@iterator.mdx).\n\n```js\nArray.prototype.values === Array.prototype[Symbol.iterator]; // true\n```\n\nWhen used on sparse arrays, the `values()` method iterates empty slots as if they have the value `undefined`.\n\nThe `values()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/docs/globals/ArrayBuffer/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get ArrayBuffer\\[Symbol.species]\n\nThe **`ArrayBuffer[Symbol.species]`** accessor property returns the constructor used to construct return values from array buffer methods.\n\n> **Warning:** The existence of `Symbol.species` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Syntax\n\n```js\nArrayBuffer[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct return values from array buffer methods that create new array buffers.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `ArrayBuffer` objects. Subclass constructors may override it to change the constructor assignment. The default implementation is basically:\n\n```js\n// Hypothetical underlying implementation for illustration\nclass ArrayBuffer {\n  static get [Symbol.species]() {\n    return this;\n  }\n}\n```\n\nBecause of this polymorphic implementation, `Symbol.species` of derived subclasses would also return the constructor itself by default.\n\n```js\nclass SubArrayBuffer extends ArrayBuffer {}\nSubArrayBuffer[Symbol.species] === SubArrayBuffer; // true\n```\n\nWhen calling array buffer methods that do not mutate the existing object but return a new array buffer instance (for example, [`slice()`](./prototype/slice.mdx)), the object's `constructor[Symbol.species]` will be accessed. The returned constructor will be used to construct the return value of the array buffer method.\n"
  },
  {
    "path": "documentation/docs/globals/ArrayBuffer/ArrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer()\n\nThe **`ArrayBuffer()`** constructor is used to create \"ArrayBuffer\" objects.\n\n## Syntax\n\n```js\nnew ArrayBuffer(length)\n```\n\n> **Note:** `ArrayBuffer()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `length`\n  - : The size, in bytes, of the array buffer to create.\n\n### Return value\n\nA new `ArrayBuffer` object of the specified size. Its contents are\ninitialized to 0.\n\n### Exceptions\n\n- [`RangeError`](../RangeError/RangeError.mdx)\n  - : Thrown if the `length` is larger than `Number_MAX_SAFE_INTEGER` (≥ 2<sup>53</sup>) or negative.\n"
  },
  {
    "path": "documentation/docs/globals/ArrayBuffer/isView.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer.isView\n\nThe **`ArrayBuffer.isView()`** method determines whether the\npassed value is one of the `ArrayBuffer` views,\nsuch as [typed array objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray)\nor a [`DataView`](../DataView/DataView.mdx).\n\n## Syntax\n\n```js\nArrayBuffer.isView(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be checked.\n\n### Return value\n\n`true` if the given argument is one of the `ArrayBuffer` views;\notherwise, `false`.\n"
  },
  {
    "path": "documentation/docs/globals/ArrayBuffer/prototype/byteLength.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer.prototype.byteLength\n\nThe **`byteLength`** accessor property represents the length of an `ArrayBuffer` in bytes.\n\n## Description\n\nThe `byteLength` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when the array is constructed and cannot be changed. This property returns 0 if this `ArrayBuffer` has been detached.\n"
  },
  {
    "path": "documentation/docs/globals/ArrayBuffer/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer.prototype.slice()\n\nThe **`slice()`** method returns a new `ArrayBuffer`\nwhose contents are a copy of this `ArrayBuffer`'s bytes from\n`begin`, inclusive, up to `end`, exclusive.\n\n## Syntax\n\n```js\nslice(begin)\nslice(begin, end)\n```\n\n### Parameters\n\n- `begin`\n  - : Zero-based byte index at which to begin slicing.\n- `end` _**optional**_\n  - : Byte index before which to end slicing. If end is unspecified, the new\n    `ArrayBuffer` contains all bytes from begin to the end of this\n    `ArrayBuffer`. If negative, it will make the Byte index begin from the last\n    Byte.\n\n### Return value\n\nA new `ArrayBuffer` object.\n\n## Description\n\nThe `slice()` method copies up to, but not including, the byte indicated by\nthe `end` parameter. If either `begin` or `end` is\nnegative, it refers to an index from the end of the array, as opposed to from the\nbeginning.\n\nThe range specified by the `begin` and `end` parameters is\nclamped to the valid index range for the current array. If the computed length of the\nnew `ArrayBuffer` would be negative, it is clamped to zero.\n"
  },
  {
    "path": "documentation/docs/globals/BigInt/BigInt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt()\n\nThe **`BigInt()`** function returns a value of type **bigint**.\n\n## Syntax\n\n```js\nBigInt(value)\n```\n\n> **Note:** `BigInt()` can only be called without `new`. Attempting to construct it with `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `value`\n  - : The numeric value of the object being created. It may be a string, an integer, a boolean, or another `BigInt`.\n\n### Return value\n\nA `BigInt` value. Number values must be integers and are converted to BigInts. The boolean value `true` becomes `1n`, and `false` becomes `0n`. Strings are parsed as if they are source text for integer literals, which means they can have leading and trailing whitespaces and can be prefixed with `0b`, `0o`, or `0x`.\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if the parameter is a non-integral number.\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if at least one of these conditions is met:\n    - The parameter cannot be converted to a primitive.\n    - After conversion to a primitive, the result is [`undefined`](../undefined.mdx), `null`, `Symbol`.\n- [`SyntaxError`](../SyntaxError/SyntaxError.mdx)\n  - : Thrown if the parameter is a string that cannot be parsed as a `BigInt`.\n"
  },
  {
    "path": "documentation/docs/globals/BigInt/asIntN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.asIntN()\n\nThe **`BigInt.asIntN`** static method clamps a `BigInt` value to the given number of bits, and returns that value as a signed integer.\n\n## Syntax\n\n```js\nBigInt.asIntN(bits, bigint)\n```\n\n### Parameters\n\n- `bits`\n  - : The amount of bits available for the returned BigInt. Should be an integer between 0 and 2<sup>53</sup> - 1, inclusive.\n- `bigint`\n  - : The BigInt value to clamp to fit into the supplied bits.\n\n### Return value\n\nThe value of `bigint` modulo 2^`bits`, as a signed integer.\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `bits` is negative or greater than 2<sup>53</sup> - 1.\n\n## Description\n\nThe `BigInt.asIntN` method clamps a `BigInt` value to the given number of bits, and interprets the result as a signed integer. For example, for `BigInt.asIntN(3, 25n)`, the value `25n` is clamped to `1n`:\n\n```plain\n25n = 00011001 (base 2)\n          ^=== Clamp to three remaining bits\n===>       001 (base 2) = 1n\n```\n\nIf the leading bit of the remaining number is `1`, the result is negative. For example, `BigInt.asIntN(4, 25n)` yields `-7n`, because `1001` is the encoding of `-7` under two's complement:\n\n```plain\n25n = 00011001 (base 2)\n         ^==== Clamp to four remaining bits\n===>      1001 (base 2) = -7n\n```\n\n> **Note:** `BigInt` values are always encoded as two's complement in binary.\n\nUnlike similar language APIs such as [`Number.prototype.toExponential()`](../Number/prototype/toExponential.mdx), `asIntN` is a static property of `BigInt`, so you always use it as `BigInt.asIntN()`, rather than as a method of a BigInt value. Exposing `asIntN()` as a \"standard library function\" allows [interop with asm.js](https://github.com/tc39/proposal-bigint/blob/master/ADVANCED.md#dont-break-asmjs).\n"
  },
  {
    "path": "documentation/docs/globals/BigInt/asUintN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.asUintN()\n\nThe **`BigInt.asUintN`** static method clamps a `BigInt` value to the given number of bits, and returns that value as an unsigned integer.\n\n## Syntax\n\n```js\nBigInt.asUintN(bits, bigint)\n```\n\n### Parameters\n\n- `bits`\n  - : The amount of bits available for the returned BigInt. Should be an integer between 0 and 2<sup>53</sup> - 1, inclusive.\n- `bigint`\n  - : The BigInt value to clamp to fit into the supplied bits.\n\n### Return value\n\nThe value of `bigint` modulo 2^`bits`, as an unsigned integer.\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `bits` is negative or greater than 2<sup>53</sup> - 1.\n\n## Description\n\nThe `BigInt.asUintN` method clamps a `BigInt` value to the given number of bits, and interprets the result as an unsigned integer. Unsigned integers have no sign bits and are always non-negative. For example, for `BigInt.asUintN(4, 25n)`, the value `25n` is clamped to `9n`:\n\n```plain\n25n = 00011001 (base 2)\n         ^==== Clamp to four remaining bits\n===>      1001 (base 2) = 9n\n```\n\n> **Note:** `BigInt` values are always encoded as two's complement in binary.\n\nUnlike similar language APIs such as [`Number.prototype.toExponential()`](../Number/prototype/toExponential.mdx), `asUintN` is a static property of `BigInt`, so you always use it as `BigInt.asUintN()`, rather than as a method of a BigInt value. Exposing `asUintN()` as a \"standard library function\" allows [interop with asm.js](https://github.com/tc39/proposal-bigint/blob/master/ADVANCED.md#dont-break-asmjs).\n"
  },
  {
    "path": "documentation/docs/globals/BigInt/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string with a language-sensitive representation of this BigInt. In implementations with [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) support, this method simply calls `Intl.NumberFormat`.\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` parameters customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat), these parameters correspond exactly to the [`Intl.NumberFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) constructor's parameters. Implementations without `Intl.NumberFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#locales) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored.\n\nSee the [`Intl.NumberFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string with a language-sensitive representation of the given BigInt.\n\nIn implementations with `Intl.NumberFormat`, this is equivalent to `new Intl.NumberFormat(locales, options).format(number)`.\n\n## Performance\n\nWhen formatting large numbers of numbers, it is better to create a\n`Intl.NumberFormat` object and use the function provided by its\n`format()` method.\n"
  },
  {
    "path": "documentation/docs/globals/BigInt/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified `BigInt` value. The trailing \"n\" is not part of the string.\n\n## Syntax\n\n```js\ntoString()\ntoString(radix)\n```\n\n### Parameters\n\n- `radix` _**optional**_\n  - : An integer in the range 2 through 36 specifying the base to use for representing the BigInt value. Defaults to 10.\n\n### Return value\n\nA string representing the specified `BigInt` value.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `radix` is less than 2 or greater than 36.\n\n## Description\n\nThe `BigInt` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../Object/prototype/toString.mdx). For `BigInt` values, the `toString()` method returns a string representation of the value in the specified radix.\n\nFor radixes above 10, the letters of the alphabet indicate digits greater than 9. For example, for hexadecimal numbers (base 16) `a` through `f` are used.\n\nIf the specified BigInt value is negative, the sign is preserved. This is the case even if the radix is 2; the string returned is the positive binary representation of the BigInt value preceded by a `-` sign, **not** the two's complement of the BigInt value.\n\nThe `toString()` method requires its `this` value to be a `BigInt` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to BigInt values.\n\nBecause `BigInt` doesn't have a [`[Symbol.toPrimitive]()`](../../Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `BigInt` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, BigInt _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — rather, they are directly converted using the same algorithm as the initial `toString()` implementation.\n\n```js\nBigInt.prototype.toString = () => \"Overridden\";\nconsole.log(`${1n}`); // \"1\"\nconsole.log(`${Object(1n)}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/docs/globals/BigInt/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.prototype.valueOf()\n\nThe **`valueOf()`** method returns the wrapped primitive value\nof a `BigInt` object.\n\n## Syntax\n\n```js\nbigIntObj.valueOf()\n```\n\n### Return value\n\nA BigInt representing the primitive value of the specified `BigInt` object.\n"
  },
  {
    "path": "documentation/docs/globals/BigInt64Array/BigInt64Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt64Array()\n\nThe **`BigInt64Array()`** typed array constructor creates a\nnew `BigInt64Array` object, which is, an array of 64-bit signed integers\nin the platform byte order. If control over byte order is needed, use\n[`DataView`](../DataView/DataView.mdx) instead. The contents are initialized to `0n`. Once\nestablished, you can reference elements in the array using the object's methods, or by\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew BigInt64Array()\nnew BigInt64Array(length)\nnew BigInt64Array(typedArray)\nnew BigInt64Array(object)\n\nnew BigInt64Array(buffer)\nnew BigInt64Array(buffer, byteOffset)\nnew BigInt64Array(buffer, byteOffset, length)\n```\n\n> **Note:** `BigInt64Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/docs/globals/BigUint64Array/BigUint64Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigUint64Array()\n\nThe **`BigUint64Array()`** typed array constructor creates a\nnew `BigUint64Array` object, which is, an array of 64-bit unsigned integers\nin the platform byte order. If control over byte order is needed, use\n[`DataView`](../DataView/DataView.mdx) instead. The contents are initialized to `0n`. Once\nestablished, you can reference elements in the array using the object's methods, or by\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew BigUint64Array()\nnew BigUint64Array(length)\nnew BigUint64Array(typedArray)\nnew BigUint64Array(object)\n\nnew BigUint64Array(buffer)\nnew BigUint64Array(buffer, byteOffset)\nnew BigUint64Array(buffer, byteOffset, length)\n```\n\n> **Note:** `BigUint64Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](..//TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/docs/globals/Blob/Blob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob()\n\nThe **`Blob()`** constructor creates a `Blob` object, which represents a file-like object of immutable, raw data.\n\n## Syntax\n\n```js\nnew Blob()\nnew Blob(array)\nnew Blob(array, options)\n```\n\n> **Note:** `Blob()` can only be constructed with `new`. Attempting to call it without `new` throws a `TypeError`.\n\n### Parameters\n\n- `array` _**optional**_\n\n  - : An array of values to include in the `Blob`. These can be [`ArrayBuffer`](../../globals/ArrayBuffer/ArrayBuffer.mdx), [`Blob`](../../globals/Blob/Blob.mdx), or strings. If any of these elements is a [`Blob`](../../globals/Blob/Blob.mdx), its content (and not the object itself) is copied into the Blob being constructed.\n\n- `options` _**optional**_\n\n  - : An object containing optional attributes for the `Blob`.\n    - `type`\n      - : A string indicating the MIME type of the data. The default value is the empty string `\"\"`.\n    - `endings`\n      - : A string indicating how to handle line endings in the data. This can be either `\"transparent\"` (default) to keep line endings unchanged, or `\"native\"` to convert line endings to the platform's native line endings (e.g., `\\r\\n` on Windows).\n\n### Return value\n\nA new `Blob` object containing the specified data.\n\n## Description\n\n`Blob` objects represent data that isn't necessarily in a JavaScript-native format. The `File` interface is based on `Blob`, inheriting its functionality and expanding it to support files on the user's system.\n\nTo construct a `Blob` from other non-blob objects and data, use the `Blob()` constructor. To create a blob that contains a subset of another blob's data, use the [`slice()`](../../globals/Blob/prototype/slice.mdx) method.\n\nThe `type` property of a `Blob` object will match the MIME type specified in the constructor's `options` parameter, defaulting to an empty string if not specified.\n"
  },
  {
    "path": "documentation/docs/globals/Blob/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the `Blob` interface returns a `Promise` that resolves with an `ArrayBuffer` containing the entire contents of the `Blob` as binary data.\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with an `ArrayBuffer` containing the blob's data.\n"
  },
  {
    "path": "documentation/docs/globals/Blob/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.size\n\nThe **`size`** read-only property of the `Blob` interface returns the size of the `Blob` in bytes.\n\n## Value\n\nA number representing the size of the `Blob` in bytes.\n"
  },
  {
    "path": "documentation/docs/globals/Blob/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.slice()\n\nThe **`slice()`** method of the `Blob` interface creates and returns a new `Blob` object which contains data from a subset of the blob on which it's called.\n\n## Syntax\n\n```js\nslice()\nslice(start)\nslice(start, end)\nslice(start, end, contentType)\n```\n\n### Parameters\n\n- `start` _**optional**_\n  - : The 0-based index of the first byte to include in the new `Blob`. If negative, it refers to an index from the end of the `Blob`. The default value is 0.\n- `end` _**optional**_\n  - : The 0-based index of the first byte that will not be included in the new `Blob`. If negative, it refers to an index from the end of the `Blob`. The default value is `size`.\n- `contentType` _**optional**_\n  - : A string indicating the content type to assign to the new `Blob`. The default value is an empty string.\n\n### Return value\n\nA new `Blob` object containing the specified subset of data.\n"
  },
  {
    "path": "documentation/docs/globals/Blob/prototype/stream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.stream()\n\nThe **`stream()`** method of the `Blob` interface returns a `ReadableStream` that can be used to read the contents of the `Blob`.\n\n## Syntax\n\n```js\nstream()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `ReadableStream` that provides the data contained within the `Blob`.\n"
  },
  {
    "path": "documentation/docs/globals/Blob/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.text()\n\nThe **`text()`** method of the `Blob` interface returns a `Promise` that resolves with a string containing the contents of the blob, interpreted as UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a string containing the blob's data as a text string. The data is always interpreted as UTF-8.\n"
  },
  {
    "path": "documentation/docs/globals/Blob/prototype/type.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.type\n\nThe **`type`** read-only property of the `Blob` interface returns the MIME type of the `Blob`.\n\n## Value\n\nA string indicating the MIME type of the `Blob`. If the type cannot be determined, this returns an empty string.\n"
  },
  {
    "path": "documentation/docs/globals/Boolean/Boolean.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Boolean()\n\nThe **`Boolean()`** constructor can create `Boolean` objects or return primitive values of type boolean.\n\n## Syntax\n\n```js\nnew Boolean(value)\nBoolean(value)\n```\n\n> **Note:** `Boolean()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\n- `value`\n  - : The initial value of the `Boolean` object.\n\n### Return value\n\nWhen `Boolean()` is called as a constructor (with `new`), it creates a `Boolean` object, which is **not** a primitive.\n\nWhen `Boolean()` is called as a function (without `new`), it coerces the parameter to a boolean primitive.\n\n> **Warning:** You should rarely find yourself using `Boolean` as a constructor.\n\n## Description\n\nThe value passed as the first parameter is [converted to a boolean value](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean#boolean_coercion). If the value is omitted or is `0`, `-0`, `0n`, [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null), `false`, [`NaN`](../NaN.mdx), [`undefined`](../undefined.mdx), or the empty string (`\"\"`), then the object has an initial value of `false`. All other values, including any object, an empty array (`[]`), or the string `\"false\"`, create an object with an initial value of `true`.\n\n> **Note:** When the non-standard property [`document.all`](https://developer.mozilla.org/docs/Web/API/Document/all) is used as an argument for this constructor, the result is a `Boolean` object with the value `false`. This property is legacy and non-standard and should not be used.\n"
  },
  {
    "path": "documentation/docs/globals/Boolean/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Boolean.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified boolean value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified boolean value.\n\n## Description\n\nThe `Boolean` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../Object/prototype/toString.mdx). For `Boolean` values, the `toString` method returns a string representation of the boolean value, which is either `\"true\"` or `\"false\"`.\n\nThe `toString()` method requires its `this` value to be a `Boolean` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to boolean values.\n\nBecause `Boolean` doesn't have a [`[Symbol.toPrimitive]()`](../../Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `Boolean` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, boolean _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — rather, they are directly converted using the same algorithm as the initial `toString()` implementation.\n\n```js\nBoolean.prototype.toString = () => \"Overridden\";\nconsole.log(`${true}`); // \"true\"\nconsole.log(`${new Boolean(true)}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/docs/globals/Boolean/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Boolean.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a\n`Boolean` object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nThe primitive value of the given `Boolean` object.\n\n## Description\n\nThe `valueOf()` method of `Boolean` returns the primitive value\nof a `Boolean` object or literal `Boolean` as a Boolean data type.\n\nThis method is usually called internally by JavaScript and not explicitly in code.\n"
  },
  {
    "path": "documentation/docs/globals/ByteLengthQueuingStrategy/ByteLengthQueuingStrategy.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ByteLengthQueuingStrategy()\n\nThe **`ByteLengthQueuingStrategy()`**\nconstructor creates and returns a `ByteLengthQueuingStrategy` object\ninstance.\n\n## Syntax\n\n```js\nnew ByteLengthQueuingStrategy(highWaterMark)\n```\n\n### Parameters\n\nAn object with the following property:\n\n- `highWaterMark`\n\n  - : The total number of bytes that can be contained in the internal queue before backpressure is applied.\n\n    Unlike `CountQueuingStrategy()` where the `highWaterMark` parameter specifies a simple count of the number of chunks, with `ByteLengthQueuingStrategy()`, the `highWaterMark` parameter specifies a number of _bytes_ — specifically, given a stream of chunks, how many bytes worth of those chunks (rather than a count of how many of those chunks) can be contained in the internal queue before backpressure is applied.\n\n### Return value\n\nAn instance of the `ByteLengthQueuingStrategy` object.\n"
  },
  {
    "path": "documentation/docs/globals/ByteLengthQueuingStrategy/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ByteLengthQueuingStrategy.size()\n\nThe **`size()`** method of the\n`ByteLengthQueuingStrategy` interface returns the given chunk's\n`byteLength` property.\n\n## Syntax\n\n```js\nsize(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : A chunk of data being passed through the stream.\n\n### Return value\n\nAn integer representing the byte length of the given chunk.\n"
  },
  {
    "path": "documentation/docs/globals/CompressionStream/CompressionStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CompressionStream()\n\nThe **`CompressionStream()`** constructor creates a new `CompressionStream` object which compresses a stream of data.\n\n## Syntax\n\n```js\nnew CompressionStream(format)\n```\n\n### Parameters\n\n- `format`\n\n  - : One of the following allowed compression formats:\n\n    - `\"gzip\"`\n    - `\"deflate\"`\n    - `\"deflate-raw\"`\n\n## Exceptions\n\n- `TypeError`\n  - : Thrown if the format passed to the constructor is not supported.\n"
  },
  {
    "path": "documentation/docs/globals/CompressionStream/prototype/readable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CompressionStream.readable\n\nThe **`readable`** read-only property of the `CompressionStream` interface returns a `ReadableStream`.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/docs/globals/CompressionStream/prototype/writable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CompressionStream.writable\n\nThe **`writable`** read-only property of the `CompressionStream` interface returns a `WritableStream`.\n\n## Value\n\nA `WritableStream`.\n"
  },
  {
    "path": "documentation/docs/globals/CryptoKey/CryptoKey.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CryptoKey\n\nThe **`CryptoKey`** interface represents a cryptographic key obtained from one of the [`SubtleCrypto`](../SubtleCrypto/SubtleCrypto.mdx) method [`importKey()`](../SubtleCrypto/prototype/importKey.mdx).\n\n## Instance properties\n\n- [`type`](./prototype/type.mdx) _**readonly**_\n  - : The type of key the object represents. It may take one of the following values: `\"secret\"`, `\"private\"` or `\"public\"`.\n\n- [`extractable`](./prototype/extractable.mdx) _**readonly**_\n  - : A boolean value indicating whether or not the key may be extracted.\n\n- [`algorithm`](./prototype/algorithm.mdx) _**readonly**_\n  - : An object describing the algorithm for which this key can be used and any associated extra parameters.\n\n- [`usages`](./prototype/usages.mdx) _**readonly**_\n  - : An `Array` of strings, indicating what can be done with the key. Possible values for array elements are `\"encrypt\"`, `\"decrypt\"`, `\"sign\"`, `\"verify\"`, `\"deriveKey\"`, `\"deriveBits\"`, `\"wrapKey\"`, and `\"unwrapKey\"`.\n"
  },
  {
    "path": "documentation/docs/globals/CryptoKey/prototype/algorithm.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# algorithm\n\nThe read-only **`algorithm`** property of the [`CryptoKey`](../CryptoKey.mdx) interface returns an object describing the algorithm for which this key can be used, and any associated extra parameters.\n\nThe object returned depends of the algorithm used to generate the key.\n\n## Value\n\nAn object matching:\n\n- [`RsaHashedImportParams`](../../RsaHashedImportParams/RsaHashedImportParams.mdx) if the algorithm is any of the RSA variants.\n"
  },
  {
    "path": "documentation/docs/globals/CryptoKey/prototype/extractable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# extractable\n\nThe read-only **`extractable`** property indicates whether or not the key may be extracted.\n\nIf the key cannot be exported, an exception will be thrown if an attempt to extract the key is made.\n\n## Value\n\nA boolean value that is `true` if the key can be exported and `false` if not.\n"
  },
  {
    "path": "documentation/docs/globals/CryptoKey/prototype/type.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# type\n\nThe read-only **`type`** property indicates which kind of key is represented by the object. It can have the following values:\n\n- `\"secret\"`: This key is a secret key for use with a symmetric algorithm.\n- `\"private\"`: This key is the private half of an asymmetric algorithm's key pair.\n- `\"public\"`: This key is the public half of an asymmetric algorithm's key pair.\n\n## Value\n\nOne of the following strings: `\"secret\"`, `\"private\"`, or `\"public\"`.\n"
  },
  {
    "path": "documentation/docs/globals/CryptoKey/prototype/usages.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# usages\n\nThe read-only **`usages`** property indicates what can be done with the key.\n\n## Value\n\nAn `Array` of strings from the following list:\n\n- `\"encrypt\"`: The key may be used to encrypt messages.\n- `\"decrypt\"`: The key may be used to decrypt messages.\n- `\"sign\"`: The key may be used to sign messages.\n- `\"verify\"`: The key may be used to verify signatures.\n- `\"deriveKey\"`: The key may be used in deriving a new key.\n- `\"deriveBits\"`: The key may be used in deriving bits.\n- `\"wrapKey\"`: The key may be used to wrap a key.\n- `\"unwrapKey\"`: The key may be used to unwrap a key.\n"
  },
  {
    "path": "documentation/docs/globals/DOMException/DOMException.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException()\n\nThe **`DOMException()`** constructor returns a `DOMException` object with a specified message and name.\n\n## Syntax\n\n```js\nnew DOMException()\nnew DOMException(message)\nnew DOMException(message, name)\n```\n\n### Parameters\n\n- `message` _optional_\n  - : A description of the exception. If not present, the empty string `''` is\n    used.\n- `name` _optional_\n  - : A string. If the specified name is a [standard error name](#error-names), then getting the [`code`](./code.mdx) property of the `DOMException` object will return the code number corresponding to the specified name.\n\n### Return value\n\nA newly created `DOMException` object.\n\n## Error names\n\nCommon error names are listed here. Some APIs define their own sets of names, so this is not necessarily a complete list.\n\nNote that the following deprecated historical errors don't have an error name but instead have only a legacy constant code value and a legacy constant name:\n\n- Legacy code value: `2`, legacy constant name: `DOMSTRING_SIZE_ERR`\n- Legacy code value: `6`, legacy constant name: `NO_DATA_ALLOWED_ERR`\n- Legacy code value: `16`, legacy constant name: `VALIDATION_ERR`\n\n> **Note:** Because historically the errors were identified by a numeric value that corresponded with a named variable defined to have that value, some of the entries below indicate the legacy code value and constant name that were used in the past.\n\n- `IndexSizeError`\n  - : The index is not in the allowed range. (Legacy code value: `1` and legacy constant name: `INDEX_SIZE_ERR`)\n- `HierarchyRequestError`\n  - : The node tree hierarchy is not correct. (Legacy code value: `3` and legacy constant name: `HIERARCHY_REQUEST_ERR`)\n- `WrongDocumentError`\n  - : The object is in the wrong `Document`. (Legacy code value: `4` and legacy constant name: `WRONG_DOCUMENT_ERR`)\n- `InvalidCharacterError`\n  - : The string contains invalid characters. (Legacy code value: `5` and legacy constant name: `INVALID_CHARACTER_ERR`)\n- `NoModificationAllowedError`\n  - : The object cannot be modified. (Legacy code value: `7` and legacy constant name: `NO_MODIFICATION_ALLOWED_ERR`)\n- `NotFoundError`\n  - : The object cannot be found here. (Legacy code value: `8` and legacy constant name: `NOT_FOUND_ERR`)\n- `NotSupportedError`\n  - : The operation is not supported. (Legacy code value: `9` and legacy constant name: `NOT_SUPPORTED_ERR`)\n- `InvalidStateError`\n  - : The object is in an invalid state. (Legacy code value: `11` and legacy constant name: `INVALID_STATE_ERR`)\n- `InUseAttributeError`\n  - : The attribute is in use. (Legacy code value: `10` and legacy constant name: `INUSE_ATTRIBUTE_ERR`)\n- `SyntaxError`\n  - : The string did not match the expected pattern. (Legacy code value: `12` and legacy constant name: `SYNTAX_ERR`)\n- `InvalidModificationError`\n  - : The object cannot be modified in this way. (Legacy code value: `13` and legacy constant name: `INVALID_MODIFICATION_ERR`)\n- `NamespaceError`\n  - : The operation is not allowed by Namespaces in XML. (Legacy code value: `14` and legacy constant name: `NAMESPACE_ERR`)\n- `InvalidAccessError`\n  - : The object does not support the operation or argument. (Legacy code value: `15` and legacy constant name: `INVALID_ACCESS_ERR`)\n- `TypeMismatchError` *deprecated*\n  - : The type of the object does not match the expected type. (Legacy code value: `17` and legacy constant name: `TYPE_MISMATCH_ERR`) This value is deprecated; the JavaScript `TypeError` exception is now raised instead of a `DOMException` with this value.\n- `SecurityError`\n  - : The operation is insecure. (Legacy code value: `18` and legacy constant name: `SECURITY_ERR`)\n- `NetworkError`\n  - : A network error occurred. (Legacy code value: `19` and legacy constant name: `NETWORK_ERR`)\n- `AbortError`\n  - : The operation was aborted. (Legacy code value: `20` and legacy constant name: `ABORT_ERR`)\n- `URLMismatchError`\n  - : The given URL does not match another URL. (Legacy code value: `21` and legacy constant name: `URL_MISMATCH_ERR`)\n- `QuotaExceededError`\n  - : The quota has been exceeded. (Legacy code value: `22` and legacy constant name: `QUOTA_EXCEEDED_ERR`)\n- `TimeoutError`\n  - : The operation timed out. (Legacy code value: `23` and legacy constant name: `TIMEOUT_ERR`)\n- `InvalidNodeTypeError`\n  - : The node is incorrect or has an incorrect ancestor for this operation. (Legacy code value: `24` and legacy constant name: `INVALID_NODE_TYPE_ERR`)\n- `DataCloneError`\n  - : The object can not be cloned. (Legacy code value: `25` and legacy constant name: `DATA_CLONE_ERR`)\n- `EncodingError`\n  - : The encoding or decoding operation failed (No legacy code value and constant name).\n- `NotReadableError`\n  - : The input/output read operation failed (No legacy code value and constant name).\n- `UnknownError`\n  - : The operation failed for an unknown transient reason (e.g. out of memory) (No legacy code value and constant name).\n- `ConstraintError`\n  - : A mutation operation in a transaction failed because a constraint was not satisfied (No legacy code value and constant name).\n- `DataError`\n  - : Provided data is inadequate (No legacy code value and constant name).\n- `TransactionInactiveError`\n  - : A request was placed against a transaction that is currently not active or is finished (No legacy code value and constant name).\n- `ReadOnlyError`\n  - : The mutating operation was attempted in a \"readonly\" transaction (No legacy code value and constant name).\n- `VersionError`\n  - : An attempt was made to open a database using a lower version than the existing version (No legacy code value and constant name).\n- `OperationError`\n  - : The operation failed for an operation-specific reason (No legacy code value and constant name).\n- `NotAllowedError`\n  - : The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission (No legacy code value and constant name)."
  },
  {
    "path": "documentation/docs/globals/DOMException/code.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException.prototype.code\n\nThe **`code`** read-only property of the `DOMException` interface returns one of the legacy [error code constants](./DOMException.mdx#error-names), or `0` if none match.\n\nThis field is used for historical reasons. New DOM exceptions don't use this anymore: they put this info in the [`name`](./name.mdx) attribute.\n\n## Value\n\nOne of the [error code constants](./DOMException.mdx#error-names), or `0` if none match.\n"
  },
  {
    "path": "documentation/docs/globals/DOMException/message.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException.prototype.message\n\nThe **`message`** read-only property of the `DOMException` interface returns a string representing a message or description associated with the given [error name](./DOMException.mdx#error-names).\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/docs/globals/DOMException/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException.prototype.name\n\nThe **`name`** read-only property of the `DOMException` interface returns a string that contains one of the strings associated with an [error name](./DOMException.mdx#error-names).\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/docs/globals/DataView/DataView.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView()\n\nThe **`DataView()`** constructor is used to create `DataView` objects.\n\n## Syntax\n\n```js\nnew DataView(buffer)\nnew DataView(buffer, byteOffset)\nnew DataView(buffer, byteOffset, byteLength)\n```\n\n> **Note:** `DataView()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `buffer`\n  - : An existing `ArrayBuffer` to use as\n    the storage backing the new `DataView` object.\n- `byteOffset` _**optional**_\n  - : The offset, in bytes, to the first byte in the above buffer for the new view to\n    reference. If unspecified, the buffer view starts with the first byte.\n- `byteLength` _**optional**_\n  - : The number of elements in the byte array. If unspecified, the view's length will\n    match the buffer's length.\n\n### Return value\n\nA new `DataView` object representing the specified data buffer.\n\n### Exceptions\n\n- [`RangeError`](../RangeError/RangeError.mdx)\n\n  - : Thrown if the `byteOffset` or `byteLength` parameter values\n    result in the view extending past the end of the buffer.\n\n    For example, if the buffer is 16 bytes long, the `byteOffset` is 8, and\n    the `byteLength` is 10, this error is thrown because the resulting view\n    tries to extend 2 bytes past the total length of the buffer.\n"
  },
  {
    "path": "documentation/docs/globals/DataView/prototype/buffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.buffer\n\nThe **`buffer`** accessor property represents the `ArrayBuffer` referenced by the `DataView` at construction time.\n\n## Description\n\nThe `buffer` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when the `DataView` is constructed and cannot be changed.\n"
  },
  {
    "path": "documentation/docs/globals/DataView/prototype/byteLength.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.byteLength\n\nThe **`byteLength`** accessor property represents the length (in bytes) of the dataview.\n\n## Description\n\nThe `byteLength` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when an `DataView` is constructed and cannot be changed. If the `DataView` is not specifying an offset or a `byteLength`, the `byteLength` of the referenced `ArrayBuffer` or `SharedArrayBuffer` will be returned.\n"
  },
  {
    "path": "documentation/docs/globals/DataView/prototype/byteOffset.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.byteOffset\n\nThe **`byteOffset`** accessor property represents the offset (in bytes) of this view from the start of its `ArrayBuffer`.\n\n## Description\n\nThe `byteOffset` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when an `DataView` is constructed and cannot be changed.\n"
  },
  {
    "path": "documentation/docs/globals/DataView/prototype/getBigInt64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getBigInt64()\n\nThe **`getBigInt64()`** method gets a signed 64-bit integer\n(long long) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetBigInt64(byteOffset)\ngetBigInt64(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to read the data from.\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is read.\n\n### Return value\n\nA `BigInt`.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would read beyond the end\n    of the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/docs/globals/DataView/prototype/getBigUint64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getBigUint64()\n\nThe **`getBigUint64()`** method gets an unsigned 64-bit integer\n(unsigned long long) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetBigUint64(byteOffset)\ngetBigUint64(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to read the data from.\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is read.\n\n### Return value\n\nA `BigInt`.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would read beyond the end\n    of the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/docs/globals/DataView/prototype/getFloat32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getFloat32()\n\nThe **`getFloat32()`** method gets a signed 32-bit float\n(float) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetFloat32(byteOffset)\ngetFloat32(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 32-bit float number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/docs/globals/DataView/prototype/getFloat64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getFloat64()\n\nThe **`getFloat64()`** method gets a signed 64-bit float\n(double) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetFloat64(byteOffset)\ngetFloat64(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 64-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 64-bit float number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/docs/globals/DataView/prototype/getInt16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getInt16()\n\nThe **`getInt16()`** method gets a signed 16-bit integer\n(short) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetInt16(byteOffset)\ngetInt16(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 16-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/docs/globals/DataView/prototype/getInt32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getInt32()\n\nThe **`getInt32()`** method gets a signed 32-bit integer (long)\nat the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetInt32(byteOffset)\ngetInt32(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in bytes, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 32-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/docs/globals/DataView/prototype/getInt8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getInt8()\n\nThe **`getInt8()`** method gets a signed 8-bit integer (byte)\nat the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetInt8(byteOffset)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n\n### Return value\n\nA signed 8-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/docs/globals/DataView/prototype/getUint16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getUint16()\n\nThe **`getUint16()`** method gets an unsigned 16-bit integer\n(unsigned short) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n\n\n## Syntax\n\n```js\ngetUint16(byteOffset)\ngetUint16(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nAn unsigned 16-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/docs/globals/DataView/prototype/getUint32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getUint32()\n\nThe **`getUint32()`** method gets an unsigned 32-bit integer\n(unsigned long) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n\n\n## Syntax\n\n```js\ngetUint32(byteOffset)\ngetUint32(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nAn unsigned 32-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/docs/globals/DataView/prototype/getUint8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getUint8()\n\nThe **`getUint8()`** method gets an unsigned 8-bit integer\n(unsigned byte) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetUint8(byteOffset)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n\n### Return value\n\nAn unsigned 8-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/docs/globals/DataView/prototype/setBigInt64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setBigInt64()\n\nThe **`setBigInt64()`** method stores a signed 64-bit integer\n(long long) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetBigInt64(byteOffset, value)\nsetBigInt64(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to store the data from.\n- value\n  - : The value to set as a `BigInt`. The highest possible value that fits in\n    a signed 64-bit integer is\n    `2n ** (64n -1n) - 1n` (`9223372036854775807n`). Upon\n    overflow, it will be negative (`-9223372036854775808n`).\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/docs/globals/DataView/prototype/setBigUint64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setBigUint64()\n\nThe **`setBigUint64()`** method stores an unsigned 64-bit\ninteger (unsigned long long) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetBigUint64(byteOffset, value)\nsetBigUint64(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to store the data from.\n- value\n  - : The value to set as a `BigInt`. The highest possible value that fits in\n    an unsigned 64-bit integer is\n    `2n ** 64n - 1n`\n    (`18446744073709551615n`). Upon overflow, it will be zero\n    (`0n`).\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/docs/globals/DataView/prototype/setFloat32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setFloat32()\n\nThe **`setFloat32()`** method stores a signed 32-bit float\n(float) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetFloat32(byteOffset, value)\nsetFloat32(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/docs/globals/DataView/prototype/setFloat64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setFloat64()\n\nThe **`setFloat64()`** method stores a signed 64-bit float\n(double) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetFloat64(byteOffset, value)\nsetFloat64(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 64-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/docs/globals/DataView/prototype/setInt16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setInt16()\n\nThe **`setInt16()`** method stores a signed 16-bit integer\n(short) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetInt16(byteOffset, value)\nsetInt16(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/docs/globals/DataView/prototype/setInt32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setInt32()\n\nThe **`setInt32()`** method stores a signed 32-bit integer\n(long) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetInt32(byteOffset, value)\nsetInt32(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/docs/globals/DataView/prototype/setInt8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setInt8()\n\nThe **`setInt8()`** method stores a signed 8-bit integer (byte)\nvalue at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetInt8(byteOffset, value)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/docs/globals/DataView/prototype/setUint16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setUint16()\n\nThe **`setUint16()`** method stores an unsigned 16-bit integer\n(unsigned short) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetUint16(byteOffset, value)\nsetUint16(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/docs/globals/DataView/prototype/setUint32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setUint32()\n\nThe **`setUint32()`** method stores an unsigned 32-bit integer\n(unsigned long) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetUint32(byteOffset, value)\nsetUint32(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/docs/globals/DataView/prototype/setUint8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setUint8()\n\nThe **`setUint8()`** method stores an unsigned 8-bit integer\n(byte) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetUint8(byteOffset, value)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/docs/globals/Date/Date.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date()\n\nThe **`Date()`** constructor can create a `Date` instance or return a string representing the current time.\n\n## Syntax\n\n```js\nnew Date()\nnew Date(value)\nnew Date(dateString)\nnew Date(dateObject)\n\nnew Date(year, monthIndex)\nnew Date(year, monthIndex, day)\nnew Date(year, monthIndex, day, hours)\nnew Date(year, monthIndex, day, hours, minutes)\nnew Date(year, monthIndex, day, hours, minutes, seconds)\nnew Date(year, monthIndex, day, hours, minutes, seconds, milliseconds)\n\nDate()\n```\n\n> **Note:** `Date()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\nThere are five basic forms for the `Date()` constructor:\n\n#### No parameters\n\nWhen no parameters are provided, the newly-created `Date` object represents the current date and time as of the time of instantiation.\n\n#### Time value or timestamp number\n\n- `value`\n  - : An integer value representing the number of milliseconds since January 1, 1970, 00:00:00 UTC (the ECMAScript epoch, equivalent to the UNIX epoch), with leap seconds ignored. Keep in mind that most [UNIX Timestamp](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_16) functions are only accurate to the nearest second.\n\n#### Date string\n\n- `dateString`\n\n  - : A string value representing a date, in a format recognized by the [`Date.parse()`](./parse.mdx) method. (The ECMA262 spec specifies a [simplified version of ISO 8601](https://tc39.es/ecma262/#sec-date-time-string-format), but other formats can be implementation-defined, which commonly include [IETF-compliant RFC 2822 timestamps](https://datatracker.ietf.org/doc/html/rfc2822#page-14).)\n\n    > **Note:** When parsing date strings with the `Date` constructor (and `Date.parse`, they are equivalent), always make sure that the input conforms to the ISO 8601 format (`YYYY-MM-DDTHH:mm:ss.sssZ`) — the parsing behavior with other formats is implementation-defined and may not work across all browsers. Support for [RFC 2822](https://datatracker.ietf.org/doc/html/rfc2822) format strings is by convention only. A library can help if many different formats are to be accommodated.\n    >\n    > Date-only strings (e.g. `\"1970-01-01\"`) are treated as UTC, while date-time strings (e.g. `\"1970-01-01T12:00\"`) are treated as local. You are therefore also advised to make sure the input format is consistent between the two types.\n\n#### Date object\n\n- `dateObject`\n  - : An existing `Date` object. This effectively makes a copy of the existing `Date` object with the same date and time. This is equivalent to `new Date(dateObject.valueOf())`, except the `valueOf()` method is not called.\n\nWhen one parameter is passed to the `Date()` constructor, `Date` instances are specially treated. All other values are [converted to primitives](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion). If the result is a string, it will be parsed as a date string. Otherwise, the resulting primitive is further coerced to a number and treated as a timestamp.\n\n#### Individual date and time component values\n\nGiven at least a year and month, this form of `Date()` returns a `Date` object whose component values (year, month, day, hour, minute, second, and millisecond) all come from the following parameters. Any missing fields are given the lowest possible value (`1` for `day` and `0` for every other component). The parameter values are all evaluated against the local time zone, rather than UTC.\n\nIf any parameter overflows its defined bounds, it \"carries over\". For example, if a `monthIndex` greater than `11` is passed in, those months will cause the year to increment; if a `minutes` greater than `59` is passed in, `hours` will increment accordingly, etc. Therefore, `new Date(1990, 12, 1)` will return January 1st, 1991; `new Date(2020, 5, 19, 25, 65)` will return 2:05 A.M. June 20th, 2020.\n\nSimilarly, if any parameter underflows, it \"borrows\" from the higher positions. For example, `new Date(2020, 5, 0)` will return May 31st, 2020.\n\n- `year`\n  - : Integer value representing the year. Values from `0` to `99` map to the years `1900` to `1999`. All other values are the actual year. See the [example](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years).\n- `monthIndex`\n  - : Integer value representing the month, beginning with `0` for January to `11` for December.\n- `day` _**optional**_\n  - : Integer value representing the day of the month. The default is `1`.\n- `hours` _**optional**_\n  - : Integer value between `0` and `23` representing the hour of the day. Defaults to `0`.\n- `minutes` _**optional**_\n  - : Integer value representing the minute segment of a time. The default is `0` minutes past the hour.\n- `seconds` _**optional**_\n  - : Integer value representing the second segment of a time. The default is `0` seconds past the minute.\n- `milliseconds` _**optional**_\n  - : Integer value representing the millisecond segment of a time. The default is `0` milliseconds past the second.\n\n### Return value\n\nCalling `new Date()` (the `Date()` constructor) returns a [`Date`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date) object. If called with an invalid date string, or if the date to be constructed will have a UNIX timestamp less than `-8,640,000,000,000,000` or greater than `8,640,000,000,000,000` milliseconds, it returns a `Date` object whose [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toString) method returns the literal string `Invalid Date`.\n\nCalling the `Date()` function (without the `new` keyword) returns a string representation of the current date and time, exactly as `new Date().toString()` does. Any arguments given in a `Date()` function call (without the `new` keyword) are ignored; regardless of whether it's called with an invalid date string — or even called with any arbitrary object or other primitive as an argument — it always returns a string representation of the current date and time.\n"
  },
  {
    "path": "documentation/docs/globals/Date/UTC.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.UTC()\n\nThe **`Date.UTC()`** method accepts parameters similar to the\n`Date` constructor, but treats them as UTC. It returns the number of\nmilliseconds since January 1, 1970, 00:00:00 UTC.\n\n\n\n## Syntax\n\n```js\nDate.UTC(year)\nDate.UTC(year, monthIndex)\nDate.UTC(year, monthIndex, day)\nDate.UTC(year, monthIndex, day, hour)\nDate.UTC(year, monthIndex, day, hour, minute)\nDate.UTC(year, monthIndex, day, hour, minute, second)\nDate.UTC(year, monthIndex, day, hour, minute, second, millisecond)\n```\n\n- `year`\n\n  - : Integer value representing the year.\n\n    Values from `0` to `99` map to the years\n    `1900` to `1999`. All other values are the actual year.\n    See the [example](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years).\n\n- `monthIndex` _**optional**_\n  - : An integer between `0` (January) and `11` (December)\n    representing the month. Since ECMAScript 2017 it defaults to `0` if\n    omitted. _(Up until ECMAScript 2016, `monthIndex` was a required\n    parameter. As of ES2017, it no longer is.)_\n- `day` _**optional**_\n  - : An integer between `1` and `31` representing the day of the\n    month. If omitted, defaults to `1`.\n- `hour` _**optional**_\n  - : An integer between `0` and `23` representing the hours. If\n    omitted, defaults to `0`.\n- `minute` _**optional**_\n  - : An integer between `0` and `59` representing the minutes. If\n    omitted, defaults to `0`.\n- `second` _**optional**_\n  - : An integer between `0` and `59` representing the seconds. If\n    omitted, defaults to `0`.\n- `millisecond` _**optional**_\n  - : An integer between `0` and `999` representing the\n    milliseconds. If omitted, defaults to `0`.\n\n### Return value\n\nA number representing the number of milliseconds for the given date since January 1,\n1970, 00:00:00, UTC.\n\n## Description\n\n`UTC()` takes comma-delimited date and time parameters and returns the\nnumber of milliseconds between January 1, 1970, 00:00:00, universal time and the\nspecified date and time.\n\nYears between `0` and `99` are converted to a year in the\n20th century `(1900 + year)`. For example, `95` is\nconverted to the year `1995`.\n\nThe `UTC()` method differs from the `Date` constructor in two\nways:\n\n1. `Date.UTC()` uses universal time instead of the local time.\n2. `Date.UTC()` returns a time value as a number instead of creating a\n   `Date` object.\n\nIf a parameter is outside of the expected range, the `UTC()` method updates\nthe other parameters to accommodate the value. For example, if `15` is used\nfor `monthIndex`, the year will be incremented by 1\n`(year + 1)` and `3` will be used for the month.\n\n`UTC()` is a static method of `Date`, so it's called as\n`Date.UTC()` rather than as a method of a `Date` instance.\n"
  },
  {
    "path": "documentation/docs/globals/Date/now.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.now()\n\nThe static **`Date.now()`** method returns the number of milliseconds elapsed since the [epoch](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps), which is defined as the midnight at the beginning of January 1, 1970, UTC.\n\n## Syntax\n\n```js\nDate.now()\n```\n\n### Return value\n\nA number representing the number of milliseconds elapsed since the [epoch](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps), which is defined as the midnight at the beginning of January 1, 1970, UTC.\n"
  },
  {
    "path": "documentation/docs/globals/Date/parse.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.parse()\n\nThe **`Date.parse()`** method parses a string representation of\na date, and returns the number of milliseconds since January 1, 1970, 00:00:00 UTC or\n`NaN` if the string is unrecognized or, in some cases, contains illegal date\nvalues (e.g. 2015-02-31).\n\nOnly the [ISO 8601 format](https://tc39.es/ecma262/#sec-date-time-string-format) (`YYYY-MM-DDTHH:mm:ss.sssZ`) is explicitly specified to be supported. Other formats are implementation-defined and may not work across all browsers. A library can help if many different formats are to be accommodated.\n\n## Syntax\n\n```js\nDate.parse(dateString)\n```\n\n### Parameters\n\n- `dateString`\n  - : A string representing [a simplification of the ISO 8601 calendar date extended format](#date-time-string-format).\n    (Other formats may be used, but results are implementation-dependent.)\n\n### Return value\n\nA number representing the milliseconds elapsed since January 1, 1970, 00:00:00 UTC and\nthe date obtained by parsing the given string representation of a date. If the argument\ndoesn't represent a valid date, [`NaN`](../NaN.mdx) is returned.\n\n## Description\n\nThe `parse()` method takes a date string (such as\n`\"2011-10-10T14:48:00\"`) and returns the number of milliseconds since January\n1, 1970, 00:00:00 UTC.\n\nThis function is useful for setting date values based on string values, for example in\nconjunction with the [`setTime()`](./prototype/setTime.mdx) method and the\n`Date` object.\n\n### Date Time String Format\n\nThe standard string representation of a date time string is a simplification of the ISO\n8601 calendar date extended format.\n(See the section [Date Time String Format](https://tc39.es/ecma262/#sec-date-time-string-format)\nin the ECMAScript specification for more details.)\n\nFor example, `\"2011-10-10\"` (_date-only_ form),\n`\"2011-10-10T14:48:00\"` (_date-time_ form), or\n`\"2011-10-10T14:48:00.000+09:00\"` (_date-time_ form with milliseconds\nand time zone) can be passed and will be parsed. When the time zone offset is absent,\ndate-only forms are interpreted as a UTC time and date-time forms are interpreted as\nlocal time.\n\nWhile time zone specifiers are used during date string parsing to interpret the\nargument, the value returned is always the number of milliseconds between January 1,\n1970 00:00:00 UTC and the point in time represented by the argument or `NaN`.\n\nBecause `parse()` is a static method of `Date`, it is called as\n`Date.parse()` rather than as a method of a `Date` instance.\n\n### Fall-back to implementation-specific date formats\n\n> **Note:** This section contains implementation-specific behavior that can be inconsistent\n> across implementations.\n\nThe ECMAScript specification states: If the String does not conform to the standard\nformat the function may fall back to any implementation–specific heuristics or\nimplementation–specific parsing algorithm. Unrecognizable strings or dates containing\nillegal element values in ISO formatted strings shall cause `Date.parse()` to\nreturn [`NaN`](../NaN.mdx).\n\nHowever, invalid values in date strings not recognized as simplified ISO format as\ndefined by ECMA-262 may or may not result in [`NaN`](../NaN.mdx), depending on the browser\nand values provided, e.g.:\n\n```js\n// Non-ISO string with invalid date values\nnew Date(\"23/25/2014\");\n```\n\nwill be treated as a local date of 25 November, 2015 in Firefox 30 and an invalid date\nin Safari 7.\n\nHowever, if the string is recognized as an ISO format string and it contains invalid\nvalues, it will return [`NaN`](../NaN.mdx):\n\n```js\n// ISO string with invalid values\nnew Date(\"2014-25-23\").toISOString();\n// throws \"RangeError: invalid date\"\n```\n\nSpiderMonkey's implementation-specific heuristic can be found in [`jsdate.cpp`](https://searchfox.org/mozilla-central/source/js/src/jsdate.cpp?rev=64553c483cd1#889).\nThe string `\"10 06 2014\"` is an example of a non-conforming ISO format and\nthus falls back to a custom routine. See also this [rough outline](https://bugzilla.mozilla.org/show_bug.cgi?id=1023155#c6) on\nhow the parsing works.\n\n```js\nnew Date(\"10 06 2014\");\n```\n\nwill be treated as a local date of 6 October, 2014, and not 10 June, 2014.\n\nOther examples:\n\n```js\nnew Date(\"foo-bar 2014\").toString();\n// returns: \"Invalid Date\"\n\nDate.parse(\"foo-bar 2014\");\n// returns: NaN\n```\n\n### Differences in assumed time zone\n\n> **Note:** This section contains implementation-specific behavior that can be inconsistent\n> across implementations.\n\nGiven a non-standard date string of `\"March 7, 2014\"`, `parse()` assumes a local time zone, but given a simplification of the ISO 8601 calendar date extended format such as `\"2014-03-07\"`, it will assume a time zone of UTC. Therefore `Date` objects produced using those strings may represent different moments in time depending on the version of ECMAScript supported unless the system is set with a local time zone of UTC. This means that two date strings that appear equivalent may result in two different values depending on the format of the string that is being converted.\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/@@toPrimitive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype\\[Symbol.toPrimitive]\n\nThe **`[Symbol.toPrimitive]()`** method converts a `Date`\nobject to a primitive value.\n\n## Syntax\n\n```js\nDate()[Symbol.toPrimitive](hint)\n```\n\n### Return value\n\nThe primitive value of the given `Date` object. Depending on the argument,\nthe method can return either a string or a number.\n\n## Description\n\nThe `[Symbol.toPrimitive]()` method of the `Date` object returns a\nprimitive value, that is either of type number or of type string.\n\nIf `hint` is `string` or `default`,\n`[Symbol.toPrimitive]()` tries to call the [`toString`](../../Object/prototype/toString.mdx) method. If the `toString` property does not exist, it tries to\ncall the [`valueOf`](../../Object/prototype/valueOf.mdx) method and if the\n`valueOf` does not exist either, `[Symbol.toPrimitive]()` throws a\n[`TypeError`](../../../globals/TypeError/TypeError.mdx).\n\nIf `hint` is `number`, `[Symbol.toPrimitive]()` first tries\nto call `valueOf`, and if that fails, it calls `toString`.\n\nJavaScript calls the `[Symbol.toPrimitive]()` method to convert an object to a\nprimitive value. You rarely need to invoke the `[Symbol.toPrimitive]()` method\nyourself; JavaScript automatically invokes it when encountering an object where a\nprimitive value is expected.\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/getDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getDate()\n\nThe **`getDate()`** method returns the day of the month for the\nspecified date according to local time.\n\n## Syntax\n\n```js\ngetDate()\n```\n\n### Return value\n\nAn integer number, between 1 and 31, representing the day of the month for the given\ndate according to local time.\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/getDay.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getDay()\n\nThe **`getDay()`** method returns the\nday of the week for the specified date according to local time, where 0 represents\nSunday. For the day of the month, see [`Date.prototype.getDate()`](./getDate.mdx).\n\n## Syntax\n\n```js\ngetDay()\n```\n\n### Return value\n\nAn integer number, between 0 and 6, corresponding to the day of the week for the given\ndate, according to local time: 0 for Sunday, 1 for Monday, 2 for Tuesday, and so on.\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/getFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getFullYear()\n\nThe **`getFullYear()`** method returns the year of the\nspecified date according to local time.\n\nUse this method instead of the [`Date.prototype.getYear()`](./getYear.mdx) method.\n\n## Syntax\n\n```js\ngetFullYear()\n```\n\n### Return value\n\nA number corresponding to the year of the given date, according to local time.\n\n## Description\n\nThe value returned by `getFullYear()` is an absolute number. For dates\nbetween the years 1000 and 9999, `getFullYear()` returns a four-digit number,\nfor example, 1995. Use this function to make sure a year is compliant with years after\n2000\\.\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/getHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getHours()\n\nThe **`getHours()`** method returns the hour for the specified\ndate, according to local time.\n\n## Syntax\n\n```js\ngetHours()\n```\n\n### Return value\n\nAn integer number, between 0 and 23, representing the hour for the given date according\nto local time.\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/getMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getMilliseconds()\n\nThe **`getMilliseconds()`** method returns the milliseconds in\nthe specified date according to local time.\n\n## Syntax\n\n```js\ngetMilliseconds()\n```\n\n### Return value\n\nA number, between 0 and 999, representing the milliseconds for the given date according\nto local time.\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/getMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getMinutes()\n\nThe **`getMinutes()`** method returns the minutes in the\nspecified date according to local time.\n\n## Syntax\n\n```js\ngetMinutes()\n```\n\n### Return value\n\nAn integer number, between 0 and 59, representing the minutes in the given date\naccording to local time.\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/getMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getMonth()\n\nThe **`getMonth()`** method returns the month in the specified\ndate according to local time, as a zero-based value (where zero indicates the first\nmonth of the year).\n\n## Syntax\n\n```js\ngetMonth()\n```\n\n### Return value\n\nAn integer number, between 0 and 11, representing the month in the given date according\nto local time. 0 corresponds to January, 1 to February, and so on.\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/getSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getSeconds()\n\nThe **`getSeconds()`** method returns the seconds in the\nspecified date according to local time.\n\n## Syntax\n\n```js\ngetSeconds()\n```\n\n### Return value\n\nAn integer number, between 0 and 59, representing the seconds in the given date\naccording to local time.\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/getTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getTime()\n\nThe **`getTime()`** method returns the number of milliseconds since the [epoch](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps), which is defined as the midnight at the beginning of January 1, 1970, UTC.\n\nYou can use this method to help assign a date and time to another `Date`\nobject. This method is functionally equivalent to the [`Date.prototype.valueOf()`](./valueOf.mdx) method.\n\n## Syntax\n\n```js\ngetTime()\n```\n\n### Return value\n\nA number representing the milliseconds elapsed between 1 January 1970 00:00:00 UTC and\nthe given date.\n\n## Description\n\nTo offer protection against timing attacks and fingerprinting, the precision of\n`new Date().getTime()` might get rounded depending on browser settings.\n\n```js\n// reduced time precision (2ms) in Firefox 60\nnew Date().getTime();\n// 1519211809934\n// 1519211810362\n// 1519211811670\n// …\n\n// reduced time precision with `privacy.resistFingerprinting` enabled\nnew Date().getTime();\n// 1519129853500\n// 1519129858900\n// 1519129864400\n// …\n```\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/getTimezoneOffset.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getTimezoneOffset()\n\nThe **`getTimezoneOffset()`** method returns the difference, in minutes, between a date as evaluated in the UTC time zone, and the same date as evaluated in the local time zone.\n\n## Syntax\n\n```js\ngetTimezoneOffset()\n```\n\n### Return value\n\nThe difference, in minutes, between the date as evaluated in the UTC time zone and as evaluated in the local time zone. The actual local time algorithm is implementation-defined, and the return value is allowed to be zero in runtimes without appropriate data.\n\n## Description\n\n`date.getTimezoneOffset()` returns the difference, in minutes, between `date` as evaluated in the UTC time zone and as evaluated in the local time zone — that is, the time zone of the host system in which the browser is being used (if the code is run from the Web in a browser), or otherwise the host system of whatever JavaScript runtime (for example, a Node.js environment) the code is executed in.\n\n### Negative values and positive values\n\nThe number of minutes returned by `getTimezoneOffset()` is positive if the local time zone is behind UTC, and negative if the local time zone is ahead of UTC. For example, for UTC+10, `-600` will be returned.\n\n| Current time zone | Return value |\n| ----------------- | ------------ |\n| UTC-8             | 480          |\n| UTC               | 0            |\n| UTC+3             | -180         |\n\n### Varied results in Daylight Saving Time (DST) regions\n\nIn a region that annually shifts in and out of Daylight Saving Time (DST), as `date` varies, the number of minutes returned by calling `getTimezoneOffset()` can be non-uniform.\n\n> **Note:** `getTimezoneOffset()`'s behavior will never differ based on the time when the code is run — its behavior is always consistent when running in the same region. Only the value of `date` affects the result.\n\nIn most implementations, the [IANA time zone database](https://en.wikipedia.org/wiki/Daylight_saving_time#IANA_time_zone_database) (tzdata) is used to precisely determine the offset of the local timezone at the moment of the `date`. However, if such information is unavailable, an implementation may return zero.\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/getUTCDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCDate()\n\nThe **`getUTCDate()`** method returns the day of the month (from\n1 to 31) in the specified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCDate()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer number ranging from 1 to 31\nrepresenting day of month for the given date, according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/getUTCDay.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCDay()\n\nThe **`getUTCDay()`** method returns the day of the week in the\nspecified date according to universal time, where 0 represents Sunday.\n\n## Syntax\n\n```js\ngetUTCDay()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer number corresponding to the day\nof the week for the given date, according to universal time: 0 for Sunday, 1 for Monday,\n2 for Tuesday, and so on.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/getUTCFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCFullYear()\n\nThe **`getUTCFullYear()`** method returns the year in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCFullYear()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer representing the year in the given date\naccording to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n\n## Description\n\nThe value returned by `getUTCFullYear()` is an absolute number that is\ncompliant with year-2000, for example, 1995.\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/getUTCHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCHours()\n\nThe **`getUTCHours()`** method returns the hours in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCHours()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 23, representing the hours in the given date according\nto Coordinated Universal Time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/getUTCMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCMilliseconds()\n\nThe **`getUTCMilliseconds()`** method returns the milliseconds\nportion of the time object's value according to universal time.\n\n## Syntax\n\n```js\ngetUTCMilliseconds()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 999, representing\nthe milliseconds portion of the given `Date` object according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n\nNot to be confused with Unix epoch time. To get the total milliseconds since 1970/01/01,\nuse the [`getTime()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/getTime) method.\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/getUTCMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCMinutes()\n\nThe **`getUTCMinutes()`** method returns the minutes in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCMinutes()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 59,\nrepresenting the minutes in the given date according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/getUTCMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCMonth()\n\nThe **`getUTCMonth()`** returns the month of the specified date\naccording to universal time, as a zero-based value (where zero indicates the first month\nof the year).\n\n## Syntax\n\n```js\ngetUTCMonth()\n```\n\n### Return value\n\nA number. If the `Date` object represents a valid date, an integer number, between 0 and 11,\ncorresponding to the month of the given date according to universal time. 0 for January,\n1 for February, 2 for March, and so on. Otherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/getUTCSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCSeconds()\n\nThe **`getUTCSeconds()`** method returns the seconds in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCSeconds()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 59, representing\nthe seconds in the given date according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/getYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getYear()\n\nThe **`getYear()`** method returns the year in the specified\ndate according to local time. Because `getYear()` does not return full years\n(\"year 2000 problem\"), it is no longer used and has been replaced by the\n[`Date.prototype.getFullYear()`](./getFullYear.mdx) method.\n\n## Syntax\n\n```js\ngetYear()\n```\n\n### Return value\n\nA number representing the year of the given date, according to local time, minus 1900.\n\n## Description\n\n- For years greater than or equal to 2000, the value returned by\n  `getYear()` is 100 or greater. For example, if the year is 2026,\n  `getYear()` returns 126.\n- For years between and including 1900 and 1999, the value returned by\n  `getYear()` is between 0 and 99. For example, if the year is 1976,\n  `getYear()` returns 76.\n- For years less than 1900, the value returned by `getYear()` is less than 0. For example, if the year is 1800, `getYear()` returns -100.\n\nTo take into account years before and after 2000, you should use\n[`Date.prototype.getFullYear()`](./getFullYear.mdx) instead of\n`getYear()` so that the year is specified in full.\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/setDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setDate()\n\nThe **`setDate()`** method changes the day of the month of a given `Date` instance, based on local time.\n\nTo instead change the day of the month for a given `Date` instance based on UTC time, use the [`Date.prototype.setUTCDate()`](./setUTCDate.mdx) method.\n\n## Syntax\n\n```js\nsetDate(dayValue)\n```\n\n### Parameters\n\n- `dayValue`\n  - : An integer representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the given date (the\n`Date` object is also changed in place).\n\n## Description\n\nIf the `dayValue` is outside of the range of date values for the month, `setDate()` will update the `Date` object accordingly.\n\nFor example, if 0 is provided for `dayValue`, the date will be set to the last day of the previous month. If you use 40 for `dayValue`, and the month stored in the `Date` object is June, the day will be changed to 10 and the month will be incremented to July.\n\nIf a negative number is provided for `dayValue`, the date will be set counting backwards from the last day of the previous month. -1 would result in the date being set to 1 day before the last day of the previous month.\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/setFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setFullYear()\n\nThe **`setFullYear()`** method sets the full year for a\nspecified date according to local time. Returns new timestamp.\n\n## Syntax\n\n```js\nsetFullYear(yearValue)\nsetFullYear(yearValue, monthValue)\nsetFullYear(yearValue, monthValue, dateValue)\n```\n\n### Parameters\n\n- `yearValue`\n  - : An integer specifying the numeric value of the year, for example, 1995.\n- `monthValue`\n  - : Optional. An integer between 0 and 11 representing the months January through\n    December.\n- `dateValue`\n  - : Optional. An integer between 1 and 31 representing the day of the month. If you\n    specify the `dateValue` parameter, you must also specify the\n    `monthValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `monthValue` and\n`dateValue` parameters, the values returned from the\n[`Date.prototype.getMonth()`](./getMonth.mdx) and\n[`Date.prototype.getDate()`](./getDate.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range, `setFullYear()`\nattempts to update the other parameters and the date information in the\n`Date` object accordingly. For example, if you specify 15 for\n`monthValue`, the year is incremented by 1\n(`yearValue + 1`), and 3 is used for the month.\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/setHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setHours()\n\nThe **`setHours()`** method sets the hours for a specified date\naccording to local time, and returns the number of milliseconds since January 1, 1970\n00:00:00 UTC until the time represented by the updated `Date` instance.\n\n## Syntax\n\n```js\nsetHours(hoursValue)\nsetHours(hoursValue, minutesValue)\nsetHours(hoursValue, minutesValue, secondsValue)\nsetHours(hoursValue, minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `hoursValue`\n  - : Ideally, an integer between 0 and 23, representing the hour. If a value greater than\n    23 is provided, the datetime will be incremented by the extra hours.\n- `minutesValue`\n  - : Optional. Ideally, an integer between 0 and 59, representing the minutes. If a value\n    greater than 59 is provided, the datetime will be incremented by the extra minutes.\n- `secondsValue`\n  - : Optional. Ideally, an integer between 0 and 59, representing the seconds. If a value\n    greater than 59 is provided, the datetime will be incremented by the extra seconds. If\n    you specify the `secondsValue` parameter, you must also specify\n    the `minutesValue`.\n- `msValue`\n  - : Optional. Ideally, a number between 0 and 999, representing the milliseconds. If a\n    value greater than 999 is provided, the datetime will be incremented by the extra\n    milliseconds. If you specify the `msValue` parameter, you must\n    also specify the `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between January 1, 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `minutesValue`,\n`secondsValue`, and `msValue` parameters,\nthe values returned from the [`Date.prototype.getMinutes()`](./getMinutes.mdx),\n[`Date.prototype.getSeconds()`](./getSeconds.mdx), and\n[`Date.prototype.getMilliseconds()`](./getMilliseconds.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range, `setHours()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes will\nbe incremented by 1 (`minutesValue + 1`), and 40 will be used for\nseconds.\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/setMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setMilliseconds()\n\nThe **`setMilliseconds()`** method sets the milliseconds for a\nspecified date according to local time.\n\n## Syntax\n\n```js\nsetMilliseconds(millisecondsValue)\n```\n\n### Parameters\n\n- `millisecondsValue`\n  - : A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you specify a number outside the expected range, the date information in the\n`Date` object is updated accordingly. For example, if you specify 1005, the\nnumber of seconds is incremented by 1, and 5 is used for the milliseconds.\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/setMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setMinutes()\n\nThe **`setMinutes()`** method sets the minutes for a specified\ndate according to local time.\n\n## Syntax\n\n```js\nsetMinutes(minutesValue)\nsetMinutes(minutesValue, secondsValue)\nsetMinutes(minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `minutesValue`\n  - : An integer between 0 and 59, representing the minutes.\n- `secondsValue`\n  - : Optional. An integer between 0 and 59, representing the seconds. If you specify the\n    `secondsValue` parameter, you must also specify the\n    `minutesValue`.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds. If you specify\n    the `msValue` parameter, you must also specify the\n    `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `secondsValue` and\n`msValue` parameters, the values returned from\n[`Date.prototype.getSeconds()`](./getSeconds.mdx) and\n[`Date.prototype.getMilliseconds()`](./getMilliseconds.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range, `setMinutes()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes will\nbe incremented by 1 (`minutesValue + 1`), and 40 will be used for\nseconds.\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/setMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setMonth()\n\nThe **`setMonth()`** method sets the month for a specified date according to the currently set year.\n\n## Syntax\n\n```js\nsetMonth(monthValue)\nsetMonth(monthValue, dayValue)\n```\n\n### Parameters\n\n- `monthValue`\n  - : A zero-based integer representing the month of the year offset from the start of the\n    year. So, 0 represents January, 11 represents December, -1 represents December of the\n    previous year, and 12 represents January of the following year.\n- `dayValue`\n  - : Optional. An integer from 1 to 31, representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `dayValue` parameter, the value\nreturned from the [`Date.prototype.getDate()`](./getDate.mdx) method is used.\n\nIf a parameter you specify is outside of the expected range, `setMonth()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 15 for `monthValue`, the year will be\nincremented by 1, and 3 will be used for month.\n\nThe current day of month will have an impact on the behavior of this method.\nConceptually it will add the number of days given by the current day of the month to the\n1st day of the new month specified as the parameter, to return the new date.\nFor example, if the current value is 31st January 2016, calling setMonth with a value of 1 will return 2nd March 2016.\nThis is because in 2016 February had 29 days.\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/setSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setSeconds()\n\nThe **`setSeconds()`** method sets the seconds for a specified\ndate according to local time.\n\n## Syntax\n\n```js\nsetSeconds(secondsValue)\nsetSeconds(secondsValue, msValue)\n```\n\n### Parameters\n\n- `secondsValue`\n  - : An integer between 0 and 59, representing the seconds.\n- `msValue` _**optional**_\n  - : Optional. A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `msValue` parameter, the value returned\nfrom the [`Date.prototype.getMilliseconds()`](./getMilliseconds.mdx) method is\nused.\n\nIf a parameter you specify is outside of the expected range, `setSeconds()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes stored\nin the `Date` object will be incremented by 1, and 40 will be used for\nseconds.\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/setTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setTime()\n\nThe **`setTime()`** method sets the `Date` object\nto the time represented by a number of milliseconds since January 1, 1970, 00:00:00 UTC.\n\n## Syntax\n\n```js\nsetTime(timeValue)\n```\n\n### Parameters\n\n- `timeValue`\n  - : An integer representing the number of milliseconds since 1 January 1970, 00:00:00\n    UTC.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date\n(effectively, the value of the argument).\n\n## Description\n\nUse the `setTime()` method to help assign a date and time to another\n`Date` object.\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/setUTCDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCDate()\n\nThe **`setUTCDate()`** method changes the day of the month of a given `Date` instance, based on UTC time.\n\nTo instead change the day of the month for a given `Date` instance based on local time, use the [`Date.prototype.setDate()`](././setDate.mdx) method.\n\n## Syntax\n\n```js\nsetUTCDate(dayValue)\n```\n\n### Parameters\n\n- `dayValue`\n  - : An integer from 1 to 31, representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf the `dayValue` is outside of the range of date values for the month, `setDate()` will update the `Date` object accordingly.\n\nFor example, if 0 is provided for `dayValue`, the date will be set to the last day of the previous month. If you use 40 for `dayValue`, and the month stored in the `Date` object is June, the day will be changed to 10 and the month will be incremented to July.\n\nIf a negative number is provided for `dayValue`, the date will be set counting backwards from the last day of the previous month. -1 would result in the date being set to 1 day before the last day of the previous month.\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/setUTCFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCFullYear()\n\nThe **`setUTCFullYear()`** method sets the full year for a\nspecified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCFullYear(yearValue)\nsetUTCFullYear(yearValue, monthValue)\nsetUTCFullYear(yearValue, monthValue, dayValue)\n```\n\n### Parameters\n\n- `yearValue`\n  - : An integer specifying the numeric value of the year, for example, 1995.\n- `monthValue`\n  - : Optional. An integer between 0 and 11 representing the months January through\n    December.\n- `dayValue`\n  - : Optional. An integer between 1 and 31 representing the day of the month. If you\n    specify the `dayValue` parameter, you must also specify the\n    `monthValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `monthValue` and\n`dayValue` parameters, the values returned from the\n[`Date.prototype.getUTCMonth()`](./getUTCMonth.mdx) and\n[`Date.prototype.getUTCDate()`](./getUTCDate.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range,\n`setUTCFullYear()` attempts to update the other parameters and the date\ninformation in the `Date` object accordingly. For example, if you specify 15\nfor `monthValue`, the year is incremented by 1\n(`yearValue + 1`), and 3 is used for the month.\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/setUTCHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCHours()\n\nThe **`setUTCHours()`** method sets the hour for a specified\ndate according to universal time, and returns the number of milliseconds since January\n1, 1970 00:00:00 UTC until the time represented by the updated `Date`\ninstance.\n\n## Syntax\n\n```js\nsetUTCHours(hoursValue)\nsetUTCHours(hoursValue, minutesValue)\nsetUTCHours(hoursValue, minutesValue, secondsValue)\nsetUTCHours(hoursValue, minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `hoursValue`\n  - : An integer between 0 and 23, representing the hour.\n- `minutesValue`\n  - : Optional. An integer between 0 and 59, representing the minutes.\n- `secondsValue`\n  - : Optional. An integer between 0 and 59, representing the seconds. If you specify the\n    `secondsValue` parameter, you must also specify the\n    `minutesValue`.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds. If you specify\n    the `msValue` parameter, you must also specify the\n    `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between January 1, 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `minutesValue`,\n`secondsValue`, and `msValue` parameters,\nthe values returned from the [`Date.prototype.getUTCMinutes()`](./getUTCMinutes.mdx), [`Date.prototype.getUTCSeconds()`](./getUTCSeconds.mdx),\nand [`Date.prototype.getUTCMilliseconds()`](./getUTCMilliseconds.mdx) methods\nare used.\n\nIf a parameter you specify is outside of the expected range, `setUTCHours()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes will\nbe incremented by 1 (`minutesValue + 1`), and 40 will be used for seconds.\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/setUTCMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCMilliseconds()\n\nThe **`setUTCMilliseconds()`** method sets the milliseconds for\na specified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCMilliseconds(millisecondsValue)\n```\n\n### Parameters\n\n- `millisecondsValue`\n  - : A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf a parameter you specify is outside of the expected range,\n`setUTCMilliseconds()` attempts to update the date information in the\n`Date` object accordingly. For example, if you use 1100 for\n`millisecondsValue`, the seconds stored in the `Date`\nobject will be incremented by 1, and 100 will be used for milliseconds.\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/setUTCMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCMinutes()\n\nThe **`setUTCMinutes()`** method sets the minutes for a\nspecified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCMinutes(minutesValue)\nsetUTCMinutes(minutesValue, secondsValue)\nsetUTCMinutes(minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `minutesValue`\n  - : An integer between 0 and 59, representing the minutes.\n- `secondsValue`\n  - : Optional. An integer between 0 and 59, representing the seconds. If you specify the\n    `secondsValue` parameter, you must also specify the\n    `minutesValue`.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds. If you specify\n    the `msValue` parameter, you must also specify the\n    `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `secondsValue` and\n`msValue` parameters, the values returned from\n[`Date.prototype.getUTCSeconds()`](./getUTCSeconds.mdx) and\n[`Date.prototype.getUTCMilliseconds()`](./getUTCMilliseconds.mdx) methods are\nused.\n\nIf a parameter you specify is outside of the expected range,\n`setUTCMinutes()` attempts to update the date information in the\n`Date` object accordingly. For example, if you use 100 for\n`secondsValue`, the minutes will be incremented by 1\n(`minutesValue + 1`), and 40 will be used for seconds.\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/setUTCMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCMonth()\n\nThe **`setUTCMonth()`** method sets the month for a specified\ndate according to universal time.\n\n## Syntax\n\n```js\nsetUTCMonth(monthValue)\nsetUTCMonth(monthValue, dayValue)\n```\n\n### Parameters\n\n- `monthValue`\n  - : An integer between 0 and 11, representing the months January through December.\n- `dayValue`\n  - : Optional. An integer from 1 to 31, representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `dayValue` parameter, the value returned from the\n[`Date.prototype.getUTCDate()`](./getUTCDate.mdx) method is used.\n\nIf a parameter you specify is outside of the expected range, `setUTCMonth()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 15 for `monthValue`, the year will be incremented by\n1, and 3 will be used for month.\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/setUTCSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCSeconds()\n\nThe **`setUTCSeconds()`** method sets the seconds for a\nspecified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCSeconds(secondsValue)\nsetUTCSeconds(secondsValue, msValue)\n```\n\n### Parameters\n\n- `secondsValue`\n  - : An integer between 0 and 59, representing the seconds.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `msValue` parameter, the value returned from the\n[`Date.prototype.getUTCMilliseconds()`](./getUTCMilliseconds.mdx) method is\nused.\n\nIf a parameter you specify is outside of the expected range,\n`setUTCSeconds()` attempts to update the date information in the\n`Date` object accordingly. For example, if you use 100 for\n`secondsValue`, the minutes stored in the `Date` object will be\nincremented by 1, and 40 will be used for seconds.\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/setYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setYear()\n\nThe legacy **`setYear()`** method sets the year for a specified date according to local time.\n\nHowever, the way the legacy `setYear()` method sets year values is different from how the preferred [`Date.prototype.setFullYear()`](./setFullYear.mdx) method sets year values — and in some cases, also different from how `new Date()` and [`Date.parse()`](../parse.mdx) set year values. Specifically, given two-digit numbers, such as `22` and `61`:\n\n- `setYear()` interprets any two-digit number as an offset to `1900`; so `date.setYear(22)` results in the year value being set to `1922`, and `date.setYear(61)` results in the year value being set to `1961`. (In contrast, while `new Date(61, 1)` also results in the year value being set to `1961`, `new Date(\"2/1/22\")` results in the year value being set to `2022`; and similarly for [`Date.parse()`](../parse.mdx)).\n\n- [`Date.prototype.setFullYear()`](./setFullYear.mdx) does no special interpretation but instead uses the literal two-digit value as-is to set the year; so `date.setFullYear(61)` results in the year value being set to `0061`, and `date.setFullYear(22)` results in the year value being set to `0022`.\n\nBecause of those differences in behavior, you should no longer use the legacy `setYear()` method, but should instead use the preferred [`Date.prototype.setFullYear()`](./setFullYear.mdx) method.\n\n## Syntax\n\n```js\nsetYear(yearValue)\n```\n\n### Parameters\n\n- `yearValue`\n  - : An integer.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf `yearValue` is a number between 0 and 99 (inclusive), then the year for\n`dateObj` is set to `1900 + yearValue`. Otherwise, the year for\n`dateObj` is set to `yearValue`.\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/toDateString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toDateString()\n\nThe **`toDateString()`** method returns the date portion of a `Date` object interpreted in the local timezone in English.\n\n## Syntax\n\n```js\ntoDateString()\n```\n\n### Return value\n\nA string representing the date portion of the given `Date` object in human readable form in English.\n\n## Description\n\n`Date` instances refer to a specific point in time. `toDateString()` interprets the date in the local timezone and formats the _date_ part in English. It always uses the following format, separated by spaces:\n\n1. First three letters of the week day name\n2. First three letters of the month name\n3. Two-digit day of the month, padded on the left a zero if necessary\n4. Four-digit year (at least), padded on the left with zeros if necessary. May have a negative sign\n\nFor example: \"Thu Jan 01 1970\".\n\n- If you want to get the _time_ part, use [`toTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString).\n- If you want to get both the date and time, use [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toString).\n- If you want to make the date interpreted as UTC instead of local timezone, use [`toUTCString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString).\n- If you want to format the date in a more user-friendly format (e.g. localization), use [`toLocaleDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString).\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/toISOString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toISOString()\n\nThe **`toISOString()`** method returns a string in _simplified_ extended ISO format ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)), which is always 24 or 27 characters long (`YYYY-MM-DDTHH:mm:ss.sssZ` or `±YYYYYY-MM-DDTHH:mm:ss.sssZ`, respectively). The timezone is always zero UTC offset, as denoted by the suffix `Z`.\n\n## Syntax\n\n```js\ntoISOString()\n```\n\n### Return value\n\nA string representing the given date in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format according to universal time. It's the same format as the one required to be recognized by [`Date.parse()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/parse#date-time-string-format).\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/toJSON.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toJSON()\n\nThe **`toJSON()`** method returns a string representation of\nthe `Date` object.\n\n## Syntax\n\n```js\ntoJSON()\n```\n\n### Return value\n\nA string representation of the given date.\n\n## Description\n\n`Date` instances refer to a specific point in time. `toJSON()` calls the object's [`Date.prototype.toISOString()`](./toISOString.mdx) method, which returns a string representing the `Date` object's value. This method is generally intended to, by default, usefully serialize `Date` objects during [JSON](https://developer.mozilla.org/docs/Glossary/JSON) serialization, which can then be deserialized using the [`Date()` constructor](../Date.mdx) or [`Date.parse()`](../parse.mdx) as the reviver of [`JSON.parse()`](../../JSON/parse.mdx).\n\nThe method first attempts to convert its `this` value [to a primitive](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion) by calling its [`[Symbol.toPrimitive]()`](../../Symbol/toPrimitive.mdx) (with `\"number\"` as hint), [`valueOf()`](../../Object/prototype/valueOf.mdx), and [`toString()`](../../Object/prototype/toString.mdx) methods, in that order. If the result is a [non-finite](../../Number/isFinite.mdx) number, `null` is returned. (This generally corresponds to an invalid date, whose [`valueOf()`](./valueOf.mdx) returns [`NaN`](../../NaN.mdx).) Otherwise, if the converted primitive is not a number or is a finite number, the return value of `this.toISOString()` is returned.\n\nNote that the method does not check whether the `this` value is a valid `Date` object. However, calling `Date.prototype.toJSON()` on non-`Date` objects does not have well-defined semantics.\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/toLocaleDateString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toLocaleDateString()\n\nThe **`toLocaleDateString()`** method returns a string with a language-sensitive representation of the date portion of the specified date in the user agent's timezone. In implementations with [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) support, this method simply calls `Intl.DateTimeFormat`.\n\n## Syntax\n\n```js\ntoLocaleDateString()\ntoLocaleDateString(locales)\ntoLocaleDateString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat), these parameters correspond exactly to the [`Intl.DateTimeFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) constructor's parameters. Implementations without `Intl.DateTimeFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales) parameter of the `Intl.DateTimeFormat()` constructor.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options) parameter of the `Intl.DateTimeFormat()` constructor. The `timeStyle` option must be undefined, or a [`TypeError`](../../../globals/TypeError/TypeError.mdx) would be thrown. If `weekday`, `year`, `month`, and `day` are all undefined, then `year`, `month`, and `day` will be set to `\"numeric\"`.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored.\n\nSee the [`Intl.DateTimeFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string representing the date portion of the given `Date` instance according to language-specific conventions.\n\nIn implementations with `Intl.DateTimeFormat`, this is equivalent to `new Intl.DateTimeFormat(locales, options).format(date)`, where `options` has been normalized as described above.\n\n## Performance\n\nWhen formatting large numbers of dates, it is better to create an [`Intl.DateTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) object and use its [`format()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/format) method.\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string with a language-sensitive representation of this date. In implementations with [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) support, this method simply calls `Intl.DateTimeFormat`.\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat), these parameters correspond exactly to the [`Intl.DateTimeFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) constructor's parameters. Implementations without `Intl.DateTimeFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales) parameter of the `Intl.DateTimeFormat()` constructor.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options) parameter of the `Intl.DateTimeFormat()` constructor. If `weekday`, `year`, `month`, `day`, `dayPeriod`, `hour`, `minute`, `second`, and `fractionalSecondDigits` are all undefined, then `year`, `month`, `day`, `hour`, `minute`, `second` will be set to `\"numeric\"`.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored.\n\nSee the [`Intl.DateTimeFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string representing the given date according to language-specific conventions.\n\nIn implementations with `Intl.DateTimeFormat`, this is equivalent to `new Intl.DateTimeFormat(locales, options).format(date)`.\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/toLocaleTimeString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toLocaleTimeString()\n\nThe **`toLocaleTimeString()`** method returns a string with a language-sensitive representation of the time portion of the date. In implementations with [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) support, this method simply calls `Intl.DateTimeFormat`.\n\n## Syntax\n\n```js\ntoLocaleTimeString()\ntoLocaleTimeString(locales)\ntoLocaleTimeString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat), these parameters correspond exactly to the [`Intl.DateTimeFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) constructor's parameters. Implementations without `Intl.DateTimeFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales) parameter of the `Intl.DateTimeFormat()` constructor.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options) parameter of the `Intl.DateTimeFormat()` constructor. If `dayPeriod`, `hour`, `minute`, `second`, and `fractionalSecondDigits` are all undefined, then `hour`, `minute`, `second` will be set to `\"numeric\"`.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored.\n\nSee the [`Intl.DateTimeFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string representing the time portion of the given `Date` instance according to language-specific conventions.\n\nIn implementations with `Intl.DateTimeFormat`, this is equivalent to `new Intl.DateTimeFormat(locales, options).format(date)`, where `options` has been normalized as described above.\n\n## Performance\n\nWhen formatting large numbers of dates, it is better to create an [`Intl.DateTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) object and use its [`format()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/format) method.\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified `Date` object interpreted in the local timezone.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the given date.\n\n## Description\n\nThe `Date` object overrides the `toString()` method of `Object`. `Date.prototype.toString()` returns a string representation of the Date as interpreted in the local timezone, containing both the date and the time — it joins the string representation specified in [`toDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString) and [`toTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString) together, adding a space in between.\n\nFor example: \"Thu Jan 01 1970 04:42:04 GMT+0000 (Coordinated Universal Time)\"\n\nThe `toString()` method is automatically called when a date is coerced to a string, such as `const today = 'Today is ' + new Date()`.\n\n`Date.prototype.toString()` must be called on `Date` instances. If the `this` value does not inherit from `Date.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n- If you only want to get the _date_ part, use [`toDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString).\n- If you only want to get the _time_ part, use [`toTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString).\n- If you want to make the date interpreted as UTC instead of local timezone, use [`toUTCString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString).\n- If you want to format the date in a more user-friendly format (e.g. localization), use [`toLocaleString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString).\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/toTimeString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toTimeString()\n\nThe **`toTimeString()`** method returns the time portion of a `Date` object interpreted in the local timezone in English.\n\n## Syntax\n\n```js\ntoTimeString()\n```\n\n### Return value\n\nA string representing the time portion of the given date in human readable form in English.\n\n## Description\n\n`Date` instances refer to a specific point in time. `toTimeString()` interprets the date in the local timezone and formats the _time_ part in English. It always uses the format of `hh:mm:ss GMT±xxxx (TZ)`, where:\n\n| Format String | Description                                                                                           |\n| ------------- | ----------------------------------------------------------------------------------------------------- |\n| `hh`          | Hour, as two digits with leading zero if required                                                     |\n| `mm`          | Minute, as two digits with leading zero if required                                                   |\n| `ss`          | Seconds, as two digits with leading zero if required                                                  |\n| `±xxxx`       | The local timezone's offset — two digits for hours and two digits for minutes (e.g. `-0500`, `+0800`) |\n| `TZ`          | The timezone's name (e.g. `PDT`, `PST`)                                                               |\n\nFor example: \"04:42:04 GMT+0000 (Coordinated Universal Time)\".\n\n- If you want to get the _date_ part, use [`toDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString).\n- If you want to get both the date and time, use [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toString).\n- If you want to make the date interpreted as UTC instead of local timezone, use [`toUTCString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString).\n- If you want to format the date in a more user-friendly format (e.g. localization), use [`toLocaleTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleTimeString).\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/toUTCString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toUTCString()\n\nThe **`toUTCString()`** method converts a date to a string, interpreting it in the UTC time zone. `toGMTString()` is an alias of this method.\n\nBased on [rfc7231](https://datatracker.ietf.org/doc/html/rfc7231#section-7.1.1.1) and modified according to [ECMA-262 toUTCString](https://tc39.es/ecma262/#sec-date.prototype.toutcstring), it can have negative values.\n\n## Syntax\n\n```js\ntoUTCString()\n```\n\n### Return value\n\nA string representing the given date using the UTC time zone.\n\n## Description\n\nThe value returned by `toUTCString()` is a string in the form `Www, dd Mmm yyyy hh:mm:ss GMT`, where:\n\n| Format String | Description                                                  |\n| ------------- | ------------------------------------------------------------ |\n| `Www`         | Day of week, as three letters (e.g. `Sun`, `Mon`)            |\n| `dd`          | Day of month, as two digits with leading zero if required    |\n| `Mmm`         | Month, as three letters (e.g. `Jan`, `Feb`)                  |\n| `yyyy`        | Year, as four or more digits with leading zeroes if required |\n| `hh`          | Hour, as two digits with leading zero if required            |\n| `mm`          | Minute, as two digits with leading zero if required          |\n| `ss`          | Seconds, as two digits with leading zero if required         |\n\n### Aliasing\n\nJavaScript's `Date` API was inspired by Java's `java.util.Date` library (while the latter had become de facto legacy since Java 1.1 in 1997). In particular, the Java `Date` class had a method called `toGMTString` — which was poorly named, because the [Greenwich Mean Time](https://en.wikipedia.org/wiki/Greenwich_Mean_Time) is not equivalent to the [Coordinated Universal Time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time), while JavaScript dates always operate by UTC time. For web compatibility reasons, `toGMTString` remains as an alias to `toUTCString`, and they refer to the exact same function object. This means:\n\n```js\nDate.prototype.toGMTString.name === \"toUTCString\";\n```\n"
  },
  {
    "path": "documentation/docs/globals/Date/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a\n`Date` object.\n\n\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the given date, or [`NaN`](../../NaN.mdx) in case of an invalid date.\n\n## Description\n\nThe `valueOf()` method returns the primitive value of a `Date`\nobject as a number data type, the number of milliseconds since midnight 01 January, 1970\nUTC.\n\nThis method is functionally equivalent to the [`Date.prototype.getTime()`](./getTime.mdx)\nmethod.\n\nThis method is usually called internally by JavaScript and not explicitly in code.\n"
  },
  {
    "path": "documentation/docs/globals/DecompressionStream/DecompressionStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DecompressionStream()\n\nThe **`DecompressionStream()`** constructor creates a new `DecompressionStream` object which decompresses a stream of data.\n\n## Syntax\n\n```js\nnew DecompressionStream(format)\n```\n\n### Parameters\n\n- `format`\n\n  - : One of the following compression formats:\n\n    - `\"gzip\"`\n    - `\"deflate\"`\n    - `\"deflate-raw\"`\n\n## Exceptions\n\n- `TypeError`\n  - : Thrown if the format passed to the constructor is not supported.\n"
  },
  {
    "path": "documentation/docs/globals/DecompressionStream/prototype/readable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DecompressionStream.readable\n\nThe **`readable`** read-only property of the `DecompressionStream` interface returns a `ReadableStream`.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/docs/globals/DecompressionStream/prototype/writable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DecompressionStream.writable\n\nThe **`writable`** read-only property of the `DecompressionStream` interface returns a `WritableStream`.\n\n## Value\n\nA `WritableStream`\n"
  },
  {
    "path": "documentation/docs/globals/EcKeyImportParams/EcKeyImportParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# EcKeyImportParams\n\nThe **`EcKeyImportParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.importKey()`, when generating any elliptic-curve-based key pair: that is, when the algorithm is identified as ECDSA.\n\n## Instance properties\n\n- `name`\n  - : A string. This should be set to `ECDSA`.\n- `namedCurve`\n\n  - : A string representing the name of the elliptic curve to use. This may be any of the following names for [NIST](https://www.nist.gov/)-approved curves:\n\n    - `P-256`\n    - `P-384`\n    - `P-521`\n"
  },
  {
    "path": "documentation/docs/globals/EcdsaParams/EcdsaParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# EcdsaParams\n\nThe **`EcdsaParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.sign()` or `SubtleCrypto.verify()` when using the ECDSA algorithm.\n\n## Instance properties\n\n- `name`\n    - : A string. This should be set to `ECDSA`.\n- `hash`\n\n    - : A string. An identifier for the digest algorithm to use. This should be one of the following:\n\n        - `SHA-256`: selects the SHA-256 algorithm.\n        - `SHA-384`: selects the SHA-384 algorithm.\n        - `SHA-512`: selects the SHA-512 algorithm.\n\n        > **Warning:** `SHA-1` is also supported here but the SHA-1 algorithm is considered vulnerable and should no longer be used.\n"
  },
  {
    "path": "documentation/docs/globals/Error/Error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error\n\nThe **`Error()`** constructor creates an error object.\n\n## Syntax\n\n```js\nnew Error()\nnew Error(message)\nnew Error(message, options)\nnew Error(message, fileName)\nnew Error(message, fileName, lineNumber)\n\nError()\nError(message)\nError(message, options)\nError(message, fileName)\nError(message, fileName, lineNumber)\n```\n\n> **Note:** `Error()` can be called with or without `new`. Both create a new `Error` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : A human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A value indicating the specific cause of the error, reflected in the [`Error.prototype.cause`](./prototype/cause.mdx) property. When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/docs/globals/Error/prototype/cause.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.cause\n\nThe **`cause`** data property of an [`Error`](../../../globals/Error/Error.mdx) instance indicates the specific original cause of the error.\n\nIt is used when catching and re-throwing an error with a more-specific or useful error message in order to still have access to the original error.\n\n## Value\n\nThe value that was passed to the [`Error`](../Error.mdx) constructor in the `options.cause` argument. It may not be present.\n\n## Description\n\nThe value of `cause` can be of any type. You should not make assumptions that the error you caught has an `Error` as its `cause`, in the same way that you cannot be sure the variable bound in the `catch` statement is an `Error` either. The \"Providing structured data as the error cause\" example below shows a case where a non-error is deliberately provided as the cause.\n"
  },
  {
    "path": "documentation/docs/globals/Error/prototype/message.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.message\n\nThe **`message`** data property of an [`Error`](../Error.mdx) instance is a human-readable description of the error.\n\n## Value\n\nA string corresponding to the value passed to the [`Error`](../Error.mdx) constructor as the first argument.\n\n## Description\n\nThis property contains a brief description of the error if one is available or has been set. The `message` property combined with the [`name`](./name.mdx) property is used by the [`Error.prototype.toString()`](./toString.mdx) method to create a string representation of the Error.\n\nBy default, the `message` property is an empty string, but this behavior can be overridden for an instance by specifying a message as the first argument to the [`Error`](../Error.mdx) constructor.\n"
  },
  {
    "path": "documentation/docs/globals/Error/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.name\n\nThe **`name`** data property of `Error.prototype` is shared by all [`Error`](../Error.mdx) instances. It represents the name for the type of error. For `Error.prototype.name`, the initial value is `\"Error\"`. Subclasses like [`TypeError`](../../../globals/TypeError/TypeError.mdx) and [`SyntaxError`](../../SyntaxError/SyntaxError.mdx) provide their own `name` properties.\n\n## Value\n\nA string. For `Error.prototype.name`, the initial value is `\"Error\"`.\n\n## Description\n\nBy default, [`Error`](../Error.mdx) instances are given the name \"Error\". The `name` property, in addition to the [`message`](./message.mdx) property, is used by the [`Error.prototype.toString()`](./toString.mdx) method to create a string representation of the error.\n"
  },
  {
    "path": "documentation/docs/globals/Error/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.toString()\n\nThe **`toString()`** method returns a string representing the\nspecified [`Error`](../Error.mdx) object.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified [`Error`](../Error.mdx) object.\n\n## Description\n\nThe [`Error`](../Error.mdx) object overrides the [`Object.prototype.toString()`](../../Object/prototype/toString.mdx)\nmethod inherited by all objects. \n"
  },
  {
    "path": "documentation/docs/globals/EvalError/EvalError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# EvalError\n\nThe **`EvalError()`** constructor creates a new `EvalError` instance.\n\n## Syntax\n\n```js\nnew EvalError()\nnew EvalError(message)\nnew EvalError(message, options)\nnew EvalError(message, fileName)\nnew EvalError(message, fileName, lineNumber)\n\nEvalError()\nEvalError(message)\nEvalError(message, options)\nEvalError(message, fileName)\nEvalError(message, fileName, lineNumber)\n```\n\n> **Note:** `EvalError()` can be called with or without `new`. Both create a new `EvalError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/docs/globals/FetchEvent/FetchEvent.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent\n\nThis is the event type for `fetch` events. It contains information about the fetch, including the request and how the receiver will treat the response. \nIt provides the [`event.respondWith()`](./prototype/respondWith.mdx) method, which allows us to provide a response to this fetch.\n\n## Instance properties\n\n- `FetchEvent.request` _**readonly**_\n    - : The `Request` that was received by the application.\n- `FetchEvent.client` _**readonly**_\n    - : Information about the downstream client that made the request.\n        While these fields are always defined on Compute, they may be *null* when not available in testing environments\n        such as Viceroy.\n    - `FetchEvent.client.requestId` _**readonly**_\n        - : A UUID generated by Compute for each request.\n    - `FetchEvent.client.address` _**readonly**_\n        - : A string representation of the IPv4 or IPv6 address of the downstream client.\n    - `FetchEvent.client.geo` _**readonly**_\n        - : Either `null`, or a [geolocation dictionary](../../fastly:geolocation/getGeolocationForIpAddress.mdx) corresponding to the IP address of the downstream client.\n    - `FetchEvent.client.tlsJA3MD5` _**readonly**_\n        - : Either `null` or a string representation of the JA3 hash of the TLS ClientHello message.\n    - `FetchEvent.client.tlsCipherOpensslName` _**readonly**_\n        - : Either `null` or a string representation of the cipher suite used to secure the client TLS connection.\n    - `FetchEvent.client.tlsProtocol` _**readonly**_\n        - : Either `null` or a string representation of the TLS protocol version used to secure the client TLS connection.\n    - `FetchEvent.client.tlsClientCertificate` _**readonly**_\n        - : Either `null` or an ArrayBuffer containing the raw client certificate in the mutual TLS handshake message. It is in PEM format. Returns an empty ArrayBuffer if this is not mTLS or available.\n    - `FetchEvent.client.tlsClientHello` _**readonly**_\n        - : Either `null` or an ArrayBuffer containing the raw bytes sent by the client in the TLS ClientHello message.\n    - `FetchEvent.client.tlsJA4` _**readonly**_\n        - : Either `null` or a string representation of the JA4 fingerprint of the TLS ClientHello message.\n    - `FetchEvent.client.h2Fingerprint` _**readonly**_\n        - : Either `null` or a string representation of the HTTP/2 fingerprint for HTTP/2 connections. Returns `null` for HTTP/1.1 connections.\n    - `FetchEvent.client.ohFingerprint` _**readonly**_\n        - : Either `null` or a string representation of the Original Header fingerprint based on the order and presence of request headers.\n- `FetchEvent.server` _**readonly**_\n    - : Information about the server receiving the request for the Fastly Compute service.\n    - `FetchEvent.server.address` _**readonly**_\n        - : A string representation of the IPv4 or IPv6 address of the server which received the request.\n\n## Instance methods\n\n- [`FetchEvent.respondWith()`](./prototype/respondWith.mdx)\n    - : Provide (a promise for) a response for this request.\n- [`FetchEvent.sendEarlyHints()`](./prototype/sendEarlyHints.mdx)\n    - : Send a [103 Early Hints](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/103) response for this request.\n- [`FetchEvent.waitUntil()`](./prototype/waitUntil.mdx)\n    - : Extends the lifetime of the event. Used to notify the host environment of tasks that extend beyond the returning of a response, such as streaming and caching.\n"
  },
  {
    "path": "documentation/docs/globals/FetchEvent/prototype/respondWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent.respondWith()\n\nThe **`respondWith()`** method allows you to provide a promise for a [`Response`](../../Response/Response.mdx) to send back to the client which made the incoming request to your application.\n\n## Syntax\n\n```js\nrespondWith(response)\n```\n\n### Parameters\n\n- `response`\n  - : A [`Response`](../../Response/Response.mdx) or a [`Promise`](../../Promise/Promise.mdx) that resolves to a\n    [`Response`](../../Response/Response.mdx). Otherwise, a network error is returned to Fetch.\n\n### Return value\n\nAlways returns `undefined`.\n"
  },
  {
    "path": "documentation/docs/globals/FetchEvent/prototype/sendEarlyHints.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent.sendEarlyHints()\n\nThe **`sendEarlyHints()`** method allows you to send a [103 Early Hints](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/103) response back to the client which made the incoming request to your application.\n\n## Syntax\n\n```js\nsendEarlyHints(headers)\n```\n\n### Parameters\n\n- `headers`\n  - : Any headers you want to add to your response, contained\n        within a [`Headers`](../../Headers/Headers.mdx) object or object literal of\n        [`String`](../../String/String.mdx) key/value pairs.\n\n### Return value\n\nAlways returns `undefined`.\n\n### Examples\n\n```js\nevent.sendEarlyHints({ link: '</style.css>; rel=preload; as=style' });\n\nevent.sendEarlyHints([\n        ['link', '</style.css>; rel=preload; as=style'],\n        ['link', '</style2.css>; rel=preload; as=style']\n    ]);\n```\n"
  },
  {
    "path": "documentation/docs/globals/FetchEvent/prototype/waitUntil.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent.waitUntil()\n\n\nThe **`waitUntil()`** method tells the host environment that work is ongoing until the promise settles, and it shouldn't terminate\nthe application if it wants that work to complete.\n\nThe `waitUntil()` method must be initially called synchronously within the event callback,\nbut after that it can be called multiple times, and will hold the process open until all the promises passed to it\nsettle.\n\n## Syntax\n\n```js\nwaitUntil(promise)\n```\n\n### Parameters\n\nA [`Promise`](../../Promise/Promise.mdx).\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/docs/globals/FinalizationRegistry/FinalizationRegistry.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FinalizationRegistry()\n\nThe **`FinalizationRegistry`** constructor creates a `FinalizationRegistry` object that uses the given callback.\n\n## Syntax\n\n```js\n// Arrow callback function\nnew FinalizationRegistry((heldValue) => { /* … */ })\n\n// Callback function\nnew FinalizationRegistry(callbackFn)\n\n// Inline callback function\nnew FinalizationRegistry(function(heldValue) { /* … */ })\n```\n\n> **Note:** `FinalizationRegistry()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `callback`\n  - : The callback function this registry should use.\n"
  },
  {
    "path": "documentation/docs/globals/FinalizationRegistry/prototype/register.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FinalizationRegistry.prototype.register()\n\nThe `register()` method registers an object with a\n`FinalizationRegistry` instance so that if the object is garbage-collected,\nthe registry's callback may get called.\n\n## Syntax\n\n```js\nregister(target, heldValue)\nregister(target, heldValue, unregisterToken)\n```\n\n### Parameters\n\n- `target`\n  - : The target object to register.\n- `heldValue`\n  - : The value to pass to the finalizer for this object. This cannot be the `target` object but can be anything else, including functions and primitives.\n- `unregisterToken` _**optional**_\n  - : A token that may be used with the `unregister` method later to unregister\n    the target object. If provided (and not `undefined`), this must be an\n    object. If not provided, the target cannot be unregistered.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown when one of the following condition is met:\n    - `target` is not an object (object as opposed to primitives; functions are objects as well)\n    - `target` is the same as `heldvalue` (`target === heldValue`)\n    - `unregisterToken` is not an object\n\n## Description\n\nSee the [Avoid where possible](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry#avoid_where_possible)\nand [Notes on cleanup callbacks](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry#notes_on_cleanup_callbacks)\nsections of the `FinalizationRegistry` page for important caveats.\n"
  },
  {
    "path": "documentation/docs/globals/FinalizationRegistry/prototype/unregister.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FinalizationRegistry.prototype.unregister()\n\nThe `unregister()` method unregisters a target object from a\n`FinalizationRegistry` instance.\n\n## Syntax\n\n```js\nunregister(unregisterToken)\n```\n\n### Parameters\n\n- `unregisterToken`\n  - : The token used with the [`FinalizationRegistry.prototype.register`](./register.mdx) method when registering the target object. Multiple cells registered with the same `unregisterToken` will be unregistered together.\n\n### Return value\n\nA boolean value that is `true` if at least one cell was unregistered and `false` if no cell was unregistered.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown when `unregisterToken` is not an object.\n\n## Description\n\nWhen a target object has been reclaimed, it is no longer registered in the registry.\nThere is no need to call `unregister` in your cleanup callback. Only call\n`unregister` if you haven't received a cleanup callback and no longer need\nto receive one.\n"
  },
  {
    "path": "documentation/docs/globals/Float32Array/Float32Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Float32Array()\n\nThe **`Float32Array()`** typed array constructor creates a new\n`Float32Array` object, which is, an array of 32-bit floating point numbers\n(corresponding to the C `float` data type) in the platform byte order. If\ncontrol over byte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are\ninitialized to `0`. Once established, you can reference elements in the array\nusing the object's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Float32Array()\nnew Float32Array(length)\nnew Float32Array(typedArray)\nnew Float32Array(object)\n\nnew Float32Array(buffer)\nnew Float32Array(buffer, byteOffset)\nnew Float32Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Float32Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/docs/globals/Float64Array/Float64Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Float64Array()\n\nThe **`Float64Array()`** typed array constructor creates a new\n`Float64Array` object, which is, an array of 64-bit floating point numbers\n(corresponding to the C `double` data type) in the platform byte order. If\ncontrol over byte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are\ninitialized to `0`. Once established, you can reference elements in the array\nusing the object's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Float64Array()\nnew Float64Array(length)\nnew Float64Array(typedArray)\nnew Float64Array(object)\n\nnew Float64Array(buffer)\nnew Float64Array(buffer, byteOffset)\nnew Float64Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Float64Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/docs/globals/FormData/FormData.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData()\n\nThe **`FormData()`** constructor creates a new `FormData` object.\n\n## Syntax\n\n```js\nnew FormData()\nnew FormData(form)\n```\n\n> **Note:** `FormData()` can only be constructed with `new`. Attempting to call it without `new` throws a `TypeError`.\n\n### Parameters\n\n- `form` _**optional**_\n  - : An HTML `<form>` element — when specified, the `FormData` object will be populated with the form's current key/value pairs using the name property of each element for the keys and their submitted value for the values. File input elements are handled specially: their values are taken from the files selected by the user in the upload control.\n\n### Return value\n\nA new `FormData` object, pre-populated with form data if the optional `form` parameter was provided.\n\n## Description\n\nThe `FormData` interface provides a way to construct a set of key/value pairs representing form fields and their values, which can be sent using methods such as `fetch()`. It uses the same format a form would use if the encoding type were set to `\"multipart/form-data\"`.\n\nYou can also append additional data to the `FormData` object after it's created using its various methods.\n\nA `FormData` object can be used in a number of ways with other APIs:\n\n1. It can be sent with the `fetch()` API\n2. It works seamlessly with the `Request` and `Response` objects - it can be used directly as the body of a `Request` object\n3. It can be obtained from a `Response` object using the `formData()` method\n4. It can be passed directly to the `URLSearchParams` constructor\n\nThe transmitted data is in the same format that the form's `submit()` method would use to send the data if the form's encoding type were set to `\"multipart/form-data\"`.\n"
  },
  {
    "path": "documentation/docs/globals/FormData/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.append()\n\nThe **`append()`** method of the `FormData` interface appends a new value onto an existing key inside a `FormData` object, or adds the key if it does not already exist.\n\n## Syntax\n\n```js\nappend(name, value)\nappend(name, value, filename)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the field whose data is contained in `value`.\n- `value`\n  - : The value of the field. This can be a string or a `Blob` (including subclasses such as `File`). If none of these, the value is converted to a string.\n- `filename` _**optional**_\n  - : The filename reported to the server when a `Blob` or `File` is passed as the second parameter. The default filename for `Blob` objects is \"blob\". The default filename for `File` objects is the file's filename.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/docs/globals/FormData/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.delete()\n\nThe **`delete()`** method of the `FormData` interface removes all key/value pairs with the given name from the `FormData` object.\n\n## Syntax\n\n```js\ndelete(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the key you want to delete.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/docs/globals/FormData/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.entries()\n\nThe **`entries()`** method of the `FormData` interface returns an iterator allowing iteration through all key/value pairs contained in this object. The iterator yields a new array for each key/value pair, with the first element being the key and the second element being the value.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nAn `iterator`.\n"
  },
  {
    "path": "documentation/docs/globals/FormData/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.forEach()\n\nThe **`forEach()`** method of the `FormData` interface executes the provided callback function once for each key/value pair in the `FormData` object.\n\n## Syntax\n\n```js\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n  - : A function to execute for each entry in the object. The function will be passed the following arguments:\n    - `value`\n      - : The value of the current entry.\n    - `key`\n      - : The key of the current entry.\n    - `formData`\n      - : The `FormData` object being traversed.\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/docs/globals/FormData/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.get()\n\nThe **`get()`** method of the `FormData` interface returns the first value associated with a given key from within a `FormData` object. If you expect multiple values and want all of them, use the [`getAll()`](../../../globals/FormData/prototype/getAll.mdx) method instead.\n\n## Syntax\n\n```js\nget(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the key you want to retrieve.\n\n### Return value\n\nA `FormDataEntryValue` containing the value. If the key does not exist, it returns `null`.\n"
  },
  {
    "path": "documentation/docs/globals/FormData/prototype/getAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.getAll()\n\nThe **`getAll()`** method of the `FormData` interface returns all the values associated with a given key from within a `FormData` object.\n\n## Syntax\n\n```js\ngetAll(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the key you want to retrieve.\n\n### Return value\n\nAn array of `FormDataEntryValue` items containing all values with the given key. If the key doesn't exist, an empty array is returned.\n"
  },
  {
    "path": "documentation/docs/globals/FormData/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.has()\n\nThe **`has()`** method of the `FormData` interface returns a boolean indicating whether a `FormData` object contains a key/value pair with the given name.\n\n## Syntax\n\n```js\nhas(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the key you want to test for existence.\n\n### Return value\n\n`true` if a key/value pair with the specified name exists; otherwise `false`.\n"
  },
  {
    "path": "documentation/docs/globals/FormData/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.keys()\n\nThe **`keys()`** method of the `FormData` interface returns an iterator allowing iteration through all keys contained in this object. The iterator yields the key for each value.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nAn `iterator`.\n"
  },
  {
    "path": "documentation/docs/globals/FormData/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.set()\n\nThe **`set()`** method of the `FormData` interface sets a new value for an existing key inside a `FormData` object, or adds the key/value if it does not already exist.\n\nThe difference between `set()` and [`append()`](../../../globals/FormData/prototype/append.mdx) is that if the specified key already exists, `set()` overwrites all existing values with the new one, whereas `append()` appends the new value onto the end of the existing values.\n\n## Syntax\n\n```js\nset(name, value)\nset(name, value, filename)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the field whose data is contained in `value`.\n- `value`\n  - : The value of the field. This can be a string or a `Blob` (including subclasses such as `File`). If none of these, the value is converted to a string.\n- `filename` _**optional**_\n  - : The filename reported to the server when a `Blob` or `File` is passed as the second parameter. The default filename for `Blob` objects is \"blob\". The default filename for `File` objects is the file's filename.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/docs/globals/FormData/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.values()\n\nThe **`values()`** method of the `FormData` interface returns an iterator allowing iteration through all values contained in this object. The iterator yields the value for each key/value pair.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nAn `iterator`.\n"
  },
  {
    "path": "documentation/docs/globals/Function/Function.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function()\n\nThe **`Function()`** constructor creates a new [`Function`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function) object. Calling the constructor directly can create functions dynamically, but suffers from security and similar (but far less significant) performance issues as `eval()`. However, unlike `eval` (which may have access to the local scope), the `Function` constructor creates functions which execute in the global scope only.\n\n\n\n## Syntax\n\n```js\nnew Function(functionBody)\nnew Function(arg0, functionBody)\nnew Function(arg0, arg1, functionBody)\nnew Function(arg0, arg1, /* … ,*/ argN, functionBody)\n\nFunction(functionBody)\nFunction(arg0, functionBody)\nFunction(arg0, arg1, functionBody)\nFunction(arg0, arg1, /* … ,*/ argN, functionBody)\n```\n\n> **Note:** `Function()` can be called with or without `new`. Both create a new `Function` instance.\n\n### Parameters\n\n- `argN` _**optional**_\n\n  - : Names to be used by the function as formal argument names. Each must be a string that corresponds to a valid JavaScript parameter (any of plain [identifier](https://developer.mozilla.org/docs/Glossary/Identifier), [rest parameter](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/rest_parameters), or [destructured](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment) parameter, optionally with a [default](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/Default_parameters)), or a list of such strings separated with commas.\n\n    As the parameters are parsed in the same way as function expressions, whitespace and comments are accepted. For example: `\"x\", \"theValue = 42\", \"[a, b] /* numbers */\"` — or `\"x, theValue = 42, [a, b] /* numbers */\"`. (`\"x, theValue = 42\", \"[a, b]\"` is also correct, though very confusing to read.)\n\n- `functionBody`\n  - : A string containing the JavaScript statements comprising the function definition.\n\n## Description\n\n`Function` objects created with the `Function` constructor are parsed when the function is created. This is less efficient than creating a function with a [function expression](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/function) or [function declaration](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function) and calling it within your code, because such functions are parsed with the rest of the code.\n\nAll arguments passed to the function, except the last, are treated as the names of the identifiers of the parameters in the function to be created, in the order in which they are passed. The function will be dynamically compiled as a function expression, with the source assembled in the following fashion:\n\n```js\n`function anonymous(${args.join(\",\")}\n) {\n${functionBody}\n}`\n```\n\nThis is observable by calling the function's [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/toString) method.\n\nHowever, unlike normal [function expressions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/function), the name `anonymous` is not added to the `functionBody`'s scope, since `functionBody` only has access the global scope. If `functionBody` is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode) (the body itself needs to have the `\"use strict\"` directive since it doesn't inherit the strictness from the context), you may use [`arguments.callee`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/arguments/callee) to refer to the function itself. Alternatively, you can define the recursive part as an inner function:\n\n```js\nconst recursiveFn = new Function(\"count\", `\n(function recursiveFn(count) {\n  if (count < 0) {\n    return;\n  }\n  console.log(count);\n  recursiveFn(count - 1);\n})(count);\n`);\n```\n\nNote that the two dynamic parts of the assembled source — the parameters list `args.join(\",\")` and `functionBody` — will first be parsed separately to ensure they are each syntactically valid. This prevents injection-like attempts.\n\n```js\nnew Function(\"/*\", \"*/) {\");\n// SyntaxError: Unexpected end of arg string\n// Doesn't become \"function anonymous(/*) {*/) {}\"\n```\n"
  },
  {
    "path": "documentation/docs/globals/Function/prototype/apply.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.apply()\n\nThe **`apply()`** method calls the specified function with a given `this` value, and `arguments` provided as an array (or an [array-like object](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects)).\n\n\n\n## Syntax\n\n```js\napply(thisArg)\napply(thisArg, argsArray)\n```\n\n### Parameters\n\n- `thisArg`\n  - : The value of `this` provided for the call to `func`. If the function is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) will be replaced with the global object, and primitive values will be converted to objects.\n- `argsArray` _**optional**_\n  - : An array-like object, specifying the arguments with which `func` should be called, or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../../globals/undefined.mdx) if no arguments should be provided to the function.\n\n### Return value\n\nThe result of calling the function with the specified `this` value and arguments.\n\n## Description\n\n> **Note:** This function is almost identical to [`Function.prototype.call()`](../../../globals/Function/prototype/call.mdx), except that `call()` accepts an **argument list**, while `apply()` accepts a **single array of arguments** — for example, `func.apply(this, ['eat', 'bananas'])` vs. `func.call(this, 'eat', 'bananas')`.\n\nNormally, when calling a function, the value of [`this`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this) inside the function is the object that the function was accessed on. With `apply()`, you can assign an arbitrary value as `this` when calling an existing function, without first attaching the function to the object as a property. This allows you to use methods of one object as generic utility functions.\n\n> **Warning:** Do not use `apply()` to chain constructors (for example, to implement inheritance). This invokes the constructor function as a plain function, which means [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target) is `undefined`, and classes throw an error because they can't be called without `new`. Use [`Reflect.construct()`](../../../globals/Reflect/construct.mdx) or [`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends) instead.\n"
  },
  {
    "path": "documentation/docs/globals/Function/prototype/bind.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.bind()\n\nThe **`bind()`** method creates a new function that, when called, has its `this` keyword set to the provided value, with a given sequence of arguments preceding any provided when the new function is called.\n\n\n\n## Syntax\n\n```js\nbind(thisArg)\nbind(thisArg, arg1)\nbind(thisArg, arg1, arg2)\nbind(thisArg, arg1, arg2, /* …, */ argN)\n```\n\n### Parameters\n\n- `thisArg`\n  - : The value to be passed as the `this` parameter to the target function `func` when the bound function is called. If the function is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) will be replaced with the global object, and primitive values will be converted to objects. The value is ignored if the bound function is constructed using the `new` operator.\n- `arg1, …, argN` _**optional**_\n  - : Arguments to prepend to arguments provided to the bound function when invoking `func`.\n\n### Return value\n\nA copy of the given function with the specified `this` value, and initial arguments (if provided).\n\n## Description\n\nThe `bind()` function creates a new _bound function_. Calling the bound function generally results in the execution of the function it wraps, which is also called the _target function_. The bound function will store the parameters passed — which include the value of `this` and the first few arguments — as its internal state. These values are stored in advance, instead of being passed at call time. You can generally see `const boundFn = fn.bind(thisArg, arg1, arg2)` as being equivalent to `const boundFn = (...restArgs) => fn.call(thisArg, arg1, arg2, ...restArgs)` for the effect when it's called (but not when `boundFn` is constructed).\n\nA bound function can be further bound by calling `boundFn.bind(thisArg, /* more args */)`, which creates another bound function `boundFn2`. The newly bound `thisArg` value is ignored, because the target function of `boundFn2`, which is `boundFn`, already has a bound `this`. When `boundFn2` is called, it would call `boundFn`, which in turn calls `fn`. The arguments that `fn` ultimately receives are, in order: the arguments bound by `boundFn`, arguments bound by `boundFn2`, and the arguments received by `boundFn2`.\n\n```js\n\"use strict\"; // prevent `this` from being boxed into the wrapper object\n\nfunction log(...args) {\n  console.log(this, ...args);\n}\nconst boundLog = log.bind(\"this value\", 1, 2);\nconst boundLog2 = boundLog.bind(\"new this value\", 3, 4);\nboundLog2(5, 6); // \"this value\", 1, 2, 3, 4, 5, 6\n```\n\nA bound function may also be constructed using the `new` operator if its target function is constructable. Doing so acts as though the target function had instead been constructed. The prepended arguments are provided to the target function as usual, while the provided `this` value is ignored (because construction prepares its own `this`, as seen by the parameters of [`Reflect.construct`](../../../globals/Reflect/construct.mdx)). If the bound function is directly constructed, [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target) will be the target function instead. (That is, the bound function is transparent to `new.target`.)\n\n```js\nclass Base {\n  constructor(...args) {\n    console.log(new.target === Base);\n    console.log(args);\n  }\n}\n\nconst BoundBase = Base.bind(null, 1, 2);\n\nnew BoundBase(3, 4); // true, [1, 2, 3, 4]\n```\n\nHowever, because a bound function does not have the [`prototype`](../../../globals/Function/prototype/) property, it cannot be used as a base class for [`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends).\n\n```js example-bad\nclass Derived extends class {}.bind(null) {}\n// TypeError: Class extends value does not have valid prototype property undefined\n```\n\nWhen using a bound function as the right-hand side of [`instanceof`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/instanceof), `instanceof` would reach for the target function (which is stored internally in the bound function) and read its `prototype` instead.\n\n```js\nclass Base {}\nconst BoundBase = Base.bind(null, 1, 2);\nconsole.log(new Base() instanceof BoundBase); // true\n```\n\nThe bound function has the following properties:\n\n- [`length`](../../../globals/Function/prototype/length.mdx)\n  - : The `length` of the target function minus the number of arguments being bound (not counting the `thisArg` parameter), with 0 being the minimum value.\n- [`name`](../../../globals/Function/prototype/name.mdx)\n  - : The `name` of the target function plus a `\"bound \"` prefix.\n\nThe bound function also inherits the [prototype chain](https://developer.mozilla.org/docs/Web/JavaScript/Inheritance_and_the_prototype_chain) of the target function. However, it doesn't have other own properties of the target function (such as [static properties](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/static) if the target function is a class).\n"
  },
  {
    "path": "documentation/docs/globals/Function/prototype/call.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.call()\n\nThe **`call()`** method calls the function with a given `this` value and arguments provided individually.\n\n## Syntax\n\n```js\ncall(thisArg)\ncall(thisArg, arg1)\ncall(thisArg, arg1, /* …, */ argN)\n```\n\n### Parameters\n\n- `thisArg`\n  - : The value to use as `this` when calling `func`. If the function is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) will be replaced with the global object, and primitive values will be converted to objects.\n- `arg1, …, argN` _**optional**_\n  - : Arguments for the function.\n\n### Return value\n\nThe result of calling the function with the specified `this` value and arguments.\n\n## Description\n\n> **Note:** This function is almost identical to [`Function.prototype.apply()`](../../../globals/Function/prototype/apply.mdx), except that `call()` accepts an **argument list**, while `apply()` accepts a **single array of arguments** — for example, `func.apply(this, ['eat', 'bananas'])` vs. `func.call(this, 'eat', 'bananas')`.\n\nNormally, when calling a function, the value of [`this`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this) inside the function is the object that the function was accessed on. With `call()`, you can assign an arbitrary value as `this` when calling an existing function, without first attaching the function to the object as a property. This allows you to use methods of one object as generic utility functions.\n\n> **Warning:** Do not use `call()` to chain constructors (for example, to implement inheritance). This invokes the constructor function as a plain function, which means [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target) is `undefined`, and classes throw an error because they can't be called without `new`. Use [`Reflect.construct()`](../../../globals/Reflect/construct.mdx) or [`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends) instead.\n"
  },
  {
    "path": "documentation/docs/globals/Function/prototype/index.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.prototype\n\nThe **`prototype`** data property of a `Function` instance is used when the function is used as a constructor with the `new` operator. It will become the new object's prototype.\n\n> **Note:** Not all `Function` objects have the `prototype` property — see [description](#description).\n\n## Value\n\nAn object.\n\n> **Note:** The `prototype` property of [classes](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes) is not writable.\n\n## Description\n\nWhen a function is called with `new`, the constructor's `prototype` property will become the resulting object's prototype.\n\n```js\nfunction Ctor() {}\nconst inst = new Ctor();\nconsole.log(Object.getPrototypeOf(inst) === Ctor.prototype); // true\n```\n\nYou can read [Inheritance and the prototype chain](https://developer.mozilla.org/docs/Web/JavaScript/Inheritance_and_the_prototype_chain#constructors) for more information about the interactions between a constructor function's `prototype` property and the resulting object's prototype.\n\nA function having a `prototype` property is not sufficient for it to be eligible as a constructor. [Generator functions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function*) have a `prototype` property, but cannot be called with `new`:\n\n```js\nasync function* asyncGeneratorFunction() {}\nfunction* generatorFunction() {}\n```\n\nInstead, generator functions' `prototype` property is used when they are called _without_ `new`. The `prototype` property will become the returned [`Generator`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Generator) object's prototype.\n\nIn addition, some functions may have a `prototype` but throw unconditionally when called with `new`. For example, the [`Symbol()`](../../../globals/Symbol/Symbol.mdx) and [`BigInt`](../../../globals/BigInt/BigInt.mdx) functions throw when called with `new`, because `Symbol.prototype` and `BigInt.prototype` are only intended to provide methods for the primitive values, but the wrapper objects should not be directly constructed.\n\nThe following functions do not have `prototype`, and are therefore ineligible as constructors, even if a `prototype` property is later manually assigned:\n\n```js\nconst method = { foo() {} }.foo;\nconst arrowFunction = () => {};\nasync function asyncFunction() {}\n```\n\nThe following are valid constructors that have `prototype`:\n\n```js\nclass Class {}\nfunction fn() {}\n```\n\nA [bound function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/bind) does not have a `prototype` property, but may be constructable. When it's constructed, the target function is constructed instead, and if the target function is constructable, it would return a normal instance.\n\n```js\nconst boundFunction = function () {}.bind(null);\n```\n\nA function's `prototype` property, by default, is a plain object with one property: (`constructor`)[../../../globals/Object/prototype/constructor.mdx), which is a reference to the function itself. The `constructor` property is writable, non-enumerable, and configurable.\n\nIf the `prototype` of a function is reassigned with something other than an `Object`, when the function is called with `new`, the returned object's prototype would be `Object.prototype` instead. (In other words, `new` ignores the `prototype` property and constructs a plain object.)\n\n```js\nfunction Ctor() {}\nCtor.prototype = 3;\nconsole.log(Object.getPrototypeOf(new Ctor()) === Object.prototype); // true\n```\n"
  },
  {
    "path": "documentation/docs/globals/Function/prototype/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.length\n\nThe **`length`** data property of a `Function` instance indicates the number of parameters expected by the function.\n\n## Value\n\nA number.\n\n## Description\n\nA `Function` object's `length` property indicates how many arguments the function expects, i.e. the number of formal parameters. \n\nThe `Function` constructor is itself a `Function` object. Its `length` data property has a value of `1`.\n\nDue to historical reasons, `Function.prototype` is a callable itself. The `length` property of `Function.prototype` has a value of `0`.\n"
  },
  {
    "path": "documentation/docs/globals/Function/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.name\n\nThe **`name`** property of a `Function` instance indicates the function's name as specified when it was created, or it may be either `anonymous` or `''` (an empty string) for functions created anonymously.\n\n## Value\n\nA string.\n\n> **Note:** In non-standard, pre-ES2015 implementations the `configurable` attribute was `false` as well.\n\n## Description\n\nThe function's `name` property can be used to identify the function in debugging tools or error messages. It has no semantic significance to the language itself.\n\nThe `name` property is read-only and cannot be changed by the assignment operator:\n\n```js\nfunction someFunction() {}\n\nsomeFunction.name = 'otherFunction';\nconsole.log(someFunction.name); // someFunction\n```\n\nTo change it, use [`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx).\n\nThe `name` property is typically inferred from how the function is defined. In the following sections, we will describe the various ways in which it can be inferred.\n\n### Function declaration\n\nThe `name` property returns the name of a function declaration.\n\n```js\nfunction doSomething() {}\ndoSomething.name; // \"doSomething\"\n```\n\n### Default-exported function declaration\n\nAn [`export default`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/export) declaration exports the function as a declaration instead of an expression. If the declaration is anonymous, the name is `\"default\"`.\n\n```js\n// -- someModule.js --\nexport default function () {};\n\n// -- main.js --\nimport someModule from \"./someModule.js\";\n\nsomeModule.name; // \"default\"\n```\n\n### Function constructor\n\nFunctions created with the [`Function()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/Function) constructor have name \"anonymous\".\n\n```js\nnew Function().name; // \"anonymous\"\n```\n\n### Function expression\n\nIf the function expression is named, that name is used as the `name` property.\n\n```js\nconst someFunction = function someFunctionName() {};\nsomeFunction.name; // \"someFunctionName\"\n```\n\nAnonymous function expressions created using the keyword `function` or arrow functions would have `\"\"` (an empty string) as their name.\n\n```js\n(function () {}).name; // \"\"\n(() => {}).name; // \"\"\n```\n\nHowever, such cases are rare — usually, in order to refer to the expression elsewhere, the function expression is attached to an identifier when it's created (such as in a variable declaration). In such cases, the name can be inferred, as the following few subsections demonstrate.\n\nOne practical case where the name cannot be inferred is a function returned from another function:\n\n```js\nfunction getFoo() {\n  return () => {};\n}\ngetFoo().name; // \"\"\n```\n\n### Variable declaration and method\n\nVariables and methods can infer the name of an anonymous function from its syntactic position.\n\n```js\nconst f = function () {};\nconst object = {\n  someMethod: function () {}\n};\n\nconsole.log(f.name); // \"f\"\nconsole.log(object.someMethod.name); // \"someMethod\"\n```\n\nThe same applies to assignment:\n\n```js\nlet f;\nf = () => {};\nf.name; // \"f\"\n```\n\n### Initializer and default value\n\nFunctions in initializers (default values) of [destructuring](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#default_value), [default parameters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/Default_parameters), [class fields](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/Public_class_fields), etc., will inherit the name of the bound identifier as their `name`.\n\n```js\nconst [f = () => {}] = [];\nf.name; // \"f\"\n\nconst { someMethod: m = () => {} } = {};\nm.name; // \"m\"\n\nfunction foo(f = () => {}) {\n  console.log(f.name);\n}\nfoo(); // \"f\"\n\nclass Foo {\n  static someMethod = () => {};\n}\nFoo.someMethod.name; // someMethod\n```\n\n### Shorthand method\n\n```js\nconst o = {\n  foo() {},\n};\no.foo.name; // \"foo\";\n```\n\n### Bound function\n\n[`Function.prototype.bind()`](../../../globals/Function/prototype/bind.mdx) produces a function whose name is \"bound \" plus the function name.\n\n```js\nfunction foo() {};\nfoo.bind({}).name; // \"bound foo\"\n```\n\n### Getter and setter\n\nWhen using [`get`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/get) and [`set`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/set) accessor properties, \"get\" or \"set\" will appear in the function name.\n\n```js\nconst o = {\n  get foo() {},\n  set foo(x) {},\n};\n\nconst descriptor = Object.getOwnPropertyDescriptor(o, \"foo\");\ndescriptor.get.name; // \"get foo\"\ndescriptor.set.name; // \"set foo\";\n```\n\n### Class\n\nA class's name follows the same algorithm as function declarations and expressions.\n\n```js\nclass Foo {}\nFoo.name; // \"Foo\"\n```\n\n> **Warning:** JavaScript will set the function's `name` property only if a function does not have an own property called `name`. However, classes' [static members](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/static) will be set as own properties of the class constructor function, and thus prevent the built-in `name` from being applied. See [telling the constructor name of an object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name#telling_the_constructor_name_of_an_object) for more details.\n\n### Symbol as function name\n\nIf a `Symbol` is used a function name and the symbol has a description, the method's name is the description in square brackets.\n\n```js\nconst sym1 = Symbol(\"foo\");\nconst sym2 = Symbol();\n\nconst o = {\n  [sym1]() {},\n  [sym2]() {},\n};\n\no[sym1].name; // \"[foo]\"\no[sym2].name; // \"[]\"\n```\n\n### Private property\n\nPrivate fields and private methods have the hash (`#`) as part of their names.\n\n```js\nclass Foo {\n  #field = () => {};\n  #method() {}\n  getNames() {\n    console.log(this.#field.name);\n    console.log(this.#method.name);\n  }\n}\n\nnew Foo().getNames();\n// \"#field\"\n// \"#method\"\n```\n"
  },
  {
    "path": "documentation/docs/globals/Function/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.toString()\n\nThe **`toString()`** method returns a string representing the source code of the specified `Function`.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the source code of the function.\n\n## Description\n\nThe `Function` object overrides the `toString()` method\ninherited from `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For user-defined `Function`\nobjects, the `toString` method returns a string containing the source text\nsegment which was used to define the function.\n\nJavaScript calls the `toString` method automatically when a\n`Function` is to be represented as a text value, e.g. when a function is\nconcatenated with a string.\n\nThe `toString()` method will throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) exception\n(\"Function.prototype.toString called on incompatible object\"), if its\n`this` value object is not a `Function` object.\n\n```js example-bad\nFunction.prototype.toString.call('foo'); // throws TypeError\n```\n\nIf the `toString()` method is called on built-in function objects, a\nfunction created by [`Function.prototype.bind()`](../../../globals/Function/prototype/bind.mdx), or\nother non-JavaScript functions, then `toString()` returns a\n_native function string_ which looks like\n\n```js\n\"function someName() { [native code] }\"\n```\n\nFor intrinsic object methods and functions, `someName` is the initial name of the function; otherwise its content may be implementation-defined, but will always be in property name syntax, like `[1 + 1]`, `someName`, or `1`.\n\n> **Note:** This means using [`eval()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/eval) on native function strings is a guaranteed syntax error.\n\nIf the `toString()` method is called on a function created by the `Function` constructor, `toString()` returns the source code of a synthesized function declaration named \"anonymous\" using the provided parameters and function body. For example, `Function(\"a\", \"b\", \"return a + b\").toString()` will return:\n\n```js\n\"function anonymous(a,b\\n) {\\nreturn a + b\\n}\"\n```\n\nSince ES2018, the spec requires the return value of `toString()` to be the exact same source code as it was declared, including any whitespace and/or comments — or, if the host doesn't have the source code available for some reason, requires returning a native function string. Support for this revised behavior can be found in the [browser compatibility table](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/toString#browser_compatibility).\n"
  },
  {
    "path": "documentation/docs/globals/Headers/Headers.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers()\n\nThe **`Headers()`** constructor creates a new `Headers` object.\n\n## Syntax\n\n```js\nnew Headers()\nnew Headers(init)\n```\n\n### Parameters\n\n- `init` _**optional**_\n  - : An object containing any HTTP headers that you want to pre-populate your `Headers` object with. This can be a\n    simple object literal with `String` values, an array of name-value pairs, where each pair is a 2-element string array; or an existing\n    `Headers` object. In the last case, the new `Headers` object\n    copies its data from the existing `Headers` object.\n"
  },
  {
    "path": "documentation/docs/globals/Headers/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.append()\n\nThe **`append()`** method of the `Headers`\ninterface appends a new value onto an existing header inside a `Headers`\nobject, or adds the header if it does not already exist.\n\nThe difference between `Headers.prototype.set()` and `append()` is\nthat if the specified header already exists and accepts multiple values,\n`set()` will overwrite the existing value with the new one, whereas\n`append()` will append the new value onto the end of the set of values.\n\n## Syntax\n\n```js\nappend(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to add to the `Headers` object.\n- `value`\n  - : The value of the HTTP header you want to add.\n\n### Return value\n\nNone (`undefined`).\n"
  },
  {
    "path": "documentation/docs/globals/Headers/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.delete()\n\nThe **`delete()`** method of the `Headers`\ninterface deletes a header from the current `Headers` object.\n\nThis method throws a `TypeError` for the following reasons:\n\n- The value of the name parameter is not the name of an HTTP header.\n\n## Syntax\n\n```js\ndelete(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to delete from the `Headers` object.\n\n### Return value\n\nNone (`undefined`).\n"
  },
  {
    "path": "documentation/docs/globals/Headers/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.entries()\n\nThe **`Headers.entries()`** method returns an iterator allowing to go through all key/value pairs\ncontained in this object. The both the key and value of each pairs are `String` objects.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/docs/globals/Headers/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.forEach()\n\nThe **`Headers.forEach()`** method executes a callback function once per each key/value pair in the `Headers` object.\n\n## Syntax\n\n```js\n// Arrow function\nforEach((value, key) => { /* … */ })\nforEach((value, key, object) => { /* … */ })\n\n// Inline callback function\nforEach(function (value, key) { /* … */ })\nforEach(function (value, key, object) { /* … */ })\nforEach(function (value, key) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n  - : Function to execute for each entry in the map. It takes the following arguments:\n    - `value`\n      - : Value of the currently visited header entry.\n    - `key`\n      - : Name of the currently visited header entry.\n    - `object`\n      - : The Headers object being iterated.\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `callback`.\n\n### Return value\n\n`undefined`.\n\n## Description\n\nThe `Headers.forEach()` method executes the provided callback once for each key of the Headers which actually exist. It is not invoked for keys which have been deleted. However, it is executed for keys which are present but have the value undefined.\n"
  },
  {
    "path": "documentation/docs/globals/Headers/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.get()\n\nThe **`get()`** method of the [`Headers`](../../../globals/Headers/Headers.mdx) interface\nreturns a byte string of all the values of a header within a `Headers` object\nwith a given name. If the requested header doesn't exist in the `Headers`\nobject, it returns `null`.\n\n## Syntax\n\n```js\nget(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header whose values you want to retrieve from the\n    `Headers` object. If the given name doesn't match the\n    [field-name](https://httpwg.org/specs/rfc9110.html#fields.names) production\n    in the HTTP specification, this method throws a\n    [`TypeError`](../../../globals/TypeError/TypeError.mdx). The name is case-insensitive.\n\n### Return value\n\nA [`String`](../../../globals/String/String.mdx) sequence representing the values of the retrieved header or\n`null` if this header is not set.\n"
  },
  {
    "path": "documentation/docs/globals/Headers/prototype/getSetCookie.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.getSetCookie()\n\nThe **`getSetCookie()`** method of the [`Headers`](../../../globals/Headers/Headers.mdx) interface\nreturns an array of all the values of the `Set-Cookie` headers, returning\nan empty list if none are present.\n\n## Syntax\n\n```js\ngetSetCookie()\n```\n\n### Return value\n\n`String[]` representing the list of `Set-Cookie` headers.\n"
  },
  {
    "path": "documentation/docs/globals/Headers/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.has()\n\nThe **`has()`** method of the `Headers` interface\nreturns a boolean stating whether a `Headers` object contains a certain\nheader.\n\n## Syntax\n\n```js\nhas(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to test for. If the given name is not a valid\n    HTTP header name, this method throws a `TypeError`.\n\n### Return value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/docs/globals/Headers/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.keys()\n\nThe **`Headers.keys()`** method returns an iterator allowing to go through all keys contained\nin this object. The keys are `String` objects.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/docs/globals/Headers/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.set()\n\nThe **`set()`** method of the `Headers` interface\nsets a new value for an existing header inside a `Headers` object, or adds\nthe header if it does not already exist.\n\nThe difference between `set()` and `Headers.append` is that if\nthe specified header already exists and accepts multiple values, `set()`\noverwrites the existing value with the new one, whereas `Headers.append`\nappends the new value to the end of the set of values.\n\n## Syntax\n\n```js\nset(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to set to a new value. If the given name is not\n    the name of an HTTP header, this method throws a `TypeError`.\n- `value`\n  - : The new value you want to set.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/docs/globals/Headers/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.values()\n\nThe **`Headers.values()`** method returns an iterator allowing to go through all values contained\nin this object. The values are `String` objects.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/docs/globals/HmacImportParams/HmacImportParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# HmacImportParams\n\nThe **`HmacImportParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.importKey`, when generating a key for the `HMAC` algorithm.\n\n## Instance properties\n\n- `name`\n  - : A string. This should be set to `HMAC`.\n- `hash`\n\n  - : A string representing the name of the digest function to use. The can take a value of `SHA-1`, `SHA-256`, `SHA-384`, or `SHA-512`.\n\n- `length` _optional_\n  - : A `Number` representing the length in bits of the key. If this is omitted the length of the key is equal to the length of the digest generated by the digest function you have chosen. Unless you have a good reason to use a different length, omit this property and use the default.\n\n"
  },
  {
    "path": "documentation/docs/globals/Infinity.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Infinity\n\nThe global property **`Infinity`** is a numeric value representing infinity.\n\n## Value\n\nThe same number value as `Number.POSITIVE_INFINITY`.\n\n## Description\n\n`Infinity` is a property of the _global object_. In other words, it is a variable in global scope.\n\nThe value `Infinity` (positive infinity) is greater than any other number.\n\nThis value behaves slightly differently than mathematical infinity; see `Number.POSITIVE_INFINITY` for details.\n"
  },
  {
    "path": "documentation/docs/globals/Int16Array/Int16Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Int16Array()\n\nThe **`Int16Array()`** typed array constructor creates an array\nof twos-complement 16-bit signed integers in the platform byte order. If control over\nbyte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are initialized\nto `0`. Once established, you can reference elements in the array using the\nobject's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Int16Array()\nnew Int16Array(length)\nnew Int16Array(typedArray)\nnew Int16Array(object)\n\nnew Int16Array(buffer)\nnew Int16Array(buffer, byteOffset)\nnew Int16Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Int16Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/docs/globals/Int32Array/Int32Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Int32Array()\n\nThe **`Int32Array()`** typed array constructor creates an array\nof twos-complement 32-bit signed integers in the platform byte order. If control over\nbyte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are initialized\nto `0`. Once established, you can reference elements in the array using the\nobject's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Int32Array()\nnew Int32Array(length)\nnew Int32Array(typedArray)\nnew Int32Array(object)\n\nnew Int32Array(buffer)\nnew Int32Array(buffer, byteOffset)\nnew Int32Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Int32Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/docs/globals/Int8Array/Int8Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Int8Array()\n\nThe **`Int8Array()`** constructor creates a typed array of\ntwos-complement 8-bit signed integers. The contents are initialized to `0`.\nOnce established, you can reference elements in the array using the object's methods, or\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew Int8Array()\nnew Int8Array(length)\nnew Int8Array(typedArray)\nnew Int8Array(object)\n\nnew Int8Array(buffer)\nnew Int8Array(buffer, byteOffset)\nnew Int8Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Int8Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/docs/globals/JSON/parse.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# JSON.parse()\n\nThe **`JSON.parse()`** method parses a JSON string, constructing the JavaScript value or object described by the string. An optional _reviver_ function can be provided to perform a transformation on the resulting object before it is returned.\n\n## Syntax\n\n```js\nJSON.parse(text)\nJSON.parse(text, reviver)\n```\n\n### Parameters\n\n- `text`\n  - : The string to parse as JSON.\n- `reviver` _**optional**_\n  - : If a function, this prescribes how each value originally produced by parsing is transformed before being returned. Non-callable values are ignored. The function is called with the following arguments:\n    - `key`\n      - : The key associated with the value.\n    - `value`\n      - : The value produced by parsing.\n\n### Return value\n\nThe `Object`, `Array`, string, number, boolean, or `null` value corresponding to the given JSON `text`.\n\n### Exceptions\n\n- [`SyntaxError`](../../globals/SyntaxError/SyntaxError.mdx)\n  - : Thrown if the string to parse is not valid JSON.\n\n## Description\n\n`JSON.parse()` parses a JSON string according to the [JSON grammar](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/JSON#full_json_grammar), then evaluates the string as if it's a JavaScript expression. The only instance where a piece of JSON text represents a different value from the same JavaScript expression is when dealing with the `\"__proto__\"` key — see [Object literal syntax vs. JSON](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Object_initializer#object_literal_syntax_vs._json).\n\n### The reviver parameter\n\nIf a `reviver` is specified, the value computed by parsing is _transformed_ before being returned. Specifically, the computed value and all its properties (in a [depth-first](https://en.wikipedia.org/wiki/Depth-first_search) fashion, beginning with the most nested properties and proceeding to the original value itself) are individually run through the `reviver`.\n\nThe `reviver` is called with the object containing the property being processed as `this`, and two arguments: `key` and `value`, representing the property name as a string (even for arrays) and the property value. If the `reviver` function returns [`undefined`](../../globals/undefined.mdx) (or returns no value — for example, if execution falls off the end of the function), the property is deleted from the object. Otherwise, the property is redefined to be the return value. If the `reviver` only transforms some values and not others, be certain to return all untransformed values as-is — otherwise, they will be deleted from the resulting object.\n\nSimilar to the `replacer` parameter of [`JSON.stringify()`](../../globals/JSON/stringify.mdx), `reviver` will be last called on the root object with an empty string as the `key` and the root object as the `value`. For JSON text parsing to primitive values, `reviver` will be called once.\n\nNote that `reviver` is run after the value is parsed. So, for example, numbers in JSON text will have already been converted to JavaScript numbers, and may lose precision in the process. To transfer large numbers without loss of precision, serialize them as strings, and revive them to [BigInts](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/BigInt), or other appropriate arbitrary precision formats.\n"
  },
  {
    "path": "documentation/docs/globals/JSON/stringify.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# JSON.stringify()\n\nThe **`JSON.stringify()`** method converts a JavaScript value to a JSON string, optionally replacing values if a replacer function is specified or optionally including only the specified properties if a replacer array is specified.\n\n## Syntax\n\n```js\nJSON.stringify(value)\nJSON.stringify(value, replacer)\nJSON.stringify(value, replacer, space)\n```\n\n### Parameters\n\n- `value`\n  - : The value to convert to a JSON string.\n- `replacer` _**optional**_\n  - : A function that alters the behavior of the stringification process, or an array of strings or numbers naming properties of `value` that should be included in the output. If `replacer` is an array, all elements that are not strings or numbers (can be either primitives or wrapper objects), including `Symbol` values, are completely ignored. If `replacer` is anything other than a function or an array (e.g. [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or not provided), all properties of the object are included in the resulting JSON string.\n- `space` _**optional**_\n\n  - : A string or number that's used to insert white space (including indentation, line break characters, etc.) into the output JSON string for readability purposes.\n\n    If this is a number, it indicates the number of space characters to be used as indentation, clamped to 10 (that is, any number greater than `10` is treated as if it were `10`). Values less than 1 indicate that no space should be used.\n\n    If this is a string, the string (or the first 10 characters of the string, if it's longer than that) is inserted before every nested object or array.\n\n    If `space` is anything other than a string or number (can be either a primitive or a wrapper object) — for example, is [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or not provided — no white space is used.\n\n### Return value\n\nA JSON string representing the given value, or undefined.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if one of the following is true:\n    - `value` contains a circular reference.\n    - A `BigInt` value is encountered.\n\n## Description\n\n`JSON.stringify()` converts a value to JSON notation representing it:\n\n- `Boolean`, `Number`, `String`, and `BigInt` (obtainable via [`Object()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/Object)) objects are converted to the corresponding primitive values during stringification, in accordance with the traditional conversion semantics. `Symbol` objects (obtainable via [`Object()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/Object)) are treated as plain objects.\n- Attempting to serialize `BigInt` values will throw. However, if the BigInt has a `toJSON()` method (through monkeypatching: `BigInt.prototype.toJSON = ...`), that method can provide the serialization result. This constraint ensures that a proper serialization (and, very likely, its accompanying deserialization) behavior is always explicitly provided by the user.\n- [`undefined`](../../globals/undefined.mdx), `Function`, and `Symbol` values are not valid JSON values. If any such values are encountered during conversion, they are either omitted (when found in an object) or changed to [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) (when found in an array). `JSON.stringify()` can return `undefined` when passing in \"pure\" values like `JSON.stringify(() => {})` or `JSON.stringify(undefined)`.\n- The numbers [`Infinity`](../../globals/Infinity.mdx) and [`NaN`](../../globals/NaN.mdx), as well as the value [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null), are all considered `null`. (But unlike the values in the previous point, they would never be omitted.)\n- Arrays are serialized as arrays (enclosed by square brackets). Only array indices between 0 and `length - 1` (inclusive) are serialized; other properties are ignored.\n- For other objects:\n\n  - All `Symbol`-keyed properties will be completely ignored, even when using the [`replacer`](#the-replacer-parameter) parameter.\n\n  - If the value has a `toJSON()` method, it's responsible to define what data will be serialized. Instead of the object being serialized, the value returned by the `toJSON()` method when called will be serialized. `JSON.stringify()` calls `toJSON` with one parameter, the `key`, which has the same semantic as the `key` parameter of the [`replacer`](#the-replacer-parameter) function:\n\n    - if this object is a property value, the property name\n    - if it is in an array, the index in the array, as a string\n    - if `JSON.stringify()` was directly called on this object, an empty string\n\n    `Date` objects implement the [`toJSON()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toJSON) method which returns a string (the same as [`date.toISOString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)). Thus, they will be stringified as strings.\n\n  - Only [enumerable own properties](https://developer.mozilla.org/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) are visited. This means [Map](../../globals/Map/Map.mdx), [Set](../../globals/Set/Set.mdx), etc. will become `\"{}\"`. You can use the [`replacer`](#the-replacer-parameter) parameter to serialize them to something more useful.\n\n    Properties are visited using the same algorithm as [`Object.keys()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/keys), which has a well-defined order and is stable across implementations. For example, `JSON.stringify` on the same object will always produce the same string, and `JSON.parse(JSON.stringify(obj))` would produce an object with the same key ordering as the original (assuming the object is completely JSON-serializable).\n\n### The replacer parameter\n\nThe `replacer` parameter can be either a function or an array.\n\nAs an array, its elements indicate the names of the properties in the object that should be included in the resulting JSON string. Only string and number values are taken into account; symbol keys are ignored.\n\nAs a function, it takes two parameters: the `key` and the `value` being stringified. The object in which the key was found is provided as the `replacer`'s `this` context.\n\nThe `replacer` function is called for the initial object being stringified as well, in which case the `key` is an empty string (`\"\"`). It is then called for each property on the object or array being stringified. Array indices will be provided in its string form as `key`. The current property value will be replaced with the `replacer`'s return value for stringification. This means:\n\n- If you return a number, string, boolean, or `null`, that value is directly serialized and used as the property's value. (Returning a BigInt will throw as well.)\n- If you return a `Function`, `Symbol`, or [`undefined`](../../globals/undefined.mdx), the property is not included in the output.\n- If you return any other object, the object is recursively stringified, calling the `replacer` function on each property.\n\n> **Note:** When parsing JSON generated with `replacer` functions, you would likely want to use the [`reviver`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#using_the_reviver_parameter) parameter to perform the reverse operation.\n\nTypically, array elements' index would never shift (even when the element is an invalid value like a function, it will become `null` instead of omitted). Using the `replacer` function allows you to control the order of the array elements by returning a different array.\n\n### The space parameter\n\nThe `space` parameter may be used to control spacing in the final string.\n\n- If it is a number, successive levels in the stringification will each be indented by this many space characters.\n- If it is a string, successive levels will be indented by this string.\n\nEach level of indentation will never be longer than 10. Number values of `space` are clamped to 10, and string values are truncated to 10 characters.\n"
  },
  {
    "path": "documentation/docs/globals/Map/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get Map\\[Symbol.species]\n\nThe **`Map[Symbol.species]`** accessor property is an unused accessor property specifying how to copy `Map` objects.\n\n## Syntax\n\n```js\nMap[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct copied `Map` instances.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `Map` objects. Subclass constructors may override it to change the constructor assignment.\n\n> **Note:** This property is currently unused by all `Map` methods.\n"
  },
  {
    "path": "documentation/docs/globals/Map/Map.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map()\n\nThe **`Map()` constructor** creates [Map](../../globals/Map/Map.mdx) objects.\n\n## Syntax\n\n```js\nnew Map()\nnew Map(iterable)\n```\n\n> **Note:** `Map()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable` _**optional**_\n  - : An `Array` or other\n    [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) object\n    whose elements are key-value pairs. (For example, arrays with two elements,\n    such as `[[ 1, 'one' ],[ 2, 'two' ]]`.) Each key-value pair is added to the\n    new `Map`.\n"
  },
  {
    "path": "documentation/docs/globals/Map/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype\\[Symbol.iterator]()\n\nThe **`Symbol.iterator`** method of a `Map` object implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows maps to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the key-value pairs of the map.\n\nThe initial value of this property is the same function object as the initial value of the [`Map.prototype.entries`](../../../globals/Map/prototype/entries.mdx) property.\n\n## Syntax\n\n```js\nmap[Symbol.iterator]()\n```\n\n### Return value\n\nThe same return value as [`Map.prototype.entries()`](../../../globals/Map/prototype/entries.mdx): a new iterable iterator object that yields the key-value pairs of the map.\n"
  },
  {
    "path": "documentation/docs/globals/Map/prototype/clear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.clear()\n\nThe **`clear()`** method removes all elements from a `Map` object.\n\n## Syntax\n\n```js\nclear()\n```\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/docs/globals/Map/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.delete()\n\nThe **`delete()`** method removes the specified element from a `Map` object by\nkey.\n\n## Syntax\n\n```js\ndelete(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to remove from the `Map` object.\n\n### Return value\n\n`true` if an element in the `Map` object existed and has been removed, or\n`false` if the element does not exist.\n"
  },
  {
    "path": "documentation/docs/globals/Map/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.entries()\n\nThe **`entries()`** method returns a new\n_[iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators)_ object\nthat contains the `[key, value]` pairs for each element in the `Map` object in\ninsertion order. In this particular case, this iterator object is also an\niterable, so the for-of loop can be used. When the protocol `[Symbol.iterator]`\nis used, it returns a function that, when invoked, returns this iterator itself.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nA new [Map](../../../globals/Map/Map.mdx) iterator object.\n"
  },
  {
    "path": "documentation/docs/globals/Map/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.forEach()\n\nThe **`forEach()`** method executes a provided function once per each key/value\npair in the `Map` object, in insertion order.\n\n## Syntax\n\n```js\n// Arrow function\nforEach(() => { /* … */ } )\nforEach((value) => { /* … */ } )\nforEach((value, key) => { /* … */ } )\nforEach((value, key, map) => { /* … */ } )\n\n// Callback function\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n\n// Inline callback function\nforEach(function() { /* … */ })\nforEach(function(value) { /* … */ })\nforEach(function(value, key) { /* … */ })\nforEach(function(value, key, map) { /* … */ })\nforEach(function(value, key, map) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n  - : Function to execute for each entry in the map. It takes the following\n    arguments:\n    - `value` _**optional**_\n      - : Value of each iteration.\n    - `key` _**optional**_\n      - : Key of each iteration.\n    - `map` _**optional**_\n      - : The map being iterated.\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `callback`.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n## Description\n\nThe `forEach` method executes the provided `callback` once for each key of the\nmap which actually exist. It is not invoked for keys which have been deleted.\nHowever, it is executed for values which are present but have the value\n`undefined`.\n\n`callback` is invoked with **three arguments**:\n\n- the entry's `value`\n- the entry's `key`\n- the **`Map` object** being traversed\n\nIf a `thisArg` parameter is provided to `forEach`, it will be passed to\n`callback` when invoked, for use as its `this` value. Otherwise, the value\n`undefined` will be passed for use as its `this` value. The `this` value\nultimately observable by `callback` is determined according to\n[the usual rules for determining the `this` seen by a function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this).\n\nEach value is visited once, except in the case when it was deleted and re-added\nbefore `forEach` has finished. `callback` is not invoked for values deleted\nbefore being visited. New values added before `forEach` has finished will be\nvisited.\n"
  },
  {
    "path": "documentation/docs/globals/Map/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.get()\n\nThe **`get()`** method returns a specified element from a `Map` object. If the\nvalue that is associated to the provided key is an object, then you will get a\nreference to that object and any change made to that object will effectively\nmodify it inside the `Map` object.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to return from the `Map` object.\n\n### Return value\n\nThe element associated with the specified key, or\n[`undefined`](../../../globals/undefined.mdx) if the key can't be found in the `Map` object.\n"
  },
  {
    "path": "documentation/docs/globals/Map/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.has()\n\nThe **`has()`** method returns a boolean indicating whether an element with the\nspecified key exists or not.\n\n## Syntax\n\n```js\nhas(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to test for presence in the `Map` object.\n\n### Return value\n\n`true` if an element with the specified key exists in the `Map` object;\notherwise `false`.\n"
  },
  {
    "path": "documentation/docs/globals/Map/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.keys()\n\nThe **`keys()`** method returns a new\n_[iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators)_ object\nthat contains the keys for each element in the `Map` object in insertion order. In this particular case, this iterator object is also an iterable, so a [for...of](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loop can be used.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nA new [Map](../../../globals/Map/Map.mdx) iterator object.\n"
  },
  {
    "path": "documentation/docs/globals/Map/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.set()\n\nThe **`set()`** method adds or updates an entry in a `Map` object with a specified key and a value.\n\n## Syntax\n\n```js\nset(key, value)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to add to the `Map` object. The key may be any [JavaScript type](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures) (any [primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_values) or any type of [JavaScript object](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#objects)).\n- `value`\n  - : The value of the element to add to the `Map` object. The value may be any [JavaScript type](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures) (any [primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_values) or any type of [JavaScript object](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#objects)).\n\n### Return value\n\nThe `Map` object.\n"
  },
  {
    "path": "documentation/docs/globals/Map/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.size\n\nThe **`size`** accessor property returns the number of elements in a\n[Map](../../../globals/Map/Map.mdx) object.\n\n## Description\n\nThe value of `size` is an integer representing how many entries the `Map` object\nhas. A set accessor function for `size` is `undefined`; you can not change this\nproperty.\n"
  },
  {
    "path": "documentation/docs/globals/Map/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.values()\n\nThe **`values()`** method returns a new\n_[iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators)_ object\nthat contains the values for each element in the `Map` object in insertion\norder.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nA new [Map](../../../globals/Map/Map.mdx) iterator object.\n"
  },
  {
    "path": "documentation/docs/globals/Math/E.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.E\n\nThe **`Math.E`** property represents Euler's number, the base of natural logarithms, e, which is approximately 2.718.\n\n## Value\n\n`2.718281828459045`\n\n## Description\n\nBecause `E` is a static property of `Math`, you always use it as `Math.E`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/docs/globals/Math/LN10.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LN10\n\nThe **`Math.LN10`** property represents the natural logarithm of 10, approximately 2.302.\n\n## Value\n\n`2.302585092994046`\n\n## Description\n\nBecause `LN10` is a static property of `Math`, you always use it as `Math.LN10`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/docs/globals/Math/LN2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LN2\n\nThe **`Math.LN2`** property represents the natural logarithm of 2, approximately 0.693:\n\n## Value\n\n`0.6931471805599453`\n\n## Description\n\nBecause `LN2` is a static property of `Math`, you always use it as `Math.LN2`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/docs/globals/Math/LOG10e.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LOG10E\n\nThe **`Math.LOG10E`** property represents the base 10 logarithm of [E](./E.mdx), approximately 0.434.\n\n## Value\n\n`0.4342944819032518`\n\n## Description\n\nBecause `LOG10E` is a static property of `Math`, you always use it as `Math.LOG10E`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/docs/globals/Math/LOG2e.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LOG2E\n\nThe **`Math.LOG2E`** property represents the base 2 logarithm of [E](./E.mdx), approximately 1.442.\n\n## Value\n\n`1.4426950408889634`\n\n## Description\n\nBecause `LOG2E` is a static property of `Math`, you always use it as `Math.LOG2E`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/docs/globals/Math/PI.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.PI\n\nThe **`Math.PI`** property represents the ratio of the circumference of a circle to its diameter, approximately 3.14159.\n\n## Value\n\n`3.141592653589793`\n\n## Description\n\nBecause `PI` is a static property of `Math`, you always use it as `Math.PI`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/docs/globals/Math/SQRT1_2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.SQRT1_2\n\nThe **`Math.SQRT1_2`** property represents the square root of 1/2, which is approximately 0.707.\n\n## Value\n\n`0.7071067811865476`\n\n## Description\n\n`Math.SQRT1_2` is a constant and a more performant equivalent to [`Math.sqrt(0.5)`](./sqrt.mdx).\n\nBecause `SQRT1_2` is a static property of `Math`, you always use it as `Math.SQRT1_2`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/docs/globals/Math/SQRT2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.SQRT2\n\nThe **`Math.SQRT2`** property represents the square root of 2, approximately 1.414.\n\n## Value\n\n`0.7071067811865476`\n\n## Description\n\n`Math.SQRT2` is a constant and a more performant equivalent to [`Math.sqrt(2)`](./sqrt.mdx).\n\nBecause `SQRT2` is a static property of `Math`, you always use it as `Math.SQRT2`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/docs/globals/Math/abs.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.abs()\n\nThe **`Math.abs()`** function returns the absolute value of a number.\n\n\n## Syntax\n\n```js\nMath.abs(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe absolute value of `x`. If `x` is negative (including `-0`), returns `-x`. Otherwise, returns `x`. The result is therefore always a positive number or `0`.\n\n## Description\n\nBecause `abs()` is a static method of `Math`, you always use it as `Math.abs()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/docs/globals/Math/acos.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.acos()\n\nThe **`Math.acos()`** function returns the inverse cosine (in radians) of a number.\n\n## Syntax\n\n```js\nMath.acos(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number between -1 and 1, inclusive, representing the angle's cosine value.\n\n### Return value\n\nThe inverse cosine (angle in radians between 0 and π, inclusive) of `x`. If `x` is less than -1 or greater than 1, returns `NaN`.\n\n## Description\n\nBecause `acos()` is a static method of `Math`, you always use it as `Math.acos()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/docs/globals/Math/acosh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.acosh()\n\nThe **`Math.acosh()`** function returns the inverse hyperbolic cosine of a number.\n\n## Syntax\n\n```js\nMath.acosh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 1.\n\n### Return value\n\nThe inverse hyperbolic cosine of `x`. If `x` is less than 1, returns `NaN`.\n\n## Description\n\nBecause `acosh()` is a static method of `Math`, you always use it as `Math.acosh()`, rather than as a method of a `Math` object you created (`Math` is no constructor).\n"
  },
  {
    "path": "documentation/docs/globals/Math/asin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.asin()\n\nThe **`Math.asin()`** function returns the inverse sine (in radians) of a number.\n\n## Syntax\n\n```js\nMath.asin(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number between -1 and 1, inclusive, representing the angle's sine value.\n\n### Return value\n\nThe inverse sine (angle in radians between <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math>, inclusive) of `x`. If `x` is less than -1 or greater than 1, returns `NaN`.\n\n## Description\n\nBecause `asin()` is a static method of `Math`, you always use it as `Math.asin()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/docs/globals/Math/asinh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.asinh()\n\nThe **`Math.asinh()`** function returns the inverse hyperbolic sine of a number. \n\n## Syntax\n\n```js\nMath.asinh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe inverse hyperbolic sine of `x`.\n\n## Description\n\nBecause `asinh()` is a static method of `Math`, you always use it as `Math.asinh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/docs/globals/Math/atan.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.atan()\n\nThe **`Math.atan()`** function returns the inverse tangent (in radians) of a number.\n\n## Syntax\n\n```js\nMath.atan(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe inverse tangent (angle in radians between <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math> and <math><semantics><mfrac><mi>π</mi><mn>2</mn></mfrac></semantics></math>, inclusive) of `x`. If `x` is `Infinity`, it returns <math><semantics><mfrac><mi>π</mi><mn>2</mn></mfrac></semantics></math>. If `x` is `-Infinity`, it returns <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math>.\n\n## Description\n\nBecause `atan()` is a static method of `Math`, you always use it as `Math.atan()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/docs/globals/Math/atan2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.atan2()\n\nThe **`Math.atan2()`** function returns the angle in the plane (in radians) between the positive x-axis and the ray from (0, 0) to the point (x, y), for `Math.atan2(y, x)`.\n\n## Syntax\n\n```js\nMath.atan2(y, x)\n```\n\n### Parameters\n\n- `y`\n  - : The y coordinate of the point.\n- `x`\n  - : The x coordinate of the point.\n\n### Return value\n\nThe angle in radians (between -π and π, inclusive) between the positive x-axis and the ray from (0, 0) to the point (x, y).\n\n## Description\n\nThe `Math.atan2()` method measures the counterclockwise angle θ, in radians, between the positive x-axis and the point `(x, y)`. Note that the arguments to this function pass the y-coordinate first and the x-coordinate second.\n\n`Math.atan2()` is passed separate `x` and `y` arguments, while [`Math.atan()`](./atan.mdx) is passed the ratio of those two arguments. `Math.atan2(y, x)` differs from `Math.atan(y / x)` in the following cases:\n\n| `x`                  | `y`         | `Math.atan2(y, x)` | `Math.atan(y / x)` |\n| -------------------- | ----------- | ------------------ | ------------------ |\n| `Infinity`           | `Infinity`  | π / 4              | `NaN`              |\n| `Infinity`           | `-Infinity` | -π / 4             | `NaN`              |\n| `-Infinity`          | `Infinity`  | 3π / 4             | `NaN`              |\n| `-Infinity`          | `-Infinity` | -3π / 4            | `NaN`              |\n| 0                    | 0           | 0                  | `NaN`              |\n| 0                    | -0          | -0                 | `NaN`              |\n| < 0 (including `-0`) | 0           | π                  | 0                  |\n| < 0 (including `-0`) | -0          | -π                 | 0                  |\n| `-Infinity`          | > 0         | π                  | -0                 |\n| -0                   | > 0         | π / 2              | -π / 2             |\n| `-Infinity`          | < 0         | -π                 | 0                  |\n| -0                   | < 0         | -π / 2             | π / 2              |\n\nIn addition, for points in the second and third quadrants (`x < 0`), `Math.atan2()` would output an angle less than <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math> or greater than <math><semantics><mfrac><mi>π</mi><mn>2</mn></mfrac></semantics></math>.\n\nBecause `atan2()` is a static method of `Math`, you always use it as `Math.atan2()`, rather than as a method of a `Math` object you created (`Math` is not a constructor)."
  },
  {
    "path": "documentation/docs/globals/Math/atanh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.atanh()\n\nThe **`Math.atanh()`** function returns the inverse hyperbolic tangent of a number. \n\n## Syntax\n\n```js\nMath.atanh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number between -1 and 1, inclusive.\n\n### Return value\n\nThe inverse hyperbolic tangent of `x`. If `x` is 1, returns `Infinity`. If `x` is -1, returns `-Infinity`. If `x` is less than -1 or greater than 1, returns `NaN`.\n\n## Description\n\nBecause `atanh()` is a static method of `Math`, you always use it as `Math.atanh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n"
  },
  {
    "path": "documentation/docs/globals/Math/cbrt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.cbrt()\n\nThe **`Math.cbrt()`** function returns the cube root of a number.\n\n## Syntax\n\n```js\nMath.cbrt(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe cube root of `x`.\n\n## Description\n\nBecause `cbrt()` is a static method of `Math`, you always use it as `Math.cbrt()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/docs/globals/Math/ceil.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.ceil()\n\nThe **`Math.ceil()`** function always rounds up and returns the smaller integer greater than or equal to a given number.\n\n## Syntax\n\n```js\nMath.ceil(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe smallest integer greater than or equal to `x`. It's the same value as [`-Math.floor(-x)`](./floor.mdx).\n\n## Description\n\nBecause `ceil()` is a static method of `Math`, you always use it as `Math.ceil()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/docs/globals/Math/clz32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.clz32()\n\nThe **`Math.clz32()`** function returns the number of leading zero bits in the 32-bit binary representation of a number.\n\n## Syntax\n\n```js\nMath.clz32(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe number of leading zero bits in the 32-bit binary representation of `x`.\n\n## Description\n\n`clz32` is short for **C**ount**L**eading**Z**eros**32**.\n\nIf `x` is not a number, it will be converted to a number first, then converted to a 32-bit unsigned integer.\n\nIf the converted 32-bit unsigned integer is `0`, `32` is returned, because all bits are `0`. If the most significant bit is `1` (i.e. the number is greater than or equal to 2<sup>31</sup>), `0` is returned.\n\nThis function is particularly useful for systems that compile to JS, like [Emscripten](https://emscripten.org).\n"
  },
  {
    "path": "documentation/docs/globals/Math/cos.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.cos()\n\nThe **`Math.cos()`** function returns the cosine of a number in radians.\n\n## Syntax\n\n```js\nMath.cos(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number representing an angle in radians.\n\n### Return value\n\nThe cosine of `x`, between -1 and 1, inclusive. If `x` is `Infinity`, `-Infinity`, or `NaN`, returns `NaN`.\n\n## Description\n\nBecause `cos()` is a static method of `Math`, you always use it as `Math.cos()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/docs/globals/Math/cosh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.cosh()\n\nThe **`Math.cosh()`** function returns the hyperbolic cosine of a number. \n\n## Syntax\n\n```js\nMath.cosh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe hyperbolic cosine of `x`.\n\n## Description\n\nBecause `cosh()` is a static method of `Math`, you always use it as `Math.cosh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor)."
  },
  {
    "path": "documentation/docs/globals/Math/exp.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.exp()\n\nThe **`Math.exp()`** function returns [E](./E.mdx) raised to the power of a number.\n\n## Syntax\n\n```js\nMath.exp(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nA nonnegative number representing e<sup>x</sup>, where e is [the base of the natural logarithm](./E.mdx).\n\n## Description\n\nBecause `exp()` is a static method of `Math`, you always use it as `Math.exp()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nBeware that `e` to the power of a number very close to 0 will be very close to 1 and suffer from loss of precision. In this case, you may want to use `Math.expm1` instead, and obtain a much higher-precision fractional part of the answer.\n"
  },
  {
    "path": "documentation/docs/globals/Math/expm1.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.expm1()\n\nThe **`Math.expm1()`** function returns [E](./E.mdx) raised to the power of a number, subtracted by 1.\n\n## Syntax\n\n```js\nMath.expm1(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nA number representing e<sup>x</sup> - 1, where e is [the base of the natural logarithm](./E.mdx).\n\n## Description\n\nFor very small values of _x_, adding 1 can reduce or eliminate precision. The double floats used in JS give you about 15 digits of precision. 1 + 1e-15 \\= 1.000000000000001, but 1 + 1e-16 = 1.000000000000000 and therefore exactly 1.0 in that arithmetic, because digits past 15 are rounded off.\n\nWhen you calculate <math display=\"inline\"><semantics><msup><mi mathvariant=\"normal\">e</mi><mi>x</mi></msup></semantics></math> where x is a number very close to 0, you should get an answer very close to 1 + x, because <math display=\"inline\"><semantics><mrow><munder><mo lspace=\"0em\" rspace=\"0em\">lim</mo><mrow><mi>x</mi><mo stretchy=\"false\">→</mo><mn>0</mn></mrow></munder><mfrac><mrow><msup><mi mathvariant=\"normal\">e</mi><mi>x</mi></msup><mo>−</mo><mn>1</mn></mrow><mi>x</mi></mfrac><mo>=</mo><mn>1</mn></mrow></semantics></math>. If you calculate `Math.exp(1.1111111111e-15) - 1`, you should get an answer close to `1.1111111111e-15`. Instead, due to the highest significant figure in the result of `Math.exp` being the units digit `1`, the final value ends up being `1.1102230246251565e-15`, with only 3 correct digits. If, instead, you calculate `Math.exp1m(1.1111111111e-15)`, you will get a much more accurate answer `1.1111111111000007e-15`, with 11 correct digits of precision.\n\nBecause `expm1()` is a static method of `Math`, you always use it as `Math.expm1()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/docs/globals/Math/floor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.floor()\n\nThe **`Math.floor()`** function always rounds down and returns the largest integer less than or equal to a given number.\n\n## Syntax\n\n```js\nMath.floor(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe largest integer smaller than or equal to `x`. It's the same value as [`-Math.ceil(-x)`](./ceil.mdx).\n\n## Description\n\nBecause `floor()` is a static method of `Math`, you always use it as `Math.floor()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/docs/globals/Math/fround.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.fround()\n\nThe **`Math.fround()`** function returns the nearest [32-bit single precision](https://en.wikipedia.org/wiki/Single-precision_floating-point_format) float representation of a number.\n\n## Syntax\n\n```js\nMath.fround(doubleFloat)\n```\n\n### Parameters\n\n- `doubleFloat`\n  - : A number.\n\n### Return value\n\nThe nearest [32-bit single precision](https://en.wikipedia.org/wiki/Single-precision_floating-point_format) float representation of `x`.\n\n## Description\n\nJavaScript uses 64-bit double floating-point numbers internally, which offer a very high precision. However, sometimes you may be working with 32-bit floating-point numbers, for example if you are reading values from a `Float32Array`. This can create confusion: checking a 64-bit float and a 32-bit float for equality may fail even though the numbers are seemingly identical.\n\nTo solve this, `Math.fround()` can be used to cast the 64-bit float to a 32-bit float. Internally, JavaScript continues to treat the number as a 64-bit float, it just performs a \"round to even\" on the 23rd bit of the mantissa, and sets all following mantissa bits to `0`. If the number is outside the range of a 32-bit float, `Infinity` or `-Infinity` is returned.\n\nBecause `fround()` is a static method of `Math`, you always use it as `Math.fround()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/docs/globals/Math/hypot.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.hypot()\n\nThe **`Math.hypot()`** function returns the square root of the sum of squares of its arguments. \n\n## Syntax\n\n```js\nMath.hypot()\nMath.hypot(value0)\nMath.hypot(value0, value1)\nMath.hypot(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `value1`, …, `valueN`\n  - : Numbers.\n\n### Return value\n\nThe square root of the sum of squares of the given arguments. Returns Infinity if any of the arguments is ±Infinity. Otherwise, if at least one of the arguments is or is converted to NaN, returns NaN. Returns `0` if no arguments are given or all arguments are ±0.\n\n## Description\n\nCalculating the hypotenuse of a right triangle, or the magnitude of a complex number, uses the formula `Math.sqrt(v1*v1 + v2*v2)`, where v1 and v2 are the lengths of the triangle's legs, or the complex number's real and complex components. The corresponding distance in 2 or more dimensions can be calculated by adding more squares under the square root: `Math.sqrt(v1*v1 + v2*v2 + v3*v3 + v4*v4)`.\n\nThis function makes this calculation easier and faster; you call `Math.hypot(v1, v2)`, or `Math.hypot(v1, /* … ,*/, vN)`.\n\n`Math.hypot` also avoids overflow/underflow problems if the magnitude of your numbers is very large. The largest number you can represent in JS is [`Number.MAX_VALUE`](../Number/MAX_VALUE.mdx), which is around 10<sup>308</sup>. If your numbers are larger than about 10<sup>154</sup>, taking the square of them will result in Infinity. For example, `Math.sqrt(1e200*1e200 + 1e200*1e200) = Infinity`. If you use `hypot()` instead, you get a better answer: `Math.hypot(1e200, 1e200) = 1.4142...e+200` . This is also true with very small numbers. `Math.sqrt(1e-200*1e-200 + 1e-200*1e-200) = 0`, but `Math.hypot(1e-200, 1e-200) = 1.4142...e-200`.\n\nWith one argument, `Math.hypot()` is equivalent to [`Math.abs()`](./abs.mdx). [`Math.hypot.length`](../Function/prototype/length.mdx) is 2, which weakly signals that it's designed to handle at least two parameters.\n\nBecause `hypot()` is a static method of `Math`, you always use it as `Math.hypot()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/docs/globals/Math/imul.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.imul()\n\nThe **`Math.imul()`** function returns the result of the C-like 32-bit multiplication of the two parameters.\n\n\n## Syntax\n\n```js\nMath.imul(a, b)\n```\n\n### Parameters\n\n- `a`\n  - : First number.\n- `b`\n  - : Second number.\n\n### Return value\n\nThe result of the C-like 32-bit multiplication of the given arguments.\n\n## Description\n\n`Math.imul()` allows for 32-bit integer multiplication with C-like semantics. This feature is useful for projects like [Emscripten](https://en.wikipedia.org/wiki/Emscripten).\n\nBecause `imul()` is a static method of `Math`, you always use it as `Math.imul()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nIf you use normal JavaScript floating point numbers in `imul()`, you will experience a degrade in performance. This is because of the costly conversion from a floating point to an integer for multiplication, and then converting the multiplied integer back into a floating point.\n"
  },
  {
    "path": "documentation/docs/globals/Math/log.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log()\n\nThe **`Math.log()`** function returns the natural logarithm (base [E](./E.mdx)) of a number.\n\n## Syntax\n\n```js\nMath.log(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe natural logarithm (base [E](./E.mdx)) of `x`. If `x` is ±0, returns [`-Infinity`](../Number/NEGATIVE_INFINITY.mdx). If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `log()` is a static method of `Math`, you always use it as `Math.log()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nIf you need the natural log of 2 or 10, use the constants `Math.LN2` or `Math.LN10`. If you need a logarithm to base 2 or 10, use `Math.log2()` or `Math.log10()`. If you need a logarithm to other bases, use `Math.log(x) / Math.log(otherBase)` as in the example below; you might want to precalculate `1 / Math.log(otherBase)` since multiplication in `Math.log(x) * constant` is much faster.\n\nBeware that positive numbers very close to 1 can suffer from loss of precision and make its natural logarithm less accurate. In this case, you may want to use `Math.log1p` instead.\n"
  },
  {
    "path": "documentation/docs/globals/Math/log10.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log10()\n\nThe **`Math.log10()`** function returns the base 10 logarithm of a number. \n\n## Syntax\n\n```js\nMath.log10(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe base 10 logarithm of `x`. If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `log10()` is a static method of `Math`, you always use it as `Math.log10()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nThis function is the equivalent of `Math.log(x) / Math.log(10)`. For `log10(e)`, use the constant `Math.LOG10E`, which is 1 / `Math.LN10`.\n"
  },
  {
    "path": "documentation/docs/globals/Math/log1p.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log1p()\n\nThe **`Math.log1p()`** function returns the natural logarithm (base [E](./E.mdx)) of `1 + x`, where `x` is the argument.\n\n## Syntax\n\n```js\nMath.log1p(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to -1.\n\n### Return value\n\nThe natural logarithm (base [E](./E.mdx)) of `x + 1`. If `x` is -1, returns [`-Infinity`](../Number/NEGATIVE_INFINITY.mdx). If `x < -1`, returns `NaN`.\n\n## Description\n\nFor very small values of _x_, adding 1 can reduce or eliminate precision. The double floats used in JS give you about 15 digits of precision. 1 + 1e-15 \\= 1.000000000000001, but 1 + 1e-16 = 1.000000000000000 and therefore exactly 1.0 in that arithmetic, because digits past 15 are rounded off.\n\nWhen you calculate log(1 + _x_) where _x_ is a small positive number, you should get an answer very close to _x_, because <math display=\"inline\"><semantics><mrow><munder><mo movablelimits=\"true\" form=\"prefix\">lim</mo><mrow ><mi>x</mi><mo stretchy=\"false\">→</mo><mn>0</mn></mrow></munder><mfrac><mrow><mi>log</mi><mo>⁡</mo><mo stretchy=\"false\">(</mo><mn>1</mn><mo>+</mo><mi>x</mi><mo stretchy=\"false\">)</mo></mrow><mi>x</mi></mfrac><mo>=</mo><mn>1</mn></mrow></semantics></math>. If you calculate `Math.log(1 + 1.1111111111e-15)`, you should get an answer close to `1.1111111111e-15`. Instead, you will end up taking the logarithm of `1.00000000000000111022` (the roundoff is in binary, so sometimes it gets ugly), and get the answer 1.11022…e-15, with only 3 correct digits. If, instead, you calculate `Math.log1p(1.1111111111e-15)`, you will get a much more accurate answer `1.1111111110999995e-15`, with 15 correct digits of precision (actually 16 in this case).\n\nIf the value of `x` is less than -1, the return value is always `NaN`.\n\nBecause `log1p()` is a static method of `Math`, you always use it as `Math.log1p()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/docs/globals/Math/log2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log2()\n\nThe **`Math.log2()`** function returns the base 2 logarithm of a number.\n\n## Syntax\n\n```js\nMath.log2(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe base 2 logarithm of `x`. If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `log2()` is a static method of `Math`, you always use it as `Math.log2()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nThis function is the equivalent of `Math.log(x) / Math.log(2)`. For `log2(e)`, use the constant `Math.LOG2E`, which is 1 / `Math.LN2`.\n"
  },
  {
    "path": "documentation/docs/globals/Math/max.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.max()\n\nThe **`Math.max()`** function returns the largest of the numbers given as input parameters, or `-Infinity` if there are no parameters.\n\n## Syntax\n\n```js\nMath.max()\nMath.max(value0)\nMath.max(value0, value1)\nMath.max(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `value1`, `value2`, … , `valueN`\n  - : Zero or more numbers among which the largest value will be selected and returned.\n\n### Return value\n\nThe largest of the given numbers. Returns `NaN` if any of the parameters is or is converted into `NaN`. Returns `-Infinity` if no parameters are provided.\n\n## Description\n\nBecause `max()` is a static method of `Math`, you always use it as `Math.max()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n[`Math.max.length`](../Function/prototype/length.mdx) is 2, which weakly signals that it's designed to handle at least two parameters.\n"
  },
  {
    "path": "documentation/docs/globals/Math/min.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.min()\n\nThe **`Math.min()`** function returns the smallest of the numbers given as input parameters, or `Infinity` if there are no parameters.\n\n## Syntax\n\n```js\nMath.min()\nMath.min(value0)\nMath.min(value0, value1)\nMath.min(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `value1`, …, `valueN`\n  - : Zero or more numbers among which the lowest value will be selected and returned.\n\n### Return value\n\nThe smallest of the given numbers. Returns `NaN` if any of the parameters is or is converted into `NaN`. Returns `Infinity` if no parameters are provided.\n\n## Description\n\nBecause `min()` is a static method of `Math`, you always use it as `Math.min()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n[`Math.min.length`](../Function/prototype/length.mdx) is 2, which weakly signals that it's designed to handle at least two parameters.\n"
  },
  {
    "path": "documentation/docs/globals/Math/pow.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.pow()\n\nThe **`Math.pow()`** method returns the value of a base raised to a power.\n\n## Syntax\n\n```js\nMath.pow(base, exponent)\n```\n\n### Parameters\n\n- `base`\n  - : The base number.\n- `exponent`\n  - : The exponent number.\n\n### Return value\n\nA number representing `base` taken to the power of `exponent`. Returns `NaN` in one of the following cases:\n\n- `exponent` is `NaN`.\n- `base` is `NaN` and `exponent` is not `0`.\n- `base` is ±1 and `exponent` is ±`Infinity`.\n- `base < 0` and `exponent` is not an integer.\n\n## Description\n\n`Math.pow()` is equivalent to the `**` operator, except `Math.pow()` only accepts numbers.\n\n`Math.pow(NaN, 0)` (and the equivalent `NaN ** 0`) is the only case where `NaN` doesn't propagate through mathematical operations — it returns `1` despite the operand being `NaN`. In addition, the behavior where `base` is 1 and `exponent` is non-finite (±Infinity or `NaN`) is different from IEEE 754, which specifies that the result should be 1, whereas JavaScript returns `NaN` to preserve backward compatibility with its original behavior.\n\nBecause `pow()` is a static method of `Math`, use it as `Math.pow()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/docs/globals/Math/random.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.random()\n\nThe **`Math.random()`** function returns a floating-point, pseudo-random number that's greater than or equal to 0 and less than 1, with approximately uniform distribution over that range — which you can then scale to your desired range. The implementation selects the initial seed to the random number generation algorithm; it cannot be chosen or reset by the user.\n\n> **Note:** `Math.random()` _does not_ provide cryptographically secure random numbers. Do not use them for anything related to security. Use the Web Crypto API instead, and more precisely the `crypto.getRandomValues()` method.\n\n## Syntax\n\n```js\nMath.random()\n```\n\n### Return value\n\nA floating-point, pseudo-random number between 0 (inclusive) and 1 (exclusive).\n"
  },
  {
    "path": "documentation/docs/globals/Math/round.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.round()\n\nThe **`Math.round()`** function returns the value of a number rounded to the nearest integer.\n\n## Syntax\n\n```js\nMath.round(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe value of `x` rounded to the nearest integer.\n\n## Description\n\nIf the fractional portion of the argument is greater than 0.5, the argument is rounded to the integer with the next higher absolute value. If it is less than 0.5, the argument is rounded to the integer with the lower absolute value. If the fractional portion is exactly 0.5, the argument is rounded to the next integer in the direction of +∞.\n\n> **Note:** This differs from many languages' `round()` functions, which often round half-increments _away from zero_, giving a different result in the case of negative numbers with a fractional part of exactly 0.5.\n\n`Math.round(x)` is not exactly the same as [`Math.floor(x + 0.5)`](./floor.mdx). When `x` is -0, or -0.5 ≤ x < 0, `Math.round(x)` returns -0, while `Math.floor(x + 0.5)` returns 0. However, neglecting that difference and potential precision errors, `Math.round(x)` and `Math.floor(x + 0.5)` are generally equivalent.\n\nBecause `round()` is a static method of `Math`, you always use it as `Math.round()`, rather than as a method of a `Math` object you created (`Math` has no constructor).\n"
  },
  {
    "path": "documentation/docs/globals/Math/sign.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sign()\n\nThe **`Math.sign()`** function returns 1 or -1, indicating the sign of the number passed as argument. If the input is 0 or -0, it will be returned as-is.\n\n## Syntax\n\n```js\nMath.sign(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nA number representing the sign of `x`:\n\n- If `x` is positive, returns `1`.\n- If `x` is negative, returns `-1`.\n- If `x` is positive zero, returns `0`.\n- If `x` is negative zero, returns `-0`.\n- Otherwise, returns `NaN`.\n\n## Description\n\nBecause `sign()` is a static method of `Math`, you always use it as `Math.sign()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/docs/globals/Math/sin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sin()\n\nThe **`Math.sin()`** function returns the sine of a number in radians.\n\n## Syntax\n\n```js\nMath.sin(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number representing an angle in radians.\n\n### Return value\n\nThe sine of `x`, between -1 and 1, inclusive. If `x` is `Infinity`, `-Infinity`, or `NaN`, returns `NaN`.\n\n## Description\n\nBecause `sin()` is a static method of `Math`, you always use it as `Math.sin()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/docs/globals/Math/sinh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sinh()\n\nThe **`Math.sinh()`** function returns the hyperbolic sine of a number. \n\n## Syntax\n\n```js\nMath.sinh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe hyperbolic sine of `x`.\n\n## Description\n\nBecause `sinh()` is a static method of `Math`, you always use it as `Math.sinh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n"
  },
  {
    "path": "documentation/docs/globals/Math/sqrt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sqrt()\n\nThe **`Math.sqrt()`** function returns the square root of a number.\n\n## Syntax\n\n```js\nMath.sqrt(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe square root of `x`, a nonnegative number. If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `sqrt()` is a static method of `Math`, you always use it as `Math.sqrt()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n"
  },
  {
    "path": "documentation/docs/globals/Math/tan.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.tan()\n\nThe **`Math.tan()`** function returns the tangent of a number in radians.\n\n\n## Syntax\n\n```js\nMath.tan(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number representing an angle in radians.\n\n### Return value\n\nThe tangent of `x`. If `x` is `Infinity`, `-Infinity`, or `NaN`, returns `NaN`.\n\n> **Note:** Due to floating point precision, it's not possible to obtain the exact value π/2, so the result is always finite if not `NaN`.\n\n## Description\n\nBecause `tan()` is a static method of `Math`, you always use it as `Math.tan()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/docs/globals/Math/tanh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.tanh()\n\nThe **`Math.tanh()`** function returns the hyperbolic tangent of a number. \n\n## Syntax\n\n```js\nMath.tanh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe hyperbolic tangent of `x`.\n\n## Description\n\nBecause `tanh()` is a static method of `Math`, you always use it as `Math.tanh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/docs/globals/Math/trunc.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.trunc()\n\nThe **`Math.trunc()`** function returns the integer part of a number by removing any fractional digits.\n\n## Syntax\n\n```js\nMath.trunc(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe integer part of `x`.\n\n## Description\n\nUnlike the other three `Math` methods: `Math.floor()`, `Math.ceil()` and `Math.round()`, the way `Math.trunc()` works is very simple. It _truncates_ (cuts off) the dot and the digits to the right of it, no matter whether the argument is a positive or negative number.\n\nBecause `trunc()` is a static method of `Math`, you always use it as `Math.trunc()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/docs/globals/NaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# NaN\n\nThe global **`NaN`** property is a value representing Not-A-Number.\n\n## Value\n\nThe same number value as [`Number.NaN`](./Number/NaN.mdx).\n\n## Description\n\n`NaN` is a property of the _global object_. In other words, it is a variable in global scope.\n\nIn modern browsers, `NaN` is a non-configurable, non-writable property. Even when this is not the case, avoid overriding it.\n\nThere are five different types of operations that return `NaN`:\n\n- Failed number conversion (e.g. explicit ones like `parseInt(\"blabla\")`, `Number(undefined)`, or implicit ones like `Math.abs(undefined)`)\n- Math operation where the result is not a real number (e.g. `Math.sqrt(-1)`)\n- Indeterminate form (e.g. `0 * Infinity`, `1 ** Infinity`, `Infinity / Infinity`, `Infinity - Infinity`)\n- A method or expression whose operand is or gets coerced to `NaN` (e.g. `7 ** NaN`, `7 * \"blabla\"`) — this means `NaN` is contagious\n- Other cases where an invalid value is to be represented as a number (e.g. an invalid `new Date(\"blabla\").getTime()`, `\"\".charCodeAt(1)`)\n\n`NaN` and its behaviors are not invented by JavaScript. Its semantics in floating point arithmetic (including that `NaN !== NaN`) are specified by [IEEE 754](https://en.wikipedia.org/wiki/Double_precision_floating-point_format). `NaN`'s behaviors include:\n\n- If `NaN` is involved in a mathematical operation (but not [bitwise operations](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators#bitwise_shift_operators)), the result is usually also `NaN`. (See see [silently escaping NaN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN#silently_escaping_nan) for a counter-example.)\n- When `NaN` is one of the operands of any relational comparison (`>`, `<`, `>=`, `<=`), the result is always `false`.\n- `NaN` compares unequal (via [`==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Equality), [`!=`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Inequality), [`===`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality), and [`!==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_inequality)) to any other value — including to another `NaN` value.\n\n`NaN` is also one of the [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) values in JavaScript.\n"
  },
  {
    "path": "documentation/docs/globals/Number/MAX_SAFE_INTEGER.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MAX_SAFE_INTEGER\n\nThe **`Number.MAX_SAFE_INTEGER`** constant represents the maximum safe integer in JavaScript (2<sup>53</sup> – 1).\n\nFor larger integers, consider using `BigInt`.\n\n## Value\n\n`9007199254740991` (9,007,199,254,740,991, or \\~9 quadrillion).\n\n## Description\n\n[Double precision floating point format](https://en.wikipedia.org/wiki/Double_precision_floating-point_format) only has 52 bits to represent the [mantissa](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_encoding), so it can only safely represent integers between -(2<sup>53</sup> – 1) and 2<sup>53</sup> – 1. \"Safe\" in this context refers to the ability to represent integers exactly and to compare them correctly. For example, `Number.MAX_SAFE_INTEGER + 1 === Number.MAX_SAFE_INTEGER + 2` will evaluate to true, which is mathematically incorrect. See `Number.isSafeInteger()` for more information.\n\nBecause `MAX_SAFE_INTEGER` is a static property of `Number`, you always use it as `Number.MAX_SAFE_INTEGER`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/docs/globals/Number/MAX_VALUE.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MAX_VALUE\n\nThe **`Number.MAX_VALUE`** property represents the maximum numeric value representable in JavaScript.\n\n## Value\n\n2<sup>1024</sup> - 1, or approximately `1.7976931348623157E+308`.\n\n## Description\n\nValues larger than `MAX_VALUE` are represented as [`Infinity`](../../globals/Infinity.mdx) and will lose their actual value.\n\nBecause `MAX_VALUE` is a static property of `Number`, you always use it as `Number.MAX_VALUE`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/docs/globals/Number/MIN_SAFE_INTEGER.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MIN_SAFE_INTEGER\n\nThe **`Number.MIN_SAFE_INTEGER`** constant represents the minimum safe integer in JavaScript, or -(2<sup>53</sup> - 1).\n\nTo represent integers smaller than this, consider using `BigInt`.\n\n## Value\n\n`-9007199254740991` (-9,007,199,254,740,991, or about -9 quadrillion).\n\n## Description\n\n[Double precision floating point format](https://en.wikipedia.org/wiki/Double_precision_floating-point_format) only has 52 bits to represent the [mantissa](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_encoding), so it can only safely represent integers between -(2<sup>53</sup> – 1) and 2<sup>53</sup> – 1. Safe in this context refers to the ability to represent integers exactly and to correctly compare them. For example, `Number.MIN_SAFE_INTEGER - 1 === Number.MIN_SAFE_INTEGER - 2` will evaluate to true, which is mathematically incorrect. See `Number.isSafeInteger()` for more information.\n\nBecause `MIN_SAFE_INTEGER` is a static property of `Number`, you always use it as `Number.MIN_SAFE_INTEGER`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/docs/globals/Number/MIN_VALUE.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MIN_VALUE\n\nThe **`Number.MIN_VALUE`** property represents the smallest positive numeric value representable in JavaScript.\n\n## Value\n\n2<sup>-1074</sup>, or `5E-324`.\n\n## Description\n\n`Number.MIN_VALUE` is the smallest positive number (not the most negative number) that can be represented within float precision — in other words, the number closest to 0. The ECMAScript spec doesn't define a precise value that implementations are required to support — instead the spec says, _\"must be the smallest non-zero positive value that can actually be represented by the implementation\"_. This is because small IEEE-754 floating point numbers are [denormalized](https://en.wikipedia.org/wiki/Subnormal_number), but implementations are not required to support this representation, in which case `Number.MIN_VALUE` may be larger.\n\nIn practice, its precise value in mainstream engines like V8 (used by Chrome, Edge, Node.js), SpiderMonkey (used by Firefox), and JavaScriptCore (used by Safari) is 2<sup>-1074</sup>, or `5E-324`.\n\nBecause `MIN_VALUE` is a static property of `Number`, you always use it as `Number.MIN_VALUE`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/docs/globals/Number/NEGATIVE_INFINITY.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.NEGATIVE_INFINITY\n\nThe **`Number.NEGATIVE_INFINITY`** property represents the negative Infinity value.\n\n## Value\n\nThe same as the negative value of the global [`Infinity`](../../globals/Infinity.mdx) property.\n\n## Description\n\nThe `Number.NEGATIVE_INFINITY` value behaves slightly differently than mathematical infinity:\n\n- Any positive value, including `Number.POSITIVE_INFINITY`, multiplied by `Number.NEGATIVE_INFINITY` is `Number.NEGATIVE_INFINITY`.\n- Any negative value, including `Number.NEGATIVE_INFINITY`, multiplied by `Number.NEGATIVE_INFINITY` is `Number.POSITIVE_INFINITY`.\n- Any positive value divided by `Number.NEGATIVE_INFINITY` is [negative zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754)).\n- Any negative value divided by `Number.NEGATIVE_INFINITY` is [positive zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754)).\n- Zero multiplied by `Number.NEGATIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- [`NaN`](../../globals/NaN.mdx) multiplied by `Number.NEGATIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- `Number.NEGATIVE_INFINITY`, divided by any negative value except `Number.NEGATIVE_INFINITY`, is `Number.POSITIVE_INFINITY`.\n- `Number.NEGATIVE_INFINITY`, divided by any positive value except `Number.POSITIVE_INFINITY`, is `Number.NEGATIVE_INFINITY`.\n- `Number.NEGATIVE_INFINITY`, divided by either `Number.NEGATIVE_INFINITY` or `Number.POSITIVE_INFINITY`, is [`NaN`](../../globals/NaN.mdx).\n- `x > Number.NEGATIVE_INFINITY` is true for any number _x_ that isn't `Number.NEGATIVE_INFINITY`.\n\nYou might use the `Number.NEGATIVE_INFINITY` property to indicate an error condition that returns a finite number in case of success. Note, however, that [`NaN`](../../globals/NaN.mdx) would be more appropriate in such a case.\n\nBecause `Number.NEGATIVE_INFINITY` is a static property of `Number`, you always use it as `Number.NEGATIVE_INFINITY`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/docs/globals/Number/NaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.NaN\n\nThe **`Number.NaN`** property represents Not-A-Number, which is equivalent to [description for the global property](../../globals/NaN.mdx). For more information about the behaviors of `NaN`, see the [`NaN`](../../globals/NaN.mdx).\n\n## Value\n\nThe number value [`NaN`](../../globals/NaN.mdx).\n\n## Description\n\nBecause `NaN` is a static property of `Number`, you always use it as `Number.NaN`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/docs/globals/Number/Number.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number() constructor\n\nThe **`Number()` constructor** creates a `Number` object. When called instead as a function, it performs type conversion to a primitive number, which is usually more useful.\n\n## Syntax\n\n```js\nnew Number(value)\nNumber(value)\n```\n\n> **Note:** `Number()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\n- `value`\n  - : The numeric value of the object being created.\n\n### Return value\n\nWhen `Number` is called as a constructor (with `new`), it creates a `Number` object, which is **not** a primitive.\n\nWhen `Number` is called as a function, it [coerces the parameter to a number primitive](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_coercion). [BigInts](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/BigInt) are converted to numbers. If the value can't be converted, it returns [`NaN`](../../globals/NaN.mdx).\n\n> **Warning:** You should rarely find yourself using `Number` as a constructor.\n"
  },
  {
    "path": "documentation/docs/globals/Number/POSITIVE_INFINITY.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.POSITIVE_INFINITY\n\nThe **`Number.POSITIVE_INFINITY`** property represents the positive Infinity value.\n\n## Value\n\nThe same as the value of the global [`Infinity`](../../globals/Infinity.mdx) property.\n\n## Description\n\nThe `Number.POSITIVE_INFINITY` value behaves slightly differently than mathematical infinity:\n\n- Any positive value, including `Number.POSITIVE_INFINITY`, multiplied by `Number.POSITIVE_INFINITY` is `Number.POSITIVE_INFINITY`.\n- Any negative value, including `Number.NEGATIVE_INFINITY`, multiplied by `Number.POSITIVE_INFINITY` is `Number.NEGATIVE_INFINITY`.\n- Any positive number divided by `Number.POSITIVE_INFINITY` is [positive zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754)).\n- Any negative number divided by `Number.POSITIVE_INFINITY` is [negative zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754).\n- Zero multiplied by `Number.POSITIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- `NaN` multiplied by `Number.POSITIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- `Number.POSITIVE_INFINITY`, divided by any negative value except `Number.NEGATIVE_INFINITY`, is `Number.NEGATIVE_INFINITY`.\n- `Number.POSITIVE_INFINITY`, divided by any positive value except `Number.POSITIVE_INFINITY`, is `Number.POSITIVE_INFINITY`.\n- `Number.POSITIVE_INFINITY`, divided by either `Number.NEGATIVE_INFINITY` or `Number.POSITIVE_INFINITY`, is [`NaN`](../../globals/NaN.mdx).\n- `Number.POSITIVE_INFINITY > x` is true for any number _x_ that isn't `Number.POSITIVE_INFINITY`.\n\nYou might use the `Number.POSITIVE_INFINITY` property to indicate an error condition that returns a finite number in case of success. Note, however, that [`NaN`](../../globals/NaN.mdx) would be more appropriate in such a case.\n\nBecause `Number.POSITIVE_INFINITY` is a static property of `Number`, you always use it as `Number.POSITIVE_INFINITY`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/docs/globals/Number/epsilon.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.EPSILON\n\nThe **`Number.EPSILON`** property represents the difference between 1 and the smallest floating point number greater than 1.\n\n## Value\n\n2<sup>-52</sup>, or approximately `2.2204460492503130808472633361816E-16`.\n\n## Description\n\n`Number.EPSILON` is the difference between 1 and the next greater number representable in the Number format, because [double precision floating point format](https://en.wikipedia.org/wiki/Double_precision_floating-point_format) only has 52 bits to represent the [mantissa](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_encoding), and the lowest bit has a significance of 2<sup>-52</sup>.\n\nNote that the absolute accuracy of floating numbers decreases as the number gets larger, because the exponent grows while the mantissa's accuracy stays the same. `Number.MIN_VALUE` is the smallest representable positive number, which is much smaller than `Number.EPSILON`.\n\nBecause `EPSILON` is a static property of `Number`, you always use it as `Number.EPSILON`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/docs/globals/Number/isFinite.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isFinite()\n\nThe **`Number.isFinite()`** method determines whether the passed value is a finite number — that is, it checks that a given value is a number, and the number is neither positive [`Infinity`](../../globals/Infinity.mdx), negative `Infinity`, nor [`NaN`](../../globals/NaN.mdx).\n\n## Syntax\n\n```js\nNumber.isFinite(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested for finiteness.\n\n### Return value\n\nThe boolean value `true` if the given value is a finite number. Otherwise `false`.\n"
  },
  {
    "path": "documentation/docs/globals/Number/isInteger.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isInteger()\n\nThe **`Number.isInteger()`** method determines whether the passed value is an integer.\n\n## Syntax\n\n```js\nNumber.isInteger(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested for being an integer.\n\n### Return value\n\nThe boolean value `true` if the given value is an integer. Otherwise `false`.\n\n## Description\n\nIf the target value is an integer, return `true`, otherwise return `false`. If the value is [`NaN`](../../globals/NaN.mdx) or [`Infinity`](../../globals/Infinity.mdx), return `false`. The method will also return `true` for floating point numbers that can be represented as integer. It will always return `false` if the value is not a number.\n\nNote that some number literals, while looking like non-integers, actually represent integers — due to the precision limit of ECMAScript floating-point number encoding (IEEE-754). For example, `5.0000000000000001` only differs from `5` by `1e-16`, which is too small to be represented. (For reference, [`Number.EPSILON`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/EPSILON) stores the distance between 1 and the next representable floating-point number greater than 1, and that is about `2.22e-16`.) Therefore, `5.0000000000000001` will be represented with the same encoding as `5`, thus making `Number.isInteger(5.0000000000000001)` return `true`.\n\nIn a similar sense, numbers around the magnitude of [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER) will suffer from loss of precision and make `Number.isInteger` return `true` even when it's not an integer. (The actual threshold varies based on how many bits are needed to represent the decimal — for example, `Number.isInteger(4500000000000000.1)` is `true`, but `Number.isInteger(4500000000000000.5)` is `false`.)\n"
  },
  {
    "path": "documentation/docs/globals/Number/isNaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isNaN()\n\nThe **`Number.isNaN()`** method determines whether the passed value is the number value [`NaN`](../../globals/NaN.mdx), and returns `false` if the input is not of the Number type. It is a more robust version of the original, global `isNaN()` function.\n\n## Syntax\n\n```js\nNumber.isNaN(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested for [`NaN`](../../globals/NaN.mdx).\n\n### Return value\n\nThe boolean value `true` if the given value is a number with value [`NaN`](../../globals/NaN.mdx). Otherwise, `false`.\n\n## Description\n\nThe function `Number.isNaN()` provides a convenient way to check for equality with `NaN`. Note that you cannot test for equality with `NaN` using either the [`==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Equality) or [`===`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) operators, because unlike all other value comparisons in JavaScript, these evaluate to `false` whenever one operand is [`NaN`](../../globals/NaN.mdx), even if the other operand is also [`NaN`](../../globals/NaN.mdx).\n\nSince `x !== x` is only true for `NaN` among all possible JavaScript values, `Number.isNaN(x)` can also be replaced with a test for `x !== x`, despite the latter being less readable.\n\nAs opposed to the global `isNaN()` function, the `Number.isNaN()` method doesn't force-convert the parameter to a number. This makes it safe to pass values that would normally convert to [`NaN`](../../globals/NaN.mdx) but aren't actually the same value as [`NaN`](../../globals/NaN.mdx). This also means that only values of the Number type that are also [`NaN`](../../globals/NaN.mdx) return `true`.\n"
  },
  {
    "path": "documentation/docs/globals/Number/isSafeInteger.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isSafeInteger()\n\nThe **`Number.isSafeInteger()`** method determines whether the provided value is a number that is a _safe integer_.\n\n## Syntax\n\n```js\nNumber.isSafeInteger(testValue)\n```\n\n### Parameters\n\n- `testValue`\n  - : The value to be tested for being a safe integer.\n\n### Return value\n\nThe boolean value `true` if the given value is a number that is a safe integer. Otherwise `false`.\n\n## Description\n\nThe safe integers consist of all integers from -(2<sup>53</sup> - 1) to 2<sup>53</sup> - 1, inclusive (±9,007,199,254,740,991). A safe integer is an integer that:\n\n- can be exactly represented as an IEEE-754 double precision number, and\n- whose IEEE-754 representation cannot be the result of rounding any other integer to fit the IEEE-754 representation.\n\nFor example, 2<sup>53</sup> - 1 is a safe integer: it can be exactly represented, and no other integer rounds to it under any IEEE-754 rounding mode. In contrast, 2<sup>53</sup> is _not_ a safe integer: it can be exactly represented in IEEE-754, but the integer 2<sup>53</sup> + 1 can't be directly represented in IEEE-754 but instead rounds to 2<sup>53</sup> under round-to-nearest and round-to-zero rounding.\n\nHandling values larger or smaller than \\~9 quadrillion with full precision requires using an [arbitrary precision arithmetic library](https://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic). See [What Every Programmer Needs to Know about Floating Point Arithmetic](https://floating-point-gui.de/) for more information on floating point representations of numbers.\n\nFor larger integers, consider using the `BigInt` type.\n"
  },
  {
    "path": "documentation/docs/globals/Number/parseFloat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.parseFloat()\n\nThe **`Number.parseFloat()`** method parses an argument and returns a floating point number. If a number cannot be parsed from the argument, it returns [`NaN`](../../globals/NaN.mdx).\n\n## Syntax\n\n```js\nNumber.parseFloat(string)\n```\n\n### Parameters\n\n- `string`\n  - : The value to parse, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). Leading whitespace in this argument is ignored.\n\n### Return value\n\nA floating point number parsed from the given `string`.\n\nOr [`NaN`](../../globals/NaN.mdx) when the first non-whitespace character cannot be converted to a number.\n"
  },
  {
    "path": "documentation/docs/globals/Number/parseInt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.parseInt()\n\nThe **`Number.parseInt()`** method parses a string argument and\nreturns an integer of the specified radix or base.\n\n## Syntax\n\n```js\nNumber.parseInt(string)\nNumber.parseInt(string, radix)\n```\n\n### Parameters\n\n- `string`\n  - : The value to parse, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). Leading whitespace in this argument is ignored.\n- `radix` _**optional**_\n\n  - : An integer between `2` and `36` that represents the\n    _radix_ (the base in mathematical numeral systems) of the\n    `string`.\n\n    If `radix` is undefined or `0`, it is assumed to be `10` except when the number begins with the code unit pairs `0x` or `0X`, in which case a radix of `16` is assumed.\n\n### Return value\n\nAn integer parsed from the given `string`.\n\nIf the `radix` is smaller than `2` or bigger than\n`36`, or the first non-whitespace character cannot be converted to a number,\n[`NaN`](../../globals/NaN.mdx) is returned.\n"
  },
  {
    "path": "documentation/docs/globals/Number/prototype/toExponential.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toExponential()\n\nThe **`toExponential()`** method returns a string representing\nthe `Number` object in exponential notation.\n\n## Syntax\n\n```js\ntoExponential()\ntoExponential(fractionDigits)\n```\n\n### Parameters\n\n- `fractionDigits` _**optional**_\n  - : Optional. An integer specifying the number of digits after the decimal point.\n    Defaults to as many digits as necessary to specify the number.\n\n### Return value\n\nA string representing the given `Number` object in exponential notation\nwith one digit before the decimal point, rounded to\n`fractionDigits` digits after the decimal point.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : If `fractionDigits` is too small or too large. Values between\n    `0` and `100`, inclusive, will not cause a\n    [`RangeError`](../../../globals/RangeError/RangeError.mdx).\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If this method is invoked on an object that is not a `Number`.\n\n## Description\n\nIf the `fractionDigits` argument is omitted, the number of digits\nafter the decimal point defaults to the number of digits necessary to represent the\nvalue uniquely.\n\nIf you use the `toExponential()` method for a numeric literal and the\nnumeric literal has no exponent and no decimal point, leave whitespace(s) before the dot\nthat precedes the method call to prevent the dot from being interpreted as a decimal\npoint.\n\nIf a number has more digits than requested by the\n`fractionDigits` parameter, the number is rounded to the nearest\nnumber represented by `fractionDigits` digits. See the discussion\nof rounding in the description of the [`Number.prototype.toFixed()`](../../../globals/Number/prototype/toFixed.mdx) method, which also applies to `toExponential()`.\n"
  },
  {
    "path": "documentation/docs/globals/Number/prototype/toFixed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toFixed()\n\nThe **`toFixed()`** method formats a number using fixed-point notation.\n\n## Syntax\n\n```js\ntoFixed()\ntoFixed(digits)\n```\n\n### Parameters\n\n- `digits` _**optional**_\n  - : The number of digits to appear after the decimal point; should be a value between `0` and `100`, inclusive. If this argument is omitted, it is treated as `0`.\n\n### Return value\n\nA string representing the given number using fixed-point notation.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : If `digits` is smaller than `0`, larger than `100`, or is `NaN`.\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If this method is invoked on an object that is not a `Number`.\n\n## Description\n\nThe `toFixed()` method returns a string representation of `numObj` that does not use exponential notation and has exactly `digits` digits after the decimal place. The number is rounded if necessary, and the fractional part is padded with zeros if necessary so that it has the specified length.\n\nIf the absolute value of `numObj` is greater or equal to 10<sup>21</sup>, this method uses the same algorithm as [`Number.prototype.toString()`](../../../globals/Number/prototype/toString.mdx) and returns a string in exponential notation. `toFixed()` returns `\"Infinity\"`, `\"NaN\"`, or `\"-Infinity\"` if the value of `numObj` is non-finite.\n\nThe output of `toFixed()` may be more precise than [`toString()`](../../../globals/Number/prototype/toString.mdx) for some values, because `toString()` only prints enough significant digits to distinguish the number from adjacent number values. For example:\n\n```js\n(1000000000000000128).toString(); // '1000000000000000100'\n(1000000000000000128).toFixed(0); // '1000000000000000128'\n```\n\nHowever, choosing a `digits` precision that's too high can return unexpected results, because decimal fractional numbers cannot be represented precisely in floating point. For example:\n\n```js\n0.3.toFixed(50); // '0.29999999999999998889776975374843459576368331909180'\n```\n"
  },
  {
    "path": "documentation/docs/globals/Number/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string with a language-sensitive representation of this number. In implementations with [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) support, this method simply calls `Intl.NumberFormat`.\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` parameters customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat), these parameters correspond exactly to the [`Intl.NumberFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) constructor's parameters. Implementations without `Intl.NumberFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#locales) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored.\n\nSee the [`Intl.NumberFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string with a language-sensitive representation of the given number.\n\nIn implementations with `Intl.NumberFormat`, this is equivalent to `new Intl.NumberFormat(locales, options).format(number)`.\n\n## Performance\n\nWhen formatting large numbers of numbers, it is better to create a\n`Intl.NumberFormat` object and use the function provided by its\n`format` property.\n"
  },
  {
    "path": "documentation/docs/globals/Number/prototype/toPrecision.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toPrecision()\n\nThe **`toPrecision()`** method returns a string representing\nthe `Number` object to the specified precision.\n\n## Syntax\n\n```js\ntoPrecision()\ntoPrecision(precision)\n```\n\n### Parameters\n\n- `precision` _**optional**_\n  - : An integer specifying the number of significant digits.\n\n### Return value\n\nA string representing a `Number` object in fixed-point or exponential\nnotation rounded to `precision` significant digits. See the discussion of\nrounding in the description of the [`Number.prototype.toFixed()`](../../../globals/Number/prototype/toFixed.mdx) method,\nwhich also applies to `toPrecision()`.\n\nIf the `precision` argument is omitted, behaves as\n[`Number.prototype.toString()`](../../../globals/Number/prototype/toString.mdx). If the `precision` argument is a\nnon-integer value, it is rounded to the nearest integer.\n\n### Exceptions\n\n- `RangeError`\n  - : If `precision` is not between `1` and `100`\n    (inclusive), a [`RangeError`](../../../globals/RangeError/RangeError.mdx) is thrown. Implementations are allowed to\n    support larger and smaller values as well. ECMA-262 only requires a precision of up to\n    21 significant digits.\n"
  },
  {
    "path": "documentation/docs/globals/Number/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified number value.\n\n## Syntax\n\n```js\ntoString()\ntoString(radix)\n```\n\n### Parameters\n\n- `radix` _**optional**_\n  - : An integer in the range `2` through `36` specifying the base to use for representing the number value. Defaults to 10.\n\n### Return value\n\nA string representing the specified number value.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `radix` is less than 2 or greater than 36.\n\n## Description\n\nThe `Number` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For `Number` values, the `toString` method returns a string representation of the value in the specified radix.\n\nFor radixes above 10, the letters of the alphabet indicate digits greater than 9. For example, for hexadecimal numbers (base 16) `a` through `f` are used.\n\nIf the specified number value is negative, the sign is preserved. This is the case even if the radix is 2; the string returned is the positive binary representation of the number value preceded by a `-` sign, **not** the two's complement of the number value.\n\nBoth `0` and `-0` have `\"0\"` as their string representation. [`Infinity`](../../../globals/Infinity.mdx) returns `\"Infinity\"` and [`NaN`](../../../globals/NaN.mdx) returns `\"NaN\"`.\n\nIf the number is not a whole number, the decimal point `.` is used to separate the decimal places. [Scientific notation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#exponential) is used if the radix is 10 and the number's magnitude (ignoring sign) is greater than or equal to 10<sup>21</sup> or less than 10<sup>-6</sup>. In this case, the returned string always explicitly specifies the sign of the exponent.\n\n```js\nconsole.log((10 ** 21.5).toString()); // \"3.1622776601683794e+21\"\nconsole.log((10 ** 21.5).toString(8)); // \"526665530627250154000000\"\n```\n\nThe `toString()` method requires its `this` value to be a `Number` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to number values.\n\nBecause `Number` doesn't have a [`[Symbol.toPrimitive]()`](../../../globals/Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `Number` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, Number _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — rather, they are directly converted using the same algorithm as the initial `toString()` implementation.\n\n```js\nNumber.prototype.toString = () => \"Overridden\";\nconsole.log(`${1}`); // \"1\"\nconsole.log(`${new Number(1)}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/docs/globals/Number/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.valueOf()\n\nThe **`valueOf()`** method returns the wrapped primitive value\nof a `Number` object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nA number representing the primitive value of the specified `Number` object.\n\n## Description\n\nThis method is usually called internally by JavaScript and not explicitly in web code.\n"
  },
  {
    "path": "documentation/docs/globals/Object/Object.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object()\n\nThe **`Object` constructor** turns the input into an object. Its behavior depends on the input's type.\n\n- If the value is [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../globals/undefined.mdx), it creates and returns an empty object.\n- Otherwise, it returns an object of a Type that corresponds to the given value.\n- If the value is an object already, it returns the value.\n\n## Syntax\n\n```js\nnew Object(value)\nObject(value)\n```\n\n> **Note:** `Object()` can be called with or without `new`. Both create a new object.\n\n### Parameters\n\n- `value`\n  - : Any value.\n"
  },
  {
    "path": "documentation/docs/globals/Object/assign.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.assign()\n\nThe **`Object.assign()`** method\ncopies all [enumerable](../../globals/Object/prototype/propertyIsEnumerable.mdx)\n[own properties](../../globals/Object/hasOwn.mdx) from one or more\n_source objects_ to a _target object_. It returns the modified target\nobject.\n\n## Syntax\n\n```js\nObject.assign(target, ...sources)\n```\n\n### Parameters\n\n- `target`\n  - : The target object — what to apply the sources' properties to, which is returned\n    after it is modified.\n- `sources`\n  - : The source object(s) — objects containing the properties you want to apply.\n\n### Return value\n\nThe target object.\n\n## Description\n\nProperties in the target object are overwritten by properties in the sources if they\nhave the same \"key\". Later sources' properties overwrite earlier ones.\n\nThe `Object.assign()` method only copies _enumerable_ and\n_own_ properties from a source object to a target object. It uses\n`[[Get]]` on the source and `[[Set]]` on the target, so it will\ninvoke [getters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/get) and [setters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/set). Therefore it\n_assigns_ properties, versus copying or defining new properties. This may make it\nunsuitable for merging new properties into a prototype if the merge sources contain\ngetters.\n\nFor copying property definitions (including their enumerability) into prototypes, use\n[`Object.getOwnPropertyDescriptor()`](../../globals/Object/getOwnPropertyDescriptor.mdx) and\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx) instead.\n\nBoth `String` and `Symbol` properties are copied.\n\nIn case of an error, for example if a property is non-writable, a\n[`TypeError`](../../globals/TypeError/TypeError.mdx) is raised, and the `target` object is\nchanged if any properties are added before the error is raised.\n\n> **Note:** `Object.assign()` does not throw on\n> [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../globals/undefined.mdx) sources.\n"
  },
  {
    "path": "documentation/docs/globals/Object/create.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.create()\n\nThe **`Object.create()`** method creates a new object, using an existing object as the prototype of the newly created object.\n\n## Syntax\n\n```js\nObject.create(proto)\nObject.create(proto, propertiesObject)\n```\n\n### Parameters\n\n- `proto`\n  - : The object which should be the prototype of the newly-created object.\n- `propertiesObject` _**optional**_\n  - : If specified and not [`undefined`](../../globals/undefined.mdx), an object whose [enumerable own properties](https://developer.mozilla.org/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) specify property descriptors to be added to the newly-created object, with the corresponding property names. These properties correspond to the second argument of [`Object.defineProperties()`](../../globals/Object/defineProperties.mdx).\n\n### Return value\n\nA new object with the specified prototype object and properties.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if `proto` is neither [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) nor an `Object`.\n"
  },
  {
    "path": "documentation/docs/globals/Object/defineProperties.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.defineProperties()\n\nThe **`Object.defineProperties()`** method defines new or\nmodifies existing properties directly on an object, returning the object.\n\n## Syntax\n\n```js\nObject.defineProperties(obj, props)\n```\n\n### Parameters\n\n- `obj`\n  - : The object on which to define or modify properties.\n- `props`\n\n  - : An object whose keys represent the names of properties to be defined or modified and\n    whose values are objects describing those properties. Each value in `props`\n    must be either a data descriptor or an accessor descriptor; it cannot be both (see\n    [`Object.defineProperty()`](../../globals/Object/defineProperty.mdx) for more details).\n\n    Data descriptors and accessor descriptors may optionally contain the following keys:\n\n    - `configurable`\n      - : `true` if and only if the type of this property descriptor may be\n        changed and if the property may be deleted from the corresponding object.\n        **Defaults to `false`.**\n    - `enumerable`\n      - : `true` if and only if this property shows up during enumeration of\n        the properties on the corresponding object.\n        **Defaults to `false`.**\n\n    A data descriptor also has the following optional keys:\n\n    - `value`\n      - : The value associated with the property. Can be any valid JavaScript value\n        (number, object, function, etc.).\n        **Defaults to [`undefined`](../../globals/undefined.mdx).**\n    - `writable`\n      - : `true` if and only if the value associated with the property may be\n        changed with an assignment operator.\n        **Defaults to `false`.**\n\n    An accessor descriptor also has the following optional keys:\n\n    - `get`\n      - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx)\n        if there is no getter. The function's return value will be used as the value of\n        the property.\n        **Defaults to [`undefined`](../../globals/undefined.mdx).**\n    - `set`\n      - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx)\n        if there is no setter. The function will receive as its only argument the new\n        value being assigned to the property.\n        **Defaults to [`undefined`](../../globals/undefined.mdx).**\n\n    If a descriptor has neither of `value`, `writable`,\n    `get` and `set` keys, it is treated as a data descriptor. If a\n    descriptor has both `value` or `writable` and `get`\n    or `set` keys, an exception is thrown.\n\n### Return value\n\nThe object that was passed to the function.\n"
  },
  {
    "path": "documentation/docs/globals/Object/defineProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.defineProperty()\n\nThe static method **`Object.defineProperty()`** defines a new\nproperty directly on an object, or modifies an existing property on an object, and\nreturns the object.\n\n## Syntax\n\n```js\nObject.defineProperty(obj, prop, descriptor)\n```\n\n### Parameters\n\n- `obj`\n  - : The object on which to define the property.\n- `prop`\n  - : The name or `Symbol` of the property to be defined or modified.\n- `descriptor`\n  - : The descriptor for the property being defined or modified.\n\n### Return value\n\nThe object that was passed to the function.\n\n## Description\n\nThis method allows a precise addition to or modification of a property on an object.\nNormal property addition through assignment creates properties which show up during\nproperty enumeration (`for...in` loop or\n[`Object.keys`](../../globals/Object/keys.mdx) method), whose values may be changed, and which may be\ndeleted. This method allows these extra details\nto be changed from their defaults. By default, properties added using\n`Object.defineProperty()` are not writable, not enumerable, and not configurable.\n\nProperty descriptors present in objects come in two main flavors: data descriptors and\naccessor descriptors. A **data descriptor** is a property that has a\nvalue, which may or may not be writable. An **accessor descriptor** is a\nproperty described by a getter-setter pair of functions. A descriptor must be one of\nthese two flavors; it cannot be both.\n\nBoth data and accessor descriptors are objects. They share the following optional keys\n(please note: the **defaults** mentioned here are in the case of defining\nproperties using `Object.defineProperty()`):\n\n- `configurable`\n\n  - : when this is set to `false`,\n\n    - the type of this property cannot be changed between data property and accessor property, and\n    - the property may not be deleted, and\n    - other attributes of its descriptor cannot be changed (however, if it's a data descriptor with `writable: true`, the `value` can be changed, and `writable` can be changed to `false`).\n\n    **Defaults to `false`.**\n\n- `enumerable`\n  - : `true` if and only if this property shows up during enumeration of the\n    properties on the corresponding object.\n    **Defaults to `false`.**\n\nA **data descriptor** also has the following optional keys:\n\n- `value`\n  - : The value associated with the property. Can be any valid JavaScript value (number,\n    object, function, etc.).\n    **Defaults to [`undefined`](../../globals/undefined.mdx).**\n- `writable`\n  - : `true` if the value associated with the property may be changed with an\n    assignment operator.\n    **Defaults to `false`.**\n\nAn **accessor descriptor** also has the following optional keys:\n\n- `get`\n  - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no getter. When the property is accessed, this function is called without\n    arguments and with `this` set to the object through which the property is\n    accessed (this may not be the object on which the property is defined due to\n    inheritance). The return value will be used as the value of the property.\n    **Defaults to [`undefined`](../../globals/undefined.mdx).**\n- `set`\n  - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no setter. When the property is assigned, this function is called with one\n    argument (the value being assigned to the property) and with `this` set to\n    the object through which the property is assigned.\n    **Defaults to [`undefined`](../../globals/undefined.mdx).**\n\nIf a descriptor has neither of `value`, `writable`,\n`get` and `set` keys, it is treated as a data descriptor. If a\ndescriptor has both \\[`value` or `writable`] and \\[`get` or `set`] keys, an exception is thrown.\n\nBear in mind that these attributes are not necessarily the descriptor's own properties.\nInherited properties will be considered as well. In order to ensure these defaults are\npreserved, you might freeze existing objects in the descriptor object's prototype chain upfront, specify all\noptions explicitly, or point to [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) with [`Object.create(null)`](../../globals/Object/create.mdx).\n\n```js\nconst obj = {};\n// 1. Using a null prototype: no inherited properties\nconst descriptor = Object.create(null);\ndescriptor.value = 'static';\n\n// not enumerable, not configurable, not writable as defaults\nObject.defineProperty(obj, 'key', descriptor);\n\n// 2. Being explicit by using a throw-away object literal with all attributes present\nObject.defineProperty(obj, 'key2', {\n  enumerable: false,\n  configurable: false,\n  writable: false,\n  value: 'static'\n});\n\n// 3. Recycling same object\nfunction withValue(value) {\n  const d = withValue.d || (\n    withValue.d = {\n      enumerable: false,\n      writable: false,\n      configurable: false,\n      value,\n    }\n  );\n\n  // avoiding duplicate operation for assigning value\n  if (d.value !== value) d.value = value;\n\n  return d;\n}\n// and\nObject.defineProperty(obj, 'key', withValue('static'));\n\n// if freeze is available, prevents adding or\n// removing the object prototype properties\n// (value, get, set, enumerable, writable, configurable)\n(Object.freeze || Object)(Object.prototype);\n```\n\nWhen the property already exists, `Object.defineProperty()` attempts to modify the property according to the values in the descriptor and the property's current configuration.\n\nIf the old descriptor had its `configurable` attribute set to `false`, the property is said to be _non-configurable_. It is not possible to change any attribute of a non-configurable accessor property, and it is not possible to switch between data and accessor property types. For data properties with `writable: true`, it is possible to modify the value and change the `writable` attribute from `true` to `false`. A [`TypeError`](../../globals/TypeError/TypeError.mdx) is thrown when attempts are made to change non-configurable property attributes (except `value` and `writable`, if permitted), except when defining a value same as the original value on a data property.\n\nWhen the current property is configurable, defining an attribute to `undefined` effectively deletes it. For example, if `o.k` is an accessor property, `Object.defineProperty(o, \"k\", { set: undefined })` will remove the setter, making `k` only have a getter and become readonly. If an attribute is absent from the new descriptor, the old descriptor attribute's value is kept (it won't be implicitly re-defined to `undefined`). It is possible to toggle between data and accessor property by giving a descriptor of a different \"flavor\". For example, if the new descriptor is a data descriptor (with `value` or `writable`), the original descriptor's `get` and `set` attributes will both be dropped.\n"
  },
  {
    "path": "documentation/docs/globals/Object/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.entries()\n\nThe **`Object.entries()`** method returns an array of a given object's own enumerable string-keyed property key-value pairs.\n\n## Syntax\n\n```js\nObject.entries(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : An object.\n\n### Return value\n\nAn array of the given object's own enumerable string-keyed property key-value pairs. Each key-value pair is an array with two elements: the first element is the property key (which is always a string), and the second element is the property value.\n\n## Description\n\n`Object.entries()` returns an array whose elements are arrays corresponding to the enumerable string-keyed property key-value pairs found directly upon `object`. This is the same as iterating with a `for...in` loop, except that a `for...in` loop enumerates properties in the prototype chain as well. The order of the array returned by `Object.entries()` is the same as that provided by a `for...in` loop.\n\nIf you only need the property keys, use [`Object.keys()`](../../globals/Object/keys.mdx) instead. If you only need the property values, use [`Object.values()`](../../globals/Object/values.mdx) instead.\n"
  },
  {
    "path": "documentation/docs/globals/Object/freeze.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.freeze()\n\nThe **`Object.freeze()`** method _freezes_ an object. Freezing an object [prevents extensions](../../globals/Object/preventExtensions.mdx) and makes existing properties non-writable and non-configurable. A frozen object can no longer be changed: new properties cannot be added, existing properties cannot be removed, their enumerability, configurability, writability, or value cannot be changed, and the object's prototype cannot be re-assigned. `freeze()` returns the same object that was passed in.\n\nFreezing an object is the highest integrity level that JavaScript provides.\n\n## Syntax\n\n```js\nObject.freeze(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object to freeze.\n\n### Return value\n\nThe object that was passed to the function.\n\n## Description\n\nFreezing an object is equivalent to [preventing extensions](../../globals/Object/preventExtensions.mdx) and then changing all existing [properties' descriptors'](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty#description) `configurable` to `false` — and for data properties, `writable` to `false` as well. Nothing can be added to or removed from the properties set of a frozen object. Any attempt to do so will fail, either silently or by throwing a [`TypeError`](../../globals/TypeError/TypeError.mdx) exception (most commonly, but not exclusively, when in \"strict mode\").\n\nFor data properties of a frozen object, their values cannot be changed since the writable and\nconfigurable attributes are set to false. Accessor properties (getters and setters) work the same — the property value returned by the getter may still change, and the setter can still be called without throwing errors when setting the property. Note that values\nthat are objects can still be modified, unless they are also frozen. As an object, an\narray can be frozen; after doing so, its elements cannot be altered and no elements can\nbe added to or removed from the array.\n\n`freeze()` returns the same object that was passed into the function. It\n_does not_ create a frozen copy.\n\nA `TypedArray` or a [`DataView`](../../globals/DataView/DataView.mdx) with elements will cause a [`TypeError`](../../globals/TypeError/TypeError.mdx),\nas they are views over memory and will definitely cause other possible issues:\n\n```js\nObject.freeze(new Uint8Array(0)) // No elements\n// Uint8Array []\n\nObject.freeze(new Uint8Array(1)) // Has elements\n// TypeError: Cannot freeze array buffer views with elements\n\nObject.freeze(new DataView(new ArrayBuffer(32))) // No elements\n// DataView {}\n\nObject.freeze(new Float64Array(new ArrayBuffer(64), 63, 0)) // No elements\n// Float64Array []\n\nObject.freeze(new Float64Array(new ArrayBuffer(64), 32, 2)) // Has elements\n// TypeError: Cannot freeze array buffer views with elements\n```\n\nNote that as the standard three properties (`buf.byteLength`,\n`buf.byteOffset` and `buf.buffer`) are read-only (as are those of\nan `ArrayBuffer`, there is no reason for\nattempting to freeze these properties.\n\nUnlike [`Object.seal()`](../../globals/Object/seal.mdx), existing properties in objects frozen with `Object.freeze()` are made immutable and data properties cannot be re-assigned.\n"
  },
  {
    "path": "documentation/docs/globals/Object/fromEntries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.fromEntries()\n\nThe **`Object.fromEntries()`** method transforms a list of key-value pairs into an object.\n\n## Syntax\n\n```js\nObject.fromEntries(iterable)\n```\n\n### Parameters\n\n- `iterable`\n\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol), such as an `Array` or [Map](../../globals/Map/Map.mdx), containing a list of objects. Each object should have two properties:\n\n    - `0`\n      - : A string or `Symbol` representing the property key.\n    - `1`\n      - : The property value.\n\n    Typically, this object is implemented as a two-element array, with the first element being the property key and the second element being the property value.\n\n### Return value\n\nA new object whose properties are given by the entries of the iterable.\n\n## Description\n\nThe `Object.fromEntries()` method takes a list of key-value pairs and returns a new object whose properties are given by those entries. The `iterable` argument is expected to be an object that implements an `@@iterator` method. The method returns an iterator object that produces two-element array-like objects. The first element is a value that will be used as a property key, and the second element is the value to associate with that property key.\n\n`Object.fromEntries()` performs the reverse of [`Object.entries()`](../../globals/Object/entries.mdx), except that `Object.entries()` only returns string-keyed properties, while `Object.fromEntries()` can also create symbol-keyed properties.\n\n> **Note:** Unlike [`Array.from()`](../../globals/Array/from.mdx), `Object.fromEntries()` does not use the value of `this`, so calling it on another constructor does not create objects of that type.\n"
  },
  {
    "path": "documentation/docs/globals/Object/getOwnPropertyDescriptor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertyDescriptor()\n\nThe **`Object.getOwnPropertyDescriptor()`** method returns an\nobject describing the configuration of a specific property on a given object (that is,\none directly present on an object and not in the object's prototype chain). The object\nreturned is mutable but mutating it has no effect on the original property's\nconfiguration.\n\n## Syntax\n\n```js\nObject.getOwnPropertyDescriptor(obj, prop)\n```\n\n### Parameters\n\n- `obj`\n  - : The object in which to look for the property.\n- `prop`\n  - : The name or `Symbol` of the property whose description is to be\n    retrieved.\n\n### Return value\n\nA property descriptor of the given property if it exists on the object,\n[`undefined`](../../globals/undefined.mdx) otherwise.\n\n## Description\n\nThis method permits examination of the precise description of a property. A\n_property_ in JavaScript consists of either a string-valued name or a\n`Symbol` and a property descriptor. Further information about property\ndescriptor types and their attributes can be found in\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx).\n\nA _property descriptor_ is a record with some of the following attributes:\n\n- `value`\n  - : The value associated with the property (data descriptors only).\n- `writable`\n  - : `true` if and only if the value associated with the property may be\n    changed (data descriptors only).\n- `get`\n  - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no getter (accessor descriptors only).\n- `set`\n  - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no setter (accessor descriptors only).\n- `configurable`\n  - : `true` if and only if the type of this property descriptor may be changed\n    and if the property may be deleted from the corresponding object.\n- `enumerable`\n  - : `true` if and only if this property shows up during enumeration of the\n    properties on the corresponding object.\n"
  },
  {
    "path": "documentation/docs/globals/Object/getOwnPropertyDescriptors.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertyDescriptors()\n\nThe **`Object.getOwnPropertyDescriptors()`** method returns all\nown property descriptors of a given object.\n\n## Syntax\n\n```js\nObject.getOwnPropertyDescriptors(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object for which to get all own property descriptors.\n\n### Return value\n\nAn object containing all own property descriptors of an object. Might be an empty\nobject, if there are no properties.\n\n## Description\n\nThis method permits examination of the precise description of all own properties of an\nobject. A _property_ in JavaScript consists of either a string-valued name or a\n`Symbol` and a property descriptor. Further information about property\ndescriptor types and their attributes can be found in\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx).\n\nA _property descriptor_ is a record with some of the following attributes:\n\n- `value`\n  - : The value associated with the property (data descriptors only).\n- `writable`\n  - : `true` if and only if the value associated with the property may be\n    changed (data descriptors only).\n- `get`\n  - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no getter (accessor descriptors only).\n- `set`\n  - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no setter (accessor descriptors only).\n- `configurable`\n  - : `true` if and only if the type of this property descriptor may be changed\n    and if the property may be deleted from the corresponding object.\n- `enumerable`\n  - : `true` if and only if this property shows up during enumeration of the\n    properties on the corresponding object.\n"
  },
  {
    "path": "documentation/docs/globals/Object/getOwnPropertyNames.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertyNames()\n\nThe **`Object.getOwnPropertyNames()`** method returns an array of all properties (including non-enumerable properties except for those which use Symbol) found directly in a given object.\n\n## Syntax\n\n```js\nObject.getOwnPropertyNames(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object whose enumerable and non-enumerable properties are to be returned.\n\n### Return value\n\nAn array of strings that corresponds to the properties found directly in the given object.\n\n## Description\n\n`Object.getOwnPropertyNames()` returns an array whose elements are strings corresponding to the enumerable and non-enumerable properties found directly in a given object `obj`. The ordering of the enumerable properties in the array is consistent with the ordering exposed by a `for...in` loop (or by [`Object.keys()`](../../globals/Object/keys.mdx)) over the properties of the object. The non-negative integer keys of the object (both enumerable and non-enumerable) are added in ascending order to the array first, followed by the string keys in the order of insertion.\n"
  },
  {
    "path": "documentation/docs/globals/Object/getOwnPropertySymbols.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertySymbols()\n\nThe **`Object.getOwnPropertySymbols()`** method returns an array of all symbol properties found directly upon a given object.\n\n## Syntax\n\n```js\nObject.getOwnPropertySymbols(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object whose symbol properties are to be returned.\n\n### Return value\n\nAn array of all symbol properties found directly upon the given object.\n\n## Description\n\nSimilar to [`Object.getOwnPropertyNames()`](../../globals/Object/getOwnPropertyNames.mdx), you can get all symbol properties of a given object as an array of symbols. Note that [`Object.getOwnPropertyNames()`](../../globals/Object/getOwnPropertyNames.mdx) itself does not contain the symbol properties of an object and only the string properties.\n\nAs all objects have no own symbol properties initially, `Object.getOwnPropertySymbols()` returns an empty array unless you have set symbol properties on your object.\n"
  },
  {
    "path": "documentation/docs/globals/Object/getPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getPrototypeOf()\n\nThe **`Object.getPrototypeOf()`** method returns the prototype\n(i.e. the value of the internal `[[Prototype]]` property) of the specified\nobject.\n\n## Syntax\n\n```js\nObject.getPrototypeOf(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object whose prototype is to be returned.\n\n### Return value\n\nThe prototype of the given object, which may be `null`.\n"
  },
  {
    "path": "documentation/docs/globals/Object/hasOwn.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.hasOwn()\n\nThe **`Object.hasOwn()`** static method returns `true` if the specified object has the indicated property as its _own_ property.\nIf the property is inherited, or does not exist, the method returns `false`.\n\n> **Note:** `Object.hasOwn()` is intended as a replacement for [`Object.prototype.hasOwnProperty()`](../../globals/Object/prototype/hasOwnProperty.mdx).\n\n\n\n## Syntax\n\n```js\nhasOwn(instance, prop)\n```\n\n### Parameters\n\n- `instance`\n  - : The JavaScript object instance to test.\n- `prop`\n  - : The `String` name or [Symbol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol) of the property to test.\n\n### Return value\n\n`true` if the specified object has directly defined the specified property.\nOtherwise `false`\n\n## Description\n\nThe **`Object.hasOwn()`** method returns `true` if the specified property is a\ndirect property of the object — even if the property value is `null` or `undefined`.\nThe method returns `false` if the property is inherited, or has not been declared at all.\nUnlike the `in` operator, this\nmethod does not check for the specified property in the object's prototype chain.\n\nIt is recommended over [`Object.prototype.hasOwnProperty()`](../../globals/Object/prototype/hasOwnProperty.mdx) because\nit works for objects created using `Object.create(null)` and with objects that\nhave overridden the inherited `hasOwnProperty()` method. While it is possible to\nworkaround these problems by calling `Object.prototype.hasOwnProperty()` on an\nexternal object, `Object.hasOwn()` is more intuitive.\n"
  },
  {
    "path": "documentation/docs/globals/Object/is.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.is()\n\nThe **`Object.is()`** method determines whether two values are [the same value](https://developer.mozilla.org/docs/Web/JavaScript/Equality_comparisons_and_sameness#same-value_equality_using_object.is).\n\n## Syntax\n\n```js\nObject.is(value1, value2)\n```\n\n### Parameters\n\n- `value1`\n  - : The first value to compare.\n- `value2`\n  - : The second value to compare.\n\n### Return value\n\nA boolean indicating whether or not the two arguments are the same value.\n\n## Description\n\n`Object.is()` determines whether two values are [the same value](https://developer.mozilla.org/docs/Web/JavaScript/Equality_comparisons_and_sameness#same-value_equality_using_object.is). Two values are the same if one of the following holds:\n\n- both [`undefined`](../../globals/undefined.mdx)\n- both `null`\n- both `true` or both `false`\n- both strings of the same length with the same characters in the same order\n- both the same object (meaning both values reference the same object in memory)\n- both `BigInts` with the same numeric value\n- both `Symbols` that reference the same symbol value\n- both numbers and\n\n  - both `+0`\n  - both `-0`\n  - both [`NaN`](../../globals/NaN.mdx)\n  - or both non-zero, not [`NaN`](../../globals/NaN.mdx), and have the same value\n\n`Object.is()` is not equivalent to the [`==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Equality) operator. The `==` operator applies various coercions to both sides (if they are not the same type) before testing for equality (resulting in such behavior as `\"\" == false` being `true`), but `Object.is()` doesn't coerce either value.\n\n`Object.is()` is also _not_ equivalent to the [`===`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) operator. The only difference between `Object.is()` and `===` is in their treatment of signed zeros and `NaN` values. The `===` operator (and the `==` operator) treats the number values `-0` and `+0` as equal, but treats [`NaN`](../../globals/NaN.mdx) as not equal to each other.\n"
  },
  {
    "path": "documentation/docs/globals/Object/isExtensible.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.isExtensible()\n\nThe **`Object.isExtensible()`** method determines if an object\nis extensible (whether it can have new properties added to it).\n\n## Syntax\n\n```js\nObject.isExtensible(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be checked.\n\n### Return value\n\nA `Boolean` indicating whether or not the given object is extensible.\n\n## Description\n\nObjects are extensible by default: they can have new properties added to them, and their `[[Prototype]]` can be re-assigned. An object can be marked as non-extensible using one of [`Object.preventExtensions()`](../../globals/Object/preventExtensions.mdx), [`Object.seal()`](../../globals/Object/seal.mdx), [`Object.freeze()`](../../globals/Object/freeze.mdx), or [`Reflect.preventExtensions()`](../../globals/Reflect/preventExtensions.mdx).\n"
  },
  {
    "path": "documentation/docs/globals/Object/isFrozen.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.isFrozen()\n\nThe **`Object.isFrozen()`** determines if an object is\n[frozen](../../globals/Object/freeze.mdx).\n\n## Syntax\n\n```js\nObject.isFrozen(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be checked.\n\n### Return value\n\nA `Boolean` indicating whether or not the given object is frozen.\n\n## Description\n\nAn object is frozen if and only if it is not [extensible](../../globals/Object/isExtensible.mdx), all its properties are non-configurable, and all its data\nproperties (that is, properties which are not accessor properties with getter or setter\ncomponents) are non-writable.\n"
  },
  {
    "path": "documentation/docs/globals/Object/isSealed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.isSealed()\n\nThe **`Object.isSealed()`** method determines if an object is\nsealed.\n\n## Syntax\n\n```js\nObject.isSealed(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be checked.\n\n### Return value\n\nA `Boolean` indicating whether or not the given object is sealed.\n\n## Description\n\nReturns `true` if the object is sealed, otherwise `false`. An\nobject is sealed if it is not [extensible](../../globals/Object/isExtensible.mdx) and\nif all its properties are non-configurable and therefore not removable (but not\nnecessarily non-writable).\n"
  },
  {
    "path": "documentation/docs/globals/Object/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.keys()\n\nThe **`Object.keys()`** method returns an array of a given object's own enumerable string-keyed property names.\n\n## Syntax\n\n```js\nObject.keys(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : An object.\n\n### Return value\n\nAn array of strings representing the given object's own enumerable string-keyed property keys.\n\n## Description\n\n`Object.keys()` returns an array whose elements are strings corresponding to the enumerable string-keyed property names found directly upon `object`. This is the same as iterating with a `for...in` loop, except that a `for...in` loop enumerates properties in the prototype chain as well. The order of the array returned by `Object.keys()` is the same as that provided by a `for...in` loop.\n\nIf you need the property values, use [`Object.values()`](../../globals/Object/values.mdx) instead. If you need both the property keys and values, use [`Object.entries()`](../../globals/Object/entries.mdx) instead.\n"
  },
  {
    "path": "documentation/docs/globals/Object/preventExtensions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.preventExtensions()\n\nThe **`Object.preventExtensions()`** method prevents new\nproperties from ever being added to an object (i.e. prevents future extensions to the\nobject). It also prevents the object's prototype from being re-assigned.\n\n## Syntax\n\n```js\nObject.preventExtensions(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be made non-extensible.\n\n### Return value\n\nThe object being made non-extensible.\n\n## Description\n\nAn object is extensible if new properties can be added to it.\n`Object.preventExtensions()` marks an object as no longer extensible, so that\nit will never have properties beyond the ones it had at the time it was marked as\nnon-extensible. Note that the properties of a non-extensible object, in general, may\nstill be _deleted_. Attempting to add new properties to a non-extensible object\nwill fail, either silently or, in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), throwing a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\nUnlike [`Object.seal()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/seal) and [`Object.freeze()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze), `Object.preventExtensions()` invokes an intrinsic JavaScript behavior and cannot be replaced with a composition of several other operations. It also has its `Reflect` counterpart (which only exists for intrinsic operations), [`Reflect.preventExtensions()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Reflect/preventExtensions).\n\n`Object.preventExtensions()` only prevents addition of own properties. Properties can still be added to the object prototype.\n\nThis method makes the `[[Prototype]]` of the target immutable; any `[[Prototype]]` re-assignment will throw a `TypeError`. This behavior is specific to the internal `[[Prototype]]` property; other properties of the target object will remain mutable.\n\nThere is no way to make an object extensible again once it has been made non-extensible.\n"
  },
  {
    "path": "documentation/docs/globals/Object/prototype/constructor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.constructor\n\nThe **`constructor`** data property of an `Object` instance returns a reference to the constructor function that created the instance object. Note that the value of this property is a reference to _the function itself_, not a string containing the function's name.\n\n> **Note:** This is a property of JavaScript objects. For the `constructor` method in classes, see [its own reference page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/constructor).\n\n## Value\n\nA reference to the constructor function that created the instance object.\n\n> **Note:** This property is created by default on the [`prototype`](../../../globals/Function/prototype/) property of every constructor function and is inherited by all objects created by that constructor.\n\n## Description\n\nAny object (with the exception of [`null` prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) will have a `constructor` property on its `[[Prototype]]`. Objects created with literals will also have a `constructor` property that points to the constructor type for that object — for example, array literals create `Array` objects, and [object literals](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Object_initializer) create plain objects.\n\n```js\nconst o1 = {};\no1.constructor === Object; // true\n\nconst o2 = new Object();\no2.constructor === Object; // true\n\nconst a1 = [];\na1.constructor === Array; // true\n\nconst a2 = new Array();\na2.constructor === Array; // true\n\nconst n = 3;\nn.constructor === Number; // true\n```\n\nNote that `constructor` usually comes from the constructor's [`prototype`](../../../globals/Function/prototype/) property. If you have a longer prototype chain, you can usually expect every object in the chain to have a `constructor` property.\n\n```js\nconst o = new TypeError(); // Inheritance: TypeError -> Error -> Object\nconst proto = Object.getPrototypeOf;\nproto(o).constructor === TypeError; // true\nproto(proto(o)).constructor === Error; // true\nproto(proto(proto(o))).constructor === Object; // true\n```\n"
  },
  {
    "path": "documentation/docs/globals/Object/prototype/hasOwnProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.hasOwnProperty()\n\nThe **`hasOwnProperty()`** method returns a boolean indicating whether the\nobject has the specified property as its own property (as opposed to inheriting\nit).\n\n> **Note:** [`Object.hasOwn()`](../../../globals/Object/hasOwn.mdx) is recommended over\n> `hasOwnProperty()`, in browsers where it is supported.\n\n## Syntax\n\n```js\nhasOwnProperty(prop)\n```\n\n### Parameters\n\n- `prop`\n  - : The `String` name or `Symbol` of the property to test.\n\n### Return value\n\nReturns `true` if the object has the specified property as own property; `false`\notherwise.\n\n## Description\n\nThe **`hasOwnProperty()`** method returns `true` if the specified property is a\ndirect property of the object — even if the value is `null` or `undefined`. The\nmethod returns `false` if the property is inherited, or has not been declared at\nall. Unlike the `in` operator, this\nmethod does not check for the specified property in the object's prototype\nchain.\n\nThe method can be called on _most_ JavaScript objects, because most objects\ndescend from `Object`, and hence inherit its methods. For\nexample `Array` is an `Object`, so you can\nuse `hasOwnProperty()` method to check whether an index exists:\n\n```js\nconst fruits = ['Apple', 'Banana','Watermelon', 'Orange'];\nfruits.hasOwnProperty(3);   // true ('Orange')\nfruits.hasOwnProperty(4);   // false - not defined\n```\n\nThe method will not be available in objects where it is reimplemented, or on\nobjects created using `Object.create(null)` (as these don't inherit from\n`Object.prototype`). Examples for these cases are given below.\n"
  },
  {
    "path": "documentation/docs/globals/Object/prototype/isPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.isPrototypeOf()\n\nThe **`isPrototypeOf()`** method checks if an object exists in another object's prototype chain.\n\n> **Note:** `isPrototypeOf()` differs from the [`instanceof`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/instanceof) operator. In the expression `object instanceof AFunction`, `object`'s prototype chain is checked against `AFunction.prototype`, not against `AFunction` itself.\n\n## Syntax\n\n```js\nisPrototypeOf(object)\n```\n\n### Parameters\n\n- `object`\n  - : The object whose prototype chain will be searched.\n\n### Return value\n\nA boolean indicating whether the calling object (`this`) lies in the prototype chain of `object`. Directly returns `false` when `object` is not an object (i.e. a primitive).\n\n### Errors thrown\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown if `this` is `null` or `undefined` (because it can't be [converted to an object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#object_coercion)).\n\n## Description\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `isPrototypeOf()` method. This method allows you to check whether or not the object exists within another object's prototype chain. If the `object` passed as the parameter is not an object (i.e. a primitive), the method directly returns `false`. Otherwise, the `this` value is [converted to an object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#object_coercion), and the prototype chain of `object` is searched for the `this` value, until the end of the chain is reached or the `this` value is found.\n"
  },
  {
    "path": "documentation/docs/globals/Object/prototype/propertyIsEnumerable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.propertyIsEnumerable()\n\nThe **`propertyIsEnumerable()`** method returns a boolean indicating whether the specified property is the object's [enumerable own](https://developer.mozilla.org/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) property.\n\n## Syntax\n\n```js\npropertyIsEnumerable(prop)\n```\n\n### Parameters\n\n- `prop`\n  - : The name of the property to test. Can be a string or a `Symbol`.\n\n### Return value\n\nA boolean value indicating whether the specified property is enumerable and is the object's own property.\n\n## Description\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `propertyIsEnumerable()` method. This method determines if the specified property, string or symbol, is an enumerable own property of the object. If the object does not have the specified property, this method returns `false`.\n\nThis method is equivalent to [`Object.getOwnPropertyDescriptor(obj, prop)?.enumerable ?? false`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptor).\n"
  },
  {
    "path": "documentation/docs/globals/Object/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string representing the object. This method is meant to be overridden by derived objects for locale-specific purposes.\n\n## Syntax\n\n```js\ntoLocaleString()\n```\n\n### Parameters\n\nNone. However, all objects that override this method are expected to accept at most two parameters, corresponding to `locales` and `options`, such as [`Date.prototype.toLocaleString()`](../../../globals/Date/prototype/toLocaleString.mdx). The parameter positions should not be used for any other purpose.\n\n### Return value\n\nThe return value of calling `this.toString()`.\n\n## Description\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `toLocaleString()` method. `Object`'s `toLocaleString` returns the result of calling [`this.toString()`](../../../globals/Object/prototype/toString.mdx).\n\nThis function is provided to give objects a generic `toLocaleString` method, even though not all may use it. In the core language, these built-in objects override `toLocaleString` to provide locale-specific formatting:\n\n- `Array`: [`Array.prototype.toLocaleString()`](../../../globals/Array/prototype/toLocaleString.mdx)\n- `Number`: [`Number.prototype.toLocaleString()`](../../../globals/Number/prototype/toLocaleString.mdx)\n- `Date`: [`Date.prototype.toLocaleString()`](../../../globals/Date/prototype/toLocaleString.mdx)\n- `BigInt`: [`BigInt.prototype.toLocaleString()`](../../../globals/BigInt/prototype/toLocaleString.mdx)\n"
  },
  {
    "path": "documentation/docs/globals/Object/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.toString()\n\nThe **`toString()`** method returns a string representing the object. This method is meant to be overridden by derived objects for custom [type conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) logic.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nBy default `toString()` takes no parameters. However, objects that inherit from `Object` may override it with their own implementations that do take parameters. For example, the [`Number.prototype.toString()`](../../../globals/Number/prototype/toString.mdx) and [`BigInt.prototype.toString()`](../../../globals/BigInt/prototype/toString.mdx) methods take an optional `radix` parameter.\n\n### Return value\n\nA string representing the object.\n\n## Description\n\nJavaScript calls the `toString` method to [convert an object to a primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion). You rarely need to invoke the `toString` method yourself; JavaScript automatically invokes it when encountering an object where a primitive value is expected.\n\nThis method is called in priority by [string conversion](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion), but [numeric conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#numeric_coercion) and [primitive conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion) call `valueOf()` in priority. However, because the base [`valueOf()`](../../../globals/Object/prototype/valueOf.mdx) method returns an object, the `toString()` method is usually called in the end, unless the object overrides `valueOf()`. For example, `+[1]` returns `1`, because its [`toString`](../../../globals/Array/prototype/toString.mdx) method returns `\"1\"`, which is then converted to a number.\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `toString()` method. When you create a custom object, you can override `toString()` to call a custom method, so that your custom object can be converted to a string value. Alternatively, you can add a [`Symbol.toPrimitive`](../../../globals/Symbol/toPrimitive.mdx) method, which allows even more control over the conversion process, and will always be preferred over `valueOf` or `toString` for any type conversion.\n\nTo use the base `Object.prototype.toString()` with an object that has it overridden (or to invoke it on `null` or `undefined`), you need to call [`Function.prototype.call()`](../../../globals/Function/prototype/call.mdx) or [`Function.prototype.apply()`](../../../globals/Function/prototype/apply.mdx) on it, passing the object you want to inspect as the first parameter (called `thisArg`).\n\n```js\nconst arr = [1, 2, 3];\n\narr.toString(); // \"1,2,3\"\nObject.prototype.toString.call(arr); // \"[object Array]\"\n```\n\n`Object.prototype.toString()` returns `\"[object Type]\"`, where `Type` is the object type. If the object has a [`Symbol.toStringTag`](../../../globals/Symbol/toStringTag.mdx) property whose value is a string, that value will be used as the `Type`. Many built-in objects, including [`Map`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map) and [`Symbol`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol), have a `Symbol.toStringTag`. Some objects predating ES6 do not have `Symbol.toStringTag`, but have a special tag nonetheless. They include (the tag is the same as the type name given below):\n\n- [`Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\n- [`Function`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions) (anything whose [`typeof`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/typeof) returns `\"function\"`)\n- [`Error`](../../../globals/Error/Error.mdx)\n- [`Boolean`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)\n- [`Number`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)\n- [`String`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\n- [`Date`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date)\n- [`RegExp`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp)\n\nThe [`arguments`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/arguments) object returns `\"[object Arguments]\"`. Everything else, including user-defined classes, unless with a custom `Symbol.toStringTag`, will return `\"[object Object]\"`.\n\n`Object.prototype.toString()` invoked on [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) returns `[object Null]` and `[object Undefined]`, respectively.\n"
  },
  {
    "path": "documentation/docs/globals/Object/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.valueOf()\n\nThe **`valueOf()`** method of `Object` converts the `this` value [to an object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#object_coercion). This method is meant to be overridden by derived objects for custom [type conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) logic.\n\n\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nThe `this` value, converted to an object.\n\n> **Note:** In order for `valueOf` to be useful during type conversion, it must return a primitive. Because all primitive types have their own `valueOf()` methods, calling `aPrimitiveValue.valueOf()` generally does not invoke `Object.prototype.valueOf()`.\n\n## Description\n\nJavaScript calls the `valueOf` method to [convert an object to a primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion). You rarely need to invoke the `valueOf` method yourself; JavaScript automatically invokes it when encountering an object where a primitive value is expected.\n\nThis method is called in priority by [numeric conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#numeric_coercion) and [primitive conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion), but [string conversion](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) calls `toString()` in priority, and `toString()` is very likely to return a string value (even for the [`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx) base implementation), so `valueOf()` is usually not called in this case.\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `toString()` method. The `Object.prototype.valueOf()` base implementation is deliberately useless: by returning an object, its return value will never be used by any [primitive conversion algorithm](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion). Many built-in objects override this method to return an appropriate primitive value. When you create a custom object, you can override `valueOf()` to call a custom method, so that your custom object can be converted to a primitive value. Generally, `valueOf()` is used to return a value that is most meaningful for the object — unlike `toString()`, it does not need to be a string. Alternatively, you can add a [`Symbol.toPrimitive`](../../../globals/Symbol/toPrimitive.mdx) method, which allows even more control over the conversion process, and will always be preferred over `valueOf` or `toString` for any type conversion.\n"
  },
  {
    "path": "documentation/docs/globals/Object/seal.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.seal()\n\nThe **`Object.seal()`** method _seals_ an object. Sealing an object [prevents extensions](../../globals/Object/preventExtensions.mdx) and makes existing properties non-configurable. A sealed object has a fixed set of properties: new properties cannot be added, existing properties cannot be removed, their enumerability and configurability cannot be changed, and its prototype cannot be re-assigned. Values of existing properties can still be changed as long as they are writable. `seal()` returns the same object that was passed in.\n\n## Syntax\n\n```js\nObject.seal(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be sealed.\n\n### Return value\n\nThe object being sealed.\n\n## Description\n\nSealing an object is equivalent to [preventing extensions](../../globals/Object/preventExtensions.mdx) and then changing all existing properties' descriptors to `configurable: false`. This has the effect of making the set of properties on the object fixed. Making all properties non-configurable\nalso prevents them from being converted from data properties to accessor properties and\nvice versa, but it does not prevent the values of data properties from being changed.\nAttempting to delete or add properties to a sealed object, or to convert a data property\nto accessor or vice versa, will fail, either silently or by throwing a\n[`TypeError`](../../globals/TypeError/TypeError.mdx) (most commonly, although not exclusively, when in \"strict mode\" code).\n\nThe prototype chain remains untouched. However, due to the effect of [preventing extensions](../../globals/Object/preventExtensions.mdx), the `[[Prototype]]` cannot be reassigned.\n\nUnlike [`Object.freeze()`](../../globals/Object/freeze.mdx), objects sealed with `Object.seal()` may have their existing\nproperties changed, as long as they are writable.\n"
  },
  {
    "path": "documentation/docs/globals/Object/setPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.setPrototypeOf()\n\nThe **`Object.setPrototypeOf()`** method sets the prototype (i.e., the internal `[[Prototype]]` property) of a specified object to another object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null).\n\n> **Warning:** Changing the `[[Prototype]]` of an object is, by the nature of how modern JavaScript engines optimize property accesses, currently a very slow operation in every browser and JavaScript engine. In addition, the effects of altering inheritance are subtle and far-flung, and are not limited to the time spent in the `Object.setPrototypeOf(...)` statement, but may extend to **_any_** code that has access to any object whose `[[Prototype]]` has been altered. You can read more in [JavaScript engine fundamentals: optimizing prototypes](https://mathiasbynens.be/notes/prototypes).\n>\n> Because this feature is a part of the language, it is still the burden on engine developers to implement that feature performantly (ideally). Until engine developers address this issue, if you are concerned about performance, you should avoid setting the `[[Prototype]]` of an object. Instead, create a new object with the desired `[[Prototype]]` using [`Object.create()`](../../globals/Object/create.mdx).\n\n## Syntax\n\n```js\nObject.setPrototypeOf(obj, prototype)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which is to have its prototype set.\n- `prototype`\n  - : The object's new prototype (an object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null)).\n\n### Return value\n\nThe specified object.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if one of the following conditions is met:\n    - The `obj` parameter is [non-extensible](../../globals/Object/isExtensible.mdx), or it's an [immutable prototype exotic object](https://tc39.es/ecma262/#sec-immutable-prototype-exotic-objects), such as `Object.prototype`.\n    - The `prototype` parameter is not an object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null).\n\n## Description\n\n`Object.setPrototypeOf()` is generally considered the proper way to set the prototype of an object.\n\nIf the `obj` parameter is not an object (e.g. number, string, etc.), this method does nothing.\n\nFor security concerns, there are certain built-in objects that are designed to have an _immutable prototype_. This prevents prototype pollution attacks, especially [proxy-related ones](https://github.com/tc39/ecma262/issues/272). The core language only specifies `Object.prototype` as an immutable prototype exotic object, whose prototype is always `null`.\n\n```js\nObject.isExtensible(Object.prototype); // true; you can add more properties\nObject.setPrototypeOf(Object.prototype, {}); // TypeError: Immutable prototype object '#<Object>' cannot have their prototype set\n```\n"
  },
  {
    "path": "documentation/docs/globals/Object/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.values()\n\nThe **`Object.values()`** method returns an array of a given object's own enumerable string-keyed property values.\n\n## Syntax\n\n```js\nObject.values(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : An object.\n\n### Return value\n\nAn array containing the given object's own enumerable string-keyed property values.\n\n## Description\n\n`Object.values()` returns an array whose elements are strings corresponding to the enumerable string-keyed property values found directly upon `object`. This is the same as iterating with a `for...in` loop, except that a `for...in` loop enumerates properties in the prototype chain as well. The order of the array returned by `Object.values()` is the same as that provided by a `for...in` loop.\n\nIf you need the property keys, use [`Object.keys()`](../../globals/Object/keys.mdx) instead. If you need both the property keys and values, use [`Object.entries()`](../../globals/Object/entries.mdx) instead.\n"
  },
  {
    "path": "documentation/docs/globals/Promise/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get Promise[Symbol.species]\n\nThe **`Promise[Symbol.species]`** accessor property returns the constructor used to construct return values from promise methods.\n\n> **Warning:** The existence of `Symbol.species` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Syntax\n\n```js\nPromise[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct return values from promise chaining methods that create new promises.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `Promise` objects. Subclass constructors may override it to change the constructor assignment. The default implementation is basically:\n\n```js\n// Hypothetical underlying implementation for illustration\nclass Promise {\n  static get [Symbol.species]() {\n    return this;\n  }\n}\n```\n\nBecause of this polymorphic implementation, `Symbol.species` of derived subclasses would also return the constructor itself by default.\n\n```js\nclass SubPromise extends Promise {}\nSubPromise[Symbol.species] === Promise; // true\n```\n\nPromise chaining methods — [`then()`](../../globals/Promise/prototype/then.mdx), [`finally()`](../../globals/Promise/prototype/finally.mdx) — return new promise objects. They get the constructor to construct the new promise through `this.constructor[Symbol.species]`. If `this.constructor` is `undefined`, or if `this.constructor[Symbol.species]` is `undefined` or `null`, the default [`Promise()`](../../globals/Promise/Promise.mdx) constructor is used. Otherwise, the constructor returned by `this.constructor[Symbol.species]` is used to construct the new promise object.\n"
  },
  {
    "path": "documentation/docs/globals/Promise/Promise.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise()\n\nThe **`Promise()`** constructor is primarily used to wrap functions that do not already support promises.\n\n## Syntax\n\n```js\nnew Promise(executor)\n```\n\n> **Note:** `Promise()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `executor`\n  - : A `function` to be executed by the constructor. It receives two functions as parameters: `resolveFunc` and `rejectFunc`. Any errors thrown in the `executor` will cause the promise to be rejected, and the return value will be neglected. The semantics of `executor` are detailed below.\n\n### Return value\n\nWhen called via `new`, the `Promise` constructor returns a promise object. The promise object will become _resolved_ when either of the functions `resolveFunc` or `rejectFunc` are invoked. Note that if you call `resolveFunc` or `rejectFunc` and pass another `Promise` object as an argument, it can be said to be \"resolved\", but still not \"settled\". See the [Promise description](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#description) for more explanation.\n\n## Description\n\nTraditionally (before promises), asynchronous tasks were designed as callbacks.\n\n```js\nreadFile(\"./data.txt\", (error, result) => {\n  // This callback will be called when the task is done, with the\n  // final `error` or `result`. Any operation dependent on the\n  // result must be defined within this callback.\n});\n// Code here is immediately executed after the `readFile` request\n// is fired. It does not wait for the callback to be called, hence\n// making `readFile` \"asynchronous\".\n```\n\nTo take advantage of the readability improvement and language features offered by promises, the `Promise()` constructor allows one to transform the callback-based API to a promise-based one.\n\n> **Note:** If your task is already promise-based, you likely do not need the `Promise()` constructor.\n\nThe `executor` is custom code that ties an outcome in a callback to a promise. You, the programmer, write the `executor`. Its signature is expected to be:\n\n```js\nfunction executor(resolveFunc, rejectFunc) {\n  // Typically, some asynchronous operation that accepts a callback,\n  // like the `readFile` function above\n}\n```\n\n`resolveFunc` and `rejectFunc` are also functions, and you can give them whatever actual names you want. Their signatures are simple: they accept a single parameter of any type.\n\n```js\nresolveFunc(value); // call on resolved\nrejectFunc(reason); // call on rejected\n```\n\nThe `value` parameter passed to `resolveFunc` can be another promise object, in which case the newly constructed promise's state will be \"locked in\" to the promise passed (as part of the [resolution](#resolver-function) promise). The `rejectFunc` has semantics close to the [`throw`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/throw) statement, so `reason` is typically an [`Error`](../../globals/Error/Error.mdx) instance. If either `value` or `reason` is omitted, the promise is fulfilled/rejected with `undefined`.\n\nThe `executor`'s completion state has limited effect on the promise's state:\n\n- The `executor` return value is ignored. `return` statements within the `executor` merely impact control flow and alter whether a part of the function is executed, but do not have any impact on the promise's fulfillment value. If `executor` exits and it's impossible for `resolveFunc` or `rejectFunc` to be called in the future (for example, there are no async tasks scheduled), then the promise remains pending forever.\n- If an error is thrown in the `executor`, the promise is rejected, unless `resolveFunc` or `rejectFunc` has already been called.\n\n> **Note:** The existence of pending promises does not prevent the program from exiting. If the event loop is empty, the program exits despite any pending promises (because those are necessarily forever-pending).\n\nHere's a summary of the typical flow:\n\n1. At the time when the constructor generates the new `Promise` object, it also generates a corresponding pair of functions for `resolveFunc` and `rejectFunc`; these are \"tethered\" to the `Promise` object.\n2. `executor` typically wraps some asynchronous operation which provides a callback-based API. The callback (the one passed to the original callback-based API) is defined within the `executor` code, so it has access to the `resolveFunc` and `rejectFunc`.\n3. The `executor` is called synchronously (as soon as the `Promise` is constructed) with the `resolveFunc` and `rejectFunc` functions as arguments.\n4. The code within the `executor` has the opportunity to perform some operation. The eventual completion of the asynchronous task is communicated with the promise instance via the side effect caused by `resolveFunc` or `rejectFunc`. The side effect is that the `Promise` object becomes \"resolved\".\n   - If `resolveFunc` is called first, the value passed will be [resolved](#resolver-function). The promise may stay pending (in case another [thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) is passed), become fulfilled (in most cases where a non-thenable value is passed), or become rejected (in case of an invalid resolution value).\n   - If `rejectFunc` is called first, the promise instantly becomes rejected.\n   - Once one of the resolving functions (`resolveFunc` or `rejectFunc`) is called, the promise stays resolved. Only the first call to `resolveFunc` or `rejectFunc` affects the promise's eventual state, and subsequent calls to either function can neither change the fulfillment value/rejection reason nor toggle its eventual state from \"fulfilled\" to \"rejected\" or opposite.\n   - If `executor` exits by throwing an error, then the promise is rejected. However, the error is ignored if one of the resolving functions has already been called (so that the promise is already resolved).\n   - Resolving the promise does not necessarily cause the promise to become fulfilled or rejected (i.e. settled). The promise may still be pending because it's resolved with another thenable, but its eventual state will match that of the resolved thenable.\n5. Once the promise settles, it (asynchronously) invokes any further handlers associated through [`Promise.prototype.then`](../../globals/Promise/prototype/then.mdx), [`Promise.prototype.catch`](../../globals/Promise/prototype/catch.mdx), or [`Promise.prototype.finally`](../../globals/Promise/prototype/finally.mdx). The eventual fulfillment value or rejection reason is passed to the invocation of fulfillment and rejection handlers as an input parameter (see [Chained Promises](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#chained_promises)).\n\nFor example, the callback-based `readFile` API above can be transformed into a promise-based one.\n\n```js\nconst readFilePromise = (path) =>\n  new Promise((resolve, reject) => {\n    readFile(path, (error, result) => {\n      if (error) {\n        reject(error);\n      } else {\n        resolve(result);\n      }\n    });\n  });\n\nreadFilePromise(\"./data.txt\")\n  .then((result) => console.log(result))\n  .catch((error) => console.error(\"Failed to read data\"));\n```\n\n### Resolver function\n\nThe resolver function `resolveFunc` has the following behaviors:\n\n- If it's called with the same value as the newly created promise (the promise it's \"tethered to\"), the promise is rejected with a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n- If it's called with a non-[thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) value (a primitive, or an object whose `then` property is not callable, including when the property is not present), the promise is immediately fulfilled with that value.\n- If it's called with a thenable value (including another `Promise` instance), then the thenable's `then` method is saved and called in the future (it's always called asynchronously). The `then` method will be called with two callbacks, which are two new functions with the exact same behaviors as the `resolveFunc` and `rejectFunc` passed to the `executor` function. If calling the `then` method throws, then the current promise is rejected with the thrown error.\n\nIn the last case, it means code like:\n\n```js\nnew Promise((resolve, reject) => {\n  resolve(thenable);\n});\n```\n\nIs roughly equivalent to:\n\n```js\nnew Promise((resolve, reject) => {\n  try {\n    thenable.then(\n      (value) => resolve(value),\n      (reason) => reject(reason),\n    );\n  } catch (e) {\n    reject(e);\n  }\n});\n```\n\nExcept that in the `resolve(thenable)` case:\n\n1. `resolve` is called synchronously, so that calling `resolve` or `reject` again has no effect, even when the handlers attached through `anotherPromise.then()` are not called yet.\n2. The `then` method is called asynchronously, so that the promise will never be instantly resolved if a thenable is passed.\n\nBecause `resolve` is called again with whatever `thenable.then()` passes to it as `value`, the resolver function is able to flatten nested thenables, where a thenable calls its `onFulfilled` handler with another thenable. The effect is that the fulfillment handler of a real promise will never receive a thenable as its fulfillment value.\n"
  },
  {
    "path": "documentation/docs/globals/Promise/all.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.all()\n\nThe **`Promise.all()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise fulfills when all of the input's promises fulfill (including when an empty iterable is passed), with an array of the fulfillment values. It rejects when any of the input's promises rejects, with this first rejection reason.\n\n## Syntax\n\n```js\nPromise.all(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array` of promises.\n\n### Return value\n\nA `Promise` that is:\n\n- **Already fulfilled**, if the `iterable` passed is empty.\n- **Asynchronously fulfilled**, when all the promises in the given `iterable` fulfill. The fulfillment value is an array of fulfillment values, in the order of the promises passed, regardless of completion order. If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) fulfilled.\n- **Asynchronously rejected**, when any of the promises in the given `iterable` rejects. The rejection reason is the rejection reason of the first promise that was rejected.\n\n## Description\n\nThe `Promise.all()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. It can be useful for aggregating the results of multiple promises. It is typically used when there are multiple related asynchronous tasks that the overall code relies on to work successfully — all of whom we want to fulfill before the code execution continues.\n\n`Promise.all()` will reject immediately upon **any** of the input promises rejecting. In comparison, the promise returned by [`Promise.allSettled()`](../../globals/Promise/allSettled.mdx) will wait for all input promises to complete, regardless of whether or not one rejects. Use `allSettled()` if you need the final result of every promise in the input iterable.\n"
  },
  {
    "path": "documentation/docs/globals/Promise/allSettled.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.allSettled()\n\nThe **`Promise.allSettled()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise fulfills when all of the input's promises settle (including when an empty iterable is passed), with an array of objects that describe the outcome of each promise.\n\n## Syntax\n\n```js\nPromise.allSettled(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array` of promises.\n\n### Return value\n\nA `Promise` that is:\n\n- **Already fulfilled**, if the `iterable` passed is empty.\n- **Asynchronously fulfilled**, when all promise in the given `iterable` have settled (either fulfilled or rejected). The fulfillment value is an array of objects, each describing the outcome of one promise in the `iterable`, in the order of the promises passed, regardless of completion order. Each outcome object has the following properties:\n\n  - `status`\n    - : A string, either `\"fulfilled\"` or `\"rejected\"`, indicating the eventual state of the promise.\n  - `value`\n    - : Only present if `status` is `\"fulfilled\"`. The value that the promise was fulfilled with.\n  - `reason`\n    - : Only present if `status` is `\"rejected\"`. The reason that the promise was rejected with.\n\n  If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) fulfilled.\n\n## Description\n\nThe `Promise.allSettled()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. `Promise.allSettled()` is typically used when you have multiple asynchronous tasks that are not dependent on one another to complete successfully, or you'd always like to know the result of each promise.\n\nIn comparison, the Promise returned by [`Promise.all()`](../../globals/Promise/all.mdx) may be more appropriate if the tasks are dependent on each other, or if you'd like to immediately reject upon any of them rejecting.\n"
  },
  {
    "path": "documentation/docs/globals/Promise/any.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.any()\n\nThe **`Promise.any()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise fulfills when any of the input's promises fulfills, with this first fulfillment value. It rejects when all of the input's promises reject (including when an empty iterable is passed), with an `AggregateError` containing an array of rejection reasons.\n\n## Syntax\n\n```js\nPromise.any(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array` of promises.\n\n### Return value\n\nA `Promise` that is:\n\n- **Already rejected**, if the `iterable` passed is empty.\n- **Asynchronously fulfilled**, when any of the promises in the given `iterable` fulfills. The fulfillment value is the fulfillment value of the first promise that was fulfilled.\n- **Asynchronously rejected**, when all of the promises in the given `iterable` reject. The rejection reason is an `AggregateError` containing an array of rejection reasons in its `errors` property. The errors are in the order of the promises passed, regardless of completion order. If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) rejected.\n\n## Description\n\nThe `Promise.any()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. This method is useful for returning the first promise that fulfills. It short-circuits after a promise fulfills, so it does not wait for the other promises to complete once it finds one.\n\nUnlike [`Promise.all()`](../../globals/Promise/all.mdx), which returns an _array_ of fulfillment values, we only get one fulfillment value (assuming at least one promise fulfills). This can be beneficial if we need only one promise to fulfill but we do not care which one does. Note another difference: this method rejects upon receiving an _empty iterable_, since, truthfully, the iterable contains no items that fulfill. You may compare `Promise.any()` and `Promise.all()` with [`Array.prototype.some()`](../../globals/Array/prototype/some.mdx) and [`Array.prototype.every()`](../../globals/Array/prototype/every.mdx).\n\nAlso, unlike [`Promise.race()`](../../globals/Promise/race.mdx), which returns the first _settled_ value (either fulfillment or rejection), this method returns the first _fulfilled_ value. This method ignores all rejected promises up until the first promise that fulfills.\n"
  },
  {
    "path": "documentation/docs/globals/Promise/prototype/catch.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.prototype.catch()\n\nThe **`catch()`** method of a `Promise` object schedules a function to be called when the promise is rejected. It immediately returns an equivalent `Promise` object, allowing you to [chain](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining) calls to other promise methods. It is a shortcut for [`Promise.prototype.then(undefined, onRejected)`](../../../globals/Promise/prototype/then.mdx).\n\n## Syntax\n\n```js\ncatch(onRejected)\n\ncatch((reason) => {\n  // rejection handler\n})\n```\n\n### Parameters\n\n- `onRejected`\n  - : A `Function` called when the `Promise` is rejected. This function has one parameter: the _rejection reason_.\n\n### Return value\n\nReturns a new `Promise`. This new promise is always pending when returned, regardless of the current promise's status. It's eventually rejected if `onRejected` throws an error or returns a Promise which is itself rejected; otherwise, it's eventually fulfilled.\n\n## Description\n\nThe `catch` method is used for error handling in promise composition. Since it returns a `Promise`, it [can be chained](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining_after_a_catch) in the same way as its sister method, [`Promise.prototype.then()`](../../../globals/Promise/prototype/then.mdx).\n\nIf a promise becomes rejected, and there are no rejection handlers to call (a handler can be attached through any of [`Promise.prototype.then`](../../../globals/Promise/prototype/then.mdx), [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx), or [`Promise.prototype.finally`](../../../globals/Promise/prototype/finally.mdx)), then the rejection event is surfaced by the host. In the browser, this results in an [`unhandledrejection`](https://developer.mozilla.org/docs/Web/API/Window/unhandledrejection_event) event. If a handler is attached to a rejected promise whose rejection has already caused an unhandled rejection event, then another [`rejectionhandled`](https://developer.mozilla.org/docs/Web/API/Window/rejectionhandled_event) event is fired.\n\n`catch()` internally calls `then()` on the object upon which it was called, passing `undefined` and `onRejected` as arguments. The value of that call is directly returned. This is observable if you wrap the methods.\n\n```js\n// overriding original Promise.prototype.then/catch just to add some logs\n((Promise) => {\n  const originalThen = Promise.prototype.then;\n  const originalCatch = Promise.prototype.catch;\n\n  Promise.prototype.then = function (...args) {\n    console.log(\"Called .then on %o with arguments: %o\", this, args);\n    return originalThen.apply(this, args);\n  };\n  Promise.prototype.catch = function (...args) {\n    console.error(\"Called .catch on %o with arguments: %o\", this, args);\n    return originalCatch.apply(this, args);\n  };\n})(Promise);\n\n// calling catch on an already resolved promise\nPromise.resolve().catch(function XXX() {});\n\n// Logs:\n// Called .catch on Promise{} with arguments: Arguments{1} [0: function XXX()]\n// Called .then on Promise{} with arguments: Arguments{2} [0: undefined, 1: function XXX()]\n```\n\nThis means that passing `undefined` still causes the returned promise to be rejected, and you have to pass a function to prevent the final promise from being rejected.\n\nBecause `catch()` just calls `then()`, it supports subclassing.\n\n> **Note:** The examples below are throwing instances of [`Error`](../../../globals/Error/Error.mdx). As with synchronous [`throw`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/throw) statements, this is considered a good practice; otherwise, the part doing the catching would have to perform checks to see if the argument was a string or an error, and you might lose valuable information such as stack traces.\n"
  },
  {
    "path": "documentation/docs/globals/Promise/prototype/finally.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.prototype.finally()\n\nThe **`finally()`** method of a `Promise` object schedules a function to be called when the promise is settled (either fulfilled or rejected). It immediately returns an equivalent `Promise` object, allowing you to [chain](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining) calls to other promise methods.\n\nThis lets you avoid duplicating code in both the promise's [`Promise.prototype.then`](../../../globals/Promise/prototype/then.mdx) and [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx) handlers.\n\n## Syntax\n\n```js\nfinally(onFinally)\n\nfinally(() => {\n  // Code that will run after promise is settled (fulfilled or rejected)\n})\n```\n\n### Parameters\n\n- `onFinally`\n  - : A `Function` called when the `Promise` is settled. This handler receives no parameters.\n\n### Return value\n\nReturns an equivalent `Promise`. If the handler throws an error or returns a rejected promise, the promise returned by `finally()` will be rejected with that value instead. Otherwise, the return value of the handler does not affect the state of the original promise.\n\n## Description\n\nThe `finally()` method can be useful if you want to do some processing or cleanup once the promise is settled, regardless of its outcome.\n\nThe `finally()` method is very similar to calling [`then(onFinally, onFinally)`](../../../globals/Promise/prototype/then.mdx). However, there are a couple of differences:\n\n- When creating a function inline, you can pass it once, instead of being forced to either declare it twice, or create a variable for it.\n- The `onFinally` callback does not receive any argument. This use case is for precisely when you _do not care_ about the rejection reason or the fulfillment value, and so there's no need to provide it.\n- A `finally()` call is usually transparent and does not change the eventual state of the original promise. So for example:\n  - Unlike `Promise.resolve(2).then(() => 77, () => {})`, which returns a promise eventually fulfilled with the value `77`, `Promise.resolve(2).finally(() => 77)` returns a promise eventually fulfilled with the value `2`.\n  - Similarly, unlike `Promise.reject(3).then(() => {}, () => 88)`, which returns a promise eventually fulfilled with the value `88`, `Promise.reject(3).finally(() => 88)` returns a promise eventually rejected with the reason `3`.\n\n> **Note:** A `throw` (or returning a rejected promise) in the `finally` callback still rejects the returned promise. For example, both `Promise.reject(3).finally(() => { throw 99; })` and `Promise.reject(3).finally(() => Promise.reject(99))` reject the returned promise with the reason `99`.\n\nLike [`Promise.prototype.catch()`](../../../globals/Promise/prototype/catch.mdx), `finally()` internally calls the `then` method on the object upon which it was called. If `onFinally` is not a function, `then()` is called with `onFinally` as both arguments — which, for [`Promise.prototype.then()`](../../../globals/Promise/prototype/then.mdx), means that no useful handler is attached. Otherwise, `then()` is called with two internally created functions, which behave like the following:\n\n> **Warning:** This is only for demonstration purposes and is not a polyfill.\n\n```js\npromise.then(\n  (value) => Promise.resolve(onFinally()).then(() => value),\n  (reason) =>\n    Promise.resolve(onFinally()).then(() => {\n      throw reason;\n    }),\n);\n```\n\nBecause `finally()` calls `then()`, it supports subclassing. Moreover, notice the [`Promise.resolve()`](../../../globals/Promise/resolve.mdx) call above — in reality, `onFinally()`'s return value is resolved using the same algorithm as `Promise.resolve()`, but the actual constructor used to construct the resolved promise will be the subclass. `finally()` gets this constructor through [`promise.constructor[Symbol.species]`](../../../globals/Promise/@@species.mdx).\n"
  },
  {
    "path": "documentation/docs/globals/Promise/prototype/then.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.prototype.then()\n\nThe **`then()`** method of a `Promise` object takes up to two arguments: callback functions for the fulfilled and rejected cases of the `Promise`. It immediately returns an equivalent `Promise` object, allowing you to [chain](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining) calls to other promise methods.\n\n## Syntax\n\n```js\nthen(onFulfilled)\nthen(onFulfilled, onRejected)\n\nthen(\n  (value) => { /* fulfillment handler */ },\n  (reason) => { /* rejection handler */ },\n)\n```\n\n### Parameters\n\n- `onFulfilled` _**optional**_\n  - : A `Function` asynchronously called if the `Promise` is fulfilled. This function has one parameter, the _fulfillment value_. If it is not a function, it is internally replaced with an _identity_ function (`(x) => x`) which simply passes the fulfillment value forward.\n- `onRejected` _**optional**_\n  - : A `Function` asynchronously called if the `Promise` is rejected. This function has one parameter, the _rejection reason_. If it is not a function, it is internally replaced with a _thrower_ function (`(x) => { throw x; }`) which throws the rejection reason it received.\n\n### Return value\n\nReturns a new `Promise` immediately. This new promise is always pending when returned, regardless of the current promise's status.\n\nOne of the `onFulfilled` and `onRejected` handlers will be executed to handle the current promise's fulfillment or rejection. The call always happens asynchronously, even when the current promise is already settled. The behavior of the returned promise (call it `p`) depends on the handler's execution result, following a specific set of rules. If the handler function:\n\n- returns a value: `p` gets fulfilled with the returned value as its value.\n- doesn't return anything: `p` gets fulfilled with `undefined`.\n- throws an error: `p` gets rejected with the thrown error as its value.\n- returns an already fulfilled promise: `p` gets fulfilled with that promise's value as its value.\n- returns an already rejected promise: `p` gets rejected with that promise's value as its value.\n- returns another pending promise: the fulfillment/rejection of the promise returned by `then` will be subsequent to the resolution/rejection of the promise returned by the handler. Also, the resolved value of the promise returned by `then` will be the same as the resolved value of the promise returned by the handler.\n\n## Description\n\nThe `then()` method schedules callback functions for the eventual completion of a Promise — either fulfillment or rejection. It is the primitive method of promises: the [thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) protocol expects all promise-like objects to expose a `then()` method, and the [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx) and [`Promise.prototype.finally`](../../../globals/Promise/prototype/finally.mdx) methods both work by invoking the object's `then()` method.\n\nFor more information about the `onRejected` handler, see the [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx) reference.\n\n`then()` returns a new promise object. If you call the `then()` method twice on the same promise object (instead of chaining), then this promise object will have two pairs of settlement handlers. All handlers attached to the same promise object are always called in the order they were added. Moreover, the two promises returned by each call of `then()` start separate chains and do not wait for each other's settlement.\n\n[Thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) objects that arise along the `then()` chain are always [resolved](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise/Promise#the_resolver_function) — the `onFulfilled` handler never receives a thenable object, and any thenable returned by either handler are always resolved before being passed to the next handler. This is because when constructing the new promise, the `resolve` and `reject` functions passed by the `executor` are saved, and when the current promise settles, the respective function will be called with the fulfillment value or rejection reason. The resolving logic comes from the resolver function passed by the [`Promise()`](../../../globals/Promise/Promise.mdx) constructor.\n\n`then()` supports subclassing, which means it can be called on instances of subclasses of `Promise`, and the result will be a promise of the subclass type. You can customize the type of the return value through the [`[Symbol.species]`](../../../globals/Promise/@@species.mdx) property.\n"
  },
  {
    "path": "documentation/docs/globals/Promise/race.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.race()\n\nThe **`Promise.race()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise settles with the eventual state of the first promise that settles.\n\n## Syntax\n\n```js\nPromise.race(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array`) of promises.\n\n### Return value\n\nA `Promise` that **asynchronously settles** with the eventual state of the first promise in the `iterable` to settle. In other words, it fulfills if the first promise to settle is fulfilled, and rejects if the first promise to settle is rejected. The returned promise remains pending forever if the `iterable` passed is empty. If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) settled.\n\n## Description\n\nThe `Promise.race()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. It's useful when you want the first async task to complete, but do not care about its eventual state (i.e. it can either succeed or fail).\n\nIf the iterable contains one or more non-promise values and/or an already settled promise, then `Promise.race()` will settle to the first of these values found in the iterable.\n"
  },
  {
    "path": "documentation/docs/globals/Promise/reject.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.reject()\n\nThe **`Promise.reject()`** method returns a `Promise` object that is rejected with a given reason.\n\n## Syntax\n\n```js\nPromise.reject(reason)\n```\n\n### Parameters\n\n- `reason`\n  - : Reason why this `Promise` rejected.\n\n### Return value\n\nA `Promise` that is rejected with the given reason.\n\n## Description\n\nThe static `Promise.reject` function returns a `Promise` that is rejected. For debugging purposes and selective error catching, it is useful to make `reason` an `instanceof` [`Error`](../../globals/Error/Error.mdx).\n\n`Promise.reject()` is generic and supports subclassing, which means it can be called on subclasses of `Promise`, and the result will be a promise of the subclass type. To do so, the subclass's constructor must implement the same signature as the [`Promise()`](../../globals/Promise/Promise.mdx) constructor — accepting a single `executor` function that can be called with the `resolve` and `reject` callbacks as parameters. `Promise.reject()` is essentially a shorthand for `new Promise((resolve, reject) => reject(reason))`.\n\nUnlike [`Promise.resolve()`](../../globals/Promise/resolve.mdx), `Promise.reject()` always wraps `reason` in a new `Promise` object, even when `reason` is already a `Promise`.\n"
  },
  {
    "path": "documentation/docs/globals/Promise/resolve.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.resolve()\n\nThe **`Promise.resolve()`** method \"resolves\" a given value to a `Promise`. If the value is a promise, that promise is returned; if the value is a [thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables), `Promise.resolve()` will call the `then()` method with two callbacks it prepared; otherwise the returned promise will be fulfilled with the value.\n\nThis function flattens nested layers of promise-like objects (e.g. a promise that fulfills to a promise that fulfills to something) into a single layer — a promise that fulfills to a non-thenable value.\n\n## Syntax\n\n```js\nPromise.resolve(value)\n```\n\n### Parameters\n\n- `value`\n  - : Argument to be resolved by this `Promise`. Can also be a `Promise` or a thenable to resolve.\n\n### Return value\n\nA `Promise` that is resolved with the given value, or the promise passed as value, if the value was a promise object. A resolved promise can be in any of the states — fulfilled, rejected, or pending. For example, resolving a rejected promise will still result in a rejected promise.\n\n## Description\n\n`Promise.resolve()` _resolves_ a promise, which is not the same as fulfilling or rejecting the promise. See [Promise description](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#description) for definitions of the terminology. In brief, `Promise.resolve()` returns a promise whose eventual state depends on another promise, thenable object, or other value.\n\n`Promise.resolve()` is generic and supports subclassing, which means it can be called on subclasses of `Promise`, and the result will be a promise of the subclass type. To do so, the subclass's constructor must implement the same signature as the [`Promise()`](../../globals/Promise/Promise.mdx) constructor — accepting a single `executor` function that can be called with the `resolve` and `reject` callbacks as parameters.\n\n`Promise.resolve()` special-cases native `Promise` instances. If `value` belongs to `Promise` or a subclass, and `value.constructor === Promise`, then `value` is directly returned by `Promise.resolve()`, without creating a new `Promise` instance. Otherwise, `Promise.resolve()` is essentially a shorthand for `new Promise((resolve) => resolve(value))`.\n\nThe bulk of the resolving logic is actually implemented by the [resolver function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise/Promise#the_resolver_function) passed by the `Promise()` constructor. In summary:\n\n- If a non-[thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) value is passed, the returned promise is already fulfilled with that value.\n- If a thenable is passed, the returned promise will adopt the state of that thenable by calling the `then` method and passing a pair of resolving functions as arguments. (But because native promises directly pass through `Promise.resolve()` without creating a wrapper, the `then` method is not called on native promises.) If the resolver function receives another thenable object, it will be resolved agin, so that the eventual fulfillment value of the promise will never be thenable.\n"
  },
  {
    "path": "documentation/docs/globals/Proxy/Proxy.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Proxy()\n\nThe **`Proxy()`** constructor is used to create `Proxy` objects.\n\n## Syntax\n\n```js\nnew Proxy(target, handler)\n```\n\n> **Note:** `Proxy()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `target`\n  - : A target object to wrap with `Proxy`. It can be any sort of object,\n    including a native array, a function, or even another proxy.\n- `handler`\n  - : An object whose properties are functions that define the behavior of the proxy when\n    an operation is performed on it.\n\n## Description\n\nUse the `Proxy()` constructor to create a new `Proxy` object.\nThis constructor takes two mandatory arguments:\n\n- `target` is the object for which you want to create the proxy\n- `handler` is the object that defines the custom behavior of the proxy.\n\nAn empty handler will create a proxy that behaves, in almost all respects, exactly like\nthe target. By defining any of a set group of functions on the `handler`\nobject, you can customize specific aspects of the proxy's behavior. For example, by\ndefining `get()` you can provide a customized version of the target's\n[property accessor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Property_Accessors).\n\n### Handler functions\n\nThis section lists all the handler functions you can define. Handler functions are\nsometimes called _traps_, because they trap calls to the underlying target\nobject.\n\n- [`handler.apply()`](../../globals/Proxy/proxy/apply.mdx)\n  - : A trap for a function call.\n- [`handler.construct()`](../../globals/Proxy/proxy/construct.mdx)\n  - : A trap for the `new` operator.\n- [`handler.defineProperty()`](../../globals/Proxy/proxy/defineProperty.mdx)\n  - : A trap for [`Object.defineProperty`](../../globals/Object/defineProperty.mdx).\n- [`handler.deleteProperty()`](../../globals/Proxy/proxy/deleteProperty.mdx)\n  - : A trap for the `delete` operator.\n- [`handler.get()`](../../globals/Proxy/proxy/get.mdx)\n  - : A trap for getting property values.\n- [`handler.getOwnPropertyDescriptor()`)}](../../globals/Proxy/proxy/getOwnPropertyDescriptor.mdx)\n  - : A trap for [`Object.getOwnPropertyDescriptor`](../../globals/Object/getOwnPropertyDescriptor.mdx).\n- [`handler.getPrototypeOf()`](../../globals/Proxy/proxy/getPrototypeOf.mdx)\n  - : A trap for [`Object.getPrototypeOf()`](../../globals/Object/getPrototypeOf.mdx).\n- [`handler.has()`](../../globals/Proxy/proxy/has.mdx)\n  - : A trap for the `in` operator.\n- [`handler.isExtensible()`](../../globals/Proxy/proxy/isExtensible.mdx)\n  - : A trap for [`Object.isExtensible()`](../../globals/Object/isExtensible.mdx).\n- [`handler.ownKeys()`](../../globals/Proxy/proxy/ownKeys.mdx)\n  - : A trap for [`Object.getOwnPropertyNames()`](../../globals/Object/getOwnPropertyNames.mdx) and\n    [`Object.getOwnPropertySymbols()`](../../globals/Object/getOwnPropertySymbols.mdx).\n- [`handler.preventExtensions()`)}](../../globals/Proxy/proxy/preventExtensions.mdx)\n  - : A trap for [`Object.preventExtensions()`](../../globals/Object/preventExtensions.mdx).\n- [`handler.set()`](../../globals/Proxy/proxy/set.mdx)\n  - : A trap for setting property values.\n- [`handler.setPrototypeOf()`](../../globals/Proxy/proxy/setPrototypeOf.mdx)\n  - : A trap for [`Object.setPrototypeOf()`](../../globals/Object/setPrototypeOf.mdx).\n"
  },
  {
    "path": "documentation/docs/globals/Proxy/proxy/apply.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.apply()\n\nThe **`handler.apply()`** method is a trap for a function call.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  apply(target, thisArg, argumentsList) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `apply()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target callable object.\n- `thisArg`\n  - : The `this` argument for the call.\n- `argumentsList`\n  - : The list of arguments for the call.\n\n### Return value\n\nThe `apply()` method can return any value.\n\n## Description\n\nThe **`handler.apply()`** method is a trap for a function call.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- Function call: `proxy(...args)`\n- [`Function.prototype.apply()`](../../../globals/Function/prototype/apply.mdx) and [`Function.prototype.call()`](../../../globals/Function/prototype/call.mdx)\n- [`Reflect.apply()`](../../../globals/Reflect/apply.mdx)\n\nOr any other operation that invokes the `[[Call]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The `target` must be a callable itself. That is, it must be a function object.\n"
  },
  {
    "path": "documentation/docs/globals/Proxy/proxy/construct.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.construct()\n\nThe **`handler.construct()`** method is a trap for the `new` operator. In order for the new operation to be valid on the resulting Proxy object, the target used to initialize the proxy must itself have a `[[Construct]]` internal method (i.e. `new target` must be valid).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  construct(target, argumentsList, newTarget) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `construct()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `argumentsList`\n  - : The list of arguments for the constructor.\n- `newTarget`\n  - : The constructor that was originally called, `p` above.\n\n### Return value\n\nThe `construct` method must return an object.\n\n## Description\n\nThe **`handler.construct()`** method is a trap for the `new` operator.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- The `new` operator: `new myFunction(...args)`\n- [`Reflect.construct()`](../../../globals/Reflect/construct.mdx)\n\nOr any other operation that invokes the `[[Construct]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The result must be an `Object`.\n"
  },
  {
    "path": "documentation/docs/globals/Proxy/proxy/defineProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.defineProperty()\n\nThe **`handler.defineProperty()`** method is a trap for\n[`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  defineProperty(target, property, descriptor) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `defineProperty()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property whose description is to be\n    retrieved.\n- `descriptor`\n  - : The descriptor for the property being defined or modified.\n\n### Return value\n\nThe `defineProperty()` method must return a `Boolean` indicating\nwhether or not the property has been successfully defined.\n\n## Description\n\nThe **`handler.defineProperty()`** method is a trap for\n[`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx), [`Object.defineProperties()`](../../../globals/Object/defineProperties.mdx)\n- [`Reflect.defineProperty()`](../../../globals/Reflect/defineProperty.mdx)\n\nOr any other operation that invokes the `[[DefineOwnProperty]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- A property cannot be added, if the target object is not extensible.\n- A property cannot be added as or modified to be non-configurable, if it does not\n  exists as a non-configurable own property of the target object.\n- A property may not be non-configurable, if a corresponding configurable property of\n  the target object exists.\n- If a property has a corresponding target object property then\n  `Object.defineProperty(target, prop, descriptor)`\n  will not throw an exception.\n- In strict mode, a `false` return value from the\n  `defineProperty()` handler will throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) exception.\n"
  },
  {
    "path": "documentation/docs/globals/Proxy/proxy/deleteProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.deleteProperty()\n\nThe **`handler.deleteProperty()`** method is a trap for the `delete` operator.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  deleteProperty(target, property) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `deleteProperty()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property to delete.\n\n### Return value\n\nThe `deleteProperty()` method must return a `Boolean` indicating\nwhether or not the property has been successfully deleted.\n\n## Description\n\nThe **`handler.deleteProperty()`** method is a trap for the `delete` operator.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- The [`delete`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) operator: `delete proxy[foo]` and\n  `delete proxy.foo`\n- [`Reflect.deleteProperty()`](../../../globals/Reflect/deleteProperty.mdx)\n\nOr any other operation that invokes the `[[Delete]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- A property cannot be deleted, if it exists as a non-configurable own property of the\n  target object.\n"
  },
  {
    "path": "documentation/docs/globals/Proxy/proxy/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.get()\n\nThe **`handler.get()`** method is a trap for getting a property\nvalue.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  get(target, property, receiver) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `get()` method. `this`\nis bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property to get.\n- `receiver`\n  - : Either the proxy or an object that inherits from the proxy.\n\n### Return value\n\nThe `get()` method can return any value.\n\n## Description\n\nThe **`handler.get()`** method is a trap for getting a property\nvalue.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- Property access: `proxy[foo]` and `proxy.bar`\n- [`Reflect.get()`](../../../globals/Reflect/get.mdx)\n\nOr any other operation that invokes the `[[Get]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The value reported for a property must be the same as the value of the corresponding\n  target object property if the target object property is a non-writable,\n  non-configurable own data property.\n- The value reported for a property must be undefined if the corresponding target\n  object property is a non-configurable own accessor property that has\n  `undefined` as its `[[Get]]` attribute.\n"
  },
  {
    "path": "documentation/docs/globals/Proxy/proxy/getOwnPropertyDescriptor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.getOwnPropertyDescriptor()\n\nThe **`handler.getOwnPropertyDescriptor()`** method is a trap for [`Object.getOwnPropertyDescriptor()`](../../../globals/Object/getOwnPropertyDescriptor.mdx).\n\n\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  getOwnPropertyDescriptor(target, prop) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `getOwnPropertyDescriptor()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `prop`\n  - : The name of the property whose description should be retrieved.\n\n### Return value\n\nThe `getOwnPropertyDescriptor()` method must return an object or `undefined`.\n\n## Description\n\nThe **`handler.getOwnPropertyDescriptor()`** method is a trap for [`Object.getOwnPropertyDescriptor()`](../../../globals/Object/getOwnPropertyDescriptor.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.getOwnPropertyDescriptor()`](../../../globals/Object/getOwnPropertyDescriptor.mdx)\n- [`Reflect.getOwnPropertyDescriptor()`](../../../globals/Reflect/getOwnPropertyDescriptor.mdx)\n\nOr any other operation that invokes the `[[GetOwnProperty]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `getOwnPropertyDescriptor()` must return an object or `undefined`.\n- A property cannot be reported as non-existent, if it exists as a non-configurable own property of the target object.\n- A property cannot be reported as non-existent, if it exists as an own property of the target object and the target object is not extensible.\n- A property cannot be reported as existent, if it does not exists as an own property of the target object and the target object is not extensible.\n- A property cannot be reported as non-configurable, if it does not exists as an own property of the target object or if it exists as a configurable own property of the target object.\n- The result of `Object.getOwnPropertyDescriptor(target)` can be applied to the target object using `Object.defineProperty()` and will not throw an exception.\n"
  },
  {
    "path": "documentation/docs/globals/Proxy/proxy/getPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.getPrototypeOf()\n\nThe **`handler.getPrototypeOf()`** method is a trap for the\n`[[GetPrototypeOf]]` internal method.\n\n## Syntax\n\n```js\nnew Proxy(obj, {\n  getPrototypeOf(target) {\n    // …\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `getPrototypeOf()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `getPrototypeOf()` method must return an object or `null`.\n\n## Description\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.getPrototypeOf()`](../../../globals/Object/getPrototypeOf.mdx)\n- [`Reflect.getPrototypeOf()`](../../../globals/Reflect/getPrototypeOf.mdx)\n- [`Object.prototype.isPrototypeOf()`](../../../globals/Object/prototype/isPrototypeOf.mdx)\n- `instanceof`\n\nOr any other operation that invokes the `[[GetPrototypeOf]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `getPrototypeOf()` method must return an object or `null`.\n- If `target` is not extensible,\n  `Object.getPrototypeOf(proxy)` method must return the same\n  value as `Object.getPrototypeOf(target)`.\n"
  },
  {
    "path": "documentation/docs/globals/Proxy/proxy/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.has()\n\nThe **`handler.has()`** method is a trap for the `in` operator.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  has(target, prop) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to `has()` method. `this` is\nbound to the handler.\n\n- `target`\n  - : The target object.\n- `prop`\n  - : The name or `Symbol` of the property to check for existence.\n\n### Return value\n\nThe `has()` method must return a boolean value.\n\n## Description\n\nThe **`handler.has()`** method is a trap for the `in` operator.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- The [`in`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/in) operator: `foo in proxy`\n- [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) check: `with(proxy) { (foo); }`\n- [`Reflect.has()`](../../../globals/Reflect/has.mdx)\n\nOr any other operation that invokes the `[[HasProperty]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- A property cannot be reported as non-existent, if it exists as a non-configurable\n  own property of the target object.\n- A property cannot be reported as non-existent, if it exists as an own property of\n  the target object and the target object is not extensible.\n"
  },
  {
    "path": "documentation/docs/globals/Proxy/proxy/isExtensible.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.isExtensible()\n\nThe **`handler.isExtensible()`** method is a trap for\n[`Object.isExtensible()`](../../../globals/Object/isExtensible.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  isExtensible(target) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `isExtensible()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `isExtensible()` method must return a boolean value.\n\n## Description\n\nThe **`handler.isExtensible()`** method is a trap for\n[`Object.isExtensible()`](../../../globals/Object/isExtensible.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.isExtensible()`](../../../globals/Object/isExtensible.mdx)\n- [`Reflect.isExtensible()`](../../../globals/Reflect/isExtensible.mdx)\n\nOr any other operation that invokes the `[[IsExtensible]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `Object.isExtensible(proxy)` must return the same value as\n  `Object.isExtensible(target)`.\n"
  },
  {
    "path": "documentation/docs/globals/Proxy/proxy/ownKeys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.ownKeys()\n\nThe **`handler.ownKeys()`** method is a trap for\n[`Reflect.ownKeys()`](../../../globals/Reflect/ownKeys.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  ownKeys(target) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `ownKeys()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `ownKeys()` method must return an enumerable object.\n\n## Description\n\nThe **`handler.ownKeys()`** method is a trap for\n[`Reflect.ownKeys()`](../../../globals/Reflect/ownKeys.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.getOwnPropertyNames()`](../../../globals/Object/getOwnPropertyNames.mdx)\n- [`Object.getOwnPropertySymbols()`](../../../globals/Object/getOwnPropertySymbols.mdx)\n- [`Object.keys()`](../../../globals/Object/keys.mdx)\n- [`Reflect.ownKeys()`](../../../globals/Reflect/ownKeys.mdx)\n\nOr any other operation that invokes the `[[OwnPropertyKeys]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The result of `ownKeys()` must be an array.\n- The type of each array element is either a `String` or a `Symbol`.\n- The result List must contain the keys of all non-configurable own properties of the\n  target object.\n- If the target object is not extensible, then the result List must contain all the\n  keys of the own properties of the target object and no other values.\n"
  },
  {
    "path": "documentation/docs/globals/Proxy/proxy/preventExtensions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.preventExtensions()\n\nThe **`handler.preventExtensions()`** method is a trap for [`Object.preventExtensions()`](../../../globals/Object/preventExtensions.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  preventExtensions(target) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `preventExtensions()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `preventExtensions()` method must return a boolean value.\n\n## Description\n\nThe **`handler.preventExtensions()`** method is a trap for [`Object.preventExtensions()`](../../../globals/Object/preventExtensions.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.preventExtensions()`](../../../globals/Object/preventExtensions.mdx)\n- [`Reflect.preventExtensions()`](../../../globals/Reflect/preventExtensions.mdx)\n- [`Object.seal()`](../../../globals/Object/seal.mdx)\n- [`Object.freeze()`](../../../globals/Object/freeze.mdx)\n\nOr any other operation that invokes the `[[PreventExtensions]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `Object.preventExtensions(proxy)` only returns `true` if `Object.isExtensible(proxy)` is `false`.\n"
  },
  {
    "path": "documentation/docs/globals/Proxy/proxy/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.set()\n\nThe **`handler.set()`** method is a trap for setting a property\nvalue.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  set(target, property, value, receiver) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `set()` method. `this`\nis bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property to set.\n- `value`\n  - : The new value of the property to set.\n- `receiver`\n\n  - : The object to which the assignment was originally directed. This is usually the\n    proxy itself. But a `set()` handler can also be called indirectly, via\n    the prototype chain or various other ways.\n\n    For example, suppose a script does\n    `obj.name = \"jen\"`, and `obj` is not a\n    proxy, and has no own property `.name`, but it has a proxy on its\n    prototype chain. That proxy's `set()` handler will be called, and\n    `obj` will be passed as the receiver.\n\n### Return value\n\nThe `set()` method should return a boolean value.\n\n- Return `true` to indicate that assignment succeeded.\n- If the `set()` method returns `false`, and the assignment\n  happened in strict-mode code, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) will be thrown.\n\n## Description\n\nThe **`handler.set()`** method is a trap for setting property\nvalue.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- Property assignment: `proxy[foo] = bar` and `proxy.foo = bar`\n- [`Reflect.set()`](../../../globals/Reflect/set.mdx)\n\nOr any other operation that invokes the `[[Set]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- Cannot change the value of a property to be different from the value of the\n  corresponding target object property if the corresponding target object property is a\n  non-writable, non-configurable data property.\n- Cannot set the value of a property if the corresponding target object property is a\n  non-configurable accessor property that has `undefined` as its\n  `[[Set]]` attribute.\n- In strict mode, a `false` return value from the `set()`\n  handler will throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) exception.\n"
  },
  {
    "path": "documentation/docs/globals/Proxy/proxy/setPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.setPrototypeOf()\n\nThe **`handler.setPrototypeOf()`** method is a trap for\n[`Object.setPrototypeOf()`](../../../globals/Object/setPrototypeOf.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  setPrototypeOf(target, prototype) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `setPrototypeOf()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `prototype`\n  - : The object's new prototype or `null`.\n\n### Return value\n\nThe `setPrototypeOf()` method returns `true` if the\n`[[Prototype]]` was successfully changed, otherwise `false`.\n\n## Description\n\nThe **`handler.setPrototypeOf()`** method is a trap for\n[`Object.setPrototypeOf()`](../../../globals/Object/setPrototypeOf.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.setPrototypeOf()`](../../../globals/Object/setPrototypeOf.mdx)\n- [`Reflect.setPrototypeOf()`](../../../globals/Reflect/setPrototypeOf.mdx)\n\nOr any other operation that invokes the `[[SetPrototypeOf]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- If `target` is not extensible, the `prototype`\n  parameter must be the same value as\n  `Object.getPrototypeOf(target)`.\n"
  },
  {
    "path": "documentation/docs/globals/Proxy/revocable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Proxy.revocable()\n\nThe **`Proxy.revocable()`** static method creates a revocable `Proxy` object.\n\n## Syntax\n\n```js\nProxy.revocable(target, handler)\n```\n\n### Parameters\n\n- `target`\n  - : A target object to wrap with `Proxy`. It can be any sort of object, including a native array, a function, or even another proxy.\n- `handler`\n  - : An object whose properties are functions defining the behavior of `proxy` when an operation is performed on it.\n\n### Return value\n\nA plain object with the following two properties:\n\n- `proxy`\n  - : A Proxy object exactly the same as one created with a [`new Proxy(target, handler)`](../../globals/Proxy/Proxy.mdx) call.\n- `revoke`\n  - : A function with no parameters to revoke (switch off) the `proxy`.\n\n## Description\n\nThe `Proxy.revocable()` factory function is the same as the [`Proxy()`](../../globals/Proxy/Proxy.mdx) constructor, except that in addition to creating a proxy object, it also creates a `revoke` function that can be called to disable the proxy. The proxy object and the `revoke` function are wrapped in a plain object.\n\nThe `revoke` function does not take any parameters, nor does it rely on the `this` value. The created `proxy` object is attached to the `revoke` function as a [private property](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/Private_class_fields) that the `revoke` function accesses on itself when called (the existence of the private property is not observable from the outside, but it has implications on how garbage collection happens). The `proxy` object is _not_ captured within the [closure](https://developer.mozilla.org/docs/Web/JavaScript/Closures) of the `revoke` function (which will make garbage collection of `proxy` impossible if `revoke` is still alive).\n\nAfter the `revoke()` function gets called, the proxy becomes unusable: any trap to a handler throws a [`TypeError`](../../globals/TypeError/TypeError.mdx). Once a proxy is revoked, it remains revoked, and calling `revoke()` again has no effect — in fact, the call to `revoke()` detaches the `proxy` object from the `revoke` function, so the `revoke` function will not be able to access the proxy again at all. If the proxy is not referenced elsewhere, it will then be eligible for garbage collection. The `revoke` function also detaches `target` and `handler` from the `proxy`, so if `target` is not referenced elsewhere, it will also be eligible for garbage collection, even when its proxy is still alive, since there's no longer a way to meaningfully interact with the target object.\n\nLetting users interact with an object through a revocable proxy allows you to [control the lifetime](https://developer.mozilla.org/docs/Web/JavaScript/Memory_Management) of the object exposed to the user — you can make the object garbage-collectable even when the user is still holding a reference to its proxy.\n"
  },
  {
    "path": "documentation/docs/globals/RangeError/RangeError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RangeError\n\nThe **`RangeError()`** constructor creates an error\nwhen a value is not in the set or range of allowed values.\n\n## Syntax\n\n```js\nnew RangeError()\nnew RangeError(message)\nnew RangeError(message, options)\nnew RangeError(message, fileName)\nnew RangeError(message, fileName, lineNumber)\n\nRangeError()\nRangeError(message)\nRangeError(message, options)\nRangeError(message, fileName)\nRangeError(message, fileName, lineNumber)\n```\n\n> **Note:** `RangeError()` can be called with or without `new`. Both create a new `RangeError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/docs/globals/ReadableByteStreamController/prototype/byobRequest.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# byobRequest\n\nThe **`byobRequest`** read-only property of the `ReadableByteStreamController` interface returns the current BYOB request, or `null` if there are no pending requests.\n\nAn underlying byte source should check this property, and use it to write data to the stream if it exists (rather than using `ReadableByteStreamController.enqueue()`).\nThis will result in an efficient zero-byte transfer of the data to the consumer.\n\n## Value\n\nA `ReadableStreamBYOBRequest` object instance, or `null`.\n"
  },
  {
    "path": "documentation/docs/globals/ReadableByteStreamController/prototype/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# close()\n\nThe **`close()`** method of the `ReadableByteStreamController` interface closes the associated stream.\n\nThis might be called by the underlying source when its data source has been exhausted/completed.\n\n> **Note:** Readers will still be able to read any previously-enqueued chunks from the stream, but once those are read, the stream will become closed.\n> However if there is an outstanding and partially written `byobRequest` when `close()` is called, the stream will be errored.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableByteStreamController`, it is already closed, or the stream is not readable for some other reason.\n"
  },
  {
    "path": "documentation/docs/globals/ReadableByteStreamController/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# desiredSize\n\nThe **`desiredSize`** read-only property of the`ReadableByteStreamController` interface returns the number of bytes required to fill the stream's internal queue to its \"desired size\".\n\nThe value is used by the stream to indicate a preferred flow rate to the underlying source.\nSources that support throttling or pausing their inflow of data (not all do!) should control the inflow such that `desiredSize` of the stream buffer is kept positive and as close to zero as possible.\n\nThe `desiredSize` is used to apply backpressure from downstream consumers.\n\n## Value\n\nAn integer. Note that this can be negative if the queue is over-full.\n\nThe value will be `null` if the stream has errored and `0` if it is closed.\n"
  },
  {
    "path": "documentation/docs/globals/ReadableByteStreamController/prototype/enqueue.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# enqueue()\n\nThe **`enqueue()`** method of the `ReadableByteStreamController` interface enqueues a given chunk on the associated readable byte stream (the chunk is copied into the stream's internal queues).\n\nThis should only be used to transfer data to the queue when `byobRequest` is `null`.\n\n## Syntax\n\n```js\nenqueue(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : The chunk to enqueue.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableByteStreamController`, or the stream cannot be read for some other reason, or the chunk is not an object, or the chunk's internal array buffer is non-existent, zero-length, or detached.\n    It is also thrown if the stream has been closed.\n"
  },
  {
    "path": "documentation/docs/globals/ReadableByteStreamController/prototype/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# error()\n\nThe **`error()`** method of the `ReadableByteStreamController` interface causes any future interactions with the associated stream to error with the specified reason.\n\nThis is commonly called by an underlying source to surface an error from the interface where it gets its data (such as a file-read or socket error).\nIt can also be called from elsewhere to trigger a stream error, for example if another part of the system that the stream relies on fails.\n\n## Syntax\n\n```js\nerror(errorObject)\n```\n\n### Parameters\n\n- `errorObject`\n  - : Any object that you want future interactions to fail with.\n\n### Return value\n\n`undefined`\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableByteStreamController`, or the stream is not readable for some other reason.\n\n"
  },
  {
    "path": "documentation/docs/globals/ReadableStream/ReadableStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream()\n\nThe **`ReadableStream()`** constructor creates and returns a readable stream object from the given handlers.\n\n## Syntax\n\n```js\nnew ReadableStream()\nnew ReadableStream(underlyingSource)\nnew ReadableStream(underlyingSource, queuingStrategy)\n```\n\n### Parameters\n\n- `underlyingSource` _**optional**_\n\n  - : An object containing methods and properties that define how the constructed stream instance will behave.\n    `underlyingSource` can contain the following:\n\n    - `start` (controller) _**optional**_\n      - : This is a method, called immediately when the object is constructed. The\n        contents of this method are defined by the developer, and should aim to get access\n        to the stream source, and do anything else required to set up the stream\n        functionality. If this process is to be done asynchronously, it can return a\n        promise to signal success or failure. The `controller` parameter passed\n        to this method is a `ReadableStreamDefaultController` or a\n        `ReadableByteStreamController`, depending on the value of the\n        `type` property. This can be used by the developer to control the\n        stream during set up.\n    - `pull` (controller) _**optional**_\n      - : This method, also defined by the developer, will be called repeatedly when the\n        stream's internal queue of chunks is not full, up until it reaches its high water\n        mark. If `pull()` returns a promise, then it won't be called again\n        until that promise fulfills; if the promise rejects, the stream will become\n        errored. The `controller` parameter passed to this method is a\n        `ReadableStreamDefaultController` or a\n        `ReadableByteStreamController`, depending on the value of the\n        `type` property. This can be used by the developer to control the\n        stream as more chunks are fetched.\n    - `cancel` (reason) _**optional**_\n      - : This method, also defined by the developer, will be called if the app signals\n        that the stream is to be cancelled (e.g. if `ReadableStream.cancel()`\n        is called). The contents should do whatever is necessary to release access to the\n        stream source. If this process is asynchronous, it can return a promise to signal\n        success or failure. The `reason` parameter contains a\n        string describing why the stream was cancelled.\n    - `type` _**optional**_\n      - : This property controls what type of readable stream is being dealt with. If it\n        is included with a value set to `\"bytes\"`, the passed controller object\n        will be a `ReadableByteStreamController` capable of handling a BYOB\n        (bring your own buffer)/byte stream. If it is not included, the passed controller\n        will be a `ReadableStreamDefaultController`.\n    - `autoAllocateChunkSize` _**optional**_\n\n      - : For byte streams, the developer can set the `autoAllocateChunkSize` with a positive integer value to turn on the stream's auto-allocation feature.\n        With this is set, the stream implementation will automatically allocate a view buffer of the specified size in `ReadableByteStreamController.byobRequest` when required.\n\n        This must be set to enable zero-copy transfers to be used with a default `ReadableStreamDefaultReader`.\n        If not set, a default reader will still stream data, but `ReadableByteStreamController.byobRequest` will always be `null` and transfers to the consumer must be via the stream's internal queues.\n\n- `queuingStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer — this defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk` — this indicates the size to\n        use for each chunk, in bytes.\n\n    > **Note:** You could define your own custom\n    > `queuingStrategy`, or use an instance of\n    > `ByteLengthQueuingStrategy` or `CountQueuingStrategy`\n    > for this object value. If no `queuingStrategy` is supplied, the default\n    > used is the same as a `CountQueuingStrategy` with a high water mark of\n    > 1\\.\n\n### Return value\n\nAn instance of the `ReadableStream` object.\n\n### Exceptions\n\n- `RangeError`\n  - Thrown if the supplied type value is neither `\"bytes\"` nor `undefined`.\n"
  },
  {
    "path": "documentation/docs/globals/ReadableStream/prototype/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.cancel()\n\nThe **`cancel()`** method of the\n`ReadableStream` interface returns a `Promise` that\nresolves when the stream is canceled.\n\nCancel is used when you've completely finished with the stream and don't need any more\ndata from it, even if there are chunks enqueued waiting to be read. That data is lost\nafter cancel is called, and the stream is not readable any more. To read those chunks\nstill and not completely get rid of the stream, you'd use\n`ReadableStreamDefaultController.close()`.\n\n## Syntax\n\n```js\ncancel()\ncancel(reason)\n```\n\n### Parameters\n\n- `reason` _**optional**_\n  - : A human-readable reason for the cancellation. The underlying source may or may not use it.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason` parameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to cancel is not a `ReadableStream`, or it is locked.\n"
  },
  {
    "path": "documentation/docs/globals/ReadableStream/prototype/getReader.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.getReader()\n\nThe **`getReader()`** method of the `ReadableStream` interface creates a reader and locks the stream to it.\nWhile the stream is locked, no other reader can be acquired until this one is released.\n\n## Syntax\n\n```js\ngetReader()\ngetReader(options)\n```\n\n### Parameters\n\n- `options` _**optional**_\n\n  - : An object containing the following properties:\n\n    - `mode` _**optional**_\n\n      - : A property that specifies the type of reader to create.\n        Values can be:\n\n        - `\"byob\"`, which results in a `ReadableStreamBYOBReader` being created that can read readable byte streams (streams that support zero-copy transfer from an underlying byte source to the reader when internal stream buffers are empty).\n        - `undefined` (or not specified at all — this is the default), which results in a `ReadableStreamDefaultReader` being created that can read individual chunks from a stream.\n\n### Return value\n\nA `ReadableStreamDefaultReader` or `ReadableStreamBYOBReader` object instance, depending on the `mode` value.\n\n### Exceptions\n\n- `RangeError`\n  - : Thrown if the provided mode value is not `\"byob\"` or `undefined`.\n- `TypeError`\n  - : Thrown if the stream you are trying to create a reader for is already locked, or not a `ReadableStream`."
  },
  {
    "path": "documentation/docs/globals/ReadableStream/prototype/locked.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.locked\n\nThe **`locked`** read-only property of the `ReadableStream` interface returns whether or not the readable stream is locked to a reader.\n\nA readable stream can have at most one active reader at a time, and is locked to that reader until it is released.\nA reader might be obtained using `ReadableStream.getReader()` and released using the reader's `releaseLock()` method.\n\n## Value\n\nA `boolean` value indicating whether or not the readable stream is locked.\n"
  },
  {
    "path": "documentation/docs/globals/ReadableStream/prototype/pipeThrough.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.pipeThrough()\n\nThe **`pipeThrough()`** method of the `ReadableStream` interface provides a chainable way of piping the current stream through a transform stream or any other writable/readable pair.\n\nPiping a stream will generally lock it for the duration of the pipe, preventing other readers from locking it.\n\n## Syntax\n\n```js\npipeThrough(transformStream)\npipeThrough(transformStream, options)\n```\n\n### Parameters\n\n- `transformStream`\n\n  - : A `TransformStream` (or an object with the structure\n    `{writable, readable}`) consisting of a readable stream and a writable\n    stream working together to transform some data from one form to another. Data written\n    to the `writable` stream can be read in some transformed state by the\n    `readable` stream. For example, a `TextDecoder`, has bytes\n    written to it and strings read from it, while a video decoder has encoded bytes\n    written to it and uncompressed video frames read from it.\n\n- `options` _**optional**_\n\n  - : The options that should be used when piping to the `writable` stream.\n    Available options are:\n\n    - `preventClose`\n\n      - : If this is set to `true`, the source `ReadableStream` closing will no longer cause the destination `WritableStream` to be closed.\n        The method will return a fulfilled promise once this process completes, unless an error is encountered while closing the destination, in which case it will be rejected with that error.\n\n    - `preventAbort`\n\n      - : If this is set to `true`, errors in the source `ReadableStream` will no longer abort the destination `WritableStream`.\n        The method will return a promise rejected with the source's error, or with any error that occurs during aborting the destination.\n\n    - `preventCancel`\n\n      - : If this is set to `true`, errors in the destination `WritableStream` will no longer cancel the source `ReadableStream`.\n        In this case the method will return a promise rejected with the source's error, or with any error that occurs during canceling the source.\n        In addition, if the destination writable stream starts out closed or closing, the source readable stream will no longer be canceled.\n        In this case the method will return a promise rejected with an error indicating piping to a closed stream failed, or with any error that occurs during canceling the source.\n\n### Return value\n\nThe `readable` side of the `transformStream`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the `writable` and/or `readable` property of `transformStream` are undefined.\n"
  },
  {
    "path": "documentation/docs/globals/ReadableStream/prototype/pipeTo.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.pipeTo()\n\nThe **`pipeTo()`** method of the `ReadableStream` interface pipes the current `ReadableStream` to a given `WritableStream` and returns a `Promise` that fulfills when the piping process completes successfully, or rejects if any errors were encountered.\n\nPiping a stream will generally `lock` it for the duration of the pipe, preventing other readers from locking it.\n\n## Syntax\n\n```js\npipeTo(destination)\npipeTo(destination, options)\n```\n\n### Parameters\n\n- `destination`\n\n  - : A `WritableStream` that acts as the final destination for the `ReadableStream`.\n\n- `options` _**optional**_\n\n  - : The options that should be used when piping to the `writable` stream.\n    Available options are:\n\n    - `preventClose`\n      - : If this is set to `true`, the source `ReadableStream` closing will no longer cause the destination `WritableStream` to be closed.\n        The method will return a fulfilled promise once this process completes, unless an error is encountered while closing the destination in which case it will be rejected with that error.\n    - `preventAbort`\n      - : If this is set to `true`, errors in the source `ReadableStream` will no longer abort the destination `WritableStream`.\n        The method will return a promise rejected with the source's error, or with any error that occurs during aborting the destination.\n    - `preventCancel`\n      - : If this is set to `true`, errors in the destination `WritableStream` will no longer cancel the source `ReadableStream`.\n        In this case the method will return a promise rejected with the source's error, or with any error that occurs during canceling the source.\n        In addition, if the destination writable stream starts out closed or closing, the source readable stream will no longer be canceled.\n        In this case the method will return a promise rejected with an error indicating piping to a closed stream failed, or with any error that occurs during canceling the source.\n\n### Return value\n\nA `Promise` that resolves when the piping process has completed.\n\n### Exceptions\n\n- `TypeError`\n  - : The `writableStream` and/or `readableStream` objects are not a writable stream/readable stream, or one or both of the streams are locked.\n"
  },
  {
    "path": "documentation/docs/globals/ReadableStream/prototype/tee.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.tee()\n\nThe **`tee()`** method of the\n`ReadableStream` interface [tees](https://streams.spec.whatwg.org/#tee-a-readable-stream) the current readable stream, returning a\ntwo-element array containing the two resulting branches as\nnew `ReadableStream` instances.\n\nThis is useful for allowing two readers to read a stream sequentially or simultaneously,\nperhaps at different speeds.\nFor example, you might do this in a ServiceWorker if you want to fetch\na response from the server and stream it to the browser, but also stream it to the\nServiceWorker cache. Since a response body cannot be consumed more than once, you'd need\ntwo copies to do this.\n\nA teed stream will partially signal backpressure at the rate of the _faster_ consumer\nof the two `ReadableStream` branches,\nand unread data is enqueued internally on the slower consumed `ReadableStream`\nwithout any limit or backpressure.\nThat is, when _both_ branches have an unread element in their internal queue,\nthen the original `ReadableStream`'s controller's internal queue will start to fill up,\nand once its `ReadableStreamDefaultController.desiredSize\", \"desiredSize` ≤ 0\nor byte stream controller `ReadableByteStreamController.desiredSize\", \"desiredSize` ≤ 0,\nthen the controller will stop calling `pull(controller)` on the\nunderlying source passed to `ReadableStream.ReadableStream\", \"new ReadableStream()`.\nIf only one branch is consumed, then the entire body will be enqueued in memory.\nTherefore, you should not use the built-in `tee()` to read very large streams\nin parallel at different speeds.\nInstead, search for an implementation that fully backpressures\nto the speed of the _slower_ consumed branch.\n\nTo cancel the stream you then need to cancel both resulting branches. Teeing a stream\nwill generally lock it for the duration, preventing other readers from locking it.\n\n## Syntax\n\n```js\ntee()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nAn `Array` containing two `ReadableStream` instances.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source stream is not a `ReadableStream`.\n"
  },
  {
    "path": "documentation/docs/globals/ReadableStreamBYOBReader/ReadableStreamBYOBReader.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# ReadableStreamBYOBReader()\n\nThe **`ReadableStreamBYOBReader()`** constructor creates and returns a `ReadableStreamBYOBReader` object instance.\n\n> **Note:** You generally wouldn't use this constructor manually;\n> instead, you'd use the `ReadableStream.getReader()` method with the argument `\"byob\"`.\n\n## Syntax\n\n```js\nnew ReadableStreamBYOBReader(stream)\n```\n\n### Parameters\n\n- `stream`\n  - : The `ReadableStream` to be read.\n\n### Return value\n\nAn instance of the `ReadableStreamBYOBReader` object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the supplied `stream` parameter is not a `ReadableStream`, or it is already locked for reading by another reader, or its stream controller is not a `ReadableByteStreamController`.\n"
  },
  {
    "path": "documentation/docs/globals/ReadableStreamBYOBReader/prototype/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# cancel()\n\nThe **`cancel()`** method of the `ReadableStreamBYOBReader` interface returns a `Promise` that resolves when the stream is canceled.\nCalling this method signals a loss of interest in the stream by a consumer.\n\n> **Note:** If the reader is active, the `cancel()` method behaves the same as that for the associated stream (`ReadableStream.cancel()`).\n\n## Syntax\n\n```js\ncancel()\ncancel(reason)\n```\n\n### Parameters\n\n- `reason` __optional__\n  - : A human-readable reason for the cancellation. The underlying source may or may not use it.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason` parameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamBYOBReader`, or the stream has no owner.\n"
  },
  {
    "path": "documentation/docs/globals/ReadableStreamBYOBReader/prototype/closed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# closed\n\nThe **`closed`** read-only property of the `ReadableStreamBYOBReader` interface returns a `Promise` that fulfills when the stream closes, or rejects if the stream throws an error or the reader's lock is released.\n\nThis property enables you to write code that responds to an end to the streaming process.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/docs/globals/ReadableStreamBYOBReader/prototype/read.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# read()\n\nThe **`read()`** method of the `ReadableStreamBYOBReader` interface is used to read data into a view on a user-supplied buffer from an associated readable byte stream.\nA request for data will be satisfied from the stream's internal queues if there is any data present.\nIf the stream queues are empty, the request may be supplied as a zero-copy transfer from the underlying byte source.\n\nThe method takes as an argument a view on a buffer that supplied data is to be read into, and returns a `Promise`.\nThe promise fulfills with an object that has properties `value` and `done` when data comes available, or if the stream is cancelled.\nIf the stream is errored, the promise will be rejected with the relevant error object.\n\nIf a chunk of data is supplied, the `value` property will contain a new view.\nThis will be a view over the same buffer/backing memory (and of the same type) as the original `view` passed to the `read()` method, now populated with the new chunk of data.\nNote that once the promise fulfills, the original `view` passed to the method will be detached and no longer usable.\nThe promise will fulfill with a `value: undefined` if the stream has been cancelled.\nIn this case the backing memory region of `view` is discarded and not returned to the caller (all previously read data in the view's buffer is lost).\n\nThe `done` property indicates whether or not more data is expected.\nThe value is set `true` if the stream is closed or cancelled, and `false` otherwise.\n\n## Syntax\n\n```js\nread(view)\n```\n\n### Parameters\n\n- `view`\n  - : The view that data is to be read into.\n\n### Return value\n\nA `Promise`, which fulfills/rejects with a result depending on the state of the stream.\n\nThe following are possible:\n\n- If a chunk is available and the stream is still active, the promise fulfills with an object of the form:\n\n  ```\n  { value: theChunk, done: false }\n  ```\n\n  `theChunk` is a view containing the new data.\n  This is a view of the same type and over the same backing memory as the `view` passed to the `read()` method.\n  The original `view` will be detached and no longer usable.\n\n- If the stream is closed, the promise fulfills with an object of the form (where `theChunk` has the same properties as above):\n\n  ```\n  { value: theChunk, done: true }\n  ```\n\n- If the stream is cancelled, the promise fulfills with an object of the form:\n\n  ```\n  { value: undefined, done: true }\n  ```\n\n  In this case the backing memory is discarded.\n\n- If the stream throws an error, the promise rejects with the relevant error.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamBYOBReader`, the stream has no owner, the view is not an object or has become detached, the view's length is 0, or `ReadableStreamBYOBReader.releaseLock()` is called (when there's is a pending read request).\n"
  },
  {
    "path": "documentation/docs/globals/ReadableStreamBYOBReader/prototype/releaseLock.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# releaseLock()\n\nThe **`releaseLock()`** method of the `ReadableStreamBYOBReader` interface releases the reader's lock on the stream.\nAfter the lock is released, the reader is no longer active.\n\nThe reader will appear errored if the associated stream is errored when the lock is released; otherwise, the reader will appear closed.\n\nIf the reader's lock is released while it still has pending read requests then the promises returned by the reader's `ReadableStreamBYOBReader.read()` method are immediately rejected with a `TypeError`.\nUnread chunks remain in the stream's internal queue and can be read later by acquiring a new reader.\n\n## Syntax\n\n```js\nreleaseLock()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamBYOBReader`.\n"
  },
  {
    "path": "documentation/docs/globals/ReadableStreamBYOBRequest/prototype/respond.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# respond()\n\nThe **`respond()`** method of the `ReadableStreamBYOBRequest` interface is used to signal to the associated readable byte stream that the specified number of bytes were written into the `ReadableStreamBYOBRequest.view`.\n\nAfter this method is called, the `view` will be transferred and no longer modifiable.\n\n## Syntax\n\n```js\nrespond(bytesWritten)\n```\n\n### Parameters\n\n- `bytesWritten`\n  - : The number of bytes written into `ReadableStreamBYOBRequest.view`.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : The request does not have an associated `ReadableByteStreamController` or the view buffer is not detached/cannot be transferred into.\n"
  },
  {
    "path": "documentation/docs/globals/ReadableStreamBYOBRequest/prototype/respondWithNewView.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# respondWithNewView()\n\nThe **`respondWithNewView()`** method of the `ReadableStreamBYOBRequest` interface specifies a new view that the consumer of the associated readable byte stream should write to instead of `ReadableStreamBYOBRequest.view`.\n\nThe new view must be a `TypedArray` or a `DataView` that provides a view onto the same backing memory region as `ReadableStreamBYOBRequest.view`.\nAfter this method is called, the view that was passed into the method will be transferred and no longer modifiable.\n\nThe method is intended for use cases where an underlying byte source needs to transfer a `byobRequest.view` internally before finishing its response.\nFor example, the source may transfer the BYOB view to a separate worker thread, and wait for the worker to transfer it back once it has been filled.\n\n## Syntax\n\n```js\nrespondWithNewView(view)\n```\n\n### Parameters\n\n- `view`\n\n  - : A `TypedArray` or a `DataView` that the consumer of the associated readable byte stream should write to instead of `ReadableStreamBYOBRequest.view`.\n\n    This must be a view onto the same backing memory region as `ReadableStreamBYOBRequest.view` and occupy the same or less memory.\n    Specifically, it must be either the view's buffer or a transferred version, must have the same `byteOffset`, and a `byteLength` (number of bytes written) that is less than or equal to that of the view.\n\n### Return value\n\n`undefined`\n\n### Exceptions\n\n- `TypeError`\n\n  - : Thrown if the source object is not a `ReadableStreamBYOBRequest`, or there is no associated controller, or the associated internal array buffer is non-existent or detached.\n    It may also be thrown if the `view` is zero-length when there is an active reader, or non-zero when called on a closed stream.\n\n- `RangeError`\n  - : Thrown if the new `view` does not match the backing memory region of `ReadableStreamBYOBRequest.view`.\n    For example, it is not the same buffer (or a transferred version), has a different `byteOffset`, or is larger than the memory available to the backing view.\n"
  },
  {
    "path": "documentation/docs/globals/ReadableStreamBYOBRequest/prototype/view.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# view\n\nThe **`view`** getter property of the `ReadableStreamBYOBRequest` interface returns the current view.\n\n## Value\n\nA typed array representing the destination region to which the controller can write generated data.\n\n`null` if the request has already been responded to, by calling `ReadableStreamBYOBRequest.respond()` or `ReadableStreamBYOBRequest.respondWithNewView()`.\n\n"
  },
  {
    "path": "documentation/docs/globals/ReadableStreamDefaultController/prototype/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.close()\n\nThe **`close()`** method of the\n`ReadableStreamDefaultController` interface closes the associated stream.\n\nReaders will still be able to read any previously-enqueued chunks from the stream,\nbut once those are read, the stream will become closed. If you want to completely get\nrid of the stream and discard any enqueued chunks, you'd use\n`ReadableStream.cancel()` or\n`ReadableStreamDefaultReader.cancel()`.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultController`.\n"
  },
  {
    "path": "documentation/docs/globals/ReadableStreamDefaultController/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.desiredSize\n\nThe **`desiredSize`** read-only property of the\n`ReadableStreamDefaultController` interface returns the desired size\nrequired to fill the stream's internal queue.\n\n## Value\n\nAn integer. Note that this can be negative if the queue is over-full.\n"
  },
  {
    "path": "documentation/docs/globals/ReadableStreamDefaultController/prototype/enqueue.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.enqueue()\n\nThe **`enqueue()`** method of the\n`ReadableStreamDefaultController` interface enqueues a given chunk in the\nassociated stream.\n\n## Syntax\n\n```js\nenqueue(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : The chunk to enqueue.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultController`.\n"
  },
  {
    "path": "documentation/docs/globals/ReadableStreamDefaultController/prototype/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.error()\n\nThe **`error()`** method of the\n`ReadableStreamDefaultController` interface causes any future interactions\nwith the associated stream to error.\n\n> **Note:** The `error()` method can be called\n> more than once, and can be called when the stream is not readable.\n\n## Syntax\n\n```js\nerror(e)\n```\n\n### Parameters\n\n- `e`\n  - : The error you want future interactions to fail with.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultController`.\n"
  },
  {
    "path": "documentation/docs/globals/ReadableStreamDefaultReader/ReadableStreamDefaultReader.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader()\n\nThe **`ReadableStreamDefaultReader()`**\nconstructor creates and returns a `ReadableStreamDefaultReader` object\ninstance.\n\n## Syntax\n\n```js\nnew ReadableStreamDefaultReader(stream)\n```\n\n### Parameters\n\n- `stream`\n  - : The `ReadableStream` to be read.\n\n### Return value\n\nAn instance of the `ReadableStreamDefaultReader` object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the supplied `stream` parameter is not a `ReadableStream`,\n    or it is already locked for reading by another reader.\n"
  },
  {
    "path": "documentation/docs/globals/ReadableStreamDefaultReader/prototype/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n~ ReadableStreamDefaultReader.cancel()\n\nThe **`cancel()`** method of the\n`ReadableStreamDefaultReader` interface returns a `Promise` that resolves when the stream is canceled. Calling this method signals a loss of interest in the stream by a consumer.\n\nCancel is used when you've completely finished with the stream and don't need any more\ndata from it, even if there are chunks enqueued waiting to be read. That data is lost\nafter cancel is called, and the stream is not readable any more. To read those chunks\nstill and not completely get rid of the stream, you'd use\n`ReadableStreamDefaultController.close()`.\n\n> **Note:** If the reader is active, the\n> `cancel()` method behaves the same as that for the associated stream\n> (`ReadableStream.cancel()`).\n\n## Syntax\n\n```js\ncancel()\ncancel(reason)\n```\n\n### Parameters\n\n- `reason` _**optional**_\n  - : A human-readable reason for the cancellation. This value may or may not be used.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason`\nparameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamDefaultReader`, or the stream\n    has no owner.\n"
  },
  {
    "path": "documentation/docs/globals/ReadableStreamDefaultReader/prototype/closed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader.closed\n\nThe **`closed`** read-only property of the\n`ReadableStreamDefaultReader` interface returns a\n`Promise` that fulfills when the stream closes, or rejects if the\nstream throws an error or the reader's lock is released. This property enables you\nto write code that responds to an end to the streaming process.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/docs/globals/ReadableStreamDefaultReader/prototype/read.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader.read()\n\nThe **`read()`** method of the `ReadableStreamDefaultReader` interface returns a `Promise` providing access to the next chunk in the stream's internal queue.\n\n## Syntax\n\n```js\nread()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise`, which fulfills/rejects with a result depending on the state of the stream.\nThe different possibilities are as follows:\n\n- If a chunk is available, the promise will be fulfilled with an object of the form `{ value: theChunk, done: false }`.\n- If the stream becomes closed, the promise will be fulfilled with an object of the form `{ value: undefined, done: true }`.\n- If the stream becomes errored, the promise will be rejected with the relevant error.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamDefaultReader`, the stream has no owner, or `ReadableStreamDefaultReader.releaseLock()` is called (when there's a pending read request).\n"
  },
  {
    "path": "documentation/docs/globals/ReadableStreamDefaultReader/prototype/releaseLock.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader.releaseLock()\n\nThe **`releaseLock()`** method of the `ReadableStreamDefaultReader` interface releases the reader's lock on the stream.\n\nIf the associated stream is errored when the lock is released, the reader will appear errored in that same way subsequently; otherwise, the reader will appear closed.\n\nIf the reader's lock is released while it still has pending read requests then the promises returned by the reader's `ReadableStreamDefaultReader.read()` method are immediately rejected with a `TypeError`.\nUnread chunks remain in the stream's internal queue and can be read later by acquiring a new reader.\n\n## Syntax\n\n```js\nreleaseLock()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultReader`.\n"
  },
  {
    "path": "documentation/docs/globals/ReferenceError/ReferenceError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReferenceError\n\nThe **`ReferenceError`** object represents an error when a\nnon-existent variable is referenced.\n\n## Syntax\n\n```js\nnew ReferenceError()\nnew ReferenceError(message)\nnew ReferenceError(message, options)\nnew ReferenceError(message, fileName)\nnew ReferenceError(message, fileName, lineNumber)\n\nReferenceError()\nReferenceError(message)\nReferenceError(message, options)\nReferenceError(message, fileName)\nReferenceError(message, fileName, lineNumber)\n```\n\n> **Note:** `ReferenceError()` can be called with or without `new`. Both create a new `ReferenceError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/docs/globals/Reflect/apply.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.apply()\n\nThe static **`Reflect.apply()`** method calls a target function\nwith arguments as specified.\n\n## Syntax\n\n```js\nReflect.apply(target, thisArgument, argumentsList)\n```\n\n### Parameters\n\n- `target`\n  - : The target function to call.\n- `thisArgument`\n  - : The value of `this` provided for the call to\n    `target`.\n- `argumentsList`\n  - : An array-like object specifying the arguments with which\n    `target` should be called.\n\n### Return value\n\nThe result of calling the given `target` function with the\nspecified `this` value and arguments.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if the `target` is not callable.\n\n## Description\n\nIn ES5, you typically use the [`Function.prototype.apply()`](../../globals/Function/prototype/apply.mdx) method to call a\nfunction with a given `this` value and `arguments` provided as an array\n(or an [array-like object](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects)).\n\n```js\nFunction.prototype.apply.call(Math.floor, undefined, [1.75]);\n```\n\nWith `Reflect.apply()` this becomes less verbose and easier to understand.\n"
  },
  {
    "path": "documentation/docs/globals/Reflect/construct.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.construct()\n\nThe static **`Reflect.construct()`** method acts like the\n`new` operator, but as a function. It is equivalent to\ncalling `new target(...args)`. It gives also the added option to specify a\ndifferent prototype.\n\n## Syntax\n\n```js\nReflect.construct(target, argumentsList)\nReflect.construct(target, argumentsList, newTarget)\n```\n\n### Parameters\n\n- `target`\n  - : The target function to call.\n- `argumentsList`\n  - : An array-like object specifying the arguments with which\n    `target` should be called.\n- `newTarget` _**optional**_\n  - : The constructor whose prototype should be used. See also the [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target)\n    operator. If `newTarget` is not present, its value defaults\n    to `target`.\n\n### Return value\n\nA new instance of `target` (or `newTarget`,\nif present), initialized by `target` as a constructor with the\ngiven `argumentsList`.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` or\n`newTarget` are not constructors.\n\n## Description\n\n`Reflect.construct()` allows you to invoke a constructor with a variable\nnumber of arguments. (This would also be possible by using the\n[spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) combined with the\n[`new` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new).)\n\n```js\nconst obj = new Foo(...args);\nconst obj = Reflect.construct(Foo, args);\n```\n\n### Reflect.construct() vs Object.create()\n\nPrior to the introduction of `Reflect`, objects could be constructed using\nan arbitrary combination of constructor and prototype by using\n[`Object.create()`](../../globals/Object/create.mdx).\n\n```js\nfunction OneClass() {\n  this.name = \"one\";\n}\n\nfunction OtherClass() {\n  this.name = \"other\";\n}\n\n// Calling this:\nconst obj1 = Reflect.construct(OneClass, args, OtherClass);\n\n// ...has the same result as this:\nconst obj2 = Object.create(OtherClass.prototype);\nOneClass.apply(obj2, args);\n\nconsole.log(obj1.name); // 'one'\nconsole.log(obj2.name); // 'one'\n\nconsole.log(obj1 instanceof OneClass); // false\nconsole.log(obj2 instanceof OneClass); // false\n\nconsole.log(obj1 instanceof OtherClass); // true\nconsole.log(obj2 instanceof OtherClass); // true\n\n// Another example to demonstrate below:\n\nfunction func1(a, b, c, d) {\n  console.log(arguments[3]);\n}\n\nfunction func2(d, e, f, g) {\n  console.log(arguments[3]);\n}\n\nconst obj1 = Reflect.construct(func1, [\"I\", \"Love\", \"my\", \"country\"]);\n```\n\nHowever, while the end result is the same, there is one important difference in the\nprocess. When using `Object.create()` and\n[`Function.prototype.apply()`](../../globals/Function/prototype/apply.mdx), the `new.target` operator will\npoint to `undefined` within the function used as the constructor, since the\n`new` keyword is not being used to create the object.\n\nWhen invoking `Reflect.construct()`, on the other hand, the\n`new.target` operator will point to the `newTarget`\nparameter if supplied, or `target` if not.\n\n```js\nfunction OneClass() {\n  console.log(\"OneClass\");\n  console.log(new.target);\n}\nfunction OtherClass() {\n  console.log(\"OtherClass\");\n  console.log(new.target);\n}\n\nconst obj1 = Reflect.construct(OneClass, args);\n// Logs:\n// OneClass\n// function OneClass { ... }\n\nconst obj2 = Reflect.construct(OneClass, args, OtherClass);\n// Logs:\n// OneClass\n// function OtherClass { ... }\n\nconst obj3 = Object.create(OtherClass.prototype);\nOneClass.apply(obj3, args);\n// Logs:\n// OneClass\n// undefined\n```\n"
  },
  {
    "path": "documentation/docs/globals/Reflect/defineProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.defineProperty()\n\nThe static **`Reflect.defineProperty()`** method is like\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx) but returns a `Boolean`.\n\n## Syntax\n\n```js\nReflect.defineProperty(target, propertyKey, attributes)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to define the property.\n- `propertyKey`\n  - : The name of the property to be defined or modified.\n- `attributes`\n  - : The attributes for the property being defined or modified.\n\n### Return value\n\nA `Boolean` indicating whether or not the property was successfully\ndefined.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.defineProperty` method allows precise addition to or\nmodification of a property on an object. For more details, see the\n[`Object.defineProperty`](../../globals/Object/defineProperty.mdx) which is similar.\n\n> **Note:** `Object.defineProperty` returns the\n> object or throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the property has not been successfully\n> defined. `Reflect.defineProperty`, however, returns a `Boolean`\n> indicating whether or not the property was successfully defined.\n"
  },
  {
    "path": "documentation/docs/globals/Reflect/deleteProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.deleteProperty()\n\nThe static\n**`Reflect.deleteProperty()`**\nmethod allows to delete properties. It is like the\n[`delete` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete)\nas a function.\n\n## Syntax\n\n```js\nReflect.deleteProperty(target, propertyKey)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to delete the property.\n- `propertyKey`\n  - : The name of the property to be deleted.\n\n### Return value\n\nA `Boolean` indicating whether or not the property was successfully\ndeleted.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.deleteProperty` method allows you to delete a property on an\nobject. It returns a `Boolean` indicating whether or not the property was\nsuccessfully deleted. It is almost identical to the non-strict\n[`delete` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete).\n"
  },
  {
    "path": "documentation/docs/globals/Reflect/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.get()\n\nThe static **`Reflect.get()`** method works like getting a\nproperty from an object (`target[propertyKey]`) as a function.\n\n## Syntax\n\n```js\nReflect.get(target, propertyKey)\nReflect.get(target, propertyKey, receiver)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to get the property.\n- `propertyKey`\n  - : The name of the property to get.\n- `receiver` _**optional**_\n  - : The value of `this` provided for the call to\n    `target` if a getter is encountered. When used with\n    `Proxy`, it can be an object that inherits from\n    `target`.\n\n### Return value\n\nThe value of the property.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.get` method allows you to get a property on an object. It is like the\n[property accessor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Property_Accessors) syntax as a function.\n"
  },
  {
    "path": "documentation/docs/globals/Reflect/getOwnPropertyDescriptor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.getOwnPropertyDescriptor()\n\nThe static\n**`Reflect.getOwnPropertyDescriptor()`** method is similar to\n[`Object.getOwnPropertyDescriptor()`](../../globals/Object/getOwnPropertyDescriptor.mdx). It returns a property descriptor of\nthe given property if it exists on the object, `undefined`\notherwise.\n\n\n\n## Syntax\n\n```js\nReflect.getOwnPropertyDescriptor(target, propertyKey)\n```\n\n### Parameters\n\n- `target`\n  - : The target object in which to look for the property.\n- `propertyKey`\n  - : The name of the property to get an own property descriptor for.\n\n### Return value\n\nA property descriptor object if the property exists in `target`\nobject; otherwise, [`undefined`](../../globals/undefined.mdx).\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.getOwnPropertyDescriptor` method returns a property descriptor\nof the given property if it exists in the `target` object,\n[`undefined`](../../globals/undefined.mdx) otherwise. The only difference to\n[`Object.getOwnPropertyDescriptor()`](../../globals/Object/getOwnPropertyDescriptor.mdx) is how non-object targets are handled.\n"
  },
  {
    "path": "documentation/docs/globals/Reflect/getPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.getPrototypeOf()\n\nThe static **`Reflect.getPrototypeOf()`** method is almost the\nsame method as [`Object.getPrototypeOf()`](../../globals/Object/getPrototypeOf.mdx). It returns the prototype (i.e. the\nvalue of the internal `[[Prototype]]` property) of the specified object.\n\n\n\n## Syntax\n\n```js\nReflect.getPrototypeOf(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object of which to get the prototype.\n\n### Return value\n\nThe prototype of the given object. If there are no inherited properties,\n[`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) is returned.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.getPrototypeOf` method returns the prototype (i.e. the value of\nthe internal `[[Prototype]]` property) of the specified object.\n"
  },
  {
    "path": "documentation/docs/globals/Reflect/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.has()\n\nThe static **`Reflect.has()`** method works like the [`in` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/in)\nas a function.\n\n## Syntax\n\n```js\nReflect.has(target, propertyKey)\n```\n\n### Parameters\n\n- `target`\n  - : The target object in which to look for the property.\n- `propertyKey`\n  - : The name of the property to check.\n\n### Return value\n\nA `Boolean` indicating whether or not the `target`\nhas the property.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.has` method allows you to check if a property is in an object.\nIt works like the [`in` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/in)\nas a function.\n"
  },
  {
    "path": "documentation/docs/globals/Reflect/isExtensible.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.isExtensible()\n\nThe static **`Reflect.isExtensible()`** method determines if an object is extensible (whether it can have new properties added to it). It is similar to [`Object.isExtensible()`](../../globals/Object/isExtensible.mdx), but with [some differences](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/isExtensible#difference_with_object.isextensible).\n\n## Syntax\n\n```js\nReflect.isExtensible(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object which to check if it is extensible.\n\n### Return value\n\nA `Boolean` indicating whether or not the target is extensible.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an `Object`.\n"
  },
  {
    "path": "documentation/docs/globals/Reflect/ownKeys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.ownKeys()\n\nThe static **`Reflect.ownKeys()`** method returns an array of\nthe `target` object's own property keys.\n\n## Syntax\n\n```js\nReflect.ownKeys(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object from which to get the own keys.\n\n### Return value\n\nAn `Array` of the `target` object's own property\nkeys.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.ownKeys` method returns an array of the\n`target` object's own property keys. Its return value is\nequivalent to `Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target))`.\n"
  },
  {
    "path": "documentation/docs/globals/Reflect/preventExtensions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.preventExtensions()\n\nThe static **`Reflect.preventExtensions()`** method prevents new properties from ever being added to an object (i.e., prevents future extensions to the object). It is similar to [`Object.preventExtensions()`](../../globals/Object/preventExtensions.mdx), but with [some differences](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/preventExtensions#difference_with_object.preventextensions).\n\n## Syntax\n\n```js\nReflect.preventExtensions(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to prevent extensions.\n\n### Return value\n\nA `Boolean` indicating whether or not the target was successfully set to prevent extensions.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an `Object`.\n"
  },
  {
    "path": "documentation/docs/globals/Reflect/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.set()\n\nThe static **`Reflect.set()`** method works like setting a\nproperty on an object.\n\n## Syntax\n\n```js\nReflect.set(target, propertyKey, value)\nReflect.set(target, propertyKey, value, receiver)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to set the property.\n- `propertyKey`\n  - : The name of the property to set.\n- `value`\n  - : The value to set.\n- `receiver` _**optional**_\n  - : The value of `this` provided for the call to the setter for `propertyKey` on `target`. If provided and `target` does not have a setter for `propertyKey`, the property will be set on `receiver` instead.\n\n### Return value\n\nA `Boolean` indicating whether or not setting the property was successful.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.set` method allows you to set a property on an object. It does\nproperty assignment and is like the\n[property accessor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Property_Accessors) syntax as a function.\n"
  },
  {
    "path": "documentation/docs/globals/Reflect/setPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.setPrototypeOf()\n\nThe static\n**`Reflect.setPrototypeOf()`** method is the same method as\n[`Object.setPrototypeOf()`](../../globals/Object/setPrototypeOf.mdx), except for its return type. It sets the\nprototype (i.e., the internal `[[Prototype]]` property) of a specified\nobject to another object or to [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null), and returns `true` if\nthe operation was successful, or `false` otherwise.\n\n## Syntax\n\n```js\nReflect.setPrototypeOf(target, prototype)\n```\n\n### Parameters\n\n- `target`\n  - : The target object of which to set the prototype.\n- `prototype`\n  - : The object's new prototype (an object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null)).\n\n### Return value\n\nA `Boolean` indicating whether or not the prototype was successfully set.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object` or if `prototype` is neither an object nor\n[`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null).\n\n## Description\n\nThe `Reflect.setPrototypeOf` method changes the prototype (i.e. the value of\nthe internal `[[Prototype]]` property) of the specified object.\n\n"
  },
  {
    "path": "documentation/docs/globals/Request/Request.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request()\n\nThe **`Request()`** constructor creates a new\n`Request` object.\n\n## Syntax\n\n```js\nnew Request(input)\nnew Request(input, options)\n```\n\n### Parameters\n\n- `input`\n\n  - : Defines the resource that you wish to fetch. This can either be:\n\n    - A string containing the direct URL of the resource you want to\n      fetch.\n    - A `Request` object, effectively creating a copy.\n\n- `options` _**optional**_\n\n  - : An object containing any custom settings that you want to apply to the\n    request. The possible options are:\n\n    - `method`\n      - : The request method, e.g., `GET`, `POST`. The default is `GET`.\n    - `headers`\n      - : Any headers you want to add to your request, contained\n        within a `Headers` object or an object literal with `String` values.\n    - `body`\n      - : Any body that you want to add to your request: this can be an `ArrayBuffer`, a `TypedArray`, a `DataView`, a `URLSearchParams`, string object or literal, a `ReadableStream` object, a [`Blob`](../../globals/Blob/Blob.mdx) object, or a [`FormData`](../../globals/FormData/FormData.mdx) object.\n    - `backend` _**Fastly-specific**_\n    - `cacheOverride` _**Fastly-specific**_, see [`CacheOverride`](../../fastly:cache-override/CacheOverride/CacheOverride.mdx).\n    - `cacheKey` _**Fastly-specific**_\n    - `manualFramingHeaders`_: boolean_ _**optional**_ _**Fastly-specific**_\n      - : The default value is `false`, which means that the framing headers are automatically created based on the message body.\n        In \"automatic\" mode, a `Content-Length` is used when the size of the body can be determined before it is sent.\n        Requests sent in streaming mode, where headers are sent immediately but the content of the body is streamed later, will receive a `Transfer-Encoding: chunked` to accommodate the dynamic generation of the body.\n        In \"manual\" mode, any `Content-Length` or `Transfer-Encoding` headers will be honored.\n        You must ensure that those headers have correct values permitted by the [HTTP/1.1 specification](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).\n        If the provided headers are not permitted by the specification, the headers will revert to \"automatic\" mode and a diagnostic message will be logged about what was wrong.\n        If a `Content-Length` is permitted by the specification, but the value does not match the size of the actual body, the body will either be truncated (if it is too long), or the connection will be hung up early (if it is too short).\n    - `fastly` _**Fastly-specific**_\n      - `decompressGzip`_: boolean_ _**optional**_\n        - Whether to automatically gzip decompress the Response or not."
  },
  {
    "path": "documentation/docs/globals/Request/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the `Request` interface\nreads the request body and returns it as a promise that resolves with an `ArrayBuffer`.\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an `ArrayBuffer`.\n"
  },
  {
    "path": "documentation/docs/globals/Request/prototype/blob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.blob()\n\nThe **`blob()`** method of the `Request` interface reads the request body and returns it as a promise that resolves with a `Blob`.\n\n## Syntax\n\n```js\nblob()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a [`Blob`](../../../globals/Blob/Blob.mdx).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the request body has already been used or if the request's method is `GET` or `HEAD`.\n"
  },
  {
    "path": "documentation/docs/globals/Request/prototype/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.body\n\nThe read-only **`body`** property of the `Request`\ninterface contains a `ReadableStream` with the body contents\nthat have been added to the request. Note that a request using the\n`GET` or `HEAD` method cannot have a body\nand `null` is returned in these cases.\n\n## Value\n\nA `ReadableStream` or `null`.\n"
  },
  {
    "path": "documentation/docs/globals/Request/prototype/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.bodyUsed\n\nThe read-only **`bodyUsed`** property of the\n`Request` interface is a boolean value that indicates\nwhether the request body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/docs/globals/Request/prototype/clone.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.clone()\n\nThe **`clone()`** method of the `Request` interface creates a copy of the current `Request` object.\n\nLike the underlying `ReadableStream.tee`` api, the `body` of a cloned `Response`\nwill signal backpressure at the rate of the _faster_ consumer of the two bodies,\nand unread data is enqueued internally on the slower consumed `body`\nwithout any limit or backpressure.\nBeware when you construct a `Request` from a stream and then `clone` it.\n\n`clone()` throws a `TypeError` if the request body has already been used. In fact, the main reason `clone()` exists is to allow multiple uses of body objects (when they are one-use only.)\n\nIf you intend to modify the request, you may prefer the `Request` constructor.\n\n## Syntax\n\n```js\nclone()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Request` object, which is an exact copy of the `Request` that `clone()` was called on.\n\n"
  },
  {
    "path": "documentation/docs/globals/Request/prototype/formData.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.formData()\n\nThe **`formData()`** method of the `Request` interface reads the request body and returns it as a promise that resolves with a `FormData` object.\n\n## Syntax\n\n```js\nformData()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a [`FormData`](../../../globals/FormData/FormData.mdx) object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the request body has already been used or if the request's method is `GET` or `HEAD`.\n- `SyntaxError`\n  - : Thrown if the request's content type is not `multipart/form-data` or `application/x-www-form-urlencoded`, or if the content cannot be parsed as form data.\n"
  },
  {
    "path": "documentation/docs/globals/Request/prototype/headers.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.headers\n\nThe **`headers`** read-only property of the\n`Request` interface contains the `Headers` object associated\nwith the request.\n\n## Value\n\nA `Headers` object.\n"
  },
  {
    "path": "documentation/docs/globals/Request/prototype/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.json()\n\nThe **`json()`** method of the `Request` interface\nreads the request body and returns it as a promise that resolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a JavaScript object. This object could be\nanything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/docs/globals/Request/prototype/method.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.method\n\nThe **`method`** read-only property of the\n`Request` interface contains the request's method (`GET`, `POST`, etc.)\n\n## Value\n\nA `String` indicating the method of the request.\n"
  },
  {
    "path": "documentation/docs/globals/Request/prototype/setManualFramingHeaders.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.setManualFramingHeaders()\n\nThe **`setManualFramingHeaders()`** method of the `Request` interface controls how the framing headers should be determined.\n\nBy default the framing headers are set to \"automatic\" mode, which means they are created based on the body of the associated Request instance.\nIn \"automatic\" mode, a `Content-Length` is used when the size of the body can be determined before it is sent.\nRequests sent in streaming mode, where headers are sent immediately but the content of the body is streamed later, will receive a `Transfer-Encoding: chunked` to accommodate the dynamic generation of the body.\nIn \"manual\" mode, any `Content-Length` or `Transfer-Encoding` headers will be honored.\nYou must ensure that those headers have correct values permitted by the [HTTP/1.1 specification](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).\nIf the provided headers are not permitted by the specification, the headers will revert to \"automatic\" mode and a diagnostic message will be logged about what was wrong.\nIf a `Content-Length` is permitted by the specification, but the value does not match the size of the actual body, the body will either be truncated (if it is too long), or the connection will be hung up early (if it is too short).\n\n## Syntax\n\n## Syntax\n\n```js\nsetManualFramingHeaders(manual)\n```\n\n### Parameters\n\n- `manual` _: boolean_\n  - : Whether or not to use \"manual\" mode for the framing headers.\n\n### Return value\n\n`undefined`.\n\n"
  },
  {
    "path": "documentation/docs/globals/Request/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.text()\n\nThe **`text()`** method of the `Request` interface\nreads the request body and returns it as a promise that resolves with a `String`.\nThe response is _always_ decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Promise that resolves with a `String`.\n"
  },
  {
    "path": "documentation/docs/globals/Request/prototype/url.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.url\n\nThe **`url`** read-only property of the `Request` interface contains the URL of the request.\n\n## Value\n\nA string indicating the URL of the request.\n\n"
  },
  {
    "path": "documentation/docs/globals/Response/Response.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response()\n\nThe **`Response()`** constructor creates a new `Response` object.\n\n## Syntax\n\n```js\nnew Response()\nnew Response(body)\nnew Response(body, options)\n```\n\n### Parameters\n\n- `body` _**optional**_\n\n  - : An object defining a body for the response. This can be `null` (which is\n    the default value), or one of:\n\n    - [`ArrayBuffer`](../../globals/ArrayBuffer/ArrayBuffer.mdx)\n    - `TypedArray`\n    - [`DataView`](../../globals/DataView/DataView.mdx)\n    - [`ReadableStream`](../../globals/ReadableStream/ReadableStream.mdx)\n    - [`URLSearchParams`](../../globals/URLSearchParams/URLSearchParams.mdx)\n    - [`String`](../../globals/String/String.mdx)\n    - string literal\n    - [`Blob`](../../globals/Blob/Blob.mdx)\n    - [`FormData`](../../globals/FormData/FormData.mdx)\n\n- `options` _**optional**_\n\n  - : An options object containing any custom settings that you want to apply to the\n    response, or an empty object (which is the default value). The possible options are:\n\n    - `status`\n      - : The status code for the response, e.g., `200`.\n    - `statusText`\n      - : The status message associated with the status code,\n        e.g., `OK`.\n    - `headers`\n      - : Any headers you want to add to your response, contained\n        within a [`Headers`](../../globals/Headers/Headers.mdx) object or object literal of\n        [`String`](../../globals/String/String.mdx) key/value pairs.\n    - `manualFramingHeaders`_: boolean_ _**optional**_ _**Fastly-specific**_\n      - : The default value is `false`, which means that the framing headers are automatically created based on the message body.\n        In \"automatic\" mode, a `Content-Length` is used when the size of the body can be determined before it is sent.\n        Responses sent in streaming mode, where headers are sent immediately but the content of the body is streamed later, will receive a `Transfer-Encoding: chunked` to accommodate the dynamic generation of the body.\n        In \"manual\" mode, any `Content-Length` or `Transfer-Encoding` headers will be honored.\n        You must ensure that those headers have correct values permitted by the [HTTP/1.1 specification](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).\n        If the provided headers are not permitted by the specification, the headers will revert to \"automatic\" mode and a diagnostic message will be logged about what was wrong.\n        If a `Content-Length` is permitted by the specification, but the value does not match the size of the actual body, the body will either be truncated (if it is too long), or the connection will be hung up early (if it is too short).\n"
  },
  {
    "path": "documentation/docs/globals/Response/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface\ntakes a [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion. It returns a promise\nthat resolves with an [`ArrayBuffer`](../../../globals/ArrayBuffer/ArrayBuffer.mdx).\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an [`ArrayBuffer`](../../../globals/ArrayBuffer/ArrayBuffer.mdx).\n"
  },
  {
    "path": "documentation/docs/globals/Response/prototype/blob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.blob()\n\nThe **`blob()`** method of the [`Response`](../Response.mdx) interface takes a [`Response`](../Response.mdx) stream and reads it to completion. It returns a promise that resolves with a `Blob`.\n\n## Syntax\n\n```js\nblob()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a [`Blob`](../../../globals/Blob/Blob.mdx).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the response body has already been consumed.\n"
  },
  {
    "path": "documentation/docs/globals/Response/prototype/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.body\n\nThe **`body`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface is a [`ReadableStream`](../../../globals/ReadableStream/ReadableStream.mdx) of the body contents.\n\n## Value\n\nA [`ReadableStream`](../../../globals/ReadableStream/ReadableStream.mdx), or else `null` for any `Response` object [constructed](../../../globals/Response/Response.mdx) with a null `body` property, or for any actual HTTP response that has no body.\n\n"
  },
  {
    "path": "documentation/docs/globals/Response/prototype/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.bodyUsed\n\nThe **`bodyUsed`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface is a boolean value that indicates whether the body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/docs/globals/Response/prototype/formData.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.formData()\n\nThe **`formData()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface takes a [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion. It returns a promise that resolves with a `FormData` object.\n\n## Syntax\n\n```js\nformData()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a [`FormData`](../../../globals/FormData/FormData.mdx) object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the response body has already been consumed.\n- `SyntaxError`\n  - : Thrown if the response's content type is not `multipart/form-data` or `application/x-www-form-urlencoded`, or if the content cannot be parsed as form data.\n"
  },
  {
    "path": "documentation/docs/globals/Response/prototype/headers.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.headers\n\nThe **`headers`** read-only property of the\n[`Response`](../../../globals/Response/Response.mdx) interface contains the [`Headers`](../../../globals/Headers/Headers.mdx) object associated\nwith the response.\n\n## Value\n\nA [`Headers`](../../Headers/Headers.mdx) object.\n"
  },
  {
    "path": "documentation/docs/globals/Response/prototype/ip.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.ip\n\nThe **`ip`** getter of the `Response` interface returns the IP address associated with the request, as either an IPv6 or IPv4 string.\n\nIn the case where no IP address is available (say the response is cached, or was manually created), `undefined` will be returned.\n\nTo ensure an origin request with an IP, pass a [`CacheOverride`](../../../fastly:cache-override/CacheOverride/CacheOverride.mdx) value.\n\n## Value\n\n`undefined` or `string`.\n"
  },
  {
    "path": "documentation/docs/globals/Response/prototype/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.json()\n\nThe **`json()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface takes\na [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion. It returns a promise which\nresolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA [`Promise`](../../../globals/Promise/Promise.mdx) that resolves to a JavaScript object. This object could be\nanything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/docs/globals/Response/prototype/ok.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.ok\n\nThe **`ok`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains a Boolean stating whether the response was successful (status in the range 200-299) or not.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/docs/globals/Response/prototype/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.port\n\nThe **`port`** getter of the `Response` interface returns the port associated with the request, as a number.\n\nIn the case where no port is available (say the response is cached, or was manually created), `undefined` will be returned.\n\nTo ensure an origin request with a port, pass a [`CacheOverride`](../../../fastly:cache-override/CacheOverride/CacheOverride.mdx) value.\n\n## Value\n\n`undefined` or `number`.\n"
  },
  {
    "path": "documentation/docs/globals/Response/prototype/setManualFramingHeaders.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.setManualFramingHeaders()\n\nThe **`setManualFramingHeaders()`** method of the `Response` interface controls how the framing headers should be determined.\n\nBy default the framing headers are set to \"automatic\" mode, which means they are created based on the body of the associated Response instance.\nIn \"automatic\" mode, a `Content-Length` is used when the size of the body can be determined before it is sent.\nResponses sent in streaming mode, where headers are sent immediately but the content of the body is streamed later, will receive a `Transfer-Encoding: chunked` to accommodate the dynamic generation of the body.\nIn \"manual\" mode, any `Content-Length` or `Transfer-Encoding` headers will be honored.\nYou must ensure that those headers have correct values permitted by the [HTTP/1.1 specification](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).\nIf the provided headers are not permitted by the specification, the headers will revert to \"automatic\" mode and a diagnostic message will be logged about what was wrong.\nIf a `Content-Length` is permitted by the specification, but the value does not match the size of the actual body, the body will either be truncated (if it is too long), or the connection will be hung up early (if it is too short).\n\n## Syntax\n\n```js\nsetManualFramingHeaders(manual)\n```\n\n### Parameters\n\n- `manual` _: boolean_\n  - : Whether or not to use \"manual\" mode for the framing headers.\n\n### Return value\n\n`undefined`.\n\n"
  },
  {
    "path": "documentation/docs/globals/Response/prototype/status.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.status\n\nThe **`status`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains the HTTP status code of the response.\n\nFor example, `200` for success, `404` if the resource could not be found.\n\n## Value\n\nAn unsigned short number.\n"
  },
  {
    "path": "documentation/docs/globals/Response/prototype/statusText.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.statusText\n\nThe **`statusText`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains the status message corresponding to the HTTP status code in [`status`](../../../globals/Response/prototype/status.mdx).\n\nFor example, this would be `OK` for a status code `200`, `Continue` for `100`, `Not Found` for `404`.\n\n## Value\n\nA [`String`](../../../globals/String/String.mdx) containing the HTTP status message associated with the response.\nThe default value is \"\".\n"
  },
  {
    "path": "documentation/docs/globals/Response/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.text()\n\nThe **`text()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface takes a [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion.\nIt returns a promise that resolves with a [`String`](../../../globals/String/String.mdx).\nThe response is _always_ decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Promise that resolves with a [`String`](../../../globals/String/String.mdx).\n\n"
  },
  {
    "path": "documentation/docs/globals/Response/prototype/url.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.url\n\nThe **`url`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains the URL of the response.\nThe value of the `url` property will be the final URL obtained after any redirects.\n\n## Value\n\nA string.\n\n"
  },
  {
    "path": "documentation/docs/globals/Response/redirect.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Response.redirect()\n\nThe **`redirect()`** static method of the `Response` interface returns a `Response` resulting in a redirect to the specified URL.\n\n## Syntax\n\n```js\nResponse.redirect(url)\nResponse.redirect(url, status)\n```\n\n### Parameters\n\n- `url`\n  - : The URL that the new response is to originate from.\n- `status` __optional__\n  - : An optional status code for the response (e.g., `302`.)\n\n### Return value\n\nA `Response` object.\n\n### Exceptions\n\n- `RangeError`\n  - : The specified status is not a redirect status.\n- `TypeError`\n  - : The specified URL is invalid.\n"
  },
  {
    "path": "documentation/docs/globals/RsaHashedImportParams/RsaHashedImportParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RsaHashedImportParams\n\nThe **`RsaHashedImportParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.importKey()`, when importing any RSA-based key pair.\n\n## Instance properties\n\n- `name`\n  - : A string. This should be set to `RSASSA-PKCS1-v1_5`.\n\n- `hash`\n  - : A string representing the name of the digest function to use. This can be one of `SHA-256`, `SHA-384`, or `SHA-512`.\n\n"
  },
  {
    "path": "documentation/docs/globals/Set/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get Set\\[Symbol.species]\n\nThe **`Set[Symbol.species]`** accessor property is an unused accessor property specifying how to copy `Set` objects.\n\n## Syntax\n\n```js\nSet[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct copied `Set` instances.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `Set` objects. Subclass constructors may override it to change the constructor assignment.\n\n> **Note:** This property is currently unused by all `Set` methods.\n"
  },
  {
    "path": "documentation/docs/globals/Set/Set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set()\n\nThe **`Set` constructor** lets you\ncreate `Set` objects that store unique values of any type, whether [primitive values](https://developer.mozilla.org/docs/Glossary/Primitive) or object\nreferences.\n\n## Syntax\n\n```js\nnew Set()\nnew Set(iterable)\n```\n\n> **Note:** `Set()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable` _**optional**_\n\n  - : If an [iterable object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) is passed, all of its elements will be added to the new\n    `Set`.\n\n    If you don't specify this parameter, or its value is `null`, the new\n    `Set` is empty.\n\n### Return value\n\nA new `Set` object.\n"
  },
  {
    "path": "documentation/docs/globals/Set/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype\\[Symbol.iterator]()\n\nThe **`[Symbol.iterator`** method of a `Set` object implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows sets to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the values of the set.\n\nThe initial value of this property is the same function object as the initial value of the [`Set.prototype.values`](../../../globals/Set/prototype/values.mdx) property.\n\n## Syntax\n\n```js\nset[Symbol.iterator]()\n```\n\n### Return value\n\nThe same return value as [`Set.prototype.values()`](../../../globals/Set/prototype/values.mdx): a new iterable iterator object that yields the values of the set.\n"
  },
  {
    "path": "documentation/docs/globals/Set/prototype/add.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.add()\n\nThe **`add()`** method inserts a new element with a specified value in to a `Set` object, if there isn't an element with the same value already in the `Set`.\n\n## Syntax\n\n```js\nadd(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value of the element to add to the `Set` object.\n\n### Return value\n\nThe `Set` object with added value.\n"
  },
  {
    "path": "documentation/docs/globals/Set/prototype/clear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.clear()\n\nThe **`clear()`** method removes all elements from a\n`Set` object.\n\n## Syntax\n\n```js\nclear()\n```\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/docs/globals/Set/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.delete()\n\nThe **`delete()`** method removes a specified value from a\n`Set` object, if it is in the set.\n\n## Syntax\n\n```js\ndelete(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to remove from `Set`.\n\n### Return value\n\nReturns `true` if `value` was already in\n`Set`; otherwise `false`.\n"
  },
  {
    "path": "documentation/docs/globals/Set/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.entries()\n\nThe **`entries()`** method returns a new [Iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators) object\nthat contains **an array of `[value, value]`** for each element\nin the `Set` object, in insertion order. For `Set` objects there\nis no `key` like in `Map` objects. However, to keep the API\nsimilar to the `Map` object, each _entry_ has the same value for its\n_key_ and _value_ here, so that an array `[value, value]` is\nreturned.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nA new iterator object that contains an array of `[value, value]` for each\nelement in the given `Set`, in insertion order.\n"
  },
  {
    "path": "documentation/docs/globals/Set/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.forEach()\n\nThe **`forEach()`** method executes a provided function once\nfor each value in the `Set` object, in insertion order.\n\n## Syntax\n\n```js\n// Arrow function\nforEach(() => { /* ... */ } )\nforEach((value) => { /* ... */ } )\nforEach((value, key) => { /* ... */ } )\nforEach((value, key, set) => { /* ... */ } )\n\n// Callback function\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n\n// Inline callback function\nforEach(function() { /* ... */ })\nforEach(function(value) { /* ... */ })\nforEach(function(value, key) { /* ... */ })\nforEach(function(value, key, set) { /* ... */ })\nforEach(function(value, key, set) { /* ... */ }, thisArg)\n```\n\n### Parameters\n\n- `callback`\n\n  - : Function to execute for each element, taking three arguments:\n\n    - `value`, `key`\n      - : The current element being processed in the `Set`. As there are no\n        keys in `Set`, the value is passed for both arguments.\n    - `set`\n      - : The `Set` object which `forEach()` was called upon.\n\n- `thisArg`\n  - : Value to use as `this` when executing `callbackFn`.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n## Description\n\nThe `forEach()` method executes the provided\n`callback` once for each value which actually exists in the\n`Set` object. It is not invoked for values which have been deleted. However,\nit is executed for values which are present but have the value `undefined`.\n\n`callback` is invoked with **three arguments**:\n\n- the **element value**\n- the **element key**\n- the **`Set` object being traversed**\n\nThere are no keys in `Set` objects, however, so the first two arguments are\nboth **values** contained in the [Set](../../../globals/Set/Set.mdx). This is to make it\nconsistent with other `forEach()` methods for [`Map.prototype.forEach()`](../../../globals/Map/prototype/forEach.mdx) and [`Array.prototype.forEach()`](../../../globals/Array/prototype/forEach.mdx).\n\nIf a `thisArg` parameter is provided to `forEach()`,\nit will be passed to `callback` when invoked, for use as its\n`this` value. Otherwise, the value `undefined` will be passed for\nuse as its `this` value. The `this` value ultimately observable by\n`callback` is determined according to\n[the usual rules for determining the `this` seen by a function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this).\n\nEach value is visited once, except in the case when it was deleted and re-added before\n`forEach()` has finished. `callback` is not invoked for\nvalues deleted before being visited. New values added before `forEach()` has\nfinished will be visited.\n\n`forEach()` executes the `callback` function once for\neach element in the `Set` object; it does not return a value.\n"
  },
  {
    "path": "documentation/docs/globals/Set/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.has()\n\nThe **`has()`** method returns a boolean indicating whether an\nelement with the specified value exists in a `Set` object or not.\n\n## Syntax\n\n```js\nhas(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to test for presence in the `Set` object.\n\n### Return value\n\nReturns `true` if an element with the specified value exists in the `Set` object; otherwise `false`.\n"
  },
  {
    "path": "documentation/docs/globals/Set/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.keys()\n\nThe **`keys()`** method is an alias for the [`values()`](../../../globals/Set/prototype/values.mdx) method.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nA new iterator object containing the values for each element in the given\n`Set`, in insertion order.\n"
  },
  {
    "path": "documentation/docs/globals/Set/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.size\n\nThe **`size`** accessor property returns the number of (unique) elements in a [Set](../../../globals/Set/Set.mdx) object.\n\n## Description\n\nThe value of `size` is an integer representing how many entries the `Set` object has. A set accessor function for `size` is `undefined`; you cannot change this property.\n"
  },
  {
    "path": "documentation/docs/globals/Set/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.values()\n\nThe **`values()`** method returns a new [Iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators) object that\ncontains the values for each element in the `Set` object in insertion order.\n\n> **Note:** The **`keys()`** method is an alias\n> for this method (for similarity with [Map](../../../globals/Map/Map.mdx) objects), hence the\n> `keys()` page redirecting here. It behaves exactly the same and returns\n> **values** of `Set` elements.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nA new iterator object containing the values for each element in the given\n`Set`, in insertion order.\n"
  },
  {
    "path": "documentation/docs/globals/String/String.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String() constructor\n\nThe **`String`** constructor is used to create a new\n`String` object. When called instead as a function, it performs type\nconversion to a \"primitive string\" which is usually more\nuseful.\n\n## Syntax\n\n```js\nnew String(thing)\nString(thing)\n```\n\n> **Note:** `String()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\n- `thing`\n  - : Anything to be converted to a string.\n\n### Return value\n\nWhen `String` is called as a constructor (with `new`), it creates a `String` object, which is **not** a primitive.\n\nWhen `String` is called as a function, it coerces the parameter to a string primitive. `Symbol` values would be converted to `\"Symbol(description)\"`, where `description` is the [description](../../globals/Symbol/prototype/description.mdx) of the Symbol, instead of throwing.\n\n> **Warning:** You should rarely find yourself using `String` as a constructor.\n"
  },
  {
    "path": "documentation/docs/globals/String/fromCharCode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.fromCharCode()\n\nThe static **`String.fromCharCode()`** method returns a string\ncreated from the specified sequence of UTF-16 code units.\n\n## Syntax\n\n```js\nString.fromCharCode(num1)\nString.fromCharCode(num1, num2)\nString.fromCharCode(num1, num2, /* …, */ numN)\n```\n\n### Parameters\n\n- `num1, ..., numN`\n  - : A sequence of numbers that are UTF-16 code units. The range is between\n    `0` and `65535` (`0xFFFF`). Numbers greater than\n    `0xFFFF` are truncated. No validity checks are performed.\n\n### Return value\n\nA string of length `N` consisting of the\n`N` specified UTF-16 code units.\n\n## Description\n\nThis method returns a string and not a `String` object.\n\nBecause `fromCharCode()` is a static method of `String`, you\nalways use it as `String.fromCharCode()`, rather than as a method of a\n`String` object you created.\n"
  },
  {
    "path": "documentation/docs/globals/String/fromCodePoint.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.fromCodePoint()\n\nThe static **`String.fromCodePoint()`** method returns a string\ncreated by using the specified sequence of code points.\n\n## Syntax\n\n```js\nString.fromCodePoint(num1)\nString.fromCodePoint(num1, num2)\nString.fromCodePoint(num1, num2, /* …, */ numN)\n```\n\n### Parameters\n\n- `num1, ..., numN`\n  - : A sequence of code points.\n\n### Return value\n\nA string created by using the specified sequence of code points.\n\n### Exceptions\n\n- A `RangeError` is thrown if an invalid Unicode\n  code point is given (e.g. `\"RangeError: NaN is not a valid code point\"`).\n\n## Description\n\nThis method returns a string (and _not_ a `String` object).\n\nBecause `fromCodePoint()` is a static method of `String`, you\nmust call it as `String.fromCodePoint()`, rather than as a method of a\n`String` object you created.\n"
  },
  {
    "path": "documentation/docs/globals/String/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype\\[Symbol.iterator]()\n\nThe **`Symbol.iterator`** method of a string implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows strings to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the Unicode code points of the string value as individual strings.\n\n## Syntax\n\n```js\nstring[Symbol.iterator]()\n```\n\n### Return value\n\nA new iterable iterator object that yields the Unicode code points of the string value as individual strings.\n\n## Description\n\nStrings are iterated by Unicode code points. This means grapheme clusters will be split, but surrogate pairs will be preserved.\n\n```js\n// \"Backhand Index Pointing Right: Dark Skin Tone\"\n[...\"👉🏿\"]; // ['👉', '🏿']\n// splits into the basic \"Backhand Index Pointing Right\" emoji and\n// the \"Dark skin tone\" emoji\n\n// \"Family: Man, Boy\"\n[...\"👨‍👦\"]; // [ '👨', '‍', '👦' ]\n// splits into the \"Man\" and \"Boy\" emoji, joined by a ZWJ\n```\n"
  },
  {
    "path": "documentation/docs/globals/String/prototype/at.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.at()\n\nThe **`at()`** method takes an integer value and returns a `('String` consisting of the single UTF-16 code unit located at the specified offset. This method allows for positive and negative integers. Negative integers count back from the last string character.\n\n## Syntax\n\n```js\nat(index)\n```\n\n### Parameters\n\n- `index`\n  - : The index (position) of the string character to be returned. Supports relative indexing from the end of the string when passed a negative index; i.e. if a negative number is used, the character returned will be found by counting back from the end of the string.\n\n### Return value\n\n`('String` consisting of the single UTF-16 code unit located at the specified position. Returns [`undefined`](../../../globals/undefined.mdx) if the given index can not be found.\n"
  },
  {
    "path": "documentation/docs/globals/String/prototype/charAt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.charAt()\n\nThe `String` object's\n**`charAt()`** method returns a new string consisting of the\nsingle UTF-16 code unit located at the specified offset into the string.\n\n## Syntax\n\n```js\ncharAt(index)\n```\n\n### Parameters\n\n- `index`\n  - : An integer between `0` and `str.length - 1`. If the\n    `index` cannot be converted to the integer or no\n    `index` is provided, the default is `0`, so the first\n    character of `str` is returned.\n\n### Return value\n\nA string representing the character (exactly one UTF-16 code unit) at the specified\n`index`. If `index` is out of range,\n`charAt()` returns an empty string.\n\n## Description\n\nCharacters in a string are indexed from left to right. The index of the first character\nis `0`, and the index of the last character—in a string called\n`stringName` is `stringName.length - 1`. If\nthe `index` you supply is out of this range, JavaScript returns an\nempty string.\n\nIf no `index` is provided to `charAt()`, the default\nis `0`.\n"
  },
  {
    "path": "documentation/docs/globals/String/prototype/charCodeAt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.charCodeAt()\n\nThe **`charCodeAt()`** method returns\nan integer between `0` and `65535` representing the UTF-16 code\nunit at the given index.\n\nThe UTF-16 code unit matches the Unicode code point for code points which can be\nrepresented in a single UTF-16 code unit. If the Unicode code point cannot be\nrepresented in a single UTF-16 code unit (because its value is greater than\n`0xFFFF`) then the code unit returned will be _the first part of a\nsurrogate pair_ for the code point. If you want the entire code point value, use\n[`codePointAt()`](../../../globals/String/prototype/codePointAt.mdx).\n\n## Syntax\n\n```js\ncharCodeAt(index)\n```\n\n### Parameters\n\n- `index`\n  - : An integer greater than or equal to `0` and less than the\n    `length` of the string. If `index` is not a number,\n    it defaults to `0`.\n\n### Return value\n\nA number representing the UTF-16 code unit value of the character at the given\n`index`. If `index` is out of range,\n`charCodeAt()` returns `NaN`.\n\n## Description\n\nUnicode code points range from `0` to `1114111`\n(`0x10FFFF`). The first 128 Unicode code points are a direct match of the\nASCII character encoding. (For information on Unicode, see [UTF-16 characters, Unicode codepoints, and grapheme clusters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters).)\n\n> **Note:** `charCodeAt()` will always return a value that is\n> less than `65536`. This is because the higher code points are represented\n> by _a pair_ of (lower valued) \"surrogate\" pseudo-characters which are used to\n> comprise the real character.\n>\n> Because of this, in order to examine (or reproduce) the full character for individual\n> character values of `65536` or greater, for such characters, it is\n> necessary to retrieve not only `charCodeAt(i)`, but also\n> `charCodeAt(i+1)` (as if manipulating a string with two\n> letters), or to use `codePointAt(i)` instead. See examples 2 and\n> 3 (below).\n\n`charCodeAt()` returns `NaN` if the given\nindex is less than `0`, or if it is equal to or greater than the\n`length` of the string.\n\nBackward compatibility: In historic versions (like JavaScript 1.2) the\n`charCodeAt()` method returns a number indicating the ISO-Latin-1 codeset\nvalue of the character at the given index. The ISO-Latin-1 codeset ranges from\n`0` to `255`. The first `0` to `127` are a\ndirect match of the ASCII character set.\n"
  },
  {
    "path": "documentation/docs/globals/String/prototype/codePointAt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.codePointAt()\n\nThe **`codePointAt()`** method returns a non-negative integer\nthat is the Unicode code point value at the given position.\nNote that this function does not give the nth code point in a string,\nbut the code point starting at the specified string index.\n\n## Syntax\n\n```js\ncodePointAt(pos)\n```\n\n### Parameters\n\n- `pos`\n  - : Position of an element in `str` to return the code point value\n    from.\n\n### Return value\n\nA decimal number representing the code point value of the character at the given `pos`.\n\n- If there is no element at `pos`, returns [`undefined`](../../../globals/undefined.mdx).\n- If the element at `pos` is a UTF-16 high surrogate, returns the code point of the surrogate _pair_.\n- If the element at `pos` is a UTF-16 low surrogate, returns _only_ the low surrogate code point.\n"
  },
  {
    "path": "documentation/docs/globals/String/prototype/concat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.concat()\n\nThe **`concat()`** method concatenates\nthe string arguments to the calling string and returns a new string.\n\n## Syntax\n\n```js\nconcat(str1)\nconcat(str1, str2)\nconcat(str1, str2, /* …, */ strN)\n```\n\n### Parameters\n\n- `strN`\n  - : One or more strings to concatenate to `str`.\n\n### Return value\n\nA new string containing the combined text of the strings provided.\n\n## Description\n\nThe `concat()` function concatenates the string arguments to the calling\nstring and returns a new string. Changes to the original string or the returned string\ndon't affect the other.\n\nIf the arguments are not of the type string, they are converted to string values before\nconcatenating.\n\nThe `concat()` method is very similar to the [addition/string concatenation operators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Addition) (`+`, `+=`), except that `concat()` [coerces its arguments directly to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion), while addition coerces its operands to primitives first. For more information, see the reference page for the [`+` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Addition).\n"
  },
  {
    "path": "documentation/docs/globals/String/prototype/endsWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.endsWith()\n\nThe **`endsWith()`** method determines whether a string ends with the characters of a specified string, returning `true` or `false` as appropriate.\n\n## Syntax\n\n```js\nendsWith(searchString)\nendsWith(searchString, endPosition)\n```\n\n### Parameters\n\n- `searchString`\n  - : The characters to be searched for at the end of `str`. Cannot be a regex.\n- `endPosition` _**optional**_\n  - : The end position at which `searchString` is expected to be found (the index of `searchString`'s last character plus 1). Defaults to `str.length`.\n\n### Return value\n\n**`true`** if the given characters are found at the end of the string; otherwise, **`false`**.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If `searchString` is a regex.\n\n## Description\n\nThis method lets you determine whether or not a string ends with another string. This method is case-sensitive.\n"
  },
  {
    "path": "documentation/docs/globals/String/prototype/includes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.includes()\n\nThe **`includes()`** method performs a case-sensitive search to determine whether one string may be found within another string, returning `true` or `false` as appropriate.\n\n## Syntax\n\n```js\nincludes(searchString)\nincludes(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n  - : A string to be searched for within `str`. Cannot be a regex.\n- `position` _**optional**_\n  - : The position within the string at which to begin searching for `searchString`. (Defaults to `0`.)\n\n### Return value\n\n**`true`** if the search string is found anywhere within the given string; otherwise, **`false`** if not.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If `searchString` is a regex.\n\n## Description\n\nThis method lets you determine whether or not a string includes another string.\n\n### Case-sensitivity\n\nThe `includes()` method is case sensitive. For example, the following expression returns `false`:\n\n```js\n\"Blue Whale\".includes(\"blue\"); // returns false\n```\n\nYou can work around this constraint by transforming both the original string and the search string to all lowercase:\n\n```js\n\"Blue Whale\".toLowerCase().includes(\"blue\"); // returns true\n```\n"
  },
  {
    "path": "documentation/docs/globals/String/prototype/indexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.indexOf()\n\nThe **`indexOf()`** method, given one argument: a substring to search for, searches the entire calling string, and returns the index of the first occurrence of the specified substring. Given a second argument: a number, the method returns the first occurrence of the specified substring at an index greater than or equal to the specified number.\n\n## Syntax\n\n```js\nindexOf(searchString)\nindexOf(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n\n  - : Substring to search for, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion).\n\n    If the method is called with no arguments, `searchString` is coerced to `\"undefined\"`. Therefore,`\"undefined\".indexOf()` returns `0` — because the substring `\"undefined\"` is found at position `0` in the string `\"undefined\"`. But `\"undefine\".indexOf()`, returns `-1` — because the substring `\"undefined\"` is not found in the string `\"undefine\"`.\n\n- `position` _**optional**_\n\n  - : The method returns the index of the first occurrence of the specified substring at a position greater than or equal to `position`, which defaults to `0`. If `position` is greater than the length of the calling string, the method doesn't search the calling string at all. If `position` is less than zero, the method behaves as it would if `position` were `0`.\n\n    - `'hello world hello'.indexOf('o', -5)` returns `4` — because it causes the method to behave as if the second argument were `0`, and the first occurrence of `o` at a position greater or equal to `0` is at position `4`.\n\n    - `'hello world hello'.indexOf('world', 12)` returns `-1` — because, while it's true the substring `world` occurs at index `6`, that position is not greater than or equal to `12`.\n\n    - `'hello world hello'.indexOf('o', 99)` returns `-1` — because `99` is greater than the length of `hello world hello`, which causes the method to not search the string at all.\n\n### Return value\n\nThe index of the first occurrence of `searchString` found, or `-1` if not found.\n\n#### Return value when using an empty search string\n\nSearching for an empty search string produces strange results. With no second argument, or with a second argument whose value is less than the calling string's length, the return value is the same as the value of the second argument:\n\n```js\n\"hello world\".indexOf(\"\"); // returns 0\n\"hello world\".indexOf(\"\", 0); // returns 0\n\"hello world\".indexOf(\"\", 3); // returns 3\n\"hello world\".indexOf(\"\", 8); // returns 8\n```\n\nHowever, with a second argument whose value is greater than or equal to the string's length, the return value is the string's length:\n\n```js\n\"hello world\".indexOf(\"\", 11); // returns 11\n\"hello world\".indexOf(\"\", 13); // returns 11\n\"hello world\".indexOf(\"\", 22); // returns 11\n```\n\nIn the former instance, the method behaves as if it found an empty string just after the position specified in the second argument. In the latter instance, the method behaves as if it found an empty string at the end of the calling string.\n\n## Description\n\nStrings are zero-indexed: The index of a string's first character is `0`, and the index of a string's last character is the length of the string minus 1.\n\n```js\n\"Blue Whale\".indexOf(\"Blue\"); // returns  0\n\"Blue Whale\".indexOf(\"Blute\"); // returns -1\n\"Blue Whale\".indexOf(\"Whale\", 0); // returns  5\n\"Blue Whale\".indexOf(\"Whale\", 5); // returns  5\n\"Blue Whale\".indexOf(\"Whale\", 7); // returns -1\n\"Blue Whale\".indexOf(\"\"); // returns  0\n\"Blue Whale\".indexOf(\"\", 9); // returns  9\n\"Blue Whale\".indexOf(\"\", 10); // returns 10\n\"Blue Whale\".indexOf(\"\", 11); // returns 10\n```\n\nThe `indexOf()` method is case sensitive. For example, the following\nexpression returns `-1`:\n\n```js\n\"Blue Whale\".indexOf(\"blue\"); // returns -1\n```\n\n### Checking occurrences\n\nWhen checking if a specific substring occurs within a string, the correct way to check is test whether the return value is `-1`:\n\n```js\n\"Blue Whale\".indexOf(\"Blue\") !== -1; // true; found 'Blue' in 'Blue Whale'\n\"Blue Whale\".indexOf(\"Bloe\") !== -1; // false; no 'Bloe' in 'Blue Whale'\n```\n"
  },
  {
    "path": "documentation/docs/globals/String/prototype/lastIndexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.lastIndexOf()\n\nThe **`lastIndexOf()`** method, given one argument: a substring to search for, searches the entire calling string, and returns the index of the last occurrence of the specified substring. Given a second argument: a number, the method returns the last occurrence of the specified substring at an index less than or equal to the specified number.\n\n## Syntax\n\n```js\nlastIndexOf(searchString)\nlastIndexOf(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n\n  - : Substring to search for, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion).\n\n    If the method is called with no arguments, `searchString` is coerced to `\"undefined\"`. Therefore,`\"undefined\".lastIndexOf()` returns `0` — because the substring `\"undefined\"` is found at position `0` in the string `\"undefined\"`. But `\"undefine\".lastIndexOf()`, returns `-1` — because the substring `\"undefined\"` is not found in the string `\"undefine\"`.\n\n- `position` _**optional**_\n\n  - : The method returns the index of the last occurrence of the specified substring at a position less than or equal to `position`, which defaults to `+Infinity`. If `position` is greater than the length of the calling string, the method searches the entire string. If `position` is less than `0`, the behavior is the same as for `0` — that is, the method looks for the specified substring only at index `0`.\n\n    - `'hello world hello'.lastIndexOf('world', 4)` returns `-1` — because, while the substring `world` does occurs at index `6`, that position is not less than or equal to `4`.\n\n    - `'hello world hello'.lastIndexOf('hello', 99)` returns `12` — because the last occurrence of `hello` at a position less than or equal to `99` is at position `12`.\n\n    - `'hello world hello'.lastIndexOf('hello', 0)` and `'hello world hello'.lastIndexOf('hello', -5)` both return `0` — because both cause the method to only look for `hello` at index `0`.\n\n### Return value\n\nThe index of the last occurrence of `searchString` found, or `-1` if not found.\n\n## Description\n\nStrings are zero-indexed: The index of a string's first character is `0`, and the index of a string's last character is the length of the string minus 1.\n\n```js\n\"canal\".lastIndexOf(\"a\"); // returns 3\n\"canal\".lastIndexOf(\"a\", 2); // returns 1\n\"canal\".lastIndexOf(\"a\", 0); // returns -1\n\"canal\".lastIndexOf(\"x\"); // returns -1\n\"canal\".lastIndexOf(\"c\", -5); // returns 0\n\"canal\".lastIndexOf(\"c\", 0); // returns 0\n\"canal\".lastIndexOf(\"\"); // returns 5\n\"canal\".lastIndexOf(\"\", 2); // returns 2\n```\n\n### Case-sensitivity\n\nThe `lastIndexOf()` method is case sensitive. For example, the following\nexpression returns `-1`:\n\n```js\n\"Blue Whale, Killer Whale\".lastIndexOf(\"blue\"); // returns -1\n```\n"
  },
  {
    "path": "documentation/docs/globals/String/prototype/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.length\n\nThe **`length`** data property of a string contains the length of the string in UTF-16 code units.\n\n## Value\n\nA non-negative integer.\n\n## Description\n\nThis property returns the number of code units in the string. JavaScript uses [UTF-16](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters) encoding, where each Unicode character may be encoded as one or two code units, so it's possible for the value returned by `length` to not match the actual number of Unicode characters in the string. For common scripts like Latin, Cyrillic, wellknown CJK characters, etc., this should not be an issue, but if you are working with certain scripts, such as emojis, [mathematical symbols](https://en.wikipedia.org/wiki/Mathematical_Alphanumeric_Symbols), or obscure Chinese characters, you may need to account for the difference between code units and characters.\n\nThe language specification requires strings to have a maximum length of 2<sup>53</sup> - 1 elements, which is the upper limit for [precise integers](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER). However, a string with this length needs 16384TiB of storage, which cannot fit in any reasonable device's memory, so implementations tend to lower the threshold, which allows the string's length to be conveniently stored in a 32-bit integer.\n\n- In V8 (used by Chrome and Node), the maximum length is 2<sup>29</sup> - 24 (\\~1GiB). On 32-bit systems, the maximum length is 2<sup>28</sup> - 16 (\\~512MiB).\n- In Firefox, the maximum length is 2<sup>30</sup> - 2 (\\~2GiB). Before Firefox 65, the maximum length was 2<sup>28</sup> - 1 (\\~512MiB).\n- In Safari, the maximum length is 2<sup>31</sup> - 1 (\\~4GiB).\n\nFor an empty string, `length` is 0.\n\nThe static property `String.length` is unrelated to the length of strings. It's the [arity](../../../globals/Function/prototype/length.mdx) of the `String` function (loosely, the number of formal parameters it has), which is 1.\n\nSince `length` counts code units instead of characters, if you want to get the number of characters, you can first split the string with its [iterator](../../../globals/String/prototype/@@iterator.mdx), which iterates by characters:\n\n```js\nfunction getCharacterLength(str) {\n  // The string iterator that is used here iterates over characters,\n  // not mere code units\n  return [...str].length;\n}\n\nconsole.log(getCharacterLength(\"A\\uD87E\\uDC04Z\")); // 3\n```\n"
  },
  {
    "path": "documentation/docs/globals/String/prototype/localeCompare.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.localeCompare()\n\nThe **`localeCompare()`** method returns a number indicating whether a reference string comes before, or after, or is the same as the given string in sort order. In implementations with [`Intl.Collator` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator) support, this method simply calls `Intl.Collator`.\n\n## Syntax\n\n```js\nlocaleCompare(compareString)\nlocaleCompare(compareString, locales)\nlocaleCompare(compareString, locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` parameters customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.Collator` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator), these parameters correspond exactly to the [`Intl.Collator()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator) constructor's parameters. Implementations without `Intl.Collator` support are asked to ignore both parameters, making the comparison result returned entirely implementation-dependent — it's only required to be _consistent_.\n\n- `compareString`\n  - : The string against which the `referenceStr` is compared.\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator#locales) parameter of the `Intl.Collator()` constructor.\n\n    In implementations without `Intl.Collator` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator#options) parameter of the `Intl.Collator()` constructor.\n\n    In implementations without `Intl.Collator` support, this parameter is ignored.\n\nSee the [`Intl.Collator()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator) for details on the `locales` and `options` parameters and how to use them.\n\n### Return value\n\nA **negative** number if `referenceStr` occurs before `compareString`; **positive** if the `referenceStr` occurs after `compareString`; `0` if they are equivalent.\n\nIn implementations with `Intl.Collator`, this is equivalent to `new Intl.Collator(locales, options).compare(referenceStr, compareString)`.\n\n## Description\n\nReturns an integer indicating whether the `referenceStr` comes\nbefore, after or is equivalent to the `compareString`.\n\n- Negative when the `referenceStr` occurs before\n  `compareString`\n- Positive when the `referenceStr` occurs after\n  `compareString`\n- Returns `0` if they are equivalent\n\n> **Warning:** Do not rely on exact return values of `-1` or `1`!\n>\n> Negative and positive integer results vary between browsers (as well as between\n> browser versions) because the W3C specification only mandates negative and positive\n> values. Some browsers may return `-2` or `2`, or even some other\n> negative or positive value.\n\n## Performance\n\nWhen comparing large numbers of strings, such as in sorting large arrays, it is better to create an [`Intl.Collator`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator) object and use the function provided by its [`compare()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/compare) method.\n"
  },
  {
    "path": "documentation/docs/globals/String/prototype/match.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.match()\n\nThe **`match()`** method retrieves the result of matching a string against a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions).\n\n## Syntax\n\n```js\nmatch(regexp)\n```\n\n### Parameters\n\n- `regexp`\n\n  - : A regular expression object, or any object that has a [`Symbol.match`](../../../globals/Symbol/match.mdx) method.\n\n    If `regexp` is not a `RegExp` object and does not have a `Symbol.match` method, it is implicitly converted to a `RegExp` by using `new RegExp(regexp)`.\n\n    If you don't give any parameter and use the `match()` method directly, you will get an `Array` with an empty string: `[\"\"]`, because this is equivalent to `match(/(?:)/)`.\n\n### Return value\n\nAn `Array` whose contents depend on the presence or absence of the global (`g`) flag, or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) if no matches are found.\n\n- If the `g` flag is used, all results matching the complete regular expression will be returned, but capturing groups are not included.\n- If the `g` flag is not used, only the first complete match and its related capturing groups are returned. In this case, `match()` will return the same result as `RegExp.prototype.exec()` (an array with some extra properties).\n\n## Description\n\nThe implementation of `String.prototype.match` itself is very simple — it simply calls the `Symbol.match` method of the argument with the string as the first parameter. The actual implementation comes from [`RegExp.prototype[@@match]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@match).\n\n- If you need to know if a string matches a regular expression `RegExp`, use `RegExp.prototype.test()`.\n- If you only want the first match found, you might want to use `RegExp.prototype.exec()` instead.\n- If you want to obtain capture groups and the global flag is set, you need to use `RegExp.prototype.exec()` or [`String.prototype.matchAll()`](../../../globals/String/prototype/matchAll.mdx) instead.\n\nFor more information about the semantics of `match()` when a regex is passed, see [`RegExp.prototype[@@match]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@match).\n"
  },
  {
    "path": "documentation/docs/globals/String/prototype/matchAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.matchAll()\n\nThe **`matchAll()`** method returns an iterator of all results matching a string against a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions), including [capturing groups](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions/Groups_and_Backreferences).\n\n## Syntax\n\n```js\nmatchAll(regexp)\n```\n\n### Parameters\n\n- `regexp`\n\n  - : A regular expression object, or any object that has a [`Symbol.matchAll`](../../../globals/Symbol/matchAll.mdx) method.\n\n    If `regexp` is not a `RegExp` object and does not have a `Symbol.matchAll` method, it is implicitly converted to a `RegExp` by using `new RegExp(regexp, 'g')`.\n\n    If `regexp` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes), then it must have the global (`g`) flag set, or a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Return value\n\nAn [iterable iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators) (which is not restartable) of matches. Each match is an array with the same shape as the return value of `RegExp.prototype.exec()`.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown if the `regexp` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes) that does not have the global (`g`) flag set (its [`flags`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/flags) property does not contain `\"g\"`).\n\n## Description\n\nThe implementation of `String.prototype.matchAll` itself is very simple — it simply calls the `Symbol.matchAll` method of the argument with the string as the first parameter (apart from the extra input validation that the regex is global). The actual implementation comes from [`RegExp.prototype[@@matchAll]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@matchAll).\n"
  },
  {
    "path": "documentation/docs/globals/String/prototype/padEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.padEnd()\n\nThe **`padEnd()`** method pads the current string with a given\nstring (repeated, if needed) so that the resulting string reaches a given length. The\npadding is applied from the end of the current string.\n\n## Syntax\n\n```js\npadEnd(targetLength)\npadEnd(targetLength, padString)\n```\n\n### Parameters\n\n- `targetLength`\n  - : The length of the resulting string once the current `str` has\n    been padded. If the value is lower than `str.length`, the\n    current string will be returned as-is.\n- `padString` _**optional**_\n  - : The string to pad the current `str` with. If\n    `padString` is too long to stay within\n    `targetLength`, it will be truncated: for left-to-right\n    languages the left-most part and for right-to-left languages the right-most will be\n    applied. The default value for this parameter is \" \"\n    (`U+0020`).\n\n### Return value\n\nA `String` of the specified `targetLength` with the\n`padString` applied at the end of the current\n`str`.\n"
  },
  {
    "path": "documentation/docs/globals/String/prototype/padStart.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.padStart()\n\nThe **`padStart()`** method pads the\ncurrent string with another string (multiple times, if needed) until the resulting\nstring reaches the given length. The padding is applied from the start of the\ncurrent string.\n\n## Syntax\n\n```js\npadStart(targetLength)\npadStart(targetLength, padString)\n```\n\n### Parameters\n\n- `targetLength`\n  - : The length of the resulting string once the current `str` has\n    been padded. If the value is less than `str.length`, then\n    `str` is returned as-is.\n- `padString` _**optional**_\n  - : The string to pad the current `str` with. If\n    `padString` is too long to stay within the\n    `targetLength`, it will be truncated from the end.\n    The default value is the unicode \"space\" character (U+0020).\n\n### Return value\n\nA `String` of the specified `targetLength` with\n`padString` applied from the start.\n"
  },
  {
    "path": "documentation/docs/globals/String/prototype/repeat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.repeat()\n\nThe **`repeat()`** method constructs and returns a new string\nwhich contains the specified number of copies of the string on which it was called,\nconcatenated together.\n\n## Syntax\n\n```js\nrepeat(count)\n```\n\n### Parameters\n\n- `count`\n  - : An integer between `0` and\n    [`+Infinity`](../../../globals/Number/POSITIVE_INFINITY.mdx), indicating the\n    number of times to repeat the string.\n\n### Return value\n\nA new string containing the specified number of copies of the given string.\n\n### Exceptions\n\n- Throws a `RangeError` if repeat count is negative.\n- Throws a `RangeError` if repeat count is infinity or overflows maximum string size.\n"
  },
  {
    "path": "documentation/docs/globals/String/prototype/replace.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.replace()\n\nThe **`replace()`** method returns a new string with one, some, or all matches of a `pattern` replaced by a `replacement`. The `pattern` can be a string or a `RegExp`, and the `replacement` can be a string or a function called for each match. If `pattern` is a string, only the first occurrence will be replaced. The original string is left unchanged.\n\n## Syntax\n\n```js\nreplace(pattern, replacement)\n```\n\n### Parameters\n\n- `pattern`\n  - : Can be a string or an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method — the typical example being a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp). Any value that doesn't have the `Symbol.replace` method will be coerced to a string.\n- `replacement`\n  - : Can be a string or a function.\n    - If it's a string, it will replace the substring matched by `pattern`. A number of special replacement patterns are supported; see the [Specifying a string as the replacement](#specifying-a-string-as-the-replacement) section below.\n    - If it's a function, it will be invoked for every match and its return value is used as the replacement text. The arguments supplied to this function are described in the [Specifying a function as the replacement](#specifying-a-function-as-the-replacement) section below.\n\n### Return value\n\nA new string, with one, some, or all matches of the pattern replaced by the specified replacement.\n\n## Description\n\nThis method does not mutate the string value it's called on. It returns a new string.\n\nA string pattern will only be replaced once. To perform a global search and replace, use a regular expression with the `g` flag, or use [`replaceAll()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/replaceAll) instead.\n\nIf `pattern` is an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method (including `RegExp` objects), that method is called with the target string and `replacement` as arguments. Its return value becomes the return value of `replace()`. In this case the behavior of `replace()` is entirely encoded by the `@@replace` method — for example, any mention of \"capturing groups\" in the description below is actually functionality provided by [`RegExp.prototype[@@replace]`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@replace).\n\nIf the `pattern` is an empty string, the replacement is prepended to the start of the string.\n\n```js\n\"xxx\".replace(\"\", \"_\"); // \"_xxx\"\n```\n\nA regexp with the `g` flag is the only case where `replace()` replaces more than once. For more information about how regex properties (especially the [sticky](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky) flag) interact with `replace()`, see [`RegExp.prototype[@@replace]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@replace).\n\n### Specifying a string as the replacement\n\nThe replacement string can include the following special replacement patterns:\n\n| Pattern   | Inserts                                                                                        |\n| --------- | ---------------------------------------------------------------------------------------------- |\n| `$$`      | Inserts a `\"$\"`.                                                                               |\n| `$&`      | Inserts the matched substring.                                                                 |\n| `` $` ``  | Inserts the portion of the string that precedes the matched substring.                         |\n| `$'`      | Inserts the portion of the string that follows the matched substring.                          |\n| `$n`      | Inserts the `n`th (`1`-indexed) capturing group where `n` is a positive integer less than 100. |\n| `$<Name>` | Inserts the named capturing group where `Name` is the group name.                              |\n\n`$n` and `$<Name>` are only available if the `pattern` argument is a `RegExp` object. If the `pattern` is a string, or if the corresponding capturing group isn't present in the regex, then the pattern will be replaced as a literal. If the group is present but isn't matched (because it's part of a disjunction), it will be replaced with an empty string.\n\n```js\n\"foo\".replace(/(f)/, \"$2\");\n// \"$2oo\"; the regex doesn't have the second group\n\n\"foo\".replace(\"f\", \"$1\");\n// \"$1oo\"; the pattern is a string, so it doesn't have any groups\n\n\"foo\".replace(/(f)|(g)/, \"$2\");\n// \"oo\"; the second group exists but isn't matched\n```\n\n### Specifying a function as the replacement\n\nYou can specify a function as the second parameter. In this case, the function will be invoked after the match has been performed. The function's result (return value) will be used as the replacement string.\n\n> **Note:** The above-mentioned special replacement patterns do _not_ apply for strings returned from the replacer function.\n\nThe function has the following signature:\n\n```js\nfunction replacer(match, p1, p2, /* …, */ pN, offset, string, groups) {\n  return replacement;\n}\n```\n\nThe arguments to the function are as follows:\n\n- `match`\n  - : The matched substring. (Corresponds to `$&` above.)\n- `p1, p2, …, pN`\n  - : The `n`th string found by a capture group (including named capturing groups), provided the first argument to `replace()` is a `RegExp` object. (Corresponds to `$1`, `$2`, etc. above.) For example, if the `pattern` is `/(\\a+)(\\b+)/`, then `p1` is the match for `\\a+`, and `p2` is the match for `\\b+`. If the group is part of a disjunction (e.g. `\"abc\".replace(/(a)|(b)/, replacer)`), the unmatched alternative will be `undefined`.\n- `offset`\n  - : The offset of the matched substring within the whole string being examined. For example, if the whole string was `'abcd'`, and the matched substring was `'bc'`, then this argument will be `1`.\n- `string`\n  - : The whole string being examined.\n- `groups`\n  - : An object whose keys are the used group names, and whose values are the matched portions (`undefined` if not matched). Only present if the `pattern` contains at least one named capturing group.\n\nThe exact number of arguments depends on whether the first argument is a `RegExp` object — and, if so, how many capture groups it has.\n\nThe following example will set `newString` to `'abc - 12345 - #$*%'`:\n\n```js\nfunction replacer(match, p1, p2, p3, offset, string) {\n  // p1 is non-digits, p2 digits, and p3 non-alphanumerics\n  return [p1, p2, p3].join(\" - \");\n}\nconst newString = \"abc12345#$*%\".replace(/([^\\d]*)(\\d*)([^\\w]*)/, replacer);\nconsole.log(newString); // abc - 12345 - #$*%\n```\n\nThe function will be invoked multiple times for each full match to be replaced if the regular expression in the first parameter is global.\n"
  },
  {
    "path": "documentation/docs/globals/String/prototype/replaceAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.replaceAll()\n\nThe **`replaceAll()`** method returns a new string with all matches of a `pattern` replaced by a `replacement`. The `pattern` can be a string or a `RegExp`, and the `replacement` can be a string or a function to be called for each match. The original string is left unchanged.\n\n## Syntax\n\n```js\nreplaceAll(pattern, replacement)\n```\n\n### Parameters\n\n- `pattern`\n\n  - : Can be a string or an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method — the typical example being a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp). Any value that doesn't have the `Symbol.replace` method will be coerced to a string.\n\n    If `pattern` is a regex, then it must have the global (`g`) flag set, or a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n- `replacement`\n  - : Can be a string or a function. The replacement has the same semantics as that of [`String.prototype.replace()`](../../../globals/String/prototype/replace.mdx).\n\n### Return value\n\nA new string, with all matches of a pattern replaced by a replacement.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown if the `pattern` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes) that does not have the global (`g`) flag set (its [`flags`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/flags) property does not contain `\"g\"`).\n\n## Description\n\nThis method does not mutate the string value it's called on. It returns a new string.\n\nUnlike [`String.prototype.replace()`](../../../globals/String/prototype/replace.mdx), this method would replace all occurrences of a string, not just the first one. This is especially useful if the string is not statically known, as calling the [`RegExp()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/RegExp) constructor without escaping special characters may unintentionally change its semantics.\n\n```js\nfunction unsafeRedactName(text, name) {\n  return text.replace(new RegExp(name, \"g\"), \"[REDACTED]\");\n}\nfunction safeRedactName(text, name) {\n  return text.replaceAll(name, \"[REDACTED]\");\n}\n\nconst report =\n  \"A hacker called ha.*er used special characters in their name to breach the system.\";\n\nconsole.log(unsafeRedactName(report, \"ha.*er\")); // \"A [REDACTED]s in their name to breach the system.\"\nconsole.log(safeRedactName(report, \"ha.*er\")); // \"A hacker called [REDACTED] used special characters in their name to breach the system.\"\n```\n\nIf `pattern` is an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method (including `RegExp` objects), that method is called with the target string and `replacement` as arguments. Its return value becomes the return value of `replaceAll()`. In this case the behavior of `replaceAll()` is entirely encoded by the `Symbol.replace` method, and therefore will have the same result as `replace()` (apart from the extra input validation that the regex is global).\n\nIf the `pattern` is an empty string, the replacement will be inserted in between every UTF-16 code unit, similar to [`String.prototype.split()`](../../../globals/String/prototype/split.mdx) behavior.\n\n```js\n\"xxx\".replaceAll(\"\", \"_\"); // \"_x_x_x_\"\n```\n\nFor more information about how regex properties (especially the [sticky](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky) flag) interact with `replaceAll()`, see [`RegExp.prototype[@@replace]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@replace).\n"
  },
  {
    "path": "documentation/docs/globals/String/prototype/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.search()\n\nThe **`search()`** method executes a search for a match between a regular expression and this `String` object.\n\n## Syntax\n\n```js\nsearch(regexp)\n```\n\n### Parameters\n\n- `regexp`\n\n  - : A regular expression object, or any object that has a [`Symbol.search`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/search) method.\n\n    If `regexp` is not a `RegExp` object and does not have a `Symbol.search` method, it is implicitly converted to a `RegExp` by using `new RegExp(regexp)`.\n\n### Return value\n\nThe index of the first match between the regular expression and the given string, or `-1` if no match was found.\n\n## Description\n\nThe implementation of `String.prototype.search()` itself is very simple — it simply calls the `Symbol.search` method of the argument with the string as the first parameter. The actual implementation comes from [`RegExp.prototype[@@search]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@search).\n\nThe `g` flag of `regexp` has no effect on the `search()` result, and the search always happens as if the regex's `lastIndex` is 0. For more information on the behavior of `search()`, see [`RegExp.prototype[@@search]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@search).\n\nWhen you want to know whether a pattern is found, and _also_ know its index within a string, use `search()`.\n\n- If you only want to know if it exists, use the `RegExp.prototype.test()` method, which returns a boolean.\n- If you need the content of the matched text, use `String.prototype.match()` or `RegExp.prototype.exec()`.\n"
  },
  {
    "path": "documentation/docs/globals/String/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.slice()\n\nThe **`slice()`** method extracts a section of a string and\nreturns it as a new string, without modifying the original string.\n\n## Syntax\n\n```js\nslice(indexStart)\nslice(indexStart, indexEnd)\n```\n\n### Parameters\n\n- `indexStart`\n  - : The index of the first character to include in the returned substring.\n- `indexEnd` _**optional**_\n  - : The index of the first character to exclude from the returned substring.\n\n### Return value\n\nA new string containing the extracted section of the string.\n\n## Description\n\n`slice()` extracts the text from one string and returns a new string. Changes to the text in one string do not affect the other string.\n\n`slice()` extracts up to but not including `indexEnd`. For example, `str.slice(1, 4)` extracts the second character through the fourth character (characters indexed `1`, `2`, and `3`).\n\n- If `indexStart >= str.length`, an empty string is returned.\n- If `indexStart < 0`, the index is counted from the end of the string. More formally, in this case, the substring starts at `max(indexStart + str.length, 0)`.\n- If `indexStart` is omitted, undefined, or cannot be converted to a number (using [`Number()`](../../../globals/Number/Number.mdx)), it's treated as `0`.\n- If `indexEnd` is omitted, undefined, or cannot be converted to a number (using [`Number()`](../../../globals/Number/Number.mdx)), or if `indexEnd >= str.length`, `slice()` extracts to the end of the string.\n- If `indexEnd < 0`, the index is counted from the end of the string. More formally, in this case, the substring ends at `max(indexEnd + str.length, 0)`.\n- If `indexEnd <= indexStart` after normalizing negative values (i.e. `indexEnd` represents a character that's before `indexStart`), an empty string is returned.\n"
  },
  {
    "path": "documentation/docs/globals/String/prototype/split.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.split()\n\nThe **`split()`** method takes a pattern and divides a `String` into an ordered list of substrings by searching for the pattern, puts these substrings into an array, and returns the array.\n\n## Syntax\n\n```js\nsplit()\nsplit(separator)\nsplit(separator, limit)\n```\n\n### Parameters\n\n- `separator` _**optional**_\n  - : The pattern describing where each split should occur. Can be a string or an object with a [`Symbol.split`](../../../globals/Symbol/split.mdx) method — the typical example being a regular expression. If undefined, the original target string is returned wrapped in an array.\n- `limit` _**optional**_\n  - : A non-negative integer specifying a limit on the number of substrings to be included in the array. If provided, splits the string at each occurrence of the specified `separator`, but stops when `limit` entries have been placed in the array. Any leftover text is not included in the array at all.\n    - The array may contain fewer entries than `limit` if the end of the string is reached before the limit is reached.\n    - If `limit` is `0`, `[]` is returned.\n\n### Return value\n\nAn `Array` of strings, split at each point where the `separator` occurs in the given string.\n\n## Description\n\nIf `separator` is a non-empty string, the target string is split by all matches of the `separator` without including `separator` in the results. For example, a string containing tab separated values (TSV) could be parsed by passing a tab character as the separator, like `myString.split(\"\\t\")`. If `separator` contains multiple characters, that entire character sequence must be found in order to split. If `separator` appears at the beginning (or end) of the string, it still has the effect of splitting, resulting in an empty (i.e. zero length) string appearing at the first (or last) position of the returned array. If `separator` does not occur in `str`, the returned array contains one element consisting of the entire string.\n\nIf `separator` is an empty string (`\"\"`), `str` is converted to an array of each of its UTF-16 \"characters\", without empty strings on either ends of the resulting string.\n\n> **Note:** `\"\".split(\"\")` is therefore the only way to produce an empty array when a string is passed as `separator`.\n\n> **Warning:** When the empty string (`\"\"`) is used as a separator, the string is **not** split by _user-perceived characters_ ([grapheme clusters](https://unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries)) or unicode characters (codepoints), but by UTF-16 codeunits. This destroys [surrogate pairs](https://unicode.org/faq/utf_bom.html#utf16-2). See [\"How do you get a string to a character array in JavaScript?\" on StackOverflow](https://stackoverflow.com/questions/4547609/how-to-get-character-array-from-a-string/34717402#34717402).\n\nIf `separator` is a regexp that matches empty strings, whether the match is split by UTF-16 code units or Unicode codepoints depends on if the [`u`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/unicode) flag is set.\n\n```js\n\"😄😄\".split(/(?:)/); // [ \"\\ud83d\", \"\\ude04\", \"\\ud83d\", \"\\ude04\" ]\n\"😄😄\".split(/(?:)/u); // [ \"😄\", \"😄\" ]\n```\n\nIf `separator` is a regular expression with capturing groups, then each time `separator` matches, the captured groups (including any `undefined` results) are spliced into the output array. This behavior is specified by the regexp's [`Symbol.split`](../../../globals/Symbol/split.mdx) method.\n\nIf `separator` is an object with a [`Symbol.split`](../../../globals/Symbol/split.mdx) method, that method is called with the target string and `limit` as arguments, and `this` set to the object. Its return value becomes the return value of `split`.\n\nAny other value will be coerced to a string before being used as separator.\n"
  },
  {
    "path": "documentation/docs/globals/String/prototype/startsWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.startsWith()\n\nThe **`startsWith()`** method determines whether a string begins with the characters of a specified string, returning `true` or `false` as appropriate.\n\n## Syntax\n\n```js\nstartsWith(searchString)\nstartsWith(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n  - : The characters to be searched for at the start of this string. Cannot be a regex.\n- `position` _**optional**_\n  - : The start position at which `searchString` is expected to be found (the index of `searchString`'s first character). Defaults to `0`.\n\n### Return value\n\n**`true`** if the given characters are found at the beginning of the string; otherwise, **`false`**.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If `searchString` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes).\n\n## Description\n\nThis method lets you determine whether or not a string begins with another string. This method is case-sensitive.\n"
  },
  {
    "path": "documentation/docs/globals/String/prototype/substr.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.substr()\n\nThe **`substr()`** method returns a portion of the string, starting at the specified index and extending for a given number of characters afterwards.\n\n> **Note:** `substr()` is not part of the main ECMAScript specification — it's defined in [Annex B: Additional ECMAScript Features for Web Browsers](https://tc39.es/ecma262/#sec-additional-ecmascript-features-for-web-browsers), which is normative optional for non-browser runtimes. Therefore, people are advised to use the standard [`String.prototype.substring()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/substring) and [`String.prototype.slice()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/slice) methods instead to make their code maximally cross-platform friendly. The [`String.prototype.substring()` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/substring#the_difference_between_substring_and_substr) has some comparisons between the three methods.\n\n\n\n## Syntax\n\n```js\nsubstr(start)\nsubstr(start, length)\n```\n\n### Parameters\n\n- `start`\n  - : The index of the first character to include in the returned substring.\n- `length` _**optional**_\n  - : The number of characters to extract.\n\n### Return value\n\nA new string containing the specified part of the given string.\n\n## Description\n\nA string's `substr()` method extracts `length` characters from the string, counting from the `start` index.\n\n- If `start >= str.length`, an empty string is returned.\n- If `start < 0`, the index starts counting from the end of the string. More formally, in this case the substring starts at `max(start + str.length, 0)`.\n- If `start` is omitted or [`undefined`](../../../globals/undefined.mdx), it's treated as `0`.\n- If `length` is omitted or [`undefined`](../../../globals/undefined.mdx), or if `start + length >= str.length`, `substr()` extracts characters to the end of the string.\n- If `length < 0`, an empty string is returned.\n- For both `start` and `length`, [`NaN`](../../../globals/NaN.mdx) is treated as `0`.\n\nAlthough you are encouraged to avoid using `substr()`, there is no trivial way to migrate `substr()` to either `slice()` or `substring()` in legacy code without essentially writing a polyfill for `substr()`. For example, `str.substr(a, l)`, `str.slice(a, a + l)`, and `str.substring(a, a + l)` all have different results when `str = \"01234\", a = 1, l = -2` — `substr()` returns an empty string, `slice()` returns `\"123\"`, while `substring()` returns `\"0\"`. The actual refactoring path depends on the knowledge of the range of `a` and `l`.\n"
  },
  {
    "path": "documentation/docs/globals/String/prototype/substring.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.substring()\n\nThe **`substring()`** method returns the part of the `string` from the start index up to and excluding the end index, or to the end of the string if no end index is supplied.\n\n## Syntax\n\n```js\nsubstring(indexStart)\nsubstring(indexStart, indexEnd)\n```\n\n### Parameters\n\n- `indexStart`\n  - : The index of the first character to include in the returned substring.\n- `indexEnd` _**optional**_\n  - : The index of the first character to exclude from the returned substring.\n\n### Return value\n\nA new string containing the specified part of the given string.\n\n## Description\n\n`substring()` extracts characters from `indexStart` up to _but not including_ `indexEnd`. In particular:\n\n- If `indexEnd` is omitted, `substring()` extracts characters to the end of the string.\n- If `indexStart` is equal to `indexEnd`, `substring()` returns an empty string.\n- If `indexStart` is greater than `indexEnd`, then the effect of `substring()` is as if the two arguments were swapped; see example below.\n\nAny argument value that is less than `0` or greater than `str.length` is treated as if it were `0` and `str.length`, respectively.\n\nAny argument value that is [`NaN`](../../../globals/NaN.mdx) is treated as if it were `0`.\n"
  },
  {
    "path": "documentation/docs/globals/String/prototype/toLocaleLowerCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toLocaleLowerCase()\n\nThe **`toLocaleLowerCase()`** method returns the calling string\nvalue converted to lower case, according to any locale-specific case mappings.\n\n## Syntax\n\n```js\ntoLocaleLowerCase()\ntoLocaleLowerCase(locales)\n```\n\n### Parameters\n\n- `locales` _**optional**_\n  - : A string with a BCP 47 language tag, or an array of such strings. Indicates the locale to be used to convert to lower case according to any locale-specific case mappings. For the general form and interpretation of the `locales` argument, see [Locale identification and negotiation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation).\n\n### Return value\n\nA new string representing the calling string converted to lower case, according to any\nlocale-specific case mappings.\n\n### Exceptions\n\n- A [`RangeError`](../../../globals/RangeError/RangeError.mdx) (\"invalid language tag: xx_yy\") is thrown if a\n  `locale` argument isn't a valid language tag.\n- A [`TypeError`](../../../globals/TypeError/TypeError.mdx) (\"invalid element in locales argument\") is thrown if an\n  array element isn't of type string.\n\n## Description\n\nThe `toLocaleLowerCase()` method returns the value of the string converted\nto lower case according to any locale-specific case mappings.\n`toLocaleLowerCase()` does not affect the value of the string itself. In most\ncases, this will produce the same result as [`String.prototype.toLowerCase()`](../../../globals/String/prototype/toLowerCase.mdx), but for some locales, such as Turkish, whose case mappings do not\nfollow the default case mappings in Unicode, there may be a different result.\n"
  },
  {
    "path": "documentation/docs/globals/String/prototype/toLocaleUpperCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toLocaleUpperCase()\n\nThe **`toLocaleUpperCase()`** method returns the calling string\nvalue converted to upper case, according to any locale-specific case mappings.\n\n## Syntax\n\n```js\ntoLocaleUpperCase()\ntoLocaleUpperCase(locales)\n```\n\n### Parameters\n\n- `locales` _**optional**_\n  - : A string with a BCP 47 language tag, or an array of such strings. Indicates the locale to be used to convert to upper case according to any locale-specific case mappings. For the general form and interpretation of the `locales` argument, see [Locale identification and negotiation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation).\n\n### Return value\n\nA new string representing the calling string converted to upper case, according to any\nlocale-specific case mappings.\n\n### Exceptions\n\n- A [`RangeError`](../../../globals/RangeError/RangeError.mdx) (\"invalid language tag: xx_yy\") is thrown if a\n  `locale` argument isn't a valid language tag.\n- A [`TypeError`](../../../globals/TypeError/TypeError.mdx) (\"invalid element in locales argument\") is thrown if an\n  array element isn't of type string.\n\n## Description\n\nThe `toLocaleUpperCase()` method returns the value of the string converted\nto upper case according to any locale-specific case mappings.\n`toLocaleUpperCase()` does not affect the value of the string itself. In most\ncases, this will produce the same result as [`String.prototype.toUpperCase()`](../../../globals/String/prototype/toUpperCase.mdx), but for some locales, such as Turkish, whose case mappings do not\nfollow the default case mappings in Unicode, there may be a different result.\n\nAlso notice that conversion is not necessarily a 1:1 character mapping, as some\ncharacters might result in two (or even more) characters when transformed to upper-case.\nTherefore the length of the result string can differ from the input length. This also\nimplies that the conversion is not stable, so i.E. the following can return\n`false`:\n`x.toLocaleLowerCase() === x.toLocaleUpperCase().toLocaleLowerCase()`\n"
  },
  {
    "path": "documentation/docs/globals/String/prototype/toLowerCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toLowerCase()\n\nThe **`toLowerCase()`** method returns the calling string value\nconverted to lower case.\n\n## Syntax\n\n```js\ntoLowerCase()\n```\n\n### Return value\n\nA new string representing the calling string converted to lower case.\n\n## Description\n\nThe `toLowerCase()` method returns the value of the string converted to\nlower case. `toLowerCase()` does not affect the value of the string\n`str` itself.\n"
  },
  {
    "path": "documentation/docs/globals/String/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified string value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified string value.\n\n## Description\n\nThe `String` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For `String` values, the `toString` method returns the string itself (if it's a primitive) or the string that the `String` object wraps. It has the exact same implementation as [`String.prototype.valueOf()`](../../../globals/String/prototype/valueOf.mdx).\n\nThe `toString()` method requires its `this` value to be a `String` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to string values.\n\nBecause `String` doesn't have a [`[Symbol.toPrimitive]()`](../../../globals/Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `String` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, String _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — since they are already strings, no conversion is performed.\n\n```js\nString.prototype.toString = () => \"Overridden\";\nconsole.log(`${\"foo\"}`); // \"foo\"\nconsole.log(`${new String(\"foo\")}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/docs/globals/String/prototype/toUpperCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toUpperCase()\n\nThe **`toUpperCase()`** method returns the calling string value\nconverted to uppercase (the value will be converted to a string if it isn't one).\n\n## Syntax\n\n```js\ntoUpperCase()\n```\n\n### Return value\n\nA new string representing the calling string converted to upper case.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : When called on [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../../globals/undefined.mdx), for example,\n    `String.prototype.toUpperCase.call(undefined)`.\n\n## Description\n\nThe `toUpperCase()` method returns the value of the string converted to\nuppercase. This method does not affect the value of the string itself since JavaScript\nstrings are immutable.\n"
  },
  {
    "path": "documentation/docs/globals/String/prototype/trim.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.trim()\n\nThe **`trim()`** method removes whitespace from both ends of a string and returns a new string, without modifying the original string.\n\nTo return a new string with whitespace trimmed from just one end, use [`String.prototype.trimStart()`](../../../globals/String/prototype/trimStart.mdx) or [`String.prototype.trimEnd()`](../../../globals/String/prototype/trimEnd.mdx).\n\n## Syntax\n\n```js\ntrim()\n```\n\n### Return value\n\nA new string representing `str` stripped of whitespace from both its beginning and end. Whitespace is defined as [white space](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#white_space) characters plus [line terminators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#line_terminators).\n\nIf neither the beginning or end of `str` has any whitespace, a new string is still returned (essentially a copy of `str`).\n"
  },
  {
    "path": "documentation/docs/globals/String/prototype/trimEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.trimEnd()\n\nThe **`trimEnd()`** method removes whitespace from the end of a string and returns a new string, without modifying the original string. `trimRight()` is an alias of this method.\n\n## Syntax\n\n```js\ntrimEnd()\n\ntrimRight()\n```\n\n### Return value\n\nA new string representing `str` stripped of whitespace from its end (right side). Whitespace is defined as [white space](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#white_space) characters plus [line terminators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#line_terminators).\n\nIf the end of `str` has no whitespace, a new string is still returned (essentially a copy of `str`).\n\n### Aliasing\n\nAfter [`String.prototype.trim()`](../../../globals/String/prototype/trim.mdx) was standardized, engines also implemented the non-standard method `trimRight`. However, for consistency with [`String.prototype.pedEnd()`](../../../globals/String/prototype/trim.mdx), when the method got standardized, its name was chosen as `trimEnd`. For web compatibility reasons, `trimRight` remains as an alias to `trimEnd`, and they refer to the exact same function object. In some engines this means:\n\n```js\nString.prototype.trimRight.name === \"trimEnd\";\n```\n"
  },
  {
    "path": "documentation/docs/globals/String/prototype/trimStart.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.trimStart()\n\nThe **`trimStart()`** method removes whitespace from the beginning of a string and returns a new string, without modifying the original string. `trimLeft()` is an alias of this method.\n\n## Syntax\n\n```js\ntrimStart()\n\ntrimLeft()\n```\n\n### Return value\n\nA new string representing `str` stripped of whitespace from its beginning (left side). Whitespace is defined as [white space](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#white_space) characters plus [line terminators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#line_terminators).\n\nIf the beginning of `str` has no whitespace, a new string is still returned (essentially a copy of `str`).\n\n### Aliasing\n\nAfter [`String.prototype.trim()`](../../../globals/String/prototype/trim.mdx) was standardized, engines also implemented the non-standard method `trimLeft`. However, for consistency with [`String.prototype.padEnd()`](../../../globals/String/prototype/padEnd.mdx), when the method got standardized, its name was chosen as `trimStart`. For web compatibility reasons, `trimLeft` remains as an alias to `trimStart`, and they refer to the exact same function object. In some engines this means:\n\n```js\nString.prototype.trimLeft.name === \"trimStart\";\n```\n"
  },
  {
    "path": "documentation/docs/globals/String/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a\n`String` object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nA string representing the primitive value of a given `String` object.\n\n## Description\n\nThe `valueOf()` method of `String` returns the primitive value\nof a `String` object as a string data type. This value is equivalent to\n[`String.prototype.toString()`](../../../globals/String/prototype/toString.mdx).\n\nThis method is usually called internally by JavaScript and not explicitly in code.\n"
  },
  {
    "path": "documentation/docs/globals/String/raw.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.raw()\n\nThe static **`String.raw()`** method is a tag function of [template literals](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). This is similar to the `r` prefix in Python, or the `@` prefix in C# for string literals. It's used to get the raw string form of template literals — that is, substitutions (e.g. `${foo}`) are processed, but escape sequences (e.g. `\\n`) are not.\n\n## Syntax\n\n```js\nString.raw(strings, ...substitutions)\n\nString.raw`templateString`\n```\n\n### Parameters\n\n- `strings`\n  - : Well-formed template literal array object, like `{ raw: ['foo', 'bar', 'baz'] }`. Should be an object with a `raw` property whose value is an array-like object of strings.\n- `...substitutions`\n  - : Contains substitution values.\n- `templateString`\n  - : A [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals), optionally with substitutions (`${...}`).\n\n### Return value\n\nThe raw string form of a given template literal.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if the first argument doesn't have a `raw` property, or the `raw` property is `undefined` or `null`.\n\n## Description\n\nIn most cases, `String.raw()` is used with template literals. The first syntax mentioned above is only rarely used, because the JavaScript engine will call this with proper arguments for you, (just like with other [tag functions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals#tagged_templates)).\n\n`String.raw()` is the only built-in template literal tag. It has close semantics to an untagged literal since it concatenates all arguments and returns a string. You can even re-implement it with normal JavaScript code.\n\n> **Warning:** You should not use `String.raw` directly as an \"identity\" tag. See [Building an identity tag](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/raw#building_an_identity_tag) for how to implement this.\n\nIf `String.raw()` is called with an object whose `raw` property doesn't have a `length` property or a non-positive `length`, it returns an empty string `\"\"`. If `substitutions.length < strings.raw.length - 1` (i.e. there are not enough substitutions to fill the placeholders — which can't happen in a well-formed tagged template literal), the rest of the placeholders are filled with empty strings.\n"
  },
  {
    "path": "documentation/docs/globals/SubtleCrypto/SubtleCrypto.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SubtleCrypto\n\nThe **`SubtleCrypto`** interface provides a number of low-level cryptographic functions. Access to the features of `SubtleCrypto` is obtained through the [`crypto.subtle`](../crypto/subtle.mdx) property.\n\n> **Warning:** This API provides a number of low-level cryptographic primitives. It's very easy to misuse them, and the pitfalls involved can be very subtle.\n>\n> Even assuming you use the basic cryptographic functions correctly, secure key management and overall security system design are extremely hard to get right, and are generally the domain of specialist security experts.\n>\n> Errors in security system design and implementation can make the security of the system completely ineffective.\n>\n> Please learn and experiment, but don't guarantee or imply the security of your work before an individual knowledgeable in this subject matter thoroughly reviews it. The [Crypto 101 Course](https://www.crypto101.io/) can be a great place to start learning about the design and implementation of secure systems.\n\n"
  },
  {
    "path": "documentation/docs/globals/SubtleCrypto/prototype/digest.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# digest()\n\nThe **`digest()`** method of the [`SubtleCrypto`](../SubtleCrypto.mdx)\ninterface generates a digest of the given data. A digest is a short\nfixed-length value derived from some variable-length input. Cryptographic digests should\nexhibit collision-resistance, meaning that it's hard to come up with two different\ninputs that have the same digest value.\n\nIt takes as its arguments an identifier for the digest algorithm to use and the data to\ndigest. It returns a [`Promise`](../../Promise/Promise.mdx) which will be fulfilled with the digest.\n\n## Syntax\n\n```js\ndigest(algorithm, data)\n```\n\n### Parameters\n\n- `algorithm`\n  - : This may be a string or an object with a single property `name` that is a string. The string names the hash function to use. Supported values are:\n    - `\"MD5\"` (but don't use this in cryptographic applications)\n    - `\"SHA-1\"` (but don't use this in cryptographic applications)\n    - `\"SHA-256\"`\n    - `\"SHA-384\"`\n    - `\"SHA-512\"`.\n- `data`\n  - : An `ArrayBuffer`, a `TypedArray` or a `DataView` object containing the data to be digested.\n\n### Return value\n\nA [`Promise`](../../Promise/Promise.mdx) that fulfills with an `ArrayBuffer` containing the digest.\n\n## Supported algorithms\n\nDigest algorithms, also known as cryptographic hash functions,\ntransform an arbitrarily large block of data into a fixed-size output,\nusually much shorter than the input. They have a variety of applications in\ncryptography.\n"
  },
  {
    "path": "documentation/docs/globals/SubtleCrypto/prototype/importKey.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# importKey()\n\nThe **`importKey()`** method of the [`SubtleCrypto`](../SubtleCrypto.mdx)\ninterface imports a key: that is, it takes as input a key in an external, portable\nformat and gives you a [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) object that you can use.\n\nThe function accepts several import formats: see [Supported formats](#supported-formats) for details.\n\n## Syntax\n\n```js\nimportKey(format, keyData, algorithm, extractable, keyUsages)\n```\n\n### Parameters\n\n- `format`\n  - : A string describing the data format of the key to import. It can be one of the following:\n    - `raw`: [Raw](#raw) format.\n    - `jwk`: [JSON Web Key](#json-web-key) format.\n- `keyData`\n  - : An `ArrayBuffer`, a TypedArray, a `DataView`, or a `JSONWebKey` object containing the key in\n    the given format.\n- `algorithm`\n  - : An object defining the type of key to import and providing extra algorithm-specific parameters.\n    - For RSASSA-PKCS1-v1_5:\n      Pass an [`RsaHashedImportParams`](../../RsaHashedImportParams/RsaHashedImportParams.mdx) object.\n    - For HMAC:\n      Pass an [`HmacImportParams`](../../HmacImportParams/HmacImportParams.mdx) object.\n    - For ECDSA:\n      Pass an [`EcKeyImportParams`](../../EcKeyImportParams/EcKeyImportParams.mdx) object.\n- `extractable`\n  - : A boolean value indicating whether it will be possible to export the key.\n- `keyUsages`\n  - : An `Array` indicating what can be done with the key. Possible array values are:\n    - `encrypt`: The key may be used to encrypt messages.\n    - `decrypt`: The key may be used to decrypt messages.\n    - `sign`: The key may be used to sign messages.\n    - `verify`: The key may be used to verify signatures.\n    - `deriveKey`: The key may be used in deriving a new key.\n    - `deriveBits`: The key may be used in deriving bits.\n    - `wrapKey`: The key may be used to wrap a key.\n    - `unwrapKey`: The key may be used to unwrap a key.\n\n### Return value\n\nA [`Promise`](../../Promise/Promise.mdx)\nthat fulfills with the imported key as a [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) object.\n\n### Exceptions\n\nThe promise is rejected when one of the following exceptions is encountered:\n\n- `SyntaxError`\n  - : Raised when `keyUsages` is empty but the unwrapped key is of\n    type `secret` or `private`.\n- `TypeError`\n  - : Raised when trying to use an invalid format or if the `keyData`\n    is not suited for that format.\n\n## Supported formats\n\nThis API currently supports one key import/export format: JSON Web Key.\n\n### Raw\n\nYou can use this format to import or export AES or HMAC secret keys, or Elliptic Curve\npublic keys.\n\nIn this format the key is supplied as an `ArrayBuffer` containing the raw bytes for the key.\n\n\n### JSON Web Key\n\nYou can use JSON Web Key format to import or export RSA or Elliptic Curve public or\nprivate keys, as well as AES and HMAC secret keys.\n\nJSON Web Key format is defined in [RFC 7517](https://datatracker.ietf.org/doc/html/rfc7517).\nIt describes a way to represent public, private, and secret keys as JSON objects.\n\nA JSON Web Key looks something like this (this is an EC private key):\n\n```json\n{\n  \"crv\": \"P-384\",\n  \"d\": \"wouCtU7Nw4E8_7n5C1-xBjB4xqSb_liZhYMsy8MGgxUny6Q8NCoH9xSiviwLFfK_\",\n  \"ext\": true,\n  \"key_ops\": [\"sign\"],\n  \"kty\": \"EC\",\n  \"x\": \"SzrRXmyI8VWFJg1dPUNbFcc9jZvjZEfH7ulKI1UkXAltd7RGWrcfFxqyGPcwu6AQ\",\n  \"y\": \"hHUag3OvDzEr0uUQND4PXHQTXP5IDGdYhJhL-WLKjnGjQAw0rNGy5V29-aV-yseW\"\n};\n```\n"
  },
  {
    "path": "documentation/docs/globals/SubtleCrypto/prototype/sign.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# sign()\n\nThe **`sign()`** method of the [`SubtleCrypto`](../SubtleCrypto.mdx) interface generates a digital signature.\n\nIt takes as its arguments a key to sign with, some algorithm-specific\nparameters, and the data to sign. It returns a `Promise` which will be\nfulfilled with the signature.\n\nYou can use the corresponding [`verify()`](./verify.mdx) method to verify the signature.\n\n## Syntax\n\n```js\nsign(algorithm, key, data)\n```\n\n### Parameters\n\n- `algorithm`\n  - : A string or object that specifies the signature algorithm to use and its parameters:\n    - To use [RSASSA-PKCS1-v1_5](#rsassa-pkcs1-v1_5), pass the string `\"RSASSA-PKCS1-v1_5\"` or an object of the form `{ \"name\": \"RSASSA-PKCS1-v1_5\" }`.\n    - To use [HMAC](#hmac), pass the string `\"HMAC\"` or an object of the form `{ \"name\": \"HMAC\" }`.\n- `key`\n  - : A [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) object containing the key to be used for signing.\n    If `algorithm` identifies a public-key cryptosystem, this is the private key.\n- `data`\n  - : An `ArrayBuffer`, a TypedArray or a `DataView` object containing the data to be signed.\n\n### Return value\n\nA `Promise` that fulfills with an `ArrayBuffer` containing the signature.\n\n### Exceptions\n\nThe promise is rejected when the following exception is encountered:\n\n- `InvalidAccessError`\n  - : Raised when the signing key is not a key for the request signing algorithm or when\n    trying to use an algorithm that is either unknown or isn't suitable for signing.\n\n## Supported algorithms\n\n### RSASSA-PKCS1-v1_5\n\nThe RSASSA-PKCS1-v1_5 algorithm is specified in [RFC 3447](https://datatracker.ietf.org/doc/html/rfc3447).\n\n### HMAC\n\nThe HMAC algorithm calculates and verifies hash-based message authentication codes according to the\n[FIPS 198-1 standard](https://csrc.nist.gov/csrc/media/publications/fips/198/1/final/documents/fips-198-1_final.pdf).\n\nThe digest algorithm to use is specified in the\n[`HmacImportParams`](../../HmacImportParams/HmacImportParams.mdx) object\nthat you pass into [`SubtleCrypto.importKey()`](./importKey.mdx).\n"
  },
  {
    "path": "documentation/docs/globals/SubtleCrypto/prototype/verify.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# verify()\n\nThe **`verify()`** method verifies a digital signature.\n\nIt takes as its arguments a key to verify the signature with, some algorithm-specific parameters, the signature, and the original signed data.\nIt returns a `Promise` which will be fulfilled with a boolean value indicating whether the signature is valid.\n\n## Syntax\n\n```js\nverify(algorithm, key, signature, data)\n```\n\n### Parameters\n\n- `algorithm`\n  - : A string or object defining the algorithm to use, and for some algorithm choices, some extra parameters.\n    The values given for the extra parameters must match those passed into the corresponding [`sign()`](./sign.mdx) call.\n    - To use RSASSA-PKCS1-v1_5, pass the string `\"RSASSA-PKCS1-v1_5\"` or an object of the form `{ \"name\": \"RSASSA-PKCS1-v1_5\" }`.\n    - To use HMAC, pass the string `\"HMAC\"` or an object of the form `{ \"name\": \"HMAC\" }`.\n- `key`\n  - : A [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) containing the key that will be used to verify the signature.\n    It is the secret key for a symmetric algorithm and the public key for a public-key system.\n- `signature`\n  - : A `ArrayBuffer` containing the signature to verify.\n- `data`\n  - : A `ArrayBuffer` containing the data whose signature is to be verified.\n\n### Return value\n\nA `Promise` that fulfills with a\nboolean value: `true` if the signature is valid, `false`\notherwise.\n\n### Exceptions\n\nThe promise is rejected when the following exception is encountered:\n\n- `InvalidAccessError`\n  - : Raised when the encryption key is not a key for the requested verifying algorithm or\n    when trying to use an algorithm that is either unknown or isn't suitable for a verify\n    operation.\n\n## Supported algorithms\n\nThe `verify()` method supports the same algorithms as the [`sign()`](./sign.mdx) method.\n"
  },
  {
    "path": "documentation/docs/globals/Symbol/Symbol.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol()\n\nThe `Symbol()` constructor returns a value of type **symbol**,\nbut is incomplete as a constructor because it does not support the syntax\n\"`new Symbol()`\" and it is not intended to be subclassed. It may be used as\nthe value of an\n[`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends)\nclause of a `class` definition but a\n[`super`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/super)\ncall to it will cause an exception.\n\n## Syntax\n\n```js\nSymbol()\nSymbol(description)\n```\n\n> **Note:** `Symbol()` can only be called without `new`. Attempting to construct it with `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `description` _**optional**_\n  - : A string. A description of the symbol which can be used for debugging but not to\n    access the symbol itself.\n"
  },
  {
    "path": "documentation/docs/globals/Symbol/asyncIterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.asyncIterator\n\nThe **`Symbol.asyncIterator`** well-known symbol specifies the default [async iterator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_async_iterator_and_async_iterable_protocols) for an object. If this property is set on an object, it is an async iterable and can be used in a [`for await...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for-await...of) loop.\n\n## Value\n\nThe well-known symbol `Symbol.asyncIterator`.\n\n## Description\n\nThe `Symbol.asyncIterator` symbol is a builtin symbol that is used to access an object's `Symbol.asyncIterator` method. In order for an object to be async iterable, it must have a `Symbol.asyncIterator` key.\n"
  },
  {
    "path": "documentation/docs/globals/Symbol/for.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.for()\n\nThe **`Symbol.for(key)`** method searches for existing symbols\nin a runtime-wide symbol registry with the given key and returns it if found. Otherwise\na new symbol gets created in the global symbol registry with this key.\n\n## Syntax\n\n```js\nSymbol.for(key)\n```\n\n### Parameters\n\n- `key`\n  - : String, required. The key for the symbol (and also used for the description of the\n    symbol).\n\n### Return value\n\nAn existing symbol with the given key if found; otherwise, a new symbol is created and\nreturned.\n\n## Description\n\nIn contrast to `Symbol()`, the `Symbol.for()` function creates a\nsymbol available in a [global symbol registry](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol#shared_symbols_in_the_global_symbol_registry) list. `Symbol.for()` does also\nnot necessarily create a new symbol on every call, but checks first if a symbol with the\ngiven `key` is already present in the registry. In that case, that symbol is\nreturned. If no symbol with the given key is found, `Symbol.for()` will\ncreate a new global symbol.\n"
  },
  {
    "path": "documentation/docs/globals/Symbol/hasInstance.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.hasInstance\n\nThe **`Symbol.hasInstance`** well-known symbol is used to determine if a constructor object recognizes an object as its instance. The `instanceof` operator's behavior can be customized by this symbol.\n\n## Value\n\nThe well-known symbol `Symbol.hasInstance`.\n"
  },
  {
    "path": "documentation/docs/globals/Symbol/isConcatSpreadable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.isConcatSpreadable\n\nThe **`Symbol.isConcatSpreadable`** well-known symbol is used to configure if an object should be flattened to its array elements when using the [`Array.prototype.concat()`](../../globals/Array/prototype/concat.mdx) method.\n\n## Value\n\nThe well-known symbol `Symbol.isConcatSpreadable`.\n\n## Description\n\nThe `Symbol.isConcatSpreadable` symbol (`Symbol.isConcatSpreadable`) can be defined as an own or inherited property and its value is a boolean. It can control behavior for arrays and array-like objects:\n\n- For array objects, the default behavior is to spread (flatten) elements. `Symbol.isConcatSpreadable` can avoid flattening in these cases.\n- For array-like objects, the default behavior is no spreading or flattening. `Symbol.isConcatSpreadable` can force flattening in these cases.\n"
  },
  {
    "path": "documentation/docs/globals/Symbol/iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.iterator\n\nThe well-known **`Symbol.iterator`** symbol specifies the default iterator for an object. Used by [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of).\n\n## Value\n\nThe well-known symbol `Symbol.iterator`.\n\n## Description\n\nWhenever an object needs to be iterated (such as at the beginning of a `for...of` loop), its `Symbol.iterator` method is called with no arguments, and the returned **iterator** is used to obtain the values to be iterated.\n\nSome built-in types have a default iteration behavior, while other types (such as `Object`) do not. The built-in types with a `Symbol.iterator` method are:\n\n- [`Array.prototype[Symbol.iterator]()`](../../globals/Array/prototype/@@iterator.mdx)\n- [`String.prototype[Symbol.iterator]()`](../../globals/String/prototype/@@iterator.mdx)\n- [`Map.prototype[Symbol.iterator]()`](../../globals/Map/prototype/@@iterator.mdx)\n- [`Set.prototype[Symbol.iterator]()`](../../globals/Set/prototype/@@iterator.mdx)\n\nSee also [Iteration protocols](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) for more information.\n"
  },
  {
    "path": "documentation/docs/globals/Symbol/keyFor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.keyFor()\n\nThe **`Symbol.keyFor(sym)`** method retrieves a shared symbol\nkey from the global symbol registry for the given symbol.\n\n## Syntax\n\n```js\nSymbol.keyFor(sym)\n```\n\n### Parameters\n\n- `sym`\n  - : Symbol, required. The symbol to find a key for.\n\n### Return value\n\nA string representing the key for the given symbol if one is found on the [global registry](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol#shared_symbols_in_the_global_symbol_registry); otherwise, [`undefined`](../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/docs/globals/Symbol/match.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.match\n\nThe **`Symbol.match`** well-known symbol specifies the matching of a regular expression against a string. This function is called by the [`String.prototype.match()`](../../globals/String/prototype/match.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.match]()` and [`String.prototype.match()`](../../globals/String/prototype/match.mdx).\n\n## Value\n\nThe well-known symbol `Symbolmatch`.\n\n## Description\n\nThis function is also used to identify [if objects have the behavior of regular expressions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes). For example, the methods [`String.prototype.startsWith()`](../../globals/String/prototype/startsWith.mdx), [`String.prototype.endsWith()`](../../globals/String/prototype/endsWith.mdx) and [`String.prototype.includes()`](../../globals/String/prototype/includes.mdx), check if their first argument is a regular expression and will throw a [`TypeError`](../../globals/TypeError/TypeError.mdx) if they are. Now, if the `match` symbol is set to `false` (or a [Falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value except `undefined`), it indicates that the object is not intended to be used as a regular expression object.\n"
  },
  {
    "path": "documentation/docs/globals/Symbol/matchAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.matchAll\n\nThe **`Symbol.matchAll`** well-known symbol specifies the method that returns an iterator, that yields matches of the regular expression against a string. This function is called by the [`String.prototype.matchAll()`](../../globals/String/prototype/matchAll.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.matchAll]()` and [`String.prototype.matchAll()`](../../globals/String/prototype/matchAll.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.matchAll`.\n"
  },
  {
    "path": "documentation/docs/globals/Symbol/prototype/@@toPrimitive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype[Symbol.toPrimitive]\n\nThe **`[Symbol.toPrimitive]()`** method converts a Symbol object to\na primitive value.\n\n## Syntax\n\n```js\nSymbol()[Symbol.toPrimitive](hint)\n```\n\n### Return value\n\nThe primitive value of the specified `Symbol` object.\n\n## Description\n\nThe `[Symbol.toPrimitive]()` method of `Symbol` returns the primitive\nvalue of a Symbol object as a Symbol data type. The `hint`\nargument is not used.\n\nJavaScript calls the `[Symbol.toPrimitive]()` method to convert an object to a\nprimitive value. You rarely need to invoke the `[Symbol.toPrimitive]()` method\nyourself; JavaScript automatically invokes it when encountering an object where a\nprimitive value is expected.\n"
  },
  {
    "path": "documentation/docs/globals/Symbol/prototype/description.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype.description\n\nThe read-only **`description`** property is a string returning the optional description of `Symbol` objects.\n\n## Description\n\n`Symbol` objects can be created with an optional description which can be used for debugging but not to access the symbol itself. The `Symbol.prototype.description` property can be used to read that description. It is different to `Symbol.prototype.toString()` as it does not contain the enclosing `\"Symbol()\"` string. See the examples.\n"
  },
  {
    "path": "documentation/docs/globals/Symbol/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified symbol value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified symbol value.\n\n## Description\n\nThe `Symbol` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For `Symbol` values, the `toString` method returns a descriptive string in the form `\"Symbol(description)\"`, where `description` is the symbol's [`Symbol.prototype.description`](../../../globals/Symbol/prototype/description.mdx).\n\nThe `toString()` method requires its `this` value to be a `Symbol` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to symbol values.\n\nBecause `Symbol` has a [`[Symbol.toPrimitive]()`](../../../globals/Symbol/toPrimitive.mdx) method, that method always takes priority over `toString()` when a `Symbol` object is [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). However, because `Symbol.prototype[Symbol.toPrimitive]()` returns a symbol primitive, and symbol primitives throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when implicitly converted to a string, the `toString()` method is never implicitly called by the language. To stringify a symbol, you must explicitly call its `toString()` method or use the [`String()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/String#using_string_to_stringify_a_symbol) function.\n"
  },
  {
    "path": "documentation/docs/globals/Symbol/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a Symbol object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nThe primitive value of the specified `Symbol` object.\n\n## Description\n\nThe `valueOf()` method of `Symbol` returns the primitive value of a Symbol object as a Symbol data type.\n\nJavaScript calls the `valueOf()` method to convert an object to a primitive value. You rarely need to invoke the `valueOf()` method yourself; JavaScript automatically invokes it when encountering an object where a primitive value is expected.\n"
  },
  {
    "path": "documentation/docs/globals/Symbol/replace.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.replace\n\nThe **`Symbol.replace`** well-known symbol specifies the method that replaces matched substrings of a string. This function is called by the [`String.prototype.replace()`](../../globals/String/prototype/replace.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.replace]()` and [`String.prototype.replace()`](../../globals/String/prototype/replace.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.replace`.\n"
  },
  {
    "path": "documentation/docs/globals/Symbol/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.search\n\nThe **`Symbol.search`** well-known symbol specifies the method that returns the index within a string that matches the regular expression. This function is called by the [`String.prototype.search()`](../../globals/String/prototype/search.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.search]()` and [`String.prototype.search()`](../../globals/String/prototype/search.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.search`.\n"
  },
  {
    "path": "documentation/docs/globals/Symbol/species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.species\n\nThe well-known symbol **`Symbol.species`** specifies a function-valued property that the constructor function uses to create derived objects.\n\n> **Warning:** The existence of `Symbol.species` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Value\n\nThe well-known symbol `Symbol.species`.\n\n## Description\n\nThe `Symbol.species` accessor property allows subclasses to override the default constructor for objects. This specifies a protocol about how instances should be copied. For example, when you use copying methods of arrays, such as [`Array.prototype.map()`](../../globals/Array/prototype/map.mdx). the `map()` method uses `instance.constructor[Symbol.species]` to get the constructor for constructing the new array.\n\nAll built-in implementations of `Symbol.species` return the `this` value, which is the current instance's constructor. This allows copying methods to create instances of derived classes rather than the base class — for example, `map()` will return an array of the same type as the original array.\n"
  },
  {
    "path": "documentation/docs/globals/Symbol/split.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.split\n\nThe **`Symbol.split`** well-known symbol specifies the method that splits a string at the indices that match a regular expression. This function is called by the [`String.prototype.split()`](../../globals/String/prototype/split.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.split]()` and [`String.prototype.split()`](../../globals/String/prototype/split.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.split`.\n"
  },
  {
    "path": "documentation/docs/globals/Symbol/toPrimitive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.toPrimitive\n\nThe **`Symbol.toPrimitive`** well-known symbol specifies a method that accepts a preferred type and returns a primitive representation of an object. It is called in priority by all [type coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) algorithms.\n\n## Value\n\nThe well-known symbol `Symbol.toPrimitive`.\n\n## Description\n\nWith the help of the `Symbol.toPrimitive` property (used as a function value), an object can be converted to a primitive value. The function is called with a string argument `hint`, which specifies the preferred type of the result primitive value. The `hint` argument can be one of `\"number\"`, `\"string\"`, and `\"default\"`.\n\nThe `\"number\"` hint is used by [numeric coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#numeric_coercion) algorithms. The `\"string\"` hint is used by the [string coercion](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) algorithm. The `\"default\"` hint is used by the [primitive coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion) algorithm. The `hint` only acts as a weak signal of preference, and the implementation is free to ignore it (as [`Symbol.prototype[Symbol.toPrimitive]()`](../../globals/Symbol/prototype/@@toPrimitive.mdx) does). The language does not enforce alignment between the `hint` and the result type, although `[Symbol.toPrimitive]()` must return a primitive, or a [`TypeError`](../../globals/TypeError/TypeError.mdx) is thrown.\n\nObjects without the `Symbol.toPrimitive` property are converted to primitives by calling the `valueOf()` and `toString()` methods in different orders, which is explained in more detail in the [type coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) section. `Symbol.toPrimitive` allows full control over the primitive conversion process. For example, `Symbol.prototype.toString()` won't be called, and `Symbol` objects must always be explicitly converted to strings through [`String()`](../../globals/String/String.mdx).\n"
  },
  {
    "path": "documentation/docs/globals/Symbol/toStringTag.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.toStringTag\n\nThe **`Symbol.toStringTag`** well-known symbol is a string valued property that is used in the creation of the default string description of an object. It is accessed internally by the [`Object.prototype.toString()`](../../globals/Object/prototype/toString.mdx) method.\n\n## Value\n\nThe well-known symbol `Symbol.toStringTag`.\n"
  },
  {
    "path": "documentation/docs/globals/Symbol/unscopables.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.unscopables\n\nThe **`Symbol.unscopables`** well-known symbol is used to specify an object value of whose own and inherited property names are excluded from the [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) environment bindings of the associated object.\n\n## Value\n\nThe well-known symbol `@@unscopables`.\n\n## Description\n\nThe `@@unscopables` symbol (accessed via `Symbol.unscopables`) can be defined on any object to exclude property names from being exposed as lexical variables in [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) environment bindings. Note that when using [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), `with` statements are not available, and this symbol is likely not needed.\n\nSetting a property of the `@@unscopables` object to `true` (or any [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value) will make the corresponding property of the `with` scope object _unscopable_ and therefore won't be introduced to the `with` body scope. Setting a property to `false` (or any [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value) will make it _scopable_ and thus appear as lexical scope variables.\n\nWhen deciding whether `x` is unscopable, the entire prototype chain of the `@@unscopables` property is looked up for a property called `x`. This means if you declared `@@unscopables` as a plain object, `Object.prototype` properties like [`toString`](../../globals/Object/prototype/toString.mdx) would become unscopable as well, which may cause backward incompatibility for legacy code assuming those properties are normally scoped (see [an example here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/unscopables#avoid_using_a_non-null-prototype_object_as_symbol.unscopables)). You are advised to make your custom `@@unscopables` property have `null` as its prototype, like [`Array.prototype[Symbol.unscopables]`](../../globals/Array/prototype/@@unscopables.mdx) does.\n"
  },
  {
    "path": "documentation/docs/globals/SyntaxError/SyntaxError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SyntaxError\n\nThe **`SyntaxError`** constructor creates a new error object\nthat represents an error when trying to interpret syntactically invalid code.\n\n## Syntax\n\n```js\nnew SyntaxError()\nnew SyntaxError(message)\nnew SyntaxError(message, options)\nnew SyntaxError(message, fileName)\nnew SyntaxError(message, fileName, lineNumber)\n\nSyntaxError()\nSyntaxError(message)\nSyntaxError(message, options)\nSyntaxError(message, fileName)\nSyntaxError(message, fileName, lineNumber)\n```\n\n> **Note:** `SyntaxError()` can be called with or without `new`. Both create a new `SyntaxError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error."
  },
  {
    "path": "documentation/docs/globals/TextDecoder/TextDecoder.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder()\n\nThe **`TextDecoder()`** constructor returns a newly created `TextDecoder` object for the encoding specified in parameter.\n\n## Syntax\n\n```js\nnew TextDecoder()\nnew TextDecoder(label)\nnew TextDecoder(label, options)\n```\n\n### Parameters\n\n- `label` _**optional**_\n  - : A string, defaulting to `\"utf-8\"`.\n- `options` _**optional**_\n\n  - : An object with the property:\n\n    - `fatal`\n      - : A boolean value indicating if the `TextDecoder.decode()` method must throw a `TypeError` when decoding invalid data.\n        It defaults to `false`, which means that the decoder will substitute malformed data with a replacement character.\n\n    - `ignoreBOM`\n      - : A boolean value indicating whether the [byte order mark](https://www.w3.org/International/questions/qa-byte-order-mark) is ignored.\n        It defaults to `false`.\n\n### Exceptions\n\n- `RangeError`\n  - : Thrown if the value of `label` is unknown, or is one of the values leading to a `'replacement'` decoding algorithm (`\"iso-2022-cn\"` or `\"iso-2022-cn-ext\"`).\n"
  },
  {
    "path": "documentation/docs/globals/TextDecoder/prototype/decode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.decode()\n\nThe **`TextDecoder.decode()`** method returns a string containing text decoded from the buffer passed as a parameter.\n\nThe decoding method is defined in the current `TextDecoder` object.\nThis includes the expected encoding of the data, and how decoding errors are handled.\n\n## Syntax\n\n```js\ndecode()\ndecode(buffer)\ndecode(buffer, options)\n```\n\n### Parameters\n\n- `buffer` _**optional**_\n  - : Is an `ArrayBuffer`, a `TypedArray` or a `DataView` object containing the encoded text to decode.\n- `options` _**optional**_\n\n  - : An object with the property:\n\n    - `stream`\n      - : A boolean flag indicating that additional data will follow in subsequent calls to `decode()`.\n        Set to `true` if processing the data in chunks, and `false` for the final chunk or if the data is not chunked.\n        It defaults to `false`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if there is a decoding error when the property `TextDecoder.fatal` is `true`.\n\n### Return value\n\nA string.\n"
  },
  {
    "path": "documentation/docs/globals/TextDecoder/prototype/encoding.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.encoding\n\nThe **`TextDecoder.encoding`** read-only property returns a string containing the name of the decoding algorithm used by the specific decoder object.\n\nThe encoding is set by the constructor `label` parameter, and defaults to `utf-8`.\n\n## Value\n\nA lower-cased ASCII string, which can be one of the following values:\n\n- The recommended encoding for the Web: `'utf-8'`.\n- The legacy single-byte encodings:\n  ['ibm866'](https://en.wikipedia.org/wiki/Code_page_866),\n  ['iso-8859-2'](https://en.wikipedia.org/wiki/ISO/IEC_8859-2),\n  ['iso-8859-3'](https://en.wikipedia.org/wiki/ISO/IEC_8859-3),\n  ['iso-8859-4'](https://en.wikipedia.org/wiki/ISO/IEC_8859-4),\n  ['iso-8859-5'](https://en.wikipedia.org/wiki/ISO/IEC_8859-5),\n  ['iso-8859-6'](https://en.wikipedia.org/wiki/ISO/IEC_8859-6),\n  ['iso-8859-7'](https://en.wikipedia.org/wiki/ISO/IEC_8859-7),\n  ['iso-8859-8'](https://en.wikipedia.org/wiki/ISO/IEC_8859-8)'`,\n  ['iso-8859-8i'](https://en.wikipedia.org/wiki/ISO-8859-8-I),\n  ['iso-8859-10'](https://en.wikipedia.org/wiki/ISO/IEC_8859-10),\n  ['iso-8859-13'](https://en.wikipedia.org/wiki/ISO/IEC_8859-13),\n  ['iso-8859-14'](https://en.wikipedia.org/wiki/ISO/IEC_8859-14),\n  ['iso-8859-15'](https://en.wikipedia.org/wiki/ISO/IEC_8859-15),\n  ['iso-8859-16'](https://en.wikipedia.org/wiki/ISO/IEC_8859-16),\n  ['koi8-r'](https://en.wikipedia.org/wiki/KOI8-R),\n  ['koi8-u'](https://en.wikipedia.org/wiki/KOI8-U),\n  ['macintosh'](https://en.wikipedia.org/wiki/Mac_OS_Roman),\n  ['windows-874'](https://en.wikipedia.org/wiki/Windows-874),\n  ['windows-1250'](https://en.wikipedia.org/wiki/Windows-1250),\n  ['windows-1251'](https://en.wikipedia.org/wiki/Windows-1251),\n  ['windows-1252'](https://en.wikipedia.org/wiki/Windows-1252),\n  ['windows-1253'](https://en.wikipedia.org/wiki/Windows-1253),\n  ['windows-1254'](https://en.wikipedia.org/wiki/Windows-1254),\n  ['windows-1255'](https://en.wikipedia.org/wiki/Windows-1255),\n  ['windows-1256'](https://en.wikipedia.org/wiki/Windows-1256),\n  ['windows-1257'](https://en.wikipedia.org/wiki/Windows-1257),\n  ['windows-1258'](https://en.wikipedia.org/wiki/Windows-1258), or\n  ['x-mac-cyrillic'](https://en.wikipedia.org/wiki/Macintosh_Cyrillic_encoding).\n- The legacy multi-byte Chinese (simplified) encodings:\n  ['gbk'](https://en.wikipedia.org/wiki/GBK),\n  ['gb18030'](https://en.wikipedia.org/wiki/GB_18030)\n- The legacy multi-byte Chinese (traditional) encoding:\n  ['big5'](https://en.wikipedia.org/wiki/Big5).\n- The legacy multi-byte Japanese encodings:\n  ['euc-jp'](https://en.wikipedia.org/wiki/Extended_Unix_Code#EUC-JP),\n  ['iso-2022-jp'](https://en.wikipedia.org/wiki/ISO/IEC_2022#ISO-2022-JP),\n  ['shift-jis'](https://en.wikipedia.org/wiki/Shift_JIS).\n- The legacy multi-byte Korean encodings:\n  ['euc-kr'](https://en.wikipedia.org/wiki/Extended_Unix_Code#EUC-KR)\n- The legacy miscellaneous encodings:\n  ['utf-16be'](https://en.wikipedia.org/wiki/UTF-16#Byte_order_encoding_schemes),\n  ['utf-16le'](https://en.wikipedia.org/wiki/UTF-16#Byte_order_encoding_schemes),\n  `'x-user-defined'`.\n- A special encoding, `'replacement'`.\n  This decodes empty input into empty output and any other arbitrary-length input into a single replacement character.\n  It is used to prevent attacks that mismatch encodings between the client and server.\n  The following encodings also map to the replacement encoding: `ISO-2022-CN`, `ISO-2022-CN-ext`, ['iso-2022-kr'](https://en.wikipedia.org/wiki/ISO/IEC_2022#ISO-2022-KR) and ['hz-gb-2312'](https://en.wikipedia.org/wiki/HZ_(character_encoding)).\n"
  },
  {
    "path": "documentation/docs/globals/TextDecoder/prototype/fatal.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.fatal\n\nThe **`fatal`** read-only property of the `TextDecoder` interface is a `Boolean` indicating whether the error mode is fatal.\n\nIf the property is `true` then a decoder will throw a `TypeError` if it encounters malformed data while decoding.\nIf `false` the decoder will substitute the invalid data with the replacement character `U+FFFD` (�).\nThe value of the property is set in the `TextDecoder()` constructor.\n\n## Value\n\nA `boolean` which will return `true` if the error mode is set to `fatal`.\nOtherwise it returns `false`, indicating that the error mode is \"replacement\".\n"
  },
  {
    "path": "documentation/docs/globals/TextDecoder/prototype/ignoreBOM.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.ignoreBOM\n\nThe **`ignoreBOM`** read-only property of the `TextDecoder` interface is a `Boolean` indicating whether the [byte order mark](https://www.w3.org/International/questions/qa-byte-order-mark) is ignored.\n\n## Value\n\n`true` if the byte order mark is ignored; `false` otherwise.\n"
  },
  {
    "path": "documentation/docs/globals/TextEncoder/TextEncoder.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextEncoder()\n\nThe **`TextEncoder()`** constructor returns a newly created `TextEncoder` object that will generate a byte stream with UTF-8 encoding.\n\n## Syntax\n\n```js\nnew TextEncoder()\n```\n\n### Parameters\n\nNone.\n"
  },
  {
    "path": "documentation/docs/globals/TextEncoder/prototype/encode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextEncoder.encode()\n\nThe **`TextEncoder.encode()`** method takes a string as input, and returns a `Uint8Array` containing the text given in parameters encoded with the specific method for that `TextEncoder` object.\n\n## Syntax\n\n```js\nencode(string)\n```\n\n### Parameters\n\n- `string`\n  - : A string containing the text to encode.\n\n### Return value\n\nA `Uint8Array` object.\n"
  },
  {
    "path": "documentation/docs/globals/TextEncoder/prototype/encoding.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextEncoder.encoding\n\nThe **`TextEncoder.encoding`** read-only property returns a string containing the name of the encoding algorithm used by the specific encoder.\n\nIt can only have the following value `utf-8`.\n\n## Value\n\nA string with the value `utf-8`.\n\n"
  },
  {
    "path": "documentation/docs/globals/TransformStream/TransformStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStream()\n\nThe **`TransformStream()`** constructor creates a new `TransformStream` object which represents a pair of streams: a `WritableStream` representing the writable side, and a `ReadableStream` representing the readable side.\n\n## Syntax\n\n```js\nnew TransformStream()\nnew TransformStream(transformer)\nnew TransformStream(transformer, writableStrategy)\nnew TransformStream(transformer, writableStrategy, readableStrategy)\n```\n\n### Parameters\n\n- `transformer` _**optional**_\n\n  - : An object representing the `transformer`. If not supplied the resulting stream will be an **identity transform stream** which forwards all chunks written to its writable side to its readable side, without any changes.\n\n    The transformer object can contain any of the following methods. In each method `controller` is an instance of `TransformStreamDefaultController`.\n\n    - `start(controller)`\n      - : Called when the `TransformStream` is constructed. It is typically used to enqueue chunks using `TransformStreamDefaultController.enqueue()`.\n    - `transform(chunk, controller)`\n      - : Called when a chunk written to the writable side is ready to be transformed, and performs the work of the transformation stream. If no `transform()` method is supplied, the identity transform is used, and the chunk will be enqueued with no changes.\n    - `flush(controller)`\n      - : Called after all chunks written to the writable side have been successfully transformed, and the writable side is about to be closed.\n\n- `writableStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer. This defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk`. This indicates the size to\n        use for each chunk, in bytes.\n\n- `readableStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer. This defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk`. This indicates the size to\n        use for each chunk, in bytes.\n\n> **Note:** You could define your own custom\n> `readableStrategy` or `writableStrategy`, or use an instance of\n> `ByteLengthQueuingStrategy` or `CountQueuingStrategy`\n> for the object values.\n"
  },
  {
    "path": "documentation/docs/globals/TransformStream/prototype/readable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStream.readable\n\nThe **`readable`** read-only property of the `TransformStream` interface returns the `ReadableStream` instance controlled by this `TransformStream`.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/docs/globals/TransformStream/prototype/writable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStream.writable\n\nThe **`writable`** read-only property of the `TransformStream` interface returns the `WritableStream` instance controlled by this `TransformStream`.\n\n## Value\n\nA `WritableStream`.\n"
  },
  {
    "path": "documentation/docs/globals/TransformStreamDefaultController/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.desiredSize\n\nThe **`desiredSize`** read-only property of the `TransformStreamDefaultController` interface returns the desired size to fill the queue of the associated [`ReadableStream`](../../../globals/ReadableStream/ReadableStream.mdx).\n\nThe internal queue of a `ReadableStream` contains chunks that have been enqueued, but not yet read.\n\nIf the `desiredSize` is `0` then the queue is full. Therefore you can use this information to manually apply backpressure to manage the queue.\n\n## Value\n\nThe desired size.\n"
  },
  {
    "path": "documentation/docs/globals/TransformStreamDefaultController/prototype/enqueue.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.enqueue()\n\nThe **`enqueue()`** method of the `TransformStreamDefaultController` interface enqueues the given chunk in the readable side of the stream.\n\n## Syntax\n\n```js\nenqueue(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : The chunk being queued. A chunk is a single piece of data. It can be any type of data, and a stream can contain chunks of different types.\n\n### Return value\n\nNone `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream is not readable.\n    This might occur if the stream is errored via `controller.error()`, or when it is closed without its controller's `controller.close()` method ever being called.\n"
  },
  {
    "path": "documentation/docs/globals/TransformStreamDefaultController/prototype/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.error()\n\nThe **`error()`** method of the `TransformStreamDefaultController` interface errors both sides of the stream. Any further interactions with it will fail with the given error message, and any chunks in the queue will be discarded.\n\n## Syntax\n\n```js\nerror(reason)\n```\n\n### Parameters\n\n- `reason`\n  - : A string containing the error message to be returned on any further interaction with the stream.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/docs/globals/TransformStreamDefaultController/prototype/terminate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.terminate()\n\nThe **`terminate()`** method of the `TransformStreamDefaultController` interface closes the readable side and errors the writable side of the stream.\n\n## Syntax\n\n```js\nterminate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone (`undefined`).\n"
  },
  {
    "path": "documentation/docs/globals/TypeError/TypeError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TypeError\n\nThe **`TypeError()`** constructor creates a new error when an\noperation could not be performed, typically (but not exclusively) when a value is not of\nthe expected type.\n\n## Syntax\n\n```js\nnew TypeError()\nnew TypeError(message)\nnew TypeError(message, options)\nnew TypeError(message, fileName)\nnew TypeError(message, fileName, lineNumber)\n\nTypeError()\nTypeError(message)\nTypeError(message, options)\nTypeError(message, fileName)\nTypeError(message, fileName, lineNumber)\n```\n\n> **Note:** `TypeError()` can be called with or without `new`. Both create a new `TypeError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/docs/globals/URIError/URIError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URIError\n\nThe **`URIError()`** constructor creates an error when a global\nURI handling function was used in a wrong way.\n\n## Syntax\n\n```js\nnew URIError()\nnew URIError(message)\nnew URIError(message, options)\nnew URIError(message, fileName)\nnew URIError(message, fileName, lineNumber)\n\nURIError()\nURIError(message)\nURIError(message, options)\nURIError(message, fileName)\nURIError(message, fileName, lineNumber)\n```\n\n> **Note:** `URIError()` can be called with or without `new`. Both create a new `URIError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/docs/globals/URL/URL.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL()\n\nThe **`URL()`** constructor returns a newly created\n`URL` object representing the URL defined by the parameters.\n\nIf the given base URL or the resulting URL are not valid URLs, the JavaScript\n`TypeError` exception is thrown.\n\n## Syntax\n\n```js\nnew URL(url)\nnew URL(url, base)\n```\n\n### Parameters\n\n- `url`\n  - : A string or any other object with a `toString()` method.\n    If `url` is a relative URL, `base` is\n    required, and will be used as the base URL. If `url` is an\n    absolute URL, a given `base` will be ignored.\n- `base` _**optional**_\n  - : A string representing the base URL to use in cases where\n    `url` is a relative URL. If not specified, it defaults to\n    `undefined`.\n\n> **Note:** The `url` and `base` arguments will\n> each be stringified from whatever value you pass, just like with other Web APIs\n> that accept a string. In particular, you can use an existing\n> `URL` object for either argument, and it will stringify to the\n> object's `URL.href\", \"href` property.\n"
  },
  {
    "path": "documentation/docs/globals/URL/prototype/hash.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.hash\n\nThe **`hash`** property of the\n`URL` interface is a string containing a\n`'#'` followed by the fragment identifier of the URL.\n\nThe fragment is not percent-decoded. If the URL does not\nhave a fragment identifier, this property contains an empty string — `\"\"`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/docs/globals/URL/prototype/host.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.host\n\nThe **`host`** property of the `URL` interface is\na string containing the host, that is the `URL.hostname`, and then, if the `port` of the URL is nonempty, a\n`':'`, followed by the `port` of the URL.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/docs/globals/URL/prototype/hostname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.hostname\n\nThe **`hostname`** property of the `URL` interface\nis a string containing the domain name of the URL.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/docs/globals/URL/prototype/href.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.href\n\nThe **`href`** property of the `URL` interface is\na string containing the whole URL.\n\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/docs/globals/URL/prototype/origin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.origin\n\nThe **`origin`** read-only property of\nthe `URL` interface returns a string containing the\nUnicode serialization of the origin of the represented URL.\n\nThe exact structure\nvaries depending on the type of URL:\n\n- For `http` or `https` URLs, the scheme followed by\n  `'://'`, followed by the domain, followed by `':'`, followed by\n  the port (the default port, `80` and `443` respectively, if\n  explicitly specified).\n- For `file:` URLs, the value is browser dependent.\n- for `blob:` URLs, the origin of the URL following `blob:` will\n  be used. For example, `\"blob:https://mozilla.org\"` will be returned as\n  `\"https://mozilla.org\".`\n\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/docs/globals/URL/prototype/password.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.password\n\nThe **`password`** property of the `URL` interface\nis a string containing the password specified before the domain name.\n\nIf it is set without first setting the `URL.username` property, it silently fails.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/docs/globals/URL/prototype/pathname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.pathname\n\nThe **`pathname`** property of the `URL` interface represents a location in a hierarchical structure. It is a string constructed from a list of path segments, each of which is prefixed by a `/` character. If the URL has no path segments, the value of its `pathname` property will be the empty string.\n\nURLs such as `https` and `http` URLs that have [hierarchical schemes](https://www.rfc-editor.org/rfc/rfc3986#section-1.2.3) (which the URL standard calls \"[special schemes](https://url.spec.whatwg.org/#special-scheme)\") always have at least one (invisible) path segment: the empty string. Thus the `pathname` value for such \"special scheme\" URLs can never be the empty string, but will instead always have a least one `/` character.\n\nFor example, the URL `https://developer.mozilla.org` has just one path segment: the empty string, so its `pathname` value is constructed by prefixing a `/` character to the empty string.\n\nSome systems define the term _slug_ to mean the final segment of a non-empty path if it identifies a page in human-readable keywords. For example, the URL `https://example.org/articles/this-that-other-outre-collection` has `this-that-other-outre-collection` as its slug.\n\nSome systems use the `;` and `=` characters to delimit parameters and parameter values applicable to a path segment. For example, with the URL `https://example.org/users;id=42/tasks;state=open?sort=modified`, a system might extract and use the path segment parameters `id=42` and `state=open` from the path segments `users;id=42` and `tasks;state=open`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/docs/globals/URL/prototype/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.port\n\nThe **`port`** property of the `URL` interface is\na string containing the port number of the URL.\n\n> **Note:** If an input string passed to the `URL()` constructor doesn't contain an explicit port number (e.g., `https://localhost`) or contains a port number that's the default port number corresponding to the protocol part of the input string (e.g., `https://localhost:443`), then in the `URL` object the constructor returns, the value of the port property will be the empty string: `''`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/docs/globals/URL/prototype/protocol.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.protocol\n\nThe **`protocol`** property of the `URL` interface\nis a string representing the protocol scheme of the URL, including the\nfinal `':'`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/docs/globals/URL/prototype/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.search\n\nThe **`search`** property of the `URL` interface\nis a search string, also called a _query string_, that is a\nstring containing a `'?'` followed by the parameters of the\nURL.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/docs/globals/URL/prototype/searchParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.searchParams\n\nThe **`searchParams`** readonly property of the\n`URL` interface returns a `URLSearchParams` object allowing\naccess to the `GET` decoded query arguments contained in the URL.\n\n## Value\n\nA `URLSearchParams` object.\n"
  },
  {
    "path": "documentation/docs/globals/URL/prototype/toJSON.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.toJSON()\n\nThe **`toJSON()`** method of the `URL` interface\nreturns a string containing a serialized version of the URL,\nalthough in practice it seems to have the same effect as\n`URL.toString()`.\n\n## Syntax\n\n```js\ntoJSON()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string.\n"
  },
  {
    "path": "documentation/docs/globals/URL/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.toString()\n\nThe **`URL.toString()`** method returns a\nstring containing the whole URL. It is effectively a read-only version\nof `URL.prototype.href`.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string.\n"
  },
  {
    "path": "documentation/docs/globals/URL/prototype/username.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.username\n\nThe **`username`** property of the `URL` interface\nis a string containing the username specified before the domain name.\n\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/docs/globals/URLSearchParams/URLSearchParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams()\n\nThe **`URLSearchParams()`** constructor creates and returns a\nnew `URLSearchParams` object.\n\n\n\n## Syntax\n\n```js\nnew URLSearchParams()\nnew URLSearchParams(options)\n```\n\n### Parameters\n\n- `options` _**optional**_\n  - : One of:\n    - A string, which will be parsed from `application/x-www-form-urlencoded` format. A leading `'?'` character is ignored.\n    - A literal sequence of name-value string pairs, or any object with an iterator that produces a sequence of string pairs.\n    - A record of string keys and string values. Note that nesting is not supported.\n\n### Return value\n\nA `URLSearchParams` object instance.\n"
  },
  {
    "path": "documentation/docs/globals/URLSearchParams/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.append()\n\nThe **`append()`** method of the `URLSearchParams`\ninterface appends a specified key/value pair as a new search parameter.\n\nAs shown in the example below, if the same key is appended multiple times it will\nappear in the parameter string multiple times for each value.\n\n## Syntax\n\n```js\nappend(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to append.\n- `value`\n  - : The value of the parameter to append.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/docs/globals/URLSearchParams/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.delete()\n\nThe **`delete()`** method of the `URLSearchParams`\ninterface deletes the given search parameter and all its associated values, from the\nlist of all search parameters.\n\n## Syntax\n\n```js\ndelete(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to be deleted.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/docs/globals/URLSearchParams/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.entries()\n\nThe **`entries()`** method of the\n`URLSearchParams` interface returns an\niterator allowing iteration through all key/value\npairs contained in this object. The iterator returns key/value pairs in the same order as they appear in the query string. The key and value of each pair are\nstring objects.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/docs/globals/URLSearchParams/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.forEach()\n\nThe **`forEach()`** method of the\n`URLSearchParams` interface allows iteration through all values contained\nin this object via a callback function.\n\n## Syntax\n\n```js\nforEach(callback)\nforEach(callback, thisArg)\n```\n\n### Parameters\n\n- `callback`\n\n  - : Function to execute on each element, which is passed the following arguments:\n\n    - `value`\n      - : The value of the current entry being processed in the `URLSearchParams` object.\n    - `key`\n      - : The key of the current entry being processed in the `URLSearchParams` object.\n    - `searchParams`\n      - : The `URLSearchParams` object the `forEach()` was called upon.\n\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `callback`.\n\n### Return value\n\nNone `undefined`.\n\n"
  },
  {
    "path": "documentation/docs/globals/URLSearchParams/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.get()\n\nThe **`get()`** method of the `URLSearchParams`\ninterface returns the first value associated to the given search parameter.\n\n## Syntax\n\n```js\nget(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to return.\n\n### Return value\n\nA string if the given search parameter is found; otherwise,\n**`null`**.\n"
  },
  {
    "path": "documentation/docs/globals/URLSearchParams/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.has()\n\nThe **`has()`** method of the `URLSearchParams`\ninterface returns a boolean value that indicates whether a parameter with the\nspecified name exists.\n\n## Syntax\n\n```js\nhas(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to find.\n\n### Return value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/docs/globals/URLSearchParams/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.keys()\n\nThe **`keys()`** method of the `URLSearchParams`\ninterface returns an iterator allowing iteration\nthrough all keys contained in this object. The keys are string\nobjects.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/docs/globals/URLSearchParams/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.set()\n\nThe **`set()`** method of the `URLSearchParams`\ninterface sets the value associated with a given search parameter to the given value.\nIf there were several matching values, this method deletes the others. If the search\nparameter doesn't exist, this method creates it.\n\n## Syntax\n\n```js\nset(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to set.\n- `value`\n  - : The value of the parameter to set.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/docs/globals/URLSearchParams/prototype/sort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.sort()\n\nThe **`URLSearchParams.sort()`** method sorts all key/value\npairs contained in this object in place and returns `undefined`. The sort\norder is according to unicode code points of the keys. This method uses a stable sorting\nalgorithm (i.e. the relative order between key/value pairs with equal keys will be\npreserved).\n\n## Syntax\n\n```js\nsort()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/docs/globals/URLSearchParams/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.toString()\n\nThe **`toString()`** method of the\n`URLSearchParams` interface returns a query string suitable for use in a\nURL.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string, without the question mark. (Returns an empty string if no\nsearch parameters have been set.)\n"
  },
  {
    "path": "documentation/docs/globals/URLSearchParams/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.values()\n\nThe **`values()`** method of the `URLSearchParams`\ninterface returns an iterator allowing iteration\nthrough all values contained in this object. The values are string\nobjects.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/docs/globals/Uint16Array/Uint16Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint16Array\n\nThe **`Uint16Array()`** typed array constructor creates an\narray of 16-bit unsigned integers in the platform byte order.\n\n## Syntax\n\n```js\nnew Uint16Array()\nnew Uint16Array(length)\nnew Uint16Array(typedArray)\nnew Uint16Array(object)\n\nnew Uint16Array(buffer)\nnew Uint16Array(buffer, byteOffset)\nnew Uint16Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint16Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/docs/globals/Uint32Array/Uint32Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint32Array\n\nThe **`Uint32Array()`** typed array constructor creates an\narray of 32-bit unsigned integers in the platform byte order. If control over byte order\nis needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are initialized to\n`0`. Once established, you can reference elements in the array using the\nobject's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Uint32Array()\nnew Uint32Array(length)\nnew Uint32Array(typedArray)\nnew Uint32Array(object)\n\nnew Uint32Array(buffer)\nnew Uint32Array(buffer, byteOffset)\nnew Uint32Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint32Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/docs/globals/Uint8Array/Uint8Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint8Array\n\nThe **`Uint8Array()`** constructor creates a typed array of\n8-bit unsigned integers. The contents are initialized to `0`. Once\nestablished, you can reference elements in the array using the object's methods, or\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew Uint8Array()\nnew Uint8Array(length)\nnew Uint8Array(typedArray)\nnew Uint8Array(object)\n\nnew Uint8Array(buffer)\nnew Uint8Array(buffer, byteOffset)\nnew Uint8Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint8Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/docs/globals/Uint8ClampedArray/Uint8ClampedArray.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint8ClampedArray\n\nThe **`Uint8ClampedArray()`** constructor creates a typed array\nof 8-bit unsigned integers clamped to 0-255; if you specified a value that is out of the\nrange of \\[0,255], 0 or 255 will be set instead; if you specify a non-integer, the\nnearest integer will be set. The contents are initialized to `0`. Once\nestablished, you can reference elements in the array using the object's methods, or\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew Uint8ClampedArray()\nnew Uint8ClampedArray(length)\nnew Uint8ClampedArray(typedArray)\nnew Uint8ClampedArray(object)\n\nnew Uint8ClampedArray(buffer)\nnew Uint8ClampedArray(buffer, byteOffset)\nnew Uint8ClampedArray(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint8ClampedArray()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/docs/globals/WeakMap/WeakMap.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap\n\nThe **`WeakMap()` constructor** creates a `WeakMap` object, optionally based on a provided `Array` or other iterable object.\n\n## Syntax\n\n```js\nnew WeakMap()\nnew WeakMap(iterable)\n```\n\n> **Note:** `WeakMap()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable`\n  - : An `Array` or other object that implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol)  that returns an iterator object that produces a two-element array-like object whose first element is a value that will be used as a `WeakMap` key and whose second element is the value to associate with that key. Each key-value pair will be added to the new `WeakMap`. null is treated as undefined.\n"
  },
  {
    "path": "documentation/docs/globals/WeakMap/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.delete()\n\nThe **`delete()`** method removes the specified element from a\n`WeakMap` object.\n\n## Syntax\n\n```js\ndelete(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to remove from the `WeakMap` object.\n\n### Return value\n\n`true` if an element in the `WeakMap` object has been removed\nsuccessfully. `false` if the key is not found in the `WeakMap` or\nif the key is not an object.\n"
  },
  {
    "path": "documentation/docs/globals/WeakMap/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.get()\n\nThe **`get()`** method returns a specified element from a\n`WeakMap` object.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key`\n  - : Required. The key of the element to return from the `WeakMap` object.\n\n### Return value\n\nThe element associated with the specified key in the `WeakMap` object. If\nthe key can't be found, [`undefined`](../../../globals/undefined.mdx) is returned.\n"
  },
  {
    "path": "documentation/docs/globals/WeakMap/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.has()\n\nThe **`has()`** method returns a boolean indicating whether an\nelement with the specified key exists in the `WeakMap` object or not.\n\n## Syntax\n\n```js\nhas(key)\n```\n\n### Parameters\n\n- `key`\n  - : Required. The key of the element to test for presence in the `WeakMap`\n    object.\n\n### Return value\n\n- Boolean\n  - : Returns `true` if an element with the specified key exists in the\n    `WeakMap` object; otherwise `false`.\n"
  },
  {
    "path": "documentation/docs/globals/WeakMap/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.set\n\nThe **`set()`** method adds a new element with a specified key\nand value to a `WeakMap` object.\n\n## Syntax\n\n```js\nset(key, value)\n```\n\n### Parameters\n\n- `key`\n  - : Required. Must be `object`. The key of the element to add to the\n    `WeakMap` object.\n- `value`\n  - : Required. Any value. The value of the element to add to the `WeakMap`\n    object.\n\n### Return value\n\nThe `WeakMap` object.\n"
  },
  {
    "path": "documentation/docs/globals/WeakRef/WeakRef.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakRef\n\nThe **`WeakRef`** constructor creates a `WeakRef`\nobject referring to a given target object.\n\n## Syntax\n\n```js\nnew WeakRef(targetObject)\n```\n\n> **Note:** `WeakRef()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `targetObject`\n  - : The target object the WeakRef should refer to (also called the _referent_).\n"
  },
  {
    "path": "documentation/docs/globals/WeakRef/prototype/deref.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakRef.prototype.deref()\n\nThe `deref` method returns the `WeakRef` instance's target\nobject, or `undefined` if the target object has been garbage-collected.\n\n## Syntax\n\n```js\nderef()\n```\n\n### Return value\n\nThe target object of the WeakRef, or `undefined` if the object has been\ngarbage-collected.\n\n## Description\n\nSee the [Notes on WeakRefs](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WeakRef#notes_on_weakrefs) section of the `WeakRef` page for some important notes.\n"
  },
  {
    "path": "documentation/docs/globals/WeakSet/WeakSet.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet\n\nThe **`WeakSet`** constructor lets you create\n`WeakSet` objects that store weakly held _objects_ in a collection.\n\n## Syntax\n\n```js\nnew WeakSet()\nnew WeakSet(iterable)\n```\n\n> **Note:** `WeakSet()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable` _**optional**_\n  - : If an [iterable object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) is passed, all of its elements will be added to the new\n    `WeakSet`. null is treated as undefined.\n"
  },
  {
    "path": "documentation/docs/globals/WeakSet/prototype/add.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet.prototype.add\n\nThe **`add()`** method appends a new object to the end of a\n`WeakSet` object.\n\n## Syntax\n\n```js\nadd(value)\n```\n\n### Parameters\n\n- value\n  - : Required. The object to add to the `WeakSet` collection.\n\n### Return value\n\nThe `WeakSet` object.\n"
  },
  {
    "path": "documentation/docs/globals/WeakSet/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet.prototype.delete\n\nThe **`delete()`** method removes the specified element from a\n`WeakSet` object.\n\n## Syntax\n\n```js\ndelete(value)\n```\n\n### Parameters\n\n- `value`\n  - : Required. The object remove from the `WeakSet` object.\n\n### Return value\n\n`true` if an element in the `WeakSet` object has been removed\nsuccessfully. `false` if the `value` is not found in\nthe `WeakSet` or if the `value` is not an object.\n"
  },
  {
    "path": "documentation/docs/globals/WeakSet/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet.prototype.has\n\nThe **`has()`** method returns a boolean indicating whether an\nobject exists in a `WeakSet` or not.\n\n## Syntax\n\n```js\nhas(value)\n```\n\n### Parameters\n\n- `value`\n  - : Required. The object to test for presence in the `WeakSet`.\n\n### Return value\n\n- Boolean\n  - : Returns `true` if an element with the specified value exists in the\n    `WeakSet` object; otherwise `false`.\n"
  },
  {
    "path": "documentation/docs/globals/WorkerLocation/WorkerLocation.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# WorkerLocation\n\nThe **`WorkerLocation`** interface defines the absolute location of the script executed by the Worker. Such an object is initialized for each worker and is available via the [`location`](../../globals/location.mdx) property obtained by calling `globalThis.location`.\n\n## Instance properties\n\n- [`WorkerLocation.href`](../../globals/WorkerLocation/href.mdx) _**read-only**_\n  - : Returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location.\n- [`WorkerLocation.protocol`](../../globals/WorkerLocation/protocol.mdx) _**read-only**_\n  - : Returns the [`protocol`](../../globals/URL/prototype/protocol.mdx) part of the worker's location.\n- [`WorkerLocation.host`](../../globals/WorkerLocation/host.mdx) _**read-only**_\n  - : Returns the [`host`](../../globals/URL/prototype/host.mdx) part of the worker's location.\n- [`WorkerLocation.hostname`](../../globals/WorkerLocation/hostname.mdx) _**read-only**_\n  - : Returns the [`hostname`](../../globals/URL/prototype/hostname.mdx) part of the worker's location.\n- [`WorkerLocation.origin`](../../globals/WorkerLocation/origin.mdx) _**read-only**_\n  - : Returns the worker's [`origin`](../../globals/URL/prototype/origin.mdx).\n- [`WorkerLocation.port`](../../globals/WorkerLocation/port.mdx) _**read-only**_\n  - : Returns the [`port`](../../globals/URL/prototype/port.mdx) part of the worker's location.\n- [`WorkerLocation.pathname`](../../globals/WorkerLocation/pathname.mdx) _**read-only**_\n  - : Returns the [`pathname`](../../globals/URL/prototype/pathname.mdx) part of the worker's location.\n- [`WorkerLocation.search`](../../globals/WorkerLocation/search.mdx) _**read-only**_\n  - : Returns the [`search`](../../globals/URL/prototype/search.mdx) part of the worker's location.\n- [`WorkerLocation.hash`](../../globals/WorkerLocation/hash.mdx) _**read-only**_\n  - : Returns the [`hash`](../../globals/URL/prototype/hash.mdx) part of the worker's location.\n\n## Instance methods\n\n- [`WorkerLocation.toString`](../../globals/WorkerLocation/toString.mdx)\n  - : Returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location. It is a synonym for [`WorkerLocation.href`](../../globals/WorkerLocation/href.mdx).\n"
  },
  {
    "path": "documentation/docs/globals/WorkerLocation/hash.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.hash\n\nThe **`hash`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`hash`](../../globals/URL/prototype/hash.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/docs/globals/WorkerLocation/host.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.host\n\nThe **`host`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`host`](../../globals/URL/prototype/host.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/docs/globals/WorkerLocation/hostname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.hostname\n\nThe **`hostname`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`hostname`](../../globals/URL/prototype/hostname.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/docs/globals/WorkerLocation/href.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.href\n\nThe **`href`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/docs/globals/WorkerLocation/origin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.origin\n\nThe **`origin`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the worker's [`origin`](../../globals/URL/prototype/origin.mdx).\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/docs/globals/WorkerLocation/pathname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.pathname\n\nThe **`pathname`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`pathname`](../../globals/URL/prototype/pathname.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/docs/globals/WorkerLocation/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.port\n\nThe **`port`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`port`](../../globals/URL/prototype/port.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/docs/globals/WorkerLocation/protocol.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.protocol\n\nThe **`protocol`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`protocol`](../../globals/URL/prototype/protocol.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/docs/globals/WorkerLocation/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.search\n\nThe **`search`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`search`](../../globals/URL/prototype/search.mdx) part of the worker's location.\n\n## Value\n\nA string.\n\n"
  },
  {
    "path": "documentation/docs/globals/WorkerLocation/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.toString()\n\nThe **`toString()`** method of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location. It is a synonym for [`WorkerLocation.href`](../../globals/WorkerLocation/href.mdx).\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone [`undefined`](../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/docs/globals/WritableStream/WritableStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream()\n\nThe **`WritableStream()`** constructor creates\na new `WritableStream` object instance.\n\n## Syntax\n\n```js\nnew WritableStream(underlyingSink)\nnew WritableStream(underlyingSink, queuingStrategy)\n```\n\n### Parameters\n\n- `underlyingSink` _**optional**_\n\n  - : An object containing methods and properties that define how the constructed stream\n    instance will behave. `underlyingSink` can contain the following:\n\n    - `start(controller)` _**optional**_\n      - : This is a method, called immediately when the object is constructed. The\n        contents of this method are defined by the developer, and should aim to get access\n        to the underlying sink. If this process is to be done asynchronously, it can\n        return a promise to signal success or failure. The `controller`\n        parameter passed to this method is a\n        `WritableStreamDefaultController`. This can be used by the developer\n        to control the stream during set up.\n    - `write(chunk, controller)` _**optional**_\n      - : This method, also defined by the developer, will be called when a new chunk of\n        data (specified in the `chunk` parameter) is ready to be written to the\n        underlying sink. It can return a promise to signal success or failure of the write\n        operation. The `controller` parameter passed to this method is a\n        `WritableStreamDefaultController` that can be used by the developer\n        to control the stream as more chunks are submitted for writing. This method will\n        be called only after previous writes have succeeded, and never after the stream is\n        closed or aborted (see below).\n    - `close(controller)` _**optional**_\n      - : This method, also defined by the developer, will be called if the app signals\n        that it has finished writing chunks to the stream. The contents should do whatever\n        is necessary to finalize writes to the underlying sink, and release access to it.\n        If this process is asynchronous, it can return a promise to signal success or\n        failure. This method will be called only after all queued-up writes have\n        succeeded. The `controller` parameter passed to this method is a\n        `WritableStreamDefaultController`, which can be used to control the\n        stream at the end of writing.\n    - `abort(reason)` _**optional**_\n      - : This method, also defined by the developer, will be called if the app signals\n        that it wishes to abruptly close the stream and put it in an errored state. It can\n        clean up any held resources, much like `close()`, but\n        `abort()` will be called even if writes are queued up — those chunks\n        will be thrown away. If this process is asynchronous, it can return a promise to\n        signal success or failure. The `reason` parameter contains a\n        string describing why the stream was aborted.\n\n- `queuingStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer — this defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk` — this indicates the size to use for each chunk, in bytes.\n\n    > **Note:** You could define your own custom\n    > `queuingStrategy`, or use an instance of\n    > `ByteLengthQueuingStrategy` or `CountQueuingStrategy`\n    > for this object value. If no `queuingStrategy` is supplied, the default\n    > used is the same as a `CountQueuingStrategy` with a high water mark of 1\\.\n\n### Return value\n\nAn instance of the `WritableStream` object.\n"
  },
  {
    "path": "documentation/docs/globals/WritableStream/prototype/abort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream.abort()\n\nThe **`abort()`** method of the `WritableStream` interface aborts the stream, signaling that the producer can no longer successfully write to the stream and it is to be immediately moved to an error state, with any queued writes discarded.\n\n## Syntax\n\n```js\nabort(reason)\n```\n\n### Parameters\n\n- `reason`\n  - : A string providing a human-readable reason for the abort.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason` parameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to abort is not a `WritableStream`, or it is locked.\n"
  },
  {
    "path": "documentation/docs/globals/WritableStream/prototype/getWriter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream.getWriter()\n\nThe **`getWriter()`** method of the `WritableStream` interface returns a new instance of `WritableStreamDefaultWriter` and locks the stream to that instance.\nWhile the stream is locked, no other writer can be acquired until this one is released.\n\n## Syntax\n\n```js\ngetWriter()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `WritableStreamDefaultWriter` object instance.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to create a writer for is not a `WritableStream`.\n"
  },
  {
    "path": "documentation/docs/globals/WritableStream/prototype/locked.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream.locked\n\nThe **`locked`** read-only property of the `WritableStream` interface returns a boolean indicating whether the `WritableStream` is locked to a writer.\n\n## Value\n\nA boolean value indicating whether or not the writable stream is locked.\n"
  },
  {
    "path": "documentation/docs/globals/WritableStreamDefaultController/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultController.error()\n\nThe **`error()`** method of the\n`WritableStreamDefaultController` interface causes any future interactions\nwith the associated stream to error.\n\nThis method is rarely used, since usually it suffices to return a rejected promise from\none of the underlying sink's methods. However, it can be useful for suddenly shutting\ndown a stream in response to an event outside the normal lifecycle of interactions with\nthe underlying sink.\n\n## Syntax\n\n```js\nerror(message)\n```\n\n### Parameters\n\n- `message`\n  - : A string representing the error you want future interactions to\n    fail with.\n\n### Return value\n\nNone `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to error is not a `WritableStream`.\n"
  },
  {
    "path": "documentation/docs/globals/WritableStreamDefaultWriter/WritableStreamDefaultWriter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter()\n\nThe **`WritableStreamDefaultWriter()`**\nconstructor creates a new `WritableStreamDefaultWriter` object instance.\n\n## Syntax\n\n```js\nnew WritableStreamDefaultWriter(stream)\n```\n\n### Parameters\n\n- `stream`\n  - : The `WritableStream` to be written to.\n\n### Return value\n\nAn instance of the `WritableStreamDefaultWriter` object.\n\n### Exceptions\n\n- `TypeError`\n  - : The provided `stream` value is not a `WritableStream`, or it\n    is locked to another writer already.\n"
  },
  {
    "path": "documentation/docs/globals/WritableStreamDefaultWriter/prototype/abort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.abort()\n\nThe **`abort()`** method of the\n`WritableStreamDefaultWriter` interface aborts the stream, signaling that\nthe producer can no longer successfully write to the stream and it is to be immediately\nmoved to an error state, with any queued writes discarded.\n\nIf the writer is active, the `abort()` method behaves the same as that for\nthe associated stream (`WritableStream.abort()`). If not, it returns a\nrejected promise.\n\n## Syntax\n\n```js\nabort()\nabort(reason)\n```\n\n### Parameters\n\n- `reason` _**optional**_\n  - : A string representing a human-readable reason for the abort.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason`\nparameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to abort is not a `WritableStream`, or it is\n    locked.\n\n"
  },
  {
    "path": "documentation/docs/globals/WritableStreamDefaultWriter/prototype/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.close()\n\nThe **`close()`** method of the\n`WritableStreamDefaultWriter` interface closes the associated writable\nstream.\n\nThe underlying sink will finish processing any previously-written chunks, before\ninvoking the close behavior. During this time any further attempts to write will fail\n(without erroring the stream).\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise`, which fulfills with the `undefined` if all\nremaining chunks were successfully written before the close, or rejects with an error if\na problem was encountered during the process.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to close is not a `WritableStream`.\n\n"
  },
  {
    "path": "documentation/docs/globals/WritableStreamDefaultWriter/prototype/closed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.closed\n\nThe **`closed`** read-only property of the\n`WritableStreamDefaultWriter` interface returns a\n`Promise` that fulfills if the stream becomes closed, or rejects if\nthe stream errors or the writer's lock is released.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/docs/globals/WritableStreamDefaultWriter/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.desiredSize\n\nThe **`desiredSize`** read-only property of the\n`WritableStreamDefaultWriter` interface returns the desired size required\nto fill the stream's internal queue.\n\n## Value\n\nAn integer. Note that this can be negative if the queue is over-full.\n\nThe value will be `null` if the stream cannot be successfully written to\n(due to either being errored, or having an abort queued up), and zero if the stream is\nclosed.\n\n### Exceptions\n\n- `TypeError`\n  - : The writer's lock is released.\n"
  },
  {
    "path": "documentation/docs/globals/WritableStreamDefaultWriter/prototype/ready.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.ready\n\nThe **`ready`** read-only property of the\n`WritableStreamDefaultWriter` interface returns a `Promise`\nthat resolves when the desired size of the stream's internal queue transitions from\nnon-positive to positive, signaling that it is no longer applying backpressure.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/docs/globals/WritableStreamDefaultWriter/prototype/releaseLock.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.releaseLock()\n\nThe **`releaseLock()`** method of the\n`WritableStreamDefaultWriter` interface releases the writer's lock on the\ncorresponding stream. After the lock is released, the writer is no longer active. If the\nassociated stream is errored when the lock is released, the writer will appear errored\nin the same way from now on; otherwise, the writer will appear closed.\n\n## Syntax\n\n```js\nreleaseLock()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone `undefined`.\n\n"
  },
  {
    "path": "documentation/docs/globals/WritableStreamDefaultWriter/prototype/write.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.write()\n\nThe **`write()`** method of the\n`WritableStreamDefaultWriter` interface writes a passed chunk of data to a\n`WritableStream` and its underlying sink, then returns a\n`Promise` that resolves to indicate the success or failure of the write\noperation.\n\nNote that what \"success\" means is up to the underlying sink; it might indicate that the\nchunk has been accepted, and not necessarily that it is safely saved to its ultimate\ndestination.\n\n## Syntax\n\n```js\nwrite(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : A block of binary data to pass to the `WritableStream`.\n\n### Return value\n\nA `Promise`, which fulfills with the `undefined` upon a\nsuccessful write, or rejects if the write fails or stream becomes errored before the\nwriting process is initiated.\n\n### Exceptions\n\n- `TypeError`\n  - : The target stream is not a writable stream, or it does not have an owner.\n"
  },
  {
    "path": "documentation/docs/globals/atob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# atob()\n\nThe **`atob()`** function decodes a\nstring of data which has been encoded using Base64 encoding. You can use\nthe `btoa()` method to encode and transmit\ndata which may otherwise cause communication problems, then transmit it and use the\n`atob()` method to decode the data again. For example, you can encode,\ntransmit, and decode control characters such as ASCII values 0 through 31.\n\nFor use with Unicode or UTF-8 strings, see the note on \"Unicode strings\" in the page\nfor `btoa()`.\n\n## Syntax\n\n```js\natob(encodedData)\n```\n\n### Parameters\n\n- `encodedData`\n  - : A binary string (i.e., a string in which each character in the string is treated as a byte of binary data) containing base64-encoded data.\n\n### Return value\n\nAn ASCII string containing decoded data from `encodedData`.\n\n### Exceptions\n\n- `InvalidCharacterError`\n  - : Thrown if `encodedData` is not valid base64.\n"
  },
  {
    "path": "documentation/docs/globals/btoa.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# btoa()\n\nThe **`btoa()`** method creates a\nBase64-encoded ASCII string from a _binary string_ (i.e., a\nstring in which each character in the string is treated as a byte\nof binary data).\n\nYou can use this method to encode data which may otherwise cause communication\nproblems, transmit it, then use the `atob()` method to decode the data again. For example, you can encode control\ncharacters such as ASCII values 0 through 31.\n\n## Syntax\n\n```js\nbtoa(stringToEncode)\n```\n\n### Parameters\n\n- `stringToEncode`\n  - : The _binary string_ to encode.\n\n### Return value\n\nAn ASCII string containing the Base64 representation of\n`stringToEncode`.\n\n### Exceptions\n\n- `InvalidCharacterError`\n  - : The string contained a character that did not fit in a single byte. See \"Unicode\n    strings\" below for more detail.\n"
  },
  {
    "path": "documentation/docs/globals/clearInterval.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# clearInterval()\n\nThe global **`clearInterval()`** method cancels a timed, repeating action which\nwas previously established by a call to `setInterval()`.\nIf the parameter provided does not identify a previously established action,\nthis method does nothing.\n\n## Syntax\n\n```js\nclearInterval(intervalID)\n```\n\n### Parameters\n\n- `intervalID`\n  - : The identifier of the repeated action you want to cancel. This ID was returned by\n    the corresponding call to `setInterval()`.\n\nIt's worth noting that the pool of IDs used by\n`setInterval()` and\n`setTimeout()` are shared, which\nmeans you can technically use `clearInterval()` and\n`clearTimeout()` interchangeably.\nHowever, for clarity, you should avoid doing so.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/docs/globals/clearTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# clearTimeout()\n\nThe global **`clearTimeout()`** method cancels a timeout previously established\nby calling `setTimeout()`.\n\nIf the parameter provided does not identify a previously established action,\nthis method does nothing.\n\n## Syntax\n\n```js\nclearTimeout(timeoutID)\n```\n\n### Parameters\n\n- `timeoutID`\n  - : The identifier of the timeout you want to cancel. This ID was returned by the\n    corresponding call to `setTimeout()`.\n\nIt's worth noting that the pool of IDs used by\n`setTimeout()` and\n`setInterval()` are shared, which\nmeans you can technically use `clearTimeout()` and\n`clearInterval()`\ninterchangeably. However, for clarity, you should avoid doing so.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/docs/globals/console/assert.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.assert()\n\nThe **`console.assert()`** method writes an error message to\nthe console if the assertion is false. If the assertion is true, nothing happens.\n\n## Syntax\n\n```js\nassert(assertion, obj1)\nassert(assertion, obj1, obj2)\nassert(assertion, obj1, obj2, /* … ,*/ objN)\n\nassert(assertion, msg)\nassert(assertion, msg, subst1)\nassert(assertion, msg, subst1, /* … ,*/ substN)\n```\n\n### Parameters\n\n- `assertion`\n  - : Any boolean expression. If the assertion is false, the message is written to the\n    console.\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output.\n- `msg`\n  - : A JavaScript string containing zero or more substitution strings.\n- `subst1` … `substN`\n  - : JavaScript objects with which to replace substitution strings within\n    `msg`. This parameter gives you additional control over the format of the\n    output.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/docs/globals/console/clear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.clear()\n\nThe **`console.clear()`** method clears the console if the console allows it.\n\n## Syntax\n\n```js\nclear()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/docs/globals/console/count.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.count()\n\nThe **`console.count()`** method logs the number of times that\nthis particular call to `count()` has been called.\n\n\n## Syntax\n\n```js\ncount()\ncount(label)\n```\n\n### Parameters\n\n- `label` _optional_\n  - : A string. If supplied, `count()` outputs the number of\n    times it has been called with that label. If omitted, `count()` behaves as\n    though it was called with the \"default\" label.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/docs/globals/console/countReset.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.countReset()\n\nThe **`console.countReset()`** method resets counter used with `console.count()`.\n\n## Syntax\n\n```js\ncountReset()\ncountReset(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : A string. If supplied, `countReset()` resets the count for\n    that label to 0. If omitted, `countReset()` resets the default counter to\n    0.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/docs/globals/console/debug.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.debug()\n\nThe **`console.debug()`** method outputs a message to the console at the \"debug\" log level.\n\n## Syntax\n\n```js\ndebug(obj1)\ndebug(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output to the console.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/docs/globals/console/dir.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.dir()\n\nThe method **`console.dir()`** displays a list of the properties of\nthe specified JavaScript object.\n\n## Syntax\n\n```js\ndir(object)\n```\n\n### Parameters\n\n- `object`\n  - : A JavaScript object whose properties should be output.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/docs/globals/console/dirxml.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.dirxml()\n\nThe **`console.dirxml()`** method displays the supplied object in the console.\n\n## Syntax\n\n```js\ndirxml(object)\n```\n\n### Parameters\n\n- `object`\n  - : A JavaScript object whose properties should be output.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/docs/globals/console/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.error()\n\nThe **`console.error()`** method outputs an error message console.\n\n## Syntax\n\n```js\nerror(obj1)\nerror(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of\n    these objects are appended together in the order listed and output.\n\n### Return value\n\nNone `undefined`."
  },
  {
    "path": "documentation/docs/globals/console/group.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.group()\n\nThe **`console.group()`** method creates a new inline group in the console, until `console.groupEnd()` is called.\n\n## Syntax\n\n```js\ngroup()\ngroup(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : Label for the group.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/docs/globals/console/groupCollapsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.groupCollapsed()\n\nThe **`console.groupCollapsed()`** method creates a new inline group in the Web Console. Unlike `console.group()`,\nhowever, the new group is created collapsed. The user will need to use the disclosure\nbutton next to it to expand it, revealing the entries created in the group.\n\nCall `console.groupEnd()` to back out to the parent group.\n\n## Syntax\n\n```js\ngroupCollapsed()\ngroupCollapsed(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : Label for the group.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/docs/globals/console/groupEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.groupEnd()\n\nThe **`console.groupEnd()`** method exits the current inline group in the console.\n\n## Syntax\n\n```js\ngroupEnd()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/docs/globals/console/info.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.info()\n\nThe **`console.info()`** method outputs an informational message to the console.\n\n## Syntax\n\n```js\ninfo(obj1)\ninfo(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/docs/globals/console/log.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.log()\n\nThe **`console.log()`** method outputs a message to the console.\n\n## Syntax\n\n```js\nlog(obj1)\nlog(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output. Please be warned that if\n    you log objects in the latest versions of Chrome and Firefox what you get logged on\n    the console is a _reference to the object_, which is not necessarily the\n    'value' of the object at the moment in time you call `console.log()`, but\n    it is the value of the object at the moment you open the console.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/docs/globals/console/time.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.time()\n\nThe **`console.time()`** method starts a timer you can use to track\nhow long an operation takes. You give each timer a unique name. When you call `console.timeEnd()` with the same name, the\nbrowser will output the time, in milliseconds, that elapsed since the timer was started.\n\n## Syntax\n\n```js\ntime(label)\n```\n\n### Parameters\n\n- `label`\n  - : A `string` representing the name to give the new timer. This will identify the timer; use the same name when\n    calling `console.timeEnd()` to stop the timer and get the time output to\n    the console.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/docs/globals/console/timeEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.timeEnd()\n\nThe **`console.timeEnd()`** stops a timer that was previously started by calling `console.time()`.\n\n## Syntax\n\n```js\ntimeEnd(label)\n```\n\n### Parameters\n\n- `label`\n  - : A `string` representing the name of the timer to stop. Once stopped, the elapsed time is automatically\n    displayed in the console.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/docs/globals/console/timeLog.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.timeLog()\n\nThe **`console.timeLog()`** method logs the current value of a timer that was previously started by calling `console.time()`.\n\n## Syntax\n\n```js\ntimeLog()\ntimeLog(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : The name of the timer to log to the console. If this is omitted the label \"default\" is used.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/docs/globals/console/trace.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.trace()\n\nThe **`console.trace()`** method outputs a stack trace to the console.\n\n## Syntax\n\n```js\ntrace()\ntrace(object1, /* …, */ objectN)\n```\n\n### Parameters\n\n- `objects` __optional__\n  - : Zero or more objects to be output to console along with the trace. These are\n    assembled and formatted the same way they would be if passed to the `console.log()` method.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/docs/globals/console/warn.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.warn()\n\nThe **`console.warn()`** method outputs a warning message to the console.\n\n## Syntax\n\n```js\nwarn(obj1)\nwarn(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/docs/globals/crypto/getRandomValues.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Crypto.getRandomValues()\n\nThe **`Crypto.getRandomValues()`** method lets you get cryptographically strong random values.\nThe array given as the parameter is filled with random numbers (random in its cryptographic meaning).\n\n## Syntax\n\n```js\ngetRandomValues(typedArray)\n```\n\n### Parameters\n\n- `typedArray`\n  - : An integer-based `TypedArray`, that is one of: `Int8Array`, `Uint8Array`,\n    `Uint8ClampedArray`, `Int16Array`, `Uint16Array`,\n    `Int32Array`, `Uint32Array`, `BigInt64Array`,\n    `BigUint64Array` (but **not** `Float32Array` nor `Float64Array`).\n    All elements in the array will be overwritten with random numbers.\n\n### Return value\n\nThe same array passed as `typedArray` but with its contents replaced with the newly generated random numbers.\nNote that `typedArray` is modified in-place, and no copy is made.\n\n### Exceptions\n\n- `QuotaExceededError`\n  - : Thrown if the `byteLength` of `typedArray` exceeds 65,536.\n"
  },
  {
    "path": "documentation/docs/globals/crypto/randomUUID.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Crypto.randomUUID()\n\nThe **`randomUUID()`** method is used to generate a v4 [UUID](https://developer.mozilla.org/en-US/docs/Glossary/UUID) using a cryptographically secure random number generator.\n\n## Syntax\n\n```js\nrandomUUID()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string containing a randomly generated, 36 character long v4 UUID."
  },
  {
    "path": "documentation/docs/globals/crypto/subtle.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Crypto.subtle\n\nThe **`Crypto.subtle`** read-only property returns a\n[`SubtleCrypto`](../SubtleCrypto/SubtleCrypto.mdx) which can then be used to perform low-level\ncryptographic operations.\n\n## Value\n\nA [`SubtleCrypto`](../SubtleCrypto/SubtleCrypto.mdx) object you can use to interact with the Web Crypto API's\nlow-level cryptography features.\n"
  },
  {
    "path": "documentation/docs/globals/decodeURI.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# decodeURI\n\nThe **`decodeURI()`** function decodes a Uniform Resource Identifier (URI) previously created by [`encodeURI()`](../globals/encodeURI.mdx) or a similar routine.\n\n## Syntax\n\n```js\ndecodeURI(encodedURI)\n```\n\n### Parameters\n\n- `encodedURI`\n  - : A complete, encoded Uniform Resource Identifier.\n\n### Return value\n\nA new string representing the unencoded version of the given encoded Uniform Resource Identifier (URI).\n\n### Exceptions\n\n- [`URIError`](../globals/URIError/URIError.mdx)\n  - : Thrown if `encodedURI` contains a `%` not followed by two hexadecimal digits, or if the escape sequence does not encode a valid UTF-8 character.\n\n## Description\n\n`decodeURI()` is a function property of the global object.\n\nThe `decodeURI()` function decodes the URI by treating each escape sequence in the form `%XX` as one UTF-8 code unit (one byte). In UTF-8, the number of leading 1 bits in the first byte, which may be 0 (for 1-byte ASCII characters), 2, 3, or 4, indicates the number of bytes in the character. So by reading the first escape sequence, `decodeURI()` can determine how many more escape sequences to consume. If `decodeURI()` fails to find the expected number of sequences, or if the escape sequences don't encode a valid UTF-8 character, a [`URIError`](../globals/URIError/URIError.mdx) is thrown.\n\n`decodeURI()` decodes all escape sequences, but if the escape sequence encodes one of the following characters, the escape sequence is preserved in the output string (because they are part of the URI syntax):\n\n```\n; / ? : @ & = + $ , #\n```\n"
  },
  {
    "path": "documentation/docs/globals/decodeURIComponent.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# decodeURIComponent\n\nThe **`decodeURIComponent()`** function decodes a Uniform Resource Identifier (URI) component previously created by [`encodeURIComponent()`](./encodeURIComponent.mdx) or by a similar routine.\n\n\n## Syntax\n\n```js\ndecodeURIComponent(encodedURI)\n```\n\n### Parameters\n\n- `encodedURI`\n  - : An encoded component of a Uniform Resource Identifier.\n\n### Return value\n\nA new string representing the decoded version of the given encoded Uniform Resource Identifier (URI) component.\n\n### Exceptions\n\n- [`URIError`](../globals/URIError/URIError.mdx)\n  - : Thrown if `encodedURI` contains a `%` not followed by two hexadecimal digits, or if the escape sequence does not encode a valid UTF-8 character.\n\n## Description\n\n`decodeURIComponent()` is a function property of the global object.\n\n`decodeURIComponent()` uses the same decoding algorithm as described in [`decodeURI()`](./decodeURI.mdx). It decodes _all_ escape sequences, including those that are not created by [`encodeURIComponent()`](./encodeURIComponent.mdx), like `-.!~*'()`.\n"
  },
  {
    "path": "documentation/docs/globals/encodeURI.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# encodeURI()\n\nThe **`encodeURI()`** function encodes a URI by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character (will only be four escape sequences for characters composed of two surrogate characters). Compared to [`encodeURIComponent()`](./encodeURIComponent.mdx), this function encodes fewer characters, preserving those that are part of the URI syntax.\n\n## Syntax\n\n```js\nencodeURI(uri)\n```\n\n### Parameters\n\n- `uri`\n  - : A string to be encoded as a URI.\n\n### Return value\n\nA new string representing the provided string encoded as a URI.\n\n### Exceptions\n\n- [`URIError`](./URIError/URIError.mdx)\n  - : Thrown if `uri` contains a [lone surrogate](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters).\n\n## Description\n\n`encodeURI()` is a function property of the global object.\n\nThe `encodeURI()` function escapes characters by UTF-8 code units, with each octet encoded in the format `%XX`, left-padded with 0 if necessary. Because lone surrogates in UTF-16 do not encode any valid Unicode character, they cause `encodeURI()` to throw a [`URIError`](./URIError/URIError.mdx).\n\n`encodeURI()` escapes all characters **except**:\n\n```\nA–Z a–z 0–9 - _ . ! ~ * ' ( )\n\n; / ? : @ & = + $ , #\n```\n\nThe characters on the second line are characters that may be part of the URI syntax, and are only escaped by `encodeURIComponent()`. Both `encodeURI()` and `encodeURIComponent()` do not encode the characters `-.!~*'()`, known as \"unreserved marks\", which do not have a reserved purpose but are allowed in a URI \"as is\". (See [RFC2396](https://www.ietf.org/rfc/rfc2396.txt))\n\nThe `encodeURI()` function does not encode characters that have special meaning (reserved characters) for a URI. The following example shows all the parts that a URI can possibly contain. Note how certain characters are used to signify special meaning:\n\n```\nhttp://username:password@www.example.com:80/path/to/file.php?foo=316&bar=this+has+spaces#anchor\n```\n"
  },
  {
    "path": "documentation/docs/globals/encodeURIComponent.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# encodeURIComponent\n\nThe **`encodeURIComponent()`** function encodes a URI by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character (will only be four escape sequences for characters composed of two surrogate characters). Compared to [`encodeURI()`](./encodeURI.mdx), this function encodes more characters, including those that are part of the URI syntax.\n\n## Syntax\n\n```js\nencodeURIComponent(uriComponent)\n```\n\n### Parameters\n\n- `uriComponent`\n  - : A string to be encoded as a URI component (a path, query string, fragment, etc.). Other values are [converted to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion).\n\n### Return value\n\nA new string representing the provided `uriComponent` encoded as a URI component.\n\n### Exceptions\n\n- [`URIError`](./URIError/URIError.mdx)\n  - : Thrown if `uriComponent` contains a [lone surrogate](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters).\n\n## Description\n\n`encodeURIComponent()` is a function property of the global object.\n\n`encodeURIComponent()` uses the same encoding algorithm as described in [`encodeURI()`](./encodeURI.mdx). It escapes all characters **except**:\n\n```text\nA–Z a–z 0–9 - _ . ! ~ * ' ( )\n```\n\nCompared to [`encodeURI()`](./encodeURI.mdx), `encodeURIComponent()` escapes a larger set of characters. Use `encodeURIComponent()` on user-entered fields from forms `POST`'d to the server — this will encode `&` symbols that may inadvertently be generated during data entry for special HTML entities or other characters that require encoding/decoding. For example, if a user writes `Jack & Jill`, without `encodeURIComponent()`, the ampersand could be interpreted on the server as the start of a new field and jeopardize the integrity of the data.\n\nFor [`application/x-www-form-urlencoded`](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#application/x-www-form-urlencoded-encoding-algorithm), spaces are to be replaced by `+`, so one may wish to follow a `encodeURIComponent()` replacement with an additional replacement of `%20` with `+`.\n"
  },
  {
    "path": "documentation/docs/globals/escape.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# escape()\n\n> **Note:** `escape()` is a non-standard function implemented by browsers and was only standardized for cross-engine compatibility. It is not required to be implemented by all JavaScript engines and may not work everywhere. Use [`encodeURIComponent()`](./encodeURIComponent.mdx) or [`encodeURI()`](./encodeURI.mdx) if possible.\n\nThe **`escape()`** function computes a new string in which certain characters have been replaced by hexadecimal escape sequences.\n\n## Syntax\n\n```js\nescape(str)\n```\n\n### Parameters\n\n- `str`\n  - : A string to be encoded.\n\n### Return value\n\nA new string in which certain characters have been escaped.\n\n## Description\n\n`escape()` is a function property of the global object.\n\nThe `escape()` function replaces all characters with escape sequences, with the exception of ASCII word characters (A–Z, a–z, 0–9, _) and `@*_+-./`. Characters are escaped by UTF-16 code units. If the code unit's value is less than 256, it is represented by a two-digit hexadecimal number in the format `%XX`, left-padded with 0 if necessary. Otherwise, it is represented by a four-digit hexadecimal number in the format `%uXXXX`, left-padded with 0 if necessary.\n\n> **Note:** This function was used mostly for URL encoding and is partly based on the escape format in rfc(1738). The escape format is _not_ an [escape sequence](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#escape_sequences) in string literals. You can replace `%XX` with `\\xXX` and `%uXXXX` with `\\uXXXX` to get a string containing actual string-literal escape sequences.\n"
  },
  {
    "path": "documentation/docs/globals/eval.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# eval\n\n> **Warning:** Executing JavaScript from a string is an enormous security risk. It is far too easy for a bad actor to run arbitrary code when you use `eval()`. See [never use direct eval](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval#never_use_direct_eval!) for details.\n\nThe **`eval()`** function evaluates JavaScript code represented as a string and returns its completion value. The source is parsed as a script.\n\n## Syntax\n\n```js\neval(script)\n```\n\n### Parameters\n\n- `script`\n  - : A string representing a JavaScript expression, statement, or sequence of statements. The expression can include variables and properties of existing objects. It will be parsed as a script, so [`import`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/import) declarations (which can only exist in modules) are not allowed.\n\n### Return value\n\nThe completion value of evaluating the given code. If the completion value is empty, [`undefined`](./undefined.mdx) is returned. If `script` is not a string primitive, `eval()` returns the argument unchanged.\n\n### Exceptions\n\nThrows any exception that occurs during evaluation of the code, including[ `SyntaxError`](./SyntaxError/SyntaxError.mdx) if `script` fails to be parsed as a script.\n\n## Description\n\n`eval()` is a function property of the global object.\n\nThe argument of the `eval()` function is a string. It will evaluate the source string as a script body, which means both statements and expressions are allowed. It returns the completion value of the code. For expressions, it's the value the expression evaluates to. Many statements and declarations have completion values as well, but the result may be surprising (for example, the completion value of an assignment is the assigned value, but the completion value of [`let`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/let) is undefined), so it's recommended to not rely on statements' completion values.\n"
  },
  {
    "path": "documentation/docs/globals/fetch.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# fetch()\n\nThe global **`fetch()`** method starts the process of fetching a\nresource from the network, returning a promise which is fulfilled once the response is\navailable.\n\nThe promise resolves to the `Response` object\nrepresenting the response to your request.\n\nA `fetch()` promise only rejects when a\nnetwork error is encountered (which is usually when there's a permissions issue or\nsimilar). A `fetch()` promise _does\nnot_ reject on HTTP errors (`404`, etc.). Instead, a\n`then()` handler must check the `Response.ok` and/or\n`Response.status` properties.\n\n> **Note:** The `fetch()` method's parameters are identical to\n> those of the `Request()` constructor.\n\n## Explicit Backends\n\nInternally, Fastly uses named backends to handle fetch requests, which need to be explicitly defined to enable custom HTTP origins to be fetched by the service.\n\nThis `backend` option is then a special Fastly-specific fetch option that is provided to the `fetch()` call:\n\n```js\nfetch('https://origin.com/path', { backend: 'origin' });\n```\n\nBackends are configured using the Fastly service backend configuration, see the [Backend documentation](https://developer.fastly.com/reference/api/services/backend/) for more information.\n\n## Dynamic Backends\n\nDynamic backends are a compute feature that allow services to define backends for themselves.\n\nIf the `backend` option is not provided when making `fetch()` requests, a backend will be automatically created by extracting the protocol, host, and port from the provided URL.\n\nIn addition, custom backend configuration options can then also be provided through the [`Backend()`](../fastly:backend/Backend/Backend.mdx) constructor.\n\n## Syntax\n\n```js\nfetch(resource)\nfetch(resource, options)\n```\n\n### Parameters\n\n- `resource`\n\n  - : This defines the resource that you wish to fetch. This can either be:\n\n    - A string or any other object with a \"toString\" method.\n    - A `Request` object.\n\n- `options` _**optional**_\n\n  - : An object containing any custom settings that you want to apply to the request. The\n    possible options are:\n\n    - `method`\n      - : The request method, e.g., `GET`, `POST`.\n    - `headers`\n      - : Any headers you want to add to your request, contained within a\n        `Headers` object or an object literal with `String`\n        values.\n    - `body`\n      - : Any body that you want to add to your request: this can be an `ArrayBuffer`, a `TypedArray`, a `DataView`, a `URLSearchParams`, string object or literal, or a `ReadableStream` object.\n    - `backend` _**Fastly-specific**_\n      - *Fastly-specific*\n    - `cacheOverride` _**Fastly-specific**_\n    - `cacheKey` _**Fastly-specific**_\n    - `imageOptimizerOptions` _**Fastly-specific**_, see [`imageOptimizerOptions`](../fastly:image-optimizer/imageOptimizerOptions.mdx).\n    - `fastly` _**Fastly-specific**_\n      - `decompressGzip`_: boolean_ _**optional**_\n        - Whether to automatically gzip decompress the Response or not.\n\n### Return value\n\nA `Promise` that resolves to a `Response` object.\n"
  },
  {
    "path": "documentation/docs/globals/globalThis.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# globalThis\n\nThe global **`globalThis`** property contains the [global `this`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this#global_context) value, which is usually akin to the [global object](https://developer.mozilla.org/docs/Glossary/Global_object).\n\n## Value\n\nThe global `this` object.\n\n> **Note:** The `globalThis` property is configurable and writable so that code authors can hide it when executing untrusted code and prevent exposing the global object.\n\n## Description\n\nThe `globalThis` property provides a standard way of accessing the global `this` value (and hence the global object itself) across environments.\n\n"
  },
  {
    "path": "documentation/docs/globals/isFinite.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# isFinite\n\nThe global **`isFinite()`** function determines whether the\npassed value is a finite number. If needed, the parameter is first converted to a\nnumber.\n\n## Syntax\n\n```js\nisFinite(testValue)\n```\n\n### Parameters\n\n- `testValue`\n  - : The value to be tested for finiteness.\n\n### Return value\n\n**`false`** if the argument is (or will be coerced to) positive\nor negative [`Infinity`](./Infinity.mdx) or [`NaN`](./NaN.mdx) or [`undefined`](./undefined.mdx);\notherwise, **`true`**.\n\n## Description\n\n`isFinite` is a function property of the global object.\n\nYou can use this function to determine whether a number is a finite number. The\n`isFinite` function examines the number in its argument. If the argument is\n`NaN`, positive infinity, or negative infinity, this method returns\n`false`; otherwise, it returns `true`.\n"
  },
  {
    "path": "documentation/docs/globals/isNaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# isNaN()\n\nThe **`isNaN()`** function determines whether a value is [`NaN`](./NaN.mdx) when converted to a number. Because coercion inside the `isNaN()` function can be [surprising](#description), you may alternatively want to use [`Number.isNaN()`](./Number/isNaN.mdx).\n\n## Syntax\n\n```js\nisNaN(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested.\n\n### Return value\n\n`true` if the given value is [`NaN`](./NaN.mdx) after being [converted to a number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_coercion); otherwise, `false`.\n\n## Description\n\n`isNaN()` is a function property of the global object.\n\nFor number values, `isNaN()` tests if the number is the value [`NaN`](./NaN.mdx). When the argument to the `isNaN()` function is not of type [Number](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#number_type), the value is first coerced to a number, and the resulting value is then compared against [`NaN`](./NaN.mdx).\n\nThis behavior of `isNaN()` for non-numeric arguments can be confusing! For example, an empty string is coerced to 0, while a boolean is coerced to 0 or 1; both values are intuitively \"not numbers\", but they don't evaluate to `NaN`, so `isNaN()` returns `false`. Therefore, `isNaN()` answers neither the question \"is the input the floating point [`NaN`](./NaN.mdx) value\" nor the question \"is the input not a number\".\n\n[`Number.isNaN()`](./Number/isNaN.mdx) is a more reliable way to test whether a value is the number value `NaN` or not. Alternatively, the expression `x !== x` can be used, and neither of the solutions is subject to the false positives that make the global `isNaN()` unreliable. To test if a value is a number, use [`typeof x === \"number\"`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/typeof).\n\nThe `isNaN()` function answers the question \"is the input functionally equivalent to [`NaN`](./NaN.mdx) when used in a number context\". If `isNaN(x)` returns `false`, you can use `x` in an arithmetic expression as if it's a valid number that's not `NaN`. If `isNaN(x)` returns `true`, `x` will get coerced to `NaN` and make most arithmetic expressions return `NaN` (because `NaN` propagates). You can use this, for example, to test whether an argument to a function is arithmetically processable (usable \"like\" a number), and handle values that are not number-like by throwing an error, providing a default value, etc. This way, you can have a function that makes use of the full versatility JavaScript provides by implicitly converting values depending on context.\n"
  },
  {
    "path": "documentation/docs/globals/location.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# location\n\nThe **`location`** read-only property returns a\n[`Location`](../globals/WorkerLocation/WorkerLocation.mdx) object with information about the current location of the\ndocument.\n\nSee [`Location`](../globals/WorkerLocation/WorkerLocation.mdx) for all available properties.\n\n## Value\n\nA [`Location`](../globals/WorkerLocation/WorkerLocation.mdx) object.\n"
  },
  {
    "path": "documentation/docs/globals/parseFloat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# parseFloat()\n\nThe **`parseFloat()`** function parses a string argument and returns a floating point number.\n\n## Syntax\n\n```js\nparseFloat(string)\n```\n\n### Parameters\n\n- `string`\n  - : The value to parse, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). Leading whitespace in this argument is ignored.\n\n### Return value\n\nA floating point number parsed from the given `string`, or [`NaN`](./NaN.mdx) when the first non-whitespace character cannot be converted to a number.\n\n> **Note:** JavaScript does not have the distinction of \"floating point numbers\" and \"integers\" on the language level. [`parseInt()`](./parseInt.mdx) and `parseFloat()` only differ in their parsing behavior, but not necessarily their return values. For example, `parseInt(\"42\")` and `parseFloat(\"42\")` would return the same value: a `Number` 42.\n\n## Description\n\nThe `parseFloat` function converts its first argument to a string, parses that string as a decimal number literal, then returns a number or `NaN`. The number syntax it accepts can be summarized as:\n\n- The characters accepted by `parseFloat()` are plus sign (`+`), minus sign (`-` U+002D HYPHEN-MINUS), decimal digits (`0` – `9`), decimal point (`.`), exponent indicator (`e` or `E`), and the `\"Infinity\"` literal.\n- The `+`/`-` signs can only appear strictly at the beginning of the string, or immediately following the `e`/`E` character. The decimal point can only appear once, and only before the `e`/`E` character. The `e`/`E` character can only appear once, and only if there is at least one digit before it.\n- Leading spaces in the argument are trimmed and ignored.\n- `parseFloat()` can also parse and return [`Infinity`](./Infinity.mdx) or `-Infinity` if the string starts with `\"Infinity\"` or `\"-Infinity\"` preceded by none or more white spaces.\n- `parseFloat()` picks the longest substring starting from the beginning that generates a valid number literal. If it encounters an invalid character, it returns the number represented up to that point, ignoring the invalid character and all characters following it.\n- If the argument's first character can't start a legal number literal per the syntax above, `parseFloat` returns [`NaN`](./NaN.mdx).\n\nSyntax-wise, `parseFloat()` parses a subset of the syntax that the [`Number()`](./Number/Number.mdx) function accepts. Namely, `parseFloat()` does not support non-decimal literals with `0x`, `0b`, or `0o` prefixes but supports everything else. However, `parseFloat()` is more lenient than `Number()` because it ignores trailing invalid characters, which would cause `Number()` to return `NaN`.\n\nSimilar to number literals and `Number()`, the number returned from `parseFloat()` may not be exactly equal to the number represented by the string, due to floating point range and inaccuracy. For numbers outside the `-1.7976931348623158e+308` – `1.7976931348623158e+308` range (see `Number.MAX_VALUE`), `-Infinity` or `Infinity` is returned.\n"
  },
  {
    "path": "documentation/docs/globals/parseInt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# parseInt\n\nThe **`parseInt()`** function parses a string argument and returns an integer of the specified [radix](https://en.wikipedia.org/wiki/Radix) (the base in mathematical numeral systems).\n\n\n\n## Syntax\n\n```js\nparseInt(string)\nparseInt(string, radix)\n```\n\n### Parameters\n\n- `string`\n  - : A string starting with an integer. Leading whitespace in this argument is ignored.\n- `radix` _**optional**_\n\n  - : An integer between `2` and `36` that represents the _radix_ (the base in mathematical numeral systems) of the `string`. It is converted to a [32-bit integer](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#fixed-width_number_conversion); if it's outside the range of \\[2, 36] after conversion, the function will always return `NaN`. If `0` or not provided, the radix will be inferred based on `string`'s value. Be careful — this does NOT always default to `10`! The [description below](#description) explains in more detail what happens when `radix` is not provided.\n\n### Return value\n\nAn integer parsed from the given `string`, or [`NaN`](./NaN.mdx) when\n\n- the `radix` as a 32-bit integer is smaller than `2` or bigger than `36`, or\n- the first non-whitespace character cannot be converted to a number.\n\n> **Note:** JavaScript does not have the distinction of \"floating point numbers\" and \"integers\" on the language level. `parseInt()` and [`parseFloat()`](./parseFloat.mdx) only differ in their parsing behavior, but not necessarily their return values. For example, `parseInt(\"42\")` and `parseFloat(\"42\")` would return the same value: a `Number` 42.\n\n## Description\n\nThe `parseInt` function converts its first argument to a string, parses that string, then returns an integer or `NaN`.\n\nIf not `NaN`, the return value will be the integer that is the first argument taken as a number in the specified `radix`. (For example, a `radix` of `10` converts from a decimal number, `8` converts from octal, `16` from hexadecimal, and so on.)\n\nThe `radix` argument is converted to a number. If it's unprovided, or if the value becomes 0, `NaN` or `Infinity` (`undefined` is coerced to `NaN`), JavaScript assumes the following:\n\n1. If the input `string`, with leading whitespace and possible `+`/`-` signs removed, begins with `0x` or `0X` (a zero, followed by lowercase or uppercase X), `radix` is assumed to be `16` and the rest of the string is parsed as a hexadecimal number.\n2. If the input `string` begins with any other value, the radix is `10` (decimal).\n\n> **Note:** Other prefixes like `0b`, which are valid in [number literals](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#binary), are treated as normal digits by `parseInt()`. `parseInt()` does _not_ treat strings beginning with a `0` character as octal values either. The only prefix that `parseInt()` recognizes is `0x` or `0X` for hexadecimal values — everything else is parsed as a decimal value if `radix` is missing.\n\nIf the radix is `16`, `parseInt()` allows the string to be optionally prefixed by `0x` or `0X` after the optional sign character (`+`/`-`).\n\nIf the radix value (coerced if necessary) is not in range \\[2, 36] (inclusive) `parseInt` returns `NaN`.\n\nFor radices above `10`, letters of the English alphabet indicate numerals greater than `9`. For example, for hexadecimal numbers (base `16`), `A` through `F` are used. The letters are case-insensitive.\n\n`parseInt` understands exactly two signs: `+` for positive, and `-` for negative. It is done as an initial step in the parsing after whitespace is removed. If no signs are found, the algorithm moves to the following step; otherwise, it removes the sign and runs the number-parsing on the rest of the string.\n\nIf `parseInt` encounters a character that is not a numeral in the specified `radix`, it ignores it and all succeeding characters and returns the integer value parsed up to that point. For example, although `1e3` technically encodes an integer (and will be correctly parsed to the integer `1000` by [`parseFloat()`](./parseFloat.mdx), `parseInt(\"1e3\", 10)` returns `1`, because `e` is not a valid numeral in base 10. Because `.` is not a numeral either, the return value will always be an integer.\n\nIf the first character cannot be converted to a number with the radix in use, `parseInt` returns `NaN`. Leading whitespace is allowed.\n\nFor arithmetic purposes, the `NaN` value is not a number in any radix. You can call the [`Number.isNaN`](./Number/isNaN.mdx) function to determine if the result of `parseInt` is `NaN`. If `NaN` is passed on to arithmetic operations, the operation result will also be `NaN`.\n\nBecause large numbers use the `e` character in their string representation (e.g. `6.022e23` for 6.022 × 10<sup>23</sup>), using `parseInt` to truncate numbers will produce unexpected results when used on very large or very small numbers. `parseInt` should _not_ be used as a substitute for [`Math.trunc()`](./Math/trunc.mdx).\n\nTo convert a number to its string literal in a particular radix, use [`thatNumber.toString(radix)`](./Number/prototype/toString.mdx).\n\nBecause `parseInt()` returns a number, it may suffer from loss of precision if the integer represented by the string is [outside the safe range](./Number/isSafeInteger.mdx). The [`BigInt`](./BigInt/BigInt.mdx) function supports parsing integers of arbitrary length accurately, by returning a `BigInt`.\n"
  },
  {
    "path": "documentation/docs/globals/performance/now.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# performance.now()\n\nThe **`performance.now()`** method returns a high resolution timestamp in milliseconds.\nIt represents the time elapsed since [`performance.timeOrigin`](./timeOrigin.mdx) (the time when the worker was instantiated).\n\n## Syntax\n\n```js\nnow()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns a number which represents the time since worker instantation measured in milliseconds.\n"
  },
  {
    "path": "documentation/docs/globals/performance/timeOrigin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# performance.timeOrigin\n\nThe **`timeOrigin`** read-only property of the Performance interface returns the high resolution timestamp that is used as the baseline for performance-related timestamps.\n\nThis value represents the time when the worker was instantiated.\n\n### Value\n\nReturns a number which represents the time when the worker was instantation."
  },
  {
    "path": "documentation/docs/globals/setInterval.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# setInterval()\n\nThe **`setInterval()`** method, repeatedly\ncalls a function or executes a code snippet, with a fixed time delay between each\ncall.\n\nThis method returns an interval ID which uniquely identifies the interval, so you\ncan remove it later by calling `clearInterval()`.\n\n## Syntax\n\n```js\nsetInterval(code)\nsetInterval(code, delay)\n\nsetInterval(func)\nsetInterval(func, delay)\nsetInterval(func, delay, arg0)\nsetInterval(func, delay, arg0, arg1)\nsetInterval(func, delay, arg0, arg1, /* … ,*/ argN)\n```\n\n### Parameters\n\n- `func`\n  - : A `function` to be executed every `delay` milliseconds. The first execution happens after `delay` milliseconds.\n- `code`\n  - : An optional syntax allows you to include a string instead of a function, which is\n    compiled and executed every `delay` milliseconds. This syntax is _not\n    recommended_ for the same reasons that make using `eval() a\n    security risk.\n- `delay` _**optional**_\n  - : The time, in milliseconds (thousandths of a second), the timer should delay in\n    between executions of the specified function or code. Defaults to 0 if not specified.\n    below for details on the permitted range of `delay` values.\n- `arg0, …, argN` _**optional**_\n  - : Additional arguments which are passed through to the function specified by\n    _func_ once the timer expires.\n\n### Return value\n\nThe returned `intervalID` is a numeric, non-zero value which identifies the\ntimer created by the call to `setInterval()`; this value can be passed to\n`clearInterval()` to cancel the interval.\n\nIt may be helpful to be aware that `setInterval()` and\n`setTimeout()` share the same pool\nof IDs, and that `clearInterval()` and\n`clearTimeout()` can technically\nbe used interchangeably. For clarity, however, you should try to always match them to\navoid confusion when maintaining your code.\n\n> **Note:** The `delay` argument is converted to a\n> signed 32-bit integer. This effectively limits `delay` to 2147483647 ms,\n> since it's specified as a signed integer in the IDL.\n"
  },
  {
    "path": "documentation/docs/globals/setTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# setTimeout()\n\nThe global **`setTimeout()`** method sets a timer which executes a function or specified\npiece of code once the timer expires.\n\n## Syntax\n\n```js\nsetTimeout(code)\nsetTimeout(code, delay)\n\nsetTimeout(functionRef)\nsetTimeout(functionRef, delay)\nsetTimeout(functionRef, delay, param1)\nsetTimeout(functionRef, delay, param1, param2)\nsetTimeout(functionRef, delay, param1, param2, /* … ,*/ paramN)\n```\n\n### Parameters\n\n- `functionRef`\n  - : A `function` to be executed after the timer expires.\n- `code`\n  - : An alternative syntax that allows you to include a string instead of a function,\n    which is compiled and executed when the timer expires. This syntax is **not\n    recommended** for the same reasons that make using\n    `eval()` a security risk.\n- `delay` _**optional**_\n\n  - : The time, in milliseconds that the timer should wait before\n    the specified function or code is executed. If this parameter is omitted, a value of 0\n    is used, meaning execute \"immediately\", or more accurately, the next event cycle.\n\n- `param1`, …, `paramN` _**optional**_\n\n  - : Additional arguments which are passed through to the function specified by\n    `functionRef`.\n\n### Return value\n\nThe returned `timeoutID` is a positive integer value which\nidentifies the timer created by the call to `setTimeout()`. This value can be\npassed to `clearTimeout()` to\ncancel the timeout.\n\nIt is guaranteed that a `timeoutID` value will never be reused by a subsequent call to\n`setTimeout()` or `setInterval()` on the same object (a window or\na worker). However, different objects use separate pools of IDs.\n\n## Description\n\nTimeouts are cancelled using `clearTimeout()`.\n\nTo call a function repeatedly (e.g., every _N_ milliseconds), consider using\n`setInterval()`.\n"
  },
  {
    "path": "documentation/docs/globals/structuredClone.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# structuredClone()\n\nThe global **`structuredClone()`** method creates a deep clone of a given value.\n\n## Syntax\n\n```js\nstructuredClone(value)\n```\n\n### Parameters\n\n- `value`\n  - : The object to be cloned.\n\n### Return value\n\nThe returned value is a deep copy of the original `value`.\n\n### Exceptions\n\n- `DataCloneError`\n  - : Thrown if any part of the input value is not serializable.\n\n## Description\n\nThis function can be used to deep copy JavaScript values.\n"
  },
  {
    "path": "documentation/docs/globals/undefined.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# undefined\n\nThe global **`undefined`** property represents the primitive\nvalue `undefined`. It is one of JavaScript's \"primitive types\".\n\n## Value\n\nThe primitive value `undefined`.\n\n## Description\n\n`undefined` is a property of the _global object_. That is, it is a variable in global scope.\n\n`undefined` is a non-configurable, non-writable property.\n\nA variable that has not been assigned a value is of type `undefined`. A\nmethod or statement also returns `undefined` if the variable that is being\nevaluated does not have an assigned value. A function returns `undefined` if\na value was not explicitly returned.\n"
  },
  {
    "path": "documentation/docs/globals/unescape.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# unescape()\n\n> **Note:** `unescape()` is a non-standard function implemented by browsers and was only standardized for cross-engine compatibility. It is not required to be implemented by all JavaScript engines and may not work everywhere. Use [`decodeURIComponent()`](./decodeURIComponent.mdx) or [`decodeURI()`](./decodeURI.mdx) if possible.\n\nThe **`unescape()`** function computes a new string in which hexadecimal escape sequences are replaced with the characters that they represent. The escape sequences might be introduced by a function like [`escape()`](./escape.mdx).\n\n## Syntax\n\n```js\nunescape(str)\n```\n\n### Parameters\n\n- `str`\n  - : A string to be decoded.\n\n### Return value\n\nA new string in which certain characters have been unescaped.\n\n## Description\n\n`unescape()` is a function property of the global object.\n\nThe `unescape()` function replaces any escape sequence with the character that it represents. Specifically, it replaces any escape sequence of the form `%XX` or `%uXXXX` (where `X` represents one hexadecimal digit) with the character that has the hexadecimal value `XX`/`XXXX`. If the escape sequence is not a valid escape sequence (for example, if `%` is followed by one or no hex digit), it is left as-is.\n\n> **Note:** This function was used mostly for URL encoding and is partly based on the escape format in rfc(1738). The `unescape()` function does _not_ evaluate [escape sequences](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#escape_sequences) in string literals. You can replace `\\xXX` with `%XX` and `\\uXXXX` with `%uXXXX` to get a string that can be handled by `unescape()`.\n"
  },
  {
    "path": "documentation/docs/html-rewriter/Element/prototype/after.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# after\n\nThe `after` method inserts content after the closing tag of the element.\n\n## Syntax\n\n```js\nelement.after(content);\nelement.after(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to insert after the element's closing tag.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.after(\"World\");\n// Result: <div>Hello</div>World\n```\n"
  },
  {
    "path": "documentation/docs/html-rewriter/Element/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# append\n\nThe `append` method inserts content at the end of the element's content.\n\n## Syntax\n\n```js\nelement.append(content);\nelement.append(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to insert at the end of the element's content.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.append(\", World\");\n// Result: <div>Hello, World</div>\n```\n"
  },
  {
    "path": "documentation/docs/html-rewriter/Element/prototype/before.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# before\n\nThe `before` method inserts content before the opening tag of the element.\n\n## Syntax\n\n```js\nelement.before(content);\nelement.before(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to insert before the element's opening tag.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.before(\"Well\");\n// Result: Well<div>Hello</div>\n```\n"
  },
  {
    "path": "documentation/docs/html-rewriter/Element/prototype/hasAttribute.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# hasAttribute\n\nThe `hasAttribute` method returns a `boolean` value indicating whether the specified attribute is present on the element.\n\n## Syntax\n\n```js\nelement.hasAttribute(attributeName);\n```\n\n### Parameters\n\n- `attributeName` _: string_\n  - The name of the attribute to check for.\n\n### Return value\n\nA boolean value indicating whether the attribute is present.\n\n"
  },
  {
    "path": "documentation/docs/html-rewriter/Element/prototype/prepend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# prepend\n\nThe `prepend` method inserts content at the beginning of the element's content.\n\n## Syntax\n\n```js\nelement.prepend(content);\nelement.prepend(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to insert at the beginning of the element's content.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.prepend(\"Well, \");\n// Result: <div>Well, Hello</div>\n```\n"
  },
  {
    "path": "documentation/docs/html-rewriter/Element/prototype/removeAttribute.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# removeAttribute\n\nThe `removeAttribute` method removes the specified attribute from the element.\n\n## Syntax\n\n```js\nelement.removeAttribute(attributeName);\n```\n\n### Parameters\n\n- `attributeName` _: string_\n  - The name of the attribute to remove.\n"
  },
  {
    "path": "documentation/docs/html-rewriter/Element/prototype/replaceChildren.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# replaceChildren\n\nThe `replaceChildren` method replaces the element's children with new content.\n\n## Syntax\n\n```js\nelement.replaceChildren(content);\nelement.replaceChildren(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to replace the element's children with.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.replaceChildren(\"Greetings!\");\n// Result: <div>Greetings!</div>\n```\n"
  },
  {
    "path": "documentation/docs/html-rewriter/Element/prototype/replaceWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# replaceWith\n\nThe `replaceWith` method replaces the element with new content.\n\n## Syntax\n\n```js\nelement.replaceWith(content);\nelement.replaceWith(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to replace the element with.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.replaceWith(\"<p>Greetings!</p>\");\n// Result: <p>Greetings!</p>\n```\n"
  },
  {
    "path": "documentation/docs/html-rewriter/Element/prototype/selector.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# selector\n\nThe `selector` read-only property is a `string` representing the [CSS selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors) that matches the element.\n\n"
  },
  {
    "path": "documentation/docs/html-rewriter/Element/prototype/setAttribute.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# setAttribute\n\nThe `setAttribute` method sets the value of the specified attribute on the element. If the value already exists, it will be updated; otherwise, a new attribute with the specified name and value will be added to the element.\n\n## Syntax\n\n```js\nelement.setAttribute(attributeName, value);\n```\n\n### Parameters\n\n- `attributeName` _: string_\n  - The name of the attribute to set.\n- `value` _: string_\n  - The value to assign to the attribute.\n\n"
  },
  {
    "path": "documentation/docs/html-rewriter/Element/prototype/tag.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# tag\n\nThe `tag` read-only property is a `string` representing the tag name of the element.\n"
  },
  {
    "path": "documentation/docs/html-rewriter/HTMLRewritingStream/HTMLRewritingStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `HTMLRewritingStream()`\n\nThe **`HTMLRewritingStream`** lets you rewrite HTML by registering callbacks on CSS selectors. When an element matching the selector is encountered, the rewriter calls your callback. This callback can manipulate the attributes of the element, and add or remove content from the immediate context.\n\n## Syntax\n\n```js\nnew HTMLRewritingStream()\n```\n\n### Return value\n\nA new `HTMLRewritingStream` object.\n\n## Examples\n\nIn this example, we fetch an HTML page and use the HTML rewriter to add an attribute to all `div` tags and prepend the text `Header:` to all `h1` tags:\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { HTMLRewritingStream } from 'fastly:html-rewriter';\n\nasync function handleRequest(event) {\n  let transformer = new HTMLRewritingStream()\n    .onElement(\"h1\", e => e.prepend(\"Header: \"))\n    .onElement(\"div\", e => e.setAttribute(\"special-attribute\", \"top-secret\"));\n  let body = (await fetch(\"https://example.com/\")).body.pipeThrough(transformer);\n\n  return new Response(body, {\n    status: 200,\n    headers: new Headers({\n      \"content-type\": \"text/html; charset=utf-8\",\n    })\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/docs/html-rewriter/HTMLRewritingStream/prototype/onElement.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# onElement\n\n▸ **onElement**`(selector: string, handler: (element: Element) => void): this`\n\nRegisters an element handler with the [`HTMLRewritingStream`] that will be called for each [`Element`] that matches the [CSS selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors) `selector`.\n\nElements added by handlers will not be processed by other handlers.\n\n## Syntax\n\n```js\n.onElement(selector, handler)\n```\n\n### Parameters\n\n- `selector` _: string_\n  - A CSS selector that determines the elements for which `handler` will be called\n  - The following types of CSS selector are supported:\n\nCurrently the rewriter supports the following CSS selectors:\n\n| Pattern              | Description                                                                |\n|----------------------|----------------------------------------------------------------------------|\n| `*`                  | Any element                                                                |\n| `E`                  | All elements of type `E`                                                   |\n| `E F`                | `F` elements inside `E` elements                                           |\n| `E > F`              | `F` elements directly inside `E` elements                                  |\n| `E:nth-child(n)`     | The n-th child of type `E`                                                 |\n| `E:first-child`      | First child of type `E`                                                    |\n| `E:nth-of-type(n)`   | The n-th sibling of type `E`                                               |\n| `E:first-of-type`    | First sibling of type `E`                                                  |\n| `E:not(s)`           | Type `E` elements not matching selector `s`                                |\n| `E.myclass`          | Type `E` elements with class `\"myclass\"`                                   |\n| `E#myid`             | Type `E` elements with ID `\"myid\"`                                         |\n| `E[attr]`            | Type `E` elements with attribute `attr`                                    |\n| `E[attr=\"val\"]`      | Type `E` elements where `attr` is `\"val\"`                                  |\n| `E[attr=\"val\" i]`    | Type `E` elements where `attr` is `\"val\"`, case-insensitive                |\n| `E[attr=\"val\" s]`    | Type `E` elements where `attr` is `\"val\"`, case-sensitive                  |\n| `E[attr~=\"val\"]`     | Type `E` elements where `attr` contains `\"val\"` in a space-separated list  |\n| `E[attr`&#124`;=\"val\"]`| Type `E` elements where `attr` is hyphen-separated and starts with `\"val\"` |\n| `E[attr^=\"val\"]`     | Type `E` elements where `attr` starts with `\"val\"`                         |\n| `E[attr$=\"val\"]`     | Type `E` elements where `attr` ends with `\"val\"`                           |\n| `E[attr*=\"val\"]`     | Type `E` elements where `attr` contains `\"val\"`                            |\n\n- `handler` _: (element: Element) => void_\n  - A callback function that will be called once for each element that matches `selector`\n\n### Return value\n\nThe `HTMLRewritingStream`, so multiple calls to `onElement` can be chained.\n\n### Exceptions\n\n- `Error`\n  - If the provided `selector` is not a valid CSS selector.\n  - If the provided `handler` is not a function.\n\n## Examples\n\n\nIn this example, we fetch an HTML page and use the HTML rewriter to add an attribute to all `div` tags and prepend the text `Header:` to all `h1` tags:\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { HTMLRewritingStream } from 'fastly:html-rewriter';\n\nasync function handleRequest(event) {\n  let transformer = new HTMLRewritingStream()\n    .onElement(\"h1\", e => e.prepend(\"Header: \"))\n    .onElement(\"div\", e => e.setAttribute(\"special-attribute\", \"top-secret\"));\n  let body = (await fetch(\"https://example.com/\")).body.pipeThrough(transformer);\n\n  return new Response(body, {\n    status: 200,\n    headers: new Headers({\n      \"content-type\": \"text/html; charset=utf-8\",\n    })\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```"
  },
  {
    "path": "documentation/docs/image-optimizer/Auto.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Auto`\n\nEnumerator options for [`imageOptimizerOptions.auto`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `AVIF` (`\"avif\"`) If the browser's Accept header indicates compatibility, deliver an AVIF image.\n- `WEBP` (`\"webp\"`)\tIf the browser's Accept header indicates compatibility, deliver a WebP image.\n\n## Examples\n\n```js\nimport { Auto, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      auto: Auto.AVIF\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/docs/image-optimizer/BWAlgorithm.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `BWAlgorithm`\n\nEnumerator options for [`imageOptimizerOptions.bw`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Threshold` (`\"threshold\"`) Uses a luminance threshold to convert the image to black and white.\n- `Atkinson` (`\"atkinson\"`)\tUses [Atkinson dithering](https://en.wikipedia.org/wiki/Atkinson_dithering) to convert the image to black and white.\n\n\n## Examples\n\n```js\nimport { Region, BWAlgorithm } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      bw: BWAlgorithm.Threshold\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/docs/image-optimizer/CropMode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `CropMode`\n\nEnumerator options for [`imageOptimizerOptions.crop.mode`](./imageOptimizerOptions.mdx) and `imageOptimizerOptions.precrop.mode`.\n\n## Constants\n\n- `Smart` (`\"smart\"`) Enables content-aware algorithms to attempt to crop the image to the desired aspect ratio while intelligently focusing on the most important visual content, including the detection of faces.\n- `Safe` (`\"safe\"`)\tAllow cropping out-of-bounds regions.\n\n## Examples\n\n```js\nimport { CropMode, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      crop: {\n        size: { ratio: { width: 4, height: 3 } },\n        mode: CropMode.Smart,\n      }\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/docs/image-optimizer/Disable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Disable`\n\nEnumerator options for [`imageOptimizerOptions.disable`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Upscale` (`\"upscale\"`) Prevent images being resized such that the output image's dimensions are larger than the source image.\n\n## Examples\n\n```js\nimport { Disable, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      width: 2560,\n      disable: Disable.Upscale\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/docs/image-optimizer/Enable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Enable`\n\nEnumerator options for [`imageOptimizerOptions.enable`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Upscale` (`\"upscale\"`) Allow images to be resized such that the output image's dimensions are larger than the source image.\n\n## Examples\n\n```js\nimport { Enable, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      width: 2560,\n      enable: Enable.Upscale\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/docs/image-optimizer/Fit.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Fit`\n\nEnumerator options for [`imageOptimizerOptions.fit`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Bounds` (`\"bounds\"`) Resize the image to fit entirely within the specified region, making one dimension smaller if needed.\n- `Cover` (`\"cover\"`) Resize the image to entirely cover the specified region, making one dimension larger if needed.\n- `Crop` (`\"crop\"`) Resize and crop the image centrally to exactly fit the specified region.\n\n## Examples\n\n```js\nimport { Fit, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      width: 150,\n      height; 150,\n      fit: Fit.Bounds\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/docs/image-optimizer/Format.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Format`\n\nEnumerator options for [`imageOptimizerOptions.format`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Auto` (`\"auto\"`) Automatically use the best format based on browser support and image/transform characteristics\n- `AVIF` (`\"avif\"`) AVIF\n- `BJPG` (`\"bjpg\"`) Baseline JPEG \n- `GIF` (`\"gif\"`) Graphics Interchange Format\n- `JPG` (`\"jpg\"`) JPEG \n- `JXL` (`\"jxl\"`) JPEGXL \n- `MP4` (`\"mp4\"`) MP4 (H.264)\n- `PJPG` (`\"pjpg\"`) Progressive JPEG \n- `PJXL` (`\"pjxl\"`) Progressive JPEGXL\n- `PNG` (`\"png\"`) Portable Network Graphics\n- `PNG8` (`\"png8\"`) Portable Network Graphics palette image with 256 colors and 8-bit transparency\n- `SVG` (`\"svg\"`) Scalable Vector Graphics\n- `WEBP` (`\"webp\"`) WebP\n- `WEBPLL` (`\"webpll\"`) WebP (Lossless)\n- `WEBPLY` (`\"webply\"`) WebP (Lossy)\n\n## Examples\n\n```js\nimport { Format, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      format: Format.PNG\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/docs/image-optimizer/Metadata.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Metadata`\n\nEnumerator options for [`imageOptimizerOptions.metadata`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Copyright` (`\"copyright\"`) Preserve [copyright notice](https://www.iptc.org/std/photometadata/specification/IPTC-PhotoMetadata#copyright-notice), creator, credit line, licensor, and web statement of rights fields.\n- `C2PA` (`\"c2pa\"`) Preserve the [C2PA manifest](https://c2pa.org/) and add any transformations performed by Fastly Image Optimizer.\n- `CopyRightAndC2PA` (`\"copyright,c2pa\"`) Resize and crop the image centrally to exactly fit the specified region.\n\n## Examples\n\n```js\nimport { Metadata, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      metadata: Metadata.Copyright\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/docs/image-optimizer/Optimize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Optimize`\n\nEnumerator options for [`imageOptimizerOptions.optimize`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Low` (`\"low\"`) Output image quality will be similar to the input image quality.\n- `Medium` (`\"medium\"`) More optimization is allowed. We attempt to preserve the visual quality of the input image.\n- `High` (`\"high\"`) Minor visual artifacts may be visible. This produces the smallest file.\n\n## Examples\n\n```js\nimport { Optimize, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      optimize: Optimize.High\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/docs/image-optimizer/Orient.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Orient`\n\nEnumerator options for [`imageOptimizerOptions.orient`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Default` (`\"1\"`) \n- `FlipHorizontal` (`\"2\"`) \n- `FlipHorizontalAndVertical` (`\"3\"`) \n- `FlipVertical` (`\"4\"`) \n- `FlipHorizontalOrientLeft` (`\"5\"`) \n- `OrientRight` (`\"6\"`) \n- `FlipHorizontalOrientRight` (`\"7\"`) \n- `OrientLeft` (`\"8\"`) \n\n## Examples\n\n```js\nimport { Orient, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      orient: Orient.FlipHorizontal\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/docs/image-optimizer/Profile.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Profile`\n\nEnumerator options for [`imageOptimizerOptions.profile`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Baseline` (`\"baseline\"`) The profile recommended for video conferencing and mobile applications. (Default)\n- `Main` (`\"main\"`) The profile recommended for standard-definition broadcasts.\n- `High` (`\"high\"`) The profile recommended for high-definition broadcasts.\n\n## Examples\n\n```js\nimport { Profile, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      profile: Profile.Main\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/docs/image-optimizer/Region.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Region`\n\nEnumerator options for [`imageOptimizerOptions.region`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `UsEast` (`\"us_east\"`)\n- `UsCentral` (`\"us_central\"`)\n- `UsWest` (`\"us_west\"`)\n- `EuCentral` (`\"eu_central\"`)\n- `EuWest` (`\"eu_west\"`)\n- `Asia` (`\"asia\"`)\n- `Australia` (`\"australia\"`)\n\n\n## Examples\n\n```js\nimport { Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/docs/image-optimizer/ResizeFilter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `ResizeFilter`\n\nEnumerator options for [`imageOptimizerOptions.resizeFilter`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Nearest` (`\"nearest\"`) Uses the value of nearby translated pixel values.\n- `Bilinear` (`\"bilinear\"`) Uses an average of a 2x2 environment of pixels.\n- `Linear` (`\"linear\"`) Same as `Bilenear`.\n- `Bicubic` (`\"bicubic\"`) Uses an average of a 4x4 environment of pixels, weighing the innermost pixels higher.\n- `Cubic` (`\"cubic\"`) Same as `Bicubic`.\n- `Lanczos2` (`\"lanczos2\"`) Uses the Lanczos filter to increase the ability to detect edges and linear features within an image and uses sinc resampling to provide the best possible reconstruction.\n- `Lanczos3` (`\"lanczos3\"`) Lanczos3 uses a better approximation of the sinc resampling function. (Default)\n- `Lanczos` (`\"lanczos\"`) Same as `Lanczos3`.\n\n## Examples\n\n```js\nimport { ResizeFilter, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      width: 2560,\n      resizeFilter: ResizeFilter.Linear\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/docs/image-optimizer/imageOptimizerOptions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `imageOptimizerOptions` \n\nOptions specified in the [`Request`](../globals/Request/Request.mdx) constructor for running the [Fastly Image Optimizer](https://docs.fastly.com/products/image-optimizer). More detailed documentation on all Image Optimizer options is available in the [Image Optimizer reference docs](https://www.fastly.com/documentation/reference/io/).\n\n## Parameters\n\nAll parameters other than `region` are optional.\n\n- `region`: _[`Region`](./Region.mdx)_ Where image optimizations should occur.\n- `auto`: _[`Auto`](./Auto.mdx)_ Enable optimization features automatically.\n- `bgColor`: _[`Color`](#color)_ Set the background color of an image.\n- `blur`: _`number` (0.5-1000) or [`Percentage`](#percentage)_ Set the blurriness of the output image.\n- `brightness`: _`number` (-100-100)_ Set the brightness of the output image.\n- `bw`: _[`BWAlgorithm`](./BWAlgorithm.mdx)_ Convert an image to black and white.\n- `canvas`: _`Object`_ Increase the size of the canvas around an image.\n    - `size`: _[`Size`](#size)_\n    - `position` (optional): _[`Position`](#position)_\n- `contrast`: _`number` (-100-100)_ Set the contrast of the output image.\n- `crop`: _`Object`_ Remove pixels from an image.\n    - `size`: _[`Size`](#size)_\n    - `position` (optional): _[`Position`](#position)_\n    - `mode` (optional): _[`CropMode`](./CropMode.mdx)_\n- `disable`: _[`Disable`](./Disable.mdx)_ Disable functionality that is enabled by default.\n- `dpr`: `number` Ratio between physical pixels and logical pixels.\n- `enable`: _[`Enable`](./Enable.mdx)_ Enable functionality that is disabled by default.\n- `fit`: _[`Fit`](./Fit.mdx)_ Set how the image will fit within the size bounds provided.\n- `format`: _[`Format`](./Format.mdx)_ Specify the output format to convert the image to.\n- `frame`: _`number` (must have the value 1)_ Extract the first frame from an animated image sequence.\n- `height`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ Resize the height of the image.\n- `level`: _`String` containing one of the [allowed values](https://www.fastly.com/documentation/reference/io/level/#allowed-values)_ Specify the level constraints when converting to video.\n- `metadata`: _[`Metadata`](./Metadata.mdx)_ Control which metadata fields are preserved during transformation.\n- `optimize`: _[`Optimize`](./Optimize.mdx)_ Automatically apply optimal quality compression.\n- `orient`: _[`Orient`](./Orient.mdx)_ Change the cardinal orientation of the image.\n- `pad`: _[`Sides`](#sides)_ Add pixels to the edge of an image.\n- `precrop`: _`Object`_ Remove pixels from an image before any other transformations occur.\n    - `size`: _[`Size`](#size)_\n    - `position`: _[`Position`](#position)_\n    - `mode`: _[`CropMode`](./CropMode.mdx)_\n- `profile`: _[`Profile`](./Profile.mdx)_ Specify the profile class of application when converting to video.\n- `quality`: _`integer` (1-100)_ Optimize the image to the given compression level for lossy file formatted images.\n- `resizeFilter`: _[`ResizeFilter`](./ResizeFilter.mdx)_ Specify the resize filter used when resizing images.\n- `saturation`: _`number` (-100-100)_ Set the saturation of the output image.\n- `sharpen`: _`Object`_ Set the sharpness of the output image.\n    - `amount`: _`number` (0-10)_\n    - `radius`: _`number` (0.5-1000)_\n    - `threshold`: _`integer` (0-255)_\n- `trim`: _[`Sides`](#sides)_ Remove pixels from the edge of an image.\n- `viewbox`: _`number` (must have the value 1)_ Remove explicit width and height properties in SVG output.\n- `width`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ Resize the width of the image.\n\n## Types\n\n### Color\n\nEither:\n\n- a 3 or 6 character hexadecimal string\n- an `Object` containing:\n    - `r`: _`integer` (0-255)_ Red component\n    - `g`: _`integer` (0-255)_ Green component\n    - `b`: _`integer` (0-255)_ Blue component\n    - `a` (optional): _`number` (0.0-1.0)_ Alpha component \n\n### Percentage\n\nA `String` containing a number suffixed with a percent sign (%).\n\n### Position\n\nAn `Object` containing:\n\n- Exactly one of:\n    - `x`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ \n    - `offsetX`: _`number` (interpreted as a percentage)_\n- Exactly one of: \n    - `y`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ \n    - `offsetY`: _`number` (interpreted as a percentage)_\n\n### Sides\n\nAn `Object` containing `top`, `bottom`, `left`, and `right`, all of which are either an `integer` or [`Percentage`](#percentage).\n\n### Size\n\nAn `Object` containing either:\n\n- `absolute`: _`Object`_\n    - `width`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ \n    - `height`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ \n- `ratio`: _`Object`_\n    - `width`: _`number`_\n    - `height`: _`number`_\n\n## Examples\n\n```js\nimport { Format, Orient, CropMode, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      format: Format.PNG,\n      bgColor: {\n        'r': 100,\n        'g': 255,\n        'b': 9,\n        'a': 0.5\n      },\n      blur: '1%',\n      brightness: -20,\n      contrast: -20,\n      height: 600,\n      level: '4.0',\n      orient: Orient.FlipVertical,\n      saturation: 80,\n      sharpen: { 'amount': 5, 'radius': 6, 'threshold': 44 },\n      canvas: { 'size': { 'absolute': { 'width': 400, 'height': 400 } } },\n      crop: { size: { absolute: { width: 200, height: 200 }, mode: CropMode.Safe } },\n      trim: { top: 10, left: 10, right: 10, bottom: 10 },\n      pad: { top: 30, left: 30, right: \"1%\", bottom: 30 }\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/docs/index.mdx",
    "content": "---\nsidebar_position: 1\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n\n# JavaScript for Fastly Compute\n\nThis site is the full SDK reference for [`@fastly/js-compute`](https://www.npmjs.com/package/%40fastly/js-compute), the module that provides the interface between your JavaScript code and the [Fastly Compute](https://www.fastly.com) platform.\n\nIf you haven't used Fastly Compute before, start by [setting up your first Fastly Compute program](https://developer.fastly.com/learning/compute/) over on **developer.fastly.com** so that you have a working development environment.\n\nTo learn more about the fundamentals of using JavaScript with Fastly Compute, see our [using JavaScript](https://developer.fastly.com/learning/compute/javascript/) guide.\n\n## Understanding the JavaScript SDK\n\nIncoming HTTP requests to [domains that are attached to your Fastly service](https://developer.fastly.com/learning/concepts/) will start an instance of your application and invoke a `fetch` event, which can be bound using the `addEventListener` function:\n\n```js\naddEventListener(\"fetch\", event => event.respondWith(handleRequest(event)) );\n\nasync function handleRequest(event) {\n  const req = event.request;\n\n  return fetch(req, {\n    backend: \"example_backend\"\n  });\n}\n```\n\nFastly specific features are available as named imports from `fastly:` prefixed modules, all of which are documented in this site.  For example, the [env](https://js-compute-reference-docs.edgecompute.app/docs/fastly:env/env) function provides access to [environment variables](https://developer.fastly.com/reference/compute/ecp-env/) and can be imported into your application like this:\n\n```js\nimport { env } from \"fastly:env\"\n```\n\nJavaScript code compiled for Fastly Compute has access to a global environment with most of the globals you would expect in an ECMAScript runtime, like [`Date`](https://js-compute-reference-docs.edgecompute.app/docs/globals/Date/) and [`console`](https://js-compute-reference-docs.edgecompute.app/docs/globals/console/log).\n\n## Trying things out\n\n[Fastly fiddle](https://fiddle.fastly.dev) is an online web-based playground where you can run Fastly code.  You'll see fiddles included in many pages of our [developer hub](https://developer.fastly.com) and this SDK reference. These interactive examples can be executed right on the page by clicking the **RUN** tab:\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nasync function app(event) {\n    const request = event.request;\n    return new Response(\"You made a request to \" + request.url)\n}\naddEventListener(\"fetch\", event => {\n  event.respondWith(app(event));\n});\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nasync function app(event) {\n    const request = event.request;\n    return new Response(`You made a request to ${request.url}`)\n}\n\naddEventListener(\"fetch\", event => {\n  event.respondWith(app(event));\n});\n\n```\n\n</Fiddle>\n\nCheck out [`fiddle.fastly.dev`](https://fiddle.fastly.dev) to create your own.\n"
  },
  {
    "path": "documentation/docs/kv-store/KVStore/KVStore.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `KVStore()`\n\nThe **`KVStore` constructor** lets you connect your Fastly Compute application to a Fastly KV store.\n\nA Fastly KV store is a persistent, globally consistent key-value store. See [Data stores for Fastly services](https://developer.fastly.com/learning/concepts/edge-state/data-stores#kv-stores) for initialization and usage details.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew KVStore(name)\n```\n\n> **Note:** `KVStore()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Define a KV store instance using the resource link name.\n  \n### Return value\n\nA new `KVStore` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no KV Store exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name does not start with an ascii alphabetical character \n  - Thrown if the provided name contains control characters `(\\u0000-\\u001F)`\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then read back the value and return it to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/docs/kv-store/KVStore/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# KVStore.prototype.delete\n\nDeletes the value associated with the key `key` in the KV store.\n\n## Syntax\n\n```js\ndelete(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the KV-store.\n\n### Return value\n\nReturns `undefined`\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is any of the strings `\"\"`, `\".\"`, or `\"..\"`\n    - Starts with the string `\".well-known/acme-challenge/\"`\n    - Contains any of the characters `\"#;?^|\\n\\r\"`\n    - Is longer than 1024 characters\n    - Does not exist\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then delete the entry.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n  await files.delete('hello')\n\n  const entry = await files.get('hello')\n  if (entry) {\n    return new Response(await entry.text())\n  } else {\n    return new Response('no file named hello exists')\n  }\n\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/docs/kv-store/KVStore/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# KVStore.prototype.get\n\n▸ **get**(): `string`\n\nGets the value associated with the key `key` in the KV store.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the KV-store.\n\n### Return value\n\nIf the key does not exist in the KV store, this returns a `Promise` which resolves with `null`.\n\nIf the key does exist in the KV store, this returns a `Promise` which resolves with an `KVStoreEntry`.\n\n## Description\n\nSend the given message, converted to a string, to this KVStore instance's endpoint.\n\nThe `get()` method requires its `this` value to be a [`KVStore`](../KVStore.mdx) object.\n\nIf the `this` value does not inherit from `KVStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is any of the strings `\"\"`, `\".\"`, or `\"..\"`\n    - Starts with the string `\".well-known/acme-challenge/\"`\n    - Contains any of the characters `\"#;?^|\\n\\r\"`\n    - Is longer than 1024 characters\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then read back the value and return it to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/docs/kv-store/KVStore/prototype/list.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStore.prototype.list\n\nThe **`list()`** can be used to list the keys of a store.\n\n## Syntax\n\n```js\nlist(options?)\n```\n\n### Parameters\n\n- `options` _: object_ _**optional**_\n  - List options supporting properties:\n  - `cursor` _: string_ _**optional**_\n    - The cursor used to pick up from a previous iteration.\n  - `limit` _: number_ _**optional**_\n    - The maximum number of keys to return.\n  - `prefix` _: string_ _**optional**_\n    - List only those keys that start with the given string prefix.\n  - `noSync` _: boolean_ _**optional**_\n    - Do not sync the key list first, instead provide a possibly out-of-date listing. May be faster but inconsistent.\n\n### Return value\n\nReturns a `Promise` which resolves with `{ list: string[], cursor: string | undefined }`.\n\n## Example\n\nIn this example we list the keys of a KV Store named `'files'`, iterating 10 at a time, counting the total;\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from 'fastly:kv-store';\n\nasync function app(event) {\n  const files = new KVStore('files');\n\n  let cursor,\n    list,\n    total = 0;\n  do {\n    ({ cursor, list } = await files.list({ limit: 10, cursor }));\n    total += list?.length;\n  } while (list);\n\n  return new Response(`Iterated ${total} entries`);\n}\n\naddEventListener('fetch', (event) => event.respondWith(app(event)));\n```\n"
  },
  {
    "path": "documentation/docs/kv-store/KVStore/prototype/put.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# KVStore.prototype.put\n\nThe **`put()`** method stores a `value` into the KV store under a `key`.\n\n> **Note**: KV stores are eventually consistent, this means that the updated contents associated with the key `key` may not be available to read from all edge locations immediately and some edge locations may continue returning the previous contents associated with the key.\n\n## Syntax\n\n```js\nput(key, value, options?)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to store the supplied value under within the KV store.\n- `value` _:  ArrayBuffer | TypedArray | DataView| ReadableStream | URLSearchParams | String | string literal_\n  - The value to store within the KV store.\n- `options` _: object_ _**optional**_\n  - An insert options parameter, supporting:\n  - `metadata` _: ArrayBuffer | TypedArray | DataView_ _**optional**_\n    - Binary metadata associated with the entry, may be up to 1000 bytes.\n  - `ttl` _: number_ _**optional**_\n    - TTL for the entry\n  - `mode` _: 'overwrite' | 'add' | 'append' | 'prepend'_ _**optional**_\n    - Insert mode, defaults to 'overwrite'\n  - `gen` _: number_ _**optional**_\n    - 'generation' header specific to the version of an entry key\n\n### Return value\n\nReturns a `Promise` which resolves with `undefined` when the provided `value` has been written into the KV store.\n\n## Description\n\nStores the supplied `value` into the KV store under the supplied `key`.\n\nThe `put()` method requires its `this` value to be a [`KVStore`](../KVStore.mdx) object.\n\nIf the `this` value does not inherit from `KVStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is any of the strings `\"\"`, `\".\"`, or `\"..\"`\n    - Starts with the string `\".well-known/acme-challenge/\"`\n    - Contains any of the characters `\"#;?^|\\n\\r\"`\n    - Is longer than 1024 characters\n- `TypeError`\n  - If the provided `gen`:\n    - Is not an number\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then read back the value and return it to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/docs/kv-store/KVStoreEntry/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.arrayBuffer()\n\nThe `arrayBuffer()` method of the `KVStoreEntry` interface takes a `KVStoreEntry` stream and reads it to completion. It returns a promise that resolves with an `ArrayBuffer`.\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an `ArrayBuffer`."
  },
  {
    "path": "documentation/docs/kv-store/KVStoreEntry/prototype/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.body\n\nThe `body` read-only property of the `KVStoreEntry` interface is a `ReadableStream` of the body contents.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/docs/kv-store/KVStoreEntry/prototype/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.bodyUsed\n\nThe `bodyUsed` read-only property of the `KVStoreEntry` interface is a `boolean` value that indicates whether the body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/docs/kv-store/KVStoreEntry/prototype/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.json()\n\nThe `json()` method of the `KVStoreEntry` interface takes a `KVStoreEntry` stream and reads it to completion. It returns a promise which resolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a JavaScript object. This object could be anything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/docs/kv-store/KVStoreEntry/prototype/metadata.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.metadata()\n\nThe `metadata()` method of the `KVStoreEntry` interface provides the binary metadata associated with the `KVStoreEntry`.\n\nThe metadata binary may be up to 1000 bytes, and is returned as a `Uint8Array` TypedArray buffer, if metadata is set, or null otherwise.\n\n## Syntax\n\n```js\nmetadata()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a `Uint8Array` buffer object.\n"
  },
  {
    "path": "documentation/docs/kv-store/KVStoreEntry/prototype/metadataText.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.metadataText()\n\nThe `metadataText()` method of the `KVStoreEntry` interface provides a String interpretation of binary metadata associated with the `KVStoreEntry`.\n\nIf the binary data is not a valid string, an encoding error will be thrown.\n\n## Syntax\n\n```js\nmetadataText()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a String.\n"
  },
  {
    "path": "documentation/docs/kv-store/KVStoreEntry/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.text()\n\nThe `text()` method of the `KVStoreEntry` interface takes a `KVStoreEntry` stream and reads it to completion. It returns a promise that resolves with a `String`. The `KVStoreEntry `is always decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a `String`."
  },
  {
    "path": "documentation/docs/logger/Logger/Logger.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Logger()`\n\nThe **`Logger` constructor** lets you connect your Fastly Compute application to a [Fastly Named Logger](https://developer.fastly.com/learning/integrations/logging/).\n\n## Syntax\n\n```js\nnew Logger(name)\n```\n\n> **Note:** `Logger()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - The Fastly Logger which should be associated with this Logger instance\n\n### Return value\n\nA new `Logger` object.\n\n## Examples\n\nIn this example we have a create a logger named `\"splunk\"` and logs the incoming request method and destination.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Logger Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^3\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nasync function app (event) {\n  let logger = new Logger(\"splunk\");\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nconst logger = new Logger(\"splunk\");\nasync function app (event) {\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/docs/logger/Logger/prototype/log.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Logger.prototype.log\n\n▸ **log**(): `string`\n\nSends the given message, converted to a string, to this Logger instance's endpoint.\n\n**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nlog(message)\n```\n\n### Return value\n\n`undefined`.\n\n## Description\n\nSend the given message, converted to a string, to this Logger instance's endpoint.\n\nThe `log()` method requires its `this` value to be a [`Logger`](../Logger.mdx) object.\n\nIf the `this` value does not inherit from `Logger.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n## Examples\n\nIn this example we have a create a logger named `\"splunk\"` and logs the incoming request method and destination.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Logger.prototype.log Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^3\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nlet logger = new Logger(\"splunk\");\nasync function app (event) {\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nasync function app (event) {\n  let logger = new Logger(\"splunk\");\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/docs/logger/configureConsole.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# configureConsole\n\nThe **`configureConsole()`** function allows configuring the behaviour of the `console` global JS logger.\n\n## Syntax\n\n```js\nconfigureConsole(loggingOptions)\n```\n\n### Parameters\n\n- `loggingOptions` _: object_\n  - \n  - The name has to be between 1 and 254 characters inclusive.\n  - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n\n## Examples\n\nIn this example, we disable prefixing for `console.log` and use `stderr` output for `console.error`:\n\n```js\nimport { configureConsole } from \"fastly:logger\";\n\nconfigureConsole({\n  prefixing: false,\n  stderr: true\n});\n\nasync function handleRequest(event) {\n  console.log(JSON.stringify(event.request.headers));\n  const url = new URL(event.request.url);\n  try {\n    validate(url);\n  } catch (e) {\n    console.error(`Validation error: ${e}`);\n    return new Response('Bad Request', { status: 400 });\n  }\n  return new Response('OK');\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/docs/migration-guide/index.mdx",
    "content": "---\nsidebar_position: 1\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Migrating from v2 to v3`\n\n## SimpleCache.delete renamed to SimpleCache.purge and requires purge options to be supplied as the second parameter\n\nWe are renaming because \"purge\" is already a well-known and documented concept for removing content from Fastly's cache.\n\nThe new addition of a second argument allows the caller to decide what scope to purge the content from, currently they can choose to purge from all of Fastly (\"global\") or from the POP that contains the currently executing instance (\"pop\"). We do not provide a default option right now, in the future we may provide a default option, if we discover a common pattern is being used.\n\nHere is an example of migrating an application using `SimpleCache.delete` to `SimpleCache.purge` with the same purging behaviour:\n```diff\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const url = new URL(event.request);\n  const path = url.pathname;\n  if (url.searchParams.has('delete')) {\n-    SimpleCache.delete(path);\n+    SimpleCache.purge(path, { scope: \"global\" });\n    return new Response(page, { status: 204 });\n  }\n\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n\n```\n\n\n# `Migrating from v1 to v2`\n\n## ObjectStore renamed to KVStore\n\nWe have renamed the `ObjectStore` class to `KVStore`, and the module name from `fastly:object-store` to `fastly:kv-store`.\n\nYou will need to update your code to use the new class name and module name.\n\nBelow is the change that would need to be made for the imported module name:\n```diff\n- import { ObjectStore } from 'fastly:object-store';\n+ import { KVStore } from 'fastly:kv-store';\n```\n\nAnd this is the change that would need to be made for constructing an instance of the class:\n```diff\n- const store = new ObjectStore('my-store');\n+ const store = new KVStore('my-store');\n```\n\n\nHere is a full example of migrating an application from ObjectStore to KVStore:\n```diff\n/// <reference types=\"@fastly/js-compute\" />\n\n- import { ObjectStore } from 'fastly:object-store';\n+ import { KVStore } from 'fastly:kv-store';\n\nasync function app(event) {\n-   const files = new ObjectStore('files');\n+   const files = new KVStore('files');\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n```"
  },
  {
    "path": "documentation/docs/secret-store/SecretStore/SecretStore.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `SecretStore()`\n\nThe **`SecretStore` constructor** lets you connect your Fastly Compute application to a Fastly Secret store.\n\nA secret store is a persistent, globally distributed store for secrets accessible to Fastly Compute services during request processing.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew SecretStore(name)\n```\n\n> **Note:** `SecretStore()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Define a Secret Store instance using the resource link name.\n  \n### Return value\n\nA new `SecretStore` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Secret Store exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name contains characters other than letters, numbers, dashes (-), underscores (_), and periods (.)\n\n## Examples\n\nIn this example we connect to a Secret Store named `'secrets'` and retrieve a secret named `'cat-api-key'` use the value in a Request header.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SecretStore } from \"fastly:secret-store\";\n\nasync function app(event) {\n  const secrets = new SecretStore('secrets')\n\n  const catApiKey = await secrets.get('cat-api-key')\n\n  return fetch('/api/cat', {\n    headers: {\n      'cat-api-key': catApiKey.plaintext()\n    }\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/docs/secret-store/SecretStore/fromBytes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# fromBytes\n\nThe **`fromBytes()`** function is used to create an in-memory secret from an array buffer.\n\n>**Note**: This API should be avoided when possible, by instead using [SecretStore.prototype.get](./prototype/get.mdx) to obtain secure secrets.\n\n## Syntax\n\n```js\nfromBytes(new Uint8Array([1, 2, 3]))\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns a `SecretStoreEntry`.\n"
  },
  {
    "path": "documentation/docs/secret-store/SecretStore/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SecretStore.prototype.get\n\n▸ **get**(): `string`\n\nGets the value associated with the key `key` in the Secret store.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the Secret Store.\n\n### Return value\n\nIf the key does not exist in the Secret Store, this returns a `Promise` which resolves with `null`.\n\nIf the key does exist in the Secret Store, this returns a `Promise` which resolves with an `SecretStoreEntry`.\n\n## Description\n\nSend the given message, converted to a string, to this SecretStore instance's endpoint.\n\nThe `get()` method requires its `this` value to be a [`SecretStore`](../SecretStore.mdx) object.\n\nIf the `this` value does not inherit from `SecretStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Is longer than 255 characters\n    - Contains characters other than letters, numbers, dashes (-), underscores (_), and periods (.)\n\n## Examples\n\nIn this example we connect to a Secret Store named `'secrets'` and retrieve a secret named `'cat-api-key'` use the value in a Request header.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SecretStore } from \"fastly:secret-store\";\n\nasync function app(event) {\n  const secrets = new SecretStore('secrets')\n\n  const catApiKey = await secrets.get('cat-api-key')\n\n  return fetch('/api/cat', {\n    headers: {\n      'cat-api-key': catApiKey.plaintext()\n    }\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/docs/secret-store/SecretStoreEntry/prototype/plaintext.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SecretStoreEntry.prototype.plaintext\n\n▸ **plaintext**(): `string`\n\nReturns the plaintext contents of the SecretStoreEntry instance as String.\n\n## Syntax\n\n```js\nplaintext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA String\n\n### Exceptions\n\nThe `plaintext()` method requires its `this` value to be a `SecretStoreEntry` object.\nIf the `this` value does not inherit from `SecretStoreEntry.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n## Examples\n\nIn this example we connect to a Secret Store named `'secrets'` and retrieve a secret named `'cat-api-key'` use the value in a Request header.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SecretStore } from \"fastly:secret-store\";\n\nasync function app(event) {\n  const secrets = new SecretStore('secrets')\n\n  const catApiKey = await secrets.get('cat-api-key')\n\n  return fetch('/api/cat', {\n    headers: {\n      'cat-api-key': catApiKey.plaintext()\n    }\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/docs/secret-store/SecretStoreEntry/prototype/rawBytes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SecretStoreEntry.prototype.rawBytes\n\n▸ **rawBytes**(): `Uint8Array`\n\nReturns the raw byte contents of the SecretStoreEntry instance as a Uint8Array.\n\n## Syntax\n\n```js\nrawBytes()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Uint8Array\n\n### Exceptions\n\nThe `rawBytes()` method requires its `this` value to be a `SecretStoreEntry` object.\nIf the `this` value does not inherit from `SecretStoreEntry.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n"
  },
  {
    "path": "documentation/docs/security/inspect.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# inspect\n\nThe **`inspect()`** function inspects a request using the [Fastly Next-Gen WAF](https://docs.fastly.com/en/ngwaf/).\n\n## Syntax\n\n```js\ninspect(request, config);\n```\n\n### Parameters\n\n- `request` _: Request_\n  - The Request to get a WAF determination for.\n- `config` _: object_\n  - `corp` _: string_\n    - Set a corp name for the configuration.\n    - This parameter is currently required.\n  - `workspace` _: string_\n    - Set a workspace name for the configuration.\n    - This parameter is currently required.\n  - `overrideClientIp` _: string_\n    - Specify an explicit client IP address to inspect.\n    - By default, `inspect` will use the IP address that made the request to the\n      running Compute service, but you may want to use a different IP when\n      service chaining or if requests are proxied from outside of Fastly’s\n      network.\n\n### Return value\n\nReturns an `Object` with the `inspect` response, with the following fields:\n\n- `waf_response` _: number_\n  - Security status code.\n  \n- `redirect_url` _: string | null_\n  - A redirect URL returned from Security.\n\n- `tags` _: string[]_\n  - Tags returned by Security.\n\n- `verdict` _: string_\n  - The outcome of inspecting a request with Security. It can be one of the following:\n    - `\"allow\"`\n      - Security indicated that this request is allowed.\n    - `\"block\"`\n      - Security indicated that this request should be blocked.\n    - `\"unauthorized\"`\n      - Security indicated that this service is not authorized to inspect a request.\n    - Other verdicts may be returned but not currently documented.\n\n- `decision_ms` _: number_\n  - How long Security spent determining its verdict, in milliseconds.\n  \n## Examples\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { inspect } from \"fastly:security\";\n\nasync function app(event) {\n  const res = inspect(event.request, {\n    corp: \"mycorp\",\n    workspace: \"myws\"\n  });\n  switch (res.verdict) {\n    case \"allow\":\n      return await fetch(event.request);\n    case \"block\":\n      return new Response(\"Request Blocked\", { status: 400 });\n    case \"unauthorized\":\n      return new Response(\"Unauthorized\", { status: 401 });\n    default:\n      return new Response(\"idk\", { status: 500 });\n  }\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)));\n```\n"
  },
  {
    "path": "documentation/docs/shielding/Shield/Shield.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `Shield()`\n\nLoad information about the given shield.\n\nReturns an object representing the shield if it is active, or throws an exception if the string is malformed or the shield doesn’t exist.\n\nShield names are defined on [this webpage](https://www.fastly.com/documentation/guides/concepts/shielding/#shield-locations), in the “shield code” column. For example, the string “pdx-or-us” will look up our Portland, OR, USA shield site, while “paris-fr” will look up our Paris site.\n\nIf you are using a major cloud provider for your primary origin site, consider looking at the “Recommended for” column, to find the Fastly POP most closely located to the given cloud provider.\n\n## Syntax\n\n```js\nnew Shield(name)\n```\n\n> **Note:** `Shield()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Shield exists with the provided name\n\n## Examples\n\nIn this example, we create a Shield instance for the Sydney, Australia shield POP. If the code is running on that shield POP, it fetches directly from origin. Otherwise, it routes the request through the shield using an encrypted connection.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n    \nimport { Shield } from \"fastly:shielding\";\n\nasync function app(event) {\n    const shield = new Shield('wsi-australia-au');\n    // If running on the shield POP, fetch from the origin directly\n    if (shield.runningOn()) {\n        return await fetch('https://http-me.fastly.com/anything', { backend: 'httpme' });\n    }\n    // Otherwise, route the request through the shield using an encrypted connection\n    return await fetch(event.request, { backend: shield.encryptedBackend() });\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n```\n"
  },
  {
    "path": "documentation/docs/shielding/Shield/prototype/encryptedBackend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Shield.prototype.encryptedBackend\n\n▸ **encryptedBackend**(configuration?): `Backend`\n\nReturns a `Backend` representing an encrypted connection to the POP.\n\nFor reference, this is almost always the backend that you want to use. Only use [`Shield::unencryptedBackend`](./unencryptedBackend.mdx) in situations in which you are 100% sure that all the data you will send and receive over the backend is already encrypted.\n\n## Parameters\n\n- `configuration` _: object_ _**optional**_\n  - `firstByteTimeout` _: number_ _**optional**_\n    - An optional first byte timeout (in milliseconds) to set on the returned backend.\n"
  },
  {
    "path": "documentation/docs/shielding/Shield/prototype/runningOn.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Shield.prototype.runningOn\n\n▸ **runningOn**(): `boolean`\n\nReturns whether we are currently operating on the given shield.\n\nTechnically, this may also return true in very isolated incidents in which Fastly is routing traffic from the target shield POP to the POP that this code is running on, but in these situations the results should be approximately identical.\n\n(For example, it may be the case that you are asking to shield to ‘pdx-or-us’. But, for load balancing, performance, or other reasons, Fastly is temporarily shifting shielding traffic from Portland to Seattle. In that case, this function may return true for hosts running on ‘bfi-wa-us’, our Seattle site, because effectively the shield has moved to that location. This should give you a slightly faster experience than the alternative, in which this function would return false, you would try to forward your traffic to the Portland site, and then that traffic would be caught and redirected back to Seattle.)\n"
  },
  {
    "path": "documentation/docs/shielding/Shield/prototype/unencryptedBackend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Shield.prototype.unencryptedBackend\n\n▸ **unencryptedBackend**(configuration?): `Backend`\n\nReturns a `Backend` representing an unencrypted connection to the POP.\n\nGenerally speaking, we encourage users to use [`Shield::encryptedBackend`](./encryptedBackend.mdx) instead of this function. Data sent over this backend – the unencrypted version – will be sent over the open internet, with no protections. In most cases, this is not what you want. However, in some cases – such as when you want to ship large data blobs that you know are already encrypted — using these backends can prevent a double-encryption performance penalty.\n\n## Parameters\n\n- `configuration` _: object_ _**optional**_\n  - `firstByteTimeout` _: number_ _**optional**_\n    - An optional first byte timeout (in milliseconds) to set on the returned backend."
  },
  {
    "path": "documentation/docs/websocket/createWebsocketHandoff.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# createWebsocketHandoff\n\nThe **`createWebsocketHandoff()`** function creates a Response instance which informs Fastly to pass the original Request through Websocket, to the declared backend.\n\n## Syntax\n\n```js\ncreateWebsocketHandoff(request, backend)\n```\n\n### Parameters\n\n- `request` _: Request_\n  - The request to pass through Websocket.\n- `backend` _: string_\n  - The name of the backend that Websocket should send the request to.\n  - The name has to be between 1 and 254 characters inclusive.\n  - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n\n### Return value\n\nA Response instance is returned, which can then be used via `event.respondWith`.\n\n## Examples\n\nIn this example application requests to the path `/stream` and sent handled via Websocket.\n\n```js\nimport { createWebsocketHandoff } from \"fastly:websocket\";\n\nasync function handleRequest(event) {\n  try {\n    const url = new URL(event.request.url);\n    if (url.pathname === '/stream') {\n      return createWebsocketHandoff(event.request, 'websocket_backend');\n    } else {\n      return new Response('oopsie, make a request to /stream for some websocket goodies', { status: 404 });\n    }\n  } catch (error) {\n    console.error({error});\n    return new Response(error.message, {status:500})\n  }\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/docusaurus.config.js",
    "content": "// @ts-check\n// Note: type annotations allow type checking and IDEs autocompletion\n\nconst {themes} = require('prism-react-renderer');\nconst lightCodeTheme = themes.github;\nconst darkCodeTheme = themes.dracula;\n\n/** @type {import('@docusaurus/types').Config} */\nconst config = {\n  webpack: {\n    jsLoader: (isServer) => ({\n      loader: require.resolve('swc-loader'),\n      options: {\n        jsc: {\n          parser: {\n            syntax: 'ecmascript',\n            jsx: true,\n          },\n          target: 'es2017',\n          transform: {\n            react: {\n              runtime: 'automatic'\n            }\n          }\n        },\n        module: {\n          type: isServer ? 'commonjs' : 'es6',\n        },\n      },\n    }),\n  },\n\n  plugins: [\n    require.resolve(\"@cmfcmf/docusaurus-search-local\"),\n  ],\n  title: '@fastly/js-compute',\n  tagline: 'Javascript SDK and CLI for Fastly Compute',\n  url: 'https://js-compute-reference-docs.edgecompute.app',\n  baseUrl: '/',\n  onBrokenLinks: 'throw',\n  favicon: './fastly-favicon-default.svg',\n\n  organizationName: 'fastly',\n  projectName: 'js-compute-runtime',\n  i18n: {\n    defaultLocale: 'en',\n    locales: ['en'],\n  },\n\n  presets: [\n    [\n      'classic',\n      /** @type {import('@docusaurus/preset-classic').Options} */\n      ({\n        docs: {\n          includeCurrentVersion: false,\n        },\n        theme: {\n          customCss: require.resolve('./src/css/custom.css'),\n        },\n\n      }),\n    ],\n  ],\n\n  staticDirectories: ['static'],\n\n  scripts: [\n    '/fiddle.js',\n  ],\n\n  markdown: {\n    hooks: { onBrokenMarkdownLinks: 'throw'}\n  },\n\n  themeConfig:\n    /** @type {import('@docusaurus/preset-classic').ThemeConfig} */\n    ({\n      navbar: {\n        title: '@fastly/js-compute',\n        items: [\n          {\n            type: 'docsVersionDropdown',\n          },\n          {href: 'https://developer.fastly.com/', label: 'Fastly Developer Hub', position: 'left'},\n          {href: 'https://developer.fastly.com/solutions/examples/javascript/', label: 'Code Examples', position: 'left'},\n          {href: 'https://fiddle.fastly.dev', label: 'Fastly Fiddle', position: 'left'},\n          {\n            href: 'https://twitter.com/FastlyDevs/',\n            label: 'Twitter',\n            position: 'right',\n          },\n          {\n            href: 'https://github.com/fastly/js-compute-runtime/',\n            label: 'GitHub',\n            position: 'right',\n          },\n        ],\n      },\n      footer: {\n        style: 'dark',\n        copyright: `Copyright © ${new Date().getFullYear()} Fastly Inc. All rights reserved. Portions of this content are ©1998–2023 by individual mozilla.org contributors. Content available under a <a href=\"https://creativecommons.org/licenses/by-sa/2.5/\">CC-BY-SA 2.5</a> license.`,\n      },\n      prism: {\n        theme: lightCodeTheme,\n        darkTheme: darkCodeTheme,\n      },\n    }),\n};\n\nmodule.exports = config;\n"
  },
  {
    "path": "documentation/generate-version-redirects.mjs",
    "content": "#!/usr/bin/env node\n\nimport { readFileSync, writeFileSync } from 'fs';\nimport { join, dirname } from 'path';\nimport { fileURLToPath } from 'url';\n\nconst __dirname = dirname(fileURLToPath(import.meta.url));\n\nconst versionsPath = join(__dirname, 'versions.json');\nconst versions = JSON.parse(readFileSync(versionsPath, 'utf-8'));\n\n// Find latest version for each major version (versions.json is already sorted newest first)\nconst latestByMajor = {};\nfor (const version of versions) {\n  const major = version.split('.')[0];\n  if (!latestByMajor[major]) {\n    latestByMajor[major] = version;\n  }\n}\n\n// Latest major redirects to /docs/ (no version in path)\nconst latestMajor = Math.max(...Object.keys(latestByMajor).map(Number));\nlatestByMajor[latestMajor] = null;\n\nconst outputPath = join(__dirname, 'app', 'version-redirects.json');\nwriteFileSync(outputPath, JSON.stringify({ latestByMajor }, null, 2));\n"
  },
  {
    "path": "documentation/package.json",
    "content": "{\n  \"scripts\": {\n    \"docusaurus\": \"docusaurus\",\n    \"start\": \"docusaurus start\",\n    \"build\": \"node --max-old-space-size=8000 node_modules/.bin/docusaurus build && npm run generate-version-redirects\",\n    \"swizzle\": \"docusaurus swizzle\",\n    \"deploy\": \"npm run build && cd app && npm install && npm run deploy\",\n    \"clear\": \"docusaurus clear\",\n    \"serve\": \"docusaurus serve\",\n    \"write-translations\": \"docusaurus write-translations\",\n    \"write-heading-ids\": \"docusaurus write-heading-ids\",\n    \"remove-fastly-prefix\": \"node rename-docs.mjs remove-prefix\",\n    \"add-fastly-prefix\": \"node rename-docs.mjs add-prefix\",\n    \"generate-version-redirects\": \"node generate-version-redirects.mjs\"\n  },\n  \"devDependencies\": {\n    \"@cmfcmf/docusaurus-search-local\": \"^2.0.1\",\n    \"@docusaurus/core\": \"3.9.2\",\n    \"@docusaurus/module-type-aliases\": \"3.9.2\",\n    \"@docusaurus/preset-classic\": \"3.9.2\",\n    \"@mdx-js/react\": \"^3.1.1\",\n    \"@swc/core\": \"^1.15.2\",\n    \"clsx\": \"^2.1.1\",\n    \"prism-react-renderer\": \"^2.4.1\",\n    \"react\": \"^19.2.0\",\n    \"react-dom\": \"^19.2.0\",\n    \"swc-loader\": \"^0.2.6\"\n  },\n  \"overrides\": {\n    \"cheerio\": \"1.0.0-rc.9\"\n  }\n}\n"
  },
  {
    "path": "documentation/rename-docs.mjs",
    "content": "/**\n * The docs site relies on path names like \"fastly:backend\", which\n * are not compatible in Windows.\n * \n * This script handles renaming the docs site folders to be prefixed with fastly: or not\n */\n\nimport { readdirSync, renameSync } from 'node:fs';\n\nconst subsystems = [\n  'acl',\n  'backend',\n  'cache-override',\n  'cache',\n  'compute',\n  'config-store',\n  'device',\n  'dictionary',\n  'edge-rate-limiter',\n  'env',\n  'experimental',\n  'fanout',\n  'websocket',\n  'geolocation',\n  'kv-store',\n  'logger',\n  'object-store',\n  'secret-store',\n  'html-rewriter',\n  'image-optimizer',\n  'security',\n  'shielding'\n];\n\nconst files = readdirSync('docs');\nconst direction = process.argv[2] || (files.some(f => f.startsWith('fastly:')) ? 'remove-prefix' : 'add-prefix');\n\nfor (const file of files) {\n  if (direction === 'remove-prefix' && file.startsWith('fastly:')) {\n    if (!subsystems.includes(file.slice(7)))\n      console.error(`missing subsystem - ${file.slice(7)}`);\n    renameSync(`docs/${file}`, `docs/${file.slice(7)}`);\n  }\n  else if (subsystems.includes(file)) {\n    renameSync(`docs/${file}`, `docs/fastly:${file}`);\n  }\n}\n\nconst versions = readdirSync('versioned_docs');\nfor (const version of versions) {\n  const files = readdirSync(`versioned_docs/${version}`);\n  for (const file of files) {\n    if (direction === 'remove-prefix' && file.startsWith('fastly:')) {\n      if (!subsystems.includes(file.slice(7)))\n        console.error(`missing subsystem - ${file.slice(7)}`);\n      renameSync(`versioned_docs/${version}/${file}`, `versioned_docs/${version}/${file.slice(7)}`);\n    }\n    else if (subsystems.includes(file)) {\n      renameSync(`versioned_docs/${version}/${file}`, `versioned_docs/${version}/fastly:${file}`);\n    }\n  }\n}\n\nif (direction === 'remove-prefix')\n  console.log('Renamed docs to remove prefix (for committing to git)');\nelse\n  console.log('Renamed docs for building with fastly: prefix');\n"
  },
  {
    "path": "documentation/sidebars.js",
    "content": "/**\n * Creating a sidebar enables you to:\n - create an ordered group of docs\n - render a sidebar for each doc of that group\n - provide next/previous navigation\n\n The sidebars can be generated from the filesystem, or explicitly defined here.\n\n Create as many sidebars as you want.\n */\n\n// @ts-check\n\n/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */\nconst sidebars = {\n  // By default, Docusaurus generates a sidebar from the docs folder structure\n  sidebar: [{type: 'autogenerated', dirName: '.'}],\n\n  // But you can create a sidebar manually\n  /*\n  sidebar: [\n    'intro',\n    'hello',\n    {\n      type: 'category',\n      label: 'Tutorial',\n      items: ['tutorial-basics/create-a-document'],\n    },\n  ],\n   */\n};\n\nmodule.exports = sidebars;\n"
  },
  {
    "path": "documentation/src/components/HomepageFeatures/index.js",
    "content": "import React from 'react';\nimport clsx from 'clsx';\nimport styles from './styles.module.css';\n\nconst FeatureList = [\n  {\n    title: 'Service Worker API',\n    description: (\n      <>\n      Applications are written using the same Service Worker API that is used for browsers. Aiming to make it simpler to re-use code across different environments.\n      </>\n    ),\n  },\n  {\n    title: 'Powered by SpiderMonkey',\n    description: (\n      <>\n      Built using the same secure, well-tested, standards-compliant JavaScript engine which powers Mozilla's Firefox.\n      </>\n    ),\n  },\n  {\n    title: 'Open source',\n    description: (\n      <>\n        Want to see behind the curtains?<br/><a href=\"https://github.com/fastly/js-compute-runtime\">View the GitHub Repository</a>.<br/>Your contributions are welcomed and appreciated.\n      </>\n    ),\n  },\n];\n\nfunction Feature({Svg, title, description}) {\n  return (\n    <div className={clsx('col col--4')}>\n      <div className=\"text--center\">\n      </div>\n      <div className=\"text--center padding-horiz--md\">\n        <h3>{title}</h3>\n        <p>{description}</p>\n      </div>\n    </div>\n  );\n}\n\nexport default function HomepageFeatures() {\n  return (\n    <section className={styles.features}>\n      <div className=\"container\">\n        <div className=\"row\">\n          {FeatureList.map((props, idx) => (\n            <Feature key={idx} {...props} />\n          ))}\n        </div>\n      </div>\n    </section>\n  );\n}\n"
  },
  {
    "path": "documentation/src/components/HomepageFeatures/styles.module.css",
    "content": ".features {\n  display: flex;\n  align-items: center;\n  padding: 2rem 0;\n  width: 100%;\n}\n\n"
  },
  {
    "path": "documentation/src/components/fiddle/index.js",
    "content": "import React, { useState, useEffect } from \"react\";\n\nfunction hexString(buffer) {\n    return [...(new Uint8Array(buffer))].map(val => val.toString(16).padStart(2, '0')).join('');\n}\n\nfunction compat(data) {\n    if (!('requests' in data) || ('reqUrl' in data)) {\n        const {\n            reqUrl, reqMethod, reqHeaders, reqBody, purgeFirst, enableCluster, enableShield, useH2, requests, ...retainedProps\n        } = data;\n        purgeFirst; // Discard this\n        return {\n            ...retainedProps,\n            requests: (requests || []).concat({\n                path: reqUrl,\n                method: reqMethod,\n                headers: reqHeaders,\n                body: reqBody,\n                enableCluster,\n                enableShield,\n                enableWAF: false,\n                connType: useH2 ? 'h2' : 'h1'\n            })\n        };\n    } else if ('requests' in data && data.requests[0] && 'useH2' in data.requests[0]) {\n        const {\n            requests, ...retainedProps\n        } = data;\n        return {\n            ...retainedProps,\n            requests: requests.map(({\n                useH2, ...retainedProps2\n            }) => ({\n                ...retainedProps2,\n                connType: useH2 ? 'h2' : 'h1'\n            }))\n        };\n    } else {\n        return data;\n    }\n}\n\nasync function getFrameUrl(config) {\n    let data = compat(config);\n\n    const hashInp = JSON.stringify(data);\n    const hashInpBuf = (new TextEncoder()).encode(hashInp);\n    const hash = await globalThis.crypto.subtle.digest('SHA-256', hashInpBuf);\n    const immutID = 'x' + hexString(hash).substr(0, 7);\n    const fiddleHost = 'https://fiddle.fastly.dev';\n    const fiddleCheck = await fetch(fiddleHost + '/fiddle/' + immutID, {\n        headers: {\n            Accept: 'application/json'\n        }\n    });\n    if (fiddleCheck.ok) {\n        return fiddleHost + '/fiddle/' + immutID + '/embedded';\n    }\n\n    const createRes = await fetch(fiddleHost + '/fiddle', {\n        method: 'POST',\n        body: JSON.stringify({\n            ...data,\n            immutable: true\n        }),\n        headers: {\n            'Content-Type': 'application/json',\n            'Accept': 'application/json'\n        }\n    });\n    const createData = await createRes.json();\n    if (createData.fiddle) {\n        return fiddleHost + '/fiddle/' + createData.fiddle.id + '/embedded';\n    }\n    return false;\n}\n\nlet idx = 0;\n\nexport function Fiddle({config, children}) {\n    const [frameUrl, setFrameUrl] = useState(null);\n\n    async function fetchFrameUrl(config) {\n        setFrameUrl(await getFrameUrl(config));\n    }\n    \n    useEffect(() => {\n        fetchFrameUrl(config);\n    }, [config]);\n    \n    if (!frameUrl) {\n        return <>{children}</>\n    }\n    \n    const embedID = 'embed-' + idx;\n    idx += 1;\n    const queryParams = [`embedID=${embedID}`];\n    const src = `${frameUrl}?${queryParams.join('&')}`;\n    return <div id={embedID} className=\"fiddle\" data-state='loaded'>\n        <iframe aria-hidden className='fiddle-frame' src={src}></iframe>\n        <div aria-hidden className='fiddle-loader'>Loading example code...</div>\n    </div>;\n}\n"
  },
  {
    "path": "documentation/src/css/custom.css",
    "content": "/**\n * Any CSS included here will be global. The classic template\n * bundles Infima by default. Infima is a CSS framework designed to\n * work well for content-centric websites.\n */\n\n/* You can override the default Infima variables here. */\n:root {\n  --ifm-color-primary: rgba(46, 133, 85, 1.0);\n  --ifm-color-primary-dark: rgba(41, 120, 76, 1.0);\n  --ifm-color-primary-darker: rgba(39, 113, 72, 1.0);\n  --ifm-color-primary-darkest: rgba(32, 93, 59, 1.0);\n  --ifm-color-primary-light: rgba(51, 146, 93, 1.0);\n  --ifm-color-primary-lighter: rgba(53, 153, 98, 1.0);\n  --ifm-color-primary-lightest: rgba(60, 173, 110, 1.0);\n  --ifm-code-font-size: 95%;\n  --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);\n}\n\n/* For readability concerns, you should choose a lighter palette in dark mode. */\n[data-theme='dark'] {\n  --ifm-color-primary: rgb(38, 194, 160);\n  --ifm-color-primary-dark: hsl(167, 68%, 41%);\n  --ifm-color-primary-darker: hsl(167, 68%, 38%);\n  --ifm-color-primary-darkest: hsl(167, 68%, 32%);\n  --ifm-color-primary-light: hsl(167, 68%, 50%);\n  --ifm-color-primary-lighter: hsl(167, 68%, 52%);\n  --ifm-color-primary-lightest: hsl(167, 68%, 59%);\n  --docusaurus-highlighted-code-line-bg: hsla(0, 0%, 0%, 0.3);\n\n  --ifm-color-content: var(--ifm-color-emphasis-900);\n  --ifm-color-content-inverse: var(--ifm-color-white);\n  --ifm-color-content-secondary: #525860;\n\n  --ifm-background-color: transparent;\n  /* Body's background. */\n  --ifm-background-surface-color: var(--ifm-color-content-inverse);\n  --ifm-global-border-width: 1px;\n  --ifm-global-radius: 0.4rem;\n  --aa-muted-color-rgb: 38, 194, 160 !important;\n\n  --aa-icon-color-rgb: 38, 194, 160 !important;\n  --aa-text-color-rgb: 38, 194, 160 !important;\n  --aa-primary-color-rgb: 38, 194, 160 !important;\n  --aa-muted-color-rgb: 38, 194, 160 !important;\n  --aa-panel-border-color-rgb: 38, 194, 160 !important;\n  --aa-input-border-color-rgb: 38, 194, 160 !important;\n  --aa-background-color-rgb: 255, 255, 255;\n  --aa-input-background-color-rgb: 255, 255, 255;\n  --aa-selected-color-rgb: 179, 173, 214;\n  --aa-description-highlight-background-color-rgb: 245, 223, 77;\n  --aa-overlay-color-rgb: 115, 114, 129;\n  --aa-panel-shadow: 0 0 0 1px rgba(35, 38, 59, 0.1), 0 6px 16px -4px rgba(35, 38, 59, 0.15);\n  --aa-scrollbar-track-background-color-rgb: 234, 234, 234;\n  --aa-scrollbar-thumb-background-color-rgb: var(--aa-background-color-rgb);\n  --aa-scrollbar-thumb-background-color-alpha: 1;\n\n}\n\n.hero--primary {\n  --ifm-color-primary: hsl(199, 34%, 14%);\n}\n\n[data-theme='dark'] .navbar {\n  --ifm-navbar-background-color: hsl(218, 19%, 23%);\n  --ifm-navbar-link-hover-color: var(--ifm-color-primary);\n  --ifm-menu-color-background-active: rgba(255, 255, 255, 0.05);\n  --ifm-navbar-search-input-color: var(--ifm-color-white);\n}\n\nhtml[data-theme='dark'] {\n  --ifm-background-color: hsl(199, 34%, 14%);\n}\n\n.footer__copyright {\n  font-size: 0.8em;\n}\n\n\n\n\n\n\n\n\n\n\n\n\n.fiddle {\n  min-height: 30px;\n\n  max-height: 400px;\n  position: relative;\n  background: #f0f0f0;\n  margin: 1em 0;\n\n  height: 30px;\n}\n\n.fiddle>* {\n  border: 0;\n  position: absolute;\n  width: 100%;\n  height: 100%;\n  top: 0;\n  left: 0;\n  box-sizing: border-box;\n  opacity: 0;\n  transition: opacity 0.5s;\n  pointer-events: none;\n  overflow: hidden;\n}\n\n.fiddle .fiddle-loader {\n  display: flex;\n  justify-content: left;\n  align-items: center;\n  padding-left: 20px\n}\n\n.fiddle .fiddle-fallback {\n  border-radius: 3px;\n  padding: 10px;\n  border: 1px solid #bbb;\n  background: white;\n  top: auto;\n  left: -3000px;\n  max-width: 2000px;\n}\n\n.fiddle .fiddle-fallback h3 {\n  font: bold 16px sans-serif;\n  margin: 0 0 4px 0;\n}\n\n.fiddle .fiddle-fallback pre {\n  margin: 0 0 12px 0;\n}\n\n.fiddle[data-state=loading] .fiddle-loader,\n.fiddle[data-state=loaded] .fiddle-frame,\n.fiddle[data-state=fallback] .fiddle-fallback {\n  opacity: 1;\n  pointer-events: auto;\n  overflow: hidden;\n}\n\n.fiddle[data-state=fallback] .fiddle-fallback {\n  position: static;\n}\n\n.fiddle[data-state=fallback] {\n  height: auto !important;\n  max-height: none;\n  min-height: 0;\n}\n\n@media print {\n  html .fiddle {\n    height: auto !important;\n    max-height: none;\n    min-height: 0;\n  }\n\n  html .fiddle .fiddle-fallback {\n    opacity: 1;\n    position: static;\n  }\n\n  html .fiddle .fiddle-loader,\n  html .fiddle .fiddle-frame {\n    display: none\n  }\n}"
  },
  {
    "path": "documentation/src/pages/index.js",
    "content": "import React from 'react';\nimport clsx from 'clsx';\nimport Link from '@docusaurus/Link';\nimport useDocusaurusContext from '@docusaurus/useDocusaurusContext';\nimport Layout from '@theme/Layout';\nimport HomepageFeatures from '@site/src/components/HomepageFeatures';\n\nimport styles from './index.module.css';\n\nfunction HomepageHeader() {\n  const {siteConfig} = useDocusaurusContext();\n  return (\n    <header className={clsx('hero hero--primary', styles.heroBanner)}>\n      <div className=\"container\">\n        <h1 className=\"hero__title\">{siteConfig.title}</h1>\n        <p className=\"hero__subtitle\">{siteConfig.tagline}</p>\n        <div className={styles.buttons}>\n          <Link\n            className=\"button button--secondary button--lg\"\n            to=\"/docs/\">\n            View Documentation\n          </Link>\n        </div>\n      </div>\n    </header>\n  );\n}\n\nexport default function Home() {\n  const {siteConfig} = useDocusaurusContext();\n  return (\n    <Layout\n      title={`Hello from ${siteConfig.title}`}\n      description=\"Description will go into a meta tag in <head />\">\n      <HomepageHeader />\n      <main>\n        <HomepageFeatures />\n      </main>\n    </Layout>\n  );\n}\n"
  },
  {
    "path": "documentation/src/pages/index.module.css",
    "content": "/**\n * CSS files with the .module.css suffix will be treated as CSS modules\n * and scoped locally.\n */\n\n.heroBanner {\n  padding: 4rem 0;\n  text-align: center;\n  position: relative;\n  overflow: hidden;\n}\n\n@media screen and (max-width: 996px) {\n  .heroBanner {\n    padding: 2rem;\n  }\n}\n\n.buttons {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n}\n"
  },
  {
    "path": "documentation/src/theme/MDXComponents.js",
    "content": "import React from 'react';\nimport MDXComponents from '@theme-original/MDXComponents';\nimport {Fiddle} from '@site/src/components/fiddle';\n\nexport default {\n  ...MDXComponents,\n  Fiddle,\n};\n"
  },
  {
    "path": "documentation/static/fiddle.js",
    "content": "window.addEventListener('message', function postMessageHandler(e) {\n    const fiddleEl = document.getElementById(e.data.embedID);\n    if (fiddleEl && e.data.event === 'resize' && fiddleEl.offsetHeight < e.data.contentHeight) {\n        fiddleEl.style.height = e.data.contentHeight + 'px';\n    }\n});\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/backend/Backend/Backend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\nimport {Fiddle} from '@site/src/components/fiddle';\n\n# `Backend()`\n\nThe **`Backend` constructor** lets you dynamically create new [Fastly Backends](https://developer.fastly.com/reference/api/services/backend/) for your Fastly Compute service.\n\nDynamically creating new [Fastly Backends](https://developer.fastly.com/reference/api/services/backend/) is disabled by default for Fastly Services. Please contact [Fastly Support](https://support.fastly.com/hc/requests/new?ticket_form_id=360000269711) to request the feature be enabled on the Fastly Services which require Dynamic Backends.\n\nBy default, Dynamic Backends are disabled within a JavaScript application as it can be a potential avenue for third-party JavaScript code to send requests, potentially including sensitive/secret data, off to destinations that the JavaScript project was not intending, which could be a security issue.\n\nTo enable Dynamic Backends the application will need to explicitly allow Dynamic Backends via:\n\n```js\nimport { allowDynamicBackends } from \"fastly:experimental\";\nallowDynamicBackends(true);\n```\n\n**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew Backend(backendConfiguration)\n```\n\n> **Note:** `Backend()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `backendConfiguration`\n\n  - : An Object which contains all the configuration options to apply to the newly created Backend.\n\n    - `name` _: string_\n      - The name of the backend.\n      - The name has to be between 1 and 254 characters inclusive.\n      - The name can be whatever you would like, as long as it does not match the name of any of the static service backends nor match any other dynamic backends built during a single execution of the application.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n    - `target` _: string_\n      - A hostname, IPv4, or IPv6 address for the backend as well as an optional port.\n      - The target has to be at-least 1 character.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. Is null, undefined, an empty string, not a valid IP address or host, or is the string `::`\n    - `hostOverride` _: string_ _**optional**_\n      - If set, will force the HTTP Host header on connections to this backend to be the supplied value.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `connectTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for a connection to this backend to be established.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `firstByteTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `betweenBytesTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend.\n      - If exceeded, the response received so far will be considered complete and the fetch will end.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `useSSL` _: boolean_ _**optional**_\n      - Whether or not to require TLS for connections to this backend.\n    - `tlsMinVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Minimum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `tlsMaxVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Maximum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `certificateHostname` _: string_ _**optional**_\n      - Define the hostname that the server certificate should declare.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `caCertificate` _: string_ _**optional**_\n      - The CA certificate to use when checking the validity of the backend.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `ciphers` _: string_ _**optional**_\n      - List of OpenSSL ciphers to support for connections to this origin.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - [List of ciphers supported by Fastly](https://developer.fastly.com/learning/concepts/routing-traffic-to-fastly/#use-a-tls-configuration).\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `sniHostname` _: string_ _**optional**_\n      - The SNI hostname to use on connections to this backend.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n\n### Return value\n\nA new `Backend` object.\n\n## Examples\n\nIn this example an implicit Dynamic Backend is created when making the fetch request to [https://www.fastly.com/](https://www.fastly.com/) and the response is then returned to the client.\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Implicit Dynamic Backend Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nallowDynamicBackends(true);\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  return fetch('https://www.fastly.com/');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nallowDynamicBackends(true);\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  return fetch('https://www.fastly.com/');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>\n\nIn this example an explicit Dynamic Backend is created and supplied to the fetch request, the response is then returned to the client.\n\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Explicit Dynamic Backend Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nimport { Backend } from \"fastly:backend\";\nallowDynamicBackends(true);\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\",\n    connectTimeout: 1000,\n    firstByteTimeout: 15000,\n    betweenBytesTimeout: 10000,\n    useSSL: true,\n    sslMinVersion: 1.3,\n    sslMaxVersion: 1.3,\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nimport { Backend } from \"fastly:backend\";\nallowDynamicBackends(true);\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\",\n    connectTimeout: 1000,\n    firstByteTimeout: 15000,\n    betweenBytesTimeout: 10000,\n    useSSL: true,\n    sslMinVersion: 1.3,\n    sslMaxVersion: 1.3,\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/backend/Backend/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\nimport {Fiddle} from '@site/src/components/fiddle';\n\n# toString\n\nThe **`toString()`** method returns a string representing the specified Backend value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified Backend value.\n\n## Description\n\nThe [Backend](../Backend.mdx) object overrides the `toString()` method of [Object](../../../globals//Object/Object.mdx); it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For [Backend](../Backend.mdx) values, the `toString` method returns the name given to the [Backend](../Backend.mdx) object during construction.\n\nThe `toString()` method requires its `this` value to be a [Backend](../Backend.mdx) object.\n\nIf the `this` value does not inherit from `Backend.prototype`, a [TypeError](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n## Examples\n\n### Using toString()\n\nThe following example logs the string value of a [Backend](../Backend.mdx) object:\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Backend.prototype.toString Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\\\"@fastly/js-compute\\\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.toString()); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.toString()); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/cache-override/CacheOverride/CacheOverride.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\nimport {Fiddle} from '@site/src/components/fiddle';\n\n# `CacheOverride()`\n\nThe **`CacheOverride` constructor** lets you configure the caching behavior of a `Response`.\n\nNormally, the HTTP Headers on a [`Response`](../../globals/Response/Response.mdx) would control how the [`Response`](../../globals/Response/Response.mdx) is cached,\nbut `CacheOverride` can be set on a [`Request`](../../globals/Request/Request.mdx), to define custom caching behavior.\n\n## Syntax\n\n```js\nnew CacheOverride(mode)\nnew CacheOverride(mode, init)\n```\n\n> **Note:** `CacheOverride()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `mode` _: string_\n  - Sets the cache override mode for a request\n  - If set to:\n    - `\"none\"`: Do not override the behavior specified in the origin response’s cache control headers.\n    - `\"pass\"`: Do not cache the response to this request, regardless of the origin response’s headers.\n    - `\"override\"`: Override particular cache control settings using the `CacheOverride` object's settings.\n\n- `init`\n\n  - : An Object which contains all the configuration options to apply to the newly created `CacheOverride`.\n\n    - `pci` _: boolean_ _**optional**_\n      - Override the caching behavior of this request to enable or disable PCI/HIPAA-compliant non-volatile caching.\n      - By default, this is `false`, which means the request may not be PCI/HIPAA-compliant. Set it to `true` to enable compliant caching.\n      - See the [Fastly PCI-Compliant Caching and Delivery documentation](https://docs.fastly.com/products/pci-compliant-caching-and-delivery) for details.\n\n    - `surrogateKey` _: string_ _**optional**_\n      - Override the caching behavior of this request to include the given surrogate key, provided as a header value.\n      - See the [Fastly surrogate keys guide](https://docs.fastly.com/en/guides/purging-api-cache-with-surrogate-keys) for details.\n    - `swr` _: number_ _**optional**_\n      - Override the caching behavior of this request to use the given `stale-while-revalidate` time, in seconds\n\n    - `ttl` _: number_ _**optional**_\n      - Override the caching behavior of this request to use the given Time to Live (TTL), in seconds.\n\n### Return value\n\nA new `CacheOverride` object.\n\n## Examples\n\nIn this example we override the cache for all the requests prefixed /static/ to have a long TTL (Time To Live),  and the home page to have a short TTL and a long SWR (Stale While Revalidate).\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"CacheOverride Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { CacheOverride } from \"fastly:cache-override\";\n// In this example we override the cache for all the requests prefixed /static/ \n// to have a long TTL (Time To Live), and the home page to have a short TTL and \n// a long SWR (Stale While Revalidate).\nasync function app (event) {\n  const path = (new URL(event.request.url)).pathname;\n  let cacheOverride;\n  if (path == '/') {\n    cacheOverride = new CacheOverride('override', {ttl: 10, swr: 86_400});\n  } else if (path.startsWith('/static/')) {\n    cacheOverride = new CacheOverride('override', {ttl: 86_400});\n  } else {\n    cacheOverride = new CacheOverride('none')\n  }\n  return fetch(event.request.url, {\n    cacheOverride,\n    backend: 'origin_0'\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { CacheOverride } from \"fastly:cache-override\";\n// In this example we override the cache for all the requests prefixed /static/ \n// to have a long TTL (Time To Live), and the home page to have a short TTL and \n// a long SWR (Stale While Revalidate).\nasync function app (event) {\n  const path = (new URL(event.request.url)).pathname;\n  let cacheOverride;\n  if (path == '/') {\n    cacheOverride = new CacheOverride('override', {ttl: 10, swr: 86_400});\n  } else if (path.startsWith('/static/')) {\n    cacheOverride = new CacheOverride('override', {ttl: 86_400});\n  } else {\n    cacheOverride = new CacheOverride('none')\n  }\n  return fetch(event.request.url, {\n    cacheOverride,\n    backend: 'origin_0'\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/config-store/ConfigStore/ConfigStore.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\nimport {Fiddle} from '@site/src/components/fiddle';\n\n# `ConfigStore()`\n\nThe **`ConfigStore` constructor** lets you access a specific [Fastly Edge Dictionary](https://docs.fastly.com/en/guides/about-edge-dictionaries).\n\n> **Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew ConfigStore(name);\n```\n\n> **Note:** `ConfigStore()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - The name of the [Fastly Edge Dictionary](https://docs.fastly.com/en/guides/about-edge-dictionaries) that this `ConfigStore` instance should provide access to.\n\n### Return value\n\nA new `ConfigStore` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Config Store exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name does not start with an ascii alphabetical character \n  - Thrown if the provided name does not contain only ascii alphanumeric, underscore, and whitespace characters\n\n## Examples\n\nIn this example we have an Edge Dictionary named \"animals\" and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"ConfigStore Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/config-store/ConfigStore/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\nimport {Fiddle} from '@site/src/components/fiddle';\n\n# ConfigStore.prototype.get\n\nThe **`get()`** method returns the value associated with the provided key in the config-store. If the provided key does not exist in the ConfigStore then this returns `null`.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from the dictionary.\n\n### Return value\n\nA `string` representing the specified ConfigStore value or `null` if the key does not exist in the ConfigStore\n\n## Description\n\nGet a value for a key in the config-store. If the provided key does not exist in the ConfigStore then this returns `null`.\n\nThe `get()` method requires its `this` value to be a [`ConfigStore`](../../../fastly%3Aconfig-store/ConfigStore/ConfigStore.mdx) object.\n\nIf the `this` value does not inherit from `ConfigStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided key is longer than 255 in length\n  - Thrown if the provided key is an empty string\n\n## Examples\n\nIn this example we have an Edge Dictionary named \"animals\" and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"ConfigStore Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/dictionary/Dictionary/Dictionary.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\nimport {Fiddle} from '@site/src/components/fiddle';\n\n# `Dictionary()`\n\n:::info\n\nThis Class is deprecated, it has been renamed to [`ConfigStore`](../../fastly:config-store/ConfigStore/ConfigStore.mdx) and can be imported via `import { ConfigStore } from 'fastly:config-store'`\n\n:::\n\nThe **`Dictionary` constructor** lets you access a specific [Fastly Edge Dictionary](https://docs.fastly.com/en/guides/about-edge-dictionaries).\n\n**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew Dictionary(name);\n```\n\n> **Note:** `Dictionary()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - The name of the [Fastly Edge Dictionary](https://docs.fastly.com/en/guides/about-edge-dictionaries) that this `Dictionary` instance should provide access to.\n\n### Return value\n\nA new `Dictionary` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Dictionary exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name does not start with an ascii alphabetical character \n  - Thrown if the provided name does not contain only ascii alphanumeric, underscore, and whitespace characters\n\n## Examples\n\nIn this example we have an Edge Dictionary named \"animals\" and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Dictionary Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/dictionary/Dictionary/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\nimport {Fiddle} from '@site/src/components/fiddle';\n\n# Dictionary.prototype.get\n\n:::info\n\nThis Class is deprecated, it has been renamed to [`ConfigStore`](../../../fastly:config-store/ConfigStore/ConfigStore.mdx) and can be imported via `import { ConfigStore } from 'fastly:config-store'`\n\nThe `get()` method exists on the [`ConfigStore`](../../../fastly:config-store/ConfigStore/ConfigStore.mdx) Class.\n\n:::\n\nThe **`get()`** method returns the value associated with the provided key in the dictionary. If the provided key does not exist in the Dictionary then this returns `null`.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from the dictionary.\n\n### Return value\n\nA `string` representing the specified Dictionary value or `null` if the key does not exist in the Dictionary\n\n## Description\n\nGet a value for a key in the dictionary. If the provided key does not exist in the Dictionary then this returns `null`.\n\nThe `get()` method requires its `this` value to be a [`Dictionary`](../Dictionary.mdx) object.\n\nIf the `this` value does not inherit from `Dictionary.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided key is longer than 255 in length\n  - Thrown if the provided key is an empty string\n\n## Examples\n\nIn this example we have an Edge Dictionary named \"animals\" and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Dictionary Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/env/env.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\nimport {Fiddle} from '@site/src/components/fiddle';\n\n# env\n\nThe **`env()`** function returns the value for the provided environment variable name.\n\nFor a list of available environment variables, see the [Fastly Developer Hub for Compute Environment Variables](https://developer.fastly.com/reference/compute/ecp-env/)\n\n>**Note**: The environment variables can only be retrieved when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nenv(name)\n```\n\n### Parameters\n\n- `name` _: string_\n  - The name of the environment variable to retrieve\n\n### Return value\n\nThe value for the requested environment variable, if no such environment variable exists then an empty string is returned.\n\n## Examples\n\nIn this example we log to stdout the environment variables [`FASTLY_HOSTNAME`](https://developer.fastly.com/reference/compute/ecp-env/fastly-hostname/) and [`FASTLY_TRACE_ID`](https://developer.fastly.com/reference/compute/ecp-env/fastly-trace-id/).\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"env Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { env } from \"fastly:env\";\nfunction app(event) {\n  console.log(\"FASTLY_HOSTNAME:\", env(\"FASTLY_HOSTNAME\"));\n  console.log(\"FASTLY_TRACE_ID:\", env(\"FASTLY_TRACE_ID\"));\n  return new Response(\"\", {\n    status: 200\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { env } from \"fastly:env\";\nfunction app(event) {\n  console.log(\"FASTLY_HOSTNAME:\", env(\"FASTLY_HOSTNAME\"));\n  console.log(\"FASTLY_TRACE_ID:\", env(\"FASTLY_TRACE_ID\"));\n  return new Response(\"\", {\n    status: 200\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/experimental/allowDynamicBackends.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\nimport {Fiddle} from '@site/src/components/fiddle';\n\n# allowDynamicBackends\n\nThe **`allowDynamicBackends()`** function is used to control whether or not Dynamic Backends should be allowed within this Fastly Compute Service.\n\nBy default, Dynamic Backends are disabled within a JavaScript application as it can be a potential avenue for third-party JavaScript code to send requests, potentially including sensitive/secret data,  off to destinations that the JavaScript project was not intending, which could be a security issue.\n\n>**Note**: This feature is in disabled by default for Fastly Services. Please contact [Fastly Support](https://support.fastly.com/hc/requests/new?ticket_form_id=360000269711) to request the feature be enabled on the Fastly Services which require Dynamic Backends.\n\n## Syntax\n\n```js\nallowDynamicBackends(enabled)\n```\n\n### Parameters\n\n- `enabled` _: boolean_\n  - Whether or not to allow Dynamic Backends\n\n### Return value\n\n`undefined`.\n\n## Examples\n\nIn this example an implicit Dynamic Backend is created when making the fetch request to [https://www.fastly.com/](https://www.fastly.com/) and the response is then returned to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Dynamic Backends Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nallowDynamicBackends(true);\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  return fetch('https://www.fastly.com/');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nallowDynamicBackends(true);\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  return fetch('https://www.fastly.com/');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/experimental/includeBytes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# includeBytes\n\nThe **`includeBytes()`** function is used embed a file as a Uint8Array.\n\n>**Note**: Can only be used during build-time initialization, not when processing requests.\n\n## Syntax\n\n```js\nincludeBytes(path)\n```\n\n### Parameters\n\n- `path` _: string_\n  - The path to include, relative to the Fastly Compute application's top-level directory during build-time initialization.\n\n### Return value\n\nReturns a `Uint8Array`\n\n## Examples\n\nIn this example we include the README.md file as a Uint8Array and use it for the body in the response we return to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { includeBytes } from \"fastly:experimental\";\nconst readme = includeBytes('README.md');\nasync function app() {\n    return new Response(readme);\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/fanout/createFanoutHandoff.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# createFanoutHandoff\n\nThe **`createFanoutHandoff()`** function creates a Response instance which informs Fastly to pass the original Request through Fanout, to the declared backend.\n\n## Syntax\n\n```js\ncreateFanoutHandoff(request, backend)\n```\n\n### Parameters\n\n- `request` _: Request_\n  - The request to pass through Fanout.\n- `backend` _: string_\n  - The name of the backend that Fanout should send the request to.\n  - The name has to be between 1 and 254 characters inclusive.\n  - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n\n### Return value\n\nA Response instance is returned, which can then be used via `event.respondWith`.\n\n## Examples\n\nIn this example application requests to the path `/stream` and sent handled via Fanout.\n\n```js\nimport { createFanoutHandoff } from \"fastly:fanout\";\n\nasync function handleRequest(event) {\n  try {\n    const url = new URL(event.request.url);\n    if (url.pathname === '/stream') {\n      return createFanoutHandoff(event.request, 'fanout');\n    } else {\n      return new Response('oopsie, make a request to /stream for some fanout goodies', { status: 404 });\n    }\n  } catch (error) {\n    console.error({error});\n    return new Response(error.message, {status:500})\n  }\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/geolocation/getGeolocationForIpAddress.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\nimport {Fiddle} from '@site/src/components/fiddle';\n\n# getGeolocationForIpAddress\n\nThe **`getGeolocationForIpAddress()`** function is used to retrieve geolocation information about the given IP address.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\ngetGeolocationForIpAddress(address)\n```\n\n### Parameters\n\n- `address` _: string_\n  - The IPv4 or IPv6 address to query.\n\n### Return value\n\nReturns an `Object` which contains information about the given IP address with the following properties:\n\n- `as_name`  _: string | null_\n  - The name of the organization associated with `as_number`.\n  - For example, fastly is the value given for IP addresses under AS-54113.\n\n- `as_number` _: number | null_\n  - [Autonomous system](https://en.wikipedia.org/wiki/Autonomous_system_(Internet)) (AS) number.\n\n- `area_code` _: number | null_\n  - The telephone area code associated with an IP address.\n  - These are only available for IP addresses in the United States, its territories, and Canada.\n\n- `city` _: string | null_\n  - City or town name.\n\n- `conn_speed` _: string | null_\n  - Connection speed.\n\n- `conn_type` _: string | null_\n  - Connection type.\n\n- `continent` _: string | null_\n  - Continent.\n\n- `country_code` _: string | null_\n  - A two-character [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) country code for the country associated with an IP address.\n  - The US country code is returned for IP addresses associated with overseas United States military bases.\n  - These values include subdivisions that are assigned their own country codes in ISO 3166-1. For example, subdivisions NO-21 and NO-22 are presented with the country code SJ for Svalbard and the Jan Mayen Islands.\n\n- `country_code3` _: string | null_\n  - A three-character [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) country code for the country associated with the IP address.\n  - The USA country code is returned for IP addresses associated with overseas United States military bases.\n\n- `country_name` _: string | null_\n  - Country name.\n  - This field is the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) English short name for a country.\n\n- `gmt_offset` _: string | null_\n  - Time zone offset from Greenwich Mean Time (GMT) for `city`.\n\n- `latitude` _: number | null_\n  - Latitude, in units of degrees from the equator.\n  - Values range from -90.0 to +90.0 inclusive, and are based on the [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System) coordinate reference system.\n\n- `longitude` _: number | null_\n  - Longitude, in units of degrees from the [IERS Reference Meridian](https://en.wikipedia.org/wiki/IERS_Reference_Meridian).\n  - Values range from -180.0 to +180.0 inclusive, and are based on the [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System) coordinate reference system.\n\n- `metro_code` _: number | null_\n  - Metro code, representing designated market areas (DMAs) in the United States.\n\n- `postal_code` _: string | null_\n  - The postal code associated with the IP address.\n  - These are available for some IP addresses in Australia, Canada, France, Germany, Italy, Spain, Switzerland, the United Kingdom, and the United States.\n  - For Canadian postal codes, this is the first 3 characters. For the United Kingdom, this is the first 2-4 characters (outward code). For countries with alphanumeric postal codes, this field is a lowercase transliteration.\n\n- `proxy_description` _: string | null_\n  - Client proxy description.\n\n- `proxy_type` _: string | null_\n  - Client proxy type.\n\n- `region` _: string | null_\n  - [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) country subdivision code.\n  - For countries with multiple levels of subdivision (for example, nations within the United Kingdom), this variable gives the more specific subdivision.\n  - This field can be None for countries that do not have ISO country subdivision codes. For example, None is given for IP addresses assigned to the Åland Islands (country code AX, illustrated below).\n\n- `utc_offset` _: number | null;_\n  - Time zone offset from coordinated universal time (UTC) for `city`.\n\n## Examples\n\nIn this example we return the geolocation details for the provided ip querystring parameter or for the incoming client request if the querystring parameter does not exist.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"getGeolocationForIpAddress Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { getGeolocationForIpAddress } from \"fastly:geolocation\"\nasync function app(event) {\n  try {\n    let ip = new URL(event.request.url).searchParams.get('ip') || event.client.address\n    let geo = getGeolocationForIpAddress(ip);\n    return new Response(JSON.stringify(geo), {\n      headers: {\n        \"Content-Type\": \"application/json\",\n      },\n    });\n  } catch (error) {\n    console.error(error);\n    return new Response(\"Internal Server Error\", {\n      status: 500\n    });\n  }\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { getGeolocationForIpAddress } from \"fastly:geolocation\"\nasync function app(event) {\n  try {\n    let ip = new URL(event.request.url).searchParams.get('ip') || event.client.address\n    let geo = getGeolocationForIpAddress(ip);\n    return new Response(JSON.stringify(geo), {\n      headers: {\n        \"Content-Type\": \"application/json\",\n      },\n    });\n  } catch (error) {\n    console.error(error);\n    return new Response(\"Internal Server Error\", {\n      status: 500\n    });\n  }\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/AggregrateError/AggregrateError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# AggregateError()\n\nThe **`AggregateError()`** constructor creates an error for several errors that need to be wrapped in a single error.\n\n## Syntax\n\n```js\nnew AggregateError(errors)\nnew AggregateError(errors, message)\nnew AggregateError(errors, message, options)\n\nAggregateError(errors)\nAggregateError(errors, message)\nAggregateError(errors, message, options)\n```\n\n> **Note:** `AggregateError()` can be called with or without `new`. Both create a new `AggregateError` instance.\n\n### Parameters\n\n- `errors`\n  - : An iterable of errors, may not actually be [`TypeError`](../Error/Error.mdx) instances.\n- `message` _**optional**_\n  - : An optional human-readable description of the aggregate error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Array/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array\\[Symbol.species]\n\nThe **`Array[Symbol.species]`** accessor property returns the constructor used to construct return values from array methods.\n\n> **Warning:** The existence of `[Symbol.species]` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Syntax\n\n```js\nArray[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get [Symbol.species]` was called. The return value is used to construct return values from array methods that create new arrays.\n\n## Description\n\nThe `[Symbol.species]` accessor property returns the default constructor for `Array` objects. Subclass constructors may override it to change the constructor assignment. The default implementation is basically:\n\n```js\n// Hypothetical underlying implementation for illustration\nclass Array {\n  static get [Symbol.species]() {\n    return this;\n  }\n}\n```\n\nBecause of this polymorphic implementation, `[Symbol.species]` of derived subclasses would also return the constructor itself by default.\n\n```js\nclass SubArray extends Array {}\nSubArray[Symbol.species] === SubArray; // true\n```\n\nWhen calling array methods that do not mutate the existing array but return a new array instance (for example, `filter()` and `map()`), the array's `constructor[Symbol.species]` will be accessed. The returned constructor will be used to construct the return value of the array method. This makes it technically possible to make array methods return objects unrelated to arrays.\n\n```js\nclass NotAnArray {\n  constructor(length) {\n    this.length = length;\n  }\n}\n\nconst arr = [0, 1, 2];\narr.constructor = { [Symbol.species]: NotAnArray };\narr.map((i) => i); // NotAnArray { '0': 0, '1': 1, '2': 2, length: 3 }\narr.filter((i) => i); // NotAnArray { '0': 1, '1': 2, length: 0 }\narr.concat([1, 2]); // NotAnArray { '0': 0, '1': 1, '2': 2, '3': 1, '4': 2, length: 5 }\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Array/Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array()\n\nThe **`Array()`** constructor is used to create `Array` objects.\n\n## Syntax\n\n```js\nnew Array(element0, element1, /* … ,*/ elementN)\nnew Array(arrayLength)\n\nArray(element0, element1, /* … ,*/ elementN)\nArray(arrayLength)\n```\n\n> **Note:** `Array()` can be called with or without `new`. Both create a new `Array` instance.\n\n### Parameters\n\n- `elementN`\n  - : A JavaScript array is initialized with the given elements, except in the case where\n    a single argument is passed to the `Array` constructor and that argument is\n    a number (see the `arrayLength` parameter below). Note that this special case only\n    applies to JavaScript arrays created with the `Array` constructor, not\n    array literals created with the bracket syntax.\n- `arrayLength`\n  - : If the only argument passed to the `Array` constructor is an integer\n    between 0 and 2<sup>32</sup> - 1 (inclusive), this returns a new JavaScript array with\n    its `length` property set to that number (**Note:** this\n    implies an array of `arrayLength` empty slots, not slots with actual\n    `undefined` values).\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if there's only one argument (`arrayLength`) and its value is not between 0 and 2<sup>32</sup> - 1 (inclusive).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Array/from.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.from\n\nThe **`Array.from()`** static method creates a new, shallow-copied `Array` instance from an iterable or array-like object.\n\n## Syntax\n\n```js\nArray.from(arrayLike)\n\n// Arrow function\nArray.from(arrayLike, (element) => { /* … */ })\nArray.from(arrayLike, (element, index) => { /* … */ })\n\n// Mapping function\nArray.from(arrayLike, mapFn)\nArray.from(arrayLike, mapFn, thisArg)\n\n// Inline mapping function\nArray.from(arrayLike, function (element) { /* … */ })\nArray.from(arrayLike, function (element, index) { /* … */ })\nArray.from(arrayLike, function (element) { /* … */ }, thisArg)\nArray.from(arrayLike, function (element, index) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `arrayLike`\n  - : An iterable or array-like object to convert to an array.\n- `mapFn` _**optional**_\n\n  - : Map function to call on every element of the array. If provided, every value to be added to the array is first passed through this function, and `mapFn`'s return value is added to the array instead.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `mapFn`.\n\n### Return value\n\nA new `Array` instance.\n\n## Description\n\n`Array.from()` lets you create `Array`s from:\n\n- [iterable objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) (objects such as [`Map`](../Map/Map.mdx) and [`Set`](../Set/Set.mdx); or, if the object is not iterable,\n- array-like objects (objects with a `length` property and indexed elements).\n\n`Array.from()` never creates a sparse array. If the `arrayLike` object is missing some index properties, they become `undefined` in the new array.\n\n`Array.from()` has an optional parameter `mapFn`, which allows you to execute a function on each element of the array being created, similar to [`Array.prototype.map()`](./prototype/map.mdx). More clearly, `Array.from(obj, mapFn, thisArg)` has the same result as `Array.from(obj).map(mapFn, thisArg)`, except that it does not create an intermediate array, and `mapFn` only receives two arguments (`element`, `index`) without the whole array, because the array is still under construction.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Array/isArray.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.isArray()\n\nThe **`Array.isArray()`** static method determines whether the passed value is an `Array`.\n\n## Syntax\n\n```js\nArray.isArray(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be checked.\n\n### Return value\n\n`true` if `value` is an `Array`; otherwise, `false`. `false` is always returned if `value` is a `TypedArray` instance.\n\n## Description\n\n`Array.isArray()` checks if the passed value is an `Array`. It does not check the value's prototype chain, nor does it rely on the `Array` constructor it is attached to. It returns `true` for any value that was created using the array literal syntax or the `Array` constructor. This makes it safe to use with cross-realm objects, where the identity of the `Array` constructor is different and would therefore cause `instanceof Array` to fail.\n\nSee the article [\"Determining with absolute accuracy whether or not a JavaScript object is an array\"](https://web.mit.edu/jwalden/www/isArray.html) for more details.\n\n`Array.isArray()` also rejects objects with `Array.prototype` in its prototype chain but aren't actual arrays, which `instanceof Array` would accept.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Array/of.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.of()\nThe **`Array.of()`** method creates a new `Array`\ninstance from a variable number of arguments, regardless of number or type of the\narguments.\n\n## Syntax\n\n```js\nArray.of(element0)\nArray.of(element0, element1)\nArray.of(element0, element1, /* … ,*/ elementN)\n```\n\n### Parameters\n\n- `elementN`\n  - : Elements used to create the array.\n\n### Return value\n\nA new `Array` instance.\n\n## Description\n\nThe difference between `Array.of()` and the [`Array()`](./Array.mdx) constructor is in the handling of single arguments: `Array.of(7)` creates an array with a single element, `7`, whereas `Array(7)` creates an empty array with a `length` property of `7`. (That implies an array of 7 empty slots, not slots with actual [`undefined`](../undefined.mdx) values.)\n\n```js\nArray.of(7); // [7]\nArray(7); // array of 7 empty slots\n\nArray.of(1, 2, 3); // [1, 2, 3]\nArray(1, 2, 3); // [1, 2, 3]\n```\n\nThe `Array.of()` method is a generic factory method. For example, if a subclass of `Array` inherits the `of()` method, the inherited `of()` method will return new instances of the subclass instead of `Array` instances. In fact, the `this` value can be any constructor function that accepts a single argument representing the length of the new array, and the constructor will be called with the number of arguments passed to `of()`. The final `length` will be set again when all elements are assigned. If the `this` value is not a constructor function, the plain `Array` constructor is used instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Array/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype\\[Symbol.iterator]()\n\nThe **`Symbol.iterator`** method of an `Array` object implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows arrays to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the value of each index in the array.\n\nThe initial value of this property is the same function object as the initial value of the [`Array.prototype.values`](./values.mdx) property.\n\n## Syntax\n\n```js\narray[Symbol.iterator]()\n```\n\n### Return value\n\nThe same return value as [`Array.prototype.values()`](./values.mdx): a new iterable iterator object that yields the value of each index in the array.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Array/prototype/@@unscopables.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype[Symbol.unscopables]\n\nThe **`@@unscopables`** data property of `Array.prototype` is shared by all `Array` instances. It contains property names that were not included in the ECMAScript standard prior to the ES2015 version and that are ignored for [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) statement-binding purposes.\n\n## Value\n\nA [`null`-prototype object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects) with property names given below and their values set to `true`.\n\n## Description\n\nThe default `Array` properties that are ignored for `with` statement-binding purposes are:\n\n- [`at()`](./at.mdx)\n- [`copyWithin()`](./copyWithin.mdx)\n- [`entries()`](./entries.mdx)\n- [`fill()`](./fill.mdx)\n- [`find()`](./find.mdx)\n- [`findIndex()`](./findIndex.mdx)\n- [`flat()`](./flat.mdx)\n- [`flatMap()`](./flatMap.mdx)\n- [`includes()`](./includes.mdx)\n- [`keys()`](./keys.mdx)\n- [`values()`](./values.mdx)\n\n`Array.prototype[@@unscopables]` is an empty object only containing all the above property names with the value `true`. Its [prototype is `null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects), so `Object.prototype` properties like [`toString`](../../Object/prototype/toString.mdx) won't accidentally be made unscopable, and a `toString()` within the `with` statement will continue to be called on the array.\n\nSee [`Symbol.unscopables`](../../Symbol/unscopables.mdx) for how to set unscopable properties for your own objects.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Array/prototype/at.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.at\n\nThe **`at()`** method takes an integer value and returns the item at that index, allowing for positive and negative integers. Negative integers count back from the last item in the array.\n\n## Syntax\n\n```js\nat(index)\n```\n\n### Parameters\n\n- `index`\n  - : Zero-based index of the array element to be returned, converted to an integer. Negative index counts back from the end of the array — if `index < 0`, `index + array.length` is accessed.\n\n### Return value\n\nThe element in the array matching the given index. Always returns [`undefined`](../../../globals/undefined.mdx) if `index < -array.length` or `index >= array.length` without attempting to access the corresponding property.\n\n## Description\n\nThe `at()` method is equivalent to the bracket notation when `index` is non-negative. For example, `array[0]` and `array.at(0)` both return the first item. However, when counting elements from the end of the array, you cannot use `array[-1]` like you may in Python or R, because all values inside the square brackets are treated literally as string properties, so you will end up reading `array[\"-1\"]`, which is just a normal string property instead of an array index.\n\nThe usual practice is to access [`Array.prototype.length`](./length.mdx) and calculate the index from that — for example, `array[array.length - 1]`. The `at()` method allows relative indexing, so this can be shortened to `array.at(-1)`.\n\nThe `at()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Array/prototype/concat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.concat\n\nThe **`concat()`** method is used to merge two or more arrays.\nThis method does not change the existing arrays, but instead returns a new array.\n\n## Syntax\n\n```js\nconcat()\nconcat(value0)\nconcat(value0, value1)\nconcat(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `valueN` _**optional**_\n  - : Arrays and/or values to concatenate into a new array. If all\n    `valueN` parameters are omitted, `concat` returns a\n    [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of the existing array on which it is called. See the description below\n    for more details.\n\n### Return value\n\nA new `Array` instance.\n\n## Description\n\nThe `concat` method creates a new array. The array will first be populated by the elements in the object on which it is called. Then, for each argument, its value will be concatenated into the array — for normal objects or primitives, the argument itself will become an element of the final array; for arrays or array-like objects with the property [`Symbol.isConcatSpreadable`](../../Symbol/isConcatSpreadable.mdx) set to a truthy value, each element of the argument will be independently added to the final array. The `concat` method does not recurse into nested array arguments.\n\nThe `concat()` method is a copying. It does not alter `this` or any of the arrays provided as arguments but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains the same elements as the ones from the original arrays.\n\nThe `concat()` method preserves empty slots if any of the source arrays is sparse.\n\nThe `concat()` method is generic. The `this` value is treated in the same way as the other arguments (except it will be converted to an object first), which means plain objects will be directly prepended to the resulting array, while array-like objects with truthy `Symbol.isConcatSpreadable` will be spread into the resulting array.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Array/prototype/copyWithin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.copyWithin\n\nThe **`copyWithin()`** method shallow copies part of an array\nto another location in the same array and returns it without modifying its length.\n\n\n\n## Syntax\n\n```js\ncopyWithin(target)\ncopyWithin(target, start)\ncopyWithin(target, start, end)\n```\n\n### Parameters\n\n- `target`\n  - : Zero-based index at which to copy the sequence to, converted to an integer.\n    - Negative index counts back from the end of the array — if `target < 0`, `target + array.length` is used.\n    - If `target < -array.length`, `0` is used.\n    - If `target >= array.length`, nothing is copied.\n    - If `target` is positioned after `start` after normalization, copying only happens until the end of `array.length` (in other words, `copyWithin()` never extends the array).\n- `start` _**optional**_\n  - : Zero-based index at which to start copying elements from, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, nothing is copied.\n- `end` _**optional**_\n  - : Zero-based index at which to end copying elements from, converted to an integer. `copyWithin()` copies up to but not including `end`.\n    - Negative index counts back from the end of the array — if `end < 0`, `end + array.length` is used.\n    - If `end < -array.length`, `0` is used.\n    - If `end >= array.length` or `end` is omitted, `array.length` is used, causing all elements until the end to be copied.\n    - If `end` is positioned before or at `start` after normalization, nothing is copied.\n\n### Return value\n\nThe modified array.\n\n## Description\n\nThe `copyWithin()` method works like C and C++'s `memmove`, and is a high-performance method to shift the data of an `Array`. The sequence is copied and pasted as one operation; the pasted sequence will have the copied values even when the copy and paste region overlap.\n\nThe `copyWithin()` method is a mutating method. It does not alter the length of `this`, but it will change the content of `this` and create new properties or delete existing properties, if necessary.\n\nThe `copyWithin()` method preserves empty slots. If the region to be copied from is sparse, the empty slots' corresponding new indices are [deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) and also become empty slots.\n\nThe `copyWithin()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Array/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.entries\n\nThe **`entries()`** method returns a new **Array\nIterator** object that contains the key/value pairs for each index in the\narray.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nA new `Array` iterator object.\n\n## Description\n\nWhen used on sparse arrays, the `entries()` method iterates empty slots as if they have the value `undefined`.\n\nThe `entries()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Array/prototype/every.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.every\n\nThe **`every()`** method tests whether\nall elements in the array pass the test implemented by the provided function. It\nreturns a Boolean value.\n\n## Syntax\n\n```js\n// Arrow function\nevery((element) => { /* … */ })\nevery((element, index) => { /* … */ })\nevery((element, index, array) => { /* … */ })\n\n// Callback function\nevery(callbackFn)\nevery(callbackFn, thisArg)\n\n// Inline callback function\nevery(function (element) { /* … */ })\nevery(function (element, index) { /* … */ })\nevery(function (element, index, array) { /* … */ })\nevery(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value to indicate the element passes the test, and a falsy value otherwise.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `every()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\n`true` if `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value for every array element. Otherwise, `false`.\n\n## Description\n\nThe `every()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array, until the `callbackFn` returns a [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value. If such an element is found, `every()` immediately returns `false` and stops iterating through the array. Otherwise, if `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value for all elements, `every()` returns `true`.\n\n`every` acts like the \"for all\" quantifier in mathematics. In particular, for an empty array, it returns `true`. (It is [vacuously true](https://en.wikipedia.org/wiki/Vacuous_truth) that all elements of the [empty set](https://en.wikipedia.org/wiki/Empty_set#Properties) satisfy any given condition.)\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\n`every()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `every()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `every()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Array/prototype/fill.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.fill\n\nThe **`fill()`** method changes all elements in an array to a static value, from a start index (default `0`) to an end index (default `array.length`).\nIt returns the modified array.\n\n## Syntax\n\n```js\nfill(value)\nfill(value, start)\nfill(value, start, end)\n```\n\n### Parameters\n\n- `value`\n  - : Value to fill the array with. Note all elements in the array will be this exact value: if `value` is an object, each slot in the array will reference that object.\n- `start` _**optional**_\n  - : Zero-based index at which to start filling, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, no index is filled.\n- `end` _**optional**_\n  - : Zero-based index at which to end filling, converted to an integer. `fill()` fills up to but not including `end`.\n    - Negative index counts back from the end of the array — if `end < 0`, `end + array.length` is used.\n    - If `end < -array.length`, `0` is used.\n    - If `end >= array.length` or `end` is omitted, `array.length` is used, causing all indices until the end to be filled.\n    - If `end` is positioned before or at `start` after normalization, no index is filled.\n\n### Return value\n\nThe modified array, filled with `value`.\n\n## Description\n\nThe `fill()` method is a mutating method. It does not alter the length of `this`, but it will change the content of `this`.\n\nThe `fill()` method fills empty slots in sparse arrays with `value` as well.\n\nThe `fill()` method is generic. It only expects the `this` value to have a `length` property. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Array/prototype/filter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.filter\n\nThe **`filter()`** method creates a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of a portion of a given array, filtered down to just the elements from the given array that pass the test implemented by the provided function.\n\n## Syntax\n\n```js\n// Arrow function\nfilter((element) => { /* … */ })\nfilter((element, index) => { /* … */ })\nfilter((element, index, array) => { /* … */ })\n\n// Callback function\nfilter(callbackFn)\nfilter(callbackFn, thisArg)\n\n// Inline callback function\nfilter(function (element) { /* … */ })\nfilter(function (element, index) { /* … */ })\nfilter(function (element, index, array) { /* … */ })\nfilter(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) to keep the element in the resulting array, and a falsy value otherwise.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `filter()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\nA [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of a portion of the given array, filtered down to just the elements from the given array that pass the test implemented by the provided function. If no elements pass the test, an empty array will be returned.\n\n## Description\n\nThe `filter()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array, and constructs a new array of all the values for which `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. Array elements which do not pass the `callbackFn` test are not included in the new array.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nThe `filter()` method is a copying method. It does not alter `this` but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains the same elements as the ones from the original array (with some filtered out). However, the function provided as `callbackFn` can mutate the array. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `filter()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\nThe `filter()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Array/prototype/find.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.find()\n\nThe `find()` method returns the first element in the provided array that satisfies the provided testing function.\nIf no values satisfy the testing function, [`undefined`](../../../globals/undefined.mdx) is returned.\n\n- If you need the **index** of the found element in the array, use [`findIndex()`](./findIndex.mdx).\n- If you need to find the **index of a value**, use [`indexOf()`](./indexOf.mdx).\n  (It's similar to [`findIndex()`](./findIndex.mdx), but checks each element for equality with the value instead of using a testing function.)\n- If you need to find if a value **exists** in an array, use [`includes()`](./includes.mdx).\n  Again, it checks each element for equality with the value instead of using a testing function.\n- If you need to find if any element satisfies the provided testing function, use [`some()`](./some.mdx).\n\n## Syntax\n\n```js\n// Arrow function\nfind((element) => { /* … */ })\nfind((element, index) => { /* … */ })\nfind((element, index, array) => { /* … */ })\n\n// Callback function\nfind(callbackFn)\nfind(callbackFn, thisArg)\n\n// Inline callback function\nfind(function (element) { /* … */ })\nfind(function (element, index) { /* … */ })\nfind(function (element, index, array) { /* … */ })\nfind(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value to indicate a matching element has been found.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `find()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\nThe first element in the array that satisfies the provided testing function.\nOtherwise, [`undefined`](../../../globals/undefined.mdx) is returned.\n\n## Description\n\nThe `find()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array in ascending-index order, until `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. `find()` then returns that element and stops iterating through the array. If `callbackFn` never returns a truthy value, `find()` returns [`undefined`](../../../globals/undefined.mdx).\n\n`callbackFn` is invoked for _every_ index of the array, not just those with assigned values. Empty slots in sparse arrays behave the same as `undefined`.\n\n`find()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `find()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are visited as if they were `undefined`.\n\nThe `find()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Array/prototype/findIndex.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.findIndex\n\nThe **`findIndex()`** method returns the index of the first element in an array that satisfies the provided testing function.\nIf no elements satisfy the testing function, -1 is returned.\n\nSee also the [`find()`](./find.mdx) method, which returns the first element that satisfies the testing function (rather than its index).\n\n## Syntax\n\n```js\n// Arrow function\nfindIndex((element) => { /* … */ })\nfindIndex((element, index) => { /* … */ })\nfindIndex((element, index, array) => { /* … */ })\n\n// Callback function\nfindIndex(callbackFn)\nfindIndex(callbackFn, thisArg)\n\n// Inline callback function\nfindIndex(function (element) { /* … */ })\nfindIndex(function (element, index) { /* … */ })\nfindIndex(function (element, index, array) { /* … */ })\nfindIndex(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value to indicate a matching element has been found.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `findIndex()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\nThe index of the first element in the array that passes the test. Otherwise, `-1`.\n\n## Description\n\nThe `findIndex()` is an iterative method. It calls a provided `callbackFn` function once for each element in an array in ascending-index order, until `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. `findIndex()` then returns the index of that element and stops iterating through the array. If `callbackFn` never returns a truthy value, `findIndex()` returns `-1`.\n\n`callbackFn` is invoked for _every_ index of the array, not just those with assigned values. Empty slots in sparse arrays behave the same as `undefined`.\n\n`findIndex()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `findIndex()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are visited as if they were `undefined`.\n\nThe `findIndex()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Array/prototype/flat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.flat\n\nThe **`flat()`** method creates a new array with all sub-array\nelements concatenated into it recursively up to the specified depth.\n\n## Syntax\n\n```js\nflat()\nflat(depth)\n```\n\n### Parameters\n\n- `depth` _**optional**_\n  - : The depth level specifying how deep a nested array structure should be flattened.\n    Defaults to 1.\n\n### Return value\n\nA new array with the sub-array elements concatenated into it.\n\n## Description\n\nThe `flat()` method is a copying method. It does not alter `this` but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains the same elements as the ones from the original array.\n\nThe `flat()` method ignores empty slots if the array being flattened is sparse. For example, if `depth` is 1, both empty slots in the root array and in the first level of nested arrays are ignored, but empty slots in further nested arrays are preserved with the arrays themselves.\n\nThe `flat()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. However, its elements must be arrays if they are to be flattened.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Array/prototype/flatMap.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.flatMap()\n\nThe **`flatMap()`** method returns a new array formed by applying a given callback function to each element of the array, and then flattening the result by one level. It is identical to a [`Array.prototype.map()`](./map.mdx) followed by a [`Array.prototype.flat()`](./flat.mdx) of depth 1 (`arr.map(...args).flat()`), but slightly more efficient than calling those two methods separately.\n\n## Syntax\n\n```js\n// Arrow function\nflatMap((element) => { /* … */ })\nflatMap((element, index) => { /* … */ })\nflatMap((element, index, array) => { /* … */ })\n\n// Callback function\nflatMap(callbackFn)\nflatMap(callbackFn, thisArg)\n\n// Inline callback function\nflatMap(function (element) { /* … */ })\nflatMap(function (element, index) { /* … */ })\nflatMap(function (element, index, array) { /* … */ })\nflatMap(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return an array containing new elements of the new array, or a single non-array value to be added to the new array.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `flatMap()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\nA new array with each element being the result of the callback function and flattened\nby a depth of 1.\n\n## Description\n\nThe `flatMap()` method is an iterative method. See [`Array.prototype.map()`](./map.mdx) for a detailed description of the callback function. The `flatMap()` method is identical to [`map(callbackFn, thisArg)`](./map.mdx) followed by [`flat(1)`](./flat.mdx) — for each element, it produces an array of new elements, and concatenates the resulting arrays together to form a new array.\n\nThe `flatMap()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. However, the value returned from `callbackFn` must be an array if it is to be flattened.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Array/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.forEach()\n\nThe **`forEach()`** method executes a provided function once\nfor each array element.\n\n## Syntax\n\n```js\n// Arrow function\nforEach((element) => { /* … */ })\nforEach((element, index) => { /* … */ })\nforEach((element, index, array) => { /* … */ })\n\n// Callback function\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n\n// Inline callback function\nforEach(function (element) { /* … */ })\nforEach(function (element, index) { /* … */ })\nforEach(function (element, index, array) { /* … */ })\nforEach(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value is discarded.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `forEach()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\n`undefined`.\n\n## Description\n\nThe `forEach()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array in ascending-index order. Unlike [`Array.prototype.map()`](./map.mdx), `forEach()` always returns [`undefined`](../../../globals/undefined.mdx) and is not chainable. The typical use case is to execute side effects at the end of a chain.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\n`forEach()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `forEach()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\nThe `forEach()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n\nThere is no way to stop or break a `forEach()` loop other than by throwing an exception. If you need such behavior, the `forEach()` method is the wrong tool.\n\nEarly termination may be accomplished with looping statements like [`for`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for), [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of), and [`for...in`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...in). Array methods like [`Array.prototype.some()`](./some.mdx), [`Array.prototype.some()`](./some.mdx), [`Array.prototype.find()`](./find.mdx), and [`Array.prototype.findIndex()`](./findIndex.mdx) also stops iteration immediately when further iteration is not necessary.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Array/prototype/includes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.includes()\n\nThe **`includes()`** method determines whether an array\nincludes a certain value among its entries, returning `true` or\n`false` as appropriate.\n\n## Syntax\n\n```js\nincludes(searchElement)\nincludes(searchElement, fromIndex)\n```\n\n### Parameters\n\n- `searchElement`\n  - : The value to search for.\n- `fromIndex` _**optional**_\n  - : Zero-based index at which to start searching, converted to an integer.\n    - Negative index counts back from the end of the array — if `fromIndex < 0`, `fromIndex + array.length` is used. However, the array is still searched from front to back in this case.\n    - If `fromIndex < -array.length` or `fromIndex` is omitted, `0` is used, causing the entire array to be searched.\n    - If `fromIndex >= array.length`, the array is not searched and `false` is returned.\n\n### Return value\n\nA boolean value which is `true` if the value `searchElement` is found within the array (or the part of the array indicated by the index `fromIndex`, if specified).\n\n## Description\n\nThe `includes()` method compares `searchElement` to elements of the array using the [SameValueZero](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) algorithm. Values of zero are all considered to be equal, regardless of sign. (That is, `-0` is equal to `0`), but `false` is _not_ considered to be the same as `0`. [`NaN`](../../NaN.mdx) can be correctly searched for.\n\nWhen used on sparse arrays, the `includes()` method iterates empty slots as if they have the value `undefined`.\n\nThe `includes()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Array/prototype/indexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.indexOf()\n\nThe **`indexOf()`** method returns the first index at which a\ngiven element can be found in the array, or -1 if it is not present.\n\n## Syntax\n\n```js\nindexOf(searchElement)\nindexOf(searchElement, fromIndex)\n```\n\n### Parameters\n\n- `searchElement`\n  - : Element to locate in the array.\n- `fromIndex` _**optional**_\n  - : Zero-based index at which to start searching, converted to an integer.\n    - Negative index counts back from the end of the array — if `fromIndex < 0`, `fromIndex + array.length` is used. Note, the array is still searched from front to back in this case.\n    - If `fromIndex < -array.length` or `fromIndex` is omitted, `0` is used, causing the entire array to be searched.\n    - If `fromIndex >= array.length`, the array is not searched and `-1` is returned.\n\n### Return value\n\nThe first index of the element in the array; **-1** if not found.\n\n## Description\n\nThe `indexOf()` method compares `searchElement` to elements of the array using [strict equality](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) (the same algorithm used by the `===` operator).\n\nThe `indexOf()` method skips empty slots in sparse arrays.\n\nThe `indexOf()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Array/prototype/join.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.join()\n\nThe **`join()`** method creates and\nreturns a new string by concatenating all of the elements in an array\n(or an [array-like object](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects)),\nseparated by commas or a specified separator string. If the array has\nonly one item, then that item will be returned without using the separator.\n\n## Syntax\n\n```js\njoin()\njoin(separator)\n```\n\n### Parameters\n\n- `separator` _**optional**_\n  - : Specifies a string to separate each pair of adjacent elements of the array. The\n    separator is converted to a string if necessary. If omitted, the array elements are\n    separated with a comma (\",\"). If `separator` is an empty string, all\n    elements are joined without any characters in between them.\n\n### Return value\n\nA string with all array elements joined. If `arr.length` is\n`0`, the empty string is returned.\n\n## Description\n\nThe string conversions of all array elements are joined into one string. If an element is `undefined`, `null`, it is converted to an empty string instead of the string `\"null\"` or `\"undefined\"`.\n\nThe `join` method is accessed internally by [`Array.prototype.toString()`](./toString.mdx) with no arguments. Overriding `join` of an array instance will override its `toString` behavior as well.\n\nWhen used on sparse arrays, the `join()` method iterates empty slots as if they have the value `undefined`.\n\nThe `join()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Array/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.keys()\n\nThe **`keys()`** method returns a new **Array\nIterator** object that contains the keys for each index in the array.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nA new `Array` iterator object.\n\n## Description\n\nWhen used on sparse arrays, the `keys()` method iterates empty slots as if they have the value `undefined`.\n\nThe `keys()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Array/prototype/lastIndexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.lastIndexOf()\n\nThe **`lastIndexOf()`** method returns the last index at which\na given element can be found in the array, or -1 if it is not present. The array is\nsearched backwards, starting at `fromIndex`.\n\n## Syntax\n\n```js\nlastIndexOf(searchElement)\nlastIndexOf(searchElement, fromIndex)\n```\n\n### Parameters\n\n- `searchElement`\n  - : Element to locate in the array.\n- `fromIndex` _**optional**_\n  - : Zero-based index at which to start searching backwards, converted to an integer.\n    - Negative index counts back from the end of the array — if `fromIndex < 0`, `fromIndex + array.length` is used.\n    - If `fromIndex < -array.length`, the array is not searched and `-1` is returned. You can think of it conceptually as starting at a nonexistent position before the beginning of the array and going backwards from there. There are no array elements on the way, so `searchElement` is never found.\n    - If `fromIndex >= array.length` or `fromIndex` is omitted, `array.length - 1` is used, causing the entire array to be searched. You can think of it conceptually as starting at a nonexistent position beyond the end of the array and going backwards from there. It eventually reaches the real end position of the array, at which point it starts searching backwards through the actual array elements.\n\n### Return value\n\nThe last index of the element in the array; **-1** if not found.\n\n## Description\n\nThe `lastIndexOf()` method compares `searchElement` to elements of the array using [strict equality](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) (the same algorithm used by the `===` operator).\n\nThe `lastIndexOf()` method skips empty slots in sparse arrays.\n\nThe `lastIndexOf()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Array/prototype/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.length\n\nThe **`length`** data property of an `Array` instance represents the number of elements in that array. The value is an unsigned, 32-bit integer that is always numerically greater than the highest index in the array.\n\n## Value\n\nA non-negative integer less than 2<sup>32</sup>.\n\n## Description\n\nThe value of the `length` property is a non-negative integer with a value less than 2<sup>32</sup>.\n\n```js\nconst listA = [1, 2, 3];\nconst listB = new Array(6);\n\nconsole.log(listA.length);\n// 3\n\nconsole.log(listB.length);\n// 6\n\nlistB.length = 2 ** 32; // 4294967296\n// RangeError: Invalid array length\n\nconst listC = new Array(-100); // Negative numbers are not allowed\n// RangeError: Invalid array length\n```\n\nThe array object observes the `length` property, and automatically syncs the `length` value with the array's content. This means:\n\n- Setting `length` to a value smaller than the current length truncates the array — elements beyond the new `length` are deleted.\n- Setting any array index (a non-negative integer smaller than 2<sup>32</sup>) beyond the current `length` extends the array — the `length` property is increased to reflect the new highest index.\n- Setting `length` to an invalid value (e.g. a negative number or a non-integer) throws a `RangeError` exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Array/prototype/map.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.map()\n\nThe **`map()`** method **creates\na new array** populated with the results of calling a provided function on\nevery element in the calling array.\n\n## Syntax\n\n```js\n// Arrow function\nmap((element) => { /* … */ })\nmap((element, index) => { /* … */ })\nmap((element, index, array) => { /* … */ })\n\n// Callback function\nmap(callbackFn)\nmap(callbackFn, thisArg)\n\n// Inline callback function\nmap(function (element) { /* … */ })\nmap(function (element, index) { /* … */ })\nmap(function (element, index, array) { /* … */ })\nmap(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value is added as a single element in the new array.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `map()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\nA new array with each element being the result of the callback function.\n\n## Description\n\nThe `map()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array and constructs a new array from the results.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nThe `map()` method is a copying method. It does not alter `this`. However, the function provided as `callbackFn` can mutate the array. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `map()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `map()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n\nSince `map` builds a new array, calling it without using the returned\narray is an anti-pattern; use [`Array.prototype.forEach()`](./forEach.mdx) or\n`for...of` instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Array/prototype/pop.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.pop()\n\nThe **`pop()`** method removes the **last**\nelement from an array and returns that element. This method changes the length of the\narray.\n\n## Syntax\n\n```js\npop()\n```\n\n### Return value\n\nThe removed element from the array; [`undefined`](../../../globals/undefined.mdx) if the array is empty.\n\n## Description\n\nThe `pop()` method removes the last element from an array and returns that value to the caller. If you call `pop()` on an empty array, it returns [`undefined`](../../../globals/undefined.mdx).\n\n[`Array.prototype.shift()`](./shift.mdx) has similar behavior to `pop()`, but applied to the first element in an array.\n\nThe `pop()` method is a mutating method. It changes the length and the content of `this`. In case you want the value of `this` to be the same, but return a new array with the last element removed, you can use [`arr.slice(0, -1)`](./slice.mdx) instead.\n\nThe `pop()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Array/prototype/push.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.push()\n\nThe **`push()`** method adds one or more elements to the end of\nan array and returns the new length of the array.\n\n## Syntax\n\n```js\npush(element0)\npush(element0, element1)\npush(element0, element1, /* … ,*/ elementN)\n```\n\n### Parameters\n\n- `elementN`\n  - : The element(s) to add to the end of the array.\n\n### Return value\n\nThe new [`Array.prototype.length`](./length.mdx) property of the object upon which the method was called.\n\n## Description\n\nThe `push()` method appends values to an array.\n\n[`Array.prototype.unshift()`](./unshift.mdx)has similar behavior to `push()`, but applied to the start of an array.\n\nThe `push()` method is a mutating method. It changes the length and the content of `this`. In case you want the value of `this` to be the same, but return a new array with elements appended to the end, you can use [`arr.concat([element0, element1, /* ... ,*/ elementN])`](./concat.mdx) instead. Notice that the elements are wrapped in an extra array — otherwise, if the element is an array itself, it would be spread instead of pushed as a single element due to the behavior of `concat()`.\n\nThe `push()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Array/prototype/reduce.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.reduce()\n\nThe **`reduce()`** method executes a user-supplied \"reducer\" callback function on each element of the array, in order, passing in the return value from the calculation on the preceding element.\nThe final result of running the reducer across all elements of the array is a single value.\n\nThe first time that the callback is run there is no \"return value of the previous calculation\".\nIf supplied, an initial value may be used in its place.\nOtherwise the array element at index 0 is used as the initial value and iteration starts from the next element (index 1 instead of index 0).\n\nPerhaps the easiest-to-understand case for `reduce()` is to return the sum of all the elements in an array:\n\nThe reducer walks through the array element-by-element, at each step adding the current array value to the result from the previous step (this result is the running sum of all the previous steps) — until there are no more elements to add.\n\n## Syntax\n\n```js\n// Arrow function\nreduce((accumulator, currentValue) => { /* … */ })\nreduce((accumulator, currentValue, currentIndex) => { /* … */ })\nreduce((accumulator, currentValue, currentIndex, array) => { /* … */ })\n\nreduce((accumulator, currentValue) => { /* … */ }, initialValue)\nreduce((accumulator, currentValue, currentIndex) => { /* … */ }, initialValue)\nreduce((accumulator, currentValue, currentIndex, array) => { /* … */ }, initialValue)\n\n// Callback function\nreduce(callbackFn)\nreduce(callbackFn, initialValue)\n\n// Inline callback function\nreduce(function (accumulator, currentValue) { /* … */ })\nreduce(function (accumulator, currentValue, currentIndex) { /* … */ })\nreduce(function (accumulator, currentValue, currentIndex, array) { /* … */ })\n\nreduce(function (accumulator, currentValue) { /* … */ }, initialValue)\nreduce(function (accumulator, currentValue, currentIndex) { /* … */ }, initialValue)\nreduce(function (accumulator, currentValue, currentIndex, array) { /* … */ }, initialValue)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value becomes the value of the `accumulator` parameter on the next invocation of `callbackFn`. For the last invocation, the return value becomes the return value of `reduce()`.\n\n    The function is called with the following arguments:\n\n    - `accumulator`\n      - : The value resulting from the previous call to `callbackFn`. On first call, `initialValue` if specified, otherwise the value of `array[0]`.\n    - `currentValue`\n      - : The value of the current element. On first call, the value of `array[0]` if an `initialValue` was specified, otherwise the value of `array[1]`.\n    - `currentIndex`\n      - : The index position of `currentValue` in the array. On first call, `0` if `initialValue` was specified, otherwise `1`.\n    - `array`\n      - : The array `reduce()` was called upon.\n\n- `initialValue` _**optional**_\n  - : A value to which `accumulator` is initialized the first time the callback is called.\n    If `initialValue` is specified, `callbackFn` starts executing with the first value in the array as `currentValue`.\n    If `initialValue` is _not_ specified, `accumulator` is initialized to the first value in the array, and `callbackFn` starts executing with the second value in the array as `currentValue`. In this case, if the array is empty (so that there's no first value to return as `accumulator`), an error is thrown.\n\n### Return value\n\nThe value that results from running the \"reducer\" callback function to completion over the entire array.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n\n  - : The array contains no elements and `initialValue` is not provided.\n\n## Description\n\nThe `reduce()` method is an iterative method. It runs a \"reducer\" callback function over all elements in the array, in ascending-index order, and accumulates them into a single value. Every time, the return value of `callbackFn` is passed into `callbackFn` again on next invocation as `accumulator`. The final value of `accumulator` (which is the value returned from `callbackFn` on the final iteration of the array) becomes the return value of `reduce()`.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nUnlike other [iterative methods](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array#iterative_methods), `reduce()` does not accept a `thisArg` argument. `callbackFn` is always called with `undefined` as `this`, which gets substituted with `globalThis` if `callbackFn` is non-strict.\n\n`reduce()` is a central concept in [functional programming](https://en.wikipedia.org/wiki/Functional_programming), where it's not possible to mutate any value, so in order to accumulate all values in an array, one must return a new accumulator value on every iteration. This convention propagates to JavaScript's `reduce()`: you should use [spreading](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) or other copying methods where possible to create new arrays and objects as the accumulator, rather than mutating the existing one. If you decided to mutate the accumulator instead of copying it, remember to still return the modified object in the callback, or the next iteration will receive undefined.\n\n`reduce()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `reduce()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `reduce()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n\n### When to not use reduce()\n\nRecursive functions like `reduce()` can be powerful but sometimes difficult to understand, especially for less-experienced JavaScript developers. If code becomes clearer when using other array methods, developers must weigh the readability tradeoff against the other benefits of using `reduce()`. In cases where `reduce()` is the best choice, documentation and semantic variable naming can help mitigate readability drawbacks.\n\n### Edge cases\n\nIf the array only has one element (regardless of position) and no `initialValue` is provided, or if `initialValue` is provided but the array is empty, the solo value will be returned _without_ calling `callbackFn`.\n\nIf `initialValue` is provided and the array is not empty, then the reduce method will always invoke the callback function starting at index 0.\n\nIf `initialValue` is not provided then the reduce method will act differently for arrays with length larger than 1, equal to 1 and 0, as shown in the following example:\n\n```js\nconst getMax = (a, b) => Math.max(a, b);\n\n// callback is invoked for each element in the array starting at index 0\n[1, 100].reduce(getMax, 50); // 100\n[50].reduce(getMax, 10); // 50\n\n// callback is invoked once for element at index 1\n[1, 100].reduce(getMax); // 100\n\n// callback is not invoked\n[50].reduce(getMax); // 50\n[].reduce(getMax, 1); // 1\n\n[].reduce(getMax); // TypeError\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Array/prototype/reduceRight.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.reduceRight()\n\nThe **`reduceRight()`** method applies a function against an\naccumulator and each value of the array (from right-to-left) to reduce it to a single\nvalue.\n\nSee also [`Array.prototype.reduce()`](./reduce.mdx) for left-to-right.\n\n## Syntax\n\n```js\n// Arrow function\nreduceRight((accumulator, currentValue) => { /* … */ })\nreduceRight((accumulator, currentValue, index) => { /* … */ })\nreduceRight((accumulator, currentValue, index, array) => { /* … */ })\nreduceRight((accumulator, currentValue, index, array) => { /* … */ }, initialValue)\n\n// Callback function\nreduceRight(callbackFn)\nreduceRight(callbackFn, initialValue)\n\n// Callback reducer function\nreduceRight(function (accumulator, currentValue) { /* … */ })\nreduceRight(function (accumulator, currentValue, index) { /* … */ })\nreduceRight(function (accumulator, currentValue, index, array) { /* … */ })\nreduceRight(function (accumulator, currentValue, index, array) { /* … */ }, initialValue)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value becomes the value of the `accumulator` parameter on the next invocation of `callbackFn`. For the last invocation, the return value becomes the return value of `reduce()`.\n\n    The function is called with the following arguments:\n\n    - `accumulator`\n      - : The value previously returned in the last invocation of the callback, or\n        `initialValue`, if supplied. (See below.)\n    - `currentValue`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `reduceRight()` was called upon.\n\n- `initialValue` _**optional**_\n  - : Value to use as accumulator to the first call of the\n    `callbackFn`. If no initial value is supplied, the last element in\n    the array will be used and skipped. Calling reduce or reduceRight on an empty array\n    without an initial value creates a `TypeError`.\n\n### Return value\n\nThe value that results from the reduction.\n\n## Description\n\nThe `reduceRight()` method is an iterative method. It runs a \"reducer\" callback function over all elements in the array, in descending-index order, and accumulates them into a single value.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nUnlike other [iterative methods](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array#iterative_methods), `reduce()` does not accept a `thisArg` argument. `callbackFn` is always called with `undefined` as `this`, which gets substituted with `globalThis` if `callbackFn` is non-strict.\n\n`reduceRight()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `reduceRight()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `reduceRight()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Array/prototype/reverse.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.reverse()\n\nThe **`reverse()`** method reverses an array _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_ and returns the reference to the same array, the first array element now becoming the last, and the last array element becoming the first. In other words, elements order in the array will be turned towards the direction opposite to that previously stated.\n\n## Syntax\n\n```js\nreverse()\n```\n\n### Return value\n\nThe reference to the original array, now reversed. Note that the array is reversed _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_, and no copy is made.\n\n## Description\n\nThe `reverse()` method transposes the elements of the calling array object in\nplace, mutating the array, and returning a reference to the array.\n\nThe `reverse()` method preserves empty slots. If the source array is sparse, the empty slots' corresponding new indices are [deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) and also become empty slots.\n\nThe `reverse()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Array/prototype/shift.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.shift()\n\nThe **`shift()`** method removes the **first**\nelement from an array and returns that removed element. This method changes the length\nof the array.\n\n## Syntax\n\n```js\nshift()\n```\n\n### Return value\n\nThe removed element from the array; [`undefined`](../../../globals/undefined.mdx) if the array is empty.\n\n## Description\n\nThe `shift()` method removes the element at the zeroth index and shifts the\nvalues at consecutive indexes down, then returns the removed value. If the\n[`Array.prototype.length`](./length.mdx) property is 0, [`undefined`](../../../globals/undefined.mdx) is returned.\n\nThe [`Array.prototype.pop()`](./pop.mdx) method has similar behavior to `shift()`, but applied to the last element in an array.\n\nThe `shift()` method is a mutating method. It changes the length and the content of `this`. In case you want the value of `this` to be the same, but return a new array with the first element removed, you can use [`arr.slice(1)`](./slice.mdx) instead.\n\nThe `shift()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Array/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.slice()\n\nThe **`slice()`** method returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of a portion of\nan array into a new array object selected from `start` to `end`\n(`end` not included) where `start` and `end` represent\nthe index of items in that array. The original array will not be modified.\n\n## Syntax\n\n```js\nslice()\nslice(start)\nslice(start, end)\n```\n\n### Parameters\n\n- `start` _**optional**_\n  - : Zero-based index at which to start extraction, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, nothing is extracted.\n- `end` _**optional**_\n  - : Zero-based index at which to end extraction, converted to an integer. `slice()` extracts up to but not including `end`.\n    - Negative index counts back from the end of the array — if `end < 0`, `end + array.length` is used.\n    - If `end < -array.length`, `0` is used.\n    - If `end >= array.length` or `end` is omitted, `array.length` is used, causing all elements until the end to be extracted.\n    - If `end` is positioned before or at `start` after normalization, nothing is extracted.\n\n### Return value\n\nA new array containing the extracted elements.\n\n## Description\n\nThe `slice()` method is a copying method. It does not alter `this` but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains some of the same elements as the ones from the original array.\n\nThe `slice()` method preserves empty slots. If the sliced portion is sparse, the returned array is sparse as well.\n\nThe `slice()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Array/prototype/some.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.some()\n\nThe **`some()`** method tests whether\nat least one element in the array passes the test implemented by the provided\nfunction. It returns true if, in the array, it finds an element for which the provided function returns true; otherwise it returns false. It doesn't modify the array.\n\n## Syntax\n\n```js\n// Arrow function\nsome((element) => { /* … */ })\nsome((element, index) => { /* … */ })\nsome((element, index, array) => { /* … */ })\n\n// Callback function\nsome(callbackFn)\nsome(callbackFn, thisArg)\n\n// Inline callback function\nsome(function (element) { /* … */ })\nsome(function (element, index) { /* … */ })\nsome(function (element, index, array) { /* … */ })\nsome(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) to indicate the element passes the test, and a falsy value otherwise.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `some()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\n`true` if the callback function returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value for at least one element in the array. Otherwise, `false`.\n\n## Description\n\nThe `some()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array, until the `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. If such an element is found, `some()` immediately returns `true` and stops iterating through the array. Otherwise, if `callbackFn` returns a [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value for all elements, `some()` returns `false`.\n\n`some()` acts like the \"there exists\" quantifier in mathematics. In particular, for an empty array, it returns `false` for any condition.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\n`some()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `some()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\nThe `some()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Array/prototype/sort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.sort()\n\nThe **`sort()`** method sorts the elements of an array _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_ and returns the reference to the same array, now sorted. The default sort order is ascending, built upon converting the elements into strings, then comparing their sequences of UTF-16 code units values.\n\nThe time and space complexity of the sort cannot be guaranteed as it depends on the\nimplementation.\n\n## Syntax\n\n```js\n// Functionless\nsort()\n\n// Arrow function\nsort((a, b) => { /* … */ } )\n\n// Compare function\nsort(compareFn)\n\n// Inline compare function\nsort(function compareFn(a, b) { /* … */ })\n```\n\n### Parameters\n\n- `compareFn` _**optional**_\n\n  - : Specifies a function that defines the sort order. If omitted, the array elements are converted to strings, then sorted according to each character's Unicode code point value.\n\n    - `a`\n      - : The first element for comparison.\n    - `b`\n      - : The second element for comparison.\n\n### Return value\n\nThe reference to the original array, now sorted. Note that the array is sorted _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_, and no copy is made.\n\n## Description\n\nIf `compareFn` is not supplied, all non-`undefined` array\nelements are sorted by converting them to strings and comparing strings in UTF-16 code\nunits order. For example, \"banana\" comes before \"cherry\". In a numeric sort, 9 comes\nbefore 80, but because numbers are converted to strings, \"80\" comes before \"9\" in the\nUnicode order. All `undefined` elements are sorted to the end of the array.\n\nThe `sort()` method preserves empty slots. If the source array is sparse, the empty slots are moved to the end of the array, and always come after all the `undefined`.\n\n> **Note:** In UTF-16, Unicode characters above `\\uFFFF` are\n> encoded as two surrogate code units, of the range\n> `\\uD800` - `\\uDFFF`. The value of each code unit is taken\n> separately into account for the comparison. Thus the character formed by the surrogate\n> pair `\\uD855\\uDE51` will be sorted before the character\n> `\\uFF3A`.\n\nIf `compareFn` is supplied, all non-`undefined` array\nelements are sorted according to the return value of the compare function (all\n`undefined` elements are sorted to the end of the array, with no call to\n`compareFn`).\n\n| `compareFn(a, b)` return value | sort order                         |\n| ------------------------------ | ---------------------------------- |\n| > 0                            | sort `a` after `b`                 |\n| < 0                            | sort `a` before `b`                |\n| === 0                          | keep original order of `a` and `b` |\n\nSo, the compare function has the following form:\n\n```js\nfunction compareFn(a, b) {\n  if (a is less than b by some ordering criterion) {\n    return -1;\n  }\n  if (a is greater than b by the ordering criterion) {\n    return 1;\n  }\n  // a must be equal to b\n  return 0;\n}\n```\n\nMore formally, the comparator is expected to have the following properties, in order to ensure proper sort behavior:\n\n- _Pure_: The comparator does not mutate the objects being compared or any external state. (This is important because there's no guarantee _when_ and _how_ the comparator will be called, so any particular call should not produce visible effects to the outside.)\n- _Stable_: The comparator returns the same result with the same pair of input.\n- _Reflexive_: `compareFn(a, a) === 0`.\n- _Anti-symmetric_: `compareFn(a, b)` and `compareFn(b, a)` must both be `0` or have opposite signs.\n- _Transitive_: If `compareFn(a, b)` and `compareFn(b, c)` are both positive, zero, or negative, then `compareFn(a, c)` has the same positivity as the previous two.\n\nA comparator conforming to the constraints above will always be able to return all of `1`, `0`, and `-1`, or consistently return `0`. For example, if a comparator only returns `1` and `0`, or only returns `0` and `-1`, it will not be able to sort reliably because _anti-symmetry_ is broken. A comparator that always returns `0` will cause the array to not be changed at all, but is reliable nonetheless.\n\nThe default lexicographic comparator satisfies all constraints above.\n\nTo compare numbers instead of strings, the compare function can subtract `b`\nfrom `a`. The following function will sort the array in ascending order (if\nit doesn't contain `Infinity` and `NaN`):\n\n```js\nfunction compareNumbers(a, b) {\n  return a - b;\n}\n```\n\nThe `sort()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Array/prototype/splice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.splice()\n\nThe **`splice()`** method changes the contents of an array by\nremoving or replacing existing elements and/or adding new elements [in place](https://en.wikipedia.org/wiki/In-place_algorithm). To access part of an array without modifying it, see [`Array.prototype.slice()`](./slice.mdx).\n\n## Syntax\n\n```js\nsplice(start)\nsplice(start, deleteCount)\nsplice(start, deleteCount, item1)\nsplice(start, deleteCount, item1, item2, itemN)\n```\n\n### Parameters\n\n- `start`\n\n  - : Zero-based index at which to start changing the array, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, no element will be deleted, but the method will behave as an adding function, adding as many elements as provided.\n\n- `deleteCount` _**optional**_\n\n  - : An integer indicating the number of elements in the array to remove from `start`.\n\n    If `deleteCount` is omitted, or if its value is greater than or equal to the number of elements after the position specified by `start`, then all the elements from `start` to the end of the array will be deleted. However, if you wish to pass any `itemN` parameter, you should pass `Infinity` as `deleteCount` to delete all elements after `start`, because an explicit `undefined` gets [converted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#integer_conversion) to `0`.\n\n    If `deleteCount` is `0` or negative, no elements are removed.\n    In this case, you should specify at least one new element (see below).\n\n- `item1`, …, `itemN` _**optional**_\n\n  - : The elements to add to the array, beginning from `start`.\n\n    If you do not specify any elements, `splice()` will only remove elements from the array.\n\n### Return value\n\nAn array containing the deleted elements.\n\nIf only one element is removed, an array of one element is returned.\n\nIf no elements are removed, an empty array is returned.\n\n## Description\n\nThe `splice()` method is a mutating method. It may change the content of `this`. If the specified number of elements to insert differs from the number of elements being removed, the array's `length` will be changed as well. At the same time, it uses [`@@species`](../@@species.mdx) to create a new array instance to be returned.\n\nIf the deleted portion is sparse, the array returned by `splice()` is sparse as well, with those corresponding indices being empty slots.\n\nThe `splice()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Array/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string representing\nthe elements of the array. The elements are converted to Strings using their\n`toLocaleString` methods and these Strings are separated by a locale-specific\nString (such as a comma \",\").\n\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\n- `locales` _**optional**_\n  - : A string with a BCP 47 language tag, or an array of such strings. For the general form and interpretation of the `locales` argument, see [Locale identification and negotiation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation).\n- `options` _**optional**_\n  - : An object with configuration properties. For numbers, see [`Number.prototype.toLocaleString()`](../../../globals/Number/prototype/toLocaleString.mdx); for dates, see [`Date.prototype.toLocaleString()`](../../../globals/Date/prototype/toLocaleString.mdx).\n\n### Return value\n\nA string representing the elements of the array.\n\n## Description\n\nThe `Array.prototype.toLocaleString` method traverses its content, calling the `toLocaleString` method of every element with the `locales` and `options` parameters provided, and concatenates them with an implementation-defined separator (such as a comma \",\"). Note that the method itself does not consume the two parameters — it only passes them to the `toLocaleString()` of each element. The choice of the separator string depends on the host's current locale, not the `locales` parameter.\n\nIf an element is `undefined`, `null`, it is converted to an empty string instead of the string `\"null\"` or `\"undefined\"`.\n\nWhen used on sparse arrays, the `toLocaleString()` method iterates empty slots as if they have the value `undefined`.\n\nThe `toLocaleString()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Array/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.toString()\n\nThe **`toString()`** method returns a string representing the\nspecified array and its elements.\n\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the elements of the array.\n\n## Description\n\nThe `Array` object overrides the `toString` method of `Object`. The `toString` method of arrays calls [`join()`](../../../globals/Array/prototype/join.mdx) internally, which joins the array and returns one string containing each array element separated by commas. If the `join` method is unavailable or is not a function, [`Object.prototype.toString`](../../../globals/Object/prototype/toString.mdx) is used instead, returning `[object Array]`.\n\n```js\nconst arr = [];\narr.join = 1; // re-assign `join` with a non-function\nconsole.log(arr.toString()); // [object Array]\n\nconsole.log(Array.prototype.toString.call({ join: () => 1 })); // 1\n```\n\nJavaScript calls the `toString` method automatically when an array is to be represented as a text value or when an array is referred to in a string concatenation.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Array/prototype/unshift.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.unshift()\n\nThe **`unshift()`** method adds one or more elements to the\nbeginning of an array and returns the new length of the array.\n\n## Syntax\n\n```js\nunshift(element0)\nunshift(element0, element1)\nunshift(element0, element1, /* … ,*/ elementN)\n```\n\n### Parameters\n\n- `elementN`\n  - : The elements to add to the front of the `arr`.\n\n### Return value\n\nThe new [`Array.prototype.length`](./length.mdx) property of the object upon which the\nmethod was called.\n\n## Description\n\nThe `unshift()` method inserts the given values to the beginning of an\narray-like object.\n\n[`Array.prototype.push()`](./push.mdx) has similar behavior to `unshift()`, but applied to the end of an array.\n\nPlease note that, if multiple elements are passed as parameters, they're inserted in\nchunk at the beginning of the object, in the exact same order they were passed as\nparameters. Hence, calling `unshift()` with `n`\narguments **once**, or calling it `n` times with\n**1** argument (with a loop, for example), don't yield the same results.\n\nSee example:\n\n```js\nlet arr = [4, 5, 6];\n\narr.unshift(1, 2, 3);\nconsole.log(arr);\n// [1, 2, 3, 4, 5, 6]\n\narr = [4, 5, 6]; // resetting the array\n\narr.unshift(1);\narr.unshift(2);\narr.unshift(3);\n\nconsole.log(arr);\n// [3, 2, 1, 4, 5, 6]\n```\n\nThe `unshift()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Array/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.values()\n\nThe **`values()`** method returns a new _array [iterator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterator_protocol)_ object that iterates the value of each index in the array.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nA new iterable iterator object.\n\n## Description\n\n`Array.prototype.values()` is the default implementation of [`Array.prototype[@@iterator]()`](./@@iterator.mdx).\n\n```js\nArray.prototype.values === Array.prototype[Symbol.iterator]; // true\n```\n\nWhen used on sparse arrays, the `values()` method iterates empty slots as if they have the value `undefined`.\n\nThe `values()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/ArrayBuffer/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get ArrayBuffer\\[Symbol.species]\n\nThe **`ArrayBuffer[Symbol.species]`** accessor property returns the constructor used to construct return values from array buffer methods.\n\n> **Warning:** The existence of `Symbol.species` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Syntax\n\n```js\nArrayBuffer[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct return values from array buffer methods that create new array buffers.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `ArrayBuffer` objects. Subclass constructors may override it to change the constructor assignment. The default implementation is basically:\n\n```js\n// Hypothetical underlying implementation for illustration\nclass ArrayBuffer {\n  static get [Symbol.species]() {\n    return this;\n  }\n}\n```\n\nBecause of this polymorphic implementation, `Symbol.species` of derived subclasses would also return the constructor itself by default.\n\n```js\nclass SubArrayBuffer extends ArrayBuffer {}\nSubArrayBuffer[Symbol.species] === SubArrayBuffer; // true\n```\n\nWhen calling array buffer methods that do not mutate the existing object but return a new array buffer instance (for example, [`slice()`](./prototype/slice.mdx)), the object's `constructor[Symbol.species]` will be accessed. The returned constructor will be used to construct the return value of the array buffer method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/ArrayBuffer/ArrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer()\n\nThe **`ArrayBuffer()`** constructor is used to create \"ArrayBuffer\" objects.\n\n## Syntax\n\n```js\nnew ArrayBuffer(length)\n```\n\n> **Note:** `ArrayBuffer()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `length`\n  - : The size, in bytes, of the array buffer to create.\n\n### Return value\n\nA new `ArrayBuffer` object of the specified size. Its contents are\ninitialized to 0.\n\n### Exceptions\n\n- [`RangeError`](../RangeError/RangeError.mdx)\n  - : Thrown if the `length` is larger than `Number_MAX_SAFE_INTEGER` (≥ 2<sup>53</sup>) or negative.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/ArrayBuffer/isView.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer.isView\n\nThe **`ArrayBuffer.isView()`** method determines whether the\npassed value is one of the `ArrayBuffer` views,\nsuch as [typed array objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray)\nor a [`DataView`](../DataView/DataView.mdx).\n\n## Syntax\n\n```js\nArrayBuffer.isView(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be checked.\n\n### Return value\n\n`true` if the given argument is one of the `ArrayBuffer` views;\notherwise, `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/ArrayBuffer/prototype/byteLength.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer.prototype.byteLength\n\nThe **`byteLength`** accessor property represents the length of an `ArrayBuffer` in bytes.\n\n## Description\n\nThe `byteLength` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when the array is constructed and cannot be changed. This property returns 0 if this `ArrayBuffer` has been detached.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/ArrayBuffer/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer.prototype.slice()\n\nThe **`slice()`** method returns a new `ArrayBuffer`\nwhose contents are a copy of this `ArrayBuffer`'s bytes from\n`begin`, inclusive, up to `end`, exclusive.\n\n## Syntax\n\n```js\nslice(begin)\nslice(begin, end)\n```\n\n### Parameters\n\n- `begin`\n  - : Zero-based byte index at which to begin slicing.\n- `end` _**optional**_\n  - : Byte index before which to end slicing. If end is unspecified, the new\n    `ArrayBuffer` contains all bytes from begin to the end of this\n    `ArrayBuffer`. If negative, it will make the Byte index begin from the last\n    Byte.\n\n### Return value\n\nA new `ArrayBuffer` object.\n\n## Description\n\nThe `slice()` method copies up to, but not including, the byte indicated by\nthe `end` parameter. If either `begin` or `end` is\nnegative, it refers to an index from the end of the array, as opposed to from the\nbeginning.\n\nThe range specified by the `begin` and `end` parameters is\nclamped to the valid index range for the current array. If the computed length of the\nnew `ArrayBuffer` would be negative, it is clamped to zero.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/BigInt/BigInt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt()\n\nThe **`BigInt()`** function returns a value of type **bigint**.\n\n## Syntax\n\n```js\nBigInt(value)\n```\n\n> **Note:** `BigInt()` can only be called without `new`. Attempting to construct it with `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `value`\n  - : The numeric value of the object being created. It may be a string, an integer, a boolean, or another `BigInt`.\n\n### Return value\n\nA `BigInt` value. Number values must be integers and are converted to BigInts. The boolean value `true` becomes `1n`, and `false` becomes `0n`. Strings are parsed as if they are source text for integer literals, which means they can have leading and trailing whitespaces and can be prefixed with `0b`, `0o`, or `0x`.\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if the parameter is a non-integral number.\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if at least one of these conditions is met:\n    - The parameter cannot be converted to a primitive.\n    - After conversion to a primitive, the result is [`undefined`](../undefined.mdx), `null`, `Symbol`.\n- [`SyntaxError`](../SyntaxError/SyntaxError.mdx)\n  - : Thrown if the parameter is a string that cannot be parsed as a `BigInt`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/BigInt/asIntN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.asIntN()\n\nThe **`BigInt.asIntN`** static method clamps a `BigInt` value to the given number of bits, and returns that value as a signed integer.\n\n## Syntax\n\n```js\nBigInt.asIntN(bits, bigint)\n```\n\n### Parameters\n\n- `bits`\n  - : The amount of bits available for the returned BigInt. Should be an integer between 0 and 2<sup>53</sup> - 1, inclusive.\n- `bigint`\n  - : The BigInt value to clamp to fit into the supplied bits.\n\n### Return value\n\nThe value of `bigint` modulo 2^`bits`, as a signed integer.\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `bits` is negative or greater than 2<sup>53</sup> - 1.\n\n## Description\n\nThe `BigInt.asIntN` method clamps a `BigInt` value to the given number of bits, and interprets the result as a signed integer. For example, for `BigInt.asIntN(3, 25n)`, the value `25n` is clamped to `1n`:\n\n```plain\n25n = 00011001 (base 2)\n          ^=== Clamp to three remaining bits\n===>       001 (base 2) = 1n\n```\n\nIf the leading bit of the remaining number is `1`, the result is negative. For example, `BigInt.asIntN(4, 25n)` yields `-7n`, because `1001` is the encoding of `-7` under two's complement:\n\n```plain\n25n = 00011001 (base 2)\n         ^==== Clamp to four remaining bits\n===>      1001 (base 2) = -7n\n```\n\n> **Note:** `BigInt` values are always encoded as two's complement in binary.\n\nUnlike similar language APIs such as [`Number.prototype.toExponential()`](../Number/prototype/toExponential.mdx), `asIntN` is a static property of `BigInt`, so you always use it as `BigInt.asIntN()`, rather than as a method of a BigInt value. Exposing `asIntN()` as a \"standard library function\" allows [interop with asm.js](https://github.com/tc39/proposal-bigint/blob/master/ADVANCED.md#dont-break-asmjs).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/BigInt/asUintN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.asUintN()\n\nThe **`BigInt.asUintN`** static method clamps a `BigInt` value to the given number of bits, and returns that value as an unsigned integer.\n\n## Syntax\n\n```js\nBigInt.asUintN(bits, bigint)\n```\n\n### Parameters\n\n- `bits`\n  - : The amount of bits available for the returned BigInt. Should be an integer between 0 and 2<sup>53</sup> - 1, inclusive.\n- `bigint`\n  - : The BigInt value to clamp to fit into the supplied bits.\n\n### Return value\n\nThe value of `bigint` modulo 2^`bits`, as an unsigned integer.\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `bits` is negative or greater than 2<sup>53</sup> - 1.\n\n## Description\n\nThe `BigInt.asUintN` method clamps a `BigInt` value to the given number of bits, and interprets the result as an unsigned integer. Unsigned integers have no sign bits and are always non-negative. For example, for `BigInt.asUintN(4, 25n)`, the value `25n` is clamped to `9n`:\n\n```plain\n25n = 00011001 (base 2)\n         ^==== Clamp to four remaining bits\n===>      1001 (base 2) = 9n\n```\n\n> **Note:** `BigInt` values are always encoded as two's complement in binary.\n\nUnlike similar language APIs such as [`Number.prototype.toExponential()`](../Number/prototype/toExponential.mdx), `asUintN` is a static property of `BigInt`, so you always use it as `BigInt.asUintN()`, rather than as a method of a BigInt value. Exposing `asUintN()` as a \"standard library function\" allows [interop with asm.js](https://github.com/tc39/proposal-bigint/blob/master/ADVANCED.md#dont-break-asmjs).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/BigInt/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string with a language-sensitive representation of this BigInt. In implementations with [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) support, this method simply calls `Intl.NumberFormat`.\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` parameters customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat), these parameters correspond exactly to the [`Intl.NumberFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) constructor's parameters. Implementations without `Intl.NumberFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#locales) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored.\n\nSee the [`Intl.NumberFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string with a language-sensitive representation of the given BigInt.\n\nIn implementations with `Intl.NumberFormat`, this is equivalent to `new Intl.NumberFormat(locales, options).format(number)`.\n\n## Performance\n\nWhen formatting large numbers of numbers, it is better to create a\n`Intl.NumberFormat` object and use the function provided by its\n`format()` method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/BigInt/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified `BigInt` value. The trailing \"n\" is not part of the string.\n\n## Syntax\n\n```js\ntoString()\ntoString(radix)\n```\n\n### Parameters\n\n- `radix` _**optional**_\n  - : An integer in the range 2 through 36 specifying the base to use for representing the BigInt value. Defaults to 10.\n\n### Return value\n\nA string representing the specified `BigInt` value.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `radix` is less than 2 or greater than 36.\n\n## Description\n\nThe `BigInt` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../Object/prototype/toString.mdx). For `BigInt` values, the `toString()` method returns a string representation of the value in the specified radix.\n\nFor radixes above 10, the letters of the alphabet indicate digits greater than 9. For example, for hexadecimal numbers (base 16) `a` through `f` are used.\n\nIf the specified BigInt value is negative, the sign is preserved. This is the case even if the radix is 2; the string returned is the positive binary representation of the BigInt value preceded by a `-` sign, **not** the two's complement of the BigInt value.\n\nThe `toString()` method requires its `this` value to be a `BigInt` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to BigInt values.\n\nBecause `BigInt` doesn't have a [`[Symbol.toPrimitive]()`](../../Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `BigInt` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, BigInt _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — rather, they are directly converted using the same algorithm as the initial `toString()` implementation.\n\n```js\nBigInt.prototype.toString = () => \"Overridden\";\nconsole.log(`${1n}`); // \"1\"\nconsole.log(`${Object(1n)}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/BigInt/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.prototype.valueOf()\n\nThe **`valueOf()`** method returns the wrapped primitive value\nof a `BigInt` object.\n\n## Syntax\n\n```js\nbigIntObj.valueOf()\n```\n\n### Return value\n\nA BigInt representing the primitive value of the specified `BigInt` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/BigInt64Array/BigInt64Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt64Array()\n\nThe **`BigInt64Array()`** typed array constructor creates a\nnew `BigInt64Array` object, which is, an array of 64-bit signed integers\nin the platform byte order. If control over byte order is needed, use\n[`DataView`](../DataView/DataView.mdx) instead. The contents are initialized to `0n`. Once\nestablished, you can reference elements in the array using the object's methods, or by\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew BigInt64Array()\nnew BigInt64Array(length)\nnew BigInt64Array(typedArray)\nnew BigInt64Array(object)\n\nnew BigInt64Array(buffer)\nnew BigInt64Array(buffer, byteOffset)\nnew BigInt64Array(buffer, byteOffset, length)\n```\n\n> **Note:** `BigInt64Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/BigUint64Array/BigUint64Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigUint64Array()\n\nThe **`BigUint64Array()`** typed array constructor creates a\nnew `BigUint64Array` object, which is, an array of 64-bit unsigned integers\nin the platform byte order. If control over byte order is needed, use\n[`DataView`](../DataView/DataView.mdx) instead. The contents are initialized to `0n`. Once\nestablished, you can reference elements in the array using the object's methods, or by\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew BigUint64Array()\nnew BigUint64Array(length)\nnew BigUint64Array(typedArray)\nnew BigUint64Array(object)\n\nnew BigUint64Array(buffer)\nnew BigUint64Array(buffer, byteOffset)\nnew BigUint64Array(buffer, byteOffset, length)\n```\n\n> **Note:** `BigUint64Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](..//TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Boolean/Boolean.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Boolean()\n\nThe **`Boolean()`** constructor can create `Boolean` objects or return primitive values of type boolean.\n\n## Syntax\n\n```js\nnew Boolean(value)\nBoolean(value)\n```\n\n> **Note:** `Boolean()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\n- `value`\n  - : The initial value of the `Boolean` object.\n\n### Return value\n\nWhen `Boolean()` is called as a constructor (with `new`), it creates a `Boolean` object, which is **not** a primitive.\n\nWhen `Boolean()` is called as a function (without `new`), it coerces the parameter to a boolean primitive.\n\n> **Warning:** You should rarely find yourself using `Boolean` as a constructor.\n\n## Description\n\nThe value passed as the first parameter is [converted to a boolean value](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean#boolean_coercion). If the value is omitted or is `0`, `-0`, `0n`, [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null), `false`, [`NaN`](../NaN.mdx), [`undefined`](../undefined.mdx), or the empty string (`\"\"`), then the object has an initial value of `false`. All other values, including any object, an empty array (`[]`), or the string `\"false\"`, create an object with an initial value of `true`.\n\n> **Note:** When the non-standard property [`document.all`](https://developer.mozilla.org/docs/Web/API/Document/all) is used as an argument for this constructor, the result is a `Boolean` object with the value `false`. This property is legacy and non-standard and should not be used.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Boolean/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Boolean.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified boolean value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified boolean value.\n\n## Description\n\nThe `Boolean` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../Object/prototype/toString.mdx). For `Boolean` values, the `toString` method returns a string representation of the boolean value, which is either `\"true\"` or `\"false\"`.\n\nThe `toString()` method requires its `this` value to be a `Boolean` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to boolean values.\n\nBecause `Boolean` doesn't have a [`[Symbol.toPrimitive]()`](../../Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `Boolean` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, boolean _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — rather, they are directly converted using the same algorithm as the initial `toString()` implementation.\n\n```js\nBoolean.prototype.toString = () => \"Overridden\";\nconsole.log(`${true}`); // \"true\"\nconsole.log(`${new Boolean(true)}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Boolean/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Boolean.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a\n`Boolean` object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nThe primitive value of the given `Boolean` object.\n\n## Description\n\nThe `valueOf()` method of `Boolean` returns the primitive value\nof a `Boolean` object or literal `Boolean` as a Boolean data type.\n\nThis method is usually called internally by JavaScript and not explicitly in code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/ByteLengthQueuingStrategy/ByteLengthQueuingStrategy.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ByteLengthQueuingStrategy()\n\nThe **`ByteLengthQueuingStrategy()`**\nconstructor creates and returns a `ByteLengthQueuingStrategy` object\ninstance.\n\n## Syntax\n\n```js\nnew ByteLengthQueuingStrategy(highWaterMark)\n```\n\n### Parameters\n\nAn object with the following property:\n\n- `highWaterMark`\n\n  - : The total number of bytes that can be contained in the internal queue before backpressure is applied.\n\n    Unlike `CountQueuingStrategy()` where the `highWaterMark` parameter specifies a simple count of the number of chunks, with `ByteLengthQueuingStrategy()`, the `highWaterMark` parameter specifies a number of _bytes_ — specifically, given a stream of chunks, how many bytes worth of those chunks (rather than a count of how many of those chunks) can be contained in the internal queue before backpressure is applied.\n\n### Return value\n\nAn instance of the `ByteLengthQueuingStrategy` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/ByteLengthQueuingStrategy/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ByteLengthQueuingStrategy.size()\n\nThe **`size()`** method of the\n`ByteLengthQueuingStrategy` interface returns the given chunk's\n`byteLength` property.\n\n## Syntax\n\n```js\nsize(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : A chunk of data being passed through the stream.\n\n### Return value\n\nAn integer representing the byte length of the given chunk.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/CompressionStream/CompressionStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CompressionStream()\n\nThe **`CompressionStream()`** constructor creates a new `CompressionStream` object which compresses a stream of data.\n\n## Syntax\n\n```js\nnew CompressionStream(format)\n```\n\n### Parameters\n\n- `format`\n\n  - : One of the following allowed compression formats:\n\n    - `\"gzip\"`\n    - `\"deflate\"`\n    - `\"deflate-raw\"`\n\n## Exceptions\n\n- `TypeError`\n  - : Thrown if the format passed to the constructor is not supported.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/CompressionStream/prototype/readable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CompressionStream.readable\n\nThe **`readable`** read-only property of the `CompressionStream` interface returns a `ReadableStream`.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/CompressionStream/prototype/writable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CompressionStream.writable\n\nThe **`writable`** read-only property of the `CompressionStream` interface returns a `WritableStream`.\n\n## Value\n\nA `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/CryptoKey/CryptoKey.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CryptoKey\n\nThe **`CryptoKey`** interface represents a cryptographic key obtained from one of the [`SubtleCrypto`](../SubtleCrypto/SubtleCrypto.mdx) method [`importKey()`](../SubtleCrypto/prototype/importKey.mdx).\n\n## Instance properties\n\n- [`type`](./prototype/type.mdx) _**readonly**_\n  - : The type of key the object represents. It may take one of the following values: `\"secret\"`, `\"private\"` or `\"public\"`.\n\n- [`extractable`](./prototype/extractable.mdx) _**readonly**_\n  - : A boolean value indicating whether or not the key may be extracted.\n\n- [`algorithm`](./prototype/algorithm.mdx) _**readonly**_\n  - : An object describing the algorithm for which this key can be used and any associated extra parameters.\n\n- [`usages`](./prototype/usages.mdx) _**readonly**_\n  - : An `Array` of strings, indicating what can be done with the key. Possible values for array elements are `\"encrypt\"`, `\"decrypt\"`, `\"sign\"`, `\"verify\"`, `\"deriveKey\"`, `\"deriveBits\"`, `\"wrapKey\"`, and `\"unwrapKey\"`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/CryptoKey/prototype/algorithm.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# algorithm\n\nThe read-only **`algorithm`** property of the [`CryptoKey`](../CryptoKey.mdx) interface returns an object describing the algorithm for which this key can be used, and any associated extra parameters.\n\nThe object returned depends of the algorithm used to generate the key.\n\n## Value\n\nAn object matching:\n\n- [`RsaHashedImportParams`](../../RsaHashedImportParams/RsaHashedImportParams.mdx) if the algorithm is any of the RSA variants.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/CryptoKey/prototype/extractable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# extractable\n\nThe read-only **`extractable`** property indicates whether or not the key may be extracted.\n\nIf the key cannot be exported, an exception will be thrown if an attempt to extract the key is made.\n\n## Value\n\nA boolean value that is `true` if the key can be exported and `false` if not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/CryptoKey/prototype/type.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# type\n\nThe read-only **`type`** property indicates which kind of key is represented by the object. It can have the following values:\n\n- `\"secret\"`: This key is a secret key for use with a symmetric algorithm.\n- `\"private\"`: This key is the private half of an asymmetric algorithm's key pair.\n- `\"public\"`: This key is the public half of an asymmetric algorithm's key pair.\n\n## Value\n\nOne of the following strings: `\"secret\"`, `\"private\"`, or `\"public\"`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/CryptoKey/prototype/usages.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# usages\n\nThe read-only **`usages`** property indicates what can be done with the key.\n\n## Value\n\nAn `Array` of strings from the following list:\n\n- `\"encrypt\"`: The key may be used to encrypt messages.\n- `\"decrypt\"`: The key may be used to decrypt messages.\n- `\"sign\"`: The key may be used to sign messages.\n- `\"verify\"`: The key may be used to verify signatures.\n- `\"deriveKey\"`: The key may be used in deriving a new key.\n- `\"deriveBits\"`: The key may be used in deriving bits.\n- `\"wrapKey\"`: The key may be used to wrap a key.\n- `\"unwrapKey\"`: The key may be used to unwrap a key.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/DataView/DataView.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView()\n\nThe **`DataView()`** constructor is used to create `DataView` objects.\n\n## Syntax\n\n```js\nnew DataView(buffer)\nnew DataView(buffer, byteOffset)\nnew DataView(buffer, byteOffset, byteLength)\n```\n\n> **Note:** `DataView()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `buffer`\n  - : An existing `ArrayBuffer` to use as\n    the storage backing the new `DataView` object.\n- `byteOffset` _**optional**_\n  - : The offset, in bytes, to the first byte in the above buffer for the new view to\n    reference. If unspecified, the buffer view starts with the first byte.\n- `byteLength` _**optional**_\n  - : The number of elements in the byte array. If unspecified, the view's length will\n    match the buffer's length.\n\n### Return value\n\nA new `DataView` object representing the specified data buffer.\n\n### Exceptions\n\n- [`RangeError`](../RangeError/RangeError.mdx)\n\n  - : Thrown if the `byteOffset` or `byteLength` parameter values\n    result in the view extending past the end of the buffer.\n\n    For example, if the buffer is 16 bytes long, the `byteOffset` is 8, and\n    the `byteLength` is 10, this error is thrown because the resulting view\n    tries to extend 2 bytes past the total length of the buffer.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/DataView/prototype/buffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.buffer\n\nThe **`buffer`** accessor property represents the `ArrayBuffer` referenced by the `DataView` at construction time.\n\n## Description\n\nThe `buffer` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when the `DataView` is constructed and cannot be changed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/DataView/prototype/byteLength.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.byteLength\n\nThe **`byteLength`** accessor property represents the length (in bytes) of the dataview.\n\n## Description\n\nThe `byteLength` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when an `DataView` is constructed and cannot be changed. If the `DataView` is not specifying an offset or a `byteLength`, the `byteLength` of the referenced `ArrayBuffer` or `SharedArrayBuffer` will be returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/DataView/prototype/byteOffset.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.byteOffset\n\nThe **`byteOffset`** accessor property represents the offset (in bytes) of this view from the start of its `ArrayBuffer`.\n\n## Description\n\nThe `byteOffset` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when an `DataView` is constructed and cannot be changed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/DataView/prototype/getBigInt64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getBigInt64()\n\nThe **`getBigInt64()`** method gets a signed 64-bit integer\n(long long) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetBigInt64(byteOffset)\ngetBigInt64(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to read the data from.\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is read.\n\n### Return value\n\nA `BigInt`.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would read beyond the end\n    of the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/DataView/prototype/getBigUint64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getBigUint64()\n\nThe **`getBigUint64()`** method gets an unsigned 64-bit integer\n(unsigned long long) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetBigUint64(byteOffset)\ngetBigUint64(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to read the data from.\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is read.\n\n### Return value\n\nA `BigInt`.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would read beyond the end\n    of the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/DataView/prototype/getFloat32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getFloat32()\n\nThe **`getFloat32()`** method gets a signed 32-bit float\n(float) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetFloat32(byteOffset)\ngetFloat32(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 32-bit float number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/DataView/prototype/getFloat64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getFloat64()\n\nThe **`getFloat64()`** method gets a signed 64-bit float\n(double) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetFloat64(byteOffset)\ngetFloat64(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 64-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 64-bit float number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/DataView/prototype/getInt16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getInt16()\n\nThe **`getInt16()`** method gets a signed 16-bit integer\n(short) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetInt16(byteOffset)\ngetInt16(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 16-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/DataView/prototype/getInt32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getInt32()\n\nThe **`getInt32()`** method gets a signed 32-bit integer (long)\nat the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetInt32(byteOffset)\ngetInt32(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in bytes, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 32-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/DataView/prototype/getInt8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getInt8()\n\nThe **`getInt8()`** method gets a signed 8-bit integer (byte)\nat the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetInt8(byteOffset)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n\n### Return value\n\nA signed 8-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/DataView/prototype/getUint16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getUint16()\n\nThe **`getUint16()`** method gets an unsigned 16-bit integer\n(unsigned short) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n\n\n## Syntax\n\n```js\ngetUint16(byteOffset)\ngetUint16(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nAn unsigned 16-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/DataView/prototype/getUint32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getUint32()\n\nThe **`getUint32()`** method gets an unsigned 32-bit integer\n(unsigned long) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n\n\n## Syntax\n\n```js\ngetUint32(byteOffset)\ngetUint32(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nAn unsigned 32-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/DataView/prototype/getUint8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getUint8()\n\nThe **`getUint8()`** method gets an unsigned 8-bit integer\n(unsigned byte) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetUint8(byteOffset)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n\n### Return value\n\nAn unsigned 8-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/DataView/prototype/setBigInt64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setBigInt64()\n\nThe **`setBigInt64()`** method stores a signed 64-bit integer\n(long long) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetBigInt64(byteOffset, value)\nsetBigInt64(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to store the data from.\n- value\n  - : The value to set as a `BigInt`. The highest possible value that fits in\n    a signed 64-bit integer is\n    `2n ** (64n -1n) - 1n` (`9223372036854775807n`). Upon\n    overflow, it will be negative (`-9223372036854775808n`).\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/DataView/prototype/setBigUint64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setBigUint64()\n\nThe **`setBigUint64()`** method stores an unsigned 64-bit\ninteger (unsigned long long) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetBigUint64(byteOffset, value)\nsetBigUint64(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to store the data from.\n- value\n  - : The value to set as a `BigInt`. The highest possible value that fits in\n    an unsigned 64-bit integer is\n    `2n ** 64n - 1n`\n    (`18446744073709551615n`). Upon overflow, it will be zero\n    (`0n`).\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/DataView/prototype/setFloat32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setFloat32()\n\nThe **`setFloat32()`** method stores a signed 32-bit float\n(float) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetFloat32(byteOffset, value)\nsetFloat32(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/DataView/prototype/setFloat64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setFloat64()\n\nThe **`setFloat64()`** method stores a signed 64-bit float\n(double) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetFloat64(byteOffset, value)\nsetFloat64(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 64-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/DataView/prototype/setInt16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setInt16()\n\nThe **`setInt16()`** method stores a signed 16-bit integer\n(short) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetInt16(byteOffset, value)\nsetInt16(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/DataView/prototype/setInt32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setInt32()\n\nThe **`setInt32()`** method stores a signed 32-bit integer\n(long) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetInt32(byteOffset, value)\nsetInt32(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/DataView/prototype/setInt8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setInt8()\n\nThe **`setInt8()`** method stores a signed 8-bit integer (byte)\nvalue at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetInt8(byteOffset, value)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/DataView/prototype/setUint16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setUint16()\n\nThe **`setUint16()`** method stores an unsigned 16-bit integer\n(unsigned short) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetUint16(byteOffset, value)\nsetUint16(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/DataView/prototype/setUint32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setUint32()\n\nThe **`setUint32()`** method stores an unsigned 32-bit integer\n(unsigned long) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetUint32(byteOffset, value)\nsetUint32(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/DataView/prototype/setUint8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setUint8()\n\nThe **`setUint8()`** method stores an unsigned 8-bit integer\n(byte) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetUint8(byteOffset, value)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/Date.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date()\n\nThe **`Date()`** constructor can create a `Date` instance or return a string representing the current time.\n\n## Syntax\n\n```js\nnew Date()\nnew Date(value)\nnew Date(dateString)\nnew Date(dateObject)\n\nnew Date(year, monthIndex)\nnew Date(year, monthIndex, day)\nnew Date(year, monthIndex, day, hours)\nnew Date(year, monthIndex, day, hours, minutes)\nnew Date(year, monthIndex, day, hours, minutes, seconds)\nnew Date(year, monthIndex, day, hours, minutes, seconds, milliseconds)\n\nDate()\n```\n\n> **Note:** `Date()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\nThere are five basic forms for the `Date()` constructor:\n\n#### No parameters\n\nWhen no parameters are provided, the newly-created `Date` object represents the current date and time as of the time of instantiation.\n\n#### Time value or timestamp number\n\n- `value`\n  - : An integer value representing the number of milliseconds since January 1, 1970, 00:00:00 UTC (the ECMAScript epoch, equivalent to the UNIX epoch), with leap seconds ignored. Keep in mind that most [UNIX Timestamp](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_16) functions are only accurate to the nearest second.\n\n#### Date string\n\n- `dateString`\n\n  - : A string value representing a date, in a format recognized by the [`Date.parse()`](./parse.mdx) method. (The ECMA262 spec specifies a [simplified version of ISO 8601](https://tc39.es/ecma262/#sec-date-time-string-format), but other formats can be implementation-defined, which commonly include [IETF-compliant RFC 2822 timestamps](https://datatracker.ietf.org/doc/html/rfc2822#page-14).)\n\n    > **Note:** When parsing date strings with the `Date` constructor (and `Date.parse`, they are equivalent), always make sure that the input conforms to the ISO 8601 format (`YYYY-MM-DDTHH:mm:ss.sssZ`) — the parsing behavior with other formats is implementation-defined and may not work across all browsers. Support for [RFC 2822](https://datatracker.ietf.org/doc/html/rfc2822) format strings is by convention only. A library can help if many different formats are to be accommodated.\n    >\n    > Date-only strings (e.g. `\"1970-01-01\"`) are treated as UTC, while date-time strings (e.g. `\"1970-01-01T12:00\"`) are treated as local. You are therefore also advised to make sure the input format is consistent between the two types.\n\n#### Date object\n\n- `dateObject`\n  - : An existing `Date` object. This effectively makes a copy of the existing `Date` object with the same date and time. This is equivalent to `new Date(dateObject.valueOf())`, except the `valueOf()` method is not called.\n\nWhen one parameter is passed to the `Date()` constructor, `Date` instances are specially treated. All other values are [converted to primitives](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion). If the result is a string, it will be parsed as a date string. Otherwise, the resulting primitive is further coerced to a number and treated as a timestamp.\n\n#### Individual date and time component values\n\nGiven at least a year and month, this form of `Date()` returns a `Date` object whose component values (year, month, day, hour, minute, second, and millisecond) all come from the following parameters. Any missing fields are given the lowest possible value (`1` for `day` and `0` for every other component). The parameter values are all evaluated against the local time zone, rather than UTC.\n\nIf any parameter overflows its defined bounds, it \"carries over\". For example, if a `monthIndex` greater than `11` is passed in, those months will cause the year to increment; if a `minutes` greater than `59` is passed in, `hours` will increment accordingly, etc. Therefore, `new Date(1990, 12, 1)` will return January 1st, 1991; `new Date(2020, 5, 19, 25, 65)` will return 2:05 A.M. June 20th, 2020.\n\nSimilarly, if any parameter underflows, it \"borrows\" from the higher positions. For example, `new Date(2020, 5, 0)` will return May 31st, 2020.\n\n- `year`\n  - : Integer value representing the year. Values from `0` to `99` map to the years `1900` to `1999`. All other values are the actual year. See the [example](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years).\n- `monthIndex`\n  - : Integer value representing the month, beginning with `0` for January to `11` for December.\n- `day` _**optional**_\n  - : Integer value representing the day of the month. The default is `1`.\n- `hours` _**optional**_\n  - : Integer value between `0` and `23` representing the hour of the day. Defaults to `0`.\n- `minutes` _**optional**_\n  - : Integer value representing the minute segment of a time. The default is `0` minutes past the hour.\n- `seconds` _**optional**_\n  - : Integer value representing the second segment of a time. The default is `0` seconds past the minute.\n- `milliseconds` _**optional**_\n  - : Integer value representing the millisecond segment of a time. The default is `0` milliseconds past the second.\n\n### Return value\n\nCalling `new Date()` (the `Date()` constructor) returns a [`Date`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date) object. If called with an invalid date string, or if the date to be constructed will have a UNIX timestamp less than `-8,640,000,000,000,000` or greater than `8,640,000,000,000,000` milliseconds, it returns a `Date` object whose [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toString) method returns the literal string `Invalid Date`.\n\nCalling the `Date()` function (without the `new` keyword) returns a string representation of the current date and time, exactly as `new Date().toString()` does. Any arguments given in a `Date()` function call (without the `new` keyword) are ignored; regardless of whether it's called with an invalid date string — or even called with any arbitrary object or other primitive as an argument — it always returns a string representation of the current date and time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/UTC.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.UTC()\n\nThe **`Date.UTC()`** method accepts parameters similar to the\n`Date` constructor, but treats them as UTC. It returns the number of\nmilliseconds since January 1, 1970, 00:00:00 UTC.\n\n\n\n## Syntax\n\n```js\nDate.UTC(year)\nDate.UTC(year, monthIndex)\nDate.UTC(year, monthIndex, day)\nDate.UTC(year, monthIndex, day, hour)\nDate.UTC(year, monthIndex, day, hour, minute)\nDate.UTC(year, monthIndex, day, hour, minute, second)\nDate.UTC(year, monthIndex, day, hour, minute, second, millisecond)\n```\n\n- `year`\n\n  - : Integer value representing the year.\n\n    Values from `0` to `99` map to the years\n    `1900` to `1999`. All other values are the actual year.\n    See the [example](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years).\n\n- `monthIndex` _**optional**_\n  - : An integer between `0` (January) and `11` (December)\n    representing the month. Since ECMAScript 2017 it defaults to `0` if\n    omitted. _(Up until ECMAScript 2016, `monthIndex` was a required\n    parameter. As of ES2017, it no longer is.)_\n- `day` _**optional**_\n  - : An integer between `1` and `31` representing the day of the\n    month. If omitted, defaults to `1`.\n- `hour` _**optional**_\n  - : An integer between `0` and `23` representing the hours. If\n    omitted, defaults to `0`.\n- `minute` _**optional**_\n  - : An integer between `0` and `59` representing the minutes. If\n    omitted, defaults to `0`.\n- `second` _**optional**_\n  - : An integer between `0` and `59` representing the seconds. If\n    omitted, defaults to `0`.\n- `millisecond` _**optional**_\n  - : An integer between `0` and `999` representing the\n    milliseconds. If omitted, defaults to `0`.\n\n### Return value\n\nA number representing the number of milliseconds for the given date since January 1,\n1970, 00:00:00, UTC.\n\n## Description\n\n`UTC()` takes comma-delimited date and time parameters and returns the\nnumber of milliseconds between January 1, 1970, 00:00:00, universal time and the\nspecified date and time.\n\nYears between `0` and `99` are converted to a year in the\n20th century `(1900 + year)`. For example, `95` is\nconverted to the year `1995`.\n\nThe `UTC()` method differs from the `Date` constructor in two\nways:\n\n1. `Date.UTC()` uses universal time instead of the local time.\n2. `Date.UTC()` returns a time value as a number instead of creating a\n   `Date` object.\n\nIf a parameter is outside of the expected range, the `UTC()` method updates\nthe other parameters to accommodate the value. For example, if `15` is used\nfor `monthIndex`, the year will be incremented by 1\n`(year + 1)` and `3` will be used for the month.\n\n`UTC()` is a static method of `Date`, so it's called as\n`Date.UTC()` rather than as a method of a `Date` instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/now.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.now()\n\nThe static **`Date.now()`** method returns the number of milliseconds elapsed since the [epoch](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps), which is defined as the midnight at the beginning of January 1, 1970, UTC.\n\n## Syntax\n\n```js\nDate.now()\n```\n\n### Return value\n\nA number representing the number of milliseconds elapsed since the [epoch](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps), which is defined as the midnight at the beginning of January 1, 1970, UTC.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/parse.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.parse()\n\nThe **`Date.parse()`** method parses a string representation of\na date, and returns the number of milliseconds since January 1, 1970, 00:00:00 UTC or\n`NaN` if the string is unrecognized or, in some cases, contains illegal date\nvalues (e.g. 2015-02-31).\n\nOnly the [ISO 8601 format](https://tc39.es/ecma262/#sec-date-time-string-format) (`YYYY-MM-DDTHH:mm:ss.sssZ`) is explicitly specified to be supported. Other formats are implementation-defined and may not work across all browsers. A library can help if many different formats are to be accommodated.\n\n## Syntax\n\n```js\nDate.parse(dateString)\n```\n\n### Parameters\n\n- `dateString`\n  - : A string representing [a simplification of the ISO 8601 calendar date extended format](#date-time-string-format).\n    (Other formats may be used, but results are implementation-dependent.)\n\n### Return value\n\nA number representing the milliseconds elapsed since January 1, 1970, 00:00:00 UTC and\nthe date obtained by parsing the given string representation of a date. If the argument\ndoesn't represent a valid date, [`NaN`](../NaN.mdx) is returned.\n\n## Description\n\nThe `parse()` method takes a date string (such as\n`\"2011-10-10T14:48:00\"`) and returns the number of milliseconds since January\n1, 1970, 00:00:00 UTC.\n\nThis function is useful for setting date values based on string values, for example in\nconjunction with the [`setTime()`](./prototype/setTime.mdx) method and the\n`Date` object.\n\n### Date Time String Format\n\nThe standard string representation of a date time string is a simplification of the ISO\n8601 calendar date extended format.\n(See the section [Date Time String Format](https://tc39.es/ecma262/#sec-date-time-string-format)\nin the ECMAScript specification for more details.)\n\nFor example, `\"2011-10-10\"` (_date-only_ form),\n`\"2011-10-10T14:48:00\"` (_date-time_ form), or\n`\"2011-10-10T14:48:00.000+09:00\"` (_date-time_ form with milliseconds\nand time zone) can be passed and will be parsed. When the time zone offset is absent,\ndate-only forms are interpreted as a UTC time and date-time forms are interpreted as\nlocal time.\n\nWhile time zone specifiers are used during date string parsing to interpret the\nargument, the value returned is always the number of milliseconds between January 1,\n1970 00:00:00 UTC and the point in time represented by the argument or `NaN`.\n\nBecause `parse()` is a static method of `Date`, it is called as\n`Date.parse()` rather than as a method of a `Date` instance.\n\n### Fall-back to implementation-specific date formats\n\n> **Note:** This section contains implementation-specific behavior that can be inconsistent\n> across implementations.\n\nThe ECMAScript specification states: If the String does not conform to the standard\nformat the function may fall back to any implementation–specific heuristics or\nimplementation–specific parsing algorithm. Unrecognizable strings or dates containing\nillegal element values in ISO formatted strings shall cause `Date.parse()` to\nreturn [`NaN`](../NaN.mdx).\n\nHowever, invalid values in date strings not recognized as simplified ISO format as\ndefined by ECMA-262 may or may not result in [`NaN`](../NaN.mdx), depending on the browser\nand values provided, e.g.:\n\n```js\n// Non-ISO string with invalid date values\nnew Date(\"23/25/2014\");\n```\n\nwill be treated as a local date of 25 November, 2015 in Firefox 30 and an invalid date\nin Safari 7.\n\nHowever, if the string is recognized as an ISO format string and it contains invalid\nvalues, it will return [`NaN`](../NaN.mdx):\n\n```js\n// ISO string with invalid values\nnew Date(\"2014-25-23\").toISOString();\n// throws \"RangeError: invalid date\"\n```\n\nSpiderMonkey's implementation-specific heuristic can be found in [`jsdate.cpp`](https://searchfox.org/mozilla-central/source/js/src/jsdate.cpp?rev=64553c483cd1#889).\nThe string `\"10 06 2014\"` is an example of a non-conforming ISO format and\nthus falls back to a custom routine. See also this [rough outline](https://bugzilla.mozilla.org/show_bug.cgi?id=1023155#c6) on\nhow the parsing works.\n\n```js\nnew Date(\"10 06 2014\");\n```\n\nwill be treated as a local date of 6 October, 2014, and not 10 June, 2014.\n\nOther examples:\n\n```js\nnew Date(\"foo-bar 2014\").toString();\n// returns: \"Invalid Date\"\n\nDate.parse(\"foo-bar 2014\");\n// returns: NaN\n```\n\n### Differences in assumed time zone\n\n> **Note:** This section contains implementation-specific behavior that can be inconsistent\n> across implementations.\n\nGiven a non-standard date string of `\"March 7, 2014\"`, `parse()` assumes a local time zone, but given a simplification of the ISO 8601 calendar date extended format such as `\"2014-03-07\"`, it will assume a time zone of UTC. Therefore `Date` objects produced using those strings may represent different moments in time depending on the version of ECMAScript supported unless the system is set with a local time zone of UTC. This means that two date strings that appear equivalent may result in two different values depending on the format of the string that is being converted.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/@@toPrimitive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype\\[Symbol.toPrimitive]\n\nThe **`[Symbol.toPrimitive]()`** method converts a `Date`\nobject to a primitive value.\n\n## Syntax\n\n```js\nDate()[Symbol.toPrimitive](hint)\n```\n\n### Return value\n\nThe primitive value of the given `Date` object. Depending on the argument,\nthe method can return either a string or a number.\n\n## Description\n\nThe `[Symbol.toPrimitive]()` method of the `Date` object returns a\nprimitive value, that is either of type number or of type string.\n\nIf `hint` is `string` or `default`,\n`[Symbol.toPrimitive]()` tries to call the [`toString`](../../Object/prototype/toString.mdx) method. If the `toString` property does not exist, it tries to\ncall the [`valueOf`](../../Object/prototype/valueOf.mdx) method and if the\n`valueOf` does not exist either, `[Symbol.toPrimitive]()` throws a\n[`TypeError`](../../../globals/TypeError/TypeError.mdx).\n\nIf `hint` is `number`, `[Symbol.toPrimitive]()` first tries\nto call `valueOf`, and if that fails, it calls `toString`.\n\nJavaScript calls the `[Symbol.toPrimitive]()` method to convert an object to a\nprimitive value. You rarely need to invoke the `[Symbol.toPrimitive]()` method\nyourself; JavaScript automatically invokes it when encountering an object where a\nprimitive value is expected.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/getDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getDate()\n\nThe **`getDate()`** method returns the day of the month for the\nspecified date according to local time.\n\n## Syntax\n\n```js\ngetDate()\n```\n\n### Return value\n\nAn integer number, between 1 and 31, representing the day of the month for the given\ndate according to local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/getDay.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getDay()\n\nThe **`getDay()`** method returns the\nday of the week for the specified date according to local time, where 0 represents\nSunday. For the day of the month, see [`Date.prototype.getDate()`](./getDate.mdx).\n\n## Syntax\n\n```js\ngetDay()\n```\n\n### Return value\n\nAn integer number, between 0 and 6, corresponding to the day of the week for the given\ndate, according to local time: 0 for Sunday, 1 for Monday, 2 for Tuesday, and so on.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/getFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getFullYear()\n\nThe **`getFullYear()`** method returns the year of the\nspecified date according to local time.\n\nUse this method instead of the [`Date.prototype.getYear()`](./getYear.mdx) method.\n\n## Syntax\n\n```js\ngetFullYear()\n```\n\n### Return value\n\nA number corresponding to the year of the given date, according to local time.\n\n## Description\n\nThe value returned by `getFullYear()` is an absolute number. For dates\nbetween the years 1000 and 9999, `getFullYear()` returns a four-digit number,\nfor example, 1995. Use this function to make sure a year is compliant with years after\n2000\\.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/getHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getHours()\n\nThe **`getHours()`** method returns the hour for the specified\ndate, according to local time.\n\n## Syntax\n\n```js\ngetHours()\n```\n\n### Return value\n\nAn integer number, between 0 and 23, representing the hour for the given date according\nto local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/getMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getMilliseconds()\n\nThe **`getMilliseconds()`** method returns the milliseconds in\nthe specified date according to local time.\n\n## Syntax\n\n```js\ngetMilliseconds()\n```\n\n### Return value\n\nA number, between 0 and 999, representing the milliseconds for the given date according\nto local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/getMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getMinutes()\n\nThe **`getMinutes()`** method returns the minutes in the\nspecified date according to local time.\n\n## Syntax\n\n```js\ngetMinutes()\n```\n\n### Return value\n\nAn integer number, between 0 and 59, representing the minutes in the given date\naccording to local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/getMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getMonth()\n\nThe **`getMonth()`** method returns the month in the specified\ndate according to local time, as a zero-based value (where zero indicates the first\nmonth of the year).\n\n## Syntax\n\n```js\ngetMonth()\n```\n\n### Return value\n\nAn integer number, between 0 and 11, representing the month in the given date according\nto local time. 0 corresponds to January, 1 to February, and so on.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/getSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getSeconds()\n\nThe **`getSeconds()`** method returns the seconds in the\nspecified date according to local time.\n\n## Syntax\n\n```js\ngetSeconds()\n```\n\n### Return value\n\nAn integer number, between 0 and 59, representing the seconds in the given date\naccording to local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/getTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getTime()\n\nThe **`getTime()`** method returns the number of milliseconds since the [epoch](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps), which is defined as the midnight at the beginning of January 1, 1970, UTC.\n\nYou can use this method to help assign a date and time to another `Date`\nobject. This method is functionally equivalent to the [`Date.prototype.valueOf()`](./valueOf.mdx) method.\n\n## Syntax\n\n```js\ngetTime()\n```\n\n### Return value\n\nA number representing the milliseconds elapsed between 1 January 1970 00:00:00 UTC and\nthe given date.\n\n## Description\n\nTo offer protection against timing attacks and fingerprinting, the precision of\n`new Date().getTime()` might get rounded depending on browser settings.\n\n```js\n// reduced time precision (2ms) in Firefox 60\nnew Date().getTime();\n// 1519211809934\n// 1519211810362\n// 1519211811670\n// …\n\n// reduced time precision with `privacy.resistFingerprinting` enabled\nnew Date().getTime();\n// 1519129853500\n// 1519129858900\n// 1519129864400\n// …\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/getTimezoneOffset.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getTimezoneOffset()\n\nThe **`getTimezoneOffset()`** method returns the difference, in minutes, between a date as evaluated in the UTC time zone, and the same date as evaluated in the local time zone.\n\n## Syntax\n\n```js\ngetTimezoneOffset()\n```\n\n### Return value\n\nThe difference, in minutes, between the date as evaluated in the UTC time zone and as evaluated in the local time zone. The actual local time algorithm is implementation-defined, and the return value is allowed to be zero in runtimes without appropriate data.\n\n## Description\n\n`date.getTimezoneOffset()` returns the difference, in minutes, between `date` as evaluated in the UTC time zone and as evaluated in the local time zone — that is, the time zone of the host system in which the browser is being used (if the code is run from the Web in a browser), or otherwise the host system of whatever JavaScript runtime (for example, a Node.js environment) the code is executed in.\n\n### Negative values and positive values\n\nThe number of minutes returned by `getTimezoneOffset()` is positive if the local time zone is behind UTC, and negative if the local time zone is ahead of UTC. For example, for UTC+10, `-600` will be returned.\n\n| Current time zone | Return value |\n| ----------------- | ------------ |\n| UTC-8             | 480          |\n| UTC               | 0            |\n| UTC+3             | -180         |\n\n### Varied results in Daylight Saving Time (DST) regions\n\nIn a region that annually shifts in and out of Daylight Saving Time (DST), as `date` varies, the number of minutes returned by calling `getTimezoneOffset()` can be non-uniform.\n\n> **Note:** `getTimezoneOffset()`'s behavior will never differ based on the time when the code is run — its behavior is always consistent when running in the same region. Only the value of `date` affects the result.\n\nIn most implementations, the [IANA time zone database](https://en.wikipedia.org/wiki/Daylight_saving_time#IANA_time_zone_database) (tzdata) is used to precisely determine the offset of the local timezone at the moment of the `date`. However, if such information is unavailable, an implementation may return zero.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/getUTCDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCDate()\n\nThe **`getUTCDate()`** method returns the day of the month (from\n1 to 31) in the specified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCDate()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer number ranging from 1 to 31\nrepresenting day of month for the given date, according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/getUTCDay.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCDay()\n\nThe **`getUTCDay()`** method returns the day of the week in the\nspecified date according to universal time, where 0 represents Sunday.\n\n## Syntax\n\n```js\ngetUTCDay()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer number corresponding to the day\nof the week for the given date, according to universal time: 0 for Sunday, 1 for Monday,\n2 for Tuesday, and so on.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/getUTCFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCFullYear()\n\nThe **`getUTCFullYear()`** method returns the year in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCFullYear()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer representing the year in the given date\naccording to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n\n## Description\n\nThe value returned by `getUTCFullYear()` is an absolute number that is\ncompliant with year-2000, for example, 1995.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/getUTCHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCHours()\n\nThe **`getUTCHours()`** method returns the hours in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCHours()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 23, representing the hours in the given date according\nto Coordinated Universal Time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/getUTCMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCMilliseconds()\n\nThe **`getUTCMilliseconds()`** method returns the milliseconds\nportion of the time object's value according to universal time.\n\n## Syntax\n\n```js\ngetUTCMilliseconds()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 999, representing\nthe milliseconds portion of the given `Date` object according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n\nNot to be confused with Unix epoch time. To get the total milliseconds since 1970/01/01,\nuse the [`getTime()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/getTime) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/getUTCMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCMinutes()\n\nThe **`getUTCMinutes()`** method returns the minutes in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCMinutes()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 59,\nrepresenting the minutes in the given date according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/getUTCMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCMonth()\n\nThe **`getUTCMonth()`** returns the month of the specified date\naccording to universal time, as a zero-based value (where zero indicates the first month\nof the year).\n\n## Syntax\n\n```js\ngetUTCMonth()\n```\n\n### Return value\n\nA number. If the `Date` object represents a valid date, an integer number, between 0 and 11,\ncorresponding to the month of the given date according to universal time. 0 for January,\n1 for February, 2 for March, and so on. Otherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/getUTCSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCSeconds()\n\nThe **`getUTCSeconds()`** method returns the seconds in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCSeconds()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 59, representing\nthe seconds in the given date according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/getYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getYear()\n\nThe **`getYear()`** method returns the year in the specified\ndate according to local time. Because `getYear()` does not return full years\n(\"year 2000 problem\"), it is no longer used and has been replaced by the\n[`Date.prototype.getFullYear()`](./getFullYear.mdx) method.\n\n## Syntax\n\n```js\ngetYear()\n```\n\n### Return value\n\nA number representing the year of the given date, according to local time, minus 1900.\n\n## Description\n\n- For years greater than or equal to 2000, the value returned by\n  `getYear()` is 100 or greater. For example, if the year is 2026,\n  `getYear()` returns 126.\n- For years between and including 1900 and 1999, the value returned by\n  `getYear()` is between 0 and 99. For example, if the year is 1976,\n  `getYear()` returns 76.\n- For years less than 1900, the value returned by `getYear()` is less than 0. For example, if the year is 1800, `getYear()` returns -100.\n\nTo take into account years before and after 2000, you should use\n[`Date.prototype.getFullYear()`](./getFullYear.mdx) instead of\n`getYear()` so that the year is specified in full.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/setDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setDate()\n\nThe **`setDate()`** method changes the day of the month of a given `Date` instance, based on local time.\n\nTo instead change the day of the month for a given `Date` instance based on UTC time, use the [`Date.prototype.setUTCDate()`](./setUTCDate.mdx) method.\n\n## Syntax\n\n```js\nsetDate(dayValue)\n```\n\n### Parameters\n\n- `dayValue`\n  - : An integer representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the given date (the\n`Date` object is also changed in place).\n\n## Description\n\nIf the `dayValue` is outside of the range of date values for the month, `setDate()` will update the `Date` object accordingly.\n\nFor example, if 0 is provided for `dayValue`, the date will be set to the last day of the previous month. If you use 40 for `dayValue`, and the month stored in the `Date` object is June, the day will be changed to 10 and the month will be incremented to July.\n\nIf a negative number is provided for `dayValue`, the date will be set counting backwards from the last day of the previous month. -1 would result in the date being set to 1 day before the last day of the previous month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/setFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setFullYear()\n\nThe **`setFullYear()`** method sets the full year for a\nspecified date according to local time. Returns new timestamp.\n\n## Syntax\n\n```js\nsetFullYear(yearValue)\nsetFullYear(yearValue, monthValue)\nsetFullYear(yearValue, monthValue, dateValue)\n```\n\n### Parameters\n\n- `yearValue`\n  - : An integer specifying the numeric value of the year, for example, 1995.\n- `monthValue`\n  - : Optional. An integer between 0 and 11 representing the months January through\n    December.\n- `dateValue`\n  - : Optional. An integer between 1 and 31 representing the day of the month. If you\n    specify the `dateValue` parameter, you must also specify the\n    `monthValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `monthValue` and\n`dateValue` parameters, the values returned from the\n[`Date.prototype.getMonth()`](./getMonth.mdx) and\n[`Date.prototype.getDate()`](./getDate.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range, `setFullYear()`\nattempts to update the other parameters and the date information in the\n`Date` object accordingly. For example, if you specify 15 for\n`monthValue`, the year is incremented by 1\n(`yearValue + 1`), and 3 is used for the month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/setHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setHours()\n\nThe **`setHours()`** method sets the hours for a specified date\naccording to local time, and returns the number of milliseconds since January 1, 1970\n00:00:00 UTC until the time represented by the updated `Date` instance.\n\n## Syntax\n\n```js\nsetHours(hoursValue)\nsetHours(hoursValue, minutesValue)\nsetHours(hoursValue, minutesValue, secondsValue)\nsetHours(hoursValue, minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `hoursValue`\n  - : Ideally, an integer between 0 and 23, representing the hour. If a value greater than\n    23 is provided, the datetime will be incremented by the extra hours.\n- `minutesValue`\n  - : Optional. Ideally, an integer between 0 and 59, representing the minutes. If a value\n    greater than 59 is provided, the datetime will be incremented by the extra minutes.\n- `secondsValue`\n  - : Optional. Ideally, an integer between 0 and 59, representing the seconds. If a value\n    greater than 59 is provided, the datetime will be incremented by the extra seconds. If\n    you specify the `secondsValue` parameter, you must also specify\n    the `minutesValue`.\n- `msValue`\n  - : Optional. Ideally, a number between 0 and 999, representing the milliseconds. If a\n    value greater than 999 is provided, the datetime will be incremented by the extra\n    milliseconds. If you specify the `msValue` parameter, you must\n    also specify the `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between January 1, 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `minutesValue`,\n`secondsValue`, and `msValue` parameters,\nthe values returned from the [`Date.prototype.getMinutes()`](./getMinutes.mdx),\n[`Date.prototype.getSeconds()`](./getSeconds.mdx), and\n[`Date.prototype.getMilliseconds()`](./getMilliseconds.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range, `setHours()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes will\nbe incremented by 1 (`minutesValue + 1`), and 40 will be used for\nseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/setMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setMilliseconds()\n\nThe **`setMilliseconds()`** method sets the milliseconds for a\nspecified date according to local time.\n\n## Syntax\n\n```js\nsetMilliseconds(millisecondsValue)\n```\n\n### Parameters\n\n- `millisecondsValue`\n  - : A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you specify a number outside the expected range, the date information in the\n`Date` object is updated accordingly. For example, if you specify 1005, the\nnumber of seconds is incremented by 1, and 5 is used for the milliseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/setMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setMinutes()\n\nThe **`setMinutes()`** method sets the minutes for a specified\ndate according to local time.\n\n## Syntax\n\n```js\nsetMinutes(minutesValue)\nsetMinutes(minutesValue, secondsValue)\nsetMinutes(minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `minutesValue`\n  - : An integer between 0 and 59, representing the minutes.\n- `secondsValue`\n  - : Optional. An integer between 0 and 59, representing the seconds. If you specify the\n    `secondsValue` parameter, you must also specify the\n    `minutesValue`.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds. If you specify\n    the `msValue` parameter, you must also specify the\n    `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `secondsValue` and\n`msValue` parameters, the values returned from\n[`Date.prototype.getSeconds()`](./getSeconds.mdx) and\n[`Date.prototype.getMilliseconds()`](./getMilliseconds.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range, `setMinutes()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes will\nbe incremented by 1 (`minutesValue + 1`), and 40 will be used for\nseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/setMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setMonth()\n\nThe **`setMonth()`** method sets the month for a specified date according to the currently set year.\n\n## Syntax\n\n```js\nsetMonth(monthValue)\nsetMonth(monthValue, dayValue)\n```\n\n### Parameters\n\n- `monthValue`\n  - : A zero-based integer representing the month of the year offset from the start of the\n    year. So, 0 represents January, 11 represents December, -1 represents December of the\n    previous year, and 12 represents January of the following year.\n- `dayValue`\n  - : Optional. An integer from 1 to 31, representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `dayValue` parameter, the value\nreturned from the [`Date.prototype.getDate()`](./getDate.mdx) method is used.\n\nIf a parameter you specify is outside of the expected range, `setMonth()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 15 for `monthValue`, the year will be\nincremented by 1, and 3 will be used for month.\n\nThe current day of month will have an impact on the behavior of this method.\nConceptually it will add the number of days given by the current day of the month to the\n1st day of the new month specified as the parameter, to return the new date.\nFor example, if the current value is 31st January 2016, calling setMonth with a value of 1 will return 2nd March 2016.\nThis is because in 2016 February had 29 days.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/setSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setSeconds()\n\nThe **`setSeconds()`** method sets the seconds for a specified\ndate according to local time.\n\n## Syntax\n\n```js\nsetSeconds(secondsValue)\nsetSeconds(secondsValue, msValue)\n```\n\n### Parameters\n\n- `secondsValue`\n  - : An integer between 0 and 59, representing the seconds.\n- `msValue` _**optional**_\n  - : Optional. A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `msValue` parameter, the value returned\nfrom the [`Date.prototype.getMilliseconds()`](./getMilliseconds.mdx) method is\nused.\n\nIf a parameter you specify is outside of the expected range, `setSeconds()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes stored\nin the `Date` object will be incremented by 1, and 40 will be used for\nseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/setTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setTime()\n\nThe **`setTime()`** method sets the `Date` object\nto the time represented by a number of milliseconds since January 1, 1970, 00:00:00 UTC.\n\n## Syntax\n\n```js\nsetTime(timeValue)\n```\n\n### Parameters\n\n- `timeValue`\n  - : An integer representing the number of milliseconds since 1 January 1970, 00:00:00\n    UTC.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date\n(effectively, the value of the argument).\n\n## Description\n\nUse the `setTime()` method to help assign a date and time to another\n`Date` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/setUTCDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCDate()\n\nThe **`setUTCDate()`** method changes the day of the month of a given `Date` instance, based on UTC time.\n\nTo instead change the day of the month for a given `Date` instance based on local time, use the [`Date.prototype.setDate()`](././setDate.mdx) method.\n\n## Syntax\n\n```js\nsetUTCDate(dayValue)\n```\n\n### Parameters\n\n- `dayValue`\n  - : An integer from 1 to 31, representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf the `dayValue` is outside of the range of date values for the month, `setDate()` will update the `Date` object accordingly.\n\nFor example, if 0 is provided for `dayValue`, the date will be set to the last day of the previous month. If you use 40 for `dayValue`, and the month stored in the `Date` object is June, the day will be changed to 10 and the month will be incremented to July.\n\nIf a negative number is provided for `dayValue`, the date will be set counting backwards from the last day of the previous month. -1 would result in the date being set to 1 day before the last day of the previous month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/setUTCFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCFullYear()\n\nThe **`setUTCFullYear()`** method sets the full year for a\nspecified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCFullYear(yearValue)\nsetUTCFullYear(yearValue, monthValue)\nsetUTCFullYear(yearValue, monthValue, dayValue)\n```\n\n### Parameters\n\n- `yearValue`\n  - : An integer specifying the numeric value of the year, for example, 1995.\n- `monthValue`\n  - : Optional. An integer between 0 and 11 representing the months January through\n    December.\n- `dayValue`\n  - : Optional. An integer between 1 and 31 representing the day of the month. If you\n    specify the `dayValue` parameter, you must also specify the\n    `monthValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `monthValue` and\n`dayValue` parameters, the values returned from the\n[`Date.prototype.getUTCMonth()`](./getUTCMonth.mdx) and\n[`Date.prototype.getUTCDate()`](./getUTCDate.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range,\n`setUTCFullYear()` attempts to update the other parameters and the date\ninformation in the `Date` object accordingly. For example, if you specify 15\nfor `monthValue`, the year is incremented by 1\n(`yearValue + 1`), and 3 is used for the month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/setUTCHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCHours()\n\nThe **`setUTCHours()`** method sets the hour for a specified\ndate according to universal time, and returns the number of milliseconds since January\n1, 1970 00:00:00 UTC until the time represented by the updated `Date`\ninstance.\n\n## Syntax\n\n```js\nsetUTCHours(hoursValue)\nsetUTCHours(hoursValue, minutesValue)\nsetUTCHours(hoursValue, minutesValue, secondsValue)\nsetUTCHours(hoursValue, minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `hoursValue`\n  - : An integer between 0 and 23, representing the hour.\n- `minutesValue`\n  - : Optional. An integer between 0 and 59, representing the minutes.\n- `secondsValue`\n  - : Optional. An integer between 0 and 59, representing the seconds. If you specify the\n    `secondsValue` parameter, you must also specify the\n    `minutesValue`.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds. If you specify\n    the `msValue` parameter, you must also specify the\n    `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between January 1, 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `minutesValue`,\n`secondsValue`, and `msValue` parameters,\nthe values returned from the [`Date.prototype.getUTCMinutes()`](./getUTCMinutes.mdx), [`Date.prototype.getUTCSeconds()`](./getUTCSeconds.mdx),\nand [`Date.prototype.getUTCMilliseconds()`](./getUTCMilliseconds.mdx) methods\nare used.\n\nIf a parameter you specify is outside of the expected range, `setUTCHours()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes will\nbe incremented by 1 (`minutesValue + 1`), and 40 will be used for seconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/setUTCMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCMilliseconds()\n\nThe **`setUTCMilliseconds()`** method sets the milliseconds for\na specified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCMilliseconds(millisecondsValue)\n```\n\n### Parameters\n\n- `millisecondsValue`\n  - : A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf a parameter you specify is outside of the expected range,\n`setUTCMilliseconds()` attempts to update the date information in the\n`Date` object accordingly. For example, if you use 1100 for\n`millisecondsValue`, the seconds stored in the `Date`\nobject will be incremented by 1, and 100 will be used for milliseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/setUTCMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCMinutes()\n\nThe **`setUTCMinutes()`** method sets the minutes for a\nspecified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCMinutes(minutesValue)\nsetUTCMinutes(minutesValue, secondsValue)\nsetUTCMinutes(minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `minutesValue`\n  - : An integer between 0 and 59, representing the minutes.\n- `secondsValue`\n  - : Optional. An integer between 0 and 59, representing the seconds. If you specify the\n    `secondsValue` parameter, you must also specify the\n    `minutesValue`.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds. If you specify\n    the `msValue` parameter, you must also specify the\n    `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `secondsValue` and\n`msValue` parameters, the values returned from\n[`Date.prototype.getUTCSeconds()`](./getUTCSeconds.mdx) and\n[`Date.prototype.getUTCMilliseconds()`](./getUTCMilliseconds.mdx) methods are\nused.\n\nIf a parameter you specify is outside of the expected range,\n`setUTCMinutes()` attempts to update the date information in the\n`Date` object accordingly. For example, if you use 100 for\n`secondsValue`, the minutes will be incremented by 1\n(`minutesValue + 1`), and 40 will be used for seconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/setUTCMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCMonth()\n\nThe **`setUTCMonth()`** method sets the month for a specified\ndate according to universal time.\n\n## Syntax\n\n```js\nsetUTCMonth(monthValue)\nsetUTCMonth(monthValue, dayValue)\n```\n\n### Parameters\n\n- `monthValue`\n  - : An integer between 0 and 11, representing the months January through December.\n- `dayValue`\n  - : Optional. An integer from 1 to 31, representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `dayValue` parameter, the value returned from the\n[`Date.prototype.getUTCDate()`](./getUTCDate.mdx) method is used.\n\nIf a parameter you specify is outside of the expected range, `setUTCMonth()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 15 for `monthValue`, the year will be incremented by\n1, and 3 will be used for month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/setUTCSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCSeconds()\n\nThe **`setUTCSeconds()`** method sets the seconds for a\nspecified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCSeconds(secondsValue)\nsetUTCSeconds(secondsValue, msValue)\n```\n\n### Parameters\n\n- `secondsValue`\n  - : An integer between 0 and 59, representing the seconds.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `msValue` parameter, the value returned from the\n[`Date.prototype.getUTCMilliseconds()`](./getUTCMilliseconds.mdx) method is\nused.\n\nIf a parameter you specify is outside of the expected range,\n`setUTCSeconds()` attempts to update the date information in the\n`Date` object accordingly. For example, if you use 100 for\n`secondsValue`, the minutes stored in the `Date` object will be\nincremented by 1, and 40 will be used for seconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/setYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setYear()\n\nThe legacy **`setYear()`** method sets the year for a specified date according to local time.\n\nHowever, the way the legacy `setYear()` method sets year values is different from how the preferred [`Date.prototype.setFullYear()`](./setFullYear.mdx) method sets year values — and in some cases, also different from how `new Date()` and [`Date.parse()`](../parse.mdx) set year values. Specifically, given two-digit numbers, such as `22` and `61`:\n\n- `setYear()` interprets any two-digit number as an offset to `1900`; so `date.setYear(22)` results in the year value being set to `1922`, and `date.setYear(61)` results in the year value being set to `1961`. (In contrast, while `new Date(61, 1)` also results in the year value being set to `1961`, `new Date(\"2/1/22\")` results in the year value being set to `2022`; and similarly for [`Date.parse()`](../parse.mdx)).\n\n- [`Date.prototype.setFullYear()`](./setFullYear.mdx) does no special interpretation but instead uses the literal two-digit value as-is to set the year; so `date.setFullYear(61)` results in the year value being set to `0061`, and `date.setFullYear(22)` results in the year value being set to `0022`.\n\nBecause of those differences in behavior, you should no longer use the legacy `setYear()` method, but should instead use the preferred [`Date.prototype.setFullYear()`](./setFullYear.mdx) method.\n\n## Syntax\n\n```js\nsetYear(yearValue)\n```\n\n### Parameters\n\n- `yearValue`\n  - : An integer.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf `yearValue` is a number between 0 and 99 (inclusive), then the year for\n`dateObj` is set to `1900 + yearValue`. Otherwise, the year for\n`dateObj` is set to `yearValue`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/toDateString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toDateString()\n\nThe **`toDateString()`** method returns the date portion of a `Date` object interpreted in the local timezone in English.\n\n## Syntax\n\n```js\ntoDateString()\n```\n\n### Return value\n\nA string representing the date portion of the given `Date` object in human readable form in English.\n\n## Description\n\n`Date` instances refer to a specific point in time. `toDateString()` interprets the date in the local timezone and formats the _date_ part in English. It always uses the following format, separated by spaces:\n\n1. First three letters of the week day name\n2. First three letters of the month name\n3. Two-digit day of the month, padded on the left a zero if necessary\n4. Four-digit year (at least), padded on the left with zeros if necessary. May have a negative sign\n\nFor example: \"Thu Jan 01 1970\".\n\n- If you want to get the _time_ part, use [`toTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString).\n- If you want to get both the date and time, use [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toString).\n- If you want to make the date interpreted as UTC instead of local timezone, use [`toUTCString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString).\n- If you want to format the date in a more user-friendly format (e.g. localization), use [`toLocaleDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/toISOString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toISOString()\n\nThe **`toISOString()`** method returns a string in _simplified_ extended ISO format ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)), which is always 24 or 27 characters long (`YYYY-MM-DDTHH:mm:ss.sssZ` or `±YYYYYY-MM-DDTHH:mm:ss.sssZ`, respectively). The timezone is always zero UTC offset, as denoted by the suffix `Z`.\n\n## Syntax\n\n```js\ntoISOString()\n```\n\n### Return value\n\nA string representing the given date in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format according to universal time. It's the same format as the one required to be recognized by [`Date.parse()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/parse#date-time-string-format).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/toJSON.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toJSON()\n\nThe **`toJSON()`** method returns a string representation of\nthe `Date` object.\n\n## Syntax\n\n```js\ntoJSON()\n```\n\n### Return value\n\nA string representation of the given date.\n\n## Description\n\n`Date` instances refer to a specific point in time. `toJSON()` calls the object's [`Date.prototype.toISOString()`](./toISOString.mdx) method, which returns a string representing the `Date` object's value. This method is generally intended to, by default, usefully serialize `Date` objects during [JSON](https://developer.mozilla.org/docs/Glossary/JSON) serialization, which can then be deserialized using the [`Date()` constructor](../Date.mdx) or [`Date.parse()`](../parse.mdx) as the reviver of [`JSON.parse()`](../../JSON/parse.mdx).\n\nThe method first attempts to convert its `this` value [to a primitive](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion) by calling its [`[Symbol.toPrimitive]()`](../../Symbol/toPrimitive.mdx) (with `\"number\"` as hint), [`valueOf()`](../../Object/prototype/valueOf.mdx), and [`toString()`](../../Object/prototype/toString.mdx) methods, in that order. If the result is a [non-finite](../../Number/isFinite.mdx) number, `null` is returned. (This generally corresponds to an invalid date, whose [`valueOf()`](./valueOf.mdx) returns [`NaN`](../../NaN.mdx).) Otherwise, if the converted primitive is not a number or is a finite number, the return value of `this.toISOString()` is returned.\n\nNote that the method does not check whether the `this` value is a valid `Date` object. However, calling `Date.prototype.toJSON()` on non-`Date` objects does not have well-defined semantics.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/toLocaleDateString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toLocaleDateString()\n\nThe **`toLocaleDateString()`** method returns a string with a language-sensitive representation of the date portion of the specified date in the user agent's timezone. In implementations with [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) support, this method simply calls `Intl.DateTimeFormat`.\n\n## Syntax\n\n```js\ntoLocaleDateString()\ntoLocaleDateString(locales)\ntoLocaleDateString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat), these parameters correspond exactly to the [`Intl.DateTimeFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) constructor's parameters. Implementations without `Intl.DateTimeFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales) parameter of the `Intl.DateTimeFormat()` constructor.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options) parameter of the `Intl.DateTimeFormat()` constructor. The `timeStyle` option must be undefined, or a [`TypeError`](../../../globals/TypeError/TypeError.mdx) would be thrown. If `weekday`, `year`, `month`, and `day` are all undefined, then `year`, `month`, and `day` will be set to `\"numeric\"`.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored.\n\nSee the [`Intl.DateTimeFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string representing the date portion of the given `Date` instance according to language-specific conventions.\n\nIn implementations with `Intl.DateTimeFormat`, this is equivalent to `new Intl.DateTimeFormat(locales, options).format(date)`, where `options` has been normalized as described above.\n\n## Performance\n\nWhen formatting large numbers of dates, it is better to create an [`Intl.DateTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) object and use its [`format()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/format) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string with a language-sensitive representation of this date. In implementations with [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) support, this method simply calls `Intl.DateTimeFormat`.\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat), these parameters correspond exactly to the [`Intl.DateTimeFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) constructor's parameters. Implementations without `Intl.DateTimeFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales) parameter of the `Intl.DateTimeFormat()` constructor.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options) parameter of the `Intl.DateTimeFormat()` constructor. If `weekday`, `year`, `month`, `day`, `dayPeriod`, `hour`, `minute`, `second`, and `fractionalSecondDigits` are all undefined, then `year`, `month`, `day`, `hour`, `minute`, `second` will be set to `\"numeric\"`.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored.\n\nSee the [`Intl.DateTimeFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string representing the given date according to language-specific conventions.\n\nIn implementations with `Intl.DateTimeFormat`, this is equivalent to `new Intl.DateTimeFormat(locales, options).format(date)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/toLocaleTimeString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toLocaleTimeString()\n\nThe **`toLocaleTimeString()`** method returns a string with a language-sensitive representation of the time portion of the date. In implementations with [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) support, this method simply calls `Intl.DateTimeFormat`.\n\n## Syntax\n\n```js\ntoLocaleTimeString()\ntoLocaleTimeString(locales)\ntoLocaleTimeString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat), these parameters correspond exactly to the [`Intl.DateTimeFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) constructor's parameters. Implementations without `Intl.DateTimeFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales) parameter of the `Intl.DateTimeFormat()` constructor.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options) parameter of the `Intl.DateTimeFormat()` constructor. If `dayPeriod`, `hour`, `minute`, `second`, and `fractionalSecondDigits` are all undefined, then `hour`, `minute`, `second` will be set to `\"numeric\"`.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored.\n\nSee the [`Intl.DateTimeFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string representing the time portion of the given `Date` instance according to language-specific conventions.\n\nIn implementations with `Intl.DateTimeFormat`, this is equivalent to `new Intl.DateTimeFormat(locales, options).format(date)`, where `options` has been normalized as described above.\n\n## Performance\n\nWhen formatting large numbers of dates, it is better to create an [`Intl.DateTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) object and use its [`format()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/format) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified `Date` object interpreted in the local timezone.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the given date.\n\n## Description\n\nThe `Date` object overrides the `toString()` method of `Object`. `Date.prototype.toString()` returns a string representation of the Date as interpreted in the local timezone, containing both the date and the time — it joins the string representation specified in [`toDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString) and [`toTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString) together, adding a space in between.\n\nFor example: \"Thu Jan 01 1970 04:42:04 GMT+0000 (Coordinated Universal Time)\"\n\nThe `toString()` method is automatically called when a date is coerced to a string, such as `const today = 'Today is ' + new Date()`.\n\n`Date.prototype.toString()` must be called on `Date` instances. If the `this` value does not inherit from `Date.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n- If you only want to get the _date_ part, use [`toDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString).\n- If you only want to get the _time_ part, use [`toTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString).\n- If you want to make the date interpreted as UTC instead of local timezone, use [`toUTCString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString).\n- If you want to format the date in a more user-friendly format (e.g. localization), use [`toLocaleString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/toTimeString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toTimeString()\n\nThe **`toTimeString()`** method returns the time portion of a `Date` object interpreted in the local timezone in English.\n\n## Syntax\n\n```js\ntoTimeString()\n```\n\n### Return value\n\nA string representing the time portion of the given date in human readable form in English.\n\n## Description\n\n`Date` instances refer to a specific point in time. `toTimeString()` interprets the date in the local timezone and formats the _time_ part in English. It always uses the format of `hh:mm:ss GMT±xxxx (TZ)`, where:\n\n| Format String | Description                                                                                           |\n| ------------- | ----------------------------------------------------------------------------------------------------- |\n| `hh`          | Hour, as two digits with leading zero if required                                                     |\n| `mm`          | Minute, as two digits with leading zero if required                                                   |\n| `ss`          | Seconds, as two digits with leading zero if required                                                  |\n| `±xxxx`       | The local timezone's offset — two digits for hours and two digits for minutes (e.g. `-0500`, `+0800`) |\n| `TZ`          | The timezone's name (e.g. `PDT`, `PST`)                                                               |\n\nFor example: \"04:42:04 GMT+0000 (Coordinated Universal Time)\".\n\n- If you want to get the _date_ part, use [`toDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString).\n- If you want to get both the date and time, use [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toString).\n- If you want to make the date interpreted as UTC instead of local timezone, use [`toUTCString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString).\n- If you want to format the date in a more user-friendly format (e.g. localization), use [`toLocaleTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleTimeString).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/toUTCString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toUTCString()\n\nThe **`toUTCString()`** method converts a date to a string, interpreting it in the UTC time zone. `toGMTString()` is an alias of this method.\n\nBased on [rfc7231](https://datatracker.ietf.org/doc/html/rfc7231#section-7.1.1.1) and modified according to [ECMA-262 toUTCString](https://tc39.es/ecma262/#sec-date.prototype.toutcstring), it can have negative values.\n\n## Syntax\n\n```js\ntoUTCString()\n```\n\n### Return value\n\nA string representing the given date using the UTC time zone.\n\n## Description\n\nThe value returned by `toUTCString()` is a string in the form `Www, dd Mmm yyyy hh:mm:ss GMT`, where:\n\n| Format String | Description                                                  |\n| ------------- | ------------------------------------------------------------ |\n| `Www`         | Day of week, as three letters (e.g. `Sun`, `Mon`)            |\n| `dd`          | Day of month, as two digits with leading zero if required    |\n| `Mmm`         | Month, as three letters (e.g. `Jan`, `Feb`)                  |\n| `yyyy`        | Year, as four or more digits with leading zeroes if required |\n| `hh`          | Hour, as two digits with leading zero if required            |\n| `mm`          | Minute, as two digits with leading zero if required          |\n| `ss`          | Seconds, as two digits with leading zero if required         |\n\n### Aliasing\n\nJavaScript's `Date` API was inspired by Java's `java.util.Date` library (while the latter had become de facto legacy since Java 1.1 in 1997). In particular, the Java `Date` class had a method called `toGMTString` — which was poorly named, because the [Greenwich Mean Time](https://en.wikipedia.org/wiki/Greenwich_Mean_Time) is not equivalent to the [Coordinated Universal Time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time), while JavaScript dates always operate by UTC time. For web compatibility reasons, `toGMTString` remains as an alias to `toUTCString`, and they refer to the exact same function object. This means:\n\n```js\nDate.prototype.toGMTString.name === \"toUTCString\";\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Date/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a\n`Date` object.\n\n\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the given date, or [`NaN`](../../NaN.mdx) in case of an invalid date.\n\n## Description\n\nThe `valueOf()` method returns the primitive value of a `Date`\nobject as a number data type, the number of milliseconds since midnight 01 January, 1970\nUTC.\n\nThis method is functionally equivalent to the [`Date.prototype.getTime()`](./getTime.mdx)\nmethod.\n\nThis method is usually called internally by JavaScript and not explicitly in code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/DecompressionStream/DecompressionStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DecompressionStream()\n\nThe **`DecompressionStream()`** constructor creates a new `DecompressionStream` object which decompresses a stream of data.\n\n## Syntax\n\n```js\nnew DecompressionStream(format)\n```\n\n### Parameters\n\n- `format`\n\n  - : One of the following compression formats:\n\n    - `\"gzip\"`\n    - `\"deflate\"`\n    - `\"deflate-raw\"`\n\n## Exceptions\n\n- `TypeError`\n  - : Thrown if the format passed to the constructor is not supported.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/DecompressionStream/prototype/readable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DecompressionStream.readable\n\nThe **`readable`** read-only property of the `DecompressionStream` interface returns a `ReadableStream`.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/DecompressionStream/prototype/writable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DecompressionStream.writable\n\nThe **`writable`** read-only property of the `DecompressionStream` interface returns a `WritableStream`.\n\n## Value\n\nA `WritableStream`\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Error/Error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error\n\nThe **`Error()`** constructor creates an error object.\n\n## Syntax\n\n```js\nnew Error()\nnew Error(message)\nnew Error(message, options)\nnew Error(message, fileName)\nnew Error(message, fileName, lineNumber)\n\nError()\nError(message)\nError(message, options)\nError(message, fileName)\nError(message, fileName, lineNumber)\n```\n\n> **Note:** `Error()` can be called with or without `new`. Both create a new `Error` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : A human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A value indicating the specific cause of the error, reflected in the [`Error.prototype.cause`](./prototype/cause.mdx) property. When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Error/prototype/cause.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.cause\n\nThe **`cause`** data property of an [`Error`](../../../globals/Error/Error.mdx) instance indicates the specific original cause of the error.\n\nIt is used when catching and re-throwing an error with a more-specific or useful error message in order to still have access to the original error.\n\n## Value\n\nThe value that was passed to the [`Error`](../Error.mdx) constructor in the `options.cause` argument. It may not be present.\n\n## Description\n\nThe value of `cause` can be of any type. You should not make assumptions that the error you caught has an `Error` as its `cause`, in the same way that you cannot be sure the variable bound in the `catch` statement is an `Error` either. The \"Providing structured data as the error cause\" example below shows a case where a non-error is deliberately provided as the cause.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Error/prototype/message.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.message\n\nThe **`message`** data property of an [`Error`](../Error.mdx) instance is a human-readable description of the error.\n\n## Value\n\nA string corresponding to the value passed to the [`Error`](../Error.mdx) constructor as the first argument.\n\n## Description\n\nThis property contains a brief description of the error if one is available or has been set. The `message` property combined with the [`name`](./name.mdx) property is used by the [`Error.prototype.toString()`](./toString.mdx) method to create a string representation of the Error.\n\nBy default, the `message` property is an empty string, but this behavior can be overridden for an instance by specifying a message as the first argument to the [`Error`](../Error.mdx) constructor.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Error/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.name\n\nThe **`name`** data property of `Error.prototype` is shared by all [`Error`](../Error.mdx) instances. It represents the name for the type of error. For `Error.prototype.name`, the initial value is `\"Error\"`. Subclasses like [`TypeError`](../../../globals/TypeError/TypeError.mdx) and [`SyntaxError`](../../SyntaxError/SyntaxError.mdx) provide their own `name` properties.\n\n## Value\n\nA string. For `Error.prototype.name`, the initial value is `\"Error\"`.\n\n## Description\n\nBy default, [`Error`](../Error.mdx) instances are given the name \"Error\". The `name` property, in addition to the [`message`](./message.mdx) property, is used by the [`Error.prototype.toString()`](./toString.mdx) method to create a string representation of the error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Error/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.toString()\n\nThe **`toString()`** method returns a string representing the\nspecified [`Error`](../Error.mdx) object.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified [`Error`](../Error.mdx) object.\n\n## Description\n\nThe [`Error`](../Error.mdx) object overrides the [`Object.prototype.toString()`](../../Object/prototype/toString.mdx)\nmethod inherited by all objects. \n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/EvalError/EvalError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# EvalError\n\nThe **`EvalError()`** constructor creates a new `EvalError` instance.\n\n## Syntax\n\n```js\nnew EvalError()\nnew EvalError(message)\nnew EvalError(message, options)\nnew EvalError(message, fileName)\nnew EvalError(message, fileName, lineNumber)\n\nEvalError()\nEvalError(message)\nEvalError(message, options)\nEvalError(message, fileName)\nEvalError(message, fileName, lineNumber)\n```\n\n> **Note:** `EvalError()` can be called with or without `new`. Both create a new `EvalError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/FetchEvent/FetchEvent.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent\n\nThis is the event type for `fetch` events. It contains information about the fetch, including the request and how the receiver will treat the response. \nIt provides the [`event.respondWith()`](./prototype/respondWith.mdx) method, which allows us to provide a response to this fetch.\n\n## Instance properties\n\n- `FetchEvent.request` _**readonly**_\n    - : The `Request` that was received by the application.\n- `FetchEvent.client` _**readonly**_\n    - : Information about the downstream client that made the request.\n    - `FetchEvent.client.address` _**readonly**_\n        - : A string representation of the IPv4 or IPv6 address of the downstream client.\n    - `FetchEvent.client.geo` _**readonly**_\n        - : A [geolocation dictionary](../../fastly:geolocation/getGeolocationForIpAddress.mdx) corresponding to the IP address of the downstream client. \n\n## Instance methods\n\n- [`FetchEvent.respondWith()`](./prototype/respondWith.mdx)\n    - : Provide (a promise for) a response for this request.\n- [`FetchEvent.waitUntil()`](./prototype/waitUntil.mdx)\n    - : Extends the lifetime of the event. Used to notify the host environment of tasks that extend beyond the returning of a response, such as streaming and caching.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/FetchEvent/prototype/respondWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent.respondWith()\n\nThe **`respondWith()`** method allows you to provide a promise for a [`Response`](../../Response/Response.mdx) to send back to the client which made the incoming request to your application.\n\n## Syntax\n\n```js\nrespondWith(response)\n```\n\n### Parameters\n\n- `response`\n  - : A [`Response`](../../Response/Response.mdx) or a [`Promise`](../../Promise/Promise.mdx) that resolves to a\n    [`Response`](../../Response/Response.mdx). Otherwise, a network error is returned to Fetch.\n\n### Return value\n\nAlways returns `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/FetchEvent/prototype/waitUntil.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent.waitUntil()\n\n\nThe **`waitUntil()`** method tells the host environment that work is ongoing until the promise settles, and it shouldn't terminate\nthe application if it wants that work to complete.\n\nThe `waitUntil()` method must be initially called synchronously within the event callback,\nbut after that it can be called multiple times, and will hold the process open until all the promises passed to it\nsettle.\n\n## Syntax\n\n```js\nwaitUntil(promise)\n```\n\n### Parameters\n\nA [`Promise`](../../Promise/Promise.mdx).\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/FinalizationRegistry/FinalizationRegistry.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FinalizationRegistry()\n\nThe **`FinalizationRegistry`** constructor creates a `FinalizationRegistry` object that uses the given callback.\n\n## Syntax\n\n```js\n// Arrow callback function\nnew FinalizationRegistry((heldValue) => { /* … */ })\n\n// Callback function\nnew FinalizationRegistry(callbackFn)\n\n// Inline callback function\nnew FinalizationRegistry(function(heldValue) { /* … */ })\n```\n\n> **Note:** `FinalizationRegistry()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `callback`\n  - : The callback function this registry should use.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/FinalizationRegistry/prototype/register.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FinalizationRegistry.prototype.register()\n\nThe `register()` method registers an object with a\n`FinalizationRegistry` instance so that if the object is garbage-collected,\nthe registry's callback may get called.\n\n## Syntax\n\n```js\nregister(target, heldValue)\nregister(target, heldValue, unregisterToken)\n```\n\n### Parameters\n\n- `target`\n  - : The target object to register.\n- `heldValue`\n  - : The value to pass to the finalizer for this object. This cannot be the `target` object but can be anything else, including functions and primitives.\n- `unregisterToken` _**optional**_\n  - : A token that may be used with the `unregister` method later to unregister\n    the target object. If provided (and not `undefined`), this must be an\n    object. If not provided, the target cannot be unregistered.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown when one of the following condition is met:\n    - `target` is not an object (object as opposed to primitives; functions are objects as well)\n    - `target` is the same as `heldvalue` (`target === heldValue`)\n    - `unregisterToken` is not an object\n\n## Description\n\nSee the [Avoid where possible](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry#avoid_where_possible)\nand [Notes on cleanup callbacks](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry#notes_on_cleanup_callbacks)\nsections of the `FinalizationRegistry` page for important caveats.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/FinalizationRegistry/prototype/unregister.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FinalizationRegistry.prototype.unregister()\n\nThe `unregister()` method unregisters a target object from a\n`FinalizationRegistry` instance.\n\n## Syntax\n\n```js\nunregister(unregisterToken)\n```\n\n### Parameters\n\n- `unregisterToken`\n  - : The token used with the [`FinalizationRegistry.prototype.register`](./register.mdx) method when registering the target object. Multiple cells registered with the same `unregisterToken` will be unregistered together.\n\n### Return value\n\nA boolean value that is `true` if at least one cell was unregistered and `false` if no cell was unregistered.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown when `unregisterToken` is not an object.\n\n## Description\n\nWhen a target object has been reclaimed, it is no longer registered in the registry.\nThere is no need to call `unregister` in your cleanup callback. Only call\n`unregister` if you haven't received a cleanup callback and no longer need\nto receive one.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Float32Array/Float32Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Float32Array()\n\nThe **`Float32Array()`** typed array constructor creates a new\n`Float32Array` object, which is, an array of 32-bit floating point numbers\n(corresponding to the C `float` data type) in the platform byte order. If\ncontrol over byte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are\ninitialized to `0`. Once established, you can reference elements in the array\nusing the object's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Float32Array()\nnew Float32Array(length)\nnew Float32Array(typedArray)\nnew Float32Array(object)\n\nnew Float32Array(buffer)\nnew Float32Array(buffer, byteOffset)\nnew Float32Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Float32Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Float64Array/Float64Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Float64Array()\n\nThe **`Float64Array()`** typed array constructor creates a new\n`Float64Array` object, which is, an array of 64-bit floating point numbers\n(corresponding to the C `double` data type) in the platform byte order. If\ncontrol over byte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are\ninitialized to `0`. Once established, you can reference elements in the array\nusing the object's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Float64Array()\nnew Float64Array(length)\nnew Float64Array(typedArray)\nnew Float64Array(object)\n\nnew Float64Array(buffer)\nnew Float64Array(buffer, byteOffset)\nnew Float64Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Float64Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Function/Function.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function()\n\nThe **`Function()`** constructor creates a new [`Function`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function) object. Calling the constructor directly can create functions dynamically, but suffers from security and similar (but far less significant) performance issues as `eval()`. However, unlike `eval` (which may have access to the local scope), the `Function` constructor creates functions which execute in the global scope only.\n\n\n\n## Syntax\n\n```js\nnew Function(functionBody)\nnew Function(arg0, functionBody)\nnew Function(arg0, arg1, functionBody)\nnew Function(arg0, arg1, /* … ,*/ argN, functionBody)\n\nFunction(functionBody)\nFunction(arg0, functionBody)\nFunction(arg0, arg1, functionBody)\nFunction(arg0, arg1, /* … ,*/ argN, functionBody)\n```\n\n> **Note:** `Function()` can be called with or without `new`. Both create a new `Function` instance.\n\n### Parameters\n\n- `argN` _**optional**_\n\n  - : Names to be used by the function as formal argument names. Each must be a string that corresponds to a valid JavaScript parameter (any of plain [identifier](https://developer.mozilla.org/docs/Glossary/Identifier), [rest parameter](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/rest_parameters), or [destructured](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment) parameter, optionally with a [default](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/Default_parameters)), or a list of such strings separated with commas.\n\n    As the parameters are parsed in the same way as function expressions, whitespace and comments are accepted. For example: `\"x\", \"theValue = 42\", \"[a, b] /* numbers */\"` — or `\"x, theValue = 42, [a, b] /* numbers */\"`. (`\"x, theValue = 42\", \"[a, b]\"` is also correct, though very confusing to read.)\n\n- `functionBody`\n  - : A string containing the JavaScript statements comprising the function definition.\n\n## Description\n\n`Function` objects created with the `Function` constructor are parsed when the function is created. This is less efficient than creating a function with a [function expression](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/function) or [function declaration](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function) and calling it within your code, because such functions are parsed with the rest of the code.\n\nAll arguments passed to the function, except the last, are treated as the names of the identifiers of the parameters in the function to be created, in the order in which they are passed. The function will be dynamically compiled as a function expression, with the source assembled in the following fashion:\n\n```js\n`function anonymous(${args.join(\",\")}\n) {\n${functionBody}\n}`\n```\n\nThis is observable by calling the function's [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/toString) method.\n\nHowever, unlike normal [function expressions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/function), the name `anonymous` is not added to the `functionBody`'s scope, since `functionBody` only has access the global scope. If `functionBody` is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode) (the body itself needs to have the `\"use strict\"` directive since it doesn't inherit the strictness from the context), you may use [`arguments.callee`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/arguments/callee) to refer to the function itself. Alternatively, you can define the recursive part as an inner function:\n\n```js\nconst recursiveFn = new Function(\"count\", `\n(function recursiveFn(count) {\n  if (count < 0) {\n    return;\n  }\n  console.log(count);\n  recursiveFn(count - 1);\n})(count);\n`);\n```\n\nNote that the two dynamic parts of the assembled source — the parameters list `args.join(\",\")` and `functionBody` — will first be parsed separately to ensure they are each syntactically valid. This prevents injection-like attempts.\n\n```js\nnew Function(\"/*\", \"*/) {\");\n// SyntaxError: Unexpected end of arg string\n// Doesn't become \"function anonymous(/*) {*/) {}\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Function/prototype/apply.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.apply()\n\nThe **`apply()`** method calls the specified function with a given `this` value, and `arguments` provided as an array (or an [array-like object](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects)).\n\n\n\n## Syntax\n\n```js\napply(thisArg)\napply(thisArg, argsArray)\n```\n\n### Parameters\n\n- `thisArg`\n  - : The value of `this` provided for the call to `func`. If the function is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) will be replaced with the global object, and primitive values will be converted to objects.\n- `argsArray` _**optional**_\n  - : An array-like object, specifying the arguments with which `func` should be called, or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../../globals/undefined.mdx) if no arguments should be provided to the function.\n\n### Return value\n\nThe result of calling the function with the specified `this` value and arguments.\n\n## Description\n\n> **Note:** This function is almost identical to [`Function.prototype.call()`](../../../globals/Function/prototype/call.mdx), except that `call()` accepts an **argument list**, while `apply()` accepts a **single array of arguments** — for example, `func.apply(this, ['eat', 'bananas'])` vs. `func.call(this, 'eat', 'bananas')`.\n\nNormally, when calling a function, the value of [`this`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this) inside the function is the object that the function was accessed on. With `apply()`, you can assign an arbitrary value as `this` when calling an existing function, without first attaching the function to the object as a property. This allows you to use methods of one object as generic utility functions.\n\n> **Warning:** Do not use `apply()` to chain constructors (for example, to implement inheritance). This invokes the constructor function as a plain function, which means [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target) is `undefined`, and classes throw an error because they can't be called without `new`. Use [`Reflect.construct()`](../../../globals/Reflect/construct.mdx) or [`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Function/prototype/bind.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.bind()\n\nThe **`bind()`** method creates a new function that, when called, has its `this` keyword set to the provided value, with a given sequence of arguments preceding any provided when the new function is called.\n\n\n\n## Syntax\n\n```js\nbind(thisArg)\nbind(thisArg, arg1)\nbind(thisArg, arg1, arg2)\nbind(thisArg, arg1, arg2, /* …, */ argN)\n```\n\n### Parameters\n\n- `thisArg`\n  - : The value to be passed as the `this` parameter to the target function `func` when the bound function is called. If the function is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) will be replaced with the global object, and primitive values will be converted to objects. The value is ignored if the bound function is constructed using the `new` operator.\n- `arg1, …, argN` _**optional**_\n  - : Arguments to prepend to arguments provided to the bound function when invoking `func`.\n\n### Return value\n\nA copy of the given function with the specified `this` value, and initial arguments (if provided).\n\n## Description\n\nThe `bind()` function creates a new _bound function_. Calling the bound function generally results in the execution of the function it wraps, which is also called the _target function_. The bound function will store the parameters passed — which include the value of `this` and the first few arguments — as its internal state. These values are stored in advance, instead of being passed at call time. You can generally see `const boundFn = fn.bind(thisArg, arg1, arg2)` as being equivalent to `const boundFn = (...restArgs) => fn.call(thisArg, arg1, arg2, ...restArgs)` for the effect when it's called (but not when `boundFn` is constructed).\n\nA bound function can be further bound by calling `boundFn.bind(thisArg, /* more args */)`, which creates another bound function `boundFn2`. The newly bound `thisArg` value is ignored, because the target function of `boundFn2`, which is `boundFn`, already has a bound `this`. When `boundFn2` is called, it would call `boundFn`, which in turn calls `fn`. The arguments that `fn` ultimately receives are, in order: the arguments bound by `boundFn`, arguments bound by `boundFn2`, and the arguments received by `boundFn2`.\n\n```js\n\"use strict\"; // prevent `this` from being boxed into the wrapper object\n\nfunction log(...args) {\n  console.log(this, ...args);\n}\nconst boundLog = log.bind(\"this value\", 1, 2);\nconst boundLog2 = boundLog.bind(\"new this value\", 3, 4);\nboundLog2(5, 6); // \"this value\", 1, 2, 3, 4, 5, 6\n```\n\nA bound function may also be constructed using the `new` operator if its target function is constructable. Doing so acts as though the target function had instead been constructed. The prepended arguments are provided to the target function as usual, while the provided `this` value is ignored (because construction prepares its own `this`, as seen by the parameters of [`Reflect.construct`](../../../globals/Reflect/construct.mdx)). If the bound function is directly constructed, [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target) will be the target function instead. (That is, the bound function is transparent to `new.target`.)\n\n```js\nclass Base {\n  constructor(...args) {\n    console.log(new.target === Base);\n    console.log(args);\n  }\n}\n\nconst BoundBase = Base.bind(null, 1, 2);\n\nnew BoundBase(3, 4); // true, [1, 2, 3, 4]\n```\n\nHowever, because a bound function does not have the [`prototype`](../../../globals/Function/prototype/) property, it cannot be used as a base class for [`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends).\n\n```js example-bad\nclass Derived extends class {}.bind(null) {}\n// TypeError: Class extends value does not have valid prototype property undefined\n```\n\nWhen using a bound function as the right-hand side of [`instanceof`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/instanceof), `instanceof` would reach for the target function (which is stored internally in the bound function) and read its `prototype` instead.\n\n```js\nclass Base {}\nconst BoundBase = Base.bind(null, 1, 2);\nconsole.log(new Base() instanceof BoundBase); // true\n```\n\nThe bound function has the following properties:\n\n- [`length`](../../../globals/Function/prototype/length.mdx)\n  - : The `length` of the target function minus the number of arguments being bound (not counting the `thisArg` parameter), with 0 being the minimum value.\n- [`name`](../../../globals/Function/prototype/name.mdx)\n  - : The `name` of the target function plus a `\"bound \"` prefix.\n\nThe bound function also inherits the [prototype chain](https://developer.mozilla.org/docs/Web/JavaScript/Inheritance_and_the_prototype_chain) of the target function. However, it doesn't have other own properties of the target function (such as [static properties](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/static) if the target function is a class).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Function/prototype/call.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.call()\n\nThe **`call()`** method calls the function with a given `this` value and arguments provided individually.\n\n## Syntax\n\n```js\ncall(thisArg)\ncall(thisArg, arg1)\ncall(thisArg, arg1, /* …, */ argN)\n```\n\n### Parameters\n\n- `thisArg`\n  - : The value to use as `this` when calling `func`. If the function is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) will be replaced with the global object, and primitive values will be converted to objects.\n- `arg1, …, argN` _**optional**_\n  - : Arguments for the function.\n\n### Return value\n\nThe result of calling the function with the specified `this` value and arguments.\n\n## Description\n\n> **Note:** This function is almost identical to [`Function.prototype.apply()`](../../../globals/Function/prototype/apply.mdx), except that `call()` accepts an **argument list**, while `apply()` accepts a **single array of arguments** — for example, `func.apply(this, ['eat', 'bananas'])` vs. `func.call(this, 'eat', 'bananas')`.\n\nNormally, when calling a function, the value of [`this`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this) inside the function is the object that the function was accessed on. With `call()`, you can assign an arbitrary value as `this` when calling an existing function, without first attaching the function to the object as a property. This allows you to use methods of one object as generic utility functions.\n\n> **Warning:** Do not use `call()` to chain constructors (for example, to implement inheritance). This invokes the constructor function as a plain function, which means [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target) is `undefined`, and classes throw an error because they can't be called without `new`. Use [`Reflect.construct()`](../../../globals/Reflect/construct.mdx) or [`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Function/prototype/index.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.prototype\n\nThe **`prototype`** data property of a `Function` instance is used when the function is used as a constructor with the `new` operator. It will become the new object's prototype.\n\n> **Note:** Not all `Function` objects have the `prototype` property — see [description](#description).\n\n## Value\n\nAn object.\n\n> **Note:** The `prototype` property of [classes](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes) is not writable.\n\n## Description\n\nWhen a function is called with `new`, the constructor's `prototype` property will become the resulting object's prototype.\n\n```js\nfunction Ctor() {}\nconst inst = new Ctor();\nconsole.log(Object.getPrototypeOf(inst) === Ctor.prototype); // true\n```\n\nYou can read [Inheritance and the prototype chain](https://developer.mozilla.org/docs/Web/JavaScript/Inheritance_and_the_prototype_chain#constructors) for more information about the interactions between a constructor function's `prototype` property and the resulting object's prototype.\n\nA function having a `prototype` property is not sufficient for it to be eligible as a constructor. [Generator functions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function*) have a `prototype` property, but cannot be called with `new`:\n\n```js\nasync function* asyncGeneratorFunction() {}\nfunction* generatorFunction() {}\n```\n\nInstead, generator functions' `prototype` property is used when they are called _without_ `new`. The `prototype` property will become the returned [`Generator`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Generator) object's prototype.\n\nIn addition, some functions may have a `prototype` but throw unconditionally when called with `new`. For example, the [`Symbol()`](../../../globals/Symbol/Symbol.mdx) and [`BigInt`](../../../globals/BigInt/BigInt.mdx) functions throw when called with `new`, because `Symbol.prototype` and `BigInt.prototype` are only intended to provide methods for the primitive values, but the wrapper objects should not be directly constructed.\n\nThe following functions do not have `prototype`, and are therefore ineligible as constructors, even if a `prototype` property is later manually assigned:\n\n```js\nconst method = { foo() {} }.foo;\nconst arrowFunction = () => {};\nasync function asyncFunction() {}\n```\n\nThe following are valid constructors that have `prototype`:\n\n```js\nclass Class {}\nfunction fn() {}\n```\n\nA [bound function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/bind) does not have a `prototype` property, but may be constructable. When it's constructed, the target function is constructed instead, and if the target function is constructable, it would return a normal instance.\n\n```js\nconst boundFunction = function () {}.bind(null);\n```\n\nA function's `prototype` property, by default, is a plain object with one property: (`constructor`)[../../../globals/Object/prototype/constructor.mdx), which is a reference to the function itself. The `constructor` property is writable, non-enumerable, and configurable.\n\nIf the `prototype` of a function is reassigned with something other than an `Object`, when the function is called with `new`, the returned object's prototype would be `Object.prototype` instead. (In other words, `new` ignores the `prototype` property and constructs a plain object.)\n\n```js\nfunction Ctor() {}\nCtor.prototype = 3;\nconsole.log(Object.getPrototypeOf(new Ctor()) === Object.prototype); // true\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Function/prototype/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.length\n\nThe **`length`** data property of a `Function` instance indicates the number of parameters expected by the function.\n\n## Value\n\nA number.\n\n## Description\n\nA `Function` object's `length` property indicates how many arguments the function expects, i.e. the number of formal parameters. \n\nThe `Function` constructor is itself a `Function` object. Its `length` data property has a value of `1`.\n\nDue to historical reasons, `Function.prototype` is a callable itself. The `length` property of `Function.prototype` has a value of `0`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Function/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.name\n\nThe **`name`** property of a `Function` instance indicates the function's name as specified when it was created, or it may be either `anonymous` or `''` (an empty string) for functions created anonymously.\n\n## Value\n\nA string.\n\n> **Note:** In non-standard, pre-ES2015 implementations the `configurable` attribute was `false` as well.\n\n## Description\n\nThe function's `name` property can be used to identify the function in debugging tools or error messages. It has no semantic significance to the language itself.\n\nThe `name` property is read-only and cannot be changed by the assignment operator:\n\n```js\nfunction someFunction() {}\n\nsomeFunction.name = 'otherFunction';\nconsole.log(someFunction.name); // someFunction\n```\n\nTo change it, use [`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx).\n\nThe `name` property is typically inferred from how the function is defined. In the following sections, we will describe the various ways in which it can be inferred.\n\n### Function declaration\n\nThe `name` property returns the name of a function declaration.\n\n```js\nfunction doSomething() {}\ndoSomething.name; // \"doSomething\"\n```\n\n### Default-exported function declaration\n\nAn [`export default`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/export) declaration exports the function as a declaration instead of an expression. If the declaration is anonymous, the name is `\"default\"`.\n\n```js\n// -- someModule.js --\nexport default function () {};\n\n// -- main.js --\nimport someModule from \"./someModule.js\";\n\nsomeModule.name; // \"default\"\n```\n\n### Function constructor\n\nFunctions created with the [`Function()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/Function) constructor have name \"anonymous\".\n\n```js\nnew Function().name; // \"anonymous\"\n```\n\n### Function expression\n\nIf the function expression is named, that name is used as the `name` property.\n\n```js\nconst someFunction = function someFunctionName() {};\nsomeFunction.name; // \"someFunctionName\"\n```\n\nAnonymous function expressions created using the keyword `function` or arrow functions would have `\"\"` (an empty string) as their name.\n\n```js\n(function () {}).name; // \"\"\n(() => {}).name; // \"\"\n```\n\nHowever, such cases are rare — usually, in order to refer to the expression elsewhere, the function expression is attached to an identifier when it's created (such as in a variable declaration). In such cases, the name can be inferred, as the following few subsections demonstrate.\n\nOne practical case where the name cannot be inferred is a function returned from another function:\n\n```js\nfunction getFoo() {\n  return () => {};\n}\ngetFoo().name; // \"\"\n```\n\n### Variable declaration and method\n\nVariables and methods can infer the name of an anonymous function from its syntactic position.\n\n```js\nconst f = function () {};\nconst object = {\n  someMethod: function () {}\n};\n\nconsole.log(f.name); // \"f\"\nconsole.log(object.someMethod.name); // \"someMethod\"\n```\n\nThe same applies to assignment:\n\n```js\nlet f;\nf = () => {};\nf.name; // \"f\"\n```\n\n### Initializer and default value\n\nFunctions in initializers (default values) of [destructuring](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#default_value), [default parameters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/Default_parameters), [class fields](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/Public_class_fields), etc., will inherit the name of the bound identifier as their `name`.\n\n```js\nconst [f = () => {}] = [];\nf.name; // \"f\"\n\nconst { someMethod: m = () => {} } = {};\nm.name; // \"m\"\n\nfunction foo(f = () => {}) {\n  console.log(f.name);\n}\nfoo(); // \"f\"\n\nclass Foo {\n  static someMethod = () => {};\n}\nFoo.someMethod.name; // someMethod\n```\n\n### Shorthand method\n\n```js\nconst o = {\n  foo() {},\n};\no.foo.name; // \"foo\";\n```\n\n### Bound function\n\n[`Function.prototype.bind()`](../../../globals/Function/prototype/bind.mdx) produces a function whose name is \"bound \" plus the function name.\n\n```js\nfunction foo() {};\nfoo.bind({}).name; // \"bound foo\"\n```\n\n### Getter and setter\n\nWhen using [`get`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/get) and [`set`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/set) accessor properties, \"get\" or \"set\" will appear in the function name.\n\n```js\nconst o = {\n  get foo() {},\n  set foo(x) {},\n};\n\nconst descriptor = Object.getOwnPropertyDescriptor(o, \"foo\");\ndescriptor.get.name; // \"get foo\"\ndescriptor.set.name; // \"set foo\";\n```\n\n### Class\n\nA class's name follows the same algorithm as function declarations and expressions.\n\n```js\nclass Foo {}\nFoo.name; // \"Foo\"\n```\n\n> **Warning:** JavaScript will set the function's `name` property only if a function does not have an own property called `name`. However, classes' [static members](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/static) will be set as own properties of the class constructor function, and thus prevent the built-in `name` from being applied. See [telling the constructor name of an object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name#telling_the_constructor_name_of_an_object) for more details.\n\n### Symbol as function name\n\nIf a `Symbol` is used a function name and the symbol has a description, the method's name is the description in square brackets.\n\n```js\nconst sym1 = Symbol(\"foo\");\nconst sym2 = Symbol();\n\nconst o = {\n  [sym1]() {},\n  [sym2]() {},\n};\n\no[sym1].name; // \"[foo]\"\no[sym2].name; // \"[]\"\n```\n\n### Private property\n\nPrivate fields and private methods have the hash (`#`) as part of their names.\n\n```js\nclass Foo {\n  #field = () => {};\n  #method() {}\n  getNames() {\n    console.log(this.#field.name);\n    console.log(this.#method.name);\n  }\n}\n\nnew Foo().getNames();\n// \"#field\"\n// \"#method\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Function/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.toString()\n\nThe **`toString()`** method returns a string representing the source code of the specified `Function`.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the source code of the function.\n\n## Description\n\nThe `Function` object overrides the `toString()` method\ninherited from `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For user-defined `Function`\nobjects, the `toString` method returns a string containing the source text\nsegment which was used to define the function.\n\nJavaScript calls the `toString` method automatically when a\n`Function` is to be represented as a text value, e.g. when a function is\nconcatenated with a string.\n\nThe `toString()` method will throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) exception\n(\"Function.prototype.toString called on incompatible object\"), if its\n`this` value object is not a `Function` object.\n\n```js example-bad\nFunction.prototype.toString.call('foo'); // throws TypeError\n```\n\nIf the `toString()` method is called on built-in function objects, a\nfunction created by [`Function.prototype.bind()`](../../../globals/Function/prototype/bind.mdx), or\nother non-JavaScript functions, then `toString()` returns a\n_native function string_ which looks like\n\n```js\n\"function someName() { [native code] }\"\n```\n\nFor intrinsic object methods and functions, `someName` is the initial name of the function; otherwise its content may be implementation-defined, but will always be in property name syntax, like `[1 + 1]`, `someName`, or `1`.\n\n> **Note:** This means using [`eval()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/eval) on native function strings is a guaranteed syntax error.\n\nIf the `toString()` method is called on a function created by the `Function` constructor, `toString()` returns the source code of a synthesized function declaration named \"anonymous\" using the provided parameters and function body. For example, `Function(\"a\", \"b\", \"return a + b\").toString()` will return:\n\n```js\n\"function anonymous(a,b\\n) {\\nreturn a + b\\n}\"\n```\n\nSince ES2018, the spec requires the return value of `toString()` to be the exact same source code as it was declared, including any whitespace and/or comments — or, if the host doesn't have the source code available for some reason, requires returning a native function string. Support for this revised behavior can be found in the [browser compatibility table](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/toString#browser_compatibility).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Headers/Headers.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers()\n\nThe **`Headers()`** constructor creates a new `Headers` object.\n\n## Syntax\n\n```js\nnew Headers()\nnew Headers(init)\n```\n\n### Parameters\n\n- `init` _**optional**_\n  - : An object containing any HTTP headers that you want to pre-populate your `Headers` object with. This can be a\n    simple object literal with `String` values, an array of name-value pairs, where each pair is a 2-element string array; or an existing\n    `Headers` object. In the last case, the new `Headers` object\n    copies its data from the existing `Headers` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Headers/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.append()\n\nThe **`append()`** method of the `Headers`\ninterface appends a new value onto an existing header inside a `Headers`\nobject, or adds the header if it does not already exist.\n\nThe difference between `Headers.prototype.set()` and `append()` is\nthat if the specified header already exists and accepts multiple values,\n`set()` will overwrite the existing value with the new one, whereas\n`append()` will append the new value onto the end of the set of values.\n\n## Syntax\n\n```js\nappend(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to add to the `Headers` object.\n- `value`\n  - : The value of the HTTP header you want to add.\n\n### Return value\n\nNone (`undefined`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Headers/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.delete()\n\nThe **`delete()`** method of the `Headers`\ninterface deletes a header from the current `Headers` object.\n\nThis method throws a `TypeError` for the following reasons:\n\n- The value of the name parameter is not the name of an HTTP header.\n\n## Syntax\n\n```js\ndelete(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to delete from the `Headers` object.\n\n### Return value\n\nNone (`undefined`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Headers/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.entries()\n\nThe **`Headers.entries()`** method returns an iterator allowing to go through all key/value pairs\ncontained in this object. The both the key and value of each pairs are `String` objects.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Headers/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.forEach()\n\nThe **`Headers.forEach()`** method executes a callback function once per each key/value pair in the `Headers` object.\n\n## Syntax\n\n```js\n// Arrow function\nforEach((value, key) => { /* … */ })\nforEach((value, key, object) => { /* … */ })\n\n// Inline callback function\nforEach(function (value, key) { /* … */ })\nforEach(function (value, key, object) { /* … */ })\nforEach(function (value, key) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n  - : Function to execute for each entry in the map. It takes the following arguments:\n    - `value`\n      - : Value of the currently visited header entry.\n    - `key`\n      - : Name of the currently visited header entry.\n    - `object`\n      - : The Headers object being iterated.\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `callback`.\n\n### Return value\n\n`undefined`.\n\n## Description\n\nThe `Headers.forEach()` method executes the provided callback once for each key of the Headers which actually exist. It is not invoked for keys which have been deleted. However, it is executed for keys which are present but have the value undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Headers/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.get()\n\nThe **`get()`** method of the [`Headers`](../../../globals/Headers/Headers.mdx) interface\nreturns a byte string of all the values of a header within a `Headers` object\nwith a given name. If the requested header doesn't exist in the `Headers`\nobject, it returns `null`.\n\n## Syntax\n\n```js\nget(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header whose values you want to retrieve from the\n    `Headers` object. If the given name is not the name of an HTTP header, this\n    method throws a `TypeError`. The name is case-insensitive.\n\n### Return value\n\nA [`String`](../../../globals/String/String.mdx) sequence representing the values of the retrieved header or\n`null` if this header is not set.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Headers/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.has()\n\nThe **`has()`** method of the `Headers` interface\nreturns a boolean stating whether a `Headers` object contains a certain\nheader.\n\n## Syntax\n\n```js\nhas(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to test for. If the given name is not a valid\n    HTTP header name, this method throws a `TypeError`.\n\n### Return value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Headers/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.keys()\n\nThe **`Headers.keys()`** method returns an iterator allowing to go through all keys contained\nin this object. The keys are `String` objects.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Headers/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.set()\n\nThe **`set()`** method of the `Headers` interface\nsets a new value for an existing header inside a `Headers` object, or adds\nthe header if it does not already exist.\n\nThe difference between `set()` and `Headers.append` is that if\nthe specified header already exists and accepts multiple values, `set()`\noverwrites the existing value with the new one, whereas `Headers.append`\nappends the new value to the end of the set of values.\n\n## Syntax\n\n```js\nset(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to set to a new value. If the given name is not\n    the name of an HTTP header, this method throws a `TypeError`.\n- `value`\n  - : The new value you want to set.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Headers/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.values()\n\nThe **`Headers.values()`** method returns an iterator allowing to go through all values contained\nin this object. The values are `String` objects.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Infinity.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Infinity\n\nThe global property **`Infinity`** is a numeric value representing infinity.\n\n## Value\n\nThe same number value as `Number.POSITIVE_INFINITY`.\n\n## Description\n\n`Infinity` is a property of the _global object_. In other words, it is a variable in global scope.\n\nThe value `Infinity` (positive infinity) is greater than any other number.\n\nThis value behaves slightly differently than mathematical infinity; see `Number.POSITIVE_INFINITY` for details.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Int16Array/Int16Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Int16Array()\n\nThe **`Int16Array()`** typed array constructor creates an array\nof twos-complement 16-bit signed integers in the platform byte order. If control over\nbyte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are initialized\nto `0`. Once established, you can reference elements in the array using the\nobject's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Int16Array()\nnew Int16Array(length)\nnew Int16Array(typedArray)\nnew Int16Array(object)\n\nnew Int16Array(buffer)\nnew Int16Array(buffer, byteOffset)\nnew Int16Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Int16Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Int32Array/Int32Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Int32Array()\n\nThe **`Int32Array()`** typed array constructor creates an array\nof twos-complement 32-bit signed integers in the platform byte order. If control over\nbyte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are initialized\nto `0`. Once established, you can reference elements in the array using the\nobject's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Int32Array()\nnew Int32Array(length)\nnew Int32Array(typedArray)\nnew Int32Array(object)\n\nnew Int32Array(buffer)\nnew Int32Array(buffer, byteOffset)\nnew Int32Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Int32Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Int8Array/Int8Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Int8Array()\n\nThe **`Int8Array()`** constructor creates a typed array of\ntwos-complement 8-bit signed integers. The contents are initialized to `0`.\nOnce established, you can reference elements in the array using the object's methods, or\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew Int8Array()\nnew Int8Array(length)\nnew Int8Array(typedArray)\nnew Int8Array(object)\n\nnew Int8Array(buffer)\nnew Int8Array(buffer, byteOffset)\nnew Int8Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Int8Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/JSON/parse.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# JSON.parse()\n\nThe **`JSON.parse()`** method parses a JSON string, constructing the JavaScript value or object described by the string. An optional _reviver_ function can be provided to perform a transformation on the resulting object before it is returned.\n\n## Syntax\n\n```js\nJSON.parse(text)\nJSON.parse(text, reviver)\n```\n\n### Parameters\n\n- `text`\n  - : The string to parse as JSON.\n- `reviver` _**optional**_\n  - : If a function, this prescribes how each value originally produced by parsing is transformed before being returned. Non-callable values are ignored. The function is called with the following arguments:\n    - `key`\n      - : The key associated with the value.\n    - `value`\n      - : The value produced by parsing.\n\n### Return value\n\nThe `Object`, `Array`, string, number, boolean, or `null` value corresponding to the given JSON `text`.\n\n### Exceptions\n\n- [`SyntaxError`](../../globals/SyntaxError/SyntaxError.mdx)\n  - : Thrown if the string to parse is not valid JSON.\n\n## Description\n\n`JSON.parse()` parses a JSON string according to the [JSON grammar](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/JSON#full_json_grammar), then evaluates the string as if it's a JavaScript expression. The only instance where a piece of JSON text represents a different value from the same JavaScript expression is when dealing with the `\"__proto__\"` key — see [Object literal syntax vs. JSON](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Object_initializer#object_literal_syntax_vs._json).\n\n### The reviver parameter\n\nIf a `reviver` is specified, the value computed by parsing is _transformed_ before being returned. Specifically, the computed value and all its properties (in a [depth-first](https://en.wikipedia.org/wiki/Depth-first_search) fashion, beginning with the most nested properties and proceeding to the original value itself) are individually run through the `reviver`.\n\nThe `reviver` is called with the object containing the property being processed as `this`, and two arguments: `key` and `value`, representing the property name as a string (even for arrays) and the property value. If the `reviver` function returns [`undefined`](../../globals/undefined.mdx) (or returns no value — for example, if execution falls off the end of the function), the property is deleted from the object. Otherwise, the property is redefined to be the return value. If the `reviver` only transforms some values and not others, be certain to return all untransformed values as-is — otherwise, they will be deleted from the resulting object.\n\nSimilar to the `replacer` parameter of [`JSON.stringify()`](../../globals/JSON/stringify.mdx), `reviver` will be last called on the root object with an empty string as the `key` and the root object as the `value`. For JSON text parsing to primitive values, `reviver` will be called once.\n\nNote that `reviver` is run after the value is parsed. So, for example, numbers in JSON text will have already been converted to JavaScript numbers, and may lose precision in the process. To transfer large numbers without loss of precision, serialize them as strings, and revive them to [BigInts](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/BigInt), or other appropriate arbitrary precision formats.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/JSON/stringify.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# JSON.stringify()\n\nThe **`JSON.stringify()`** method converts a JavaScript value to a JSON string, optionally replacing values if a replacer function is specified or optionally including only the specified properties if a replacer array is specified.\n\n## Syntax\n\n```js\nJSON.stringify(value)\nJSON.stringify(value, replacer)\nJSON.stringify(value, replacer, space)\n```\n\n### Parameters\n\n- `value`\n  - : The value to convert to a JSON string.\n- `replacer` _**optional**_\n  - : A function that alters the behavior of the stringification process, or an array of strings or numbers naming properties of `value` that should be included in the output. If `replacer` is an array, all elements that are not strings or numbers (can be either primitives or wrapper objects), including `Symbol` values, are completely ignored. If `replacer` is anything other than a function or an array (e.g. [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or not provided), all properties of the object are included in the resulting JSON string.\n- `space` _**optional**_\n\n  - : A string or number that's used to insert white space (including indentation, line break characters, etc.) into the output JSON string for readability purposes.\n\n    If this is a number, it indicates the number of space characters to be used as indentation, clamped to 10 (that is, any number greater than `10` is treated as if it were `10`). Values less than 1 indicate that no space should be used.\n\n    If this is a string, the string (or the first 10 characters of the string, if it's longer than that) is inserted before every nested object or array.\n\n    If `space` is anything other than a string or number (can be either a primitive or a wrapper object) — for example, is [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or not provided — no white space is used.\n\n### Return value\n\nA JSON string representing the given value, or undefined.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if one of the following is true:\n    - `value` contains a circular reference.\n    - A `BigInt` value is encountered.\n\n## Description\n\n`JSON.stringify()` converts a value to JSON notation representing it:\n\n- `Boolean`, `Number`, `String`, and `BigInt` (obtainable via [`Object()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/Object)) objects are converted to the corresponding primitive values during stringification, in accordance with the traditional conversion semantics. `Symbol` objects (obtainable via [`Object()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/Object)) are treated as plain objects.\n- Attempting to serialize `BigInt` values will throw. However, if the BigInt has a `toJSON()` method (through monkeypatching: `BigInt.prototype.toJSON = ...`), that method can provide the serialization result. This constraint ensures that a proper serialization (and, very likely, its accompanying deserialization) behavior is always explicitly provided by the user.\n- [`undefined`](../../globals/undefined.mdx), `Function`, and `Symbol` values are not valid JSON values. If any such values are encountered during conversion, they are either omitted (when found in an object) or changed to [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) (when found in an array). `JSON.stringify()` can return `undefined` when passing in \"pure\" values like `JSON.stringify(() => {})` or `JSON.stringify(undefined)`.\n- The numbers [`Infinity`](../../globals/Infinity.mdx) and [`NaN`](../../globals/NaN.mdx), as well as the value [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null), are all considered `null`. (But unlike the values in the previous point, they would never be omitted.)\n- Arrays are serialized as arrays (enclosed by square brackets). Only array indices between 0 and `length - 1` (inclusive) are serialized; other properties are ignored.\n- For other objects:\n\n  - All `Symbol`-keyed properties will be completely ignored, even when using the [`replacer`](#the-replacer-parameter) parameter.\n\n  - If the value has a `toJSON()` method, it's responsible to define what data will be serialized. Instead of the object being serialized, the value returned by the `toJSON()` method when called will be serialized. `JSON.stringify()` calls `toJSON` with one parameter, the `key`, which has the same semantic as the `key` parameter of the [`replacer`](#the-replacer-parameter) function:\n\n    - if this object is a property value, the property name\n    - if it is in an array, the index in the array, as a string\n    - if `JSON.stringify()` was directly called on this object, an empty string\n\n    `Date` objects implement the [`toJSON()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toJSON) method which returns a string (the same as [`date.toISOString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)). Thus, they will be stringified as strings.\n\n  - Only [enumerable own properties](https://developer.mozilla.org/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) are visited. This means [Map](../../globals/Map/Map.mdx), [Set](../../globals/Set/Set.mdx), etc. will become `\"{}\"`. You can use the [`replacer`](#the-replacer-parameter) parameter to serialize them to something more useful.\n\n    Properties are visited using the same algorithm as [`Object.keys()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/keys), which has a well-defined order and is stable across implementations. For example, `JSON.stringify` on the same object will always produce the same string, and `JSON.parse(JSON.stringify(obj))` would produce an object with the same key ordering as the original (assuming the object is completely JSON-serializable).\n\n### The replacer parameter\n\nThe `replacer` parameter can be either a function or an array.\n\nAs an array, its elements indicate the names of the properties in the object that should be included in the resulting JSON string. Only string and number values are taken into account; symbol keys are ignored.\n\nAs a function, it takes two parameters: the `key` and the `value` being stringified. The object in which the key was found is provided as the `replacer`'s `this` context.\n\nThe `replacer` function is called for the initial object being stringified as well, in which case the `key` is an empty string (`\"\"`). It is then called for each property on the object or array being stringified. Array indices will be provided in its string form as `key`. The current property value will be replaced with the `replacer`'s return value for stringification. This means:\n\n- If you return a number, string, boolean, or `null`, that value is directly serialized and used as the property's value. (Returning a BigInt will throw as well.)\n- If you return a `Function`, `Symbol`, or [`undefined`](../../globals/undefined.mdx), the property is not included in the output.\n- If you return any other object, the object is recursively stringified, calling the `replacer` function on each property.\n\n> **Note:** When parsing JSON generated with `replacer` functions, you would likely want to use the [`reviver`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#using_the_reviver_parameter) parameter to perform the reverse operation.\n\nTypically, array elements' index would never shift (even when the element is an invalid value like a function, it will become `null` instead of omitted). Using the `replacer` function allows you to control the order of the array elements by returning a different array.\n\n### The space parameter\n\nThe `space` parameter may be used to control spacing in the final string.\n\n- If it is a number, successive levels in the stringification will each be indented by this many space characters.\n- If it is a string, successive levels will be indented by this string.\n\nEach level of indentation will never be longer than 10. Number values of `space` are clamped to 10, and string values are truncated to 10 characters.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Map/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get Map\\[Symbol.species]\n\nThe **`Map[Symbol.species]`** accessor property is an unused accessor property specifying how to copy `Map` objects.\n\n## Syntax\n\n```js\nMap[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct copied `Map` instances.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `Map` objects. Subclass constructors may override it to change the constructor assignment.\n\n> **Note:** This property is currently unused by all `Map` methods.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Map/Map.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map()\n\nThe **`Map()` constructor** creates [Map](../../globals/Map/Map.mdx) objects.\n\n## Syntax\n\n```js\nnew Map()\nnew Map(iterable)\n```\n\n> **Note:** `Map()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable` _**optional**_\n  - : An `Array` or other\n    [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) object\n    whose elements are key-value pairs. (For example, arrays with two elements,\n    such as `[[ 1, 'one' ],[ 2, 'two' ]]`.) Each key-value pair is added to the\n    new `Map`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Map/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype\\[Symbol.iterator]()\n\nThe **`Symbol.iterator`** method of a `Map` object implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows maps to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the key-value pairs of the map.\n\nThe initial value of this property is the same function object as the initial value of the [`Map.prototype.entries`](../../../globals/Map/prototype/entries.mdx) property.\n\n## Syntax\n\n```js\nmap[Symbol.iterator]()\n```\n\n### Return value\n\nThe same return value as [`Map.prototype.entries()`](../../../globals/Map/prototype/entries.mdx): a new iterable iterator object that yields the key-value pairs of the map.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Map/prototype/clear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.clear()\n\nThe **`clear()`** method removes all elements from a `Map` object.\n\n## Syntax\n\n```js\nclear()\n```\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Map/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.delete()\n\nThe **`delete()`** method removes the specified element from a `Map` object by\nkey.\n\n## Syntax\n\n```js\ndelete(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to remove from the `Map` object.\n\n### Return value\n\n`true` if an element in the `Map` object existed and has been removed, or\n`false` if the element does not exist.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Map/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.entries()\n\nThe **`entries()`** method returns a new\n_[iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators)_ object\nthat contains the `[key, value]` pairs for each element in the `Map` object in\ninsertion order. In this particular case, this iterator object is also an\niterable, so the for-of loop can be used. When the protocol `[Symbol.iterator]`\nis used, it returns a function that, when invoked, returns this iterator itself.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nA new [Map](../../../globals/Map/Map.mdx) iterator object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Map/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.forEach()\n\nThe **`forEach()`** method executes a provided function once per each key/value\npair in the `Map` object, in insertion order.\n\n## Syntax\n\n```js\n// Arrow function\nforEach(() => { /* … */ } )\nforEach((value) => { /* … */ } )\nforEach((value, key) => { /* … */ } )\nforEach((value, key, map) => { /* … */ } )\n\n// Callback function\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n\n// Inline callback function\nforEach(function() { /* … */ })\nforEach(function(value) { /* … */ })\nforEach(function(value, key) { /* … */ })\nforEach(function(value, key, map) { /* … */ })\nforEach(function(value, key, map) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n  - : Function to execute for each entry in the map. It takes the following\n    arguments:\n    - `value` _**optional**_\n      - : Value of each iteration.\n    - `key` _**optional**_\n      - : Key of each iteration.\n    - `map` _**optional**_\n      - : The map being iterated.\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `callback`.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n## Description\n\nThe `forEach` method executes the provided `callback` once for each key of the\nmap which actually exist. It is not invoked for keys which have been deleted.\nHowever, it is executed for values which are present but have the value\n`undefined`.\n\n`callback` is invoked with **three arguments**:\n\n- the entry's `value`\n- the entry's `key`\n- the **`Map` object** being traversed\n\nIf a `thisArg` parameter is provided to `forEach`, it will be passed to\n`callback` when invoked, for use as its `this` value. Otherwise, the value\n`undefined` will be passed for use as its `this` value. The `this` value\nultimately observable by `callback` is determined according to\n[the usual rules for determining the `this` seen by a function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this).\n\nEach value is visited once, except in the case when it was deleted and re-added\nbefore `forEach` has finished. `callback` is not invoked for values deleted\nbefore being visited. New values added before `forEach` has finished will be\nvisited.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Map/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.get()\n\nThe **`get()`** method returns a specified element from a `Map` object. If the\nvalue that is associated to the provided key is an object, then you will get a\nreference to that object and any change made to that object will effectively\nmodify it inside the `Map` object.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to return from the `Map` object.\n\n### Return value\n\nThe element associated with the specified key, or\n[`undefined`](../../../globals/undefined.mdx) if the key can't be found in the `Map` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Map/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.has()\n\nThe **`has()`** method returns a boolean indicating whether an element with the\nspecified key exists or not.\n\n## Syntax\n\n```js\nhas(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to test for presence in the `Map` object.\n\n### Return value\n\n`true` if an element with the specified key exists in the `Map` object;\notherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Map/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.keys()\n\nThe **`keys()`** method returns a new\n_[iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators)_ object\nthat contains the keys for each element in the `Map` object in insertion order. In this particular case, this iterator object is also an iterable, so a [for...of](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loop can be used.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nA new [Map](../../../globals/Map/Map.mdx) iterator object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Map/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.set()\n\nThe **`set()`** method adds or updates an entry in a `Map` object with a specified key and a value.\n\n## Syntax\n\n```js\nset(key, value)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to add to the `Map` object. The key may be any [JavaScript type](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures) (any [primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_values) or any type of [JavaScript object](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#objects)).\n- `value`\n  - : The value of the element to add to the `Map` object. The value may be any [JavaScript type](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures) (any [primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_values) or any type of [JavaScript object](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#objects)).\n\n### Return value\n\nThe `Map` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Map/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.size\n\nThe **`size`** accessor property returns the number of elements in a\n[Map](../../../globals/Map/Map.mdx) object.\n\n## Description\n\nThe value of `size` is an integer representing how many entries the `Map` object\nhas. A set accessor function for `size` is `undefined`; you can not change this\nproperty.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Map/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.values()\n\nThe **`values()`** method returns a new\n_[iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators)_ object\nthat contains the values for each element in the `Map` object in insertion\norder.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nA new [Map](../../../globals/Map/Map.mdx) iterator object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/E.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.E\n\nThe **`Math.E`** property represents Euler's number, the base of natural logarithms, e, which is approximately 2.718.\n\n## Value\n\n`2.718281828459045`\n\n## Description\n\nBecause `E` is a static property of `Math`, you always use it as `Math.E`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/LN10.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LN10\n\nThe **`Math.LN10`** property represents the natural logarithm of 10, approximately 2.302.\n\n## Value\n\n`2.302585092994046`\n\n## Description\n\nBecause `LN10` is a static property of `Math`, you always use it as `Math.LN10`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/LN2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LN2\n\nThe **`Math.LN2`** property represents the natural logarithm of 2, approximately 0.693:\n\n## Value\n\n`0.6931471805599453`\n\n## Description\n\nBecause `LN2` is a static property of `Math`, you always use it as `Math.LN2`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/LOG10e.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LOG10E\n\nThe **`Math.LOG10E`** property represents the base 10 logarithm of [E](./E.mdx), approximately 0.434.\n\n## Value\n\n`0.4342944819032518`\n\n## Description\n\nBecause `LOG10E` is a static property of `Math`, you always use it as `Math.LOG10E`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/LOG2e.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LOG2E\n\nThe **`Math.LOG2E`** property represents the base 2 logarithm of [E](./E.mdx), approximately 1.442.\n\n## Value\n\n`1.4426950408889634`\n\n## Description\n\nBecause `LOG2E` is a static property of `Math`, you always use it as `Math.LOG2E`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/PI.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.PI\n\nThe **`Math.PI`** property represents the ratio of the circumference of a circle to its diameter, approximately 3.14159.\n\n## Value\n\n`3.141592653589793`\n\n## Description\n\nBecause `PI` is a static property of `Math`, you always use it as `Math.PI`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/SQRT1_2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.SQRT1_2\n\nThe **`Math.SQRT1_2`** property represents the square root of 1/2, which is approximately 0.707.\n\n## Value\n\n`0.7071067811865476`\n\n## Description\n\n`Math.SQRT1_2` is a constant and a more performant equivalent to [`Math.sqrt(0.5)`](./sqrt.mdx).\n\nBecause `SQRT1_2` is a static property of `Math`, you always use it as `Math.SQRT1_2`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/SQRT2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.SQRT2\n\nThe **`Math.SQRT2`** property represents the square root of 2, approximately 1.414.\n\n## Value\n\n`0.7071067811865476`\n\n## Description\n\n`Math.SQRT2` is a constant and a more performant equivalent to [`Math.sqrt(2)`](./sqrt.mdx).\n\nBecause `SQRT2` is a static property of `Math`, you always use it as `Math.SQRT2`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/abs.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.abs()\n\nThe **`Math.abs()`** function returns the absolute value of a number.\n\n\n## Syntax\n\n```js\nMath.abs(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe absolute value of `x`. If `x` is negative (including `-0`), returns `-x`. Otherwise, returns `x`. The result is therefore always a positive number or `0`.\n\n## Description\n\nBecause `abs()` is a static method of `Math`, you always use it as `Math.abs()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/acos.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.acos()\n\nThe **`Math.acos()`** function returns the inverse cosine (in radians) of a number.\n\n## Syntax\n\n```js\nMath.acos(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number between -1 and 1, inclusive, representing the angle's cosine value.\n\n### Return value\n\nThe inverse cosine (angle in radians between 0 and π, inclusive) of `x`. If `x` is less than -1 or greater than 1, returns `NaN`.\n\n## Description\n\nBecause `acos()` is a static method of `Math`, you always use it as `Math.acos()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/acosh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.acosh()\n\nThe **`Math.acosh()`** function returns the inverse hyperbolic cosine of a number.\n\n## Syntax\n\n```js\nMath.acosh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 1.\n\n### Return value\n\nThe inverse hyperbolic cosine of `x`. If `x` is less than 1, returns `NaN`.\n\n## Description\n\nBecause `acosh()` is a static method of `Math`, you always use it as `Math.acosh()`, rather than as a method of a `Math` object you created (`Math` is no constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/asin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.asin()\n\nThe **`Math.asin()`** function returns the inverse sine (in radians) of a number.\n\n## Syntax\n\n```js\nMath.asin(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number between -1 and 1, inclusive, representing the angle's sine value.\n\n### Return value\n\nThe inverse sine (angle in radians between <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math>, inclusive) of `x`. If `x` is less than -1 or greater than 1, returns `NaN`.\n\n## Description\n\nBecause `asin()` is a static method of `Math`, you always use it as `Math.asin()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/asinh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.asinh()\n\nThe **`Math.asinh()`** function returns the inverse hyperbolic sine of a number. \n\n## Syntax\n\n```js\nMath.asinh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe inverse hyperbolic sine of `x`.\n\n## Description\n\nBecause `asinh()` is a static method of `Math`, you always use it as `Math.asinh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/atan.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.atan()\n\nThe **`Math.atan()`** function returns the inverse tangent (in radians) of a number.\n\n## Syntax\n\n```js\nMath.atan(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe inverse tangent (angle in radians between <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math> and <math><semantics><mfrac><mi>π</mi><mn>2</mn></mfrac></semantics></math>, inclusive) of `x`. If `x` is `Infinity`, it returns <math><semantics><mfrac><mi>π</mi><mn>2</mn></mfrac></semantics></math>. If `x` is `-Infinity`, it returns <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math>.\n\n## Description\n\nBecause `atan()` is a static method of `Math`, you always use it as `Math.atan()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/atan2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.atan2()\n\nThe **`Math.atan2()`** function returns the angle in the plane (in radians) between the positive x-axis and the ray from (0, 0) to the point (x, y), for `Math.atan2(y, x)`.\n\n## Syntax\n\n```js\nMath.atan2(y, x)\n```\n\n### Parameters\n\n- `y`\n  - : The y coordinate of the point.\n- `x`\n  - : The x coordinate of the point.\n\n### Return value\n\nThe angle in radians (between -π and π, inclusive) between the positive x-axis and the ray from (0, 0) to the point (x, y).\n\n## Description\n\nThe `Math.atan2()` method measures the counterclockwise angle θ, in radians, between the positive x-axis and the point `(x, y)`. Note that the arguments to this function pass the y-coordinate first and the x-coordinate second.\n\n`Math.atan2()` is passed separate `x` and `y` arguments, while [`Math.atan()`](./atan.mdx) is passed the ratio of those two arguments. `Math.atan2(y, x)` differs from `Math.atan(y / x)` in the following cases:\n\n| `x`                  | `y`         | `Math.atan2(y, x)` | `Math.atan(y / x)` |\n| -------------------- | ----------- | ------------------ | ------------------ |\n| `Infinity`           | `Infinity`  | π / 4              | `NaN`              |\n| `Infinity`           | `-Infinity` | -π / 4             | `NaN`              |\n| `-Infinity`          | `Infinity`  | 3π / 4             | `NaN`              |\n| `-Infinity`          | `-Infinity` | -3π / 4            | `NaN`              |\n| 0                    | 0           | 0                  | `NaN`              |\n| 0                    | -0          | -0                 | `NaN`              |\n| < 0 (including `-0`) | 0           | π                  | 0                  |\n| < 0 (including `-0`) | -0          | -π                 | 0                  |\n| `-Infinity`          | > 0         | π                  | -0                 |\n| -0                   | > 0         | π / 2              | -π / 2             |\n| `-Infinity`          | < 0         | -π                 | 0                  |\n| -0                   | < 0         | -π / 2             | π / 2              |\n\nIn addition, for points in the second and third quadrants (`x < 0`), `Math.atan2()` would output an angle less than <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math>.\n\nBecause `atan2()` is a static method of `Math`, you always use it as `Math.atan2()`, rather than as a method of a `Math` object you created (`Math` is not a constructor)."
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/atanh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.atanh()\n\nThe **`Math.atanh()`** function returns the inverse hyperbolic tangent of a number. \n\n## Syntax\n\n```js\nMath.atanh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number between -1 and 1, inclusive.\n\n### Return value\n\nThe inverse hyperbolic tangent of `x`. If `x` is 1, returns `Infinity`. If `x` is -1, returns `-Infinity`. If `x` is less than -1 or greater than 1, returns `NaN`.\n\n## Description\n\nBecause `atanh()` is a static method of `Math`, you always use it as `Math.atanh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/cbrt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.cbrt()\n\nThe **`Math.cbrt()`** function returns the cube root of a number.\n\n## Syntax\n\n```js\nMath.cbrt(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe cube root of `x`.\n\n## Description\n\nBecause `cbrt()` is a static method of `Math`, you always use it as `Math.cbrt()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/ceil.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.ceil()\n\nThe **`Math.ceil()`** function always rounds up and returns the smaller integer greater than or equal to a given number.\n\n## Syntax\n\n```js\nMath.ceil(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe smallest integer greater than or equal to `x`. It's the same value as [`-Math.floor(-x)`](./floor.mdx).\n\n## Description\n\nBecause `ceil()` is a static method of `Math`, you always use it as `Math.ceil()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/clz32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.clz32()\n\nThe **`Math.clz32()`** function returns the number of leading zero bits in the 32-bit binary representation of a number.\n\n## Syntax\n\n```js\nMath.clz32(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe number of leading zero bits in the 32-bit binary representation of `x`.\n\n## Description\n\n`clz32` is short for **C**ount**L**eading**Z**eros**32**.\n\nIf `x` is not a number, it will be converted to a number first, then converted to a 32-bit unsigned integer.\n\nIf the converted 32-bit unsigned integer is `0`, `32` is returned, because all bits are `0`. If the most significant bit is `1` (i.e. the number is greater than or equal to 2<sup>31</sup>), `0` is returned.\n\nThis function is particularly useful for systems that compile to JS, like [Emscripten](https://emscripten.org).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/cos.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.cos()\n\nThe **`Math.cos()`** function returns the cosine of a number in radians.\n\n## Syntax\n\n```js\nMath.cos(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number representing an angle in radians.\n\n### Return value\n\nThe cosine of `x`, between -1 and 1, inclusive. If `x` is `Infinity`, `-Infinity`, or `NaN`, returns `NaN`.\n\n## Description\n\nBecause `cos()` is a static method of `Math`, you always use it as `Math.cos()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/cosh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.cosh()\n\nThe **`Math.cosh()`** function returns the hyperbolic cosine of a number. \n\n## Syntax\n\n```js\nMath.cosh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe hyperbolic cosine of `x`.\n\n## Description\n\nBecause `cosh()` is a static method of `Math`, you always use it as `Math.cosh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor)."
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/exp.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.exp()\n\nThe **`Math.exp()`** function returns [E](./E.mdx) raised to the power of a number.\n\n## Syntax\n\n```js\nMath.exp(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nA nonnegative number representing e<sup>x</sup>, where e is [the base of the natural logarithm](./E.mdx).\n\n## Description\n\nBecause `exp()` is a static method of `Math`, you always use it as `Math.exp()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nBeware that `e` to the power of a number very close to 0 will be very close to 1 and suffer from loss of precision. In this case, you may want to use `Math.expm1` instead, and obtain a much higher-precision fractional part of the answer.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/expm1.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.expm1()\n\nThe **`Math.expm1()`** function returns [E](./E.mdx) raised to the power of a number, subtracted by 1.\n\n## Syntax\n\n```js\nMath.expm1(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nA number representing e<sup>x</sup> - 1, where e is [the base of the natural logarithm](./E.mdx).\n\n## Description\n\nFor very small values of _x_, adding 1 can reduce or eliminate precision. The double floats used in JS give you about 15 digits of precision. 1 + 1e-15 \\= 1.000000000000001, but 1 + 1e-16 = 1.000000000000000 and therefore exactly 1.0 in that arithmetic, because digits past 15 are rounded off.\n\nWhen you calculate <math display=\"inline\"><semantics><msup><mi mathvariant=\"normal\">e</mi><mi>x</mi></msup></semantics></math>. If you calculate `Math.exp(1.1111111111e-15) - 1`, you should get an answer close to `1.1111111111e-15`. Instead, due to the highest significant figure in the result of `Math.exp` being the units digit `1`, the final value ends up being `1.1102230246251565e-15`, with only 3 correct digits. If, instead, you calculate `Math.exp1m(1.1111111111e-15)`, you will get a much more accurate answer `1.1111111111000007e-15`, with 11 correct digits of precision.\n\nBecause `expm1()` is a static method of `Math`, you always use it as `Math.expm1()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/floor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.floor()\n\nThe **`Math.floor()`** function always rounds down and returns the largest integer less than or equal to a given number.\n\n## Syntax\n\n```js\nMath.floor(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe largest integer smaller than or equal to `x`. It's the same value as [`-Math.ceil(-x)`](./ceil.mdx).\n\n## Description\n\nBecause `floor()` is a static method of `Math`, you always use it as `Math.floor()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/fround.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.fround()\n\nThe **`Math.fround()`** function returns the nearest [32-bit single precision](https://en.wikipedia.org/wiki/Single-precision_floating-point_format) float representation of a number.\n\n## Syntax\n\n```js\nMath.fround(doubleFloat)\n```\n\n### Parameters\n\n- `doubleFloat`\n  - : A number.\n\n### Return value\n\nThe nearest [32-bit single precision](https://en.wikipedia.org/wiki/Single-precision_floating-point_format) float representation of `x`.\n\n## Description\n\nJavaScript uses 64-bit double floating-point numbers internally, which offer a very high precision. However, sometimes you may be working with 32-bit floating-point numbers, for example if you are reading values from a `Float32Array`. This can create confusion: checking a 64-bit float and a 32-bit float for equality may fail even though the numbers are seemingly identical.\n\nTo solve this, `Math.fround()` can be used to cast the 64-bit float to a 32-bit float. Internally, JavaScript continues to treat the number as a 64-bit float, it just performs a \"round to even\" on the 23rd bit of the mantissa, and sets all following mantissa bits to `0`. If the number is outside the range of a 32-bit float, `Infinity` or `-Infinity` is returned.\n\nBecause `fround()` is a static method of `Math`, you always use it as `Math.fround()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/hypot.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.hypot()\n\nThe **`Math.hypot()`** function returns the square root of the sum of squares of its arguments. \n\n## Syntax\n\n```js\nMath.hypot()\nMath.hypot(value0)\nMath.hypot(value0, value1)\nMath.hypot(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `value1`, …, `valueN`\n  - : Numbers.\n\n### Return value\n\nThe square root of the sum of squares of the given arguments. Returns Infinity if any of the arguments is ±Infinity. Otherwise, if at least one of the arguments is or is converted to NaN, returns NaN. Returns `0` if no arguments are given or all arguments are ±0.\n\n## Description\n\nCalculating the hypotenuse of a right triangle, or the magnitude of a complex number, uses the formula `Math.sqrt(v1*v1 + v2*v2)`, where v1 and v2 are the lengths of the triangle's legs, or the complex number's real and complex components. The corresponding distance in 2 or more dimensions can be calculated by adding more squares under the square root: `Math.sqrt(v1*v1 + v2*v2 + v3*v3 + v4*v4)`.\n\nThis function makes this calculation easier and faster; you call `Math.hypot(v1, v2)`, or `Math.hypot(v1, /* … ,*/, vN)`.\n\n`Math.hypot` also avoids overflow/underflow problems if the magnitude of your numbers is very large. The largest number you can represent in JS is [`Number.MAX_VALUE`](../Number/MAX_VALUE.mdx), which is around 10<sup>308</sup>. If your numbers are larger than about 10<sup>154</sup>, taking the square of them will result in Infinity. For example, `Math.sqrt(1e200*1e200 + 1e200*1e200) = Infinity`. If you use `hypot()` instead, you get a better answer: `Math.hypot(1e200, 1e200) = 1.4142...e+200` . This is also true with very small numbers. `Math.sqrt(1e-200*1e-200 + 1e-200*1e-200) = 0`, but `Math.hypot(1e-200, 1e-200) = 1.4142...e-200`.\n\nWith one argument, `Math.hypot()` is equivalent to [`Math.abs()`](./abs.mdx). [`Math.hypot.length`](../Function/prototype/length.mdx) is 2, which weakly signals that it's designed to handle at least two parameters.\n\nBecause `hypot()` is a static method of `Math`, you always use it as `Math.hypot()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/imul.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.imul()\n\nThe **`Math.imul()`** function returns the result of the C-like 32-bit multiplication of the two parameters.\n\n\n## Syntax\n\n```js\nMath.imul(a, b)\n```\n\n### Parameters\n\n- `a`\n  - : First number.\n- `b`\n  - : Second number.\n\n### Return value\n\nThe result of the C-like 32-bit multiplication of the given arguments.\n\n## Description\n\n`Math.imul()` allows for 32-bit integer multiplication with C-like semantics. This feature is useful for projects like [Emscripten](https://en.wikipedia.org/wiki/Emscripten).\n\nBecause `imul()` is a static method of `Math`, you always use it as `Math.imul()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nIf you use normal JavaScript floating point numbers in `imul()`, you will experience a degrade in performance. This is because of the costly conversion from a floating point to an integer for multiplication, and then converting the multiplied integer back into a floating point.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/log.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log()\n\nThe **`Math.log()`** function returns the natural logarithm (base [E](./E.mdx)) of a number.\n\n## Syntax\n\n```js\nMath.log(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe natural logarithm (base [E](./E.mdx)) of `x`. If `x` is ±0, returns [`-Infinity`](../Number/NEGATIVE_INFINITY.mdx). If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `log()` is a static method of `Math`, you always use it as `Math.log()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nIf you need the natural log of 2 or 10, use the constants `Math.LN2` or `Math.LN10`. If you need a logarithm to base 2 or 10, use `Math.log2()` or `Math.log10()`. If you need a logarithm to other bases, use `Math.log(x) / Math.log(otherBase)` as in the example below; you might want to precalculate `1 / Math.log(otherBase)` since multiplication in `Math.log(x) * constant` is much faster.\n\nBeware that positive numbers very close to 1 can suffer from loss of precision and make its natural logarithm less accurate. In this case, you may want to use `Math.log1p` instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/log10.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log10()\n\nThe **`Math.log10()`** function returns the base 10 logarithm of a number. \n\n## Syntax\n\n```js\nMath.log10(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe base 10 logarithm of `x`. If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `log10()` is a static method of `Math`, you always use it as `Math.log10()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nThis function is the equivalent of `Math.log(x) / Math.log(10)`. For `log10(e)`, use the constant `Math.LOG10E`, which is 1 / `Math.LN10`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/log1p.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log1p()\n\nThe **`Math.log1p()`** function returns the natural logarithm (base [E](./E.mdx)) of `1 + x`, where `x` is the argument.\n\n## Syntax\n\n```js\nMath.log1p(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to -1.\n\n### Return value\n\nThe natural logarithm (base [E](./E.mdx)) of `x + 1`. If `x` is -1, returns [`-Infinity`](../Number/NEGATIVE_INFINITY.mdx). If `x < -1`, returns `NaN`.\n\n## Description\n\nFor very small values of _x_, adding 1 can reduce or eliminate precision. The double floats used in JS give you about 15 digits of precision. 1 + 1e-15 \\= 1.000000000000001, but 1 + 1e-16 = 1.000000000000000 and therefore exactly 1.0 in that arithmetic, because digits past 15 are rounded off.\n\nWhen you calculate log(1 + _x_) where _x_ is a small positive number, you should get an answer very close to _x_, because <math display=\"inline\"><semantics><mrow><munder><mo movablelimits=\"true\" form=\"prefix\">lim</mo><mrow ><mi>x</mi><mo stretchy=\"false\">→</mo><mn>0</mn></mrow></munder><mfrac><mrow><mi>log</mi><mo>⁡</mo><mo stretchy=\"false\">(</mo><mn>1</mn><mo>+</mo><mi>x</mi><mo stretchy=\"false\">)</mo></mrow><mi>x</mi></mfrac><mo>=</mo><mn>1</mn></mrow></semantics></math>. If you calculate `Math.log(1 + 1.1111111111e-15)`, you should get an answer close to `1.1111111111e-15`. Instead, you will end up taking the logarithm of `1.00000000000000111022` (the roundoff is in binary, so sometimes it gets ugly), and get the answer 1.11022…e-15, with only 3 correct digits. If, instead, you calculate `Math.log1p(1.1111111111e-15)`, you will get a much more accurate answer `1.1111111110999995e-15`, with 15 correct digits of precision (actually 16 in this case).\n\nIf the value of `x` is less than -1, the return value is always `NaN`.\n\nBecause `log1p()` is a static method of `Math`, you always use it as `Math.log1p()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/log2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log2()\n\nThe **`Math.log2()`** function returns the base 2 logarithm of a number.\n\n## Syntax\n\n```js\nMath.log2(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe base 2 logarithm of `x`. If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `log2()` is a static method of `Math`, you always use it as `Math.log2()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nThis function is the equivalent of `Math.log(x) / Math.log(2)`. For `log2(e)`, use the constant `Math.LOG2E`, which is 1 / `Math.LN2`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/max.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.max()\n\nThe **`Math.max()`** function returns the largest of the numbers given as input parameters, or `-Infinity` if there are no parameters.\n\n## Syntax\n\n```js\nMath.max()\nMath.max(value0)\nMath.max(value0, value1)\nMath.max(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `value1`, `value2`, … , `valueN`\n  - : Zero or more numbers among which the largest value will be selected and returned.\n\n### Return value\n\nThe largest of the given numbers. Returns `NaN` if any of the parameters is or is converted into `NaN`. Returns `-Infinity` if no parameters are provided.\n\n## Description\n\nBecause `max()` is a static method of `Math`, you always use it as `Math.max()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n[`Math.max.length`](../Function/prototype/length.mdx) is 2, which weakly signals that it's designed to handle at least two parameters.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/min.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.min()\n\nThe **`Math.min()`** function returns the smallest of the numbers given as input parameters, or `Infinity` if there are no parameters.\n\n## Syntax\n\n```js\nMath.min()\nMath.min(value0)\nMath.min(value0, value1)\nMath.min(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `value1`, …, `valueN`\n  - : Zero or more numbers among which the lowest value will be selected and returned.\n\n### Return value\n\nThe smallest of the given numbers. Returns `NaN` if any of the parameters is or is converted into `NaN`. Returns `Infinity` if no parameters are provided.\n\n## Description\n\nBecause `min()` is a static method of `Math`, you always use it as `Math.min()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n[`Math.min.length`](../Function/prototype/length.mdx) is 2, which weakly signals that it's designed to handle at least two parameters.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/pow.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.pow()\n\nThe **`Math.pow()`** method returns the value of a base raised to a power.\n\n## Syntax\n\n```js\nMath.pow(base, exponent)\n```\n\n### Parameters\n\n- `base`\n  - : The base number.\n- `exponent`\n  - : The exponent number.\n\n### Return value\n\nA number representing `base` taken to the power of `exponent`. Returns `NaN` in one of the following cases:\n\n- `exponent` is `NaN`.\n- `base` is `NaN` and `exponent` is not `0`.\n- `base` is ±1 and `exponent` is ±`Infinity`.\n- `base < 0` and `exponent` is not an integer.\n\n## Description\n\n`Math.pow()` is equivalent to the `**` operator, except `Math.pow()` only accepts numbers.\n\n`Math.pow(NaN, 0)` (and the equivalent `NaN ** 0`) is the only case where `NaN` doesn't propagate through mathematical operations — it returns `1` despite the operand being `NaN`. In addition, the behavior where `base` is 1 and `exponent` is non-finite (±Infinity or `NaN`) is different from IEEE 754, which specifies that the result should be 1, whereas JavaScript returns `NaN` to preserve backward compatibility with its original behavior.\n\nBecause `pow()` is a static method of `Math`, use it as `Math.pow()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/random.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.random()\n\nThe **`Math.random()`** function returns a floating-point, pseudo-random number that's greater than or equal to 0 and less than 1, with approximately uniform distribution over that range — which you can then scale to your desired range. The implementation selects the initial seed to the random number generation algorithm; it cannot be chosen or reset by the user.\n\n> **Note:** `Math.random()` _does not_ provide cryptographically secure random numbers. Do not use them for anything related to security. Use the Web Crypto API instead, and more precisely the `crypto.getRandomValues()` method.\n\n## Syntax\n\n```js\nMath.random()\n```\n\n### Return value\n\nA floating-point, pseudo-random number between 0 (inclusive) and 1 (exclusive).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/round.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.round()\n\nThe **`Math.round()`** function returns the value of a number rounded to the nearest integer.\n\n## Syntax\n\n```js\nMath.round(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe value of `x` rounded to the nearest integer.\n\n## Description\n\nIf the fractional portion of the argument is greater than 0.5, the argument is rounded to the integer with the next higher absolute value. If it is less than 0.5, the argument is rounded to the integer with the lower absolute value. If the fractional portion is exactly 0.5, the argument is rounded to the next integer in the direction of +∞.\n\n> **Note:** This differs from many languages' `round()` functions, which often round half-increments _away from zero_, giving a different result in the case of negative numbers with a fractional part of exactly 0.5.\n\n`Math.round(x)` is not exactly the same as [`Math.floor(x + 0.5)`](./floor.mdx). When `x` is -0, or -0.5 ≤ x < 0, `Math.round(x)` returns -0, while `Math.floor(x + 0.5)` returns 0. However, neglecting that difference and potential precision errors, `Math.round(x)` and `Math.floor(x + 0.5)` are generally equivalent.\n\nBecause `round()` is a static method of `Math`, you always use it as `Math.round()`, rather than as a method of a `Math` object you created (`Math` has no constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/sign.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sign()\n\nThe **`Math.sign()`** function returns 1 or -1, indicating the sign of the number passed as argument. If the input is 0 or -0, it will be returned as-is.\n\n## Syntax\n\n```js\nMath.sign(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nA number representing the sign of `x`:\n\n- If `x` is positive, returns `1`.\n- If `x` is negative, returns `-1`.\n- If `x` is positive zero, returns `0`.\n- If `x` is negative zero, returns `-0`.\n- Otherwise, returns `NaN`.\n\n## Description\n\nBecause `sign()` is a static method of `Math`, you always use it as `Math.sign()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/sin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sin()\n\nThe **`Math.sin()`** function returns the sine of a number in radians.\n\n## Syntax\n\n```js\nMath.sin(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number representing an angle in radians.\n\n### Return value\n\nThe sine of `x`, between -1 and 1, inclusive. If `x` is `Infinity`, `-Infinity`, or `NaN`, returns `NaN`.\n\n## Description\n\nBecause `sin()` is a static method of `Math`, you always use it as `Math.sin()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/sinh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sinh()\n\nThe **`Math.sinh()`** function returns the hyperbolic sine of a number. \n\n## Syntax\n\n```js\nMath.sinh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe hyperbolic sine of `x`.\n\n## Description\n\nBecause `sinh()` is a static method of `Math`, you always use it as `Math.sinh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/sqrt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sqrt()\n\nThe **`Math.sqrt()`** function returns the square root of a number.\n\n## Syntax\n\n```js\nMath.sqrt(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe square root of `x`, a nonnegative number. If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `sqrt()` is a static method of `Math`, you always use it as `Math.sqrt()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/tan.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.tan()\n\nThe **`Math.tan()`** function returns the tangent of a number in radians.\n\n\n## Syntax\n\n```js\nMath.tan(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number representing an angle in radians.\n\n### Return value\n\nThe tangent of `x`. If `x` is `Infinity`, `-Infinity`, or `NaN`, returns `NaN`.\n\n> **Note:** Due to floating point precision, it's not possible to obtain the exact value π/2, so the result is always finite if not `NaN`.\n\n## Description\n\nBecause `tan()` is a static method of `Math`, you always use it as `Math.tan()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/tanh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.tanh()\n\nThe **`Math.tanh()`** function returns the hyperbolic tangent of a number. \n\n## Syntax\n\n```js\nMath.tanh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe hyperbolic tangent of `x`.\n\n## Description\n\nBecause `tanh()` is a static method of `Math`, you always use it as `Math.tanh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Math/trunc.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.trunc()\n\nThe **`Math.trunc()`** function returns the integer part of a number by removing any fractional digits.\n\n## Syntax\n\n```js\nMath.trunc(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe integer part of `x`.\n\n## Description\n\nUnlike the other three `Math` methods: `Math.floor()`, `Math.ceil()` and `Math.round()`, the way `Math.trunc()` works is very simple. It _truncates_ (cuts off) the dot and the digits to the right of it, no matter whether the argument is a positive or negative number.\n\nBecause `trunc()` is a static method of `Math`, you always use it as `Math.trunc()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/NaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# NaN\n\nThe global **`NaN`** property is a value representing Not-A-Number.\n\n## Value\n\nThe same number value as [`Number.NaN`](./Number/NaN.mdx).\n\n## Description\n\n`NaN` is a property of the _global object_. In other words, it is a variable in global scope.\n\nIn modern browsers, `NaN` is a non-configurable, non-writable property. Even when this is not the case, avoid overriding it.\n\nThere are five different types of operations that return `NaN`:\n\n- Failed number conversion (e.g. explicit ones like `parseInt(\"blabla\")`, `Number(undefined)`, or implicit ones like `Math.abs(undefined)`)\n- Math operation where the result is not a real number (e.g. `Math.sqrt(-1)`)\n- Indeterminate form (e.g. `0 * Infinity`, `1 ** Infinity`, `Infinity / Infinity`, `Infinity - Infinity`)\n- A method or expression whose operand is or gets coerced to `NaN` (e.g. `7 ** NaN`, `7 * \"blabla\"`) — this means `NaN` is contagious\n- Other cases where an invalid value is to be represented as a number (e.g. an invalid `new Date(\"blabla\").getTime()`, `\"\".charCodeAt(1)`)\n\n`NaN` and its behaviors are not invented by JavaScript. Its semantics in floating point arithmetic (including that `NaN !== NaN`) are specified by [IEEE 754](https://en.wikipedia.org/wiki/Double_precision_floating-point_format). `NaN`'s behaviors include:\n\n- If `NaN` is involved in a mathematical operation (but not [bitwise operations](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators#bitwise_shift_operators)), the result is usually also `NaN`. (See see [silently escaping NaN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN#silently_escaping_nan) for a counter-example.)\n- When `NaN` is one of the operands of any relational comparison (`>`, `<`, `>=`, `<=`), the result is always `false`.\n- `NaN` compares unequal (via [`==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Equality), [`!=`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Inequality), [`===`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality), and [`!==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_inequality)) to any other value — including to another `NaN` value.\n\n`NaN` is also one of the [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) values in JavaScript.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Number/MAX_SAFE_INTEGER.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MAX_SAFE_INTEGER\n\nThe **`Number.MAX_SAFE_INTEGER`** constant represents the maximum safe integer in JavaScript (2<sup>53</sup> – 1).\n\nFor larger integers, consider using `BigInt`.\n\n## Value\n\n`9007199254740991` (9,007,199,254,740,991, or \\~9 quadrillion).\n\n## Description\n\n[Double precision floating point format](https://en.wikipedia.org/wiki/Double_precision_floating-point_format) only has 52 bits to represent the [mantissa](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_encoding), so it can only safely represent integers between -(2<sup>53</sup> – 1) and 2<sup>53</sup> – 1. \"Safe\" in this context refers to the ability to represent integers exactly and to compare them correctly. For example, `Number.MAX_SAFE_INTEGER + 1 === Number.MAX_SAFE_INTEGER + 2` will evaluate to true, which is mathematically incorrect. See `Number.isSafeInteger()` for more information.\n\nBecause `MAX_SAFE_INTEGER` is a static property of `Number`, you always use it as `Number.MAX_SAFE_INTEGER`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Number/MAX_VALUE.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MAX_VALUE\n\nThe **`Number.MAX_VALUE`** property represents the maximum numeric value representable in JavaScript.\n\n## Value\n\n2<sup>1024</sup> - 1, or approximately `1.7976931348623157E+308`.\n\n## Description\n\nValues larger than `MAX_VALUE` are represented as [`Infinity`](../../globals/Infinity.mdx) and will lose their actual value.\n\nBecause `MAX_VALUE` is a static property of `Number`, you always use it as `Number.MAX_VALUE`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Number/MIN_SAFE_INTEGER.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MIN_SAFE_INTEGER\n\nThe **`Number.MIN_SAFE_INTEGER`** constant represents the minimum safe integer in JavaScript, or -(2<sup>53</sup> - 1).\n\nTo represent integers smaller than this, consider using `BigInt`.\n\n## Value\n\n`-9007199254740991` (-9,007,199,254,740,991, or about -9 quadrillion).\n\n## Description\n\n[Double precision floating point format](https://en.wikipedia.org/wiki/Double_precision_floating-point_format) only has 52 bits to represent the [mantissa](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_encoding), so it can only safely represent integers between -(2<sup>53</sup> – 1) and 2<sup>53</sup> – 1. Safe in this context refers to the ability to represent integers exactly and to correctly compare them. For example, `Number.MIN_SAFE_INTEGER - 1 === Number.MIN_SAFE_INTEGER - 2` will evaluate to true, which is mathematically incorrect. See `Number.isSafeInteger()` for more information.\n\nBecause `MIN_SAFE_INTEGER` is a static property of `Number`, you always use it as `Number.MIN_SAFE_INTEGER`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Number/MIN_VALUE.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MIN_VALUE\n\nThe **`Number.MIN_VALUE`** property represents the smallest positive numeric value representable in JavaScript.\n\n## Value\n\n2<sup>-1074</sup>, or `5E-324`.\n\n## Description\n\n`Number.MIN_VALUE` is the smallest positive number (not the most negative number) that can be represented within float precision — in other words, the number closest to 0. The ECMAScript spec doesn't define a precise value that implementations are required to support — instead the spec says, _\"must be the smallest non-zero positive value that can actually be represented by the implementation\"_. This is because small IEEE-754 floating point numbers are [denormalized](https://en.wikipedia.org/wiki/Subnormal_number), but implementations are not required to support this representation, in which case `Number.MIN_VALUE` may be larger.\n\nIn practice, its precise value in mainstream engines like V8 (used by Chrome, Edge, Node.js), SpiderMonkey (used by Firefox), and JavaScriptCore (used by Safari) is 2<sup>-1074</sup>, or `5E-324`.\n\nBecause `MIN_VALUE` is a static property of `Number`, you always use it as `Number.MIN_VALUE`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Number/NEGATIVE_INFINITY.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.NEGATIVE_INFINITY\n\nThe **`Number.NEGATIVE_INFINITY`** property represents the negative Infinity value.\n\n## Value\n\nThe same as the negative value of the global [`Infinity`](../../globals/Infinity.mdx) property.\n\n## Description\n\nThe `Number.NEGATIVE_INFINITY` value behaves slightly differently than mathematical infinity:\n\n- Any positive value, including `Number.POSITIVE_INFINITY`, multiplied by `Number.NEGATIVE_INFINITY` is `Number.NEGATIVE_INFINITY`.\n- Any negative value, including `Number.NEGATIVE_INFINITY`, multiplied by `Number.NEGATIVE_INFINITY` is `Number.POSITIVE_INFINITY`.\n- Any positive value divided by `Number.NEGATIVE_INFINITY` is [negative zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754)).\n- Any negative value divided by `Number.NEGATIVE_INFINITY` is [positive zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754)).\n- Zero multiplied by `Number.NEGATIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- [`NaN`](../../globals/NaN.mdx) multiplied by `Number.NEGATIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- `Number.NEGATIVE_INFINITY`, divided by any negative value except `Number.NEGATIVE_INFINITY`, is `Number.POSITIVE_INFINITY`.\n- `Number.NEGATIVE_INFINITY`, divided by any positive value except `Number.POSITIVE_INFINITY`, is `Number.NEGATIVE_INFINITY`.\n- `Number.NEGATIVE_INFINITY`, divided by either `Number.NEGATIVE_INFINITY` or `Number.POSITIVE_INFINITY`, is [`NaN`](../../globals/NaN.mdx).\n- `x > Number.NEGATIVE_INFINITY` is true for any number _x_ that isn't `Number.NEGATIVE_INFINITY`.\n\nYou might use the `Number.NEGATIVE_INFINITY` property to indicate an error condition that returns a finite number in case of success. Note, however, that [`NaN`](../../globals/NaN.mdx) would be more appropriate in such a case.\n\nBecause `Number.NEGATIVE_INFINITY` is a static property of `Number`, you always use it as `Number.NEGATIVE_INFINITY`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Number/NaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.NaN\n\nThe **`Number.NaN`** property represents Not-A-Number, which is equivalent to [description for the global property](../../globals/NaN.mdx). For more information about the behaviors of `NaN`, see the [`NaN`](../../globals/NaN.mdx).\n\n## Value\n\nThe number value [`NaN`](../../globals/NaN.mdx).\n\n## Description\n\nBecause `NaN` is a static property of `Number`, you always use it as `Number.NaN`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Number/Number.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number() constructor\n\nThe **`Number()` constructor** creates a `Number` object. When called instead as a function, it performs type conversion to a primitive number, which is usually more useful.\n\n## Syntax\n\n```js\nnew Number(value)\nNumber(value)\n```\n\n> **Note:** `Number()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\n- `value`\n  - : The numeric value of the object being created.\n\n### Return value\n\nWhen `Number` is called as a constructor (with `new`), it creates a `Number` object, which is **not** a primitive.\n\nWhen `Number` is called as a function, it [coerces the parameter to a number primitive](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_coercion). [BigInts](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/BigInt) are converted to numbers. If the value can't be converted, it returns [`NaN`](../../globals/NaN.mdx).\n\n> **Warning:** You should rarely find yourself using `Number` as a constructor.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Number/POSITIVE_INFINITY.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.POSITIVE_INFINITY\n\nThe **`Number.POSITIVE_INFINITY`** property represents the positive Infinity value.\n\n## Value\n\nThe same as the value of the global [`Infinity`](../../globals/Infinity.mdx) property.\n\n## Description\n\nThe `Number.POSITIVE_INFINITY` value behaves slightly differently than mathematical infinity:\n\n- Any positive value, including `Number.POSITIVE_INFINITY`, multiplied by `Number.POSITIVE_INFINITY` is `Number.POSITIVE_INFINITY`.\n- Any negative value, including `Number.NEGATIVE_INFINITY`, multiplied by `Number.POSITIVE_INFINITY` is `Number.NEGATIVE_INFINITY`.\n- Any positive number divided by `Number.POSITIVE_INFINITY` is [positive zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754)).\n- Any negative number divided by `Number.POSITIVE_INFINITY` is [negative zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754).\n- Zero multiplied by `Number.POSITIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- `NaN` multiplied by `Number.POSITIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- `Number.POSITIVE_INFINITY`, divided by any negative value except `Number.NEGATIVE_INFINITY`, is `Number.NEGATIVE_INFINITY`.\n- `Number.POSITIVE_INFINITY`, divided by any positive value except `Number.POSITIVE_INFINITY`, is `Number.POSITIVE_INFINITY`.\n- `Number.POSITIVE_INFINITY`, divided by either `Number.NEGATIVE_INFINITY` or `Number.POSITIVE_INFINITY`, is [`NaN`](../../globals/NaN.mdx).\n- `Number.POSITIVE_INFINITY > x` is true for any number _x_ that isn't `Number.POSITIVE_INFINITY`.\n\nYou might use the `Number.POSITIVE_INFINITY` property to indicate an error condition that returns a finite number in case of success. Note, however, that [`NaN`](../../globals/NaN.mdx) would be more appropriate in such a case.\n\nBecause `Number.POSITIVE_INFINITY` is a static property of `Number`, you always use it as `Number.POSITIVE_INFINITY`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Number/epsilon.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.EPSILON\n\nThe **`Number.EPSILON`** property represents the difference between 1 and the smallest floating point number greater than 1.\n\n## Value\n\n2<sup>-52</sup>, or approximately `2.2204460492503130808472633361816E-16`.\n\n## Description\n\n`Number.EPSILON` is the difference between 1 and the next greater number representable in the Number format, because [double precision floating point format](https://en.wikipedia.org/wiki/Double_precision_floating-point_format) only has 52 bits to represent the [mantissa](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_encoding), and the lowest bit has a significance of 2<sup>-52</sup>.\n\nNote that the absolute accuracy of floating numbers decreases as the number gets larger, because the exponent grows while the mantissa's accuracy stays the same. `Number.MIN_VALUE` is the smallest representable positive number, which is much smaller than `Number.EPSILON`.\n\nBecause `EPSILON` is a static property of `Number`, you always use it as `Number.EPSILON`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Number/isFinite.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isFinite()\n\nThe **`Number.isFinite()`** method determines whether the passed value is a finite number — that is, it checks that a given value is a number, and the number is neither positive [`Infinity`](../../globals/Infinity.mdx), negative `Infinity`, nor [`NaN`](../../globals/NaN.mdx).\n\n## Syntax\n\n```js\nNumber.isFinite(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested for finiteness.\n\n### Return value\n\nThe boolean value `true` if the given value is a finite number. Otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Number/isInteger.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isInteger()\n\nThe **`Number.isInteger()`** method determines whether the passed value is an integer.\n\n## Syntax\n\n```js\nNumber.isInteger(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested for being an integer.\n\n### Return value\n\nThe boolean value `true` if the given value is an integer. Otherwise `false`.\n\n## Description\n\nIf the target value is an integer, return `true`, otherwise return `false`. If the value is [`NaN`](../../globals/NaN.mdx) or [`Infinity`](../../globals/Infinity.mdx), return `false`. The method will also return `true` for floating point numbers that can be represented as integer. It will always return `false` if the value is not a number.\n\nNote that some number literals, while looking like non-integers, actually represent integers — due to the precision limit of ECMAScript floating-point number encoding (IEEE-754). For example, `5.0000000000000001` only differs from `5` by `1e-16`, which is too small to be represented. (For reference, [`Number.EPSILON`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/EPSILON) stores the distance between 1 and the next representable floating-point number greater than 1, and that is about `2.22e-16`.) Therefore, `5.0000000000000001` will be represented with the same encoding as `5`, thus making `Number.isInteger(5.0000000000000001)` return `true`.\n\nIn a similar sense, numbers around the magnitude of [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER) will suffer from loss of precision and make `Number.isInteger` return `true` even when it's not an integer. (The actual threshold varies based on how many bits are needed to represent the decimal — for example, `Number.isInteger(4500000000000000.1)` is `true`, but `Number.isInteger(4500000000000000.5)` is `false`.)\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Number/isNaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isNaN()\n\nThe **`Number.isNaN()`** method determines whether the passed value is the number value [`NaN`](../../globals/NaN.mdx), and returns `false` if the input is not of the Number type. It is a more robust version of the original, global `isNaN()` function.\n\n## Syntax\n\n```js\nNumber.isNaN(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested for [`NaN`](../../globals/NaN.mdx).\n\n### Return value\n\nThe boolean value `true` if the given value is a number with value [`NaN`](../../globals/NaN.mdx). Otherwise, `false`.\n\n## Description\n\nThe function `Number.isNaN()` provides a convenient way to check for equality with `NaN`. Note that you cannot test for equality with `NaN` using either the [`==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Equality) or [`===`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) operators, because unlike all other value comparisons in JavaScript, these evaluate to `false` whenever one operand is [`NaN`](../../globals/NaN.mdx), even if the other operand is also [`NaN`](../../globals/NaN.mdx).\n\nSince `x !== x` is only true for `NaN` among all possible JavaScript values, `Number.isNaN(x)` can also be replaced with a test for `x !== x`, despite the latter being less readable.\n\nAs opposed to the global `isNaN()` function, the `Number.isNaN()` method doesn't force-convert the parameter to a number. This makes it safe to pass values that would normally convert to [`NaN`](../../globals/NaN.mdx) but aren't actually the same value as [`NaN`](../../globals/NaN.mdx). This also means that only values of the Number type that are also [`NaN`](../../globals/NaN.mdx) return `true`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Number/isSafeInteger.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isSafeInteger()\n\nThe **`Number.isSafeInteger()`** method determines whether the provided value is a number that is a _safe integer_.\n\n## Syntax\n\n```js\nNumber.isSafeInteger(testValue)\n```\n\n### Parameters\n\n- `testValue`\n  - : The value to be tested for being a safe integer.\n\n### Return value\n\nThe boolean value `true` if the given value is a number that is a safe integer. Otherwise `false`.\n\n## Description\n\nThe safe integers consist of all integers from -(2<sup>53</sup> - 1) to 2<sup>53</sup> - 1, inclusive (±9,007,199,254,740,991). A safe integer is an integer that:\n\n- can be exactly represented as an IEEE-754 double precision number, and\n- whose IEEE-754 representation cannot be the result of rounding any other integer to fit the IEEE-754 representation.\n\nFor example, 2<sup>53</sup> - 1 is a safe integer: it can be exactly represented, and no other integer rounds to it under any IEEE-754 rounding mode. In contrast, 2<sup>53</sup> is _not_ a safe integer: it can be exactly represented in IEEE-754, but the integer 2<sup>53</sup> + 1 can't be directly represented in IEEE-754 but instead rounds to 2<sup>53</sup> under round-to-nearest and round-to-zero rounding.\n\nHandling values larger or smaller than \\~9 quadrillion with full precision requires using an [arbitrary precision arithmetic library](https://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic). See [What Every Programmer Needs to Know about Floating Point Arithmetic](https://floating-point-gui.de/) for more information on floating point representations of numbers.\n\nFor larger integers, consider using the `BigInt` type.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Number/parseFloat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.parseFloat()\n\nThe **`Number.parseFloat()`** method parses an argument and returns a floating point number. If a number cannot be parsed from the argument, it returns [`NaN`](../../globals/NaN.mdx).\n\n## Syntax\n\n```js\nNumber.parseFloat(string)\n```\n\n### Parameters\n\n- `string`\n  - : The value to parse, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). Leading whitespace in this argument is ignored.\n\n### Return value\n\nA floating point number parsed from the given `string`.\n\nOr [`NaN`](../../globals/NaN.mdx) when the first non-whitespace character cannot be converted to a number.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Number/parseInt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.parseInt()\n\nThe **`Number.parseInt()`** method parses a string argument and\nreturns an integer of the specified radix or base.\n\n## Syntax\n\n```js\nNumber.parseInt(string)\nNumber.parseInt(string, radix)\n```\n\n### Parameters\n\n- `string`\n  - : The value to parse, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). Leading whitespace in this argument is ignored.\n- `radix` _**optional**_\n\n  - : An integer between `2` and `36` that represents the\n    _radix_ (the base in mathematical numeral systems) of the\n    `string`.\n\n    If `radix` is undefined or `0`, it is assumed to be `10` except when the number begins with the code unit pairs `0x` or `0X`, in which case a radix of `16` is assumed.\n\n### Return value\n\nAn integer parsed from the given `string`.\n\nIf the `radix` is smaller than `2` or bigger than\n`36`, or the first non-whitespace character cannot be converted to a number,\n[`NaN`](../../globals/NaN.mdx) is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Number/prototype/toExponential.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toExponential()\n\nThe **`toExponential()`** method returns a string representing\nthe `Number` object in exponential notation.\n\n## Syntax\n\n```js\ntoExponential()\ntoExponential(fractionDigits)\n```\n\n### Parameters\n\n- `fractionDigits` _**optional**_\n  - : Optional. An integer specifying the number of digits after the decimal point.\n    Defaults to as many digits as necessary to specify the number.\n\n### Return value\n\nA string representing the given `Number` object in exponential notation\nwith one digit before the decimal point, rounded to\n`fractionDigits` digits after the decimal point.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : If `fractionDigits` is too small or too large. Values between\n    `0` and `100`, inclusive, will not cause a\n    [`RangeError`](../../../globals/RangeError/RangeError.mdx).\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If this method is invoked on an object that is not a `Number`.\n\n## Description\n\nIf the `fractionDigits` argument is omitted, the number of digits\nafter the decimal point defaults to the number of digits necessary to represent the\nvalue uniquely.\n\nIf you use the `toExponential()` method for a numeric literal and the\nnumeric literal has no exponent and no decimal point, leave whitespace(s) before the dot\nthat precedes the method call to prevent the dot from being interpreted as a decimal\npoint.\n\nIf a number has more digits than requested by the\n`fractionDigits` parameter, the number is rounded to the nearest\nnumber represented by `fractionDigits` digits. See the discussion\nof rounding in the description of the [`Number.prototype.toFixed()`](../../../globals/Number/prototype/toFixed.mdx) method, which also applies to `toExponential()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Number/prototype/toFixed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toFixed()\n\nThe **`toFixed()`** method formats a number using fixed-point notation.\n\n## Syntax\n\n```js\ntoFixed()\ntoFixed(digits)\n```\n\n### Parameters\n\n- `digits` _**optional**_\n  - : The number of digits to appear after the decimal point; should be a value between `0` and `100`, inclusive. If this argument is omitted, it is treated as `0`.\n\n### Return value\n\nA string representing the given number using fixed-point notation.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : If `digits` is smaller than `0`, larger than `100`, or is `NaN`.\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If this method is invoked on an object that is not a `Number`.\n\n## Description\n\nThe `toFixed()` method returns a string representation of `numObj` that does not use exponential notation and has exactly `digits` digits after the decimal place. The number is rounded if necessary, and the fractional part is padded with zeros if necessary so that it has the specified length.\n\nIf the absolute value of `numObj` is greater or equal to 10<sup>21</sup>, this method uses the same algorithm as [`Number.prototype.toString()`](../../../globals/Number/prototype/toString.mdx) and returns a string in exponential notation. `toFixed()` returns `\"Infinity\"`, `\"NaN\"`, or `\"-Infinity\"` if the value of `numObj` is non-finite.\n\nThe output of `toFixed()` may be more precise than [`toString()`](../../../globals/Number/prototype/toString.mdx) for some values, because `toString()` only prints enough significant digits to distinguish the number from adjacent number values. For example:\n\n```js\n(1000000000000000128).toString(); // '1000000000000000100'\n(1000000000000000128).toFixed(0); // '1000000000000000128'\n```\n\nHowever, choosing a `digits` precision that's too high can return unexpected results, because decimal fractional numbers cannot be represented precisely in floating point. For example:\n\n```js\n0.3.toFixed(50); // '0.29999999999999998889776975374843459576368331909180'\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Number/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string with a language-sensitive representation of this number. In implementations with [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) support, this method simply calls `Intl.NumberFormat`.\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` parameters customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat), these parameters correspond exactly to the [`Intl.NumberFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) constructor's parameters. Implementations without `Intl.NumberFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#locales) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored.\n\nSee the [`Intl.NumberFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string with a language-sensitive representation of the given number.\n\nIn implementations with `Intl.NumberFormat`, this is equivalent to `new Intl.NumberFormat(locales, options).format(number)`.\n\n## Performance\n\nWhen formatting large numbers of numbers, it is better to create a\n`Intl.NumberFormat` object and use the function provided by its\n`format` property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Number/prototype/toPrecision.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toPrecision()\n\nThe **`toPrecision()`** method returns a string representing\nthe `Number` object to the specified precision.\n\n## Syntax\n\n```js\ntoPrecision()\ntoPrecision(precision)\n```\n\n### Parameters\n\n- `precision` _**optional**_\n  - : An integer specifying the number of significant digits.\n\n### Return value\n\nA string representing a `Number` object in fixed-point or exponential\nnotation rounded to `precision` significant digits. See the discussion of\nrounding in the description of the [`Number.prototype.toFixed()`](../../../globals/Number/prototype/toFixed.mdx) method,\nwhich also applies to `toPrecision()`.\n\nIf the `precision` argument is omitted, behaves as\n[`Number.prototype.toString()`](../../../globals/Number/prototype/toString.mdx). If the `precision` argument is a\nnon-integer value, it is rounded to the nearest integer.\n\n### Exceptions\n\n- `RangeError`\n  - : If `precision` is not between `1` and `100`\n    (inclusive), a [`RangeError`](../../../globals/RangeError/RangeError.mdx) is thrown. Implementations are allowed to\n    support larger and smaller values as well. ECMA-262 only requires a precision of up to\n    21 significant digits.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Number/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified number value.\n\n## Syntax\n\n```js\ntoString()\ntoString(radix)\n```\n\n### Parameters\n\n- `radix` _**optional**_\n  - : An integer in the range `2` through `36` specifying the base to use for representing the number value. Defaults to 10.\n\n### Return value\n\nA string representing the specified number value.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `radix` is less than 2 or greater than 36.\n\n## Description\n\nThe `Number` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For `Number` values, the `toString` method returns a string representation of the value in the specified radix.\n\nFor radixes above 10, the letters of the alphabet indicate digits greater than 9. For example, for hexadecimal numbers (base 16) `a` through `f` are used.\n\nIf the specified number value is negative, the sign is preserved. This is the case even if the radix is 2; the string returned is the positive binary representation of the number value preceded by a `-` sign, **not** the two's complement of the number value.\n\nBoth `0` and `-0` have `\"0\"` as their string representation. [`Infinity`](../../../globals/Infinity.mdx) returns `\"Infinity\"` and [`NaN`](../../../globals/NaN.mdx) returns `\"NaN\"`.\n\nIf the number is not a whole number, the decimal point `.` is used to separate the decimal places. [Scientific notation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#exponential) is used if the radix is 10 and the number's magnitude (ignoring sign) is greater than or equal to 10<sup>21</sup> or less than 10<sup>-6</sup>. In this case, the returned string always explicitly specifies the sign of the exponent.\n\n```js\nconsole.log((10 ** 21.5).toString()); // \"3.1622776601683794e+21\"\nconsole.log((10 ** 21.5).toString(8)); // \"526665530627250154000000\"\n```\n\nThe `toString()` method requires its `this` value to be a `Number` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to number values.\n\nBecause `Number` doesn't have a [`[Symbol.toPrimitive]()`](../../../globals/Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `Number` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, Number _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — rather, they are directly converted using the same algorithm as the initial `toString()` implementation.\n\n```js\nNumber.prototype.toString = () => \"Overridden\";\nconsole.log(`${1}`); // \"1\"\nconsole.log(`${new Number(1)}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Number/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.valueOf()\n\nThe **`valueOf()`** method returns the wrapped primitive value\nof a `Number` object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nA number representing the primitive value of the specified `Number` object.\n\n## Description\n\nThis method is usually called internally by JavaScript and not explicitly in web code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Object/Object.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object()\n\nThe **`Object` constructor** turns the input into an object. Its behavior depends on the input's type.\n\n- If the value is [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../globals/undefined.mdx), it creates and returns an empty object.\n- Otherwise, it returns an object of a Type that corresponds to the given value.\n- If the value is an object already, it returns the value.\n\n## Syntax\n\n```js\nnew Object(value)\nObject(value)\n```\n\n> **Note:** `Object()` can be called with or without `new`. Both create a new object.\n\n### Parameters\n\n- `value`\n  - : Any value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Object/assign.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.assign()\n\nThe **`Object.assign()`** method\ncopies all [enumerable](../../globals/Object/prototype/propertyIsEnumerable.mdx)\n[own properties](../../globals/Object/hasOwn.mdx) from one or more\n_source objects_ to a _target object_. It returns the modified target\nobject.\n\n## Syntax\n\n```js\nObject.assign(target, ...sources)\n```\n\n### Parameters\n\n- `target`\n  - : The target object — what to apply the sources' properties to, which is returned\n    after it is modified.\n- `sources`\n  - : The source object(s) — objects containing the properties you want to apply.\n\n### Return value\n\nThe target object.\n\n## Description\n\nProperties in the target object are overwritten by properties in the sources if they\nhave the same \"key\". Later sources' properties overwrite earlier ones.\n\nThe `Object.assign()` method only copies _enumerable_ and\n_own_ properties from a source object to a target object. It uses\n`[[Get]]` on the source and `[[Set]]` on the target, so it will\ninvoke [getters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/get) and [setters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/set). Therefore it\n_assigns_ properties, versus copying or defining new properties. This may make it\nunsuitable for merging new properties into a prototype if the merge sources contain\ngetters.\n\nFor copying property definitions (including their enumerability) into prototypes, use\n[`Object.getOwnPropertyDescriptor()`](../../globals/Object/getOwnPropertyDescriptor.mdx) and\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx) instead.\n\nBoth `String` and `Symbol` properties are copied.\n\nIn case of an error, for example if a property is non-writable, a\n[`TypeError`](../../globals/TypeError/TypeError.mdx) is raised, and the `target` object is\nchanged if any properties are added before the error is raised.\n\n> **Note:** `Object.assign()` does not throw on\n> [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../globals/undefined.mdx) sources.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Object/create.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.create()\n\nThe **`Object.create()`** method creates a new object, using an existing object as the prototype of the newly created object.\n\n## Syntax\n\n```js\nObject.create(proto)\nObject.create(proto, propertiesObject)\n```\n\n### Parameters\n\n- `proto`\n  - : The object which should be the prototype of the newly-created object.\n- `propertiesObject` _**optional**_\n  - : If specified and not [`undefined`](../../globals/undefined.mdx), an object whose [enumerable own properties](https://developer.mozilla.org/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) specify property descriptors to be added to the newly-created object, with the corresponding property names. These properties correspond to the second argument of [`Object.defineProperties()`](../../globals/Object/defineProperties.mdx).\n\n### Return value\n\nA new object with the specified prototype object and properties.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if `proto` is neither [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) nor an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Object/defineProperties.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.defineProperties()\n\nThe **`Object.defineProperties()`** method defines new or\nmodifies existing properties directly on an object, returning the object.\n\n## Syntax\n\n```js\nObject.defineProperties(obj, props)\n```\n\n### Parameters\n\n- `obj`\n  - : The object on which to define or modify properties.\n- `props`\n\n  - : An object whose keys represent the names of properties to be defined or modified and\n    whose values are objects describing those properties. Each value in `props`\n    must be either a data descriptor or an accessor descriptor; it cannot be both (see\n    [`Object.defineProperty()`](../../globals/Object/defineProperty.mdx) for more details).\n\n    Data descriptors and accessor descriptors may optionally contain the following keys:\n\n    - `configurable`\n      - : `true` if and only if the type of this property descriptor may be\n        changed and if the property may be deleted from the corresponding object.\n        **Defaults to `false`.**\n    - `enumerable`\n      - : `true` if and only if this property shows up during enumeration of\n        the properties on the corresponding object.\n        **Defaults to `false`.**\n\n    A data descriptor also has the following optional keys:\n\n    - `value`\n      - : The value associated with the property. Can be any valid JavaScript value\n        (number, object, function, etc.).\n        **Defaults to [`undefined`](../../globals/undefined.mdx).**\n    - `writable`\n      - : `true` if and only if the value associated with the property may be\n        changed with an assignment operator.\n        **Defaults to `false`.**\n\n    An accessor descriptor also has the following optional keys:\n\n    - `get`\n      - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx)\n        if there is no getter. The function's return value will be used as the value of\n        the property.\n        **Defaults to [`undefined`](../../globals/undefined.mdx).**\n    - `set`\n      - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx)\n        if there is no setter. The function will receive as its only argument the new\n        value being assigned to the property.\n        **Defaults to [`undefined`](../../globals/undefined.mdx).**\n\n    If a descriptor has neither of `value`, `writable`,\n    `get` and `set` keys, it is treated as a data descriptor. If a\n    descriptor has both `value` or `writable` and `get`\n    or `set` keys, an exception is thrown.\n\n### Return value\n\nThe object that was passed to the function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Object/defineProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.defineProperty()\n\nThe static method **`Object.defineProperty()`** defines a new\nproperty directly on an object, or modifies an existing property on an object, and\nreturns the object.\n\n## Syntax\n\n```js\nObject.defineProperty(obj, prop, descriptor)\n```\n\n### Parameters\n\n- `obj`\n  - : The object on which to define the property.\n- `prop`\n  - : The name or `Symbol` of the property to be defined or modified.\n- `descriptor`\n  - : The descriptor for the property being defined or modified.\n\n### Return value\n\nThe object that was passed to the function.\n\n## Description\n\nThis method allows a precise addition to or modification of a property on an object.\nNormal property addition through assignment creates properties which show up during\nproperty enumeration (`for...in` loop or\n[`Object.keys`](../../globals/Object/keys.mdx) method), whose values may be changed, and which may be\ndeleted. This method allows these extra details\nto be changed from their defaults. By default, properties added using\n`Object.defineProperty()` are not writable, not enumerable, and not configurable.\n\nProperty descriptors present in objects come in two main flavors: data descriptors and\naccessor descriptors. A **data descriptor** is a property that has a\nvalue, which may or may not be writable. An **accessor descriptor** is a\nproperty described by a getter-setter pair of functions. A descriptor must be one of\nthese two flavors; it cannot be both.\n\nBoth data and accessor descriptors are objects. They share the following optional keys\n(please note: the **defaults** mentioned here are in the case of defining\nproperties using `Object.defineProperty()`):\n\n- `configurable`\n\n  - : when this is set to `false`,\n\n    - the type of this property cannot be changed between data property and accessor property, and\n    - the property may not be deleted, and\n    - other attributes of its descriptor cannot be changed (however, if it's a data descriptor with `writable: true`, the `value` can be changed, and `writable` can be changed to `false`).\n\n    **Defaults to `false`.**\n\n- `enumerable`\n  - : `true` if and only if this property shows up during enumeration of the\n    properties on the corresponding object.\n    **Defaults to `false`.**\n\nA **data descriptor** also has the following optional keys:\n\n- `value`\n  - : The value associated with the property. Can be any valid JavaScript value (number,\n    object, function, etc.).\n    **Defaults to [`undefined`](../../globals/undefined.mdx).**\n- `writable`\n  - : `true` if the value associated with the property may be changed with an\n    assignment operator.\n    **Defaults to `false`.**\n\nAn **accessor descriptor** also has the following optional keys:\n\n- `get`\n  - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no getter. When the property is accessed, this function is called without\n    arguments and with `this` set to the object through which the property is\n    accessed (this may not be the object on which the property is defined due to\n    inheritance). The return value will be used as the value of the property.\n    **Defaults to [`undefined`](../../globals/undefined.mdx).**\n- `set`\n  - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no setter. When the property is assigned, this function is called with one\n    argument (the value being assigned to the property) and with `this` set to\n    the object through which the property is assigned.\n    **Defaults to [`undefined`](../../globals/undefined.mdx).**\n\nIf a descriptor has neither of `value`, `writable`,\n`get` and `set` keys, it is treated as a data descriptor. If a\ndescriptor has both \\[`value` or `writable`] and \\[`get` or `set`] keys, an exception is thrown.\n\nBear in mind that these attributes are not necessarily the descriptor's own properties.\nInherited properties will be considered as well. In order to ensure these defaults are\npreserved, you might freeze existing objects in the descriptor object's prototype chain upfront, specify all\noptions explicitly, or point to [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) with [`Object.create(null)`](../../globals/Object/create.mdx).\n\n```js\nconst obj = {};\n// 1. Using a null prototype: no inherited properties\nconst descriptor = Object.create(null);\ndescriptor.value = 'static';\n\n// not enumerable, not configurable, not writable as defaults\nObject.defineProperty(obj, 'key', descriptor);\n\n// 2. Being explicit by using a throw-away object literal with all attributes present\nObject.defineProperty(obj, 'key2', {\n  enumerable: false,\n  configurable: false,\n  writable: false,\n  value: 'static'\n});\n\n// 3. Recycling same object\nfunction withValue(value) {\n  const d = withValue.d || (\n    withValue.d = {\n      enumerable: false,\n      writable: false,\n      configurable: false,\n      value,\n    }\n  );\n\n  // avoiding duplicate operation for assigning value\n  if (d.value !== value) d.value = value;\n\n  return d;\n}\n// and\nObject.defineProperty(obj, 'key', withValue('static'));\n\n// if freeze is available, prevents adding or\n// removing the object prototype properties\n// (value, get, set, enumerable, writable, configurable)\n(Object.freeze || Object)(Object.prototype);\n```\n\nWhen the property already exists, `Object.defineProperty()` attempts to modify the property according to the values in the descriptor and the property's current configuration.\n\nIf the old descriptor had its `configurable` attribute set to `false`, the property is said to be _non-configurable_. It is not possible to change any attribute of a non-configurable accessor property, and it is not possible to switch between data and accessor property types. For data properties with `writable: true`, it is possible to modify the value and change the `writable` attribute from `true` to `false`. A [`TypeError`](../../globals/TypeError/TypeError.mdx) is thrown when attempts are made to change non-configurable property attributes (except `value` and `writable`, if permitted), except when defining a value same as the original value on a data property.\n\nWhen the current property is configurable, defining an attribute to `undefined` effectively deletes it. For example, if `o.k` is an accessor property, `Object.defineProperty(o, \"k\", { set: undefined })` will remove the setter, making `k` only have a getter and become readonly. If an attribute is absent from the new descriptor, the old descriptor attribute's value is kept (it won't be implicitly re-defined to `undefined`). It is possible to toggle between data and accessor property by giving a descriptor of a different \"flavor\". For example, if the new descriptor is a data descriptor (with `value` or `writable`), the original descriptor's `get` and `set` attributes will both be dropped.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Object/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.entries()\n\nThe **`Object.entries()`** method returns an array of a given object's own enumerable string-keyed property key-value pairs.\n\n## Syntax\n\n```js\nObject.entries(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : An object.\n\n### Return value\n\nAn array of the given object's own enumerable string-keyed property key-value pairs. Each key-value pair is an array with two elements: the first element is the property key (which is always a string), and the second element is the property value.\n\n## Description\n\n`Object.entries()` returns an array whose elements are arrays corresponding to the enumerable string-keyed property key-value pairs found directly upon `object`. This is the same as iterating with a `for...in` loop, except that a `for...in` loop enumerates properties in the prototype chain as well. The order of the array returned by `Object.entries()` is the same as that provided by a `for...in` loop.\n\nIf you only need the property keys, use [`Object.keys()`](../../globals/Object/keys.mdx) instead. If you only need the property values, use [`Object.values()`](../../globals/Object/values.mdx) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Object/freeze.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.freeze()\n\nThe **`Object.freeze()`** method _freezes_ an object. Freezing an object [prevents extensions](../../globals/Object/preventExtensions.mdx) and makes existing properties non-writable and non-configurable. A frozen object can no longer be changed: new properties cannot be added, existing properties cannot be removed, their enumerability, configurability, writability, or value cannot be changed, and the object's prototype cannot be re-assigned. `freeze()` returns the same object that was passed in.\n\nFreezing an object is the highest integrity level that JavaScript provides.\n\n## Syntax\n\n```js\nObject.freeze(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object to freeze.\n\n### Return value\n\nThe object that was passed to the function.\n\n## Description\n\nFreezing an object is equivalent to [preventing extensions](../../globals/Object/preventExtensions.mdx) and then changing all existing [properties' descriptors'](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty#description) `configurable` to `false` — and for data properties, `writable` to `false` as well. Nothing can be added to or removed from the properties set of a frozen object. Any attempt to do so will fail, either silently or by throwing a [`TypeError`](../../globals/TypeError/TypeError.mdx) exception (most commonly, but not exclusively, when in \"strict mode\").\n\nFor data properties of a frozen object, their values cannot be changed since the writable and\nconfigurable attributes are set to false. Accessor properties (getters and setters) work the same — the property value returned by the getter may still change, and the setter can still be called without throwing errors when setting the property. Note that values\nthat are objects can still be modified, unless they are also frozen. As an object, an\narray can be frozen; after doing so, its elements cannot be altered and no elements can\nbe added to or removed from the array.\n\n`freeze()` returns the same object that was passed into the function. It\n_does not_ create a frozen copy.\n\nA `TypedArray` or a [`DataView`](../../globals/DataView/DataView.mdx) with elements will cause a [`TypeError`](../../globals/TypeError/TypeError.mdx),\nas they are views over memory and will definitely cause other possible issues:\n\n```js\nObject.freeze(new Uint8Array(0)) // No elements\n// Uint8Array []\n\nObject.freeze(new Uint8Array(1)) // Has elements\n// TypeError: Cannot freeze array buffer views with elements\n\nObject.freeze(new DataView(new ArrayBuffer(32))) // No elements\n// DataView {}\n\nObject.freeze(new Float64Array(new ArrayBuffer(64), 63, 0)) // No elements\n// Float64Array []\n\nObject.freeze(new Float64Array(new ArrayBuffer(64), 32, 2)) // Has elements\n// TypeError: Cannot freeze array buffer views with elements\n```\n\nNote that as the standard three properties (`buf.byteLength`,\n`buf.byteOffset` and `buf.buffer`) are read-only (as are those of\nan `ArrayBuffer`, there is no reason for\nattempting to freeze these properties.\n\nUnlike [`Object.seal()`](../../globals/Object/seal.mdx), existing properties in objects frozen with `Object.freeze()` are made immutable and data properties cannot be re-assigned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Object/fromEntries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.fromEntries()\n\nThe **`Object.fromEntries()`** method transforms a list of key-value pairs into an object.\n\n## Syntax\n\n```js\nObject.fromEntries(iterable)\n```\n\n### Parameters\n\n- `iterable`\n\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol), such as an `Array` or [Map](../../globals/Map/Map.mdx), containing a list of objects. Each object should have two properties:\n\n    - `0`\n      - : A string or `Symbol` representing the property key.\n    - `1`\n      - : The property value.\n\n    Typically, this object is implemented as a two-element array, with the first element being the property key and the second element being the property value.\n\n### Return value\n\nA new object whose properties are given by the entries of the iterable.\n\n## Description\n\nThe `Object.fromEntries()` method takes a list of key-value pairs and returns a new object whose properties are given by those entries. The `iterable` argument is expected to be an object that implements an `@@iterator` method. The method returns an iterator object that produces two-element array-like objects. The first element is a value that will be used as a property key, and the second element is the value to associate with that property key.\n\n`Object.fromEntries()` performs the reverse of [`Object.entries()`](../../globals/Object/entries.mdx), except that `Object.entries()` only returns string-keyed properties, while `Object.fromEntries()` can also create symbol-keyed properties.\n\n> **Note:** Unlike [`Array.from()`](../../globals/Array/from.mdx), `Object.fromEntries()` does not use the value of `this`, so calling it on another constructor does not create objects of that type.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Object/getOwnPropertyDescriptor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertyDescriptor()\n\nThe **`Object.getOwnPropertyDescriptor()`** method returns an\nobject describing the configuration of a specific property on a given object (that is,\none directly present on an object and not in the object's prototype chain). The object\nreturned is mutable but mutating it has no effect on the original property's\nconfiguration.\n\n## Syntax\n\n```js\nObject.getOwnPropertyDescriptor(obj, prop)\n```\n\n### Parameters\n\n- `obj`\n  - : The object in which to look for the property.\n- `prop`\n  - : The name or `Symbol` of the property whose description is to be\n    retrieved.\n\n### Return value\n\nA property descriptor of the given property if it exists on the object,\n[`undefined`](../../globals/undefined.mdx) otherwise.\n\n## Description\n\nThis method permits examination of the precise description of a property. A\n_property_ in JavaScript consists of either a string-valued name or a\n`Symbol` and a property descriptor. Further information about property\ndescriptor types and their attributes can be found in\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx).\n\nA _property descriptor_ is a record with some of the following attributes:\n\n- `value`\n  - : The value associated with the property (data descriptors only).\n- `writable`\n  - : `true` if and only if the value associated with the property may be\n    changed (data descriptors only).\n- `get`\n  - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no getter (accessor descriptors only).\n- `set`\n  - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no setter (accessor descriptors only).\n- `configurable`\n  - : `true` if and only if the type of this property descriptor may be changed\n    and if the property may be deleted from the corresponding object.\n- `enumerable`\n  - : `true` if and only if this property shows up during enumeration of the\n    properties on the corresponding object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Object/getOwnPropertyDescriptors.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertyDescriptors()\n\nThe **`Object.getOwnPropertyDescriptors()`** method returns all\nown property descriptors of a given object.\n\n## Syntax\n\n```js\nObject.getOwnPropertyDescriptors(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object for which to get all own property descriptors.\n\n### Return value\n\nAn object containing all own property descriptors of an object. Might be an empty\nobject, if there are no properties.\n\n## Description\n\nThis method permits examination of the precise description of all own properties of an\nobject. A _property_ in JavaScript consists of either a string-valued name or a\n`Symbol` and a property descriptor. Further information about property\ndescriptor types and their attributes can be found in\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx).\n\nA _property descriptor_ is a record with some of the following attributes:\n\n- `value`\n  - : The value associated with the property (data descriptors only).\n- `writable`\n  - : `true` if and only if the value associated with the property may be\n    changed (data descriptors only).\n- `get`\n  - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no getter (accessor descriptors only).\n- `set`\n  - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no setter (accessor descriptors only).\n- `configurable`\n  - : `true` if and only if the type of this property descriptor may be changed\n    and if the property may be deleted from the corresponding object.\n- `enumerable`\n  - : `true` if and only if this property shows up during enumeration of the\n    properties on the corresponding object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Object/getOwnPropertyNames.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertyNames()\n\nThe **`Object.getOwnPropertyNames()`** method returns an array of all properties (including non-enumerable properties except for those which use Symbol) found directly in a given object.\n\n## Syntax\n\n```js\nObject.getOwnPropertyNames(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object whose enumerable and non-enumerable properties are to be returned.\n\n### Return value\n\nAn array of strings that corresponds to the properties found directly in the given object.\n\n## Description\n\n`Object.getOwnPropertyNames()` returns an array whose elements are strings corresponding to the enumerable and non-enumerable properties found directly in a given object `obj`. The ordering of the enumerable properties in the array is consistent with the ordering exposed by a `for...in` loop (or by [`Object.keys()`](../../globals/Object/keys.mdx)) over the properties of the object. The non-negative integer keys of the object (both enumerable and non-enumerable) are added in ascending order to the array first, followed by the string keys in the order of insertion.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Object/getOwnPropertySymbols.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertySymbols()\n\nThe **`Object.getOwnPropertySymbols()`** method returns an array of all symbol properties found directly upon a given object.\n\n## Syntax\n\n```js\nObject.getOwnPropertySymbols(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object whose symbol properties are to be returned.\n\n### Return value\n\nAn array of all symbol properties found directly upon the given object.\n\n## Description\n\nSimilar to [`Object.getOwnPropertyNames()`](../../globals/Object/getOwnPropertyNames.mdx), you can get all symbol properties of a given object as an array of symbols. Note that [`Object.getOwnPropertyNames()`](../../globals/Object/getOwnPropertyNames.mdx) itself does not contain the symbol properties of an object and only the string properties.\n\nAs all objects have no own symbol properties initially, `Object.getOwnPropertySymbols()` returns an empty array unless you have set symbol properties on your object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Object/getPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getPrototypeOf()\n\nThe **`Object.getPrototypeOf()`** method returns the prototype\n(i.e. the value of the internal `[[Prototype]]` property) of the specified\nobject.\n\n## Syntax\n\n```js\nObject.getPrototypeOf(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object whose prototype is to be returned.\n\n### Return value\n\nThe prototype of the given object, which may be `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Object/hasOwn.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.hasOwn()\n\nThe **`Object.hasOwn()`** static method returns `true` if the specified object has the indicated property as its _own_ property.\nIf the property is inherited, or does not exist, the method returns `false`.\n\n> **Note:** `Object.hasOwn()` is intended as a replacement for [`Object.prototype.hasOwnProperty()`](../../globals/Object/prototype/hasOwnProperty.mdx).\n\n\n\n## Syntax\n\n```js\nhasOwn(instance, prop)\n```\n\n### Parameters\n\n- `instance`\n  - : The JavaScript object instance to test.\n- `prop`\n  - : The `String` name or [Symbol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol) of the property to test.\n\n### Return value\n\n`true` if the specified object has directly defined the specified property.\nOtherwise `false`\n\n## Description\n\nThe **`Object.hasOwn()`** method returns `true` if the specified property is a\ndirect property of the object — even if the property value is `null` or `undefined`.\nThe method returns `false` if the property is inherited, or has not been declared at all.\nUnlike the `in` operator, this\nmethod does not check for the specified property in the object's prototype chain.\n\nIt is recommended over [`Object.prototype.hasOwnProperty()`](../../globals/Object/prototype/hasOwnProperty.mdx) because\nit works for objects created using `Object.create(null)` and with objects that\nhave overridden the inherited `hasOwnProperty()` method. While it is possible to\nworkaround these problems by calling `Object.prototype.hasOwnProperty()` on an\nexternal object, `Object.hasOwn()` is more intuitive.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Object/is.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.is()\n\nThe **`Object.is()`** method determines whether two values are [the same value](https://developer.mozilla.org/docs/Web/JavaScript/Equality_comparisons_and_sameness#same-value_equality_using_object.is).\n\n## Syntax\n\n```js\nObject.is(value1, value2)\n```\n\n### Parameters\n\n- `value1`\n  - : The first value to compare.\n- `value2`\n  - : The second value to compare.\n\n### Return value\n\nA boolean indicating whether or not the two arguments are the same value.\n\n## Description\n\n`Object.is()` determines whether two values are [the same value](https://developer.mozilla.org/docs/Web/JavaScript/Equality_comparisons_and_sameness#same-value_equality_using_object.is). Two values are the same if one of the following holds:\n\n- both [`undefined`](../../globals/undefined.mdx)\n- both `null`\n- both `true` or both `false`\n- both strings of the same length with the same characters in the same order\n- both the same object (meaning both values reference the same object in memory)\n- both `BigInts` with the same numeric value\n- both `Symbols` that reference the same symbol value\n- both numbers and\n\n  - both `+0`\n  - both `-0`\n  - both [`NaN`](../../globals/NaN.mdx)\n  - or both non-zero, not [`NaN`](../../globals/NaN.mdx), and have the same value\n\n`Object.is()` is not equivalent to the [`==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Equality) operator. The `==` operator applies various coercions to both sides (if they are not the same type) before testing for equality (resulting in such behavior as `\"\" == false` being `true`), but `Object.is()` doesn't coerce either value.\n\n`Object.is()` is also _not_ equivalent to the [`===`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) operator. The only difference between `Object.is()` and `===` is in their treatment of signed zeros and `NaN` values. The `===` operator (and the `==` operator) treats the number values `-0` and `+0` as equal, but treats [`NaN`](../../globals/NaN.mdx) as not equal to each other.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Object/isExtensible.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.isExtensible()\n\nThe **`Object.isExtensible()`** method determines if an object\nis extensible (whether it can have new properties added to it).\n\n## Syntax\n\n```js\nObject.isExtensible(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be checked.\n\n### Return value\n\nA `Boolean` indicating whether or not the given object is extensible.\n\n## Description\n\nObjects are extensible by default: they can have new properties added to them, and their `[[Prototype]]` can be re-assigned. An object can be marked as non-extensible using one of [`Object.preventExtensions()`](../../globals/Object/preventExtensions.mdx), [`Object.seal()`](../../globals/Object/seal.mdx), [`Object.freeze()`](../../globals/Object/freeze.mdx), or [`Reflect.preventExtensions()`](../../globals/Reflect/preventExtensions.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Object/isFrozen.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.isFrozen()\n\nThe **`Object.isFrozen()`** determines if an object is\n[frozen](../../globals/Object/freeze.mdx).\n\n## Syntax\n\n```js\nObject.isFrozen(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be checked.\n\n### Return value\n\nA `Boolean` indicating whether or not the given object is frozen.\n\n## Description\n\nAn object is frozen if and only if it is not [extensible](../../globals/Object/isExtensible.mdx), all its properties are non-configurable, and all its data\nproperties (that is, properties which are not accessor properties with getter or setter\ncomponents) are non-writable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Object/isSealed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.isSealed()\n\nThe **`Object.isSealed()`** method determines if an object is\nsealed.\n\n## Syntax\n\n```js\nObject.isSealed(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be checked.\n\n### Return value\n\nA `Boolean` indicating whether or not the given object is sealed.\n\n## Description\n\nReturns `true` if the object is sealed, otherwise `false`. An\nobject is sealed if it is not [extensible](../../globals/Object/isExtensible.mdx) and\nif all its properties are non-configurable and therefore not removable (but not\nnecessarily non-writable).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Object/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.keys()\n\nThe **`Object.keys()`** method returns an array of a given object's own enumerable string-keyed property names.\n\n## Syntax\n\n```js\nObject.keys(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : An object.\n\n### Return value\n\nAn array of strings representing the given object's own enumerable string-keyed property keys.\n\n## Description\n\n`Object.keys()` returns an array whose elements are strings corresponding to the enumerable string-keyed property names found directly upon `object`. This is the same as iterating with a `for...in` loop, except that a `for...in` loop enumerates properties in the prototype chain as well. The order of the array returned by `Object.keys()` is the same as that provided by a `for...in` loop.\n\nIf you need the property values, use [`Object.values()`](../../globals/Object/values.mdx) instead. If you need both the property keys and values, use [`Object.entries()`](../../globals/Object/entries.mdx) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Object/preventExtensions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.preventExtensions()\n\nThe **`Object.preventExtensions()`** method prevents new\nproperties from ever being added to an object (i.e. prevents future extensions to the\nobject). It also prevents the object's prototype from being re-assigned.\n\n## Syntax\n\n```js\nObject.preventExtensions(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be made non-extensible.\n\n### Return value\n\nThe object being made non-extensible.\n\n## Description\n\nAn object is extensible if new properties can be added to it.\n`Object.preventExtensions()` marks an object as no longer extensible, so that\nit will never have properties beyond the ones it had at the time it was marked as\nnon-extensible. Note that the properties of a non-extensible object, in general, may\nstill be _deleted_. Attempting to add new properties to a non-extensible object\nwill fail, either silently or, in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), throwing a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\nUnlike [`Object.seal()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/seal) and [`Object.freeze()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze), `Object.preventExtensions()` invokes an intrinsic JavaScript behavior and cannot be replaced with a composition of several other operations. It also has its `Reflect` counterpart (which only exists for intrinsic operations), [`Reflect.preventExtensions()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Reflect/preventExtensions).\n\n`Object.preventExtensions()` only prevents addition of own properties. Properties can still be added to the object prototype.\n\nThis method makes the `[[Prototype]]` of the target immutable; any `[[Prototype]]` re-assignment will throw a `TypeError`. This behavior is specific to the internal `[[Prototype]]` property; other properties of the target object will remain mutable.\n\nThere is no way to make an object extensible again once it has been made non-extensible.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Object/prototype/constructor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.constructor\n\nThe **`constructor`** data property of an `Object` instance returns a reference to the constructor function that created the instance object. Note that the value of this property is a reference to _the function itself_, not a string containing the function's name.\n\n> **Note:** This is a property of JavaScript objects. For the `constructor` method in classes, see [its own reference page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/constructor).\n\n## Value\n\nA reference to the constructor function that created the instance object.\n\n> **Note:** This property is created by default on the [`prototype`](../../../globals/Function/prototype/) property of every constructor function and is inherited by all objects created by that constructor.\n\n## Description\n\nAny object (with the exception of [`null` prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) will have a `constructor` property on its `[[Prototype]]`. Objects created with literals will also have a `constructor` property that points to the constructor type for that object — for example, array literals create `Array` objects, and [object literals](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Object_initializer) create plain objects.\n\n```js\nconst o1 = {};\no1.constructor === Object; // true\n\nconst o2 = new Object();\no2.constructor === Object; // true\n\nconst a1 = [];\na1.constructor === Array; // true\n\nconst a2 = new Array();\na2.constructor === Array; // true\n\nconst n = 3;\nn.constructor === Number; // true\n```\n\nNote that `constructor` usually comes from the constructor's [`prototype`](../../../globals/Function/prototype/) property. If you have a longer prototype chain, you can usually expect every object in the chain to have a `constructor` property.\n\n```js\nconst o = new TypeError(); // Inheritance: TypeError -> Error -> Object\nconst proto = Object.getPrototypeOf;\nproto(o).constructor === TypeError; // true\nproto(proto(o)).constructor === Error; // true\nproto(proto(proto(o))).constructor === Object; // true\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Object/prototype/hasOwnProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.hasOwnProperty()\n\nThe **`hasOwnProperty()`** method returns a boolean indicating whether the\nobject has the specified property as its own property (as opposed to inheriting\nit).\n\n> **Note:** [`Object.hasOwn()`](../../../globals/Object/hasOwn.mdx) is recommended over\n> `hasOwnProperty()`, in browsers where it is supported.\n\n## Syntax\n\n```js\nhasOwnProperty(prop)\n```\n\n### Parameters\n\n- `prop`\n  - : The `String` name or `Symbol` of the property to test.\n\n### Return value\n\nReturns `true` if the object has the specified property as own property; `false`\notherwise.\n\n## Description\n\nThe **`hasOwnProperty()`** method returns `true` if the specified property is a\ndirect property of the object — even if the value is `null` or `undefined`. The\nmethod returns `false` if the property is inherited, or has not been declared at\nall. Unlike the `in` operator, this\nmethod does not check for the specified property in the object's prototype\nchain.\n\nThe method can be called on _most_ JavaScript objects, because most objects\ndescend from `Object`, and hence inherit its methods. For\nexample `Array` is an `Object`, so you can\nuse `hasOwnProperty()` method to check whether an index exists:\n\n```js\nconst fruits = ['Apple', 'Banana','Watermelon', 'Orange'];\nfruits.hasOwnProperty(3);   // true ('Orange')\nfruits.hasOwnProperty(4);   // false - not defined\n```\n\nThe method will not be available in objects where it is reimplemented, or on\nobjects created using `Object.create(null)` (as these don't inherit from\n`Object.prototype`). Examples for these cases are given below.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Object/prototype/isPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.isPrototypeOf()\n\nThe **`isPrototypeOf()`** method checks if an object exists in another object's prototype chain.\n\n> **Note:** `isPrototypeOf()` differs from the [`instanceof`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/instanceof) operator. In the expression `object instanceof AFunction`, `object`'s prototype chain is checked against `AFunction.prototype`, not against `AFunction` itself.\n\n## Syntax\n\n```js\nisPrototypeOf(object)\n```\n\n### Parameters\n\n- `object`\n  - : The object whose prototype chain will be searched.\n\n### Return value\n\nA boolean indicating whether the calling object (`this`) lies in the prototype chain of `object`. Directly returns `false` when `object` is not an object (i.e. a primitive).\n\n### Errors thrown\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown if `this` is `null` or `undefined` (because it can't be [converted to an object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#object_coercion)).\n\n## Description\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `isPrototypeOf()` method. This method allows you to check whether or not the object exists within another object's prototype chain. If the `object` passed as the parameter is not an object (i.e. a primitive), the method directly returns `false`. Otherwise, the `this` value is [converted to an object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#object_coercion), and the prototype chain of `object` is searched for the `this` value, until the end of the chain is reached or the `this` value is found.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Object/prototype/propertyIsEnumerable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.propertyIsEnumerable()\n\nThe **`propertyIsEnumerable()`** method returns a boolean indicating whether the specified property is the object's [enumerable own](https://developer.mozilla.org/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) property.\n\n## Syntax\n\n```js\npropertyIsEnumerable(prop)\n```\n\n### Parameters\n\n- `prop`\n  - : The name of the property to test. Can be a string or a `Symbol`.\n\n### Return value\n\nA boolean value indicating whether the specified property is enumerable and is the object's own property.\n\n## Description\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `propertyIsEnumerable()` method. This method determines if the specified property, string or symbol, is an enumerable own property of the object. If the object does not have the specified property, this method returns `false`.\n\nThis method is equivalent to [`Object.getOwnPropertyDescriptor(obj, prop)?.enumerable ?? false`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Object/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string representing the object. This method is meant to be overridden by derived objects for locale-specific purposes.\n\n## Syntax\n\n```js\ntoLocaleString()\n```\n\n### Parameters\n\nNone. However, all objects that override this method are expected to accept at most two parameters, corresponding to `locales` and `options`, such as [`Date.prototype.toLocaleString()`](../../../globals/Date/prototype/toLocaleString.mdx). The parameter positions should not be used for any other purpose.\n\n### Return value\n\nThe return value of calling `this.toString()`.\n\n## Description\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `toLocaleString()` method. `Object`'s `toLocaleString` returns the result of calling [`this.toString()`](../../../globals/Object/prototype/toString.mdx).\n\nThis function is provided to give objects a generic `toLocaleString` method, even though not all may use it. In the core language, these built-in objects override `toLocaleString` to provide locale-specific formatting:\n\n- `Array`: [`Array.prototype.toLocaleString()`](../../../globals/Array/prototype/toLocaleString.mdx)\n- `Number`: [`Number.prototype.toLocaleString()`](../../../globals/Number/prototype/toLocaleString.mdx)\n- `Date`: [`Date.prototype.toLocaleString()`](../../../globals/Date/prototype/toLocaleString.mdx)\n- `BigInt`: [`BigInt.prototype.toLocaleString()`](../../../globals/BigInt/prototype/toLocaleString.mdx)\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Object/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.toString()\n\nThe **`toString()`** method returns a string representing the object. This method is meant to be overridden by derived objects for custom [type conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) logic.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nBy default `toString()` takes no parameters. However, objects that inherit from `Object` may override it with their own implementations that do take parameters. For example, the [`Number.prototype.toString()`](../../../globals/Number/prototype/toString.mdx) and [`BigInt.prototype.toString()`](../../../globals/BigInt/prototype/toString.mdx) methods take an optional `radix` parameter.\n\n### Return value\n\nA string representing the object.\n\n## Description\n\nJavaScript calls the `toString` method to [convert an object to a primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion). You rarely need to invoke the `toString` method yourself; JavaScript automatically invokes it when encountering an object where a primitive value is expected.\n\nThis method is called in priority by [string conversion](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion), but [numeric conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#numeric_coercion) and [primitive conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion) call `valueOf()` in priority. However, because the base [`valueOf()`](../../../globals/Object/prototype/valueOf.mdx) method returns an object, the `toString()` method is usually called in the end, unless the object overrides `valueOf()`. For example, `+[1]` returns `1`, because its [`toString`](../../../globals/Array/prototype/toString.mdx) method returns `\"1\"`, which is then converted to a number.\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `toString()` method. When you create a custom object, you can override `toString()` to call a custom method, so that your custom object can be converted to a string value. Alternatively, you can add a [`Symbol.toPrimitive`](../../../globals/Symbol/toPrimitive.mdx) method, which allows even more control over the conversion process, and will always be preferred over `valueOf` or `toString` for any type conversion.\n\nTo use the base `Object.prototype.toString()` with an object that has it overridden (or to invoke it on `null` or `undefined`), you need to call [`Function.prototype.call()`](../../../globals/Function/prototype/call.mdx) or [`Function.prototype.apply()`](../../../globals/Function/prototype/apply.mdx) on it, passing the object you want to inspect as the first parameter (called `thisArg`).\n\n```js\nconst arr = [1, 2, 3];\n\narr.toString(); // \"1,2,3\"\nObject.prototype.toString.call(arr); // \"[object Array]\"\n```\n\n`Object.prototype.toString()` returns `\"[object Type]\"`, where `Type` is the object type. If the object has a [`Symbol.toStringTag`](../../../globals/Symbol/toStringTag.mdx) property whose value is a string, that value will be used as the `Type`. Many built-in objects, including [`Map`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map) and [`Symbol`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol), have a `Symbol.toStringTag`. Some objects predating ES6 do not have `Symbol.toStringTag`, but have a special tag nonetheless. They include (the tag is the same as the type name given below):\n\n- [`Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\n- [`Function`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions) (anything whose [`typeof`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/typeof) returns `\"function\"`)\n- [`Error`](../../../globals/Error/Error.mdx)\n- [`Boolean`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)\n- [`Number`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)\n- [`String`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\n- [`Date`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date)\n- [`RegExp`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp)\n\nThe [`arguments`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/arguments) object returns `\"[object Arguments]\"`. Everything else, including user-defined classes, unless with a custom `Symbol.toStringTag`, will return `\"[object Object]\"`.\n\n`Object.prototype.toString()` invoked on [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) returns `[object Null]` and `[object Undefined]`, respectively.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Object/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.valueOf()\n\nThe **`valueOf()`** method of `Object` converts the `this` value [to an object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#object_coercion). This method is meant to be overridden by derived objects for custom [type conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) logic.\n\n\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nThe `this` value, converted to an object.\n\n> **Note:** In order for `valueOf` to be useful during type conversion, it must return a primitive. Because all primitive types have their own `valueOf()` methods, calling `aPrimitiveValue.valueOf()` generally does not invoke `Object.prototype.valueOf()`.\n\n## Description\n\nJavaScript calls the `valueOf` method to [convert an object to a primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion). You rarely need to invoke the `valueOf` method yourself; JavaScript automatically invokes it when encountering an object where a primitive value is expected.\n\nThis method is called in priority by [numeric conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#numeric_coercion) and [primitive conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion), but [string conversion](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) calls `toString()` in priority, and `toString()` is very likely to return a string value (even for the [`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx) base implementation), so `valueOf()` is usually not called in this case.\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `toString()` method. The `Object.prototype.valueOf()` base implementation is deliberately useless: by returning an object, its return value will never be used by any [primitive conversion algorithm](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion). Many built-in objects override this method to return an appropriate primitive value. When you create a custom object, you can override `valueOf()` to call a custom method, so that your custom object can be converted to a primitive value. Generally, `valueOf()` is used to return a value that is most meaningful for the object — unlike `toString()`, it does not need to be a string. Alternatively, you can add a [`Symbol.toPrimitive`](../../../globals/Symbol/toPrimitive.mdx) method, which allows even more control over the conversion process, and will always be preferred over `valueOf` or `toString` for any type conversion.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Object/seal.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.seal()\n\nThe **`Object.seal()`** method _seals_ an object. Sealing an object [prevents extensions](../../globals/Object/preventExtensions.mdx) and makes existing properties non-configurable. A sealed object has a fixed set of properties: new properties cannot be added, existing properties cannot be removed, their enumerability and configurability cannot be changed, and its prototype cannot be re-assigned. Values of existing properties can still be changed as long as they are writable. `seal()` returns the same object that was passed in.\n\n## Syntax\n\n```js\nObject.seal(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be sealed.\n\n### Return value\n\nThe object being sealed.\n\n## Description\n\nSealing an object is equivalent to [preventing extensions](../../globals/Object/preventExtensions.mdx) and then changing all existing properties' descriptors to `configurable: false`. This has the effect of making the set of properties on the object fixed. Making all properties non-configurable\nalso prevents them from being converted from data properties to accessor properties and\nvice versa, but it does not prevent the values of data properties from being changed.\nAttempting to delete or add properties to a sealed object, or to convert a data property\nto accessor or vice versa, will fail, either silently or by throwing a\n[`TypeError`](../../globals/TypeError/TypeError.mdx) (most commonly, although not exclusively, when in \"strict mode\" code).\n\nThe prototype chain remains untouched. However, due to the effect of [preventing extensions](../../globals/Object/preventExtensions.mdx), the `[[Prototype]]` cannot be reassigned.\n\nUnlike [`Object.freeze()`](../../globals/Object/freeze.mdx), objects sealed with `Object.seal()` may have their existing\nproperties changed, as long as they are writable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Object/setPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.setPrototypeOf()\n\nThe **`Object.setPrototypeOf()`** method sets the prototype (i.e., the internal `[[Prototype]]` property) of a specified object to another object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null).\n\n> **Warning:** Changing the `[[Prototype]]` of an object is, by the nature of how modern JavaScript engines optimize property accesses, currently a very slow operation in every browser and JavaScript engine. In addition, the effects of altering inheritance are subtle and far-flung, and are not limited to the time spent in the `Object.setPrototypeOf(...)` statement, but may extend to **_any_** code that has access to any object whose `[[Prototype]]` has been altered. You can read more in [JavaScript engine fundamentals: optimizing prototypes](https://mathiasbynens.be/notes/prototypes).\n>\n> Because this feature is a part of the language, it is still the burden on engine developers to implement that feature performantly (ideally). Until engine developers address this issue, if you are concerned about performance, you should avoid setting the `[[Prototype]]` of an object. Instead, create a new object with the desired `[[Prototype]]` using [`Object.create()`](../../globals/Object/create.mdx).\n\n## Syntax\n\n```js\nObject.setPrototypeOf(obj, prototype)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which is to have its prototype set.\n- `prototype`\n  - : The object's new prototype (an object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null)).\n\n### Return value\n\nThe specified object.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if one of the following conditions is met:\n    - The `obj` parameter is [non-extensible](../../globals/Object/isExtensible.mdx), or it's an [immutable prototype exotic object](https://tc39.es/ecma262/#sec-immutable-prototype-exotic-objects), such as `Object.prototype`.\n    - The `prototype` parameter is not an object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null).\n\n## Description\n\n`Object.setPrototypeOf()` is generally considered the proper way to set the prototype of an object.\n\nIf the `obj` parameter is not an object (e.g. number, string, etc.), this method does nothing.\n\nFor security concerns, there are certain built-in objects that are designed to have an _immutable prototype_. This prevents prototype pollution attacks, especially [proxy-related ones](https://github.com/tc39/ecma262/issues/272). The core language only specifies `Object.prototype` as an immutable prototype exotic object, whose prototype is always `null`.\n\n```js\nObject.isExtensible(Object.prototype); // true; you can add more properties\nObject.setPrototypeOf(Object.prototype, {}); // TypeError: Immutable prototype object '#<Object>' cannot have their prototype set\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Object/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.values()\n\nThe **`Object.values()`** method returns an array of a given object's own enumerable string-keyed property values.\n\n## Syntax\n\n```js\nObject.values(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : An object.\n\n### Return value\n\nAn array containing the given object's own enumerable string-keyed property values.\n\n## Description\n\n`Object.values()` returns an array whose elements are strings corresponding to the enumerable string-keyed property values found directly upon `object`. This is the same as iterating with a `for...in` loop, except that a `for...in` loop enumerates properties in the prototype chain as well. The order of the array returned by `Object.values()` is the same as that provided by a `for...in` loop.\n\nIf you need the property keys, use [`Object.keys()`](../../globals/Object/keys.mdx) instead. If you need both the property keys and values, use [`Object.entries()`](../../globals/Object/entries.mdx) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Promise/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get Promise[Symbol.species]\n\nThe **`Promise[Symbol.species]`** accessor property returns the constructor used to construct return values from promise methods.\n\n> **Warning:** The existence of `Symbol.species` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Syntax\n\n```js\nPromise[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct return values from promise chaining methods that create new promises.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `Promise` objects. Subclass constructors may override it to change the constructor assignment. The default implementation is basically:\n\n```js\n// Hypothetical underlying implementation for illustration\nclass Promise {\n  static get [Symbol.species]() {\n    return this;\n  }\n}\n```\n\nBecause of this polymorphic implementation, `Symbol.species` of derived subclasses would also return the constructor itself by default.\n\n```js\nclass SubPromise extends Promise {}\nSubPromise[Symbol.species] === Promise; // true\n```\n\nPromise chaining methods — [`then()`](../../globals/Promise/prototype/then.mdx), [`finally()`](../../globals/Promise/prototype/finally.mdx) — return new promise objects. They get the constructor to construct the new promise through `this.constructor[Symbol.species]`. If `this.constructor` is `undefined`, or if `this.constructor[Symbol.species]` is `undefined` or `null`, the default [`Promise()`](../../globals/Promise/Promise.mdx) constructor is used. Otherwise, the constructor returned by `this.constructor[Symbol.species]` is used to construct the new promise object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Promise/Promise.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise()\n\nThe **`Promise()`** constructor is primarily used to wrap functions that do not already support promises.\n\n## Syntax\n\n```js\nnew Promise(executor)\n```\n\n> **Note:** `Promise()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `executor`\n  - : A `function` to be executed by the constructor. It receives two functions as parameters: `resolveFunc` and `rejectFunc`. Any errors thrown in the `executor` will cause the promise to be rejected, and the return value will be neglected. The semantics of `executor` are detailed below.\n\n### Return value\n\nWhen called via `new`, the `Promise` constructor returns a promise object. The promise object will become _resolved_ when either of the functions `resolveFunc` or `rejectFunc` are invoked. Note that if you call `resolveFunc` or `rejectFunc` and pass another `Promise` object as an argument, it can be said to be \"resolved\", but still not \"settled\". See the [Promise description](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#description) for more explanation.\n\n## Description\n\nTraditionally (before promises), asynchronous tasks were designed as callbacks.\n\n```js\nreadFile(\"./data.txt\", (error, result) => {\n  // This callback will be called when the task is done, with the\n  // final `error` or `result`. Any operation dependent on the\n  // result must be defined within this callback.\n});\n// Code here is immediately executed after the `readFile` request\n// is fired. It does not wait for the callback to be called, hence\n// making `readFile` \"asynchronous\".\n```\n\nTo take advantage of the readability improvement and language features offered by promises, the `Promise()` constructor allows one to transform the callback-based API to a promise-based one.\n\n> **Note:** If your task is already promise-based, you likely do not need the `Promise()` constructor.\n\nThe `executor` is custom code that ties an outcome in a callback to a promise. You, the programmer, write the `executor`. Its signature is expected to be:\n\n```js\nfunction executor(resolveFunc, rejectFunc) {\n  // Typically, some asynchronous operation that accepts a callback,\n  // like the `readFile` function above\n}\n```\n\n`resolveFunc` and `rejectFunc` are also functions, and you can give them whatever actual names you want. Their signatures are simple: they accept a single parameter of any type.\n\n```js\nresolveFunc(value); // call on resolved\nrejectFunc(reason); // call on rejected\n```\n\nThe `value` parameter passed to `resolveFunc` can be another promise object, in which case the newly constructed promise's state will be \"locked in\" to the promise passed (as part of the [resolution](#resolver-function) promise). The `rejectFunc` has semantics close to the [`throw`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/throw) statement, so `reason` is typically an [`Error`](../../globals/Error/Error.mdx) instance. If either `value` or `reason` is omitted, the promise is fulfilled/rejected with `undefined`.\n\nThe `executor`'s completion state has limited effect on the promise's state:\n\n- The `executor` return value is ignored. `return` statements within the `executor` merely impact control flow and alter whether a part of the function is executed, but do not have any impact on the promise's fulfillment value. If `executor` exits and it's impossible for `resolveFunc` or `rejectFunc` to be called in the future (for example, there are no async tasks scheduled), then the promise remains pending forever.\n- If an error is thrown in the `executor`, the promise is rejected, unless `resolveFunc` or `rejectFunc` has already been called.\n\n> **Note:** The existence of pending promises does not prevent the program from exiting. If the event loop is empty, the program exits despite any pending promises (because those are necessarily forever-pending).\n\nHere's a summary of the typical flow:\n\n1. At the time when the constructor generates the new `Promise` object, it also generates a corresponding pair of functions for `resolveFunc` and `rejectFunc`; these are \"tethered\" to the `Promise` object.\n2. `executor` typically wraps some asynchronous operation which provides a callback-based API. The callback (the one passed to the original callback-based API) is defined within the `executor` code, so it has access to the `resolveFunc` and `rejectFunc`.\n3. The `executor` is called synchronously (as soon as the `Promise` is constructed) with the `resolveFunc` and `rejectFunc` functions as arguments.\n4. The code within the `executor` has the opportunity to perform some operation. The eventual completion of the asynchronous task is communicated with the promise instance via the side effect caused by `resolveFunc` or `rejectFunc`. The side effect is that the `Promise` object becomes \"resolved\".\n   - If `resolveFunc` is called first, the value passed will be [resolved](#resolver-function). The promise may stay pending (in case another [thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) is passed), become fulfilled (in most cases where a non-thenable value is passed), or become rejected (in case of an invalid resolution value).\n   - If `rejectFunc` is called first, the promise instantly becomes rejected.\n   - Once one of the resolving functions (`resolveFunc` or `rejectFunc`) is called, the promise stays resolved. Only the first call to `resolveFunc` or `rejectFunc` affects the promise's eventual state, and subsequent calls to either function can neither change the fulfillment value/rejection reason nor toggle its eventual state from \"fulfilled\" to \"rejected\" or opposite.\n   - If `executor` exits by throwing an error, then the promise is rejected. However, the error is ignored if one of the resolving functions has already been called (so that the promise is already resolved).\n   - Resolving the promise does not necessarily cause the promise to become fulfilled or rejected (i.e. settled). The promise may still be pending because it's resolved with another thenable, but its eventual state will match that of the resolved thenable.\n5. Once the promise settles, it (asynchronously) invokes any further handlers associated through [`Promise.prototype.then`](../../globals/Promise/prototype/then.mdx), [`Promise.prototype.catch`](../../globals/Promise/prototype/catch.mdx), or [`Promise.prototype.finally`](../../globals/Promise/prototype/finally.mdx). The eventual fulfillment value or rejection reason is passed to the invocation of fulfillment and rejection handlers as an input parameter (see [Chained Promises](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#chained_promises)).\n\nFor example, the callback-based `readFile` API above can be transformed into a promise-based one.\n\n```js\nconst readFilePromise = (path) =>\n  new Promise((resolve, reject) => {\n    readFile(path, (error, result) => {\n      if (error) {\n        reject(error);\n      } else {\n        resolve(result);\n      }\n    });\n  });\n\nreadFilePromise(\"./data.txt\")\n  .then((result) => console.log(result))\n  .catch((error) => console.error(\"Failed to read data\"));\n```\n\n### Resolver function\n\nThe resolver function `resolveFunc` has the following behaviors:\n\n- If it's called with the same value as the newly created promise (the promise it's \"tethered to\"), the promise is rejected with a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n- If it's called with a non-[thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) value (a primitive, or an object whose `then` property is not callable, including when the property is not present), the promise is immediately fulfilled with that value.\n- If it's called with a thenable value (including another `Promise` instance), then the thenable's `then` method is saved and called in the future (it's always called asynchronously). The `then` method will be called with two callbacks, which are two new functions with the exact same behaviors as the `resolveFunc` and `rejectFunc` passed to the `executor` function. If calling the `then` method throws, then the current promise is rejected with the thrown error.\n\nIn the last case, it means code like:\n\n```js\nnew Promise((resolve, reject) => {\n  resolve(thenable);\n});\n```\n\nIs roughly equivalent to:\n\n```js\nnew Promise((resolve, reject) => {\n  try {\n    thenable.then(\n      (value) => resolve(value),\n      (reason) => reject(reason),\n    );\n  } catch (e) {\n    reject(e);\n  }\n});\n```\n\nExcept that in the `resolve(thenable)` case:\n\n1. `resolve` is called synchronously, so that calling `resolve` or `reject` again has no effect, even when the handlers attached through `anotherPromise.then()` are not called yet.\n2. The `then` method is called asynchronously, so that the promise will never be instantly resolved if a thenable is passed.\n\nBecause `resolve` is called again with whatever `thenable.then()` passes to it as `value`, the resolver function is able to flatten nested thenables, where a thenable calls its `onFulfilled` handler with another thenable. The effect is that the fulfillment handler of a real promise will never receive a thenable as its fulfillment value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Promise/all.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.all()\n\nThe **`Promise.all()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise fulfills when all of the input's promises fulfill (including when an empty iterable is passed), with an array of the fulfillment values. It rejects when any of the input's promises rejects, with this first rejection reason.\n\n## Syntax\n\n```js\nPromise.all(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array` of promises.\n\n### Return value\n\nA `Promise` that is:\n\n- **Already fulfilled**, if the `iterable` passed is empty.\n- **Asynchronously fulfilled**, when all the promises in the given `iterable` fulfill. The fulfillment value is an array of fulfillment values, in the order of the promises passed, regardless of completion order. If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) fulfilled.\n- **Asynchronously rejected**, when any of the promises in the given `iterable` rejects. The rejection reason is the rejection reason of the first promise that was rejected.\n\n## Description\n\nThe `Promise.all()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. It can be useful for aggregating the results of multiple promises. It is typically used when there are multiple related asynchronous tasks that the overall code relies on to work successfully — all of whom we want to fulfill before the code execution continues.\n\n`Promise.all()` will reject immediately upon **any** of the input promises rejecting. In comparison, the promise returned by [`Promise.allSettled()`](../../globals/Promise/allSettled.mdx) will wait for all input promises to complete, regardless of whether or not one rejects. Use `allSettled()` if you need the final result of every promise in the input iterable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Promise/allSettled.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.allSettled()\n\nThe **`Promise.allSettled()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise fulfills when all of the input's promises settle (including when an empty iterable is passed), with an array of objects that describe the outcome of each promise.\n\n## Syntax\n\n```js\nPromise.allSettled(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array` of promises.\n\n### Return value\n\nA `Promise` that is:\n\n- **Already fulfilled**, if the `iterable` passed is empty.\n- **Asynchronously fulfilled**, when all promise in the given `iterable` have settled (either fulfilled or rejected). The fulfillment value is an array of objects, each describing the outcome of one promise in the `iterable`, in the order of the promises passed, regardless of completion order. Each outcome object has the following properties:\n\n  - `status`\n    - : A string, either `\"fulfilled\"` or `\"rejected\"`, indicating the eventual state of the promise.\n  - `value`\n    - : Only present if `status` is `\"fulfilled\"`. The value that the promise was fulfilled with.\n  - `reason`\n    - : Only present if `status` is `\"rejected\"`. The reason that the promise was rejected with.\n\n  If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) fulfilled.\n\n## Description\n\nThe `Promise.allSettled()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. `Promise.allSettled()` is typically used when you have multiple asynchronous tasks that are not dependent on one another to complete successfully, or you'd always like to know the result of each promise.\n\nIn comparison, the Promise returned by [`Promise.all()`](../../globals/Promise/all.mdx) may be more appropriate if the tasks are dependent on each other, or if you'd like to immediately reject upon any of them rejecting.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Promise/any.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.any()\n\nThe **`Promise.any()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise fulfills when any of the input's promises fulfills, with this first fulfillment value. It rejects when all of the input's promises reject (including when an empty iterable is passed), with an `AggregateError` containing an array of rejection reasons.\n\n## Syntax\n\n```js\nPromise.any(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array` of promises.\n\n### Return value\n\nA `Promise` that is:\n\n- **Already rejected**, if the `iterable` passed is empty.\n- **Asynchronously fulfilled**, when any of the promises in the given `iterable` fulfills. The fulfillment value is the fulfillment value of the first promise that was fulfilled.\n- **Asynchronously rejected**, when all of the promises in the given `iterable` reject. The rejection reason is an `AggregateError` containing an array of rejection reasons in its `errors` property. The errors are in the order of the promises passed, regardless of completion order. If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) rejected.\n\n## Description\n\nThe `Promise.any()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. This method is useful for returning the first promise that fulfills. It short-circuits after a promise fulfills, so it does not wait for the other promises to complete once it finds one.\n\nUnlike [`Promise.all()`](../../globals/Promise/all.mdx), which returns an _array_ of fulfillment values, we only get one fulfillment value (assuming at least one promise fulfills). This can be beneficial if we need only one promise to fulfill but we do not care which one does. Note another difference: this method rejects upon receiving an _empty iterable_, since, truthfully, the iterable contains no items that fulfill. You may compare `Promise.any()` and `Promise.all()` with [`Array.prototype.some()`](../../globals/Array/prototype/some.mdx) and [`Array.prototype.every()`](../../globals/Array/prototype/every.mdx).\n\nAlso, unlike [`Promise.race()`](../../globals/Promise/race.mdx), which returns the first _settled_ value (either fulfillment or rejection), this method returns the first _fulfilled_ value. This method ignores all rejected promises up until the first promise that fulfills.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Promise/prototype/catch.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.prototype.catch()\n\nThe **`catch()`** method of a `Promise` object schedules a function to be called when the promise is rejected. It immediately returns an equivalent `Promise` object, allowing you to [chain](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining) calls to other promise methods. It is a shortcut for [`Promise.prototype.then(undefined, onRejected)`](../../../globals/Promise/prototype/then.mdx).\n\n## Syntax\n\n```js\ncatch(onRejected)\n\ncatch((reason) => {\n  // rejection handler\n})\n```\n\n### Parameters\n\n- `onRejected`\n  - : A `Function` called when the `Promise` is rejected. This function has one parameter: the _rejection reason_.\n\n### Return value\n\nReturns a new `Promise`. This new promise is always pending when returned, regardless of the current promise's status. It's eventually rejected if `onRejected` throws an error or returns a Promise which is itself rejected; otherwise, it's eventually fulfilled.\n\n## Description\n\nThe `catch` method is used for error handling in promise composition. Since it returns a `Promise`, it [can be chained](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining_after_a_catch) in the same way as its sister method, [`Promise.prototype.then()`](../../../globals/Promise/prototype/then.mdx).\n\nIf a promise becomes rejected, and there are no rejection handlers to call (a handler can be attached through any of [`Promise.prototype.then`](../../../globals/Promise/prototype/then.mdx), [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx), or [`Promise.prototype.finally`](../../../globals/Promise/prototype/finally.mdx)), then the rejection event is surfaced by the host. In the browser, this results in an [`unhandledrejection`](https://developer.mozilla.org/docs/Web/API/Window/unhandledrejection_event) event. If a handler is attached to a rejected promise whose rejection has already caused an unhandled rejection event, then another [`rejectionhandled`](https://developer.mozilla.org/docs/Web/API/Window/rejectionhandled_event) event is fired.\n\n`catch()` internally calls `then()` on the object upon which it was called, passing `undefined` and `onRejected` as arguments. The value of that call is directly returned. This is observable if you wrap the methods.\n\n```js\n// overriding original Promise.prototype.then/catch just to add some logs\n((Promise) => {\n  const originalThen = Promise.prototype.then;\n  const originalCatch = Promise.prototype.catch;\n\n  Promise.prototype.then = function (...args) {\n    console.log(\"Called .then on %o with arguments: %o\", this, args);\n    return originalThen.apply(this, args);\n  };\n  Promise.prototype.catch = function (...args) {\n    console.error(\"Called .catch on %o with arguments: %o\", this, args);\n    return originalCatch.apply(this, args);\n  };\n})(Promise);\n\n// calling catch on an already resolved promise\nPromise.resolve().catch(function XXX() {});\n\n// Logs:\n// Called .catch on Promise{} with arguments: Arguments{1} [0: function XXX()]\n// Called .then on Promise{} with arguments: Arguments{2} [0: undefined, 1: function XXX()]\n```\n\nThis means that passing `undefined` still causes the returned promise to be rejected, and you have to pass a function to prevent the final promise from being rejected.\n\nBecause `catch()` just calls `then()`, it supports subclassing.\n\n> **Note:** The examples below are throwing instances of [`Error`](../../../globals/Error/Error.mdx). As with synchronous [`throw`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/throw) statements, this is considered a good practice; otherwise, the part doing the catching would have to perform checks to see if the argument was a string or an error, and you might lose valuable information such as stack traces.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Promise/prototype/finally.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.prototype.finally()\n\nThe **`finally()`** method of a `Promise` object schedules a function to be called when the promise is settled (either fulfilled or rejected). It immediately returns an equivalent `Promise` object, allowing you to [chain](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining) calls to other promise methods.\n\nThis lets you avoid duplicating code in both the promise's [`Promise.prototype.then`](../../../globals/Promise/prototype/then.mdx) and [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx) handlers.\n\n## Syntax\n\n```js\nfinally(onFinally)\n\nfinally(() => {\n  // Code that will run after promise is settled (fulfilled or rejected)\n})\n```\n\n### Parameters\n\n- `onFinally`\n  - : A `Function` called when the `Promise` is settled. This handler receives no parameters.\n\n### Return value\n\nReturns an equivalent `Promise`. If the handler throws an error or returns a rejected promise, the promise returned by `finally()` will be rejected with that value instead. Otherwise, the return value of the handler does not affect the state of the original promise.\n\n## Description\n\nThe `finally()` method can be useful if you want to do some processing or cleanup once the promise is settled, regardless of its outcome.\n\nThe `finally()` method is very similar to calling [`then(onFinally, onFinally)`](../../../globals/Promise/prototype/then.mdx). However, there are a couple of differences:\n\n- When creating a function inline, you can pass it once, instead of being forced to either declare it twice, or create a variable for it.\n- The `onFinally` callback does not receive any argument. This use case is for precisely when you _do not care_ about the rejection reason or the fulfillment value, and so there's no need to provide it.\n- A `finally()` call is usually transparent and does not change the eventual state of the original promise. So for example:\n  - Unlike `Promise.resolve(2).then(() => 77, () => {})`, which returns a promise eventually fulfilled with the value `77`, `Promise.resolve(2).finally(() => 77)` returns a promise eventually fulfilled with the value `2`.\n  - Similarly, unlike `Promise.reject(3).then(() => {}, () => 88)`, which returns a promise eventually fulfilled with the value `88`, `Promise.reject(3).finally(() => 88)` returns a promise eventually rejected with the reason `3`.\n\n> **Note:** A `throw` (or returning a rejected promise) in the `finally` callback still rejects the returned promise. For example, both `Promise.reject(3).finally(() => { throw 99; })` and `Promise.reject(3).finally(() => Promise.reject(99))` reject the returned promise with the reason `99`.\n\nLike [`Promise.prototype.catch()`](../../../globals/Promise/prototype/catch.mdx), `finally()` internally calls the `then` method on the object upon which it was called. If `onFinally` is not a function, `then()` is called with `onFinally` as both arguments — which, for [`Promise.prototype.then()`](../../../globals/Promise/prototype/then.mdx), means that no useful handler is attached. Otherwise, `then()` is called with two internally created functions, which behave like the following:\n\n> **Warning:** This is only for demonstration purposes and is not a polyfill.\n\n```js\npromise.then(\n  (value) => Promise.resolve(onFinally()).then(() => value),\n  (reason) =>\n    Promise.resolve(onFinally()).then(() => {\n      throw reason;\n    }),\n);\n```\n\nBecause `finally()` calls `then()`, it supports subclassing. Moreover, notice the [`Promise.resolve()`](../../../globals/Promise/resolve.mdx) call above — in reality, `onFinally()`'s return value is resolved using the same algorithm as `Promise.resolve()`, but the actual constructor used to construct the resolved promise will be the subclass. `finally()` gets this constructor through [`promise.constructor[Symbol.species]`](../../../globals/Promise/@@species.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Promise/prototype/then.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.prototype.then()\n\nThe **`then()`** method of a `Promise` object takes up to two arguments: callback functions for the fulfilled and rejected cases of the `Promise`. It immediately returns an equivalent `Promise` object, allowing you to [chain](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining) calls to other promise methods.\n\n## Syntax\n\n```js\nthen(onFulfilled)\nthen(onFulfilled, onRejected)\n\nthen(\n  (value) => { /* fulfillment handler */ },\n  (reason) => { /* rejection handler */ },\n)\n```\n\n### Parameters\n\n- `onFulfilled` _**optional**_\n  - : A `Function` asynchronously called if the `Promise` is fulfilled. This function has one parameter, the _fulfillment value_. If it is not a function, it is internally replaced with an _identity_ function (`(x) => x`) which simply passes the fulfillment value forward.\n- `onRejected` _**optional**_\n  - : A `Function` asynchronously called if the `Promise` is rejected. This function has one parameter, the _rejection reason_. If it is not a function, it is internally replaced with a _thrower_ function (`(x) => { throw x; }`) which throws the rejection reason it received.\n\n### Return value\n\nReturns a new `Promise` immediately. This new promise is always pending when returned, regardless of the current promise's status.\n\nOne of the `onFulfilled` and `onRejected` handlers will be executed to handle the current promise's fulfillment or rejection. The call always happens asynchronously, even when the current promise is already settled. The behavior of the returned promise (call it `p`) depends on the handler's execution result, following a specific set of rules. If the handler function:\n\n- returns a value: `p` gets fulfilled with the returned value as its value.\n- doesn't return anything: `p` gets fulfilled with `undefined`.\n- throws an error: `p` gets rejected with the thrown error as its value.\n- returns an already fulfilled promise: `p` gets fulfilled with that promise's value as its value.\n- returns an already rejected promise: `p` gets rejected with that promise's value as its value.\n- returns another pending promise: the fulfillment/rejection of the promise returned by `then` will be subsequent to the resolution/rejection of the promise returned by the handler. Also, the resolved value of the promise returned by `then` will be the same as the resolved value of the promise returned by the handler.\n\n## Description\n\nThe `then()` method schedules callback functions for the eventual completion of a Promise — either fulfillment or rejection. It is the primitive method of promises: the [thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) protocol expects all promise-like objects to expose a `then()` method, and the [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx) and [`Promise.prototype.finally`](../../../globals/Promise/prototype/finally.mdx) methods both work by invoking the object's `then()` method.\n\nFor more information about the `onRejected` handler, see the [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx) reference.\n\n`then()` returns a new promise object. If you call the `then()` method twice on the same promise object (instead of chaining), then this promise object will have two pairs of settlement handlers. All handlers attached to the same promise object are always called in the order they were added. Moreover, the two promises returned by each call of `then()` start separate chains and do not wait for each other's settlement.\n\n[Thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) objects that arise along the `then()` chain are always [resolved](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise/Promise#the_resolver_function) — the `onFulfilled` handler never receives a thenable object, and any thenable returned by either handler are always resolved before being passed to the next handler. This is because when constructing the new promise, the `resolve` and `reject` functions passed by the `executor` are saved, and when the current promise settles, the respective function will be called with the fulfillment value or rejection reason. The resolving logic comes from the resolver function passed by the [`Promise()`](../../../globals/Promise/Promise.mdx) constructor.\n\n`then()` supports subclassing, which means it can be called on instances of subclasses of `Promise`, and the result will be a promise of the subclass type. You can customize the type of the return value through the [`[Symbol.species]`](../../../globals/Promise/@@species.mdx) property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Promise/race.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.race()\n\nThe **`Promise.race()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise settles with the eventual state of the first promise that settles.\n\n## Syntax\n\n```js\nPromise.race(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array`) of promises.\n\n### Return value\n\nA `Promise` that **asynchronously settles** with the eventual state of the first promise in the `iterable` to settle. In other words, it fulfills if the first promise to settle is fulfilled, and rejects if the first promise to settle is rejected. The returned promise remains pending forever if the `iterable` passed is empty. If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) settled.\n\n## Description\n\nThe `Promise.race()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. It's useful when you want the first async task to complete, but do not care about its eventual state (i.e. it can either succeed or fail).\n\nIf the iterable contains one or more non-promise values and/or an already settled promise, then `Promise.race()` will settle to the first of these values found in the iterable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Promise/reject.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.reject()\n\nThe **`Promise.reject()`** method returns a `Promise` object that is rejected with a given reason.\n\n## Syntax\n\n```js\nPromise.reject(reason)\n```\n\n### Parameters\n\n- `reason`\n  - : Reason why this `Promise` rejected.\n\n### Return value\n\nA `Promise` that is rejected with the given reason.\n\n## Description\n\nThe static `Promise.reject` function returns a `Promise` that is rejected. For debugging purposes and selective error catching, it is useful to make `reason` an `instanceof` [`Error`](../../globals/Error/Error.mdx).\n\n`Promise.reject()` is generic and supports subclassing, which means it can be called on subclasses of `Promise`, and the result will be a promise of the subclass type. To do so, the subclass's constructor must implement the same signature as the [`Promise()`](../../globals/Promise/Promise.mdx) constructor — accepting a single `executor` function that can be called with the `resolve` and `reject` callbacks as parameters. `Promise.reject()` is essentially a shorthand for `new Promise((resolve, reject) => reject(reason))`.\n\nUnlike [`Promise.resolve()`](../../globals/Promise/resolve.mdx), `Promise.reject()` always wraps `reason` in a new `Promise` object, even when `reason` is already a `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Promise/resolve.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.resolve()\n\nThe **`Promise.resolve()`** method \"resolves\" a given value to a `Promise`. If the value is a promise, that promise is returned; if the value is a [thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables), `Promise.resolve()` will call the `then()` method with two callbacks it prepared; otherwise the returned promise will be fulfilled with the value.\n\nThis function flattens nested layers of promise-like objects (e.g. a promise that fulfills to a promise that fulfills to something) into a single layer — a promise that fulfills to a non-thenable value.\n\n## Syntax\n\n```js\nPromise.resolve(value)\n```\n\n### Parameters\n\n- `value`\n  - : Argument to be resolved by this `Promise`. Can also be a `Promise` or a thenable to resolve.\n\n### Return value\n\nA `Promise` that is resolved with the given value, or the promise passed as value, if the value was a promise object. A resolved promise can be in any of the states — fulfilled, rejected, or pending. For example, resolving a rejected promise will still result in a rejected promise.\n\n## Description\n\n`Promise.resolve()` _resolves_ a promise, which is not the same as fulfilling or rejecting the promise. See [Promise description](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#description) for definitions of the terminology. In brief, `Promise.resolve()` returns a promise whose eventual state depends on another promise, thenable object, or other value.\n\n`Promise.resolve()` is generic and supports subclassing, which means it can be called on subclasses of `Promise`, and the result will be a promise of the subclass type. To do so, the subclass's constructor must implement the same signature as the [`Promise()`](../../globals/Promise/Promise.mdx) constructor — accepting a single `executor` function that can be called with the `resolve` and `reject` callbacks as parameters.\n\n`Promise.resolve()` special-cases native `Promise` instances. If `value` belongs to `Promise` or a subclass, and `value.constructor === Promise`, then `value` is directly returned by `Promise.resolve()`, without creating a new `Promise` instance. Otherwise, `Promise.resolve()` is essentially a shorthand for `new Promise((resolve) => resolve(value))`.\n\nThe bulk of the resolving logic is actually implemented by the [resolver function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise/Promise#the_resolver_function) passed by the `Promise()` constructor. In summary:\n\n- If a non-[thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) value is passed, the returned promise is already fulfilled with that value.\n- If a thenable is passed, the returned promise will adopt the state of that thenable by calling the `then` method and passing a pair of resolving functions as arguments. (But because native promises directly pass through `Promise.resolve()` without creating a wrapper, the `then` method is not called on native promises.) If the resolver function receives another thenable object, it will be resolved agin, so that the eventual fulfillment value of the promise will never be thenable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Proxy/Proxy.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Proxy()\n\nThe **`Proxy()`** constructor is used to create `Proxy` objects.\n\n## Syntax\n\n```js\nnew Proxy(target, handler)\n```\n\n> **Note:** `Proxy()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `target`\n  - : A target object to wrap with `Proxy`. It can be any sort of object,\n    including a native array, a function, or even another proxy.\n- `handler`\n  - : An object whose properties are functions that define the behavior of the proxy when\n    an operation is performed on it.\n\n## Description\n\nUse the `Proxy()` constructor to create a new `Proxy` object.\nThis constructor takes two mandatory arguments:\n\n- `target` is the object for which you want to create the proxy\n- `handler` is the object that defines the custom behavior of the proxy.\n\nAn empty handler will create a proxy that behaves, in almost all respects, exactly like\nthe target. By defining any of a set group of functions on the `handler`\nobject, you can customize specific aspects of the proxy's behavior. For example, by\ndefining `get()` you can provide a customized version of the target's\n[property accessor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Property_Accessors).\n\n### Handler functions\n\nThis section lists all the handler functions you can define. Handler functions are\nsometimes called _traps_, because they trap calls to the underlying target\nobject.\n\n- [`handler.apply()`](../../globals/Proxy/proxy/apply.mdx)\n  - : A trap for a function call.\n- [`handler.construct()`](../../globals/Proxy/proxy/construct.mdx)\n  - : A trap for the `new` operator.\n- [`handler.defineProperty()`](../../globals/Proxy/proxy/defineProperty.mdx)\n  - : A trap for [`Object.defineProperty`](../../globals/Object/defineProperty.mdx).\n- [`handler.deleteProperty()`](../../globals/Proxy/proxy/deleteProperty.mdx)\n  - : A trap for the `delete` operator.\n- [`handler.get()`](../../globals/Proxy/proxy/get.mdx)\n  - : A trap for getting property values.\n- [`handler.getOwnPropertyDescriptor()`)}](../../globals/Proxy/proxy/getOwnPropertyDescriptor.mdx)\n  - : A trap for [`Object.getOwnPropertyDescriptor`](../../globals/Object/getOwnPropertyDescriptor.mdx).\n- [`handler.getPrototypeOf()`](../../globals/Proxy/proxy/getPrototypeOf.mdx)\n  - : A trap for [`Object.getPrototypeOf()`](../../globals/Object/getPrototypeOf.mdx).\n- [`handler.has()`](../../globals/Proxy/proxy/has.mdx)\n  - : A trap for the `in` operator.\n- [`handler.isExtensible()`](../../globals/Proxy/proxy/isExtensible.mdx)\n  - : A trap for [`Object.isExtensible()`](../../globals/Object/isExtensible.mdx).\n- [`handler.ownKeys()`](../../globals/Proxy/proxy/ownKeys.mdx)\n  - : A trap for [`Object.getOwnPropertyNames()`](../../globals/Object/getOwnPropertyNames.mdx) and\n    [`Object.getOwnPropertySymbols()`](../../globals/Object/getOwnPropertySymbols.mdx).\n- [`handler.preventExtensions()`)}](../../globals/Proxy/proxy/preventExtensions.mdx)\n  - : A trap for [`Object.preventExtensions()`](../../globals/Object/preventExtensions.mdx).\n- [`handler.set()`](../../globals/Proxy/proxy/set.mdx)\n  - : A trap for setting property values.\n- [`handler.setPrototypeOf()`](../../globals/Proxy/proxy/setPrototypeOf.mdx)\n  - : A trap for [`Object.setPrototypeOf()`](../../globals/Object/setPrototypeOf.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Proxy/proxy/apply.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.apply()\n\nThe **`handler.apply()`** method is a trap for a function call.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  apply(target, thisArg, argumentsList) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `apply()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target callable object.\n- `thisArg`\n  - : The `this` argument for the call.\n- `argumentsList`\n  - : The list of arguments for the call.\n\n### Return value\n\nThe `apply()` method can return any value.\n\n## Description\n\nThe **`handler.apply()`** method is a trap for a function call.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- Function call: `proxy(...args)`\n- [`Function.prototype.apply()`](../../../globals/Function/prototype/apply.mdx) and [`Function.prototype.call()`](../../../globals/Function/prototype/call.mdx)\n- [`Reflect.apply()`](../../../globals/Reflect/apply.mdx)\n\nOr any other operation that invokes the `[[Call]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The `target` must be a callable itself. That is, it must be a function object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Proxy/proxy/construct.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.construct()\n\nThe **`handler.construct()`** method is a trap for the `new` operator. In order for the new operation to be valid on the resulting Proxy object, the target used to initialize the proxy must itself have a `[[Construct]]` internal method (i.e. `new target` must be valid).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  construct(target, argumentsList, newTarget) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `construct()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `argumentsList`\n  - : The list of arguments for the constructor.\n- `newTarget`\n  - : The constructor that was originally called, `p` above.\n\n### Return value\n\nThe `construct` method must return an object.\n\n## Description\n\nThe **`handler.construct()`** method is a trap for the `new` operator.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- The `new` operator: `new myFunction(...args)`\n- [`Reflect.construct()`](../../../globals/Reflect/construct.mdx)\n\nOr any other operation that invokes the `[[Construct]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The result must be an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Proxy/proxy/defineProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.defineProperty()\n\nThe **`handler.defineProperty()`** method is a trap for\n[`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  defineProperty(target, property, descriptor) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `defineProperty()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property whose description is to be\n    retrieved.\n- `descriptor`\n  - : The descriptor for the property being defined or modified.\n\n### Return value\n\nThe `defineProperty()` method must return a `Boolean` indicating\nwhether or not the property has been successfully defined.\n\n## Description\n\nThe **`handler.defineProperty()`** method is a trap for\n[`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx), [`Object.defineProperties()`](../../../globals/Object/defineProperties.mdx)\n- [`Reflect.defineProperty()`](../../../globals/Reflect/defineProperty.mdx)\n\nOr any other operation that invokes the `[[DefineOwnProperty]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- A property cannot be added, if the target object is not extensible.\n- A property cannot be added as or modified to be non-configurable, if it does not\n  exists as a non-configurable own property of the target object.\n- A property may not be non-configurable, if a corresponding configurable property of\n  the target object exists.\n- If a property has a corresponding target object property then\n  `Object.defineProperty(target, prop, descriptor)`\n  will not throw an exception.\n- In strict mode, a `false` return value from the\n  `defineProperty()` handler will throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Proxy/proxy/deleteProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.deleteProperty()\n\nThe **`handler.deleteProperty()`** method is a trap for the `delete` operator.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  deleteProperty(target, property) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `deleteProperty()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property to delete.\n\n### Return value\n\nThe `deleteProperty()` method must return a `Boolean` indicating\nwhether or not the property has been successfully deleted.\n\n## Description\n\nThe **`handler.deleteProperty()`** method is a trap for the `delete` operator.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- The [`delete`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) operator: `delete proxy[foo]` and\n  `delete proxy.foo`\n- [`Reflect.deleteProperty()`](../../../globals/Reflect/deleteProperty.mdx)\n\nOr any other operation that invokes the `[[Delete]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- A property cannot be deleted, if it exists as a non-configurable own property of the\n  target object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Proxy/proxy/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.get()\n\nThe **`handler.get()`** method is a trap for getting a property\nvalue.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  get(target, property, receiver) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `get()` method. `this`\nis bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property to get.\n- `receiver`\n  - : Either the proxy or an object that inherits from the proxy.\n\n### Return value\n\nThe `get()` method can return any value.\n\n## Description\n\nThe **`handler.get()`** method is a trap for getting a property\nvalue.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- Property access: `proxy[foo]` and `proxy.bar`\n- [`Reflect.get()`](../../../globals/Reflect/get.mdx)\n\nOr any other operation that invokes the `[[Get]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The value reported for a property must be the same as the value of the corresponding\n  target object property if the target object property is a non-writable,\n  non-configurable own data property.\n- The value reported for a property must be undefined if the corresponding target\n  object property is a non-configurable own accessor property that has\n  `undefined` as its `[[Get]]` attribute.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Proxy/proxy/getOwnPropertyDescriptor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.getOwnPropertyDescriptor()\n\nThe **`handler.getOwnPropertyDescriptor()`** method is a trap for [`Object.getOwnPropertyDescriptor()`](../../../globals/Object/getOwnPropertyDescriptor.mdx).\n\n\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  getOwnPropertyDescriptor(target, prop) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `getOwnPropertyDescriptor()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `prop`\n  - : The name of the property whose description should be retrieved.\n\n### Return value\n\nThe `getOwnPropertyDescriptor()` method must return an object or `undefined`.\n\n## Description\n\nThe **`handler.getOwnPropertyDescriptor()`** method is a trap for [`Object.getOwnPropertyDescriptor()`](../../../globals/Object/getOwnPropertyDescriptor.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.getOwnPropertyDescriptor()`](../../../globals/Object/getOwnPropertyDescriptor.mdx)\n- [`Reflect.getOwnPropertyDescriptor()`](../../../globals/Reflect/getOwnPropertyDescriptor.mdx)\n\nOr any other operation that invokes the `[[GetOwnProperty]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `getOwnPropertyDescriptor()` must return an object or `undefined`.\n- A property cannot be reported as non-existent, if it exists as a non-configurable own property of the target object.\n- A property cannot be reported as non-existent, if it exists as an own property of the target object and the target object is not extensible.\n- A property cannot be reported as existent, if it does not exists as an own property of the target object and the target object is not extensible.\n- A property cannot be reported as non-configurable, if it does not exists as an own property of the target object or if it exists as a configurable own property of the target object.\n- The result of `Object.getOwnPropertyDescriptor(target)` can be applied to the target object using `Object.defineProperty()` and will not throw an exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Proxy/proxy/getPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.getPrototypeOf()\n\nThe **`handler.getPrototypeOf()`** method is a trap for the\n`[[GetPrototypeOf]]` internal method.\n\n## Syntax\n\n```js\nnew Proxy(obj, {\n  getPrototypeOf(target) {\n    // …\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `getPrototypeOf()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `getPrototypeOf()` method must return an object or `null`.\n\n## Description\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.getPrototypeOf()`](../../../globals/Object/getPrototypeOf.mdx)\n- [`Reflect.getPrototypeOf()`](../../../globals/Reflect/getPrototypeOf.mdx)\n- [`Object.prototype.isPrototypeOf()`](../../../globals/Object/prototype/isPrototypeOf.mdx)\n- `instanceof`\n\nOr any other operation that invokes the `[[GetPrototypeOf]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `getPrototypeOf()` method must return an object or `null`.\n- If `target` is not extensible,\n  `Object.getPrototypeOf(proxy)` method must return the same\n  value as `Object.getPrototypeOf(target)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Proxy/proxy/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.has()\n\nThe **`handler.has()`** method is a trap for the `in` operator.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  has(target, prop) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to `has()` method. `this` is\nbound to the handler.\n\n- `target`\n  - : The target object.\n- `prop`\n  - : The name or `Symbol` of the property to check for existence.\n\n### Return value\n\nThe `has()` method must return a boolean value.\n\n## Description\n\nThe **`handler.has()`** method is a trap for the `in` operator.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- The [`in`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/in) operator: `foo in proxy`\n- [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) check: `with(proxy) { (foo); }`\n- [`Reflect.has()`](../../../globals/Reflect/has.mdx)\n\nOr any other operation that invokes the `[[HasProperty]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- A property cannot be reported as non-existent, if it exists as a non-configurable\n  own property of the target object.\n- A property cannot be reported as non-existent, if it exists as an own property of\n  the target object and the target object is not extensible.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Proxy/proxy/isExtensible.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.isExtensible()\n\nThe **`handler.isExtensible()`** method is a trap for\n[`Object.isExtensible()`](../../../globals/Object/isExtensible.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  isExtensible(target) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `isExtensible()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `isExtensible()` method must return a boolean value.\n\n## Description\n\nThe **`handler.isExtensible()`** method is a trap for\n[`Object.isExtensible()`](../../../globals/Object/isExtensible.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.isExtensible()`](../../../globals/Object/isExtensible.mdx)\n- [`Reflect.isExtensible()`](../../../globals/Reflect/isExtensible.mdx)\n\nOr any other operation that invokes the `[[IsExtensible]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `Object.isExtensible(proxy)` must return the same value as\n  `Object.isExtensible(target)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Proxy/proxy/ownKeys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.ownKeys()\n\nThe **`handler.ownKeys()`** method is a trap for\n[`Reflect.ownKeys()`](../../../globals/Reflect/ownKeys.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  ownKeys(target) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `ownKeys()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `ownKeys()` method must return an enumerable object.\n\n## Description\n\nThe **`handler.ownKeys()`** method is a trap for\n[`Reflect.ownKeys()`](../../../globals/Reflect/ownKeys.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.getOwnPropertyNames()`](../../../globals/Object/getOwnPropertyNames.mdx)\n- [`Object.getOwnPropertySymbols()`](../../../globals/Object/getOwnPropertySymbols.mdx)\n- [`Object.keys()`](../../../globals/Object/keys.mdx)\n- [`Reflect.ownKeys()`](../../../globals/Reflect/ownKeys.mdx)\n\nOr any other operation that invokes the `[[OwnPropertyKeys]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The result of `ownKeys()` must be an array.\n- The type of each array element is either a `String` or a `Symbol`.\n- The result List must contain the keys of all non-configurable own properties of the\n  target object.\n- If the target object is not extensible, then the result List must contain all the\n  keys of the own properties of the target object and no other values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Proxy/proxy/preventExtensions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.preventExtensions()\n\nThe **`handler.preventExtensions()`** method is a trap for [`Object.preventExtensions()`](../../../globals/Object/preventExtensions.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  preventExtensions(target) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `preventExtensions()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `preventExtensions()` method must return a boolean value.\n\n## Description\n\nThe **`handler.preventExtensions()`** method is a trap for [`Object.preventExtensions()`](../../../globals/Object/preventExtensions.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.preventExtensions()`](../../../globals/Object/preventExtensions.mdx)\n- [`Reflect.preventExtensions()`](../../../globals/Reflect/preventExtensions.mdx)\n- [`Object.seal()`](../../../globals/Object/seal.mdx)\n- [`Object.freeze()`](../../../globals/Object/freeze.mdx)\n\nOr any other operation that invokes the `[[PreventExtensions]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `Object.preventExtensions(proxy)` only returns `true` if `Object.isExtensible(proxy)` is `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Proxy/proxy/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.set()\n\nThe **`handler.set()`** method is a trap for setting a property\nvalue.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  set(target, property, value, receiver) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `set()` method. `this`\nis bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property to set.\n- `value`\n  - : The new value of the property to set.\n- `receiver`\n\n  - : The object to which the assignment was originally directed. This is usually the\n    proxy itself. But a `set()` handler can also be called indirectly, via\n    the prototype chain or various other ways.\n\n    For example, suppose a script does\n    `obj.name = \"jen\"`, and `obj` is not a\n    proxy, and has no own property `.name`, but it has a proxy on its\n    prototype chain. That proxy's `set()` handler will be called, and\n    `obj` will be passed as the receiver.\n\n### Return value\n\nThe `set()` method should return a boolean value.\n\n- Return `true` to indicate that assignment succeeded.\n- If the `set()` method returns `false`, and the assignment\n  happened in strict-mode code, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) will be thrown.\n\n## Description\n\nThe **`handler.set()`** method is a trap for setting property\nvalue.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- Property assignment: `proxy[foo] = bar` and `proxy.foo = bar`\n- [`Reflect.set()`](../../../globals/Reflect/set.mdx)\n\nOr any other operation that invokes the `[[Set]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- Cannot change the value of a property to be different from the value of the\n  corresponding target object property if the corresponding target object property is a\n  non-writable, non-configurable data property.\n- Cannot set the value of a property if the corresponding target object property is a\n  non-configurable accessor property that has `undefined` as its\n  `[[Set]]` attribute.\n- In strict mode, a `false` return value from the `set()`\n  handler will throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Proxy/proxy/setPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.setPrototypeOf()\n\nThe **`handler.setPrototypeOf()`** method is a trap for\n[`Object.setPrototypeOf()`](../../../globals/Object/setPrototypeOf.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  setPrototypeOf(target, prototype) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `setPrototypeOf()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `prototype`\n  - : The object's new prototype or `null`.\n\n### Return value\n\nThe `setPrototypeOf()` method returns `true` if the\n`[[Prototype]]` was successfully changed, otherwise `false`.\n\n## Description\n\nThe **`handler.setPrototypeOf()`** method is a trap for\n[`Object.setPrototypeOf()`](../../../globals/Object/setPrototypeOf.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.setPrototypeOf()`](../../../globals/Object/setPrototypeOf.mdx)\n- [`Reflect.setPrototypeOf()`](../../../globals/Reflect/setPrototypeOf.mdx)\n\nOr any other operation that invokes the `[[SetPrototypeOf]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- If `target` is not extensible, the `prototype`\n  parameter must be the same value as\n  `Object.getPrototypeOf(target)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Proxy/revocable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Proxy.revocable()\n\nThe **`Proxy.revocable()`** static method creates a revocable `Proxy` object.\n\n## Syntax\n\n```js\nProxy.revocable(target, handler)\n```\n\n### Parameters\n\n- `target`\n  - : A target object to wrap with `Proxy`. It can be any sort of object, including a native array, a function, or even another proxy.\n- `handler`\n  - : An object whose properties are functions defining the behavior of `proxy` when an operation is performed on it.\n\n### Return value\n\nA plain object with the following two properties:\n\n- `proxy`\n  - : A Proxy object exactly the same as one created with a [`new Proxy(target, handler)`](../../globals/Proxy/Proxy.mdx) call.\n- `revoke`\n  - : A function with no parameters to revoke (switch off) the `proxy`.\n\n## Description\n\nThe `Proxy.revocable()` factory function is the same as the [`Proxy()`](../../globals/Proxy/Proxy.mdx) constructor, except that in addition to creating a proxy object, it also creates a `revoke` function that can be called to disable the proxy. The proxy object and the `revoke` function are wrapped in a plain object.\n\nThe `revoke` function does not take any parameters, nor does it rely on the `this` value. The created `proxy` object is attached to the `revoke` function as a [private property](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/Private_class_fields) that the `revoke` function accesses on itself when called (the existence of the private property is not observable from the outside, but it has implications on how garbage collection happens). The `proxy` object is _not_ captured within the [closure](https://developer.mozilla.org/docs/Web/JavaScript/Closures) of the `revoke` function (which will make garbage collection of `proxy` impossible if `revoke` is still alive).\n\nAfter the `revoke()` function gets called, the proxy becomes unusable: any trap to a handler throws a [`TypeError`](../../globals/TypeError/TypeError.mdx). Once a proxy is revoked, it remains revoked, and calling `revoke()` again has no effect — in fact, the call to `revoke()` detaches the `proxy` object from the `revoke` function, so the `revoke` function will not be able to access the proxy again at all. If the proxy is not referenced elsewhere, it will then be eligible for garbage collection. The `revoke` function also detaches `target` and `handler` from the `proxy`, so if `target` is not referenced elsewhere, it will also be eligible for garbage collection, even when its proxy is still alive, since there's no longer a way to meaningfully interact with the target object.\n\nLetting users interact with an object through a revocable proxy allows you to [control the lifetime](https://developer.mozilla.org/docs/Web/JavaScript/Memory_Management) of the object exposed to the user — you can make the object garbage-collectable even when the user is still holding a reference to its proxy.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/RangeError/RangeError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RangeError\n\nThe **`RangeError()`** constructor creates an error\nwhen a value is not in the set or range of allowed values.\n\n## Syntax\n\n```js\nnew RangeError()\nnew RangeError(message)\nnew RangeError(message, options)\nnew RangeError(message, fileName)\nnew RangeError(message, fileName, lineNumber)\n\nRangeError()\nRangeError(message)\nRangeError(message, options)\nRangeError(message, fileName)\nRangeError(message, fileName, lineNumber)\n```\n\n> **Note:** `RangeError()` can be called with or without `new`. Both create a new `RangeError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/ReadableByteStreamController/prototype/byobRequest.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# byobRequest\n\nThe **`byobRequest`** read-only property of the `ReadableByteStreamController` interface returns the current BYOB request, or `null` if there are no pending requests.\n\nAn underlying byte source should check this property, and use it to write data to the stream if it exists (rather than using `ReadableByteStreamController.enqueue()`).\nThis will result in an efficient zero-byte transfer of the data to the consumer.\n\n## Value\n\nA `ReadableStreamBYOBRequest` object instance, or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/ReadableByteStreamController/prototype/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# close()\n\nThe **`close()`** method of the `ReadableByteStreamController` interface closes the associated stream.\n\nThis might be called by the underlying source when its data source has been exhausted/completed.\n\n> **Note:** Readers will still be able to read any previously-enqueued chunks from the stream, but once those are read, the stream will become closed.\n> However if there is an outstanding and partially written `byobRequest` when `close()` is called, the stream will be errored.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableByteStreamController`, it is already closed, or the stream is not readable for some other reason.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/ReadableByteStreamController/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# desiredSize\n\nThe **`desiredSize`** read-only property of the`ReadableByteStreamController` interface returns the number of bytes required to fill the stream's internal queue to its \"desired size\".\n\nThe value is used by the stream to indicate a preferred flow rate to the underlying source.\nSources that support throttling or pausing their inflow of data (not all do!) should control the inflow such that `desiredSize` of the stream buffer is kept positive and as close to zero as possible.\n\nThe `desiredSize` is used to apply backpressure from downstream consumers.\n\n## Value\n\nAn integer. Note that this can be negative if the queue is over-full.\n\nThe value will be `null` if the stream has errored and `0` if it is closed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/ReadableByteStreamController/prototype/enqueue.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# enqueue()\n\nThe **`enqueue()`** method of the `ReadableByteStreamController` interface enqueues a given chunk on the associated readable byte stream (the chunk is copied into the stream's internal queues).\n\nThis should only be used to transfer data to the queue when `byobRequest` is `null`.\n\n## Syntax\n\n```js\nenqueue(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : The chunk to enqueue.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableByteStreamController`, or the stream cannot be read for some other reason, or the chunk is not an object, or the chunk's internal array buffer is non-existent, zero-length, or detached.\n    It is also thrown if the stream has been closed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/ReadableByteStreamController/prototype/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# error()\n\nThe **`error()`** method of the `ReadableByteStreamController` interface causes any future interactions with the associated stream to error with the specified reason.\n\nThis is commonly called by an underlying source to surface an error from the interface where it gets its data (such as a file-read or socket error).\nIt can also be called from elsewhere to trigger a stream error, for example if another part of the system that the stream relies on fails.\n\n## Syntax\n\n```js\nerror(errorObject)\n```\n\n### Parameters\n\n- `errorObject`\n  - : Any object that you want future interactions to fail with.\n\n### Return value\n\n`undefined`\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableByteStreamController`, or the stream is not readable for some other reason.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/ReadableStream/ReadableStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream()\n\nThe **`ReadableStream()`** constructor creates and returns a readable stream object from the given handlers.\n\n## Syntax\n\n```js\nnew ReadableStream()\nnew ReadableStream(underlyingSource)\nnew ReadableStream(underlyingSource, queuingStrategy)\n```\n\n### Parameters\n\n- `underlyingSource` _**optional**_\n\n  - : An object containing methods and properties that define how the constructed stream instance will behave.\n    `underlyingSource` can contain the following:\n\n    - `start` (controller) _**optional**_\n      - : This is a method, called immediately when the object is constructed. The\n        contents of this method are defined by the developer, and should aim to get access\n        to the stream source, and do anything else required to set up the stream\n        functionality. If this process is to be done asynchronously, it can return a\n        promise to signal success or failure. The `controller` parameter passed\n        to this method is a `ReadableStreamDefaultController` or a\n        `ReadableByteStreamController`, depending on the value of the\n        `type` property. This can be used by the developer to control the\n        stream during set up.\n    - `pull` (controller) _**optional**_\n      - : This method, also defined by the developer, will be called repeatedly when the\n        stream's internal queue of chunks is not full, up until it reaches its high water\n        mark. If `pull()` returns a promise, then it won't be called again\n        until that promise fulfills; if the promise rejects, the stream will become\n        errored. The `controller` parameter passed to this method is a\n        `ReadableStreamDefaultController` or a\n        `ReadableByteStreamController`, depending on the value of the\n        `type` property. This can be used by the developer to control the\n        stream as more chunks are fetched.\n    - `cancel` (reason) _**optional**_\n      - : This method, also defined by the developer, will be called if the app signals\n        that the stream is to be cancelled (e.g. if `ReadableStream.cancel()`\n        is called). The contents should do whatever is necessary to release access to the\n        stream source. If this process is asynchronous, it can return a promise to signal\n        success or failure. The `reason` parameter contains a\n        string describing why the stream was cancelled.\n    - `type` _**optional**_\n      - : This property controls what type of readable stream is being dealt with. If it\n        is included with a value set to `\"bytes\"`, the passed controller object\n        will be a `ReadableByteStreamController` capable of handling a BYOB\n        (bring your own buffer)/byte stream. If it is not included, the passed controller\n        will be a `ReadableStreamDefaultController`.\n    - `autoAllocateChunkSize` _**optional**_\n\n      - : For byte streams, the developer can set the `autoAllocateChunkSize` with a positive integer value to turn on the stream's auto-allocation feature.\n        With this is set, the stream implementation will automatically allocate a view buffer of the specified size in `ReadableByteStreamController.byobRequest` when required.\n\n        This must be set to enable zero-copy transfers to be used with a default `ReadableStreamDefaultReader`.\n        If not set, a default reader will still stream data, but `ReadableByteStreamController.byobRequest` will always be `null` and transfers to the consumer must be via the stream's internal queues.\n\n- `queuingStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer — this defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk` — this indicates the size to\n        use for each chunk, in bytes.\n\n    > **Note:** You could define your own custom\n    > `queuingStrategy`, or use an instance of\n    > `ByteLengthQueuingStrategy` or `CountQueuingStrategy`\n    > for this object value. If no `queuingStrategy` is supplied, the default\n    > used is the same as a `CountQueuingStrategy` with a high water mark of\n    > 1\\.\n\n### Return value\n\nAn instance of the `ReadableStream` object.\n\n### Exceptions\n\n- `RangeError`\n  - Thrown if the supplied type value is neither `\"bytes\"` nor `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/ReadableStream/prototype/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.cancel()\n\nThe **`cancel()`** method of the\n`ReadableStream` interface returns a `Promise` that\nresolves when the stream is canceled.\n\nCancel is used when you've completely finished with the stream and don't need any more\ndata from it, even if there are chunks enqueued waiting to be read. That data is lost\nafter cancel is called, and the stream is not readable any more. To read those chunks\nstill and not completely get rid of the stream, you'd use\n`ReadableStreamDefaultController.close()`.\n\n## Syntax\n\n```js\ncancel()\ncancel(reason)\n```\n\n### Parameters\n\n- `reason` _**optional**_\n  - : A human-readable reason for the cancellation. The underlying source may or may not use it.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason` parameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to cancel is not a `ReadableStream`, or it is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/ReadableStream/prototype/getReader.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.getReader()\n\nThe **`getReader()`** method of the `ReadableStream` interface creates a reader and locks the stream to it.\nWhile the stream is locked, no other reader can be acquired until this one is released.\n\n## Syntax\n\n```js\ngetReader()\ngetReader(options)\n```\n\n### Parameters\n\n- `options` _**optional**_\n\n  - : An object containing the following properties:\n\n    - `mode` _**optional**_\n\n      - : A property that specifies the type of reader to create.\n        Values can be:\n\n        - `\"byob\"`, which results in a `ReadableStreamBYOBReader` being created that can read readable byte streams (streams that support zero-copy transfer from an underlying byte source to the reader when internal stream buffers are empty).\n        - `undefined` (or not specified at all — this is the default), which results in a `ReadableStreamDefaultReader` being created that can read individual chunks from a stream.\n\n### Return value\n\nA `ReadableStreamDefaultReader` or `ReadableStreamBYOBReader` object instance, depending on the `mode` value.\n\n### Exceptions\n\n- `RangeError`\n  - : Thrown if the provided mode value is not `\"byob\"` or `undefined`.\n- `TypeError`\n  - : Thrown if the stream you are trying to create a reader for is already locked, or not a `ReadableStream`."
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/ReadableStream/prototype/locked.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.locked\n\nThe **`locked`** read-only property of the `ReadableStream` interface returns whether or not the readable stream is locked to a reader.\n\nA readable stream can have at most one active reader at a time, and is locked to that reader until it is released.\nA reader might be obtained using `ReadableStream.getReader()` and released using the reader's `releaseLock()` method.\n\n## Value\n\nA `boolean` value indicating whether or not the readable stream is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/ReadableStream/prototype/pipeThrough.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.pipeThrough()\n\nThe **`pipeThrough()`** method of the `ReadableStream` interface provides a chainable way of piping the current stream through a transform stream or any other writable/readable pair.\n\nPiping a stream will generally lock it for the duration of the pipe, preventing other readers from locking it.\n\n## Syntax\n\n```js\npipeThrough(transformStream)\npipeThrough(transformStream, options)\n```\n\n### Parameters\n\n- `transformStream`\n\n  - : A `TransformStream` (or an object with the structure\n    `{writable, readable}`) consisting of a readable stream and a writable\n    stream working together to transform some data from one form to another. Data written\n    to the `writable` stream can be read in some transformed state by the\n    `readable` stream. For example, a `TextDecoder`, has bytes\n    written to it and strings read from it, while a video decoder has encoded bytes\n    written to it and uncompressed video frames read from it.\n\n- `options` _**optional**_\n\n  - : The options that should be used when piping to the `writable` stream.\n    Available options are:\n\n    - `preventClose`\n\n      - : If this is set to `true`, the source `ReadableStream` closing will no longer cause the destination `WritableStream` to be closed.\n        The method will return a fulfilled promise once this process completes, unless an error is encountered while closing the destination, in which case it will be rejected with that error.\n\n    - `preventAbort`\n\n      - : If this is set to `true`, errors in the source `ReadableStream` will no longer abort the destination `WritableStream`.\n        The method will return a promise rejected with the source's error, or with any error that occurs during aborting the destination.\n\n    - `preventCancel`\n\n      - : If this is set to `true`, errors in the destination `WritableStream` will no longer cancel the source `ReadableStream`.\n        In this case the method will return a promise rejected with the source's error, or with any error that occurs during canceling the source.\n        In addition, if the destination writable stream starts out closed or closing, the source readable stream will no longer be canceled.\n        In this case the method will return a promise rejected with an error indicating piping to a closed stream failed, or with any error that occurs during canceling the source.\n\n### Return value\n\nThe `readable` side of the `transformStream`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the `writable` and/or `readable` property of `transformStream` are undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/ReadableStream/prototype/pipeTo.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.pipeTo()\n\nThe **`pipeTo()`** method of the `ReadableStream` interface pipes the current `ReadableStream` to a given `WritableStream` and returns a `Promise` that fulfills when the piping process completes successfully, or rejects if any errors were encountered.\n\nPiping a stream will generally `lock` it for the duration of the pipe, preventing other readers from locking it.\n\n## Syntax\n\n```js\npipeTo(destination)\npipeTo(destination, options)\n```\n\n### Parameters\n\n- `destination`\n\n  - : A `WritableStream` that acts as the final destination for the `ReadableStream`.\n\n- `options` _**optional**_\n\n  - : The options that should be used when piping to the `writable` stream.\n    Available options are:\n\n    - `preventClose`\n      - : If this is set to `true`, the source `ReadableStream` closing will no longer cause the destination `WritableStream` to be closed.\n        The method will return a fulfilled promise once this process completes, unless an error is encountered while closing the destination in which case it will be rejected with that error.\n    - `preventAbort`\n      - : If this is set to `true`, errors in the source `ReadableStream` will no longer abort the destination `WritableStream`.\n        The method will return a promise rejected with the source's error, or with any error that occurs during aborting the destination.\n    - `preventCancel`\n      - : If this is set to `true`, errors in the destination `WritableStream` will no longer cancel the source `ReadableStream`.\n        In this case the method will return a promise rejected with the source's error, or with any error that occurs during canceling the source.\n        In addition, if the destination writable stream starts out closed or closing, the source readable stream will no longer be canceled.\n        In this case the method will return a promise rejected with an error indicating piping to a closed stream failed, or with any error that occurs during canceling the source.\n\n### Return value\n\nA `Promise` that resolves when the piping process has completed.\n\n### Exceptions\n\n- `TypeError`\n  - : The `writableStream` and/or `readableStream` objects are not a writable stream/readable stream, or one or both of the streams are locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/ReadableStream/prototype/tee.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.tee()\n\nThe **`tee()`** method of the\n`ReadableStream` interface [tees](https://streams.spec.whatwg.org/#tee-a-readable-stream) the current readable stream, returning a\ntwo-element array containing the two resulting branches as\nnew `ReadableStream` instances.\n\nThis is useful for allowing two readers to read a stream sequentially or simultaneously,\nperhaps at different speeds.\nFor example, you might do this in a ServiceWorker if you want to fetch\na response from the server and stream it to the browser, but also stream it to the\nServiceWorker cache. Since a response body cannot be consumed more than once, you'd need\ntwo copies to do this.\n\nA teed stream will partially signal backpressure at the rate of the _faster_ consumer\nof the two `ReadableStream` branches,\nand unread data is enqueued internally on the slower consumed `ReadableStream`\nwithout any limit or backpressure.\nThat is, when _both_ branches have an unread element in their internal queue,\nthen the original `ReadableStream`'s controller's internal queue will start to fill up,\nand once its `ReadableStreamDefaultController.desiredSize\", \"desiredSize` ≤ 0\nor byte stream controller `ReadableByteStreamController.desiredSize\", \"desiredSize` ≤ 0,\nthen the controller will stop calling `pull(controller)` on the\nunderlying source passed to `ReadableStream.ReadableStream\", \"new ReadableStream()`.\nIf only one branch is consumed, then the entire body will be enqueued in memory.\nTherefore, you should not use the built-in `tee()` to read very large streams\nin parallel at different speeds.\nInstead, search for an implementation that fully backpressures\nto the speed of the _slower_ consumed branch.\n\nTo cancel the stream you then need to cancel both resulting branches. Teeing a stream\nwill generally lock it for the duration, preventing other readers from locking it.\n\n## Syntax\n\n```js\ntee()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nAn `Array` containing two `ReadableStream` instances.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source stream is not a `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/ReadableStreamBYOBReader/ReadableStreamBYOBReader.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# ReadableStreamBYOBReader()\n\nThe **`ReadableStreamBYOBReader()`** constructor creates and returns a `ReadableStreamBYOBReader` object instance.\n\n> **Note:** You generally wouldn't use this constructor manually;\n> instead, you'd use the `ReadableStream.getReader()` method with the argument `\"byob\"`.\n\n## Syntax\n\n```js\nnew ReadableStreamBYOBReader(stream)\n```\n\n### Parameters\n\n- `stream`\n  - : The `ReadableStream` to be read.\n\n### Return value\n\nAn instance of the `ReadableStreamBYOBReader` object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the supplied `stream` parameter is not a `ReadableStream`, or it is already locked for reading by another reader, or its stream controller is not a `ReadableByteStreamController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/ReadableStreamBYOBReader/prototype/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# cancel()\n\nThe **`cancel()`** method of the `ReadableStreamBYOBReader` interface returns a `Promise` that resolves when the stream is canceled.\nCalling this method signals a loss of interest in the stream by a consumer.\n\n> **Note:** If the reader is active, the `cancel()` method behaves the same as that for the associated stream (`ReadableStream.cancel()`).\n\n## Syntax\n\n```js\ncancel()\ncancel(reason)\n```\n\n### Parameters\n\n- `reason` __optional__\n  - : A human-readable reason for the cancellation. The underlying source may or may not use it.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason` parameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamBYOBReader`, or the stream has no owner.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/ReadableStreamBYOBReader/prototype/closed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# closed\n\nThe **`closed`** read-only property of the `ReadableStreamBYOBReader` interface returns a `Promise` that fulfills when the stream closes, or rejects if the stream throws an error or the reader's lock is released.\n\nThis property enables you to write code that responds to an end to the streaming process.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/ReadableStreamBYOBReader/prototype/read.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# read()\n\nThe **`read()`** method of the `ReadableStreamBYOBReader` interface is used to read data into a view on a user-supplied buffer from an associated readable byte stream.\nA request for data will be satisfied from the stream's internal queues if there is any data present.\nIf the stream queues are empty, the request may be supplied as a zero-copy transfer from the underlying byte source.\n\nThe method takes as an argument a view on a buffer that supplied data is to be read into, and returns a `Promise`.\nThe promise fulfills with an object that has properties `value` and `done` when data comes available, or if the stream is cancelled.\nIf the stream is errored, the promise will be rejected with the relevant error object.\n\nIf a chunk of data is supplied, the `value` property will contain a new view.\nThis will be a view over the same buffer/backing memory (and of the same type) as the original `view` passed to the `read()` method, now populated with the new chunk of data.\nNote that once the promise fulfills, the original `view` passed to the method will be detached and no longer usable.\nThe promise will fulfill with a `value: undefined` if the stream has been cancelled.\nIn this case the backing memory region of `view` is discarded and not returned to the caller (all previously read data in the view's buffer is lost).\n\nThe `done` property indicates whether or not more data is expected.\nThe value is set `true` if the stream is closed or cancelled, and `false` otherwise.\n\n## Syntax\n\n```js\nread(view)\n```\n\n### Parameters\n\n- `view`\n  - : The view that data is to be read into.\n\n### Return value\n\nA `Promise`, which fulfills/rejects with a result depending on the state of the stream.\n\nThe following are possible:\n\n- If a chunk is available and the stream is still active, the promise fulfills with an object of the form:\n\n  ```\n  { value: theChunk, done: false }\n  ```\n\n  `theChunk` is a view containing the new data.\n  This is a view of the same type and over the same backing memory as the `view` passed to the `read()` method.\n  The original `view` will be detached and no longer usable.\n\n- If the stream is closed, the promise fulfills with an object of the form (where `theChunk` has the same properties as above):\n\n  ```\n  { value: theChunk, done: true }\n  ```\n\n- If the stream is cancelled, the promise fulfills with an object of the form:\n\n  ```\n  { value: undefined, done: true }\n  ```\n\n  In this case the backing memory is discarded.\n\n- If the stream throws an error, the promise rejects with the relevant error.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamBYOBReader`, the stream has no owner, the view is not an object or has become detached, the view's length is 0, or `ReadableStreamBYOBReader.releaseLock()` is called (when there's is a pending read request).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/ReadableStreamBYOBReader/prototype/releaseLock.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# releaseLock()\n\nThe **`releaseLock()`** method of the `ReadableStreamBYOBReader` interface releases the reader's lock on the stream.\nAfter the lock is released, the reader is no longer active.\n\nThe reader will appear errored if the associated stream is errored when the lock is released; otherwise, the reader will appear closed.\n\nIf the reader's lock is released while it still has pending read requests then the promises returned by the reader's `ReadableStreamBYOBReader.read()` method are immediately rejected with a `TypeError`.\nUnread chunks remain in the stream's internal queue and can be read later by acquiring a new reader.\n\n## Syntax\n\n```js\nreleaseLock()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamBYOBReader`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/ReadableStreamBYOBRequest/prototype/respond.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# respond()\n\nThe **`respond()`** method of the `ReadableStreamBYOBRequest` interface is used to signal to the associated readable byte stream that the specified number of bytes were written into the `ReadableStreamBYOBRequest.view`.\n\nAfter this method is called, the `view` will be transferred and no longer modifiable.\n\n## Syntax\n\n```js\nrespond(bytesWritten)\n```\n\n### Parameters\n\n- `bytesWritten`\n  - : The number of bytes written into `ReadableStreamBYOBRequest.view`.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : The request does not have an associated `ReadableByteStreamController` or the view buffer is not detached/cannot be transferred into.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/ReadableStreamBYOBRequest/prototype/respondWithNewView.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# respondWithNewView()\n\nThe **`respondWithNewView()`** method of the `ReadableStreamBYOBRequest` interface specifies a new view that the consumer of the associated readable byte stream should write to instead of `ReadableStreamBYOBRequest.view`.\n\nThe new view must be a `TypedArray` or a `DataView` that provides a view onto the same backing memory region as `ReadableStreamBYOBRequest.view`.\nAfter this method is called, the view that was passed into the method will be transferred and no longer modifiable.\n\nThe method is intended for use cases where an underlying byte source needs to transfer a `byobRequest.view` internally before finishing its response.\nFor example, the source may transfer the BYOB view to a separate worker thread, and wait for the worker to transfer it back once it has been filled.\n\n## Syntax\n\n```js\nrespondWithNewView(view)\n```\n\n### Parameters\n\n- `view`\n\n  - : A `TypedArray` or a `DataView` that the consumer of the associated readable byte stream should write to instead of `ReadableStreamBYOBRequest.view`.\n\n    This must be a view onto the same backing memory region as `ReadableStreamBYOBRequest.view` and occupy the same or less memory.\n    Specifically, it must be either the view's buffer or a transferred version, must have the same `byteOffset`, and a `byteLength` (number of bytes written) that is less than or equal to that of the view.\n\n### Return value\n\n`undefined`\n\n### Exceptions\n\n- `TypeError`\n\n  - : Thrown if the source object is not a `ReadableStreamBYOBRequest`, or there is no associated controller, or the associated internal array buffer is non-existent or detached.\n    It may also be thrown if the `view` is zero-length when there is an active reader, or non-zero when called on a closed stream.\n\n- `RangeError`\n  - : Thrown if the new `view` does not match the backing memory region of `ReadableStreamBYOBRequest.view`.\n    For example, it is not the same buffer (or a transferred version), has a different `byteOffset`, or is larger than the memory available to the backing view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/ReadableStreamBYOBRequest/prototype/view.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# view\n\nThe **`view`** getter property of the `ReadableStreamBYOBRequest` interface returns the current view.\n\n## Value\n\nA typed array representing the destination region to which the controller can write generated data.\n\n`null` if the request has already been responded to, by calling `ReadableStreamBYOBRequest.respond()` or `ReadableStreamBYOBRequest.respondWithNewView()`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/ReadableStreamDefaultController/prototype/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.close()\n\nThe **`close()`** method of the\n`ReadableStreamDefaultController` interface closes the associated stream.\n\nReaders will still be able to read any previously-enqueued chunks from the stream,\nbut once those are read, the stream will become closed. If you want to completely get\nrid of the stream and discard any enqueued chunks, you'd use\n`ReadableStream.cancel()` or\n`ReadableStreamDefaultReader.cancel()`.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/ReadableStreamDefaultController/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.desiredSize\n\nThe **`desiredSize`** read-only property of the\n`ReadableStreamDefaultController` interface returns the desired size\nrequired to fill the stream's internal queue.\n\n## Value\n\nAn integer. Note that this can be negative if the queue is over-full.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/ReadableStreamDefaultController/prototype/enqueue.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.enqueue()\n\nThe **`enqueue()`** method of the\n`ReadableStreamDefaultController` interface enqueues a given chunk in the\nassociated stream.\n\n## Syntax\n\n```js\nenqueue(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : The chunk to enqueue.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/ReadableStreamDefaultController/prototype/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.error()\n\nThe **`error()`** method of the\n`ReadableStreamDefaultController` interface causes any future interactions\nwith the associated stream to error.\n\n> **Note:** The `error()` method can be called\n> more than once, and can be called when the stream is not readable.\n\n## Syntax\n\n```js\nerror(e)\n```\n\n### Parameters\n\n- `e`\n  - : The error you want future interactions to fail with.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/ReadableStreamDefaultReader/ReadableStreamDefaultReader.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader()\n\nThe **`ReadableStreamDefaultReader()`**\nconstructor creates and returns a `ReadableStreamDefaultReader` object\ninstance.\n\n## Syntax\n\n```js\nnew ReadableStreamDefaultReader(stream)\n```\n\n### Parameters\n\n- `stream`\n  - : The `ReadableStream` to be read.\n\n### Return value\n\nAn instance of the `ReadableStreamDefaultReader` object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the supplied `stream` parameter is not a `ReadableStream`,\n    or it is already locked for reading by another reader.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/ReadableStreamDefaultReader/prototype/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n~ ReadableStreamDefaultReader.cancel()\n\nThe **`cancel()`** method of the\n`ReadableStreamDefaultReader` interface returns a `Promise` that resolves when the stream is canceled. Calling this method signals a loss of interest in the stream by a consumer.\n\nCancel is used when you've completely finished with the stream and don't need any more\ndata from it, even if there are chunks enqueued waiting to be read. That data is lost\nafter cancel is called, and the stream is not readable any more. To read those chunks\nstill and not completely get rid of the stream, you'd use\n`ReadableStreamDefaultController.close()`.\n\n> **Note:** If the reader is active, the\n> `cancel()` method behaves the same as that for the associated stream\n> (`ReadableStream.cancel()`).\n\n## Syntax\n\n```js\ncancel()\ncancel(reason)\n```\n\n### Parameters\n\n- `reason` _**optional**_\n  - : A human-readable reason for the cancellation. This value may or may not be used.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason`\nparameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamDefaultReader`, or the stream\n    has no owner.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/ReadableStreamDefaultReader/prototype/closed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader.closed\n\nThe **`closed`** read-only property of the\n`ReadableStreamDefaultReader` interface returns a\n`Promise` that fulfills when the stream closes, or rejects if the\nstream throws an error or the reader's lock is released. This property enables you\nto write code that responds to an end to the streaming process.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/ReadableStreamDefaultReader/prototype/read.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader.read()\n\nThe **`read()`** method of the `ReadableStreamDefaultReader` interface returns a `Promise` providing access to the next chunk in the stream's internal queue.\n\n## Syntax\n\n```js\nread()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise`, which fulfills/rejects with a result depending on the state of the stream.\nThe different possibilities are as follows:\n\n- If a chunk is available, the promise will be fulfilled with an object of the form `{ value: theChunk, done: false }`.\n- If the stream becomes closed, the promise will be fulfilled with an object of the form `{ value: undefined, done: true }`.\n- If the stream becomes errored, the promise will be rejected with the relevant error.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamDefaultReader`, the stream has no owner, or `ReadableStreamDefaultReader.releaseLock()` is called (when there's a pending read request).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/ReadableStreamDefaultReader/prototype/releaseLock.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader.releaseLock()\n\nThe **`releaseLock()`** method of the `ReadableStreamDefaultReader` interface releases the reader's lock on the stream.\n\nIf the associated stream is errored when the lock is released, the reader will appear errored in that same way subsequently; otherwise, the reader will appear closed.\n\nIf the reader's lock is released while it still has pending read requests then the promises returned by the reader's `ReadableStreamDefaultReader.read()` method are immediately rejected with a `TypeError`.\nUnread chunks remain in the stream's internal queue and can be read later by acquiring a new reader.\n\n## Syntax\n\n```js\nreleaseLock()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultReader`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/ReferenceError/ReferenceError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReferenceError\n\nThe **`ReferenceError`** object represents an error when a\nnon-existent variable is referenced.\n\n## Syntax\n\n```js\nnew ReferenceError()\nnew ReferenceError(message)\nnew ReferenceError(message, options)\nnew ReferenceError(message, fileName)\nnew ReferenceError(message, fileName, lineNumber)\n\nReferenceError()\nReferenceError(message)\nReferenceError(message, options)\nReferenceError(message, fileName)\nReferenceError(message, fileName, lineNumber)\n```\n\n> **Note:** `ReferenceError()` can be called with or without `new`. Both create a new `ReferenceError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Reflect/apply.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.apply()\n\nThe static **`Reflect.apply()`** method calls a target function\nwith arguments as specified.\n\n## Syntax\n\n```js\nReflect.apply(target, thisArgument, argumentsList)\n```\n\n### Parameters\n\n- `target`\n  - : The target function to call.\n- `thisArgument`\n  - : The value of `this` provided for the call to\n    `target`.\n- `argumentsList`\n  - : An array-like object specifying the arguments with which\n    `target` should be called.\n\n### Return value\n\nThe result of calling the given `target` function with the\nspecified `this` value and arguments.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if the `target` is not callable.\n\n## Description\n\nIn ES5, you typically use the [`Function.prototype.apply()`](../../globals/Function/prototype/apply.mdx) method to call a\nfunction with a given `this` value and `arguments` provided as an array\n(or an [array-like object](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects)).\n\n```js\nFunction.prototype.apply.call(Math.floor, undefined, [1.75]);\n```\n\nWith `Reflect.apply()` this becomes less verbose and easier to understand.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Reflect/construct.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.construct()\n\nThe static **`Reflect.construct()`** method acts like the\n`new` operator, but as a function. It is equivalent to\ncalling `new target(...args)`. It gives also the added option to specify a\ndifferent prototype.\n\n## Syntax\n\n```js\nReflect.construct(target, argumentsList)\nReflect.construct(target, argumentsList, newTarget)\n```\n\n### Parameters\n\n- `target`\n  - : The target function to call.\n- `argumentsList`\n  - : An array-like object specifying the arguments with which\n    `target` should be called.\n- `newTarget` _**optional**_\n  - : The constructor whose prototype should be used. See also the [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target)\n    operator. If `newTarget` is not present, its value defaults\n    to `target`.\n\n### Return value\n\nA new instance of `target` (or `newTarget`,\nif present), initialized by `target` as a constructor with the\ngiven `argumentsList`.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` or\n`newTarget` are not constructors.\n\n## Description\n\n`Reflect.construct()` allows you to invoke a constructor with a variable\nnumber of arguments. (This would also be possible by using the\n[spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) combined with the\n[`new` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new).)\n\n```js\nconst obj = new Foo(...args);\nconst obj = Reflect.construct(Foo, args);\n```\n\n### Reflect.construct() vs Object.create()\n\nPrior to the introduction of `Reflect`, objects could be constructed using\nan arbitrary combination of constructor and prototype by using\n[`Object.create()`](../../globals/Object/create.mdx).\n\n```js\nfunction OneClass() {\n  this.name = \"one\";\n}\n\nfunction OtherClass() {\n  this.name = \"other\";\n}\n\n// Calling this:\nconst obj1 = Reflect.construct(OneClass, args, OtherClass);\n\n// ...has the same result as this:\nconst obj2 = Object.create(OtherClass.prototype);\nOneClass.apply(obj2, args);\n\nconsole.log(obj1.name); // 'one'\nconsole.log(obj2.name); // 'one'\n\nconsole.log(obj1 instanceof OneClass); // false\nconsole.log(obj2 instanceof OneClass); // false\n\nconsole.log(obj1 instanceof OtherClass); // true\nconsole.log(obj2 instanceof OtherClass); // true\n\n// Another example to demonstrate below:\n\nfunction func1(a, b, c, d) {\n  console.log(arguments[3]);\n}\n\nfunction func2(d, e, f, g) {\n  console.log(arguments[3]);\n}\n\nconst obj1 = Reflect.construct(func1, [\"I\", \"Love\", \"my\", \"country\"]);\n```\n\nHowever, while the end result is the same, there is one important difference in the\nprocess. When using `Object.create()` and\n[`Function.prototype.apply()`](../../globals/Function/prototype/apply.mdx), the `new.target` operator will\npoint to `undefined` within the function used as the constructor, since the\n`new` keyword is not being used to create the object.\n\nWhen invoking `Reflect.construct()`, on the other hand, the\n`new.target` operator will point to the `newTarget`\nparameter if supplied, or `target` if not.\n\n```js\nfunction OneClass() {\n  console.log(\"OneClass\");\n  console.log(new.target);\n}\nfunction OtherClass() {\n  console.log(\"OtherClass\");\n  console.log(new.target);\n}\n\nconst obj1 = Reflect.construct(OneClass, args);\n// Logs:\n// OneClass\n// function OneClass { ... }\n\nconst obj2 = Reflect.construct(OneClass, args, OtherClass);\n// Logs:\n// OneClass\n// function OtherClass { ... }\n\nconst obj3 = Object.create(OtherClass.prototype);\nOneClass.apply(obj3, args);\n// Logs:\n// OneClass\n// undefined\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Reflect/defineProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.defineProperty()\n\nThe static **`Reflect.defineProperty()`** method is like\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx) but returns a `Boolean`.\n\n## Syntax\n\n```js\nReflect.defineProperty(target, propertyKey, attributes)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to define the property.\n- `propertyKey`\n  - : The name of the property to be defined or modified.\n- `attributes`\n  - : The attributes for the property being defined or modified.\n\n### Return value\n\nA `Boolean` indicating whether or not the property was successfully\ndefined.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.defineProperty` method allows precise addition to or\nmodification of a property on an object. For more details, see the\n[`Object.defineProperty`](../../globals/Object/defineProperty.mdx) which is similar.\n\n> **Note:** `Object.defineProperty` returns the\n> object or throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the property has not been successfully\n> defined. `Reflect.defineProperty`, however, returns a `Boolean`\n> indicating whether or not the property was successfully defined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Reflect/deleteProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.deleteProperty()\n\nThe static\n**`Reflect.deleteProperty()`**\nmethod allows to delete properties. It is like the\n[`delete` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete)\nas a function.\n\n## Syntax\n\n```js\nReflect.deleteProperty(target, propertyKey)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to delete the property.\n- `propertyKey`\n  - : The name of the property to be deleted.\n\n### Return value\n\nA `Boolean` indicating whether or not the property was successfully\ndeleted.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.deleteProperty` method allows you to delete a property on an\nobject. It returns a `Boolean` indicating whether or not the property was\nsuccessfully deleted. It is almost identical to the non-strict\n[`delete` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Reflect/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.get()\n\nThe static **`Reflect.get()`** method works like getting a\nproperty from an object (`target[propertyKey]`) as a function.\n\n## Syntax\n\n```js\nReflect.get(target, propertyKey)\nReflect.get(target, propertyKey, receiver)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to get the property.\n- `propertyKey`\n  - : The name of the property to get.\n- `receiver` _**optional**_\n  - : The value of `this` provided for the call to\n    `target` if a getter is encountered. When used with\n    `Proxy`, it can be an object that inherits from\n    `target`.\n\n### Return value\n\nThe value of the property.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.get` method allows you to get a property on an object. It is like the\n[property accessor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Property_Accessors) syntax as a function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Reflect/getOwnPropertyDescriptor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.getOwnPropertyDescriptor()\n\nThe static\n**`Reflect.getOwnPropertyDescriptor()`** method is similar to\n[`Object.getOwnPropertyDescriptor()`](../../globals/Object/getOwnPropertyDescriptor.mdx). It returns a property descriptor of\nthe given property if it exists on the object, `undefined`\notherwise.\n\n\n\n## Syntax\n\n```js\nReflect.getOwnPropertyDescriptor(target, propertyKey)\n```\n\n### Parameters\n\n- `target`\n  - : The target object in which to look for the property.\n- `propertyKey`\n  - : The name of the property to get an own property descriptor for.\n\n### Return value\n\nA property descriptor object if the property exists in `target`\nobject; otherwise, [`undefined`](../../globals/undefined.mdx).\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.getOwnPropertyDescriptor` method returns a property descriptor\nof the given property if it exists in the `target` object,\n[`undefined`](../../globals/undefined.mdx) otherwise. The only difference to\n[`Object.getOwnPropertyDescriptor()`](../../globals/Object/getOwnPropertyDescriptor.mdx) is how non-object targets are handled.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Reflect/getPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.getPrototypeOf()\n\nThe static **`Reflect.getPrototypeOf()`** method is almost the\nsame method as [`Object.getPrototypeOf()`](../../globals/Object/getPrototypeOf.mdx). It returns the prototype (i.e. the\nvalue of the internal `[[Prototype]]` property) of the specified object.\n\n\n\n## Syntax\n\n```js\nReflect.getPrototypeOf(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object of which to get the prototype.\n\n### Return value\n\nThe prototype of the given object. If there are no inherited properties,\n[`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) is returned.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.getPrototypeOf` method returns the prototype (i.e. the value of\nthe internal `[[Prototype]]` property) of the specified object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Reflect/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.has()\n\nThe static **`Reflect.has()`** method works like the [`in` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/in)\nas a function.\n\n## Syntax\n\n```js\nReflect.has(target, propertyKey)\n```\n\n### Parameters\n\n- `target`\n  - : The target object in which to look for the property.\n- `propertyKey`\n  - : The name of the property to check.\n\n### Return value\n\nA `Boolean` indicating whether or not the `target`\nhas the property.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.has` method allows you to check if a property is in an object.\nIt works like the [`in` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/in)\nas a function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Reflect/isExtensible.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.isExtensible()\n\nThe static **`Reflect.isExtensible()`** method determines if an object is extensible (whether it can have new properties added to it). It is similar to [`Object.isExtensible()`](../../globals/Object/isExtensible.mdx), but with [some differences](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/isExtensible#difference_with_object.isextensible).\n\n## Syntax\n\n```js\nReflect.isExtensible(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object which to check if it is extensible.\n\n### Return value\n\nA `Boolean` indicating whether or not the target is extensible.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Reflect/ownKeys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.ownKeys()\n\nThe static **`Reflect.ownKeys()`** method returns an array of\nthe `target` object's own property keys.\n\n## Syntax\n\n```js\nReflect.ownKeys(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object from which to get the own keys.\n\n### Return value\n\nAn `Array` of the `target` object's own property\nkeys.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.ownKeys` method returns an array of the\n`target` object's own property keys. Its return value is\nequivalent to `Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target))`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Reflect/preventExtensions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.preventExtensions()\n\nThe static **`Reflect.preventExtensions()`** method prevents new properties from ever being added to an object (i.e., prevents future extensions to the object). It is similar to [`Object.preventExtensions()`](../../globals/Object/preventExtensions.mdx), but with [some differences](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/preventExtensions#difference_with_object.preventextensions).\n\n## Syntax\n\n```js\nReflect.preventExtensions(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to prevent extensions.\n\n### Return value\n\nA `Boolean` indicating whether or not the target was successfully set to prevent extensions.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Reflect/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.set()\n\nThe static **`Reflect.set()`** method works like setting a\nproperty on an object.\n\n## Syntax\n\n```js\nReflect.set(target, propertyKey, value)\nReflect.set(target, propertyKey, value, receiver)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to set the property.\n- `propertyKey`\n  - : The name of the property to set.\n- `value`\n  - : The value to set.\n- `receiver` _**optional**_\n  - : The value of `this` provided for the call to the setter for `propertyKey` on `target`. If provided and `target` does not have a setter for `propertyKey`, the property will be set on `receiver` instead.\n\n### Return value\n\nA `Boolean` indicating whether or not setting the property was successful.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.set` method allows you to set a property on an object. It does\nproperty assignment and is like the\n[property accessor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Property_Accessors) syntax as a function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Reflect/setPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.setPrototypeOf()\n\nThe static\n**`Reflect.setPrototypeOf()`** method is the same method as\n[`Object.setPrototypeOf()`](../../globals/Object/setPrototypeOf.mdx), except for its return type. It sets the\nprototype (i.e., the internal `[[Prototype]]` property) of a specified\nobject to another object or to [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null), and returns `true` if\nthe operation was successful, or `false` otherwise.\n\n## Syntax\n\n```js\nReflect.setPrototypeOf(target, prototype)\n```\n\n### Parameters\n\n- `target`\n  - : The target object of which to set the prototype.\n- `prototype`\n  - : The object's new prototype (an object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null)).\n\n### Return value\n\nA `Boolean` indicating whether or not the prototype was successfully set.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object` or if `prototype` is neither an object nor\n[`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null).\n\n## Description\n\nThe `Reflect.setPrototypeOf` method changes the prototype (i.e. the value of\nthe internal `[[Prototype]]` property) of the specified object.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Request/Request.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request()\n\nThe **`Request()`** constructor creates a new\n`Request` object.\n\n## Syntax\n\n```js\nnew Request(input)\nnew Request(input, options)\n```\n\n### Parameters\n\n- `input`\n\n  - : Defines the resource that you wish to fetch. This can either be:\n\n    - A string containing the direct URL of the resource you want to\n      fetch.\n    - A `Request` object, effectively creating a copy.\n\n- `options` _**optional**_\n\n  - : An object containing any custom settings that you want to apply to the\n    request. The possible options are:\n\n    - `method`\n      - : The request method, e.g., `GET`, `POST`. The default is `GET`.\n    - `headers`\n      - : Any headers you want to add to your request, contained\n        within a `Headers` object or an object literal with `String` values.\n    - `body`\n      - : Any body that you want to add to your request: this can be an `ArrayBuffer`, a `TypedArray`, a `DataView`, a `URLSearchParams`, string object or literal, or a `ReadableStream` object.\n    - `backend` _**Fastly-specific**_\n    - `cacheOverride` _**Fastly-specific**_\n    - `cacheKey` _**Fastly-specific**_"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Request/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the `Request` interface\nreads the request body and returns it as a promise that resolves with an `ArrayBuffer`.\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an `ArrayBuffer`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Request/prototype/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.body\n\nThe read-only **`body`** property of the `Request`\ninterface contains a `ReadableStream` with the body contents\nthat have been added to the request. Note that a request using the\n`GET` or `HEAD` method cannot have a body\nand `null` is returned in these cases.\n\n## Value\n\nA `ReadableStream` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Request/prototype/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.bodyUsed\n\nThe read-only **`bodyUsed`** property of the\n`Request` interface is a boolean value that indicates\nwhether the request body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Request/prototype/headers.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.headers\n\nThe **`headers`** read-only property of the\n`Request` interface contains the `Headers` object associated\nwith the request.\n\n## Value\n\nA `Headers` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Request/prototype/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.json()\n\nThe **`json()`** method of the `Request` interface\nreads the request body and returns it as a promise that resolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a JavaScript object. This object could be\nanything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Request/prototype/method.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.method\n\nThe **`method`** read-only property of the\n`Request` interface contains the request's method (`GET`, `POST`, etc.)\n\n## Value\n\nA `String` indicating the method of the request.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Request/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.text()\n\nThe **`text()`** method of the `Request` interface\nreads the request body and returns it as a promise that resolves with a `String`.\nThe response is _always_ decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Promise that resolves with a `String`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Request/prototype/url.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.url\n\nThe **`url`** read-only property of the `Request` interface contains the URL of the request.\n\n## Value\n\nA string indicating the URL of the request.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Response/Response.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response()\n\nThe **`Response()`** constructor creates a new `Response` object.\n\n## Syntax\n\n```js\nnew Response()\nnew Response(body)\nnew Response(body, options)\n```\n\n### Parameters\n\n- `body` _**optional**_\n\n  - : An object defining a body for the response. This can be `null` (which is\n    the default value), or one of:\n\n    - [`ArrayBuffer`](../../globals/ArrayBuffer/ArrayBuffer.mdx)\n    - `TypedArray`\n    - [`DataView`](../../globals/DataView/DataView.mdx)\n    - [`ReadableStream`](../../globals/ReadableStream/ReadableStream.mdx)\n    - [`URLSearchParams`](../../globals/URLSearchParams/URLSearchParams.mdx)\n    - [`String`](../../globals/String/String.mdx)\n    - string literal\n\n- `options` _**optional**_\n\n  - : An options object containing any custom settings that you want to apply to the\n    response, or an empty object (which is the default value). The possible options are:\n\n    - `status`\n      - : The status code for the response, e.g., `200`.\n    - `statusText`\n      - : The status message associated with the status code,\n        e.g., `OK`.\n    - `headers`\n      - : Any headers you want to add to your response, contained\n        within a [`Headers`](../../globals/Headers/Headers.mdx) object or object literal of\n        [`String`](../../globals/String/String.mdx) key/value pairs.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Response/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface\ntakes a [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion. It returns a promise\nthat resolves with an [`ArrayBuffer`](../../../globals/ArrayBuffer/ArrayBuffer.mdx).\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an [`ArrayBuffer`](../../../globals/ArrayBuffer/ArrayBuffer.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Response/prototype/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.body\n\nThe **`body`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface is a [`ReadableStream`](../../../globals/ReadableStream/ReadableStream.mdx) of the body contents.\n\n## Value\n\nA [`ReadableStream`](../../../globals/ReadableStream/ReadableStream.mdx), or else `null` for any `Response` object [constructed](../../../globals/Response/Response.mdx) with a null `body` property, or for any actual HTTP response that has no body.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Response/prototype/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.bodyUsed\n\nThe **`bodyUsed`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface is a boolean value that indicates whether the body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Response/prototype/headers.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.headers\n\nThe **`headers`** read-only property of the\n[`Response`](../../../globals/Response/Response.mdx) interface contains the [`Headers`](../../../globals/Headers/Headers.mdx) object associated\nwith the response.\n\n## Value\n\nA [`Headers`](../../Headers/Headers.mdx) object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Response/prototype/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.json()\n\nThe **`json()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface takes\na [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion. It returns a promise which\nresolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA [`Promise`](../../../globals/Promise/Promise.mdx) that resolves to a JavaScript object. This object could be\nanything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Response/prototype/ok.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.ok\n\nThe **`ok`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains a Boolean stating whether the response was successful (status in the range 200-299) or not.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Response/prototype/status.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.status\n\nThe **`status`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains the HTTP status code of the response.\n\nFor example, `200` for success, `404` if the resource could not be found.\n\n## Value\n\nAn unsigned short number.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Response/prototype/statusText.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.statusText\n\nThe **`statusText`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains the status message corresponding to the HTTP status code in [`status`](../../../globals/Response/prototype/status.mdx).\n\nFor example, this would be `OK` for a status code `200`, `Continue` for `100`, `Not Found` for `404`.\n\n## Value\n\nA [`String`](../../../globals/String/String.mdx) containing the HTTP status message associated with the response.\nThe default value is \"\".\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Response/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.text()\n\nThe **`text()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface takes a [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion.\nIt returns a promise that resolves with a [`String`](../../../globals/String/String.mdx).\nThe response is _always_ decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Promise that resolves with a [`String`](../../../globals/String/String.mdx).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Response/prototype/url.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.url\n\nThe **`url`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains the URL of the response.\nThe value of the `url` property will be the final URL obtained after any redirects.\n\n## Value\n\nA string.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Response/redirect.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Response.redirect()\n\nThe **`redirect()`** static method of the `Response` interface returns a `Response` resulting in a redirect to the specified URL.\n\n## Syntax\n\n```js\nResponse.redirect(url)\nResponse.redirect(url, status)\n```\n\n### Parameters\n\n- `url`\n  - : The URL that the new response is to originate from.\n- `status` __optional__\n  - : An optional status code for the response (e.g., `302`.)\n\n### Return value\n\nA `Response` object.\n\n### Exceptions\n\n- `RangeError`\n  - : The specified status is not a redirect status.\n- `TypeError`\n  - : The specified URL is invalid.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/RsaHashedImportParams/RsaHashedImportParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RsaHashedImportParams\n\nThe **`RsaHashedImportParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.importKey()`, when importing any RSA-based key pair.\n\n## Instance properties\n\n- `name`\n  - : A string. This should be set to `RSASSA-PKCS1-v1_5`.\n\n- `hash`\n  - : A string representing the name of the digest function to use. This can be one of `SHA-256`, `SHA-384`, or `SHA-512`.\n    > **Warning:** Although you can technically pass `SHA-1` here, this is strongly discouraged as it is considered vulnerable.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Set/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get Set\\[Symbol.species]\n\nThe **`Set[Symbol.species]`** accessor property is an unused accessor property specifying how to copy `Set` objects.\n\n## Syntax\n\n```js\nSet[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct copied `Set` instances.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `Set` objects. Subclass constructors may override it to change the constructor assignment.\n\n> **Note:** This property is currently unused by all `Set` methods.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Set/Set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set()\n\nThe **`Set` constructor** lets you\ncreate `Set` objects that store unique values of any type, whether [primitive values](https://developer.mozilla.org/docs/Glossary/Primitive) or object\nreferences.\n\n## Syntax\n\n```js\nnew Set()\nnew Set(iterable)\n```\n\n> **Note:** `Set()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable` _**optional**_\n\n  - : If an [iterable object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) is passed, all of its elements will be added to the new\n    `Set`.\n\n    If you don't specify this parameter, or its value is `null`, the new\n    `Set` is empty.\n\n### Return value\n\nA new `Set` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Set/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype\\[Symbol.iterator]()\n\nThe **`[Symbol.iterator`** method of a `Set` object implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows sets to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the values of the set.\n\nThe initial value of this property is the same function object as the initial value of the [`Set.prototype.values`](../../../globals/Set/prototype/values.mdx) property.\n\n## Syntax\n\n```js\nset[Symbol.iterator]()\n```\n\n### Return value\n\nThe same return value as [`Set.prototype.values()`](../../../globals/Set/prototype/values.mdx): a new iterable iterator object that yields the values of the set.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Set/prototype/add.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.add()\n\nThe **`add()`** method inserts a new element with a specified value in to a `Set` object, if there isn't an element with the same value already in the `Set`.\n\n## Syntax\n\n```js\nadd(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value of the element to add to the `Set` object.\n\n### Return value\n\nThe `Set` object with added value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Set/prototype/clear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.clear()\n\nThe **`clear()`** method removes all elements from a\n`Set` object.\n\n## Syntax\n\n```js\nclear()\n```\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Set/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.delete()\n\nThe **`delete()`** method removes a specified value from a\n`Set` object, if it is in the set.\n\n## Syntax\n\n```js\ndelete(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to remove from `Set`.\n\n### Return value\n\nReturns `true` if `value` was already in\n`Set`; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Set/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.entries()\n\nThe **`entries()`** method returns a new [Iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators) object\nthat contains **an array of `[value, value]`** for each element\nin the `Set` object, in insertion order. For `Set` objects there\nis no `key` like in `Map` objects. However, to keep the API\nsimilar to the `Map` object, each _entry_ has the same value for its\n_key_ and _value_ here, so that an array `[value, value]` is\nreturned.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nA new iterator object that contains an array of `[value, value]` for each\nelement in the given `Set`, in insertion order.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Set/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.forEach()\n\nThe **`forEach()`** method executes a provided function once\nfor each value in the `Set` object, in insertion order.\n\n## Syntax\n\n```js\n// Arrow function\nforEach(() => { /* ... */ } )\nforEach((value) => { /* ... */ } )\nforEach((value, key) => { /* ... */ } )\nforEach((value, key, set) => { /* ... */ } )\n\n// Callback function\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n\n// Inline callback function\nforEach(function() { /* ... */ })\nforEach(function(value) { /* ... */ })\nforEach(function(value, key) { /* ... */ })\nforEach(function(value, key, set) { /* ... */ })\nforEach(function(value, key, set) { /* ... */ }, thisArg)\n```\n\n### Parameters\n\n- `callback`\n\n  - : Function to execute for each element, taking three arguments:\n\n    - `value`, `key`\n      - : The current element being processed in the `Set`. As there are no\n        keys in `Set`, the value is passed for both arguments.\n    - `set`\n      - : The `Set` object which `forEach()` was called upon.\n\n- `thisArg`\n  - : Value to use as `this` when executing `callbackFn`.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n## Description\n\nThe `forEach()` method executes the provided\n`callback` once for each value which actually exists in the\n`Set` object. It is not invoked for values which have been deleted. However,\nit is executed for values which are present but have the value `undefined`.\n\n`callback` is invoked with **three arguments**:\n\n- the **element value**\n- the **element key**\n- the **`Set` object being traversed**\n\nThere are no keys in `Set` objects, however, so the first two arguments are\nboth **values** contained in the [Set](../../../globals/Set/Set.mdx). This is to make it\nconsistent with other `forEach()` methods for [`Map.prototype.forEach()`](../../../globals/Map/prototype/forEach.mdx) and [`Array.prototype.forEach()`](../../../globals/Array/prototype/forEach.mdx).\n\nIf a `thisArg` parameter is provided to `forEach()`,\nit will be passed to `callback` when invoked, for use as its\n`this` value. Otherwise, the value `undefined` will be passed for\nuse as its `this` value. The `this` value ultimately observable by\n`callback` is determined according to\n[the usual rules for determining the `this` seen by a function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this).\n\nEach value is visited once, except in the case when it was deleted and re-added before\n`forEach()` has finished. `callback` is not invoked for\nvalues deleted before being visited. New values added before `forEach()` has\nfinished will be visited.\n\n`forEach()` executes the `callback` function once for\neach element in the `Set` object; it does not return a value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Set/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.has()\n\nThe **`has()`** method returns a boolean indicating whether an\nelement with the specified value exists in a `Set` object or not.\n\n## Syntax\n\n```js\nhas(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to test for presence in the `Set` object.\n\n### Return value\n\nReturns `true` if an element with the specified value exists in the `Set` object; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Set/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.keys()\n\nThe **`keys()`** method is an alias for the [`values()`](../../../globals/Set/prototype/values.mdx) method.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nA new iterator object containing the values for each element in the given\n`Set`, in insertion order.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Set/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.size\n\nThe **`size`** accessor property returns the number of (unique) elements in a [Set](../../../globals/Set/Set.mdx) object.\n\n## Description\n\nThe value of `size` is an integer representing how many entries the `Set` object has. A set accessor function for `size` is `undefined`; you cannot change this property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Set/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.values()\n\nThe **`values()`** method returns a new [Iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators) object that\ncontains the values for each element in the `Set` object in insertion order.\n\n> **Note:** The **`keys()`** method is an alias\n> for this method (for similarity with [Map](../../../globals/Map/Map.mdx) objects), hence the\n> `keys()` page redirecting here. It behaves exactly the same and returns\n> **values** of `Set` elements.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nA new iterator object containing the values for each element in the given\n`Set`, in insertion order.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/String/String.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String() constructor\n\nThe **`String`** constructor is used to create a new\n`String` object. When called instead as a function, it performs type\nconversion to a \"primitive string\" which is usually more\nuseful.\n\n## Syntax\n\n```js\nnew String(thing)\nString(thing)\n```\n\n> **Note:** `String()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\n- `thing`\n  - : Anything to be converted to a string.\n\n### Return value\n\nWhen `String` is called as a constructor (with `new`), it creates a `String` object, which is **not** a primitive.\n\nWhen `String` is called as a function, it coerces the parameter to a string primitive. `Symbol` values would be converted to `\"Symbol(description)\"`, where `description` is the [description](../../globals/Symbol/prototype/description.mdx) of the Symbol, instead of throwing.\n\n> **Warning:** You should rarely find yourself using `String` as a constructor.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/String/fromCharCode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.fromCharCode()\n\nThe static **`String.fromCharCode()`** method returns a string\ncreated from the specified sequence of UTF-16 code units.\n\n## Syntax\n\n```js\nString.fromCharCode(num1)\nString.fromCharCode(num1, num2)\nString.fromCharCode(num1, num2, /* …, */ numN)\n```\n\n### Parameters\n\n- `num1, ..., numN`\n  - : A sequence of numbers that are UTF-16 code units. The range is between\n    `0` and `65535` (`0xFFFF`). Numbers greater than\n    `0xFFFF` are truncated. No validity checks are performed.\n\n### Return value\n\nA string of length `N` consisting of the\n`N` specified UTF-16 code units.\n\n## Description\n\nThis method returns a string and not a `String` object.\n\nBecause `fromCharCode()` is a static method of `String`, you\nalways use it as `String.fromCharCode()`, rather than as a method of a\n`String` object you created.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/String/fromCodePoint.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.fromCodePoint()\n\nThe static **`String.fromCodePoint()`** method returns a string\ncreated by using the specified sequence of code points.\n\n## Syntax\n\n```js\nString.fromCodePoint(num1)\nString.fromCodePoint(num1, num2)\nString.fromCodePoint(num1, num2, /* …, */ numN)\n```\n\n### Parameters\n\n- `num1, ..., numN`\n  - : A sequence of code points.\n\n### Return value\n\nA string created by using the specified sequence of code points.\n\n### Exceptions\n\n- A `RangeError` is thrown if an invalid Unicode\n  code point is given (e.g. `\"RangeError: NaN is not a valid code point\"`).\n\n## Description\n\nThis method returns a string (and _not_ a `String` object).\n\nBecause `fromCodePoint()` is a static method of `String`, you\nmust call it as `String.fromCodePoint()`, rather than as a method of a\n`String` object you created.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/String/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype\\[Symbol.iterator]()\n\nThe **`Symbol.iterator`** method of a string implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows strings to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the Unicode code points of the string value as individual strings.\n\n## Syntax\n\n```js\nstring[Symbol.iterator]()\n```\n\n### Return value\n\nA new iterable iterator object that yields the Unicode code points of the string value as individual strings.\n\n## Description\n\nStrings are iterated by Unicode code points. This means grapheme clusters will be split, but surrogate pairs will be preserved.\n\n```js\n// \"Backhand Index Pointing Right: Dark Skin Tone\"\n[...\"👉🏿\"]; // ['👉', '🏿']\n// splits into the basic \"Backhand Index Pointing Right\" emoji and\n// the \"Dark skin tone\" emoji\n\n// \"Family: Man, Boy\"\n[...\"👨‍👦\"]; // [ '👨', '‍', '👦' ]\n// splits into the \"Man\" and \"Boy\" emoji, joined by a ZWJ\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/String/prototype/at.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.at()\n\nThe **`at()`** method takes an integer value and returns a `('String` consisting of the single UTF-16 code unit located at the specified offset. This method allows for positive and negative integers. Negative integers count back from the last string character.\n\n## Syntax\n\n```js\nat(index)\n```\n\n### Parameters\n\n- `index`\n  - : The index (position) of the string character to be returned. Supports relative indexing from the end of the string when passed a negative index; i.e. if a negative number is used, the character returned will be found by counting back from the end of the string.\n\n### Return value\n\n`('String` consisting of the single UTF-16 code unit located at the specified position. Returns [`undefined`](../../../globals/undefined.mdx) if the given index can not be found.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/String/prototype/charAt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.charAt()\n\nThe `String` object's\n**`charAt()`** method returns a new string consisting of the\nsingle UTF-16 code unit located at the specified offset into the string.\n\n## Syntax\n\n```js\ncharAt(index)\n```\n\n### Parameters\n\n- `index`\n  - : An integer between `0` and `str.length - 1`. If the\n    `index` cannot be converted to the integer or no\n    `index` is provided, the default is `0`, so the first\n    character of `str` is returned.\n\n### Return value\n\nA string representing the character (exactly one UTF-16 code unit) at the specified\n`index`. If `index` is out of range,\n`charAt()` returns an empty string.\n\n## Description\n\nCharacters in a string are indexed from left to right. The index of the first character\nis `0`, and the index of the last character—in a string called\n`stringName` is `stringName.length - 1`. If\nthe `index` you supply is out of this range, JavaScript returns an\nempty string.\n\nIf no `index` is provided to `charAt()`, the default\nis `0`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/String/prototype/charCodeAt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.charCodeAt()\n\nThe **`charCodeAt()`** method returns\nan integer between `0` and `65535` representing the UTF-16 code\nunit at the given index.\n\nThe UTF-16 code unit matches the Unicode code point for code points which can be\nrepresented in a single UTF-16 code unit. If the Unicode code point cannot be\nrepresented in a single UTF-16 code unit (because its value is greater than\n`0xFFFF`) then the code unit returned will be _the first part of a\nsurrogate pair_ for the code point. If you want the entire code point value, use\n[`codePointAt()`](../../../globals/String/prototype/codePointAt.mdx).\n\n## Syntax\n\n```js\ncharCodeAt(index)\n```\n\n### Parameters\n\n- `index`\n  - : An integer greater than or equal to `0` and less than the\n    `length` of the string. If `index` is not a number,\n    it defaults to `0`.\n\n### Return value\n\nA number representing the UTF-16 code unit value of the character at the given\n`index`. If `index` is out of range,\n`charCodeAt()` returns `NaN`.\n\n## Description\n\nUnicode code points range from `0` to `1114111`\n(`0x10FFFF`). The first 128 Unicode code points are a direct match of the\nASCII character encoding. (For information on Unicode, see [UTF-16 characters, Unicode codepoints, and grapheme clusters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters).)\n\n> **Note:** `charCodeAt()` will always return a value that is\n> less than `65536`. This is because the higher code points are represented\n> by _a pair_ of (lower valued) \"surrogate\" pseudo-characters which are used to\n> comprise the real character.\n>\n> Because of this, in order to examine (or reproduce) the full character for individual\n> character values of `65536` or greater, for such characters, it is\n> necessary to retrieve not only `charCodeAt(i)`, but also\n> `charCodeAt(i+1)` (as if manipulating a string with two\n> letters), or to use `codePointAt(i)` instead. See examples 2 and\n> 3 (below).\n\n`charCodeAt()` returns `NaN` if the given\nindex is less than `0`, or if it is equal to or greater than the\n`length` of the string.\n\nBackward compatibility: In historic versions (like JavaScript 1.2) the\n`charCodeAt()` method returns a number indicating the ISO-Latin-1 codeset\nvalue of the character at the given index. The ISO-Latin-1 codeset ranges from\n`0` to `255`. The first `0` to `127` are a\ndirect match of the ASCII character set.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/String/prototype/codePointAt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.codePointAt()\n\nThe **`codePointAt()`** method returns a non-negative integer\nthat is the Unicode code point value at the given position.\nNote that this function does not give the nth code point in a string,\nbut the code point starting at the specified string index.\n\n## Syntax\n\n```js\ncodePointAt(pos)\n```\n\n### Parameters\n\n- `pos`\n  - : Position of an element in `str` to return the code point value\n    from.\n\n### Return value\n\nA decimal number representing the code point value of the character at the given `pos`.\n\n- If there is no element at `pos`, returns [`undefined`](../../../globals/undefined.mdx).\n- If the element at `pos` is a UTF-16 high surrogate, returns the code point of the surrogate _pair_.\n- If the element at `pos` is a UTF-16 low surrogate, returns _only_ the low surrogate code point.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/String/prototype/concat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.concat()\n\nThe **`concat()`** method concatenates\nthe string arguments to the calling string and returns a new string.\n\n## Syntax\n\n```js\nconcat(str1)\nconcat(str1, str2)\nconcat(str1, str2, /* …, */ strN)\n```\n\n### Parameters\n\n- `strN`\n  - : One or more strings to concatenate to `str`.\n\n### Return value\n\nA new string containing the combined text of the strings provided.\n\n## Description\n\nThe `concat()` function concatenates the string arguments to the calling\nstring and returns a new string. Changes to the original string or the returned string\ndon't affect the other.\n\nIf the arguments are not of the type string, they are converted to string values before\nconcatenating.\n\nThe `concat()` method is very similar to the [addition/string concatenation operators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Addition) (`+`, `+=`), except that `concat()` [coerces its arguments directly to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion), while addition coerces its operands to primitives first. For more information, see the reference page for the [`+` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Addition).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/String/prototype/endsWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.endsWith()\n\nThe **`endsWith()`** method determines whether a string ends with the characters of a specified string, returning `true` or `false` as appropriate.\n\n## Syntax\n\n```js\nendsWith(searchString)\nendsWith(searchString, endPosition)\n```\n\n### Parameters\n\n- `searchString`\n  - : The characters to be searched for at the end of `str`. Cannot be a regex.\n- `endPosition` _**optional**_\n  - : The end position at which `searchString` is expected to be found (the index of `searchString`'s last character plus 1). Defaults to `str.length`.\n\n### Return value\n\n**`true`** if the given characters are found at the end of the string; otherwise, **`false`**.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If `searchString` is a regex.\n\n## Description\n\nThis method lets you determine whether or not a string ends with another string. This method is case-sensitive.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/String/prototype/includes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.includes()\n\nThe **`includes()`** method performs a case-sensitive search to determine whether one string may be found within another string, returning `true` or `false` as appropriate.\n\n## Syntax\n\n```js\nincludes(searchString)\nincludes(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n  - : A string to be searched for within `str`. Cannot be a regex.\n- `position` _**optional**_\n  - : The position within the string at which to begin searching for `searchString`. (Defaults to `0`.)\n\n### Return value\n\n**`true`** if the search string is found anywhere within the given string; otherwise, **`false`** if not.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If `searchString` is a regex.\n\n## Description\n\nThis method lets you determine whether or not a string includes another string.\n\n### Case-sensitivity\n\nThe `includes()` method is case sensitive. For example, the following expression returns `false`:\n\n```js\n\"Blue Whale\".includes(\"blue\"); // returns false\n```\n\nYou can work around this constraint by transforming both the original string and the search string to all lowercase:\n\n```js\n\"Blue Whale\".toLowerCase().includes(\"blue\"); // returns true\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/String/prototype/indexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.indexOf()\n\nThe **`indexOf()`** method, given one argument: a substring to search for, searches the entire calling string, and returns the index of the first occurrence of the specified substring. Given a second argument: a number, the method returns the first occurrence of the specified substring at an index greater than or equal to the specified number.\n\n## Syntax\n\n```js\nindexOf(searchString)\nindexOf(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n\n  - : Substring to search for, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion).\n\n    If the method is called with no arguments, `searchString` is coerced to `\"undefined\"`. Therefore,`\"undefined\".indexOf()` returns `0` — because the substring `\"undefined\"` is found at position `0` in the string `\"undefined\"`. But `\"undefine\".indexOf()`, returns `-1` — because the substring `\"undefined\"` is not found in the string `\"undefine\"`.\n\n- `position` _**optional**_\n\n  - : The method returns the index of the first occurrence of the specified substring at a position greater than or equal to `position`, which defaults to `0`. If `position` is greater than the length of the calling string, the method doesn't search the calling string at all. If `position` is less than zero, the method behaves as it would if `position` were `0`.\n\n    - `'hello world hello'.indexOf('o', -5)` returns `4` — because it causes the method to behave as if the second argument were `0`, and the first occurrence of `o` at a position greater or equal to `0` is at position `4`.\n\n    - `'hello world hello'.indexOf('world', 12)` returns `-1` — because, while it's true the substring `world` occurs at index `6`, that position is not greater than or equal to `12`.\n\n    - `'hello world hello'.indexOf('o', 99)` returns `-1` — because `99` is greater than the length of `hello world hello`, which causes the method to not search the string at all.\n\n### Return value\n\nThe index of the first occurrence of `searchString` found, or `-1` if not found.\n\n#### Return value when using an empty search string\n\nSearching for an empty search string produces strange results. With no second argument, or with a second argument whose value is less than the calling string's length, the return value is the same as the value of the second argument:\n\n```js\n\"hello world\".indexOf(\"\"); // returns 0\n\"hello world\".indexOf(\"\", 0); // returns 0\n\"hello world\".indexOf(\"\", 3); // returns 3\n\"hello world\".indexOf(\"\", 8); // returns 8\n```\n\nHowever, with a second argument whose value is greater than or equal to the string's length, the return value is the string's length:\n\n```js\n\"hello world\".indexOf(\"\", 11); // returns 11\n\"hello world\".indexOf(\"\", 13); // returns 11\n\"hello world\".indexOf(\"\", 22); // returns 11\n```\n\nIn the former instance, the method behaves as if it found an empty string just after the position specified in the second argument. In the latter instance, the method behaves as if it found an empty string at the end of the calling string.\n\n## Description\n\nStrings are zero-indexed: The index of a string's first character is `0`, and the index of a string's last character is the length of the string minus 1.\n\n```js\n\"Blue Whale\".indexOf(\"Blue\"); // returns  0\n\"Blue Whale\".indexOf(\"Blute\"); // returns -1\n\"Blue Whale\".indexOf(\"Whale\", 0); // returns  5\n\"Blue Whale\".indexOf(\"Whale\", 5); // returns  5\n\"Blue Whale\".indexOf(\"Whale\", 7); // returns -1\n\"Blue Whale\".indexOf(\"\"); // returns  0\n\"Blue Whale\".indexOf(\"\", 9); // returns  9\n\"Blue Whale\".indexOf(\"\", 10); // returns 10\n\"Blue Whale\".indexOf(\"\", 11); // returns 10\n```\n\nThe `indexOf()` method is case sensitive. For example, the following\nexpression returns `-1`:\n\n```js\n\"Blue Whale\".indexOf(\"blue\"); // returns -1\n```\n\n### Checking occurrences\n\nWhen checking if a specific substring occurs within a string, the correct way to check is test whether the return value is `-1`:\n\n```js\n\"Blue Whale\".indexOf(\"Blue\") !== -1; // true; found 'Blue' in 'Blue Whale'\n\"Blue Whale\".indexOf(\"Bloe\") !== -1; // false; no 'Bloe' in 'Blue Whale'\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/String/prototype/lastIndexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.lastIndexOf()\n\nThe **`lastIndexOf()`** method, given one argument: a substring to search for, searches the entire calling string, and returns the index of the last occurrence of the specified substring. Given a second argument: a number, the method returns the last occurrence of the specified substring at an index less than or equal to the specified number.\n\n## Syntax\n\n```js\nlastIndexOf(searchString)\nlastIndexOf(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n\n  - : Substring to search for, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion).\n\n    If the method is called with no arguments, `searchString` is coerced to `\"undefined\"`. Therefore,`\"undefined\".lastIndexOf()` returns `0` — because the substring `\"undefined\"` is found at position `0` in the string `\"undefined\"`. But `\"undefine\".lastIndexOf()`, returns `-1` — because the substring `\"undefined\"` is not found in the string `\"undefine\"`.\n\n- `position` _**optional**_\n\n  - : The method returns the index of the last occurrence of the specified substring at a position less than or equal to `position`, which defaults to `+Infinity`. If `position` is greater than the length of the calling string, the method searches the entire string. If `position` is less than `0`, the behavior is the same as for `0` — that is, the method looks for the specified substring only at index `0`.\n\n    - `'hello world hello'.lastIndexOf('world', 4)` returns `-1` — because, while the substring `world` does occurs at index `6`, that position is not less than or equal to `4`.\n\n    - `'hello world hello'.lastIndexOf('hello', 99)` returns `12` — because the last occurrence of `hello` at a position less than or equal to `99` is at position `12`.\n\n    - `'hello world hello'.lastIndexOf('hello', 0)` and `'hello world hello'.lastIndexOf('hello', -5)` both return `0` — because both cause the method to only look for `hello` at index `0`.\n\n### Return value\n\nThe index of the last occurrence of `searchString` found, or `-1` if not found.\n\n## Description\n\nStrings are zero-indexed: The index of a string's first character is `0`, and the index of a string's last character is the length of the string minus 1.\n\n```js\n\"canal\".lastIndexOf(\"a\"); // returns 3\n\"canal\".lastIndexOf(\"a\", 2); // returns 1\n\"canal\".lastIndexOf(\"a\", 0); // returns -1\n\"canal\".lastIndexOf(\"x\"); // returns -1\n\"canal\".lastIndexOf(\"c\", -5); // returns 0\n\"canal\".lastIndexOf(\"c\", 0); // returns 0\n\"canal\".lastIndexOf(\"\"); // returns 5\n\"canal\".lastIndexOf(\"\", 2); // returns 2\n```\n\n### Case-sensitivity\n\nThe `lastIndexOf()` method is case sensitive. For example, the following\nexpression returns `-1`:\n\n```js\n\"Blue Whale, Killer Whale\".lastIndexOf(\"blue\"); // returns -1\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/String/prototype/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.length\n\nThe **`length`** data property of a string contains the length of the string in UTF-16 code units.\n\n## Value\n\nA non-negative integer.\n\n## Description\n\nThis property returns the number of code units in the string. JavaScript uses [UTF-16](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters) encoding, where each Unicode character may be encoded as one or two code units, so it's possible for the value returned by `length` to not match the actual number of Unicode characters in the string. For common scripts like Latin, Cyrillic, wellknown CJK characters, etc., this should not be an issue, but if you are working with certain scripts, such as emojis, [mathematical symbols](https://en.wikipedia.org/wiki/Mathematical_Alphanumeric_Symbols), or obscure Chinese characters, you may need to account for the difference between code units and characters.\n\nThe language specification requires strings to have a maximum length of 2<sup>53</sup> - 1 elements, which is the upper limit for [precise integers](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER). However, a string with this length needs 16384TiB of storage, which cannot fit in any reasonable device's memory, so implementations tend to lower the threshold, which allows the string's length to be conveniently stored in a 32-bit integer.\n\n- In V8 (used by Chrome and Node), the maximum length is 2<sup>29</sup> - 24 (\\~1GiB). On 32-bit systems, the maximum length is 2<sup>28</sup> - 16 (\\~512MiB).\n- In Firefox, the maximum length is 2<sup>30</sup> - 2 (\\~2GiB). Before Firefox 65, the maximum length was 2<sup>28</sup> - 1 (\\~512MiB).\n- In Safari, the maximum length is 2<sup>31</sup> - 1 (\\~4GiB).\n\nFor an empty string, `length` is 0.\n\nThe static property `String.length` is unrelated to the length of strings. It's the [arity](../../../globals/Function/prototype/length.mdx) of the `String` function (loosely, the number of formal parameters it has), which is 1.\n\nSince `length` counts code units instead of characters, if you want to get the number of characters, you can first split the string with its [iterator](../../../globals/String/prototype/@@iterator.mdx), which iterates by characters:\n\n```js\nfunction getCharacterLength(str) {\n  // The string iterator that is used here iterates over characters,\n  // not mere code units\n  return [...str].length;\n}\n\nconsole.log(getCharacterLength(\"A\\uD87E\\uDC04Z\")); // 3\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/String/prototype/localeCompare.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.localeCompare()\n\nThe **`localeCompare()`** method returns a number indicating whether a reference string comes before, or after, or is the same as the given string in sort order. In implementations with [`Intl.Collator` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator) support, this method simply calls `Intl.Collator`.\n\n## Syntax\n\n```js\nlocaleCompare(compareString)\nlocaleCompare(compareString, locales)\nlocaleCompare(compareString, locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` parameters customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.Collator` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator), these parameters correspond exactly to the [`Intl.Collator()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator) constructor's parameters. Implementations without `Intl.Collator` support are asked to ignore both parameters, making the comparison result returned entirely implementation-dependent — it's only required to be _consistent_.\n\n- `compareString`\n  - : The string against which the `referenceStr` is compared.\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator#locales) parameter of the `Intl.Collator()` constructor.\n\n    In implementations without `Intl.Collator` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator#options) parameter of the `Intl.Collator()` constructor.\n\n    In implementations without `Intl.Collator` support, this parameter is ignored.\n\nSee the [`Intl.Collator()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator) for details on the `locales` and `options` parameters and how to use them.\n\n### Return value\n\nA **negative** number if `referenceStr` occurs before `compareString`; **positive** if the `referenceStr` occurs after `compareString`; `0` if they are equivalent.\n\nIn implementations with `Intl.Collator`, this is equivalent to `new Intl.Collator(locales, options).compare(referenceStr, compareString)`.\n\n## Description\n\nReturns an integer indicating whether the `referenceStr` comes\nbefore, after or is equivalent to the `compareString`.\n\n- Negative when the `referenceStr` occurs before\n  `compareString`\n- Positive when the `referenceStr` occurs after\n  `compareString`\n- Returns `0` if they are equivalent\n\n> **Warning:** Do not rely on exact return values of `-1` or `1`!\n>\n> Negative and positive integer results vary between browsers (as well as between\n> browser versions) because the W3C specification only mandates negative and positive\n> values. Some browsers may return `-2` or `2`, or even some other\n> negative or positive value.\n\n## Performance\n\nWhen comparing large numbers of strings, such as in sorting large arrays, it is better to create an [`Intl.Collator`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator) object and use the function provided by its [`compare()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/compare) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/String/prototype/match.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.match()\n\nThe **`match()`** method retrieves the result of matching a string against a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions).\n\n## Syntax\n\n```js\nmatch(regexp)\n```\n\n### Parameters\n\n- `regexp`\n\n  - : A regular expression object, or any object that has a [`Symbol.match`](../../../globals/Symbol/match.mdx) method.\n\n    If `regexp` is not a `RegExp` object and does not have a `Symbol.match` method, it is implicitly converted to a `RegExp` by using `new RegExp(regexp)`.\n\n    If you don't give any parameter and use the `match()` method directly, you will get an `Array` with an empty string: `[\"\"]`, because this is equivalent to `match(/(?:)/)`.\n\n### Return value\n\nAn `Array` whose contents depend on the presence or absence of the global (`g`) flag, or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) if no matches are found.\n\n- If the `g` flag is used, all results matching the complete regular expression will be returned, but capturing groups are not included.\n- If the `g` flag is not used, only the first complete match and its related capturing groups are returned. In this case, `match()` will return the same result as `RegExp.prototype.exec()` (an array with some extra properties).\n\n## Description\n\nThe implementation of `String.prototype.match` itself is very simple — it simply calls the `Symbol.match` method of the argument with the string as the first parameter. The actual implementation comes from [`RegExp.prototype[@@match]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@match).\n\n- If you need to know if a string matches a regular expression `RegExp`, use `RegExp.prototype.test()`.\n- If you only want the first match found, you might want to use `RegExp.prototype.exec()` instead.\n- If you want to obtain capture groups and the global flag is set, you need to use `RegExp.prototype.exec()` or [`String.prototype.matchAll()`](../../../globals/String/prototype/matchAll.mdx) instead.\n\nFor more information about the semantics of `match()` when a regex is passed, see [`RegExp.prototype[@@match]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@match).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/String/prototype/matchAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.matchAll()\n\nThe **`matchAll()`** method returns an iterator of all results matching a string against a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions), including [capturing groups](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions/Groups_and_Backreferences).\n\n## Syntax\n\n```js\nmatchAll(regexp)\n```\n\n### Parameters\n\n- `regexp`\n\n  - : A regular expression object, or any object that has a [`Symbol.matchAll`](../../../globals/Symbol/matchAll.mdx) method.\n\n    If `regexp` is not a `RegExp` object and does not have a `Symbol.matchAll` method, it is implicitly converted to a `RegExp` by using `new RegExp(regexp, 'g')`.\n\n    If `regexp` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes), then it must have the global (`g`) flag set, or a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Return value\n\nAn [iterable iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators) (which is not restartable) of matches. Each match is an array with the same shape as the return value of `RegExp.prototype.exec()`.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown if the `regexp` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes) that does not have the global (`g`) flag set (its [`flags`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/flags) property does not contain `\"g\"`).\n\n## Description\n\nThe implementation of `String.prototype.matchAll` itself is very simple — it simply calls the `Symbol.matchAll` method of the argument with the string as the first parameter (apart from the extra input validation that the regex is global). The actual implementation comes from [`RegExp.prototype[@@matchAll]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@matchAll).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/String/prototype/padEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.padEnd()\n\nThe **`padEnd()`** method pads the current string with a given\nstring (repeated, if needed) so that the resulting string reaches a given length. The\npadding is applied from the end of the current string.\n\n## Syntax\n\n```js\npadEnd(targetLength)\npadEnd(targetLength, padString)\n```\n\n### Parameters\n\n- `targetLength`\n  - : The length of the resulting string once the current `str` has\n    been padded. If the value is lower than `str.length`, the\n    current string will be returned as-is.\n- `padString` _**optional**_\n  - : The string to pad the current `str` with. If\n    `padString` is too long to stay within\n    `targetLength`, it will be truncated: for left-to-right\n    languages the left-most part and for right-to-left languages the right-most will be\n    applied. The default value for this parameter is \" \"\n    (`U+0020`).\n\n### Return value\n\nA `String` of the specified `targetLength` with the\n`padString` applied at the end of the current\n`str`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/String/prototype/padStart.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.padStart()\n\nThe **`padStart()`** method pads the\ncurrent string with another string (multiple times, if needed) until the resulting\nstring reaches the given length. The padding is applied from the start of the\ncurrent string.\n\n## Syntax\n\n```js\npadStart(targetLength)\npadStart(targetLength, padString)\n```\n\n### Parameters\n\n- `targetLength`\n  - : The length of the resulting string once the current `str` has\n    been padded. If the value is less than `str.length`, then\n    `str` is returned as-is.\n- `padString` _**optional**_\n  - : The string to pad the current `str` with. If\n    `padString` is too long to stay within the\n    `targetLength`, it will be truncated from the end.\n    The default value is the unicode \"space\" character (U+0020).\n\n### Return value\n\nA `String` of the specified `targetLength` with\n`padString` applied from the start.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/String/prototype/repeat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.repeat()\n\nThe **`repeat()`** method constructs and returns a new string\nwhich contains the specified number of copies of the string on which it was called,\nconcatenated together.\n\n## Syntax\n\n```js\nrepeat(count)\n```\n\n### Parameters\n\n- `count`\n  - : An integer between `0` and\n    [`+Infinity`](../../../globals/Number/POSITIVE_INFINITY.mdx), indicating the\n    number of times to repeat the string.\n\n### Return value\n\nA new string containing the specified number of copies of the given string.\n\n### Exceptions\n\n- Throws a `RangeError` if repeat count is negative.\n- Throws a `RangeError` if repeat count is infinity or overflows maximum string size.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/String/prototype/replace.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.replace()\n\nThe **`replace()`** method returns a new string with one, some, or all matches of a `pattern` replaced by a `replacement`. The `pattern` can be a string or a `RegExp`, and the `replacement` can be a string or a function called for each match. If `pattern` is a string, only the first occurrence will be replaced. The original string is left unchanged.\n\n## Syntax\n\n```js\nreplace(pattern, replacement)\n```\n\n### Parameters\n\n- `pattern`\n  - : Can be a string or an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method — the typical example being a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp). Any value that doesn't have the `Symbol.replace` method will be coerced to a string.\n- `replacement`\n  - : Can be a string or a function.\n    - If it's a string, it will replace the substring matched by `pattern`. A number of special replacement patterns are supported; see the [Specifying a string as the replacement](#specifying-a-string-as-the-replacement) section below.\n    - If it's a function, it will be invoked for every match and its return value is used as the replacement text. The arguments supplied to this function are described in the [Specifying a function as the replacement](#specifying-a-function-as-the-replacement) section below.\n\n### Return value\n\nA new string, with one, some, or all matches of the pattern replaced by the specified replacement.\n\n## Description\n\nThis method does not mutate the string value it's called on. It returns a new string.\n\nA string pattern will only be replaced once. To perform a global search and replace, use a regular expression with the `g` flag, or use [`replaceAll()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/replaceAll) instead.\n\nIf `pattern` is an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method (including `RegExp` objects), that method is called with the target string and `replacement` as arguments. Its return value becomes the return value of `replace()`. In this case the behavior of `replace()` is entirely encoded by the `@@replace` method — for example, any mention of \"capturing groups\" in the description below is actually functionality provided by [`RegExp.prototype[@@replace]`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@replace).\n\nIf the `pattern` is an empty string, the replacement is prepended to the start of the string.\n\n```js\n\"xxx\".replace(\"\", \"_\"); // \"_xxx\"\n```\n\nA regexp with the `g` flag is the only case where `replace()` replaces more than once. For more information about how regex properties (especially the [sticky](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky) flag) interact with `replace()`, see [`RegExp.prototype[@@replace]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@replace).\n\n### Specifying a string as the replacement\n\nThe replacement string can include the following special replacement patterns:\n\n| Pattern   | Inserts                                                                                        |\n| --------- | ---------------------------------------------------------------------------------------------- |\n| `$$`      | Inserts a `\"$\"`.                                                                               |\n| `$&`      | Inserts the matched substring.                                                                 |\n| `` $` ``  | Inserts the portion of the string that precedes the matched substring.                         |\n| `$'`      | Inserts the portion of the string that follows the matched substring.                          |\n| `$n`      | Inserts the `n`th (`1`-indexed) capturing group where `n` is a positive integer less than 100. |\n| `$<Name>` | Inserts the named capturing group where `Name` is the group name.                              |\n\n`$n` and `$<Name>` are only available if the `pattern` argument is a `RegExp` object. If the `pattern` is a string, or if the corresponding capturing group isn't present in the regex, then the pattern will be replaced as a literal. If the group is present but isn't matched (because it's part of a disjunction), it will be replaced with an empty string.\n\n```js\n\"foo\".replace(/(f)/, \"$2\");\n// \"$2oo\"; the regex doesn't have the second group\n\n\"foo\".replace(\"f\", \"$1\");\n// \"$1oo\"; the pattern is a string, so it doesn't have any groups\n\n\"foo\".replace(/(f)|(g)/, \"$2\");\n// \"oo\"; the second group exists but isn't matched\n```\n\n### Specifying a function as the replacement\n\nYou can specify a function as the second parameter. In this case, the function will be invoked after the match has been performed. The function's result (return value) will be used as the replacement string.\n\n> **Note:** The above-mentioned special replacement patterns do _not_ apply for strings returned from the replacer function.\n\nThe function has the following signature:\n\n```js\nfunction replacer(match, p1, p2, /* …, */ pN, offset, string, groups) {\n  return replacement;\n}\n```\n\nThe arguments to the function are as follows:\n\n- `match`\n  - : The matched substring. (Corresponds to `$&` above.)\n- `p1, p2, …, pN`\n  - : The `n`th string found by a capture group (including named capturing groups), provided the first argument to `replace()` is a `RegExp` object. (Corresponds to `$1`, `$2`, etc. above.) For example, if the `pattern` is `/(\\a+)(\\b+)/`, then `p1` is the match for `\\a+`, and `p2` is the match for `\\b+`. If the group is part of a disjunction (e.g. `\"abc\".replace(/(a)|(b)/, replacer)`), the unmatched alternative will be `undefined`.\n- `offset`\n  - : The offset of the matched substring within the whole string being examined. For example, if the whole string was `'abcd'`, and the matched substring was `'bc'`, then this argument will be `1`.\n- `string`\n  - : The whole string being examined.\n- `groups`\n  - : An object whose keys are the used group names, and whose values are the matched portions (`undefined` if not matched). Only present if the `pattern` contains at least one named capturing group.\n\nThe exact number of arguments depends on whether the first argument is a `RegExp` object — and, if so, how many capture groups it has.\n\nThe following example will set `newString` to `'abc - 12345 - #$*%'`:\n\n```js\nfunction replacer(match, p1, p2, p3, offset, string) {\n  // p1 is non-digits, p2 digits, and p3 non-alphanumerics\n  return [p1, p2, p3].join(\" - \");\n}\nconst newString = \"abc12345#$*%\".replace(/([^\\d]*)(\\d*)([^\\w]*)/, replacer);\nconsole.log(newString); // abc - 12345 - #$*%\n```\n\nThe function will be invoked multiple times for each full match to be replaced if the regular expression in the first parameter is global.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/String/prototype/replaceAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.replaceAll()\n\nThe **`replaceAll()`** method returns a new string with all matches of a `pattern` replaced by a `replacement`. The `pattern` can be a string or a `RegExp`, and the `replacement` can be a string or a function to be called for each match. The original string is left unchanged.\n\n## Syntax\n\n```js\nreplaceAll(pattern, replacement)\n```\n\n### Parameters\n\n- `pattern`\n\n  - : Can be a string or an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method — the typical example being a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp). Any value that doesn't have the `Symbol.replace` method will be coerced to a string.\n\n    If `pattern` is a regex, then it must have the global (`g`) flag set, or a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n- `replacement`\n  - : Can be a string or a function. The replacement has the same semantics as that of [`String.prototype.replace()`](../../../globals/String/prototype/replace.mdx).\n\n### Return value\n\nA new string, with all matches of a pattern replaced by a replacement.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown if the `pattern` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes) that does not have the global (`g`) flag set (its [`flags`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/flags) property does not contain `\"g\"`).\n\n## Description\n\nThis method does not mutate the string value it's called on. It returns a new string.\n\nUnlike [`String.prototype.replace()`](../../../globals/String/prototype/replace.mdx), this method would replace all occurrences of a string, not just the first one. This is especially useful if the string is not statically known, as calling the [`RegExp()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/RegExp) constructor without escaping special characters may unintentionally change its semantics.\n\n```js\nfunction unsafeRedactName(text, name) {\n  return text.replace(new RegExp(name, \"g\"), \"[REDACTED]\");\n}\nfunction safeRedactName(text, name) {\n  return text.replaceAll(name, \"[REDACTED]\");\n}\n\nconst report =\n  \"A hacker called ha.*er used special characters in their name to breach the system.\";\n\nconsole.log(unsafeRedactName(report, \"ha.*er\")); // \"A [REDACTED]s in their name to breach the system.\"\nconsole.log(safeRedactName(report, \"ha.*er\")); // \"A hacker called [REDACTED] used special characters in their name to breach the system.\"\n```\n\nIf `pattern` is an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method (including `RegExp` objects), that method is called with the target string and `replacement` as arguments. Its return value becomes the return value of `replaceAll()`. In this case the behavior of `replaceAll()` is entirely encoded by the `Symbol.replace` method, and therefore will have the same result as `replace()` (apart from the extra input validation that the regex is global).\n\nIf the `pattern` is an empty string, the replacement will be inserted in between every UTF-16 code unit, similar to [`String.prototype.split()`](../../../globals/String/prototype/split.mdx) behavior.\n\n```js\n\"xxx\".replaceAll(\"\", \"_\"); // \"_x_x_x_\"\n```\n\nFor more information about how regex properties (especially the [sticky](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky) flag) interact with `replaceAll()`, see [`RegExp.prototype[@@replace]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@replace).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/String/prototype/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.search()\n\nThe **`search()`** method executes a search for a match between a regular expression and this `String` object.\n\n## Syntax\n\n```js\nsearch(regexp)\n```\n\n### Parameters\n\n- `regexp`\n\n  - : A regular expression object, or any object that has a [`Symbol.search`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/search) method.\n\n    If `regexp` is not a `RegExp` object and does not have a `Symbol.search` method, it is implicitly converted to a `RegExp` by using `new RegExp(regexp)`.\n\n### Return value\n\nThe index of the first match between the regular expression and the given string, or `-1` if no match was found.\n\n## Description\n\nThe implementation of `String.prototype.search()` itself is very simple — it simply calls the `Symbol.search` method of the argument with the string as the first parameter. The actual implementation comes from [`RegExp.prototype[@@search]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@search).\n\nThe `g` flag of `regexp` has no effect on the `search()` result, and the search always happens as if the regex's `lastIndex` is 0. For more information on the behavior of `search()`, see [`RegExp.prototype[@@search]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@search).\n\nWhen you want to know whether a pattern is found, and _also_ know its index within a string, use `search()`.\n\n- If you only want to know if it exists, use the `RegExp.prototype.test()` method, which returns a boolean.\n- If you need the content of the matched text, use `String.prototype.match()` or `RegExp.prototype.exec()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/String/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.slice()\n\nThe **`slice()`** method extracts a section of a string and\nreturns it as a new string, without modifying the original string.\n\n## Syntax\n\n```js\nslice(indexStart)\nslice(indexStart, indexEnd)\n```\n\n### Parameters\n\n- `indexStart`\n  - : The index of the first character to include in the returned substring.\n- `indexEnd` _**optional**_\n  - : The index of the first character to exclude from the returned substring.\n\n### Return value\n\nA new string containing the extracted section of the string.\n\n## Description\n\n`slice()` extracts the text from one string and returns a new string. Changes to the text in one string do not affect the other string.\n\n`slice()` extracts up to but not including `indexEnd`. For example, `str.slice(1, 4)` extracts the second character through the fourth character (characters indexed `1`, `2`, and `3`).\n\n- If `indexStart >= str.length`, an empty string is returned.\n- If `indexStart < 0`, the index is counted from the end of the string. More formally, in this case, the substring starts at `max(indexStart + str.length, 0)`.\n- If `indexStart` is omitted, undefined, or cannot be converted to a number (using [`Number()`](../../../globals/Number/Number.mdx)), it's treated as `0`.\n- If `indexEnd` is omitted, undefined, or cannot be converted to a number (using [`Number()`](../../../globals/Number/Number.mdx)), or if `indexEnd >= str.length`, `slice()` extracts to the end of the string.\n- If `indexEnd < 0`, the index is counted from the end of the string. More formally, in this case, the substring ends at `max(indexEnd + str.length, 0)`.\n- If `indexEnd <= indexStart` after normalizing negative values (i.e. `indexEnd` represents a character that's before `indexStart`), an empty string is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/String/prototype/split.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.split()\n\nThe **`split()`** method takes a pattern and divides a `String` into an ordered list of substrings by searching for the pattern, puts these substrings into an array, and returns the array.\n\n## Syntax\n\n```js\nsplit()\nsplit(separator)\nsplit(separator, limit)\n```\n\n### Parameters\n\n- `separator` _**optional**_\n  - : The pattern describing where each split should occur. Can be a string or an object with a [`Symbol.split`](../../../globals/Symbol/split.mdx) method — the typical example being a regular expression. If undefined, the original target string is returned wrapped in an array.\n- `limit` _**optional**_\n  - : A non-negative integer specifying a limit on the number of substrings to be included in the array. If provided, splits the string at each occurrence of the specified `separator`, but stops when `limit` entries have been placed in the array. Any leftover text is not included in the array at all.\n    - The array may contain fewer entries than `limit` if the end of the string is reached before the limit is reached.\n    - If `limit` is `0`, `[]` is returned.\n\n### Return value\n\nAn `Array` of strings, split at each point where the `separator` occurs in the given string.\n\n## Description\n\nIf `separator` is a non-empty string, the target string is split by all matches of the `separator` without including `separator` in the results. For example, a string containing tab separated values (TSV) could be parsed by passing a tab character as the separator, like `myString.split(\"\\t\")`. If `separator` contains multiple characters, that entire character sequence must be found in order to split. If `separator` appears at the beginning (or end) of the string, it still has the effect of splitting, resulting in an empty (i.e. zero length) string appearing at the first (or last) position of the returned array. If `separator` does not occur in `str`, the returned array contains one element consisting of the entire string.\n\nIf `separator` is an empty string (`\"\"`), `str` is converted to an array of each of its UTF-16 \"characters\", without empty strings on either ends of the resulting string.\n\n> **Note:** `\"\".split(\"\")` is therefore the only way to produce an empty array when a string is passed as `separator`.\n\n> **Warning:** When the empty string (`\"\"`) is used as a separator, the string is **not** split by _user-perceived characters_ ([grapheme clusters](https://unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries)) or unicode characters (codepoints), but by UTF-16 codeunits. This destroys [surrogate pairs](https://unicode.org/faq/utf_bom.html#utf16-2). See [\"How do you get a string to a character array in JavaScript?\" on StackOverflow](https://stackoverflow.com/questions/4547609/how-to-get-character-array-from-a-string/34717402#34717402).\n\nIf `separator` is a regexp that matches empty strings, whether the match is split by UTF-16 code units or Unicode codepoints depends on if the [`u`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/unicode) flag is set.\n\n```js\n\"😄😄\".split(/(?:)/); // [ \"\\ud83d\", \"\\ude04\", \"\\ud83d\", \"\\ude04\" ]\n\"😄😄\".split(/(?:)/u); // [ \"😄\", \"😄\" ]\n```\n\nIf `separator` is a regular expression with capturing groups, then each time `separator` matches, the captured groups (including any `undefined` results) are spliced into the output array. This behavior is specified by the regexp's [`Symbol.split`](../../../globals/Symbol/split.mdx) method.\n\nIf `separator` is an object with a [`Symbol.split`](../../../globals/Symbol/split.mdx) method, that method is called with the target string and `limit` as arguments, and `this` set to the object. Its return value becomes the return value of `split`.\n\nAny other value will be coerced to a string before being used as separator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/String/prototype/startsWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.startsWith()\n\nThe **`startsWith()`** method determines whether a string begins with the characters of a specified string, returning `true` or `false` as appropriate.\n\n## Syntax\n\n```js\nstartsWith(searchString)\nstartsWith(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n  - : The characters to be searched for at the start of this string. Cannot be a regex.\n- `position` _**optional**_\n  - : The start position at which `searchString` is expected to be found (the index of `searchString`'s first character). Defaults to `0`.\n\n### Return value\n\n**`true`** if the given characters are found at the beginning of the string; otherwise, **`false`**.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If `searchString` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes).\n\n## Description\n\nThis method lets you determine whether or not a string begins with another string. This method is case-sensitive.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/String/prototype/substr.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.substr()\n\nThe **`substr()`** method returns a portion of the string, starting at the specified index and extending for a given number of characters afterwards.\n\n> **Note:** `substr()` is not part of the main ECMAScript specification — it's defined in [Annex B: Additional ECMAScript Features for Web Browsers](https://tc39.es/ecma262/#sec-additional-ecmascript-features-for-web-browsers), which is normative optional for non-browser runtimes. Therefore, people are advised to use the standard [`String.prototype.substring()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/substring) and [`String.prototype.slice()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/slice) methods instead to make their code maximally cross-platform friendly. The [`String.prototype.substring()` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/substring#the_difference_between_substring_and_substr) has some comparisons between the three methods.\n\n\n\n## Syntax\n\n```js\nsubstr(start)\nsubstr(start, length)\n```\n\n### Parameters\n\n- `start`\n  - : The index of the first character to include in the returned substring.\n- `length` _**optional**_\n  - : The number of characters to extract.\n\n### Return value\n\nA new string containing the specified part of the given string.\n\n## Description\n\nA string's `substr()` method extracts `length` characters from the string, counting from the `start` index.\n\n- If `start >= str.length`, an empty string is returned.\n- If `start < 0`, the index starts counting from the end of the string. More formally, in this case the substring starts at `max(start + str.length, 0)`.\n- If `start` is omitted or [`undefined`](../../../globals/undefined.mdx), it's treated as `0`.\n- If `length` is omitted or [`undefined`](../../../globals/undefined.mdx), or if `start + length >= str.length`, `substr()` extracts characters to the end of the string.\n- If `length < 0`, an empty string is returned.\n- For both `start` and `length`, [`NaN`](../../../globals/NaN.mdx) is treated as `0`.\n\nAlthough you are encouraged to avoid using `substr()`, there is no trivial way to migrate `substr()` to either `slice()` or `substring()` in legacy code without essentially writing a polyfill for `substr()`. For example, `str.substr(a, l)`, `str.slice(a, a + l)`, and `str.substring(a, a + l)` all have different results when `str = \"01234\", a = 1, l = -2` — `substr()` returns an empty string, `slice()` returns `\"123\"`, while `substring()` returns `\"0\"`. The actual refactoring path depends on the knowledge of the range of `a` and `l`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/String/prototype/substring.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.substring()\n\nThe **`substring()`** method returns the part of the `string` from the start index up to and excluding the end index, or to the end of the string if no end index is supplied.\n\n## Syntax\n\n```js\nsubstring(indexStart)\nsubstring(indexStart, indexEnd)\n```\n\n### Parameters\n\n- `indexStart`\n  - : The index of the first character to include in the returned substring.\n- `indexEnd` _**optional**_\n  - : The index of the first character to exclude from the returned substring.\n\n### Return value\n\nA new string containing the specified part of the given string.\n\n## Description\n\n`substring()` extracts characters from `indexStart` up to _but not including_ `indexEnd`. In particular:\n\n- If `indexEnd` is omitted, `substring()` extracts characters to the end of the string.\n- If `indexStart` is equal to `indexEnd`, `substring()` returns an empty string.\n- If `indexStart` is greater than `indexEnd`, then the effect of `substring()` is as if the two arguments were swapped; see example below.\n\nAny argument value that is less than `0` or greater than `str.length` is treated as if it were `0` and `str.length`, respectively.\n\nAny argument value that is [`NaN`](../../../globals/NaN.mdx) is treated as if it were `0`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/String/prototype/toLocaleLowerCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toLocaleLowerCase()\n\nThe **`toLocaleLowerCase()`** method returns the calling string\nvalue converted to lower case, according to any locale-specific case mappings.\n\n## Syntax\n\n```js\ntoLocaleLowerCase()\ntoLocaleLowerCase(locales)\n```\n\n### Parameters\n\n- `locales` _**optional**_\n  - : A string with a BCP 47 language tag, or an array of such strings. Indicates the locale to be used to convert to lower case according to any locale-specific case mappings. For the general form and interpretation of the `locales` argument, see [Locale identification and negotiation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation).\n\n### Return value\n\nA new string representing the calling string converted to lower case, according to any\nlocale-specific case mappings.\n\n### Exceptions\n\n- A [`RangeError`](../../../globals/RangeError/RangeError.mdx) (\"invalid language tag: xx_yy\") is thrown if a\n  `locale` argument isn't a valid language tag.\n- A [`TypeError`](../../../globals/TypeError/TypeError.mdx) (\"invalid element in locales argument\") is thrown if an\n  array element isn't of type string.\n\n## Description\n\nThe `toLocaleLowerCase()` method returns the value of the string converted\nto lower case according to any locale-specific case mappings.\n`toLocaleLowerCase()` does not affect the value of the string itself. In most\ncases, this will produce the same result as [`String.prototype.toLowerCase()`](../../../globals/String/prototype/toLowerCase.mdx), but for some locales, such as Turkish, whose case mappings do not\nfollow the default case mappings in Unicode, there may be a different result.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/String/prototype/toLocaleUpperCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toLocaleUpperCase()\n\nThe **`toLocaleUpperCase()`** method returns the calling string\nvalue converted to upper case, according to any locale-specific case mappings.\n\n## Syntax\n\n```js\ntoLocaleUpperCase()\ntoLocaleUpperCase(locales)\n```\n\n### Parameters\n\n- `locales` _**optional**_\n  - : A string with a BCP 47 language tag, or an array of such strings. Indicates the locale to be used to convert to upper case according to any locale-specific case mappings. For the general form and interpretation of the `locales` argument, see [Locale identification and negotiation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation).\n\n### Return value\n\nA new string representing the calling string converted to upper case, according to any\nlocale-specific case mappings.\n\n### Exceptions\n\n- A [`RangeError`](../../../globals/RangeError/RangeError.mdx) (\"invalid language tag: xx_yy\") is thrown if a\n  `locale` argument isn't a valid language tag.\n- A [`TypeError`](../../../globals/TypeError/TypeError.mdx) (\"invalid element in locales argument\") is thrown if an\n  array element isn't of type string.\n\n## Description\n\nThe `toLocaleUpperCase()` method returns the value of the string converted\nto upper case according to any locale-specific case mappings.\n`toLocaleUpperCase()` does not affect the value of the string itself. In most\ncases, this will produce the same result as [`String.prototype.toUpperCase()`](../../../globals/String/prototype/toUpperCase.mdx), but for some locales, such as Turkish, whose case mappings do not\nfollow the default case mappings in Unicode, there may be a different result.\n\nAlso notice that conversion is not necessarily a 1:1 character mapping, as some\ncharacters might result in two (or even more) characters when transformed to upper-case.\nTherefore the length of the result string can differ from the input length. This also\nimplies that the conversion is not stable, so i.E. the following can return\n`false`:\n`x.toLocaleLowerCase() === x.toLocaleUpperCase().toLocaleLowerCase()`\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/String/prototype/toLowerCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toLowerCase()\n\nThe **`toLowerCase()`** method returns the calling string value\nconverted to lower case.\n\n## Syntax\n\n```js\ntoLowerCase()\n```\n\n### Return value\n\nA new string representing the calling string converted to lower case.\n\n## Description\n\nThe `toLowerCase()` method returns the value of the string converted to\nlower case. `toLowerCase()` does not affect the value of the string\n`str` itself.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/String/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified string value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified string value.\n\n## Description\n\nThe `String` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For `String` values, the `toString` method returns the string itself (if it's a primitive) or the string that the `String` object wraps. It has the exact same implementation as [`String.prototype.valueOf()`](../../../globals/String/prototype/valueOf.mdx).\n\nThe `toString()` method requires its `this` value to be a `String` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to string values.\n\nBecause `String` doesn't have a [`[Symbol.toPrimitive]()`](../../../globals/Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `String` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, String _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — since they are already strings, no conversion is performed.\n\n```js\nString.prototype.toString = () => \"Overridden\";\nconsole.log(`${\"foo\"}`); // \"foo\"\nconsole.log(`${new String(\"foo\")}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/String/prototype/toUpperCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toUpperCase()\n\nThe **`toUpperCase()`** method returns the calling string value\nconverted to uppercase (the value will be converted to a string if it isn't one).\n\n## Syntax\n\n```js\ntoUpperCase()\n```\n\n### Return value\n\nA new string representing the calling string converted to upper case.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : When called on [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../../globals/undefined.mdx), for example,\n    `String.prototype.toUpperCase.call(undefined)`.\n\n## Description\n\nThe `toUpperCase()` method returns the value of the string converted to\nuppercase. This method does not affect the value of the string itself since JavaScript\nstrings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/String/prototype/trim.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.trim()\n\nThe **`trim()`** method removes whitespace from both ends of a string and returns a new string, without modifying the original string.\n\nTo return a new string with whitespace trimmed from just one end, use [`String.prototype.trimStart()`](../../../globals/String/prototype/trimStart.mdx) or [`String.prototype.trimEnd()`](../../../globals/String/prototype/trimEnd.mdx).\n\n## Syntax\n\n```js\ntrim()\n```\n\n### Return value\n\nA new string representing `str` stripped of whitespace from both its beginning and end. Whitespace is defined as [white space](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#white_space) characters plus [line terminators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#line_terminators).\n\nIf neither the beginning or end of `str` has any whitespace, a new string is still returned (essentially a copy of `str`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/String/prototype/trimEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.trimEnd()\n\nThe **`trimEnd()`** method removes whitespace from the end of a string and returns a new string, without modifying the original string. `trimRight()` is an alias of this method.\n\n## Syntax\n\n```js\ntrimEnd()\n\ntrimRight()\n```\n\n### Return value\n\nA new string representing `str` stripped of whitespace from its end (right side). Whitespace is defined as [white space](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#white_space) characters plus [line terminators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#line_terminators).\n\nIf the end of `str` has no whitespace, a new string is still returned (essentially a copy of `str`).\n\n### Aliasing\n\nAfter [`String.prototype.trim()`](../../../globals/String/prototype/trim.mdx) was standardized, engines also implemented the non-standard method `trimRight`. However, for consistency with [`String.prototype.pedEnd()`](../../../globals/String/prototype/trim.mdx), when the method got standardized, its name was chosen as `trimEnd`. For web compatibility reasons, `trimRight` remains as an alias to `trimEnd`, and they refer to the exact same function object. In some engines this means:\n\n```js\nString.prototype.trimRight.name === \"trimEnd\";\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/String/prototype/trimStart.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.trimStart()\n\nThe **`trimStart()`** method removes whitespace from the beginning of a string and returns a new string, without modifying the original string. `trimLeft()` is an alias of this method.\n\n## Syntax\n\n```js\ntrimStart()\n\ntrimLeft()\n```\n\n### Return value\n\nA new string representing `str` stripped of whitespace from its beginning (left side). Whitespace is defined as [white space](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#white_space) characters plus [line terminators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#line_terminators).\n\nIf the beginning of `str` has no whitespace, a new string is still returned (essentially a copy of `str`).\n\n### Aliasing\n\nAfter [`String.prototype.trim()`](../../../globals/String/prototype/trim.mdx) was standardized, engines also implemented the non-standard method `trimLeft`. However, for consistency with [`String.prototype.padEnd()`](../../../globals/String/prototype/padEnd.mdx), when the method got standardized, its name was chosen as `trimStart`. For web compatibility reasons, `trimLeft` remains as an alias to `trimStart`, and they refer to the exact same function object. In some engines this means:\n\n```js\nString.prototype.trimLeft.name === \"trimStart\";\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/String/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a\n`String` object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nA string representing the primitive value of a given `String` object.\n\n## Description\n\nThe `valueOf()` method of `String` returns the primitive value\nof a `String` object as a string data type. This value is equivalent to\n[`String.prototype.toString()`](../../../globals/String/prototype/toString.mdx).\n\nThis method is usually called internally by JavaScript and not explicitly in code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/String/raw.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.raw()\n\nThe static **`String.raw()`** method is a tag function of [template literals](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). This is similar to the `r` prefix in Python, or the `@` prefix in C# for string literals. It's used to get the raw string form of template literals — that is, substitutions (e.g. `${foo}`) are processed, but escape sequences (e.g. `\\n`) are not.\n\n## Syntax\n\n```js\nString.raw(strings, ...substitutions)\n\nString.raw`templateString`\n```\n\n### Parameters\n\n- `strings`\n  - : Well-formed template literal array object, like `{ raw: ['foo', 'bar', 'baz'] }`. Should be an object with a `raw` property whose value is an array-like object of strings.\n- `...substitutions`\n  - : Contains substitution values.\n- `templateString`\n  - : A [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals), optionally with substitutions (`${...}`).\n\n### Return value\n\nThe raw string form of a given template literal.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if the first argument doesn't have a `raw` property, or the `raw` property is `undefined` or `null`.\n\n## Description\n\nIn most cases, `String.raw()` is used with template literals. The first syntax mentioned above is only rarely used, because the JavaScript engine will call this with proper arguments for you, (just like with other [tag functions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals#tagged_templates)).\n\n`String.raw()` is the only built-in template literal tag. It has close semantics to an untagged literal since it concatenates all arguments and returns a string. You can even re-implement it with normal JavaScript code.\n\n> **Warning:** You should not use `String.raw` directly as an \"identity\" tag. See [Building an identity tag](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/raw#building_an_identity_tag) for how to implement this.\n\nIf `String.raw()` is called with an object whose `raw` property doesn't have a `length` property or a non-positive `length`, it returns an empty string `\"\"`. If `substitutions.length < strings.raw.length - 1` (i.e. there are not enough substitutions to fill the placeholders — which can't happen in a well-formed tagged template literal), the rest of the placeholders are filled with empty strings.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/SubtleCrypto/SubtleCrypto.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SubtleCrypto\n\nThe **`SubtleCrypto`** interface provides a number of low-level cryptographic functions. Access to the features of `SubtleCrypto` is obtained through the [`crypto.subtle`](../crypto/subtle.mdx) property.\n\n> **Warning:** This API provides a number of low-level cryptographic primitives. It's very easy to misuse them, and the pitfalls involved can be very subtle.\n>\n> Even assuming you use the basic cryptographic functions correctly, secure key management and overall security system design are extremely hard to get right, and are generally the domain of specialist security experts.\n>\n> Errors in security system design and implementation can make the security of the system completely ineffective.\n>\n> Please learn and experiment, but don't guarantee or imply the security of your work before an individual knowledgeable in this subject matter thoroughly reviews it. The [Crypto 101 Course](https://www.crypto101.io/) can be a great place to start learning about the design and implementation of secure systems.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/SubtleCrypto/prototype/digest.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# digest()\n\nThe **`digest()`** method of the [`SubtleCrypto`](../SubtleCrypto.mdx)\ninterface generates a digest of the given data. A digest is a short\nfixed-length value derived from some variable-length input. Cryptographic digests should\nexhibit collision-resistance, meaning that it's hard to come up with two different\ninputs that have the same digest value.\n\nIt takes as its arguments an identifier for the digest algorithm to use and the data to\ndigest. It returns a [`Promise`](../../Promise/Promise.mdx) which will be fulfilled with the digest.\n\n## Syntax\n\n```js\ndigest(algorithm, data)\n```\n\n### Parameters\n\n- `algorithm`\n  - : This may be a string or an object with a single property `name` that is a string. The string names the hash function to use. Supported values are:\n    - `\"MD5\"` (but don't use this in cryptographic applications)\n    - `\"SHA-1\"` (but don't use this in cryptographic applications)\n    - `\"SHA-256\"`\n    - `\"SHA-384\"`\n    - `\"SHA-512\"`.\n- `data`\n  - : An `ArrayBuffer`, a `TypedArray` or a `DataView` object containing the data to be digested.\n\n### Return value\n\nA [`Promise`](../../Promise/Promise.mdx) that fulfills with an `ArrayBuffer` containing the digest.\n\n## Supported algorithms\n\nDigest algorithms, also known as cryptographic hash functions,\ntransform an arbitrarily large block of data into a fixed-size output,\nusually much shorter than the input. They have a variety of applications in\ncryptography.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/SubtleCrypto/prototype/importKey.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# importKey()\n\nThe **`importKey()`** method of the [`SubtleCrypto`](../SubtleCrypto.mdx)\ninterface imports a key: that is, it takes as input a key in an external, portable\nformat and gives you a [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) object that you can use.\n\nThe function accepts several import formats: see [Supported formats](#supported-formats) for details.\n\n## Syntax\n\n```js\nimportKey(format, keyData, algorithm, extractable, keyUsages)\n```\n\n### Parameters\n\n- `format`\n  - : A string describing the data format of the key to import. It can be one of the following:\n    - `jwk`: [JSON Web Key](#json-web-key) format.\n- `keyData`\n  - : An `ArrayBuffer`, a TypedArray, a `DataView`, or a `JSONWebKey` object containing the key in\n    the given format.\n- `algorithm`\n  - : An object defining the type of key to import and providing extra algorithm-specific parameters.\n    - For RSASSA-PKCS1-v1_5:\n      Pass an [`RsaHashedImportParams`](../../RsaHashedImportParams/RsaHashedImportParams.mdx) object.\n- `extractable`\n  - : A boolean value indicating whether it will be possible to export the key.\n- `keyUsages`\n  - : An `Array` indicating what can be done with the key. Possible array values are:\n    - `encrypt`: The key may be used to encrypt messages.\n    - `decrypt`: The key may be used to decrypt messages.\n    - `sign`: The key may be used to sign messages.\n    - `verify`: The key may be used to verify signatures.\n    - `deriveKey`: The key may be used in deriving a new key.\n    - `deriveBits`: The key may be used in deriving bits.\n    - `wrapKey`: The key may be used to wrap a key.\n    - `unwrapKey`: The key may be used to unwrap a key.\n\n### Return value\n\nA [`Promise`](../../Promise/Promise.mdx)\nthat fulfills with the imported key as a [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) object.\n\n### Exceptions\n\nThe promise is rejected when one of the following exceptions is encountered:\n\n- `SyntaxError`\n  - : Raised when `keyUsages` is empty but the unwrapped key is of\n    type `secret` or `private`.\n- `TypeError`\n  - : Raised when trying to use an invalid format or if the `keyData`\n    is not suited for that format.\n\n## Supported formats\n\nThis API currently supports one key import/export format: JSON Web Key.\n\n\n### JSON Web Key\n\nYou can use JSON Web Key format to import or export RSA or Elliptic Curve public or\nprivate keys, as well as AES and HMAC secret keys.\n\nJSON Web Key format is defined in [RFC 7517](https://datatracker.ietf.org/doc/html/rfc7517).\nIt describes a way to represent public, private, and secret keys as JSON objects.\n\nA JSON Web Key looks something like this (this is an EC private key):\n\n```json\n{\n  \"crv\": \"P-384\",\n  \"d\": \"wouCtU7Nw4E8_7n5C1-xBjB4xqSb_liZhYMsy8MGgxUny6Q8NCoH9xSiviwLFfK_\",\n  \"ext\": true,\n  \"key_ops\": [\"sign\"],\n  \"kty\": \"EC\",\n  \"x\": \"SzrRXmyI8VWFJg1dPUNbFcc9jZvjZEfH7ulKI1UkXAltd7RGWrcfFxqyGPcwu6AQ\",\n  \"y\": \"hHUag3OvDzEr0uUQND4PXHQTXP5IDGdYhJhL-WLKjnGjQAw0rNGy5V29-aV-yseW\"\n};\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/SubtleCrypto/prototype/sign.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# sign()\n\nThe **`sign()`** method of the [`SubtleCrypto`](../SubtleCrypto.mdx) interface generates a digital signature.\n\nIt takes as its arguments a key to sign with, some algorithm-specific\nparameters, and the data to sign. It returns a `Promise` which will be\nfulfilled with the signature.\n\nYou can use the corresponding [`verify()`](./verify.mdx) method to verify the signature.\n\n## Syntax\n\n```js\nsign(algorithm, key, data)\n```\n\n### Parameters\n\n- `algorithm`\n  - : A string or object that specifies the signature algorithm to use and its parameters:\n    - To use [RSASSA-PKCS1-v1_5](#rsassa-pkcs1-v1_5), pass the string `\"RSASSA-PKCS1-v1_5\"` or an object of the form `{ \"name\": \"RSASSA-PKCS1-v1_5\" }`.\n- `key`\n  - : A [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) object containing the key to be used for signing.\n    If `algorithm` identifies a public-key cryptosystem, this is the private key.\n- `data`\n  - : An `ArrayBuffer`, a TypedArray or a `DataView` object containing the data to be signed.\n\n### Return value\n\nA `Promise` that fulfills with an `ArrayBuffer` containing the signature.\n\n### Exceptions\n\nThe promise is rejected when the following exception is encountered:\n\n- `InvalidAccessError`\n  - : Raised when the signing key is not a key for the request signing algorithm or when\n    trying to use an algorithm that is either unknown or isn't suitable for signing.\n\n## Supported algorithms\n\n### RSASSA-PKCS1-v1_5\n\nThe RSASSA-PKCS1-v1_5 algorithm is specified in [RFC 3447](https://datatracker.ietf.org/doc/html/rfc3447).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/SubtleCrypto/prototype/verify.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# verify()\n\nThe **`verify()`** method verifies a digital signature.\n\nIt takes as its arguments a key to verify the signature with, some algorithm-specific parameters, the signature, and the original signed data.\nIt returns a `Promise` which will be fulfilled with a boolean value indicating whether the signature is valid.\n\n## Syntax\n\n```js\nverify(algorithm, key, signature, data)\n```\n\n### Parameters\n\n- `algorithm`\n  - : A string or object defining the algorithm to use, and for some algorithm choices, some extra parameters.\n    The values given for the extra parameters must match those passed into the corresponding [`sign()`](./sign.mdx) call.\n    - To use RSASSA-PKCS1-v1_5, pass the string `\"RSASSA-PKCS1-v1_5\"` or an object of the form `{ \"name\": \"RSASSA-PKCS1-v1_5\" }`.\n- `key`\n  - : A [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) containing the key that will be used to verify the signature.\n    It is the secret key for a symmetric algorithm and the public key for a public-key system.\n- `signature`\n  - : A `ArrayBuffer` containing the signature to verify.\n- `data`\n  - : A `ArrayBuffer` containing the data whose signature is to be verified.\n\n### Return value\n\nA `Promise` that fulfills with a\nboolean value: `true` if the signature is valid, `false`\notherwise.\n\n### Exceptions\n\nThe promise is rejected when the following exception is encountered:\n\n- `InvalidAccessError`\n  - : Raised when the encryption key is not a key for the requested verifying algorithm or\n    when trying to use an algorithm that is either unknown or isn't suitable for a verify\n    operation.\n\n## Supported algorithms\n\nThe `verify()` method supports the same algorithms as the [`sign()`](./sign.mdx) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Symbol/Symbol.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol()\n\nThe `Symbol()` constructor returns a value of type **symbol**,\nbut is incomplete as a constructor because it does not support the syntax\n\"`new Symbol()`\" and it is not intended to be subclassed. It may be used as\nthe value of an\n[`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends)\nclause of a `class` definition but a\n[`super`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/super)\ncall to it will cause an exception.\n\n## Syntax\n\n```js\nSymbol()\nSymbol(description)\n```\n\n> **Note:** `Symbol()` can only be called without `new`. Attempting to construct it with `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `description` _**optional**_\n  - : A string. A description of the symbol which can be used for debugging but not to\n    access the symbol itself.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Symbol/asyncIterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.asyncIterator\n\nThe **`Symbol.asyncIterator`** well-known symbol specifies the default [async iterator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_async_iterator_and_async_iterable_protocols) for an object. If this property is set on an object, it is an async iterable and can be used in a [`for await...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for-await...of) loop.\n\n## Value\n\nThe well-known symbol `Symbol.asyncIterator`.\n\n## Description\n\nThe `Symbol.asyncIterator` symbol is a builtin symbol that is used to access an object's `Symbol.asyncIterator` method. In order for an object to be async iterable, it must have a `Symbol.asyncIterator` key.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Symbol/for.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.for()\n\nThe **`Symbol.for(key)`** method searches for existing symbols\nin a runtime-wide symbol registry with the given key and returns it if found. Otherwise\na new symbol gets created in the global symbol registry with this key.\n\n## Syntax\n\n```js\nSymbol.for(key)\n```\n\n### Parameters\n\n- `key`\n  - : String, required. The key for the symbol (and also used for the description of the\n    symbol).\n\n### Return value\n\nAn existing symbol with the given key if found; otherwise, a new symbol is created and\nreturned.\n\n## Description\n\nIn contrast to `Symbol()`, the `Symbol.for()` function creates a\nsymbol available in a [global symbol registry](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol#shared_symbols_in_the_global_symbol_registry) list. `Symbol.for()` does also\nnot necessarily create a new symbol on every call, but checks first if a symbol with the\ngiven `key` is already present in the registry. In that case, that symbol is\nreturned. If no symbol with the given key is found, `Symbol.for()` will\ncreate a new global symbol.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Symbol/hasInstance.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.hasInstance\n\nThe **`Symbol.hasInstance`** well-known symbol is used to determine if a constructor object recognizes an object as its instance. The `instanceof` operator's behavior can be customized by this symbol.\n\n## Value\n\nThe well-known symbol `Symbol.hasInstance`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Symbol/isConcatSpreadable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.isConcatSpreadable\n\nThe **`Symbol.isConcatSpreadable`** well-known symbol is used to configure if an object should be flattened to its array elements when using the [`Array.prototype.concat()`](../../globals/Array/prototype/concat.mdx) method.\n\n## Value\n\nThe well-known symbol `Symbol.isConcatSpreadable`.\n\n## Description\n\nThe `Symbol.isConcatSpreadable` symbol (`Symbol.isConcatSpreadable`) can be defined as an own or inherited property and its value is a boolean. It can control behavior for arrays and array-like objects:\n\n- For array objects, the default behavior is to spread (flatten) elements. `Symbol.isConcatSpreadable` can avoid flattening in these cases.\n- For array-like objects, the default behavior is no spreading or flattening. `Symbol.isConcatSpreadable` can force flattening in these cases.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Symbol/iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.iterator\n\nThe well-known **`Symbol.iterator`** symbol specifies the default iterator for an object. Used by [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of).\n\n## Value\n\nThe well-known symbol `Symbol.iterator`.\n\n## Description\n\nWhenever an object needs to be iterated (such as at the beginning of a `for...of` loop), its `Symbol.iterator` method is called with no arguments, and the returned **iterator** is used to obtain the values to be iterated.\n\nSome built-in types have a default iteration behavior, while other types (such as `Object`) do not. The built-in types with a `Symbol.iterator` method are:\n\n- [`Array.prototype[Symbol.iterator]()`](../../globals/Array/prototype/@@iterator.mdx)\n- [`String.prototype[Symbol.iterator]()`](../../globals/String/prototype/@@iterator.mdx)\n- [`Map.prototype[Symbol.iterator]()`](../../globals/Map/prototype/@@iterator.mdx)\n- [`Set.prototype[Symbol.iterator]()`](../../globals/Set/prototype/@@iterator.mdx)\n\nSee also [Iteration protocols](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) for more information.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Symbol/keyFor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.keyFor()\n\nThe **`Symbol.keyFor(sym)`** method retrieves a shared symbol\nkey from the global symbol registry for the given symbol.\n\n## Syntax\n\n```js\nSymbol.keyFor(sym)\n```\n\n### Parameters\n\n- `sym`\n  - : Symbol, required. The symbol to find a key for.\n\n### Return value\n\nA string representing the key for the given symbol if one is found on the [global registry](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol#shared_symbols_in_the_global_symbol_registry); otherwise, [`undefined`](../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Symbol/match.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.match\n\nThe **`Symbol.match`** well-known symbol specifies the matching of a regular expression against a string. This function is called by the [`String.prototype.match()`](../../globals/String/prototype/match.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.match]()` and [`String.prototype.match()`](../../globals/String/prototype/match.mdx).\n\n## Value\n\nThe well-known symbol `Symbolmatch`.\n\n## Description\n\nThis function is also used to identify [if objects have the behavior of regular expressions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes). For example, the methods [`String.prototype.startsWith()`](../../globals/String/prototype/startsWith.mdx), [`String.prototype.endsWith()`](../../globals/String/prototype/endsWith.mdx) and [`String.prototype.includes()`](../../globals/String/prototype/includes.mdx), check if their first argument is a regular expression and will throw a [`TypeError`](../../globals/TypeError/TypeError.mdx) if they are. Now, if the `match` symbol is set to `false` (or a [Falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value except `undefined`), it indicates that the object is not intended to be used as a regular expression object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Symbol/matchAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.matchAll\n\nThe **`Symbol.matchAll`** well-known symbol specifies the method that returns an iterator, that yields matches of the regular expression against a string. This function is called by the [`String.prototype.matchAll()`](../../globals/String/prototype/matchAll.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.matchAll]()` and [`String.prototype.matchAll()`](../../globals/String/prototype/matchAll.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.matchAll`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Symbol/prototype/@@toPrimitive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype[Symbol.toPrimitive]\n\nThe **`[Symbol.toPrimitive]()`** method converts a Symbol object to\na primitive value.\n\n## Syntax\n\n```js\nSymbol()[Symbol.toPrimitive](hint)\n```\n\n### Return value\n\nThe primitive value of the specified `Symbol` object.\n\n## Description\n\nThe `[Symbol.toPrimitive]()` method of `Symbol` returns the primitive\nvalue of a Symbol object as a Symbol data type. The `hint`\nargument is not used.\n\nJavaScript calls the `[Symbol.toPrimitive]()` method to convert an object to a\nprimitive value. You rarely need to invoke the `[Symbol.toPrimitive]()` method\nyourself; JavaScript automatically invokes it when encountering an object where a\nprimitive value is expected.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Symbol/prototype/description.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype.description\n\nThe read-only **`description`** property is a string returning the optional description of `Symbol` objects.\n\n## Description\n\n`Symbol` objects can be created with an optional description which can be used for debugging but not to access the symbol itself. The `Symbol.prototype.description` property can be used to read that description. It is different to `Symbol.prototype.toString()` as it does not contain the enclosing `\"Symbol()\"` string. See the examples.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Symbol/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified symbol value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified symbol value.\n\n## Description\n\nThe `Symbol` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For `Symbol` values, the `toString` method returns a descriptive string in the form `\"Symbol(description)\"`, where `description` is the symbol's [`Symbol.prototype.description`](../../../globals/Symbol/prototype/description.mdx).\n\nThe `toString()` method requires its `this` value to be a `Symbol` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to symbol values.\n\nBecause `Symbol` has a [`[Symbol.toPrimitive]()`](../../../globals/Symbol/toPrimitive.mdx) method, that method always takes priority over `toString()` when a `Symbol` object is [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). However, because `Symbol.prototype[Symbol.toPrimitive]()` returns a symbol primitive, and symbol primitives throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when implicitly converted to a string, the `toString()` method is never implicitly called by the language. To stringify a symbol, you must explicitly call its `toString()` method or use the [`String()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/String#using_string_to_stringify_a_symbol) function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Symbol/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a Symbol object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nThe primitive value of the specified `Symbol` object.\n\n## Description\n\nThe `valueOf()` method of `Symbol` returns the primitive value of a Symbol object as a Symbol data type.\n\nJavaScript calls the `valueOf()` method to convert an object to a primitive value. You rarely need to invoke the `valueOf()` method yourself; JavaScript automatically invokes it when encountering an object where a primitive value is expected.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Symbol/replace.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.replace\n\nThe **`Symbol.replace`** well-known symbol specifies the method that replaces matched substrings of a string. This function is called by the [`String.prototype.replace()`](../../globals/String/prototype/replace.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.replace]()` and [`String.prototype.replace()`](../../globals/String/prototype/replace.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.replace`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Symbol/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.search\n\nThe **`Symbol.search`** well-known symbol specifies the method that returns the index within a string that matches the regular expression. This function is called by the [`String.prototype.search()`](../../globals/String/prototype/search.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.search]()` and [`String.prototype.search()`](../../globals/String/prototype/search.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.search`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Symbol/species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.species\n\nThe well-known symbol **`Symbol.species`** specifies a function-valued property that the constructor function uses to create derived objects.\n\n> **Warning:** The existence of `Symbol.species` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Value\n\nThe well-known symbol `Symbol.species`.\n\n## Description\n\nThe `Symbol.species` accessor property allows subclasses to override the default constructor for objects. This specifies a protocol about how instances should be copied. For example, when you use copying methods of arrays, such as [`Array.prototype.map()`](../../globals/Array/prototype/map.mdx). the `map()` method uses `instance.constructor[Symbol.species]` to get the constructor for constructing the new array.\n\nAll built-in implementations of `Symbol.species` return the `this` value, which is the current instance's constructor. This allows copying methods to create instances of derived classes rather than the base class — for example, `map()` will return an array of the same type as the original array.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Symbol/split.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.split\n\nThe **`Symbol.split`** well-known symbol specifies the method that splits a string at the indices that match a regular expression. This function is called by the [`String.prototype.split()`](../../globals/String/prototype/split.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.split]()` and [`String.prototype.split()`](../../globals/String/prototype/split.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.split`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Symbol/toPrimitive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.toPrimitive\n\nThe **`Symbol.toPrimitive`** well-known symbol specifies a method that accepts a preferred type and returns a primitive representation of an object. It is called in priority by all [type coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) algorithms.\n\n## Value\n\nThe well-known symbol `Symbol.toPrimitive`.\n\n## Description\n\nWith the help of the `Symbol.toPrimitive` property (used as a function value), an object can be converted to a primitive value. The function is called with a string argument `hint`, which specifies the preferred type of the result primitive value. The `hint` argument can be one of `\"number\"`, `\"string\"`, and `\"default\"`.\n\nThe `\"number\"` hint is used by [numeric coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#numeric_coercion) algorithms. The `\"string\"` hint is used by the [string coercion](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) algorithm. The `\"default\"` hint is used by the [primitive coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion) algorithm. The `hint` only acts as a weak signal of preference, and the implementation is free to ignore it (as [`Symbol.prototype[Symbol.toPrimitive]()`](../../globals/Symbol/prototype/@@toPrimitive.mdx) does). The language does not enforce alignment between the `hint` and the result type, although `[Symbol.toPrimitive]()` must return a primitive, or a [`TypeError`](../../globals/TypeError/TypeError.mdx) is thrown.\n\nObjects without the `Symbol.toPrimitive` property are converted to primitives by calling the `valueOf()` and `toString()` methods in different orders, which is explained in more detail in the [type coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) section. `Symbol.toPrimitive` allows full control over the primitive conversion process. For example, `Symbol.prototype.toString()` won't be called, and `Symbol` objects must always be explicitly converted to strings through [`String()`](../../globals/String/String.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Symbol/toStringTag.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.toStringTag\n\nThe **`Symbol.toStringTag`** well-known symbol is a string valued property that is used in the creation of the default string description of an object. It is accessed internally by the [`Object.prototype.toString()`](../../globals/Object/prototype/toString.mdx) method.\n\n## Value\n\nThe well-known symbol `Symbol.toStringTag`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Symbol/unscopables.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.unscopables\n\nThe **`Symbol.unscopables`** well-known symbol is used to specify an object value of whose own and inherited property names are excluded from the [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) environment bindings of the associated object.\n\n## Value\n\nThe well-known symbol `@@unscopables`.\n\n## Description\n\nThe `@@unscopables` symbol (accessed via `Symbol.unscopables`) can be defined on any object to exclude property names from being exposed as lexical variables in [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) environment bindings. Note that when using [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), `with` statements are not available, and this symbol is likely not needed.\n\nSetting a property of the `@@unscopables` object to `true` (or any [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value) will make the corresponding property of the `with` scope object _unscopable_ and therefore won't be introduced to the `with` body scope. Setting a property to `false` (or any [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value) will make it _scopable_ and thus appear as lexical scope variables.\n\nWhen deciding whether `x` is unscopable, the entire prototype chain of the `@@unscopables` property is looked up for a property called `x`. This means if you declared `@@unscopables` as a plain object, `Object.prototype` properties like [`toString`](../../globals/Object/prototype/toString.mdx) would become unscopable as well, which may cause backward incompatibility for legacy code assuming those properties are normally scoped (see [an example here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/unscopables#avoid_using_a_non-null-prototype_object_as_symbol.unscopables)). You are advised to make your custom `@@unscopables` property have `null` as its prototype, like [`Array.prototype[Symbol.unscopables]`](../../globals/Array/prototype/@@unscopables.mdx) does.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/SyntaxError/SyntaxError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SyntaxError\n\nThe **`SyntaxError`** constructor creates a new error object\nthat represents an error when trying to interpret syntactically invalid code.\n\n## Syntax\n\n```js\nnew SyntaxError()\nnew SyntaxError(message)\nnew SyntaxError(message, options)\nnew SyntaxError(message, fileName)\nnew SyntaxError(message, fileName, lineNumber)\n\nSyntaxError()\nSyntaxError(message)\nSyntaxError(message, options)\nSyntaxError(message, fileName)\nSyntaxError(message, fileName, lineNumber)\n```\n\n> **Note:** `SyntaxError()` can be called with or without `new`. Both create a new `SyntaxError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error."
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/TextDecoder/TextDecoder.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder()\n\nThe **`TextDecoder()`** constructor returns a newly created `TextDecoder` object for the encoding specified in parameter.\n\n## Syntax\n\n```js\nnew TextDecoder()\nnew TextDecoder(label)\nnew TextDecoder(label, options)\n```\n\n### Parameters\n\n- `label` _**optional**_\n  - : A string, defaulting to `\"utf-8\"`.\n- `options` _**optional**_\n\n  - : An object with the property:\n\n    - `fatal`\n      - : A boolean value indicating if the `TextDecoder.decode()` method must throw a `TypeError` when decoding invalid data.\n        It defaults to `false`, which means that the decoder will substitute malformed data with a replacement character.\n\n    - `ignoreBOM`\n      - : A boolean value indicating whether the [byte order mark](https://www.w3.org/International/questions/qa-byte-order-mark) is ignored.\n        It defaults to `false`.\n\n### Exceptions\n\n- `RangeError`\n  - : Thrown if the value of `label` is unknown, or is one of the values leading to a `'replacement'` decoding algorithm (`\"iso-2022-cn\"` or `\"iso-2022-cn-ext\"`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/TextDecoder/prototype/decode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.decode()\n\nThe **`TextDecoder.decode()`** method returns a string containing text decoded from the buffer passed as a parameter.\n\nThe decoding method is defined in the current `TextDecoder` object.\nThis includes the expected encoding of the data, and how decoding errors are handled.\n\n## Syntax\n\n```js\ndecode()\ndecode(buffer)\ndecode(buffer, options)\n```\n\n### Parameters\n\n- `buffer` _**optional**_\n  - : Is an `ArrayBuffer`, a `TypedArray` or a `DataView` object containing the encoded text to decode.\n- `options` _**optional**_\n\n  - : An object with the property:\n\n    - `stream`\n      - : A boolean flag indicating that additional data will follow in subsequent calls to `decode()`.\n        Set to `true` if processing the data in chunks, and `false` for the final chunk or if the data is not chunked.\n        It defaults to `false`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if there is a decoding error when the property `TextDecoder.fatal` is `true`.\n\n### Return value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/TextDecoder/prototype/encoding.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.encoding\n\nThe **`TextDecoder.encoding`** read-only property returns a string containing the name of the decoding algorithm used by the specific decoder object.\n\nThe encoding is set by the constructor `label` parameter, and defaults to `utf-8`.\n\n## Value\n\nA lower-cased ASCII string, which can be one of the following values:\n\n- The recommended encoding for the Web: `'utf-8'`.\n- The legacy single-byte encodings:\n  ['ibm866'](https://en.wikipedia.org/wiki/Code_page_866),\n  ['iso-8859-2'](https://en.wikipedia.org/wiki/ISO/IEC_8859-2),\n  ['iso-8859-3'](https://en.wikipedia.org/wiki/ISO/IEC_8859-3),\n  ['iso-8859-4'](https://en.wikipedia.org/wiki/ISO/IEC_8859-4),\n  ['iso-8859-5'](https://en.wikipedia.org/wiki/ISO/IEC_8859-5),\n  ['iso-8859-6'](https://en.wikipedia.org/wiki/ISO/IEC_8859-6),\n  ['iso-8859-7'](https://en.wikipedia.org/wiki/ISO/IEC_8859-7),\n  ['iso-8859-8'](https://en.wikipedia.org/wiki/ISO/IEC_8859-8)'`,\n  ['iso-8859-8i'](https://en.wikipedia.org/wiki/ISO-8859-8-I),\n  ['iso-8859-10'](https://en.wikipedia.org/wiki/ISO/IEC_8859-10),\n  ['iso-8859-13'](https://en.wikipedia.org/wiki/ISO/IEC_8859-13),\n  ['iso-8859-14'](https://en.wikipedia.org/wiki/ISO/IEC_8859-14),\n  ['iso-8859-15'](https://en.wikipedia.org/wiki/ISO/IEC_8859-15),\n  ['iso-8859-16'](https://en.wikipedia.org/wiki/ISO/IEC_8859-16),\n  ['koi8-r'](https://en.wikipedia.org/wiki/KOI8-R),\n  ['koi8-u'](https://en.wikipedia.org/wiki/KOI8-U),\n  ['macintosh'](https://en.wikipedia.org/wiki/Mac_OS_Roman),\n  ['windows-874'](https://en.wikipedia.org/wiki/Windows-874),\n  ['windows-1250'](https://en.wikipedia.org/wiki/Windows-1250),\n  ['windows-1251'](https://en.wikipedia.org/wiki/Windows-1251),\n  ['windows-1252'](https://en.wikipedia.org/wiki/Windows-1252),\n  ['windows-1253'](https://en.wikipedia.org/wiki/Windows-1253),\n  ['windows-1254'](https://en.wikipedia.org/wiki/Windows-1254),\n  ['windows-1255'](https://en.wikipedia.org/wiki/Windows-1255),\n  ['windows-1256'](https://en.wikipedia.org/wiki/Windows-1256),\n  ['windows-1257'](https://en.wikipedia.org/wiki/Windows-1257),\n  ['windows-1258'](https://en.wikipedia.org/wiki/Windows-1258), or\n  ['x-mac-cyrillic'](https://en.wikipedia.org/wiki/Macintosh_Cyrillic_encoding).\n- The legacy multi-byte Chinese (simplified) encodings:\n  ['gbk'](https://en.wikipedia.org/wiki/GBK),\n  ['gb18030'](https://en.wikipedia.org/wiki/GB_18030)\n- The legacy multi-byte Chinese (traditional) encoding:\n  ['big5'](https://en.wikipedia.org/wiki/Big5).\n- The legacy multi-byte Japanese encodings:\n  ['euc-jp'](https://en.wikipedia.org/wiki/Extended_Unix_Code#EUC-JP),\n  ['iso-2022-jp'](https://en.wikipedia.org/wiki/ISO/IEC_2022#ISO-2022-JP),\n  ['shift-jis'](https://en.wikipedia.org/wiki/Shift_JIS).\n- The legacy multi-byte Korean encodings:\n  ['euc-kr'](https://en.wikipedia.org/wiki/Extended_Unix_Code#EUC-KR)\n- The legacy miscellaneous encodings:\n  ['utf-16be'](https://en.wikipedia.org/wiki/UTF-16#Byte_order_encoding_schemes),\n  ['utf-16le'](https://en.wikipedia.org/wiki/UTF-16#Byte_order_encoding_schemes),\n  `'x-user-defined'`.\n- A special encoding, `'replacement'`.\n  This decodes empty input into empty output and any other arbitrary-length input into a single replacement character.\n  It is used to prevent attacks that mismatch encodings between the client and server.\n  The following encodings also map to the replacement encoding: `ISO-2022-CN`, `ISO-2022-CN-ext`, ['iso-2022-kr'](https://en.wikipedia.org/wiki/ISO/IEC_2022#ISO-2022-KR) and ['hz-gb-2312'](<https://en.wikipedia.org/wiki/HZ_(character_encoding)>).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/TextDecoder/prototype/fatal.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.fatal\n\nThe **`fatal`** read-only property of the `TextDecoder` interface is a `Boolean` indicating whether the error mode is fatal.\n\nIf the property is `true` then a decoder will throw a `TypeError` if it encounters malformed data while decoding.\nIf `false` the decoder will substitute the invalid data with the replacement character `U+FFFD` (�).\nThe value of the property is set in the `TextDecoder()` constructor.\n\n## Value\n\nA `boolean` which will return `true` if the error mode is set to `fatal`.\nOtherwise it returns `false`, indicating that the error mode is \"replacement\".\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/TextDecoder/prototype/ignoreBOM.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.ignoreBOM\n\nThe **`ignoreBOM`** read-only property of the `TextDecoder` interface is a `Boolean` indicating whether the [byte order mark](https://www.w3.org/International/questions/qa-byte-order-mark) is ignored.\n\n## Value\n\n`true` if the byte order mark is ignored; `false` otherwise.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/TextEncoder/TextEncoder.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextEncoder()\n\nThe **`TextEncoder()`** constructor returns a newly created `TextEncoder` object that will generate a byte stream with UTF-8 encoding.\n\n## Syntax\n\n```js\nnew TextEncoder()\n```\n\n### Parameters\n\nNone.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/TextEncoder/prototype/encode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextEncoder.encode()\n\nThe **`TextEncoder.encode()`** method takes a string as input, and returns a `Uint8Array` containing the text given in parameters encoded with the specific method for that `TextEncoder` object.\n\n## Syntax\n\n```js\nencode(string)\n```\n\n### Parameters\n\n- `string`\n  - : A string containing the text to encode.\n\n### Return value\n\nA `Uint8Array` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/TextEncoder/prototype/encoding.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextEncoder.encoding\n\nThe **`TextEncoder.encoding`** read-only property returns a string containing the name of the encoding algorithm used by the specific encoder.\n\nIt can only have the following value `utf-8`.\n\n## Value\n\nA string with the value `utf-8`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/TransformStream/TransformStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStream()\n\nThe **`TransformStream()`** constructor creates a new `TransformStream` object which represents a pair of streams: a `WritableStream` representing the writable side, and a `ReadableStream` representing the readable side.\n\n## Syntax\n\n```js\nnew TransformStream()\nnew TransformStream(transformer)\nnew TransformStream(transformer, writableStrategy)\nnew TransformStream(transformer, writableStrategy, readableStrategy)\n```\n\n### Parameters\n\n- `transformer` _**optional**_\n\n  - : An object representing the `transformer`. If not supplied the resulting stream will be an **identity transform stream** which forwards all chunks written to its writable side to its readable side, without any changes.\n\n    The transformer object can contain any of the following methods. In each method `controller` is an instance of `TransformStreamDefaultController`.\n\n    - `start(controller)`\n      - : Called when the `TransformStream` is constructed. It is typically used to enqueue chunks using `TransformStreamDefaultController.enqueue()`.\n    - `transform(chunk, controller)`\n      - : Called when a chunk written to the writable side is ready to be transformed, and performs the work of the transformation stream. If no `transform()` method is supplied, the identity transform is used, and the chunk will be enqueued with no changes.\n    - `flush(controller)`\n      - : Called after all chunks written to the writable side have been successfully transformed, and the writable side is about to be closed.\n\n- `writableStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer. This defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk`. This indicates the size to\n        use for each chunk, in bytes.\n\n- `readableStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer. This defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk`. This indicates the size to\n        use for each chunk, in bytes.\n\n> **Note:** You could define your own custom\n> `readableStrategy` or `writableStrategy`, or use an instance of\n> `ByteLengthQueuingStrategy` or `CountQueuingStrategy`\n> for the object values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/TransformStream/prototype/readable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStream.readable\n\nThe **`readable`** read-only property of the `TransformStream` interface returns the `ReadableStream` instance controlled by this `TransformStream`.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/TransformStream/prototype/writable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStream.writable\n\nThe **`writable`** read-only property of the `TransformStream` interface returns the `WritableStream` instance controlled by this `TransformStream`.\n\n## Value\n\nA `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/TransformStreamDefaultController/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.desiredSize\n\nThe **`desiredSize`** read-only property of the `TransformStreamDefaultController` interface returns the desired size to fill the queue of the associated [`ReadableStream`](../../../globals/ReadableStream/ReadableStream.mdx).\n\nThe internal queue of a `ReadableStream` contains chunks that have been enqueued, but not yet read.\n\nIf the `desiredSize` is `0` then the queue is full. Therefore you can use this information to manually apply backpressure to manage the queue.\n\n## Value\n\nThe desired size.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/TransformStreamDefaultController/prototype/enqueue.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.enqueue()\n\nThe **`enqueue()`** method of the `TransformStreamDefaultController` interface enqueues the given chunk in the readable side of the stream.\n\n## Syntax\n\n```js\nenqueue(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : The chunk being queued. A chunk is a single piece of data. It can be any type of data, and a stream can contain chunks of different types.\n\n### Return value\n\nNone `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream is not readable.\n    This might occur if the stream is errored via `controller.error()`, or when it is closed without its controller's `controller.close()` method ever being called.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/TransformStreamDefaultController/prototype/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.error()\n\nThe **`error()`** method of the `TransformStreamDefaultController` interface errors both sides of the stream. Any further interactions with it will fail with the given error message, and any chunks in the queue will be discarded.\n\n## Syntax\n\n```js\nerror(reason)\n```\n\n### Parameters\n\n- `reason`\n  - : A string containing the error message to be returned on any further interaction with the stream.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/TransformStreamDefaultController/prototype/terminate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.terminate()\n\nThe **`terminate()`** method of the `TransformStreamDefaultController` interface closes the readable side and errors the writable side of the stream.\n\n## Syntax\n\n```js\nterminate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone (`undefined`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/TypeError/TypeError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TypeError\n\nThe **`TypeError()`** constructor creates a new error when an\noperation could not be performed, typically (but not exclusively) when a value is not of\nthe expected type.\n\n## Syntax\n\n```js\nnew TypeError()\nnew TypeError(message)\nnew TypeError(message, options)\nnew TypeError(message, fileName)\nnew TypeError(message, fileName, lineNumber)\n\nTypeError()\nTypeError(message)\nTypeError(message, options)\nTypeError(message, fileName)\nTypeError(message, fileName, lineNumber)\n```\n\n> **Note:** `TypeError()` can be called with or without `new`. Both create a new `TypeError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/URIError/URIError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URIError\n\nThe **`URIError()`** constructor creates an error when a global\nURI handling function was used in a wrong way.\n\n## Syntax\n\n```js\nnew URIError()\nnew URIError(message)\nnew URIError(message, options)\nnew URIError(message, fileName)\nnew URIError(message, fileName, lineNumber)\n\nURIError()\nURIError(message)\nURIError(message, options)\nURIError(message, fileName)\nURIError(message, fileName, lineNumber)\n```\n\n> **Note:** `URIError()` can be called with or without `new`. Both create a new `URIError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/URL/URL.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL()\n\nThe **`URL()`** constructor returns a newly created\n`URL` object representing the URL defined by the parameters.\n\nIf the given base URL or the resulting URL are not valid URLs, the JavaScript\n`TypeError` exception is thrown.\n\n## Syntax\n\n```js\nnew URL(url)\nnew URL(url, base)\n```\n\n### Parameters\n\n- `url`\n  - : A string or any other object with a `toString()` method.\n    If `url` is a relative URL, `base` is\n    required, and will be used as the base URL. If `url` is an\n    absolute URL, a given `base` will be ignored.\n- `base` _**optional**_\n  - : A string representing the base URL to use in cases where\n    `url` is a relative URL. If not specified, it defaults to\n    `undefined`.\n\n> **Note:** The `url` and `base` arguments will\n> each be stringified from whatever value you pass, just like with other Web APIs\n> that accept a string. In particular, you can use an existing\n> `URL` object for either argument, and it will stringify to the\n> object's `URL.href\", \"href` property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/URL/prototype/hash.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.hash\n\nThe **`hash`** property of the\n`URL` interface is a string containing a\n`'#'` followed by the fragment identifier of the URL.\n\nThe fragment is not percent-decoded. If the URL does not\nhave a fragment identifier, this property contains an empty string — `\"\"`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/URL/prototype/host.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.host\n\nThe **`host`** property of the `URL` interface is\na string containing the host, that is the `URL.hostname`, and then, if the `port` of the URL is nonempty, a\n`':'`, followed by the `port` of the URL.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/URL/prototype/hostname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.hostname\n\nThe **`hostname`** property of the `URL` interface\nis a string containing the domain name of the URL.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/URL/prototype/href.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.href\n\nThe **`href`** property of the `URL` interface is\na string containing the whole URL.\n\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/URL/prototype/origin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.origin\n\nThe **`origin`** read-only property of\nthe `URL` interface returns a string containing the\nUnicode serialization of the origin of the represented URL.\n\nThe exact structure\nvaries depending on the type of URL:\n\n- For `http` or `https` URLs, the scheme followed by\n  `'://'`, followed by the domain, followed by `':'`, followed by\n  the port (the default port, `80` and `443` respectively, if\n  explicitly specified).\n- For `file:` URLs, the value is browser dependent.\n- for `blob:` URLs, the origin of the URL following `blob:` will\n  be used. For example, `\"blob:https://mozilla.org\"` will be returned as\n  `\"https://mozilla.org\".`\n\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/URL/prototype/password.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.password\n\nThe **`password`** property of the `URL` interface\nis a string containing the password specified before the domain name.\n\nIf it is set without first setting the `URL.username` property, it silently fails.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/URL/prototype/pathname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.pathname\n\nThe **`pathname`** property of the `URL` interface represents a location in a hierarchical structure. It is a string constructed from a list of path segments, each of which is prefixed by a `/` character. If the URL has no path segments, the value of its `pathname` property will be the empty string.\n\nURLs such as `https` and `http` URLs that have [hierarchical schemes](https://www.rfc-editor.org/rfc/rfc3986#section-1.2.3) (which the URL standard calls \"[special schemes](https://url.spec.whatwg.org/#special-scheme)\") always have at least one (invisible) path segment: the empty string. Thus the `pathname` value for such \"special scheme\" URLs can never be the empty string, but will instead always have a least one `/` character.\n\nFor example, the URL `https://developer.mozilla.org` has just one path segment: the empty string, so its `pathname` value is constructed by prefixing a `/` character to the empty string.\n\nSome systems define the term _slug_ to mean the final segment of a non-empty path if it identifies a page in human-readable keywords. For example, the URL `https://example.org/articles/this-that-other-outre-collection` has `this-that-other-outre-collection` as its slug.\n\nSome systems use the `;` and `=` characters to delimit parameters and parameter values applicable to a path segment. For example, with the URL `https://example.org/users;id=42/tasks;state=open?sort=modified`, a system might extract and use the path segment parameters `id=42` and `state=open` from the path segments `users;id=42` and `tasks;state=open`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/URL/prototype/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.port\n\nThe **`port`** property of the `URL` interface is\na string containing the port number of the URL.\n\n> **Note:** If an input string passed to the `URL()` constructor doesn't contain an explicit port number (e.g., `https://localhost`) or contains a port number that's the default port number corresponding to the protocol part of the input string (e.g., `https://localhost:443`), then in the `URL` object the constructor returns, the value of the port property will be the empty string: `''`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/URL/prototype/protocol.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.protocol\n\nThe **`protocol`** property of the `URL` interface\nis a string representing the protocol scheme of the URL, including the\nfinal `':'`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/URL/prototype/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.search\n\nThe **`search`** property of the `URL` interface\nis a search string, also called a _query string_, that is a\nstring containing a `'?'` followed by the parameters of the\nURL.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/URL/prototype/searchParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.searchParams\n\nThe **`searchParams`** readonly property of the\n`URL` interface returns a `URLSearchParams` object allowing\naccess to the `GET` decoded query arguments contained in the URL.\n\n## Value\n\nA `URLSearchParams` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/URL/prototype/toJSON.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.toJSON()\n\nThe **`toJSON()`** method of the `URL` interface\nreturns a string containing a serialized version of the URL,\nalthough in practice it seems to have the same effect as\n`URL.toString()`.\n\n## Syntax\n\n```js\ntoJSON()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/URL/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.toString()\n\nThe **`URL.toString()`** method returns a\nstring containing the whole URL. It is effectively a read-only version\nof `URL.prototype.href`.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/URL/prototype/username.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.username\n\nThe **`username`** property of the `URL` interface\nis a string containing the username specified before the domain name.\n\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/URLSearchParams/URLSearchParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams()\n\nThe **`URLSearchParams()`** constructor creates and returns a\nnew `URLSearchParams` object.\n\n\n\n## Syntax\n\n```js\nnew URLSearchParams()\nnew URLSearchParams(options)\n```\n\n### Parameters\n\n- `options` _**optional**_\n  - : One of:\n    - A string, which will be parsed from `application/x-www-form-urlencoded` format. A leading `'?'` character is ignored.\n    - A literal sequence of name-value string pairs, or any object with an iterator that produces a sequence of string pairs.\n    - A record of string keys and string values. Note that nesting is not supported.\n\n### Return value\n\nA `URLSearchParams` object instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/URLSearchParams/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.append()\n\nThe **`append()`** method of the `URLSearchParams`\ninterface appends a specified key/value pair as a new search parameter.\n\nAs shown in the example below, if the same key is appended multiple times it will\nappear in the parameter string multiple times for each value.\n\n## Syntax\n\n```js\nappend(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to append.\n- `value`\n  - : The value of the parameter to append.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/URLSearchParams/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.delete()\n\nThe **`delete()`** method of the `URLSearchParams`\ninterface deletes the given search parameter and all its associated values, from the\nlist of all search parameters.\n\n## Syntax\n\n```js\ndelete(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to be deleted.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/URLSearchParams/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.entries()\n\nThe **`entries()`** method of the\n`URLSearchParams` interface returns an\niterator allowing iteration through all key/value\npairs contained in this object. The iterator returns key/value pairs in the same order as they appear in the query string. The key and value of each pair are\nstring objects.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/URLSearchParams/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.forEach()\n\nThe **`forEach()`** method of the\n`URLSearchParams` interface allows iteration through all values contained\nin this object via a callback function.\n\n## Syntax\n\n```js\nforEach(callback)\nforEach(callback, thisArg)\n```\n\n### Parameters\n\n- `callback`\n\n  - : Function to execute on each element, which is passed the following arguments:\n\n    - `value`\n      - : The value of the current entry being processed in the `URLSearchParams` object.\n    - `key`\n      - : The key of the current entry being processed in the `URLSearchParams` object.\n    - `searchParams`\n      - : The `URLSearchParams` object the `forEach()` was called upon.\n\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `callback`.\n\n### Return value\n\nNone `undefined`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/URLSearchParams/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.get()\n\nThe **`get()`** method of the `URLSearchParams`\ninterface returns the first value associated to the given search parameter.\n\n## Syntax\n\n```js\nget(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to return.\n\n### Return value\n\nA string if the given search parameter is found; otherwise,\n**`null`**.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/URLSearchParams/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.has()\n\nThe **`has()`** method of the `URLSearchParams`\ninterface returns a boolean value that indicates whether a parameter with the\nspecified name exists.\n\n## Syntax\n\n```js\nhas(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to find.\n\n### Return value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/URLSearchParams/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.keys()\n\nThe **`keys()`** method of the `URLSearchParams`\ninterface returns an iterator allowing iteration\nthrough all keys contained in this object. The keys are string\nobjects.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/URLSearchParams/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.set()\n\nThe **`set()`** method of the `URLSearchParams`\ninterface sets the value associated with a given search parameter to the given value.\nIf there were several matching values, this method deletes the others. If the search\nparameter doesn't exist, this method creates it.\n\n## Syntax\n\n```js\nset(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to set.\n- `value`\n  - : The value of the parameter to set.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/URLSearchParams/prototype/sort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.sort()\n\nThe **`URLSearchParams.sort()`** method sorts all key/value\npairs contained in this object in place and returns `undefined`. The sort\norder is according to unicode code points of the keys. This method uses a stable sorting\nalgorithm (i.e. the relative order between key/value pairs with equal keys will be\npreserved).\n\n## Syntax\n\n```js\nsort()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/URLSearchParams/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.toString()\n\nThe **`toString()`** method of the\n`URLSearchParams` interface returns a query string suitable for use in a\nURL.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string, without the question mark. (Returns an empty string if no\nsearch parameters have been set.)\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/URLSearchParams/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.values()\n\nThe **`values()`** method of the `URLSearchParams`\ninterface returns an iterator allowing iteration\nthrough all values contained in this object. The values are string\nobjects.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Uint16Array/Uint16Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint16Array\n\nThe **`Uint16Array()`** typed array constructor creates an\narray of 16-bit unsigned integers in the platform byte order.\n\n## Syntax\n\n```js\nnew Uint16Array()\nnew Uint16Array(length)\nnew Uint16Array(typedArray)\nnew Uint16Array(object)\n\nnew Uint16Array(buffer)\nnew Uint16Array(buffer, byteOffset)\nnew Uint16Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint16Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Uint32Array/Uint32Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint32Array\n\nThe **`Uint32Array()`** typed array constructor creates an\narray of 32-bit unsigned integers in the platform byte order. If control over byte order\nis needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are initialized to\n`0`. Once established, you can reference elements in the array using the\nobject's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Uint32Array()\nnew Uint32Array(length)\nnew Uint32Array(typedArray)\nnew Uint32Array(object)\n\nnew Uint32Array(buffer)\nnew Uint32Array(buffer, byteOffset)\nnew Uint32Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint32Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Uint8Array/Uint8Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint8Array\n\nThe **`Uint8Array()`** constructor creates a typed array of\n8-bit unsigned integers. The contents are initialized to `0`. Once\nestablished, you can reference elements in the array using the object's methods, or\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew Uint8Array()\nnew Uint8Array(length)\nnew Uint8Array(typedArray)\nnew Uint8Array(object)\n\nnew Uint8Array(buffer)\nnew Uint8Array(buffer, byteOffset)\nnew Uint8Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint8Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/Uint8ClampedArray/Uint8ClampedArray.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint8ClampedArray\n\nThe **`Uint8ClampedArray()`** constructor creates a typed array\nof 8-bit unsigned integers clamped to 0-255; if you specified a value that is out of the\nrange of \\[0,255], 0 or 255 will be set instead; if you specify a non-integer, the\nnearest integer will be set. The contents are initialized to `0`. Once\nestablished, you can reference elements in the array using the object's methods, or\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew Uint8ClampedArray()\nnew Uint8ClampedArray(length)\nnew Uint8ClampedArray(typedArray)\nnew Uint8ClampedArray(object)\n\nnew Uint8ClampedArray(buffer)\nnew Uint8ClampedArray(buffer, byteOffset)\nnew Uint8ClampedArray(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint8ClampedArray()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/WeakMap/WeakMap.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap\n\nThe **`WeakMap()` constructor** creates a `WeakMap` object, optionally based on a provided `Array` or other iterable object.\n\n## Syntax\n\n```js\nnew WeakMap()\nnew WeakMap(iterable)\n```\n\n> **Note:** `WeakMap()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable`\n  - : An `Array` or other object that implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol)  that returns an iterator object that produces a two-element array-like object whose first element is a value that will be used as a `WeakMap` key and whose second element is the value to associate with that key. Each key-value pair will be added to the new `WeakMap`. null is treated as undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/WeakMap/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.delete()\n\nThe **`delete()`** method removes the specified element from a\n`WeakMap` object.\n\n## Syntax\n\n```js\ndelete(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to remove from the `WeakMap` object.\n\n### Return value\n\n`true` if an element in the `WeakMap` object has been removed\nsuccessfully. `false` if the key is not found in the `WeakMap` or\nif the key is not an object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/WeakMap/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.get()\n\nThe **`get()`** method returns a specified element from a\n`WeakMap` object.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key`\n  - : Required. The key of the element to return from the `WeakMap` object.\n\n### Return value\n\nThe element associated with the specified key in the `WeakMap` object. If\nthe key can't be found, [`undefined`](../../../globals/undefined.mdx) is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/WeakMap/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.has()\n\nThe **`has()`** method returns a boolean indicating whether an\nelement with the specified key exists in the `WeakMap` object or not.\n\n## Syntax\n\n```js\nhas(key)\n```\n\n### Parameters\n\n- `key`\n  - : Required. The key of the element to test for presence in the `WeakMap`\n    object.\n\n### Return value\n\n- Boolean\n  - : Returns `true` if an element with the specified key exists in the\n    `WeakMap` object; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/WeakMap/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.set\n\nThe **`set()`** method adds a new element with a specified key\nand value to a `WeakMap` object.\n\n## Syntax\n\n```js\nset(key, value)\n```\n\n### Parameters\n\n- `key`\n  - : Required. Must be `object`. The key of the element to add to the\n    `WeakMap` object.\n- `value`\n  - : Required. Any value. The value of the element to add to the `WeakMap`\n    object.\n\n### Return value\n\nThe `WeakMap` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/WeakRef/WeakRef.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakRef\n\nThe **`WeakRef`** constructor creates a `WeakRef`\nobject referring to a given target object.\n\n## Syntax\n\n```js\nnew WeakRef(targetObject)\n```\n\n> **Note:** `WeakRef()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `targetObject`\n  - : The target object the WeakRef should refer to (also called the _referent_).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/WeakRef/prototype/deref.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakRef.prototype.deref()\n\nThe `deref` method returns the `WeakRef` instance's target\nobject, or `undefined` if the target object has been garbage-collected.\n\n## Syntax\n\n```js\nderef()\n```\n\n### Return value\n\nThe target object of the WeakRef, or `undefined` if the object has been\ngarbage-collected.\n\n## Description\n\nSee the [Notes on WeakRefs](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WeakRef#notes_on_weakrefs) section of the `WeakRef` page for some important notes.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/WeakSet/WeakSet.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet\n\nThe **`WeakSet`** constructor lets you create\n`WeakSet` objects that store weakly held _objects_ in a collection.\n\n## Syntax\n\n```js\nnew WeakSet()\nnew WeakSet(iterable)\n```\n\n> **Note:** `WeakSet()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable` _**optional**_\n  - : If an [iterable object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) is passed, all of its elements will be added to the new\n    `WeakSet`. null is treated as undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/WeakSet/prototype/add.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet.prototype.add\n\nThe **`add()`** method appends a new object to the end of a\n`WeakSet` object.\n\n## Syntax\n\n```js\nadd(value)\n```\n\n### Parameters\n\n- value\n  - : Required. The object to add to the `WeakSet` collection.\n\n### Return value\n\nThe `WeakSet` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/WeakSet/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet.prototype.delete\n\nThe **`delete()`** method removes the specified element from a\n`WeakSet` object.\n\n## Syntax\n\n```js\ndelete(value)\n```\n\n### Parameters\n\n- `value`\n  - : Required. The object remove from the `WeakSet` object.\n\n### Return value\n\n`true` if an element in the `WeakSet` object has been removed\nsuccessfully. `false` if the `value` is not found in\nthe `WeakSet` or if the `value` is not an object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/WeakSet/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet.prototype.has\n\nThe **`has()`** method returns a boolean indicating whether an\nobject exists in a `WeakSet` or not.\n\n## Syntax\n\n```js\nhas(value)\n```\n\n### Parameters\n\n- `value`\n  - : Required. The object to test for presence in the `WeakSet`.\n\n### Return value\n\n- Boolean\n  - : Returns `true` if an element with the specified value exists in the\n    `WeakSet` object; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/WorkerLocation/WorkerLocation.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# WorkerLocation\n\nThe **`WorkerLocation`** interface defines the absolute location of the script executed by the Worker. Such an object is initialized for each worker and is available via the [`location`](../../globals/location.mdx) property obtained by calling `globalThis.location`.\n\n## Instance properties\n\n- [`WorkerLocation.href`](../../globals/WorkerLocation/href.mdx) _**read-only**_\n  - : Returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location.\n- [`WorkerLocation.protocol`](../../globals/WorkerLocation/protocol.mdx) _**read-only**_\n  - : Returns the [`protocol`](../../globals/URL/prototype/protocol.mdx) part of the worker's location.\n- [`WorkerLocation.host`](../../globals/WorkerLocation/host.mdx) _**read-only**_\n  - : Returns the [`host`](../../globals/URL/prototype/host.mdx) part of the worker's location.\n- [`WorkerLocation.hostname`](../../globals/WorkerLocation/hostname.mdx) _**read-only**_\n  - : Returns the [`hostname`](../../globals/URL/prototype/hostname.mdx) part of the worker's location.\n- [`WorkerLocation.origin`](../../globals/WorkerLocation/origin.mdx) _**read-only**_\n  - : Returns the worker's [`origin`](../../globals/URL/prototype/origin.mdx).\n- [`WorkerLocation.port`](../../globals/WorkerLocation/port.mdx) _**read-only**_\n  - : Returns the [`port`](../../globals/URL/prototype/port.mdx) part of the worker's location.\n- [`WorkerLocation.pathname`](../../globals/WorkerLocation/pathname.mdx) _**read-only**_\n  - : Returns the [`pathname`](../../globals/URL/prototype/pathname.mdx) part of the worker's location.\n- [`WorkerLocation.search`](../../globals/WorkerLocation/search.mdx) _**read-only**_\n  - : Returns the [`search`](../../globals/URL/prototype/search.mdx) part of the worker's location.\n- [`WorkerLocation.hash`](../../globals/WorkerLocation/hash.mdx) _**read-only**_\n  - : Returns the [`hash`](../../globals/URL/prototype/hash.mdx) part of the worker's location.\n\n## Instance methods\n\n- [`WorkerLocation.toString`](../../globals/WorkerLocation/toString.mdx)\n  - : Returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location. It is a synonym for [`WorkerLocation.href`](../../globals/WorkerLocation/href.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/WorkerLocation/hash.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.hash\n\nThe **`hash`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`hash`](../../globals/URL/prototype/hash.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/WorkerLocation/host.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.host\n\nThe **`host`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`host`](../../globals/URL/prototype/host.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/WorkerLocation/hostname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.hostname\n\nThe **`hostname`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`hostname`](../../globals/URL/prototype/hostname.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/WorkerLocation/href.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.href\n\nThe **`href`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/WorkerLocation/origin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.origin\n\nThe **`origin`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the worker's [`origin`](../../globals/URL/prototype/origin.mdx).\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/WorkerLocation/pathname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.pathname\n\nThe **`pathname`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`pathname`](../../globals/URL/prototype/pathname.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/WorkerLocation/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.port\n\nThe **`port`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`port`](../../globals/URL/prototype/port.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/WorkerLocation/protocol.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.protocol\n\nThe **`protocol`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`protocol`](../../globals/URL/prototype/protocol.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/WorkerLocation/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.search\n\nThe **`search`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`search`](../../globals/URL/prototype/search.mdx) part of the worker's location.\n\n## Value\n\nA string.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/WorkerLocation/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.toString()\n\nThe **`toString()`** method of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location. It is a synonym for [`WorkerLocation.href`](../../globals/WorkerLocation/href.mdx).\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone [`undefined`](../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/WritableStream/WritableStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream()\n\nThe **`WritableStream()`** constructor creates\na new `WritableStream` object instance.\n\n## Syntax\n\n```js\nnew WritableStream(underlyingSink)\nnew WritableStream(underlyingSink, queuingStrategy)\n```\n\n### Parameters\n\n- `underlyingSink` _**optional**_\n\n  - : An object containing methods and properties that define how the constructed stream\n    instance will behave. `underlyingSink` can contain the following:\n\n    - `start(controller)` _**optional**_\n      - : This is a method, called immediately when the object is constructed. The\n        contents of this method are defined by the developer, and should aim to get access\n        to the underlying sink. If this process is to be done asynchronously, it can\n        return a promise to signal success or failure. The `controller`\n        parameter passed to this method is a\n        `WritableStreamDefaultController`. This can be used by the developer\n        to control the stream during set up.\n    - `write(chunk, controller)` _**optional**_\n      - : This method, also defined by the developer, will be called when a new chunk of\n        data (specified in the `chunk` parameter) is ready to be written to the\n        underlying sink. It can return a promise to signal success or failure of the write\n        operation. The `controller` parameter passed to this method is a\n        `WritableStreamDefaultController` that can be used by the developer\n        to control the stream as more chunks are submitted for writing. This method will\n        be called only after previous writes have succeeded, and never after the stream is\n        closed or aborted (see below).\n    - `close(controller)` _**optional**_\n      - : This method, also defined by the developer, will be called if the app signals\n        that it has finished writing chunks to the stream. The contents should do whatever\n        is necessary to finalize writes to the underlying sink, and release access to it.\n        If this process is asynchronous, it can return a promise to signal success or\n        failure. This method will be called only after all queued-up writes have\n        succeeded. The `controller` parameter passed to this method is a\n        `WritableStreamDefaultController`, which can be used to control the\n        stream at the end of writing.\n    - `abort(reason)` _**optional**_\n      - : This method, also defined by the developer, will be called if the app signals\n        that it wishes to abruptly close the stream and put it in an errored state. It can\n        clean up any held resources, much like `close()`, but\n        `abort()` will be called even if writes are queued up — those chunks\n        will be thrown away. If this process is asynchronous, it can return a promise to\n        signal success or failure. The `reason` parameter contains a\n        string describing why the stream was aborted.\n\n- `queuingStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer — this defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk` — this indicates the size to use for each chunk, in bytes.\n\n    > **Note:** You could define your own custom\n    > `queuingStrategy`, or use an instance of\n    > `ByteLengthQueuingStrategy` or `CountQueuingStrategy`\n    > for this object value. If no `queuingStrategy` is supplied, the default\n    > used is the same as a `CountQueuingStrategy` with a high water mark of 1\\.\n\n### Return value\n\nAn instance of the `WritableStream` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/WritableStream/prototype/abort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream.abort()\n\nThe **`abort()`** method of the `WritableStream` interface aborts the stream, signaling that the producer can no longer successfully write to the stream and it is to be immediately moved to an error state, with any queued writes discarded.\n\n## Syntax\n\n```js\nabort(reason)\n```\n\n### Parameters\n\n- `reason`\n  - : A string providing a human-readable reason for the abort.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason` parameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to abort is not a `WritableStream`, or it is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/WritableStream/prototype/getWriter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream.getWriter()\n\nThe **`getWriter()`** method of the `WritableStream` interface returns a new instance of `WritableStreamDefaultWriter` and locks the stream to that instance.\nWhile the stream is locked, no other writer can be acquired until this one is released.\n\n## Syntax\n\n```js\ngetWriter()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `WritableStreamDefaultWriter` object instance.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to create a writer for is not a `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/WritableStream/prototype/locked.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream.locked\n\nThe **`locked`** read-only property of the `WritableStream` interface returns a boolean indicating whether the `WritableStream` is locked to a writer.\n\n## Value\n\nA boolean value indicating whether or not the writable stream is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/WritableStreamDefaultController/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultController.error()\n\nThe **`error()`** method of the\n`WritableStreamDefaultController` interface causes any future interactions\nwith the associated stream to error.\n\nThis method is rarely used, since usually it suffices to return a rejected promise from\none of the underlying sink's methods. However, it can be useful for suddenly shutting\ndown a stream in response to an event outside the normal lifecycle of interactions with\nthe underlying sink.\n\n## Syntax\n\n```js\nerror(message)\n```\n\n### Parameters\n\n- `message`\n  - : A string representing the error you want future interactions to\n    fail with.\n\n### Return value\n\nNone `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to error is not a `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/WritableStreamDefaultWriter/WritableStreamDefaultWriter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter()\n\nThe **`WritableStreamDefaultWriter()`**\nconstructor creates a new `WritableStreamDefaultWriter` object instance.\n\n## Syntax\n\n```js\nnew WritableStreamDefaultWriter(stream)\n```\n\n### Parameters\n\n- `stream`\n  - : The `WritableStream` to be written to.\n\n### Return value\n\nAn instance of the `WritableStreamDefaultWriter` object.\n\n### Exceptions\n\n- `TypeError`\n  - : The provided `stream` value is not a `WritableStream`, or it\n    is locked to another writer already.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/WritableStreamDefaultWriter/prototype/abort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.abort()\n\nThe **`abort()`** method of the\n`WritableStreamDefaultWriter` interface aborts the stream, signaling that\nthe producer can no longer successfully write to the stream and it is to be immediately\nmoved to an error state, with any queued writes discarded.\n\nIf the writer is active, the `abort()` method behaves the same as that for\nthe associated stream (`WritableStream.abort()`). If not, it returns a\nrejected promise.\n\n## Syntax\n\n```js\nabort()\nabort(reason)\n```\n\n### Parameters\n\n- `reason` _**optional**_\n  - : A string representing a human-readable reason for the abort.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason`\nparameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to abort is not a `WritableStream`, or it is\n    locked.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/WritableStreamDefaultWriter/prototype/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.close()\n\nThe **`close()`** method of the\n`WritableStreamDefaultWriter` interface closes the associated writable\nstream.\n\nThe underlying sink will finish processing any previously-written chunks, before\ninvoking the close behavior. During this time any further attempts to write will fail\n(without erroring the stream).\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise`, which fulfills with the `undefined` if all\nremaining chunks were successfully written before the close, or rejects with an error if\na problem was encountered during the process.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to close is not a `WritableStream`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/WritableStreamDefaultWriter/prototype/closed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.closed\n\nThe **`closed`** read-only property of the\n`WritableStreamDefaultWriter` interface returns a\n`Promise` that fulfills if the stream becomes closed, or rejects if\nthe stream errors or the writer's lock is released.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/WritableStreamDefaultWriter/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.desiredSize\n\nThe **`desiredSize`** read-only property of the\n`WritableStreamDefaultWriter` interface returns the desired size required\nto fill the stream's internal queue.\n\n## Value\n\nAn integer. Note that this can be negative if the queue is over-full.\n\nThe value will be `null` if the stream cannot be successfully written to\n(due to either being errored, or having an abort queued up), and zero if the stream is\nclosed.\n\n### Exceptions\n\n- `TypeError`\n  - : The writer's lock is released.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/WritableStreamDefaultWriter/prototype/ready.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.ready\n\nThe **`ready`** read-only property of the\n`WritableStreamDefaultWriter` interface returns a `Promise`\nthat resolves when the desired size of the stream's internal queue transitions from\nnon-positive to positive, signaling that it is no longer applying backpressure.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/WritableStreamDefaultWriter/prototype/releaseLock.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.releaseLock()\n\nThe **`releaseLock()`** method of the\n`WritableStreamDefaultWriter` interface releases the writer's lock on the\ncorresponding stream. After the lock is released, the writer is no longer active. If the\nassociated stream is errored when the lock is released, the writer will appear errored\nin the same way from now on; otherwise, the writer will appear closed.\n\n## Syntax\n\n```js\nreleaseLock()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone `undefined`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/WritableStreamDefaultWriter/prototype/write.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.write()\n\nThe **`write()`** method of the\n`WritableStreamDefaultWriter` interface writes a passed chunk of data to a\n`WritableStream` and its underlying sink, then returns a\n`Promise` that resolves to indicate the success or failure of the write\noperation.\n\nNote that what \"success\" means is up to the underlying sink; it might indicate that the\nchunk has been accepted, and not necessarily that it is safely saved to its ultimate\ndestination.\n\n## Syntax\n\n```js\nwrite(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : A block of binary data to pass to the `WritableStream`.\n\n### Return value\n\nA `Promise`, which fulfills with the `undefined` upon a\nsuccessful write, or rejects if the write fails or stream becomes errored before the\nwriting process is initiated.\n\n### Exceptions\n\n- `TypeError`\n  - : The target stream is not a writable stream, or it does not have an owner.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/atob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# atob()\n\nThe **`atob()`** function decodes a\nstring of data which has been encoded using Base64 encoding. You can use\nthe `btoa()` method to encode and transmit\ndata which may otherwise cause communication problems, then transmit it and use the\n`atob()` method to decode the data again. For example, you can encode,\ntransmit, and decode control characters such as ASCII values 0 through 31.\n\nFor use with Unicode or UTF-8 strings, see the note on \"Unicode strings\" in the page\nfor `btoa()`.\n\n## Syntax\n\n```js\natob(encodedData)\n```\n\n### Parameters\n\n- `encodedData`\n  - : A binary string (i.e., a string in which each character in the string is treated as a byte of binary data) containing base64-encoded data.\n\n### Return value\n\nAn ASCII string containing decoded data from `encodedData`.\n\n### Exceptions\n\n- `InvalidCharacterError`\n  - : Thrown if `encodedData` is not valid base64.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/btoa.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# btoa()\n\nThe **`btoa()`** method creates a\nBase64-encoded ASCII string from a _binary string_ (i.e., a\nstring in which each character in the string is treated as a byte\nof binary data).\n\nYou can use this method to encode data which may otherwise cause communication\nproblems, transmit it, then use the `atob()` method to decode the data again. For example, you can encode control\ncharacters such as ASCII values 0 through 31.\n\n## Syntax\n\n```js\nbtoa(stringToEncode)\n```\n\n### Parameters\n\n- `stringToEncode`\n  - : The _binary string_ to encode.\n\n### Return value\n\nAn ASCII string containing the Base64 representation of\n`stringToEncode`.\n\n### Exceptions\n\n- `InvalidCharacterError`\n  - : The string contained a character that did not fit in a single byte. See \"Unicode\n    strings\" below for more detail.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/clearInterval.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# clearInterval()\n\nThe global **`clearInterval()`** method cancels a timed, repeating action which\nwas previously established by a call to `setInterval()`.\nIf the parameter provided does not identify a previously established action,\nthis method does nothing.\n\n## Syntax\n\n```js\nclearInterval(intervalID)\n```\n\n### Parameters\n\n- `intervalID`\n  - : The identifier of the repeated action you want to cancel. This ID was returned by\n    the corresponding call to `setInterval()`.\n\nIt's worth noting that the pool of IDs used by\n`setInterval()` and\n`setTimeout()` are shared, which\nmeans you can technically use `clearInterval()` and\n`clearTimeout()` interchangeably.\nHowever, for clarity, you should avoid doing so.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/clearTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# clearTimeout()\n\nThe global **`clearTimeout()`** method cancels a timeout previously established\nby calling `setTimeout()`.\n\nIf the parameter provided does not identify a previously established action,\nthis method does nothing.\n\n## Syntax\n\n```js\nclearTimeout(timeoutID)\n```\n\n### Parameters\n\n- `timeoutID`\n  - : The identifier of the timeout you want to cancel. This ID was returned by the\n    corresponding call to `setTimeout()`.\n\nIt's worth noting that the pool of IDs used by\n`setTimeout()` and\n`setInterval()` are shared, which\nmeans you can technically use `clearTimeout()` and\n`clearInterval()`\ninterchangeably. However, for clarity, you should avoid doing so.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/console/assert.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.assert()\n\nThe **`console.assert()`** method writes an error message to\nthe console if the assertion is false. If the assertion is true, nothing happens.\n\n## Syntax\n\n```js\nassert(assertion, obj1)\nassert(assertion, obj1, obj2)\nassert(assertion, obj1, obj2, /* … ,*/ objN)\n\nassert(assertion, msg)\nassert(assertion, msg, subst1)\nassert(assertion, msg, subst1, /* … ,*/ substN)\n```\n\n### Parameters\n\n- `assertion`\n  - : Any boolean expression. If the assertion is false, the message is written to the\n    console.\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output.\n- `msg`\n  - : A JavaScript string containing zero or more substitution strings.\n- `subst1` … `substN`\n  - : JavaScript objects with which to replace substitution strings within\n    `msg`. This parameter gives you additional control over the format of the\n    output.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/console/clear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.clear()\n\nThe **`console.clear()`** method clears the console if the console allows it.\n\n## Syntax\n\n```js\nclear()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/console/count.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.count()\n\nThe **`console.count()`** method logs the number of times that\nthis particular call to `count()` has been called.\n\n\n## Syntax\n\n```js\ncount()\ncount(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : A string. If supplied, `count()` outputs the number of\n    times it has been called with that label. If omitted, `count()` behaves as\n    though it was called with the \"default\" label.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/console/countReset.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.countReset()\n\nThe **`console.countReset()`** method resets counter used with `console.count()`.\n\n## Syntax\n\n```js\ncountReset()\ncountReset(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : A string. If supplied, `countReset()` resets the count for\n    that label to 0. If omitted, `countReset()` resets the default counter to\n    0.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/console/debug.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.debug()\n\nThe **`console.debug()`** method outputs a message to the console at the \"debug\" log level.\n\n## Syntax\n\n```js\ndebug(obj1)\ndebug(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output to the console.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/console/dir.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.dir()\n\nThe method **`console.dir()`** displays a list of the properties of\nthe specified JavaScript object.\n\n## Syntax\n\n```js\ndir(object)\n```\n\n### Parameters\n\n- `object`\n  - : A JavaScript object whose properties should be output.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/console/dirxml.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.dirxml()\n\nThe **`console.dirxml()`** method displays the supplied object in the console.\n\n## Syntax\n\n```js\ndirxml(object)\n```\n\n### Parameters\n\n- `object`\n  - : A JavaScript object whose properties should be output.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/console/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.error()\n\nThe **`console.error()`** method outputs an error message console.\n\n## Syntax\n\n```js\nerror(obj1)\nerror(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of\n    these objects are appended together in the order listed and output.\n\n### Return value\n\nNone `undefined`."
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/console/group.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.group()\n\nThe **`console.group()`** method creates a new inline group in the console, until `console.groupEnd()` is called.\n\n## Syntax\n\n```js\ngroup()\ngroup(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : Label for the group.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/console/groupCollapsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.groupCollapsed()\n\nThe **`console.groupCollapsed()`** method creates a new inline group in the Web Console. Unlike `console.group()`,\nhowever, the new group is created collapsed. The user will need to use the disclosure\nbutton next to it to expand it, revealing the entries created in the group.\n\nCall `console.groupEnd()` to back out to the parent group.\n\n## Syntax\n\n```js\ngroupCollapsed()\ngroupCollapsed(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : Label for the group.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/console/groupEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.groupEnd()\n\nThe **`console.groupEnd()`** method exits the current inline group in the console.\n\n## Syntax\n\n```js\ngroupEnd()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/console/info.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.info()\n\nThe **`console.info()`** method outputs an informational message to the console.\n\n## Syntax\n\n```js\ninfo(obj1)\ninfo(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/console/log.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.log()\n\nThe **`console.log()`** method outputs a message to the console.\n\n## Syntax\n\n```js\nlog(obj1)\nlog(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output. Please be warned that if\n    you log objects in the latest versions of Chrome and Firefox what you get logged on\n    the console is a _reference to the object_, which is not necessarily the\n    'value' of the object at the moment in time you call `console.log()`, but\n    it is the value of the object at the moment you open the console.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/console/time.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.time()\n\nThe **`console.time()`** method starts a timer you can use to track\nhow long an operation takes. You give each timer a unique name. When you call `console.timeEnd()` with the same name, the\nbrowser will output the time, in milliseconds, that elapsed since the timer was started.\n\n## Syntax\n\n```js\ntime(label)\n```\n\n### Parameters\n\n- `label`\n  - : A `string` representing the name to give the new timer. This will identify the timer; use the same name when\n    calling `console.timeEnd()` to stop the timer and get the time output to\n    the console.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/console/timeEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.timeEnd()\n\nThe **`console.timeEnd()`** stops a timer that was previously started by calling `console.time()`.\n\n## Syntax\n\n```js\ntimeEnd(label)\n```\n\n### Parameters\n\n- `label`\n  - : A `string` representing the name of the timer to stop. Once stopped, the elapsed time is automatically\n    displayed in the console.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/console/timeLog.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.timeLog()\n\nThe **`console.timeLog()`** method logs the current value of a timer that was previously started by calling `console.time()`.\n\n## Syntax\n\n```js\ntimeLog()\ntimeLog(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : The name of the timer to log to the console. If this is omitted the label \"default\" is used.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/console/trace.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.trace()\n\nThe **`console.trace()`** method outputs a stack trace to the console.\n\n## Syntax\n\n```js\ntrace()\ntrace(object1, /* …, */ objectN)\n```\n\n### Parameters\n\n- `objects` __optional__\n  - : Zero or more objects to be output to console along with the trace. These are\n    assembled and formatted the same way they would be if passed to the `console.log()` method.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/console/warn.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.warn()\n\nThe **`console.warn()`** method outputs a warning message to the console.\n\n## Syntax\n\n```js\nwarn(obj1)\nwarn(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/crypto/getRandomValues.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Crypto.getRandomValues()\n\nThe **`Crypto.getRandomValues()`** method lets you get cryptographically strong random values.\nThe array given as the parameter is filled with random numbers (random in its cryptographic meaning).\n\n## Syntax\n\n```js\ngetRandomValues(typedArray)\n```\n\n### Parameters\n\n- `typedArray`\n  - : An integer-based `TypedArray`, that is one of: `Int8Array`, `Uint8Array`,\n    `Uint8ClampedArray`, `Int16Array`, `Uint16Array`,\n    `Int32Array`, `Uint32Array`, `BigInt64Array`,\n    `BigUint64Array` (but **not** `Float32Array` nor `Float64Array`).\n    All elements in the array will be overwritten with random numbers.\n\n### Return value\n\nThe same array passed as `typedArray` but with its contents replaced with the newly generated random numbers.\nNote that `typedArray` is modified in-place, and no copy is made.\n\n### Exceptions\n\n- `QuotaExceededError`\n  - : Thrown if the `byteLength` of `typedArray` exceeds 65,536.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/crypto/randomUUID.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Crypto.randomUUID()\n\nThe **`randomUUID()`** method is used to generate a v4 [UUID](https://developer.mozilla.org/en-US/docs/Glossary/UUID) using a cryptographically secure random number generator.\n\n## Syntax\n\n```js\nrandomUUID()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string containing a randomly generated, 36 character long v4 UUID."
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/crypto/subtle.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Crypto.subtle\n\nThe **`Crypto.subtle`** read-only property returns a\n[`SubtleCrypto`](../SubtleCrypto/SubtleCrypto.mdx) which can then be used to perform low-level\ncryptographic operations.\n\n## Value\n\nA [`SubtleCrypto`](../SubtleCrypto/SubtleCrypto.mdx) object you can use to interact with the Web Crypto API's\nlow-level cryptography features.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/decodeURI.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# decodeURI\n\nThe **`decodeURI()`** function decodes a Uniform Resource Identifier (URI) previously created by [`encodeURI()`](../globals/encodeURI.mdx) or a similar routine.\n\n## Syntax\n\n```js\ndecodeURI(encodedURI)\n```\n\n### Parameters\n\n- `encodedURI`\n  - : A complete, encoded Uniform Resource Identifier.\n\n### Return value\n\nA new string representing the unencoded version of the given encoded Uniform Resource Identifier (URI).\n\n### Exceptions\n\n- [`URIError`](../globals/URIError/URIError.mdx)\n  - : Thrown if `encodedURI` contains a `%` not followed by two hexadecimal digits, or if the escape sequence does not encode a valid UTF-8 character.\n\n## Description\n\n`decodeURI()` is a function property of the global object.\n\nThe `decodeURI()` function decodes the URI by treating each escape sequence in the form `%XX` as one UTF-8 code unit (one byte). In UTF-8, the number of leading 1 bits in the first byte, which may be 0 (for 1-byte ASCII characters), 2, 3, or 4, indicates the number of bytes in the character. So by reading the first escape sequence, `decodeURI()` can determine how many more escape sequences to consume. If `decodeURI()` fails to find the expected number of sequences, or if the escape sequences don't encode a valid UTF-8 character, a [`URIError`](../globals/URIError/URIError.mdx) is thrown.\n\n`decodeURI()` decodes all escape sequences, but if the escape sequence encodes one of the following characters, the escape sequence is preserved in the output string (because they are part of the URI syntax):\n\n```\n; / ? : @ & = + $ , #\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/decodeURIComponent.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# decodeURIComponent\n\nThe **`decodeURIComponent()`** function decodes a Uniform Resource Identifier (URI) component previously created by [`encodeURIComponent()`](./encodeURIComponent.mdx) or by a similar routine.\n\n\n## Syntax\n\n```js\ndecodeURIComponent(encodedURI)\n```\n\n### Parameters\n\n- `encodedURI`\n  - : An encoded component of a Uniform Resource Identifier.\n\n### Return value\n\nA new string representing the decoded version of the given encoded Uniform Resource Identifier (URI) component.\n\n### Exceptions\n\n- [`URIError`](../globals/URIError/URIError.mdx)\n  - : Thrown if `encodedURI` contains a `%` not followed by two hexadecimal digits, or if the escape sequence does not encode a valid UTF-8 character.\n\n## Description\n\n`decodeURIComponent()` is a function property of the global object.\n\n`decodeURIComponent()` uses the same decoding algorithm as described in [`decodeURI()`](./decodeURI.mdx). It decodes _all_ escape sequences, including those that are not created by [`encodeURIComponent()`](./encodeURIComponent.mdx), like `-.!~*'()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/encodeURI.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# encodeURI()\n\nThe **`encodeURI()`** function encodes a URI by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character (will only be four escape sequences for characters composed of two surrogate characters). Compared to [`encodeURIComponent()`](./encodeURIComponent.mdx), this function encodes fewer characters, preserving those that are part of the URI syntax.\n\n## Syntax\n\n```js\nencodeURI(uri)\n```\n\n### Parameters\n\n- `uri`\n  - : A string to be encoded as a URI.\n\n### Return value\n\nA new string representing the provided string encoded as a URI.\n\n### Exceptions\n\n- [`URIError`](./URIError/URIError.mdx)\n  - : Thrown if `uri` contains a [lone surrogate](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters).\n\n## Description\n\n`encodeURI()` is a function property of the global object.\n\nThe `encodeURI()` function escapes characters by UTF-8 code units, with each octet encoded in the format `%XX`, left-padded with 0 if necessary. Because lone surrogates in UTF-16 do not encode any valid Unicode character, they cause `encodeURI()` to throw a [`URIError`](./URIError/URIError.mdx).\n\n`encodeURI()` escapes all characters **except**:\n\n```\nA–Z a–z 0–9 - _ . ! ~ * ' ( )\n\n; / ? : @ & = + $ , #\n```\n\nThe characters on the second line are characters that may be part of the URI syntax, and are only escaped by `encodeURIComponent()`. Both `encodeURI()` and `encodeURIComponent()` do not encode the characters `-.!~*'()`, known as \"unreserved marks\", which do not have a reserved purpose but are allowed in a URI \"as is\". (See [RFC2396](https://www.ietf.org/rfc/rfc2396.txt))\n\nThe `encodeURI()` function does not encode characters that have special meaning (reserved characters) for a URI. The following example shows all the parts that a URI can possibly contain. Note how certain characters are used to signify special meaning:\n\n```\nhttp://username:password@www.example.com:80/path/to/file.php?foo=316&bar=this+has+spaces#anchor\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/encodeURIComponent.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# encodeURIComponent\n\nThe **`encodeURIComponent()`** function encodes a URI by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character (will only be four escape sequences for characters composed of two surrogate characters). Compared to [`encodeURI()`](./encodeURI.mdx), this function encodes more characters, including those that are part of the URI syntax.\n\n## Syntax\n\n```js\nencodeURIComponent(uriComponent)\n```\n\n### Parameters\n\n- `uriComponent`\n  - : A string to be encoded as a URI component (a path, query string, fragment, etc.). Other values are [converted to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion).\n\n### Return value\n\nA new string representing the provided `uriComponent` encoded as a URI component.\n\n### Exceptions\n\n- [`URIError`](./URIError/URIError.mdx)\n  - : Thrown if `uriComponent` contains a [lone surrogate](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters).\n\n## Description\n\n`encodeURIComponent()` is a function property of the global object.\n\n`encodeURIComponent()` uses the same encoding algorithm as described in [`encodeURI()`](./encodeURI.mdx). It escapes all characters **except**:\n\n```text\nA–Z a–z 0–9 - _ . ! ~ * ' ( )\n```\n\nCompared to [`encodeURI()`](./encodeURI.mdx), `encodeURIComponent()` escapes a larger set of characters. Use `encodeURIComponent()` on user-entered fields from forms `POST`'d to the server — this will encode `&` symbols that may inadvertently be generated during data entry for special HTML entities or other characters that require encoding/decoding. For example, if a user writes `Jack & Jill`, without `encodeURIComponent()`, the ampersand could be interpreted on the server as the start of a new field and jeopardize the integrity of the data.\n\nFor [`application/x-www-form-urlencoded`](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#application/x-www-form-urlencoded-encoding-algorithm), spaces are to be replaced by `+`, so one may wish to follow a `encodeURIComponent()` replacement with an additional replacement of `%20` with `+`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/escape.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# escape()\n\n> **Note:** `escape()` is a non-standard function implemented by browsers and was only standardized for cross-engine compatibility. It is not required to be implemented by all JavaScript engines and may not work everywhere. Use [`encodeURIComponent()`](./encodeURIComponent.mdx) or [`encodeURI()`](./encodeURI.mdx) if possible.\n\nThe **`escape()`** function computes a new string in which certain characters have been replaced by hexadecimal escape sequences.\n\n## Syntax\n\n```js\nescape(str)\n```\n\n### Parameters\n\n- `str`\n  - : A string to be encoded.\n\n### Return value\n\nA new string in which certain characters have been escaped.\n\n## Description\n\n`escape()` is a function property of the global object.\n\nThe `escape()` function replaces all characters with escape sequences, with the exception of ASCII word characters (A–Z, a–z, 0–9, _) and `@*_+-./`. Characters are escaped by UTF-16 code units. If the code unit's value is less than 256, it is represented by a two-digit hexadecimal number in the format `%XX`, left-padded with 0 if necessary. Otherwise, it is represented by a four-digit hexadecimal number in the format `%uXXXX`, left-padded with 0 if necessary.\n\n> **Note:** This function was used mostly for URL encoding and is partly based on the escape format in rfc(1738). The escape format is _not_ an [escape sequence](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#escape_sequences) in string literals. You can replace `%XX` with `\\xXX` and `%uXXXX` with `\\uXXXX` to get a string containing actual string-literal escape sequences.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/eval.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# eval\n\n> **Warning:** Executing JavaScript from a string is an enormous security risk. It is far too easy for a bad actor to run arbitrary code when you use `eval()`. See [never use direct eval](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval#never_use_direct_eval!) for details.\n\nThe **`eval()`** function evaluates JavaScript code represented as a string and returns its completion value. The source is parsed as a script.\n\n## Syntax\n\n```js\neval(script)\n```\n\n### Parameters\n\n- `script`\n  - : A string representing a JavaScript expression, statement, or sequence of statements. The expression can include variables and properties of existing objects. It will be parsed as a script, so [`import`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/import) declarations (which can only exist in modules) are not allowed.\n\n### Return value\n\nThe completion value of evaluating the given code. If the completion value is empty, [`undefined`](./undefined.mdx) is returned. If `script` is not a string primitive, `eval()` returns the argument unchanged.\n\n### Exceptions\n\nThrows any exception that occurs during evaluation of the code, including[ `SyntaxError`](./SyntaxError/SyntaxError.mdx) if `script` fails to be parsed as a script.\n\n## Description\n\n`eval()` is a function property of the global object.\n\nThe argument of the `eval()` function is a string. It will evaluate the source string as a script body, which means both statements and expressions are allowed. It returns the completion value of the code. For expressions, it's the value the expression evaluates to. Many statements and declarations have completion values as well, but the result may be surprising (for example, the completion value of an assignment is the assigned value, but the completion value of [`let`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/let) is undefined), so it's recommended to not rely on statements' completion values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/fetch.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# fetch()\n\nThe global **`fetch()`** method starts the process of fetching a\nresource from the network, returning a promise which is fulfilled once the response is\navailable.\n\nThe promise resolves to the `Response` object\nrepresenting the response to your request.\n\nA `fetch()` promise only rejects when a\nnetwork error is encountered (which is usually when there's a permissions issue or\nsimilar). A `fetch()` promise _does\nnot_ reject on HTTP errors (`404`, etc.). Instead, a\n`then()` handler must check the `Response.ok` and/or\n`Response.status` properties.\n\n> **Note:** The `fetch()` method's parameters are identical to\n> those of the `Request()` constructor.\n\n## Syntax\n\n```js\nfetch(resource)\nfetch(resource, options)\n```\n\n### Parameters\n\n- `resource`\n\n  - : This defines the resource that you wish to fetch. This can either be:\n\n    - A string or any other object with a \"toString\" method.\n    - A `Request` object.\n\n- `options` _**optional**_\n\n  - : An object containing any custom settings that you want to apply to the request. The\n    possible options are:\n\n    - `method`\n      - : The request method, e.g., `GET`, `POST`.\n    - `headers`\n      - : Any headers you want to add to your request, contained within a\n        `Headers` object or an object literal with `String`\n        values.\n    - `body`\n      - : Any body that you want to add to your request: this can be an `ArrayBuffer`, a `TypedArray`, a `DataView`, a `URLSearchParams`, string object or literal, or a `ReadableStream` object.\n    - `backend` _**Fastly-specific**_\n      - *Fastly-specific*\n    - `cacheOverride` _**Fastly-specific**_\n    - `cacheKey` _**Fastly-specific**_\n\n### Return value\n\nA `Promise` that resolves to a `Response` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/globalThis.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# globalThis\n\nThe global **`globalThis`** property contains the [global `this`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this#global_context) value, which is usually akin to the [global object](https://developer.mozilla.org/docs/Glossary/Global_object).\n\n## Value\n\nThe global `this` object.\n\n> **Note:** The `globalThis` property is configurable and writable so that code authors can hide it when executing untrusted code and prevent exposing the global object.\n\n## Description\n\nThe `globalThis` property provides a standard way of accessing the global `this` value (and hence the global object itself) across environments.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/isFinite.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# isFinite\n\nThe global **`isFinite()`** function determines whether the\npassed value is a finite number. If needed, the parameter is first converted to a\nnumber.\n\n## Syntax\n\n```js\nisFinite(testValue)\n```\n\n### Parameters\n\n- `testValue`\n  - : The value to be tested for finiteness.\n\n### Return value\n\n**`false`** if the argument is (or will be coerced to) positive\nor negative [`Infinity`](./Infinity.mdx) or [`NaN`](./NaN.mdx) or [`undefined`](./undefined.mdx);\notherwise, **`true`**.\n\n## Description\n\n`isFinite` is a function property of the global object.\n\nYou can use this function to determine whether a number is a finite number. The\n`isFinite` function examines the number in its argument. If the argument is\n`NaN`, positive infinity, or negative infinity, this method returns\n`false`; otherwise, it returns `true`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/isNaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# isNaN()\n\nThe **`isNaN()`** function determines whether a value is [`NaN`](./NaN.mdx) when converted to a number. Because coercion inside the `isNaN()` function can be [surprising](#description), you may alternatively want to use [`Number.isNaN()`](./Number/isNaN.mdx).\n\n## Syntax\n\n```js\nisNaN(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested.\n\n### Return value\n\n`true` if the given value is [`NaN`](./NaN.mdx) after being [converted to a number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_coercion); otherwise, `false`.\n\n## Description\n\n`isNaN()` is a function property of the global object.\n\nFor number values, `isNaN()` tests if the number is the value [`NaN`](./NaN.mdx). When the argument to the `isNaN()` function is not of type [Number](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#number_type), the value is first coerced to a number, and the resulting value is then compared against [`NaN`](./NaN.mdx).\n\nThis behavior of `isNaN()` for non-numeric arguments can be confusing! For example, an empty string is coerced to 0, while a boolean is coerced to 0 or 1; both values are intuitively \"not numbers\", but they don't evaluate to `NaN`, so `isNaN()` returns `false`. Therefore, `isNaN()` answers neither the question \"is the input the floating point [`NaN`](./NaN.mdx) value\" nor the question \"is the input not a number\".\n\n[`Number.isNaN()`](./Number/isNaN.mdx) is a more reliable way to test whether a value is the number value `NaN` or not. Alternatively, the expression `x !== x` can be used, and neither of the solutions is subject to the false positives that make the global `isNaN()` unreliable. To test if a value is a number, use [`typeof x === \"number\"`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/typeof).\n\nThe `isNaN()` function answers the question \"is the input functionally equivalent to [`NaN`](./NaN.mdx) when used in a number context\". If `isNaN(x)` returns `false`, you can use `x` in an arithmetic expression as if it's a valid number that's not `NaN`. If `isNaN(x)` returns `true`, `x` will get coerced to `NaN` and make most arithmetic expressions return `NaN` (because `NaN` propagates). You can use this, for example, to test whether an argument to a function is arithmetically processable (usable \"like\" a number), and handle values that are not number-like by throwing an error, providing a default value, etc. This way, you can have a function that makes use of the full versatility JavaScript provides by implicitly converting values depending on context.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/location.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# location\n\nThe **`location`** read-only property returns a\n[`Location`](../globals/WorkerLocation/WorkerLocation.mdx) object with information about the current location of the\ndocument.\n\nSee [`Location`](../globals/WorkerLocation/WorkerLocation.mdx) for all available properties.\n\n## Value\n\nA [`Location`](../globals/WorkerLocation/WorkerLocation.mdx) object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/parseFloat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# parseFloat()\n\nThe **`parseFloat()`** function parses a string argument and returns a floating point number.\n\n## Syntax\n\n```js\nparseFloat(string)\n```\n\n### Parameters\n\n- `string`\n  - : The value to parse, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). Leading whitespace in this argument is ignored.\n\n### Return value\n\nA floating point number parsed from the given `string`, or [`NaN`](./NaN.mdx) when the first non-whitespace character cannot be converted to a number.\n\n> **Note:** JavaScript does not have the distinction of \"floating point numbers\" and \"integers\" on the language level. [`parseInt()`](./parseInt.mdx) and `parseFloat()` only differ in their parsing behavior, but not necessarily their return values. For example, `parseInt(\"42\")` and `parseFloat(\"42\")` would return the same value: a `Number` 42.\n\n## Description\n\nThe `parseFloat` function converts its first argument to a string, parses that string as a decimal number literal, then returns a number or `NaN`. The number syntax it accepts can be summarized as:\n\n- The characters accepted by `parseFloat()` are plus sign (`+`), minus sign (`-` U+002D HYPHEN-MINUS), decimal digits (`0` – `9`), decimal point (`.`), exponent indicator (`e` or `E`), and the `\"Infinity\"` literal.\n- The `+`/`-` signs can only appear strictly at the beginning of the string, or immediately following the `e`/`E` character. The decimal point can only appear once, and only before the `e`/`E` character. The `e`/`E` character can only appear once, and only if there is at least one digit before it.\n- Leading spaces in the argument are trimmed and ignored.\n- `parseFloat()` can also parse and return [`Infinity`](./Infinity.mdx) or `-Infinity` if the string starts with `\"Infinity\"` or `\"-Infinity\"` preceded by none or more white spaces.\n- `parseFloat()` picks the longest substring starting from the beginning that generates a valid number literal. If it encounters an invalid character, it returns the number represented up to that point, ignoring the invalid character and all characters following it.\n- If the argument's first character can't start a legal number literal per the syntax above, `parseFloat` returns [`NaN`](./NaN.mdx).\n\nSyntax-wise, `parseFloat()` parses a subset of the syntax that the [`Number()`](./Number/Number.mdx) function accepts. Namely, `parseFloat()` does not support non-decimal literals with `0x`, `0b`, or `0o` prefixes but supports everything else. However, `parseFloat()` is more lenient than `Number()` because it ignores trailing invalid characters, which would cause `Number()` to return `NaN`.\n\nSimilar to number literals and `Number()`, the number returned from `parseFloat()` may not be exactly equal to the number represented by the string, due to floating point range and inaccuracy. For numbers outside the `-1.7976931348623158e+308` – `1.7976931348623158e+308` range (see `Number.MAX_VALUE`), `-Infinity` or `Infinity` is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/parseInt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# parseInt\n\nThe **`parseInt()`** function parses a string argument and returns an integer of the specified [radix](https://en.wikipedia.org/wiki/Radix) (the base in mathematical numeral systems).\n\n\n\n## Syntax\n\n```js\nparseInt(string)\nparseInt(string, radix)\n```\n\n### Parameters\n\n- `string`\n  - : A string starting with an integer. Leading whitespace in this argument is ignored.\n- `radix` _**optional**_\n\n  - : An integer between `2` and `36` that represents the _radix_ (the base in mathematical numeral systems) of the `string`. It is converted to a [32-bit integer](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#fixed-width_number_conversion); if it's outside the range of \\[2, 36] after conversion, the function will always return `NaN`. If `0` or not provided, the radix will be inferred based on `string`'s value. Be careful — this does NOT always default to `10`! The [description below](#description) explains in more detail what happens when `radix` is not provided.\n\n### Return value\n\nAn integer parsed from the given `string`, or [`NaN`](./NaN.mdx) when\n\n- the `radix` as a 32-bit integer is smaller than `2` or bigger than `36`, or\n- the first non-whitespace character cannot be converted to a number.\n\n> **Note:** JavaScript does not have the distinction of \"floating point numbers\" and \"integers\" on the language level. `parseInt()` and [`parseFloat()`](./parseFloat.mdx) only differ in their parsing behavior, but not necessarily their return values. For example, `parseInt(\"42\")` and `parseFloat(\"42\")` would return the same value: a `Number` 42.\n\n## Description\n\nThe `parseInt` function converts its first argument to a string, parses that string, then returns an integer or `NaN`.\n\nIf not `NaN`, the return value will be the integer that is the first argument taken as a number in the specified `radix`. (For example, a `radix` of `10` converts from a decimal number, `8` converts from octal, `16` from hexadecimal, and so on.)\n\nThe `radix` argument is converted to a number. If it's unprovided, or if the value becomes 0, `NaN` or `Infinity` (`undefined` is coerced to `NaN`), JavaScript assumes the following:\n\n1. If the input `string`, with leading whitespace and possible `+`/`-` signs removed, begins with `0x` or `0X` (a zero, followed by lowercase or uppercase X), `radix` is assumed to be `16` and the rest of the string is parsed as a hexadecimal number.\n2. If the input `string` begins with any other value, the radix is `10` (decimal).\n\n> **Note:** Other prefixes like `0b`, which are valid in [number literals](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#binary), are treated as normal digits by `parseInt()`. `parseInt()` does _not_ treat strings beginning with a `0` character as octal values either. The only prefix that `parseInt()` recognizes is `0x` or `0X` for hexadecimal values — everything else is parsed as a decimal value if `radix` is missing.\n\nIf the radix is `16`, `parseInt()` allows the string to be optionally prefixed by `0x` or `0X` after the optional sign character (`+`/`-`).\n\nIf the radix value (coerced if necessary) is not in range \\[2, 36] (inclusive) `parseInt` returns `NaN`.\n\nFor radices above `10`, letters of the English alphabet indicate numerals greater than `9`. For example, for hexadecimal numbers (base `16`), `A` through `F` are used. The letters are case-insensitive.\n\n`parseInt` understands exactly two signs: `+` for positive, and `-` for negative. It is done as an initial step in the parsing after whitespace is removed. If no signs are found, the algorithm moves to the following step; otherwise, it removes the sign and runs the number-parsing on the rest of the string.\n\nIf `parseInt` encounters a character that is not a numeral in the specified `radix`, it ignores it and all succeeding characters and returns the integer value parsed up to that point. For example, although `1e3` technically encodes an integer (and will be correctly parsed to the integer `1000` by [`parseFloat()`](./parseFloat.mdx), `parseInt(\"1e3\", 10)` returns `1`, because `e` is not a valid numeral in base 10. Because `.` is not a numeral either, the return value will always be an integer.\n\nIf the first character cannot be converted to a number with the radix in use, `parseInt` returns `NaN`. Leading whitespace is allowed.\n\nFor arithmetic purposes, the `NaN` value is not a number in any radix. You can call the [`Number.isNaN`](./Number/isNaN.mdx) function to determine if the result of `parseInt` is `NaN`. If `NaN` is passed on to arithmetic operations, the operation result will also be `NaN`.\n\nBecause large numbers use the `e` character in their string representation (e.g. `6.022e23` for 6.022 × 10<sup>23</sup>), using `parseInt` to truncate numbers will produce unexpected results when used on very large or very small numbers. `parseInt` should _not_ be used as a substitute for [`Math.trunc()`](./Math/trunc.mdx).\n\nTo convert a number to its string literal in a particular radix, use [`thatNumber.toString(radix)`](./Number/prototype/toString.mdx).\n\nBecause `parseInt()` returns a number, it may suffer from loss of precision if the integer represented by the string is [outside the safe range](./Number/isSafeInteger.mdx). The [`BigInt`](./BigInt/BigInt.mdx) function supports parsing integers of arbitrary length accurately, by returning a `BigInt`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/setInterval.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# setInterval()\n\nThe **`setInterval()`** method, repeatedly\ncalls a function or executes a code snippet, with a fixed time delay between each\ncall.\n\nThis method returns an interval ID which uniquely identifies the interval, so you\ncan remove it later by calling `clearInterval()`.\n\n## Syntax\n\n```js\nsetInterval(code)\nsetInterval(code, delay)\n\nsetInterval(func)\nsetInterval(func, delay)\nsetInterval(func, delay, arg0)\nsetInterval(func, delay, arg0, arg1)\nsetInterval(func, delay, arg0, arg1, /* … ,*/ argN)\n```\n\n### Parameters\n\n- `func`\n  - : A `function` to be executed every `delay` milliseconds. The first execution happens after `delay` milliseconds.\n- `code`\n  - : An optional syntax allows you to include a string instead of a function, which is\n    compiled and executed every `delay` milliseconds. This syntax is _not\n    recommended_ for the same reasons that make using `eval() a\n    security risk.\n- `delay` _**optional**_\n  - : The time, in milliseconds (thousandths of a second), the timer should delay in\n    between executions of the specified function or code. Defaults to 0 if not specified.\n    below for details on the permitted range of `delay` values.\n- `arg0, …, argN` _**optional**_\n  - : Additional arguments which are passed through to the function specified by\n    _func_ once the timer expires.\n\n### Return value\n\nThe returned `intervalID` is a numeric, non-zero value which identifies the\ntimer created by the call to `setInterval()`; this value can be passed to\n`clearInterval()` to cancel the interval.\n\nIt may be helpful to be aware that `setInterval()` and\n`setTimeout()` share the same pool\nof IDs, and that `clearInterval()` and\n`clearTimeout()` can technically\nbe used interchangeably. For clarity, however, you should try to always match them to\navoid confusion when maintaining your code.\n\n> **Note:** The `delay` argument is converted to a\n> signed 32-bit integer. This effectively limits `delay` to 2147483647 ms,\n> since it's specified as a signed integer in the IDL.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/setTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# setTimeout()\n\nThe global **`setTimeout()`** method sets a timer which executes a function or specified\npiece of code once the timer expires.\n\n## Syntax\n\n```js\nsetTimeout(code)\nsetTimeout(code, delay)\n\nsetTimeout(functionRef)\nsetTimeout(functionRef, delay)\nsetTimeout(functionRef, delay, param1)\nsetTimeout(functionRef, delay, param1, param2)\nsetTimeout(functionRef, delay, param1, param2, /* … ,*/ paramN)\n```\n\n### Parameters\n\n- `functionRef`\n  - : A `function` to be executed after the timer expires.\n- `code`\n  - : An alternative syntax that allows you to include a string instead of a function,\n    which is compiled and executed when the timer expires. This syntax is **not\n    recommended** for the same reasons that make using\n    `eval()` a security risk.\n- `delay` _**optional**_\n\n  - : The time, in milliseconds that the timer should wait before\n    the specified function or code is executed. If this parameter is omitted, a value of 0\n    is used, meaning execute \"immediately\", or more accurately, the next event cycle.\n\n- `param1`, …, `paramN` _**optional**_\n\n  - : Additional arguments which are passed through to the function specified by\n    `functionRef`.\n\n### Return value\n\nThe returned `timeoutID` is a positive integer value which\nidentifies the timer created by the call to `setTimeout()`. This value can be\npassed to `clearTimeout()` to\ncancel the timeout.\n\nIt is guaranteed that a `timeoutID` value will never be reused by a subsequent call to\n`setTimeout()` or `setInterval()` on the same object (a window or\na worker). However, different objects use separate pools of IDs.\n\n## Description\n\nTimeouts are cancelled using `clearTimeout()`.\n\nTo call a function repeatedly (e.g., every _N_ milliseconds), consider using\n`setInterval()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/structuredClone.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# structuredClone()\n\nThe global **`structuredClone()`** method creates a deep clone of a given value.\n\n## Syntax\n\n```js\nstructuredClone(value)\n```\n\n### Parameters\n\n- `value`\n  - : The object to be cloned.\n\n### Return value\n\nThe returned value is a deep copy of the original `value`.\n\n### Exceptions\n\n- `DataCloneError`\n  - : Thrown if any part of the input value is not serializable.\n\n## Description\n\nThis function can be used to deep copy JavaScript values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/undefined.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# undefined\n\nThe global **`undefined`** property represents the primitive\nvalue `undefined`. It is one of JavaScript's \"primitive types\".\n\n## Value\n\nThe primitive value `undefined`.\n\n## Description\n\n`undefined` is a property of the _global object_. That is, it is a variable in global scope.\n\n`undefined` is a non-configurable, non-writable property.\n\nA variable that has not been assigned a value is of type `undefined`. A\nmethod or statement also returns `undefined` if the variable that is being\nevaluated does not have an assigned value. A function returns `undefined` if\na value was not explicitly returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/globals/unescape.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# unescape()\n\n> **Note:** `unescape()` is a non-standard function implemented by browsers and was only standardized for cross-engine compatibility. It is not required to be implemented by all JavaScript engines and may not work everywhere. Use [`decodeURIComponent()`](./decodeURIComponent.mdx) or [`decodeURI()`](./decodeURI.mdx) if possible.\n\nThe **`unescape()`** function computes a new string in which hexadecimal escape sequences are replaced with the characters that they represent. The escape sequences might be introduced by a function like [`escape()`](./escape.mdx).\n\n## Syntax\n\n```js\nunescape(str)\n```\n\n### Parameters\n\n- `str`\n  - : A string to be decoded.\n\n### Return value\n\nA new string in which certain characters have been unescaped.\n\n## Description\n\n`unescape()` is a function property of the global object.\n\nThe `unescape()` function replaces any escape sequence with the character that it represents. Specifically, it replaces any escape sequence of the form `%XX` or `%uXXXX` (where `X` represents one hexadecimal digit) with the character that has the hexadecimal value `XX`/`XXXX`. If the escape sequence is not a valid escape sequence (for example, if `%` is followed by one or no hex digit), it is left as-is.\n\n> **Note:** This function was used mostly for URL encoding and is partly based on the escape format in rfc(1738). The `unescape()` function does _not_ evaluate [escape sequences](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#escape_sequences) in string literals. You can replace `\\xXX` with `%XX` and `\\uXXXX` with `%uXXXX` to get a string that can be handled by `unescape()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/index.mdx",
    "content": "---\nsidebar_position: 1\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\nimport {Fiddle} from '@site/src/components/fiddle';\n\n# JavaScript for Fastly Compute\n\nThis site is the full SDK reference for [`@fastly/js-compute`](https://www.npmjs.com/package/%40fastly/js-compute), the module that provides the interface between your JavaScript code and the [Fastly Compute](https://www.fastly.com) platform.\n\nIf you haven't used Fastly Compute before, start by [setting up your first Fastly Compute program](https://developer.fastly.com/learning/compute/) over on **developer.fastly.com** so that you have a working development environment.\n\nTo learn more about the fundamentals of using JavaScript with Fastly Compute, see our [using JavaScript](https://developer.fastly.com/learning/compute/javascript/) guide.\n\n## Understanding the JavaScript SDK\n\nIncoming HTTP requests to [domains that are attached to your Fastly service](https://developer.fastly.com/learning/concepts/) will start an instance of your application and invoke a `fetch` event, which can be bound using the `addEventListener` function:\n\n```js\naddEventListener(\"fetch\", event => event.respondWith(handleRequest(event)) );\n\nasync function handleRequest(event) {\n  const req = event.request;\n\n  return fetch(req, {\n    backend: \"example_backend\"\n  });\n}\n```\n\nFastly specific features are available as named imports from `fastly:` prefixed modules, all of which are documented in this site.  For example, the [env](https://js-compute-reference-docs.edgecompute.app/docs/fastly:env/env) function provides access to [environment variables](https://developer.fastly.com/reference/compute/ecp-env/) and can be imported into your application like this:\n\n```js\nimport { env } from \"fastly:env\"\n```\n\nJavaScript code compiled for Fastly Compute has access to a global environment with most of the globals you would expect in an ECMAScript runtime, like [`Date`](https://js-compute-reference-docs.edgecompute.app/docs/globals/Date/) and [`console`](https://js-compute-reference-docs.edgecompute.app/docs/globals/console/log).\n\n## Trying things out\n\n[Fastly fiddle](https://fiddle.fastly.dev) is an online web-based playground where you can run Fastly code.  You'll see fiddles included in many pages of our [developer hub](https://developer.fastly.com) and this SDK reference. These interactive examples can be executed right on the page by clicking the **RUN** tab:\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nasync function app(event) {\n    const request = event.request;\n    return new Response(\"You made a request to \" + request.url)\n}\naddEventListener(\"fetch\", event => {\n  event.respondWith(app(event));\n});\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nasync function app(event) {\n    const request = event.request;\n    return new Response(`You made a request to ${request.url}`)\n}\n\naddEventListener(\"fetch\", event => {\n  event.respondWith(app(event));\n});\n\n```\n\n</Fiddle>\n\nCheck out [`fiddle.fastly.dev`](https://fiddle.fastly.dev) to create your own.\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/logger/Logger/Logger.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\nimport {Fiddle} from '@site/src/components/fiddle';\n\n# `Logger()`\n\nThe **`Logger` constructor** lets you connect your Fastly Compute application to a [Fastly Named Logger](https://developer.fastly.com/learning/integrations/logging/).\n\n**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew Logger(name)\n```\n\n> **Note:** `Logger()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - The Fastly Logger which should be associated with this Logger instance\n  \n### Return value\n\nA new `Logger` object.\n\n## Examples\n\nIn this example we have a create a logger named `\"splunk\"` and logs the incoming request method and destination.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Logger Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nasync function app (event) {\n  let logger = new Logger(\"splunk\");\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nasync function app (event) {\n  let logger = new Logger(\"splunk\");\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/logger/Logger/prototype/log.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\nimport {Fiddle} from '@site/src/components/fiddle';\n\n# Logger.prototype.log\n\n▸ **log**(): `string`\n\nSends the given message, converted to a string, to this Logger instance's endpoint.\n\n## Syntax\n\n```js\nlog(message)\n```\n\n### Return value\n\n`undefined`.\n\n## Description\n\nSend the given message, converted to a string, to this Logger instance's endpoint.\n\nThe `log()` method requires its `this` value to be a [`Logger`](../Logger.mdx) object.\n\nIf the `this` value does not inherit from `Logger.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n## Examples\n\nIn this example we have a create a logger named `\"splunk\"` and logs the incoming request method and destination.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Logger.prototype.log Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nasync function app (event) {\n  let logger = new Logger(\"splunk\");\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nasync function app (event) {\n  let logger = new Logger(\"splunk\");\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/object-store/ObjectStore/ObjectStore.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `ObjectStore()`\n\nThe **`ObjectStore` constructor** lets you connect your Fastly Compute application to a Fastly Object store.\n\nAn object store is a persistent, globally consistent key-value store. See https://developer.fastly.com/learning/concepts/data-stores/#object-stores for initialization and usage details.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew ObjectStore(name)\n```\n\n> **Note:** `ObjectStore()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - The Fastly Object store which should be associated with this ObjectStore instance\n  \n### Return value\n\nA new `ObjectStore` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Object Store exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name does not start with an ascii alphabetical character \n  - Thrown if the provided name contains control characters `(\\u0000-\\u001F)`\n\n## Examples\n\nIn this example we connect to an Object Store named `'files'` and save an entry to the store under the key `'hello'` and then read back the value and return it to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { ObjectStore } from \"fastly:object-store\";\n\nasync function app(event) {\n  const files = new ObjectStore('files')\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/object-store/ObjectStore/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ObjectStore.prototype.get\n\n▸ **get**(): `string`\n\nGets the value associated with the key `key` in the Object store.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the Object-store.\n\n### Return value\n\nIf the key does not exist in the Object store, this returns a `Promise` which resolves with `null`.\n\nIf the key does exist in the Object store, this returns a `Promise` which resolves with an `ObjectStoreEntry`.\n\n## Description\n\nSend the given message, converted to a string, to this ObjectStore instance's endpoint.\n\nThe `get()` method requires its `this` value to be a [`ObjectStore`](../ObjectStore.mdx) object.\n\nIf the `this` value does not inherit from `ObjectStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is any of the strings `\"\"`, `\".\"`, or `\"..\"`\n    - Starts with the string `\".well-known/acme-challenge/\"`\n    - Contains any of the characters `\"#?*[]\\n\\r\"`\n    - Is longer than 1024 characters\n\n## Examples\n\nIn this example we connect to an Object Store named `'files'` and save an entry to the store under the key `'hello'` and then read back the value and return it to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { ObjectStore } from \"fastly:object-store\";\n\nasync function app(event) {\n  const files = new ObjectStore('files')\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/object-store/ObjectStore/prototype/put.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ObjectStore.prototype.put\n\nThe **`put()`** method stores a `value` into the Object store under a `key`.\n\n> **Note**: Object stores are eventually consistent, this means that the updated contents associated with the key `key` may not be available to read from all edge locations immediately and some edge locations may continue returning the previous contents associated with the key.\n\n## Syntax\n\n```js\nput(key, value)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to store the supplied value under within the Object store.\n- `value` _:  ArrayBuffer | TypedArray | DataView| ReadableStream | URLSearchParams | String | string literal_\n  - The value to store within the Object store.\n\n### Return value\n\nReturns a `Promise` which resolves with `undefined` when the provided `value` has been written into the Object store.\n\n## Description\n\nStores the supplied `value` into the Object store under the supplied `key`.\n\nThe `put()` method requires its `this` value to be a [`ObjectStore`](../ObjectStore.mdx) object.\n\nIf the `this` value does not inherit from `ObjectStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is any of the strings `\"\"`, `\".\"`, or `\"..\"`\n    - Starts with the string `\".well-known/acme-challenge/\"`\n    - Contains any of the characters `\"#?*[]\\n\\r\"`\n    - Is longer than 1024 characters\n\n## Examples\n\nIn this example we connect to an Object Store named `'files'` and save an entry to the store under the key `'hello'` and then read back the value and return it to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { ObjectStore } from \"fastly:object-store\";\n\nasync function app(event) {\n  const files = new ObjectStore('files')\n\n  await files.put('hello', 'world')\n\n  const entry = await files.put('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/secret-store/SecretStore/SecretStore.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `SecretStore()`\n\nThe **`SecretStore` constructor** lets you connect your Fastly Compute application to a Fastly Secret store.\n\nA secret store is a persistent, globally distributed store for secrets accessible to Fastly Compute services during request processing.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew SecretStore(name)\n```\n\n> **Note:** `SecretStore()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - The Fastly Secret Store which should be associated with this SecretStore instance\n  \n### Return value\n\nA new `SecretStore` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Secret Store exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name contains characters other than letters, numbers, dashes (-), underscores (_), and periods (.)\n\n## Examples\n\nIn this example we connect to a Secret Store named `'secrets'` and retrieve a secret named `'cat-api-key'` use the value in a Request header.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SecretStore } from \"fastly:secret-store\";\n\nasync function app(event) {\n  const secrets = new SecretStore('secrets')\n\n  const catApiKey = await secrets.get('cat-api-key')\n\n  return fetch('/api/cat', {\n    headers: {\n      'cat-api-key': catApiKey.plaintext()\n    }\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/secret-store/SecretStore/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SecretStore.prototype.get\n\n▸ **get**(): `string`\n\nGets the value associated with the key `key` in the Secret store.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the Secret Store.\n\n### Return value\n\nIf the key does not exist in the Secret Store, this returns a `Promise` which resolves with `null`.\n\nIf the key does exist in the Secret Store, this returns a `Promise` which resolves with an `SecretStoreEntry`.\n\n## Description\n\nSend the given message, converted to a string, to this SecretStore instance's endpoint.\n\nThe `get()` method requires its `this` value to be a [`SecretStore`](../SecretStore.mdx) object.\n\nIf the `this` value does not inherit from `SecretStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Is longer than 255 characters\n    - Contains characters other than letters, numbers, dashes (-), underscores (_), and periods (.)\n\n## Examples\n\nIn this example we connect to a Secret Store named `'secrets'` and retrieve a secret named `'cat-api-key'` use the value in a Request header.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SecretStore } from \"fastly:secret-store\";\n\nasync function app(event) {\n  const secrets = new SecretStore('secrets')\n\n  const catApiKey = await secrets.get('cat-api-key')\n\n  return fetch('/api/cat', {\n    headers: {\n      'cat-api-key': catApiKey.plaintext()\n    }\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-1.13.0/secret-store/SecretStoreEntry/prototype/plaintext.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SecretStoreEntry.prototype.plaintext\n\n▸ **plaintext**(): `string`\n\nReturns the plaintext contents of the SecretStoreEntry instance as String.\n\n## Syntax\n\n```js\nplaintext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA String\n\n### Exceptions\n\nThe `plaintext()` method requires its `this` value to be a `SecretStoreEntry` object.\nIf the `this` value does not inherit from `SecretStoreEntry.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n## Examples\n\nIn this example we connect to a Secret Store named `'secrets'` and retrieve a secret named `'cat-api-key'` use the value in a Request header.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SecretStore } from \"fastly:secret-store\";\n\nasync function app(event) {\n  const secrets = new SecretStore('secrets')\n\n  const catApiKey = await secrets.get('cat-api-key')\n\n  return fetch('/api/cat', {\n    headers: {\n      'cat-api-key': catApiKey.plaintext()\n    }\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/backend/Backend/Backend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\nimport {Fiddle} from '@site/src/components/fiddle';\n\n# `Backend()`\n\nThe **`Backend` constructor** lets you dynamically create new [Fastly Backends](https://developer.fastly.com/reference/api/services/backend/) for your Fastly Compute service.\n\nDynamically creating new [Fastly Backends](https://developer.fastly.com/reference/api/services/backend/) is disabled by default for Fastly Services. Please contact [Fastly Support](https://support.fastly.com/hc/requests/new?ticket_form_id=360000269711) to request the feature be enabled on the Fastly Services which require Dynamic Backends.\n\nBy default, Dynamic Backends are disabled within a JavaScript application as it can be a potential avenue for third-party JavaScript code to send requests, potentially including sensitive/secret data, off to destinations that the JavaScript project was not intending, which could be a security issue.\n\nTo enable Dynamic Backends the application will need to explicitly allow Dynamic Backends via:\n\n```js\nimport { allowDynamicBackends } from \"fastly:experimental\";\nallowDynamicBackends(true);\n```\n\n**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew Backend(backendConfiguration)\n```\n\n> **Note:** `Backend()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `backendConfiguration`\n\n  - : An Object which contains all the configuration options to apply to the newly created Backend.\n\n    - `name` _: string_\n      - The name of the backend.\n      - The name has to be between 1 and 254 characters inclusive.\n      - The name can be whatever you would like, as long as it does not match the name of any of the static service backends nor match any other dynamic backends built during a single execution of the application.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n    - `target` _: string_\n      - A hostname, IPv4, or IPv6 address for the backend as well as an optional port.\n      - The target has to be at-least 1 character.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. Is null, undefined, an empty string, not a valid IP address or host, or is the string `::`\n    - `hostOverride` _: string_ _**optional**_\n      - If set, will force the HTTP Host header on connections to this backend to be the supplied value.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `connectTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for a connection to this backend to be established.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `firstByteTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `betweenBytesTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend.\n      - If exceeded, the response received so far will be considered complete and the fetch will end.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `useSSL` _: boolean_ _**optional**_\n      - Whether or not to require TLS for connections to this backend.\n    - `tlsMinVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Minimum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `tlsMaxVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Maximum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `certificateHostname` _: string_ _**optional**_\n      - Define the hostname that the server certificate should declare.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `caCertificate` _: string_ _**optional**_\n      - The CA certificate to use when checking the validity of the backend.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `ciphers` _: string_ _**optional**_\n      - List of OpenSSL ciphers to support for connections to this origin.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - [List of ciphers supported by Fastly](https://developer.fastly.com/learning/concepts/routing-traffic-to-fastly/#use-a-tls-configuration).\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `sniHostname` _: string_ _**optional**_\n      - The SNI hostname to use on connections to this backend.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n\n### Return value\n\nA new `Backend` object.\n\n## Examples\n\nIn this example an implicit Dynamic Backend is created when making the fetch request to [https://www.fastly.com/](https://www.fastly.com/) and the response is then returned to the client.\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Implicit Dynamic Backend Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nallowDynamicBackends(true);\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  return fetch('https://www.fastly.com/');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nallowDynamicBackends(true);\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  return fetch('https://www.fastly.com/');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>\n\nIn this example an explicit Dynamic Backend is created and supplied to the fetch request, the response is then returned to the client.\n\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Explicit Dynamic Backend Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nimport { Backend } from \"fastly:backend\";\nallowDynamicBackends(true);\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\",\n    connectTimeout: 1000,\n    firstByteTimeout: 15000,\n    betweenBytesTimeout: 10000,\n    useSSL: true,\n    sslMinVersion: 1.3,\n    sslMaxVersion: 1.3,\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nimport { Backend } from \"fastly:backend\";\nallowDynamicBackends(true);\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\",\n    connectTimeout: 1000,\n    firstByteTimeout: 15000,\n    betweenBytesTimeout: 10000,\n    useSSL: true,\n    sslMinVersion: 1.3,\n    sslMaxVersion: 1.3,\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/backend/Backend/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\nimport {Fiddle} from '@site/src/components/fiddle';\n\n# toString\n\nThe **`toString()`** method returns a string representing the specified Backend value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified Backend value.\n\n## Description\n\nThe [Backend](../Backend.mdx) object overrides the `toString()` method of [Object](../../../globals//Object/Object.mdx); it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For [Backend](../Backend.mdx) values, the `toString` method returns the name given to the [Backend](../Backend.mdx) object during construction.\n\nThe `toString()` method requires its `this` value to be a [Backend](../Backend.mdx) object.\n\nIf the `this` value does not inherit from `Backend.prototype`, a [TypeError](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n## Examples\n\n### Using toString()\n\nThe following example logs the string value of a [Backend](../Backend.mdx) object:\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Backend.prototype.toString Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\\\"@fastly/js-compute\\\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.toString()); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.toString()); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/cache/SimpleCache/SimpleCache.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `SimpleCache`\n\nThe **`SimpleCache` class** provides a simplified interface to inserting and retrieving entries from Fastly's Cache.\n\nAll the methods on the class are static methods, there are no instance methods.\n\n\n## Examples\n\nIn this example we attempt to retrieve an entry from the Fastly Cache, if the entry does not exist, we create the content and insert it into the Fastly Cache before finally returning.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const path = new URL(event.request.url).pathname;\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/cache/SimpleCache/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCache.delete\n\n▸ **delete**(): `string`\n\nDelete the entry associated with the key `key` from the cache.\n\n## Syntax\n\n```js\ndelete(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the cache.\n\n### Return value\n\nReturns `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n## Examples\n\nIn this example, when a request contains a `delete` querystring parameter, we delete the an entry from the cache.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const url = new URL(event.request.url);\n  const path = url.pathname;\n  if (url.searchParams.has('delete')) {\n    SimpleCache.delete(path);\n    return new Response(page, { status: 204 });\n  }\n\n  let page = SimpleCache.get(path);\n  if (!page) {\n    page = await render(path);\n    // Store the page in the cache for 1 minute.\n    SimpleCache.set(path, page, 60);\n  }\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/cache/SimpleCache/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCache.get\n\n▸ **get**(): `string`\n\nGets the entry associated with the key `key` from the cache.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the cache.\n\n### Return value\n\nIf the key does not exist in the cache, this returns `null`.\n\nIf the key does exist in the cache, this returns a `SimpleCacheEntry`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n## Examples\n\nIn this example we attempt to retrieve an entry from the Fastly Cache, if the entry does not exist, we create the content and insert it into the Fastly Cache before finally returning.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const path = new URL(event.request.url).pathname;\n  let page = SimpleCache.get(path);\n  if (!page) {\n    page = await render(path);\n    // Store the page in the cache for 1 minute.\n    SimpleCache.set(path, page, 60);\n  }\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/cache/SimpleCache/getOrSet.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCache.getOrSet\n\nThe **`getOrSet()`** method attempts to get an entry from the cache for the supplied `key` if no entry is found (or has expired), the supplied `set` function is executed and it's result is inserted into the cache under the supplied `key` and for the supplied `ttl` (Time-To-Live) duration, provided in seconds.\n\n## Syntax\n\n```js\ngetOrSet(key, set)\ngetOrSet(key, set, length)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to lookup and/or store the supplied entry under within the cache.\n- `set` _:  Function_\n  - : A function to execute when the cache does not have a usable entry for the supplied `key`.\n    The function should return a Promise which resolves with the following interface:\n    - `value` _:  ArrayBuffer | TypedArray | DataView| ReadableStream | URLSearchParams | String | string literal_\n      - The value to store within the cache.\n    - `ttl` _: number_\n      - The number of seconds to store the supplied entry within the cache for.\n    - `length` _: number_ __optional__\n      - The length of value being stored within the cache. This is only used when the `value` is a ReadableStream.\n\n### Return value\n\nReturns a `SimpleCacheEntry`.\n\n### Exceptions\n\n- If the provided `key`:\n  - Cannot be coerced to a string\n  - Is an empty string\n  - Is longer than 8135 characters\n- If the provided `ttl`:\n  - Cannot be coerced to a number\n  - Is a negative number\n  - Is `NaN`\n  - Is Inifinity\n\n## Examples\n\nIn this example we attempt to retrieve an entry from the Fastly Cache, if the entry does not exist, we create the content and insert it into the Fastly Cache before finally returning.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const path = new URL(event.request.url).pathname;\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/cache/SimpleCache/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCache.set\n\nThe **`set()`** method stores an entry into the cache under the supplied `key` and for the supplied `ttl` (Time-To-Live) duration, provided in seconds.\n\n## Syntax\n\n```js\nset(key, value, ttl)\nset(key, value, ttl, length)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to store the supplied entry under within the cache.\n- `value` _:  ArrayBuffer | TypedArray | DataView| ReadableStream | URLSearchParams | String | string literal_\n  - The value to store within the cache.\n- `ttl` _: number_\n  - The number of seconds to store the supplied entry within the cache for.\n- `length` _: number_ __optional__\n  - The length of value being stored within the cache. This is only used when the `value` is a ReadableStream.\n\n### Return value\n\nReturns `undefined` when the provided `value` has been written into the cache.\n\n### Exceptions\n\n- If the provided `key`:\n  - Cannot be coerced to a string\n  - Is an empty string\n  - Is longer than 8135 characters\n- If the provided `ttl`:\n  - Cannot be coerced to a number\n  - Is a negative number\n  - Is `NaN`\n  - Is Inifinity\n\n## Examples\n\nIn this example we attempt to retrieve an entry from the Fastly Cache, if the entry does not exist, we create the content and insert it into the Fastly Cache before finally returning.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const path = new URL(event.request.url).pathname;\n  let page = SimpleCache.get(path);\n  if (!page) {\n    page = await render(path);\n    // Store the page in the cache for 1 minute.\n    SimpleCache.set(path, page, 60);\n  }\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/cache/SimpleCacheEntry/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the `SimpleCacheEntry` interface\ntakes the instance's stream and reads it to completion. It returns a promise\nthat resolves with an `ArrayBuffer`.\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an `ArrayBuffer`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/cache/SimpleCacheEntry/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.body\n\nThe **`body`** read-only property of the `SimpleCacheEntry` interface is a `ReadableStream` of the instance's contents.\n\n## Value\n\nA `ReadableStream`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/cache/SimpleCacheEntry/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.bodyUsed\n\nThe **`bodyUsed`** read-only property of the `SimpleCacheEntry` interface is a boolean value that indicates whether the body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/cache/SimpleCacheEntry/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.json()\n\nThe **`json()`** method of the `SimpleCacheEntry` interface takes\na `SimpleCacheEntry` stream and reads it to completion. It returns a promise which\nresolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a JavaScript object. This object could be\nanything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/cache/SimpleCacheEntry/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.text()\n\nThe **`text()`** method of the `SimpleCacheEntry` interface takes the instance's stream and reads it to completion.\nIt returns a promise that resolves with a `String`.\nThe result is _always_ decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Promise that resolves with a `String`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/cache-override/CacheOverride/CacheOverride.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\nimport {Fiddle} from '@site/src/components/fiddle';\n\n# `CacheOverride()`\n\nThe **`CacheOverride` constructor** lets you configure the caching behavior of a `Response`.\n\nNormally, the HTTP Headers on a [`Response`](../../globals/Response/Response.mdx) would control how the [`Response`](../../globals/Response/Response.mdx) is cached,\nbut `CacheOverride` can be set on a [`Request`](../../globals/Request/Request.mdx), to define custom caching behavior.\n\n## Syntax\n\n```js\nnew CacheOverride(mode)\nnew CacheOverride(mode, init)\n```\n\n> **Note:** `CacheOverride()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `mode` _: string_\n  - Sets the cache override mode for a request\n  - If set to:\n    - `\"none\"`: Do not override the behavior specified in the origin response’s cache control headers.\n    - `\"pass\"`: Do not cache the response to this request, regardless of the origin response’s headers.\n    - `\"override\"`: Override particular cache control settings using the `CacheOverride` object's settings.\n\n- `init`\n\n  - : An Object which contains all the configuration options to apply to the newly created `CacheOverride`.\n\n    - `pci` _: boolean_ _**optional**_\n      - Override the caching behavior of this request to enable or disable PCI/HIPAA-compliant non-volatile caching.\n      - By default, this is `false`, which means the request may not be PCI/HIPAA-compliant. Set it to `true` to enable compliant caching.\n      - See the [Fastly PCI-Compliant Caching and Delivery documentation](https://docs.fastly.com/products/pci-compliant-caching-and-delivery) for details.\n\n    - `surrogateKey` _: string_ _**optional**_\n      - Override the caching behavior of this request to include the given surrogate key, provided as a header value.\n      - See the [Fastly surrogate keys guide](https://docs.fastly.com/en/guides/purging-api-cache-with-surrogate-keys) for details.\n    - `swr` _: number_ _**optional**_\n      - Override the caching behavior of this request to use the given `stale-while-revalidate` time, in seconds\n\n    - `ttl` _: number_ _**optional**_\n      - Override the caching behavior of this request to use the given Time to Live (TTL), in seconds.\n\n### Return value\n\nA new `CacheOverride` object.\n\n## Examples\n\nIn this example we override the cache for all the requests prefixed /static/ to have a long TTL (Time To Live),  and the home page to have a short TTL and a long SWR (Stale While Revalidate).\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"CacheOverride Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { CacheOverride } from \"fastly:cache-override\";\n// In this example we override the cache for all the requests prefixed /static/ \n// to have a long TTL (Time To Live), and the home page to have a short TTL and \n// a long SWR (Stale While Revalidate).\nasync function app (event) {\n  const path = (new URL(event.request.url)).pathname;\n  let cacheOverride;\n  if (path == '/') {\n    cacheOverride = new CacheOverride('override', {ttl: 10, swr: 86_400});\n  } else if (path.startsWith('/static/')) {\n    cacheOverride = new CacheOverride('override', {ttl: 86_400});\n  } else {\n    cacheOverride = new CacheOverride('none')\n  }\n  return fetch(event.request.url, {\n    cacheOverride,\n    backend: 'origin_0'\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { CacheOverride } from \"fastly:cache-override\";\n// In this example we override the cache for all the requests prefixed /static/ \n// to have a long TTL (Time To Live), and the home page to have a short TTL and \n// a long SWR (Stale While Revalidate).\nasync function app (event) {\n  const path = (new URL(event.request.url)).pathname;\n  let cacheOverride;\n  if (path == '/') {\n    cacheOverride = new CacheOverride('override', {ttl: 10, swr: 86_400});\n  } else if (path.startsWith('/static/')) {\n    cacheOverride = new CacheOverride('override', {ttl: 86_400});\n  } else {\n    cacheOverride = new CacheOverride('none')\n  }\n  return fetch(event.request.url, {\n    cacheOverride,\n    backend: 'origin_0'\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/config-store/ConfigStore/ConfigStore.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\nimport {Fiddle} from '@site/src/components/fiddle';\n\n# `ConfigStore()`\n\nThe **`ConfigStore` constructor** lets you access a specific [Fastly Edge Dictionary](https://docs.fastly.com/en/guides/about-edge-dictionaries).\n\n> **Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew ConfigStore(name);\n```\n\n> **Note:** `ConfigStore()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - The name of the [Fastly Edge Dictionary](https://docs.fastly.com/en/guides/about-edge-dictionaries) that this `ConfigStore` instance should provide access to.\n\n### Return value\n\nA new `ConfigStore` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Config Store exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name does not start with an ascii alphabetical character \n  - Thrown if the provided name does not contain only ascii alphanumeric, underscore, and whitespace characters\n\n## Examples\n\nIn this example we have an Edge Dictionary named \"animals\" and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"ConfigStore Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/config-store/ConfigStore/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\nimport {Fiddle} from '@site/src/components/fiddle';\n\n# ConfigStore.prototype.get\n\nThe **`get()`** method returns the value associated with the provided key in the config-store. If the provided key does not exist in the ConfigStore then this returns `null`.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from the dictionary.\n\n### Return value\n\nA `string` representing the specified ConfigStore value or `null` if the key does not exist in the ConfigStore\n\n## Description\n\nGet a value for a key in the config-store. If the provided key does not exist in the ConfigStore then this returns `null`.\n\nThe `get()` method requires its `this` value to be a [`ConfigStore`](../../../fastly%3Aconfig-store/ConfigStore/ConfigStore.mdx) object.\n\nIf the `this` value does not inherit from `ConfigStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided key is longer than 255 in length\n  - Thrown if the provided key is an empty string\n\n## Examples\n\nIn this example we have an Edge Dictionary named \"animals\" and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"ConfigStore Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/dictionary/Dictionary/Dictionary.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\nimport {Fiddle} from '@site/src/components/fiddle';\n\n# `Dictionary()`\n\n:::info\n\nThis Class is deprecated, it has been renamed to [`ConfigStore`](../../fastly:config-store/ConfigStore/ConfigStore.mdx) and can be imported via `import { ConfigStore } from 'fastly:config-store'`\n\n:::\n\nThe **`Dictionary` constructor** lets you access a specific [Fastly Edge Dictionary](https://docs.fastly.com/en/guides/about-edge-dictionaries).\n\n**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew Dictionary(name);\n```\n\n> **Note:** `Dictionary()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - The name of the [Fastly Edge Dictionary](https://docs.fastly.com/en/guides/about-edge-dictionaries) that this `Dictionary` instance should provide access to.\n\n### Return value\n\nA new `Dictionary` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Dictionary exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name does not start with an ascii alphabetical character \n  - Thrown if the provided name does not contain only ascii alphanumeric, underscore, and whitespace characters\n\n## Examples\n\nIn this example we have an Edge Dictionary named \"animals\" and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Dictionary Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/dictionary/Dictionary/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\nimport {Fiddle} from '@site/src/components/fiddle';\n\n# Dictionary.prototype.get\n\n:::info\n\nThis Class is deprecated, it has been renamed to [`ConfigStore`](../../../fastly:config-store/ConfigStore/ConfigStore.mdx) and can be imported via `import { ConfigStore } from 'fastly:config-store'`\n\nThe `get()` method exists on the [`ConfigStore`](../../../fastly:config-store/ConfigStore/ConfigStore.mdx) Class.\n\n:::\n\nThe **`get()`** method returns the value associated with the provided key in the dictionary. If the provided key does not exist in the Dictionary then this returns `null`.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from the dictionary.\n\n### Return value\n\nA `string` representing the specified Dictionary value or `null` if the key does not exist in the Dictionary\n\n## Description\n\nGet a value for a key in the dictionary. If the provided key does not exist in the Dictionary then this returns `null`.\n\nThe `get()` method requires its `this` value to be a [`Dictionary`](../Dictionary.mdx) object.\n\nIf the `this` value does not inherit from `Dictionary.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided key is longer than 255 in length\n  - Thrown if the provided key is an empty string\n\n## Examples\n\nIn this example we have an Edge Dictionary named \"animals\" and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Dictionary Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/env/env.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\nimport {Fiddle} from '@site/src/components/fiddle';\n\n# env\n\nThe **`env()`** function returns the value for the provided environment variable name.\n\nFor a list of available environment variables, see the [Fastly Developer Hub for Compute Environment Variables](https://developer.fastly.com/reference/compute/ecp-env/)\n\n>**Note**: The environment variables can only be retrieved when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nenv(name)\n```\n\n### Parameters\n\n- `name` _: string_\n  - The name of the environment variable to retrieve\n\n### Return value\n\nThe value for the requested environment variable, if no such environment variable exists then an empty string is returned.\n\n## Examples\n\nIn this example we log to stdout the environment variables [`FASTLY_HOSTNAME`](https://developer.fastly.com/reference/compute/ecp-env/fastly-hostname/) and [`FASTLY_TRACE_ID`](https://developer.fastly.com/reference/compute/ecp-env/fastly-trace-id/).\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"env Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { env } from \"fastly:env\";\nfunction app(event) {\n  console.log(\"FASTLY_HOSTNAME:\", env(\"FASTLY_HOSTNAME\"));\n  console.log(\"FASTLY_TRACE_ID:\", env(\"FASTLY_TRACE_ID\"));\n  return new Response(\"\", {\n    status: 200\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { env } from \"fastly:env\";\nfunction app(event) {\n  console.log(\"FASTLY_HOSTNAME:\", env(\"FASTLY_HOSTNAME\"));\n  console.log(\"FASTLY_TRACE_ID:\", env(\"FASTLY_TRACE_ID\"));\n  return new Response(\"\", {\n    status: 200\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/experimental/allowDynamicBackends.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\nimport {Fiddle} from '@site/src/components/fiddle';\n\n# allowDynamicBackends\n\nThe **`allowDynamicBackends()`** function is used to control whether or not Dynamic Backends should be allowed within this Fastly Compute Service.\n\nBy default, Dynamic Backends are disabled within a JavaScript application as it can be a potential avenue for third-party JavaScript code to send requests, potentially including sensitive/secret data,  off to destinations that the JavaScript project was not intending, which could be a security issue.\n\n>**Note**: This feature is in disabled by default for Fastly Services. Please contact [Fastly Support](https://support.fastly.com/hc/requests/new?ticket_form_id=360000269711) to request the feature be enabled on the Fastly Services which require Dynamic Backends.\n\n## Syntax\n\n```js\nallowDynamicBackends(enabled)\n```\n\n### Parameters\n\n- `enabled` _: boolean_\n  - Whether or not to allow Dynamic Backends\n\n### Return value\n\n`undefined`.\n\n## Examples\n\nIn this example an implicit Dynamic Backend is created when making the fetch request to [https://www.fastly.com/](https://www.fastly.com/) and the response is then returned to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Dynamic Backends Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nallowDynamicBackends(true);\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  return fetch('https://www.fastly.com/');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nallowDynamicBackends(true);\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  return fetch('https://www.fastly.com/');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/experimental/includeBytes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# includeBytes\n\nThe **`includeBytes()`** function is used embed a file as a Uint8Array.\n\n>**Note**: Can only be used during build-time initialization, not when processing requests.\n\n## Syntax\n\n```js\nincludeBytes(path)\n```\n\n### Parameters\n\n- `path` _: string_\n  - The path to include, relative to the Fastly Compute application's top-level directory during build-time initialization.\n\n### Return value\n\nReturns a `Uint8Array`\n\n## Examples\n\nIn this example we include the README.md file as a Uint8Array and use it for the body in the response we return to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { includeBytes } from \"fastly:experimental\";\nconst readme = includeBytes('README.md');\nasync function app() {\n    return new Response(readme);\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/fanout/createFanoutHandoff.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# createFanoutHandoff\n\nThe **`createFanoutHandoff()`** function creates a Response instance which informs Fastly to pass the original Request through Fanout, to the declared backend.\n\n## Syntax\n\n```js\ncreateFanoutHandoff(request, backend)\n```\n\n### Parameters\n\n- `request` _: Request_\n  - The request to pass through Fanout.\n- `backend` _: string_\n  - The name of the backend that Fanout should send the request to.\n  - The name has to be between 1 and 254 characters inclusive.\n  - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n\n### Return value\n\nA Response instance is returned, which can then be used via `event.respondWith`.\n\n## Examples\n\nIn this example application requests to the path `/stream` and sent handled via Fanout.\n\n```js\nimport { createFanoutHandoff } from \"fastly:fanout\";\n\nasync function handleRequest(event) {\n  try {\n    const url = new URL(event.request.url);\n    if (url.pathname === '/stream') {\n      return createFanoutHandoff(event.request, 'fanout');\n    } else {\n      return new Response('oopsie, make a request to /stream for some fanout goodies', { status: 404 });\n    }\n  } catch (error) {\n    console.error({error});\n    return new Response(error.message, {status:500})\n  }\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/geolocation/getGeolocationForIpAddress.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\nimport {Fiddle} from '@site/src/components/fiddle';\n\n# getGeolocationForIpAddress\n\nThe **`getGeolocationForIpAddress()`** function is used to retrieve geolocation information about the given IP address.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\ngetGeolocationForIpAddress(address)\n```\n\n### Parameters\n\n- `address` _: string_\n  - The IPv4 or IPv6 address to query.\n\n### Return value\n\nReturns an `Object` which contains information about the given IP address with the following properties:\n\n- `as_name`  _: string | null_\n  - The name of the organization associated with `as_number`.\n  - For example, fastly is the value given for IP addresses under AS-54113.\n\n- `as_number` _: number | null_\n  - [Autonomous system](https://en.wikipedia.org/wiki/Autonomous_system_(Internet)) (AS) number.\n\n- `area_code` _: number | null_\n  - The telephone area code associated with an IP address.\n  - These are only available for IP addresses in the United States, its territories, and Canada.\n\n- `city` _: string | null_\n  - City or town name.\n\n- `conn_speed` _: string | null_\n  - Connection speed.\n\n- `conn_type` _: string | null_\n  - Connection type.\n\n- `continent` _: string | null_\n  - Continent.\n\n- `country_code` _: string | null_\n  - A two-character [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) country code for the country associated with an IP address.\n  - The US country code is returned for IP addresses associated with overseas United States military bases.\n  - These values include subdivisions that are assigned their own country codes in ISO 3166-1. For example, subdivisions NO-21 and NO-22 are presented with the country code SJ for Svalbard and the Jan Mayen Islands.\n\n- `country_code3` _: string | null_\n  - A three-character [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) country code for the country associated with the IP address.\n  - The USA country code is returned for IP addresses associated with overseas United States military bases.\n\n- `country_name` _: string | null_\n  - Country name.\n  - This field is the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) English short name for a country.\n\n- `gmt_offset` _: string | null_\n  - Time zone offset from Greenwich Mean Time (GMT) for `city`.\n\n- `latitude` _: number | null_\n  - Latitude, in units of degrees from the equator.\n  - Values range from -90.0 to +90.0 inclusive, and are based on the [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System) coordinate reference system.\n\n- `longitude` _: number | null_\n  - Longitude, in units of degrees from the [IERS Reference Meridian](https://en.wikipedia.org/wiki/IERS_Reference_Meridian).\n  - Values range from -180.0 to +180.0 inclusive, and are based on the [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System) coordinate reference system.\n\n- `metro_code` _: number | null_\n  - Metro code, representing designated market areas (DMAs) in the United States.\n\n- `postal_code` _: string | null_\n  - The postal code associated with the IP address.\n  - These are available for some IP addresses in Australia, Canada, France, Germany, Italy, Spain, Switzerland, the United Kingdom, and the United States.\n  - For Canadian postal codes, this is the first 3 characters. For the United Kingdom, this is the first 2-4 characters (outward code). For countries with alphanumeric postal codes, this field is a lowercase transliteration.\n\n- `proxy_description` _: string | null_\n  - Client proxy description.\n\n- `proxy_type` _: string | null_\n  - Client proxy type.\n\n- `region` _: string | null_\n  - [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) country subdivision code.\n  - For countries with multiple levels of subdivision (for example, nations within the United Kingdom), this variable gives the more specific subdivision.\n  - This field can be None for countries that do not have ISO country subdivision codes. For example, None is given for IP addresses assigned to the Åland Islands (country code AX, illustrated below).\n\n- `utc_offset` _: number | null;_\n  - Time zone offset from coordinated universal time (UTC) for `city`.\n\n## Examples\n\nIn this example we return the geolocation details for the provided ip querystring parameter or for the incoming client request if the querystring parameter does not exist.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"getGeolocationForIpAddress Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { getGeolocationForIpAddress } from \"fastly:geolocation\"\nasync function app(event) {\n  try {\n    let ip = new URL(event.request.url).searchParams.get('ip') || event.client.address\n    let geo = getGeolocationForIpAddress(ip);\n    return new Response(JSON.stringify(geo), {\n      headers: {\n        \"Content-Type\": \"application/json\",\n      },\n    });\n  } catch (error) {\n    console.error(error);\n    return new Response(\"Internal Server Error\", {\n      status: 500\n    });\n  }\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { getGeolocationForIpAddress } from \"fastly:geolocation\"\nasync function app(event) {\n  try {\n    let ip = new URL(event.request.url).searchParams.get('ip') || event.client.address\n    let geo = getGeolocationForIpAddress(ip);\n    return new Response(JSON.stringify(geo), {\n      headers: {\n        \"Content-Type\": \"application/json\",\n      },\n    });\n  } catch (error) {\n    console.error(error);\n    return new Response(\"Internal Server Error\", {\n      status: 500\n    });\n  }\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/AggregrateError/AggregrateError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# AggregateError()\n\nThe **`AggregateError()`** constructor creates an error for several errors that need to be wrapped in a single error.\n\n## Syntax\n\n```js\nnew AggregateError(errors)\nnew AggregateError(errors, message)\nnew AggregateError(errors, message, options)\n\nAggregateError(errors)\nAggregateError(errors, message)\nAggregateError(errors, message, options)\n```\n\n> **Note:** `AggregateError()` can be called with or without `new`. Both create a new `AggregateError` instance.\n\n### Parameters\n\n- `errors`\n  - : An iterable of errors, may not actually be [`TypeError`](../Error/Error.mdx) instances.\n- `message` _**optional**_\n  - : An optional human-readable description of the aggregate error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Array/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array\\[Symbol.species]\n\nThe **`Array[Symbol.species]`** accessor property returns the constructor used to construct return values from array methods.\n\n> **Warning:** The existence of `[Symbol.species]` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Syntax\n\n```js\nArray[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get [Symbol.species]` was called. The return value is used to construct return values from array methods that create new arrays.\n\n## Description\n\nThe `[Symbol.species]` accessor property returns the default constructor for `Array` objects. Subclass constructors may override it to change the constructor assignment. The default implementation is basically:\n\n```js\n// Hypothetical underlying implementation for illustration\nclass Array {\n  static get [Symbol.species]() {\n    return this;\n  }\n}\n```\n\nBecause of this polymorphic implementation, `[Symbol.species]` of derived subclasses would also return the constructor itself by default.\n\n```js\nclass SubArray extends Array {}\nSubArray[Symbol.species] === SubArray; // true\n```\n\nWhen calling array methods that do not mutate the existing array but return a new array instance (for example, `filter()` and `map()`), the array's `constructor[Symbol.species]` will be accessed. The returned constructor will be used to construct the return value of the array method. This makes it technically possible to make array methods return objects unrelated to arrays.\n\n```js\nclass NotAnArray {\n  constructor(length) {\n    this.length = length;\n  }\n}\n\nconst arr = [0, 1, 2];\narr.constructor = { [Symbol.species]: NotAnArray };\narr.map((i) => i); // NotAnArray { '0': 0, '1': 1, '2': 2, length: 3 }\narr.filter((i) => i); // NotAnArray { '0': 1, '1': 2, length: 0 }\narr.concat([1, 2]); // NotAnArray { '0': 0, '1': 1, '2': 2, '3': 1, '4': 2, length: 5 }\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Array/Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array()\n\nThe **`Array()`** constructor is used to create `Array` objects.\n\n## Syntax\n\n```js\nnew Array(element0, element1, /* … ,*/ elementN)\nnew Array(arrayLength)\n\nArray(element0, element1, /* … ,*/ elementN)\nArray(arrayLength)\n```\n\n> **Note:** `Array()` can be called with or without `new`. Both create a new `Array` instance.\n\n### Parameters\n\n- `elementN`\n  - : A JavaScript array is initialized with the given elements, except in the case where\n    a single argument is passed to the `Array` constructor and that argument is\n    a number (see the `arrayLength` parameter below). Note that this special case only\n    applies to JavaScript arrays created with the `Array` constructor, not\n    array literals created with the bracket syntax.\n- `arrayLength`\n  - : If the only argument passed to the `Array` constructor is an integer\n    between 0 and 2<sup>32</sup> - 1 (inclusive), this returns a new JavaScript array with\n    its `length` property set to that number (**Note:** this\n    implies an array of `arrayLength` empty slots, not slots with actual\n    `undefined` values).\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if there's only one argument (`arrayLength`) and its value is not between 0 and 2<sup>32</sup> - 1 (inclusive).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Array/from.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.from\n\nThe **`Array.from()`** static method creates a new, shallow-copied `Array` instance from an iterable or array-like object.\n\n## Syntax\n\n```js\nArray.from(arrayLike)\n\n// Arrow function\nArray.from(arrayLike, (element) => { /* … */ })\nArray.from(arrayLike, (element, index) => { /* … */ })\n\n// Mapping function\nArray.from(arrayLike, mapFn)\nArray.from(arrayLike, mapFn, thisArg)\n\n// Inline mapping function\nArray.from(arrayLike, function (element) { /* … */ })\nArray.from(arrayLike, function (element, index) { /* … */ })\nArray.from(arrayLike, function (element) { /* … */ }, thisArg)\nArray.from(arrayLike, function (element, index) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `arrayLike`\n  - : An iterable or array-like object to convert to an array.\n- `mapFn` _**optional**_\n\n  - : Map function to call on every element of the array. If provided, every value to be added to the array is first passed through this function, and `mapFn`'s return value is added to the array instead.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `mapFn`.\n\n### Return value\n\nA new `Array` instance.\n\n## Description\n\n`Array.from()` lets you create `Array`s from:\n\n- [iterable objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) (objects such as [`Map`](../Map/Map.mdx) and [`Set`](../Set/Set.mdx); or, if the object is not iterable,\n- array-like objects (objects with a `length` property and indexed elements).\n\n`Array.from()` never creates a sparse array. If the `arrayLike` object is missing some index properties, they become `undefined` in the new array.\n\n`Array.from()` has an optional parameter `mapFn`, which allows you to execute a function on each element of the array being created, similar to [`Array.prototype.map()`](./prototype/map.mdx). More clearly, `Array.from(obj, mapFn, thisArg)` has the same result as `Array.from(obj).map(mapFn, thisArg)`, except that it does not create an intermediate array, and `mapFn` only receives two arguments (`element`, `index`) without the whole array, because the array is still under construction.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Array/isArray.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.isArray()\n\nThe **`Array.isArray()`** static method determines whether the passed value is an `Array`.\n\n## Syntax\n\n```js\nArray.isArray(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be checked.\n\n### Return value\n\n`true` if `value` is an `Array`; otherwise, `false`. `false` is always returned if `value` is a `TypedArray` instance.\n\n## Description\n\n`Array.isArray()` checks if the passed value is an `Array`. It does not check the value's prototype chain, nor does it rely on the `Array` constructor it is attached to. It returns `true` for any value that was created using the array literal syntax or the `Array` constructor. This makes it safe to use with cross-realm objects, where the identity of the `Array` constructor is different and would therefore cause `instanceof Array` to fail.\n\nSee the article [\"Determining with absolute accuracy whether or not a JavaScript object is an array\"](https://web.mit.edu/jwalden/www/isArray.html) for more details.\n\n`Array.isArray()` also rejects objects with `Array.prototype` in its prototype chain but aren't actual arrays, which `instanceof Array` would accept.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Array/of.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.of()\nThe **`Array.of()`** method creates a new `Array`\ninstance from a variable number of arguments, regardless of number or type of the\narguments.\n\n## Syntax\n\n```js\nArray.of(element0)\nArray.of(element0, element1)\nArray.of(element0, element1, /* … ,*/ elementN)\n```\n\n### Parameters\n\n- `elementN`\n  - : Elements used to create the array.\n\n### Return value\n\nA new `Array` instance.\n\n## Description\n\nThe difference between `Array.of()` and the [`Array()`](./Array.mdx) constructor is in the handling of single arguments: `Array.of(7)` creates an array with a single element, `7`, whereas `Array(7)` creates an empty array with a `length` property of `7`. (That implies an array of 7 empty slots, not slots with actual [`undefined`](../undefined.mdx) values.)\n\n```js\nArray.of(7); // [7]\nArray(7); // array of 7 empty slots\n\nArray.of(1, 2, 3); // [1, 2, 3]\nArray(1, 2, 3); // [1, 2, 3]\n```\n\nThe `Array.of()` method is a generic factory method. For example, if a subclass of `Array` inherits the `of()` method, the inherited `of()` method will return new instances of the subclass instead of `Array` instances. In fact, the `this` value can be any constructor function that accepts a single argument representing the length of the new array, and the constructor will be called with the number of arguments passed to `of()`. The final `length` will be set again when all elements are assigned. If the `this` value is not a constructor function, the plain `Array` constructor is used instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Array/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype\\[Symbol.iterator]()\n\nThe **`Symbol.iterator`** method of an `Array` object implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows arrays to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the value of each index in the array.\n\nThe initial value of this property is the same function object as the initial value of the [`Array.prototype.values`](./values.mdx) property.\n\n## Syntax\n\n```js\narray[Symbol.iterator]()\n```\n\n### Return value\n\nThe same return value as [`Array.prototype.values()`](./values.mdx): a new iterable iterator object that yields the value of each index in the array.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Array/prototype/@@unscopables.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype[Symbol.unscopables]\n\nThe **`@@unscopables`** data property of `Array.prototype` is shared by all `Array` instances. It contains property names that were not included in the ECMAScript standard prior to the ES2015 version and that are ignored for [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) statement-binding purposes.\n\n## Value\n\nA [`null`-prototype object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects) with property names given below and their values set to `true`.\n\n## Description\n\nThe default `Array` properties that are ignored for `with` statement-binding purposes are:\n\n- [`at()`](./at.mdx)\n- [`copyWithin()`](./copyWithin.mdx)\n- [`entries()`](./entries.mdx)\n- [`fill()`](./fill.mdx)\n- [`find()`](./find.mdx)\n- [`findIndex()`](./findIndex.mdx)\n- [`flat()`](./flat.mdx)\n- [`flatMap()`](./flatMap.mdx)\n- [`includes()`](./includes.mdx)\n- [`keys()`](./keys.mdx)\n- [`values()`](./values.mdx)\n\n`Array.prototype[@@unscopables]` is an empty object only containing all the above property names with the value `true`. Its [prototype is `null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects), so `Object.prototype` properties like [`toString`](../../Object/prototype/toString.mdx) won't accidentally be made unscopable, and a `toString()` within the `with` statement will continue to be called on the array.\n\nSee [`Symbol.unscopables`](../../Symbol/unscopables.mdx) for how to set unscopable properties for your own objects.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Array/prototype/at.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.at\n\nThe **`at()`** method takes an integer value and returns the item at that index, allowing for positive and negative integers. Negative integers count back from the last item in the array.\n\n## Syntax\n\n```js\nat(index)\n```\n\n### Parameters\n\n- `index`\n  - : Zero-based index of the array element to be returned, converted to an integer. Negative index counts back from the end of the array — if `index < 0`, `index + array.length` is accessed.\n\n### Return value\n\nThe element in the array matching the given index. Always returns [`undefined`](../../../globals/undefined.mdx) if `index < -array.length` or `index >= array.length` without attempting to access the corresponding property.\n\n## Description\n\nThe `at()` method is equivalent to the bracket notation when `index` is non-negative. For example, `array[0]` and `array.at(0)` both return the first item. However, when counting elements from the end of the array, you cannot use `array[-1]` like you may in Python or R, because all values inside the square brackets are treated literally as string properties, so you will end up reading `array[\"-1\"]`, which is just a normal string property instead of an array index.\n\nThe usual practice is to access [`Array.prototype.length`](./length.mdx) and calculate the index from that — for example, `array[array.length - 1]`. The `at()` method allows relative indexing, so this can be shortened to `array.at(-1)`.\n\nThe `at()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Array/prototype/concat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.concat\n\nThe **`concat()`** method is used to merge two or more arrays.\nThis method does not change the existing arrays, but instead returns a new array.\n\n## Syntax\n\n```js\nconcat()\nconcat(value0)\nconcat(value0, value1)\nconcat(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `valueN` _**optional**_\n  - : Arrays and/or values to concatenate into a new array. If all\n    `valueN` parameters are omitted, `concat` returns a\n    [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of the existing array on which it is called. See the description below\n    for more details.\n\n### Return value\n\nA new `Array` instance.\n\n## Description\n\nThe `concat` method creates a new array. The array will first be populated by the elements in the object on which it is called. Then, for each argument, its value will be concatenated into the array — for normal objects or primitives, the argument itself will become an element of the final array; for arrays or array-like objects with the property [`Symbol.isConcatSpreadable`](../../Symbol/isConcatSpreadable.mdx) set to a truthy value, each element of the argument will be independently added to the final array. The `concat` method does not recurse into nested array arguments.\n\nThe `concat()` method is a copying. It does not alter `this` or any of the arrays provided as arguments but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains the same elements as the ones from the original arrays.\n\nThe `concat()` method preserves empty slots if any of the source arrays is sparse.\n\nThe `concat()` method is generic. The `this` value is treated in the same way as the other arguments (except it will be converted to an object first), which means plain objects will be directly prepended to the resulting array, while array-like objects with truthy `Symbol.isConcatSpreadable` will be spread into the resulting array.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Array/prototype/copyWithin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.copyWithin\n\nThe **`copyWithin()`** method shallow copies part of an array\nto another location in the same array and returns it without modifying its length.\n\n\n\n## Syntax\n\n```js\ncopyWithin(target)\ncopyWithin(target, start)\ncopyWithin(target, start, end)\n```\n\n### Parameters\n\n- `target`\n  - : Zero-based index at which to copy the sequence to, converted to an integer.\n    - Negative index counts back from the end of the array — if `target < 0`, `target + array.length` is used.\n    - If `target < -array.length`, `0` is used.\n    - If `target >= array.length`, nothing is copied.\n    - If `target` is positioned after `start` after normalization, copying only happens until the end of `array.length` (in other words, `copyWithin()` never extends the array).\n- `start` _**optional**_\n  - : Zero-based index at which to start copying elements from, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, nothing is copied.\n- `end` _**optional**_\n  - : Zero-based index at which to end copying elements from, converted to an integer. `copyWithin()` copies up to but not including `end`.\n    - Negative index counts back from the end of the array — if `end < 0`, `end + array.length` is used.\n    - If `end < -array.length`, `0` is used.\n    - If `end >= array.length` or `end` is omitted, `array.length` is used, causing all elements until the end to be copied.\n    - If `end` is positioned before or at `start` after normalization, nothing is copied.\n\n### Return value\n\nThe modified array.\n\n## Description\n\nThe `copyWithin()` method works like C and C++'s `memmove`, and is a high-performance method to shift the data of an `Array`. The sequence is copied and pasted as one operation; the pasted sequence will have the copied values even when the copy and paste region overlap.\n\nThe `copyWithin()` method is a mutating method. It does not alter the length of `this`, but it will change the content of `this` and create new properties or delete existing properties, if necessary.\n\nThe `copyWithin()` method preserves empty slots. If the region to be copied from is sparse, the empty slots' corresponding new indices are [deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) and also become empty slots.\n\nThe `copyWithin()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Array/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.entries\n\nThe **`entries()`** method returns a new **Array\nIterator** object that contains the key/value pairs for each index in the\narray.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nA new `Array` iterator object.\n\n## Description\n\nWhen used on sparse arrays, the `entries()` method iterates empty slots as if they have the value `undefined`.\n\nThe `entries()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Array/prototype/every.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.every\n\nThe **`every()`** method tests whether\nall elements in the array pass the test implemented by the provided function. It\nreturns a Boolean value.\n\n## Syntax\n\n```js\n// Arrow function\nevery((element) => { /* … */ })\nevery((element, index) => { /* … */ })\nevery((element, index, array) => { /* … */ })\n\n// Callback function\nevery(callbackFn)\nevery(callbackFn, thisArg)\n\n// Inline callback function\nevery(function (element) { /* … */ })\nevery(function (element, index) { /* … */ })\nevery(function (element, index, array) { /* … */ })\nevery(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value to indicate the element passes the test, and a falsy value otherwise.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `every()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\n`true` if `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value for every array element. Otherwise, `false`.\n\n## Description\n\nThe `every()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array, until the `callbackFn` returns a [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value. If such an element is found, `every()` immediately returns `false` and stops iterating through the array. Otherwise, if `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value for all elements, `every()` returns `true`.\n\n`every` acts like the \"for all\" quantifier in mathematics. In particular, for an empty array, it returns `true`. (It is [vacuously true](https://en.wikipedia.org/wiki/Vacuous_truth) that all elements of the [empty set](https://en.wikipedia.org/wiki/Empty_set#Properties) satisfy any given condition.)\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\n`every()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `every()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `every()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Array/prototype/fill.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.fill\n\nThe **`fill()`** method changes all elements in an array to a static value, from a start index (default `0`) to an end index (default `array.length`).\nIt returns the modified array.\n\n## Syntax\n\n```js\nfill(value)\nfill(value, start)\nfill(value, start, end)\n```\n\n### Parameters\n\n- `value`\n  - : Value to fill the array with. Note all elements in the array will be this exact value: if `value` is an object, each slot in the array will reference that object.\n- `start` _**optional**_\n  - : Zero-based index at which to start filling, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, no index is filled.\n- `end` _**optional**_\n  - : Zero-based index at which to end filling, converted to an integer. `fill()` fills up to but not including `end`.\n    - Negative index counts back from the end of the array — if `end < 0`, `end + array.length` is used.\n    - If `end < -array.length`, `0` is used.\n    - If `end >= array.length` or `end` is omitted, `array.length` is used, causing all indices until the end to be filled.\n    - If `end` is positioned before or at `start` after normalization, no index is filled.\n\n### Return value\n\nThe modified array, filled with `value`.\n\n## Description\n\nThe `fill()` method is a mutating method. It does not alter the length of `this`, but it will change the content of `this`.\n\nThe `fill()` method fills empty slots in sparse arrays with `value` as well.\n\nThe `fill()` method is generic. It only expects the `this` value to have a `length` property. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Array/prototype/filter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.filter\n\nThe **`filter()`** method creates a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of a portion of a given array, filtered down to just the elements from the given array that pass the test implemented by the provided function.\n\n## Syntax\n\n```js\n// Arrow function\nfilter((element) => { /* … */ })\nfilter((element, index) => { /* … */ })\nfilter((element, index, array) => { /* … */ })\n\n// Callback function\nfilter(callbackFn)\nfilter(callbackFn, thisArg)\n\n// Inline callback function\nfilter(function (element) { /* … */ })\nfilter(function (element, index) { /* … */ })\nfilter(function (element, index, array) { /* … */ })\nfilter(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) to keep the element in the resulting array, and a falsy value otherwise.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `filter()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\nA [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of a portion of the given array, filtered down to just the elements from the given array that pass the test implemented by the provided function. If no elements pass the test, an empty array will be returned.\n\n## Description\n\nThe `filter()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array, and constructs a new array of all the values for which `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. Array elements which do not pass the `callbackFn` test are not included in the new array.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nThe `filter()` method is a copying method. It does not alter `this` but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains the same elements as the ones from the original array (with some filtered out). However, the function provided as `callbackFn` can mutate the array. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `filter()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\nThe `filter()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Array/prototype/find.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.find()\n\nThe `find()` method returns the first element in the provided array that satisfies the provided testing function.\nIf no values satisfy the testing function, [`undefined`](../../../globals/undefined.mdx) is returned.\n\n- If you need the **index** of the found element in the array, use [`findIndex()`](./findIndex.mdx).\n- If you need to find the **index of a value**, use [`indexOf()`](./indexOf.mdx).\n  (It's similar to [`findIndex()`](./findIndex.mdx), but checks each element for equality with the value instead of using a testing function.)\n- If you need to find if a value **exists** in an array, use [`includes()`](./includes.mdx).\n  Again, it checks each element for equality with the value instead of using a testing function.\n- If you need to find if any element satisfies the provided testing function, use [`some()`](./some.mdx).\n\n## Syntax\n\n```js\n// Arrow function\nfind((element) => { /* … */ })\nfind((element, index) => { /* … */ })\nfind((element, index, array) => { /* … */ })\n\n// Callback function\nfind(callbackFn)\nfind(callbackFn, thisArg)\n\n// Inline callback function\nfind(function (element) { /* … */ })\nfind(function (element, index) { /* … */ })\nfind(function (element, index, array) { /* … */ })\nfind(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value to indicate a matching element has been found.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `find()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\nThe first element in the array that satisfies the provided testing function.\nOtherwise, [`undefined`](../../../globals/undefined.mdx) is returned.\n\n## Description\n\nThe `find()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array in ascending-index order, until `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. `find()` then returns that element and stops iterating through the array. If `callbackFn` never returns a truthy value, `find()` returns [`undefined`](../../../globals/undefined.mdx).\n\n`callbackFn` is invoked for _every_ index of the array, not just those with assigned values. Empty slots in sparse arrays behave the same as `undefined`.\n\n`find()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `find()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are visited as if they were `undefined`.\n\nThe `find()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Array/prototype/findIndex.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.findIndex\n\nThe **`findIndex()`** method returns the index of the first element in an array that satisfies the provided testing function.\nIf no elements satisfy the testing function, -1 is returned.\n\nSee also the [`find()`](./find.mdx) method, which returns the first element that satisfies the testing function (rather than its index).\n\n## Syntax\n\n```js\n// Arrow function\nfindIndex((element) => { /* … */ })\nfindIndex((element, index) => { /* … */ })\nfindIndex((element, index, array) => { /* … */ })\n\n// Callback function\nfindIndex(callbackFn)\nfindIndex(callbackFn, thisArg)\n\n// Inline callback function\nfindIndex(function (element) { /* … */ })\nfindIndex(function (element, index) { /* … */ })\nfindIndex(function (element, index, array) { /* … */ })\nfindIndex(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value to indicate a matching element has been found.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `findIndex()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\nThe index of the first element in the array that passes the test. Otherwise, `-1`.\n\n## Description\n\nThe `findIndex()` is an iterative method. It calls a provided `callbackFn` function once for each element in an array in ascending-index order, until `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. `findIndex()` then returns the index of that element and stops iterating through the array. If `callbackFn` never returns a truthy value, `findIndex()` returns `-1`.\n\n`callbackFn` is invoked for _every_ index of the array, not just those with assigned values. Empty slots in sparse arrays behave the same as `undefined`.\n\n`findIndex()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `findIndex()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are visited as if they were `undefined`.\n\nThe `findIndex()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Array/prototype/flat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.flat\n\nThe **`flat()`** method creates a new array with all sub-array\nelements concatenated into it recursively up to the specified depth.\n\n## Syntax\n\n```js\nflat()\nflat(depth)\n```\n\n### Parameters\n\n- `depth` _**optional**_\n  - : The depth level specifying how deep a nested array structure should be flattened.\n    Defaults to 1.\n\n### Return value\n\nA new array with the sub-array elements concatenated into it.\n\n## Description\n\nThe `flat()` method is a copying method. It does not alter `this` but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains the same elements as the ones from the original array.\n\nThe `flat()` method ignores empty slots if the array being flattened is sparse. For example, if `depth` is 1, both empty slots in the root array and in the first level of nested arrays are ignored, but empty slots in further nested arrays are preserved with the arrays themselves.\n\nThe `flat()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. However, its elements must be arrays if they are to be flattened.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Array/prototype/flatMap.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.flatMap()\n\nThe **`flatMap()`** method returns a new array formed by applying a given callback function to each element of the array, and then flattening the result by one level. It is identical to a [`Array.prototype.map()`](./map.mdx) followed by a [`Array.prototype.flat()`](./flat.mdx) of depth 1 (`arr.map(...args).flat()`), but slightly more efficient than calling those two methods separately.\n\n## Syntax\n\n```js\n// Arrow function\nflatMap((element) => { /* … */ })\nflatMap((element, index) => { /* … */ })\nflatMap((element, index, array) => { /* … */ })\n\n// Callback function\nflatMap(callbackFn)\nflatMap(callbackFn, thisArg)\n\n// Inline callback function\nflatMap(function (element) { /* … */ })\nflatMap(function (element, index) { /* … */ })\nflatMap(function (element, index, array) { /* … */ })\nflatMap(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return an array containing new elements of the new array, or a single non-array value to be added to the new array.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `flatMap()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\nA new array with each element being the result of the callback function and flattened\nby a depth of 1.\n\n## Description\n\nThe `flatMap()` method is an iterative method. See [`Array.prototype.map()`](./map.mdx) for a detailed description of the callback function. The `flatMap()` method is identical to [`map(callbackFn, thisArg)`](./map.mdx) followed by [`flat(1)`](./flat.mdx) — for each element, it produces an array of new elements, and concatenates the resulting arrays together to form a new array.\n\nThe `flatMap()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. However, the value returned from `callbackFn` must be an array if it is to be flattened.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Array/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.forEach()\n\nThe **`forEach()`** method executes a provided function once\nfor each array element.\n\n## Syntax\n\n```js\n// Arrow function\nforEach((element) => { /* … */ })\nforEach((element, index) => { /* … */ })\nforEach((element, index, array) => { /* … */ })\n\n// Callback function\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n\n// Inline callback function\nforEach(function (element) { /* … */ })\nforEach(function (element, index) { /* … */ })\nforEach(function (element, index, array) { /* … */ })\nforEach(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value is discarded.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `forEach()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\n`undefined`.\n\n## Description\n\nThe `forEach()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array in ascending-index order. Unlike [`Array.prototype.map()`](./map.mdx), `forEach()` always returns [`undefined`](../../../globals/undefined.mdx) and is not chainable. The typical use case is to execute side effects at the end of a chain.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\n`forEach()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `forEach()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\nThe `forEach()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n\nThere is no way to stop or break a `forEach()` loop other than by throwing an exception. If you need such behavior, the `forEach()` method is the wrong tool.\n\nEarly termination may be accomplished with looping statements like [`for`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for), [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of), and [`for...in`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...in). Array methods like [`Array.prototype.some()`](./some.mdx), [`Array.prototype.some()`](./some.mdx), [`Array.prototype.find()`](./find.mdx), and [`Array.prototype.findIndex()`](./findIndex.mdx) also stops iteration immediately when further iteration is not necessary.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Array/prototype/includes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.includes()\n\nThe **`includes()`** method determines whether an array\nincludes a certain value among its entries, returning `true` or\n`false` as appropriate.\n\n## Syntax\n\n```js\nincludes(searchElement)\nincludes(searchElement, fromIndex)\n```\n\n### Parameters\n\n- `searchElement`\n  - : The value to search for.\n- `fromIndex` _**optional**_\n  - : Zero-based index at which to start searching, converted to an integer.\n    - Negative index counts back from the end of the array — if `fromIndex < 0`, `fromIndex + array.length` is used. However, the array is still searched from front to back in this case.\n    - If `fromIndex < -array.length` or `fromIndex` is omitted, `0` is used, causing the entire array to be searched.\n    - If `fromIndex >= array.length`, the array is not searched and `false` is returned.\n\n### Return value\n\nA boolean value which is `true` if the value `searchElement` is found within the array (or the part of the array indicated by the index `fromIndex`, if specified).\n\n## Description\n\nThe `includes()` method compares `searchElement` to elements of the array using the [SameValueZero](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) algorithm. Values of zero are all considered to be equal, regardless of sign. (That is, `-0` is equal to `0`), but `false` is _not_ considered to be the same as `0`. [`NaN`](../../NaN.mdx) can be correctly searched for.\n\nWhen used on sparse arrays, the `includes()` method iterates empty slots as if they have the value `undefined`.\n\nThe `includes()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Array/prototype/indexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.indexOf()\n\nThe **`indexOf()`** method returns the first index at which a\ngiven element can be found in the array, or -1 if it is not present.\n\n## Syntax\n\n```js\nindexOf(searchElement)\nindexOf(searchElement, fromIndex)\n```\n\n### Parameters\n\n- `searchElement`\n  - : Element to locate in the array.\n- `fromIndex` _**optional**_\n  - : Zero-based index at which to start searching, converted to an integer.\n    - Negative index counts back from the end of the array — if `fromIndex < 0`, `fromIndex + array.length` is used. Note, the array is still searched from front to back in this case.\n    - If `fromIndex < -array.length` or `fromIndex` is omitted, `0` is used, causing the entire array to be searched.\n    - If `fromIndex >= array.length`, the array is not searched and `-1` is returned.\n\n### Return value\n\nThe first index of the element in the array; **-1** if not found.\n\n## Description\n\nThe `indexOf()` method compares `searchElement` to elements of the array using [strict equality](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) (the same algorithm used by the `===` operator).\n\nThe `indexOf()` method skips empty slots in sparse arrays.\n\nThe `indexOf()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Array/prototype/join.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.join()\n\nThe **`join()`** method creates and\nreturns a new string by concatenating all of the elements in an array\n(or an [array-like object](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects)),\nseparated by commas or a specified separator string. If the array has\nonly one item, then that item will be returned without using the separator.\n\n## Syntax\n\n```js\njoin()\njoin(separator)\n```\n\n### Parameters\n\n- `separator` _**optional**_\n  - : Specifies a string to separate each pair of adjacent elements of the array. The\n    separator is converted to a string if necessary. If omitted, the array elements are\n    separated with a comma (\",\"). If `separator` is an empty string, all\n    elements are joined without any characters in between them.\n\n### Return value\n\nA string with all array elements joined. If `arr.length` is\n`0`, the empty string is returned.\n\n## Description\n\nThe string conversions of all array elements are joined into one string. If an element is `undefined`, `null`, it is converted to an empty string instead of the string `\"null\"` or `\"undefined\"`.\n\nThe `join` method is accessed internally by [`Array.prototype.toString()`](./toString.mdx) with no arguments. Overriding `join` of an array instance will override its `toString` behavior as well.\n\nWhen used on sparse arrays, the `join()` method iterates empty slots as if they have the value `undefined`.\n\nThe `join()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Array/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.keys()\n\nThe **`keys()`** method returns a new **Array\nIterator** object that contains the keys for each index in the array.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nA new `Array` iterator object.\n\n## Description\n\nWhen used on sparse arrays, the `keys()` method iterates empty slots as if they have the value `undefined`.\n\nThe `keys()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Array/prototype/lastIndexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.lastIndexOf()\n\nThe **`lastIndexOf()`** method returns the last index at which\na given element can be found in the array, or -1 if it is not present. The array is\nsearched backwards, starting at `fromIndex`.\n\n## Syntax\n\n```js\nlastIndexOf(searchElement)\nlastIndexOf(searchElement, fromIndex)\n```\n\n### Parameters\n\n- `searchElement`\n  - : Element to locate in the array.\n- `fromIndex` _**optional**_\n  - : Zero-based index at which to start searching backwards, converted to an integer.\n    - Negative index counts back from the end of the array — if `fromIndex < 0`, `fromIndex + array.length` is used.\n    - If `fromIndex < -array.length`, the array is not searched and `-1` is returned. You can think of it conceptually as starting at a nonexistent position before the beginning of the array and going backwards from there. There are no array elements on the way, so `searchElement` is never found.\n    - If `fromIndex >= array.length` or `fromIndex` is omitted, `array.length - 1` is used, causing the entire array to be searched. You can think of it conceptually as starting at a nonexistent position beyond the end of the array and going backwards from there. It eventually reaches the real end position of the array, at which point it starts searching backwards through the actual array elements.\n\n### Return value\n\nThe last index of the element in the array; **-1** if not found.\n\n## Description\n\nThe `lastIndexOf()` method compares `searchElement` to elements of the array using [strict equality](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) (the same algorithm used by the `===` operator).\n\nThe `lastIndexOf()` method skips empty slots in sparse arrays.\n\nThe `lastIndexOf()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Array/prototype/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.length\n\nThe **`length`** data property of an `Array` instance represents the number of elements in that array. The value is an unsigned, 32-bit integer that is always numerically greater than the highest index in the array.\n\n## Value\n\nA non-negative integer less than 2<sup>32</sup>.\n\n## Description\n\nThe value of the `length` property is a non-negative integer with a value less than 2<sup>32</sup>.\n\n```js\nconst listA = [1, 2, 3];\nconst listB = new Array(6);\n\nconsole.log(listA.length);\n// 3\n\nconsole.log(listB.length);\n// 6\n\nlistB.length = 2 ** 32; // 4294967296\n// RangeError: Invalid array length\n\nconst listC = new Array(-100); // Negative numbers are not allowed\n// RangeError: Invalid array length\n```\n\nThe array object observes the `length` property, and automatically syncs the `length` value with the array's content. This means:\n\n- Setting `length` to a value smaller than the current length truncates the array — elements beyond the new `length` are deleted.\n- Setting any array index (a non-negative integer smaller than 2<sup>32</sup>) beyond the current `length` extends the array — the `length` property is increased to reflect the new highest index.\n- Setting `length` to an invalid value (e.g. a negative number or a non-integer) throws a `RangeError` exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Array/prototype/map.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.map()\n\nThe **`map()`** method **creates\na new array** populated with the results of calling a provided function on\nevery element in the calling array.\n\n## Syntax\n\n```js\n// Arrow function\nmap((element) => { /* … */ })\nmap((element, index) => { /* … */ })\nmap((element, index, array) => { /* … */ })\n\n// Callback function\nmap(callbackFn)\nmap(callbackFn, thisArg)\n\n// Inline callback function\nmap(function (element) { /* … */ })\nmap(function (element, index) { /* … */ })\nmap(function (element, index, array) { /* … */ })\nmap(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value is added as a single element in the new array.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `map()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\nA new array with each element being the result of the callback function.\n\n## Description\n\nThe `map()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array and constructs a new array from the results.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nThe `map()` method is a copying method. It does not alter `this`. However, the function provided as `callbackFn` can mutate the array. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `map()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `map()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n\nSince `map` builds a new array, calling it without using the returned\narray is an anti-pattern; use [`Array.prototype.forEach()`](./forEach.mdx) or\n`for...of` instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Array/prototype/pop.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.pop()\n\nThe **`pop()`** method removes the **last**\nelement from an array and returns that element. This method changes the length of the\narray.\n\n## Syntax\n\n```js\npop()\n```\n\n### Return value\n\nThe removed element from the array; [`undefined`](../../../globals/undefined.mdx) if the array is empty.\n\n## Description\n\nThe `pop()` method removes the last element from an array and returns that value to the caller. If you call `pop()` on an empty array, it returns [`undefined`](../../../globals/undefined.mdx).\n\n[`Array.prototype.shift()`](./shift.mdx) has similar behavior to `pop()`, but applied to the first element in an array.\n\nThe `pop()` method is a mutating method. It changes the length and the content of `this`. In case you want the value of `this` to be the same, but return a new array with the last element removed, you can use [`arr.slice(0, -1)`](./slice.mdx) instead.\n\nThe `pop()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Array/prototype/push.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.push()\n\nThe **`push()`** method adds one or more elements to the end of\nan array and returns the new length of the array.\n\n## Syntax\n\n```js\npush(element0)\npush(element0, element1)\npush(element0, element1, /* … ,*/ elementN)\n```\n\n### Parameters\n\n- `elementN`\n  - : The element(s) to add to the end of the array.\n\n### Return value\n\nThe new [`Array.prototype.length`](./length.mdx) property of the object upon which the method was called.\n\n## Description\n\nThe `push()` method appends values to an array.\n\n[`Array.prototype.unshift()`](./unshift.mdx)has similar behavior to `push()`, but applied to the start of an array.\n\nThe `push()` method is a mutating method. It changes the length and the content of `this`. In case you want the value of `this` to be the same, but return a new array with elements appended to the end, you can use [`arr.concat([element0, element1, /* ... ,*/ elementN])`](./concat.mdx) instead. Notice that the elements are wrapped in an extra array — otherwise, if the element is an array itself, it would be spread instead of pushed as a single element due to the behavior of `concat()`.\n\nThe `push()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Array/prototype/reduce.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.reduce()\n\nThe **`reduce()`** method executes a user-supplied \"reducer\" callback function on each element of the array, in order, passing in the return value from the calculation on the preceding element.\nThe final result of running the reducer across all elements of the array is a single value.\n\nThe first time that the callback is run there is no \"return value of the previous calculation\".\nIf supplied, an initial value may be used in its place.\nOtherwise the array element at index 0 is used as the initial value and iteration starts from the next element (index 1 instead of index 0).\n\nPerhaps the easiest-to-understand case for `reduce()` is to return the sum of all the elements in an array:\n\nThe reducer walks through the array element-by-element, at each step adding the current array value to the result from the previous step (this result is the running sum of all the previous steps) — until there are no more elements to add.\n\n## Syntax\n\n```js\n// Arrow function\nreduce((accumulator, currentValue) => { /* … */ })\nreduce((accumulator, currentValue, currentIndex) => { /* … */ })\nreduce((accumulator, currentValue, currentIndex, array) => { /* … */ })\n\nreduce((accumulator, currentValue) => { /* … */ }, initialValue)\nreduce((accumulator, currentValue, currentIndex) => { /* … */ }, initialValue)\nreduce((accumulator, currentValue, currentIndex, array) => { /* … */ }, initialValue)\n\n// Callback function\nreduce(callbackFn)\nreduce(callbackFn, initialValue)\n\n// Inline callback function\nreduce(function (accumulator, currentValue) { /* … */ })\nreduce(function (accumulator, currentValue, currentIndex) { /* … */ })\nreduce(function (accumulator, currentValue, currentIndex, array) { /* … */ })\n\nreduce(function (accumulator, currentValue) { /* … */ }, initialValue)\nreduce(function (accumulator, currentValue, currentIndex) { /* … */ }, initialValue)\nreduce(function (accumulator, currentValue, currentIndex, array) { /* … */ }, initialValue)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value becomes the value of the `accumulator` parameter on the next invocation of `callbackFn`. For the last invocation, the return value becomes the return value of `reduce()`.\n\n    The function is called with the following arguments:\n\n    - `accumulator`\n      - : The value resulting from the previous call to `callbackFn`. On first call, `initialValue` if specified, otherwise the value of `array[0]`.\n    - `currentValue`\n      - : The value of the current element. On first call, the value of `array[0]` if an `initialValue` was specified, otherwise the value of `array[1]`.\n    - `currentIndex`\n      - : The index position of `currentValue` in the array. On first call, `0` if `initialValue` was specified, otherwise `1`.\n    - `array`\n      - : The array `reduce()` was called upon.\n\n- `initialValue` _**optional**_\n  - : A value to which `accumulator` is initialized the first time the callback is called.\n    If `initialValue` is specified, `callbackFn` starts executing with the first value in the array as `currentValue`.\n    If `initialValue` is _not_ specified, `accumulator` is initialized to the first value in the array, and `callbackFn` starts executing with the second value in the array as `currentValue`. In this case, if the array is empty (so that there's no first value to return as `accumulator`), an error is thrown.\n\n### Return value\n\nThe value that results from running the \"reducer\" callback function to completion over the entire array.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n\n  - : The array contains no elements and `initialValue` is not provided.\n\n## Description\n\nThe `reduce()` method is an iterative method. It runs a \"reducer\" callback function over all elements in the array, in ascending-index order, and accumulates them into a single value. Every time, the return value of `callbackFn` is passed into `callbackFn` again on next invocation as `accumulator`. The final value of `accumulator` (which is the value returned from `callbackFn` on the final iteration of the array) becomes the return value of `reduce()`.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nUnlike other [iterative methods](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array#iterative_methods), `reduce()` does not accept a `thisArg` argument. `callbackFn` is always called with `undefined` as `this`, which gets substituted with `globalThis` if `callbackFn` is non-strict.\n\n`reduce()` is a central concept in [functional programming](https://en.wikipedia.org/wiki/Functional_programming), where it's not possible to mutate any value, so in order to accumulate all values in an array, one must return a new accumulator value on every iteration. This convention propagates to JavaScript's `reduce()`: you should use [spreading](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) or other copying methods where possible to create new arrays and objects as the accumulator, rather than mutating the existing one. If you decided to mutate the accumulator instead of copying it, remember to still return the modified object in the callback, or the next iteration will receive undefined.\n\n`reduce()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `reduce()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `reduce()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n\n### When to not use reduce()\n\nRecursive functions like `reduce()` can be powerful but sometimes difficult to understand, especially for less-experienced JavaScript developers. If code becomes clearer when using other array methods, developers must weigh the readability tradeoff against the other benefits of using `reduce()`. In cases where `reduce()` is the best choice, documentation and semantic variable naming can help mitigate readability drawbacks.\n\n### Edge cases\n\nIf the array only has one element (regardless of position) and no `initialValue` is provided, or if `initialValue` is provided but the array is empty, the solo value will be returned _without_ calling `callbackFn`.\n\nIf `initialValue` is provided and the array is not empty, then the reduce method will always invoke the callback function starting at index 0.\n\nIf `initialValue` is not provided then the reduce method will act differently for arrays with length larger than 1, equal to 1 and 0, as shown in the following example:\n\n```js\nconst getMax = (a, b) => Math.max(a, b);\n\n// callback is invoked for each element in the array starting at index 0\n[1, 100].reduce(getMax, 50); // 100\n[50].reduce(getMax, 10); // 50\n\n// callback is invoked once for element at index 1\n[1, 100].reduce(getMax); // 100\n\n// callback is not invoked\n[50].reduce(getMax); // 50\n[].reduce(getMax, 1); // 1\n\n[].reduce(getMax); // TypeError\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Array/prototype/reduceRight.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.reduceRight()\n\nThe **`reduceRight()`** method applies a function against an\naccumulator and each value of the array (from right-to-left) to reduce it to a single\nvalue.\n\nSee also [`Array.prototype.reduce()`](./reduce.mdx) for left-to-right.\n\n## Syntax\n\n```js\n// Arrow function\nreduceRight((accumulator, currentValue) => { /* … */ })\nreduceRight((accumulator, currentValue, index) => { /* … */ })\nreduceRight((accumulator, currentValue, index, array) => { /* … */ })\nreduceRight((accumulator, currentValue, index, array) => { /* … */ }, initialValue)\n\n// Callback function\nreduceRight(callbackFn)\nreduceRight(callbackFn, initialValue)\n\n// Callback reducer function\nreduceRight(function (accumulator, currentValue) { /* … */ })\nreduceRight(function (accumulator, currentValue, index) { /* … */ })\nreduceRight(function (accumulator, currentValue, index, array) { /* … */ })\nreduceRight(function (accumulator, currentValue, index, array) { /* … */ }, initialValue)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value becomes the value of the `accumulator` parameter on the next invocation of `callbackFn`. For the last invocation, the return value becomes the return value of `reduce()`.\n\n    The function is called with the following arguments:\n\n    - `accumulator`\n      - : The value previously returned in the last invocation of the callback, or\n        `initialValue`, if supplied. (See below.)\n    - `currentValue`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `reduceRight()` was called upon.\n\n- `initialValue` _**optional**_\n  - : Value to use as accumulator to the first call of the\n    `callbackFn`. If no initial value is supplied, the last element in\n    the array will be used and skipped. Calling reduce or reduceRight on an empty array\n    without an initial value creates a `TypeError`.\n\n### Return value\n\nThe value that results from the reduction.\n\n## Description\n\nThe `reduceRight()` method is an iterative method. It runs a \"reducer\" callback function over all elements in the array, in descending-index order, and accumulates them into a single value.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nUnlike other [iterative methods](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array#iterative_methods), `reduce()` does not accept a `thisArg` argument. `callbackFn` is always called with `undefined` as `this`, which gets substituted with `globalThis` if `callbackFn` is non-strict.\n\n`reduceRight()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `reduceRight()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `reduceRight()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Array/prototype/reverse.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.reverse()\n\nThe **`reverse()`** method reverses an array _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_ and returns the reference to the same array, the first array element now becoming the last, and the last array element becoming the first. In other words, elements order in the array will be turned towards the direction opposite to that previously stated.\n\n## Syntax\n\n```js\nreverse()\n```\n\n### Return value\n\nThe reference to the original array, now reversed. Note that the array is reversed _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_, and no copy is made.\n\n## Description\n\nThe `reverse()` method transposes the elements of the calling array object in\nplace, mutating the array, and returning a reference to the array.\n\nThe `reverse()` method preserves empty slots. If the source array is sparse, the empty slots' corresponding new indices are [deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) and also become empty slots.\n\nThe `reverse()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Array/prototype/shift.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.shift()\n\nThe **`shift()`** method removes the **first**\nelement from an array and returns that removed element. This method changes the length\nof the array.\n\n## Syntax\n\n```js\nshift()\n```\n\n### Return value\n\nThe removed element from the array; [`undefined`](../../../globals/undefined.mdx) if the array is empty.\n\n## Description\n\nThe `shift()` method removes the element at the zeroth index and shifts the\nvalues at consecutive indexes down, then returns the removed value. If the\n[`Array.prototype.length`](./length.mdx) property is 0, [`undefined`](../../../globals/undefined.mdx) is returned.\n\nThe [`Array.prototype.pop()`](./pop.mdx) method has similar behavior to `shift()`, but applied to the last element in an array.\n\nThe `shift()` method is a mutating method. It changes the length and the content of `this`. In case you want the value of `this` to be the same, but return a new array with the first element removed, you can use [`arr.slice(1)`](./slice.mdx) instead.\n\nThe `shift()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Array/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.slice()\n\nThe **`slice()`** method returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of a portion of\nan array into a new array object selected from `start` to `end`\n(`end` not included) where `start` and `end` represent\nthe index of items in that array. The original array will not be modified.\n\n## Syntax\n\n```js\nslice()\nslice(start)\nslice(start, end)\n```\n\n### Parameters\n\n- `start` _**optional**_\n  - : Zero-based index at which to start extraction, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, nothing is extracted.\n- `end` _**optional**_\n  - : Zero-based index at which to end extraction, converted to an integer. `slice()` extracts up to but not including `end`.\n    - Negative index counts back from the end of the array — if `end < 0`, `end + array.length` is used.\n    - If `end < -array.length`, `0` is used.\n    - If `end >= array.length` or `end` is omitted, `array.length` is used, causing all elements until the end to be extracted.\n    - If `end` is positioned before or at `start` after normalization, nothing is extracted.\n\n### Return value\n\nA new array containing the extracted elements.\n\n## Description\n\nThe `slice()` method is a copying method. It does not alter `this` but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains some of the same elements as the ones from the original array.\n\nThe `slice()` method preserves empty slots. If the sliced portion is sparse, the returned array is sparse as well.\n\nThe `slice()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Array/prototype/some.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.some()\n\nThe **`some()`** method tests whether\nat least one element in the array passes the test implemented by the provided\nfunction. It returns true if, in the array, it finds an element for which the provided function returns true; otherwise it returns false. It doesn't modify the array.\n\n## Syntax\n\n```js\n// Arrow function\nsome((element) => { /* … */ })\nsome((element, index) => { /* … */ })\nsome((element, index, array) => { /* … */ })\n\n// Callback function\nsome(callbackFn)\nsome(callbackFn, thisArg)\n\n// Inline callback function\nsome(function (element) { /* … */ })\nsome(function (element, index) { /* … */ })\nsome(function (element, index, array) { /* … */ })\nsome(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) to indicate the element passes the test, and a falsy value otherwise.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `some()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\n`true` if the callback function returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value for at least one element in the array. Otherwise, `false`.\n\n## Description\n\nThe `some()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array, until the `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. If such an element is found, `some()` immediately returns `true` and stops iterating through the array. Otherwise, if `callbackFn` returns a [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value for all elements, `some()` returns `false`.\n\n`some()` acts like the \"there exists\" quantifier in mathematics. In particular, for an empty array, it returns `false` for any condition.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\n`some()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `some()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\nThe `some()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Array/prototype/sort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.sort()\n\nThe **`sort()`** method sorts the elements of an array _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_ and returns the reference to the same array, now sorted. The default sort order is ascending, built upon converting the elements into strings, then comparing their sequences of UTF-16 code units values.\n\nThe time and space complexity of the sort cannot be guaranteed as it depends on the\nimplementation.\n\n## Syntax\n\n```js\n// Functionless\nsort()\n\n// Arrow function\nsort((a, b) => { /* … */ } )\n\n// Compare function\nsort(compareFn)\n\n// Inline compare function\nsort(function compareFn(a, b) { /* … */ })\n```\n\n### Parameters\n\n- `compareFn` _**optional**_\n\n  - : Specifies a function that defines the sort order. If omitted, the array elements are converted to strings, then sorted according to each character's Unicode code point value.\n\n    - `a`\n      - : The first element for comparison.\n    - `b`\n      - : The second element for comparison.\n\n### Return value\n\nThe reference to the original array, now sorted. Note that the array is sorted _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_, and no copy is made.\n\n## Description\n\nIf `compareFn` is not supplied, all non-`undefined` array\nelements are sorted by converting them to strings and comparing strings in UTF-16 code\nunits order. For example, \"banana\" comes before \"cherry\". In a numeric sort, 9 comes\nbefore 80, but because numbers are converted to strings, \"80\" comes before \"9\" in the\nUnicode order. All `undefined` elements are sorted to the end of the array.\n\nThe `sort()` method preserves empty slots. If the source array is sparse, the empty slots are moved to the end of the array, and always come after all the `undefined`.\n\n> **Note:** In UTF-16, Unicode characters above `\\uFFFF` are\n> encoded as two surrogate code units, of the range\n> `\\uD800` - `\\uDFFF`. The value of each code unit is taken\n> separately into account for the comparison. Thus the character formed by the surrogate\n> pair `\\uD855\\uDE51` will be sorted before the character\n> `\\uFF3A`.\n\nIf `compareFn` is supplied, all non-`undefined` array\nelements are sorted according to the return value of the compare function (all\n`undefined` elements are sorted to the end of the array, with no call to\n`compareFn`).\n\n| `compareFn(a, b)` return value | sort order                         |\n| ------------------------------ | ---------------------------------- |\n| > 0                            | sort `a` after `b`                 |\n| < 0                            | sort `a` before `b`                |\n| === 0                          | keep original order of `a` and `b` |\n\nSo, the compare function has the following form:\n\n```js\nfunction compareFn(a, b) {\n  if (a is less than b by some ordering criterion) {\n    return -1;\n  }\n  if (a is greater than b by the ordering criterion) {\n    return 1;\n  }\n  // a must be equal to b\n  return 0;\n}\n```\n\nMore formally, the comparator is expected to have the following properties, in order to ensure proper sort behavior:\n\n- _Pure_: The comparator does not mutate the objects being compared or any external state. (This is important because there's no guarantee _when_ and _how_ the comparator will be called, so any particular call should not produce visible effects to the outside.)\n- _Stable_: The comparator returns the same result with the same pair of input.\n- _Reflexive_: `compareFn(a, a) === 0`.\n- _Anti-symmetric_: `compareFn(a, b)` and `compareFn(b, a)` must both be `0` or have opposite signs.\n- _Transitive_: If `compareFn(a, b)` and `compareFn(b, c)` are both positive, zero, or negative, then `compareFn(a, c)` has the same positivity as the previous two.\n\nA comparator conforming to the constraints above will always be able to return all of `1`, `0`, and `-1`, or consistently return `0`. For example, if a comparator only returns `1` and `0`, or only returns `0` and `-1`, it will not be able to sort reliably because _anti-symmetry_ is broken. A comparator that always returns `0` will cause the array to not be changed at all, but is reliable nonetheless.\n\nThe default lexicographic comparator satisfies all constraints above.\n\nTo compare numbers instead of strings, the compare function can subtract `b`\nfrom `a`. The following function will sort the array in ascending order (if\nit doesn't contain `Infinity` and `NaN`):\n\n```js\nfunction compareNumbers(a, b) {\n  return a - b;\n}\n```\n\nThe `sort()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Array/prototype/splice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.splice()\n\nThe **`splice()`** method changes the contents of an array by\nremoving or replacing existing elements and/or adding new elements [in place](https://en.wikipedia.org/wiki/In-place_algorithm). To access part of an array without modifying it, see [`Array.prototype.slice()`](./slice.mdx).\n\n## Syntax\n\n```js\nsplice(start)\nsplice(start, deleteCount)\nsplice(start, deleteCount, item1)\nsplice(start, deleteCount, item1, item2, itemN)\n```\n\n### Parameters\n\n- `start`\n\n  - : Zero-based index at which to start changing the array, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, no element will be deleted, but the method will behave as an adding function, adding as many elements as provided.\n\n- `deleteCount` _**optional**_\n\n  - : An integer indicating the number of elements in the array to remove from `start`.\n\n    If `deleteCount` is omitted, or if its value is greater than or equal to the number of elements after the position specified by `start`, then all the elements from `start` to the end of the array will be deleted. However, if you wish to pass any `itemN` parameter, you should pass `Infinity` as `deleteCount` to delete all elements after `start`, because an explicit `undefined` gets [converted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#integer_conversion) to `0`.\n\n    If `deleteCount` is `0` or negative, no elements are removed.\n    In this case, you should specify at least one new element (see below).\n\n- `item1`, …, `itemN` _**optional**_\n\n  - : The elements to add to the array, beginning from `start`.\n\n    If you do not specify any elements, `splice()` will only remove elements from the array.\n\n### Return value\n\nAn array containing the deleted elements.\n\nIf only one element is removed, an array of one element is returned.\n\nIf no elements are removed, an empty array is returned.\n\n## Description\n\nThe `splice()` method is a mutating method. It may change the content of `this`. If the specified number of elements to insert differs from the number of elements being removed, the array's `length` will be changed as well. At the same time, it uses [`@@species`](../@@species.mdx) to create a new array instance to be returned.\n\nIf the deleted portion is sparse, the array returned by `splice()` is sparse as well, with those corresponding indices being empty slots.\n\nThe `splice()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Array/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string representing\nthe elements of the array. The elements are converted to Strings using their\n`toLocaleString` methods and these Strings are separated by a locale-specific\nString (such as a comma \",\").\n\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\n- `locales` _**optional**_\n  - : A string with a BCP 47 language tag, or an array of such strings. For the general form and interpretation of the `locales` argument, see [Locale identification and negotiation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation).\n- `options` _**optional**_\n  - : An object with configuration properties. For numbers, see [`Number.prototype.toLocaleString()`](../../../globals/Number/prototype/toLocaleString.mdx); for dates, see [`Date.prototype.toLocaleString()`](../../../globals/Date/prototype/toLocaleString.mdx).\n\n### Return value\n\nA string representing the elements of the array.\n\n## Description\n\nThe `Array.prototype.toLocaleString` method traverses its content, calling the `toLocaleString` method of every element with the `locales` and `options` parameters provided, and concatenates them with an implementation-defined separator (such as a comma \",\"). Note that the method itself does not consume the two parameters — it only passes them to the `toLocaleString()` of each element. The choice of the separator string depends on the host's current locale, not the `locales` parameter.\n\nIf an element is `undefined`, `null`, it is converted to an empty string instead of the string `\"null\"` or `\"undefined\"`.\n\nWhen used on sparse arrays, the `toLocaleString()` method iterates empty slots as if they have the value `undefined`.\n\nThe `toLocaleString()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Array/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.toString()\n\nThe **`toString()`** method returns a string representing the\nspecified array and its elements.\n\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the elements of the array.\n\n## Description\n\nThe `Array` object overrides the `toString` method of `Object`. The `toString` method of arrays calls [`join()`](../../../globals/Array/prototype/join.mdx) internally, which joins the array and returns one string containing each array element separated by commas. If the `join` method is unavailable or is not a function, [`Object.prototype.toString`](../../../globals/Object/prototype/toString.mdx) is used instead, returning `[object Array]`.\n\n```js\nconst arr = [];\narr.join = 1; // re-assign `join` with a non-function\nconsole.log(arr.toString()); // [object Array]\n\nconsole.log(Array.prototype.toString.call({ join: () => 1 })); // 1\n```\n\nJavaScript calls the `toString` method automatically when an array is to be represented as a text value or when an array is referred to in a string concatenation.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Array/prototype/unshift.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.unshift()\n\nThe **`unshift()`** method adds one or more elements to the\nbeginning of an array and returns the new length of the array.\n\n## Syntax\n\n```js\nunshift(element0)\nunshift(element0, element1)\nunshift(element0, element1, /* … ,*/ elementN)\n```\n\n### Parameters\n\n- `elementN`\n  - : The elements to add to the front of the `arr`.\n\n### Return value\n\nThe new [`Array.prototype.length`](./length.mdx) property of the object upon which the\nmethod was called.\n\n## Description\n\nThe `unshift()` method inserts the given values to the beginning of an\narray-like object.\n\n[`Array.prototype.push()`](./push.mdx) has similar behavior to `unshift()`, but applied to the end of an array.\n\nPlease note that, if multiple elements are passed as parameters, they're inserted in\nchunk at the beginning of the object, in the exact same order they were passed as\nparameters. Hence, calling `unshift()` with `n`\narguments **once**, or calling it `n` times with\n**1** argument (with a loop, for example), don't yield the same results.\n\nSee example:\n\n```js\nlet arr = [4, 5, 6];\n\narr.unshift(1, 2, 3);\nconsole.log(arr);\n// [1, 2, 3, 4, 5, 6]\n\narr = [4, 5, 6]; // resetting the array\n\narr.unshift(1);\narr.unshift(2);\narr.unshift(3);\n\nconsole.log(arr);\n// [3, 2, 1, 4, 5, 6]\n```\n\nThe `unshift()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Array/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.values()\n\nThe **`values()`** method returns a new _array [iterator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterator_protocol)_ object that iterates the value of each index in the array.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nA new iterable iterator object.\n\n## Description\n\n`Array.prototype.values()` is the default implementation of [`Array.prototype[@@iterator]()`](./@@iterator.mdx).\n\n```js\nArray.prototype.values === Array.prototype[Symbol.iterator]; // true\n```\n\nWhen used on sparse arrays, the `values()` method iterates empty slots as if they have the value `undefined`.\n\nThe `values()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/ArrayBuffer/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get ArrayBuffer\\[Symbol.species]\n\nThe **`ArrayBuffer[Symbol.species]`** accessor property returns the constructor used to construct return values from array buffer methods.\n\n> **Warning:** The existence of `Symbol.species` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Syntax\n\n```js\nArrayBuffer[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct return values from array buffer methods that create new array buffers.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `ArrayBuffer` objects. Subclass constructors may override it to change the constructor assignment. The default implementation is basically:\n\n```js\n// Hypothetical underlying implementation for illustration\nclass ArrayBuffer {\n  static get [Symbol.species]() {\n    return this;\n  }\n}\n```\n\nBecause of this polymorphic implementation, `Symbol.species` of derived subclasses would also return the constructor itself by default.\n\n```js\nclass SubArrayBuffer extends ArrayBuffer {}\nSubArrayBuffer[Symbol.species] === SubArrayBuffer; // true\n```\n\nWhen calling array buffer methods that do not mutate the existing object but return a new array buffer instance (for example, [`slice()`](./prototype/slice.mdx)), the object's `constructor[Symbol.species]` will be accessed. The returned constructor will be used to construct the return value of the array buffer method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/ArrayBuffer/ArrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer()\n\nThe **`ArrayBuffer()`** constructor is used to create \"ArrayBuffer\" objects.\n\n## Syntax\n\n```js\nnew ArrayBuffer(length)\n```\n\n> **Note:** `ArrayBuffer()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `length`\n  - : The size, in bytes, of the array buffer to create.\n\n### Return value\n\nA new `ArrayBuffer` object of the specified size. Its contents are\ninitialized to 0.\n\n### Exceptions\n\n- [`RangeError`](../RangeError/RangeError.mdx)\n  - : Thrown if the `length` is larger than `Number_MAX_SAFE_INTEGER` (≥ 2<sup>53</sup>) or negative.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/ArrayBuffer/isView.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer.isView\n\nThe **`ArrayBuffer.isView()`** method determines whether the\npassed value is one of the `ArrayBuffer` views,\nsuch as [typed array objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray)\nor a [`DataView`](../DataView/DataView.mdx).\n\n## Syntax\n\n```js\nArrayBuffer.isView(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be checked.\n\n### Return value\n\n`true` if the given argument is one of the `ArrayBuffer` views;\notherwise, `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/ArrayBuffer/prototype/byteLength.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer.prototype.byteLength\n\nThe **`byteLength`** accessor property represents the length of an `ArrayBuffer` in bytes.\n\n## Description\n\nThe `byteLength` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when the array is constructed and cannot be changed. This property returns 0 if this `ArrayBuffer` has been detached.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/ArrayBuffer/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer.prototype.slice()\n\nThe **`slice()`** method returns a new `ArrayBuffer`\nwhose contents are a copy of this `ArrayBuffer`'s bytes from\n`begin`, inclusive, up to `end`, exclusive.\n\n## Syntax\n\n```js\nslice(begin)\nslice(begin, end)\n```\n\n### Parameters\n\n- `begin`\n  - : Zero-based byte index at which to begin slicing.\n- `end` _**optional**_\n  - : Byte index before which to end slicing. If end is unspecified, the new\n    `ArrayBuffer` contains all bytes from begin to the end of this\n    `ArrayBuffer`. If negative, it will make the Byte index begin from the last\n    Byte.\n\n### Return value\n\nA new `ArrayBuffer` object.\n\n## Description\n\nThe `slice()` method copies up to, but not including, the byte indicated by\nthe `end` parameter. If either `begin` or `end` is\nnegative, it refers to an index from the end of the array, as opposed to from the\nbeginning.\n\nThe range specified by the `begin` and `end` parameters is\nclamped to the valid index range for the current array. If the computed length of the\nnew `ArrayBuffer` would be negative, it is clamped to zero.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/BigInt/BigInt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt()\n\nThe **`BigInt()`** function returns a value of type **bigint**.\n\n## Syntax\n\n```js\nBigInt(value)\n```\n\n> **Note:** `BigInt()` can only be called without `new`. Attempting to construct it with `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `value`\n  - : The numeric value of the object being created. It may be a string, an integer, a boolean, or another `BigInt`.\n\n### Return value\n\nA `BigInt` value. Number values must be integers and are converted to BigInts. The boolean value `true` becomes `1n`, and `false` becomes `0n`. Strings are parsed as if they are source text for integer literals, which means they can have leading and trailing whitespaces and can be prefixed with `0b`, `0o`, or `0x`.\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if the parameter is a non-integral number.\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if at least one of these conditions is met:\n    - The parameter cannot be converted to a primitive.\n    - After conversion to a primitive, the result is [`undefined`](../undefined.mdx), `null`, `Symbol`.\n- [`SyntaxError`](../SyntaxError/SyntaxError.mdx)\n  - : Thrown if the parameter is a string that cannot be parsed as a `BigInt`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/BigInt/asIntN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.asIntN()\n\nThe **`BigInt.asIntN`** static method clamps a `BigInt` value to the given number of bits, and returns that value as a signed integer.\n\n## Syntax\n\n```js\nBigInt.asIntN(bits, bigint)\n```\n\n### Parameters\n\n- `bits`\n  - : The amount of bits available for the returned BigInt. Should be an integer between 0 and 2<sup>53</sup> - 1, inclusive.\n- `bigint`\n  - : The BigInt value to clamp to fit into the supplied bits.\n\n### Return value\n\nThe value of `bigint` modulo 2^`bits`, as a signed integer.\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `bits` is negative or greater than 2<sup>53</sup> - 1.\n\n## Description\n\nThe `BigInt.asIntN` method clamps a `BigInt` value to the given number of bits, and interprets the result as a signed integer. For example, for `BigInt.asIntN(3, 25n)`, the value `25n` is clamped to `1n`:\n\n```plain\n25n = 00011001 (base 2)\n          ^=== Clamp to three remaining bits\n===>       001 (base 2) = 1n\n```\n\nIf the leading bit of the remaining number is `1`, the result is negative. For example, `BigInt.asIntN(4, 25n)` yields `-7n`, because `1001` is the encoding of `-7` under two's complement:\n\n```plain\n25n = 00011001 (base 2)\n         ^==== Clamp to four remaining bits\n===>      1001 (base 2) = -7n\n```\n\n> **Note:** `BigInt` values are always encoded as two's complement in binary.\n\nUnlike similar language APIs such as [`Number.prototype.toExponential()`](../Number/prototype/toExponential.mdx), `asIntN` is a static property of `BigInt`, so you always use it as `BigInt.asIntN()`, rather than as a method of a BigInt value. Exposing `asIntN()` as a \"standard library function\" allows [interop with asm.js](https://github.com/tc39/proposal-bigint/blob/master/ADVANCED.md#dont-break-asmjs).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/BigInt/asUintN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.asUintN()\n\nThe **`BigInt.asUintN`** static method clamps a `BigInt` value to the given number of bits, and returns that value as an unsigned integer.\n\n## Syntax\n\n```js\nBigInt.asUintN(bits, bigint)\n```\n\n### Parameters\n\n- `bits`\n  - : The amount of bits available for the returned BigInt. Should be an integer between 0 and 2<sup>53</sup> - 1, inclusive.\n- `bigint`\n  - : The BigInt value to clamp to fit into the supplied bits.\n\n### Return value\n\nThe value of `bigint` modulo 2^`bits`, as an unsigned integer.\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `bits` is negative or greater than 2<sup>53</sup> - 1.\n\n## Description\n\nThe `BigInt.asUintN` method clamps a `BigInt` value to the given number of bits, and interprets the result as an unsigned integer. Unsigned integers have no sign bits and are always non-negative. For example, for `BigInt.asUintN(4, 25n)`, the value `25n` is clamped to `9n`:\n\n```plain\n25n = 00011001 (base 2)\n         ^==== Clamp to four remaining bits\n===>      1001 (base 2) = 9n\n```\n\n> **Note:** `BigInt` values are always encoded as two's complement in binary.\n\nUnlike similar language APIs such as [`Number.prototype.toExponential()`](../Number/prototype/toExponential.mdx), `asUintN` is a static property of `BigInt`, so you always use it as `BigInt.asUintN()`, rather than as a method of a BigInt value. Exposing `asUintN()` as a \"standard library function\" allows [interop with asm.js](https://github.com/tc39/proposal-bigint/blob/master/ADVANCED.md#dont-break-asmjs).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/BigInt/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string with a language-sensitive representation of this BigInt. In implementations with [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) support, this method simply calls `Intl.NumberFormat`.\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` parameters customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat), these parameters correspond exactly to the [`Intl.NumberFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) constructor's parameters. Implementations without `Intl.NumberFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#locales) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored.\n\nSee the [`Intl.NumberFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string with a language-sensitive representation of the given BigInt.\n\nIn implementations with `Intl.NumberFormat`, this is equivalent to `new Intl.NumberFormat(locales, options).format(number)`.\n\n## Performance\n\nWhen formatting large numbers of numbers, it is better to create a\n`Intl.NumberFormat` object and use the function provided by its\n`format()` method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/BigInt/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified `BigInt` value. The trailing \"n\" is not part of the string.\n\n## Syntax\n\n```js\ntoString()\ntoString(radix)\n```\n\n### Parameters\n\n- `radix` _**optional**_\n  - : An integer in the range 2 through 36 specifying the base to use for representing the BigInt value. Defaults to 10.\n\n### Return value\n\nA string representing the specified `BigInt` value.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `radix` is less than 2 or greater than 36.\n\n## Description\n\nThe `BigInt` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../Object/prototype/toString.mdx). For `BigInt` values, the `toString()` method returns a string representation of the value in the specified radix.\n\nFor radixes above 10, the letters of the alphabet indicate digits greater than 9. For example, for hexadecimal numbers (base 16) `a` through `f` are used.\n\nIf the specified BigInt value is negative, the sign is preserved. This is the case even if the radix is 2; the string returned is the positive binary representation of the BigInt value preceded by a `-` sign, **not** the two's complement of the BigInt value.\n\nThe `toString()` method requires its `this` value to be a `BigInt` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to BigInt values.\n\nBecause `BigInt` doesn't have a [`[Symbol.toPrimitive]()`](../../Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `BigInt` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, BigInt _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — rather, they are directly converted using the same algorithm as the initial `toString()` implementation.\n\n```js\nBigInt.prototype.toString = () => \"Overridden\";\nconsole.log(`${1n}`); // \"1\"\nconsole.log(`${Object(1n)}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/BigInt/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.prototype.valueOf()\n\nThe **`valueOf()`** method returns the wrapped primitive value\nof a `BigInt` object.\n\n## Syntax\n\n```js\nbigIntObj.valueOf()\n```\n\n### Return value\n\nA BigInt representing the primitive value of the specified `BigInt` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/BigInt64Array/BigInt64Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt64Array()\n\nThe **`BigInt64Array()`** typed array constructor creates a\nnew `BigInt64Array` object, which is, an array of 64-bit signed integers\nin the platform byte order. If control over byte order is needed, use\n[`DataView`](../DataView/DataView.mdx) instead. The contents are initialized to `0n`. Once\nestablished, you can reference elements in the array using the object's methods, or by\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew BigInt64Array()\nnew BigInt64Array(length)\nnew BigInt64Array(typedArray)\nnew BigInt64Array(object)\n\nnew BigInt64Array(buffer)\nnew BigInt64Array(buffer, byteOffset)\nnew BigInt64Array(buffer, byteOffset, length)\n```\n\n> **Note:** `BigInt64Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/BigUint64Array/BigUint64Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigUint64Array()\n\nThe **`BigUint64Array()`** typed array constructor creates a\nnew `BigUint64Array` object, which is, an array of 64-bit unsigned integers\nin the platform byte order. If control over byte order is needed, use\n[`DataView`](../DataView/DataView.mdx) instead. The contents are initialized to `0n`. Once\nestablished, you can reference elements in the array using the object's methods, or by\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew BigUint64Array()\nnew BigUint64Array(length)\nnew BigUint64Array(typedArray)\nnew BigUint64Array(object)\n\nnew BigUint64Array(buffer)\nnew BigUint64Array(buffer, byteOffset)\nnew BigUint64Array(buffer, byteOffset, length)\n```\n\n> **Note:** `BigUint64Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](..//TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Boolean/Boolean.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Boolean()\n\nThe **`Boolean()`** constructor can create `Boolean` objects or return primitive values of type boolean.\n\n## Syntax\n\n```js\nnew Boolean(value)\nBoolean(value)\n```\n\n> **Note:** `Boolean()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\n- `value`\n  - : The initial value of the `Boolean` object.\n\n### Return value\n\nWhen `Boolean()` is called as a constructor (with `new`), it creates a `Boolean` object, which is **not** a primitive.\n\nWhen `Boolean()` is called as a function (without `new`), it coerces the parameter to a boolean primitive.\n\n> **Warning:** You should rarely find yourself using `Boolean` as a constructor.\n\n## Description\n\nThe value passed as the first parameter is [converted to a boolean value](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean#boolean_coercion). If the value is omitted or is `0`, `-0`, `0n`, [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null), `false`, [`NaN`](../NaN.mdx), [`undefined`](../undefined.mdx), or the empty string (`\"\"`), then the object has an initial value of `false`. All other values, including any object, an empty array (`[]`), or the string `\"false\"`, create an object with an initial value of `true`.\n\n> **Note:** When the non-standard property [`document.all`](https://developer.mozilla.org/docs/Web/API/Document/all) is used as an argument for this constructor, the result is a `Boolean` object with the value `false`. This property is legacy and non-standard and should not be used.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Boolean/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Boolean.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified boolean value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified boolean value.\n\n## Description\n\nThe `Boolean` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../Object/prototype/toString.mdx). For `Boolean` values, the `toString` method returns a string representation of the boolean value, which is either `\"true\"` or `\"false\"`.\n\nThe `toString()` method requires its `this` value to be a `Boolean` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to boolean values.\n\nBecause `Boolean` doesn't have a [`[Symbol.toPrimitive]()`](../../Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `Boolean` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, boolean _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — rather, they are directly converted using the same algorithm as the initial `toString()` implementation.\n\n```js\nBoolean.prototype.toString = () => \"Overridden\";\nconsole.log(`${true}`); // \"true\"\nconsole.log(`${new Boolean(true)}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Boolean/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Boolean.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a\n`Boolean` object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nThe primitive value of the given `Boolean` object.\n\n## Description\n\nThe `valueOf()` method of `Boolean` returns the primitive value\nof a `Boolean` object or literal `Boolean` as a Boolean data type.\n\nThis method is usually called internally by JavaScript and not explicitly in code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/ByteLengthQueuingStrategy/ByteLengthQueuingStrategy.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ByteLengthQueuingStrategy()\n\nThe **`ByteLengthQueuingStrategy()`**\nconstructor creates and returns a `ByteLengthQueuingStrategy` object\ninstance.\n\n## Syntax\n\n```js\nnew ByteLengthQueuingStrategy(highWaterMark)\n```\n\n### Parameters\n\nAn object with the following property:\n\n- `highWaterMark`\n\n  - : The total number of bytes that can be contained in the internal queue before backpressure is applied.\n\n    Unlike `CountQueuingStrategy()` where the `highWaterMark` parameter specifies a simple count of the number of chunks, with `ByteLengthQueuingStrategy()`, the `highWaterMark` parameter specifies a number of _bytes_ — specifically, given a stream of chunks, how many bytes worth of those chunks (rather than a count of how many of those chunks) can be contained in the internal queue before backpressure is applied.\n\n### Return value\n\nAn instance of the `ByteLengthQueuingStrategy` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/ByteLengthQueuingStrategy/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ByteLengthQueuingStrategy.size()\n\nThe **`size()`** method of the\n`ByteLengthQueuingStrategy` interface returns the given chunk's\n`byteLength` property.\n\n## Syntax\n\n```js\nsize(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : A chunk of data being passed through the stream.\n\n### Return value\n\nAn integer representing the byte length of the given chunk.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/CompressionStream/CompressionStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CompressionStream()\n\nThe **`CompressionStream()`** constructor creates a new `CompressionStream` object which compresses a stream of data.\n\n## Syntax\n\n```js\nnew CompressionStream(format)\n```\n\n### Parameters\n\n- `format`\n\n  - : One of the following allowed compression formats:\n\n    - `\"gzip\"`\n    - `\"deflate\"`\n    - `\"deflate-raw\"`\n\n## Exceptions\n\n- `TypeError`\n  - : Thrown if the format passed to the constructor is not supported.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/CompressionStream/prototype/readable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CompressionStream.readable\n\nThe **`readable`** read-only property of the `CompressionStream` interface returns a `ReadableStream`.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/CompressionStream/prototype/writable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CompressionStream.writable\n\nThe **`writable`** read-only property of the `CompressionStream` interface returns a `WritableStream`.\n\n## Value\n\nA `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/CryptoKey/CryptoKey.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CryptoKey\n\nThe **`CryptoKey`** interface represents a cryptographic key obtained from one of the [`SubtleCrypto`](../SubtleCrypto/SubtleCrypto.mdx) method [`importKey()`](../SubtleCrypto/prototype/importKey.mdx).\n\n## Instance properties\n\n- [`type`](./prototype/type.mdx) _**readonly**_\n  - : The type of key the object represents. It may take one of the following values: `\"secret\"`, `\"private\"` or `\"public\"`.\n\n- [`extractable`](./prototype/extractable.mdx) _**readonly**_\n  - : A boolean value indicating whether or not the key may be extracted.\n\n- [`algorithm`](./prototype/algorithm.mdx) _**readonly**_\n  - : An object describing the algorithm for which this key can be used and any associated extra parameters.\n\n- [`usages`](./prototype/usages.mdx) _**readonly**_\n  - : An `Array` of strings, indicating what can be done with the key. Possible values for array elements are `\"encrypt\"`, `\"decrypt\"`, `\"sign\"`, `\"verify\"`, `\"deriveKey\"`, `\"deriveBits\"`, `\"wrapKey\"`, and `\"unwrapKey\"`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/CryptoKey/prototype/algorithm.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# algorithm\n\nThe read-only **`algorithm`** property of the [`CryptoKey`](../CryptoKey.mdx) interface returns an object describing the algorithm for which this key can be used, and any associated extra parameters.\n\nThe object returned depends of the algorithm used to generate the key.\n\n## Value\n\nAn object matching:\n\n- [`RsaHashedImportParams`](../../RsaHashedImportParams/RsaHashedImportParams.mdx) if the algorithm is any of the RSA variants.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/CryptoKey/prototype/extractable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# extractable\n\nThe read-only **`extractable`** property indicates whether or not the key may be extracted.\n\nIf the key cannot be exported, an exception will be thrown if an attempt to extract the key is made.\n\n## Value\n\nA boolean value that is `true` if the key can be exported and `false` if not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/CryptoKey/prototype/type.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# type\n\nThe read-only **`type`** property indicates which kind of key is represented by the object. It can have the following values:\n\n- `\"secret\"`: This key is a secret key for use with a symmetric algorithm.\n- `\"private\"`: This key is the private half of an asymmetric algorithm's key pair.\n- `\"public\"`: This key is the public half of an asymmetric algorithm's key pair.\n\n## Value\n\nOne of the following strings: `\"secret\"`, `\"private\"`, or `\"public\"`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/CryptoKey/prototype/usages.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# usages\n\nThe read-only **`usages`** property indicates what can be done with the key.\n\n## Value\n\nAn `Array` of strings from the following list:\n\n- `\"encrypt\"`: The key may be used to encrypt messages.\n- `\"decrypt\"`: The key may be used to decrypt messages.\n- `\"sign\"`: The key may be used to sign messages.\n- `\"verify\"`: The key may be used to verify signatures.\n- `\"deriveKey\"`: The key may be used in deriving a new key.\n- `\"deriveBits\"`: The key may be used in deriving bits.\n- `\"wrapKey\"`: The key may be used to wrap a key.\n- `\"unwrapKey\"`: The key may be used to unwrap a key.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/DOMException/DOMException.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException()\n\nThe **`DOMException()`** constructor returns a `DOMException` object with a specified message and name.\n\n## Syntax\n\n```js\nnew DOMException()\nnew DOMException(message)\nnew DOMException(message, name)\n```\n\n### Parameters\n\n- `message` _optional_\n  - : A description of the exception. If not present, the empty string `''` is\n    used.\n- `name` _optional_\n  - : A string. If the specified name is a [standard error name](#error-names), then getting the [`code`](./code.mdx) property of the `DOMException` object will return the code number corresponding to the specified name.\n\n### Return value\n\nA newly created `DOMException` object.\n\n## Error names\n\nCommon error names are listed here. Some APIs define their own sets of names, so this is not necessarily a complete list.\n\nNote that the following deprecated historical errors don't have an error name but instead have only a legacy constant code value and a legacy constant name:\n\n- Legacy code value: `2`, legacy constant name: `DOMSTRING_SIZE_ERR`\n- Legacy code value: `6`, legacy constant name: `NO_DATA_ALLOWED_ERR`\n- Legacy code value: `16`, legacy constant name: `VALIDATION_ERR`\n\n> **Note:** Because historically the errors were identified by a numeric value that corresponded with a named variable defined to have that value, some of the entries below indicate the legacy code value and constant name that were used in the past.\n\n- `IndexSizeError`\n  - : The index is not in the allowed range. (Legacy code value: `1` and legacy constant name: `INDEX_SIZE_ERR`)\n- `HierarchyRequestError`\n  - : The node tree hierarchy is not correct. (Legacy code value: `3` and legacy constant name: `HIERARCHY_REQUEST_ERR`)\n- `WrongDocumentError`\n  - : The object is in the wrong `Document`. (Legacy code value: `4` and legacy constant name: `WRONG_DOCUMENT_ERR`)\n- `InvalidCharacterError`\n  - : The string contains invalid characters. (Legacy code value: `5` and legacy constant name: `INVALID_CHARACTER_ERR`)\n- `NoModificationAllowedError`\n  - : The object cannot be modified. (Legacy code value: `7` and legacy constant name: `NO_MODIFICATION_ALLOWED_ERR`)\n- `NotFoundError`\n  - : The object cannot be found here. (Legacy code value: `8` and legacy constant name: `NOT_FOUND_ERR`)\n- `NotSupportedError`\n  - : The operation is not supported. (Legacy code value: `9` and legacy constant name: `NOT_SUPPORTED_ERR`)\n- `InvalidStateError`\n  - : The object is in an invalid state. (Legacy code value: `11` and legacy constant name: `INVALID_STATE_ERR`)\n- `InUseAttributeError`\n  - : The attribute is in use. (Legacy code value: `10` and legacy constant name: `INUSE_ATTRIBUTE_ERR`)\n- `SyntaxError`\n  - : The string did not match the expected pattern. (Legacy code value: `12` and legacy constant name: `SYNTAX_ERR`)\n- `InvalidModificationError`\n  - : The object cannot be modified in this way. (Legacy code value: `13` and legacy constant name: `INVALID_MODIFICATION_ERR`)\n- `NamespaceError`\n  - : The operation is not allowed by Namespaces in XML. (Legacy code value: `14` and legacy constant name: `NAMESPACE_ERR`)\n- `InvalidAccessError`\n  - : The object does not support the operation or argument. (Legacy code value: `15` and legacy constant name: `INVALID_ACCESS_ERR`)\n- `TypeMismatchError` *deprecated*\n  - : The type of the object does not match the expected type. (Legacy code value: `17` and legacy constant name: `TYPE_MISMATCH_ERR`) This value is deprecated; the JavaScript `TypeError` exception is now raised instead of a `DOMException` with this value.\n- `SecurityError`\n  - : The operation is insecure. (Legacy code value: `18` and legacy constant name: `SECURITY_ERR`)\n- `NetworkError`\n  - : A network error occurred. (Legacy code value: `19` and legacy constant name: `NETWORK_ERR`)\n- `AbortError`\n  - : The operation was aborted. (Legacy code value: `20` and legacy constant name: `ABORT_ERR`)\n- `URLMismatchError`\n  - : The given URL does not match another URL. (Legacy code value: `21` and legacy constant name: `URL_MISMATCH_ERR`)\n- `QuotaExceededError`\n  - : The quota has been exceeded. (Legacy code value: `22` and legacy constant name: `QUOTA_EXCEEDED_ERR`)\n- `TimeoutError`\n  - : The operation timed out. (Legacy code value: `23` and legacy constant name: `TIMEOUT_ERR`)\n- `InvalidNodeTypeError`\n  - : The node is incorrect or has an incorrect ancestor for this operation. (Legacy code value: `24` and legacy constant name: `INVALID_NODE_TYPE_ERR`)\n- `DataCloneError`\n  - : The object can not be cloned. (Legacy code value: `25` and legacy constant name: `DATA_CLONE_ERR`)\n- `EncodingError`\n  - : The encoding or decoding operation failed (No legacy code value and constant name).\n- `NotReadableError`\n  - : The input/output read operation failed (No legacy code value and constant name).\n- `UnknownError`\n  - : The operation failed for an unknown transient reason (e.g. out of memory) (No legacy code value and constant name).\n- `ConstraintError`\n  - : A mutation operation in a transaction failed because a constraint was not satisfied (No legacy code value and constant name).\n- `DataError`\n  - : Provided data is inadequate (No legacy code value and constant name).\n- `TransactionInactiveError`\n  - : A request was placed against a transaction that is currently not active or is finished (No legacy code value and constant name).\n- `ReadOnlyError`\n  - : The mutating operation was attempted in a \"readonly\" transaction (No legacy code value and constant name).\n- `VersionError`\n  - : An attempt was made to open a database using a lower version than the existing version (No legacy code value and constant name).\n- `OperationError`\n  - : The operation failed for an operation-specific reason (No legacy code value and constant name).\n- `NotAllowedError`\n  - : The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission (No legacy code value and constant name)."
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/DOMException/code.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException.prototype.code\n\nThe **`code`** read-only property of the `DOMException` interface returns one of the legacy [error code constants](./DOMException.mdx#error-names), or `0` if none match.\n\nThis field is used for historical reasons. New DOM exceptions don't use this anymore: they put this info in the [`name`](./name.mdx) attribute.\n\n## Value\n\nOne of the [error code constants](./DOMException.mdx#error-names), or `0` if none match.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/DOMException/message.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException.prototype.message\n\nThe **`message`** read-only property of the `DOMException` interface returns a string representing a message or description associated with the given [error name](./DOMException.mdx#error-names).\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/DOMException/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException.prototype.name\n\nThe **`name`** read-only property of the `DOMException` interface returns a string that contains one of the strings associated with an [error name](./DOMException.mdx#error-names).\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/DataView/DataView.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView()\n\nThe **`DataView()`** constructor is used to create `DataView` objects.\n\n## Syntax\n\n```js\nnew DataView(buffer)\nnew DataView(buffer, byteOffset)\nnew DataView(buffer, byteOffset, byteLength)\n```\n\n> **Note:** `DataView()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `buffer`\n  - : An existing `ArrayBuffer` to use as\n    the storage backing the new `DataView` object.\n- `byteOffset` _**optional**_\n  - : The offset, in bytes, to the first byte in the above buffer for the new view to\n    reference. If unspecified, the buffer view starts with the first byte.\n- `byteLength` _**optional**_\n  - : The number of elements in the byte array. If unspecified, the view's length will\n    match the buffer's length.\n\n### Return value\n\nA new `DataView` object representing the specified data buffer.\n\n### Exceptions\n\n- [`RangeError`](../RangeError/RangeError.mdx)\n\n  - : Thrown if the `byteOffset` or `byteLength` parameter values\n    result in the view extending past the end of the buffer.\n\n    For example, if the buffer is 16 bytes long, the `byteOffset` is 8, and\n    the `byteLength` is 10, this error is thrown because the resulting view\n    tries to extend 2 bytes past the total length of the buffer.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/DataView/prototype/buffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.buffer\n\nThe **`buffer`** accessor property represents the `ArrayBuffer` referenced by the `DataView` at construction time.\n\n## Description\n\nThe `buffer` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when the `DataView` is constructed and cannot be changed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/DataView/prototype/byteLength.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.byteLength\n\nThe **`byteLength`** accessor property represents the length (in bytes) of the dataview.\n\n## Description\n\nThe `byteLength` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when an `DataView` is constructed and cannot be changed. If the `DataView` is not specifying an offset or a `byteLength`, the `byteLength` of the referenced `ArrayBuffer` or `SharedArrayBuffer` will be returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/DataView/prototype/byteOffset.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.byteOffset\n\nThe **`byteOffset`** accessor property represents the offset (in bytes) of this view from the start of its `ArrayBuffer`.\n\n## Description\n\nThe `byteOffset` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when an `DataView` is constructed and cannot be changed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/DataView/prototype/getBigInt64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getBigInt64()\n\nThe **`getBigInt64()`** method gets a signed 64-bit integer\n(long long) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetBigInt64(byteOffset)\ngetBigInt64(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to read the data from.\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is read.\n\n### Return value\n\nA `BigInt`.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would read beyond the end\n    of the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/DataView/prototype/getBigUint64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getBigUint64()\n\nThe **`getBigUint64()`** method gets an unsigned 64-bit integer\n(unsigned long long) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetBigUint64(byteOffset)\ngetBigUint64(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to read the data from.\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is read.\n\n### Return value\n\nA `BigInt`.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would read beyond the end\n    of the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/DataView/prototype/getFloat32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getFloat32()\n\nThe **`getFloat32()`** method gets a signed 32-bit float\n(float) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetFloat32(byteOffset)\ngetFloat32(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 32-bit float number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/DataView/prototype/getFloat64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getFloat64()\n\nThe **`getFloat64()`** method gets a signed 64-bit float\n(double) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetFloat64(byteOffset)\ngetFloat64(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 64-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 64-bit float number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/DataView/prototype/getInt16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getInt16()\n\nThe **`getInt16()`** method gets a signed 16-bit integer\n(short) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetInt16(byteOffset)\ngetInt16(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 16-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/DataView/prototype/getInt32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getInt32()\n\nThe **`getInt32()`** method gets a signed 32-bit integer (long)\nat the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetInt32(byteOffset)\ngetInt32(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in bytes, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 32-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/DataView/prototype/getInt8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getInt8()\n\nThe **`getInt8()`** method gets a signed 8-bit integer (byte)\nat the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetInt8(byteOffset)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n\n### Return value\n\nA signed 8-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/DataView/prototype/getUint16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getUint16()\n\nThe **`getUint16()`** method gets an unsigned 16-bit integer\n(unsigned short) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n\n\n## Syntax\n\n```js\ngetUint16(byteOffset)\ngetUint16(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nAn unsigned 16-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/DataView/prototype/getUint32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getUint32()\n\nThe **`getUint32()`** method gets an unsigned 32-bit integer\n(unsigned long) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n\n\n## Syntax\n\n```js\ngetUint32(byteOffset)\ngetUint32(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nAn unsigned 32-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/DataView/prototype/getUint8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getUint8()\n\nThe **`getUint8()`** method gets an unsigned 8-bit integer\n(unsigned byte) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetUint8(byteOffset)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n\n### Return value\n\nAn unsigned 8-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/DataView/prototype/setBigInt64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setBigInt64()\n\nThe **`setBigInt64()`** method stores a signed 64-bit integer\n(long long) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetBigInt64(byteOffset, value)\nsetBigInt64(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to store the data from.\n- value\n  - : The value to set as a `BigInt`. The highest possible value that fits in\n    a signed 64-bit integer is\n    `2n ** (64n -1n) - 1n` (`9223372036854775807n`). Upon\n    overflow, it will be negative (`-9223372036854775808n`).\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/DataView/prototype/setBigUint64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setBigUint64()\n\nThe **`setBigUint64()`** method stores an unsigned 64-bit\ninteger (unsigned long long) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetBigUint64(byteOffset, value)\nsetBigUint64(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to store the data from.\n- value\n  - : The value to set as a `BigInt`. The highest possible value that fits in\n    an unsigned 64-bit integer is\n    `2n ** 64n - 1n`\n    (`18446744073709551615n`). Upon overflow, it will be zero\n    (`0n`).\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/DataView/prototype/setFloat32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setFloat32()\n\nThe **`setFloat32()`** method stores a signed 32-bit float\n(float) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetFloat32(byteOffset, value)\nsetFloat32(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/DataView/prototype/setFloat64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setFloat64()\n\nThe **`setFloat64()`** method stores a signed 64-bit float\n(double) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetFloat64(byteOffset, value)\nsetFloat64(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 64-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/DataView/prototype/setInt16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setInt16()\n\nThe **`setInt16()`** method stores a signed 16-bit integer\n(short) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetInt16(byteOffset, value)\nsetInt16(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/DataView/prototype/setInt32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setInt32()\n\nThe **`setInt32()`** method stores a signed 32-bit integer\n(long) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetInt32(byteOffset, value)\nsetInt32(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/DataView/prototype/setInt8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setInt8()\n\nThe **`setInt8()`** method stores a signed 8-bit integer (byte)\nvalue at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetInt8(byteOffset, value)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/DataView/prototype/setUint16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setUint16()\n\nThe **`setUint16()`** method stores an unsigned 16-bit integer\n(unsigned short) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetUint16(byteOffset, value)\nsetUint16(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/DataView/prototype/setUint32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setUint32()\n\nThe **`setUint32()`** method stores an unsigned 32-bit integer\n(unsigned long) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetUint32(byteOffset, value)\nsetUint32(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/DataView/prototype/setUint8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setUint8()\n\nThe **`setUint8()`** method stores an unsigned 8-bit integer\n(byte) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetUint8(byteOffset, value)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/Date.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date()\n\nThe **`Date()`** constructor can create a `Date` instance or return a string representing the current time.\n\n## Syntax\n\n```js\nnew Date()\nnew Date(value)\nnew Date(dateString)\nnew Date(dateObject)\n\nnew Date(year, monthIndex)\nnew Date(year, monthIndex, day)\nnew Date(year, monthIndex, day, hours)\nnew Date(year, monthIndex, day, hours, minutes)\nnew Date(year, monthIndex, day, hours, minutes, seconds)\nnew Date(year, monthIndex, day, hours, minutes, seconds, milliseconds)\n\nDate()\n```\n\n> **Note:** `Date()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\nThere are five basic forms for the `Date()` constructor:\n\n#### No parameters\n\nWhen no parameters are provided, the newly-created `Date` object represents the current date and time as of the time of instantiation.\n\n#### Time value or timestamp number\n\n- `value`\n  - : An integer value representing the number of milliseconds since January 1, 1970, 00:00:00 UTC (the ECMAScript epoch, equivalent to the UNIX epoch), with leap seconds ignored. Keep in mind that most [UNIX Timestamp](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_16) functions are only accurate to the nearest second.\n\n#### Date string\n\n- `dateString`\n\n  - : A string value representing a date, in a format recognized by the [`Date.parse()`](./parse.mdx) method. (The ECMA262 spec specifies a [simplified version of ISO 8601](https://tc39.es/ecma262/#sec-date-time-string-format), but other formats can be implementation-defined, which commonly include [IETF-compliant RFC 2822 timestamps](https://datatracker.ietf.org/doc/html/rfc2822#page-14).)\n\n    > **Note:** When parsing date strings with the `Date` constructor (and `Date.parse`, they are equivalent), always make sure that the input conforms to the ISO 8601 format (`YYYY-MM-DDTHH:mm:ss.sssZ`) — the parsing behavior with other formats is implementation-defined and may not work across all browsers. Support for [RFC 2822](https://datatracker.ietf.org/doc/html/rfc2822) format strings is by convention only. A library can help if many different formats are to be accommodated.\n    >\n    > Date-only strings (e.g. `\"1970-01-01\"`) are treated as UTC, while date-time strings (e.g. `\"1970-01-01T12:00\"`) are treated as local. You are therefore also advised to make sure the input format is consistent between the two types.\n\n#### Date object\n\n- `dateObject`\n  - : An existing `Date` object. This effectively makes a copy of the existing `Date` object with the same date and time. This is equivalent to `new Date(dateObject.valueOf())`, except the `valueOf()` method is not called.\n\nWhen one parameter is passed to the `Date()` constructor, `Date` instances are specially treated. All other values are [converted to primitives](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion). If the result is a string, it will be parsed as a date string. Otherwise, the resulting primitive is further coerced to a number and treated as a timestamp.\n\n#### Individual date and time component values\n\nGiven at least a year and month, this form of `Date()` returns a `Date` object whose component values (year, month, day, hour, minute, second, and millisecond) all come from the following parameters. Any missing fields are given the lowest possible value (`1` for `day` and `0` for every other component). The parameter values are all evaluated against the local time zone, rather than UTC.\n\nIf any parameter overflows its defined bounds, it \"carries over\". For example, if a `monthIndex` greater than `11` is passed in, those months will cause the year to increment; if a `minutes` greater than `59` is passed in, `hours` will increment accordingly, etc. Therefore, `new Date(1990, 12, 1)` will return January 1st, 1991; `new Date(2020, 5, 19, 25, 65)` will return 2:05 A.M. June 20th, 2020.\n\nSimilarly, if any parameter underflows, it \"borrows\" from the higher positions. For example, `new Date(2020, 5, 0)` will return May 31st, 2020.\n\n- `year`\n  - : Integer value representing the year. Values from `0` to `99` map to the years `1900` to `1999`. All other values are the actual year. See the [example](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years).\n- `monthIndex`\n  - : Integer value representing the month, beginning with `0` for January to `11` for December.\n- `day` _**optional**_\n  - : Integer value representing the day of the month. The default is `1`.\n- `hours` _**optional**_\n  - : Integer value between `0` and `23` representing the hour of the day. Defaults to `0`.\n- `minutes` _**optional**_\n  - : Integer value representing the minute segment of a time. The default is `0` minutes past the hour.\n- `seconds` _**optional**_\n  - : Integer value representing the second segment of a time. The default is `0` seconds past the minute.\n- `milliseconds` _**optional**_\n  - : Integer value representing the millisecond segment of a time. The default is `0` milliseconds past the second.\n\n### Return value\n\nCalling `new Date()` (the `Date()` constructor) returns a [`Date`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date) object. If called with an invalid date string, or if the date to be constructed will have a UNIX timestamp less than `-8,640,000,000,000,000` or greater than `8,640,000,000,000,000` milliseconds, it returns a `Date` object whose [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toString) method returns the literal string `Invalid Date`.\n\nCalling the `Date()` function (without the `new` keyword) returns a string representation of the current date and time, exactly as `new Date().toString()` does. Any arguments given in a `Date()` function call (without the `new` keyword) are ignored; regardless of whether it's called with an invalid date string — or even called with any arbitrary object or other primitive as an argument — it always returns a string representation of the current date and time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/UTC.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.UTC()\n\nThe **`Date.UTC()`** method accepts parameters similar to the\n`Date` constructor, but treats them as UTC. It returns the number of\nmilliseconds since January 1, 1970, 00:00:00 UTC.\n\n\n\n## Syntax\n\n```js\nDate.UTC(year)\nDate.UTC(year, monthIndex)\nDate.UTC(year, monthIndex, day)\nDate.UTC(year, monthIndex, day, hour)\nDate.UTC(year, monthIndex, day, hour, minute)\nDate.UTC(year, monthIndex, day, hour, minute, second)\nDate.UTC(year, monthIndex, day, hour, minute, second, millisecond)\n```\n\n- `year`\n\n  - : Integer value representing the year.\n\n    Values from `0` to `99` map to the years\n    `1900` to `1999`. All other values are the actual year.\n    See the [example](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years).\n\n- `monthIndex` _**optional**_\n  - : An integer between `0` (January) and `11` (December)\n    representing the month. Since ECMAScript 2017 it defaults to `0` if\n    omitted. _(Up until ECMAScript 2016, `monthIndex` was a required\n    parameter. As of ES2017, it no longer is.)_\n- `day` _**optional**_\n  - : An integer between `1` and `31` representing the day of the\n    month. If omitted, defaults to `1`.\n- `hour` _**optional**_\n  - : An integer between `0` and `23` representing the hours. If\n    omitted, defaults to `0`.\n- `minute` _**optional**_\n  - : An integer between `0` and `59` representing the minutes. If\n    omitted, defaults to `0`.\n- `second` _**optional**_\n  - : An integer between `0` and `59` representing the seconds. If\n    omitted, defaults to `0`.\n- `millisecond` _**optional**_\n  - : An integer between `0` and `999` representing the\n    milliseconds. If omitted, defaults to `0`.\n\n### Return value\n\nA number representing the number of milliseconds for the given date since January 1,\n1970, 00:00:00, UTC.\n\n## Description\n\n`UTC()` takes comma-delimited date and time parameters and returns the\nnumber of milliseconds between January 1, 1970, 00:00:00, universal time and the\nspecified date and time.\n\nYears between `0` and `99` are converted to a year in the\n20th century `(1900 + year)`. For example, `95` is\nconverted to the year `1995`.\n\nThe `UTC()` method differs from the `Date` constructor in two\nways:\n\n1. `Date.UTC()` uses universal time instead of the local time.\n2. `Date.UTC()` returns a time value as a number instead of creating a\n   `Date` object.\n\nIf a parameter is outside of the expected range, the `UTC()` method updates\nthe other parameters to accommodate the value. For example, if `15` is used\nfor `monthIndex`, the year will be incremented by 1\n`(year + 1)` and `3` will be used for the month.\n\n`UTC()` is a static method of `Date`, so it's called as\n`Date.UTC()` rather than as a method of a `Date` instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/now.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.now()\n\nThe static **`Date.now()`** method returns the number of milliseconds elapsed since the [epoch](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps), which is defined as the midnight at the beginning of January 1, 1970, UTC.\n\n## Syntax\n\n```js\nDate.now()\n```\n\n### Return value\n\nA number representing the number of milliseconds elapsed since the [epoch](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps), which is defined as the midnight at the beginning of January 1, 1970, UTC.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/parse.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.parse()\n\nThe **`Date.parse()`** method parses a string representation of\na date, and returns the number of milliseconds since January 1, 1970, 00:00:00 UTC or\n`NaN` if the string is unrecognized or, in some cases, contains illegal date\nvalues (e.g. 2015-02-31).\n\nOnly the [ISO 8601 format](https://tc39.es/ecma262/#sec-date-time-string-format) (`YYYY-MM-DDTHH:mm:ss.sssZ`) is explicitly specified to be supported. Other formats are implementation-defined and may not work across all browsers. A library can help if many different formats are to be accommodated.\n\n## Syntax\n\n```js\nDate.parse(dateString)\n```\n\n### Parameters\n\n- `dateString`\n  - : A string representing [a simplification of the ISO 8601 calendar date extended format](#date-time-string-format).\n    (Other formats may be used, but results are implementation-dependent.)\n\n### Return value\n\nA number representing the milliseconds elapsed since January 1, 1970, 00:00:00 UTC and\nthe date obtained by parsing the given string representation of a date. If the argument\ndoesn't represent a valid date, [`NaN`](../NaN.mdx) is returned.\n\n## Description\n\nThe `parse()` method takes a date string (such as\n`\"2011-10-10T14:48:00\"`) and returns the number of milliseconds since January\n1, 1970, 00:00:00 UTC.\n\nThis function is useful for setting date values based on string values, for example in\nconjunction with the [`setTime()`](./prototype/setTime.mdx) method and the\n`Date` object.\n\n### Date Time String Format\n\nThe standard string representation of a date time string is a simplification of the ISO\n8601 calendar date extended format.\n(See the section [Date Time String Format](https://tc39.es/ecma262/#sec-date-time-string-format)\nin the ECMAScript specification for more details.)\n\nFor example, `\"2011-10-10\"` (_date-only_ form),\n`\"2011-10-10T14:48:00\"` (_date-time_ form), or\n`\"2011-10-10T14:48:00.000+09:00\"` (_date-time_ form with milliseconds\nand time zone) can be passed and will be parsed. When the time zone offset is absent,\ndate-only forms are interpreted as a UTC time and date-time forms are interpreted as\nlocal time.\n\nWhile time zone specifiers are used during date string parsing to interpret the\nargument, the value returned is always the number of milliseconds between January 1,\n1970 00:00:00 UTC and the point in time represented by the argument or `NaN`.\n\nBecause `parse()` is a static method of `Date`, it is called as\n`Date.parse()` rather than as a method of a `Date` instance.\n\n### Fall-back to implementation-specific date formats\n\n> **Note:** This section contains implementation-specific behavior that can be inconsistent\n> across implementations.\n\nThe ECMAScript specification states: If the String does not conform to the standard\nformat the function may fall back to any implementation–specific heuristics or\nimplementation–specific parsing algorithm. Unrecognizable strings or dates containing\nillegal element values in ISO formatted strings shall cause `Date.parse()` to\nreturn [`NaN`](../NaN.mdx).\n\nHowever, invalid values in date strings not recognized as simplified ISO format as\ndefined by ECMA-262 may or may not result in [`NaN`](../NaN.mdx), depending on the browser\nand values provided, e.g.:\n\n```js\n// Non-ISO string with invalid date values\nnew Date(\"23/25/2014\");\n```\n\nwill be treated as a local date of 25 November, 2015 in Firefox 30 and an invalid date\nin Safari 7.\n\nHowever, if the string is recognized as an ISO format string and it contains invalid\nvalues, it will return [`NaN`](../NaN.mdx):\n\n```js\n// ISO string with invalid values\nnew Date(\"2014-25-23\").toISOString();\n// throws \"RangeError: invalid date\"\n```\n\nSpiderMonkey's implementation-specific heuristic can be found in [`jsdate.cpp`](https://searchfox.org/mozilla-central/source/js/src/jsdate.cpp?rev=64553c483cd1#889).\nThe string `\"10 06 2014\"` is an example of a non-conforming ISO format and\nthus falls back to a custom routine. See also this [rough outline](https://bugzilla.mozilla.org/show_bug.cgi?id=1023155#c6) on\nhow the parsing works.\n\n```js\nnew Date(\"10 06 2014\");\n```\n\nwill be treated as a local date of 6 October, 2014, and not 10 June, 2014.\n\nOther examples:\n\n```js\nnew Date(\"foo-bar 2014\").toString();\n// returns: \"Invalid Date\"\n\nDate.parse(\"foo-bar 2014\");\n// returns: NaN\n```\n\n### Differences in assumed time zone\n\n> **Note:** This section contains implementation-specific behavior that can be inconsistent\n> across implementations.\n\nGiven a non-standard date string of `\"March 7, 2014\"`, `parse()` assumes a local time zone, but given a simplification of the ISO 8601 calendar date extended format such as `\"2014-03-07\"`, it will assume a time zone of UTC. Therefore `Date` objects produced using those strings may represent different moments in time depending on the version of ECMAScript supported unless the system is set with a local time zone of UTC. This means that two date strings that appear equivalent may result in two different values depending on the format of the string that is being converted.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/@@toPrimitive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype\\[Symbol.toPrimitive]\n\nThe **`[Symbol.toPrimitive]()`** method converts a `Date`\nobject to a primitive value.\n\n## Syntax\n\n```js\nDate()[Symbol.toPrimitive](hint)\n```\n\n### Return value\n\nThe primitive value of the given `Date` object. Depending on the argument,\nthe method can return either a string or a number.\n\n## Description\n\nThe `[Symbol.toPrimitive]()` method of the `Date` object returns a\nprimitive value, that is either of type number or of type string.\n\nIf `hint` is `string` or `default`,\n`[Symbol.toPrimitive]()` tries to call the [`toString`](../../Object/prototype/toString.mdx) method. If the `toString` property does not exist, it tries to\ncall the [`valueOf`](../../Object/prototype/valueOf.mdx) method and if the\n`valueOf` does not exist either, `[Symbol.toPrimitive]()` throws a\n[`TypeError`](../../../globals/TypeError/TypeError.mdx).\n\nIf `hint` is `number`, `[Symbol.toPrimitive]()` first tries\nto call `valueOf`, and if that fails, it calls `toString`.\n\nJavaScript calls the `[Symbol.toPrimitive]()` method to convert an object to a\nprimitive value. You rarely need to invoke the `[Symbol.toPrimitive]()` method\nyourself; JavaScript automatically invokes it when encountering an object where a\nprimitive value is expected.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/getDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getDate()\n\nThe **`getDate()`** method returns the day of the month for the\nspecified date according to local time.\n\n## Syntax\n\n```js\ngetDate()\n```\n\n### Return value\n\nAn integer number, between 1 and 31, representing the day of the month for the given\ndate according to local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/getDay.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getDay()\n\nThe **`getDay()`** method returns the\nday of the week for the specified date according to local time, where 0 represents\nSunday. For the day of the month, see [`Date.prototype.getDate()`](./getDate.mdx).\n\n## Syntax\n\n```js\ngetDay()\n```\n\n### Return value\n\nAn integer number, between 0 and 6, corresponding to the day of the week for the given\ndate, according to local time: 0 for Sunday, 1 for Monday, 2 for Tuesday, and so on.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/getFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getFullYear()\n\nThe **`getFullYear()`** method returns the year of the\nspecified date according to local time.\n\nUse this method instead of the [`Date.prototype.getYear()`](./getYear.mdx) method.\n\n## Syntax\n\n```js\ngetFullYear()\n```\n\n### Return value\n\nA number corresponding to the year of the given date, according to local time.\n\n## Description\n\nThe value returned by `getFullYear()` is an absolute number. For dates\nbetween the years 1000 and 9999, `getFullYear()` returns a four-digit number,\nfor example, 1995. Use this function to make sure a year is compliant with years after\n2000\\.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/getHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getHours()\n\nThe **`getHours()`** method returns the hour for the specified\ndate, according to local time.\n\n## Syntax\n\n```js\ngetHours()\n```\n\n### Return value\n\nAn integer number, between 0 and 23, representing the hour for the given date according\nto local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/getMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getMilliseconds()\n\nThe **`getMilliseconds()`** method returns the milliseconds in\nthe specified date according to local time.\n\n## Syntax\n\n```js\ngetMilliseconds()\n```\n\n### Return value\n\nA number, between 0 and 999, representing the milliseconds for the given date according\nto local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/getMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getMinutes()\n\nThe **`getMinutes()`** method returns the minutes in the\nspecified date according to local time.\n\n## Syntax\n\n```js\ngetMinutes()\n```\n\n### Return value\n\nAn integer number, between 0 and 59, representing the minutes in the given date\naccording to local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/getMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getMonth()\n\nThe **`getMonth()`** method returns the month in the specified\ndate according to local time, as a zero-based value (where zero indicates the first\nmonth of the year).\n\n## Syntax\n\n```js\ngetMonth()\n```\n\n### Return value\n\nAn integer number, between 0 and 11, representing the month in the given date according\nto local time. 0 corresponds to January, 1 to February, and so on.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/getSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getSeconds()\n\nThe **`getSeconds()`** method returns the seconds in the\nspecified date according to local time.\n\n## Syntax\n\n```js\ngetSeconds()\n```\n\n### Return value\n\nAn integer number, between 0 and 59, representing the seconds in the given date\naccording to local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/getTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getTime()\n\nThe **`getTime()`** method returns the number of milliseconds since the [epoch](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps), which is defined as the midnight at the beginning of January 1, 1970, UTC.\n\nYou can use this method to help assign a date and time to another `Date`\nobject. This method is functionally equivalent to the [`Date.prototype.valueOf()`](./valueOf.mdx) method.\n\n## Syntax\n\n```js\ngetTime()\n```\n\n### Return value\n\nA number representing the milliseconds elapsed between 1 January 1970 00:00:00 UTC and\nthe given date.\n\n## Description\n\nTo offer protection against timing attacks and fingerprinting, the precision of\n`new Date().getTime()` might get rounded depending on browser settings.\n\n```js\n// reduced time precision (2ms) in Firefox 60\nnew Date().getTime();\n// 1519211809934\n// 1519211810362\n// 1519211811670\n// …\n\n// reduced time precision with `privacy.resistFingerprinting` enabled\nnew Date().getTime();\n// 1519129853500\n// 1519129858900\n// 1519129864400\n// …\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/getTimezoneOffset.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getTimezoneOffset()\n\nThe **`getTimezoneOffset()`** method returns the difference, in minutes, between a date as evaluated in the UTC time zone, and the same date as evaluated in the local time zone.\n\n## Syntax\n\n```js\ngetTimezoneOffset()\n```\n\n### Return value\n\nThe difference, in minutes, between the date as evaluated in the UTC time zone and as evaluated in the local time zone. The actual local time algorithm is implementation-defined, and the return value is allowed to be zero in runtimes without appropriate data.\n\n## Description\n\n`date.getTimezoneOffset()` returns the difference, in minutes, between `date` as evaluated in the UTC time zone and as evaluated in the local time zone — that is, the time zone of the host system in which the browser is being used (if the code is run from the Web in a browser), or otherwise the host system of whatever JavaScript runtime (for example, a Node.js environment) the code is executed in.\n\n### Negative values and positive values\n\nThe number of minutes returned by `getTimezoneOffset()` is positive if the local time zone is behind UTC, and negative if the local time zone is ahead of UTC. For example, for UTC+10, `-600` will be returned.\n\n| Current time zone | Return value |\n| ----------------- | ------------ |\n| UTC-8             | 480          |\n| UTC               | 0            |\n| UTC+3             | -180         |\n\n### Varied results in Daylight Saving Time (DST) regions\n\nIn a region that annually shifts in and out of Daylight Saving Time (DST), as `date` varies, the number of minutes returned by calling `getTimezoneOffset()` can be non-uniform.\n\n> **Note:** `getTimezoneOffset()`'s behavior will never differ based on the time when the code is run — its behavior is always consistent when running in the same region. Only the value of `date` affects the result.\n\nIn most implementations, the [IANA time zone database](https://en.wikipedia.org/wiki/Daylight_saving_time#IANA_time_zone_database) (tzdata) is used to precisely determine the offset of the local timezone at the moment of the `date`. However, if such information is unavailable, an implementation may return zero.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/getUTCDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCDate()\n\nThe **`getUTCDate()`** method returns the day of the month (from\n1 to 31) in the specified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCDate()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer number ranging from 1 to 31\nrepresenting day of month for the given date, according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/getUTCDay.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCDay()\n\nThe **`getUTCDay()`** method returns the day of the week in the\nspecified date according to universal time, where 0 represents Sunday.\n\n## Syntax\n\n```js\ngetUTCDay()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer number corresponding to the day\nof the week for the given date, according to universal time: 0 for Sunday, 1 for Monday,\n2 for Tuesday, and so on.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/getUTCFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCFullYear()\n\nThe **`getUTCFullYear()`** method returns the year in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCFullYear()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer representing the year in the given date\naccording to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n\n## Description\n\nThe value returned by `getUTCFullYear()` is an absolute number that is\ncompliant with year-2000, for example, 1995.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/getUTCHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCHours()\n\nThe **`getUTCHours()`** method returns the hours in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCHours()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 23, representing the hours in the given date according\nto Coordinated Universal Time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/getUTCMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCMilliseconds()\n\nThe **`getUTCMilliseconds()`** method returns the milliseconds\nportion of the time object's value according to universal time.\n\n## Syntax\n\n```js\ngetUTCMilliseconds()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 999, representing\nthe milliseconds portion of the given `Date` object according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n\nNot to be confused with Unix epoch time. To get the total milliseconds since 1970/01/01,\nuse the [`getTime()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/getTime) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/getUTCMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCMinutes()\n\nThe **`getUTCMinutes()`** method returns the minutes in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCMinutes()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 59,\nrepresenting the minutes in the given date according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/getUTCMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCMonth()\n\nThe **`getUTCMonth()`** returns the month of the specified date\naccording to universal time, as a zero-based value (where zero indicates the first month\nof the year).\n\n## Syntax\n\n```js\ngetUTCMonth()\n```\n\n### Return value\n\nA number. If the `Date` object represents a valid date, an integer number, between 0 and 11,\ncorresponding to the month of the given date according to universal time. 0 for January,\n1 for February, 2 for March, and so on. Otherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/getUTCSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCSeconds()\n\nThe **`getUTCSeconds()`** method returns the seconds in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCSeconds()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 59, representing\nthe seconds in the given date according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/getYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getYear()\n\nThe **`getYear()`** method returns the year in the specified\ndate according to local time. Because `getYear()` does not return full years\n(\"year 2000 problem\"), it is no longer used and has been replaced by the\n[`Date.prototype.getFullYear()`](./getFullYear.mdx) method.\n\n## Syntax\n\n```js\ngetYear()\n```\n\n### Return value\n\nA number representing the year of the given date, according to local time, minus 1900.\n\n## Description\n\n- For years greater than or equal to 2000, the value returned by\n  `getYear()` is 100 or greater. For example, if the year is 2026,\n  `getYear()` returns 126.\n- For years between and including 1900 and 1999, the value returned by\n  `getYear()` is between 0 and 99. For example, if the year is 1976,\n  `getYear()` returns 76.\n- For years less than 1900, the value returned by `getYear()` is less than 0. For example, if the year is 1800, `getYear()` returns -100.\n\nTo take into account years before and after 2000, you should use\n[`Date.prototype.getFullYear()`](./getFullYear.mdx) instead of\n`getYear()` so that the year is specified in full.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/setDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setDate()\n\nThe **`setDate()`** method changes the day of the month of a given `Date` instance, based on local time.\n\nTo instead change the day of the month for a given `Date` instance based on UTC time, use the [`Date.prototype.setUTCDate()`](./setUTCDate.mdx) method.\n\n## Syntax\n\n```js\nsetDate(dayValue)\n```\n\n### Parameters\n\n- `dayValue`\n  - : An integer representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the given date (the\n`Date` object is also changed in place).\n\n## Description\n\nIf the `dayValue` is outside of the range of date values for the month, `setDate()` will update the `Date` object accordingly.\n\nFor example, if 0 is provided for `dayValue`, the date will be set to the last day of the previous month. If you use 40 for `dayValue`, and the month stored in the `Date` object is June, the day will be changed to 10 and the month will be incremented to July.\n\nIf a negative number is provided for `dayValue`, the date will be set counting backwards from the last day of the previous month. -1 would result in the date being set to 1 day before the last day of the previous month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/setFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setFullYear()\n\nThe **`setFullYear()`** method sets the full year for a\nspecified date according to local time. Returns new timestamp.\n\n## Syntax\n\n```js\nsetFullYear(yearValue)\nsetFullYear(yearValue, monthValue)\nsetFullYear(yearValue, monthValue, dateValue)\n```\n\n### Parameters\n\n- `yearValue`\n  - : An integer specifying the numeric value of the year, for example, 1995.\n- `monthValue`\n  - : Optional. An integer between 0 and 11 representing the months January through\n    December.\n- `dateValue`\n  - : Optional. An integer between 1 and 31 representing the day of the month. If you\n    specify the `dateValue` parameter, you must also specify the\n    `monthValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `monthValue` and\n`dateValue` parameters, the values returned from the\n[`Date.prototype.getMonth()`](./getMonth.mdx) and\n[`Date.prototype.getDate()`](./getDate.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range, `setFullYear()`\nattempts to update the other parameters and the date information in the\n`Date` object accordingly. For example, if you specify 15 for\n`monthValue`, the year is incremented by 1\n(`yearValue + 1`), and 3 is used for the month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/setHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setHours()\n\nThe **`setHours()`** method sets the hours for a specified date\naccording to local time, and returns the number of milliseconds since January 1, 1970\n00:00:00 UTC until the time represented by the updated `Date` instance.\n\n## Syntax\n\n```js\nsetHours(hoursValue)\nsetHours(hoursValue, minutesValue)\nsetHours(hoursValue, minutesValue, secondsValue)\nsetHours(hoursValue, minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `hoursValue`\n  - : Ideally, an integer between 0 and 23, representing the hour. If a value greater than\n    23 is provided, the datetime will be incremented by the extra hours.\n- `minutesValue`\n  - : Optional. Ideally, an integer between 0 and 59, representing the minutes. If a value\n    greater than 59 is provided, the datetime will be incremented by the extra minutes.\n- `secondsValue`\n  - : Optional. Ideally, an integer between 0 and 59, representing the seconds. If a value\n    greater than 59 is provided, the datetime will be incremented by the extra seconds. If\n    you specify the `secondsValue` parameter, you must also specify\n    the `minutesValue`.\n- `msValue`\n  - : Optional. Ideally, a number between 0 and 999, representing the milliseconds. If a\n    value greater than 999 is provided, the datetime will be incremented by the extra\n    milliseconds. If you specify the `msValue` parameter, you must\n    also specify the `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between January 1, 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `minutesValue`,\n`secondsValue`, and `msValue` parameters,\nthe values returned from the [`Date.prototype.getMinutes()`](./getMinutes.mdx),\n[`Date.prototype.getSeconds()`](./getSeconds.mdx), and\n[`Date.prototype.getMilliseconds()`](./getMilliseconds.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range, `setHours()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes will\nbe incremented by 1 (`minutesValue + 1`), and 40 will be used for\nseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/setMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setMilliseconds()\n\nThe **`setMilliseconds()`** method sets the milliseconds for a\nspecified date according to local time.\n\n## Syntax\n\n```js\nsetMilliseconds(millisecondsValue)\n```\n\n### Parameters\n\n- `millisecondsValue`\n  - : A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you specify a number outside the expected range, the date information in the\n`Date` object is updated accordingly. For example, if you specify 1005, the\nnumber of seconds is incremented by 1, and 5 is used for the milliseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/setMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setMinutes()\n\nThe **`setMinutes()`** method sets the minutes for a specified\ndate according to local time.\n\n## Syntax\n\n```js\nsetMinutes(minutesValue)\nsetMinutes(minutesValue, secondsValue)\nsetMinutes(minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `minutesValue`\n  - : An integer between 0 and 59, representing the minutes.\n- `secondsValue`\n  - : Optional. An integer between 0 and 59, representing the seconds. If you specify the\n    `secondsValue` parameter, you must also specify the\n    `minutesValue`.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds. If you specify\n    the `msValue` parameter, you must also specify the\n    `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `secondsValue` and\n`msValue` parameters, the values returned from\n[`Date.prototype.getSeconds()`](./getSeconds.mdx) and\n[`Date.prototype.getMilliseconds()`](./getMilliseconds.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range, `setMinutes()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes will\nbe incremented by 1 (`minutesValue + 1`), and 40 will be used for\nseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/setMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setMonth()\n\nThe **`setMonth()`** method sets the month for a specified date according to the currently set year.\n\n## Syntax\n\n```js\nsetMonth(monthValue)\nsetMonth(monthValue, dayValue)\n```\n\n### Parameters\n\n- `monthValue`\n  - : A zero-based integer representing the month of the year offset from the start of the\n    year. So, 0 represents January, 11 represents December, -1 represents December of the\n    previous year, and 12 represents January of the following year.\n- `dayValue`\n  - : Optional. An integer from 1 to 31, representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `dayValue` parameter, the value\nreturned from the [`Date.prototype.getDate()`](./getDate.mdx) method is used.\n\nIf a parameter you specify is outside of the expected range, `setMonth()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 15 for `monthValue`, the year will be\nincremented by 1, and 3 will be used for month.\n\nThe current day of month will have an impact on the behavior of this method.\nConceptually it will add the number of days given by the current day of the month to the\n1st day of the new month specified as the parameter, to return the new date.\nFor example, if the current value is 31st January 2016, calling setMonth with a value of 1 will return 2nd March 2016.\nThis is because in 2016 February had 29 days.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/setSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setSeconds()\n\nThe **`setSeconds()`** method sets the seconds for a specified\ndate according to local time.\n\n## Syntax\n\n```js\nsetSeconds(secondsValue)\nsetSeconds(secondsValue, msValue)\n```\n\n### Parameters\n\n- `secondsValue`\n  - : An integer between 0 and 59, representing the seconds.\n- `msValue` _**optional**_\n  - : Optional. A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `msValue` parameter, the value returned\nfrom the [`Date.prototype.getMilliseconds()`](./getMilliseconds.mdx) method is\nused.\n\nIf a parameter you specify is outside of the expected range, `setSeconds()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes stored\nin the `Date` object will be incremented by 1, and 40 will be used for\nseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/setTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setTime()\n\nThe **`setTime()`** method sets the `Date` object\nto the time represented by a number of milliseconds since January 1, 1970, 00:00:00 UTC.\n\n## Syntax\n\n```js\nsetTime(timeValue)\n```\n\n### Parameters\n\n- `timeValue`\n  - : An integer representing the number of milliseconds since 1 January 1970, 00:00:00\n    UTC.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date\n(effectively, the value of the argument).\n\n## Description\n\nUse the `setTime()` method to help assign a date and time to another\n`Date` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/setUTCDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCDate()\n\nThe **`setUTCDate()`** method changes the day of the month of a given `Date` instance, based on UTC time.\n\nTo instead change the day of the month for a given `Date` instance based on local time, use the [`Date.prototype.setDate()`](././setDate.mdx) method.\n\n## Syntax\n\n```js\nsetUTCDate(dayValue)\n```\n\n### Parameters\n\n- `dayValue`\n  - : An integer from 1 to 31, representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf the `dayValue` is outside of the range of date values for the month, `setDate()` will update the `Date` object accordingly.\n\nFor example, if 0 is provided for `dayValue`, the date will be set to the last day of the previous month. If you use 40 for `dayValue`, and the month stored in the `Date` object is June, the day will be changed to 10 and the month will be incremented to July.\n\nIf a negative number is provided for `dayValue`, the date will be set counting backwards from the last day of the previous month. -1 would result in the date being set to 1 day before the last day of the previous month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/setUTCFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCFullYear()\n\nThe **`setUTCFullYear()`** method sets the full year for a\nspecified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCFullYear(yearValue)\nsetUTCFullYear(yearValue, monthValue)\nsetUTCFullYear(yearValue, monthValue, dayValue)\n```\n\n### Parameters\n\n- `yearValue`\n  - : An integer specifying the numeric value of the year, for example, 1995.\n- `monthValue`\n  - : Optional. An integer between 0 and 11 representing the months January through\n    December.\n- `dayValue`\n  - : Optional. An integer between 1 and 31 representing the day of the month. If you\n    specify the `dayValue` parameter, you must also specify the\n    `monthValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `monthValue` and\n`dayValue` parameters, the values returned from the\n[`Date.prototype.getUTCMonth()`](./getUTCMonth.mdx) and\n[`Date.prototype.getUTCDate()`](./getUTCDate.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range,\n`setUTCFullYear()` attempts to update the other parameters and the date\ninformation in the `Date` object accordingly. For example, if you specify 15\nfor `monthValue`, the year is incremented by 1\n(`yearValue + 1`), and 3 is used for the month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/setUTCHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCHours()\n\nThe **`setUTCHours()`** method sets the hour for a specified\ndate according to universal time, and returns the number of milliseconds since January\n1, 1970 00:00:00 UTC until the time represented by the updated `Date`\ninstance.\n\n## Syntax\n\n```js\nsetUTCHours(hoursValue)\nsetUTCHours(hoursValue, minutesValue)\nsetUTCHours(hoursValue, minutesValue, secondsValue)\nsetUTCHours(hoursValue, minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `hoursValue`\n  - : An integer between 0 and 23, representing the hour.\n- `minutesValue`\n  - : Optional. An integer between 0 and 59, representing the minutes.\n- `secondsValue`\n  - : Optional. An integer between 0 and 59, representing the seconds. If you specify the\n    `secondsValue` parameter, you must also specify the\n    `minutesValue`.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds. If you specify\n    the `msValue` parameter, you must also specify the\n    `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between January 1, 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `minutesValue`,\n`secondsValue`, and `msValue` parameters,\nthe values returned from the [`Date.prototype.getUTCMinutes()`](./getUTCMinutes.mdx), [`Date.prototype.getUTCSeconds()`](./getUTCSeconds.mdx),\nand [`Date.prototype.getUTCMilliseconds()`](./getUTCMilliseconds.mdx) methods\nare used.\n\nIf a parameter you specify is outside of the expected range, `setUTCHours()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes will\nbe incremented by 1 (`minutesValue + 1`), and 40 will be used for seconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/setUTCMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCMilliseconds()\n\nThe **`setUTCMilliseconds()`** method sets the milliseconds for\na specified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCMilliseconds(millisecondsValue)\n```\n\n### Parameters\n\n- `millisecondsValue`\n  - : A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf a parameter you specify is outside of the expected range,\n`setUTCMilliseconds()` attempts to update the date information in the\n`Date` object accordingly. For example, if you use 1100 for\n`millisecondsValue`, the seconds stored in the `Date`\nobject will be incremented by 1, and 100 will be used for milliseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/setUTCMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCMinutes()\n\nThe **`setUTCMinutes()`** method sets the minutes for a\nspecified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCMinutes(minutesValue)\nsetUTCMinutes(minutesValue, secondsValue)\nsetUTCMinutes(minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `minutesValue`\n  - : An integer between 0 and 59, representing the minutes.\n- `secondsValue`\n  - : Optional. An integer between 0 and 59, representing the seconds. If you specify the\n    `secondsValue` parameter, you must also specify the\n    `minutesValue`.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds. If you specify\n    the `msValue` parameter, you must also specify the\n    `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `secondsValue` and\n`msValue` parameters, the values returned from\n[`Date.prototype.getUTCSeconds()`](./getUTCSeconds.mdx) and\n[`Date.prototype.getUTCMilliseconds()`](./getUTCMilliseconds.mdx) methods are\nused.\n\nIf a parameter you specify is outside of the expected range,\n`setUTCMinutes()` attempts to update the date information in the\n`Date` object accordingly. For example, if you use 100 for\n`secondsValue`, the minutes will be incremented by 1\n(`minutesValue + 1`), and 40 will be used for seconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/setUTCMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCMonth()\n\nThe **`setUTCMonth()`** method sets the month for a specified\ndate according to universal time.\n\n## Syntax\n\n```js\nsetUTCMonth(monthValue)\nsetUTCMonth(monthValue, dayValue)\n```\n\n### Parameters\n\n- `monthValue`\n  - : An integer between 0 and 11, representing the months January through December.\n- `dayValue`\n  - : Optional. An integer from 1 to 31, representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `dayValue` parameter, the value returned from the\n[`Date.prototype.getUTCDate()`](./getUTCDate.mdx) method is used.\n\nIf a parameter you specify is outside of the expected range, `setUTCMonth()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 15 for `monthValue`, the year will be incremented by\n1, and 3 will be used for month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/setUTCSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCSeconds()\n\nThe **`setUTCSeconds()`** method sets the seconds for a\nspecified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCSeconds(secondsValue)\nsetUTCSeconds(secondsValue, msValue)\n```\n\n### Parameters\n\n- `secondsValue`\n  - : An integer between 0 and 59, representing the seconds.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `msValue` parameter, the value returned from the\n[`Date.prototype.getUTCMilliseconds()`](./getUTCMilliseconds.mdx) method is\nused.\n\nIf a parameter you specify is outside of the expected range,\n`setUTCSeconds()` attempts to update the date information in the\n`Date` object accordingly. For example, if you use 100 for\n`secondsValue`, the minutes stored in the `Date` object will be\nincremented by 1, and 40 will be used for seconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/setYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setYear()\n\nThe legacy **`setYear()`** method sets the year for a specified date according to local time.\n\nHowever, the way the legacy `setYear()` method sets year values is different from how the preferred [`Date.prototype.setFullYear()`](./setFullYear.mdx) method sets year values — and in some cases, also different from how `new Date()` and [`Date.parse()`](../parse.mdx) set year values. Specifically, given two-digit numbers, such as `22` and `61`:\n\n- `setYear()` interprets any two-digit number as an offset to `1900`; so `date.setYear(22)` results in the year value being set to `1922`, and `date.setYear(61)` results in the year value being set to `1961`. (In contrast, while `new Date(61, 1)` also results in the year value being set to `1961`, `new Date(\"2/1/22\")` results in the year value being set to `2022`; and similarly for [`Date.parse()`](../parse.mdx)).\n\n- [`Date.prototype.setFullYear()`](./setFullYear.mdx) does no special interpretation but instead uses the literal two-digit value as-is to set the year; so `date.setFullYear(61)` results in the year value being set to `0061`, and `date.setFullYear(22)` results in the year value being set to `0022`.\n\nBecause of those differences in behavior, you should no longer use the legacy `setYear()` method, but should instead use the preferred [`Date.prototype.setFullYear()`](./setFullYear.mdx) method.\n\n## Syntax\n\n```js\nsetYear(yearValue)\n```\n\n### Parameters\n\n- `yearValue`\n  - : An integer.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf `yearValue` is a number between 0 and 99 (inclusive), then the year for\n`dateObj` is set to `1900 + yearValue`. Otherwise, the year for\n`dateObj` is set to `yearValue`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/toDateString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toDateString()\n\nThe **`toDateString()`** method returns the date portion of a `Date` object interpreted in the local timezone in English.\n\n## Syntax\n\n```js\ntoDateString()\n```\n\n### Return value\n\nA string representing the date portion of the given `Date` object in human readable form in English.\n\n## Description\n\n`Date` instances refer to a specific point in time. `toDateString()` interprets the date in the local timezone and formats the _date_ part in English. It always uses the following format, separated by spaces:\n\n1. First three letters of the week day name\n2. First three letters of the month name\n3. Two-digit day of the month, padded on the left a zero if necessary\n4. Four-digit year (at least), padded on the left with zeros if necessary. May have a negative sign\n\nFor example: \"Thu Jan 01 1970\".\n\n- If you want to get the _time_ part, use [`toTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString).\n- If you want to get both the date and time, use [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toString).\n- If you want to make the date interpreted as UTC instead of local timezone, use [`toUTCString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString).\n- If you want to format the date in a more user-friendly format (e.g. localization), use [`toLocaleDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/toISOString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toISOString()\n\nThe **`toISOString()`** method returns a string in _simplified_ extended ISO format ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)), which is always 24 or 27 characters long (`YYYY-MM-DDTHH:mm:ss.sssZ` or `±YYYYYY-MM-DDTHH:mm:ss.sssZ`, respectively). The timezone is always zero UTC offset, as denoted by the suffix `Z`.\n\n## Syntax\n\n```js\ntoISOString()\n```\n\n### Return value\n\nA string representing the given date in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format according to universal time. It's the same format as the one required to be recognized by [`Date.parse()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/parse#date-time-string-format).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/toJSON.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toJSON()\n\nThe **`toJSON()`** method returns a string representation of\nthe `Date` object.\n\n## Syntax\n\n```js\ntoJSON()\n```\n\n### Return value\n\nA string representation of the given date.\n\n## Description\n\n`Date` instances refer to a specific point in time. `toJSON()` calls the object's [`Date.prototype.toISOString()`](./toISOString.mdx) method, which returns a string representing the `Date` object's value. This method is generally intended to, by default, usefully serialize `Date` objects during [JSON](https://developer.mozilla.org/docs/Glossary/JSON) serialization, which can then be deserialized using the [`Date()` constructor](../Date.mdx) or [`Date.parse()`](../parse.mdx) as the reviver of [`JSON.parse()`](../../JSON/parse.mdx).\n\nThe method first attempts to convert its `this` value [to a primitive](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion) by calling its [`[Symbol.toPrimitive]()`](../../Symbol/toPrimitive.mdx) (with `\"number\"` as hint), [`valueOf()`](../../Object/prototype/valueOf.mdx), and [`toString()`](../../Object/prototype/toString.mdx) methods, in that order. If the result is a [non-finite](../../Number/isFinite.mdx) number, `null` is returned. (This generally corresponds to an invalid date, whose [`valueOf()`](./valueOf.mdx) returns [`NaN`](../../NaN.mdx).) Otherwise, if the converted primitive is not a number or is a finite number, the return value of `this.toISOString()` is returned.\n\nNote that the method does not check whether the `this` value is a valid `Date` object. However, calling `Date.prototype.toJSON()` on non-`Date` objects does not have well-defined semantics.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/toLocaleDateString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toLocaleDateString()\n\nThe **`toLocaleDateString()`** method returns a string with a language-sensitive representation of the date portion of the specified date in the user agent's timezone. In implementations with [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) support, this method simply calls `Intl.DateTimeFormat`.\n\n## Syntax\n\n```js\ntoLocaleDateString()\ntoLocaleDateString(locales)\ntoLocaleDateString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat), these parameters correspond exactly to the [`Intl.DateTimeFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) constructor's parameters. Implementations without `Intl.DateTimeFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales) parameter of the `Intl.DateTimeFormat()` constructor.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options) parameter of the `Intl.DateTimeFormat()` constructor. The `timeStyle` option must be undefined, or a [`TypeError`](../../../globals/TypeError/TypeError.mdx) would be thrown. If `weekday`, `year`, `month`, and `day` are all undefined, then `year`, `month`, and `day` will be set to `\"numeric\"`.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored.\n\nSee the [`Intl.DateTimeFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string representing the date portion of the given `Date` instance according to language-specific conventions.\n\nIn implementations with `Intl.DateTimeFormat`, this is equivalent to `new Intl.DateTimeFormat(locales, options).format(date)`, where `options` has been normalized as described above.\n\n## Performance\n\nWhen formatting large numbers of dates, it is better to create an [`Intl.DateTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) object and use its [`format()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/format) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string with a language-sensitive representation of this date. In implementations with [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) support, this method simply calls `Intl.DateTimeFormat`.\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat), these parameters correspond exactly to the [`Intl.DateTimeFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) constructor's parameters. Implementations without `Intl.DateTimeFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales) parameter of the `Intl.DateTimeFormat()` constructor.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options) parameter of the `Intl.DateTimeFormat()` constructor. If `weekday`, `year`, `month`, `day`, `dayPeriod`, `hour`, `minute`, `second`, and `fractionalSecondDigits` are all undefined, then `year`, `month`, `day`, `hour`, `minute`, `second` will be set to `\"numeric\"`.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored.\n\nSee the [`Intl.DateTimeFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string representing the given date according to language-specific conventions.\n\nIn implementations with `Intl.DateTimeFormat`, this is equivalent to `new Intl.DateTimeFormat(locales, options).format(date)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/toLocaleTimeString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toLocaleTimeString()\n\nThe **`toLocaleTimeString()`** method returns a string with a language-sensitive representation of the time portion of the date. In implementations with [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) support, this method simply calls `Intl.DateTimeFormat`.\n\n## Syntax\n\n```js\ntoLocaleTimeString()\ntoLocaleTimeString(locales)\ntoLocaleTimeString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat), these parameters correspond exactly to the [`Intl.DateTimeFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) constructor's parameters. Implementations without `Intl.DateTimeFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales) parameter of the `Intl.DateTimeFormat()` constructor.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options) parameter of the `Intl.DateTimeFormat()` constructor. If `dayPeriod`, `hour`, `minute`, `second`, and `fractionalSecondDigits` are all undefined, then `hour`, `minute`, `second` will be set to `\"numeric\"`.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored.\n\nSee the [`Intl.DateTimeFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string representing the time portion of the given `Date` instance according to language-specific conventions.\n\nIn implementations with `Intl.DateTimeFormat`, this is equivalent to `new Intl.DateTimeFormat(locales, options).format(date)`, where `options` has been normalized as described above.\n\n## Performance\n\nWhen formatting large numbers of dates, it is better to create an [`Intl.DateTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) object and use its [`format()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/format) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified `Date` object interpreted in the local timezone.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the given date.\n\n## Description\n\nThe `Date` object overrides the `toString()` method of `Object`. `Date.prototype.toString()` returns a string representation of the Date as interpreted in the local timezone, containing both the date and the time — it joins the string representation specified in [`toDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString) and [`toTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString) together, adding a space in between.\n\nFor example: \"Thu Jan 01 1970 04:42:04 GMT+0000 (Coordinated Universal Time)\"\n\nThe `toString()` method is automatically called when a date is coerced to a string, such as `const today = 'Today is ' + new Date()`.\n\n`Date.prototype.toString()` must be called on `Date` instances. If the `this` value does not inherit from `Date.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n- If you only want to get the _date_ part, use [`toDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString).\n- If you only want to get the _time_ part, use [`toTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString).\n- If you want to make the date interpreted as UTC instead of local timezone, use [`toUTCString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString).\n- If you want to format the date in a more user-friendly format (e.g. localization), use [`toLocaleString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/toTimeString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toTimeString()\n\nThe **`toTimeString()`** method returns the time portion of a `Date` object interpreted in the local timezone in English.\n\n## Syntax\n\n```js\ntoTimeString()\n```\n\n### Return value\n\nA string representing the time portion of the given date in human readable form in English.\n\n## Description\n\n`Date` instances refer to a specific point in time. `toTimeString()` interprets the date in the local timezone and formats the _time_ part in English. It always uses the format of `hh:mm:ss GMT±xxxx (TZ)`, where:\n\n| Format String | Description                                                                                           |\n| ------------- | ----------------------------------------------------------------------------------------------------- |\n| `hh`          | Hour, as two digits with leading zero if required                                                     |\n| `mm`          | Minute, as two digits with leading zero if required                                                   |\n| `ss`          | Seconds, as two digits with leading zero if required                                                  |\n| `±xxxx`       | The local timezone's offset — two digits for hours and two digits for minutes (e.g. `-0500`, `+0800`) |\n| `TZ`          | The timezone's name (e.g. `PDT`, `PST`)                                                               |\n\nFor example: \"04:42:04 GMT+0000 (Coordinated Universal Time)\".\n\n- If you want to get the _date_ part, use [`toDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString).\n- If you want to get both the date and time, use [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toString).\n- If you want to make the date interpreted as UTC instead of local timezone, use [`toUTCString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString).\n- If you want to format the date in a more user-friendly format (e.g. localization), use [`toLocaleTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleTimeString).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/toUTCString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toUTCString()\n\nThe **`toUTCString()`** method converts a date to a string, interpreting it in the UTC time zone. `toGMTString()` is an alias of this method.\n\nBased on [rfc7231](https://datatracker.ietf.org/doc/html/rfc7231#section-7.1.1.1) and modified according to [ECMA-262 toUTCString](https://tc39.es/ecma262/#sec-date.prototype.toutcstring), it can have negative values.\n\n## Syntax\n\n```js\ntoUTCString()\n```\n\n### Return value\n\nA string representing the given date using the UTC time zone.\n\n## Description\n\nThe value returned by `toUTCString()` is a string in the form `Www, dd Mmm yyyy hh:mm:ss GMT`, where:\n\n| Format String | Description                                                  |\n| ------------- | ------------------------------------------------------------ |\n| `Www`         | Day of week, as three letters (e.g. `Sun`, `Mon`)            |\n| `dd`          | Day of month, as two digits with leading zero if required    |\n| `Mmm`         | Month, as three letters (e.g. `Jan`, `Feb`)                  |\n| `yyyy`        | Year, as four or more digits with leading zeroes if required |\n| `hh`          | Hour, as two digits with leading zero if required            |\n| `mm`          | Minute, as two digits with leading zero if required          |\n| `ss`          | Seconds, as two digits with leading zero if required         |\n\n### Aliasing\n\nJavaScript's `Date` API was inspired by Java's `java.util.Date` library (while the latter had become de facto legacy since Java 1.1 in 1997). In particular, the Java `Date` class had a method called `toGMTString` — which was poorly named, because the [Greenwich Mean Time](https://en.wikipedia.org/wiki/Greenwich_Mean_Time) is not equivalent to the [Coordinated Universal Time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time), while JavaScript dates always operate by UTC time. For web compatibility reasons, `toGMTString` remains as an alias to `toUTCString`, and they refer to the exact same function object. This means:\n\n```js\nDate.prototype.toGMTString.name === \"toUTCString\";\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Date/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a\n`Date` object.\n\n\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the given date, or [`NaN`](../../NaN.mdx) in case of an invalid date.\n\n## Description\n\nThe `valueOf()` method returns the primitive value of a `Date`\nobject as a number data type, the number of milliseconds since midnight 01 January, 1970\nUTC.\n\nThis method is functionally equivalent to the [`Date.prototype.getTime()`](./getTime.mdx)\nmethod.\n\nThis method is usually called internally by JavaScript and not explicitly in code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/DecompressionStream/DecompressionStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DecompressionStream()\n\nThe **`DecompressionStream()`** constructor creates a new `DecompressionStream` object which decompresses a stream of data.\n\n## Syntax\n\n```js\nnew DecompressionStream(format)\n```\n\n### Parameters\n\n- `format`\n\n  - : One of the following compression formats:\n\n    - `\"gzip\"`\n    - `\"deflate\"`\n    - `\"deflate-raw\"`\n\n## Exceptions\n\n- `TypeError`\n  - : Thrown if the format passed to the constructor is not supported.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/DecompressionStream/prototype/readable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DecompressionStream.readable\n\nThe **`readable`** read-only property of the `DecompressionStream` interface returns a `ReadableStream`.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/DecompressionStream/prototype/writable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DecompressionStream.writable\n\nThe **`writable`** read-only property of the `DecompressionStream` interface returns a `WritableStream`.\n\n## Value\n\nA `WritableStream`\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Error/Error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error\n\nThe **`Error()`** constructor creates an error object.\n\n## Syntax\n\n```js\nnew Error()\nnew Error(message)\nnew Error(message, options)\nnew Error(message, fileName)\nnew Error(message, fileName, lineNumber)\n\nError()\nError(message)\nError(message, options)\nError(message, fileName)\nError(message, fileName, lineNumber)\n```\n\n> **Note:** `Error()` can be called with or without `new`. Both create a new `Error` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : A human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A value indicating the specific cause of the error, reflected in the [`Error.prototype.cause`](./prototype/cause.mdx) property. When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Error/prototype/cause.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.cause\n\nThe **`cause`** data property of an [`Error`](../../../globals/Error/Error.mdx) instance indicates the specific original cause of the error.\n\nIt is used when catching and re-throwing an error with a more-specific or useful error message in order to still have access to the original error.\n\n## Value\n\nThe value that was passed to the [`Error`](../Error.mdx) constructor in the `options.cause` argument. It may not be present.\n\n## Description\n\nThe value of `cause` can be of any type. You should not make assumptions that the error you caught has an `Error` as its `cause`, in the same way that you cannot be sure the variable bound in the `catch` statement is an `Error` either. The \"Providing structured data as the error cause\" example below shows a case where a non-error is deliberately provided as the cause.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Error/prototype/message.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.message\n\nThe **`message`** data property of an [`Error`](../Error.mdx) instance is a human-readable description of the error.\n\n## Value\n\nA string corresponding to the value passed to the [`Error`](../Error.mdx) constructor as the first argument.\n\n## Description\n\nThis property contains a brief description of the error if one is available or has been set. The `message` property combined with the [`name`](./name.mdx) property is used by the [`Error.prototype.toString()`](./toString.mdx) method to create a string representation of the Error.\n\nBy default, the `message` property is an empty string, but this behavior can be overridden for an instance by specifying a message as the first argument to the [`Error`](../Error.mdx) constructor.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Error/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.name\n\nThe **`name`** data property of `Error.prototype` is shared by all [`Error`](../Error.mdx) instances. It represents the name for the type of error. For `Error.prototype.name`, the initial value is `\"Error\"`. Subclasses like [`TypeError`](../../../globals/TypeError/TypeError.mdx) and [`SyntaxError`](../../SyntaxError/SyntaxError.mdx) provide their own `name` properties.\n\n## Value\n\nA string. For `Error.prototype.name`, the initial value is `\"Error\"`.\n\n## Description\n\nBy default, [`Error`](../Error.mdx) instances are given the name \"Error\". The `name` property, in addition to the [`message`](./message.mdx) property, is used by the [`Error.prototype.toString()`](./toString.mdx) method to create a string representation of the error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Error/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.toString()\n\nThe **`toString()`** method returns a string representing the\nspecified [`Error`](../Error.mdx) object.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified [`Error`](../Error.mdx) object.\n\n## Description\n\nThe [`Error`](../Error.mdx) object overrides the [`Object.prototype.toString()`](../../Object/prototype/toString.mdx)\nmethod inherited by all objects. \n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/EvalError/EvalError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# EvalError\n\nThe **`EvalError()`** constructor creates a new `EvalError` instance.\n\n## Syntax\n\n```js\nnew EvalError()\nnew EvalError(message)\nnew EvalError(message, options)\nnew EvalError(message, fileName)\nnew EvalError(message, fileName, lineNumber)\n\nEvalError()\nEvalError(message)\nEvalError(message, options)\nEvalError(message, fileName)\nEvalError(message, fileName, lineNumber)\n```\n\n> **Note:** `EvalError()` can be called with or without `new`. Both create a new `EvalError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/FetchEvent/FetchEvent.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent\n\nThis is the event type for `fetch` events. It contains information about the fetch, including the request and how the receiver will treat the response. \nIt provides the [`event.respondWith()`](./prototype/respondWith.mdx) method, which allows us to provide a response to this fetch.\n\n## Instance properties\n\n- `FetchEvent.request` _**readonly**_\n    - : The `Request` that was received by the application.\n- `FetchEvent.client` _**readonly**_\n    - : Information about the downstream client that made the request.\n    - `FetchEvent.client.address` _**readonly**_\n        - : A string representation of the IPv4 or IPv6 address of the downstream client.\n    - `FetchEvent.client.geo` _**readonly**_\n        - : A [geolocation dictionary](../../fastly:geolocation/getGeolocationForIpAddress.mdx) corresponding to the IP address of the downstream client. \n\n## Instance methods\n\n- [`FetchEvent.respondWith()`](./prototype/respondWith.mdx)\n    - : Provide (a promise for) a response for this request.\n- [`FetchEvent.waitUntil()`](./prototype/waitUntil.mdx)\n    - : Extends the lifetime of the event. Used to notify the host environment of tasks that extend beyond the returning of a response, such as streaming and caching.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/FetchEvent/prototype/respondWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent.respondWith()\n\nThe **`respondWith()`** method allows you to provide a promise for a [`Response`](../../Response/Response.mdx) to send back to the client which made the incoming request to your application.\n\n## Syntax\n\n```js\nrespondWith(response)\n```\n\n### Parameters\n\n- `response`\n  - : A [`Response`](../../Response/Response.mdx) or a [`Promise`](../../Promise/Promise.mdx) that resolves to a\n    [`Response`](../../Response/Response.mdx). Otherwise, a network error is returned to Fetch.\n\n### Return value\n\nAlways returns `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/FetchEvent/prototype/waitUntil.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent.waitUntil()\n\n\nThe **`waitUntil()`** method tells the host environment that work is ongoing until the promise settles, and it shouldn't terminate\nthe application if it wants that work to complete.\n\nThe `waitUntil()` method must be initially called synchronously within the event callback,\nbut after that it can be called multiple times, and will hold the process open until all the promises passed to it\nsettle.\n\n## Syntax\n\n```js\nwaitUntil(promise)\n```\n\n### Parameters\n\nA [`Promise`](../../Promise/Promise.mdx).\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/FinalizationRegistry/FinalizationRegistry.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FinalizationRegistry()\n\nThe **`FinalizationRegistry`** constructor creates a `FinalizationRegistry` object that uses the given callback.\n\n## Syntax\n\n```js\n// Arrow callback function\nnew FinalizationRegistry((heldValue) => { /* … */ })\n\n// Callback function\nnew FinalizationRegistry(callbackFn)\n\n// Inline callback function\nnew FinalizationRegistry(function(heldValue) { /* … */ })\n```\n\n> **Note:** `FinalizationRegistry()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `callback`\n  - : The callback function this registry should use.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/FinalizationRegistry/prototype/register.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FinalizationRegistry.prototype.register()\n\nThe `register()` method registers an object with a\n`FinalizationRegistry` instance so that if the object is garbage-collected,\nthe registry's callback may get called.\n\n## Syntax\n\n```js\nregister(target, heldValue)\nregister(target, heldValue, unregisterToken)\n```\n\n### Parameters\n\n- `target`\n  - : The target object to register.\n- `heldValue`\n  - : The value to pass to the finalizer for this object. This cannot be the `target` object but can be anything else, including functions and primitives.\n- `unregisterToken` _**optional**_\n  - : A token that may be used with the `unregister` method later to unregister\n    the target object. If provided (and not `undefined`), this must be an\n    object. If not provided, the target cannot be unregistered.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown when one of the following condition is met:\n    - `target` is not an object (object as opposed to primitives; functions are objects as well)\n    - `target` is the same as `heldvalue` (`target === heldValue`)\n    - `unregisterToken` is not an object\n\n## Description\n\nSee the [Avoid where possible](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry#avoid_where_possible)\nand [Notes on cleanup callbacks](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry#notes_on_cleanup_callbacks)\nsections of the `FinalizationRegistry` page for important caveats.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/FinalizationRegistry/prototype/unregister.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FinalizationRegistry.prototype.unregister()\n\nThe `unregister()` method unregisters a target object from a\n`FinalizationRegistry` instance.\n\n## Syntax\n\n```js\nunregister(unregisterToken)\n```\n\n### Parameters\n\n- `unregisterToken`\n  - : The token used with the [`FinalizationRegistry.prototype.register`](./register.mdx) method when registering the target object. Multiple cells registered with the same `unregisterToken` will be unregistered together.\n\n### Return value\n\nA boolean value that is `true` if at least one cell was unregistered and `false` if no cell was unregistered.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown when `unregisterToken` is not an object.\n\n## Description\n\nWhen a target object has been reclaimed, it is no longer registered in the registry.\nThere is no need to call `unregister` in your cleanup callback. Only call\n`unregister` if you haven't received a cleanup callback and no longer need\nto receive one.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Float32Array/Float32Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Float32Array()\n\nThe **`Float32Array()`** typed array constructor creates a new\n`Float32Array` object, which is, an array of 32-bit floating point numbers\n(corresponding to the C `float` data type) in the platform byte order. If\ncontrol over byte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are\ninitialized to `0`. Once established, you can reference elements in the array\nusing the object's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Float32Array()\nnew Float32Array(length)\nnew Float32Array(typedArray)\nnew Float32Array(object)\n\nnew Float32Array(buffer)\nnew Float32Array(buffer, byteOffset)\nnew Float32Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Float32Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Float64Array/Float64Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Float64Array()\n\nThe **`Float64Array()`** typed array constructor creates a new\n`Float64Array` object, which is, an array of 64-bit floating point numbers\n(corresponding to the C `double` data type) in the platform byte order. If\ncontrol over byte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are\ninitialized to `0`. Once established, you can reference elements in the array\nusing the object's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Float64Array()\nnew Float64Array(length)\nnew Float64Array(typedArray)\nnew Float64Array(object)\n\nnew Float64Array(buffer)\nnew Float64Array(buffer, byteOffset)\nnew Float64Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Float64Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Function/Function.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function()\n\nThe **`Function()`** constructor creates a new [`Function`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function) object. Calling the constructor directly can create functions dynamically, but suffers from security and similar (but far less significant) performance issues as `eval()`. However, unlike `eval` (which may have access to the local scope), the `Function` constructor creates functions which execute in the global scope only.\n\n\n\n## Syntax\n\n```js\nnew Function(functionBody)\nnew Function(arg0, functionBody)\nnew Function(arg0, arg1, functionBody)\nnew Function(arg0, arg1, /* … ,*/ argN, functionBody)\n\nFunction(functionBody)\nFunction(arg0, functionBody)\nFunction(arg0, arg1, functionBody)\nFunction(arg0, arg1, /* … ,*/ argN, functionBody)\n```\n\n> **Note:** `Function()` can be called with or without `new`. Both create a new `Function` instance.\n\n### Parameters\n\n- `argN` _**optional**_\n\n  - : Names to be used by the function as formal argument names. Each must be a string that corresponds to a valid JavaScript parameter (any of plain [identifier](https://developer.mozilla.org/docs/Glossary/Identifier), [rest parameter](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/rest_parameters), or [destructured](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment) parameter, optionally with a [default](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/Default_parameters)), or a list of such strings separated with commas.\n\n    As the parameters are parsed in the same way as function expressions, whitespace and comments are accepted. For example: `\"x\", \"theValue = 42\", \"[a, b] /* numbers */\"` — or `\"x, theValue = 42, [a, b] /* numbers */\"`. (`\"x, theValue = 42\", \"[a, b]\"` is also correct, though very confusing to read.)\n\n- `functionBody`\n  - : A string containing the JavaScript statements comprising the function definition.\n\n## Description\n\n`Function` objects created with the `Function` constructor are parsed when the function is created. This is less efficient than creating a function with a [function expression](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/function) or [function declaration](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function) and calling it within your code, because such functions are parsed with the rest of the code.\n\nAll arguments passed to the function, except the last, are treated as the names of the identifiers of the parameters in the function to be created, in the order in which they are passed. The function will be dynamically compiled as a function expression, with the source assembled in the following fashion:\n\n```js\n`function anonymous(${args.join(\",\")}\n) {\n${functionBody}\n}`\n```\n\nThis is observable by calling the function's [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/toString) method.\n\nHowever, unlike normal [function expressions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/function), the name `anonymous` is not added to the `functionBody`'s scope, since `functionBody` only has access the global scope. If `functionBody` is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode) (the body itself needs to have the `\"use strict\"` directive since it doesn't inherit the strictness from the context), you may use [`arguments.callee`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/arguments/callee) to refer to the function itself. Alternatively, you can define the recursive part as an inner function:\n\n```js\nconst recursiveFn = new Function(\"count\", `\n(function recursiveFn(count) {\n  if (count < 0) {\n    return;\n  }\n  console.log(count);\n  recursiveFn(count - 1);\n})(count);\n`);\n```\n\nNote that the two dynamic parts of the assembled source — the parameters list `args.join(\",\")` and `functionBody` — will first be parsed separately to ensure they are each syntactically valid. This prevents injection-like attempts.\n\n```js\nnew Function(\"/*\", \"*/) {\");\n// SyntaxError: Unexpected end of arg string\n// Doesn't become \"function anonymous(/*) {*/) {}\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Function/prototype/apply.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.apply()\n\nThe **`apply()`** method calls the specified function with a given `this` value, and `arguments` provided as an array (or an [array-like object](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects)).\n\n\n\n## Syntax\n\n```js\napply(thisArg)\napply(thisArg, argsArray)\n```\n\n### Parameters\n\n- `thisArg`\n  - : The value of `this` provided for the call to `func`. If the function is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) will be replaced with the global object, and primitive values will be converted to objects.\n- `argsArray` _**optional**_\n  - : An array-like object, specifying the arguments with which `func` should be called, or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../../globals/undefined.mdx) if no arguments should be provided to the function.\n\n### Return value\n\nThe result of calling the function with the specified `this` value and arguments.\n\n## Description\n\n> **Note:** This function is almost identical to [`Function.prototype.call()`](../../../globals/Function/prototype/call.mdx), except that `call()` accepts an **argument list**, while `apply()` accepts a **single array of arguments** — for example, `func.apply(this, ['eat', 'bananas'])` vs. `func.call(this, 'eat', 'bananas')`.\n\nNormally, when calling a function, the value of [`this`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this) inside the function is the object that the function was accessed on. With `apply()`, you can assign an arbitrary value as `this` when calling an existing function, without first attaching the function to the object as a property. This allows you to use methods of one object as generic utility functions.\n\n> **Warning:** Do not use `apply()` to chain constructors (for example, to implement inheritance). This invokes the constructor function as a plain function, which means [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target) is `undefined`, and classes throw an error because they can't be called without `new`. Use [`Reflect.construct()`](../../../globals/Reflect/construct.mdx) or [`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Function/prototype/bind.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.bind()\n\nThe **`bind()`** method creates a new function that, when called, has its `this` keyword set to the provided value, with a given sequence of arguments preceding any provided when the new function is called.\n\n\n\n## Syntax\n\n```js\nbind(thisArg)\nbind(thisArg, arg1)\nbind(thisArg, arg1, arg2)\nbind(thisArg, arg1, arg2, /* …, */ argN)\n```\n\n### Parameters\n\n- `thisArg`\n  - : The value to be passed as the `this` parameter to the target function `func` when the bound function is called. If the function is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) will be replaced with the global object, and primitive values will be converted to objects. The value is ignored if the bound function is constructed using the `new` operator.\n- `arg1, …, argN` _**optional**_\n  - : Arguments to prepend to arguments provided to the bound function when invoking `func`.\n\n### Return value\n\nA copy of the given function with the specified `this` value, and initial arguments (if provided).\n\n## Description\n\nThe `bind()` function creates a new _bound function_. Calling the bound function generally results in the execution of the function it wraps, which is also called the _target function_. The bound function will store the parameters passed — which include the value of `this` and the first few arguments — as its internal state. These values are stored in advance, instead of being passed at call time. You can generally see `const boundFn = fn.bind(thisArg, arg1, arg2)` as being equivalent to `const boundFn = (...restArgs) => fn.call(thisArg, arg1, arg2, ...restArgs)` for the effect when it's called (but not when `boundFn` is constructed).\n\nA bound function can be further bound by calling `boundFn.bind(thisArg, /* more args */)`, which creates another bound function `boundFn2`. The newly bound `thisArg` value is ignored, because the target function of `boundFn2`, which is `boundFn`, already has a bound `this`. When `boundFn2` is called, it would call `boundFn`, which in turn calls `fn`. The arguments that `fn` ultimately receives are, in order: the arguments bound by `boundFn`, arguments bound by `boundFn2`, and the arguments received by `boundFn2`.\n\n```js\n\"use strict\"; // prevent `this` from being boxed into the wrapper object\n\nfunction log(...args) {\n  console.log(this, ...args);\n}\nconst boundLog = log.bind(\"this value\", 1, 2);\nconst boundLog2 = boundLog.bind(\"new this value\", 3, 4);\nboundLog2(5, 6); // \"this value\", 1, 2, 3, 4, 5, 6\n```\n\nA bound function may also be constructed using the `new` operator if its target function is constructable. Doing so acts as though the target function had instead been constructed. The prepended arguments are provided to the target function as usual, while the provided `this` value is ignored (because construction prepares its own `this`, as seen by the parameters of [`Reflect.construct`](../../../globals/Reflect/construct.mdx)). If the bound function is directly constructed, [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target) will be the target function instead. (That is, the bound function is transparent to `new.target`.)\n\n```js\nclass Base {\n  constructor(...args) {\n    console.log(new.target === Base);\n    console.log(args);\n  }\n}\n\nconst BoundBase = Base.bind(null, 1, 2);\n\nnew BoundBase(3, 4); // true, [1, 2, 3, 4]\n```\n\nHowever, because a bound function does not have the [`prototype`](../../../globals/Function/prototype/) property, it cannot be used as a base class for [`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends).\n\n```js example-bad\nclass Derived extends class {}.bind(null) {}\n// TypeError: Class extends value does not have valid prototype property undefined\n```\n\nWhen using a bound function as the right-hand side of [`instanceof`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/instanceof), `instanceof` would reach for the target function (which is stored internally in the bound function) and read its `prototype` instead.\n\n```js\nclass Base {}\nconst BoundBase = Base.bind(null, 1, 2);\nconsole.log(new Base() instanceof BoundBase); // true\n```\n\nThe bound function has the following properties:\n\n- [`length`](../../../globals/Function/prototype/length.mdx)\n  - : The `length` of the target function minus the number of arguments being bound (not counting the `thisArg` parameter), with 0 being the minimum value.\n- [`name`](../../../globals/Function/prototype/name.mdx)\n  - : The `name` of the target function plus a `\"bound \"` prefix.\n\nThe bound function also inherits the [prototype chain](https://developer.mozilla.org/docs/Web/JavaScript/Inheritance_and_the_prototype_chain) of the target function. However, it doesn't have other own properties of the target function (such as [static properties](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/static) if the target function is a class).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Function/prototype/call.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.call()\n\nThe **`call()`** method calls the function with a given `this` value and arguments provided individually.\n\n## Syntax\n\n```js\ncall(thisArg)\ncall(thisArg, arg1)\ncall(thisArg, arg1, /* …, */ argN)\n```\n\n### Parameters\n\n- `thisArg`\n  - : The value to use as `this` when calling `func`. If the function is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) will be replaced with the global object, and primitive values will be converted to objects.\n- `arg1, …, argN` _**optional**_\n  - : Arguments for the function.\n\n### Return value\n\nThe result of calling the function with the specified `this` value and arguments.\n\n## Description\n\n> **Note:** This function is almost identical to [`Function.prototype.apply()`](../../../globals/Function/prototype/apply.mdx), except that `call()` accepts an **argument list**, while `apply()` accepts a **single array of arguments** — for example, `func.apply(this, ['eat', 'bananas'])` vs. `func.call(this, 'eat', 'bananas')`.\n\nNormally, when calling a function, the value of [`this`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this) inside the function is the object that the function was accessed on. With `call()`, you can assign an arbitrary value as `this` when calling an existing function, without first attaching the function to the object as a property. This allows you to use methods of one object as generic utility functions.\n\n> **Warning:** Do not use `call()` to chain constructors (for example, to implement inheritance). This invokes the constructor function as a plain function, which means [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target) is `undefined`, and classes throw an error because they can't be called without `new`. Use [`Reflect.construct()`](../../../globals/Reflect/construct.mdx) or [`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Function/prototype/index.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.prototype\n\nThe **`prototype`** data property of a `Function` instance is used when the function is used as a constructor with the `new` operator. It will become the new object's prototype.\n\n> **Note:** Not all `Function` objects have the `prototype` property — see [description](#description).\n\n## Value\n\nAn object.\n\n> **Note:** The `prototype` property of [classes](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes) is not writable.\n\n## Description\n\nWhen a function is called with `new`, the constructor's `prototype` property will become the resulting object's prototype.\n\n```js\nfunction Ctor() {}\nconst inst = new Ctor();\nconsole.log(Object.getPrototypeOf(inst) === Ctor.prototype); // true\n```\n\nYou can read [Inheritance and the prototype chain](https://developer.mozilla.org/docs/Web/JavaScript/Inheritance_and_the_prototype_chain#constructors) for more information about the interactions between a constructor function's `prototype` property and the resulting object's prototype.\n\nA function having a `prototype` property is not sufficient for it to be eligible as a constructor. [Generator functions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function*) have a `prototype` property, but cannot be called with `new`:\n\n```js\nasync function* asyncGeneratorFunction() {}\nfunction* generatorFunction() {}\n```\n\nInstead, generator functions' `prototype` property is used when they are called _without_ `new`. The `prototype` property will become the returned [`Generator`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Generator) object's prototype.\n\nIn addition, some functions may have a `prototype` but throw unconditionally when called with `new`. For example, the [`Symbol()`](../../../globals/Symbol/Symbol.mdx) and [`BigInt`](../../../globals/BigInt/BigInt.mdx) functions throw when called with `new`, because `Symbol.prototype` and `BigInt.prototype` are only intended to provide methods for the primitive values, but the wrapper objects should not be directly constructed.\n\nThe following functions do not have `prototype`, and are therefore ineligible as constructors, even if a `prototype` property is later manually assigned:\n\n```js\nconst method = { foo() {} }.foo;\nconst arrowFunction = () => {};\nasync function asyncFunction() {}\n```\n\nThe following are valid constructors that have `prototype`:\n\n```js\nclass Class {}\nfunction fn() {}\n```\n\nA [bound function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/bind) does not have a `prototype` property, but may be constructable. When it's constructed, the target function is constructed instead, and if the target function is constructable, it would return a normal instance.\n\n```js\nconst boundFunction = function () {}.bind(null);\n```\n\nA function's `prototype` property, by default, is a plain object with one property: (`constructor`)[../../../globals/Object/prototype/constructor.mdx), which is a reference to the function itself. The `constructor` property is writable, non-enumerable, and configurable.\n\nIf the `prototype` of a function is reassigned with something other than an `Object`, when the function is called with `new`, the returned object's prototype would be `Object.prototype` instead. (In other words, `new` ignores the `prototype` property and constructs a plain object.)\n\n```js\nfunction Ctor() {}\nCtor.prototype = 3;\nconsole.log(Object.getPrototypeOf(new Ctor()) === Object.prototype); // true\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Function/prototype/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.length\n\nThe **`length`** data property of a `Function` instance indicates the number of parameters expected by the function.\n\n## Value\n\nA number.\n\n## Description\n\nA `Function` object's `length` property indicates how many arguments the function expects, i.e. the number of formal parameters. \n\nThe `Function` constructor is itself a `Function` object. Its `length` data property has a value of `1`.\n\nDue to historical reasons, `Function.prototype` is a callable itself. The `length` property of `Function.prototype` has a value of `0`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Function/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.name\n\nThe **`name`** property of a `Function` instance indicates the function's name as specified when it was created, or it may be either `anonymous` or `''` (an empty string) for functions created anonymously.\n\n## Value\n\nA string.\n\n> **Note:** In non-standard, pre-ES2015 implementations the `configurable` attribute was `false` as well.\n\n## Description\n\nThe function's `name` property can be used to identify the function in debugging tools or error messages. It has no semantic significance to the language itself.\n\nThe `name` property is read-only and cannot be changed by the assignment operator:\n\n```js\nfunction someFunction() {}\n\nsomeFunction.name = 'otherFunction';\nconsole.log(someFunction.name); // someFunction\n```\n\nTo change it, use [`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx).\n\nThe `name` property is typically inferred from how the function is defined. In the following sections, we will describe the various ways in which it can be inferred.\n\n### Function declaration\n\nThe `name` property returns the name of a function declaration.\n\n```js\nfunction doSomething() {}\ndoSomething.name; // \"doSomething\"\n```\n\n### Default-exported function declaration\n\nAn [`export default`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/export) declaration exports the function as a declaration instead of an expression. If the declaration is anonymous, the name is `\"default\"`.\n\n```js\n// -- someModule.js --\nexport default function () {};\n\n// -- main.js --\nimport someModule from \"./someModule.js\";\n\nsomeModule.name; // \"default\"\n```\n\n### Function constructor\n\nFunctions created with the [`Function()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/Function) constructor have name \"anonymous\".\n\n```js\nnew Function().name; // \"anonymous\"\n```\n\n### Function expression\n\nIf the function expression is named, that name is used as the `name` property.\n\n```js\nconst someFunction = function someFunctionName() {};\nsomeFunction.name; // \"someFunctionName\"\n```\n\nAnonymous function expressions created using the keyword `function` or arrow functions would have `\"\"` (an empty string) as their name.\n\n```js\n(function () {}).name; // \"\"\n(() => {}).name; // \"\"\n```\n\nHowever, such cases are rare — usually, in order to refer to the expression elsewhere, the function expression is attached to an identifier when it's created (such as in a variable declaration). In such cases, the name can be inferred, as the following few subsections demonstrate.\n\nOne practical case where the name cannot be inferred is a function returned from another function:\n\n```js\nfunction getFoo() {\n  return () => {};\n}\ngetFoo().name; // \"\"\n```\n\n### Variable declaration and method\n\nVariables and methods can infer the name of an anonymous function from its syntactic position.\n\n```js\nconst f = function () {};\nconst object = {\n  someMethod: function () {}\n};\n\nconsole.log(f.name); // \"f\"\nconsole.log(object.someMethod.name); // \"someMethod\"\n```\n\nThe same applies to assignment:\n\n```js\nlet f;\nf = () => {};\nf.name; // \"f\"\n```\n\n### Initializer and default value\n\nFunctions in initializers (default values) of [destructuring](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#default_value), [default parameters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/Default_parameters), [class fields](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/Public_class_fields), etc., will inherit the name of the bound identifier as their `name`.\n\n```js\nconst [f = () => {}] = [];\nf.name; // \"f\"\n\nconst { someMethod: m = () => {} } = {};\nm.name; // \"m\"\n\nfunction foo(f = () => {}) {\n  console.log(f.name);\n}\nfoo(); // \"f\"\n\nclass Foo {\n  static someMethod = () => {};\n}\nFoo.someMethod.name; // someMethod\n```\n\n### Shorthand method\n\n```js\nconst o = {\n  foo() {},\n};\no.foo.name; // \"foo\";\n```\n\n### Bound function\n\n[`Function.prototype.bind()`](../../../globals/Function/prototype/bind.mdx) produces a function whose name is \"bound \" plus the function name.\n\n```js\nfunction foo() {};\nfoo.bind({}).name; // \"bound foo\"\n```\n\n### Getter and setter\n\nWhen using [`get`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/get) and [`set`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/set) accessor properties, \"get\" or \"set\" will appear in the function name.\n\n```js\nconst o = {\n  get foo() {},\n  set foo(x) {},\n};\n\nconst descriptor = Object.getOwnPropertyDescriptor(o, \"foo\");\ndescriptor.get.name; // \"get foo\"\ndescriptor.set.name; // \"set foo\";\n```\n\n### Class\n\nA class's name follows the same algorithm as function declarations and expressions.\n\n```js\nclass Foo {}\nFoo.name; // \"Foo\"\n```\n\n> **Warning:** JavaScript will set the function's `name` property only if a function does not have an own property called `name`. However, classes' [static members](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/static) will be set as own properties of the class constructor function, and thus prevent the built-in `name` from being applied. See [telling the constructor name of an object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name#telling_the_constructor_name_of_an_object) for more details.\n\n### Symbol as function name\n\nIf a `Symbol` is used a function name and the symbol has a description, the method's name is the description in square brackets.\n\n```js\nconst sym1 = Symbol(\"foo\");\nconst sym2 = Symbol();\n\nconst o = {\n  [sym1]() {},\n  [sym2]() {},\n};\n\no[sym1].name; // \"[foo]\"\no[sym2].name; // \"[]\"\n```\n\n### Private property\n\nPrivate fields and private methods have the hash (`#`) as part of their names.\n\n```js\nclass Foo {\n  #field = () => {};\n  #method() {}\n  getNames() {\n    console.log(this.#field.name);\n    console.log(this.#method.name);\n  }\n}\n\nnew Foo().getNames();\n// \"#field\"\n// \"#method\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Function/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.toString()\n\nThe **`toString()`** method returns a string representing the source code of the specified `Function`.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the source code of the function.\n\n## Description\n\nThe `Function` object overrides the `toString()` method\ninherited from `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For user-defined `Function`\nobjects, the `toString` method returns a string containing the source text\nsegment which was used to define the function.\n\nJavaScript calls the `toString` method automatically when a\n`Function` is to be represented as a text value, e.g. when a function is\nconcatenated with a string.\n\nThe `toString()` method will throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) exception\n(\"Function.prototype.toString called on incompatible object\"), if its\n`this` value object is not a `Function` object.\n\n```js example-bad\nFunction.prototype.toString.call('foo'); // throws TypeError\n```\n\nIf the `toString()` method is called on built-in function objects, a\nfunction created by [`Function.prototype.bind()`](../../../globals/Function/prototype/bind.mdx), or\nother non-JavaScript functions, then `toString()` returns a\n_native function string_ which looks like\n\n```js\n\"function someName() { [native code] }\"\n```\n\nFor intrinsic object methods and functions, `someName` is the initial name of the function; otherwise its content may be implementation-defined, but will always be in property name syntax, like `[1 + 1]`, `someName`, or `1`.\n\n> **Note:** This means using [`eval()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/eval) on native function strings is a guaranteed syntax error.\n\nIf the `toString()` method is called on a function created by the `Function` constructor, `toString()` returns the source code of a synthesized function declaration named \"anonymous\" using the provided parameters and function body. For example, `Function(\"a\", \"b\", \"return a + b\").toString()` will return:\n\n```js\n\"function anonymous(a,b\\n) {\\nreturn a + b\\n}\"\n```\n\nSince ES2018, the spec requires the return value of `toString()` to be the exact same source code as it was declared, including any whitespace and/or comments — or, if the host doesn't have the source code available for some reason, requires returning a native function string. Support for this revised behavior can be found in the [browser compatibility table](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/toString#browser_compatibility).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Headers/Headers.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers()\n\nThe **`Headers()`** constructor creates a new `Headers` object.\n\n## Syntax\n\n```js\nnew Headers()\nnew Headers(init)\n```\n\n### Parameters\n\n- `init` _**optional**_\n  - : An object containing any HTTP headers that you want to pre-populate your `Headers` object with. This can be a\n    simple object literal with `String` values, an array of name-value pairs, where each pair is a 2-element string array; or an existing\n    `Headers` object. In the last case, the new `Headers` object\n    copies its data from the existing `Headers` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Headers/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.append()\n\nThe **`append()`** method of the `Headers`\ninterface appends a new value onto an existing header inside a `Headers`\nobject, or adds the header if it does not already exist.\n\nThe difference between `Headers.prototype.set()` and `append()` is\nthat if the specified header already exists and accepts multiple values,\n`set()` will overwrite the existing value with the new one, whereas\n`append()` will append the new value onto the end of the set of values.\n\n## Syntax\n\n```js\nappend(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to add to the `Headers` object.\n- `value`\n  - : The value of the HTTP header you want to add.\n\n### Return value\n\nNone (`undefined`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Headers/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.delete()\n\nThe **`delete()`** method of the `Headers`\ninterface deletes a header from the current `Headers` object.\n\nThis method throws a `TypeError` for the following reasons:\n\n- The value of the name parameter is not the name of an HTTP header.\n\n## Syntax\n\n```js\ndelete(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to delete from the `Headers` object.\n\n### Return value\n\nNone (`undefined`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Headers/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.entries()\n\nThe **`Headers.entries()`** method returns an iterator allowing to go through all key/value pairs\ncontained in this object. The both the key and value of each pairs are `String` objects.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Headers/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.forEach()\n\nThe **`Headers.forEach()`** method executes a callback function once per each key/value pair in the `Headers` object.\n\n## Syntax\n\n```js\n// Arrow function\nforEach((value, key) => { /* … */ })\nforEach((value, key, object) => { /* … */ })\n\n// Inline callback function\nforEach(function (value, key) { /* … */ })\nforEach(function (value, key, object) { /* … */ })\nforEach(function (value, key) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n  - : Function to execute for each entry in the map. It takes the following arguments:\n    - `value`\n      - : Value of the currently visited header entry.\n    - `key`\n      - : Name of the currently visited header entry.\n    - `object`\n      - : The Headers object being iterated.\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `callback`.\n\n### Return value\n\n`undefined`.\n\n## Description\n\nThe `Headers.forEach()` method executes the provided callback once for each key of the Headers which actually exist. It is not invoked for keys which have been deleted. However, it is executed for keys which are present but have the value undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Headers/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.get()\n\nThe **`get()`** method of the [`Headers`](../../../globals/Headers/Headers.mdx) interface\nreturns a byte string of all the values of a header within a `Headers` object\nwith a given name. If the requested header doesn't exist in the `Headers`\nobject, it returns `null`.\n\n## Syntax\n\n```js\nget(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header whose values you want to retrieve from the\n    `Headers` object. If the given name is not the name of an HTTP header, this\n    method throws a `TypeError`. The name is case-insensitive.\n\n### Return value\n\nA [`String`](../../../globals/String/String.mdx) sequence representing the values of the retrieved header or\n`null` if this header is not set.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Headers/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.has()\n\nThe **`has()`** method of the `Headers` interface\nreturns a boolean stating whether a `Headers` object contains a certain\nheader.\n\n## Syntax\n\n```js\nhas(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to test for. If the given name is not a valid\n    HTTP header name, this method throws a `TypeError`.\n\n### Return value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Headers/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.keys()\n\nThe **`Headers.keys()`** method returns an iterator allowing to go through all keys contained\nin this object. The keys are `String` objects.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Headers/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.set()\n\nThe **`set()`** method of the `Headers` interface\nsets a new value for an existing header inside a `Headers` object, or adds\nthe header if it does not already exist.\n\nThe difference between `set()` and `Headers.append` is that if\nthe specified header already exists and accepts multiple values, `set()`\noverwrites the existing value with the new one, whereas `Headers.append`\nappends the new value to the end of the set of values.\n\n## Syntax\n\n```js\nset(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to set to a new value. If the given name is not\n    the name of an HTTP header, this method throws a `TypeError`.\n- `value`\n  - : The new value you want to set.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Headers/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.values()\n\nThe **`Headers.values()`** method returns an iterator allowing to go through all values contained\nin this object. The values are `String` objects.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/HmacImportParams/HmacImportParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# HmacImportParams\n\nThe **`HmacImportParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.importKey`, when generating a key for the `HMAC` algorithm.\n\n## Instance properties\n\n- `name`\n  - : A string. This should be set to `HMAC`.\n- `hash`\n\n  - : A string representing the name of the digest function to use. The can take a value of `SHA-1`, `SHA-256`, `SHA-384`, or `SHA-512`.\n\n- `length` _optional_\n  - : A `Number` representing the length in bits of the key. If this is omitted the length of the key is equal to the length of the digest generated by the digest function you have chosen. Unless you have a good reason to use a different length, omit this property and use the default.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Infinity.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Infinity\n\nThe global property **`Infinity`** is a numeric value representing infinity.\n\n## Value\n\nThe same number value as `Number.POSITIVE_INFINITY`.\n\n## Description\n\n`Infinity` is a property of the _global object_. In other words, it is a variable in global scope.\n\nThe value `Infinity` (positive infinity) is greater than any other number.\n\nThis value behaves slightly differently than mathematical infinity; see `Number.POSITIVE_INFINITY` for details.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Int16Array/Int16Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Int16Array()\n\nThe **`Int16Array()`** typed array constructor creates an array\nof twos-complement 16-bit signed integers in the platform byte order. If control over\nbyte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are initialized\nto `0`. Once established, you can reference elements in the array using the\nobject's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Int16Array()\nnew Int16Array(length)\nnew Int16Array(typedArray)\nnew Int16Array(object)\n\nnew Int16Array(buffer)\nnew Int16Array(buffer, byteOffset)\nnew Int16Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Int16Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Int32Array/Int32Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Int32Array()\n\nThe **`Int32Array()`** typed array constructor creates an array\nof twos-complement 32-bit signed integers in the platform byte order. If control over\nbyte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are initialized\nto `0`. Once established, you can reference elements in the array using the\nobject's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Int32Array()\nnew Int32Array(length)\nnew Int32Array(typedArray)\nnew Int32Array(object)\n\nnew Int32Array(buffer)\nnew Int32Array(buffer, byteOffset)\nnew Int32Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Int32Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Int8Array/Int8Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Int8Array()\n\nThe **`Int8Array()`** constructor creates a typed array of\ntwos-complement 8-bit signed integers. The contents are initialized to `0`.\nOnce established, you can reference elements in the array using the object's methods, or\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew Int8Array()\nnew Int8Array(length)\nnew Int8Array(typedArray)\nnew Int8Array(object)\n\nnew Int8Array(buffer)\nnew Int8Array(buffer, byteOffset)\nnew Int8Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Int8Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/JSON/parse.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# JSON.parse()\n\nThe **`JSON.parse()`** method parses a JSON string, constructing the JavaScript value or object described by the string. An optional _reviver_ function can be provided to perform a transformation on the resulting object before it is returned.\n\n## Syntax\n\n```js\nJSON.parse(text)\nJSON.parse(text, reviver)\n```\n\n### Parameters\n\n- `text`\n  - : The string to parse as JSON.\n- `reviver` _**optional**_\n  - : If a function, this prescribes how each value originally produced by parsing is transformed before being returned. Non-callable values are ignored. The function is called with the following arguments:\n    - `key`\n      - : The key associated with the value.\n    - `value`\n      - : The value produced by parsing.\n\n### Return value\n\nThe `Object`, `Array`, string, number, boolean, or `null` value corresponding to the given JSON `text`.\n\n### Exceptions\n\n- [`SyntaxError`](../../globals/SyntaxError/SyntaxError.mdx)\n  - : Thrown if the string to parse is not valid JSON.\n\n## Description\n\n`JSON.parse()` parses a JSON string according to the [JSON grammar](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/JSON#full_json_grammar), then evaluates the string as if it's a JavaScript expression. The only instance where a piece of JSON text represents a different value from the same JavaScript expression is when dealing with the `\"__proto__\"` key — see [Object literal syntax vs. JSON](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Object_initializer#object_literal_syntax_vs._json).\n\n### The reviver parameter\n\nIf a `reviver` is specified, the value computed by parsing is _transformed_ before being returned. Specifically, the computed value and all its properties (in a [depth-first](https://en.wikipedia.org/wiki/Depth-first_search) fashion, beginning with the most nested properties and proceeding to the original value itself) are individually run through the `reviver`.\n\nThe `reviver` is called with the object containing the property being processed as `this`, and two arguments: `key` and `value`, representing the property name as a string (even for arrays) and the property value. If the `reviver` function returns [`undefined`](../../globals/undefined.mdx) (or returns no value — for example, if execution falls off the end of the function), the property is deleted from the object. Otherwise, the property is redefined to be the return value. If the `reviver` only transforms some values and not others, be certain to return all untransformed values as-is — otherwise, they will be deleted from the resulting object.\n\nSimilar to the `replacer` parameter of [`JSON.stringify()`](../../globals/JSON/stringify.mdx), `reviver` will be last called on the root object with an empty string as the `key` and the root object as the `value`. For JSON text parsing to primitive values, `reviver` will be called once.\n\nNote that `reviver` is run after the value is parsed. So, for example, numbers in JSON text will have already been converted to JavaScript numbers, and may lose precision in the process. To transfer large numbers without loss of precision, serialize them as strings, and revive them to [BigInts](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/BigInt), or other appropriate arbitrary precision formats.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/JSON/stringify.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# JSON.stringify()\n\nThe **`JSON.stringify()`** method converts a JavaScript value to a JSON string, optionally replacing values if a replacer function is specified or optionally including only the specified properties if a replacer array is specified.\n\n## Syntax\n\n```js\nJSON.stringify(value)\nJSON.stringify(value, replacer)\nJSON.stringify(value, replacer, space)\n```\n\n### Parameters\n\n- `value`\n  - : The value to convert to a JSON string.\n- `replacer` _**optional**_\n  - : A function that alters the behavior of the stringification process, or an array of strings or numbers naming properties of `value` that should be included in the output. If `replacer` is an array, all elements that are not strings or numbers (can be either primitives or wrapper objects), including `Symbol` values, are completely ignored. If `replacer` is anything other than a function or an array (e.g. [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or not provided), all properties of the object are included in the resulting JSON string.\n- `space` _**optional**_\n\n  - : A string or number that's used to insert white space (including indentation, line break characters, etc.) into the output JSON string for readability purposes.\n\n    If this is a number, it indicates the number of space characters to be used as indentation, clamped to 10 (that is, any number greater than `10` is treated as if it were `10`). Values less than 1 indicate that no space should be used.\n\n    If this is a string, the string (or the first 10 characters of the string, if it's longer than that) is inserted before every nested object or array.\n\n    If `space` is anything other than a string or number (can be either a primitive or a wrapper object) — for example, is [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or not provided — no white space is used.\n\n### Return value\n\nA JSON string representing the given value, or undefined.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if one of the following is true:\n    - `value` contains a circular reference.\n    - A `BigInt` value is encountered.\n\n## Description\n\n`JSON.stringify()` converts a value to JSON notation representing it:\n\n- `Boolean`, `Number`, `String`, and `BigInt` (obtainable via [`Object()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/Object)) objects are converted to the corresponding primitive values during stringification, in accordance with the traditional conversion semantics. `Symbol` objects (obtainable via [`Object()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/Object)) are treated as plain objects.\n- Attempting to serialize `BigInt` values will throw. However, if the BigInt has a `toJSON()` method (through monkeypatching: `BigInt.prototype.toJSON = ...`), that method can provide the serialization result. This constraint ensures that a proper serialization (and, very likely, its accompanying deserialization) behavior is always explicitly provided by the user.\n- [`undefined`](../../globals/undefined.mdx), `Function`, and `Symbol` values are not valid JSON values. If any such values are encountered during conversion, they are either omitted (when found in an object) or changed to [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) (when found in an array). `JSON.stringify()` can return `undefined` when passing in \"pure\" values like `JSON.stringify(() => {})` or `JSON.stringify(undefined)`.\n- The numbers [`Infinity`](../../globals/Infinity.mdx) and [`NaN`](../../globals/NaN.mdx), as well as the value [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null), are all considered `null`. (But unlike the values in the previous point, they would never be omitted.)\n- Arrays are serialized as arrays (enclosed by square brackets). Only array indices between 0 and `length - 1` (inclusive) are serialized; other properties are ignored.\n- For other objects:\n\n  - All `Symbol`-keyed properties will be completely ignored, even when using the [`replacer`](#the-replacer-parameter) parameter.\n\n  - If the value has a `toJSON()` method, it's responsible to define what data will be serialized. Instead of the object being serialized, the value returned by the `toJSON()` method when called will be serialized. `JSON.stringify()` calls `toJSON` with one parameter, the `key`, which has the same semantic as the `key` parameter of the [`replacer`](#the-replacer-parameter) function:\n\n    - if this object is a property value, the property name\n    - if it is in an array, the index in the array, as a string\n    - if `JSON.stringify()` was directly called on this object, an empty string\n\n    `Date` objects implement the [`toJSON()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toJSON) method which returns a string (the same as [`date.toISOString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)). Thus, they will be stringified as strings.\n\n  - Only [enumerable own properties](https://developer.mozilla.org/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) are visited. This means [Map](../../globals/Map/Map.mdx), [Set](../../globals/Set/Set.mdx), etc. will become `\"{}\"`. You can use the [`replacer`](#the-replacer-parameter) parameter to serialize them to something more useful.\n\n    Properties are visited using the same algorithm as [`Object.keys()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/keys), which has a well-defined order and is stable across implementations. For example, `JSON.stringify` on the same object will always produce the same string, and `JSON.parse(JSON.stringify(obj))` would produce an object with the same key ordering as the original (assuming the object is completely JSON-serializable).\n\n### The replacer parameter\n\nThe `replacer` parameter can be either a function or an array.\n\nAs an array, its elements indicate the names of the properties in the object that should be included in the resulting JSON string. Only string and number values are taken into account; symbol keys are ignored.\n\nAs a function, it takes two parameters: the `key` and the `value` being stringified. The object in which the key was found is provided as the `replacer`'s `this` context.\n\nThe `replacer` function is called for the initial object being stringified as well, in which case the `key` is an empty string (`\"\"`). It is then called for each property on the object or array being stringified. Array indices will be provided in its string form as `key`. The current property value will be replaced with the `replacer`'s return value for stringification. This means:\n\n- If you return a number, string, boolean, or `null`, that value is directly serialized and used as the property's value. (Returning a BigInt will throw as well.)\n- If you return a `Function`, `Symbol`, or [`undefined`](../../globals/undefined.mdx), the property is not included in the output.\n- If you return any other object, the object is recursively stringified, calling the `replacer` function on each property.\n\n> **Note:** When parsing JSON generated with `replacer` functions, you would likely want to use the [`reviver`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#using_the_reviver_parameter) parameter to perform the reverse operation.\n\nTypically, array elements' index would never shift (even when the element is an invalid value like a function, it will become `null` instead of omitted). Using the `replacer` function allows you to control the order of the array elements by returning a different array.\n\n### The space parameter\n\nThe `space` parameter may be used to control spacing in the final string.\n\n- If it is a number, successive levels in the stringification will each be indented by this many space characters.\n- If it is a string, successive levels will be indented by this string.\n\nEach level of indentation will never be longer than 10. Number values of `space` are clamped to 10, and string values are truncated to 10 characters.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Map/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get Map\\[Symbol.species]\n\nThe **`Map[Symbol.species]`** accessor property is an unused accessor property specifying how to copy `Map` objects.\n\n## Syntax\n\n```js\nMap[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct copied `Map` instances.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `Map` objects. Subclass constructors may override it to change the constructor assignment.\n\n> **Note:** This property is currently unused by all `Map` methods.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Map/Map.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map()\n\nThe **`Map()` constructor** creates [Map](../../globals/Map/Map.mdx) objects.\n\n## Syntax\n\n```js\nnew Map()\nnew Map(iterable)\n```\n\n> **Note:** `Map()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable` _**optional**_\n  - : An `Array` or other\n    [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) object\n    whose elements are key-value pairs. (For example, arrays with two elements,\n    such as `[[ 1, 'one' ],[ 2, 'two' ]]`.) Each key-value pair is added to the\n    new `Map`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Map/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype\\[Symbol.iterator]()\n\nThe **`Symbol.iterator`** method of a `Map` object implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows maps to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the key-value pairs of the map.\n\nThe initial value of this property is the same function object as the initial value of the [`Map.prototype.entries`](../../../globals/Map/prototype/entries.mdx) property.\n\n## Syntax\n\n```js\nmap[Symbol.iterator]()\n```\n\n### Return value\n\nThe same return value as [`Map.prototype.entries()`](../../../globals/Map/prototype/entries.mdx): a new iterable iterator object that yields the key-value pairs of the map.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Map/prototype/clear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.clear()\n\nThe **`clear()`** method removes all elements from a `Map` object.\n\n## Syntax\n\n```js\nclear()\n```\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Map/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.delete()\n\nThe **`delete()`** method removes the specified element from a `Map` object by\nkey.\n\n## Syntax\n\n```js\ndelete(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to remove from the `Map` object.\n\n### Return value\n\n`true` if an element in the `Map` object existed and has been removed, or\n`false` if the element does not exist.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Map/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.entries()\n\nThe **`entries()`** method returns a new\n_[iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators)_ object\nthat contains the `[key, value]` pairs for each element in the `Map` object in\ninsertion order. In this particular case, this iterator object is also an\niterable, so the for-of loop can be used. When the protocol `[Symbol.iterator]`\nis used, it returns a function that, when invoked, returns this iterator itself.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nA new [Map](../../../globals/Map/Map.mdx) iterator object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Map/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.forEach()\n\nThe **`forEach()`** method executes a provided function once per each key/value\npair in the `Map` object, in insertion order.\n\n## Syntax\n\n```js\n// Arrow function\nforEach(() => { /* … */ } )\nforEach((value) => { /* … */ } )\nforEach((value, key) => { /* … */ } )\nforEach((value, key, map) => { /* … */ } )\n\n// Callback function\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n\n// Inline callback function\nforEach(function() { /* … */ })\nforEach(function(value) { /* … */ })\nforEach(function(value, key) { /* … */ })\nforEach(function(value, key, map) { /* … */ })\nforEach(function(value, key, map) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n  - : Function to execute for each entry in the map. It takes the following\n    arguments:\n    - `value` _**optional**_\n      - : Value of each iteration.\n    - `key` _**optional**_\n      - : Key of each iteration.\n    - `map` _**optional**_\n      - : The map being iterated.\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `callback`.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n## Description\n\nThe `forEach` method executes the provided `callback` once for each key of the\nmap which actually exist. It is not invoked for keys which have been deleted.\nHowever, it is executed for values which are present but have the value\n`undefined`.\n\n`callback` is invoked with **three arguments**:\n\n- the entry's `value`\n- the entry's `key`\n- the **`Map` object** being traversed\n\nIf a `thisArg` parameter is provided to `forEach`, it will be passed to\n`callback` when invoked, for use as its `this` value. Otherwise, the value\n`undefined` will be passed for use as its `this` value. The `this` value\nultimately observable by `callback` is determined according to\n[the usual rules for determining the `this` seen by a function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this).\n\nEach value is visited once, except in the case when it was deleted and re-added\nbefore `forEach` has finished. `callback` is not invoked for values deleted\nbefore being visited. New values added before `forEach` has finished will be\nvisited.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Map/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.get()\n\nThe **`get()`** method returns a specified element from a `Map` object. If the\nvalue that is associated to the provided key is an object, then you will get a\nreference to that object and any change made to that object will effectively\nmodify it inside the `Map` object.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to return from the `Map` object.\n\n### Return value\n\nThe element associated with the specified key, or\n[`undefined`](../../../globals/undefined.mdx) if the key can't be found in the `Map` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Map/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.has()\n\nThe **`has()`** method returns a boolean indicating whether an element with the\nspecified key exists or not.\n\n## Syntax\n\n```js\nhas(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to test for presence in the `Map` object.\n\n### Return value\n\n`true` if an element with the specified key exists in the `Map` object;\notherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Map/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.keys()\n\nThe **`keys()`** method returns a new\n_[iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators)_ object\nthat contains the keys for each element in the `Map` object in insertion order. In this particular case, this iterator object is also an iterable, so a [for...of](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loop can be used.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nA new [Map](../../../globals/Map/Map.mdx) iterator object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Map/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.set()\n\nThe **`set()`** method adds or updates an entry in a `Map` object with a specified key and a value.\n\n## Syntax\n\n```js\nset(key, value)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to add to the `Map` object. The key may be any [JavaScript type](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures) (any [primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_values) or any type of [JavaScript object](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#objects)).\n- `value`\n  - : The value of the element to add to the `Map` object. The value may be any [JavaScript type](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures) (any [primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_values) or any type of [JavaScript object](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#objects)).\n\n### Return value\n\nThe `Map` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Map/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.size\n\nThe **`size`** accessor property returns the number of elements in a\n[Map](../../../globals/Map/Map.mdx) object.\n\n## Description\n\nThe value of `size` is an integer representing how many entries the `Map` object\nhas. A set accessor function for `size` is `undefined`; you can not change this\nproperty.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Map/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.values()\n\nThe **`values()`** method returns a new\n_[iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators)_ object\nthat contains the values for each element in the `Map` object in insertion\norder.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nA new [Map](../../../globals/Map/Map.mdx) iterator object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/E.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.E\n\nThe **`Math.E`** property represents Euler's number, the base of natural logarithms, e, which is approximately 2.718.\n\n## Value\n\n`2.718281828459045`\n\n## Description\n\nBecause `E` is a static property of `Math`, you always use it as `Math.E`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/LN10.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LN10\n\nThe **`Math.LN10`** property represents the natural logarithm of 10, approximately 2.302.\n\n## Value\n\n`2.302585092994046`\n\n## Description\n\nBecause `LN10` is a static property of `Math`, you always use it as `Math.LN10`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/LN2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LN2\n\nThe **`Math.LN2`** property represents the natural logarithm of 2, approximately 0.693:\n\n## Value\n\n`0.6931471805599453`\n\n## Description\n\nBecause `LN2` is a static property of `Math`, you always use it as `Math.LN2`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/LOG10e.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LOG10E\n\nThe **`Math.LOG10E`** property represents the base 10 logarithm of [E](./E.mdx), approximately 0.434.\n\n## Value\n\n`0.4342944819032518`\n\n## Description\n\nBecause `LOG10E` is a static property of `Math`, you always use it as `Math.LOG10E`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/LOG2e.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LOG2E\n\nThe **`Math.LOG2E`** property represents the base 2 logarithm of [E](./E.mdx), approximately 1.442.\n\n## Value\n\n`1.4426950408889634`\n\n## Description\n\nBecause `LOG2E` is a static property of `Math`, you always use it as `Math.LOG2E`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/PI.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.PI\n\nThe **`Math.PI`** property represents the ratio of the circumference of a circle to its diameter, approximately 3.14159.\n\n## Value\n\n`3.141592653589793`\n\n## Description\n\nBecause `PI` is a static property of `Math`, you always use it as `Math.PI`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/SQRT1_2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.SQRT1_2\n\nThe **`Math.SQRT1_2`** property represents the square root of 1/2, which is approximately 0.707.\n\n## Value\n\n`0.7071067811865476`\n\n## Description\n\n`Math.SQRT1_2` is a constant and a more performant equivalent to [`Math.sqrt(0.5)`](./sqrt.mdx).\n\nBecause `SQRT1_2` is a static property of `Math`, you always use it as `Math.SQRT1_2`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/SQRT2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.SQRT2\n\nThe **`Math.SQRT2`** property represents the square root of 2, approximately 1.414.\n\n## Value\n\n`0.7071067811865476`\n\n## Description\n\n`Math.SQRT2` is a constant and a more performant equivalent to [`Math.sqrt(2)`](./sqrt.mdx).\n\nBecause `SQRT2` is a static property of `Math`, you always use it as `Math.SQRT2`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/abs.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.abs()\n\nThe **`Math.abs()`** function returns the absolute value of a number.\n\n\n## Syntax\n\n```js\nMath.abs(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe absolute value of `x`. If `x` is negative (including `-0`), returns `-x`. Otherwise, returns `x`. The result is therefore always a positive number or `0`.\n\n## Description\n\nBecause `abs()` is a static method of `Math`, you always use it as `Math.abs()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/acos.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.acos()\n\nThe **`Math.acos()`** function returns the inverse cosine (in radians) of a number.\n\n## Syntax\n\n```js\nMath.acos(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number between -1 and 1, inclusive, representing the angle's cosine value.\n\n### Return value\n\nThe inverse cosine (angle in radians between 0 and π, inclusive) of `x`. If `x` is less than -1 or greater than 1, returns `NaN`.\n\n## Description\n\nBecause `acos()` is a static method of `Math`, you always use it as `Math.acos()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/acosh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.acosh()\n\nThe **`Math.acosh()`** function returns the inverse hyperbolic cosine of a number.\n\n## Syntax\n\n```js\nMath.acosh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 1.\n\n### Return value\n\nThe inverse hyperbolic cosine of `x`. If `x` is less than 1, returns `NaN`.\n\n## Description\n\nBecause `acosh()` is a static method of `Math`, you always use it as `Math.acosh()`, rather than as a method of a `Math` object you created (`Math` is no constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/asin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.asin()\n\nThe **`Math.asin()`** function returns the inverse sine (in radians) of a number.\n\n## Syntax\n\n```js\nMath.asin(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number between -1 and 1, inclusive, representing the angle's sine value.\n\n### Return value\n\nThe inverse sine (angle in radians between <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math>, inclusive) of `x`. If `x` is less than -1 or greater than 1, returns `NaN`.\n\n## Description\n\nBecause `asin()` is a static method of `Math`, you always use it as `Math.asin()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/asinh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.asinh()\n\nThe **`Math.asinh()`** function returns the inverse hyperbolic sine of a number. \n\n## Syntax\n\n```js\nMath.asinh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe inverse hyperbolic sine of `x`.\n\n## Description\n\nBecause `asinh()` is a static method of `Math`, you always use it as `Math.asinh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/atan.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.atan()\n\nThe **`Math.atan()`** function returns the inverse tangent (in radians) of a number.\n\n## Syntax\n\n```js\nMath.atan(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe inverse tangent (angle in radians between <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math> and <math><semantics><mfrac><mi>π</mi><mn>2</mn></mfrac></semantics></math>, inclusive) of `x`. If `x` is `Infinity`, it returns <math><semantics><mfrac><mi>π</mi><mn>2</mn></mfrac></semantics></math>. If `x` is `-Infinity`, it returns <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math>.\n\n## Description\n\nBecause `atan()` is a static method of `Math`, you always use it as `Math.atan()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/atan2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.atan2()\n\nThe **`Math.atan2()`** function returns the angle in the plane (in radians) between the positive x-axis and the ray from (0, 0) to the point (x, y), for `Math.atan2(y, x)`.\n\n## Syntax\n\n```js\nMath.atan2(y, x)\n```\n\n### Parameters\n\n- `y`\n  - : The y coordinate of the point.\n- `x`\n  - : The x coordinate of the point.\n\n### Return value\n\nThe angle in radians (between -π and π, inclusive) between the positive x-axis and the ray from (0, 0) to the point (x, y).\n\n## Description\n\nThe `Math.atan2()` method measures the counterclockwise angle θ, in radians, between the positive x-axis and the point `(x, y)`. Note that the arguments to this function pass the y-coordinate first and the x-coordinate second.\n\n`Math.atan2()` is passed separate `x` and `y` arguments, while [`Math.atan()`](./atan.mdx) is passed the ratio of those two arguments. `Math.atan2(y, x)` differs from `Math.atan(y / x)` in the following cases:\n\n| `x`                  | `y`         | `Math.atan2(y, x)` | `Math.atan(y / x)` |\n| -------------------- | ----------- | ------------------ | ------------------ |\n| `Infinity`           | `Infinity`  | π / 4              | `NaN`              |\n| `Infinity`           | `-Infinity` | -π / 4             | `NaN`              |\n| `-Infinity`          | `Infinity`  | 3π / 4             | `NaN`              |\n| `-Infinity`          | `-Infinity` | -3π / 4            | `NaN`              |\n| 0                    | 0           | 0                  | `NaN`              |\n| 0                    | -0          | -0                 | `NaN`              |\n| < 0 (including `-0`) | 0           | π                  | 0                  |\n| < 0 (including `-0`) | -0          | -π                 | 0                  |\n| `-Infinity`          | > 0         | π                  | -0                 |\n| -0                   | > 0         | π / 2              | -π / 2             |\n| `-Infinity`          | < 0         | -π                 | 0                  |\n| -0                   | < 0         | -π / 2             | π / 2              |\n\nIn addition, for points in the second and third quadrants (`x < 0`), `Math.atan2()` would output an angle less than <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math>.\n\nBecause `atan2()` is a static method of `Math`, you always use it as `Math.atan2()`, rather than as a method of a `Math` object you created (`Math` is not a constructor)."
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/atanh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.atanh()\n\nThe **`Math.atanh()`** function returns the inverse hyperbolic tangent of a number. \n\n## Syntax\n\n```js\nMath.atanh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number between -1 and 1, inclusive.\n\n### Return value\n\nThe inverse hyperbolic tangent of `x`. If `x` is 1, returns `Infinity`. If `x` is -1, returns `-Infinity`. If `x` is less than -1 or greater than 1, returns `NaN`.\n\n## Description\n\nBecause `atanh()` is a static method of `Math`, you always use it as `Math.atanh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/cbrt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.cbrt()\n\nThe **`Math.cbrt()`** function returns the cube root of a number.\n\n## Syntax\n\n```js\nMath.cbrt(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe cube root of `x`.\n\n## Description\n\nBecause `cbrt()` is a static method of `Math`, you always use it as `Math.cbrt()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/ceil.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.ceil()\n\nThe **`Math.ceil()`** function always rounds up and returns the smaller integer greater than or equal to a given number.\n\n## Syntax\n\n```js\nMath.ceil(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe smallest integer greater than or equal to `x`. It's the same value as [`-Math.floor(-x)`](./floor.mdx).\n\n## Description\n\nBecause `ceil()` is a static method of `Math`, you always use it as `Math.ceil()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/clz32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.clz32()\n\nThe **`Math.clz32()`** function returns the number of leading zero bits in the 32-bit binary representation of a number.\n\n## Syntax\n\n```js\nMath.clz32(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe number of leading zero bits in the 32-bit binary representation of `x`.\n\n## Description\n\n`clz32` is short for **C**ount**L**eading**Z**eros**32**.\n\nIf `x` is not a number, it will be converted to a number first, then converted to a 32-bit unsigned integer.\n\nIf the converted 32-bit unsigned integer is `0`, `32` is returned, because all bits are `0`. If the most significant bit is `1` (i.e. the number is greater than or equal to 2<sup>31</sup>), `0` is returned.\n\nThis function is particularly useful for systems that compile to JS, like [Emscripten](https://emscripten.org).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/cos.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.cos()\n\nThe **`Math.cos()`** function returns the cosine of a number in radians.\n\n## Syntax\n\n```js\nMath.cos(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number representing an angle in radians.\n\n### Return value\n\nThe cosine of `x`, between -1 and 1, inclusive. If `x` is `Infinity`, `-Infinity`, or `NaN`, returns `NaN`.\n\n## Description\n\nBecause `cos()` is a static method of `Math`, you always use it as `Math.cos()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/cosh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.cosh()\n\nThe **`Math.cosh()`** function returns the hyperbolic cosine of a number. \n\n## Syntax\n\n```js\nMath.cosh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe hyperbolic cosine of `x`.\n\n## Description\n\nBecause `cosh()` is a static method of `Math`, you always use it as `Math.cosh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor)."
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/exp.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.exp()\n\nThe **`Math.exp()`** function returns [E](./E.mdx) raised to the power of a number.\n\n## Syntax\n\n```js\nMath.exp(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nA nonnegative number representing e<sup>x</sup>, where e is [the base of the natural logarithm](./E.mdx).\n\n## Description\n\nBecause `exp()` is a static method of `Math`, you always use it as `Math.exp()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nBeware that `e` to the power of a number very close to 0 will be very close to 1 and suffer from loss of precision. In this case, you may want to use `Math.expm1` instead, and obtain a much higher-precision fractional part of the answer.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/expm1.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.expm1()\n\nThe **`Math.expm1()`** function returns [E](./E.mdx) raised to the power of a number, subtracted by 1.\n\n## Syntax\n\n```js\nMath.expm1(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nA number representing e<sup>x</sup> - 1, where e is [the base of the natural logarithm](./E.mdx).\n\n## Description\n\nFor very small values of _x_, adding 1 can reduce or eliminate precision. The double floats used in JS give you about 15 digits of precision. 1 + 1e-15 \\= 1.000000000000001, but 1 + 1e-16 = 1.000000000000000 and therefore exactly 1.0 in that arithmetic, because digits past 15 are rounded off.\n\nWhen you calculate <math display=\"inline\"><semantics><msup><mi mathvariant=\"normal\">e</mi><mi>x</mi></msup></semantics></math>. If you calculate `Math.exp(1.1111111111e-15) - 1`, you should get an answer close to `1.1111111111e-15`. Instead, due to the highest significant figure in the result of `Math.exp` being the units digit `1`, the final value ends up being `1.1102230246251565e-15`, with only 3 correct digits. If, instead, you calculate `Math.exp1m(1.1111111111e-15)`, you will get a much more accurate answer `1.1111111111000007e-15`, with 11 correct digits of precision.\n\nBecause `expm1()` is a static method of `Math`, you always use it as `Math.expm1()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/floor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.floor()\n\nThe **`Math.floor()`** function always rounds down and returns the largest integer less than or equal to a given number.\n\n## Syntax\n\n```js\nMath.floor(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe largest integer smaller than or equal to `x`. It's the same value as [`-Math.ceil(-x)`](./ceil.mdx).\n\n## Description\n\nBecause `floor()` is a static method of `Math`, you always use it as `Math.floor()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/fround.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.fround()\n\nThe **`Math.fround()`** function returns the nearest [32-bit single precision](https://en.wikipedia.org/wiki/Single-precision_floating-point_format) float representation of a number.\n\n## Syntax\n\n```js\nMath.fround(doubleFloat)\n```\n\n### Parameters\n\n- `doubleFloat`\n  - : A number.\n\n### Return value\n\nThe nearest [32-bit single precision](https://en.wikipedia.org/wiki/Single-precision_floating-point_format) float representation of `x`.\n\n## Description\n\nJavaScript uses 64-bit double floating-point numbers internally, which offer a very high precision. However, sometimes you may be working with 32-bit floating-point numbers, for example if you are reading values from a `Float32Array`. This can create confusion: checking a 64-bit float and a 32-bit float for equality may fail even though the numbers are seemingly identical.\n\nTo solve this, `Math.fround()` can be used to cast the 64-bit float to a 32-bit float. Internally, JavaScript continues to treat the number as a 64-bit float, it just performs a \"round to even\" on the 23rd bit of the mantissa, and sets all following mantissa bits to `0`. If the number is outside the range of a 32-bit float, `Infinity` or `-Infinity` is returned.\n\nBecause `fround()` is a static method of `Math`, you always use it as `Math.fround()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/hypot.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.hypot()\n\nThe **`Math.hypot()`** function returns the square root of the sum of squares of its arguments. \n\n## Syntax\n\n```js\nMath.hypot()\nMath.hypot(value0)\nMath.hypot(value0, value1)\nMath.hypot(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `value1`, …, `valueN`\n  - : Numbers.\n\n### Return value\n\nThe square root of the sum of squares of the given arguments. Returns Infinity if any of the arguments is ±Infinity. Otherwise, if at least one of the arguments is or is converted to NaN, returns NaN. Returns `0` if no arguments are given or all arguments are ±0.\n\n## Description\n\nCalculating the hypotenuse of a right triangle, or the magnitude of a complex number, uses the formula `Math.sqrt(v1*v1 + v2*v2)`, where v1 and v2 are the lengths of the triangle's legs, or the complex number's real and complex components. The corresponding distance in 2 or more dimensions can be calculated by adding more squares under the square root: `Math.sqrt(v1*v1 + v2*v2 + v3*v3 + v4*v4)`.\n\nThis function makes this calculation easier and faster; you call `Math.hypot(v1, v2)`, or `Math.hypot(v1, /* … ,*/, vN)`.\n\n`Math.hypot` also avoids overflow/underflow problems if the magnitude of your numbers is very large. The largest number you can represent in JS is [`Number.MAX_VALUE`](../Number/MAX_VALUE.mdx), which is around 10<sup>308</sup>. If your numbers are larger than about 10<sup>154</sup>, taking the square of them will result in Infinity. For example, `Math.sqrt(1e200*1e200 + 1e200*1e200) = Infinity`. If you use `hypot()` instead, you get a better answer: `Math.hypot(1e200, 1e200) = 1.4142...e+200` . This is also true with very small numbers. `Math.sqrt(1e-200*1e-200 + 1e-200*1e-200) = 0`, but `Math.hypot(1e-200, 1e-200) = 1.4142...e-200`.\n\nWith one argument, `Math.hypot()` is equivalent to [`Math.abs()`](./abs.mdx). [`Math.hypot.length`](../Function/prototype/length.mdx) is 2, which weakly signals that it's designed to handle at least two parameters.\n\nBecause `hypot()` is a static method of `Math`, you always use it as `Math.hypot()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/imul.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.imul()\n\nThe **`Math.imul()`** function returns the result of the C-like 32-bit multiplication of the two parameters.\n\n\n## Syntax\n\n```js\nMath.imul(a, b)\n```\n\n### Parameters\n\n- `a`\n  - : First number.\n- `b`\n  - : Second number.\n\n### Return value\n\nThe result of the C-like 32-bit multiplication of the given arguments.\n\n## Description\n\n`Math.imul()` allows for 32-bit integer multiplication with C-like semantics. This feature is useful for projects like [Emscripten](https://en.wikipedia.org/wiki/Emscripten).\n\nBecause `imul()` is a static method of `Math`, you always use it as `Math.imul()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nIf you use normal JavaScript floating point numbers in `imul()`, you will experience a degrade in performance. This is because of the costly conversion from a floating point to an integer for multiplication, and then converting the multiplied integer back into a floating point.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/log.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log()\n\nThe **`Math.log()`** function returns the natural logarithm (base [E](./E.mdx)) of a number.\n\n## Syntax\n\n```js\nMath.log(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe natural logarithm (base [E](./E.mdx)) of `x`. If `x` is ±0, returns [`-Infinity`](../Number/NEGATIVE_INFINITY.mdx). If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `log()` is a static method of `Math`, you always use it as `Math.log()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nIf you need the natural log of 2 or 10, use the constants `Math.LN2` or `Math.LN10`. If you need a logarithm to base 2 or 10, use `Math.log2()` or `Math.log10()`. If you need a logarithm to other bases, use `Math.log(x) / Math.log(otherBase)` as in the example below; you might want to precalculate `1 / Math.log(otherBase)` since multiplication in `Math.log(x) * constant` is much faster.\n\nBeware that positive numbers very close to 1 can suffer from loss of precision and make its natural logarithm less accurate. In this case, you may want to use `Math.log1p` instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/log10.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log10()\n\nThe **`Math.log10()`** function returns the base 10 logarithm of a number. \n\n## Syntax\n\n```js\nMath.log10(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe base 10 logarithm of `x`. If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `log10()` is a static method of `Math`, you always use it as `Math.log10()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nThis function is the equivalent of `Math.log(x) / Math.log(10)`. For `log10(e)`, use the constant `Math.LOG10E`, which is 1 / `Math.LN10`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/log1p.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log1p()\n\nThe **`Math.log1p()`** function returns the natural logarithm (base [E](./E.mdx)) of `1 + x`, where `x` is the argument.\n\n## Syntax\n\n```js\nMath.log1p(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to -1.\n\n### Return value\n\nThe natural logarithm (base [E](./E.mdx)) of `x + 1`. If `x` is -1, returns [`-Infinity`](../Number/NEGATIVE_INFINITY.mdx). If `x < -1`, returns `NaN`.\n\n## Description\n\nFor very small values of _x_, adding 1 can reduce or eliminate precision. The double floats used in JS give you about 15 digits of precision. 1 + 1e-15 \\= 1.000000000000001, but 1 + 1e-16 = 1.000000000000000 and therefore exactly 1.0 in that arithmetic, because digits past 15 are rounded off.\n\nWhen you calculate log(1 + _x_) where _x_ is a small positive number, you should get an answer very close to _x_, because <math display=\"inline\"><semantics><mrow><munder><mo movablelimits=\"true\" form=\"prefix\">lim</mo><mrow ><mi>x</mi><mo stretchy=\"false\">→</mo><mn>0</mn></mrow></munder><mfrac><mrow><mi>log</mi><mo>⁡</mo><mo stretchy=\"false\">(</mo><mn>1</mn><mo>+</mo><mi>x</mi><mo stretchy=\"false\">)</mo></mrow><mi>x</mi></mfrac><mo>=</mo><mn>1</mn></mrow></semantics></math>. If you calculate `Math.log(1 + 1.1111111111e-15)`, you should get an answer close to `1.1111111111e-15`. Instead, you will end up taking the logarithm of `1.00000000000000111022` (the roundoff is in binary, so sometimes it gets ugly), and get the answer 1.11022…e-15, with only 3 correct digits. If, instead, you calculate `Math.log1p(1.1111111111e-15)`, you will get a much more accurate answer `1.1111111110999995e-15`, with 15 correct digits of precision (actually 16 in this case).\n\nIf the value of `x` is less than -1, the return value is always `NaN`.\n\nBecause `log1p()` is a static method of `Math`, you always use it as `Math.log1p()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/log2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log2()\n\nThe **`Math.log2()`** function returns the base 2 logarithm of a number.\n\n## Syntax\n\n```js\nMath.log2(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe base 2 logarithm of `x`. If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `log2()` is a static method of `Math`, you always use it as `Math.log2()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nThis function is the equivalent of `Math.log(x) / Math.log(2)`. For `log2(e)`, use the constant `Math.LOG2E`, which is 1 / `Math.LN2`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/max.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.max()\n\nThe **`Math.max()`** function returns the largest of the numbers given as input parameters, or `-Infinity` if there are no parameters.\n\n## Syntax\n\n```js\nMath.max()\nMath.max(value0)\nMath.max(value0, value1)\nMath.max(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `value1`, `value2`, … , `valueN`\n  - : Zero or more numbers among which the largest value will be selected and returned.\n\n### Return value\n\nThe largest of the given numbers. Returns `NaN` if any of the parameters is or is converted into `NaN`. Returns `-Infinity` if no parameters are provided.\n\n## Description\n\nBecause `max()` is a static method of `Math`, you always use it as `Math.max()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n[`Math.max.length`](../Function/prototype/length.mdx) is 2, which weakly signals that it's designed to handle at least two parameters.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/min.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.min()\n\nThe **`Math.min()`** function returns the smallest of the numbers given as input parameters, or `Infinity` if there are no parameters.\n\n## Syntax\n\n```js\nMath.min()\nMath.min(value0)\nMath.min(value0, value1)\nMath.min(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `value1`, …, `valueN`\n  - : Zero or more numbers among which the lowest value will be selected and returned.\n\n### Return value\n\nThe smallest of the given numbers. Returns `NaN` if any of the parameters is or is converted into `NaN`. Returns `Infinity` if no parameters are provided.\n\n## Description\n\nBecause `min()` is a static method of `Math`, you always use it as `Math.min()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n[`Math.min.length`](../Function/prototype/length.mdx) is 2, which weakly signals that it's designed to handle at least two parameters.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/pow.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.pow()\n\nThe **`Math.pow()`** method returns the value of a base raised to a power.\n\n## Syntax\n\n```js\nMath.pow(base, exponent)\n```\n\n### Parameters\n\n- `base`\n  - : The base number.\n- `exponent`\n  - : The exponent number.\n\n### Return value\n\nA number representing `base` taken to the power of `exponent`. Returns `NaN` in one of the following cases:\n\n- `exponent` is `NaN`.\n- `base` is `NaN` and `exponent` is not `0`.\n- `base` is ±1 and `exponent` is ±`Infinity`.\n- `base < 0` and `exponent` is not an integer.\n\n## Description\n\n`Math.pow()` is equivalent to the `**` operator, except `Math.pow()` only accepts numbers.\n\n`Math.pow(NaN, 0)` (and the equivalent `NaN ** 0`) is the only case where `NaN` doesn't propagate through mathematical operations — it returns `1` despite the operand being `NaN`. In addition, the behavior where `base` is 1 and `exponent` is non-finite (±Infinity or `NaN`) is different from IEEE 754, which specifies that the result should be 1, whereas JavaScript returns `NaN` to preserve backward compatibility with its original behavior.\n\nBecause `pow()` is a static method of `Math`, use it as `Math.pow()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/random.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.random()\n\nThe **`Math.random()`** function returns a floating-point, pseudo-random number that's greater than or equal to 0 and less than 1, with approximately uniform distribution over that range — which you can then scale to your desired range. The implementation selects the initial seed to the random number generation algorithm; it cannot be chosen or reset by the user.\n\n> **Note:** `Math.random()` _does not_ provide cryptographically secure random numbers. Do not use them for anything related to security. Use the Web Crypto API instead, and more precisely the `crypto.getRandomValues()` method.\n\n## Syntax\n\n```js\nMath.random()\n```\n\n### Return value\n\nA floating-point, pseudo-random number between 0 (inclusive) and 1 (exclusive).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/round.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.round()\n\nThe **`Math.round()`** function returns the value of a number rounded to the nearest integer.\n\n## Syntax\n\n```js\nMath.round(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe value of `x` rounded to the nearest integer.\n\n## Description\n\nIf the fractional portion of the argument is greater than 0.5, the argument is rounded to the integer with the next higher absolute value. If it is less than 0.5, the argument is rounded to the integer with the lower absolute value. If the fractional portion is exactly 0.5, the argument is rounded to the next integer in the direction of +∞.\n\n> **Note:** This differs from many languages' `round()` functions, which often round half-increments _away from zero_, giving a different result in the case of negative numbers with a fractional part of exactly 0.5.\n\n`Math.round(x)` is not exactly the same as [`Math.floor(x + 0.5)`](./floor.mdx). When `x` is -0, or -0.5 ≤ x < 0, `Math.round(x)` returns -0, while `Math.floor(x + 0.5)` returns 0. However, neglecting that difference and potential precision errors, `Math.round(x)` and `Math.floor(x + 0.5)` are generally equivalent.\n\nBecause `round()` is a static method of `Math`, you always use it as `Math.round()`, rather than as a method of a `Math` object you created (`Math` has no constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/sign.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sign()\n\nThe **`Math.sign()`** function returns 1 or -1, indicating the sign of the number passed as argument. If the input is 0 or -0, it will be returned as-is.\n\n## Syntax\n\n```js\nMath.sign(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nA number representing the sign of `x`:\n\n- If `x` is positive, returns `1`.\n- If `x` is negative, returns `-1`.\n- If `x` is positive zero, returns `0`.\n- If `x` is negative zero, returns `-0`.\n- Otherwise, returns `NaN`.\n\n## Description\n\nBecause `sign()` is a static method of `Math`, you always use it as `Math.sign()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/sin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sin()\n\nThe **`Math.sin()`** function returns the sine of a number in radians.\n\n## Syntax\n\n```js\nMath.sin(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number representing an angle in radians.\n\n### Return value\n\nThe sine of `x`, between -1 and 1, inclusive. If `x` is `Infinity`, `-Infinity`, or `NaN`, returns `NaN`.\n\n## Description\n\nBecause `sin()` is a static method of `Math`, you always use it as `Math.sin()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/sinh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sinh()\n\nThe **`Math.sinh()`** function returns the hyperbolic sine of a number. \n\n## Syntax\n\n```js\nMath.sinh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe hyperbolic sine of `x`.\n\n## Description\n\nBecause `sinh()` is a static method of `Math`, you always use it as `Math.sinh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/sqrt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sqrt()\n\nThe **`Math.sqrt()`** function returns the square root of a number.\n\n## Syntax\n\n```js\nMath.sqrt(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe square root of `x`, a nonnegative number. If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `sqrt()` is a static method of `Math`, you always use it as `Math.sqrt()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/tan.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.tan()\n\nThe **`Math.tan()`** function returns the tangent of a number in radians.\n\n\n## Syntax\n\n```js\nMath.tan(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number representing an angle in radians.\n\n### Return value\n\nThe tangent of `x`. If `x` is `Infinity`, `-Infinity`, or `NaN`, returns `NaN`.\n\n> **Note:** Due to floating point precision, it's not possible to obtain the exact value π/2, so the result is always finite if not `NaN`.\n\n## Description\n\nBecause `tan()` is a static method of `Math`, you always use it as `Math.tan()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/tanh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.tanh()\n\nThe **`Math.tanh()`** function returns the hyperbolic tangent of a number. \n\n## Syntax\n\n```js\nMath.tanh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe hyperbolic tangent of `x`.\n\n## Description\n\nBecause `tanh()` is a static method of `Math`, you always use it as `Math.tanh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Math/trunc.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.trunc()\n\nThe **`Math.trunc()`** function returns the integer part of a number by removing any fractional digits.\n\n## Syntax\n\n```js\nMath.trunc(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe integer part of `x`.\n\n## Description\n\nUnlike the other three `Math` methods: `Math.floor()`, `Math.ceil()` and `Math.round()`, the way `Math.trunc()` works is very simple. It _truncates_ (cuts off) the dot and the digits to the right of it, no matter whether the argument is a positive or negative number.\n\nBecause `trunc()` is a static method of `Math`, you always use it as `Math.trunc()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/NaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# NaN\n\nThe global **`NaN`** property is a value representing Not-A-Number.\n\n## Value\n\nThe same number value as [`Number.NaN`](./Number/NaN.mdx).\n\n## Description\n\n`NaN` is a property of the _global object_. In other words, it is a variable in global scope.\n\nIn modern browsers, `NaN` is a non-configurable, non-writable property. Even when this is not the case, avoid overriding it.\n\nThere are five different types of operations that return `NaN`:\n\n- Failed number conversion (e.g. explicit ones like `parseInt(\"blabla\")`, `Number(undefined)`, or implicit ones like `Math.abs(undefined)`)\n- Math operation where the result is not a real number (e.g. `Math.sqrt(-1)`)\n- Indeterminate form (e.g. `0 * Infinity`, `1 ** Infinity`, `Infinity / Infinity`, `Infinity - Infinity`)\n- A method or expression whose operand is or gets coerced to `NaN` (e.g. `7 ** NaN`, `7 * \"blabla\"`) — this means `NaN` is contagious\n- Other cases where an invalid value is to be represented as a number (e.g. an invalid `new Date(\"blabla\").getTime()`, `\"\".charCodeAt(1)`)\n\n`NaN` and its behaviors are not invented by JavaScript. Its semantics in floating point arithmetic (including that `NaN !== NaN`) are specified by [IEEE 754](https://en.wikipedia.org/wiki/Double_precision_floating-point_format). `NaN`'s behaviors include:\n\n- If `NaN` is involved in a mathematical operation (but not [bitwise operations](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators#bitwise_shift_operators)), the result is usually also `NaN`. (See see [silently escaping NaN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN#silently_escaping_nan) for a counter-example.)\n- When `NaN` is one of the operands of any relational comparison (`>`, `<`, `>=`, `<=`), the result is always `false`.\n- `NaN` compares unequal (via [`==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Equality), [`!=`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Inequality), [`===`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality), and [`!==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_inequality)) to any other value — including to another `NaN` value.\n\n`NaN` is also one of the [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) values in JavaScript.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Number/MAX_SAFE_INTEGER.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MAX_SAFE_INTEGER\n\nThe **`Number.MAX_SAFE_INTEGER`** constant represents the maximum safe integer in JavaScript (2<sup>53</sup> – 1).\n\nFor larger integers, consider using `BigInt`.\n\n## Value\n\n`9007199254740991` (9,007,199,254,740,991, or \\~9 quadrillion).\n\n## Description\n\n[Double precision floating point format](https://en.wikipedia.org/wiki/Double_precision_floating-point_format) only has 52 bits to represent the [mantissa](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_encoding), so it can only safely represent integers between -(2<sup>53</sup> – 1) and 2<sup>53</sup> – 1. \"Safe\" in this context refers to the ability to represent integers exactly and to compare them correctly. For example, `Number.MAX_SAFE_INTEGER + 1 === Number.MAX_SAFE_INTEGER + 2` will evaluate to true, which is mathematically incorrect. See `Number.isSafeInteger()` for more information.\n\nBecause `MAX_SAFE_INTEGER` is a static property of `Number`, you always use it as `Number.MAX_SAFE_INTEGER`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Number/MAX_VALUE.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MAX_VALUE\n\nThe **`Number.MAX_VALUE`** property represents the maximum numeric value representable in JavaScript.\n\n## Value\n\n2<sup>1024</sup> - 1, or approximately `1.7976931348623157E+308`.\n\n## Description\n\nValues larger than `MAX_VALUE` are represented as [`Infinity`](../../globals/Infinity.mdx) and will lose their actual value.\n\nBecause `MAX_VALUE` is a static property of `Number`, you always use it as `Number.MAX_VALUE`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Number/MIN_SAFE_INTEGER.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MIN_SAFE_INTEGER\n\nThe **`Number.MIN_SAFE_INTEGER`** constant represents the minimum safe integer in JavaScript, or -(2<sup>53</sup> - 1).\n\nTo represent integers smaller than this, consider using `BigInt`.\n\n## Value\n\n`-9007199254740991` (-9,007,199,254,740,991, or about -9 quadrillion).\n\n## Description\n\n[Double precision floating point format](https://en.wikipedia.org/wiki/Double_precision_floating-point_format) only has 52 bits to represent the [mantissa](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_encoding), so it can only safely represent integers between -(2<sup>53</sup> – 1) and 2<sup>53</sup> – 1. Safe in this context refers to the ability to represent integers exactly and to correctly compare them. For example, `Number.MIN_SAFE_INTEGER - 1 === Number.MIN_SAFE_INTEGER - 2` will evaluate to true, which is mathematically incorrect. See `Number.isSafeInteger()` for more information.\n\nBecause `MIN_SAFE_INTEGER` is a static property of `Number`, you always use it as `Number.MIN_SAFE_INTEGER`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Number/MIN_VALUE.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MIN_VALUE\n\nThe **`Number.MIN_VALUE`** property represents the smallest positive numeric value representable in JavaScript.\n\n## Value\n\n2<sup>-1074</sup>, or `5E-324`.\n\n## Description\n\n`Number.MIN_VALUE` is the smallest positive number (not the most negative number) that can be represented within float precision — in other words, the number closest to 0. The ECMAScript spec doesn't define a precise value that implementations are required to support — instead the spec says, _\"must be the smallest non-zero positive value that can actually be represented by the implementation\"_. This is because small IEEE-754 floating point numbers are [denormalized](https://en.wikipedia.org/wiki/Subnormal_number), but implementations are not required to support this representation, in which case `Number.MIN_VALUE` may be larger.\n\nIn practice, its precise value in mainstream engines like V8 (used by Chrome, Edge, Node.js), SpiderMonkey (used by Firefox), and JavaScriptCore (used by Safari) is 2<sup>-1074</sup>, or `5E-324`.\n\nBecause `MIN_VALUE` is a static property of `Number`, you always use it as `Number.MIN_VALUE`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Number/NEGATIVE_INFINITY.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.NEGATIVE_INFINITY\n\nThe **`Number.NEGATIVE_INFINITY`** property represents the negative Infinity value.\n\n## Value\n\nThe same as the negative value of the global [`Infinity`](../../globals/Infinity.mdx) property.\n\n## Description\n\nThe `Number.NEGATIVE_INFINITY` value behaves slightly differently than mathematical infinity:\n\n- Any positive value, including `Number.POSITIVE_INFINITY`, multiplied by `Number.NEGATIVE_INFINITY` is `Number.NEGATIVE_INFINITY`.\n- Any negative value, including `Number.NEGATIVE_INFINITY`, multiplied by `Number.NEGATIVE_INFINITY` is `Number.POSITIVE_INFINITY`.\n- Any positive value divided by `Number.NEGATIVE_INFINITY` is [negative zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754)).\n- Any negative value divided by `Number.NEGATIVE_INFINITY` is [positive zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754)).\n- Zero multiplied by `Number.NEGATIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- [`NaN`](../../globals/NaN.mdx) multiplied by `Number.NEGATIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- `Number.NEGATIVE_INFINITY`, divided by any negative value except `Number.NEGATIVE_INFINITY`, is `Number.POSITIVE_INFINITY`.\n- `Number.NEGATIVE_INFINITY`, divided by any positive value except `Number.POSITIVE_INFINITY`, is `Number.NEGATIVE_INFINITY`.\n- `Number.NEGATIVE_INFINITY`, divided by either `Number.NEGATIVE_INFINITY` or `Number.POSITIVE_INFINITY`, is [`NaN`](../../globals/NaN.mdx).\n- `x > Number.NEGATIVE_INFINITY` is true for any number _x_ that isn't `Number.NEGATIVE_INFINITY`.\n\nYou might use the `Number.NEGATIVE_INFINITY` property to indicate an error condition that returns a finite number in case of success. Note, however, that [`NaN`](../../globals/NaN.mdx) would be more appropriate in such a case.\n\nBecause `Number.NEGATIVE_INFINITY` is a static property of `Number`, you always use it as `Number.NEGATIVE_INFINITY`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Number/NaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.NaN\n\nThe **`Number.NaN`** property represents Not-A-Number, which is equivalent to [description for the global property](../../globals/NaN.mdx). For more information about the behaviors of `NaN`, see the [`NaN`](../../globals/NaN.mdx).\n\n## Value\n\nThe number value [`NaN`](../../globals/NaN.mdx).\n\n## Description\n\nBecause `NaN` is a static property of `Number`, you always use it as `Number.NaN`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Number/Number.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number() constructor\n\nThe **`Number()` constructor** creates a `Number` object. When called instead as a function, it performs type conversion to a primitive number, which is usually more useful.\n\n## Syntax\n\n```js\nnew Number(value)\nNumber(value)\n```\n\n> **Note:** `Number()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\n- `value`\n  - : The numeric value of the object being created.\n\n### Return value\n\nWhen `Number` is called as a constructor (with `new`), it creates a `Number` object, which is **not** a primitive.\n\nWhen `Number` is called as a function, it [coerces the parameter to a number primitive](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_coercion). [BigInts](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/BigInt) are converted to numbers. If the value can't be converted, it returns [`NaN`](../../globals/NaN.mdx).\n\n> **Warning:** You should rarely find yourself using `Number` as a constructor.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Number/POSITIVE_INFINITY.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.POSITIVE_INFINITY\n\nThe **`Number.POSITIVE_INFINITY`** property represents the positive Infinity value.\n\n## Value\n\nThe same as the value of the global [`Infinity`](../../globals/Infinity.mdx) property.\n\n## Description\n\nThe `Number.POSITIVE_INFINITY` value behaves slightly differently than mathematical infinity:\n\n- Any positive value, including `Number.POSITIVE_INFINITY`, multiplied by `Number.POSITIVE_INFINITY` is `Number.POSITIVE_INFINITY`.\n- Any negative value, including `Number.NEGATIVE_INFINITY`, multiplied by `Number.POSITIVE_INFINITY` is `Number.NEGATIVE_INFINITY`.\n- Any positive number divided by `Number.POSITIVE_INFINITY` is [positive zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754)).\n- Any negative number divided by `Number.POSITIVE_INFINITY` is [negative zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754).\n- Zero multiplied by `Number.POSITIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- `NaN` multiplied by `Number.POSITIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- `Number.POSITIVE_INFINITY`, divided by any negative value except `Number.NEGATIVE_INFINITY`, is `Number.NEGATIVE_INFINITY`.\n- `Number.POSITIVE_INFINITY`, divided by any positive value except `Number.POSITIVE_INFINITY`, is `Number.POSITIVE_INFINITY`.\n- `Number.POSITIVE_INFINITY`, divided by either `Number.NEGATIVE_INFINITY` or `Number.POSITIVE_INFINITY`, is [`NaN`](../../globals/NaN.mdx).\n- `Number.POSITIVE_INFINITY > x` is true for any number _x_ that isn't `Number.POSITIVE_INFINITY`.\n\nYou might use the `Number.POSITIVE_INFINITY` property to indicate an error condition that returns a finite number in case of success. Note, however, that [`NaN`](../../globals/NaN.mdx) would be more appropriate in such a case.\n\nBecause `Number.POSITIVE_INFINITY` is a static property of `Number`, you always use it as `Number.POSITIVE_INFINITY`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Number/epsilon.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.EPSILON\n\nThe **`Number.EPSILON`** property represents the difference between 1 and the smallest floating point number greater than 1.\n\n## Value\n\n2<sup>-52</sup>, or approximately `2.2204460492503130808472633361816E-16`.\n\n## Description\n\n`Number.EPSILON` is the difference between 1 and the next greater number representable in the Number format, because [double precision floating point format](https://en.wikipedia.org/wiki/Double_precision_floating-point_format) only has 52 bits to represent the [mantissa](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_encoding), and the lowest bit has a significance of 2<sup>-52</sup>.\n\nNote that the absolute accuracy of floating numbers decreases as the number gets larger, because the exponent grows while the mantissa's accuracy stays the same. `Number.MIN_VALUE` is the smallest representable positive number, which is much smaller than `Number.EPSILON`.\n\nBecause `EPSILON` is a static property of `Number`, you always use it as `Number.EPSILON`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Number/isFinite.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isFinite()\n\nThe **`Number.isFinite()`** method determines whether the passed value is a finite number — that is, it checks that a given value is a number, and the number is neither positive [`Infinity`](../../globals/Infinity.mdx), negative `Infinity`, nor [`NaN`](../../globals/NaN.mdx).\n\n## Syntax\n\n```js\nNumber.isFinite(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested for finiteness.\n\n### Return value\n\nThe boolean value `true` if the given value is a finite number. Otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Number/isInteger.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isInteger()\n\nThe **`Number.isInteger()`** method determines whether the passed value is an integer.\n\n## Syntax\n\n```js\nNumber.isInteger(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested for being an integer.\n\n### Return value\n\nThe boolean value `true` if the given value is an integer. Otherwise `false`.\n\n## Description\n\nIf the target value is an integer, return `true`, otherwise return `false`. If the value is [`NaN`](../../globals/NaN.mdx) or [`Infinity`](../../globals/Infinity.mdx), return `false`. The method will also return `true` for floating point numbers that can be represented as integer. It will always return `false` if the value is not a number.\n\nNote that some number literals, while looking like non-integers, actually represent integers — due to the precision limit of ECMAScript floating-point number encoding (IEEE-754). For example, `5.0000000000000001` only differs from `5` by `1e-16`, which is too small to be represented. (For reference, [`Number.EPSILON`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/EPSILON) stores the distance between 1 and the next representable floating-point number greater than 1, and that is about `2.22e-16`.) Therefore, `5.0000000000000001` will be represented with the same encoding as `5`, thus making `Number.isInteger(5.0000000000000001)` return `true`.\n\nIn a similar sense, numbers around the magnitude of [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER) will suffer from loss of precision and make `Number.isInteger` return `true` even when it's not an integer. (The actual threshold varies based on how many bits are needed to represent the decimal — for example, `Number.isInteger(4500000000000000.1)` is `true`, but `Number.isInteger(4500000000000000.5)` is `false`.)\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Number/isNaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isNaN()\n\nThe **`Number.isNaN()`** method determines whether the passed value is the number value [`NaN`](../../globals/NaN.mdx), and returns `false` if the input is not of the Number type. It is a more robust version of the original, global `isNaN()` function.\n\n## Syntax\n\n```js\nNumber.isNaN(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested for [`NaN`](../../globals/NaN.mdx).\n\n### Return value\n\nThe boolean value `true` if the given value is a number with value [`NaN`](../../globals/NaN.mdx). Otherwise, `false`.\n\n## Description\n\nThe function `Number.isNaN()` provides a convenient way to check for equality with `NaN`. Note that you cannot test for equality with `NaN` using either the [`==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Equality) or [`===`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) operators, because unlike all other value comparisons in JavaScript, these evaluate to `false` whenever one operand is [`NaN`](../../globals/NaN.mdx), even if the other operand is also [`NaN`](../../globals/NaN.mdx).\n\nSince `x !== x` is only true for `NaN` among all possible JavaScript values, `Number.isNaN(x)` can also be replaced with a test for `x !== x`, despite the latter being less readable.\n\nAs opposed to the global `isNaN()` function, the `Number.isNaN()` method doesn't force-convert the parameter to a number. This makes it safe to pass values that would normally convert to [`NaN`](../../globals/NaN.mdx) but aren't actually the same value as [`NaN`](../../globals/NaN.mdx). This also means that only values of the Number type that are also [`NaN`](../../globals/NaN.mdx) return `true`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Number/isSafeInteger.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isSafeInteger()\n\nThe **`Number.isSafeInteger()`** method determines whether the provided value is a number that is a _safe integer_.\n\n## Syntax\n\n```js\nNumber.isSafeInteger(testValue)\n```\n\n### Parameters\n\n- `testValue`\n  - : The value to be tested for being a safe integer.\n\n### Return value\n\nThe boolean value `true` if the given value is a number that is a safe integer. Otherwise `false`.\n\n## Description\n\nThe safe integers consist of all integers from -(2<sup>53</sup> - 1) to 2<sup>53</sup> - 1, inclusive (±9,007,199,254,740,991). A safe integer is an integer that:\n\n- can be exactly represented as an IEEE-754 double precision number, and\n- whose IEEE-754 representation cannot be the result of rounding any other integer to fit the IEEE-754 representation.\n\nFor example, 2<sup>53</sup> - 1 is a safe integer: it can be exactly represented, and no other integer rounds to it under any IEEE-754 rounding mode. In contrast, 2<sup>53</sup> is _not_ a safe integer: it can be exactly represented in IEEE-754, but the integer 2<sup>53</sup> + 1 can't be directly represented in IEEE-754 but instead rounds to 2<sup>53</sup> under round-to-nearest and round-to-zero rounding.\n\nHandling values larger or smaller than \\~9 quadrillion with full precision requires using an [arbitrary precision arithmetic library](https://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic). See [What Every Programmer Needs to Know about Floating Point Arithmetic](https://floating-point-gui.de/) for more information on floating point representations of numbers.\n\nFor larger integers, consider using the `BigInt` type.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Number/parseFloat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.parseFloat()\n\nThe **`Number.parseFloat()`** method parses an argument and returns a floating point number. If a number cannot be parsed from the argument, it returns [`NaN`](../../globals/NaN.mdx).\n\n## Syntax\n\n```js\nNumber.parseFloat(string)\n```\n\n### Parameters\n\n- `string`\n  - : The value to parse, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). Leading whitespace in this argument is ignored.\n\n### Return value\n\nA floating point number parsed from the given `string`.\n\nOr [`NaN`](../../globals/NaN.mdx) when the first non-whitespace character cannot be converted to a number.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Number/parseInt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.parseInt()\n\nThe **`Number.parseInt()`** method parses a string argument and\nreturns an integer of the specified radix or base.\n\n## Syntax\n\n```js\nNumber.parseInt(string)\nNumber.parseInt(string, radix)\n```\n\n### Parameters\n\n- `string`\n  - : The value to parse, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). Leading whitespace in this argument is ignored.\n- `radix` _**optional**_\n\n  - : An integer between `2` and `36` that represents the\n    _radix_ (the base in mathematical numeral systems) of the\n    `string`.\n\n    If `radix` is undefined or `0`, it is assumed to be `10` except when the number begins with the code unit pairs `0x` or `0X`, in which case a radix of `16` is assumed.\n\n### Return value\n\nAn integer parsed from the given `string`.\n\nIf the `radix` is smaller than `2` or bigger than\n`36`, or the first non-whitespace character cannot be converted to a number,\n[`NaN`](../../globals/NaN.mdx) is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Number/prototype/toExponential.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toExponential()\n\nThe **`toExponential()`** method returns a string representing\nthe `Number` object in exponential notation.\n\n## Syntax\n\n```js\ntoExponential()\ntoExponential(fractionDigits)\n```\n\n### Parameters\n\n- `fractionDigits` _**optional**_\n  - : Optional. An integer specifying the number of digits after the decimal point.\n    Defaults to as many digits as necessary to specify the number.\n\n### Return value\n\nA string representing the given `Number` object in exponential notation\nwith one digit before the decimal point, rounded to\n`fractionDigits` digits after the decimal point.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : If `fractionDigits` is too small or too large. Values between\n    `0` and `100`, inclusive, will not cause a\n    [`RangeError`](../../../globals/RangeError/RangeError.mdx).\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If this method is invoked on an object that is not a `Number`.\n\n## Description\n\nIf the `fractionDigits` argument is omitted, the number of digits\nafter the decimal point defaults to the number of digits necessary to represent the\nvalue uniquely.\n\nIf you use the `toExponential()` method for a numeric literal and the\nnumeric literal has no exponent and no decimal point, leave whitespace(s) before the dot\nthat precedes the method call to prevent the dot from being interpreted as a decimal\npoint.\n\nIf a number has more digits than requested by the\n`fractionDigits` parameter, the number is rounded to the nearest\nnumber represented by `fractionDigits` digits. See the discussion\nof rounding in the description of the [`Number.prototype.toFixed()`](../../../globals/Number/prototype/toFixed.mdx) method, which also applies to `toExponential()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Number/prototype/toFixed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toFixed()\n\nThe **`toFixed()`** method formats a number using fixed-point notation.\n\n## Syntax\n\n```js\ntoFixed()\ntoFixed(digits)\n```\n\n### Parameters\n\n- `digits` _**optional**_\n  - : The number of digits to appear after the decimal point; should be a value between `0` and `100`, inclusive. If this argument is omitted, it is treated as `0`.\n\n### Return value\n\nA string representing the given number using fixed-point notation.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : If `digits` is smaller than `0`, larger than `100`, or is `NaN`.\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If this method is invoked on an object that is not a `Number`.\n\n## Description\n\nThe `toFixed()` method returns a string representation of `numObj` that does not use exponential notation and has exactly `digits` digits after the decimal place. The number is rounded if necessary, and the fractional part is padded with zeros if necessary so that it has the specified length.\n\nIf the absolute value of `numObj` is greater or equal to 10<sup>21</sup>, this method uses the same algorithm as [`Number.prototype.toString()`](../../../globals/Number/prototype/toString.mdx) and returns a string in exponential notation. `toFixed()` returns `\"Infinity\"`, `\"NaN\"`, or `\"-Infinity\"` if the value of `numObj` is non-finite.\n\nThe output of `toFixed()` may be more precise than [`toString()`](../../../globals/Number/prototype/toString.mdx) for some values, because `toString()` only prints enough significant digits to distinguish the number from adjacent number values. For example:\n\n```js\n(1000000000000000128).toString(); // '1000000000000000100'\n(1000000000000000128).toFixed(0); // '1000000000000000128'\n```\n\nHowever, choosing a `digits` precision that's too high can return unexpected results, because decimal fractional numbers cannot be represented precisely in floating point. For example:\n\n```js\n0.3.toFixed(50); // '0.29999999999999998889776975374843459576368331909180'\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Number/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string with a language-sensitive representation of this number. In implementations with [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) support, this method simply calls `Intl.NumberFormat`.\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` parameters customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat), these parameters correspond exactly to the [`Intl.NumberFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) constructor's parameters. Implementations without `Intl.NumberFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#locales) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored.\n\nSee the [`Intl.NumberFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string with a language-sensitive representation of the given number.\n\nIn implementations with `Intl.NumberFormat`, this is equivalent to `new Intl.NumberFormat(locales, options).format(number)`.\n\n## Performance\n\nWhen formatting large numbers of numbers, it is better to create a\n`Intl.NumberFormat` object and use the function provided by its\n`format` property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Number/prototype/toPrecision.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toPrecision()\n\nThe **`toPrecision()`** method returns a string representing\nthe `Number` object to the specified precision.\n\n## Syntax\n\n```js\ntoPrecision()\ntoPrecision(precision)\n```\n\n### Parameters\n\n- `precision` _**optional**_\n  - : An integer specifying the number of significant digits.\n\n### Return value\n\nA string representing a `Number` object in fixed-point or exponential\nnotation rounded to `precision` significant digits. See the discussion of\nrounding in the description of the [`Number.prototype.toFixed()`](../../../globals/Number/prototype/toFixed.mdx) method,\nwhich also applies to `toPrecision()`.\n\nIf the `precision` argument is omitted, behaves as\n[`Number.prototype.toString()`](../../../globals/Number/prototype/toString.mdx). If the `precision` argument is a\nnon-integer value, it is rounded to the nearest integer.\n\n### Exceptions\n\n- `RangeError`\n  - : If `precision` is not between `1` and `100`\n    (inclusive), a [`RangeError`](../../../globals/RangeError/RangeError.mdx) is thrown. Implementations are allowed to\n    support larger and smaller values as well. ECMA-262 only requires a precision of up to\n    21 significant digits.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Number/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified number value.\n\n## Syntax\n\n```js\ntoString()\ntoString(radix)\n```\n\n### Parameters\n\n- `radix` _**optional**_\n  - : An integer in the range `2` through `36` specifying the base to use for representing the number value. Defaults to 10.\n\n### Return value\n\nA string representing the specified number value.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `radix` is less than 2 or greater than 36.\n\n## Description\n\nThe `Number` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For `Number` values, the `toString` method returns a string representation of the value in the specified radix.\n\nFor radixes above 10, the letters of the alphabet indicate digits greater than 9. For example, for hexadecimal numbers (base 16) `a` through `f` are used.\n\nIf the specified number value is negative, the sign is preserved. This is the case even if the radix is 2; the string returned is the positive binary representation of the number value preceded by a `-` sign, **not** the two's complement of the number value.\n\nBoth `0` and `-0` have `\"0\"` as their string representation. [`Infinity`](../../../globals/Infinity.mdx) returns `\"Infinity\"` and [`NaN`](../../../globals/NaN.mdx) returns `\"NaN\"`.\n\nIf the number is not a whole number, the decimal point `.` is used to separate the decimal places. [Scientific notation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#exponential) is used if the radix is 10 and the number's magnitude (ignoring sign) is greater than or equal to 10<sup>21</sup> or less than 10<sup>-6</sup>. In this case, the returned string always explicitly specifies the sign of the exponent.\n\n```js\nconsole.log((10 ** 21.5).toString()); // \"3.1622776601683794e+21\"\nconsole.log((10 ** 21.5).toString(8)); // \"526665530627250154000000\"\n```\n\nThe `toString()` method requires its `this` value to be a `Number` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to number values.\n\nBecause `Number` doesn't have a [`[Symbol.toPrimitive]()`](../../../globals/Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `Number` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, Number _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — rather, they are directly converted using the same algorithm as the initial `toString()` implementation.\n\n```js\nNumber.prototype.toString = () => \"Overridden\";\nconsole.log(`${1}`); // \"1\"\nconsole.log(`${new Number(1)}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Number/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.valueOf()\n\nThe **`valueOf()`** method returns the wrapped primitive value\nof a `Number` object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nA number representing the primitive value of the specified `Number` object.\n\n## Description\n\nThis method is usually called internally by JavaScript and not explicitly in web code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Object/Object.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object()\n\nThe **`Object` constructor** turns the input into an object. Its behavior depends on the input's type.\n\n- If the value is [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../globals/undefined.mdx), it creates and returns an empty object.\n- Otherwise, it returns an object of a Type that corresponds to the given value.\n- If the value is an object already, it returns the value.\n\n## Syntax\n\n```js\nnew Object(value)\nObject(value)\n```\n\n> **Note:** `Object()` can be called with or without `new`. Both create a new object.\n\n### Parameters\n\n- `value`\n  - : Any value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Object/assign.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.assign()\n\nThe **`Object.assign()`** method\ncopies all [enumerable](../../globals/Object/prototype/propertyIsEnumerable.mdx)\n[own properties](../../globals/Object/hasOwn.mdx) from one or more\n_source objects_ to a _target object_. It returns the modified target\nobject.\n\n## Syntax\n\n```js\nObject.assign(target, ...sources)\n```\n\n### Parameters\n\n- `target`\n  - : The target object — what to apply the sources' properties to, which is returned\n    after it is modified.\n- `sources`\n  - : The source object(s) — objects containing the properties you want to apply.\n\n### Return value\n\nThe target object.\n\n## Description\n\nProperties in the target object are overwritten by properties in the sources if they\nhave the same \"key\". Later sources' properties overwrite earlier ones.\n\nThe `Object.assign()` method only copies _enumerable_ and\n_own_ properties from a source object to a target object. It uses\n`[[Get]]` on the source and `[[Set]]` on the target, so it will\ninvoke [getters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/get) and [setters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/set). Therefore it\n_assigns_ properties, versus copying or defining new properties. This may make it\nunsuitable for merging new properties into a prototype if the merge sources contain\ngetters.\n\nFor copying property definitions (including their enumerability) into prototypes, use\n[`Object.getOwnPropertyDescriptor()`](../../globals/Object/getOwnPropertyDescriptor.mdx) and\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx) instead.\n\nBoth `String` and `Symbol` properties are copied.\n\nIn case of an error, for example if a property is non-writable, a\n[`TypeError`](../../globals/TypeError/TypeError.mdx) is raised, and the `target` object is\nchanged if any properties are added before the error is raised.\n\n> **Note:** `Object.assign()` does not throw on\n> [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../globals/undefined.mdx) sources.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Object/create.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.create()\n\nThe **`Object.create()`** method creates a new object, using an existing object as the prototype of the newly created object.\n\n## Syntax\n\n```js\nObject.create(proto)\nObject.create(proto, propertiesObject)\n```\n\n### Parameters\n\n- `proto`\n  - : The object which should be the prototype of the newly-created object.\n- `propertiesObject` _**optional**_\n  - : If specified and not [`undefined`](../../globals/undefined.mdx), an object whose [enumerable own properties](https://developer.mozilla.org/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) specify property descriptors to be added to the newly-created object, with the corresponding property names. These properties correspond to the second argument of [`Object.defineProperties()`](../../globals/Object/defineProperties.mdx).\n\n### Return value\n\nA new object with the specified prototype object and properties.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if `proto` is neither [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) nor an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Object/defineProperties.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.defineProperties()\n\nThe **`Object.defineProperties()`** method defines new or\nmodifies existing properties directly on an object, returning the object.\n\n## Syntax\n\n```js\nObject.defineProperties(obj, props)\n```\n\n### Parameters\n\n- `obj`\n  - : The object on which to define or modify properties.\n- `props`\n\n  - : An object whose keys represent the names of properties to be defined or modified and\n    whose values are objects describing those properties. Each value in `props`\n    must be either a data descriptor or an accessor descriptor; it cannot be both (see\n    [`Object.defineProperty()`](../../globals/Object/defineProperty.mdx) for more details).\n\n    Data descriptors and accessor descriptors may optionally contain the following keys:\n\n    - `configurable`\n      - : `true` if and only if the type of this property descriptor may be\n        changed and if the property may be deleted from the corresponding object.\n        **Defaults to `false`.**\n    - `enumerable`\n      - : `true` if and only if this property shows up during enumeration of\n        the properties on the corresponding object.\n        **Defaults to `false`.**\n\n    A data descriptor also has the following optional keys:\n\n    - `value`\n      - : The value associated with the property. Can be any valid JavaScript value\n        (number, object, function, etc.).\n        **Defaults to [`undefined`](../../globals/undefined.mdx).**\n    - `writable`\n      - : `true` if and only if the value associated with the property may be\n        changed with an assignment operator.\n        **Defaults to `false`.**\n\n    An accessor descriptor also has the following optional keys:\n\n    - `get`\n      - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx)\n        if there is no getter. The function's return value will be used as the value of\n        the property.\n        **Defaults to [`undefined`](../../globals/undefined.mdx).**\n    - `set`\n      - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx)\n        if there is no setter. The function will receive as its only argument the new\n        value being assigned to the property.\n        **Defaults to [`undefined`](../../globals/undefined.mdx).**\n\n    If a descriptor has neither of `value`, `writable`,\n    `get` and `set` keys, it is treated as a data descriptor. If a\n    descriptor has both `value` or `writable` and `get`\n    or `set` keys, an exception is thrown.\n\n### Return value\n\nThe object that was passed to the function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Object/defineProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.defineProperty()\n\nThe static method **`Object.defineProperty()`** defines a new\nproperty directly on an object, or modifies an existing property on an object, and\nreturns the object.\n\n## Syntax\n\n```js\nObject.defineProperty(obj, prop, descriptor)\n```\n\n### Parameters\n\n- `obj`\n  - : The object on which to define the property.\n- `prop`\n  - : The name or `Symbol` of the property to be defined or modified.\n- `descriptor`\n  - : The descriptor for the property being defined or modified.\n\n### Return value\n\nThe object that was passed to the function.\n\n## Description\n\nThis method allows a precise addition to or modification of a property on an object.\nNormal property addition through assignment creates properties which show up during\nproperty enumeration (`for...in` loop or\n[`Object.keys`](../../globals/Object/keys.mdx) method), whose values may be changed, and which may be\ndeleted. This method allows these extra details\nto be changed from their defaults. By default, properties added using\n`Object.defineProperty()` are not writable, not enumerable, and not configurable.\n\nProperty descriptors present in objects come in two main flavors: data descriptors and\naccessor descriptors. A **data descriptor** is a property that has a\nvalue, which may or may not be writable. An **accessor descriptor** is a\nproperty described by a getter-setter pair of functions. A descriptor must be one of\nthese two flavors; it cannot be both.\n\nBoth data and accessor descriptors are objects. They share the following optional keys\n(please note: the **defaults** mentioned here are in the case of defining\nproperties using `Object.defineProperty()`):\n\n- `configurable`\n\n  - : when this is set to `false`,\n\n    - the type of this property cannot be changed between data property and accessor property, and\n    - the property may not be deleted, and\n    - other attributes of its descriptor cannot be changed (however, if it's a data descriptor with `writable: true`, the `value` can be changed, and `writable` can be changed to `false`).\n\n    **Defaults to `false`.**\n\n- `enumerable`\n  - : `true` if and only if this property shows up during enumeration of the\n    properties on the corresponding object.\n    **Defaults to `false`.**\n\nA **data descriptor** also has the following optional keys:\n\n- `value`\n  - : The value associated with the property. Can be any valid JavaScript value (number,\n    object, function, etc.).\n    **Defaults to [`undefined`](../../globals/undefined.mdx).**\n- `writable`\n  - : `true` if the value associated with the property may be changed with an\n    assignment operator.\n    **Defaults to `false`.**\n\nAn **accessor descriptor** also has the following optional keys:\n\n- `get`\n  - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no getter. When the property is accessed, this function is called without\n    arguments and with `this` set to the object through which the property is\n    accessed (this may not be the object on which the property is defined due to\n    inheritance). The return value will be used as the value of the property.\n    **Defaults to [`undefined`](../../globals/undefined.mdx).**\n- `set`\n  - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no setter. When the property is assigned, this function is called with one\n    argument (the value being assigned to the property) and with `this` set to\n    the object through which the property is assigned.\n    **Defaults to [`undefined`](../../globals/undefined.mdx).**\n\nIf a descriptor has neither of `value`, `writable`,\n`get` and `set` keys, it is treated as a data descriptor. If a\ndescriptor has both \\[`value` or `writable`] and \\[`get` or `set`] keys, an exception is thrown.\n\nBear in mind that these attributes are not necessarily the descriptor's own properties.\nInherited properties will be considered as well. In order to ensure these defaults are\npreserved, you might freeze existing objects in the descriptor object's prototype chain upfront, specify all\noptions explicitly, or point to [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) with [`Object.create(null)`](../../globals/Object/create.mdx).\n\n```js\nconst obj = {};\n// 1. Using a null prototype: no inherited properties\nconst descriptor = Object.create(null);\ndescriptor.value = 'static';\n\n// not enumerable, not configurable, not writable as defaults\nObject.defineProperty(obj, 'key', descriptor);\n\n// 2. Being explicit by using a throw-away object literal with all attributes present\nObject.defineProperty(obj, 'key2', {\n  enumerable: false,\n  configurable: false,\n  writable: false,\n  value: 'static'\n});\n\n// 3. Recycling same object\nfunction withValue(value) {\n  const d = withValue.d || (\n    withValue.d = {\n      enumerable: false,\n      writable: false,\n      configurable: false,\n      value,\n    }\n  );\n\n  // avoiding duplicate operation for assigning value\n  if (d.value !== value) d.value = value;\n\n  return d;\n}\n// and\nObject.defineProperty(obj, 'key', withValue('static'));\n\n// if freeze is available, prevents adding or\n// removing the object prototype properties\n// (value, get, set, enumerable, writable, configurable)\n(Object.freeze || Object)(Object.prototype);\n```\n\nWhen the property already exists, `Object.defineProperty()` attempts to modify the property according to the values in the descriptor and the property's current configuration.\n\nIf the old descriptor had its `configurable` attribute set to `false`, the property is said to be _non-configurable_. It is not possible to change any attribute of a non-configurable accessor property, and it is not possible to switch between data and accessor property types. For data properties with `writable: true`, it is possible to modify the value and change the `writable` attribute from `true` to `false`. A [`TypeError`](../../globals/TypeError/TypeError.mdx) is thrown when attempts are made to change non-configurable property attributes (except `value` and `writable`, if permitted), except when defining a value same as the original value on a data property.\n\nWhen the current property is configurable, defining an attribute to `undefined` effectively deletes it. For example, if `o.k` is an accessor property, `Object.defineProperty(o, \"k\", { set: undefined })` will remove the setter, making `k` only have a getter and become readonly. If an attribute is absent from the new descriptor, the old descriptor attribute's value is kept (it won't be implicitly re-defined to `undefined`). It is possible to toggle between data and accessor property by giving a descriptor of a different \"flavor\". For example, if the new descriptor is a data descriptor (with `value` or `writable`), the original descriptor's `get` and `set` attributes will both be dropped.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Object/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.entries()\n\nThe **`Object.entries()`** method returns an array of a given object's own enumerable string-keyed property key-value pairs.\n\n## Syntax\n\n```js\nObject.entries(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : An object.\n\n### Return value\n\nAn array of the given object's own enumerable string-keyed property key-value pairs. Each key-value pair is an array with two elements: the first element is the property key (which is always a string), and the second element is the property value.\n\n## Description\n\n`Object.entries()` returns an array whose elements are arrays corresponding to the enumerable string-keyed property key-value pairs found directly upon `object`. This is the same as iterating with a `for...in` loop, except that a `for...in` loop enumerates properties in the prototype chain as well. The order of the array returned by `Object.entries()` is the same as that provided by a `for...in` loop.\n\nIf you only need the property keys, use [`Object.keys()`](../../globals/Object/keys.mdx) instead. If you only need the property values, use [`Object.values()`](../../globals/Object/values.mdx) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Object/freeze.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.freeze()\n\nThe **`Object.freeze()`** method _freezes_ an object. Freezing an object [prevents extensions](../../globals/Object/preventExtensions.mdx) and makes existing properties non-writable and non-configurable. A frozen object can no longer be changed: new properties cannot be added, existing properties cannot be removed, their enumerability, configurability, writability, or value cannot be changed, and the object's prototype cannot be re-assigned. `freeze()` returns the same object that was passed in.\n\nFreezing an object is the highest integrity level that JavaScript provides.\n\n## Syntax\n\n```js\nObject.freeze(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object to freeze.\n\n### Return value\n\nThe object that was passed to the function.\n\n## Description\n\nFreezing an object is equivalent to [preventing extensions](../../globals/Object/preventExtensions.mdx) and then changing all existing [properties' descriptors'](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty#description) `configurable` to `false` — and for data properties, `writable` to `false` as well. Nothing can be added to or removed from the properties set of a frozen object. Any attempt to do so will fail, either silently or by throwing a [`TypeError`](../../globals/TypeError/TypeError.mdx) exception (most commonly, but not exclusively, when in \"strict mode\").\n\nFor data properties of a frozen object, their values cannot be changed since the writable and\nconfigurable attributes are set to false. Accessor properties (getters and setters) work the same — the property value returned by the getter may still change, and the setter can still be called without throwing errors when setting the property. Note that values\nthat are objects can still be modified, unless they are also frozen. As an object, an\narray can be frozen; after doing so, its elements cannot be altered and no elements can\nbe added to or removed from the array.\n\n`freeze()` returns the same object that was passed into the function. It\n_does not_ create a frozen copy.\n\nA `TypedArray` or a [`DataView`](../../globals/DataView/DataView.mdx) with elements will cause a [`TypeError`](../../globals/TypeError/TypeError.mdx),\nas they are views over memory and will definitely cause other possible issues:\n\n```js\nObject.freeze(new Uint8Array(0)) // No elements\n// Uint8Array []\n\nObject.freeze(new Uint8Array(1)) // Has elements\n// TypeError: Cannot freeze array buffer views with elements\n\nObject.freeze(new DataView(new ArrayBuffer(32))) // No elements\n// DataView {}\n\nObject.freeze(new Float64Array(new ArrayBuffer(64), 63, 0)) // No elements\n// Float64Array []\n\nObject.freeze(new Float64Array(new ArrayBuffer(64), 32, 2)) // Has elements\n// TypeError: Cannot freeze array buffer views with elements\n```\n\nNote that as the standard three properties (`buf.byteLength`,\n`buf.byteOffset` and `buf.buffer`) are read-only (as are those of\nan `ArrayBuffer`, there is no reason for\nattempting to freeze these properties.\n\nUnlike [`Object.seal()`](../../globals/Object/seal.mdx), existing properties in objects frozen with `Object.freeze()` are made immutable and data properties cannot be re-assigned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Object/fromEntries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.fromEntries()\n\nThe **`Object.fromEntries()`** method transforms a list of key-value pairs into an object.\n\n## Syntax\n\n```js\nObject.fromEntries(iterable)\n```\n\n### Parameters\n\n- `iterable`\n\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol), such as an `Array` or [Map](../../globals/Map/Map.mdx), containing a list of objects. Each object should have two properties:\n\n    - `0`\n      - : A string or `Symbol` representing the property key.\n    - `1`\n      - : The property value.\n\n    Typically, this object is implemented as a two-element array, with the first element being the property key and the second element being the property value.\n\n### Return value\n\nA new object whose properties are given by the entries of the iterable.\n\n## Description\n\nThe `Object.fromEntries()` method takes a list of key-value pairs and returns a new object whose properties are given by those entries. The `iterable` argument is expected to be an object that implements an `@@iterator` method. The method returns an iterator object that produces two-element array-like objects. The first element is a value that will be used as a property key, and the second element is the value to associate with that property key.\n\n`Object.fromEntries()` performs the reverse of [`Object.entries()`](../../globals/Object/entries.mdx), except that `Object.entries()` only returns string-keyed properties, while `Object.fromEntries()` can also create symbol-keyed properties.\n\n> **Note:** Unlike [`Array.from()`](../../globals/Array/from.mdx), `Object.fromEntries()` does not use the value of `this`, so calling it on another constructor does not create objects of that type.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Object/getOwnPropertyDescriptor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertyDescriptor()\n\nThe **`Object.getOwnPropertyDescriptor()`** method returns an\nobject describing the configuration of a specific property on a given object (that is,\none directly present on an object and not in the object's prototype chain). The object\nreturned is mutable but mutating it has no effect on the original property's\nconfiguration.\n\n## Syntax\n\n```js\nObject.getOwnPropertyDescriptor(obj, prop)\n```\n\n### Parameters\n\n- `obj`\n  - : The object in which to look for the property.\n- `prop`\n  - : The name or `Symbol` of the property whose description is to be\n    retrieved.\n\n### Return value\n\nA property descriptor of the given property if it exists on the object,\n[`undefined`](../../globals/undefined.mdx) otherwise.\n\n## Description\n\nThis method permits examination of the precise description of a property. A\n_property_ in JavaScript consists of either a string-valued name or a\n`Symbol` and a property descriptor. Further information about property\ndescriptor types and their attributes can be found in\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx).\n\nA _property descriptor_ is a record with some of the following attributes:\n\n- `value`\n  - : The value associated with the property (data descriptors only).\n- `writable`\n  - : `true` if and only if the value associated with the property may be\n    changed (data descriptors only).\n- `get`\n  - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no getter (accessor descriptors only).\n- `set`\n  - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no setter (accessor descriptors only).\n- `configurable`\n  - : `true` if and only if the type of this property descriptor may be changed\n    and if the property may be deleted from the corresponding object.\n- `enumerable`\n  - : `true` if and only if this property shows up during enumeration of the\n    properties on the corresponding object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Object/getOwnPropertyDescriptors.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertyDescriptors()\n\nThe **`Object.getOwnPropertyDescriptors()`** method returns all\nown property descriptors of a given object.\n\n## Syntax\n\n```js\nObject.getOwnPropertyDescriptors(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object for which to get all own property descriptors.\n\n### Return value\n\nAn object containing all own property descriptors of an object. Might be an empty\nobject, if there are no properties.\n\n## Description\n\nThis method permits examination of the precise description of all own properties of an\nobject. A _property_ in JavaScript consists of either a string-valued name or a\n`Symbol` and a property descriptor. Further information about property\ndescriptor types and their attributes can be found in\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx).\n\nA _property descriptor_ is a record with some of the following attributes:\n\n- `value`\n  - : The value associated with the property (data descriptors only).\n- `writable`\n  - : `true` if and only if the value associated with the property may be\n    changed (data descriptors only).\n- `get`\n  - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no getter (accessor descriptors only).\n- `set`\n  - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no setter (accessor descriptors only).\n- `configurable`\n  - : `true` if and only if the type of this property descriptor may be changed\n    and if the property may be deleted from the corresponding object.\n- `enumerable`\n  - : `true` if and only if this property shows up during enumeration of the\n    properties on the corresponding object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Object/getOwnPropertyNames.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertyNames()\n\nThe **`Object.getOwnPropertyNames()`** method returns an array of all properties (including non-enumerable properties except for those which use Symbol) found directly in a given object.\n\n## Syntax\n\n```js\nObject.getOwnPropertyNames(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object whose enumerable and non-enumerable properties are to be returned.\n\n### Return value\n\nAn array of strings that corresponds to the properties found directly in the given object.\n\n## Description\n\n`Object.getOwnPropertyNames()` returns an array whose elements are strings corresponding to the enumerable and non-enumerable properties found directly in a given object `obj`. The ordering of the enumerable properties in the array is consistent with the ordering exposed by a `for...in` loop (or by [`Object.keys()`](../../globals/Object/keys.mdx)) over the properties of the object. The non-negative integer keys of the object (both enumerable and non-enumerable) are added in ascending order to the array first, followed by the string keys in the order of insertion.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Object/getOwnPropertySymbols.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertySymbols()\n\nThe **`Object.getOwnPropertySymbols()`** method returns an array of all symbol properties found directly upon a given object.\n\n## Syntax\n\n```js\nObject.getOwnPropertySymbols(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object whose symbol properties are to be returned.\n\n### Return value\n\nAn array of all symbol properties found directly upon the given object.\n\n## Description\n\nSimilar to [`Object.getOwnPropertyNames()`](../../globals/Object/getOwnPropertyNames.mdx), you can get all symbol properties of a given object as an array of symbols. Note that [`Object.getOwnPropertyNames()`](../../globals/Object/getOwnPropertyNames.mdx) itself does not contain the symbol properties of an object and only the string properties.\n\nAs all objects have no own symbol properties initially, `Object.getOwnPropertySymbols()` returns an empty array unless you have set symbol properties on your object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Object/getPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getPrototypeOf()\n\nThe **`Object.getPrototypeOf()`** method returns the prototype\n(i.e. the value of the internal `[[Prototype]]` property) of the specified\nobject.\n\n## Syntax\n\n```js\nObject.getPrototypeOf(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object whose prototype is to be returned.\n\n### Return value\n\nThe prototype of the given object, which may be `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Object/hasOwn.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.hasOwn()\n\nThe **`Object.hasOwn()`** static method returns `true` if the specified object has the indicated property as its _own_ property.\nIf the property is inherited, or does not exist, the method returns `false`.\n\n> **Note:** `Object.hasOwn()` is intended as a replacement for [`Object.prototype.hasOwnProperty()`](../../globals/Object/prototype/hasOwnProperty.mdx).\n\n\n\n## Syntax\n\n```js\nhasOwn(instance, prop)\n```\n\n### Parameters\n\n- `instance`\n  - : The JavaScript object instance to test.\n- `prop`\n  - : The `String` name or [Symbol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol) of the property to test.\n\n### Return value\n\n`true` if the specified object has directly defined the specified property.\nOtherwise `false`\n\n## Description\n\nThe **`Object.hasOwn()`** method returns `true` if the specified property is a\ndirect property of the object — even if the property value is `null` or `undefined`.\nThe method returns `false` if the property is inherited, or has not been declared at all.\nUnlike the `in` operator, this\nmethod does not check for the specified property in the object's prototype chain.\n\nIt is recommended over [`Object.prototype.hasOwnProperty()`](../../globals/Object/prototype/hasOwnProperty.mdx) because\nit works for objects created using `Object.create(null)` and with objects that\nhave overridden the inherited `hasOwnProperty()` method. While it is possible to\nworkaround these problems by calling `Object.prototype.hasOwnProperty()` on an\nexternal object, `Object.hasOwn()` is more intuitive.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Object/is.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.is()\n\nThe **`Object.is()`** method determines whether two values are [the same value](https://developer.mozilla.org/docs/Web/JavaScript/Equality_comparisons_and_sameness#same-value_equality_using_object.is).\n\n## Syntax\n\n```js\nObject.is(value1, value2)\n```\n\n### Parameters\n\n- `value1`\n  - : The first value to compare.\n- `value2`\n  - : The second value to compare.\n\n### Return value\n\nA boolean indicating whether or not the two arguments are the same value.\n\n## Description\n\n`Object.is()` determines whether two values are [the same value](https://developer.mozilla.org/docs/Web/JavaScript/Equality_comparisons_and_sameness#same-value_equality_using_object.is). Two values are the same if one of the following holds:\n\n- both [`undefined`](../../globals/undefined.mdx)\n- both `null`\n- both `true` or both `false`\n- both strings of the same length with the same characters in the same order\n- both the same object (meaning both values reference the same object in memory)\n- both `BigInts` with the same numeric value\n- both `Symbols` that reference the same symbol value\n- both numbers and\n\n  - both `+0`\n  - both `-0`\n  - both [`NaN`](../../globals/NaN.mdx)\n  - or both non-zero, not [`NaN`](../../globals/NaN.mdx), and have the same value\n\n`Object.is()` is not equivalent to the [`==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Equality) operator. The `==` operator applies various coercions to both sides (if they are not the same type) before testing for equality (resulting in such behavior as `\"\" == false` being `true`), but `Object.is()` doesn't coerce either value.\n\n`Object.is()` is also _not_ equivalent to the [`===`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) operator. The only difference between `Object.is()` and `===` is in their treatment of signed zeros and `NaN` values. The `===` operator (and the `==` operator) treats the number values `-0` and `+0` as equal, but treats [`NaN`](../../globals/NaN.mdx) as not equal to each other.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Object/isExtensible.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.isExtensible()\n\nThe **`Object.isExtensible()`** method determines if an object\nis extensible (whether it can have new properties added to it).\n\n## Syntax\n\n```js\nObject.isExtensible(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be checked.\n\n### Return value\n\nA `Boolean` indicating whether or not the given object is extensible.\n\n## Description\n\nObjects are extensible by default: they can have new properties added to them, and their `[[Prototype]]` can be re-assigned. An object can be marked as non-extensible using one of [`Object.preventExtensions()`](../../globals/Object/preventExtensions.mdx), [`Object.seal()`](../../globals/Object/seal.mdx), [`Object.freeze()`](../../globals/Object/freeze.mdx), or [`Reflect.preventExtensions()`](../../globals/Reflect/preventExtensions.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Object/isFrozen.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.isFrozen()\n\nThe **`Object.isFrozen()`** determines if an object is\n[frozen](../../globals/Object/freeze.mdx).\n\n## Syntax\n\n```js\nObject.isFrozen(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be checked.\n\n### Return value\n\nA `Boolean` indicating whether or not the given object is frozen.\n\n## Description\n\nAn object is frozen if and only if it is not [extensible](../../globals/Object/isExtensible.mdx), all its properties are non-configurable, and all its data\nproperties (that is, properties which are not accessor properties with getter or setter\ncomponents) are non-writable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Object/isSealed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.isSealed()\n\nThe **`Object.isSealed()`** method determines if an object is\nsealed.\n\n## Syntax\n\n```js\nObject.isSealed(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be checked.\n\n### Return value\n\nA `Boolean` indicating whether or not the given object is sealed.\n\n## Description\n\nReturns `true` if the object is sealed, otherwise `false`. An\nobject is sealed if it is not [extensible](../../globals/Object/isExtensible.mdx) and\nif all its properties are non-configurable and therefore not removable (but not\nnecessarily non-writable).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Object/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.keys()\n\nThe **`Object.keys()`** method returns an array of a given object's own enumerable string-keyed property names.\n\n## Syntax\n\n```js\nObject.keys(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : An object.\n\n### Return value\n\nAn array of strings representing the given object's own enumerable string-keyed property keys.\n\n## Description\n\n`Object.keys()` returns an array whose elements are strings corresponding to the enumerable string-keyed property names found directly upon `object`. This is the same as iterating with a `for...in` loop, except that a `for...in` loop enumerates properties in the prototype chain as well. The order of the array returned by `Object.keys()` is the same as that provided by a `for...in` loop.\n\nIf you need the property values, use [`Object.values()`](../../globals/Object/values.mdx) instead. If you need both the property keys and values, use [`Object.entries()`](../../globals/Object/entries.mdx) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Object/preventExtensions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.preventExtensions()\n\nThe **`Object.preventExtensions()`** method prevents new\nproperties from ever being added to an object (i.e. prevents future extensions to the\nobject). It also prevents the object's prototype from being re-assigned.\n\n## Syntax\n\n```js\nObject.preventExtensions(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be made non-extensible.\n\n### Return value\n\nThe object being made non-extensible.\n\n## Description\n\nAn object is extensible if new properties can be added to it.\n`Object.preventExtensions()` marks an object as no longer extensible, so that\nit will never have properties beyond the ones it had at the time it was marked as\nnon-extensible. Note that the properties of a non-extensible object, in general, may\nstill be _deleted_. Attempting to add new properties to a non-extensible object\nwill fail, either silently or, in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), throwing a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\nUnlike [`Object.seal()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/seal) and [`Object.freeze()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze), `Object.preventExtensions()` invokes an intrinsic JavaScript behavior and cannot be replaced with a composition of several other operations. It also has its `Reflect` counterpart (which only exists for intrinsic operations), [`Reflect.preventExtensions()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Reflect/preventExtensions).\n\n`Object.preventExtensions()` only prevents addition of own properties. Properties can still be added to the object prototype.\n\nThis method makes the `[[Prototype]]` of the target immutable; any `[[Prototype]]` re-assignment will throw a `TypeError`. This behavior is specific to the internal `[[Prototype]]` property; other properties of the target object will remain mutable.\n\nThere is no way to make an object extensible again once it has been made non-extensible.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Object/prototype/constructor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.constructor\n\nThe **`constructor`** data property of an `Object` instance returns a reference to the constructor function that created the instance object. Note that the value of this property is a reference to _the function itself_, not a string containing the function's name.\n\n> **Note:** This is a property of JavaScript objects. For the `constructor` method in classes, see [its own reference page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/constructor).\n\n## Value\n\nA reference to the constructor function that created the instance object.\n\n> **Note:** This property is created by default on the [`prototype`](../../../globals/Function/prototype/) property of every constructor function and is inherited by all objects created by that constructor.\n\n## Description\n\nAny object (with the exception of [`null` prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) will have a `constructor` property on its `[[Prototype]]`. Objects created with literals will also have a `constructor` property that points to the constructor type for that object — for example, array literals create `Array` objects, and [object literals](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Object_initializer) create plain objects.\n\n```js\nconst o1 = {};\no1.constructor === Object; // true\n\nconst o2 = new Object();\no2.constructor === Object; // true\n\nconst a1 = [];\na1.constructor === Array; // true\n\nconst a2 = new Array();\na2.constructor === Array; // true\n\nconst n = 3;\nn.constructor === Number; // true\n```\n\nNote that `constructor` usually comes from the constructor's [`prototype`](../../../globals/Function/prototype/) property. If you have a longer prototype chain, you can usually expect every object in the chain to have a `constructor` property.\n\n```js\nconst o = new TypeError(); // Inheritance: TypeError -> Error -> Object\nconst proto = Object.getPrototypeOf;\nproto(o).constructor === TypeError; // true\nproto(proto(o)).constructor === Error; // true\nproto(proto(proto(o))).constructor === Object; // true\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Object/prototype/hasOwnProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.hasOwnProperty()\n\nThe **`hasOwnProperty()`** method returns a boolean indicating whether the\nobject has the specified property as its own property (as opposed to inheriting\nit).\n\n> **Note:** [`Object.hasOwn()`](../../../globals/Object/hasOwn.mdx) is recommended over\n> `hasOwnProperty()`, in browsers where it is supported.\n\n## Syntax\n\n```js\nhasOwnProperty(prop)\n```\n\n### Parameters\n\n- `prop`\n  - : The `String` name or `Symbol` of the property to test.\n\n### Return value\n\nReturns `true` if the object has the specified property as own property; `false`\notherwise.\n\n## Description\n\nThe **`hasOwnProperty()`** method returns `true` if the specified property is a\ndirect property of the object — even if the value is `null` or `undefined`. The\nmethod returns `false` if the property is inherited, or has not been declared at\nall. Unlike the `in` operator, this\nmethod does not check for the specified property in the object's prototype\nchain.\n\nThe method can be called on _most_ JavaScript objects, because most objects\ndescend from `Object`, and hence inherit its methods. For\nexample `Array` is an `Object`, so you can\nuse `hasOwnProperty()` method to check whether an index exists:\n\n```js\nconst fruits = ['Apple', 'Banana','Watermelon', 'Orange'];\nfruits.hasOwnProperty(3);   // true ('Orange')\nfruits.hasOwnProperty(4);   // false - not defined\n```\n\nThe method will not be available in objects where it is reimplemented, or on\nobjects created using `Object.create(null)` (as these don't inherit from\n`Object.prototype`). Examples for these cases are given below.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Object/prototype/isPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.isPrototypeOf()\n\nThe **`isPrototypeOf()`** method checks if an object exists in another object's prototype chain.\n\n> **Note:** `isPrototypeOf()` differs from the [`instanceof`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/instanceof) operator. In the expression `object instanceof AFunction`, `object`'s prototype chain is checked against `AFunction.prototype`, not against `AFunction` itself.\n\n## Syntax\n\n```js\nisPrototypeOf(object)\n```\n\n### Parameters\n\n- `object`\n  - : The object whose prototype chain will be searched.\n\n### Return value\n\nA boolean indicating whether the calling object (`this`) lies in the prototype chain of `object`. Directly returns `false` when `object` is not an object (i.e. a primitive).\n\n### Errors thrown\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown if `this` is `null` or `undefined` (because it can't be [converted to an object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#object_coercion)).\n\n## Description\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `isPrototypeOf()` method. This method allows you to check whether or not the object exists within another object's prototype chain. If the `object` passed as the parameter is not an object (i.e. a primitive), the method directly returns `false`. Otherwise, the `this` value is [converted to an object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#object_coercion), and the prototype chain of `object` is searched for the `this` value, until the end of the chain is reached or the `this` value is found.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Object/prototype/propertyIsEnumerable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.propertyIsEnumerable()\n\nThe **`propertyIsEnumerable()`** method returns a boolean indicating whether the specified property is the object's [enumerable own](https://developer.mozilla.org/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) property.\n\n## Syntax\n\n```js\npropertyIsEnumerable(prop)\n```\n\n### Parameters\n\n- `prop`\n  - : The name of the property to test. Can be a string or a `Symbol`.\n\n### Return value\n\nA boolean value indicating whether the specified property is enumerable and is the object's own property.\n\n## Description\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `propertyIsEnumerable()` method. This method determines if the specified property, string or symbol, is an enumerable own property of the object. If the object does not have the specified property, this method returns `false`.\n\nThis method is equivalent to [`Object.getOwnPropertyDescriptor(obj, prop)?.enumerable ?? false`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Object/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string representing the object. This method is meant to be overridden by derived objects for locale-specific purposes.\n\n## Syntax\n\n```js\ntoLocaleString()\n```\n\n### Parameters\n\nNone. However, all objects that override this method are expected to accept at most two parameters, corresponding to `locales` and `options`, such as [`Date.prototype.toLocaleString()`](../../../globals/Date/prototype/toLocaleString.mdx). The parameter positions should not be used for any other purpose.\n\n### Return value\n\nThe return value of calling `this.toString()`.\n\n## Description\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `toLocaleString()` method. `Object`'s `toLocaleString` returns the result of calling [`this.toString()`](../../../globals/Object/prototype/toString.mdx).\n\nThis function is provided to give objects a generic `toLocaleString` method, even though not all may use it. In the core language, these built-in objects override `toLocaleString` to provide locale-specific formatting:\n\n- `Array`: [`Array.prototype.toLocaleString()`](../../../globals/Array/prototype/toLocaleString.mdx)\n- `Number`: [`Number.prototype.toLocaleString()`](../../../globals/Number/prototype/toLocaleString.mdx)\n- `Date`: [`Date.prototype.toLocaleString()`](../../../globals/Date/prototype/toLocaleString.mdx)\n- `BigInt`: [`BigInt.prototype.toLocaleString()`](../../../globals/BigInt/prototype/toLocaleString.mdx)\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Object/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.toString()\n\nThe **`toString()`** method returns a string representing the object. This method is meant to be overridden by derived objects for custom [type conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) logic.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nBy default `toString()` takes no parameters. However, objects that inherit from `Object` may override it with their own implementations that do take parameters. For example, the [`Number.prototype.toString()`](../../../globals/Number/prototype/toString.mdx) and [`BigInt.prototype.toString()`](../../../globals/BigInt/prototype/toString.mdx) methods take an optional `radix` parameter.\n\n### Return value\n\nA string representing the object.\n\n## Description\n\nJavaScript calls the `toString` method to [convert an object to a primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion). You rarely need to invoke the `toString` method yourself; JavaScript automatically invokes it when encountering an object where a primitive value is expected.\n\nThis method is called in priority by [string conversion](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion), but [numeric conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#numeric_coercion) and [primitive conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion) call `valueOf()` in priority. However, because the base [`valueOf()`](../../../globals/Object/prototype/valueOf.mdx) method returns an object, the `toString()` method is usually called in the end, unless the object overrides `valueOf()`. For example, `+[1]` returns `1`, because its [`toString`](../../../globals/Array/prototype/toString.mdx) method returns `\"1\"`, which is then converted to a number.\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `toString()` method. When you create a custom object, you can override `toString()` to call a custom method, so that your custom object can be converted to a string value. Alternatively, you can add a [`Symbol.toPrimitive`](../../../globals/Symbol/toPrimitive.mdx) method, which allows even more control over the conversion process, and will always be preferred over `valueOf` or `toString` for any type conversion.\n\nTo use the base `Object.prototype.toString()` with an object that has it overridden (or to invoke it on `null` or `undefined`), you need to call [`Function.prototype.call()`](../../../globals/Function/prototype/call.mdx) or [`Function.prototype.apply()`](../../../globals/Function/prototype/apply.mdx) on it, passing the object you want to inspect as the first parameter (called `thisArg`).\n\n```js\nconst arr = [1, 2, 3];\n\narr.toString(); // \"1,2,3\"\nObject.prototype.toString.call(arr); // \"[object Array]\"\n```\n\n`Object.prototype.toString()` returns `\"[object Type]\"`, where `Type` is the object type. If the object has a [`Symbol.toStringTag`](../../../globals/Symbol/toStringTag.mdx) property whose value is a string, that value will be used as the `Type`. Many built-in objects, including [`Map`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map) and [`Symbol`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol), have a `Symbol.toStringTag`. Some objects predating ES6 do not have `Symbol.toStringTag`, but have a special tag nonetheless. They include (the tag is the same as the type name given below):\n\n- [`Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\n- [`Function`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions) (anything whose [`typeof`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/typeof) returns `\"function\"`)\n- [`Error`](../../../globals/Error/Error.mdx)\n- [`Boolean`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)\n- [`Number`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)\n- [`String`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\n- [`Date`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date)\n- [`RegExp`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp)\n\nThe [`arguments`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/arguments) object returns `\"[object Arguments]\"`. Everything else, including user-defined classes, unless with a custom `Symbol.toStringTag`, will return `\"[object Object]\"`.\n\n`Object.prototype.toString()` invoked on [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) returns `[object Null]` and `[object Undefined]`, respectively.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Object/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.valueOf()\n\nThe **`valueOf()`** method of `Object` converts the `this` value [to an object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#object_coercion). This method is meant to be overridden by derived objects for custom [type conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) logic.\n\n\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nThe `this` value, converted to an object.\n\n> **Note:** In order for `valueOf` to be useful during type conversion, it must return a primitive. Because all primitive types have their own `valueOf()` methods, calling `aPrimitiveValue.valueOf()` generally does not invoke `Object.prototype.valueOf()`.\n\n## Description\n\nJavaScript calls the `valueOf` method to [convert an object to a primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion). You rarely need to invoke the `valueOf` method yourself; JavaScript automatically invokes it when encountering an object where a primitive value is expected.\n\nThis method is called in priority by [numeric conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#numeric_coercion) and [primitive conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion), but [string conversion](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) calls `toString()` in priority, and `toString()` is very likely to return a string value (even for the [`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx) base implementation), so `valueOf()` is usually not called in this case.\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `toString()` method. The `Object.prototype.valueOf()` base implementation is deliberately useless: by returning an object, its return value will never be used by any [primitive conversion algorithm](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion). Many built-in objects override this method to return an appropriate primitive value. When you create a custom object, you can override `valueOf()` to call a custom method, so that your custom object can be converted to a primitive value. Generally, `valueOf()` is used to return a value that is most meaningful for the object — unlike `toString()`, it does not need to be a string. Alternatively, you can add a [`Symbol.toPrimitive`](../../../globals/Symbol/toPrimitive.mdx) method, which allows even more control over the conversion process, and will always be preferred over `valueOf` or `toString` for any type conversion.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Object/seal.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.seal()\n\nThe **`Object.seal()`** method _seals_ an object. Sealing an object [prevents extensions](../../globals/Object/preventExtensions.mdx) and makes existing properties non-configurable. A sealed object has a fixed set of properties: new properties cannot be added, existing properties cannot be removed, their enumerability and configurability cannot be changed, and its prototype cannot be re-assigned. Values of existing properties can still be changed as long as they are writable. `seal()` returns the same object that was passed in.\n\n## Syntax\n\n```js\nObject.seal(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be sealed.\n\n### Return value\n\nThe object being sealed.\n\n## Description\n\nSealing an object is equivalent to [preventing extensions](../../globals/Object/preventExtensions.mdx) and then changing all existing properties' descriptors to `configurable: false`. This has the effect of making the set of properties on the object fixed. Making all properties non-configurable\nalso prevents them from being converted from data properties to accessor properties and\nvice versa, but it does not prevent the values of data properties from being changed.\nAttempting to delete or add properties to a sealed object, or to convert a data property\nto accessor or vice versa, will fail, either silently or by throwing a\n[`TypeError`](../../globals/TypeError/TypeError.mdx) (most commonly, although not exclusively, when in \"strict mode\" code).\n\nThe prototype chain remains untouched. However, due to the effect of [preventing extensions](../../globals/Object/preventExtensions.mdx), the `[[Prototype]]` cannot be reassigned.\n\nUnlike [`Object.freeze()`](../../globals/Object/freeze.mdx), objects sealed with `Object.seal()` may have their existing\nproperties changed, as long as they are writable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Object/setPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.setPrototypeOf()\n\nThe **`Object.setPrototypeOf()`** method sets the prototype (i.e., the internal `[[Prototype]]` property) of a specified object to another object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null).\n\n> **Warning:** Changing the `[[Prototype]]` of an object is, by the nature of how modern JavaScript engines optimize property accesses, currently a very slow operation in every browser and JavaScript engine. In addition, the effects of altering inheritance are subtle and far-flung, and are not limited to the time spent in the `Object.setPrototypeOf(...)` statement, but may extend to **_any_** code that has access to any object whose `[[Prototype]]` has been altered. You can read more in [JavaScript engine fundamentals: optimizing prototypes](https://mathiasbynens.be/notes/prototypes).\n>\n> Because this feature is a part of the language, it is still the burden on engine developers to implement that feature performantly (ideally). Until engine developers address this issue, if you are concerned about performance, you should avoid setting the `[[Prototype]]` of an object. Instead, create a new object with the desired `[[Prototype]]` using [`Object.create()`](../../globals/Object/create.mdx).\n\n## Syntax\n\n```js\nObject.setPrototypeOf(obj, prototype)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which is to have its prototype set.\n- `prototype`\n  - : The object's new prototype (an object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null)).\n\n### Return value\n\nThe specified object.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if one of the following conditions is met:\n    - The `obj` parameter is [non-extensible](../../globals/Object/isExtensible.mdx), or it's an [immutable prototype exotic object](https://tc39.es/ecma262/#sec-immutable-prototype-exotic-objects), such as `Object.prototype`.\n    - The `prototype` parameter is not an object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null).\n\n## Description\n\n`Object.setPrototypeOf()` is generally considered the proper way to set the prototype of an object.\n\nIf the `obj` parameter is not an object (e.g. number, string, etc.), this method does nothing.\n\nFor security concerns, there are certain built-in objects that are designed to have an _immutable prototype_. This prevents prototype pollution attacks, especially [proxy-related ones](https://github.com/tc39/ecma262/issues/272). The core language only specifies `Object.prototype` as an immutable prototype exotic object, whose prototype is always `null`.\n\n```js\nObject.isExtensible(Object.prototype); // true; you can add more properties\nObject.setPrototypeOf(Object.prototype, {}); // TypeError: Immutable prototype object '#<Object>' cannot have their prototype set\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Object/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.values()\n\nThe **`Object.values()`** method returns an array of a given object's own enumerable string-keyed property values.\n\n## Syntax\n\n```js\nObject.values(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : An object.\n\n### Return value\n\nAn array containing the given object's own enumerable string-keyed property values.\n\n## Description\n\n`Object.values()` returns an array whose elements are strings corresponding to the enumerable string-keyed property values found directly upon `object`. This is the same as iterating with a `for...in` loop, except that a `for...in` loop enumerates properties in the prototype chain as well. The order of the array returned by `Object.values()` is the same as that provided by a `for...in` loop.\n\nIf you need the property keys, use [`Object.keys()`](../../globals/Object/keys.mdx) instead. If you need both the property keys and values, use [`Object.entries()`](../../globals/Object/entries.mdx) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Promise/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get Promise[Symbol.species]\n\nThe **`Promise[Symbol.species]`** accessor property returns the constructor used to construct return values from promise methods.\n\n> **Warning:** The existence of `Symbol.species` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Syntax\n\n```js\nPromise[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct return values from promise chaining methods that create new promises.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `Promise` objects. Subclass constructors may override it to change the constructor assignment. The default implementation is basically:\n\n```js\n// Hypothetical underlying implementation for illustration\nclass Promise {\n  static get [Symbol.species]() {\n    return this;\n  }\n}\n```\n\nBecause of this polymorphic implementation, `Symbol.species` of derived subclasses would also return the constructor itself by default.\n\n```js\nclass SubPromise extends Promise {}\nSubPromise[Symbol.species] === Promise; // true\n```\n\nPromise chaining methods — [`then()`](../../globals/Promise/prototype/then.mdx), [`finally()`](../../globals/Promise/prototype/finally.mdx) — return new promise objects. They get the constructor to construct the new promise through `this.constructor[Symbol.species]`. If `this.constructor` is `undefined`, or if `this.constructor[Symbol.species]` is `undefined` or `null`, the default [`Promise()`](../../globals/Promise/Promise.mdx) constructor is used. Otherwise, the constructor returned by `this.constructor[Symbol.species]` is used to construct the new promise object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Promise/Promise.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise()\n\nThe **`Promise()`** constructor is primarily used to wrap functions that do not already support promises.\n\n## Syntax\n\n```js\nnew Promise(executor)\n```\n\n> **Note:** `Promise()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `executor`\n  - : A `function` to be executed by the constructor. It receives two functions as parameters: `resolveFunc` and `rejectFunc`. Any errors thrown in the `executor` will cause the promise to be rejected, and the return value will be neglected. The semantics of `executor` are detailed below.\n\n### Return value\n\nWhen called via `new`, the `Promise` constructor returns a promise object. The promise object will become _resolved_ when either of the functions `resolveFunc` or `rejectFunc` are invoked. Note that if you call `resolveFunc` or `rejectFunc` and pass another `Promise` object as an argument, it can be said to be \"resolved\", but still not \"settled\". See the [Promise description](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#description) for more explanation.\n\n## Description\n\nTraditionally (before promises), asynchronous tasks were designed as callbacks.\n\n```js\nreadFile(\"./data.txt\", (error, result) => {\n  // This callback will be called when the task is done, with the\n  // final `error` or `result`. Any operation dependent on the\n  // result must be defined within this callback.\n});\n// Code here is immediately executed after the `readFile` request\n// is fired. It does not wait for the callback to be called, hence\n// making `readFile` \"asynchronous\".\n```\n\nTo take advantage of the readability improvement and language features offered by promises, the `Promise()` constructor allows one to transform the callback-based API to a promise-based one.\n\n> **Note:** If your task is already promise-based, you likely do not need the `Promise()` constructor.\n\nThe `executor` is custom code that ties an outcome in a callback to a promise. You, the programmer, write the `executor`. Its signature is expected to be:\n\n```js\nfunction executor(resolveFunc, rejectFunc) {\n  // Typically, some asynchronous operation that accepts a callback,\n  // like the `readFile` function above\n}\n```\n\n`resolveFunc` and `rejectFunc` are also functions, and you can give them whatever actual names you want. Their signatures are simple: they accept a single parameter of any type.\n\n```js\nresolveFunc(value); // call on resolved\nrejectFunc(reason); // call on rejected\n```\n\nThe `value` parameter passed to `resolveFunc` can be another promise object, in which case the newly constructed promise's state will be \"locked in\" to the promise passed (as part of the [resolution](#resolver-function) promise). The `rejectFunc` has semantics close to the [`throw`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/throw) statement, so `reason` is typically an [`Error`](../../globals/Error/Error.mdx) instance. If either `value` or `reason` is omitted, the promise is fulfilled/rejected with `undefined`.\n\nThe `executor`'s completion state has limited effect on the promise's state:\n\n- The `executor` return value is ignored. `return` statements within the `executor` merely impact control flow and alter whether a part of the function is executed, but do not have any impact on the promise's fulfillment value. If `executor` exits and it's impossible for `resolveFunc` or `rejectFunc` to be called in the future (for example, there are no async tasks scheduled), then the promise remains pending forever.\n- If an error is thrown in the `executor`, the promise is rejected, unless `resolveFunc` or `rejectFunc` has already been called.\n\n> **Note:** The existence of pending promises does not prevent the program from exiting. If the event loop is empty, the program exits despite any pending promises (because those are necessarily forever-pending).\n\nHere's a summary of the typical flow:\n\n1. At the time when the constructor generates the new `Promise` object, it also generates a corresponding pair of functions for `resolveFunc` and `rejectFunc`; these are \"tethered\" to the `Promise` object.\n2. `executor` typically wraps some asynchronous operation which provides a callback-based API. The callback (the one passed to the original callback-based API) is defined within the `executor` code, so it has access to the `resolveFunc` and `rejectFunc`.\n3. The `executor` is called synchronously (as soon as the `Promise` is constructed) with the `resolveFunc` and `rejectFunc` functions as arguments.\n4. The code within the `executor` has the opportunity to perform some operation. The eventual completion of the asynchronous task is communicated with the promise instance via the side effect caused by `resolveFunc` or `rejectFunc`. The side effect is that the `Promise` object becomes \"resolved\".\n   - If `resolveFunc` is called first, the value passed will be [resolved](#resolver-function). The promise may stay pending (in case another [thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) is passed), become fulfilled (in most cases where a non-thenable value is passed), or become rejected (in case of an invalid resolution value).\n   - If `rejectFunc` is called first, the promise instantly becomes rejected.\n   - Once one of the resolving functions (`resolveFunc` or `rejectFunc`) is called, the promise stays resolved. Only the first call to `resolveFunc` or `rejectFunc` affects the promise's eventual state, and subsequent calls to either function can neither change the fulfillment value/rejection reason nor toggle its eventual state from \"fulfilled\" to \"rejected\" or opposite.\n   - If `executor` exits by throwing an error, then the promise is rejected. However, the error is ignored if one of the resolving functions has already been called (so that the promise is already resolved).\n   - Resolving the promise does not necessarily cause the promise to become fulfilled or rejected (i.e. settled). The promise may still be pending because it's resolved with another thenable, but its eventual state will match that of the resolved thenable.\n5. Once the promise settles, it (asynchronously) invokes any further handlers associated through [`Promise.prototype.then`](../../globals/Promise/prototype/then.mdx), [`Promise.prototype.catch`](../../globals/Promise/prototype/catch.mdx), or [`Promise.prototype.finally`](../../globals/Promise/prototype/finally.mdx). The eventual fulfillment value or rejection reason is passed to the invocation of fulfillment and rejection handlers as an input parameter (see [Chained Promises](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#chained_promises)).\n\nFor example, the callback-based `readFile` API above can be transformed into a promise-based one.\n\n```js\nconst readFilePromise = (path) =>\n  new Promise((resolve, reject) => {\n    readFile(path, (error, result) => {\n      if (error) {\n        reject(error);\n      } else {\n        resolve(result);\n      }\n    });\n  });\n\nreadFilePromise(\"./data.txt\")\n  .then((result) => console.log(result))\n  .catch((error) => console.error(\"Failed to read data\"));\n```\n\n### Resolver function\n\nThe resolver function `resolveFunc` has the following behaviors:\n\n- If it's called with the same value as the newly created promise (the promise it's \"tethered to\"), the promise is rejected with a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n- If it's called with a non-[thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) value (a primitive, or an object whose `then` property is not callable, including when the property is not present), the promise is immediately fulfilled with that value.\n- If it's called with a thenable value (including another `Promise` instance), then the thenable's `then` method is saved and called in the future (it's always called asynchronously). The `then` method will be called with two callbacks, which are two new functions with the exact same behaviors as the `resolveFunc` and `rejectFunc` passed to the `executor` function. If calling the `then` method throws, then the current promise is rejected with the thrown error.\n\nIn the last case, it means code like:\n\n```js\nnew Promise((resolve, reject) => {\n  resolve(thenable);\n});\n```\n\nIs roughly equivalent to:\n\n```js\nnew Promise((resolve, reject) => {\n  try {\n    thenable.then(\n      (value) => resolve(value),\n      (reason) => reject(reason),\n    );\n  } catch (e) {\n    reject(e);\n  }\n});\n```\n\nExcept that in the `resolve(thenable)` case:\n\n1. `resolve` is called synchronously, so that calling `resolve` or `reject` again has no effect, even when the handlers attached through `anotherPromise.then()` are not called yet.\n2. The `then` method is called asynchronously, so that the promise will never be instantly resolved if a thenable is passed.\n\nBecause `resolve` is called again with whatever `thenable.then()` passes to it as `value`, the resolver function is able to flatten nested thenables, where a thenable calls its `onFulfilled` handler with another thenable. The effect is that the fulfillment handler of a real promise will never receive a thenable as its fulfillment value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Promise/all.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.all()\n\nThe **`Promise.all()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise fulfills when all of the input's promises fulfill (including when an empty iterable is passed), with an array of the fulfillment values. It rejects when any of the input's promises rejects, with this first rejection reason.\n\n## Syntax\n\n```js\nPromise.all(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array` of promises.\n\n### Return value\n\nA `Promise` that is:\n\n- **Already fulfilled**, if the `iterable` passed is empty.\n- **Asynchronously fulfilled**, when all the promises in the given `iterable` fulfill. The fulfillment value is an array of fulfillment values, in the order of the promises passed, regardless of completion order. If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) fulfilled.\n- **Asynchronously rejected**, when any of the promises in the given `iterable` rejects. The rejection reason is the rejection reason of the first promise that was rejected.\n\n## Description\n\nThe `Promise.all()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. It can be useful for aggregating the results of multiple promises. It is typically used when there are multiple related asynchronous tasks that the overall code relies on to work successfully — all of whom we want to fulfill before the code execution continues.\n\n`Promise.all()` will reject immediately upon **any** of the input promises rejecting. In comparison, the promise returned by [`Promise.allSettled()`](../../globals/Promise/allSettled.mdx) will wait for all input promises to complete, regardless of whether or not one rejects. Use `allSettled()` if you need the final result of every promise in the input iterable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Promise/allSettled.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.allSettled()\n\nThe **`Promise.allSettled()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise fulfills when all of the input's promises settle (including when an empty iterable is passed), with an array of objects that describe the outcome of each promise.\n\n## Syntax\n\n```js\nPromise.allSettled(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array` of promises.\n\n### Return value\n\nA `Promise` that is:\n\n- **Already fulfilled**, if the `iterable` passed is empty.\n- **Asynchronously fulfilled**, when all promise in the given `iterable` have settled (either fulfilled or rejected). The fulfillment value is an array of objects, each describing the outcome of one promise in the `iterable`, in the order of the promises passed, regardless of completion order. Each outcome object has the following properties:\n\n  - `status`\n    - : A string, either `\"fulfilled\"` or `\"rejected\"`, indicating the eventual state of the promise.\n  - `value`\n    - : Only present if `status` is `\"fulfilled\"`. The value that the promise was fulfilled with.\n  - `reason`\n    - : Only present if `status` is `\"rejected\"`. The reason that the promise was rejected with.\n\n  If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) fulfilled.\n\n## Description\n\nThe `Promise.allSettled()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. `Promise.allSettled()` is typically used when you have multiple asynchronous tasks that are not dependent on one another to complete successfully, or you'd always like to know the result of each promise.\n\nIn comparison, the Promise returned by [`Promise.all()`](../../globals/Promise/all.mdx) may be more appropriate if the tasks are dependent on each other, or if you'd like to immediately reject upon any of them rejecting.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Promise/any.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.any()\n\nThe **`Promise.any()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise fulfills when any of the input's promises fulfills, with this first fulfillment value. It rejects when all of the input's promises reject (including when an empty iterable is passed), with an `AggregateError` containing an array of rejection reasons.\n\n## Syntax\n\n```js\nPromise.any(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array` of promises.\n\n### Return value\n\nA `Promise` that is:\n\n- **Already rejected**, if the `iterable` passed is empty.\n- **Asynchronously fulfilled**, when any of the promises in the given `iterable` fulfills. The fulfillment value is the fulfillment value of the first promise that was fulfilled.\n- **Asynchronously rejected**, when all of the promises in the given `iterable` reject. The rejection reason is an `AggregateError` containing an array of rejection reasons in its `errors` property. The errors are in the order of the promises passed, regardless of completion order. If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) rejected.\n\n## Description\n\nThe `Promise.any()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. This method is useful for returning the first promise that fulfills. It short-circuits after a promise fulfills, so it does not wait for the other promises to complete once it finds one.\n\nUnlike [`Promise.all()`](../../globals/Promise/all.mdx), which returns an _array_ of fulfillment values, we only get one fulfillment value (assuming at least one promise fulfills). This can be beneficial if we need only one promise to fulfill but we do not care which one does. Note another difference: this method rejects upon receiving an _empty iterable_, since, truthfully, the iterable contains no items that fulfill. You may compare `Promise.any()` and `Promise.all()` with [`Array.prototype.some()`](../../globals/Array/prototype/some.mdx) and [`Array.prototype.every()`](../../globals/Array/prototype/every.mdx).\n\nAlso, unlike [`Promise.race()`](../../globals/Promise/race.mdx), which returns the first _settled_ value (either fulfillment or rejection), this method returns the first _fulfilled_ value. This method ignores all rejected promises up until the first promise that fulfills.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Promise/prototype/catch.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.prototype.catch()\n\nThe **`catch()`** method of a `Promise` object schedules a function to be called when the promise is rejected. It immediately returns an equivalent `Promise` object, allowing you to [chain](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining) calls to other promise methods. It is a shortcut for [`Promise.prototype.then(undefined, onRejected)`](../../../globals/Promise/prototype/then.mdx).\n\n## Syntax\n\n```js\ncatch(onRejected)\n\ncatch((reason) => {\n  // rejection handler\n})\n```\n\n### Parameters\n\n- `onRejected`\n  - : A `Function` called when the `Promise` is rejected. This function has one parameter: the _rejection reason_.\n\n### Return value\n\nReturns a new `Promise`. This new promise is always pending when returned, regardless of the current promise's status. It's eventually rejected if `onRejected` throws an error or returns a Promise which is itself rejected; otherwise, it's eventually fulfilled.\n\n## Description\n\nThe `catch` method is used for error handling in promise composition. Since it returns a `Promise`, it [can be chained](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining_after_a_catch) in the same way as its sister method, [`Promise.prototype.then()`](../../../globals/Promise/prototype/then.mdx).\n\nIf a promise becomes rejected, and there are no rejection handlers to call (a handler can be attached through any of [`Promise.prototype.then`](../../../globals/Promise/prototype/then.mdx), [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx), or [`Promise.prototype.finally`](../../../globals/Promise/prototype/finally.mdx)), then the rejection event is surfaced by the host. In the browser, this results in an [`unhandledrejection`](https://developer.mozilla.org/docs/Web/API/Window/unhandledrejection_event) event. If a handler is attached to a rejected promise whose rejection has already caused an unhandled rejection event, then another [`rejectionhandled`](https://developer.mozilla.org/docs/Web/API/Window/rejectionhandled_event) event is fired.\n\n`catch()` internally calls `then()` on the object upon which it was called, passing `undefined` and `onRejected` as arguments. The value of that call is directly returned. This is observable if you wrap the methods.\n\n```js\n// overriding original Promise.prototype.then/catch just to add some logs\n((Promise) => {\n  const originalThen = Promise.prototype.then;\n  const originalCatch = Promise.prototype.catch;\n\n  Promise.prototype.then = function (...args) {\n    console.log(\"Called .then on %o with arguments: %o\", this, args);\n    return originalThen.apply(this, args);\n  };\n  Promise.prototype.catch = function (...args) {\n    console.error(\"Called .catch on %o with arguments: %o\", this, args);\n    return originalCatch.apply(this, args);\n  };\n})(Promise);\n\n// calling catch on an already resolved promise\nPromise.resolve().catch(function XXX() {});\n\n// Logs:\n// Called .catch on Promise{} with arguments: Arguments{1} [0: function XXX()]\n// Called .then on Promise{} with arguments: Arguments{2} [0: undefined, 1: function XXX()]\n```\n\nThis means that passing `undefined` still causes the returned promise to be rejected, and you have to pass a function to prevent the final promise from being rejected.\n\nBecause `catch()` just calls `then()`, it supports subclassing.\n\n> **Note:** The examples below are throwing instances of [`Error`](../../../globals/Error/Error.mdx). As with synchronous [`throw`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/throw) statements, this is considered a good practice; otherwise, the part doing the catching would have to perform checks to see if the argument was a string or an error, and you might lose valuable information such as stack traces.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Promise/prototype/finally.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.prototype.finally()\n\nThe **`finally()`** method of a `Promise` object schedules a function to be called when the promise is settled (either fulfilled or rejected). It immediately returns an equivalent `Promise` object, allowing you to [chain](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining) calls to other promise methods.\n\nThis lets you avoid duplicating code in both the promise's [`Promise.prototype.then`](../../../globals/Promise/prototype/then.mdx) and [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx) handlers.\n\n## Syntax\n\n```js\nfinally(onFinally)\n\nfinally(() => {\n  // Code that will run after promise is settled (fulfilled or rejected)\n})\n```\n\n### Parameters\n\n- `onFinally`\n  - : A `Function` called when the `Promise` is settled. This handler receives no parameters.\n\n### Return value\n\nReturns an equivalent `Promise`. If the handler throws an error or returns a rejected promise, the promise returned by `finally()` will be rejected with that value instead. Otherwise, the return value of the handler does not affect the state of the original promise.\n\n## Description\n\nThe `finally()` method can be useful if you want to do some processing or cleanup once the promise is settled, regardless of its outcome.\n\nThe `finally()` method is very similar to calling [`then(onFinally, onFinally)`](../../../globals/Promise/prototype/then.mdx). However, there are a couple of differences:\n\n- When creating a function inline, you can pass it once, instead of being forced to either declare it twice, or create a variable for it.\n- The `onFinally` callback does not receive any argument. This use case is for precisely when you _do not care_ about the rejection reason or the fulfillment value, and so there's no need to provide it.\n- A `finally()` call is usually transparent and does not change the eventual state of the original promise. So for example:\n  - Unlike `Promise.resolve(2).then(() => 77, () => {})`, which returns a promise eventually fulfilled with the value `77`, `Promise.resolve(2).finally(() => 77)` returns a promise eventually fulfilled with the value `2`.\n  - Similarly, unlike `Promise.reject(3).then(() => {}, () => 88)`, which returns a promise eventually fulfilled with the value `88`, `Promise.reject(3).finally(() => 88)` returns a promise eventually rejected with the reason `3`.\n\n> **Note:** A `throw` (or returning a rejected promise) in the `finally` callback still rejects the returned promise. For example, both `Promise.reject(3).finally(() => { throw 99; })` and `Promise.reject(3).finally(() => Promise.reject(99))` reject the returned promise with the reason `99`.\n\nLike [`Promise.prototype.catch()`](../../../globals/Promise/prototype/catch.mdx), `finally()` internally calls the `then` method on the object upon which it was called. If `onFinally` is not a function, `then()` is called with `onFinally` as both arguments — which, for [`Promise.prototype.then()`](../../../globals/Promise/prototype/then.mdx), means that no useful handler is attached. Otherwise, `then()` is called with two internally created functions, which behave like the following:\n\n> **Warning:** This is only for demonstration purposes and is not a polyfill.\n\n```js\npromise.then(\n  (value) => Promise.resolve(onFinally()).then(() => value),\n  (reason) =>\n    Promise.resolve(onFinally()).then(() => {\n      throw reason;\n    }),\n);\n```\n\nBecause `finally()` calls `then()`, it supports subclassing. Moreover, notice the [`Promise.resolve()`](../../../globals/Promise/resolve.mdx) call above — in reality, `onFinally()`'s return value is resolved using the same algorithm as `Promise.resolve()`, but the actual constructor used to construct the resolved promise will be the subclass. `finally()` gets this constructor through [`promise.constructor[Symbol.species]`](../../../globals/Promise/@@species.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Promise/prototype/then.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.prototype.then()\n\nThe **`then()`** method of a `Promise` object takes up to two arguments: callback functions for the fulfilled and rejected cases of the `Promise`. It immediately returns an equivalent `Promise` object, allowing you to [chain](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining) calls to other promise methods.\n\n## Syntax\n\n```js\nthen(onFulfilled)\nthen(onFulfilled, onRejected)\n\nthen(\n  (value) => { /* fulfillment handler */ },\n  (reason) => { /* rejection handler */ },\n)\n```\n\n### Parameters\n\n- `onFulfilled` _**optional**_\n  - : A `Function` asynchronously called if the `Promise` is fulfilled. This function has one parameter, the _fulfillment value_. If it is not a function, it is internally replaced with an _identity_ function (`(x) => x`) which simply passes the fulfillment value forward.\n- `onRejected` _**optional**_\n  - : A `Function` asynchronously called if the `Promise` is rejected. This function has one parameter, the _rejection reason_. If it is not a function, it is internally replaced with a _thrower_ function (`(x) => { throw x; }`) which throws the rejection reason it received.\n\n### Return value\n\nReturns a new `Promise` immediately. This new promise is always pending when returned, regardless of the current promise's status.\n\nOne of the `onFulfilled` and `onRejected` handlers will be executed to handle the current promise's fulfillment or rejection. The call always happens asynchronously, even when the current promise is already settled. The behavior of the returned promise (call it `p`) depends on the handler's execution result, following a specific set of rules. If the handler function:\n\n- returns a value: `p` gets fulfilled with the returned value as its value.\n- doesn't return anything: `p` gets fulfilled with `undefined`.\n- throws an error: `p` gets rejected with the thrown error as its value.\n- returns an already fulfilled promise: `p` gets fulfilled with that promise's value as its value.\n- returns an already rejected promise: `p` gets rejected with that promise's value as its value.\n- returns another pending promise: the fulfillment/rejection of the promise returned by `then` will be subsequent to the resolution/rejection of the promise returned by the handler. Also, the resolved value of the promise returned by `then` will be the same as the resolved value of the promise returned by the handler.\n\n## Description\n\nThe `then()` method schedules callback functions for the eventual completion of a Promise — either fulfillment or rejection. It is the primitive method of promises: the [thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) protocol expects all promise-like objects to expose a `then()` method, and the [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx) and [`Promise.prototype.finally`](../../../globals/Promise/prototype/finally.mdx) methods both work by invoking the object's `then()` method.\n\nFor more information about the `onRejected` handler, see the [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx) reference.\n\n`then()` returns a new promise object. If you call the `then()` method twice on the same promise object (instead of chaining), then this promise object will have two pairs of settlement handlers. All handlers attached to the same promise object are always called in the order they were added. Moreover, the two promises returned by each call of `then()` start separate chains and do not wait for each other's settlement.\n\n[Thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) objects that arise along the `then()` chain are always [resolved](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise/Promise#the_resolver_function) — the `onFulfilled` handler never receives a thenable object, and any thenable returned by either handler are always resolved before being passed to the next handler. This is because when constructing the new promise, the `resolve` and `reject` functions passed by the `executor` are saved, and when the current promise settles, the respective function will be called with the fulfillment value or rejection reason. The resolving logic comes from the resolver function passed by the [`Promise()`](../../../globals/Promise/Promise.mdx) constructor.\n\n`then()` supports subclassing, which means it can be called on instances of subclasses of `Promise`, and the result will be a promise of the subclass type. You can customize the type of the return value through the [`[Symbol.species]`](../../../globals/Promise/@@species.mdx) property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Promise/race.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.race()\n\nThe **`Promise.race()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise settles with the eventual state of the first promise that settles.\n\n## Syntax\n\n```js\nPromise.race(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array`) of promises.\n\n### Return value\n\nA `Promise` that **asynchronously settles** with the eventual state of the first promise in the `iterable` to settle. In other words, it fulfills if the first promise to settle is fulfilled, and rejects if the first promise to settle is rejected. The returned promise remains pending forever if the `iterable` passed is empty. If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) settled.\n\n## Description\n\nThe `Promise.race()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. It's useful when you want the first async task to complete, but do not care about its eventual state (i.e. it can either succeed or fail).\n\nIf the iterable contains one or more non-promise values and/or an already settled promise, then `Promise.race()` will settle to the first of these values found in the iterable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Promise/reject.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.reject()\n\nThe **`Promise.reject()`** method returns a `Promise` object that is rejected with a given reason.\n\n## Syntax\n\n```js\nPromise.reject(reason)\n```\n\n### Parameters\n\n- `reason`\n  - : Reason why this `Promise` rejected.\n\n### Return value\n\nA `Promise` that is rejected with the given reason.\n\n## Description\n\nThe static `Promise.reject` function returns a `Promise` that is rejected. For debugging purposes and selective error catching, it is useful to make `reason` an `instanceof` [`Error`](../../globals/Error/Error.mdx).\n\n`Promise.reject()` is generic and supports subclassing, which means it can be called on subclasses of `Promise`, and the result will be a promise of the subclass type. To do so, the subclass's constructor must implement the same signature as the [`Promise()`](../../globals/Promise/Promise.mdx) constructor — accepting a single `executor` function that can be called with the `resolve` and `reject` callbacks as parameters. `Promise.reject()` is essentially a shorthand for `new Promise((resolve, reject) => reject(reason))`.\n\nUnlike [`Promise.resolve()`](../../globals/Promise/resolve.mdx), `Promise.reject()` always wraps `reason` in a new `Promise` object, even when `reason` is already a `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Promise/resolve.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.resolve()\n\nThe **`Promise.resolve()`** method \"resolves\" a given value to a `Promise`. If the value is a promise, that promise is returned; if the value is a [thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables), `Promise.resolve()` will call the `then()` method with two callbacks it prepared; otherwise the returned promise will be fulfilled with the value.\n\nThis function flattens nested layers of promise-like objects (e.g. a promise that fulfills to a promise that fulfills to something) into a single layer — a promise that fulfills to a non-thenable value.\n\n## Syntax\n\n```js\nPromise.resolve(value)\n```\n\n### Parameters\n\n- `value`\n  - : Argument to be resolved by this `Promise`. Can also be a `Promise` or a thenable to resolve.\n\n### Return value\n\nA `Promise` that is resolved with the given value, or the promise passed as value, if the value was a promise object. A resolved promise can be in any of the states — fulfilled, rejected, or pending. For example, resolving a rejected promise will still result in a rejected promise.\n\n## Description\n\n`Promise.resolve()` _resolves_ a promise, which is not the same as fulfilling or rejecting the promise. See [Promise description](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#description) for definitions of the terminology. In brief, `Promise.resolve()` returns a promise whose eventual state depends on another promise, thenable object, or other value.\n\n`Promise.resolve()` is generic and supports subclassing, which means it can be called on subclasses of `Promise`, and the result will be a promise of the subclass type. To do so, the subclass's constructor must implement the same signature as the [`Promise()`](../../globals/Promise/Promise.mdx) constructor — accepting a single `executor` function that can be called with the `resolve` and `reject` callbacks as parameters.\n\n`Promise.resolve()` special-cases native `Promise` instances. If `value` belongs to `Promise` or a subclass, and `value.constructor === Promise`, then `value` is directly returned by `Promise.resolve()`, without creating a new `Promise` instance. Otherwise, `Promise.resolve()` is essentially a shorthand for `new Promise((resolve) => resolve(value))`.\n\nThe bulk of the resolving logic is actually implemented by the [resolver function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise/Promise#the_resolver_function) passed by the `Promise()` constructor. In summary:\n\n- If a non-[thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) value is passed, the returned promise is already fulfilled with that value.\n- If a thenable is passed, the returned promise will adopt the state of that thenable by calling the `then` method and passing a pair of resolving functions as arguments. (But because native promises directly pass through `Promise.resolve()` without creating a wrapper, the `then` method is not called on native promises.) If the resolver function receives another thenable object, it will be resolved agin, so that the eventual fulfillment value of the promise will never be thenable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Proxy/Proxy.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Proxy()\n\nThe **`Proxy()`** constructor is used to create `Proxy` objects.\n\n## Syntax\n\n```js\nnew Proxy(target, handler)\n```\n\n> **Note:** `Proxy()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `target`\n  - : A target object to wrap with `Proxy`. It can be any sort of object,\n    including a native array, a function, or even another proxy.\n- `handler`\n  - : An object whose properties are functions that define the behavior of the proxy when\n    an operation is performed on it.\n\n## Description\n\nUse the `Proxy()` constructor to create a new `Proxy` object.\nThis constructor takes two mandatory arguments:\n\n- `target` is the object for which you want to create the proxy\n- `handler` is the object that defines the custom behavior of the proxy.\n\nAn empty handler will create a proxy that behaves, in almost all respects, exactly like\nthe target. By defining any of a set group of functions on the `handler`\nobject, you can customize specific aspects of the proxy's behavior. For example, by\ndefining `get()` you can provide a customized version of the target's\n[property accessor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Property_Accessors).\n\n### Handler functions\n\nThis section lists all the handler functions you can define. Handler functions are\nsometimes called _traps_, because they trap calls to the underlying target\nobject.\n\n- [`handler.apply()`](../../globals/Proxy/proxy/apply.mdx)\n  - : A trap for a function call.\n- [`handler.construct()`](../../globals/Proxy/proxy/construct.mdx)\n  - : A trap for the `new` operator.\n- [`handler.defineProperty()`](../../globals/Proxy/proxy/defineProperty.mdx)\n  - : A trap for [`Object.defineProperty`](../../globals/Object/defineProperty.mdx).\n- [`handler.deleteProperty()`](../../globals/Proxy/proxy/deleteProperty.mdx)\n  - : A trap for the `delete` operator.\n- [`handler.get()`](../../globals/Proxy/proxy/get.mdx)\n  - : A trap for getting property values.\n- [`handler.getOwnPropertyDescriptor()`)}](../../globals/Proxy/proxy/getOwnPropertyDescriptor.mdx)\n  - : A trap for [`Object.getOwnPropertyDescriptor`](../../globals/Object/getOwnPropertyDescriptor.mdx).\n- [`handler.getPrototypeOf()`](../../globals/Proxy/proxy/getPrototypeOf.mdx)\n  - : A trap for [`Object.getPrototypeOf()`](../../globals/Object/getPrototypeOf.mdx).\n- [`handler.has()`](../../globals/Proxy/proxy/has.mdx)\n  - : A trap for the `in` operator.\n- [`handler.isExtensible()`](../../globals/Proxy/proxy/isExtensible.mdx)\n  - : A trap for [`Object.isExtensible()`](../../globals/Object/isExtensible.mdx).\n- [`handler.ownKeys()`](../../globals/Proxy/proxy/ownKeys.mdx)\n  - : A trap for [`Object.getOwnPropertyNames()`](../../globals/Object/getOwnPropertyNames.mdx) and\n    [`Object.getOwnPropertySymbols()`](../../globals/Object/getOwnPropertySymbols.mdx).\n- [`handler.preventExtensions()`)}](../../globals/Proxy/proxy/preventExtensions.mdx)\n  - : A trap for [`Object.preventExtensions()`](../../globals/Object/preventExtensions.mdx).\n- [`handler.set()`](../../globals/Proxy/proxy/set.mdx)\n  - : A trap for setting property values.\n- [`handler.setPrototypeOf()`](../../globals/Proxy/proxy/setPrototypeOf.mdx)\n  - : A trap for [`Object.setPrototypeOf()`](../../globals/Object/setPrototypeOf.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Proxy/proxy/apply.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.apply()\n\nThe **`handler.apply()`** method is a trap for a function call.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  apply(target, thisArg, argumentsList) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `apply()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target callable object.\n- `thisArg`\n  - : The `this` argument for the call.\n- `argumentsList`\n  - : The list of arguments for the call.\n\n### Return value\n\nThe `apply()` method can return any value.\n\n## Description\n\nThe **`handler.apply()`** method is a trap for a function call.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- Function call: `proxy(...args)`\n- [`Function.prototype.apply()`](../../../globals/Function/prototype/apply.mdx) and [`Function.prototype.call()`](../../../globals/Function/prototype/call.mdx)\n- [`Reflect.apply()`](../../../globals/Reflect/apply.mdx)\n\nOr any other operation that invokes the `[[Call]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The `target` must be a callable itself. That is, it must be a function object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Proxy/proxy/construct.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.construct()\n\nThe **`handler.construct()`** method is a trap for the `new` operator. In order for the new operation to be valid on the resulting Proxy object, the target used to initialize the proxy must itself have a `[[Construct]]` internal method (i.e. `new target` must be valid).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  construct(target, argumentsList, newTarget) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `construct()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `argumentsList`\n  - : The list of arguments for the constructor.\n- `newTarget`\n  - : The constructor that was originally called, `p` above.\n\n### Return value\n\nThe `construct` method must return an object.\n\n## Description\n\nThe **`handler.construct()`** method is a trap for the `new` operator.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- The `new` operator: `new myFunction(...args)`\n- [`Reflect.construct()`](../../../globals/Reflect/construct.mdx)\n\nOr any other operation that invokes the `[[Construct]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The result must be an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Proxy/proxy/defineProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.defineProperty()\n\nThe **`handler.defineProperty()`** method is a trap for\n[`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  defineProperty(target, property, descriptor) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `defineProperty()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property whose description is to be\n    retrieved.\n- `descriptor`\n  - : The descriptor for the property being defined or modified.\n\n### Return value\n\nThe `defineProperty()` method must return a `Boolean` indicating\nwhether or not the property has been successfully defined.\n\n## Description\n\nThe **`handler.defineProperty()`** method is a trap for\n[`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx), [`Object.defineProperties()`](../../../globals/Object/defineProperties.mdx)\n- [`Reflect.defineProperty()`](../../../globals/Reflect/defineProperty.mdx)\n\nOr any other operation that invokes the `[[DefineOwnProperty]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- A property cannot be added, if the target object is not extensible.\n- A property cannot be added as or modified to be non-configurable, if it does not\n  exists as a non-configurable own property of the target object.\n- A property may not be non-configurable, if a corresponding configurable property of\n  the target object exists.\n- If a property has a corresponding target object property then\n  `Object.defineProperty(target, prop, descriptor)`\n  will not throw an exception.\n- In strict mode, a `false` return value from the\n  `defineProperty()` handler will throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Proxy/proxy/deleteProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.deleteProperty()\n\nThe **`handler.deleteProperty()`** method is a trap for the `delete` operator.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  deleteProperty(target, property) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `deleteProperty()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property to delete.\n\n### Return value\n\nThe `deleteProperty()` method must return a `Boolean` indicating\nwhether or not the property has been successfully deleted.\n\n## Description\n\nThe **`handler.deleteProperty()`** method is a trap for the `delete` operator.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- The [`delete`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) operator: `delete proxy[foo]` and\n  `delete proxy.foo`\n- [`Reflect.deleteProperty()`](../../../globals/Reflect/deleteProperty.mdx)\n\nOr any other operation that invokes the `[[Delete]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- A property cannot be deleted, if it exists as a non-configurable own property of the\n  target object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Proxy/proxy/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.get()\n\nThe **`handler.get()`** method is a trap for getting a property\nvalue.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  get(target, property, receiver) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `get()` method. `this`\nis bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property to get.\n- `receiver`\n  - : Either the proxy or an object that inherits from the proxy.\n\n### Return value\n\nThe `get()` method can return any value.\n\n## Description\n\nThe **`handler.get()`** method is a trap for getting a property\nvalue.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- Property access: `proxy[foo]` and `proxy.bar`\n- [`Reflect.get()`](../../../globals/Reflect/get.mdx)\n\nOr any other operation that invokes the `[[Get]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The value reported for a property must be the same as the value of the corresponding\n  target object property if the target object property is a non-writable,\n  non-configurable own data property.\n- The value reported for a property must be undefined if the corresponding target\n  object property is a non-configurable own accessor property that has\n  `undefined` as its `[[Get]]` attribute.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Proxy/proxy/getOwnPropertyDescriptor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.getOwnPropertyDescriptor()\n\nThe **`handler.getOwnPropertyDescriptor()`** method is a trap for [`Object.getOwnPropertyDescriptor()`](../../../globals/Object/getOwnPropertyDescriptor.mdx).\n\n\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  getOwnPropertyDescriptor(target, prop) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `getOwnPropertyDescriptor()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `prop`\n  - : The name of the property whose description should be retrieved.\n\n### Return value\n\nThe `getOwnPropertyDescriptor()` method must return an object or `undefined`.\n\n## Description\n\nThe **`handler.getOwnPropertyDescriptor()`** method is a trap for [`Object.getOwnPropertyDescriptor()`](../../../globals/Object/getOwnPropertyDescriptor.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.getOwnPropertyDescriptor()`](../../../globals/Object/getOwnPropertyDescriptor.mdx)\n- [`Reflect.getOwnPropertyDescriptor()`](../../../globals/Reflect/getOwnPropertyDescriptor.mdx)\n\nOr any other operation that invokes the `[[GetOwnProperty]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `getOwnPropertyDescriptor()` must return an object or `undefined`.\n- A property cannot be reported as non-existent, if it exists as a non-configurable own property of the target object.\n- A property cannot be reported as non-existent, if it exists as an own property of the target object and the target object is not extensible.\n- A property cannot be reported as existent, if it does not exists as an own property of the target object and the target object is not extensible.\n- A property cannot be reported as non-configurable, if it does not exists as an own property of the target object or if it exists as a configurable own property of the target object.\n- The result of `Object.getOwnPropertyDescriptor(target)` can be applied to the target object using `Object.defineProperty()` and will not throw an exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Proxy/proxy/getPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.getPrototypeOf()\n\nThe **`handler.getPrototypeOf()`** method is a trap for the\n`[[GetPrototypeOf]]` internal method.\n\n## Syntax\n\n```js\nnew Proxy(obj, {\n  getPrototypeOf(target) {\n    // …\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `getPrototypeOf()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `getPrototypeOf()` method must return an object or `null`.\n\n## Description\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.getPrototypeOf()`](../../../globals/Object/getPrototypeOf.mdx)\n- [`Reflect.getPrototypeOf()`](../../../globals/Reflect/getPrototypeOf.mdx)\n- [`Object.prototype.isPrototypeOf()`](../../../globals/Object/prototype/isPrototypeOf.mdx)\n- `instanceof`\n\nOr any other operation that invokes the `[[GetPrototypeOf]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `getPrototypeOf()` method must return an object or `null`.\n- If `target` is not extensible,\n  `Object.getPrototypeOf(proxy)` method must return the same\n  value as `Object.getPrototypeOf(target)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Proxy/proxy/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.has()\n\nThe **`handler.has()`** method is a trap for the `in` operator.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  has(target, prop) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to `has()` method. `this` is\nbound to the handler.\n\n- `target`\n  - : The target object.\n- `prop`\n  - : The name or `Symbol` of the property to check for existence.\n\n### Return value\n\nThe `has()` method must return a boolean value.\n\n## Description\n\nThe **`handler.has()`** method is a trap for the `in` operator.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- The [`in`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/in) operator: `foo in proxy`\n- [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) check: `with(proxy) { (foo); }`\n- [`Reflect.has()`](../../../globals/Reflect/has.mdx)\n\nOr any other operation that invokes the `[[HasProperty]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- A property cannot be reported as non-existent, if it exists as a non-configurable\n  own property of the target object.\n- A property cannot be reported as non-existent, if it exists as an own property of\n  the target object and the target object is not extensible.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Proxy/proxy/isExtensible.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.isExtensible()\n\nThe **`handler.isExtensible()`** method is a trap for\n[`Object.isExtensible()`](../../../globals/Object/isExtensible.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  isExtensible(target) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `isExtensible()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `isExtensible()` method must return a boolean value.\n\n## Description\n\nThe **`handler.isExtensible()`** method is a trap for\n[`Object.isExtensible()`](../../../globals/Object/isExtensible.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.isExtensible()`](../../../globals/Object/isExtensible.mdx)\n- [`Reflect.isExtensible()`](../../../globals/Reflect/isExtensible.mdx)\n\nOr any other operation that invokes the `[[IsExtensible]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `Object.isExtensible(proxy)` must return the same value as\n  `Object.isExtensible(target)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Proxy/proxy/ownKeys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.ownKeys()\n\nThe **`handler.ownKeys()`** method is a trap for\n[`Reflect.ownKeys()`](../../../globals/Reflect/ownKeys.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  ownKeys(target) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `ownKeys()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `ownKeys()` method must return an enumerable object.\n\n## Description\n\nThe **`handler.ownKeys()`** method is a trap for\n[`Reflect.ownKeys()`](../../../globals/Reflect/ownKeys.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.getOwnPropertyNames()`](../../../globals/Object/getOwnPropertyNames.mdx)\n- [`Object.getOwnPropertySymbols()`](../../../globals/Object/getOwnPropertySymbols.mdx)\n- [`Object.keys()`](../../../globals/Object/keys.mdx)\n- [`Reflect.ownKeys()`](../../../globals/Reflect/ownKeys.mdx)\n\nOr any other operation that invokes the `[[OwnPropertyKeys]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The result of `ownKeys()` must be an array.\n- The type of each array element is either a `String` or a `Symbol`.\n- The result List must contain the keys of all non-configurable own properties of the\n  target object.\n- If the target object is not extensible, then the result List must contain all the\n  keys of the own properties of the target object and no other values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Proxy/proxy/preventExtensions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.preventExtensions()\n\nThe **`handler.preventExtensions()`** method is a trap for [`Object.preventExtensions()`](../../../globals/Object/preventExtensions.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  preventExtensions(target) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `preventExtensions()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `preventExtensions()` method must return a boolean value.\n\n## Description\n\nThe **`handler.preventExtensions()`** method is a trap for [`Object.preventExtensions()`](../../../globals/Object/preventExtensions.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.preventExtensions()`](../../../globals/Object/preventExtensions.mdx)\n- [`Reflect.preventExtensions()`](../../../globals/Reflect/preventExtensions.mdx)\n- [`Object.seal()`](../../../globals/Object/seal.mdx)\n- [`Object.freeze()`](../../../globals/Object/freeze.mdx)\n\nOr any other operation that invokes the `[[PreventExtensions]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `Object.preventExtensions(proxy)` only returns `true` if `Object.isExtensible(proxy)` is `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Proxy/proxy/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.set()\n\nThe **`handler.set()`** method is a trap for setting a property\nvalue.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  set(target, property, value, receiver) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `set()` method. `this`\nis bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property to set.\n- `value`\n  - : The new value of the property to set.\n- `receiver`\n\n  - : The object to which the assignment was originally directed. This is usually the\n    proxy itself. But a `set()` handler can also be called indirectly, via\n    the prototype chain or various other ways.\n\n    For example, suppose a script does\n    `obj.name = \"jen\"`, and `obj` is not a\n    proxy, and has no own property `.name`, but it has a proxy on its\n    prototype chain. That proxy's `set()` handler will be called, and\n    `obj` will be passed as the receiver.\n\n### Return value\n\nThe `set()` method should return a boolean value.\n\n- Return `true` to indicate that assignment succeeded.\n- If the `set()` method returns `false`, and the assignment\n  happened in strict-mode code, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) will be thrown.\n\n## Description\n\nThe **`handler.set()`** method is a trap for setting property\nvalue.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- Property assignment: `proxy[foo] = bar` and `proxy.foo = bar`\n- [`Reflect.set()`](../../../globals/Reflect/set.mdx)\n\nOr any other operation that invokes the `[[Set]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- Cannot change the value of a property to be different from the value of the\n  corresponding target object property if the corresponding target object property is a\n  non-writable, non-configurable data property.\n- Cannot set the value of a property if the corresponding target object property is a\n  non-configurable accessor property that has `undefined` as its\n  `[[Set]]` attribute.\n- In strict mode, a `false` return value from the `set()`\n  handler will throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Proxy/proxy/setPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.setPrototypeOf()\n\nThe **`handler.setPrototypeOf()`** method is a trap for\n[`Object.setPrototypeOf()`](../../../globals/Object/setPrototypeOf.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  setPrototypeOf(target, prototype) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `setPrototypeOf()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `prototype`\n  - : The object's new prototype or `null`.\n\n### Return value\n\nThe `setPrototypeOf()` method returns `true` if the\n`[[Prototype]]` was successfully changed, otherwise `false`.\n\n## Description\n\nThe **`handler.setPrototypeOf()`** method is a trap for\n[`Object.setPrototypeOf()`](../../../globals/Object/setPrototypeOf.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.setPrototypeOf()`](../../../globals/Object/setPrototypeOf.mdx)\n- [`Reflect.setPrototypeOf()`](../../../globals/Reflect/setPrototypeOf.mdx)\n\nOr any other operation that invokes the `[[SetPrototypeOf]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- If `target` is not extensible, the `prototype`\n  parameter must be the same value as\n  `Object.getPrototypeOf(target)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Proxy/revocable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Proxy.revocable()\n\nThe **`Proxy.revocable()`** static method creates a revocable `Proxy` object.\n\n## Syntax\n\n```js\nProxy.revocable(target, handler)\n```\n\n### Parameters\n\n- `target`\n  - : A target object to wrap with `Proxy`. It can be any sort of object, including a native array, a function, or even another proxy.\n- `handler`\n  - : An object whose properties are functions defining the behavior of `proxy` when an operation is performed on it.\n\n### Return value\n\nA plain object with the following two properties:\n\n- `proxy`\n  - : A Proxy object exactly the same as one created with a [`new Proxy(target, handler)`](../../globals/Proxy/Proxy.mdx) call.\n- `revoke`\n  - : A function with no parameters to revoke (switch off) the `proxy`.\n\n## Description\n\nThe `Proxy.revocable()` factory function is the same as the [`Proxy()`](../../globals/Proxy/Proxy.mdx) constructor, except that in addition to creating a proxy object, it also creates a `revoke` function that can be called to disable the proxy. The proxy object and the `revoke` function are wrapped in a plain object.\n\nThe `revoke` function does not take any parameters, nor does it rely on the `this` value. The created `proxy` object is attached to the `revoke` function as a [private property](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/Private_class_fields) that the `revoke` function accesses on itself when called (the existence of the private property is not observable from the outside, but it has implications on how garbage collection happens). The `proxy` object is _not_ captured within the [closure](https://developer.mozilla.org/docs/Web/JavaScript/Closures) of the `revoke` function (which will make garbage collection of `proxy` impossible if `revoke` is still alive).\n\nAfter the `revoke()` function gets called, the proxy becomes unusable: any trap to a handler throws a [`TypeError`](../../globals/TypeError/TypeError.mdx). Once a proxy is revoked, it remains revoked, and calling `revoke()` again has no effect — in fact, the call to `revoke()` detaches the `proxy` object from the `revoke` function, so the `revoke` function will not be able to access the proxy again at all. If the proxy is not referenced elsewhere, it will then be eligible for garbage collection. The `revoke` function also detaches `target` and `handler` from the `proxy`, so if `target` is not referenced elsewhere, it will also be eligible for garbage collection, even when its proxy is still alive, since there's no longer a way to meaningfully interact with the target object.\n\nLetting users interact with an object through a revocable proxy allows you to [control the lifetime](https://developer.mozilla.org/docs/Web/JavaScript/Memory_Management) of the object exposed to the user — you can make the object garbage-collectable even when the user is still holding a reference to its proxy.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/RangeError/RangeError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RangeError\n\nThe **`RangeError()`** constructor creates an error\nwhen a value is not in the set or range of allowed values.\n\n## Syntax\n\n```js\nnew RangeError()\nnew RangeError(message)\nnew RangeError(message, options)\nnew RangeError(message, fileName)\nnew RangeError(message, fileName, lineNumber)\n\nRangeError()\nRangeError(message)\nRangeError(message, options)\nRangeError(message, fileName)\nRangeError(message, fileName, lineNumber)\n```\n\n> **Note:** `RangeError()` can be called with or without `new`. Both create a new `RangeError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/ReadableByteStreamController/prototype/byobRequest.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# byobRequest\n\nThe **`byobRequest`** read-only property of the `ReadableByteStreamController` interface returns the current BYOB request, or `null` if there are no pending requests.\n\nAn underlying byte source should check this property, and use it to write data to the stream if it exists (rather than using `ReadableByteStreamController.enqueue()`).\nThis will result in an efficient zero-byte transfer of the data to the consumer.\n\n## Value\n\nA `ReadableStreamBYOBRequest` object instance, or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/ReadableByteStreamController/prototype/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# close()\n\nThe **`close()`** method of the `ReadableByteStreamController` interface closes the associated stream.\n\nThis might be called by the underlying source when its data source has been exhausted/completed.\n\n> **Note:** Readers will still be able to read any previously-enqueued chunks from the stream, but once those are read, the stream will become closed.\n> However if there is an outstanding and partially written `byobRequest` when `close()` is called, the stream will be errored.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableByteStreamController`, it is already closed, or the stream is not readable for some other reason.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/ReadableByteStreamController/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# desiredSize\n\nThe **`desiredSize`** read-only property of the`ReadableByteStreamController` interface returns the number of bytes required to fill the stream's internal queue to its \"desired size\".\n\nThe value is used by the stream to indicate a preferred flow rate to the underlying source.\nSources that support throttling or pausing their inflow of data (not all do!) should control the inflow such that `desiredSize` of the stream buffer is kept positive and as close to zero as possible.\n\nThe `desiredSize` is used to apply backpressure from downstream consumers.\n\n## Value\n\nAn integer. Note that this can be negative if the queue is over-full.\n\nThe value will be `null` if the stream has errored and `0` if it is closed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/ReadableByteStreamController/prototype/enqueue.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# enqueue()\n\nThe **`enqueue()`** method of the `ReadableByteStreamController` interface enqueues a given chunk on the associated readable byte stream (the chunk is copied into the stream's internal queues).\n\nThis should only be used to transfer data to the queue when `byobRequest` is `null`.\n\n## Syntax\n\n```js\nenqueue(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : The chunk to enqueue.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableByteStreamController`, or the stream cannot be read for some other reason, or the chunk is not an object, or the chunk's internal array buffer is non-existent, zero-length, or detached.\n    It is also thrown if the stream has been closed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/ReadableByteStreamController/prototype/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# error()\n\nThe **`error()`** method of the `ReadableByteStreamController` interface causes any future interactions with the associated stream to error with the specified reason.\n\nThis is commonly called by an underlying source to surface an error from the interface where it gets its data (such as a file-read or socket error).\nIt can also be called from elsewhere to trigger a stream error, for example if another part of the system that the stream relies on fails.\n\n## Syntax\n\n```js\nerror(errorObject)\n```\n\n### Parameters\n\n- `errorObject`\n  - : Any object that you want future interactions to fail with.\n\n### Return value\n\n`undefined`\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableByteStreamController`, or the stream is not readable for some other reason.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/ReadableStream/ReadableStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream()\n\nThe **`ReadableStream()`** constructor creates and returns a readable stream object from the given handlers.\n\n## Syntax\n\n```js\nnew ReadableStream()\nnew ReadableStream(underlyingSource)\nnew ReadableStream(underlyingSource, queuingStrategy)\n```\n\n### Parameters\n\n- `underlyingSource` _**optional**_\n\n  - : An object containing methods and properties that define how the constructed stream instance will behave.\n    `underlyingSource` can contain the following:\n\n    - `start` (controller) _**optional**_\n      - : This is a method, called immediately when the object is constructed. The\n        contents of this method are defined by the developer, and should aim to get access\n        to the stream source, and do anything else required to set up the stream\n        functionality. If this process is to be done asynchronously, it can return a\n        promise to signal success or failure. The `controller` parameter passed\n        to this method is a `ReadableStreamDefaultController` or a\n        `ReadableByteStreamController`, depending on the value of the\n        `type` property. This can be used by the developer to control the\n        stream during set up.\n    - `pull` (controller) _**optional**_\n      - : This method, also defined by the developer, will be called repeatedly when the\n        stream's internal queue of chunks is not full, up until it reaches its high water\n        mark. If `pull()` returns a promise, then it won't be called again\n        until that promise fulfills; if the promise rejects, the stream will become\n        errored. The `controller` parameter passed to this method is a\n        `ReadableStreamDefaultController` or a\n        `ReadableByteStreamController`, depending on the value of the\n        `type` property. This can be used by the developer to control the\n        stream as more chunks are fetched.\n    - `cancel` (reason) _**optional**_\n      - : This method, also defined by the developer, will be called if the app signals\n        that the stream is to be cancelled (e.g. if `ReadableStream.cancel()`\n        is called). The contents should do whatever is necessary to release access to the\n        stream source. If this process is asynchronous, it can return a promise to signal\n        success or failure. The `reason` parameter contains a\n        string describing why the stream was cancelled.\n    - `type` _**optional**_\n      - : This property controls what type of readable stream is being dealt with. If it\n        is included with a value set to `\"bytes\"`, the passed controller object\n        will be a `ReadableByteStreamController` capable of handling a BYOB\n        (bring your own buffer)/byte stream. If it is not included, the passed controller\n        will be a `ReadableStreamDefaultController`.\n    - `autoAllocateChunkSize` _**optional**_\n\n      - : For byte streams, the developer can set the `autoAllocateChunkSize` with a positive integer value to turn on the stream's auto-allocation feature.\n        With this is set, the stream implementation will automatically allocate a view buffer of the specified size in `ReadableByteStreamController.byobRequest` when required.\n\n        This must be set to enable zero-copy transfers to be used with a default `ReadableStreamDefaultReader`.\n        If not set, a default reader will still stream data, but `ReadableByteStreamController.byobRequest` will always be `null` and transfers to the consumer must be via the stream's internal queues.\n\n- `queuingStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer — this defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk` — this indicates the size to\n        use for each chunk, in bytes.\n\n    > **Note:** You could define your own custom\n    > `queuingStrategy`, or use an instance of\n    > `ByteLengthQueuingStrategy` or `CountQueuingStrategy`\n    > for this object value. If no `queuingStrategy` is supplied, the default\n    > used is the same as a `CountQueuingStrategy` with a high water mark of\n    > 1\\.\n\n### Return value\n\nAn instance of the `ReadableStream` object.\n\n### Exceptions\n\n- `RangeError`\n  - Thrown if the supplied type value is neither `\"bytes\"` nor `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/ReadableStream/prototype/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.cancel()\n\nThe **`cancel()`** method of the\n`ReadableStream` interface returns a `Promise` that\nresolves when the stream is canceled.\n\nCancel is used when you've completely finished with the stream and don't need any more\ndata from it, even if there are chunks enqueued waiting to be read. That data is lost\nafter cancel is called, and the stream is not readable any more. To read those chunks\nstill and not completely get rid of the stream, you'd use\n`ReadableStreamDefaultController.close()`.\n\n## Syntax\n\n```js\ncancel()\ncancel(reason)\n```\n\n### Parameters\n\n- `reason` _**optional**_\n  - : A human-readable reason for the cancellation. The underlying source may or may not use it.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason` parameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to cancel is not a `ReadableStream`, or it is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/ReadableStream/prototype/getReader.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.getReader()\n\nThe **`getReader()`** method of the `ReadableStream` interface creates a reader and locks the stream to it.\nWhile the stream is locked, no other reader can be acquired until this one is released.\n\n## Syntax\n\n```js\ngetReader()\ngetReader(options)\n```\n\n### Parameters\n\n- `options` _**optional**_\n\n  - : An object containing the following properties:\n\n    - `mode` _**optional**_\n\n      - : A property that specifies the type of reader to create.\n        Values can be:\n\n        - `\"byob\"`, which results in a `ReadableStreamBYOBReader` being created that can read readable byte streams (streams that support zero-copy transfer from an underlying byte source to the reader when internal stream buffers are empty).\n        - `undefined` (or not specified at all — this is the default), which results in a `ReadableStreamDefaultReader` being created that can read individual chunks from a stream.\n\n### Return value\n\nA `ReadableStreamDefaultReader` or `ReadableStreamBYOBReader` object instance, depending on the `mode` value.\n\n### Exceptions\n\n- `RangeError`\n  - : Thrown if the provided mode value is not `\"byob\"` or `undefined`.\n- `TypeError`\n  - : Thrown if the stream you are trying to create a reader for is already locked, or not a `ReadableStream`."
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/ReadableStream/prototype/locked.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.locked\n\nThe **`locked`** read-only property of the `ReadableStream` interface returns whether or not the readable stream is locked to a reader.\n\nA readable stream can have at most one active reader at a time, and is locked to that reader until it is released.\nA reader might be obtained using `ReadableStream.getReader()` and released using the reader's `releaseLock()` method.\n\n## Value\n\nA `boolean` value indicating whether or not the readable stream is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/ReadableStream/prototype/pipeThrough.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.pipeThrough()\n\nThe **`pipeThrough()`** method of the `ReadableStream` interface provides a chainable way of piping the current stream through a transform stream or any other writable/readable pair.\n\nPiping a stream will generally lock it for the duration of the pipe, preventing other readers from locking it.\n\n## Syntax\n\n```js\npipeThrough(transformStream)\npipeThrough(transformStream, options)\n```\n\n### Parameters\n\n- `transformStream`\n\n  - : A `TransformStream` (or an object with the structure\n    `{writable, readable}`) consisting of a readable stream and a writable\n    stream working together to transform some data from one form to another. Data written\n    to the `writable` stream can be read in some transformed state by the\n    `readable` stream. For example, a `TextDecoder`, has bytes\n    written to it and strings read from it, while a video decoder has encoded bytes\n    written to it and uncompressed video frames read from it.\n\n- `options` _**optional**_\n\n  - : The options that should be used when piping to the `writable` stream.\n    Available options are:\n\n    - `preventClose`\n\n      - : If this is set to `true`, the source `ReadableStream` closing will no longer cause the destination `WritableStream` to be closed.\n        The method will return a fulfilled promise once this process completes, unless an error is encountered while closing the destination, in which case it will be rejected with that error.\n\n    - `preventAbort`\n\n      - : If this is set to `true`, errors in the source `ReadableStream` will no longer abort the destination `WritableStream`.\n        The method will return a promise rejected with the source's error, or with any error that occurs during aborting the destination.\n\n    - `preventCancel`\n\n      - : If this is set to `true`, errors in the destination `WritableStream` will no longer cancel the source `ReadableStream`.\n        In this case the method will return a promise rejected with the source's error, or with any error that occurs during canceling the source.\n        In addition, if the destination writable stream starts out closed or closing, the source readable stream will no longer be canceled.\n        In this case the method will return a promise rejected with an error indicating piping to a closed stream failed, or with any error that occurs during canceling the source.\n\n### Return value\n\nThe `readable` side of the `transformStream`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the `writable` and/or `readable` property of `transformStream` are undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/ReadableStream/prototype/pipeTo.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.pipeTo()\n\nThe **`pipeTo()`** method of the `ReadableStream` interface pipes the current `ReadableStream` to a given `WritableStream` and returns a `Promise` that fulfills when the piping process completes successfully, or rejects if any errors were encountered.\n\nPiping a stream will generally `lock` it for the duration of the pipe, preventing other readers from locking it.\n\n## Syntax\n\n```js\npipeTo(destination)\npipeTo(destination, options)\n```\n\n### Parameters\n\n- `destination`\n\n  - : A `WritableStream` that acts as the final destination for the `ReadableStream`.\n\n- `options` _**optional**_\n\n  - : The options that should be used when piping to the `writable` stream.\n    Available options are:\n\n    - `preventClose`\n      - : If this is set to `true`, the source `ReadableStream` closing will no longer cause the destination `WritableStream` to be closed.\n        The method will return a fulfilled promise once this process completes, unless an error is encountered while closing the destination in which case it will be rejected with that error.\n    - `preventAbort`\n      - : If this is set to `true`, errors in the source `ReadableStream` will no longer abort the destination `WritableStream`.\n        The method will return a promise rejected with the source's error, or with any error that occurs during aborting the destination.\n    - `preventCancel`\n      - : If this is set to `true`, errors in the destination `WritableStream` will no longer cancel the source `ReadableStream`.\n        In this case the method will return a promise rejected with the source's error, or with any error that occurs during canceling the source.\n        In addition, if the destination writable stream starts out closed or closing, the source readable stream will no longer be canceled.\n        In this case the method will return a promise rejected with an error indicating piping to a closed stream failed, or with any error that occurs during canceling the source.\n\n### Return value\n\nA `Promise` that resolves when the piping process has completed.\n\n### Exceptions\n\n- `TypeError`\n  - : The `writableStream` and/or `readableStream` objects are not a writable stream/readable stream, or one or both of the streams are locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/ReadableStream/prototype/tee.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.tee()\n\nThe **`tee()`** method of the\n`ReadableStream` interface [tees](https://streams.spec.whatwg.org/#tee-a-readable-stream) the current readable stream, returning a\ntwo-element array containing the two resulting branches as\nnew `ReadableStream` instances.\n\nThis is useful for allowing two readers to read a stream sequentially or simultaneously,\nperhaps at different speeds.\nFor example, you might do this in a ServiceWorker if you want to fetch\na response from the server and stream it to the browser, but also stream it to the\nServiceWorker cache. Since a response body cannot be consumed more than once, you'd need\ntwo copies to do this.\n\nA teed stream will partially signal backpressure at the rate of the _faster_ consumer\nof the two `ReadableStream` branches,\nand unread data is enqueued internally on the slower consumed `ReadableStream`\nwithout any limit or backpressure.\nThat is, when _both_ branches have an unread element in their internal queue,\nthen the original `ReadableStream`'s controller's internal queue will start to fill up,\nand once its `ReadableStreamDefaultController.desiredSize\", \"desiredSize` ≤ 0\nor byte stream controller `ReadableByteStreamController.desiredSize\", \"desiredSize` ≤ 0,\nthen the controller will stop calling `pull(controller)` on the\nunderlying source passed to `ReadableStream.ReadableStream\", \"new ReadableStream()`.\nIf only one branch is consumed, then the entire body will be enqueued in memory.\nTherefore, you should not use the built-in `tee()` to read very large streams\nin parallel at different speeds.\nInstead, search for an implementation that fully backpressures\nto the speed of the _slower_ consumed branch.\n\nTo cancel the stream you then need to cancel both resulting branches. Teeing a stream\nwill generally lock it for the duration, preventing other readers from locking it.\n\n## Syntax\n\n```js\ntee()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nAn `Array` containing two `ReadableStream` instances.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source stream is not a `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/ReadableStreamBYOBReader/ReadableStreamBYOBReader.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# ReadableStreamBYOBReader()\n\nThe **`ReadableStreamBYOBReader()`** constructor creates and returns a `ReadableStreamBYOBReader` object instance.\n\n> **Note:** You generally wouldn't use this constructor manually;\n> instead, you'd use the `ReadableStream.getReader()` method with the argument `\"byob\"`.\n\n## Syntax\n\n```js\nnew ReadableStreamBYOBReader(stream)\n```\n\n### Parameters\n\n- `stream`\n  - : The `ReadableStream` to be read.\n\n### Return value\n\nAn instance of the `ReadableStreamBYOBReader` object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the supplied `stream` parameter is not a `ReadableStream`, or it is already locked for reading by another reader, or its stream controller is not a `ReadableByteStreamController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/ReadableStreamBYOBReader/prototype/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# cancel()\n\nThe **`cancel()`** method of the `ReadableStreamBYOBReader` interface returns a `Promise` that resolves when the stream is canceled.\nCalling this method signals a loss of interest in the stream by a consumer.\n\n> **Note:** If the reader is active, the `cancel()` method behaves the same as that for the associated stream (`ReadableStream.cancel()`).\n\n## Syntax\n\n```js\ncancel()\ncancel(reason)\n```\n\n### Parameters\n\n- `reason` __optional__\n  - : A human-readable reason for the cancellation. The underlying source may or may not use it.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason` parameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamBYOBReader`, or the stream has no owner.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/ReadableStreamBYOBReader/prototype/closed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# closed\n\nThe **`closed`** read-only property of the `ReadableStreamBYOBReader` interface returns a `Promise` that fulfills when the stream closes, or rejects if the stream throws an error or the reader's lock is released.\n\nThis property enables you to write code that responds to an end to the streaming process.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/ReadableStreamBYOBReader/prototype/read.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# read()\n\nThe **`read()`** method of the `ReadableStreamBYOBReader` interface is used to read data into a view on a user-supplied buffer from an associated readable byte stream.\nA request for data will be satisfied from the stream's internal queues if there is any data present.\nIf the stream queues are empty, the request may be supplied as a zero-copy transfer from the underlying byte source.\n\nThe method takes as an argument a view on a buffer that supplied data is to be read into, and returns a `Promise`.\nThe promise fulfills with an object that has properties `value` and `done` when data comes available, or if the stream is cancelled.\nIf the stream is errored, the promise will be rejected with the relevant error object.\n\nIf a chunk of data is supplied, the `value` property will contain a new view.\nThis will be a view over the same buffer/backing memory (and of the same type) as the original `view` passed to the `read()` method, now populated with the new chunk of data.\nNote that once the promise fulfills, the original `view` passed to the method will be detached and no longer usable.\nThe promise will fulfill with a `value: undefined` if the stream has been cancelled.\nIn this case the backing memory region of `view` is discarded and not returned to the caller (all previously read data in the view's buffer is lost).\n\nThe `done` property indicates whether or not more data is expected.\nThe value is set `true` if the stream is closed or cancelled, and `false` otherwise.\n\n## Syntax\n\n```js\nread(view)\n```\n\n### Parameters\n\n- `view`\n  - : The view that data is to be read into.\n\n### Return value\n\nA `Promise`, which fulfills/rejects with a result depending on the state of the stream.\n\nThe following are possible:\n\n- If a chunk is available and the stream is still active, the promise fulfills with an object of the form:\n\n  ```\n  { value: theChunk, done: false }\n  ```\n\n  `theChunk` is a view containing the new data.\n  This is a view of the same type and over the same backing memory as the `view` passed to the `read()` method.\n  The original `view` will be detached and no longer usable.\n\n- If the stream is closed, the promise fulfills with an object of the form (where `theChunk` has the same properties as above):\n\n  ```\n  { value: theChunk, done: true }\n  ```\n\n- If the stream is cancelled, the promise fulfills with an object of the form:\n\n  ```\n  { value: undefined, done: true }\n  ```\n\n  In this case the backing memory is discarded.\n\n- If the stream throws an error, the promise rejects with the relevant error.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamBYOBReader`, the stream has no owner, the view is not an object or has become detached, the view's length is 0, or `ReadableStreamBYOBReader.releaseLock()` is called (when there's is a pending read request).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/ReadableStreamBYOBReader/prototype/releaseLock.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# releaseLock()\n\nThe **`releaseLock()`** method of the `ReadableStreamBYOBReader` interface releases the reader's lock on the stream.\nAfter the lock is released, the reader is no longer active.\n\nThe reader will appear errored if the associated stream is errored when the lock is released; otherwise, the reader will appear closed.\n\nIf the reader's lock is released while it still has pending read requests then the promises returned by the reader's `ReadableStreamBYOBReader.read()` method are immediately rejected with a `TypeError`.\nUnread chunks remain in the stream's internal queue and can be read later by acquiring a new reader.\n\n## Syntax\n\n```js\nreleaseLock()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamBYOBReader`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/ReadableStreamBYOBRequest/prototype/respond.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# respond()\n\nThe **`respond()`** method of the `ReadableStreamBYOBRequest` interface is used to signal to the associated readable byte stream that the specified number of bytes were written into the `ReadableStreamBYOBRequest.view`.\n\nAfter this method is called, the `view` will be transferred and no longer modifiable.\n\n## Syntax\n\n```js\nrespond(bytesWritten)\n```\n\n### Parameters\n\n- `bytesWritten`\n  - : The number of bytes written into `ReadableStreamBYOBRequest.view`.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : The request does not have an associated `ReadableByteStreamController` or the view buffer is not detached/cannot be transferred into.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/ReadableStreamBYOBRequest/prototype/respondWithNewView.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# respondWithNewView()\n\nThe **`respondWithNewView()`** method of the `ReadableStreamBYOBRequest` interface specifies a new view that the consumer of the associated readable byte stream should write to instead of `ReadableStreamBYOBRequest.view`.\n\nThe new view must be a `TypedArray` or a `DataView` that provides a view onto the same backing memory region as `ReadableStreamBYOBRequest.view`.\nAfter this method is called, the view that was passed into the method will be transferred and no longer modifiable.\n\nThe method is intended for use cases where an underlying byte source needs to transfer a `byobRequest.view` internally before finishing its response.\nFor example, the source may transfer the BYOB view to a separate worker thread, and wait for the worker to transfer it back once it has been filled.\n\n## Syntax\n\n```js\nrespondWithNewView(view)\n```\n\n### Parameters\n\n- `view`\n\n  - : A `TypedArray` or a `DataView` that the consumer of the associated readable byte stream should write to instead of `ReadableStreamBYOBRequest.view`.\n\n    This must be a view onto the same backing memory region as `ReadableStreamBYOBRequest.view` and occupy the same or less memory.\n    Specifically, it must be either the view's buffer or a transferred version, must have the same `byteOffset`, and a `byteLength` (number of bytes written) that is less than or equal to that of the view.\n\n### Return value\n\n`undefined`\n\n### Exceptions\n\n- `TypeError`\n\n  - : Thrown if the source object is not a `ReadableStreamBYOBRequest`, or there is no associated controller, or the associated internal array buffer is non-existent or detached.\n    It may also be thrown if the `view` is zero-length when there is an active reader, or non-zero when called on a closed stream.\n\n- `RangeError`\n  - : Thrown if the new `view` does not match the backing memory region of `ReadableStreamBYOBRequest.view`.\n    For example, it is not the same buffer (or a transferred version), has a different `byteOffset`, or is larger than the memory available to the backing view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/ReadableStreamBYOBRequest/prototype/view.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# view\n\nThe **`view`** getter property of the `ReadableStreamBYOBRequest` interface returns the current view.\n\n## Value\n\nA typed array representing the destination region to which the controller can write generated data.\n\n`null` if the request has already been responded to, by calling `ReadableStreamBYOBRequest.respond()` or `ReadableStreamBYOBRequest.respondWithNewView()`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/ReadableStreamDefaultController/prototype/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.close()\n\nThe **`close()`** method of the\n`ReadableStreamDefaultController` interface closes the associated stream.\n\nReaders will still be able to read any previously-enqueued chunks from the stream,\nbut once those are read, the stream will become closed. If you want to completely get\nrid of the stream and discard any enqueued chunks, you'd use\n`ReadableStream.cancel()` or\n`ReadableStreamDefaultReader.cancel()`.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/ReadableStreamDefaultController/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.desiredSize\n\nThe **`desiredSize`** read-only property of the\n`ReadableStreamDefaultController` interface returns the desired size\nrequired to fill the stream's internal queue.\n\n## Value\n\nAn integer. Note that this can be negative if the queue is over-full.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/ReadableStreamDefaultController/prototype/enqueue.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.enqueue()\n\nThe **`enqueue()`** method of the\n`ReadableStreamDefaultController` interface enqueues a given chunk in the\nassociated stream.\n\n## Syntax\n\n```js\nenqueue(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : The chunk to enqueue.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/ReadableStreamDefaultController/prototype/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.error()\n\nThe **`error()`** method of the\n`ReadableStreamDefaultController` interface causes any future interactions\nwith the associated stream to error.\n\n> **Note:** The `error()` method can be called\n> more than once, and can be called when the stream is not readable.\n\n## Syntax\n\n```js\nerror(e)\n```\n\n### Parameters\n\n- `e`\n  - : The error you want future interactions to fail with.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/ReadableStreamDefaultReader/ReadableStreamDefaultReader.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader()\n\nThe **`ReadableStreamDefaultReader()`**\nconstructor creates and returns a `ReadableStreamDefaultReader` object\ninstance.\n\n## Syntax\n\n```js\nnew ReadableStreamDefaultReader(stream)\n```\n\n### Parameters\n\n- `stream`\n  - : The `ReadableStream` to be read.\n\n### Return value\n\nAn instance of the `ReadableStreamDefaultReader` object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the supplied `stream` parameter is not a `ReadableStream`,\n    or it is already locked for reading by another reader.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/ReadableStreamDefaultReader/prototype/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n~ ReadableStreamDefaultReader.cancel()\n\nThe **`cancel()`** method of the\n`ReadableStreamDefaultReader` interface returns a `Promise` that resolves when the stream is canceled. Calling this method signals a loss of interest in the stream by a consumer.\n\nCancel is used when you've completely finished with the stream and don't need any more\ndata from it, even if there are chunks enqueued waiting to be read. That data is lost\nafter cancel is called, and the stream is not readable any more. To read those chunks\nstill and not completely get rid of the stream, you'd use\n`ReadableStreamDefaultController.close()`.\n\n> **Note:** If the reader is active, the\n> `cancel()` method behaves the same as that for the associated stream\n> (`ReadableStream.cancel()`).\n\n## Syntax\n\n```js\ncancel()\ncancel(reason)\n```\n\n### Parameters\n\n- `reason` _**optional**_\n  - : A human-readable reason for the cancellation. This value may or may not be used.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason`\nparameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamDefaultReader`, or the stream\n    has no owner.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/ReadableStreamDefaultReader/prototype/closed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader.closed\n\nThe **`closed`** read-only property of the\n`ReadableStreamDefaultReader` interface returns a\n`Promise` that fulfills when the stream closes, or rejects if the\nstream throws an error or the reader's lock is released. This property enables you\nto write code that responds to an end to the streaming process.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/ReadableStreamDefaultReader/prototype/read.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader.read()\n\nThe **`read()`** method of the `ReadableStreamDefaultReader` interface returns a `Promise` providing access to the next chunk in the stream's internal queue.\n\n## Syntax\n\n```js\nread()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise`, which fulfills/rejects with a result depending on the state of the stream.\nThe different possibilities are as follows:\n\n- If a chunk is available, the promise will be fulfilled with an object of the form `{ value: theChunk, done: false }`.\n- If the stream becomes closed, the promise will be fulfilled with an object of the form `{ value: undefined, done: true }`.\n- If the stream becomes errored, the promise will be rejected with the relevant error.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamDefaultReader`, the stream has no owner, or `ReadableStreamDefaultReader.releaseLock()` is called (when there's a pending read request).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/ReadableStreamDefaultReader/prototype/releaseLock.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader.releaseLock()\n\nThe **`releaseLock()`** method of the `ReadableStreamDefaultReader` interface releases the reader's lock on the stream.\n\nIf the associated stream is errored when the lock is released, the reader will appear errored in that same way subsequently; otherwise, the reader will appear closed.\n\nIf the reader's lock is released while it still has pending read requests then the promises returned by the reader's `ReadableStreamDefaultReader.read()` method are immediately rejected with a `TypeError`.\nUnread chunks remain in the stream's internal queue and can be read later by acquiring a new reader.\n\n## Syntax\n\n```js\nreleaseLock()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultReader`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/ReferenceError/ReferenceError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReferenceError\n\nThe **`ReferenceError`** object represents an error when a\nnon-existent variable is referenced.\n\n## Syntax\n\n```js\nnew ReferenceError()\nnew ReferenceError(message)\nnew ReferenceError(message, options)\nnew ReferenceError(message, fileName)\nnew ReferenceError(message, fileName, lineNumber)\n\nReferenceError()\nReferenceError(message)\nReferenceError(message, options)\nReferenceError(message, fileName)\nReferenceError(message, fileName, lineNumber)\n```\n\n> **Note:** `ReferenceError()` can be called with or without `new`. Both create a new `ReferenceError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Reflect/apply.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.apply()\n\nThe static **`Reflect.apply()`** method calls a target function\nwith arguments as specified.\n\n## Syntax\n\n```js\nReflect.apply(target, thisArgument, argumentsList)\n```\n\n### Parameters\n\n- `target`\n  - : The target function to call.\n- `thisArgument`\n  - : The value of `this` provided for the call to\n    `target`.\n- `argumentsList`\n  - : An array-like object specifying the arguments with which\n    `target` should be called.\n\n### Return value\n\nThe result of calling the given `target` function with the\nspecified `this` value and arguments.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if the `target` is not callable.\n\n## Description\n\nIn ES5, you typically use the [`Function.prototype.apply()`](../../globals/Function/prototype/apply.mdx) method to call a\nfunction with a given `this` value and `arguments` provided as an array\n(or an [array-like object](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects)).\n\n```js\nFunction.prototype.apply.call(Math.floor, undefined, [1.75]);\n```\n\nWith `Reflect.apply()` this becomes less verbose and easier to understand.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Reflect/construct.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.construct()\n\nThe static **`Reflect.construct()`** method acts like the\n`new` operator, but as a function. It is equivalent to\ncalling `new target(...args)`. It gives also the added option to specify a\ndifferent prototype.\n\n## Syntax\n\n```js\nReflect.construct(target, argumentsList)\nReflect.construct(target, argumentsList, newTarget)\n```\n\n### Parameters\n\n- `target`\n  - : The target function to call.\n- `argumentsList`\n  - : An array-like object specifying the arguments with which\n    `target` should be called.\n- `newTarget` _**optional**_\n  - : The constructor whose prototype should be used. See also the [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target)\n    operator. If `newTarget` is not present, its value defaults\n    to `target`.\n\n### Return value\n\nA new instance of `target` (or `newTarget`,\nif present), initialized by `target` as a constructor with the\ngiven `argumentsList`.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` or\n`newTarget` are not constructors.\n\n## Description\n\n`Reflect.construct()` allows you to invoke a constructor with a variable\nnumber of arguments. (This would also be possible by using the\n[spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) combined with the\n[`new` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new).)\n\n```js\nconst obj = new Foo(...args);\nconst obj = Reflect.construct(Foo, args);\n```\n\n### Reflect.construct() vs Object.create()\n\nPrior to the introduction of `Reflect`, objects could be constructed using\nan arbitrary combination of constructor and prototype by using\n[`Object.create()`](../../globals/Object/create.mdx).\n\n```js\nfunction OneClass() {\n  this.name = \"one\";\n}\n\nfunction OtherClass() {\n  this.name = \"other\";\n}\n\n// Calling this:\nconst obj1 = Reflect.construct(OneClass, args, OtherClass);\n\n// ...has the same result as this:\nconst obj2 = Object.create(OtherClass.prototype);\nOneClass.apply(obj2, args);\n\nconsole.log(obj1.name); // 'one'\nconsole.log(obj2.name); // 'one'\n\nconsole.log(obj1 instanceof OneClass); // false\nconsole.log(obj2 instanceof OneClass); // false\n\nconsole.log(obj1 instanceof OtherClass); // true\nconsole.log(obj2 instanceof OtherClass); // true\n\n// Another example to demonstrate below:\n\nfunction func1(a, b, c, d) {\n  console.log(arguments[3]);\n}\n\nfunction func2(d, e, f, g) {\n  console.log(arguments[3]);\n}\n\nconst obj1 = Reflect.construct(func1, [\"I\", \"Love\", \"my\", \"country\"]);\n```\n\nHowever, while the end result is the same, there is one important difference in the\nprocess. When using `Object.create()` and\n[`Function.prototype.apply()`](../../globals/Function/prototype/apply.mdx), the `new.target` operator will\npoint to `undefined` within the function used as the constructor, since the\n`new` keyword is not being used to create the object.\n\nWhen invoking `Reflect.construct()`, on the other hand, the\n`new.target` operator will point to the `newTarget`\nparameter if supplied, or `target` if not.\n\n```js\nfunction OneClass() {\n  console.log(\"OneClass\");\n  console.log(new.target);\n}\nfunction OtherClass() {\n  console.log(\"OtherClass\");\n  console.log(new.target);\n}\n\nconst obj1 = Reflect.construct(OneClass, args);\n// Logs:\n// OneClass\n// function OneClass { ... }\n\nconst obj2 = Reflect.construct(OneClass, args, OtherClass);\n// Logs:\n// OneClass\n// function OtherClass { ... }\n\nconst obj3 = Object.create(OtherClass.prototype);\nOneClass.apply(obj3, args);\n// Logs:\n// OneClass\n// undefined\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Reflect/defineProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.defineProperty()\n\nThe static **`Reflect.defineProperty()`** method is like\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx) but returns a `Boolean`.\n\n## Syntax\n\n```js\nReflect.defineProperty(target, propertyKey, attributes)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to define the property.\n- `propertyKey`\n  - : The name of the property to be defined or modified.\n- `attributes`\n  - : The attributes for the property being defined or modified.\n\n### Return value\n\nA `Boolean` indicating whether or not the property was successfully\ndefined.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.defineProperty` method allows precise addition to or\nmodification of a property on an object. For more details, see the\n[`Object.defineProperty`](../../globals/Object/defineProperty.mdx) which is similar.\n\n> **Note:** `Object.defineProperty` returns the\n> object or throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the property has not been successfully\n> defined. `Reflect.defineProperty`, however, returns a `Boolean`\n> indicating whether or not the property was successfully defined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Reflect/deleteProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.deleteProperty()\n\nThe static\n**`Reflect.deleteProperty()`**\nmethod allows to delete properties. It is like the\n[`delete` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete)\nas a function.\n\n## Syntax\n\n```js\nReflect.deleteProperty(target, propertyKey)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to delete the property.\n- `propertyKey`\n  - : The name of the property to be deleted.\n\n### Return value\n\nA `Boolean` indicating whether or not the property was successfully\ndeleted.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.deleteProperty` method allows you to delete a property on an\nobject. It returns a `Boolean` indicating whether or not the property was\nsuccessfully deleted. It is almost identical to the non-strict\n[`delete` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Reflect/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.get()\n\nThe static **`Reflect.get()`** method works like getting a\nproperty from an object (`target[propertyKey]`) as a function.\n\n## Syntax\n\n```js\nReflect.get(target, propertyKey)\nReflect.get(target, propertyKey, receiver)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to get the property.\n- `propertyKey`\n  - : The name of the property to get.\n- `receiver` _**optional**_\n  - : The value of `this` provided for the call to\n    `target` if a getter is encountered. When used with\n    `Proxy`, it can be an object that inherits from\n    `target`.\n\n### Return value\n\nThe value of the property.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.get` method allows you to get a property on an object. It is like the\n[property accessor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Property_Accessors) syntax as a function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Reflect/getOwnPropertyDescriptor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.getOwnPropertyDescriptor()\n\nThe static\n**`Reflect.getOwnPropertyDescriptor()`** method is similar to\n[`Object.getOwnPropertyDescriptor()`](../../globals/Object/getOwnPropertyDescriptor.mdx). It returns a property descriptor of\nthe given property if it exists on the object, `undefined`\notherwise.\n\n\n\n## Syntax\n\n```js\nReflect.getOwnPropertyDescriptor(target, propertyKey)\n```\n\n### Parameters\n\n- `target`\n  - : The target object in which to look for the property.\n- `propertyKey`\n  - : The name of the property to get an own property descriptor for.\n\n### Return value\n\nA property descriptor object if the property exists in `target`\nobject; otherwise, [`undefined`](../../globals/undefined.mdx).\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.getOwnPropertyDescriptor` method returns a property descriptor\nof the given property if it exists in the `target` object,\n[`undefined`](../../globals/undefined.mdx) otherwise. The only difference to\n[`Object.getOwnPropertyDescriptor()`](../../globals/Object/getOwnPropertyDescriptor.mdx) is how non-object targets are handled.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Reflect/getPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.getPrototypeOf()\n\nThe static **`Reflect.getPrototypeOf()`** method is almost the\nsame method as [`Object.getPrototypeOf()`](../../globals/Object/getPrototypeOf.mdx). It returns the prototype (i.e. the\nvalue of the internal `[[Prototype]]` property) of the specified object.\n\n\n\n## Syntax\n\n```js\nReflect.getPrototypeOf(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object of which to get the prototype.\n\n### Return value\n\nThe prototype of the given object. If there are no inherited properties,\n[`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) is returned.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.getPrototypeOf` method returns the prototype (i.e. the value of\nthe internal `[[Prototype]]` property) of the specified object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Reflect/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.has()\n\nThe static **`Reflect.has()`** method works like the [`in` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/in)\nas a function.\n\n## Syntax\n\n```js\nReflect.has(target, propertyKey)\n```\n\n### Parameters\n\n- `target`\n  - : The target object in which to look for the property.\n- `propertyKey`\n  - : The name of the property to check.\n\n### Return value\n\nA `Boolean` indicating whether or not the `target`\nhas the property.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.has` method allows you to check if a property is in an object.\nIt works like the [`in` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/in)\nas a function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Reflect/isExtensible.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.isExtensible()\n\nThe static **`Reflect.isExtensible()`** method determines if an object is extensible (whether it can have new properties added to it). It is similar to [`Object.isExtensible()`](../../globals/Object/isExtensible.mdx), but with [some differences](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/isExtensible#difference_with_object.isextensible).\n\n## Syntax\n\n```js\nReflect.isExtensible(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object which to check if it is extensible.\n\n### Return value\n\nA `Boolean` indicating whether or not the target is extensible.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Reflect/ownKeys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.ownKeys()\n\nThe static **`Reflect.ownKeys()`** method returns an array of\nthe `target` object's own property keys.\n\n## Syntax\n\n```js\nReflect.ownKeys(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object from which to get the own keys.\n\n### Return value\n\nAn `Array` of the `target` object's own property\nkeys.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.ownKeys` method returns an array of the\n`target` object's own property keys. Its return value is\nequivalent to `Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target))`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Reflect/preventExtensions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.preventExtensions()\n\nThe static **`Reflect.preventExtensions()`** method prevents new properties from ever being added to an object (i.e., prevents future extensions to the object). It is similar to [`Object.preventExtensions()`](../../globals/Object/preventExtensions.mdx), but with [some differences](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/preventExtensions#difference_with_object.preventextensions).\n\n## Syntax\n\n```js\nReflect.preventExtensions(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to prevent extensions.\n\n### Return value\n\nA `Boolean` indicating whether or not the target was successfully set to prevent extensions.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Reflect/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.set()\n\nThe static **`Reflect.set()`** method works like setting a\nproperty on an object.\n\n## Syntax\n\n```js\nReflect.set(target, propertyKey, value)\nReflect.set(target, propertyKey, value, receiver)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to set the property.\n- `propertyKey`\n  - : The name of the property to set.\n- `value`\n  - : The value to set.\n- `receiver` _**optional**_\n  - : The value of `this` provided for the call to the setter for `propertyKey` on `target`. If provided and `target` does not have a setter for `propertyKey`, the property will be set on `receiver` instead.\n\n### Return value\n\nA `Boolean` indicating whether or not setting the property was successful.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.set` method allows you to set a property on an object. It does\nproperty assignment and is like the\n[property accessor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Property_Accessors) syntax as a function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Reflect/setPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.setPrototypeOf()\n\nThe static\n**`Reflect.setPrototypeOf()`** method is the same method as\n[`Object.setPrototypeOf()`](../../globals/Object/setPrototypeOf.mdx), except for its return type. It sets the\nprototype (i.e., the internal `[[Prototype]]` property) of a specified\nobject to another object or to [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null), and returns `true` if\nthe operation was successful, or `false` otherwise.\n\n## Syntax\n\n```js\nReflect.setPrototypeOf(target, prototype)\n```\n\n### Parameters\n\n- `target`\n  - : The target object of which to set the prototype.\n- `prototype`\n  - : The object's new prototype (an object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null)).\n\n### Return value\n\nA `Boolean` indicating whether or not the prototype was successfully set.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object` or if `prototype` is neither an object nor\n[`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null).\n\n## Description\n\nThe `Reflect.setPrototypeOf` method changes the prototype (i.e. the value of\nthe internal `[[Prototype]]` property) of the specified object.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Request/Request.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request()\n\nThe **`Request()`** constructor creates a new\n`Request` object.\n\n## Syntax\n\n```js\nnew Request(input)\nnew Request(input, options)\n```\n\n### Parameters\n\n- `input`\n\n  - : Defines the resource that you wish to fetch. This can either be:\n\n    - A string containing the direct URL of the resource you want to\n      fetch.\n    - A `Request` object, effectively creating a copy.\n\n- `options` _**optional**_\n\n  - : An object containing any custom settings that you want to apply to the\n    request. The possible options are:\n\n    - `method`\n      - : The request method, e.g., `GET`, `POST`. The default is `GET`.\n    - `headers`\n      - : Any headers you want to add to your request, contained\n        within a `Headers` object or an object literal with `String` values.\n    - `body`\n      - : Any body that you want to add to your request: this can be an `ArrayBuffer`, a `TypedArray`, a `DataView`, a `URLSearchParams`, string object or literal, or a `ReadableStream` object.\n    - `backend` _**Fastly-specific**_\n    - `cacheOverride` _**Fastly-specific**_\n    - `cacheKey` _**Fastly-specific**_"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Request/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the `Request` interface\nreads the request body and returns it as a promise that resolves with an `ArrayBuffer`.\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an `ArrayBuffer`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Request/prototype/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.body\n\nThe read-only **`body`** property of the `Request`\ninterface contains a `ReadableStream` with the body contents\nthat have been added to the request. Note that a request using the\n`GET` or `HEAD` method cannot have a body\nand `null` is returned in these cases.\n\n## Value\n\nA `ReadableStream` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Request/prototype/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.bodyUsed\n\nThe read-only **`bodyUsed`** property of the\n`Request` interface is a boolean value that indicates\nwhether the request body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Request/prototype/headers.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.headers\n\nThe **`headers`** read-only property of the\n`Request` interface contains the `Headers` object associated\nwith the request.\n\n## Value\n\nA `Headers` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Request/prototype/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.json()\n\nThe **`json()`** method of the `Request` interface\nreads the request body and returns it as a promise that resolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a JavaScript object. This object could be\nanything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Request/prototype/method.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.method\n\nThe **`method`** read-only property of the\n`Request` interface contains the request's method (`GET`, `POST`, etc.)\n\n## Value\n\nA `String` indicating the method of the request.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Request/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.text()\n\nThe **`text()`** method of the `Request` interface\nreads the request body and returns it as a promise that resolves with a `String`.\nThe response is _always_ decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Promise that resolves with a `String`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Request/prototype/url.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.url\n\nThe **`url`** read-only property of the `Request` interface contains the URL of the request.\n\n## Value\n\nA string indicating the URL of the request.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Response/Response.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response()\n\nThe **`Response()`** constructor creates a new `Response` object.\n\n## Syntax\n\n```js\nnew Response()\nnew Response(body)\nnew Response(body, options)\n```\n\n### Parameters\n\n- `body` _**optional**_\n\n  - : An object defining a body for the response. This can be `null` (which is\n    the default value), or one of:\n\n    - [`ArrayBuffer`](../../globals/ArrayBuffer/ArrayBuffer.mdx)\n    - `TypedArray`\n    - [`DataView`](../../globals/DataView/DataView.mdx)\n    - [`ReadableStream`](../../globals/ReadableStream/ReadableStream.mdx)\n    - [`URLSearchParams`](../../globals/URLSearchParams/URLSearchParams.mdx)\n    - [`String`](../../globals/String/String.mdx)\n    - string literal\n\n- `options` _**optional**_\n\n  - : An options object containing any custom settings that you want to apply to the\n    response, or an empty object (which is the default value). The possible options are:\n\n    - `status`\n      - : The status code for the response, e.g., `200`.\n    - `statusText`\n      - : The status message associated with the status code,\n        e.g., `OK`.\n    - `headers`\n      - : Any headers you want to add to your response, contained\n        within a [`Headers`](../../globals/Headers/Headers.mdx) object or object literal of\n        [`String`](../../globals/String/String.mdx) key/value pairs.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Response/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface\ntakes a [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion. It returns a promise\nthat resolves with an [`ArrayBuffer`](../../../globals/ArrayBuffer/ArrayBuffer.mdx).\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an [`ArrayBuffer`](../../../globals/ArrayBuffer/ArrayBuffer.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Response/prototype/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.body\n\nThe **`body`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface is a [`ReadableStream`](../../../globals/ReadableStream/ReadableStream.mdx) of the body contents.\n\n## Value\n\nA [`ReadableStream`](../../../globals/ReadableStream/ReadableStream.mdx), or else `null` for any `Response` object [constructed](../../../globals/Response/Response.mdx) with a null `body` property, or for any actual HTTP response that has no body.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Response/prototype/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.bodyUsed\n\nThe **`bodyUsed`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface is a boolean value that indicates whether the body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Response/prototype/headers.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.headers\n\nThe **`headers`** read-only property of the\n[`Response`](../../../globals/Response/Response.mdx) interface contains the [`Headers`](../../../globals/Headers/Headers.mdx) object associated\nwith the response.\n\n## Value\n\nA [`Headers`](../../Headers/Headers.mdx) object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Response/prototype/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.json()\n\nThe **`json()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface takes\na [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion. It returns a promise which\nresolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA [`Promise`](../../../globals/Promise/Promise.mdx) that resolves to a JavaScript object. This object could be\nanything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Response/prototype/ok.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.ok\n\nThe **`ok`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains a Boolean stating whether the response was successful (status in the range 200-299) or not.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Response/prototype/status.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.status\n\nThe **`status`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains the HTTP status code of the response.\n\nFor example, `200` for success, `404` if the resource could not be found.\n\n## Value\n\nAn unsigned short number.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Response/prototype/statusText.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.statusText\n\nThe **`statusText`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains the status message corresponding to the HTTP status code in [`status`](../../../globals/Response/prototype/status.mdx).\n\nFor example, this would be `OK` for a status code `200`, `Continue` for `100`, `Not Found` for `404`.\n\n## Value\n\nA [`String`](../../../globals/String/String.mdx) containing the HTTP status message associated with the response.\nThe default value is \"\".\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Response/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.text()\n\nThe **`text()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface takes a [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion.\nIt returns a promise that resolves with a [`String`](../../../globals/String/String.mdx).\nThe response is _always_ decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Promise that resolves with a [`String`](../../../globals/String/String.mdx).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Response/prototype/url.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.url\n\nThe **`url`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains the URL of the response.\nThe value of the `url` property will be the final URL obtained after any redirects.\n\n## Value\n\nA string.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Response/redirect.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Response.redirect()\n\nThe **`redirect()`** static method of the `Response` interface returns a `Response` resulting in a redirect to the specified URL.\n\n## Syntax\n\n```js\nResponse.redirect(url)\nResponse.redirect(url, status)\n```\n\n### Parameters\n\n- `url`\n  - : The URL that the new response is to originate from.\n- `status` __optional__\n  - : An optional status code for the response (e.g., `302`.)\n\n### Return value\n\nA `Response` object.\n\n### Exceptions\n\n- `RangeError`\n  - : The specified status is not a redirect status.\n- `TypeError`\n  - : The specified URL is invalid.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/RsaHashedImportParams/RsaHashedImportParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RsaHashedImportParams\n\nThe **`RsaHashedImportParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.importKey()`, when importing any RSA-based key pair.\n\n## Instance properties\n\n- `name`\n  - : A string. This should be set to `RSASSA-PKCS1-v1_5`.\n\n- `hash`\n  - : A string representing the name of the digest function to use. This can be one of `SHA-256`, `SHA-384`, or `SHA-512`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Set/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get Set\\[Symbol.species]\n\nThe **`Set[Symbol.species]`** accessor property is an unused accessor property specifying how to copy `Set` objects.\n\n## Syntax\n\n```js\nSet[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct copied `Set` instances.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `Set` objects. Subclass constructors may override it to change the constructor assignment.\n\n> **Note:** This property is currently unused by all `Set` methods.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Set/Set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set()\n\nThe **`Set` constructor** lets you\ncreate `Set` objects that store unique values of any type, whether [primitive values](https://developer.mozilla.org/docs/Glossary/Primitive) or object\nreferences.\n\n## Syntax\n\n```js\nnew Set()\nnew Set(iterable)\n```\n\n> **Note:** `Set()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable` _**optional**_\n\n  - : If an [iterable object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) is passed, all of its elements will be added to the new\n    `Set`.\n\n    If you don't specify this parameter, or its value is `null`, the new\n    `Set` is empty.\n\n### Return value\n\nA new `Set` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Set/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype\\[Symbol.iterator]()\n\nThe **`[Symbol.iterator`** method of a `Set` object implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows sets to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the values of the set.\n\nThe initial value of this property is the same function object as the initial value of the [`Set.prototype.values`](../../../globals/Set/prototype/values.mdx) property.\n\n## Syntax\n\n```js\nset[Symbol.iterator]()\n```\n\n### Return value\n\nThe same return value as [`Set.prototype.values()`](../../../globals/Set/prototype/values.mdx): a new iterable iterator object that yields the values of the set.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Set/prototype/add.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.add()\n\nThe **`add()`** method inserts a new element with a specified value in to a `Set` object, if there isn't an element with the same value already in the `Set`.\n\n## Syntax\n\n```js\nadd(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value of the element to add to the `Set` object.\n\n### Return value\n\nThe `Set` object with added value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Set/prototype/clear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.clear()\n\nThe **`clear()`** method removes all elements from a\n`Set` object.\n\n## Syntax\n\n```js\nclear()\n```\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Set/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.delete()\n\nThe **`delete()`** method removes a specified value from a\n`Set` object, if it is in the set.\n\n## Syntax\n\n```js\ndelete(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to remove from `Set`.\n\n### Return value\n\nReturns `true` if `value` was already in\n`Set`; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Set/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.entries()\n\nThe **`entries()`** method returns a new [Iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators) object\nthat contains **an array of `[value, value]`** for each element\nin the `Set` object, in insertion order. For `Set` objects there\nis no `key` like in `Map` objects. However, to keep the API\nsimilar to the `Map` object, each _entry_ has the same value for its\n_key_ and _value_ here, so that an array `[value, value]` is\nreturned.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nA new iterator object that contains an array of `[value, value]` for each\nelement in the given `Set`, in insertion order.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Set/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.forEach()\n\nThe **`forEach()`** method executes a provided function once\nfor each value in the `Set` object, in insertion order.\n\n## Syntax\n\n```js\n// Arrow function\nforEach(() => { /* ... */ } )\nforEach((value) => { /* ... */ } )\nforEach((value, key) => { /* ... */ } )\nforEach((value, key, set) => { /* ... */ } )\n\n// Callback function\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n\n// Inline callback function\nforEach(function() { /* ... */ })\nforEach(function(value) { /* ... */ })\nforEach(function(value, key) { /* ... */ })\nforEach(function(value, key, set) { /* ... */ })\nforEach(function(value, key, set) { /* ... */ }, thisArg)\n```\n\n### Parameters\n\n- `callback`\n\n  - : Function to execute for each element, taking three arguments:\n\n    - `value`, `key`\n      - : The current element being processed in the `Set`. As there are no\n        keys in `Set`, the value is passed for both arguments.\n    - `set`\n      - : The `Set` object which `forEach()` was called upon.\n\n- `thisArg`\n  - : Value to use as `this` when executing `callbackFn`.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n## Description\n\nThe `forEach()` method executes the provided\n`callback` once for each value which actually exists in the\n`Set` object. It is not invoked for values which have been deleted. However,\nit is executed for values which are present but have the value `undefined`.\n\n`callback` is invoked with **three arguments**:\n\n- the **element value**\n- the **element key**\n- the **`Set` object being traversed**\n\nThere are no keys in `Set` objects, however, so the first two arguments are\nboth **values** contained in the [Set](../../../globals/Set/Set.mdx). This is to make it\nconsistent with other `forEach()` methods for [`Map.prototype.forEach()`](../../../globals/Map/prototype/forEach.mdx) and [`Array.prototype.forEach()`](../../../globals/Array/prototype/forEach.mdx).\n\nIf a `thisArg` parameter is provided to `forEach()`,\nit will be passed to `callback` when invoked, for use as its\n`this` value. Otherwise, the value `undefined` will be passed for\nuse as its `this` value. The `this` value ultimately observable by\n`callback` is determined according to\n[the usual rules for determining the `this` seen by a function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this).\n\nEach value is visited once, except in the case when it was deleted and re-added before\n`forEach()` has finished. `callback` is not invoked for\nvalues deleted before being visited. New values added before `forEach()` has\nfinished will be visited.\n\n`forEach()` executes the `callback` function once for\neach element in the `Set` object; it does not return a value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Set/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.has()\n\nThe **`has()`** method returns a boolean indicating whether an\nelement with the specified value exists in a `Set` object or not.\n\n## Syntax\n\n```js\nhas(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to test for presence in the `Set` object.\n\n### Return value\n\nReturns `true` if an element with the specified value exists in the `Set` object; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Set/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.keys()\n\nThe **`keys()`** method is an alias for the [`values()`](../../../globals/Set/prototype/values.mdx) method.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nA new iterator object containing the values for each element in the given\n`Set`, in insertion order.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Set/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.size\n\nThe **`size`** accessor property returns the number of (unique) elements in a [Set](../../../globals/Set/Set.mdx) object.\n\n## Description\n\nThe value of `size` is an integer representing how many entries the `Set` object has. A set accessor function for `size` is `undefined`; you cannot change this property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Set/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.values()\n\nThe **`values()`** method returns a new [Iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators) object that\ncontains the values for each element in the `Set` object in insertion order.\n\n> **Note:** The **`keys()`** method is an alias\n> for this method (for similarity with [Map](../../../globals/Map/Map.mdx) objects), hence the\n> `keys()` page redirecting here. It behaves exactly the same and returns\n> **values** of `Set` elements.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nA new iterator object containing the values for each element in the given\n`Set`, in insertion order.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/String/String.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String() constructor\n\nThe **`String`** constructor is used to create a new\n`String` object. When called instead as a function, it performs type\nconversion to a \"primitive string\" which is usually more\nuseful.\n\n## Syntax\n\n```js\nnew String(thing)\nString(thing)\n```\n\n> **Note:** `String()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\n- `thing`\n  - : Anything to be converted to a string.\n\n### Return value\n\nWhen `String` is called as a constructor (with `new`), it creates a `String` object, which is **not** a primitive.\n\nWhen `String` is called as a function, it coerces the parameter to a string primitive. `Symbol` values would be converted to `\"Symbol(description)\"`, where `description` is the [description](../../globals/Symbol/prototype/description.mdx) of the Symbol, instead of throwing.\n\n> **Warning:** You should rarely find yourself using `String` as a constructor.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/String/fromCharCode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.fromCharCode()\n\nThe static **`String.fromCharCode()`** method returns a string\ncreated from the specified sequence of UTF-16 code units.\n\n## Syntax\n\n```js\nString.fromCharCode(num1)\nString.fromCharCode(num1, num2)\nString.fromCharCode(num1, num2, /* …, */ numN)\n```\n\n### Parameters\n\n- `num1, ..., numN`\n  - : A sequence of numbers that are UTF-16 code units. The range is between\n    `0` and `65535` (`0xFFFF`). Numbers greater than\n    `0xFFFF` are truncated. No validity checks are performed.\n\n### Return value\n\nA string of length `N` consisting of the\n`N` specified UTF-16 code units.\n\n## Description\n\nThis method returns a string and not a `String` object.\n\nBecause `fromCharCode()` is a static method of `String`, you\nalways use it as `String.fromCharCode()`, rather than as a method of a\n`String` object you created.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/String/fromCodePoint.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.fromCodePoint()\n\nThe static **`String.fromCodePoint()`** method returns a string\ncreated by using the specified sequence of code points.\n\n## Syntax\n\n```js\nString.fromCodePoint(num1)\nString.fromCodePoint(num1, num2)\nString.fromCodePoint(num1, num2, /* …, */ numN)\n```\n\n### Parameters\n\n- `num1, ..., numN`\n  - : A sequence of code points.\n\n### Return value\n\nA string created by using the specified sequence of code points.\n\n### Exceptions\n\n- A `RangeError` is thrown if an invalid Unicode\n  code point is given (e.g. `\"RangeError: NaN is not a valid code point\"`).\n\n## Description\n\nThis method returns a string (and _not_ a `String` object).\n\nBecause `fromCodePoint()` is a static method of `String`, you\nmust call it as `String.fromCodePoint()`, rather than as a method of a\n`String` object you created.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/String/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype\\[Symbol.iterator]()\n\nThe **`Symbol.iterator`** method of a string implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows strings to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the Unicode code points of the string value as individual strings.\n\n## Syntax\n\n```js\nstring[Symbol.iterator]()\n```\n\n### Return value\n\nA new iterable iterator object that yields the Unicode code points of the string value as individual strings.\n\n## Description\n\nStrings are iterated by Unicode code points. This means grapheme clusters will be split, but surrogate pairs will be preserved.\n\n```js\n// \"Backhand Index Pointing Right: Dark Skin Tone\"\n[...\"👉🏿\"]; // ['👉', '🏿']\n// splits into the basic \"Backhand Index Pointing Right\" emoji and\n// the \"Dark skin tone\" emoji\n\n// \"Family: Man, Boy\"\n[...\"👨‍👦\"]; // [ '👨', '‍', '👦' ]\n// splits into the \"Man\" and \"Boy\" emoji, joined by a ZWJ\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/String/prototype/at.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.at()\n\nThe **`at()`** method takes an integer value and returns a `('String` consisting of the single UTF-16 code unit located at the specified offset. This method allows for positive and negative integers. Negative integers count back from the last string character.\n\n## Syntax\n\n```js\nat(index)\n```\n\n### Parameters\n\n- `index`\n  - : The index (position) of the string character to be returned. Supports relative indexing from the end of the string when passed a negative index; i.e. if a negative number is used, the character returned will be found by counting back from the end of the string.\n\n### Return value\n\n`('String` consisting of the single UTF-16 code unit located at the specified position. Returns [`undefined`](../../../globals/undefined.mdx) if the given index can not be found.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/String/prototype/charAt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.charAt()\n\nThe `String` object's\n**`charAt()`** method returns a new string consisting of the\nsingle UTF-16 code unit located at the specified offset into the string.\n\n## Syntax\n\n```js\ncharAt(index)\n```\n\n### Parameters\n\n- `index`\n  - : An integer between `0` and `str.length - 1`. If the\n    `index` cannot be converted to the integer or no\n    `index` is provided, the default is `0`, so the first\n    character of `str` is returned.\n\n### Return value\n\nA string representing the character (exactly one UTF-16 code unit) at the specified\n`index`. If `index` is out of range,\n`charAt()` returns an empty string.\n\n## Description\n\nCharacters in a string are indexed from left to right. The index of the first character\nis `0`, and the index of the last character—in a string called\n`stringName` is `stringName.length - 1`. If\nthe `index` you supply is out of this range, JavaScript returns an\nempty string.\n\nIf no `index` is provided to `charAt()`, the default\nis `0`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/String/prototype/charCodeAt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.charCodeAt()\n\nThe **`charCodeAt()`** method returns\nan integer between `0` and `65535` representing the UTF-16 code\nunit at the given index.\n\nThe UTF-16 code unit matches the Unicode code point for code points which can be\nrepresented in a single UTF-16 code unit. If the Unicode code point cannot be\nrepresented in a single UTF-16 code unit (because its value is greater than\n`0xFFFF`) then the code unit returned will be _the first part of a\nsurrogate pair_ for the code point. If you want the entire code point value, use\n[`codePointAt()`](../../../globals/String/prototype/codePointAt.mdx).\n\n## Syntax\n\n```js\ncharCodeAt(index)\n```\n\n### Parameters\n\n- `index`\n  - : An integer greater than or equal to `0` and less than the\n    `length` of the string. If `index` is not a number,\n    it defaults to `0`.\n\n### Return value\n\nA number representing the UTF-16 code unit value of the character at the given\n`index`. If `index` is out of range,\n`charCodeAt()` returns `NaN`.\n\n## Description\n\nUnicode code points range from `0` to `1114111`\n(`0x10FFFF`). The first 128 Unicode code points are a direct match of the\nASCII character encoding. (For information on Unicode, see [UTF-16 characters, Unicode codepoints, and grapheme clusters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters).)\n\n> **Note:** `charCodeAt()` will always return a value that is\n> less than `65536`. This is because the higher code points are represented\n> by _a pair_ of (lower valued) \"surrogate\" pseudo-characters which are used to\n> comprise the real character.\n>\n> Because of this, in order to examine (or reproduce) the full character for individual\n> character values of `65536` or greater, for such characters, it is\n> necessary to retrieve not only `charCodeAt(i)`, but also\n> `charCodeAt(i+1)` (as if manipulating a string with two\n> letters), or to use `codePointAt(i)` instead. See examples 2 and\n> 3 (below).\n\n`charCodeAt()` returns `NaN` if the given\nindex is less than `0`, or if it is equal to or greater than the\n`length` of the string.\n\nBackward compatibility: In historic versions (like JavaScript 1.2) the\n`charCodeAt()` method returns a number indicating the ISO-Latin-1 codeset\nvalue of the character at the given index. The ISO-Latin-1 codeset ranges from\n`0` to `255`. The first `0` to `127` are a\ndirect match of the ASCII character set.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/String/prototype/codePointAt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.codePointAt()\n\nThe **`codePointAt()`** method returns a non-negative integer\nthat is the Unicode code point value at the given position.\nNote that this function does not give the nth code point in a string,\nbut the code point starting at the specified string index.\n\n## Syntax\n\n```js\ncodePointAt(pos)\n```\n\n### Parameters\n\n- `pos`\n  - : Position of an element in `str` to return the code point value\n    from.\n\n### Return value\n\nA decimal number representing the code point value of the character at the given `pos`.\n\n- If there is no element at `pos`, returns [`undefined`](../../../globals/undefined.mdx).\n- If the element at `pos` is a UTF-16 high surrogate, returns the code point of the surrogate _pair_.\n- If the element at `pos` is a UTF-16 low surrogate, returns _only_ the low surrogate code point.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/String/prototype/concat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.concat()\n\nThe **`concat()`** method concatenates\nthe string arguments to the calling string and returns a new string.\n\n## Syntax\n\n```js\nconcat(str1)\nconcat(str1, str2)\nconcat(str1, str2, /* …, */ strN)\n```\n\n### Parameters\n\n- `strN`\n  - : One or more strings to concatenate to `str`.\n\n### Return value\n\nA new string containing the combined text of the strings provided.\n\n## Description\n\nThe `concat()` function concatenates the string arguments to the calling\nstring and returns a new string. Changes to the original string or the returned string\ndon't affect the other.\n\nIf the arguments are not of the type string, they are converted to string values before\nconcatenating.\n\nThe `concat()` method is very similar to the [addition/string concatenation operators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Addition) (`+`, `+=`), except that `concat()` [coerces its arguments directly to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion), while addition coerces its operands to primitives first. For more information, see the reference page for the [`+` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Addition).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/String/prototype/endsWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.endsWith()\n\nThe **`endsWith()`** method determines whether a string ends with the characters of a specified string, returning `true` or `false` as appropriate.\n\n## Syntax\n\n```js\nendsWith(searchString)\nendsWith(searchString, endPosition)\n```\n\n### Parameters\n\n- `searchString`\n  - : The characters to be searched for at the end of `str`. Cannot be a regex.\n- `endPosition` _**optional**_\n  - : The end position at which `searchString` is expected to be found (the index of `searchString`'s last character plus 1). Defaults to `str.length`.\n\n### Return value\n\n**`true`** if the given characters are found at the end of the string; otherwise, **`false`**.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If `searchString` is a regex.\n\n## Description\n\nThis method lets you determine whether or not a string ends with another string. This method is case-sensitive.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/String/prototype/includes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.includes()\n\nThe **`includes()`** method performs a case-sensitive search to determine whether one string may be found within another string, returning `true` or `false` as appropriate.\n\n## Syntax\n\n```js\nincludes(searchString)\nincludes(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n  - : A string to be searched for within `str`. Cannot be a regex.\n- `position` _**optional**_\n  - : The position within the string at which to begin searching for `searchString`. (Defaults to `0`.)\n\n### Return value\n\n**`true`** if the search string is found anywhere within the given string; otherwise, **`false`** if not.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If `searchString` is a regex.\n\n## Description\n\nThis method lets you determine whether or not a string includes another string.\n\n### Case-sensitivity\n\nThe `includes()` method is case sensitive. For example, the following expression returns `false`:\n\n```js\n\"Blue Whale\".includes(\"blue\"); // returns false\n```\n\nYou can work around this constraint by transforming both the original string and the search string to all lowercase:\n\n```js\n\"Blue Whale\".toLowerCase().includes(\"blue\"); // returns true\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/String/prototype/indexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.indexOf()\n\nThe **`indexOf()`** method, given one argument: a substring to search for, searches the entire calling string, and returns the index of the first occurrence of the specified substring. Given a second argument: a number, the method returns the first occurrence of the specified substring at an index greater than or equal to the specified number.\n\n## Syntax\n\n```js\nindexOf(searchString)\nindexOf(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n\n  - : Substring to search for, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion).\n\n    If the method is called with no arguments, `searchString` is coerced to `\"undefined\"`. Therefore,`\"undefined\".indexOf()` returns `0` — because the substring `\"undefined\"` is found at position `0` in the string `\"undefined\"`. But `\"undefine\".indexOf()`, returns `-1` — because the substring `\"undefined\"` is not found in the string `\"undefine\"`.\n\n- `position` _**optional**_\n\n  - : The method returns the index of the first occurrence of the specified substring at a position greater than or equal to `position`, which defaults to `0`. If `position` is greater than the length of the calling string, the method doesn't search the calling string at all. If `position` is less than zero, the method behaves as it would if `position` were `0`.\n\n    - `'hello world hello'.indexOf('o', -5)` returns `4` — because it causes the method to behave as if the second argument were `0`, and the first occurrence of `o` at a position greater or equal to `0` is at position `4`.\n\n    - `'hello world hello'.indexOf('world', 12)` returns `-1` — because, while it's true the substring `world` occurs at index `6`, that position is not greater than or equal to `12`.\n\n    - `'hello world hello'.indexOf('o', 99)` returns `-1` — because `99` is greater than the length of `hello world hello`, which causes the method to not search the string at all.\n\n### Return value\n\nThe index of the first occurrence of `searchString` found, or `-1` if not found.\n\n#### Return value when using an empty search string\n\nSearching for an empty search string produces strange results. With no second argument, or with a second argument whose value is less than the calling string's length, the return value is the same as the value of the second argument:\n\n```js\n\"hello world\".indexOf(\"\"); // returns 0\n\"hello world\".indexOf(\"\", 0); // returns 0\n\"hello world\".indexOf(\"\", 3); // returns 3\n\"hello world\".indexOf(\"\", 8); // returns 8\n```\n\nHowever, with a second argument whose value is greater than or equal to the string's length, the return value is the string's length:\n\n```js\n\"hello world\".indexOf(\"\", 11); // returns 11\n\"hello world\".indexOf(\"\", 13); // returns 11\n\"hello world\".indexOf(\"\", 22); // returns 11\n```\n\nIn the former instance, the method behaves as if it found an empty string just after the position specified in the second argument. In the latter instance, the method behaves as if it found an empty string at the end of the calling string.\n\n## Description\n\nStrings are zero-indexed: The index of a string's first character is `0`, and the index of a string's last character is the length of the string minus 1.\n\n```js\n\"Blue Whale\".indexOf(\"Blue\"); // returns  0\n\"Blue Whale\".indexOf(\"Blute\"); // returns -1\n\"Blue Whale\".indexOf(\"Whale\", 0); // returns  5\n\"Blue Whale\".indexOf(\"Whale\", 5); // returns  5\n\"Blue Whale\".indexOf(\"Whale\", 7); // returns -1\n\"Blue Whale\".indexOf(\"\"); // returns  0\n\"Blue Whale\".indexOf(\"\", 9); // returns  9\n\"Blue Whale\".indexOf(\"\", 10); // returns 10\n\"Blue Whale\".indexOf(\"\", 11); // returns 10\n```\n\nThe `indexOf()` method is case sensitive. For example, the following\nexpression returns `-1`:\n\n```js\n\"Blue Whale\".indexOf(\"blue\"); // returns -1\n```\n\n### Checking occurrences\n\nWhen checking if a specific substring occurs within a string, the correct way to check is test whether the return value is `-1`:\n\n```js\n\"Blue Whale\".indexOf(\"Blue\") !== -1; // true; found 'Blue' in 'Blue Whale'\n\"Blue Whale\".indexOf(\"Bloe\") !== -1; // false; no 'Bloe' in 'Blue Whale'\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/String/prototype/lastIndexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.lastIndexOf()\n\nThe **`lastIndexOf()`** method, given one argument: a substring to search for, searches the entire calling string, and returns the index of the last occurrence of the specified substring. Given a second argument: a number, the method returns the last occurrence of the specified substring at an index less than or equal to the specified number.\n\n## Syntax\n\n```js\nlastIndexOf(searchString)\nlastIndexOf(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n\n  - : Substring to search for, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion).\n\n    If the method is called with no arguments, `searchString` is coerced to `\"undefined\"`. Therefore,`\"undefined\".lastIndexOf()` returns `0` — because the substring `\"undefined\"` is found at position `0` in the string `\"undefined\"`. But `\"undefine\".lastIndexOf()`, returns `-1` — because the substring `\"undefined\"` is not found in the string `\"undefine\"`.\n\n- `position` _**optional**_\n\n  - : The method returns the index of the last occurrence of the specified substring at a position less than or equal to `position`, which defaults to `+Infinity`. If `position` is greater than the length of the calling string, the method searches the entire string. If `position` is less than `0`, the behavior is the same as for `0` — that is, the method looks for the specified substring only at index `0`.\n\n    - `'hello world hello'.lastIndexOf('world', 4)` returns `-1` — because, while the substring `world` does occurs at index `6`, that position is not less than or equal to `4`.\n\n    - `'hello world hello'.lastIndexOf('hello', 99)` returns `12` — because the last occurrence of `hello` at a position less than or equal to `99` is at position `12`.\n\n    - `'hello world hello'.lastIndexOf('hello', 0)` and `'hello world hello'.lastIndexOf('hello', -5)` both return `0` — because both cause the method to only look for `hello` at index `0`.\n\n### Return value\n\nThe index of the last occurrence of `searchString` found, or `-1` if not found.\n\n## Description\n\nStrings are zero-indexed: The index of a string's first character is `0`, and the index of a string's last character is the length of the string minus 1.\n\n```js\n\"canal\".lastIndexOf(\"a\"); // returns 3\n\"canal\".lastIndexOf(\"a\", 2); // returns 1\n\"canal\".lastIndexOf(\"a\", 0); // returns -1\n\"canal\".lastIndexOf(\"x\"); // returns -1\n\"canal\".lastIndexOf(\"c\", -5); // returns 0\n\"canal\".lastIndexOf(\"c\", 0); // returns 0\n\"canal\".lastIndexOf(\"\"); // returns 5\n\"canal\".lastIndexOf(\"\", 2); // returns 2\n```\n\n### Case-sensitivity\n\nThe `lastIndexOf()` method is case sensitive. For example, the following\nexpression returns `-1`:\n\n```js\n\"Blue Whale, Killer Whale\".lastIndexOf(\"blue\"); // returns -1\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/String/prototype/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.length\n\nThe **`length`** data property of a string contains the length of the string in UTF-16 code units.\n\n## Value\n\nA non-negative integer.\n\n## Description\n\nThis property returns the number of code units in the string. JavaScript uses [UTF-16](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters) encoding, where each Unicode character may be encoded as one or two code units, so it's possible for the value returned by `length` to not match the actual number of Unicode characters in the string. For common scripts like Latin, Cyrillic, wellknown CJK characters, etc., this should not be an issue, but if you are working with certain scripts, such as emojis, [mathematical symbols](https://en.wikipedia.org/wiki/Mathematical_Alphanumeric_Symbols), or obscure Chinese characters, you may need to account for the difference between code units and characters.\n\nThe language specification requires strings to have a maximum length of 2<sup>53</sup> - 1 elements, which is the upper limit for [precise integers](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER). However, a string with this length needs 16384TiB of storage, which cannot fit in any reasonable device's memory, so implementations tend to lower the threshold, which allows the string's length to be conveniently stored in a 32-bit integer.\n\n- In V8 (used by Chrome and Node), the maximum length is 2<sup>29</sup> - 24 (\\~1GiB). On 32-bit systems, the maximum length is 2<sup>28</sup> - 16 (\\~512MiB).\n- In Firefox, the maximum length is 2<sup>30</sup> - 2 (\\~2GiB). Before Firefox 65, the maximum length was 2<sup>28</sup> - 1 (\\~512MiB).\n- In Safari, the maximum length is 2<sup>31</sup> - 1 (\\~4GiB).\n\nFor an empty string, `length` is 0.\n\nThe static property `String.length` is unrelated to the length of strings. It's the [arity](../../../globals/Function/prototype/length.mdx) of the `String` function (loosely, the number of formal parameters it has), which is 1.\n\nSince `length` counts code units instead of characters, if you want to get the number of characters, you can first split the string with its [iterator](../../../globals/String/prototype/@@iterator.mdx), which iterates by characters:\n\n```js\nfunction getCharacterLength(str) {\n  // The string iterator that is used here iterates over characters,\n  // not mere code units\n  return [...str].length;\n}\n\nconsole.log(getCharacterLength(\"A\\uD87E\\uDC04Z\")); // 3\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/String/prototype/localeCompare.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.localeCompare()\n\nThe **`localeCompare()`** method returns a number indicating whether a reference string comes before, or after, or is the same as the given string in sort order. In implementations with [`Intl.Collator` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator) support, this method simply calls `Intl.Collator`.\n\n## Syntax\n\n```js\nlocaleCompare(compareString)\nlocaleCompare(compareString, locales)\nlocaleCompare(compareString, locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` parameters customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.Collator` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator), these parameters correspond exactly to the [`Intl.Collator()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator) constructor's parameters. Implementations without `Intl.Collator` support are asked to ignore both parameters, making the comparison result returned entirely implementation-dependent — it's only required to be _consistent_.\n\n- `compareString`\n  - : The string against which the `referenceStr` is compared.\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator#locales) parameter of the `Intl.Collator()` constructor.\n\n    In implementations without `Intl.Collator` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator#options) parameter of the `Intl.Collator()` constructor.\n\n    In implementations without `Intl.Collator` support, this parameter is ignored.\n\nSee the [`Intl.Collator()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator) for details on the `locales` and `options` parameters and how to use them.\n\n### Return value\n\nA **negative** number if `referenceStr` occurs before `compareString`; **positive** if the `referenceStr` occurs after `compareString`; `0` if they are equivalent.\n\nIn implementations with `Intl.Collator`, this is equivalent to `new Intl.Collator(locales, options).compare(referenceStr, compareString)`.\n\n## Description\n\nReturns an integer indicating whether the `referenceStr` comes\nbefore, after or is equivalent to the `compareString`.\n\n- Negative when the `referenceStr` occurs before\n  `compareString`\n- Positive when the `referenceStr` occurs after\n  `compareString`\n- Returns `0` if they are equivalent\n\n> **Warning:** Do not rely on exact return values of `-1` or `1`!\n>\n> Negative and positive integer results vary between browsers (as well as between\n> browser versions) because the W3C specification only mandates negative and positive\n> values. Some browsers may return `-2` or `2`, or even some other\n> negative or positive value.\n\n## Performance\n\nWhen comparing large numbers of strings, such as in sorting large arrays, it is better to create an [`Intl.Collator`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator) object and use the function provided by its [`compare()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/compare) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/String/prototype/match.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.match()\n\nThe **`match()`** method retrieves the result of matching a string against a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions).\n\n## Syntax\n\n```js\nmatch(regexp)\n```\n\n### Parameters\n\n- `regexp`\n\n  - : A regular expression object, or any object that has a [`Symbol.match`](../../../globals/Symbol/match.mdx) method.\n\n    If `regexp` is not a `RegExp` object and does not have a `Symbol.match` method, it is implicitly converted to a `RegExp` by using `new RegExp(regexp)`.\n\n    If you don't give any parameter and use the `match()` method directly, you will get an `Array` with an empty string: `[\"\"]`, because this is equivalent to `match(/(?:)/)`.\n\n### Return value\n\nAn `Array` whose contents depend on the presence or absence of the global (`g`) flag, or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) if no matches are found.\n\n- If the `g` flag is used, all results matching the complete regular expression will be returned, but capturing groups are not included.\n- If the `g` flag is not used, only the first complete match and its related capturing groups are returned. In this case, `match()` will return the same result as `RegExp.prototype.exec()` (an array with some extra properties).\n\n## Description\n\nThe implementation of `String.prototype.match` itself is very simple — it simply calls the `Symbol.match` method of the argument with the string as the first parameter. The actual implementation comes from [`RegExp.prototype[@@match]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@match).\n\n- If you need to know if a string matches a regular expression `RegExp`, use `RegExp.prototype.test()`.\n- If you only want the first match found, you might want to use `RegExp.prototype.exec()` instead.\n- If you want to obtain capture groups and the global flag is set, you need to use `RegExp.prototype.exec()` or [`String.prototype.matchAll()`](../../../globals/String/prototype/matchAll.mdx) instead.\n\nFor more information about the semantics of `match()` when a regex is passed, see [`RegExp.prototype[@@match]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@match).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/String/prototype/matchAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.matchAll()\n\nThe **`matchAll()`** method returns an iterator of all results matching a string against a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions), including [capturing groups](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions/Groups_and_Backreferences).\n\n## Syntax\n\n```js\nmatchAll(regexp)\n```\n\n### Parameters\n\n- `regexp`\n\n  - : A regular expression object, or any object that has a [`Symbol.matchAll`](../../../globals/Symbol/matchAll.mdx) method.\n\n    If `regexp` is not a `RegExp` object and does not have a `Symbol.matchAll` method, it is implicitly converted to a `RegExp` by using `new RegExp(regexp, 'g')`.\n\n    If `regexp` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes), then it must have the global (`g`) flag set, or a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Return value\n\nAn [iterable iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators) (which is not restartable) of matches. Each match is an array with the same shape as the return value of `RegExp.prototype.exec()`.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown if the `regexp` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes) that does not have the global (`g`) flag set (its [`flags`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/flags) property does not contain `\"g\"`).\n\n## Description\n\nThe implementation of `String.prototype.matchAll` itself is very simple — it simply calls the `Symbol.matchAll` method of the argument with the string as the first parameter (apart from the extra input validation that the regex is global). The actual implementation comes from [`RegExp.prototype[@@matchAll]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@matchAll).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/String/prototype/padEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.padEnd()\n\nThe **`padEnd()`** method pads the current string with a given\nstring (repeated, if needed) so that the resulting string reaches a given length. The\npadding is applied from the end of the current string.\n\n## Syntax\n\n```js\npadEnd(targetLength)\npadEnd(targetLength, padString)\n```\n\n### Parameters\n\n- `targetLength`\n  - : The length of the resulting string once the current `str` has\n    been padded. If the value is lower than `str.length`, the\n    current string will be returned as-is.\n- `padString` _**optional**_\n  - : The string to pad the current `str` with. If\n    `padString` is too long to stay within\n    `targetLength`, it will be truncated: for left-to-right\n    languages the left-most part and for right-to-left languages the right-most will be\n    applied. The default value for this parameter is \" \"\n    (`U+0020`).\n\n### Return value\n\nA `String` of the specified `targetLength` with the\n`padString` applied at the end of the current\n`str`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/String/prototype/padStart.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.padStart()\n\nThe **`padStart()`** method pads the\ncurrent string with another string (multiple times, if needed) until the resulting\nstring reaches the given length. The padding is applied from the start of the\ncurrent string.\n\n## Syntax\n\n```js\npadStart(targetLength)\npadStart(targetLength, padString)\n```\n\n### Parameters\n\n- `targetLength`\n  - : The length of the resulting string once the current `str` has\n    been padded. If the value is less than `str.length`, then\n    `str` is returned as-is.\n- `padString` _**optional**_\n  - : The string to pad the current `str` with. If\n    `padString` is too long to stay within the\n    `targetLength`, it will be truncated from the end.\n    The default value is the unicode \"space\" character (U+0020).\n\n### Return value\n\nA `String` of the specified `targetLength` with\n`padString` applied from the start.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/String/prototype/repeat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.repeat()\n\nThe **`repeat()`** method constructs and returns a new string\nwhich contains the specified number of copies of the string on which it was called,\nconcatenated together.\n\n## Syntax\n\n```js\nrepeat(count)\n```\n\n### Parameters\n\n- `count`\n  - : An integer between `0` and\n    [`+Infinity`](../../../globals/Number/POSITIVE_INFINITY.mdx), indicating the\n    number of times to repeat the string.\n\n### Return value\n\nA new string containing the specified number of copies of the given string.\n\n### Exceptions\n\n- Throws a `RangeError` if repeat count is negative.\n- Throws a `RangeError` if repeat count is infinity or overflows maximum string size.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/String/prototype/replace.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.replace()\n\nThe **`replace()`** method returns a new string with one, some, or all matches of a `pattern` replaced by a `replacement`. The `pattern` can be a string or a `RegExp`, and the `replacement` can be a string or a function called for each match. If `pattern` is a string, only the first occurrence will be replaced. The original string is left unchanged.\n\n## Syntax\n\n```js\nreplace(pattern, replacement)\n```\n\n### Parameters\n\n- `pattern`\n  - : Can be a string or an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method — the typical example being a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp). Any value that doesn't have the `Symbol.replace` method will be coerced to a string.\n- `replacement`\n  - : Can be a string or a function.\n    - If it's a string, it will replace the substring matched by `pattern`. A number of special replacement patterns are supported; see the [Specifying a string as the replacement](#specifying-a-string-as-the-replacement) section below.\n    - If it's a function, it will be invoked for every match and its return value is used as the replacement text. The arguments supplied to this function are described in the [Specifying a function as the replacement](#specifying-a-function-as-the-replacement) section below.\n\n### Return value\n\nA new string, with one, some, or all matches of the pattern replaced by the specified replacement.\n\n## Description\n\nThis method does not mutate the string value it's called on. It returns a new string.\n\nA string pattern will only be replaced once. To perform a global search and replace, use a regular expression with the `g` flag, or use [`replaceAll()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/replaceAll) instead.\n\nIf `pattern` is an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method (including `RegExp` objects), that method is called with the target string and `replacement` as arguments. Its return value becomes the return value of `replace()`. In this case the behavior of `replace()` is entirely encoded by the `@@replace` method — for example, any mention of \"capturing groups\" in the description below is actually functionality provided by [`RegExp.prototype[@@replace]`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@replace).\n\nIf the `pattern` is an empty string, the replacement is prepended to the start of the string.\n\n```js\n\"xxx\".replace(\"\", \"_\"); // \"_xxx\"\n```\n\nA regexp with the `g` flag is the only case where `replace()` replaces more than once. For more information about how regex properties (especially the [sticky](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky) flag) interact with `replace()`, see [`RegExp.prototype[@@replace]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@replace).\n\n### Specifying a string as the replacement\n\nThe replacement string can include the following special replacement patterns:\n\n| Pattern   | Inserts                                                                                        |\n| --------- | ---------------------------------------------------------------------------------------------- |\n| `$$`      | Inserts a `\"$\"`.                                                                               |\n| `$&`      | Inserts the matched substring.                                                                 |\n| `` $` ``  | Inserts the portion of the string that precedes the matched substring.                         |\n| `$'`      | Inserts the portion of the string that follows the matched substring.                          |\n| `$n`      | Inserts the `n`th (`1`-indexed) capturing group where `n` is a positive integer less than 100. |\n| `$<Name>` | Inserts the named capturing group where `Name` is the group name.                              |\n\n`$n` and `$<Name>` are only available if the `pattern` argument is a `RegExp` object. If the `pattern` is a string, or if the corresponding capturing group isn't present in the regex, then the pattern will be replaced as a literal. If the group is present but isn't matched (because it's part of a disjunction), it will be replaced with an empty string.\n\n```js\n\"foo\".replace(/(f)/, \"$2\");\n// \"$2oo\"; the regex doesn't have the second group\n\n\"foo\".replace(\"f\", \"$1\");\n// \"$1oo\"; the pattern is a string, so it doesn't have any groups\n\n\"foo\".replace(/(f)|(g)/, \"$2\");\n// \"oo\"; the second group exists but isn't matched\n```\n\n### Specifying a function as the replacement\n\nYou can specify a function as the second parameter. In this case, the function will be invoked after the match has been performed. The function's result (return value) will be used as the replacement string.\n\n> **Note:** The above-mentioned special replacement patterns do _not_ apply for strings returned from the replacer function.\n\nThe function has the following signature:\n\n```js\nfunction replacer(match, p1, p2, /* …, */ pN, offset, string, groups) {\n  return replacement;\n}\n```\n\nThe arguments to the function are as follows:\n\n- `match`\n  - : The matched substring. (Corresponds to `$&` above.)\n- `p1, p2, …, pN`\n  - : The `n`th string found by a capture group (including named capturing groups), provided the first argument to `replace()` is a `RegExp` object. (Corresponds to `$1`, `$2`, etc. above.) For example, if the `pattern` is `/(\\a+)(\\b+)/`, then `p1` is the match for `\\a+`, and `p2` is the match for `\\b+`. If the group is part of a disjunction (e.g. `\"abc\".replace(/(a)|(b)/, replacer)`), the unmatched alternative will be `undefined`.\n- `offset`\n  - : The offset of the matched substring within the whole string being examined. For example, if the whole string was `'abcd'`, and the matched substring was `'bc'`, then this argument will be `1`.\n- `string`\n  - : The whole string being examined.\n- `groups`\n  - : An object whose keys are the used group names, and whose values are the matched portions (`undefined` if not matched). Only present if the `pattern` contains at least one named capturing group.\n\nThe exact number of arguments depends on whether the first argument is a `RegExp` object — and, if so, how many capture groups it has.\n\nThe following example will set `newString` to `'abc - 12345 - #$*%'`:\n\n```js\nfunction replacer(match, p1, p2, p3, offset, string) {\n  // p1 is non-digits, p2 digits, and p3 non-alphanumerics\n  return [p1, p2, p3].join(\" - \");\n}\nconst newString = \"abc12345#$*%\".replace(/([^\\d]*)(\\d*)([^\\w]*)/, replacer);\nconsole.log(newString); // abc - 12345 - #$*%\n```\n\nThe function will be invoked multiple times for each full match to be replaced if the regular expression in the first parameter is global.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/String/prototype/replaceAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.replaceAll()\n\nThe **`replaceAll()`** method returns a new string with all matches of a `pattern` replaced by a `replacement`. The `pattern` can be a string or a `RegExp`, and the `replacement` can be a string or a function to be called for each match. The original string is left unchanged.\n\n## Syntax\n\n```js\nreplaceAll(pattern, replacement)\n```\n\n### Parameters\n\n- `pattern`\n\n  - : Can be a string or an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method — the typical example being a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp). Any value that doesn't have the `Symbol.replace` method will be coerced to a string.\n\n    If `pattern` is a regex, then it must have the global (`g`) flag set, or a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n- `replacement`\n  - : Can be a string or a function. The replacement has the same semantics as that of [`String.prototype.replace()`](../../../globals/String/prototype/replace.mdx).\n\n### Return value\n\nA new string, with all matches of a pattern replaced by a replacement.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown if the `pattern` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes) that does not have the global (`g`) flag set (its [`flags`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/flags) property does not contain `\"g\"`).\n\n## Description\n\nThis method does not mutate the string value it's called on. It returns a new string.\n\nUnlike [`String.prototype.replace()`](../../../globals/String/prototype/replace.mdx), this method would replace all occurrences of a string, not just the first one. This is especially useful if the string is not statically known, as calling the [`RegExp()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/RegExp) constructor without escaping special characters may unintentionally change its semantics.\n\n```js\nfunction unsafeRedactName(text, name) {\n  return text.replace(new RegExp(name, \"g\"), \"[REDACTED]\");\n}\nfunction safeRedactName(text, name) {\n  return text.replaceAll(name, \"[REDACTED]\");\n}\n\nconst report =\n  \"A hacker called ha.*er used special characters in their name to breach the system.\";\n\nconsole.log(unsafeRedactName(report, \"ha.*er\")); // \"A [REDACTED]s in their name to breach the system.\"\nconsole.log(safeRedactName(report, \"ha.*er\")); // \"A hacker called [REDACTED] used special characters in their name to breach the system.\"\n```\n\nIf `pattern` is an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method (including `RegExp` objects), that method is called with the target string and `replacement` as arguments. Its return value becomes the return value of `replaceAll()`. In this case the behavior of `replaceAll()` is entirely encoded by the `Symbol.replace` method, and therefore will have the same result as `replace()` (apart from the extra input validation that the regex is global).\n\nIf the `pattern` is an empty string, the replacement will be inserted in between every UTF-16 code unit, similar to [`String.prototype.split()`](../../../globals/String/prototype/split.mdx) behavior.\n\n```js\n\"xxx\".replaceAll(\"\", \"_\"); // \"_x_x_x_\"\n```\n\nFor more information about how regex properties (especially the [sticky](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky) flag) interact with `replaceAll()`, see [`RegExp.prototype[@@replace]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@replace).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/String/prototype/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.search()\n\nThe **`search()`** method executes a search for a match between a regular expression and this `String` object.\n\n## Syntax\n\n```js\nsearch(regexp)\n```\n\n### Parameters\n\n- `regexp`\n\n  - : A regular expression object, or any object that has a [`Symbol.search`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/search) method.\n\n    If `regexp` is not a `RegExp` object and does not have a `Symbol.search` method, it is implicitly converted to a `RegExp` by using `new RegExp(regexp)`.\n\n### Return value\n\nThe index of the first match between the regular expression and the given string, or `-1` if no match was found.\n\n## Description\n\nThe implementation of `String.prototype.search()` itself is very simple — it simply calls the `Symbol.search` method of the argument with the string as the first parameter. The actual implementation comes from [`RegExp.prototype[@@search]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@search).\n\nThe `g` flag of `regexp` has no effect on the `search()` result, and the search always happens as if the regex's `lastIndex` is 0. For more information on the behavior of `search()`, see [`RegExp.prototype[@@search]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@search).\n\nWhen you want to know whether a pattern is found, and _also_ know its index within a string, use `search()`.\n\n- If you only want to know if it exists, use the `RegExp.prototype.test()` method, which returns a boolean.\n- If you need the content of the matched text, use `String.prototype.match()` or `RegExp.prototype.exec()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/String/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.slice()\n\nThe **`slice()`** method extracts a section of a string and\nreturns it as a new string, without modifying the original string.\n\n## Syntax\n\n```js\nslice(indexStart)\nslice(indexStart, indexEnd)\n```\n\n### Parameters\n\n- `indexStart`\n  - : The index of the first character to include in the returned substring.\n- `indexEnd` _**optional**_\n  - : The index of the first character to exclude from the returned substring.\n\n### Return value\n\nA new string containing the extracted section of the string.\n\n## Description\n\n`slice()` extracts the text from one string and returns a new string. Changes to the text in one string do not affect the other string.\n\n`slice()` extracts up to but not including `indexEnd`. For example, `str.slice(1, 4)` extracts the second character through the fourth character (characters indexed `1`, `2`, and `3`).\n\n- If `indexStart >= str.length`, an empty string is returned.\n- If `indexStart < 0`, the index is counted from the end of the string. More formally, in this case, the substring starts at `max(indexStart + str.length, 0)`.\n- If `indexStart` is omitted, undefined, or cannot be converted to a number (using [`Number()`](../../../globals/Number/Number.mdx)), it's treated as `0`.\n- If `indexEnd` is omitted, undefined, or cannot be converted to a number (using [`Number()`](../../../globals/Number/Number.mdx)), or if `indexEnd >= str.length`, `slice()` extracts to the end of the string.\n- If `indexEnd < 0`, the index is counted from the end of the string. More formally, in this case, the substring ends at `max(indexEnd + str.length, 0)`.\n- If `indexEnd <= indexStart` after normalizing negative values (i.e. `indexEnd` represents a character that's before `indexStart`), an empty string is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/String/prototype/split.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.split()\n\nThe **`split()`** method takes a pattern and divides a `String` into an ordered list of substrings by searching for the pattern, puts these substrings into an array, and returns the array.\n\n## Syntax\n\n```js\nsplit()\nsplit(separator)\nsplit(separator, limit)\n```\n\n### Parameters\n\n- `separator` _**optional**_\n  - : The pattern describing where each split should occur. Can be a string or an object with a [`Symbol.split`](../../../globals/Symbol/split.mdx) method — the typical example being a regular expression. If undefined, the original target string is returned wrapped in an array.\n- `limit` _**optional**_\n  - : A non-negative integer specifying a limit on the number of substrings to be included in the array. If provided, splits the string at each occurrence of the specified `separator`, but stops when `limit` entries have been placed in the array. Any leftover text is not included in the array at all.\n    - The array may contain fewer entries than `limit` if the end of the string is reached before the limit is reached.\n    - If `limit` is `0`, `[]` is returned.\n\n### Return value\n\nAn `Array` of strings, split at each point where the `separator` occurs in the given string.\n\n## Description\n\nIf `separator` is a non-empty string, the target string is split by all matches of the `separator` without including `separator` in the results. For example, a string containing tab separated values (TSV) could be parsed by passing a tab character as the separator, like `myString.split(\"\\t\")`. If `separator` contains multiple characters, that entire character sequence must be found in order to split. If `separator` appears at the beginning (or end) of the string, it still has the effect of splitting, resulting in an empty (i.e. zero length) string appearing at the first (or last) position of the returned array. If `separator` does not occur in `str`, the returned array contains one element consisting of the entire string.\n\nIf `separator` is an empty string (`\"\"`), `str` is converted to an array of each of its UTF-16 \"characters\", without empty strings on either ends of the resulting string.\n\n> **Note:** `\"\".split(\"\")` is therefore the only way to produce an empty array when a string is passed as `separator`.\n\n> **Warning:** When the empty string (`\"\"`) is used as a separator, the string is **not** split by _user-perceived characters_ ([grapheme clusters](https://unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries)) or unicode characters (codepoints), but by UTF-16 codeunits. This destroys [surrogate pairs](https://unicode.org/faq/utf_bom.html#utf16-2). See [\"How do you get a string to a character array in JavaScript?\" on StackOverflow](https://stackoverflow.com/questions/4547609/how-to-get-character-array-from-a-string/34717402#34717402).\n\nIf `separator` is a regexp that matches empty strings, whether the match is split by UTF-16 code units or Unicode codepoints depends on if the [`u`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/unicode) flag is set.\n\n```js\n\"😄😄\".split(/(?:)/); // [ \"\\ud83d\", \"\\ude04\", \"\\ud83d\", \"\\ude04\" ]\n\"😄😄\".split(/(?:)/u); // [ \"😄\", \"😄\" ]\n```\n\nIf `separator` is a regular expression with capturing groups, then each time `separator` matches, the captured groups (including any `undefined` results) are spliced into the output array. This behavior is specified by the regexp's [`Symbol.split`](../../../globals/Symbol/split.mdx) method.\n\nIf `separator` is an object with a [`Symbol.split`](../../../globals/Symbol/split.mdx) method, that method is called with the target string and `limit` as arguments, and `this` set to the object. Its return value becomes the return value of `split`.\n\nAny other value will be coerced to a string before being used as separator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/String/prototype/startsWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.startsWith()\n\nThe **`startsWith()`** method determines whether a string begins with the characters of a specified string, returning `true` or `false` as appropriate.\n\n## Syntax\n\n```js\nstartsWith(searchString)\nstartsWith(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n  - : The characters to be searched for at the start of this string. Cannot be a regex.\n- `position` _**optional**_\n  - : The start position at which `searchString` is expected to be found (the index of `searchString`'s first character). Defaults to `0`.\n\n### Return value\n\n**`true`** if the given characters are found at the beginning of the string; otherwise, **`false`**.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If `searchString` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes).\n\n## Description\n\nThis method lets you determine whether or not a string begins with another string. This method is case-sensitive.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/String/prototype/substr.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.substr()\n\nThe **`substr()`** method returns a portion of the string, starting at the specified index and extending for a given number of characters afterwards.\n\n> **Note:** `substr()` is not part of the main ECMAScript specification — it's defined in [Annex B: Additional ECMAScript Features for Web Browsers](https://tc39.es/ecma262/#sec-additional-ecmascript-features-for-web-browsers), which is normative optional for non-browser runtimes. Therefore, people are advised to use the standard [`String.prototype.substring()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/substring) and [`String.prototype.slice()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/slice) methods instead to make their code maximally cross-platform friendly. The [`String.prototype.substring()` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/substring#the_difference_between_substring_and_substr) has some comparisons between the three methods.\n\n\n\n## Syntax\n\n```js\nsubstr(start)\nsubstr(start, length)\n```\n\n### Parameters\n\n- `start`\n  - : The index of the first character to include in the returned substring.\n- `length` _**optional**_\n  - : The number of characters to extract.\n\n### Return value\n\nA new string containing the specified part of the given string.\n\n## Description\n\nA string's `substr()` method extracts `length` characters from the string, counting from the `start` index.\n\n- If `start >= str.length`, an empty string is returned.\n- If `start < 0`, the index starts counting from the end of the string. More formally, in this case the substring starts at `max(start + str.length, 0)`.\n- If `start` is omitted or [`undefined`](../../../globals/undefined.mdx), it's treated as `0`.\n- If `length` is omitted or [`undefined`](../../../globals/undefined.mdx), or if `start + length >= str.length`, `substr()` extracts characters to the end of the string.\n- If `length < 0`, an empty string is returned.\n- For both `start` and `length`, [`NaN`](../../../globals/NaN.mdx) is treated as `0`.\n\nAlthough you are encouraged to avoid using `substr()`, there is no trivial way to migrate `substr()` to either `slice()` or `substring()` in legacy code without essentially writing a polyfill for `substr()`. For example, `str.substr(a, l)`, `str.slice(a, a + l)`, and `str.substring(a, a + l)` all have different results when `str = \"01234\", a = 1, l = -2` — `substr()` returns an empty string, `slice()` returns `\"123\"`, while `substring()` returns `\"0\"`. The actual refactoring path depends on the knowledge of the range of `a` and `l`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/String/prototype/substring.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.substring()\n\nThe **`substring()`** method returns the part of the `string` from the start index up to and excluding the end index, or to the end of the string if no end index is supplied.\n\n## Syntax\n\n```js\nsubstring(indexStart)\nsubstring(indexStart, indexEnd)\n```\n\n### Parameters\n\n- `indexStart`\n  - : The index of the first character to include in the returned substring.\n- `indexEnd` _**optional**_\n  - : The index of the first character to exclude from the returned substring.\n\n### Return value\n\nA new string containing the specified part of the given string.\n\n## Description\n\n`substring()` extracts characters from `indexStart` up to _but not including_ `indexEnd`. In particular:\n\n- If `indexEnd` is omitted, `substring()` extracts characters to the end of the string.\n- If `indexStart` is equal to `indexEnd`, `substring()` returns an empty string.\n- If `indexStart` is greater than `indexEnd`, then the effect of `substring()` is as if the two arguments were swapped; see example below.\n\nAny argument value that is less than `0` or greater than `str.length` is treated as if it were `0` and `str.length`, respectively.\n\nAny argument value that is [`NaN`](../../../globals/NaN.mdx) is treated as if it were `0`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/String/prototype/toLocaleLowerCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toLocaleLowerCase()\n\nThe **`toLocaleLowerCase()`** method returns the calling string\nvalue converted to lower case, according to any locale-specific case mappings.\n\n## Syntax\n\n```js\ntoLocaleLowerCase()\ntoLocaleLowerCase(locales)\n```\n\n### Parameters\n\n- `locales` _**optional**_\n  - : A string with a BCP 47 language tag, or an array of such strings. Indicates the locale to be used to convert to lower case according to any locale-specific case mappings. For the general form and interpretation of the `locales` argument, see [Locale identification and negotiation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation).\n\n### Return value\n\nA new string representing the calling string converted to lower case, according to any\nlocale-specific case mappings.\n\n### Exceptions\n\n- A [`RangeError`](../../../globals/RangeError/RangeError.mdx) (\"invalid language tag: xx_yy\") is thrown if a\n  `locale` argument isn't a valid language tag.\n- A [`TypeError`](../../../globals/TypeError/TypeError.mdx) (\"invalid element in locales argument\") is thrown if an\n  array element isn't of type string.\n\n## Description\n\nThe `toLocaleLowerCase()` method returns the value of the string converted\nto lower case according to any locale-specific case mappings.\n`toLocaleLowerCase()` does not affect the value of the string itself. In most\ncases, this will produce the same result as [`String.prototype.toLowerCase()`](../../../globals/String/prototype/toLowerCase.mdx), but for some locales, such as Turkish, whose case mappings do not\nfollow the default case mappings in Unicode, there may be a different result.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/String/prototype/toLocaleUpperCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toLocaleUpperCase()\n\nThe **`toLocaleUpperCase()`** method returns the calling string\nvalue converted to upper case, according to any locale-specific case mappings.\n\n## Syntax\n\n```js\ntoLocaleUpperCase()\ntoLocaleUpperCase(locales)\n```\n\n### Parameters\n\n- `locales` _**optional**_\n  - : A string with a BCP 47 language tag, or an array of such strings. Indicates the locale to be used to convert to upper case according to any locale-specific case mappings. For the general form and interpretation of the `locales` argument, see [Locale identification and negotiation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation).\n\n### Return value\n\nA new string representing the calling string converted to upper case, according to any\nlocale-specific case mappings.\n\n### Exceptions\n\n- A [`RangeError`](../../../globals/RangeError/RangeError.mdx) (\"invalid language tag: xx_yy\") is thrown if a\n  `locale` argument isn't a valid language tag.\n- A [`TypeError`](../../../globals/TypeError/TypeError.mdx) (\"invalid element in locales argument\") is thrown if an\n  array element isn't of type string.\n\n## Description\n\nThe `toLocaleUpperCase()` method returns the value of the string converted\nto upper case according to any locale-specific case mappings.\n`toLocaleUpperCase()` does not affect the value of the string itself. In most\ncases, this will produce the same result as [`String.prototype.toUpperCase()`](../../../globals/String/prototype/toUpperCase.mdx), but for some locales, such as Turkish, whose case mappings do not\nfollow the default case mappings in Unicode, there may be a different result.\n\nAlso notice that conversion is not necessarily a 1:1 character mapping, as some\ncharacters might result in two (or even more) characters when transformed to upper-case.\nTherefore the length of the result string can differ from the input length. This also\nimplies that the conversion is not stable, so i.E. the following can return\n`false`:\n`x.toLocaleLowerCase() === x.toLocaleUpperCase().toLocaleLowerCase()`\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/String/prototype/toLowerCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toLowerCase()\n\nThe **`toLowerCase()`** method returns the calling string value\nconverted to lower case.\n\n## Syntax\n\n```js\ntoLowerCase()\n```\n\n### Return value\n\nA new string representing the calling string converted to lower case.\n\n## Description\n\nThe `toLowerCase()` method returns the value of the string converted to\nlower case. `toLowerCase()` does not affect the value of the string\n`str` itself.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/String/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified string value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified string value.\n\n## Description\n\nThe `String` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For `String` values, the `toString` method returns the string itself (if it's a primitive) or the string that the `String` object wraps. It has the exact same implementation as [`String.prototype.valueOf()`](../../../globals/String/prototype/valueOf.mdx).\n\nThe `toString()` method requires its `this` value to be a `String` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to string values.\n\nBecause `String` doesn't have a [`[Symbol.toPrimitive]()`](../../../globals/Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `String` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, String _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — since they are already strings, no conversion is performed.\n\n```js\nString.prototype.toString = () => \"Overridden\";\nconsole.log(`${\"foo\"}`); // \"foo\"\nconsole.log(`${new String(\"foo\")}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/String/prototype/toUpperCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toUpperCase()\n\nThe **`toUpperCase()`** method returns the calling string value\nconverted to uppercase (the value will be converted to a string if it isn't one).\n\n## Syntax\n\n```js\ntoUpperCase()\n```\n\n### Return value\n\nA new string representing the calling string converted to upper case.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : When called on [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../../globals/undefined.mdx), for example,\n    `String.prototype.toUpperCase.call(undefined)`.\n\n## Description\n\nThe `toUpperCase()` method returns the value of the string converted to\nuppercase. This method does not affect the value of the string itself since JavaScript\nstrings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/String/prototype/trim.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.trim()\n\nThe **`trim()`** method removes whitespace from both ends of a string and returns a new string, without modifying the original string.\n\nTo return a new string with whitespace trimmed from just one end, use [`String.prototype.trimStart()`](../../../globals/String/prototype/trimStart.mdx) or [`String.prototype.trimEnd()`](../../../globals/String/prototype/trimEnd.mdx).\n\n## Syntax\n\n```js\ntrim()\n```\n\n### Return value\n\nA new string representing `str` stripped of whitespace from both its beginning and end. Whitespace is defined as [white space](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#white_space) characters plus [line terminators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#line_terminators).\n\nIf neither the beginning or end of `str` has any whitespace, a new string is still returned (essentially a copy of `str`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/String/prototype/trimEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.trimEnd()\n\nThe **`trimEnd()`** method removes whitespace from the end of a string and returns a new string, without modifying the original string. `trimRight()` is an alias of this method.\n\n## Syntax\n\n```js\ntrimEnd()\n\ntrimRight()\n```\n\n### Return value\n\nA new string representing `str` stripped of whitespace from its end (right side). Whitespace is defined as [white space](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#white_space) characters plus [line terminators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#line_terminators).\n\nIf the end of `str` has no whitespace, a new string is still returned (essentially a copy of `str`).\n\n### Aliasing\n\nAfter [`String.prototype.trim()`](../../../globals/String/prototype/trim.mdx) was standardized, engines also implemented the non-standard method `trimRight`. However, for consistency with [`String.prototype.pedEnd()`](../../../globals/String/prototype/trim.mdx), when the method got standardized, its name was chosen as `trimEnd`. For web compatibility reasons, `trimRight` remains as an alias to `trimEnd`, and they refer to the exact same function object. In some engines this means:\n\n```js\nString.prototype.trimRight.name === \"trimEnd\";\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/String/prototype/trimStart.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.trimStart()\n\nThe **`trimStart()`** method removes whitespace from the beginning of a string and returns a new string, without modifying the original string. `trimLeft()` is an alias of this method.\n\n## Syntax\n\n```js\ntrimStart()\n\ntrimLeft()\n```\n\n### Return value\n\nA new string representing `str` stripped of whitespace from its beginning (left side). Whitespace is defined as [white space](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#white_space) characters plus [line terminators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#line_terminators).\n\nIf the beginning of `str` has no whitespace, a new string is still returned (essentially a copy of `str`).\n\n### Aliasing\n\nAfter [`String.prototype.trim()`](../../../globals/String/prototype/trim.mdx) was standardized, engines also implemented the non-standard method `trimLeft`. However, for consistency with [`String.prototype.padEnd()`](../../../globals/String/prototype/padEnd.mdx), when the method got standardized, its name was chosen as `trimStart`. For web compatibility reasons, `trimLeft` remains as an alias to `trimStart`, and they refer to the exact same function object. In some engines this means:\n\n```js\nString.prototype.trimLeft.name === \"trimStart\";\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/String/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a\n`String` object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nA string representing the primitive value of a given `String` object.\n\n## Description\n\nThe `valueOf()` method of `String` returns the primitive value\nof a `String` object as a string data type. This value is equivalent to\n[`String.prototype.toString()`](../../../globals/String/prototype/toString.mdx).\n\nThis method is usually called internally by JavaScript and not explicitly in code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/String/raw.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.raw()\n\nThe static **`String.raw()`** method is a tag function of [template literals](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). This is similar to the `r` prefix in Python, or the `@` prefix in C# for string literals. It's used to get the raw string form of template literals — that is, substitutions (e.g. `${foo}`) are processed, but escape sequences (e.g. `\\n`) are not.\n\n## Syntax\n\n```js\nString.raw(strings, ...substitutions)\n\nString.raw`templateString`\n```\n\n### Parameters\n\n- `strings`\n  - : Well-formed template literal array object, like `{ raw: ['foo', 'bar', 'baz'] }`. Should be an object with a `raw` property whose value is an array-like object of strings.\n- `...substitutions`\n  - : Contains substitution values.\n- `templateString`\n  - : A [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals), optionally with substitutions (`${...}`).\n\n### Return value\n\nThe raw string form of a given template literal.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if the first argument doesn't have a `raw` property, or the `raw` property is `undefined` or `null`.\n\n## Description\n\nIn most cases, `String.raw()` is used with template literals. The first syntax mentioned above is only rarely used, because the JavaScript engine will call this with proper arguments for you, (just like with other [tag functions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals#tagged_templates)).\n\n`String.raw()` is the only built-in template literal tag. It has close semantics to an untagged literal since it concatenates all arguments and returns a string. You can even re-implement it with normal JavaScript code.\n\n> **Warning:** You should not use `String.raw` directly as an \"identity\" tag. See [Building an identity tag](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/raw#building_an_identity_tag) for how to implement this.\n\nIf `String.raw()` is called with an object whose `raw` property doesn't have a `length` property or a non-positive `length`, it returns an empty string `\"\"`. If `substitutions.length < strings.raw.length - 1` (i.e. there are not enough substitutions to fill the placeholders — which can't happen in a well-formed tagged template literal), the rest of the placeholders are filled with empty strings.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/SubtleCrypto/SubtleCrypto.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SubtleCrypto\n\nThe **`SubtleCrypto`** interface provides a number of low-level cryptographic functions. Access to the features of `SubtleCrypto` is obtained through the [`crypto.subtle`](../crypto/subtle.mdx) property.\n\n> **Warning:** This API provides a number of low-level cryptographic primitives. It's very easy to misuse them, and the pitfalls involved can be very subtle.\n>\n> Even assuming you use the basic cryptographic functions correctly, secure key management and overall security system design are extremely hard to get right, and are generally the domain of specialist security experts.\n>\n> Errors in security system design and implementation can make the security of the system completely ineffective.\n>\n> Please learn and experiment, but don't guarantee or imply the security of your work before an individual knowledgeable in this subject matter thoroughly reviews it. The [Crypto 101 Course](https://www.crypto101.io/) can be a great place to start learning about the design and implementation of secure systems.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/SubtleCrypto/prototype/digest.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# digest()\n\nThe **`digest()`** method of the [`SubtleCrypto`](../SubtleCrypto.mdx)\ninterface generates a digest of the given data. A digest is a short\nfixed-length value derived from some variable-length input. Cryptographic digests should\nexhibit collision-resistance, meaning that it's hard to come up with two different\ninputs that have the same digest value.\n\nIt takes as its arguments an identifier for the digest algorithm to use and the data to\ndigest. It returns a [`Promise`](../../Promise/Promise.mdx) which will be fulfilled with the digest.\n\n## Syntax\n\n```js\ndigest(algorithm, data)\n```\n\n### Parameters\n\n- `algorithm`\n  - : This may be a string or an object with a single property `name` that is a string. The string names the hash function to use. Supported values are:\n    - `\"MD5\"` (but don't use this in cryptographic applications)\n    - `\"SHA-1\"` (but don't use this in cryptographic applications)\n    - `\"SHA-256\"`\n    - `\"SHA-384\"`\n    - `\"SHA-512\"`.\n- `data`\n  - : An `ArrayBuffer`, a `TypedArray` or a `DataView` object containing the data to be digested.\n\n### Return value\n\nA [`Promise`](../../Promise/Promise.mdx) that fulfills with an `ArrayBuffer` containing the digest.\n\n## Supported algorithms\n\nDigest algorithms, also known as cryptographic hash functions,\ntransform an arbitrarily large block of data into a fixed-size output,\nusually much shorter than the input. They have a variety of applications in\ncryptography.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/SubtleCrypto/prototype/importKey.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# importKey()\n\nThe **`importKey()`** method of the [`SubtleCrypto`](../SubtleCrypto.mdx)\ninterface imports a key: that is, it takes as input a key in an external, portable\nformat and gives you a [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) object that you can use.\n\nThe function accepts several import formats: see [Supported formats](#supported-formats) for details.\n\n## Syntax\n\n```js\nimportKey(format, keyData, algorithm, extractable, keyUsages)\n```\n\n### Parameters\n\n- `format`\n  - : A string describing the data format of the key to import. It can be one of the following:\n    - `raw`: [Raw](#raw) format.\n    - `jwk`: [JSON Web Key](#json-web-key) format.\n- `keyData`\n  - : An `ArrayBuffer`, a TypedArray, a `DataView`, or a `JSONWebKey` object containing the key in\n    the given format.\n- `algorithm`\n  - : An object defining the type of key to import and providing extra algorithm-specific parameters.\n    - For RSASSA-PKCS1-v1_5:\n      Pass an [`RsaHashedImportParams`](../../RsaHashedImportParams/RsaHashedImportParams.mdx) object.\n    - For HMAC:\n      Pass an [`HmacImportParams`](../../HmacImportParams/HmacImportParams.mdx) object.\n- `extractable`\n  - : A boolean value indicating whether it will be possible to export the key.\n- `keyUsages`\n  - : An `Array` indicating what can be done with the key. Possible array values are:\n    - `encrypt`: The key may be used to encrypt messages.\n    - `decrypt`: The key may be used to decrypt messages.\n    - `sign`: The key may be used to sign messages.\n    - `verify`: The key may be used to verify signatures.\n    - `deriveKey`: The key may be used in deriving a new key.\n    - `deriveBits`: The key may be used in deriving bits.\n    - `wrapKey`: The key may be used to wrap a key.\n    - `unwrapKey`: The key may be used to unwrap a key.\n\n### Return value\n\nA [`Promise`](../../Promise/Promise.mdx)\nthat fulfills with the imported key as a [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) object.\n\n### Exceptions\n\nThe promise is rejected when one of the following exceptions is encountered:\n\n- `SyntaxError`\n  - : Raised when `keyUsages` is empty but the unwrapped key is of\n    type `secret` or `private`.\n- `TypeError`\n  - : Raised when trying to use an invalid format or if the `keyData`\n    is not suited for that format.\n\n## Supported formats\n\nThis API currently supports one key import/export format: JSON Web Key.\n\n### Raw\n\nYou can use this format to import or export AES or HMAC secret keys, or Elliptic Curve\npublic keys.\n\nIn this format the key is supplied as an `ArrayBuffer` containing the raw bytes for the key.\n\n\n### JSON Web Key\n\nYou can use JSON Web Key format to import or export RSA or Elliptic Curve public or\nprivate keys, as well as AES and HMAC secret keys.\n\nJSON Web Key format is defined in [RFC 7517](https://datatracker.ietf.org/doc/html/rfc7517).\nIt describes a way to represent public, private, and secret keys as JSON objects.\n\nA JSON Web Key looks something like this (this is an EC private key):\n\n```json\n{\n  \"crv\": \"P-384\",\n  \"d\": \"wouCtU7Nw4E8_7n5C1-xBjB4xqSb_liZhYMsy8MGgxUny6Q8NCoH9xSiviwLFfK_\",\n  \"ext\": true,\n  \"key_ops\": [\"sign\"],\n  \"kty\": \"EC\",\n  \"x\": \"SzrRXmyI8VWFJg1dPUNbFcc9jZvjZEfH7ulKI1UkXAltd7RGWrcfFxqyGPcwu6AQ\",\n  \"y\": \"hHUag3OvDzEr0uUQND4PXHQTXP5IDGdYhJhL-WLKjnGjQAw0rNGy5V29-aV-yseW\"\n};\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/SubtleCrypto/prototype/sign.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# sign()\n\nThe **`sign()`** method of the [`SubtleCrypto`](../SubtleCrypto.mdx) interface generates a digital signature.\n\nIt takes as its arguments a key to sign with, some algorithm-specific\nparameters, and the data to sign. It returns a `Promise` which will be\nfulfilled with the signature.\n\nYou can use the corresponding [`verify()`](./verify.mdx) method to verify the signature.\n\n## Syntax\n\n```js\nsign(algorithm, key, data)\n```\n\n### Parameters\n\n- `algorithm`\n  - : A string or object that specifies the signature algorithm to use and its parameters:\n    - To use [RSASSA-PKCS1-v1_5](#rsassa-pkcs1-v1_5), pass the string `\"RSASSA-PKCS1-v1_5\"` or an object of the form `{ \"name\": \"RSASSA-PKCS1-v1_5\" }`.\n    - To use [HMAC](#hmac), pass the string `\"HMAC\"` or an object of the form `{ \"name\": \"HMAC\" }`.\n- `key`\n  - : A [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) object containing the key to be used for signing.\n    If `algorithm` identifies a public-key cryptosystem, this is the private key.\n- `data`\n  - : An `ArrayBuffer`, a TypedArray or a `DataView` object containing the data to be signed.\n\n### Return value\n\nA `Promise` that fulfills with an `ArrayBuffer` containing the signature.\n\n### Exceptions\n\nThe promise is rejected when the following exception is encountered:\n\n- `InvalidAccessError`\n  - : Raised when the signing key is not a key for the request signing algorithm or when\n    trying to use an algorithm that is either unknown or isn't suitable for signing.\n\n## Supported algorithms\n\n### RSASSA-PKCS1-v1_5\n\nThe RSASSA-PKCS1-v1_5 algorithm is specified in [RFC 3447](https://datatracker.ietf.org/doc/html/rfc3447).\n\n### HMAC\n\nThe HMAC algorithm calculates and verifies hash-based message authentication codes according to the\n[FIPS 198-1 standard](https://csrc.nist.gov/csrc/media/publications/fips/198/1/final/documents/fips-198-1_final.pdf).\n\nThe digest algorithm to use is specified in the\n[`HmacImportParams`](../../HmacImportParams/HmacImportParams.mdx) object\nthat you pass into [`SubtleCrypto.importKey()`](./importKey.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/SubtleCrypto/prototype/verify.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# verify()\n\nThe **`verify()`** method verifies a digital signature.\n\nIt takes as its arguments a key to verify the signature with, some algorithm-specific parameters, the signature, and the original signed data.\nIt returns a `Promise` which will be fulfilled with a boolean value indicating whether the signature is valid.\n\n## Syntax\n\n```js\nverify(algorithm, key, signature, data)\n```\n\n### Parameters\n\n- `algorithm`\n  - : A string or object defining the algorithm to use, and for some algorithm choices, some extra parameters.\n    The values given for the extra parameters must match those passed into the corresponding [`sign()`](./sign.mdx) call.\n    - To use RSASSA-PKCS1-v1_5, pass the string `\"RSASSA-PKCS1-v1_5\"` or an object of the form `{ \"name\": \"RSASSA-PKCS1-v1_5\" }`.\n    - To use HMAC, pass the string `\"HMAC\"` or an object of the form `{ \"name\": \"HMAC\" }`.\n- `key`\n  - : A [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) containing the key that will be used to verify the signature.\n    It is the secret key for a symmetric algorithm and the public key for a public-key system.\n- `signature`\n  - : A `ArrayBuffer` containing the signature to verify.\n- `data`\n  - : A `ArrayBuffer` containing the data whose signature is to be verified.\n\n### Return value\n\nA `Promise` that fulfills with a\nboolean value: `true` if the signature is valid, `false`\notherwise.\n\n### Exceptions\n\nThe promise is rejected when the following exception is encountered:\n\n- `InvalidAccessError`\n  - : Raised when the encryption key is not a key for the requested verifying algorithm or\n    when trying to use an algorithm that is either unknown or isn't suitable for a verify\n    operation.\n\n## Supported algorithms\n\nThe `verify()` method supports the same algorithms as the [`sign()`](./sign.mdx) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Symbol/Symbol.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol()\n\nThe `Symbol()` constructor returns a value of type **symbol**,\nbut is incomplete as a constructor because it does not support the syntax\n\"`new Symbol()`\" and it is not intended to be subclassed. It may be used as\nthe value of an\n[`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends)\nclause of a `class` definition but a\n[`super`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/super)\ncall to it will cause an exception.\n\n## Syntax\n\n```js\nSymbol()\nSymbol(description)\n```\n\n> **Note:** `Symbol()` can only be called without `new`. Attempting to construct it with `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `description` _**optional**_\n  - : A string. A description of the symbol which can be used for debugging but not to\n    access the symbol itself.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Symbol/asyncIterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.asyncIterator\n\nThe **`Symbol.asyncIterator`** well-known symbol specifies the default [async iterator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_async_iterator_and_async_iterable_protocols) for an object. If this property is set on an object, it is an async iterable and can be used in a [`for await...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for-await...of) loop.\n\n## Value\n\nThe well-known symbol `Symbol.asyncIterator`.\n\n## Description\n\nThe `Symbol.asyncIterator` symbol is a builtin symbol that is used to access an object's `Symbol.asyncIterator` method. In order for an object to be async iterable, it must have a `Symbol.asyncIterator` key.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Symbol/for.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.for()\n\nThe **`Symbol.for(key)`** method searches for existing symbols\nin a runtime-wide symbol registry with the given key and returns it if found. Otherwise\na new symbol gets created in the global symbol registry with this key.\n\n## Syntax\n\n```js\nSymbol.for(key)\n```\n\n### Parameters\n\n- `key`\n  - : String, required. The key for the symbol (and also used for the description of the\n    symbol).\n\n### Return value\n\nAn existing symbol with the given key if found; otherwise, a new symbol is created and\nreturned.\n\n## Description\n\nIn contrast to `Symbol()`, the `Symbol.for()` function creates a\nsymbol available in a [global symbol registry](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol#shared_symbols_in_the_global_symbol_registry) list. `Symbol.for()` does also\nnot necessarily create a new symbol on every call, but checks first if a symbol with the\ngiven `key` is already present in the registry. In that case, that symbol is\nreturned. If no symbol with the given key is found, `Symbol.for()` will\ncreate a new global symbol.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Symbol/hasInstance.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.hasInstance\n\nThe **`Symbol.hasInstance`** well-known symbol is used to determine if a constructor object recognizes an object as its instance. The `instanceof` operator's behavior can be customized by this symbol.\n\n## Value\n\nThe well-known symbol `Symbol.hasInstance`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Symbol/isConcatSpreadable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.isConcatSpreadable\n\nThe **`Symbol.isConcatSpreadable`** well-known symbol is used to configure if an object should be flattened to its array elements when using the [`Array.prototype.concat()`](../../globals/Array/prototype/concat.mdx) method.\n\n## Value\n\nThe well-known symbol `Symbol.isConcatSpreadable`.\n\n## Description\n\nThe `Symbol.isConcatSpreadable` symbol (`Symbol.isConcatSpreadable`) can be defined as an own or inherited property and its value is a boolean. It can control behavior for arrays and array-like objects:\n\n- For array objects, the default behavior is to spread (flatten) elements. `Symbol.isConcatSpreadable` can avoid flattening in these cases.\n- For array-like objects, the default behavior is no spreading or flattening. `Symbol.isConcatSpreadable` can force flattening in these cases.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Symbol/iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.iterator\n\nThe well-known **`Symbol.iterator`** symbol specifies the default iterator for an object. Used by [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of).\n\n## Value\n\nThe well-known symbol `Symbol.iterator`.\n\n## Description\n\nWhenever an object needs to be iterated (such as at the beginning of a `for...of` loop), its `Symbol.iterator` method is called with no arguments, and the returned **iterator** is used to obtain the values to be iterated.\n\nSome built-in types have a default iteration behavior, while other types (such as `Object`) do not. The built-in types with a `Symbol.iterator` method are:\n\n- [`Array.prototype[Symbol.iterator]()`](../../globals/Array/prototype/@@iterator.mdx)\n- [`String.prototype[Symbol.iterator]()`](../../globals/String/prototype/@@iterator.mdx)\n- [`Map.prototype[Symbol.iterator]()`](../../globals/Map/prototype/@@iterator.mdx)\n- [`Set.prototype[Symbol.iterator]()`](../../globals/Set/prototype/@@iterator.mdx)\n\nSee also [Iteration protocols](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) for more information.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Symbol/keyFor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.keyFor()\n\nThe **`Symbol.keyFor(sym)`** method retrieves a shared symbol\nkey from the global symbol registry for the given symbol.\n\n## Syntax\n\n```js\nSymbol.keyFor(sym)\n```\n\n### Parameters\n\n- `sym`\n  - : Symbol, required. The symbol to find a key for.\n\n### Return value\n\nA string representing the key for the given symbol if one is found on the [global registry](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol#shared_symbols_in_the_global_symbol_registry); otherwise, [`undefined`](../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Symbol/match.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.match\n\nThe **`Symbol.match`** well-known symbol specifies the matching of a regular expression against a string. This function is called by the [`String.prototype.match()`](../../globals/String/prototype/match.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.match]()` and [`String.prototype.match()`](../../globals/String/prototype/match.mdx).\n\n## Value\n\nThe well-known symbol `Symbolmatch`.\n\n## Description\n\nThis function is also used to identify [if objects have the behavior of regular expressions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes). For example, the methods [`String.prototype.startsWith()`](../../globals/String/prototype/startsWith.mdx), [`String.prototype.endsWith()`](../../globals/String/prototype/endsWith.mdx) and [`String.prototype.includes()`](../../globals/String/prototype/includes.mdx), check if their first argument is a regular expression and will throw a [`TypeError`](../../globals/TypeError/TypeError.mdx) if they are. Now, if the `match` symbol is set to `false` (or a [Falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value except `undefined`), it indicates that the object is not intended to be used as a regular expression object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Symbol/matchAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.matchAll\n\nThe **`Symbol.matchAll`** well-known symbol specifies the method that returns an iterator, that yields matches of the regular expression against a string. This function is called by the [`String.prototype.matchAll()`](../../globals/String/prototype/matchAll.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.matchAll]()` and [`String.prototype.matchAll()`](../../globals/String/prototype/matchAll.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.matchAll`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Symbol/prototype/@@toPrimitive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype[Symbol.toPrimitive]\n\nThe **`[Symbol.toPrimitive]()`** method converts a Symbol object to\na primitive value.\n\n## Syntax\n\n```js\nSymbol()[Symbol.toPrimitive](hint)\n```\n\n### Return value\n\nThe primitive value of the specified `Symbol` object.\n\n## Description\n\nThe `[Symbol.toPrimitive]()` method of `Symbol` returns the primitive\nvalue of a Symbol object as a Symbol data type. The `hint`\nargument is not used.\n\nJavaScript calls the `[Symbol.toPrimitive]()` method to convert an object to a\nprimitive value. You rarely need to invoke the `[Symbol.toPrimitive]()` method\nyourself; JavaScript automatically invokes it when encountering an object where a\nprimitive value is expected.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Symbol/prototype/description.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype.description\n\nThe read-only **`description`** property is a string returning the optional description of `Symbol` objects.\n\n## Description\n\n`Symbol` objects can be created with an optional description which can be used for debugging but not to access the symbol itself. The `Symbol.prototype.description` property can be used to read that description. It is different to `Symbol.prototype.toString()` as it does not contain the enclosing `\"Symbol()\"` string. See the examples.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Symbol/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified symbol value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified symbol value.\n\n## Description\n\nThe `Symbol` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For `Symbol` values, the `toString` method returns a descriptive string in the form `\"Symbol(description)\"`, where `description` is the symbol's [`Symbol.prototype.description`](../../../globals/Symbol/prototype/description.mdx).\n\nThe `toString()` method requires its `this` value to be a `Symbol` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to symbol values.\n\nBecause `Symbol` has a [`[Symbol.toPrimitive]()`](../../../globals/Symbol/toPrimitive.mdx) method, that method always takes priority over `toString()` when a `Symbol` object is [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). However, because `Symbol.prototype[Symbol.toPrimitive]()` returns a symbol primitive, and symbol primitives throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when implicitly converted to a string, the `toString()` method is never implicitly called by the language. To stringify a symbol, you must explicitly call its `toString()` method or use the [`String()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/String#using_string_to_stringify_a_symbol) function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Symbol/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a Symbol object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nThe primitive value of the specified `Symbol` object.\n\n## Description\n\nThe `valueOf()` method of `Symbol` returns the primitive value of a Symbol object as a Symbol data type.\n\nJavaScript calls the `valueOf()` method to convert an object to a primitive value. You rarely need to invoke the `valueOf()` method yourself; JavaScript automatically invokes it when encountering an object where a primitive value is expected.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Symbol/replace.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.replace\n\nThe **`Symbol.replace`** well-known symbol specifies the method that replaces matched substrings of a string. This function is called by the [`String.prototype.replace()`](../../globals/String/prototype/replace.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.replace]()` and [`String.prototype.replace()`](../../globals/String/prototype/replace.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.replace`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Symbol/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.search\n\nThe **`Symbol.search`** well-known symbol specifies the method that returns the index within a string that matches the regular expression. This function is called by the [`String.prototype.search()`](../../globals/String/prototype/search.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.search]()` and [`String.prototype.search()`](../../globals/String/prototype/search.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.search`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Symbol/species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.species\n\nThe well-known symbol **`Symbol.species`** specifies a function-valued property that the constructor function uses to create derived objects.\n\n> **Warning:** The existence of `Symbol.species` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Value\n\nThe well-known symbol `Symbol.species`.\n\n## Description\n\nThe `Symbol.species` accessor property allows subclasses to override the default constructor for objects. This specifies a protocol about how instances should be copied. For example, when you use copying methods of arrays, such as [`Array.prototype.map()`](../../globals/Array/prototype/map.mdx). the `map()` method uses `instance.constructor[Symbol.species]` to get the constructor for constructing the new array.\n\nAll built-in implementations of `Symbol.species` return the `this` value, which is the current instance's constructor. This allows copying methods to create instances of derived classes rather than the base class — for example, `map()` will return an array of the same type as the original array.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Symbol/split.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.split\n\nThe **`Symbol.split`** well-known symbol specifies the method that splits a string at the indices that match a regular expression. This function is called by the [`String.prototype.split()`](../../globals/String/prototype/split.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.split]()` and [`String.prototype.split()`](../../globals/String/prototype/split.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.split`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Symbol/toPrimitive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.toPrimitive\n\nThe **`Symbol.toPrimitive`** well-known symbol specifies a method that accepts a preferred type and returns a primitive representation of an object. It is called in priority by all [type coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) algorithms.\n\n## Value\n\nThe well-known symbol `Symbol.toPrimitive`.\n\n## Description\n\nWith the help of the `Symbol.toPrimitive` property (used as a function value), an object can be converted to a primitive value. The function is called with a string argument `hint`, which specifies the preferred type of the result primitive value. The `hint` argument can be one of `\"number\"`, `\"string\"`, and `\"default\"`.\n\nThe `\"number\"` hint is used by [numeric coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#numeric_coercion) algorithms. The `\"string\"` hint is used by the [string coercion](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) algorithm. The `\"default\"` hint is used by the [primitive coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion) algorithm. The `hint` only acts as a weak signal of preference, and the implementation is free to ignore it (as [`Symbol.prototype[Symbol.toPrimitive]()`](../../globals/Symbol/prototype/@@toPrimitive.mdx) does). The language does not enforce alignment between the `hint` and the result type, although `[Symbol.toPrimitive]()` must return a primitive, or a [`TypeError`](../../globals/TypeError/TypeError.mdx) is thrown.\n\nObjects without the `Symbol.toPrimitive` property are converted to primitives by calling the `valueOf()` and `toString()` methods in different orders, which is explained in more detail in the [type coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) section. `Symbol.toPrimitive` allows full control over the primitive conversion process. For example, `Symbol.prototype.toString()` won't be called, and `Symbol` objects must always be explicitly converted to strings through [`String()`](../../globals/String/String.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Symbol/toStringTag.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.toStringTag\n\nThe **`Symbol.toStringTag`** well-known symbol is a string valued property that is used in the creation of the default string description of an object. It is accessed internally by the [`Object.prototype.toString()`](../../globals/Object/prototype/toString.mdx) method.\n\n## Value\n\nThe well-known symbol `Symbol.toStringTag`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Symbol/unscopables.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.unscopables\n\nThe **`Symbol.unscopables`** well-known symbol is used to specify an object value of whose own and inherited property names are excluded from the [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) environment bindings of the associated object.\n\n## Value\n\nThe well-known symbol `@@unscopables`.\n\n## Description\n\nThe `@@unscopables` symbol (accessed via `Symbol.unscopables`) can be defined on any object to exclude property names from being exposed as lexical variables in [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) environment bindings. Note that when using [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), `with` statements are not available, and this symbol is likely not needed.\n\nSetting a property of the `@@unscopables` object to `true` (or any [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value) will make the corresponding property of the `with` scope object _unscopable_ and therefore won't be introduced to the `with` body scope. Setting a property to `false` (or any [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value) will make it _scopable_ and thus appear as lexical scope variables.\n\nWhen deciding whether `x` is unscopable, the entire prototype chain of the `@@unscopables` property is looked up for a property called `x`. This means if you declared `@@unscopables` as a plain object, `Object.prototype` properties like [`toString`](../../globals/Object/prototype/toString.mdx) would become unscopable as well, which may cause backward incompatibility for legacy code assuming those properties are normally scoped (see [an example here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/unscopables#avoid_using_a_non-null-prototype_object_as_symbol.unscopables)). You are advised to make your custom `@@unscopables` property have `null` as its prototype, like [`Array.prototype[Symbol.unscopables]`](../../globals/Array/prototype/@@unscopables.mdx) does.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/SyntaxError/SyntaxError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SyntaxError\n\nThe **`SyntaxError`** constructor creates a new error object\nthat represents an error when trying to interpret syntactically invalid code.\n\n## Syntax\n\n```js\nnew SyntaxError()\nnew SyntaxError(message)\nnew SyntaxError(message, options)\nnew SyntaxError(message, fileName)\nnew SyntaxError(message, fileName, lineNumber)\n\nSyntaxError()\nSyntaxError(message)\nSyntaxError(message, options)\nSyntaxError(message, fileName)\nSyntaxError(message, fileName, lineNumber)\n```\n\n> **Note:** `SyntaxError()` can be called with or without `new`. Both create a new `SyntaxError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error."
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/TextDecoder/TextDecoder.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder()\n\nThe **`TextDecoder()`** constructor returns a newly created `TextDecoder` object for the encoding specified in parameter.\n\n## Syntax\n\n```js\nnew TextDecoder()\nnew TextDecoder(label)\nnew TextDecoder(label, options)\n```\n\n### Parameters\n\n- `label` _**optional**_\n  - : A string, defaulting to `\"utf-8\"`.\n- `options` _**optional**_\n\n  - : An object with the property:\n\n    - `fatal`\n      - : A boolean value indicating if the `TextDecoder.decode()` method must throw a `TypeError` when decoding invalid data.\n        It defaults to `false`, which means that the decoder will substitute malformed data with a replacement character.\n\n    - `ignoreBOM`\n      - : A boolean value indicating whether the [byte order mark](https://www.w3.org/International/questions/qa-byte-order-mark) is ignored.\n        It defaults to `false`.\n\n### Exceptions\n\n- `RangeError`\n  - : Thrown if the value of `label` is unknown, or is one of the values leading to a `'replacement'` decoding algorithm (`\"iso-2022-cn\"` or `\"iso-2022-cn-ext\"`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/TextDecoder/prototype/decode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.decode()\n\nThe **`TextDecoder.decode()`** method returns a string containing text decoded from the buffer passed as a parameter.\n\nThe decoding method is defined in the current `TextDecoder` object.\nThis includes the expected encoding of the data, and how decoding errors are handled.\n\n## Syntax\n\n```js\ndecode()\ndecode(buffer)\ndecode(buffer, options)\n```\n\n### Parameters\n\n- `buffer` _**optional**_\n  - : Is an `ArrayBuffer`, a `TypedArray` or a `DataView` object containing the encoded text to decode.\n- `options` _**optional**_\n\n  - : An object with the property:\n\n    - `stream`\n      - : A boolean flag indicating that additional data will follow in subsequent calls to `decode()`.\n        Set to `true` if processing the data in chunks, and `false` for the final chunk or if the data is not chunked.\n        It defaults to `false`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if there is a decoding error when the property `TextDecoder.fatal` is `true`.\n\n### Return value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/TextDecoder/prototype/encoding.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.encoding\n\nThe **`TextDecoder.encoding`** read-only property returns a string containing the name of the decoding algorithm used by the specific decoder object.\n\nThe encoding is set by the constructor `label` parameter, and defaults to `utf-8`.\n\n## Value\n\nA lower-cased ASCII string, which can be one of the following values:\n\n- The recommended encoding for the Web: `'utf-8'`.\n- The legacy single-byte encodings:\n  ['ibm866'](https://en.wikipedia.org/wiki/Code_page_866),\n  ['iso-8859-2'](https://en.wikipedia.org/wiki/ISO/IEC_8859-2),\n  ['iso-8859-3'](https://en.wikipedia.org/wiki/ISO/IEC_8859-3),\n  ['iso-8859-4'](https://en.wikipedia.org/wiki/ISO/IEC_8859-4),\n  ['iso-8859-5'](https://en.wikipedia.org/wiki/ISO/IEC_8859-5),\n  ['iso-8859-6'](https://en.wikipedia.org/wiki/ISO/IEC_8859-6),\n  ['iso-8859-7'](https://en.wikipedia.org/wiki/ISO/IEC_8859-7),\n  ['iso-8859-8'](https://en.wikipedia.org/wiki/ISO/IEC_8859-8)'`,\n  ['iso-8859-8i'](https://en.wikipedia.org/wiki/ISO-8859-8-I),\n  ['iso-8859-10'](https://en.wikipedia.org/wiki/ISO/IEC_8859-10),\n  ['iso-8859-13'](https://en.wikipedia.org/wiki/ISO/IEC_8859-13),\n  ['iso-8859-14'](https://en.wikipedia.org/wiki/ISO/IEC_8859-14),\n  ['iso-8859-15'](https://en.wikipedia.org/wiki/ISO/IEC_8859-15),\n  ['iso-8859-16'](https://en.wikipedia.org/wiki/ISO/IEC_8859-16),\n  ['koi8-r'](https://en.wikipedia.org/wiki/KOI8-R),\n  ['koi8-u'](https://en.wikipedia.org/wiki/KOI8-U),\n  ['macintosh'](https://en.wikipedia.org/wiki/Mac_OS_Roman),\n  ['windows-874'](https://en.wikipedia.org/wiki/Windows-874),\n  ['windows-1250'](https://en.wikipedia.org/wiki/Windows-1250),\n  ['windows-1251'](https://en.wikipedia.org/wiki/Windows-1251),\n  ['windows-1252'](https://en.wikipedia.org/wiki/Windows-1252),\n  ['windows-1253'](https://en.wikipedia.org/wiki/Windows-1253),\n  ['windows-1254'](https://en.wikipedia.org/wiki/Windows-1254),\n  ['windows-1255'](https://en.wikipedia.org/wiki/Windows-1255),\n  ['windows-1256'](https://en.wikipedia.org/wiki/Windows-1256),\n  ['windows-1257'](https://en.wikipedia.org/wiki/Windows-1257),\n  ['windows-1258'](https://en.wikipedia.org/wiki/Windows-1258), or\n  ['x-mac-cyrillic'](https://en.wikipedia.org/wiki/Macintosh_Cyrillic_encoding).\n- The legacy multi-byte Chinese (simplified) encodings:\n  ['gbk'](https://en.wikipedia.org/wiki/GBK),\n  ['gb18030'](https://en.wikipedia.org/wiki/GB_18030)\n- The legacy multi-byte Chinese (traditional) encoding:\n  ['big5'](https://en.wikipedia.org/wiki/Big5).\n- The legacy multi-byte Japanese encodings:\n  ['euc-jp'](https://en.wikipedia.org/wiki/Extended_Unix_Code#EUC-JP),\n  ['iso-2022-jp'](https://en.wikipedia.org/wiki/ISO/IEC_2022#ISO-2022-JP),\n  ['shift-jis'](https://en.wikipedia.org/wiki/Shift_JIS).\n- The legacy multi-byte Korean encodings:\n  ['euc-kr'](https://en.wikipedia.org/wiki/Extended_Unix_Code#EUC-KR)\n- The legacy miscellaneous encodings:\n  ['utf-16be'](https://en.wikipedia.org/wiki/UTF-16#Byte_order_encoding_schemes),\n  ['utf-16le'](https://en.wikipedia.org/wiki/UTF-16#Byte_order_encoding_schemes),\n  `'x-user-defined'`.\n- A special encoding, `'replacement'`.\n  This decodes empty input into empty output and any other arbitrary-length input into a single replacement character.\n  It is used to prevent attacks that mismatch encodings between the client and server.\n  The following encodings also map to the replacement encoding: `ISO-2022-CN`, `ISO-2022-CN-ext`, ['iso-2022-kr'](https://en.wikipedia.org/wiki/ISO/IEC_2022#ISO-2022-KR) and ['hz-gb-2312'](<https://en.wikipedia.org/wiki/HZ_(character_encoding)>).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/TextDecoder/prototype/fatal.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.fatal\n\nThe **`fatal`** read-only property of the `TextDecoder` interface is a `Boolean` indicating whether the error mode is fatal.\n\nIf the property is `true` then a decoder will throw a `TypeError` if it encounters malformed data while decoding.\nIf `false` the decoder will substitute the invalid data with the replacement character `U+FFFD` (�).\nThe value of the property is set in the `TextDecoder()` constructor.\n\n## Value\n\nA `boolean` which will return `true` if the error mode is set to `fatal`.\nOtherwise it returns `false`, indicating that the error mode is \"replacement\".\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/TextDecoder/prototype/ignoreBOM.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.ignoreBOM\n\nThe **`ignoreBOM`** read-only property of the `TextDecoder` interface is a `Boolean` indicating whether the [byte order mark](https://www.w3.org/International/questions/qa-byte-order-mark) is ignored.\n\n## Value\n\n`true` if the byte order mark is ignored; `false` otherwise.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/TextEncoder/TextEncoder.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextEncoder()\n\nThe **`TextEncoder()`** constructor returns a newly created `TextEncoder` object that will generate a byte stream with UTF-8 encoding.\n\n## Syntax\n\n```js\nnew TextEncoder()\n```\n\n### Parameters\n\nNone.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/TextEncoder/prototype/encode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextEncoder.encode()\n\nThe **`TextEncoder.encode()`** method takes a string as input, and returns a `Uint8Array` containing the text given in parameters encoded with the specific method for that `TextEncoder` object.\n\n## Syntax\n\n```js\nencode(string)\n```\n\n### Parameters\n\n- `string`\n  - : A string containing the text to encode.\n\n### Return value\n\nA `Uint8Array` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/TextEncoder/prototype/encoding.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextEncoder.encoding\n\nThe **`TextEncoder.encoding`** read-only property returns a string containing the name of the encoding algorithm used by the specific encoder.\n\nIt can only have the following value `utf-8`.\n\n## Value\n\nA string with the value `utf-8`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/TransformStream/TransformStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStream()\n\nThe **`TransformStream()`** constructor creates a new `TransformStream` object which represents a pair of streams: a `WritableStream` representing the writable side, and a `ReadableStream` representing the readable side.\n\n## Syntax\n\n```js\nnew TransformStream()\nnew TransformStream(transformer)\nnew TransformStream(transformer, writableStrategy)\nnew TransformStream(transformer, writableStrategy, readableStrategy)\n```\n\n### Parameters\n\n- `transformer` _**optional**_\n\n  - : An object representing the `transformer`. If not supplied the resulting stream will be an **identity transform stream** which forwards all chunks written to its writable side to its readable side, without any changes.\n\n    The transformer object can contain any of the following methods. In each method `controller` is an instance of `TransformStreamDefaultController`.\n\n    - `start(controller)`\n      - : Called when the `TransformStream` is constructed. It is typically used to enqueue chunks using `TransformStreamDefaultController.enqueue()`.\n    - `transform(chunk, controller)`\n      - : Called when a chunk written to the writable side is ready to be transformed, and performs the work of the transformation stream. If no `transform()` method is supplied, the identity transform is used, and the chunk will be enqueued with no changes.\n    - `flush(controller)`\n      - : Called after all chunks written to the writable side have been successfully transformed, and the writable side is about to be closed.\n\n- `writableStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer. This defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk`. This indicates the size to\n        use for each chunk, in bytes.\n\n- `readableStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer. This defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk`. This indicates the size to\n        use for each chunk, in bytes.\n\n> **Note:** You could define your own custom\n> `readableStrategy` or `writableStrategy`, or use an instance of\n> `ByteLengthQueuingStrategy` or `CountQueuingStrategy`\n> for the object values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/TransformStream/prototype/readable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStream.readable\n\nThe **`readable`** read-only property of the `TransformStream` interface returns the `ReadableStream` instance controlled by this `TransformStream`.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/TransformStream/prototype/writable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStream.writable\n\nThe **`writable`** read-only property of the `TransformStream` interface returns the `WritableStream` instance controlled by this `TransformStream`.\n\n## Value\n\nA `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/TransformStreamDefaultController/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.desiredSize\n\nThe **`desiredSize`** read-only property of the `TransformStreamDefaultController` interface returns the desired size to fill the queue of the associated [`ReadableStream`](../../../globals/ReadableStream/ReadableStream.mdx).\n\nThe internal queue of a `ReadableStream` contains chunks that have been enqueued, but not yet read.\n\nIf the `desiredSize` is `0` then the queue is full. Therefore you can use this information to manually apply backpressure to manage the queue.\n\n## Value\n\nThe desired size.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/TransformStreamDefaultController/prototype/enqueue.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.enqueue()\n\nThe **`enqueue()`** method of the `TransformStreamDefaultController` interface enqueues the given chunk in the readable side of the stream.\n\n## Syntax\n\n```js\nenqueue(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : The chunk being queued. A chunk is a single piece of data. It can be any type of data, and a stream can contain chunks of different types.\n\n### Return value\n\nNone `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream is not readable.\n    This might occur if the stream is errored via `controller.error()`, or when it is closed without its controller's `controller.close()` method ever being called.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/TransformStreamDefaultController/prototype/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.error()\n\nThe **`error()`** method of the `TransformStreamDefaultController` interface errors both sides of the stream. Any further interactions with it will fail with the given error message, and any chunks in the queue will be discarded.\n\n## Syntax\n\n```js\nerror(reason)\n```\n\n### Parameters\n\n- `reason`\n  - : A string containing the error message to be returned on any further interaction with the stream.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/TransformStreamDefaultController/prototype/terminate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.terminate()\n\nThe **`terminate()`** method of the `TransformStreamDefaultController` interface closes the readable side and errors the writable side of the stream.\n\n## Syntax\n\n```js\nterminate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone (`undefined`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/TypeError/TypeError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TypeError\n\nThe **`TypeError()`** constructor creates a new error when an\noperation could not be performed, typically (but not exclusively) when a value is not of\nthe expected type.\n\n## Syntax\n\n```js\nnew TypeError()\nnew TypeError(message)\nnew TypeError(message, options)\nnew TypeError(message, fileName)\nnew TypeError(message, fileName, lineNumber)\n\nTypeError()\nTypeError(message)\nTypeError(message, options)\nTypeError(message, fileName)\nTypeError(message, fileName, lineNumber)\n```\n\n> **Note:** `TypeError()` can be called with or without `new`. Both create a new `TypeError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/URIError/URIError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URIError\n\nThe **`URIError()`** constructor creates an error when a global\nURI handling function was used in a wrong way.\n\n## Syntax\n\n```js\nnew URIError()\nnew URIError(message)\nnew URIError(message, options)\nnew URIError(message, fileName)\nnew URIError(message, fileName, lineNumber)\n\nURIError()\nURIError(message)\nURIError(message, options)\nURIError(message, fileName)\nURIError(message, fileName, lineNumber)\n```\n\n> **Note:** `URIError()` can be called with or without `new`. Both create a new `URIError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/URL/URL.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL()\n\nThe **`URL()`** constructor returns a newly created\n`URL` object representing the URL defined by the parameters.\n\nIf the given base URL or the resulting URL are not valid URLs, the JavaScript\n`TypeError` exception is thrown.\n\n## Syntax\n\n```js\nnew URL(url)\nnew URL(url, base)\n```\n\n### Parameters\n\n- `url`\n  - : A string or any other object with a `toString()` method.\n    If `url` is a relative URL, `base` is\n    required, and will be used as the base URL. If `url` is an\n    absolute URL, a given `base` will be ignored.\n- `base` _**optional**_\n  - : A string representing the base URL to use in cases where\n    `url` is a relative URL. If not specified, it defaults to\n    `undefined`.\n\n> **Note:** The `url` and `base` arguments will\n> each be stringified from whatever value you pass, just like with other Web APIs\n> that accept a string. In particular, you can use an existing\n> `URL` object for either argument, and it will stringify to the\n> object's `URL.href\", \"href` property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/URL/prototype/hash.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.hash\n\nThe **`hash`** property of the\n`URL` interface is a string containing a\n`'#'` followed by the fragment identifier of the URL.\n\nThe fragment is not percent-decoded. If the URL does not\nhave a fragment identifier, this property contains an empty string — `\"\"`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/URL/prototype/host.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.host\n\nThe **`host`** property of the `URL` interface is\na string containing the host, that is the `URL.hostname`, and then, if the `port` of the URL is nonempty, a\n`':'`, followed by the `port` of the URL.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/URL/prototype/hostname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.hostname\n\nThe **`hostname`** property of the `URL` interface\nis a string containing the domain name of the URL.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/URL/prototype/href.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.href\n\nThe **`href`** property of the `URL` interface is\na string containing the whole URL.\n\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/URL/prototype/origin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.origin\n\nThe **`origin`** read-only property of\nthe `URL` interface returns a string containing the\nUnicode serialization of the origin of the represented URL.\n\nThe exact structure\nvaries depending on the type of URL:\n\n- For `http` or `https` URLs, the scheme followed by\n  `'://'`, followed by the domain, followed by `':'`, followed by\n  the port (the default port, `80` and `443` respectively, if\n  explicitly specified).\n- For `file:` URLs, the value is browser dependent.\n- for `blob:` URLs, the origin of the URL following `blob:` will\n  be used. For example, `\"blob:https://mozilla.org\"` will be returned as\n  `\"https://mozilla.org\".`\n\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/URL/prototype/password.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.password\n\nThe **`password`** property of the `URL` interface\nis a string containing the password specified before the domain name.\n\nIf it is set without first setting the `URL.username` property, it silently fails.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/URL/prototype/pathname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.pathname\n\nThe **`pathname`** property of the `URL` interface represents a location in a hierarchical structure. It is a string constructed from a list of path segments, each of which is prefixed by a `/` character. If the URL has no path segments, the value of its `pathname` property will be the empty string.\n\nURLs such as `https` and `http` URLs that have [hierarchical schemes](https://www.rfc-editor.org/rfc/rfc3986#section-1.2.3) (which the URL standard calls \"[special schemes](https://url.spec.whatwg.org/#special-scheme)\") always have at least one (invisible) path segment: the empty string. Thus the `pathname` value for such \"special scheme\" URLs can never be the empty string, but will instead always have a least one `/` character.\n\nFor example, the URL `https://developer.mozilla.org` has just one path segment: the empty string, so its `pathname` value is constructed by prefixing a `/` character to the empty string.\n\nSome systems define the term _slug_ to mean the final segment of a non-empty path if it identifies a page in human-readable keywords. For example, the URL `https://example.org/articles/this-that-other-outre-collection` has `this-that-other-outre-collection` as its slug.\n\nSome systems use the `;` and `=` characters to delimit parameters and parameter values applicable to a path segment. For example, with the URL `https://example.org/users;id=42/tasks;state=open?sort=modified`, a system might extract and use the path segment parameters `id=42` and `state=open` from the path segments `users;id=42` and `tasks;state=open`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/URL/prototype/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.port\n\nThe **`port`** property of the `URL` interface is\na string containing the port number of the URL.\n\n> **Note:** If an input string passed to the `URL()` constructor doesn't contain an explicit port number (e.g., `https://localhost`) or contains a port number that's the default port number corresponding to the protocol part of the input string (e.g., `https://localhost:443`), then in the `URL` object the constructor returns, the value of the port property will be the empty string: `''`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/URL/prototype/protocol.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.protocol\n\nThe **`protocol`** property of the `URL` interface\nis a string representing the protocol scheme of the URL, including the\nfinal `':'`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/URL/prototype/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.search\n\nThe **`search`** property of the `URL` interface\nis a search string, also called a _query string_, that is a\nstring containing a `'?'` followed by the parameters of the\nURL.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/URL/prototype/searchParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.searchParams\n\nThe **`searchParams`** readonly property of the\n`URL` interface returns a `URLSearchParams` object allowing\naccess to the `GET` decoded query arguments contained in the URL.\n\n## Value\n\nA `URLSearchParams` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/URL/prototype/toJSON.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.toJSON()\n\nThe **`toJSON()`** method of the `URL` interface\nreturns a string containing a serialized version of the URL,\nalthough in practice it seems to have the same effect as\n`URL.toString()`.\n\n## Syntax\n\n```js\ntoJSON()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/URL/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.toString()\n\nThe **`URL.toString()`** method returns a\nstring containing the whole URL. It is effectively a read-only version\nof `URL.prototype.href`.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/URL/prototype/username.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.username\n\nThe **`username`** property of the `URL` interface\nis a string containing the username specified before the domain name.\n\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/URLSearchParams/URLSearchParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams()\n\nThe **`URLSearchParams()`** constructor creates and returns a\nnew `URLSearchParams` object.\n\n\n\n## Syntax\n\n```js\nnew URLSearchParams()\nnew URLSearchParams(options)\n```\n\n### Parameters\n\n- `options` _**optional**_\n  - : One of:\n    - A string, which will be parsed from `application/x-www-form-urlencoded` format. A leading `'?'` character is ignored.\n    - A literal sequence of name-value string pairs, or any object with an iterator that produces a sequence of string pairs.\n    - A record of string keys and string values. Note that nesting is not supported.\n\n### Return value\n\nA `URLSearchParams` object instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/URLSearchParams/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.append()\n\nThe **`append()`** method of the `URLSearchParams`\ninterface appends a specified key/value pair as a new search parameter.\n\nAs shown in the example below, if the same key is appended multiple times it will\nappear in the parameter string multiple times for each value.\n\n## Syntax\n\n```js\nappend(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to append.\n- `value`\n  - : The value of the parameter to append.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/URLSearchParams/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.delete()\n\nThe **`delete()`** method of the `URLSearchParams`\ninterface deletes the given search parameter and all its associated values, from the\nlist of all search parameters.\n\n## Syntax\n\n```js\ndelete(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to be deleted.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/URLSearchParams/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.entries()\n\nThe **`entries()`** method of the\n`URLSearchParams` interface returns an\niterator allowing iteration through all key/value\npairs contained in this object. The iterator returns key/value pairs in the same order as they appear in the query string. The key and value of each pair are\nstring objects.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/URLSearchParams/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.forEach()\n\nThe **`forEach()`** method of the\n`URLSearchParams` interface allows iteration through all values contained\nin this object via a callback function.\n\n## Syntax\n\n```js\nforEach(callback)\nforEach(callback, thisArg)\n```\n\n### Parameters\n\n- `callback`\n\n  - : Function to execute on each element, which is passed the following arguments:\n\n    - `value`\n      - : The value of the current entry being processed in the `URLSearchParams` object.\n    - `key`\n      - : The key of the current entry being processed in the `URLSearchParams` object.\n    - `searchParams`\n      - : The `URLSearchParams` object the `forEach()` was called upon.\n\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `callback`.\n\n### Return value\n\nNone `undefined`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/URLSearchParams/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.get()\n\nThe **`get()`** method of the `URLSearchParams`\ninterface returns the first value associated to the given search parameter.\n\n## Syntax\n\n```js\nget(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to return.\n\n### Return value\n\nA string if the given search parameter is found; otherwise,\n**`null`**.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/URLSearchParams/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.has()\n\nThe **`has()`** method of the `URLSearchParams`\ninterface returns a boolean value that indicates whether a parameter with the\nspecified name exists.\n\n## Syntax\n\n```js\nhas(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to find.\n\n### Return value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/URLSearchParams/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.keys()\n\nThe **`keys()`** method of the `URLSearchParams`\ninterface returns an iterator allowing iteration\nthrough all keys contained in this object. The keys are string\nobjects.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/URLSearchParams/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.set()\n\nThe **`set()`** method of the `URLSearchParams`\ninterface sets the value associated with a given search parameter to the given value.\nIf there were several matching values, this method deletes the others. If the search\nparameter doesn't exist, this method creates it.\n\n## Syntax\n\n```js\nset(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to set.\n- `value`\n  - : The value of the parameter to set.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/URLSearchParams/prototype/sort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.sort()\n\nThe **`URLSearchParams.sort()`** method sorts all key/value\npairs contained in this object in place and returns `undefined`. The sort\norder is according to unicode code points of the keys. This method uses a stable sorting\nalgorithm (i.e. the relative order between key/value pairs with equal keys will be\npreserved).\n\n## Syntax\n\n```js\nsort()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/URLSearchParams/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.toString()\n\nThe **`toString()`** method of the\n`URLSearchParams` interface returns a query string suitable for use in a\nURL.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string, without the question mark. (Returns an empty string if no\nsearch parameters have been set.)\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/URLSearchParams/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.values()\n\nThe **`values()`** method of the `URLSearchParams`\ninterface returns an iterator allowing iteration\nthrough all values contained in this object. The values are string\nobjects.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Uint16Array/Uint16Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint16Array\n\nThe **`Uint16Array()`** typed array constructor creates an\narray of 16-bit unsigned integers in the platform byte order.\n\n## Syntax\n\n```js\nnew Uint16Array()\nnew Uint16Array(length)\nnew Uint16Array(typedArray)\nnew Uint16Array(object)\n\nnew Uint16Array(buffer)\nnew Uint16Array(buffer, byteOffset)\nnew Uint16Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint16Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Uint32Array/Uint32Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint32Array\n\nThe **`Uint32Array()`** typed array constructor creates an\narray of 32-bit unsigned integers in the platform byte order. If control over byte order\nis needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are initialized to\n`0`. Once established, you can reference elements in the array using the\nobject's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Uint32Array()\nnew Uint32Array(length)\nnew Uint32Array(typedArray)\nnew Uint32Array(object)\n\nnew Uint32Array(buffer)\nnew Uint32Array(buffer, byteOffset)\nnew Uint32Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint32Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Uint8Array/Uint8Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint8Array\n\nThe **`Uint8Array()`** constructor creates a typed array of\n8-bit unsigned integers. The contents are initialized to `0`. Once\nestablished, you can reference elements in the array using the object's methods, or\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew Uint8Array()\nnew Uint8Array(length)\nnew Uint8Array(typedArray)\nnew Uint8Array(object)\n\nnew Uint8Array(buffer)\nnew Uint8Array(buffer, byteOffset)\nnew Uint8Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint8Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/Uint8ClampedArray/Uint8ClampedArray.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint8ClampedArray\n\nThe **`Uint8ClampedArray()`** constructor creates a typed array\nof 8-bit unsigned integers clamped to 0-255; if you specified a value that is out of the\nrange of \\[0,255], 0 or 255 will be set instead; if you specify a non-integer, the\nnearest integer will be set. The contents are initialized to `0`. Once\nestablished, you can reference elements in the array using the object's methods, or\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew Uint8ClampedArray()\nnew Uint8ClampedArray(length)\nnew Uint8ClampedArray(typedArray)\nnew Uint8ClampedArray(object)\n\nnew Uint8ClampedArray(buffer)\nnew Uint8ClampedArray(buffer, byteOffset)\nnew Uint8ClampedArray(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint8ClampedArray()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/WeakMap/WeakMap.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap\n\nThe **`WeakMap()` constructor** creates a `WeakMap` object, optionally based on a provided `Array` or other iterable object.\n\n## Syntax\n\n```js\nnew WeakMap()\nnew WeakMap(iterable)\n```\n\n> **Note:** `WeakMap()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable`\n  - : An `Array` or other object that implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol)  that returns an iterator object that produces a two-element array-like object whose first element is a value that will be used as a `WeakMap` key and whose second element is the value to associate with that key. Each key-value pair will be added to the new `WeakMap`. null is treated as undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/WeakMap/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.delete()\n\nThe **`delete()`** method removes the specified element from a\n`WeakMap` object.\n\n## Syntax\n\n```js\ndelete(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to remove from the `WeakMap` object.\n\n### Return value\n\n`true` if an element in the `WeakMap` object has been removed\nsuccessfully. `false` if the key is not found in the `WeakMap` or\nif the key is not an object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/WeakMap/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.get()\n\nThe **`get()`** method returns a specified element from a\n`WeakMap` object.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key`\n  - : Required. The key of the element to return from the `WeakMap` object.\n\n### Return value\n\nThe element associated with the specified key in the `WeakMap` object. If\nthe key can't be found, [`undefined`](../../../globals/undefined.mdx) is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/WeakMap/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.has()\n\nThe **`has()`** method returns a boolean indicating whether an\nelement with the specified key exists in the `WeakMap` object or not.\n\n## Syntax\n\n```js\nhas(key)\n```\n\n### Parameters\n\n- `key`\n  - : Required. The key of the element to test for presence in the `WeakMap`\n    object.\n\n### Return value\n\n- Boolean\n  - : Returns `true` if an element with the specified key exists in the\n    `WeakMap` object; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/WeakMap/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.set\n\nThe **`set()`** method adds a new element with a specified key\nand value to a `WeakMap` object.\n\n## Syntax\n\n```js\nset(key, value)\n```\n\n### Parameters\n\n- `key`\n  - : Required. Must be `object`. The key of the element to add to the\n    `WeakMap` object.\n- `value`\n  - : Required. Any value. The value of the element to add to the `WeakMap`\n    object.\n\n### Return value\n\nThe `WeakMap` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/WeakRef/WeakRef.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakRef\n\nThe **`WeakRef`** constructor creates a `WeakRef`\nobject referring to a given target object.\n\n## Syntax\n\n```js\nnew WeakRef(targetObject)\n```\n\n> **Note:** `WeakRef()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `targetObject`\n  - : The target object the WeakRef should refer to (also called the _referent_).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/WeakRef/prototype/deref.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakRef.prototype.deref()\n\nThe `deref` method returns the `WeakRef` instance's target\nobject, or `undefined` if the target object has been garbage-collected.\n\n## Syntax\n\n```js\nderef()\n```\n\n### Return value\n\nThe target object of the WeakRef, or `undefined` if the object has been\ngarbage-collected.\n\n## Description\n\nSee the [Notes on WeakRefs](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WeakRef#notes_on_weakrefs) section of the `WeakRef` page for some important notes.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/WeakSet/WeakSet.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet\n\nThe **`WeakSet`** constructor lets you create\n`WeakSet` objects that store weakly held _objects_ in a collection.\n\n## Syntax\n\n```js\nnew WeakSet()\nnew WeakSet(iterable)\n```\n\n> **Note:** `WeakSet()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable` _**optional**_\n  - : If an [iterable object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) is passed, all of its elements will be added to the new\n    `WeakSet`. null is treated as undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/WeakSet/prototype/add.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet.prototype.add\n\nThe **`add()`** method appends a new object to the end of a\n`WeakSet` object.\n\n## Syntax\n\n```js\nadd(value)\n```\n\n### Parameters\n\n- value\n  - : Required. The object to add to the `WeakSet` collection.\n\n### Return value\n\nThe `WeakSet` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/WeakSet/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet.prototype.delete\n\nThe **`delete()`** method removes the specified element from a\n`WeakSet` object.\n\n## Syntax\n\n```js\ndelete(value)\n```\n\n### Parameters\n\n- `value`\n  - : Required. The object remove from the `WeakSet` object.\n\n### Return value\n\n`true` if an element in the `WeakSet` object has been removed\nsuccessfully. `false` if the `value` is not found in\nthe `WeakSet` or if the `value` is not an object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/WeakSet/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet.prototype.has\n\nThe **`has()`** method returns a boolean indicating whether an\nobject exists in a `WeakSet` or not.\n\n## Syntax\n\n```js\nhas(value)\n```\n\n### Parameters\n\n- `value`\n  - : Required. The object to test for presence in the `WeakSet`.\n\n### Return value\n\n- Boolean\n  - : Returns `true` if an element with the specified value exists in the\n    `WeakSet` object; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/WorkerLocation/WorkerLocation.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# WorkerLocation\n\nThe **`WorkerLocation`** interface defines the absolute location of the script executed by the Worker. Such an object is initialized for each worker and is available via the [`location`](../../globals/location.mdx) property obtained by calling `globalThis.location`.\n\n## Instance properties\n\n- [`WorkerLocation.href`](../../globals/WorkerLocation/href.mdx) _**read-only**_\n  - : Returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location.\n- [`WorkerLocation.protocol`](../../globals/WorkerLocation/protocol.mdx) _**read-only**_\n  - : Returns the [`protocol`](../../globals/URL/prototype/protocol.mdx) part of the worker's location.\n- [`WorkerLocation.host`](../../globals/WorkerLocation/host.mdx) _**read-only**_\n  - : Returns the [`host`](../../globals/URL/prototype/host.mdx) part of the worker's location.\n- [`WorkerLocation.hostname`](../../globals/WorkerLocation/hostname.mdx) _**read-only**_\n  - : Returns the [`hostname`](../../globals/URL/prototype/hostname.mdx) part of the worker's location.\n- [`WorkerLocation.origin`](../../globals/WorkerLocation/origin.mdx) _**read-only**_\n  - : Returns the worker's [`origin`](../../globals/URL/prototype/origin.mdx).\n- [`WorkerLocation.port`](../../globals/WorkerLocation/port.mdx) _**read-only**_\n  - : Returns the [`port`](../../globals/URL/prototype/port.mdx) part of the worker's location.\n- [`WorkerLocation.pathname`](../../globals/WorkerLocation/pathname.mdx) _**read-only**_\n  - : Returns the [`pathname`](../../globals/URL/prototype/pathname.mdx) part of the worker's location.\n- [`WorkerLocation.search`](../../globals/WorkerLocation/search.mdx) _**read-only**_\n  - : Returns the [`search`](../../globals/URL/prototype/search.mdx) part of the worker's location.\n- [`WorkerLocation.hash`](../../globals/WorkerLocation/hash.mdx) _**read-only**_\n  - : Returns the [`hash`](../../globals/URL/prototype/hash.mdx) part of the worker's location.\n\n## Instance methods\n\n- [`WorkerLocation.toString`](../../globals/WorkerLocation/toString.mdx)\n  - : Returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location. It is a synonym for [`WorkerLocation.href`](../../globals/WorkerLocation/href.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/WorkerLocation/hash.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.hash\n\nThe **`hash`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`hash`](../../globals/URL/prototype/hash.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/WorkerLocation/host.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.host\n\nThe **`host`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`host`](../../globals/URL/prototype/host.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/WorkerLocation/hostname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.hostname\n\nThe **`hostname`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`hostname`](../../globals/URL/prototype/hostname.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/WorkerLocation/href.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.href\n\nThe **`href`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/WorkerLocation/origin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.origin\n\nThe **`origin`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the worker's [`origin`](../../globals/URL/prototype/origin.mdx).\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/WorkerLocation/pathname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.pathname\n\nThe **`pathname`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`pathname`](../../globals/URL/prototype/pathname.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/WorkerLocation/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.port\n\nThe **`port`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`port`](../../globals/URL/prototype/port.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/WorkerLocation/protocol.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.protocol\n\nThe **`protocol`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`protocol`](../../globals/URL/prototype/protocol.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/WorkerLocation/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.search\n\nThe **`search`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`search`](../../globals/URL/prototype/search.mdx) part of the worker's location.\n\n## Value\n\nA string.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/WorkerLocation/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.toString()\n\nThe **`toString()`** method of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location. It is a synonym for [`WorkerLocation.href`](../../globals/WorkerLocation/href.mdx).\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone [`undefined`](../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/WritableStream/WritableStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream()\n\nThe **`WritableStream()`** constructor creates\na new `WritableStream` object instance.\n\n## Syntax\n\n```js\nnew WritableStream(underlyingSink)\nnew WritableStream(underlyingSink, queuingStrategy)\n```\n\n### Parameters\n\n- `underlyingSink` _**optional**_\n\n  - : An object containing methods and properties that define how the constructed stream\n    instance will behave. `underlyingSink` can contain the following:\n\n    - `start(controller)` _**optional**_\n      - : This is a method, called immediately when the object is constructed. The\n        contents of this method are defined by the developer, and should aim to get access\n        to the underlying sink. If this process is to be done asynchronously, it can\n        return a promise to signal success or failure. The `controller`\n        parameter passed to this method is a\n        `WritableStreamDefaultController`. This can be used by the developer\n        to control the stream during set up.\n    - `write(chunk, controller)` _**optional**_\n      - : This method, also defined by the developer, will be called when a new chunk of\n        data (specified in the `chunk` parameter) is ready to be written to the\n        underlying sink. It can return a promise to signal success or failure of the write\n        operation. The `controller` parameter passed to this method is a\n        `WritableStreamDefaultController` that can be used by the developer\n        to control the stream as more chunks are submitted for writing. This method will\n        be called only after previous writes have succeeded, and never after the stream is\n        closed or aborted (see below).\n    - `close(controller)` _**optional**_\n      - : This method, also defined by the developer, will be called if the app signals\n        that it has finished writing chunks to the stream. The contents should do whatever\n        is necessary to finalize writes to the underlying sink, and release access to it.\n        If this process is asynchronous, it can return a promise to signal success or\n        failure. This method will be called only after all queued-up writes have\n        succeeded. The `controller` parameter passed to this method is a\n        `WritableStreamDefaultController`, which can be used to control the\n        stream at the end of writing.\n    - `abort(reason)` _**optional**_\n      - : This method, also defined by the developer, will be called if the app signals\n        that it wishes to abruptly close the stream and put it in an errored state. It can\n        clean up any held resources, much like `close()`, but\n        `abort()` will be called even if writes are queued up — those chunks\n        will be thrown away. If this process is asynchronous, it can return a promise to\n        signal success or failure. The `reason` parameter contains a\n        string describing why the stream was aborted.\n\n- `queuingStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer — this defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk` — this indicates the size to use for each chunk, in bytes.\n\n    > **Note:** You could define your own custom\n    > `queuingStrategy`, or use an instance of\n    > `ByteLengthQueuingStrategy` or `CountQueuingStrategy`\n    > for this object value. If no `queuingStrategy` is supplied, the default\n    > used is the same as a `CountQueuingStrategy` with a high water mark of 1\\.\n\n### Return value\n\nAn instance of the `WritableStream` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/WritableStream/prototype/abort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream.abort()\n\nThe **`abort()`** method of the `WritableStream` interface aborts the stream, signaling that the producer can no longer successfully write to the stream and it is to be immediately moved to an error state, with any queued writes discarded.\n\n## Syntax\n\n```js\nabort(reason)\n```\n\n### Parameters\n\n- `reason`\n  - : A string providing a human-readable reason for the abort.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason` parameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to abort is not a `WritableStream`, or it is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/WritableStream/prototype/getWriter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream.getWriter()\n\nThe **`getWriter()`** method of the `WritableStream` interface returns a new instance of `WritableStreamDefaultWriter` and locks the stream to that instance.\nWhile the stream is locked, no other writer can be acquired until this one is released.\n\n## Syntax\n\n```js\ngetWriter()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `WritableStreamDefaultWriter` object instance.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to create a writer for is not a `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/WritableStream/prototype/locked.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream.locked\n\nThe **`locked`** read-only property of the `WritableStream` interface returns a boolean indicating whether the `WritableStream` is locked to a writer.\n\n## Value\n\nA boolean value indicating whether or not the writable stream is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/WritableStreamDefaultController/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultController.error()\n\nThe **`error()`** method of the\n`WritableStreamDefaultController` interface causes any future interactions\nwith the associated stream to error.\n\nThis method is rarely used, since usually it suffices to return a rejected promise from\none of the underlying sink's methods. However, it can be useful for suddenly shutting\ndown a stream in response to an event outside the normal lifecycle of interactions with\nthe underlying sink.\n\n## Syntax\n\n```js\nerror(message)\n```\n\n### Parameters\n\n- `message`\n  - : A string representing the error you want future interactions to\n    fail with.\n\n### Return value\n\nNone `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to error is not a `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/WritableStreamDefaultWriter/WritableStreamDefaultWriter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter()\n\nThe **`WritableStreamDefaultWriter()`**\nconstructor creates a new `WritableStreamDefaultWriter` object instance.\n\n## Syntax\n\n```js\nnew WritableStreamDefaultWriter(stream)\n```\n\n### Parameters\n\n- `stream`\n  - : The `WritableStream` to be written to.\n\n### Return value\n\nAn instance of the `WritableStreamDefaultWriter` object.\n\n### Exceptions\n\n- `TypeError`\n  - : The provided `stream` value is not a `WritableStream`, or it\n    is locked to another writer already.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/WritableStreamDefaultWriter/prototype/abort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.abort()\n\nThe **`abort()`** method of the\n`WritableStreamDefaultWriter` interface aborts the stream, signaling that\nthe producer can no longer successfully write to the stream and it is to be immediately\nmoved to an error state, with any queued writes discarded.\n\nIf the writer is active, the `abort()` method behaves the same as that for\nthe associated stream (`WritableStream.abort()`). If not, it returns a\nrejected promise.\n\n## Syntax\n\n```js\nabort()\nabort(reason)\n```\n\n### Parameters\n\n- `reason` _**optional**_\n  - : A string representing a human-readable reason for the abort.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason`\nparameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to abort is not a `WritableStream`, or it is\n    locked.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/WritableStreamDefaultWriter/prototype/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.close()\n\nThe **`close()`** method of the\n`WritableStreamDefaultWriter` interface closes the associated writable\nstream.\n\nThe underlying sink will finish processing any previously-written chunks, before\ninvoking the close behavior. During this time any further attempts to write will fail\n(without erroring the stream).\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise`, which fulfills with the `undefined` if all\nremaining chunks were successfully written before the close, or rejects with an error if\na problem was encountered during the process.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to close is not a `WritableStream`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/WritableStreamDefaultWriter/prototype/closed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.closed\n\nThe **`closed`** read-only property of the\n`WritableStreamDefaultWriter` interface returns a\n`Promise` that fulfills if the stream becomes closed, or rejects if\nthe stream errors or the writer's lock is released.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/WritableStreamDefaultWriter/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.desiredSize\n\nThe **`desiredSize`** read-only property of the\n`WritableStreamDefaultWriter` interface returns the desired size required\nto fill the stream's internal queue.\n\n## Value\n\nAn integer. Note that this can be negative if the queue is over-full.\n\nThe value will be `null` if the stream cannot be successfully written to\n(due to either being errored, or having an abort queued up), and zero if the stream is\nclosed.\n\n### Exceptions\n\n- `TypeError`\n  - : The writer's lock is released.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/WritableStreamDefaultWriter/prototype/ready.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.ready\n\nThe **`ready`** read-only property of the\n`WritableStreamDefaultWriter` interface returns a `Promise`\nthat resolves when the desired size of the stream's internal queue transitions from\nnon-positive to positive, signaling that it is no longer applying backpressure.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/WritableStreamDefaultWriter/prototype/releaseLock.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.releaseLock()\n\nThe **`releaseLock()`** method of the\n`WritableStreamDefaultWriter` interface releases the writer's lock on the\ncorresponding stream. After the lock is released, the writer is no longer active. If the\nassociated stream is errored when the lock is released, the writer will appear errored\nin the same way from now on; otherwise, the writer will appear closed.\n\n## Syntax\n\n```js\nreleaseLock()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone `undefined`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/WritableStreamDefaultWriter/prototype/write.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.write()\n\nThe **`write()`** method of the\n`WritableStreamDefaultWriter` interface writes a passed chunk of data to a\n`WritableStream` and its underlying sink, then returns a\n`Promise` that resolves to indicate the success or failure of the write\noperation.\n\nNote that what \"success\" means is up to the underlying sink; it might indicate that the\nchunk has been accepted, and not necessarily that it is safely saved to its ultimate\ndestination.\n\n## Syntax\n\n```js\nwrite(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : A block of binary data to pass to the `WritableStream`.\n\n### Return value\n\nA `Promise`, which fulfills with the `undefined` upon a\nsuccessful write, or rejects if the write fails or stream becomes errored before the\nwriting process is initiated.\n\n### Exceptions\n\n- `TypeError`\n  - : The target stream is not a writable stream, or it does not have an owner.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/atob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# atob()\n\nThe **`atob()`** function decodes a\nstring of data which has been encoded using Base64 encoding. You can use\nthe `btoa()` method to encode and transmit\ndata which may otherwise cause communication problems, then transmit it and use the\n`atob()` method to decode the data again. For example, you can encode,\ntransmit, and decode control characters such as ASCII values 0 through 31.\n\nFor use with Unicode or UTF-8 strings, see the note on \"Unicode strings\" in the page\nfor `btoa()`.\n\n## Syntax\n\n```js\natob(encodedData)\n```\n\n### Parameters\n\n- `encodedData`\n  - : A binary string (i.e., a string in which each character in the string is treated as a byte of binary data) containing base64-encoded data.\n\n### Return value\n\nAn ASCII string containing decoded data from `encodedData`.\n\n### Exceptions\n\n- `InvalidCharacterError`\n  - : Thrown if `encodedData` is not valid base64.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/btoa.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# btoa()\n\nThe **`btoa()`** method creates a\nBase64-encoded ASCII string from a _binary string_ (i.e., a\nstring in which each character in the string is treated as a byte\nof binary data).\n\nYou can use this method to encode data which may otherwise cause communication\nproblems, transmit it, then use the `atob()` method to decode the data again. For example, you can encode control\ncharacters such as ASCII values 0 through 31.\n\n## Syntax\n\n```js\nbtoa(stringToEncode)\n```\n\n### Parameters\n\n- `stringToEncode`\n  - : The _binary string_ to encode.\n\n### Return value\n\nAn ASCII string containing the Base64 representation of\n`stringToEncode`.\n\n### Exceptions\n\n- `InvalidCharacterError`\n  - : The string contained a character that did not fit in a single byte. See \"Unicode\n    strings\" below for more detail.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/clearInterval.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# clearInterval()\n\nThe global **`clearInterval()`** method cancels a timed, repeating action which\nwas previously established by a call to `setInterval()`.\nIf the parameter provided does not identify a previously established action,\nthis method does nothing.\n\n## Syntax\n\n```js\nclearInterval(intervalID)\n```\n\n### Parameters\n\n- `intervalID`\n  - : The identifier of the repeated action you want to cancel. This ID was returned by\n    the corresponding call to `setInterval()`.\n\nIt's worth noting that the pool of IDs used by\n`setInterval()` and\n`setTimeout()` are shared, which\nmeans you can technically use `clearInterval()` and\n`clearTimeout()` interchangeably.\nHowever, for clarity, you should avoid doing so.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/clearTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# clearTimeout()\n\nThe global **`clearTimeout()`** method cancels a timeout previously established\nby calling `setTimeout()`.\n\nIf the parameter provided does not identify a previously established action,\nthis method does nothing.\n\n## Syntax\n\n```js\nclearTimeout(timeoutID)\n```\n\n### Parameters\n\n- `timeoutID`\n  - : The identifier of the timeout you want to cancel. This ID was returned by the\n    corresponding call to `setTimeout()`.\n\nIt's worth noting that the pool of IDs used by\n`setTimeout()` and\n`setInterval()` are shared, which\nmeans you can technically use `clearTimeout()` and\n`clearInterval()`\ninterchangeably. However, for clarity, you should avoid doing so.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/console/assert.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.assert()\n\nThe **`console.assert()`** method writes an error message to\nthe console if the assertion is false. If the assertion is true, nothing happens.\n\n## Syntax\n\n```js\nassert(assertion, obj1)\nassert(assertion, obj1, obj2)\nassert(assertion, obj1, obj2, /* … ,*/ objN)\n\nassert(assertion, msg)\nassert(assertion, msg, subst1)\nassert(assertion, msg, subst1, /* … ,*/ substN)\n```\n\n### Parameters\n\n- `assertion`\n  - : Any boolean expression. If the assertion is false, the message is written to the\n    console.\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output.\n- `msg`\n  - : A JavaScript string containing zero or more substitution strings.\n- `subst1` … `substN`\n  - : JavaScript objects with which to replace substitution strings within\n    `msg`. This parameter gives you additional control over the format of the\n    output.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/console/clear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.clear()\n\nThe **`console.clear()`** method clears the console if the console allows it.\n\n## Syntax\n\n```js\nclear()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/console/count.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.count()\n\nThe **`console.count()`** method logs the number of times that\nthis particular call to `count()` has been called.\n\n\n## Syntax\n\n```js\ncount()\ncount(label)\n```\n\n### Parameters\n\n- `label` _optional_\n  - : A string. If supplied, `count()` outputs the number of\n    times it has been called with that label. If omitted, `count()` behaves as\n    though it was called with the \"default\" label.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/console/countReset.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.countReset()\n\nThe **`console.countReset()`** method resets counter used with `console.count()`.\n\n## Syntax\n\n```js\ncountReset()\ncountReset(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : A string. If supplied, `countReset()` resets the count for\n    that label to 0. If omitted, `countReset()` resets the default counter to\n    0.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/console/debug.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.debug()\n\nThe **`console.debug()`** method outputs a message to the console at the \"debug\" log level.\n\n## Syntax\n\n```js\ndebug(obj1)\ndebug(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output to the console.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/console/dir.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.dir()\n\nThe method **`console.dir()`** displays a list of the properties of\nthe specified JavaScript object.\n\n## Syntax\n\n```js\ndir(object)\n```\n\n### Parameters\n\n- `object`\n  - : A JavaScript object whose properties should be output.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/console/dirxml.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.dirxml()\n\nThe **`console.dirxml()`** method displays the supplied object in the console.\n\n## Syntax\n\n```js\ndirxml(object)\n```\n\n### Parameters\n\n- `object`\n  - : A JavaScript object whose properties should be output.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/console/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.error()\n\nThe **`console.error()`** method outputs an error message console.\n\n## Syntax\n\n```js\nerror(obj1)\nerror(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of\n    these objects are appended together in the order listed and output.\n\n### Return value\n\nNone `undefined`."
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/console/group.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.group()\n\nThe **`console.group()`** method creates a new inline group in the console, until `console.groupEnd()` is called.\n\n## Syntax\n\n```js\ngroup()\ngroup(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : Label for the group.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/console/groupCollapsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.groupCollapsed()\n\nThe **`console.groupCollapsed()`** method creates a new inline group in the Web Console. Unlike `console.group()`,\nhowever, the new group is created collapsed. The user will need to use the disclosure\nbutton next to it to expand it, revealing the entries created in the group.\n\nCall `console.groupEnd()` to back out to the parent group.\n\n## Syntax\n\n```js\ngroupCollapsed()\ngroupCollapsed(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : Label for the group.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/console/groupEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.groupEnd()\n\nThe **`console.groupEnd()`** method exits the current inline group in the console.\n\n## Syntax\n\n```js\ngroupEnd()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/console/info.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.info()\n\nThe **`console.info()`** method outputs an informational message to the console.\n\n## Syntax\n\n```js\ninfo(obj1)\ninfo(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/console/log.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.log()\n\nThe **`console.log()`** method outputs a message to the console.\n\n## Syntax\n\n```js\nlog(obj1)\nlog(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output. Please be warned that if\n    you log objects in the latest versions of Chrome and Firefox what you get logged on\n    the console is a _reference to the object_, which is not necessarily the\n    'value' of the object at the moment in time you call `console.log()`, but\n    it is the value of the object at the moment you open the console.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/console/time.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.time()\n\nThe **`console.time()`** method starts a timer you can use to track\nhow long an operation takes. You give each timer a unique name. When you call `console.timeEnd()` with the same name, the\nbrowser will output the time, in milliseconds, that elapsed since the timer was started.\n\n## Syntax\n\n```js\ntime(label)\n```\n\n### Parameters\n\n- `label`\n  - : A `string` representing the name to give the new timer. This will identify the timer; use the same name when\n    calling `console.timeEnd()` to stop the timer and get the time output to\n    the console.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/console/timeEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.timeEnd()\n\nThe **`console.timeEnd()`** stops a timer that was previously started by calling `console.time()`.\n\n## Syntax\n\n```js\ntimeEnd(label)\n```\n\n### Parameters\n\n- `label`\n  - : A `string` representing the name of the timer to stop. Once stopped, the elapsed time is automatically\n    displayed in the console.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/console/timeLog.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.timeLog()\n\nThe **`console.timeLog()`** method logs the current value of a timer that was previously started by calling `console.time()`.\n\n## Syntax\n\n```js\ntimeLog()\ntimeLog(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : The name of the timer to log to the console. If this is omitted the label \"default\" is used.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/console/trace.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.trace()\n\nThe **`console.trace()`** method outputs a stack trace to the console.\n\n## Syntax\n\n```js\ntrace()\ntrace(object1, /* …, */ objectN)\n```\n\n### Parameters\n\n- `objects` __optional__\n  - : Zero or more objects to be output to console along with the trace. These are\n    assembled and formatted the same way they would be if passed to the `console.log()` method.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/console/warn.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.warn()\n\nThe **`console.warn()`** method outputs a warning message to the console.\n\n## Syntax\n\n```js\nwarn(obj1)\nwarn(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/crypto/getRandomValues.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Crypto.getRandomValues()\n\nThe **`Crypto.getRandomValues()`** method lets you get cryptographically strong random values.\nThe array given as the parameter is filled with random numbers (random in its cryptographic meaning).\n\n## Syntax\n\n```js\ngetRandomValues(typedArray)\n```\n\n### Parameters\n\n- `typedArray`\n  - : An integer-based `TypedArray`, that is one of: `Int8Array`, `Uint8Array`,\n    `Uint8ClampedArray`, `Int16Array`, `Uint16Array`,\n    `Int32Array`, `Uint32Array`, `BigInt64Array`,\n    `BigUint64Array` (but **not** `Float32Array` nor `Float64Array`).\n    All elements in the array will be overwritten with random numbers.\n\n### Return value\n\nThe same array passed as `typedArray` but with its contents replaced with the newly generated random numbers.\nNote that `typedArray` is modified in-place, and no copy is made.\n\n### Exceptions\n\n- `QuotaExceededError`\n  - : Thrown if the `byteLength` of `typedArray` exceeds 65,536.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/crypto/randomUUID.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Crypto.randomUUID()\n\nThe **`randomUUID()`** method is used to generate a v4 [UUID](https://developer.mozilla.org/en-US/docs/Glossary/UUID) using a cryptographically secure random number generator.\n\n## Syntax\n\n```js\nrandomUUID()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string containing a randomly generated, 36 character long v4 UUID."
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/crypto/subtle.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Crypto.subtle\n\nThe **`Crypto.subtle`** read-only property returns a\n[`SubtleCrypto`](../SubtleCrypto/SubtleCrypto.mdx) which can then be used to perform low-level\ncryptographic operations.\n\n## Value\n\nA [`SubtleCrypto`](../SubtleCrypto/SubtleCrypto.mdx) object you can use to interact with the Web Crypto API's\nlow-level cryptography features.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/decodeURI.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# decodeURI\n\nThe **`decodeURI()`** function decodes a Uniform Resource Identifier (URI) previously created by [`encodeURI()`](../globals/encodeURI.mdx) or a similar routine.\n\n## Syntax\n\n```js\ndecodeURI(encodedURI)\n```\n\n### Parameters\n\n- `encodedURI`\n  - : A complete, encoded Uniform Resource Identifier.\n\n### Return value\n\nA new string representing the unencoded version of the given encoded Uniform Resource Identifier (URI).\n\n### Exceptions\n\n- [`URIError`](../globals/URIError/URIError.mdx)\n  - : Thrown if `encodedURI` contains a `%` not followed by two hexadecimal digits, or if the escape sequence does not encode a valid UTF-8 character.\n\n## Description\n\n`decodeURI()` is a function property of the global object.\n\nThe `decodeURI()` function decodes the URI by treating each escape sequence in the form `%XX` as one UTF-8 code unit (one byte). In UTF-8, the number of leading 1 bits in the first byte, which may be 0 (for 1-byte ASCII characters), 2, 3, or 4, indicates the number of bytes in the character. So by reading the first escape sequence, `decodeURI()` can determine how many more escape sequences to consume. If `decodeURI()` fails to find the expected number of sequences, or if the escape sequences don't encode a valid UTF-8 character, a [`URIError`](../globals/URIError/URIError.mdx) is thrown.\n\n`decodeURI()` decodes all escape sequences, but if the escape sequence encodes one of the following characters, the escape sequence is preserved in the output string (because they are part of the URI syntax):\n\n```\n; / ? : @ & = + $ , #\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/decodeURIComponent.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# decodeURIComponent\n\nThe **`decodeURIComponent()`** function decodes a Uniform Resource Identifier (URI) component previously created by [`encodeURIComponent()`](./encodeURIComponent.mdx) or by a similar routine.\n\n\n## Syntax\n\n```js\ndecodeURIComponent(encodedURI)\n```\n\n### Parameters\n\n- `encodedURI`\n  - : An encoded component of a Uniform Resource Identifier.\n\n### Return value\n\nA new string representing the decoded version of the given encoded Uniform Resource Identifier (URI) component.\n\n### Exceptions\n\n- [`URIError`](../globals/URIError/URIError.mdx)\n  - : Thrown if `encodedURI` contains a `%` not followed by two hexadecimal digits, or if the escape sequence does not encode a valid UTF-8 character.\n\n## Description\n\n`decodeURIComponent()` is a function property of the global object.\n\n`decodeURIComponent()` uses the same decoding algorithm as described in [`decodeURI()`](./decodeURI.mdx). It decodes _all_ escape sequences, including those that are not created by [`encodeURIComponent()`](./encodeURIComponent.mdx), like `-.!~*'()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/encodeURI.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# encodeURI()\n\nThe **`encodeURI()`** function encodes a URI by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character (will only be four escape sequences for characters composed of two surrogate characters). Compared to [`encodeURIComponent()`](./encodeURIComponent.mdx), this function encodes fewer characters, preserving those that are part of the URI syntax.\n\n## Syntax\n\n```js\nencodeURI(uri)\n```\n\n### Parameters\n\n- `uri`\n  - : A string to be encoded as a URI.\n\n### Return value\n\nA new string representing the provided string encoded as a URI.\n\n### Exceptions\n\n- [`URIError`](./URIError/URIError.mdx)\n  - : Thrown if `uri` contains a [lone surrogate](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters).\n\n## Description\n\n`encodeURI()` is a function property of the global object.\n\nThe `encodeURI()` function escapes characters by UTF-8 code units, with each octet encoded in the format `%XX`, left-padded with 0 if necessary. Because lone surrogates in UTF-16 do not encode any valid Unicode character, they cause `encodeURI()` to throw a [`URIError`](./URIError/URIError.mdx).\n\n`encodeURI()` escapes all characters **except**:\n\n```\nA–Z a–z 0–9 - _ . ! ~ * ' ( )\n\n; / ? : @ & = + $ , #\n```\n\nThe characters on the second line are characters that may be part of the URI syntax, and are only escaped by `encodeURIComponent()`. Both `encodeURI()` and `encodeURIComponent()` do not encode the characters `-.!~*'()`, known as \"unreserved marks\", which do not have a reserved purpose but are allowed in a URI \"as is\". (See [RFC2396](https://www.ietf.org/rfc/rfc2396.txt))\n\nThe `encodeURI()` function does not encode characters that have special meaning (reserved characters) for a URI. The following example shows all the parts that a URI can possibly contain. Note how certain characters are used to signify special meaning:\n\n```\nhttp://username:password@www.example.com:80/path/to/file.php?foo=316&bar=this+has+spaces#anchor\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/encodeURIComponent.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# encodeURIComponent\n\nThe **`encodeURIComponent()`** function encodes a URI by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character (will only be four escape sequences for characters composed of two surrogate characters). Compared to [`encodeURI()`](./encodeURI.mdx), this function encodes more characters, including those that are part of the URI syntax.\n\n## Syntax\n\n```js\nencodeURIComponent(uriComponent)\n```\n\n### Parameters\n\n- `uriComponent`\n  - : A string to be encoded as a URI component (a path, query string, fragment, etc.). Other values are [converted to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion).\n\n### Return value\n\nA new string representing the provided `uriComponent` encoded as a URI component.\n\n### Exceptions\n\n- [`URIError`](./URIError/URIError.mdx)\n  - : Thrown if `uriComponent` contains a [lone surrogate](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters).\n\n## Description\n\n`encodeURIComponent()` is a function property of the global object.\n\n`encodeURIComponent()` uses the same encoding algorithm as described in [`encodeURI()`](./encodeURI.mdx). It escapes all characters **except**:\n\n```text\nA–Z a–z 0–9 - _ . ! ~ * ' ( )\n```\n\nCompared to [`encodeURI()`](./encodeURI.mdx), `encodeURIComponent()` escapes a larger set of characters. Use `encodeURIComponent()` on user-entered fields from forms `POST`'d to the server — this will encode `&` symbols that may inadvertently be generated during data entry for special HTML entities or other characters that require encoding/decoding. For example, if a user writes `Jack & Jill`, without `encodeURIComponent()`, the ampersand could be interpreted on the server as the start of a new field and jeopardize the integrity of the data.\n\nFor [`application/x-www-form-urlencoded`](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#application/x-www-form-urlencoded-encoding-algorithm), spaces are to be replaced by `+`, so one may wish to follow a `encodeURIComponent()` replacement with an additional replacement of `%20` with `+`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/escape.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# escape()\n\n> **Note:** `escape()` is a non-standard function implemented by browsers and was only standardized for cross-engine compatibility. It is not required to be implemented by all JavaScript engines and may not work everywhere. Use [`encodeURIComponent()`](./encodeURIComponent.mdx) or [`encodeURI()`](./encodeURI.mdx) if possible.\n\nThe **`escape()`** function computes a new string in which certain characters have been replaced by hexadecimal escape sequences.\n\n## Syntax\n\n```js\nescape(str)\n```\n\n### Parameters\n\n- `str`\n  - : A string to be encoded.\n\n### Return value\n\nA new string in which certain characters have been escaped.\n\n## Description\n\n`escape()` is a function property of the global object.\n\nThe `escape()` function replaces all characters with escape sequences, with the exception of ASCII word characters (A–Z, a–z, 0–9, _) and `@*_+-./`. Characters are escaped by UTF-16 code units. If the code unit's value is less than 256, it is represented by a two-digit hexadecimal number in the format `%XX`, left-padded with 0 if necessary. Otherwise, it is represented by a four-digit hexadecimal number in the format `%uXXXX`, left-padded with 0 if necessary.\n\n> **Note:** This function was used mostly for URL encoding and is partly based on the escape format in rfc(1738). The escape format is _not_ an [escape sequence](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#escape_sequences) in string literals. You can replace `%XX` with `\\xXX` and `%uXXXX` with `\\uXXXX` to get a string containing actual string-literal escape sequences.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/eval.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# eval\n\n> **Warning:** Executing JavaScript from a string is an enormous security risk. It is far too easy for a bad actor to run arbitrary code when you use `eval()`. See [never use direct eval](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval#never_use_direct_eval!) for details.\n\nThe **`eval()`** function evaluates JavaScript code represented as a string and returns its completion value. The source is parsed as a script.\n\n## Syntax\n\n```js\neval(script)\n```\n\n### Parameters\n\n- `script`\n  - : A string representing a JavaScript expression, statement, or sequence of statements. The expression can include variables and properties of existing objects. It will be parsed as a script, so [`import`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/import) declarations (which can only exist in modules) are not allowed.\n\n### Return value\n\nThe completion value of evaluating the given code. If the completion value is empty, [`undefined`](./undefined.mdx) is returned. If `script` is not a string primitive, `eval()` returns the argument unchanged.\n\n### Exceptions\n\nThrows any exception that occurs during evaluation of the code, including[ `SyntaxError`](./SyntaxError/SyntaxError.mdx) if `script` fails to be parsed as a script.\n\n## Description\n\n`eval()` is a function property of the global object.\n\nThe argument of the `eval()` function is a string. It will evaluate the source string as a script body, which means both statements and expressions are allowed. It returns the completion value of the code. For expressions, it's the value the expression evaluates to. Many statements and declarations have completion values as well, but the result may be surprising (for example, the completion value of an assignment is the assigned value, but the completion value of [`let`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/let) is undefined), so it's recommended to not rely on statements' completion values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/fetch.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# fetch()\n\nThe global **`fetch()`** method starts the process of fetching a\nresource from the network, returning a promise which is fulfilled once the response is\navailable.\n\nThe promise resolves to the `Response` object\nrepresenting the response to your request.\n\nA `fetch()` promise only rejects when a\nnetwork error is encountered (which is usually when there's a permissions issue or\nsimilar). A `fetch()` promise _does\nnot_ reject on HTTP errors (`404`, etc.). Instead, a\n`then()` handler must check the `Response.ok` and/or\n`Response.status` properties.\n\n> **Note:** The `fetch()` method's parameters are identical to\n> those of the `Request()` constructor.\n\n## Syntax\n\n```js\nfetch(resource)\nfetch(resource, options)\n```\n\n### Parameters\n\n- `resource`\n\n  - : This defines the resource that you wish to fetch. This can either be:\n\n    - A string or any other object with a \"toString\" method.\n    - A `Request` object.\n\n- `options` _**optional**_\n\n  - : An object containing any custom settings that you want to apply to the request. The\n    possible options are:\n\n    - `method`\n      - : The request method, e.g., `GET`, `POST`.\n    - `headers`\n      - : Any headers you want to add to your request, contained within a\n        `Headers` object or an object literal with `String`\n        values.\n    - `body`\n      - : Any body that you want to add to your request: this can be an `ArrayBuffer`, a `TypedArray`, a `DataView`, a `URLSearchParams`, string object or literal, or a `ReadableStream` object.\n    - `backend` _**Fastly-specific**_\n      - *Fastly-specific*\n    - `cacheOverride` _**Fastly-specific**_\n    - `cacheKey` _**Fastly-specific**_\n\n### Return value\n\nA `Promise` that resolves to a `Response` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/globalThis.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# globalThis\n\nThe global **`globalThis`** property contains the [global `this`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this#global_context) value, which is usually akin to the [global object](https://developer.mozilla.org/docs/Glossary/Global_object).\n\n## Value\n\nThe global `this` object.\n\n> **Note:** The `globalThis` property is configurable and writable so that code authors can hide it when executing untrusted code and prevent exposing the global object.\n\n## Description\n\nThe `globalThis` property provides a standard way of accessing the global `this` value (and hence the global object itself) across environments.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/isFinite.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# isFinite\n\nThe global **`isFinite()`** function determines whether the\npassed value is a finite number. If needed, the parameter is first converted to a\nnumber.\n\n## Syntax\n\n```js\nisFinite(testValue)\n```\n\n### Parameters\n\n- `testValue`\n  - : The value to be tested for finiteness.\n\n### Return value\n\n**`false`** if the argument is (or will be coerced to) positive\nor negative [`Infinity`](./Infinity.mdx) or [`NaN`](./NaN.mdx) or [`undefined`](./undefined.mdx);\notherwise, **`true`**.\n\n## Description\n\n`isFinite` is a function property of the global object.\n\nYou can use this function to determine whether a number is a finite number. The\n`isFinite` function examines the number in its argument. If the argument is\n`NaN`, positive infinity, or negative infinity, this method returns\n`false`; otherwise, it returns `true`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/isNaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# isNaN()\n\nThe **`isNaN()`** function determines whether a value is [`NaN`](./NaN.mdx) when converted to a number. Because coercion inside the `isNaN()` function can be [surprising](#description), you may alternatively want to use [`Number.isNaN()`](./Number/isNaN.mdx).\n\n## Syntax\n\n```js\nisNaN(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested.\n\n### Return value\n\n`true` if the given value is [`NaN`](./NaN.mdx) after being [converted to a number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_coercion); otherwise, `false`.\n\n## Description\n\n`isNaN()` is a function property of the global object.\n\nFor number values, `isNaN()` tests if the number is the value [`NaN`](./NaN.mdx). When the argument to the `isNaN()` function is not of type [Number](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#number_type), the value is first coerced to a number, and the resulting value is then compared against [`NaN`](./NaN.mdx).\n\nThis behavior of `isNaN()` for non-numeric arguments can be confusing! For example, an empty string is coerced to 0, while a boolean is coerced to 0 or 1; both values are intuitively \"not numbers\", but they don't evaluate to `NaN`, so `isNaN()` returns `false`. Therefore, `isNaN()` answers neither the question \"is the input the floating point [`NaN`](./NaN.mdx) value\" nor the question \"is the input not a number\".\n\n[`Number.isNaN()`](./Number/isNaN.mdx) is a more reliable way to test whether a value is the number value `NaN` or not. Alternatively, the expression `x !== x` can be used, and neither of the solutions is subject to the false positives that make the global `isNaN()` unreliable. To test if a value is a number, use [`typeof x === \"number\"`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/typeof).\n\nThe `isNaN()` function answers the question \"is the input functionally equivalent to [`NaN`](./NaN.mdx) when used in a number context\". If `isNaN(x)` returns `false`, you can use `x` in an arithmetic expression as if it's a valid number that's not `NaN`. If `isNaN(x)` returns `true`, `x` will get coerced to `NaN` and make most arithmetic expressions return `NaN` (because `NaN` propagates). You can use this, for example, to test whether an argument to a function is arithmetically processable (usable \"like\" a number), and handle values that are not number-like by throwing an error, providing a default value, etc. This way, you can have a function that makes use of the full versatility JavaScript provides by implicitly converting values depending on context.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/location.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# location\n\nThe **`location`** read-only property returns a\n[`Location`](../globals/WorkerLocation/WorkerLocation.mdx) object with information about the current location of the\ndocument.\n\nSee [`Location`](../globals/WorkerLocation/WorkerLocation.mdx) for all available properties.\n\n## Value\n\nA [`Location`](../globals/WorkerLocation/WorkerLocation.mdx) object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/parseFloat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# parseFloat()\n\nThe **`parseFloat()`** function parses a string argument and returns a floating point number.\n\n## Syntax\n\n```js\nparseFloat(string)\n```\n\n### Parameters\n\n- `string`\n  - : The value to parse, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). Leading whitespace in this argument is ignored.\n\n### Return value\n\nA floating point number parsed from the given `string`, or [`NaN`](./NaN.mdx) when the first non-whitespace character cannot be converted to a number.\n\n> **Note:** JavaScript does not have the distinction of \"floating point numbers\" and \"integers\" on the language level. [`parseInt()`](./parseInt.mdx) and `parseFloat()` only differ in their parsing behavior, but not necessarily their return values. For example, `parseInt(\"42\")` and `parseFloat(\"42\")` would return the same value: a `Number` 42.\n\n## Description\n\nThe `parseFloat` function converts its first argument to a string, parses that string as a decimal number literal, then returns a number or `NaN`. The number syntax it accepts can be summarized as:\n\n- The characters accepted by `parseFloat()` are plus sign (`+`), minus sign (`-` U+002D HYPHEN-MINUS), decimal digits (`0` – `9`), decimal point (`.`), exponent indicator (`e` or `E`), and the `\"Infinity\"` literal.\n- The `+`/`-` signs can only appear strictly at the beginning of the string, or immediately following the `e`/`E` character. The decimal point can only appear once, and only before the `e`/`E` character. The `e`/`E` character can only appear once, and only if there is at least one digit before it.\n- Leading spaces in the argument are trimmed and ignored.\n- `parseFloat()` can also parse and return [`Infinity`](./Infinity.mdx) or `-Infinity` if the string starts with `\"Infinity\"` or `\"-Infinity\"` preceded by none or more white spaces.\n- `parseFloat()` picks the longest substring starting from the beginning that generates a valid number literal. If it encounters an invalid character, it returns the number represented up to that point, ignoring the invalid character and all characters following it.\n- If the argument's first character can't start a legal number literal per the syntax above, `parseFloat` returns [`NaN`](./NaN.mdx).\n\nSyntax-wise, `parseFloat()` parses a subset of the syntax that the [`Number()`](./Number/Number.mdx) function accepts. Namely, `parseFloat()` does not support non-decimal literals with `0x`, `0b`, or `0o` prefixes but supports everything else. However, `parseFloat()` is more lenient than `Number()` because it ignores trailing invalid characters, which would cause `Number()` to return `NaN`.\n\nSimilar to number literals and `Number()`, the number returned from `parseFloat()` may not be exactly equal to the number represented by the string, due to floating point range and inaccuracy. For numbers outside the `-1.7976931348623158e+308` – `1.7976931348623158e+308` range (see `Number.MAX_VALUE`), `-Infinity` or `Infinity` is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/parseInt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# parseInt\n\nThe **`parseInt()`** function parses a string argument and returns an integer of the specified [radix](https://en.wikipedia.org/wiki/Radix) (the base in mathematical numeral systems).\n\n\n\n## Syntax\n\n```js\nparseInt(string)\nparseInt(string, radix)\n```\n\n### Parameters\n\n- `string`\n  - : A string starting with an integer. Leading whitespace in this argument is ignored.\n- `radix` _**optional**_\n\n  - : An integer between `2` and `36` that represents the _radix_ (the base in mathematical numeral systems) of the `string`. It is converted to a [32-bit integer](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#fixed-width_number_conversion); if it's outside the range of \\[2, 36] after conversion, the function will always return `NaN`. If `0` or not provided, the radix will be inferred based on `string`'s value. Be careful — this does NOT always default to `10`! The [description below](#description) explains in more detail what happens when `radix` is not provided.\n\n### Return value\n\nAn integer parsed from the given `string`, or [`NaN`](./NaN.mdx) when\n\n- the `radix` as a 32-bit integer is smaller than `2` or bigger than `36`, or\n- the first non-whitespace character cannot be converted to a number.\n\n> **Note:** JavaScript does not have the distinction of \"floating point numbers\" and \"integers\" on the language level. `parseInt()` and [`parseFloat()`](./parseFloat.mdx) only differ in their parsing behavior, but not necessarily their return values. For example, `parseInt(\"42\")` and `parseFloat(\"42\")` would return the same value: a `Number` 42.\n\n## Description\n\nThe `parseInt` function converts its first argument to a string, parses that string, then returns an integer or `NaN`.\n\nIf not `NaN`, the return value will be the integer that is the first argument taken as a number in the specified `radix`. (For example, a `radix` of `10` converts from a decimal number, `8` converts from octal, `16` from hexadecimal, and so on.)\n\nThe `radix` argument is converted to a number. If it's unprovided, or if the value becomes 0, `NaN` or `Infinity` (`undefined` is coerced to `NaN`), JavaScript assumes the following:\n\n1. If the input `string`, with leading whitespace and possible `+`/`-` signs removed, begins with `0x` or `0X` (a zero, followed by lowercase or uppercase X), `radix` is assumed to be `16` and the rest of the string is parsed as a hexadecimal number.\n2. If the input `string` begins with any other value, the radix is `10` (decimal).\n\n> **Note:** Other prefixes like `0b`, which are valid in [number literals](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#binary), are treated as normal digits by `parseInt()`. `parseInt()` does _not_ treat strings beginning with a `0` character as octal values either. The only prefix that `parseInt()` recognizes is `0x` or `0X` for hexadecimal values — everything else is parsed as a decimal value if `radix` is missing.\n\nIf the radix is `16`, `parseInt()` allows the string to be optionally prefixed by `0x` or `0X` after the optional sign character (`+`/`-`).\n\nIf the radix value (coerced if necessary) is not in range \\[2, 36] (inclusive) `parseInt` returns `NaN`.\n\nFor radices above `10`, letters of the English alphabet indicate numerals greater than `9`. For example, for hexadecimal numbers (base `16`), `A` through `F` are used. The letters are case-insensitive.\n\n`parseInt` understands exactly two signs: `+` for positive, and `-` for negative. It is done as an initial step in the parsing after whitespace is removed. If no signs are found, the algorithm moves to the following step; otherwise, it removes the sign and runs the number-parsing on the rest of the string.\n\nIf `parseInt` encounters a character that is not a numeral in the specified `radix`, it ignores it and all succeeding characters and returns the integer value parsed up to that point. For example, although `1e3` technically encodes an integer (and will be correctly parsed to the integer `1000` by [`parseFloat()`](./parseFloat.mdx), `parseInt(\"1e3\", 10)` returns `1`, because `e` is not a valid numeral in base 10. Because `.` is not a numeral either, the return value will always be an integer.\n\nIf the first character cannot be converted to a number with the radix in use, `parseInt` returns `NaN`. Leading whitespace is allowed.\n\nFor arithmetic purposes, the `NaN` value is not a number in any radix. You can call the [`Number.isNaN`](./Number/isNaN.mdx) function to determine if the result of `parseInt` is `NaN`. If `NaN` is passed on to arithmetic operations, the operation result will also be `NaN`.\n\nBecause large numbers use the `e` character in their string representation (e.g. `6.022e23` for 6.022 × 10<sup>23</sup>), using `parseInt` to truncate numbers will produce unexpected results when used on very large or very small numbers. `parseInt` should _not_ be used as a substitute for [`Math.trunc()`](./Math/trunc.mdx).\n\nTo convert a number to its string literal in a particular radix, use [`thatNumber.toString(radix)`](./Number/prototype/toString.mdx).\n\nBecause `parseInt()` returns a number, it may suffer from loss of precision if the integer represented by the string is [outside the safe range](./Number/isSafeInteger.mdx). The [`BigInt`](./BigInt/BigInt.mdx) function supports parsing integers of arbitrary length accurately, by returning a `BigInt`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/performance/now.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# performance.now()\n\nThe **`performance.now()`** method returns a high resolution timestamp in milliseconds.\nIt represents the time elapsed since [`performance.timeOrigin`](./timeOrigin.mdx) (the time when the worker was instantiated).\n\n## Syntax\n\n```js\nnow()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns a number which represents the time since worker instantation measured in milliseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/performance/timeOrigin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# performance.timeOrigin\n\nThe **`timeOrigin`** read-only property of the Performance interface returns the high resolution timestamp that is used as the baseline for performance-related timestamps.\n\nThis value represents the time when the worker was instantiated.\n\n### Value\n\nReturns a number which represents the time when the worker was instantation."
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/setInterval.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# setInterval()\n\nThe **`setInterval()`** method, repeatedly\ncalls a function or executes a code snippet, with a fixed time delay between each\ncall.\n\nThis method returns an interval ID which uniquely identifies the interval, so you\ncan remove it later by calling `clearInterval()`.\n\n## Syntax\n\n```js\nsetInterval(code)\nsetInterval(code, delay)\n\nsetInterval(func)\nsetInterval(func, delay)\nsetInterval(func, delay, arg0)\nsetInterval(func, delay, arg0, arg1)\nsetInterval(func, delay, arg0, arg1, /* … ,*/ argN)\n```\n\n### Parameters\n\n- `func`\n  - : A `function` to be executed every `delay` milliseconds. The first execution happens after `delay` milliseconds.\n- `code`\n  - : An optional syntax allows you to include a string instead of a function, which is\n    compiled and executed every `delay` milliseconds. This syntax is _not\n    recommended_ for the same reasons that make using `eval() a\n    security risk.\n- `delay` _**optional**_\n  - : The time, in milliseconds (thousandths of a second), the timer should delay in\n    between executions of the specified function or code. Defaults to 0 if not specified.\n    below for details on the permitted range of `delay` values.\n- `arg0, …, argN` _**optional**_\n  - : Additional arguments which are passed through to the function specified by\n    _func_ once the timer expires.\n\n### Return value\n\nThe returned `intervalID` is a numeric, non-zero value which identifies the\ntimer created by the call to `setInterval()`; this value can be passed to\n`clearInterval()` to cancel the interval.\n\nIt may be helpful to be aware that `setInterval()` and\n`setTimeout()` share the same pool\nof IDs, and that `clearInterval()` and\n`clearTimeout()` can technically\nbe used interchangeably. For clarity, however, you should try to always match them to\navoid confusion when maintaining your code.\n\n> **Note:** The `delay` argument is converted to a\n> signed 32-bit integer. This effectively limits `delay` to 2147483647 ms,\n> since it's specified as a signed integer in the IDL.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/setTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# setTimeout()\n\nThe global **`setTimeout()`** method sets a timer which executes a function or specified\npiece of code once the timer expires.\n\n## Syntax\n\n```js\nsetTimeout(code)\nsetTimeout(code, delay)\n\nsetTimeout(functionRef)\nsetTimeout(functionRef, delay)\nsetTimeout(functionRef, delay, param1)\nsetTimeout(functionRef, delay, param1, param2)\nsetTimeout(functionRef, delay, param1, param2, /* … ,*/ paramN)\n```\n\n### Parameters\n\n- `functionRef`\n  - : A `function` to be executed after the timer expires.\n- `code`\n  - : An alternative syntax that allows you to include a string instead of a function,\n    which is compiled and executed when the timer expires. This syntax is **not\n    recommended** for the same reasons that make using\n    `eval()` a security risk.\n- `delay` _**optional**_\n\n  - : The time, in milliseconds that the timer should wait before\n    the specified function or code is executed. If this parameter is omitted, a value of 0\n    is used, meaning execute \"immediately\", or more accurately, the next event cycle.\n\n- `param1`, …, `paramN` _**optional**_\n\n  - : Additional arguments which are passed through to the function specified by\n    `functionRef`.\n\n### Return value\n\nThe returned `timeoutID` is a positive integer value which\nidentifies the timer created by the call to `setTimeout()`. This value can be\npassed to `clearTimeout()` to\ncancel the timeout.\n\nIt is guaranteed that a `timeoutID` value will never be reused by a subsequent call to\n`setTimeout()` or `setInterval()` on the same object (a window or\na worker). However, different objects use separate pools of IDs.\n\n## Description\n\nTimeouts are cancelled using `clearTimeout()`.\n\nTo call a function repeatedly (e.g., every _N_ milliseconds), consider using\n`setInterval()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/structuredClone.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# structuredClone()\n\nThe global **`structuredClone()`** method creates a deep clone of a given value.\n\n## Syntax\n\n```js\nstructuredClone(value)\n```\n\n### Parameters\n\n- `value`\n  - : The object to be cloned.\n\n### Return value\n\nThe returned value is a deep copy of the original `value`.\n\n### Exceptions\n\n- `DataCloneError`\n  - : Thrown if any part of the input value is not serializable.\n\n## Description\n\nThis function can be used to deep copy JavaScript values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/undefined.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# undefined\n\nThe global **`undefined`** property represents the primitive\nvalue `undefined`. It is one of JavaScript's \"primitive types\".\n\n## Value\n\nThe primitive value `undefined`.\n\n## Description\n\n`undefined` is a property of the _global object_. That is, it is a variable in global scope.\n\n`undefined` is a non-configurable, non-writable property.\n\nA variable that has not been assigned a value is of type `undefined`. A\nmethod or statement also returns `undefined` if the variable that is being\nevaluated does not have an assigned value. A function returns `undefined` if\na value was not explicitly returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/globals/unescape.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# unescape()\n\n> **Note:** `unescape()` is a non-standard function implemented by browsers and was only standardized for cross-engine compatibility. It is not required to be implemented by all JavaScript engines and may not work everywhere. Use [`decodeURIComponent()`](./decodeURIComponent.mdx) or [`decodeURI()`](./decodeURI.mdx) if possible.\n\nThe **`unescape()`** function computes a new string in which hexadecimal escape sequences are replaced with the characters that they represent. The escape sequences might be introduced by a function like [`escape()`](./escape.mdx).\n\n## Syntax\n\n```js\nunescape(str)\n```\n\n### Parameters\n\n- `str`\n  - : A string to be decoded.\n\n### Return value\n\nA new string in which certain characters have been unescaped.\n\n## Description\n\n`unescape()` is a function property of the global object.\n\nThe `unescape()` function replaces any escape sequence with the character that it represents. Specifically, it replaces any escape sequence of the form `%XX` or `%uXXXX` (where `X` represents one hexadecimal digit) with the character that has the hexadecimal value `XX`/`XXXX`. If the escape sequence is not a valid escape sequence (for example, if `%` is followed by one or no hex digit), it is left as-is.\n\n> **Note:** This function was used mostly for URL encoding and is partly based on the escape format in rfc(1738). The `unescape()` function does _not_ evaluate [escape sequences](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#escape_sequences) in string literals. You can replace `\\xXX` with `%XX` and `\\uXXXX` with `%uXXXX` to get a string that can be handled by `unescape()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/index.mdx",
    "content": "---\nsidebar_position: 1\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\nimport {Fiddle} from '@site/src/components/fiddle';\n\n# JavaScript for Fastly Compute\n\nThis site is the full SDK reference for [`@fastly/js-compute`](https://www.npmjs.com/package/%40fastly/js-compute), the module that provides the interface between your JavaScript code and the [Fastly Compute](https://www.fastly.com) platform.\n\nIf you haven't used Fastly Compute before, start by [setting up your first Fastly Compute program](https://developer.fastly.com/learning/compute/) over on **developer.fastly.com** so that you have a working development environment.\n\nTo learn more about the fundamentals of using JavaScript with Fastly Compute, see our [using JavaScript](https://developer.fastly.com/learning/compute/javascript/) guide.\n\n## Understanding the JavaScript SDK\n\nIncoming HTTP requests to [domains that are attached to your Fastly service](https://developer.fastly.com/learning/concepts/) will start an instance of your application and invoke a `fetch` event, which can be bound using the `addEventListener` function:\n\n```js\naddEventListener(\"fetch\", event => event.respondWith(handleRequest(event)) );\n\nasync function handleRequest(event) {\n  const req = event.request;\n\n  return fetch(req, {\n    backend: \"example_backend\"\n  });\n}\n```\n\nFastly specific features are available as named imports from `fastly:` prefixed modules, all of which are documented in this site.  For example, the [env](https://js-compute-reference-docs.edgecompute.app/docs/fastly:env/env) function provides access to [environment variables](https://developer.fastly.com/reference/compute/ecp-env/) and can be imported into your application like this:\n\n```js\nimport { env } from \"fastly:env\"\n```\n\nJavaScript code compiled for Fastly Compute has access to a global environment with most of the globals you would expect in an ECMAScript runtime, like [`Date`](https://js-compute-reference-docs.edgecompute.app/docs/globals/Date/) and [`console`](https://js-compute-reference-docs.edgecompute.app/docs/globals/console/log).\n\n## Trying things out\n\n[Fastly fiddle](https://fiddle.fastly.dev) is an online web-based playground where you can run Fastly code.  You'll see fiddles included in many pages of our [developer hub](https://developer.fastly.com) and this SDK reference. These interactive examples can be executed right on the page by clicking the **RUN** tab:\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nasync function app(event) {\n    const request = event.request;\n    return new Response(\"You made a request to \" + request.url)\n}\naddEventListener(\"fetch\", event => {\n  event.respondWith(app(event));\n});\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nasync function app(event) {\n    const request = event.request;\n    return new Response(`You made a request to ${request.url}`)\n}\n\naddEventListener(\"fetch\", event => {\n  event.respondWith(app(event));\n});\n\n```\n\n</Fiddle>\n\nCheck out [`fiddle.fastly.dev`](https://fiddle.fastly.dev) to create your own.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/kv-store/KVStore/KVStore.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `KVStore()`\n\nThe **`KVStore` constructor** lets you connect your Fastly Compute application to a Fastly KV store.\n\nA Fastly KV store is a persistent, globally consistent key-value store. See [Data stores for Fastly services](https://developer.fastly.com/learning/concepts/kv-stores/#kv-stores) for initialization and usage details.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew KVStore(name)\n```\n\n> **Note:** `KVStore()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - The Fastly KV store which should be associated with this KVStore instance\n  \n### Return value\n\nA new `KVStore` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no KV Store exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name does not start with an ascii alphabetical character \n  - Thrown if the provided name contains control characters `(\\u0000-\\u001F)`\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then read back the value and return it to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/kv-store/KVStore/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# KVStore.prototype.get\n\n▸ **get**(): `string`\n\nGets the value associated with the key `key` in the KV store.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the KV-store.\n\n### Return value\n\nIf the key does not exist in the KV store, this returns a `Promise` which resolves with `null`.\n\nIf the key does exist in the KV store, this returns a `Promise` which resolves with an `KVStoreEntry`.\n\n## Description\n\nSend the given message, converted to a string, to this KVStore instance's endpoint.\n\nThe `get()` method requires its `this` value to be a [`KVStore`](../KVStore.mdx) object.\n\nIf the `this` value does not inherit from `KVStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is any of the strings `\"\"`, `\".\"`, or `\"..\"`\n    - Starts with the string `\".well-known/acme-challenge/\"`\n    - Contains any of the characters `\"#?*[]\\n\\r\"`\n    - Is longer than 1024 characters\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then read back the value and return it to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/kv-store/KVStore/prototype/put.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# KVStore.prototype.put\n\nThe **`put()`** method stores a `value` into the KV store under a `key`.\n\n> **Note**: KV stores are eventually consistent, this means that the updated contents associated with the key `key` may not be available to read from all edge locations immediately and some edge locations may continue returning the previous contents associated with the key.\n\n## Syntax\n\n```js\nput(key, value)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to store the supplied value under within the KV store.\n- `value` _:  ArrayBuffer | TypedArray | DataView| ReadableStream | URLSearchParams | String | string literal_\n  - The value to store within the KV store.\n\n### Return value\n\nReturns a `Promise` which resolves with `undefined` when the provided `value` has been written into the KV store.\n\n## Description\n\nStores the supplied `value` into the KV store under the supplied `key`.\n\nThe `put()` method requires its `this` value to be a [`KVStore`](../KVStore.mdx) object.\n\nIf the `this` value does not inherit from `KVStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is any of the strings `\"\"`, `\".\"`, or `\"..\"`\n    - Starts with the string `\".well-known/acme-challenge/\"`\n    - Contains any of the characters `\"#?*[]\\n\\r\"`\n    - Is longer than 1024 characters\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then read back the value and return it to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n\n  const entry = await files.put('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/kv-store/KVStoreEntry/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.arrayBuffer()\n\nThe `arrayBuffer()` method of the `KVStoreEntry` interface takes a `KVStoreEntry` stream and reads it to completion. It returns a promise that resolves with an `ArrayBuffer`.\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an `ArrayBuffer`."
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/kv-store/KVStoreEntry/prototype/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.body\n\nThe `body` read-only property of the `KVStoreEntry` interface is a `ReadableStream` of the body contents.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/kv-store/KVStoreEntry/prototype/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.bodyUsed\n\nThe `bodyUsed` read-only property of the `KVStoreEntry` interface is a `boolean` value that indicates whether the body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/kv-store/KVStoreEntry/prototype/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.json()\n\nThe `json()` method of the `KVStoreEntry` interface takes a `KVStoreEntry` stream and reads it to completion. It returns a promise which resolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a JavaScript object. This object could be anything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/kv-store/KVStoreEntry/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.text()\n\nThe `text()` method of the `KVStoreEntry` interface takes a `KVStoreEntry` stream and reads it to completion. It returns a promise that resolves with a `String`. The `KVStoreEntry `is always decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a `String`."
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/logger/Logger/Logger.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\nimport {Fiddle} from '@site/src/components/fiddle';\n\n# `Logger()`\n\nThe **`Logger` constructor** lets you connect your Fastly Compute application to a [Fastly Named Logger](https://developer.fastly.com/learning/integrations/logging/).\n\n**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew Logger(name)\n```\n\n> **Note:** `Logger()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - The Fastly Logger which should be associated with this Logger instance\n  \n### Return value\n\nA new `Logger` object.\n\n## Examples\n\nIn this example we have a create a logger named `\"splunk\"` and logs the incoming request method and destination.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Logger Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nasync function app (event) {\n  let logger = new Logger(\"splunk\");\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nasync function app (event) {\n  let logger = new Logger(\"splunk\");\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/logger/Logger/prototype/log.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\nimport {Fiddle} from '@site/src/components/fiddle';\n\n# Logger.prototype.log\n\n▸ **log**(): `string`\n\nSends the given message, converted to a string, to this Logger instance's endpoint.\n\n## Syntax\n\n```js\nlog(message)\n```\n\n### Return value\n\n`undefined`.\n\n## Description\n\nSend the given message, converted to a string, to this Logger instance's endpoint.\n\nThe `log()` method requires its `this` value to be a [`Logger`](../Logger.mdx) object.\n\nIf the `this` value does not inherit from `Logger.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n## Examples\n\nIn this example we have a create a logger named `\"splunk\"` and logs the incoming request method and destination.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Logger.prototype.log Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nasync function app (event) {\n  let logger = new Logger(\"splunk\");\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nasync function app (event) {\n  let logger = new Logger(\"splunk\");\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/migration-guide/index.mdx",
    "content": "---\nsidebar_position: 1\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `Migrating from v1 to v2`\n\n## ObjectStore renamed to KVStore\n\nWe have renamed the `ObjectStore` class to `KVStore`, and the module name from `fastly:object-store` to `fastly:kv-store`.\n\nYou will need to update your code to use the new class name and module name.\n\nBelow is the change that would need to be made for the imported module name:\n```diff\n- import { ObjectStore } from 'fastly:object-store';\n+ import { KVStore } from 'fastly:kv-store';\n```\n\nAnd this is the change that would need to be made for constructing an instance of the class:\n```diff\n- const store = new ObjectStore('my-store');\n+ const store = new KVStore('my-store');\n```\n\n\nHere is a full example of migrating an application from ObjectStore to KVStore:\n```diff\n/// <reference types=\"@fastly/js-compute\" />\n\n- import { ObjectStore } from 'fastly:object-store';\n+ import { KVStore } from 'fastly:kv-store';\n\nasync function app(event) {\n-   const files = new ObjectStore('files');\n+   const files = new KVStore('files');\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n```"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/secret-store/SecretStore/SecretStore.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `SecretStore()`\n\nThe **`SecretStore` constructor** lets you connect your Fastly Compute application to a Fastly Secret store.\n\nA secret store is a persistent, globally distributed store for secrets accessible to Fastly Compute services during request processing.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew SecretStore(name)\n```\n\n> **Note:** `SecretStore()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - The Fastly Secret Store which should be associated with this SecretStore instance\n  \n### Return value\n\nA new `SecretStore` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Secret Store exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name contains characters other than letters, numbers, dashes (-), underscores (_), and periods (.)\n\n## Examples\n\nIn this example we connect to a Secret Store named `'secrets'` and retrieve a secret named `'cat-api-key'` use the value in a Request header.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SecretStore } from \"fastly:secret-store\";\n\nasync function app(event) {\n  const secrets = new SecretStore('secrets')\n\n  const catApiKey = await secrets.get('cat-api-key')\n\n  return fetch('/api/cat', {\n    headers: {\n      'cat-api-key': catApiKey.plaintext()\n    }\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/secret-store/SecretStore/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SecretStore.prototype.get\n\n▸ **get**(): `string`\n\nGets the value associated with the key `key` in the Secret store.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the Secret Store.\n\n### Return value\n\nIf the key does not exist in the Secret Store, this returns a `Promise` which resolves with `null`.\n\nIf the key does exist in the Secret Store, this returns a `Promise` which resolves with an `SecretStoreEntry`.\n\n## Description\n\nSend the given message, converted to a string, to this SecretStore instance's endpoint.\n\nThe `get()` method requires its `this` value to be a [`SecretStore`](../SecretStore.mdx) object.\n\nIf the `this` value does not inherit from `SecretStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Is longer than 255 characters\n    - Contains characters other than letters, numbers, dashes (-), underscores (_), and periods (.)\n\n## Examples\n\nIn this example we connect to a Secret Store named `'secrets'` and retrieve a secret named `'cat-api-key'` use the value in a Request header.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SecretStore } from \"fastly:secret-store\";\n\nasync function app(event) {\n  const secrets = new SecretStore('secrets')\n\n  const catApiKey = await secrets.get('cat-api-key')\n\n  return fetch('/api/cat', {\n    headers: {\n      'cat-api-key': catApiKey.plaintext()\n    }\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-2.5.0/secret-store/SecretStoreEntry/prototype/plaintext.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SecretStoreEntry.prototype.plaintext\n\n▸ **plaintext**(): `string`\n\nReturns the plaintext contents of the SecretStoreEntry instance as String.\n\n## Syntax\n\n```js\nplaintext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA String\n\n### Exceptions\n\nThe `plaintext()` method requires its `this` value to be a `SecretStoreEntry` object.\nIf the `this` value does not inherit from `SecretStoreEntry.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n## Examples\n\nIn this example we connect to a Secret Store named `'secrets'` and retrieve a secret named `'cat-api-key'` use the value in a Request header.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SecretStore } from \"fastly:secret-store\";\n\nasync function app(event) {\n  const secrets = new SecretStore('secrets')\n\n  const catApiKey = await secrets.get('cat-api-key')\n\n  return fetch('/api/cat', {\n    headers: {\n      'cat-api-key': catApiKey.plaintext()\n    }\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/acl/Acl/open.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Acl.open()\n\nOpens the ACL with the given name, returning a new `Acl` instance with the given name on success.\n\n## Syntax\n\n```js\nAcl.open(name)\n```\n\n### Return value\n\nAn `Acl` instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/acl/Acl/prototype/lookup.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Acl.prototype.lookup()\n\nThe **`lookup(ipAddress)`** method returns the name associated with the `Acl` instance.\n\n## Syntax\n\n```js\nacl.lookup(ipAddress)\n```\n\n### Parameters\n\n- `ipAddress` _: string_\n  - IPv4 or IPv6 address to lookup\n\n### Return value\n\nAn Object of the form `{ action: 'ALLOW' | 'BlOCK', prefix: string }`, where `prefix` is the IP\naddress prefix that was matched in the ACL.\n\n## Example\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Acl } from 'fastly:acl';\naddEventListener('fetch', async (evt) => {\n  const myAcl = Acl.open('myacl');\n  const match = await myAcl.lookup(evt.client.address);\n  evt.respondWith(new Response(match?.action === 'BLOCK' ? 'blocked' : 'allowed'));\n});\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/backend/Backend/Backend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Backend()`\n\nThe **`Backend` constructor** lets you dynamically create new [Fastly Backends](https://developer.fastly.com/reference/api/services/backend/) for your Fastly Compute service.\n\n>**Note**: Dynamic backends are by default disabled at the Fastly service level. Contact [Fastly Support](https://support.fastly.com/hc/en-us/requests/new?ticket_form_id=360000269711) to request dynamic backends on Fastly Services.\n\nTo disable the usage of dynamic backends, see [enforceExplicitBackends](../enforceExplicitBackends.mdx).\n\n## Syntax\n\n```js\nnew Backend(backendConfiguration)\n```\n\n> **Note:** `Backend()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `backendConfiguration`\n\n  - : An Object which contains all the configuration options to apply to the newly created Backend.\n\n    - `name` _: string_\n      - The name of the backend.\n      - The name has to be between 1 and 254 characters inclusive.\n      - The name can be whatever you would like, as long as it does not match the name of any of the static service backends nor match any other dynamic backends built during a single execution of the application.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n    - `target` _: string_\n      - A hostname, IPv4, or IPv6 address for the backend as well as an optional port.\n      - The target has to be at-least 1 character.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. Is null, undefined, an empty string, not a valid IP address or host, or is the string `::`\n    - `hostOverride` _: string_ _**optional**_\n      - If set, will force the HTTP Host header on connections to this backend to be the supplied value.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `connectTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for a connection to this backend to be established.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `firstByteTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `betweenBytesTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend.\n      - If exceeded, the response received so far will be considered complete and the fetch will end.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `useSSL` _: boolean_ _**optional**_\n      - Whether or not to require TLS for connections to this backend.\n    - `dontPool` _: boolean_ _**optional**_\n      - Determine whether or not connections to the same backend should be pooled across different sessions.\n      - Fastly considers two backends “the same” if they're registered with the same name and the exact same settings.\n      - In those cases, when pooling is enabled, if Session 1 opens a connection to this backend it will be left open, and can be re-used by Session 2.\n      - This can help improve backend latency, by removing the need for the initial network / TLS handshake(s).\n      - By default, pooling is enabled for dynamic backends.\n    - `tlsMinVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Minimum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `tlsMaxVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Maximum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `certificateHostname` _: string_ _**optional**_\n      - Define the hostname that the server certificate should declare.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `caCertificate` _: string_ _**optional**_\n      - The CA certificate to use when checking the validity of the backend.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `ciphers` _: string_ _**optional**_\n      - List of OpenSSL ciphers to support for connections to this origin.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - [List of ciphers supported by Fastly](https://developer.fastly.com/learning/concepts/routing-traffic-to-fastly/#use-a-tls-configuration).\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `sniHostname` _: string_ _**optional**_\n      - The SNI hostname to use on connections to this backend.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `clientCertificate` _: object_ _**optional**_\n      - The client certificate to provide for the TLS handshake\n      - `certificate` _: string_\n        - The PEM certificate string.\n      - `key` _: SecretStoreEntry_\n        - The `SecretStoreEntry` to use for the key, created via [`SecretStore.prototype.get`](../../fastly:secret-store/SecretStore/prototype/get.mdx) or alteratively via [`SecretStore.fromBytes`](../../fastly:secret-store/SecretStore/fromBytes.mdx).\n    - `httpKeepalive` _: number_ _**optional**_\n      - Enable HTTP keepalive, setting the timout in milliseconds.\n    - `tcpKeepalive` _: boolean | object_ _**optional**_\n      - Enable TCP keepalive. When an object, optionally setting the keepalive configuration options.\n      - `timeSecs` _: number_ _**optional**_\n        - Configure how long to wait after the last sent data over the TCP connection before starting to send TCP keepalive probes.\n      - `intervalSecs` _: number_ _**optional**_\n        - Configure how long to wait between each TCP keepalive probe sent to the backend to determine if it is still active.\n      - `probes` _: number_ _**optional**_\n        - Number of probes to send to the backend before it is considered dead.\n    - `grpc` _: boolean_ _**optional**_\n      - **_Experimental feature_**\n      - When enabled, sets that this backend is to be used for gRPC traffic. \n      - _Warning: When using this experimental feature, no guarantees are provided for behaviours for backends that do not provide gRPC traffic._\n\nAll optional generic options can have their defaults set via [`setDefaultDynamicBackendConfig()`](../setDefaultDynamicBackendConfig.mdx).\n\nThis includes all configuration options above except for `name`, `target`, `hostOverride`, `sniHostname` and `grpc`.\n\n### Return value\n\nA new `Backend` object.\n\n## Examples\n\nIn this example an explicit Dynamic Backend is created and supplied to the fetch request, the response is then returned to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Explicit Dynamic Backend Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\",\n    connectTimeout: 1000,\n    firstByteTimeout: 15000,\n    betweenBytesTimeout: 10000,\n    useSSL: true,\n    tlsMinVersion: 1.3,\n    tlsMaxVersion: 1.3,\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\",\n    connectTimeout: 1000,\n    firstByteTimeout: 15000,\n    betweenBytesTimeout: 10000,\n    useSSL: true,\n    tlsMinVersion: 1.3,\n    tlsMaxVersion: 1.3,\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/backend/Backend/exists.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.exists()\n\nThe **`Backend.exists()`** method returns a boolean indicating if a Backend with the given name exists or not.\n\n## Syntax\n\n```js\nexists(name)\n```\n\n### Return value\n\nA boolean indicating if a Backend with the given name exists or not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/backend/Backend/fromName.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.fromName()\n\nReturns the `Backend` instance with the given name, if one exists. If one does not exist, an error is thrown.\n\n## Syntax\n\n```js\nfromName(name)\n```\n\n### Return value\n\nA `Backend` instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/backend/Backend/health.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.health()\n\n:::info\n\nThis method is deprecated, use [`Backend.prototype.health`](./prototype/health.mdx) instead.\n\n:::\n\nThe **`Backend.health()`** method returns a string representing the health of the given Backend instance.\n\n## Syntax\n\n```js\nBackend.health(backend)\n```\n\n### Return value\n\nA string representing the health of the specified Backend value.\n\nPossible values are:\n- `\"healthy\"` - The backend's health check has succeeded, indicating the backend is working as expected and should receive requests.\n- `\"unhealthy\"` - The backend's health check has failed, indicating the backend is not working as expected and should not receive requests.\n- `\"unknown\"` - The backend does not have a health check configured.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/backend/Backend/prototype/betweenBytesTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.betweenBytesTimeout\n\nThe read-only **`betweenBytesTimeout`** property of a `Backend` instance is an integer number\nproviding the between bytes timeout for this backend in milliseconds.\n\nWhen not set or in environments that do not support this property (such as Viceroy), `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/backend/Backend/prototype/connectTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.connectTimeout\n\nThe read-only **`connectTimeout`** property of a `Backend` instance is an integer number\nproviding the connect timeout for this backend in milliseconds.\n\nWhen not set or in environments that do not support this property (such as Viceroy), `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/backend/Backend/prototype/firstByteTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.firstByteTimeout\n\nThe read-only **`firstByteTimeout`** property of a `Backend` instance is an integer number\nproviding the first byte timeout for this backend in milliseconds.\n\nWhen not set or in environments that do not support this property (such as Viceroy), `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/backend/Backend/prototype/health.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.prototype.health()\n\nThe **`Backend.prototype.health()`** method returns a string representing the health of the given Backend instance.\n\n## Syntax\n\n```js\nhealth()\n```\n\n### Return value\n\nA string representing the health of the specified Backend value.\n\nPossible values are:\n- `\"healthy\"` - The backend's health check has succeeded, indicating the backend is working as expected and should receive requests.\n- `\"unhealthy\"` - The backend's health check has failed, indicating the backend is not working as expected and should not receive requests.\n- `\"unknown\"` - The backend does not have a health check configured.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/backend/Backend/prototype/hostOverride.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.hostOverride\n\nThe read-only **`hostOverride`** property of a `Backend` instance is the host header\noverride string used when sending requests to this backend.\n\n## Value\n\nA `string`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/backend/Backend/prototype/httpKeepaliveTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.httpKeepaliveTime\n\nThe read-only **`httpKeepaliveTime`** property of a `Backend` instance is the HTTP keepalive\ntime for this backend in milliseconds, or 0 if no keepalive is set.\n\n## Value\n\nA `number`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/backend/Backend/prototype/isDynamic.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.isDynamic\n\nThe read-only **`isDynamic`** property of a `Backend` instance is a boolean\nindicating if the backend was dynamically created for this service.\n\n## Value\n\nA `boolean`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/backend/Backend/prototype/isSSL.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.isSSL\n\nThe read-only **`isSSL`** property of a `Backend` instance is a boolean\nindicating if the backend is using an SSL connection.\n\n## Value\n\nA `boolean`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/backend/Backend/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# name\n\nThe read-only **`name`** property of the backend returns the backend name string.\n\n## Value\n\nA `string`.\n\n## Description\n\nProvides the name of the backend.\n\n## Examples\n\n### Using name\n\nThe following example logs the string value of a [Backend](../Backend.mdx) object:\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Backend.prototype.name Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\\\"@fastly/js-compute\\\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.name); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.name); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/backend/Backend/prototype/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.port\n\nThe read-only **`port`** property of a `Backend` instance is the port number\nof this backend.\n\n## Value\n\nA `number`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/backend/Backend/prototype/target.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.target\n\nThe read-only **`target`** property of a `Backend` instance is the host string\nthis backend is configured to use.\n\n## Value\n\nA `string`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/backend/Backend/prototype/tcpKeepalive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.tcpKeepalive\n\nThe read-only **`tcpKeepalive`** property of a `Backend` instance returns an object providing\nthe TCP keepalive configuration, if any, otherwise returning `null` if TCP keepalive is not enabled.\n\nThis object has the following properties:\n- `timeSecs` _: number or null._\n  - Configure how long to wait after the last sent data over the TCP connection before starting to send TCP keepalive probes.\n- `intervalSecs` _: number or null._\n  - Configure how long to wait between each TCP keepalive probe sent to the backend to determine if it is still active.\n- `probes` _: number or null._\n  - Number of probes to send to the backend before it is considered dead.\n\n## Value\n\nA `Object` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/backend/Backend/prototype/tlsMaxVersion.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.tlsMaxVersion\n\nThe read-only **`tlsMaxVersion`** property of a `Backend` instance is the max TLS version\nit is configured to use, as a number, either `1.0`, `1.1`, `1.2`, or `1.3`.\n\nWhen not used, or for environments that do not support this feature, such as Viceroy, `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/backend/Backend/prototype/tlsMinVersion.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.tlsMinVersion\n\nThe read-only **`tlsMinVersion`** property of a `Backend` instance is the max TLS version\nit is configured to use, as a number, either `1.0`, `1.1`, `1.2`, or `1.3`.\n\nWhen not used, or for environments that do not support this feature, such as Viceroy, `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/backend/Backend/prototype/toName.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.prototype.toName()\n\n:::info\n\nThis method is deprecated, use [`Backend.prototype.name`](./name.mdx) instead.\n\n:::\n\nThe **`toName()`** method returns the name associated with the `Backend` instance.\n\n## Syntax\n\n```js\ntoName()\n```\n\n### Return value\n\nA string which contains the name of the Backend.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/backend/Backend/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# toString\n\n:::info\n\nThis method is deprecated, use [`Backend.prototype.name`](./name.mdx) instead.\n\n:::\n\nThe **`toString()`** method returns a string representing the specified Backend value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified Backend value.\n\n## Description\n\nThe [Backend](../Backend.mdx) object overrides the `toString()` method of [Object](../../../globals//Object/Object.mdx); it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For [Backend](../Backend.mdx) values, the `toString` method returns the name given to the [Backend](../Backend.mdx) object during construction.\n\nThe `toString()` method requires its `this` value to be a [Backend](../Backend.mdx) object.\n\nIf the `this` value does not inherit from `Backend.prototype`, a [TypeError](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n## Examples\n\n### Using toString()\n\nThe following example logs the string value of a [Backend](../Backend.mdx) object:\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Backend.prototype.toString Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\\\"@fastly/js-compute\\\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.toString()); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.toString()); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/backend/allowDynamicBackends.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# allowDynamicBackends\n\n:::info\n\nThis method is deprecated, and dynamic backends are now always supported when enabled at the service level. See [`enforceExplicitBackends`](./enforceExplicitBackends.mdx) instead.\n\n:::\n\nThe **`allowDynamicBackends()`** function is used to control whether or not Dynamic Backends should be allowed within this Fastly Compute Service.\n\nBy default, Dynamic Backends are enabled, but can be a potential security concern since third-party JavaScript code may send arbitrary requests, potentially including sensitive/secret data, off to destinations that the JavaScript project was not intending.\n\nUsing `allowDynamicBackends(false)` this security property can be restored to only use explicit backend definitions.\n\n>**Note**: By default, while dynamic backends are allowed in the SDK, they are by default disabled at the Fastly service level.\n\n## Syntax\n\n```js\nallowDynamicBackends(enabledOrConfig)\n```\n\n### Parameters\n\n- `enabled` _: boolean_\n  - Whether or not to allow Dynamic Backends\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/backend/enforceExplicitBackends.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# enforceExplicitBackends\n\nCall this function to enforce the security property of explicitly-defined backends, even when dynamic backends are enabled at\nthe Fastly service level.\n\nBy default, if dynamic backends are supported for the Fastly service, they will be automatically used when creating a new\n`fetch()` request. This default behaviour for dynamic backends can be a potential security concern since third-party JavaScript\ncode may send arbitrary requests, including sensitive/secret data, off to destinations that the JavaScript project was not\nintending.\n\nWhen calling this function, an optional default backend name can be provided.\n\n>**Note**: This is a separate option to the service-level dynamic backend support for Fastly services, which is by deault disabled for Fastly services.\n\nThe **`enforceExplicitBackends()`** function is used to control whether or not Dynamic Backends should be allowed within this Fastly Compute Service.\n\nBy default, Dynamic Backends are enabled, but can be a potential security concern since third-party JavaScript code may send arbitrary requests, potentially including sensitive/secret data, off to destinations that the JavaScript project was not intending.\n\nUsing `allowDynamicBackends(false)` this security property can be restored to only use explicit backend definitions.\n\n>**Note**: Dynamic Backends are disabled by default for Fastly Services. Please contact [Fastly Support](https://support.fastly.com/hc/requests/new?ticket_form_id=360000269711) to request the feature be enabled or disabled on Fastly Services.\n\n## Syntax\n\n```js\nenforceExplicitBackends(defaultBackend?)\n```\n\n### Parameters\n\n- `defaultBackend` _: string_ _**optional**_\n  - An optional default backend string name to use in `fetch()` requests.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/backend/setDefaultDynamicBackendConfig.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# setDefaultDynamicBackendConfig()\n\nThe **`setDefaultDynamicBackendConfig()`** allows setting backend configuration defaults that should apply to any newly created dynamic backends via the `new Backend()` constructor.\n\n### Parameters\n\n- `defaultDynamicBackendConfig`\n\n  - : An Object which contains the generic configuration options to apply to newly created Backends.\n    - `connectTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for a connection to this backend to be established.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `firstByteTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `betweenBytesTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend.\n      - If exceeded, the response received so far will be considered complete and the fetch will end.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `useSSL` _: boolean_ _**optional**_\n      - Whether or not to require TLS for connections to this backend.\n    - `dontPool` _: boolean_ _**optional**_\n      - Determine whether or not connections to the same backend should be pooled across different sessions.\n      - Fastly considers two backends “the same” if they're registered with the same name and the exact same settings.\n      - In those cases, when pooling is enabled, if Session 1 opens a connection to this backend it will be left open, and can be re-used by Session 2.\n      - This can help improve backend latency, by removing the need for the initial network / TLS handshake(s).\n      - By default, pooling is enabled for dynamic backends.\n    - `tlsMinVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Minimum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `tlsMaxVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Maximum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `certificateHostname` _: string_ _**optional**_\n      - Define the hostname that the server certificate should declare.\n      - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `caCertificate` _: string_ _**optional**_\n      - The CA certificate to use when checking the validity of the backend.\n      - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `ciphers` _: string_ _**optional**_\n      - List of OpenSSL ciphers to support for connections to this origin.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - [List of ciphers supported by Fastly](https://developer.fastly.com/learning/concepts/routing-traffic-to-fastly/#use-a-tls-configuration).\n      - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `clientCertificate` _: object_ _**optional**_\n      - The client certificate to provide for the TLS handshake\n      - `certificate` _: string_\n        - The PEM certificate string.\n      - `key` _: SecretStoreEntry_\n        - The `SecretStoreEntry` to use for the key, created via [`SecretStore.prototype.get`](../fastly:secret-store/SecretStore/prototype/get.mdx) or alteratively via [`SecretStore.fromBytes`](../fastly:secret-store/SecretStore/fromBytes.mdx).\n    - `httpKeepalive` _: number_ _**optional**_\n      - Enable HTTP keepalive, setting the timout in milliseconds.\n    - `tcpKeepalive` _: boolean | object_ _**optional**_\n      - Enable TCP keepalive. When an object, optionally setting the keepalive configuration options.\n      - `timeSecs` _: number_ _**optional**_\n        - Configure how long to wait after the last sent data over the TCP connection before starting to send TCP keepalive probes.\n      - `intervalSecs` _: number_ _**optional**_\n        - Configure how long to wait between each TCP keepalive probe sent to the backend to determine if it is still active.\n      - `probes` _: number_ _**optional**_\n        - Number of probes to send to the backend before it is considered dead.\n\n## Syntax\n\n```js\nsetDefaultDynamicBackendConfig(defaultConfig)\n```\n\n### Return value\n\nNone.\n\n## Examples\n\nIn this example an explicit Dynamic Backend is created and supplied to the fetch request, with timeouts and TLS options provided from the default backend configuration options.\n\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Explicit Dynamic Backend Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nimport { Backend, setDefaultDynamicBackendConfig } from \"fastly:backend\";\nallowDynamicBackends(true);\nsetDefaultDynamicBackendConfig({\n  connectTimeout: 1000,\n  firstByteTimeout: 15_000,\n  betweenBytesTimeout: 10_000,\n  useSSL: true,\n  sslMinVersion: 1.3,\n  sslMaxVersion: 1.3\n});\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  // Timeouts and TLS configuration still get set from the default backend configuration above.\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\"\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nimport { Backend } from \"fastly:backend\";\nallowDynamicBackends(true);\nsetDefaultDynamicBackendConfig({\n  connectTimeout: 1000,\n  firstByteTimeout: 15_000,\n  betweenBytesTimeout: 10_000,\n  useSSL: true,\n  sslMinVersion: 1.3,\n  sslMaxVersion: 1.3\n});\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\"\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/cache/CacheEntry/age.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.age\n\nThe **`age`** method of the `CacheEntry` interface returns the current age in milliseconds of the cached item.\n\n## Syntax\n\n```js\nage()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the current age in milliseconds of the cached item."
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/cache/CacheEntry/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.body\n\nThe **`body`** method of the `CacheEntry` interface retrieves the cached item contents as a `ReadableStream`.\n\nOnly one stream can be active at a time for a given `CacheEntry`. An error will be thrown if a stream is already active for this `CacheEntry`.\n\n## Syntax\n\n```js\nbody(options)\n```\n\n### Parameters\n\n- `options` _: object_ __optional__\n  - `start` _: number_\n    - The offset from which to start the range.\n  - `end` _: number_\n    - How long the range should be.\n\n### Return value\n\nA `ReadableStream` which contains the cached item contents."
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/cache/CacheEntry/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.close\n\nThe **`close`** method of the `CacheEntry` interface closes the connection to the cache for this `CacheEntry`.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/cache/CacheEntry/hits.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.hits\n\nThe **`hits`** method of the `CacheEntry` interface returns the amount of cache hits for the cached item.\n\nNote: this hit count only reflects the view of the server that supplied the cached item. Due to clustering, this count may vary between potentially many servers within the data center where the item is cached. See the [clustering documentation](https://developer.fastly.com/learning/vcl/clustering/) for details, though note that the exact caching architecture of Compute is different from VCL services.\n\n## Syntax\n\n```js\nhits()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the number of cache hits to this cached item.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/cache/CacheEntry/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.length\n\nThe **`length`** method of the `CacheEntry` interface returns the size in bytes of the cached item, if known, otherwise returns `null` if the length is currently unknown.\n\nThe length of the cached item may be unknown if the item is currently being streamed into the cache without a fixed length.\n\n## Syntax\n\n```js\nlength()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` or `null` which represents the current length of the cached item.\n\n`null` is returned if the length is currently unknown."
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/cache/CacheEntry/maxAge.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.maxAge\n\nThe **`maxAge`** method of the `CacheEntry` interface returns the time in milliseconds for which the cached item is considered fresh.\n\n## Syntax\n\n```js\nmaxAge()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the time in milliseconds for which the cached item is considered fresh."
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/cache/CacheEntry/staleWhileRevalidate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.staleWhileRevalidate\n\nThe **`staleWhileRevalidate`** method of the `CacheEntry` interface returns the time in milliseconds for which a cached item can safely be used despite being considered stale.\n\n## Syntax\n\n```js\nstaleWhileRevalidate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the time in milliseconds for which a cached item can safely be used despite being considered stale."
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/cache/CacheEntry/state.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.state\n\nThe **`state`** method of the `CacheEntry` interface returns a `CacheState` instance which reflects the current state of this `CacheEntry` instance.\n\n## Syntax\n\n```js\nstate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `CacheState` instance which reflects the current state of this `CacheEntry` instance."
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/cache/CacheEntry/userMetadata.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.userMetadata\n\nThe **`userMetadata`** method of the `CacheEntry` interface returns the user-controlled metadata associated with the cached item.\n\n## Syntax\n\n```js\nuserMetadata()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nAn `ArrayBuffer` which contains the user-controlled metadata associated with the cached item."
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/cache/CacheState/found.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheState.found\n\nThe **`found`** method of the `CacheState` interface returns `true` if a cached item was located.\n\nEven if an cached item is found, the cached item might be stale and require updating. Use `mustInsertOrUpdate()` to determine whether this transaction client is expected to update the cached item.\n\n## Syntax\n\n```js\nfound()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `boolean` which represents whether a cached item was located or not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/cache/CacheState/mustInsertOrUpdate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheState.mustInsertOrUpdate\n\nThe **`mustInsertOrUpdate`** method of the `CacheState` interface returns `true` if a fresh cache item was not found, and this transaction client is expected to insert a new item or update a stale item.\n\n\n## Syntax\n\n```js\nmustInsertOrUpdate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `boolean` which represents whether a fresh cached item was found not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/cache/CacheState/stale.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheState.stale\n\nThe **`stale`** method of the `CacheState` interface returns `true` if the cached item is stale.\n\nA cached item is stale if its age is greater than its `maxAge` period.\n\n## Syntax\n\n```js\nstale()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `boolean` which represents whether the cached item is stale or not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/cache/CacheState/usable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheState.usable\n\nThe **`usable`** method of the `CacheState` interface returns `true` if the cached item is usable.\n\nA cached item is usable if its age is less than the sum of the `maxAge` and `staleWhileRevalidate` periods.\n\n## Syntax\n\n```js\nusable()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `boolean` which represents whether a cached item is usable or not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/cache/CoreCache/insert.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CoreCache.insert\n\nPerforms a non-transactional insertion into the cache, returning a `FastlyBody` instance for providing the cached object itself.\nFor the insertion to complete successfully, the object must be written into the returned `FastlyBody` instance, and then `FastlyBody.protoype.close` must be called.\nIf `FastlyBody.prototype.close` does not get called, the insertion is considered incomplete, and any concurrent lookups that may be reading from the object as it is streamed into the cache may encounter a streaming error.\n\nNote: Like `CoreCache.lookup()`, `CoreCache.insert()` may race with concurrent lookups or insertions, and will unconditionally overwrite existing cached items rather than allowing for revalidation of an existing object.\nThe transactional equivalent of this function is `TransactionCacheEntry.insert()`, which may only be called following a `CoreCache.transactionLookup()` call and the returned `CacheEntry` when has a state where `CacheState.mustInsertOrUpdate()` returns true.\n\n## Syntax\n\n```js\ninsert(key, options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - A cache key which is a string with a length of up to 8,135 that identify a cached item.\n  - The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n- `options` _: object_\n  - `headers` _: HeadersInit_ __optional__\n    - The headers act as additional factors in object selection, and the choice of which headers to factor in is determined during insertion, via the `vary` property within `TransactionInsertOptions`.\n    - A lookup will succeed when there is at least one cached item that matches lookup’s `key`, and all of the lookup’s headers included in the cache items’ `vary` list match the corresponding headers in that cached item.\n    - A typical example is a cached HTTP response, where the request had an \"Accept-Encoding\" header. In that case, the origin server may or may not decide on a given encoding, and whether that same response is suitable for a request with a different (or missing) Accept-Encoding header is determined by whether Accept-Encoding is listed in Vary header in the origin’s response.\n    - Note: These headers are narrowly useful for implementing cache lookups incorporating the semantics of the HTTP Vary header.\n  - `maxAge` _: number_ __optional__\n    - Sets the “time to live” for the cache item in milliseconds: The time for which the item will be considered fresh.\n  - `vary` _: array_ __optional__\n    - Sets the list of headers that must match when looking up this cached item.\n  - `initialAge` _: number_ __optional__\n    - Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n    - The initial age is 0 by default.\n  - `staleWhileRevalidate` _: number_ __optional__\n    - Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n    - Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n    - The methods `CacheState.protoype.usable` and `CacheState.protoype.stale` can be used to determine the current state of an item.\n    - The stale-while-revalidate period is 0 by default.\n  - `surrogateKeys` _: array_ __optional__\n    - Sets the surrogate keys that can be used for purging this cached item.\n    - Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item’s TTL to elapse, or overwriting the item with insert().\n    - Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n    - [See the Fastly surrogate keys guide for details.](https://docs.fastly.com/en/guides/working-with-surrogate-keys)\n  - `length` _: number_ __optional__\n    - Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n    - It is preferable to provide a length, if possible.\n    - Clients that begin streaming the item’s contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n  - `userMetadata` _: ArrayBufferView | ArrayBuffer | URLSearchParams | string_ __optional__\n    - Sets the user-defined metadata to associate with the cached item.\n  - `sensitive` _: boolean_ __optional__\n    - Enable or disable PCI/HIPAA-compliant non-volatile caching.\n    - By default, this is false.\n    - [See the Fastly PCI-Compliant Caching and Delivery documentation for details.](https://docs.fastly.com/products/pci-compliant-caching-and-delivery)\n\n### Return value\n\nReturns a `FastlyBody`.\n\n### Exceptions\n\n- If the provided `key`:\n  - Cannot be coerced to a string\n  - Is an empty string\n  - Is longer than 8135 characters\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/cache/CoreCache/lookup.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# CoreCache.lookup\n\nPerform a non-transactional lookup into the cache, returning a CacheEntry if a usable cached item was found.\nA cached item is usable if its age is less than the sum of its TTL and its stale-while-revalidate period. Items beyond that age are unusably stale.\n\nNote: A non-transactional lookup will not attempt to coordinate with any concurrent cache lookups.\nIf two instances of the service perform a lookup at the same time for the same cache key, and the item is not yet cached, they will both return `null`.\nWithout further coordination, they may both end up performing the work needed to insert() the item (which usually involves origin requests and/or computation) and racing with each other to insert.\nTo resolve such races between concurrent lookups, use `CoreCache.transactionLookup()` instead.\n\n## Syntax\n\n```js\nlookup(key, options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - A cache key which is a string with a length of up to 8,135 that identify a cached item.\n  - The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n\n- `options` _: object_\n  - `headers` _: HeadersInit_ __optional__\n    - The headers act as additional factors in object selection, and the choice of which headers to factor in is determined during insertion, via the `vary` property within `TransactionInsertOptions`.\n    - A lookup will succeed when there is at least one cached item that matches lookup’s `key`, and all of the lookup’s headers included in the cache items’ `vary` list match the corresponding headers in that cached item.\n    - A typical example is a cached HTTP response, where the request had an \"Accept-Encoding\" header. In that case, the origin server may or may not decide on a given encoding, and whether that same response is suitable for a request with a different (or missing) Accept-Encoding header is determined by whether Accept-Encoding is listed in Vary header in the origin’s response.\n    - Note: These headers are narrowly useful for implementing cache lookups incorporating the semantics of the HTTP Vary header.\n\n### Return value\n\nReturns `CacheEntry` if a usable cached item was found, otherwise returns `null`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/cache/CoreCache/transactionLookup.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# CoreCache.transactionLookup\n\nPerform a transactional lookup into the cache, returning a `TransactionCacheEntry` instance.\n\nTransactions coordinate between concurrent actions on the same cache key, incorporating concepts of [request collapsing](https://developer.fastly.com/learning/concepts/request-collapsing/) and [revalidation](https://developer.fastly.com/learning/concepts/stale/), though at a lower level that does not automatically interpret HTTP semantics.\n\nRequest Collapsing:\nIf there are multiple concurrent calls to `CoreCache.transactionLookup()` for the same item and that item is not present,\njust one of the callers will be instructed to insert the item into the cache as part of the transaction.\nThe other callers will block until the metadata for the item has been inserted, and can then begin streaming its contents out of the cache at the same time that the inserting caller streams them into the cache.\n\nRevalidation:\nSimilarly, if an item is usable but stale, and multiple callers attempt a `CoreCache.transactionLookup()` concurrently, they will all be given access to the stale item, but only one will be designated to perform an asynchronous update (or insertion) to freshen the item in the cache.\n\n## Syntax\n\n```js\ntransactionLookup(key, options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - A cache key which is a string with a length of up to 8,135 that identify a cached item.\n  - The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n\n- `options` _: object_\n  - `headers` _: HeadersInit_ __optional__\n    - The headers act as additional factors in object selection, and the choice of which headers to factor in is determined during insertion, via the `vary` property within `TransactionInsertOptions`.\n    - A lookup will succeed when there is at least one cached item that matches lookup’s `key`, and all of the lookup’s headers included in the cache items’ `vary` list match the corresponding headers in that cached item.\n    - A typical example is a cached HTTP response, where the request had an \"Accept-Encoding\" header. In that case, the origin server may or may not decide on a given encoding, and whether that same response is suitable for a request with a different (or missing) Accept-Encoding header is determined by whether Accept-Encoding is listed in Vary header in the origin’s response.\n    - Note: These headers are narrowly useful for implementing cache lookups incorporating the semantics of the HTTP Vary header.\n\n### Return value\n\nReturns an instance of `TransactionCacheEntry`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/cache/SimpleCache/SimpleCache.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `SimpleCache`\n\nThe **`SimpleCache` class** provides a simplified interface to inserting and retrieving entries from Fastly's Cache.\n\nAll the methods on the class are static methods, there are no instance methods.\n\n\n## Examples\n\nIn this example we attempt to retrieve an entry from the Fastly Cache, if the entry does not exist, we create the content and insert it into the Fastly Cache before finally returning.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const path = new URL(event.request.url).pathname;\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/cache/SimpleCache/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCache.get\n\n▸ **get**(): `string`\n\nGets the entry associated with the key `key` from the cache.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the cache.\n\n### Return value\n\nIf the key does not exist in the cache, this returns `null`.\n\nIf the key does exist in the cache, this returns a `SimpleCacheEntry`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n## Examples\n\nIn this example we attempt to retrieve an entry from the Fastly Cache, and return a message stating whether the entry was in the Fastly Cache or not.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const path = new URL(event.request.url).pathname;\n  let page = SimpleCache.get(path);\n  return new Response(page ? `${path} is in the cache` : `${path} is not in the cache`, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/cache/SimpleCache/getOrSet.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCache.getOrSet\n\nThe **`getOrSet()`** method attempts to get an entry from the cache for the supplied `key`. If no entry is found (or has expired), the supplied `set` function is executed and its result is inserted into the cache under the supplied `key` and for the supplied `ttl` (Time-To-Live) duration, provided in seconds.\n\n## Syntax\n\n```js\ngetOrSet(key, set)\ngetOrSet(key, set, length)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to lookup and/or store the supplied entry under within the cache.\n- `set` _:  Function_\n  - The function to execute if and only if the cache does not have a usable entry for the supplied `key`.\n    The function should return a Promise which resolves with the following interface:\n    - `value` _:  ArrayBuffer | TypedArray | DataView | ReadableStream | URLSearchParams | String | string literal_\n      - The value to store within the cache.\n    - `ttl` _: number_\n      - The maximum number of seconds to store the supplied entry in the cache.\n    - `length` _: number_ __optional__\n      - The length of the value being stored within the cache. This is only used when the `value` is a `ReadableStream`.\n\n### Return value\n\nReturns a `SimpleCacheEntry`.\n\n### Exceptions\n\n- If the provided `key`:\n  - Cannot be coerced to a string\n  - Is an empty string\n  - Is longer than 8135 characters\n- If the provided `ttl`:\n  - Cannot be coerced to a number\n  - Is a negative number\n  - Is `NaN`\n  - Is Inifinity\n\n## Examples\n\nIn this example we attempt to retrieve an entry from the Fastly Cache. If the entry does not exist, we create the content and insert it into the Fastly Cache before finally returning.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const path = new URL(event.request.url).pathname;\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/cache/SimpleCache/purge.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# SimpleCache.purge\n\npurge the entry associated with the key `key` from the cache.\n\n## Syntax\n\n```js\npurge(key, options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to purge from within the cache.\n\n- `options` _: object_\n  - `scope` _: string_\n    - : Where to purge the content from.\n    - Possible values are:\n      - \"global\" - This will remove the content from all of Fastly.\n      - \"pop\" - This will remove the content from the POP that contains the currently executing instance.\n\n### Return value\n\nReturns `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n## Examples\n\nIn this example, when a request contains a `purge` querystring parameter, we purge the an entry from the cache.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const url = new URL(event.request.url);\n  const path = url.pathname;\n  if (url.searchParams.has('purge')) {\n    SimpleCache.purge(path, { scope: \"global\" });\n    return new Response(page, { status: 204 });\n  }\n\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/cache/SimpleCacheEntry/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the `SimpleCacheEntry` interface\ntakes the instance's stream and reads it to completion. It returns a promise\nthat resolves with an `ArrayBuffer`.\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an `ArrayBuffer`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/cache/SimpleCacheEntry/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.body\n\nThe **`body`** read-only property of the `SimpleCacheEntry` interface is a `ReadableStream` of the instance's contents.\n\n## Value\n\nA `ReadableStream`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/cache/SimpleCacheEntry/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.bodyUsed\n\nThe **`bodyUsed`** read-only property of the `SimpleCacheEntry` interface is a boolean value that indicates whether the body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/cache/SimpleCacheEntry/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.json()\n\nThe **`json()`** method of the `SimpleCacheEntry` interface takes\na `SimpleCacheEntry` stream and reads it to completion. It returns a promise which\nresolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a JavaScript object. This object could be\nanything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/cache/SimpleCacheEntry/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.text()\n\nThe **`text()`** method of the `SimpleCacheEntry` interface takes the instance's stream and reads it to completion.\nIt returns a promise that resolves with a `String`.\nThe result is _always_ decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Promise that resolves with a `String`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/cache/TransactionCacheEntry/age.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.age\n\nThe **`age`** method of the `TransactionCacheEntry` interface returns the current age in milliseconds of the cached item.\n\n## Syntax\n\n```js\nage()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the current age in milliseconds of the cached item."
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/cache/TransactionCacheEntry/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.body\n\nThe **`body`** method of the `TransactionCacheEntry` interface retrieves the cached item contents as a `ReadableStream`.\n\nOnly one stream can be active at a time for a given `TransactionCacheEntry`. An error will be thrown if a stream is already active for this `TransactionCacheEntry`.\n\n## Syntax\n\n```js\nbody(options)\n```\n\n### Parameters\n\n- `options` _: object_ __optional__\n  - `start` _: number_\n    - The offset from which to start the range.\n  - `end` _: number_\n    - How long the range should be.\n\n### Return value\n\nA `ReadableStream` which contains the cached item contents."
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/cache/TransactionCacheEntry/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.cancel\n\nThe **`cancel`** method of the `TransactionCacheEntry` interface cancels an obligation to provide an object to the cache.\n\n\n## Syntax\n\n```js\ncancel()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/cache/TransactionCacheEntry/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.close\n\nThe **`close`** method of the `TransactionCacheEntry` interface closes the connection to the cache for this `TransactionCacheEntry`.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/cache/TransactionCacheEntry/hits.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.hits\n\nThe **`hits`** method of the `TransactionCacheEntry` interface returns the amount of cache hits for the cached item.\n\nNote: this hit count only reflects the view of the server that supplied the cached item. Due to clustering, this count may vary between potentially many servers within the data center where the item is cached. See the [clustering documentation](https://developer.fastly.com/learning/vcl/clustering/) for details, though note that the exact caching architecture of Compute is different from VCL services.\n\n## Syntax\n\n```js\nhits()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the number of cache hits to this cached item.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/cache/TransactionCacheEntry/insert.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.insert\n\nPerform a transactional cache insertion, returning a `FastlyBody` instance for providing the cached object itself.\n\nThis method should only be called when `TransactionCacheEntry.state().mustInsertOrUpdate()` is true; otherwise, an error will be thrown when attempting to perform the insertion.\n\n## Syntax\n\n```js\ninsert(options)\n```\n\n### Parameters\n\n- `options` _: object_\n  - `maxAge` _: number_ __optional__\n    - Sets the “time to live” for the cache item in milliseconds: The time for which the item will be considered fresh.\n  - `vary` _: array_ __optional__\n    - Sets the list of headers that must match when looking up this cached item.\n  - `initialAge` _: number_ __optional__\n    - Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n    - The initial age is 0 by default.\n  - `staleWhileRevalidate` _: number_ __optional__\n    - Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n    - Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n    - The methods `CacheState.protoype.usable` and `CacheState.protoype.stale` can be used to determine the current state of an item.\n    - The stale-while-revalidate period is 0 by default.\n  - `surrogateKeys` _: array_ __optional__\n    - Sets the surrogate keys that can be used for purging this cached item.\n    - Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item’s TTL to elapse, or overwriting the item with insert().\n    - Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n    - [See the Fastly surrogate keys guide for details.](https://docs.fastly.com/en/guides/working-with-surrogate-keys)\n  - `length` _: number_ __optional__\n    - Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n    - It is preferable to provide a length, if possible.\n    - Clients that begin streaming the item's contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n  - `userMetadata` _: ArrayBufferView | ArrayBuffer | URLSearchParams | string_ __optional__\n    - Sets the user-defined metadata to associate with the cached item.\n  - `sensitive` _: boolean_ __optional__\n    - Enable or disable PCI/HIPAA-compliant non-volatile caching.\n    - By default, this is false.\n    - [See the Fastly PCI-Compliant Caching and Delivery documentation for details.](https://docs.fastly.com/products/pci-compliant-caching-and-delivery)\n\n### Return value\n\nReturns a `FastlyBody`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/cache/TransactionCacheEntry/insertAndStreamBack.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.insertAndStreamBack\n\nPerform a transaction cache insertion, returning a `FastlyBody` instance for providing the cached object itself, and a `CacheEntry` instance which can be used to stream out the newly-inserted cache item.\n\nFor the insertion to complete successfully, the object must be written into the returned `FastlyBody` instance, and then `FastlyBody.protoype.close` must be called.\nIf `FastlyBody.prototype.close` does not get called, the insertion is considered incomplete, and any concurrent lookups that may be reading from the object as it is streamed into the cache may encounter a streaming error.\n\n## Syntax\n\n```js\ninsertAndStreamBack(options)\n```\n\n### Parameters\n\n- `options` _: object_\n  - `maxAge` _: number_ __optional__\n    - Sets the “time to live” for the cache item in milliseconds: The time for which the item will be considered fresh.\n  - `vary` _: array_ __optional__\n    - Sets the list of headers that must match when looking up this cached item.\n  - `initialAge` _: number_ __optional__\n    - Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n    - The initial age is 0 by default.\n  - `staleWhileRevalidate` _: number_ __optional__\n    - Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n    - Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n    - The methods `CacheState.protoype.usable` and `CacheState.protoype.stale` can be used to determine the current state of an item.\n    - The stale-while-revalidate period is 0 by default.\n  - `surrogateKeys` _: array_ __optional__\n    - Sets the surrogate keys that can be used for purging this cached item.\n    - Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item’s TTL to elapse, or overwriting the item with insert().\n    - Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n    - [See the Fastly surrogate keys guide for details.](https://docs.fastly.com/en/guides/working-with-surrogate-keys)\n  - `length` _: number_ __optional__\n    - Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n    - It is preferable to provide a length, if possible.\n    - Clients that begin streaming the item's contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n  - `userMetadata` _: ArrayBufferView | ArrayBuffer | URLSearchParams | string_ __optional__\n    - Sets the user-defined metadata to associate with the cached item.\n  - `sensitive` _: boolean_ __optional__\n    - Enable or disable PCI/HIPAA-compliant non-volatile caching.\n    - By default, this is false.\n    - [See the Fastly PCI-Compliant Caching and Delivery documentation for details.](https://docs.fastly.com/products/pci-compliant-caching-and-delivery)\n\n### Return value\n\nReturns an array where the first item is a `FastlyBody` instance and the second item is a `CacheEntry` instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/cache/TransactionCacheEntry/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.length\n\nThe **`length`** method of the `TransactionCacheEntry` interface returns the size in bytes of the cached item, if known, otherwise returns `null` if the length is currently unknown.\n\nThe length of the cached item may be unknown if the item is currently being streamed into the cache without a fixed length.\n\n## Syntax\n\n```js\nlength()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` or `null` which represents the current length of the cached item.\n\n`null` is returned if the length is currently unknown."
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/cache/TransactionCacheEntry/maxAge.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.maxAge\n\nThe **`maxAge`** method of the `TransactionCacheEntry` interface returns the time in milliseconds for which the cached item is considered fresh.\n\n## Syntax\n\n```js\nmaxAge()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the time in milliseconds for which the cached item is considered fresh."
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/cache/TransactionCacheEntry/staleWhileRevalidate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.staleWhileRevalidate\n\nThe **`staleWhileRevalidate`** method of the `TransactionCacheEntry` interface returns the time in milliseconds for which a cached item can safely be used despite being considered stale.\n\n## Syntax\n\n```js\nstaleWhileRevalidate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the time in milliseconds for which a cached item can safely be used despite being considered stale."
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/cache/TransactionCacheEntry/state.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.state\n\nThe **`state`** method of the `TransactionCacheEntry` interface returns a `CacheState` instance which reflects the current state of this `TransactionCacheEntry` instance.\n\n## Syntax\n\n```js\nstate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `CacheState` instance which reflects the current state of this `TransactionCacheEntry` instance."
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/cache/TransactionCacheEntry/update.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.update\n\nPerform an update of the cache item's metadata.\n\n## Syntax\n\n```js\nupdate(options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - A cache key which is a string with a length of up to 8,135 that identify a cached item.\n  - The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n- `options` _: object_\n  - `maxAge` _: number_ __optional__\n    - Sets the “time to live” for the cache item in milliseconds: The time for which the item will be considered fresh.\n  - `vary` _: array_ __optional__\n    - Sets the list of headers that must match when looking up this cached item.\n  - `initialAge` _: number_ __optional__\n    - Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n    - The initial age is 0 by default.\n  - `staleWhileRevalidate` _: number_ __optional__\n    - Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n    - Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n    - The methods `CacheState.protoype.usable` and `CacheState.protoype.stale` can be used to determine the current state of an item.\n    - The stale-while-revalidate period is 0 by default.\n  - `surrogateKeys` _: array_ __optional__\n    - Sets the surrogate keys that can be used for purging this cached item.\n    - Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item’s TTL to elapse, or overwriting the item with insert().\n    - Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n    - [See the Fastly surrogate keys guide for details.](https://docs.fastly.com/en/guides/working-with-surrogate-keys)\n  - `length` _: number_ __optional__\n    - Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n    - It is preferable to provide a length, if possible.\n    - Clients that begin streaming the item's contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n  - `userMetadata` _: ArrayBufferView | ArrayBuffer | URLSearchParams | string_ __optional__\n    - Sets the user-defined metadata to associate with the cached item.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/cache/TransactionCacheEntry/userMetadata.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.userMetadata\n\nThe **`userMetadata`** method of the `TransactionCacheEntry` interface returns the user-controlled metadata associated with the cached item.\n\n## Syntax\n\n```js\nuserMetadata()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nAn `ArrayBuffer` which contains the user-controlled metadata associated with the cached item."
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/cache-override/CacheOverride/CacheOverride.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `CacheOverride()`\n\nThe **`CacheOverride` constructor** lets you configure the caching behavior of a `Response`.\n\nNormally, the HTTP Headers on a [`Response`](../../globals/Response/Response.mdx) would control how the [`Response`](../../globals/Response/Response.mdx) is cached,\nbut `CacheOverride` can be set on a [`Request`](../../globals/Request/Request.mdx), to define custom caching behavior.\n\n## Syntax\n\n```js\nnew CacheOverride(mode)\nnew CacheOverride(mode, init)\nnew CacheOverride(init)\n```\n\n> **Note:** `CacheOverride()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `mode` _: string_\n  - Sets the cache override mode for a request\n  - If set to:\n    - `\"none\"`: Do not override the behavior specified in the origin response’s cache control headers.\n    - `\"pass\"`: Do not cache the response to this request, regardless of the origin response’s headers.\n    - `\"override\"`: Override particular cache control settings using the `CacheOverride` object's settings.\n       This options is also the default when providing an init object directly as the first argument.\n\n- `init`\n\n  - : An Object which contains all the configuration options to apply to the newly created `CacheOverride`.\n\n    - `pci` _: boolean_ _**optional**_\n      - Override the caching behavior of this request to enable or disable PCI/HIPAA-compliant non-volatile caching.\n      - By default, this is `false`, which means the request may not be PCI/HIPAA-compliant. Set it to `true` to enable compliant caching.\n      - See the [Fastly PCI-Compliant Caching and Delivery documentation](https://docs.fastly.com/products/pci-compliant-caching-and-delivery) for details.\n\n    - `surrogateKey` _: string_ _**optional**_\n      - Override the caching behavior of this request to include the given surrogate key, provided as a header value.\n      - See the [Fastly surrogate keys guide](https://docs.fastly.com/en/guides/purging-api-cache-with-surrogate-keys) for details.\n    - `swr` _: number_ _**optional**_\n      - Override the caching behavior of this request to use the given `stale-while-revalidate` time, in seconds\n\n    - `ttl` _: number_ _**optional**_\n      - Override the caching behavior of this request to use the given Time to Live (TTL), in seconds.\n    \n    - `beforeSend` _:Function_ _**optional**_\n      - `(request: Request) => void | PromiseLike<void>`\n      - Callback to be invoked if a request is going all the way to a backend, allowing the request to be modified beforehand.\n      - See [Modifying a request as it is forwarded to a backend](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/#modifying-a-request-as-it-is-forwarded-to-a-backend) in the Fastly cache interfaces documentation for details.\n\n    - `afterSend` _: Function_ _**optional**_\n      - `(response: Response) => void | CacheOptions | PromiseLike<void | CacheOptions>`\n      - Callback to be invoked after a response has been sent, but before it is stored into the cache.\n      - Where `CacheOptions` contains:\n        - `cache` _: boolean | 'uncacheable'_ _**optional**_\n          - Whether to cache this response. By default, leaving this field empty, responses will be cached based on their cache header information.\n          - Setting this to true or false will override this default cache behaviour, setting in the cache or not setting in the cache, even if the default behaviour would have been otherwise.\n          - Setting to 'uncacheable' the response will not only not be cached, but the cache will record that the originating request led to an uncacheable response, so that future cache lookups will result in immediately going to the backend, rather than attempting to coordinate concurrent requests to reduce backend traffic.\n          - See the [Fastly request collapsing guide](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/request-collapsing/) for more details on the mechanism that `uncacheable` disables.\n        - `bodyTransformFn` _: Function_ _**optional**_\n          - `(body: Uint8Array) => Uint8Array | PromiseLike<Uint8Array>`\n          - Provide a function to be used for transforming the response body prior to caching.\n          - Body transformations are performed by specifying a transform, rather than by directly working with the body during the onAfterSend callback function, because not every response contains a fresh body: 304 Not Modified responses, which are used to revalidate a stale cached response, are valuable precisely because they do not retransmit the body.\n          - For any other response status, the backend response will contain a relevant body, and the `bodyTransformFn` will be applied to it. The original backend body is passed in to the transform function, and the function is expected to return the new body.\n      - See [Controlling cache behavior based on backend response](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/#controlling-cache-behavior-based-on-backend-response) in the Fastly cache interfaces documentation for details.\n\n### Return value\n\nA new `CacheOverride` object.\n\n## Examples\n\nIn this example we override the cache for all the requests prefixed /static/ to have a long TTL (Time To Live),  and the home page to have a short TTL and a long SWR (Stale While Revalidate).\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"CacheOverride Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { CacheOverride } from \"fastly:cache-override\";\n// In this example we override the cache for all the requests prefixed /static/ \n// to have a long TTL (Time To Live), and the home page to have a short TTL and \n// a long SWR (Stale While Revalidate).\nasync function app (event) {\n  const path = (new URL(event.request.url)).pathname;\n  let cacheOverride;\n  if (path == '/') {\n    cacheOverride = new CacheOverride('override', {ttl: 10, swr: 86_400});\n  } else if (path.startsWith('/static/')) {\n    cacheOverride = new CacheOverride('override', {ttl: 86_400});\n  } else {\n    cacheOverride = new CacheOverride('none')\n  }\n  return fetch(event.request.url, {\n    cacheOverride,\n    backend: 'origin_0'\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { CacheOverride } from \"fastly:cache-override\";\n// In this example we override the cache for all the requests prefixed /static/ \n// to have a long TTL (Time To Live), and the home page to have a short TTL and \n// a long SWR (Stale While Revalidate).\nasync function app (event) {\n  const path = (new URL(event.request.url)).pathname;\n  let cacheOverride;\n  if (path == '/') {\n    cacheOverride = new CacheOverride('override', {ttl: 10, swr: 86_400});\n  } else if (path.startsWith('/static/')) {\n    cacheOverride = new CacheOverride('override', {ttl: 86_400});\n  } else {\n    cacheOverride = new CacheOverride('none')\n  }\n  return fetch(event.request.url, {\n    cacheOverride,\n    backend: 'origin_0'\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/compute/purgeSurrogateKey.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# purgeSurrogateKey\n\nThe **`purgeSurrogateKey()`** function is used to purge the given surrogate key string from Fastly's cache.\n\nThere are two purge modes: soft purge and hard purge, with hard purge as the default which clears all items\nfrom the cache immediately. When using a soft purge, stale entries are maintained in the cache, reducing\norgin load, while also enabling stale revalidations.\n\nSee the [Fastly Purge Documentation](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/purging/#surrogate-key-purge) for more information on caching and purge operations.\n\n## Syntax\n\n```js\npurgeSurrogateKey(surrogateKey, soft?)\n```\n\n### Parameters\n\n- `surrogateKey` _: string_\n  - The surrogate key string\n- `soft?` _: boolean_\n  - Enables a soft purge, retaining stale entries in the cache. Default is a hard purge.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/compute/vCpuTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# vCpuTime\n\nThe **`vCpuTime()`** function provides the vCPU time used by the current request handler in milliseconds.\n\n## Syntax\n\n```js\nvCpuTime()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`number`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/config-store/ConfigStore/ConfigStore.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `ConfigStore()`\n\nThe **`ConfigStore` constructor** lets you access a specific [Fastly Config Store](https://www.fastly.com/documentation/reference/api/services/resources/config-store/).\n\n> **Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew ConfigStore(name);\n```\n\n> **Note:** `ConfigStore()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Defines a config store instance using the resource link name.\n\n### Return value\n\nA new `ConfigStore` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Config Store exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name does not start with an ascii alphabetical character \n  - Thrown if the provided name does not contain only ascii alphanumeric, underscore, and whitespace characters\n\n## Examples\n\nIn this example we have a resource link named \"animals\" (which is linked to a config store) and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"ConfigStore Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/config-store/ConfigStore/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# ConfigStore.prototype.get\n\nThe **`get()`** method returns the value associated with the provided key in the config-store. If the provided key does not exist in the ConfigStore then this returns `null`.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from the dictionary.\n\n### Return value\n\nA `string` representing the specified ConfigStore value or `null` if the key does not exist in the ConfigStore\n\n## Description\n\nGet a value for a key in the config-store. If the provided key does not exist in the ConfigStore then this returns `null`.\n\nThe `get()` method requires its `this` value to be a [`ConfigStore`](../../../fastly%3Aconfig-store/ConfigStore/ConfigStore.mdx) object.\n\nIf the `this` value does not inherit from `ConfigStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided key is longer than 255 in length\n  - Thrown if the provided key is an empty string\n\n## Examples\n\nIn this example we have an Edge Dictionary named \"animals\" and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"ConfigStore Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/device/Device/lookup.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Device.lookup()\n\nLook up the data associated with a particular User-Agent string.\n\n\n## Syntax\n\n```js\nlookup(userAgent)\n```\n\n### Return value\n\nIf there is data associated with the User-Agent, a `Device` instance is returned.\nOtherwise, `null` is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/device/Device/prototype/brand.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.brand\n\nThe read-only **`brand`** property of the `Device` interface is\neither a string stating the brand of the device, which can be different from the manufacturer of that device.\nIf no brand is known, the value will be `null`.\n\n\n## Value\n\nEither a string value if a brand is known, otherwise `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/device/Device/prototype/hardwareType.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.hardwareType\n\nThe read-only **`hardwareType`** property of the `Device` interface is\neither a string stating the hardware type of the device, or `null` if the hardware type is not known.\n\nA string representation of the device's primary platform hardware. The most commonly used device types are also identified via boolean variables. Because a device may have multiple device types and this variable only has the primary type, we recommend using the boolean variables for logic and using this string representation for logging.\n\n\n\n## Value\n\nEither a string value if a hardware type is known, otherwise `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/device/Device/prototype/isDesktop.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isDesktop\n\nThe read-only **`isDesktop`** property of the `Device` interface is\neither a boolean stating if the device is a desktop web browser, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a desktop web browser, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/device/Device/prototype/isGameConsole.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isGameConsole\n\nThe read-only **`isGameConsole`** property of the `Device` interface is\neither a boolean stating if the device is a video game console, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a video game console, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/device/Device/prototype/isMediaPlayer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isMediaPlayer\n\nThe read-only **`isMediaPlayer`** property of the `Device` interface is\neither a boolean stating if the device is a media player (like Blu-ray players, iPod devices, and smart speakers such as Amazon Echo), or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a media player (like Blu-ray players, iPod devices, and smart speakers such as Amazon Echo), or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/device/Device/prototype/isMobile.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isMobile\n\nThe read-only **`isMobile`** property of the `Device` interface is\neither a boolean stating if the device is a mobile phone, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a mobile phone, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/device/Device/prototype/isSmartTV.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isSmartTV\n\nThe read-only **`isSmartTV`** property of the `Device` interface is\neither a boolean stating if the device is a smart TV, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a smart TV, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/device/Device/prototype/isTablet.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isTablet\n\nThe read-only **`isTablet`** property of the `Device` interface is\neither a boolean stating if the device is a tablet (like an iPad), or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a tablet (like an iPad), or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/device/Device/prototype/isTouchscreen.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isTouchscreen\n\nThe read-only **`isTouchscreen`** property of the `Device` interface is\neither a boolean stating if the device's screen is touch sensitive, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device's screen is touch sensitive, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/device/Device/prototype/model.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.model\n\nThe read-only **`model`** property of the `Device` interface is\neither a string stating the model of the device, or `null` if the model is not known.\n\n\n## Value\n\nEither a string value if a model is known, otherwise `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/device/Device/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.name\n\nThe read-only **`name`** property of the `Device` interface is\neither a string stating the name of the device, or `null` if the name is not known.\n\n\n## Value\n\nEither a string value if a name is known, otherwise `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/device/Device/prototype/toJSON.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# toJSON\n\nThe `toJSON()` method of the Device interface is a serializer;\nit returns a JSON representation of the Device object.\n\nTo get a JSON string, you can use `JSON.stringify(device)` directly; it will call `toJSON()` automatically.\n\n## Syntax\n\n```js\ntoJSON()\n```\n\n### Return value\n\nA JSON object that is the serialization of the Device object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/dictionary/Dictionary/Dictionary.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Dictionary()`\n\n:::info\n\nThis Class is deprecated\n\n:::\n\nThe **`Dictionary` constructor** lets you access a specific [Fastly Edge Dictionary](https://docs.fastly.com/en/guides/about-edge-dictionaries).\n\n**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew Dictionary(name);\n```\n\n> **Note:** `Dictionary()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - The name of the [Fastly Edge Dictionary](https://docs.fastly.com/en/guides/about-edge-dictionaries) that this `Dictionary` instance should provide access to.\n\n### Return value\n\nA new `Dictionary` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Dictionary exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name does not start with an ascii alphabetical character \n  - Thrown if the provided name does not contain only ascii alphanumeric, underscore, and whitespace characters\n\n## Examples\n\nIn this example we have an Edge Dictionary named \"animals\" and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Dictionary Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/dictionary/Dictionary/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Dictionary.prototype.get\n\n:::info\n\nThis Class is deprecated, it has been renamed to [`ConfigStore`](../../../fastly:config-store/ConfigStore/ConfigStore.mdx) and can be imported via `import { ConfigStore } from 'fastly:config-store'`\n\nThe `get()` method exists on the [`ConfigStore`](../../../fastly:config-store/ConfigStore/ConfigStore.mdx) Class.\n\n:::\n\nThe **`get()`** method returns the value associated with the provided key in the dictionary. If the provided key does not exist in the Dictionary then this returns `null`.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from the dictionary.\n\n### Return value\n\nA `string` representing the specified Dictionary value or `null` if the key does not exist in the Dictionary\n\n## Description\n\nGet a value for a key in the dictionary. If the provided key does not exist in the Dictionary then this returns `null`.\n\nThe `get()` method requires its `this` value to be a [`Dictionary`](../Dictionary.mdx) object.\n\nIf the `this` value does not inherit from `Dictionary.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided key is longer than 255 in length\n  - Thrown if the provided key is an empty string\n\n## Examples\n\nIn this example we have an Edge Dictionary named \"animals\" and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Dictionary Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/edge-rate-limiter/EdgeRateLimiter/EdgeRateLimiter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `EdgeRateLimiter()`\n\nThe **`EdgeRateLimiter` constructor** lets you open an epen a [ERL](https://docs.fastly.com/products/edge-rate-limiting) with the given ratecounter and penaltybox.\n\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew EdgeRateLimiter(rateCounter, penaltyBox)\n```\n\n> **Note:** `EdgeRateLimiter()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `rateCounter` _: RateCounter_\n  - The RateCounter instance to associate with this EdgeRateLimiter instance\n- `penaltyBox` _: PenaltyBox_\n  - The PenaltyBox instance which should be associated with this EdgeRateLimiter instance\n\n### Return value\n\nA new `EdgeRateLimiter` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided rateCounter value is not an instance of RateCounter\n  - Thrown if the provided penaltyBox value is not an instance of PenaltyBox\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/edge-rate-limiter/EdgeRateLimiter/prototype/checkRate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# EdgeRateLimiter.prototype.checkRate\n\nIncrement an entry in the rate counter and check if the entry has exceeded some average number of requests per second (RPS) over the given window.\nIf the entry is over the RPS limit for the window, add to the penaltybox for the given `timeToLive`.\n\nValid `timeToLive` is 1 minute to 60 minutes and `timeToLive` value is truncated to the nearest minute.\n\n## Syntax\n```js\ncheckRate(entry, delta, window, limit, timeToLive)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to increment and check\n- `delta` _: number_\n  - The amount to increment the `entry` by\n- `window` _: number_\n  - The time period to check across, has to be either 1 second, 10 seconds, or 60 seconds\n- `limit` _: number_\n  - The requests-per-second limit\n- `timeToLive` _: number_\n  - In minutes, how long the entry should be added into the penalty-box\n  - Valid `timeToLive` is 1 minute to 60 minutes and `timeToLive` value is truncated to the nearest minute.\n\n\n### Return value\n\nReturns `true` if the entry has exceeded the average RPS for the window, otherwise returns `false`.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `name` value can not be coerced into a string\n  - Thrown if the provided `delta` value is not a positive finite number.\n  - Thrown if the provided `window` value is not either, 1, 10, or 60.\n  - Thrown if the provided `limit` value is not a positive finite number.\n  - Thrown if the provided `timeToLive` value is not either, a number between 1 and 60 inclusively.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/edge-rate-limiter/PenaltyBox/PenaltyBox.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `PenaltyBox()`\n\nThe **`PenaltyBox` constructor** can be used with a [Edge Rate Limiter](../EdgeRateLimiter/EdgeRateLimiter.mdx) or standalone for adding and checking if some entry is in the dataset.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew PenaltyBox(name)\n```\n\n> **Note:** `PenaltyBox()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Open a PenaltyBox with the given name\n\n\n### Return value\n\nA new `PenaltyBox` object instance.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `name` value can not be coerced into a string\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/edge-rate-limiter/PenaltyBox/prototype/add.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# PenaltyBox.prototype.add\n\nAdd an `entry` into the PenaltyBox for the duration of the given `timeToLive`.\n\n## Syntax\n```js\nadd(entry, timeToLive)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n- `timeToLive` _: number_\n  - In minutes, how long the entry should be added into the PenaltyBox\n  - Valid `timeToLive` is 1 minute to 60 minutes and `timeToLive` value is truncated to the nearest minute.\n\n\n### Return value\n\nReturns `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n  - Thrown if the provided `timeToLive` value is not either, a number between 1 and 60 inclusively.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/edge-rate-limiter/PenaltyBox/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# PenaltyBox.prototype.has\n\nCheck if the given entry is contained in in the PenaltyBox instance.\n\n## Syntax\n```js\nhas(entry)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n\n\n### Return value\n\nReturns `true` if the entry is contained in the PenaltyBox instance, otherwise returns `false`.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/edge-rate-limiter/RateCounter/RateCounter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `RateCounter()`\n\nThe **`RateCounter` constructor** can be used with a [Edge Rate Limiter](../EdgeRateLimiter/EdgeRateLimiter.mdx) or standalone for counting and rate calculations.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew RateCounter(name)\n```\n\n> **Note:** `RateCounter()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Open a RateCounter with the given name\n\n\n### Return value\n\nA new `RateCounter` object instance.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `name` value can not be coerced into a string\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/edge-rate-limiter/RateCounter/prototype/increment.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RateCounter.prototype.increment\n\nIncrement the given `entry` in the RateCounter instance with the given `delta` value.\n\n## Syntax\n```js\nincrement(entry, delta)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n- `delta` _: number_\n  - The amount to increment the entry by\n\n\n### Return value\n\nReturns `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n  - Thrown if the provided `delta` value is not a positive, finite number.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/edge-rate-limiter/RateCounter/prototype/lookupCount.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RateCounter.prototype.lookupCount\n\nLook up the current rate for the given `entry` and the given `duration`.\n\n## Syntax\n```js\nlookupCount(entry, duration)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n- `duration` _: number_\n  - The duration to lookup alongside the entry, has to be either, 10, 20, 30, 40, 50, or 60 seconds.\n\n\n### Return value\n\nReturns a number which is the count for the given `entry` and `duration` in this `RateCounter` instance.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n  - Thrown if the provided `duration` value is not either, 10, 20, 30, 40, 50 or 60.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/edge-rate-limiter/RateCounter/prototype/lookupRate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RateCounter.prototype.lookupRate\n\nLook up the current rate for the given `entry` and the given `window`.\n\n## Syntax\n```js\nlookupRate(entry, window)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n- `window` _: number_\n  - The window to look up alongside the entry, has to be either 1 second, 10 seconds, or 60 seconds\n\n\n### Return value\n\nReturns a number which is the rate for the given `entry` and `window` in this `RateCounter` instance.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n  - Thrown if the provided `window` value is not either, 1, 10, or 60.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/env/env.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# env\n\nThe **`env()`** function returns the value for the provided environment variable name.\n\nFor a list of available environment variables, see the [Fastly Developer Hub for Compute Environment Variables](https://developer.fastly.com/reference/compute/ecp-env/)\n\n>**Note**: The environment variables can only be retrieved when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nenv(name)\n```\n\n### Parameters\n\n- `name` _: string_\n  - The name of the environment variable to retrieve\n\n### Return value\n\nThe value for the requested environment variable, if no such environment variable exists then an empty string is returned.\n\n## Examples\n\nIn this example we log to stdout the environment variables [`FASTLY_HOSTNAME`](https://developer.fastly.com/reference/compute/ecp-env/fastly-hostname/) and [`FASTLY_TRACE_ID`](https://developer.fastly.com/reference/compute/ecp-env/fastly-trace-id/).\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"env Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { env } from \"fastly:env\";\nfunction app(event) {\n  console.log(\"FASTLY_HOSTNAME:\", env(\"FASTLY_HOSTNAME\"));\n  console.log(\"FASTLY_TRACE_ID:\", env(\"FASTLY_TRACE_ID\"));\n  return new Response(\"\", {\n    status: 200\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { env } from \"fastly:env\";\nfunction app(event) {\n  console.log(\"FASTLY_HOSTNAME:\", env(\"FASTLY_HOSTNAME\"));\n  console.log(\"FASTLY_TRACE_ID:\", env(\"FASTLY_TRACE_ID\"));\n  return new Response(\"\", {\n    status: 200\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/experimental/allowDynamicBackends.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# allowDynamicBackends\n\nThe **`allowDynamicBackends()`** function is used to control whether or not Dynamic Backends should be allowed within this Fastly Compute Service.\n\nBy default, Dynamic Backends are disabled within a JavaScript application as it can be a potential avenue for third-party JavaScript code to send requests, potentially including sensitive/secret data,  off to destinations that the JavaScript project was not intending, which could be a security issue.\n\n>**Note**: This feature is in disabled by default for Fastly Services. Please contact [Fastly Support](https://support.fastly.com/hc/requests/new?ticket_form_id=360000269711) to request the feature be enabled on the Fastly Services which require Dynamic Backends.\n\n## Syntax\n\n```js\nallowDynamicBackends(enabledOrConfig)\n```\n\n### Parameters\n\n- `enabledOrConfig` _: boolean_\n  - Whether or not to allow Dynamic Backends\n\nor\n\n- `enabledOrConfig` _: object_\n  - `connectTimeout` _: number_ _**optional**_\n    - Maximum duration in milliseconds to wait for a connection to this backend to be established.\n    - If exceeded, the connection is aborted and a 503 response will be presented instead.\n    - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n  - `firstByteTimeout` _: number_ _**optional**_\n    - Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent.\n    - If exceeded, the connection is aborted and a 503 response will be presented instead.\n    - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n  - `betweenBytesTimeout` _: number_ _**optional**_\n    - Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend.\n    - If exceeded, the response received so far will be considered complete and the fetch will end.\n    - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n\n### Return value\n\n`undefined`.\n\n## Examples\n\nIn this example an implicit Dynamic Backend is created when making the fetch request to https://www.fastly.com/ and the response is then returned to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Dynamic Backends Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nallowDynamicBackends(true);\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  return fetch('https://www.fastly.com/');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nallowDynamicBackends(true);\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  return fetch('https://www.fastly.com/');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/experimental/includeBytes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# includeBytes\n\nThe **`includeBytes()`** function is used embed a file as a Uint8Array.\n\n>**Note**: Can only be used during build-time initialization, not when processing requests.\n\n## Syntax\n\n```js\nincludeBytes(path)\n```\n\n### Parameters\n\n- `path` _: string_\n  - The path to include, relative to the Fastly Compute application's top-level directory during build-time initialization.\n\n### Return value\n\nReturns a `Uint8Array`\n\n## Examples\n\nIn this example we include the README.md file as a Uint8Array and use it for the body in the response we return to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { includeBytes } from \"fastly:experimental\";\nconst readme = includeBytes('README.md');\nasync function app() {\n    return new Response(readme);\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/experimental/mapAndLogError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# mapAndLogError\n\nThe **`mapAndLogError()`** function calls `mapError` on an `Error` object and sends the output to standard error. This includes the error name, message, and a call stack.\n\nIf `--enable-stack-traces` is specified during the build, the call stack will be mapped using source maps.\n\nIf `--enable-stack-traces` is specified and `--exclude-sources` is not specified during the build, then this will also include a code dump of neighboring lines of user code.\n\n## Syntax\n\n```js\nmapAndLogError(error)\n```\n\n### Parameters\n\n- `error` _: Error _ or _string_\n  - The error to retrieve information about. If a `string` is provided, then it is first converted to an `Error`.\n\n### Return value\n\n`undefined`.\n\n## Examples\n\nIn this example, build the application using the `--enable-stack-traces` flag.\n\n```js\naddEventListener('fetch', e => e.respondWith(handler(e)));\nasync function handler(event) {\n  try {\n    throw new TypeError('foo');\n  } catch (err) {\n    mapAndLogError(mapError(err));\n  }\n  return new Response('ok');\n}\n```\n\nThe following is output to the error log.\n\n```\nTypeError: foo\n  at handler (src/index.ts:4:11)\n      1 | addEventListener('fetch', e => e.respondWith(handler(e)));\n      2 | async function handler(event) {\n      3 |   try {\n>     4 |     throw new TypeError('foo');\n                    ^\n      5 |   } catch (err) {\n      6 |     mapAndLogError(mapError(err));\n      7 |   }\n  at src/index.ts:1:45\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/experimental/mapError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# mapError\n\nThe **`mapError()`** function extracts information from an `Error` object as a human-readable array of strings. This includes the error name, message, and a call stack.\n\nIf `--enable-stack-traces` is specified during the build, the call stack will be mapped using source maps.\n\nIf `--enable-stack-traces` is specified and `--exclude-sources` is not specified during the build, then this will also include a code dump of neighboring lines of user code.\n\n## Syntax\n\n```js\nmapError(error)\n```\n\n### Parameters\n\n- `error` _: Error _ or _string_\n  - The error to retrieve information about. If a `string` is provided, then it is first converted to an `Error`.\n\n### Return value\n\nReturns an array of `string`s.\n\n## Examples\n\nIn this example, build the application using the `--enable-stack-traces` flag.\n\n```js\naddEventListener('fetch', e => e.respondWith(handler(e)));\nasync function handler(event) {\n  try {\n    throw new TypeError('foo');\n  } catch (err) {\n    console.error(mapError(err));\n  }\n  return new Response('ok');\n}\n```\n\nThe following is output to the error log.\n\n```\nTypeError: foo\n  at handler (src/index.ts:4:11)\n      1 | addEventListener('fetch', e => e.respondWith(handler(e)));\n      2 | async function handler(event) {\n      3 |   try {\n>     4 |     throw new TypeError('foo');\n                    ^\n      5 |   } catch (err) {\n      6 |     console.error(mapError(err));\n      7 |   }\n  at src/index.ts:1:45\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/experimental/sdkVersion.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# sdkVersion\n\nThe read-only **`sdkVersion`** property is a string whose indicates what JavaScript SDK version is being used.\n\n## Value\n\nA string value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/fanout/createFanoutHandoff.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# createFanoutHandoff\n\nThe **`createFanoutHandoff()`** function creates a Response instance which informs Fastly to pass the original Request through Fanout, to the declared backend.\n\n## Syntax\n\n```js\ncreateFanoutHandoff(request, backend)\n```\n\n### Parameters\n\n- `request` _: Request_\n  - The request to pass through Fanout.\n- `backend` _: string_\n  - The name of the backend that Fanout should send the request to.\n  - The name has to be between 1 and 254 characters inclusive.\n  - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n\n### Return value\n\nA Response instance is returned, which can then be used via `event.respondWith`.\n\n## Examples\n\nIn this example application requests to the path `/stream` and sent handled via Fanout.\n\n```js\nimport { createFanoutHandoff } from \"fastly:fanout\";\n\nasync function handleRequest(event) {\n  try {\n    const url = new URL(event.request.url);\n    if (url.pathname === '/stream') {\n      return createFanoutHandoff(event.request, 'fanout');\n    } else {\n      return new Response('oopsie, make a request to /stream for some fanout goodies', { status: 404 });\n    }\n  } catch (error) {\n    console.error({error});\n    return new Response(error.message, {status:500})\n  }\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/geolocation/getGeolocationForIpAddress.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# getGeolocationForIpAddress\n\nThe **`getGeolocationForIpAddress()`** function is used to retrieve geolocation information about the given IP address.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\ngetGeolocationForIpAddress(address)\n```\n\n### Parameters\n\n- `address` _: string_\n  - The IPv4 or IPv6 address to query.\n\n### Return value\n\nReturns an `Object`, or `null` if no geolocation data was found.\n\nThe object contains information about the given IP address with the following properties:\n\n- `as_name`  _: string | null_\n  - The name of the organization associated with `as_number`.\n  - For example, fastly is the value given for IP addresses under AS-54113.\n\n- `as_number` _: number | null_\n  - [Autonomous system](https://en.wikipedia.org/wiki/Autonomous_system_(Internet)) (AS) number.\n\n- `area_code` _: number | null_\n  - The telephone area code associated with an IP address.\n  - These are only available for IP addresses in the United States, its territories, and Canada.\n\n- `city` _: string | null_\n  - City or town name.\n\n- `conn_speed` _: string | null_\n  - Connection speed.\n\n- `conn_type` _: string | null_\n  - Connection type.\n\n- `continent` _: string | null_\n  - Continent.\n\n- `country_code` _: string | null_\n  - A two-character [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) country code for the country associated with an IP address.\n  - The US country code is returned for IP addresses associated with overseas United States military bases.\n  - These values include subdivisions that are assigned their own country codes in ISO 3166-1. For example, subdivisions NO-21 and NO-22 are presented with the country code SJ for Svalbard and the Jan Mayen Islands.\n\n- `country_code3` _: string | null_\n  - A three-character [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) country code for the country associated with the IP address.\n  - The USA country code is returned for IP addresses associated with overseas United States military bases.\n\n- `country_name` _: string | null_\n  - Country name.\n  - This field is the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) English short name for a country.\n\n- `gmt_offset` _: string | null_\n  - Time zone offset from Greenwich Mean Time (GMT) for `city`.\n\n- `latitude` _: number | null_\n  - Latitude, in units of degrees from the equator.\n  - Values range from -90.0 to +90.0 inclusive, and are based on the [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System) coordinate reference system.\n\n- `longitude` _: number | null_\n  - Longitude, in units of degrees from the [IERS Reference Meridian](https://en.wikipedia.org/wiki/IERS_Reference_Meridian).\n  - Values range from -180.0 to +180.0 inclusive, and are based on the [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System) coordinate reference system.\n\n- `metro_code` _: number | null_\n  - Metro code, representing designated market areas (DMAs) in the United States.\n\n- `postal_code` _: string | null_\n  - The postal code associated with the IP address.\n  - These are available for some IP addresses in Australia, Canada, France, Germany, Italy, Spain, Switzerland, the United Kingdom, and the United States.\n  - For Canadian postal codes, this is the first 3 characters. For the United Kingdom, this is the first 2-4 characters (outward code). For countries with alphanumeric postal codes, this field is a lowercase transliteration.\n\n- `proxy_description` _: string | null_\n  - Client proxy description.\n\n- `proxy_type` _: string | null_\n  - Client proxy type.\n\n- `region` _: string | null_\n  - [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) country subdivision code.\n  - For countries with multiple levels of subdivision (for example, nations within the United Kingdom), this variable gives the more specific subdivision.\n  - This field can be None for countries that do not have ISO country subdivision codes. For example, None is given for IP addresses assigned to the Åland Islands (country code AX, illustrated below).\n\n- `utc_offset` _: number | null;_\n  - Time zone offset from coordinated universal time (UTC) for `city`.\n\n## Examples\n\nIn this example we return the geolocation details for the provided ip querystring parameter or for the incoming client request if the querystring parameter does not exist.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"getGeolocationForIpAddress Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { getGeolocationForIpAddress } from \"fastly:geolocation\"\nasync function app(event) {\n  try {\n    let ip = new URL(event.request.url).searchParams.get('ip') || event.client.address\n    let geo = getGeolocationForIpAddress(ip);\n    return new Response(JSON.stringify(geo), {\n      headers: {\n        \"Content-Type\": \"application/json\",\n      },\n    });\n  } catch (error) {\n    console.error(error);\n    return new Response(\"Internal Server Error\", {\n      status: 500\n    });\n  }\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { getGeolocationForIpAddress } from \"fastly:geolocation\"\nasync function app(event) {\n  try {\n    let ip = new URL(event.request.url).searchParams.get('ip') || event.client.address\n    let geo = getGeolocationForIpAddress(ip);\n    return new Response(JSON.stringify(geo), {\n      headers: {\n        \"Content-Type\": \"application/json\",\n      },\n    });\n  } catch (error) {\n    console.error(error);\n    return new Response(\"Internal Server Error\", {\n      status: 500\n    });\n  }\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/AggregrateError/AggregrateError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# AggregateError()\n\nThe **`AggregateError()`** constructor creates an error for several errors that need to be wrapped in a single error.\n\n## Syntax\n\n```js\nnew AggregateError(errors)\nnew AggregateError(errors, message)\nnew AggregateError(errors, message, options)\n\nAggregateError(errors)\nAggregateError(errors, message)\nAggregateError(errors, message, options)\n```\n\n> **Note:** `AggregateError()` can be called with or without `new`. Both create a new `AggregateError` instance.\n\n### Parameters\n\n- `errors`\n  - : An iterable of errors, may not actually be [`TypeError`](../Error/Error.mdx) instances.\n- `message` _**optional**_\n  - : An optional human-readable description of the aggregate error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Array/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array\\[Symbol.species]\n\nThe **`Array[Symbol.species]`** accessor property returns the constructor used to construct return values from array methods.\n\n> **Warning:** The existence of `[Symbol.species]` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Syntax\n\n```js\nArray[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get [Symbol.species]` was called. The return value is used to construct return values from array methods that create new arrays.\n\n## Description\n\nThe `[Symbol.species]` accessor property returns the default constructor for `Array` objects. Subclass constructors may override it to change the constructor assignment. The default implementation is basically:\n\n```js\n// Hypothetical underlying implementation for illustration\nclass Array {\n  static get [Symbol.species]() {\n    return this;\n  }\n}\n```\n\nBecause of this polymorphic implementation, `[Symbol.species]` of derived subclasses would also return the constructor itself by default.\n\n```js\nclass SubArray extends Array {}\nSubArray[Symbol.species] === SubArray; // true\n```\n\nWhen calling array methods that do not mutate the existing array but return a new array instance (for example, `filter()` and `map()`), the array's `constructor[Symbol.species]` will be accessed. The returned constructor will be used to construct the return value of the array method. This makes it technically possible to make array methods return objects unrelated to arrays.\n\n```js\nclass NotAnArray {\n  constructor(length) {\n    this.length = length;\n  }\n}\n\nconst arr = [0, 1, 2];\narr.constructor = { [Symbol.species]: NotAnArray };\narr.map((i) => i); // NotAnArray { '0': 0, '1': 1, '2': 2, length: 3 }\narr.filter((i) => i); // NotAnArray { '0': 1, '1': 2, length: 0 }\narr.concat([1, 2]); // NotAnArray { '0': 0, '1': 1, '2': 2, '3': 1, '4': 2, length: 5 }\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Array/Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array()\n\nThe **`Array()`** constructor is used to create `Array` objects.\n\n## Syntax\n\n```js\nnew Array(element0, element1, /* … ,*/ elementN)\nnew Array(arrayLength)\n\nArray(element0, element1, /* … ,*/ elementN)\nArray(arrayLength)\n```\n\n> **Note:** `Array()` can be called with or without `new`. Both create a new `Array` instance.\n\n### Parameters\n\n- `elementN`\n  - : A JavaScript array is initialized with the given elements, except in the case where\n    a single argument is passed to the `Array` constructor and that argument is\n    a number (see the `arrayLength` parameter below). Note that this special case only\n    applies to JavaScript arrays created with the `Array` constructor, not\n    array literals created with the bracket syntax.\n- `arrayLength`\n  - : If the only argument passed to the `Array` constructor is an integer\n    between 0 and 2<sup>32</sup> - 1 (inclusive), this returns a new JavaScript array with\n    its `length` property set to that number (**Note:** this\n    implies an array of `arrayLength` empty slots, not slots with actual\n    `undefined` values).\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if there's only one argument (`arrayLength`) and its value is not between 0 and 2<sup>32</sup> - 1 (inclusive).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Array/from.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.from\n\nThe **`Array.from()`** static method creates a new, shallow-copied `Array` instance from an iterable or array-like object.\n\n## Syntax\n\n```js\nArray.from(arrayLike)\n\n// Arrow function\nArray.from(arrayLike, (element) => { /* … */ })\nArray.from(arrayLike, (element, index) => { /* … */ })\n\n// Mapping function\nArray.from(arrayLike, mapFn)\nArray.from(arrayLike, mapFn, thisArg)\n\n// Inline mapping function\nArray.from(arrayLike, function (element) { /* … */ })\nArray.from(arrayLike, function (element, index) { /* … */ })\nArray.from(arrayLike, function (element) { /* … */ }, thisArg)\nArray.from(arrayLike, function (element, index) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `arrayLike`\n  - : An iterable or array-like object to convert to an array.\n- `mapFn` _**optional**_\n\n  - : Map function to call on every element of the array. If provided, every value to be added to the array is first passed through this function, and `mapFn`'s return value is added to the array instead.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `mapFn`.\n\n### Return value\n\nA new `Array` instance.\n\n## Description\n\n`Array.from()` lets you create `Array`s from:\n\n- [iterable objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) (objects such as [`Map`](../Map/Map.mdx) and [`Set`](../Set/Set.mdx); or, if the object is not iterable,\n- array-like objects (objects with a `length` property and indexed elements).\n\n`Array.from()` never creates a sparse array. If the `arrayLike` object is missing some index properties, they become `undefined` in the new array.\n\n`Array.from()` has an optional parameter `mapFn`, which allows you to execute a function on each element of the array being created, similar to [`Array.prototype.map()`](./prototype/map.mdx). More clearly, `Array.from(obj, mapFn, thisArg)` has the same result as `Array.from(obj).map(mapFn, thisArg)`, except that it does not create an intermediate array, and `mapFn` only receives two arguments (`element`, `index`) without the whole array, because the array is still under construction.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Array/isArray.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.isArray()\n\nThe **`Array.isArray()`** static method determines whether the passed value is an `Array`.\n\n## Syntax\n\n```js\nArray.isArray(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be checked.\n\n### Return value\n\n`true` if `value` is an `Array`; otherwise, `false`. `false` is always returned if `value` is a `TypedArray` instance.\n\n## Description\n\n`Array.isArray()` checks if the passed value is an `Array`. It does not check the value's prototype chain, nor does it rely on the `Array` constructor it is attached to. It returns `true` for any value that was created using the array literal syntax or the `Array` constructor. This makes it safe to use with cross-realm objects, where the identity of the `Array` constructor is different and would therefore cause `instanceof Array` to fail.\n\nSee the article [\"Determining with absolute accuracy whether or not a JavaScript object is an array\"](https://web.mit.edu/jwalden/www/isArray.html) for more details.\n\n`Array.isArray()` also rejects objects with `Array.prototype` in its prototype chain but aren't actual arrays, which `instanceof Array` would accept.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Array/of.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.of()\nThe **`Array.of()`** method creates a new `Array`\ninstance from a variable number of arguments, regardless of number or type of the\narguments.\n\n## Syntax\n\n```js\nArray.of(element0)\nArray.of(element0, element1)\nArray.of(element0, element1, /* … ,*/ elementN)\n```\n\n### Parameters\n\n- `elementN`\n  - : Elements used to create the array.\n\n### Return value\n\nA new `Array` instance.\n\n## Description\n\nThe difference between `Array.of()` and the [`Array()`](./Array.mdx) constructor is in the handling of single arguments: `Array.of(7)` creates an array with a single element, `7`, whereas `Array(7)` creates an empty array with a `length` property of `7`. (That implies an array of 7 empty slots, not slots with actual [`undefined`](../undefined.mdx) values.)\n\n```js\nArray.of(7); // [7]\nArray(7); // array of 7 empty slots\n\nArray.of(1, 2, 3); // [1, 2, 3]\nArray(1, 2, 3); // [1, 2, 3]\n```\n\nThe `Array.of()` method is a generic factory method. For example, if a subclass of `Array` inherits the `of()` method, the inherited `of()` method will return new instances of the subclass instead of `Array` instances. In fact, the `this` value can be any constructor function that accepts a single argument representing the length of the new array, and the constructor will be called with the number of arguments passed to `of()`. The final `length` will be set again when all elements are assigned. If the `this` value is not a constructor function, the plain `Array` constructor is used instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Array/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype\\[Symbol.iterator]()\n\nThe **`Symbol.iterator`** method of an `Array` object implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows arrays to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the value of each index in the array.\n\nThe initial value of this property is the same function object as the initial value of the [`Array.prototype.values`](./values.mdx) property.\n\n## Syntax\n\n```js\narray[Symbol.iterator]()\n```\n\n### Return value\n\nThe same return value as [`Array.prototype.values()`](./values.mdx): a new iterable iterator object that yields the value of each index in the array.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Array/prototype/@@unscopables.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype[Symbol.unscopables]\n\nThe **`@@unscopables`** data property of `Array.prototype` is shared by all `Array` instances. It contains property names that were not included in the ECMAScript standard prior to the ES2015 version and that are ignored for [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) statement-binding purposes.\n\n## Value\n\nA [`null`-prototype object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects) with property names given below and their values set to `true`.\n\n## Description\n\nThe default `Array` properties that are ignored for `with` statement-binding purposes are:\n\n- [`at()`](./at.mdx)\n- [`copyWithin()`](./copyWithin.mdx)\n- [`entries()`](./entries.mdx)\n- [`fill()`](./fill.mdx)\n- [`find()`](./find.mdx)\n- [`findIndex()`](./findIndex.mdx)\n- [`flat()`](./flat.mdx)\n- [`flatMap()`](./flatMap.mdx)\n- [`includes()`](./includes.mdx)\n- [`keys()`](./keys.mdx)\n- [`values()`](./values.mdx)\n\n`Array.prototype[@@unscopables]` is an empty object only containing all the above property names with the value `true`. Its [prototype is `null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects), so `Object.prototype` properties like [`toString`](../../Object/prototype/toString.mdx) won't accidentally be made unscopable, and a `toString()` within the `with` statement will continue to be called on the array.\n\nSee [`Symbol.unscopables`](../../Symbol/unscopables.mdx) for how to set unscopable properties for your own objects.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Array/prototype/at.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.at\n\nThe **`at()`** method takes an integer value and returns the item at that index, allowing for positive and negative integers. Negative integers count back from the last item in the array.\n\n## Syntax\n\n```js\nat(index)\n```\n\n### Parameters\n\n- `index`\n  - : Zero-based index of the array element to be returned, converted to an integer. Negative index counts back from the end of the array — if `index < 0`, `index + array.length` is accessed.\n\n### Return value\n\nThe element in the array matching the given index. Always returns [`undefined`](../../../globals/undefined.mdx) if `index < -array.length` or `index >= array.length` without attempting to access the corresponding property.\n\n## Description\n\nThe `at()` method is equivalent to the bracket notation when `index` is non-negative. For example, `array[0]` and `array.at(0)` both return the first item. However, when counting elements from the end of the array, you cannot use `array[-1]` like you may in Python or R, because all values inside the square brackets are treated literally as string properties, so you will end up reading `array[\"-1\"]`, which is just a normal string property instead of an array index.\n\nThe usual practice is to access [`Array.prototype.length`](./length.mdx) and calculate the index from that — for example, `array[array.length - 1]`. The `at()` method allows relative indexing, so this can be shortened to `array.at(-1)`.\n\nThe `at()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Array/prototype/concat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.concat\n\nThe **`concat()`** method is used to merge two or more arrays.\nThis method does not change the existing arrays, but instead returns a new array.\n\n## Syntax\n\n```js\nconcat()\nconcat(value0)\nconcat(value0, value1)\nconcat(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `valueN` _**optional**_\n  - : Arrays and/or values to concatenate into a new array. If all\n    `valueN` parameters are omitted, `concat` returns a\n    [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of the existing array on which it is called. See the description below\n    for more details.\n\n### Return value\n\nA new `Array` instance.\n\n## Description\n\nThe `concat` method creates a new array. The array will first be populated by the elements in the object on which it is called. Then, for each argument, its value will be concatenated into the array — for normal objects or primitives, the argument itself will become an element of the final array; for arrays or array-like objects with the property [`Symbol.isConcatSpreadable`](../../Symbol/isConcatSpreadable.mdx) set to a truthy value, each element of the argument will be independently added to the final array. The `concat` method does not recurse into nested array arguments.\n\nThe `concat()` method is a copying. It does not alter `this` or any of the arrays provided as arguments but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains the same elements as the ones from the original arrays.\n\nThe `concat()` method preserves empty slots if any of the source arrays is sparse.\n\nThe `concat()` method is generic. The `this` value is treated in the same way as the other arguments (except it will be converted to an object first), which means plain objects will be directly prepended to the resulting array, while array-like objects with truthy `Symbol.isConcatSpreadable` will be spread into the resulting array.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Array/prototype/copyWithin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.copyWithin\n\nThe **`copyWithin()`** method shallow copies part of an array\nto another location in the same array and returns it without modifying its length.\n\n\n\n## Syntax\n\n```js\ncopyWithin(target)\ncopyWithin(target, start)\ncopyWithin(target, start, end)\n```\n\n### Parameters\n\n- `target`\n  - : Zero-based index at which to copy the sequence to, converted to an integer.\n    - Negative index counts back from the end of the array — if `target < 0`, `target + array.length` is used.\n    - If `target < -array.length`, `0` is used.\n    - If `target >= array.length`, nothing is copied.\n    - If `target` is positioned after `start` after normalization, copying only happens until the end of `array.length` (in other words, `copyWithin()` never extends the array).\n- `start` _**optional**_\n  - : Zero-based index at which to start copying elements from, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, nothing is copied.\n- `end` _**optional**_\n  - : Zero-based index at which to end copying elements from, converted to an integer. `copyWithin()` copies up to but not including `end`.\n    - Negative index counts back from the end of the array — if `end < 0`, `end + array.length` is used.\n    - If `end < -array.length`, `0` is used.\n    - If `end >= array.length` or `end` is omitted, `array.length` is used, causing all elements until the end to be copied.\n    - If `end` is positioned before or at `start` after normalization, nothing is copied.\n\n### Return value\n\nThe modified array.\n\n## Description\n\nThe `copyWithin()` method works like C and C++'s `memmove`, and is a high-performance method to shift the data of an `Array`. The sequence is copied and pasted as one operation; the pasted sequence will have the copied values even when the copy and paste region overlap.\n\nThe `copyWithin()` method is a mutating method. It does not alter the length of `this`, but it will change the content of `this` and create new properties or delete existing properties, if necessary.\n\nThe `copyWithin()` method preserves empty slots. If the region to be copied from is sparse, the empty slots' corresponding new indices are [deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) and also become empty slots.\n\nThe `copyWithin()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Array/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.entries\n\nThe **`entries()`** method returns a new **Array\nIterator** object that contains the key/value pairs for each index in the\narray.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nA new `Array` iterator object.\n\n## Description\n\nWhen used on sparse arrays, the `entries()` method iterates empty slots as if they have the value `undefined`.\n\nThe `entries()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Array/prototype/every.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.every\n\nThe **`every()`** method tests whether\nall elements in the array pass the test implemented by the provided function. It\nreturns a Boolean value.\n\n## Syntax\n\n```js\n// Arrow function\nevery((element) => { /* … */ })\nevery((element, index) => { /* … */ })\nevery((element, index, array) => { /* … */ })\n\n// Callback function\nevery(callbackFn)\nevery(callbackFn, thisArg)\n\n// Inline callback function\nevery(function (element) { /* … */ })\nevery(function (element, index) { /* … */ })\nevery(function (element, index, array) { /* … */ })\nevery(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value to indicate the element passes the test, and a falsy value otherwise.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `every()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\n`true` if `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value for every array element. Otherwise, `false`.\n\n## Description\n\nThe `every()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array, until the `callbackFn` returns a [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value. If such an element is found, `every()` immediately returns `false` and stops iterating through the array. Otherwise, if `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value for all elements, `every()` returns `true`.\n\n`every` acts like the \"for all\" quantifier in mathematics. In particular, for an empty array, it returns `true`. (It is [vacuously true](https://en.wikipedia.org/wiki/Vacuous_truth) that all elements of the [empty set](https://en.wikipedia.org/wiki/Empty_set#Properties) satisfy any given condition.)\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\n`every()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `every()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `every()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Array/prototype/fill.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.fill\n\nThe **`fill()`** method changes all elements in an array to a static value, from a start index (default `0`) to an end index (default `array.length`).\nIt returns the modified array.\n\n## Syntax\n\n```js\nfill(value)\nfill(value, start)\nfill(value, start, end)\n```\n\n### Parameters\n\n- `value`\n  - : Value to fill the array with. Note all elements in the array will be this exact value: if `value` is an object, each slot in the array will reference that object.\n- `start` _**optional**_\n  - : Zero-based index at which to start filling, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, no index is filled.\n- `end` _**optional**_\n  - : Zero-based index at which to end filling, converted to an integer. `fill()` fills up to but not including `end`.\n    - Negative index counts back from the end of the array — if `end < 0`, `end + array.length` is used.\n    - If `end < -array.length`, `0` is used.\n    - If `end >= array.length` or `end` is omitted, `array.length` is used, causing all indices until the end to be filled.\n    - If `end` is positioned before or at `start` after normalization, no index is filled.\n\n### Return value\n\nThe modified array, filled with `value`.\n\n## Description\n\nThe `fill()` method is a mutating method. It does not alter the length of `this`, but it will change the content of `this`.\n\nThe `fill()` method fills empty slots in sparse arrays with `value` as well.\n\nThe `fill()` method is generic. It only expects the `this` value to have a `length` property. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Array/prototype/filter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.filter\n\nThe **`filter()`** method creates a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of a portion of a given array, filtered down to just the elements from the given array that pass the test implemented by the provided function.\n\n## Syntax\n\n```js\n// Arrow function\nfilter((element) => { /* … */ })\nfilter((element, index) => { /* … */ })\nfilter((element, index, array) => { /* … */ })\n\n// Callback function\nfilter(callbackFn)\nfilter(callbackFn, thisArg)\n\n// Inline callback function\nfilter(function (element) { /* … */ })\nfilter(function (element, index) { /* … */ })\nfilter(function (element, index, array) { /* … */ })\nfilter(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) to keep the element in the resulting array, and a falsy value otherwise.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `filter()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\nA [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of a portion of the given array, filtered down to just the elements from the given array that pass the test implemented by the provided function. If no elements pass the test, an empty array will be returned.\n\n## Description\n\nThe `filter()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array, and constructs a new array of all the values for which `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. Array elements which do not pass the `callbackFn` test are not included in the new array.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nThe `filter()` method is a copying method. It does not alter `this` but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains the same elements as the ones from the original array (with some filtered out). However, the function provided as `callbackFn` can mutate the array. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `filter()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\nThe `filter()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Array/prototype/find.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.find()\n\nThe `find()` method returns the first element in the provided array that satisfies the provided testing function.\nIf no values satisfy the testing function, [`undefined`](../../../globals/undefined.mdx) is returned.\n\n- If you need the **index** of the found element in the array, use [`findIndex()`](./findIndex.mdx).\n- If you need to find the **index of a value**, use [`indexOf()`](./indexOf.mdx).\n  (It's similar to [`findIndex()`](./findIndex.mdx), but checks each element for equality with the value instead of using a testing function.)\n- If you need to find if a value **exists** in an array, use [`includes()`](./includes.mdx).\n  Again, it checks each element for equality with the value instead of using a testing function.\n- If you need to find if any element satisfies the provided testing function, use [`some()`](./some.mdx).\n\n## Syntax\n\n```js\n// Arrow function\nfind((element) => { /* … */ })\nfind((element, index) => { /* … */ })\nfind((element, index, array) => { /* … */ })\n\n// Callback function\nfind(callbackFn)\nfind(callbackFn, thisArg)\n\n// Inline callback function\nfind(function (element) { /* … */ })\nfind(function (element, index) { /* … */ })\nfind(function (element, index, array) { /* … */ })\nfind(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value to indicate a matching element has been found.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `find()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\nThe first element in the array that satisfies the provided testing function.\nOtherwise, [`undefined`](../../../globals/undefined.mdx) is returned.\n\n## Description\n\nThe `find()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array in ascending-index order, until `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. `find()` then returns that element and stops iterating through the array. If `callbackFn` never returns a truthy value, `find()` returns [`undefined`](../../../globals/undefined.mdx).\n\n`callbackFn` is invoked for _every_ index of the array, not just those with assigned values. Empty slots in sparse arrays behave the same as `undefined`.\n\n`find()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `find()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are visited as if they were `undefined`.\n\nThe `find()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Array/prototype/findIndex.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.findIndex\n\nThe **`findIndex()`** method returns the index of the first element in an array that satisfies the provided testing function.\nIf no elements satisfy the testing function, -1 is returned.\n\nSee also the [`find()`](./find.mdx) method, which returns the first element that satisfies the testing function (rather than its index).\n\n## Syntax\n\n```js\n// Arrow function\nfindIndex((element) => { /* … */ })\nfindIndex((element, index) => { /* … */ })\nfindIndex((element, index, array) => { /* … */ })\n\n// Callback function\nfindIndex(callbackFn)\nfindIndex(callbackFn, thisArg)\n\n// Inline callback function\nfindIndex(function (element) { /* … */ })\nfindIndex(function (element, index) { /* … */ })\nfindIndex(function (element, index, array) { /* … */ })\nfindIndex(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value to indicate a matching element has been found.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `findIndex()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\nThe index of the first element in the array that passes the test. Otherwise, `-1`.\n\n## Description\n\nThe `findIndex()` is an iterative method. It calls a provided `callbackFn` function once for each element in an array in ascending-index order, until `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. `findIndex()` then returns the index of that element and stops iterating through the array. If `callbackFn` never returns a truthy value, `findIndex()` returns `-1`.\n\n`callbackFn` is invoked for _every_ index of the array, not just those with assigned values. Empty slots in sparse arrays behave the same as `undefined`.\n\n`findIndex()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `findIndex()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are visited as if they were `undefined`.\n\nThe `findIndex()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Array/prototype/flat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.flat\n\nThe **`flat()`** method creates a new array with all sub-array\nelements concatenated into it recursively up to the specified depth.\n\n## Syntax\n\n```js\nflat()\nflat(depth)\n```\n\n### Parameters\n\n- `depth` _**optional**_\n  - : The depth level specifying how deep a nested array structure should be flattened.\n    Defaults to 1.\n\n### Return value\n\nA new array with the sub-array elements concatenated into it.\n\n## Description\n\nThe `flat()` method is a copying method. It does not alter `this` but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains the same elements as the ones from the original array.\n\nThe `flat()` method ignores empty slots if the array being flattened is sparse. For example, if `depth` is 1, both empty slots in the root array and in the first level of nested arrays are ignored, but empty slots in further nested arrays are preserved with the arrays themselves.\n\nThe `flat()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. However, its elements must be arrays if they are to be flattened.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Array/prototype/flatMap.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.flatMap()\n\nThe **`flatMap()`** method returns a new array formed by applying a given callback function to each element of the array, and then flattening the result by one level. It is identical to a [`Array.prototype.map()`](./map.mdx) followed by a [`Array.prototype.flat()`](./flat.mdx) of depth 1 (`arr.map(...args).flat()`), but slightly more efficient than calling those two methods separately.\n\n## Syntax\n\n```js\n// Arrow function\nflatMap((element) => { /* … */ })\nflatMap((element, index) => { /* … */ })\nflatMap((element, index, array) => { /* … */ })\n\n// Callback function\nflatMap(callbackFn)\nflatMap(callbackFn, thisArg)\n\n// Inline callback function\nflatMap(function (element) { /* … */ })\nflatMap(function (element, index) { /* … */ })\nflatMap(function (element, index, array) { /* … */ })\nflatMap(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return an array containing new elements of the new array, or a single non-array value to be added to the new array.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `flatMap()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\nA new array with each element being the result of the callback function and flattened\nby a depth of 1.\n\n## Description\n\nThe `flatMap()` method is an iterative method. See [`Array.prototype.map()`](./map.mdx) for a detailed description of the callback function. The `flatMap()` method is identical to [`map(callbackFn, thisArg)`](./map.mdx) followed by [`flat(1)`](./flat.mdx) — for each element, it produces an array of new elements, and concatenates the resulting arrays together to form a new array.\n\nThe `flatMap()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. However, the value returned from `callbackFn` must be an array if it is to be flattened.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Array/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.forEach()\n\nThe **`forEach()`** method executes a provided function once\nfor each array element.\n\n## Syntax\n\n```js\n// Arrow function\nforEach((element) => { /* … */ })\nforEach((element, index) => { /* … */ })\nforEach((element, index, array) => { /* … */ })\n\n// Callback function\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n\n// Inline callback function\nforEach(function (element) { /* … */ })\nforEach(function (element, index) { /* … */ })\nforEach(function (element, index, array) { /* … */ })\nforEach(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value is discarded.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `forEach()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\n`undefined`.\n\n## Description\n\nThe `forEach()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array in ascending-index order. Unlike [`Array.prototype.map()`](./map.mdx), `forEach()` always returns [`undefined`](../../../globals/undefined.mdx) and is not chainable. The typical use case is to execute side effects at the end of a chain.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\n`forEach()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `forEach()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\nThe `forEach()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n\nThere is no way to stop or break a `forEach()` loop other than by throwing an exception. If you need such behavior, the `forEach()` method is the wrong tool.\n\nEarly termination may be accomplished with looping statements like [`for`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for), [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of), and [`for...in`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...in). Array methods like [`Array.prototype.some()`](./some.mdx), [`Array.prototype.some()`](./some.mdx), [`Array.prototype.find()`](./find.mdx), and [`Array.prototype.findIndex()`](./findIndex.mdx) also stops iteration immediately when further iteration is not necessary.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Array/prototype/includes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.includes()\n\nThe **`includes()`** method determines whether an array\nincludes a certain value among its entries, returning `true` or\n`false` as appropriate.\n\n## Syntax\n\n```js\nincludes(searchElement)\nincludes(searchElement, fromIndex)\n```\n\n### Parameters\n\n- `searchElement`\n  - : The value to search for.\n- `fromIndex` _**optional**_\n  - : Zero-based index at which to start searching, converted to an integer.\n    - Negative index counts back from the end of the array — if `fromIndex < 0`, `fromIndex + array.length` is used. However, the array is still searched from front to back in this case.\n    - If `fromIndex < -array.length` or `fromIndex` is omitted, `0` is used, causing the entire array to be searched.\n    - If `fromIndex >= array.length`, the array is not searched and `false` is returned.\n\n### Return value\n\nA boolean value which is `true` if the value `searchElement` is found within the array (or the part of the array indicated by the index `fromIndex`, if specified).\n\n## Description\n\nThe `includes()` method compares `searchElement` to elements of the array using the [SameValueZero](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) algorithm. Values of zero are all considered to be equal, regardless of sign. (That is, `-0` is equal to `0`), but `false` is _not_ considered to be the same as `0`. [`NaN`](../../NaN.mdx) can be correctly searched for.\n\nWhen used on sparse arrays, the `includes()` method iterates empty slots as if they have the value `undefined`.\n\nThe `includes()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Array/prototype/indexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.indexOf()\n\nThe **`indexOf()`** method returns the first index at which a\ngiven element can be found in the array, or -1 if it is not present.\n\n## Syntax\n\n```js\nindexOf(searchElement)\nindexOf(searchElement, fromIndex)\n```\n\n### Parameters\n\n- `searchElement`\n  - : Element to locate in the array.\n- `fromIndex` _**optional**_\n  - : Zero-based index at which to start searching, converted to an integer.\n    - Negative index counts back from the end of the array — if `fromIndex < 0`, `fromIndex + array.length` is used. Note, the array is still searched from front to back in this case.\n    - If `fromIndex < -array.length` or `fromIndex` is omitted, `0` is used, causing the entire array to be searched.\n    - If `fromIndex >= array.length`, the array is not searched and `-1` is returned.\n\n### Return value\n\nThe first index of the element in the array; **-1** if not found.\n\n## Description\n\nThe `indexOf()` method compares `searchElement` to elements of the array using [strict equality](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) (the same algorithm used by the `===` operator).\n\nThe `indexOf()` method skips empty slots in sparse arrays.\n\nThe `indexOf()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Array/prototype/join.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.join()\n\nThe **`join()`** method creates and\nreturns a new string by concatenating all of the elements in an array\n(or an [array-like object](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects)),\nseparated by commas or a specified separator string. If the array has\nonly one item, then that item will be returned without using the separator.\n\n## Syntax\n\n```js\njoin()\njoin(separator)\n```\n\n### Parameters\n\n- `separator` _**optional**_\n  - : Specifies a string to separate each pair of adjacent elements of the array. The\n    separator is converted to a string if necessary. If omitted, the array elements are\n    separated with a comma (\",\"). If `separator` is an empty string, all\n    elements are joined without any characters in between them.\n\n### Return value\n\nA string with all array elements joined. If `arr.length` is\n`0`, the empty string is returned.\n\n## Description\n\nThe string conversions of all array elements are joined into one string. If an element is `undefined`, `null`, it is converted to an empty string instead of the string `\"null\"` or `\"undefined\"`.\n\nThe `join` method is accessed internally by [`Array.prototype.toString()`](./toString.mdx) with no arguments. Overriding `join` of an array instance will override its `toString` behavior as well.\n\nWhen used on sparse arrays, the `join()` method iterates empty slots as if they have the value `undefined`.\n\nThe `join()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Array/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.keys()\n\nThe **`keys()`** method returns a new **Array\nIterator** object that contains the keys for each index in the array.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nA new `Array` iterator object.\n\n## Description\n\nWhen used on sparse arrays, the `keys()` method iterates empty slots as if they have the value `undefined`.\n\nThe `keys()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Array/prototype/lastIndexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.lastIndexOf()\n\nThe **`lastIndexOf()`** method returns the last index at which\na given element can be found in the array, or -1 if it is not present. The array is\nsearched backwards, starting at `fromIndex`.\n\n## Syntax\n\n```js\nlastIndexOf(searchElement)\nlastIndexOf(searchElement, fromIndex)\n```\n\n### Parameters\n\n- `searchElement`\n  - : Element to locate in the array.\n- `fromIndex` _**optional**_\n  - : Zero-based index at which to start searching backwards, converted to an integer.\n    - Negative index counts back from the end of the array — if `fromIndex < 0`, `fromIndex + array.length` is used.\n    - If `fromIndex < -array.length`, the array is not searched and `-1` is returned. You can think of it conceptually as starting at a nonexistent position before the beginning of the array and going backwards from there. There are no array elements on the way, so `searchElement` is never found.\n    - If `fromIndex >= array.length` or `fromIndex` is omitted, `array.length - 1` is used, causing the entire array to be searched. You can think of it conceptually as starting at a nonexistent position beyond the end of the array and going backwards from there. It eventually reaches the real end position of the array, at which point it starts searching backwards through the actual array elements.\n\n### Return value\n\nThe last index of the element in the array; **-1** if not found.\n\n## Description\n\nThe `lastIndexOf()` method compares `searchElement` to elements of the array using [strict equality](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) (the same algorithm used by the `===` operator).\n\nThe `lastIndexOf()` method skips empty slots in sparse arrays.\n\nThe `lastIndexOf()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Array/prototype/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.length\n\nThe **`length`** data property of an `Array` instance represents the number of elements in that array. The value is an unsigned, 32-bit integer that is always numerically greater than the highest index in the array.\n\n## Value\n\nA non-negative integer less than 2<sup>32</sup>.\n\n## Description\n\nThe value of the `length` property is a non-negative integer with a value less than 2<sup>32</sup>.\n\n```js\nconst listA = [1, 2, 3];\nconst listB = new Array(6);\n\nconsole.log(listA.length);\n// 3\n\nconsole.log(listB.length);\n// 6\n\nlistB.length = 2 ** 32; // 4294967296\n// RangeError: Invalid array length\n\nconst listC = new Array(-100); // Negative numbers are not allowed\n// RangeError: Invalid array length\n```\n\nThe array object observes the `length` property, and automatically syncs the `length` value with the array's content. This means:\n\n- Setting `length` to a value smaller than the current length truncates the array — elements beyond the new `length` are deleted.\n- Setting any array index (a non-negative integer smaller than 2<sup>32</sup>) beyond the current `length` extends the array — the `length` property is increased to reflect the new highest index.\n- Setting `length` to an invalid value (e.g. a negative number or a non-integer) throws a `RangeError` exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Array/prototype/map.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.map()\n\nThe **`map()`** method **creates\na new array** populated with the results of calling a provided function on\nevery element in the calling array.\n\n## Syntax\n\n```js\n// Arrow function\nmap((element) => { /* … */ })\nmap((element, index) => { /* … */ })\nmap((element, index, array) => { /* … */ })\n\n// Callback function\nmap(callbackFn)\nmap(callbackFn, thisArg)\n\n// Inline callback function\nmap(function (element) { /* … */ })\nmap(function (element, index) { /* … */ })\nmap(function (element, index, array) { /* … */ })\nmap(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value is added as a single element in the new array.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `map()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\nA new array with each element being the result of the callback function.\n\n## Description\n\nThe `map()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array and constructs a new array from the results.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nThe `map()` method is a copying method. It does not alter `this`. However, the function provided as `callbackFn` can mutate the array. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `map()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `map()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n\nSince `map` builds a new array, calling it without using the returned\narray is an anti-pattern; use [`Array.prototype.forEach()`](./forEach.mdx) or\n`for...of` instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Array/prototype/pop.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.pop()\n\nThe **`pop()`** method removes the **last**\nelement from an array and returns that element. This method changes the length of the\narray.\n\n## Syntax\n\n```js\npop()\n```\n\n### Return value\n\nThe removed element from the array; [`undefined`](../../../globals/undefined.mdx) if the array is empty.\n\n## Description\n\nThe `pop()` method removes the last element from an array and returns that value to the caller. If you call `pop()` on an empty array, it returns [`undefined`](../../../globals/undefined.mdx).\n\n[`Array.prototype.shift()`](./shift.mdx) has similar behavior to `pop()`, but applied to the first element in an array.\n\nThe `pop()` method is a mutating method. It changes the length and the content of `this`. In case you want the value of `this` to be the same, but return a new array with the last element removed, you can use [`arr.slice(0, -1)`](./slice.mdx) instead.\n\nThe `pop()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Array/prototype/push.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.push()\n\nThe **`push()`** method adds one or more elements to the end of\nan array and returns the new length of the array.\n\n## Syntax\n\n```js\npush(element0)\npush(element0, element1)\npush(element0, element1, /* … ,*/ elementN)\n```\n\n### Parameters\n\n- `elementN`\n  - : The element(s) to add to the end of the array.\n\n### Return value\n\nThe new [`Array.prototype.length`](./length.mdx) property of the object upon which the method was called.\n\n## Description\n\nThe `push()` method appends values to an array.\n\n[`Array.prototype.unshift()`](./unshift.mdx)has similar behavior to `push()`, but applied to the start of an array.\n\nThe `push()` method is a mutating method. It changes the length and the content of `this`. In case you want the value of `this` to be the same, but return a new array with elements appended to the end, you can use [`arr.concat([element0, element1, /* ... ,*/ elementN])`](./concat.mdx) instead. Notice that the elements are wrapped in an extra array — otherwise, if the element is an array itself, it would be spread instead of pushed as a single element due to the behavior of `concat()`.\n\nThe `push()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Array/prototype/reduce.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.reduce()\n\nThe **`reduce()`** method executes a user-supplied \"reducer\" callback function on each element of the array, in order, passing in the return value from the calculation on the preceding element.\nThe final result of running the reducer across all elements of the array is a single value.\n\nThe first time that the callback is run there is no \"return value of the previous calculation\".\nIf supplied, an initial value may be used in its place.\nOtherwise the array element at index 0 is used as the initial value and iteration starts from the next element (index 1 instead of index 0).\n\nPerhaps the easiest-to-understand case for `reduce()` is to return the sum of all the elements in an array:\n\nThe reducer walks through the array element-by-element, at each step adding the current array value to the result from the previous step (this result is the running sum of all the previous steps) — until there are no more elements to add.\n\n## Syntax\n\n```js\n// Arrow function\nreduce((accumulator, currentValue) => { /* … */ })\nreduce((accumulator, currentValue, currentIndex) => { /* … */ })\nreduce((accumulator, currentValue, currentIndex, array) => { /* … */ })\n\nreduce((accumulator, currentValue) => { /* … */ }, initialValue)\nreduce((accumulator, currentValue, currentIndex) => { /* … */ }, initialValue)\nreduce((accumulator, currentValue, currentIndex, array) => { /* … */ }, initialValue)\n\n// Callback function\nreduce(callbackFn)\nreduce(callbackFn, initialValue)\n\n// Inline callback function\nreduce(function (accumulator, currentValue) { /* … */ })\nreduce(function (accumulator, currentValue, currentIndex) { /* … */ })\nreduce(function (accumulator, currentValue, currentIndex, array) { /* … */ })\n\nreduce(function (accumulator, currentValue) { /* … */ }, initialValue)\nreduce(function (accumulator, currentValue, currentIndex) { /* … */ }, initialValue)\nreduce(function (accumulator, currentValue, currentIndex, array) { /* … */ }, initialValue)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value becomes the value of the `accumulator` parameter on the next invocation of `callbackFn`. For the last invocation, the return value becomes the return value of `reduce()`.\n\n    The function is called with the following arguments:\n\n    - `accumulator`\n      - : The value resulting from the previous call to `callbackFn`. On first call, `initialValue` if specified, otherwise the value of `array[0]`.\n    - `currentValue`\n      - : The value of the current element. On first call, the value of `array[0]` if an `initialValue` was specified, otherwise the value of `array[1]`.\n    - `currentIndex`\n      - : The index position of `currentValue` in the array. On first call, `0` if `initialValue` was specified, otherwise `1`.\n    - `array`\n      - : The array `reduce()` was called upon.\n\n- `initialValue` _**optional**_\n  - : A value to which `accumulator` is initialized the first time the callback is called.\n    If `initialValue` is specified, `callbackFn` starts executing with the first value in the array as `currentValue`.\n    If `initialValue` is _not_ specified, `accumulator` is initialized to the first value in the array, and `callbackFn` starts executing with the second value in the array as `currentValue`. In this case, if the array is empty (so that there's no first value to return as `accumulator`), an error is thrown.\n\n### Return value\n\nThe value that results from running the \"reducer\" callback function to completion over the entire array.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n\n  - : The array contains no elements and `initialValue` is not provided.\n\n## Description\n\nThe `reduce()` method is an iterative method. It runs a \"reducer\" callback function over all elements in the array, in ascending-index order, and accumulates them into a single value. Every time, the return value of `callbackFn` is passed into `callbackFn` again on next invocation as `accumulator`. The final value of `accumulator` (which is the value returned from `callbackFn` on the final iteration of the array) becomes the return value of `reduce()`.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nUnlike other [iterative methods](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array#iterative_methods), `reduce()` does not accept a `thisArg` argument. `callbackFn` is always called with `undefined` as `this`, which gets substituted with `globalThis` if `callbackFn` is non-strict.\n\n`reduce()` is a central concept in [functional programming](https://en.wikipedia.org/wiki/Functional_programming), where it's not possible to mutate any value, so in order to accumulate all values in an array, one must return a new accumulator value on every iteration. This convention propagates to JavaScript's `reduce()`: you should use [spreading](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) or other copying methods where possible to create new arrays and objects as the accumulator, rather than mutating the existing one. If you decided to mutate the accumulator instead of copying it, remember to still return the modified object in the callback, or the next iteration will receive undefined.\n\n`reduce()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `reduce()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `reduce()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n\n### When to not use reduce()\n\nRecursive functions like `reduce()` can be powerful but sometimes difficult to understand, especially for less-experienced JavaScript developers. If code becomes clearer when using other array methods, developers must weigh the readability tradeoff against the other benefits of using `reduce()`. In cases where `reduce()` is the best choice, documentation and semantic variable naming can help mitigate readability drawbacks.\n\n### Edge cases\n\nIf the array only has one element (regardless of position) and no `initialValue` is provided, or if `initialValue` is provided but the array is empty, the solo value will be returned _without_ calling `callbackFn`.\n\nIf `initialValue` is provided and the array is not empty, then the reduce method will always invoke the callback function starting at index 0.\n\nIf `initialValue` is not provided then the reduce method will act differently for arrays with length larger than 1, equal to 1 and 0, as shown in the following example:\n\n```js\nconst getMax = (a, b) => Math.max(a, b);\n\n// callback is invoked for each element in the array starting at index 0\n[1, 100].reduce(getMax, 50); // 100\n[50].reduce(getMax, 10); // 50\n\n// callback is invoked once for element at index 1\n[1, 100].reduce(getMax); // 100\n\n// callback is not invoked\n[50].reduce(getMax); // 50\n[].reduce(getMax, 1); // 1\n\n[].reduce(getMax); // TypeError\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Array/prototype/reduceRight.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.reduceRight()\n\nThe **`reduceRight()`** method applies a function against an\naccumulator and each value of the array (from right-to-left) to reduce it to a single\nvalue.\n\nSee also [`Array.prototype.reduce()`](./reduce.mdx) for left-to-right.\n\n## Syntax\n\n```js\n// Arrow function\nreduceRight((accumulator, currentValue) => { /* … */ })\nreduceRight((accumulator, currentValue, index) => { /* … */ })\nreduceRight((accumulator, currentValue, index, array) => { /* … */ })\nreduceRight((accumulator, currentValue, index, array) => { /* … */ }, initialValue)\n\n// Callback function\nreduceRight(callbackFn)\nreduceRight(callbackFn, initialValue)\n\n// Callback reducer function\nreduceRight(function (accumulator, currentValue) { /* … */ })\nreduceRight(function (accumulator, currentValue, index) { /* … */ })\nreduceRight(function (accumulator, currentValue, index, array) { /* … */ })\nreduceRight(function (accumulator, currentValue, index, array) { /* … */ }, initialValue)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value becomes the value of the `accumulator` parameter on the next invocation of `callbackFn`. For the last invocation, the return value becomes the return value of `reduce()`.\n\n    The function is called with the following arguments:\n\n    - `accumulator`\n      - : The value previously returned in the last invocation of the callback, or\n        `initialValue`, if supplied. (See below.)\n    - `currentValue`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `reduceRight()` was called upon.\n\n- `initialValue` _**optional**_\n  - : Value to use as accumulator to the first call of the\n    `callbackFn`. If no initial value is supplied, the last element in\n    the array will be used and skipped. Calling reduce or reduceRight on an empty array\n    without an initial value creates a `TypeError`.\n\n### Return value\n\nThe value that results from the reduction.\n\n## Description\n\nThe `reduceRight()` method is an iterative method. It runs a \"reducer\" callback function over all elements in the array, in descending-index order, and accumulates them into a single value.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nUnlike other [iterative methods](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array#iterative_methods), `reduce()` does not accept a `thisArg` argument. `callbackFn` is always called with `undefined` as `this`, which gets substituted with `globalThis` if `callbackFn` is non-strict.\n\n`reduceRight()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `reduceRight()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `reduceRight()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Array/prototype/reverse.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.reverse()\n\nThe **`reverse()`** method reverses an array _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_ and returns the reference to the same array, the first array element now becoming the last, and the last array element becoming the first. In other words, elements order in the array will be turned towards the direction opposite to that previously stated.\n\n## Syntax\n\n```js\nreverse()\n```\n\n### Return value\n\nThe reference to the original array, now reversed. Note that the array is reversed _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_, and no copy is made.\n\n## Description\n\nThe `reverse()` method transposes the elements of the calling array object in\nplace, mutating the array, and returning a reference to the array.\n\nThe `reverse()` method preserves empty slots. If the source array is sparse, the empty slots' corresponding new indices are [deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) and also become empty slots.\n\nThe `reverse()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Array/prototype/shift.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.shift()\n\nThe **`shift()`** method removes the **first**\nelement from an array and returns that removed element. This method changes the length\nof the array.\n\n## Syntax\n\n```js\nshift()\n```\n\n### Return value\n\nThe removed element from the array; [`undefined`](../../../globals/undefined.mdx) if the array is empty.\n\n## Description\n\nThe `shift()` method removes the element at the zeroth index and shifts the\nvalues at consecutive indexes down, then returns the removed value. If the\n[`Array.prototype.length`](./length.mdx) property is 0, [`undefined`](../../../globals/undefined.mdx) is returned.\n\nThe [`Array.prototype.pop()`](./pop.mdx) method has similar behavior to `shift()`, but applied to the last element in an array.\n\nThe `shift()` method is a mutating method. It changes the length and the content of `this`. In case you want the value of `this` to be the same, but return a new array with the first element removed, you can use [`arr.slice(1)`](./slice.mdx) instead.\n\nThe `shift()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Array/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.slice()\n\nThe **`slice()`** method returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of a portion of\nan array into a new array object selected from `start` to `end`\n(`end` not included) where `start` and `end` represent\nthe index of items in that array. The original array will not be modified.\n\n## Syntax\n\n```js\nslice()\nslice(start)\nslice(start, end)\n```\n\n### Parameters\n\n- `start` _**optional**_\n  - : Zero-based index at which to start extraction, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, nothing is extracted.\n- `end` _**optional**_\n  - : Zero-based index at which to end extraction, converted to an integer. `slice()` extracts up to but not including `end`.\n    - Negative index counts back from the end of the array — if `end < 0`, `end + array.length` is used.\n    - If `end < -array.length`, `0` is used.\n    - If `end >= array.length` or `end` is omitted, `array.length` is used, causing all elements until the end to be extracted.\n    - If `end` is positioned before or at `start` after normalization, nothing is extracted.\n\n### Return value\n\nA new array containing the extracted elements.\n\n## Description\n\nThe `slice()` method is a copying method. It does not alter `this` but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains some of the same elements as the ones from the original array.\n\nThe `slice()` method preserves empty slots. If the sliced portion is sparse, the returned array is sparse as well.\n\nThe `slice()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Array/prototype/some.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.some()\n\nThe **`some()`** method tests whether\nat least one element in the array passes the test implemented by the provided\nfunction. It returns true if, in the array, it finds an element for which the provided function returns true; otherwise it returns false. It doesn't modify the array.\n\n## Syntax\n\n```js\n// Arrow function\nsome((element) => { /* … */ })\nsome((element, index) => { /* … */ })\nsome((element, index, array) => { /* … */ })\n\n// Callback function\nsome(callbackFn)\nsome(callbackFn, thisArg)\n\n// Inline callback function\nsome(function (element) { /* … */ })\nsome(function (element, index) { /* … */ })\nsome(function (element, index, array) { /* … */ })\nsome(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) to indicate the element passes the test, and a falsy value otherwise.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `some()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\n`true` if the callback function returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value for at least one element in the array. Otherwise, `false`.\n\n## Description\n\nThe `some()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array, until the `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. If such an element is found, `some()` immediately returns `true` and stops iterating through the array. Otherwise, if `callbackFn` returns a [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value for all elements, `some()` returns `false`.\n\n`some()` acts like the \"there exists\" quantifier in mathematics. In particular, for an empty array, it returns `false` for any condition.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\n`some()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `some()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\nThe `some()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Array/prototype/sort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.sort()\n\nThe **`sort()`** method sorts the elements of an array _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_ and returns the reference to the same array, now sorted. The default sort order is ascending, built upon converting the elements into strings, then comparing their sequences of UTF-16 code units values.\n\nThe time and space complexity of the sort cannot be guaranteed as it depends on the\nimplementation.\n\n## Syntax\n\n```js\n// Functionless\nsort()\n\n// Arrow function\nsort((a, b) => { /* … */ } )\n\n// Compare function\nsort(compareFn)\n\n// Inline compare function\nsort(function compareFn(a, b) { /* … */ })\n```\n\n### Parameters\n\n- `compareFn` _**optional**_\n\n  - : Specifies a function that defines the sort order. If omitted, the array elements are converted to strings, then sorted according to each character's Unicode code point value.\n\n    - `a`\n      - : The first element for comparison.\n    - `b`\n      - : The second element for comparison.\n\n### Return value\n\nThe reference to the original array, now sorted. Note that the array is sorted _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_, and no copy is made.\n\n## Description\n\nIf `compareFn` is not supplied, all non-`undefined` array\nelements are sorted by converting them to strings and comparing strings in UTF-16 code\nunits order. For example, \"banana\" comes before \"cherry\". In a numeric sort, 9 comes\nbefore 80, but because numbers are converted to strings, \"80\" comes before \"9\" in the\nUnicode order. All `undefined` elements are sorted to the end of the array.\n\nThe `sort()` method preserves empty slots. If the source array is sparse, the empty slots are moved to the end of the array, and always come after all the `undefined`.\n\n> **Note:** In UTF-16, Unicode characters above `\\uFFFF` are\n> encoded as two surrogate code units, of the range\n> `\\uD800` - `\\uDFFF`. The value of each code unit is taken\n> separately into account for the comparison. Thus the character formed by the surrogate\n> pair `\\uD855\\uDE51` will be sorted before the character\n> `\\uFF3A`.\n\nIf `compareFn` is supplied, all non-`undefined` array\nelements are sorted according to the return value of the compare function (all\n`undefined` elements are sorted to the end of the array, with no call to\n`compareFn`).\n\n| `compareFn(a, b)` return value | sort order                         |\n| ------------------------------ | ---------------------------------- |\n| > 0                            | sort `a` after `b`                 |\n| < 0                            | sort `a` before `b`                |\n| === 0                          | keep original order of `a` and `b` |\n\nSo, the compare function has the following form:\n\n```js\nfunction compareFn(a, b) {\n  if (a is less than b by some ordering criterion) {\n    return -1;\n  }\n  if (a is greater than b by the ordering criterion) {\n    return 1;\n  }\n  // a must be equal to b\n  return 0;\n}\n```\n\nMore formally, the comparator is expected to have the following properties, in order to ensure proper sort behavior:\n\n- _Pure_: The comparator does not mutate the objects being compared or any external state. (This is important because there's no guarantee _when_ and _how_ the comparator will be called, so any particular call should not produce visible effects to the outside.)\n- _Stable_: The comparator returns the same result with the same pair of input.\n- _Reflexive_: `compareFn(a, a) === 0`.\n- _Anti-symmetric_: `compareFn(a, b)` and `compareFn(b, a)` must both be `0` or have opposite signs.\n- _Transitive_: If `compareFn(a, b)` and `compareFn(b, c)` are both positive, zero, or negative, then `compareFn(a, c)` has the same positivity as the previous two.\n\nA comparator conforming to the constraints above will always be able to return all of `1`, `0`, and `-1`, or consistently return `0`. For example, if a comparator only returns `1` and `0`, or only returns `0` and `-1`, it will not be able to sort reliably because _anti-symmetry_ is broken. A comparator that always returns `0` will cause the array to not be changed at all, but is reliable nonetheless.\n\nThe default lexicographic comparator satisfies all constraints above.\n\nTo compare numbers instead of strings, the compare function can subtract `b`\nfrom `a`. The following function will sort the array in ascending order (if\nit doesn't contain `Infinity` and `NaN`):\n\n```js\nfunction compareNumbers(a, b) {\n  return a - b;\n}\n```\n\nThe `sort()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Array/prototype/splice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.splice()\n\nThe **`splice()`** method changes the contents of an array by\nremoving or replacing existing elements and/or adding new elements [in place](https://en.wikipedia.org/wiki/In-place_algorithm). To access part of an array without modifying it, see [`Array.prototype.slice()`](./slice.mdx).\n\n## Syntax\n\n```js\nsplice(start)\nsplice(start, deleteCount)\nsplice(start, deleteCount, item1)\nsplice(start, deleteCount, item1, item2, itemN)\n```\n\n### Parameters\n\n- `start`\n\n  - : Zero-based index at which to start changing the array, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, no element will be deleted, but the method will behave as an adding function, adding as many elements as provided.\n\n- `deleteCount` _**optional**_\n\n  - : An integer indicating the number of elements in the array to remove from `start`.\n\n    If `deleteCount` is omitted, or if its value is greater than or equal to the number of elements after the position specified by `start`, then all the elements from `start` to the end of the array will be deleted. However, if you wish to pass any `itemN` parameter, you should pass `Infinity` as `deleteCount` to delete all elements after `start`, because an explicit `undefined` gets [converted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#integer_conversion) to `0`.\n\n    If `deleteCount` is `0` or negative, no elements are removed.\n    In this case, you should specify at least one new element (see below).\n\n- `item1`, …, `itemN` _**optional**_\n\n  - : The elements to add to the array, beginning from `start`.\n\n    If you do not specify any elements, `splice()` will only remove elements from the array.\n\n### Return value\n\nAn array containing the deleted elements.\n\nIf only one element is removed, an array of one element is returned.\n\nIf no elements are removed, an empty array is returned.\n\n## Description\n\nThe `splice()` method is a mutating method. It may change the content of `this`. If the specified number of elements to insert differs from the number of elements being removed, the array's `length` will be changed as well. At the same time, it uses [`@@species`](../@@species.mdx) to create a new array instance to be returned.\n\nIf the deleted portion is sparse, the array returned by `splice()` is sparse as well, with those corresponding indices being empty slots.\n\nThe `splice()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Array/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string representing\nthe elements of the array. The elements are converted to Strings using their\n`toLocaleString` methods and these Strings are separated by a locale-specific\nString (such as a comma \",\").\n\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\n- `locales` _**optional**_\n  - : A string with a BCP 47 language tag, or an array of such strings. For the general form and interpretation of the `locales` argument, see [Locale identification and negotiation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation).\n- `options` _**optional**_\n  - : An object with configuration properties. For numbers, see [`Number.prototype.toLocaleString()`](../../../globals/Number/prototype/toLocaleString.mdx); for dates, see [`Date.prototype.toLocaleString()`](../../../globals/Date/prototype/toLocaleString.mdx).\n\n### Return value\n\nA string representing the elements of the array.\n\n## Description\n\nThe `Array.prototype.toLocaleString` method traverses its content, calling the `toLocaleString` method of every element with the `locales` and `options` parameters provided, and concatenates them with an implementation-defined separator (such as a comma \",\"). Note that the method itself does not consume the two parameters — it only passes them to the `toLocaleString()` of each element. The choice of the separator string depends on the host's current locale, not the `locales` parameter.\n\nIf an element is `undefined`, `null`, it is converted to an empty string instead of the string `\"null\"` or `\"undefined\"`.\n\nWhen used on sparse arrays, the `toLocaleString()` method iterates empty slots as if they have the value `undefined`.\n\nThe `toLocaleString()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Array/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.toString()\n\nThe **`toString()`** method returns a string representing the\nspecified array and its elements.\n\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the elements of the array.\n\n## Description\n\nThe `Array` object overrides the `toString` method of `Object`. The `toString` method of arrays calls [`join()`](../../../globals/Array/prototype/join.mdx) internally, which joins the array and returns one string containing each array element separated by commas. If the `join` method is unavailable or is not a function, [`Object.prototype.toString`](../../../globals/Object/prototype/toString.mdx) is used instead, returning `[object Array]`.\n\n```js\nconst arr = [];\narr.join = 1; // re-assign `join` with a non-function\nconsole.log(arr.toString()); // [object Array]\n\nconsole.log(Array.prototype.toString.call({ join: () => 1 })); // 1\n```\n\nJavaScript calls the `toString` method automatically when an array is to be represented as a text value or when an array is referred to in a string concatenation.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Array/prototype/unshift.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.unshift()\n\nThe **`unshift()`** method adds one or more elements to the\nbeginning of an array and returns the new length of the array.\n\n## Syntax\n\n```js\nunshift(element0)\nunshift(element0, element1)\nunshift(element0, element1, /* … ,*/ elementN)\n```\n\n### Parameters\n\n- `elementN`\n  - : The elements to add to the front of the `arr`.\n\n### Return value\n\nThe new [`Array.prototype.length`](./length.mdx) property of the object upon which the\nmethod was called.\n\n## Description\n\nThe `unshift()` method inserts the given values to the beginning of an\narray-like object.\n\n[`Array.prototype.push()`](./push.mdx) has similar behavior to `unshift()`, but applied to the end of an array.\n\nPlease note that, if multiple elements are passed as parameters, they're inserted in\nchunk at the beginning of the object, in the exact same order they were passed as\nparameters. Hence, calling `unshift()` with `n`\narguments **once**, or calling it `n` times with\n**1** argument (with a loop, for example), don't yield the same results.\n\nSee example:\n\n```js\nlet arr = [4, 5, 6];\n\narr.unshift(1, 2, 3);\nconsole.log(arr);\n// [1, 2, 3, 4, 5, 6]\n\narr = [4, 5, 6]; // resetting the array\n\narr.unshift(1);\narr.unshift(2);\narr.unshift(3);\n\nconsole.log(arr);\n// [3, 2, 1, 4, 5, 6]\n```\n\nThe `unshift()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Array/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.values()\n\nThe **`values()`** method returns a new _array [iterator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterator_protocol)_ object that iterates the value of each index in the array.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nA new iterable iterator object.\n\n## Description\n\n`Array.prototype.values()` is the default implementation of [`Array.prototype[@@iterator]()`](./@@iterator.mdx).\n\n```js\nArray.prototype.values === Array.prototype[Symbol.iterator]; // true\n```\n\nWhen used on sparse arrays, the `values()` method iterates empty slots as if they have the value `undefined`.\n\nThe `values()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/ArrayBuffer/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get ArrayBuffer\\[Symbol.species]\n\nThe **`ArrayBuffer[Symbol.species]`** accessor property returns the constructor used to construct return values from array buffer methods.\n\n> **Warning:** The existence of `Symbol.species` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Syntax\n\n```js\nArrayBuffer[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct return values from array buffer methods that create new array buffers.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `ArrayBuffer` objects. Subclass constructors may override it to change the constructor assignment. The default implementation is basically:\n\n```js\n// Hypothetical underlying implementation for illustration\nclass ArrayBuffer {\n  static get [Symbol.species]() {\n    return this;\n  }\n}\n```\n\nBecause of this polymorphic implementation, `Symbol.species` of derived subclasses would also return the constructor itself by default.\n\n```js\nclass SubArrayBuffer extends ArrayBuffer {}\nSubArrayBuffer[Symbol.species] === SubArrayBuffer; // true\n```\n\nWhen calling array buffer methods that do not mutate the existing object but return a new array buffer instance (for example, [`slice()`](./prototype/slice.mdx)), the object's `constructor[Symbol.species]` will be accessed. The returned constructor will be used to construct the return value of the array buffer method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/ArrayBuffer/ArrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer()\n\nThe **`ArrayBuffer()`** constructor is used to create \"ArrayBuffer\" objects.\n\n## Syntax\n\n```js\nnew ArrayBuffer(length)\n```\n\n> **Note:** `ArrayBuffer()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `length`\n  - : The size, in bytes, of the array buffer to create.\n\n### Return value\n\nA new `ArrayBuffer` object of the specified size. Its contents are\ninitialized to 0.\n\n### Exceptions\n\n- [`RangeError`](../RangeError/RangeError.mdx)\n  - : Thrown if the `length` is larger than `Number_MAX_SAFE_INTEGER` (≥ 2<sup>53</sup>) or negative.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/ArrayBuffer/isView.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer.isView\n\nThe **`ArrayBuffer.isView()`** method determines whether the\npassed value is one of the `ArrayBuffer` views,\nsuch as [typed array objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray)\nor a [`DataView`](../DataView/DataView.mdx).\n\n## Syntax\n\n```js\nArrayBuffer.isView(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be checked.\n\n### Return value\n\n`true` if the given argument is one of the `ArrayBuffer` views;\notherwise, `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/ArrayBuffer/prototype/byteLength.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer.prototype.byteLength\n\nThe **`byteLength`** accessor property represents the length of an `ArrayBuffer` in bytes.\n\n## Description\n\nThe `byteLength` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when the array is constructed and cannot be changed. This property returns 0 if this `ArrayBuffer` has been detached.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/ArrayBuffer/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer.prototype.slice()\n\nThe **`slice()`** method returns a new `ArrayBuffer`\nwhose contents are a copy of this `ArrayBuffer`'s bytes from\n`begin`, inclusive, up to `end`, exclusive.\n\n## Syntax\n\n```js\nslice(begin)\nslice(begin, end)\n```\n\n### Parameters\n\n- `begin`\n  - : Zero-based byte index at which to begin slicing.\n- `end` _**optional**_\n  - : Byte index before which to end slicing. If end is unspecified, the new\n    `ArrayBuffer` contains all bytes from begin to the end of this\n    `ArrayBuffer`. If negative, it will make the Byte index begin from the last\n    Byte.\n\n### Return value\n\nA new `ArrayBuffer` object.\n\n## Description\n\nThe `slice()` method copies up to, but not including, the byte indicated by\nthe `end` parameter. If either `begin` or `end` is\nnegative, it refers to an index from the end of the array, as opposed to from the\nbeginning.\n\nThe range specified by the `begin` and `end` parameters is\nclamped to the valid index range for the current array. If the computed length of the\nnew `ArrayBuffer` would be negative, it is clamped to zero.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/BigInt/BigInt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt()\n\nThe **`BigInt()`** function returns a value of type **bigint**.\n\n## Syntax\n\n```js\nBigInt(value)\n```\n\n> **Note:** `BigInt()` can only be called without `new`. Attempting to construct it with `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `value`\n  - : The numeric value of the object being created. It may be a string, an integer, a boolean, or another `BigInt`.\n\n### Return value\n\nA `BigInt` value. Number values must be integers and are converted to BigInts. The boolean value `true` becomes `1n`, and `false` becomes `0n`. Strings are parsed as if they are source text for integer literals, which means they can have leading and trailing whitespaces and can be prefixed with `0b`, `0o`, or `0x`.\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if the parameter is a non-integral number.\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if at least one of these conditions is met:\n    - The parameter cannot be converted to a primitive.\n    - After conversion to a primitive, the result is [`undefined`](../undefined.mdx), `null`, `Symbol`.\n- [`SyntaxError`](../SyntaxError/SyntaxError.mdx)\n  - : Thrown if the parameter is a string that cannot be parsed as a `BigInt`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/BigInt/asIntN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.asIntN()\n\nThe **`BigInt.asIntN`** static method clamps a `BigInt` value to the given number of bits, and returns that value as a signed integer.\n\n## Syntax\n\n```js\nBigInt.asIntN(bits, bigint)\n```\n\n### Parameters\n\n- `bits`\n  - : The amount of bits available for the returned BigInt. Should be an integer between 0 and 2<sup>53</sup> - 1, inclusive.\n- `bigint`\n  - : The BigInt value to clamp to fit into the supplied bits.\n\n### Return value\n\nThe value of `bigint` modulo 2^`bits`, as a signed integer.\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `bits` is negative or greater than 2<sup>53</sup> - 1.\n\n## Description\n\nThe `BigInt.asIntN` method clamps a `BigInt` value to the given number of bits, and interprets the result as a signed integer. For example, for `BigInt.asIntN(3, 25n)`, the value `25n` is clamped to `1n`:\n\n```plain\n25n = 00011001 (base 2)\n          ^=== Clamp to three remaining bits\n===>       001 (base 2) = 1n\n```\n\nIf the leading bit of the remaining number is `1`, the result is negative. For example, `BigInt.asIntN(4, 25n)` yields `-7n`, because `1001` is the encoding of `-7` under two's complement:\n\n```plain\n25n = 00011001 (base 2)\n         ^==== Clamp to four remaining bits\n===>      1001 (base 2) = -7n\n```\n\n> **Note:** `BigInt` values are always encoded as two's complement in binary.\n\nUnlike similar language APIs such as [`Number.prototype.toExponential()`](../Number/prototype/toExponential.mdx), `asIntN` is a static property of `BigInt`, so you always use it as `BigInt.asIntN()`, rather than as a method of a BigInt value. Exposing `asIntN()` as a \"standard library function\" allows [interop with asm.js](https://github.com/tc39/proposal-bigint/blob/master/ADVANCED.md#dont-break-asmjs).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/BigInt/asUintN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.asUintN()\n\nThe **`BigInt.asUintN`** static method clamps a `BigInt` value to the given number of bits, and returns that value as an unsigned integer.\n\n## Syntax\n\n```js\nBigInt.asUintN(bits, bigint)\n```\n\n### Parameters\n\n- `bits`\n  - : The amount of bits available for the returned BigInt. Should be an integer between 0 and 2<sup>53</sup> - 1, inclusive.\n- `bigint`\n  - : The BigInt value to clamp to fit into the supplied bits.\n\n### Return value\n\nThe value of `bigint` modulo 2^`bits`, as an unsigned integer.\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `bits` is negative or greater than 2<sup>53</sup> - 1.\n\n## Description\n\nThe `BigInt.asUintN` method clamps a `BigInt` value to the given number of bits, and interprets the result as an unsigned integer. Unsigned integers have no sign bits and are always non-negative. For example, for `BigInt.asUintN(4, 25n)`, the value `25n` is clamped to `9n`:\n\n```plain\n25n = 00011001 (base 2)\n         ^==== Clamp to four remaining bits\n===>      1001 (base 2) = 9n\n```\n\n> **Note:** `BigInt` values are always encoded as two's complement in binary.\n\nUnlike similar language APIs such as [`Number.prototype.toExponential()`](../Number/prototype/toExponential.mdx), `asUintN` is a static property of `BigInt`, so you always use it as `BigInt.asUintN()`, rather than as a method of a BigInt value. Exposing `asUintN()` as a \"standard library function\" allows [interop with asm.js](https://github.com/tc39/proposal-bigint/blob/master/ADVANCED.md#dont-break-asmjs).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/BigInt/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string with a language-sensitive representation of this BigInt. In implementations with [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) support, this method simply calls `Intl.NumberFormat`.\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` parameters customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat), these parameters correspond exactly to the [`Intl.NumberFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) constructor's parameters. Implementations without `Intl.NumberFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#locales) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored.\n\nSee the [`Intl.NumberFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string with a language-sensitive representation of the given BigInt.\n\nIn implementations with `Intl.NumberFormat`, this is equivalent to `new Intl.NumberFormat(locales, options).format(number)`.\n\n## Performance\n\nWhen formatting large numbers of numbers, it is better to create a\n`Intl.NumberFormat` object and use the function provided by its\n`format()` method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/BigInt/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified `BigInt` value. The trailing \"n\" is not part of the string.\n\n## Syntax\n\n```js\ntoString()\ntoString(radix)\n```\n\n### Parameters\n\n- `radix` _**optional**_\n  - : An integer in the range 2 through 36 specifying the base to use for representing the BigInt value. Defaults to 10.\n\n### Return value\n\nA string representing the specified `BigInt` value.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `radix` is less than 2 or greater than 36.\n\n## Description\n\nThe `BigInt` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../Object/prototype/toString.mdx). For `BigInt` values, the `toString()` method returns a string representation of the value in the specified radix.\n\nFor radixes above 10, the letters of the alphabet indicate digits greater than 9. For example, for hexadecimal numbers (base 16) `a` through `f` are used.\n\nIf the specified BigInt value is negative, the sign is preserved. This is the case even if the radix is 2; the string returned is the positive binary representation of the BigInt value preceded by a `-` sign, **not** the two's complement of the BigInt value.\n\nThe `toString()` method requires its `this` value to be a `BigInt` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to BigInt values.\n\nBecause `BigInt` doesn't have a [`[Symbol.toPrimitive]()`](../../Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `BigInt` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, BigInt _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — rather, they are directly converted using the same algorithm as the initial `toString()` implementation.\n\n```js\nBigInt.prototype.toString = () => \"Overridden\";\nconsole.log(`${1n}`); // \"1\"\nconsole.log(`${Object(1n)}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/BigInt/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.prototype.valueOf()\n\nThe **`valueOf()`** method returns the wrapped primitive value\nof a `BigInt` object.\n\n## Syntax\n\n```js\nbigIntObj.valueOf()\n```\n\n### Return value\n\nA BigInt representing the primitive value of the specified `BigInt` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/BigInt64Array/BigInt64Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt64Array()\n\nThe **`BigInt64Array()`** typed array constructor creates a\nnew `BigInt64Array` object, which is, an array of 64-bit signed integers\nin the platform byte order. If control over byte order is needed, use\n[`DataView`](../DataView/DataView.mdx) instead. The contents are initialized to `0n`. Once\nestablished, you can reference elements in the array using the object's methods, or by\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew BigInt64Array()\nnew BigInt64Array(length)\nnew BigInt64Array(typedArray)\nnew BigInt64Array(object)\n\nnew BigInt64Array(buffer)\nnew BigInt64Array(buffer, byteOffset)\nnew BigInt64Array(buffer, byteOffset, length)\n```\n\n> **Note:** `BigInt64Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/BigUint64Array/BigUint64Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigUint64Array()\n\nThe **`BigUint64Array()`** typed array constructor creates a\nnew `BigUint64Array` object, which is, an array of 64-bit unsigned integers\nin the platform byte order. If control over byte order is needed, use\n[`DataView`](../DataView/DataView.mdx) instead. The contents are initialized to `0n`. Once\nestablished, you can reference elements in the array using the object's methods, or by\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew BigUint64Array()\nnew BigUint64Array(length)\nnew BigUint64Array(typedArray)\nnew BigUint64Array(object)\n\nnew BigUint64Array(buffer)\nnew BigUint64Array(buffer, byteOffset)\nnew BigUint64Array(buffer, byteOffset, length)\n```\n\n> **Note:** `BigUint64Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](..//TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Blob/Blob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob()\n\nThe **`Blob()`** constructor creates a `Blob` object, which represents a file-like object of immutable, raw data.\n\n## Syntax\n\n```js\nnew Blob()\nnew Blob(array)\nnew Blob(array, options)\n```\n\n> **Note:** `Blob()` can only be constructed with `new`. Attempting to call it without `new` throws a `TypeError`.\n\n### Parameters\n\n- `array` _**optional**_\n\n  - : An array of values to include in the `Blob`. These can be [`ArrayBuffer`](../../globals/ArrayBuffer/ArrayBuffer.mdx), [`Blob`](../../globals/Blob/Blob.mdx), or strings. If any of these elements is a [`Blob`](../../globals/Blob/Blob.mdx), its content (and not the object itself) is copied into the Blob being constructed.\n\n- `options` _**optional**_\n\n  - : An object containing optional attributes for the `Blob`.\n    - `type`\n      - : A string indicating the MIME type of the data. The default value is the empty string `\"\"`.\n    - `endings`\n      - : A string indicating how to handle line endings in the data. This can be either `\"transparent\"` (default) to keep line endings unchanged, or `\"native\"` to convert line endings to the platform's native line endings (e.g., `\\r\\n` on Windows).\n\n### Return value\n\nA new `Blob` object containing the specified data.\n\n## Description\n\n`Blob` objects represent data that isn't necessarily in a JavaScript-native format. The `File` interface is based on `Blob`, inheriting its functionality and expanding it to support files on the user's system.\n\nTo construct a `Blob` from other non-blob objects and data, use the `Blob()` constructor. To create a blob that contains a subset of another blob's data, use the [`slice()`](../../globals/Blob/prototype/slice.mdx) method.\n\nThe `type` property of a `Blob` object will match the MIME type specified in the constructor's `options` parameter, defaulting to an empty string if not specified.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Blob/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the `Blob` interface returns a `Promise` that resolves with an `ArrayBuffer` containing the entire contents of the `Blob` as binary data.\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with an `ArrayBuffer` containing the blob's data.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Blob/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.size\n\nThe **`size`** read-only property of the `Blob` interface returns the size of the `Blob` in bytes.\n\n## Value\n\nA number representing the size of the `Blob` in bytes.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Blob/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.slice()\n\nThe **`slice()`** method of the `Blob` interface creates and returns a new `Blob` object which contains data from a subset of the blob on which it's called.\n\n## Syntax\n\n```js\nslice()\nslice(start)\nslice(start, end)\nslice(start, end, contentType)\n```\n\n### Parameters\n\n- `start` _**optional**_\n  - : The 0-based index of the first byte to include in the new `Blob`. If negative, it refers to an index from the end of the `Blob`. The default value is 0.\n- `end` _**optional**_\n  - : The 0-based index of the first byte that will not be included in the new `Blob`. If negative, it refers to an index from the end of the `Blob`. The default value is `size`.\n- `contentType` _**optional**_\n  - : A string indicating the content type to assign to the new `Blob`. The default value is an empty string.\n\n### Return value\n\nA new `Blob` object containing the specified subset of data.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Blob/prototype/stream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.stream()\n\nThe **`stream()`** method of the `Blob` interface returns a `ReadableStream` that can be used to read the contents of the `Blob`.\n\n## Syntax\n\n```js\nstream()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `ReadableStream` that provides the data contained within the `Blob`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Blob/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.text()\n\nThe **`text()`** method of the `Blob` interface returns a `Promise` that resolves with a string containing the contents of the blob, interpreted as UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a string containing the blob's data as a text string. The data is always interpreted as UTF-8.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Blob/prototype/type.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.type\n\nThe **`type`** read-only property of the `Blob` interface returns the MIME type of the `Blob`.\n\n## Value\n\nA string indicating the MIME type of the `Blob`. If the type cannot be determined, this returns an empty string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Boolean/Boolean.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Boolean()\n\nThe **`Boolean()`** constructor can create `Boolean` objects or return primitive values of type boolean.\n\n## Syntax\n\n```js\nnew Boolean(value)\nBoolean(value)\n```\n\n> **Note:** `Boolean()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\n- `value`\n  - : The initial value of the `Boolean` object.\n\n### Return value\n\nWhen `Boolean()` is called as a constructor (with `new`), it creates a `Boolean` object, which is **not** a primitive.\n\nWhen `Boolean()` is called as a function (without `new`), it coerces the parameter to a boolean primitive.\n\n> **Warning:** You should rarely find yourself using `Boolean` as a constructor.\n\n## Description\n\nThe value passed as the first parameter is [converted to a boolean value](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean#boolean_coercion). If the value is omitted or is `0`, `-0`, `0n`, [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null), `false`, [`NaN`](../NaN.mdx), [`undefined`](../undefined.mdx), or the empty string (`\"\"`), then the object has an initial value of `false`. All other values, including any object, an empty array (`[]`), or the string `\"false\"`, create an object with an initial value of `true`.\n\n> **Note:** When the non-standard property [`document.all`](https://developer.mozilla.org/docs/Web/API/Document/all) is used as an argument for this constructor, the result is a `Boolean` object with the value `false`. This property is legacy and non-standard and should not be used.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Boolean/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Boolean.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified boolean value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified boolean value.\n\n## Description\n\nThe `Boolean` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../Object/prototype/toString.mdx). For `Boolean` values, the `toString` method returns a string representation of the boolean value, which is either `\"true\"` or `\"false\"`.\n\nThe `toString()` method requires its `this` value to be a `Boolean` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to boolean values.\n\nBecause `Boolean` doesn't have a [`[Symbol.toPrimitive]()`](../../Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `Boolean` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, boolean _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — rather, they are directly converted using the same algorithm as the initial `toString()` implementation.\n\n```js\nBoolean.prototype.toString = () => \"Overridden\";\nconsole.log(`${true}`); // \"true\"\nconsole.log(`${new Boolean(true)}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Boolean/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Boolean.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a\n`Boolean` object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nThe primitive value of the given `Boolean` object.\n\n## Description\n\nThe `valueOf()` method of `Boolean` returns the primitive value\nof a `Boolean` object or literal `Boolean` as a Boolean data type.\n\nThis method is usually called internally by JavaScript and not explicitly in code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/ByteLengthQueuingStrategy/ByteLengthQueuingStrategy.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ByteLengthQueuingStrategy()\n\nThe **`ByteLengthQueuingStrategy()`**\nconstructor creates and returns a `ByteLengthQueuingStrategy` object\ninstance.\n\n## Syntax\n\n```js\nnew ByteLengthQueuingStrategy(highWaterMark)\n```\n\n### Parameters\n\nAn object with the following property:\n\n- `highWaterMark`\n\n  - : The total number of bytes that can be contained in the internal queue before backpressure is applied.\n\n    Unlike `CountQueuingStrategy()` where the `highWaterMark` parameter specifies a simple count of the number of chunks, with `ByteLengthQueuingStrategy()`, the `highWaterMark` parameter specifies a number of _bytes_ — specifically, given a stream of chunks, how many bytes worth of those chunks (rather than a count of how many of those chunks) can be contained in the internal queue before backpressure is applied.\n\n### Return value\n\nAn instance of the `ByteLengthQueuingStrategy` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/ByteLengthQueuingStrategy/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ByteLengthQueuingStrategy.size()\n\nThe **`size()`** method of the\n`ByteLengthQueuingStrategy` interface returns the given chunk's\n`byteLength` property.\n\n## Syntax\n\n```js\nsize(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : A chunk of data being passed through the stream.\n\n### Return value\n\nAn integer representing the byte length of the given chunk.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/CompressionStream/CompressionStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CompressionStream()\n\nThe **`CompressionStream()`** constructor creates a new `CompressionStream` object which compresses a stream of data.\n\n## Syntax\n\n```js\nnew CompressionStream(format)\n```\n\n### Parameters\n\n- `format`\n\n  - : One of the following allowed compression formats:\n\n    - `\"gzip\"`\n    - `\"deflate\"`\n    - `\"deflate-raw\"`\n\n## Exceptions\n\n- `TypeError`\n  - : Thrown if the format passed to the constructor is not supported.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/CompressionStream/prototype/readable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CompressionStream.readable\n\nThe **`readable`** read-only property of the `CompressionStream` interface returns a `ReadableStream`.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/CompressionStream/prototype/writable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CompressionStream.writable\n\nThe **`writable`** read-only property of the `CompressionStream` interface returns a `WritableStream`.\n\n## Value\n\nA `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/CryptoKey/CryptoKey.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CryptoKey\n\nThe **`CryptoKey`** interface represents a cryptographic key obtained from one of the [`SubtleCrypto`](../SubtleCrypto/SubtleCrypto.mdx) method [`importKey()`](../SubtleCrypto/prototype/importKey.mdx).\n\n## Instance properties\n\n- [`type`](./prototype/type.mdx) _**readonly**_\n  - : The type of key the object represents. It may take one of the following values: `\"secret\"`, `\"private\"` or `\"public\"`.\n\n- [`extractable`](./prototype/extractable.mdx) _**readonly**_\n  - : A boolean value indicating whether or not the key may be extracted.\n\n- [`algorithm`](./prototype/algorithm.mdx) _**readonly**_\n  - : An object describing the algorithm for which this key can be used and any associated extra parameters.\n\n- [`usages`](./prototype/usages.mdx) _**readonly**_\n  - : An `Array` of strings, indicating what can be done with the key. Possible values for array elements are `\"encrypt\"`, `\"decrypt\"`, `\"sign\"`, `\"verify\"`, `\"deriveKey\"`, `\"deriveBits\"`, `\"wrapKey\"`, and `\"unwrapKey\"`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/CryptoKey/prototype/algorithm.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# algorithm\n\nThe read-only **`algorithm`** property of the [`CryptoKey`](../CryptoKey.mdx) interface returns an object describing the algorithm for which this key can be used, and any associated extra parameters.\n\nThe object returned depends of the algorithm used to generate the key.\n\n## Value\n\nAn object matching:\n\n- [`RsaHashedImportParams`](../../RsaHashedImportParams/RsaHashedImportParams.mdx) if the algorithm is any of the RSA variants.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/CryptoKey/prototype/extractable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# extractable\n\nThe read-only **`extractable`** property indicates whether or not the key may be extracted.\n\nIf the key cannot be exported, an exception will be thrown if an attempt to extract the key is made.\n\n## Value\n\nA boolean value that is `true` if the key can be exported and `false` if not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/CryptoKey/prototype/type.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# type\n\nThe read-only **`type`** property indicates which kind of key is represented by the object. It can have the following values:\n\n- `\"secret\"`: This key is a secret key for use with a symmetric algorithm.\n- `\"private\"`: This key is the private half of an asymmetric algorithm's key pair.\n- `\"public\"`: This key is the public half of an asymmetric algorithm's key pair.\n\n## Value\n\nOne of the following strings: `\"secret\"`, `\"private\"`, or `\"public\"`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/CryptoKey/prototype/usages.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# usages\n\nThe read-only **`usages`** property indicates what can be done with the key.\n\n## Value\n\nAn `Array` of strings from the following list:\n\n- `\"encrypt\"`: The key may be used to encrypt messages.\n- `\"decrypt\"`: The key may be used to decrypt messages.\n- `\"sign\"`: The key may be used to sign messages.\n- `\"verify\"`: The key may be used to verify signatures.\n- `\"deriveKey\"`: The key may be used in deriving a new key.\n- `\"deriveBits\"`: The key may be used in deriving bits.\n- `\"wrapKey\"`: The key may be used to wrap a key.\n- `\"unwrapKey\"`: The key may be used to unwrap a key.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/DOMException/DOMException.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException()\n\nThe **`DOMException()`** constructor returns a `DOMException` object with a specified message and name.\n\n## Syntax\n\n```js\nnew DOMException()\nnew DOMException(message)\nnew DOMException(message, name)\n```\n\n### Parameters\n\n- `message` _optional_\n  - : A description of the exception. If not present, the empty string `''` is\n    used.\n- `name` _optional_\n  - : A string. If the specified name is a [standard error name](#error-names), then getting the [`code`](./code.mdx) property of the `DOMException` object will return the code number corresponding to the specified name.\n\n### Return value\n\nA newly created `DOMException` object.\n\n## Error names\n\nCommon error names are listed here. Some APIs define their own sets of names, so this is not necessarily a complete list.\n\nNote that the following deprecated historical errors don't have an error name but instead have only a legacy constant code value and a legacy constant name:\n\n- Legacy code value: `2`, legacy constant name: `DOMSTRING_SIZE_ERR`\n- Legacy code value: `6`, legacy constant name: `NO_DATA_ALLOWED_ERR`\n- Legacy code value: `16`, legacy constant name: `VALIDATION_ERR`\n\n> **Note:** Because historically the errors were identified by a numeric value that corresponded with a named variable defined to have that value, some of the entries below indicate the legacy code value and constant name that were used in the past.\n\n- `IndexSizeError`\n  - : The index is not in the allowed range. (Legacy code value: `1` and legacy constant name: `INDEX_SIZE_ERR`)\n- `HierarchyRequestError`\n  - : The node tree hierarchy is not correct. (Legacy code value: `3` and legacy constant name: `HIERARCHY_REQUEST_ERR`)\n- `WrongDocumentError`\n  - : The object is in the wrong `Document`. (Legacy code value: `4` and legacy constant name: `WRONG_DOCUMENT_ERR`)\n- `InvalidCharacterError`\n  - : The string contains invalid characters. (Legacy code value: `5` and legacy constant name: `INVALID_CHARACTER_ERR`)\n- `NoModificationAllowedError`\n  - : The object cannot be modified. (Legacy code value: `7` and legacy constant name: `NO_MODIFICATION_ALLOWED_ERR`)\n- `NotFoundError`\n  - : The object cannot be found here. (Legacy code value: `8` and legacy constant name: `NOT_FOUND_ERR`)\n- `NotSupportedError`\n  - : The operation is not supported. (Legacy code value: `9` and legacy constant name: `NOT_SUPPORTED_ERR`)\n- `InvalidStateError`\n  - : The object is in an invalid state. (Legacy code value: `11` and legacy constant name: `INVALID_STATE_ERR`)\n- `InUseAttributeError`\n  - : The attribute is in use. (Legacy code value: `10` and legacy constant name: `INUSE_ATTRIBUTE_ERR`)\n- `SyntaxError`\n  - : The string did not match the expected pattern. (Legacy code value: `12` and legacy constant name: `SYNTAX_ERR`)\n- `InvalidModificationError`\n  - : The object cannot be modified in this way. (Legacy code value: `13` and legacy constant name: `INVALID_MODIFICATION_ERR`)\n- `NamespaceError`\n  - : The operation is not allowed by Namespaces in XML. (Legacy code value: `14` and legacy constant name: `NAMESPACE_ERR`)\n- `InvalidAccessError`\n  - : The object does not support the operation or argument. (Legacy code value: `15` and legacy constant name: `INVALID_ACCESS_ERR`)\n- `TypeMismatchError` *deprecated*\n  - : The type of the object does not match the expected type. (Legacy code value: `17` and legacy constant name: `TYPE_MISMATCH_ERR`) This value is deprecated; the JavaScript `TypeError` exception is now raised instead of a `DOMException` with this value.\n- `SecurityError`\n  - : The operation is insecure. (Legacy code value: `18` and legacy constant name: `SECURITY_ERR`)\n- `NetworkError`\n  - : A network error occurred. (Legacy code value: `19` and legacy constant name: `NETWORK_ERR`)\n- `AbortError`\n  - : The operation was aborted. (Legacy code value: `20` and legacy constant name: `ABORT_ERR`)\n- `URLMismatchError`\n  - : The given URL does not match another URL. (Legacy code value: `21` and legacy constant name: `URL_MISMATCH_ERR`)\n- `QuotaExceededError`\n  - : The quota has been exceeded. (Legacy code value: `22` and legacy constant name: `QUOTA_EXCEEDED_ERR`)\n- `TimeoutError`\n  - : The operation timed out. (Legacy code value: `23` and legacy constant name: `TIMEOUT_ERR`)\n- `InvalidNodeTypeError`\n  - : The node is incorrect or has an incorrect ancestor for this operation. (Legacy code value: `24` and legacy constant name: `INVALID_NODE_TYPE_ERR`)\n- `DataCloneError`\n  - : The object can not be cloned. (Legacy code value: `25` and legacy constant name: `DATA_CLONE_ERR`)\n- `EncodingError`\n  - : The encoding or decoding operation failed (No legacy code value and constant name).\n- `NotReadableError`\n  - : The input/output read operation failed (No legacy code value and constant name).\n- `UnknownError`\n  - : The operation failed for an unknown transient reason (e.g. out of memory) (No legacy code value and constant name).\n- `ConstraintError`\n  - : A mutation operation in a transaction failed because a constraint was not satisfied (No legacy code value and constant name).\n- `DataError`\n  - : Provided data is inadequate (No legacy code value and constant name).\n- `TransactionInactiveError`\n  - : A request was placed against a transaction that is currently not active or is finished (No legacy code value and constant name).\n- `ReadOnlyError`\n  - : The mutating operation was attempted in a \"readonly\" transaction (No legacy code value and constant name).\n- `VersionError`\n  - : An attempt was made to open a database using a lower version than the existing version (No legacy code value and constant name).\n- `OperationError`\n  - : The operation failed for an operation-specific reason (No legacy code value and constant name).\n- `NotAllowedError`\n  - : The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission (No legacy code value and constant name)."
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/DOMException/code.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException.prototype.code\n\nThe **`code`** read-only property of the `DOMException` interface returns one of the legacy [error code constants](./DOMException.mdx#error-names), or `0` if none match.\n\nThis field is used for historical reasons. New DOM exceptions don't use this anymore: they put this info in the [`name`](./name.mdx) attribute.\n\n## Value\n\nOne of the [error code constants](./DOMException.mdx#error-names), or `0` if none match.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/DOMException/message.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException.prototype.message\n\nThe **`message`** read-only property of the `DOMException` interface returns a string representing a message or description associated with the given [error name](./DOMException.mdx#error-names).\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/DOMException/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException.prototype.name\n\nThe **`name`** read-only property of the `DOMException` interface returns a string that contains one of the strings associated with an [error name](./DOMException.mdx#error-names).\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/DataView/DataView.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView()\n\nThe **`DataView()`** constructor is used to create `DataView` objects.\n\n## Syntax\n\n```js\nnew DataView(buffer)\nnew DataView(buffer, byteOffset)\nnew DataView(buffer, byteOffset, byteLength)\n```\n\n> **Note:** `DataView()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `buffer`\n  - : An existing `ArrayBuffer` to use as\n    the storage backing the new `DataView` object.\n- `byteOffset` _**optional**_\n  - : The offset, in bytes, to the first byte in the above buffer for the new view to\n    reference. If unspecified, the buffer view starts with the first byte.\n- `byteLength` _**optional**_\n  - : The number of elements in the byte array. If unspecified, the view's length will\n    match the buffer's length.\n\n### Return value\n\nA new `DataView` object representing the specified data buffer.\n\n### Exceptions\n\n- [`RangeError`](../RangeError/RangeError.mdx)\n\n  - : Thrown if the `byteOffset` or `byteLength` parameter values\n    result in the view extending past the end of the buffer.\n\n    For example, if the buffer is 16 bytes long, the `byteOffset` is 8, and\n    the `byteLength` is 10, this error is thrown because the resulting view\n    tries to extend 2 bytes past the total length of the buffer.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/DataView/prototype/buffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.buffer\n\nThe **`buffer`** accessor property represents the `ArrayBuffer` referenced by the `DataView` at construction time.\n\n## Description\n\nThe `buffer` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when the `DataView` is constructed and cannot be changed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/DataView/prototype/byteLength.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.byteLength\n\nThe **`byteLength`** accessor property represents the length (in bytes) of the dataview.\n\n## Description\n\nThe `byteLength` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when an `DataView` is constructed and cannot be changed. If the `DataView` is not specifying an offset or a `byteLength`, the `byteLength` of the referenced `ArrayBuffer` or `SharedArrayBuffer` will be returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/DataView/prototype/byteOffset.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.byteOffset\n\nThe **`byteOffset`** accessor property represents the offset (in bytes) of this view from the start of its `ArrayBuffer`.\n\n## Description\n\nThe `byteOffset` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when an `DataView` is constructed and cannot be changed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/DataView/prototype/getBigInt64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getBigInt64()\n\nThe **`getBigInt64()`** method gets a signed 64-bit integer\n(long long) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetBigInt64(byteOffset)\ngetBigInt64(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to read the data from.\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is read.\n\n### Return value\n\nA `BigInt`.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would read beyond the end\n    of the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/DataView/prototype/getBigUint64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getBigUint64()\n\nThe **`getBigUint64()`** method gets an unsigned 64-bit integer\n(unsigned long long) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetBigUint64(byteOffset)\ngetBigUint64(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to read the data from.\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is read.\n\n### Return value\n\nA `BigInt`.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would read beyond the end\n    of the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/DataView/prototype/getFloat32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getFloat32()\n\nThe **`getFloat32()`** method gets a signed 32-bit float\n(float) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetFloat32(byteOffset)\ngetFloat32(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 32-bit float number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/DataView/prototype/getFloat64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getFloat64()\n\nThe **`getFloat64()`** method gets a signed 64-bit float\n(double) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetFloat64(byteOffset)\ngetFloat64(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 64-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 64-bit float number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/DataView/prototype/getInt16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getInt16()\n\nThe **`getInt16()`** method gets a signed 16-bit integer\n(short) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetInt16(byteOffset)\ngetInt16(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 16-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/DataView/prototype/getInt32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getInt32()\n\nThe **`getInt32()`** method gets a signed 32-bit integer (long)\nat the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetInt32(byteOffset)\ngetInt32(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in bytes, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 32-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/DataView/prototype/getInt8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getInt8()\n\nThe **`getInt8()`** method gets a signed 8-bit integer (byte)\nat the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetInt8(byteOffset)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n\n### Return value\n\nA signed 8-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/DataView/prototype/getUint16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getUint16()\n\nThe **`getUint16()`** method gets an unsigned 16-bit integer\n(unsigned short) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n\n\n## Syntax\n\n```js\ngetUint16(byteOffset)\ngetUint16(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nAn unsigned 16-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/DataView/prototype/getUint32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getUint32()\n\nThe **`getUint32()`** method gets an unsigned 32-bit integer\n(unsigned long) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n\n\n## Syntax\n\n```js\ngetUint32(byteOffset)\ngetUint32(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nAn unsigned 32-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/DataView/prototype/getUint8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getUint8()\n\nThe **`getUint8()`** method gets an unsigned 8-bit integer\n(unsigned byte) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetUint8(byteOffset)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n\n### Return value\n\nAn unsigned 8-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/DataView/prototype/setBigInt64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setBigInt64()\n\nThe **`setBigInt64()`** method stores a signed 64-bit integer\n(long long) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetBigInt64(byteOffset, value)\nsetBigInt64(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to store the data from.\n- value\n  - : The value to set as a `BigInt`. The highest possible value that fits in\n    a signed 64-bit integer is\n    `2n ** (64n -1n) - 1n` (`9223372036854775807n`). Upon\n    overflow, it will be negative (`-9223372036854775808n`).\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/DataView/prototype/setBigUint64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setBigUint64()\n\nThe **`setBigUint64()`** method stores an unsigned 64-bit\ninteger (unsigned long long) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetBigUint64(byteOffset, value)\nsetBigUint64(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to store the data from.\n- value\n  - : The value to set as a `BigInt`. The highest possible value that fits in\n    an unsigned 64-bit integer is\n    `2n ** 64n - 1n`\n    (`18446744073709551615n`). Upon overflow, it will be zero\n    (`0n`).\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/DataView/prototype/setFloat32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setFloat32()\n\nThe **`setFloat32()`** method stores a signed 32-bit float\n(float) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetFloat32(byteOffset, value)\nsetFloat32(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/DataView/prototype/setFloat64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setFloat64()\n\nThe **`setFloat64()`** method stores a signed 64-bit float\n(double) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetFloat64(byteOffset, value)\nsetFloat64(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 64-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/DataView/prototype/setInt16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setInt16()\n\nThe **`setInt16()`** method stores a signed 16-bit integer\n(short) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetInt16(byteOffset, value)\nsetInt16(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/DataView/prototype/setInt32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setInt32()\n\nThe **`setInt32()`** method stores a signed 32-bit integer\n(long) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetInt32(byteOffset, value)\nsetInt32(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/DataView/prototype/setInt8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setInt8()\n\nThe **`setInt8()`** method stores a signed 8-bit integer (byte)\nvalue at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetInt8(byteOffset, value)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/DataView/prototype/setUint16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setUint16()\n\nThe **`setUint16()`** method stores an unsigned 16-bit integer\n(unsigned short) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetUint16(byteOffset, value)\nsetUint16(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/DataView/prototype/setUint32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setUint32()\n\nThe **`setUint32()`** method stores an unsigned 32-bit integer\n(unsigned long) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetUint32(byteOffset, value)\nsetUint32(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/DataView/prototype/setUint8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setUint8()\n\nThe **`setUint8()`** method stores an unsigned 8-bit integer\n(byte) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetUint8(byteOffset, value)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/Date.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date()\n\nThe **`Date()`** constructor can create a `Date` instance or return a string representing the current time.\n\n## Syntax\n\n```js\nnew Date()\nnew Date(value)\nnew Date(dateString)\nnew Date(dateObject)\n\nnew Date(year, monthIndex)\nnew Date(year, monthIndex, day)\nnew Date(year, monthIndex, day, hours)\nnew Date(year, monthIndex, day, hours, minutes)\nnew Date(year, monthIndex, day, hours, minutes, seconds)\nnew Date(year, monthIndex, day, hours, minutes, seconds, milliseconds)\n\nDate()\n```\n\n> **Note:** `Date()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\nThere are five basic forms for the `Date()` constructor:\n\n#### No parameters\n\nWhen no parameters are provided, the newly-created `Date` object represents the current date and time as of the time of instantiation.\n\n#### Time value or timestamp number\n\n- `value`\n  - : An integer value representing the number of milliseconds since January 1, 1970, 00:00:00 UTC (the ECMAScript epoch, equivalent to the UNIX epoch), with leap seconds ignored. Keep in mind that most [UNIX Timestamp](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_16) functions are only accurate to the nearest second.\n\n#### Date string\n\n- `dateString`\n\n  - : A string value representing a date, in a format recognized by the [`Date.parse()`](./parse.mdx) method. (The ECMA262 spec specifies a [simplified version of ISO 8601](https://tc39.es/ecma262/#sec-date-time-string-format), but other formats can be implementation-defined, which commonly include [IETF-compliant RFC 2822 timestamps](https://datatracker.ietf.org/doc/html/rfc2822#page-14).)\n\n    > **Note:** When parsing date strings with the `Date` constructor (and `Date.parse`, they are equivalent), always make sure that the input conforms to the ISO 8601 format (`YYYY-MM-DDTHH:mm:ss.sssZ`) — the parsing behavior with other formats is implementation-defined and may not work across all browsers. Support for [RFC 2822](https://datatracker.ietf.org/doc/html/rfc2822) format strings is by convention only. A library can help if many different formats are to be accommodated.\n    >\n    > Date-only strings (e.g. `\"1970-01-01\"`) are treated as UTC, while date-time strings (e.g. `\"1970-01-01T12:00\"`) are treated as local. You are therefore also advised to make sure the input format is consistent between the two types.\n\n#### Date object\n\n- `dateObject`\n  - : An existing `Date` object. This effectively makes a copy of the existing `Date` object with the same date and time. This is equivalent to `new Date(dateObject.valueOf())`, except the `valueOf()` method is not called.\n\nWhen one parameter is passed to the `Date()` constructor, `Date` instances are specially treated. All other values are [converted to primitives](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion). If the result is a string, it will be parsed as a date string. Otherwise, the resulting primitive is further coerced to a number and treated as a timestamp.\n\n#### Individual date and time component values\n\nGiven at least a year and month, this form of `Date()` returns a `Date` object whose component values (year, month, day, hour, minute, second, and millisecond) all come from the following parameters. Any missing fields are given the lowest possible value (`1` for `day` and `0` for every other component). The parameter values are all evaluated against the local time zone, rather than UTC.\n\nIf any parameter overflows its defined bounds, it \"carries over\". For example, if a `monthIndex` greater than `11` is passed in, those months will cause the year to increment; if a `minutes` greater than `59` is passed in, `hours` will increment accordingly, etc. Therefore, `new Date(1990, 12, 1)` will return January 1st, 1991; `new Date(2020, 5, 19, 25, 65)` will return 2:05 A.M. June 20th, 2020.\n\nSimilarly, if any parameter underflows, it \"borrows\" from the higher positions. For example, `new Date(2020, 5, 0)` will return May 31st, 2020.\n\n- `year`\n  - : Integer value representing the year. Values from `0` to `99` map to the years `1900` to `1999`. All other values are the actual year. See the [example](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years).\n- `monthIndex`\n  - : Integer value representing the month, beginning with `0` for January to `11` for December.\n- `day` _**optional**_\n  - : Integer value representing the day of the month. The default is `1`.\n- `hours` _**optional**_\n  - : Integer value between `0` and `23` representing the hour of the day. Defaults to `0`.\n- `minutes` _**optional**_\n  - : Integer value representing the minute segment of a time. The default is `0` minutes past the hour.\n- `seconds` _**optional**_\n  - : Integer value representing the second segment of a time. The default is `0` seconds past the minute.\n- `milliseconds` _**optional**_\n  - : Integer value representing the millisecond segment of a time. The default is `0` milliseconds past the second.\n\n### Return value\n\nCalling `new Date()` (the `Date()` constructor) returns a [`Date`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date) object. If called with an invalid date string, or if the date to be constructed will have a UNIX timestamp less than `-8,640,000,000,000,000` or greater than `8,640,000,000,000,000` milliseconds, it returns a `Date` object whose [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toString) method returns the literal string `Invalid Date`.\n\nCalling the `Date()` function (without the `new` keyword) returns a string representation of the current date and time, exactly as `new Date().toString()` does. Any arguments given in a `Date()` function call (without the `new` keyword) are ignored; regardless of whether it's called with an invalid date string — or even called with any arbitrary object or other primitive as an argument — it always returns a string representation of the current date and time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/UTC.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.UTC()\n\nThe **`Date.UTC()`** method accepts parameters similar to the\n`Date` constructor, but treats them as UTC. It returns the number of\nmilliseconds since January 1, 1970, 00:00:00 UTC.\n\n\n\n## Syntax\n\n```js\nDate.UTC(year)\nDate.UTC(year, monthIndex)\nDate.UTC(year, monthIndex, day)\nDate.UTC(year, monthIndex, day, hour)\nDate.UTC(year, monthIndex, day, hour, minute)\nDate.UTC(year, monthIndex, day, hour, minute, second)\nDate.UTC(year, monthIndex, day, hour, minute, second, millisecond)\n```\n\n- `year`\n\n  - : Integer value representing the year.\n\n    Values from `0` to `99` map to the years\n    `1900` to `1999`. All other values are the actual year.\n    See the [example](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years).\n\n- `monthIndex` _**optional**_\n  - : An integer between `0` (January) and `11` (December)\n    representing the month. Since ECMAScript 2017 it defaults to `0` if\n    omitted. _(Up until ECMAScript 2016, `monthIndex` was a required\n    parameter. As of ES2017, it no longer is.)_\n- `day` _**optional**_\n  - : An integer between `1` and `31` representing the day of the\n    month. If omitted, defaults to `1`.\n- `hour` _**optional**_\n  - : An integer between `0` and `23` representing the hours. If\n    omitted, defaults to `0`.\n- `minute` _**optional**_\n  - : An integer between `0` and `59` representing the minutes. If\n    omitted, defaults to `0`.\n- `second` _**optional**_\n  - : An integer between `0` and `59` representing the seconds. If\n    omitted, defaults to `0`.\n- `millisecond` _**optional**_\n  - : An integer between `0` and `999` representing the\n    milliseconds. If omitted, defaults to `0`.\n\n### Return value\n\nA number representing the number of milliseconds for the given date since January 1,\n1970, 00:00:00, UTC.\n\n## Description\n\n`UTC()` takes comma-delimited date and time parameters and returns the\nnumber of milliseconds between January 1, 1970, 00:00:00, universal time and the\nspecified date and time.\n\nYears between `0` and `99` are converted to a year in the\n20th century `(1900 + year)`. For example, `95` is\nconverted to the year `1995`.\n\nThe `UTC()` method differs from the `Date` constructor in two\nways:\n\n1. `Date.UTC()` uses universal time instead of the local time.\n2. `Date.UTC()` returns a time value as a number instead of creating a\n   `Date` object.\n\nIf a parameter is outside of the expected range, the `UTC()` method updates\nthe other parameters to accommodate the value. For example, if `15` is used\nfor `monthIndex`, the year will be incremented by 1\n`(year + 1)` and `3` will be used for the month.\n\n`UTC()` is a static method of `Date`, so it's called as\n`Date.UTC()` rather than as a method of a `Date` instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/now.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.now()\n\nThe static **`Date.now()`** method returns the number of milliseconds elapsed since the [epoch](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps), which is defined as the midnight at the beginning of January 1, 1970, UTC.\n\n## Syntax\n\n```js\nDate.now()\n```\n\n### Return value\n\nA number representing the number of milliseconds elapsed since the [epoch](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps), which is defined as the midnight at the beginning of January 1, 1970, UTC.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/parse.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.parse()\n\nThe **`Date.parse()`** method parses a string representation of\na date, and returns the number of milliseconds since January 1, 1970, 00:00:00 UTC or\n`NaN` if the string is unrecognized or, in some cases, contains illegal date\nvalues (e.g. 2015-02-31).\n\nOnly the [ISO 8601 format](https://tc39.es/ecma262/#sec-date-time-string-format) (`YYYY-MM-DDTHH:mm:ss.sssZ`) is explicitly specified to be supported. Other formats are implementation-defined and may not work across all browsers. A library can help if many different formats are to be accommodated.\n\n## Syntax\n\n```js\nDate.parse(dateString)\n```\n\n### Parameters\n\n- `dateString`\n  - : A string representing [a simplification of the ISO 8601 calendar date extended format](#date-time-string-format).\n    (Other formats may be used, but results are implementation-dependent.)\n\n### Return value\n\nA number representing the milliseconds elapsed since January 1, 1970, 00:00:00 UTC and\nthe date obtained by parsing the given string representation of a date. If the argument\ndoesn't represent a valid date, [`NaN`](../NaN.mdx) is returned.\n\n## Description\n\nThe `parse()` method takes a date string (such as\n`\"2011-10-10T14:48:00\"`) and returns the number of milliseconds since January\n1, 1970, 00:00:00 UTC.\n\nThis function is useful for setting date values based on string values, for example in\nconjunction with the [`setTime()`](./prototype/setTime.mdx) method and the\n`Date` object.\n\n### Date Time String Format\n\nThe standard string representation of a date time string is a simplification of the ISO\n8601 calendar date extended format.\n(See the section [Date Time String Format](https://tc39.es/ecma262/#sec-date-time-string-format)\nin the ECMAScript specification for more details.)\n\nFor example, `\"2011-10-10\"` (_date-only_ form),\n`\"2011-10-10T14:48:00\"` (_date-time_ form), or\n`\"2011-10-10T14:48:00.000+09:00\"` (_date-time_ form with milliseconds\nand time zone) can be passed and will be parsed. When the time zone offset is absent,\ndate-only forms are interpreted as a UTC time and date-time forms are interpreted as\nlocal time.\n\nWhile time zone specifiers are used during date string parsing to interpret the\nargument, the value returned is always the number of milliseconds between January 1,\n1970 00:00:00 UTC and the point in time represented by the argument or `NaN`.\n\nBecause `parse()` is a static method of `Date`, it is called as\n`Date.parse()` rather than as a method of a `Date` instance.\n\n### Fall-back to implementation-specific date formats\n\n> **Note:** This section contains implementation-specific behavior that can be inconsistent\n> across implementations.\n\nThe ECMAScript specification states: If the String does not conform to the standard\nformat the function may fall back to any implementation–specific heuristics or\nimplementation–specific parsing algorithm. Unrecognizable strings or dates containing\nillegal element values in ISO formatted strings shall cause `Date.parse()` to\nreturn [`NaN`](../NaN.mdx).\n\nHowever, invalid values in date strings not recognized as simplified ISO format as\ndefined by ECMA-262 may or may not result in [`NaN`](../NaN.mdx), depending on the browser\nand values provided, e.g.:\n\n```js\n// Non-ISO string with invalid date values\nnew Date(\"23/25/2014\");\n```\n\nwill be treated as a local date of 25 November, 2015 in Firefox 30 and an invalid date\nin Safari 7.\n\nHowever, if the string is recognized as an ISO format string and it contains invalid\nvalues, it will return [`NaN`](../NaN.mdx):\n\n```js\n// ISO string with invalid values\nnew Date(\"2014-25-23\").toISOString();\n// throws \"RangeError: invalid date\"\n```\n\nSpiderMonkey's implementation-specific heuristic can be found in [`jsdate.cpp`](https://searchfox.org/mozilla-central/source/js/src/jsdate.cpp?rev=64553c483cd1#889).\nThe string `\"10 06 2014\"` is an example of a non-conforming ISO format and\nthus falls back to a custom routine. See also this [rough outline](https://bugzilla.mozilla.org/show_bug.cgi?id=1023155#c6) on\nhow the parsing works.\n\n```js\nnew Date(\"10 06 2014\");\n```\n\nwill be treated as a local date of 6 October, 2014, and not 10 June, 2014.\n\nOther examples:\n\n```js\nnew Date(\"foo-bar 2014\").toString();\n// returns: \"Invalid Date\"\n\nDate.parse(\"foo-bar 2014\");\n// returns: NaN\n```\n\n### Differences in assumed time zone\n\n> **Note:** This section contains implementation-specific behavior that can be inconsistent\n> across implementations.\n\nGiven a non-standard date string of `\"March 7, 2014\"`, `parse()` assumes a local time zone, but given a simplification of the ISO 8601 calendar date extended format such as `\"2014-03-07\"`, it will assume a time zone of UTC. Therefore `Date` objects produced using those strings may represent different moments in time depending on the version of ECMAScript supported unless the system is set with a local time zone of UTC. This means that two date strings that appear equivalent may result in two different values depending on the format of the string that is being converted.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/@@toPrimitive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype\\[Symbol.toPrimitive]\n\nThe **`[Symbol.toPrimitive]()`** method converts a `Date`\nobject to a primitive value.\n\n## Syntax\n\n```js\nDate()[Symbol.toPrimitive](hint)\n```\n\n### Return value\n\nThe primitive value of the given `Date` object. Depending on the argument,\nthe method can return either a string or a number.\n\n## Description\n\nThe `[Symbol.toPrimitive]()` method of the `Date` object returns a\nprimitive value, that is either of type number or of type string.\n\nIf `hint` is `string` or `default`,\n`[Symbol.toPrimitive]()` tries to call the [`toString`](../../Object/prototype/toString.mdx) method. If the `toString` property does not exist, it tries to\ncall the [`valueOf`](../../Object/prototype/valueOf.mdx) method and if the\n`valueOf` does not exist either, `[Symbol.toPrimitive]()` throws a\n[`TypeError`](../../../globals/TypeError/TypeError.mdx).\n\nIf `hint` is `number`, `[Symbol.toPrimitive]()` first tries\nto call `valueOf`, and if that fails, it calls `toString`.\n\nJavaScript calls the `[Symbol.toPrimitive]()` method to convert an object to a\nprimitive value. You rarely need to invoke the `[Symbol.toPrimitive]()` method\nyourself; JavaScript automatically invokes it when encountering an object where a\nprimitive value is expected.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/getDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getDate()\n\nThe **`getDate()`** method returns the day of the month for the\nspecified date according to local time.\n\n## Syntax\n\n```js\ngetDate()\n```\n\n### Return value\n\nAn integer number, between 1 and 31, representing the day of the month for the given\ndate according to local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/getDay.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getDay()\n\nThe **`getDay()`** method returns the\nday of the week for the specified date according to local time, where 0 represents\nSunday. For the day of the month, see [`Date.prototype.getDate()`](./getDate.mdx).\n\n## Syntax\n\n```js\ngetDay()\n```\n\n### Return value\n\nAn integer number, between 0 and 6, corresponding to the day of the week for the given\ndate, according to local time: 0 for Sunday, 1 for Monday, 2 for Tuesday, and so on.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/getFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getFullYear()\n\nThe **`getFullYear()`** method returns the year of the\nspecified date according to local time.\n\nUse this method instead of the [`Date.prototype.getYear()`](./getYear.mdx) method.\n\n## Syntax\n\n```js\ngetFullYear()\n```\n\n### Return value\n\nA number corresponding to the year of the given date, according to local time.\n\n## Description\n\nThe value returned by `getFullYear()` is an absolute number. For dates\nbetween the years 1000 and 9999, `getFullYear()` returns a four-digit number,\nfor example, 1995. Use this function to make sure a year is compliant with years after\n2000\\.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/getHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getHours()\n\nThe **`getHours()`** method returns the hour for the specified\ndate, according to local time.\n\n## Syntax\n\n```js\ngetHours()\n```\n\n### Return value\n\nAn integer number, between 0 and 23, representing the hour for the given date according\nto local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/getMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getMilliseconds()\n\nThe **`getMilliseconds()`** method returns the milliseconds in\nthe specified date according to local time.\n\n## Syntax\n\n```js\ngetMilliseconds()\n```\n\n### Return value\n\nA number, between 0 and 999, representing the milliseconds for the given date according\nto local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/getMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getMinutes()\n\nThe **`getMinutes()`** method returns the minutes in the\nspecified date according to local time.\n\n## Syntax\n\n```js\ngetMinutes()\n```\n\n### Return value\n\nAn integer number, between 0 and 59, representing the minutes in the given date\naccording to local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/getMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getMonth()\n\nThe **`getMonth()`** method returns the month in the specified\ndate according to local time, as a zero-based value (where zero indicates the first\nmonth of the year).\n\n## Syntax\n\n```js\ngetMonth()\n```\n\n### Return value\n\nAn integer number, between 0 and 11, representing the month in the given date according\nto local time. 0 corresponds to January, 1 to February, and so on.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/getSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getSeconds()\n\nThe **`getSeconds()`** method returns the seconds in the\nspecified date according to local time.\n\n## Syntax\n\n```js\ngetSeconds()\n```\n\n### Return value\n\nAn integer number, between 0 and 59, representing the seconds in the given date\naccording to local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/getTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getTime()\n\nThe **`getTime()`** method returns the number of milliseconds since the [epoch](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps), which is defined as the midnight at the beginning of January 1, 1970, UTC.\n\nYou can use this method to help assign a date and time to another `Date`\nobject. This method is functionally equivalent to the [`Date.prototype.valueOf()`](./valueOf.mdx) method.\n\n## Syntax\n\n```js\ngetTime()\n```\n\n### Return value\n\nA number representing the milliseconds elapsed between 1 January 1970 00:00:00 UTC and\nthe given date.\n\n## Description\n\nTo offer protection against timing attacks and fingerprinting, the precision of\n`new Date().getTime()` might get rounded depending on browser settings.\n\n```js\n// reduced time precision (2ms) in Firefox 60\nnew Date().getTime();\n// 1519211809934\n// 1519211810362\n// 1519211811670\n// …\n\n// reduced time precision with `privacy.resistFingerprinting` enabled\nnew Date().getTime();\n// 1519129853500\n// 1519129858900\n// 1519129864400\n// …\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/getTimezoneOffset.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getTimezoneOffset()\n\nThe **`getTimezoneOffset()`** method returns the difference, in minutes, between a date as evaluated in the UTC time zone, and the same date as evaluated in the local time zone.\n\n## Syntax\n\n```js\ngetTimezoneOffset()\n```\n\n### Return value\n\nThe difference, in minutes, between the date as evaluated in the UTC time zone and as evaluated in the local time zone. The actual local time algorithm is implementation-defined, and the return value is allowed to be zero in runtimes without appropriate data.\n\n## Description\n\n`date.getTimezoneOffset()` returns the difference, in minutes, between `date` as evaluated in the UTC time zone and as evaluated in the local time zone — that is, the time zone of the host system in which the browser is being used (if the code is run from the Web in a browser), or otherwise the host system of whatever JavaScript runtime (for example, a Node.js environment) the code is executed in.\n\n### Negative values and positive values\n\nThe number of minutes returned by `getTimezoneOffset()` is positive if the local time zone is behind UTC, and negative if the local time zone is ahead of UTC. For example, for UTC+10, `-600` will be returned.\n\n| Current time zone | Return value |\n| ----------------- | ------------ |\n| UTC-8             | 480          |\n| UTC               | 0            |\n| UTC+3             | -180         |\n\n### Varied results in Daylight Saving Time (DST) regions\n\nIn a region that annually shifts in and out of Daylight Saving Time (DST), as `date` varies, the number of minutes returned by calling `getTimezoneOffset()` can be non-uniform.\n\n> **Note:** `getTimezoneOffset()`'s behavior will never differ based on the time when the code is run — its behavior is always consistent when running in the same region. Only the value of `date` affects the result.\n\nIn most implementations, the [IANA time zone database](https://en.wikipedia.org/wiki/Daylight_saving_time#IANA_time_zone_database) (tzdata) is used to precisely determine the offset of the local timezone at the moment of the `date`. However, if such information is unavailable, an implementation may return zero.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/getUTCDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCDate()\n\nThe **`getUTCDate()`** method returns the day of the month (from\n1 to 31) in the specified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCDate()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer number ranging from 1 to 31\nrepresenting day of month for the given date, according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/getUTCDay.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCDay()\n\nThe **`getUTCDay()`** method returns the day of the week in the\nspecified date according to universal time, where 0 represents Sunday.\n\n## Syntax\n\n```js\ngetUTCDay()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer number corresponding to the day\nof the week for the given date, according to universal time: 0 for Sunday, 1 for Monday,\n2 for Tuesday, and so on.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/getUTCFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCFullYear()\n\nThe **`getUTCFullYear()`** method returns the year in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCFullYear()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer representing the year in the given date\naccording to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n\n## Description\n\nThe value returned by `getUTCFullYear()` is an absolute number that is\ncompliant with year-2000, for example, 1995.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/getUTCHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCHours()\n\nThe **`getUTCHours()`** method returns the hours in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCHours()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 23, representing the hours in the given date according\nto Coordinated Universal Time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/getUTCMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCMilliseconds()\n\nThe **`getUTCMilliseconds()`** method returns the milliseconds\nportion of the time object's value according to universal time.\n\n## Syntax\n\n```js\ngetUTCMilliseconds()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 999, representing\nthe milliseconds portion of the given `Date` object according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n\nNot to be confused with Unix epoch time. To get the total milliseconds since 1970/01/01,\nuse the [`getTime()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/getTime) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/getUTCMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCMinutes()\n\nThe **`getUTCMinutes()`** method returns the minutes in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCMinutes()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 59,\nrepresenting the minutes in the given date according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/getUTCMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCMonth()\n\nThe **`getUTCMonth()`** returns the month of the specified date\naccording to universal time, as a zero-based value (where zero indicates the first month\nof the year).\n\n## Syntax\n\n```js\ngetUTCMonth()\n```\n\n### Return value\n\nA number. If the `Date` object represents a valid date, an integer number, between 0 and 11,\ncorresponding to the month of the given date according to universal time. 0 for January,\n1 for February, 2 for March, and so on. Otherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/getUTCSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCSeconds()\n\nThe **`getUTCSeconds()`** method returns the seconds in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCSeconds()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 59, representing\nthe seconds in the given date according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/getYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getYear()\n\nThe **`getYear()`** method returns the year in the specified\ndate according to local time. Because `getYear()` does not return full years\n(\"year 2000 problem\"), it is no longer used and has been replaced by the\n[`Date.prototype.getFullYear()`](./getFullYear.mdx) method.\n\n## Syntax\n\n```js\ngetYear()\n```\n\n### Return value\n\nA number representing the year of the given date, according to local time, minus 1900.\n\n## Description\n\n- For years greater than or equal to 2000, the value returned by\n  `getYear()` is 100 or greater. For example, if the year is 2026,\n  `getYear()` returns 126.\n- For years between and including 1900 and 1999, the value returned by\n  `getYear()` is between 0 and 99. For example, if the year is 1976,\n  `getYear()` returns 76.\n- For years less than 1900, the value returned by `getYear()` is less than 0. For example, if the year is 1800, `getYear()` returns -100.\n\nTo take into account years before and after 2000, you should use\n[`Date.prototype.getFullYear()`](./getFullYear.mdx) instead of\n`getYear()` so that the year is specified in full.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/setDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setDate()\n\nThe **`setDate()`** method changes the day of the month of a given `Date` instance, based on local time.\n\nTo instead change the day of the month for a given `Date` instance based on UTC time, use the [`Date.prototype.setUTCDate()`](./setUTCDate.mdx) method.\n\n## Syntax\n\n```js\nsetDate(dayValue)\n```\n\n### Parameters\n\n- `dayValue`\n  - : An integer representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the given date (the\n`Date` object is also changed in place).\n\n## Description\n\nIf the `dayValue` is outside of the range of date values for the month, `setDate()` will update the `Date` object accordingly.\n\nFor example, if 0 is provided for `dayValue`, the date will be set to the last day of the previous month. If you use 40 for `dayValue`, and the month stored in the `Date` object is June, the day will be changed to 10 and the month will be incremented to July.\n\nIf a negative number is provided for `dayValue`, the date will be set counting backwards from the last day of the previous month. -1 would result in the date being set to 1 day before the last day of the previous month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/setFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setFullYear()\n\nThe **`setFullYear()`** method sets the full year for a\nspecified date according to local time. Returns new timestamp.\n\n## Syntax\n\n```js\nsetFullYear(yearValue)\nsetFullYear(yearValue, monthValue)\nsetFullYear(yearValue, monthValue, dateValue)\n```\n\n### Parameters\n\n- `yearValue`\n  - : An integer specifying the numeric value of the year, for example, 1995.\n- `monthValue`\n  - : Optional. An integer between 0 and 11 representing the months January through\n    December.\n- `dateValue`\n  - : Optional. An integer between 1 and 31 representing the day of the month. If you\n    specify the `dateValue` parameter, you must also specify the\n    `monthValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `monthValue` and\n`dateValue` parameters, the values returned from the\n[`Date.prototype.getMonth()`](./getMonth.mdx) and\n[`Date.prototype.getDate()`](./getDate.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range, `setFullYear()`\nattempts to update the other parameters and the date information in the\n`Date` object accordingly. For example, if you specify 15 for\n`monthValue`, the year is incremented by 1\n(`yearValue + 1`), and 3 is used for the month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/setHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setHours()\n\nThe **`setHours()`** method sets the hours for a specified date\naccording to local time, and returns the number of milliseconds since January 1, 1970\n00:00:00 UTC until the time represented by the updated `Date` instance.\n\n## Syntax\n\n```js\nsetHours(hoursValue)\nsetHours(hoursValue, minutesValue)\nsetHours(hoursValue, minutesValue, secondsValue)\nsetHours(hoursValue, minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `hoursValue`\n  - : Ideally, an integer between 0 and 23, representing the hour. If a value greater than\n    23 is provided, the datetime will be incremented by the extra hours.\n- `minutesValue`\n  - : Optional. Ideally, an integer between 0 and 59, representing the minutes. If a value\n    greater than 59 is provided, the datetime will be incremented by the extra minutes.\n- `secondsValue`\n  - : Optional. Ideally, an integer between 0 and 59, representing the seconds. If a value\n    greater than 59 is provided, the datetime will be incremented by the extra seconds. If\n    you specify the `secondsValue` parameter, you must also specify\n    the `minutesValue`.\n- `msValue`\n  - : Optional. Ideally, a number between 0 and 999, representing the milliseconds. If a\n    value greater than 999 is provided, the datetime will be incremented by the extra\n    milliseconds. If you specify the `msValue` parameter, you must\n    also specify the `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between January 1, 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `minutesValue`,\n`secondsValue`, and `msValue` parameters,\nthe values returned from the [`Date.prototype.getMinutes()`](./getMinutes.mdx),\n[`Date.prototype.getSeconds()`](./getSeconds.mdx), and\n[`Date.prototype.getMilliseconds()`](./getMilliseconds.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range, `setHours()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes will\nbe incremented by 1 (`minutesValue + 1`), and 40 will be used for\nseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/setMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setMilliseconds()\n\nThe **`setMilliseconds()`** method sets the milliseconds for a\nspecified date according to local time.\n\n## Syntax\n\n```js\nsetMilliseconds(millisecondsValue)\n```\n\n### Parameters\n\n- `millisecondsValue`\n  - : A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you specify a number outside the expected range, the date information in the\n`Date` object is updated accordingly. For example, if you specify 1005, the\nnumber of seconds is incremented by 1, and 5 is used for the milliseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/setMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setMinutes()\n\nThe **`setMinutes()`** method sets the minutes for a specified\ndate according to local time.\n\n## Syntax\n\n```js\nsetMinutes(minutesValue)\nsetMinutes(minutesValue, secondsValue)\nsetMinutes(minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `minutesValue`\n  - : An integer between 0 and 59, representing the minutes.\n- `secondsValue`\n  - : Optional. An integer between 0 and 59, representing the seconds. If you specify the\n    `secondsValue` parameter, you must also specify the\n    `minutesValue`.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds. If you specify\n    the `msValue` parameter, you must also specify the\n    `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `secondsValue` and\n`msValue` parameters, the values returned from\n[`Date.prototype.getSeconds()`](./getSeconds.mdx) and\n[`Date.prototype.getMilliseconds()`](./getMilliseconds.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range, `setMinutes()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes will\nbe incremented by 1 (`minutesValue + 1`), and 40 will be used for\nseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/setMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setMonth()\n\nThe **`setMonth()`** method sets the month for a specified date according to the currently set year.\n\n## Syntax\n\n```js\nsetMonth(monthValue)\nsetMonth(monthValue, dayValue)\n```\n\n### Parameters\n\n- `monthValue`\n  - : A zero-based integer representing the month of the year offset from the start of the\n    year. So, 0 represents January, 11 represents December, -1 represents December of the\n    previous year, and 12 represents January of the following year.\n- `dayValue`\n  - : Optional. An integer from 1 to 31, representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `dayValue` parameter, the value\nreturned from the [`Date.prototype.getDate()`](./getDate.mdx) method is used.\n\nIf a parameter you specify is outside of the expected range, `setMonth()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 15 for `monthValue`, the year will be\nincremented by 1, and 3 will be used for month.\n\nThe current day of month will have an impact on the behavior of this method.\nConceptually it will add the number of days given by the current day of the month to the\n1st day of the new month specified as the parameter, to return the new date.\nFor example, if the current value is 31st January 2016, calling setMonth with a value of 1 will return 2nd March 2016.\nThis is because in 2016 February had 29 days.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/setSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setSeconds()\n\nThe **`setSeconds()`** method sets the seconds for a specified\ndate according to local time.\n\n## Syntax\n\n```js\nsetSeconds(secondsValue)\nsetSeconds(secondsValue, msValue)\n```\n\n### Parameters\n\n- `secondsValue`\n  - : An integer between 0 and 59, representing the seconds.\n- `msValue` _**optional**_\n  - : Optional. A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `msValue` parameter, the value returned\nfrom the [`Date.prototype.getMilliseconds()`](./getMilliseconds.mdx) method is\nused.\n\nIf a parameter you specify is outside of the expected range, `setSeconds()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes stored\nin the `Date` object will be incremented by 1, and 40 will be used for\nseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/setTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setTime()\n\nThe **`setTime()`** method sets the `Date` object\nto the time represented by a number of milliseconds since January 1, 1970, 00:00:00 UTC.\n\n## Syntax\n\n```js\nsetTime(timeValue)\n```\n\n### Parameters\n\n- `timeValue`\n  - : An integer representing the number of milliseconds since 1 January 1970, 00:00:00\n    UTC.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date\n(effectively, the value of the argument).\n\n## Description\n\nUse the `setTime()` method to help assign a date and time to another\n`Date` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/setUTCDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCDate()\n\nThe **`setUTCDate()`** method changes the day of the month of a given `Date` instance, based on UTC time.\n\nTo instead change the day of the month for a given `Date` instance based on local time, use the [`Date.prototype.setDate()`](././setDate.mdx) method.\n\n## Syntax\n\n```js\nsetUTCDate(dayValue)\n```\n\n### Parameters\n\n- `dayValue`\n  - : An integer from 1 to 31, representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf the `dayValue` is outside of the range of date values for the month, `setDate()` will update the `Date` object accordingly.\n\nFor example, if 0 is provided for `dayValue`, the date will be set to the last day of the previous month. If you use 40 for `dayValue`, and the month stored in the `Date` object is June, the day will be changed to 10 and the month will be incremented to July.\n\nIf a negative number is provided for `dayValue`, the date will be set counting backwards from the last day of the previous month. -1 would result in the date being set to 1 day before the last day of the previous month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/setUTCFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCFullYear()\n\nThe **`setUTCFullYear()`** method sets the full year for a\nspecified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCFullYear(yearValue)\nsetUTCFullYear(yearValue, monthValue)\nsetUTCFullYear(yearValue, monthValue, dayValue)\n```\n\n### Parameters\n\n- `yearValue`\n  - : An integer specifying the numeric value of the year, for example, 1995.\n- `monthValue`\n  - : Optional. An integer between 0 and 11 representing the months January through\n    December.\n- `dayValue`\n  - : Optional. An integer between 1 and 31 representing the day of the month. If you\n    specify the `dayValue` parameter, you must also specify the\n    `monthValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `monthValue` and\n`dayValue` parameters, the values returned from the\n[`Date.prototype.getUTCMonth()`](./getUTCMonth.mdx) and\n[`Date.prototype.getUTCDate()`](./getUTCDate.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range,\n`setUTCFullYear()` attempts to update the other parameters and the date\ninformation in the `Date` object accordingly. For example, if you specify 15\nfor `monthValue`, the year is incremented by 1\n(`yearValue + 1`), and 3 is used for the month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/setUTCHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCHours()\n\nThe **`setUTCHours()`** method sets the hour for a specified\ndate according to universal time, and returns the number of milliseconds since January\n1, 1970 00:00:00 UTC until the time represented by the updated `Date`\ninstance.\n\n## Syntax\n\n```js\nsetUTCHours(hoursValue)\nsetUTCHours(hoursValue, minutesValue)\nsetUTCHours(hoursValue, minutesValue, secondsValue)\nsetUTCHours(hoursValue, minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `hoursValue`\n  - : An integer between 0 and 23, representing the hour.\n- `minutesValue`\n  - : Optional. An integer between 0 and 59, representing the minutes.\n- `secondsValue`\n  - : Optional. An integer between 0 and 59, representing the seconds. If you specify the\n    `secondsValue` parameter, you must also specify the\n    `minutesValue`.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds. If you specify\n    the `msValue` parameter, you must also specify the\n    `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between January 1, 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `minutesValue`,\n`secondsValue`, and `msValue` parameters,\nthe values returned from the [`Date.prototype.getUTCMinutes()`](./getUTCMinutes.mdx), [`Date.prototype.getUTCSeconds()`](./getUTCSeconds.mdx),\nand [`Date.prototype.getUTCMilliseconds()`](./getUTCMilliseconds.mdx) methods\nare used.\n\nIf a parameter you specify is outside of the expected range, `setUTCHours()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes will\nbe incremented by 1 (`minutesValue + 1`), and 40 will be used for seconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/setUTCMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCMilliseconds()\n\nThe **`setUTCMilliseconds()`** method sets the milliseconds for\na specified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCMilliseconds(millisecondsValue)\n```\n\n### Parameters\n\n- `millisecondsValue`\n  - : A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf a parameter you specify is outside of the expected range,\n`setUTCMilliseconds()` attempts to update the date information in the\n`Date` object accordingly. For example, if you use 1100 for\n`millisecondsValue`, the seconds stored in the `Date`\nobject will be incremented by 1, and 100 will be used for milliseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/setUTCMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCMinutes()\n\nThe **`setUTCMinutes()`** method sets the minutes for a\nspecified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCMinutes(minutesValue)\nsetUTCMinutes(minutesValue, secondsValue)\nsetUTCMinutes(minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `minutesValue`\n  - : An integer between 0 and 59, representing the minutes.\n- `secondsValue`\n  - : Optional. An integer between 0 and 59, representing the seconds. If you specify the\n    `secondsValue` parameter, you must also specify the\n    `minutesValue`.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds. If you specify\n    the `msValue` parameter, you must also specify the\n    `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `secondsValue` and\n`msValue` parameters, the values returned from\n[`Date.prototype.getUTCSeconds()`](./getUTCSeconds.mdx) and\n[`Date.prototype.getUTCMilliseconds()`](./getUTCMilliseconds.mdx) methods are\nused.\n\nIf a parameter you specify is outside of the expected range,\n`setUTCMinutes()` attempts to update the date information in the\n`Date` object accordingly. For example, if you use 100 for\n`secondsValue`, the minutes will be incremented by 1\n(`minutesValue + 1`), and 40 will be used for seconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/setUTCMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCMonth()\n\nThe **`setUTCMonth()`** method sets the month for a specified\ndate according to universal time.\n\n## Syntax\n\n```js\nsetUTCMonth(monthValue)\nsetUTCMonth(monthValue, dayValue)\n```\n\n### Parameters\n\n- `monthValue`\n  - : An integer between 0 and 11, representing the months January through December.\n- `dayValue`\n  - : Optional. An integer from 1 to 31, representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `dayValue` parameter, the value returned from the\n[`Date.prototype.getUTCDate()`](./getUTCDate.mdx) method is used.\n\nIf a parameter you specify is outside of the expected range, `setUTCMonth()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 15 for `monthValue`, the year will be incremented by\n1, and 3 will be used for month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/setUTCSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCSeconds()\n\nThe **`setUTCSeconds()`** method sets the seconds for a\nspecified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCSeconds(secondsValue)\nsetUTCSeconds(secondsValue, msValue)\n```\n\n### Parameters\n\n- `secondsValue`\n  - : An integer between 0 and 59, representing the seconds.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `msValue` parameter, the value returned from the\n[`Date.prototype.getUTCMilliseconds()`](./getUTCMilliseconds.mdx) method is\nused.\n\nIf a parameter you specify is outside of the expected range,\n`setUTCSeconds()` attempts to update the date information in the\n`Date` object accordingly. For example, if you use 100 for\n`secondsValue`, the minutes stored in the `Date` object will be\nincremented by 1, and 40 will be used for seconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/setYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setYear()\n\nThe legacy **`setYear()`** method sets the year for a specified date according to local time.\n\nHowever, the way the legacy `setYear()` method sets year values is different from how the preferred [`Date.prototype.setFullYear()`](./setFullYear.mdx) method sets year values — and in some cases, also different from how `new Date()` and [`Date.parse()`](../parse.mdx) set year values. Specifically, given two-digit numbers, such as `22` and `61`:\n\n- `setYear()` interprets any two-digit number as an offset to `1900`; so `date.setYear(22)` results in the year value being set to `1922`, and `date.setYear(61)` results in the year value being set to `1961`. (In contrast, while `new Date(61, 1)` also results in the year value being set to `1961`, `new Date(\"2/1/22\")` results in the year value being set to `2022`; and similarly for [`Date.parse()`](../parse.mdx)).\n\n- [`Date.prototype.setFullYear()`](./setFullYear.mdx) does no special interpretation but instead uses the literal two-digit value as-is to set the year; so `date.setFullYear(61)` results in the year value being set to `0061`, and `date.setFullYear(22)` results in the year value being set to `0022`.\n\nBecause of those differences in behavior, you should no longer use the legacy `setYear()` method, but should instead use the preferred [`Date.prototype.setFullYear()`](./setFullYear.mdx) method.\n\n## Syntax\n\n```js\nsetYear(yearValue)\n```\n\n### Parameters\n\n- `yearValue`\n  - : An integer.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf `yearValue` is a number between 0 and 99 (inclusive), then the year for\n`dateObj` is set to `1900 + yearValue`. Otherwise, the year for\n`dateObj` is set to `yearValue`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/toDateString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toDateString()\n\nThe **`toDateString()`** method returns the date portion of a `Date` object interpreted in the local timezone in English.\n\n## Syntax\n\n```js\ntoDateString()\n```\n\n### Return value\n\nA string representing the date portion of the given `Date` object in human readable form in English.\n\n## Description\n\n`Date` instances refer to a specific point in time. `toDateString()` interprets the date in the local timezone and formats the _date_ part in English. It always uses the following format, separated by spaces:\n\n1. First three letters of the week day name\n2. First three letters of the month name\n3. Two-digit day of the month, padded on the left a zero if necessary\n4. Four-digit year (at least), padded on the left with zeros if necessary. May have a negative sign\n\nFor example: \"Thu Jan 01 1970\".\n\n- If you want to get the _time_ part, use [`toTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString).\n- If you want to get both the date and time, use [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toString).\n- If you want to make the date interpreted as UTC instead of local timezone, use [`toUTCString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString).\n- If you want to format the date in a more user-friendly format (e.g. localization), use [`toLocaleDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/toISOString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toISOString()\n\nThe **`toISOString()`** method returns a string in _simplified_ extended ISO format ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)), which is always 24 or 27 characters long (`YYYY-MM-DDTHH:mm:ss.sssZ` or `±YYYYYY-MM-DDTHH:mm:ss.sssZ`, respectively). The timezone is always zero UTC offset, as denoted by the suffix `Z`.\n\n## Syntax\n\n```js\ntoISOString()\n```\n\n### Return value\n\nA string representing the given date in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format according to universal time. It's the same format as the one required to be recognized by [`Date.parse()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/parse#date-time-string-format).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/toJSON.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toJSON()\n\nThe **`toJSON()`** method returns a string representation of\nthe `Date` object.\n\n## Syntax\n\n```js\ntoJSON()\n```\n\n### Return value\n\nA string representation of the given date.\n\n## Description\n\n`Date` instances refer to a specific point in time. `toJSON()` calls the object's [`Date.prototype.toISOString()`](./toISOString.mdx) method, which returns a string representing the `Date` object's value. This method is generally intended to, by default, usefully serialize `Date` objects during [JSON](https://developer.mozilla.org/docs/Glossary/JSON) serialization, which can then be deserialized using the [`Date()` constructor](../Date.mdx) or [`Date.parse()`](../parse.mdx) as the reviver of [`JSON.parse()`](../../JSON/parse.mdx).\n\nThe method first attempts to convert its `this` value [to a primitive](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion) by calling its [`[Symbol.toPrimitive]()`](../../Symbol/toPrimitive.mdx) (with `\"number\"` as hint), [`valueOf()`](../../Object/prototype/valueOf.mdx), and [`toString()`](../../Object/prototype/toString.mdx) methods, in that order. If the result is a [non-finite](../../Number/isFinite.mdx) number, `null` is returned. (This generally corresponds to an invalid date, whose [`valueOf()`](./valueOf.mdx) returns [`NaN`](../../NaN.mdx).) Otherwise, if the converted primitive is not a number or is a finite number, the return value of `this.toISOString()` is returned.\n\nNote that the method does not check whether the `this` value is a valid `Date` object. However, calling `Date.prototype.toJSON()` on non-`Date` objects does not have well-defined semantics.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/toLocaleDateString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toLocaleDateString()\n\nThe **`toLocaleDateString()`** method returns a string with a language-sensitive representation of the date portion of the specified date in the user agent's timezone. In implementations with [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) support, this method simply calls `Intl.DateTimeFormat`.\n\n## Syntax\n\n```js\ntoLocaleDateString()\ntoLocaleDateString(locales)\ntoLocaleDateString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat), these parameters correspond exactly to the [`Intl.DateTimeFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) constructor's parameters. Implementations without `Intl.DateTimeFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales) parameter of the `Intl.DateTimeFormat()` constructor.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options) parameter of the `Intl.DateTimeFormat()` constructor. The `timeStyle` option must be undefined, or a [`TypeError`](../../../globals/TypeError/TypeError.mdx) would be thrown. If `weekday`, `year`, `month`, and `day` are all undefined, then `year`, `month`, and `day` will be set to `\"numeric\"`.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored.\n\nSee the [`Intl.DateTimeFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string representing the date portion of the given `Date` instance according to language-specific conventions.\n\nIn implementations with `Intl.DateTimeFormat`, this is equivalent to `new Intl.DateTimeFormat(locales, options).format(date)`, where `options` has been normalized as described above.\n\n## Performance\n\nWhen formatting large numbers of dates, it is better to create an [`Intl.DateTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) object and use its [`format()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/format) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string with a language-sensitive representation of this date. In implementations with [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) support, this method simply calls `Intl.DateTimeFormat`.\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat), these parameters correspond exactly to the [`Intl.DateTimeFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) constructor's parameters. Implementations without `Intl.DateTimeFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales) parameter of the `Intl.DateTimeFormat()` constructor.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options) parameter of the `Intl.DateTimeFormat()` constructor. If `weekday`, `year`, `month`, `day`, `dayPeriod`, `hour`, `minute`, `second`, and `fractionalSecondDigits` are all undefined, then `year`, `month`, `day`, `hour`, `minute`, `second` will be set to `\"numeric\"`.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored.\n\nSee the [`Intl.DateTimeFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string representing the given date according to language-specific conventions.\n\nIn implementations with `Intl.DateTimeFormat`, this is equivalent to `new Intl.DateTimeFormat(locales, options).format(date)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/toLocaleTimeString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toLocaleTimeString()\n\nThe **`toLocaleTimeString()`** method returns a string with a language-sensitive representation of the time portion of the date. In implementations with [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) support, this method simply calls `Intl.DateTimeFormat`.\n\n## Syntax\n\n```js\ntoLocaleTimeString()\ntoLocaleTimeString(locales)\ntoLocaleTimeString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat), these parameters correspond exactly to the [`Intl.DateTimeFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) constructor's parameters. Implementations without `Intl.DateTimeFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales) parameter of the `Intl.DateTimeFormat()` constructor.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options) parameter of the `Intl.DateTimeFormat()` constructor. If `dayPeriod`, `hour`, `minute`, `second`, and `fractionalSecondDigits` are all undefined, then `hour`, `minute`, `second` will be set to `\"numeric\"`.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored.\n\nSee the [`Intl.DateTimeFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string representing the time portion of the given `Date` instance according to language-specific conventions.\n\nIn implementations with `Intl.DateTimeFormat`, this is equivalent to `new Intl.DateTimeFormat(locales, options).format(date)`, where `options` has been normalized as described above.\n\n## Performance\n\nWhen formatting large numbers of dates, it is better to create an [`Intl.DateTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) object and use its [`format()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/format) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified `Date` object interpreted in the local timezone.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the given date.\n\n## Description\n\nThe `Date` object overrides the `toString()` method of `Object`. `Date.prototype.toString()` returns a string representation of the Date as interpreted in the local timezone, containing both the date and the time — it joins the string representation specified in [`toDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString) and [`toTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString) together, adding a space in between.\n\nFor example: \"Thu Jan 01 1970 04:42:04 GMT+0000 (Coordinated Universal Time)\"\n\nThe `toString()` method is automatically called when a date is coerced to a string, such as `const today = 'Today is ' + new Date()`.\n\n`Date.prototype.toString()` must be called on `Date` instances. If the `this` value does not inherit from `Date.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n- If you only want to get the _date_ part, use [`toDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString).\n- If you only want to get the _time_ part, use [`toTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString).\n- If you want to make the date interpreted as UTC instead of local timezone, use [`toUTCString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString).\n- If you want to format the date in a more user-friendly format (e.g. localization), use [`toLocaleString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/toTimeString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toTimeString()\n\nThe **`toTimeString()`** method returns the time portion of a `Date` object interpreted in the local timezone in English.\n\n## Syntax\n\n```js\ntoTimeString()\n```\n\n### Return value\n\nA string representing the time portion of the given date in human readable form in English.\n\n## Description\n\n`Date` instances refer to a specific point in time. `toTimeString()` interprets the date in the local timezone and formats the _time_ part in English. It always uses the format of `hh:mm:ss GMT±xxxx (TZ)`, where:\n\n| Format String | Description                                                                                           |\n| ------------- | ----------------------------------------------------------------------------------------------------- |\n| `hh`          | Hour, as two digits with leading zero if required                                                     |\n| `mm`          | Minute, as two digits with leading zero if required                                                   |\n| `ss`          | Seconds, as two digits with leading zero if required                                                  |\n| `±xxxx`       | The local timezone's offset — two digits for hours and two digits for minutes (e.g. `-0500`, `+0800`) |\n| `TZ`          | The timezone's name (e.g. `PDT`, `PST`)                                                               |\n\nFor example: \"04:42:04 GMT+0000 (Coordinated Universal Time)\".\n\n- If you want to get the _date_ part, use [`toDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString).\n- If you want to get both the date and time, use [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toString).\n- If you want to make the date interpreted as UTC instead of local timezone, use [`toUTCString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString).\n- If you want to format the date in a more user-friendly format (e.g. localization), use [`toLocaleTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleTimeString).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/toUTCString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toUTCString()\n\nThe **`toUTCString()`** method converts a date to a string, interpreting it in the UTC time zone. `toGMTString()` is an alias of this method.\n\nBased on [rfc7231](https://datatracker.ietf.org/doc/html/rfc7231#section-7.1.1.1) and modified according to [ECMA-262 toUTCString](https://tc39.es/ecma262/#sec-date.prototype.toutcstring), it can have negative values.\n\n## Syntax\n\n```js\ntoUTCString()\n```\n\n### Return value\n\nA string representing the given date using the UTC time zone.\n\n## Description\n\nThe value returned by `toUTCString()` is a string in the form `Www, dd Mmm yyyy hh:mm:ss GMT`, where:\n\n| Format String | Description                                                  |\n| ------------- | ------------------------------------------------------------ |\n| `Www`         | Day of week, as three letters (e.g. `Sun`, `Mon`)            |\n| `dd`          | Day of month, as two digits with leading zero if required    |\n| `Mmm`         | Month, as three letters (e.g. `Jan`, `Feb`)                  |\n| `yyyy`        | Year, as four or more digits with leading zeroes if required |\n| `hh`          | Hour, as two digits with leading zero if required            |\n| `mm`          | Minute, as two digits with leading zero if required          |\n| `ss`          | Seconds, as two digits with leading zero if required         |\n\n### Aliasing\n\nJavaScript's `Date` API was inspired by Java's `java.util.Date` library (while the latter had become de facto legacy since Java 1.1 in 1997). In particular, the Java `Date` class had a method called `toGMTString` — which was poorly named, because the [Greenwich Mean Time](https://en.wikipedia.org/wiki/Greenwich_Mean_Time) is not equivalent to the [Coordinated Universal Time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time), while JavaScript dates always operate by UTC time. For web compatibility reasons, `toGMTString` remains as an alias to `toUTCString`, and they refer to the exact same function object. This means:\n\n```js\nDate.prototype.toGMTString.name === \"toUTCString\";\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Date/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a\n`Date` object.\n\n\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the given date, or [`NaN`](../../NaN.mdx) in case of an invalid date.\n\n## Description\n\nThe `valueOf()` method returns the primitive value of a `Date`\nobject as a number data type, the number of milliseconds since midnight 01 January, 1970\nUTC.\n\nThis method is functionally equivalent to the [`Date.prototype.getTime()`](./getTime.mdx)\nmethod.\n\nThis method is usually called internally by JavaScript and not explicitly in code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/DecompressionStream/DecompressionStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DecompressionStream()\n\nThe **`DecompressionStream()`** constructor creates a new `DecompressionStream` object which decompresses a stream of data.\n\n## Syntax\n\n```js\nnew DecompressionStream(format)\n```\n\n### Parameters\n\n- `format`\n\n  - : One of the following compression formats:\n\n    - `\"gzip\"`\n    - `\"deflate\"`\n    - `\"deflate-raw\"`\n\n## Exceptions\n\n- `TypeError`\n  - : Thrown if the format passed to the constructor is not supported.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/DecompressionStream/prototype/readable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DecompressionStream.readable\n\nThe **`readable`** read-only property of the `DecompressionStream` interface returns a `ReadableStream`.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/DecompressionStream/prototype/writable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DecompressionStream.writable\n\nThe **`writable`** read-only property of the `DecompressionStream` interface returns a `WritableStream`.\n\n## Value\n\nA `WritableStream`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/EcKeyImportParams/EcKeyImportParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# EcKeyImportParams\n\nThe **`EcKeyImportParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.importKey()`, when generating any elliptic-curve-based key pair: that is, when the algorithm is identified as ECDSA.\n\n## Instance properties\n\n- `name`\n  - : A string. This should be set to `ECDSA`.\n- `namedCurve`\n\n  - : A string representing the name of the elliptic curve to use. This may be any of the following names for [NIST](https://www.nist.gov/)-approved curves:\n\n    - `P-256`\n    - `P-384`\n    - `P-521`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/EcdsaParams/EcdsaParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# EcdsaParams\n\nThe **`EcdsaParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.sign()` or `SubtleCrypto.verify()` when using the ECDSA algorithm.\n\n## Instance properties\n\n- `name`\n    - : A string. This should be set to `ECDSA`.\n- `hash`\n\n    - : A string. An identifier for the digest algorithm to use. This should be one of the following:\n\n        - `SHA-256`: selects the SHA-256 algorithm.\n        - `SHA-384`: selects the SHA-384 algorithm.\n        - `SHA-512`: selects the SHA-512 algorithm.\n\n        > **Warning:** `SHA-1` is also supported here but the SHA-1 algorithm is considered vulnerable and should no longer be used.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Error/Error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error\n\nThe **`Error()`** constructor creates an error object.\n\n## Syntax\n\n```js\nnew Error()\nnew Error(message)\nnew Error(message, options)\nnew Error(message, fileName)\nnew Error(message, fileName, lineNumber)\n\nError()\nError(message)\nError(message, options)\nError(message, fileName)\nError(message, fileName, lineNumber)\n```\n\n> **Note:** `Error()` can be called with or without `new`. Both create a new `Error` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : A human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A value indicating the specific cause of the error, reflected in the [`Error.prototype.cause`](./prototype/cause.mdx) property. When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Error/prototype/cause.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.cause\n\nThe **`cause`** data property of an [`Error`](../../../globals/Error/Error.mdx) instance indicates the specific original cause of the error.\n\nIt is used when catching and re-throwing an error with a more-specific or useful error message in order to still have access to the original error.\n\n## Value\n\nThe value that was passed to the [`Error`](../Error.mdx) constructor in the `options.cause` argument. It may not be present.\n\n## Description\n\nThe value of `cause` can be of any type. You should not make assumptions that the error you caught has an `Error` as its `cause`, in the same way that you cannot be sure the variable bound in the `catch` statement is an `Error` either. The \"Providing structured data as the error cause\" example below shows a case where a non-error is deliberately provided as the cause.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Error/prototype/message.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.message\n\nThe **`message`** data property of an [`Error`](../Error.mdx) instance is a human-readable description of the error.\n\n## Value\n\nA string corresponding to the value passed to the [`Error`](../Error.mdx) constructor as the first argument.\n\n## Description\n\nThis property contains a brief description of the error if one is available or has been set. The `message` property combined with the [`name`](./name.mdx) property is used by the [`Error.prototype.toString()`](./toString.mdx) method to create a string representation of the Error.\n\nBy default, the `message` property is an empty string, but this behavior can be overridden for an instance by specifying a message as the first argument to the [`Error`](../Error.mdx) constructor.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Error/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.name\n\nThe **`name`** data property of `Error.prototype` is shared by all [`Error`](../Error.mdx) instances. It represents the name for the type of error. For `Error.prototype.name`, the initial value is `\"Error\"`. Subclasses like [`TypeError`](../../../globals/TypeError/TypeError.mdx) and [`SyntaxError`](../../SyntaxError/SyntaxError.mdx) provide their own `name` properties.\n\n## Value\n\nA string. For `Error.prototype.name`, the initial value is `\"Error\"`.\n\n## Description\n\nBy default, [`Error`](../Error.mdx) instances are given the name \"Error\". The `name` property, in addition to the [`message`](./message.mdx) property, is used by the [`Error.prototype.toString()`](./toString.mdx) method to create a string representation of the error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Error/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.toString()\n\nThe **`toString()`** method returns a string representing the\nspecified [`Error`](../Error.mdx) object.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified [`Error`](../Error.mdx) object.\n\n## Description\n\nThe [`Error`](../Error.mdx) object overrides the [`Object.prototype.toString()`](../../Object/prototype/toString.mdx)\nmethod inherited by all objects. \n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/EvalError/EvalError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# EvalError\n\nThe **`EvalError()`** constructor creates a new `EvalError` instance.\n\n## Syntax\n\n```js\nnew EvalError()\nnew EvalError(message)\nnew EvalError(message, options)\nnew EvalError(message, fileName)\nnew EvalError(message, fileName, lineNumber)\n\nEvalError()\nEvalError(message)\nEvalError(message, options)\nEvalError(message, fileName)\nEvalError(message, fileName, lineNumber)\n```\n\n> **Note:** `EvalError()` can be called with or without `new`. Both create a new `EvalError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/FetchEvent/FetchEvent.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent\n\nThis is the event type for `fetch` events. It contains information about the fetch, including the request and how the receiver will treat the response. \nIt provides the [`event.respondWith()`](./prototype/respondWith.mdx) method, which allows us to provide a response to this fetch.\n\n## Instance properties\n\n- `FetchEvent.request` _**readonly**_\n    - : The `Request` that was received by the application.\n- `FetchEvent.client` _**readonly**_\n    - : Information about the downstream client that made the request.\n        While these fields are always defined on Compute, they may be *null* when not available in testing environments\n        such as Viceroy.\n    - `FetchEvent.client.address` _**readonly**_\n        - : A string representation of the IPv4 or IPv6 address of the downstream client.\n    - `FetchEvent.client.geo` _**readonly**_\n        - : Either `null`, or a [geolocation dictionary](../../fastly:geolocation/getGeolocationForIpAddress.mdx) corresponding to the IP address of the downstream client.\n    - `FetchEvent.client.tlsJA3MD5` _**readonly**_\n        - : Either `null` or a string representation of the JA3 hash of the TLS ClientHello message.\n    - `FetchEvent.client.tlsCipherOpensslName` _**readonly**_\n        - : Either `null` or a string representation of the cipher suite used to secure the client TLS connection.\n    - `FetchEvent.client.tlsProtocol` _**readonly**_\n        - : Either `null` or a string representation of the TLS protocol version used to secure the client TLS connection.\n    - `FetchEvent.client.tlsClientCertificate` _**readonly**_\n        - : Either `null` or an ArrayBuffer containing the raw client certificate in the mutual TLS handshake message. It is in PEM format. Returns an empty ArrayBuffer if this is not mTLS or available.\n    - `FetchEvent.client.tlsClientHello` _**readonly**_\n        - : Either `null` or an ArrayBuffer containing the raw bytes sent by the client in the TLS ClientHello message.\n    - `FetchEvent.client.tlsJA4` _**readonly**_\n        - : Either `null` or a string representation of the JA4 fingerprint of the TLS ClientHello message.\n    - `FetchEvent.client.h2Fingerprint` _**readonly**_\n        - : Either `null` or a string representation of the HTTP/2 fingerprint for HTTP/2 connections. Returns `null` for HTTP/1.1 connections.\n    - `FetchEvent.client.ohFingerprint` _**readonly**_\n        - : Either `null` or a string representation of the Original Header fingerprint based on the order and presence of request headers.\n- `FetchEvent.server` _**readonly**_\n    - : Information about the server receiving the request for the Fastly Compute service.\n    - `FetchEvent.server.address` _**readonly**_\n        - : A string representation of the IPv4 or IPv6 address of the server which received the request.\n\n## Instance methods\n\n- [`FetchEvent.respondWith()`](./prototype/respondWith.mdx)\n    - : Provide (a promise for) a response for this request.\n- [`FetchEvent.sendEarlyHints()`](./prototype/sendEarlyHints.mdx)\n    - : Send a [103 Early Hints](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/103) response for this request.\n- [`FetchEvent.waitUntil()`](./prototype/waitUntil.mdx)\n    - : Extends the lifetime of the event. Used to notify the host environment of tasks that extend beyond the returning of a response, such as streaming and caching.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/FetchEvent/prototype/respondWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent.respondWith()\n\nThe **`respondWith()`** method allows you to provide a promise for a [`Response`](../../Response/Response.mdx) to send back to the client which made the incoming request to your application.\n\n## Syntax\n\n```js\nrespondWith(response)\n```\n\n### Parameters\n\n- `response`\n  - : A [`Response`](../../Response/Response.mdx) or a [`Promise`](../../Promise/Promise.mdx) that resolves to a\n    [`Response`](../../Response/Response.mdx). Otherwise, a network error is returned to Fetch.\n\n### Return value\n\nAlways returns `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/FetchEvent/prototype/sendEarlyHints.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent.sendEarlyHints()\n\nThe **`sendEarlyHints()`** method allows you to send a [103 Early Hints](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/103) response back to the client which made the incoming request to your application.\n\n## Syntax\n\n```js\nsendEarlyHints(headers)\n```\n\n### Parameters\n\n- `headers`\n  - : Any headers you want to add to your response, contained\n        within a [`Headers`](../../Headers/Headers.mdx) object or object literal of\n        [`String`](../../String/String.mdx) key/value pairs.\n\n### Return value\n\nAlways returns `undefined`.\n\n### Examples\n\n```js\nevent.sendEarlyHints({ link: '</style.css>; rel=preload; as=style' });\n\nevent.sendEarlyHints([\n        ['link', '</style.css>; rel=preload; as=style'],\n        ['link', '</style2.css>; rel=preload; as=style']\n    ]);\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/FetchEvent/prototype/waitUntil.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent.waitUntil()\n\n\nThe **`waitUntil()`** method tells the host environment that work is ongoing until the promise settles, and it shouldn't terminate\nthe application if it wants that work to complete.\n\nThe `waitUntil()` method must be initially called synchronously within the event callback,\nbut after that it can be called multiple times, and will hold the process open until all the promises passed to it\nsettle.\n\n## Syntax\n\n```js\nwaitUntil(promise)\n```\n\n### Parameters\n\nA [`Promise`](../../Promise/Promise.mdx).\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/FinalizationRegistry/FinalizationRegistry.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FinalizationRegistry()\n\nThe **`FinalizationRegistry`** constructor creates a `FinalizationRegistry` object that uses the given callback.\n\n## Syntax\n\n```js\n// Arrow callback function\nnew FinalizationRegistry((heldValue) => { /* … */ })\n\n// Callback function\nnew FinalizationRegistry(callbackFn)\n\n// Inline callback function\nnew FinalizationRegistry(function(heldValue) { /* … */ })\n```\n\n> **Note:** `FinalizationRegistry()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `callback`\n  - : The callback function this registry should use.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/FinalizationRegistry/prototype/register.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FinalizationRegistry.prototype.register()\n\nThe `register()` method registers an object with a\n`FinalizationRegistry` instance so that if the object is garbage-collected,\nthe registry's callback may get called.\n\n## Syntax\n\n```js\nregister(target, heldValue)\nregister(target, heldValue, unregisterToken)\n```\n\n### Parameters\n\n- `target`\n  - : The target object to register.\n- `heldValue`\n  - : The value to pass to the finalizer for this object. This cannot be the `target` object but can be anything else, including functions and primitives.\n- `unregisterToken` _**optional**_\n  - : A token that may be used with the `unregister` method later to unregister\n    the target object. If provided (and not `undefined`), this must be an\n    object. If not provided, the target cannot be unregistered.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown when one of the following condition is met:\n    - `target` is not an object (object as opposed to primitives; functions are objects as well)\n    - `target` is the same as `heldvalue` (`target === heldValue`)\n    - `unregisterToken` is not an object\n\n## Description\n\nSee the [Avoid where possible](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry#avoid_where_possible)\nand [Notes on cleanup callbacks](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry#notes_on_cleanup_callbacks)\nsections of the `FinalizationRegistry` page for important caveats.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/FinalizationRegistry/prototype/unregister.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FinalizationRegistry.prototype.unregister()\n\nThe `unregister()` method unregisters a target object from a\n`FinalizationRegistry` instance.\n\n## Syntax\n\n```js\nunregister(unregisterToken)\n```\n\n### Parameters\n\n- `unregisterToken`\n  - : The token used with the [`FinalizationRegistry.prototype.register`](./register.mdx) method when registering the target object. Multiple cells registered with the same `unregisterToken` will be unregistered together.\n\n### Return value\n\nA boolean value that is `true` if at least one cell was unregistered and `false` if no cell was unregistered.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown when `unregisterToken` is not an object.\n\n## Description\n\nWhen a target object has been reclaimed, it is no longer registered in the registry.\nThere is no need to call `unregister` in your cleanup callback. Only call\n`unregister` if you haven't received a cleanup callback and no longer need\nto receive one.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Float32Array/Float32Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Float32Array()\n\nThe **`Float32Array()`** typed array constructor creates a new\n`Float32Array` object, which is, an array of 32-bit floating point numbers\n(corresponding to the C `float` data type) in the platform byte order. If\ncontrol over byte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are\ninitialized to `0`. Once established, you can reference elements in the array\nusing the object's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Float32Array()\nnew Float32Array(length)\nnew Float32Array(typedArray)\nnew Float32Array(object)\n\nnew Float32Array(buffer)\nnew Float32Array(buffer, byteOffset)\nnew Float32Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Float32Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Float64Array/Float64Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Float64Array()\n\nThe **`Float64Array()`** typed array constructor creates a new\n`Float64Array` object, which is, an array of 64-bit floating point numbers\n(corresponding to the C `double` data type) in the platform byte order. If\ncontrol over byte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are\ninitialized to `0`. Once established, you can reference elements in the array\nusing the object's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Float64Array()\nnew Float64Array(length)\nnew Float64Array(typedArray)\nnew Float64Array(object)\n\nnew Float64Array(buffer)\nnew Float64Array(buffer, byteOffset)\nnew Float64Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Float64Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/FormData/FormData.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData()\n\nThe **`FormData()`** constructor creates a new `FormData` object.\n\n## Syntax\n\n```js\nnew FormData()\nnew FormData(form)\n```\n\n> **Note:** `FormData()` can only be constructed with `new`. Attempting to call it without `new` throws a `TypeError`.\n\n### Parameters\n\n- `form` _**optional**_\n  - : An HTML `<form>` element — when specified, the `FormData` object will be populated with the form's current key/value pairs using the name property of each element for the keys and their submitted value for the values. File input elements are handled specially: their values are taken from the files selected by the user in the upload control.\n\n### Return value\n\nA new `FormData` object, pre-populated with form data if the optional `form` parameter was provided.\n\n## Description\n\nThe `FormData` interface provides a way to construct a set of key/value pairs representing form fields and their values, which can be sent using methods such as `fetch()`. It uses the same format a form would use if the encoding type were set to `\"multipart/form-data\"`.\n\nYou can also append additional data to the `FormData` object after it's created using its various methods.\n\nA `FormData` object can be used in a number of ways with other APIs:\n\n1. It can be sent with the `fetch()` API\n2. It works seamlessly with the `Request` and `Response` objects - it can be used directly as the body of a `Request` object\n3. It can be obtained from a `Response` object using the `formData()` method\n4. It can be passed directly to the `URLSearchParams` constructor\n\nThe transmitted data is in the same format that the form's `submit()` method would use to send the data if the form's encoding type were set to `\"multipart/form-data\"`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/FormData/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.append()\n\nThe **`append()`** method of the `FormData` interface appends a new value onto an existing key inside a `FormData` object, or adds the key if it does not already exist.\n\n## Syntax\n\n```js\nappend(name, value)\nappend(name, value, filename)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the field whose data is contained in `value`.\n- `value`\n  - : The value of the field. This can be a string or a `Blob` (including subclasses such as `File`). If none of these, the value is converted to a string.\n- `filename` _**optional**_\n  - : The filename reported to the server when a `Blob` or `File` is passed as the second parameter. The default filename for `Blob` objects is \"blob\". The default filename for `File` objects is the file's filename.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/FormData/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.delete()\n\nThe **`delete()`** method of the `FormData` interface removes all key/value pairs with the given name from the `FormData` object.\n\n## Syntax\n\n```js\ndelete(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the key you want to delete.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/FormData/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.entries()\n\nThe **`entries()`** method of the `FormData` interface returns an iterator allowing iteration through all key/value pairs contained in this object. The iterator yields a new array for each key/value pair, with the first element being the key and the second element being the value.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nAn `iterator`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/FormData/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.forEach()\n\nThe **`forEach()`** method of the `FormData` interface executes the provided callback function once for each key/value pair in the `FormData` object.\n\n## Syntax\n\n```js\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n  - : A function to execute for each entry in the object. The function will be passed the following arguments:\n    - `value`\n      - : The value of the current entry.\n    - `key`\n      - : The key of the current entry.\n    - `formData`\n      - : The `FormData` object being traversed.\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/FormData/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.get()\n\nThe **`get()`** method of the `FormData` interface returns the first value associated with a given key from within a `FormData` object. If you expect multiple values and want all of them, use the [`getAll()`](../../../globals/FormData/prototype/getAll.mdx) method instead.\n\n## Syntax\n\n```js\nget(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the key you want to retrieve.\n\n### Return value\n\nA `FormDataEntryValue` containing the value. If the key does not exist, it returns `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/FormData/prototype/getAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.getAll()\n\nThe **`getAll()`** method of the `FormData` interface returns all the values associated with a given key from within a `FormData` object.\n\n## Syntax\n\n```js\ngetAll(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the key you want to retrieve.\n\n### Return value\n\nAn array of `FormDataEntryValue` items containing all values with the given key. If the key doesn't exist, an empty array is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/FormData/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.has()\n\nThe **`has()`** method of the `FormData` interface returns a boolean indicating whether a `FormData` object contains a key/value pair with the given name.\n\n## Syntax\n\n```js\nhas(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the key you want to test for existence.\n\n### Return value\n\n`true` if a key/value pair with the specified name exists; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/FormData/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.keys()\n\nThe **`keys()`** method of the `FormData` interface returns an iterator allowing iteration through all keys contained in this object. The iterator yields the key for each value.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nAn `iterator`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/FormData/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.set()\n\nThe **`set()`** method of the `FormData` interface sets a new value for an existing key inside a `FormData` object, or adds the key/value if it does not already exist.\n\nThe difference between `set()` and [`append()`](../../../globals/FormData/prototype/append.mdx) is that if the specified key already exists, `set()` overwrites all existing values with the new one, whereas `append()` appends the new value onto the end of the existing values.\n\n## Syntax\n\n```js\nset(name, value)\nset(name, value, filename)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the field whose data is contained in `value`.\n- `value`\n  - : The value of the field. This can be a string or a `Blob` (including subclasses such as `File`). If none of these, the value is converted to a string.\n- `filename` _**optional**_\n  - : The filename reported to the server when a `Blob` or `File` is passed as the second parameter. The default filename for `Blob` objects is \"blob\". The default filename for `File` objects is the file's filename.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/FormData/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.values()\n\nThe **`values()`** method of the `FormData` interface returns an iterator allowing iteration through all values contained in this object. The iterator yields the value for each key/value pair.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nAn `iterator`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Function/Function.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function()\n\nThe **`Function()`** constructor creates a new [`Function`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function) object. Calling the constructor directly can create functions dynamically, but suffers from security and similar (but far less significant) performance issues as `eval()`. However, unlike `eval` (which may have access to the local scope), the `Function` constructor creates functions which execute in the global scope only.\n\n\n\n## Syntax\n\n```js\nnew Function(functionBody)\nnew Function(arg0, functionBody)\nnew Function(arg0, arg1, functionBody)\nnew Function(arg0, arg1, /* … ,*/ argN, functionBody)\n\nFunction(functionBody)\nFunction(arg0, functionBody)\nFunction(arg0, arg1, functionBody)\nFunction(arg0, arg1, /* … ,*/ argN, functionBody)\n```\n\n> **Note:** `Function()` can be called with or without `new`. Both create a new `Function` instance.\n\n### Parameters\n\n- `argN` _**optional**_\n\n  - : Names to be used by the function as formal argument names. Each must be a string that corresponds to a valid JavaScript parameter (any of plain [identifier](https://developer.mozilla.org/docs/Glossary/Identifier), [rest parameter](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/rest_parameters), or [destructured](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment) parameter, optionally with a [default](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/Default_parameters)), or a list of such strings separated with commas.\n\n    As the parameters are parsed in the same way as function expressions, whitespace and comments are accepted. For example: `\"x\", \"theValue = 42\", \"[a, b] /* numbers */\"` — or `\"x, theValue = 42, [a, b] /* numbers */\"`. (`\"x, theValue = 42\", \"[a, b]\"` is also correct, though very confusing to read.)\n\n- `functionBody`\n  - : A string containing the JavaScript statements comprising the function definition.\n\n## Description\n\n`Function` objects created with the `Function` constructor are parsed when the function is created. This is less efficient than creating a function with a [function expression](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/function) or [function declaration](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function) and calling it within your code, because such functions are parsed with the rest of the code.\n\nAll arguments passed to the function, except the last, are treated as the names of the identifiers of the parameters in the function to be created, in the order in which they are passed. The function will be dynamically compiled as a function expression, with the source assembled in the following fashion:\n\n```js\n`function anonymous(${args.join(\",\")}\n) {\n${functionBody}\n}`\n```\n\nThis is observable by calling the function's [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/toString) method.\n\nHowever, unlike normal [function expressions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/function), the name `anonymous` is not added to the `functionBody`'s scope, since `functionBody` only has access the global scope. If `functionBody` is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode) (the body itself needs to have the `\"use strict\"` directive since it doesn't inherit the strictness from the context), you may use [`arguments.callee`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/arguments/callee) to refer to the function itself. Alternatively, you can define the recursive part as an inner function:\n\n```js\nconst recursiveFn = new Function(\"count\", `\n(function recursiveFn(count) {\n  if (count < 0) {\n    return;\n  }\n  console.log(count);\n  recursiveFn(count - 1);\n})(count);\n`);\n```\n\nNote that the two dynamic parts of the assembled source — the parameters list `args.join(\",\")` and `functionBody` — will first be parsed separately to ensure they are each syntactically valid. This prevents injection-like attempts.\n\n```js\nnew Function(\"/*\", \"*/) {\");\n// SyntaxError: Unexpected end of arg string\n// Doesn't become \"function anonymous(/*) {*/) {}\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Function/prototype/apply.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.apply()\n\nThe **`apply()`** method calls the specified function with a given `this` value, and `arguments` provided as an array (or an [array-like object](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects)).\n\n\n\n## Syntax\n\n```js\napply(thisArg)\napply(thisArg, argsArray)\n```\n\n### Parameters\n\n- `thisArg`\n  - : The value of `this` provided for the call to `func`. If the function is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) will be replaced with the global object, and primitive values will be converted to objects.\n- `argsArray` _**optional**_\n  - : An array-like object, specifying the arguments with which `func` should be called, or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../../globals/undefined.mdx) if no arguments should be provided to the function.\n\n### Return value\n\nThe result of calling the function with the specified `this` value and arguments.\n\n## Description\n\n> **Note:** This function is almost identical to [`Function.prototype.call()`](../../../globals/Function/prototype/call.mdx), except that `call()` accepts an **argument list**, while `apply()` accepts a **single array of arguments** — for example, `func.apply(this, ['eat', 'bananas'])` vs. `func.call(this, 'eat', 'bananas')`.\n\nNormally, when calling a function, the value of [`this`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this) inside the function is the object that the function was accessed on. With `apply()`, you can assign an arbitrary value as `this` when calling an existing function, without first attaching the function to the object as a property. This allows you to use methods of one object as generic utility functions.\n\n> **Warning:** Do not use `apply()` to chain constructors (for example, to implement inheritance). This invokes the constructor function as a plain function, which means [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target) is `undefined`, and classes throw an error because they can't be called without `new`. Use [`Reflect.construct()`](../../../globals/Reflect/construct.mdx) or [`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Function/prototype/bind.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.bind()\n\nThe **`bind()`** method creates a new function that, when called, has its `this` keyword set to the provided value, with a given sequence of arguments preceding any provided when the new function is called.\n\n\n\n## Syntax\n\n```js\nbind(thisArg)\nbind(thisArg, arg1)\nbind(thisArg, arg1, arg2)\nbind(thisArg, arg1, arg2, /* …, */ argN)\n```\n\n### Parameters\n\n- `thisArg`\n  - : The value to be passed as the `this` parameter to the target function `func` when the bound function is called. If the function is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) will be replaced with the global object, and primitive values will be converted to objects. The value is ignored if the bound function is constructed using the `new` operator.\n- `arg1, …, argN` _**optional**_\n  - : Arguments to prepend to arguments provided to the bound function when invoking `func`.\n\n### Return value\n\nA copy of the given function with the specified `this` value, and initial arguments (if provided).\n\n## Description\n\nThe `bind()` function creates a new _bound function_. Calling the bound function generally results in the execution of the function it wraps, which is also called the _target function_. The bound function will store the parameters passed — which include the value of `this` and the first few arguments — as its internal state. These values are stored in advance, instead of being passed at call time. You can generally see `const boundFn = fn.bind(thisArg, arg1, arg2)` as being equivalent to `const boundFn = (...restArgs) => fn.call(thisArg, arg1, arg2, ...restArgs)` for the effect when it's called (but not when `boundFn` is constructed).\n\nA bound function can be further bound by calling `boundFn.bind(thisArg, /* more args */)`, which creates another bound function `boundFn2`. The newly bound `thisArg` value is ignored, because the target function of `boundFn2`, which is `boundFn`, already has a bound `this`. When `boundFn2` is called, it would call `boundFn`, which in turn calls `fn`. The arguments that `fn` ultimately receives are, in order: the arguments bound by `boundFn`, arguments bound by `boundFn2`, and the arguments received by `boundFn2`.\n\n```js\n\"use strict\"; // prevent `this` from being boxed into the wrapper object\n\nfunction log(...args) {\n  console.log(this, ...args);\n}\nconst boundLog = log.bind(\"this value\", 1, 2);\nconst boundLog2 = boundLog.bind(\"new this value\", 3, 4);\nboundLog2(5, 6); // \"this value\", 1, 2, 3, 4, 5, 6\n```\n\nA bound function may also be constructed using the `new` operator if its target function is constructable. Doing so acts as though the target function had instead been constructed. The prepended arguments are provided to the target function as usual, while the provided `this` value is ignored (because construction prepares its own `this`, as seen by the parameters of [`Reflect.construct`](../../../globals/Reflect/construct.mdx)). If the bound function is directly constructed, [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target) will be the target function instead. (That is, the bound function is transparent to `new.target`.)\n\n```js\nclass Base {\n  constructor(...args) {\n    console.log(new.target === Base);\n    console.log(args);\n  }\n}\n\nconst BoundBase = Base.bind(null, 1, 2);\n\nnew BoundBase(3, 4); // true, [1, 2, 3, 4]\n```\n\nHowever, because a bound function does not have the [`prototype`](../../../globals/Function/prototype/) property, it cannot be used as a base class for [`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends).\n\n```js example-bad\nclass Derived extends class {}.bind(null) {}\n// TypeError: Class extends value does not have valid prototype property undefined\n```\n\nWhen using a bound function as the right-hand side of [`instanceof`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/instanceof), `instanceof` would reach for the target function (which is stored internally in the bound function) and read its `prototype` instead.\n\n```js\nclass Base {}\nconst BoundBase = Base.bind(null, 1, 2);\nconsole.log(new Base() instanceof BoundBase); // true\n```\n\nThe bound function has the following properties:\n\n- [`length`](../../../globals/Function/prototype/length.mdx)\n  - : The `length` of the target function minus the number of arguments being bound (not counting the `thisArg` parameter), with 0 being the minimum value.\n- [`name`](../../../globals/Function/prototype/name.mdx)\n  - : The `name` of the target function plus a `\"bound \"` prefix.\n\nThe bound function also inherits the [prototype chain](https://developer.mozilla.org/docs/Web/JavaScript/Inheritance_and_the_prototype_chain) of the target function. However, it doesn't have other own properties of the target function (such as [static properties](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/static) if the target function is a class).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Function/prototype/call.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.call()\n\nThe **`call()`** method calls the function with a given `this` value and arguments provided individually.\n\n## Syntax\n\n```js\ncall(thisArg)\ncall(thisArg, arg1)\ncall(thisArg, arg1, /* …, */ argN)\n```\n\n### Parameters\n\n- `thisArg`\n  - : The value to use as `this` when calling `func`. If the function is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) will be replaced with the global object, and primitive values will be converted to objects.\n- `arg1, …, argN` _**optional**_\n  - : Arguments for the function.\n\n### Return value\n\nThe result of calling the function with the specified `this` value and arguments.\n\n## Description\n\n> **Note:** This function is almost identical to [`Function.prototype.apply()`](../../../globals/Function/prototype/apply.mdx), except that `call()` accepts an **argument list**, while `apply()` accepts a **single array of arguments** — for example, `func.apply(this, ['eat', 'bananas'])` vs. `func.call(this, 'eat', 'bananas')`.\n\nNormally, when calling a function, the value of [`this`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this) inside the function is the object that the function was accessed on. With `call()`, you can assign an arbitrary value as `this` when calling an existing function, without first attaching the function to the object as a property. This allows you to use methods of one object as generic utility functions.\n\n> **Warning:** Do not use `call()` to chain constructors (for example, to implement inheritance). This invokes the constructor function as a plain function, which means [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target) is `undefined`, and classes throw an error because they can't be called without `new`. Use [`Reflect.construct()`](../../../globals/Reflect/construct.mdx) or [`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Function/prototype/index.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.prototype\n\nThe **`prototype`** data property of a `Function` instance is used when the function is used as a constructor with the `new` operator. It will become the new object's prototype.\n\n> **Note:** Not all `Function` objects have the `prototype` property — see [description](#description).\n\n## Value\n\nAn object.\n\n> **Note:** The `prototype` property of [classes](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes) is not writable.\n\n## Description\n\nWhen a function is called with `new`, the constructor's `prototype` property will become the resulting object's prototype.\n\n```js\nfunction Ctor() {}\nconst inst = new Ctor();\nconsole.log(Object.getPrototypeOf(inst) === Ctor.prototype); // true\n```\n\nYou can read [Inheritance and the prototype chain](https://developer.mozilla.org/docs/Web/JavaScript/Inheritance_and_the_prototype_chain#constructors) for more information about the interactions between a constructor function's `prototype` property and the resulting object's prototype.\n\nA function having a `prototype` property is not sufficient for it to be eligible as a constructor. [Generator functions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function*) have a `prototype` property, but cannot be called with `new`:\n\n```js\nasync function* asyncGeneratorFunction() {}\nfunction* generatorFunction() {}\n```\n\nInstead, generator functions' `prototype` property is used when they are called _without_ `new`. The `prototype` property will become the returned [`Generator`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Generator) object's prototype.\n\nIn addition, some functions may have a `prototype` but throw unconditionally when called with `new`. For example, the [`Symbol()`](../../../globals/Symbol/Symbol.mdx) and [`BigInt`](../../../globals/BigInt/BigInt.mdx) functions throw when called with `new`, because `Symbol.prototype` and `BigInt.prototype` are only intended to provide methods for the primitive values, but the wrapper objects should not be directly constructed.\n\nThe following functions do not have `prototype`, and are therefore ineligible as constructors, even if a `prototype` property is later manually assigned:\n\n```js\nconst method = { foo() {} }.foo;\nconst arrowFunction = () => {};\nasync function asyncFunction() {}\n```\n\nThe following are valid constructors that have `prototype`:\n\n```js\nclass Class {}\nfunction fn() {}\n```\n\nA [bound function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/bind) does not have a `prototype` property, but may be constructable. When it's constructed, the target function is constructed instead, and if the target function is constructable, it would return a normal instance.\n\n```js\nconst boundFunction = function () {}.bind(null);\n```\n\nA function's `prototype` property, by default, is a plain object with one property: (`constructor`)[../../../globals/Object/prototype/constructor.mdx), which is a reference to the function itself. The `constructor` property is writable, non-enumerable, and configurable.\n\nIf the `prototype` of a function is reassigned with something other than an `Object`, when the function is called with `new`, the returned object's prototype would be `Object.prototype` instead. (In other words, `new` ignores the `prototype` property and constructs a plain object.)\n\n```js\nfunction Ctor() {}\nCtor.prototype = 3;\nconsole.log(Object.getPrototypeOf(new Ctor()) === Object.prototype); // true\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Function/prototype/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.length\n\nThe **`length`** data property of a `Function` instance indicates the number of parameters expected by the function.\n\n## Value\n\nA number.\n\n## Description\n\nA `Function` object's `length` property indicates how many arguments the function expects, i.e. the number of formal parameters. \n\nThe `Function` constructor is itself a `Function` object. Its `length` data property has a value of `1`.\n\nDue to historical reasons, `Function.prototype` is a callable itself. The `length` property of `Function.prototype` has a value of `0`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Function/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.name\n\nThe **`name`** property of a `Function` instance indicates the function's name as specified when it was created, or it may be either `anonymous` or `''` (an empty string) for functions created anonymously.\n\n## Value\n\nA string.\n\n> **Note:** In non-standard, pre-ES2015 implementations the `configurable` attribute was `false` as well.\n\n## Description\n\nThe function's `name` property can be used to identify the function in debugging tools or error messages. It has no semantic significance to the language itself.\n\nThe `name` property is read-only and cannot be changed by the assignment operator:\n\n```js\nfunction someFunction() {}\n\nsomeFunction.name = 'otherFunction';\nconsole.log(someFunction.name); // someFunction\n```\n\nTo change it, use [`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx).\n\nThe `name` property is typically inferred from how the function is defined. In the following sections, we will describe the various ways in which it can be inferred.\n\n### Function declaration\n\nThe `name` property returns the name of a function declaration.\n\n```js\nfunction doSomething() {}\ndoSomething.name; // \"doSomething\"\n```\n\n### Default-exported function declaration\n\nAn [`export default`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/export) declaration exports the function as a declaration instead of an expression. If the declaration is anonymous, the name is `\"default\"`.\n\n```js\n// -- someModule.js --\nexport default function () {};\n\n// -- main.js --\nimport someModule from \"./someModule.js\";\n\nsomeModule.name; // \"default\"\n```\n\n### Function constructor\n\nFunctions created with the [`Function()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/Function) constructor have name \"anonymous\".\n\n```js\nnew Function().name; // \"anonymous\"\n```\n\n### Function expression\n\nIf the function expression is named, that name is used as the `name` property.\n\n```js\nconst someFunction = function someFunctionName() {};\nsomeFunction.name; // \"someFunctionName\"\n```\n\nAnonymous function expressions created using the keyword `function` or arrow functions would have `\"\"` (an empty string) as their name.\n\n```js\n(function () {}).name; // \"\"\n(() => {}).name; // \"\"\n```\n\nHowever, such cases are rare — usually, in order to refer to the expression elsewhere, the function expression is attached to an identifier when it's created (such as in a variable declaration). In such cases, the name can be inferred, as the following few subsections demonstrate.\n\nOne practical case where the name cannot be inferred is a function returned from another function:\n\n```js\nfunction getFoo() {\n  return () => {};\n}\ngetFoo().name; // \"\"\n```\n\n### Variable declaration and method\n\nVariables and methods can infer the name of an anonymous function from its syntactic position.\n\n```js\nconst f = function () {};\nconst object = {\n  someMethod: function () {}\n};\n\nconsole.log(f.name); // \"f\"\nconsole.log(object.someMethod.name); // \"someMethod\"\n```\n\nThe same applies to assignment:\n\n```js\nlet f;\nf = () => {};\nf.name; // \"f\"\n```\n\n### Initializer and default value\n\nFunctions in initializers (default values) of [destructuring](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#default_value), [default parameters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/Default_parameters), [class fields](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/Public_class_fields), etc., will inherit the name of the bound identifier as their `name`.\n\n```js\nconst [f = () => {}] = [];\nf.name; // \"f\"\n\nconst { someMethod: m = () => {} } = {};\nm.name; // \"m\"\n\nfunction foo(f = () => {}) {\n  console.log(f.name);\n}\nfoo(); // \"f\"\n\nclass Foo {\n  static someMethod = () => {};\n}\nFoo.someMethod.name; // someMethod\n```\n\n### Shorthand method\n\n```js\nconst o = {\n  foo() {},\n};\no.foo.name; // \"foo\";\n```\n\n### Bound function\n\n[`Function.prototype.bind()`](../../../globals/Function/prototype/bind.mdx) produces a function whose name is \"bound \" plus the function name.\n\n```js\nfunction foo() {};\nfoo.bind({}).name; // \"bound foo\"\n```\n\n### Getter and setter\n\nWhen using [`get`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/get) and [`set`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/set) accessor properties, \"get\" or \"set\" will appear in the function name.\n\n```js\nconst o = {\n  get foo() {},\n  set foo(x) {},\n};\n\nconst descriptor = Object.getOwnPropertyDescriptor(o, \"foo\");\ndescriptor.get.name; // \"get foo\"\ndescriptor.set.name; // \"set foo\";\n```\n\n### Class\n\nA class's name follows the same algorithm as function declarations and expressions.\n\n```js\nclass Foo {}\nFoo.name; // \"Foo\"\n```\n\n> **Warning:** JavaScript will set the function's `name` property only if a function does not have an own property called `name`. However, classes' [static members](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/static) will be set as own properties of the class constructor function, and thus prevent the built-in `name` from being applied. See [telling the constructor name of an object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name#telling_the_constructor_name_of_an_object) for more details.\n\n### Symbol as function name\n\nIf a `Symbol` is used a function name and the symbol has a description, the method's name is the description in square brackets.\n\n```js\nconst sym1 = Symbol(\"foo\");\nconst sym2 = Symbol();\n\nconst o = {\n  [sym1]() {},\n  [sym2]() {},\n};\n\no[sym1].name; // \"[foo]\"\no[sym2].name; // \"[]\"\n```\n\n### Private property\n\nPrivate fields and private methods have the hash (`#`) as part of their names.\n\n```js\nclass Foo {\n  #field = () => {};\n  #method() {}\n  getNames() {\n    console.log(this.#field.name);\n    console.log(this.#method.name);\n  }\n}\n\nnew Foo().getNames();\n// \"#field\"\n// \"#method\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Function/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.toString()\n\nThe **`toString()`** method returns a string representing the source code of the specified `Function`.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the source code of the function.\n\n## Description\n\nThe `Function` object overrides the `toString()` method\ninherited from `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For user-defined `Function`\nobjects, the `toString` method returns a string containing the source text\nsegment which was used to define the function.\n\nJavaScript calls the `toString` method automatically when a\n`Function` is to be represented as a text value, e.g. when a function is\nconcatenated with a string.\n\nThe `toString()` method will throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) exception\n(\"Function.prototype.toString called on incompatible object\"), if its\n`this` value object is not a `Function` object.\n\n```js example-bad\nFunction.prototype.toString.call('foo'); // throws TypeError\n```\n\nIf the `toString()` method is called on built-in function objects, a\nfunction created by [`Function.prototype.bind()`](../../../globals/Function/prototype/bind.mdx), or\nother non-JavaScript functions, then `toString()` returns a\n_native function string_ which looks like\n\n```js\n\"function someName() { [native code] }\"\n```\n\nFor intrinsic object methods and functions, `someName` is the initial name of the function; otherwise its content may be implementation-defined, but will always be in property name syntax, like `[1 + 1]`, `someName`, or `1`.\n\n> **Note:** This means using [`eval()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/eval) on native function strings is a guaranteed syntax error.\n\nIf the `toString()` method is called on a function created by the `Function` constructor, `toString()` returns the source code of a synthesized function declaration named \"anonymous\" using the provided parameters and function body. For example, `Function(\"a\", \"b\", \"return a + b\").toString()` will return:\n\n```js\n\"function anonymous(a,b\\n) {\\nreturn a + b\\n}\"\n```\n\nSince ES2018, the spec requires the return value of `toString()` to be the exact same source code as it was declared, including any whitespace and/or comments — or, if the host doesn't have the source code available for some reason, requires returning a native function string. Support for this revised behavior can be found in the [browser compatibility table](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/toString#browser_compatibility).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Headers/Headers.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers()\n\nThe **`Headers()`** constructor creates a new `Headers` object.\n\n## Syntax\n\n```js\nnew Headers()\nnew Headers(init)\n```\n\n### Parameters\n\n- `init` _**optional**_\n  - : An object containing any HTTP headers that you want to pre-populate your `Headers` object with. This can be a\n    simple object literal with `String` values, an array of name-value pairs, where each pair is a 2-element string array; or an existing\n    `Headers` object. In the last case, the new `Headers` object\n    copies its data from the existing `Headers` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Headers/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.append()\n\nThe **`append()`** method of the `Headers`\ninterface appends a new value onto an existing header inside a `Headers`\nobject, or adds the header if it does not already exist.\n\nThe difference between `Headers.prototype.set()` and `append()` is\nthat if the specified header already exists and accepts multiple values,\n`set()` will overwrite the existing value with the new one, whereas\n`append()` will append the new value onto the end of the set of values.\n\n## Syntax\n\n```js\nappend(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to add to the `Headers` object.\n- `value`\n  - : The value of the HTTP header you want to add.\n\n### Return value\n\nNone (`undefined`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Headers/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.delete()\n\nThe **`delete()`** method of the `Headers`\ninterface deletes a header from the current `Headers` object.\n\nThis method throws a `TypeError` for the following reasons:\n\n- The value of the name parameter is not the name of an HTTP header.\n\n## Syntax\n\n```js\ndelete(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to delete from the `Headers` object.\n\n### Return value\n\nNone (`undefined`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Headers/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.entries()\n\nThe **`Headers.entries()`** method returns an iterator allowing to go through all key/value pairs\ncontained in this object. The both the key and value of each pairs are `String` objects.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Headers/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.forEach()\n\nThe **`Headers.forEach()`** method executes a callback function once per each key/value pair in the `Headers` object.\n\n## Syntax\n\n```js\n// Arrow function\nforEach((value, key) => { /* … */ })\nforEach((value, key, object) => { /* … */ })\n\n// Inline callback function\nforEach(function (value, key) { /* … */ })\nforEach(function (value, key, object) { /* … */ })\nforEach(function (value, key) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n  - : Function to execute for each entry in the map. It takes the following arguments:\n    - `value`\n      - : Value of the currently visited header entry.\n    - `key`\n      - : Name of the currently visited header entry.\n    - `object`\n      - : The Headers object being iterated.\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `callback`.\n\n### Return value\n\n`undefined`.\n\n## Description\n\nThe `Headers.forEach()` method executes the provided callback once for each key of the Headers which actually exist. It is not invoked for keys which have been deleted. However, it is executed for keys which are present but have the value undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Headers/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.get()\n\nThe **`get()`** method of the [`Headers`](../../../globals/Headers/Headers.mdx) interface\nreturns a byte string of all the values of a header within a `Headers` object\nwith a given name. If the requested header doesn't exist in the `Headers`\nobject, it returns `null`.\n\n## Syntax\n\n```js\nget(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header whose values you want to retrieve from the\n    `Headers` object. If the given name is not the name of an HTTP header, this\n    method throws a `TypeError`. The name is case-insensitive.\n\n### Return value\n\nA [`String`](../../../globals/String/String.mdx) sequence representing the values of the retrieved header or\n`null` if this header is not set.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Headers/prototype/getSetCookie.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.getSetCookie()\n\nThe **`getSetCookie()`** method of the [`Headers`](../../../globals/Headers/Headers.mdx) interface\nreturns an array of all the values of the `Set-Cookie` headers, returning\nan empty list if none are present.\n\n## Syntax\n\n```js\ngetSetCookie()\n```\n\n### Return value\n\n`String[]` representing the list of `Set-Cookie` headers.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Headers/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.has()\n\nThe **`has()`** method of the `Headers` interface\nreturns a boolean stating whether a `Headers` object contains a certain\nheader.\n\n## Syntax\n\n```js\nhas(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to test for. If the given name is not a valid\n    HTTP header name, this method throws a `TypeError`.\n\n### Return value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Headers/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.keys()\n\nThe **`Headers.keys()`** method returns an iterator allowing to go through all keys contained\nin this object. The keys are `String` objects.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Headers/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.set()\n\nThe **`set()`** method of the `Headers` interface\nsets a new value for an existing header inside a `Headers` object, or adds\nthe header if it does not already exist.\n\nThe difference between `set()` and `Headers.append` is that if\nthe specified header already exists and accepts multiple values, `set()`\noverwrites the existing value with the new one, whereas `Headers.append`\nappends the new value to the end of the set of values.\n\n## Syntax\n\n```js\nset(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to set to a new value. If the given name is not\n    the name of an HTTP header, this method throws a `TypeError`.\n- `value`\n  - : The new value you want to set.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Headers/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.values()\n\nThe **`Headers.values()`** method returns an iterator allowing to go through all values contained\nin this object. The values are `String` objects.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/HmacImportParams/HmacImportParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# HmacImportParams\n\nThe **`HmacImportParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.importKey`, when generating a key for the `HMAC` algorithm.\n\n## Instance properties\n\n- `name`\n  - : A string. This should be set to `HMAC`.\n- `hash`\n\n  - : A string representing the name of the digest function to use. The can take a value of `SHA-1`, `SHA-256`, `SHA-384`, or `SHA-512`.\n\n- `length` _optional_\n  - : A `Number` representing the length in bits of the key. If this is omitted the length of the key is equal to the length of the digest generated by the digest function you have chosen. Unless you have a good reason to use a different length, omit this property and use the default.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Infinity.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Infinity\n\nThe global property **`Infinity`** is a numeric value representing infinity.\n\n## Value\n\nThe same number value as `Number.POSITIVE_INFINITY`.\n\n## Description\n\n`Infinity` is a property of the _global object_. In other words, it is a variable in global scope.\n\nThe value `Infinity` (positive infinity) is greater than any other number.\n\nThis value behaves slightly differently than mathematical infinity; see `Number.POSITIVE_INFINITY` for details.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Int16Array/Int16Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Int16Array()\n\nThe **`Int16Array()`** typed array constructor creates an array\nof twos-complement 16-bit signed integers in the platform byte order. If control over\nbyte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are initialized\nto `0`. Once established, you can reference elements in the array using the\nobject's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Int16Array()\nnew Int16Array(length)\nnew Int16Array(typedArray)\nnew Int16Array(object)\n\nnew Int16Array(buffer)\nnew Int16Array(buffer, byteOffset)\nnew Int16Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Int16Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Int32Array/Int32Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Int32Array()\n\nThe **`Int32Array()`** typed array constructor creates an array\nof twos-complement 32-bit signed integers in the platform byte order. If control over\nbyte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are initialized\nto `0`. Once established, you can reference elements in the array using the\nobject's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Int32Array()\nnew Int32Array(length)\nnew Int32Array(typedArray)\nnew Int32Array(object)\n\nnew Int32Array(buffer)\nnew Int32Array(buffer, byteOffset)\nnew Int32Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Int32Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Int8Array/Int8Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Int8Array()\n\nThe **`Int8Array()`** constructor creates a typed array of\ntwos-complement 8-bit signed integers. The contents are initialized to `0`.\nOnce established, you can reference elements in the array using the object's methods, or\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew Int8Array()\nnew Int8Array(length)\nnew Int8Array(typedArray)\nnew Int8Array(object)\n\nnew Int8Array(buffer)\nnew Int8Array(buffer, byteOffset)\nnew Int8Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Int8Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/JSON/parse.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# JSON.parse()\n\nThe **`JSON.parse()`** method parses a JSON string, constructing the JavaScript value or object described by the string. An optional _reviver_ function can be provided to perform a transformation on the resulting object before it is returned.\n\n## Syntax\n\n```js\nJSON.parse(text)\nJSON.parse(text, reviver)\n```\n\n### Parameters\n\n- `text`\n  - : The string to parse as JSON.\n- `reviver` _**optional**_\n  - : If a function, this prescribes how each value originally produced by parsing is transformed before being returned. Non-callable values are ignored. The function is called with the following arguments:\n    - `key`\n      - : The key associated with the value.\n    - `value`\n      - : The value produced by parsing.\n\n### Return value\n\nThe `Object`, `Array`, string, number, boolean, or `null` value corresponding to the given JSON `text`.\n\n### Exceptions\n\n- [`SyntaxError`](../../globals/SyntaxError/SyntaxError.mdx)\n  - : Thrown if the string to parse is not valid JSON.\n\n## Description\n\n`JSON.parse()` parses a JSON string according to the [JSON grammar](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/JSON#full_json_grammar), then evaluates the string as if it's a JavaScript expression. The only instance where a piece of JSON text represents a different value from the same JavaScript expression is when dealing with the `\"__proto__\"` key — see [Object literal syntax vs. JSON](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Object_initializer#object_literal_syntax_vs._json).\n\n### The reviver parameter\n\nIf a `reviver` is specified, the value computed by parsing is _transformed_ before being returned. Specifically, the computed value and all its properties (in a [depth-first](https://en.wikipedia.org/wiki/Depth-first_search) fashion, beginning with the most nested properties and proceeding to the original value itself) are individually run through the `reviver`.\n\nThe `reviver` is called with the object containing the property being processed as `this`, and two arguments: `key` and `value`, representing the property name as a string (even for arrays) and the property value. If the `reviver` function returns [`undefined`](../../globals/undefined.mdx) (or returns no value — for example, if execution falls off the end of the function), the property is deleted from the object. Otherwise, the property is redefined to be the return value. If the `reviver` only transforms some values and not others, be certain to return all untransformed values as-is — otherwise, they will be deleted from the resulting object.\n\nSimilar to the `replacer` parameter of [`JSON.stringify()`](../../globals/JSON/stringify.mdx), `reviver` will be last called on the root object with an empty string as the `key` and the root object as the `value`. For JSON text parsing to primitive values, `reviver` will be called once.\n\nNote that `reviver` is run after the value is parsed. So, for example, numbers in JSON text will have already been converted to JavaScript numbers, and may lose precision in the process. To transfer large numbers without loss of precision, serialize them as strings, and revive them to [BigInts](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/BigInt), or other appropriate arbitrary precision formats.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/JSON/stringify.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# JSON.stringify()\n\nThe **`JSON.stringify()`** method converts a JavaScript value to a JSON string, optionally replacing values if a replacer function is specified or optionally including only the specified properties if a replacer array is specified.\n\n## Syntax\n\n```js\nJSON.stringify(value)\nJSON.stringify(value, replacer)\nJSON.stringify(value, replacer, space)\n```\n\n### Parameters\n\n- `value`\n  - : The value to convert to a JSON string.\n- `replacer` _**optional**_\n  - : A function that alters the behavior of the stringification process, or an array of strings or numbers naming properties of `value` that should be included in the output. If `replacer` is an array, all elements that are not strings or numbers (can be either primitives or wrapper objects), including `Symbol` values, are completely ignored. If `replacer` is anything other than a function or an array (e.g. [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or not provided), all properties of the object are included in the resulting JSON string.\n- `space` _**optional**_\n\n  - : A string or number that's used to insert white space (including indentation, line break characters, etc.) into the output JSON string for readability purposes.\n\n    If this is a number, it indicates the number of space characters to be used as indentation, clamped to 10 (that is, any number greater than `10` is treated as if it were `10`). Values less than 1 indicate that no space should be used.\n\n    If this is a string, the string (or the first 10 characters of the string, if it's longer than that) is inserted before every nested object or array.\n\n    If `space` is anything other than a string or number (can be either a primitive or a wrapper object) — for example, is [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or not provided — no white space is used.\n\n### Return value\n\nA JSON string representing the given value, or undefined.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if one of the following is true:\n    - `value` contains a circular reference.\n    - A `BigInt` value is encountered.\n\n## Description\n\n`JSON.stringify()` converts a value to JSON notation representing it:\n\n- `Boolean`, `Number`, `String`, and `BigInt` (obtainable via [`Object()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/Object)) objects are converted to the corresponding primitive values during stringification, in accordance with the traditional conversion semantics. `Symbol` objects (obtainable via [`Object()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/Object)) are treated as plain objects.\n- Attempting to serialize `BigInt` values will throw. However, if the BigInt has a `toJSON()` method (through monkeypatching: `BigInt.prototype.toJSON = ...`), that method can provide the serialization result. This constraint ensures that a proper serialization (and, very likely, its accompanying deserialization) behavior is always explicitly provided by the user.\n- [`undefined`](../../globals/undefined.mdx), `Function`, and `Symbol` values are not valid JSON values. If any such values are encountered during conversion, they are either omitted (when found in an object) or changed to [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) (when found in an array). `JSON.stringify()` can return `undefined` when passing in \"pure\" values like `JSON.stringify(() => {})` or `JSON.stringify(undefined)`.\n- The numbers [`Infinity`](../../globals/Infinity.mdx) and [`NaN`](../../globals/NaN.mdx), as well as the value [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null), are all considered `null`. (But unlike the values in the previous point, they would never be omitted.)\n- Arrays are serialized as arrays (enclosed by square brackets). Only array indices between 0 and `length - 1` (inclusive) are serialized; other properties are ignored.\n- For other objects:\n\n  - All `Symbol`-keyed properties will be completely ignored, even when using the [`replacer`](#the-replacer-parameter) parameter.\n\n  - If the value has a `toJSON()` method, it's responsible to define what data will be serialized. Instead of the object being serialized, the value returned by the `toJSON()` method when called will be serialized. `JSON.stringify()` calls `toJSON` with one parameter, the `key`, which has the same semantic as the `key` parameter of the [`replacer`](#the-replacer-parameter) function:\n\n    - if this object is a property value, the property name\n    - if it is in an array, the index in the array, as a string\n    - if `JSON.stringify()` was directly called on this object, an empty string\n\n    `Date` objects implement the [`toJSON()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toJSON) method which returns a string (the same as [`date.toISOString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)). Thus, they will be stringified as strings.\n\n  - Only [enumerable own properties](https://developer.mozilla.org/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) are visited. This means [Map](../../globals/Map/Map.mdx), [Set](../../globals/Set/Set.mdx), etc. will become `\"{}\"`. You can use the [`replacer`](#the-replacer-parameter) parameter to serialize them to something more useful.\n\n    Properties are visited using the same algorithm as [`Object.keys()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/keys), which has a well-defined order and is stable across implementations. For example, `JSON.stringify` on the same object will always produce the same string, and `JSON.parse(JSON.stringify(obj))` would produce an object with the same key ordering as the original (assuming the object is completely JSON-serializable).\n\n### The replacer parameter\n\nThe `replacer` parameter can be either a function or an array.\n\nAs an array, its elements indicate the names of the properties in the object that should be included in the resulting JSON string. Only string and number values are taken into account; symbol keys are ignored.\n\nAs a function, it takes two parameters: the `key` and the `value` being stringified. The object in which the key was found is provided as the `replacer`'s `this` context.\n\nThe `replacer` function is called for the initial object being stringified as well, in which case the `key` is an empty string (`\"\"`). It is then called for each property on the object or array being stringified. Array indices will be provided in its string form as `key`. The current property value will be replaced with the `replacer`'s return value for stringification. This means:\n\n- If you return a number, string, boolean, or `null`, that value is directly serialized and used as the property's value. (Returning a BigInt will throw as well.)\n- If you return a `Function`, `Symbol`, or [`undefined`](../../globals/undefined.mdx), the property is not included in the output.\n- If you return any other object, the object is recursively stringified, calling the `replacer` function on each property.\n\n> **Note:** When parsing JSON generated with `replacer` functions, you would likely want to use the [`reviver`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#using_the_reviver_parameter) parameter to perform the reverse operation.\n\nTypically, array elements' index would never shift (even when the element is an invalid value like a function, it will become `null` instead of omitted). Using the `replacer` function allows you to control the order of the array elements by returning a different array.\n\n### The space parameter\n\nThe `space` parameter may be used to control spacing in the final string.\n\n- If it is a number, successive levels in the stringification will each be indented by this many space characters.\n- If it is a string, successive levels will be indented by this string.\n\nEach level of indentation will never be longer than 10. Number values of `space` are clamped to 10, and string values are truncated to 10 characters.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Map/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get Map\\[Symbol.species]\n\nThe **`Map[Symbol.species]`** accessor property is an unused accessor property specifying how to copy `Map` objects.\n\n## Syntax\n\n```js\nMap[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct copied `Map` instances.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `Map` objects. Subclass constructors may override it to change the constructor assignment.\n\n> **Note:** This property is currently unused by all `Map` methods.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Map/Map.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map()\n\nThe **`Map()` constructor** creates [Map](../../globals/Map/Map.mdx) objects.\n\n## Syntax\n\n```js\nnew Map()\nnew Map(iterable)\n```\n\n> **Note:** `Map()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable` _**optional**_\n  - : An `Array` or other\n    [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) object\n    whose elements are key-value pairs. (For example, arrays with two elements,\n    such as `[[ 1, 'one' ],[ 2, 'two' ]]`.) Each key-value pair is added to the\n    new `Map`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Map/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype\\[Symbol.iterator]()\n\nThe **`Symbol.iterator`** method of a `Map` object implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows maps to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the key-value pairs of the map.\n\nThe initial value of this property is the same function object as the initial value of the [`Map.prototype.entries`](../../../globals/Map/prototype/entries.mdx) property.\n\n## Syntax\n\n```js\nmap[Symbol.iterator]()\n```\n\n### Return value\n\nThe same return value as [`Map.prototype.entries()`](../../../globals/Map/prototype/entries.mdx): a new iterable iterator object that yields the key-value pairs of the map.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Map/prototype/clear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.clear()\n\nThe **`clear()`** method removes all elements from a `Map` object.\n\n## Syntax\n\n```js\nclear()\n```\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Map/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.delete()\n\nThe **`delete()`** method removes the specified element from a `Map` object by\nkey.\n\n## Syntax\n\n```js\ndelete(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to remove from the `Map` object.\n\n### Return value\n\n`true` if an element in the `Map` object existed and has been removed, or\n`false` if the element does not exist.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Map/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.entries()\n\nThe **`entries()`** method returns a new\n_[iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators)_ object\nthat contains the `[key, value]` pairs for each element in the `Map` object in\ninsertion order. In this particular case, this iterator object is also an\niterable, so the for-of loop can be used. When the protocol `[Symbol.iterator]`\nis used, it returns a function that, when invoked, returns this iterator itself.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nA new [Map](../../../globals/Map/Map.mdx) iterator object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Map/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.forEach()\n\nThe **`forEach()`** method executes a provided function once per each key/value\npair in the `Map` object, in insertion order.\n\n## Syntax\n\n```js\n// Arrow function\nforEach(() => { /* … */ } )\nforEach((value) => { /* … */ } )\nforEach((value, key) => { /* … */ } )\nforEach((value, key, map) => { /* … */ } )\n\n// Callback function\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n\n// Inline callback function\nforEach(function() { /* … */ })\nforEach(function(value) { /* … */ })\nforEach(function(value, key) { /* … */ })\nforEach(function(value, key, map) { /* … */ })\nforEach(function(value, key, map) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n  - : Function to execute for each entry in the map. It takes the following\n    arguments:\n    - `value` _**optional**_\n      - : Value of each iteration.\n    - `key` _**optional**_\n      - : Key of each iteration.\n    - `map` _**optional**_\n      - : The map being iterated.\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `callback`.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n## Description\n\nThe `forEach` method executes the provided `callback` once for each key of the\nmap which actually exist. It is not invoked for keys which have been deleted.\nHowever, it is executed for values which are present but have the value\n`undefined`.\n\n`callback` is invoked with **three arguments**:\n\n- the entry's `value`\n- the entry's `key`\n- the **`Map` object** being traversed\n\nIf a `thisArg` parameter is provided to `forEach`, it will be passed to\n`callback` when invoked, for use as its `this` value. Otherwise, the value\n`undefined` will be passed for use as its `this` value. The `this` value\nultimately observable by `callback` is determined according to\n[the usual rules for determining the `this` seen by a function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this).\n\nEach value is visited once, except in the case when it was deleted and re-added\nbefore `forEach` has finished. `callback` is not invoked for values deleted\nbefore being visited. New values added before `forEach` has finished will be\nvisited.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Map/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.get()\n\nThe **`get()`** method returns a specified element from a `Map` object. If the\nvalue that is associated to the provided key is an object, then you will get a\nreference to that object and any change made to that object will effectively\nmodify it inside the `Map` object.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to return from the `Map` object.\n\n### Return value\n\nThe element associated with the specified key, or\n[`undefined`](../../../globals/undefined.mdx) if the key can't be found in the `Map` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Map/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.has()\n\nThe **`has()`** method returns a boolean indicating whether an element with the\nspecified key exists or not.\n\n## Syntax\n\n```js\nhas(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to test for presence in the `Map` object.\n\n### Return value\n\n`true` if an element with the specified key exists in the `Map` object;\notherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Map/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.keys()\n\nThe **`keys()`** method returns a new\n_[iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators)_ object\nthat contains the keys for each element in the `Map` object in insertion order. In this particular case, this iterator object is also an iterable, so a [for...of](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loop can be used.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nA new [Map](../../../globals/Map/Map.mdx) iterator object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Map/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.set()\n\nThe **`set()`** method adds or updates an entry in a `Map` object with a specified key and a value.\n\n## Syntax\n\n```js\nset(key, value)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to add to the `Map` object. The key may be any [JavaScript type](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures) (any [primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_values) or any type of [JavaScript object](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#objects)).\n- `value`\n  - : The value of the element to add to the `Map` object. The value may be any [JavaScript type](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures) (any [primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_values) or any type of [JavaScript object](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#objects)).\n\n### Return value\n\nThe `Map` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Map/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.size\n\nThe **`size`** accessor property returns the number of elements in a\n[Map](../../../globals/Map/Map.mdx) object.\n\n## Description\n\nThe value of `size` is an integer representing how many entries the `Map` object\nhas. A set accessor function for `size` is `undefined`; you can not change this\nproperty.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Map/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.values()\n\nThe **`values()`** method returns a new\n_[iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators)_ object\nthat contains the values for each element in the `Map` object in insertion\norder.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nA new [Map](../../../globals/Map/Map.mdx) iterator object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/E.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.E\n\nThe **`Math.E`** property represents Euler's number, the base of natural logarithms, e, which is approximately 2.718.\n\n## Value\n\n`2.718281828459045`\n\n## Description\n\nBecause `E` is a static property of `Math`, you always use it as `Math.E`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/LN10.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LN10\n\nThe **`Math.LN10`** property represents the natural logarithm of 10, approximately 2.302.\n\n## Value\n\n`2.302585092994046`\n\n## Description\n\nBecause `LN10` is a static property of `Math`, you always use it as `Math.LN10`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/LN2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LN2\n\nThe **`Math.LN2`** property represents the natural logarithm of 2, approximately 0.693:\n\n## Value\n\n`0.6931471805599453`\n\n## Description\n\nBecause `LN2` is a static property of `Math`, you always use it as `Math.LN2`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/LOG10e.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LOG10E\n\nThe **`Math.LOG10E`** property represents the base 10 logarithm of [E](./E.mdx), approximately 0.434.\n\n## Value\n\n`0.4342944819032518`\n\n## Description\n\nBecause `LOG10E` is a static property of `Math`, you always use it as `Math.LOG10E`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/LOG2e.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LOG2E\n\nThe **`Math.LOG2E`** property represents the base 2 logarithm of [E](./E.mdx), approximately 1.442.\n\n## Value\n\n`1.4426950408889634`\n\n## Description\n\nBecause `LOG2E` is a static property of `Math`, you always use it as `Math.LOG2E`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/PI.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.PI\n\nThe **`Math.PI`** property represents the ratio of the circumference of a circle to its diameter, approximately 3.14159.\n\n## Value\n\n`3.141592653589793`\n\n## Description\n\nBecause `PI` is a static property of `Math`, you always use it as `Math.PI`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/SQRT1_2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.SQRT1_2\n\nThe **`Math.SQRT1_2`** property represents the square root of 1/2, which is approximately 0.707.\n\n## Value\n\n`0.7071067811865476`\n\n## Description\n\n`Math.SQRT1_2` is a constant and a more performant equivalent to [`Math.sqrt(0.5)`](./sqrt.mdx).\n\nBecause `SQRT1_2` is a static property of `Math`, you always use it as `Math.SQRT1_2`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/SQRT2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.SQRT2\n\nThe **`Math.SQRT2`** property represents the square root of 2, approximately 1.414.\n\n## Value\n\n`0.7071067811865476`\n\n## Description\n\n`Math.SQRT2` is a constant and a more performant equivalent to [`Math.sqrt(2)`](./sqrt.mdx).\n\nBecause `SQRT2` is a static property of `Math`, you always use it as `Math.SQRT2`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/abs.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.abs()\n\nThe **`Math.abs()`** function returns the absolute value of a number.\n\n\n## Syntax\n\n```js\nMath.abs(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe absolute value of `x`. If `x` is negative (including `-0`), returns `-x`. Otherwise, returns `x`. The result is therefore always a positive number or `0`.\n\n## Description\n\nBecause `abs()` is a static method of `Math`, you always use it as `Math.abs()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/acos.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.acos()\n\nThe **`Math.acos()`** function returns the inverse cosine (in radians) of a number.\n\n## Syntax\n\n```js\nMath.acos(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number between -1 and 1, inclusive, representing the angle's cosine value.\n\n### Return value\n\nThe inverse cosine (angle in radians between 0 and π, inclusive) of `x`. If `x` is less than -1 or greater than 1, returns `NaN`.\n\n## Description\n\nBecause `acos()` is a static method of `Math`, you always use it as `Math.acos()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/acosh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.acosh()\n\nThe **`Math.acosh()`** function returns the inverse hyperbolic cosine of a number.\n\n## Syntax\n\n```js\nMath.acosh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 1.\n\n### Return value\n\nThe inverse hyperbolic cosine of `x`. If `x` is less than 1, returns `NaN`.\n\n## Description\n\nBecause `acosh()` is a static method of `Math`, you always use it as `Math.acosh()`, rather than as a method of a `Math` object you created (`Math` is no constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/asin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.asin()\n\nThe **`Math.asin()`** function returns the inverse sine (in radians) of a number.\n\n## Syntax\n\n```js\nMath.asin(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number between -1 and 1, inclusive, representing the angle's sine value.\n\n### Return value\n\nThe inverse sine (angle in radians between <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math>, inclusive) of `x`. If `x` is less than -1 or greater than 1, returns `NaN`.\n\n## Description\n\nBecause `asin()` is a static method of `Math`, you always use it as `Math.asin()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/asinh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.asinh()\n\nThe **`Math.asinh()`** function returns the inverse hyperbolic sine of a number. \n\n## Syntax\n\n```js\nMath.asinh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe inverse hyperbolic sine of `x`.\n\n## Description\n\nBecause `asinh()` is a static method of `Math`, you always use it as `Math.asinh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/atan.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.atan()\n\nThe **`Math.atan()`** function returns the inverse tangent (in radians) of a number.\n\n## Syntax\n\n```js\nMath.atan(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe inverse tangent (angle in radians between <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math> and <math><semantics><mfrac><mi>π</mi><mn>2</mn></mfrac></semantics></math>, inclusive) of `x`. If `x` is `Infinity`, it returns <math><semantics><mfrac><mi>π</mi><mn>2</mn></mfrac></semantics></math>. If `x` is `-Infinity`, it returns <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math>.\n\n## Description\n\nBecause `atan()` is a static method of `Math`, you always use it as `Math.atan()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/atan2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.atan2()\n\nThe **`Math.atan2()`** function returns the angle in the plane (in radians) between the positive x-axis and the ray from (0, 0) to the point (x, y), for `Math.atan2(y, x)`.\n\n## Syntax\n\n```js\nMath.atan2(y, x)\n```\n\n### Parameters\n\n- `y`\n  - : The y coordinate of the point.\n- `x`\n  - : The x coordinate of the point.\n\n### Return value\n\nThe angle in radians (between -π and π, inclusive) between the positive x-axis and the ray from (0, 0) to the point (x, y).\n\n## Description\n\nThe `Math.atan2()` method measures the counterclockwise angle θ, in radians, between the positive x-axis and the point `(x, y)`. Note that the arguments to this function pass the y-coordinate first and the x-coordinate second.\n\n`Math.atan2()` is passed separate `x` and `y` arguments, while [`Math.atan()`](./atan.mdx) is passed the ratio of those two arguments. `Math.atan2(y, x)` differs from `Math.atan(y / x)` in the following cases:\n\n| `x`                  | `y`         | `Math.atan2(y, x)` | `Math.atan(y / x)` |\n| -------------------- | ----------- | ------------------ | ------------------ |\n| `Infinity`           | `Infinity`  | π / 4              | `NaN`              |\n| `Infinity`           | `-Infinity` | -π / 4             | `NaN`              |\n| `-Infinity`          | `Infinity`  | 3π / 4             | `NaN`              |\n| `-Infinity`          | `-Infinity` | -3π / 4            | `NaN`              |\n| 0                    | 0           | 0                  | `NaN`              |\n| 0                    | -0          | -0                 | `NaN`              |\n| < 0 (including `-0`) | 0           | π                  | 0                  |\n| < 0 (including `-0`) | -0          | -π                 | 0                  |\n| `-Infinity`          | > 0         | π                  | -0                 |\n| -0                   | > 0         | π / 2              | -π / 2             |\n| `-Infinity`          | < 0         | -π                 | 0                  |\n| -0                   | < 0         | -π / 2             | π / 2              |\n\nIn addition, for points in the second and third quadrants (`x < 0`), `Math.atan2()` would output an angle less than <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math> or greater than <math><semantics><mfrac><mi>π</mi><mn>2</mn></mfrac></semantics></math>.\n\nBecause `atan2()` is a static method of `Math`, you always use it as `Math.atan2()`, rather than as a method of a `Math` object you created (`Math` is not a constructor)."
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/atanh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.atanh()\n\nThe **`Math.atanh()`** function returns the inverse hyperbolic tangent of a number. \n\n## Syntax\n\n```js\nMath.atanh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number between -1 and 1, inclusive.\n\n### Return value\n\nThe inverse hyperbolic tangent of `x`. If `x` is 1, returns `Infinity`. If `x` is -1, returns `-Infinity`. If `x` is less than -1 or greater than 1, returns `NaN`.\n\n## Description\n\nBecause `atanh()` is a static method of `Math`, you always use it as `Math.atanh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/cbrt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.cbrt()\n\nThe **`Math.cbrt()`** function returns the cube root of a number.\n\n## Syntax\n\n```js\nMath.cbrt(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe cube root of `x`.\n\n## Description\n\nBecause `cbrt()` is a static method of `Math`, you always use it as `Math.cbrt()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/ceil.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.ceil()\n\nThe **`Math.ceil()`** function always rounds up and returns the smaller integer greater than or equal to a given number.\n\n## Syntax\n\n```js\nMath.ceil(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe smallest integer greater than or equal to `x`. It's the same value as [`-Math.floor(-x)`](./floor.mdx).\n\n## Description\n\nBecause `ceil()` is a static method of `Math`, you always use it as `Math.ceil()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/clz32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.clz32()\n\nThe **`Math.clz32()`** function returns the number of leading zero bits in the 32-bit binary representation of a number.\n\n## Syntax\n\n```js\nMath.clz32(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe number of leading zero bits in the 32-bit binary representation of `x`.\n\n## Description\n\n`clz32` is short for **C**ount**L**eading**Z**eros**32**.\n\nIf `x` is not a number, it will be converted to a number first, then converted to a 32-bit unsigned integer.\n\nIf the converted 32-bit unsigned integer is `0`, `32` is returned, because all bits are `0`. If the most significant bit is `1` (i.e. the number is greater than or equal to 2<sup>31</sup>), `0` is returned.\n\nThis function is particularly useful for systems that compile to JS, like [Emscripten](https://emscripten.org).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/cos.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.cos()\n\nThe **`Math.cos()`** function returns the cosine of a number in radians.\n\n## Syntax\n\n```js\nMath.cos(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number representing an angle in radians.\n\n### Return value\n\nThe cosine of `x`, between -1 and 1, inclusive. If `x` is `Infinity`, `-Infinity`, or `NaN`, returns `NaN`.\n\n## Description\n\nBecause `cos()` is a static method of `Math`, you always use it as `Math.cos()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/cosh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.cosh()\n\nThe **`Math.cosh()`** function returns the hyperbolic cosine of a number. \n\n## Syntax\n\n```js\nMath.cosh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe hyperbolic cosine of `x`.\n\n## Description\n\nBecause `cosh()` is a static method of `Math`, you always use it as `Math.cosh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor)."
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/exp.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.exp()\n\nThe **`Math.exp()`** function returns [E](./E.mdx) raised to the power of a number.\n\n## Syntax\n\n```js\nMath.exp(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nA nonnegative number representing e<sup>x</sup>, where e is [the base of the natural logarithm](./E.mdx).\n\n## Description\n\nBecause `exp()` is a static method of `Math`, you always use it as `Math.exp()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nBeware that `e` to the power of a number very close to 0 will be very close to 1 and suffer from loss of precision. In this case, you may want to use `Math.expm1` instead, and obtain a much higher-precision fractional part of the answer.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/expm1.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.expm1()\n\nThe **`Math.expm1()`** function returns [E](./E.mdx) raised to the power of a number, subtracted by 1.\n\n## Syntax\n\n```js\nMath.expm1(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nA number representing e<sup>x</sup> - 1, where e is [the base of the natural logarithm](./E.mdx).\n\n## Description\n\nFor very small values of _x_, adding 1 can reduce or eliminate precision. The double floats used in JS give you about 15 digits of precision. 1 + 1e-15 \\= 1.000000000000001, but 1 + 1e-16 = 1.000000000000000 and therefore exactly 1.0 in that arithmetic, because digits past 15 are rounded off.\n\nWhen you calculate <math display=\"inline\"><semantics><msup><mi mathvariant=\"normal\">e</mi><mi>x</mi></msup></semantics></math> where x is a number very close to 0, you should get an answer very close to 1 + x, because <math display=\"inline\"><semantics><mrow><munder><mo lspace=\"0em\" rspace=\"0em\">lim</mo><mrow><mi>x</mi><mo stretchy=\"false\">→</mo><mn>0</mn></mrow></munder><mfrac><mrow><msup><mi mathvariant=\"normal\">e</mi><mi>x</mi></msup><mo>−</mo><mn>1</mn></mrow><mi>x</mi></mfrac><mo>=</mo><mn>1</mn></mrow></semantics></math>. If you calculate `Math.exp(1.1111111111e-15) - 1`, you should get an answer close to `1.1111111111e-15`. Instead, due to the highest significant figure in the result of `Math.exp` being the units digit `1`, the final value ends up being `1.1102230246251565e-15`, with only 3 correct digits. If, instead, you calculate `Math.exp1m(1.1111111111e-15)`, you will get a much more accurate answer `1.1111111111000007e-15`, with 11 correct digits of precision.\n\nBecause `expm1()` is a static method of `Math`, you always use it as `Math.expm1()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/floor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.floor()\n\nThe **`Math.floor()`** function always rounds down and returns the largest integer less than or equal to a given number.\n\n## Syntax\n\n```js\nMath.floor(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe largest integer smaller than or equal to `x`. It's the same value as [`-Math.ceil(-x)`](./ceil.mdx).\n\n## Description\n\nBecause `floor()` is a static method of `Math`, you always use it as `Math.floor()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/fround.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.fround()\n\nThe **`Math.fround()`** function returns the nearest [32-bit single precision](https://en.wikipedia.org/wiki/Single-precision_floating-point_format) float representation of a number.\n\n## Syntax\n\n```js\nMath.fround(doubleFloat)\n```\n\n### Parameters\n\n- `doubleFloat`\n  - : A number.\n\n### Return value\n\nThe nearest [32-bit single precision](https://en.wikipedia.org/wiki/Single-precision_floating-point_format) float representation of `x`.\n\n## Description\n\nJavaScript uses 64-bit double floating-point numbers internally, which offer a very high precision. However, sometimes you may be working with 32-bit floating-point numbers, for example if you are reading values from a `Float32Array`. This can create confusion: checking a 64-bit float and a 32-bit float for equality may fail even though the numbers are seemingly identical.\n\nTo solve this, `Math.fround()` can be used to cast the 64-bit float to a 32-bit float. Internally, JavaScript continues to treat the number as a 64-bit float, it just performs a \"round to even\" on the 23rd bit of the mantissa, and sets all following mantissa bits to `0`. If the number is outside the range of a 32-bit float, `Infinity` or `-Infinity` is returned.\n\nBecause `fround()` is a static method of `Math`, you always use it as `Math.fround()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/hypot.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.hypot()\n\nThe **`Math.hypot()`** function returns the square root of the sum of squares of its arguments. \n\n## Syntax\n\n```js\nMath.hypot()\nMath.hypot(value0)\nMath.hypot(value0, value1)\nMath.hypot(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `value1`, …, `valueN`\n  - : Numbers.\n\n### Return value\n\nThe square root of the sum of squares of the given arguments. Returns Infinity if any of the arguments is ±Infinity. Otherwise, if at least one of the arguments is or is converted to NaN, returns NaN. Returns `0` if no arguments are given or all arguments are ±0.\n\n## Description\n\nCalculating the hypotenuse of a right triangle, or the magnitude of a complex number, uses the formula `Math.sqrt(v1*v1 + v2*v2)`, where v1 and v2 are the lengths of the triangle's legs, or the complex number's real and complex components. The corresponding distance in 2 or more dimensions can be calculated by adding more squares under the square root: `Math.sqrt(v1*v1 + v2*v2 + v3*v3 + v4*v4)`.\n\nThis function makes this calculation easier and faster; you call `Math.hypot(v1, v2)`, or `Math.hypot(v1, /* … ,*/, vN)`.\n\n`Math.hypot` also avoids overflow/underflow problems if the magnitude of your numbers is very large. The largest number you can represent in JS is [`Number.MAX_VALUE`](../Number/MAX_VALUE.mdx), which is around 10<sup>308</sup>. If your numbers are larger than about 10<sup>154</sup>, taking the square of them will result in Infinity. For example, `Math.sqrt(1e200*1e200 + 1e200*1e200) = Infinity`. If you use `hypot()` instead, you get a better answer: `Math.hypot(1e200, 1e200) = 1.4142...e+200` . This is also true with very small numbers. `Math.sqrt(1e-200*1e-200 + 1e-200*1e-200) = 0`, but `Math.hypot(1e-200, 1e-200) = 1.4142...e-200`.\n\nWith one argument, `Math.hypot()` is equivalent to [`Math.abs()`](./abs.mdx). [`Math.hypot.length`](../Function/prototype/length.mdx) is 2, which weakly signals that it's designed to handle at least two parameters.\n\nBecause `hypot()` is a static method of `Math`, you always use it as `Math.hypot()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/imul.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.imul()\n\nThe **`Math.imul()`** function returns the result of the C-like 32-bit multiplication of the two parameters.\n\n\n## Syntax\n\n```js\nMath.imul(a, b)\n```\n\n### Parameters\n\n- `a`\n  - : First number.\n- `b`\n  - : Second number.\n\n### Return value\n\nThe result of the C-like 32-bit multiplication of the given arguments.\n\n## Description\n\n`Math.imul()` allows for 32-bit integer multiplication with C-like semantics. This feature is useful for projects like [Emscripten](https://en.wikipedia.org/wiki/Emscripten).\n\nBecause `imul()` is a static method of `Math`, you always use it as `Math.imul()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nIf you use normal JavaScript floating point numbers in `imul()`, you will experience a degrade in performance. This is because of the costly conversion from a floating point to an integer for multiplication, and then converting the multiplied integer back into a floating point.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/log.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log()\n\nThe **`Math.log()`** function returns the natural logarithm (base [E](./E.mdx)) of a number.\n\n## Syntax\n\n```js\nMath.log(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe natural logarithm (base [E](./E.mdx)) of `x`. If `x` is ±0, returns [`-Infinity`](../Number/NEGATIVE_INFINITY.mdx). If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `log()` is a static method of `Math`, you always use it as `Math.log()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nIf you need the natural log of 2 or 10, use the constants `Math.LN2` or `Math.LN10`. If you need a logarithm to base 2 or 10, use `Math.log2()` or `Math.log10()`. If you need a logarithm to other bases, use `Math.log(x) / Math.log(otherBase)` as in the example below; you might want to precalculate `1 / Math.log(otherBase)` since multiplication in `Math.log(x) * constant` is much faster.\n\nBeware that positive numbers very close to 1 can suffer from loss of precision and make its natural logarithm less accurate. In this case, you may want to use `Math.log1p` instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/log10.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log10()\n\nThe **`Math.log10()`** function returns the base 10 logarithm of a number. \n\n## Syntax\n\n```js\nMath.log10(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe base 10 logarithm of `x`. If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `log10()` is a static method of `Math`, you always use it as `Math.log10()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nThis function is the equivalent of `Math.log(x) / Math.log(10)`. For `log10(e)`, use the constant `Math.LOG10E`, which is 1 / `Math.LN10`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/log1p.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log1p()\n\nThe **`Math.log1p()`** function returns the natural logarithm (base [E](./E.mdx)) of `1 + x`, where `x` is the argument.\n\n## Syntax\n\n```js\nMath.log1p(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to -1.\n\n### Return value\n\nThe natural logarithm (base [E](./E.mdx)) of `x + 1`. If `x` is -1, returns [`-Infinity`](../Number/NEGATIVE_INFINITY.mdx). If `x < -1`, returns `NaN`.\n\n## Description\n\nFor very small values of _x_, adding 1 can reduce or eliminate precision. The double floats used in JS give you about 15 digits of precision. 1 + 1e-15 \\= 1.000000000000001, but 1 + 1e-16 = 1.000000000000000 and therefore exactly 1.0 in that arithmetic, because digits past 15 are rounded off.\n\nWhen you calculate log(1 + _x_) where _x_ is a small positive number, you should get an answer very close to _x_, because <math display=\"inline\"><semantics><mrow><munder><mo movablelimits=\"true\" form=\"prefix\">lim</mo><mrow ><mi>x</mi><mo stretchy=\"false\">→</mo><mn>0</mn></mrow></munder><mfrac><mrow><mi>log</mi><mo>⁡</mo><mo stretchy=\"false\">(</mo><mn>1</mn><mo>+</mo><mi>x</mi><mo stretchy=\"false\">)</mo></mrow><mi>x</mi></mfrac><mo>=</mo><mn>1</mn></mrow></semantics></math>. If you calculate `Math.log(1 + 1.1111111111e-15)`, you should get an answer close to `1.1111111111e-15`. Instead, you will end up taking the logarithm of `1.00000000000000111022` (the roundoff is in binary, so sometimes it gets ugly), and get the answer 1.11022…e-15, with only 3 correct digits. If, instead, you calculate `Math.log1p(1.1111111111e-15)`, you will get a much more accurate answer `1.1111111110999995e-15`, with 15 correct digits of precision (actually 16 in this case).\n\nIf the value of `x` is less than -1, the return value is always `NaN`.\n\nBecause `log1p()` is a static method of `Math`, you always use it as `Math.log1p()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/log2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log2()\n\nThe **`Math.log2()`** function returns the base 2 logarithm of a number.\n\n## Syntax\n\n```js\nMath.log2(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe base 2 logarithm of `x`. If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `log2()` is a static method of `Math`, you always use it as `Math.log2()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nThis function is the equivalent of `Math.log(x) / Math.log(2)`. For `log2(e)`, use the constant `Math.LOG2E`, which is 1 / `Math.LN2`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/max.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.max()\n\nThe **`Math.max()`** function returns the largest of the numbers given as input parameters, or `-Infinity` if there are no parameters.\n\n## Syntax\n\n```js\nMath.max()\nMath.max(value0)\nMath.max(value0, value1)\nMath.max(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `value1`, `value2`, … , `valueN`\n  - : Zero or more numbers among which the largest value will be selected and returned.\n\n### Return value\n\nThe largest of the given numbers. Returns `NaN` if any of the parameters is or is converted into `NaN`. Returns `-Infinity` if no parameters are provided.\n\n## Description\n\nBecause `max()` is a static method of `Math`, you always use it as `Math.max()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n[`Math.max.length`](../Function/prototype/length.mdx) is 2, which weakly signals that it's designed to handle at least two parameters.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/min.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.min()\n\nThe **`Math.min()`** function returns the smallest of the numbers given as input parameters, or `Infinity` if there are no parameters.\n\n## Syntax\n\n```js\nMath.min()\nMath.min(value0)\nMath.min(value0, value1)\nMath.min(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `value1`, …, `valueN`\n  - : Zero or more numbers among which the lowest value will be selected and returned.\n\n### Return value\n\nThe smallest of the given numbers. Returns `NaN` if any of the parameters is or is converted into `NaN`. Returns `Infinity` if no parameters are provided.\n\n## Description\n\nBecause `min()` is a static method of `Math`, you always use it as `Math.min()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n[`Math.min.length`](../Function/prototype/length.mdx) is 2, which weakly signals that it's designed to handle at least two parameters.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/pow.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.pow()\n\nThe **`Math.pow()`** method returns the value of a base raised to a power.\n\n## Syntax\n\n```js\nMath.pow(base, exponent)\n```\n\n### Parameters\n\n- `base`\n  - : The base number.\n- `exponent`\n  - : The exponent number.\n\n### Return value\n\nA number representing `base` taken to the power of `exponent`. Returns `NaN` in one of the following cases:\n\n- `exponent` is `NaN`.\n- `base` is `NaN` and `exponent` is not `0`.\n- `base` is ±1 and `exponent` is ±`Infinity`.\n- `base < 0` and `exponent` is not an integer.\n\n## Description\n\n`Math.pow()` is equivalent to the `**` operator, except `Math.pow()` only accepts numbers.\n\n`Math.pow(NaN, 0)` (and the equivalent `NaN ** 0`) is the only case where `NaN` doesn't propagate through mathematical operations — it returns `1` despite the operand being `NaN`. In addition, the behavior where `base` is 1 and `exponent` is non-finite (±Infinity or `NaN`) is different from IEEE 754, which specifies that the result should be 1, whereas JavaScript returns `NaN` to preserve backward compatibility with its original behavior.\n\nBecause `pow()` is a static method of `Math`, use it as `Math.pow()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/random.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.random()\n\nThe **`Math.random()`** function returns a floating-point, pseudo-random number that's greater than or equal to 0 and less than 1, with approximately uniform distribution over that range — which you can then scale to your desired range. The implementation selects the initial seed to the random number generation algorithm; it cannot be chosen or reset by the user.\n\n> **Note:** `Math.random()` _does not_ provide cryptographically secure random numbers. Do not use them for anything related to security. Use the Web Crypto API instead, and more precisely the `crypto.getRandomValues()` method.\n\n## Syntax\n\n```js\nMath.random()\n```\n\n### Return value\n\nA floating-point, pseudo-random number between 0 (inclusive) and 1 (exclusive).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/round.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.round()\n\nThe **`Math.round()`** function returns the value of a number rounded to the nearest integer.\n\n## Syntax\n\n```js\nMath.round(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe value of `x` rounded to the nearest integer.\n\n## Description\n\nIf the fractional portion of the argument is greater than 0.5, the argument is rounded to the integer with the next higher absolute value. If it is less than 0.5, the argument is rounded to the integer with the lower absolute value. If the fractional portion is exactly 0.5, the argument is rounded to the next integer in the direction of +∞.\n\n> **Note:** This differs from many languages' `round()` functions, which often round half-increments _away from zero_, giving a different result in the case of negative numbers with a fractional part of exactly 0.5.\n\n`Math.round(x)` is not exactly the same as [`Math.floor(x + 0.5)`](./floor.mdx). When `x` is -0, or -0.5 ≤ x < 0, `Math.round(x)` returns -0, while `Math.floor(x + 0.5)` returns 0. However, neglecting that difference and potential precision errors, `Math.round(x)` and `Math.floor(x + 0.5)` are generally equivalent.\n\nBecause `round()` is a static method of `Math`, you always use it as `Math.round()`, rather than as a method of a `Math` object you created (`Math` has no constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/sign.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sign()\n\nThe **`Math.sign()`** function returns 1 or -1, indicating the sign of the number passed as argument. If the input is 0 or -0, it will be returned as-is.\n\n## Syntax\n\n```js\nMath.sign(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nA number representing the sign of `x`:\n\n- If `x` is positive, returns `1`.\n- If `x` is negative, returns `-1`.\n- If `x` is positive zero, returns `0`.\n- If `x` is negative zero, returns `-0`.\n- Otherwise, returns `NaN`.\n\n## Description\n\nBecause `sign()` is a static method of `Math`, you always use it as `Math.sign()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/sin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sin()\n\nThe **`Math.sin()`** function returns the sine of a number in radians.\n\n## Syntax\n\n```js\nMath.sin(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number representing an angle in radians.\n\n### Return value\n\nThe sine of `x`, between -1 and 1, inclusive. If `x` is `Infinity`, `-Infinity`, or `NaN`, returns `NaN`.\n\n## Description\n\nBecause `sin()` is a static method of `Math`, you always use it as `Math.sin()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/sinh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sinh()\n\nThe **`Math.sinh()`** function returns the hyperbolic sine of a number. \n\n## Syntax\n\n```js\nMath.sinh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe hyperbolic sine of `x`.\n\n## Description\n\nBecause `sinh()` is a static method of `Math`, you always use it as `Math.sinh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/sqrt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sqrt()\n\nThe **`Math.sqrt()`** function returns the square root of a number.\n\n## Syntax\n\n```js\nMath.sqrt(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe square root of `x`, a nonnegative number. If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `sqrt()` is a static method of `Math`, you always use it as `Math.sqrt()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/tan.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.tan()\n\nThe **`Math.tan()`** function returns the tangent of a number in radians.\n\n\n## Syntax\n\n```js\nMath.tan(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number representing an angle in radians.\n\n### Return value\n\nThe tangent of `x`. If `x` is `Infinity`, `-Infinity`, or `NaN`, returns `NaN`.\n\n> **Note:** Due to floating point precision, it's not possible to obtain the exact value π/2, so the result is always finite if not `NaN`.\n\n## Description\n\nBecause `tan()` is a static method of `Math`, you always use it as `Math.tan()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/tanh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.tanh()\n\nThe **`Math.tanh()`** function returns the hyperbolic tangent of a number. \n\n## Syntax\n\n```js\nMath.tanh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe hyperbolic tangent of `x`.\n\n## Description\n\nBecause `tanh()` is a static method of `Math`, you always use it as `Math.tanh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Math/trunc.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.trunc()\n\nThe **`Math.trunc()`** function returns the integer part of a number by removing any fractional digits.\n\n## Syntax\n\n```js\nMath.trunc(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe integer part of `x`.\n\n## Description\n\nUnlike the other three `Math` methods: `Math.floor()`, `Math.ceil()` and `Math.round()`, the way `Math.trunc()` works is very simple. It _truncates_ (cuts off) the dot and the digits to the right of it, no matter whether the argument is a positive or negative number.\n\nBecause `trunc()` is a static method of `Math`, you always use it as `Math.trunc()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/NaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# NaN\n\nThe global **`NaN`** property is a value representing Not-A-Number.\n\n## Value\n\nThe same number value as [`Number.NaN`](./Number/NaN.mdx).\n\n## Description\n\n`NaN` is a property of the _global object_. In other words, it is a variable in global scope.\n\nIn modern browsers, `NaN` is a non-configurable, non-writable property. Even when this is not the case, avoid overriding it.\n\nThere are five different types of operations that return `NaN`:\n\n- Failed number conversion (e.g. explicit ones like `parseInt(\"blabla\")`, `Number(undefined)`, or implicit ones like `Math.abs(undefined)`)\n- Math operation where the result is not a real number (e.g. `Math.sqrt(-1)`)\n- Indeterminate form (e.g. `0 * Infinity`, `1 ** Infinity`, `Infinity / Infinity`, `Infinity - Infinity`)\n- A method or expression whose operand is or gets coerced to `NaN` (e.g. `7 ** NaN`, `7 * \"blabla\"`) — this means `NaN` is contagious\n- Other cases where an invalid value is to be represented as a number (e.g. an invalid `new Date(\"blabla\").getTime()`, `\"\".charCodeAt(1)`)\n\n`NaN` and its behaviors are not invented by JavaScript. Its semantics in floating point arithmetic (including that `NaN !== NaN`) are specified by [IEEE 754](https://en.wikipedia.org/wiki/Double_precision_floating-point_format). `NaN`'s behaviors include:\n\n- If `NaN` is involved in a mathematical operation (but not [bitwise operations](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators#bitwise_shift_operators)), the result is usually also `NaN`. (See see [silently escaping NaN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN#silently_escaping_nan) for a counter-example.)\n- When `NaN` is one of the operands of any relational comparison (`>`, `<`, `>=`, `<=`), the result is always `false`.\n- `NaN` compares unequal (via [`==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Equality), [`!=`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Inequality), [`===`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality), and [`!==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_inequality)) to any other value — including to another `NaN` value.\n\n`NaN` is also one of the [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) values in JavaScript.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Number/MAX_SAFE_INTEGER.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MAX_SAFE_INTEGER\n\nThe **`Number.MAX_SAFE_INTEGER`** constant represents the maximum safe integer in JavaScript (2<sup>53</sup> – 1).\n\nFor larger integers, consider using `BigInt`.\n\n## Value\n\n`9007199254740991` (9,007,199,254,740,991, or \\~9 quadrillion).\n\n## Description\n\n[Double precision floating point format](https://en.wikipedia.org/wiki/Double_precision_floating-point_format) only has 52 bits to represent the [mantissa](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_encoding), so it can only safely represent integers between -(2<sup>53</sup> – 1) and 2<sup>53</sup> – 1. \"Safe\" in this context refers to the ability to represent integers exactly and to compare them correctly. For example, `Number.MAX_SAFE_INTEGER + 1 === Number.MAX_SAFE_INTEGER + 2` will evaluate to true, which is mathematically incorrect. See `Number.isSafeInteger()` for more information.\n\nBecause `MAX_SAFE_INTEGER` is a static property of `Number`, you always use it as `Number.MAX_SAFE_INTEGER`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Number/MAX_VALUE.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MAX_VALUE\n\nThe **`Number.MAX_VALUE`** property represents the maximum numeric value representable in JavaScript.\n\n## Value\n\n2<sup>1024</sup> - 1, or approximately `1.7976931348623157E+308`.\n\n## Description\n\nValues larger than `MAX_VALUE` are represented as [`Infinity`](../../globals/Infinity.mdx) and will lose their actual value.\n\nBecause `MAX_VALUE` is a static property of `Number`, you always use it as `Number.MAX_VALUE`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Number/MIN_SAFE_INTEGER.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MIN_SAFE_INTEGER\n\nThe **`Number.MIN_SAFE_INTEGER`** constant represents the minimum safe integer in JavaScript, or -(2<sup>53</sup> - 1).\n\nTo represent integers smaller than this, consider using `BigInt`.\n\n## Value\n\n`-9007199254740991` (-9,007,199,254,740,991, or about -9 quadrillion).\n\n## Description\n\n[Double precision floating point format](https://en.wikipedia.org/wiki/Double_precision_floating-point_format) only has 52 bits to represent the [mantissa](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_encoding), so it can only safely represent integers between -(2<sup>53</sup> – 1) and 2<sup>53</sup> – 1. Safe in this context refers to the ability to represent integers exactly and to correctly compare them. For example, `Number.MIN_SAFE_INTEGER - 1 === Number.MIN_SAFE_INTEGER - 2` will evaluate to true, which is mathematically incorrect. See `Number.isSafeInteger()` for more information.\n\nBecause `MIN_SAFE_INTEGER` is a static property of `Number`, you always use it as `Number.MIN_SAFE_INTEGER`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Number/MIN_VALUE.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MIN_VALUE\n\nThe **`Number.MIN_VALUE`** property represents the smallest positive numeric value representable in JavaScript.\n\n## Value\n\n2<sup>-1074</sup>, or `5E-324`.\n\n## Description\n\n`Number.MIN_VALUE` is the smallest positive number (not the most negative number) that can be represented within float precision — in other words, the number closest to 0. The ECMAScript spec doesn't define a precise value that implementations are required to support — instead the spec says, _\"must be the smallest non-zero positive value that can actually be represented by the implementation\"_. This is because small IEEE-754 floating point numbers are [denormalized](https://en.wikipedia.org/wiki/Subnormal_number), but implementations are not required to support this representation, in which case `Number.MIN_VALUE` may be larger.\n\nIn practice, its precise value in mainstream engines like V8 (used by Chrome, Edge, Node.js), SpiderMonkey (used by Firefox), and JavaScriptCore (used by Safari) is 2<sup>-1074</sup>, or `5E-324`.\n\nBecause `MIN_VALUE` is a static property of `Number`, you always use it as `Number.MIN_VALUE`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Number/NEGATIVE_INFINITY.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.NEGATIVE_INFINITY\n\nThe **`Number.NEGATIVE_INFINITY`** property represents the negative Infinity value.\n\n## Value\n\nThe same as the negative value of the global [`Infinity`](../../globals/Infinity.mdx) property.\n\n## Description\n\nThe `Number.NEGATIVE_INFINITY` value behaves slightly differently than mathematical infinity:\n\n- Any positive value, including `Number.POSITIVE_INFINITY`, multiplied by `Number.NEGATIVE_INFINITY` is `Number.NEGATIVE_INFINITY`.\n- Any negative value, including `Number.NEGATIVE_INFINITY`, multiplied by `Number.NEGATIVE_INFINITY` is `Number.POSITIVE_INFINITY`.\n- Any positive value divided by `Number.NEGATIVE_INFINITY` is [negative zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754)).\n- Any negative value divided by `Number.NEGATIVE_INFINITY` is [positive zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754)).\n- Zero multiplied by `Number.NEGATIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- [`NaN`](../../globals/NaN.mdx) multiplied by `Number.NEGATIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- `Number.NEGATIVE_INFINITY`, divided by any negative value except `Number.NEGATIVE_INFINITY`, is `Number.POSITIVE_INFINITY`.\n- `Number.NEGATIVE_INFINITY`, divided by any positive value except `Number.POSITIVE_INFINITY`, is `Number.NEGATIVE_INFINITY`.\n- `Number.NEGATIVE_INFINITY`, divided by either `Number.NEGATIVE_INFINITY` or `Number.POSITIVE_INFINITY`, is [`NaN`](../../globals/NaN.mdx).\n- `x > Number.NEGATIVE_INFINITY` is true for any number _x_ that isn't `Number.NEGATIVE_INFINITY`.\n\nYou might use the `Number.NEGATIVE_INFINITY` property to indicate an error condition that returns a finite number in case of success. Note, however, that [`NaN`](../../globals/NaN.mdx) would be more appropriate in such a case.\n\nBecause `Number.NEGATIVE_INFINITY` is a static property of `Number`, you always use it as `Number.NEGATIVE_INFINITY`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Number/NaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.NaN\n\nThe **`Number.NaN`** property represents Not-A-Number, which is equivalent to [description for the global property](../../globals/NaN.mdx). For more information about the behaviors of `NaN`, see the [`NaN`](../../globals/NaN.mdx).\n\n## Value\n\nThe number value [`NaN`](../../globals/NaN.mdx).\n\n## Description\n\nBecause `NaN` is a static property of `Number`, you always use it as `Number.NaN`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Number/Number.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number() constructor\n\nThe **`Number()` constructor** creates a `Number` object. When called instead as a function, it performs type conversion to a primitive number, which is usually more useful.\n\n## Syntax\n\n```js\nnew Number(value)\nNumber(value)\n```\n\n> **Note:** `Number()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\n- `value`\n  - : The numeric value of the object being created.\n\n### Return value\n\nWhen `Number` is called as a constructor (with `new`), it creates a `Number` object, which is **not** a primitive.\n\nWhen `Number` is called as a function, it [coerces the parameter to a number primitive](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_coercion). [BigInts](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/BigInt) are converted to numbers. If the value can't be converted, it returns [`NaN`](../../globals/NaN.mdx).\n\n> **Warning:** You should rarely find yourself using `Number` as a constructor.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Number/POSITIVE_INFINITY.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.POSITIVE_INFINITY\n\nThe **`Number.POSITIVE_INFINITY`** property represents the positive Infinity value.\n\n## Value\n\nThe same as the value of the global [`Infinity`](../../globals/Infinity.mdx) property.\n\n## Description\n\nThe `Number.POSITIVE_INFINITY` value behaves slightly differently than mathematical infinity:\n\n- Any positive value, including `Number.POSITIVE_INFINITY`, multiplied by `Number.POSITIVE_INFINITY` is `Number.POSITIVE_INFINITY`.\n- Any negative value, including `Number.NEGATIVE_INFINITY`, multiplied by `Number.POSITIVE_INFINITY` is `Number.NEGATIVE_INFINITY`.\n- Any positive number divided by `Number.POSITIVE_INFINITY` is [positive zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754)).\n- Any negative number divided by `Number.POSITIVE_INFINITY` is [negative zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754).\n- Zero multiplied by `Number.POSITIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- `NaN` multiplied by `Number.POSITIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- `Number.POSITIVE_INFINITY`, divided by any negative value except `Number.NEGATIVE_INFINITY`, is `Number.NEGATIVE_INFINITY`.\n- `Number.POSITIVE_INFINITY`, divided by any positive value except `Number.POSITIVE_INFINITY`, is `Number.POSITIVE_INFINITY`.\n- `Number.POSITIVE_INFINITY`, divided by either `Number.NEGATIVE_INFINITY` or `Number.POSITIVE_INFINITY`, is [`NaN`](../../globals/NaN.mdx).\n- `Number.POSITIVE_INFINITY > x` is true for any number _x_ that isn't `Number.POSITIVE_INFINITY`.\n\nYou might use the `Number.POSITIVE_INFINITY` property to indicate an error condition that returns a finite number in case of success. Note, however, that [`NaN`](../../globals/NaN.mdx) would be more appropriate in such a case.\n\nBecause `Number.POSITIVE_INFINITY` is a static property of `Number`, you always use it as `Number.POSITIVE_INFINITY`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Number/epsilon.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.EPSILON\n\nThe **`Number.EPSILON`** property represents the difference between 1 and the smallest floating point number greater than 1.\n\n## Value\n\n2<sup>-52</sup>, or approximately `2.2204460492503130808472633361816E-16`.\n\n## Description\n\n`Number.EPSILON` is the difference between 1 and the next greater number representable in the Number format, because [double precision floating point format](https://en.wikipedia.org/wiki/Double_precision_floating-point_format) only has 52 bits to represent the [mantissa](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_encoding), and the lowest bit has a significance of 2<sup>-52</sup>.\n\nNote that the absolute accuracy of floating numbers decreases as the number gets larger, because the exponent grows while the mantissa's accuracy stays the same. `Number.MIN_VALUE` is the smallest representable positive number, which is much smaller than `Number.EPSILON`.\n\nBecause `EPSILON` is a static property of `Number`, you always use it as `Number.EPSILON`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Number/isFinite.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isFinite()\n\nThe **`Number.isFinite()`** method determines whether the passed value is a finite number — that is, it checks that a given value is a number, and the number is neither positive [`Infinity`](../../globals/Infinity.mdx), negative `Infinity`, nor [`NaN`](../../globals/NaN.mdx).\n\n## Syntax\n\n```js\nNumber.isFinite(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested for finiteness.\n\n### Return value\n\nThe boolean value `true` if the given value is a finite number. Otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Number/isInteger.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isInteger()\n\nThe **`Number.isInteger()`** method determines whether the passed value is an integer.\n\n## Syntax\n\n```js\nNumber.isInteger(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested for being an integer.\n\n### Return value\n\nThe boolean value `true` if the given value is an integer. Otherwise `false`.\n\n## Description\n\nIf the target value is an integer, return `true`, otherwise return `false`. If the value is [`NaN`](../../globals/NaN.mdx) or [`Infinity`](../../globals/Infinity.mdx), return `false`. The method will also return `true` for floating point numbers that can be represented as integer. It will always return `false` if the value is not a number.\n\nNote that some number literals, while looking like non-integers, actually represent integers — due to the precision limit of ECMAScript floating-point number encoding (IEEE-754). For example, `5.0000000000000001` only differs from `5` by `1e-16`, which is too small to be represented. (For reference, [`Number.EPSILON`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/EPSILON) stores the distance between 1 and the next representable floating-point number greater than 1, and that is about `2.22e-16`.) Therefore, `5.0000000000000001` will be represented with the same encoding as `5`, thus making `Number.isInteger(5.0000000000000001)` return `true`.\n\nIn a similar sense, numbers around the magnitude of [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER) will suffer from loss of precision and make `Number.isInteger` return `true` even when it's not an integer. (The actual threshold varies based on how many bits are needed to represent the decimal — for example, `Number.isInteger(4500000000000000.1)` is `true`, but `Number.isInteger(4500000000000000.5)` is `false`.)\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Number/isNaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isNaN()\n\nThe **`Number.isNaN()`** method determines whether the passed value is the number value [`NaN`](../../globals/NaN.mdx), and returns `false` if the input is not of the Number type. It is a more robust version of the original, global `isNaN()` function.\n\n## Syntax\n\n```js\nNumber.isNaN(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested for [`NaN`](../../globals/NaN.mdx).\n\n### Return value\n\nThe boolean value `true` if the given value is a number with value [`NaN`](../../globals/NaN.mdx). Otherwise, `false`.\n\n## Description\n\nThe function `Number.isNaN()` provides a convenient way to check for equality with `NaN`. Note that you cannot test for equality with `NaN` using either the [`==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Equality) or [`===`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) operators, because unlike all other value comparisons in JavaScript, these evaluate to `false` whenever one operand is [`NaN`](../../globals/NaN.mdx), even if the other operand is also [`NaN`](../../globals/NaN.mdx).\n\nSince `x !== x` is only true for `NaN` among all possible JavaScript values, `Number.isNaN(x)` can also be replaced with a test for `x !== x`, despite the latter being less readable.\n\nAs opposed to the global `isNaN()` function, the `Number.isNaN()` method doesn't force-convert the parameter to a number. This makes it safe to pass values that would normally convert to [`NaN`](../../globals/NaN.mdx) but aren't actually the same value as [`NaN`](../../globals/NaN.mdx). This also means that only values of the Number type that are also [`NaN`](../../globals/NaN.mdx) return `true`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Number/isSafeInteger.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isSafeInteger()\n\nThe **`Number.isSafeInteger()`** method determines whether the provided value is a number that is a _safe integer_.\n\n## Syntax\n\n```js\nNumber.isSafeInteger(testValue)\n```\n\n### Parameters\n\n- `testValue`\n  - : The value to be tested for being a safe integer.\n\n### Return value\n\nThe boolean value `true` if the given value is a number that is a safe integer. Otherwise `false`.\n\n## Description\n\nThe safe integers consist of all integers from -(2<sup>53</sup> - 1) to 2<sup>53</sup> - 1, inclusive (±9,007,199,254,740,991). A safe integer is an integer that:\n\n- can be exactly represented as an IEEE-754 double precision number, and\n- whose IEEE-754 representation cannot be the result of rounding any other integer to fit the IEEE-754 representation.\n\nFor example, 2<sup>53</sup> - 1 is a safe integer: it can be exactly represented, and no other integer rounds to it under any IEEE-754 rounding mode. In contrast, 2<sup>53</sup> is _not_ a safe integer: it can be exactly represented in IEEE-754, but the integer 2<sup>53</sup> + 1 can't be directly represented in IEEE-754 but instead rounds to 2<sup>53</sup> under round-to-nearest and round-to-zero rounding.\n\nHandling values larger or smaller than \\~9 quadrillion with full precision requires using an [arbitrary precision arithmetic library](https://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic). See [What Every Programmer Needs to Know about Floating Point Arithmetic](https://floating-point-gui.de/) for more information on floating point representations of numbers.\n\nFor larger integers, consider using the `BigInt` type.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Number/parseFloat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.parseFloat()\n\nThe **`Number.parseFloat()`** method parses an argument and returns a floating point number. If a number cannot be parsed from the argument, it returns [`NaN`](../../globals/NaN.mdx).\n\n## Syntax\n\n```js\nNumber.parseFloat(string)\n```\n\n### Parameters\n\n- `string`\n  - : The value to parse, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). Leading whitespace in this argument is ignored.\n\n### Return value\n\nA floating point number parsed from the given `string`.\n\nOr [`NaN`](../../globals/NaN.mdx) when the first non-whitespace character cannot be converted to a number.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Number/parseInt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.parseInt()\n\nThe **`Number.parseInt()`** method parses a string argument and\nreturns an integer of the specified radix or base.\n\n## Syntax\n\n```js\nNumber.parseInt(string)\nNumber.parseInt(string, radix)\n```\n\n### Parameters\n\n- `string`\n  - : The value to parse, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). Leading whitespace in this argument is ignored.\n- `radix` _**optional**_\n\n  - : An integer between `2` and `36` that represents the\n    _radix_ (the base in mathematical numeral systems) of the\n    `string`.\n\n    If `radix` is undefined or `0`, it is assumed to be `10` except when the number begins with the code unit pairs `0x` or `0X`, in which case a radix of `16` is assumed.\n\n### Return value\n\nAn integer parsed from the given `string`.\n\nIf the `radix` is smaller than `2` or bigger than\n`36`, or the first non-whitespace character cannot be converted to a number,\n[`NaN`](../../globals/NaN.mdx) is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Number/prototype/toExponential.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toExponential()\n\nThe **`toExponential()`** method returns a string representing\nthe `Number` object in exponential notation.\n\n## Syntax\n\n```js\ntoExponential()\ntoExponential(fractionDigits)\n```\n\n### Parameters\n\n- `fractionDigits` _**optional**_\n  - : Optional. An integer specifying the number of digits after the decimal point.\n    Defaults to as many digits as necessary to specify the number.\n\n### Return value\n\nA string representing the given `Number` object in exponential notation\nwith one digit before the decimal point, rounded to\n`fractionDigits` digits after the decimal point.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : If `fractionDigits` is too small or too large. Values between\n    `0` and `100`, inclusive, will not cause a\n    [`RangeError`](../../../globals/RangeError/RangeError.mdx).\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If this method is invoked on an object that is not a `Number`.\n\n## Description\n\nIf the `fractionDigits` argument is omitted, the number of digits\nafter the decimal point defaults to the number of digits necessary to represent the\nvalue uniquely.\n\nIf you use the `toExponential()` method for a numeric literal and the\nnumeric literal has no exponent and no decimal point, leave whitespace(s) before the dot\nthat precedes the method call to prevent the dot from being interpreted as a decimal\npoint.\n\nIf a number has more digits than requested by the\n`fractionDigits` parameter, the number is rounded to the nearest\nnumber represented by `fractionDigits` digits. See the discussion\nof rounding in the description of the [`Number.prototype.toFixed()`](../../../globals/Number/prototype/toFixed.mdx) method, which also applies to `toExponential()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Number/prototype/toFixed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toFixed()\n\nThe **`toFixed()`** method formats a number using fixed-point notation.\n\n## Syntax\n\n```js\ntoFixed()\ntoFixed(digits)\n```\n\n### Parameters\n\n- `digits` _**optional**_\n  - : The number of digits to appear after the decimal point; should be a value between `0` and `100`, inclusive. If this argument is omitted, it is treated as `0`.\n\n### Return value\n\nA string representing the given number using fixed-point notation.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : If `digits` is smaller than `0`, larger than `100`, or is `NaN`.\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If this method is invoked on an object that is not a `Number`.\n\n## Description\n\nThe `toFixed()` method returns a string representation of `numObj` that does not use exponential notation and has exactly `digits` digits after the decimal place. The number is rounded if necessary, and the fractional part is padded with zeros if necessary so that it has the specified length.\n\nIf the absolute value of `numObj` is greater or equal to 10<sup>21</sup>, this method uses the same algorithm as [`Number.prototype.toString()`](../../../globals/Number/prototype/toString.mdx) and returns a string in exponential notation. `toFixed()` returns `\"Infinity\"`, `\"NaN\"`, or `\"-Infinity\"` if the value of `numObj` is non-finite.\n\nThe output of `toFixed()` may be more precise than [`toString()`](../../../globals/Number/prototype/toString.mdx) for some values, because `toString()` only prints enough significant digits to distinguish the number from adjacent number values. For example:\n\n```js\n(1000000000000000128).toString(); // '1000000000000000100'\n(1000000000000000128).toFixed(0); // '1000000000000000128'\n```\n\nHowever, choosing a `digits` precision that's too high can return unexpected results, because decimal fractional numbers cannot be represented precisely in floating point. For example:\n\n```js\n0.3.toFixed(50); // '0.29999999999999998889776975374843459576368331909180'\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Number/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string with a language-sensitive representation of this number. In implementations with [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) support, this method simply calls `Intl.NumberFormat`.\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` parameters customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat), these parameters correspond exactly to the [`Intl.NumberFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) constructor's parameters. Implementations without `Intl.NumberFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#locales) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored.\n\nSee the [`Intl.NumberFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string with a language-sensitive representation of the given number.\n\nIn implementations with `Intl.NumberFormat`, this is equivalent to `new Intl.NumberFormat(locales, options).format(number)`.\n\n## Performance\n\nWhen formatting large numbers of numbers, it is better to create a\n`Intl.NumberFormat` object and use the function provided by its\n`format` property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Number/prototype/toPrecision.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toPrecision()\n\nThe **`toPrecision()`** method returns a string representing\nthe `Number` object to the specified precision.\n\n## Syntax\n\n```js\ntoPrecision()\ntoPrecision(precision)\n```\n\n### Parameters\n\n- `precision` _**optional**_\n  - : An integer specifying the number of significant digits.\n\n### Return value\n\nA string representing a `Number` object in fixed-point or exponential\nnotation rounded to `precision` significant digits. See the discussion of\nrounding in the description of the [`Number.prototype.toFixed()`](../../../globals/Number/prototype/toFixed.mdx) method,\nwhich also applies to `toPrecision()`.\n\nIf the `precision` argument is omitted, behaves as\n[`Number.prototype.toString()`](../../../globals/Number/prototype/toString.mdx). If the `precision` argument is a\nnon-integer value, it is rounded to the nearest integer.\n\n### Exceptions\n\n- `RangeError`\n  - : If `precision` is not between `1` and `100`\n    (inclusive), a [`RangeError`](../../../globals/RangeError/RangeError.mdx) is thrown. Implementations are allowed to\n    support larger and smaller values as well. ECMA-262 only requires a precision of up to\n    21 significant digits.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Number/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified number value.\n\n## Syntax\n\n```js\ntoString()\ntoString(radix)\n```\n\n### Parameters\n\n- `radix` _**optional**_\n  - : An integer in the range `2` through `36` specifying the base to use for representing the number value. Defaults to 10.\n\n### Return value\n\nA string representing the specified number value.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `radix` is less than 2 or greater than 36.\n\n## Description\n\nThe `Number` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For `Number` values, the `toString` method returns a string representation of the value in the specified radix.\n\nFor radixes above 10, the letters of the alphabet indicate digits greater than 9. For example, for hexadecimal numbers (base 16) `a` through `f` are used.\n\nIf the specified number value is negative, the sign is preserved. This is the case even if the radix is 2; the string returned is the positive binary representation of the number value preceded by a `-` sign, **not** the two's complement of the number value.\n\nBoth `0` and `-0` have `\"0\"` as their string representation. [`Infinity`](../../../globals/Infinity.mdx) returns `\"Infinity\"` and [`NaN`](../../../globals/NaN.mdx) returns `\"NaN\"`.\n\nIf the number is not a whole number, the decimal point `.` is used to separate the decimal places. [Scientific notation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#exponential) is used if the radix is 10 and the number's magnitude (ignoring sign) is greater than or equal to 10<sup>21</sup> or less than 10<sup>-6</sup>. In this case, the returned string always explicitly specifies the sign of the exponent.\n\n```js\nconsole.log((10 ** 21.5).toString()); // \"3.1622776601683794e+21\"\nconsole.log((10 ** 21.5).toString(8)); // \"526665530627250154000000\"\n```\n\nThe `toString()` method requires its `this` value to be a `Number` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to number values.\n\nBecause `Number` doesn't have a [`[Symbol.toPrimitive]()`](../../../globals/Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `Number` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, Number _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — rather, they are directly converted using the same algorithm as the initial `toString()` implementation.\n\n```js\nNumber.prototype.toString = () => \"Overridden\";\nconsole.log(`${1}`); // \"1\"\nconsole.log(`${new Number(1)}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Number/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.valueOf()\n\nThe **`valueOf()`** method returns the wrapped primitive value\nof a `Number` object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nA number representing the primitive value of the specified `Number` object.\n\n## Description\n\nThis method is usually called internally by JavaScript and not explicitly in web code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Object/Object.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object()\n\nThe **`Object` constructor** turns the input into an object. Its behavior depends on the input's type.\n\n- If the value is [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../globals/undefined.mdx), it creates and returns an empty object.\n- Otherwise, it returns an object of a Type that corresponds to the given value.\n- If the value is an object already, it returns the value.\n\n## Syntax\n\n```js\nnew Object(value)\nObject(value)\n```\n\n> **Note:** `Object()` can be called with or without `new`. Both create a new object.\n\n### Parameters\n\n- `value`\n  - : Any value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Object/assign.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.assign()\n\nThe **`Object.assign()`** method\ncopies all [enumerable](../../globals/Object/prototype/propertyIsEnumerable.mdx)\n[own properties](../../globals/Object/hasOwn.mdx) from one or more\n_source objects_ to a _target object_. It returns the modified target\nobject.\n\n## Syntax\n\n```js\nObject.assign(target, ...sources)\n```\n\n### Parameters\n\n- `target`\n  - : The target object — what to apply the sources' properties to, which is returned\n    after it is modified.\n- `sources`\n  - : The source object(s) — objects containing the properties you want to apply.\n\n### Return value\n\nThe target object.\n\n## Description\n\nProperties in the target object are overwritten by properties in the sources if they\nhave the same \"key\". Later sources' properties overwrite earlier ones.\n\nThe `Object.assign()` method only copies _enumerable_ and\n_own_ properties from a source object to a target object. It uses\n`[[Get]]` on the source and `[[Set]]` on the target, so it will\ninvoke [getters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/get) and [setters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/set). Therefore it\n_assigns_ properties, versus copying or defining new properties. This may make it\nunsuitable for merging new properties into a prototype if the merge sources contain\ngetters.\n\nFor copying property definitions (including their enumerability) into prototypes, use\n[`Object.getOwnPropertyDescriptor()`](../../globals/Object/getOwnPropertyDescriptor.mdx) and\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx) instead.\n\nBoth `String` and `Symbol` properties are copied.\n\nIn case of an error, for example if a property is non-writable, a\n[`TypeError`](../../globals/TypeError/TypeError.mdx) is raised, and the `target` object is\nchanged if any properties are added before the error is raised.\n\n> **Note:** `Object.assign()` does not throw on\n> [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../globals/undefined.mdx) sources.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Object/create.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.create()\n\nThe **`Object.create()`** method creates a new object, using an existing object as the prototype of the newly created object.\n\n## Syntax\n\n```js\nObject.create(proto)\nObject.create(proto, propertiesObject)\n```\n\n### Parameters\n\n- `proto`\n  - : The object which should be the prototype of the newly-created object.\n- `propertiesObject` _**optional**_\n  - : If specified and not [`undefined`](../../globals/undefined.mdx), an object whose [enumerable own properties](https://developer.mozilla.org/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) specify property descriptors to be added to the newly-created object, with the corresponding property names. These properties correspond to the second argument of [`Object.defineProperties()`](../../globals/Object/defineProperties.mdx).\n\n### Return value\n\nA new object with the specified prototype object and properties.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if `proto` is neither [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) nor an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Object/defineProperties.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.defineProperties()\n\nThe **`Object.defineProperties()`** method defines new or\nmodifies existing properties directly on an object, returning the object.\n\n## Syntax\n\n```js\nObject.defineProperties(obj, props)\n```\n\n### Parameters\n\n- `obj`\n  - : The object on which to define or modify properties.\n- `props`\n\n  - : An object whose keys represent the names of properties to be defined or modified and\n    whose values are objects describing those properties. Each value in `props`\n    must be either a data descriptor or an accessor descriptor; it cannot be both (see\n    [`Object.defineProperty()`](../../globals/Object/defineProperty.mdx) for more details).\n\n    Data descriptors and accessor descriptors may optionally contain the following keys:\n\n    - `configurable`\n      - : `true` if and only if the type of this property descriptor may be\n        changed and if the property may be deleted from the corresponding object.\n        **Defaults to `false`.**\n    - `enumerable`\n      - : `true` if and only if this property shows up during enumeration of\n        the properties on the corresponding object.\n        **Defaults to `false`.**\n\n    A data descriptor also has the following optional keys:\n\n    - `value`\n      - : The value associated with the property. Can be any valid JavaScript value\n        (number, object, function, etc.).\n        **Defaults to [`undefined`](../../globals/undefined.mdx).**\n    - `writable`\n      - : `true` if and only if the value associated with the property may be\n        changed with an assignment operator.\n        **Defaults to `false`.**\n\n    An accessor descriptor also has the following optional keys:\n\n    - `get`\n      - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx)\n        if there is no getter. The function's return value will be used as the value of\n        the property.\n        **Defaults to [`undefined`](../../globals/undefined.mdx).**\n    - `set`\n      - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx)\n        if there is no setter. The function will receive as its only argument the new\n        value being assigned to the property.\n        **Defaults to [`undefined`](../../globals/undefined.mdx).**\n\n    If a descriptor has neither of `value`, `writable`,\n    `get` and `set` keys, it is treated as a data descriptor. If a\n    descriptor has both `value` or `writable` and `get`\n    or `set` keys, an exception is thrown.\n\n### Return value\n\nThe object that was passed to the function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Object/defineProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.defineProperty()\n\nThe static method **`Object.defineProperty()`** defines a new\nproperty directly on an object, or modifies an existing property on an object, and\nreturns the object.\n\n## Syntax\n\n```js\nObject.defineProperty(obj, prop, descriptor)\n```\n\n### Parameters\n\n- `obj`\n  - : The object on which to define the property.\n- `prop`\n  - : The name or `Symbol` of the property to be defined or modified.\n- `descriptor`\n  - : The descriptor for the property being defined or modified.\n\n### Return value\n\nThe object that was passed to the function.\n\n## Description\n\nThis method allows a precise addition to or modification of a property on an object.\nNormal property addition through assignment creates properties which show up during\nproperty enumeration (`for...in` loop or\n[`Object.keys`](../../globals/Object/keys.mdx) method), whose values may be changed, and which may be\ndeleted. This method allows these extra details\nto be changed from their defaults. By default, properties added using\n`Object.defineProperty()` are not writable, not enumerable, and not configurable.\n\nProperty descriptors present in objects come in two main flavors: data descriptors and\naccessor descriptors. A **data descriptor** is a property that has a\nvalue, which may or may not be writable. An **accessor descriptor** is a\nproperty described by a getter-setter pair of functions. A descriptor must be one of\nthese two flavors; it cannot be both.\n\nBoth data and accessor descriptors are objects. They share the following optional keys\n(please note: the **defaults** mentioned here are in the case of defining\nproperties using `Object.defineProperty()`):\n\n- `configurable`\n\n  - : when this is set to `false`,\n\n    - the type of this property cannot be changed between data property and accessor property, and\n    - the property may not be deleted, and\n    - other attributes of its descriptor cannot be changed (however, if it's a data descriptor with `writable: true`, the `value` can be changed, and `writable` can be changed to `false`).\n\n    **Defaults to `false`.**\n\n- `enumerable`\n  - : `true` if and only if this property shows up during enumeration of the\n    properties on the corresponding object.\n    **Defaults to `false`.**\n\nA **data descriptor** also has the following optional keys:\n\n- `value`\n  - : The value associated with the property. Can be any valid JavaScript value (number,\n    object, function, etc.).\n    **Defaults to [`undefined`](../../globals/undefined.mdx).**\n- `writable`\n  - : `true` if the value associated with the property may be changed with an\n    assignment operator.\n    **Defaults to `false`.**\n\nAn **accessor descriptor** also has the following optional keys:\n\n- `get`\n  - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no getter. When the property is accessed, this function is called without\n    arguments and with `this` set to the object through which the property is\n    accessed (this may not be the object on which the property is defined due to\n    inheritance). The return value will be used as the value of the property.\n    **Defaults to [`undefined`](../../globals/undefined.mdx).**\n- `set`\n  - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no setter. When the property is assigned, this function is called with one\n    argument (the value being assigned to the property) and with `this` set to\n    the object through which the property is assigned.\n    **Defaults to [`undefined`](../../globals/undefined.mdx).**\n\nIf a descriptor has neither of `value`, `writable`,\n`get` and `set` keys, it is treated as a data descriptor. If a\ndescriptor has both \\[`value` or `writable`] and \\[`get` or `set`] keys, an exception is thrown.\n\nBear in mind that these attributes are not necessarily the descriptor's own properties.\nInherited properties will be considered as well. In order to ensure these defaults are\npreserved, you might freeze existing objects in the descriptor object's prototype chain upfront, specify all\noptions explicitly, or point to [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) with [`Object.create(null)`](../../globals/Object/create.mdx).\n\n```js\nconst obj = {};\n// 1. Using a null prototype: no inherited properties\nconst descriptor = Object.create(null);\ndescriptor.value = 'static';\n\n// not enumerable, not configurable, not writable as defaults\nObject.defineProperty(obj, 'key', descriptor);\n\n// 2. Being explicit by using a throw-away object literal with all attributes present\nObject.defineProperty(obj, 'key2', {\n  enumerable: false,\n  configurable: false,\n  writable: false,\n  value: 'static'\n});\n\n// 3. Recycling same object\nfunction withValue(value) {\n  const d = withValue.d || (\n    withValue.d = {\n      enumerable: false,\n      writable: false,\n      configurable: false,\n      value,\n    }\n  );\n\n  // avoiding duplicate operation for assigning value\n  if (d.value !== value) d.value = value;\n\n  return d;\n}\n// and\nObject.defineProperty(obj, 'key', withValue('static'));\n\n// if freeze is available, prevents adding or\n// removing the object prototype properties\n// (value, get, set, enumerable, writable, configurable)\n(Object.freeze || Object)(Object.prototype);\n```\n\nWhen the property already exists, `Object.defineProperty()` attempts to modify the property according to the values in the descriptor and the property's current configuration.\n\nIf the old descriptor had its `configurable` attribute set to `false`, the property is said to be _non-configurable_. It is not possible to change any attribute of a non-configurable accessor property, and it is not possible to switch between data and accessor property types. For data properties with `writable: true`, it is possible to modify the value and change the `writable` attribute from `true` to `false`. A [`TypeError`](../../globals/TypeError/TypeError.mdx) is thrown when attempts are made to change non-configurable property attributes (except `value` and `writable`, if permitted), except when defining a value same as the original value on a data property.\n\nWhen the current property is configurable, defining an attribute to `undefined` effectively deletes it. For example, if `o.k` is an accessor property, `Object.defineProperty(o, \"k\", { set: undefined })` will remove the setter, making `k` only have a getter and become readonly. If an attribute is absent from the new descriptor, the old descriptor attribute's value is kept (it won't be implicitly re-defined to `undefined`). It is possible to toggle between data and accessor property by giving a descriptor of a different \"flavor\". For example, if the new descriptor is a data descriptor (with `value` or `writable`), the original descriptor's `get` and `set` attributes will both be dropped.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Object/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.entries()\n\nThe **`Object.entries()`** method returns an array of a given object's own enumerable string-keyed property key-value pairs.\n\n## Syntax\n\n```js\nObject.entries(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : An object.\n\n### Return value\n\nAn array of the given object's own enumerable string-keyed property key-value pairs. Each key-value pair is an array with two elements: the first element is the property key (which is always a string), and the second element is the property value.\n\n## Description\n\n`Object.entries()` returns an array whose elements are arrays corresponding to the enumerable string-keyed property key-value pairs found directly upon `object`. This is the same as iterating with a `for...in` loop, except that a `for...in` loop enumerates properties in the prototype chain as well. The order of the array returned by `Object.entries()` is the same as that provided by a `for...in` loop.\n\nIf you only need the property keys, use [`Object.keys()`](../../globals/Object/keys.mdx) instead. If you only need the property values, use [`Object.values()`](../../globals/Object/values.mdx) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Object/freeze.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.freeze()\n\nThe **`Object.freeze()`** method _freezes_ an object. Freezing an object [prevents extensions](../../globals/Object/preventExtensions.mdx) and makes existing properties non-writable and non-configurable. A frozen object can no longer be changed: new properties cannot be added, existing properties cannot be removed, their enumerability, configurability, writability, or value cannot be changed, and the object's prototype cannot be re-assigned. `freeze()` returns the same object that was passed in.\n\nFreezing an object is the highest integrity level that JavaScript provides.\n\n## Syntax\n\n```js\nObject.freeze(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object to freeze.\n\n### Return value\n\nThe object that was passed to the function.\n\n## Description\n\nFreezing an object is equivalent to [preventing extensions](../../globals/Object/preventExtensions.mdx) and then changing all existing [properties' descriptors'](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty#description) `configurable` to `false` — and for data properties, `writable` to `false` as well. Nothing can be added to or removed from the properties set of a frozen object. Any attempt to do so will fail, either silently or by throwing a [`TypeError`](../../globals/TypeError/TypeError.mdx) exception (most commonly, but not exclusively, when in \"strict mode\").\n\nFor data properties of a frozen object, their values cannot be changed since the writable and\nconfigurable attributes are set to false. Accessor properties (getters and setters) work the same — the property value returned by the getter may still change, and the setter can still be called without throwing errors when setting the property. Note that values\nthat are objects can still be modified, unless they are also frozen. As an object, an\narray can be frozen; after doing so, its elements cannot be altered and no elements can\nbe added to or removed from the array.\n\n`freeze()` returns the same object that was passed into the function. It\n_does not_ create a frozen copy.\n\nA `TypedArray` or a [`DataView`](../../globals/DataView/DataView.mdx) with elements will cause a [`TypeError`](../../globals/TypeError/TypeError.mdx),\nas they are views over memory and will definitely cause other possible issues:\n\n```js\nObject.freeze(new Uint8Array(0)) // No elements\n// Uint8Array []\n\nObject.freeze(new Uint8Array(1)) // Has elements\n// TypeError: Cannot freeze array buffer views with elements\n\nObject.freeze(new DataView(new ArrayBuffer(32))) // No elements\n// DataView {}\n\nObject.freeze(new Float64Array(new ArrayBuffer(64), 63, 0)) // No elements\n// Float64Array []\n\nObject.freeze(new Float64Array(new ArrayBuffer(64), 32, 2)) // Has elements\n// TypeError: Cannot freeze array buffer views with elements\n```\n\nNote that as the standard three properties (`buf.byteLength`,\n`buf.byteOffset` and `buf.buffer`) are read-only (as are those of\nan `ArrayBuffer`, there is no reason for\nattempting to freeze these properties.\n\nUnlike [`Object.seal()`](../../globals/Object/seal.mdx), existing properties in objects frozen with `Object.freeze()` are made immutable and data properties cannot be re-assigned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Object/fromEntries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.fromEntries()\n\nThe **`Object.fromEntries()`** method transforms a list of key-value pairs into an object.\n\n## Syntax\n\n```js\nObject.fromEntries(iterable)\n```\n\n### Parameters\n\n- `iterable`\n\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol), such as an `Array` or [Map](../../globals/Map/Map.mdx), containing a list of objects. Each object should have two properties:\n\n    - `0`\n      - : A string or `Symbol` representing the property key.\n    - `1`\n      - : The property value.\n\n    Typically, this object is implemented as a two-element array, with the first element being the property key and the second element being the property value.\n\n### Return value\n\nA new object whose properties are given by the entries of the iterable.\n\n## Description\n\nThe `Object.fromEntries()` method takes a list of key-value pairs and returns a new object whose properties are given by those entries. The `iterable` argument is expected to be an object that implements an `@@iterator` method. The method returns an iterator object that produces two-element array-like objects. The first element is a value that will be used as a property key, and the second element is the value to associate with that property key.\n\n`Object.fromEntries()` performs the reverse of [`Object.entries()`](../../globals/Object/entries.mdx), except that `Object.entries()` only returns string-keyed properties, while `Object.fromEntries()` can also create symbol-keyed properties.\n\n> **Note:** Unlike [`Array.from()`](../../globals/Array/from.mdx), `Object.fromEntries()` does not use the value of `this`, so calling it on another constructor does not create objects of that type.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Object/getOwnPropertyDescriptor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertyDescriptor()\n\nThe **`Object.getOwnPropertyDescriptor()`** method returns an\nobject describing the configuration of a specific property on a given object (that is,\none directly present on an object and not in the object's prototype chain). The object\nreturned is mutable but mutating it has no effect on the original property's\nconfiguration.\n\n## Syntax\n\n```js\nObject.getOwnPropertyDescriptor(obj, prop)\n```\n\n### Parameters\n\n- `obj`\n  - : The object in which to look for the property.\n- `prop`\n  - : The name or `Symbol` of the property whose description is to be\n    retrieved.\n\n### Return value\n\nA property descriptor of the given property if it exists on the object,\n[`undefined`](../../globals/undefined.mdx) otherwise.\n\n## Description\n\nThis method permits examination of the precise description of a property. A\n_property_ in JavaScript consists of either a string-valued name or a\n`Symbol` and a property descriptor. Further information about property\ndescriptor types and their attributes can be found in\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx).\n\nA _property descriptor_ is a record with some of the following attributes:\n\n- `value`\n  - : The value associated with the property (data descriptors only).\n- `writable`\n  - : `true` if and only if the value associated with the property may be\n    changed (data descriptors only).\n- `get`\n  - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no getter (accessor descriptors only).\n- `set`\n  - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no setter (accessor descriptors only).\n- `configurable`\n  - : `true` if and only if the type of this property descriptor may be changed\n    and if the property may be deleted from the corresponding object.\n- `enumerable`\n  - : `true` if and only if this property shows up during enumeration of the\n    properties on the corresponding object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Object/getOwnPropertyDescriptors.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertyDescriptors()\n\nThe **`Object.getOwnPropertyDescriptors()`** method returns all\nown property descriptors of a given object.\n\n## Syntax\n\n```js\nObject.getOwnPropertyDescriptors(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object for which to get all own property descriptors.\n\n### Return value\n\nAn object containing all own property descriptors of an object. Might be an empty\nobject, if there are no properties.\n\n## Description\n\nThis method permits examination of the precise description of all own properties of an\nobject. A _property_ in JavaScript consists of either a string-valued name or a\n`Symbol` and a property descriptor. Further information about property\ndescriptor types and their attributes can be found in\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx).\n\nA _property descriptor_ is a record with some of the following attributes:\n\n- `value`\n  - : The value associated with the property (data descriptors only).\n- `writable`\n  - : `true` if and only if the value associated with the property may be\n    changed (data descriptors only).\n- `get`\n  - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no getter (accessor descriptors only).\n- `set`\n  - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no setter (accessor descriptors only).\n- `configurable`\n  - : `true` if and only if the type of this property descriptor may be changed\n    and if the property may be deleted from the corresponding object.\n- `enumerable`\n  - : `true` if and only if this property shows up during enumeration of the\n    properties on the corresponding object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Object/getOwnPropertyNames.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertyNames()\n\nThe **`Object.getOwnPropertyNames()`** method returns an array of all properties (including non-enumerable properties except for those which use Symbol) found directly in a given object.\n\n## Syntax\n\n```js\nObject.getOwnPropertyNames(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object whose enumerable and non-enumerable properties are to be returned.\n\n### Return value\n\nAn array of strings that corresponds to the properties found directly in the given object.\n\n## Description\n\n`Object.getOwnPropertyNames()` returns an array whose elements are strings corresponding to the enumerable and non-enumerable properties found directly in a given object `obj`. The ordering of the enumerable properties in the array is consistent with the ordering exposed by a `for...in` loop (or by [`Object.keys()`](../../globals/Object/keys.mdx)) over the properties of the object. The non-negative integer keys of the object (both enumerable and non-enumerable) are added in ascending order to the array first, followed by the string keys in the order of insertion.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Object/getOwnPropertySymbols.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertySymbols()\n\nThe **`Object.getOwnPropertySymbols()`** method returns an array of all symbol properties found directly upon a given object.\n\n## Syntax\n\n```js\nObject.getOwnPropertySymbols(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object whose symbol properties are to be returned.\n\n### Return value\n\nAn array of all symbol properties found directly upon the given object.\n\n## Description\n\nSimilar to [`Object.getOwnPropertyNames()`](../../globals/Object/getOwnPropertyNames.mdx), you can get all symbol properties of a given object as an array of symbols. Note that [`Object.getOwnPropertyNames()`](../../globals/Object/getOwnPropertyNames.mdx) itself does not contain the symbol properties of an object and only the string properties.\n\nAs all objects have no own symbol properties initially, `Object.getOwnPropertySymbols()` returns an empty array unless you have set symbol properties on your object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Object/getPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getPrototypeOf()\n\nThe **`Object.getPrototypeOf()`** method returns the prototype\n(i.e. the value of the internal `[[Prototype]]` property) of the specified\nobject.\n\n## Syntax\n\n```js\nObject.getPrototypeOf(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object whose prototype is to be returned.\n\n### Return value\n\nThe prototype of the given object, which may be `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Object/hasOwn.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.hasOwn()\n\nThe **`Object.hasOwn()`** static method returns `true` if the specified object has the indicated property as its _own_ property.\nIf the property is inherited, or does not exist, the method returns `false`.\n\n> **Note:** `Object.hasOwn()` is intended as a replacement for [`Object.prototype.hasOwnProperty()`](../../globals/Object/prototype/hasOwnProperty.mdx).\n\n\n\n## Syntax\n\n```js\nhasOwn(instance, prop)\n```\n\n### Parameters\n\n- `instance`\n  - : The JavaScript object instance to test.\n- `prop`\n  - : The `String` name or [Symbol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol) of the property to test.\n\n### Return value\n\n`true` if the specified object has directly defined the specified property.\nOtherwise `false`\n\n## Description\n\nThe **`Object.hasOwn()`** method returns `true` if the specified property is a\ndirect property of the object — even if the property value is `null` or `undefined`.\nThe method returns `false` if the property is inherited, or has not been declared at all.\nUnlike the `in` operator, this\nmethod does not check for the specified property in the object's prototype chain.\n\nIt is recommended over [`Object.prototype.hasOwnProperty()`](../../globals/Object/prototype/hasOwnProperty.mdx) because\nit works for objects created using `Object.create(null)` and with objects that\nhave overridden the inherited `hasOwnProperty()` method. While it is possible to\nworkaround these problems by calling `Object.prototype.hasOwnProperty()` on an\nexternal object, `Object.hasOwn()` is more intuitive.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Object/is.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.is()\n\nThe **`Object.is()`** method determines whether two values are [the same value](https://developer.mozilla.org/docs/Web/JavaScript/Equality_comparisons_and_sameness#same-value_equality_using_object.is).\n\n## Syntax\n\n```js\nObject.is(value1, value2)\n```\n\n### Parameters\n\n- `value1`\n  - : The first value to compare.\n- `value2`\n  - : The second value to compare.\n\n### Return value\n\nA boolean indicating whether or not the two arguments are the same value.\n\n## Description\n\n`Object.is()` determines whether two values are [the same value](https://developer.mozilla.org/docs/Web/JavaScript/Equality_comparisons_and_sameness#same-value_equality_using_object.is). Two values are the same if one of the following holds:\n\n- both [`undefined`](../../globals/undefined.mdx)\n- both `null`\n- both `true` or both `false`\n- both strings of the same length with the same characters in the same order\n- both the same object (meaning both values reference the same object in memory)\n- both `BigInts` with the same numeric value\n- both `Symbols` that reference the same symbol value\n- both numbers and\n\n  - both `+0`\n  - both `-0`\n  - both [`NaN`](../../globals/NaN.mdx)\n  - or both non-zero, not [`NaN`](../../globals/NaN.mdx), and have the same value\n\n`Object.is()` is not equivalent to the [`==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Equality) operator. The `==` operator applies various coercions to both sides (if they are not the same type) before testing for equality (resulting in such behavior as `\"\" == false` being `true`), but `Object.is()` doesn't coerce either value.\n\n`Object.is()` is also _not_ equivalent to the [`===`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) operator. The only difference between `Object.is()` and `===` is in their treatment of signed zeros and `NaN` values. The `===` operator (and the `==` operator) treats the number values `-0` and `+0` as equal, but treats [`NaN`](../../globals/NaN.mdx) as not equal to each other.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Object/isExtensible.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.isExtensible()\n\nThe **`Object.isExtensible()`** method determines if an object\nis extensible (whether it can have new properties added to it).\n\n## Syntax\n\n```js\nObject.isExtensible(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be checked.\n\n### Return value\n\nA `Boolean` indicating whether or not the given object is extensible.\n\n## Description\n\nObjects are extensible by default: they can have new properties added to them, and their `[[Prototype]]` can be re-assigned. An object can be marked as non-extensible using one of [`Object.preventExtensions()`](../../globals/Object/preventExtensions.mdx), [`Object.seal()`](../../globals/Object/seal.mdx), [`Object.freeze()`](../../globals/Object/freeze.mdx), or [`Reflect.preventExtensions()`](../../globals/Reflect/preventExtensions.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Object/isFrozen.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.isFrozen()\n\nThe **`Object.isFrozen()`** determines if an object is\n[frozen](../../globals/Object/freeze.mdx).\n\n## Syntax\n\n```js\nObject.isFrozen(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be checked.\n\n### Return value\n\nA `Boolean` indicating whether or not the given object is frozen.\n\n## Description\n\nAn object is frozen if and only if it is not [extensible](../../globals/Object/isExtensible.mdx), all its properties are non-configurable, and all its data\nproperties (that is, properties which are not accessor properties with getter or setter\ncomponents) are non-writable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Object/isSealed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.isSealed()\n\nThe **`Object.isSealed()`** method determines if an object is\nsealed.\n\n## Syntax\n\n```js\nObject.isSealed(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be checked.\n\n### Return value\n\nA `Boolean` indicating whether or not the given object is sealed.\n\n## Description\n\nReturns `true` if the object is sealed, otherwise `false`. An\nobject is sealed if it is not [extensible](../../globals/Object/isExtensible.mdx) and\nif all its properties are non-configurable and therefore not removable (but not\nnecessarily non-writable).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Object/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.keys()\n\nThe **`Object.keys()`** method returns an array of a given object's own enumerable string-keyed property names.\n\n## Syntax\n\n```js\nObject.keys(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : An object.\n\n### Return value\n\nAn array of strings representing the given object's own enumerable string-keyed property keys.\n\n## Description\n\n`Object.keys()` returns an array whose elements are strings corresponding to the enumerable string-keyed property names found directly upon `object`. This is the same as iterating with a `for...in` loop, except that a `for...in` loop enumerates properties in the prototype chain as well. The order of the array returned by `Object.keys()` is the same as that provided by a `for...in` loop.\n\nIf you need the property values, use [`Object.values()`](../../globals/Object/values.mdx) instead. If you need both the property keys and values, use [`Object.entries()`](../../globals/Object/entries.mdx) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Object/preventExtensions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.preventExtensions()\n\nThe **`Object.preventExtensions()`** method prevents new\nproperties from ever being added to an object (i.e. prevents future extensions to the\nobject). It also prevents the object's prototype from being re-assigned.\n\n## Syntax\n\n```js\nObject.preventExtensions(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be made non-extensible.\n\n### Return value\n\nThe object being made non-extensible.\n\n## Description\n\nAn object is extensible if new properties can be added to it.\n`Object.preventExtensions()` marks an object as no longer extensible, so that\nit will never have properties beyond the ones it had at the time it was marked as\nnon-extensible. Note that the properties of a non-extensible object, in general, may\nstill be _deleted_. Attempting to add new properties to a non-extensible object\nwill fail, either silently or, in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), throwing a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\nUnlike [`Object.seal()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/seal) and [`Object.freeze()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze), `Object.preventExtensions()` invokes an intrinsic JavaScript behavior and cannot be replaced with a composition of several other operations. It also has its `Reflect` counterpart (which only exists for intrinsic operations), [`Reflect.preventExtensions()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Reflect/preventExtensions).\n\n`Object.preventExtensions()` only prevents addition of own properties. Properties can still be added to the object prototype.\n\nThis method makes the `[[Prototype]]` of the target immutable; any `[[Prototype]]` re-assignment will throw a `TypeError`. This behavior is specific to the internal `[[Prototype]]` property; other properties of the target object will remain mutable.\n\nThere is no way to make an object extensible again once it has been made non-extensible.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Object/prototype/constructor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.constructor\n\nThe **`constructor`** data property of an `Object` instance returns a reference to the constructor function that created the instance object. Note that the value of this property is a reference to _the function itself_, not a string containing the function's name.\n\n> **Note:** This is a property of JavaScript objects. For the `constructor` method in classes, see [its own reference page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/constructor).\n\n## Value\n\nA reference to the constructor function that created the instance object.\n\n> **Note:** This property is created by default on the [`prototype`](../../../globals/Function/prototype/) property of every constructor function and is inherited by all objects created by that constructor.\n\n## Description\n\nAny object (with the exception of [`null` prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) will have a `constructor` property on its `[[Prototype]]`. Objects created with literals will also have a `constructor` property that points to the constructor type for that object — for example, array literals create `Array` objects, and [object literals](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Object_initializer) create plain objects.\n\n```js\nconst o1 = {};\no1.constructor === Object; // true\n\nconst o2 = new Object();\no2.constructor === Object; // true\n\nconst a1 = [];\na1.constructor === Array; // true\n\nconst a2 = new Array();\na2.constructor === Array; // true\n\nconst n = 3;\nn.constructor === Number; // true\n```\n\nNote that `constructor` usually comes from the constructor's [`prototype`](../../../globals/Function/prototype/) property. If you have a longer prototype chain, you can usually expect every object in the chain to have a `constructor` property.\n\n```js\nconst o = new TypeError(); // Inheritance: TypeError -> Error -> Object\nconst proto = Object.getPrototypeOf;\nproto(o).constructor === TypeError; // true\nproto(proto(o)).constructor === Error; // true\nproto(proto(proto(o))).constructor === Object; // true\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Object/prototype/hasOwnProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.hasOwnProperty()\n\nThe **`hasOwnProperty()`** method returns a boolean indicating whether the\nobject has the specified property as its own property (as opposed to inheriting\nit).\n\n> **Note:** [`Object.hasOwn()`](../../../globals/Object/hasOwn.mdx) is recommended over\n> `hasOwnProperty()`, in browsers where it is supported.\n\n## Syntax\n\n```js\nhasOwnProperty(prop)\n```\n\n### Parameters\n\n- `prop`\n  - : The `String` name or `Symbol` of the property to test.\n\n### Return value\n\nReturns `true` if the object has the specified property as own property; `false`\notherwise.\n\n## Description\n\nThe **`hasOwnProperty()`** method returns `true` if the specified property is a\ndirect property of the object — even if the value is `null` or `undefined`. The\nmethod returns `false` if the property is inherited, or has not been declared at\nall. Unlike the `in` operator, this\nmethod does not check for the specified property in the object's prototype\nchain.\n\nThe method can be called on _most_ JavaScript objects, because most objects\ndescend from `Object`, and hence inherit its methods. For\nexample `Array` is an `Object`, so you can\nuse `hasOwnProperty()` method to check whether an index exists:\n\n```js\nconst fruits = ['Apple', 'Banana','Watermelon', 'Orange'];\nfruits.hasOwnProperty(3);   // true ('Orange')\nfruits.hasOwnProperty(4);   // false - not defined\n```\n\nThe method will not be available in objects where it is reimplemented, or on\nobjects created using `Object.create(null)` (as these don't inherit from\n`Object.prototype`). Examples for these cases are given below.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Object/prototype/isPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.isPrototypeOf()\n\nThe **`isPrototypeOf()`** method checks if an object exists in another object's prototype chain.\n\n> **Note:** `isPrototypeOf()` differs from the [`instanceof`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/instanceof) operator. In the expression `object instanceof AFunction`, `object`'s prototype chain is checked against `AFunction.prototype`, not against `AFunction` itself.\n\n## Syntax\n\n```js\nisPrototypeOf(object)\n```\n\n### Parameters\n\n- `object`\n  - : The object whose prototype chain will be searched.\n\n### Return value\n\nA boolean indicating whether the calling object (`this`) lies in the prototype chain of `object`. Directly returns `false` when `object` is not an object (i.e. a primitive).\n\n### Errors thrown\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown if `this` is `null` or `undefined` (because it can't be [converted to an object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#object_coercion)).\n\n## Description\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `isPrototypeOf()` method. This method allows you to check whether or not the object exists within another object's prototype chain. If the `object` passed as the parameter is not an object (i.e. a primitive), the method directly returns `false`. Otherwise, the `this` value is [converted to an object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#object_coercion), and the prototype chain of `object` is searched for the `this` value, until the end of the chain is reached or the `this` value is found.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Object/prototype/propertyIsEnumerable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.propertyIsEnumerable()\n\nThe **`propertyIsEnumerable()`** method returns a boolean indicating whether the specified property is the object's [enumerable own](https://developer.mozilla.org/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) property.\n\n## Syntax\n\n```js\npropertyIsEnumerable(prop)\n```\n\n### Parameters\n\n- `prop`\n  - : The name of the property to test. Can be a string or a `Symbol`.\n\n### Return value\n\nA boolean value indicating whether the specified property is enumerable and is the object's own property.\n\n## Description\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `propertyIsEnumerable()` method. This method determines if the specified property, string or symbol, is an enumerable own property of the object. If the object does not have the specified property, this method returns `false`.\n\nThis method is equivalent to [`Object.getOwnPropertyDescriptor(obj, prop)?.enumerable ?? false`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Object/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string representing the object. This method is meant to be overridden by derived objects for locale-specific purposes.\n\n## Syntax\n\n```js\ntoLocaleString()\n```\n\n### Parameters\n\nNone. However, all objects that override this method are expected to accept at most two parameters, corresponding to `locales` and `options`, such as [`Date.prototype.toLocaleString()`](../../../globals/Date/prototype/toLocaleString.mdx). The parameter positions should not be used for any other purpose.\n\n### Return value\n\nThe return value of calling `this.toString()`.\n\n## Description\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `toLocaleString()` method. `Object`'s `toLocaleString` returns the result of calling [`this.toString()`](../../../globals/Object/prototype/toString.mdx).\n\nThis function is provided to give objects a generic `toLocaleString` method, even though not all may use it. In the core language, these built-in objects override `toLocaleString` to provide locale-specific formatting:\n\n- `Array`: [`Array.prototype.toLocaleString()`](../../../globals/Array/prototype/toLocaleString.mdx)\n- `Number`: [`Number.prototype.toLocaleString()`](../../../globals/Number/prototype/toLocaleString.mdx)\n- `Date`: [`Date.prototype.toLocaleString()`](../../../globals/Date/prototype/toLocaleString.mdx)\n- `BigInt`: [`BigInt.prototype.toLocaleString()`](../../../globals/BigInt/prototype/toLocaleString.mdx)\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Object/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.toString()\n\nThe **`toString()`** method returns a string representing the object. This method is meant to be overridden by derived objects for custom [type conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) logic.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nBy default `toString()` takes no parameters. However, objects that inherit from `Object` may override it with their own implementations that do take parameters. For example, the [`Number.prototype.toString()`](../../../globals/Number/prototype/toString.mdx) and [`BigInt.prototype.toString()`](../../../globals/BigInt/prototype/toString.mdx) methods take an optional `radix` parameter.\n\n### Return value\n\nA string representing the object.\n\n## Description\n\nJavaScript calls the `toString` method to [convert an object to a primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion). You rarely need to invoke the `toString` method yourself; JavaScript automatically invokes it when encountering an object where a primitive value is expected.\n\nThis method is called in priority by [string conversion](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion), but [numeric conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#numeric_coercion) and [primitive conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion) call `valueOf()` in priority. However, because the base [`valueOf()`](../../../globals/Object/prototype/valueOf.mdx) method returns an object, the `toString()` method is usually called in the end, unless the object overrides `valueOf()`. For example, `+[1]` returns `1`, because its [`toString`](../../../globals/Array/prototype/toString.mdx) method returns `\"1\"`, which is then converted to a number.\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `toString()` method. When you create a custom object, you can override `toString()` to call a custom method, so that your custom object can be converted to a string value. Alternatively, you can add a [`Symbol.toPrimitive`](../../../globals/Symbol/toPrimitive.mdx) method, which allows even more control over the conversion process, and will always be preferred over `valueOf` or `toString` for any type conversion.\n\nTo use the base `Object.prototype.toString()` with an object that has it overridden (or to invoke it on `null` or `undefined`), you need to call [`Function.prototype.call()`](../../../globals/Function/prototype/call.mdx) or [`Function.prototype.apply()`](../../../globals/Function/prototype/apply.mdx) on it, passing the object you want to inspect as the first parameter (called `thisArg`).\n\n```js\nconst arr = [1, 2, 3];\n\narr.toString(); // \"1,2,3\"\nObject.prototype.toString.call(arr); // \"[object Array]\"\n```\n\n`Object.prototype.toString()` returns `\"[object Type]\"`, where `Type` is the object type. If the object has a [`Symbol.toStringTag`](../../../globals/Symbol/toStringTag.mdx) property whose value is a string, that value will be used as the `Type`. Many built-in objects, including [`Map`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map) and [`Symbol`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol), have a `Symbol.toStringTag`. Some objects predating ES6 do not have `Symbol.toStringTag`, but have a special tag nonetheless. They include (the tag is the same as the type name given below):\n\n- [`Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\n- [`Function`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions) (anything whose [`typeof`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/typeof) returns `\"function\"`)\n- [`Error`](../../../globals/Error/Error.mdx)\n- [`Boolean`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)\n- [`Number`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)\n- [`String`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\n- [`Date`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date)\n- [`RegExp`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp)\n\nThe [`arguments`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/arguments) object returns `\"[object Arguments]\"`. Everything else, including user-defined classes, unless with a custom `Symbol.toStringTag`, will return `\"[object Object]\"`.\n\n`Object.prototype.toString()` invoked on [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) returns `[object Null]` and `[object Undefined]`, respectively.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Object/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.valueOf()\n\nThe **`valueOf()`** method of `Object` converts the `this` value [to an object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#object_coercion). This method is meant to be overridden by derived objects for custom [type conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) logic.\n\n\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nThe `this` value, converted to an object.\n\n> **Note:** In order for `valueOf` to be useful during type conversion, it must return a primitive. Because all primitive types have their own `valueOf()` methods, calling `aPrimitiveValue.valueOf()` generally does not invoke `Object.prototype.valueOf()`.\n\n## Description\n\nJavaScript calls the `valueOf` method to [convert an object to a primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion). You rarely need to invoke the `valueOf` method yourself; JavaScript automatically invokes it when encountering an object where a primitive value is expected.\n\nThis method is called in priority by [numeric conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#numeric_coercion) and [primitive conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion), but [string conversion](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) calls `toString()` in priority, and `toString()` is very likely to return a string value (even for the [`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx) base implementation), so `valueOf()` is usually not called in this case.\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `toString()` method. The `Object.prototype.valueOf()` base implementation is deliberately useless: by returning an object, its return value will never be used by any [primitive conversion algorithm](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion). Many built-in objects override this method to return an appropriate primitive value. When you create a custom object, you can override `valueOf()` to call a custom method, so that your custom object can be converted to a primitive value. Generally, `valueOf()` is used to return a value that is most meaningful for the object — unlike `toString()`, it does not need to be a string. Alternatively, you can add a [`Symbol.toPrimitive`](../../../globals/Symbol/toPrimitive.mdx) method, which allows even more control over the conversion process, and will always be preferred over `valueOf` or `toString` for any type conversion.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Object/seal.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.seal()\n\nThe **`Object.seal()`** method _seals_ an object. Sealing an object [prevents extensions](../../globals/Object/preventExtensions.mdx) and makes existing properties non-configurable. A sealed object has a fixed set of properties: new properties cannot be added, existing properties cannot be removed, their enumerability and configurability cannot be changed, and its prototype cannot be re-assigned. Values of existing properties can still be changed as long as they are writable. `seal()` returns the same object that was passed in.\n\n## Syntax\n\n```js\nObject.seal(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be sealed.\n\n### Return value\n\nThe object being sealed.\n\n## Description\n\nSealing an object is equivalent to [preventing extensions](../../globals/Object/preventExtensions.mdx) and then changing all existing properties' descriptors to `configurable: false`. This has the effect of making the set of properties on the object fixed. Making all properties non-configurable\nalso prevents them from being converted from data properties to accessor properties and\nvice versa, but it does not prevent the values of data properties from being changed.\nAttempting to delete or add properties to a sealed object, or to convert a data property\nto accessor or vice versa, will fail, either silently or by throwing a\n[`TypeError`](../../globals/TypeError/TypeError.mdx) (most commonly, although not exclusively, when in \"strict mode\" code).\n\nThe prototype chain remains untouched. However, due to the effect of [preventing extensions](../../globals/Object/preventExtensions.mdx), the `[[Prototype]]` cannot be reassigned.\n\nUnlike [`Object.freeze()`](../../globals/Object/freeze.mdx), objects sealed with `Object.seal()` may have their existing\nproperties changed, as long as they are writable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Object/setPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.setPrototypeOf()\n\nThe **`Object.setPrototypeOf()`** method sets the prototype (i.e., the internal `[[Prototype]]` property) of a specified object to another object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null).\n\n> **Warning:** Changing the `[[Prototype]]` of an object is, by the nature of how modern JavaScript engines optimize property accesses, currently a very slow operation in every browser and JavaScript engine. In addition, the effects of altering inheritance are subtle and far-flung, and are not limited to the time spent in the `Object.setPrototypeOf(...)` statement, but may extend to **_any_** code that has access to any object whose `[[Prototype]]` has been altered. You can read more in [JavaScript engine fundamentals: optimizing prototypes](https://mathiasbynens.be/notes/prototypes).\n>\n> Because this feature is a part of the language, it is still the burden on engine developers to implement that feature performantly (ideally). Until engine developers address this issue, if you are concerned about performance, you should avoid setting the `[[Prototype]]` of an object. Instead, create a new object with the desired `[[Prototype]]` using [`Object.create()`](../../globals/Object/create.mdx).\n\n## Syntax\n\n```js\nObject.setPrototypeOf(obj, prototype)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which is to have its prototype set.\n- `prototype`\n  - : The object's new prototype (an object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null)).\n\n### Return value\n\nThe specified object.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if one of the following conditions is met:\n    - The `obj` parameter is [non-extensible](../../globals/Object/isExtensible.mdx), or it's an [immutable prototype exotic object](https://tc39.es/ecma262/#sec-immutable-prototype-exotic-objects), such as `Object.prototype`.\n    - The `prototype` parameter is not an object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null).\n\n## Description\n\n`Object.setPrototypeOf()` is generally considered the proper way to set the prototype of an object.\n\nIf the `obj` parameter is not an object (e.g. number, string, etc.), this method does nothing.\n\nFor security concerns, there are certain built-in objects that are designed to have an _immutable prototype_. This prevents prototype pollution attacks, especially [proxy-related ones](https://github.com/tc39/ecma262/issues/272). The core language only specifies `Object.prototype` as an immutable prototype exotic object, whose prototype is always `null`.\n\n```js\nObject.isExtensible(Object.prototype); // true; you can add more properties\nObject.setPrototypeOf(Object.prototype, {}); // TypeError: Immutable prototype object '#<Object>' cannot have their prototype set\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Object/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.values()\n\nThe **`Object.values()`** method returns an array of a given object's own enumerable string-keyed property values.\n\n## Syntax\n\n```js\nObject.values(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : An object.\n\n### Return value\n\nAn array containing the given object's own enumerable string-keyed property values.\n\n## Description\n\n`Object.values()` returns an array whose elements are strings corresponding to the enumerable string-keyed property values found directly upon `object`. This is the same as iterating with a `for...in` loop, except that a `for...in` loop enumerates properties in the prototype chain as well. The order of the array returned by `Object.values()` is the same as that provided by a `for...in` loop.\n\nIf you need the property keys, use [`Object.keys()`](../../globals/Object/keys.mdx) instead. If you need both the property keys and values, use [`Object.entries()`](../../globals/Object/entries.mdx) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Promise/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get Promise[Symbol.species]\n\nThe **`Promise[Symbol.species]`** accessor property returns the constructor used to construct return values from promise methods.\n\n> **Warning:** The existence of `Symbol.species` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Syntax\n\n```js\nPromise[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct return values from promise chaining methods that create new promises.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `Promise` objects. Subclass constructors may override it to change the constructor assignment. The default implementation is basically:\n\n```js\n// Hypothetical underlying implementation for illustration\nclass Promise {\n  static get [Symbol.species]() {\n    return this;\n  }\n}\n```\n\nBecause of this polymorphic implementation, `Symbol.species` of derived subclasses would also return the constructor itself by default.\n\n```js\nclass SubPromise extends Promise {}\nSubPromise[Symbol.species] === Promise; // true\n```\n\nPromise chaining methods — [`then()`](../../globals/Promise/prototype/then.mdx), [`finally()`](../../globals/Promise/prototype/finally.mdx) — return new promise objects. They get the constructor to construct the new promise through `this.constructor[Symbol.species]`. If `this.constructor` is `undefined`, or if `this.constructor[Symbol.species]` is `undefined` or `null`, the default [`Promise()`](../../globals/Promise/Promise.mdx) constructor is used. Otherwise, the constructor returned by `this.constructor[Symbol.species]` is used to construct the new promise object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Promise/Promise.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise()\n\nThe **`Promise()`** constructor is primarily used to wrap functions that do not already support promises.\n\n## Syntax\n\n```js\nnew Promise(executor)\n```\n\n> **Note:** `Promise()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `executor`\n  - : A `function` to be executed by the constructor. It receives two functions as parameters: `resolveFunc` and `rejectFunc`. Any errors thrown in the `executor` will cause the promise to be rejected, and the return value will be neglected. The semantics of `executor` are detailed below.\n\n### Return value\n\nWhen called via `new`, the `Promise` constructor returns a promise object. The promise object will become _resolved_ when either of the functions `resolveFunc` or `rejectFunc` are invoked. Note that if you call `resolveFunc` or `rejectFunc` and pass another `Promise` object as an argument, it can be said to be \"resolved\", but still not \"settled\". See the [Promise description](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#description) for more explanation.\n\n## Description\n\nTraditionally (before promises), asynchronous tasks were designed as callbacks.\n\n```js\nreadFile(\"./data.txt\", (error, result) => {\n  // This callback will be called when the task is done, with the\n  // final `error` or `result`. Any operation dependent on the\n  // result must be defined within this callback.\n});\n// Code here is immediately executed after the `readFile` request\n// is fired. It does not wait for the callback to be called, hence\n// making `readFile` \"asynchronous\".\n```\n\nTo take advantage of the readability improvement and language features offered by promises, the `Promise()` constructor allows one to transform the callback-based API to a promise-based one.\n\n> **Note:** If your task is already promise-based, you likely do not need the `Promise()` constructor.\n\nThe `executor` is custom code that ties an outcome in a callback to a promise. You, the programmer, write the `executor`. Its signature is expected to be:\n\n```js\nfunction executor(resolveFunc, rejectFunc) {\n  // Typically, some asynchronous operation that accepts a callback,\n  // like the `readFile` function above\n}\n```\n\n`resolveFunc` and `rejectFunc` are also functions, and you can give them whatever actual names you want. Their signatures are simple: they accept a single parameter of any type.\n\n```js\nresolveFunc(value); // call on resolved\nrejectFunc(reason); // call on rejected\n```\n\nThe `value` parameter passed to `resolveFunc` can be another promise object, in which case the newly constructed promise's state will be \"locked in\" to the promise passed (as part of the [resolution](#resolver-function) promise). The `rejectFunc` has semantics close to the [`throw`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/throw) statement, so `reason` is typically an [`Error`](../../globals/Error/Error.mdx) instance. If either `value` or `reason` is omitted, the promise is fulfilled/rejected with `undefined`.\n\nThe `executor`'s completion state has limited effect on the promise's state:\n\n- The `executor` return value is ignored. `return` statements within the `executor` merely impact control flow and alter whether a part of the function is executed, but do not have any impact on the promise's fulfillment value. If `executor` exits and it's impossible for `resolveFunc` or `rejectFunc` to be called in the future (for example, there are no async tasks scheduled), then the promise remains pending forever.\n- If an error is thrown in the `executor`, the promise is rejected, unless `resolveFunc` or `rejectFunc` has already been called.\n\n> **Note:** The existence of pending promises does not prevent the program from exiting. If the event loop is empty, the program exits despite any pending promises (because those are necessarily forever-pending).\n\nHere's a summary of the typical flow:\n\n1. At the time when the constructor generates the new `Promise` object, it also generates a corresponding pair of functions for `resolveFunc` and `rejectFunc`; these are \"tethered\" to the `Promise` object.\n2. `executor` typically wraps some asynchronous operation which provides a callback-based API. The callback (the one passed to the original callback-based API) is defined within the `executor` code, so it has access to the `resolveFunc` and `rejectFunc`.\n3. The `executor` is called synchronously (as soon as the `Promise` is constructed) with the `resolveFunc` and `rejectFunc` functions as arguments.\n4. The code within the `executor` has the opportunity to perform some operation. The eventual completion of the asynchronous task is communicated with the promise instance via the side effect caused by `resolveFunc` or `rejectFunc`. The side effect is that the `Promise` object becomes \"resolved\".\n   - If `resolveFunc` is called first, the value passed will be [resolved](#resolver-function). The promise may stay pending (in case another [thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) is passed), become fulfilled (in most cases where a non-thenable value is passed), or become rejected (in case of an invalid resolution value).\n   - If `rejectFunc` is called first, the promise instantly becomes rejected.\n   - Once one of the resolving functions (`resolveFunc` or `rejectFunc`) is called, the promise stays resolved. Only the first call to `resolveFunc` or `rejectFunc` affects the promise's eventual state, and subsequent calls to either function can neither change the fulfillment value/rejection reason nor toggle its eventual state from \"fulfilled\" to \"rejected\" or opposite.\n   - If `executor` exits by throwing an error, then the promise is rejected. However, the error is ignored if one of the resolving functions has already been called (so that the promise is already resolved).\n   - Resolving the promise does not necessarily cause the promise to become fulfilled or rejected (i.e. settled). The promise may still be pending because it's resolved with another thenable, but its eventual state will match that of the resolved thenable.\n5. Once the promise settles, it (asynchronously) invokes any further handlers associated through [`Promise.prototype.then`](../../globals/Promise/prototype/then.mdx), [`Promise.prototype.catch`](../../globals/Promise/prototype/catch.mdx), or [`Promise.prototype.finally`](../../globals/Promise/prototype/finally.mdx). The eventual fulfillment value or rejection reason is passed to the invocation of fulfillment and rejection handlers as an input parameter (see [Chained Promises](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#chained_promises)).\n\nFor example, the callback-based `readFile` API above can be transformed into a promise-based one.\n\n```js\nconst readFilePromise = (path) =>\n  new Promise((resolve, reject) => {\n    readFile(path, (error, result) => {\n      if (error) {\n        reject(error);\n      } else {\n        resolve(result);\n      }\n    });\n  });\n\nreadFilePromise(\"./data.txt\")\n  .then((result) => console.log(result))\n  .catch((error) => console.error(\"Failed to read data\"));\n```\n\n### Resolver function\n\nThe resolver function `resolveFunc` has the following behaviors:\n\n- If it's called with the same value as the newly created promise (the promise it's \"tethered to\"), the promise is rejected with a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n- If it's called with a non-[thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) value (a primitive, or an object whose `then` property is not callable, including when the property is not present), the promise is immediately fulfilled with that value.\n- If it's called with a thenable value (including another `Promise` instance), then the thenable's `then` method is saved and called in the future (it's always called asynchronously). The `then` method will be called with two callbacks, which are two new functions with the exact same behaviors as the `resolveFunc` and `rejectFunc` passed to the `executor` function. If calling the `then` method throws, then the current promise is rejected with the thrown error.\n\nIn the last case, it means code like:\n\n```js\nnew Promise((resolve, reject) => {\n  resolve(thenable);\n});\n```\n\nIs roughly equivalent to:\n\n```js\nnew Promise((resolve, reject) => {\n  try {\n    thenable.then(\n      (value) => resolve(value),\n      (reason) => reject(reason),\n    );\n  } catch (e) {\n    reject(e);\n  }\n});\n```\n\nExcept that in the `resolve(thenable)` case:\n\n1. `resolve` is called synchronously, so that calling `resolve` or `reject` again has no effect, even when the handlers attached through `anotherPromise.then()` are not called yet.\n2. The `then` method is called asynchronously, so that the promise will never be instantly resolved if a thenable is passed.\n\nBecause `resolve` is called again with whatever `thenable.then()` passes to it as `value`, the resolver function is able to flatten nested thenables, where a thenable calls its `onFulfilled` handler with another thenable. The effect is that the fulfillment handler of a real promise will never receive a thenable as its fulfillment value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Promise/all.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.all()\n\nThe **`Promise.all()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise fulfills when all of the input's promises fulfill (including when an empty iterable is passed), with an array of the fulfillment values. It rejects when any of the input's promises rejects, with this first rejection reason.\n\n## Syntax\n\n```js\nPromise.all(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array` of promises.\n\n### Return value\n\nA `Promise` that is:\n\n- **Already fulfilled**, if the `iterable` passed is empty.\n- **Asynchronously fulfilled**, when all the promises in the given `iterable` fulfill. The fulfillment value is an array of fulfillment values, in the order of the promises passed, regardless of completion order. If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) fulfilled.\n- **Asynchronously rejected**, when any of the promises in the given `iterable` rejects. The rejection reason is the rejection reason of the first promise that was rejected.\n\n## Description\n\nThe `Promise.all()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. It can be useful for aggregating the results of multiple promises. It is typically used when there are multiple related asynchronous tasks that the overall code relies on to work successfully — all of whom we want to fulfill before the code execution continues.\n\n`Promise.all()` will reject immediately upon **any** of the input promises rejecting. In comparison, the promise returned by [`Promise.allSettled()`](../../globals/Promise/allSettled.mdx) will wait for all input promises to complete, regardless of whether or not one rejects. Use `allSettled()` if you need the final result of every promise in the input iterable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Promise/allSettled.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.allSettled()\n\nThe **`Promise.allSettled()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise fulfills when all of the input's promises settle (including when an empty iterable is passed), with an array of objects that describe the outcome of each promise.\n\n## Syntax\n\n```js\nPromise.allSettled(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array` of promises.\n\n### Return value\n\nA `Promise` that is:\n\n- **Already fulfilled**, if the `iterable` passed is empty.\n- **Asynchronously fulfilled**, when all promise in the given `iterable` have settled (either fulfilled or rejected). The fulfillment value is an array of objects, each describing the outcome of one promise in the `iterable`, in the order of the promises passed, regardless of completion order. Each outcome object has the following properties:\n\n  - `status`\n    - : A string, either `\"fulfilled\"` or `\"rejected\"`, indicating the eventual state of the promise.\n  - `value`\n    - : Only present if `status` is `\"fulfilled\"`. The value that the promise was fulfilled with.\n  - `reason`\n    - : Only present if `status` is `\"rejected\"`. The reason that the promise was rejected with.\n\n  If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) fulfilled.\n\n## Description\n\nThe `Promise.allSettled()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. `Promise.allSettled()` is typically used when you have multiple asynchronous tasks that are not dependent on one another to complete successfully, or you'd always like to know the result of each promise.\n\nIn comparison, the Promise returned by [`Promise.all()`](../../globals/Promise/all.mdx) may be more appropriate if the tasks are dependent on each other, or if you'd like to immediately reject upon any of them rejecting.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Promise/any.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.any()\n\nThe **`Promise.any()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise fulfills when any of the input's promises fulfills, with this first fulfillment value. It rejects when all of the input's promises reject (including when an empty iterable is passed), with an `AggregateError` containing an array of rejection reasons.\n\n## Syntax\n\n```js\nPromise.any(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array` of promises.\n\n### Return value\n\nA `Promise` that is:\n\n- **Already rejected**, if the `iterable` passed is empty.\n- **Asynchronously fulfilled**, when any of the promises in the given `iterable` fulfills. The fulfillment value is the fulfillment value of the first promise that was fulfilled.\n- **Asynchronously rejected**, when all of the promises in the given `iterable` reject. The rejection reason is an `AggregateError` containing an array of rejection reasons in its `errors` property. The errors are in the order of the promises passed, regardless of completion order. If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) rejected.\n\n## Description\n\nThe `Promise.any()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. This method is useful for returning the first promise that fulfills. It short-circuits after a promise fulfills, so it does not wait for the other promises to complete once it finds one.\n\nUnlike [`Promise.all()`](../../globals/Promise/all.mdx), which returns an _array_ of fulfillment values, we only get one fulfillment value (assuming at least one promise fulfills). This can be beneficial if we need only one promise to fulfill but we do not care which one does. Note another difference: this method rejects upon receiving an _empty iterable_, since, truthfully, the iterable contains no items that fulfill. You may compare `Promise.any()` and `Promise.all()` with [`Array.prototype.some()`](../../globals/Array/prototype/some.mdx) and [`Array.prototype.every()`](../../globals/Array/prototype/every.mdx).\n\nAlso, unlike [`Promise.race()`](../../globals/Promise/race.mdx), which returns the first _settled_ value (either fulfillment or rejection), this method returns the first _fulfilled_ value. This method ignores all rejected promises up until the first promise that fulfills.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Promise/prototype/catch.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.prototype.catch()\n\nThe **`catch()`** method of a `Promise` object schedules a function to be called when the promise is rejected. It immediately returns an equivalent `Promise` object, allowing you to [chain](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining) calls to other promise methods. It is a shortcut for [`Promise.prototype.then(undefined, onRejected)`](../../../globals/Promise/prototype/then.mdx).\n\n## Syntax\n\n```js\ncatch(onRejected)\n\ncatch((reason) => {\n  // rejection handler\n})\n```\n\n### Parameters\n\n- `onRejected`\n  - : A `Function` called when the `Promise` is rejected. This function has one parameter: the _rejection reason_.\n\n### Return value\n\nReturns a new `Promise`. This new promise is always pending when returned, regardless of the current promise's status. It's eventually rejected if `onRejected` throws an error or returns a Promise which is itself rejected; otherwise, it's eventually fulfilled.\n\n## Description\n\nThe `catch` method is used for error handling in promise composition. Since it returns a `Promise`, it [can be chained](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining_after_a_catch) in the same way as its sister method, [`Promise.prototype.then()`](../../../globals/Promise/prototype/then.mdx).\n\nIf a promise becomes rejected, and there are no rejection handlers to call (a handler can be attached through any of [`Promise.prototype.then`](../../../globals/Promise/prototype/then.mdx), [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx), or [`Promise.prototype.finally`](../../../globals/Promise/prototype/finally.mdx)), then the rejection event is surfaced by the host. In the browser, this results in an [`unhandledrejection`](https://developer.mozilla.org/docs/Web/API/Window/unhandledrejection_event) event. If a handler is attached to a rejected promise whose rejection has already caused an unhandled rejection event, then another [`rejectionhandled`](https://developer.mozilla.org/docs/Web/API/Window/rejectionhandled_event) event is fired.\n\n`catch()` internally calls `then()` on the object upon which it was called, passing `undefined` and `onRejected` as arguments. The value of that call is directly returned. This is observable if you wrap the methods.\n\n```js\n// overriding original Promise.prototype.then/catch just to add some logs\n((Promise) => {\n  const originalThen = Promise.prototype.then;\n  const originalCatch = Promise.prototype.catch;\n\n  Promise.prototype.then = function (...args) {\n    console.log(\"Called .then on %o with arguments: %o\", this, args);\n    return originalThen.apply(this, args);\n  };\n  Promise.prototype.catch = function (...args) {\n    console.error(\"Called .catch on %o with arguments: %o\", this, args);\n    return originalCatch.apply(this, args);\n  };\n})(Promise);\n\n// calling catch on an already resolved promise\nPromise.resolve().catch(function XXX() {});\n\n// Logs:\n// Called .catch on Promise{} with arguments: Arguments{1} [0: function XXX()]\n// Called .then on Promise{} with arguments: Arguments{2} [0: undefined, 1: function XXX()]\n```\n\nThis means that passing `undefined` still causes the returned promise to be rejected, and you have to pass a function to prevent the final promise from being rejected.\n\nBecause `catch()` just calls `then()`, it supports subclassing.\n\n> **Note:** The examples below are throwing instances of [`Error`](../../../globals/Error/Error.mdx). As with synchronous [`throw`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/throw) statements, this is considered a good practice; otherwise, the part doing the catching would have to perform checks to see if the argument was a string or an error, and you might lose valuable information such as stack traces.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Promise/prototype/finally.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.prototype.finally()\n\nThe **`finally()`** method of a `Promise` object schedules a function to be called when the promise is settled (either fulfilled or rejected). It immediately returns an equivalent `Promise` object, allowing you to [chain](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining) calls to other promise methods.\n\nThis lets you avoid duplicating code in both the promise's [`Promise.prototype.then`](../../../globals/Promise/prototype/then.mdx) and [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx) handlers.\n\n## Syntax\n\n```js\nfinally(onFinally)\n\nfinally(() => {\n  // Code that will run after promise is settled (fulfilled or rejected)\n})\n```\n\n### Parameters\n\n- `onFinally`\n  - : A `Function` called when the `Promise` is settled. This handler receives no parameters.\n\n### Return value\n\nReturns an equivalent `Promise`. If the handler throws an error or returns a rejected promise, the promise returned by `finally()` will be rejected with that value instead. Otherwise, the return value of the handler does not affect the state of the original promise.\n\n## Description\n\nThe `finally()` method can be useful if you want to do some processing or cleanup once the promise is settled, regardless of its outcome.\n\nThe `finally()` method is very similar to calling [`then(onFinally, onFinally)`](../../../globals/Promise/prototype/then.mdx). However, there are a couple of differences:\n\n- When creating a function inline, you can pass it once, instead of being forced to either declare it twice, or create a variable for it.\n- The `onFinally` callback does not receive any argument. This use case is for precisely when you _do not care_ about the rejection reason or the fulfillment value, and so there's no need to provide it.\n- A `finally()` call is usually transparent and does not change the eventual state of the original promise. So for example:\n  - Unlike `Promise.resolve(2).then(() => 77, () => {})`, which returns a promise eventually fulfilled with the value `77`, `Promise.resolve(2).finally(() => 77)` returns a promise eventually fulfilled with the value `2`.\n  - Similarly, unlike `Promise.reject(3).then(() => {}, () => 88)`, which returns a promise eventually fulfilled with the value `88`, `Promise.reject(3).finally(() => 88)` returns a promise eventually rejected with the reason `3`.\n\n> **Note:** A `throw` (or returning a rejected promise) in the `finally` callback still rejects the returned promise. For example, both `Promise.reject(3).finally(() => { throw 99; })` and `Promise.reject(3).finally(() => Promise.reject(99))` reject the returned promise with the reason `99`.\n\nLike [`Promise.prototype.catch()`](../../../globals/Promise/prototype/catch.mdx), `finally()` internally calls the `then` method on the object upon which it was called. If `onFinally` is not a function, `then()` is called with `onFinally` as both arguments — which, for [`Promise.prototype.then()`](../../../globals/Promise/prototype/then.mdx), means that no useful handler is attached. Otherwise, `then()` is called with two internally created functions, which behave like the following:\n\n> **Warning:** This is only for demonstration purposes and is not a polyfill.\n\n```js\npromise.then(\n  (value) => Promise.resolve(onFinally()).then(() => value),\n  (reason) =>\n    Promise.resolve(onFinally()).then(() => {\n      throw reason;\n    }),\n);\n```\n\nBecause `finally()` calls `then()`, it supports subclassing. Moreover, notice the [`Promise.resolve()`](../../../globals/Promise/resolve.mdx) call above — in reality, `onFinally()`'s return value is resolved using the same algorithm as `Promise.resolve()`, but the actual constructor used to construct the resolved promise will be the subclass. `finally()` gets this constructor through [`promise.constructor[Symbol.species]`](../../../globals/Promise/@@species.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Promise/prototype/then.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.prototype.then()\n\nThe **`then()`** method of a `Promise` object takes up to two arguments: callback functions for the fulfilled and rejected cases of the `Promise`. It immediately returns an equivalent `Promise` object, allowing you to [chain](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining) calls to other promise methods.\n\n## Syntax\n\n```js\nthen(onFulfilled)\nthen(onFulfilled, onRejected)\n\nthen(\n  (value) => { /* fulfillment handler */ },\n  (reason) => { /* rejection handler */ },\n)\n```\n\n### Parameters\n\n- `onFulfilled` _**optional**_\n  - : A `Function` asynchronously called if the `Promise` is fulfilled. This function has one parameter, the _fulfillment value_. If it is not a function, it is internally replaced with an _identity_ function (`(x) => x`) which simply passes the fulfillment value forward.\n- `onRejected` _**optional**_\n  - : A `Function` asynchronously called if the `Promise` is rejected. This function has one parameter, the _rejection reason_. If it is not a function, it is internally replaced with a _thrower_ function (`(x) => { throw x; }`) which throws the rejection reason it received.\n\n### Return value\n\nReturns a new `Promise` immediately. This new promise is always pending when returned, regardless of the current promise's status.\n\nOne of the `onFulfilled` and `onRejected` handlers will be executed to handle the current promise's fulfillment or rejection. The call always happens asynchronously, even when the current promise is already settled. The behavior of the returned promise (call it `p`) depends on the handler's execution result, following a specific set of rules. If the handler function:\n\n- returns a value: `p` gets fulfilled with the returned value as its value.\n- doesn't return anything: `p` gets fulfilled with `undefined`.\n- throws an error: `p` gets rejected with the thrown error as its value.\n- returns an already fulfilled promise: `p` gets fulfilled with that promise's value as its value.\n- returns an already rejected promise: `p` gets rejected with that promise's value as its value.\n- returns another pending promise: the fulfillment/rejection of the promise returned by `then` will be subsequent to the resolution/rejection of the promise returned by the handler. Also, the resolved value of the promise returned by `then` will be the same as the resolved value of the promise returned by the handler.\n\n## Description\n\nThe `then()` method schedules callback functions for the eventual completion of a Promise — either fulfillment or rejection. It is the primitive method of promises: the [thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) protocol expects all promise-like objects to expose a `then()` method, and the [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx) and [`Promise.prototype.finally`](../../../globals/Promise/prototype/finally.mdx) methods both work by invoking the object's `then()` method.\n\nFor more information about the `onRejected` handler, see the [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx) reference.\n\n`then()` returns a new promise object. If you call the `then()` method twice on the same promise object (instead of chaining), then this promise object will have two pairs of settlement handlers. All handlers attached to the same promise object are always called in the order they were added. Moreover, the two promises returned by each call of `then()` start separate chains and do not wait for each other's settlement.\n\n[Thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) objects that arise along the `then()` chain are always [resolved](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise/Promise#the_resolver_function) — the `onFulfilled` handler never receives a thenable object, and any thenable returned by either handler are always resolved before being passed to the next handler. This is because when constructing the new promise, the `resolve` and `reject` functions passed by the `executor` are saved, and when the current promise settles, the respective function will be called with the fulfillment value or rejection reason. The resolving logic comes from the resolver function passed by the [`Promise()`](../../../globals/Promise/Promise.mdx) constructor.\n\n`then()` supports subclassing, which means it can be called on instances of subclasses of `Promise`, and the result will be a promise of the subclass type. You can customize the type of the return value through the [`[Symbol.species]`](../../../globals/Promise/@@species.mdx) property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Promise/race.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.race()\n\nThe **`Promise.race()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise settles with the eventual state of the first promise that settles.\n\n## Syntax\n\n```js\nPromise.race(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array`) of promises.\n\n### Return value\n\nA `Promise` that **asynchronously settles** with the eventual state of the first promise in the `iterable` to settle. In other words, it fulfills if the first promise to settle is fulfilled, and rejects if the first promise to settle is rejected. The returned promise remains pending forever if the `iterable` passed is empty. If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) settled.\n\n## Description\n\nThe `Promise.race()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. It's useful when you want the first async task to complete, but do not care about its eventual state (i.e. it can either succeed or fail).\n\nIf the iterable contains one or more non-promise values and/or an already settled promise, then `Promise.race()` will settle to the first of these values found in the iterable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Promise/reject.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.reject()\n\nThe **`Promise.reject()`** method returns a `Promise` object that is rejected with a given reason.\n\n## Syntax\n\n```js\nPromise.reject(reason)\n```\n\n### Parameters\n\n- `reason`\n  - : Reason why this `Promise` rejected.\n\n### Return value\n\nA `Promise` that is rejected with the given reason.\n\n## Description\n\nThe static `Promise.reject` function returns a `Promise` that is rejected. For debugging purposes and selective error catching, it is useful to make `reason` an `instanceof` [`Error`](../../globals/Error/Error.mdx).\n\n`Promise.reject()` is generic and supports subclassing, which means it can be called on subclasses of `Promise`, and the result will be a promise of the subclass type. To do so, the subclass's constructor must implement the same signature as the [`Promise()`](../../globals/Promise/Promise.mdx) constructor — accepting a single `executor` function that can be called with the `resolve` and `reject` callbacks as parameters. `Promise.reject()` is essentially a shorthand for `new Promise((resolve, reject) => reject(reason))`.\n\nUnlike [`Promise.resolve()`](../../globals/Promise/resolve.mdx), `Promise.reject()` always wraps `reason` in a new `Promise` object, even when `reason` is already a `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Promise/resolve.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.resolve()\n\nThe **`Promise.resolve()`** method \"resolves\" a given value to a `Promise`. If the value is a promise, that promise is returned; if the value is a [thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables), `Promise.resolve()` will call the `then()` method with two callbacks it prepared; otherwise the returned promise will be fulfilled with the value.\n\nThis function flattens nested layers of promise-like objects (e.g. a promise that fulfills to a promise that fulfills to something) into a single layer — a promise that fulfills to a non-thenable value.\n\n## Syntax\n\n```js\nPromise.resolve(value)\n```\n\n### Parameters\n\n- `value`\n  - : Argument to be resolved by this `Promise`. Can also be a `Promise` or a thenable to resolve.\n\n### Return value\n\nA `Promise` that is resolved with the given value, or the promise passed as value, if the value was a promise object. A resolved promise can be in any of the states — fulfilled, rejected, or pending. For example, resolving a rejected promise will still result in a rejected promise.\n\n## Description\n\n`Promise.resolve()` _resolves_ a promise, which is not the same as fulfilling or rejecting the promise. See [Promise description](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#description) for definitions of the terminology. In brief, `Promise.resolve()` returns a promise whose eventual state depends on another promise, thenable object, or other value.\n\n`Promise.resolve()` is generic and supports subclassing, which means it can be called on subclasses of `Promise`, and the result will be a promise of the subclass type. To do so, the subclass's constructor must implement the same signature as the [`Promise()`](../../globals/Promise/Promise.mdx) constructor — accepting a single `executor` function that can be called with the `resolve` and `reject` callbacks as parameters.\n\n`Promise.resolve()` special-cases native `Promise` instances. If `value` belongs to `Promise` or a subclass, and `value.constructor === Promise`, then `value` is directly returned by `Promise.resolve()`, without creating a new `Promise` instance. Otherwise, `Promise.resolve()` is essentially a shorthand for `new Promise((resolve) => resolve(value))`.\n\nThe bulk of the resolving logic is actually implemented by the [resolver function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise/Promise#the_resolver_function) passed by the `Promise()` constructor. In summary:\n\n- If a non-[thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) value is passed, the returned promise is already fulfilled with that value.\n- If a thenable is passed, the returned promise will adopt the state of that thenable by calling the `then` method and passing a pair of resolving functions as arguments. (But because native promises directly pass through `Promise.resolve()` without creating a wrapper, the `then` method is not called on native promises.) If the resolver function receives another thenable object, it will be resolved agin, so that the eventual fulfillment value of the promise will never be thenable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Proxy/Proxy.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Proxy()\n\nThe **`Proxy()`** constructor is used to create `Proxy` objects.\n\n## Syntax\n\n```js\nnew Proxy(target, handler)\n```\n\n> **Note:** `Proxy()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `target`\n  - : A target object to wrap with `Proxy`. It can be any sort of object,\n    including a native array, a function, or even another proxy.\n- `handler`\n  - : An object whose properties are functions that define the behavior of the proxy when\n    an operation is performed on it.\n\n## Description\n\nUse the `Proxy()` constructor to create a new `Proxy` object.\nThis constructor takes two mandatory arguments:\n\n- `target` is the object for which you want to create the proxy\n- `handler` is the object that defines the custom behavior of the proxy.\n\nAn empty handler will create a proxy that behaves, in almost all respects, exactly like\nthe target. By defining any of a set group of functions on the `handler`\nobject, you can customize specific aspects of the proxy's behavior. For example, by\ndefining `get()` you can provide a customized version of the target's\n[property accessor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Property_Accessors).\n\n### Handler functions\n\nThis section lists all the handler functions you can define. Handler functions are\nsometimes called _traps_, because they trap calls to the underlying target\nobject.\n\n- [`handler.apply()`](../../globals/Proxy/proxy/apply.mdx)\n  - : A trap for a function call.\n- [`handler.construct()`](../../globals/Proxy/proxy/construct.mdx)\n  - : A trap for the `new` operator.\n- [`handler.defineProperty()`](../../globals/Proxy/proxy/defineProperty.mdx)\n  - : A trap for [`Object.defineProperty`](../../globals/Object/defineProperty.mdx).\n- [`handler.deleteProperty()`](../../globals/Proxy/proxy/deleteProperty.mdx)\n  - : A trap for the `delete` operator.\n- [`handler.get()`](../../globals/Proxy/proxy/get.mdx)\n  - : A trap for getting property values.\n- [`handler.getOwnPropertyDescriptor()`)}](../../globals/Proxy/proxy/getOwnPropertyDescriptor.mdx)\n  - : A trap for [`Object.getOwnPropertyDescriptor`](../../globals/Object/getOwnPropertyDescriptor.mdx).\n- [`handler.getPrototypeOf()`](../../globals/Proxy/proxy/getPrototypeOf.mdx)\n  - : A trap for [`Object.getPrototypeOf()`](../../globals/Object/getPrototypeOf.mdx).\n- [`handler.has()`](../../globals/Proxy/proxy/has.mdx)\n  - : A trap for the `in` operator.\n- [`handler.isExtensible()`](../../globals/Proxy/proxy/isExtensible.mdx)\n  - : A trap for [`Object.isExtensible()`](../../globals/Object/isExtensible.mdx).\n- [`handler.ownKeys()`](../../globals/Proxy/proxy/ownKeys.mdx)\n  - : A trap for [`Object.getOwnPropertyNames()`](../../globals/Object/getOwnPropertyNames.mdx) and\n    [`Object.getOwnPropertySymbols()`](../../globals/Object/getOwnPropertySymbols.mdx).\n- [`handler.preventExtensions()`)}](../../globals/Proxy/proxy/preventExtensions.mdx)\n  - : A trap for [`Object.preventExtensions()`](../../globals/Object/preventExtensions.mdx).\n- [`handler.set()`](../../globals/Proxy/proxy/set.mdx)\n  - : A trap for setting property values.\n- [`handler.setPrototypeOf()`](../../globals/Proxy/proxy/setPrototypeOf.mdx)\n  - : A trap for [`Object.setPrototypeOf()`](../../globals/Object/setPrototypeOf.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Proxy/proxy/apply.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.apply()\n\nThe **`handler.apply()`** method is a trap for a function call.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  apply(target, thisArg, argumentsList) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `apply()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target callable object.\n- `thisArg`\n  - : The `this` argument for the call.\n- `argumentsList`\n  - : The list of arguments for the call.\n\n### Return value\n\nThe `apply()` method can return any value.\n\n## Description\n\nThe **`handler.apply()`** method is a trap for a function call.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- Function call: `proxy(...args)`\n- [`Function.prototype.apply()`](../../../globals/Function/prototype/apply.mdx) and [`Function.prototype.call()`](../../../globals/Function/prototype/call.mdx)\n- [`Reflect.apply()`](../../../globals/Reflect/apply.mdx)\n\nOr any other operation that invokes the `[[Call]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The `target` must be a callable itself. That is, it must be a function object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Proxy/proxy/construct.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.construct()\n\nThe **`handler.construct()`** method is a trap for the `new` operator. In order for the new operation to be valid on the resulting Proxy object, the target used to initialize the proxy must itself have a `[[Construct]]` internal method (i.e. `new target` must be valid).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  construct(target, argumentsList, newTarget) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `construct()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `argumentsList`\n  - : The list of arguments for the constructor.\n- `newTarget`\n  - : The constructor that was originally called, `p` above.\n\n### Return value\n\nThe `construct` method must return an object.\n\n## Description\n\nThe **`handler.construct()`** method is a trap for the `new` operator.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- The `new` operator: `new myFunction(...args)`\n- [`Reflect.construct()`](../../../globals/Reflect/construct.mdx)\n\nOr any other operation that invokes the `[[Construct]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The result must be an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Proxy/proxy/defineProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.defineProperty()\n\nThe **`handler.defineProperty()`** method is a trap for\n[`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  defineProperty(target, property, descriptor) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `defineProperty()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property whose description is to be\n    retrieved.\n- `descriptor`\n  - : The descriptor for the property being defined or modified.\n\n### Return value\n\nThe `defineProperty()` method must return a `Boolean` indicating\nwhether or not the property has been successfully defined.\n\n## Description\n\nThe **`handler.defineProperty()`** method is a trap for\n[`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx), [`Object.defineProperties()`](../../../globals/Object/defineProperties.mdx)\n- [`Reflect.defineProperty()`](../../../globals/Reflect/defineProperty.mdx)\n\nOr any other operation that invokes the `[[DefineOwnProperty]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- A property cannot be added, if the target object is not extensible.\n- A property cannot be added as or modified to be non-configurable, if it does not\n  exists as a non-configurable own property of the target object.\n- A property may not be non-configurable, if a corresponding configurable property of\n  the target object exists.\n- If a property has a corresponding target object property then\n  `Object.defineProperty(target, prop, descriptor)`\n  will not throw an exception.\n- In strict mode, a `false` return value from the\n  `defineProperty()` handler will throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Proxy/proxy/deleteProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.deleteProperty()\n\nThe **`handler.deleteProperty()`** method is a trap for the `delete` operator.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  deleteProperty(target, property) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `deleteProperty()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property to delete.\n\n### Return value\n\nThe `deleteProperty()` method must return a `Boolean` indicating\nwhether or not the property has been successfully deleted.\n\n## Description\n\nThe **`handler.deleteProperty()`** method is a trap for the `delete` operator.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- The [`delete`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) operator: `delete proxy[foo]` and\n  `delete proxy.foo`\n- [`Reflect.deleteProperty()`](../../../globals/Reflect/deleteProperty.mdx)\n\nOr any other operation that invokes the `[[Delete]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- A property cannot be deleted, if it exists as a non-configurable own property of the\n  target object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Proxy/proxy/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.get()\n\nThe **`handler.get()`** method is a trap for getting a property\nvalue.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  get(target, property, receiver) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `get()` method. `this`\nis bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property to get.\n- `receiver`\n  - : Either the proxy or an object that inherits from the proxy.\n\n### Return value\n\nThe `get()` method can return any value.\n\n## Description\n\nThe **`handler.get()`** method is a trap for getting a property\nvalue.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- Property access: `proxy[foo]` and `proxy.bar`\n- [`Reflect.get()`](../../../globals/Reflect/get.mdx)\n\nOr any other operation that invokes the `[[Get]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The value reported for a property must be the same as the value of the corresponding\n  target object property if the target object property is a non-writable,\n  non-configurable own data property.\n- The value reported for a property must be undefined if the corresponding target\n  object property is a non-configurable own accessor property that has\n  `undefined` as its `[[Get]]` attribute.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Proxy/proxy/getOwnPropertyDescriptor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.getOwnPropertyDescriptor()\n\nThe **`handler.getOwnPropertyDescriptor()`** method is a trap for [`Object.getOwnPropertyDescriptor()`](../../../globals/Object/getOwnPropertyDescriptor.mdx).\n\n\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  getOwnPropertyDescriptor(target, prop) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `getOwnPropertyDescriptor()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `prop`\n  - : The name of the property whose description should be retrieved.\n\n### Return value\n\nThe `getOwnPropertyDescriptor()` method must return an object or `undefined`.\n\n## Description\n\nThe **`handler.getOwnPropertyDescriptor()`** method is a trap for [`Object.getOwnPropertyDescriptor()`](../../../globals/Object/getOwnPropertyDescriptor.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.getOwnPropertyDescriptor()`](../../../globals/Object/getOwnPropertyDescriptor.mdx)\n- [`Reflect.getOwnPropertyDescriptor()`](../../../globals/Reflect/getOwnPropertyDescriptor.mdx)\n\nOr any other operation that invokes the `[[GetOwnProperty]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `getOwnPropertyDescriptor()` must return an object or `undefined`.\n- A property cannot be reported as non-existent, if it exists as a non-configurable own property of the target object.\n- A property cannot be reported as non-existent, if it exists as an own property of the target object and the target object is not extensible.\n- A property cannot be reported as existent, if it does not exists as an own property of the target object and the target object is not extensible.\n- A property cannot be reported as non-configurable, if it does not exists as an own property of the target object or if it exists as a configurable own property of the target object.\n- The result of `Object.getOwnPropertyDescriptor(target)` can be applied to the target object using `Object.defineProperty()` and will not throw an exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Proxy/proxy/getPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.getPrototypeOf()\n\nThe **`handler.getPrototypeOf()`** method is a trap for the\n`[[GetPrototypeOf]]` internal method.\n\n## Syntax\n\n```js\nnew Proxy(obj, {\n  getPrototypeOf(target) {\n    // …\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `getPrototypeOf()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `getPrototypeOf()` method must return an object or `null`.\n\n## Description\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.getPrototypeOf()`](../../../globals/Object/getPrototypeOf.mdx)\n- [`Reflect.getPrototypeOf()`](../../../globals/Reflect/getPrototypeOf.mdx)\n- [`Object.prototype.isPrototypeOf()`](../../../globals/Object/prototype/isPrototypeOf.mdx)\n- `instanceof`\n\nOr any other operation that invokes the `[[GetPrototypeOf]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `getPrototypeOf()` method must return an object or `null`.\n- If `target` is not extensible,\n  `Object.getPrototypeOf(proxy)` method must return the same\n  value as `Object.getPrototypeOf(target)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Proxy/proxy/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.has()\n\nThe **`handler.has()`** method is a trap for the `in` operator.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  has(target, prop) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to `has()` method. `this` is\nbound to the handler.\n\n- `target`\n  - : The target object.\n- `prop`\n  - : The name or `Symbol` of the property to check for existence.\n\n### Return value\n\nThe `has()` method must return a boolean value.\n\n## Description\n\nThe **`handler.has()`** method is a trap for the `in` operator.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- The [`in`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/in) operator: `foo in proxy`\n- [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) check: `with(proxy) { (foo); }`\n- [`Reflect.has()`](../../../globals/Reflect/has.mdx)\n\nOr any other operation that invokes the `[[HasProperty]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- A property cannot be reported as non-existent, if it exists as a non-configurable\n  own property of the target object.\n- A property cannot be reported as non-existent, if it exists as an own property of\n  the target object and the target object is not extensible.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Proxy/proxy/isExtensible.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.isExtensible()\n\nThe **`handler.isExtensible()`** method is a trap for\n[`Object.isExtensible()`](../../../globals/Object/isExtensible.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  isExtensible(target) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `isExtensible()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `isExtensible()` method must return a boolean value.\n\n## Description\n\nThe **`handler.isExtensible()`** method is a trap for\n[`Object.isExtensible()`](../../../globals/Object/isExtensible.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.isExtensible()`](../../../globals/Object/isExtensible.mdx)\n- [`Reflect.isExtensible()`](../../../globals/Reflect/isExtensible.mdx)\n\nOr any other operation that invokes the `[[IsExtensible]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `Object.isExtensible(proxy)` must return the same value as\n  `Object.isExtensible(target)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Proxy/proxy/ownKeys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.ownKeys()\n\nThe **`handler.ownKeys()`** method is a trap for\n[`Reflect.ownKeys()`](../../../globals/Reflect/ownKeys.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  ownKeys(target) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `ownKeys()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `ownKeys()` method must return an enumerable object.\n\n## Description\n\nThe **`handler.ownKeys()`** method is a trap for\n[`Reflect.ownKeys()`](../../../globals/Reflect/ownKeys.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.getOwnPropertyNames()`](../../../globals/Object/getOwnPropertyNames.mdx)\n- [`Object.getOwnPropertySymbols()`](../../../globals/Object/getOwnPropertySymbols.mdx)\n- [`Object.keys()`](../../../globals/Object/keys.mdx)\n- [`Reflect.ownKeys()`](../../../globals/Reflect/ownKeys.mdx)\n\nOr any other operation that invokes the `[[OwnPropertyKeys]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The result of `ownKeys()` must be an array.\n- The type of each array element is either a `String` or a `Symbol`.\n- The result List must contain the keys of all non-configurable own properties of the\n  target object.\n- If the target object is not extensible, then the result List must contain all the\n  keys of the own properties of the target object and no other values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Proxy/proxy/preventExtensions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.preventExtensions()\n\nThe **`handler.preventExtensions()`** method is a trap for [`Object.preventExtensions()`](../../../globals/Object/preventExtensions.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  preventExtensions(target) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `preventExtensions()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `preventExtensions()` method must return a boolean value.\n\n## Description\n\nThe **`handler.preventExtensions()`** method is a trap for [`Object.preventExtensions()`](../../../globals/Object/preventExtensions.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.preventExtensions()`](../../../globals/Object/preventExtensions.mdx)\n- [`Reflect.preventExtensions()`](../../../globals/Reflect/preventExtensions.mdx)\n- [`Object.seal()`](../../../globals/Object/seal.mdx)\n- [`Object.freeze()`](../../../globals/Object/freeze.mdx)\n\nOr any other operation that invokes the `[[PreventExtensions]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `Object.preventExtensions(proxy)` only returns `true` if `Object.isExtensible(proxy)` is `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Proxy/proxy/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.set()\n\nThe **`handler.set()`** method is a trap for setting a property\nvalue.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  set(target, property, value, receiver) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `set()` method. `this`\nis bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property to set.\n- `value`\n  - : The new value of the property to set.\n- `receiver`\n\n  - : The object to which the assignment was originally directed. This is usually the\n    proxy itself. But a `set()` handler can also be called indirectly, via\n    the prototype chain or various other ways.\n\n    For example, suppose a script does\n    `obj.name = \"jen\"`, and `obj` is not a\n    proxy, and has no own property `.name`, but it has a proxy on its\n    prototype chain. That proxy's `set()` handler will be called, and\n    `obj` will be passed as the receiver.\n\n### Return value\n\nThe `set()` method should return a boolean value.\n\n- Return `true` to indicate that assignment succeeded.\n- If the `set()` method returns `false`, and the assignment\n  happened in strict-mode code, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) will be thrown.\n\n## Description\n\nThe **`handler.set()`** method is a trap for setting property\nvalue.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- Property assignment: `proxy[foo] = bar` and `proxy.foo = bar`\n- [`Reflect.set()`](../../../globals/Reflect/set.mdx)\n\nOr any other operation that invokes the `[[Set]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- Cannot change the value of a property to be different from the value of the\n  corresponding target object property if the corresponding target object property is a\n  non-writable, non-configurable data property.\n- Cannot set the value of a property if the corresponding target object property is a\n  non-configurable accessor property that has `undefined` as its\n  `[[Set]]` attribute.\n- In strict mode, a `false` return value from the `set()`\n  handler will throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Proxy/proxy/setPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.setPrototypeOf()\n\nThe **`handler.setPrototypeOf()`** method is a trap for\n[`Object.setPrototypeOf()`](../../../globals/Object/setPrototypeOf.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  setPrototypeOf(target, prototype) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `setPrototypeOf()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `prototype`\n  - : The object's new prototype or `null`.\n\n### Return value\n\nThe `setPrototypeOf()` method returns `true` if the\n`[[Prototype]]` was successfully changed, otherwise `false`.\n\n## Description\n\nThe **`handler.setPrototypeOf()`** method is a trap for\n[`Object.setPrototypeOf()`](../../../globals/Object/setPrototypeOf.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.setPrototypeOf()`](../../../globals/Object/setPrototypeOf.mdx)\n- [`Reflect.setPrototypeOf()`](../../../globals/Reflect/setPrototypeOf.mdx)\n\nOr any other operation that invokes the `[[SetPrototypeOf]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- If `target` is not extensible, the `prototype`\n  parameter must be the same value as\n  `Object.getPrototypeOf(target)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Proxy/revocable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Proxy.revocable()\n\nThe **`Proxy.revocable()`** static method creates a revocable `Proxy` object.\n\n## Syntax\n\n```js\nProxy.revocable(target, handler)\n```\n\n### Parameters\n\n- `target`\n  - : A target object to wrap with `Proxy`. It can be any sort of object, including a native array, a function, or even another proxy.\n- `handler`\n  - : An object whose properties are functions defining the behavior of `proxy` when an operation is performed on it.\n\n### Return value\n\nA plain object with the following two properties:\n\n- `proxy`\n  - : A Proxy object exactly the same as one created with a [`new Proxy(target, handler)`](../../globals/Proxy/Proxy.mdx) call.\n- `revoke`\n  - : A function with no parameters to revoke (switch off) the `proxy`.\n\n## Description\n\nThe `Proxy.revocable()` factory function is the same as the [`Proxy()`](../../globals/Proxy/Proxy.mdx) constructor, except that in addition to creating a proxy object, it also creates a `revoke` function that can be called to disable the proxy. The proxy object and the `revoke` function are wrapped in a plain object.\n\nThe `revoke` function does not take any parameters, nor does it rely on the `this` value. The created `proxy` object is attached to the `revoke` function as a [private property](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/Private_class_fields) that the `revoke` function accesses on itself when called (the existence of the private property is not observable from the outside, but it has implications on how garbage collection happens). The `proxy` object is _not_ captured within the [closure](https://developer.mozilla.org/docs/Web/JavaScript/Closures) of the `revoke` function (which will make garbage collection of `proxy` impossible if `revoke` is still alive).\n\nAfter the `revoke()` function gets called, the proxy becomes unusable: any trap to a handler throws a [`TypeError`](../../globals/TypeError/TypeError.mdx). Once a proxy is revoked, it remains revoked, and calling `revoke()` again has no effect — in fact, the call to `revoke()` detaches the `proxy` object from the `revoke` function, so the `revoke` function will not be able to access the proxy again at all. If the proxy is not referenced elsewhere, it will then be eligible for garbage collection. The `revoke` function also detaches `target` and `handler` from the `proxy`, so if `target` is not referenced elsewhere, it will also be eligible for garbage collection, even when its proxy is still alive, since there's no longer a way to meaningfully interact with the target object.\n\nLetting users interact with an object through a revocable proxy allows you to [control the lifetime](https://developer.mozilla.org/docs/Web/JavaScript/Memory_Management) of the object exposed to the user — you can make the object garbage-collectable even when the user is still holding a reference to its proxy.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/RangeError/RangeError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RangeError\n\nThe **`RangeError()`** constructor creates an error\nwhen a value is not in the set or range of allowed values.\n\n## Syntax\n\n```js\nnew RangeError()\nnew RangeError(message)\nnew RangeError(message, options)\nnew RangeError(message, fileName)\nnew RangeError(message, fileName, lineNumber)\n\nRangeError()\nRangeError(message)\nRangeError(message, options)\nRangeError(message, fileName)\nRangeError(message, fileName, lineNumber)\n```\n\n> **Note:** `RangeError()` can be called with or without `new`. Both create a new `RangeError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/ReadableByteStreamController/prototype/byobRequest.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# byobRequest\n\nThe **`byobRequest`** read-only property of the `ReadableByteStreamController` interface returns the current BYOB request, or `null` if there are no pending requests.\n\nAn underlying byte source should check this property, and use it to write data to the stream if it exists (rather than using `ReadableByteStreamController.enqueue()`).\nThis will result in an efficient zero-byte transfer of the data to the consumer.\n\n## Value\n\nA `ReadableStreamBYOBRequest` object instance, or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/ReadableByteStreamController/prototype/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# close()\n\nThe **`close()`** method of the `ReadableByteStreamController` interface closes the associated stream.\n\nThis might be called by the underlying source when its data source has been exhausted/completed.\n\n> **Note:** Readers will still be able to read any previously-enqueued chunks from the stream, but once those are read, the stream will become closed.\n> However if there is an outstanding and partially written `byobRequest` when `close()` is called, the stream will be errored.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableByteStreamController`, it is already closed, or the stream is not readable for some other reason.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/ReadableByteStreamController/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# desiredSize\n\nThe **`desiredSize`** read-only property of the`ReadableByteStreamController` interface returns the number of bytes required to fill the stream's internal queue to its \"desired size\".\n\nThe value is used by the stream to indicate a preferred flow rate to the underlying source.\nSources that support throttling or pausing their inflow of data (not all do!) should control the inflow such that `desiredSize` of the stream buffer is kept positive and as close to zero as possible.\n\nThe `desiredSize` is used to apply backpressure from downstream consumers.\n\n## Value\n\nAn integer. Note that this can be negative if the queue is over-full.\n\nThe value will be `null` if the stream has errored and `0` if it is closed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/ReadableByteStreamController/prototype/enqueue.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# enqueue()\n\nThe **`enqueue()`** method of the `ReadableByteStreamController` interface enqueues a given chunk on the associated readable byte stream (the chunk is copied into the stream's internal queues).\n\nThis should only be used to transfer data to the queue when `byobRequest` is `null`.\n\n## Syntax\n\n```js\nenqueue(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : The chunk to enqueue.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableByteStreamController`, or the stream cannot be read for some other reason, or the chunk is not an object, or the chunk's internal array buffer is non-existent, zero-length, or detached.\n    It is also thrown if the stream has been closed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/ReadableByteStreamController/prototype/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# error()\n\nThe **`error()`** method of the `ReadableByteStreamController` interface causes any future interactions with the associated stream to error with the specified reason.\n\nThis is commonly called by an underlying source to surface an error from the interface where it gets its data (such as a file-read or socket error).\nIt can also be called from elsewhere to trigger a stream error, for example if another part of the system that the stream relies on fails.\n\n## Syntax\n\n```js\nerror(errorObject)\n```\n\n### Parameters\n\n- `errorObject`\n  - : Any object that you want future interactions to fail with.\n\n### Return value\n\n`undefined`\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableByteStreamController`, or the stream is not readable for some other reason.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/ReadableStream/ReadableStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream()\n\nThe **`ReadableStream()`** constructor creates and returns a readable stream object from the given handlers.\n\n## Syntax\n\n```js\nnew ReadableStream()\nnew ReadableStream(underlyingSource)\nnew ReadableStream(underlyingSource, queuingStrategy)\n```\n\n### Parameters\n\n- `underlyingSource` _**optional**_\n\n  - : An object containing methods and properties that define how the constructed stream instance will behave.\n    `underlyingSource` can contain the following:\n\n    - `start` (controller) _**optional**_\n      - : This is a method, called immediately when the object is constructed. The\n        contents of this method are defined by the developer, and should aim to get access\n        to the stream source, and do anything else required to set up the stream\n        functionality. If this process is to be done asynchronously, it can return a\n        promise to signal success or failure. The `controller` parameter passed\n        to this method is a `ReadableStreamDefaultController` or a\n        `ReadableByteStreamController`, depending on the value of the\n        `type` property. This can be used by the developer to control the\n        stream during set up.\n    - `pull` (controller) _**optional**_\n      - : This method, also defined by the developer, will be called repeatedly when the\n        stream's internal queue of chunks is not full, up until it reaches its high water\n        mark. If `pull()` returns a promise, then it won't be called again\n        until that promise fulfills; if the promise rejects, the stream will become\n        errored. The `controller` parameter passed to this method is a\n        `ReadableStreamDefaultController` or a\n        `ReadableByteStreamController`, depending on the value of the\n        `type` property. This can be used by the developer to control the\n        stream as more chunks are fetched.\n    - `cancel` (reason) _**optional**_\n      - : This method, also defined by the developer, will be called if the app signals\n        that the stream is to be cancelled (e.g. if `ReadableStream.cancel()`\n        is called). The contents should do whatever is necessary to release access to the\n        stream source. If this process is asynchronous, it can return a promise to signal\n        success or failure. The `reason` parameter contains a\n        string describing why the stream was cancelled.\n    - `type` _**optional**_\n      - : This property controls what type of readable stream is being dealt with. If it\n        is included with a value set to `\"bytes\"`, the passed controller object\n        will be a `ReadableByteStreamController` capable of handling a BYOB\n        (bring your own buffer)/byte stream. If it is not included, the passed controller\n        will be a `ReadableStreamDefaultController`.\n    - `autoAllocateChunkSize` _**optional**_\n\n      - : For byte streams, the developer can set the `autoAllocateChunkSize` with a positive integer value to turn on the stream's auto-allocation feature.\n        With this is set, the stream implementation will automatically allocate a view buffer of the specified size in `ReadableByteStreamController.byobRequest` when required.\n\n        This must be set to enable zero-copy transfers to be used with a default `ReadableStreamDefaultReader`.\n        If not set, a default reader will still stream data, but `ReadableByteStreamController.byobRequest` will always be `null` and transfers to the consumer must be via the stream's internal queues.\n\n- `queuingStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer — this defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk` — this indicates the size to\n        use for each chunk, in bytes.\n\n    > **Note:** You could define your own custom\n    > `queuingStrategy`, or use an instance of\n    > `ByteLengthQueuingStrategy` or `CountQueuingStrategy`\n    > for this object value. If no `queuingStrategy` is supplied, the default\n    > used is the same as a `CountQueuingStrategy` with a high water mark of\n    > 1\\.\n\n### Return value\n\nAn instance of the `ReadableStream` object.\n\n### Exceptions\n\n- `RangeError`\n  - Thrown if the supplied type value is neither `\"bytes\"` nor `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/ReadableStream/prototype/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.cancel()\n\nThe **`cancel()`** method of the\n`ReadableStream` interface returns a `Promise` that\nresolves when the stream is canceled.\n\nCancel is used when you've completely finished with the stream and don't need any more\ndata from it, even if there are chunks enqueued waiting to be read. That data is lost\nafter cancel is called, and the stream is not readable any more. To read those chunks\nstill and not completely get rid of the stream, you'd use\n`ReadableStreamDefaultController.close()`.\n\n## Syntax\n\n```js\ncancel()\ncancel(reason)\n```\n\n### Parameters\n\n- `reason` _**optional**_\n  - : A human-readable reason for the cancellation. The underlying source may or may not use it.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason` parameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to cancel is not a `ReadableStream`, or it is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/ReadableStream/prototype/getReader.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.getReader()\n\nThe **`getReader()`** method of the `ReadableStream` interface creates a reader and locks the stream to it.\nWhile the stream is locked, no other reader can be acquired until this one is released.\n\n## Syntax\n\n```js\ngetReader()\ngetReader(options)\n```\n\n### Parameters\n\n- `options` _**optional**_\n\n  - : An object containing the following properties:\n\n    - `mode` _**optional**_\n\n      - : A property that specifies the type of reader to create.\n        Values can be:\n\n        - `\"byob\"`, which results in a `ReadableStreamBYOBReader` being created that can read readable byte streams (streams that support zero-copy transfer from an underlying byte source to the reader when internal stream buffers are empty).\n        - `undefined` (or not specified at all — this is the default), which results in a `ReadableStreamDefaultReader` being created that can read individual chunks from a stream.\n\n### Return value\n\nA `ReadableStreamDefaultReader` or `ReadableStreamBYOBReader` object instance, depending on the `mode` value.\n\n### Exceptions\n\n- `RangeError`\n  - : Thrown if the provided mode value is not `\"byob\"` or `undefined`.\n- `TypeError`\n  - : Thrown if the stream you are trying to create a reader for is already locked, or not a `ReadableStream`."
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/ReadableStream/prototype/locked.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.locked\n\nThe **`locked`** read-only property of the `ReadableStream` interface returns whether or not the readable stream is locked to a reader.\n\nA readable stream can have at most one active reader at a time, and is locked to that reader until it is released.\nA reader might be obtained using `ReadableStream.getReader()` and released using the reader's `releaseLock()` method.\n\n## Value\n\nA `boolean` value indicating whether or not the readable stream is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/ReadableStream/prototype/pipeThrough.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.pipeThrough()\n\nThe **`pipeThrough()`** method of the `ReadableStream` interface provides a chainable way of piping the current stream through a transform stream or any other writable/readable pair.\n\nPiping a stream will generally lock it for the duration of the pipe, preventing other readers from locking it.\n\n## Syntax\n\n```js\npipeThrough(transformStream)\npipeThrough(transformStream, options)\n```\n\n### Parameters\n\n- `transformStream`\n\n  - : A `TransformStream` (or an object with the structure\n    `{writable, readable}`) consisting of a readable stream and a writable\n    stream working together to transform some data from one form to another. Data written\n    to the `writable` stream can be read in some transformed state by the\n    `readable` stream. For example, a `TextDecoder`, has bytes\n    written to it and strings read from it, while a video decoder has encoded bytes\n    written to it and uncompressed video frames read from it.\n\n- `options` _**optional**_\n\n  - : The options that should be used when piping to the `writable` stream.\n    Available options are:\n\n    - `preventClose`\n\n      - : If this is set to `true`, the source `ReadableStream` closing will no longer cause the destination `WritableStream` to be closed.\n        The method will return a fulfilled promise once this process completes, unless an error is encountered while closing the destination, in which case it will be rejected with that error.\n\n    - `preventAbort`\n\n      - : If this is set to `true`, errors in the source `ReadableStream` will no longer abort the destination `WritableStream`.\n        The method will return a promise rejected with the source's error, or with any error that occurs during aborting the destination.\n\n    - `preventCancel`\n\n      - : If this is set to `true`, errors in the destination `WritableStream` will no longer cancel the source `ReadableStream`.\n        In this case the method will return a promise rejected with the source's error, or with any error that occurs during canceling the source.\n        In addition, if the destination writable stream starts out closed or closing, the source readable stream will no longer be canceled.\n        In this case the method will return a promise rejected with an error indicating piping to a closed stream failed, or with any error that occurs during canceling the source.\n\n### Return value\n\nThe `readable` side of the `transformStream`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the `writable` and/or `readable` property of `transformStream` are undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/ReadableStream/prototype/pipeTo.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.pipeTo()\n\nThe **`pipeTo()`** method of the `ReadableStream` interface pipes the current `ReadableStream` to a given `WritableStream` and returns a `Promise` that fulfills when the piping process completes successfully, or rejects if any errors were encountered.\n\nPiping a stream will generally `lock` it for the duration of the pipe, preventing other readers from locking it.\n\n## Syntax\n\n```js\npipeTo(destination)\npipeTo(destination, options)\n```\n\n### Parameters\n\n- `destination`\n\n  - : A `WritableStream` that acts as the final destination for the `ReadableStream`.\n\n- `options` _**optional**_\n\n  - : The options that should be used when piping to the `writable` stream.\n    Available options are:\n\n    - `preventClose`\n      - : If this is set to `true`, the source `ReadableStream` closing will no longer cause the destination `WritableStream` to be closed.\n        The method will return a fulfilled promise once this process completes, unless an error is encountered while closing the destination in which case it will be rejected with that error.\n    - `preventAbort`\n      - : If this is set to `true`, errors in the source `ReadableStream` will no longer abort the destination `WritableStream`.\n        The method will return a promise rejected with the source's error, or with any error that occurs during aborting the destination.\n    - `preventCancel`\n      - : If this is set to `true`, errors in the destination `WritableStream` will no longer cancel the source `ReadableStream`.\n        In this case the method will return a promise rejected with the source's error, or with any error that occurs during canceling the source.\n        In addition, if the destination writable stream starts out closed or closing, the source readable stream will no longer be canceled.\n        In this case the method will return a promise rejected with an error indicating piping to a closed stream failed, or with any error that occurs during canceling the source.\n\n### Return value\n\nA `Promise` that resolves when the piping process has completed.\n\n### Exceptions\n\n- `TypeError`\n  - : The `writableStream` and/or `readableStream` objects are not a writable stream/readable stream, or one or both of the streams are locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/ReadableStream/prototype/tee.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.tee()\n\nThe **`tee()`** method of the\n`ReadableStream` interface [tees](https://streams.spec.whatwg.org/#tee-a-readable-stream) the current readable stream, returning a\ntwo-element array containing the two resulting branches as\nnew `ReadableStream` instances.\n\nThis is useful for allowing two readers to read a stream sequentially or simultaneously,\nperhaps at different speeds.\nFor example, you might do this in a ServiceWorker if you want to fetch\na response from the server and stream it to the browser, but also stream it to the\nServiceWorker cache. Since a response body cannot be consumed more than once, you'd need\ntwo copies to do this.\n\nA teed stream will partially signal backpressure at the rate of the _faster_ consumer\nof the two `ReadableStream` branches,\nand unread data is enqueued internally on the slower consumed `ReadableStream`\nwithout any limit or backpressure.\nThat is, when _both_ branches have an unread element in their internal queue,\nthen the original `ReadableStream`'s controller's internal queue will start to fill up,\nand once its `ReadableStreamDefaultController.desiredSize\", \"desiredSize` ≤ 0\nor byte stream controller `ReadableByteStreamController.desiredSize\", \"desiredSize` ≤ 0,\nthen the controller will stop calling `pull(controller)` on the\nunderlying source passed to `ReadableStream.ReadableStream\", \"new ReadableStream()`.\nIf only one branch is consumed, then the entire body will be enqueued in memory.\nTherefore, you should not use the built-in `tee()` to read very large streams\nin parallel at different speeds.\nInstead, search for an implementation that fully backpressures\nto the speed of the _slower_ consumed branch.\n\nTo cancel the stream you then need to cancel both resulting branches. Teeing a stream\nwill generally lock it for the duration, preventing other readers from locking it.\n\n## Syntax\n\n```js\ntee()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nAn `Array` containing two `ReadableStream` instances.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source stream is not a `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/ReadableStreamBYOBReader/ReadableStreamBYOBReader.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# ReadableStreamBYOBReader()\n\nThe **`ReadableStreamBYOBReader()`** constructor creates and returns a `ReadableStreamBYOBReader` object instance.\n\n> **Note:** You generally wouldn't use this constructor manually;\n> instead, you'd use the `ReadableStream.getReader()` method with the argument `\"byob\"`.\n\n## Syntax\n\n```js\nnew ReadableStreamBYOBReader(stream)\n```\n\n### Parameters\n\n- `stream`\n  - : The `ReadableStream` to be read.\n\n### Return value\n\nAn instance of the `ReadableStreamBYOBReader` object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the supplied `stream` parameter is not a `ReadableStream`, or it is already locked for reading by another reader, or its stream controller is not a `ReadableByteStreamController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/ReadableStreamBYOBReader/prototype/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# cancel()\n\nThe **`cancel()`** method of the `ReadableStreamBYOBReader` interface returns a `Promise` that resolves when the stream is canceled.\nCalling this method signals a loss of interest in the stream by a consumer.\n\n> **Note:** If the reader is active, the `cancel()` method behaves the same as that for the associated stream (`ReadableStream.cancel()`).\n\n## Syntax\n\n```js\ncancel()\ncancel(reason)\n```\n\n### Parameters\n\n- `reason` __optional__\n  - : A human-readable reason for the cancellation. The underlying source may or may not use it.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason` parameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamBYOBReader`, or the stream has no owner.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/ReadableStreamBYOBReader/prototype/closed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# closed\n\nThe **`closed`** read-only property of the `ReadableStreamBYOBReader` interface returns a `Promise` that fulfills when the stream closes, or rejects if the stream throws an error or the reader's lock is released.\n\nThis property enables you to write code that responds to an end to the streaming process.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/ReadableStreamBYOBReader/prototype/read.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# read()\n\nThe **`read()`** method of the `ReadableStreamBYOBReader` interface is used to read data into a view on a user-supplied buffer from an associated readable byte stream.\nA request for data will be satisfied from the stream's internal queues if there is any data present.\nIf the stream queues are empty, the request may be supplied as a zero-copy transfer from the underlying byte source.\n\nThe method takes as an argument a view on a buffer that supplied data is to be read into, and returns a `Promise`.\nThe promise fulfills with an object that has properties `value` and `done` when data comes available, or if the stream is cancelled.\nIf the stream is errored, the promise will be rejected with the relevant error object.\n\nIf a chunk of data is supplied, the `value` property will contain a new view.\nThis will be a view over the same buffer/backing memory (and of the same type) as the original `view` passed to the `read()` method, now populated with the new chunk of data.\nNote that once the promise fulfills, the original `view` passed to the method will be detached and no longer usable.\nThe promise will fulfill with a `value: undefined` if the stream has been cancelled.\nIn this case the backing memory region of `view` is discarded and not returned to the caller (all previously read data in the view's buffer is lost).\n\nThe `done` property indicates whether or not more data is expected.\nThe value is set `true` if the stream is closed or cancelled, and `false` otherwise.\n\n## Syntax\n\n```js\nread(view)\n```\n\n### Parameters\n\n- `view`\n  - : The view that data is to be read into.\n\n### Return value\n\nA `Promise`, which fulfills/rejects with a result depending on the state of the stream.\n\nThe following are possible:\n\n- If a chunk is available and the stream is still active, the promise fulfills with an object of the form:\n\n  ```\n  { value: theChunk, done: false }\n  ```\n\n  `theChunk` is a view containing the new data.\n  This is a view of the same type and over the same backing memory as the `view` passed to the `read()` method.\n  The original `view` will be detached and no longer usable.\n\n- If the stream is closed, the promise fulfills with an object of the form (where `theChunk` has the same properties as above):\n\n  ```\n  { value: theChunk, done: true }\n  ```\n\n- If the stream is cancelled, the promise fulfills with an object of the form:\n\n  ```\n  { value: undefined, done: true }\n  ```\n\n  In this case the backing memory is discarded.\n\n- If the stream throws an error, the promise rejects with the relevant error.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamBYOBReader`, the stream has no owner, the view is not an object or has become detached, the view's length is 0, or `ReadableStreamBYOBReader.releaseLock()` is called (when there's is a pending read request).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/ReadableStreamBYOBReader/prototype/releaseLock.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# releaseLock()\n\nThe **`releaseLock()`** method of the `ReadableStreamBYOBReader` interface releases the reader's lock on the stream.\nAfter the lock is released, the reader is no longer active.\n\nThe reader will appear errored if the associated stream is errored when the lock is released; otherwise, the reader will appear closed.\n\nIf the reader's lock is released while it still has pending read requests then the promises returned by the reader's `ReadableStreamBYOBReader.read()` method are immediately rejected with a `TypeError`.\nUnread chunks remain in the stream's internal queue and can be read later by acquiring a new reader.\n\n## Syntax\n\n```js\nreleaseLock()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamBYOBReader`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/ReadableStreamBYOBRequest/prototype/respond.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# respond()\n\nThe **`respond()`** method of the `ReadableStreamBYOBRequest` interface is used to signal to the associated readable byte stream that the specified number of bytes were written into the `ReadableStreamBYOBRequest.view`.\n\nAfter this method is called, the `view` will be transferred and no longer modifiable.\n\n## Syntax\n\n```js\nrespond(bytesWritten)\n```\n\n### Parameters\n\n- `bytesWritten`\n  - : The number of bytes written into `ReadableStreamBYOBRequest.view`.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : The request does not have an associated `ReadableByteStreamController` or the view buffer is not detached/cannot be transferred into.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/ReadableStreamBYOBRequest/prototype/respondWithNewView.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# respondWithNewView()\n\nThe **`respondWithNewView()`** method of the `ReadableStreamBYOBRequest` interface specifies a new view that the consumer of the associated readable byte stream should write to instead of `ReadableStreamBYOBRequest.view`.\n\nThe new view must be a `TypedArray` or a `DataView` that provides a view onto the same backing memory region as `ReadableStreamBYOBRequest.view`.\nAfter this method is called, the view that was passed into the method will be transferred and no longer modifiable.\n\nThe method is intended for use cases where an underlying byte source needs to transfer a `byobRequest.view` internally before finishing its response.\nFor example, the source may transfer the BYOB view to a separate worker thread, and wait for the worker to transfer it back once it has been filled.\n\n## Syntax\n\n```js\nrespondWithNewView(view)\n```\n\n### Parameters\n\n- `view`\n\n  - : A `TypedArray` or a `DataView` that the consumer of the associated readable byte stream should write to instead of `ReadableStreamBYOBRequest.view`.\n\n    This must be a view onto the same backing memory region as `ReadableStreamBYOBRequest.view` and occupy the same or less memory.\n    Specifically, it must be either the view's buffer or a transferred version, must have the same `byteOffset`, and a `byteLength` (number of bytes written) that is less than or equal to that of the view.\n\n### Return value\n\n`undefined`\n\n### Exceptions\n\n- `TypeError`\n\n  - : Thrown if the source object is not a `ReadableStreamBYOBRequest`, or there is no associated controller, or the associated internal array buffer is non-existent or detached.\n    It may also be thrown if the `view` is zero-length when there is an active reader, or non-zero when called on a closed stream.\n\n- `RangeError`\n  - : Thrown if the new `view` does not match the backing memory region of `ReadableStreamBYOBRequest.view`.\n    For example, it is not the same buffer (or a transferred version), has a different `byteOffset`, or is larger than the memory available to the backing view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/ReadableStreamBYOBRequest/prototype/view.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# view\n\nThe **`view`** getter property of the `ReadableStreamBYOBRequest` interface returns the current view.\n\n## Value\n\nA typed array representing the destination region to which the controller can write generated data.\n\n`null` if the request has already been responded to, by calling `ReadableStreamBYOBRequest.respond()` or `ReadableStreamBYOBRequest.respondWithNewView()`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/ReadableStreamDefaultController/prototype/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.close()\n\nThe **`close()`** method of the\n`ReadableStreamDefaultController` interface closes the associated stream.\n\nReaders will still be able to read any previously-enqueued chunks from the stream,\nbut once those are read, the stream will become closed. If you want to completely get\nrid of the stream and discard any enqueued chunks, you'd use\n`ReadableStream.cancel()` or\n`ReadableStreamDefaultReader.cancel()`.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/ReadableStreamDefaultController/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.desiredSize\n\nThe **`desiredSize`** read-only property of the\n`ReadableStreamDefaultController` interface returns the desired size\nrequired to fill the stream's internal queue.\n\n## Value\n\nAn integer. Note that this can be negative if the queue is over-full.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/ReadableStreamDefaultController/prototype/enqueue.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.enqueue()\n\nThe **`enqueue()`** method of the\n`ReadableStreamDefaultController` interface enqueues a given chunk in the\nassociated stream.\n\n## Syntax\n\n```js\nenqueue(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : The chunk to enqueue.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/ReadableStreamDefaultController/prototype/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.error()\n\nThe **`error()`** method of the\n`ReadableStreamDefaultController` interface causes any future interactions\nwith the associated stream to error.\n\n> **Note:** The `error()` method can be called\n> more than once, and can be called when the stream is not readable.\n\n## Syntax\n\n```js\nerror(e)\n```\n\n### Parameters\n\n- `e`\n  - : The error you want future interactions to fail with.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/ReadableStreamDefaultReader/ReadableStreamDefaultReader.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader()\n\nThe **`ReadableStreamDefaultReader()`**\nconstructor creates and returns a `ReadableStreamDefaultReader` object\ninstance.\n\n## Syntax\n\n```js\nnew ReadableStreamDefaultReader(stream)\n```\n\n### Parameters\n\n- `stream`\n  - : The `ReadableStream` to be read.\n\n### Return value\n\nAn instance of the `ReadableStreamDefaultReader` object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the supplied `stream` parameter is not a `ReadableStream`,\n    or it is already locked for reading by another reader.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/ReadableStreamDefaultReader/prototype/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n~ ReadableStreamDefaultReader.cancel()\n\nThe **`cancel()`** method of the\n`ReadableStreamDefaultReader` interface returns a `Promise` that resolves when the stream is canceled. Calling this method signals a loss of interest in the stream by a consumer.\n\nCancel is used when you've completely finished with the stream and don't need any more\ndata from it, even if there are chunks enqueued waiting to be read. That data is lost\nafter cancel is called, and the stream is not readable any more. To read those chunks\nstill and not completely get rid of the stream, you'd use\n`ReadableStreamDefaultController.close()`.\n\n> **Note:** If the reader is active, the\n> `cancel()` method behaves the same as that for the associated stream\n> (`ReadableStream.cancel()`).\n\n## Syntax\n\n```js\ncancel()\ncancel(reason)\n```\n\n### Parameters\n\n- `reason` _**optional**_\n  - : A human-readable reason for the cancellation. This value may or may not be used.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason`\nparameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamDefaultReader`, or the stream\n    has no owner.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/ReadableStreamDefaultReader/prototype/closed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader.closed\n\nThe **`closed`** read-only property of the\n`ReadableStreamDefaultReader` interface returns a\n`Promise` that fulfills when the stream closes, or rejects if the\nstream throws an error or the reader's lock is released. This property enables you\nto write code that responds to an end to the streaming process.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/ReadableStreamDefaultReader/prototype/read.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader.read()\n\nThe **`read()`** method of the `ReadableStreamDefaultReader` interface returns a `Promise` providing access to the next chunk in the stream's internal queue.\n\n## Syntax\n\n```js\nread()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise`, which fulfills/rejects with a result depending on the state of the stream.\nThe different possibilities are as follows:\n\n- If a chunk is available, the promise will be fulfilled with an object of the form `{ value: theChunk, done: false }`.\n- If the stream becomes closed, the promise will be fulfilled with an object of the form `{ value: undefined, done: true }`.\n- If the stream becomes errored, the promise will be rejected with the relevant error.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamDefaultReader`, the stream has no owner, or `ReadableStreamDefaultReader.releaseLock()` is called (when there's a pending read request).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/ReadableStreamDefaultReader/prototype/releaseLock.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader.releaseLock()\n\nThe **`releaseLock()`** method of the `ReadableStreamDefaultReader` interface releases the reader's lock on the stream.\n\nIf the associated stream is errored when the lock is released, the reader will appear errored in that same way subsequently; otherwise, the reader will appear closed.\n\nIf the reader's lock is released while it still has pending read requests then the promises returned by the reader's `ReadableStreamDefaultReader.read()` method are immediately rejected with a `TypeError`.\nUnread chunks remain in the stream's internal queue and can be read later by acquiring a new reader.\n\n## Syntax\n\n```js\nreleaseLock()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultReader`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/ReferenceError/ReferenceError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReferenceError\n\nThe **`ReferenceError`** object represents an error when a\nnon-existent variable is referenced.\n\n## Syntax\n\n```js\nnew ReferenceError()\nnew ReferenceError(message)\nnew ReferenceError(message, options)\nnew ReferenceError(message, fileName)\nnew ReferenceError(message, fileName, lineNumber)\n\nReferenceError()\nReferenceError(message)\nReferenceError(message, options)\nReferenceError(message, fileName)\nReferenceError(message, fileName, lineNumber)\n```\n\n> **Note:** `ReferenceError()` can be called with or without `new`. Both create a new `ReferenceError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Reflect/apply.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.apply()\n\nThe static **`Reflect.apply()`** method calls a target function\nwith arguments as specified.\n\n## Syntax\n\n```js\nReflect.apply(target, thisArgument, argumentsList)\n```\n\n### Parameters\n\n- `target`\n  - : The target function to call.\n- `thisArgument`\n  - : The value of `this` provided for the call to\n    `target`.\n- `argumentsList`\n  - : An array-like object specifying the arguments with which\n    `target` should be called.\n\n### Return value\n\nThe result of calling the given `target` function with the\nspecified `this` value and arguments.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if the `target` is not callable.\n\n## Description\n\nIn ES5, you typically use the [`Function.prototype.apply()`](../../globals/Function/prototype/apply.mdx) method to call a\nfunction with a given `this` value and `arguments` provided as an array\n(or an [array-like object](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects)).\n\n```js\nFunction.prototype.apply.call(Math.floor, undefined, [1.75]);\n```\n\nWith `Reflect.apply()` this becomes less verbose and easier to understand.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Reflect/construct.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.construct()\n\nThe static **`Reflect.construct()`** method acts like the\n`new` operator, but as a function. It is equivalent to\ncalling `new target(...args)`. It gives also the added option to specify a\ndifferent prototype.\n\n## Syntax\n\n```js\nReflect.construct(target, argumentsList)\nReflect.construct(target, argumentsList, newTarget)\n```\n\n### Parameters\n\n- `target`\n  - : The target function to call.\n- `argumentsList`\n  - : An array-like object specifying the arguments with which\n    `target` should be called.\n- `newTarget` _**optional**_\n  - : The constructor whose prototype should be used. See also the [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target)\n    operator. If `newTarget` is not present, its value defaults\n    to `target`.\n\n### Return value\n\nA new instance of `target` (or `newTarget`,\nif present), initialized by `target` as a constructor with the\ngiven `argumentsList`.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` or\n`newTarget` are not constructors.\n\n## Description\n\n`Reflect.construct()` allows you to invoke a constructor with a variable\nnumber of arguments. (This would also be possible by using the\n[spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) combined with the\n[`new` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new).)\n\n```js\nconst obj = new Foo(...args);\nconst obj = Reflect.construct(Foo, args);\n```\n\n### Reflect.construct() vs Object.create()\n\nPrior to the introduction of `Reflect`, objects could be constructed using\nan arbitrary combination of constructor and prototype by using\n[`Object.create()`](../../globals/Object/create.mdx).\n\n```js\nfunction OneClass() {\n  this.name = \"one\";\n}\n\nfunction OtherClass() {\n  this.name = \"other\";\n}\n\n// Calling this:\nconst obj1 = Reflect.construct(OneClass, args, OtherClass);\n\n// ...has the same result as this:\nconst obj2 = Object.create(OtherClass.prototype);\nOneClass.apply(obj2, args);\n\nconsole.log(obj1.name); // 'one'\nconsole.log(obj2.name); // 'one'\n\nconsole.log(obj1 instanceof OneClass); // false\nconsole.log(obj2 instanceof OneClass); // false\n\nconsole.log(obj1 instanceof OtherClass); // true\nconsole.log(obj2 instanceof OtherClass); // true\n\n// Another example to demonstrate below:\n\nfunction func1(a, b, c, d) {\n  console.log(arguments[3]);\n}\n\nfunction func2(d, e, f, g) {\n  console.log(arguments[3]);\n}\n\nconst obj1 = Reflect.construct(func1, [\"I\", \"Love\", \"my\", \"country\"]);\n```\n\nHowever, while the end result is the same, there is one important difference in the\nprocess. When using `Object.create()` and\n[`Function.prototype.apply()`](../../globals/Function/prototype/apply.mdx), the `new.target` operator will\npoint to `undefined` within the function used as the constructor, since the\n`new` keyword is not being used to create the object.\n\nWhen invoking `Reflect.construct()`, on the other hand, the\n`new.target` operator will point to the `newTarget`\nparameter if supplied, or `target` if not.\n\n```js\nfunction OneClass() {\n  console.log(\"OneClass\");\n  console.log(new.target);\n}\nfunction OtherClass() {\n  console.log(\"OtherClass\");\n  console.log(new.target);\n}\n\nconst obj1 = Reflect.construct(OneClass, args);\n// Logs:\n// OneClass\n// function OneClass { ... }\n\nconst obj2 = Reflect.construct(OneClass, args, OtherClass);\n// Logs:\n// OneClass\n// function OtherClass { ... }\n\nconst obj3 = Object.create(OtherClass.prototype);\nOneClass.apply(obj3, args);\n// Logs:\n// OneClass\n// undefined\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Reflect/defineProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.defineProperty()\n\nThe static **`Reflect.defineProperty()`** method is like\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx) but returns a `Boolean`.\n\n## Syntax\n\n```js\nReflect.defineProperty(target, propertyKey, attributes)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to define the property.\n- `propertyKey`\n  - : The name of the property to be defined or modified.\n- `attributes`\n  - : The attributes for the property being defined or modified.\n\n### Return value\n\nA `Boolean` indicating whether or not the property was successfully\ndefined.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.defineProperty` method allows precise addition to or\nmodification of a property on an object. For more details, see the\n[`Object.defineProperty`](../../globals/Object/defineProperty.mdx) which is similar.\n\n> **Note:** `Object.defineProperty` returns the\n> object or throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the property has not been successfully\n> defined. `Reflect.defineProperty`, however, returns a `Boolean`\n> indicating whether or not the property was successfully defined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Reflect/deleteProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.deleteProperty()\n\nThe static\n**`Reflect.deleteProperty()`**\nmethod allows to delete properties. It is like the\n[`delete` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete)\nas a function.\n\n## Syntax\n\n```js\nReflect.deleteProperty(target, propertyKey)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to delete the property.\n- `propertyKey`\n  - : The name of the property to be deleted.\n\n### Return value\n\nA `Boolean` indicating whether or not the property was successfully\ndeleted.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.deleteProperty` method allows you to delete a property on an\nobject. It returns a `Boolean` indicating whether or not the property was\nsuccessfully deleted. It is almost identical to the non-strict\n[`delete` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Reflect/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.get()\n\nThe static **`Reflect.get()`** method works like getting a\nproperty from an object (`target[propertyKey]`) as a function.\n\n## Syntax\n\n```js\nReflect.get(target, propertyKey)\nReflect.get(target, propertyKey, receiver)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to get the property.\n- `propertyKey`\n  - : The name of the property to get.\n- `receiver` _**optional**_\n  - : The value of `this` provided for the call to\n    `target` if a getter is encountered. When used with\n    `Proxy`, it can be an object that inherits from\n    `target`.\n\n### Return value\n\nThe value of the property.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.get` method allows you to get a property on an object. It is like the\n[property accessor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Property_Accessors) syntax as a function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Reflect/getOwnPropertyDescriptor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.getOwnPropertyDescriptor()\n\nThe static\n**`Reflect.getOwnPropertyDescriptor()`** method is similar to\n[`Object.getOwnPropertyDescriptor()`](../../globals/Object/getOwnPropertyDescriptor.mdx). It returns a property descriptor of\nthe given property if it exists on the object, `undefined`\notherwise.\n\n\n\n## Syntax\n\n```js\nReflect.getOwnPropertyDescriptor(target, propertyKey)\n```\n\n### Parameters\n\n- `target`\n  - : The target object in which to look for the property.\n- `propertyKey`\n  - : The name of the property to get an own property descriptor for.\n\n### Return value\n\nA property descriptor object if the property exists in `target`\nobject; otherwise, [`undefined`](../../globals/undefined.mdx).\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.getOwnPropertyDescriptor` method returns a property descriptor\nof the given property if it exists in the `target` object,\n[`undefined`](../../globals/undefined.mdx) otherwise. The only difference to\n[`Object.getOwnPropertyDescriptor()`](../../globals/Object/getOwnPropertyDescriptor.mdx) is how non-object targets are handled.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Reflect/getPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.getPrototypeOf()\n\nThe static **`Reflect.getPrototypeOf()`** method is almost the\nsame method as [`Object.getPrototypeOf()`](../../globals/Object/getPrototypeOf.mdx). It returns the prototype (i.e. the\nvalue of the internal `[[Prototype]]` property) of the specified object.\n\n\n\n## Syntax\n\n```js\nReflect.getPrototypeOf(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object of which to get the prototype.\n\n### Return value\n\nThe prototype of the given object. If there are no inherited properties,\n[`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) is returned.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.getPrototypeOf` method returns the prototype (i.e. the value of\nthe internal `[[Prototype]]` property) of the specified object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Reflect/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.has()\n\nThe static **`Reflect.has()`** method works like the [`in` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/in)\nas a function.\n\n## Syntax\n\n```js\nReflect.has(target, propertyKey)\n```\n\n### Parameters\n\n- `target`\n  - : The target object in which to look for the property.\n- `propertyKey`\n  - : The name of the property to check.\n\n### Return value\n\nA `Boolean` indicating whether or not the `target`\nhas the property.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.has` method allows you to check if a property is in an object.\nIt works like the [`in` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/in)\nas a function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Reflect/isExtensible.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.isExtensible()\n\nThe static **`Reflect.isExtensible()`** method determines if an object is extensible (whether it can have new properties added to it). It is similar to [`Object.isExtensible()`](../../globals/Object/isExtensible.mdx), but with [some differences](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/isExtensible#difference_with_object.isextensible).\n\n## Syntax\n\n```js\nReflect.isExtensible(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object which to check if it is extensible.\n\n### Return value\n\nA `Boolean` indicating whether or not the target is extensible.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Reflect/ownKeys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.ownKeys()\n\nThe static **`Reflect.ownKeys()`** method returns an array of\nthe `target` object's own property keys.\n\n## Syntax\n\n```js\nReflect.ownKeys(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object from which to get the own keys.\n\n### Return value\n\nAn `Array` of the `target` object's own property\nkeys.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.ownKeys` method returns an array of the\n`target` object's own property keys. Its return value is\nequivalent to `Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target))`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Reflect/preventExtensions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.preventExtensions()\n\nThe static **`Reflect.preventExtensions()`** method prevents new properties from ever being added to an object (i.e., prevents future extensions to the object). It is similar to [`Object.preventExtensions()`](../../globals/Object/preventExtensions.mdx), but with [some differences](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/preventExtensions#difference_with_object.preventextensions).\n\n## Syntax\n\n```js\nReflect.preventExtensions(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to prevent extensions.\n\n### Return value\n\nA `Boolean` indicating whether or not the target was successfully set to prevent extensions.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Reflect/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.set()\n\nThe static **`Reflect.set()`** method works like setting a\nproperty on an object.\n\n## Syntax\n\n```js\nReflect.set(target, propertyKey, value)\nReflect.set(target, propertyKey, value, receiver)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to set the property.\n- `propertyKey`\n  - : The name of the property to set.\n- `value`\n  - : The value to set.\n- `receiver` _**optional**_\n  - : The value of `this` provided for the call to the setter for `propertyKey` on `target`. If provided and `target` does not have a setter for `propertyKey`, the property will be set on `receiver` instead.\n\n### Return value\n\nA `Boolean` indicating whether or not setting the property was successful.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.set` method allows you to set a property on an object. It does\nproperty assignment and is like the\n[property accessor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Property_Accessors) syntax as a function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Reflect/setPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.setPrototypeOf()\n\nThe static\n**`Reflect.setPrototypeOf()`** method is the same method as\n[`Object.setPrototypeOf()`](../../globals/Object/setPrototypeOf.mdx), except for its return type. It sets the\nprototype (i.e., the internal `[[Prototype]]` property) of a specified\nobject to another object or to [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null), and returns `true` if\nthe operation was successful, or `false` otherwise.\n\n## Syntax\n\n```js\nReflect.setPrototypeOf(target, prototype)\n```\n\n### Parameters\n\n- `target`\n  - : The target object of which to set the prototype.\n- `prototype`\n  - : The object's new prototype (an object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null)).\n\n### Return value\n\nA `Boolean` indicating whether or not the prototype was successfully set.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object` or if `prototype` is neither an object nor\n[`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null).\n\n## Description\n\nThe `Reflect.setPrototypeOf` method changes the prototype (i.e. the value of\nthe internal `[[Prototype]]` property) of the specified object.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Request/Request.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request()\n\nThe **`Request()`** constructor creates a new\n`Request` object.\n\n## Syntax\n\n```js\nnew Request(input)\nnew Request(input, options)\n```\n\n### Parameters\n\n- `input`\n\n  - : Defines the resource that you wish to fetch. This can either be:\n\n    - A string containing the direct URL of the resource you want to\n      fetch.\n    - A `Request` object, effectively creating a copy.\n\n- `options` _**optional**_\n\n  - : An object containing any custom settings that you want to apply to the\n    request. The possible options are:\n\n    - `method`\n      - : The request method, e.g., `GET`, `POST`. The default is `GET`.\n    - `headers`\n      - : Any headers you want to add to your request, contained\n        within a `Headers` object or an object literal with `String` values.\n    - `body`\n      - : Any body that you want to add to your request: this can be an `ArrayBuffer`, a `TypedArray`, a `DataView`, a `URLSearchParams`, string object or literal, a `ReadableStream` object, a [`Blob`](../../globals/Blob/Blob.mdx) object, or a [`FormData`](../../globals/FormData/FormData.mdx) object.\n    - `backend` _**Fastly-specific**_\n    - `cacheOverride` _**Fastly-specific**_, see [`CacheOverride`](../../fastly:cache-override/CacheOverride/CacheOverride.mdx).\n    - `cacheKey` _**Fastly-specific**_\n    - `manualFramingHeaders`_: boolean_ _**optional**_ _**Fastly-specific**_\n      - : The default value is `false`, which means that the framing headers are automatically created based on the message body.\n        In \"automatic\" mode, a `Content-Length` is used when the size of the body can be determined before it is sent.\n        Requests sent in streaming mode, where headers are sent immediately but the content of the body is streamed later, will receive a `Transfer-Encoding: chunked` to accommodate the dynamic generation of the body.\n        In \"manual\" mode, any `Content-Length` or `Transfer-Encoding` headers will be honored.\n        You must ensure that those headers have correct values permitted by the [HTTP/1.1 specification](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).\n        If the provided headers are not permitted by the specification, the headers will revert to \"automatic\" mode and a diagnostic message will be logged about what was wrong.\n        If a `Content-Length` is permitted by the specification, but the value does not match the size of the actual body, the body will either be truncated (if it is too long), or the connection will be hung up early (if it is too short).\n    - `fastly` _**Fastly-specific**_\n      - `decompressGzip`_: boolean_ _**optional**_\n        - Whether to automatically gzip decompress the Response or not."
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Request/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the `Request` interface\nreads the request body and returns it as a promise that resolves with an `ArrayBuffer`.\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an `ArrayBuffer`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Request/prototype/blob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.blob()\n\nThe **`blob()`** method of the `Request` interface reads the request body and returns it as a promise that resolves with a `Blob`.\n\n## Syntax\n\n```js\nblob()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a [`Blob`](../../../globals/Blob/Blob.mdx).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the request body has already been used or if the request's method is `GET` or `HEAD`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Request/prototype/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.body\n\nThe read-only **`body`** property of the `Request`\ninterface contains a `ReadableStream` with the body contents\nthat have been added to the request. Note that a request using the\n`GET` or `HEAD` method cannot have a body\nand `null` is returned in these cases.\n\n## Value\n\nA `ReadableStream` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Request/prototype/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.bodyUsed\n\nThe read-only **`bodyUsed`** property of the\n`Request` interface is a boolean value that indicates\nwhether the request body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Request/prototype/clone.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.clone()\n\nThe **`clone()`** method of the `Request` interface creates a copy of the current `Request` object.\n\nLike the underlying `ReadableStream.tee`` api, the `body` of a cloned `Response`\nwill signal backpressure at the rate of the _faster_ consumer of the two bodies,\nand unread data is enqueued internally on the slower consumed `body`\nwithout any limit or backpressure.\nBeware when you construct a `Request` from a stream and then `clone` it.\n\n`clone()` throws a `TypeError` if the request body has already been used. In fact, the main reason `clone()` exists is to allow multiple uses of body objects (when they are one-use only.)\n\nIf you intend to modify the request, you may prefer the `Request` constructor.\n\n## Syntax\n\n```js\nclone()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Request` object, which is an exact copy of the `Request` that `clone()` was called on.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Request/prototype/formData.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.formData()\n\nThe **`formData()`** method of the `Request` interface reads the request body and returns it as a promise that resolves with a `FormData` object.\n\n## Syntax\n\n```js\nformData()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a [`FormData`](../../../globals/FormData/FormData.mdx) object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the request body has already been used or if the request's method is `GET` or `HEAD`.\n- `SyntaxError`\n  - : Thrown if the request's content type is not `multipart/form-data` or `application/x-www-form-urlencoded`, or if the content cannot be parsed as form data.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Request/prototype/headers.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.headers\n\nThe **`headers`** read-only property of the\n`Request` interface contains the `Headers` object associated\nwith the request.\n\n## Value\n\nA `Headers` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Request/prototype/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.json()\n\nThe **`json()`** method of the `Request` interface\nreads the request body and returns it as a promise that resolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a JavaScript object. This object could be\nanything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Request/prototype/method.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.method\n\nThe **`method`** read-only property of the\n`Request` interface contains the request's method (`GET`, `POST`, etc.)\n\n## Value\n\nA `String` indicating the method of the request.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Request/prototype/setManualFramingHeaders.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.setManualFramingHeaders()\n\nThe **`setManualFramingHeaders()`** method of the `Request` interface controls how the framing headers should be determined.\n\nBy default the framing headers are set to \"automatic\" mode, which means they are created based on the body of the associated Request instance.\nIn \"automatic\" mode, a `Content-Length` is used when the size of the body can be determined before it is sent.\nRequests sent in streaming mode, where headers are sent immediately but the content of the body is streamed later, will receive a `Transfer-Encoding: chunked` to accommodate the dynamic generation of the body.\nIn \"manual\" mode, any `Content-Length` or `Transfer-Encoding` headers will be honored.\nYou must ensure that those headers have correct values permitted by the [HTTP/1.1 specification](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).\nIf the provided headers are not permitted by the specification, the headers will revert to \"automatic\" mode and a diagnostic message will be logged about what was wrong.\nIf a `Content-Length` is permitted by the specification, but the value does not match the size of the actual body, the body will either be truncated (if it is too long), or the connection will be hung up early (if it is too short).\n\n## Syntax\n\n## Syntax\n\n```js\nsetManualFramingHeaders(manual)\n```\n\n### Parameters\n\n- `manual` _: boolean_\n  - : Whether or not to use \"manual\" mode for the framing headers.\n\n### Return value\n\n`undefined`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Request/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.text()\n\nThe **`text()`** method of the `Request` interface\nreads the request body and returns it as a promise that resolves with a `String`.\nThe response is _always_ decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Promise that resolves with a `String`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Request/prototype/url.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.url\n\nThe **`url`** read-only property of the `Request` interface contains the URL of the request.\n\n## Value\n\nA string indicating the URL of the request.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Response/Response.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response()\n\nThe **`Response()`** constructor creates a new `Response` object.\n\n## Syntax\n\n```js\nnew Response()\nnew Response(body)\nnew Response(body, options)\n```\n\n### Parameters\n\n- `body` _**optional**_\n\n  - : An object defining a body for the response. This can be `null` (which is\n    the default value), or one of:\n\n    - [`ArrayBuffer`](../../globals/ArrayBuffer/ArrayBuffer.mdx)\n    - `TypedArray`\n    - [`DataView`](../../globals/DataView/DataView.mdx)\n    - [`ReadableStream`](../../globals/ReadableStream/ReadableStream.mdx)\n    - [`URLSearchParams`](../../globals/URLSearchParams/URLSearchParams.mdx)\n    - [`String`](../../globals/String/String.mdx)\n    - string literal\n    - [`Blob`](../../globals/Blob/Blob.mdx)\n    - [`FormData`](../../globals/FormData/FormData.mdx)\n\n- `options` _**optional**_\n\n  - : An options object containing any custom settings that you want to apply to the\n    response, or an empty object (which is the default value). The possible options are:\n\n    - `status`\n      - : The status code for the response, e.g., `200`.\n    - `statusText`\n      - : The status message associated with the status code,\n        e.g., `OK`.\n    - `headers`\n      - : Any headers you want to add to your response, contained\n        within a [`Headers`](../../globals/Headers/Headers.mdx) object or object literal of\n        [`String`](../../globals/String/String.mdx) key/value pairs.\n    - `manualFramingHeaders`_: boolean_ _**optional**_ _**Fastly-specific**_\n      - : The default value is `false`, which means that the framing headers are automatically created based on the message body.\n        In \"automatic\" mode, a `Content-Length` is used when the size of the body can be determined before it is sent.\n        Responses sent in streaming mode, where headers are sent immediately but the content of the body is streamed later, will receive a `Transfer-Encoding: chunked` to accommodate the dynamic generation of the body.\n        In \"manual\" mode, any `Content-Length` or `Transfer-Encoding` headers will be honored.\n        You must ensure that those headers have correct values permitted by the [HTTP/1.1 specification](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).\n        If the provided headers are not permitted by the specification, the headers will revert to \"automatic\" mode and a diagnostic message will be logged about what was wrong.\n        If a `Content-Length` is permitted by the specification, but the value does not match the size of the actual body, the body will either be truncated (if it is too long), or the connection will be hung up early (if it is too short).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Response/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface\ntakes a [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion. It returns a promise\nthat resolves with an [`ArrayBuffer`](../../../globals/ArrayBuffer/ArrayBuffer.mdx).\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an [`ArrayBuffer`](../../../globals/ArrayBuffer/ArrayBuffer.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Response/prototype/blob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.blob()\n\nThe **`blob()`** method of the [`Response`](../Response.mdx) interface takes a [`Response`](../Response.mdx) stream and reads it to completion. It returns a promise that resolves with a `Blob`.\n\n## Syntax\n\n```js\nblob()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a [`Blob`](../../../globals/Blob/Blob.mdx).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the response body has already been consumed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Response/prototype/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.body\n\nThe **`body`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface is a [`ReadableStream`](../../../globals/ReadableStream/ReadableStream.mdx) of the body contents.\n\n## Value\n\nA [`ReadableStream`](../../../globals/ReadableStream/ReadableStream.mdx), or else `null` for any `Response` object [constructed](../../../globals/Response/Response.mdx) with a null `body` property, or for any actual HTTP response that has no body.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Response/prototype/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.bodyUsed\n\nThe **`bodyUsed`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface is a boolean value that indicates whether the body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Response/prototype/formData.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.formData()\n\nThe **`formData()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface takes a [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion. It returns a promise that resolves with a `FormData` object.\n\n## Syntax\n\n```js\nformData()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a [`FormData`](../../../globals/FormData/FormData.mdx) object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the response body has already been consumed.\n- `SyntaxError`\n  - : Thrown if the response's content type is not `multipart/form-data` or `application/x-www-form-urlencoded`, or if the content cannot be parsed as form data.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Response/prototype/headers.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.headers\n\nThe **`headers`** read-only property of the\n[`Response`](../../../globals/Response/Response.mdx) interface contains the [`Headers`](../../../globals/Headers/Headers.mdx) object associated\nwith the response.\n\n## Value\n\nA [`Headers`](../../Headers/Headers.mdx) object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Response/prototype/ip.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.ip\n\nThe **`ip`** getter of the `Response` interface returns the IP address associated with the request, as either an IPv6 or IPv4 string.\n\nIn the case where no IP address is available (say the response is cached, or was manually created), `undefined` will be returned.\n\nTo ensure an origin request with an IP, pass a [`CacheOverride`](../../../fastly:cache-override/CacheOverride/CacheOverride.mdx) value.\n\n## Value\n\n`undefined` or `string`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Response/prototype/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.json()\n\nThe **`json()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface takes\na [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion. It returns a promise which\nresolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA [`Promise`](../../../globals/Promise/Promise.mdx) that resolves to a JavaScript object. This object could be\nanything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Response/prototype/ok.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.ok\n\nThe **`ok`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains a Boolean stating whether the response was successful (status in the range 200-299) or not.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Response/prototype/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.port\n\nThe **`port`** getter of the `Response` interface returns the port associated with the request, as a number.\n\nIn the case where no port is available (say the response is cached, or was manually created), `undefined` will be returned.\n\nTo ensure an origin request with a port, pass a [`CacheOverride`](../../../fastly:cache-override/CacheOverride/CacheOverride.mdx) value.\n\n## Value\n\n`undefined` or `number`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Response/prototype/setManualFramingHeaders.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.setManualFramingHeaders()\n\nThe **`setManualFramingHeaders()`** method of the `Response` interface controls how the framing headers should be determined.\n\nBy default the framing headers are set to \"automatic\" mode, which means they are created based on the body of the associated Response instance.\nIn \"automatic\" mode, a `Content-Length` is used when the size of the body can be determined before it is sent.\nResponses sent in streaming mode, where headers are sent immediately but the content of the body is streamed later, will receive a `Transfer-Encoding: chunked` to accommodate the dynamic generation of the body.\nIn \"manual\" mode, any `Content-Length` or `Transfer-Encoding` headers will be honored.\nYou must ensure that those headers have correct values permitted by the [HTTP/1.1 specification](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).\nIf the provided headers are not permitted by the specification, the headers will revert to \"automatic\" mode and a diagnostic message will be logged about what was wrong.\nIf a `Content-Length` is permitted by the specification, but the value does not match the size of the actual body, the body will either be truncated (if it is too long), or the connection will be hung up early (if it is too short).\n\n## Syntax\n\n```js\nsetManualFramingHeaders(manual)\n```\n\n### Parameters\n\n- `manual` _: boolean_\n  - : Whether or not to use \"manual\" mode for the framing headers.\n\n### Return value\n\n`undefined`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Response/prototype/status.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.status\n\nThe **`status`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains the HTTP status code of the response.\n\nFor example, `200` for success, `404` if the resource could not be found.\n\n## Value\n\nAn unsigned short number.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Response/prototype/statusText.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.statusText\n\nThe **`statusText`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains the status message corresponding to the HTTP status code in [`status`](../../../globals/Response/prototype/status.mdx).\n\nFor example, this would be `OK` for a status code `200`, `Continue` for `100`, `Not Found` for `404`.\n\n## Value\n\nA [`String`](../../../globals/String/String.mdx) containing the HTTP status message associated with the response.\nThe default value is \"\".\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Response/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.text()\n\nThe **`text()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface takes a [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion.\nIt returns a promise that resolves with a [`String`](../../../globals/String/String.mdx).\nThe response is _always_ decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Promise that resolves with a [`String`](../../../globals/String/String.mdx).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Response/prototype/url.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.url\n\nThe **`url`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains the URL of the response.\nThe value of the `url` property will be the final URL obtained after any redirects.\n\n## Value\n\nA string.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Response/redirect.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Response.redirect()\n\nThe **`redirect()`** static method of the `Response` interface returns a `Response` resulting in a redirect to the specified URL.\n\n## Syntax\n\n```js\nResponse.redirect(url)\nResponse.redirect(url, status)\n```\n\n### Parameters\n\n- `url`\n  - : The URL that the new response is to originate from.\n- `status` __optional__\n  - : An optional status code for the response (e.g., `302`.)\n\n### Return value\n\nA `Response` object.\n\n### Exceptions\n\n- `RangeError`\n  - : The specified status is not a redirect status.\n- `TypeError`\n  - : The specified URL is invalid.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/RsaHashedImportParams/RsaHashedImportParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RsaHashedImportParams\n\nThe **`RsaHashedImportParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.importKey()`, when importing any RSA-based key pair.\n\n## Instance properties\n\n- `name`\n  - : A string. This should be set to `RSASSA-PKCS1-v1_5`.\n\n- `hash`\n  - : A string representing the name of the digest function to use. This can be one of `SHA-256`, `SHA-384`, or `SHA-512`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Set/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get Set\\[Symbol.species]\n\nThe **`Set[Symbol.species]`** accessor property is an unused accessor property specifying how to copy `Set` objects.\n\n## Syntax\n\n```js\nSet[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct copied `Set` instances.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `Set` objects. Subclass constructors may override it to change the constructor assignment.\n\n> **Note:** This property is currently unused by all `Set` methods.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Set/Set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set()\n\nThe **`Set` constructor** lets you\ncreate `Set` objects that store unique values of any type, whether [primitive values](https://developer.mozilla.org/docs/Glossary/Primitive) or object\nreferences.\n\n## Syntax\n\n```js\nnew Set()\nnew Set(iterable)\n```\n\n> **Note:** `Set()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable` _**optional**_\n\n  - : If an [iterable object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) is passed, all of its elements will be added to the new\n    `Set`.\n\n    If you don't specify this parameter, or its value is `null`, the new\n    `Set` is empty.\n\n### Return value\n\nA new `Set` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Set/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype\\[Symbol.iterator]()\n\nThe **`[Symbol.iterator`** method of a `Set` object implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows sets to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the values of the set.\n\nThe initial value of this property is the same function object as the initial value of the [`Set.prototype.values`](../../../globals/Set/prototype/values.mdx) property.\n\n## Syntax\n\n```js\nset[Symbol.iterator]()\n```\n\n### Return value\n\nThe same return value as [`Set.prototype.values()`](../../../globals/Set/prototype/values.mdx): a new iterable iterator object that yields the values of the set.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Set/prototype/add.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.add()\n\nThe **`add()`** method inserts a new element with a specified value in to a `Set` object, if there isn't an element with the same value already in the `Set`.\n\n## Syntax\n\n```js\nadd(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value of the element to add to the `Set` object.\n\n### Return value\n\nThe `Set` object with added value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Set/prototype/clear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.clear()\n\nThe **`clear()`** method removes all elements from a\n`Set` object.\n\n## Syntax\n\n```js\nclear()\n```\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Set/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.delete()\n\nThe **`delete()`** method removes a specified value from a\n`Set` object, if it is in the set.\n\n## Syntax\n\n```js\ndelete(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to remove from `Set`.\n\n### Return value\n\nReturns `true` if `value` was already in\n`Set`; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Set/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.entries()\n\nThe **`entries()`** method returns a new [Iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators) object\nthat contains **an array of `[value, value]`** for each element\nin the `Set` object, in insertion order. For `Set` objects there\nis no `key` like in `Map` objects. However, to keep the API\nsimilar to the `Map` object, each _entry_ has the same value for its\n_key_ and _value_ here, so that an array `[value, value]` is\nreturned.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nA new iterator object that contains an array of `[value, value]` for each\nelement in the given `Set`, in insertion order.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Set/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.forEach()\n\nThe **`forEach()`** method executes a provided function once\nfor each value in the `Set` object, in insertion order.\n\n## Syntax\n\n```js\n// Arrow function\nforEach(() => { /* ... */ } )\nforEach((value) => { /* ... */ } )\nforEach((value, key) => { /* ... */ } )\nforEach((value, key, set) => { /* ... */ } )\n\n// Callback function\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n\n// Inline callback function\nforEach(function() { /* ... */ })\nforEach(function(value) { /* ... */ })\nforEach(function(value, key) { /* ... */ })\nforEach(function(value, key, set) { /* ... */ })\nforEach(function(value, key, set) { /* ... */ }, thisArg)\n```\n\n### Parameters\n\n- `callback`\n\n  - : Function to execute for each element, taking three arguments:\n\n    - `value`, `key`\n      - : The current element being processed in the `Set`. As there are no\n        keys in `Set`, the value is passed for both arguments.\n    - `set`\n      - : The `Set` object which `forEach()` was called upon.\n\n- `thisArg`\n  - : Value to use as `this` when executing `callbackFn`.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n## Description\n\nThe `forEach()` method executes the provided\n`callback` once for each value which actually exists in the\n`Set` object. It is not invoked for values which have been deleted. However,\nit is executed for values which are present but have the value `undefined`.\n\n`callback` is invoked with **three arguments**:\n\n- the **element value**\n- the **element key**\n- the **`Set` object being traversed**\n\nThere are no keys in `Set` objects, however, so the first two arguments are\nboth **values** contained in the [Set](../../../globals/Set/Set.mdx). This is to make it\nconsistent with other `forEach()` methods for [`Map.prototype.forEach()`](../../../globals/Map/prototype/forEach.mdx) and [`Array.prototype.forEach()`](../../../globals/Array/prototype/forEach.mdx).\n\nIf a `thisArg` parameter is provided to `forEach()`,\nit will be passed to `callback` when invoked, for use as its\n`this` value. Otherwise, the value `undefined` will be passed for\nuse as its `this` value. The `this` value ultimately observable by\n`callback` is determined according to\n[the usual rules for determining the `this` seen by a function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this).\n\nEach value is visited once, except in the case when it was deleted and re-added before\n`forEach()` has finished. `callback` is not invoked for\nvalues deleted before being visited. New values added before `forEach()` has\nfinished will be visited.\n\n`forEach()` executes the `callback` function once for\neach element in the `Set` object; it does not return a value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Set/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.has()\n\nThe **`has()`** method returns a boolean indicating whether an\nelement with the specified value exists in a `Set` object or not.\n\n## Syntax\n\n```js\nhas(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to test for presence in the `Set` object.\n\n### Return value\n\nReturns `true` if an element with the specified value exists in the `Set` object; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Set/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.keys()\n\nThe **`keys()`** method is an alias for the [`values()`](../../../globals/Set/prototype/values.mdx) method.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nA new iterator object containing the values for each element in the given\n`Set`, in insertion order.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Set/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.size\n\nThe **`size`** accessor property returns the number of (unique) elements in a [Set](../../../globals/Set/Set.mdx) object.\n\n## Description\n\nThe value of `size` is an integer representing how many entries the `Set` object has. A set accessor function for `size` is `undefined`; you cannot change this property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Set/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.values()\n\nThe **`values()`** method returns a new [Iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators) object that\ncontains the values for each element in the `Set` object in insertion order.\n\n> **Note:** The **`keys()`** method is an alias\n> for this method (for similarity with [Map](../../../globals/Map/Map.mdx) objects), hence the\n> `keys()` page redirecting here. It behaves exactly the same and returns\n> **values** of `Set` elements.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nA new iterator object containing the values for each element in the given\n`Set`, in insertion order.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/String/String.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String() constructor\n\nThe **`String`** constructor is used to create a new\n`String` object. When called instead as a function, it performs type\nconversion to a \"primitive string\" which is usually more\nuseful.\n\n## Syntax\n\n```js\nnew String(thing)\nString(thing)\n```\n\n> **Note:** `String()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\n- `thing`\n  - : Anything to be converted to a string.\n\n### Return value\n\nWhen `String` is called as a constructor (with `new`), it creates a `String` object, which is **not** a primitive.\n\nWhen `String` is called as a function, it coerces the parameter to a string primitive. `Symbol` values would be converted to `\"Symbol(description)\"`, where `description` is the [description](../../globals/Symbol/prototype/description.mdx) of the Symbol, instead of throwing.\n\n> **Warning:** You should rarely find yourself using `String` as a constructor.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/String/fromCharCode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.fromCharCode()\n\nThe static **`String.fromCharCode()`** method returns a string\ncreated from the specified sequence of UTF-16 code units.\n\n## Syntax\n\n```js\nString.fromCharCode(num1)\nString.fromCharCode(num1, num2)\nString.fromCharCode(num1, num2, /* …, */ numN)\n```\n\n### Parameters\n\n- `num1, ..., numN`\n  - : A sequence of numbers that are UTF-16 code units. The range is between\n    `0` and `65535` (`0xFFFF`). Numbers greater than\n    `0xFFFF` are truncated. No validity checks are performed.\n\n### Return value\n\nA string of length `N` consisting of the\n`N` specified UTF-16 code units.\n\n## Description\n\nThis method returns a string and not a `String` object.\n\nBecause `fromCharCode()` is a static method of `String`, you\nalways use it as `String.fromCharCode()`, rather than as a method of a\n`String` object you created.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/String/fromCodePoint.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.fromCodePoint()\n\nThe static **`String.fromCodePoint()`** method returns a string\ncreated by using the specified sequence of code points.\n\n## Syntax\n\n```js\nString.fromCodePoint(num1)\nString.fromCodePoint(num1, num2)\nString.fromCodePoint(num1, num2, /* …, */ numN)\n```\n\n### Parameters\n\n- `num1, ..., numN`\n  - : A sequence of code points.\n\n### Return value\n\nA string created by using the specified sequence of code points.\n\n### Exceptions\n\n- A `RangeError` is thrown if an invalid Unicode\n  code point is given (e.g. `\"RangeError: NaN is not a valid code point\"`).\n\n## Description\n\nThis method returns a string (and _not_ a `String` object).\n\nBecause `fromCodePoint()` is a static method of `String`, you\nmust call it as `String.fromCodePoint()`, rather than as a method of a\n`String` object you created.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/String/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype\\[Symbol.iterator]()\n\nThe **`Symbol.iterator`** method of a string implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows strings to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the Unicode code points of the string value as individual strings.\n\n## Syntax\n\n```js\nstring[Symbol.iterator]()\n```\n\n### Return value\n\nA new iterable iterator object that yields the Unicode code points of the string value as individual strings.\n\n## Description\n\nStrings are iterated by Unicode code points. This means grapheme clusters will be split, but surrogate pairs will be preserved.\n\n```js\n// \"Backhand Index Pointing Right: Dark Skin Tone\"\n[...\"👉🏿\"]; // ['👉', '🏿']\n// splits into the basic \"Backhand Index Pointing Right\" emoji and\n// the \"Dark skin tone\" emoji\n\n// \"Family: Man, Boy\"\n[...\"👨‍👦\"]; // [ '👨', '‍', '👦' ]\n// splits into the \"Man\" and \"Boy\" emoji, joined by a ZWJ\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/String/prototype/at.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.at()\n\nThe **`at()`** method takes an integer value and returns a `('String` consisting of the single UTF-16 code unit located at the specified offset. This method allows for positive and negative integers. Negative integers count back from the last string character.\n\n## Syntax\n\n```js\nat(index)\n```\n\n### Parameters\n\n- `index`\n  - : The index (position) of the string character to be returned. Supports relative indexing from the end of the string when passed a negative index; i.e. if a negative number is used, the character returned will be found by counting back from the end of the string.\n\n### Return value\n\n`('String` consisting of the single UTF-16 code unit located at the specified position. Returns [`undefined`](../../../globals/undefined.mdx) if the given index can not be found.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/String/prototype/charAt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.charAt()\n\nThe `String` object's\n**`charAt()`** method returns a new string consisting of the\nsingle UTF-16 code unit located at the specified offset into the string.\n\n## Syntax\n\n```js\ncharAt(index)\n```\n\n### Parameters\n\n- `index`\n  - : An integer between `0` and `str.length - 1`. If the\n    `index` cannot be converted to the integer or no\n    `index` is provided, the default is `0`, so the first\n    character of `str` is returned.\n\n### Return value\n\nA string representing the character (exactly one UTF-16 code unit) at the specified\n`index`. If `index` is out of range,\n`charAt()` returns an empty string.\n\n## Description\n\nCharacters in a string are indexed from left to right. The index of the first character\nis `0`, and the index of the last character—in a string called\n`stringName` is `stringName.length - 1`. If\nthe `index` you supply is out of this range, JavaScript returns an\nempty string.\n\nIf no `index` is provided to `charAt()`, the default\nis `0`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/String/prototype/charCodeAt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.charCodeAt()\n\nThe **`charCodeAt()`** method returns\nan integer between `0` and `65535` representing the UTF-16 code\nunit at the given index.\n\nThe UTF-16 code unit matches the Unicode code point for code points which can be\nrepresented in a single UTF-16 code unit. If the Unicode code point cannot be\nrepresented in a single UTF-16 code unit (because its value is greater than\n`0xFFFF`) then the code unit returned will be _the first part of a\nsurrogate pair_ for the code point. If you want the entire code point value, use\n[`codePointAt()`](../../../globals/String/prototype/codePointAt.mdx).\n\n## Syntax\n\n```js\ncharCodeAt(index)\n```\n\n### Parameters\n\n- `index`\n  - : An integer greater than or equal to `0` and less than the\n    `length` of the string. If `index` is not a number,\n    it defaults to `0`.\n\n### Return value\n\nA number representing the UTF-16 code unit value of the character at the given\n`index`. If `index` is out of range,\n`charCodeAt()` returns `NaN`.\n\n## Description\n\nUnicode code points range from `0` to `1114111`\n(`0x10FFFF`). The first 128 Unicode code points are a direct match of the\nASCII character encoding. (For information on Unicode, see [UTF-16 characters, Unicode codepoints, and grapheme clusters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters).)\n\n> **Note:** `charCodeAt()` will always return a value that is\n> less than `65536`. This is because the higher code points are represented\n> by _a pair_ of (lower valued) \"surrogate\" pseudo-characters which are used to\n> comprise the real character.\n>\n> Because of this, in order to examine (or reproduce) the full character for individual\n> character values of `65536` or greater, for such characters, it is\n> necessary to retrieve not only `charCodeAt(i)`, but also\n> `charCodeAt(i+1)` (as if manipulating a string with two\n> letters), or to use `codePointAt(i)` instead. See examples 2 and\n> 3 (below).\n\n`charCodeAt()` returns `NaN` if the given\nindex is less than `0`, or if it is equal to or greater than the\n`length` of the string.\n\nBackward compatibility: In historic versions (like JavaScript 1.2) the\n`charCodeAt()` method returns a number indicating the ISO-Latin-1 codeset\nvalue of the character at the given index. The ISO-Latin-1 codeset ranges from\n`0` to `255`. The first `0` to `127` are a\ndirect match of the ASCII character set.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/String/prototype/codePointAt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.codePointAt()\n\nThe **`codePointAt()`** method returns a non-negative integer\nthat is the Unicode code point value at the given position.\nNote that this function does not give the nth code point in a string,\nbut the code point starting at the specified string index.\n\n## Syntax\n\n```js\ncodePointAt(pos)\n```\n\n### Parameters\n\n- `pos`\n  - : Position of an element in `str` to return the code point value\n    from.\n\n### Return value\n\nA decimal number representing the code point value of the character at the given `pos`.\n\n- If there is no element at `pos`, returns [`undefined`](../../../globals/undefined.mdx).\n- If the element at `pos` is a UTF-16 high surrogate, returns the code point of the surrogate _pair_.\n- If the element at `pos` is a UTF-16 low surrogate, returns _only_ the low surrogate code point.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/String/prototype/concat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.concat()\n\nThe **`concat()`** method concatenates\nthe string arguments to the calling string and returns a new string.\n\n## Syntax\n\n```js\nconcat(str1)\nconcat(str1, str2)\nconcat(str1, str2, /* …, */ strN)\n```\n\n### Parameters\n\n- `strN`\n  - : One or more strings to concatenate to `str`.\n\n### Return value\n\nA new string containing the combined text of the strings provided.\n\n## Description\n\nThe `concat()` function concatenates the string arguments to the calling\nstring and returns a new string. Changes to the original string or the returned string\ndon't affect the other.\n\nIf the arguments are not of the type string, they are converted to string values before\nconcatenating.\n\nThe `concat()` method is very similar to the [addition/string concatenation operators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Addition) (`+`, `+=`), except that `concat()` [coerces its arguments directly to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion), while addition coerces its operands to primitives first. For more information, see the reference page for the [`+` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Addition).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/String/prototype/endsWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.endsWith()\n\nThe **`endsWith()`** method determines whether a string ends with the characters of a specified string, returning `true` or `false` as appropriate.\n\n## Syntax\n\n```js\nendsWith(searchString)\nendsWith(searchString, endPosition)\n```\n\n### Parameters\n\n- `searchString`\n  - : The characters to be searched for at the end of `str`. Cannot be a regex.\n- `endPosition` _**optional**_\n  - : The end position at which `searchString` is expected to be found (the index of `searchString`'s last character plus 1). Defaults to `str.length`.\n\n### Return value\n\n**`true`** if the given characters are found at the end of the string; otherwise, **`false`**.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If `searchString` is a regex.\n\n## Description\n\nThis method lets you determine whether or not a string ends with another string. This method is case-sensitive.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/String/prototype/includes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.includes()\n\nThe **`includes()`** method performs a case-sensitive search to determine whether one string may be found within another string, returning `true` or `false` as appropriate.\n\n## Syntax\n\n```js\nincludes(searchString)\nincludes(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n  - : A string to be searched for within `str`. Cannot be a regex.\n- `position` _**optional**_\n  - : The position within the string at which to begin searching for `searchString`. (Defaults to `0`.)\n\n### Return value\n\n**`true`** if the search string is found anywhere within the given string; otherwise, **`false`** if not.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If `searchString` is a regex.\n\n## Description\n\nThis method lets you determine whether or not a string includes another string.\n\n### Case-sensitivity\n\nThe `includes()` method is case sensitive. For example, the following expression returns `false`:\n\n```js\n\"Blue Whale\".includes(\"blue\"); // returns false\n```\n\nYou can work around this constraint by transforming both the original string and the search string to all lowercase:\n\n```js\n\"Blue Whale\".toLowerCase().includes(\"blue\"); // returns true\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/String/prototype/indexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.indexOf()\n\nThe **`indexOf()`** method, given one argument: a substring to search for, searches the entire calling string, and returns the index of the first occurrence of the specified substring. Given a second argument: a number, the method returns the first occurrence of the specified substring at an index greater than or equal to the specified number.\n\n## Syntax\n\n```js\nindexOf(searchString)\nindexOf(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n\n  - : Substring to search for, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion).\n\n    If the method is called with no arguments, `searchString` is coerced to `\"undefined\"`. Therefore,`\"undefined\".indexOf()` returns `0` — because the substring `\"undefined\"` is found at position `0` in the string `\"undefined\"`. But `\"undefine\".indexOf()`, returns `-1` — because the substring `\"undefined\"` is not found in the string `\"undefine\"`.\n\n- `position` _**optional**_\n\n  - : The method returns the index of the first occurrence of the specified substring at a position greater than or equal to `position`, which defaults to `0`. If `position` is greater than the length of the calling string, the method doesn't search the calling string at all. If `position` is less than zero, the method behaves as it would if `position` were `0`.\n\n    - `'hello world hello'.indexOf('o', -5)` returns `4` — because it causes the method to behave as if the second argument were `0`, and the first occurrence of `o` at a position greater or equal to `0` is at position `4`.\n\n    - `'hello world hello'.indexOf('world', 12)` returns `-1` — because, while it's true the substring `world` occurs at index `6`, that position is not greater than or equal to `12`.\n\n    - `'hello world hello'.indexOf('o', 99)` returns `-1` — because `99` is greater than the length of `hello world hello`, which causes the method to not search the string at all.\n\n### Return value\n\nThe index of the first occurrence of `searchString` found, or `-1` if not found.\n\n#### Return value when using an empty search string\n\nSearching for an empty search string produces strange results. With no second argument, or with a second argument whose value is less than the calling string's length, the return value is the same as the value of the second argument:\n\n```js\n\"hello world\".indexOf(\"\"); // returns 0\n\"hello world\".indexOf(\"\", 0); // returns 0\n\"hello world\".indexOf(\"\", 3); // returns 3\n\"hello world\".indexOf(\"\", 8); // returns 8\n```\n\nHowever, with a second argument whose value is greater than or equal to the string's length, the return value is the string's length:\n\n```js\n\"hello world\".indexOf(\"\", 11); // returns 11\n\"hello world\".indexOf(\"\", 13); // returns 11\n\"hello world\".indexOf(\"\", 22); // returns 11\n```\n\nIn the former instance, the method behaves as if it found an empty string just after the position specified in the second argument. In the latter instance, the method behaves as if it found an empty string at the end of the calling string.\n\n## Description\n\nStrings are zero-indexed: The index of a string's first character is `0`, and the index of a string's last character is the length of the string minus 1.\n\n```js\n\"Blue Whale\".indexOf(\"Blue\"); // returns  0\n\"Blue Whale\".indexOf(\"Blute\"); // returns -1\n\"Blue Whale\".indexOf(\"Whale\", 0); // returns  5\n\"Blue Whale\".indexOf(\"Whale\", 5); // returns  5\n\"Blue Whale\".indexOf(\"Whale\", 7); // returns -1\n\"Blue Whale\".indexOf(\"\"); // returns  0\n\"Blue Whale\".indexOf(\"\", 9); // returns  9\n\"Blue Whale\".indexOf(\"\", 10); // returns 10\n\"Blue Whale\".indexOf(\"\", 11); // returns 10\n```\n\nThe `indexOf()` method is case sensitive. For example, the following\nexpression returns `-1`:\n\n```js\n\"Blue Whale\".indexOf(\"blue\"); // returns -1\n```\n\n### Checking occurrences\n\nWhen checking if a specific substring occurs within a string, the correct way to check is test whether the return value is `-1`:\n\n```js\n\"Blue Whale\".indexOf(\"Blue\") !== -1; // true; found 'Blue' in 'Blue Whale'\n\"Blue Whale\".indexOf(\"Bloe\") !== -1; // false; no 'Bloe' in 'Blue Whale'\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/String/prototype/lastIndexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.lastIndexOf()\n\nThe **`lastIndexOf()`** method, given one argument: a substring to search for, searches the entire calling string, and returns the index of the last occurrence of the specified substring. Given a second argument: a number, the method returns the last occurrence of the specified substring at an index less than or equal to the specified number.\n\n## Syntax\n\n```js\nlastIndexOf(searchString)\nlastIndexOf(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n\n  - : Substring to search for, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion).\n\n    If the method is called with no arguments, `searchString` is coerced to `\"undefined\"`. Therefore,`\"undefined\".lastIndexOf()` returns `0` — because the substring `\"undefined\"` is found at position `0` in the string `\"undefined\"`. But `\"undefine\".lastIndexOf()`, returns `-1` — because the substring `\"undefined\"` is not found in the string `\"undefine\"`.\n\n- `position` _**optional**_\n\n  - : The method returns the index of the last occurrence of the specified substring at a position less than or equal to `position`, which defaults to `+Infinity`. If `position` is greater than the length of the calling string, the method searches the entire string. If `position` is less than `0`, the behavior is the same as for `0` — that is, the method looks for the specified substring only at index `0`.\n\n    - `'hello world hello'.lastIndexOf('world', 4)` returns `-1` — because, while the substring `world` does occurs at index `6`, that position is not less than or equal to `4`.\n\n    - `'hello world hello'.lastIndexOf('hello', 99)` returns `12` — because the last occurrence of `hello` at a position less than or equal to `99` is at position `12`.\n\n    - `'hello world hello'.lastIndexOf('hello', 0)` and `'hello world hello'.lastIndexOf('hello', -5)` both return `0` — because both cause the method to only look for `hello` at index `0`.\n\n### Return value\n\nThe index of the last occurrence of `searchString` found, or `-1` if not found.\n\n## Description\n\nStrings are zero-indexed: The index of a string's first character is `0`, and the index of a string's last character is the length of the string minus 1.\n\n```js\n\"canal\".lastIndexOf(\"a\"); // returns 3\n\"canal\".lastIndexOf(\"a\", 2); // returns 1\n\"canal\".lastIndexOf(\"a\", 0); // returns -1\n\"canal\".lastIndexOf(\"x\"); // returns -1\n\"canal\".lastIndexOf(\"c\", -5); // returns 0\n\"canal\".lastIndexOf(\"c\", 0); // returns 0\n\"canal\".lastIndexOf(\"\"); // returns 5\n\"canal\".lastIndexOf(\"\", 2); // returns 2\n```\n\n### Case-sensitivity\n\nThe `lastIndexOf()` method is case sensitive. For example, the following\nexpression returns `-1`:\n\n```js\n\"Blue Whale, Killer Whale\".lastIndexOf(\"blue\"); // returns -1\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/String/prototype/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.length\n\nThe **`length`** data property of a string contains the length of the string in UTF-16 code units.\n\n## Value\n\nA non-negative integer.\n\n## Description\n\nThis property returns the number of code units in the string. JavaScript uses [UTF-16](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters) encoding, where each Unicode character may be encoded as one or two code units, so it's possible for the value returned by `length` to not match the actual number of Unicode characters in the string. For common scripts like Latin, Cyrillic, wellknown CJK characters, etc., this should not be an issue, but if you are working with certain scripts, such as emojis, [mathematical symbols](https://en.wikipedia.org/wiki/Mathematical_Alphanumeric_Symbols), or obscure Chinese characters, you may need to account for the difference between code units and characters.\n\nThe language specification requires strings to have a maximum length of 2<sup>53</sup> - 1 elements, which is the upper limit for [precise integers](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER). However, a string with this length needs 16384TiB of storage, which cannot fit in any reasonable device's memory, so implementations tend to lower the threshold, which allows the string's length to be conveniently stored in a 32-bit integer.\n\n- In V8 (used by Chrome and Node), the maximum length is 2<sup>29</sup> - 24 (\\~1GiB). On 32-bit systems, the maximum length is 2<sup>28</sup> - 16 (\\~512MiB).\n- In Firefox, the maximum length is 2<sup>30</sup> - 2 (\\~2GiB). Before Firefox 65, the maximum length was 2<sup>28</sup> - 1 (\\~512MiB).\n- In Safari, the maximum length is 2<sup>31</sup> - 1 (\\~4GiB).\n\nFor an empty string, `length` is 0.\n\nThe static property `String.length` is unrelated to the length of strings. It's the [arity](../../../globals/Function/prototype/length.mdx) of the `String` function (loosely, the number of formal parameters it has), which is 1.\n\nSince `length` counts code units instead of characters, if you want to get the number of characters, you can first split the string with its [iterator](../../../globals/String/prototype/@@iterator.mdx), which iterates by characters:\n\n```js\nfunction getCharacterLength(str) {\n  // The string iterator that is used here iterates over characters,\n  // not mere code units\n  return [...str].length;\n}\n\nconsole.log(getCharacterLength(\"A\\uD87E\\uDC04Z\")); // 3\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/String/prototype/localeCompare.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.localeCompare()\n\nThe **`localeCompare()`** method returns a number indicating whether a reference string comes before, or after, or is the same as the given string in sort order. In implementations with [`Intl.Collator` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator) support, this method simply calls `Intl.Collator`.\n\n## Syntax\n\n```js\nlocaleCompare(compareString)\nlocaleCompare(compareString, locales)\nlocaleCompare(compareString, locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` parameters customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.Collator` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator), these parameters correspond exactly to the [`Intl.Collator()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator) constructor's parameters. Implementations without `Intl.Collator` support are asked to ignore both parameters, making the comparison result returned entirely implementation-dependent — it's only required to be _consistent_.\n\n- `compareString`\n  - : The string against which the `referenceStr` is compared.\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator#locales) parameter of the `Intl.Collator()` constructor.\n\n    In implementations without `Intl.Collator` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator#options) parameter of the `Intl.Collator()` constructor.\n\n    In implementations without `Intl.Collator` support, this parameter is ignored.\n\nSee the [`Intl.Collator()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator) for details on the `locales` and `options` parameters and how to use them.\n\n### Return value\n\nA **negative** number if `referenceStr` occurs before `compareString`; **positive** if the `referenceStr` occurs after `compareString`; `0` if they are equivalent.\n\nIn implementations with `Intl.Collator`, this is equivalent to `new Intl.Collator(locales, options).compare(referenceStr, compareString)`.\n\n## Description\n\nReturns an integer indicating whether the `referenceStr` comes\nbefore, after or is equivalent to the `compareString`.\n\n- Negative when the `referenceStr` occurs before\n  `compareString`\n- Positive when the `referenceStr` occurs after\n  `compareString`\n- Returns `0` if they are equivalent\n\n> **Warning:** Do not rely on exact return values of `-1` or `1`!\n>\n> Negative and positive integer results vary between browsers (as well as between\n> browser versions) because the W3C specification only mandates negative and positive\n> values. Some browsers may return `-2` or `2`, or even some other\n> negative or positive value.\n\n## Performance\n\nWhen comparing large numbers of strings, such as in sorting large arrays, it is better to create an [`Intl.Collator`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator) object and use the function provided by its [`compare()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/compare) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/String/prototype/match.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.match()\n\nThe **`match()`** method retrieves the result of matching a string against a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions).\n\n## Syntax\n\n```js\nmatch(regexp)\n```\n\n### Parameters\n\n- `regexp`\n\n  - : A regular expression object, or any object that has a [`Symbol.match`](../../../globals/Symbol/match.mdx) method.\n\n    If `regexp` is not a `RegExp` object and does not have a `Symbol.match` method, it is implicitly converted to a `RegExp` by using `new RegExp(regexp)`.\n\n    If you don't give any parameter and use the `match()` method directly, you will get an `Array` with an empty string: `[\"\"]`, because this is equivalent to `match(/(?:)/)`.\n\n### Return value\n\nAn `Array` whose contents depend on the presence or absence of the global (`g`) flag, or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) if no matches are found.\n\n- If the `g` flag is used, all results matching the complete regular expression will be returned, but capturing groups are not included.\n- If the `g` flag is not used, only the first complete match and its related capturing groups are returned. In this case, `match()` will return the same result as `RegExp.prototype.exec()` (an array with some extra properties).\n\n## Description\n\nThe implementation of `String.prototype.match` itself is very simple — it simply calls the `Symbol.match` method of the argument with the string as the first parameter. The actual implementation comes from [`RegExp.prototype[@@match]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@match).\n\n- If you need to know if a string matches a regular expression `RegExp`, use `RegExp.prototype.test()`.\n- If you only want the first match found, you might want to use `RegExp.prototype.exec()` instead.\n- If you want to obtain capture groups and the global flag is set, you need to use `RegExp.prototype.exec()` or [`String.prototype.matchAll()`](../../../globals/String/prototype/matchAll.mdx) instead.\n\nFor more information about the semantics of `match()` when a regex is passed, see [`RegExp.prototype[@@match]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@match).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/String/prototype/matchAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.matchAll()\n\nThe **`matchAll()`** method returns an iterator of all results matching a string against a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions), including [capturing groups](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions/Groups_and_Backreferences).\n\n## Syntax\n\n```js\nmatchAll(regexp)\n```\n\n### Parameters\n\n- `regexp`\n\n  - : A regular expression object, or any object that has a [`Symbol.matchAll`](../../../globals/Symbol/matchAll.mdx) method.\n\n    If `regexp` is not a `RegExp` object and does not have a `Symbol.matchAll` method, it is implicitly converted to a `RegExp` by using `new RegExp(regexp, 'g')`.\n\n    If `regexp` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes), then it must have the global (`g`) flag set, or a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Return value\n\nAn [iterable iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators) (which is not restartable) of matches. Each match is an array with the same shape as the return value of `RegExp.prototype.exec()`.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown if the `regexp` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes) that does not have the global (`g`) flag set (its [`flags`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/flags) property does not contain `\"g\"`).\n\n## Description\n\nThe implementation of `String.prototype.matchAll` itself is very simple — it simply calls the `Symbol.matchAll` method of the argument with the string as the first parameter (apart from the extra input validation that the regex is global). The actual implementation comes from [`RegExp.prototype[@@matchAll]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@matchAll).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/String/prototype/padEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.padEnd()\n\nThe **`padEnd()`** method pads the current string with a given\nstring (repeated, if needed) so that the resulting string reaches a given length. The\npadding is applied from the end of the current string.\n\n## Syntax\n\n```js\npadEnd(targetLength)\npadEnd(targetLength, padString)\n```\n\n### Parameters\n\n- `targetLength`\n  - : The length of the resulting string once the current `str` has\n    been padded. If the value is lower than `str.length`, the\n    current string will be returned as-is.\n- `padString` _**optional**_\n  - : The string to pad the current `str` with. If\n    `padString` is too long to stay within\n    `targetLength`, it will be truncated: for left-to-right\n    languages the left-most part and for right-to-left languages the right-most will be\n    applied. The default value for this parameter is \" \"\n    (`U+0020`).\n\n### Return value\n\nA `String` of the specified `targetLength` with the\n`padString` applied at the end of the current\n`str`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/String/prototype/padStart.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.padStart()\n\nThe **`padStart()`** method pads the\ncurrent string with another string (multiple times, if needed) until the resulting\nstring reaches the given length. The padding is applied from the start of the\ncurrent string.\n\n## Syntax\n\n```js\npadStart(targetLength)\npadStart(targetLength, padString)\n```\n\n### Parameters\n\n- `targetLength`\n  - : The length of the resulting string once the current `str` has\n    been padded. If the value is less than `str.length`, then\n    `str` is returned as-is.\n- `padString` _**optional**_\n  - : The string to pad the current `str` with. If\n    `padString` is too long to stay within the\n    `targetLength`, it will be truncated from the end.\n    The default value is the unicode \"space\" character (U+0020).\n\n### Return value\n\nA `String` of the specified `targetLength` with\n`padString` applied from the start.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/String/prototype/repeat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.repeat()\n\nThe **`repeat()`** method constructs and returns a new string\nwhich contains the specified number of copies of the string on which it was called,\nconcatenated together.\n\n## Syntax\n\n```js\nrepeat(count)\n```\n\n### Parameters\n\n- `count`\n  - : An integer between `0` and\n    [`+Infinity`](../../../globals/Number/POSITIVE_INFINITY.mdx), indicating the\n    number of times to repeat the string.\n\n### Return value\n\nA new string containing the specified number of copies of the given string.\n\n### Exceptions\n\n- Throws a `RangeError` if repeat count is negative.\n- Throws a `RangeError` if repeat count is infinity or overflows maximum string size.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/String/prototype/replace.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.replace()\n\nThe **`replace()`** method returns a new string with one, some, or all matches of a `pattern` replaced by a `replacement`. The `pattern` can be a string or a `RegExp`, and the `replacement` can be a string or a function called for each match. If `pattern` is a string, only the first occurrence will be replaced. The original string is left unchanged.\n\n## Syntax\n\n```js\nreplace(pattern, replacement)\n```\n\n### Parameters\n\n- `pattern`\n  - : Can be a string or an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method — the typical example being a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp). Any value that doesn't have the `Symbol.replace` method will be coerced to a string.\n- `replacement`\n  - : Can be a string or a function.\n    - If it's a string, it will replace the substring matched by `pattern`. A number of special replacement patterns are supported; see the [Specifying a string as the replacement](#specifying-a-string-as-the-replacement) section below.\n    - If it's a function, it will be invoked for every match and its return value is used as the replacement text. The arguments supplied to this function are described in the [Specifying a function as the replacement](#specifying-a-function-as-the-replacement) section below.\n\n### Return value\n\nA new string, with one, some, or all matches of the pattern replaced by the specified replacement.\n\n## Description\n\nThis method does not mutate the string value it's called on. It returns a new string.\n\nA string pattern will only be replaced once. To perform a global search and replace, use a regular expression with the `g` flag, or use [`replaceAll()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/replaceAll) instead.\n\nIf `pattern` is an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method (including `RegExp` objects), that method is called with the target string and `replacement` as arguments. Its return value becomes the return value of `replace()`. In this case the behavior of `replace()` is entirely encoded by the `@@replace` method — for example, any mention of \"capturing groups\" in the description below is actually functionality provided by [`RegExp.prototype[@@replace]`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@replace).\n\nIf the `pattern` is an empty string, the replacement is prepended to the start of the string.\n\n```js\n\"xxx\".replace(\"\", \"_\"); // \"_xxx\"\n```\n\nA regexp with the `g` flag is the only case where `replace()` replaces more than once. For more information about how regex properties (especially the [sticky](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky) flag) interact with `replace()`, see [`RegExp.prototype[@@replace]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@replace).\n\n### Specifying a string as the replacement\n\nThe replacement string can include the following special replacement patterns:\n\n| Pattern   | Inserts                                                                                        |\n| --------- | ---------------------------------------------------------------------------------------------- |\n| `$$`      | Inserts a `\"$\"`.                                                                               |\n| `$&`      | Inserts the matched substring.                                                                 |\n| `` $` ``  | Inserts the portion of the string that precedes the matched substring.                         |\n| `$'`      | Inserts the portion of the string that follows the matched substring.                          |\n| `$n`      | Inserts the `n`th (`1`-indexed) capturing group where `n` is a positive integer less than 100. |\n| `$<Name>` | Inserts the named capturing group where `Name` is the group name.                              |\n\n`$n` and `$<Name>` are only available if the `pattern` argument is a `RegExp` object. If the `pattern` is a string, or if the corresponding capturing group isn't present in the regex, then the pattern will be replaced as a literal. If the group is present but isn't matched (because it's part of a disjunction), it will be replaced with an empty string.\n\n```js\n\"foo\".replace(/(f)/, \"$2\");\n// \"$2oo\"; the regex doesn't have the second group\n\n\"foo\".replace(\"f\", \"$1\");\n// \"$1oo\"; the pattern is a string, so it doesn't have any groups\n\n\"foo\".replace(/(f)|(g)/, \"$2\");\n// \"oo\"; the second group exists but isn't matched\n```\n\n### Specifying a function as the replacement\n\nYou can specify a function as the second parameter. In this case, the function will be invoked after the match has been performed. The function's result (return value) will be used as the replacement string.\n\n> **Note:** The above-mentioned special replacement patterns do _not_ apply for strings returned from the replacer function.\n\nThe function has the following signature:\n\n```js\nfunction replacer(match, p1, p2, /* …, */ pN, offset, string, groups) {\n  return replacement;\n}\n```\n\nThe arguments to the function are as follows:\n\n- `match`\n  - : The matched substring. (Corresponds to `$&` above.)\n- `p1, p2, …, pN`\n  - : The `n`th string found by a capture group (including named capturing groups), provided the first argument to `replace()` is a `RegExp` object. (Corresponds to `$1`, `$2`, etc. above.) For example, if the `pattern` is `/(\\a+)(\\b+)/`, then `p1` is the match for `\\a+`, and `p2` is the match for `\\b+`. If the group is part of a disjunction (e.g. `\"abc\".replace(/(a)|(b)/, replacer)`), the unmatched alternative will be `undefined`.\n- `offset`\n  - : The offset of the matched substring within the whole string being examined. For example, if the whole string was `'abcd'`, and the matched substring was `'bc'`, then this argument will be `1`.\n- `string`\n  - : The whole string being examined.\n- `groups`\n  - : An object whose keys are the used group names, and whose values are the matched portions (`undefined` if not matched). Only present if the `pattern` contains at least one named capturing group.\n\nThe exact number of arguments depends on whether the first argument is a `RegExp` object — and, if so, how many capture groups it has.\n\nThe following example will set `newString` to `'abc - 12345 - #$*%'`:\n\n```js\nfunction replacer(match, p1, p2, p3, offset, string) {\n  // p1 is non-digits, p2 digits, and p3 non-alphanumerics\n  return [p1, p2, p3].join(\" - \");\n}\nconst newString = \"abc12345#$*%\".replace(/([^\\d]*)(\\d*)([^\\w]*)/, replacer);\nconsole.log(newString); // abc - 12345 - #$*%\n```\n\nThe function will be invoked multiple times for each full match to be replaced if the regular expression in the first parameter is global.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/String/prototype/replaceAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.replaceAll()\n\nThe **`replaceAll()`** method returns a new string with all matches of a `pattern` replaced by a `replacement`. The `pattern` can be a string or a `RegExp`, and the `replacement` can be a string or a function to be called for each match. The original string is left unchanged.\n\n## Syntax\n\n```js\nreplaceAll(pattern, replacement)\n```\n\n### Parameters\n\n- `pattern`\n\n  - : Can be a string or an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method — the typical example being a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp). Any value that doesn't have the `Symbol.replace` method will be coerced to a string.\n\n    If `pattern` is a regex, then it must have the global (`g`) flag set, or a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n- `replacement`\n  - : Can be a string or a function. The replacement has the same semantics as that of [`String.prototype.replace()`](../../../globals/String/prototype/replace.mdx).\n\n### Return value\n\nA new string, with all matches of a pattern replaced by a replacement.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown if the `pattern` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes) that does not have the global (`g`) flag set (its [`flags`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/flags) property does not contain `\"g\"`).\n\n## Description\n\nThis method does not mutate the string value it's called on. It returns a new string.\n\nUnlike [`String.prototype.replace()`](../../../globals/String/prototype/replace.mdx), this method would replace all occurrences of a string, not just the first one. This is especially useful if the string is not statically known, as calling the [`RegExp()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/RegExp) constructor without escaping special characters may unintentionally change its semantics.\n\n```js\nfunction unsafeRedactName(text, name) {\n  return text.replace(new RegExp(name, \"g\"), \"[REDACTED]\");\n}\nfunction safeRedactName(text, name) {\n  return text.replaceAll(name, \"[REDACTED]\");\n}\n\nconst report =\n  \"A hacker called ha.*er used special characters in their name to breach the system.\";\n\nconsole.log(unsafeRedactName(report, \"ha.*er\")); // \"A [REDACTED]s in their name to breach the system.\"\nconsole.log(safeRedactName(report, \"ha.*er\")); // \"A hacker called [REDACTED] used special characters in their name to breach the system.\"\n```\n\nIf `pattern` is an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method (including `RegExp` objects), that method is called with the target string and `replacement` as arguments. Its return value becomes the return value of `replaceAll()`. In this case the behavior of `replaceAll()` is entirely encoded by the `Symbol.replace` method, and therefore will have the same result as `replace()` (apart from the extra input validation that the regex is global).\n\nIf the `pattern` is an empty string, the replacement will be inserted in between every UTF-16 code unit, similar to [`String.prototype.split()`](../../../globals/String/prototype/split.mdx) behavior.\n\n```js\n\"xxx\".replaceAll(\"\", \"_\"); // \"_x_x_x_\"\n```\n\nFor more information about how regex properties (especially the [sticky](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky) flag) interact with `replaceAll()`, see [`RegExp.prototype[@@replace]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@replace).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/String/prototype/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.search()\n\nThe **`search()`** method executes a search for a match between a regular expression and this `String` object.\n\n## Syntax\n\n```js\nsearch(regexp)\n```\n\n### Parameters\n\n- `regexp`\n\n  - : A regular expression object, or any object that has a [`Symbol.search`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/search) method.\n\n    If `regexp` is not a `RegExp` object and does not have a `Symbol.search` method, it is implicitly converted to a `RegExp` by using `new RegExp(regexp)`.\n\n### Return value\n\nThe index of the first match between the regular expression and the given string, or `-1` if no match was found.\n\n## Description\n\nThe implementation of `String.prototype.search()` itself is very simple — it simply calls the `Symbol.search` method of the argument with the string as the first parameter. The actual implementation comes from [`RegExp.prototype[@@search]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@search).\n\nThe `g` flag of `regexp` has no effect on the `search()` result, and the search always happens as if the regex's `lastIndex` is 0. For more information on the behavior of `search()`, see [`RegExp.prototype[@@search]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@search).\n\nWhen you want to know whether a pattern is found, and _also_ know its index within a string, use `search()`.\n\n- If you only want to know if it exists, use the `RegExp.prototype.test()` method, which returns a boolean.\n- If you need the content of the matched text, use `String.prototype.match()` or `RegExp.prototype.exec()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/String/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.slice()\n\nThe **`slice()`** method extracts a section of a string and\nreturns it as a new string, without modifying the original string.\n\n## Syntax\n\n```js\nslice(indexStart)\nslice(indexStart, indexEnd)\n```\n\n### Parameters\n\n- `indexStart`\n  - : The index of the first character to include in the returned substring.\n- `indexEnd` _**optional**_\n  - : The index of the first character to exclude from the returned substring.\n\n### Return value\n\nA new string containing the extracted section of the string.\n\n## Description\n\n`slice()` extracts the text from one string and returns a new string. Changes to the text in one string do not affect the other string.\n\n`slice()` extracts up to but not including `indexEnd`. For example, `str.slice(1, 4)` extracts the second character through the fourth character (characters indexed `1`, `2`, and `3`).\n\n- If `indexStart >= str.length`, an empty string is returned.\n- If `indexStart < 0`, the index is counted from the end of the string. More formally, in this case, the substring starts at `max(indexStart + str.length, 0)`.\n- If `indexStart` is omitted, undefined, or cannot be converted to a number (using [`Number()`](../../../globals/Number/Number.mdx)), it's treated as `0`.\n- If `indexEnd` is omitted, undefined, or cannot be converted to a number (using [`Number()`](../../../globals/Number/Number.mdx)), or if `indexEnd >= str.length`, `slice()` extracts to the end of the string.\n- If `indexEnd < 0`, the index is counted from the end of the string. More formally, in this case, the substring ends at `max(indexEnd + str.length, 0)`.\n- If `indexEnd <= indexStart` after normalizing negative values (i.e. `indexEnd` represents a character that's before `indexStart`), an empty string is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/String/prototype/split.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.split()\n\nThe **`split()`** method takes a pattern and divides a `String` into an ordered list of substrings by searching for the pattern, puts these substrings into an array, and returns the array.\n\n## Syntax\n\n```js\nsplit()\nsplit(separator)\nsplit(separator, limit)\n```\n\n### Parameters\n\n- `separator` _**optional**_\n  - : The pattern describing where each split should occur. Can be a string or an object with a [`Symbol.split`](../../../globals/Symbol/split.mdx) method — the typical example being a regular expression. If undefined, the original target string is returned wrapped in an array.\n- `limit` _**optional**_\n  - : A non-negative integer specifying a limit on the number of substrings to be included in the array. If provided, splits the string at each occurrence of the specified `separator`, but stops when `limit` entries have been placed in the array. Any leftover text is not included in the array at all.\n    - The array may contain fewer entries than `limit` if the end of the string is reached before the limit is reached.\n    - If `limit` is `0`, `[]` is returned.\n\n### Return value\n\nAn `Array` of strings, split at each point where the `separator` occurs in the given string.\n\n## Description\n\nIf `separator` is a non-empty string, the target string is split by all matches of the `separator` without including `separator` in the results. For example, a string containing tab separated values (TSV) could be parsed by passing a tab character as the separator, like `myString.split(\"\\t\")`. If `separator` contains multiple characters, that entire character sequence must be found in order to split. If `separator` appears at the beginning (or end) of the string, it still has the effect of splitting, resulting in an empty (i.e. zero length) string appearing at the first (or last) position of the returned array. If `separator` does not occur in `str`, the returned array contains one element consisting of the entire string.\n\nIf `separator` is an empty string (`\"\"`), `str` is converted to an array of each of its UTF-16 \"characters\", without empty strings on either ends of the resulting string.\n\n> **Note:** `\"\".split(\"\")` is therefore the only way to produce an empty array when a string is passed as `separator`.\n\n> **Warning:** When the empty string (`\"\"`) is used as a separator, the string is **not** split by _user-perceived characters_ ([grapheme clusters](https://unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries)) or unicode characters (codepoints), but by UTF-16 codeunits. This destroys [surrogate pairs](https://unicode.org/faq/utf_bom.html#utf16-2). See [\"How do you get a string to a character array in JavaScript?\" on StackOverflow](https://stackoverflow.com/questions/4547609/how-to-get-character-array-from-a-string/34717402#34717402).\n\nIf `separator` is a regexp that matches empty strings, whether the match is split by UTF-16 code units or Unicode codepoints depends on if the [`u`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/unicode) flag is set.\n\n```js\n\"😄😄\".split(/(?:)/); // [ \"\\ud83d\", \"\\ude04\", \"\\ud83d\", \"\\ude04\" ]\n\"😄😄\".split(/(?:)/u); // [ \"😄\", \"😄\" ]\n```\n\nIf `separator` is a regular expression with capturing groups, then each time `separator` matches, the captured groups (including any `undefined` results) are spliced into the output array. This behavior is specified by the regexp's [`Symbol.split`](../../../globals/Symbol/split.mdx) method.\n\nIf `separator` is an object with a [`Symbol.split`](../../../globals/Symbol/split.mdx) method, that method is called with the target string and `limit` as arguments, and `this` set to the object. Its return value becomes the return value of `split`.\n\nAny other value will be coerced to a string before being used as separator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/String/prototype/startsWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.startsWith()\n\nThe **`startsWith()`** method determines whether a string begins with the characters of a specified string, returning `true` or `false` as appropriate.\n\n## Syntax\n\n```js\nstartsWith(searchString)\nstartsWith(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n  - : The characters to be searched for at the start of this string. Cannot be a regex.\n- `position` _**optional**_\n  - : The start position at which `searchString` is expected to be found (the index of `searchString`'s first character). Defaults to `0`.\n\n### Return value\n\n**`true`** if the given characters are found at the beginning of the string; otherwise, **`false`**.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If `searchString` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes).\n\n## Description\n\nThis method lets you determine whether or not a string begins with another string. This method is case-sensitive.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/String/prototype/substr.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.substr()\n\nThe **`substr()`** method returns a portion of the string, starting at the specified index and extending for a given number of characters afterwards.\n\n> **Note:** `substr()` is not part of the main ECMAScript specification — it's defined in [Annex B: Additional ECMAScript Features for Web Browsers](https://tc39.es/ecma262/#sec-additional-ecmascript-features-for-web-browsers), which is normative optional for non-browser runtimes. Therefore, people are advised to use the standard [`String.prototype.substring()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/substring) and [`String.prototype.slice()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/slice) methods instead to make their code maximally cross-platform friendly. The [`String.prototype.substring()` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/substring#the_difference_between_substring_and_substr) has some comparisons between the three methods.\n\n\n\n## Syntax\n\n```js\nsubstr(start)\nsubstr(start, length)\n```\n\n### Parameters\n\n- `start`\n  - : The index of the first character to include in the returned substring.\n- `length` _**optional**_\n  - : The number of characters to extract.\n\n### Return value\n\nA new string containing the specified part of the given string.\n\n## Description\n\nA string's `substr()` method extracts `length` characters from the string, counting from the `start` index.\n\n- If `start >= str.length`, an empty string is returned.\n- If `start < 0`, the index starts counting from the end of the string. More formally, in this case the substring starts at `max(start + str.length, 0)`.\n- If `start` is omitted or [`undefined`](../../../globals/undefined.mdx), it's treated as `0`.\n- If `length` is omitted or [`undefined`](../../../globals/undefined.mdx), or if `start + length >= str.length`, `substr()` extracts characters to the end of the string.\n- If `length < 0`, an empty string is returned.\n- For both `start` and `length`, [`NaN`](../../../globals/NaN.mdx) is treated as `0`.\n\nAlthough you are encouraged to avoid using `substr()`, there is no trivial way to migrate `substr()` to either `slice()` or `substring()` in legacy code without essentially writing a polyfill for `substr()`. For example, `str.substr(a, l)`, `str.slice(a, a + l)`, and `str.substring(a, a + l)` all have different results when `str = \"01234\", a = 1, l = -2` — `substr()` returns an empty string, `slice()` returns `\"123\"`, while `substring()` returns `\"0\"`. The actual refactoring path depends on the knowledge of the range of `a` and `l`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/String/prototype/substring.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.substring()\n\nThe **`substring()`** method returns the part of the `string` from the start index up to and excluding the end index, or to the end of the string if no end index is supplied.\n\n## Syntax\n\n```js\nsubstring(indexStart)\nsubstring(indexStart, indexEnd)\n```\n\n### Parameters\n\n- `indexStart`\n  - : The index of the first character to include in the returned substring.\n- `indexEnd` _**optional**_\n  - : The index of the first character to exclude from the returned substring.\n\n### Return value\n\nA new string containing the specified part of the given string.\n\n## Description\n\n`substring()` extracts characters from `indexStart` up to _but not including_ `indexEnd`. In particular:\n\n- If `indexEnd` is omitted, `substring()` extracts characters to the end of the string.\n- If `indexStart` is equal to `indexEnd`, `substring()` returns an empty string.\n- If `indexStart` is greater than `indexEnd`, then the effect of `substring()` is as if the two arguments were swapped; see example below.\n\nAny argument value that is less than `0` or greater than `str.length` is treated as if it were `0` and `str.length`, respectively.\n\nAny argument value that is [`NaN`](../../../globals/NaN.mdx) is treated as if it were `0`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/String/prototype/toLocaleLowerCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toLocaleLowerCase()\n\nThe **`toLocaleLowerCase()`** method returns the calling string\nvalue converted to lower case, according to any locale-specific case mappings.\n\n## Syntax\n\n```js\ntoLocaleLowerCase()\ntoLocaleLowerCase(locales)\n```\n\n### Parameters\n\n- `locales` _**optional**_\n  - : A string with a BCP 47 language tag, or an array of such strings. Indicates the locale to be used to convert to lower case according to any locale-specific case mappings. For the general form and interpretation of the `locales` argument, see [Locale identification and negotiation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation).\n\n### Return value\n\nA new string representing the calling string converted to lower case, according to any\nlocale-specific case mappings.\n\n### Exceptions\n\n- A [`RangeError`](../../../globals/RangeError/RangeError.mdx) (\"invalid language tag: xx_yy\") is thrown if a\n  `locale` argument isn't a valid language tag.\n- A [`TypeError`](../../../globals/TypeError/TypeError.mdx) (\"invalid element in locales argument\") is thrown if an\n  array element isn't of type string.\n\n## Description\n\nThe `toLocaleLowerCase()` method returns the value of the string converted\nto lower case according to any locale-specific case mappings.\n`toLocaleLowerCase()` does not affect the value of the string itself. In most\ncases, this will produce the same result as [`String.prototype.toLowerCase()`](../../../globals/String/prototype/toLowerCase.mdx), but for some locales, such as Turkish, whose case mappings do not\nfollow the default case mappings in Unicode, there may be a different result.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/String/prototype/toLocaleUpperCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toLocaleUpperCase()\n\nThe **`toLocaleUpperCase()`** method returns the calling string\nvalue converted to upper case, according to any locale-specific case mappings.\n\n## Syntax\n\n```js\ntoLocaleUpperCase()\ntoLocaleUpperCase(locales)\n```\n\n### Parameters\n\n- `locales` _**optional**_\n  - : A string with a BCP 47 language tag, or an array of such strings. Indicates the locale to be used to convert to upper case according to any locale-specific case mappings. For the general form and interpretation of the `locales` argument, see [Locale identification and negotiation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation).\n\n### Return value\n\nA new string representing the calling string converted to upper case, according to any\nlocale-specific case mappings.\n\n### Exceptions\n\n- A [`RangeError`](../../../globals/RangeError/RangeError.mdx) (\"invalid language tag: xx_yy\") is thrown if a\n  `locale` argument isn't a valid language tag.\n- A [`TypeError`](../../../globals/TypeError/TypeError.mdx) (\"invalid element in locales argument\") is thrown if an\n  array element isn't of type string.\n\n## Description\n\nThe `toLocaleUpperCase()` method returns the value of the string converted\nto upper case according to any locale-specific case mappings.\n`toLocaleUpperCase()` does not affect the value of the string itself. In most\ncases, this will produce the same result as [`String.prototype.toUpperCase()`](../../../globals/String/prototype/toUpperCase.mdx), but for some locales, such as Turkish, whose case mappings do not\nfollow the default case mappings in Unicode, there may be a different result.\n\nAlso notice that conversion is not necessarily a 1:1 character mapping, as some\ncharacters might result in two (or even more) characters when transformed to upper-case.\nTherefore the length of the result string can differ from the input length. This also\nimplies that the conversion is not stable, so i.E. the following can return\n`false`:\n`x.toLocaleLowerCase() === x.toLocaleUpperCase().toLocaleLowerCase()`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/String/prototype/toLowerCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toLowerCase()\n\nThe **`toLowerCase()`** method returns the calling string value\nconverted to lower case.\n\n## Syntax\n\n```js\ntoLowerCase()\n```\n\n### Return value\n\nA new string representing the calling string converted to lower case.\n\n## Description\n\nThe `toLowerCase()` method returns the value of the string converted to\nlower case. `toLowerCase()` does not affect the value of the string\n`str` itself.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/String/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified string value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified string value.\n\n## Description\n\nThe `String` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For `String` values, the `toString` method returns the string itself (if it's a primitive) or the string that the `String` object wraps. It has the exact same implementation as [`String.prototype.valueOf()`](../../../globals/String/prototype/valueOf.mdx).\n\nThe `toString()` method requires its `this` value to be a `String` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to string values.\n\nBecause `String` doesn't have a [`[Symbol.toPrimitive]()`](../../../globals/Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `String` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, String _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — since they are already strings, no conversion is performed.\n\n```js\nString.prototype.toString = () => \"Overridden\";\nconsole.log(`${\"foo\"}`); // \"foo\"\nconsole.log(`${new String(\"foo\")}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/String/prototype/toUpperCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toUpperCase()\n\nThe **`toUpperCase()`** method returns the calling string value\nconverted to uppercase (the value will be converted to a string if it isn't one).\n\n## Syntax\n\n```js\ntoUpperCase()\n```\n\n### Return value\n\nA new string representing the calling string converted to upper case.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : When called on [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../../globals/undefined.mdx), for example,\n    `String.prototype.toUpperCase.call(undefined)`.\n\n## Description\n\nThe `toUpperCase()` method returns the value of the string converted to\nuppercase. This method does not affect the value of the string itself since JavaScript\nstrings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/String/prototype/trim.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.trim()\n\nThe **`trim()`** method removes whitespace from both ends of a string and returns a new string, without modifying the original string.\n\nTo return a new string with whitespace trimmed from just one end, use [`String.prototype.trimStart()`](../../../globals/String/prototype/trimStart.mdx) or [`String.prototype.trimEnd()`](../../../globals/String/prototype/trimEnd.mdx).\n\n## Syntax\n\n```js\ntrim()\n```\n\n### Return value\n\nA new string representing `str` stripped of whitespace from both its beginning and end. Whitespace is defined as [white space](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#white_space) characters plus [line terminators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#line_terminators).\n\nIf neither the beginning or end of `str` has any whitespace, a new string is still returned (essentially a copy of `str`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/String/prototype/trimEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.trimEnd()\n\nThe **`trimEnd()`** method removes whitespace from the end of a string and returns a new string, without modifying the original string. `trimRight()` is an alias of this method.\n\n## Syntax\n\n```js\ntrimEnd()\n\ntrimRight()\n```\n\n### Return value\n\nA new string representing `str` stripped of whitespace from its end (right side). Whitespace is defined as [white space](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#white_space) characters plus [line terminators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#line_terminators).\n\nIf the end of `str` has no whitespace, a new string is still returned (essentially a copy of `str`).\n\n### Aliasing\n\nAfter [`String.prototype.trim()`](../../../globals/String/prototype/trim.mdx) was standardized, engines also implemented the non-standard method `trimRight`. However, for consistency with [`String.prototype.pedEnd()`](../../../globals/String/prototype/trim.mdx), when the method got standardized, its name was chosen as `trimEnd`. For web compatibility reasons, `trimRight` remains as an alias to `trimEnd`, and they refer to the exact same function object. In some engines this means:\n\n```js\nString.prototype.trimRight.name === \"trimEnd\";\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/String/prototype/trimStart.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.trimStart()\n\nThe **`trimStart()`** method removes whitespace from the beginning of a string and returns a new string, without modifying the original string. `trimLeft()` is an alias of this method.\n\n## Syntax\n\n```js\ntrimStart()\n\ntrimLeft()\n```\n\n### Return value\n\nA new string representing `str` stripped of whitespace from its beginning (left side). Whitespace is defined as [white space](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#white_space) characters plus [line terminators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#line_terminators).\n\nIf the beginning of `str` has no whitespace, a new string is still returned (essentially a copy of `str`).\n\n### Aliasing\n\nAfter [`String.prototype.trim()`](../../../globals/String/prototype/trim.mdx) was standardized, engines also implemented the non-standard method `trimLeft`. However, for consistency with [`String.prototype.padEnd()`](../../../globals/String/prototype/padEnd.mdx), when the method got standardized, its name was chosen as `trimStart`. For web compatibility reasons, `trimLeft` remains as an alias to `trimStart`, and they refer to the exact same function object. In some engines this means:\n\n```js\nString.prototype.trimLeft.name === \"trimStart\";\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/String/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a\n`String` object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nA string representing the primitive value of a given `String` object.\n\n## Description\n\nThe `valueOf()` method of `String` returns the primitive value\nof a `String` object as a string data type. This value is equivalent to\n[`String.prototype.toString()`](../../../globals/String/prototype/toString.mdx).\n\nThis method is usually called internally by JavaScript and not explicitly in code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/String/raw.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.raw()\n\nThe static **`String.raw()`** method is a tag function of [template literals](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). This is similar to the `r` prefix in Python, or the `@` prefix in C# for string literals. It's used to get the raw string form of template literals — that is, substitutions (e.g. `${foo}`) are processed, but escape sequences (e.g. `\\n`) are not.\n\n## Syntax\n\n```js\nString.raw(strings, ...substitutions)\n\nString.raw`templateString`\n```\n\n### Parameters\n\n- `strings`\n  - : Well-formed template literal array object, like `{ raw: ['foo', 'bar', 'baz'] }`. Should be an object with a `raw` property whose value is an array-like object of strings.\n- `...substitutions`\n  - : Contains substitution values.\n- `templateString`\n  - : A [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals), optionally with substitutions (`${...}`).\n\n### Return value\n\nThe raw string form of a given template literal.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if the first argument doesn't have a `raw` property, or the `raw` property is `undefined` or `null`.\n\n## Description\n\nIn most cases, `String.raw()` is used with template literals. The first syntax mentioned above is only rarely used, because the JavaScript engine will call this with proper arguments for you, (just like with other [tag functions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals#tagged_templates)).\n\n`String.raw()` is the only built-in template literal tag. It has close semantics to an untagged literal since it concatenates all arguments and returns a string. You can even re-implement it with normal JavaScript code.\n\n> **Warning:** You should not use `String.raw` directly as an \"identity\" tag. See [Building an identity tag](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/raw#building_an_identity_tag) for how to implement this.\n\nIf `String.raw()` is called with an object whose `raw` property doesn't have a `length` property or a non-positive `length`, it returns an empty string `\"\"`. If `substitutions.length < strings.raw.length - 1` (i.e. there are not enough substitutions to fill the placeholders — which can't happen in a well-formed tagged template literal), the rest of the placeholders are filled with empty strings.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/SubtleCrypto/SubtleCrypto.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SubtleCrypto\n\nThe **`SubtleCrypto`** interface provides a number of low-level cryptographic functions. Access to the features of `SubtleCrypto` is obtained through the [`crypto.subtle`](../crypto/subtle.mdx) property.\n\n> **Warning:** This API provides a number of low-level cryptographic primitives. It's very easy to misuse them, and the pitfalls involved can be very subtle.\n>\n> Even assuming you use the basic cryptographic functions correctly, secure key management and overall security system design are extremely hard to get right, and are generally the domain of specialist security experts.\n>\n> Errors in security system design and implementation can make the security of the system completely ineffective.\n>\n> Please learn and experiment, but don't guarantee or imply the security of your work before an individual knowledgeable in this subject matter thoroughly reviews it. The [Crypto 101 Course](https://www.crypto101.io/) can be a great place to start learning about the design and implementation of secure systems.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/SubtleCrypto/prototype/digest.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# digest()\n\nThe **`digest()`** method of the [`SubtleCrypto`](../SubtleCrypto.mdx)\ninterface generates a digest of the given data. A digest is a short\nfixed-length value derived from some variable-length input. Cryptographic digests should\nexhibit collision-resistance, meaning that it's hard to come up with two different\ninputs that have the same digest value.\n\nIt takes as its arguments an identifier for the digest algorithm to use and the data to\ndigest. It returns a [`Promise`](../../Promise/Promise.mdx) which will be fulfilled with the digest.\n\n## Syntax\n\n```js\ndigest(algorithm, data)\n```\n\n### Parameters\n\n- `algorithm`\n  - : This may be a string or an object with a single property `name` that is a string. The string names the hash function to use. Supported values are:\n    - `\"MD5\"` (but don't use this in cryptographic applications)\n    - `\"SHA-1\"` (but don't use this in cryptographic applications)\n    - `\"SHA-256\"`\n    - `\"SHA-384\"`\n    - `\"SHA-512\"`.\n- `data`\n  - : An `ArrayBuffer`, a `TypedArray` or a `DataView` object containing the data to be digested.\n\n### Return value\n\nA [`Promise`](../../Promise/Promise.mdx) that fulfills with an `ArrayBuffer` containing the digest.\n\n## Supported algorithms\n\nDigest algorithms, also known as cryptographic hash functions,\ntransform an arbitrarily large block of data into a fixed-size output,\nusually much shorter than the input. They have a variety of applications in\ncryptography.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/SubtleCrypto/prototype/importKey.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# importKey()\n\nThe **`importKey()`** method of the [`SubtleCrypto`](../SubtleCrypto.mdx)\ninterface imports a key: that is, it takes as input a key in an external, portable\nformat and gives you a [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) object that you can use.\n\nThe function accepts several import formats: see [Supported formats](#supported-formats) for details.\n\n## Syntax\n\n```js\nimportKey(format, keyData, algorithm, extractable, keyUsages)\n```\n\n### Parameters\n\n- `format`\n  - : A string describing the data format of the key to import. It can be one of the following:\n    - `raw`: [Raw](#raw) format.\n    - `jwk`: [JSON Web Key](#json-web-key) format.\n- `keyData`\n  - : An `ArrayBuffer`, a TypedArray, a `DataView`, or a `JSONWebKey` object containing the key in\n    the given format.\n- `algorithm`\n  - : An object defining the type of key to import and providing extra algorithm-specific parameters.\n    - For RSASSA-PKCS1-v1_5:\n      Pass an [`RsaHashedImportParams`](../../RsaHashedImportParams/RsaHashedImportParams.mdx) object.\n    - For HMAC:\n      Pass an [`HmacImportParams`](../../HmacImportParams/HmacImportParams.mdx) object.\n    - For ECDSA:\n      Pass an [`EcKeyImportParams`](../../EcKeyImportParams/EcKeyImportParams.mdx) object.\n- `extractable`\n  - : A boolean value indicating whether it will be possible to export the key.\n- `keyUsages`\n  - : An `Array` indicating what can be done with the key. Possible array values are:\n    - `encrypt`: The key may be used to encrypt messages.\n    - `decrypt`: The key may be used to decrypt messages.\n    - `sign`: The key may be used to sign messages.\n    - `verify`: The key may be used to verify signatures.\n    - `deriveKey`: The key may be used in deriving a new key.\n    - `deriveBits`: The key may be used in deriving bits.\n    - `wrapKey`: The key may be used to wrap a key.\n    - `unwrapKey`: The key may be used to unwrap a key.\n\n### Return value\n\nA [`Promise`](../../Promise/Promise.mdx)\nthat fulfills with the imported key as a [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) object.\n\n### Exceptions\n\nThe promise is rejected when one of the following exceptions is encountered:\n\n- `SyntaxError`\n  - : Raised when `keyUsages` is empty but the unwrapped key is of\n    type `secret` or `private`.\n- `TypeError`\n  - : Raised when trying to use an invalid format or if the `keyData`\n    is not suited for that format.\n\n## Supported formats\n\nThis API currently supports one key import/export format: JSON Web Key.\n\n### Raw\n\nYou can use this format to import or export AES or HMAC secret keys, or Elliptic Curve\npublic keys.\n\nIn this format the key is supplied as an `ArrayBuffer` containing the raw bytes for the key.\n\n\n### JSON Web Key\n\nYou can use JSON Web Key format to import or export RSA or Elliptic Curve public or\nprivate keys, as well as AES and HMAC secret keys.\n\nJSON Web Key format is defined in [RFC 7517](https://datatracker.ietf.org/doc/html/rfc7517).\nIt describes a way to represent public, private, and secret keys as JSON objects.\n\nA JSON Web Key looks something like this (this is an EC private key):\n\n```json\n{\n  \"crv\": \"P-384\",\n  \"d\": \"wouCtU7Nw4E8_7n5C1-xBjB4xqSb_liZhYMsy8MGgxUny6Q8NCoH9xSiviwLFfK_\",\n  \"ext\": true,\n  \"key_ops\": [\"sign\"],\n  \"kty\": \"EC\",\n  \"x\": \"SzrRXmyI8VWFJg1dPUNbFcc9jZvjZEfH7ulKI1UkXAltd7RGWrcfFxqyGPcwu6AQ\",\n  \"y\": \"hHUag3OvDzEr0uUQND4PXHQTXP5IDGdYhJhL-WLKjnGjQAw0rNGy5V29-aV-yseW\"\n};\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/SubtleCrypto/prototype/sign.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# sign()\n\nThe **`sign()`** method of the [`SubtleCrypto`](../SubtleCrypto.mdx) interface generates a digital signature.\n\nIt takes as its arguments a key to sign with, some algorithm-specific\nparameters, and the data to sign. It returns a `Promise` which will be\nfulfilled with the signature.\n\nYou can use the corresponding [`verify()`](./verify.mdx) method to verify the signature.\n\n## Syntax\n\n```js\nsign(algorithm, key, data)\n```\n\n### Parameters\n\n- `algorithm`\n  - : A string or object that specifies the signature algorithm to use and its parameters:\n    - To use [RSASSA-PKCS1-v1_5](#rsassa-pkcs1-v1_5), pass the string `\"RSASSA-PKCS1-v1_5\"` or an object of the form `{ \"name\": \"RSASSA-PKCS1-v1_5\" }`.\n    - To use [HMAC](#hmac), pass the string `\"HMAC\"` or an object of the form `{ \"name\": \"HMAC\" }`.\n- `key`\n  - : A [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) object containing the key to be used for signing.\n    If `algorithm` identifies a public-key cryptosystem, this is the private key.\n- `data`\n  - : An `ArrayBuffer`, a TypedArray or a `DataView` object containing the data to be signed.\n\n### Return value\n\nA `Promise` that fulfills with an `ArrayBuffer` containing the signature.\n\n### Exceptions\n\nThe promise is rejected when the following exception is encountered:\n\n- `InvalidAccessError`\n  - : Raised when the signing key is not a key for the request signing algorithm or when\n    trying to use an algorithm that is either unknown or isn't suitable for signing.\n\n## Supported algorithms\n\n### RSASSA-PKCS1-v1_5\n\nThe RSASSA-PKCS1-v1_5 algorithm is specified in [RFC 3447](https://datatracker.ietf.org/doc/html/rfc3447).\n\n### HMAC\n\nThe HMAC algorithm calculates and verifies hash-based message authentication codes according to the\n[FIPS 198-1 standard](https://csrc.nist.gov/csrc/media/publications/fips/198/1/final/documents/fips-198-1_final.pdf).\n\nThe digest algorithm to use is specified in the\n[`HmacImportParams`](../../HmacImportParams/HmacImportParams.mdx) object\nthat you pass into [`SubtleCrypto.importKey()`](./importKey.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/SubtleCrypto/prototype/verify.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# verify()\n\nThe **`verify()`** method verifies a digital signature.\n\nIt takes as its arguments a key to verify the signature with, some algorithm-specific parameters, the signature, and the original signed data.\nIt returns a `Promise` which will be fulfilled with a boolean value indicating whether the signature is valid.\n\n## Syntax\n\n```js\nverify(algorithm, key, signature, data)\n```\n\n### Parameters\n\n- `algorithm`\n  - : A string or object defining the algorithm to use, and for some algorithm choices, some extra parameters.\n    The values given for the extra parameters must match those passed into the corresponding [`sign()`](./sign.mdx) call.\n    - To use RSASSA-PKCS1-v1_5, pass the string `\"RSASSA-PKCS1-v1_5\"` or an object of the form `{ \"name\": \"RSASSA-PKCS1-v1_5\" }`.\n    - To use HMAC, pass the string `\"HMAC\"` or an object of the form `{ \"name\": \"HMAC\" }`.\n- `key`\n  - : A [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) containing the key that will be used to verify the signature.\n    It is the secret key for a symmetric algorithm and the public key for a public-key system.\n- `signature`\n  - : A `ArrayBuffer` containing the signature to verify.\n- `data`\n  - : A `ArrayBuffer` containing the data whose signature is to be verified.\n\n### Return value\n\nA `Promise` that fulfills with a\nboolean value: `true` if the signature is valid, `false`\notherwise.\n\n### Exceptions\n\nThe promise is rejected when the following exception is encountered:\n\n- `InvalidAccessError`\n  - : Raised when the encryption key is not a key for the requested verifying algorithm or\n    when trying to use an algorithm that is either unknown or isn't suitable for a verify\n    operation.\n\n## Supported algorithms\n\nThe `verify()` method supports the same algorithms as the [`sign()`](./sign.mdx) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Symbol/Symbol.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol()\n\nThe `Symbol()` constructor returns a value of type **symbol**,\nbut is incomplete as a constructor because it does not support the syntax\n\"`new Symbol()`\" and it is not intended to be subclassed. It may be used as\nthe value of an\n[`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends)\nclause of a `class` definition but a\n[`super`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/super)\ncall to it will cause an exception.\n\n## Syntax\n\n```js\nSymbol()\nSymbol(description)\n```\n\n> **Note:** `Symbol()` can only be called without `new`. Attempting to construct it with `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `description` _**optional**_\n  - : A string. A description of the symbol which can be used for debugging but not to\n    access the symbol itself.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Symbol/asyncIterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.asyncIterator\n\nThe **`Symbol.asyncIterator`** well-known symbol specifies the default [async iterator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_async_iterator_and_async_iterable_protocols) for an object. If this property is set on an object, it is an async iterable and can be used in a [`for await...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for-await...of) loop.\n\n## Value\n\nThe well-known symbol `Symbol.asyncIterator`.\n\n## Description\n\nThe `Symbol.asyncIterator` symbol is a builtin symbol that is used to access an object's `Symbol.asyncIterator` method. In order for an object to be async iterable, it must have a `Symbol.asyncIterator` key.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Symbol/for.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.for()\n\nThe **`Symbol.for(key)`** method searches for existing symbols\nin a runtime-wide symbol registry with the given key and returns it if found. Otherwise\na new symbol gets created in the global symbol registry with this key.\n\n## Syntax\n\n```js\nSymbol.for(key)\n```\n\n### Parameters\n\n- `key`\n  - : String, required. The key for the symbol (and also used for the description of the\n    symbol).\n\n### Return value\n\nAn existing symbol with the given key if found; otherwise, a new symbol is created and\nreturned.\n\n## Description\n\nIn contrast to `Symbol()`, the `Symbol.for()` function creates a\nsymbol available in a [global symbol registry](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol#shared_symbols_in_the_global_symbol_registry) list. `Symbol.for()` does also\nnot necessarily create a new symbol on every call, but checks first if a symbol with the\ngiven `key` is already present in the registry. In that case, that symbol is\nreturned. If no symbol with the given key is found, `Symbol.for()` will\ncreate a new global symbol.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Symbol/hasInstance.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.hasInstance\n\nThe **`Symbol.hasInstance`** well-known symbol is used to determine if a constructor object recognizes an object as its instance. The `instanceof` operator's behavior can be customized by this symbol.\n\n## Value\n\nThe well-known symbol `Symbol.hasInstance`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Symbol/isConcatSpreadable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.isConcatSpreadable\n\nThe **`Symbol.isConcatSpreadable`** well-known symbol is used to configure if an object should be flattened to its array elements when using the [`Array.prototype.concat()`](../../globals/Array/prototype/concat.mdx) method.\n\n## Value\n\nThe well-known symbol `Symbol.isConcatSpreadable`.\n\n## Description\n\nThe `Symbol.isConcatSpreadable` symbol (`Symbol.isConcatSpreadable`) can be defined as an own or inherited property and its value is a boolean. It can control behavior for arrays and array-like objects:\n\n- For array objects, the default behavior is to spread (flatten) elements. `Symbol.isConcatSpreadable` can avoid flattening in these cases.\n- For array-like objects, the default behavior is no spreading or flattening. `Symbol.isConcatSpreadable` can force flattening in these cases.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Symbol/iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.iterator\n\nThe well-known **`Symbol.iterator`** symbol specifies the default iterator for an object. Used by [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of).\n\n## Value\n\nThe well-known symbol `Symbol.iterator`.\n\n## Description\n\nWhenever an object needs to be iterated (such as at the beginning of a `for...of` loop), its `Symbol.iterator` method is called with no arguments, and the returned **iterator** is used to obtain the values to be iterated.\n\nSome built-in types have a default iteration behavior, while other types (such as `Object`) do not. The built-in types with a `Symbol.iterator` method are:\n\n- [`Array.prototype[Symbol.iterator]()`](../../globals/Array/prototype/@@iterator.mdx)\n- [`String.prototype[Symbol.iterator]()`](../../globals/String/prototype/@@iterator.mdx)\n- [`Map.prototype[Symbol.iterator]()`](../../globals/Map/prototype/@@iterator.mdx)\n- [`Set.prototype[Symbol.iterator]()`](../../globals/Set/prototype/@@iterator.mdx)\n\nSee also [Iteration protocols](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) for more information.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Symbol/keyFor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.keyFor()\n\nThe **`Symbol.keyFor(sym)`** method retrieves a shared symbol\nkey from the global symbol registry for the given symbol.\n\n## Syntax\n\n```js\nSymbol.keyFor(sym)\n```\n\n### Parameters\n\n- `sym`\n  - : Symbol, required. The symbol to find a key for.\n\n### Return value\n\nA string representing the key for the given symbol if one is found on the [global registry](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol#shared_symbols_in_the_global_symbol_registry); otherwise, [`undefined`](../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Symbol/match.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.match\n\nThe **`Symbol.match`** well-known symbol specifies the matching of a regular expression against a string. This function is called by the [`String.prototype.match()`](../../globals/String/prototype/match.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.match]()` and [`String.prototype.match()`](../../globals/String/prototype/match.mdx).\n\n## Value\n\nThe well-known symbol `Symbolmatch`.\n\n## Description\n\nThis function is also used to identify [if objects have the behavior of regular expressions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes). For example, the methods [`String.prototype.startsWith()`](../../globals/String/prototype/startsWith.mdx), [`String.prototype.endsWith()`](../../globals/String/prototype/endsWith.mdx) and [`String.prototype.includes()`](../../globals/String/prototype/includes.mdx), check if their first argument is a regular expression and will throw a [`TypeError`](../../globals/TypeError/TypeError.mdx) if they are. Now, if the `match` symbol is set to `false` (or a [Falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value except `undefined`), it indicates that the object is not intended to be used as a regular expression object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Symbol/matchAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.matchAll\n\nThe **`Symbol.matchAll`** well-known symbol specifies the method that returns an iterator, that yields matches of the regular expression against a string. This function is called by the [`String.prototype.matchAll()`](../../globals/String/prototype/matchAll.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.matchAll]()` and [`String.prototype.matchAll()`](../../globals/String/prototype/matchAll.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.matchAll`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Symbol/prototype/@@toPrimitive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype[Symbol.toPrimitive]\n\nThe **`[Symbol.toPrimitive]()`** method converts a Symbol object to\na primitive value.\n\n## Syntax\n\n```js\nSymbol()[Symbol.toPrimitive](hint)\n```\n\n### Return value\n\nThe primitive value of the specified `Symbol` object.\n\n## Description\n\nThe `[Symbol.toPrimitive]()` method of `Symbol` returns the primitive\nvalue of a Symbol object as a Symbol data type. The `hint`\nargument is not used.\n\nJavaScript calls the `[Symbol.toPrimitive]()` method to convert an object to a\nprimitive value. You rarely need to invoke the `[Symbol.toPrimitive]()` method\nyourself; JavaScript automatically invokes it when encountering an object where a\nprimitive value is expected.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Symbol/prototype/description.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype.description\n\nThe read-only **`description`** property is a string returning the optional description of `Symbol` objects.\n\n## Description\n\n`Symbol` objects can be created with an optional description which can be used for debugging but not to access the symbol itself. The `Symbol.prototype.description` property can be used to read that description. It is different to `Symbol.prototype.toString()` as it does not contain the enclosing `\"Symbol()\"` string. See the examples.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Symbol/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified symbol value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified symbol value.\n\n## Description\n\nThe `Symbol` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For `Symbol` values, the `toString` method returns a descriptive string in the form `\"Symbol(description)\"`, where `description` is the symbol's [`Symbol.prototype.description`](../../../globals/Symbol/prototype/description.mdx).\n\nThe `toString()` method requires its `this` value to be a `Symbol` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to symbol values.\n\nBecause `Symbol` has a [`[Symbol.toPrimitive]()`](../../../globals/Symbol/toPrimitive.mdx) method, that method always takes priority over `toString()` when a `Symbol` object is [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). However, because `Symbol.prototype[Symbol.toPrimitive]()` returns a symbol primitive, and symbol primitives throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when implicitly converted to a string, the `toString()` method is never implicitly called by the language. To stringify a symbol, you must explicitly call its `toString()` method or use the [`String()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/String#using_string_to_stringify_a_symbol) function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Symbol/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a Symbol object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nThe primitive value of the specified `Symbol` object.\n\n## Description\n\nThe `valueOf()` method of `Symbol` returns the primitive value of a Symbol object as a Symbol data type.\n\nJavaScript calls the `valueOf()` method to convert an object to a primitive value. You rarely need to invoke the `valueOf()` method yourself; JavaScript automatically invokes it when encountering an object where a primitive value is expected.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Symbol/replace.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.replace\n\nThe **`Symbol.replace`** well-known symbol specifies the method that replaces matched substrings of a string. This function is called by the [`String.prototype.replace()`](../../globals/String/prototype/replace.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.replace]()` and [`String.prototype.replace()`](../../globals/String/prototype/replace.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.replace`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Symbol/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.search\n\nThe **`Symbol.search`** well-known symbol specifies the method that returns the index within a string that matches the regular expression. This function is called by the [`String.prototype.search()`](../../globals/String/prototype/search.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.search]()` and [`String.prototype.search()`](../../globals/String/prototype/search.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.search`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Symbol/species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.species\n\nThe well-known symbol **`Symbol.species`** specifies a function-valued property that the constructor function uses to create derived objects.\n\n> **Warning:** The existence of `Symbol.species` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Value\n\nThe well-known symbol `Symbol.species`.\n\n## Description\n\nThe `Symbol.species` accessor property allows subclasses to override the default constructor for objects. This specifies a protocol about how instances should be copied. For example, when you use copying methods of arrays, such as [`Array.prototype.map()`](../../globals/Array/prototype/map.mdx). the `map()` method uses `instance.constructor[Symbol.species]` to get the constructor for constructing the new array.\n\nAll built-in implementations of `Symbol.species` return the `this` value, which is the current instance's constructor. This allows copying methods to create instances of derived classes rather than the base class — for example, `map()` will return an array of the same type as the original array.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Symbol/split.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.split\n\nThe **`Symbol.split`** well-known symbol specifies the method that splits a string at the indices that match a regular expression. This function is called by the [`String.prototype.split()`](../../globals/String/prototype/split.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.split]()` and [`String.prototype.split()`](../../globals/String/prototype/split.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.split`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Symbol/toPrimitive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.toPrimitive\n\nThe **`Symbol.toPrimitive`** well-known symbol specifies a method that accepts a preferred type and returns a primitive representation of an object. It is called in priority by all [type coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) algorithms.\n\n## Value\n\nThe well-known symbol `Symbol.toPrimitive`.\n\n## Description\n\nWith the help of the `Symbol.toPrimitive` property (used as a function value), an object can be converted to a primitive value. The function is called with a string argument `hint`, which specifies the preferred type of the result primitive value. The `hint` argument can be one of `\"number\"`, `\"string\"`, and `\"default\"`.\n\nThe `\"number\"` hint is used by [numeric coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#numeric_coercion) algorithms. The `\"string\"` hint is used by the [string coercion](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) algorithm. The `\"default\"` hint is used by the [primitive coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion) algorithm. The `hint` only acts as a weak signal of preference, and the implementation is free to ignore it (as [`Symbol.prototype[Symbol.toPrimitive]()`](../../globals/Symbol/prototype/@@toPrimitive.mdx) does). The language does not enforce alignment between the `hint` and the result type, although `[Symbol.toPrimitive]()` must return a primitive, or a [`TypeError`](../../globals/TypeError/TypeError.mdx) is thrown.\n\nObjects without the `Symbol.toPrimitive` property are converted to primitives by calling the `valueOf()` and `toString()` methods in different orders, which is explained in more detail in the [type coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) section. `Symbol.toPrimitive` allows full control over the primitive conversion process. For example, `Symbol.prototype.toString()` won't be called, and `Symbol` objects must always be explicitly converted to strings through [`String()`](../../globals/String/String.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Symbol/toStringTag.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.toStringTag\n\nThe **`Symbol.toStringTag`** well-known symbol is a string valued property that is used in the creation of the default string description of an object. It is accessed internally by the [`Object.prototype.toString()`](../../globals/Object/prototype/toString.mdx) method.\n\n## Value\n\nThe well-known symbol `Symbol.toStringTag`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Symbol/unscopables.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.unscopables\n\nThe **`Symbol.unscopables`** well-known symbol is used to specify an object value of whose own and inherited property names are excluded from the [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) environment bindings of the associated object.\n\n## Value\n\nThe well-known symbol `@@unscopables`.\n\n## Description\n\nThe `@@unscopables` symbol (accessed via `Symbol.unscopables`) can be defined on any object to exclude property names from being exposed as lexical variables in [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) environment bindings. Note that when using [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), `with` statements are not available, and this symbol is likely not needed.\n\nSetting a property of the `@@unscopables` object to `true` (or any [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value) will make the corresponding property of the `with` scope object _unscopable_ and therefore won't be introduced to the `with` body scope. Setting a property to `false` (or any [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value) will make it _scopable_ and thus appear as lexical scope variables.\n\nWhen deciding whether `x` is unscopable, the entire prototype chain of the `@@unscopables` property is looked up for a property called `x`. This means if you declared `@@unscopables` as a plain object, `Object.prototype` properties like [`toString`](../../globals/Object/prototype/toString.mdx) would become unscopable as well, which may cause backward incompatibility for legacy code assuming those properties are normally scoped (see [an example here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/unscopables#avoid_using_a_non-null-prototype_object_as_symbol.unscopables)). You are advised to make your custom `@@unscopables` property have `null` as its prototype, like [`Array.prototype[Symbol.unscopables]`](../../globals/Array/prototype/@@unscopables.mdx) does.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/SyntaxError/SyntaxError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SyntaxError\n\nThe **`SyntaxError`** constructor creates a new error object\nthat represents an error when trying to interpret syntactically invalid code.\n\n## Syntax\n\n```js\nnew SyntaxError()\nnew SyntaxError(message)\nnew SyntaxError(message, options)\nnew SyntaxError(message, fileName)\nnew SyntaxError(message, fileName, lineNumber)\n\nSyntaxError()\nSyntaxError(message)\nSyntaxError(message, options)\nSyntaxError(message, fileName)\nSyntaxError(message, fileName, lineNumber)\n```\n\n> **Note:** `SyntaxError()` can be called with or without `new`. Both create a new `SyntaxError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error."
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/TextDecoder/TextDecoder.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder()\n\nThe **`TextDecoder()`** constructor returns a newly created `TextDecoder` object for the encoding specified in parameter.\n\n## Syntax\n\n```js\nnew TextDecoder()\nnew TextDecoder(label)\nnew TextDecoder(label, options)\n```\n\n### Parameters\n\n- `label` _**optional**_\n  - : A string, defaulting to `\"utf-8\"`.\n- `options` _**optional**_\n\n  - : An object with the property:\n\n    - `fatal`\n      - : A boolean value indicating if the `TextDecoder.decode()` method must throw a `TypeError` when decoding invalid data.\n        It defaults to `false`, which means that the decoder will substitute malformed data with a replacement character.\n\n    - `ignoreBOM`\n      - : A boolean value indicating whether the [byte order mark](https://www.w3.org/International/questions/qa-byte-order-mark) is ignored.\n        It defaults to `false`.\n\n### Exceptions\n\n- `RangeError`\n  - : Thrown if the value of `label` is unknown, or is one of the values leading to a `'replacement'` decoding algorithm (`\"iso-2022-cn\"` or `\"iso-2022-cn-ext\"`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/TextDecoder/prototype/decode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.decode()\n\nThe **`TextDecoder.decode()`** method returns a string containing text decoded from the buffer passed as a parameter.\n\nThe decoding method is defined in the current `TextDecoder` object.\nThis includes the expected encoding of the data, and how decoding errors are handled.\n\n## Syntax\n\n```js\ndecode()\ndecode(buffer)\ndecode(buffer, options)\n```\n\n### Parameters\n\n- `buffer` _**optional**_\n  - : Is an `ArrayBuffer`, a `TypedArray` or a `DataView` object containing the encoded text to decode.\n- `options` _**optional**_\n\n  - : An object with the property:\n\n    - `stream`\n      - : A boolean flag indicating that additional data will follow in subsequent calls to `decode()`.\n        Set to `true` if processing the data in chunks, and `false` for the final chunk or if the data is not chunked.\n        It defaults to `false`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if there is a decoding error when the property `TextDecoder.fatal` is `true`.\n\n### Return value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/TextDecoder/prototype/encoding.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.encoding\n\nThe **`TextDecoder.encoding`** read-only property returns a string containing the name of the decoding algorithm used by the specific decoder object.\n\nThe encoding is set by the constructor `label` parameter, and defaults to `utf-8`.\n\n## Value\n\nA lower-cased ASCII string, which can be one of the following values:\n\n- The recommended encoding for the Web: `'utf-8'`.\n- The legacy single-byte encodings:\n  ['ibm866'](https://en.wikipedia.org/wiki/Code_page_866),\n  ['iso-8859-2'](https://en.wikipedia.org/wiki/ISO/IEC_8859-2),\n  ['iso-8859-3'](https://en.wikipedia.org/wiki/ISO/IEC_8859-3),\n  ['iso-8859-4'](https://en.wikipedia.org/wiki/ISO/IEC_8859-4),\n  ['iso-8859-5'](https://en.wikipedia.org/wiki/ISO/IEC_8859-5),\n  ['iso-8859-6'](https://en.wikipedia.org/wiki/ISO/IEC_8859-6),\n  ['iso-8859-7'](https://en.wikipedia.org/wiki/ISO/IEC_8859-7),\n  ['iso-8859-8'](https://en.wikipedia.org/wiki/ISO/IEC_8859-8)'`,\n  ['iso-8859-8i'](https://en.wikipedia.org/wiki/ISO-8859-8-I),\n  ['iso-8859-10'](https://en.wikipedia.org/wiki/ISO/IEC_8859-10),\n  ['iso-8859-13'](https://en.wikipedia.org/wiki/ISO/IEC_8859-13),\n  ['iso-8859-14'](https://en.wikipedia.org/wiki/ISO/IEC_8859-14),\n  ['iso-8859-15'](https://en.wikipedia.org/wiki/ISO/IEC_8859-15),\n  ['iso-8859-16'](https://en.wikipedia.org/wiki/ISO/IEC_8859-16),\n  ['koi8-r'](https://en.wikipedia.org/wiki/KOI8-R),\n  ['koi8-u'](https://en.wikipedia.org/wiki/KOI8-U),\n  ['macintosh'](https://en.wikipedia.org/wiki/Mac_OS_Roman),\n  ['windows-874'](https://en.wikipedia.org/wiki/Windows-874),\n  ['windows-1250'](https://en.wikipedia.org/wiki/Windows-1250),\n  ['windows-1251'](https://en.wikipedia.org/wiki/Windows-1251),\n  ['windows-1252'](https://en.wikipedia.org/wiki/Windows-1252),\n  ['windows-1253'](https://en.wikipedia.org/wiki/Windows-1253),\n  ['windows-1254'](https://en.wikipedia.org/wiki/Windows-1254),\n  ['windows-1255'](https://en.wikipedia.org/wiki/Windows-1255),\n  ['windows-1256'](https://en.wikipedia.org/wiki/Windows-1256),\n  ['windows-1257'](https://en.wikipedia.org/wiki/Windows-1257),\n  ['windows-1258'](https://en.wikipedia.org/wiki/Windows-1258), or\n  ['x-mac-cyrillic'](https://en.wikipedia.org/wiki/Macintosh_Cyrillic_encoding).\n- The legacy multi-byte Chinese (simplified) encodings:\n  ['gbk'](https://en.wikipedia.org/wiki/GBK),\n  ['gb18030'](https://en.wikipedia.org/wiki/GB_18030)\n- The legacy multi-byte Chinese (traditional) encoding:\n  ['big5'](https://en.wikipedia.org/wiki/Big5).\n- The legacy multi-byte Japanese encodings:\n  ['euc-jp'](https://en.wikipedia.org/wiki/Extended_Unix_Code#EUC-JP),\n  ['iso-2022-jp'](https://en.wikipedia.org/wiki/ISO/IEC_2022#ISO-2022-JP),\n  ['shift-jis'](https://en.wikipedia.org/wiki/Shift_JIS).\n- The legacy multi-byte Korean encodings:\n  ['euc-kr'](https://en.wikipedia.org/wiki/Extended_Unix_Code#EUC-KR)\n- The legacy miscellaneous encodings:\n  ['utf-16be'](https://en.wikipedia.org/wiki/UTF-16#Byte_order_encoding_schemes),\n  ['utf-16le'](https://en.wikipedia.org/wiki/UTF-16#Byte_order_encoding_schemes),\n  `'x-user-defined'`.\n- A special encoding, `'replacement'`.\n  This decodes empty input into empty output and any other arbitrary-length input into a single replacement character.\n  It is used to prevent attacks that mismatch encodings between the client and server.\n  The following encodings also map to the replacement encoding: `ISO-2022-CN`, `ISO-2022-CN-ext`, ['iso-2022-kr'](https://en.wikipedia.org/wiki/ISO/IEC_2022#ISO-2022-KR) and ['hz-gb-2312'](https://en.wikipedia.org/wiki/HZ_(character_encoding)).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/TextDecoder/prototype/fatal.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.fatal\n\nThe **`fatal`** read-only property of the `TextDecoder` interface is a `Boolean` indicating whether the error mode is fatal.\n\nIf the property is `true` then a decoder will throw a `TypeError` if it encounters malformed data while decoding.\nIf `false` the decoder will substitute the invalid data with the replacement character `U+FFFD` (�).\nThe value of the property is set in the `TextDecoder()` constructor.\n\n## Value\n\nA `boolean` which will return `true` if the error mode is set to `fatal`.\nOtherwise it returns `false`, indicating that the error mode is \"replacement\".\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/TextDecoder/prototype/ignoreBOM.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.ignoreBOM\n\nThe **`ignoreBOM`** read-only property of the `TextDecoder` interface is a `Boolean` indicating whether the [byte order mark](https://www.w3.org/International/questions/qa-byte-order-mark) is ignored.\n\n## Value\n\n`true` if the byte order mark is ignored; `false` otherwise.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/TextEncoder/TextEncoder.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextEncoder()\n\nThe **`TextEncoder()`** constructor returns a newly created `TextEncoder` object that will generate a byte stream with UTF-8 encoding.\n\n## Syntax\n\n```js\nnew TextEncoder()\n```\n\n### Parameters\n\nNone.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/TextEncoder/prototype/encode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextEncoder.encode()\n\nThe **`TextEncoder.encode()`** method takes a string as input, and returns a `Uint8Array` containing the text given in parameters encoded with the specific method for that `TextEncoder` object.\n\n## Syntax\n\n```js\nencode(string)\n```\n\n### Parameters\n\n- `string`\n  - : A string containing the text to encode.\n\n### Return value\n\nA `Uint8Array` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/TextEncoder/prototype/encoding.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextEncoder.encoding\n\nThe **`TextEncoder.encoding`** read-only property returns a string containing the name of the encoding algorithm used by the specific encoder.\n\nIt can only have the following value `utf-8`.\n\n## Value\n\nA string with the value `utf-8`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/TransformStream/TransformStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStream()\n\nThe **`TransformStream()`** constructor creates a new `TransformStream` object which represents a pair of streams: a `WritableStream` representing the writable side, and a `ReadableStream` representing the readable side.\n\n## Syntax\n\n```js\nnew TransformStream()\nnew TransformStream(transformer)\nnew TransformStream(transformer, writableStrategy)\nnew TransformStream(transformer, writableStrategy, readableStrategy)\n```\n\n### Parameters\n\n- `transformer` _**optional**_\n\n  - : An object representing the `transformer`. If not supplied the resulting stream will be an **identity transform stream** which forwards all chunks written to its writable side to its readable side, without any changes.\n\n    The transformer object can contain any of the following methods. In each method `controller` is an instance of `TransformStreamDefaultController`.\n\n    - `start(controller)`\n      - : Called when the `TransformStream` is constructed. It is typically used to enqueue chunks using `TransformStreamDefaultController.enqueue()`.\n    - `transform(chunk, controller)`\n      - : Called when a chunk written to the writable side is ready to be transformed, and performs the work of the transformation stream. If no `transform()` method is supplied, the identity transform is used, and the chunk will be enqueued with no changes.\n    - `flush(controller)`\n      - : Called after all chunks written to the writable side have been successfully transformed, and the writable side is about to be closed.\n\n- `writableStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer. This defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk`. This indicates the size to\n        use for each chunk, in bytes.\n\n- `readableStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer. This defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk`. This indicates the size to\n        use for each chunk, in bytes.\n\n> **Note:** You could define your own custom\n> `readableStrategy` or `writableStrategy`, or use an instance of\n> `ByteLengthQueuingStrategy` or `CountQueuingStrategy`\n> for the object values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/TransformStream/prototype/readable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStream.readable\n\nThe **`readable`** read-only property of the `TransformStream` interface returns the `ReadableStream` instance controlled by this `TransformStream`.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/TransformStream/prototype/writable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStream.writable\n\nThe **`writable`** read-only property of the `TransformStream` interface returns the `WritableStream` instance controlled by this `TransformStream`.\n\n## Value\n\nA `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/TransformStreamDefaultController/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.desiredSize\n\nThe **`desiredSize`** read-only property of the `TransformStreamDefaultController` interface returns the desired size to fill the queue of the associated [`ReadableStream`](../../../globals/ReadableStream/ReadableStream.mdx).\n\nThe internal queue of a `ReadableStream` contains chunks that have been enqueued, but not yet read.\n\nIf the `desiredSize` is `0` then the queue is full. Therefore you can use this information to manually apply backpressure to manage the queue.\n\n## Value\n\nThe desired size.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/TransformStreamDefaultController/prototype/enqueue.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.enqueue()\n\nThe **`enqueue()`** method of the `TransformStreamDefaultController` interface enqueues the given chunk in the readable side of the stream.\n\n## Syntax\n\n```js\nenqueue(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : The chunk being queued. A chunk is a single piece of data. It can be any type of data, and a stream can contain chunks of different types.\n\n### Return value\n\nNone `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream is not readable.\n    This might occur if the stream is errored via `controller.error()`, or when it is closed without its controller's `controller.close()` method ever being called.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/TransformStreamDefaultController/prototype/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.error()\n\nThe **`error()`** method of the `TransformStreamDefaultController` interface errors both sides of the stream. Any further interactions with it will fail with the given error message, and any chunks in the queue will be discarded.\n\n## Syntax\n\n```js\nerror(reason)\n```\n\n### Parameters\n\n- `reason`\n  - : A string containing the error message to be returned on any further interaction with the stream.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/TransformStreamDefaultController/prototype/terminate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.terminate()\n\nThe **`terminate()`** method of the `TransformStreamDefaultController` interface closes the readable side and errors the writable side of the stream.\n\n## Syntax\n\n```js\nterminate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone (`undefined`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/TypeError/TypeError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TypeError\n\nThe **`TypeError()`** constructor creates a new error when an\noperation could not be performed, typically (but not exclusively) when a value is not of\nthe expected type.\n\n## Syntax\n\n```js\nnew TypeError()\nnew TypeError(message)\nnew TypeError(message, options)\nnew TypeError(message, fileName)\nnew TypeError(message, fileName, lineNumber)\n\nTypeError()\nTypeError(message)\nTypeError(message, options)\nTypeError(message, fileName)\nTypeError(message, fileName, lineNumber)\n```\n\n> **Note:** `TypeError()` can be called with or without `new`. Both create a new `TypeError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/URIError/URIError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URIError\n\nThe **`URIError()`** constructor creates an error when a global\nURI handling function was used in a wrong way.\n\n## Syntax\n\n```js\nnew URIError()\nnew URIError(message)\nnew URIError(message, options)\nnew URIError(message, fileName)\nnew URIError(message, fileName, lineNumber)\n\nURIError()\nURIError(message)\nURIError(message, options)\nURIError(message, fileName)\nURIError(message, fileName, lineNumber)\n```\n\n> **Note:** `URIError()` can be called with or without `new`. Both create a new `URIError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/URL/URL.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL()\n\nThe **`URL()`** constructor returns a newly created\n`URL` object representing the URL defined by the parameters.\n\nIf the given base URL or the resulting URL are not valid URLs, the JavaScript\n`TypeError` exception is thrown.\n\n## Syntax\n\n```js\nnew URL(url)\nnew URL(url, base)\n```\n\n### Parameters\n\n- `url`\n  - : A string or any other object with a `toString()` method.\n    If `url` is a relative URL, `base` is\n    required, and will be used as the base URL. If `url` is an\n    absolute URL, a given `base` will be ignored.\n- `base` _**optional**_\n  - : A string representing the base URL to use in cases where\n    `url` is a relative URL. If not specified, it defaults to\n    `undefined`.\n\n> **Note:** The `url` and `base` arguments will\n> each be stringified from whatever value you pass, just like with other Web APIs\n> that accept a string. In particular, you can use an existing\n> `URL` object for either argument, and it will stringify to the\n> object's `URL.href\", \"href` property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/URL/prototype/hash.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.hash\n\nThe **`hash`** property of the\n`URL` interface is a string containing a\n`'#'` followed by the fragment identifier of the URL.\n\nThe fragment is not percent-decoded. If the URL does not\nhave a fragment identifier, this property contains an empty string — `\"\"`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/URL/prototype/host.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.host\n\nThe **`host`** property of the `URL` interface is\na string containing the host, that is the `URL.hostname`, and then, if the `port` of the URL is nonempty, a\n`':'`, followed by the `port` of the URL.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/URL/prototype/hostname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.hostname\n\nThe **`hostname`** property of the `URL` interface\nis a string containing the domain name of the URL.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/URL/prototype/href.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.href\n\nThe **`href`** property of the `URL` interface is\na string containing the whole URL.\n\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/URL/prototype/origin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.origin\n\nThe **`origin`** read-only property of\nthe `URL` interface returns a string containing the\nUnicode serialization of the origin of the represented URL.\n\nThe exact structure\nvaries depending on the type of URL:\n\n- For `http` or `https` URLs, the scheme followed by\n  `'://'`, followed by the domain, followed by `':'`, followed by\n  the port (the default port, `80` and `443` respectively, if\n  explicitly specified).\n- For `file:` URLs, the value is browser dependent.\n- for `blob:` URLs, the origin of the URL following `blob:` will\n  be used. For example, `\"blob:https://mozilla.org\"` will be returned as\n  `\"https://mozilla.org\".`\n\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/URL/prototype/password.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.password\n\nThe **`password`** property of the `URL` interface\nis a string containing the password specified before the domain name.\n\nIf it is set without first setting the `URL.username` property, it silently fails.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/URL/prototype/pathname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.pathname\n\nThe **`pathname`** property of the `URL` interface represents a location in a hierarchical structure. It is a string constructed from a list of path segments, each of which is prefixed by a `/` character. If the URL has no path segments, the value of its `pathname` property will be the empty string.\n\nURLs such as `https` and `http` URLs that have [hierarchical schemes](https://www.rfc-editor.org/rfc/rfc3986#section-1.2.3) (which the URL standard calls \"[special schemes](https://url.spec.whatwg.org/#special-scheme)\") always have at least one (invisible) path segment: the empty string. Thus the `pathname` value for such \"special scheme\" URLs can never be the empty string, but will instead always have a least one `/` character.\n\nFor example, the URL `https://developer.mozilla.org` has just one path segment: the empty string, so its `pathname` value is constructed by prefixing a `/` character to the empty string.\n\nSome systems define the term _slug_ to mean the final segment of a non-empty path if it identifies a page in human-readable keywords. For example, the URL `https://example.org/articles/this-that-other-outre-collection` has `this-that-other-outre-collection` as its slug.\n\nSome systems use the `;` and `=` characters to delimit parameters and parameter values applicable to a path segment. For example, with the URL `https://example.org/users;id=42/tasks;state=open?sort=modified`, a system might extract and use the path segment parameters `id=42` and `state=open` from the path segments `users;id=42` and `tasks;state=open`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/URL/prototype/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.port\n\nThe **`port`** property of the `URL` interface is\na string containing the port number of the URL.\n\n> **Note:** If an input string passed to the `URL()` constructor doesn't contain an explicit port number (e.g., `https://localhost`) or contains a port number that's the default port number corresponding to the protocol part of the input string (e.g., `https://localhost:443`), then in the `URL` object the constructor returns, the value of the port property will be the empty string: `''`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/URL/prototype/protocol.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.protocol\n\nThe **`protocol`** property of the `URL` interface\nis a string representing the protocol scheme of the URL, including the\nfinal `':'`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/URL/prototype/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.search\n\nThe **`search`** property of the `URL` interface\nis a search string, also called a _query string_, that is a\nstring containing a `'?'` followed by the parameters of the\nURL.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/URL/prototype/searchParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.searchParams\n\nThe **`searchParams`** readonly property of the\n`URL` interface returns a `URLSearchParams` object allowing\naccess to the `GET` decoded query arguments contained in the URL.\n\n## Value\n\nA `URLSearchParams` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/URL/prototype/toJSON.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.toJSON()\n\nThe **`toJSON()`** method of the `URL` interface\nreturns a string containing a serialized version of the URL,\nalthough in practice it seems to have the same effect as\n`URL.toString()`.\n\n## Syntax\n\n```js\ntoJSON()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/URL/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.toString()\n\nThe **`URL.toString()`** method returns a\nstring containing the whole URL. It is effectively a read-only version\nof `URL.prototype.href`.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/URL/prototype/username.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.username\n\nThe **`username`** property of the `URL` interface\nis a string containing the username specified before the domain name.\n\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/URLSearchParams/URLSearchParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams()\n\nThe **`URLSearchParams()`** constructor creates and returns a\nnew `URLSearchParams` object.\n\n\n\n## Syntax\n\n```js\nnew URLSearchParams()\nnew URLSearchParams(options)\n```\n\n### Parameters\n\n- `options` _**optional**_\n  - : One of:\n    - A string, which will be parsed from `application/x-www-form-urlencoded` format. A leading `'?'` character is ignored.\n    - A literal sequence of name-value string pairs, or any object with an iterator that produces a sequence of string pairs.\n    - A record of string keys and string values. Note that nesting is not supported.\n\n### Return value\n\nA `URLSearchParams` object instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/URLSearchParams/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.append()\n\nThe **`append()`** method of the `URLSearchParams`\ninterface appends a specified key/value pair as a new search parameter.\n\nAs shown in the example below, if the same key is appended multiple times it will\nappear in the parameter string multiple times for each value.\n\n## Syntax\n\n```js\nappend(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to append.\n- `value`\n  - : The value of the parameter to append.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/URLSearchParams/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.delete()\n\nThe **`delete()`** method of the `URLSearchParams`\ninterface deletes the given search parameter and all its associated values, from the\nlist of all search parameters.\n\n## Syntax\n\n```js\ndelete(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to be deleted.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/URLSearchParams/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.entries()\n\nThe **`entries()`** method of the\n`URLSearchParams` interface returns an\niterator allowing iteration through all key/value\npairs contained in this object. The iterator returns key/value pairs in the same order as they appear in the query string. The key and value of each pair are\nstring objects.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/URLSearchParams/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.forEach()\n\nThe **`forEach()`** method of the\n`URLSearchParams` interface allows iteration through all values contained\nin this object via a callback function.\n\n## Syntax\n\n```js\nforEach(callback)\nforEach(callback, thisArg)\n```\n\n### Parameters\n\n- `callback`\n\n  - : Function to execute on each element, which is passed the following arguments:\n\n    - `value`\n      - : The value of the current entry being processed in the `URLSearchParams` object.\n    - `key`\n      - : The key of the current entry being processed in the `URLSearchParams` object.\n    - `searchParams`\n      - : The `URLSearchParams` object the `forEach()` was called upon.\n\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `callback`.\n\n### Return value\n\nNone `undefined`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/URLSearchParams/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.get()\n\nThe **`get()`** method of the `URLSearchParams`\ninterface returns the first value associated to the given search parameter.\n\n## Syntax\n\n```js\nget(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to return.\n\n### Return value\n\nA string if the given search parameter is found; otherwise,\n**`null`**.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/URLSearchParams/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.has()\n\nThe **`has()`** method of the `URLSearchParams`\ninterface returns a boolean value that indicates whether a parameter with the\nspecified name exists.\n\n## Syntax\n\n```js\nhas(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to find.\n\n### Return value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/URLSearchParams/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.keys()\n\nThe **`keys()`** method of the `URLSearchParams`\ninterface returns an iterator allowing iteration\nthrough all keys contained in this object. The keys are string\nobjects.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/URLSearchParams/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.set()\n\nThe **`set()`** method of the `URLSearchParams`\ninterface sets the value associated with a given search parameter to the given value.\nIf there were several matching values, this method deletes the others. If the search\nparameter doesn't exist, this method creates it.\n\n## Syntax\n\n```js\nset(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to set.\n- `value`\n  - : The value of the parameter to set.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/URLSearchParams/prototype/sort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.sort()\n\nThe **`URLSearchParams.sort()`** method sorts all key/value\npairs contained in this object in place and returns `undefined`. The sort\norder is according to unicode code points of the keys. This method uses a stable sorting\nalgorithm (i.e. the relative order between key/value pairs with equal keys will be\npreserved).\n\n## Syntax\n\n```js\nsort()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/URLSearchParams/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.toString()\n\nThe **`toString()`** method of the\n`URLSearchParams` interface returns a query string suitable for use in a\nURL.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string, without the question mark. (Returns an empty string if no\nsearch parameters have been set.)\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/URLSearchParams/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.values()\n\nThe **`values()`** method of the `URLSearchParams`\ninterface returns an iterator allowing iteration\nthrough all values contained in this object. The values are string\nobjects.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Uint16Array/Uint16Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint16Array\n\nThe **`Uint16Array()`** typed array constructor creates an\narray of 16-bit unsigned integers in the platform byte order.\n\n## Syntax\n\n```js\nnew Uint16Array()\nnew Uint16Array(length)\nnew Uint16Array(typedArray)\nnew Uint16Array(object)\n\nnew Uint16Array(buffer)\nnew Uint16Array(buffer, byteOffset)\nnew Uint16Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint16Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Uint32Array/Uint32Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint32Array\n\nThe **`Uint32Array()`** typed array constructor creates an\narray of 32-bit unsigned integers in the platform byte order. If control over byte order\nis needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are initialized to\n`0`. Once established, you can reference elements in the array using the\nobject's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Uint32Array()\nnew Uint32Array(length)\nnew Uint32Array(typedArray)\nnew Uint32Array(object)\n\nnew Uint32Array(buffer)\nnew Uint32Array(buffer, byteOffset)\nnew Uint32Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint32Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Uint8Array/Uint8Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint8Array\n\nThe **`Uint8Array()`** constructor creates a typed array of\n8-bit unsigned integers. The contents are initialized to `0`. Once\nestablished, you can reference elements in the array using the object's methods, or\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew Uint8Array()\nnew Uint8Array(length)\nnew Uint8Array(typedArray)\nnew Uint8Array(object)\n\nnew Uint8Array(buffer)\nnew Uint8Array(buffer, byteOffset)\nnew Uint8Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint8Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/Uint8ClampedArray/Uint8ClampedArray.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint8ClampedArray\n\nThe **`Uint8ClampedArray()`** constructor creates a typed array\nof 8-bit unsigned integers clamped to 0-255; if you specified a value that is out of the\nrange of \\[0,255], 0 or 255 will be set instead; if you specify a non-integer, the\nnearest integer will be set. The contents are initialized to `0`. Once\nestablished, you can reference elements in the array using the object's methods, or\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew Uint8ClampedArray()\nnew Uint8ClampedArray(length)\nnew Uint8ClampedArray(typedArray)\nnew Uint8ClampedArray(object)\n\nnew Uint8ClampedArray(buffer)\nnew Uint8ClampedArray(buffer, byteOffset)\nnew Uint8ClampedArray(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint8ClampedArray()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/WeakMap/WeakMap.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap\n\nThe **`WeakMap()` constructor** creates a `WeakMap` object, optionally based on a provided `Array` or other iterable object.\n\n## Syntax\n\n```js\nnew WeakMap()\nnew WeakMap(iterable)\n```\n\n> **Note:** `WeakMap()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable`\n  - : An `Array` or other object that implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol)  that returns an iterator object that produces a two-element array-like object whose first element is a value that will be used as a `WeakMap` key and whose second element is the value to associate with that key. Each key-value pair will be added to the new `WeakMap`. null is treated as undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/WeakMap/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.delete()\n\nThe **`delete()`** method removes the specified element from a\n`WeakMap` object.\n\n## Syntax\n\n```js\ndelete(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to remove from the `WeakMap` object.\n\n### Return value\n\n`true` if an element in the `WeakMap` object has been removed\nsuccessfully. `false` if the key is not found in the `WeakMap` or\nif the key is not an object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/WeakMap/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.get()\n\nThe **`get()`** method returns a specified element from a\n`WeakMap` object.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key`\n  - : Required. The key of the element to return from the `WeakMap` object.\n\n### Return value\n\nThe element associated with the specified key in the `WeakMap` object. If\nthe key can't be found, [`undefined`](../../../globals/undefined.mdx) is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/WeakMap/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.has()\n\nThe **`has()`** method returns a boolean indicating whether an\nelement with the specified key exists in the `WeakMap` object or not.\n\n## Syntax\n\n```js\nhas(key)\n```\n\n### Parameters\n\n- `key`\n  - : Required. The key of the element to test for presence in the `WeakMap`\n    object.\n\n### Return value\n\n- Boolean\n  - : Returns `true` if an element with the specified key exists in the\n    `WeakMap` object; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/WeakMap/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.set\n\nThe **`set()`** method adds a new element with a specified key\nand value to a `WeakMap` object.\n\n## Syntax\n\n```js\nset(key, value)\n```\n\n### Parameters\n\n- `key`\n  - : Required. Must be `object`. The key of the element to add to the\n    `WeakMap` object.\n- `value`\n  - : Required. Any value. The value of the element to add to the `WeakMap`\n    object.\n\n### Return value\n\nThe `WeakMap` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/WeakRef/WeakRef.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakRef\n\nThe **`WeakRef`** constructor creates a `WeakRef`\nobject referring to a given target object.\n\n## Syntax\n\n```js\nnew WeakRef(targetObject)\n```\n\n> **Note:** `WeakRef()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `targetObject`\n  - : The target object the WeakRef should refer to (also called the _referent_).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/WeakRef/prototype/deref.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakRef.prototype.deref()\n\nThe `deref` method returns the `WeakRef` instance's target\nobject, or `undefined` if the target object has been garbage-collected.\n\n## Syntax\n\n```js\nderef()\n```\n\n### Return value\n\nThe target object of the WeakRef, or `undefined` if the object has been\ngarbage-collected.\n\n## Description\n\nSee the [Notes on WeakRefs](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WeakRef#notes_on_weakrefs) section of the `WeakRef` page for some important notes.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/WeakSet/WeakSet.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet\n\nThe **`WeakSet`** constructor lets you create\n`WeakSet` objects that store weakly held _objects_ in a collection.\n\n## Syntax\n\n```js\nnew WeakSet()\nnew WeakSet(iterable)\n```\n\n> **Note:** `WeakSet()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable` _**optional**_\n  - : If an [iterable object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) is passed, all of its elements will be added to the new\n    `WeakSet`. null is treated as undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/WeakSet/prototype/add.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet.prototype.add\n\nThe **`add()`** method appends a new object to the end of a\n`WeakSet` object.\n\n## Syntax\n\n```js\nadd(value)\n```\n\n### Parameters\n\n- value\n  - : Required. The object to add to the `WeakSet` collection.\n\n### Return value\n\nThe `WeakSet` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/WeakSet/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet.prototype.delete\n\nThe **`delete()`** method removes the specified element from a\n`WeakSet` object.\n\n## Syntax\n\n```js\ndelete(value)\n```\n\n### Parameters\n\n- `value`\n  - : Required. The object remove from the `WeakSet` object.\n\n### Return value\n\n`true` if an element in the `WeakSet` object has been removed\nsuccessfully. `false` if the `value` is not found in\nthe `WeakSet` or if the `value` is not an object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/WeakSet/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet.prototype.has\n\nThe **`has()`** method returns a boolean indicating whether an\nobject exists in a `WeakSet` or not.\n\n## Syntax\n\n```js\nhas(value)\n```\n\n### Parameters\n\n- `value`\n  - : Required. The object to test for presence in the `WeakSet`.\n\n### Return value\n\n- Boolean\n  - : Returns `true` if an element with the specified value exists in the\n    `WeakSet` object; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/WorkerLocation/WorkerLocation.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# WorkerLocation\n\nThe **`WorkerLocation`** interface defines the absolute location of the script executed by the Worker. Such an object is initialized for each worker and is available via the [`location`](../../globals/location.mdx) property obtained by calling `globalThis.location`.\n\n## Instance properties\n\n- [`WorkerLocation.href`](../../globals/WorkerLocation/href.mdx) _**read-only**_\n  - : Returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location.\n- [`WorkerLocation.protocol`](../../globals/WorkerLocation/protocol.mdx) _**read-only**_\n  - : Returns the [`protocol`](../../globals/URL/prototype/protocol.mdx) part of the worker's location.\n- [`WorkerLocation.host`](../../globals/WorkerLocation/host.mdx) _**read-only**_\n  - : Returns the [`host`](../../globals/URL/prototype/host.mdx) part of the worker's location.\n- [`WorkerLocation.hostname`](../../globals/WorkerLocation/hostname.mdx) _**read-only**_\n  - : Returns the [`hostname`](../../globals/URL/prototype/hostname.mdx) part of the worker's location.\n- [`WorkerLocation.origin`](../../globals/WorkerLocation/origin.mdx) _**read-only**_\n  - : Returns the worker's [`origin`](../../globals/URL/prototype/origin.mdx).\n- [`WorkerLocation.port`](../../globals/WorkerLocation/port.mdx) _**read-only**_\n  - : Returns the [`port`](../../globals/URL/prototype/port.mdx) part of the worker's location.\n- [`WorkerLocation.pathname`](../../globals/WorkerLocation/pathname.mdx) _**read-only**_\n  - : Returns the [`pathname`](../../globals/URL/prototype/pathname.mdx) part of the worker's location.\n- [`WorkerLocation.search`](../../globals/WorkerLocation/search.mdx) _**read-only**_\n  - : Returns the [`search`](../../globals/URL/prototype/search.mdx) part of the worker's location.\n- [`WorkerLocation.hash`](../../globals/WorkerLocation/hash.mdx) _**read-only**_\n  - : Returns the [`hash`](../../globals/URL/prototype/hash.mdx) part of the worker's location.\n\n## Instance methods\n\n- [`WorkerLocation.toString`](../../globals/WorkerLocation/toString.mdx)\n  - : Returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location. It is a synonym for [`WorkerLocation.href`](../../globals/WorkerLocation/href.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/WorkerLocation/hash.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.hash\n\nThe **`hash`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`hash`](../../globals/URL/prototype/hash.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/WorkerLocation/host.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.host\n\nThe **`host`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`host`](../../globals/URL/prototype/host.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/WorkerLocation/hostname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.hostname\n\nThe **`hostname`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`hostname`](../../globals/URL/prototype/hostname.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/WorkerLocation/href.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.href\n\nThe **`href`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/WorkerLocation/origin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.origin\n\nThe **`origin`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the worker's [`origin`](../../globals/URL/prototype/origin.mdx).\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/WorkerLocation/pathname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.pathname\n\nThe **`pathname`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`pathname`](../../globals/URL/prototype/pathname.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/WorkerLocation/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.port\n\nThe **`port`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`port`](../../globals/URL/prototype/port.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/WorkerLocation/protocol.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.protocol\n\nThe **`protocol`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`protocol`](../../globals/URL/prototype/protocol.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/WorkerLocation/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.search\n\nThe **`search`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`search`](../../globals/URL/prototype/search.mdx) part of the worker's location.\n\n## Value\n\nA string.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/WorkerLocation/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.toString()\n\nThe **`toString()`** method of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location. It is a synonym for [`WorkerLocation.href`](../../globals/WorkerLocation/href.mdx).\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone [`undefined`](../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/WritableStream/WritableStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream()\n\nThe **`WritableStream()`** constructor creates\na new `WritableStream` object instance.\n\n## Syntax\n\n```js\nnew WritableStream(underlyingSink)\nnew WritableStream(underlyingSink, queuingStrategy)\n```\n\n### Parameters\n\n- `underlyingSink` _**optional**_\n\n  - : An object containing methods and properties that define how the constructed stream\n    instance will behave. `underlyingSink` can contain the following:\n\n    - `start(controller)` _**optional**_\n      - : This is a method, called immediately when the object is constructed. The\n        contents of this method are defined by the developer, and should aim to get access\n        to the underlying sink. If this process is to be done asynchronously, it can\n        return a promise to signal success or failure. The `controller`\n        parameter passed to this method is a\n        `WritableStreamDefaultController`. This can be used by the developer\n        to control the stream during set up.\n    - `write(chunk, controller)` _**optional**_\n      - : This method, also defined by the developer, will be called when a new chunk of\n        data (specified in the `chunk` parameter) is ready to be written to the\n        underlying sink. It can return a promise to signal success or failure of the write\n        operation. The `controller` parameter passed to this method is a\n        `WritableStreamDefaultController` that can be used by the developer\n        to control the stream as more chunks are submitted for writing. This method will\n        be called only after previous writes have succeeded, and never after the stream is\n        closed or aborted (see below).\n    - `close(controller)` _**optional**_\n      - : This method, also defined by the developer, will be called if the app signals\n        that it has finished writing chunks to the stream. The contents should do whatever\n        is necessary to finalize writes to the underlying sink, and release access to it.\n        If this process is asynchronous, it can return a promise to signal success or\n        failure. This method will be called only after all queued-up writes have\n        succeeded. The `controller` parameter passed to this method is a\n        `WritableStreamDefaultController`, which can be used to control the\n        stream at the end of writing.\n    - `abort(reason)` _**optional**_\n      - : This method, also defined by the developer, will be called if the app signals\n        that it wishes to abruptly close the stream and put it in an errored state. It can\n        clean up any held resources, much like `close()`, but\n        `abort()` will be called even if writes are queued up — those chunks\n        will be thrown away. If this process is asynchronous, it can return a promise to\n        signal success or failure. The `reason` parameter contains a\n        string describing why the stream was aborted.\n\n- `queuingStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer — this defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk` — this indicates the size to use for each chunk, in bytes.\n\n    > **Note:** You could define your own custom\n    > `queuingStrategy`, or use an instance of\n    > `ByteLengthQueuingStrategy` or `CountQueuingStrategy`\n    > for this object value. If no `queuingStrategy` is supplied, the default\n    > used is the same as a `CountQueuingStrategy` with a high water mark of 1\\.\n\n### Return value\n\nAn instance of the `WritableStream` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/WritableStream/prototype/abort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream.abort()\n\nThe **`abort()`** method of the `WritableStream` interface aborts the stream, signaling that the producer can no longer successfully write to the stream and it is to be immediately moved to an error state, with any queued writes discarded.\n\n## Syntax\n\n```js\nabort(reason)\n```\n\n### Parameters\n\n- `reason`\n  - : A string providing a human-readable reason for the abort.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason` parameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to abort is not a `WritableStream`, or it is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/WritableStream/prototype/getWriter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream.getWriter()\n\nThe **`getWriter()`** method of the `WritableStream` interface returns a new instance of `WritableStreamDefaultWriter` and locks the stream to that instance.\nWhile the stream is locked, no other writer can be acquired until this one is released.\n\n## Syntax\n\n```js\ngetWriter()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `WritableStreamDefaultWriter` object instance.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to create a writer for is not a `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/WritableStream/prototype/locked.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream.locked\n\nThe **`locked`** read-only property of the `WritableStream` interface returns a boolean indicating whether the `WritableStream` is locked to a writer.\n\n## Value\n\nA boolean value indicating whether or not the writable stream is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/WritableStreamDefaultController/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultController.error()\n\nThe **`error()`** method of the\n`WritableStreamDefaultController` interface causes any future interactions\nwith the associated stream to error.\n\nThis method is rarely used, since usually it suffices to return a rejected promise from\none of the underlying sink's methods. However, it can be useful for suddenly shutting\ndown a stream in response to an event outside the normal lifecycle of interactions with\nthe underlying sink.\n\n## Syntax\n\n```js\nerror(message)\n```\n\n### Parameters\n\n- `message`\n  - : A string representing the error you want future interactions to\n    fail with.\n\n### Return value\n\nNone `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to error is not a `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/WritableStreamDefaultWriter/WritableStreamDefaultWriter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter()\n\nThe **`WritableStreamDefaultWriter()`**\nconstructor creates a new `WritableStreamDefaultWriter` object instance.\n\n## Syntax\n\n```js\nnew WritableStreamDefaultWriter(stream)\n```\n\n### Parameters\n\n- `stream`\n  - : The `WritableStream` to be written to.\n\n### Return value\n\nAn instance of the `WritableStreamDefaultWriter` object.\n\n### Exceptions\n\n- `TypeError`\n  - : The provided `stream` value is not a `WritableStream`, or it\n    is locked to another writer already.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/WritableStreamDefaultWriter/prototype/abort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.abort()\n\nThe **`abort()`** method of the\n`WritableStreamDefaultWriter` interface aborts the stream, signaling that\nthe producer can no longer successfully write to the stream and it is to be immediately\nmoved to an error state, with any queued writes discarded.\n\nIf the writer is active, the `abort()` method behaves the same as that for\nthe associated stream (`WritableStream.abort()`). If not, it returns a\nrejected promise.\n\n## Syntax\n\n```js\nabort()\nabort(reason)\n```\n\n### Parameters\n\n- `reason` _**optional**_\n  - : A string representing a human-readable reason for the abort.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason`\nparameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to abort is not a `WritableStream`, or it is\n    locked.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/WritableStreamDefaultWriter/prototype/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.close()\n\nThe **`close()`** method of the\n`WritableStreamDefaultWriter` interface closes the associated writable\nstream.\n\nThe underlying sink will finish processing any previously-written chunks, before\ninvoking the close behavior. During this time any further attempts to write will fail\n(without erroring the stream).\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise`, which fulfills with the `undefined` if all\nremaining chunks were successfully written before the close, or rejects with an error if\na problem was encountered during the process.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to close is not a `WritableStream`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/WritableStreamDefaultWriter/prototype/closed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.closed\n\nThe **`closed`** read-only property of the\n`WritableStreamDefaultWriter` interface returns a\n`Promise` that fulfills if the stream becomes closed, or rejects if\nthe stream errors or the writer's lock is released.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/WritableStreamDefaultWriter/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.desiredSize\n\nThe **`desiredSize`** read-only property of the\n`WritableStreamDefaultWriter` interface returns the desired size required\nto fill the stream's internal queue.\n\n## Value\n\nAn integer. Note that this can be negative if the queue is over-full.\n\nThe value will be `null` if the stream cannot be successfully written to\n(due to either being errored, or having an abort queued up), and zero if the stream is\nclosed.\n\n### Exceptions\n\n- `TypeError`\n  - : The writer's lock is released.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/WritableStreamDefaultWriter/prototype/ready.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.ready\n\nThe **`ready`** read-only property of the\n`WritableStreamDefaultWriter` interface returns a `Promise`\nthat resolves when the desired size of the stream's internal queue transitions from\nnon-positive to positive, signaling that it is no longer applying backpressure.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/WritableStreamDefaultWriter/prototype/releaseLock.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.releaseLock()\n\nThe **`releaseLock()`** method of the\n`WritableStreamDefaultWriter` interface releases the writer's lock on the\ncorresponding stream. After the lock is released, the writer is no longer active. If the\nassociated stream is errored when the lock is released, the writer will appear errored\nin the same way from now on; otherwise, the writer will appear closed.\n\n## Syntax\n\n```js\nreleaseLock()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone `undefined`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/WritableStreamDefaultWriter/prototype/write.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.write()\n\nThe **`write()`** method of the\n`WritableStreamDefaultWriter` interface writes a passed chunk of data to a\n`WritableStream` and its underlying sink, then returns a\n`Promise` that resolves to indicate the success or failure of the write\noperation.\n\nNote that what \"success\" means is up to the underlying sink; it might indicate that the\nchunk has been accepted, and not necessarily that it is safely saved to its ultimate\ndestination.\n\n## Syntax\n\n```js\nwrite(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : A block of binary data to pass to the `WritableStream`.\n\n### Return value\n\nA `Promise`, which fulfills with the `undefined` upon a\nsuccessful write, or rejects if the write fails or stream becomes errored before the\nwriting process is initiated.\n\n### Exceptions\n\n- `TypeError`\n  - : The target stream is not a writable stream, or it does not have an owner.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/atob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# atob()\n\nThe **`atob()`** function decodes a\nstring of data which has been encoded using Base64 encoding. You can use\nthe `btoa()` method to encode and transmit\ndata which may otherwise cause communication problems, then transmit it and use the\n`atob()` method to decode the data again. For example, you can encode,\ntransmit, and decode control characters such as ASCII values 0 through 31.\n\nFor use with Unicode or UTF-8 strings, see the note on \"Unicode strings\" in the page\nfor `btoa()`.\n\n## Syntax\n\n```js\natob(encodedData)\n```\n\n### Parameters\n\n- `encodedData`\n  - : A binary string (i.e., a string in which each character in the string is treated as a byte of binary data) containing base64-encoded data.\n\n### Return value\n\nAn ASCII string containing decoded data from `encodedData`.\n\n### Exceptions\n\n- `InvalidCharacterError`\n  - : Thrown if `encodedData` is not valid base64.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/btoa.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# btoa()\n\nThe **`btoa()`** method creates a\nBase64-encoded ASCII string from a _binary string_ (i.e., a\nstring in which each character in the string is treated as a byte\nof binary data).\n\nYou can use this method to encode data which may otherwise cause communication\nproblems, transmit it, then use the `atob()` method to decode the data again. For example, you can encode control\ncharacters such as ASCII values 0 through 31.\n\n## Syntax\n\n```js\nbtoa(stringToEncode)\n```\n\n### Parameters\n\n- `stringToEncode`\n  - : The _binary string_ to encode.\n\n### Return value\n\nAn ASCII string containing the Base64 representation of\n`stringToEncode`.\n\n### Exceptions\n\n- `InvalidCharacterError`\n  - : The string contained a character that did not fit in a single byte. See \"Unicode\n    strings\" below for more detail.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/clearInterval.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# clearInterval()\n\nThe global **`clearInterval()`** method cancels a timed, repeating action which\nwas previously established by a call to `setInterval()`.\nIf the parameter provided does not identify a previously established action,\nthis method does nothing.\n\n## Syntax\n\n```js\nclearInterval(intervalID)\n```\n\n### Parameters\n\n- `intervalID`\n  - : The identifier of the repeated action you want to cancel. This ID was returned by\n    the corresponding call to `setInterval()`.\n\nIt's worth noting that the pool of IDs used by\n`setInterval()` and\n`setTimeout()` are shared, which\nmeans you can technically use `clearInterval()` and\n`clearTimeout()` interchangeably.\nHowever, for clarity, you should avoid doing so.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/clearTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# clearTimeout()\n\nThe global **`clearTimeout()`** method cancels a timeout previously established\nby calling `setTimeout()`.\n\nIf the parameter provided does not identify a previously established action,\nthis method does nothing.\n\n## Syntax\n\n```js\nclearTimeout(timeoutID)\n```\n\n### Parameters\n\n- `timeoutID`\n  - : The identifier of the timeout you want to cancel. This ID was returned by the\n    corresponding call to `setTimeout()`.\n\nIt's worth noting that the pool of IDs used by\n`setTimeout()` and\n`setInterval()` are shared, which\nmeans you can technically use `clearTimeout()` and\n`clearInterval()`\ninterchangeably. However, for clarity, you should avoid doing so.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/console/assert.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.assert()\n\nThe **`console.assert()`** method writes an error message to\nthe console if the assertion is false. If the assertion is true, nothing happens.\n\n## Syntax\n\n```js\nassert(assertion, obj1)\nassert(assertion, obj1, obj2)\nassert(assertion, obj1, obj2, /* … ,*/ objN)\n\nassert(assertion, msg)\nassert(assertion, msg, subst1)\nassert(assertion, msg, subst1, /* … ,*/ substN)\n```\n\n### Parameters\n\n- `assertion`\n  - : Any boolean expression. If the assertion is false, the message is written to the\n    console.\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output.\n- `msg`\n  - : A JavaScript string containing zero or more substitution strings.\n- `subst1` … `substN`\n  - : JavaScript objects with which to replace substitution strings within\n    `msg`. This parameter gives you additional control over the format of the\n    output.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/console/clear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.clear()\n\nThe **`console.clear()`** method clears the console if the console allows it.\n\n## Syntax\n\n```js\nclear()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/console/count.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.count()\n\nThe **`console.count()`** method logs the number of times that\nthis particular call to `count()` has been called.\n\n\n## Syntax\n\n```js\ncount()\ncount(label)\n```\n\n### Parameters\n\n- `label` _optional_\n  - : A string. If supplied, `count()` outputs the number of\n    times it has been called with that label. If omitted, `count()` behaves as\n    though it was called with the \"default\" label.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/console/countReset.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.countReset()\n\nThe **`console.countReset()`** method resets counter used with `console.count()`.\n\n## Syntax\n\n```js\ncountReset()\ncountReset(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : A string. If supplied, `countReset()` resets the count for\n    that label to 0. If omitted, `countReset()` resets the default counter to\n    0.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/console/debug.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.debug()\n\nThe **`console.debug()`** method outputs a message to the console at the \"debug\" log level.\n\n## Syntax\n\n```js\ndebug(obj1)\ndebug(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output to the console.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/console/dir.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.dir()\n\nThe method **`console.dir()`** displays a list of the properties of\nthe specified JavaScript object.\n\n## Syntax\n\n```js\ndir(object)\n```\n\n### Parameters\n\n- `object`\n  - : A JavaScript object whose properties should be output.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/console/dirxml.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.dirxml()\n\nThe **`console.dirxml()`** method displays the supplied object in the console.\n\n## Syntax\n\n```js\ndirxml(object)\n```\n\n### Parameters\n\n- `object`\n  - : A JavaScript object whose properties should be output.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/console/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.error()\n\nThe **`console.error()`** method outputs an error message console.\n\n## Syntax\n\n```js\nerror(obj1)\nerror(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of\n    these objects are appended together in the order listed and output.\n\n### Return value\n\nNone `undefined`."
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/console/group.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.group()\n\nThe **`console.group()`** method creates a new inline group in the console, until `console.groupEnd()` is called.\n\n## Syntax\n\n```js\ngroup()\ngroup(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : Label for the group.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/console/groupCollapsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.groupCollapsed()\n\nThe **`console.groupCollapsed()`** method creates a new inline group in the Web Console. Unlike `console.group()`,\nhowever, the new group is created collapsed. The user will need to use the disclosure\nbutton next to it to expand it, revealing the entries created in the group.\n\nCall `console.groupEnd()` to back out to the parent group.\n\n## Syntax\n\n```js\ngroupCollapsed()\ngroupCollapsed(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : Label for the group.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/console/groupEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.groupEnd()\n\nThe **`console.groupEnd()`** method exits the current inline group in the console.\n\n## Syntax\n\n```js\ngroupEnd()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/console/info.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.info()\n\nThe **`console.info()`** method outputs an informational message to the console.\n\n## Syntax\n\n```js\ninfo(obj1)\ninfo(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/console/log.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.log()\n\nThe **`console.log()`** method outputs a message to the console.\n\n## Syntax\n\n```js\nlog(obj1)\nlog(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output. Please be warned that if\n    you log objects in the latest versions of Chrome and Firefox what you get logged on\n    the console is a _reference to the object_, which is not necessarily the\n    'value' of the object at the moment in time you call `console.log()`, but\n    it is the value of the object at the moment you open the console.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/console/time.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.time()\n\nThe **`console.time()`** method starts a timer you can use to track\nhow long an operation takes. You give each timer a unique name. When you call `console.timeEnd()` with the same name, the\nbrowser will output the time, in milliseconds, that elapsed since the timer was started.\n\n## Syntax\n\n```js\ntime(label)\n```\n\n### Parameters\n\n- `label`\n  - : A `string` representing the name to give the new timer. This will identify the timer; use the same name when\n    calling `console.timeEnd()` to stop the timer and get the time output to\n    the console.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/console/timeEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.timeEnd()\n\nThe **`console.timeEnd()`** stops a timer that was previously started by calling `console.time()`.\n\n## Syntax\n\n```js\ntimeEnd(label)\n```\n\n### Parameters\n\n- `label`\n  - : A `string` representing the name of the timer to stop. Once stopped, the elapsed time is automatically\n    displayed in the console.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/console/timeLog.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.timeLog()\n\nThe **`console.timeLog()`** method logs the current value of a timer that was previously started by calling `console.time()`.\n\n## Syntax\n\n```js\ntimeLog()\ntimeLog(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : The name of the timer to log to the console. If this is omitted the label \"default\" is used.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/console/trace.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.trace()\n\nThe **`console.trace()`** method outputs a stack trace to the console.\n\n## Syntax\n\n```js\ntrace()\ntrace(object1, /* …, */ objectN)\n```\n\n### Parameters\n\n- `objects` __optional__\n  - : Zero or more objects to be output to console along with the trace. These are\n    assembled and formatted the same way they would be if passed to the `console.log()` method.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/console/warn.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.warn()\n\nThe **`console.warn()`** method outputs a warning message to the console.\n\n## Syntax\n\n```js\nwarn(obj1)\nwarn(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/crypto/getRandomValues.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Crypto.getRandomValues()\n\nThe **`Crypto.getRandomValues()`** method lets you get cryptographically strong random values.\nThe array given as the parameter is filled with random numbers (random in its cryptographic meaning).\n\n## Syntax\n\n```js\ngetRandomValues(typedArray)\n```\n\n### Parameters\n\n- `typedArray`\n  - : An integer-based `TypedArray`, that is one of: `Int8Array`, `Uint8Array`,\n    `Uint8ClampedArray`, `Int16Array`, `Uint16Array`,\n    `Int32Array`, `Uint32Array`, `BigInt64Array`,\n    `BigUint64Array` (but **not** `Float32Array` nor `Float64Array`).\n    All elements in the array will be overwritten with random numbers.\n\n### Return value\n\nThe same array passed as `typedArray` but with its contents replaced with the newly generated random numbers.\nNote that `typedArray` is modified in-place, and no copy is made.\n\n### Exceptions\n\n- `QuotaExceededError`\n  - : Thrown if the `byteLength` of `typedArray` exceeds 65,536.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/crypto/randomUUID.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Crypto.randomUUID()\n\nThe **`randomUUID()`** method is used to generate a v4 [UUID](https://developer.mozilla.org/en-US/docs/Glossary/UUID) using a cryptographically secure random number generator.\n\n## Syntax\n\n```js\nrandomUUID()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string containing a randomly generated, 36 character long v4 UUID."
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/crypto/subtle.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Crypto.subtle\n\nThe **`Crypto.subtle`** read-only property returns a\n[`SubtleCrypto`](../SubtleCrypto/SubtleCrypto.mdx) which can then be used to perform low-level\ncryptographic operations.\n\n## Value\n\nA [`SubtleCrypto`](../SubtleCrypto/SubtleCrypto.mdx) object you can use to interact with the Web Crypto API's\nlow-level cryptography features.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/decodeURI.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# decodeURI\n\nThe **`decodeURI()`** function decodes a Uniform Resource Identifier (URI) previously created by [`encodeURI()`](../globals/encodeURI.mdx) or a similar routine.\n\n## Syntax\n\n```js\ndecodeURI(encodedURI)\n```\n\n### Parameters\n\n- `encodedURI`\n  - : A complete, encoded Uniform Resource Identifier.\n\n### Return value\n\nA new string representing the unencoded version of the given encoded Uniform Resource Identifier (URI).\n\n### Exceptions\n\n- [`URIError`](../globals/URIError/URIError.mdx)\n  - : Thrown if `encodedURI` contains a `%` not followed by two hexadecimal digits, or if the escape sequence does not encode a valid UTF-8 character.\n\n## Description\n\n`decodeURI()` is a function property of the global object.\n\nThe `decodeURI()` function decodes the URI by treating each escape sequence in the form `%XX` as one UTF-8 code unit (one byte). In UTF-8, the number of leading 1 bits in the first byte, which may be 0 (for 1-byte ASCII characters), 2, 3, or 4, indicates the number of bytes in the character. So by reading the first escape sequence, `decodeURI()` can determine how many more escape sequences to consume. If `decodeURI()` fails to find the expected number of sequences, or if the escape sequences don't encode a valid UTF-8 character, a [`URIError`](../globals/URIError/URIError.mdx) is thrown.\n\n`decodeURI()` decodes all escape sequences, but if the escape sequence encodes one of the following characters, the escape sequence is preserved in the output string (because they are part of the URI syntax):\n\n```\n; / ? : @ & = + $ , #\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/decodeURIComponent.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# decodeURIComponent\n\nThe **`decodeURIComponent()`** function decodes a Uniform Resource Identifier (URI) component previously created by [`encodeURIComponent()`](./encodeURIComponent.mdx) or by a similar routine.\n\n\n## Syntax\n\n```js\ndecodeURIComponent(encodedURI)\n```\n\n### Parameters\n\n- `encodedURI`\n  - : An encoded component of a Uniform Resource Identifier.\n\n### Return value\n\nA new string representing the decoded version of the given encoded Uniform Resource Identifier (URI) component.\n\n### Exceptions\n\n- [`URIError`](../globals/URIError/URIError.mdx)\n  - : Thrown if `encodedURI` contains a `%` not followed by two hexadecimal digits, or if the escape sequence does not encode a valid UTF-8 character.\n\n## Description\n\n`decodeURIComponent()` is a function property of the global object.\n\n`decodeURIComponent()` uses the same decoding algorithm as described in [`decodeURI()`](./decodeURI.mdx). It decodes _all_ escape sequences, including those that are not created by [`encodeURIComponent()`](./encodeURIComponent.mdx), like `-.!~*'()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/encodeURI.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# encodeURI()\n\nThe **`encodeURI()`** function encodes a URI by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character (will only be four escape sequences for characters composed of two surrogate characters). Compared to [`encodeURIComponent()`](./encodeURIComponent.mdx), this function encodes fewer characters, preserving those that are part of the URI syntax.\n\n## Syntax\n\n```js\nencodeURI(uri)\n```\n\n### Parameters\n\n- `uri`\n  - : A string to be encoded as a URI.\n\n### Return value\n\nA new string representing the provided string encoded as a URI.\n\n### Exceptions\n\n- [`URIError`](./URIError/URIError.mdx)\n  - : Thrown if `uri` contains a [lone surrogate](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters).\n\n## Description\n\n`encodeURI()` is a function property of the global object.\n\nThe `encodeURI()` function escapes characters by UTF-8 code units, with each octet encoded in the format `%XX`, left-padded with 0 if necessary. Because lone surrogates in UTF-16 do not encode any valid Unicode character, they cause `encodeURI()` to throw a [`URIError`](./URIError/URIError.mdx).\n\n`encodeURI()` escapes all characters **except**:\n\n```\nA–Z a–z 0–9 - _ . ! ~ * ' ( )\n\n; / ? : @ & = + $ , #\n```\n\nThe characters on the second line are characters that may be part of the URI syntax, and are only escaped by `encodeURIComponent()`. Both `encodeURI()` and `encodeURIComponent()` do not encode the characters `-.!~*'()`, known as \"unreserved marks\", which do not have a reserved purpose but are allowed in a URI \"as is\". (See [RFC2396](https://www.ietf.org/rfc/rfc2396.txt))\n\nThe `encodeURI()` function does not encode characters that have special meaning (reserved characters) for a URI. The following example shows all the parts that a URI can possibly contain. Note how certain characters are used to signify special meaning:\n\n```\nhttp://username:password@www.example.com:80/path/to/file.php?foo=316&bar=this+has+spaces#anchor\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/encodeURIComponent.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# encodeURIComponent\n\nThe **`encodeURIComponent()`** function encodes a URI by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character (will only be four escape sequences for characters composed of two surrogate characters). Compared to [`encodeURI()`](./encodeURI.mdx), this function encodes more characters, including those that are part of the URI syntax.\n\n## Syntax\n\n```js\nencodeURIComponent(uriComponent)\n```\n\n### Parameters\n\n- `uriComponent`\n  - : A string to be encoded as a URI component (a path, query string, fragment, etc.). Other values are [converted to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion).\n\n### Return value\n\nA new string representing the provided `uriComponent` encoded as a URI component.\n\n### Exceptions\n\n- [`URIError`](./URIError/URIError.mdx)\n  - : Thrown if `uriComponent` contains a [lone surrogate](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters).\n\n## Description\n\n`encodeURIComponent()` is a function property of the global object.\n\n`encodeURIComponent()` uses the same encoding algorithm as described in [`encodeURI()`](./encodeURI.mdx). It escapes all characters **except**:\n\n```text\nA–Z a–z 0–9 - _ . ! ~ * ' ( )\n```\n\nCompared to [`encodeURI()`](./encodeURI.mdx), `encodeURIComponent()` escapes a larger set of characters. Use `encodeURIComponent()` on user-entered fields from forms `POST`'d to the server — this will encode `&` symbols that may inadvertently be generated during data entry for special HTML entities or other characters that require encoding/decoding. For example, if a user writes `Jack & Jill`, without `encodeURIComponent()`, the ampersand could be interpreted on the server as the start of a new field and jeopardize the integrity of the data.\n\nFor [`application/x-www-form-urlencoded`](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#application/x-www-form-urlencoded-encoding-algorithm), spaces are to be replaced by `+`, so one may wish to follow a `encodeURIComponent()` replacement with an additional replacement of `%20` with `+`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/escape.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# escape()\n\n> **Note:** `escape()` is a non-standard function implemented by browsers and was only standardized for cross-engine compatibility. It is not required to be implemented by all JavaScript engines and may not work everywhere. Use [`encodeURIComponent()`](./encodeURIComponent.mdx) or [`encodeURI()`](./encodeURI.mdx) if possible.\n\nThe **`escape()`** function computes a new string in which certain characters have been replaced by hexadecimal escape sequences.\n\n## Syntax\n\n```js\nescape(str)\n```\n\n### Parameters\n\n- `str`\n  - : A string to be encoded.\n\n### Return value\n\nA new string in which certain characters have been escaped.\n\n## Description\n\n`escape()` is a function property of the global object.\n\nThe `escape()` function replaces all characters with escape sequences, with the exception of ASCII word characters (A–Z, a–z, 0–9, _) and `@*_+-./`. Characters are escaped by UTF-16 code units. If the code unit's value is less than 256, it is represented by a two-digit hexadecimal number in the format `%XX`, left-padded with 0 if necessary. Otherwise, it is represented by a four-digit hexadecimal number in the format `%uXXXX`, left-padded with 0 if necessary.\n\n> **Note:** This function was used mostly for URL encoding and is partly based on the escape format in rfc(1738). The escape format is _not_ an [escape sequence](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#escape_sequences) in string literals. You can replace `%XX` with `\\xXX` and `%uXXXX` with `\\uXXXX` to get a string containing actual string-literal escape sequences.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/eval.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# eval\n\n> **Warning:** Executing JavaScript from a string is an enormous security risk. It is far too easy for a bad actor to run arbitrary code when you use `eval()`. See [never use direct eval](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval#never_use_direct_eval!) for details.\n\nThe **`eval()`** function evaluates JavaScript code represented as a string and returns its completion value. The source is parsed as a script.\n\n## Syntax\n\n```js\neval(script)\n```\n\n### Parameters\n\n- `script`\n  - : A string representing a JavaScript expression, statement, or sequence of statements. The expression can include variables and properties of existing objects. It will be parsed as a script, so [`import`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/import) declarations (which can only exist in modules) are not allowed.\n\n### Return value\n\nThe completion value of evaluating the given code. If the completion value is empty, [`undefined`](./undefined.mdx) is returned. If `script` is not a string primitive, `eval()` returns the argument unchanged.\n\n### Exceptions\n\nThrows any exception that occurs during evaluation of the code, including[ `SyntaxError`](./SyntaxError/SyntaxError.mdx) if `script` fails to be parsed as a script.\n\n## Description\n\n`eval()` is a function property of the global object.\n\nThe argument of the `eval()` function is a string. It will evaluate the source string as a script body, which means both statements and expressions are allowed. It returns the completion value of the code. For expressions, it's the value the expression evaluates to. Many statements and declarations have completion values as well, but the result may be surprising (for example, the completion value of an assignment is the assigned value, but the completion value of [`let`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/let) is undefined), so it's recommended to not rely on statements' completion values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/fetch.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# fetch()\n\nThe global **`fetch()`** method starts the process of fetching a\nresource from the network, returning a promise which is fulfilled once the response is\navailable.\n\nThe promise resolves to the `Response` object\nrepresenting the response to your request.\n\nA `fetch()` promise only rejects when a\nnetwork error is encountered (which is usually when there's a permissions issue or\nsimilar). A `fetch()` promise _does\nnot_ reject on HTTP errors (`404`, etc.). Instead, a\n`then()` handler must check the `Response.ok` and/or\n`Response.status` properties.\n\n> **Note:** The `fetch()` method's parameters are identical to\n> those of the `Request()` constructor.\n\n## Explicit Backends\n\nInternally, Fastly uses named backends to handle fetch requests, which need to be explicitly defined to enable custom HTTP origins to be fetched by the service.\n\nThis `backend` option is then a special Fastly-specific fetch option that is provided to the `fetch()` call:\n\n```js\nfetch('https://origin.com/path', { backend: 'origin' });\n```\n\nBackends are configured using the Fastly service backend configuration, see the [Backend documentation](https://developer.fastly.com/reference/api/services/backend/) for more information.\n\n## Dynamic Backends\n\nDynamic backends are a compute feature that allow services to define backends for themselves.\n\nIf the `backend` option is not provided when making `fetch()` requests, a backend will be automatically created by extracting the protocol, host, and port from the provided URL.\n\nIn addition, custom backend configuration options can then also be provided through the [`Backend()`](../fastly:backend/Backend/Backend.mdx) constructor.\n\n## Syntax\n\n```js\nfetch(resource)\nfetch(resource, options)\n```\n\n### Parameters\n\n- `resource`\n\n  - : This defines the resource that you wish to fetch. This can either be:\n\n    - A string or any other object with a \"toString\" method.\n    - A `Request` object.\n\n- `options` _**optional**_\n\n  - : An object containing any custom settings that you want to apply to the request. The\n    possible options are:\n\n    - `method`\n      - : The request method, e.g., `GET`, `POST`.\n    - `headers`\n      - : Any headers you want to add to your request, contained within a\n        `Headers` object or an object literal with `String`\n        values.\n    - `body`\n      - : Any body that you want to add to your request: this can be an `ArrayBuffer`, a `TypedArray`, a `DataView`, a `URLSearchParams`, string object or literal, or a `ReadableStream` object.\n    - `backend` _**Fastly-specific**_\n      - *Fastly-specific*\n    - `cacheOverride` _**Fastly-specific**_\n    - `cacheKey` _**Fastly-specific**_\n    - `imageOptimizerOptions` _**Fastly-specific**_, see [`imageOptimizerOptions`](../fastly:image-optimizer/imageOptimizerOptions.mdx).\n    - `fastly` _**Fastly-specific**_\n      - `decompressGzip`_: boolean_ _**optional**_\n        - Whether to automatically gzip decompress the Response or not.\n\n### Return value\n\nA `Promise` that resolves to a `Response` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/globalThis.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# globalThis\n\nThe global **`globalThis`** property contains the [global `this`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this#global_context) value, which is usually akin to the [global object](https://developer.mozilla.org/docs/Glossary/Global_object).\n\n## Value\n\nThe global `this` object.\n\n> **Note:** The `globalThis` property is configurable and writable so that code authors can hide it when executing untrusted code and prevent exposing the global object.\n\n## Description\n\nThe `globalThis` property provides a standard way of accessing the global `this` value (and hence the global object itself) across environments.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/isFinite.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# isFinite\n\nThe global **`isFinite()`** function determines whether the\npassed value is a finite number. If needed, the parameter is first converted to a\nnumber.\n\n## Syntax\n\n```js\nisFinite(testValue)\n```\n\n### Parameters\n\n- `testValue`\n  - : The value to be tested for finiteness.\n\n### Return value\n\n**`false`** if the argument is (or will be coerced to) positive\nor negative [`Infinity`](./Infinity.mdx) or [`NaN`](./NaN.mdx) or [`undefined`](./undefined.mdx);\notherwise, **`true`**.\n\n## Description\n\n`isFinite` is a function property of the global object.\n\nYou can use this function to determine whether a number is a finite number. The\n`isFinite` function examines the number in its argument. If the argument is\n`NaN`, positive infinity, or negative infinity, this method returns\n`false`; otherwise, it returns `true`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/isNaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# isNaN()\n\nThe **`isNaN()`** function determines whether a value is [`NaN`](./NaN.mdx) when converted to a number. Because coercion inside the `isNaN()` function can be [surprising](#description), you may alternatively want to use [`Number.isNaN()`](./Number/isNaN.mdx).\n\n## Syntax\n\n```js\nisNaN(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested.\n\n### Return value\n\n`true` if the given value is [`NaN`](./NaN.mdx) after being [converted to a number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_coercion); otherwise, `false`.\n\n## Description\n\n`isNaN()` is a function property of the global object.\n\nFor number values, `isNaN()` tests if the number is the value [`NaN`](./NaN.mdx). When the argument to the `isNaN()` function is not of type [Number](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#number_type), the value is first coerced to a number, and the resulting value is then compared against [`NaN`](./NaN.mdx).\n\nThis behavior of `isNaN()` for non-numeric arguments can be confusing! For example, an empty string is coerced to 0, while a boolean is coerced to 0 or 1; both values are intuitively \"not numbers\", but they don't evaluate to `NaN`, so `isNaN()` returns `false`. Therefore, `isNaN()` answers neither the question \"is the input the floating point [`NaN`](./NaN.mdx) value\" nor the question \"is the input not a number\".\n\n[`Number.isNaN()`](./Number/isNaN.mdx) is a more reliable way to test whether a value is the number value `NaN` or not. Alternatively, the expression `x !== x` can be used, and neither of the solutions is subject to the false positives that make the global `isNaN()` unreliable. To test if a value is a number, use [`typeof x === \"number\"`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/typeof).\n\nThe `isNaN()` function answers the question \"is the input functionally equivalent to [`NaN`](./NaN.mdx) when used in a number context\". If `isNaN(x)` returns `false`, you can use `x` in an arithmetic expression as if it's a valid number that's not `NaN`. If `isNaN(x)` returns `true`, `x` will get coerced to `NaN` and make most arithmetic expressions return `NaN` (because `NaN` propagates). You can use this, for example, to test whether an argument to a function is arithmetically processable (usable \"like\" a number), and handle values that are not number-like by throwing an error, providing a default value, etc. This way, you can have a function that makes use of the full versatility JavaScript provides by implicitly converting values depending on context.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/location.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# location\n\nThe **`location`** read-only property returns a\n[`Location`](../globals/WorkerLocation/WorkerLocation.mdx) object with information about the current location of the\ndocument.\n\nSee [`Location`](../globals/WorkerLocation/WorkerLocation.mdx) for all available properties.\n\n## Value\n\nA [`Location`](../globals/WorkerLocation/WorkerLocation.mdx) object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/parseFloat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# parseFloat()\n\nThe **`parseFloat()`** function parses a string argument and returns a floating point number.\n\n## Syntax\n\n```js\nparseFloat(string)\n```\n\n### Parameters\n\n- `string`\n  - : The value to parse, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). Leading whitespace in this argument is ignored.\n\n### Return value\n\nA floating point number parsed from the given `string`, or [`NaN`](./NaN.mdx) when the first non-whitespace character cannot be converted to a number.\n\n> **Note:** JavaScript does not have the distinction of \"floating point numbers\" and \"integers\" on the language level. [`parseInt()`](./parseInt.mdx) and `parseFloat()` only differ in their parsing behavior, but not necessarily their return values. For example, `parseInt(\"42\")` and `parseFloat(\"42\")` would return the same value: a `Number` 42.\n\n## Description\n\nThe `parseFloat` function converts its first argument to a string, parses that string as a decimal number literal, then returns a number or `NaN`. The number syntax it accepts can be summarized as:\n\n- The characters accepted by `parseFloat()` are plus sign (`+`), minus sign (`-` U+002D HYPHEN-MINUS), decimal digits (`0` – `9`), decimal point (`.`), exponent indicator (`e` or `E`), and the `\"Infinity\"` literal.\n- The `+`/`-` signs can only appear strictly at the beginning of the string, or immediately following the `e`/`E` character. The decimal point can only appear once, and only before the `e`/`E` character. The `e`/`E` character can only appear once, and only if there is at least one digit before it.\n- Leading spaces in the argument are trimmed and ignored.\n- `parseFloat()` can also parse and return [`Infinity`](./Infinity.mdx) or `-Infinity` if the string starts with `\"Infinity\"` or `\"-Infinity\"` preceded by none or more white spaces.\n- `parseFloat()` picks the longest substring starting from the beginning that generates a valid number literal. If it encounters an invalid character, it returns the number represented up to that point, ignoring the invalid character and all characters following it.\n- If the argument's first character can't start a legal number literal per the syntax above, `parseFloat` returns [`NaN`](./NaN.mdx).\n\nSyntax-wise, `parseFloat()` parses a subset of the syntax that the [`Number()`](./Number/Number.mdx) function accepts. Namely, `parseFloat()` does not support non-decimal literals with `0x`, `0b`, or `0o` prefixes but supports everything else. However, `parseFloat()` is more lenient than `Number()` because it ignores trailing invalid characters, which would cause `Number()` to return `NaN`.\n\nSimilar to number literals and `Number()`, the number returned from `parseFloat()` may not be exactly equal to the number represented by the string, due to floating point range and inaccuracy. For numbers outside the `-1.7976931348623158e+308` – `1.7976931348623158e+308` range (see `Number.MAX_VALUE`), `-Infinity` or `Infinity` is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/parseInt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# parseInt\n\nThe **`parseInt()`** function parses a string argument and returns an integer of the specified [radix](https://en.wikipedia.org/wiki/Radix) (the base in mathematical numeral systems).\n\n\n\n## Syntax\n\n```js\nparseInt(string)\nparseInt(string, radix)\n```\n\n### Parameters\n\n- `string`\n  - : A string starting with an integer. Leading whitespace in this argument is ignored.\n- `radix` _**optional**_\n\n  - : An integer between `2` and `36` that represents the _radix_ (the base in mathematical numeral systems) of the `string`. It is converted to a [32-bit integer](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#fixed-width_number_conversion); if it's outside the range of \\[2, 36] after conversion, the function will always return `NaN`. If `0` or not provided, the radix will be inferred based on `string`'s value. Be careful — this does NOT always default to `10`! The [description below](#description) explains in more detail what happens when `radix` is not provided.\n\n### Return value\n\nAn integer parsed from the given `string`, or [`NaN`](./NaN.mdx) when\n\n- the `radix` as a 32-bit integer is smaller than `2` or bigger than `36`, or\n- the first non-whitespace character cannot be converted to a number.\n\n> **Note:** JavaScript does not have the distinction of \"floating point numbers\" and \"integers\" on the language level. `parseInt()` and [`parseFloat()`](./parseFloat.mdx) only differ in their parsing behavior, but not necessarily their return values. For example, `parseInt(\"42\")` and `parseFloat(\"42\")` would return the same value: a `Number` 42.\n\n## Description\n\nThe `parseInt` function converts its first argument to a string, parses that string, then returns an integer or `NaN`.\n\nIf not `NaN`, the return value will be the integer that is the first argument taken as a number in the specified `radix`. (For example, a `radix` of `10` converts from a decimal number, `8` converts from octal, `16` from hexadecimal, and so on.)\n\nThe `radix` argument is converted to a number. If it's unprovided, or if the value becomes 0, `NaN` or `Infinity` (`undefined` is coerced to `NaN`), JavaScript assumes the following:\n\n1. If the input `string`, with leading whitespace and possible `+`/`-` signs removed, begins with `0x` or `0X` (a zero, followed by lowercase or uppercase X), `radix` is assumed to be `16` and the rest of the string is parsed as a hexadecimal number.\n2. If the input `string` begins with any other value, the radix is `10` (decimal).\n\n> **Note:** Other prefixes like `0b`, which are valid in [number literals](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#binary), are treated as normal digits by `parseInt()`. `parseInt()` does _not_ treat strings beginning with a `0` character as octal values either. The only prefix that `parseInt()` recognizes is `0x` or `0X` for hexadecimal values — everything else is parsed as a decimal value if `radix` is missing.\n\nIf the radix is `16`, `parseInt()` allows the string to be optionally prefixed by `0x` or `0X` after the optional sign character (`+`/`-`).\n\nIf the radix value (coerced if necessary) is not in range \\[2, 36] (inclusive) `parseInt` returns `NaN`.\n\nFor radices above `10`, letters of the English alphabet indicate numerals greater than `9`. For example, for hexadecimal numbers (base `16`), `A` through `F` are used. The letters are case-insensitive.\n\n`parseInt` understands exactly two signs: `+` for positive, and `-` for negative. It is done as an initial step in the parsing after whitespace is removed. If no signs are found, the algorithm moves to the following step; otherwise, it removes the sign and runs the number-parsing on the rest of the string.\n\nIf `parseInt` encounters a character that is not a numeral in the specified `radix`, it ignores it and all succeeding characters and returns the integer value parsed up to that point. For example, although `1e3` technically encodes an integer (and will be correctly parsed to the integer `1000` by [`parseFloat()`](./parseFloat.mdx), `parseInt(\"1e3\", 10)` returns `1`, because `e` is not a valid numeral in base 10. Because `.` is not a numeral either, the return value will always be an integer.\n\nIf the first character cannot be converted to a number with the radix in use, `parseInt` returns `NaN`. Leading whitespace is allowed.\n\nFor arithmetic purposes, the `NaN` value is not a number in any radix. You can call the [`Number.isNaN`](./Number/isNaN.mdx) function to determine if the result of `parseInt` is `NaN`. If `NaN` is passed on to arithmetic operations, the operation result will also be `NaN`.\n\nBecause large numbers use the `e` character in their string representation (e.g. `6.022e23` for 6.022 × 10<sup>23</sup>), using `parseInt` to truncate numbers will produce unexpected results when used on very large or very small numbers. `parseInt` should _not_ be used as a substitute for [`Math.trunc()`](./Math/trunc.mdx).\n\nTo convert a number to its string literal in a particular radix, use [`thatNumber.toString(radix)`](./Number/prototype/toString.mdx).\n\nBecause `parseInt()` returns a number, it may suffer from loss of precision if the integer represented by the string is [outside the safe range](./Number/isSafeInteger.mdx). The [`BigInt`](./BigInt/BigInt.mdx) function supports parsing integers of arbitrary length accurately, by returning a `BigInt`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/performance/now.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# performance.now()\n\nThe **`performance.now()`** method returns a high resolution timestamp in milliseconds.\nIt represents the time elapsed since [`performance.timeOrigin`](./timeOrigin.mdx) (the time when the worker was instantiated).\n\n## Syntax\n\n```js\nnow()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns a number which represents the time since worker instantation measured in milliseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/performance/timeOrigin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# performance.timeOrigin\n\nThe **`timeOrigin`** read-only property of the Performance interface returns the high resolution timestamp that is used as the baseline for performance-related timestamps.\n\nThis value represents the time when the worker was instantiated.\n\n### Value\n\nReturns a number which represents the time when the worker was instantation."
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/setInterval.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# setInterval()\n\nThe **`setInterval()`** method, repeatedly\ncalls a function or executes a code snippet, with a fixed time delay between each\ncall.\n\nThis method returns an interval ID which uniquely identifies the interval, so you\ncan remove it later by calling `clearInterval()`.\n\n## Syntax\n\n```js\nsetInterval(code)\nsetInterval(code, delay)\n\nsetInterval(func)\nsetInterval(func, delay)\nsetInterval(func, delay, arg0)\nsetInterval(func, delay, arg0, arg1)\nsetInterval(func, delay, arg0, arg1, /* … ,*/ argN)\n```\n\n### Parameters\n\n- `func`\n  - : A `function` to be executed every `delay` milliseconds. The first execution happens after `delay` milliseconds.\n- `code`\n  - : An optional syntax allows you to include a string instead of a function, which is\n    compiled and executed every `delay` milliseconds. This syntax is _not\n    recommended_ for the same reasons that make using `eval() a\n    security risk.\n- `delay` _**optional**_\n  - : The time, in milliseconds (thousandths of a second), the timer should delay in\n    between executions of the specified function or code. Defaults to 0 if not specified.\n    below for details on the permitted range of `delay` values.\n- `arg0, …, argN` _**optional**_\n  - : Additional arguments which are passed through to the function specified by\n    _func_ once the timer expires.\n\n### Return value\n\nThe returned `intervalID` is a numeric, non-zero value which identifies the\ntimer created by the call to `setInterval()`; this value can be passed to\n`clearInterval()` to cancel the interval.\n\nIt may be helpful to be aware that `setInterval()` and\n`setTimeout()` share the same pool\nof IDs, and that `clearInterval()` and\n`clearTimeout()` can technically\nbe used interchangeably. For clarity, however, you should try to always match them to\navoid confusion when maintaining your code.\n\n> **Note:** The `delay` argument is converted to a\n> signed 32-bit integer. This effectively limits `delay` to 2147483647 ms,\n> since it's specified as a signed integer in the IDL.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/setTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# setTimeout()\n\nThe global **`setTimeout()`** method sets a timer which executes a function or specified\npiece of code once the timer expires.\n\n## Syntax\n\n```js\nsetTimeout(code)\nsetTimeout(code, delay)\n\nsetTimeout(functionRef)\nsetTimeout(functionRef, delay)\nsetTimeout(functionRef, delay, param1)\nsetTimeout(functionRef, delay, param1, param2)\nsetTimeout(functionRef, delay, param1, param2, /* … ,*/ paramN)\n```\n\n### Parameters\n\n- `functionRef`\n  - : A `function` to be executed after the timer expires.\n- `code`\n  - : An alternative syntax that allows you to include a string instead of a function,\n    which is compiled and executed when the timer expires. This syntax is **not\n    recommended** for the same reasons that make using\n    `eval()` a security risk.\n- `delay` _**optional**_\n\n  - : The time, in milliseconds that the timer should wait before\n    the specified function or code is executed. If this parameter is omitted, a value of 0\n    is used, meaning execute \"immediately\", or more accurately, the next event cycle.\n\n- `param1`, …, `paramN` _**optional**_\n\n  - : Additional arguments which are passed through to the function specified by\n    `functionRef`.\n\n### Return value\n\nThe returned `timeoutID` is a positive integer value which\nidentifies the timer created by the call to `setTimeout()`. This value can be\npassed to `clearTimeout()` to\ncancel the timeout.\n\nIt is guaranteed that a `timeoutID` value will never be reused by a subsequent call to\n`setTimeout()` or `setInterval()` on the same object (a window or\na worker). However, different objects use separate pools of IDs.\n\n## Description\n\nTimeouts are cancelled using `clearTimeout()`.\n\nTo call a function repeatedly (e.g., every _N_ milliseconds), consider using\n`setInterval()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/structuredClone.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# structuredClone()\n\nThe global **`structuredClone()`** method creates a deep clone of a given value.\n\n## Syntax\n\n```js\nstructuredClone(value)\n```\n\n### Parameters\n\n- `value`\n  - : The object to be cloned.\n\n### Return value\n\nThe returned value is a deep copy of the original `value`.\n\n### Exceptions\n\n- `DataCloneError`\n  - : Thrown if any part of the input value is not serializable.\n\n## Description\n\nThis function can be used to deep copy JavaScript values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/undefined.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# undefined\n\nThe global **`undefined`** property represents the primitive\nvalue `undefined`. It is one of JavaScript's \"primitive types\".\n\n## Value\n\nThe primitive value `undefined`.\n\n## Description\n\n`undefined` is a property of the _global object_. That is, it is a variable in global scope.\n\n`undefined` is a non-configurable, non-writable property.\n\nA variable that has not been assigned a value is of type `undefined`. A\nmethod or statement also returns `undefined` if the variable that is being\nevaluated does not have an assigned value. A function returns `undefined` if\na value was not explicitly returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/globals/unescape.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# unescape()\n\n> **Note:** `unescape()` is a non-standard function implemented by browsers and was only standardized for cross-engine compatibility. It is not required to be implemented by all JavaScript engines and may not work everywhere. Use [`decodeURIComponent()`](./decodeURIComponent.mdx) or [`decodeURI()`](./decodeURI.mdx) if possible.\n\nThe **`unescape()`** function computes a new string in which hexadecimal escape sequences are replaced with the characters that they represent. The escape sequences might be introduced by a function like [`escape()`](./escape.mdx).\n\n## Syntax\n\n```js\nunescape(str)\n```\n\n### Parameters\n\n- `str`\n  - : A string to be decoded.\n\n### Return value\n\nA new string in which certain characters have been unescaped.\n\n## Description\n\n`unescape()` is a function property of the global object.\n\nThe `unescape()` function replaces any escape sequence with the character that it represents. Specifically, it replaces any escape sequence of the form `%XX` or `%uXXXX` (where `X` represents one hexadecimal digit) with the character that has the hexadecimal value `XX`/`XXXX`. If the escape sequence is not a valid escape sequence (for example, if `%` is followed by one or no hex digit), it is left as-is.\n\n> **Note:** This function was used mostly for URL encoding and is partly based on the escape format in rfc(1738). The `unescape()` function does _not_ evaluate [escape sequences](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#escape_sequences) in string literals. You can replace `\\xXX` with `%XX` and `\\uXXXX` with `%uXXXX` to get a string that can be handled by `unescape()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/html-rewriter/Element/prototype/after.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# after\n\nThe `after` method inserts content after the closing tag of the element.\n\n## Syntax\n\n```js\nelement.after(content);\nelement.after(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to insert after the element's closing tag.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.after(\"World\");\n// Result: <div>Hello</div>World\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/html-rewriter/Element/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# append\n\nThe `append` method inserts content at the end of the element's content.\n\n## Syntax\n\n```js\nelement.append(content);\nelement.append(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to insert at the end of the element's content.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.append(\", World\");\n// Result: <div>Hello, World</div>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/html-rewriter/Element/prototype/before.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# before\n\nThe `before` method inserts content before the opening tag of the element.\n\n## Syntax\n\n```js\nelement.before(content);\nelement.before(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to insert before the element's opening tag.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.before(\"Well\");\n// Result: Well<div>Hello</div>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/html-rewriter/Element/prototype/hasAttribute.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# hasAttribute\n\nThe `hasAttribute` method returns a `boolean` value indicating whether the specified attribute is present on the element.\n\n## Syntax\n\n```js\nelement.hasAttribute(attributeName);\n```\n\n### Parameters\n\n- `attributeName` _: string_\n  - The name of the attribute to check for.\n\n### Return value\n\nA boolean value indicating whether the attribute is present.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/html-rewriter/Element/prototype/prepend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# prepend\n\nThe `prepend` method inserts content at the beginning of the element's content.\n\n## Syntax\n\n```js\nelement.prepend(content);\nelement.prepend(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to insert at the beginning of the element's content.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.prepend(\"Well, \");\n// Result: <div>Well, Hello</div>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/html-rewriter/Element/prototype/removeAttribute.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# removeAttribute\n\nThe `removeAttribute` method removes the specified attribute from the element.\n\n## Syntax\n\n```js\nelement.removeAttribute(attributeName);\n```\n\n### Parameters\n\n- `attributeName` _: string_\n  - The name of the attribute to remove.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/html-rewriter/Element/prototype/replaceChildren.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# replaceChildren\n\nThe `replaceChildren` method replaces the element's children with new content.\n\n## Syntax\n\n```js\nelement.replaceChildren(content);\nelement.replaceChildren(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to replace the element's children with.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.replaceChildren(\"Greetings!\");\n// Result: <div>Greetings!</div>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/html-rewriter/Element/prototype/replaceWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# replaceWith\n\nThe `replaceWith` method replaces the element with new content.\n\n## Syntax\n\n```js\nelement.replaceWith(content);\nelement.replaceWith(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to replace the element with.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.replaceWith(\"<p>Greetings!</p>\");\n// Result: <p>Greetings!</p>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/html-rewriter/Element/prototype/selector.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# selector\n\nThe `selector` read-only property is a `string` representing the [CSS selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors) that matches the element.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/html-rewriter/Element/prototype/setAttribute.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# setAttribute\n\nThe `setAttribute` method sets the value of the specified attribute on the element. If the value already exists, it will be updated; otherwise, a new attribute with the specified name and value will be added to the element.\n\n## Syntax\n\n```js\nelement.setAttribute(attributeName, value);\n```\n\n### Parameters\n\n- `attributeName` _: string_\n  - The name of the attribute to set.\n- `value` _: string_\n  - The value to assign to the attribute.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/html-rewriter/Element/prototype/tag.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# tag\n\nThe `tag` read-only property is a `string` representing the tag name of the element.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/html-rewriter/HTMLRewritingStream/HTMLRewritingStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `HTMLRewritingStream()`\n\nThe **`HTMLRewritingStream`** lets you rewrite HTML by registering callbacks on CSS selectors. When an element matching the selector is encountered, the rewriter calls your callback. This callback can manipulate the attributes of the element, and add or remove content from the immediate context.\n\n## Syntax\n\n```js\nnew HTMLRewritingStream()\n```\n\n### Return value\n\nA new `HTMLRewritingStream` object.\n\n## Examples\n\nIn this example, we fetch an HTML page and use the HTML rewriter to add an attribute to all `div` tags and prepend the text `Header:` to all `h1` tags:\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { HTMLRewritingStream } from 'fastly:html-rewriter';\n\nasync function handleRequest(event) {\n  let transformer = new HTMLRewritingStream()\n    .onElement(\"h1\", e => e.prepend(\"Header: \"))\n    .onElement(\"div\", e => e.setAttribute(\"special-attribute\", \"top-secret\"));\n  let body = (await fetch(\"https://example.com/\")).body.pipeThrough(transformer);\n\n  return new Response(body, {\n    status: 200,\n    headers: new Headers({\n      \"content-type\": \"text/html; charset=utf-8\",\n    })\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/html-rewriter/HTMLRewritingStream/prototype/onElement.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# onElement\n\n▸ **onElement**`(selector: string, handler: (element: Element) => void): this`\n\nRegisters an element handler with the [`HTMLRewritingStream`] that will be called for each [`Element`] that matches the [CSS selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors) `selector`.\n\nElements added by handlers will not be processed by other handlers.\n\n## Syntax\n\n```js\n.onElement(selector, handler)\n```\n\n### Parameters\n\n- `selector` _: string_\n  - A CSS selector that determines the elements for which `handler` will be called\n  - The following types of CSS selector are supported:\n\nCurrently the rewriter supports the following CSS selectors:\n\n| Pattern              | Description                                                                |\n|----------------------|----------------------------------------------------------------------------|\n| `*`                  | Any element                                                                |\n| `E`                  | All elements of type `E`                                                   |\n| `E F`                | `F` elements inside `E` elements                                           |\n| `E > F`              | `F` elements directly inside `E` elements                                  |\n| `E:nth-child(n)`     | The n-th child of type `E`                                                 |\n| `E:first-child`      | First child of type `E`                                                    |\n| `E:nth-of-type(n)`   | The n-th sibling of type `E`                                               |\n| `E:first-of-type`    | First sibling of type `E`                                                  |\n| `E:not(s)`           | Type `E` elements not matching selector `s`                                |\n| `E.myclass`          | Type `E` elements with class `\"myclass\"`                                   |\n| `E#myid`             | Type `E` elements with ID `\"myid\"`                                         |\n| `E[attr]`            | Type `E` elements with attribute `attr`                                    |\n| `E[attr=\"val\"]`      | Type `E` elements where `attr` is `\"val\"`                                  |\n| `E[attr=\"val\" i]`    | Type `E` elements where `attr` is `\"val\"`, case-insensitive                |\n| `E[attr=\"val\" s]`    | Type `E` elements where `attr` is `\"val\"`, case-sensitive                  |\n| `E[attr~=\"val\"]`     | Type `E` elements where `attr` contains `\"val\"` in a space-separated list  |\n| `E[attr`&#124`;=\"val\"]`| Type `E` elements where `attr` is hyphen-separated and starts with `\"val\"` |\n| `E[attr^=\"val\"]`     | Type `E` elements where `attr` starts with `\"val\"`                         |\n| `E[attr$=\"val\"]`     | Type `E` elements where `attr` ends with `\"val\"`                           |\n| `E[attr*=\"val\"]`     | Type `E` elements where `attr` contains `\"val\"`                            |\n\n- `handler` _: (element: Element) => void_\n  - A callback function that will be called once for each element that matches `selector`\n\n### Return value\n\nThe `HTMLRewritingStream`, so multiple calls to `onElement` can be chained.\n\n### Exceptions\n\n- `Error`\n  - If the provided `selector` is not a valid CSS selector.\n  - If the provided `handler` is not a function.\n\n## Examples\n\n\nIn this example, we fetch an HTML page and use the HTML rewriter to add an attribute to all `div` tags and prepend the text `Header:` to all `h1` tags:\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { HTMLRewritingStream } from 'fastly:html-rewriter';\n\nasync function handleRequest(event) {\n  let transformer = new HTMLRewritingStream()\n    .onElement(\"h1\", e => e.prepend(\"Header: \"))\n    .onElement(\"div\", e => e.setAttribute(\"special-attribute\", \"top-secret\"));\n  let body = (await fetch(\"https://example.com/\")).body.pipeThrough(transformer);\n\n  return new Response(body, {\n    status: 200,\n    headers: new Headers({\n      \"content-type\": \"text/html; charset=utf-8\",\n    })\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/image-optimizer/Auto.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Auto`\n\nEnumerator options for [`imageOptimizerOptions.auto`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `AVIF` (`\"avif\"`) If the browser's Accept header indicates compatibility, deliver an AVIF image.\n- `WEBP` (`\"webp\"`)\tIf the browser's Accept header indicates compatibility, deliver a WebP image.\n\n## Examples\n\n```js\nimport { Auto, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      auto: Auto.AVIF\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/image-optimizer/BWAlgorithm.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `BWAlgorithm`\n\nEnumerator options for [`imageOptimizerOptions.bw`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Threshold` (`\"threshold\"`) Uses a luminance threshold to convert the image to black and white.\n- `Atkinson` (`\"atkinson\"`)\tUses [Atkinson dithering](https://en.wikipedia.org/wiki/Atkinson_dithering) to convert the image to black and white.\n\n\n## Examples\n\n```js\nimport { Region, BWAlgorithm } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      bw: BWAlgorithm.Threshold\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/image-optimizer/CropMode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `CropMode`\n\nEnumerator options for [`imageOptimizerOptions.crop.mode`](./imageOptimizerOptions.mdx) and `imageOptimizerOptions.precrop.mode`.\n\n## Constants\n\n- `Smart` (`\"smart\"`) Enables content-aware algorithms to attempt to crop the image to the desired aspect ratio while intelligently focusing on the most important visual content, including the detection of faces.\n- `Safe` (`\"safe\"`)\tAllow cropping out-of-bounds regions.\n\n## Examples\n\n```js\nimport { CropMode, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      crop: {\n        size: { ratio: { width: 4, height: 3 } },\n        mode: CropMode.Smart,\n      }\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/image-optimizer/Disable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Disable`\n\nEnumerator options for [`imageOptimizerOptions.disable`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Upscale` (`\"upscale\"`) Prevent images being resized such that the output image's dimensions are larger than the source image.\n\n## Examples\n\n```js\nimport { Disable, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      width: 2560,\n      disable: Disable.Upscale\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/image-optimizer/Enable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Enable`\n\nEnumerator options for [`imageOptimizerOptions.enable`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Upscale` (`\"upscale\"`) Allow images to be resized such that the output image's dimensions are larger than the source image.\n\n## Examples\n\n```js\nimport { Enable, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      width: 2560,\n      enable: Enable.Upscale\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/image-optimizer/Fit.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Fit`\n\nEnumerator options for [`imageOptimizerOptions.fit`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Bounds` (`\"bounds\"`) Resize the image to fit entirely within the specified region, making one dimension smaller if needed.\n- `Cover` (`\"cover\"`) Resize the image to entirely cover the specified region, making one dimension larger if needed.\n- `Crop` (`\"crop\"`) Resize and crop the image centrally to exactly fit the specified region.\n\n## Examples\n\n```js\nimport { Fit, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      width: 150,\n      height; 150,\n      fit: Fit.Bounds\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/image-optimizer/Format.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Format`\n\nEnumerator options for [`imageOptimizerOptions.format`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Auto` (`\"auto\"`) Automatically use the best format based on browser support and image/transform characteristics\n- `AVIF` (`\"avif\"`) AVIF\n- `BJPG` (`\"bjpg\"`) Baseline JPEG \n- `GIF` (`\"gif\"`) Graphics Interchange Format\n- `JPG` (`\"jpg\"`) JPEG \n- `JXL` (`\"jxl\"`) JPEGXL \n- `MP4` (`\"mp4\"`) MP4 (H.264)\n- `PJPG` (`\"pjpg\"`) Progressive JPEG \n- `PJXL` (`\"pjxl\"`) Progressive JPEGXL\n- `PNG` (`\"png\"`) Portable Network Graphics\n- `PNG8` (`\"png8\"`) Portable Network Graphics palette image with 256 colors and 8-bit transparency\n- `SVG` (`\"svg\"`) Scalable Vector Graphics\n- `WEBP` (`\"webp\"`) WebP\n- `WEBPLL` (`\"webpll\"`) WebP (Lossless)\n- `WEBPLY` (`\"webply\"`) WebP (Lossy)\n\n## Examples\n\n```js\nimport { Format, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      format: Format.PNG\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/image-optimizer/Metadata.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Metadata`\n\nEnumerator options for [`imageOptimizerOptions.metadata`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Copyright` (`\"copyright\"`) Preserve [copyright notice](https://www.iptc.org/std/photometadata/specification/IPTC-PhotoMetadata#copyright-notice), creator, credit line, licensor, and web statement of rights fields.\n- `C2PA` (`\"c2pa\"`) Preserve the [C2PA manifest](https://c2pa.org/) and add any transformations performed by Fastly Image Optimizer.\n- `CopyRightAndC2PA` (`\"copyright,c2pa\"`) Resize and crop the image centrally to exactly fit the specified region.\n\n## Examples\n\n```js\nimport { Metadata, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      metadata: Metadata.Copyright\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/image-optimizer/Optimize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Optimize`\n\nEnumerator options for [`imageOptimizerOptions.optimize`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Low` (`\"low\"`) Output image quality will be similar to the input image quality.\n- `Medium` (`\"medium\"`) More optimization is allowed. We attempt to preserve the visual quality of the input image.\n- `High` (`\"high\"`) Minor visual artifacts may be visible. This produces the smallest file.\n\n## Examples\n\n```js\nimport { Optimize, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      optimize: Optimize.High\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/image-optimizer/Orient.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Orient`\n\nEnumerator options for [`imageOptimizerOptions.orient`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Default` (`\"1\"`) \n- `FlipHorizontal` (`\"2\"`) \n- `FlipHorizontalAndVertical` (`\"3\"`) \n- `FlipVertical` (`\"4\"`) \n- `FlipHorizontalOrientLeft` (`\"5\"`) \n- `OrientRight` (`\"6\"`) \n- `FlipHorizontalOrientRight` (`\"7\"`) \n- `OrientLeft` (`\"8\"`) \n\n## Examples\n\n```js\nimport { Orient, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      orient: Orient.FlipHorizontal\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/image-optimizer/Profile.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Profile`\n\nEnumerator options for [`imageOptimizerOptions.profile`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Baseline` (`\"baseline\"`) The profile recommended for video conferencing and mobile applications. (Default)\n- `Main` (`\"main\"`) The profile recommended for standard-definition broadcasts.\n- `High` (`\"high\"`) The profile recommended for high-definition broadcasts.\n\n## Examples\n\n```js\nimport { Profile, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      profile: Profile.Main\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/image-optimizer/Region.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Region`\n\nEnumerator options for [`imageOptimizerOptions.region`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `UsEast` (`\"us_east\"`)\n- `UsCentral` (`\"us_central\"`)\n- `UsWest` (`\"us_west\"`)\n- `EuCentral` (`\"eu_central\"`)\n- `EuWest` (`\"eu_west\"`)\n- `Asia` (`\"asia\"`)\n- `Australia` (`\"australia\"`)\n\n\n## Examples\n\n```js\nimport { Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/image-optimizer/ResizeFilter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `ResizeFilter`\n\nEnumerator options for [`imageOptimizerOptions.resizeFilter`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Nearest` (`\"nearest\"`) Uses the value of nearby translated pixel values.\n- `Bilinear` (`\"bilinear\"`) Uses an average of a 2x2 environment of pixels.\n- `Linear` (`\"linear\"`) Same as `Bilenear`.\n- `Bicubic` (`\"bicubic\"`) Uses an average of a 4x4 environment of pixels, weighing the innermost pixels higher.\n- `Cubic` (`\"cubic\"`) Same as `Bicubic`.\n- `Lanczos2` (`\"lanczos2\"`) Uses the Lanczos filter to increase the ability to detect edges and linear features within an image and uses sinc resampling to provide the best possible reconstruction.\n- `Lanczos3` (`\"lanczos3\"`) Lanczos3 uses a better approximation of the sinc resampling function. (Default)\n- `Lanczos` (`\"lanczos\"`) Same as `Lanczos3`.\n\n## Examples\n\n```js\nimport { ResizeFilter, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      width: 2560,\n      resizeFilter: ResizeFilter.Linear\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/image-optimizer/imageOptimizerOptions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `imageOptimizerOptions` \n\nOptions specified in the [`Request`](../globals/Request/Request.mdx) constructor for running the [Fastly Image Optimizer](https://docs.fastly.com/products/image-optimizer). More detailed documentation on all Image Optimizer options is available in the [Image Optimizer reference docs](https://www.fastly.com/documentation/reference/io/).\n\n## Parameters\n\nAll parameters other than `region` are optional.\n\n- `region`: _[`Region`](./Region.mdx)_ Where image optimizations should occur.\n- `auto`: _[`Auto`](./Auto.mdx)_ Enable optimization features automatically.\n- `bgColor`: _[`Color`](#color)_ Set the background color of an image.\n- `blur`: _`number` (0.5-1000) or [`Percentage`](#percentage)_ Set the blurriness of the output image.\n- `brightness`: _`number` (-100-100)_ Set the brightness of the output image.\n- `bw`: _[`BWAlgorithm`](./BWAlgorithm.mdx)_ Convert an image to black and white.\n- `canvas`: _`Object`_ Increase the size of the canvas around an image.\n    - `size`: _[`Size`](#size)_\n    - `position` (optional): _[`Position`](#position)_\n- `contrast`: _`number` (-100-100)_ Set the contrast of the output image.\n- `crop`: _`Object`_ Remove pixels from an image.\n    - `size`: _[`Size`](#size)_\n    - `position` (optional): _[`Position`](#position)_\n    - `mode` (optional): _[`CropMode`](./CropMode.mdx)_\n- `disable`: _[`Disable`](./Disable.mdx)_ Disable functionality that is enabled by default.\n- `dpr`: `number` Ratio between physical pixels and logical pixels.\n- `enable`: _[`Enable`](./Enable.mdx)_ Enable functionality that is disabled by default.\n- `fit`: _[`Fit`](./Fit.mdx)_ Set how the image will fit within the size bounds provided.\n- `format`: _[`Format`](./Format.mdx)_ Specify the output format to convert the image to.\n- `frame`: _`number` (must have the value 1)_ Extract the first frame from an animated image sequence.\n- `height`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ Resize the height of the image.\n- `level`: _`String` containing one of the [allowed values](https://www.fastly.com/documentation/reference/io/level/#allowed-values)_ Specify the level constraints when converting to video.\n- `metadata`: _[`Metadata`](./Metadata.mdx)_ Control which metadata fields are preserved during transformation.\n- `optimize`: _[`Optimize`](./Optimize.mdx)_ Automatically apply optimal quality compression.\n- `orient`: _[`Orient`](./Orient.mdx)_ Change the cardinal orientation of the image.\n- `pad`: _[`Sides`](#sides)_ Add pixels to the edge of an image.\n- `precrop`: _`Object`_ Remove pixels from an image before any other transformations occur.\n    - `size`: _[`Size`](#size)_\n    - `position`: _[`Position`](#position)_\n    - `mode`: _[`CropMode`](./CropMode.mdx)_\n- `profile`: _[`Profile`](./Profile.mdx)_ Specify the profile class of application when converting to video.\n- `quality`: _`integer` (1-100)_ Optimize the image to the given compression level for lossy file formatted images.\n- `resizeFilter`: _[`ResizeFilter`](./ResizeFilter.mdx)_ Specify the resize filter used when resizing images.\n- `saturation`: _`number` (-100-100)_ Set the saturation of the output image.\n- `sharpen`: _`Object`_ Set the sharpness of the output image.\n    - `amount`: _`number` (0-10)_\n    - `radius`: _`number` (0.5-1000)_\n    - `threshold`: _`integer` (0-255)_\n- `trim`: _[`Sides`](#sides)_ Remove pixels from the edge of an image.\n- `viewbox`: _`number` (must have the value 1)_ Remove explicit width and height properties in SVG output.\n- `width`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ Resize the width of the image.\n\n## Types\n\n### Color\n\nEither:\n\n- a 3 or 6 character hexadecimal string\n- an `Object` containing:\n    - `r`: _`integer` (0-255)_ Red component\n    - `g`: _`integer` (0-255)_ Green component\n    - `b`: _`integer` (0-255)_ Blue component\n    - `a` (optional): _`number` (0.0-1.0)_ Alpha component \n\n### Percentage\n\nA `String` containing a number suffixed with a percent sign (%).\n\n### Position\n\nAn `Object` containing:\n\n- Exactly one of:\n    - `x`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ \n    - `offsetX`: _`number` (interpreted as a percentage)_\n- Exactly one of: \n    - `y`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ \n    - `offsetY`: _`number` (interpreted as a percentage)_\n\n### Sides\n\nAn `Object` containing `top`, `bottom`, `left`, and `right`, all of which are either an `integer` or [`Percentage`](#percentage).\n\n### Size\n\nAn `Object` containing either:\n\n- `absolute`: _`Object`_\n    - `width`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ \n    - `height`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ \n- `ratio`: _`Object`_\n    - `width`: _`number`_\n    - `height`: _`number`_\n\n## Examples\n\n```js\nimport { Format, Orient, CropMode, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      format: Format.PNG,\n      bgColor: {\n        'r': 100,\n        'g': 255,\n        'b': 9,\n        'a': 0.5\n      },\n      blur: '1%',\n      brightness: -20,\n      contrast: -20,\n      height: 600,\n      level: '4.0',\n      orient: Orient.FlipVertical,\n      saturation: 80,\n      sharpen: { 'amount': 5, 'radius': 6, 'threshold': 44 },\n      canvas: { 'size': { 'absolute': { 'width': 400, 'height': 400 } } },\n      crop: { size: { absolute: { width: 200, height: 200 }, mode: CropMode.Safe } },\n      trim: { top: 10, left: 10, right: 10, bottom: 10 },\n      pad: { top: 30, left: 30, right: \"1%\", bottom: 30 }\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/index.mdx",
    "content": "---\nsidebar_position: 1\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n\n# JavaScript for Fastly Compute\n\nThis site is the full SDK reference for [`@fastly/js-compute`](https://www.npmjs.com/package/%40fastly/js-compute), the module that provides the interface between your JavaScript code and the [Fastly Compute](https://www.fastly.com) platform.\n\nIf you haven't used Fastly Compute before, start by [setting up your first Fastly Compute program](https://developer.fastly.com/learning/compute/) over on **developer.fastly.com** so that you have a working development environment.\n\nTo learn more about the fundamentals of using JavaScript with Fastly Compute, see our [using JavaScript](https://developer.fastly.com/learning/compute/javascript/) guide.\n\n## Understanding the JavaScript SDK\n\nIncoming HTTP requests to [domains that are attached to your Fastly service](https://developer.fastly.com/learning/concepts/) will start an instance of your application and invoke a `fetch` event, which can be bound using the `addEventListener` function:\n\n```js\naddEventListener(\"fetch\", event => event.respondWith(handleRequest(event)) );\n\nasync function handleRequest(event) {\n  const req = event.request;\n\n  return fetch(req, {\n    backend: \"example_backend\"\n  });\n}\n```\n\nFastly specific features are available as named imports from `fastly:` prefixed modules, all of which are documented in this site.  For example, the [env](https://js-compute-reference-docs.edgecompute.app/docs/fastly:env/env) function provides access to [environment variables](https://developer.fastly.com/reference/compute/ecp-env/) and can be imported into your application like this:\n\n```js\nimport { env } from \"fastly:env\"\n```\n\nJavaScript code compiled for Fastly Compute has access to a global environment with most of the globals you would expect in an ECMAScript runtime, like [`Date`](https://js-compute-reference-docs.edgecompute.app/docs/globals/Date/) and [`console`](https://js-compute-reference-docs.edgecompute.app/docs/globals/console/log).\n\n## Trying things out\n\n[Fastly fiddle](https://fiddle.fastly.dev) is an online web-based playground where you can run Fastly code.  You'll see fiddles included in many pages of our [developer hub](https://developer.fastly.com) and this SDK reference. These interactive examples can be executed right on the page by clicking the **RUN** tab:\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nasync function app(event) {\n    const request = event.request;\n    return new Response(\"You made a request to \" + request.url)\n}\naddEventListener(\"fetch\", event => {\n  event.respondWith(app(event));\n});\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nasync function app(event) {\n    const request = event.request;\n    return new Response(`You made a request to ${request.url}`)\n}\n\naddEventListener(\"fetch\", event => {\n  event.respondWith(app(event));\n});\n\n```\n\n</Fiddle>\n\nCheck out [`fiddle.fastly.dev`](https://fiddle.fastly.dev) to create your own.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/kv-store/KVStore/KVStore.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `KVStore()`\n\nThe **`KVStore` constructor** lets you connect your Fastly Compute application to a Fastly KV store.\n\nA Fastly KV store is a persistent, globally consistent key-value store. See [Data stores for Fastly services](https://developer.fastly.com/learning/concepts/edge-state/data-stores#kv-stores) for initialization and usage details.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew KVStore(name)\n```\n\n> **Note:** `KVStore()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Define a KV store instance using the resource link name.\n  \n### Return value\n\nA new `KVStore` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no KV Store exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name does not start with an ascii alphabetical character \n  - Thrown if the provided name contains control characters `(\\u0000-\\u001F)`\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then read back the value and return it to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/kv-store/KVStore/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# KVStore.prototype.delete\n\nDeletes the value associated with the key `key` in the KV store.\n\n## Syntax\n\n```js\ndelete(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the KV-store.\n\n### Return value\n\nReturns `undefined`\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is any of the strings `\"\"`, `\".\"`, or `\"..\"`\n    - Starts with the string `\".well-known/acme-challenge/\"`\n    - Contains any of the characters `\"#;?^|\\n\\r\"`\n    - Is longer than 1024 characters\n    - Does not exist\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then delete the entry.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n  await files.delete('hello')\n\n  const entry = await files.get('hello')\n  if (entry) {\n    return new Response(await entry.text())\n  } else {\n    return new Response('no file named hello exists')\n  }\n\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/kv-store/KVStore/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# KVStore.prototype.get\n\n▸ **get**(): `string`\n\nGets the value associated with the key `key` in the KV store.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the KV-store.\n\n### Return value\n\nIf the key does not exist in the KV store, this returns a `Promise` which resolves with `null`.\n\nIf the key does exist in the KV store, this returns a `Promise` which resolves with an `KVStoreEntry`.\n\n## Description\n\nSend the given message, converted to a string, to this KVStore instance's endpoint.\n\nThe `get()` method requires its `this` value to be a [`KVStore`](../KVStore.mdx) object.\n\nIf the `this` value does not inherit from `KVStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is any of the strings `\"\"`, `\".\"`, or `\"..\"`\n    - Starts with the string `\".well-known/acme-challenge/\"`\n    - Contains any of the characters `\"#;?^|\\n\\r\"`\n    - Is longer than 1024 characters\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then read back the value and return it to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/kv-store/KVStore/prototype/list.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStore.prototype.list\n\nThe **`list()`** can be used to list the keys of a store.\n\n## Syntax\n\n```js\nlist(options?)\n```\n\n### Parameters\n\n- `options` _: object_ _**optional**_\n  - List options supporting properties:\n  - `cursor` _: string_ _**optional**_\n    - The cursor used to pick up from a previous iteration.\n  - `limit` _: number_ _**optional**_\n    - The maximum number of keys to return.\n  - `prefix` _: string_ _**optional**_\n    - List only those keys that start with the given string prefix.\n  - `noSync` _: boolean_ _**optional**_\n    - Do not sync the key list first, instead provide a possibly out-of-date listing. May be faster but inconsistent.\n\n### Return value\n\nReturns a `Promise` which resolves with `{ list: string[], cursor: string | undefined }`.\n\n## Example\n\nIn this example we list the keys of a KV Store named `'files'`, iterating 10 at a time, counting the total;\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from 'fastly:kv-store';\n\nasync function app(event) {\n  const files = new KVStore('files');\n\n  let cursor,\n    list,\n    total = 0;\n  do {\n    ({ cursor, list } = await files.list({ limit: 10, cursor }));\n    total += list?.length;\n  } while (list);\n\n  return new Response(`Iterated ${total} entries`);\n}\n\naddEventListener('fetch', (event) => event.respondWith(app(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/kv-store/KVStore/prototype/put.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# KVStore.prototype.put\n\nThe **`put()`** method stores a `value` into the KV store under a `key`.\n\n> **Note**: KV stores are eventually consistent, this means that the updated contents associated with the key `key` may not be available to read from all edge locations immediately and some edge locations may continue returning the previous contents associated with the key.\n\n## Syntax\n\n```js\nput(key, value, options?)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to store the supplied value under within the KV store.\n- `value` _:  ArrayBuffer | TypedArray | DataView| ReadableStream | URLSearchParams | String | string literal_\n  - The value to store within the KV store.\n- `options` _: object_ _**optional**_\n  - An insert options parameter, supporting:\n  - `metadata` _: ArrayBuffer | TypedArray | DataView_ _**optional**_\n    - Binary metadata associated with the entry, may be up to 1000 bytes.\n  - `ttl` _: number_ _**optional**_\n    - TTL for the entry\n  - `mode` _: 'overwrite' | 'add' | 'append' | 'prepend'_ _**optional**_\n    - Insert mode, defaults to 'overwrite'\n  - `gen` _: number_ _**optional**_\n    - 'generation' header specific to the version of an entry key\n\n### Return value\n\nReturns a `Promise` which resolves with `undefined` when the provided `value` has been written into the KV store.\n\n## Description\n\nStores the supplied `value` into the KV store under the supplied `key`.\n\nThe `put()` method requires its `this` value to be a [`KVStore`](../KVStore.mdx) object.\n\nIf the `this` value does not inherit from `KVStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is any of the strings `\"\"`, `\".\"`, or `\"..\"`\n    - Starts with the string `\".well-known/acme-challenge/\"`\n    - Contains any of the characters `\"#;?^|\\n\\r\"`\n    - Is longer than 1024 characters\n- `TypeError`\n  - If the provided `gen`:\n    - Is not an number\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then read back the value and return it to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/kv-store/KVStoreEntry/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.arrayBuffer()\n\nThe `arrayBuffer()` method of the `KVStoreEntry` interface takes a `KVStoreEntry` stream and reads it to completion. It returns a promise that resolves with an `ArrayBuffer`.\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an `ArrayBuffer`."
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/kv-store/KVStoreEntry/prototype/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.body\n\nThe `body` read-only property of the `KVStoreEntry` interface is a `ReadableStream` of the body contents.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/kv-store/KVStoreEntry/prototype/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.bodyUsed\n\nThe `bodyUsed` read-only property of the `KVStoreEntry` interface is a `boolean` value that indicates whether the body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/kv-store/KVStoreEntry/prototype/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.json()\n\nThe `json()` method of the `KVStoreEntry` interface takes a `KVStoreEntry` stream and reads it to completion. It returns a promise which resolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a JavaScript object. This object could be anything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/kv-store/KVStoreEntry/prototype/metadata.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.metadata()\n\nThe `metadata()` method of the `KVStoreEntry` interface provides the binary metadata associated with the `KVStoreEntry`.\n\nThe metadata binary may be up to 1000 bytes, and is returned as a `Uint8Array` TypedArray buffer, if metadata is set, or null otherwise.\n\n## Syntax\n\n```js\nmetadata()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a `Uint8Array` buffer object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/kv-store/KVStoreEntry/prototype/metadataText.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.metadataText()\n\nThe `metadataText()` method of the `KVStoreEntry` interface provides a String interpretation of binary metadata associated with the `KVStoreEntry`.\n\nIf the binary data is not a valid string, an encoding error will be thrown.\n\n## Syntax\n\n```js\nmetadataText()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a String.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/kv-store/KVStoreEntry/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.text()\n\nThe `text()` method of the `KVStoreEntry` interface takes a `KVStoreEntry` stream and reads it to completion. It returns a promise that resolves with a `String`. The `KVStoreEntry `is always decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a `String`."
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/logger/Logger/Logger.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Logger()`\n\nThe **`Logger` constructor** lets you connect your Fastly Compute application to a [Fastly Named Logger](https://developer.fastly.com/learning/integrations/logging/).\n\n## Syntax\n\n```js\nnew Logger(name)\n```\n\n> **Note:** `Logger()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - The Fastly Logger which should be associated with this Logger instance\n\n### Return value\n\nA new `Logger` object.\n\n## Examples\n\nIn this example we have a create a logger named `\"splunk\"` and logs the incoming request method and destination.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Logger Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^3\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nasync function app (event) {\n  let logger = new Logger(\"splunk\");\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nconst logger = new Logger(\"splunk\");\nasync function app (event) {\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/logger/Logger/prototype/log.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Logger.prototype.log\n\n▸ **log**(): `string`\n\nSends the given message, converted to a string, to this Logger instance's endpoint.\n\n**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nlog(message)\n```\n\n### Return value\n\n`undefined`.\n\n## Description\n\nSend the given message, converted to a string, to this Logger instance's endpoint.\n\nThe `log()` method requires its `this` value to be a [`Logger`](../Logger.mdx) object.\n\nIf the `this` value does not inherit from `Logger.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n## Examples\n\nIn this example we have a create a logger named `\"splunk\"` and logs the incoming request method and destination.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Logger.prototype.log Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^3\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nlet logger = new Logger(\"splunk\");\nasync function app (event) {\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nasync function app (event) {\n  let logger = new Logger(\"splunk\");\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/logger/configureConsole.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# configureConsole\n\nThe **`configureConsole()`** function allows configuring the behaviour of the `console` global JS logger.\n\n## Syntax\n\n```js\nconfigureConsole(loggingOptions)\n```\n\n### Parameters\n\n- `loggingOptions` _: object_\n  - \n  - The name has to be between 1 and 254 characters inclusive.\n  - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n\n## Examples\n\nIn this example, we disable prefixing for `console.log` and use `stderr` output for `console.error`:\n\n```js\nimport { configureConsole } from \"fastly:logger\";\n\nconfigureConsole({\n  prefixing: false,\n  stderr: true\n});\n\nasync function handleRequest(event) {\n  console.log(JSON.stringify(event.request.headers));\n  const url = new URL(event.request.url);\n  try {\n    validate(url);\n  } catch (e) {\n    console.error(`Validation error: ${e}`);\n    return new Response('Bad Request', { status: 400 });\n  }\n  return new Response('OK');\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/migration-guide/index.mdx",
    "content": "---\nsidebar_position: 1\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Migrating from v2 to v3`\n\n## SimpleCache.delete renamed to SimpleCache.purge and requires purge options to be supplied as the second parameter\n\nWe are renaming because \"purge\" is already a well-known and documented concept for removing content from Fastly's cache.\n\nThe new addition of a second argument allows the caller to decide what scope to purge the content from, currently they can choose to purge from all of Fastly (\"global\") or from the POP that contains the currently executing instance (\"pop\"). We do not provide a default option right now, in the future we may provide a default option, if we discover a common pattern is being used.\n\nHere is an example of migrating an application using `SimpleCache.delete` to `SimpleCache.purge` with the same purging behaviour:\n```diff\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const url = new URL(event.request);\n  const path = url.pathname;\n  if (url.searchParams.has('delete')) {\n-    SimpleCache.delete(path);\n+    SimpleCache.purge(path, { scope: \"global\" });\n    return new Response(page, { status: 204 });\n  }\n\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n\n```\n\n\n# `Migrating from v1 to v2`\n\n## ObjectStore renamed to KVStore\n\nWe have renamed the `ObjectStore` class to `KVStore`, and the module name from `fastly:object-store` to `fastly:kv-store`.\n\nYou will need to update your code to use the new class name and module name.\n\nBelow is the change that would need to be made for the imported module name:\n```diff\n- import { ObjectStore } from 'fastly:object-store';\n+ import { KVStore } from 'fastly:kv-store';\n```\n\nAnd this is the change that would need to be made for constructing an instance of the class:\n```diff\n- const store = new ObjectStore('my-store');\n+ const store = new KVStore('my-store');\n```\n\n\nHere is a full example of migrating an application from ObjectStore to KVStore:\n```diff\n/// <reference types=\"@fastly/js-compute\" />\n\n- import { ObjectStore } from 'fastly:object-store';\n+ import { KVStore } from 'fastly:kv-store';\n\nasync function app(event) {\n-   const files = new ObjectStore('files');\n+   const files = new KVStore('files');\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/secret-store/SecretStore/SecretStore.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `SecretStore()`\n\nThe **`SecretStore` constructor** lets you connect your Fastly Compute application to a Fastly Secret store.\n\nA secret store is a persistent, globally distributed store for secrets accessible to Fastly Compute services during request processing.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew SecretStore(name)\n```\n\n> **Note:** `SecretStore()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Define a Secret Store instance using the resource link name.\n  \n### Return value\n\nA new `SecretStore` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Secret Store exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name contains characters other than letters, numbers, dashes (-), underscores (_), and periods (.)\n\n## Examples\n\nIn this example we connect to a Secret Store named `'secrets'` and retrieve a secret named `'cat-api-key'` use the value in a Request header.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SecretStore } from \"fastly:secret-store\";\n\nasync function app(event) {\n  const secrets = new SecretStore('secrets')\n\n  const catApiKey = await secrets.get('cat-api-key')\n\n  return fetch('/api/cat', {\n    headers: {\n      'cat-api-key': catApiKey.plaintext()\n    }\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/secret-store/SecretStore/fromBytes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# fromBytes\n\nThe **`fromBytes()`** function is used to create an in-memory secret from an array buffer.\n\n>**Note**: This API should be avoided when possible, by instead using [SecretStore.prototype.get](./prototype/get.mdx) to obtain secure secrets.\n\n## Syntax\n\n```js\nfromBytes(new Uint8Array([1, 2, 3]))\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns a `SecretStoreEntry`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/secret-store/SecretStore/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SecretStore.prototype.get\n\n▸ **get**(): `string`\n\nGets the value associated with the key `key` in the Secret store.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the Secret Store.\n\n### Return value\n\nIf the key does not exist in the Secret Store, this returns a `Promise` which resolves with `null`.\n\nIf the key does exist in the Secret Store, this returns a `Promise` which resolves with an `SecretStoreEntry`.\n\n## Description\n\nSend the given message, converted to a string, to this SecretStore instance's endpoint.\n\nThe `get()` method requires its `this` value to be a [`SecretStore`](../SecretStore.mdx) object.\n\nIf the `this` value does not inherit from `SecretStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Is longer than 255 characters\n    - Contains characters other than letters, numbers, dashes (-), underscores (_), and periods (.)\n\n## Examples\n\nIn this example we connect to a Secret Store named `'secrets'` and retrieve a secret named `'cat-api-key'` use the value in a Request header.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SecretStore } from \"fastly:secret-store\";\n\nasync function app(event) {\n  const secrets = new SecretStore('secrets')\n\n  const catApiKey = await secrets.get('cat-api-key')\n\n  return fetch('/api/cat', {\n    headers: {\n      'cat-api-key': catApiKey.plaintext()\n    }\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/secret-store/SecretStoreEntry/prototype/plaintext.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SecretStoreEntry.prototype.plaintext\n\n▸ **plaintext**(): `string`\n\nReturns the plaintext contents of the SecretStoreEntry instance as String.\n\n## Syntax\n\n```js\nplaintext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA String\n\n### Exceptions\n\nThe `plaintext()` method requires its `this` value to be a `SecretStoreEntry` object.\nIf the `this` value does not inherit from `SecretStoreEntry.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n## Examples\n\nIn this example we connect to a Secret Store named `'secrets'` and retrieve a secret named `'cat-api-key'` use the value in a Request header.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SecretStore } from \"fastly:secret-store\";\n\nasync function app(event) {\n  const secrets = new SecretStore('secrets')\n\n  const catApiKey = await secrets.get('cat-api-key')\n\n  return fetch('/api/cat', {\n    headers: {\n      'cat-api-key': catApiKey.plaintext()\n    }\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/secret-store/SecretStoreEntry/prototype/rawBytes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SecretStoreEntry.prototype.rawBytes\n\n▸ **rawBytes**(): `Uint8Array`\n\nReturns the raw byte contents of the SecretStoreEntry instance as a Uint8Array.\n\n## Syntax\n\n```js\nrawBytes()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Uint8Array\n\n### Exceptions\n\nThe `rawBytes()` method requires its `this` value to be a `SecretStoreEntry` object.\nIf the `this` value does not inherit from `SecretStoreEntry.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/security/inspect.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# inspect\n\nThe **`inspect()`** function inspects a request using the [Fastly Next-Gen WAF](https://docs.fastly.com/en/ngwaf/).\n\n## Syntax\n\n```js\ninspect(request, config);\n```\n\n### Parameters\n\n- `request` _: Request_\n  - The Request to get a WAF determination for.\n- `config` _: object_\n  - `corp` _: string_\n    - Set a corp name for the configuration.\n    - This parameter is currently required.\n  - `workspace` _: string_\n    - Set a workspace name for the configuration.\n    - This parameter is currently required.\n  - `overrideClientIp` _: string_\n    - Specify an explicit client IP address to inspect.\n    - By default, `inspect` will use the IP address that made the request to the\n      running Compute service, but you may want to use a different IP when\n      service chaining or if requests are proxied from outside of Fastly’s\n      network.\n\n### Return value\n\nReturns an `Object` with the `inspect` response, with the following fields:\n\n- `waf_response` _: number_\n  - Security status code.\n  \n- `redirect_url` _: string | null_\n  - A redirect URL returned from Security.\n\n- `tags` _: string[]_\n  - Tags returned by Security.\n\n- `verdict` _: string_\n  - The outcome of inspecting a request with Security. It can be one of the following:\n    - `\"allow\"`\n      - Security indicated that this request is allowed.\n    - `\"block\"`\n      - Security indicated that this request should be blocked.\n    - `\"unauthorized\"`\n      - Security indicated that this service is not authorized to inspect a request.\n    - Other verdicts may be returned but not currently documented.\n\n- `decision_ms` _: number_\n  - How long Security spent determining its verdict, in milliseconds.\n  \n## Examples\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { inspect } from \"fastly:security\";\n\nasync function app(event) {\n  const res = inspect(event.request, {\n    corp: \"mycorp\",\n    workspace: \"myws\"\n  });\n  switch (res.verdict) {\n    case \"allow\":\n      return await fetch(event.request);\n    case \"block\":\n      return new Response(\"Request Blocked\", { status: 400 });\n    case \"unauthorized\":\n      return new Response(\"Unauthorized\", { status: 401 });\n    default:\n      return new Response(\"idk\", { status: 500 });\n  }\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/shielding/Shield/Shield.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `Shield()`\n\nLoad information about the given shield.\n\nReturns an object representing the shield if it is active, or throws an exception if the string is malformed or the shield doesn’t exist.\n\nShield names are defined on [this webpage](https://www.fastly.com/documentation/guides/concepts/shielding/#shield-locations), in the “shield code” column. For example, the string “pdx-or-us” will look up our Portland, OR, USA shield site, while “paris-fr” will look up our Paris site.\n\nIf you are using a major cloud provider for your primary origin site, consider looking at the “Recommended for” column, to find the Fastly POP most closely located to the given cloud provider.\n\n## Syntax\n\n```js\nnew Shield(name)\n```\n\n> **Note:** `Shield()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Shield exists with the provided name\n\n## Examples\n\nIn this example, we create a Shield instance for the Sydney, Australia shield POP. If the code is running on that shield POP, it fetches directly from origin. Otherwise, it routes the request through the shield using an encrypted connection.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n    \nimport { Shield } from \"fastly:shielding\";\n\nasync function app(event) {\n    const shield = new Shield('wsi-australia-au');\n    // If running on the shield POP, fetch from the origin directly\n    if (shield.runningOn()) {\n        return await fetch('https://http-me.fastly.com/anything', { backend: 'httpme' });\n    }\n    // Otherwise, route the request through the shield using an encrypted connection\n    return await fetch(event.request, { backend: shield.encryptedBackend() });\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/shielding/Shield/prototype/encryptedBackend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Shield.prototype.encryptedBackend\n\n▸ **encryptedBackend**(): `Backend`\n\nReturns a `Backend` representing an encrypted connection to the POP.\n\nFor reference, this is almost always the backend that you want to use. Only use [`Shield::unencryptedBackend`](./unencryptedBackend.mdx) in situations in which you are 100% sure that all the data you will send and receive over the backend is already encrypted."
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/shielding/Shield/prototype/runningOn.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Shield.prototype.runningOn\n\n▸ **runningOn**(): `boolean`\n\nReturns whether we are currently operating on the given shield.\n\nTechnically, this may also return true in very isolated incidents in which Fastly is routing traffic from the target shield POP to the POP that this code is running on, but in these situations the results should be approximately identical.\n\n(For example, it may be the case that you are asking to shield to ‘pdx-or-us’. But, for load balancing, performance, or other reasons, Fastly is temporarily shifting shielding traffic from Portland to Seattle. In that case, this function may return true for hosts running on ‘bfi-wa-us’, our Seattle site, because effectively the shield has moved to that location. This should give you a slightly faster experience than the alternative, in which this function would return false, you would try to forward your traffic to the Portland site, and then that traffic would be caught and redirected back to Seattle.)\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/shielding/Shield/prototype/unencryptedBackend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Shield.prototype.unencryptedBackend\n\n▸ **unencryptedBackend**(): `Backend`\n\nReturns a `Backend` representing an unencrypted connection to the POP.\n\nGenerally speaking, we encourage users to use [`Shield::encryptedBackend`](./encryptedBackend.mdx) instead of this function. Data sent over this backend – the unencrypted version – will be sent over the open internet, with no protections. In most cases, this is not what you want. However, in some cases – such as when you want to ship large data blobs that you know are already encrypted — using these backends can prevent a double-encryption performance penalty."
  },
  {
    "path": "documentation/versioned_docs/version-3.38.4/websocket/createWebsocketHandoff.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# createWebsocketHandoff\n\nThe **`createWebsocketHandoff()`** function creates a Response instance which informs Fastly to pass the original Request through Websocket, to the declared backend.\n\n## Syntax\n\n```js\ncreateWebsocketHandoff(request, backend)\n```\n\n### Parameters\n\n- `request` _: Request_\n  - The request to pass through Websocket.\n- `backend` _: string_\n  - The name of the backend that Websocket should send the request to.\n  - The name has to be between 1 and 254 characters inclusive.\n  - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n\n### Return value\n\nA Response instance is returned, which can then be used via `event.respondWith`.\n\n## Examples\n\nIn this example application requests to the path `/stream` and sent handled via Websocket.\n\n```js\nimport { createWebsocketHandoff } from \"fastly:websocket\";\n\nasync function handleRequest(event) {\n  try {\n    const url = new URL(event.request.url);\n    if (url.pathname === '/stream') {\n      return createWebsocketHandoff(event.request, 'websocket_backend');\n    } else {\n      return new Response('oopsie, make a request to /stream for some websocket goodies', { status: 404 });\n    }\n  } catch (error) {\n    console.error({error});\n    return new Response(error.message, {status:500})\n  }\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/acl/Acl/open.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Acl.open()\n\nOpens the ACL with the given name, returning a new `Acl` instance with the given name on success.\n\n## Syntax\n\n```js\nAcl.open(name)\n```\n\n### Return value\n\nAn `Acl` instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/acl/Acl/prototype/lookup.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Acl.prototype.lookup()\n\nThe **`lookup(ipAddress)`** method returns the name associated with the `Acl` instance.\n\n## Syntax\n\n```js\nacl.lookup(ipAddress)\n```\n\n### Parameters\n\n- `ipAddress` _: string_\n  - IPv4 or IPv6 address to lookup\n\n### Return value\n\nAn Object of the form `{ action: 'ALLOW' | 'BlOCK', prefix: string }`, where `prefix` is the IP\naddress prefix that was matched in the ACL.\n\n## Example\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Acl } from 'fastly:acl';\naddEventListener('fetch', async (evt) => {\n  const myAcl = Acl.open('myacl');\n  const match = await myAcl.lookup(evt.client.address);\n  evt.respondWith(new Response(match?.action === 'BLOCK' ? 'blocked' : 'allowed'));\n});\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/backend/Backend/Backend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Backend()`\n\nThe **`Backend` constructor** lets you dynamically create new [Fastly Backends](https://developer.fastly.com/reference/api/services/backend/) for your Fastly Compute service.\n\n>**Note**: Dynamic backends are by default disabled at the Fastly service level. Contact [Fastly Support](https://support.fastly.com/hc/en-us/requests/new?ticket_form_id=360000269711) to request dynamic backends on Fastly Services.\n\nTo disable the usage of dynamic backends, see [enforceExplicitBackends](../enforceExplicitBackends.mdx).\n\n## Syntax\n\n```js\nnew Backend(backendConfiguration)\n```\n\n> **Note:** `Backend()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `backendConfiguration`\n\n  - : An Object which contains all the configuration options to apply to the newly created Backend.\n\n    - `name` _: string_\n      - The name of the backend.\n      - The name has to be between 1 and 254 characters inclusive.\n      - The name can be whatever you would like, as long as it does not match the name of any of the static service backends nor match any other dynamic backends built during a single execution of the application.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n    - `target` _: string_\n      - A hostname, IPv4, or IPv6 address for the backend as well as an optional port.\n      - The target has to be at-least 1 character.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. Is null, undefined, an empty string, not a valid IP address or host, or is the string `::`\n    - `hostOverride` _: string_ _**optional**_\n      - If set, will force the HTTP Host header on connections to this backend to be the supplied value.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `connectTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for a connection to this backend to be established.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `firstByteTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `betweenBytesTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend.\n      - If exceeded, the response received so far will be considered complete and the fetch will end.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `useSSL` _: boolean_ _**optional**_\n      - Whether or not to require TLS for connections to this backend.\n    - `dontPool` _: boolean_ _**optional**_\n      - Determine whether or not connections to the same backend should be pooled across different sessions.\n      - Fastly considers two backends “the same” if they're registered with the same name and the exact same settings.\n      - In those cases, when pooling is enabled, if Session 1 opens a connection to this backend it will be left open, and can be re-used by Session 2.\n      - This can help improve backend latency, by removing the need for the initial network / TLS handshake(s).\n      - By default, pooling is enabled for dynamic backends.\n    - `tlsMinVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Minimum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `tlsMaxVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Maximum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `certificateHostname` _: string_ _**optional**_\n      - Define the hostname that the server certificate should declare.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `caCertificate` _: string_ _**optional**_\n      - The CA certificate to use when checking the validity of the backend.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `ciphers` _: string_ _**optional**_\n      - List of OpenSSL ciphers to support for connections to this origin.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - [List of ciphers supported by Fastly](https://developer.fastly.com/learning/concepts/routing-traffic-to-fastly/#use-a-tls-configuration).\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `sniHostname` _: string_ _**optional**_\n      - The SNI hostname to use on connections to this backend.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `clientCertificate` _: object_ _**optional**_\n      - The client certificate to provide for the TLS handshake\n      - `certificate` _: string_\n        - The PEM certificate string.\n      - `key` _: SecretStoreEntry_\n        - The `SecretStoreEntry` to use for the key, created via [`SecretStore.prototype.get`](../../fastly:secret-store/SecretStore/prototype/get.mdx) or alteratively via [`SecretStore.fromBytes`](../../fastly:secret-store/SecretStore/fromBytes.mdx).\n    - `httpKeepalive` _: number_ _**optional**_\n      - Enable HTTP keepalive, setting the timout in milliseconds.\n    - `tcpKeepalive` _: boolean | object_ _**optional**_\n      - Enable TCP keepalive. When an object, optionally setting the keepalive configuration options.\n      - `timeSecs` _: number_ _**optional**_\n        - Configure how long to wait after the last sent data over the TCP connection before starting to send TCP keepalive probes.\n      - `intervalSecs` _: number_ _**optional**_\n        - Configure how long to wait between each TCP keepalive probe sent to the backend to determine if it is still active.\n      - `probes` _: number_ _**optional**_\n        - Number of probes to send to the backend before it is considered dead.\n    - `grpc` _: boolean_ _**optional**_\n      - **_Experimental feature_**\n      - When enabled, sets that this backend is to be used for gRPC traffic. \n      - _Warning: When using this experimental feature, no guarantees are provided for behaviours for backends that do not provide gRPC traffic._\n\nAll optional generic options can have their defaults set via [`setDefaultDynamicBackendConfig()`](../setDefaultDynamicBackendConfig.mdx).\n\nThis includes all configuration options above except for `name`, `target`, `hostOverride`, `sniHostname` and `grpc`.\n\n### Return value\n\nA new `Backend` object.\n\n## Examples\n\nIn this example an explicit Dynamic Backend is created and supplied to the fetch request, the response is then returned to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Explicit Dynamic Backend Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\",\n    connectTimeout: 1000,\n    firstByteTimeout: 15000,\n    betweenBytesTimeout: 10000,\n    useSSL: true,\n    tlsMinVersion: 1.3,\n    tlsMaxVersion: 1.3,\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\",\n    connectTimeout: 1000,\n    firstByteTimeout: 15000,\n    betweenBytesTimeout: 10000,\n    useSSL: true,\n    tlsMinVersion: 1.3,\n    tlsMaxVersion: 1.3,\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/backend/Backend/exists.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.exists()\n\nThe **`Backend.exists()`** method returns a boolean indicating if a Backend with the given name exists or not.\n\n## Syntax\n\n```js\nexists(name)\n```\n\n### Return value\n\nA boolean indicating if a Backend with the given name exists or not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/backend/Backend/fromName.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.fromName()\n\nReturns the `Backend` instance with the given name, if one exists. If one does not exist, an error is thrown.\n\n## Syntax\n\n```js\nfromName(name)\n```\n\n### Return value\n\nA `Backend` instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/backend/Backend/health.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.health()\n\n:::info\n\nThis method is deprecated, use [`Backend.prototype.health`](./prototype/health.mdx) instead.\n\n:::\n\nThe **`Backend.health()`** method returns a string representing the health of the given Backend instance.\n\n## Syntax\n\n```js\nBackend.health(backend)\n```\n\n### Return value\n\nA string representing the health of the specified Backend value.\n\nPossible values are:\n- `\"healthy\"` - The backend's health check has succeeded, indicating the backend is working as expected and should receive requests.\n- `\"unhealthy\"` - The backend's health check has failed, indicating the backend is not working as expected and should not receive requests.\n- `\"unknown\"` - The backend does not have a health check configured.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/backend/Backend/prototype/betweenBytesTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.betweenBytesTimeout\n\nThe read-only **`betweenBytesTimeout`** property of a `Backend` instance is an integer number\nproviding the between bytes timeout for this backend in milliseconds.\n\nWhen not set or in environments that do not support this property (such as Viceroy), `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/backend/Backend/prototype/connectTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.connectTimeout\n\nThe read-only **`connectTimeout`** property of a `Backend` instance is an integer number\nproviding the connect timeout for this backend in milliseconds.\n\nWhen not set or in environments that do not support this property (such as Viceroy), `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/backend/Backend/prototype/firstByteTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.firstByteTimeout\n\nThe read-only **`firstByteTimeout`** property of a `Backend` instance is an integer number\nproviding the first byte timeout for this backend in milliseconds.\n\nWhen not set or in environments that do not support this property (such as Viceroy), `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/backend/Backend/prototype/health.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.prototype.health()\n\nThe **`Backend.prototype.health()`** method returns a string representing the health of the given Backend instance.\n\n## Syntax\n\n```js\nhealth()\n```\n\n### Return value\n\nA string representing the health of the specified Backend value.\n\nPossible values are:\n- `\"healthy\"` - The backend's health check has succeeded, indicating the backend is working as expected and should receive requests.\n- `\"unhealthy\"` - The backend's health check has failed, indicating the backend is not working as expected and should not receive requests.\n- `\"unknown\"` - The backend does not have a health check configured.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/backend/Backend/prototype/hostOverride.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.hostOverride\n\nThe read-only **`hostOverride`** property of a `Backend` instance is the host header\noverride string used when sending requests to this backend.\n\n## Value\n\nA `string`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/backend/Backend/prototype/httpKeepaliveTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.httpKeepaliveTime\n\nThe read-only **`httpKeepaliveTime`** property of a `Backend` instance is the HTTP keepalive\ntime for this backend in milliseconds, or 0 if no keepalive is set.\n\n## Value\n\nA `number`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/backend/Backend/prototype/isDynamic.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.isDynamic\n\nThe read-only **`isDynamic`** property of a `Backend` instance is a boolean\nindicating if the backend was dynamically created for this service.\n\n## Value\n\nA `boolean`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/backend/Backend/prototype/isSSL.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.isSSL\n\nThe read-only **`isSSL`** property of a `Backend` instance is a boolean\nindicating if the backend is using an SSL connection.\n\n## Value\n\nA `boolean`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/backend/Backend/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# name\n\nThe read-only **`name`** property of the backend returns the backend name string.\n\n## Value\n\nA `string`.\n\n## Description\n\nProvides the name of the backend.\n\n## Examples\n\n### Using name\n\nThe following example logs the string value of a [Backend](../Backend.mdx) object:\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Backend.prototype.name Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\\\"@fastly/js-compute\\\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.name); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.name); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/backend/Backend/prototype/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.port\n\nThe read-only **`port`** property of a `Backend` instance is the port number\nof this backend.\n\n## Value\n\nA `number`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/backend/Backend/prototype/target.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.target\n\nThe read-only **`target`** property of a `Backend` instance is the host string\nthis backend is configured to use.\n\n## Value\n\nA `string`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/backend/Backend/prototype/tcpKeepalive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.tcpKeepalive\n\nThe read-only **`tcpKeepalive`** property of a `Backend` instance returns an object providing\nthe TCP keepalive configuration, if any, otherwise returning `null` if TCP keepalive is not enabled.\n\nThis object has the following properties:\n- `timeSecs` _: number or null._\n  - Configure how long to wait after the last sent data over the TCP connection before starting to send TCP keepalive probes.\n- `intervalSecs` _: number or null._\n  - Configure how long to wait between each TCP keepalive probe sent to the backend to determine if it is still active.\n- `probes` _: number or null._\n  - Number of probes to send to the backend before it is considered dead.\n\n## Value\n\nA `Object` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/backend/Backend/prototype/tlsMaxVersion.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.tlsMaxVersion\n\nThe read-only **`tlsMaxVersion`** property of a `Backend` instance is the max TLS version\nit is configured to use, as a number, either `1.0`, `1.1`, `1.2`, or `1.3`.\n\nWhen not used, or for environments that do not support this feature, such as Viceroy, `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/backend/Backend/prototype/tlsMinVersion.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.tlsMinVersion\n\nThe read-only **`tlsMinVersion`** property of a `Backend` instance is the max TLS version\nit is configured to use, as a number, either `1.0`, `1.1`, `1.2`, or `1.3`.\n\nWhen not used, or for environments that do not support this feature, such as Viceroy, `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/backend/Backend/prototype/toName.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.prototype.toName()\n\n:::info\n\nThis method is deprecated, use [`Backend.prototype.name`](./name.mdx) instead.\n\n:::\n\nThe **`toName()`** method returns the name associated with the `Backend` instance.\n\n## Syntax\n\n```js\ntoName()\n```\n\n### Return value\n\nA string which contains the name of the Backend.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/backend/Backend/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# toString\n\n:::info\n\nThis method is deprecated, use [`Backend.prototype.name`](./name.mdx) instead.\n\n:::\n\nThe **`toString()`** method returns a string representing the specified Backend value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified Backend value.\n\n## Description\n\nThe [Backend](../Backend.mdx) object overrides the `toString()` method of [Object](../../../globals//Object/Object.mdx); it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For [Backend](../Backend.mdx) values, the `toString` method returns the name given to the [Backend](../Backend.mdx) object during construction.\n\nThe `toString()` method requires its `this` value to be a [Backend](../Backend.mdx) object.\n\nIf the `this` value does not inherit from `Backend.prototype`, a [TypeError](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n## Examples\n\n### Using toString()\n\nThe following example logs the string value of a [Backend](../Backend.mdx) object:\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Backend.prototype.toString Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\\\"@fastly/js-compute\\\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.toString()); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.toString()); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/backend/allowDynamicBackends.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# allowDynamicBackends\n\n:::info\n\nThis method is deprecated, and dynamic backends are now always supported when enabled at the service level. See [`enforceExplicitBackends`](./enforceExplicitBackends.mdx) instead.\n\n:::\n\nThe **`allowDynamicBackends()`** function is used to control whether or not Dynamic Backends should be allowed within this Fastly Compute Service.\n\nBy default, Dynamic Backends are enabled, but can be a potential security concern since third-party JavaScript code may send arbitrary requests, potentially including sensitive/secret data, off to destinations that the JavaScript project was not intending.\n\nUsing `allowDynamicBackends(false)` this security property can be restored to only use explicit backend definitions.\n\n>**Note**: By default, while dynamic backends are allowed in the SDK, they are by default disabled at the Fastly service level.\n\n## Syntax\n\n```js\nallowDynamicBackends(enabledOrConfig)\n```\n\n### Parameters\n\n- `enabled` _: boolean_\n  - Whether or not to allow Dynamic Backends\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/backend/enforceExplicitBackends.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# enforceExplicitBackends\n\nCall this function to enforce the security property of explicitly-defined backends, even when dynamic backends are enabled at\nthe Fastly service level.\n\nBy default, if dynamic backends are supported for the Fastly service, they will be automatically used when creating a new\n`fetch()` request. This default behaviour for dynamic backends can be a potential security concern since third-party JavaScript\ncode may send arbitrary requests, including sensitive/secret data, off to destinations that the JavaScript project was not\nintending.\n\nWhen calling this function, an optional default backend name can be provided.\n\n>**Note**: This is a separate option to the service-level dynamic backend support for Fastly services, which is by deault disabled for Fastly services.\n\nThe **`enforceExplicitBackends()`** function is used to control whether or not Dynamic Backends should be allowed within this Fastly Compute Service.\n\nBy default, Dynamic Backends are enabled, but can be a potential security concern since third-party JavaScript code may send arbitrary requests, potentially including sensitive/secret data, off to destinations that the JavaScript project was not intending.\n\nUsing `allowDynamicBackends(false)` this security property can be restored to only use explicit backend definitions.\n\n>**Note**: Dynamic Backends are disabled by default for Fastly Services. Please contact [Fastly Support](https://support.fastly.com/hc/requests/new?ticket_form_id=360000269711) to request the feature be enabled or disabled on Fastly Services.\n\n## Syntax\n\n```js\nenforceExplicitBackends(defaultBackend?)\n```\n\n### Parameters\n\n- `defaultBackend` _: string_ _**optional**_\n  - An optional default backend string name to use in `fetch()` requests.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/backend/setDefaultDynamicBackendConfig.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# setDefaultDynamicBackendConfig()\n\nThe **`setDefaultDynamicBackendConfig()`** allows setting backend configuration defaults that should apply to any newly created dynamic backends via the `new Backend()` constructor.\n\n### Parameters\n\n- `defaultDynamicBackendConfig`\n\n  - : An Object which contains the generic configuration options to apply to newly created Backends.\n    - `connectTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for a connection to this backend to be established.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `firstByteTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `betweenBytesTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend.\n      - If exceeded, the response received so far will be considered complete and the fetch will end.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `useSSL` _: boolean_ _**optional**_\n      - Whether or not to require TLS for connections to this backend.\n    - `dontPool` _: boolean_ _**optional**_\n      - Determine whether or not connections to the same backend should be pooled across different sessions.\n      - Fastly considers two backends “the same” if they're registered with the same name and the exact same settings.\n      - In those cases, when pooling is enabled, if Session 1 opens a connection to this backend it will be left open, and can be re-used by Session 2.\n      - This can help improve backend latency, by removing the need for the initial network / TLS handshake(s).\n      - By default, pooling is enabled for dynamic backends.\n    - `tlsMinVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Minimum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `tlsMaxVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Maximum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `certificateHostname` _: string_ _**optional**_\n      - Define the hostname that the server certificate should declare.\n      - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `caCertificate` _: string_ _**optional**_\n      - The CA certificate to use when checking the validity of the backend.\n      - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `ciphers` _: string_ _**optional**_\n      - List of OpenSSL ciphers to support for connections to this origin.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - [List of ciphers supported by Fastly](https://developer.fastly.com/learning/concepts/routing-traffic-to-fastly/#use-a-tls-configuration).\n      - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `clientCertificate` _: object_ _**optional**_\n      - The client certificate to provide for the TLS handshake\n      - `certificate` _: string_\n        - The PEM certificate string.\n      - `key` _: SecretStoreEntry_\n        - The `SecretStoreEntry` to use for the key, created via [`SecretStore.prototype.get`](../fastly:secret-store/SecretStore/prototype/get.mdx) or alteratively via [`SecretStore.fromBytes`](../fastly:secret-store/SecretStore/fromBytes.mdx).\n    - `httpKeepalive` _: number_ _**optional**_\n      - Enable HTTP keepalive, setting the timout in milliseconds.\n    - `tcpKeepalive` _: boolean | object_ _**optional**_\n      - Enable TCP keepalive. When an object, optionally setting the keepalive configuration options.\n      - `timeSecs` _: number_ _**optional**_\n        - Configure how long to wait after the last sent data over the TCP connection before starting to send TCP keepalive probes.\n      - `intervalSecs` _: number_ _**optional**_\n        - Configure how long to wait between each TCP keepalive probe sent to the backend to determine if it is still active.\n      - `probes` _: number_ _**optional**_\n        - Number of probes to send to the backend before it is considered dead.\n\n## Syntax\n\n```js\nsetDefaultDynamicBackendConfig(defaultConfig)\n```\n\n### Return value\n\nNone.\n\n## Examples\n\nIn this example an explicit Dynamic Backend is created and supplied to the fetch request, with timeouts and TLS options provided from the default backend configuration options.\n\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Explicit Dynamic Backend Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nimport { Backend, setDefaultDynamicBackendConfig } from \"fastly:backend\";\nallowDynamicBackends(true);\nsetDefaultDynamicBackendConfig({\n  connectTimeout: 1000,\n  firstByteTimeout: 15_000,\n  betweenBytesTimeout: 10_000,\n  useSSL: true,\n  sslMinVersion: 1.3,\n  sslMaxVersion: 1.3\n});\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  // Timeouts and TLS configuration still get set from the default backend configuration above.\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\"\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nimport { Backend } from \"fastly:backend\";\nallowDynamicBackends(true);\nsetDefaultDynamicBackendConfig({\n  connectTimeout: 1000,\n  firstByteTimeout: 15_000,\n  betweenBytesTimeout: 10_000,\n  useSSL: true,\n  sslMinVersion: 1.3,\n  sslMaxVersion: 1.3\n});\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\"\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/cache/CacheEntry/age.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.age\n\nThe **`age`** method of the `CacheEntry` interface returns the current age in milliseconds of the cached item.\n\n## Syntax\n\n```js\nage()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the current age in milliseconds of the cached item."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/cache/CacheEntry/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.body\n\nThe **`body`** method of the `CacheEntry` interface retrieves the cached item contents as a `ReadableStream`.\n\nOnly one stream can be active at a time for a given `CacheEntry`. An error will be thrown if a stream is already active for this `CacheEntry`.\n\n## Syntax\n\n```js\nbody(options)\n```\n\n### Parameters\n\n- `options` _: object_ __optional__\n  - `start` _: number_\n    - The offset from which to start the range.\n  - `end` _: number_\n    - How long the range should be.\n\n### Return value\n\nA `ReadableStream` which contains the cached item contents."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/cache/CacheEntry/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.close\n\nThe **`close`** method of the `CacheEntry` interface closes the connection to the cache for this `CacheEntry`.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/cache/CacheEntry/hits.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.hits\n\nThe **`hits`** method of the `CacheEntry` interface returns the amount of cache hits for the cached item.\n\nNote: this hit count only reflects the view of the server that supplied the cached item. Due to clustering, this count may vary between potentially many servers within the data center where the item is cached. See the [clustering documentation](https://developer.fastly.com/learning/vcl/clustering/) for details, though note that the exact caching architecture of Compute is different from VCL services.\n\n## Syntax\n\n```js\nhits()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the number of cache hits to this cached item.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/cache/CacheEntry/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.length\n\nThe **`length`** method of the `CacheEntry` interface returns the size in bytes of the cached item, if known, otherwise returns `null` if the length is currently unknown.\n\nThe length of the cached item may be unknown if the item is currently being streamed into the cache without a fixed length.\n\n## Syntax\n\n```js\nlength()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` or `null` which represents the current length of the cached item.\n\n`null` is returned if the length is currently unknown."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/cache/CacheEntry/maxAge.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.maxAge\n\nThe **`maxAge`** method of the `CacheEntry` interface returns the time in milliseconds for which the cached item is considered fresh.\n\n## Syntax\n\n```js\nmaxAge()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the time in milliseconds for which the cached item is considered fresh."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/cache/CacheEntry/staleWhileRevalidate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.staleWhileRevalidate\n\nThe **`staleWhileRevalidate`** method of the `CacheEntry` interface returns the time in milliseconds for which a cached item can safely be used despite being considered stale.\n\n## Syntax\n\n```js\nstaleWhileRevalidate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the time in milliseconds for which a cached item can safely be used despite being considered stale."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/cache/CacheEntry/state.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.state\n\nThe **`state`** method of the `CacheEntry` interface returns a `CacheState` instance which reflects the current state of this `CacheEntry` instance.\n\n## Syntax\n\n```js\nstate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `CacheState` instance which reflects the current state of this `CacheEntry` instance."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/cache/CacheEntry/userMetadata.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.userMetadata\n\nThe **`userMetadata`** method of the `CacheEntry` interface returns the user-controlled metadata associated with the cached item.\n\n## Syntax\n\n```js\nuserMetadata()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nAn `ArrayBuffer` which contains the user-controlled metadata associated with the cached item."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/cache/CacheState/found.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheState.found\n\nThe **`found`** method of the `CacheState` interface returns `true` if a cached item was located.\n\nEven if an cached item is found, the cached item might be stale and require updating. Use `mustInsertOrUpdate()` to determine whether this transaction client is expected to update the cached item.\n\n## Syntax\n\n```js\nfound()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `boolean` which represents whether a cached item was located or not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/cache/CacheState/mustInsertOrUpdate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheState.mustInsertOrUpdate\n\nThe **`mustInsertOrUpdate`** method of the `CacheState` interface returns `true` if a fresh cache item was not found, and this transaction client is expected to insert a new item or update a stale item.\n\n\n## Syntax\n\n```js\nmustInsertOrUpdate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `boolean` which represents whether a fresh cached item was found not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/cache/CacheState/stale.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheState.stale\n\nThe **`stale`** method of the `CacheState` interface returns `true` if the cached item is stale.\n\nA cached item is stale if its age is greater than its `maxAge` period.\n\n## Syntax\n\n```js\nstale()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `boolean` which represents whether the cached item is stale or not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/cache/CacheState/usable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheState.usable\n\nThe **`usable`** method of the `CacheState` interface returns `true` if the cached item is usable.\n\nA cached item is usable if its age is less than the sum of the `maxAge` and `staleWhileRevalidate` periods.\n\n## Syntax\n\n```js\nusable()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `boolean` which represents whether a cached item is usable or not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/cache/CoreCache/insert.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CoreCache.insert\n\nPerforms a non-transactional insertion into the cache, returning a `FastlyBody` instance for providing the cached object itself.\nFor the insertion to complete successfully, the object must be written into the returned `FastlyBody` instance, and then `FastlyBody.protoype.close` must be called.\nIf `FastlyBody.prototype.close` does not get called, the insertion is considered incomplete, and any concurrent lookups that may be reading from the object as it is streamed into the cache may encounter a streaming error.\n\nNote: Like `CoreCache.lookup()`, `CoreCache.insert()` may race with concurrent lookups or insertions, and will unconditionally overwrite existing cached items rather than allowing for revalidation of an existing object.\nThe transactional equivalent of this function is `TransactionCacheEntry.insert()`, which may only be called following a `CoreCache.transactionLookup()` call and the returned `CacheEntry` when has a state where `CacheState.mustInsertOrUpdate()` returns true.\n\n## Syntax\n\n```js\ninsert(key, options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - A cache key which is a string with a length of up to 8,135 that identify a cached item.\n  - The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n- `options` _: object_\n  - `headers` _: HeadersInit_ __optional__\n    - The headers act as additional factors in object selection, and the choice of which headers to factor in is determined during insertion, via the `vary` property within `TransactionInsertOptions`.\n    - A lookup will succeed when there is at least one cached item that matches lookup’s `key`, and all of the lookup’s headers included in the cache items’ `vary` list match the corresponding headers in that cached item.\n    - A typical example is a cached HTTP response, where the request had an \"Accept-Encoding\" header. In that case, the origin server may or may not decide on a given encoding, and whether that same response is suitable for a request with a different (or missing) Accept-Encoding header is determined by whether Accept-Encoding is listed in Vary header in the origin’s response.\n    - Note: These headers are narrowly useful for implementing cache lookups incorporating the semantics of the HTTP Vary header.\n  - `maxAge` _: number_ __optional__\n    - Sets the “time to live” for the cache item in milliseconds: The time for which the item will be considered fresh.\n  - `vary` _: array_ __optional__\n    - Sets the list of headers that must match when looking up this cached item.\n  - `initialAge` _: number_ __optional__\n    - Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n    - The initial age is 0 by default.\n  - `staleWhileRevalidate` _: number_ __optional__\n    - Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n    - Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n    - The methods `CacheState.protoype.usable` and `CacheState.protoype.stale` can be used to determine the current state of an item.\n    - The stale-while-revalidate period is 0 by default.\n  - `surrogateKeys` _: array_ __optional__\n    - Sets the surrogate keys that can be used for purging this cached item.\n    - Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item’s TTL to elapse, or overwriting the item with insert().\n    - Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n    - [See the Fastly surrogate keys guide for details.](https://docs.fastly.com/en/guides/working-with-surrogate-keys)\n  - `length` _: number_ __optional__\n    - Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n    - It is preferable to provide a length, if possible.\n    - Clients that begin streaming the item’s contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n  - `userMetadata` _: ArrayBufferView | ArrayBuffer | URLSearchParams | string_ __optional__\n    - Sets the user-defined metadata to associate with the cached item.\n  - `sensitive` _: boolean_ __optional__\n    - Enable or disable PCI/HIPAA-compliant non-volatile caching.\n    - By default, this is false.\n    - [See the Fastly PCI-Compliant Caching and Delivery documentation for details.](https://docs.fastly.com/products/pci-compliant-caching-and-delivery)\n\n### Return value\n\nReturns a `FastlyBody`.\n\n### Exceptions\n\n- If the provided `key`:\n  - Cannot be coerced to a string\n  - Is an empty string\n  - Is longer than 8135 characters\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/cache/CoreCache/lookup.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# CoreCache.lookup\n\nPerform a non-transactional lookup into the cache, returning a CacheEntry if a usable cached item was found.\nA cached item is usable if its age is less than the sum of its TTL and its stale-while-revalidate period. Items beyond that age are unusably stale.\n\nNote: A non-transactional lookup will not attempt to coordinate with any concurrent cache lookups.\nIf two instances of the service perform a lookup at the same time for the same cache key, and the item is not yet cached, they will both return `null`.\nWithout further coordination, they may both end up performing the work needed to insert() the item (which usually involves origin requests and/or computation) and racing with each other to insert.\nTo resolve such races between concurrent lookups, use `CoreCache.transactionLookup()` instead.\n\n## Syntax\n\n```js\nlookup(key, options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - A cache key which is a string with a length of up to 8,135 that identify a cached item.\n  - The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n\n- `options` _: object_\n  - `headers` _: HeadersInit_ __optional__\n    - The headers act as additional factors in object selection, and the choice of which headers to factor in is determined during insertion, via the `vary` property within `TransactionInsertOptions`.\n    - A lookup will succeed when there is at least one cached item that matches lookup’s `key`, and all of the lookup’s headers included in the cache items’ `vary` list match the corresponding headers in that cached item.\n    - A typical example is a cached HTTP response, where the request had an \"Accept-Encoding\" header. In that case, the origin server may or may not decide on a given encoding, and whether that same response is suitable for a request with a different (or missing) Accept-Encoding header is determined by whether Accept-Encoding is listed in Vary header in the origin’s response.\n    - Note: These headers are narrowly useful for implementing cache lookups incorporating the semantics of the HTTP Vary header.\n\n### Return value\n\nReturns `CacheEntry` if a usable cached item was found, otherwise returns `null`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/cache/CoreCache/transactionLookup.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# CoreCache.transactionLookup\n\nPerform a transactional lookup into the cache, returning a `TransactionCacheEntry` instance.\n\nTransactions coordinate between concurrent actions on the same cache key, incorporating concepts of [request collapsing](https://developer.fastly.com/learning/concepts/request-collapsing/) and [revalidation](https://developer.fastly.com/learning/concepts/stale/), though at a lower level that does not automatically interpret HTTP semantics.\n\nRequest Collapsing:\nIf there are multiple concurrent calls to `CoreCache.transactionLookup()` for the same item and that item is not present,\njust one of the callers will be instructed to insert the item into the cache as part of the transaction.\nThe other callers will block until the metadata for the item has been inserted, and can then begin streaming its contents out of the cache at the same time that the inserting caller streams them into the cache.\n\nRevalidation:\nSimilarly, if an item is usable but stale, and multiple callers attempt a `CoreCache.transactionLookup()` concurrently, they will all be given access to the stale item, but only one will be designated to perform an asynchronous update (or insertion) to freshen the item in the cache.\n\n## Syntax\n\n```js\ntransactionLookup(key, options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - A cache key which is a string with a length of up to 8,135 that identify a cached item.\n  - The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n\n- `options` _: object_\n  - `headers` _: HeadersInit_ __optional__\n    - The headers act as additional factors in object selection, and the choice of which headers to factor in is determined during insertion, via the `vary` property within `TransactionInsertOptions`.\n    - A lookup will succeed when there is at least one cached item that matches lookup’s `key`, and all of the lookup’s headers included in the cache items’ `vary` list match the corresponding headers in that cached item.\n    - A typical example is a cached HTTP response, where the request had an \"Accept-Encoding\" header. In that case, the origin server may or may not decide on a given encoding, and whether that same response is suitable for a request with a different (or missing) Accept-Encoding header is determined by whether Accept-Encoding is listed in Vary header in the origin’s response.\n    - Note: These headers are narrowly useful for implementing cache lookups incorporating the semantics of the HTTP Vary header.\n\n### Return value\n\nReturns an instance of `TransactionCacheEntry`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/cache/SimpleCache/SimpleCache.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `SimpleCache`\n\nThe **`SimpleCache` class** provides a simplified interface to inserting and retrieving entries from Fastly's Cache.\n\nAll the methods on the class are static methods, there are no instance methods.\n\n\n## Examples\n\nIn this example we attempt to retrieve an entry from the Fastly Cache, if the entry does not exist, we create the content and insert it into the Fastly Cache before finally returning.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const path = new URL(event.request.url).pathname;\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/cache/SimpleCache/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCache.get\n\n▸ **get**(): `string`\n\nGets the entry associated with the key `key` from the cache.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the cache.\n\n### Return value\n\nIf the key does not exist in the cache, this returns `null`.\n\nIf the key does exist in the cache, this returns a `SimpleCacheEntry`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n## Examples\n\nIn this example we attempt to retrieve an entry from the Fastly Cache, and return a message stating whether the entry was in the Fastly Cache or not.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const path = new URL(event.request.url).pathname;\n  let page = SimpleCache.get(path);\n  return new Response(page ? `${path} is in the cache` : `${path} is not in the cache`, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/cache/SimpleCache/getOrSet.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCache.getOrSet\n\nThe **`getOrSet()`** method attempts to get an entry from the cache for the supplied `key`. If no entry is found (or has expired), the supplied `set` function is executed and its result is inserted into the cache under the supplied `key` and for the supplied `ttl` (Time-To-Live) duration, provided in seconds.\n\n## Syntax\n\n```js\ngetOrSet(key, set)\ngetOrSet(key, set, length)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to lookup and/or store the supplied entry under within the cache.\n- `set` _:  Function_\n  - The function to execute if and only if the cache does not have a usable entry for the supplied `key`.\n    The function should return a Promise which resolves with the following interface:\n    - `value` _:  ArrayBuffer | TypedArray | DataView | ReadableStream | URLSearchParams | String | string literal_\n      - The value to store within the cache.\n    - `ttl` _: number_\n      - The maximum number of seconds to store the supplied entry in the cache.\n    - `length` _: number_ __optional__\n      - The length of the value being stored within the cache. This is only used when the `value` is a `ReadableStream`.\n\n### Return value\n\nReturns a `SimpleCacheEntry`.\n\n### Exceptions\n\n- If the provided `key`:\n  - Cannot be coerced to a string\n  - Is an empty string\n  - Is longer than 8135 characters\n- If the provided `ttl`:\n  - Cannot be coerced to a number\n  - Is a negative number\n  - Is `NaN`\n  - Is Inifinity\n\n## Examples\n\nIn this example we attempt to retrieve an entry from the Fastly Cache. If the entry does not exist, we create the content and insert it into the Fastly Cache before finally returning.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const path = new URL(event.request.url).pathname;\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/cache/SimpleCache/purge.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# SimpleCache.purge\n\npurge the entry associated with the key `key` from the cache.\n\n## Syntax\n\n```js\npurge(key, options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to purge from within the cache.\n\n- `options` _: object_\n  - `scope` _: string_\n    - : Where to purge the content from.\n    - Possible values are:\n      - \"global\" - This will remove the content from all of Fastly.\n      - \"pop\" - This will remove the content from the POP that contains the currently executing instance.\n\n### Return value\n\nReturns `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n## Examples\n\nIn this example, when a request contains a `purge` querystring parameter, we purge the an entry from the cache.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const url = new URL(event.request.url);\n  const path = url.pathname;\n  if (url.searchParams.has('purge')) {\n    SimpleCache.purge(path, { scope: \"global\" });\n    return new Response(page, { status: 204 });\n  }\n\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/cache/SimpleCacheEntry/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the `SimpleCacheEntry` interface\ntakes the instance's stream and reads it to completion. It returns a promise\nthat resolves with an `ArrayBuffer`.\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an `ArrayBuffer`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/cache/SimpleCacheEntry/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.body\n\nThe **`body`** read-only property of the `SimpleCacheEntry` interface is a `ReadableStream` of the instance's contents.\n\n## Value\n\nA `ReadableStream`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/cache/SimpleCacheEntry/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.bodyUsed\n\nThe **`bodyUsed`** read-only property of the `SimpleCacheEntry` interface is a boolean value that indicates whether the body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/cache/SimpleCacheEntry/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.json()\n\nThe **`json()`** method of the `SimpleCacheEntry` interface takes\na `SimpleCacheEntry` stream and reads it to completion. It returns a promise which\nresolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a JavaScript object. This object could be\nanything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/cache/SimpleCacheEntry/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.text()\n\nThe **`text()`** method of the `SimpleCacheEntry` interface takes the instance's stream and reads it to completion.\nIt returns a promise that resolves with a `String`.\nThe result is _always_ decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Promise that resolves with a `String`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/cache/TransactionCacheEntry/age.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.age\n\nThe **`age`** method of the `TransactionCacheEntry` interface returns the current age in milliseconds of the cached item.\n\n## Syntax\n\n```js\nage()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the current age in milliseconds of the cached item."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/cache/TransactionCacheEntry/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.body\n\nThe **`body`** method of the `TransactionCacheEntry` interface retrieves the cached item contents as a `ReadableStream`.\n\nOnly one stream can be active at a time for a given `TransactionCacheEntry`. An error will be thrown if a stream is already active for this `TransactionCacheEntry`.\n\n## Syntax\n\n```js\nbody(options)\n```\n\n### Parameters\n\n- `options` _: object_ __optional__\n  - `start` _: number_\n    - The offset from which to start the range.\n  - `end` _: number_\n    - How long the range should be.\n\n### Return value\n\nA `ReadableStream` which contains the cached item contents."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/cache/TransactionCacheEntry/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.cancel\n\nThe **`cancel`** method of the `TransactionCacheEntry` interface cancels an obligation to provide an object to the cache.\n\n\n## Syntax\n\n```js\ncancel()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/cache/TransactionCacheEntry/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.close\n\nThe **`close`** method of the `TransactionCacheEntry` interface closes the connection to the cache for this `TransactionCacheEntry`.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/cache/TransactionCacheEntry/hits.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.hits\n\nThe **`hits`** method of the `TransactionCacheEntry` interface returns the amount of cache hits for the cached item.\n\nNote: this hit count only reflects the view of the server that supplied the cached item. Due to clustering, this count may vary between potentially many servers within the data center where the item is cached. See the [clustering documentation](https://developer.fastly.com/learning/vcl/clustering/) for details, though note that the exact caching architecture of Compute is different from VCL services.\n\n## Syntax\n\n```js\nhits()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the number of cache hits to this cached item.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/cache/TransactionCacheEntry/insert.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.insert\n\nPerform a transactional cache insertion, returning a `FastlyBody` instance for providing the cached object itself.\n\nThis method should only be called when `TransactionCacheEntry.state().mustInsertOrUpdate()` is true; otherwise, an error will be thrown when attempting to perform the insertion.\n\n## Syntax\n\n```js\ninsert(options)\n```\n\n### Parameters\n\n- `options` _: object_\n  - `maxAge` _: number_ __optional__\n    - Sets the “time to live” for the cache item in milliseconds: The time for which the item will be considered fresh.\n  - `vary` _: array_ __optional__\n    - Sets the list of headers that must match when looking up this cached item.\n  - `initialAge` _: number_ __optional__\n    - Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n    - The initial age is 0 by default.\n  - `staleWhileRevalidate` _: number_ __optional__\n    - Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n    - Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n    - The methods `CacheState.protoype.usable` and `CacheState.protoype.stale` can be used to determine the current state of an item.\n    - The stale-while-revalidate period is 0 by default.\n  - `surrogateKeys` _: array_ __optional__\n    - Sets the surrogate keys that can be used for purging this cached item.\n    - Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item’s TTL to elapse, or overwriting the item with insert().\n    - Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n    - [See the Fastly surrogate keys guide for details.](https://docs.fastly.com/en/guides/working-with-surrogate-keys)\n  - `length` _: number_ __optional__\n    - Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n    - It is preferable to provide a length, if possible.\n    - Clients that begin streaming the item's contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n  - `userMetadata` _: ArrayBufferView | ArrayBuffer | URLSearchParams | string_ __optional__\n    - Sets the user-defined metadata to associate with the cached item.\n  - `sensitive` _: boolean_ __optional__\n    - Enable or disable PCI/HIPAA-compliant non-volatile caching.\n    - By default, this is false.\n    - [See the Fastly PCI-Compliant Caching and Delivery documentation for details.](https://docs.fastly.com/products/pci-compliant-caching-and-delivery)\n\n### Return value\n\nReturns a `FastlyBody`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/cache/TransactionCacheEntry/insertAndStreamBack.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.insertAndStreamBack\n\nPerform a transaction cache insertion, returning a `FastlyBody` instance for providing the cached object itself, and a `CacheEntry` instance which can be used to stream out the newly-inserted cache item.\n\nFor the insertion to complete successfully, the object must be written into the returned `FastlyBody` instance, and then `FastlyBody.protoype.close` must be called.\nIf `FastlyBody.prototype.close` does not get called, the insertion is considered incomplete, and any concurrent lookups that may be reading from the object as it is streamed into the cache may encounter a streaming error.\n\n## Syntax\n\n```js\ninsertAndStreamBack(options)\n```\n\n### Parameters\n\n- `options` _: object_\n  - `maxAge` _: number_ __optional__\n    - Sets the “time to live” for the cache item in milliseconds: The time for which the item will be considered fresh.\n  - `vary` _: array_ __optional__\n    - Sets the list of headers that must match when looking up this cached item.\n  - `initialAge` _: number_ __optional__\n    - Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n    - The initial age is 0 by default.\n  - `staleWhileRevalidate` _: number_ __optional__\n    - Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n    - Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n    - The methods `CacheState.protoype.usable` and `CacheState.protoype.stale` can be used to determine the current state of an item.\n    - The stale-while-revalidate period is 0 by default.\n  - `surrogateKeys` _: array_ __optional__\n    - Sets the surrogate keys that can be used for purging this cached item.\n    - Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item’s TTL to elapse, or overwriting the item with insert().\n    - Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n    - [See the Fastly surrogate keys guide for details.](https://docs.fastly.com/en/guides/working-with-surrogate-keys)\n  - `length` _: number_ __optional__\n    - Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n    - It is preferable to provide a length, if possible.\n    - Clients that begin streaming the item's contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n  - `userMetadata` _: ArrayBufferView | ArrayBuffer | URLSearchParams | string_ __optional__\n    - Sets the user-defined metadata to associate with the cached item.\n  - `sensitive` _: boolean_ __optional__\n    - Enable or disable PCI/HIPAA-compliant non-volatile caching.\n    - By default, this is false.\n    - [See the Fastly PCI-Compliant Caching and Delivery documentation for details.](https://docs.fastly.com/products/pci-compliant-caching-and-delivery)\n\n### Return value\n\nReturns an array where the first item is a `FastlyBody` instance and the second item is a `CacheEntry` instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/cache/TransactionCacheEntry/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.length\n\nThe **`length`** method of the `TransactionCacheEntry` interface returns the size in bytes of the cached item, if known, otherwise returns `null` if the length is currently unknown.\n\nThe length of the cached item may be unknown if the item is currently being streamed into the cache without a fixed length.\n\n## Syntax\n\n```js\nlength()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` or `null` which represents the current length of the cached item.\n\n`null` is returned if the length is currently unknown."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/cache/TransactionCacheEntry/maxAge.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.maxAge\n\nThe **`maxAge`** method of the `TransactionCacheEntry` interface returns the time in milliseconds for which the cached item is considered fresh.\n\n## Syntax\n\n```js\nmaxAge()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the time in milliseconds for which the cached item is considered fresh."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/cache/TransactionCacheEntry/staleWhileRevalidate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.staleWhileRevalidate\n\nThe **`staleWhileRevalidate`** method of the `TransactionCacheEntry` interface returns the time in milliseconds for which a cached item can safely be used despite being considered stale.\n\n## Syntax\n\n```js\nstaleWhileRevalidate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the time in milliseconds for which a cached item can safely be used despite being considered stale."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/cache/TransactionCacheEntry/state.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.state\n\nThe **`state`** method of the `TransactionCacheEntry` interface returns a `CacheState` instance which reflects the current state of this `TransactionCacheEntry` instance.\n\n## Syntax\n\n```js\nstate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `CacheState` instance which reflects the current state of this `TransactionCacheEntry` instance."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/cache/TransactionCacheEntry/update.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.update\n\nPerform an update of the cache item's metadata.\n\n## Syntax\n\n```js\nupdate(options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - A cache key which is a string with a length of up to 8,135 that identify a cached item.\n  - The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n- `options` _: object_\n  - `maxAge` _: number_ __optional__\n    - Sets the “time to live” for the cache item in milliseconds: The time for which the item will be considered fresh.\n  - `vary` _: array_ __optional__\n    - Sets the list of headers that must match when looking up this cached item.\n  - `initialAge` _: number_ __optional__\n    - Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n    - The initial age is 0 by default.\n  - `staleWhileRevalidate` _: number_ __optional__\n    - Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n    - Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n    - The methods `CacheState.protoype.usable` and `CacheState.protoype.stale` can be used to determine the current state of an item.\n    - The stale-while-revalidate period is 0 by default.\n  - `surrogateKeys` _: array_ __optional__\n    - Sets the surrogate keys that can be used for purging this cached item.\n    - Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item’s TTL to elapse, or overwriting the item with insert().\n    - Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n    - [See the Fastly surrogate keys guide for details.](https://docs.fastly.com/en/guides/working-with-surrogate-keys)\n  - `length` _: number_ __optional__\n    - Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n    - It is preferable to provide a length, if possible.\n    - Clients that begin streaming the item's contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n  - `userMetadata` _: ArrayBufferView | ArrayBuffer | URLSearchParams | string_ __optional__\n    - Sets the user-defined metadata to associate with the cached item.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/cache/TransactionCacheEntry/userMetadata.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.userMetadata\n\nThe **`userMetadata`** method of the `TransactionCacheEntry` interface returns the user-controlled metadata associated with the cached item.\n\n## Syntax\n\n```js\nuserMetadata()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nAn `ArrayBuffer` which contains the user-controlled metadata associated with the cached item."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/cache-override/CacheOverride/CacheOverride.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `CacheOverride()`\n\nThe **`CacheOverride` constructor** lets you configure the caching behavior of a `Response`.\n\nNormally, the HTTP Headers on a [`Response`](../../globals/Response/Response.mdx) would control how the [`Response`](../../globals/Response/Response.mdx) is cached,\nbut `CacheOverride` can be set on a [`Request`](../../globals/Request/Request.mdx), to define custom caching behavior.\n\n## Syntax\n\n```js\nnew CacheOverride(mode)\nnew CacheOverride(mode, init)\nnew CacheOverride(init)\n```\n\n> **Note:** `CacheOverride()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `mode` _: string_\n  - Sets the cache override mode for a request\n  - If set to:\n    - `\"none\"`: Do not override the behavior specified in the origin response’s cache control headers.\n    - `\"pass\"`: Do not cache the response to this request, regardless of the origin response’s headers.\n    - `\"override\"`: Override particular cache control settings using the `CacheOverride` object's settings.\n       This options is also the default when providing an init object directly as the first argument.\n\n- `init`\n\n  - : An Object which contains all the configuration options to apply to the newly created `CacheOverride`.\n\n    - `pci` _: boolean_ _**optional**_\n      - Override the caching behavior of this request to enable or disable PCI/HIPAA-compliant non-volatile caching.\n      - By default, this is `false`, which means the request may not be PCI/HIPAA-compliant. Set it to `true` to enable compliant caching.\n      - See the [Fastly PCI-Compliant Caching and Delivery documentation](https://docs.fastly.com/products/pci-compliant-caching-and-delivery) for details.\n\n    - `surrogateKey` _: string_ _**optional**_\n      - Override the caching behavior of this request to include the given surrogate key, provided as a header value.\n      - See the [Fastly surrogate keys guide](https://docs.fastly.com/en/guides/purging-api-cache-with-surrogate-keys) for details.\n    - `swr` _: number_ _**optional**_\n      - Override the caching behavior of this request to use the given `stale-while-revalidate` time, in seconds\n\n    - `ttl` _: number_ _**optional**_\n      - Override the caching behavior of this request to use the given Time to Live (TTL), in seconds.\n    \n    - `beforeSend` _:Function_ _**optional**_\n      - `(request: Request) => void | PromiseLike<void>`\n      - Callback to be invoked if a request is going all the way to a backend, allowing the request to be modified beforehand.\n      - See [Modifying a request as it is forwarded to a backend](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/#modifying-a-request-as-it-is-forwarded-to-a-backend) in the Fastly cache interfaces documentation for details.\n\n    - `afterSend` _: Function_ _**optional**_\n      - `(response: Response) => void | CacheOptions | PromiseLike<void | CacheOptions>`\n      - Callback to be invoked after a response has been sent, but before it is stored into the cache.\n      - Where `CacheOptions` contains:\n        - `cache` _: boolean | 'uncacheable'_ _**optional**_\n          - Whether to cache this response. By default, leaving this field empty, responses will be cached based on their cache header information.\n          - Setting this to true or false will override this default cache behaviour, setting in the cache or not setting in the cache, even if the default behaviour would have been otherwise.\n          - Setting to 'uncacheable' the response will not only not be cached, but the cache will record that the originating request led to an uncacheable response, so that future cache lookups will result in immediately going to the backend, rather than attempting to coordinate concurrent requests to reduce backend traffic.\n          - See the [Fastly request collapsing guide](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/request-collapsing/) for more details on the mechanism that `uncacheable` disables.\n        - `bodyTransformFn` _: Function_ _**optional**_\n          - `(body: Uint8Array) => Uint8Array | PromiseLike<Uint8Array>`\n          - Provide a function to be used for transforming the response body prior to caching.\n          - Body transformations are performed by specifying a transform, rather than by directly working with the body during the onAfterSend callback function, because not every response contains a fresh body: 304 Not Modified responses, which are used to revalidate a stale cached response, are valuable precisely because they do not retransmit the body.\n          - For any other response status, the backend response will contain a relevant body, and the `bodyTransformFn` will be applied to it. The original backend body is passed in to the transform function, and the function is expected to return the new body.\n      - See [Controlling cache behavior based on backend response](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/#controlling-cache-behavior-based-on-backend-response) in the Fastly cache interfaces documentation for details.\n\n### Return value\n\nA new `CacheOverride` object.\n\n## Examples\n\nIn this example we override the cache for all the requests prefixed /static/ to have a long TTL (Time To Live),  and the home page to have a short TTL and a long SWR (Stale While Revalidate).\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"CacheOverride Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { CacheOverride } from \"fastly:cache-override\";\n// In this example we override the cache for all the requests prefixed /static/ \n// to have a long TTL (Time To Live), and the home page to have a short TTL and \n// a long SWR (Stale While Revalidate).\nasync function app (event) {\n  const path = (new URL(event.request.url)).pathname;\n  let cacheOverride;\n  if (path == '/') {\n    cacheOverride = new CacheOverride('override', {ttl: 10, swr: 86_400});\n  } else if (path.startsWith('/static/')) {\n    cacheOverride = new CacheOverride('override', {ttl: 86_400});\n  } else {\n    cacheOverride = new CacheOverride('none')\n  }\n  return fetch(event.request.url, {\n    cacheOverride,\n    backend: 'origin_0'\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { CacheOverride } from \"fastly:cache-override\";\n// In this example we override the cache for all the requests prefixed /static/ \n// to have a long TTL (Time To Live), and the home page to have a short TTL and \n// a long SWR (Stale While Revalidate).\nasync function app (event) {\n  const path = (new URL(event.request.url)).pathname;\n  let cacheOverride;\n  if (path == '/') {\n    cacheOverride = new CacheOverride('override', {ttl: 10, swr: 86_400});\n  } else if (path.startsWith('/static/')) {\n    cacheOverride = new CacheOverride('override', {ttl: 86_400});\n  } else {\n    cacheOverride = new CacheOverride('none')\n  }\n  return fetch(event.request.url, {\n    cacheOverride,\n    backend: 'origin_0'\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/compute/purgeSurrogateKey.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# purgeSurrogateKey\n\nThe **`purgeSurrogateKey()`** function is used to purge the given surrogate key string from Fastly's cache.\n\nThere are two purge modes: soft purge and hard purge, with hard purge as the default which clears all items\nfrom the cache immediately. When using a soft purge, stale entries are maintained in the cache, reducing\norgin load, while also enabling stale revalidations.\n\nSee the [Fastly Purge Documentation](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/purging/#surrogate-key-purge) for more information on caching and purge operations.\n\n## Syntax\n\n```js\npurgeSurrogateKey(surrogateKey, soft?)\n```\n\n### Parameters\n\n- `surrogateKey` _: string_\n  - The surrogate key string\n- `soft?` _: boolean_\n  - Enables a soft purge, retaining stale entries in the cache. Default is a hard purge.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/compute/vCpuTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# vCpuTime\n\nThe **`vCpuTime()`** function provides the vCPU time used by the current request handler in milliseconds.\n\n## Syntax\n\n```js\nvCpuTime()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`number`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/config-store/ConfigStore/ConfigStore.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `ConfigStore()`\n\nThe **`ConfigStore` constructor** lets you access a specific [Fastly Config Store](https://www.fastly.com/documentation/reference/api/services/resources/config-store/).\n\n> **Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew ConfigStore(name);\n```\n\n> **Note:** `ConfigStore()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Defines a config store instance using the resource link name.\n\n### Return value\n\nA new `ConfigStore` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Config Store exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name does not start with an ascii alphabetical character \n  - Thrown if the provided name does not contain only ascii alphanumeric, underscore, and whitespace characters\n\n## Examples\n\nIn this example we have a resource link named \"animals\" (which is linked to a config store) and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"ConfigStore Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/config-store/ConfigStore/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# ConfigStore.prototype.get\n\nThe **`get()`** method returns the value associated with the provided key in the config-store. If the provided key does not exist in the ConfigStore then this returns `null`.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from the dictionary.\n\n### Return value\n\nA `string` representing the specified ConfigStore value or `null` if the key does not exist in the ConfigStore\n\n## Description\n\nGet a value for a key in the config-store. If the provided key does not exist in the ConfigStore then this returns `null`.\n\nThe `get()` method requires its `this` value to be a [`ConfigStore`](../../../fastly%3Aconfig-store/ConfigStore/ConfigStore.mdx) object.\n\nIf the `this` value does not inherit from `ConfigStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided key is longer than 255 in length\n  - Thrown if the provided key is an empty string\n\n## Examples\n\nIn this example we have an Edge Dictionary named \"animals\" and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"ConfigStore Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/device/Device/lookup.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Device.lookup()\n\nLook up the data associated with a particular User-Agent string.\n\n\n## Syntax\n\n```js\nlookup(userAgent)\n```\n\n### Return value\n\nIf there is data associated with the User-Agent, a `Device` instance is returned.\nOtherwise, `null` is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/device/Device/prototype/brand.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.brand\n\nThe read-only **`brand`** property of the `Device` interface is\neither a string stating the brand of the device, which can be different from the manufacturer of that device.\nIf no brand is known, the value will be `null`.\n\n\n## Value\n\nEither a string value if a brand is known, otherwise `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/device/Device/prototype/hardwareType.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.hardwareType\n\nThe read-only **`hardwareType`** property of the `Device` interface is\neither a string stating the hardware type of the device, or `null` if the hardware type is not known.\n\nA string representation of the device's primary platform hardware. The most commonly used device types are also identified via boolean variables. Because a device may have multiple device types and this variable only has the primary type, we recommend using the boolean variables for logic and using this string representation for logging.\n\n\n\n## Value\n\nEither a string value if a hardware type is known, otherwise `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/device/Device/prototype/isBot.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isBot\n\nThe read-only **`isBot`** property of the `Device` interface is\neither a boolean stating if the device is a bot, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a bot, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/device/Device/prototype/isDesktop.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isDesktop\n\nThe read-only **`isDesktop`** property of the `Device` interface is\neither a boolean stating if the device is a desktop web browser, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a desktop web browser, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/device/Device/prototype/isGameConsole.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isGameConsole\n\nThe read-only **`isGameConsole`** property of the `Device` interface is\neither a boolean stating if the device is a video game console, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a video game console, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/device/Device/prototype/isMediaPlayer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isMediaPlayer\n\nThe read-only **`isMediaPlayer`** property of the `Device` interface is\neither a boolean stating if the device is a media player (like Blu-ray players, iPod devices, and smart speakers such as Amazon Echo), or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a media player (like Blu-ray players, iPod devices, and smart speakers such as Amazon Echo), or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/device/Device/prototype/isMobile.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isMobile\n\nThe read-only **`isMobile`** property of the `Device` interface is\neither a boolean stating if the device is a mobile phone, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a mobile phone, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/device/Device/prototype/isSmartTV.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isSmartTV\n\nThe read-only **`isSmartTV`** property of the `Device` interface is\neither a boolean stating if the device is a smart TV, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a smart TV, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/device/Device/prototype/isTablet.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isTablet\n\nThe read-only **`isTablet`** property of the `Device` interface is\neither a boolean stating if the device is a tablet (like an iPad), or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a tablet (like an iPad), or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/device/Device/prototype/isTouchscreen.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isTouchscreen\n\nThe read-only **`isTouchscreen`** property of the `Device` interface is\neither a boolean stating if the device's screen is touch sensitive, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device's screen is touch sensitive, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/device/Device/prototype/model.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.model\n\nThe read-only **`model`** property of the `Device` interface is\neither a string stating the model of the device, or `null` if the model is not known.\n\n\n## Value\n\nEither a string value if a model is known, otherwise `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/device/Device/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.name\n\nThe read-only **`name`** property of the `Device` interface is\neither a string stating the name of the device, or `null` if the name is not known.\n\n\n## Value\n\nEither a string value if a name is known, otherwise `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/device/Device/prototype/toJSON.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# toJSON\n\nThe `toJSON()` method of the Device interface is a serializer;\nit returns a JSON representation of the Device object.\n\nTo get a JSON string, you can use `JSON.stringify(device)` directly; it will call `toJSON()` automatically.\n\n## Syntax\n\n```js\ntoJSON()\n```\n\n### Return value\n\nA JSON object that is the serialization of the Device object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/dictionary/Dictionary/Dictionary.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Dictionary()`\n\n:::info\n\nThis Class is deprecated\n\n:::\n\nThe **`Dictionary` constructor** lets you access a specific [Fastly Edge Dictionary](https://docs.fastly.com/en/guides/about-edge-dictionaries).\n\n**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew Dictionary(name);\n```\n\n> **Note:** `Dictionary()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - The name of the [Fastly Edge Dictionary](https://docs.fastly.com/en/guides/about-edge-dictionaries) that this `Dictionary` instance should provide access to.\n\n### Return value\n\nA new `Dictionary` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Dictionary exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name does not start with an ascii alphabetical character \n  - Thrown if the provided name does not contain only ascii alphanumeric, underscore, and whitespace characters\n\n## Examples\n\nIn this example we have an Edge Dictionary named \"animals\" and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Dictionary Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/dictionary/Dictionary/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Dictionary.prototype.get\n\n:::info\n\nThis Class is deprecated, it has been renamed to [`ConfigStore`](../../../fastly:config-store/ConfigStore/ConfigStore.mdx) and can be imported via `import { ConfigStore } from 'fastly:config-store'`\n\nThe `get()` method exists on the [`ConfigStore`](../../../fastly:config-store/ConfigStore/ConfigStore.mdx) Class.\n\n:::\n\nThe **`get()`** method returns the value associated with the provided key in the dictionary. If the provided key does not exist in the Dictionary then this returns `null`.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from the dictionary.\n\n### Return value\n\nA `string` representing the specified Dictionary value or `null` if the key does not exist in the Dictionary\n\n## Description\n\nGet a value for a key in the dictionary. If the provided key does not exist in the Dictionary then this returns `null`.\n\nThe `get()` method requires its `this` value to be a [`Dictionary`](../Dictionary.mdx) object.\n\nIf the `this` value does not inherit from `Dictionary.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided key is longer than 255 in length\n  - Thrown if the provided key is an empty string\n\n## Examples\n\nIn this example we have an Edge Dictionary named \"animals\" and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Dictionary Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/edge-rate-limiter/EdgeRateLimiter/EdgeRateLimiter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `EdgeRateLimiter()`\n\nThe **`EdgeRateLimiter` constructor** lets you open an epen a [ERL](https://docs.fastly.com/products/edge-rate-limiting) with the given ratecounter and penaltybox.\n\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew EdgeRateLimiter(rateCounter, penaltyBox)\n```\n\n> **Note:** `EdgeRateLimiter()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `rateCounter` _: RateCounter_\n  - The RateCounter instance to associate with this EdgeRateLimiter instance\n- `penaltyBox` _: PenaltyBox_\n  - The PenaltyBox instance which should be associated with this EdgeRateLimiter instance\n\n### Return value\n\nA new `EdgeRateLimiter` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided rateCounter value is not an instance of RateCounter\n  - Thrown if the provided penaltyBox value is not an instance of PenaltyBox\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/edge-rate-limiter/EdgeRateLimiter/prototype/checkRate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# EdgeRateLimiter.prototype.checkRate\n\nIncrement an entry in the rate counter and check if the entry has exceeded some average number of requests per second (RPS) over the given window.\nIf the entry is over the RPS limit for the window, add to the penaltybox for the given `timeToLive`.\n\nValid `timeToLive` is 1 minute to 60 minutes and `timeToLive` value is truncated to the nearest minute.\n\n## Syntax\n```js\ncheckRate(entry, delta, window, limit, timeToLive)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to increment and check\n- `delta` _: number_\n  - The amount to increment the `entry` by\n- `window` _: number_\n  - The time period to check across, has to be either 1 second, 10 seconds, or 60 seconds\n- `limit` _: number_\n  - The requests-per-second limit\n- `timeToLive` _: number_\n  - In minutes, how long the entry should be added into the penalty-box\n  - Valid `timeToLive` is 1 minute to 60 minutes and `timeToLive` value is truncated to the nearest minute.\n\n\n### Return value\n\nReturns `true` if the entry has exceeded the average RPS for the window, otherwise returns `false`.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `name` value can not be coerced into a string\n  - Thrown if the provided `delta` value is not a positive finite number.\n  - Thrown if the provided `window` value is not either, 1, 10, or 60.\n  - Thrown if the provided `limit` value is not a positive finite number.\n  - Thrown if the provided `timeToLive` value is not either, a number between 1 and 60 inclusively.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/edge-rate-limiter/PenaltyBox/PenaltyBox.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `PenaltyBox()`\n\nThe **`PenaltyBox` constructor** can be used with a [Edge Rate Limiter](../EdgeRateLimiter/EdgeRateLimiter.mdx) or standalone for adding and checking if some entry is in the dataset.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew PenaltyBox(name)\n```\n\n> **Note:** `PenaltyBox()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Open a PenaltyBox with the given name\n\n\n### Return value\n\nA new `PenaltyBox` object instance.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `name` value can not be coerced into a string\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/edge-rate-limiter/PenaltyBox/prototype/add.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# PenaltyBox.prototype.add\n\nAdd an `entry` into the PenaltyBox for the duration of the given `timeToLive`.\n\n## Syntax\n```js\nadd(entry, timeToLive)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n- `timeToLive` _: number_\n  - In minutes, how long the entry should be added into the PenaltyBox\n  - Valid `timeToLive` is 1 minute to 60 minutes and `timeToLive` value is truncated to the nearest minute.\n\n\n### Return value\n\nReturns `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n  - Thrown if the provided `timeToLive` value is not either, a number between 1 and 60 inclusively.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/edge-rate-limiter/PenaltyBox/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# PenaltyBox.prototype.has\n\nCheck if the given entry is contained in in the PenaltyBox instance.\n\n## Syntax\n```js\nhas(entry)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n\n\n### Return value\n\nReturns `true` if the entry is contained in the PenaltyBox instance, otherwise returns `false`.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/edge-rate-limiter/RateCounter/RateCounter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `RateCounter()`\n\nThe **`RateCounter` constructor** can be used with a [Edge Rate Limiter](../EdgeRateLimiter/EdgeRateLimiter.mdx) or standalone for counting and rate calculations.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew RateCounter(name)\n```\n\n> **Note:** `RateCounter()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Open a RateCounter with the given name\n\n\n### Return value\n\nA new `RateCounter` object instance.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `name` value can not be coerced into a string\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/edge-rate-limiter/RateCounter/prototype/increment.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RateCounter.prototype.increment\n\nIncrement the given `entry` in the RateCounter instance with the given `delta` value.\n\n## Syntax\n```js\nincrement(entry, delta)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n- `delta` _: number_\n  - The amount to increment the entry by\n\n\n### Return value\n\nReturns `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n  - Thrown if the provided `delta` value is not a positive, finite number.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/edge-rate-limiter/RateCounter/prototype/lookupCount.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RateCounter.prototype.lookupCount\n\nLook up the current rate for the given `entry` and the given `duration`.\n\n## Syntax\n```js\nlookupCount(entry, duration)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n- `duration` _: number_\n  - The duration to lookup alongside the entry, has to be either, 10, 20, 30, 40, 50, or 60 seconds.\n\n\n### Return value\n\nReturns a number which is the count for the given `entry` and `duration` in this `RateCounter` instance.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n  - Thrown if the provided `duration` value is not either, 10, 20, 30, 40, 50 or 60.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/edge-rate-limiter/RateCounter/prototype/lookupRate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RateCounter.prototype.lookupRate\n\nLook up the current rate for the given `entry` and the given `window`.\n\n## Syntax\n```js\nlookupRate(entry, window)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n- `window` _: number_\n  - The window to look up alongside the entry, has to be either 1 second, 10 seconds, or 60 seconds\n\n\n### Return value\n\nReturns a number which is the rate for the given `entry` and `window` in this `RateCounter` instance.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n  - Thrown if the provided `window` value is not either, 1, 10, or 60.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/env/env.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# env\n\nThe **`env()`** function returns the value for the provided environment variable name.\n\nFor a list of available environment variables, see the [Fastly Developer Hub for Compute Environment Variables](https://developer.fastly.com/reference/compute/ecp-env/)\n\n>**Note**: The environment variables can only be retrieved when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nenv(name)\n```\n\n### Parameters\n\n- `name` _: string_\n  - The name of the environment variable to retrieve\n\n### Return value\n\nThe value for the requested environment variable, if no such environment variable exists then an empty string is returned.\n\n## Examples\n\nIn this example we log to stdout the environment variables [`FASTLY_HOSTNAME`](https://developer.fastly.com/reference/compute/ecp-env/fastly-hostname/) and [`FASTLY_TRACE_ID`](https://developer.fastly.com/reference/compute/ecp-env/fastly-trace-id/).\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"env Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { env } from \"fastly:env\";\nfunction app(event) {\n  console.log(\"FASTLY_HOSTNAME:\", env(\"FASTLY_HOSTNAME\"));\n  console.log(\"FASTLY_TRACE_ID:\", env(\"FASTLY_TRACE_ID\"));\n  return new Response(\"\", {\n    status: 200\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { env } from \"fastly:env\";\nfunction app(event) {\n  console.log(\"FASTLY_HOSTNAME:\", env(\"FASTLY_HOSTNAME\"));\n  console.log(\"FASTLY_TRACE_ID:\", env(\"FASTLY_TRACE_ID\"));\n  return new Response(\"\", {\n    status: 200\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/experimental/allowDynamicBackends.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# allowDynamicBackends\n\nThe **`allowDynamicBackends()`** function is used to control whether or not Dynamic Backends should be allowed within this Fastly Compute Service.\n\nBy default, Dynamic Backends are disabled within a JavaScript application as it can be a potential avenue for third-party JavaScript code to send requests, potentially including sensitive/secret data,  off to destinations that the JavaScript project was not intending, which could be a security issue.\n\n>**Note**: This feature is in disabled by default for Fastly Services. Please contact [Fastly Support](https://support.fastly.com/hc/requests/new?ticket_form_id=360000269711) to request the feature be enabled on the Fastly Services which require Dynamic Backends.\n\n## Syntax\n\n```js\nallowDynamicBackends(enabledOrConfig)\n```\n\n### Parameters\n\n- `enabledOrConfig` _: boolean_\n  - Whether or not to allow Dynamic Backends\n\nor\n\n- `enabledOrConfig` _: object_\n  - `connectTimeout` _: number_ _**optional**_\n    - Maximum duration in milliseconds to wait for a connection to this backend to be established.\n    - If exceeded, the connection is aborted and a 503 response will be presented instead.\n    - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n  - `firstByteTimeout` _: number_ _**optional**_\n    - Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent.\n    - If exceeded, the connection is aborted and a 503 response will be presented instead.\n    - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n  - `betweenBytesTimeout` _: number_ _**optional**_\n    - Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend.\n    - If exceeded, the response received so far will be considered complete and the fetch will end.\n    - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n\n### Return value\n\n`undefined`.\n\n## Examples\n\nIn this example an implicit Dynamic Backend is created when making the fetch request to https://www.fastly.com/ and the response is then returned to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Dynamic Backends Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nallowDynamicBackends(true);\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  return fetch('https://www.fastly.com/');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nallowDynamicBackends(true);\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  return fetch('https://www.fastly.com/');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/experimental/includeBytes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# includeBytes\n\nThe **`includeBytes()`** function is used embed a file as a Uint8Array.\n\n>**Note**: Can only be used during build-time initialization, not when processing requests.\n\n## Syntax\n\n```js\nincludeBytes(path)\n```\n\n### Parameters\n\n- `path` _: string_\n  - The path to include, relative to the Fastly Compute application's top-level directory during build-time initialization.\n\n### Return value\n\nReturns a `Uint8Array`\n\n## Examples\n\nIn this example we include the README.md file as a Uint8Array and use it for the body in the response we return to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { includeBytes } from \"fastly:experimental\";\nconst readme = includeBytes('README.md');\nasync function app() {\n    return new Response(readme);\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/experimental/mapAndLogError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# mapAndLogError\n\nThe **`mapAndLogError()`** function calls `mapError` on an `Error` object and sends the output to standard error. This includes the error name, message, and a call stack.\n\nIf `--enable-stack-traces` is specified during the build, the call stack will be mapped using source maps.\n\nIf `--enable-stack-traces` is specified and `--exclude-sources` is not specified during the build, then this will also include a code dump of neighboring lines of user code.\n\n## Syntax\n\n```js\nmapAndLogError(error)\n```\n\n### Parameters\n\n- `error` _: Error _ or _string_\n  - The error to retrieve information about. If a `string` is provided, then it is first converted to an `Error`.\n\n### Return value\n\n`undefined`.\n\n## Examples\n\nIn this example, build the application using the `--enable-stack-traces` flag.\n\n```js\naddEventListener('fetch', e => e.respondWith(handler(e)));\nasync function handler(event) {\n  try {\n    throw new TypeError('foo');\n  } catch (err) {\n    mapAndLogError(mapError(err));\n  }\n  return new Response('ok');\n}\n```\n\nThe following is output to the error log.\n\n```\nTypeError: foo\n  at handler (src/index.ts:4:11)\n      1 | addEventListener('fetch', e => e.respondWith(handler(e)));\n      2 | async function handler(event) {\n      3 |   try {\n>     4 |     throw new TypeError('foo');\n                    ^\n      5 |   } catch (err) {\n      6 |     mapAndLogError(mapError(err));\n      7 |   }\n  at src/index.ts:1:45\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/experimental/mapError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# mapError\n\nThe **`mapError()`** function extracts information from an `Error` object as a human-readable array of strings. This includes the error name, message, and a call stack.\n\nIf `--enable-stack-traces` is specified during the build, the call stack will be mapped using source maps.\n\nIf `--enable-stack-traces` is specified and `--exclude-sources` is not specified during the build, then this will also include a code dump of neighboring lines of user code.\n\n## Syntax\n\n```js\nmapError(error)\n```\n\n### Parameters\n\n- `error` _: Error _ or _string_\n  - The error to retrieve information about. If a `string` is provided, then it is first converted to an `Error`.\n\n### Return value\n\nReturns an array of `string`s.\n\n## Examples\n\nIn this example, build the application using the `--enable-stack-traces` flag.\n\n```js\naddEventListener('fetch', e => e.respondWith(handler(e)));\nasync function handler(event) {\n  try {\n    throw new TypeError('foo');\n  } catch (err) {\n    console.error(mapError(err));\n  }\n  return new Response('ok');\n}\n```\n\nThe following is output to the error log.\n\n```\nTypeError: foo\n  at handler (src/index.ts:4:11)\n      1 | addEventListener('fetch', e => e.respondWith(handler(e)));\n      2 | async function handler(event) {\n      3 |   try {\n>     4 |     throw new TypeError('foo');\n                    ^\n      5 |   } catch (err) {\n      6 |     console.error(mapError(err));\n      7 |   }\n  at src/index.ts:1:45\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/experimental/sdkVersion.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# sdkVersion\n\nThe read-only **`sdkVersion`** property is a string whose indicates what JavaScript SDK version is being used.\n\n## Value\n\nA string value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/fanout/createFanoutHandoff.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# createFanoutHandoff\n\nThe **`createFanoutHandoff()`** function creates a Response instance which informs Fastly to pass the original Request through Fanout, to the declared backend.\n\n## Syntax\n\n```js\ncreateFanoutHandoff(request, backend)\n```\n\n### Parameters\n\n- `request` _: Request_\n  - The request to pass through Fanout.\n- `backend` _: string_\n  - The name of the backend that Fanout should send the request to.\n  - The name has to be between 1 and 254 characters inclusive.\n  - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n\n### Return value\n\nA Response instance is returned, which can then be used via `event.respondWith`.\n\n## Examples\n\nIn this example application requests to the path `/stream` and sent handled via Fanout.\n\n```js\nimport { createFanoutHandoff } from \"fastly:fanout\";\n\nasync function handleRequest(event) {\n  try {\n    const url = new URL(event.request.url);\n    if (url.pathname === '/stream') {\n      return createFanoutHandoff(event.request, 'fanout');\n    } else {\n      return new Response('oopsie, make a request to /stream for some fanout goodies', { status: 404 });\n    }\n  } catch (error) {\n    console.error({error});\n    return new Response(error.message, {status:500})\n  }\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/geolocation/getGeolocationForIpAddress.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# getGeolocationForIpAddress\n\nThe **`getGeolocationForIpAddress()`** function is used to retrieve geolocation information about the given IP address.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\ngetGeolocationForIpAddress(address)\n```\n\n### Parameters\n\n- `address` _: string_\n  - The IPv4 or IPv6 address to query.\n\n### Return value\n\nReturns an `Object`, or `null` if no geolocation data was found.\n\nThe object contains information about the given IP address with the following properties:\n\n- `as_name`  _: string | null_\n  - The name of the organization associated with `as_number`.\n  - For example, fastly is the value given for IP addresses under AS-54113.\n\n- `as_number` _: number | null_\n  - [Autonomous system](https://en.wikipedia.org/wiki/Autonomous_system_(Internet)) (AS) number.\n\n- `area_code` _: number | null_\n  - The telephone area code associated with an IP address.\n  - These are only available for IP addresses in the United States, its territories, and Canada.\n\n- `city` _: string | null_\n  - City or town name.\n\n- `conn_speed` _: string | null_\n  - Connection speed.\n\n- `conn_type` _: string | null_\n  - Connection type.\n\n- `continent` _: string | null_\n  - Continent.\n\n- `country_code` _: string | null_\n  - A two-character [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) country code for the country associated with an IP address.\n  - The US country code is returned for IP addresses associated with overseas United States military bases.\n  - These values include subdivisions that are assigned their own country codes in ISO 3166-1. For example, subdivisions NO-21 and NO-22 are presented with the country code SJ for Svalbard and the Jan Mayen Islands.\n\n- `country_code3` _: string | null_\n  - A three-character [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) country code for the country associated with the IP address.\n  - The USA country code is returned for IP addresses associated with overseas United States military bases.\n\n- `country_name` _: string | null_\n  - Country name.\n  - This field is the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) English short name for a country.\n\n- `gmt_offset` _: string | null_\n  - Time zone offset from Greenwich Mean Time (GMT) for `city`.\n\n- `latitude` _: number | null_\n  - Latitude, in units of degrees from the equator.\n  - Values range from -90.0 to +90.0 inclusive, and are based on the [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System) coordinate reference system.\n\n- `longitude` _: number | null_\n  - Longitude, in units of degrees from the [IERS Reference Meridian](https://en.wikipedia.org/wiki/IERS_Reference_Meridian).\n  - Values range from -180.0 to +180.0 inclusive, and are based on the [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System) coordinate reference system.\n\n- `metro_code` _: number | null_\n  - Metro code, representing designated market areas (DMAs) in the United States.\n\n- `postal_code` _: string | null_\n  - The postal code associated with the IP address.\n  - These are available for some IP addresses in Australia, Canada, France, Germany, Italy, Spain, Switzerland, the United Kingdom, and the United States.\n  - For Canadian postal codes, this is the first 3 characters. For the United Kingdom, this is the first 2-4 characters (outward code). For countries with alphanumeric postal codes, this field is a lowercase transliteration.\n\n- `proxy_description` _: string | null_\n  - Client proxy description.\n\n- `proxy_type` _: string | null_\n  - Client proxy type.\n\n- `region` _: string | null_\n  - [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) country subdivision code.\n  - For countries with multiple levels of subdivision (for example, nations within the United Kingdom), this variable gives the more specific subdivision.\n  - This field can be None for countries that do not have ISO country subdivision codes. For example, None is given for IP addresses assigned to the Åland Islands (country code AX, illustrated below).\n\n- `utc_offset` _: number | null;_\n  - Time zone offset from coordinated universal time (UTC) for `city`.\n\n## Examples\n\nIn this example we return the geolocation details for the provided ip querystring parameter or for the incoming client request if the querystring parameter does not exist.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"getGeolocationForIpAddress Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { getGeolocationForIpAddress } from \"fastly:geolocation\"\nasync function app(event) {\n  try {\n    let ip = new URL(event.request.url).searchParams.get('ip') || event.client.address\n    let geo = getGeolocationForIpAddress(ip);\n    return new Response(JSON.stringify(geo), {\n      headers: {\n        \"Content-Type\": \"application/json\",\n      },\n    });\n  } catch (error) {\n    console.error(error);\n    return new Response(\"Internal Server Error\", {\n      status: 500\n    });\n  }\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { getGeolocationForIpAddress } from \"fastly:geolocation\"\nasync function app(event) {\n  try {\n    let ip = new URL(event.request.url).searchParams.get('ip') || event.client.address\n    let geo = getGeolocationForIpAddress(ip);\n    return new Response(JSON.stringify(geo), {\n      headers: {\n        \"Content-Type\": \"application/json\",\n      },\n    });\n  } catch (error) {\n    console.error(error);\n    return new Response(\"Internal Server Error\", {\n      status: 500\n    });\n  }\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/AggregrateError/AggregrateError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# AggregateError()\n\nThe **`AggregateError()`** constructor creates an error for several errors that need to be wrapped in a single error.\n\n## Syntax\n\n```js\nnew AggregateError(errors)\nnew AggregateError(errors, message)\nnew AggregateError(errors, message, options)\n\nAggregateError(errors)\nAggregateError(errors, message)\nAggregateError(errors, message, options)\n```\n\n> **Note:** `AggregateError()` can be called with or without `new`. Both create a new `AggregateError` instance.\n\n### Parameters\n\n- `errors`\n  - : An iterable of errors, may not actually be [`TypeError`](../Error/Error.mdx) instances.\n- `message` _**optional**_\n  - : An optional human-readable description of the aggregate error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Array/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array\\[Symbol.species]\n\nThe **`Array[Symbol.species]`** accessor property returns the constructor used to construct return values from array methods.\n\n> **Warning:** The existence of `[Symbol.species]` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Syntax\n\n```js\nArray[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get [Symbol.species]` was called. The return value is used to construct return values from array methods that create new arrays.\n\n## Description\n\nThe `[Symbol.species]` accessor property returns the default constructor for `Array` objects. Subclass constructors may override it to change the constructor assignment. The default implementation is basically:\n\n```js\n// Hypothetical underlying implementation for illustration\nclass Array {\n  static get [Symbol.species]() {\n    return this;\n  }\n}\n```\n\nBecause of this polymorphic implementation, `[Symbol.species]` of derived subclasses would also return the constructor itself by default.\n\n```js\nclass SubArray extends Array {}\nSubArray[Symbol.species] === SubArray; // true\n```\n\nWhen calling array methods that do not mutate the existing array but return a new array instance (for example, `filter()` and `map()`), the array's `constructor[Symbol.species]` will be accessed. The returned constructor will be used to construct the return value of the array method. This makes it technically possible to make array methods return objects unrelated to arrays.\n\n```js\nclass NotAnArray {\n  constructor(length) {\n    this.length = length;\n  }\n}\n\nconst arr = [0, 1, 2];\narr.constructor = { [Symbol.species]: NotAnArray };\narr.map((i) => i); // NotAnArray { '0': 0, '1': 1, '2': 2, length: 3 }\narr.filter((i) => i); // NotAnArray { '0': 1, '1': 2, length: 0 }\narr.concat([1, 2]); // NotAnArray { '0': 0, '1': 1, '2': 2, '3': 1, '4': 2, length: 5 }\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Array/Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array()\n\nThe **`Array()`** constructor is used to create `Array` objects.\n\n## Syntax\n\n```js\nnew Array(element0, element1, /* … ,*/ elementN)\nnew Array(arrayLength)\n\nArray(element0, element1, /* … ,*/ elementN)\nArray(arrayLength)\n```\n\n> **Note:** `Array()` can be called with or without `new`. Both create a new `Array` instance.\n\n### Parameters\n\n- `elementN`\n  - : A JavaScript array is initialized with the given elements, except in the case where\n    a single argument is passed to the `Array` constructor and that argument is\n    a number (see the `arrayLength` parameter below). Note that this special case only\n    applies to JavaScript arrays created with the `Array` constructor, not\n    array literals created with the bracket syntax.\n- `arrayLength`\n  - : If the only argument passed to the `Array` constructor is an integer\n    between 0 and 2<sup>32</sup> - 1 (inclusive), this returns a new JavaScript array with\n    its `length` property set to that number (**Note:** this\n    implies an array of `arrayLength` empty slots, not slots with actual\n    `undefined` values).\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if there's only one argument (`arrayLength`) and its value is not between 0 and 2<sup>32</sup> - 1 (inclusive).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Array/from.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.from\n\nThe **`Array.from()`** static method creates a new, shallow-copied `Array` instance from an iterable or array-like object.\n\n## Syntax\n\n```js\nArray.from(arrayLike)\n\n// Arrow function\nArray.from(arrayLike, (element) => { /* … */ })\nArray.from(arrayLike, (element, index) => { /* … */ })\n\n// Mapping function\nArray.from(arrayLike, mapFn)\nArray.from(arrayLike, mapFn, thisArg)\n\n// Inline mapping function\nArray.from(arrayLike, function (element) { /* … */ })\nArray.from(arrayLike, function (element, index) { /* … */ })\nArray.from(arrayLike, function (element) { /* … */ }, thisArg)\nArray.from(arrayLike, function (element, index) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `arrayLike`\n  - : An iterable or array-like object to convert to an array.\n- `mapFn` _**optional**_\n\n  - : Map function to call on every element of the array. If provided, every value to be added to the array is first passed through this function, and `mapFn`'s return value is added to the array instead.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `mapFn`.\n\n### Return value\n\nA new `Array` instance.\n\n## Description\n\n`Array.from()` lets you create `Array`s from:\n\n- [iterable objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) (objects such as [`Map`](../Map/Map.mdx) and [`Set`](../Set/Set.mdx); or, if the object is not iterable,\n- array-like objects (objects with a `length` property and indexed elements).\n\n`Array.from()` never creates a sparse array. If the `arrayLike` object is missing some index properties, they become `undefined` in the new array.\n\n`Array.from()` has an optional parameter `mapFn`, which allows you to execute a function on each element of the array being created, similar to [`Array.prototype.map()`](./prototype/map.mdx). More clearly, `Array.from(obj, mapFn, thisArg)` has the same result as `Array.from(obj).map(mapFn, thisArg)`, except that it does not create an intermediate array, and `mapFn` only receives two arguments (`element`, `index`) without the whole array, because the array is still under construction.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Array/isArray.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.isArray()\n\nThe **`Array.isArray()`** static method determines whether the passed value is an `Array`.\n\n## Syntax\n\n```js\nArray.isArray(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be checked.\n\n### Return value\n\n`true` if `value` is an `Array`; otherwise, `false`. `false` is always returned if `value` is a `TypedArray` instance.\n\n## Description\n\n`Array.isArray()` checks if the passed value is an `Array`. It does not check the value's prototype chain, nor does it rely on the `Array` constructor it is attached to. It returns `true` for any value that was created using the array literal syntax or the `Array` constructor. This makes it safe to use with cross-realm objects, where the identity of the `Array` constructor is different and would therefore cause `instanceof Array` to fail.\n\nSee the article [\"Determining with absolute accuracy whether or not a JavaScript object is an array\"](https://web.mit.edu/jwalden/www/isArray.html) for more details.\n\n`Array.isArray()` also rejects objects with `Array.prototype` in its prototype chain but aren't actual arrays, which `instanceof Array` would accept.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Array/of.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.of()\nThe **`Array.of()`** method creates a new `Array`\ninstance from a variable number of arguments, regardless of number or type of the\narguments.\n\n## Syntax\n\n```js\nArray.of(element0)\nArray.of(element0, element1)\nArray.of(element0, element1, /* … ,*/ elementN)\n```\n\n### Parameters\n\n- `elementN`\n  - : Elements used to create the array.\n\n### Return value\n\nA new `Array` instance.\n\n## Description\n\nThe difference between `Array.of()` and the [`Array()`](./Array.mdx) constructor is in the handling of single arguments: `Array.of(7)` creates an array with a single element, `7`, whereas `Array(7)` creates an empty array with a `length` property of `7`. (That implies an array of 7 empty slots, not slots with actual [`undefined`](../undefined.mdx) values.)\n\n```js\nArray.of(7); // [7]\nArray(7); // array of 7 empty slots\n\nArray.of(1, 2, 3); // [1, 2, 3]\nArray(1, 2, 3); // [1, 2, 3]\n```\n\nThe `Array.of()` method is a generic factory method. For example, if a subclass of `Array` inherits the `of()` method, the inherited `of()` method will return new instances of the subclass instead of `Array` instances. In fact, the `this` value can be any constructor function that accepts a single argument representing the length of the new array, and the constructor will be called with the number of arguments passed to `of()`. The final `length` will be set again when all elements are assigned. If the `this` value is not a constructor function, the plain `Array` constructor is used instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Array/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype\\[Symbol.iterator]()\n\nThe **`Symbol.iterator`** method of an `Array` object implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows arrays to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the value of each index in the array.\n\nThe initial value of this property is the same function object as the initial value of the [`Array.prototype.values`](./values.mdx) property.\n\n## Syntax\n\n```js\narray[Symbol.iterator]()\n```\n\n### Return value\n\nThe same return value as [`Array.prototype.values()`](./values.mdx): a new iterable iterator object that yields the value of each index in the array.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Array/prototype/@@unscopables.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype[Symbol.unscopables]\n\nThe **`@@unscopables`** data property of `Array.prototype` is shared by all `Array` instances. It contains property names that were not included in the ECMAScript standard prior to the ES2015 version and that are ignored for [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) statement-binding purposes.\n\n## Value\n\nA [`null`-prototype object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects) with property names given below and their values set to `true`.\n\n## Description\n\nThe default `Array` properties that are ignored for `with` statement-binding purposes are:\n\n- [`at()`](./at.mdx)\n- [`copyWithin()`](./copyWithin.mdx)\n- [`entries()`](./entries.mdx)\n- [`fill()`](./fill.mdx)\n- [`find()`](./find.mdx)\n- [`findIndex()`](./findIndex.mdx)\n- [`flat()`](./flat.mdx)\n- [`flatMap()`](./flatMap.mdx)\n- [`includes()`](./includes.mdx)\n- [`keys()`](./keys.mdx)\n- [`values()`](./values.mdx)\n\n`Array.prototype[@@unscopables]` is an empty object only containing all the above property names with the value `true`. Its [prototype is `null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects), so `Object.prototype` properties like [`toString`](../../Object/prototype/toString.mdx) won't accidentally be made unscopable, and a `toString()` within the `with` statement will continue to be called on the array.\n\nSee [`Symbol.unscopables`](../../Symbol/unscopables.mdx) for how to set unscopable properties for your own objects.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Array/prototype/at.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.at\n\nThe **`at()`** method takes an integer value and returns the item at that index, allowing for positive and negative integers. Negative integers count back from the last item in the array.\n\n## Syntax\n\n```js\nat(index)\n```\n\n### Parameters\n\n- `index`\n  - : Zero-based index of the array element to be returned, converted to an integer. Negative index counts back from the end of the array — if `index < 0`, `index + array.length` is accessed.\n\n### Return value\n\nThe element in the array matching the given index. Always returns [`undefined`](../../../globals/undefined.mdx) if `index < -array.length` or `index >= array.length` without attempting to access the corresponding property.\n\n## Description\n\nThe `at()` method is equivalent to the bracket notation when `index` is non-negative. For example, `array[0]` and `array.at(0)` both return the first item. However, when counting elements from the end of the array, you cannot use `array[-1]` like you may in Python or R, because all values inside the square brackets are treated literally as string properties, so you will end up reading `array[\"-1\"]`, which is just a normal string property instead of an array index.\n\nThe usual practice is to access [`Array.prototype.length`](./length.mdx) and calculate the index from that — for example, `array[array.length - 1]`. The `at()` method allows relative indexing, so this can be shortened to `array.at(-1)`.\n\nThe `at()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Array/prototype/concat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.concat\n\nThe **`concat()`** method is used to merge two or more arrays.\nThis method does not change the existing arrays, but instead returns a new array.\n\n## Syntax\n\n```js\nconcat()\nconcat(value0)\nconcat(value0, value1)\nconcat(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `valueN` _**optional**_\n  - : Arrays and/or values to concatenate into a new array. If all\n    `valueN` parameters are omitted, `concat` returns a\n    [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of the existing array on which it is called. See the description below\n    for more details.\n\n### Return value\n\nA new `Array` instance.\n\n## Description\n\nThe `concat` method creates a new array. The array will first be populated by the elements in the object on which it is called. Then, for each argument, its value will be concatenated into the array — for normal objects or primitives, the argument itself will become an element of the final array; for arrays or array-like objects with the property [`Symbol.isConcatSpreadable`](../../Symbol/isConcatSpreadable.mdx) set to a truthy value, each element of the argument will be independently added to the final array. The `concat` method does not recurse into nested array arguments.\n\nThe `concat()` method is a copying. It does not alter `this` or any of the arrays provided as arguments but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains the same elements as the ones from the original arrays.\n\nThe `concat()` method preserves empty slots if any of the source arrays is sparse.\n\nThe `concat()` method is generic. The `this` value is treated in the same way as the other arguments (except it will be converted to an object first), which means plain objects will be directly prepended to the resulting array, while array-like objects with truthy `Symbol.isConcatSpreadable` will be spread into the resulting array.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Array/prototype/copyWithin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.copyWithin\n\nThe **`copyWithin()`** method shallow copies part of an array\nto another location in the same array and returns it without modifying its length.\n\n\n\n## Syntax\n\n```js\ncopyWithin(target)\ncopyWithin(target, start)\ncopyWithin(target, start, end)\n```\n\n### Parameters\n\n- `target`\n  - : Zero-based index at which to copy the sequence to, converted to an integer.\n    - Negative index counts back from the end of the array — if `target < 0`, `target + array.length` is used.\n    - If `target < -array.length`, `0` is used.\n    - If `target >= array.length`, nothing is copied.\n    - If `target` is positioned after `start` after normalization, copying only happens until the end of `array.length` (in other words, `copyWithin()` never extends the array).\n- `start` _**optional**_\n  - : Zero-based index at which to start copying elements from, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, nothing is copied.\n- `end` _**optional**_\n  - : Zero-based index at which to end copying elements from, converted to an integer. `copyWithin()` copies up to but not including `end`.\n    - Negative index counts back from the end of the array — if `end < 0`, `end + array.length` is used.\n    - If `end < -array.length`, `0` is used.\n    - If `end >= array.length` or `end` is omitted, `array.length` is used, causing all elements until the end to be copied.\n    - If `end` is positioned before or at `start` after normalization, nothing is copied.\n\n### Return value\n\nThe modified array.\n\n## Description\n\nThe `copyWithin()` method works like C and C++'s `memmove`, and is a high-performance method to shift the data of an `Array`. The sequence is copied and pasted as one operation; the pasted sequence will have the copied values even when the copy and paste region overlap.\n\nThe `copyWithin()` method is a mutating method. It does not alter the length of `this`, but it will change the content of `this` and create new properties or delete existing properties, if necessary.\n\nThe `copyWithin()` method preserves empty slots. If the region to be copied from is sparse, the empty slots' corresponding new indices are [deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) and also become empty slots.\n\nThe `copyWithin()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Array/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.entries\n\nThe **`entries()`** method returns a new **Array\nIterator** object that contains the key/value pairs for each index in the\narray.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nA new `Array` iterator object.\n\n## Description\n\nWhen used on sparse arrays, the `entries()` method iterates empty slots as if they have the value `undefined`.\n\nThe `entries()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Array/prototype/every.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.every\n\nThe **`every()`** method tests whether\nall elements in the array pass the test implemented by the provided function. It\nreturns a Boolean value.\n\n## Syntax\n\n```js\n// Arrow function\nevery((element) => { /* … */ })\nevery((element, index) => { /* … */ })\nevery((element, index, array) => { /* … */ })\n\n// Callback function\nevery(callbackFn)\nevery(callbackFn, thisArg)\n\n// Inline callback function\nevery(function (element) { /* … */ })\nevery(function (element, index) { /* … */ })\nevery(function (element, index, array) { /* … */ })\nevery(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value to indicate the element passes the test, and a falsy value otherwise.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `every()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\n`true` if `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value for every array element. Otherwise, `false`.\n\n## Description\n\nThe `every()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array, until the `callbackFn` returns a [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value. If such an element is found, `every()` immediately returns `false` and stops iterating through the array. Otherwise, if `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value for all elements, `every()` returns `true`.\n\n`every` acts like the \"for all\" quantifier in mathematics. In particular, for an empty array, it returns `true`. (It is [vacuously true](https://en.wikipedia.org/wiki/Vacuous_truth) that all elements of the [empty set](https://en.wikipedia.org/wiki/Empty_set#Properties) satisfy any given condition.)\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\n`every()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `every()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `every()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Array/prototype/fill.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.fill\n\nThe **`fill()`** method changes all elements in an array to a static value, from a start index (default `0`) to an end index (default `array.length`).\nIt returns the modified array.\n\n## Syntax\n\n```js\nfill(value)\nfill(value, start)\nfill(value, start, end)\n```\n\n### Parameters\n\n- `value`\n  - : Value to fill the array with. Note all elements in the array will be this exact value: if `value` is an object, each slot in the array will reference that object.\n- `start` _**optional**_\n  - : Zero-based index at which to start filling, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, no index is filled.\n- `end` _**optional**_\n  - : Zero-based index at which to end filling, converted to an integer. `fill()` fills up to but not including `end`.\n    - Negative index counts back from the end of the array — if `end < 0`, `end + array.length` is used.\n    - If `end < -array.length`, `0` is used.\n    - If `end >= array.length` or `end` is omitted, `array.length` is used, causing all indices until the end to be filled.\n    - If `end` is positioned before or at `start` after normalization, no index is filled.\n\n### Return value\n\nThe modified array, filled with `value`.\n\n## Description\n\nThe `fill()` method is a mutating method. It does not alter the length of `this`, but it will change the content of `this`.\n\nThe `fill()` method fills empty slots in sparse arrays with `value` as well.\n\nThe `fill()` method is generic. It only expects the `this` value to have a `length` property. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Array/prototype/filter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.filter\n\nThe **`filter()`** method creates a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of a portion of a given array, filtered down to just the elements from the given array that pass the test implemented by the provided function.\n\n## Syntax\n\n```js\n// Arrow function\nfilter((element) => { /* … */ })\nfilter((element, index) => { /* … */ })\nfilter((element, index, array) => { /* … */ })\n\n// Callback function\nfilter(callbackFn)\nfilter(callbackFn, thisArg)\n\n// Inline callback function\nfilter(function (element) { /* … */ })\nfilter(function (element, index) { /* … */ })\nfilter(function (element, index, array) { /* … */ })\nfilter(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) to keep the element in the resulting array, and a falsy value otherwise.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `filter()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\nA [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of a portion of the given array, filtered down to just the elements from the given array that pass the test implemented by the provided function. If no elements pass the test, an empty array will be returned.\n\n## Description\n\nThe `filter()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array, and constructs a new array of all the values for which `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. Array elements which do not pass the `callbackFn` test are not included in the new array.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nThe `filter()` method is a copying method. It does not alter `this` but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains the same elements as the ones from the original array (with some filtered out). However, the function provided as `callbackFn` can mutate the array. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `filter()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\nThe `filter()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Array/prototype/find.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.find()\n\nThe `find()` method returns the first element in the provided array that satisfies the provided testing function.\nIf no values satisfy the testing function, [`undefined`](../../../globals/undefined.mdx) is returned.\n\n- If you need the **index** of the found element in the array, use [`findIndex()`](./findIndex.mdx).\n- If you need to find the **index of a value**, use [`indexOf()`](./indexOf.mdx).\n  (It's similar to [`findIndex()`](./findIndex.mdx), but checks each element for equality with the value instead of using a testing function.)\n- If you need to find if a value **exists** in an array, use [`includes()`](./includes.mdx).\n  Again, it checks each element for equality with the value instead of using a testing function.\n- If you need to find if any element satisfies the provided testing function, use [`some()`](./some.mdx).\n\n## Syntax\n\n```js\n// Arrow function\nfind((element) => { /* … */ })\nfind((element, index) => { /* … */ })\nfind((element, index, array) => { /* … */ })\n\n// Callback function\nfind(callbackFn)\nfind(callbackFn, thisArg)\n\n// Inline callback function\nfind(function (element) { /* … */ })\nfind(function (element, index) { /* … */ })\nfind(function (element, index, array) { /* … */ })\nfind(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value to indicate a matching element has been found.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `find()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\nThe first element in the array that satisfies the provided testing function.\nOtherwise, [`undefined`](../../../globals/undefined.mdx) is returned.\n\n## Description\n\nThe `find()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array in ascending-index order, until `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. `find()` then returns that element and stops iterating through the array. If `callbackFn` never returns a truthy value, `find()` returns [`undefined`](../../../globals/undefined.mdx).\n\n`callbackFn` is invoked for _every_ index of the array, not just those with assigned values. Empty slots in sparse arrays behave the same as `undefined`.\n\n`find()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `find()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are visited as if they were `undefined`.\n\nThe `find()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Array/prototype/findIndex.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.findIndex\n\nThe **`findIndex()`** method returns the index of the first element in an array that satisfies the provided testing function.\nIf no elements satisfy the testing function, -1 is returned.\n\nSee also the [`find()`](./find.mdx) method, which returns the first element that satisfies the testing function (rather than its index).\n\n## Syntax\n\n```js\n// Arrow function\nfindIndex((element) => { /* … */ })\nfindIndex((element, index) => { /* … */ })\nfindIndex((element, index, array) => { /* … */ })\n\n// Callback function\nfindIndex(callbackFn)\nfindIndex(callbackFn, thisArg)\n\n// Inline callback function\nfindIndex(function (element) { /* … */ })\nfindIndex(function (element, index) { /* … */ })\nfindIndex(function (element, index, array) { /* … */ })\nfindIndex(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value to indicate a matching element has been found.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `findIndex()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\nThe index of the first element in the array that passes the test. Otherwise, `-1`.\n\n## Description\n\nThe `findIndex()` is an iterative method. It calls a provided `callbackFn` function once for each element in an array in ascending-index order, until `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. `findIndex()` then returns the index of that element and stops iterating through the array. If `callbackFn` never returns a truthy value, `findIndex()` returns `-1`.\n\n`callbackFn` is invoked for _every_ index of the array, not just those with assigned values. Empty slots in sparse arrays behave the same as `undefined`.\n\n`findIndex()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `findIndex()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are visited as if they were `undefined`.\n\nThe `findIndex()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Array/prototype/flat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.flat\n\nThe **`flat()`** method creates a new array with all sub-array\nelements concatenated into it recursively up to the specified depth.\n\n## Syntax\n\n```js\nflat()\nflat(depth)\n```\n\n### Parameters\n\n- `depth` _**optional**_\n  - : The depth level specifying how deep a nested array structure should be flattened.\n    Defaults to 1.\n\n### Return value\n\nA new array with the sub-array elements concatenated into it.\n\n## Description\n\nThe `flat()` method is a copying method. It does not alter `this` but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains the same elements as the ones from the original array.\n\nThe `flat()` method ignores empty slots if the array being flattened is sparse. For example, if `depth` is 1, both empty slots in the root array and in the first level of nested arrays are ignored, but empty slots in further nested arrays are preserved with the arrays themselves.\n\nThe `flat()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. However, its elements must be arrays if they are to be flattened.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Array/prototype/flatMap.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.flatMap()\n\nThe **`flatMap()`** method returns a new array formed by applying a given callback function to each element of the array, and then flattening the result by one level. It is identical to a [`Array.prototype.map()`](./map.mdx) followed by a [`Array.prototype.flat()`](./flat.mdx) of depth 1 (`arr.map(...args).flat()`), but slightly more efficient than calling those two methods separately.\n\n## Syntax\n\n```js\n// Arrow function\nflatMap((element) => { /* … */ })\nflatMap((element, index) => { /* … */ })\nflatMap((element, index, array) => { /* … */ })\n\n// Callback function\nflatMap(callbackFn)\nflatMap(callbackFn, thisArg)\n\n// Inline callback function\nflatMap(function (element) { /* … */ })\nflatMap(function (element, index) { /* … */ })\nflatMap(function (element, index, array) { /* … */ })\nflatMap(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return an array containing new elements of the new array, or a single non-array value to be added to the new array.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `flatMap()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\nA new array with each element being the result of the callback function and flattened\nby a depth of 1.\n\n## Description\n\nThe `flatMap()` method is an iterative method. See [`Array.prototype.map()`](./map.mdx) for a detailed description of the callback function. The `flatMap()` method is identical to [`map(callbackFn, thisArg)`](./map.mdx) followed by [`flat(1)`](./flat.mdx) — for each element, it produces an array of new elements, and concatenates the resulting arrays together to form a new array.\n\nThe `flatMap()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. However, the value returned from `callbackFn` must be an array if it is to be flattened.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Array/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.forEach()\n\nThe **`forEach()`** method executes a provided function once\nfor each array element.\n\n## Syntax\n\n```js\n// Arrow function\nforEach((element) => { /* … */ })\nforEach((element, index) => { /* … */ })\nforEach((element, index, array) => { /* … */ })\n\n// Callback function\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n\n// Inline callback function\nforEach(function (element) { /* … */ })\nforEach(function (element, index) { /* … */ })\nforEach(function (element, index, array) { /* … */ })\nforEach(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value is discarded.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `forEach()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\n`undefined`.\n\n## Description\n\nThe `forEach()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array in ascending-index order. Unlike [`Array.prototype.map()`](./map.mdx), `forEach()` always returns [`undefined`](../../../globals/undefined.mdx) and is not chainable. The typical use case is to execute side effects at the end of a chain.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\n`forEach()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `forEach()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\nThe `forEach()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n\nThere is no way to stop or break a `forEach()` loop other than by throwing an exception. If you need such behavior, the `forEach()` method is the wrong tool.\n\nEarly termination may be accomplished with looping statements like [`for`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for), [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of), and [`for...in`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...in). Array methods like [`Array.prototype.some()`](./some.mdx), [`Array.prototype.some()`](./some.mdx), [`Array.prototype.find()`](./find.mdx), and [`Array.prototype.findIndex()`](./findIndex.mdx) also stops iteration immediately when further iteration is not necessary.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Array/prototype/includes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.includes()\n\nThe **`includes()`** method determines whether an array\nincludes a certain value among its entries, returning `true` or\n`false` as appropriate.\n\n## Syntax\n\n```js\nincludes(searchElement)\nincludes(searchElement, fromIndex)\n```\n\n### Parameters\n\n- `searchElement`\n  - : The value to search for.\n- `fromIndex` _**optional**_\n  - : Zero-based index at which to start searching, converted to an integer.\n    - Negative index counts back from the end of the array — if `fromIndex < 0`, `fromIndex + array.length` is used. However, the array is still searched from front to back in this case.\n    - If `fromIndex < -array.length` or `fromIndex` is omitted, `0` is used, causing the entire array to be searched.\n    - If `fromIndex >= array.length`, the array is not searched and `false` is returned.\n\n### Return value\n\nA boolean value which is `true` if the value `searchElement` is found within the array (or the part of the array indicated by the index `fromIndex`, if specified).\n\n## Description\n\nThe `includes()` method compares `searchElement` to elements of the array using the [SameValueZero](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) algorithm. Values of zero are all considered to be equal, regardless of sign. (That is, `-0` is equal to `0`), but `false` is _not_ considered to be the same as `0`. [`NaN`](../../NaN.mdx) can be correctly searched for.\n\nWhen used on sparse arrays, the `includes()` method iterates empty slots as if they have the value `undefined`.\n\nThe `includes()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Array/prototype/indexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.indexOf()\n\nThe **`indexOf()`** method returns the first index at which a\ngiven element can be found in the array, or -1 if it is not present.\n\n## Syntax\n\n```js\nindexOf(searchElement)\nindexOf(searchElement, fromIndex)\n```\n\n### Parameters\n\n- `searchElement`\n  - : Element to locate in the array.\n- `fromIndex` _**optional**_\n  - : Zero-based index at which to start searching, converted to an integer.\n    - Negative index counts back from the end of the array — if `fromIndex < 0`, `fromIndex + array.length` is used. Note, the array is still searched from front to back in this case.\n    - If `fromIndex < -array.length` or `fromIndex` is omitted, `0` is used, causing the entire array to be searched.\n    - If `fromIndex >= array.length`, the array is not searched and `-1` is returned.\n\n### Return value\n\nThe first index of the element in the array; **-1** if not found.\n\n## Description\n\nThe `indexOf()` method compares `searchElement` to elements of the array using [strict equality](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) (the same algorithm used by the `===` operator).\n\nThe `indexOf()` method skips empty slots in sparse arrays.\n\nThe `indexOf()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Array/prototype/join.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.join()\n\nThe **`join()`** method creates and\nreturns a new string by concatenating all of the elements in an array\n(or an [array-like object](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects)),\nseparated by commas or a specified separator string. If the array has\nonly one item, then that item will be returned without using the separator.\n\n## Syntax\n\n```js\njoin()\njoin(separator)\n```\n\n### Parameters\n\n- `separator` _**optional**_\n  - : Specifies a string to separate each pair of adjacent elements of the array. The\n    separator is converted to a string if necessary. If omitted, the array elements are\n    separated with a comma (\",\"). If `separator` is an empty string, all\n    elements are joined without any characters in between them.\n\n### Return value\n\nA string with all array elements joined. If `arr.length` is\n`0`, the empty string is returned.\n\n## Description\n\nThe string conversions of all array elements are joined into one string. If an element is `undefined`, `null`, it is converted to an empty string instead of the string `\"null\"` or `\"undefined\"`.\n\nThe `join` method is accessed internally by [`Array.prototype.toString()`](./toString.mdx) with no arguments. Overriding `join` of an array instance will override its `toString` behavior as well.\n\nWhen used on sparse arrays, the `join()` method iterates empty slots as if they have the value `undefined`.\n\nThe `join()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Array/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.keys()\n\nThe **`keys()`** method returns a new **Array\nIterator** object that contains the keys for each index in the array.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nA new `Array` iterator object.\n\n## Description\n\nWhen used on sparse arrays, the `keys()` method iterates empty slots as if they have the value `undefined`.\n\nThe `keys()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Array/prototype/lastIndexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.lastIndexOf()\n\nThe **`lastIndexOf()`** method returns the last index at which\na given element can be found in the array, or -1 if it is not present. The array is\nsearched backwards, starting at `fromIndex`.\n\n## Syntax\n\n```js\nlastIndexOf(searchElement)\nlastIndexOf(searchElement, fromIndex)\n```\n\n### Parameters\n\n- `searchElement`\n  - : Element to locate in the array.\n- `fromIndex` _**optional**_\n  - : Zero-based index at which to start searching backwards, converted to an integer.\n    - Negative index counts back from the end of the array — if `fromIndex < 0`, `fromIndex + array.length` is used.\n    - If `fromIndex < -array.length`, the array is not searched and `-1` is returned. You can think of it conceptually as starting at a nonexistent position before the beginning of the array and going backwards from there. There are no array elements on the way, so `searchElement` is never found.\n    - If `fromIndex >= array.length` or `fromIndex` is omitted, `array.length - 1` is used, causing the entire array to be searched. You can think of it conceptually as starting at a nonexistent position beyond the end of the array and going backwards from there. It eventually reaches the real end position of the array, at which point it starts searching backwards through the actual array elements.\n\n### Return value\n\nThe last index of the element in the array; **-1** if not found.\n\n## Description\n\nThe `lastIndexOf()` method compares `searchElement` to elements of the array using [strict equality](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) (the same algorithm used by the `===` operator).\n\nThe `lastIndexOf()` method skips empty slots in sparse arrays.\n\nThe `lastIndexOf()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Array/prototype/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.length\n\nThe **`length`** data property of an `Array` instance represents the number of elements in that array. The value is an unsigned, 32-bit integer that is always numerically greater than the highest index in the array.\n\n## Value\n\nA non-negative integer less than 2<sup>32</sup>.\n\n## Description\n\nThe value of the `length` property is a non-negative integer with a value less than 2<sup>32</sup>.\n\n```js\nconst listA = [1, 2, 3];\nconst listB = new Array(6);\n\nconsole.log(listA.length);\n// 3\n\nconsole.log(listB.length);\n// 6\n\nlistB.length = 2 ** 32; // 4294967296\n// RangeError: Invalid array length\n\nconst listC = new Array(-100); // Negative numbers are not allowed\n// RangeError: Invalid array length\n```\n\nThe array object observes the `length` property, and automatically syncs the `length` value with the array's content. This means:\n\n- Setting `length` to a value smaller than the current length truncates the array — elements beyond the new `length` are deleted.\n- Setting any array index (a non-negative integer smaller than 2<sup>32</sup>) beyond the current `length` extends the array — the `length` property is increased to reflect the new highest index.\n- Setting `length` to an invalid value (e.g. a negative number or a non-integer) throws a `RangeError` exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Array/prototype/map.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.map()\n\nThe **`map()`** method **creates\na new array** populated with the results of calling a provided function on\nevery element in the calling array.\n\n## Syntax\n\n```js\n// Arrow function\nmap((element) => { /* … */ })\nmap((element, index) => { /* … */ })\nmap((element, index, array) => { /* … */ })\n\n// Callback function\nmap(callbackFn)\nmap(callbackFn, thisArg)\n\n// Inline callback function\nmap(function (element) { /* … */ })\nmap(function (element, index) { /* … */ })\nmap(function (element, index, array) { /* … */ })\nmap(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value is added as a single element in the new array.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `map()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\nA new array with each element being the result of the callback function.\n\n## Description\n\nThe `map()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array and constructs a new array from the results.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nThe `map()` method is a copying method. It does not alter `this`. However, the function provided as `callbackFn` can mutate the array. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `map()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `map()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n\nSince `map` builds a new array, calling it without using the returned\narray is an anti-pattern; use [`Array.prototype.forEach()`](./forEach.mdx) or\n`for...of` instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Array/prototype/pop.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.pop()\n\nThe **`pop()`** method removes the **last**\nelement from an array and returns that element. This method changes the length of the\narray.\n\n## Syntax\n\n```js\npop()\n```\n\n### Return value\n\nThe removed element from the array; [`undefined`](../../../globals/undefined.mdx) if the array is empty.\n\n## Description\n\nThe `pop()` method removes the last element from an array and returns that value to the caller. If you call `pop()` on an empty array, it returns [`undefined`](../../../globals/undefined.mdx).\n\n[`Array.prototype.shift()`](./shift.mdx) has similar behavior to `pop()`, but applied to the first element in an array.\n\nThe `pop()` method is a mutating method. It changes the length and the content of `this`. In case you want the value of `this` to be the same, but return a new array with the last element removed, you can use [`arr.slice(0, -1)`](./slice.mdx) instead.\n\nThe `pop()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Array/prototype/push.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.push()\n\nThe **`push()`** method adds one or more elements to the end of\nan array and returns the new length of the array.\n\n## Syntax\n\n```js\npush(element0)\npush(element0, element1)\npush(element0, element1, /* … ,*/ elementN)\n```\n\n### Parameters\n\n- `elementN`\n  - : The element(s) to add to the end of the array.\n\n### Return value\n\nThe new [`Array.prototype.length`](./length.mdx) property of the object upon which the method was called.\n\n## Description\n\nThe `push()` method appends values to an array.\n\n[`Array.prototype.unshift()`](./unshift.mdx)has similar behavior to `push()`, but applied to the start of an array.\n\nThe `push()` method is a mutating method. It changes the length and the content of `this`. In case you want the value of `this` to be the same, but return a new array with elements appended to the end, you can use [`arr.concat([element0, element1, /* ... ,*/ elementN])`](./concat.mdx) instead. Notice that the elements are wrapped in an extra array — otherwise, if the element is an array itself, it would be spread instead of pushed as a single element due to the behavior of `concat()`.\n\nThe `push()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Array/prototype/reduce.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.reduce()\n\nThe **`reduce()`** method executes a user-supplied \"reducer\" callback function on each element of the array, in order, passing in the return value from the calculation on the preceding element.\nThe final result of running the reducer across all elements of the array is a single value.\n\nThe first time that the callback is run there is no \"return value of the previous calculation\".\nIf supplied, an initial value may be used in its place.\nOtherwise the array element at index 0 is used as the initial value and iteration starts from the next element (index 1 instead of index 0).\n\nPerhaps the easiest-to-understand case for `reduce()` is to return the sum of all the elements in an array:\n\nThe reducer walks through the array element-by-element, at each step adding the current array value to the result from the previous step (this result is the running sum of all the previous steps) — until there are no more elements to add.\n\n## Syntax\n\n```js\n// Arrow function\nreduce((accumulator, currentValue) => { /* … */ })\nreduce((accumulator, currentValue, currentIndex) => { /* … */ })\nreduce((accumulator, currentValue, currentIndex, array) => { /* … */ })\n\nreduce((accumulator, currentValue) => { /* … */ }, initialValue)\nreduce((accumulator, currentValue, currentIndex) => { /* … */ }, initialValue)\nreduce((accumulator, currentValue, currentIndex, array) => { /* … */ }, initialValue)\n\n// Callback function\nreduce(callbackFn)\nreduce(callbackFn, initialValue)\n\n// Inline callback function\nreduce(function (accumulator, currentValue) { /* … */ })\nreduce(function (accumulator, currentValue, currentIndex) { /* … */ })\nreduce(function (accumulator, currentValue, currentIndex, array) { /* … */ })\n\nreduce(function (accumulator, currentValue) { /* … */ }, initialValue)\nreduce(function (accumulator, currentValue, currentIndex) { /* … */ }, initialValue)\nreduce(function (accumulator, currentValue, currentIndex, array) { /* … */ }, initialValue)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value becomes the value of the `accumulator` parameter on the next invocation of `callbackFn`. For the last invocation, the return value becomes the return value of `reduce()`.\n\n    The function is called with the following arguments:\n\n    - `accumulator`\n      - : The value resulting from the previous call to `callbackFn`. On first call, `initialValue` if specified, otherwise the value of `array[0]`.\n    - `currentValue`\n      - : The value of the current element. On first call, the value of `array[0]` if an `initialValue` was specified, otherwise the value of `array[1]`.\n    - `currentIndex`\n      - : The index position of `currentValue` in the array. On first call, `0` if `initialValue` was specified, otherwise `1`.\n    - `array`\n      - : The array `reduce()` was called upon.\n\n- `initialValue` _**optional**_\n  - : A value to which `accumulator` is initialized the first time the callback is called.\n    If `initialValue` is specified, `callbackFn` starts executing with the first value in the array as `currentValue`.\n    If `initialValue` is _not_ specified, `accumulator` is initialized to the first value in the array, and `callbackFn` starts executing with the second value in the array as `currentValue`. In this case, if the array is empty (so that there's no first value to return as `accumulator`), an error is thrown.\n\n### Return value\n\nThe value that results from running the \"reducer\" callback function to completion over the entire array.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n\n  - : The array contains no elements and `initialValue` is not provided.\n\n## Description\n\nThe `reduce()` method is an iterative method. It runs a \"reducer\" callback function over all elements in the array, in ascending-index order, and accumulates them into a single value. Every time, the return value of `callbackFn` is passed into `callbackFn` again on next invocation as `accumulator`. The final value of `accumulator` (which is the value returned from `callbackFn` on the final iteration of the array) becomes the return value of `reduce()`.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nUnlike other [iterative methods](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array#iterative_methods), `reduce()` does not accept a `thisArg` argument. `callbackFn` is always called with `undefined` as `this`, which gets substituted with `globalThis` if `callbackFn` is non-strict.\n\n`reduce()` is a central concept in [functional programming](https://en.wikipedia.org/wiki/Functional_programming), where it's not possible to mutate any value, so in order to accumulate all values in an array, one must return a new accumulator value on every iteration. This convention propagates to JavaScript's `reduce()`: you should use [spreading](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) or other copying methods where possible to create new arrays and objects as the accumulator, rather than mutating the existing one. If you decided to mutate the accumulator instead of copying it, remember to still return the modified object in the callback, or the next iteration will receive undefined.\n\n`reduce()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `reduce()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `reduce()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n\n### When to not use reduce()\n\nRecursive functions like `reduce()` can be powerful but sometimes difficult to understand, especially for less-experienced JavaScript developers. If code becomes clearer when using other array methods, developers must weigh the readability tradeoff against the other benefits of using `reduce()`. In cases where `reduce()` is the best choice, documentation and semantic variable naming can help mitigate readability drawbacks.\n\n### Edge cases\n\nIf the array only has one element (regardless of position) and no `initialValue` is provided, or if `initialValue` is provided but the array is empty, the solo value will be returned _without_ calling `callbackFn`.\n\nIf `initialValue` is provided and the array is not empty, then the reduce method will always invoke the callback function starting at index 0.\n\nIf `initialValue` is not provided then the reduce method will act differently for arrays with length larger than 1, equal to 1 and 0, as shown in the following example:\n\n```js\nconst getMax = (a, b) => Math.max(a, b);\n\n// callback is invoked for each element in the array starting at index 0\n[1, 100].reduce(getMax, 50); // 100\n[50].reduce(getMax, 10); // 50\n\n// callback is invoked once for element at index 1\n[1, 100].reduce(getMax); // 100\n\n// callback is not invoked\n[50].reduce(getMax); // 50\n[].reduce(getMax, 1); // 1\n\n[].reduce(getMax); // TypeError\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Array/prototype/reduceRight.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.reduceRight()\n\nThe **`reduceRight()`** method applies a function against an\naccumulator and each value of the array (from right-to-left) to reduce it to a single\nvalue.\n\nSee also [`Array.prototype.reduce()`](./reduce.mdx) for left-to-right.\n\n## Syntax\n\n```js\n// Arrow function\nreduceRight((accumulator, currentValue) => { /* … */ })\nreduceRight((accumulator, currentValue, index) => { /* … */ })\nreduceRight((accumulator, currentValue, index, array) => { /* … */ })\nreduceRight((accumulator, currentValue, index, array) => { /* … */ }, initialValue)\n\n// Callback function\nreduceRight(callbackFn)\nreduceRight(callbackFn, initialValue)\n\n// Callback reducer function\nreduceRight(function (accumulator, currentValue) { /* … */ })\nreduceRight(function (accumulator, currentValue, index) { /* … */ })\nreduceRight(function (accumulator, currentValue, index, array) { /* … */ })\nreduceRight(function (accumulator, currentValue, index, array) { /* … */ }, initialValue)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value becomes the value of the `accumulator` parameter on the next invocation of `callbackFn`. For the last invocation, the return value becomes the return value of `reduce()`.\n\n    The function is called with the following arguments:\n\n    - `accumulator`\n      - : The value previously returned in the last invocation of the callback, or\n        `initialValue`, if supplied. (See below.)\n    - `currentValue`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `reduceRight()` was called upon.\n\n- `initialValue` _**optional**_\n  - : Value to use as accumulator to the first call of the\n    `callbackFn`. If no initial value is supplied, the last element in\n    the array will be used and skipped. Calling reduce or reduceRight on an empty array\n    without an initial value creates a `TypeError`.\n\n### Return value\n\nThe value that results from the reduction.\n\n## Description\n\nThe `reduceRight()` method is an iterative method. It runs a \"reducer\" callback function over all elements in the array, in descending-index order, and accumulates them into a single value.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nUnlike other [iterative methods](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array#iterative_methods), `reduce()` does not accept a `thisArg` argument. `callbackFn` is always called with `undefined` as `this`, which gets substituted with `globalThis` if `callbackFn` is non-strict.\n\n`reduceRight()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `reduceRight()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `reduceRight()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Array/prototype/reverse.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.reverse()\n\nThe **`reverse()`** method reverses an array _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_ and returns the reference to the same array, the first array element now becoming the last, and the last array element becoming the first. In other words, elements order in the array will be turned towards the direction opposite to that previously stated.\n\n## Syntax\n\n```js\nreverse()\n```\n\n### Return value\n\nThe reference to the original array, now reversed. Note that the array is reversed _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_, and no copy is made.\n\n## Description\n\nThe `reverse()` method transposes the elements of the calling array object in\nplace, mutating the array, and returning a reference to the array.\n\nThe `reverse()` method preserves empty slots. If the source array is sparse, the empty slots' corresponding new indices are [deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) and also become empty slots.\n\nThe `reverse()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Array/prototype/shift.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.shift()\n\nThe **`shift()`** method removes the **first**\nelement from an array and returns that removed element. This method changes the length\nof the array.\n\n## Syntax\n\n```js\nshift()\n```\n\n### Return value\n\nThe removed element from the array; [`undefined`](../../../globals/undefined.mdx) if the array is empty.\n\n## Description\n\nThe `shift()` method removes the element at the zeroth index and shifts the\nvalues at consecutive indexes down, then returns the removed value. If the\n[`Array.prototype.length`](./length.mdx) property is 0, [`undefined`](../../../globals/undefined.mdx) is returned.\n\nThe [`Array.prototype.pop()`](./pop.mdx) method has similar behavior to `shift()`, but applied to the last element in an array.\n\nThe `shift()` method is a mutating method. It changes the length and the content of `this`. In case you want the value of `this` to be the same, but return a new array with the first element removed, you can use [`arr.slice(1)`](./slice.mdx) instead.\n\nThe `shift()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Array/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.slice()\n\nThe **`slice()`** method returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of a portion of\nan array into a new array object selected from `start` to `end`\n(`end` not included) where `start` and `end` represent\nthe index of items in that array. The original array will not be modified.\n\n## Syntax\n\n```js\nslice()\nslice(start)\nslice(start, end)\n```\n\n### Parameters\n\n- `start` _**optional**_\n  - : Zero-based index at which to start extraction, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, nothing is extracted.\n- `end` _**optional**_\n  - : Zero-based index at which to end extraction, converted to an integer. `slice()` extracts up to but not including `end`.\n    - Negative index counts back from the end of the array — if `end < 0`, `end + array.length` is used.\n    - If `end < -array.length`, `0` is used.\n    - If `end >= array.length` or `end` is omitted, `array.length` is used, causing all elements until the end to be extracted.\n    - If `end` is positioned before or at `start` after normalization, nothing is extracted.\n\n### Return value\n\nA new array containing the extracted elements.\n\n## Description\n\nThe `slice()` method is a copying method. It does not alter `this` but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains some of the same elements as the ones from the original array.\n\nThe `slice()` method preserves empty slots. If the sliced portion is sparse, the returned array is sparse as well.\n\nThe `slice()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Array/prototype/some.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.some()\n\nThe **`some()`** method tests whether\nat least one element in the array passes the test implemented by the provided\nfunction. It returns true if, in the array, it finds an element for which the provided function returns true; otherwise it returns false. It doesn't modify the array.\n\n## Syntax\n\n```js\n// Arrow function\nsome((element) => { /* … */ })\nsome((element, index) => { /* … */ })\nsome((element, index, array) => { /* … */ })\n\n// Callback function\nsome(callbackFn)\nsome(callbackFn, thisArg)\n\n// Inline callback function\nsome(function (element) { /* … */ })\nsome(function (element, index) { /* … */ })\nsome(function (element, index, array) { /* … */ })\nsome(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) to indicate the element passes the test, and a falsy value otherwise.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `some()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\n`true` if the callback function returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value for at least one element in the array. Otherwise, `false`.\n\n## Description\n\nThe `some()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array, until the `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. If such an element is found, `some()` immediately returns `true` and stops iterating through the array. Otherwise, if `callbackFn` returns a [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value for all elements, `some()` returns `false`.\n\n`some()` acts like the \"there exists\" quantifier in mathematics. In particular, for an empty array, it returns `false` for any condition.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\n`some()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `some()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\nThe `some()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Array/prototype/sort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.sort()\n\nThe **`sort()`** method sorts the elements of an array _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_ and returns the reference to the same array, now sorted. The default sort order is ascending, built upon converting the elements into strings, then comparing their sequences of UTF-16 code units values.\n\nThe time and space complexity of the sort cannot be guaranteed as it depends on the\nimplementation.\n\n## Syntax\n\n```js\n// Functionless\nsort()\n\n// Arrow function\nsort((a, b) => { /* … */ } )\n\n// Compare function\nsort(compareFn)\n\n// Inline compare function\nsort(function compareFn(a, b) { /* … */ })\n```\n\n### Parameters\n\n- `compareFn` _**optional**_\n\n  - : Specifies a function that defines the sort order. If omitted, the array elements are converted to strings, then sorted according to each character's Unicode code point value.\n\n    - `a`\n      - : The first element for comparison.\n    - `b`\n      - : The second element for comparison.\n\n### Return value\n\nThe reference to the original array, now sorted. Note that the array is sorted _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_, and no copy is made.\n\n## Description\n\nIf `compareFn` is not supplied, all non-`undefined` array\nelements are sorted by converting them to strings and comparing strings in UTF-16 code\nunits order. For example, \"banana\" comes before \"cherry\". In a numeric sort, 9 comes\nbefore 80, but because numbers are converted to strings, \"80\" comes before \"9\" in the\nUnicode order. All `undefined` elements are sorted to the end of the array.\n\nThe `sort()` method preserves empty slots. If the source array is sparse, the empty slots are moved to the end of the array, and always come after all the `undefined`.\n\n> **Note:** In UTF-16, Unicode characters above `\\uFFFF` are\n> encoded as two surrogate code units, of the range\n> `\\uD800` - `\\uDFFF`. The value of each code unit is taken\n> separately into account for the comparison. Thus the character formed by the surrogate\n> pair `\\uD855\\uDE51` will be sorted before the character\n> `\\uFF3A`.\n\nIf `compareFn` is supplied, all non-`undefined` array\nelements are sorted according to the return value of the compare function (all\n`undefined` elements are sorted to the end of the array, with no call to\n`compareFn`).\n\n| `compareFn(a, b)` return value | sort order                         |\n| ------------------------------ | ---------------------------------- |\n| > 0                            | sort `a` after `b`                 |\n| < 0                            | sort `a` before `b`                |\n| === 0                          | keep original order of `a` and `b` |\n\nSo, the compare function has the following form:\n\n```js\nfunction compareFn(a, b) {\n  if (a is less than b by some ordering criterion) {\n    return -1;\n  }\n  if (a is greater than b by the ordering criterion) {\n    return 1;\n  }\n  // a must be equal to b\n  return 0;\n}\n```\n\nMore formally, the comparator is expected to have the following properties, in order to ensure proper sort behavior:\n\n- _Pure_: The comparator does not mutate the objects being compared or any external state. (This is important because there's no guarantee _when_ and _how_ the comparator will be called, so any particular call should not produce visible effects to the outside.)\n- _Stable_: The comparator returns the same result with the same pair of input.\n- _Reflexive_: `compareFn(a, a) === 0`.\n- _Anti-symmetric_: `compareFn(a, b)` and `compareFn(b, a)` must both be `0` or have opposite signs.\n- _Transitive_: If `compareFn(a, b)` and `compareFn(b, c)` are both positive, zero, or negative, then `compareFn(a, c)` has the same positivity as the previous two.\n\nA comparator conforming to the constraints above will always be able to return all of `1`, `0`, and `-1`, or consistently return `0`. For example, if a comparator only returns `1` and `0`, or only returns `0` and `-1`, it will not be able to sort reliably because _anti-symmetry_ is broken. A comparator that always returns `0` will cause the array to not be changed at all, but is reliable nonetheless.\n\nThe default lexicographic comparator satisfies all constraints above.\n\nTo compare numbers instead of strings, the compare function can subtract `b`\nfrom `a`. The following function will sort the array in ascending order (if\nit doesn't contain `Infinity` and `NaN`):\n\n```js\nfunction compareNumbers(a, b) {\n  return a - b;\n}\n```\n\nThe `sort()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Array/prototype/splice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.splice()\n\nThe **`splice()`** method changes the contents of an array by\nremoving or replacing existing elements and/or adding new elements [in place](https://en.wikipedia.org/wiki/In-place_algorithm). To access part of an array without modifying it, see [`Array.prototype.slice()`](./slice.mdx).\n\n## Syntax\n\n```js\nsplice(start)\nsplice(start, deleteCount)\nsplice(start, deleteCount, item1)\nsplice(start, deleteCount, item1, item2, itemN)\n```\n\n### Parameters\n\n- `start`\n\n  - : Zero-based index at which to start changing the array, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, no element will be deleted, but the method will behave as an adding function, adding as many elements as provided.\n\n- `deleteCount` _**optional**_\n\n  - : An integer indicating the number of elements in the array to remove from `start`.\n\n    If `deleteCount` is omitted, or if its value is greater than or equal to the number of elements after the position specified by `start`, then all the elements from `start` to the end of the array will be deleted. However, if you wish to pass any `itemN` parameter, you should pass `Infinity` as `deleteCount` to delete all elements after `start`, because an explicit `undefined` gets [converted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#integer_conversion) to `0`.\n\n    If `deleteCount` is `0` or negative, no elements are removed.\n    In this case, you should specify at least one new element (see below).\n\n- `item1`, …, `itemN` _**optional**_\n\n  - : The elements to add to the array, beginning from `start`.\n\n    If you do not specify any elements, `splice()` will only remove elements from the array.\n\n### Return value\n\nAn array containing the deleted elements.\n\nIf only one element is removed, an array of one element is returned.\n\nIf no elements are removed, an empty array is returned.\n\n## Description\n\nThe `splice()` method is a mutating method. It may change the content of `this`. If the specified number of elements to insert differs from the number of elements being removed, the array's `length` will be changed as well. At the same time, it uses [`@@species`](../@@species.mdx) to create a new array instance to be returned.\n\nIf the deleted portion is sparse, the array returned by `splice()` is sparse as well, with those corresponding indices being empty slots.\n\nThe `splice()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Array/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string representing\nthe elements of the array. The elements are converted to Strings using their\n`toLocaleString` methods and these Strings are separated by a locale-specific\nString (such as a comma \",\").\n\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\n- `locales` _**optional**_\n  - : A string with a BCP 47 language tag, or an array of such strings. For the general form and interpretation of the `locales` argument, see [Locale identification and negotiation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation).\n- `options` _**optional**_\n  - : An object with configuration properties. For numbers, see [`Number.prototype.toLocaleString()`](../../../globals/Number/prototype/toLocaleString.mdx); for dates, see [`Date.prototype.toLocaleString()`](../../../globals/Date/prototype/toLocaleString.mdx).\n\n### Return value\n\nA string representing the elements of the array.\n\n## Description\n\nThe `Array.prototype.toLocaleString` method traverses its content, calling the `toLocaleString` method of every element with the `locales` and `options` parameters provided, and concatenates them with an implementation-defined separator (such as a comma \",\"). Note that the method itself does not consume the two parameters — it only passes them to the `toLocaleString()` of each element. The choice of the separator string depends on the host's current locale, not the `locales` parameter.\n\nIf an element is `undefined`, `null`, it is converted to an empty string instead of the string `\"null\"` or `\"undefined\"`.\n\nWhen used on sparse arrays, the `toLocaleString()` method iterates empty slots as if they have the value `undefined`.\n\nThe `toLocaleString()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Array/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.toString()\n\nThe **`toString()`** method returns a string representing the\nspecified array and its elements.\n\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the elements of the array.\n\n## Description\n\nThe `Array` object overrides the `toString` method of `Object`. The `toString` method of arrays calls [`join()`](../../../globals/Array/prototype/join.mdx) internally, which joins the array and returns one string containing each array element separated by commas. If the `join` method is unavailable or is not a function, [`Object.prototype.toString`](../../../globals/Object/prototype/toString.mdx) is used instead, returning `[object Array]`.\n\n```js\nconst arr = [];\narr.join = 1; // re-assign `join` with a non-function\nconsole.log(arr.toString()); // [object Array]\n\nconsole.log(Array.prototype.toString.call({ join: () => 1 })); // 1\n```\n\nJavaScript calls the `toString` method automatically when an array is to be represented as a text value or when an array is referred to in a string concatenation.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Array/prototype/unshift.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.unshift()\n\nThe **`unshift()`** method adds one or more elements to the\nbeginning of an array and returns the new length of the array.\n\n## Syntax\n\n```js\nunshift(element0)\nunshift(element0, element1)\nunshift(element0, element1, /* … ,*/ elementN)\n```\n\n### Parameters\n\n- `elementN`\n  - : The elements to add to the front of the `arr`.\n\n### Return value\n\nThe new [`Array.prototype.length`](./length.mdx) property of the object upon which the\nmethod was called.\n\n## Description\n\nThe `unshift()` method inserts the given values to the beginning of an\narray-like object.\n\n[`Array.prototype.push()`](./push.mdx) has similar behavior to `unshift()`, but applied to the end of an array.\n\nPlease note that, if multiple elements are passed as parameters, they're inserted in\nchunk at the beginning of the object, in the exact same order they were passed as\nparameters. Hence, calling `unshift()` with `n`\narguments **once**, or calling it `n` times with\n**1** argument (with a loop, for example), don't yield the same results.\n\nSee example:\n\n```js\nlet arr = [4, 5, 6];\n\narr.unshift(1, 2, 3);\nconsole.log(arr);\n// [1, 2, 3, 4, 5, 6]\n\narr = [4, 5, 6]; // resetting the array\n\narr.unshift(1);\narr.unshift(2);\narr.unshift(3);\n\nconsole.log(arr);\n// [3, 2, 1, 4, 5, 6]\n```\n\nThe `unshift()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Array/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.values()\n\nThe **`values()`** method returns a new _array [iterator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterator_protocol)_ object that iterates the value of each index in the array.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nA new iterable iterator object.\n\n## Description\n\n`Array.prototype.values()` is the default implementation of [`Array.prototype[@@iterator]()`](./@@iterator.mdx).\n\n```js\nArray.prototype.values === Array.prototype[Symbol.iterator]; // true\n```\n\nWhen used on sparse arrays, the `values()` method iterates empty slots as if they have the value `undefined`.\n\nThe `values()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/ArrayBuffer/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get ArrayBuffer\\[Symbol.species]\n\nThe **`ArrayBuffer[Symbol.species]`** accessor property returns the constructor used to construct return values from array buffer methods.\n\n> **Warning:** The existence of `Symbol.species` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Syntax\n\n```js\nArrayBuffer[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct return values from array buffer methods that create new array buffers.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `ArrayBuffer` objects. Subclass constructors may override it to change the constructor assignment. The default implementation is basically:\n\n```js\n// Hypothetical underlying implementation for illustration\nclass ArrayBuffer {\n  static get [Symbol.species]() {\n    return this;\n  }\n}\n```\n\nBecause of this polymorphic implementation, `Symbol.species` of derived subclasses would also return the constructor itself by default.\n\n```js\nclass SubArrayBuffer extends ArrayBuffer {}\nSubArrayBuffer[Symbol.species] === SubArrayBuffer; // true\n```\n\nWhen calling array buffer methods that do not mutate the existing object but return a new array buffer instance (for example, [`slice()`](./prototype/slice.mdx)), the object's `constructor[Symbol.species]` will be accessed. The returned constructor will be used to construct the return value of the array buffer method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/ArrayBuffer/ArrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer()\n\nThe **`ArrayBuffer()`** constructor is used to create \"ArrayBuffer\" objects.\n\n## Syntax\n\n```js\nnew ArrayBuffer(length)\n```\n\n> **Note:** `ArrayBuffer()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `length`\n  - : The size, in bytes, of the array buffer to create.\n\n### Return value\n\nA new `ArrayBuffer` object of the specified size. Its contents are\ninitialized to 0.\n\n### Exceptions\n\n- [`RangeError`](../RangeError/RangeError.mdx)\n  - : Thrown if the `length` is larger than `Number_MAX_SAFE_INTEGER` (≥ 2<sup>53</sup>) or negative.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/ArrayBuffer/isView.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer.isView\n\nThe **`ArrayBuffer.isView()`** method determines whether the\npassed value is one of the `ArrayBuffer` views,\nsuch as [typed array objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray)\nor a [`DataView`](../DataView/DataView.mdx).\n\n## Syntax\n\n```js\nArrayBuffer.isView(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be checked.\n\n### Return value\n\n`true` if the given argument is one of the `ArrayBuffer` views;\notherwise, `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/ArrayBuffer/prototype/byteLength.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer.prototype.byteLength\n\nThe **`byteLength`** accessor property represents the length of an `ArrayBuffer` in bytes.\n\n## Description\n\nThe `byteLength` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when the array is constructed and cannot be changed. This property returns 0 if this `ArrayBuffer` has been detached.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/ArrayBuffer/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer.prototype.slice()\n\nThe **`slice()`** method returns a new `ArrayBuffer`\nwhose contents are a copy of this `ArrayBuffer`'s bytes from\n`begin`, inclusive, up to `end`, exclusive.\n\n## Syntax\n\n```js\nslice(begin)\nslice(begin, end)\n```\n\n### Parameters\n\n- `begin`\n  - : Zero-based byte index at which to begin slicing.\n- `end` _**optional**_\n  - : Byte index before which to end slicing. If end is unspecified, the new\n    `ArrayBuffer` contains all bytes from begin to the end of this\n    `ArrayBuffer`. If negative, it will make the Byte index begin from the last\n    Byte.\n\n### Return value\n\nA new `ArrayBuffer` object.\n\n## Description\n\nThe `slice()` method copies up to, but not including, the byte indicated by\nthe `end` parameter. If either `begin` or `end` is\nnegative, it refers to an index from the end of the array, as opposed to from the\nbeginning.\n\nThe range specified by the `begin` and `end` parameters is\nclamped to the valid index range for the current array. If the computed length of the\nnew `ArrayBuffer` would be negative, it is clamped to zero.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/BigInt/BigInt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt()\n\nThe **`BigInt()`** function returns a value of type **bigint**.\n\n## Syntax\n\n```js\nBigInt(value)\n```\n\n> **Note:** `BigInt()` can only be called without `new`. Attempting to construct it with `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `value`\n  - : The numeric value of the object being created. It may be a string, an integer, a boolean, or another `BigInt`.\n\n### Return value\n\nA `BigInt` value. Number values must be integers and are converted to BigInts. The boolean value `true` becomes `1n`, and `false` becomes `0n`. Strings are parsed as if they are source text for integer literals, which means they can have leading and trailing whitespaces and can be prefixed with `0b`, `0o`, or `0x`.\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if the parameter is a non-integral number.\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if at least one of these conditions is met:\n    - The parameter cannot be converted to a primitive.\n    - After conversion to a primitive, the result is [`undefined`](../undefined.mdx), `null`, `Symbol`.\n- [`SyntaxError`](../SyntaxError/SyntaxError.mdx)\n  - : Thrown if the parameter is a string that cannot be parsed as a `BigInt`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/BigInt/asIntN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.asIntN()\n\nThe **`BigInt.asIntN`** static method clamps a `BigInt` value to the given number of bits, and returns that value as a signed integer.\n\n## Syntax\n\n```js\nBigInt.asIntN(bits, bigint)\n```\n\n### Parameters\n\n- `bits`\n  - : The amount of bits available for the returned BigInt. Should be an integer between 0 and 2<sup>53</sup> - 1, inclusive.\n- `bigint`\n  - : The BigInt value to clamp to fit into the supplied bits.\n\n### Return value\n\nThe value of `bigint` modulo 2^`bits`, as a signed integer.\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `bits` is negative or greater than 2<sup>53</sup> - 1.\n\n## Description\n\nThe `BigInt.asIntN` method clamps a `BigInt` value to the given number of bits, and interprets the result as a signed integer. For example, for `BigInt.asIntN(3, 25n)`, the value `25n` is clamped to `1n`:\n\n```plain\n25n = 00011001 (base 2)\n          ^=== Clamp to three remaining bits\n===>       001 (base 2) = 1n\n```\n\nIf the leading bit of the remaining number is `1`, the result is negative. For example, `BigInt.asIntN(4, 25n)` yields `-7n`, because `1001` is the encoding of `-7` under two's complement:\n\n```plain\n25n = 00011001 (base 2)\n         ^==== Clamp to four remaining bits\n===>      1001 (base 2) = -7n\n```\n\n> **Note:** `BigInt` values are always encoded as two's complement in binary.\n\nUnlike similar language APIs such as [`Number.prototype.toExponential()`](../Number/prototype/toExponential.mdx), `asIntN` is a static property of `BigInt`, so you always use it as `BigInt.asIntN()`, rather than as a method of a BigInt value. Exposing `asIntN()` as a \"standard library function\" allows [interop with asm.js](https://github.com/tc39/proposal-bigint/blob/master/ADVANCED.md#dont-break-asmjs).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/BigInt/asUintN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.asUintN()\n\nThe **`BigInt.asUintN`** static method clamps a `BigInt` value to the given number of bits, and returns that value as an unsigned integer.\n\n## Syntax\n\n```js\nBigInt.asUintN(bits, bigint)\n```\n\n### Parameters\n\n- `bits`\n  - : The amount of bits available for the returned BigInt. Should be an integer between 0 and 2<sup>53</sup> - 1, inclusive.\n- `bigint`\n  - : The BigInt value to clamp to fit into the supplied bits.\n\n### Return value\n\nThe value of `bigint` modulo 2^`bits`, as an unsigned integer.\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `bits` is negative or greater than 2<sup>53</sup> - 1.\n\n## Description\n\nThe `BigInt.asUintN` method clamps a `BigInt` value to the given number of bits, and interprets the result as an unsigned integer. Unsigned integers have no sign bits and are always non-negative. For example, for `BigInt.asUintN(4, 25n)`, the value `25n` is clamped to `9n`:\n\n```plain\n25n = 00011001 (base 2)\n         ^==== Clamp to four remaining bits\n===>      1001 (base 2) = 9n\n```\n\n> **Note:** `BigInt` values are always encoded as two's complement in binary.\n\nUnlike similar language APIs such as [`Number.prototype.toExponential()`](../Number/prototype/toExponential.mdx), `asUintN` is a static property of `BigInt`, so you always use it as `BigInt.asUintN()`, rather than as a method of a BigInt value. Exposing `asUintN()` as a \"standard library function\" allows [interop with asm.js](https://github.com/tc39/proposal-bigint/blob/master/ADVANCED.md#dont-break-asmjs).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/BigInt/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string with a language-sensitive representation of this BigInt. In implementations with [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) support, this method simply calls `Intl.NumberFormat`.\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` parameters customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat), these parameters correspond exactly to the [`Intl.NumberFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) constructor's parameters. Implementations without `Intl.NumberFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#locales) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored.\n\nSee the [`Intl.NumberFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string with a language-sensitive representation of the given BigInt.\n\nIn implementations with `Intl.NumberFormat`, this is equivalent to `new Intl.NumberFormat(locales, options).format(number)`.\n\n## Performance\n\nWhen formatting large numbers of numbers, it is better to create a\n`Intl.NumberFormat` object and use the function provided by its\n`format()` method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/BigInt/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified `BigInt` value. The trailing \"n\" is not part of the string.\n\n## Syntax\n\n```js\ntoString()\ntoString(radix)\n```\n\n### Parameters\n\n- `radix` _**optional**_\n  - : An integer in the range 2 through 36 specifying the base to use for representing the BigInt value. Defaults to 10.\n\n### Return value\n\nA string representing the specified `BigInt` value.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `radix` is less than 2 or greater than 36.\n\n## Description\n\nThe `BigInt` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../Object/prototype/toString.mdx). For `BigInt` values, the `toString()` method returns a string representation of the value in the specified radix.\n\nFor radixes above 10, the letters of the alphabet indicate digits greater than 9. For example, for hexadecimal numbers (base 16) `a` through `f` are used.\n\nIf the specified BigInt value is negative, the sign is preserved. This is the case even if the radix is 2; the string returned is the positive binary representation of the BigInt value preceded by a `-` sign, **not** the two's complement of the BigInt value.\n\nThe `toString()` method requires its `this` value to be a `BigInt` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to BigInt values.\n\nBecause `BigInt` doesn't have a [`[Symbol.toPrimitive]()`](../../Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `BigInt` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, BigInt _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — rather, they are directly converted using the same algorithm as the initial `toString()` implementation.\n\n```js\nBigInt.prototype.toString = () => \"Overridden\";\nconsole.log(`${1n}`); // \"1\"\nconsole.log(`${Object(1n)}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/BigInt/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.prototype.valueOf()\n\nThe **`valueOf()`** method returns the wrapped primitive value\nof a `BigInt` object.\n\n## Syntax\n\n```js\nbigIntObj.valueOf()\n```\n\n### Return value\n\nA BigInt representing the primitive value of the specified `BigInt` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/BigInt64Array/BigInt64Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt64Array()\n\nThe **`BigInt64Array()`** typed array constructor creates a\nnew `BigInt64Array` object, which is, an array of 64-bit signed integers\nin the platform byte order. If control over byte order is needed, use\n[`DataView`](../DataView/DataView.mdx) instead. The contents are initialized to `0n`. Once\nestablished, you can reference elements in the array using the object's methods, or by\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew BigInt64Array()\nnew BigInt64Array(length)\nnew BigInt64Array(typedArray)\nnew BigInt64Array(object)\n\nnew BigInt64Array(buffer)\nnew BigInt64Array(buffer, byteOffset)\nnew BigInt64Array(buffer, byteOffset, length)\n```\n\n> **Note:** `BigInt64Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/BigUint64Array/BigUint64Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigUint64Array()\n\nThe **`BigUint64Array()`** typed array constructor creates a\nnew `BigUint64Array` object, which is, an array of 64-bit unsigned integers\nin the platform byte order. If control over byte order is needed, use\n[`DataView`](../DataView/DataView.mdx) instead. The contents are initialized to `0n`. Once\nestablished, you can reference elements in the array using the object's methods, or by\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew BigUint64Array()\nnew BigUint64Array(length)\nnew BigUint64Array(typedArray)\nnew BigUint64Array(object)\n\nnew BigUint64Array(buffer)\nnew BigUint64Array(buffer, byteOffset)\nnew BigUint64Array(buffer, byteOffset, length)\n```\n\n> **Note:** `BigUint64Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](..//TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Blob/Blob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob()\n\nThe **`Blob()`** constructor creates a `Blob` object, which represents a file-like object of immutable, raw data.\n\n## Syntax\n\n```js\nnew Blob()\nnew Blob(array)\nnew Blob(array, options)\n```\n\n> **Note:** `Blob()` can only be constructed with `new`. Attempting to call it without `new` throws a `TypeError`.\n\n### Parameters\n\n- `array` _**optional**_\n\n  - : An array of values to include in the `Blob`. These can be [`ArrayBuffer`](../../globals/ArrayBuffer/ArrayBuffer.mdx), [`Blob`](../../globals/Blob/Blob.mdx), or strings. If any of these elements is a [`Blob`](../../globals/Blob/Blob.mdx), its content (and not the object itself) is copied into the Blob being constructed.\n\n- `options` _**optional**_\n\n  - : An object containing optional attributes for the `Blob`.\n    - `type`\n      - : A string indicating the MIME type of the data. The default value is the empty string `\"\"`.\n    - `endings`\n      - : A string indicating how to handle line endings in the data. This can be either `\"transparent\"` (default) to keep line endings unchanged, or `\"native\"` to convert line endings to the platform's native line endings (e.g., `\\r\\n` on Windows).\n\n### Return value\n\nA new `Blob` object containing the specified data.\n\n## Description\n\n`Blob` objects represent data that isn't necessarily in a JavaScript-native format. The `File` interface is based on `Blob`, inheriting its functionality and expanding it to support files on the user's system.\n\nTo construct a `Blob` from other non-blob objects and data, use the `Blob()` constructor. To create a blob that contains a subset of another blob's data, use the [`slice()`](../../globals/Blob/prototype/slice.mdx) method.\n\nThe `type` property of a `Blob` object will match the MIME type specified in the constructor's `options` parameter, defaulting to an empty string if not specified.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Blob/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the `Blob` interface returns a `Promise` that resolves with an `ArrayBuffer` containing the entire contents of the `Blob` as binary data.\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with an `ArrayBuffer` containing the blob's data.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Blob/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.size\n\nThe **`size`** read-only property of the `Blob` interface returns the size of the `Blob` in bytes.\n\n## Value\n\nA number representing the size of the `Blob` in bytes.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Blob/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.slice()\n\nThe **`slice()`** method of the `Blob` interface creates and returns a new `Blob` object which contains data from a subset of the blob on which it's called.\n\n## Syntax\n\n```js\nslice()\nslice(start)\nslice(start, end)\nslice(start, end, contentType)\n```\n\n### Parameters\n\n- `start` _**optional**_\n  - : The 0-based index of the first byte to include in the new `Blob`. If negative, it refers to an index from the end of the `Blob`. The default value is 0.\n- `end` _**optional**_\n  - : The 0-based index of the first byte that will not be included in the new `Blob`. If negative, it refers to an index from the end of the `Blob`. The default value is `size`.\n- `contentType` _**optional**_\n  - : A string indicating the content type to assign to the new `Blob`. The default value is an empty string.\n\n### Return value\n\nA new `Blob` object containing the specified subset of data.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Blob/prototype/stream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.stream()\n\nThe **`stream()`** method of the `Blob` interface returns a `ReadableStream` that can be used to read the contents of the `Blob`.\n\n## Syntax\n\n```js\nstream()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `ReadableStream` that provides the data contained within the `Blob`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Blob/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.text()\n\nThe **`text()`** method of the `Blob` interface returns a `Promise` that resolves with a string containing the contents of the blob, interpreted as UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a string containing the blob's data as a text string. The data is always interpreted as UTF-8.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Blob/prototype/type.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.type\n\nThe **`type`** read-only property of the `Blob` interface returns the MIME type of the `Blob`.\n\n## Value\n\nA string indicating the MIME type of the `Blob`. If the type cannot be determined, this returns an empty string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Boolean/Boolean.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Boolean()\n\nThe **`Boolean()`** constructor can create `Boolean` objects or return primitive values of type boolean.\n\n## Syntax\n\n```js\nnew Boolean(value)\nBoolean(value)\n```\n\n> **Note:** `Boolean()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\n- `value`\n  - : The initial value of the `Boolean` object.\n\n### Return value\n\nWhen `Boolean()` is called as a constructor (with `new`), it creates a `Boolean` object, which is **not** a primitive.\n\nWhen `Boolean()` is called as a function (without `new`), it coerces the parameter to a boolean primitive.\n\n> **Warning:** You should rarely find yourself using `Boolean` as a constructor.\n\n## Description\n\nThe value passed as the first parameter is [converted to a boolean value](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean#boolean_coercion). If the value is omitted or is `0`, `-0`, `0n`, [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null), `false`, [`NaN`](../NaN.mdx), [`undefined`](../undefined.mdx), or the empty string (`\"\"`), then the object has an initial value of `false`. All other values, including any object, an empty array (`[]`), or the string `\"false\"`, create an object with an initial value of `true`.\n\n> **Note:** When the non-standard property [`document.all`](https://developer.mozilla.org/docs/Web/API/Document/all) is used as an argument for this constructor, the result is a `Boolean` object with the value `false`. This property is legacy and non-standard and should not be used.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Boolean/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Boolean.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified boolean value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified boolean value.\n\n## Description\n\nThe `Boolean` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../Object/prototype/toString.mdx). For `Boolean` values, the `toString` method returns a string representation of the boolean value, which is either `\"true\"` or `\"false\"`.\n\nThe `toString()` method requires its `this` value to be a `Boolean` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to boolean values.\n\nBecause `Boolean` doesn't have a [`[Symbol.toPrimitive]()`](../../Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `Boolean` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, boolean _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — rather, they are directly converted using the same algorithm as the initial `toString()` implementation.\n\n```js\nBoolean.prototype.toString = () => \"Overridden\";\nconsole.log(`${true}`); // \"true\"\nconsole.log(`${new Boolean(true)}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Boolean/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Boolean.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a\n`Boolean` object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nThe primitive value of the given `Boolean` object.\n\n## Description\n\nThe `valueOf()` method of `Boolean` returns the primitive value\nof a `Boolean` object or literal `Boolean` as a Boolean data type.\n\nThis method is usually called internally by JavaScript and not explicitly in code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/ByteLengthQueuingStrategy/ByteLengthQueuingStrategy.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ByteLengthQueuingStrategy()\n\nThe **`ByteLengthQueuingStrategy()`**\nconstructor creates and returns a `ByteLengthQueuingStrategy` object\ninstance.\n\n## Syntax\n\n```js\nnew ByteLengthQueuingStrategy(highWaterMark)\n```\n\n### Parameters\n\nAn object with the following property:\n\n- `highWaterMark`\n\n  - : The total number of bytes that can be contained in the internal queue before backpressure is applied.\n\n    Unlike `CountQueuingStrategy()` where the `highWaterMark` parameter specifies a simple count of the number of chunks, with `ByteLengthQueuingStrategy()`, the `highWaterMark` parameter specifies a number of _bytes_ — specifically, given a stream of chunks, how many bytes worth of those chunks (rather than a count of how many of those chunks) can be contained in the internal queue before backpressure is applied.\n\n### Return value\n\nAn instance of the `ByteLengthQueuingStrategy` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/ByteLengthQueuingStrategy/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ByteLengthQueuingStrategy.size()\n\nThe **`size()`** method of the\n`ByteLengthQueuingStrategy` interface returns the given chunk's\n`byteLength` property.\n\n## Syntax\n\n```js\nsize(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : A chunk of data being passed through the stream.\n\n### Return value\n\nAn integer representing the byte length of the given chunk.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/CompressionStream/CompressionStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CompressionStream()\n\nThe **`CompressionStream()`** constructor creates a new `CompressionStream` object which compresses a stream of data.\n\n## Syntax\n\n```js\nnew CompressionStream(format)\n```\n\n### Parameters\n\n- `format`\n\n  - : One of the following allowed compression formats:\n\n    - `\"gzip\"`\n    - `\"deflate\"`\n    - `\"deflate-raw\"`\n\n## Exceptions\n\n- `TypeError`\n  - : Thrown if the format passed to the constructor is not supported.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/CompressionStream/prototype/readable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CompressionStream.readable\n\nThe **`readable`** read-only property of the `CompressionStream` interface returns a `ReadableStream`.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/CompressionStream/prototype/writable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CompressionStream.writable\n\nThe **`writable`** read-only property of the `CompressionStream` interface returns a `WritableStream`.\n\n## Value\n\nA `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/CryptoKey/CryptoKey.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CryptoKey\n\nThe **`CryptoKey`** interface represents a cryptographic key obtained from one of the [`SubtleCrypto`](../SubtleCrypto/SubtleCrypto.mdx) method [`importKey()`](../SubtleCrypto/prototype/importKey.mdx).\n\n## Instance properties\n\n- [`type`](./prototype/type.mdx) _**readonly**_\n  - : The type of key the object represents. It may take one of the following values: `\"secret\"`, `\"private\"` or `\"public\"`.\n\n- [`extractable`](./prototype/extractable.mdx) _**readonly**_\n  - : A boolean value indicating whether or not the key may be extracted.\n\n- [`algorithm`](./prototype/algorithm.mdx) _**readonly**_\n  - : An object describing the algorithm for which this key can be used and any associated extra parameters.\n\n- [`usages`](./prototype/usages.mdx) _**readonly**_\n  - : An `Array` of strings, indicating what can be done with the key. Possible values for array elements are `\"encrypt\"`, `\"decrypt\"`, `\"sign\"`, `\"verify\"`, `\"deriveKey\"`, `\"deriveBits\"`, `\"wrapKey\"`, and `\"unwrapKey\"`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/CryptoKey/prototype/algorithm.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# algorithm\n\nThe read-only **`algorithm`** property of the [`CryptoKey`](../CryptoKey.mdx) interface returns an object describing the algorithm for which this key can be used, and any associated extra parameters.\n\nThe object returned depends of the algorithm used to generate the key.\n\n## Value\n\nAn object matching:\n\n- [`RsaHashedImportParams`](../../RsaHashedImportParams/RsaHashedImportParams.mdx) if the algorithm is any of the RSA variants.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/CryptoKey/prototype/extractable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# extractable\n\nThe read-only **`extractable`** property indicates whether or not the key may be extracted.\n\nIf the key cannot be exported, an exception will be thrown if an attempt to extract the key is made.\n\n## Value\n\nA boolean value that is `true` if the key can be exported and `false` if not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/CryptoKey/prototype/type.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# type\n\nThe read-only **`type`** property indicates which kind of key is represented by the object. It can have the following values:\n\n- `\"secret\"`: This key is a secret key for use with a symmetric algorithm.\n- `\"private\"`: This key is the private half of an asymmetric algorithm's key pair.\n- `\"public\"`: This key is the public half of an asymmetric algorithm's key pair.\n\n## Value\n\nOne of the following strings: `\"secret\"`, `\"private\"`, or `\"public\"`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/CryptoKey/prototype/usages.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# usages\n\nThe read-only **`usages`** property indicates what can be done with the key.\n\n## Value\n\nAn `Array` of strings from the following list:\n\n- `\"encrypt\"`: The key may be used to encrypt messages.\n- `\"decrypt\"`: The key may be used to decrypt messages.\n- `\"sign\"`: The key may be used to sign messages.\n- `\"verify\"`: The key may be used to verify signatures.\n- `\"deriveKey\"`: The key may be used in deriving a new key.\n- `\"deriveBits\"`: The key may be used in deriving bits.\n- `\"wrapKey\"`: The key may be used to wrap a key.\n- `\"unwrapKey\"`: The key may be used to unwrap a key.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/DOMException/DOMException.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException()\n\nThe **`DOMException()`** constructor returns a `DOMException` object with a specified message and name.\n\n## Syntax\n\n```js\nnew DOMException()\nnew DOMException(message)\nnew DOMException(message, name)\n```\n\n### Parameters\n\n- `message` _optional_\n  - : A description of the exception. If not present, the empty string `''` is\n    used.\n- `name` _optional_\n  - : A string. If the specified name is a [standard error name](#error-names), then getting the [`code`](./code.mdx) property of the `DOMException` object will return the code number corresponding to the specified name.\n\n### Return value\n\nA newly created `DOMException` object.\n\n## Error names\n\nCommon error names are listed here. Some APIs define their own sets of names, so this is not necessarily a complete list.\n\nNote that the following deprecated historical errors don't have an error name but instead have only a legacy constant code value and a legacy constant name:\n\n- Legacy code value: `2`, legacy constant name: `DOMSTRING_SIZE_ERR`\n- Legacy code value: `6`, legacy constant name: `NO_DATA_ALLOWED_ERR`\n- Legacy code value: `16`, legacy constant name: `VALIDATION_ERR`\n\n> **Note:** Because historically the errors were identified by a numeric value that corresponded with a named variable defined to have that value, some of the entries below indicate the legacy code value and constant name that were used in the past.\n\n- `IndexSizeError`\n  - : The index is not in the allowed range. (Legacy code value: `1` and legacy constant name: `INDEX_SIZE_ERR`)\n- `HierarchyRequestError`\n  - : The node tree hierarchy is not correct. (Legacy code value: `3` and legacy constant name: `HIERARCHY_REQUEST_ERR`)\n- `WrongDocumentError`\n  - : The object is in the wrong `Document`. (Legacy code value: `4` and legacy constant name: `WRONG_DOCUMENT_ERR`)\n- `InvalidCharacterError`\n  - : The string contains invalid characters. (Legacy code value: `5` and legacy constant name: `INVALID_CHARACTER_ERR`)\n- `NoModificationAllowedError`\n  - : The object cannot be modified. (Legacy code value: `7` and legacy constant name: `NO_MODIFICATION_ALLOWED_ERR`)\n- `NotFoundError`\n  - : The object cannot be found here. (Legacy code value: `8` and legacy constant name: `NOT_FOUND_ERR`)\n- `NotSupportedError`\n  - : The operation is not supported. (Legacy code value: `9` and legacy constant name: `NOT_SUPPORTED_ERR`)\n- `InvalidStateError`\n  - : The object is in an invalid state. (Legacy code value: `11` and legacy constant name: `INVALID_STATE_ERR`)\n- `InUseAttributeError`\n  - : The attribute is in use. (Legacy code value: `10` and legacy constant name: `INUSE_ATTRIBUTE_ERR`)\n- `SyntaxError`\n  - : The string did not match the expected pattern. (Legacy code value: `12` and legacy constant name: `SYNTAX_ERR`)\n- `InvalidModificationError`\n  - : The object cannot be modified in this way. (Legacy code value: `13` and legacy constant name: `INVALID_MODIFICATION_ERR`)\n- `NamespaceError`\n  - : The operation is not allowed by Namespaces in XML. (Legacy code value: `14` and legacy constant name: `NAMESPACE_ERR`)\n- `InvalidAccessError`\n  - : The object does not support the operation or argument. (Legacy code value: `15` and legacy constant name: `INVALID_ACCESS_ERR`)\n- `TypeMismatchError` *deprecated*\n  - : The type of the object does not match the expected type. (Legacy code value: `17` and legacy constant name: `TYPE_MISMATCH_ERR`) This value is deprecated; the JavaScript `TypeError` exception is now raised instead of a `DOMException` with this value.\n- `SecurityError`\n  - : The operation is insecure. (Legacy code value: `18` and legacy constant name: `SECURITY_ERR`)\n- `NetworkError`\n  - : A network error occurred. (Legacy code value: `19` and legacy constant name: `NETWORK_ERR`)\n- `AbortError`\n  - : The operation was aborted. (Legacy code value: `20` and legacy constant name: `ABORT_ERR`)\n- `URLMismatchError`\n  - : The given URL does not match another URL. (Legacy code value: `21` and legacy constant name: `URL_MISMATCH_ERR`)\n- `QuotaExceededError`\n  - : The quota has been exceeded. (Legacy code value: `22` and legacy constant name: `QUOTA_EXCEEDED_ERR`)\n- `TimeoutError`\n  - : The operation timed out. (Legacy code value: `23` and legacy constant name: `TIMEOUT_ERR`)\n- `InvalidNodeTypeError`\n  - : The node is incorrect or has an incorrect ancestor for this operation. (Legacy code value: `24` and legacy constant name: `INVALID_NODE_TYPE_ERR`)\n- `DataCloneError`\n  - : The object can not be cloned. (Legacy code value: `25` and legacy constant name: `DATA_CLONE_ERR`)\n- `EncodingError`\n  - : The encoding or decoding operation failed (No legacy code value and constant name).\n- `NotReadableError`\n  - : The input/output read operation failed (No legacy code value and constant name).\n- `UnknownError`\n  - : The operation failed for an unknown transient reason (e.g. out of memory) (No legacy code value and constant name).\n- `ConstraintError`\n  - : A mutation operation in a transaction failed because a constraint was not satisfied (No legacy code value and constant name).\n- `DataError`\n  - : Provided data is inadequate (No legacy code value and constant name).\n- `TransactionInactiveError`\n  - : A request was placed against a transaction that is currently not active or is finished (No legacy code value and constant name).\n- `ReadOnlyError`\n  - : The mutating operation was attempted in a \"readonly\" transaction (No legacy code value and constant name).\n- `VersionError`\n  - : An attempt was made to open a database using a lower version than the existing version (No legacy code value and constant name).\n- `OperationError`\n  - : The operation failed for an operation-specific reason (No legacy code value and constant name).\n- `NotAllowedError`\n  - : The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission (No legacy code value and constant name)."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/DOMException/code.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException.prototype.code\n\nThe **`code`** read-only property of the `DOMException` interface returns one of the legacy [error code constants](./DOMException.mdx#error-names), or `0` if none match.\n\nThis field is used for historical reasons. New DOM exceptions don't use this anymore: they put this info in the [`name`](./name.mdx) attribute.\n\n## Value\n\nOne of the [error code constants](./DOMException.mdx#error-names), or `0` if none match.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/DOMException/message.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException.prototype.message\n\nThe **`message`** read-only property of the `DOMException` interface returns a string representing a message or description associated with the given [error name](./DOMException.mdx#error-names).\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/DOMException/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException.prototype.name\n\nThe **`name`** read-only property of the `DOMException` interface returns a string that contains one of the strings associated with an [error name](./DOMException.mdx#error-names).\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/DataView/DataView.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView()\n\nThe **`DataView()`** constructor is used to create `DataView` objects.\n\n## Syntax\n\n```js\nnew DataView(buffer)\nnew DataView(buffer, byteOffset)\nnew DataView(buffer, byteOffset, byteLength)\n```\n\n> **Note:** `DataView()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `buffer`\n  - : An existing `ArrayBuffer` to use as\n    the storage backing the new `DataView` object.\n- `byteOffset` _**optional**_\n  - : The offset, in bytes, to the first byte in the above buffer for the new view to\n    reference. If unspecified, the buffer view starts with the first byte.\n- `byteLength` _**optional**_\n  - : The number of elements in the byte array. If unspecified, the view's length will\n    match the buffer's length.\n\n### Return value\n\nA new `DataView` object representing the specified data buffer.\n\n### Exceptions\n\n- [`RangeError`](../RangeError/RangeError.mdx)\n\n  - : Thrown if the `byteOffset` or `byteLength` parameter values\n    result in the view extending past the end of the buffer.\n\n    For example, if the buffer is 16 bytes long, the `byteOffset` is 8, and\n    the `byteLength` is 10, this error is thrown because the resulting view\n    tries to extend 2 bytes past the total length of the buffer.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/DataView/prototype/buffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.buffer\n\nThe **`buffer`** accessor property represents the `ArrayBuffer` referenced by the `DataView` at construction time.\n\n## Description\n\nThe `buffer` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when the `DataView` is constructed and cannot be changed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/DataView/prototype/byteLength.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.byteLength\n\nThe **`byteLength`** accessor property represents the length (in bytes) of the dataview.\n\n## Description\n\nThe `byteLength` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when an `DataView` is constructed and cannot be changed. If the `DataView` is not specifying an offset or a `byteLength`, the `byteLength` of the referenced `ArrayBuffer` or `SharedArrayBuffer` will be returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/DataView/prototype/byteOffset.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.byteOffset\n\nThe **`byteOffset`** accessor property represents the offset (in bytes) of this view from the start of its `ArrayBuffer`.\n\n## Description\n\nThe `byteOffset` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when an `DataView` is constructed and cannot be changed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/DataView/prototype/getBigInt64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getBigInt64()\n\nThe **`getBigInt64()`** method gets a signed 64-bit integer\n(long long) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetBigInt64(byteOffset)\ngetBigInt64(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to read the data from.\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is read.\n\n### Return value\n\nA `BigInt`.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would read beyond the end\n    of the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/DataView/prototype/getBigUint64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getBigUint64()\n\nThe **`getBigUint64()`** method gets an unsigned 64-bit integer\n(unsigned long long) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetBigUint64(byteOffset)\ngetBigUint64(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to read the data from.\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is read.\n\n### Return value\n\nA `BigInt`.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would read beyond the end\n    of the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/DataView/prototype/getFloat32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getFloat32()\n\nThe **`getFloat32()`** method gets a signed 32-bit float\n(float) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetFloat32(byteOffset)\ngetFloat32(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 32-bit float number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/DataView/prototype/getFloat64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getFloat64()\n\nThe **`getFloat64()`** method gets a signed 64-bit float\n(double) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetFloat64(byteOffset)\ngetFloat64(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 64-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 64-bit float number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/DataView/prototype/getInt16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getInt16()\n\nThe **`getInt16()`** method gets a signed 16-bit integer\n(short) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetInt16(byteOffset)\ngetInt16(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 16-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/DataView/prototype/getInt32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getInt32()\n\nThe **`getInt32()`** method gets a signed 32-bit integer (long)\nat the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetInt32(byteOffset)\ngetInt32(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in bytes, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 32-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/DataView/prototype/getInt8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getInt8()\n\nThe **`getInt8()`** method gets a signed 8-bit integer (byte)\nat the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetInt8(byteOffset)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n\n### Return value\n\nA signed 8-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/DataView/prototype/getUint16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getUint16()\n\nThe **`getUint16()`** method gets an unsigned 16-bit integer\n(unsigned short) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n\n\n## Syntax\n\n```js\ngetUint16(byteOffset)\ngetUint16(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nAn unsigned 16-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/DataView/prototype/getUint32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getUint32()\n\nThe **`getUint32()`** method gets an unsigned 32-bit integer\n(unsigned long) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n\n\n## Syntax\n\n```js\ngetUint32(byteOffset)\ngetUint32(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nAn unsigned 32-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/DataView/prototype/getUint8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getUint8()\n\nThe **`getUint8()`** method gets an unsigned 8-bit integer\n(unsigned byte) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetUint8(byteOffset)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n\n### Return value\n\nAn unsigned 8-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/DataView/prototype/setBigInt64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setBigInt64()\n\nThe **`setBigInt64()`** method stores a signed 64-bit integer\n(long long) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetBigInt64(byteOffset, value)\nsetBigInt64(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to store the data from.\n- value\n  - : The value to set as a `BigInt`. The highest possible value that fits in\n    a signed 64-bit integer is\n    `2n ** (64n -1n) - 1n` (`9223372036854775807n`). Upon\n    overflow, it will be negative (`-9223372036854775808n`).\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/DataView/prototype/setBigUint64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setBigUint64()\n\nThe **`setBigUint64()`** method stores an unsigned 64-bit\ninteger (unsigned long long) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetBigUint64(byteOffset, value)\nsetBigUint64(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to store the data from.\n- value\n  - : The value to set as a `BigInt`. The highest possible value that fits in\n    an unsigned 64-bit integer is\n    `2n ** 64n - 1n`\n    (`18446744073709551615n`). Upon overflow, it will be zero\n    (`0n`).\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/DataView/prototype/setFloat32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setFloat32()\n\nThe **`setFloat32()`** method stores a signed 32-bit float\n(float) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetFloat32(byteOffset, value)\nsetFloat32(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/DataView/prototype/setFloat64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setFloat64()\n\nThe **`setFloat64()`** method stores a signed 64-bit float\n(double) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetFloat64(byteOffset, value)\nsetFloat64(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 64-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/DataView/prototype/setInt16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setInt16()\n\nThe **`setInt16()`** method stores a signed 16-bit integer\n(short) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetInt16(byteOffset, value)\nsetInt16(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/DataView/prototype/setInt32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setInt32()\n\nThe **`setInt32()`** method stores a signed 32-bit integer\n(long) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetInt32(byteOffset, value)\nsetInt32(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/DataView/prototype/setInt8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setInt8()\n\nThe **`setInt8()`** method stores a signed 8-bit integer (byte)\nvalue at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetInt8(byteOffset, value)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/DataView/prototype/setUint16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setUint16()\n\nThe **`setUint16()`** method stores an unsigned 16-bit integer\n(unsigned short) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetUint16(byteOffset, value)\nsetUint16(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/DataView/prototype/setUint32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setUint32()\n\nThe **`setUint32()`** method stores an unsigned 32-bit integer\n(unsigned long) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetUint32(byteOffset, value)\nsetUint32(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/DataView/prototype/setUint8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setUint8()\n\nThe **`setUint8()`** method stores an unsigned 8-bit integer\n(byte) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetUint8(byteOffset, value)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/Date.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date()\n\nThe **`Date()`** constructor can create a `Date` instance or return a string representing the current time.\n\n## Syntax\n\n```js\nnew Date()\nnew Date(value)\nnew Date(dateString)\nnew Date(dateObject)\n\nnew Date(year, monthIndex)\nnew Date(year, monthIndex, day)\nnew Date(year, monthIndex, day, hours)\nnew Date(year, monthIndex, day, hours, minutes)\nnew Date(year, monthIndex, day, hours, minutes, seconds)\nnew Date(year, monthIndex, day, hours, minutes, seconds, milliseconds)\n\nDate()\n```\n\n> **Note:** `Date()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\nThere are five basic forms for the `Date()` constructor:\n\n#### No parameters\n\nWhen no parameters are provided, the newly-created `Date` object represents the current date and time as of the time of instantiation.\n\n#### Time value or timestamp number\n\n- `value`\n  - : An integer value representing the number of milliseconds since January 1, 1970, 00:00:00 UTC (the ECMAScript epoch, equivalent to the UNIX epoch), with leap seconds ignored. Keep in mind that most [UNIX Timestamp](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_16) functions are only accurate to the nearest second.\n\n#### Date string\n\n- `dateString`\n\n  - : A string value representing a date, in a format recognized by the [`Date.parse()`](./parse.mdx) method. (The ECMA262 spec specifies a [simplified version of ISO 8601](https://tc39.es/ecma262/#sec-date-time-string-format), but other formats can be implementation-defined, which commonly include [IETF-compliant RFC 2822 timestamps](https://datatracker.ietf.org/doc/html/rfc2822#page-14).)\n\n    > **Note:** When parsing date strings with the `Date` constructor (and `Date.parse`, they are equivalent), always make sure that the input conforms to the ISO 8601 format (`YYYY-MM-DDTHH:mm:ss.sssZ`) — the parsing behavior with other formats is implementation-defined and may not work across all browsers. Support for [RFC 2822](https://datatracker.ietf.org/doc/html/rfc2822) format strings is by convention only. A library can help if many different formats are to be accommodated.\n    >\n    > Date-only strings (e.g. `\"1970-01-01\"`) are treated as UTC, while date-time strings (e.g. `\"1970-01-01T12:00\"`) are treated as local. You are therefore also advised to make sure the input format is consistent between the two types.\n\n#### Date object\n\n- `dateObject`\n  - : An existing `Date` object. This effectively makes a copy of the existing `Date` object with the same date and time. This is equivalent to `new Date(dateObject.valueOf())`, except the `valueOf()` method is not called.\n\nWhen one parameter is passed to the `Date()` constructor, `Date` instances are specially treated. All other values are [converted to primitives](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion). If the result is a string, it will be parsed as a date string. Otherwise, the resulting primitive is further coerced to a number and treated as a timestamp.\n\n#### Individual date and time component values\n\nGiven at least a year and month, this form of `Date()` returns a `Date` object whose component values (year, month, day, hour, minute, second, and millisecond) all come from the following parameters. Any missing fields are given the lowest possible value (`1` for `day` and `0` for every other component). The parameter values are all evaluated against the local time zone, rather than UTC.\n\nIf any parameter overflows its defined bounds, it \"carries over\". For example, if a `monthIndex` greater than `11` is passed in, those months will cause the year to increment; if a `minutes` greater than `59` is passed in, `hours` will increment accordingly, etc. Therefore, `new Date(1990, 12, 1)` will return January 1st, 1991; `new Date(2020, 5, 19, 25, 65)` will return 2:05 A.M. June 20th, 2020.\n\nSimilarly, if any parameter underflows, it \"borrows\" from the higher positions. For example, `new Date(2020, 5, 0)` will return May 31st, 2020.\n\n- `year`\n  - : Integer value representing the year. Values from `0` to `99` map to the years `1900` to `1999`. All other values are the actual year. See the [example](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years).\n- `monthIndex`\n  - : Integer value representing the month, beginning with `0` for January to `11` for December.\n- `day` _**optional**_\n  - : Integer value representing the day of the month. The default is `1`.\n- `hours` _**optional**_\n  - : Integer value between `0` and `23` representing the hour of the day. Defaults to `0`.\n- `minutes` _**optional**_\n  - : Integer value representing the minute segment of a time. The default is `0` minutes past the hour.\n- `seconds` _**optional**_\n  - : Integer value representing the second segment of a time. The default is `0` seconds past the minute.\n- `milliseconds` _**optional**_\n  - : Integer value representing the millisecond segment of a time. The default is `0` milliseconds past the second.\n\n### Return value\n\nCalling `new Date()` (the `Date()` constructor) returns a [`Date`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date) object. If called with an invalid date string, or if the date to be constructed will have a UNIX timestamp less than `-8,640,000,000,000,000` or greater than `8,640,000,000,000,000` milliseconds, it returns a `Date` object whose [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toString) method returns the literal string `Invalid Date`.\n\nCalling the `Date()` function (without the `new` keyword) returns a string representation of the current date and time, exactly as `new Date().toString()` does. Any arguments given in a `Date()` function call (without the `new` keyword) are ignored; regardless of whether it's called with an invalid date string — or even called with any arbitrary object or other primitive as an argument — it always returns a string representation of the current date and time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/UTC.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.UTC()\n\nThe **`Date.UTC()`** method accepts parameters similar to the\n`Date` constructor, but treats them as UTC. It returns the number of\nmilliseconds since January 1, 1970, 00:00:00 UTC.\n\n\n\n## Syntax\n\n```js\nDate.UTC(year)\nDate.UTC(year, monthIndex)\nDate.UTC(year, monthIndex, day)\nDate.UTC(year, monthIndex, day, hour)\nDate.UTC(year, monthIndex, day, hour, minute)\nDate.UTC(year, monthIndex, day, hour, minute, second)\nDate.UTC(year, monthIndex, day, hour, minute, second, millisecond)\n```\n\n- `year`\n\n  - : Integer value representing the year.\n\n    Values from `0` to `99` map to the years\n    `1900` to `1999`. All other values are the actual year.\n    See the [example](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years).\n\n- `monthIndex` _**optional**_\n  - : An integer between `0` (January) and `11` (December)\n    representing the month. Since ECMAScript 2017 it defaults to `0` if\n    omitted. _(Up until ECMAScript 2016, `monthIndex` was a required\n    parameter. As of ES2017, it no longer is.)_\n- `day` _**optional**_\n  - : An integer between `1` and `31` representing the day of the\n    month. If omitted, defaults to `1`.\n- `hour` _**optional**_\n  - : An integer between `0` and `23` representing the hours. If\n    omitted, defaults to `0`.\n- `minute` _**optional**_\n  - : An integer between `0` and `59` representing the minutes. If\n    omitted, defaults to `0`.\n- `second` _**optional**_\n  - : An integer between `0` and `59` representing the seconds. If\n    omitted, defaults to `0`.\n- `millisecond` _**optional**_\n  - : An integer between `0` and `999` representing the\n    milliseconds. If omitted, defaults to `0`.\n\n### Return value\n\nA number representing the number of milliseconds for the given date since January 1,\n1970, 00:00:00, UTC.\n\n## Description\n\n`UTC()` takes comma-delimited date and time parameters and returns the\nnumber of milliseconds between January 1, 1970, 00:00:00, universal time and the\nspecified date and time.\n\nYears between `0` and `99` are converted to a year in the\n20th century `(1900 + year)`. For example, `95` is\nconverted to the year `1995`.\n\nThe `UTC()` method differs from the `Date` constructor in two\nways:\n\n1. `Date.UTC()` uses universal time instead of the local time.\n2. `Date.UTC()` returns a time value as a number instead of creating a\n   `Date` object.\n\nIf a parameter is outside of the expected range, the `UTC()` method updates\nthe other parameters to accommodate the value. For example, if `15` is used\nfor `monthIndex`, the year will be incremented by 1\n`(year + 1)` and `3` will be used for the month.\n\n`UTC()` is a static method of `Date`, so it's called as\n`Date.UTC()` rather than as a method of a `Date` instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/now.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.now()\n\nThe static **`Date.now()`** method returns the number of milliseconds elapsed since the [epoch](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps), which is defined as the midnight at the beginning of January 1, 1970, UTC.\n\n## Syntax\n\n```js\nDate.now()\n```\n\n### Return value\n\nA number representing the number of milliseconds elapsed since the [epoch](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps), which is defined as the midnight at the beginning of January 1, 1970, UTC.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/parse.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.parse()\n\nThe **`Date.parse()`** method parses a string representation of\na date, and returns the number of milliseconds since January 1, 1970, 00:00:00 UTC or\n`NaN` if the string is unrecognized or, in some cases, contains illegal date\nvalues (e.g. 2015-02-31).\n\nOnly the [ISO 8601 format](https://tc39.es/ecma262/#sec-date-time-string-format) (`YYYY-MM-DDTHH:mm:ss.sssZ`) is explicitly specified to be supported. Other formats are implementation-defined and may not work across all browsers. A library can help if many different formats are to be accommodated.\n\n## Syntax\n\n```js\nDate.parse(dateString)\n```\n\n### Parameters\n\n- `dateString`\n  - : A string representing [a simplification of the ISO 8601 calendar date extended format](#date-time-string-format).\n    (Other formats may be used, but results are implementation-dependent.)\n\n### Return value\n\nA number representing the milliseconds elapsed since January 1, 1970, 00:00:00 UTC and\nthe date obtained by parsing the given string representation of a date. If the argument\ndoesn't represent a valid date, [`NaN`](../NaN.mdx) is returned.\n\n## Description\n\nThe `parse()` method takes a date string (such as\n`\"2011-10-10T14:48:00\"`) and returns the number of milliseconds since January\n1, 1970, 00:00:00 UTC.\n\nThis function is useful for setting date values based on string values, for example in\nconjunction with the [`setTime()`](./prototype/setTime.mdx) method and the\n`Date` object.\n\n### Date Time String Format\n\nThe standard string representation of a date time string is a simplification of the ISO\n8601 calendar date extended format.\n(See the section [Date Time String Format](https://tc39.es/ecma262/#sec-date-time-string-format)\nin the ECMAScript specification for more details.)\n\nFor example, `\"2011-10-10\"` (_date-only_ form),\n`\"2011-10-10T14:48:00\"` (_date-time_ form), or\n`\"2011-10-10T14:48:00.000+09:00\"` (_date-time_ form with milliseconds\nand time zone) can be passed and will be parsed. When the time zone offset is absent,\ndate-only forms are interpreted as a UTC time and date-time forms are interpreted as\nlocal time.\n\nWhile time zone specifiers are used during date string parsing to interpret the\nargument, the value returned is always the number of milliseconds between January 1,\n1970 00:00:00 UTC and the point in time represented by the argument or `NaN`.\n\nBecause `parse()` is a static method of `Date`, it is called as\n`Date.parse()` rather than as a method of a `Date` instance.\n\n### Fall-back to implementation-specific date formats\n\n> **Note:** This section contains implementation-specific behavior that can be inconsistent\n> across implementations.\n\nThe ECMAScript specification states: If the String does not conform to the standard\nformat the function may fall back to any implementation–specific heuristics or\nimplementation–specific parsing algorithm. Unrecognizable strings or dates containing\nillegal element values in ISO formatted strings shall cause `Date.parse()` to\nreturn [`NaN`](../NaN.mdx).\n\nHowever, invalid values in date strings not recognized as simplified ISO format as\ndefined by ECMA-262 may or may not result in [`NaN`](../NaN.mdx), depending on the browser\nand values provided, e.g.:\n\n```js\n// Non-ISO string with invalid date values\nnew Date(\"23/25/2014\");\n```\n\nwill be treated as a local date of 25 November, 2015 in Firefox 30 and an invalid date\nin Safari 7.\n\nHowever, if the string is recognized as an ISO format string and it contains invalid\nvalues, it will return [`NaN`](../NaN.mdx):\n\n```js\n// ISO string with invalid values\nnew Date(\"2014-25-23\").toISOString();\n// throws \"RangeError: invalid date\"\n```\n\nSpiderMonkey's implementation-specific heuristic can be found in [`jsdate.cpp`](https://searchfox.org/mozilla-central/source/js/src/jsdate.cpp?rev=64553c483cd1#889).\nThe string `\"10 06 2014\"` is an example of a non-conforming ISO format and\nthus falls back to a custom routine. See also this [rough outline](https://bugzilla.mozilla.org/show_bug.cgi?id=1023155#c6) on\nhow the parsing works.\n\n```js\nnew Date(\"10 06 2014\");\n```\n\nwill be treated as a local date of 6 October, 2014, and not 10 June, 2014.\n\nOther examples:\n\n```js\nnew Date(\"foo-bar 2014\").toString();\n// returns: \"Invalid Date\"\n\nDate.parse(\"foo-bar 2014\");\n// returns: NaN\n```\n\n### Differences in assumed time zone\n\n> **Note:** This section contains implementation-specific behavior that can be inconsistent\n> across implementations.\n\nGiven a non-standard date string of `\"March 7, 2014\"`, `parse()` assumes a local time zone, but given a simplification of the ISO 8601 calendar date extended format such as `\"2014-03-07\"`, it will assume a time zone of UTC. Therefore `Date` objects produced using those strings may represent different moments in time depending on the version of ECMAScript supported unless the system is set with a local time zone of UTC. This means that two date strings that appear equivalent may result in two different values depending on the format of the string that is being converted.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/@@toPrimitive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype\\[Symbol.toPrimitive]\n\nThe **`[Symbol.toPrimitive]()`** method converts a `Date`\nobject to a primitive value.\n\n## Syntax\n\n```js\nDate()[Symbol.toPrimitive](hint)\n```\n\n### Return value\n\nThe primitive value of the given `Date` object. Depending on the argument,\nthe method can return either a string or a number.\n\n## Description\n\nThe `[Symbol.toPrimitive]()` method of the `Date` object returns a\nprimitive value, that is either of type number or of type string.\n\nIf `hint` is `string` or `default`,\n`[Symbol.toPrimitive]()` tries to call the [`toString`](../../Object/prototype/toString.mdx) method. If the `toString` property does not exist, it tries to\ncall the [`valueOf`](../../Object/prototype/valueOf.mdx) method and if the\n`valueOf` does not exist either, `[Symbol.toPrimitive]()` throws a\n[`TypeError`](../../../globals/TypeError/TypeError.mdx).\n\nIf `hint` is `number`, `[Symbol.toPrimitive]()` first tries\nto call `valueOf`, and if that fails, it calls `toString`.\n\nJavaScript calls the `[Symbol.toPrimitive]()` method to convert an object to a\nprimitive value. You rarely need to invoke the `[Symbol.toPrimitive]()` method\nyourself; JavaScript automatically invokes it when encountering an object where a\nprimitive value is expected.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/getDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getDate()\n\nThe **`getDate()`** method returns the day of the month for the\nspecified date according to local time.\n\n## Syntax\n\n```js\ngetDate()\n```\n\n### Return value\n\nAn integer number, between 1 and 31, representing the day of the month for the given\ndate according to local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/getDay.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getDay()\n\nThe **`getDay()`** method returns the\nday of the week for the specified date according to local time, where 0 represents\nSunday. For the day of the month, see [`Date.prototype.getDate()`](./getDate.mdx).\n\n## Syntax\n\n```js\ngetDay()\n```\n\n### Return value\n\nAn integer number, between 0 and 6, corresponding to the day of the week for the given\ndate, according to local time: 0 for Sunday, 1 for Monday, 2 for Tuesday, and so on.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/getFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getFullYear()\n\nThe **`getFullYear()`** method returns the year of the\nspecified date according to local time.\n\nUse this method instead of the [`Date.prototype.getYear()`](./getYear.mdx) method.\n\n## Syntax\n\n```js\ngetFullYear()\n```\n\n### Return value\n\nA number corresponding to the year of the given date, according to local time.\n\n## Description\n\nThe value returned by `getFullYear()` is an absolute number. For dates\nbetween the years 1000 and 9999, `getFullYear()` returns a four-digit number,\nfor example, 1995. Use this function to make sure a year is compliant with years after\n2000\\.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/getHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getHours()\n\nThe **`getHours()`** method returns the hour for the specified\ndate, according to local time.\n\n## Syntax\n\n```js\ngetHours()\n```\n\n### Return value\n\nAn integer number, between 0 and 23, representing the hour for the given date according\nto local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/getMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getMilliseconds()\n\nThe **`getMilliseconds()`** method returns the milliseconds in\nthe specified date according to local time.\n\n## Syntax\n\n```js\ngetMilliseconds()\n```\n\n### Return value\n\nA number, between 0 and 999, representing the milliseconds for the given date according\nto local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/getMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getMinutes()\n\nThe **`getMinutes()`** method returns the minutes in the\nspecified date according to local time.\n\n## Syntax\n\n```js\ngetMinutes()\n```\n\n### Return value\n\nAn integer number, between 0 and 59, representing the minutes in the given date\naccording to local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/getMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getMonth()\n\nThe **`getMonth()`** method returns the month in the specified\ndate according to local time, as a zero-based value (where zero indicates the first\nmonth of the year).\n\n## Syntax\n\n```js\ngetMonth()\n```\n\n### Return value\n\nAn integer number, between 0 and 11, representing the month in the given date according\nto local time. 0 corresponds to January, 1 to February, and so on.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/getSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getSeconds()\n\nThe **`getSeconds()`** method returns the seconds in the\nspecified date according to local time.\n\n## Syntax\n\n```js\ngetSeconds()\n```\n\n### Return value\n\nAn integer number, between 0 and 59, representing the seconds in the given date\naccording to local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/getTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getTime()\n\nThe **`getTime()`** method returns the number of milliseconds since the [epoch](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps), which is defined as the midnight at the beginning of January 1, 1970, UTC.\n\nYou can use this method to help assign a date and time to another `Date`\nobject. This method is functionally equivalent to the [`Date.prototype.valueOf()`](./valueOf.mdx) method.\n\n## Syntax\n\n```js\ngetTime()\n```\n\n### Return value\n\nA number representing the milliseconds elapsed between 1 January 1970 00:00:00 UTC and\nthe given date.\n\n## Description\n\nTo offer protection against timing attacks and fingerprinting, the precision of\n`new Date().getTime()` might get rounded depending on browser settings.\n\n```js\n// reduced time precision (2ms) in Firefox 60\nnew Date().getTime();\n// 1519211809934\n// 1519211810362\n// 1519211811670\n// …\n\n// reduced time precision with `privacy.resistFingerprinting` enabled\nnew Date().getTime();\n// 1519129853500\n// 1519129858900\n// 1519129864400\n// …\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/getTimezoneOffset.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getTimezoneOffset()\n\nThe **`getTimezoneOffset()`** method returns the difference, in minutes, between a date as evaluated in the UTC time zone, and the same date as evaluated in the local time zone.\n\n## Syntax\n\n```js\ngetTimezoneOffset()\n```\n\n### Return value\n\nThe difference, in minutes, between the date as evaluated in the UTC time zone and as evaluated in the local time zone. The actual local time algorithm is implementation-defined, and the return value is allowed to be zero in runtimes without appropriate data.\n\n## Description\n\n`date.getTimezoneOffset()` returns the difference, in minutes, between `date` as evaluated in the UTC time zone and as evaluated in the local time zone — that is, the time zone of the host system in which the browser is being used (if the code is run from the Web in a browser), or otherwise the host system of whatever JavaScript runtime (for example, a Node.js environment) the code is executed in.\n\n### Negative values and positive values\n\nThe number of minutes returned by `getTimezoneOffset()` is positive if the local time zone is behind UTC, and negative if the local time zone is ahead of UTC. For example, for UTC+10, `-600` will be returned.\n\n| Current time zone | Return value |\n| ----------------- | ------------ |\n| UTC-8             | 480          |\n| UTC               | 0            |\n| UTC+3             | -180         |\n\n### Varied results in Daylight Saving Time (DST) regions\n\nIn a region that annually shifts in and out of Daylight Saving Time (DST), as `date` varies, the number of minutes returned by calling `getTimezoneOffset()` can be non-uniform.\n\n> **Note:** `getTimezoneOffset()`'s behavior will never differ based on the time when the code is run — its behavior is always consistent when running in the same region. Only the value of `date` affects the result.\n\nIn most implementations, the [IANA time zone database](https://en.wikipedia.org/wiki/Daylight_saving_time#IANA_time_zone_database) (tzdata) is used to precisely determine the offset of the local timezone at the moment of the `date`. However, if such information is unavailable, an implementation may return zero.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/getUTCDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCDate()\n\nThe **`getUTCDate()`** method returns the day of the month (from\n1 to 31) in the specified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCDate()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer number ranging from 1 to 31\nrepresenting day of month for the given date, according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/getUTCDay.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCDay()\n\nThe **`getUTCDay()`** method returns the day of the week in the\nspecified date according to universal time, where 0 represents Sunday.\n\n## Syntax\n\n```js\ngetUTCDay()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer number corresponding to the day\nof the week for the given date, according to universal time: 0 for Sunday, 1 for Monday,\n2 for Tuesday, and so on.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/getUTCFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCFullYear()\n\nThe **`getUTCFullYear()`** method returns the year in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCFullYear()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer representing the year in the given date\naccording to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n\n## Description\n\nThe value returned by `getUTCFullYear()` is an absolute number that is\ncompliant with year-2000, for example, 1995.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/getUTCHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCHours()\n\nThe **`getUTCHours()`** method returns the hours in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCHours()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 23, representing the hours in the given date according\nto Coordinated Universal Time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/getUTCMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCMilliseconds()\n\nThe **`getUTCMilliseconds()`** method returns the milliseconds\nportion of the time object's value according to universal time.\n\n## Syntax\n\n```js\ngetUTCMilliseconds()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 999, representing\nthe milliseconds portion of the given `Date` object according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n\nNot to be confused with Unix epoch time. To get the total milliseconds since 1970/01/01,\nuse the [`getTime()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/getTime) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/getUTCMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCMinutes()\n\nThe **`getUTCMinutes()`** method returns the minutes in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCMinutes()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 59,\nrepresenting the minutes in the given date according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/getUTCMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCMonth()\n\nThe **`getUTCMonth()`** returns the month of the specified date\naccording to universal time, as a zero-based value (where zero indicates the first month\nof the year).\n\n## Syntax\n\n```js\ngetUTCMonth()\n```\n\n### Return value\n\nA number. If the `Date` object represents a valid date, an integer number, between 0 and 11,\ncorresponding to the month of the given date according to universal time. 0 for January,\n1 for February, 2 for March, and so on. Otherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/getUTCSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCSeconds()\n\nThe **`getUTCSeconds()`** method returns the seconds in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCSeconds()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 59, representing\nthe seconds in the given date according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/getYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getYear()\n\nThe **`getYear()`** method returns the year in the specified\ndate according to local time. Because `getYear()` does not return full years\n(\"year 2000 problem\"), it is no longer used and has been replaced by the\n[`Date.prototype.getFullYear()`](./getFullYear.mdx) method.\n\n## Syntax\n\n```js\ngetYear()\n```\n\n### Return value\n\nA number representing the year of the given date, according to local time, minus 1900.\n\n## Description\n\n- For years greater than or equal to 2000, the value returned by\n  `getYear()` is 100 or greater. For example, if the year is 2026,\n  `getYear()` returns 126.\n- For years between and including 1900 and 1999, the value returned by\n  `getYear()` is between 0 and 99. For example, if the year is 1976,\n  `getYear()` returns 76.\n- For years less than 1900, the value returned by `getYear()` is less than 0. For example, if the year is 1800, `getYear()` returns -100.\n\nTo take into account years before and after 2000, you should use\n[`Date.prototype.getFullYear()`](./getFullYear.mdx) instead of\n`getYear()` so that the year is specified in full.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/setDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setDate()\n\nThe **`setDate()`** method changes the day of the month of a given `Date` instance, based on local time.\n\nTo instead change the day of the month for a given `Date` instance based on UTC time, use the [`Date.prototype.setUTCDate()`](./setUTCDate.mdx) method.\n\n## Syntax\n\n```js\nsetDate(dayValue)\n```\n\n### Parameters\n\n- `dayValue`\n  - : An integer representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the given date (the\n`Date` object is also changed in place).\n\n## Description\n\nIf the `dayValue` is outside of the range of date values for the month, `setDate()` will update the `Date` object accordingly.\n\nFor example, if 0 is provided for `dayValue`, the date will be set to the last day of the previous month. If you use 40 for `dayValue`, and the month stored in the `Date` object is June, the day will be changed to 10 and the month will be incremented to July.\n\nIf a negative number is provided for `dayValue`, the date will be set counting backwards from the last day of the previous month. -1 would result in the date being set to 1 day before the last day of the previous month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/setFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setFullYear()\n\nThe **`setFullYear()`** method sets the full year for a\nspecified date according to local time. Returns new timestamp.\n\n## Syntax\n\n```js\nsetFullYear(yearValue)\nsetFullYear(yearValue, monthValue)\nsetFullYear(yearValue, monthValue, dateValue)\n```\n\n### Parameters\n\n- `yearValue`\n  - : An integer specifying the numeric value of the year, for example, 1995.\n- `monthValue`\n  - : Optional. An integer between 0 and 11 representing the months January through\n    December.\n- `dateValue`\n  - : Optional. An integer between 1 and 31 representing the day of the month. If you\n    specify the `dateValue` parameter, you must also specify the\n    `monthValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `monthValue` and\n`dateValue` parameters, the values returned from the\n[`Date.prototype.getMonth()`](./getMonth.mdx) and\n[`Date.prototype.getDate()`](./getDate.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range, `setFullYear()`\nattempts to update the other parameters and the date information in the\n`Date` object accordingly. For example, if you specify 15 for\n`monthValue`, the year is incremented by 1\n(`yearValue + 1`), and 3 is used for the month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/setHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setHours()\n\nThe **`setHours()`** method sets the hours for a specified date\naccording to local time, and returns the number of milliseconds since January 1, 1970\n00:00:00 UTC until the time represented by the updated `Date` instance.\n\n## Syntax\n\n```js\nsetHours(hoursValue)\nsetHours(hoursValue, minutesValue)\nsetHours(hoursValue, minutesValue, secondsValue)\nsetHours(hoursValue, minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `hoursValue`\n  - : Ideally, an integer between 0 and 23, representing the hour. If a value greater than\n    23 is provided, the datetime will be incremented by the extra hours.\n- `minutesValue`\n  - : Optional. Ideally, an integer between 0 and 59, representing the minutes. If a value\n    greater than 59 is provided, the datetime will be incremented by the extra minutes.\n- `secondsValue`\n  - : Optional. Ideally, an integer between 0 and 59, representing the seconds. If a value\n    greater than 59 is provided, the datetime will be incremented by the extra seconds. If\n    you specify the `secondsValue` parameter, you must also specify\n    the `minutesValue`.\n- `msValue`\n  - : Optional. Ideally, a number between 0 and 999, representing the milliseconds. If a\n    value greater than 999 is provided, the datetime will be incremented by the extra\n    milliseconds. If you specify the `msValue` parameter, you must\n    also specify the `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between January 1, 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `minutesValue`,\n`secondsValue`, and `msValue` parameters,\nthe values returned from the [`Date.prototype.getMinutes()`](./getMinutes.mdx),\n[`Date.prototype.getSeconds()`](./getSeconds.mdx), and\n[`Date.prototype.getMilliseconds()`](./getMilliseconds.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range, `setHours()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes will\nbe incremented by 1 (`minutesValue + 1`), and 40 will be used for\nseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/setMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setMilliseconds()\n\nThe **`setMilliseconds()`** method sets the milliseconds for a\nspecified date according to local time.\n\n## Syntax\n\n```js\nsetMilliseconds(millisecondsValue)\n```\n\n### Parameters\n\n- `millisecondsValue`\n  - : A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you specify a number outside the expected range, the date information in the\n`Date` object is updated accordingly. For example, if you specify 1005, the\nnumber of seconds is incremented by 1, and 5 is used for the milliseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/setMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setMinutes()\n\nThe **`setMinutes()`** method sets the minutes for a specified\ndate according to local time.\n\n## Syntax\n\n```js\nsetMinutes(minutesValue)\nsetMinutes(minutesValue, secondsValue)\nsetMinutes(minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `minutesValue`\n  - : An integer between 0 and 59, representing the minutes.\n- `secondsValue`\n  - : Optional. An integer between 0 and 59, representing the seconds. If you specify the\n    `secondsValue` parameter, you must also specify the\n    `minutesValue`.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds. If you specify\n    the `msValue` parameter, you must also specify the\n    `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `secondsValue` and\n`msValue` parameters, the values returned from\n[`Date.prototype.getSeconds()`](./getSeconds.mdx) and\n[`Date.prototype.getMilliseconds()`](./getMilliseconds.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range, `setMinutes()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes will\nbe incremented by 1 (`minutesValue + 1`), and 40 will be used for\nseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/setMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setMonth()\n\nThe **`setMonth()`** method sets the month for a specified date according to the currently set year.\n\n## Syntax\n\n```js\nsetMonth(monthValue)\nsetMonth(monthValue, dayValue)\n```\n\n### Parameters\n\n- `monthValue`\n  - : A zero-based integer representing the month of the year offset from the start of the\n    year. So, 0 represents January, 11 represents December, -1 represents December of the\n    previous year, and 12 represents January of the following year.\n- `dayValue`\n  - : Optional. An integer from 1 to 31, representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `dayValue` parameter, the value\nreturned from the [`Date.prototype.getDate()`](./getDate.mdx) method is used.\n\nIf a parameter you specify is outside of the expected range, `setMonth()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 15 for `monthValue`, the year will be\nincremented by 1, and 3 will be used for month.\n\nThe current day of month will have an impact on the behavior of this method.\nConceptually it will add the number of days given by the current day of the month to the\n1st day of the new month specified as the parameter, to return the new date.\nFor example, if the current value is 31st January 2016, calling setMonth with a value of 1 will return 2nd March 2016.\nThis is because in 2016 February had 29 days.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/setSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setSeconds()\n\nThe **`setSeconds()`** method sets the seconds for a specified\ndate according to local time.\n\n## Syntax\n\n```js\nsetSeconds(secondsValue)\nsetSeconds(secondsValue, msValue)\n```\n\n### Parameters\n\n- `secondsValue`\n  - : An integer between 0 and 59, representing the seconds.\n- `msValue` _**optional**_\n  - : Optional. A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `msValue` parameter, the value returned\nfrom the [`Date.prototype.getMilliseconds()`](./getMilliseconds.mdx) method is\nused.\n\nIf a parameter you specify is outside of the expected range, `setSeconds()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes stored\nin the `Date` object will be incremented by 1, and 40 will be used for\nseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/setTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setTime()\n\nThe **`setTime()`** method sets the `Date` object\nto the time represented by a number of milliseconds since January 1, 1970, 00:00:00 UTC.\n\n## Syntax\n\n```js\nsetTime(timeValue)\n```\n\n### Parameters\n\n- `timeValue`\n  - : An integer representing the number of milliseconds since 1 January 1970, 00:00:00\n    UTC.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date\n(effectively, the value of the argument).\n\n## Description\n\nUse the `setTime()` method to help assign a date and time to another\n`Date` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/setUTCDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCDate()\n\nThe **`setUTCDate()`** method changes the day of the month of a given `Date` instance, based on UTC time.\n\nTo instead change the day of the month for a given `Date` instance based on local time, use the [`Date.prototype.setDate()`](././setDate.mdx) method.\n\n## Syntax\n\n```js\nsetUTCDate(dayValue)\n```\n\n### Parameters\n\n- `dayValue`\n  - : An integer from 1 to 31, representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf the `dayValue` is outside of the range of date values for the month, `setDate()` will update the `Date` object accordingly.\n\nFor example, if 0 is provided for `dayValue`, the date will be set to the last day of the previous month. If you use 40 for `dayValue`, and the month stored in the `Date` object is June, the day will be changed to 10 and the month will be incremented to July.\n\nIf a negative number is provided for `dayValue`, the date will be set counting backwards from the last day of the previous month. -1 would result in the date being set to 1 day before the last day of the previous month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/setUTCFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCFullYear()\n\nThe **`setUTCFullYear()`** method sets the full year for a\nspecified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCFullYear(yearValue)\nsetUTCFullYear(yearValue, monthValue)\nsetUTCFullYear(yearValue, monthValue, dayValue)\n```\n\n### Parameters\n\n- `yearValue`\n  - : An integer specifying the numeric value of the year, for example, 1995.\n- `monthValue`\n  - : Optional. An integer between 0 and 11 representing the months January through\n    December.\n- `dayValue`\n  - : Optional. An integer between 1 and 31 representing the day of the month. If you\n    specify the `dayValue` parameter, you must also specify the\n    `monthValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `monthValue` and\n`dayValue` parameters, the values returned from the\n[`Date.prototype.getUTCMonth()`](./getUTCMonth.mdx) and\n[`Date.prototype.getUTCDate()`](./getUTCDate.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range,\n`setUTCFullYear()` attempts to update the other parameters and the date\ninformation in the `Date` object accordingly. For example, if you specify 15\nfor `monthValue`, the year is incremented by 1\n(`yearValue + 1`), and 3 is used for the month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/setUTCHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCHours()\n\nThe **`setUTCHours()`** method sets the hour for a specified\ndate according to universal time, and returns the number of milliseconds since January\n1, 1970 00:00:00 UTC until the time represented by the updated `Date`\ninstance.\n\n## Syntax\n\n```js\nsetUTCHours(hoursValue)\nsetUTCHours(hoursValue, minutesValue)\nsetUTCHours(hoursValue, minutesValue, secondsValue)\nsetUTCHours(hoursValue, minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `hoursValue`\n  - : An integer between 0 and 23, representing the hour.\n- `minutesValue`\n  - : Optional. An integer between 0 and 59, representing the minutes.\n- `secondsValue`\n  - : Optional. An integer between 0 and 59, representing the seconds. If you specify the\n    `secondsValue` parameter, you must also specify the\n    `minutesValue`.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds. If you specify\n    the `msValue` parameter, you must also specify the\n    `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between January 1, 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `minutesValue`,\n`secondsValue`, and `msValue` parameters,\nthe values returned from the [`Date.prototype.getUTCMinutes()`](./getUTCMinutes.mdx), [`Date.prototype.getUTCSeconds()`](./getUTCSeconds.mdx),\nand [`Date.prototype.getUTCMilliseconds()`](./getUTCMilliseconds.mdx) methods\nare used.\n\nIf a parameter you specify is outside of the expected range, `setUTCHours()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes will\nbe incremented by 1 (`minutesValue + 1`), and 40 will be used for seconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/setUTCMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCMilliseconds()\n\nThe **`setUTCMilliseconds()`** method sets the milliseconds for\na specified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCMilliseconds(millisecondsValue)\n```\n\n### Parameters\n\n- `millisecondsValue`\n  - : A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf a parameter you specify is outside of the expected range,\n`setUTCMilliseconds()` attempts to update the date information in the\n`Date` object accordingly. For example, if you use 1100 for\n`millisecondsValue`, the seconds stored in the `Date`\nobject will be incremented by 1, and 100 will be used for milliseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/setUTCMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCMinutes()\n\nThe **`setUTCMinutes()`** method sets the minutes for a\nspecified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCMinutes(minutesValue)\nsetUTCMinutes(minutesValue, secondsValue)\nsetUTCMinutes(minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `minutesValue`\n  - : An integer between 0 and 59, representing the minutes.\n- `secondsValue`\n  - : Optional. An integer between 0 and 59, representing the seconds. If you specify the\n    `secondsValue` parameter, you must also specify the\n    `minutesValue`.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds. If you specify\n    the `msValue` parameter, you must also specify the\n    `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `secondsValue` and\n`msValue` parameters, the values returned from\n[`Date.prototype.getUTCSeconds()`](./getUTCSeconds.mdx) and\n[`Date.prototype.getUTCMilliseconds()`](./getUTCMilliseconds.mdx) methods are\nused.\n\nIf a parameter you specify is outside of the expected range,\n`setUTCMinutes()` attempts to update the date information in the\n`Date` object accordingly. For example, if you use 100 for\n`secondsValue`, the minutes will be incremented by 1\n(`minutesValue + 1`), and 40 will be used for seconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/setUTCMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCMonth()\n\nThe **`setUTCMonth()`** method sets the month for a specified\ndate according to universal time.\n\n## Syntax\n\n```js\nsetUTCMonth(monthValue)\nsetUTCMonth(monthValue, dayValue)\n```\n\n### Parameters\n\n- `monthValue`\n  - : An integer between 0 and 11, representing the months January through December.\n- `dayValue`\n  - : Optional. An integer from 1 to 31, representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `dayValue` parameter, the value returned from the\n[`Date.prototype.getUTCDate()`](./getUTCDate.mdx) method is used.\n\nIf a parameter you specify is outside of the expected range, `setUTCMonth()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 15 for `monthValue`, the year will be incremented by\n1, and 3 will be used for month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/setUTCSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCSeconds()\n\nThe **`setUTCSeconds()`** method sets the seconds for a\nspecified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCSeconds(secondsValue)\nsetUTCSeconds(secondsValue, msValue)\n```\n\n### Parameters\n\n- `secondsValue`\n  - : An integer between 0 and 59, representing the seconds.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `msValue` parameter, the value returned from the\n[`Date.prototype.getUTCMilliseconds()`](./getUTCMilliseconds.mdx) method is\nused.\n\nIf a parameter you specify is outside of the expected range,\n`setUTCSeconds()` attempts to update the date information in the\n`Date` object accordingly. For example, if you use 100 for\n`secondsValue`, the minutes stored in the `Date` object will be\nincremented by 1, and 40 will be used for seconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/setYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setYear()\n\nThe legacy **`setYear()`** method sets the year for a specified date according to local time.\n\nHowever, the way the legacy `setYear()` method sets year values is different from how the preferred [`Date.prototype.setFullYear()`](./setFullYear.mdx) method sets year values — and in some cases, also different from how `new Date()` and [`Date.parse()`](../parse.mdx) set year values. Specifically, given two-digit numbers, such as `22` and `61`:\n\n- `setYear()` interprets any two-digit number as an offset to `1900`; so `date.setYear(22)` results in the year value being set to `1922`, and `date.setYear(61)` results in the year value being set to `1961`. (In contrast, while `new Date(61, 1)` also results in the year value being set to `1961`, `new Date(\"2/1/22\")` results in the year value being set to `2022`; and similarly for [`Date.parse()`](../parse.mdx)).\n\n- [`Date.prototype.setFullYear()`](./setFullYear.mdx) does no special interpretation but instead uses the literal two-digit value as-is to set the year; so `date.setFullYear(61)` results in the year value being set to `0061`, and `date.setFullYear(22)` results in the year value being set to `0022`.\n\nBecause of those differences in behavior, you should no longer use the legacy `setYear()` method, but should instead use the preferred [`Date.prototype.setFullYear()`](./setFullYear.mdx) method.\n\n## Syntax\n\n```js\nsetYear(yearValue)\n```\n\n### Parameters\n\n- `yearValue`\n  - : An integer.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf `yearValue` is a number between 0 and 99 (inclusive), then the year for\n`dateObj` is set to `1900 + yearValue`. Otherwise, the year for\n`dateObj` is set to `yearValue`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/toDateString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toDateString()\n\nThe **`toDateString()`** method returns the date portion of a `Date` object interpreted in the local timezone in English.\n\n## Syntax\n\n```js\ntoDateString()\n```\n\n### Return value\n\nA string representing the date portion of the given `Date` object in human readable form in English.\n\n## Description\n\n`Date` instances refer to a specific point in time. `toDateString()` interprets the date in the local timezone and formats the _date_ part in English. It always uses the following format, separated by spaces:\n\n1. First three letters of the week day name\n2. First three letters of the month name\n3. Two-digit day of the month, padded on the left a zero if necessary\n4. Four-digit year (at least), padded on the left with zeros if necessary. May have a negative sign\n\nFor example: \"Thu Jan 01 1970\".\n\n- If you want to get the _time_ part, use [`toTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString).\n- If you want to get both the date and time, use [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toString).\n- If you want to make the date interpreted as UTC instead of local timezone, use [`toUTCString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString).\n- If you want to format the date in a more user-friendly format (e.g. localization), use [`toLocaleDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/toISOString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toISOString()\n\nThe **`toISOString()`** method returns a string in _simplified_ extended ISO format ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)), which is always 24 or 27 characters long (`YYYY-MM-DDTHH:mm:ss.sssZ` or `±YYYYYY-MM-DDTHH:mm:ss.sssZ`, respectively). The timezone is always zero UTC offset, as denoted by the suffix `Z`.\n\n## Syntax\n\n```js\ntoISOString()\n```\n\n### Return value\n\nA string representing the given date in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format according to universal time. It's the same format as the one required to be recognized by [`Date.parse()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/parse#date-time-string-format).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/toJSON.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toJSON()\n\nThe **`toJSON()`** method returns a string representation of\nthe `Date` object.\n\n## Syntax\n\n```js\ntoJSON()\n```\n\n### Return value\n\nA string representation of the given date.\n\n## Description\n\n`Date` instances refer to a specific point in time. `toJSON()` calls the object's [`Date.prototype.toISOString()`](./toISOString.mdx) method, which returns a string representing the `Date` object's value. This method is generally intended to, by default, usefully serialize `Date` objects during [JSON](https://developer.mozilla.org/docs/Glossary/JSON) serialization, which can then be deserialized using the [`Date()` constructor](../Date.mdx) or [`Date.parse()`](../parse.mdx) as the reviver of [`JSON.parse()`](../../JSON/parse.mdx).\n\nThe method first attempts to convert its `this` value [to a primitive](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion) by calling its [`[Symbol.toPrimitive]()`](../../Symbol/toPrimitive.mdx) (with `\"number\"` as hint), [`valueOf()`](../../Object/prototype/valueOf.mdx), and [`toString()`](../../Object/prototype/toString.mdx) methods, in that order. If the result is a [non-finite](../../Number/isFinite.mdx) number, `null` is returned. (This generally corresponds to an invalid date, whose [`valueOf()`](./valueOf.mdx) returns [`NaN`](../../NaN.mdx).) Otherwise, if the converted primitive is not a number or is a finite number, the return value of `this.toISOString()` is returned.\n\nNote that the method does not check whether the `this` value is a valid `Date` object. However, calling `Date.prototype.toJSON()` on non-`Date` objects does not have well-defined semantics.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/toLocaleDateString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toLocaleDateString()\n\nThe **`toLocaleDateString()`** method returns a string with a language-sensitive representation of the date portion of the specified date in the user agent's timezone. In implementations with [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) support, this method simply calls `Intl.DateTimeFormat`.\n\n## Syntax\n\n```js\ntoLocaleDateString()\ntoLocaleDateString(locales)\ntoLocaleDateString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat), these parameters correspond exactly to the [`Intl.DateTimeFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) constructor's parameters. Implementations without `Intl.DateTimeFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales) parameter of the `Intl.DateTimeFormat()` constructor.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options) parameter of the `Intl.DateTimeFormat()` constructor. The `timeStyle` option must be undefined, or a [`TypeError`](../../../globals/TypeError/TypeError.mdx) would be thrown. If `weekday`, `year`, `month`, and `day` are all undefined, then `year`, `month`, and `day` will be set to `\"numeric\"`.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored.\n\nSee the [`Intl.DateTimeFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string representing the date portion of the given `Date` instance according to language-specific conventions.\n\nIn implementations with `Intl.DateTimeFormat`, this is equivalent to `new Intl.DateTimeFormat(locales, options).format(date)`, where `options` has been normalized as described above.\n\n## Performance\n\nWhen formatting large numbers of dates, it is better to create an [`Intl.DateTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) object and use its [`format()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/format) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string with a language-sensitive representation of this date. In implementations with [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) support, this method simply calls `Intl.DateTimeFormat`.\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat), these parameters correspond exactly to the [`Intl.DateTimeFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) constructor's parameters. Implementations without `Intl.DateTimeFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales) parameter of the `Intl.DateTimeFormat()` constructor.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options) parameter of the `Intl.DateTimeFormat()` constructor. If `weekday`, `year`, `month`, `day`, `dayPeriod`, `hour`, `minute`, `second`, and `fractionalSecondDigits` are all undefined, then `year`, `month`, `day`, `hour`, `minute`, `second` will be set to `\"numeric\"`.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored.\n\nSee the [`Intl.DateTimeFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string representing the given date according to language-specific conventions.\n\nIn implementations with `Intl.DateTimeFormat`, this is equivalent to `new Intl.DateTimeFormat(locales, options).format(date)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/toLocaleTimeString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toLocaleTimeString()\n\nThe **`toLocaleTimeString()`** method returns a string with a language-sensitive representation of the time portion of the date. In implementations with [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) support, this method simply calls `Intl.DateTimeFormat`.\n\n## Syntax\n\n```js\ntoLocaleTimeString()\ntoLocaleTimeString(locales)\ntoLocaleTimeString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat), these parameters correspond exactly to the [`Intl.DateTimeFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) constructor's parameters. Implementations without `Intl.DateTimeFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales) parameter of the `Intl.DateTimeFormat()` constructor.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options) parameter of the `Intl.DateTimeFormat()` constructor. If `dayPeriod`, `hour`, `minute`, `second`, and `fractionalSecondDigits` are all undefined, then `hour`, `minute`, `second` will be set to `\"numeric\"`.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored.\n\nSee the [`Intl.DateTimeFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string representing the time portion of the given `Date` instance according to language-specific conventions.\n\nIn implementations with `Intl.DateTimeFormat`, this is equivalent to `new Intl.DateTimeFormat(locales, options).format(date)`, where `options` has been normalized as described above.\n\n## Performance\n\nWhen formatting large numbers of dates, it is better to create an [`Intl.DateTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) object and use its [`format()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/format) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified `Date` object interpreted in the local timezone.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the given date.\n\n## Description\n\nThe `Date` object overrides the `toString()` method of `Object`. `Date.prototype.toString()` returns a string representation of the Date as interpreted in the local timezone, containing both the date and the time — it joins the string representation specified in [`toDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString) and [`toTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString) together, adding a space in between.\n\nFor example: \"Thu Jan 01 1970 04:42:04 GMT+0000 (Coordinated Universal Time)\"\n\nThe `toString()` method is automatically called when a date is coerced to a string, such as `const today = 'Today is ' + new Date()`.\n\n`Date.prototype.toString()` must be called on `Date` instances. If the `this` value does not inherit from `Date.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n- If you only want to get the _date_ part, use [`toDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString).\n- If you only want to get the _time_ part, use [`toTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString).\n- If you want to make the date interpreted as UTC instead of local timezone, use [`toUTCString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString).\n- If you want to format the date in a more user-friendly format (e.g. localization), use [`toLocaleString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/toTimeString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toTimeString()\n\nThe **`toTimeString()`** method returns the time portion of a `Date` object interpreted in the local timezone in English.\n\n## Syntax\n\n```js\ntoTimeString()\n```\n\n### Return value\n\nA string representing the time portion of the given date in human readable form in English.\n\n## Description\n\n`Date` instances refer to a specific point in time. `toTimeString()` interprets the date in the local timezone and formats the _time_ part in English. It always uses the format of `hh:mm:ss GMT±xxxx (TZ)`, where:\n\n| Format String | Description                                                                                           |\n| ------------- | ----------------------------------------------------------------------------------------------------- |\n| `hh`          | Hour, as two digits with leading zero if required                                                     |\n| `mm`          | Minute, as two digits with leading zero if required                                                   |\n| `ss`          | Seconds, as two digits with leading zero if required                                                  |\n| `±xxxx`       | The local timezone's offset — two digits for hours and two digits for minutes (e.g. `-0500`, `+0800`) |\n| `TZ`          | The timezone's name (e.g. `PDT`, `PST`)                                                               |\n\nFor example: \"04:42:04 GMT+0000 (Coordinated Universal Time)\".\n\n- If you want to get the _date_ part, use [`toDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString).\n- If you want to get both the date and time, use [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toString).\n- If you want to make the date interpreted as UTC instead of local timezone, use [`toUTCString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString).\n- If you want to format the date in a more user-friendly format (e.g. localization), use [`toLocaleTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleTimeString).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/toUTCString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toUTCString()\n\nThe **`toUTCString()`** method converts a date to a string, interpreting it in the UTC time zone. `toGMTString()` is an alias of this method.\n\nBased on [rfc7231](https://datatracker.ietf.org/doc/html/rfc7231#section-7.1.1.1) and modified according to [ECMA-262 toUTCString](https://tc39.es/ecma262/#sec-date.prototype.toutcstring), it can have negative values.\n\n## Syntax\n\n```js\ntoUTCString()\n```\n\n### Return value\n\nA string representing the given date using the UTC time zone.\n\n## Description\n\nThe value returned by `toUTCString()` is a string in the form `Www, dd Mmm yyyy hh:mm:ss GMT`, where:\n\n| Format String | Description                                                  |\n| ------------- | ------------------------------------------------------------ |\n| `Www`         | Day of week, as three letters (e.g. `Sun`, `Mon`)            |\n| `dd`          | Day of month, as two digits with leading zero if required    |\n| `Mmm`         | Month, as three letters (e.g. `Jan`, `Feb`)                  |\n| `yyyy`        | Year, as four or more digits with leading zeroes if required |\n| `hh`          | Hour, as two digits with leading zero if required            |\n| `mm`          | Minute, as two digits with leading zero if required          |\n| `ss`          | Seconds, as two digits with leading zero if required         |\n\n### Aliasing\n\nJavaScript's `Date` API was inspired by Java's `java.util.Date` library (while the latter had become de facto legacy since Java 1.1 in 1997). In particular, the Java `Date` class had a method called `toGMTString` — which was poorly named, because the [Greenwich Mean Time](https://en.wikipedia.org/wiki/Greenwich_Mean_Time) is not equivalent to the [Coordinated Universal Time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time), while JavaScript dates always operate by UTC time. For web compatibility reasons, `toGMTString` remains as an alias to `toUTCString`, and they refer to the exact same function object. This means:\n\n```js\nDate.prototype.toGMTString.name === \"toUTCString\";\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Date/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a\n`Date` object.\n\n\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the given date, or [`NaN`](../../NaN.mdx) in case of an invalid date.\n\n## Description\n\nThe `valueOf()` method returns the primitive value of a `Date`\nobject as a number data type, the number of milliseconds since midnight 01 January, 1970\nUTC.\n\nThis method is functionally equivalent to the [`Date.prototype.getTime()`](./getTime.mdx)\nmethod.\n\nThis method is usually called internally by JavaScript and not explicitly in code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/DecompressionStream/DecompressionStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DecompressionStream()\n\nThe **`DecompressionStream()`** constructor creates a new `DecompressionStream` object which decompresses a stream of data.\n\n## Syntax\n\n```js\nnew DecompressionStream(format)\n```\n\n### Parameters\n\n- `format`\n\n  - : One of the following compression formats:\n\n    - `\"gzip\"`\n    - `\"deflate\"`\n    - `\"deflate-raw\"`\n\n## Exceptions\n\n- `TypeError`\n  - : Thrown if the format passed to the constructor is not supported.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/DecompressionStream/prototype/readable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DecompressionStream.readable\n\nThe **`readable`** read-only property of the `DecompressionStream` interface returns a `ReadableStream`.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/DecompressionStream/prototype/writable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DecompressionStream.writable\n\nThe **`writable`** read-only property of the `DecompressionStream` interface returns a `WritableStream`.\n\n## Value\n\nA `WritableStream`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/EcKeyImportParams/EcKeyImportParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# EcKeyImportParams\n\nThe **`EcKeyImportParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.importKey()`, when generating any elliptic-curve-based key pair: that is, when the algorithm is identified as ECDSA.\n\n## Instance properties\n\n- `name`\n  - : A string. This should be set to `ECDSA`.\n- `namedCurve`\n\n  - : A string representing the name of the elliptic curve to use. This may be any of the following names for [NIST](https://www.nist.gov/)-approved curves:\n\n    - `P-256`\n    - `P-384`\n    - `P-521`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/EcdsaParams/EcdsaParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# EcdsaParams\n\nThe **`EcdsaParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.sign()` or `SubtleCrypto.verify()` when using the ECDSA algorithm.\n\n## Instance properties\n\n- `name`\n    - : A string. This should be set to `ECDSA`.\n- `hash`\n\n    - : A string. An identifier for the digest algorithm to use. This should be one of the following:\n\n        - `SHA-256`: selects the SHA-256 algorithm.\n        - `SHA-384`: selects the SHA-384 algorithm.\n        - `SHA-512`: selects the SHA-512 algorithm.\n\n        > **Warning:** `SHA-1` is also supported here but the SHA-1 algorithm is considered vulnerable and should no longer be used.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Error/Error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error\n\nThe **`Error()`** constructor creates an error object.\n\n## Syntax\n\n```js\nnew Error()\nnew Error(message)\nnew Error(message, options)\nnew Error(message, fileName)\nnew Error(message, fileName, lineNumber)\n\nError()\nError(message)\nError(message, options)\nError(message, fileName)\nError(message, fileName, lineNumber)\n```\n\n> **Note:** `Error()` can be called with or without `new`. Both create a new `Error` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : A human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A value indicating the specific cause of the error, reflected in the [`Error.prototype.cause`](./prototype/cause.mdx) property. When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Error/prototype/cause.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.cause\n\nThe **`cause`** data property of an [`Error`](../../../globals/Error/Error.mdx) instance indicates the specific original cause of the error.\n\nIt is used when catching and re-throwing an error with a more-specific or useful error message in order to still have access to the original error.\n\n## Value\n\nThe value that was passed to the [`Error`](../Error.mdx) constructor in the `options.cause` argument. It may not be present.\n\n## Description\n\nThe value of `cause` can be of any type. You should not make assumptions that the error you caught has an `Error` as its `cause`, in the same way that you cannot be sure the variable bound in the `catch` statement is an `Error` either. The \"Providing structured data as the error cause\" example below shows a case where a non-error is deliberately provided as the cause.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Error/prototype/message.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.message\n\nThe **`message`** data property of an [`Error`](../Error.mdx) instance is a human-readable description of the error.\n\n## Value\n\nA string corresponding to the value passed to the [`Error`](../Error.mdx) constructor as the first argument.\n\n## Description\n\nThis property contains a brief description of the error if one is available or has been set. The `message` property combined with the [`name`](./name.mdx) property is used by the [`Error.prototype.toString()`](./toString.mdx) method to create a string representation of the Error.\n\nBy default, the `message` property is an empty string, but this behavior can be overridden for an instance by specifying a message as the first argument to the [`Error`](../Error.mdx) constructor.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Error/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.name\n\nThe **`name`** data property of `Error.prototype` is shared by all [`Error`](../Error.mdx) instances. It represents the name for the type of error. For `Error.prototype.name`, the initial value is `\"Error\"`. Subclasses like [`TypeError`](../../../globals/TypeError/TypeError.mdx) and [`SyntaxError`](../../SyntaxError/SyntaxError.mdx) provide their own `name` properties.\n\n## Value\n\nA string. For `Error.prototype.name`, the initial value is `\"Error\"`.\n\n## Description\n\nBy default, [`Error`](../Error.mdx) instances are given the name \"Error\". The `name` property, in addition to the [`message`](./message.mdx) property, is used by the [`Error.prototype.toString()`](./toString.mdx) method to create a string representation of the error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Error/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.toString()\n\nThe **`toString()`** method returns a string representing the\nspecified [`Error`](../Error.mdx) object.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified [`Error`](../Error.mdx) object.\n\n## Description\n\nThe [`Error`](../Error.mdx) object overrides the [`Object.prototype.toString()`](../../Object/prototype/toString.mdx)\nmethod inherited by all objects. \n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/EvalError/EvalError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# EvalError\n\nThe **`EvalError()`** constructor creates a new `EvalError` instance.\n\n## Syntax\n\n```js\nnew EvalError()\nnew EvalError(message)\nnew EvalError(message, options)\nnew EvalError(message, fileName)\nnew EvalError(message, fileName, lineNumber)\n\nEvalError()\nEvalError(message)\nEvalError(message, options)\nEvalError(message, fileName)\nEvalError(message, fileName, lineNumber)\n```\n\n> **Note:** `EvalError()` can be called with or without `new`. Both create a new `EvalError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/FetchEvent/FetchEvent.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent\n\nThis is the event type for `fetch` events. It contains information about the fetch, including the request and how the receiver will treat the response. \nIt provides the [`event.respondWith()`](./prototype/respondWith.mdx) method, which allows us to provide a response to this fetch.\n\n## Instance properties\n\n- `FetchEvent.request` _**readonly**_\n    - : The `Request` that was received by the application.\n- `FetchEvent.client` _**readonly**_\n    - : Information about the downstream client that made the request.\n        While these fields are always defined on Compute, they may be *null* when not available in testing environments\n        such as Viceroy.\n    - `FetchEvent.client.address` _**readonly**_\n        - : A string representation of the IPv4 or IPv6 address of the downstream client.\n    - `FetchEvent.client.geo` _**readonly**_\n        - : Either `null`, or a [geolocation dictionary](../../fastly:geolocation/getGeolocationForIpAddress.mdx) corresponding to the IP address of the downstream client.\n    - `FetchEvent.client.tlsJA3MD5` _**readonly**_\n        - : Either `null` or a string representation of the JA3 hash of the TLS ClientHello message.\n    - `FetchEvent.client.tlsCipherOpensslName` _**readonly**_\n        - : Either `null` or a string representation of the cipher suite used to secure the client TLS connection.\n    - `FetchEvent.client.tlsProtocol` _**readonly**_\n        - : Either `null` or a string representation of the TLS protocol version used to secure the client TLS connection.\n    - `FetchEvent.client.tlsClientCertificate` _**readonly**_\n        - : Either `null` or an ArrayBuffer containing the raw client certificate in the mutual TLS handshake message. It is in PEM format. Returns an empty ArrayBuffer if this is not mTLS or available.\n    - `FetchEvent.client.tlsClientHello` _**readonly**_\n        - : Either `null` or an ArrayBuffer containing the raw bytes sent by the client in the TLS ClientHello message.\n    - `FetchEvent.client.tlsJA4` _**readonly**_\n        - : Either `null` or a string representation of the JA4 fingerprint of the TLS ClientHello message.\n    - `FetchEvent.client.h2Fingerprint` _**readonly**_\n        - : Either `null` or a string representation of the HTTP/2 fingerprint for HTTP/2 connections. Returns `null` for HTTP/1.1 connections.\n    - `FetchEvent.client.ohFingerprint` _**readonly**_\n        - : Either `null` or a string representation of the Original Header fingerprint based on the order and presence of request headers.\n- `FetchEvent.server` _**readonly**_\n    - : Information about the server receiving the request for the Fastly Compute service.\n    - `FetchEvent.server.address` _**readonly**_\n        - : A string representation of the IPv4 or IPv6 address of the server which received the request.\n\n## Instance methods\n\n- [`FetchEvent.respondWith()`](./prototype/respondWith.mdx)\n    - : Provide (a promise for) a response for this request.\n- [`FetchEvent.sendEarlyHints()`](./prototype/sendEarlyHints.mdx)\n    - : Send a [103 Early Hints](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/103) response for this request.\n- [`FetchEvent.waitUntil()`](./prototype/waitUntil.mdx)\n    - : Extends the lifetime of the event. Used to notify the host environment of tasks that extend beyond the returning of a response, such as streaming and caching.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/FetchEvent/prototype/respondWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent.respondWith()\n\nThe **`respondWith()`** method allows you to provide a promise for a [`Response`](../../Response/Response.mdx) to send back to the client which made the incoming request to your application.\n\n## Syntax\n\n```js\nrespondWith(response)\n```\n\n### Parameters\n\n- `response`\n  - : A [`Response`](../../Response/Response.mdx) or a [`Promise`](../../Promise/Promise.mdx) that resolves to a\n    [`Response`](../../Response/Response.mdx). Otherwise, a network error is returned to Fetch.\n\n### Return value\n\nAlways returns `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/FetchEvent/prototype/sendEarlyHints.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent.sendEarlyHints()\n\nThe **`sendEarlyHints()`** method allows you to send a [103 Early Hints](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/103) response back to the client which made the incoming request to your application.\n\n## Syntax\n\n```js\nsendEarlyHints(headers)\n```\n\n### Parameters\n\n- `headers`\n  - : Any headers you want to add to your response, contained\n        within a [`Headers`](../../Headers/Headers.mdx) object or object literal of\n        [`String`](../../String/String.mdx) key/value pairs.\n\n### Return value\n\nAlways returns `undefined`.\n\n### Examples\n\n```js\nevent.sendEarlyHints({ link: '</style.css>; rel=preload; as=style' });\n\nevent.sendEarlyHints([\n        ['link', '</style.css>; rel=preload; as=style'],\n        ['link', '</style2.css>; rel=preload; as=style']\n    ]);\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/FetchEvent/prototype/waitUntil.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent.waitUntil()\n\n\nThe **`waitUntil()`** method tells the host environment that work is ongoing until the promise settles, and it shouldn't terminate\nthe application if it wants that work to complete.\n\nThe `waitUntil()` method must be initially called synchronously within the event callback,\nbut after that it can be called multiple times, and will hold the process open until all the promises passed to it\nsettle.\n\n## Syntax\n\n```js\nwaitUntil(promise)\n```\n\n### Parameters\n\nA [`Promise`](../../Promise/Promise.mdx).\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/FinalizationRegistry/FinalizationRegistry.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FinalizationRegistry()\n\nThe **`FinalizationRegistry`** constructor creates a `FinalizationRegistry` object that uses the given callback.\n\n## Syntax\n\n```js\n// Arrow callback function\nnew FinalizationRegistry((heldValue) => { /* … */ })\n\n// Callback function\nnew FinalizationRegistry(callbackFn)\n\n// Inline callback function\nnew FinalizationRegistry(function(heldValue) { /* … */ })\n```\n\n> **Note:** `FinalizationRegistry()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `callback`\n  - : The callback function this registry should use.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/FinalizationRegistry/prototype/register.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FinalizationRegistry.prototype.register()\n\nThe `register()` method registers an object with a\n`FinalizationRegistry` instance so that if the object is garbage-collected,\nthe registry's callback may get called.\n\n## Syntax\n\n```js\nregister(target, heldValue)\nregister(target, heldValue, unregisterToken)\n```\n\n### Parameters\n\n- `target`\n  - : The target object to register.\n- `heldValue`\n  - : The value to pass to the finalizer for this object. This cannot be the `target` object but can be anything else, including functions and primitives.\n- `unregisterToken` _**optional**_\n  - : A token that may be used with the `unregister` method later to unregister\n    the target object. If provided (and not `undefined`), this must be an\n    object. If not provided, the target cannot be unregistered.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown when one of the following condition is met:\n    - `target` is not an object (object as opposed to primitives; functions are objects as well)\n    - `target` is the same as `heldvalue` (`target === heldValue`)\n    - `unregisterToken` is not an object\n\n## Description\n\nSee the [Avoid where possible](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry#avoid_where_possible)\nand [Notes on cleanup callbacks](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry#notes_on_cleanup_callbacks)\nsections of the `FinalizationRegistry` page for important caveats.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/FinalizationRegistry/prototype/unregister.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FinalizationRegistry.prototype.unregister()\n\nThe `unregister()` method unregisters a target object from a\n`FinalizationRegistry` instance.\n\n## Syntax\n\n```js\nunregister(unregisterToken)\n```\n\n### Parameters\n\n- `unregisterToken`\n  - : The token used with the [`FinalizationRegistry.prototype.register`](./register.mdx) method when registering the target object. Multiple cells registered with the same `unregisterToken` will be unregistered together.\n\n### Return value\n\nA boolean value that is `true` if at least one cell was unregistered and `false` if no cell was unregistered.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown when `unregisterToken` is not an object.\n\n## Description\n\nWhen a target object has been reclaimed, it is no longer registered in the registry.\nThere is no need to call `unregister` in your cleanup callback. Only call\n`unregister` if you haven't received a cleanup callback and no longer need\nto receive one.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Float32Array/Float32Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Float32Array()\n\nThe **`Float32Array()`** typed array constructor creates a new\n`Float32Array` object, which is, an array of 32-bit floating point numbers\n(corresponding to the C `float` data type) in the platform byte order. If\ncontrol over byte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are\ninitialized to `0`. Once established, you can reference elements in the array\nusing the object's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Float32Array()\nnew Float32Array(length)\nnew Float32Array(typedArray)\nnew Float32Array(object)\n\nnew Float32Array(buffer)\nnew Float32Array(buffer, byteOffset)\nnew Float32Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Float32Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Float64Array/Float64Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Float64Array()\n\nThe **`Float64Array()`** typed array constructor creates a new\n`Float64Array` object, which is, an array of 64-bit floating point numbers\n(corresponding to the C `double` data type) in the platform byte order. If\ncontrol over byte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are\ninitialized to `0`. Once established, you can reference elements in the array\nusing the object's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Float64Array()\nnew Float64Array(length)\nnew Float64Array(typedArray)\nnew Float64Array(object)\n\nnew Float64Array(buffer)\nnew Float64Array(buffer, byteOffset)\nnew Float64Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Float64Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/FormData/FormData.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData()\n\nThe **`FormData()`** constructor creates a new `FormData` object.\n\n## Syntax\n\n```js\nnew FormData()\nnew FormData(form)\n```\n\n> **Note:** `FormData()` can only be constructed with `new`. Attempting to call it without `new` throws a `TypeError`.\n\n### Parameters\n\n- `form` _**optional**_\n  - : An HTML `<form>` element — when specified, the `FormData` object will be populated with the form's current key/value pairs using the name property of each element for the keys and their submitted value for the values. File input elements are handled specially: their values are taken from the files selected by the user in the upload control.\n\n### Return value\n\nA new `FormData` object, pre-populated with form data if the optional `form` parameter was provided.\n\n## Description\n\nThe `FormData` interface provides a way to construct a set of key/value pairs representing form fields and their values, which can be sent using methods such as `fetch()`. It uses the same format a form would use if the encoding type were set to `\"multipart/form-data\"`.\n\nYou can also append additional data to the `FormData` object after it's created using its various methods.\n\nA `FormData` object can be used in a number of ways with other APIs:\n\n1. It can be sent with the `fetch()` API\n2. It works seamlessly with the `Request` and `Response` objects - it can be used directly as the body of a `Request` object\n3. It can be obtained from a `Response` object using the `formData()` method\n4. It can be passed directly to the `URLSearchParams` constructor\n\nThe transmitted data is in the same format that the form's `submit()` method would use to send the data if the form's encoding type were set to `\"multipart/form-data\"`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/FormData/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.append()\n\nThe **`append()`** method of the `FormData` interface appends a new value onto an existing key inside a `FormData` object, or adds the key if it does not already exist.\n\n## Syntax\n\n```js\nappend(name, value)\nappend(name, value, filename)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the field whose data is contained in `value`.\n- `value`\n  - : The value of the field. This can be a string or a `Blob` (including subclasses such as `File`). If none of these, the value is converted to a string.\n- `filename` _**optional**_\n  - : The filename reported to the server when a `Blob` or `File` is passed as the second parameter. The default filename for `Blob` objects is \"blob\". The default filename for `File` objects is the file's filename.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/FormData/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.delete()\n\nThe **`delete()`** method of the `FormData` interface removes all key/value pairs with the given name from the `FormData` object.\n\n## Syntax\n\n```js\ndelete(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the key you want to delete.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/FormData/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.entries()\n\nThe **`entries()`** method of the `FormData` interface returns an iterator allowing iteration through all key/value pairs contained in this object. The iterator yields a new array for each key/value pair, with the first element being the key and the second element being the value.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nAn `iterator`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/FormData/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.forEach()\n\nThe **`forEach()`** method of the `FormData` interface executes the provided callback function once for each key/value pair in the `FormData` object.\n\n## Syntax\n\n```js\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n  - : A function to execute for each entry in the object. The function will be passed the following arguments:\n    - `value`\n      - : The value of the current entry.\n    - `key`\n      - : The key of the current entry.\n    - `formData`\n      - : The `FormData` object being traversed.\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/FormData/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.get()\n\nThe **`get()`** method of the `FormData` interface returns the first value associated with a given key from within a `FormData` object. If you expect multiple values and want all of them, use the [`getAll()`](../../../globals/FormData/prototype/getAll.mdx) method instead.\n\n## Syntax\n\n```js\nget(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the key you want to retrieve.\n\n### Return value\n\nA `FormDataEntryValue` containing the value. If the key does not exist, it returns `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/FormData/prototype/getAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.getAll()\n\nThe **`getAll()`** method of the `FormData` interface returns all the values associated with a given key from within a `FormData` object.\n\n## Syntax\n\n```js\ngetAll(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the key you want to retrieve.\n\n### Return value\n\nAn array of `FormDataEntryValue` items containing all values with the given key. If the key doesn't exist, an empty array is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/FormData/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.has()\n\nThe **`has()`** method of the `FormData` interface returns a boolean indicating whether a `FormData` object contains a key/value pair with the given name.\n\n## Syntax\n\n```js\nhas(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the key you want to test for existence.\n\n### Return value\n\n`true` if a key/value pair with the specified name exists; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/FormData/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.keys()\n\nThe **`keys()`** method of the `FormData` interface returns an iterator allowing iteration through all keys contained in this object. The iterator yields the key for each value.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nAn `iterator`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/FormData/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.set()\n\nThe **`set()`** method of the `FormData` interface sets a new value for an existing key inside a `FormData` object, or adds the key/value if it does not already exist.\n\nThe difference between `set()` and [`append()`](../../../globals/FormData/prototype/append.mdx) is that if the specified key already exists, `set()` overwrites all existing values with the new one, whereas `append()` appends the new value onto the end of the existing values.\n\n## Syntax\n\n```js\nset(name, value)\nset(name, value, filename)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the field whose data is contained in `value`.\n- `value`\n  - : The value of the field. This can be a string or a `Blob` (including subclasses such as `File`). If none of these, the value is converted to a string.\n- `filename` _**optional**_\n  - : The filename reported to the server when a `Blob` or `File` is passed as the second parameter. The default filename for `Blob` objects is \"blob\". The default filename for `File` objects is the file's filename.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/FormData/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.values()\n\nThe **`values()`** method of the `FormData` interface returns an iterator allowing iteration through all values contained in this object. The iterator yields the value for each key/value pair.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nAn `iterator`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Function/Function.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function()\n\nThe **`Function()`** constructor creates a new [`Function`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function) object. Calling the constructor directly can create functions dynamically, but suffers from security and similar (but far less significant) performance issues as `eval()`. However, unlike `eval` (which may have access to the local scope), the `Function` constructor creates functions which execute in the global scope only.\n\n\n\n## Syntax\n\n```js\nnew Function(functionBody)\nnew Function(arg0, functionBody)\nnew Function(arg0, arg1, functionBody)\nnew Function(arg0, arg1, /* … ,*/ argN, functionBody)\n\nFunction(functionBody)\nFunction(arg0, functionBody)\nFunction(arg0, arg1, functionBody)\nFunction(arg0, arg1, /* … ,*/ argN, functionBody)\n```\n\n> **Note:** `Function()` can be called with or without `new`. Both create a new `Function` instance.\n\n### Parameters\n\n- `argN` _**optional**_\n\n  - : Names to be used by the function as formal argument names. Each must be a string that corresponds to a valid JavaScript parameter (any of plain [identifier](https://developer.mozilla.org/docs/Glossary/Identifier), [rest parameter](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/rest_parameters), or [destructured](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment) parameter, optionally with a [default](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/Default_parameters)), or a list of such strings separated with commas.\n\n    As the parameters are parsed in the same way as function expressions, whitespace and comments are accepted. For example: `\"x\", \"theValue = 42\", \"[a, b] /* numbers */\"` — or `\"x, theValue = 42, [a, b] /* numbers */\"`. (`\"x, theValue = 42\", \"[a, b]\"` is also correct, though very confusing to read.)\n\n- `functionBody`\n  - : A string containing the JavaScript statements comprising the function definition.\n\n## Description\n\n`Function` objects created with the `Function` constructor are parsed when the function is created. This is less efficient than creating a function with a [function expression](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/function) or [function declaration](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function) and calling it within your code, because such functions are parsed with the rest of the code.\n\nAll arguments passed to the function, except the last, are treated as the names of the identifiers of the parameters in the function to be created, in the order in which they are passed. The function will be dynamically compiled as a function expression, with the source assembled in the following fashion:\n\n```js\n`function anonymous(${args.join(\",\")}\n) {\n${functionBody}\n}`\n```\n\nThis is observable by calling the function's [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/toString) method.\n\nHowever, unlike normal [function expressions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/function), the name `anonymous` is not added to the `functionBody`'s scope, since `functionBody` only has access the global scope. If `functionBody` is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode) (the body itself needs to have the `\"use strict\"` directive since it doesn't inherit the strictness from the context), you may use [`arguments.callee`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/arguments/callee) to refer to the function itself. Alternatively, you can define the recursive part as an inner function:\n\n```js\nconst recursiveFn = new Function(\"count\", `\n(function recursiveFn(count) {\n  if (count < 0) {\n    return;\n  }\n  console.log(count);\n  recursiveFn(count - 1);\n})(count);\n`);\n```\n\nNote that the two dynamic parts of the assembled source — the parameters list `args.join(\",\")` and `functionBody` — will first be parsed separately to ensure they are each syntactically valid. This prevents injection-like attempts.\n\n```js\nnew Function(\"/*\", \"*/) {\");\n// SyntaxError: Unexpected end of arg string\n// Doesn't become \"function anonymous(/*) {*/) {}\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Function/prototype/apply.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.apply()\n\nThe **`apply()`** method calls the specified function with a given `this` value, and `arguments` provided as an array (or an [array-like object](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects)).\n\n\n\n## Syntax\n\n```js\napply(thisArg)\napply(thisArg, argsArray)\n```\n\n### Parameters\n\n- `thisArg`\n  - : The value of `this` provided for the call to `func`. If the function is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) will be replaced with the global object, and primitive values will be converted to objects.\n- `argsArray` _**optional**_\n  - : An array-like object, specifying the arguments with which `func` should be called, or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../../globals/undefined.mdx) if no arguments should be provided to the function.\n\n### Return value\n\nThe result of calling the function with the specified `this` value and arguments.\n\n## Description\n\n> **Note:** This function is almost identical to [`Function.prototype.call()`](../../../globals/Function/prototype/call.mdx), except that `call()` accepts an **argument list**, while `apply()` accepts a **single array of arguments** — for example, `func.apply(this, ['eat', 'bananas'])` vs. `func.call(this, 'eat', 'bananas')`.\n\nNormally, when calling a function, the value of [`this`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this) inside the function is the object that the function was accessed on. With `apply()`, you can assign an arbitrary value as `this` when calling an existing function, without first attaching the function to the object as a property. This allows you to use methods of one object as generic utility functions.\n\n> **Warning:** Do not use `apply()` to chain constructors (for example, to implement inheritance). This invokes the constructor function as a plain function, which means [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target) is `undefined`, and classes throw an error because they can't be called without `new`. Use [`Reflect.construct()`](../../../globals/Reflect/construct.mdx) or [`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Function/prototype/bind.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.bind()\n\nThe **`bind()`** method creates a new function that, when called, has its `this` keyword set to the provided value, with a given sequence of arguments preceding any provided when the new function is called.\n\n\n\n## Syntax\n\n```js\nbind(thisArg)\nbind(thisArg, arg1)\nbind(thisArg, arg1, arg2)\nbind(thisArg, arg1, arg2, /* …, */ argN)\n```\n\n### Parameters\n\n- `thisArg`\n  - : The value to be passed as the `this` parameter to the target function `func` when the bound function is called. If the function is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) will be replaced with the global object, and primitive values will be converted to objects. The value is ignored if the bound function is constructed using the `new` operator.\n- `arg1, …, argN` _**optional**_\n  - : Arguments to prepend to arguments provided to the bound function when invoking `func`.\n\n### Return value\n\nA copy of the given function with the specified `this` value, and initial arguments (if provided).\n\n## Description\n\nThe `bind()` function creates a new _bound function_. Calling the bound function generally results in the execution of the function it wraps, which is also called the _target function_. The bound function will store the parameters passed — which include the value of `this` and the first few arguments — as its internal state. These values are stored in advance, instead of being passed at call time. You can generally see `const boundFn = fn.bind(thisArg, arg1, arg2)` as being equivalent to `const boundFn = (...restArgs) => fn.call(thisArg, arg1, arg2, ...restArgs)` for the effect when it's called (but not when `boundFn` is constructed).\n\nA bound function can be further bound by calling `boundFn.bind(thisArg, /* more args */)`, which creates another bound function `boundFn2`. The newly bound `thisArg` value is ignored, because the target function of `boundFn2`, which is `boundFn`, already has a bound `this`. When `boundFn2` is called, it would call `boundFn`, which in turn calls `fn`. The arguments that `fn` ultimately receives are, in order: the arguments bound by `boundFn`, arguments bound by `boundFn2`, and the arguments received by `boundFn2`.\n\n```js\n\"use strict\"; // prevent `this` from being boxed into the wrapper object\n\nfunction log(...args) {\n  console.log(this, ...args);\n}\nconst boundLog = log.bind(\"this value\", 1, 2);\nconst boundLog2 = boundLog.bind(\"new this value\", 3, 4);\nboundLog2(5, 6); // \"this value\", 1, 2, 3, 4, 5, 6\n```\n\nA bound function may also be constructed using the `new` operator if its target function is constructable. Doing so acts as though the target function had instead been constructed. The prepended arguments are provided to the target function as usual, while the provided `this` value is ignored (because construction prepares its own `this`, as seen by the parameters of [`Reflect.construct`](../../../globals/Reflect/construct.mdx)). If the bound function is directly constructed, [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target) will be the target function instead. (That is, the bound function is transparent to `new.target`.)\n\n```js\nclass Base {\n  constructor(...args) {\n    console.log(new.target === Base);\n    console.log(args);\n  }\n}\n\nconst BoundBase = Base.bind(null, 1, 2);\n\nnew BoundBase(3, 4); // true, [1, 2, 3, 4]\n```\n\nHowever, because a bound function does not have the [`prototype`](../../../globals/Function/prototype/) property, it cannot be used as a base class for [`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends).\n\n```js example-bad\nclass Derived extends class {}.bind(null) {}\n// TypeError: Class extends value does not have valid prototype property undefined\n```\n\nWhen using a bound function as the right-hand side of [`instanceof`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/instanceof), `instanceof` would reach for the target function (which is stored internally in the bound function) and read its `prototype` instead.\n\n```js\nclass Base {}\nconst BoundBase = Base.bind(null, 1, 2);\nconsole.log(new Base() instanceof BoundBase); // true\n```\n\nThe bound function has the following properties:\n\n- [`length`](../../../globals/Function/prototype/length.mdx)\n  - : The `length` of the target function minus the number of arguments being bound (not counting the `thisArg` parameter), with 0 being the minimum value.\n- [`name`](../../../globals/Function/prototype/name.mdx)\n  - : The `name` of the target function plus a `\"bound \"` prefix.\n\nThe bound function also inherits the [prototype chain](https://developer.mozilla.org/docs/Web/JavaScript/Inheritance_and_the_prototype_chain) of the target function. However, it doesn't have other own properties of the target function (such as [static properties](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/static) if the target function is a class).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Function/prototype/call.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.call()\n\nThe **`call()`** method calls the function with a given `this` value and arguments provided individually.\n\n## Syntax\n\n```js\ncall(thisArg)\ncall(thisArg, arg1)\ncall(thisArg, arg1, /* …, */ argN)\n```\n\n### Parameters\n\n- `thisArg`\n  - : The value to use as `this` when calling `func`. If the function is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) will be replaced with the global object, and primitive values will be converted to objects.\n- `arg1, …, argN` _**optional**_\n  - : Arguments for the function.\n\n### Return value\n\nThe result of calling the function with the specified `this` value and arguments.\n\n## Description\n\n> **Note:** This function is almost identical to [`Function.prototype.apply()`](../../../globals/Function/prototype/apply.mdx), except that `call()` accepts an **argument list**, while `apply()` accepts a **single array of arguments** — for example, `func.apply(this, ['eat', 'bananas'])` vs. `func.call(this, 'eat', 'bananas')`.\n\nNormally, when calling a function, the value of [`this`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this) inside the function is the object that the function was accessed on. With `call()`, you can assign an arbitrary value as `this` when calling an existing function, without first attaching the function to the object as a property. This allows you to use methods of one object as generic utility functions.\n\n> **Warning:** Do not use `call()` to chain constructors (for example, to implement inheritance). This invokes the constructor function as a plain function, which means [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target) is `undefined`, and classes throw an error because they can't be called without `new`. Use [`Reflect.construct()`](../../../globals/Reflect/construct.mdx) or [`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Function/prototype/index.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.prototype\n\nThe **`prototype`** data property of a `Function` instance is used when the function is used as a constructor with the `new` operator. It will become the new object's prototype.\n\n> **Note:** Not all `Function` objects have the `prototype` property — see [description](#description).\n\n## Value\n\nAn object.\n\n> **Note:** The `prototype` property of [classes](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes) is not writable.\n\n## Description\n\nWhen a function is called with `new`, the constructor's `prototype` property will become the resulting object's prototype.\n\n```js\nfunction Ctor() {}\nconst inst = new Ctor();\nconsole.log(Object.getPrototypeOf(inst) === Ctor.prototype); // true\n```\n\nYou can read [Inheritance and the prototype chain](https://developer.mozilla.org/docs/Web/JavaScript/Inheritance_and_the_prototype_chain#constructors) for more information about the interactions between a constructor function's `prototype` property and the resulting object's prototype.\n\nA function having a `prototype` property is not sufficient for it to be eligible as a constructor. [Generator functions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function*) have a `prototype` property, but cannot be called with `new`:\n\n```js\nasync function* asyncGeneratorFunction() {}\nfunction* generatorFunction() {}\n```\n\nInstead, generator functions' `prototype` property is used when they are called _without_ `new`. The `prototype` property will become the returned [`Generator`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Generator) object's prototype.\n\nIn addition, some functions may have a `prototype` but throw unconditionally when called with `new`. For example, the [`Symbol()`](../../../globals/Symbol/Symbol.mdx) and [`BigInt`](../../../globals/BigInt/BigInt.mdx) functions throw when called with `new`, because `Symbol.prototype` and `BigInt.prototype` are only intended to provide methods for the primitive values, but the wrapper objects should not be directly constructed.\n\nThe following functions do not have `prototype`, and are therefore ineligible as constructors, even if a `prototype` property is later manually assigned:\n\n```js\nconst method = { foo() {} }.foo;\nconst arrowFunction = () => {};\nasync function asyncFunction() {}\n```\n\nThe following are valid constructors that have `prototype`:\n\n```js\nclass Class {}\nfunction fn() {}\n```\n\nA [bound function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/bind) does not have a `prototype` property, but may be constructable. When it's constructed, the target function is constructed instead, and if the target function is constructable, it would return a normal instance.\n\n```js\nconst boundFunction = function () {}.bind(null);\n```\n\nA function's `prototype` property, by default, is a plain object with one property: (`constructor`)[../../../globals/Object/prototype/constructor.mdx), which is a reference to the function itself. The `constructor` property is writable, non-enumerable, and configurable.\n\nIf the `prototype` of a function is reassigned with something other than an `Object`, when the function is called with `new`, the returned object's prototype would be `Object.prototype` instead. (In other words, `new` ignores the `prototype` property and constructs a plain object.)\n\n```js\nfunction Ctor() {}\nCtor.prototype = 3;\nconsole.log(Object.getPrototypeOf(new Ctor()) === Object.prototype); // true\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Function/prototype/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.length\n\nThe **`length`** data property of a `Function` instance indicates the number of parameters expected by the function.\n\n## Value\n\nA number.\n\n## Description\n\nA `Function` object's `length` property indicates how many arguments the function expects, i.e. the number of formal parameters. \n\nThe `Function` constructor is itself a `Function` object. Its `length` data property has a value of `1`.\n\nDue to historical reasons, `Function.prototype` is a callable itself. The `length` property of `Function.prototype` has a value of `0`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Function/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.name\n\nThe **`name`** property of a `Function` instance indicates the function's name as specified when it was created, or it may be either `anonymous` or `''` (an empty string) for functions created anonymously.\n\n## Value\n\nA string.\n\n> **Note:** In non-standard, pre-ES2015 implementations the `configurable` attribute was `false` as well.\n\n## Description\n\nThe function's `name` property can be used to identify the function in debugging tools or error messages. It has no semantic significance to the language itself.\n\nThe `name` property is read-only and cannot be changed by the assignment operator:\n\n```js\nfunction someFunction() {}\n\nsomeFunction.name = 'otherFunction';\nconsole.log(someFunction.name); // someFunction\n```\n\nTo change it, use [`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx).\n\nThe `name` property is typically inferred from how the function is defined. In the following sections, we will describe the various ways in which it can be inferred.\n\n### Function declaration\n\nThe `name` property returns the name of a function declaration.\n\n```js\nfunction doSomething() {}\ndoSomething.name; // \"doSomething\"\n```\n\n### Default-exported function declaration\n\nAn [`export default`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/export) declaration exports the function as a declaration instead of an expression. If the declaration is anonymous, the name is `\"default\"`.\n\n```js\n// -- someModule.js --\nexport default function () {};\n\n// -- main.js --\nimport someModule from \"./someModule.js\";\n\nsomeModule.name; // \"default\"\n```\n\n### Function constructor\n\nFunctions created with the [`Function()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/Function) constructor have name \"anonymous\".\n\n```js\nnew Function().name; // \"anonymous\"\n```\n\n### Function expression\n\nIf the function expression is named, that name is used as the `name` property.\n\n```js\nconst someFunction = function someFunctionName() {};\nsomeFunction.name; // \"someFunctionName\"\n```\n\nAnonymous function expressions created using the keyword `function` or arrow functions would have `\"\"` (an empty string) as their name.\n\n```js\n(function () {}).name; // \"\"\n(() => {}).name; // \"\"\n```\n\nHowever, such cases are rare — usually, in order to refer to the expression elsewhere, the function expression is attached to an identifier when it's created (such as in a variable declaration). In such cases, the name can be inferred, as the following few subsections demonstrate.\n\nOne practical case where the name cannot be inferred is a function returned from another function:\n\n```js\nfunction getFoo() {\n  return () => {};\n}\ngetFoo().name; // \"\"\n```\n\n### Variable declaration and method\n\nVariables and methods can infer the name of an anonymous function from its syntactic position.\n\n```js\nconst f = function () {};\nconst object = {\n  someMethod: function () {}\n};\n\nconsole.log(f.name); // \"f\"\nconsole.log(object.someMethod.name); // \"someMethod\"\n```\n\nThe same applies to assignment:\n\n```js\nlet f;\nf = () => {};\nf.name; // \"f\"\n```\n\n### Initializer and default value\n\nFunctions in initializers (default values) of [destructuring](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#default_value), [default parameters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/Default_parameters), [class fields](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/Public_class_fields), etc., will inherit the name of the bound identifier as their `name`.\n\n```js\nconst [f = () => {}] = [];\nf.name; // \"f\"\n\nconst { someMethod: m = () => {} } = {};\nm.name; // \"m\"\n\nfunction foo(f = () => {}) {\n  console.log(f.name);\n}\nfoo(); // \"f\"\n\nclass Foo {\n  static someMethod = () => {};\n}\nFoo.someMethod.name; // someMethod\n```\n\n### Shorthand method\n\n```js\nconst o = {\n  foo() {},\n};\no.foo.name; // \"foo\";\n```\n\n### Bound function\n\n[`Function.prototype.bind()`](../../../globals/Function/prototype/bind.mdx) produces a function whose name is \"bound \" plus the function name.\n\n```js\nfunction foo() {};\nfoo.bind({}).name; // \"bound foo\"\n```\n\n### Getter and setter\n\nWhen using [`get`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/get) and [`set`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/set) accessor properties, \"get\" or \"set\" will appear in the function name.\n\n```js\nconst o = {\n  get foo() {},\n  set foo(x) {},\n};\n\nconst descriptor = Object.getOwnPropertyDescriptor(o, \"foo\");\ndescriptor.get.name; // \"get foo\"\ndescriptor.set.name; // \"set foo\";\n```\n\n### Class\n\nA class's name follows the same algorithm as function declarations and expressions.\n\n```js\nclass Foo {}\nFoo.name; // \"Foo\"\n```\n\n> **Warning:** JavaScript will set the function's `name` property only if a function does not have an own property called `name`. However, classes' [static members](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/static) will be set as own properties of the class constructor function, and thus prevent the built-in `name` from being applied. See [telling the constructor name of an object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name#telling_the_constructor_name_of_an_object) for more details.\n\n### Symbol as function name\n\nIf a `Symbol` is used a function name and the symbol has a description, the method's name is the description in square brackets.\n\n```js\nconst sym1 = Symbol(\"foo\");\nconst sym2 = Symbol();\n\nconst o = {\n  [sym1]() {},\n  [sym2]() {},\n};\n\no[sym1].name; // \"[foo]\"\no[sym2].name; // \"[]\"\n```\n\n### Private property\n\nPrivate fields and private methods have the hash (`#`) as part of their names.\n\n```js\nclass Foo {\n  #field = () => {};\n  #method() {}\n  getNames() {\n    console.log(this.#field.name);\n    console.log(this.#method.name);\n  }\n}\n\nnew Foo().getNames();\n// \"#field\"\n// \"#method\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Function/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.toString()\n\nThe **`toString()`** method returns a string representing the source code of the specified `Function`.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the source code of the function.\n\n## Description\n\nThe `Function` object overrides the `toString()` method\ninherited from `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For user-defined `Function`\nobjects, the `toString` method returns a string containing the source text\nsegment which was used to define the function.\n\nJavaScript calls the `toString` method automatically when a\n`Function` is to be represented as a text value, e.g. when a function is\nconcatenated with a string.\n\nThe `toString()` method will throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) exception\n(\"Function.prototype.toString called on incompatible object\"), if its\n`this` value object is not a `Function` object.\n\n```js example-bad\nFunction.prototype.toString.call('foo'); // throws TypeError\n```\n\nIf the `toString()` method is called on built-in function objects, a\nfunction created by [`Function.prototype.bind()`](../../../globals/Function/prototype/bind.mdx), or\nother non-JavaScript functions, then `toString()` returns a\n_native function string_ which looks like\n\n```js\n\"function someName() { [native code] }\"\n```\n\nFor intrinsic object methods and functions, `someName` is the initial name of the function; otherwise its content may be implementation-defined, but will always be in property name syntax, like `[1 + 1]`, `someName`, or `1`.\n\n> **Note:** This means using [`eval()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/eval) on native function strings is a guaranteed syntax error.\n\nIf the `toString()` method is called on a function created by the `Function` constructor, `toString()` returns the source code of a synthesized function declaration named \"anonymous\" using the provided parameters and function body. For example, `Function(\"a\", \"b\", \"return a + b\").toString()` will return:\n\n```js\n\"function anonymous(a,b\\n) {\\nreturn a + b\\n}\"\n```\n\nSince ES2018, the spec requires the return value of `toString()` to be the exact same source code as it was declared, including any whitespace and/or comments — or, if the host doesn't have the source code available for some reason, requires returning a native function string. Support for this revised behavior can be found in the [browser compatibility table](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/toString#browser_compatibility).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Headers/Headers.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers()\n\nThe **`Headers()`** constructor creates a new `Headers` object.\n\n## Syntax\n\n```js\nnew Headers()\nnew Headers(init)\n```\n\n### Parameters\n\n- `init` _**optional**_\n  - : An object containing any HTTP headers that you want to pre-populate your `Headers` object with. This can be a\n    simple object literal with `String` values, an array of name-value pairs, where each pair is a 2-element string array; or an existing\n    `Headers` object. In the last case, the new `Headers` object\n    copies its data from the existing `Headers` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Headers/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.append()\n\nThe **`append()`** method of the `Headers`\ninterface appends a new value onto an existing header inside a `Headers`\nobject, or adds the header if it does not already exist.\n\nThe difference between `Headers.prototype.set()` and `append()` is\nthat if the specified header already exists and accepts multiple values,\n`set()` will overwrite the existing value with the new one, whereas\n`append()` will append the new value onto the end of the set of values.\n\n## Syntax\n\n```js\nappend(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to add to the `Headers` object.\n- `value`\n  - : The value of the HTTP header you want to add.\n\n### Return value\n\nNone (`undefined`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Headers/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.delete()\n\nThe **`delete()`** method of the `Headers`\ninterface deletes a header from the current `Headers` object.\n\nThis method throws a `TypeError` for the following reasons:\n\n- The value of the name parameter is not the name of an HTTP header.\n\n## Syntax\n\n```js\ndelete(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to delete from the `Headers` object.\n\n### Return value\n\nNone (`undefined`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Headers/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.entries()\n\nThe **`Headers.entries()`** method returns an iterator allowing to go through all key/value pairs\ncontained in this object. The both the key and value of each pairs are `String` objects.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Headers/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.forEach()\n\nThe **`Headers.forEach()`** method executes a callback function once per each key/value pair in the `Headers` object.\n\n## Syntax\n\n```js\n// Arrow function\nforEach((value, key) => { /* … */ })\nforEach((value, key, object) => { /* … */ })\n\n// Inline callback function\nforEach(function (value, key) { /* … */ })\nforEach(function (value, key, object) { /* … */ })\nforEach(function (value, key) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n  - : Function to execute for each entry in the map. It takes the following arguments:\n    - `value`\n      - : Value of the currently visited header entry.\n    - `key`\n      - : Name of the currently visited header entry.\n    - `object`\n      - : The Headers object being iterated.\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `callback`.\n\n### Return value\n\n`undefined`.\n\n## Description\n\nThe `Headers.forEach()` method executes the provided callback once for each key of the Headers which actually exist. It is not invoked for keys which have been deleted. However, it is executed for keys which are present but have the value undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Headers/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.get()\n\nThe **`get()`** method of the [`Headers`](../../../globals/Headers/Headers.mdx) interface\nreturns a byte string of all the values of a header within a `Headers` object\nwith a given name. If the requested header doesn't exist in the `Headers`\nobject, it returns `null`.\n\n## Syntax\n\n```js\nget(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header whose values you want to retrieve from the\n    `Headers` object. If the given name is not the name of an HTTP header, this\n    method throws a `TypeError`. The name is case-insensitive.\n\n### Return value\n\nA [`String`](../../../globals/String/String.mdx) sequence representing the values of the retrieved header or\n`null` if this header is not set.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Headers/prototype/getSetCookie.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.getSetCookie()\n\nThe **`getSetCookie()`** method of the [`Headers`](../../../globals/Headers/Headers.mdx) interface\nreturns an array of all the values of the `Set-Cookie` headers, returning\nan empty list if none are present.\n\n## Syntax\n\n```js\ngetSetCookie()\n```\n\n### Return value\n\n`String[]` representing the list of `Set-Cookie` headers.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Headers/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.has()\n\nThe **`has()`** method of the `Headers` interface\nreturns a boolean stating whether a `Headers` object contains a certain\nheader.\n\n## Syntax\n\n```js\nhas(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to test for. If the given name is not a valid\n    HTTP header name, this method throws a `TypeError`.\n\n### Return value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Headers/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.keys()\n\nThe **`Headers.keys()`** method returns an iterator allowing to go through all keys contained\nin this object. The keys are `String` objects.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Headers/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.set()\n\nThe **`set()`** method of the `Headers` interface\nsets a new value for an existing header inside a `Headers` object, or adds\nthe header if it does not already exist.\n\nThe difference between `set()` and `Headers.append` is that if\nthe specified header already exists and accepts multiple values, `set()`\noverwrites the existing value with the new one, whereas `Headers.append`\nappends the new value to the end of the set of values.\n\n## Syntax\n\n```js\nset(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to set to a new value. If the given name is not\n    the name of an HTTP header, this method throws a `TypeError`.\n- `value`\n  - : The new value you want to set.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Headers/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.values()\n\nThe **`Headers.values()`** method returns an iterator allowing to go through all values contained\nin this object. The values are `String` objects.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/HmacImportParams/HmacImportParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# HmacImportParams\n\nThe **`HmacImportParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.importKey`, when generating a key for the `HMAC` algorithm.\n\n## Instance properties\n\n- `name`\n  - : A string. This should be set to `HMAC`.\n- `hash`\n\n  - : A string representing the name of the digest function to use. The can take a value of `SHA-1`, `SHA-256`, `SHA-384`, or `SHA-512`.\n\n- `length` _optional_\n  - : A `Number` representing the length in bits of the key. If this is omitted the length of the key is equal to the length of the digest generated by the digest function you have chosen. Unless you have a good reason to use a different length, omit this property and use the default.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Infinity.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Infinity\n\nThe global property **`Infinity`** is a numeric value representing infinity.\n\n## Value\n\nThe same number value as `Number.POSITIVE_INFINITY`.\n\n## Description\n\n`Infinity` is a property of the _global object_. In other words, it is a variable in global scope.\n\nThe value `Infinity` (positive infinity) is greater than any other number.\n\nThis value behaves slightly differently than mathematical infinity; see `Number.POSITIVE_INFINITY` for details.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Int16Array/Int16Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Int16Array()\n\nThe **`Int16Array()`** typed array constructor creates an array\nof twos-complement 16-bit signed integers in the platform byte order. If control over\nbyte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are initialized\nto `0`. Once established, you can reference elements in the array using the\nobject's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Int16Array()\nnew Int16Array(length)\nnew Int16Array(typedArray)\nnew Int16Array(object)\n\nnew Int16Array(buffer)\nnew Int16Array(buffer, byteOffset)\nnew Int16Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Int16Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Int32Array/Int32Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Int32Array()\n\nThe **`Int32Array()`** typed array constructor creates an array\nof twos-complement 32-bit signed integers in the platform byte order. If control over\nbyte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are initialized\nto `0`. Once established, you can reference elements in the array using the\nobject's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Int32Array()\nnew Int32Array(length)\nnew Int32Array(typedArray)\nnew Int32Array(object)\n\nnew Int32Array(buffer)\nnew Int32Array(buffer, byteOffset)\nnew Int32Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Int32Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Int8Array/Int8Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Int8Array()\n\nThe **`Int8Array()`** constructor creates a typed array of\ntwos-complement 8-bit signed integers. The contents are initialized to `0`.\nOnce established, you can reference elements in the array using the object's methods, or\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew Int8Array()\nnew Int8Array(length)\nnew Int8Array(typedArray)\nnew Int8Array(object)\n\nnew Int8Array(buffer)\nnew Int8Array(buffer, byteOffset)\nnew Int8Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Int8Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/JSON/parse.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# JSON.parse()\n\nThe **`JSON.parse()`** method parses a JSON string, constructing the JavaScript value or object described by the string. An optional _reviver_ function can be provided to perform a transformation on the resulting object before it is returned.\n\n## Syntax\n\n```js\nJSON.parse(text)\nJSON.parse(text, reviver)\n```\n\n### Parameters\n\n- `text`\n  - : The string to parse as JSON.\n- `reviver` _**optional**_\n  - : If a function, this prescribes how each value originally produced by parsing is transformed before being returned. Non-callable values are ignored. The function is called with the following arguments:\n    - `key`\n      - : The key associated with the value.\n    - `value`\n      - : The value produced by parsing.\n\n### Return value\n\nThe `Object`, `Array`, string, number, boolean, or `null` value corresponding to the given JSON `text`.\n\n### Exceptions\n\n- [`SyntaxError`](../../globals/SyntaxError/SyntaxError.mdx)\n  - : Thrown if the string to parse is not valid JSON.\n\n## Description\n\n`JSON.parse()` parses a JSON string according to the [JSON grammar](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/JSON#full_json_grammar), then evaluates the string as if it's a JavaScript expression. The only instance where a piece of JSON text represents a different value from the same JavaScript expression is when dealing with the `\"__proto__\"` key — see [Object literal syntax vs. JSON](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Object_initializer#object_literal_syntax_vs._json).\n\n### The reviver parameter\n\nIf a `reviver` is specified, the value computed by parsing is _transformed_ before being returned. Specifically, the computed value and all its properties (in a [depth-first](https://en.wikipedia.org/wiki/Depth-first_search) fashion, beginning with the most nested properties and proceeding to the original value itself) are individually run through the `reviver`.\n\nThe `reviver` is called with the object containing the property being processed as `this`, and two arguments: `key` and `value`, representing the property name as a string (even for arrays) and the property value. If the `reviver` function returns [`undefined`](../../globals/undefined.mdx) (or returns no value — for example, if execution falls off the end of the function), the property is deleted from the object. Otherwise, the property is redefined to be the return value. If the `reviver` only transforms some values and not others, be certain to return all untransformed values as-is — otherwise, they will be deleted from the resulting object.\n\nSimilar to the `replacer` parameter of [`JSON.stringify()`](../../globals/JSON/stringify.mdx), `reviver` will be last called on the root object with an empty string as the `key` and the root object as the `value`. For JSON text parsing to primitive values, `reviver` will be called once.\n\nNote that `reviver` is run after the value is parsed. So, for example, numbers in JSON text will have already been converted to JavaScript numbers, and may lose precision in the process. To transfer large numbers without loss of precision, serialize them as strings, and revive them to [BigInts](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/BigInt), or other appropriate arbitrary precision formats.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/JSON/stringify.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# JSON.stringify()\n\nThe **`JSON.stringify()`** method converts a JavaScript value to a JSON string, optionally replacing values if a replacer function is specified or optionally including only the specified properties if a replacer array is specified.\n\n## Syntax\n\n```js\nJSON.stringify(value)\nJSON.stringify(value, replacer)\nJSON.stringify(value, replacer, space)\n```\n\n### Parameters\n\n- `value`\n  - : The value to convert to a JSON string.\n- `replacer` _**optional**_\n  - : A function that alters the behavior of the stringification process, or an array of strings or numbers naming properties of `value` that should be included in the output. If `replacer` is an array, all elements that are not strings or numbers (can be either primitives or wrapper objects), including `Symbol` values, are completely ignored. If `replacer` is anything other than a function or an array (e.g. [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or not provided), all properties of the object are included in the resulting JSON string.\n- `space` _**optional**_\n\n  - : A string or number that's used to insert white space (including indentation, line break characters, etc.) into the output JSON string for readability purposes.\n\n    If this is a number, it indicates the number of space characters to be used as indentation, clamped to 10 (that is, any number greater than `10` is treated as if it were `10`). Values less than 1 indicate that no space should be used.\n\n    If this is a string, the string (or the first 10 characters of the string, if it's longer than that) is inserted before every nested object or array.\n\n    If `space` is anything other than a string or number (can be either a primitive or a wrapper object) — for example, is [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or not provided — no white space is used.\n\n### Return value\n\nA JSON string representing the given value, or undefined.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if one of the following is true:\n    - `value` contains a circular reference.\n    - A `BigInt` value is encountered.\n\n## Description\n\n`JSON.stringify()` converts a value to JSON notation representing it:\n\n- `Boolean`, `Number`, `String`, and `BigInt` (obtainable via [`Object()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/Object)) objects are converted to the corresponding primitive values during stringification, in accordance with the traditional conversion semantics. `Symbol` objects (obtainable via [`Object()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/Object)) are treated as plain objects.\n- Attempting to serialize `BigInt` values will throw. However, if the BigInt has a `toJSON()` method (through monkeypatching: `BigInt.prototype.toJSON = ...`), that method can provide the serialization result. This constraint ensures that a proper serialization (and, very likely, its accompanying deserialization) behavior is always explicitly provided by the user.\n- [`undefined`](../../globals/undefined.mdx), `Function`, and `Symbol` values are not valid JSON values. If any such values are encountered during conversion, they are either omitted (when found in an object) or changed to [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) (when found in an array). `JSON.stringify()` can return `undefined` when passing in \"pure\" values like `JSON.stringify(() => {})` or `JSON.stringify(undefined)`.\n- The numbers [`Infinity`](../../globals/Infinity.mdx) and [`NaN`](../../globals/NaN.mdx), as well as the value [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null), are all considered `null`. (But unlike the values in the previous point, they would never be omitted.)\n- Arrays are serialized as arrays (enclosed by square brackets). Only array indices between 0 and `length - 1` (inclusive) are serialized; other properties are ignored.\n- For other objects:\n\n  - All `Symbol`-keyed properties will be completely ignored, even when using the [`replacer`](#the-replacer-parameter) parameter.\n\n  - If the value has a `toJSON()` method, it's responsible to define what data will be serialized. Instead of the object being serialized, the value returned by the `toJSON()` method when called will be serialized. `JSON.stringify()` calls `toJSON` with one parameter, the `key`, which has the same semantic as the `key` parameter of the [`replacer`](#the-replacer-parameter) function:\n\n    - if this object is a property value, the property name\n    - if it is in an array, the index in the array, as a string\n    - if `JSON.stringify()` was directly called on this object, an empty string\n\n    `Date` objects implement the [`toJSON()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toJSON) method which returns a string (the same as [`date.toISOString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)). Thus, they will be stringified as strings.\n\n  - Only [enumerable own properties](https://developer.mozilla.org/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) are visited. This means [Map](../../globals/Map/Map.mdx), [Set](../../globals/Set/Set.mdx), etc. will become `\"{}\"`. You can use the [`replacer`](#the-replacer-parameter) parameter to serialize them to something more useful.\n\n    Properties are visited using the same algorithm as [`Object.keys()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/keys), which has a well-defined order and is stable across implementations. For example, `JSON.stringify` on the same object will always produce the same string, and `JSON.parse(JSON.stringify(obj))` would produce an object with the same key ordering as the original (assuming the object is completely JSON-serializable).\n\n### The replacer parameter\n\nThe `replacer` parameter can be either a function or an array.\n\nAs an array, its elements indicate the names of the properties in the object that should be included in the resulting JSON string. Only string and number values are taken into account; symbol keys are ignored.\n\nAs a function, it takes two parameters: the `key` and the `value` being stringified. The object in which the key was found is provided as the `replacer`'s `this` context.\n\nThe `replacer` function is called for the initial object being stringified as well, in which case the `key` is an empty string (`\"\"`). It is then called for each property on the object or array being stringified. Array indices will be provided in its string form as `key`. The current property value will be replaced with the `replacer`'s return value for stringification. This means:\n\n- If you return a number, string, boolean, or `null`, that value is directly serialized and used as the property's value. (Returning a BigInt will throw as well.)\n- If you return a `Function`, `Symbol`, or [`undefined`](../../globals/undefined.mdx), the property is not included in the output.\n- If you return any other object, the object is recursively stringified, calling the `replacer` function on each property.\n\n> **Note:** When parsing JSON generated with `replacer` functions, you would likely want to use the [`reviver`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#using_the_reviver_parameter) parameter to perform the reverse operation.\n\nTypically, array elements' index would never shift (even when the element is an invalid value like a function, it will become `null` instead of omitted). Using the `replacer` function allows you to control the order of the array elements by returning a different array.\n\n### The space parameter\n\nThe `space` parameter may be used to control spacing in the final string.\n\n- If it is a number, successive levels in the stringification will each be indented by this many space characters.\n- If it is a string, successive levels will be indented by this string.\n\nEach level of indentation will never be longer than 10. Number values of `space` are clamped to 10, and string values are truncated to 10 characters.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Map/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get Map\\[Symbol.species]\n\nThe **`Map[Symbol.species]`** accessor property is an unused accessor property specifying how to copy `Map` objects.\n\n## Syntax\n\n```js\nMap[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct copied `Map` instances.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `Map` objects. Subclass constructors may override it to change the constructor assignment.\n\n> **Note:** This property is currently unused by all `Map` methods.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Map/Map.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map()\n\nThe **`Map()` constructor** creates [Map](../../globals/Map/Map.mdx) objects.\n\n## Syntax\n\n```js\nnew Map()\nnew Map(iterable)\n```\n\n> **Note:** `Map()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable` _**optional**_\n  - : An `Array` or other\n    [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) object\n    whose elements are key-value pairs. (For example, arrays with two elements,\n    such as `[[ 1, 'one' ],[ 2, 'two' ]]`.) Each key-value pair is added to the\n    new `Map`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Map/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype\\[Symbol.iterator]()\n\nThe **`Symbol.iterator`** method of a `Map` object implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows maps to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the key-value pairs of the map.\n\nThe initial value of this property is the same function object as the initial value of the [`Map.prototype.entries`](../../../globals/Map/prototype/entries.mdx) property.\n\n## Syntax\n\n```js\nmap[Symbol.iterator]()\n```\n\n### Return value\n\nThe same return value as [`Map.prototype.entries()`](../../../globals/Map/prototype/entries.mdx): a new iterable iterator object that yields the key-value pairs of the map.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Map/prototype/clear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.clear()\n\nThe **`clear()`** method removes all elements from a `Map` object.\n\n## Syntax\n\n```js\nclear()\n```\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Map/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.delete()\n\nThe **`delete()`** method removes the specified element from a `Map` object by\nkey.\n\n## Syntax\n\n```js\ndelete(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to remove from the `Map` object.\n\n### Return value\n\n`true` if an element in the `Map` object existed and has been removed, or\n`false` if the element does not exist.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Map/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.entries()\n\nThe **`entries()`** method returns a new\n_[iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators)_ object\nthat contains the `[key, value]` pairs for each element in the `Map` object in\ninsertion order. In this particular case, this iterator object is also an\niterable, so the for-of loop can be used. When the protocol `[Symbol.iterator]`\nis used, it returns a function that, when invoked, returns this iterator itself.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nA new [Map](../../../globals/Map/Map.mdx) iterator object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Map/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.forEach()\n\nThe **`forEach()`** method executes a provided function once per each key/value\npair in the `Map` object, in insertion order.\n\n## Syntax\n\n```js\n// Arrow function\nforEach(() => { /* … */ } )\nforEach((value) => { /* … */ } )\nforEach((value, key) => { /* … */ } )\nforEach((value, key, map) => { /* … */ } )\n\n// Callback function\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n\n// Inline callback function\nforEach(function() { /* … */ })\nforEach(function(value) { /* … */ })\nforEach(function(value, key) { /* … */ })\nforEach(function(value, key, map) { /* … */ })\nforEach(function(value, key, map) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n  - : Function to execute for each entry in the map. It takes the following\n    arguments:\n    - `value` _**optional**_\n      - : Value of each iteration.\n    - `key` _**optional**_\n      - : Key of each iteration.\n    - `map` _**optional**_\n      - : The map being iterated.\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `callback`.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n## Description\n\nThe `forEach` method executes the provided `callback` once for each key of the\nmap which actually exist. It is not invoked for keys which have been deleted.\nHowever, it is executed for values which are present but have the value\n`undefined`.\n\n`callback` is invoked with **three arguments**:\n\n- the entry's `value`\n- the entry's `key`\n- the **`Map` object** being traversed\n\nIf a `thisArg` parameter is provided to `forEach`, it will be passed to\n`callback` when invoked, for use as its `this` value. Otherwise, the value\n`undefined` will be passed for use as its `this` value. The `this` value\nultimately observable by `callback` is determined according to\n[the usual rules for determining the `this` seen by a function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this).\n\nEach value is visited once, except in the case when it was deleted and re-added\nbefore `forEach` has finished. `callback` is not invoked for values deleted\nbefore being visited. New values added before `forEach` has finished will be\nvisited.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Map/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.get()\n\nThe **`get()`** method returns a specified element from a `Map` object. If the\nvalue that is associated to the provided key is an object, then you will get a\nreference to that object and any change made to that object will effectively\nmodify it inside the `Map` object.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to return from the `Map` object.\n\n### Return value\n\nThe element associated with the specified key, or\n[`undefined`](../../../globals/undefined.mdx) if the key can't be found in the `Map` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Map/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.has()\n\nThe **`has()`** method returns a boolean indicating whether an element with the\nspecified key exists or not.\n\n## Syntax\n\n```js\nhas(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to test for presence in the `Map` object.\n\n### Return value\n\n`true` if an element with the specified key exists in the `Map` object;\notherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Map/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.keys()\n\nThe **`keys()`** method returns a new\n_[iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators)_ object\nthat contains the keys for each element in the `Map` object in insertion order. In this particular case, this iterator object is also an iterable, so a [for...of](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loop can be used.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nA new [Map](../../../globals/Map/Map.mdx) iterator object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Map/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.set()\n\nThe **`set()`** method adds or updates an entry in a `Map` object with a specified key and a value.\n\n## Syntax\n\n```js\nset(key, value)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to add to the `Map` object. The key may be any [JavaScript type](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures) (any [primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_values) or any type of [JavaScript object](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#objects)).\n- `value`\n  - : The value of the element to add to the `Map` object. The value may be any [JavaScript type](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures) (any [primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_values) or any type of [JavaScript object](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#objects)).\n\n### Return value\n\nThe `Map` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Map/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.size\n\nThe **`size`** accessor property returns the number of elements in a\n[Map](../../../globals/Map/Map.mdx) object.\n\n## Description\n\nThe value of `size` is an integer representing how many entries the `Map` object\nhas. A set accessor function for `size` is `undefined`; you can not change this\nproperty.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Map/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.values()\n\nThe **`values()`** method returns a new\n_[iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators)_ object\nthat contains the values for each element in the `Map` object in insertion\norder.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nA new [Map](../../../globals/Map/Map.mdx) iterator object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/E.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.E\n\nThe **`Math.E`** property represents Euler's number, the base of natural logarithms, e, which is approximately 2.718.\n\n## Value\n\n`2.718281828459045`\n\n## Description\n\nBecause `E` is a static property of `Math`, you always use it as `Math.E`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/LN10.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LN10\n\nThe **`Math.LN10`** property represents the natural logarithm of 10, approximately 2.302.\n\n## Value\n\n`2.302585092994046`\n\n## Description\n\nBecause `LN10` is a static property of `Math`, you always use it as `Math.LN10`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/LN2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LN2\n\nThe **`Math.LN2`** property represents the natural logarithm of 2, approximately 0.693:\n\n## Value\n\n`0.6931471805599453`\n\n## Description\n\nBecause `LN2` is a static property of `Math`, you always use it as `Math.LN2`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/LOG10e.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LOG10E\n\nThe **`Math.LOG10E`** property represents the base 10 logarithm of [E](./E.mdx), approximately 0.434.\n\n## Value\n\n`0.4342944819032518`\n\n## Description\n\nBecause `LOG10E` is a static property of `Math`, you always use it as `Math.LOG10E`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/LOG2e.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LOG2E\n\nThe **`Math.LOG2E`** property represents the base 2 logarithm of [E](./E.mdx), approximately 1.442.\n\n## Value\n\n`1.4426950408889634`\n\n## Description\n\nBecause `LOG2E` is a static property of `Math`, you always use it as `Math.LOG2E`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/PI.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.PI\n\nThe **`Math.PI`** property represents the ratio of the circumference of a circle to its diameter, approximately 3.14159.\n\n## Value\n\n`3.141592653589793`\n\n## Description\n\nBecause `PI` is a static property of `Math`, you always use it as `Math.PI`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/SQRT1_2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.SQRT1_2\n\nThe **`Math.SQRT1_2`** property represents the square root of 1/2, which is approximately 0.707.\n\n## Value\n\n`0.7071067811865476`\n\n## Description\n\n`Math.SQRT1_2` is a constant and a more performant equivalent to [`Math.sqrt(0.5)`](./sqrt.mdx).\n\nBecause `SQRT1_2` is a static property of `Math`, you always use it as `Math.SQRT1_2`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/SQRT2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.SQRT2\n\nThe **`Math.SQRT2`** property represents the square root of 2, approximately 1.414.\n\n## Value\n\n`0.7071067811865476`\n\n## Description\n\n`Math.SQRT2` is a constant and a more performant equivalent to [`Math.sqrt(2)`](./sqrt.mdx).\n\nBecause `SQRT2` is a static property of `Math`, you always use it as `Math.SQRT2`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/abs.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.abs()\n\nThe **`Math.abs()`** function returns the absolute value of a number.\n\n\n## Syntax\n\n```js\nMath.abs(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe absolute value of `x`. If `x` is negative (including `-0`), returns `-x`. Otherwise, returns `x`. The result is therefore always a positive number or `0`.\n\n## Description\n\nBecause `abs()` is a static method of `Math`, you always use it as `Math.abs()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/acos.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.acos()\n\nThe **`Math.acos()`** function returns the inverse cosine (in radians) of a number.\n\n## Syntax\n\n```js\nMath.acos(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number between -1 and 1, inclusive, representing the angle's cosine value.\n\n### Return value\n\nThe inverse cosine (angle in radians between 0 and π, inclusive) of `x`. If `x` is less than -1 or greater than 1, returns `NaN`.\n\n## Description\n\nBecause `acos()` is a static method of `Math`, you always use it as `Math.acos()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/acosh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.acosh()\n\nThe **`Math.acosh()`** function returns the inverse hyperbolic cosine of a number.\n\n## Syntax\n\n```js\nMath.acosh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 1.\n\n### Return value\n\nThe inverse hyperbolic cosine of `x`. If `x` is less than 1, returns `NaN`.\n\n## Description\n\nBecause `acosh()` is a static method of `Math`, you always use it as `Math.acosh()`, rather than as a method of a `Math` object you created (`Math` is no constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/asin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.asin()\n\nThe **`Math.asin()`** function returns the inverse sine (in radians) of a number.\n\n## Syntax\n\n```js\nMath.asin(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number between -1 and 1, inclusive, representing the angle's sine value.\n\n### Return value\n\nThe inverse sine (angle in radians between <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math>, inclusive) of `x`. If `x` is less than -1 or greater than 1, returns `NaN`.\n\n## Description\n\nBecause `asin()` is a static method of `Math`, you always use it as `Math.asin()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/asinh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.asinh()\n\nThe **`Math.asinh()`** function returns the inverse hyperbolic sine of a number. \n\n## Syntax\n\n```js\nMath.asinh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe inverse hyperbolic sine of `x`.\n\n## Description\n\nBecause `asinh()` is a static method of `Math`, you always use it as `Math.asinh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/atan.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.atan()\n\nThe **`Math.atan()`** function returns the inverse tangent (in radians) of a number.\n\n## Syntax\n\n```js\nMath.atan(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe inverse tangent (angle in radians between <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math> and <math><semantics><mfrac><mi>π</mi><mn>2</mn></mfrac></semantics></math>, inclusive) of `x`. If `x` is `Infinity`, it returns <math><semantics><mfrac><mi>π</mi><mn>2</mn></mfrac></semantics></math>. If `x` is `-Infinity`, it returns <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math>.\n\n## Description\n\nBecause `atan()` is a static method of `Math`, you always use it as `Math.atan()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/atan2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.atan2()\n\nThe **`Math.atan2()`** function returns the angle in the plane (in radians) between the positive x-axis and the ray from (0, 0) to the point (x, y), for `Math.atan2(y, x)`.\n\n## Syntax\n\n```js\nMath.atan2(y, x)\n```\n\n### Parameters\n\n- `y`\n  - : The y coordinate of the point.\n- `x`\n  - : The x coordinate of the point.\n\n### Return value\n\nThe angle in radians (between -π and π, inclusive) between the positive x-axis and the ray from (0, 0) to the point (x, y).\n\n## Description\n\nThe `Math.atan2()` method measures the counterclockwise angle θ, in radians, between the positive x-axis and the point `(x, y)`. Note that the arguments to this function pass the y-coordinate first and the x-coordinate second.\n\n`Math.atan2()` is passed separate `x` and `y` arguments, while [`Math.atan()`](./atan.mdx) is passed the ratio of those two arguments. `Math.atan2(y, x)` differs from `Math.atan(y / x)` in the following cases:\n\n| `x`                  | `y`         | `Math.atan2(y, x)` | `Math.atan(y / x)` |\n| -------------------- | ----------- | ------------------ | ------------------ |\n| `Infinity`           | `Infinity`  | π / 4              | `NaN`              |\n| `Infinity`           | `-Infinity` | -π / 4             | `NaN`              |\n| `-Infinity`          | `Infinity`  | 3π / 4             | `NaN`              |\n| `-Infinity`          | `-Infinity` | -3π / 4            | `NaN`              |\n| 0                    | 0           | 0                  | `NaN`              |\n| 0                    | -0          | -0                 | `NaN`              |\n| < 0 (including `-0`) | 0           | π                  | 0                  |\n| < 0 (including `-0`) | -0          | -π                 | 0                  |\n| `-Infinity`          | > 0         | π                  | -0                 |\n| -0                   | > 0         | π / 2              | -π / 2             |\n| `-Infinity`          | < 0         | -π                 | 0                  |\n| -0                   | < 0         | -π / 2             | π / 2              |\n\nIn addition, for points in the second and third quadrants (`x < 0`), `Math.atan2()` would output an angle less than <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math> or greater than <math><semantics><mfrac><mi>π</mi><mn>2</mn></mfrac></semantics></math>.\n\nBecause `atan2()` is a static method of `Math`, you always use it as `Math.atan2()`, rather than as a method of a `Math` object you created (`Math` is not a constructor)."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/atanh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.atanh()\n\nThe **`Math.atanh()`** function returns the inverse hyperbolic tangent of a number. \n\n## Syntax\n\n```js\nMath.atanh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number between -1 and 1, inclusive.\n\n### Return value\n\nThe inverse hyperbolic tangent of `x`. If `x` is 1, returns `Infinity`. If `x` is -1, returns `-Infinity`. If `x` is less than -1 or greater than 1, returns `NaN`.\n\n## Description\n\nBecause `atanh()` is a static method of `Math`, you always use it as `Math.atanh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/cbrt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.cbrt()\n\nThe **`Math.cbrt()`** function returns the cube root of a number.\n\n## Syntax\n\n```js\nMath.cbrt(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe cube root of `x`.\n\n## Description\n\nBecause `cbrt()` is a static method of `Math`, you always use it as `Math.cbrt()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/ceil.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.ceil()\n\nThe **`Math.ceil()`** function always rounds up and returns the smaller integer greater than or equal to a given number.\n\n## Syntax\n\n```js\nMath.ceil(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe smallest integer greater than or equal to `x`. It's the same value as [`-Math.floor(-x)`](./floor.mdx).\n\n## Description\n\nBecause `ceil()` is a static method of `Math`, you always use it as `Math.ceil()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/clz32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.clz32()\n\nThe **`Math.clz32()`** function returns the number of leading zero bits in the 32-bit binary representation of a number.\n\n## Syntax\n\n```js\nMath.clz32(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe number of leading zero bits in the 32-bit binary representation of `x`.\n\n## Description\n\n`clz32` is short for **C**ount**L**eading**Z**eros**32**.\n\nIf `x` is not a number, it will be converted to a number first, then converted to a 32-bit unsigned integer.\n\nIf the converted 32-bit unsigned integer is `0`, `32` is returned, because all bits are `0`. If the most significant bit is `1` (i.e. the number is greater than or equal to 2<sup>31</sup>), `0` is returned.\n\nThis function is particularly useful for systems that compile to JS, like [Emscripten](https://emscripten.org).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/cos.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.cos()\n\nThe **`Math.cos()`** function returns the cosine of a number in radians.\n\n## Syntax\n\n```js\nMath.cos(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number representing an angle in radians.\n\n### Return value\n\nThe cosine of `x`, between -1 and 1, inclusive. If `x` is `Infinity`, `-Infinity`, or `NaN`, returns `NaN`.\n\n## Description\n\nBecause `cos()` is a static method of `Math`, you always use it as `Math.cos()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/cosh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.cosh()\n\nThe **`Math.cosh()`** function returns the hyperbolic cosine of a number. \n\n## Syntax\n\n```js\nMath.cosh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe hyperbolic cosine of `x`.\n\n## Description\n\nBecause `cosh()` is a static method of `Math`, you always use it as `Math.cosh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor)."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/exp.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.exp()\n\nThe **`Math.exp()`** function returns [E](./E.mdx) raised to the power of a number.\n\n## Syntax\n\n```js\nMath.exp(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nA nonnegative number representing e<sup>x</sup>, where e is [the base of the natural logarithm](./E.mdx).\n\n## Description\n\nBecause `exp()` is a static method of `Math`, you always use it as `Math.exp()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nBeware that `e` to the power of a number very close to 0 will be very close to 1 and suffer from loss of precision. In this case, you may want to use `Math.expm1` instead, and obtain a much higher-precision fractional part of the answer.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/expm1.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.expm1()\n\nThe **`Math.expm1()`** function returns [E](./E.mdx) raised to the power of a number, subtracted by 1.\n\n## Syntax\n\n```js\nMath.expm1(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nA number representing e<sup>x</sup> - 1, where e is [the base of the natural logarithm](./E.mdx).\n\n## Description\n\nFor very small values of _x_, adding 1 can reduce or eliminate precision. The double floats used in JS give you about 15 digits of precision. 1 + 1e-15 \\= 1.000000000000001, but 1 + 1e-16 = 1.000000000000000 and therefore exactly 1.0 in that arithmetic, because digits past 15 are rounded off.\n\nWhen you calculate <math display=\"inline\"><semantics><msup><mi mathvariant=\"normal\">e</mi><mi>x</mi></msup></semantics></math> where x is a number very close to 0, you should get an answer very close to 1 + x, because <math display=\"inline\"><semantics><mrow><munder><mo lspace=\"0em\" rspace=\"0em\">lim</mo><mrow><mi>x</mi><mo stretchy=\"false\">→</mo><mn>0</mn></mrow></munder><mfrac><mrow><msup><mi mathvariant=\"normal\">e</mi><mi>x</mi></msup><mo>−</mo><mn>1</mn></mrow><mi>x</mi></mfrac><mo>=</mo><mn>1</mn></mrow></semantics></math>. If you calculate `Math.exp(1.1111111111e-15) - 1`, you should get an answer close to `1.1111111111e-15`. Instead, due to the highest significant figure in the result of `Math.exp` being the units digit `1`, the final value ends up being `1.1102230246251565e-15`, with only 3 correct digits. If, instead, you calculate `Math.exp1m(1.1111111111e-15)`, you will get a much more accurate answer `1.1111111111000007e-15`, with 11 correct digits of precision.\n\nBecause `expm1()` is a static method of `Math`, you always use it as `Math.expm1()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/floor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.floor()\n\nThe **`Math.floor()`** function always rounds down and returns the largest integer less than or equal to a given number.\n\n## Syntax\n\n```js\nMath.floor(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe largest integer smaller than or equal to `x`. It's the same value as [`-Math.ceil(-x)`](./ceil.mdx).\n\n## Description\n\nBecause `floor()` is a static method of `Math`, you always use it as `Math.floor()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/fround.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.fround()\n\nThe **`Math.fround()`** function returns the nearest [32-bit single precision](https://en.wikipedia.org/wiki/Single-precision_floating-point_format) float representation of a number.\n\n## Syntax\n\n```js\nMath.fround(doubleFloat)\n```\n\n### Parameters\n\n- `doubleFloat`\n  - : A number.\n\n### Return value\n\nThe nearest [32-bit single precision](https://en.wikipedia.org/wiki/Single-precision_floating-point_format) float representation of `x`.\n\n## Description\n\nJavaScript uses 64-bit double floating-point numbers internally, which offer a very high precision. However, sometimes you may be working with 32-bit floating-point numbers, for example if you are reading values from a `Float32Array`. This can create confusion: checking a 64-bit float and a 32-bit float for equality may fail even though the numbers are seemingly identical.\n\nTo solve this, `Math.fround()` can be used to cast the 64-bit float to a 32-bit float. Internally, JavaScript continues to treat the number as a 64-bit float, it just performs a \"round to even\" on the 23rd bit of the mantissa, and sets all following mantissa bits to `0`. If the number is outside the range of a 32-bit float, `Infinity` or `-Infinity` is returned.\n\nBecause `fround()` is a static method of `Math`, you always use it as `Math.fround()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/hypot.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.hypot()\n\nThe **`Math.hypot()`** function returns the square root of the sum of squares of its arguments. \n\n## Syntax\n\n```js\nMath.hypot()\nMath.hypot(value0)\nMath.hypot(value0, value1)\nMath.hypot(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `value1`, …, `valueN`\n  - : Numbers.\n\n### Return value\n\nThe square root of the sum of squares of the given arguments. Returns Infinity if any of the arguments is ±Infinity. Otherwise, if at least one of the arguments is or is converted to NaN, returns NaN. Returns `0` if no arguments are given or all arguments are ±0.\n\n## Description\n\nCalculating the hypotenuse of a right triangle, or the magnitude of a complex number, uses the formula `Math.sqrt(v1*v1 + v2*v2)`, where v1 and v2 are the lengths of the triangle's legs, or the complex number's real and complex components. The corresponding distance in 2 or more dimensions can be calculated by adding more squares under the square root: `Math.sqrt(v1*v1 + v2*v2 + v3*v3 + v4*v4)`.\n\nThis function makes this calculation easier and faster; you call `Math.hypot(v1, v2)`, or `Math.hypot(v1, /* … ,*/, vN)`.\n\n`Math.hypot` also avoids overflow/underflow problems if the magnitude of your numbers is very large. The largest number you can represent in JS is [`Number.MAX_VALUE`](../Number/MAX_VALUE.mdx), which is around 10<sup>308</sup>. If your numbers are larger than about 10<sup>154</sup>, taking the square of them will result in Infinity. For example, `Math.sqrt(1e200*1e200 + 1e200*1e200) = Infinity`. If you use `hypot()` instead, you get a better answer: `Math.hypot(1e200, 1e200) = 1.4142...e+200` . This is also true with very small numbers. `Math.sqrt(1e-200*1e-200 + 1e-200*1e-200) = 0`, but `Math.hypot(1e-200, 1e-200) = 1.4142...e-200`.\n\nWith one argument, `Math.hypot()` is equivalent to [`Math.abs()`](./abs.mdx). [`Math.hypot.length`](../Function/prototype/length.mdx) is 2, which weakly signals that it's designed to handle at least two parameters.\n\nBecause `hypot()` is a static method of `Math`, you always use it as `Math.hypot()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/imul.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.imul()\n\nThe **`Math.imul()`** function returns the result of the C-like 32-bit multiplication of the two parameters.\n\n\n## Syntax\n\n```js\nMath.imul(a, b)\n```\n\n### Parameters\n\n- `a`\n  - : First number.\n- `b`\n  - : Second number.\n\n### Return value\n\nThe result of the C-like 32-bit multiplication of the given arguments.\n\n## Description\n\n`Math.imul()` allows for 32-bit integer multiplication with C-like semantics. This feature is useful for projects like [Emscripten](https://en.wikipedia.org/wiki/Emscripten).\n\nBecause `imul()` is a static method of `Math`, you always use it as `Math.imul()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nIf you use normal JavaScript floating point numbers in `imul()`, you will experience a degrade in performance. This is because of the costly conversion from a floating point to an integer for multiplication, and then converting the multiplied integer back into a floating point.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/log.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log()\n\nThe **`Math.log()`** function returns the natural logarithm (base [E](./E.mdx)) of a number.\n\n## Syntax\n\n```js\nMath.log(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe natural logarithm (base [E](./E.mdx)) of `x`. If `x` is ±0, returns [`-Infinity`](../Number/NEGATIVE_INFINITY.mdx). If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `log()` is a static method of `Math`, you always use it as `Math.log()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nIf you need the natural log of 2 or 10, use the constants `Math.LN2` or `Math.LN10`. If you need a logarithm to base 2 or 10, use `Math.log2()` or `Math.log10()`. If you need a logarithm to other bases, use `Math.log(x) / Math.log(otherBase)` as in the example below; you might want to precalculate `1 / Math.log(otherBase)` since multiplication in `Math.log(x) * constant` is much faster.\n\nBeware that positive numbers very close to 1 can suffer from loss of precision and make its natural logarithm less accurate. In this case, you may want to use `Math.log1p` instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/log10.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log10()\n\nThe **`Math.log10()`** function returns the base 10 logarithm of a number. \n\n## Syntax\n\n```js\nMath.log10(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe base 10 logarithm of `x`. If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `log10()` is a static method of `Math`, you always use it as `Math.log10()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nThis function is the equivalent of `Math.log(x) / Math.log(10)`. For `log10(e)`, use the constant `Math.LOG10E`, which is 1 / `Math.LN10`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/log1p.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log1p()\n\nThe **`Math.log1p()`** function returns the natural logarithm (base [E](./E.mdx)) of `1 + x`, where `x` is the argument.\n\n## Syntax\n\n```js\nMath.log1p(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to -1.\n\n### Return value\n\nThe natural logarithm (base [E](./E.mdx)) of `x + 1`. If `x` is -1, returns [`-Infinity`](../Number/NEGATIVE_INFINITY.mdx). If `x < -1`, returns `NaN`.\n\n## Description\n\nFor very small values of _x_, adding 1 can reduce or eliminate precision. The double floats used in JS give you about 15 digits of precision. 1 + 1e-15 \\= 1.000000000000001, but 1 + 1e-16 = 1.000000000000000 and therefore exactly 1.0 in that arithmetic, because digits past 15 are rounded off.\n\nWhen you calculate log(1 + _x_) where _x_ is a small positive number, you should get an answer very close to _x_, because <math display=\"inline\"><semantics><mrow><munder><mo movablelimits=\"true\" form=\"prefix\">lim</mo><mrow ><mi>x</mi><mo stretchy=\"false\">→</mo><mn>0</mn></mrow></munder><mfrac><mrow><mi>log</mi><mo>⁡</mo><mo stretchy=\"false\">(</mo><mn>1</mn><mo>+</mo><mi>x</mi><mo stretchy=\"false\">)</mo></mrow><mi>x</mi></mfrac><mo>=</mo><mn>1</mn></mrow></semantics></math>. If you calculate `Math.log(1 + 1.1111111111e-15)`, you should get an answer close to `1.1111111111e-15`. Instead, you will end up taking the logarithm of `1.00000000000000111022` (the roundoff is in binary, so sometimes it gets ugly), and get the answer 1.11022…e-15, with only 3 correct digits. If, instead, you calculate `Math.log1p(1.1111111111e-15)`, you will get a much more accurate answer `1.1111111110999995e-15`, with 15 correct digits of precision (actually 16 in this case).\n\nIf the value of `x` is less than -1, the return value is always `NaN`.\n\nBecause `log1p()` is a static method of `Math`, you always use it as `Math.log1p()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/log2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log2()\n\nThe **`Math.log2()`** function returns the base 2 logarithm of a number.\n\n## Syntax\n\n```js\nMath.log2(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe base 2 logarithm of `x`. If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `log2()` is a static method of `Math`, you always use it as `Math.log2()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nThis function is the equivalent of `Math.log(x) / Math.log(2)`. For `log2(e)`, use the constant `Math.LOG2E`, which is 1 / `Math.LN2`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/max.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.max()\n\nThe **`Math.max()`** function returns the largest of the numbers given as input parameters, or `-Infinity` if there are no parameters.\n\n## Syntax\n\n```js\nMath.max()\nMath.max(value0)\nMath.max(value0, value1)\nMath.max(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `value1`, `value2`, … , `valueN`\n  - : Zero or more numbers among which the largest value will be selected and returned.\n\n### Return value\n\nThe largest of the given numbers. Returns `NaN` if any of the parameters is or is converted into `NaN`. Returns `-Infinity` if no parameters are provided.\n\n## Description\n\nBecause `max()` is a static method of `Math`, you always use it as `Math.max()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n[`Math.max.length`](../Function/prototype/length.mdx) is 2, which weakly signals that it's designed to handle at least two parameters.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/min.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.min()\n\nThe **`Math.min()`** function returns the smallest of the numbers given as input parameters, or `Infinity` if there are no parameters.\n\n## Syntax\n\n```js\nMath.min()\nMath.min(value0)\nMath.min(value0, value1)\nMath.min(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `value1`, …, `valueN`\n  - : Zero or more numbers among which the lowest value will be selected and returned.\n\n### Return value\n\nThe smallest of the given numbers. Returns `NaN` if any of the parameters is or is converted into `NaN`. Returns `Infinity` if no parameters are provided.\n\n## Description\n\nBecause `min()` is a static method of `Math`, you always use it as `Math.min()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n[`Math.min.length`](../Function/prototype/length.mdx) is 2, which weakly signals that it's designed to handle at least two parameters.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/pow.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.pow()\n\nThe **`Math.pow()`** method returns the value of a base raised to a power.\n\n## Syntax\n\n```js\nMath.pow(base, exponent)\n```\n\n### Parameters\n\n- `base`\n  - : The base number.\n- `exponent`\n  - : The exponent number.\n\n### Return value\n\nA number representing `base` taken to the power of `exponent`. Returns `NaN` in one of the following cases:\n\n- `exponent` is `NaN`.\n- `base` is `NaN` and `exponent` is not `0`.\n- `base` is ±1 and `exponent` is ±`Infinity`.\n- `base < 0` and `exponent` is not an integer.\n\n## Description\n\n`Math.pow()` is equivalent to the `**` operator, except `Math.pow()` only accepts numbers.\n\n`Math.pow(NaN, 0)` (and the equivalent `NaN ** 0`) is the only case where `NaN` doesn't propagate through mathematical operations — it returns `1` despite the operand being `NaN`. In addition, the behavior where `base` is 1 and `exponent` is non-finite (±Infinity or `NaN`) is different from IEEE 754, which specifies that the result should be 1, whereas JavaScript returns `NaN` to preserve backward compatibility with its original behavior.\n\nBecause `pow()` is a static method of `Math`, use it as `Math.pow()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/random.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.random()\n\nThe **`Math.random()`** function returns a floating-point, pseudo-random number that's greater than or equal to 0 and less than 1, with approximately uniform distribution over that range — which you can then scale to your desired range. The implementation selects the initial seed to the random number generation algorithm; it cannot be chosen or reset by the user.\n\n> **Note:** `Math.random()` _does not_ provide cryptographically secure random numbers. Do not use them for anything related to security. Use the Web Crypto API instead, and more precisely the `crypto.getRandomValues()` method.\n\n## Syntax\n\n```js\nMath.random()\n```\n\n### Return value\n\nA floating-point, pseudo-random number between 0 (inclusive) and 1 (exclusive).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/round.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.round()\n\nThe **`Math.round()`** function returns the value of a number rounded to the nearest integer.\n\n## Syntax\n\n```js\nMath.round(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe value of `x` rounded to the nearest integer.\n\n## Description\n\nIf the fractional portion of the argument is greater than 0.5, the argument is rounded to the integer with the next higher absolute value. If it is less than 0.5, the argument is rounded to the integer with the lower absolute value. If the fractional portion is exactly 0.5, the argument is rounded to the next integer in the direction of +∞.\n\n> **Note:** This differs from many languages' `round()` functions, which often round half-increments _away from zero_, giving a different result in the case of negative numbers with a fractional part of exactly 0.5.\n\n`Math.round(x)` is not exactly the same as [`Math.floor(x + 0.5)`](./floor.mdx). When `x` is -0, or -0.5 ≤ x < 0, `Math.round(x)` returns -0, while `Math.floor(x + 0.5)` returns 0. However, neglecting that difference and potential precision errors, `Math.round(x)` and `Math.floor(x + 0.5)` are generally equivalent.\n\nBecause `round()` is a static method of `Math`, you always use it as `Math.round()`, rather than as a method of a `Math` object you created (`Math` has no constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/sign.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sign()\n\nThe **`Math.sign()`** function returns 1 or -1, indicating the sign of the number passed as argument. If the input is 0 or -0, it will be returned as-is.\n\n## Syntax\n\n```js\nMath.sign(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nA number representing the sign of `x`:\n\n- If `x` is positive, returns `1`.\n- If `x` is negative, returns `-1`.\n- If `x` is positive zero, returns `0`.\n- If `x` is negative zero, returns `-0`.\n- Otherwise, returns `NaN`.\n\n## Description\n\nBecause `sign()` is a static method of `Math`, you always use it as `Math.sign()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/sin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sin()\n\nThe **`Math.sin()`** function returns the sine of a number in radians.\n\n## Syntax\n\n```js\nMath.sin(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number representing an angle in radians.\n\n### Return value\n\nThe sine of `x`, between -1 and 1, inclusive. If `x` is `Infinity`, `-Infinity`, or `NaN`, returns `NaN`.\n\n## Description\n\nBecause `sin()` is a static method of `Math`, you always use it as `Math.sin()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/sinh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sinh()\n\nThe **`Math.sinh()`** function returns the hyperbolic sine of a number. \n\n## Syntax\n\n```js\nMath.sinh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe hyperbolic sine of `x`.\n\n## Description\n\nBecause `sinh()` is a static method of `Math`, you always use it as `Math.sinh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/sqrt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sqrt()\n\nThe **`Math.sqrt()`** function returns the square root of a number.\n\n## Syntax\n\n```js\nMath.sqrt(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe square root of `x`, a nonnegative number. If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `sqrt()` is a static method of `Math`, you always use it as `Math.sqrt()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/tan.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.tan()\n\nThe **`Math.tan()`** function returns the tangent of a number in radians.\n\n\n## Syntax\n\n```js\nMath.tan(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number representing an angle in radians.\n\n### Return value\n\nThe tangent of `x`. If `x` is `Infinity`, `-Infinity`, or `NaN`, returns `NaN`.\n\n> **Note:** Due to floating point precision, it's not possible to obtain the exact value π/2, so the result is always finite if not `NaN`.\n\n## Description\n\nBecause `tan()` is a static method of `Math`, you always use it as `Math.tan()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/tanh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.tanh()\n\nThe **`Math.tanh()`** function returns the hyperbolic tangent of a number. \n\n## Syntax\n\n```js\nMath.tanh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe hyperbolic tangent of `x`.\n\n## Description\n\nBecause `tanh()` is a static method of `Math`, you always use it as `Math.tanh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Math/trunc.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.trunc()\n\nThe **`Math.trunc()`** function returns the integer part of a number by removing any fractional digits.\n\n## Syntax\n\n```js\nMath.trunc(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe integer part of `x`.\n\n## Description\n\nUnlike the other three `Math` methods: `Math.floor()`, `Math.ceil()` and `Math.round()`, the way `Math.trunc()` works is very simple. It _truncates_ (cuts off) the dot and the digits to the right of it, no matter whether the argument is a positive or negative number.\n\nBecause `trunc()` is a static method of `Math`, you always use it as `Math.trunc()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/NaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# NaN\n\nThe global **`NaN`** property is a value representing Not-A-Number.\n\n## Value\n\nThe same number value as [`Number.NaN`](./Number/NaN.mdx).\n\n## Description\n\n`NaN` is a property of the _global object_. In other words, it is a variable in global scope.\n\nIn modern browsers, `NaN` is a non-configurable, non-writable property. Even when this is not the case, avoid overriding it.\n\nThere are five different types of operations that return `NaN`:\n\n- Failed number conversion (e.g. explicit ones like `parseInt(\"blabla\")`, `Number(undefined)`, or implicit ones like `Math.abs(undefined)`)\n- Math operation where the result is not a real number (e.g. `Math.sqrt(-1)`)\n- Indeterminate form (e.g. `0 * Infinity`, `1 ** Infinity`, `Infinity / Infinity`, `Infinity - Infinity`)\n- A method or expression whose operand is or gets coerced to `NaN` (e.g. `7 ** NaN`, `7 * \"blabla\"`) — this means `NaN` is contagious\n- Other cases where an invalid value is to be represented as a number (e.g. an invalid `new Date(\"blabla\").getTime()`, `\"\".charCodeAt(1)`)\n\n`NaN` and its behaviors are not invented by JavaScript. Its semantics in floating point arithmetic (including that `NaN !== NaN`) are specified by [IEEE 754](https://en.wikipedia.org/wiki/Double_precision_floating-point_format). `NaN`'s behaviors include:\n\n- If `NaN` is involved in a mathematical operation (but not [bitwise operations](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators#bitwise_shift_operators)), the result is usually also `NaN`. (See see [silently escaping NaN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN#silently_escaping_nan) for a counter-example.)\n- When `NaN` is one of the operands of any relational comparison (`>`, `<`, `>=`, `<=`), the result is always `false`.\n- `NaN` compares unequal (via [`==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Equality), [`!=`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Inequality), [`===`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality), and [`!==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_inequality)) to any other value — including to another `NaN` value.\n\n`NaN` is also one of the [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) values in JavaScript.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Number/MAX_SAFE_INTEGER.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MAX_SAFE_INTEGER\n\nThe **`Number.MAX_SAFE_INTEGER`** constant represents the maximum safe integer in JavaScript (2<sup>53</sup> – 1).\n\nFor larger integers, consider using `BigInt`.\n\n## Value\n\n`9007199254740991` (9,007,199,254,740,991, or \\~9 quadrillion).\n\n## Description\n\n[Double precision floating point format](https://en.wikipedia.org/wiki/Double_precision_floating-point_format) only has 52 bits to represent the [mantissa](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_encoding), so it can only safely represent integers between -(2<sup>53</sup> – 1) and 2<sup>53</sup> – 1. \"Safe\" in this context refers to the ability to represent integers exactly and to compare them correctly. For example, `Number.MAX_SAFE_INTEGER + 1 === Number.MAX_SAFE_INTEGER + 2` will evaluate to true, which is mathematically incorrect. See `Number.isSafeInteger()` for more information.\n\nBecause `MAX_SAFE_INTEGER` is a static property of `Number`, you always use it as `Number.MAX_SAFE_INTEGER`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Number/MAX_VALUE.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MAX_VALUE\n\nThe **`Number.MAX_VALUE`** property represents the maximum numeric value representable in JavaScript.\n\n## Value\n\n2<sup>1024</sup> - 1, or approximately `1.7976931348623157E+308`.\n\n## Description\n\nValues larger than `MAX_VALUE` are represented as [`Infinity`](../../globals/Infinity.mdx) and will lose their actual value.\n\nBecause `MAX_VALUE` is a static property of `Number`, you always use it as `Number.MAX_VALUE`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Number/MIN_SAFE_INTEGER.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MIN_SAFE_INTEGER\n\nThe **`Number.MIN_SAFE_INTEGER`** constant represents the minimum safe integer in JavaScript, or -(2<sup>53</sup> - 1).\n\nTo represent integers smaller than this, consider using `BigInt`.\n\n## Value\n\n`-9007199254740991` (-9,007,199,254,740,991, or about -9 quadrillion).\n\n## Description\n\n[Double precision floating point format](https://en.wikipedia.org/wiki/Double_precision_floating-point_format) only has 52 bits to represent the [mantissa](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_encoding), so it can only safely represent integers between -(2<sup>53</sup> – 1) and 2<sup>53</sup> – 1. Safe in this context refers to the ability to represent integers exactly and to correctly compare them. For example, `Number.MIN_SAFE_INTEGER - 1 === Number.MIN_SAFE_INTEGER - 2` will evaluate to true, which is mathematically incorrect. See `Number.isSafeInteger()` for more information.\n\nBecause `MIN_SAFE_INTEGER` is a static property of `Number`, you always use it as `Number.MIN_SAFE_INTEGER`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Number/MIN_VALUE.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MIN_VALUE\n\nThe **`Number.MIN_VALUE`** property represents the smallest positive numeric value representable in JavaScript.\n\n## Value\n\n2<sup>-1074</sup>, or `5E-324`.\n\n## Description\n\n`Number.MIN_VALUE` is the smallest positive number (not the most negative number) that can be represented within float precision — in other words, the number closest to 0. The ECMAScript spec doesn't define a precise value that implementations are required to support — instead the spec says, _\"must be the smallest non-zero positive value that can actually be represented by the implementation\"_. This is because small IEEE-754 floating point numbers are [denormalized](https://en.wikipedia.org/wiki/Subnormal_number), but implementations are not required to support this representation, in which case `Number.MIN_VALUE` may be larger.\n\nIn practice, its precise value in mainstream engines like V8 (used by Chrome, Edge, Node.js), SpiderMonkey (used by Firefox), and JavaScriptCore (used by Safari) is 2<sup>-1074</sup>, or `5E-324`.\n\nBecause `MIN_VALUE` is a static property of `Number`, you always use it as `Number.MIN_VALUE`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Number/NEGATIVE_INFINITY.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.NEGATIVE_INFINITY\n\nThe **`Number.NEGATIVE_INFINITY`** property represents the negative Infinity value.\n\n## Value\n\nThe same as the negative value of the global [`Infinity`](../../globals/Infinity.mdx) property.\n\n## Description\n\nThe `Number.NEGATIVE_INFINITY` value behaves slightly differently than mathematical infinity:\n\n- Any positive value, including `Number.POSITIVE_INFINITY`, multiplied by `Number.NEGATIVE_INFINITY` is `Number.NEGATIVE_INFINITY`.\n- Any negative value, including `Number.NEGATIVE_INFINITY`, multiplied by `Number.NEGATIVE_INFINITY` is `Number.POSITIVE_INFINITY`.\n- Any positive value divided by `Number.NEGATIVE_INFINITY` is [negative zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754)).\n- Any negative value divided by `Number.NEGATIVE_INFINITY` is [positive zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754)).\n- Zero multiplied by `Number.NEGATIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- [`NaN`](../../globals/NaN.mdx) multiplied by `Number.NEGATIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- `Number.NEGATIVE_INFINITY`, divided by any negative value except `Number.NEGATIVE_INFINITY`, is `Number.POSITIVE_INFINITY`.\n- `Number.NEGATIVE_INFINITY`, divided by any positive value except `Number.POSITIVE_INFINITY`, is `Number.NEGATIVE_INFINITY`.\n- `Number.NEGATIVE_INFINITY`, divided by either `Number.NEGATIVE_INFINITY` or `Number.POSITIVE_INFINITY`, is [`NaN`](../../globals/NaN.mdx).\n- `x > Number.NEGATIVE_INFINITY` is true for any number _x_ that isn't `Number.NEGATIVE_INFINITY`.\n\nYou might use the `Number.NEGATIVE_INFINITY` property to indicate an error condition that returns a finite number in case of success. Note, however, that [`NaN`](../../globals/NaN.mdx) would be more appropriate in such a case.\n\nBecause `Number.NEGATIVE_INFINITY` is a static property of `Number`, you always use it as `Number.NEGATIVE_INFINITY`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Number/NaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.NaN\n\nThe **`Number.NaN`** property represents Not-A-Number, which is equivalent to [description for the global property](../../globals/NaN.mdx). For more information about the behaviors of `NaN`, see the [`NaN`](../../globals/NaN.mdx).\n\n## Value\n\nThe number value [`NaN`](../../globals/NaN.mdx).\n\n## Description\n\nBecause `NaN` is a static property of `Number`, you always use it as `Number.NaN`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Number/Number.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number() constructor\n\nThe **`Number()` constructor** creates a `Number` object. When called instead as a function, it performs type conversion to a primitive number, which is usually more useful.\n\n## Syntax\n\n```js\nnew Number(value)\nNumber(value)\n```\n\n> **Note:** `Number()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\n- `value`\n  - : The numeric value of the object being created.\n\n### Return value\n\nWhen `Number` is called as a constructor (with `new`), it creates a `Number` object, which is **not** a primitive.\n\nWhen `Number` is called as a function, it [coerces the parameter to a number primitive](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_coercion). [BigInts](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/BigInt) are converted to numbers. If the value can't be converted, it returns [`NaN`](../../globals/NaN.mdx).\n\n> **Warning:** You should rarely find yourself using `Number` as a constructor.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Number/POSITIVE_INFINITY.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.POSITIVE_INFINITY\n\nThe **`Number.POSITIVE_INFINITY`** property represents the positive Infinity value.\n\n## Value\n\nThe same as the value of the global [`Infinity`](../../globals/Infinity.mdx) property.\n\n## Description\n\nThe `Number.POSITIVE_INFINITY` value behaves slightly differently than mathematical infinity:\n\n- Any positive value, including `Number.POSITIVE_INFINITY`, multiplied by `Number.POSITIVE_INFINITY` is `Number.POSITIVE_INFINITY`.\n- Any negative value, including `Number.NEGATIVE_INFINITY`, multiplied by `Number.POSITIVE_INFINITY` is `Number.NEGATIVE_INFINITY`.\n- Any positive number divided by `Number.POSITIVE_INFINITY` is [positive zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754)).\n- Any negative number divided by `Number.POSITIVE_INFINITY` is [negative zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754).\n- Zero multiplied by `Number.POSITIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- `NaN` multiplied by `Number.POSITIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- `Number.POSITIVE_INFINITY`, divided by any negative value except `Number.NEGATIVE_INFINITY`, is `Number.NEGATIVE_INFINITY`.\n- `Number.POSITIVE_INFINITY`, divided by any positive value except `Number.POSITIVE_INFINITY`, is `Number.POSITIVE_INFINITY`.\n- `Number.POSITIVE_INFINITY`, divided by either `Number.NEGATIVE_INFINITY` or `Number.POSITIVE_INFINITY`, is [`NaN`](../../globals/NaN.mdx).\n- `Number.POSITIVE_INFINITY > x` is true for any number _x_ that isn't `Number.POSITIVE_INFINITY`.\n\nYou might use the `Number.POSITIVE_INFINITY` property to indicate an error condition that returns a finite number in case of success. Note, however, that [`NaN`](../../globals/NaN.mdx) would be more appropriate in such a case.\n\nBecause `Number.POSITIVE_INFINITY` is a static property of `Number`, you always use it as `Number.POSITIVE_INFINITY`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Number/epsilon.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.EPSILON\n\nThe **`Number.EPSILON`** property represents the difference between 1 and the smallest floating point number greater than 1.\n\n## Value\n\n2<sup>-52</sup>, or approximately `2.2204460492503130808472633361816E-16`.\n\n## Description\n\n`Number.EPSILON` is the difference between 1 and the next greater number representable in the Number format, because [double precision floating point format](https://en.wikipedia.org/wiki/Double_precision_floating-point_format) only has 52 bits to represent the [mantissa](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_encoding), and the lowest bit has a significance of 2<sup>-52</sup>.\n\nNote that the absolute accuracy of floating numbers decreases as the number gets larger, because the exponent grows while the mantissa's accuracy stays the same. `Number.MIN_VALUE` is the smallest representable positive number, which is much smaller than `Number.EPSILON`.\n\nBecause `EPSILON` is a static property of `Number`, you always use it as `Number.EPSILON`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Number/isFinite.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isFinite()\n\nThe **`Number.isFinite()`** method determines whether the passed value is a finite number — that is, it checks that a given value is a number, and the number is neither positive [`Infinity`](../../globals/Infinity.mdx), negative `Infinity`, nor [`NaN`](../../globals/NaN.mdx).\n\n## Syntax\n\n```js\nNumber.isFinite(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested for finiteness.\n\n### Return value\n\nThe boolean value `true` if the given value is a finite number. Otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Number/isInteger.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isInteger()\n\nThe **`Number.isInteger()`** method determines whether the passed value is an integer.\n\n## Syntax\n\n```js\nNumber.isInteger(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested for being an integer.\n\n### Return value\n\nThe boolean value `true` if the given value is an integer. Otherwise `false`.\n\n## Description\n\nIf the target value is an integer, return `true`, otherwise return `false`. If the value is [`NaN`](../../globals/NaN.mdx) or [`Infinity`](../../globals/Infinity.mdx), return `false`. The method will also return `true` for floating point numbers that can be represented as integer. It will always return `false` if the value is not a number.\n\nNote that some number literals, while looking like non-integers, actually represent integers — due to the precision limit of ECMAScript floating-point number encoding (IEEE-754). For example, `5.0000000000000001` only differs from `5` by `1e-16`, which is too small to be represented. (For reference, [`Number.EPSILON`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/EPSILON) stores the distance between 1 and the next representable floating-point number greater than 1, and that is about `2.22e-16`.) Therefore, `5.0000000000000001` will be represented with the same encoding as `5`, thus making `Number.isInteger(5.0000000000000001)` return `true`.\n\nIn a similar sense, numbers around the magnitude of [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER) will suffer from loss of precision and make `Number.isInteger` return `true` even when it's not an integer. (The actual threshold varies based on how many bits are needed to represent the decimal — for example, `Number.isInteger(4500000000000000.1)` is `true`, but `Number.isInteger(4500000000000000.5)` is `false`.)\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Number/isNaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isNaN()\n\nThe **`Number.isNaN()`** method determines whether the passed value is the number value [`NaN`](../../globals/NaN.mdx), and returns `false` if the input is not of the Number type. It is a more robust version of the original, global `isNaN()` function.\n\n## Syntax\n\n```js\nNumber.isNaN(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested for [`NaN`](../../globals/NaN.mdx).\n\n### Return value\n\nThe boolean value `true` if the given value is a number with value [`NaN`](../../globals/NaN.mdx). Otherwise, `false`.\n\n## Description\n\nThe function `Number.isNaN()` provides a convenient way to check for equality with `NaN`. Note that you cannot test for equality with `NaN` using either the [`==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Equality) or [`===`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) operators, because unlike all other value comparisons in JavaScript, these evaluate to `false` whenever one operand is [`NaN`](../../globals/NaN.mdx), even if the other operand is also [`NaN`](../../globals/NaN.mdx).\n\nSince `x !== x` is only true for `NaN` among all possible JavaScript values, `Number.isNaN(x)` can also be replaced with a test for `x !== x`, despite the latter being less readable.\n\nAs opposed to the global `isNaN()` function, the `Number.isNaN()` method doesn't force-convert the parameter to a number. This makes it safe to pass values that would normally convert to [`NaN`](../../globals/NaN.mdx) but aren't actually the same value as [`NaN`](../../globals/NaN.mdx). This also means that only values of the Number type that are also [`NaN`](../../globals/NaN.mdx) return `true`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Number/isSafeInteger.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isSafeInteger()\n\nThe **`Number.isSafeInteger()`** method determines whether the provided value is a number that is a _safe integer_.\n\n## Syntax\n\n```js\nNumber.isSafeInteger(testValue)\n```\n\n### Parameters\n\n- `testValue`\n  - : The value to be tested for being a safe integer.\n\n### Return value\n\nThe boolean value `true` if the given value is a number that is a safe integer. Otherwise `false`.\n\n## Description\n\nThe safe integers consist of all integers from -(2<sup>53</sup> - 1) to 2<sup>53</sup> - 1, inclusive (±9,007,199,254,740,991). A safe integer is an integer that:\n\n- can be exactly represented as an IEEE-754 double precision number, and\n- whose IEEE-754 representation cannot be the result of rounding any other integer to fit the IEEE-754 representation.\n\nFor example, 2<sup>53</sup> - 1 is a safe integer: it can be exactly represented, and no other integer rounds to it under any IEEE-754 rounding mode. In contrast, 2<sup>53</sup> is _not_ a safe integer: it can be exactly represented in IEEE-754, but the integer 2<sup>53</sup> + 1 can't be directly represented in IEEE-754 but instead rounds to 2<sup>53</sup> under round-to-nearest and round-to-zero rounding.\n\nHandling values larger or smaller than \\~9 quadrillion with full precision requires using an [arbitrary precision arithmetic library](https://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic). See [What Every Programmer Needs to Know about Floating Point Arithmetic](https://floating-point-gui.de/) for more information on floating point representations of numbers.\n\nFor larger integers, consider using the `BigInt` type.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Number/parseFloat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.parseFloat()\n\nThe **`Number.parseFloat()`** method parses an argument and returns a floating point number. If a number cannot be parsed from the argument, it returns [`NaN`](../../globals/NaN.mdx).\n\n## Syntax\n\n```js\nNumber.parseFloat(string)\n```\n\n### Parameters\n\n- `string`\n  - : The value to parse, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). Leading whitespace in this argument is ignored.\n\n### Return value\n\nA floating point number parsed from the given `string`.\n\nOr [`NaN`](../../globals/NaN.mdx) when the first non-whitespace character cannot be converted to a number.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Number/parseInt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.parseInt()\n\nThe **`Number.parseInt()`** method parses a string argument and\nreturns an integer of the specified radix or base.\n\n## Syntax\n\n```js\nNumber.parseInt(string)\nNumber.parseInt(string, radix)\n```\n\n### Parameters\n\n- `string`\n  - : The value to parse, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). Leading whitespace in this argument is ignored.\n- `radix` _**optional**_\n\n  - : An integer between `2` and `36` that represents the\n    _radix_ (the base in mathematical numeral systems) of the\n    `string`.\n\n    If `radix` is undefined or `0`, it is assumed to be `10` except when the number begins with the code unit pairs `0x` or `0X`, in which case a radix of `16` is assumed.\n\n### Return value\n\nAn integer parsed from the given `string`.\n\nIf the `radix` is smaller than `2` or bigger than\n`36`, or the first non-whitespace character cannot be converted to a number,\n[`NaN`](../../globals/NaN.mdx) is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Number/prototype/toExponential.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toExponential()\n\nThe **`toExponential()`** method returns a string representing\nthe `Number` object in exponential notation.\n\n## Syntax\n\n```js\ntoExponential()\ntoExponential(fractionDigits)\n```\n\n### Parameters\n\n- `fractionDigits` _**optional**_\n  - : Optional. An integer specifying the number of digits after the decimal point.\n    Defaults to as many digits as necessary to specify the number.\n\n### Return value\n\nA string representing the given `Number` object in exponential notation\nwith one digit before the decimal point, rounded to\n`fractionDigits` digits after the decimal point.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : If `fractionDigits` is too small or too large. Values between\n    `0` and `100`, inclusive, will not cause a\n    [`RangeError`](../../../globals/RangeError/RangeError.mdx).\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If this method is invoked on an object that is not a `Number`.\n\n## Description\n\nIf the `fractionDigits` argument is omitted, the number of digits\nafter the decimal point defaults to the number of digits necessary to represent the\nvalue uniquely.\n\nIf you use the `toExponential()` method for a numeric literal and the\nnumeric literal has no exponent and no decimal point, leave whitespace(s) before the dot\nthat precedes the method call to prevent the dot from being interpreted as a decimal\npoint.\n\nIf a number has more digits than requested by the\n`fractionDigits` parameter, the number is rounded to the nearest\nnumber represented by `fractionDigits` digits. See the discussion\nof rounding in the description of the [`Number.prototype.toFixed()`](../../../globals/Number/prototype/toFixed.mdx) method, which also applies to `toExponential()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Number/prototype/toFixed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toFixed()\n\nThe **`toFixed()`** method formats a number using fixed-point notation.\n\n## Syntax\n\n```js\ntoFixed()\ntoFixed(digits)\n```\n\n### Parameters\n\n- `digits` _**optional**_\n  - : The number of digits to appear after the decimal point; should be a value between `0` and `100`, inclusive. If this argument is omitted, it is treated as `0`.\n\n### Return value\n\nA string representing the given number using fixed-point notation.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : If `digits` is smaller than `0`, larger than `100`, or is `NaN`.\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If this method is invoked on an object that is not a `Number`.\n\n## Description\n\nThe `toFixed()` method returns a string representation of `numObj` that does not use exponential notation and has exactly `digits` digits after the decimal place. The number is rounded if necessary, and the fractional part is padded with zeros if necessary so that it has the specified length.\n\nIf the absolute value of `numObj` is greater or equal to 10<sup>21</sup>, this method uses the same algorithm as [`Number.prototype.toString()`](../../../globals/Number/prototype/toString.mdx) and returns a string in exponential notation. `toFixed()` returns `\"Infinity\"`, `\"NaN\"`, or `\"-Infinity\"` if the value of `numObj` is non-finite.\n\nThe output of `toFixed()` may be more precise than [`toString()`](../../../globals/Number/prototype/toString.mdx) for some values, because `toString()` only prints enough significant digits to distinguish the number from adjacent number values. For example:\n\n```js\n(1000000000000000128).toString(); // '1000000000000000100'\n(1000000000000000128).toFixed(0); // '1000000000000000128'\n```\n\nHowever, choosing a `digits` precision that's too high can return unexpected results, because decimal fractional numbers cannot be represented precisely in floating point. For example:\n\n```js\n0.3.toFixed(50); // '0.29999999999999998889776975374843459576368331909180'\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Number/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string with a language-sensitive representation of this number. In implementations with [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) support, this method simply calls `Intl.NumberFormat`.\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` parameters customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat), these parameters correspond exactly to the [`Intl.NumberFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) constructor's parameters. Implementations without `Intl.NumberFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#locales) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored.\n\nSee the [`Intl.NumberFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string with a language-sensitive representation of the given number.\n\nIn implementations with `Intl.NumberFormat`, this is equivalent to `new Intl.NumberFormat(locales, options).format(number)`.\n\n## Performance\n\nWhen formatting large numbers of numbers, it is better to create a\n`Intl.NumberFormat` object and use the function provided by its\n`format` property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Number/prototype/toPrecision.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toPrecision()\n\nThe **`toPrecision()`** method returns a string representing\nthe `Number` object to the specified precision.\n\n## Syntax\n\n```js\ntoPrecision()\ntoPrecision(precision)\n```\n\n### Parameters\n\n- `precision` _**optional**_\n  - : An integer specifying the number of significant digits.\n\n### Return value\n\nA string representing a `Number` object in fixed-point or exponential\nnotation rounded to `precision` significant digits. See the discussion of\nrounding in the description of the [`Number.prototype.toFixed()`](../../../globals/Number/prototype/toFixed.mdx) method,\nwhich also applies to `toPrecision()`.\n\nIf the `precision` argument is omitted, behaves as\n[`Number.prototype.toString()`](../../../globals/Number/prototype/toString.mdx). If the `precision` argument is a\nnon-integer value, it is rounded to the nearest integer.\n\n### Exceptions\n\n- `RangeError`\n  - : If `precision` is not between `1` and `100`\n    (inclusive), a [`RangeError`](../../../globals/RangeError/RangeError.mdx) is thrown. Implementations are allowed to\n    support larger and smaller values as well. ECMA-262 only requires a precision of up to\n    21 significant digits.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Number/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified number value.\n\n## Syntax\n\n```js\ntoString()\ntoString(radix)\n```\n\n### Parameters\n\n- `radix` _**optional**_\n  - : An integer in the range `2` through `36` specifying the base to use for representing the number value. Defaults to 10.\n\n### Return value\n\nA string representing the specified number value.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `radix` is less than 2 or greater than 36.\n\n## Description\n\nThe `Number` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For `Number` values, the `toString` method returns a string representation of the value in the specified radix.\n\nFor radixes above 10, the letters of the alphabet indicate digits greater than 9. For example, for hexadecimal numbers (base 16) `a` through `f` are used.\n\nIf the specified number value is negative, the sign is preserved. This is the case even if the radix is 2; the string returned is the positive binary representation of the number value preceded by a `-` sign, **not** the two's complement of the number value.\n\nBoth `0` and `-0` have `\"0\"` as their string representation. [`Infinity`](../../../globals/Infinity.mdx) returns `\"Infinity\"` and [`NaN`](../../../globals/NaN.mdx) returns `\"NaN\"`.\n\nIf the number is not a whole number, the decimal point `.` is used to separate the decimal places. [Scientific notation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#exponential) is used if the radix is 10 and the number's magnitude (ignoring sign) is greater than or equal to 10<sup>21</sup> or less than 10<sup>-6</sup>. In this case, the returned string always explicitly specifies the sign of the exponent.\n\n```js\nconsole.log((10 ** 21.5).toString()); // \"3.1622776601683794e+21\"\nconsole.log((10 ** 21.5).toString(8)); // \"526665530627250154000000\"\n```\n\nThe `toString()` method requires its `this` value to be a `Number` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to number values.\n\nBecause `Number` doesn't have a [`[Symbol.toPrimitive]()`](../../../globals/Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `Number` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, Number _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — rather, they are directly converted using the same algorithm as the initial `toString()` implementation.\n\n```js\nNumber.prototype.toString = () => \"Overridden\";\nconsole.log(`${1}`); // \"1\"\nconsole.log(`${new Number(1)}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Number/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.valueOf()\n\nThe **`valueOf()`** method returns the wrapped primitive value\nof a `Number` object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nA number representing the primitive value of the specified `Number` object.\n\n## Description\n\nThis method is usually called internally by JavaScript and not explicitly in web code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Object/Object.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object()\n\nThe **`Object` constructor** turns the input into an object. Its behavior depends on the input's type.\n\n- If the value is [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../globals/undefined.mdx), it creates and returns an empty object.\n- Otherwise, it returns an object of a Type that corresponds to the given value.\n- If the value is an object already, it returns the value.\n\n## Syntax\n\n```js\nnew Object(value)\nObject(value)\n```\n\n> **Note:** `Object()` can be called with or without `new`. Both create a new object.\n\n### Parameters\n\n- `value`\n  - : Any value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Object/assign.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.assign()\n\nThe **`Object.assign()`** method\ncopies all [enumerable](../../globals/Object/prototype/propertyIsEnumerable.mdx)\n[own properties](../../globals/Object/hasOwn.mdx) from one or more\n_source objects_ to a _target object_. It returns the modified target\nobject.\n\n## Syntax\n\n```js\nObject.assign(target, ...sources)\n```\n\n### Parameters\n\n- `target`\n  - : The target object — what to apply the sources' properties to, which is returned\n    after it is modified.\n- `sources`\n  - : The source object(s) — objects containing the properties you want to apply.\n\n### Return value\n\nThe target object.\n\n## Description\n\nProperties in the target object are overwritten by properties in the sources if they\nhave the same \"key\". Later sources' properties overwrite earlier ones.\n\nThe `Object.assign()` method only copies _enumerable_ and\n_own_ properties from a source object to a target object. It uses\n`[[Get]]` on the source and `[[Set]]` on the target, so it will\ninvoke [getters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/get) and [setters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/set). Therefore it\n_assigns_ properties, versus copying or defining new properties. This may make it\nunsuitable for merging new properties into a prototype if the merge sources contain\ngetters.\n\nFor copying property definitions (including their enumerability) into prototypes, use\n[`Object.getOwnPropertyDescriptor()`](../../globals/Object/getOwnPropertyDescriptor.mdx) and\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx) instead.\n\nBoth `String` and `Symbol` properties are copied.\n\nIn case of an error, for example if a property is non-writable, a\n[`TypeError`](../../globals/TypeError/TypeError.mdx) is raised, and the `target` object is\nchanged if any properties are added before the error is raised.\n\n> **Note:** `Object.assign()` does not throw on\n> [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../globals/undefined.mdx) sources.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Object/create.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.create()\n\nThe **`Object.create()`** method creates a new object, using an existing object as the prototype of the newly created object.\n\n## Syntax\n\n```js\nObject.create(proto)\nObject.create(proto, propertiesObject)\n```\n\n### Parameters\n\n- `proto`\n  - : The object which should be the prototype of the newly-created object.\n- `propertiesObject` _**optional**_\n  - : If specified and not [`undefined`](../../globals/undefined.mdx), an object whose [enumerable own properties](https://developer.mozilla.org/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) specify property descriptors to be added to the newly-created object, with the corresponding property names. These properties correspond to the second argument of [`Object.defineProperties()`](../../globals/Object/defineProperties.mdx).\n\n### Return value\n\nA new object with the specified prototype object and properties.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if `proto` is neither [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) nor an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Object/defineProperties.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.defineProperties()\n\nThe **`Object.defineProperties()`** method defines new or\nmodifies existing properties directly on an object, returning the object.\n\n## Syntax\n\n```js\nObject.defineProperties(obj, props)\n```\n\n### Parameters\n\n- `obj`\n  - : The object on which to define or modify properties.\n- `props`\n\n  - : An object whose keys represent the names of properties to be defined or modified and\n    whose values are objects describing those properties. Each value in `props`\n    must be either a data descriptor or an accessor descriptor; it cannot be both (see\n    [`Object.defineProperty()`](../../globals/Object/defineProperty.mdx) for more details).\n\n    Data descriptors and accessor descriptors may optionally contain the following keys:\n\n    - `configurable`\n      - : `true` if and only if the type of this property descriptor may be\n        changed and if the property may be deleted from the corresponding object.\n        **Defaults to `false`.**\n    - `enumerable`\n      - : `true` if and only if this property shows up during enumeration of\n        the properties on the corresponding object.\n        **Defaults to `false`.**\n\n    A data descriptor also has the following optional keys:\n\n    - `value`\n      - : The value associated with the property. Can be any valid JavaScript value\n        (number, object, function, etc.).\n        **Defaults to [`undefined`](../../globals/undefined.mdx).**\n    - `writable`\n      - : `true` if and only if the value associated with the property may be\n        changed with an assignment operator.\n        **Defaults to `false`.**\n\n    An accessor descriptor also has the following optional keys:\n\n    - `get`\n      - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx)\n        if there is no getter. The function's return value will be used as the value of\n        the property.\n        **Defaults to [`undefined`](../../globals/undefined.mdx).**\n    - `set`\n      - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx)\n        if there is no setter. The function will receive as its only argument the new\n        value being assigned to the property.\n        **Defaults to [`undefined`](../../globals/undefined.mdx).**\n\n    If a descriptor has neither of `value`, `writable`,\n    `get` and `set` keys, it is treated as a data descriptor. If a\n    descriptor has both `value` or `writable` and `get`\n    or `set` keys, an exception is thrown.\n\n### Return value\n\nThe object that was passed to the function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Object/defineProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.defineProperty()\n\nThe static method **`Object.defineProperty()`** defines a new\nproperty directly on an object, or modifies an existing property on an object, and\nreturns the object.\n\n## Syntax\n\n```js\nObject.defineProperty(obj, prop, descriptor)\n```\n\n### Parameters\n\n- `obj`\n  - : The object on which to define the property.\n- `prop`\n  - : The name or `Symbol` of the property to be defined or modified.\n- `descriptor`\n  - : The descriptor for the property being defined or modified.\n\n### Return value\n\nThe object that was passed to the function.\n\n## Description\n\nThis method allows a precise addition to or modification of a property on an object.\nNormal property addition through assignment creates properties which show up during\nproperty enumeration (`for...in` loop or\n[`Object.keys`](../../globals/Object/keys.mdx) method), whose values may be changed, and which may be\ndeleted. This method allows these extra details\nto be changed from their defaults. By default, properties added using\n`Object.defineProperty()` are not writable, not enumerable, and not configurable.\n\nProperty descriptors present in objects come in two main flavors: data descriptors and\naccessor descriptors. A **data descriptor** is a property that has a\nvalue, which may or may not be writable. An **accessor descriptor** is a\nproperty described by a getter-setter pair of functions. A descriptor must be one of\nthese two flavors; it cannot be both.\n\nBoth data and accessor descriptors are objects. They share the following optional keys\n(please note: the **defaults** mentioned here are in the case of defining\nproperties using `Object.defineProperty()`):\n\n- `configurable`\n\n  - : when this is set to `false`,\n\n    - the type of this property cannot be changed between data property and accessor property, and\n    - the property may not be deleted, and\n    - other attributes of its descriptor cannot be changed (however, if it's a data descriptor with `writable: true`, the `value` can be changed, and `writable` can be changed to `false`).\n\n    **Defaults to `false`.**\n\n- `enumerable`\n  - : `true` if and only if this property shows up during enumeration of the\n    properties on the corresponding object.\n    **Defaults to `false`.**\n\nA **data descriptor** also has the following optional keys:\n\n- `value`\n  - : The value associated with the property. Can be any valid JavaScript value (number,\n    object, function, etc.).\n    **Defaults to [`undefined`](../../globals/undefined.mdx).**\n- `writable`\n  - : `true` if the value associated with the property may be changed with an\n    assignment operator.\n    **Defaults to `false`.**\n\nAn **accessor descriptor** also has the following optional keys:\n\n- `get`\n  - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no getter. When the property is accessed, this function is called without\n    arguments and with `this` set to the object through which the property is\n    accessed (this may not be the object on which the property is defined due to\n    inheritance). The return value will be used as the value of the property.\n    **Defaults to [`undefined`](../../globals/undefined.mdx).**\n- `set`\n  - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no setter. When the property is assigned, this function is called with one\n    argument (the value being assigned to the property) and with `this` set to\n    the object through which the property is assigned.\n    **Defaults to [`undefined`](../../globals/undefined.mdx).**\n\nIf a descriptor has neither of `value`, `writable`,\n`get` and `set` keys, it is treated as a data descriptor. If a\ndescriptor has both \\[`value` or `writable`] and \\[`get` or `set`] keys, an exception is thrown.\n\nBear in mind that these attributes are not necessarily the descriptor's own properties.\nInherited properties will be considered as well. In order to ensure these defaults are\npreserved, you might freeze existing objects in the descriptor object's prototype chain upfront, specify all\noptions explicitly, or point to [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) with [`Object.create(null)`](../../globals/Object/create.mdx).\n\n```js\nconst obj = {};\n// 1. Using a null prototype: no inherited properties\nconst descriptor = Object.create(null);\ndescriptor.value = 'static';\n\n// not enumerable, not configurable, not writable as defaults\nObject.defineProperty(obj, 'key', descriptor);\n\n// 2. Being explicit by using a throw-away object literal with all attributes present\nObject.defineProperty(obj, 'key2', {\n  enumerable: false,\n  configurable: false,\n  writable: false,\n  value: 'static'\n});\n\n// 3. Recycling same object\nfunction withValue(value) {\n  const d = withValue.d || (\n    withValue.d = {\n      enumerable: false,\n      writable: false,\n      configurable: false,\n      value,\n    }\n  );\n\n  // avoiding duplicate operation for assigning value\n  if (d.value !== value) d.value = value;\n\n  return d;\n}\n// and\nObject.defineProperty(obj, 'key', withValue('static'));\n\n// if freeze is available, prevents adding or\n// removing the object prototype properties\n// (value, get, set, enumerable, writable, configurable)\n(Object.freeze || Object)(Object.prototype);\n```\n\nWhen the property already exists, `Object.defineProperty()` attempts to modify the property according to the values in the descriptor and the property's current configuration.\n\nIf the old descriptor had its `configurable` attribute set to `false`, the property is said to be _non-configurable_. It is not possible to change any attribute of a non-configurable accessor property, and it is not possible to switch between data and accessor property types. For data properties with `writable: true`, it is possible to modify the value and change the `writable` attribute from `true` to `false`. A [`TypeError`](../../globals/TypeError/TypeError.mdx) is thrown when attempts are made to change non-configurable property attributes (except `value` and `writable`, if permitted), except when defining a value same as the original value on a data property.\n\nWhen the current property is configurable, defining an attribute to `undefined` effectively deletes it. For example, if `o.k` is an accessor property, `Object.defineProperty(o, \"k\", { set: undefined })` will remove the setter, making `k` only have a getter and become readonly. If an attribute is absent from the new descriptor, the old descriptor attribute's value is kept (it won't be implicitly re-defined to `undefined`). It is possible to toggle between data and accessor property by giving a descriptor of a different \"flavor\". For example, if the new descriptor is a data descriptor (with `value` or `writable`), the original descriptor's `get` and `set` attributes will both be dropped.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Object/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.entries()\n\nThe **`Object.entries()`** method returns an array of a given object's own enumerable string-keyed property key-value pairs.\n\n## Syntax\n\n```js\nObject.entries(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : An object.\n\n### Return value\n\nAn array of the given object's own enumerable string-keyed property key-value pairs. Each key-value pair is an array with two elements: the first element is the property key (which is always a string), and the second element is the property value.\n\n## Description\n\n`Object.entries()` returns an array whose elements are arrays corresponding to the enumerable string-keyed property key-value pairs found directly upon `object`. This is the same as iterating with a `for...in` loop, except that a `for...in` loop enumerates properties in the prototype chain as well. The order of the array returned by `Object.entries()` is the same as that provided by a `for...in` loop.\n\nIf you only need the property keys, use [`Object.keys()`](../../globals/Object/keys.mdx) instead. If you only need the property values, use [`Object.values()`](../../globals/Object/values.mdx) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Object/freeze.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.freeze()\n\nThe **`Object.freeze()`** method _freezes_ an object. Freezing an object [prevents extensions](../../globals/Object/preventExtensions.mdx) and makes existing properties non-writable and non-configurable. A frozen object can no longer be changed: new properties cannot be added, existing properties cannot be removed, their enumerability, configurability, writability, or value cannot be changed, and the object's prototype cannot be re-assigned. `freeze()` returns the same object that was passed in.\n\nFreezing an object is the highest integrity level that JavaScript provides.\n\n## Syntax\n\n```js\nObject.freeze(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object to freeze.\n\n### Return value\n\nThe object that was passed to the function.\n\n## Description\n\nFreezing an object is equivalent to [preventing extensions](../../globals/Object/preventExtensions.mdx) and then changing all existing [properties' descriptors'](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty#description) `configurable` to `false` — and for data properties, `writable` to `false` as well. Nothing can be added to or removed from the properties set of a frozen object. Any attempt to do so will fail, either silently or by throwing a [`TypeError`](../../globals/TypeError/TypeError.mdx) exception (most commonly, but not exclusively, when in \"strict mode\").\n\nFor data properties of a frozen object, their values cannot be changed since the writable and\nconfigurable attributes are set to false. Accessor properties (getters and setters) work the same — the property value returned by the getter may still change, and the setter can still be called without throwing errors when setting the property. Note that values\nthat are objects can still be modified, unless they are also frozen. As an object, an\narray can be frozen; after doing so, its elements cannot be altered and no elements can\nbe added to or removed from the array.\n\n`freeze()` returns the same object that was passed into the function. It\n_does not_ create a frozen copy.\n\nA `TypedArray` or a [`DataView`](../../globals/DataView/DataView.mdx) with elements will cause a [`TypeError`](../../globals/TypeError/TypeError.mdx),\nas they are views over memory and will definitely cause other possible issues:\n\n```js\nObject.freeze(new Uint8Array(0)) // No elements\n// Uint8Array []\n\nObject.freeze(new Uint8Array(1)) // Has elements\n// TypeError: Cannot freeze array buffer views with elements\n\nObject.freeze(new DataView(new ArrayBuffer(32))) // No elements\n// DataView {}\n\nObject.freeze(new Float64Array(new ArrayBuffer(64), 63, 0)) // No elements\n// Float64Array []\n\nObject.freeze(new Float64Array(new ArrayBuffer(64), 32, 2)) // Has elements\n// TypeError: Cannot freeze array buffer views with elements\n```\n\nNote that as the standard three properties (`buf.byteLength`,\n`buf.byteOffset` and `buf.buffer`) are read-only (as are those of\nan `ArrayBuffer`, there is no reason for\nattempting to freeze these properties.\n\nUnlike [`Object.seal()`](../../globals/Object/seal.mdx), existing properties in objects frozen with `Object.freeze()` are made immutable and data properties cannot be re-assigned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Object/fromEntries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.fromEntries()\n\nThe **`Object.fromEntries()`** method transforms a list of key-value pairs into an object.\n\n## Syntax\n\n```js\nObject.fromEntries(iterable)\n```\n\n### Parameters\n\n- `iterable`\n\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol), such as an `Array` or [Map](../../globals/Map/Map.mdx), containing a list of objects. Each object should have two properties:\n\n    - `0`\n      - : A string or `Symbol` representing the property key.\n    - `1`\n      - : The property value.\n\n    Typically, this object is implemented as a two-element array, with the first element being the property key and the second element being the property value.\n\n### Return value\n\nA new object whose properties are given by the entries of the iterable.\n\n## Description\n\nThe `Object.fromEntries()` method takes a list of key-value pairs and returns a new object whose properties are given by those entries. The `iterable` argument is expected to be an object that implements an `@@iterator` method. The method returns an iterator object that produces two-element array-like objects. The first element is a value that will be used as a property key, and the second element is the value to associate with that property key.\n\n`Object.fromEntries()` performs the reverse of [`Object.entries()`](../../globals/Object/entries.mdx), except that `Object.entries()` only returns string-keyed properties, while `Object.fromEntries()` can also create symbol-keyed properties.\n\n> **Note:** Unlike [`Array.from()`](../../globals/Array/from.mdx), `Object.fromEntries()` does not use the value of `this`, so calling it on another constructor does not create objects of that type.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Object/getOwnPropertyDescriptor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertyDescriptor()\n\nThe **`Object.getOwnPropertyDescriptor()`** method returns an\nobject describing the configuration of a specific property on a given object (that is,\none directly present on an object and not in the object's prototype chain). The object\nreturned is mutable but mutating it has no effect on the original property's\nconfiguration.\n\n## Syntax\n\n```js\nObject.getOwnPropertyDescriptor(obj, prop)\n```\n\n### Parameters\n\n- `obj`\n  - : The object in which to look for the property.\n- `prop`\n  - : The name or `Symbol` of the property whose description is to be\n    retrieved.\n\n### Return value\n\nA property descriptor of the given property if it exists on the object,\n[`undefined`](../../globals/undefined.mdx) otherwise.\n\n## Description\n\nThis method permits examination of the precise description of a property. A\n_property_ in JavaScript consists of either a string-valued name or a\n`Symbol` and a property descriptor. Further information about property\ndescriptor types and their attributes can be found in\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx).\n\nA _property descriptor_ is a record with some of the following attributes:\n\n- `value`\n  - : The value associated with the property (data descriptors only).\n- `writable`\n  - : `true` if and only if the value associated with the property may be\n    changed (data descriptors only).\n- `get`\n  - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no getter (accessor descriptors only).\n- `set`\n  - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no setter (accessor descriptors only).\n- `configurable`\n  - : `true` if and only if the type of this property descriptor may be changed\n    and if the property may be deleted from the corresponding object.\n- `enumerable`\n  - : `true` if and only if this property shows up during enumeration of the\n    properties on the corresponding object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Object/getOwnPropertyDescriptors.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertyDescriptors()\n\nThe **`Object.getOwnPropertyDescriptors()`** method returns all\nown property descriptors of a given object.\n\n## Syntax\n\n```js\nObject.getOwnPropertyDescriptors(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object for which to get all own property descriptors.\n\n### Return value\n\nAn object containing all own property descriptors of an object. Might be an empty\nobject, if there are no properties.\n\n## Description\n\nThis method permits examination of the precise description of all own properties of an\nobject. A _property_ in JavaScript consists of either a string-valued name or a\n`Symbol` and a property descriptor. Further information about property\ndescriptor types and their attributes can be found in\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx).\n\nA _property descriptor_ is a record with some of the following attributes:\n\n- `value`\n  - : The value associated with the property (data descriptors only).\n- `writable`\n  - : `true` if and only if the value associated with the property may be\n    changed (data descriptors only).\n- `get`\n  - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no getter (accessor descriptors only).\n- `set`\n  - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no setter (accessor descriptors only).\n- `configurable`\n  - : `true` if and only if the type of this property descriptor may be changed\n    and if the property may be deleted from the corresponding object.\n- `enumerable`\n  - : `true` if and only if this property shows up during enumeration of the\n    properties on the corresponding object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Object/getOwnPropertyNames.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertyNames()\n\nThe **`Object.getOwnPropertyNames()`** method returns an array of all properties (including non-enumerable properties except for those which use Symbol) found directly in a given object.\n\n## Syntax\n\n```js\nObject.getOwnPropertyNames(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object whose enumerable and non-enumerable properties are to be returned.\n\n### Return value\n\nAn array of strings that corresponds to the properties found directly in the given object.\n\n## Description\n\n`Object.getOwnPropertyNames()` returns an array whose elements are strings corresponding to the enumerable and non-enumerable properties found directly in a given object `obj`. The ordering of the enumerable properties in the array is consistent with the ordering exposed by a `for...in` loop (or by [`Object.keys()`](../../globals/Object/keys.mdx)) over the properties of the object. The non-negative integer keys of the object (both enumerable and non-enumerable) are added in ascending order to the array first, followed by the string keys in the order of insertion.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Object/getOwnPropertySymbols.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertySymbols()\n\nThe **`Object.getOwnPropertySymbols()`** method returns an array of all symbol properties found directly upon a given object.\n\n## Syntax\n\n```js\nObject.getOwnPropertySymbols(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object whose symbol properties are to be returned.\n\n### Return value\n\nAn array of all symbol properties found directly upon the given object.\n\n## Description\n\nSimilar to [`Object.getOwnPropertyNames()`](../../globals/Object/getOwnPropertyNames.mdx), you can get all symbol properties of a given object as an array of symbols. Note that [`Object.getOwnPropertyNames()`](../../globals/Object/getOwnPropertyNames.mdx) itself does not contain the symbol properties of an object and only the string properties.\n\nAs all objects have no own symbol properties initially, `Object.getOwnPropertySymbols()` returns an empty array unless you have set symbol properties on your object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Object/getPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getPrototypeOf()\n\nThe **`Object.getPrototypeOf()`** method returns the prototype\n(i.e. the value of the internal `[[Prototype]]` property) of the specified\nobject.\n\n## Syntax\n\n```js\nObject.getPrototypeOf(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object whose prototype is to be returned.\n\n### Return value\n\nThe prototype of the given object, which may be `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Object/hasOwn.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.hasOwn()\n\nThe **`Object.hasOwn()`** static method returns `true` if the specified object has the indicated property as its _own_ property.\nIf the property is inherited, or does not exist, the method returns `false`.\n\n> **Note:** `Object.hasOwn()` is intended as a replacement for [`Object.prototype.hasOwnProperty()`](../../globals/Object/prototype/hasOwnProperty.mdx).\n\n\n\n## Syntax\n\n```js\nhasOwn(instance, prop)\n```\n\n### Parameters\n\n- `instance`\n  - : The JavaScript object instance to test.\n- `prop`\n  - : The `String` name or [Symbol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol) of the property to test.\n\n### Return value\n\n`true` if the specified object has directly defined the specified property.\nOtherwise `false`\n\n## Description\n\nThe **`Object.hasOwn()`** method returns `true` if the specified property is a\ndirect property of the object — even if the property value is `null` or `undefined`.\nThe method returns `false` if the property is inherited, or has not been declared at all.\nUnlike the `in` operator, this\nmethod does not check for the specified property in the object's prototype chain.\n\nIt is recommended over [`Object.prototype.hasOwnProperty()`](../../globals/Object/prototype/hasOwnProperty.mdx) because\nit works for objects created using `Object.create(null)` and with objects that\nhave overridden the inherited `hasOwnProperty()` method. While it is possible to\nworkaround these problems by calling `Object.prototype.hasOwnProperty()` on an\nexternal object, `Object.hasOwn()` is more intuitive.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Object/is.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.is()\n\nThe **`Object.is()`** method determines whether two values are [the same value](https://developer.mozilla.org/docs/Web/JavaScript/Equality_comparisons_and_sameness#same-value_equality_using_object.is).\n\n## Syntax\n\n```js\nObject.is(value1, value2)\n```\n\n### Parameters\n\n- `value1`\n  - : The first value to compare.\n- `value2`\n  - : The second value to compare.\n\n### Return value\n\nA boolean indicating whether or not the two arguments are the same value.\n\n## Description\n\n`Object.is()` determines whether two values are [the same value](https://developer.mozilla.org/docs/Web/JavaScript/Equality_comparisons_and_sameness#same-value_equality_using_object.is). Two values are the same if one of the following holds:\n\n- both [`undefined`](../../globals/undefined.mdx)\n- both `null`\n- both `true` or both `false`\n- both strings of the same length with the same characters in the same order\n- both the same object (meaning both values reference the same object in memory)\n- both `BigInts` with the same numeric value\n- both `Symbols` that reference the same symbol value\n- both numbers and\n\n  - both `+0`\n  - both `-0`\n  - both [`NaN`](../../globals/NaN.mdx)\n  - or both non-zero, not [`NaN`](../../globals/NaN.mdx), and have the same value\n\n`Object.is()` is not equivalent to the [`==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Equality) operator. The `==` operator applies various coercions to both sides (if they are not the same type) before testing for equality (resulting in such behavior as `\"\" == false` being `true`), but `Object.is()` doesn't coerce either value.\n\n`Object.is()` is also _not_ equivalent to the [`===`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) operator. The only difference between `Object.is()` and `===` is in their treatment of signed zeros and `NaN` values. The `===` operator (and the `==` operator) treats the number values `-0` and `+0` as equal, but treats [`NaN`](../../globals/NaN.mdx) as not equal to each other.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Object/isExtensible.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.isExtensible()\n\nThe **`Object.isExtensible()`** method determines if an object\nis extensible (whether it can have new properties added to it).\n\n## Syntax\n\n```js\nObject.isExtensible(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be checked.\n\n### Return value\n\nA `Boolean` indicating whether or not the given object is extensible.\n\n## Description\n\nObjects are extensible by default: they can have new properties added to them, and their `[[Prototype]]` can be re-assigned. An object can be marked as non-extensible using one of [`Object.preventExtensions()`](../../globals/Object/preventExtensions.mdx), [`Object.seal()`](../../globals/Object/seal.mdx), [`Object.freeze()`](../../globals/Object/freeze.mdx), or [`Reflect.preventExtensions()`](../../globals/Reflect/preventExtensions.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Object/isFrozen.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.isFrozen()\n\nThe **`Object.isFrozen()`** determines if an object is\n[frozen](../../globals/Object/freeze.mdx).\n\n## Syntax\n\n```js\nObject.isFrozen(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be checked.\n\n### Return value\n\nA `Boolean` indicating whether or not the given object is frozen.\n\n## Description\n\nAn object is frozen if and only if it is not [extensible](../../globals/Object/isExtensible.mdx), all its properties are non-configurable, and all its data\nproperties (that is, properties which are not accessor properties with getter or setter\ncomponents) are non-writable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Object/isSealed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.isSealed()\n\nThe **`Object.isSealed()`** method determines if an object is\nsealed.\n\n## Syntax\n\n```js\nObject.isSealed(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be checked.\n\n### Return value\n\nA `Boolean` indicating whether or not the given object is sealed.\n\n## Description\n\nReturns `true` if the object is sealed, otherwise `false`. An\nobject is sealed if it is not [extensible](../../globals/Object/isExtensible.mdx) and\nif all its properties are non-configurable and therefore not removable (but not\nnecessarily non-writable).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Object/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.keys()\n\nThe **`Object.keys()`** method returns an array of a given object's own enumerable string-keyed property names.\n\n## Syntax\n\n```js\nObject.keys(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : An object.\n\n### Return value\n\nAn array of strings representing the given object's own enumerable string-keyed property keys.\n\n## Description\n\n`Object.keys()` returns an array whose elements are strings corresponding to the enumerable string-keyed property names found directly upon `object`. This is the same as iterating with a `for...in` loop, except that a `for...in` loop enumerates properties in the prototype chain as well. The order of the array returned by `Object.keys()` is the same as that provided by a `for...in` loop.\n\nIf you need the property values, use [`Object.values()`](../../globals/Object/values.mdx) instead. If you need both the property keys and values, use [`Object.entries()`](../../globals/Object/entries.mdx) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Object/preventExtensions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.preventExtensions()\n\nThe **`Object.preventExtensions()`** method prevents new\nproperties from ever being added to an object (i.e. prevents future extensions to the\nobject). It also prevents the object's prototype from being re-assigned.\n\n## Syntax\n\n```js\nObject.preventExtensions(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be made non-extensible.\n\n### Return value\n\nThe object being made non-extensible.\n\n## Description\n\nAn object is extensible if new properties can be added to it.\n`Object.preventExtensions()` marks an object as no longer extensible, so that\nit will never have properties beyond the ones it had at the time it was marked as\nnon-extensible. Note that the properties of a non-extensible object, in general, may\nstill be _deleted_. Attempting to add new properties to a non-extensible object\nwill fail, either silently or, in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), throwing a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\nUnlike [`Object.seal()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/seal) and [`Object.freeze()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze), `Object.preventExtensions()` invokes an intrinsic JavaScript behavior and cannot be replaced with a composition of several other operations. It also has its `Reflect` counterpart (which only exists for intrinsic operations), [`Reflect.preventExtensions()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Reflect/preventExtensions).\n\n`Object.preventExtensions()` only prevents addition of own properties. Properties can still be added to the object prototype.\n\nThis method makes the `[[Prototype]]` of the target immutable; any `[[Prototype]]` re-assignment will throw a `TypeError`. This behavior is specific to the internal `[[Prototype]]` property; other properties of the target object will remain mutable.\n\nThere is no way to make an object extensible again once it has been made non-extensible.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Object/prototype/constructor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.constructor\n\nThe **`constructor`** data property of an `Object` instance returns a reference to the constructor function that created the instance object. Note that the value of this property is a reference to _the function itself_, not a string containing the function's name.\n\n> **Note:** This is a property of JavaScript objects. For the `constructor` method in classes, see [its own reference page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/constructor).\n\n## Value\n\nA reference to the constructor function that created the instance object.\n\n> **Note:** This property is created by default on the [`prototype`](../../../globals/Function/prototype/) property of every constructor function and is inherited by all objects created by that constructor.\n\n## Description\n\nAny object (with the exception of [`null` prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) will have a `constructor` property on its `[[Prototype]]`. Objects created with literals will also have a `constructor` property that points to the constructor type for that object — for example, array literals create `Array` objects, and [object literals](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Object_initializer) create plain objects.\n\n```js\nconst o1 = {};\no1.constructor === Object; // true\n\nconst o2 = new Object();\no2.constructor === Object; // true\n\nconst a1 = [];\na1.constructor === Array; // true\n\nconst a2 = new Array();\na2.constructor === Array; // true\n\nconst n = 3;\nn.constructor === Number; // true\n```\n\nNote that `constructor` usually comes from the constructor's [`prototype`](../../../globals/Function/prototype/) property. If you have a longer prototype chain, you can usually expect every object in the chain to have a `constructor` property.\n\n```js\nconst o = new TypeError(); // Inheritance: TypeError -> Error -> Object\nconst proto = Object.getPrototypeOf;\nproto(o).constructor === TypeError; // true\nproto(proto(o)).constructor === Error; // true\nproto(proto(proto(o))).constructor === Object; // true\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Object/prototype/hasOwnProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.hasOwnProperty()\n\nThe **`hasOwnProperty()`** method returns a boolean indicating whether the\nobject has the specified property as its own property (as opposed to inheriting\nit).\n\n> **Note:** [`Object.hasOwn()`](../../../globals/Object/hasOwn.mdx) is recommended over\n> `hasOwnProperty()`, in browsers where it is supported.\n\n## Syntax\n\n```js\nhasOwnProperty(prop)\n```\n\n### Parameters\n\n- `prop`\n  - : The `String` name or `Symbol` of the property to test.\n\n### Return value\n\nReturns `true` if the object has the specified property as own property; `false`\notherwise.\n\n## Description\n\nThe **`hasOwnProperty()`** method returns `true` if the specified property is a\ndirect property of the object — even if the value is `null` or `undefined`. The\nmethod returns `false` if the property is inherited, or has not been declared at\nall. Unlike the `in` operator, this\nmethod does not check for the specified property in the object's prototype\nchain.\n\nThe method can be called on _most_ JavaScript objects, because most objects\ndescend from `Object`, and hence inherit its methods. For\nexample `Array` is an `Object`, so you can\nuse `hasOwnProperty()` method to check whether an index exists:\n\n```js\nconst fruits = ['Apple', 'Banana','Watermelon', 'Orange'];\nfruits.hasOwnProperty(3);   // true ('Orange')\nfruits.hasOwnProperty(4);   // false - not defined\n```\n\nThe method will not be available in objects where it is reimplemented, or on\nobjects created using `Object.create(null)` (as these don't inherit from\n`Object.prototype`). Examples for these cases are given below.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Object/prototype/isPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.isPrototypeOf()\n\nThe **`isPrototypeOf()`** method checks if an object exists in another object's prototype chain.\n\n> **Note:** `isPrototypeOf()` differs from the [`instanceof`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/instanceof) operator. In the expression `object instanceof AFunction`, `object`'s prototype chain is checked against `AFunction.prototype`, not against `AFunction` itself.\n\n## Syntax\n\n```js\nisPrototypeOf(object)\n```\n\n### Parameters\n\n- `object`\n  - : The object whose prototype chain will be searched.\n\n### Return value\n\nA boolean indicating whether the calling object (`this`) lies in the prototype chain of `object`. Directly returns `false` when `object` is not an object (i.e. a primitive).\n\n### Errors thrown\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown if `this` is `null` or `undefined` (because it can't be [converted to an object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#object_coercion)).\n\n## Description\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `isPrototypeOf()` method. This method allows you to check whether or not the object exists within another object's prototype chain. If the `object` passed as the parameter is not an object (i.e. a primitive), the method directly returns `false`. Otherwise, the `this` value is [converted to an object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#object_coercion), and the prototype chain of `object` is searched for the `this` value, until the end of the chain is reached or the `this` value is found.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Object/prototype/propertyIsEnumerable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.propertyIsEnumerable()\n\nThe **`propertyIsEnumerable()`** method returns a boolean indicating whether the specified property is the object's [enumerable own](https://developer.mozilla.org/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) property.\n\n## Syntax\n\n```js\npropertyIsEnumerable(prop)\n```\n\n### Parameters\n\n- `prop`\n  - : The name of the property to test. Can be a string or a `Symbol`.\n\n### Return value\n\nA boolean value indicating whether the specified property is enumerable and is the object's own property.\n\n## Description\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `propertyIsEnumerable()` method. This method determines if the specified property, string or symbol, is an enumerable own property of the object. If the object does not have the specified property, this method returns `false`.\n\nThis method is equivalent to [`Object.getOwnPropertyDescriptor(obj, prop)?.enumerable ?? false`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Object/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string representing the object. This method is meant to be overridden by derived objects for locale-specific purposes.\n\n## Syntax\n\n```js\ntoLocaleString()\n```\n\n### Parameters\n\nNone. However, all objects that override this method are expected to accept at most two parameters, corresponding to `locales` and `options`, such as [`Date.prototype.toLocaleString()`](../../../globals/Date/prototype/toLocaleString.mdx). The parameter positions should not be used for any other purpose.\n\n### Return value\n\nThe return value of calling `this.toString()`.\n\n## Description\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `toLocaleString()` method. `Object`'s `toLocaleString` returns the result of calling [`this.toString()`](../../../globals/Object/prototype/toString.mdx).\n\nThis function is provided to give objects a generic `toLocaleString` method, even though not all may use it. In the core language, these built-in objects override `toLocaleString` to provide locale-specific formatting:\n\n- `Array`: [`Array.prototype.toLocaleString()`](../../../globals/Array/prototype/toLocaleString.mdx)\n- `Number`: [`Number.prototype.toLocaleString()`](../../../globals/Number/prototype/toLocaleString.mdx)\n- `Date`: [`Date.prototype.toLocaleString()`](../../../globals/Date/prototype/toLocaleString.mdx)\n- `BigInt`: [`BigInt.prototype.toLocaleString()`](../../../globals/BigInt/prototype/toLocaleString.mdx)\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Object/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.toString()\n\nThe **`toString()`** method returns a string representing the object. This method is meant to be overridden by derived objects for custom [type conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) logic.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nBy default `toString()` takes no parameters. However, objects that inherit from `Object` may override it with their own implementations that do take parameters. For example, the [`Number.prototype.toString()`](../../../globals/Number/prototype/toString.mdx) and [`BigInt.prototype.toString()`](../../../globals/BigInt/prototype/toString.mdx) methods take an optional `radix` parameter.\n\n### Return value\n\nA string representing the object.\n\n## Description\n\nJavaScript calls the `toString` method to [convert an object to a primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion). You rarely need to invoke the `toString` method yourself; JavaScript automatically invokes it when encountering an object where a primitive value is expected.\n\nThis method is called in priority by [string conversion](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion), but [numeric conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#numeric_coercion) and [primitive conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion) call `valueOf()` in priority. However, because the base [`valueOf()`](../../../globals/Object/prototype/valueOf.mdx) method returns an object, the `toString()` method is usually called in the end, unless the object overrides `valueOf()`. For example, `+[1]` returns `1`, because its [`toString`](../../../globals/Array/prototype/toString.mdx) method returns `\"1\"`, which is then converted to a number.\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `toString()` method. When you create a custom object, you can override `toString()` to call a custom method, so that your custom object can be converted to a string value. Alternatively, you can add a [`Symbol.toPrimitive`](../../../globals/Symbol/toPrimitive.mdx) method, which allows even more control over the conversion process, and will always be preferred over `valueOf` or `toString` for any type conversion.\n\nTo use the base `Object.prototype.toString()` with an object that has it overridden (or to invoke it on `null` or `undefined`), you need to call [`Function.prototype.call()`](../../../globals/Function/prototype/call.mdx) or [`Function.prototype.apply()`](../../../globals/Function/prototype/apply.mdx) on it, passing the object you want to inspect as the first parameter (called `thisArg`).\n\n```js\nconst arr = [1, 2, 3];\n\narr.toString(); // \"1,2,3\"\nObject.prototype.toString.call(arr); // \"[object Array]\"\n```\n\n`Object.prototype.toString()` returns `\"[object Type]\"`, where `Type` is the object type. If the object has a [`Symbol.toStringTag`](../../../globals/Symbol/toStringTag.mdx) property whose value is a string, that value will be used as the `Type`. Many built-in objects, including [`Map`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map) and [`Symbol`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol), have a `Symbol.toStringTag`. Some objects predating ES6 do not have `Symbol.toStringTag`, but have a special tag nonetheless. They include (the tag is the same as the type name given below):\n\n- [`Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\n- [`Function`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions) (anything whose [`typeof`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/typeof) returns `\"function\"`)\n- [`Error`](../../../globals/Error/Error.mdx)\n- [`Boolean`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)\n- [`Number`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)\n- [`String`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\n- [`Date`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date)\n- [`RegExp`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp)\n\nThe [`arguments`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/arguments) object returns `\"[object Arguments]\"`. Everything else, including user-defined classes, unless with a custom `Symbol.toStringTag`, will return `\"[object Object]\"`.\n\n`Object.prototype.toString()` invoked on [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) returns `[object Null]` and `[object Undefined]`, respectively.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Object/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.valueOf()\n\nThe **`valueOf()`** method of `Object` converts the `this` value [to an object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#object_coercion). This method is meant to be overridden by derived objects for custom [type conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) logic.\n\n\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nThe `this` value, converted to an object.\n\n> **Note:** In order for `valueOf` to be useful during type conversion, it must return a primitive. Because all primitive types have their own `valueOf()` methods, calling `aPrimitiveValue.valueOf()` generally does not invoke `Object.prototype.valueOf()`.\n\n## Description\n\nJavaScript calls the `valueOf` method to [convert an object to a primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion). You rarely need to invoke the `valueOf` method yourself; JavaScript automatically invokes it when encountering an object where a primitive value is expected.\n\nThis method is called in priority by [numeric conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#numeric_coercion) and [primitive conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion), but [string conversion](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) calls `toString()` in priority, and `toString()` is very likely to return a string value (even for the [`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx) base implementation), so `valueOf()` is usually not called in this case.\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `toString()` method. The `Object.prototype.valueOf()` base implementation is deliberately useless: by returning an object, its return value will never be used by any [primitive conversion algorithm](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion). Many built-in objects override this method to return an appropriate primitive value. When you create a custom object, you can override `valueOf()` to call a custom method, so that your custom object can be converted to a primitive value. Generally, `valueOf()` is used to return a value that is most meaningful for the object — unlike `toString()`, it does not need to be a string. Alternatively, you can add a [`Symbol.toPrimitive`](../../../globals/Symbol/toPrimitive.mdx) method, which allows even more control over the conversion process, and will always be preferred over `valueOf` or `toString` for any type conversion.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Object/seal.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.seal()\n\nThe **`Object.seal()`** method _seals_ an object. Sealing an object [prevents extensions](../../globals/Object/preventExtensions.mdx) and makes existing properties non-configurable. A sealed object has a fixed set of properties: new properties cannot be added, existing properties cannot be removed, their enumerability and configurability cannot be changed, and its prototype cannot be re-assigned. Values of existing properties can still be changed as long as they are writable. `seal()` returns the same object that was passed in.\n\n## Syntax\n\n```js\nObject.seal(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be sealed.\n\n### Return value\n\nThe object being sealed.\n\n## Description\n\nSealing an object is equivalent to [preventing extensions](../../globals/Object/preventExtensions.mdx) and then changing all existing properties' descriptors to `configurable: false`. This has the effect of making the set of properties on the object fixed. Making all properties non-configurable\nalso prevents them from being converted from data properties to accessor properties and\nvice versa, but it does not prevent the values of data properties from being changed.\nAttempting to delete or add properties to a sealed object, or to convert a data property\nto accessor or vice versa, will fail, either silently or by throwing a\n[`TypeError`](../../globals/TypeError/TypeError.mdx) (most commonly, although not exclusively, when in \"strict mode\" code).\n\nThe prototype chain remains untouched. However, due to the effect of [preventing extensions](../../globals/Object/preventExtensions.mdx), the `[[Prototype]]` cannot be reassigned.\n\nUnlike [`Object.freeze()`](../../globals/Object/freeze.mdx), objects sealed with `Object.seal()` may have their existing\nproperties changed, as long as they are writable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Object/setPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.setPrototypeOf()\n\nThe **`Object.setPrototypeOf()`** method sets the prototype (i.e., the internal `[[Prototype]]` property) of a specified object to another object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null).\n\n> **Warning:** Changing the `[[Prototype]]` of an object is, by the nature of how modern JavaScript engines optimize property accesses, currently a very slow operation in every browser and JavaScript engine. In addition, the effects of altering inheritance are subtle and far-flung, and are not limited to the time spent in the `Object.setPrototypeOf(...)` statement, but may extend to **_any_** code that has access to any object whose `[[Prototype]]` has been altered. You can read more in [JavaScript engine fundamentals: optimizing prototypes](https://mathiasbynens.be/notes/prototypes).\n>\n> Because this feature is a part of the language, it is still the burden on engine developers to implement that feature performantly (ideally). Until engine developers address this issue, if you are concerned about performance, you should avoid setting the `[[Prototype]]` of an object. Instead, create a new object with the desired `[[Prototype]]` using [`Object.create()`](../../globals/Object/create.mdx).\n\n## Syntax\n\n```js\nObject.setPrototypeOf(obj, prototype)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which is to have its prototype set.\n- `prototype`\n  - : The object's new prototype (an object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null)).\n\n### Return value\n\nThe specified object.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if one of the following conditions is met:\n    - The `obj` parameter is [non-extensible](../../globals/Object/isExtensible.mdx), or it's an [immutable prototype exotic object](https://tc39.es/ecma262/#sec-immutable-prototype-exotic-objects), such as `Object.prototype`.\n    - The `prototype` parameter is not an object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null).\n\n## Description\n\n`Object.setPrototypeOf()` is generally considered the proper way to set the prototype of an object.\n\nIf the `obj` parameter is not an object (e.g. number, string, etc.), this method does nothing.\n\nFor security concerns, there are certain built-in objects that are designed to have an _immutable prototype_. This prevents prototype pollution attacks, especially [proxy-related ones](https://github.com/tc39/ecma262/issues/272). The core language only specifies `Object.prototype` as an immutable prototype exotic object, whose prototype is always `null`.\n\n```js\nObject.isExtensible(Object.prototype); // true; you can add more properties\nObject.setPrototypeOf(Object.prototype, {}); // TypeError: Immutable prototype object '#<Object>' cannot have their prototype set\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Object/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.values()\n\nThe **`Object.values()`** method returns an array of a given object's own enumerable string-keyed property values.\n\n## Syntax\n\n```js\nObject.values(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : An object.\n\n### Return value\n\nAn array containing the given object's own enumerable string-keyed property values.\n\n## Description\n\n`Object.values()` returns an array whose elements are strings corresponding to the enumerable string-keyed property values found directly upon `object`. This is the same as iterating with a `for...in` loop, except that a `for...in` loop enumerates properties in the prototype chain as well. The order of the array returned by `Object.values()` is the same as that provided by a `for...in` loop.\n\nIf you need the property keys, use [`Object.keys()`](../../globals/Object/keys.mdx) instead. If you need both the property keys and values, use [`Object.entries()`](../../globals/Object/entries.mdx) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Promise/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get Promise[Symbol.species]\n\nThe **`Promise[Symbol.species]`** accessor property returns the constructor used to construct return values from promise methods.\n\n> **Warning:** The existence of `Symbol.species` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Syntax\n\n```js\nPromise[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct return values from promise chaining methods that create new promises.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `Promise` objects. Subclass constructors may override it to change the constructor assignment. The default implementation is basically:\n\n```js\n// Hypothetical underlying implementation for illustration\nclass Promise {\n  static get [Symbol.species]() {\n    return this;\n  }\n}\n```\n\nBecause of this polymorphic implementation, `Symbol.species` of derived subclasses would also return the constructor itself by default.\n\n```js\nclass SubPromise extends Promise {}\nSubPromise[Symbol.species] === Promise; // true\n```\n\nPromise chaining methods — [`then()`](../../globals/Promise/prototype/then.mdx), [`finally()`](../../globals/Promise/prototype/finally.mdx) — return new promise objects. They get the constructor to construct the new promise through `this.constructor[Symbol.species]`. If `this.constructor` is `undefined`, or if `this.constructor[Symbol.species]` is `undefined` or `null`, the default [`Promise()`](../../globals/Promise/Promise.mdx) constructor is used. Otherwise, the constructor returned by `this.constructor[Symbol.species]` is used to construct the new promise object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Promise/Promise.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise()\n\nThe **`Promise()`** constructor is primarily used to wrap functions that do not already support promises.\n\n## Syntax\n\n```js\nnew Promise(executor)\n```\n\n> **Note:** `Promise()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `executor`\n  - : A `function` to be executed by the constructor. It receives two functions as parameters: `resolveFunc` and `rejectFunc`. Any errors thrown in the `executor` will cause the promise to be rejected, and the return value will be neglected. The semantics of `executor` are detailed below.\n\n### Return value\n\nWhen called via `new`, the `Promise` constructor returns a promise object. The promise object will become _resolved_ when either of the functions `resolveFunc` or `rejectFunc` are invoked. Note that if you call `resolveFunc` or `rejectFunc` and pass another `Promise` object as an argument, it can be said to be \"resolved\", but still not \"settled\". See the [Promise description](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#description) for more explanation.\n\n## Description\n\nTraditionally (before promises), asynchronous tasks were designed as callbacks.\n\n```js\nreadFile(\"./data.txt\", (error, result) => {\n  // This callback will be called when the task is done, with the\n  // final `error` or `result`. Any operation dependent on the\n  // result must be defined within this callback.\n});\n// Code here is immediately executed after the `readFile` request\n// is fired. It does not wait for the callback to be called, hence\n// making `readFile` \"asynchronous\".\n```\n\nTo take advantage of the readability improvement and language features offered by promises, the `Promise()` constructor allows one to transform the callback-based API to a promise-based one.\n\n> **Note:** If your task is already promise-based, you likely do not need the `Promise()` constructor.\n\nThe `executor` is custom code that ties an outcome in a callback to a promise. You, the programmer, write the `executor`. Its signature is expected to be:\n\n```js\nfunction executor(resolveFunc, rejectFunc) {\n  // Typically, some asynchronous operation that accepts a callback,\n  // like the `readFile` function above\n}\n```\n\n`resolveFunc` and `rejectFunc` are also functions, and you can give them whatever actual names you want. Their signatures are simple: they accept a single parameter of any type.\n\n```js\nresolveFunc(value); // call on resolved\nrejectFunc(reason); // call on rejected\n```\n\nThe `value` parameter passed to `resolveFunc` can be another promise object, in which case the newly constructed promise's state will be \"locked in\" to the promise passed (as part of the [resolution](#resolver-function) promise). The `rejectFunc` has semantics close to the [`throw`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/throw) statement, so `reason` is typically an [`Error`](../../globals/Error/Error.mdx) instance. If either `value` or `reason` is omitted, the promise is fulfilled/rejected with `undefined`.\n\nThe `executor`'s completion state has limited effect on the promise's state:\n\n- The `executor` return value is ignored. `return` statements within the `executor` merely impact control flow and alter whether a part of the function is executed, but do not have any impact on the promise's fulfillment value. If `executor` exits and it's impossible for `resolveFunc` or `rejectFunc` to be called in the future (for example, there are no async tasks scheduled), then the promise remains pending forever.\n- If an error is thrown in the `executor`, the promise is rejected, unless `resolveFunc` or `rejectFunc` has already been called.\n\n> **Note:** The existence of pending promises does not prevent the program from exiting. If the event loop is empty, the program exits despite any pending promises (because those are necessarily forever-pending).\n\nHere's a summary of the typical flow:\n\n1. At the time when the constructor generates the new `Promise` object, it also generates a corresponding pair of functions for `resolveFunc` and `rejectFunc`; these are \"tethered\" to the `Promise` object.\n2. `executor` typically wraps some asynchronous operation which provides a callback-based API. The callback (the one passed to the original callback-based API) is defined within the `executor` code, so it has access to the `resolveFunc` and `rejectFunc`.\n3. The `executor` is called synchronously (as soon as the `Promise` is constructed) with the `resolveFunc` and `rejectFunc` functions as arguments.\n4. The code within the `executor` has the opportunity to perform some operation. The eventual completion of the asynchronous task is communicated with the promise instance via the side effect caused by `resolveFunc` or `rejectFunc`. The side effect is that the `Promise` object becomes \"resolved\".\n   - If `resolveFunc` is called first, the value passed will be [resolved](#resolver-function). The promise may stay pending (in case another [thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) is passed), become fulfilled (in most cases where a non-thenable value is passed), or become rejected (in case of an invalid resolution value).\n   - If `rejectFunc` is called first, the promise instantly becomes rejected.\n   - Once one of the resolving functions (`resolveFunc` or `rejectFunc`) is called, the promise stays resolved. Only the first call to `resolveFunc` or `rejectFunc` affects the promise's eventual state, and subsequent calls to either function can neither change the fulfillment value/rejection reason nor toggle its eventual state from \"fulfilled\" to \"rejected\" or opposite.\n   - If `executor` exits by throwing an error, then the promise is rejected. However, the error is ignored if one of the resolving functions has already been called (so that the promise is already resolved).\n   - Resolving the promise does not necessarily cause the promise to become fulfilled or rejected (i.e. settled). The promise may still be pending because it's resolved with another thenable, but its eventual state will match that of the resolved thenable.\n5. Once the promise settles, it (asynchronously) invokes any further handlers associated through [`Promise.prototype.then`](../../globals/Promise/prototype/then.mdx), [`Promise.prototype.catch`](../../globals/Promise/prototype/catch.mdx), or [`Promise.prototype.finally`](../../globals/Promise/prototype/finally.mdx). The eventual fulfillment value or rejection reason is passed to the invocation of fulfillment and rejection handlers as an input parameter (see [Chained Promises](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#chained_promises)).\n\nFor example, the callback-based `readFile` API above can be transformed into a promise-based one.\n\n```js\nconst readFilePromise = (path) =>\n  new Promise((resolve, reject) => {\n    readFile(path, (error, result) => {\n      if (error) {\n        reject(error);\n      } else {\n        resolve(result);\n      }\n    });\n  });\n\nreadFilePromise(\"./data.txt\")\n  .then((result) => console.log(result))\n  .catch((error) => console.error(\"Failed to read data\"));\n```\n\n### Resolver function\n\nThe resolver function `resolveFunc` has the following behaviors:\n\n- If it's called with the same value as the newly created promise (the promise it's \"tethered to\"), the promise is rejected with a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n- If it's called with a non-[thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) value (a primitive, or an object whose `then` property is not callable, including when the property is not present), the promise is immediately fulfilled with that value.\n- If it's called with a thenable value (including another `Promise` instance), then the thenable's `then` method is saved and called in the future (it's always called asynchronously). The `then` method will be called with two callbacks, which are two new functions with the exact same behaviors as the `resolveFunc` and `rejectFunc` passed to the `executor` function. If calling the `then` method throws, then the current promise is rejected with the thrown error.\n\nIn the last case, it means code like:\n\n```js\nnew Promise((resolve, reject) => {\n  resolve(thenable);\n});\n```\n\nIs roughly equivalent to:\n\n```js\nnew Promise((resolve, reject) => {\n  try {\n    thenable.then(\n      (value) => resolve(value),\n      (reason) => reject(reason),\n    );\n  } catch (e) {\n    reject(e);\n  }\n});\n```\n\nExcept that in the `resolve(thenable)` case:\n\n1. `resolve` is called synchronously, so that calling `resolve` or `reject` again has no effect, even when the handlers attached through `anotherPromise.then()` are not called yet.\n2. The `then` method is called asynchronously, so that the promise will never be instantly resolved if a thenable is passed.\n\nBecause `resolve` is called again with whatever `thenable.then()` passes to it as `value`, the resolver function is able to flatten nested thenables, where a thenable calls its `onFulfilled` handler with another thenable. The effect is that the fulfillment handler of a real promise will never receive a thenable as its fulfillment value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Promise/all.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.all()\n\nThe **`Promise.all()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise fulfills when all of the input's promises fulfill (including when an empty iterable is passed), with an array of the fulfillment values. It rejects when any of the input's promises rejects, with this first rejection reason.\n\n## Syntax\n\n```js\nPromise.all(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array` of promises.\n\n### Return value\n\nA `Promise` that is:\n\n- **Already fulfilled**, if the `iterable` passed is empty.\n- **Asynchronously fulfilled**, when all the promises in the given `iterable` fulfill. The fulfillment value is an array of fulfillment values, in the order of the promises passed, regardless of completion order. If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) fulfilled.\n- **Asynchronously rejected**, when any of the promises in the given `iterable` rejects. The rejection reason is the rejection reason of the first promise that was rejected.\n\n## Description\n\nThe `Promise.all()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. It can be useful for aggregating the results of multiple promises. It is typically used when there are multiple related asynchronous tasks that the overall code relies on to work successfully — all of whom we want to fulfill before the code execution continues.\n\n`Promise.all()` will reject immediately upon **any** of the input promises rejecting. In comparison, the promise returned by [`Promise.allSettled()`](../../globals/Promise/allSettled.mdx) will wait for all input promises to complete, regardless of whether or not one rejects. Use `allSettled()` if you need the final result of every promise in the input iterable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Promise/allSettled.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.allSettled()\n\nThe **`Promise.allSettled()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise fulfills when all of the input's promises settle (including when an empty iterable is passed), with an array of objects that describe the outcome of each promise.\n\n## Syntax\n\n```js\nPromise.allSettled(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array` of promises.\n\n### Return value\n\nA `Promise` that is:\n\n- **Already fulfilled**, if the `iterable` passed is empty.\n- **Asynchronously fulfilled**, when all promise in the given `iterable` have settled (either fulfilled or rejected). The fulfillment value is an array of objects, each describing the outcome of one promise in the `iterable`, in the order of the promises passed, regardless of completion order. Each outcome object has the following properties:\n\n  - `status`\n    - : A string, either `\"fulfilled\"` or `\"rejected\"`, indicating the eventual state of the promise.\n  - `value`\n    - : Only present if `status` is `\"fulfilled\"`. The value that the promise was fulfilled with.\n  - `reason`\n    - : Only present if `status` is `\"rejected\"`. The reason that the promise was rejected with.\n\n  If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) fulfilled.\n\n## Description\n\nThe `Promise.allSettled()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. `Promise.allSettled()` is typically used when you have multiple asynchronous tasks that are not dependent on one another to complete successfully, or you'd always like to know the result of each promise.\n\nIn comparison, the Promise returned by [`Promise.all()`](../../globals/Promise/all.mdx) may be more appropriate if the tasks are dependent on each other, or if you'd like to immediately reject upon any of them rejecting.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Promise/any.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.any()\n\nThe **`Promise.any()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise fulfills when any of the input's promises fulfills, with this first fulfillment value. It rejects when all of the input's promises reject (including when an empty iterable is passed), with an `AggregateError` containing an array of rejection reasons.\n\n## Syntax\n\n```js\nPromise.any(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array` of promises.\n\n### Return value\n\nA `Promise` that is:\n\n- **Already rejected**, if the `iterable` passed is empty.\n- **Asynchronously fulfilled**, when any of the promises in the given `iterable` fulfills. The fulfillment value is the fulfillment value of the first promise that was fulfilled.\n- **Asynchronously rejected**, when all of the promises in the given `iterable` reject. The rejection reason is an `AggregateError` containing an array of rejection reasons in its `errors` property. The errors are in the order of the promises passed, regardless of completion order. If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) rejected.\n\n## Description\n\nThe `Promise.any()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. This method is useful for returning the first promise that fulfills. It short-circuits after a promise fulfills, so it does not wait for the other promises to complete once it finds one.\n\nUnlike [`Promise.all()`](../../globals/Promise/all.mdx), which returns an _array_ of fulfillment values, we only get one fulfillment value (assuming at least one promise fulfills). This can be beneficial if we need only one promise to fulfill but we do not care which one does. Note another difference: this method rejects upon receiving an _empty iterable_, since, truthfully, the iterable contains no items that fulfill. You may compare `Promise.any()` and `Promise.all()` with [`Array.prototype.some()`](../../globals/Array/prototype/some.mdx) and [`Array.prototype.every()`](../../globals/Array/prototype/every.mdx).\n\nAlso, unlike [`Promise.race()`](../../globals/Promise/race.mdx), which returns the first _settled_ value (either fulfillment or rejection), this method returns the first _fulfilled_ value. This method ignores all rejected promises up until the first promise that fulfills.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Promise/prototype/catch.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.prototype.catch()\n\nThe **`catch()`** method of a `Promise` object schedules a function to be called when the promise is rejected. It immediately returns an equivalent `Promise` object, allowing you to [chain](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining) calls to other promise methods. It is a shortcut for [`Promise.prototype.then(undefined, onRejected)`](../../../globals/Promise/prototype/then.mdx).\n\n## Syntax\n\n```js\ncatch(onRejected)\n\ncatch((reason) => {\n  // rejection handler\n})\n```\n\n### Parameters\n\n- `onRejected`\n  - : A `Function` called when the `Promise` is rejected. This function has one parameter: the _rejection reason_.\n\n### Return value\n\nReturns a new `Promise`. This new promise is always pending when returned, regardless of the current promise's status. It's eventually rejected if `onRejected` throws an error or returns a Promise which is itself rejected; otherwise, it's eventually fulfilled.\n\n## Description\n\nThe `catch` method is used for error handling in promise composition. Since it returns a `Promise`, it [can be chained](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining_after_a_catch) in the same way as its sister method, [`Promise.prototype.then()`](../../../globals/Promise/prototype/then.mdx).\n\nIf a promise becomes rejected, and there are no rejection handlers to call (a handler can be attached through any of [`Promise.prototype.then`](../../../globals/Promise/prototype/then.mdx), [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx), or [`Promise.prototype.finally`](../../../globals/Promise/prototype/finally.mdx)), then the rejection event is surfaced by the host. In the browser, this results in an [`unhandledrejection`](https://developer.mozilla.org/docs/Web/API/Window/unhandledrejection_event) event. If a handler is attached to a rejected promise whose rejection has already caused an unhandled rejection event, then another [`rejectionhandled`](https://developer.mozilla.org/docs/Web/API/Window/rejectionhandled_event) event is fired.\n\n`catch()` internally calls `then()` on the object upon which it was called, passing `undefined` and `onRejected` as arguments. The value of that call is directly returned. This is observable if you wrap the methods.\n\n```js\n// overriding original Promise.prototype.then/catch just to add some logs\n((Promise) => {\n  const originalThen = Promise.prototype.then;\n  const originalCatch = Promise.prototype.catch;\n\n  Promise.prototype.then = function (...args) {\n    console.log(\"Called .then on %o with arguments: %o\", this, args);\n    return originalThen.apply(this, args);\n  };\n  Promise.prototype.catch = function (...args) {\n    console.error(\"Called .catch on %o with arguments: %o\", this, args);\n    return originalCatch.apply(this, args);\n  };\n})(Promise);\n\n// calling catch on an already resolved promise\nPromise.resolve().catch(function XXX() {});\n\n// Logs:\n// Called .catch on Promise{} with arguments: Arguments{1} [0: function XXX()]\n// Called .then on Promise{} with arguments: Arguments{2} [0: undefined, 1: function XXX()]\n```\n\nThis means that passing `undefined` still causes the returned promise to be rejected, and you have to pass a function to prevent the final promise from being rejected.\n\nBecause `catch()` just calls `then()`, it supports subclassing.\n\n> **Note:** The examples below are throwing instances of [`Error`](../../../globals/Error/Error.mdx). As with synchronous [`throw`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/throw) statements, this is considered a good practice; otherwise, the part doing the catching would have to perform checks to see if the argument was a string or an error, and you might lose valuable information such as stack traces.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Promise/prototype/finally.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.prototype.finally()\n\nThe **`finally()`** method of a `Promise` object schedules a function to be called when the promise is settled (either fulfilled or rejected). It immediately returns an equivalent `Promise` object, allowing you to [chain](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining) calls to other promise methods.\n\nThis lets you avoid duplicating code in both the promise's [`Promise.prototype.then`](../../../globals/Promise/prototype/then.mdx) and [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx) handlers.\n\n## Syntax\n\n```js\nfinally(onFinally)\n\nfinally(() => {\n  // Code that will run after promise is settled (fulfilled or rejected)\n})\n```\n\n### Parameters\n\n- `onFinally`\n  - : A `Function` called when the `Promise` is settled. This handler receives no parameters.\n\n### Return value\n\nReturns an equivalent `Promise`. If the handler throws an error or returns a rejected promise, the promise returned by `finally()` will be rejected with that value instead. Otherwise, the return value of the handler does not affect the state of the original promise.\n\n## Description\n\nThe `finally()` method can be useful if you want to do some processing or cleanup once the promise is settled, regardless of its outcome.\n\nThe `finally()` method is very similar to calling [`then(onFinally, onFinally)`](../../../globals/Promise/prototype/then.mdx). However, there are a couple of differences:\n\n- When creating a function inline, you can pass it once, instead of being forced to either declare it twice, or create a variable for it.\n- The `onFinally` callback does not receive any argument. This use case is for precisely when you _do not care_ about the rejection reason or the fulfillment value, and so there's no need to provide it.\n- A `finally()` call is usually transparent and does not change the eventual state of the original promise. So for example:\n  - Unlike `Promise.resolve(2).then(() => 77, () => {})`, which returns a promise eventually fulfilled with the value `77`, `Promise.resolve(2).finally(() => 77)` returns a promise eventually fulfilled with the value `2`.\n  - Similarly, unlike `Promise.reject(3).then(() => {}, () => 88)`, which returns a promise eventually fulfilled with the value `88`, `Promise.reject(3).finally(() => 88)` returns a promise eventually rejected with the reason `3`.\n\n> **Note:** A `throw` (or returning a rejected promise) in the `finally` callback still rejects the returned promise. For example, both `Promise.reject(3).finally(() => { throw 99; })` and `Promise.reject(3).finally(() => Promise.reject(99))` reject the returned promise with the reason `99`.\n\nLike [`Promise.prototype.catch()`](../../../globals/Promise/prototype/catch.mdx), `finally()` internally calls the `then` method on the object upon which it was called. If `onFinally` is not a function, `then()` is called with `onFinally` as both arguments — which, for [`Promise.prototype.then()`](../../../globals/Promise/prototype/then.mdx), means that no useful handler is attached. Otherwise, `then()` is called with two internally created functions, which behave like the following:\n\n> **Warning:** This is only for demonstration purposes and is not a polyfill.\n\n```js\npromise.then(\n  (value) => Promise.resolve(onFinally()).then(() => value),\n  (reason) =>\n    Promise.resolve(onFinally()).then(() => {\n      throw reason;\n    }),\n);\n```\n\nBecause `finally()` calls `then()`, it supports subclassing. Moreover, notice the [`Promise.resolve()`](../../../globals/Promise/resolve.mdx) call above — in reality, `onFinally()`'s return value is resolved using the same algorithm as `Promise.resolve()`, but the actual constructor used to construct the resolved promise will be the subclass. `finally()` gets this constructor through [`promise.constructor[Symbol.species]`](../../../globals/Promise/@@species.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Promise/prototype/then.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.prototype.then()\n\nThe **`then()`** method of a `Promise` object takes up to two arguments: callback functions for the fulfilled and rejected cases of the `Promise`. It immediately returns an equivalent `Promise` object, allowing you to [chain](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining) calls to other promise methods.\n\n## Syntax\n\n```js\nthen(onFulfilled)\nthen(onFulfilled, onRejected)\n\nthen(\n  (value) => { /* fulfillment handler */ },\n  (reason) => { /* rejection handler */ },\n)\n```\n\n### Parameters\n\n- `onFulfilled` _**optional**_\n  - : A `Function` asynchronously called if the `Promise` is fulfilled. This function has one parameter, the _fulfillment value_. If it is not a function, it is internally replaced with an _identity_ function (`(x) => x`) which simply passes the fulfillment value forward.\n- `onRejected` _**optional**_\n  - : A `Function` asynchronously called if the `Promise` is rejected. This function has one parameter, the _rejection reason_. If it is not a function, it is internally replaced with a _thrower_ function (`(x) => { throw x; }`) which throws the rejection reason it received.\n\n### Return value\n\nReturns a new `Promise` immediately. This new promise is always pending when returned, regardless of the current promise's status.\n\nOne of the `onFulfilled` and `onRejected` handlers will be executed to handle the current promise's fulfillment or rejection. The call always happens asynchronously, even when the current promise is already settled. The behavior of the returned promise (call it `p`) depends on the handler's execution result, following a specific set of rules. If the handler function:\n\n- returns a value: `p` gets fulfilled with the returned value as its value.\n- doesn't return anything: `p` gets fulfilled with `undefined`.\n- throws an error: `p` gets rejected with the thrown error as its value.\n- returns an already fulfilled promise: `p` gets fulfilled with that promise's value as its value.\n- returns an already rejected promise: `p` gets rejected with that promise's value as its value.\n- returns another pending promise: the fulfillment/rejection of the promise returned by `then` will be subsequent to the resolution/rejection of the promise returned by the handler. Also, the resolved value of the promise returned by `then` will be the same as the resolved value of the promise returned by the handler.\n\n## Description\n\nThe `then()` method schedules callback functions for the eventual completion of a Promise — either fulfillment or rejection. It is the primitive method of promises: the [thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) protocol expects all promise-like objects to expose a `then()` method, and the [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx) and [`Promise.prototype.finally`](../../../globals/Promise/prototype/finally.mdx) methods both work by invoking the object's `then()` method.\n\nFor more information about the `onRejected` handler, see the [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx) reference.\n\n`then()` returns a new promise object. If you call the `then()` method twice on the same promise object (instead of chaining), then this promise object will have two pairs of settlement handlers. All handlers attached to the same promise object are always called in the order they were added. Moreover, the two promises returned by each call of `then()` start separate chains and do not wait for each other's settlement.\n\n[Thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) objects that arise along the `then()` chain are always [resolved](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise/Promise#the_resolver_function) — the `onFulfilled` handler never receives a thenable object, and any thenable returned by either handler are always resolved before being passed to the next handler. This is because when constructing the new promise, the `resolve` and `reject` functions passed by the `executor` are saved, and when the current promise settles, the respective function will be called with the fulfillment value or rejection reason. The resolving logic comes from the resolver function passed by the [`Promise()`](../../../globals/Promise/Promise.mdx) constructor.\n\n`then()` supports subclassing, which means it can be called on instances of subclasses of `Promise`, and the result will be a promise of the subclass type. You can customize the type of the return value through the [`[Symbol.species]`](../../../globals/Promise/@@species.mdx) property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Promise/race.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.race()\n\nThe **`Promise.race()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise settles with the eventual state of the first promise that settles.\n\n## Syntax\n\n```js\nPromise.race(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array`) of promises.\n\n### Return value\n\nA `Promise` that **asynchronously settles** with the eventual state of the first promise in the `iterable` to settle. In other words, it fulfills if the first promise to settle is fulfilled, and rejects if the first promise to settle is rejected. The returned promise remains pending forever if the `iterable` passed is empty. If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) settled.\n\n## Description\n\nThe `Promise.race()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. It's useful when you want the first async task to complete, but do not care about its eventual state (i.e. it can either succeed or fail).\n\nIf the iterable contains one or more non-promise values and/or an already settled promise, then `Promise.race()` will settle to the first of these values found in the iterable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Promise/reject.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.reject()\n\nThe **`Promise.reject()`** method returns a `Promise` object that is rejected with a given reason.\n\n## Syntax\n\n```js\nPromise.reject(reason)\n```\n\n### Parameters\n\n- `reason`\n  - : Reason why this `Promise` rejected.\n\n### Return value\n\nA `Promise` that is rejected with the given reason.\n\n## Description\n\nThe static `Promise.reject` function returns a `Promise` that is rejected. For debugging purposes and selective error catching, it is useful to make `reason` an `instanceof` [`Error`](../../globals/Error/Error.mdx).\n\n`Promise.reject()` is generic and supports subclassing, which means it can be called on subclasses of `Promise`, and the result will be a promise of the subclass type. To do so, the subclass's constructor must implement the same signature as the [`Promise()`](../../globals/Promise/Promise.mdx) constructor — accepting a single `executor` function that can be called with the `resolve` and `reject` callbacks as parameters. `Promise.reject()` is essentially a shorthand for `new Promise((resolve, reject) => reject(reason))`.\n\nUnlike [`Promise.resolve()`](../../globals/Promise/resolve.mdx), `Promise.reject()` always wraps `reason` in a new `Promise` object, even when `reason` is already a `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Promise/resolve.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.resolve()\n\nThe **`Promise.resolve()`** method \"resolves\" a given value to a `Promise`. If the value is a promise, that promise is returned; if the value is a [thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables), `Promise.resolve()` will call the `then()` method with two callbacks it prepared; otherwise the returned promise will be fulfilled with the value.\n\nThis function flattens nested layers of promise-like objects (e.g. a promise that fulfills to a promise that fulfills to something) into a single layer — a promise that fulfills to a non-thenable value.\n\n## Syntax\n\n```js\nPromise.resolve(value)\n```\n\n### Parameters\n\n- `value`\n  - : Argument to be resolved by this `Promise`. Can also be a `Promise` or a thenable to resolve.\n\n### Return value\n\nA `Promise` that is resolved with the given value, or the promise passed as value, if the value was a promise object. A resolved promise can be in any of the states — fulfilled, rejected, or pending. For example, resolving a rejected promise will still result in a rejected promise.\n\n## Description\n\n`Promise.resolve()` _resolves_ a promise, which is not the same as fulfilling or rejecting the promise. See [Promise description](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#description) for definitions of the terminology. In brief, `Promise.resolve()` returns a promise whose eventual state depends on another promise, thenable object, or other value.\n\n`Promise.resolve()` is generic and supports subclassing, which means it can be called on subclasses of `Promise`, and the result will be a promise of the subclass type. To do so, the subclass's constructor must implement the same signature as the [`Promise()`](../../globals/Promise/Promise.mdx) constructor — accepting a single `executor` function that can be called with the `resolve` and `reject` callbacks as parameters.\n\n`Promise.resolve()` special-cases native `Promise` instances. If `value` belongs to `Promise` or a subclass, and `value.constructor === Promise`, then `value` is directly returned by `Promise.resolve()`, without creating a new `Promise` instance. Otherwise, `Promise.resolve()` is essentially a shorthand for `new Promise((resolve) => resolve(value))`.\n\nThe bulk of the resolving logic is actually implemented by the [resolver function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise/Promise#the_resolver_function) passed by the `Promise()` constructor. In summary:\n\n- If a non-[thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) value is passed, the returned promise is already fulfilled with that value.\n- If a thenable is passed, the returned promise will adopt the state of that thenable by calling the `then` method and passing a pair of resolving functions as arguments. (But because native promises directly pass through `Promise.resolve()` without creating a wrapper, the `then` method is not called on native promises.) If the resolver function receives another thenable object, it will be resolved agin, so that the eventual fulfillment value of the promise will never be thenable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Proxy/Proxy.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Proxy()\n\nThe **`Proxy()`** constructor is used to create `Proxy` objects.\n\n## Syntax\n\n```js\nnew Proxy(target, handler)\n```\n\n> **Note:** `Proxy()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `target`\n  - : A target object to wrap with `Proxy`. It can be any sort of object,\n    including a native array, a function, or even another proxy.\n- `handler`\n  - : An object whose properties are functions that define the behavior of the proxy when\n    an operation is performed on it.\n\n## Description\n\nUse the `Proxy()` constructor to create a new `Proxy` object.\nThis constructor takes two mandatory arguments:\n\n- `target` is the object for which you want to create the proxy\n- `handler` is the object that defines the custom behavior of the proxy.\n\nAn empty handler will create a proxy that behaves, in almost all respects, exactly like\nthe target. By defining any of a set group of functions on the `handler`\nobject, you can customize specific aspects of the proxy's behavior. For example, by\ndefining `get()` you can provide a customized version of the target's\n[property accessor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Property_Accessors).\n\n### Handler functions\n\nThis section lists all the handler functions you can define. Handler functions are\nsometimes called _traps_, because they trap calls to the underlying target\nobject.\n\n- [`handler.apply()`](../../globals/Proxy/proxy/apply.mdx)\n  - : A trap for a function call.\n- [`handler.construct()`](../../globals/Proxy/proxy/construct.mdx)\n  - : A trap for the `new` operator.\n- [`handler.defineProperty()`](../../globals/Proxy/proxy/defineProperty.mdx)\n  - : A trap for [`Object.defineProperty`](../../globals/Object/defineProperty.mdx).\n- [`handler.deleteProperty()`](../../globals/Proxy/proxy/deleteProperty.mdx)\n  - : A trap for the `delete` operator.\n- [`handler.get()`](../../globals/Proxy/proxy/get.mdx)\n  - : A trap for getting property values.\n- [`handler.getOwnPropertyDescriptor()`)}](../../globals/Proxy/proxy/getOwnPropertyDescriptor.mdx)\n  - : A trap for [`Object.getOwnPropertyDescriptor`](../../globals/Object/getOwnPropertyDescriptor.mdx).\n- [`handler.getPrototypeOf()`](../../globals/Proxy/proxy/getPrototypeOf.mdx)\n  - : A trap for [`Object.getPrototypeOf()`](../../globals/Object/getPrototypeOf.mdx).\n- [`handler.has()`](../../globals/Proxy/proxy/has.mdx)\n  - : A trap for the `in` operator.\n- [`handler.isExtensible()`](../../globals/Proxy/proxy/isExtensible.mdx)\n  - : A trap for [`Object.isExtensible()`](../../globals/Object/isExtensible.mdx).\n- [`handler.ownKeys()`](../../globals/Proxy/proxy/ownKeys.mdx)\n  - : A trap for [`Object.getOwnPropertyNames()`](../../globals/Object/getOwnPropertyNames.mdx) and\n    [`Object.getOwnPropertySymbols()`](../../globals/Object/getOwnPropertySymbols.mdx).\n- [`handler.preventExtensions()`)}](../../globals/Proxy/proxy/preventExtensions.mdx)\n  - : A trap for [`Object.preventExtensions()`](../../globals/Object/preventExtensions.mdx).\n- [`handler.set()`](../../globals/Proxy/proxy/set.mdx)\n  - : A trap for setting property values.\n- [`handler.setPrototypeOf()`](../../globals/Proxy/proxy/setPrototypeOf.mdx)\n  - : A trap for [`Object.setPrototypeOf()`](../../globals/Object/setPrototypeOf.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Proxy/proxy/apply.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.apply()\n\nThe **`handler.apply()`** method is a trap for a function call.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  apply(target, thisArg, argumentsList) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `apply()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target callable object.\n- `thisArg`\n  - : The `this` argument for the call.\n- `argumentsList`\n  - : The list of arguments for the call.\n\n### Return value\n\nThe `apply()` method can return any value.\n\n## Description\n\nThe **`handler.apply()`** method is a trap for a function call.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- Function call: `proxy(...args)`\n- [`Function.prototype.apply()`](../../../globals/Function/prototype/apply.mdx) and [`Function.prototype.call()`](../../../globals/Function/prototype/call.mdx)\n- [`Reflect.apply()`](../../../globals/Reflect/apply.mdx)\n\nOr any other operation that invokes the `[[Call]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The `target` must be a callable itself. That is, it must be a function object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Proxy/proxy/construct.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.construct()\n\nThe **`handler.construct()`** method is a trap for the `new` operator. In order for the new operation to be valid on the resulting Proxy object, the target used to initialize the proxy must itself have a `[[Construct]]` internal method (i.e. `new target` must be valid).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  construct(target, argumentsList, newTarget) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `construct()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `argumentsList`\n  - : The list of arguments for the constructor.\n- `newTarget`\n  - : The constructor that was originally called, `p` above.\n\n### Return value\n\nThe `construct` method must return an object.\n\n## Description\n\nThe **`handler.construct()`** method is a trap for the `new` operator.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- The `new` operator: `new myFunction(...args)`\n- [`Reflect.construct()`](../../../globals/Reflect/construct.mdx)\n\nOr any other operation that invokes the `[[Construct]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The result must be an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Proxy/proxy/defineProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.defineProperty()\n\nThe **`handler.defineProperty()`** method is a trap for\n[`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  defineProperty(target, property, descriptor) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `defineProperty()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property whose description is to be\n    retrieved.\n- `descriptor`\n  - : The descriptor for the property being defined or modified.\n\n### Return value\n\nThe `defineProperty()` method must return a `Boolean` indicating\nwhether or not the property has been successfully defined.\n\n## Description\n\nThe **`handler.defineProperty()`** method is a trap for\n[`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx), [`Object.defineProperties()`](../../../globals/Object/defineProperties.mdx)\n- [`Reflect.defineProperty()`](../../../globals/Reflect/defineProperty.mdx)\n\nOr any other operation that invokes the `[[DefineOwnProperty]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- A property cannot be added, if the target object is not extensible.\n- A property cannot be added as or modified to be non-configurable, if it does not\n  exists as a non-configurable own property of the target object.\n- A property may not be non-configurable, if a corresponding configurable property of\n  the target object exists.\n- If a property has a corresponding target object property then\n  `Object.defineProperty(target, prop, descriptor)`\n  will not throw an exception.\n- In strict mode, a `false` return value from the\n  `defineProperty()` handler will throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Proxy/proxy/deleteProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.deleteProperty()\n\nThe **`handler.deleteProperty()`** method is a trap for the `delete` operator.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  deleteProperty(target, property) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `deleteProperty()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property to delete.\n\n### Return value\n\nThe `deleteProperty()` method must return a `Boolean` indicating\nwhether or not the property has been successfully deleted.\n\n## Description\n\nThe **`handler.deleteProperty()`** method is a trap for the `delete` operator.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- The [`delete`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) operator: `delete proxy[foo]` and\n  `delete proxy.foo`\n- [`Reflect.deleteProperty()`](../../../globals/Reflect/deleteProperty.mdx)\n\nOr any other operation that invokes the `[[Delete]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- A property cannot be deleted, if it exists as a non-configurable own property of the\n  target object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Proxy/proxy/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.get()\n\nThe **`handler.get()`** method is a trap for getting a property\nvalue.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  get(target, property, receiver) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `get()` method. `this`\nis bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property to get.\n- `receiver`\n  - : Either the proxy or an object that inherits from the proxy.\n\n### Return value\n\nThe `get()` method can return any value.\n\n## Description\n\nThe **`handler.get()`** method is a trap for getting a property\nvalue.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- Property access: `proxy[foo]` and `proxy.bar`\n- [`Reflect.get()`](../../../globals/Reflect/get.mdx)\n\nOr any other operation that invokes the `[[Get]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The value reported for a property must be the same as the value of the corresponding\n  target object property if the target object property is a non-writable,\n  non-configurable own data property.\n- The value reported for a property must be undefined if the corresponding target\n  object property is a non-configurable own accessor property that has\n  `undefined` as its `[[Get]]` attribute.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Proxy/proxy/getOwnPropertyDescriptor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.getOwnPropertyDescriptor()\n\nThe **`handler.getOwnPropertyDescriptor()`** method is a trap for [`Object.getOwnPropertyDescriptor()`](../../../globals/Object/getOwnPropertyDescriptor.mdx).\n\n\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  getOwnPropertyDescriptor(target, prop) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `getOwnPropertyDescriptor()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `prop`\n  - : The name of the property whose description should be retrieved.\n\n### Return value\n\nThe `getOwnPropertyDescriptor()` method must return an object or `undefined`.\n\n## Description\n\nThe **`handler.getOwnPropertyDescriptor()`** method is a trap for [`Object.getOwnPropertyDescriptor()`](../../../globals/Object/getOwnPropertyDescriptor.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.getOwnPropertyDescriptor()`](../../../globals/Object/getOwnPropertyDescriptor.mdx)\n- [`Reflect.getOwnPropertyDescriptor()`](../../../globals/Reflect/getOwnPropertyDescriptor.mdx)\n\nOr any other operation that invokes the `[[GetOwnProperty]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `getOwnPropertyDescriptor()` must return an object or `undefined`.\n- A property cannot be reported as non-existent, if it exists as a non-configurable own property of the target object.\n- A property cannot be reported as non-existent, if it exists as an own property of the target object and the target object is not extensible.\n- A property cannot be reported as existent, if it does not exists as an own property of the target object and the target object is not extensible.\n- A property cannot be reported as non-configurable, if it does not exists as an own property of the target object or if it exists as a configurable own property of the target object.\n- The result of `Object.getOwnPropertyDescriptor(target)` can be applied to the target object using `Object.defineProperty()` and will not throw an exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Proxy/proxy/getPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.getPrototypeOf()\n\nThe **`handler.getPrototypeOf()`** method is a trap for the\n`[[GetPrototypeOf]]` internal method.\n\n## Syntax\n\n```js\nnew Proxy(obj, {\n  getPrototypeOf(target) {\n    // …\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `getPrototypeOf()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `getPrototypeOf()` method must return an object or `null`.\n\n## Description\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.getPrototypeOf()`](../../../globals/Object/getPrototypeOf.mdx)\n- [`Reflect.getPrototypeOf()`](../../../globals/Reflect/getPrototypeOf.mdx)\n- [`Object.prototype.isPrototypeOf()`](../../../globals/Object/prototype/isPrototypeOf.mdx)\n- `instanceof`\n\nOr any other operation that invokes the `[[GetPrototypeOf]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `getPrototypeOf()` method must return an object or `null`.\n- If `target` is not extensible,\n  `Object.getPrototypeOf(proxy)` method must return the same\n  value as `Object.getPrototypeOf(target)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Proxy/proxy/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.has()\n\nThe **`handler.has()`** method is a trap for the `in` operator.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  has(target, prop) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to `has()` method. `this` is\nbound to the handler.\n\n- `target`\n  - : The target object.\n- `prop`\n  - : The name or `Symbol` of the property to check for existence.\n\n### Return value\n\nThe `has()` method must return a boolean value.\n\n## Description\n\nThe **`handler.has()`** method is a trap for the `in` operator.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- The [`in`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/in) operator: `foo in proxy`\n- [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) check: `with(proxy) { (foo); }`\n- [`Reflect.has()`](../../../globals/Reflect/has.mdx)\n\nOr any other operation that invokes the `[[HasProperty]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- A property cannot be reported as non-existent, if it exists as a non-configurable\n  own property of the target object.\n- A property cannot be reported as non-existent, if it exists as an own property of\n  the target object and the target object is not extensible.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Proxy/proxy/isExtensible.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.isExtensible()\n\nThe **`handler.isExtensible()`** method is a trap for\n[`Object.isExtensible()`](../../../globals/Object/isExtensible.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  isExtensible(target) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `isExtensible()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `isExtensible()` method must return a boolean value.\n\n## Description\n\nThe **`handler.isExtensible()`** method is a trap for\n[`Object.isExtensible()`](../../../globals/Object/isExtensible.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.isExtensible()`](../../../globals/Object/isExtensible.mdx)\n- [`Reflect.isExtensible()`](../../../globals/Reflect/isExtensible.mdx)\n\nOr any other operation that invokes the `[[IsExtensible]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `Object.isExtensible(proxy)` must return the same value as\n  `Object.isExtensible(target)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Proxy/proxy/ownKeys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.ownKeys()\n\nThe **`handler.ownKeys()`** method is a trap for\n[`Reflect.ownKeys()`](../../../globals/Reflect/ownKeys.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  ownKeys(target) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `ownKeys()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `ownKeys()` method must return an enumerable object.\n\n## Description\n\nThe **`handler.ownKeys()`** method is a trap for\n[`Reflect.ownKeys()`](../../../globals/Reflect/ownKeys.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.getOwnPropertyNames()`](../../../globals/Object/getOwnPropertyNames.mdx)\n- [`Object.getOwnPropertySymbols()`](../../../globals/Object/getOwnPropertySymbols.mdx)\n- [`Object.keys()`](../../../globals/Object/keys.mdx)\n- [`Reflect.ownKeys()`](../../../globals/Reflect/ownKeys.mdx)\n\nOr any other operation that invokes the `[[OwnPropertyKeys]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The result of `ownKeys()` must be an array.\n- The type of each array element is either a `String` or a `Symbol`.\n- The result List must contain the keys of all non-configurable own properties of the\n  target object.\n- If the target object is not extensible, then the result List must contain all the\n  keys of the own properties of the target object and no other values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Proxy/proxy/preventExtensions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.preventExtensions()\n\nThe **`handler.preventExtensions()`** method is a trap for [`Object.preventExtensions()`](../../../globals/Object/preventExtensions.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  preventExtensions(target) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `preventExtensions()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `preventExtensions()` method must return a boolean value.\n\n## Description\n\nThe **`handler.preventExtensions()`** method is a trap for [`Object.preventExtensions()`](../../../globals/Object/preventExtensions.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.preventExtensions()`](../../../globals/Object/preventExtensions.mdx)\n- [`Reflect.preventExtensions()`](../../../globals/Reflect/preventExtensions.mdx)\n- [`Object.seal()`](../../../globals/Object/seal.mdx)\n- [`Object.freeze()`](../../../globals/Object/freeze.mdx)\n\nOr any other operation that invokes the `[[PreventExtensions]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `Object.preventExtensions(proxy)` only returns `true` if `Object.isExtensible(proxy)` is `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Proxy/proxy/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.set()\n\nThe **`handler.set()`** method is a trap for setting a property\nvalue.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  set(target, property, value, receiver) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `set()` method. `this`\nis bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property to set.\n- `value`\n  - : The new value of the property to set.\n- `receiver`\n\n  - : The object to which the assignment was originally directed. This is usually the\n    proxy itself. But a `set()` handler can also be called indirectly, via\n    the prototype chain or various other ways.\n\n    For example, suppose a script does\n    `obj.name = \"jen\"`, and `obj` is not a\n    proxy, and has no own property `.name`, but it has a proxy on its\n    prototype chain. That proxy's `set()` handler will be called, and\n    `obj` will be passed as the receiver.\n\n### Return value\n\nThe `set()` method should return a boolean value.\n\n- Return `true` to indicate that assignment succeeded.\n- If the `set()` method returns `false`, and the assignment\n  happened in strict-mode code, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) will be thrown.\n\n## Description\n\nThe **`handler.set()`** method is a trap for setting property\nvalue.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- Property assignment: `proxy[foo] = bar` and `proxy.foo = bar`\n- [`Reflect.set()`](../../../globals/Reflect/set.mdx)\n\nOr any other operation that invokes the `[[Set]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- Cannot change the value of a property to be different from the value of the\n  corresponding target object property if the corresponding target object property is a\n  non-writable, non-configurable data property.\n- Cannot set the value of a property if the corresponding target object property is a\n  non-configurable accessor property that has `undefined` as its\n  `[[Set]]` attribute.\n- In strict mode, a `false` return value from the `set()`\n  handler will throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Proxy/proxy/setPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.setPrototypeOf()\n\nThe **`handler.setPrototypeOf()`** method is a trap for\n[`Object.setPrototypeOf()`](../../../globals/Object/setPrototypeOf.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  setPrototypeOf(target, prototype) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `setPrototypeOf()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `prototype`\n  - : The object's new prototype or `null`.\n\n### Return value\n\nThe `setPrototypeOf()` method returns `true` if the\n`[[Prototype]]` was successfully changed, otherwise `false`.\n\n## Description\n\nThe **`handler.setPrototypeOf()`** method is a trap for\n[`Object.setPrototypeOf()`](../../../globals/Object/setPrototypeOf.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.setPrototypeOf()`](../../../globals/Object/setPrototypeOf.mdx)\n- [`Reflect.setPrototypeOf()`](../../../globals/Reflect/setPrototypeOf.mdx)\n\nOr any other operation that invokes the `[[SetPrototypeOf]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- If `target` is not extensible, the `prototype`\n  parameter must be the same value as\n  `Object.getPrototypeOf(target)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Proxy/revocable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Proxy.revocable()\n\nThe **`Proxy.revocable()`** static method creates a revocable `Proxy` object.\n\n## Syntax\n\n```js\nProxy.revocable(target, handler)\n```\n\n### Parameters\n\n- `target`\n  - : A target object to wrap with `Proxy`. It can be any sort of object, including a native array, a function, or even another proxy.\n- `handler`\n  - : An object whose properties are functions defining the behavior of `proxy` when an operation is performed on it.\n\n### Return value\n\nA plain object with the following two properties:\n\n- `proxy`\n  - : A Proxy object exactly the same as one created with a [`new Proxy(target, handler)`](../../globals/Proxy/Proxy.mdx) call.\n- `revoke`\n  - : A function with no parameters to revoke (switch off) the `proxy`.\n\n## Description\n\nThe `Proxy.revocable()` factory function is the same as the [`Proxy()`](../../globals/Proxy/Proxy.mdx) constructor, except that in addition to creating a proxy object, it also creates a `revoke` function that can be called to disable the proxy. The proxy object and the `revoke` function are wrapped in a plain object.\n\nThe `revoke` function does not take any parameters, nor does it rely on the `this` value. The created `proxy` object is attached to the `revoke` function as a [private property](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/Private_class_fields) that the `revoke` function accesses on itself when called (the existence of the private property is not observable from the outside, but it has implications on how garbage collection happens). The `proxy` object is _not_ captured within the [closure](https://developer.mozilla.org/docs/Web/JavaScript/Closures) of the `revoke` function (which will make garbage collection of `proxy` impossible if `revoke` is still alive).\n\nAfter the `revoke()` function gets called, the proxy becomes unusable: any trap to a handler throws a [`TypeError`](../../globals/TypeError/TypeError.mdx). Once a proxy is revoked, it remains revoked, and calling `revoke()` again has no effect — in fact, the call to `revoke()` detaches the `proxy` object from the `revoke` function, so the `revoke` function will not be able to access the proxy again at all. If the proxy is not referenced elsewhere, it will then be eligible for garbage collection. The `revoke` function also detaches `target` and `handler` from the `proxy`, so if `target` is not referenced elsewhere, it will also be eligible for garbage collection, even when its proxy is still alive, since there's no longer a way to meaningfully interact with the target object.\n\nLetting users interact with an object through a revocable proxy allows you to [control the lifetime](https://developer.mozilla.org/docs/Web/JavaScript/Memory_Management) of the object exposed to the user — you can make the object garbage-collectable even when the user is still holding a reference to its proxy.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/RangeError/RangeError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RangeError\n\nThe **`RangeError()`** constructor creates an error\nwhen a value is not in the set or range of allowed values.\n\n## Syntax\n\n```js\nnew RangeError()\nnew RangeError(message)\nnew RangeError(message, options)\nnew RangeError(message, fileName)\nnew RangeError(message, fileName, lineNumber)\n\nRangeError()\nRangeError(message)\nRangeError(message, options)\nRangeError(message, fileName)\nRangeError(message, fileName, lineNumber)\n```\n\n> **Note:** `RangeError()` can be called with or without `new`. Both create a new `RangeError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/ReadableByteStreamController/prototype/byobRequest.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# byobRequest\n\nThe **`byobRequest`** read-only property of the `ReadableByteStreamController` interface returns the current BYOB request, or `null` if there are no pending requests.\n\nAn underlying byte source should check this property, and use it to write data to the stream if it exists (rather than using `ReadableByteStreamController.enqueue()`).\nThis will result in an efficient zero-byte transfer of the data to the consumer.\n\n## Value\n\nA `ReadableStreamBYOBRequest` object instance, or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/ReadableByteStreamController/prototype/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# close()\n\nThe **`close()`** method of the `ReadableByteStreamController` interface closes the associated stream.\n\nThis might be called by the underlying source when its data source has been exhausted/completed.\n\n> **Note:** Readers will still be able to read any previously-enqueued chunks from the stream, but once those are read, the stream will become closed.\n> However if there is an outstanding and partially written `byobRequest` when `close()` is called, the stream will be errored.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableByteStreamController`, it is already closed, or the stream is not readable for some other reason.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/ReadableByteStreamController/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# desiredSize\n\nThe **`desiredSize`** read-only property of the`ReadableByteStreamController` interface returns the number of bytes required to fill the stream's internal queue to its \"desired size\".\n\nThe value is used by the stream to indicate a preferred flow rate to the underlying source.\nSources that support throttling or pausing their inflow of data (not all do!) should control the inflow such that `desiredSize` of the stream buffer is kept positive and as close to zero as possible.\n\nThe `desiredSize` is used to apply backpressure from downstream consumers.\n\n## Value\n\nAn integer. Note that this can be negative if the queue is over-full.\n\nThe value will be `null` if the stream has errored and `0` if it is closed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/ReadableByteStreamController/prototype/enqueue.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# enqueue()\n\nThe **`enqueue()`** method of the `ReadableByteStreamController` interface enqueues a given chunk on the associated readable byte stream (the chunk is copied into the stream's internal queues).\n\nThis should only be used to transfer data to the queue when `byobRequest` is `null`.\n\n## Syntax\n\n```js\nenqueue(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : The chunk to enqueue.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableByteStreamController`, or the stream cannot be read for some other reason, or the chunk is not an object, or the chunk's internal array buffer is non-existent, zero-length, or detached.\n    It is also thrown if the stream has been closed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/ReadableByteStreamController/prototype/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# error()\n\nThe **`error()`** method of the `ReadableByteStreamController` interface causes any future interactions with the associated stream to error with the specified reason.\n\nThis is commonly called by an underlying source to surface an error from the interface where it gets its data (such as a file-read or socket error).\nIt can also be called from elsewhere to trigger a stream error, for example if another part of the system that the stream relies on fails.\n\n## Syntax\n\n```js\nerror(errorObject)\n```\n\n### Parameters\n\n- `errorObject`\n  - : Any object that you want future interactions to fail with.\n\n### Return value\n\n`undefined`\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableByteStreamController`, or the stream is not readable for some other reason.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/ReadableStream/ReadableStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream()\n\nThe **`ReadableStream()`** constructor creates and returns a readable stream object from the given handlers.\n\n## Syntax\n\n```js\nnew ReadableStream()\nnew ReadableStream(underlyingSource)\nnew ReadableStream(underlyingSource, queuingStrategy)\n```\n\n### Parameters\n\n- `underlyingSource` _**optional**_\n\n  - : An object containing methods and properties that define how the constructed stream instance will behave.\n    `underlyingSource` can contain the following:\n\n    - `start` (controller) _**optional**_\n      - : This is a method, called immediately when the object is constructed. The\n        contents of this method are defined by the developer, and should aim to get access\n        to the stream source, and do anything else required to set up the stream\n        functionality. If this process is to be done asynchronously, it can return a\n        promise to signal success or failure. The `controller` parameter passed\n        to this method is a `ReadableStreamDefaultController` or a\n        `ReadableByteStreamController`, depending on the value of the\n        `type` property. This can be used by the developer to control the\n        stream during set up.\n    - `pull` (controller) _**optional**_\n      - : This method, also defined by the developer, will be called repeatedly when the\n        stream's internal queue of chunks is not full, up until it reaches its high water\n        mark. If `pull()` returns a promise, then it won't be called again\n        until that promise fulfills; if the promise rejects, the stream will become\n        errored. The `controller` parameter passed to this method is a\n        `ReadableStreamDefaultController` or a\n        `ReadableByteStreamController`, depending on the value of the\n        `type` property. This can be used by the developer to control the\n        stream as more chunks are fetched.\n    - `cancel` (reason) _**optional**_\n      - : This method, also defined by the developer, will be called if the app signals\n        that the stream is to be cancelled (e.g. if `ReadableStream.cancel()`\n        is called). The contents should do whatever is necessary to release access to the\n        stream source. If this process is asynchronous, it can return a promise to signal\n        success or failure. The `reason` parameter contains a\n        string describing why the stream was cancelled.\n    - `type` _**optional**_\n      - : This property controls what type of readable stream is being dealt with. If it\n        is included with a value set to `\"bytes\"`, the passed controller object\n        will be a `ReadableByteStreamController` capable of handling a BYOB\n        (bring your own buffer)/byte stream. If it is not included, the passed controller\n        will be a `ReadableStreamDefaultController`.\n    - `autoAllocateChunkSize` _**optional**_\n\n      - : For byte streams, the developer can set the `autoAllocateChunkSize` with a positive integer value to turn on the stream's auto-allocation feature.\n        With this is set, the stream implementation will automatically allocate a view buffer of the specified size in `ReadableByteStreamController.byobRequest` when required.\n\n        This must be set to enable zero-copy transfers to be used with a default `ReadableStreamDefaultReader`.\n        If not set, a default reader will still stream data, but `ReadableByteStreamController.byobRequest` will always be `null` and transfers to the consumer must be via the stream's internal queues.\n\n- `queuingStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer — this defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk` — this indicates the size to\n        use for each chunk, in bytes.\n\n    > **Note:** You could define your own custom\n    > `queuingStrategy`, or use an instance of\n    > `ByteLengthQueuingStrategy` or `CountQueuingStrategy`\n    > for this object value. If no `queuingStrategy` is supplied, the default\n    > used is the same as a `CountQueuingStrategy` with a high water mark of\n    > 1\\.\n\n### Return value\n\nAn instance of the `ReadableStream` object.\n\n### Exceptions\n\n- `RangeError`\n  - Thrown if the supplied type value is neither `\"bytes\"` nor `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/ReadableStream/prototype/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.cancel()\n\nThe **`cancel()`** method of the\n`ReadableStream` interface returns a `Promise` that\nresolves when the stream is canceled.\n\nCancel is used when you've completely finished with the stream and don't need any more\ndata from it, even if there are chunks enqueued waiting to be read. That data is lost\nafter cancel is called, and the stream is not readable any more. To read those chunks\nstill and not completely get rid of the stream, you'd use\n`ReadableStreamDefaultController.close()`.\n\n## Syntax\n\n```js\ncancel()\ncancel(reason)\n```\n\n### Parameters\n\n- `reason` _**optional**_\n  - : A human-readable reason for the cancellation. The underlying source may or may not use it.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason` parameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to cancel is not a `ReadableStream`, or it is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/ReadableStream/prototype/getReader.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.getReader()\n\nThe **`getReader()`** method of the `ReadableStream` interface creates a reader and locks the stream to it.\nWhile the stream is locked, no other reader can be acquired until this one is released.\n\n## Syntax\n\n```js\ngetReader()\ngetReader(options)\n```\n\n### Parameters\n\n- `options` _**optional**_\n\n  - : An object containing the following properties:\n\n    - `mode` _**optional**_\n\n      - : A property that specifies the type of reader to create.\n        Values can be:\n\n        - `\"byob\"`, which results in a `ReadableStreamBYOBReader` being created that can read readable byte streams (streams that support zero-copy transfer from an underlying byte source to the reader when internal stream buffers are empty).\n        - `undefined` (or not specified at all — this is the default), which results in a `ReadableStreamDefaultReader` being created that can read individual chunks from a stream.\n\n### Return value\n\nA `ReadableStreamDefaultReader` or `ReadableStreamBYOBReader` object instance, depending on the `mode` value.\n\n### Exceptions\n\n- `RangeError`\n  - : Thrown if the provided mode value is not `\"byob\"` or `undefined`.\n- `TypeError`\n  - : Thrown if the stream you are trying to create a reader for is already locked, or not a `ReadableStream`."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/ReadableStream/prototype/locked.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.locked\n\nThe **`locked`** read-only property of the `ReadableStream` interface returns whether or not the readable stream is locked to a reader.\n\nA readable stream can have at most one active reader at a time, and is locked to that reader until it is released.\nA reader might be obtained using `ReadableStream.getReader()` and released using the reader's `releaseLock()` method.\n\n## Value\n\nA `boolean` value indicating whether or not the readable stream is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/ReadableStream/prototype/pipeThrough.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.pipeThrough()\n\nThe **`pipeThrough()`** method of the `ReadableStream` interface provides a chainable way of piping the current stream through a transform stream or any other writable/readable pair.\n\nPiping a stream will generally lock it for the duration of the pipe, preventing other readers from locking it.\n\n## Syntax\n\n```js\npipeThrough(transformStream)\npipeThrough(transformStream, options)\n```\n\n### Parameters\n\n- `transformStream`\n\n  - : A `TransformStream` (or an object with the structure\n    `{writable, readable}`) consisting of a readable stream and a writable\n    stream working together to transform some data from one form to another. Data written\n    to the `writable` stream can be read in some transformed state by the\n    `readable` stream. For example, a `TextDecoder`, has bytes\n    written to it and strings read from it, while a video decoder has encoded bytes\n    written to it and uncompressed video frames read from it.\n\n- `options` _**optional**_\n\n  - : The options that should be used when piping to the `writable` stream.\n    Available options are:\n\n    - `preventClose`\n\n      - : If this is set to `true`, the source `ReadableStream` closing will no longer cause the destination `WritableStream` to be closed.\n        The method will return a fulfilled promise once this process completes, unless an error is encountered while closing the destination, in which case it will be rejected with that error.\n\n    - `preventAbort`\n\n      - : If this is set to `true`, errors in the source `ReadableStream` will no longer abort the destination `WritableStream`.\n        The method will return a promise rejected with the source's error, or with any error that occurs during aborting the destination.\n\n    - `preventCancel`\n\n      - : If this is set to `true`, errors in the destination `WritableStream` will no longer cancel the source `ReadableStream`.\n        In this case the method will return a promise rejected with the source's error, or with any error that occurs during canceling the source.\n        In addition, if the destination writable stream starts out closed or closing, the source readable stream will no longer be canceled.\n        In this case the method will return a promise rejected with an error indicating piping to a closed stream failed, or with any error that occurs during canceling the source.\n\n### Return value\n\nThe `readable` side of the `transformStream`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the `writable` and/or `readable` property of `transformStream` are undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/ReadableStream/prototype/pipeTo.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.pipeTo()\n\nThe **`pipeTo()`** method of the `ReadableStream` interface pipes the current `ReadableStream` to a given `WritableStream` and returns a `Promise` that fulfills when the piping process completes successfully, or rejects if any errors were encountered.\n\nPiping a stream will generally `lock` it for the duration of the pipe, preventing other readers from locking it.\n\n## Syntax\n\n```js\npipeTo(destination)\npipeTo(destination, options)\n```\n\n### Parameters\n\n- `destination`\n\n  - : A `WritableStream` that acts as the final destination for the `ReadableStream`.\n\n- `options` _**optional**_\n\n  - : The options that should be used when piping to the `writable` stream.\n    Available options are:\n\n    - `preventClose`\n      - : If this is set to `true`, the source `ReadableStream` closing will no longer cause the destination `WritableStream` to be closed.\n        The method will return a fulfilled promise once this process completes, unless an error is encountered while closing the destination in which case it will be rejected with that error.\n    - `preventAbort`\n      - : If this is set to `true`, errors in the source `ReadableStream` will no longer abort the destination `WritableStream`.\n        The method will return a promise rejected with the source's error, or with any error that occurs during aborting the destination.\n    - `preventCancel`\n      - : If this is set to `true`, errors in the destination `WritableStream` will no longer cancel the source `ReadableStream`.\n        In this case the method will return a promise rejected with the source's error, or with any error that occurs during canceling the source.\n        In addition, if the destination writable stream starts out closed or closing, the source readable stream will no longer be canceled.\n        In this case the method will return a promise rejected with an error indicating piping to a closed stream failed, or with any error that occurs during canceling the source.\n\n### Return value\n\nA `Promise` that resolves when the piping process has completed.\n\n### Exceptions\n\n- `TypeError`\n  - : The `writableStream` and/or `readableStream` objects are not a writable stream/readable stream, or one or both of the streams are locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/ReadableStream/prototype/tee.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.tee()\n\nThe **`tee()`** method of the\n`ReadableStream` interface [tees](https://streams.spec.whatwg.org/#tee-a-readable-stream) the current readable stream, returning a\ntwo-element array containing the two resulting branches as\nnew `ReadableStream` instances.\n\nThis is useful for allowing two readers to read a stream sequentially or simultaneously,\nperhaps at different speeds.\nFor example, you might do this in a ServiceWorker if you want to fetch\na response from the server and stream it to the browser, but also stream it to the\nServiceWorker cache. Since a response body cannot be consumed more than once, you'd need\ntwo copies to do this.\n\nA teed stream will partially signal backpressure at the rate of the _faster_ consumer\nof the two `ReadableStream` branches,\nand unread data is enqueued internally on the slower consumed `ReadableStream`\nwithout any limit or backpressure.\nThat is, when _both_ branches have an unread element in their internal queue,\nthen the original `ReadableStream`'s controller's internal queue will start to fill up,\nand once its `ReadableStreamDefaultController.desiredSize\", \"desiredSize` ≤ 0\nor byte stream controller `ReadableByteStreamController.desiredSize\", \"desiredSize` ≤ 0,\nthen the controller will stop calling `pull(controller)` on the\nunderlying source passed to `ReadableStream.ReadableStream\", \"new ReadableStream()`.\nIf only one branch is consumed, then the entire body will be enqueued in memory.\nTherefore, you should not use the built-in `tee()` to read very large streams\nin parallel at different speeds.\nInstead, search for an implementation that fully backpressures\nto the speed of the _slower_ consumed branch.\n\nTo cancel the stream you then need to cancel both resulting branches. Teeing a stream\nwill generally lock it for the duration, preventing other readers from locking it.\n\n## Syntax\n\n```js\ntee()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nAn `Array` containing two `ReadableStream` instances.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source stream is not a `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/ReadableStreamBYOBReader/ReadableStreamBYOBReader.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# ReadableStreamBYOBReader()\n\nThe **`ReadableStreamBYOBReader()`** constructor creates and returns a `ReadableStreamBYOBReader` object instance.\n\n> **Note:** You generally wouldn't use this constructor manually;\n> instead, you'd use the `ReadableStream.getReader()` method with the argument `\"byob\"`.\n\n## Syntax\n\n```js\nnew ReadableStreamBYOBReader(stream)\n```\n\n### Parameters\n\n- `stream`\n  - : The `ReadableStream` to be read.\n\n### Return value\n\nAn instance of the `ReadableStreamBYOBReader` object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the supplied `stream` parameter is not a `ReadableStream`, or it is already locked for reading by another reader, or its stream controller is not a `ReadableByteStreamController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/ReadableStreamBYOBReader/prototype/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# cancel()\n\nThe **`cancel()`** method of the `ReadableStreamBYOBReader` interface returns a `Promise` that resolves when the stream is canceled.\nCalling this method signals a loss of interest in the stream by a consumer.\n\n> **Note:** If the reader is active, the `cancel()` method behaves the same as that for the associated stream (`ReadableStream.cancel()`).\n\n## Syntax\n\n```js\ncancel()\ncancel(reason)\n```\n\n### Parameters\n\n- `reason` __optional__\n  - : A human-readable reason for the cancellation. The underlying source may or may not use it.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason` parameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamBYOBReader`, or the stream has no owner.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/ReadableStreamBYOBReader/prototype/closed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# closed\n\nThe **`closed`** read-only property of the `ReadableStreamBYOBReader` interface returns a `Promise` that fulfills when the stream closes, or rejects if the stream throws an error or the reader's lock is released.\n\nThis property enables you to write code that responds to an end to the streaming process.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/ReadableStreamBYOBReader/prototype/read.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# read()\n\nThe **`read()`** method of the `ReadableStreamBYOBReader` interface is used to read data into a view on a user-supplied buffer from an associated readable byte stream.\nA request for data will be satisfied from the stream's internal queues if there is any data present.\nIf the stream queues are empty, the request may be supplied as a zero-copy transfer from the underlying byte source.\n\nThe method takes as an argument a view on a buffer that supplied data is to be read into, and returns a `Promise`.\nThe promise fulfills with an object that has properties `value` and `done` when data comes available, or if the stream is cancelled.\nIf the stream is errored, the promise will be rejected with the relevant error object.\n\nIf a chunk of data is supplied, the `value` property will contain a new view.\nThis will be a view over the same buffer/backing memory (and of the same type) as the original `view` passed to the `read()` method, now populated with the new chunk of data.\nNote that once the promise fulfills, the original `view` passed to the method will be detached and no longer usable.\nThe promise will fulfill with a `value: undefined` if the stream has been cancelled.\nIn this case the backing memory region of `view` is discarded and not returned to the caller (all previously read data in the view's buffer is lost).\n\nThe `done` property indicates whether or not more data is expected.\nThe value is set `true` if the stream is closed or cancelled, and `false` otherwise.\n\n## Syntax\n\n```js\nread(view)\n```\n\n### Parameters\n\n- `view`\n  - : The view that data is to be read into.\n\n### Return value\n\nA `Promise`, which fulfills/rejects with a result depending on the state of the stream.\n\nThe following are possible:\n\n- If a chunk is available and the stream is still active, the promise fulfills with an object of the form:\n\n  ```\n  { value: theChunk, done: false }\n  ```\n\n  `theChunk` is a view containing the new data.\n  This is a view of the same type and over the same backing memory as the `view` passed to the `read()` method.\n  The original `view` will be detached and no longer usable.\n\n- If the stream is closed, the promise fulfills with an object of the form (where `theChunk` has the same properties as above):\n\n  ```\n  { value: theChunk, done: true }\n  ```\n\n- If the stream is cancelled, the promise fulfills with an object of the form:\n\n  ```\n  { value: undefined, done: true }\n  ```\n\n  In this case the backing memory is discarded.\n\n- If the stream throws an error, the promise rejects with the relevant error.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamBYOBReader`, the stream has no owner, the view is not an object or has become detached, the view's length is 0, or `ReadableStreamBYOBReader.releaseLock()` is called (when there's is a pending read request).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/ReadableStreamBYOBReader/prototype/releaseLock.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# releaseLock()\n\nThe **`releaseLock()`** method of the `ReadableStreamBYOBReader` interface releases the reader's lock on the stream.\nAfter the lock is released, the reader is no longer active.\n\nThe reader will appear errored if the associated stream is errored when the lock is released; otherwise, the reader will appear closed.\n\nIf the reader's lock is released while it still has pending read requests then the promises returned by the reader's `ReadableStreamBYOBReader.read()` method are immediately rejected with a `TypeError`.\nUnread chunks remain in the stream's internal queue and can be read later by acquiring a new reader.\n\n## Syntax\n\n```js\nreleaseLock()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamBYOBReader`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/ReadableStreamBYOBRequest/prototype/respond.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# respond()\n\nThe **`respond()`** method of the `ReadableStreamBYOBRequest` interface is used to signal to the associated readable byte stream that the specified number of bytes were written into the `ReadableStreamBYOBRequest.view`.\n\nAfter this method is called, the `view` will be transferred and no longer modifiable.\n\n## Syntax\n\n```js\nrespond(bytesWritten)\n```\n\n### Parameters\n\n- `bytesWritten`\n  - : The number of bytes written into `ReadableStreamBYOBRequest.view`.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : The request does not have an associated `ReadableByteStreamController` or the view buffer is not detached/cannot be transferred into.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/ReadableStreamBYOBRequest/prototype/respondWithNewView.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# respondWithNewView()\n\nThe **`respondWithNewView()`** method of the `ReadableStreamBYOBRequest` interface specifies a new view that the consumer of the associated readable byte stream should write to instead of `ReadableStreamBYOBRequest.view`.\n\nThe new view must be a `TypedArray` or a `DataView` that provides a view onto the same backing memory region as `ReadableStreamBYOBRequest.view`.\nAfter this method is called, the view that was passed into the method will be transferred and no longer modifiable.\n\nThe method is intended for use cases where an underlying byte source needs to transfer a `byobRequest.view` internally before finishing its response.\nFor example, the source may transfer the BYOB view to a separate worker thread, and wait for the worker to transfer it back once it has been filled.\n\n## Syntax\n\n```js\nrespondWithNewView(view)\n```\n\n### Parameters\n\n- `view`\n\n  - : A `TypedArray` or a `DataView` that the consumer of the associated readable byte stream should write to instead of `ReadableStreamBYOBRequest.view`.\n\n    This must be a view onto the same backing memory region as `ReadableStreamBYOBRequest.view` and occupy the same or less memory.\n    Specifically, it must be either the view's buffer or a transferred version, must have the same `byteOffset`, and a `byteLength` (number of bytes written) that is less than or equal to that of the view.\n\n### Return value\n\n`undefined`\n\n### Exceptions\n\n- `TypeError`\n\n  - : Thrown if the source object is not a `ReadableStreamBYOBRequest`, or there is no associated controller, or the associated internal array buffer is non-existent or detached.\n    It may also be thrown if the `view` is zero-length when there is an active reader, or non-zero when called on a closed stream.\n\n- `RangeError`\n  - : Thrown if the new `view` does not match the backing memory region of `ReadableStreamBYOBRequest.view`.\n    For example, it is not the same buffer (or a transferred version), has a different `byteOffset`, or is larger than the memory available to the backing view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/ReadableStreamBYOBRequest/prototype/view.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# view\n\nThe **`view`** getter property of the `ReadableStreamBYOBRequest` interface returns the current view.\n\n## Value\n\nA typed array representing the destination region to which the controller can write generated data.\n\n`null` if the request has already been responded to, by calling `ReadableStreamBYOBRequest.respond()` or `ReadableStreamBYOBRequest.respondWithNewView()`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/ReadableStreamDefaultController/prototype/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.close()\n\nThe **`close()`** method of the\n`ReadableStreamDefaultController` interface closes the associated stream.\n\nReaders will still be able to read any previously-enqueued chunks from the stream,\nbut once those are read, the stream will become closed. If you want to completely get\nrid of the stream and discard any enqueued chunks, you'd use\n`ReadableStream.cancel()` or\n`ReadableStreamDefaultReader.cancel()`.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/ReadableStreamDefaultController/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.desiredSize\n\nThe **`desiredSize`** read-only property of the\n`ReadableStreamDefaultController` interface returns the desired size\nrequired to fill the stream's internal queue.\n\n## Value\n\nAn integer. Note that this can be negative if the queue is over-full.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/ReadableStreamDefaultController/prototype/enqueue.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.enqueue()\n\nThe **`enqueue()`** method of the\n`ReadableStreamDefaultController` interface enqueues a given chunk in the\nassociated stream.\n\n## Syntax\n\n```js\nenqueue(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : The chunk to enqueue.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/ReadableStreamDefaultController/prototype/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.error()\n\nThe **`error()`** method of the\n`ReadableStreamDefaultController` interface causes any future interactions\nwith the associated stream to error.\n\n> **Note:** The `error()` method can be called\n> more than once, and can be called when the stream is not readable.\n\n## Syntax\n\n```js\nerror(e)\n```\n\n### Parameters\n\n- `e`\n  - : The error you want future interactions to fail with.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/ReadableStreamDefaultReader/ReadableStreamDefaultReader.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader()\n\nThe **`ReadableStreamDefaultReader()`**\nconstructor creates and returns a `ReadableStreamDefaultReader` object\ninstance.\n\n## Syntax\n\n```js\nnew ReadableStreamDefaultReader(stream)\n```\n\n### Parameters\n\n- `stream`\n  - : The `ReadableStream` to be read.\n\n### Return value\n\nAn instance of the `ReadableStreamDefaultReader` object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the supplied `stream` parameter is not a `ReadableStream`,\n    or it is already locked for reading by another reader.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/ReadableStreamDefaultReader/prototype/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n~ ReadableStreamDefaultReader.cancel()\n\nThe **`cancel()`** method of the\n`ReadableStreamDefaultReader` interface returns a `Promise` that resolves when the stream is canceled. Calling this method signals a loss of interest in the stream by a consumer.\n\nCancel is used when you've completely finished with the stream and don't need any more\ndata from it, even if there are chunks enqueued waiting to be read. That data is lost\nafter cancel is called, and the stream is not readable any more. To read those chunks\nstill and not completely get rid of the stream, you'd use\n`ReadableStreamDefaultController.close()`.\n\n> **Note:** If the reader is active, the\n> `cancel()` method behaves the same as that for the associated stream\n> (`ReadableStream.cancel()`).\n\n## Syntax\n\n```js\ncancel()\ncancel(reason)\n```\n\n### Parameters\n\n- `reason` _**optional**_\n  - : A human-readable reason for the cancellation. This value may or may not be used.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason`\nparameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamDefaultReader`, or the stream\n    has no owner.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/ReadableStreamDefaultReader/prototype/closed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader.closed\n\nThe **`closed`** read-only property of the\n`ReadableStreamDefaultReader` interface returns a\n`Promise` that fulfills when the stream closes, or rejects if the\nstream throws an error or the reader's lock is released. This property enables you\nto write code that responds to an end to the streaming process.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/ReadableStreamDefaultReader/prototype/read.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader.read()\n\nThe **`read()`** method of the `ReadableStreamDefaultReader` interface returns a `Promise` providing access to the next chunk in the stream's internal queue.\n\n## Syntax\n\n```js\nread()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise`, which fulfills/rejects with a result depending on the state of the stream.\nThe different possibilities are as follows:\n\n- If a chunk is available, the promise will be fulfilled with an object of the form `{ value: theChunk, done: false }`.\n- If the stream becomes closed, the promise will be fulfilled with an object of the form `{ value: undefined, done: true }`.\n- If the stream becomes errored, the promise will be rejected with the relevant error.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamDefaultReader`, the stream has no owner, or `ReadableStreamDefaultReader.releaseLock()` is called (when there's a pending read request).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/ReadableStreamDefaultReader/prototype/releaseLock.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader.releaseLock()\n\nThe **`releaseLock()`** method of the `ReadableStreamDefaultReader` interface releases the reader's lock on the stream.\n\nIf the associated stream is errored when the lock is released, the reader will appear errored in that same way subsequently; otherwise, the reader will appear closed.\n\nIf the reader's lock is released while it still has pending read requests then the promises returned by the reader's `ReadableStreamDefaultReader.read()` method are immediately rejected with a `TypeError`.\nUnread chunks remain in the stream's internal queue and can be read later by acquiring a new reader.\n\n## Syntax\n\n```js\nreleaseLock()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultReader`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/ReferenceError/ReferenceError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReferenceError\n\nThe **`ReferenceError`** object represents an error when a\nnon-existent variable is referenced.\n\n## Syntax\n\n```js\nnew ReferenceError()\nnew ReferenceError(message)\nnew ReferenceError(message, options)\nnew ReferenceError(message, fileName)\nnew ReferenceError(message, fileName, lineNumber)\n\nReferenceError()\nReferenceError(message)\nReferenceError(message, options)\nReferenceError(message, fileName)\nReferenceError(message, fileName, lineNumber)\n```\n\n> **Note:** `ReferenceError()` can be called with or without `new`. Both create a new `ReferenceError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Reflect/apply.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.apply()\n\nThe static **`Reflect.apply()`** method calls a target function\nwith arguments as specified.\n\n## Syntax\n\n```js\nReflect.apply(target, thisArgument, argumentsList)\n```\n\n### Parameters\n\n- `target`\n  - : The target function to call.\n- `thisArgument`\n  - : The value of `this` provided for the call to\n    `target`.\n- `argumentsList`\n  - : An array-like object specifying the arguments with which\n    `target` should be called.\n\n### Return value\n\nThe result of calling the given `target` function with the\nspecified `this` value and arguments.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if the `target` is not callable.\n\n## Description\n\nIn ES5, you typically use the [`Function.prototype.apply()`](../../globals/Function/prototype/apply.mdx) method to call a\nfunction with a given `this` value and `arguments` provided as an array\n(or an [array-like object](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects)).\n\n```js\nFunction.prototype.apply.call(Math.floor, undefined, [1.75]);\n```\n\nWith `Reflect.apply()` this becomes less verbose and easier to understand.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Reflect/construct.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.construct()\n\nThe static **`Reflect.construct()`** method acts like the\n`new` operator, but as a function. It is equivalent to\ncalling `new target(...args)`. It gives also the added option to specify a\ndifferent prototype.\n\n## Syntax\n\n```js\nReflect.construct(target, argumentsList)\nReflect.construct(target, argumentsList, newTarget)\n```\n\n### Parameters\n\n- `target`\n  - : The target function to call.\n- `argumentsList`\n  - : An array-like object specifying the arguments with which\n    `target` should be called.\n- `newTarget` _**optional**_\n  - : The constructor whose prototype should be used. See also the [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target)\n    operator. If `newTarget` is not present, its value defaults\n    to `target`.\n\n### Return value\n\nA new instance of `target` (or `newTarget`,\nif present), initialized by `target` as a constructor with the\ngiven `argumentsList`.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` or\n`newTarget` are not constructors.\n\n## Description\n\n`Reflect.construct()` allows you to invoke a constructor with a variable\nnumber of arguments. (This would also be possible by using the\n[spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) combined with the\n[`new` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new).)\n\n```js\nconst obj = new Foo(...args);\nconst obj = Reflect.construct(Foo, args);\n```\n\n### Reflect.construct() vs Object.create()\n\nPrior to the introduction of `Reflect`, objects could be constructed using\nan arbitrary combination of constructor and prototype by using\n[`Object.create()`](../../globals/Object/create.mdx).\n\n```js\nfunction OneClass() {\n  this.name = \"one\";\n}\n\nfunction OtherClass() {\n  this.name = \"other\";\n}\n\n// Calling this:\nconst obj1 = Reflect.construct(OneClass, args, OtherClass);\n\n// ...has the same result as this:\nconst obj2 = Object.create(OtherClass.prototype);\nOneClass.apply(obj2, args);\n\nconsole.log(obj1.name); // 'one'\nconsole.log(obj2.name); // 'one'\n\nconsole.log(obj1 instanceof OneClass); // false\nconsole.log(obj2 instanceof OneClass); // false\n\nconsole.log(obj1 instanceof OtherClass); // true\nconsole.log(obj2 instanceof OtherClass); // true\n\n// Another example to demonstrate below:\n\nfunction func1(a, b, c, d) {\n  console.log(arguments[3]);\n}\n\nfunction func2(d, e, f, g) {\n  console.log(arguments[3]);\n}\n\nconst obj1 = Reflect.construct(func1, [\"I\", \"Love\", \"my\", \"country\"]);\n```\n\nHowever, while the end result is the same, there is one important difference in the\nprocess. When using `Object.create()` and\n[`Function.prototype.apply()`](../../globals/Function/prototype/apply.mdx), the `new.target` operator will\npoint to `undefined` within the function used as the constructor, since the\n`new` keyword is not being used to create the object.\n\nWhen invoking `Reflect.construct()`, on the other hand, the\n`new.target` operator will point to the `newTarget`\nparameter if supplied, or `target` if not.\n\n```js\nfunction OneClass() {\n  console.log(\"OneClass\");\n  console.log(new.target);\n}\nfunction OtherClass() {\n  console.log(\"OtherClass\");\n  console.log(new.target);\n}\n\nconst obj1 = Reflect.construct(OneClass, args);\n// Logs:\n// OneClass\n// function OneClass { ... }\n\nconst obj2 = Reflect.construct(OneClass, args, OtherClass);\n// Logs:\n// OneClass\n// function OtherClass { ... }\n\nconst obj3 = Object.create(OtherClass.prototype);\nOneClass.apply(obj3, args);\n// Logs:\n// OneClass\n// undefined\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Reflect/defineProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.defineProperty()\n\nThe static **`Reflect.defineProperty()`** method is like\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx) but returns a `Boolean`.\n\n## Syntax\n\n```js\nReflect.defineProperty(target, propertyKey, attributes)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to define the property.\n- `propertyKey`\n  - : The name of the property to be defined or modified.\n- `attributes`\n  - : The attributes for the property being defined or modified.\n\n### Return value\n\nA `Boolean` indicating whether or not the property was successfully\ndefined.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.defineProperty` method allows precise addition to or\nmodification of a property on an object. For more details, see the\n[`Object.defineProperty`](../../globals/Object/defineProperty.mdx) which is similar.\n\n> **Note:** `Object.defineProperty` returns the\n> object or throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the property has not been successfully\n> defined. `Reflect.defineProperty`, however, returns a `Boolean`\n> indicating whether or not the property was successfully defined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Reflect/deleteProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.deleteProperty()\n\nThe static\n**`Reflect.deleteProperty()`**\nmethod allows to delete properties. It is like the\n[`delete` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete)\nas a function.\n\n## Syntax\n\n```js\nReflect.deleteProperty(target, propertyKey)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to delete the property.\n- `propertyKey`\n  - : The name of the property to be deleted.\n\n### Return value\n\nA `Boolean` indicating whether or not the property was successfully\ndeleted.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.deleteProperty` method allows you to delete a property on an\nobject. It returns a `Boolean` indicating whether or not the property was\nsuccessfully deleted. It is almost identical to the non-strict\n[`delete` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Reflect/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.get()\n\nThe static **`Reflect.get()`** method works like getting a\nproperty from an object (`target[propertyKey]`) as a function.\n\n## Syntax\n\n```js\nReflect.get(target, propertyKey)\nReflect.get(target, propertyKey, receiver)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to get the property.\n- `propertyKey`\n  - : The name of the property to get.\n- `receiver` _**optional**_\n  - : The value of `this` provided for the call to\n    `target` if a getter is encountered. When used with\n    `Proxy`, it can be an object that inherits from\n    `target`.\n\n### Return value\n\nThe value of the property.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.get` method allows you to get a property on an object. It is like the\n[property accessor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Property_Accessors) syntax as a function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Reflect/getOwnPropertyDescriptor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.getOwnPropertyDescriptor()\n\nThe static\n**`Reflect.getOwnPropertyDescriptor()`** method is similar to\n[`Object.getOwnPropertyDescriptor()`](../../globals/Object/getOwnPropertyDescriptor.mdx). It returns a property descriptor of\nthe given property if it exists on the object, `undefined`\notherwise.\n\n\n\n## Syntax\n\n```js\nReflect.getOwnPropertyDescriptor(target, propertyKey)\n```\n\n### Parameters\n\n- `target`\n  - : The target object in which to look for the property.\n- `propertyKey`\n  - : The name of the property to get an own property descriptor for.\n\n### Return value\n\nA property descriptor object if the property exists in `target`\nobject; otherwise, [`undefined`](../../globals/undefined.mdx).\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.getOwnPropertyDescriptor` method returns a property descriptor\nof the given property if it exists in the `target` object,\n[`undefined`](../../globals/undefined.mdx) otherwise. The only difference to\n[`Object.getOwnPropertyDescriptor()`](../../globals/Object/getOwnPropertyDescriptor.mdx) is how non-object targets are handled.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Reflect/getPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.getPrototypeOf()\n\nThe static **`Reflect.getPrototypeOf()`** method is almost the\nsame method as [`Object.getPrototypeOf()`](../../globals/Object/getPrototypeOf.mdx). It returns the prototype (i.e. the\nvalue of the internal `[[Prototype]]` property) of the specified object.\n\n\n\n## Syntax\n\n```js\nReflect.getPrototypeOf(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object of which to get the prototype.\n\n### Return value\n\nThe prototype of the given object. If there are no inherited properties,\n[`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) is returned.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.getPrototypeOf` method returns the prototype (i.e. the value of\nthe internal `[[Prototype]]` property) of the specified object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Reflect/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.has()\n\nThe static **`Reflect.has()`** method works like the [`in` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/in)\nas a function.\n\n## Syntax\n\n```js\nReflect.has(target, propertyKey)\n```\n\n### Parameters\n\n- `target`\n  - : The target object in which to look for the property.\n- `propertyKey`\n  - : The name of the property to check.\n\n### Return value\n\nA `Boolean` indicating whether or not the `target`\nhas the property.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.has` method allows you to check if a property is in an object.\nIt works like the [`in` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/in)\nas a function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Reflect/isExtensible.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.isExtensible()\n\nThe static **`Reflect.isExtensible()`** method determines if an object is extensible (whether it can have new properties added to it). It is similar to [`Object.isExtensible()`](../../globals/Object/isExtensible.mdx), but with [some differences](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/isExtensible#difference_with_object.isextensible).\n\n## Syntax\n\n```js\nReflect.isExtensible(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object which to check if it is extensible.\n\n### Return value\n\nA `Boolean` indicating whether or not the target is extensible.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Reflect/ownKeys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.ownKeys()\n\nThe static **`Reflect.ownKeys()`** method returns an array of\nthe `target` object's own property keys.\n\n## Syntax\n\n```js\nReflect.ownKeys(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object from which to get the own keys.\n\n### Return value\n\nAn `Array` of the `target` object's own property\nkeys.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.ownKeys` method returns an array of the\n`target` object's own property keys. Its return value is\nequivalent to `Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target))`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Reflect/preventExtensions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.preventExtensions()\n\nThe static **`Reflect.preventExtensions()`** method prevents new properties from ever being added to an object (i.e., prevents future extensions to the object). It is similar to [`Object.preventExtensions()`](../../globals/Object/preventExtensions.mdx), but with [some differences](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/preventExtensions#difference_with_object.preventextensions).\n\n## Syntax\n\n```js\nReflect.preventExtensions(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to prevent extensions.\n\n### Return value\n\nA `Boolean` indicating whether or not the target was successfully set to prevent extensions.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Reflect/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.set()\n\nThe static **`Reflect.set()`** method works like setting a\nproperty on an object.\n\n## Syntax\n\n```js\nReflect.set(target, propertyKey, value)\nReflect.set(target, propertyKey, value, receiver)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to set the property.\n- `propertyKey`\n  - : The name of the property to set.\n- `value`\n  - : The value to set.\n- `receiver` _**optional**_\n  - : The value of `this` provided for the call to the setter for `propertyKey` on `target`. If provided and `target` does not have a setter for `propertyKey`, the property will be set on `receiver` instead.\n\n### Return value\n\nA `Boolean` indicating whether or not setting the property was successful.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.set` method allows you to set a property on an object. It does\nproperty assignment and is like the\n[property accessor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Property_Accessors) syntax as a function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Reflect/setPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.setPrototypeOf()\n\nThe static\n**`Reflect.setPrototypeOf()`** method is the same method as\n[`Object.setPrototypeOf()`](../../globals/Object/setPrototypeOf.mdx), except for its return type. It sets the\nprototype (i.e., the internal `[[Prototype]]` property) of a specified\nobject to another object or to [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null), and returns `true` if\nthe operation was successful, or `false` otherwise.\n\n## Syntax\n\n```js\nReflect.setPrototypeOf(target, prototype)\n```\n\n### Parameters\n\n- `target`\n  - : The target object of which to set the prototype.\n- `prototype`\n  - : The object's new prototype (an object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null)).\n\n### Return value\n\nA `Boolean` indicating whether or not the prototype was successfully set.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object` or if `prototype` is neither an object nor\n[`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null).\n\n## Description\n\nThe `Reflect.setPrototypeOf` method changes the prototype (i.e. the value of\nthe internal `[[Prototype]]` property) of the specified object.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Request/Request.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request()\n\nThe **`Request()`** constructor creates a new\n`Request` object.\n\n## Syntax\n\n```js\nnew Request(input)\nnew Request(input, options)\n```\n\n### Parameters\n\n- `input`\n\n  - : Defines the resource that you wish to fetch. This can either be:\n\n    - A string containing the direct URL of the resource you want to\n      fetch.\n    - A `Request` object, effectively creating a copy.\n\n- `options` _**optional**_\n\n  - : An object containing any custom settings that you want to apply to the\n    request. The possible options are:\n\n    - `method`\n      - : The request method, e.g., `GET`, `POST`. The default is `GET`.\n    - `headers`\n      - : Any headers you want to add to your request, contained\n        within a `Headers` object or an object literal with `String` values.\n    - `body`\n      - : Any body that you want to add to your request: this can be an `ArrayBuffer`, a `TypedArray`, a `DataView`, a `URLSearchParams`, string object or literal, a `ReadableStream` object, a [`Blob`](../../globals/Blob/Blob.mdx) object, or a [`FormData`](../../globals/FormData/FormData.mdx) object.\n    - `backend` _**Fastly-specific**_\n    - `cacheOverride` _**Fastly-specific**_, see [`CacheOverride`](../../fastly:cache-override/CacheOverride/CacheOverride.mdx).\n    - `cacheKey` _**Fastly-specific**_\n    - `manualFramingHeaders`_: boolean_ _**optional**_ _**Fastly-specific**_\n      - : The default value is `false`, which means that the framing headers are automatically created based on the message body.\n        In \"automatic\" mode, a `Content-Length` is used when the size of the body can be determined before it is sent.\n        Requests sent in streaming mode, where headers are sent immediately but the content of the body is streamed later, will receive a `Transfer-Encoding: chunked` to accommodate the dynamic generation of the body.\n        In \"manual\" mode, any `Content-Length` or `Transfer-Encoding` headers will be honored.\n        You must ensure that those headers have correct values permitted by the [HTTP/1.1 specification](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).\n        If the provided headers are not permitted by the specification, the headers will revert to \"automatic\" mode and a diagnostic message will be logged about what was wrong.\n        If a `Content-Length` is permitted by the specification, but the value does not match the size of the actual body, the body will either be truncated (if it is too long), or the connection will be hung up early (if it is too short).\n    - `fastly` _**Fastly-specific**_\n      - `decompressGzip`_: boolean_ _**optional**_\n        - Whether to automatically gzip decompress the Response or not."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Request/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the `Request` interface\nreads the request body and returns it as a promise that resolves with an `ArrayBuffer`.\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an `ArrayBuffer`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Request/prototype/blob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.blob()\n\nThe **`blob()`** method of the `Request` interface reads the request body and returns it as a promise that resolves with a `Blob`.\n\n## Syntax\n\n```js\nblob()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a [`Blob`](../../../globals/Blob/Blob.mdx).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the request body has already been used or if the request's method is `GET` or `HEAD`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Request/prototype/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.body\n\nThe read-only **`body`** property of the `Request`\ninterface contains a `ReadableStream` with the body contents\nthat have been added to the request. Note that a request using the\n`GET` or `HEAD` method cannot have a body\nand `null` is returned in these cases.\n\n## Value\n\nA `ReadableStream` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Request/prototype/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.bodyUsed\n\nThe read-only **`bodyUsed`** property of the\n`Request` interface is a boolean value that indicates\nwhether the request body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Request/prototype/clone.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.clone()\n\nThe **`clone()`** method of the `Request` interface creates a copy of the current `Request` object.\n\nLike the underlying `ReadableStream.tee`` api, the `body` of a cloned `Response`\nwill signal backpressure at the rate of the _faster_ consumer of the two bodies,\nand unread data is enqueued internally on the slower consumed `body`\nwithout any limit or backpressure.\nBeware when you construct a `Request` from a stream and then `clone` it.\n\n`clone()` throws a `TypeError` if the request body has already been used. In fact, the main reason `clone()` exists is to allow multiple uses of body objects (when they are one-use only.)\n\nIf you intend to modify the request, you may prefer the `Request` constructor.\n\n## Syntax\n\n```js\nclone()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Request` object, which is an exact copy of the `Request` that `clone()` was called on.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Request/prototype/formData.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.formData()\n\nThe **`formData()`** method of the `Request` interface reads the request body and returns it as a promise that resolves with a `FormData` object.\n\n## Syntax\n\n```js\nformData()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a [`FormData`](../../../globals/FormData/FormData.mdx) object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the request body has already been used or if the request's method is `GET` or `HEAD`.\n- `SyntaxError`\n  - : Thrown if the request's content type is not `multipart/form-data` or `application/x-www-form-urlencoded`, or if the content cannot be parsed as form data.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Request/prototype/headers.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.headers\n\nThe **`headers`** read-only property of the\n`Request` interface contains the `Headers` object associated\nwith the request.\n\n## Value\n\nA `Headers` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Request/prototype/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.json()\n\nThe **`json()`** method of the `Request` interface\nreads the request body and returns it as a promise that resolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a JavaScript object. This object could be\nanything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Request/prototype/method.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.method\n\nThe **`method`** read-only property of the\n`Request` interface contains the request's method (`GET`, `POST`, etc.)\n\n## Value\n\nA `String` indicating the method of the request.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Request/prototype/setManualFramingHeaders.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.setManualFramingHeaders()\n\nThe **`setManualFramingHeaders()`** method of the `Request` interface controls how the framing headers should be determined.\n\nBy default the framing headers are set to \"automatic\" mode, which means they are created based on the body of the associated Request instance.\nIn \"automatic\" mode, a `Content-Length` is used when the size of the body can be determined before it is sent.\nRequests sent in streaming mode, where headers are sent immediately but the content of the body is streamed later, will receive a `Transfer-Encoding: chunked` to accommodate the dynamic generation of the body.\nIn \"manual\" mode, any `Content-Length` or `Transfer-Encoding` headers will be honored.\nYou must ensure that those headers have correct values permitted by the [HTTP/1.1 specification](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).\nIf the provided headers are not permitted by the specification, the headers will revert to \"automatic\" mode and a diagnostic message will be logged about what was wrong.\nIf a `Content-Length` is permitted by the specification, but the value does not match the size of the actual body, the body will either be truncated (if it is too long), or the connection will be hung up early (if it is too short).\n\n## Syntax\n\n## Syntax\n\n```js\nsetManualFramingHeaders(manual)\n```\n\n### Parameters\n\n- `manual` _: boolean_\n  - : Whether or not to use \"manual\" mode for the framing headers.\n\n### Return value\n\n`undefined`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Request/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.text()\n\nThe **`text()`** method of the `Request` interface\nreads the request body and returns it as a promise that resolves with a `String`.\nThe response is _always_ decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Promise that resolves with a `String`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Request/prototype/url.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.url\n\nThe **`url`** read-only property of the `Request` interface contains the URL of the request.\n\n## Value\n\nA string indicating the URL of the request.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Response/Response.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response()\n\nThe **`Response()`** constructor creates a new `Response` object.\n\n## Syntax\n\n```js\nnew Response()\nnew Response(body)\nnew Response(body, options)\n```\n\n### Parameters\n\n- `body` _**optional**_\n\n  - : An object defining a body for the response. This can be `null` (which is\n    the default value), or one of:\n\n    - [`ArrayBuffer`](../../globals/ArrayBuffer/ArrayBuffer.mdx)\n    - `TypedArray`\n    - [`DataView`](../../globals/DataView/DataView.mdx)\n    - [`ReadableStream`](../../globals/ReadableStream/ReadableStream.mdx)\n    - [`URLSearchParams`](../../globals/URLSearchParams/URLSearchParams.mdx)\n    - [`String`](../../globals/String/String.mdx)\n    - string literal\n    - [`Blob`](../../globals/Blob/Blob.mdx)\n    - [`FormData`](../../globals/FormData/FormData.mdx)\n\n- `options` _**optional**_\n\n  - : An options object containing any custom settings that you want to apply to the\n    response, or an empty object (which is the default value). The possible options are:\n\n    - `status`\n      - : The status code for the response, e.g., `200`.\n    - `statusText`\n      - : The status message associated with the status code,\n        e.g., `OK`.\n    - `headers`\n      - : Any headers you want to add to your response, contained\n        within a [`Headers`](../../globals/Headers/Headers.mdx) object or object literal of\n        [`String`](../../globals/String/String.mdx) key/value pairs.\n    - `manualFramingHeaders`_: boolean_ _**optional**_ _**Fastly-specific**_\n      - : The default value is `false`, which means that the framing headers are automatically created based on the message body.\n        In \"automatic\" mode, a `Content-Length` is used when the size of the body can be determined before it is sent.\n        Responses sent in streaming mode, where headers are sent immediately but the content of the body is streamed later, will receive a `Transfer-Encoding: chunked` to accommodate the dynamic generation of the body.\n        In \"manual\" mode, any `Content-Length` or `Transfer-Encoding` headers will be honored.\n        You must ensure that those headers have correct values permitted by the [HTTP/1.1 specification](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).\n        If the provided headers are not permitted by the specification, the headers will revert to \"automatic\" mode and a diagnostic message will be logged about what was wrong.\n        If a `Content-Length` is permitted by the specification, but the value does not match the size of the actual body, the body will either be truncated (if it is too long), or the connection will be hung up early (if it is too short).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Response/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface\ntakes a [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion. It returns a promise\nthat resolves with an [`ArrayBuffer`](../../../globals/ArrayBuffer/ArrayBuffer.mdx).\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an [`ArrayBuffer`](../../../globals/ArrayBuffer/ArrayBuffer.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Response/prototype/blob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.blob()\n\nThe **`blob()`** method of the [`Response`](../Response.mdx) interface takes a [`Response`](../Response.mdx) stream and reads it to completion. It returns a promise that resolves with a `Blob`.\n\n## Syntax\n\n```js\nblob()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a [`Blob`](../../../globals/Blob/Blob.mdx).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the response body has already been consumed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Response/prototype/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.body\n\nThe **`body`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface is a [`ReadableStream`](../../../globals/ReadableStream/ReadableStream.mdx) of the body contents.\n\n## Value\n\nA [`ReadableStream`](../../../globals/ReadableStream/ReadableStream.mdx), or else `null` for any `Response` object [constructed](../../../globals/Response/Response.mdx) with a null `body` property, or for any actual HTTP response that has no body.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Response/prototype/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.bodyUsed\n\nThe **`bodyUsed`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface is a boolean value that indicates whether the body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Response/prototype/formData.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.formData()\n\nThe **`formData()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface takes a [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion. It returns a promise that resolves with a `FormData` object.\n\n## Syntax\n\n```js\nformData()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a [`FormData`](../../../globals/FormData/FormData.mdx) object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the response body has already been consumed.\n- `SyntaxError`\n  - : Thrown if the response's content type is not `multipart/form-data` or `application/x-www-form-urlencoded`, or if the content cannot be parsed as form data.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Response/prototype/headers.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.headers\n\nThe **`headers`** read-only property of the\n[`Response`](../../../globals/Response/Response.mdx) interface contains the [`Headers`](../../../globals/Headers/Headers.mdx) object associated\nwith the response.\n\n## Value\n\nA [`Headers`](../../Headers/Headers.mdx) object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Response/prototype/ip.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.ip\n\nThe **`ip`** getter of the `Response` interface returns the IP address associated with the request, as either an IPv6 or IPv4 string.\n\nIn the case where no IP address is available (say the response is cached, or was manually created), `undefined` will be returned.\n\nTo ensure an origin request with an IP, pass a [`CacheOverride`](../../../fastly:cache-override/CacheOverride/CacheOverride.mdx) value.\n\n## Value\n\n`undefined` or `string`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Response/prototype/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.json()\n\nThe **`json()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface takes\na [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion. It returns a promise which\nresolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA [`Promise`](../../../globals/Promise/Promise.mdx) that resolves to a JavaScript object. This object could be\nanything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Response/prototype/ok.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.ok\n\nThe **`ok`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains a Boolean stating whether the response was successful (status in the range 200-299) or not.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Response/prototype/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.port\n\nThe **`port`** getter of the `Response` interface returns the port associated with the request, as a number.\n\nIn the case where no port is available (say the response is cached, or was manually created), `undefined` will be returned.\n\nTo ensure an origin request with a port, pass a [`CacheOverride`](../../../fastly:cache-override/CacheOverride/CacheOverride.mdx) value.\n\n## Value\n\n`undefined` or `number`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Response/prototype/setManualFramingHeaders.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.setManualFramingHeaders()\n\nThe **`setManualFramingHeaders()`** method of the `Response` interface controls how the framing headers should be determined.\n\nBy default the framing headers are set to \"automatic\" mode, which means they are created based on the body of the associated Response instance.\nIn \"automatic\" mode, a `Content-Length` is used when the size of the body can be determined before it is sent.\nResponses sent in streaming mode, where headers are sent immediately but the content of the body is streamed later, will receive a `Transfer-Encoding: chunked` to accommodate the dynamic generation of the body.\nIn \"manual\" mode, any `Content-Length` or `Transfer-Encoding` headers will be honored.\nYou must ensure that those headers have correct values permitted by the [HTTP/1.1 specification](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).\nIf the provided headers are not permitted by the specification, the headers will revert to \"automatic\" mode and a diagnostic message will be logged about what was wrong.\nIf a `Content-Length` is permitted by the specification, but the value does not match the size of the actual body, the body will either be truncated (if it is too long), or the connection will be hung up early (if it is too short).\n\n## Syntax\n\n```js\nsetManualFramingHeaders(manual)\n```\n\n### Parameters\n\n- `manual` _: boolean_\n  - : Whether or not to use \"manual\" mode for the framing headers.\n\n### Return value\n\n`undefined`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Response/prototype/status.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.status\n\nThe **`status`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains the HTTP status code of the response.\n\nFor example, `200` for success, `404` if the resource could not be found.\n\n## Value\n\nAn unsigned short number.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Response/prototype/statusText.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.statusText\n\nThe **`statusText`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains the status message corresponding to the HTTP status code in [`status`](../../../globals/Response/prototype/status.mdx).\n\nFor example, this would be `OK` for a status code `200`, `Continue` for `100`, `Not Found` for `404`.\n\n## Value\n\nA [`String`](../../../globals/String/String.mdx) containing the HTTP status message associated with the response.\nThe default value is \"\".\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Response/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.text()\n\nThe **`text()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface takes a [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion.\nIt returns a promise that resolves with a [`String`](../../../globals/String/String.mdx).\nThe response is _always_ decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Promise that resolves with a [`String`](../../../globals/String/String.mdx).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Response/prototype/url.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.url\n\nThe **`url`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains the URL of the response.\nThe value of the `url` property will be the final URL obtained after any redirects.\n\n## Value\n\nA string.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Response/redirect.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Response.redirect()\n\nThe **`redirect()`** static method of the `Response` interface returns a `Response` resulting in a redirect to the specified URL.\n\n## Syntax\n\n```js\nResponse.redirect(url)\nResponse.redirect(url, status)\n```\n\n### Parameters\n\n- `url`\n  - : The URL that the new response is to originate from.\n- `status` __optional__\n  - : An optional status code for the response (e.g., `302`.)\n\n### Return value\n\nA `Response` object.\n\n### Exceptions\n\n- `RangeError`\n  - : The specified status is not a redirect status.\n- `TypeError`\n  - : The specified URL is invalid.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/RsaHashedImportParams/RsaHashedImportParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RsaHashedImportParams\n\nThe **`RsaHashedImportParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.importKey()`, when importing any RSA-based key pair.\n\n## Instance properties\n\n- `name`\n  - : A string. This should be set to `RSASSA-PKCS1-v1_5`.\n\n- `hash`\n  - : A string representing the name of the digest function to use. This can be one of `SHA-256`, `SHA-384`, or `SHA-512`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Set/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get Set\\[Symbol.species]\n\nThe **`Set[Symbol.species]`** accessor property is an unused accessor property specifying how to copy `Set` objects.\n\n## Syntax\n\n```js\nSet[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct copied `Set` instances.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `Set` objects. Subclass constructors may override it to change the constructor assignment.\n\n> **Note:** This property is currently unused by all `Set` methods.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Set/Set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set()\n\nThe **`Set` constructor** lets you\ncreate `Set` objects that store unique values of any type, whether [primitive values](https://developer.mozilla.org/docs/Glossary/Primitive) or object\nreferences.\n\n## Syntax\n\n```js\nnew Set()\nnew Set(iterable)\n```\n\n> **Note:** `Set()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable` _**optional**_\n\n  - : If an [iterable object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) is passed, all of its elements will be added to the new\n    `Set`.\n\n    If you don't specify this parameter, or its value is `null`, the new\n    `Set` is empty.\n\n### Return value\n\nA new `Set` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Set/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype\\[Symbol.iterator]()\n\nThe **`[Symbol.iterator`** method of a `Set` object implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows sets to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the values of the set.\n\nThe initial value of this property is the same function object as the initial value of the [`Set.prototype.values`](../../../globals/Set/prototype/values.mdx) property.\n\n## Syntax\n\n```js\nset[Symbol.iterator]()\n```\n\n### Return value\n\nThe same return value as [`Set.prototype.values()`](../../../globals/Set/prototype/values.mdx): a new iterable iterator object that yields the values of the set.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Set/prototype/add.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.add()\n\nThe **`add()`** method inserts a new element with a specified value in to a `Set` object, if there isn't an element with the same value already in the `Set`.\n\n## Syntax\n\n```js\nadd(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value of the element to add to the `Set` object.\n\n### Return value\n\nThe `Set` object with added value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Set/prototype/clear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.clear()\n\nThe **`clear()`** method removes all elements from a\n`Set` object.\n\n## Syntax\n\n```js\nclear()\n```\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Set/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.delete()\n\nThe **`delete()`** method removes a specified value from a\n`Set` object, if it is in the set.\n\n## Syntax\n\n```js\ndelete(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to remove from `Set`.\n\n### Return value\n\nReturns `true` if `value` was already in\n`Set`; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Set/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.entries()\n\nThe **`entries()`** method returns a new [Iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators) object\nthat contains **an array of `[value, value]`** for each element\nin the `Set` object, in insertion order. For `Set` objects there\nis no `key` like in `Map` objects. However, to keep the API\nsimilar to the `Map` object, each _entry_ has the same value for its\n_key_ and _value_ here, so that an array `[value, value]` is\nreturned.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nA new iterator object that contains an array of `[value, value]` for each\nelement in the given `Set`, in insertion order.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Set/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.forEach()\n\nThe **`forEach()`** method executes a provided function once\nfor each value in the `Set` object, in insertion order.\n\n## Syntax\n\n```js\n// Arrow function\nforEach(() => { /* ... */ } )\nforEach((value) => { /* ... */ } )\nforEach((value, key) => { /* ... */ } )\nforEach((value, key, set) => { /* ... */ } )\n\n// Callback function\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n\n// Inline callback function\nforEach(function() { /* ... */ })\nforEach(function(value) { /* ... */ })\nforEach(function(value, key) { /* ... */ })\nforEach(function(value, key, set) { /* ... */ })\nforEach(function(value, key, set) { /* ... */ }, thisArg)\n```\n\n### Parameters\n\n- `callback`\n\n  - : Function to execute for each element, taking three arguments:\n\n    - `value`, `key`\n      - : The current element being processed in the `Set`. As there are no\n        keys in `Set`, the value is passed for both arguments.\n    - `set`\n      - : The `Set` object which `forEach()` was called upon.\n\n- `thisArg`\n  - : Value to use as `this` when executing `callbackFn`.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n## Description\n\nThe `forEach()` method executes the provided\n`callback` once for each value which actually exists in the\n`Set` object. It is not invoked for values which have been deleted. However,\nit is executed for values which are present but have the value `undefined`.\n\n`callback` is invoked with **three arguments**:\n\n- the **element value**\n- the **element key**\n- the **`Set` object being traversed**\n\nThere are no keys in `Set` objects, however, so the first two arguments are\nboth **values** contained in the [Set](../../../globals/Set/Set.mdx). This is to make it\nconsistent with other `forEach()` methods for [`Map.prototype.forEach()`](../../../globals/Map/prototype/forEach.mdx) and [`Array.prototype.forEach()`](../../../globals/Array/prototype/forEach.mdx).\n\nIf a `thisArg` parameter is provided to `forEach()`,\nit will be passed to `callback` when invoked, for use as its\n`this` value. Otherwise, the value `undefined` will be passed for\nuse as its `this` value. The `this` value ultimately observable by\n`callback` is determined according to\n[the usual rules for determining the `this` seen by a function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this).\n\nEach value is visited once, except in the case when it was deleted and re-added before\n`forEach()` has finished. `callback` is not invoked for\nvalues deleted before being visited. New values added before `forEach()` has\nfinished will be visited.\n\n`forEach()` executes the `callback` function once for\neach element in the `Set` object; it does not return a value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Set/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.has()\n\nThe **`has()`** method returns a boolean indicating whether an\nelement with the specified value exists in a `Set` object or not.\n\n## Syntax\n\n```js\nhas(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to test for presence in the `Set` object.\n\n### Return value\n\nReturns `true` if an element with the specified value exists in the `Set` object; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Set/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.keys()\n\nThe **`keys()`** method is an alias for the [`values()`](../../../globals/Set/prototype/values.mdx) method.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nA new iterator object containing the values for each element in the given\n`Set`, in insertion order.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Set/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.size\n\nThe **`size`** accessor property returns the number of (unique) elements in a [Set](../../../globals/Set/Set.mdx) object.\n\n## Description\n\nThe value of `size` is an integer representing how many entries the `Set` object has. A set accessor function for `size` is `undefined`; you cannot change this property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Set/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.values()\n\nThe **`values()`** method returns a new [Iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators) object that\ncontains the values for each element in the `Set` object in insertion order.\n\n> **Note:** The **`keys()`** method is an alias\n> for this method (for similarity with [Map](../../../globals/Map/Map.mdx) objects), hence the\n> `keys()` page redirecting here. It behaves exactly the same and returns\n> **values** of `Set` elements.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nA new iterator object containing the values for each element in the given\n`Set`, in insertion order.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/String/String.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String() constructor\n\nThe **`String`** constructor is used to create a new\n`String` object. When called instead as a function, it performs type\nconversion to a \"primitive string\" which is usually more\nuseful.\n\n## Syntax\n\n```js\nnew String(thing)\nString(thing)\n```\n\n> **Note:** `String()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\n- `thing`\n  - : Anything to be converted to a string.\n\n### Return value\n\nWhen `String` is called as a constructor (with `new`), it creates a `String` object, which is **not** a primitive.\n\nWhen `String` is called as a function, it coerces the parameter to a string primitive. `Symbol` values would be converted to `\"Symbol(description)\"`, where `description` is the [description](../../globals/Symbol/prototype/description.mdx) of the Symbol, instead of throwing.\n\n> **Warning:** You should rarely find yourself using `String` as a constructor.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/String/fromCharCode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.fromCharCode()\n\nThe static **`String.fromCharCode()`** method returns a string\ncreated from the specified sequence of UTF-16 code units.\n\n## Syntax\n\n```js\nString.fromCharCode(num1)\nString.fromCharCode(num1, num2)\nString.fromCharCode(num1, num2, /* …, */ numN)\n```\n\n### Parameters\n\n- `num1, ..., numN`\n  - : A sequence of numbers that are UTF-16 code units. The range is between\n    `0` and `65535` (`0xFFFF`). Numbers greater than\n    `0xFFFF` are truncated. No validity checks are performed.\n\n### Return value\n\nA string of length `N` consisting of the\n`N` specified UTF-16 code units.\n\n## Description\n\nThis method returns a string and not a `String` object.\n\nBecause `fromCharCode()` is a static method of `String`, you\nalways use it as `String.fromCharCode()`, rather than as a method of a\n`String` object you created.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/String/fromCodePoint.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.fromCodePoint()\n\nThe static **`String.fromCodePoint()`** method returns a string\ncreated by using the specified sequence of code points.\n\n## Syntax\n\n```js\nString.fromCodePoint(num1)\nString.fromCodePoint(num1, num2)\nString.fromCodePoint(num1, num2, /* …, */ numN)\n```\n\n### Parameters\n\n- `num1, ..., numN`\n  - : A sequence of code points.\n\n### Return value\n\nA string created by using the specified sequence of code points.\n\n### Exceptions\n\n- A `RangeError` is thrown if an invalid Unicode\n  code point is given (e.g. `\"RangeError: NaN is not a valid code point\"`).\n\n## Description\n\nThis method returns a string (and _not_ a `String` object).\n\nBecause `fromCodePoint()` is a static method of `String`, you\nmust call it as `String.fromCodePoint()`, rather than as a method of a\n`String` object you created.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/String/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype\\[Symbol.iterator]()\n\nThe **`Symbol.iterator`** method of a string implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows strings to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the Unicode code points of the string value as individual strings.\n\n## Syntax\n\n```js\nstring[Symbol.iterator]()\n```\n\n### Return value\n\nA new iterable iterator object that yields the Unicode code points of the string value as individual strings.\n\n## Description\n\nStrings are iterated by Unicode code points. This means grapheme clusters will be split, but surrogate pairs will be preserved.\n\n```js\n// \"Backhand Index Pointing Right: Dark Skin Tone\"\n[...\"👉🏿\"]; // ['👉', '🏿']\n// splits into the basic \"Backhand Index Pointing Right\" emoji and\n// the \"Dark skin tone\" emoji\n\n// \"Family: Man, Boy\"\n[...\"👨‍👦\"]; // [ '👨', '‍', '👦' ]\n// splits into the \"Man\" and \"Boy\" emoji, joined by a ZWJ\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/String/prototype/at.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.at()\n\nThe **`at()`** method takes an integer value and returns a `('String` consisting of the single UTF-16 code unit located at the specified offset. This method allows for positive and negative integers. Negative integers count back from the last string character.\n\n## Syntax\n\n```js\nat(index)\n```\n\n### Parameters\n\n- `index`\n  - : The index (position) of the string character to be returned. Supports relative indexing from the end of the string when passed a negative index; i.e. if a negative number is used, the character returned will be found by counting back from the end of the string.\n\n### Return value\n\n`('String` consisting of the single UTF-16 code unit located at the specified position. Returns [`undefined`](../../../globals/undefined.mdx) if the given index can not be found.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/String/prototype/charAt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.charAt()\n\nThe `String` object's\n**`charAt()`** method returns a new string consisting of the\nsingle UTF-16 code unit located at the specified offset into the string.\n\n## Syntax\n\n```js\ncharAt(index)\n```\n\n### Parameters\n\n- `index`\n  - : An integer between `0` and `str.length - 1`. If the\n    `index` cannot be converted to the integer or no\n    `index` is provided, the default is `0`, so the first\n    character of `str` is returned.\n\n### Return value\n\nA string representing the character (exactly one UTF-16 code unit) at the specified\n`index`. If `index` is out of range,\n`charAt()` returns an empty string.\n\n## Description\n\nCharacters in a string are indexed from left to right. The index of the first character\nis `0`, and the index of the last character—in a string called\n`stringName` is `stringName.length - 1`. If\nthe `index` you supply is out of this range, JavaScript returns an\nempty string.\n\nIf no `index` is provided to `charAt()`, the default\nis `0`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/String/prototype/charCodeAt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.charCodeAt()\n\nThe **`charCodeAt()`** method returns\nan integer between `0` and `65535` representing the UTF-16 code\nunit at the given index.\n\nThe UTF-16 code unit matches the Unicode code point for code points which can be\nrepresented in a single UTF-16 code unit. If the Unicode code point cannot be\nrepresented in a single UTF-16 code unit (because its value is greater than\n`0xFFFF`) then the code unit returned will be _the first part of a\nsurrogate pair_ for the code point. If you want the entire code point value, use\n[`codePointAt()`](../../../globals/String/prototype/codePointAt.mdx).\n\n## Syntax\n\n```js\ncharCodeAt(index)\n```\n\n### Parameters\n\n- `index`\n  - : An integer greater than or equal to `0` and less than the\n    `length` of the string. If `index` is not a number,\n    it defaults to `0`.\n\n### Return value\n\nA number representing the UTF-16 code unit value of the character at the given\n`index`. If `index` is out of range,\n`charCodeAt()` returns `NaN`.\n\n## Description\n\nUnicode code points range from `0` to `1114111`\n(`0x10FFFF`). The first 128 Unicode code points are a direct match of the\nASCII character encoding. (For information on Unicode, see [UTF-16 characters, Unicode codepoints, and grapheme clusters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters).)\n\n> **Note:** `charCodeAt()` will always return a value that is\n> less than `65536`. This is because the higher code points are represented\n> by _a pair_ of (lower valued) \"surrogate\" pseudo-characters which are used to\n> comprise the real character.\n>\n> Because of this, in order to examine (or reproduce) the full character for individual\n> character values of `65536` or greater, for such characters, it is\n> necessary to retrieve not only `charCodeAt(i)`, but also\n> `charCodeAt(i+1)` (as if manipulating a string with two\n> letters), or to use `codePointAt(i)` instead. See examples 2 and\n> 3 (below).\n\n`charCodeAt()` returns `NaN` if the given\nindex is less than `0`, or if it is equal to or greater than the\n`length` of the string.\n\nBackward compatibility: In historic versions (like JavaScript 1.2) the\n`charCodeAt()` method returns a number indicating the ISO-Latin-1 codeset\nvalue of the character at the given index. The ISO-Latin-1 codeset ranges from\n`0` to `255`. The first `0` to `127` are a\ndirect match of the ASCII character set.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/String/prototype/codePointAt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.codePointAt()\n\nThe **`codePointAt()`** method returns a non-negative integer\nthat is the Unicode code point value at the given position.\nNote that this function does not give the nth code point in a string,\nbut the code point starting at the specified string index.\n\n## Syntax\n\n```js\ncodePointAt(pos)\n```\n\n### Parameters\n\n- `pos`\n  - : Position of an element in `str` to return the code point value\n    from.\n\n### Return value\n\nA decimal number representing the code point value of the character at the given `pos`.\n\n- If there is no element at `pos`, returns [`undefined`](../../../globals/undefined.mdx).\n- If the element at `pos` is a UTF-16 high surrogate, returns the code point of the surrogate _pair_.\n- If the element at `pos` is a UTF-16 low surrogate, returns _only_ the low surrogate code point.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/String/prototype/concat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.concat()\n\nThe **`concat()`** method concatenates\nthe string arguments to the calling string and returns a new string.\n\n## Syntax\n\n```js\nconcat(str1)\nconcat(str1, str2)\nconcat(str1, str2, /* …, */ strN)\n```\n\n### Parameters\n\n- `strN`\n  - : One or more strings to concatenate to `str`.\n\n### Return value\n\nA new string containing the combined text of the strings provided.\n\n## Description\n\nThe `concat()` function concatenates the string arguments to the calling\nstring and returns a new string. Changes to the original string or the returned string\ndon't affect the other.\n\nIf the arguments are not of the type string, they are converted to string values before\nconcatenating.\n\nThe `concat()` method is very similar to the [addition/string concatenation operators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Addition) (`+`, `+=`), except that `concat()` [coerces its arguments directly to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion), while addition coerces its operands to primitives first. For more information, see the reference page for the [`+` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Addition).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/String/prototype/endsWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.endsWith()\n\nThe **`endsWith()`** method determines whether a string ends with the characters of a specified string, returning `true` or `false` as appropriate.\n\n## Syntax\n\n```js\nendsWith(searchString)\nendsWith(searchString, endPosition)\n```\n\n### Parameters\n\n- `searchString`\n  - : The characters to be searched for at the end of `str`. Cannot be a regex.\n- `endPosition` _**optional**_\n  - : The end position at which `searchString` is expected to be found (the index of `searchString`'s last character plus 1). Defaults to `str.length`.\n\n### Return value\n\n**`true`** if the given characters are found at the end of the string; otherwise, **`false`**.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If `searchString` is a regex.\n\n## Description\n\nThis method lets you determine whether or not a string ends with another string. This method is case-sensitive.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/String/prototype/includes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.includes()\n\nThe **`includes()`** method performs a case-sensitive search to determine whether one string may be found within another string, returning `true` or `false` as appropriate.\n\n## Syntax\n\n```js\nincludes(searchString)\nincludes(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n  - : A string to be searched for within `str`. Cannot be a regex.\n- `position` _**optional**_\n  - : The position within the string at which to begin searching for `searchString`. (Defaults to `0`.)\n\n### Return value\n\n**`true`** if the search string is found anywhere within the given string; otherwise, **`false`** if not.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If `searchString` is a regex.\n\n## Description\n\nThis method lets you determine whether or not a string includes another string.\n\n### Case-sensitivity\n\nThe `includes()` method is case sensitive. For example, the following expression returns `false`:\n\n```js\n\"Blue Whale\".includes(\"blue\"); // returns false\n```\n\nYou can work around this constraint by transforming both the original string and the search string to all lowercase:\n\n```js\n\"Blue Whale\".toLowerCase().includes(\"blue\"); // returns true\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/String/prototype/indexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.indexOf()\n\nThe **`indexOf()`** method, given one argument: a substring to search for, searches the entire calling string, and returns the index of the first occurrence of the specified substring. Given a second argument: a number, the method returns the first occurrence of the specified substring at an index greater than or equal to the specified number.\n\n## Syntax\n\n```js\nindexOf(searchString)\nindexOf(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n\n  - : Substring to search for, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion).\n\n    If the method is called with no arguments, `searchString` is coerced to `\"undefined\"`. Therefore,`\"undefined\".indexOf()` returns `0` — because the substring `\"undefined\"` is found at position `0` in the string `\"undefined\"`. But `\"undefine\".indexOf()`, returns `-1` — because the substring `\"undefined\"` is not found in the string `\"undefine\"`.\n\n- `position` _**optional**_\n\n  - : The method returns the index of the first occurrence of the specified substring at a position greater than or equal to `position`, which defaults to `0`. If `position` is greater than the length of the calling string, the method doesn't search the calling string at all. If `position` is less than zero, the method behaves as it would if `position` were `0`.\n\n    - `'hello world hello'.indexOf('o', -5)` returns `4` — because it causes the method to behave as if the second argument were `0`, and the first occurrence of `o` at a position greater or equal to `0` is at position `4`.\n\n    - `'hello world hello'.indexOf('world', 12)` returns `-1` — because, while it's true the substring `world` occurs at index `6`, that position is not greater than or equal to `12`.\n\n    - `'hello world hello'.indexOf('o', 99)` returns `-1` — because `99` is greater than the length of `hello world hello`, which causes the method to not search the string at all.\n\n### Return value\n\nThe index of the first occurrence of `searchString` found, or `-1` if not found.\n\n#### Return value when using an empty search string\n\nSearching for an empty search string produces strange results. With no second argument, or with a second argument whose value is less than the calling string's length, the return value is the same as the value of the second argument:\n\n```js\n\"hello world\".indexOf(\"\"); // returns 0\n\"hello world\".indexOf(\"\", 0); // returns 0\n\"hello world\".indexOf(\"\", 3); // returns 3\n\"hello world\".indexOf(\"\", 8); // returns 8\n```\n\nHowever, with a second argument whose value is greater than or equal to the string's length, the return value is the string's length:\n\n```js\n\"hello world\".indexOf(\"\", 11); // returns 11\n\"hello world\".indexOf(\"\", 13); // returns 11\n\"hello world\".indexOf(\"\", 22); // returns 11\n```\n\nIn the former instance, the method behaves as if it found an empty string just after the position specified in the second argument. In the latter instance, the method behaves as if it found an empty string at the end of the calling string.\n\n## Description\n\nStrings are zero-indexed: The index of a string's first character is `0`, and the index of a string's last character is the length of the string minus 1.\n\n```js\n\"Blue Whale\".indexOf(\"Blue\"); // returns  0\n\"Blue Whale\".indexOf(\"Blute\"); // returns -1\n\"Blue Whale\".indexOf(\"Whale\", 0); // returns  5\n\"Blue Whale\".indexOf(\"Whale\", 5); // returns  5\n\"Blue Whale\".indexOf(\"Whale\", 7); // returns -1\n\"Blue Whale\".indexOf(\"\"); // returns  0\n\"Blue Whale\".indexOf(\"\", 9); // returns  9\n\"Blue Whale\".indexOf(\"\", 10); // returns 10\n\"Blue Whale\".indexOf(\"\", 11); // returns 10\n```\n\nThe `indexOf()` method is case sensitive. For example, the following\nexpression returns `-1`:\n\n```js\n\"Blue Whale\".indexOf(\"blue\"); // returns -1\n```\n\n### Checking occurrences\n\nWhen checking if a specific substring occurs within a string, the correct way to check is test whether the return value is `-1`:\n\n```js\n\"Blue Whale\".indexOf(\"Blue\") !== -1; // true; found 'Blue' in 'Blue Whale'\n\"Blue Whale\".indexOf(\"Bloe\") !== -1; // false; no 'Bloe' in 'Blue Whale'\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/String/prototype/lastIndexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.lastIndexOf()\n\nThe **`lastIndexOf()`** method, given one argument: a substring to search for, searches the entire calling string, and returns the index of the last occurrence of the specified substring. Given a second argument: a number, the method returns the last occurrence of the specified substring at an index less than or equal to the specified number.\n\n## Syntax\n\n```js\nlastIndexOf(searchString)\nlastIndexOf(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n\n  - : Substring to search for, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion).\n\n    If the method is called with no arguments, `searchString` is coerced to `\"undefined\"`. Therefore,`\"undefined\".lastIndexOf()` returns `0` — because the substring `\"undefined\"` is found at position `0` in the string `\"undefined\"`. But `\"undefine\".lastIndexOf()`, returns `-1` — because the substring `\"undefined\"` is not found in the string `\"undefine\"`.\n\n- `position` _**optional**_\n\n  - : The method returns the index of the last occurrence of the specified substring at a position less than or equal to `position`, which defaults to `+Infinity`. If `position` is greater than the length of the calling string, the method searches the entire string. If `position` is less than `0`, the behavior is the same as for `0` — that is, the method looks for the specified substring only at index `0`.\n\n    - `'hello world hello'.lastIndexOf('world', 4)` returns `-1` — because, while the substring `world` does occurs at index `6`, that position is not less than or equal to `4`.\n\n    - `'hello world hello'.lastIndexOf('hello', 99)` returns `12` — because the last occurrence of `hello` at a position less than or equal to `99` is at position `12`.\n\n    - `'hello world hello'.lastIndexOf('hello', 0)` and `'hello world hello'.lastIndexOf('hello', -5)` both return `0` — because both cause the method to only look for `hello` at index `0`.\n\n### Return value\n\nThe index of the last occurrence of `searchString` found, or `-1` if not found.\n\n## Description\n\nStrings are zero-indexed: The index of a string's first character is `0`, and the index of a string's last character is the length of the string minus 1.\n\n```js\n\"canal\".lastIndexOf(\"a\"); // returns 3\n\"canal\".lastIndexOf(\"a\", 2); // returns 1\n\"canal\".lastIndexOf(\"a\", 0); // returns -1\n\"canal\".lastIndexOf(\"x\"); // returns -1\n\"canal\".lastIndexOf(\"c\", -5); // returns 0\n\"canal\".lastIndexOf(\"c\", 0); // returns 0\n\"canal\".lastIndexOf(\"\"); // returns 5\n\"canal\".lastIndexOf(\"\", 2); // returns 2\n```\n\n### Case-sensitivity\n\nThe `lastIndexOf()` method is case sensitive. For example, the following\nexpression returns `-1`:\n\n```js\n\"Blue Whale, Killer Whale\".lastIndexOf(\"blue\"); // returns -1\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/String/prototype/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.length\n\nThe **`length`** data property of a string contains the length of the string in UTF-16 code units.\n\n## Value\n\nA non-negative integer.\n\n## Description\n\nThis property returns the number of code units in the string. JavaScript uses [UTF-16](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters) encoding, where each Unicode character may be encoded as one or two code units, so it's possible for the value returned by `length` to not match the actual number of Unicode characters in the string. For common scripts like Latin, Cyrillic, wellknown CJK characters, etc., this should not be an issue, but if you are working with certain scripts, such as emojis, [mathematical symbols](https://en.wikipedia.org/wiki/Mathematical_Alphanumeric_Symbols), or obscure Chinese characters, you may need to account for the difference between code units and characters.\n\nThe language specification requires strings to have a maximum length of 2<sup>53</sup> - 1 elements, which is the upper limit for [precise integers](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER). However, a string with this length needs 16384TiB of storage, which cannot fit in any reasonable device's memory, so implementations tend to lower the threshold, which allows the string's length to be conveniently stored in a 32-bit integer.\n\n- In V8 (used by Chrome and Node), the maximum length is 2<sup>29</sup> - 24 (\\~1GiB). On 32-bit systems, the maximum length is 2<sup>28</sup> - 16 (\\~512MiB).\n- In Firefox, the maximum length is 2<sup>30</sup> - 2 (\\~2GiB). Before Firefox 65, the maximum length was 2<sup>28</sup> - 1 (\\~512MiB).\n- In Safari, the maximum length is 2<sup>31</sup> - 1 (\\~4GiB).\n\nFor an empty string, `length` is 0.\n\nThe static property `String.length` is unrelated to the length of strings. It's the [arity](../../../globals/Function/prototype/length.mdx) of the `String` function (loosely, the number of formal parameters it has), which is 1.\n\nSince `length` counts code units instead of characters, if you want to get the number of characters, you can first split the string with its [iterator](../../../globals/String/prototype/@@iterator.mdx), which iterates by characters:\n\n```js\nfunction getCharacterLength(str) {\n  // The string iterator that is used here iterates over characters,\n  // not mere code units\n  return [...str].length;\n}\n\nconsole.log(getCharacterLength(\"A\\uD87E\\uDC04Z\")); // 3\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/String/prototype/localeCompare.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.localeCompare()\n\nThe **`localeCompare()`** method returns a number indicating whether a reference string comes before, or after, or is the same as the given string in sort order. In implementations with [`Intl.Collator` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator) support, this method simply calls `Intl.Collator`.\n\n## Syntax\n\n```js\nlocaleCompare(compareString)\nlocaleCompare(compareString, locales)\nlocaleCompare(compareString, locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` parameters customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.Collator` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator), these parameters correspond exactly to the [`Intl.Collator()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator) constructor's parameters. Implementations without `Intl.Collator` support are asked to ignore both parameters, making the comparison result returned entirely implementation-dependent — it's only required to be _consistent_.\n\n- `compareString`\n  - : The string against which the `referenceStr` is compared.\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator#locales) parameter of the `Intl.Collator()` constructor.\n\n    In implementations without `Intl.Collator` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator#options) parameter of the `Intl.Collator()` constructor.\n\n    In implementations without `Intl.Collator` support, this parameter is ignored.\n\nSee the [`Intl.Collator()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator) for details on the `locales` and `options` parameters and how to use them.\n\n### Return value\n\nA **negative** number if `referenceStr` occurs before `compareString`; **positive** if the `referenceStr` occurs after `compareString`; `0` if they are equivalent.\n\nIn implementations with `Intl.Collator`, this is equivalent to `new Intl.Collator(locales, options).compare(referenceStr, compareString)`.\n\n## Description\n\nReturns an integer indicating whether the `referenceStr` comes\nbefore, after or is equivalent to the `compareString`.\n\n- Negative when the `referenceStr` occurs before\n  `compareString`\n- Positive when the `referenceStr` occurs after\n  `compareString`\n- Returns `0` if they are equivalent\n\n> **Warning:** Do not rely on exact return values of `-1` or `1`!\n>\n> Negative and positive integer results vary between browsers (as well as between\n> browser versions) because the W3C specification only mandates negative and positive\n> values. Some browsers may return `-2` or `2`, or even some other\n> negative or positive value.\n\n## Performance\n\nWhen comparing large numbers of strings, such as in sorting large arrays, it is better to create an [`Intl.Collator`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator) object and use the function provided by its [`compare()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/compare) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/String/prototype/match.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.match()\n\nThe **`match()`** method retrieves the result of matching a string against a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions).\n\n## Syntax\n\n```js\nmatch(regexp)\n```\n\n### Parameters\n\n- `regexp`\n\n  - : A regular expression object, or any object that has a [`Symbol.match`](../../../globals/Symbol/match.mdx) method.\n\n    If `regexp` is not a `RegExp` object and does not have a `Symbol.match` method, it is implicitly converted to a `RegExp` by using `new RegExp(regexp)`.\n\n    If you don't give any parameter and use the `match()` method directly, you will get an `Array` with an empty string: `[\"\"]`, because this is equivalent to `match(/(?:)/)`.\n\n### Return value\n\nAn `Array` whose contents depend on the presence or absence of the global (`g`) flag, or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) if no matches are found.\n\n- If the `g` flag is used, all results matching the complete regular expression will be returned, but capturing groups are not included.\n- If the `g` flag is not used, only the first complete match and its related capturing groups are returned. In this case, `match()` will return the same result as `RegExp.prototype.exec()` (an array with some extra properties).\n\n## Description\n\nThe implementation of `String.prototype.match` itself is very simple — it simply calls the `Symbol.match` method of the argument with the string as the first parameter. The actual implementation comes from [`RegExp.prototype[@@match]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@match).\n\n- If you need to know if a string matches a regular expression `RegExp`, use `RegExp.prototype.test()`.\n- If you only want the first match found, you might want to use `RegExp.prototype.exec()` instead.\n- If you want to obtain capture groups and the global flag is set, you need to use `RegExp.prototype.exec()` or [`String.prototype.matchAll()`](../../../globals/String/prototype/matchAll.mdx) instead.\n\nFor more information about the semantics of `match()` when a regex is passed, see [`RegExp.prototype[@@match]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@match).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/String/prototype/matchAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.matchAll()\n\nThe **`matchAll()`** method returns an iterator of all results matching a string against a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions), including [capturing groups](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions/Groups_and_Backreferences).\n\n## Syntax\n\n```js\nmatchAll(regexp)\n```\n\n### Parameters\n\n- `regexp`\n\n  - : A regular expression object, or any object that has a [`Symbol.matchAll`](../../../globals/Symbol/matchAll.mdx) method.\n\n    If `regexp` is not a `RegExp` object and does not have a `Symbol.matchAll` method, it is implicitly converted to a `RegExp` by using `new RegExp(regexp, 'g')`.\n\n    If `regexp` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes), then it must have the global (`g`) flag set, or a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Return value\n\nAn [iterable iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators) (which is not restartable) of matches. Each match is an array with the same shape as the return value of `RegExp.prototype.exec()`.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown if the `regexp` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes) that does not have the global (`g`) flag set (its [`flags`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/flags) property does not contain `\"g\"`).\n\n## Description\n\nThe implementation of `String.prototype.matchAll` itself is very simple — it simply calls the `Symbol.matchAll` method of the argument with the string as the first parameter (apart from the extra input validation that the regex is global). The actual implementation comes from [`RegExp.prototype[@@matchAll]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@matchAll).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/String/prototype/padEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.padEnd()\n\nThe **`padEnd()`** method pads the current string with a given\nstring (repeated, if needed) so that the resulting string reaches a given length. The\npadding is applied from the end of the current string.\n\n## Syntax\n\n```js\npadEnd(targetLength)\npadEnd(targetLength, padString)\n```\n\n### Parameters\n\n- `targetLength`\n  - : The length of the resulting string once the current `str` has\n    been padded. If the value is lower than `str.length`, the\n    current string will be returned as-is.\n- `padString` _**optional**_\n  - : The string to pad the current `str` with. If\n    `padString` is too long to stay within\n    `targetLength`, it will be truncated: for left-to-right\n    languages the left-most part and for right-to-left languages the right-most will be\n    applied. The default value for this parameter is \" \"\n    (`U+0020`).\n\n### Return value\n\nA `String` of the specified `targetLength` with the\n`padString` applied at the end of the current\n`str`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/String/prototype/padStart.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.padStart()\n\nThe **`padStart()`** method pads the\ncurrent string with another string (multiple times, if needed) until the resulting\nstring reaches the given length. The padding is applied from the start of the\ncurrent string.\n\n## Syntax\n\n```js\npadStart(targetLength)\npadStart(targetLength, padString)\n```\n\n### Parameters\n\n- `targetLength`\n  - : The length of the resulting string once the current `str` has\n    been padded. If the value is less than `str.length`, then\n    `str` is returned as-is.\n- `padString` _**optional**_\n  - : The string to pad the current `str` with. If\n    `padString` is too long to stay within the\n    `targetLength`, it will be truncated from the end.\n    The default value is the unicode \"space\" character (U+0020).\n\n### Return value\n\nA `String` of the specified `targetLength` with\n`padString` applied from the start.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/String/prototype/repeat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.repeat()\n\nThe **`repeat()`** method constructs and returns a new string\nwhich contains the specified number of copies of the string on which it was called,\nconcatenated together.\n\n## Syntax\n\n```js\nrepeat(count)\n```\n\n### Parameters\n\n- `count`\n  - : An integer between `0` and\n    [`+Infinity`](../../../globals/Number/POSITIVE_INFINITY.mdx), indicating the\n    number of times to repeat the string.\n\n### Return value\n\nA new string containing the specified number of copies of the given string.\n\n### Exceptions\n\n- Throws a `RangeError` if repeat count is negative.\n- Throws a `RangeError` if repeat count is infinity or overflows maximum string size.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/String/prototype/replace.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.replace()\n\nThe **`replace()`** method returns a new string with one, some, or all matches of a `pattern` replaced by a `replacement`. The `pattern` can be a string or a `RegExp`, and the `replacement` can be a string or a function called for each match. If `pattern` is a string, only the first occurrence will be replaced. The original string is left unchanged.\n\n## Syntax\n\n```js\nreplace(pattern, replacement)\n```\n\n### Parameters\n\n- `pattern`\n  - : Can be a string or an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method — the typical example being a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp). Any value that doesn't have the `Symbol.replace` method will be coerced to a string.\n- `replacement`\n  - : Can be a string or a function.\n    - If it's a string, it will replace the substring matched by `pattern`. A number of special replacement patterns are supported; see the [Specifying a string as the replacement](#specifying-a-string-as-the-replacement) section below.\n    - If it's a function, it will be invoked for every match and its return value is used as the replacement text. The arguments supplied to this function are described in the [Specifying a function as the replacement](#specifying-a-function-as-the-replacement) section below.\n\n### Return value\n\nA new string, with one, some, or all matches of the pattern replaced by the specified replacement.\n\n## Description\n\nThis method does not mutate the string value it's called on. It returns a new string.\n\nA string pattern will only be replaced once. To perform a global search and replace, use a regular expression with the `g` flag, or use [`replaceAll()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/replaceAll) instead.\n\nIf `pattern` is an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method (including `RegExp` objects), that method is called with the target string and `replacement` as arguments. Its return value becomes the return value of `replace()`. In this case the behavior of `replace()` is entirely encoded by the `@@replace` method — for example, any mention of \"capturing groups\" in the description below is actually functionality provided by [`RegExp.prototype[@@replace]`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@replace).\n\nIf the `pattern` is an empty string, the replacement is prepended to the start of the string.\n\n```js\n\"xxx\".replace(\"\", \"_\"); // \"_xxx\"\n```\n\nA regexp with the `g` flag is the only case where `replace()` replaces more than once. For more information about how regex properties (especially the [sticky](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky) flag) interact with `replace()`, see [`RegExp.prototype[@@replace]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@replace).\n\n### Specifying a string as the replacement\n\nThe replacement string can include the following special replacement patterns:\n\n| Pattern   | Inserts                                                                                        |\n| --------- | ---------------------------------------------------------------------------------------------- |\n| `$$`      | Inserts a `\"$\"`.                                                                               |\n| `$&`      | Inserts the matched substring.                                                                 |\n| `` $` ``  | Inserts the portion of the string that precedes the matched substring.                         |\n| `$'`      | Inserts the portion of the string that follows the matched substring.                          |\n| `$n`      | Inserts the `n`th (`1`-indexed) capturing group where `n` is a positive integer less than 100. |\n| `$<Name>` | Inserts the named capturing group where `Name` is the group name.                              |\n\n`$n` and `$<Name>` are only available if the `pattern` argument is a `RegExp` object. If the `pattern` is a string, or if the corresponding capturing group isn't present in the regex, then the pattern will be replaced as a literal. If the group is present but isn't matched (because it's part of a disjunction), it will be replaced with an empty string.\n\n```js\n\"foo\".replace(/(f)/, \"$2\");\n// \"$2oo\"; the regex doesn't have the second group\n\n\"foo\".replace(\"f\", \"$1\");\n// \"$1oo\"; the pattern is a string, so it doesn't have any groups\n\n\"foo\".replace(/(f)|(g)/, \"$2\");\n// \"oo\"; the second group exists but isn't matched\n```\n\n### Specifying a function as the replacement\n\nYou can specify a function as the second parameter. In this case, the function will be invoked after the match has been performed. The function's result (return value) will be used as the replacement string.\n\n> **Note:** The above-mentioned special replacement patterns do _not_ apply for strings returned from the replacer function.\n\nThe function has the following signature:\n\n```js\nfunction replacer(match, p1, p2, /* …, */ pN, offset, string, groups) {\n  return replacement;\n}\n```\n\nThe arguments to the function are as follows:\n\n- `match`\n  - : The matched substring. (Corresponds to `$&` above.)\n- `p1, p2, …, pN`\n  - : The `n`th string found by a capture group (including named capturing groups), provided the first argument to `replace()` is a `RegExp` object. (Corresponds to `$1`, `$2`, etc. above.) For example, if the `pattern` is `/(\\a+)(\\b+)/`, then `p1` is the match for `\\a+`, and `p2` is the match for `\\b+`. If the group is part of a disjunction (e.g. `\"abc\".replace(/(a)|(b)/, replacer)`), the unmatched alternative will be `undefined`.\n- `offset`\n  - : The offset of the matched substring within the whole string being examined. For example, if the whole string was `'abcd'`, and the matched substring was `'bc'`, then this argument will be `1`.\n- `string`\n  - : The whole string being examined.\n- `groups`\n  - : An object whose keys are the used group names, and whose values are the matched portions (`undefined` if not matched). Only present if the `pattern` contains at least one named capturing group.\n\nThe exact number of arguments depends on whether the first argument is a `RegExp` object — and, if so, how many capture groups it has.\n\nThe following example will set `newString` to `'abc - 12345 - #$*%'`:\n\n```js\nfunction replacer(match, p1, p2, p3, offset, string) {\n  // p1 is non-digits, p2 digits, and p3 non-alphanumerics\n  return [p1, p2, p3].join(\" - \");\n}\nconst newString = \"abc12345#$*%\".replace(/([^\\d]*)(\\d*)([^\\w]*)/, replacer);\nconsole.log(newString); // abc - 12345 - #$*%\n```\n\nThe function will be invoked multiple times for each full match to be replaced if the regular expression in the first parameter is global.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/String/prototype/replaceAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.replaceAll()\n\nThe **`replaceAll()`** method returns a new string with all matches of a `pattern` replaced by a `replacement`. The `pattern` can be a string or a `RegExp`, and the `replacement` can be a string or a function to be called for each match. The original string is left unchanged.\n\n## Syntax\n\n```js\nreplaceAll(pattern, replacement)\n```\n\n### Parameters\n\n- `pattern`\n\n  - : Can be a string or an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method — the typical example being a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp). Any value that doesn't have the `Symbol.replace` method will be coerced to a string.\n\n    If `pattern` is a regex, then it must have the global (`g`) flag set, or a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n- `replacement`\n  - : Can be a string or a function. The replacement has the same semantics as that of [`String.prototype.replace()`](../../../globals/String/prototype/replace.mdx).\n\n### Return value\n\nA new string, with all matches of a pattern replaced by a replacement.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown if the `pattern` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes) that does not have the global (`g`) flag set (its [`flags`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/flags) property does not contain `\"g\"`).\n\n## Description\n\nThis method does not mutate the string value it's called on. It returns a new string.\n\nUnlike [`String.prototype.replace()`](../../../globals/String/prototype/replace.mdx), this method would replace all occurrences of a string, not just the first one. This is especially useful if the string is not statically known, as calling the [`RegExp()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/RegExp) constructor without escaping special characters may unintentionally change its semantics.\n\n```js\nfunction unsafeRedactName(text, name) {\n  return text.replace(new RegExp(name, \"g\"), \"[REDACTED]\");\n}\nfunction safeRedactName(text, name) {\n  return text.replaceAll(name, \"[REDACTED]\");\n}\n\nconst report =\n  \"A hacker called ha.*er used special characters in their name to breach the system.\";\n\nconsole.log(unsafeRedactName(report, \"ha.*er\")); // \"A [REDACTED]s in their name to breach the system.\"\nconsole.log(safeRedactName(report, \"ha.*er\")); // \"A hacker called [REDACTED] used special characters in their name to breach the system.\"\n```\n\nIf `pattern` is an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method (including `RegExp` objects), that method is called with the target string and `replacement` as arguments. Its return value becomes the return value of `replaceAll()`. In this case the behavior of `replaceAll()` is entirely encoded by the `Symbol.replace` method, and therefore will have the same result as `replace()` (apart from the extra input validation that the regex is global).\n\nIf the `pattern` is an empty string, the replacement will be inserted in between every UTF-16 code unit, similar to [`String.prototype.split()`](../../../globals/String/prototype/split.mdx) behavior.\n\n```js\n\"xxx\".replaceAll(\"\", \"_\"); // \"_x_x_x_\"\n```\n\nFor more information about how regex properties (especially the [sticky](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky) flag) interact with `replaceAll()`, see [`RegExp.prototype[@@replace]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@replace).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/String/prototype/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.search()\n\nThe **`search()`** method executes a search for a match between a regular expression and this `String` object.\n\n## Syntax\n\n```js\nsearch(regexp)\n```\n\n### Parameters\n\n- `regexp`\n\n  - : A regular expression object, or any object that has a [`Symbol.search`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/search) method.\n\n    If `regexp` is not a `RegExp` object and does not have a `Symbol.search` method, it is implicitly converted to a `RegExp` by using `new RegExp(regexp)`.\n\n### Return value\n\nThe index of the first match between the regular expression and the given string, or `-1` if no match was found.\n\n## Description\n\nThe implementation of `String.prototype.search()` itself is very simple — it simply calls the `Symbol.search` method of the argument with the string as the first parameter. The actual implementation comes from [`RegExp.prototype[@@search]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@search).\n\nThe `g` flag of `regexp` has no effect on the `search()` result, and the search always happens as if the regex's `lastIndex` is 0. For more information on the behavior of `search()`, see [`RegExp.prototype[@@search]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@search).\n\nWhen you want to know whether a pattern is found, and _also_ know its index within a string, use `search()`.\n\n- If you only want to know if it exists, use the `RegExp.prototype.test()` method, which returns a boolean.\n- If you need the content of the matched text, use `String.prototype.match()` or `RegExp.prototype.exec()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/String/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.slice()\n\nThe **`slice()`** method extracts a section of a string and\nreturns it as a new string, without modifying the original string.\n\n## Syntax\n\n```js\nslice(indexStart)\nslice(indexStart, indexEnd)\n```\n\n### Parameters\n\n- `indexStart`\n  - : The index of the first character to include in the returned substring.\n- `indexEnd` _**optional**_\n  - : The index of the first character to exclude from the returned substring.\n\n### Return value\n\nA new string containing the extracted section of the string.\n\n## Description\n\n`slice()` extracts the text from one string and returns a new string. Changes to the text in one string do not affect the other string.\n\n`slice()` extracts up to but not including `indexEnd`. For example, `str.slice(1, 4)` extracts the second character through the fourth character (characters indexed `1`, `2`, and `3`).\n\n- If `indexStart >= str.length`, an empty string is returned.\n- If `indexStart < 0`, the index is counted from the end of the string. More formally, in this case, the substring starts at `max(indexStart + str.length, 0)`.\n- If `indexStart` is omitted, undefined, or cannot be converted to a number (using [`Number()`](../../../globals/Number/Number.mdx)), it's treated as `0`.\n- If `indexEnd` is omitted, undefined, or cannot be converted to a number (using [`Number()`](../../../globals/Number/Number.mdx)), or if `indexEnd >= str.length`, `slice()` extracts to the end of the string.\n- If `indexEnd < 0`, the index is counted from the end of the string. More formally, in this case, the substring ends at `max(indexEnd + str.length, 0)`.\n- If `indexEnd <= indexStart` after normalizing negative values (i.e. `indexEnd` represents a character that's before `indexStart`), an empty string is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/String/prototype/split.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.split()\n\nThe **`split()`** method takes a pattern and divides a `String` into an ordered list of substrings by searching for the pattern, puts these substrings into an array, and returns the array.\n\n## Syntax\n\n```js\nsplit()\nsplit(separator)\nsplit(separator, limit)\n```\n\n### Parameters\n\n- `separator` _**optional**_\n  - : The pattern describing where each split should occur. Can be a string or an object with a [`Symbol.split`](../../../globals/Symbol/split.mdx) method — the typical example being a regular expression. If undefined, the original target string is returned wrapped in an array.\n- `limit` _**optional**_\n  - : A non-negative integer specifying a limit on the number of substrings to be included in the array. If provided, splits the string at each occurrence of the specified `separator`, but stops when `limit` entries have been placed in the array. Any leftover text is not included in the array at all.\n    - The array may contain fewer entries than `limit` if the end of the string is reached before the limit is reached.\n    - If `limit` is `0`, `[]` is returned.\n\n### Return value\n\nAn `Array` of strings, split at each point where the `separator` occurs in the given string.\n\n## Description\n\nIf `separator` is a non-empty string, the target string is split by all matches of the `separator` without including `separator` in the results. For example, a string containing tab separated values (TSV) could be parsed by passing a tab character as the separator, like `myString.split(\"\\t\")`. If `separator` contains multiple characters, that entire character sequence must be found in order to split. If `separator` appears at the beginning (or end) of the string, it still has the effect of splitting, resulting in an empty (i.e. zero length) string appearing at the first (or last) position of the returned array. If `separator` does not occur in `str`, the returned array contains one element consisting of the entire string.\n\nIf `separator` is an empty string (`\"\"`), `str` is converted to an array of each of its UTF-16 \"characters\", without empty strings on either ends of the resulting string.\n\n> **Note:** `\"\".split(\"\")` is therefore the only way to produce an empty array when a string is passed as `separator`.\n\n> **Warning:** When the empty string (`\"\"`) is used as a separator, the string is **not** split by _user-perceived characters_ ([grapheme clusters](https://unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries)) or unicode characters (codepoints), but by UTF-16 codeunits. This destroys [surrogate pairs](https://unicode.org/faq/utf_bom.html#utf16-2). See [\"How do you get a string to a character array in JavaScript?\" on StackOverflow](https://stackoverflow.com/questions/4547609/how-to-get-character-array-from-a-string/34717402#34717402).\n\nIf `separator` is a regexp that matches empty strings, whether the match is split by UTF-16 code units or Unicode codepoints depends on if the [`u`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/unicode) flag is set.\n\n```js\n\"😄😄\".split(/(?:)/); // [ \"\\ud83d\", \"\\ude04\", \"\\ud83d\", \"\\ude04\" ]\n\"😄😄\".split(/(?:)/u); // [ \"😄\", \"😄\" ]\n```\n\nIf `separator` is a regular expression with capturing groups, then each time `separator` matches, the captured groups (including any `undefined` results) are spliced into the output array. This behavior is specified by the regexp's [`Symbol.split`](../../../globals/Symbol/split.mdx) method.\n\nIf `separator` is an object with a [`Symbol.split`](../../../globals/Symbol/split.mdx) method, that method is called with the target string and `limit` as arguments, and `this` set to the object. Its return value becomes the return value of `split`.\n\nAny other value will be coerced to a string before being used as separator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/String/prototype/startsWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.startsWith()\n\nThe **`startsWith()`** method determines whether a string begins with the characters of a specified string, returning `true` or `false` as appropriate.\n\n## Syntax\n\n```js\nstartsWith(searchString)\nstartsWith(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n  - : The characters to be searched for at the start of this string. Cannot be a regex.\n- `position` _**optional**_\n  - : The start position at which `searchString` is expected to be found (the index of `searchString`'s first character). Defaults to `0`.\n\n### Return value\n\n**`true`** if the given characters are found at the beginning of the string; otherwise, **`false`**.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If `searchString` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes).\n\n## Description\n\nThis method lets you determine whether or not a string begins with another string. This method is case-sensitive.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/String/prototype/substr.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.substr()\n\nThe **`substr()`** method returns a portion of the string, starting at the specified index and extending for a given number of characters afterwards.\n\n> **Note:** `substr()` is not part of the main ECMAScript specification — it's defined in [Annex B: Additional ECMAScript Features for Web Browsers](https://tc39.es/ecma262/#sec-additional-ecmascript-features-for-web-browsers), which is normative optional for non-browser runtimes. Therefore, people are advised to use the standard [`String.prototype.substring()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/substring) and [`String.prototype.slice()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/slice) methods instead to make their code maximally cross-platform friendly. The [`String.prototype.substring()` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/substring#the_difference_between_substring_and_substr) has some comparisons between the three methods.\n\n\n\n## Syntax\n\n```js\nsubstr(start)\nsubstr(start, length)\n```\n\n### Parameters\n\n- `start`\n  - : The index of the first character to include in the returned substring.\n- `length` _**optional**_\n  - : The number of characters to extract.\n\n### Return value\n\nA new string containing the specified part of the given string.\n\n## Description\n\nA string's `substr()` method extracts `length` characters from the string, counting from the `start` index.\n\n- If `start >= str.length`, an empty string is returned.\n- If `start < 0`, the index starts counting from the end of the string. More formally, in this case the substring starts at `max(start + str.length, 0)`.\n- If `start` is omitted or [`undefined`](../../../globals/undefined.mdx), it's treated as `0`.\n- If `length` is omitted or [`undefined`](../../../globals/undefined.mdx), or if `start + length >= str.length`, `substr()` extracts characters to the end of the string.\n- If `length < 0`, an empty string is returned.\n- For both `start` and `length`, [`NaN`](../../../globals/NaN.mdx) is treated as `0`.\n\nAlthough you are encouraged to avoid using `substr()`, there is no trivial way to migrate `substr()` to either `slice()` or `substring()` in legacy code without essentially writing a polyfill for `substr()`. For example, `str.substr(a, l)`, `str.slice(a, a + l)`, and `str.substring(a, a + l)` all have different results when `str = \"01234\", a = 1, l = -2` — `substr()` returns an empty string, `slice()` returns `\"123\"`, while `substring()` returns `\"0\"`. The actual refactoring path depends on the knowledge of the range of `a` and `l`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/String/prototype/substring.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.substring()\n\nThe **`substring()`** method returns the part of the `string` from the start index up to and excluding the end index, or to the end of the string if no end index is supplied.\n\n## Syntax\n\n```js\nsubstring(indexStart)\nsubstring(indexStart, indexEnd)\n```\n\n### Parameters\n\n- `indexStart`\n  - : The index of the first character to include in the returned substring.\n- `indexEnd` _**optional**_\n  - : The index of the first character to exclude from the returned substring.\n\n### Return value\n\nA new string containing the specified part of the given string.\n\n## Description\n\n`substring()` extracts characters from `indexStart` up to _but not including_ `indexEnd`. In particular:\n\n- If `indexEnd` is omitted, `substring()` extracts characters to the end of the string.\n- If `indexStart` is equal to `indexEnd`, `substring()` returns an empty string.\n- If `indexStart` is greater than `indexEnd`, then the effect of `substring()` is as if the two arguments were swapped; see example below.\n\nAny argument value that is less than `0` or greater than `str.length` is treated as if it were `0` and `str.length`, respectively.\n\nAny argument value that is [`NaN`](../../../globals/NaN.mdx) is treated as if it were `0`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/String/prototype/toLocaleLowerCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toLocaleLowerCase()\n\nThe **`toLocaleLowerCase()`** method returns the calling string\nvalue converted to lower case, according to any locale-specific case mappings.\n\n## Syntax\n\n```js\ntoLocaleLowerCase()\ntoLocaleLowerCase(locales)\n```\n\n### Parameters\n\n- `locales` _**optional**_\n  - : A string with a BCP 47 language tag, or an array of such strings. Indicates the locale to be used to convert to lower case according to any locale-specific case mappings. For the general form and interpretation of the `locales` argument, see [Locale identification and negotiation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation).\n\n### Return value\n\nA new string representing the calling string converted to lower case, according to any\nlocale-specific case mappings.\n\n### Exceptions\n\n- A [`RangeError`](../../../globals/RangeError/RangeError.mdx) (\"invalid language tag: xx_yy\") is thrown if a\n  `locale` argument isn't a valid language tag.\n- A [`TypeError`](../../../globals/TypeError/TypeError.mdx) (\"invalid element in locales argument\") is thrown if an\n  array element isn't of type string.\n\n## Description\n\nThe `toLocaleLowerCase()` method returns the value of the string converted\nto lower case according to any locale-specific case mappings.\n`toLocaleLowerCase()` does not affect the value of the string itself. In most\ncases, this will produce the same result as [`String.prototype.toLowerCase()`](../../../globals/String/prototype/toLowerCase.mdx), but for some locales, such as Turkish, whose case mappings do not\nfollow the default case mappings in Unicode, there may be a different result.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/String/prototype/toLocaleUpperCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toLocaleUpperCase()\n\nThe **`toLocaleUpperCase()`** method returns the calling string\nvalue converted to upper case, according to any locale-specific case mappings.\n\n## Syntax\n\n```js\ntoLocaleUpperCase()\ntoLocaleUpperCase(locales)\n```\n\n### Parameters\n\n- `locales` _**optional**_\n  - : A string with a BCP 47 language tag, or an array of such strings. Indicates the locale to be used to convert to upper case according to any locale-specific case mappings. For the general form and interpretation of the `locales` argument, see [Locale identification and negotiation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation).\n\n### Return value\n\nA new string representing the calling string converted to upper case, according to any\nlocale-specific case mappings.\n\n### Exceptions\n\n- A [`RangeError`](../../../globals/RangeError/RangeError.mdx) (\"invalid language tag: xx_yy\") is thrown if a\n  `locale` argument isn't a valid language tag.\n- A [`TypeError`](../../../globals/TypeError/TypeError.mdx) (\"invalid element in locales argument\") is thrown if an\n  array element isn't of type string.\n\n## Description\n\nThe `toLocaleUpperCase()` method returns the value of the string converted\nto upper case according to any locale-specific case mappings.\n`toLocaleUpperCase()` does not affect the value of the string itself. In most\ncases, this will produce the same result as [`String.prototype.toUpperCase()`](../../../globals/String/prototype/toUpperCase.mdx), but for some locales, such as Turkish, whose case mappings do not\nfollow the default case mappings in Unicode, there may be a different result.\n\nAlso notice that conversion is not necessarily a 1:1 character mapping, as some\ncharacters might result in two (or even more) characters when transformed to upper-case.\nTherefore the length of the result string can differ from the input length. This also\nimplies that the conversion is not stable, so i.E. the following can return\n`false`:\n`x.toLocaleLowerCase() === x.toLocaleUpperCase().toLocaleLowerCase()`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/String/prototype/toLowerCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toLowerCase()\n\nThe **`toLowerCase()`** method returns the calling string value\nconverted to lower case.\n\n## Syntax\n\n```js\ntoLowerCase()\n```\n\n### Return value\n\nA new string representing the calling string converted to lower case.\n\n## Description\n\nThe `toLowerCase()` method returns the value of the string converted to\nlower case. `toLowerCase()` does not affect the value of the string\n`str` itself.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/String/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified string value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified string value.\n\n## Description\n\nThe `String` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For `String` values, the `toString` method returns the string itself (if it's a primitive) or the string that the `String` object wraps. It has the exact same implementation as [`String.prototype.valueOf()`](../../../globals/String/prototype/valueOf.mdx).\n\nThe `toString()` method requires its `this` value to be a `String` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to string values.\n\nBecause `String` doesn't have a [`[Symbol.toPrimitive]()`](../../../globals/Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `String` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, String _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — since they are already strings, no conversion is performed.\n\n```js\nString.prototype.toString = () => \"Overridden\";\nconsole.log(`${\"foo\"}`); // \"foo\"\nconsole.log(`${new String(\"foo\")}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/String/prototype/toUpperCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toUpperCase()\n\nThe **`toUpperCase()`** method returns the calling string value\nconverted to uppercase (the value will be converted to a string if it isn't one).\n\n## Syntax\n\n```js\ntoUpperCase()\n```\n\n### Return value\n\nA new string representing the calling string converted to upper case.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : When called on [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../../globals/undefined.mdx), for example,\n    `String.prototype.toUpperCase.call(undefined)`.\n\n## Description\n\nThe `toUpperCase()` method returns the value of the string converted to\nuppercase. This method does not affect the value of the string itself since JavaScript\nstrings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/String/prototype/trim.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.trim()\n\nThe **`trim()`** method removes whitespace from both ends of a string and returns a new string, without modifying the original string.\n\nTo return a new string with whitespace trimmed from just one end, use [`String.prototype.trimStart()`](../../../globals/String/prototype/trimStart.mdx) or [`String.prototype.trimEnd()`](../../../globals/String/prototype/trimEnd.mdx).\n\n## Syntax\n\n```js\ntrim()\n```\n\n### Return value\n\nA new string representing `str` stripped of whitespace from both its beginning and end. Whitespace is defined as [white space](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#white_space) characters plus [line terminators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#line_terminators).\n\nIf neither the beginning or end of `str` has any whitespace, a new string is still returned (essentially a copy of `str`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/String/prototype/trimEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.trimEnd()\n\nThe **`trimEnd()`** method removes whitespace from the end of a string and returns a new string, without modifying the original string. `trimRight()` is an alias of this method.\n\n## Syntax\n\n```js\ntrimEnd()\n\ntrimRight()\n```\n\n### Return value\n\nA new string representing `str` stripped of whitespace from its end (right side). Whitespace is defined as [white space](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#white_space) characters plus [line terminators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#line_terminators).\n\nIf the end of `str` has no whitespace, a new string is still returned (essentially a copy of `str`).\n\n### Aliasing\n\nAfter [`String.prototype.trim()`](../../../globals/String/prototype/trim.mdx) was standardized, engines also implemented the non-standard method `trimRight`. However, for consistency with [`String.prototype.pedEnd()`](../../../globals/String/prototype/trim.mdx), when the method got standardized, its name was chosen as `trimEnd`. For web compatibility reasons, `trimRight` remains as an alias to `trimEnd`, and they refer to the exact same function object. In some engines this means:\n\n```js\nString.prototype.trimRight.name === \"trimEnd\";\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/String/prototype/trimStart.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.trimStart()\n\nThe **`trimStart()`** method removes whitespace from the beginning of a string and returns a new string, without modifying the original string. `trimLeft()` is an alias of this method.\n\n## Syntax\n\n```js\ntrimStart()\n\ntrimLeft()\n```\n\n### Return value\n\nA new string representing `str` stripped of whitespace from its beginning (left side). Whitespace is defined as [white space](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#white_space) characters plus [line terminators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#line_terminators).\n\nIf the beginning of `str` has no whitespace, a new string is still returned (essentially a copy of `str`).\n\n### Aliasing\n\nAfter [`String.prototype.trim()`](../../../globals/String/prototype/trim.mdx) was standardized, engines also implemented the non-standard method `trimLeft`. However, for consistency with [`String.prototype.padEnd()`](../../../globals/String/prototype/padEnd.mdx), when the method got standardized, its name was chosen as `trimStart`. For web compatibility reasons, `trimLeft` remains as an alias to `trimStart`, and they refer to the exact same function object. In some engines this means:\n\n```js\nString.prototype.trimLeft.name === \"trimStart\";\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/String/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a\n`String` object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nA string representing the primitive value of a given `String` object.\n\n## Description\n\nThe `valueOf()` method of `String` returns the primitive value\nof a `String` object as a string data type. This value is equivalent to\n[`String.prototype.toString()`](../../../globals/String/prototype/toString.mdx).\n\nThis method is usually called internally by JavaScript and not explicitly in code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/String/raw.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.raw()\n\nThe static **`String.raw()`** method is a tag function of [template literals](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). This is similar to the `r` prefix in Python, or the `@` prefix in C# for string literals. It's used to get the raw string form of template literals — that is, substitutions (e.g. `${foo}`) are processed, but escape sequences (e.g. `\\n`) are not.\n\n## Syntax\n\n```js\nString.raw(strings, ...substitutions)\n\nString.raw`templateString`\n```\n\n### Parameters\n\n- `strings`\n  - : Well-formed template literal array object, like `{ raw: ['foo', 'bar', 'baz'] }`. Should be an object with a `raw` property whose value is an array-like object of strings.\n- `...substitutions`\n  - : Contains substitution values.\n- `templateString`\n  - : A [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals), optionally with substitutions (`${...}`).\n\n### Return value\n\nThe raw string form of a given template literal.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if the first argument doesn't have a `raw` property, or the `raw` property is `undefined` or `null`.\n\n## Description\n\nIn most cases, `String.raw()` is used with template literals. The first syntax mentioned above is only rarely used, because the JavaScript engine will call this with proper arguments for you, (just like with other [tag functions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals#tagged_templates)).\n\n`String.raw()` is the only built-in template literal tag. It has close semantics to an untagged literal since it concatenates all arguments and returns a string. You can even re-implement it with normal JavaScript code.\n\n> **Warning:** You should not use `String.raw` directly as an \"identity\" tag. See [Building an identity tag](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/raw#building_an_identity_tag) for how to implement this.\n\nIf `String.raw()` is called with an object whose `raw` property doesn't have a `length` property or a non-positive `length`, it returns an empty string `\"\"`. If `substitutions.length < strings.raw.length - 1` (i.e. there are not enough substitutions to fill the placeholders — which can't happen in a well-formed tagged template literal), the rest of the placeholders are filled with empty strings.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/SubtleCrypto/SubtleCrypto.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SubtleCrypto\n\nThe **`SubtleCrypto`** interface provides a number of low-level cryptographic functions. Access to the features of `SubtleCrypto` is obtained through the [`crypto.subtle`](../crypto/subtle.mdx) property.\n\n> **Warning:** This API provides a number of low-level cryptographic primitives. It's very easy to misuse them, and the pitfalls involved can be very subtle.\n>\n> Even assuming you use the basic cryptographic functions correctly, secure key management and overall security system design are extremely hard to get right, and are generally the domain of specialist security experts.\n>\n> Errors in security system design and implementation can make the security of the system completely ineffective.\n>\n> Please learn and experiment, but don't guarantee or imply the security of your work before an individual knowledgeable in this subject matter thoroughly reviews it. The [Crypto 101 Course](https://www.crypto101.io/) can be a great place to start learning about the design and implementation of secure systems.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/SubtleCrypto/prototype/digest.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# digest()\n\nThe **`digest()`** method of the [`SubtleCrypto`](../SubtleCrypto.mdx)\ninterface generates a digest of the given data. A digest is a short\nfixed-length value derived from some variable-length input. Cryptographic digests should\nexhibit collision-resistance, meaning that it's hard to come up with two different\ninputs that have the same digest value.\n\nIt takes as its arguments an identifier for the digest algorithm to use and the data to\ndigest. It returns a [`Promise`](../../Promise/Promise.mdx) which will be fulfilled with the digest.\n\n## Syntax\n\n```js\ndigest(algorithm, data)\n```\n\n### Parameters\n\n- `algorithm`\n  - : This may be a string or an object with a single property `name` that is a string. The string names the hash function to use. Supported values are:\n    - `\"MD5\"` (but don't use this in cryptographic applications)\n    - `\"SHA-1\"` (but don't use this in cryptographic applications)\n    - `\"SHA-256\"`\n    - `\"SHA-384\"`\n    - `\"SHA-512\"`.\n- `data`\n  - : An `ArrayBuffer`, a `TypedArray` or a `DataView` object containing the data to be digested.\n\n### Return value\n\nA [`Promise`](../../Promise/Promise.mdx) that fulfills with an `ArrayBuffer` containing the digest.\n\n## Supported algorithms\n\nDigest algorithms, also known as cryptographic hash functions,\ntransform an arbitrarily large block of data into a fixed-size output,\nusually much shorter than the input. They have a variety of applications in\ncryptography.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/SubtleCrypto/prototype/importKey.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# importKey()\n\nThe **`importKey()`** method of the [`SubtleCrypto`](../SubtleCrypto.mdx)\ninterface imports a key: that is, it takes as input a key in an external, portable\nformat and gives you a [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) object that you can use.\n\nThe function accepts several import formats: see [Supported formats](#supported-formats) for details.\n\n## Syntax\n\n```js\nimportKey(format, keyData, algorithm, extractable, keyUsages)\n```\n\n### Parameters\n\n- `format`\n  - : A string describing the data format of the key to import. It can be one of the following:\n    - `raw`: [Raw](#raw) format.\n    - `jwk`: [JSON Web Key](#json-web-key) format.\n- `keyData`\n  - : An `ArrayBuffer`, a TypedArray, a `DataView`, or a `JSONWebKey` object containing the key in\n    the given format.\n- `algorithm`\n  - : An object defining the type of key to import and providing extra algorithm-specific parameters.\n    - For RSASSA-PKCS1-v1_5:\n      Pass an [`RsaHashedImportParams`](../../RsaHashedImportParams/RsaHashedImportParams.mdx) object.\n    - For HMAC:\n      Pass an [`HmacImportParams`](../../HmacImportParams/HmacImportParams.mdx) object.\n    - For ECDSA:\n      Pass an [`EcKeyImportParams`](../../EcKeyImportParams/EcKeyImportParams.mdx) object.\n- `extractable`\n  - : A boolean value indicating whether it will be possible to export the key.\n- `keyUsages`\n  - : An `Array` indicating what can be done with the key. Possible array values are:\n    - `encrypt`: The key may be used to encrypt messages.\n    - `decrypt`: The key may be used to decrypt messages.\n    - `sign`: The key may be used to sign messages.\n    - `verify`: The key may be used to verify signatures.\n    - `deriveKey`: The key may be used in deriving a new key.\n    - `deriveBits`: The key may be used in deriving bits.\n    - `wrapKey`: The key may be used to wrap a key.\n    - `unwrapKey`: The key may be used to unwrap a key.\n\n### Return value\n\nA [`Promise`](../../Promise/Promise.mdx)\nthat fulfills with the imported key as a [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) object.\n\n### Exceptions\n\nThe promise is rejected when one of the following exceptions is encountered:\n\n- `SyntaxError`\n  - : Raised when `keyUsages` is empty but the unwrapped key is of\n    type `secret` or `private`.\n- `TypeError`\n  - : Raised when trying to use an invalid format or if the `keyData`\n    is not suited for that format.\n\n## Supported formats\n\nThis API currently supports one key import/export format: JSON Web Key.\n\n### Raw\n\nYou can use this format to import or export AES or HMAC secret keys, or Elliptic Curve\npublic keys.\n\nIn this format the key is supplied as an `ArrayBuffer` containing the raw bytes for the key.\n\n\n### JSON Web Key\n\nYou can use JSON Web Key format to import or export RSA or Elliptic Curve public or\nprivate keys, as well as AES and HMAC secret keys.\n\nJSON Web Key format is defined in [RFC 7517](https://datatracker.ietf.org/doc/html/rfc7517).\nIt describes a way to represent public, private, and secret keys as JSON objects.\n\nA JSON Web Key looks something like this (this is an EC private key):\n\n```json\n{\n  \"crv\": \"P-384\",\n  \"d\": \"wouCtU7Nw4E8_7n5C1-xBjB4xqSb_liZhYMsy8MGgxUny6Q8NCoH9xSiviwLFfK_\",\n  \"ext\": true,\n  \"key_ops\": [\"sign\"],\n  \"kty\": \"EC\",\n  \"x\": \"SzrRXmyI8VWFJg1dPUNbFcc9jZvjZEfH7ulKI1UkXAltd7RGWrcfFxqyGPcwu6AQ\",\n  \"y\": \"hHUag3OvDzEr0uUQND4PXHQTXP5IDGdYhJhL-WLKjnGjQAw0rNGy5V29-aV-yseW\"\n};\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/SubtleCrypto/prototype/sign.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# sign()\n\nThe **`sign()`** method of the [`SubtleCrypto`](../SubtleCrypto.mdx) interface generates a digital signature.\n\nIt takes as its arguments a key to sign with, some algorithm-specific\nparameters, and the data to sign. It returns a `Promise` which will be\nfulfilled with the signature.\n\nYou can use the corresponding [`verify()`](./verify.mdx) method to verify the signature.\n\n## Syntax\n\n```js\nsign(algorithm, key, data)\n```\n\n### Parameters\n\n- `algorithm`\n  - : A string or object that specifies the signature algorithm to use and its parameters:\n    - To use [RSASSA-PKCS1-v1_5](#rsassa-pkcs1-v1_5), pass the string `\"RSASSA-PKCS1-v1_5\"` or an object of the form `{ \"name\": \"RSASSA-PKCS1-v1_5\" }`.\n    - To use [HMAC](#hmac), pass the string `\"HMAC\"` or an object of the form `{ \"name\": \"HMAC\" }`.\n- `key`\n  - : A [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) object containing the key to be used for signing.\n    If `algorithm` identifies a public-key cryptosystem, this is the private key.\n- `data`\n  - : An `ArrayBuffer`, a TypedArray or a `DataView` object containing the data to be signed.\n\n### Return value\n\nA `Promise` that fulfills with an `ArrayBuffer` containing the signature.\n\n### Exceptions\n\nThe promise is rejected when the following exception is encountered:\n\n- `InvalidAccessError`\n  - : Raised when the signing key is not a key for the request signing algorithm or when\n    trying to use an algorithm that is either unknown or isn't suitable for signing.\n\n## Supported algorithms\n\n### RSASSA-PKCS1-v1_5\n\nThe RSASSA-PKCS1-v1_5 algorithm is specified in [RFC 3447](https://datatracker.ietf.org/doc/html/rfc3447).\n\n### HMAC\n\nThe HMAC algorithm calculates and verifies hash-based message authentication codes according to the\n[FIPS 198-1 standard](https://csrc.nist.gov/csrc/media/publications/fips/198/1/final/documents/fips-198-1_final.pdf).\n\nThe digest algorithm to use is specified in the\n[`HmacImportParams`](../../HmacImportParams/HmacImportParams.mdx) object\nthat you pass into [`SubtleCrypto.importKey()`](./importKey.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/SubtleCrypto/prototype/verify.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# verify()\n\nThe **`verify()`** method verifies a digital signature.\n\nIt takes as its arguments a key to verify the signature with, some algorithm-specific parameters, the signature, and the original signed data.\nIt returns a `Promise` which will be fulfilled with a boolean value indicating whether the signature is valid.\n\n## Syntax\n\n```js\nverify(algorithm, key, signature, data)\n```\n\n### Parameters\n\n- `algorithm`\n  - : A string or object defining the algorithm to use, and for some algorithm choices, some extra parameters.\n    The values given for the extra parameters must match those passed into the corresponding [`sign()`](./sign.mdx) call.\n    - To use RSASSA-PKCS1-v1_5, pass the string `\"RSASSA-PKCS1-v1_5\"` or an object of the form `{ \"name\": \"RSASSA-PKCS1-v1_5\" }`.\n    - To use HMAC, pass the string `\"HMAC\"` or an object of the form `{ \"name\": \"HMAC\" }`.\n- `key`\n  - : A [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) containing the key that will be used to verify the signature.\n    It is the secret key for a symmetric algorithm and the public key for a public-key system.\n- `signature`\n  - : A `ArrayBuffer` containing the signature to verify.\n- `data`\n  - : A `ArrayBuffer` containing the data whose signature is to be verified.\n\n### Return value\n\nA `Promise` that fulfills with a\nboolean value: `true` if the signature is valid, `false`\notherwise.\n\n### Exceptions\n\nThe promise is rejected when the following exception is encountered:\n\n- `InvalidAccessError`\n  - : Raised when the encryption key is not a key for the requested verifying algorithm or\n    when trying to use an algorithm that is either unknown or isn't suitable for a verify\n    operation.\n\n## Supported algorithms\n\nThe `verify()` method supports the same algorithms as the [`sign()`](./sign.mdx) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Symbol/Symbol.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol()\n\nThe `Symbol()` constructor returns a value of type **symbol**,\nbut is incomplete as a constructor because it does not support the syntax\n\"`new Symbol()`\" and it is not intended to be subclassed. It may be used as\nthe value of an\n[`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends)\nclause of a `class` definition but a\n[`super`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/super)\ncall to it will cause an exception.\n\n## Syntax\n\n```js\nSymbol()\nSymbol(description)\n```\n\n> **Note:** `Symbol()` can only be called without `new`. Attempting to construct it with `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `description` _**optional**_\n  - : A string. A description of the symbol which can be used for debugging but not to\n    access the symbol itself.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Symbol/asyncIterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.asyncIterator\n\nThe **`Symbol.asyncIterator`** well-known symbol specifies the default [async iterator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_async_iterator_and_async_iterable_protocols) for an object. If this property is set on an object, it is an async iterable and can be used in a [`for await...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for-await...of) loop.\n\n## Value\n\nThe well-known symbol `Symbol.asyncIterator`.\n\n## Description\n\nThe `Symbol.asyncIterator` symbol is a builtin symbol that is used to access an object's `Symbol.asyncIterator` method. In order for an object to be async iterable, it must have a `Symbol.asyncIterator` key.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Symbol/for.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.for()\n\nThe **`Symbol.for(key)`** method searches for existing symbols\nin a runtime-wide symbol registry with the given key and returns it if found. Otherwise\na new symbol gets created in the global symbol registry with this key.\n\n## Syntax\n\n```js\nSymbol.for(key)\n```\n\n### Parameters\n\n- `key`\n  - : String, required. The key for the symbol (and also used for the description of the\n    symbol).\n\n### Return value\n\nAn existing symbol with the given key if found; otherwise, a new symbol is created and\nreturned.\n\n## Description\n\nIn contrast to `Symbol()`, the `Symbol.for()` function creates a\nsymbol available in a [global symbol registry](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol#shared_symbols_in_the_global_symbol_registry) list. `Symbol.for()` does also\nnot necessarily create a new symbol on every call, but checks first if a symbol with the\ngiven `key` is already present in the registry. In that case, that symbol is\nreturned. If no symbol with the given key is found, `Symbol.for()` will\ncreate a new global symbol.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Symbol/hasInstance.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.hasInstance\n\nThe **`Symbol.hasInstance`** well-known symbol is used to determine if a constructor object recognizes an object as its instance. The `instanceof` operator's behavior can be customized by this symbol.\n\n## Value\n\nThe well-known symbol `Symbol.hasInstance`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Symbol/isConcatSpreadable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.isConcatSpreadable\n\nThe **`Symbol.isConcatSpreadable`** well-known symbol is used to configure if an object should be flattened to its array elements when using the [`Array.prototype.concat()`](../../globals/Array/prototype/concat.mdx) method.\n\n## Value\n\nThe well-known symbol `Symbol.isConcatSpreadable`.\n\n## Description\n\nThe `Symbol.isConcatSpreadable` symbol (`Symbol.isConcatSpreadable`) can be defined as an own or inherited property and its value is a boolean. It can control behavior for arrays and array-like objects:\n\n- For array objects, the default behavior is to spread (flatten) elements. `Symbol.isConcatSpreadable` can avoid flattening in these cases.\n- For array-like objects, the default behavior is no spreading or flattening. `Symbol.isConcatSpreadable` can force flattening in these cases.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Symbol/iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.iterator\n\nThe well-known **`Symbol.iterator`** symbol specifies the default iterator for an object. Used by [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of).\n\n## Value\n\nThe well-known symbol `Symbol.iterator`.\n\n## Description\n\nWhenever an object needs to be iterated (such as at the beginning of a `for...of` loop), its `Symbol.iterator` method is called with no arguments, and the returned **iterator** is used to obtain the values to be iterated.\n\nSome built-in types have a default iteration behavior, while other types (such as `Object`) do not. The built-in types with a `Symbol.iterator` method are:\n\n- [`Array.prototype[Symbol.iterator]()`](../../globals/Array/prototype/@@iterator.mdx)\n- [`String.prototype[Symbol.iterator]()`](../../globals/String/prototype/@@iterator.mdx)\n- [`Map.prototype[Symbol.iterator]()`](../../globals/Map/prototype/@@iterator.mdx)\n- [`Set.prototype[Symbol.iterator]()`](../../globals/Set/prototype/@@iterator.mdx)\n\nSee also [Iteration protocols](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) for more information.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Symbol/keyFor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.keyFor()\n\nThe **`Symbol.keyFor(sym)`** method retrieves a shared symbol\nkey from the global symbol registry for the given symbol.\n\n## Syntax\n\n```js\nSymbol.keyFor(sym)\n```\n\n### Parameters\n\n- `sym`\n  - : Symbol, required. The symbol to find a key for.\n\n### Return value\n\nA string representing the key for the given symbol if one is found on the [global registry](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol#shared_symbols_in_the_global_symbol_registry); otherwise, [`undefined`](../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Symbol/match.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.match\n\nThe **`Symbol.match`** well-known symbol specifies the matching of a regular expression against a string. This function is called by the [`String.prototype.match()`](../../globals/String/prototype/match.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.match]()` and [`String.prototype.match()`](../../globals/String/prototype/match.mdx).\n\n## Value\n\nThe well-known symbol `Symbolmatch`.\n\n## Description\n\nThis function is also used to identify [if objects have the behavior of regular expressions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes). For example, the methods [`String.prototype.startsWith()`](../../globals/String/prototype/startsWith.mdx), [`String.prototype.endsWith()`](../../globals/String/prototype/endsWith.mdx) and [`String.prototype.includes()`](../../globals/String/prototype/includes.mdx), check if their first argument is a regular expression and will throw a [`TypeError`](../../globals/TypeError/TypeError.mdx) if they are. Now, if the `match` symbol is set to `false` (or a [Falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value except `undefined`), it indicates that the object is not intended to be used as a regular expression object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Symbol/matchAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.matchAll\n\nThe **`Symbol.matchAll`** well-known symbol specifies the method that returns an iterator, that yields matches of the regular expression against a string. This function is called by the [`String.prototype.matchAll()`](../../globals/String/prototype/matchAll.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.matchAll]()` and [`String.prototype.matchAll()`](../../globals/String/prototype/matchAll.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.matchAll`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Symbol/prototype/@@toPrimitive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype[Symbol.toPrimitive]\n\nThe **`[Symbol.toPrimitive]()`** method converts a Symbol object to\na primitive value.\n\n## Syntax\n\n```js\nSymbol()[Symbol.toPrimitive](hint)\n```\n\n### Return value\n\nThe primitive value of the specified `Symbol` object.\n\n## Description\n\nThe `[Symbol.toPrimitive]()` method of `Symbol` returns the primitive\nvalue of a Symbol object as a Symbol data type. The `hint`\nargument is not used.\n\nJavaScript calls the `[Symbol.toPrimitive]()` method to convert an object to a\nprimitive value. You rarely need to invoke the `[Symbol.toPrimitive]()` method\nyourself; JavaScript automatically invokes it when encountering an object where a\nprimitive value is expected.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Symbol/prototype/description.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype.description\n\nThe read-only **`description`** property is a string returning the optional description of `Symbol` objects.\n\n## Description\n\n`Symbol` objects can be created with an optional description which can be used for debugging but not to access the symbol itself. The `Symbol.prototype.description` property can be used to read that description. It is different to `Symbol.prototype.toString()` as it does not contain the enclosing `\"Symbol()\"` string. See the examples.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Symbol/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified symbol value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified symbol value.\n\n## Description\n\nThe `Symbol` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For `Symbol` values, the `toString` method returns a descriptive string in the form `\"Symbol(description)\"`, where `description` is the symbol's [`Symbol.prototype.description`](../../../globals/Symbol/prototype/description.mdx).\n\nThe `toString()` method requires its `this` value to be a `Symbol` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to symbol values.\n\nBecause `Symbol` has a [`[Symbol.toPrimitive]()`](../../../globals/Symbol/toPrimitive.mdx) method, that method always takes priority over `toString()` when a `Symbol` object is [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). However, because `Symbol.prototype[Symbol.toPrimitive]()` returns a symbol primitive, and symbol primitives throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when implicitly converted to a string, the `toString()` method is never implicitly called by the language. To stringify a symbol, you must explicitly call its `toString()` method or use the [`String()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/String#using_string_to_stringify_a_symbol) function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Symbol/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a Symbol object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nThe primitive value of the specified `Symbol` object.\n\n## Description\n\nThe `valueOf()` method of `Symbol` returns the primitive value of a Symbol object as a Symbol data type.\n\nJavaScript calls the `valueOf()` method to convert an object to a primitive value. You rarely need to invoke the `valueOf()` method yourself; JavaScript automatically invokes it when encountering an object where a primitive value is expected.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Symbol/replace.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.replace\n\nThe **`Symbol.replace`** well-known symbol specifies the method that replaces matched substrings of a string. This function is called by the [`String.prototype.replace()`](../../globals/String/prototype/replace.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.replace]()` and [`String.prototype.replace()`](../../globals/String/prototype/replace.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.replace`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Symbol/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.search\n\nThe **`Symbol.search`** well-known symbol specifies the method that returns the index within a string that matches the regular expression. This function is called by the [`String.prototype.search()`](../../globals/String/prototype/search.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.search]()` and [`String.prototype.search()`](../../globals/String/prototype/search.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.search`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Symbol/species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.species\n\nThe well-known symbol **`Symbol.species`** specifies a function-valued property that the constructor function uses to create derived objects.\n\n> **Warning:** The existence of `Symbol.species` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Value\n\nThe well-known symbol `Symbol.species`.\n\n## Description\n\nThe `Symbol.species` accessor property allows subclasses to override the default constructor for objects. This specifies a protocol about how instances should be copied. For example, when you use copying methods of arrays, such as [`Array.prototype.map()`](../../globals/Array/prototype/map.mdx). the `map()` method uses `instance.constructor[Symbol.species]` to get the constructor for constructing the new array.\n\nAll built-in implementations of `Symbol.species` return the `this` value, which is the current instance's constructor. This allows copying methods to create instances of derived classes rather than the base class — for example, `map()` will return an array of the same type as the original array.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Symbol/split.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.split\n\nThe **`Symbol.split`** well-known symbol specifies the method that splits a string at the indices that match a regular expression. This function is called by the [`String.prototype.split()`](../../globals/String/prototype/split.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.split]()` and [`String.prototype.split()`](../../globals/String/prototype/split.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.split`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Symbol/toPrimitive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.toPrimitive\n\nThe **`Symbol.toPrimitive`** well-known symbol specifies a method that accepts a preferred type and returns a primitive representation of an object. It is called in priority by all [type coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) algorithms.\n\n## Value\n\nThe well-known symbol `Symbol.toPrimitive`.\n\n## Description\n\nWith the help of the `Symbol.toPrimitive` property (used as a function value), an object can be converted to a primitive value. The function is called with a string argument `hint`, which specifies the preferred type of the result primitive value. The `hint` argument can be one of `\"number\"`, `\"string\"`, and `\"default\"`.\n\nThe `\"number\"` hint is used by [numeric coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#numeric_coercion) algorithms. The `\"string\"` hint is used by the [string coercion](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) algorithm. The `\"default\"` hint is used by the [primitive coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion) algorithm. The `hint` only acts as a weak signal of preference, and the implementation is free to ignore it (as [`Symbol.prototype[Symbol.toPrimitive]()`](../../globals/Symbol/prototype/@@toPrimitive.mdx) does). The language does not enforce alignment between the `hint` and the result type, although `[Symbol.toPrimitive]()` must return a primitive, or a [`TypeError`](../../globals/TypeError/TypeError.mdx) is thrown.\n\nObjects without the `Symbol.toPrimitive` property are converted to primitives by calling the `valueOf()` and `toString()` methods in different orders, which is explained in more detail in the [type coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) section. `Symbol.toPrimitive` allows full control over the primitive conversion process. For example, `Symbol.prototype.toString()` won't be called, and `Symbol` objects must always be explicitly converted to strings through [`String()`](../../globals/String/String.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Symbol/toStringTag.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.toStringTag\n\nThe **`Symbol.toStringTag`** well-known symbol is a string valued property that is used in the creation of the default string description of an object. It is accessed internally by the [`Object.prototype.toString()`](../../globals/Object/prototype/toString.mdx) method.\n\n## Value\n\nThe well-known symbol `Symbol.toStringTag`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Symbol/unscopables.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.unscopables\n\nThe **`Symbol.unscopables`** well-known symbol is used to specify an object value of whose own and inherited property names are excluded from the [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) environment bindings of the associated object.\n\n## Value\n\nThe well-known symbol `@@unscopables`.\n\n## Description\n\nThe `@@unscopables` symbol (accessed via `Symbol.unscopables`) can be defined on any object to exclude property names from being exposed as lexical variables in [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) environment bindings. Note that when using [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), `with` statements are not available, and this symbol is likely not needed.\n\nSetting a property of the `@@unscopables` object to `true` (or any [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value) will make the corresponding property of the `with` scope object _unscopable_ and therefore won't be introduced to the `with` body scope. Setting a property to `false` (or any [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value) will make it _scopable_ and thus appear as lexical scope variables.\n\nWhen deciding whether `x` is unscopable, the entire prototype chain of the `@@unscopables` property is looked up for a property called `x`. This means if you declared `@@unscopables` as a plain object, `Object.prototype` properties like [`toString`](../../globals/Object/prototype/toString.mdx) would become unscopable as well, which may cause backward incompatibility for legacy code assuming those properties are normally scoped (see [an example here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/unscopables#avoid_using_a_non-null-prototype_object_as_symbol.unscopables)). You are advised to make your custom `@@unscopables` property have `null` as its prototype, like [`Array.prototype[Symbol.unscopables]`](../../globals/Array/prototype/@@unscopables.mdx) does.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/SyntaxError/SyntaxError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SyntaxError\n\nThe **`SyntaxError`** constructor creates a new error object\nthat represents an error when trying to interpret syntactically invalid code.\n\n## Syntax\n\n```js\nnew SyntaxError()\nnew SyntaxError(message)\nnew SyntaxError(message, options)\nnew SyntaxError(message, fileName)\nnew SyntaxError(message, fileName, lineNumber)\n\nSyntaxError()\nSyntaxError(message)\nSyntaxError(message, options)\nSyntaxError(message, fileName)\nSyntaxError(message, fileName, lineNumber)\n```\n\n> **Note:** `SyntaxError()` can be called with or without `new`. Both create a new `SyntaxError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/TextDecoder/TextDecoder.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder()\n\nThe **`TextDecoder()`** constructor returns a newly created `TextDecoder` object for the encoding specified in parameter.\n\n## Syntax\n\n```js\nnew TextDecoder()\nnew TextDecoder(label)\nnew TextDecoder(label, options)\n```\n\n### Parameters\n\n- `label` _**optional**_\n  - : A string, defaulting to `\"utf-8\"`.\n- `options` _**optional**_\n\n  - : An object with the property:\n\n    - `fatal`\n      - : A boolean value indicating if the `TextDecoder.decode()` method must throw a `TypeError` when decoding invalid data.\n        It defaults to `false`, which means that the decoder will substitute malformed data with a replacement character.\n\n    - `ignoreBOM`\n      - : A boolean value indicating whether the [byte order mark](https://www.w3.org/International/questions/qa-byte-order-mark) is ignored.\n        It defaults to `false`.\n\n### Exceptions\n\n- `RangeError`\n  - : Thrown if the value of `label` is unknown, or is one of the values leading to a `'replacement'` decoding algorithm (`\"iso-2022-cn\"` or `\"iso-2022-cn-ext\"`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/TextDecoder/prototype/decode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.decode()\n\nThe **`TextDecoder.decode()`** method returns a string containing text decoded from the buffer passed as a parameter.\n\nThe decoding method is defined in the current `TextDecoder` object.\nThis includes the expected encoding of the data, and how decoding errors are handled.\n\n## Syntax\n\n```js\ndecode()\ndecode(buffer)\ndecode(buffer, options)\n```\n\n### Parameters\n\n- `buffer` _**optional**_\n  - : Is an `ArrayBuffer`, a `TypedArray` or a `DataView` object containing the encoded text to decode.\n- `options` _**optional**_\n\n  - : An object with the property:\n\n    - `stream`\n      - : A boolean flag indicating that additional data will follow in subsequent calls to `decode()`.\n        Set to `true` if processing the data in chunks, and `false` for the final chunk or if the data is not chunked.\n        It defaults to `false`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if there is a decoding error when the property `TextDecoder.fatal` is `true`.\n\n### Return value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/TextDecoder/prototype/encoding.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.encoding\n\nThe **`TextDecoder.encoding`** read-only property returns a string containing the name of the decoding algorithm used by the specific decoder object.\n\nThe encoding is set by the constructor `label` parameter, and defaults to `utf-8`.\n\n## Value\n\nA lower-cased ASCII string, which can be one of the following values:\n\n- The recommended encoding for the Web: `'utf-8'`.\n- The legacy single-byte encodings:\n  ['ibm866'](https://en.wikipedia.org/wiki/Code_page_866),\n  ['iso-8859-2'](https://en.wikipedia.org/wiki/ISO/IEC_8859-2),\n  ['iso-8859-3'](https://en.wikipedia.org/wiki/ISO/IEC_8859-3),\n  ['iso-8859-4'](https://en.wikipedia.org/wiki/ISO/IEC_8859-4),\n  ['iso-8859-5'](https://en.wikipedia.org/wiki/ISO/IEC_8859-5),\n  ['iso-8859-6'](https://en.wikipedia.org/wiki/ISO/IEC_8859-6),\n  ['iso-8859-7'](https://en.wikipedia.org/wiki/ISO/IEC_8859-7),\n  ['iso-8859-8'](https://en.wikipedia.org/wiki/ISO/IEC_8859-8)'`,\n  ['iso-8859-8i'](https://en.wikipedia.org/wiki/ISO-8859-8-I),\n  ['iso-8859-10'](https://en.wikipedia.org/wiki/ISO/IEC_8859-10),\n  ['iso-8859-13'](https://en.wikipedia.org/wiki/ISO/IEC_8859-13),\n  ['iso-8859-14'](https://en.wikipedia.org/wiki/ISO/IEC_8859-14),\n  ['iso-8859-15'](https://en.wikipedia.org/wiki/ISO/IEC_8859-15),\n  ['iso-8859-16'](https://en.wikipedia.org/wiki/ISO/IEC_8859-16),\n  ['koi8-r'](https://en.wikipedia.org/wiki/KOI8-R),\n  ['koi8-u'](https://en.wikipedia.org/wiki/KOI8-U),\n  ['macintosh'](https://en.wikipedia.org/wiki/Mac_OS_Roman),\n  ['windows-874'](https://en.wikipedia.org/wiki/Windows-874),\n  ['windows-1250'](https://en.wikipedia.org/wiki/Windows-1250),\n  ['windows-1251'](https://en.wikipedia.org/wiki/Windows-1251),\n  ['windows-1252'](https://en.wikipedia.org/wiki/Windows-1252),\n  ['windows-1253'](https://en.wikipedia.org/wiki/Windows-1253),\n  ['windows-1254'](https://en.wikipedia.org/wiki/Windows-1254),\n  ['windows-1255'](https://en.wikipedia.org/wiki/Windows-1255),\n  ['windows-1256'](https://en.wikipedia.org/wiki/Windows-1256),\n  ['windows-1257'](https://en.wikipedia.org/wiki/Windows-1257),\n  ['windows-1258'](https://en.wikipedia.org/wiki/Windows-1258), or\n  ['x-mac-cyrillic'](https://en.wikipedia.org/wiki/Macintosh_Cyrillic_encoding).\n- The legacy multi-byte Chinese (simplified) encodings:\n  ['gbk'](https://en.wikipedia.org/wiki/GBK),\n  ['gb18030'](https://en.wikipedia.org/wiki/GB_18030)\n- The legacy multi-byte Chinese (traditional) encoding:\n  ['big5'](https://en.wikipedia.org/wiki/Big5).\n- The legacy multi-byte Japanese encodings:\n  ['euc-jp'](https://en.wikipedia.org/wiki/Extended_Unix_Code#EUC-JP),\n  ['iso-2022-jp'](https://en.wikipedia.org/wiki/ISO/IEC_2022#ISO-2022-JP),\n  ['shift-jis'](https://en.wikipedia.org/wiki/Shift_JIS).\n- The legacy multi-byte Korean encodings:\n  ['euc-kr'](https://en.wikipedia.org/wiki/Extended_Unix_Code#EUC-KR)\n- The legacy miscellaneous encodings:\n  ['utf-16be'](https://en.wikipedia.org/wiki/UTF-16#Byte_order_encoding_schemes),\n  ['utf-16le'](https://en.wikipedia.org/wiki/UTF-16#Byte_order_encoding_schemes),\n  `'x-user-defined'`.\n- A special encoding, `'replacement'`.\n  This decodes empty input into empty output and any other arbitrary-length input into a single replacement character.\n  It is used to prevent attacks that mismatch encodings between the client and server.\n  The following encodings also map to the replacement encoding: `ISO-2022-CN`, `ISO-2022-CN-ext`, ['iso-2022-kr'](https://en.wikipedia.org/wiki/ISO/IEC_2022#ISO-2022-KR) and ['hz-gb-2312'](https://en.wikipedia.org/wiki/HZ_(character_encoding)).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/TextDecoder/prototype/fatal.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.fatal\n\nThe **`fatal`** read-only property of the `TextDecoder` interface is a `Boolean` indicating whether the error mode is fatal.\n\nIf the property is `true` then a decoder will throw a `TypeError` if it encounters malformed data while decoding.\nIf `false` the decoder will substitute the invalid data with the replacement character `U+FFFD` (�).\nThe value of the property is set in the `TextDecoder()` constructor.\n\n## Value\n\nA `boolean` which will return `true` if the error mode is set to `fatal`.\nOtherwise it returns `false`, indicating that the error mode is \"replacement\".\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/TextDecoder/prototype/ignoreBOM.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.ignoreBOM\n\nThe **`ignoreBOM`** read-only property of the `TextDecoder` interface is a `Boolean` indicating whether the [byte order mark](https://www.w3.org/International/questions/qa-byte-order-mark) is ignored.\n\n## Value\n\n`true` if the byte order mark is ignored; `false` otherwise.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/TextEncoder/TextEncoder.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextEncoder()\n\nThe **`TextEncoder()`** constructor returns a newly created `TextEncoder` object that will generate a byte stream with UTF-8 encoding.\n\n## Syntax\n\n```js\nnew TextEncoder()\n```\n\n### Parameters\n\nNone.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/TextEncoder/prototype/encode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextEncoder.encode()\n\nThe **`TextEncoder.encode()`** method takes a string as input, and returns a `Uint8Array` containing the text given in parameters encoded with the specific method for that `TextEncoder` object.\n\n## Syntax\n\n```js\nencode(string)\n```\n\n### Parameters\n\n- `string`\n  - : A string containing the text to encode.\n\n### Return value\n\nA `Uint8Array` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/TextEncoder/prototype/encoding.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextEncoder.encoding\n\nThe **`TextEncoder.encoding`** read-only property returns a string containing the name of the encoding algorithm used by the specific encoder.\n\nIt can only have the following value `utf-8`.\n\n## Value\n\nA string with the value `utf-8`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/TransformStream/TransformStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStream()\n\nThe **`TransformStream()`** constructor creates a new `TransformStream` object which represents a pair of streams: a `WritableStream` representing the writable side, and a `ReadableStream` representing the readable side.\n\n## Syntax\n\n```js\nnew TransformStream()\nnew TransformStream(transformer)\nnew TransformStream(transformer, writableStrategy)\nnew TransformStream(transformer, writableStrategy, readableStrategy)\n```\n\n### Parameters\n\n- `transformer` _**optional**_\n\n  - : An object representing the `transformer`. If not supplied the resulting stream will be an **identity transform stream** which forwards all chunks written to its writable side to its readable side, without any changes.\n\n    The transformer object can contain any of the following methods. In each method `controller` is an instance of `TransformStreamDefaultController`.\n\n    - `start(controller)`\n      - : Called when the `TransformStream` is constructed. It is typically used to enqueue chunks using `TransformStreamDefaultController.enqueue()`.\n    - `transform(chunk, controller)`\n      - : Called when a chunk written to the writable side is ready to be transformed, and performs the work of the transformation stream. If no `transform()` method is supplied, the identity transform is used, and the chunk will be enqueued with no changes.\n    - `flush(controller)`\n      - : Called after all chunks written to the writable side have been successfully transformed, and the writable side is about to be closed.\n\n- `writableStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer. This defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk`. This indicates the size to\n        use for each chunk, in bytes.\n\n- `readableStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer. This defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk`. This indicates the size to\n        use for each chunk, in bytes.\n\n> **Note:** You could define your own custom\n> `readableStrategy` or `writableStrategy`, or use an instance of\n> `ByteLengthQueuingStrategy` or `CountQueuingStrategy`\n> for the object values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/TransformStream/prototype/readable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStream.readable\n\nThe **`readable`** read-only property of the `TransformStream` interface returns the `ReadableStream` instance controlled by this `TransformStream`.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/TransformStream/prototype/writable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStream.writable\n\nThe **`writable`** read-only property of the `TransformStream` interface returns the `WritableStream` instance controlled by this `TransformStream`.\n\n## Value\n\nA `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/TransformStreamDefaultController/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.desiredSize\n\nThe **`desiredSize`** read-only property of the `TransformStreamDefaultController` interface returns the desired size to fill the queue of the associated [`ReadableStream`](../../../globals/ReadableStream/ReadableStream.mdx).\n\nThe internal queue of a `ReadableStream` contains chunks that have been enqueued, but not yet read.\n\nIf the `desiredSize` is `0` then the queue is full. Therefore you can use this information to manually apply backpressure to manage the queue.\n\n## Value\n\nThe desired size.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/TransformStreamDefaultController/prototype/enqueue.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.enqueue()\n\nThe **`enqueue()`** method of the `TransformStreamDefaultController` interface enqueues the given chunk in the readable side of the stream.\n\n## Syntax\n\n```js\nenqueue(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : The chunk being queued. A chunk is a single piece of data. It can be any type of data, and a stream can contain chunks of different types.\n\n### Return value\n\nNone `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream is not readable.\n    This might occur if the stream is errored via `controller.error()`, or when it is closed without its controller's `controller.close()` method ever being called.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/TransformStreamDefaultController/prototype/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.error()\n\nThe **`error()`** method of the `TransformStreamDefaultController` interface errors both sides of the stream. Any further interactions with it will fail with the given error message, and any chunks in the queue will be discarded.\n\n## Syntax\n\n```js\nerror(reason)\n```\n\n### Parameters\n\n- `reason`\n  - : A string containing the error message to be returned on any further interaction with the stream.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/TransformStreamDefaultController/prototype/terminate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.terminate()\n\nThe **`terminate()`** method of the `TransformStreamDefaultController` interface closes the readable side and errors the writable side of the stream.\n\n## Syntax\n\n```js\nterminate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone (`undefined`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/TypeError/TypeError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TypeError\n\nThe **`TypeError()`** constructor creates a new error when an\noperation could not be performed, typically (but not exclusively) when a value is not of\nthe expected type.\n\n## Syntax\n\n```js\nnew TypeError()\nnew TypeError(message)\nnew TypeError(message, options)\nnew TypeError(message, fileName)\nnew TypeError(message, fileName, lineNumber)\n\nTypeError()\nTypeError(message)\nTypeError(message, options)\nTypeError(message, fileName)\nTypeError(message, fileName, lineNumber)\n```\n\n> **Note:** `TypeError()` can be called with or without `new`. Both create a new `TypeError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/URIError/URIError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URIError\n\nThe **`URIError()`** constructor creates an error when a global\nURI handling function was used in a wrong way.\n\n## Syntax\n\n```js\nnew URIError()\nnew URIError(message)\nnew URIError(message, options)\nnew URIError(message, fileName)\nnew URIError(message, fileName, lineNumber)\n\nURIError()\nURIError(message)\nURIError(message, options)\nURIError(message, fileName)\nURIError(message, fileName, lineNumber)\n```\n\n> **Note:** `URIError()` can be called with or without `new`. Both create a new `URIError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/URL/URL.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL()\n\nThe **`URL()`** constructor returns a newly created\n`URL` object representing the URL defined by the parameters.\n\nIf the given base URL or the resulting URL are not valid URLs, the JavaScript\n`TypeError` exception is thrown.\n\n## Syntax\n\n```js\nnew URL(url)\nnew URL(url, base)\n```\n\n### Parameters\n\n- `url`\n  - : A string or any other object with a `toString()` method.\n    If `url` is a relative URL, `base` is\n    required, and will be used as the base URL. If `url` is an\n    absolute URL, a given `base` will be ignored.\n- `base` _**optional**_\n  - : A string representing the base URL to use in cases where\n    `url` is a relative URL. If not specified, it defaults to\n    `undefined`.\n\n> **Note:** The `url` and `base` arguments will\n> each be stringified from whatever value you pass, just like with other Web APIs\n> that accept a string. In particular, you can use an existing\n> `URL` object for either argument, and it will stringify to the\n> object's `URL.href\", \"href` property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/URL/prototype/hash.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.hash\n\nThe **`hash`** property of the\n`URL` interface is a string containing a\n`'#'` followed by the fragment identifier of the URL.\n\nThe fragment is not percent-decoded. If the URL does not\nhave a fragment identifier, this property contains an empty string — `\"\"`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/URL/prototype/host.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.host\n\nThe **`host`** property of the `URL` interface is\na string containing the host, that is the `URL.hostname`, and then, if the `port` of the URL is nonempty, a\n`':'`, followed by the `port` of the URL.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/URL/prototype/hostname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.hostname\n\nThe **`hostname`** property of the `URL` interface\nis a string containing the domain name of the URL.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/URL/prototype/href.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.href\n\nThe **`href`** property of the `URL` interface is\na string containing the whole URL.\n\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/URL/prototype/origin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.origin\n\nThe **`origin`** read-only property of\nthe `URL` interface returns a string containing the\nUnicode serialization of the origin of the represented URL.\n\nThe exact structure\nvaries depending on the type of URL:\n\n- For `http` or `https` URLs, the scheme followed by\n  `'://'`, followed by the domain, followed by `':'`, followed by\n  the port (the default port, `80` and `443` respectively, if\n  explicitly specified).\n- For `file:` URLs, the value is browser dependent.\n- for `blob:` URLs, the origin of the URL following `blob:` will\n  be used. For example, `\"blob:https://mozilla.org\"` will be returned as\n  `\"https://mozilla.org\".`\n\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/URL/prototype/password.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.password\n\nThe **`password`** property of the `URL` interface\nis a string containing the password specified before the domain name.\n\nIf it is set without first setting the `URL.username` property, it silently fails.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/URL/prototype/pathname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.pathname\n\nThe **`pathname`** property of the `URL` interface represents a location in a hierarchical structure. It is a string constructed from a list of path segments, each of which is prefixed by a `/` character. If the URL has no path segments, the value of its `pathname` property will be the empty string.\n\nURLs such as `https` and `http` URLs that have [hierarchical schemes](https://www.rfc-editor.org/rfc/rfc3986#section-1.2.3) (which the URL standard calls \"[special schemes](https://url.spec.whatwg.org/#special-scheme)\") always have at least one (invisible) path segment: the empty string. Thus the `pathname` value for such \"special scheme\" URLs can never be the empty string, but will instead always have a least one `/` character.\n\nFor example, the URL `https://developer.mozilla.org` has just one path segment: the empty string, so its `pathname` value is constructed by prefixing a `/` character to the empty string.\n\nSome systems define the term _slug_ to mean the final segment of a non-empty path if it identifies a page in human-readable keywords. For example, the URL `https://example.org/articles/this-that-other-outre-collection` has `this-that-other-outre-collection` as its slug.\n\nSome systems use the `;` and `=` characters to delimit parameters and parameter values applicable to a path segment. For example, with the URL `https://example.org/users;id=42/tasks;state=open?sort=modified`, a system might extract and use the path segment parameters `id=42` and `state=open` from the path segments `users;id=42` and `tasks;state=open`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/URL/prototype/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.port\n\nThe **`port`** property of the `URL` interface is\na string containing the port number of the URL.\n\n> **Note:** If an input string passed to the `URL()` constructor doesn't contain an explicit port number (e.g., `https://localhost`) or contains a port number that's the default port number corresponding to the protocol part of the input string (e.g., `https://localhost:443`), then in the `URL` object the constructor returns, the value of the port property will be the empty string: `''`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/URL/prototype/protocol.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.protocol\n\nThe **`protocol`** property of the `URL` interface\nis a string representing the protocol scheme of the URL, including the\nfinal `':'`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/URL/prototype/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.search\n\nThe **`search`** property of the `URL` interface\nis a search string, also called a _query string_, that is a\nstring containing a `'?'` followed by the parameters of the\nURL.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/URL/prototype/searchParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.searchParams\n\nThe **`searchParams`** readonly property of the\n`URL` interface returns a `URLSearchParams` object allowing\naccess to the `GET` decoded query arguments contained in the URL.\n\n## Value\n\nA `URLSearchParams` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/URL/prototype/toJSON.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.toJSON()\n\nThe **`toJSON()`** method of the `URL` interface\nreturns a string containing a serialized version of the URL,\nalthough in practice it seems to have the same effect as\n`URL.toString()`.\n\n## Syntax\n\n```js\ntoJSON()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/URL/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.toString()\n\nThe **`URL.toString()`** method returns a\nstring containing the whole URL. It is effectively a read-only version\nof `URL.prototype.href`.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/URL/prototype/username.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.username\n\nThe **`username`** property of the `URL` interface\nis a string containing the username specified before the domain name.\n\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/URLSearchParams/URLSearchParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams()\n\nThe **`URLSearchParams()`** constructor creates and returns a\nnew `URLSearchParams` object.\n\n\n\n## Syntax\n\n```js\nnew URLSearchParams()\nnew URLSearchParams(options)\n```\n\n### Parameters\n\n- `options` _**optional**_\n  - : One of:\n    - A string, which will be parsed from `application/x-www-form-urlencoded` format. A leading `'?'` character is ignored.\n    - A literal sequence of name-value string pairs, or any object with an iterator that produces a sequence of string pairs.\n    - A record of string keys and string values. Note that nesting is not supported.\n\n### Return value\n\nA `URLSearchParams` object instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/URLSearchParams/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.append()\n\nThe **`append()`** method of the `URLSearchParams`\ninterface appends a specified key/value pair as a new search parameter.\n\nAs shown in the example below, if the same key is appended multiple times it will\nappear in the parameter string multiple times for each value.\n\n## Syntax\n\n```js\nappend(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to append.\n- `value`\n  - : The value of the parameter to append.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/URLSearchParams/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.delete()\n\nThe **`delete()`** method of the `URLSearchParams`\ninterface deletes the given search parameter and all its associated values, from the\nlist of all search parameters.\n\n## Syntax\n\n```js\ndelete(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to be deleted.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/URLSearchParams/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.entries()\n\nThe **`entries()`** method of the\n`URLSearchParams` interface returns an\niterator allowing iteration through all key/value\npairs contained in this object. The iterator returns key/value pairs in the same order as they appear in the query string. The key and value of each pair are\nstring objects.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/URLSearchParams/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.forEach()\n\nThe **`forEach()`** method of the\n`URLSearchParams` interface allows iteration through all values contained\nin this object via a callback function.\n\n## Syntax\n\n```js\nforEach(callback)\nforEach(callback, thisArg)\n```\n\n### Parameters\n\n- `callback`\n\n  - : Function to execute on each element, which is passed the following arguments:\n\n    - `value`\n      - : The value of the current entry being processed in the `URLSearchParams` object.\n    - `key`\n      - : The key of the current entry being processed in the `URLSearchParams` object.\n    - `searchParams`\n      - : The `URLSearchParams` object the `forEach()` was called upon.\n\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `callback`.\n\n### Return value\n\nNone `undefined`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/URLSearchParams/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.get()\n\nThe **`get()`** method of the `URLSearchParams`\ninterface returns the first value associated to the given search parameter.\n\n## Syntax\n\n```js\nget(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to return.\n\n### Return value\n\nA string if the given search parameter is found; otherwise,\n**`null`**.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/URLSearchParams/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.has()\n\nThe **`has()`** method of the `URLSearchParams`\ninterface returns a boolean value that indicates whether a parameter with the\nspecified name exists.\n\n## Syntax\n\n```js\nhas(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to find.\n\n### Return value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/URLSearchParams/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.keys()\n\nThe **`keys()`** method of the `URLSearchParams`\ninterface returns an iterator allowing iteration\nthrough all keys contained in this object. The keys are string\nobjects.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/URLSearchParams/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.set()\n\nThe **`set()`** method of the `URLSearchParams`\ninterface sets the value associated with a given search parameter to the given value.\nIf there were several matching values, this method deletes the others. If the search\nparameter doesn't exist, this method creates it.\n\n## Syntax\n\n```js\nset(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to set.\n- `value`\n  - : The value of the parameter to set.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/URLSearchParams/prototype/sort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.sort()\n\nThe **`URLSearchParams.sort()`** method sorts all key/value\npairs contained in this object in place and returns `undefined`. The sort\norder is according to unicode code points of the keys. This method uses a stable sorting\nalgorithm (i.e. the relative order between key/value pairs with equal keys will be\npreserved).\n\n## Syntax\n\n```js\nsort()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/URLSearchParams/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.toString()\n\nThe **`toString()`** method of the\n`URLSearchParams` interface returns a query string suitable for use in a\nURL.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string, without the question mark. (Returns an empty string if no\nsearch parameters have been set.)\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/URLSearchParams/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.values()\n\nThe **`values()`** method of the `URLSearchParams`\ninterface returns an iterator allowing iteration\nthrough all values contained in this object. The values are string\nobjects.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Uint16Array/Uint16Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint16Array\n\nThe **`Uint16Array()`** typed array constructor creates an\narray of 16-bit unsigned integers in the platform byte order.\n\n## Syntax\n\n```js\nnew Uint16Array()\nnew Uint16Array(length)\nnew Uint16Array(typedArray)\nnew Uint16Array(object)\n\nnew Uint16Array(buffer)\nnew Uint16Array(buffer, byteOffset)\nnew Uint16Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint16Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Uint32Array/Uint32Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint32Array\n\nThe **`Uint32Array()`** typed array constructor creates an\narray of 32-bit unsigned integers in the platform byte order. If control over byte order\nis needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are initialized to\n`0`. Once established, you can reference elements in the array using the\nobject's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Uint32Array()\nnew Uint32Array(length)\nnew Uint32Array(typedArray)\nnew Uint32Array(object)\n\nnew Uint32Array(buffer)\nnew Uint32Array(buffer, byteOffset)\nnew Uint32Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint32Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Uint8Array/Uint8Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint8Array\n\nThe **`Uint8Array()`** constructor creates a typed array of\n8-bit unsigned integers. The contents are initialized to `0`. Once\nestablished, you can reference elements in the array using the object's methods, or\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew Uint8Array()\nnew Uint8Array(length)\nnew Uint8Array(typedArray)\nnew Uint8Array(object)\n\nnew Uint8Array(buffer)\nnew Uint8Array(buffer, byteOffset)\nnew Uint8Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint8Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/Uint8ClampedArray/Uint8ClampedArray.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint8ClampedArray\n\nThe **`Uint8ClampedArray()`** constructor creates a typed array\nof 8-bit unsigned integers clamped to 0-255; if you specified a value that is out of the\nrange of \\[0,255], 0 or 255 will be set instead; if you specify a non-integer, the\nnearest integer will be set. The contents are initialized to `0`. Once\nestablished, you can reference elements in the array using the object's methods, or\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew Uint8ClampedArray()\nnew Uint8ClampedArray(length)\nnew Uint8ClampedArray(typedArray)\nnew Uint8ClampedArray(object)\n\nnew Uint8ClampedArray(buffer)\nnew Uint8ClampedArray(buffer, byteOffset)\nnew Uint8ClampedArray(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint8ClampedArray()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/WeakMap/WeakMap.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap\n\nThe **`WeakMap()` constructor** creates a `WeakMap` object, optionally based on a provided `Array` or other iterable object.\n\n## Syntax\n\n```js\nnew WeakMap()\nnew WeakMap(iterable)\n```\n\n> **Note:** `WeakMap()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable`\n  - : An `Array` or other object that implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol)  that returns an iterator object that produces a two-element array-like object whose first element is a value that will be used as a `WeakMap` key and whose second element is the value to associate with that key. Each key-value pair will be added to the new `WeakMap`. null is treated as undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/WeakMap/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.delete()\n\nThe **`delete()`** method removes the specified element from a\n`WeakMap` object.\n\n## Syntax\n\n```js\ndelete(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to remove from the `WeakMap` object.\n\n### Return value\n\n`true` if an element in the `WeakMap` object has been removed\nsuccessfully. `false` if the key is not found in the `WeakMap` or\nif the key is not an object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/WeakMap/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.get()\n\nThe **`get()`** method returns a specified element from a\n`WeakMap` object.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key`\n  - : Required. The key of the element to return from the `WeakMap` object.\n\n### Return value\n\nThe element associated with the specified key in the `WeakMap` object. If\nthe key can't be found, [`undefined`](../../../globals/undefined.mdx) is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/WeakMap/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.has()\n\nThe **`has()`** method returns a boolean indicating whether an\nelement with the specified key exists in the `WeakMap` object or not.\n\n## Syntax\n\n```js\nhas(key)\n```\n\n### Parameters\n\n- `key`\n  - : Required. The key of the element to test for presence in the `WeakMap`\n    object.\n\n### Return value\n\n- Boolean\n  - : Returns `true` if an element with the specified key exists in the\n    `WeakMap` object; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/WeakMap/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.set\n\nThe **`set()`** method adds a new element with a specified key\nand value to a `WeakMap` object.\n\n## Syntax\n\n```js\nset(key, value)\n```\n\n### Parameters\n\n- `key`\n  - : Required. Must be `object`. The key of the element to add to the\n    `WeakMap` object.\n- `value`\n  - : Required. Any value. The value of the element to add to the `WeakMap`\n    object.\n\n### Return value\n\nThe `WeakMap` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/WeakRef/WeakRef.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakRef\n\nThe **`WeakRef`** constructor creates a `WeakRef`\nobject referring to a given target object.\n\n## Syntax\n\n```js\nnew WeakRef(targetObject)\n```\n\n> **Note:** `WeakRef()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `targetObject`\n  - : The target object the WeakRef should refer to (also called the _referent_).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/WeakRef/prototype/deref.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakRef.prototype.deref()\n\nThe `deref` method returns the `WeakRef` instance's target\nobject, or `undefined` if the target object has been garbage-collected.\n\n## Syntax\n\n```js\nderef()\n```\n\n### Return value\n\nThe target object of the WeakRef, or `undefined` if the object has been\ngarbage-collected.\n\n## Description\n\nSee the [Notes on WeakRefs](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WeakRef#notes_on_weakrefs) section of the `WeakRef` page for some important notes.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/WeakSet/WeakSet.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet\n\nThe **`WeakSet`** constructor lets you create\n`WeakSet` objects that store weakly held _objects_ in a collection.\n\n## Syntax\n\n```js\nnew WeakSet()\nnew WeakSet(iterable)\n```\n\n> **Note:** `WeakSet()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable` _**optional**_\n  - : If an [iterable object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) is passed, all of its elements will be added to the new\n    `WeakSet`. null is treated as undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/WeakSet/prototype/add.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet.prototype.add\n\nThe **`add()`** method appends a new object to the end of a\n`WeakSet` object.\n\n## Syntax\n\n```js\nadd(value)\n```\n\n### Parameters\n\n- value\n  - : Required. The object to add to the `WeakSet` collection.\n\n### Return value\n\nThe `WeakSet` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/WeakSet/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet.prototype.delete\n\nThe **`delete()`** method removes the specified element from a\n`WeakSet` object.\n\n## Syntax\n\n```js\ndelete(value)\n```\n\n### Parameters\n\n- `value`\n  - : Required. The object remove from the `WeakSet` object.\n\n### Return value\n\n`true` if an element in the `WeakSet` object has been removed\nsuccessfully. `false` if the `value` is not found in\nthe `WeakSet` or if the `value` is not an object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/WeakSet/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet.prototype.has\n\nThe **`has()`** method returns a boolean indicating whether an\nobject exists in a `WeakSet` or not.\n\n## Syntax\n\n```js\nhas(value)\n```\n\n### Parameters\n\n- `value`\n  - : Required. The object to test for presence in the `WeakSet`.\n\n### Return value\n\n- Boolean\n  - : Returns `true` if an element with the specified value exists in the\n    `WeakSet` object; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/WorkerLocation/WorkerLocation.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# WorkerLocation\n\nThe **`WorkerLocation`** interface defines the absolute location of the script executed by the Worker. Such an object is initialized for each worker and is available via the [`location`](../../globals/location.mdx) property obtained by calling `globalThis.location`.\n\n## Instance properties\n\n- [`WorkerLocation.href`](../../globals/WorkerLocation/href.mdx) _**read-only**_\n  - : Returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location.\n- [`WorkerLocation.protocol`](../../globals/WorkerLocation/protocol.mdx) _**read-only**_\n  - : Returns the [`protocol`](../../globals/URL/prototype/protocol.mdx) part of the worker's location.\n- [`WorkerLocation.host`](../../globals/WorkerLocation/host.mdx) _**read-only**_\n  - : Returns the [`host`](../../globals/URL/prototype/host.mdx) part of the worker's location.\n- [`WorkerLocation.hostname`](../../globals/WorkerLocation/hostname.mdx) _**read-only**_\n  - : Returns the [`hostname`](../../globals/URL/prototype/hostname.mdx) part of the worker's location.\n- [`WorkerLocation.origin`](../../globals/WorkerLocation/origin.mdx) _**read-only**_\n  - : Returns the worker's [`origin`](../../globals/URL/prototype/origin.mdx).\n- [`WorkerLocation.port`](../../globals/WorkerLocation/port.mdx) _**read-only**_\n  - : Returns the [`port`](../../globals/URL/prototype/port.mdx) part of the worker's location.\n- [`WorkerLocation.pathname`](../../globals/WorkerLocation/pathname.mdx) _**read-only**_\n  - : Returns the [`pathname`](../../globals/URL/prototype/pathname.mdx) part of the worker's location.\n- [`WorkerLocation.search`](../../globals/WorkerLocation/search.mdx) _**read-only**_\n  - : Returns the [`search`](../../globals/URL/prototype/search.mdx) part of the worker's location.\n- [`WorkerLocation.hash`](../../globals/WorkerLocation/hash.mdx) _**read-only**_\n  - : Returns the [`hash`](../../globals/URL/prototype/hash.mdx) part of the worker's location.\n\n## Instance methods\n\n- [`WorkerLocation.toString`](../../globals/WorkerLocation/toString.mdx)\n  - : Returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location. It is a synonym for [`WorkerLocation.href`](../../globals/WorkerLocation/href.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/WorkerLocation/hash.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.hash\n\nThe **`hash`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`hash`](../../globals/URL/prototype/hash.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/WorkerLocation/host.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.host\n\nThe **`host`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`host`](../../globals/URL/prototype/host.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/WorkerLocation/hostname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.hostname\n\nThe **`hostname`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`hostname`](../../globals/URL/prototype/hostname.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/WorkerLocation/href.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.href\n\nThe **`href`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/WorkerLocation/origin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.origin\n\nThe **`origin`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the worker's [`origin`](../../globals/URL/prototype/origin.mdx).\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/WorkerLocation/pathname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.pathname\n\nThe **`pathname`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`pathname`](../../globals/URL/prototype/pathname.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/WorkerLocation/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.port\n\nThe **`port`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`port`](../../globals/URL/prototype/port.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/WorkerLocation/protocol.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.protocol\n\nThe **`protocol`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`protocol`](../../globals/URL/prototype/protocol.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/WorkerLocation/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.search\n\nThe **`search`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`search`](../../globals/URL/prototype/search.mdx) part of the worker's location.\n\n## Value\n\nA string.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/WorkerLocation/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.toString()\n\nThe **`toString()`** method of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location. It is a synonym for [`WorkerLocation.href`](../../globals/WorkerLocation/href.mdx).\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone [`undefined`](../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/WritableStream/WritableStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream()\n\nThe **`WritableStream()`** constructor creates\na new `WritableStream` object instance.\n\n## Syntax\n\n```js\nnew WritableStream(underlyingSink)\nnew WritableStream(underlyingSink, queuingStrategy)\n```\n\n### Parameters\n\n- `underlyingSink` _**optional**_\n\n  - : An object containing methods and properties that define how the constructed stream\n    instance will behave. `underlyingSink` can contain the following:\n\n    - `start(controller)` _**optional**_\n      - : This is a method, called immediately when the object is constructed. The\n        contents of this method are defined by the developer, and should aim to get access\n        to the underlying sink. If this process is to be done asynchronously, it can\n        return a promise to signal success or failure. The `controller`\n        parameter passed to this method is a\n        `WritableStreamDefaultController`. This can be used by the developer\n        to control the stream during set up.\n    - `write(chunk, controller)` _**optional**_\n      - : This method, also defined by the developer, will be called when a new chunk of\n        data (specified in the `chunk` parameter) is ready to be written to the\n        underlying sink. It can return a promise to signal success or failure of the write\n        operation. The `controller` parameter passed to this method is a\n        `WritableStreamDefaultController` that can be used by the developer\n        to control the stream as more chunks are submitted for writing. This method will\n        be called only after previous writes have succeeded, and never after the stream is\n        closed or aborted (see below).\n    - `close(controller)` _**optional**_\n      - : This method, also defined by the developer, will be called if the app signals\n        that it has finished writing chunks to the stream. The contents should do whatever\n        is necessary to finalize writes to the underlying sink, and release access to it.\n        If this process is asynchronous, it can return a promise to signal success or\n        failure. This method will be called only after all queued-up writes have\n        succeeded. The `controller` parameter passed to this method is a\n        `WritableStreamDefaultController`, which can be used to control the\n        stream at the end of writing.\n    - `abort(reason)` _**optional**_\n      - : This method, also defined by the developer, will be called if the app signals\n        that it wishes to abruptly close the stream and put it in an errored state. It can\n        clean up any held resources, much like `close()`, but\n        `abort()` will be called even if writes are queued up — those chunks\n        will be thrown away. If this process is asynchronous, it can return a promise to\n        signal success or failure. The `reason` parameter contains a\n        string describing why the stream was aborted.\n\n- `queuingStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer — this defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk` — this indicates the size to use for each chunk, in bytes.\n\n    > **Note:** You could define your own custom\n    > `queuingStrategy`, or use an instance of\n    > `ByteLengthQueuingStrategy` or `CountQueuingStrategy`\n    > for this object value. If no `queuingStrategy` is supplied, the default\n    > used is the same as a `CountQueuingStrategy` with a high water mark of 1\\.\n\n### Return value\n\nAn instance of the `WritableStream` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/WritableStream/prototype/abort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream.abort()\n\nThe **`abort()`** method of the `WritableStream` interface aborts the stream, signaling that the producer can no longer successfully write to the stream and it is to be immediately moved to an error state, with any queued writes discarded.\n\n## Syntax\n\n```js\nabort(reason)\n```\n\n### Parameters\n\n- `reason`\n  - : A string providing a human-readable reason for the abort.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason` parameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to abort is not a `WritableStream`, or it is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/WritableStream/prototype/getWriter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream.getWriter()\n\nThe **`getWriter()`** method of the `WritableStream` interface returns a new instance of `WritableStreamDefaultWriter` and locks the stream to that instance.\nWhile the stream is locked, no other writer can be acquired until this one is released.\n\n## Syntax\n\n```js\ngetWriter()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `WritableStreamDefaultWriter` object instance.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to create a writer for is not a `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/WritableStream/prototype/locked.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream.locked\n\nThe **`locked`** read-only property of the `WritableStream` interface returns a boolean indicating whether the `WritableStream` is locked to a writer.\n\n## Value\n\nA boolean value indicating whether or not the writable stream is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/WritableStreamDefaultController/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultController.error()\n\nThe **`error()`** method of the\n`WritableStreamDefaultController` interface causes any future interactions\nwith the associated stream to error.\n\nThis method is rarely used, since usually it suffices to return a rejected promise from\none of the underlying sink's methods. However, it can be useful for suddenly shutting\ndown a stream in response to an event outside the normal lifecycle of interactions with\nthe underlying sink.\n\n## Syntax\n\n```js\nerror(message)\n```\n\n### Parameters\n\n- `message`\n  - : A string representing the error you want future interactions to\n    fail with.\n\n### Return value\n\nNone `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to error is not a `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/WritableStreamDefaultWriter/WritableStreamDefaultWriter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter()\n\nThe **`WritableStreamDefaultWriter()`**\nconstructor creates a new `WritableStreamDefaultWriter` object instance.\n\n## Syntax\n\n```js\nnew WritableStreamDefaultWriter(stream)\n```\n\n### Parameters\n\n- `stream`\n  - : The `WritableStream` to be written to.\n\n### Return value\n\nAn instance of the `WritableStreamDefaultWriter` object.\n\n### Exceptions\n\n- `TypeError`\n  - : The provided `stream` value is not a `WritableStream`, or it\n    is locked to another writer already.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/WritableStreamDefaultWriter/prototype/abort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.abort()\n\nThe **`abort()`** method of the\n`WritableStreamDefaultWriter` interface aborts the stream, signaling that\nthe producer can no longer successfully write to the stream and it is to be immediately\nmoved to an error state, with any queued writes discarded.\n\nIf the writer is active, the `abort()` method behaves the same as that for\nthe associated stream (`WritableStream.abort()`). If not, it returns a\nrejected promise.\n\n## Syntax\n\n```js\nabort()\nabort(reason)\n```\n\n### Parameters\n\n- `reason` _**optional**_\n  - : A string representing a human-readable reason for the abort.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason`\nparameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to abort is not a `WritableStream`, or it is\n    locked.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/WritableStreamDefaultWriter/prototype/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.close()\n\nThe **`close()`** method of the\n`WritableStreamDefaultWriter` interface closes the associated writable\nstream.\n\nThe underlying sink will finish processing any previously-written chunks, before\ninvoking the close behavior. During this time any further attempts to write will fail\n(without erroring the stream).\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise`, which fulfills with the `undefined` if all\nremaining chunks were successfully written before the close, or rejects with an error if\na problem was encountered during the process.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to close is not a `WritableStream`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/WritableStreamDefaultWriter/prototype/closed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.closed\n\nThe **`closed`** read-only property of the\n`WritableStreamDefaultWriter` interface returns a\n`Promise` that fulfills if the stream becomes closed, or rejects if\nthe stream errors or the writer's lock is released.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/WritableStreamDefaultWriter/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.desiredSize\n\nThe **`desiredSize`** read-only property of the\n`WritableStreamDefaultWriter` interface returns the desired size required\nto fill the stream's internal queue.\n\n## Value\n\nAn integer. Note that this can be negative if the queue is over-full.\n\nThe value will be `null` if the stream cannot be successfully written to\n(due to either being errored, or having an abort queued up), and zero if the stream is\nclosed.\n\n### Exceptions\n\n- `TypeError`\n  - : The writer's lock is released.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/WritableStreamDefaultWriter/prototype/ready.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.ready\n\nThe **`ready`** read-only property of the\n`WritableStreamDefaultWriter` interface returns a `Promise`\nthat resolves when the desired size of the stream's internal queue transitions from\nnon-positive to positive, signaling that it is no longer applying backpressure.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/WritableStreamDefaultWriter/prototype/releaseLock.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.releaseLock()\n\nThe **`releaseLock()`** method of the\n`WritableStreamDefaultWriter` interface releases the writer's lock on the\ncorresponding stream. After the lock is released, the writer is no longer active. If the\nassociated stream is errored when the lock is released, the writer will appear errored\nin the same way from now on; otherwise, the writer will appear closed.\n\n## Syntax\n\n```js\nreleaseLock()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone `undefined`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/WritableStreamDefaultWriter/prototype/write.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.write()\n\nThe **`write()`** method of the\n`WritableStreamDefaultWriter` interface writes a passed chunk of data to a\n`WritableStream` and its underlying sink, then returns a\n`Promise` that resolves to indicate the success or failure of the write\noperation.\n\nNote that what \"success\" means is up to the underlying sink; it might indicate that the\nchunk has been accepted, and not necessarily that it is safely saved to its ultimate\ndestination.\n\n## Syntax\n\n```js\nwrite(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : A block of binary data to pass to the `WritableStream`.\n\n### Return value\n\nA `Promise`, which fulfills with the `undefined` upon a\nsuccessful write, or rejects if the write fails or stream becomes errored before the\nwriting process is initiated.\n\n### Exceptions\n\n- `TypeError`\n  - : The target stream is not a writable stream, or it does not have an owner.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/atob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# atob()\n\nThe **`atob()`** function decodes a\nstring of data which has been encoded using Base64 encoding. You can use\nthe `btoa()` method to encode and transmit\ndata which may otherwise cause communication problems, then transmit it and use the\n`atob()` method to decode the data again. For example, you can encode,\ntransmit, and decode control characters such as ASCII values 0 through 31.\n\nFor use with Unicode or UTF-8 strings, see the note on \"Unicode strings\" in the page\nfor `btoa()`.\n\n## Syntax\n\n```js\natob(encodedData)\n```\n\n### Parameters\n\n- `encodedData`\n  - : A binary string (i.e., a string in which each character in the string is treated as a byte of binary data) containing base64-encoded data.\n\n### Return value\n\nAn ASCII string containing decoded data from `encodedData`.\n\n### Exceptions\n\n- `InvalidCharacterError`\n  - : Thrown if `encodedData` is not valid base64.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/btoa.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# btoa()\n\nThe **`btoa()`** method creates a\nBase64-encoded ASCII string from a _binary string_ (i.e., a\nstring in which each character in the string is treated as a byte\nof binary data).\n\nYou can use this method to encode data which may otherwise cause communication\nproblems, transmit it, then use the `atob()` method to decode the data again. For example, you can encode control\ncharacters such as ASCII values 0 through 31.\n\n## Syntax\n\n```js\nbtoa(stringToEncode)\n```\n\n### Parameters\n\n- `stringToEncode`\n  - : The _binary string_ to encode.\n\n### Return value\n\nAn ASCII string containing the Base64 representation of\n`stringToEncode`.\n\n### Exceptions\n\n- `InvalidCharacterError`\n  - : The string contained a character that did not fit in a single byte. See \"Unicode\n    strings\" below for more detail.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/clearInterval.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# clearInterval()\n\nThe global **`clearInterval()`** method cancels a timed, repeating action which\nwas previously established by a call to `setInterval()`.\nIf the parameter provided does not identify a previously established action,\nthis method does nothing.\n\n## Syntax\n\n```js\nclearInterval(intervalID)\n```\n\n### Parameters\n\n- `intervalID`\n  - : The identifier of the repeated action you want to cancel. This ID was returned by\n    the corresponding call to `setInterval()`.\n\nIt's worth noting that the pool of IDs used by\n`setInterval()` and\n`setTimeout()` are shared, which\nmeans you can technically use `clearInterval()` and\n`clearTimeout()` interchangeably.\nHowever, for clarity, you should avoid doing so.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/clearTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# clearTimeout()\n\nThe global **`clearTimeout()`** method cancels a timeout previously established\nby calling `setTimeout()`.\n\nIf the parameter provided does not identify a previously established action,\nthis method does nothing.\n\n## Syntax\n\n```js\nclearTimeout(timeoutID)\n```\n\n### Parameters\n\n- `timeoutID`\n  - : The identifier of the timeout you want to cancel. This ID was returned by the\n    corresponding call to `setTimeout()`.\n\nIt's worth noting that the pool of IDs used by\n`setTimeout()` and\n`setInterval()` are shared, which\nmeans you can technically use `clearTimeout()` and\n`clearInterval()`\ninterchangeably. However, for clarity, you should avoid doing so.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/console/assert.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.assert()\n\nThe **`console.assert()`** method writes an error message to\nthe console if the assertion is false. If the assertion is true, nothing happens.\n\n## Syntax\n\n```js\nassert(assertion, obj1)\nassert(assertion, obj1, obj2)\nassert(assertion, obj1, obj2, /* … ,*/ objN)\n\nassert(assertion, msg)\nassert(assertion, msg, subst1)\nassert(assertion, msg, subst1, /* … ,*/ substN)\n```\n\n### Parameters\n\n- `assertion`\n  - : Any boolean expression. If the assertion is false, the message is written to the\n    console.\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output.\n- `msg`\n  - : A JavaScript string containing zero or more substitution strings.\n- `subst1` … `substN`\n  - : JavaScript objects with which to replace substitution strings within\n    `msg`. This parameter gives you additional control over the format of the\n    output.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/console/clear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.clear()\n\nThe **`console.clear()`** method clears the console if the console allows it.\n\n## Syntax\n\n```js\nclear()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/console/count.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.count()\n\nThe **`console.count()`** method logs the number of times that\nthis particular call to `count()` has been called.\n\n\n## Syntax\n\n```js\ncount()\ncount(label)\n```\n\n### Parameters\n\n- `label` _optional_\n  - : A string. If supplied, `count()` outputs the number of\n    times it has been called with that label. If omitted, `count()` behaves as\n    though it was called with the \"default\" label.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/console/countReset.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.countReset()\n\nThe **`console.countReset()`** method resets counter used with `console.count()`.\n\n## Syntax\n\n```js\ncountReset()\ncountReset(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : A string. If supplied, `countReset()` resets the count for\n    that label to 0. If omitted, `countReset()` resets the default counter to\n    0.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/console/debug.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.debug()\n\nThe **`console.debug()`** method outputs a message to the console at the \"debug\" log level.\n\n## Syntax\n\n```js\ndebug(obj1)\ndebug(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output to the console.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/console/dir.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.dir()\n\nThe method **`console.dir()`** displays a list of the properties of\nthe specified JavaScript object.\n\n## Syntax\n\n```js\ndir(object)\n```\n\n### Parameters\n\n- `object`\n  - : A JavaScript object whose properties should be output.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/console/dirxml.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.dirxml()\n\nThe **`console.dirxml()`** method displays the supplied object in the console.\n\n## Syntax\n\n```js\ndirxml(object)\n```\n\n### Parameters\n\n- `object`\n  - : A JavaScript object whose properties should be output.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/console/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.error()\n\nThe **`console.error()`** method outputs an error message console.\n\n## Syntax\n\n```js\nerror(obj1)\nerror(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of\n    these objects are appended together in the order listed and output.\n\n### Return value\n\nNone `undefined`."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/console/group.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.group()\n\nThe **`console.group()`** method creates a new inline group in the console, until `console.groupEnd()` is called.\n\n## Syntax\n\n```js\ngroup()\ngroup(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : Label for the group.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/console/groupCollapsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.groupCollapsed()\n\nThe **`console.groupCollapsed()`** method creates a new inline group in the Web Console. Unlike `console.group()`,\nhowever, the new group is created collapsed. The user will need to use the disclosure\nbutton next to it to expand it, revealing the entries created in the group.\n\nCall `console.groupEnd()` to back out to the parent group.\n\n## Syntax\n\n```js\ngroupCollapsed()\ngroupCollapsed(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : Label for the group.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/console/groupEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.groupEnd()\n\nThe **`console.groupEnd()`** method exits the current inline group in the console.\n\n## Syntax\n\n```js\ngroupEnd()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/console/info.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.info()\n\nThe **`console.info()`** method outputs an informational message to the console.\n\n## Syntax\n\n```js\ninfo(obj1)\ninfo(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/console/log.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.log()\n\nThe **`console.log()`** method outputs a message to the console.\n\n## Syntax\n\n```js\nlog(obj1)\nlog(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output. Please be warned that if\n    you log objects in the latest versions of Chrome and Firefox what you get logged on\n    the console is a _reference to the object_, which is not necessarily the\n    'value' of the object at the moment in time you call `console.log()`, but\n    it is the value of the object at the moment you open the console.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/console/time.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.time()\n\nThe **`console.time()`** method starts a timer you can use to track\nhow long an operation takes. You give each timer a unique name. When you call `console.timeEnd()` with the same name, the\nbrowser will output the time, in milliseconds, that elapsed since the timer was started.\n\n## Syntax\n\n```js\ntime(label)\n```\n\n### Parameters\n\n- `label`\n  - : A `string` representing the name to give the new timer. This will identify the timer; use the same name when\n    calling `console.timeEnd()` to stop the timer and get the time output to\n    the console.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/console/timeEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.timeEnd()\n\nThe **`console.timeEnd()`** stops a timer that was previously started by calling `console.time()`.\n\n## Syntax\n\n```js\ntimeEnd(label)\n```\n\n### Parameters\n\n- `label`\n  - : A `string` representing the name of the timer to stop. Once stopped, the elapsed time is automatically\n    displayed in the console.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/console/timeLog.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.timeLog()\n\nThe **`console.timeLog()`** method logs the current value of a timer that was previously started by calling `console.time()`.\n\n## Syntax\n\n```js\ntimeLog()\ntimeLog(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : The name of the timer to log to the console. If this is omitted the label \"default\" is used.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/console/trace.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.trace()\n\nThe **`console.trace()`** method outputs a stack trace to the console.\n\n## Syntax\n\n```js\ntrace()\ntrace(object1, /* …, */ objectN)\n```\n\n### Parameters\n\n- `objects` __optional__\n  - : Zero or more objects to be output to console along with the trace. These are\n    assembled and formatted the same way they would be if passed to the `console.log()` method.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/console/warn.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.warn()\n\nThe **`console.warn()`** method outputs a warning message to the console.\n\n## Syntax\n\n```js\nwarn(obj1)\nwarn(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/crypto/getRandomValues.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Crypto.getRandomValues()\n\nThe **`Crypto.getRandomValues()`** method lets you get cryptographically strong random values.\nThe array given as the parameter is filled with random numbers (random in its cryptographic meaning).\n\n## Syntax\n\n```js\ngetRandomValues(typedArray)\n```\n\n### Parameters\n\n- `typedArray`\n  - : An integer-based `TypedArray`, that is one of: `Int8Array`, `Uint8Array`,\n    `Uint8ClampedArray`, `Int16Array`, `Uint16Array`,\n    `Int32Array`, `Uint32Array`, `BigInt64Array`,\n    `BigUint64Array` (but **not** `Float32Array` nor `Float64Array`).\n    All elements in the array will be overwritten with random numbers.\n\n### Return value\n\nThe same array passed as `typedArray` but with its contents replaced with the newly generated random numbers.\nNote that `typedArray` is modified in-place, and no copy is made.\n\n### Exceptions\n\n- `QuotaExceededError`\n  - : Thrown if the `byteLength` of `typedArray` exceeds 65,536.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/crypto/randomUUID.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Crypto.randomUUID()\n\nThe **`randomUUID()`** method is used to generate a v4 [UUID](https://developer.mozilla.org/en-US/docs/Glossary/UUID) using a cryptographically secure random number generator.\n\n## Syntax\n\n```js\nrandomUUID()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string containing a randomly generated, 36 character long v4 UUID."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/crypto/subtle.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Crypto.subtle\n\nThe **`Crypto.subtle`** read-only property returns a\n[`SubtleCrypto`](../SubtleCrypto/SubtleCrypto.mdx) which can then be used to perform low-level\ncryptographic operations.\n\n## Value\n\nA [`SubtleCrypto`](../SubtleCrypto/SubtleCrypto.mdx) object you can use to interact with the Web Crypto API's\nlow-level cryptography features.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/decodeURI.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# decodeURI\n\nThe **`decodeURI()`** function decodes a Uniform Resource Identifier (URI) previously created by [`encodeURI()`](../globals/encodeURI.mdx) or a similar routine.\n\n## Syntax\n\n```js\ndecodeURI(encodedURI)\n```\n\n### Parameters\n\n- `encodedURI`\n  - : A complete, encoded Uniform Resource Identifier.\n\n### Return value\n\nA new string representing the unencoded version of the given encoded Uniform Resource Identifier (URI).\n\n### Exceptions\n\n- [`URIError`](../globals/URIError/URIError.mdx)\n  - : Thrown if `encodedURI` contains a `%` not followed by two hexadecimal digits, or if the escape sequence does not encode a valid UTF-8 character.\n\n## Description\n\n`decodeURI()` is a function property of the global object.\n\nThe `decodeURI()` function decodes the URI by treating each escape sequence in the form `%XX` as one UTF-8 code unit (one byte). In UTF-8, the number of leading 1 bits in the first byte, which may be 0 (for 1-byte ASCII characters), 2, 3, or 4, indicates the number of bytes in the character. So by reading the first escape sequence, `decodeURI()` can determine how many more escape sequences to consume. If `decodeURI()` fails to find the expected number of sequences, or if the escape sequences don't encode a valid UTF-8 character, a [`URIError`](../globals/URIError/URIError.mdx) is thrown.\n\n`decodeURI()` decodes all escape sequences, but if the escape sequence encodes one of the following characters, the escape sequence is preserved in the output string (because they are part of the URI syntax):\n\n```\n; / ? : @ & = + $ , #\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/decodeURIComponent.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# decodeURIComponent\n\nThe **`decodeURIComponent()`** function decodes a Uniform Resource Identifier (URI) component previously created by [`encodeURIComponent()`](./encodeURIComponent.mdx) or by a similar routine.\n\n\n## Syntax\n\n```js\ndecodeURIComponent(encodedURI)\n```\n\n### Parameters\n\n- `encodedURI`\n  - : An encoded component of a Uniform Resource Identifier.\n\n### Return value\n\nA new string representing the decoded version of the given encoded Uniform Resource Identifier (URI) component.\n\n### Exceptions\n\n- [`URIError`](../globals/URIError/URIError.mdx)\n  - : Thrown if `encodedURI` contains a `%` not followed by two hexadecimal digits, or if the escape sequence does not encode a valid UTF-8 character.\n\n## Description\n\n`decodeURIComponent()` is a function property of the global object.\n\n`decodeURIComponent()` uses the same decoding algorithm as described in [`decodeURI()`](./decodeURI.mdx). It decodes _all_ escape sequences, including those that are not created by [`encodeURIComponent()`](./encodeURIComponent.mdx), like `-.!~*'()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/encodeURI.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# encodeURI()\n\nThe **`encodeURI()`** function encodes a URI by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character (will only be four escape sequences for characters composed of two surrogate characters). Compared to [`encodeURIComponent()`](./encodeURIComponent.mdx), this function encodes fewer characters, preserving those that are part of the URI syntax.\n\n## Syntax\n\n```js\nencodeURI(uri)\n```\n\n### Parameters\n\n- `uri`\n  - : A string to be encoded as a URI.\n\n### Return value\n\nA new string representing the provided string encoded as a URI.\n\n### Exceptions\n\n- [`URIError`](./URIError/URIError.mdx)\n  - : Thrown if `uri` contains a [lone surrogate](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters).\n\n## Description\n\n`encodeURI()` is a function property of the global object.\n\nThe `encodeURI()` function escapes characters by UTF-8 code units, with each octet encoded in the format `%XX`, left-padded with 0 if necessary. Because lone surrogates in UTF-16 do not encode any valid Unicode character, they cause `encodeURI()` to throw a [`URIError`](./URIError/URIError.mdx).\n\n`encodeURI()` escapes all characters **except**:\n\n```\nA–Z a–z 0–9 - _ . ! ~ * ' ( )\n\n; / ? : @ & = + $ , #\n```\n\nThe characters on the second line are characters that may be part of the URI syntax, and are only escaped by `encodeURIComponent()`. Both `encodeURI()` and `encodeURIComponent()` do not encode the characters `-.!~*'()`, known as \"unreserved marks\", which do not have a reserved purpose but are allowed in a URI \"as is\". (See [RFC2396](https://www.ietf.org/rfc/rfc2396.txt))\n\nThe `encodeURI()` function does not encode characters that have special meaning (reserved characters) for a URI. The following example shows all the parts that a URI can possibly contain. Note how certain characters are used to signify special meaning:\n\n```\nhttp://username:password@www.example.com:80/path/to/file.php?foo=316&bar=this+has+spaces#anchor\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/encodeURIComponent.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# encodeURIComponent\n\nThe **`encodeURIComponent()`** function encodes a URI by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character (will only be four escape sequences for characters composed of two surrogate characters). Compared to [`encodeURI()`](./encodeURI.mdx), this function encodes more characters, including those that are part of the URI syntax.\n\n## Syntax\n\n```js\nencodeURIComponent(uriComponent)\n```\n\n### Parameters\n\n- `uriComponent`\n  - : A string to be encoded as a URI component (a path, query string, fragment, etc.). Other values are [converted to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion).\n\n### Return value\n\nA new string representing the provided `uriComponent` encoded as a URI component.\n\n### Exceptions\n\n- [`URIError`](./URIError/URIError.mdx)\n  - : Thrown if `uriComponent` contains a [lone surrogate](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters).\n\n## Description\n\n`encodeURIComponent()` is a function property of the global object.\n\n`encodeURIComponent()` uses the same encoding algorithm as described in [`encodeURI()`](./encodeURI.mdx). It escapes all characters **except**:\n\n```text\nA–Z a–z 0–9 - _ . ! ~ * ' ( )\n```\n\nCompared to [`encodeURI()`](./encodeURI.mdx), `encodeURIComponent()` escapes a larger set of characters. Use `encodeURIComponent()` on user-entered fields from forms `POST`'d to the server — this will encode `&` symbols that may inadvertently be generated during data entry for special HTML entities or other characters that require encoding/decoding. For example, if a user writes `Jack & Jill`, without `encodeURIComponent()`, the ampersand could be interpreted on the server as the start of a new field and jeopardize the integrity of the data.\n\nFor [`application/x-www-form-urlencoded`](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#application/x-www-form-urlencoded-encoding-algorithm), spaces are to be replaced by `+`, so one may wish to follow a `encodeURIComponent()` replacement with an additional replacement of `%20` with `+`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/escape.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# escape()\n\n> **Note:** `escape()` is a non-standard function implemented by browsers and was only standardized for cross-engine compatibility. It is not required to be implemented by all JavaScript engines and may not work everywhere. Use [`encodeURIComponent()`](./encodeURIComponent.mdx) or [`encodeURI()`](./encodeURI.mdx) if possible.\n\nThe **`escape()`** function computes a new string in which certain characters have been replaced by hexadecimal escape sequences.\n\n## Syntax\n\n```js\nescape(str)\n```\n\n### Parameters\n\n- `str`\n  - : A string to be encoded.\n\n### Return value\n\nA new string in which certain characters have been escaped.\n\n## Description\n\n`escape()` is a function property of the global object.\n\nThe `escape()` function replaces all characters with escape sequences, with the exception of ASCII word characters (A–Z, a–z, 0–9, _) and `@*_+-./`. Characters are escaped by UTF-16 code units. If the code unit's value is less than 256, it is represented by a two-digit hexadecimal number in the format `%XX`, left-padded with 0 if necessary. Otherwise, it is represented by a four-digit hexadecimal number in the format `%uXXXX`, left-padded with 0 if necessary.\n\n> **Note:** This function was used mostly for URL encoding and is partly based on the escape format in rfc(1738). The escape format is _not_ an [escape sequence](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#escape_sequences) in string literals. You can replace `%XX` with `\\xXX` and `%uXXXX` with `\\uXXXX` to get a string containing actual string-literal escape sequences.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/eval.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# eval\n\n> **Warning:** Executing JavaScript from a string is an enormous security risk. It is far too easy for a bad actor to run arbitrary code when you use `eval()`. See [never use direct eval](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval#never_use_direct_eval!) for details.\n\nThe **`eval()`** function evaluates JavaScript code represented as a string and returns its completion value. The source is parsed as a script.\n\n## Syntax\n\n```js\neval(script)\n```\n\n### Parameters\n\n- `script`\n  - : A string representing a JavaScript expression, statement, or sequence of statements. The expression can include variables and properties of existing objects. It will be parsed as a script, so [`import`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/import) declarations (which can only exist in modules) are not allowed.\n\n### Return value\n\nThe completion value of evaluating the given code. If the completion value is empty, [`undefined`](./undefined.mdx) is returned. If `script` is not a string primitive, `eval()` returns the argument unchanged.\n\n### Exceptions\n\nThrows any exception that occurs during evaluation of the code, including[ `SyntaxError`](./SyntaxError/SyntaxError.mdx) if `script` fails to be parsed as a script.\n\n## Description\n\n`eval()` is a function property of the global object.\n\nThe argument of the `eval()` function is a string. It will evaluate the source string as a script body, which means both statements and expressions are allowed. It returns the completion value of the code. For expressions, it's the value the expression evaluates to. Many statements and declarations have completion values as well, but the result may be surprising (for example, the completion value of an assignment is the assigned value, but the completion value of [`let`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/let) is undefined), so it's recommended to not rely on statements' completion values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/fetch.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# fetch()\n\nThe global **`fetch()`** method starts the process of fetching a\nresource from the network, returning a promise which is fulfilled once the response is\navailable.\n\nThe promise resolves to the `Response` object\nrepresenting the response to your request.\n\nA `fetch()` promise only rejects when a\nnetwork error is encountered (which is usually when there's a permissions issue or\nsimilar). A `fetch()` promise _does\nnot_ reject on HTTP errors (`404`, etc.). Instead, a\n`then()` handler must check the `Response.ok` and/or\n`Response.status` properties.\n\n> **Note:** The `fetch()` method's parameters are identical to\n> those of the `Request()` constructor.\n\n## Explicit Backends\n\nInternally, Fastly uses named backends to handle fetch requests, which need to be explicitly defined to enable custom HTTP origins to be fetched by the service.\n\nThis `backend` option is then a special Fastly-specific fetch option that is provided to the `fetch()` call:\n\n```js\nfetch('https://origin.com/path', { backend: 'origin' });\n```\n\nBackends are configured using the Fastly service backend configuration, see the [Backend documentation](https://developer.fastly.com/reference/api/services/backend/) for more information.\n\n## Dynamic Backends\n\nDynamic backends are a compute feature that allow services to define backends for themselves.\n\nIf the `backend` option is not provided when making `fetch()` requests, a backend will be automatically created by extracting the protocol, host, and port from the provided URL.\n\nIn addition, custom backend configuration options can then also be provided through the [`Backend()`](../fastly:backend/Backend/Backend.mdx) constructor.\n\n## Syntax\n\n```js\nfetch(resource)\nfetch(resource, options)\n```\n\n### Parameters\n\n- `resource`\n\n  - : This defines the resource that you wish to fetch. This can either be:\n\n    - A string or any other object with a \"toString\" method.\n    - A `Request` object.\n\n- `options` _**optional**_\n\n  - : An object containing any custom settings that you want to apply to the request. The\n    possible options are:\n\n    - `method`\n      - : The request method, e.g., `GET`, `POST`.\n    - `headers`\n      - : Any headers you want to add to your request, contained within a\n        `Headers` object or an object literal with `String`\n        values.\n    - `body`\n      - : Any body that you want to add to your request: this can be an `ArrayBuffer`, a `TypedArray`, a `DataView`, a `URLSearchParams`, string object or literal, or a `ReadableStream` object.\n    - `backend` _**Fastly-specific**_\n      - *Fastly-specific*\n    - `cacheOverride` _**Fastly-specific**_\n    - `cacheKey` _**Fastly-specific**_\n    - `imageOptimizerOptions` _**Fastly-specific**_, see [`imageOptimizerOptions`](../fastly:image-optimizer/imageOptimizerOptions.mdx).\n    - `fastly` _**Fastly-specific**_\n      - `decompressGzip`_: boolean_ _**optional**_\n        - Whether to automatically gzip decompress the Response or not.\n\n### Return value\n\nA `Promise` that resolves to a `Response` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/globalThis.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# globalThis\n\nThe global **`globalThis`** property contains the [global `this`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this#global_context) value, which is usually akin to the [global object](https://developer.mozilla.org/docs/Glossary/Global_object).\n\n## Value\n\nThe global `this` object.\n\n> **Note:** The `globalThis` property is configurable and writable so that code authors can hide it when executing untrusted code and prevent exposing the global object.\n\n## Description\n\nThe `globalThis` property provides a standard way of accessing the global `this` value (and hence the global object itself) across environments.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/isFinite.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# isFinite\n\nThe global **`isFinite()`** function determines whether the\npassed value is a finite number. If needed, the parameter is first converted to a\nnumber.\n\n## Syntax\n\n```js\nisFinite(testValue)\n```\n\n### Parameters\n\n- `testValue`\n  - : The value to be tested for finiteness.\n\n### Return value\n\n**`false`** if the argument is (or will be coerced to) positive\nor negative [`Infinity`](./Infinity.mdx) or [`NaN`](./NaN.mdx) or [`undefined`](./undefined.mdx);\notherwise, **`true`**.\n\n## Description\n\n`isFinite` is a function property of the global object.\n\nYou can use this function to determine whether a number is a finite number. The\n`isFinite` function examines the number in its argument. If the argument is\n`NaN`, positive infinity, or negative infinity, this method returns\n`false`; otherwise, it returns `true`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/isNaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# isNaN()\n\nThe **`isNaN()`** function determines whether a value is [`NaN`](./NaN.mdx) when converted to a number. Because coercion inside the `isNaN()` function can be [surprising](#description), you may alternatively want to use [`Number.isNaN()`](./Number/isNaN.mdx).\n\n## Syntax\n\n```js\nisNaN(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested.\n\n### Return value\n\n`true` if the given value is [`NaN`](./NaN.mdx) after being [converted to a number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_coercion); otherwise, `false`.\n\n## Description\n\n`isNaN()` is a function property of the global object.\n\nFor number values, `isNaN()` tests if the number is the value [`NaN`](./NaN.mdx). When the argument to the `isNaN()` function is not of type [Number](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#number_type), the value is first coerced to a number, and the resulting value is then compared against [`NaN`](./NaN.mdx).\n\nThis behavior of `isNaN()` for non-numeric arguments can be confusing! For example, an empty string is coerced to 0, while a boolean is coerced to 0 or 1; both values are intuitively \"not numbers\", but they don't evaluate to `NaN`, so `isNaN()` returns `false`. Therefore, `isNaN()` answers neither the question \"is the input the floating point [`NaN`](./NaN.mdx) value\" nor the question \"is the input not a number\".\n\n[`Number.isNaN()`](./Number/isNaN.mdx) is a more reliable way to test whether a value is the number value `NaN` or not. Alternatively, the expression `x !== x` can be used, and neither of the solutions is subject to the false positives that make the global `isNaN()` unreliable. To test if a value is a number, use [`typeof x === \"number\"`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/typeof).\n\nThe `isNaN()` function answers the question \"is the input functionally equivalent to [`NaN`](./NaN.mdx) when used in a number context\". If `isNaN(x)` returns `false`, you can use `x` in an arithmetic expression as if it's a valid number that's not `NaN`. If `isNaN(x)` returns `true`, `x` will get coerced to `NaN` and make most arithmetic expressions return `NaN` (because `NaN` propagates). You can use this, for example, to test whether an argument to a function is arithmetically processable (usable \"like\" a number), and handle values that are not number-like by throwing an error, providing a default value, etc. This way, you can have a function that makes use of the full versatility JavaScript provides by implicitly converting values depending on context.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/location.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# location\n\nThe **`location`** read-only property returns a\n[`Location`](../globals/WorkerLocation/WorkerLocation.mdx) object with information about the current location of the\ndocument.\n\nSee [`Location`](../globals/WorkerLocation/WorkerLocation.mdx) for all available properties.\n\n## Value\n\nA [`Location`](../globals/WorkerLocation/WorkerLocation.mdx) object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/parseFloat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# parseFloat()\n\nThe **`parseFloat()`** function parses a string argument and returns a floating point number.\n\n## Syntax\n\n```js\nparseFloat(string)\n```\n\n### Parameters\n\n- `string`\n  - : The value to parse, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). Leading whitespace in this argument is ignored.\n\n### Return value\n\nA floating point number parsed from the given `string`, or [`NaN`](./NaN.mdx) when the first non-whitespace character cannot be converted to a number.\n\n> **Note:** JavaScript does not have the distinction of \"floating point numbers\" and \"integers\" on the language level. [`parseInt()`](./parseInt.mdx) and `parseFloat()` only differ in their parsing behavior, but not necessarily their return values. For example, `parseInt(\"42\")` and `parseFloat(\"42\")` would return the same value: a `Number` 42.\n\n## Description\n\nThe `parseFloat` function converts its first argument to a string, parses that string as a decimal number literal, then returns a number or `NaN`. The number syntax it accepts can be summarized as:\n\n- The characters accepted by `parseFloat()` are plus sign (`+`), minus sign (`-` U+002D HYPHEN-MINUS), decimal digits (`0` – `9`), decimal point (`.`), exponent indicator (`e` or `E`), and the `\"Infinity\"` literal.\n- The `+`/`-` signs can only appear strictly at the beginning of the string, or immediately following the `e`/`E` character. The decimal point can only appear once, and only before the `e`/`E` character. The `e`/`E` character can only appear once, and only if there is at least one digit before it.\n- Leading spaces in the argument are trimmed and ignored.\n- `parseFloat()` can also parse and return [`Infinity`](./Infinity.mdx) or `-Infinity` if the string starts with `\"Infinity\"` or `\"-Infinity\"` preceded by none or more white spaces.\n- `parseFloat()` picks the longest substring starting from the beginning that generates a valid number literal. If it encounters an invalid character, it returns the number represented up to that point, ignoring the invalid character and all characters following it.\n- If the argument's first character can't start a legal number literal per the syntax above, `parseFloat` returns [`NaN`](./NaN.mdx).\n\nSyntax-wise, `parseFloat()` parses a subset of the syntax that the [`Number()`](./Number/Number.mdx) function accepts. Namely, `parseFloat()` does not support non-decimal literals with `0x`, `0b`, or `0o` prefixes but supports everything else. However, `parseFloat()` is more lenient than `Number()` because it ignores trailing invalid characters, which would cause `Number()` to return `NaN`.\n\nSimilar to number literals and `Number()`, the number returned from `parseFloat()` may not be exactly equal to the number represented by the string, due to floating point range and inaccuracy. For numbers outside the `-1.7976931348623158e+308` – `1.7976931348623158e+308` range (see `Number.MAX_VALUE`), `-Infinity` or `Infinity` is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/parseInt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# parseInt\n\nThe **`parseInt()`** function parses a string argument and returns an integer of the specified [radix](https://en.wikipedia.org/wiki/Radix) (the base in mathematical numeral systems).\n\n\n\n## Syntax\n\n```js\nparseInt(string)\nparseInt(string, radix)\n```\n\n### Parameters\n\n- `string`\n  - : A string starting with an integer. Leading whitespace in this argument is ignored.\n- `radix` _**optional**_\n\n  - : An integer between `2` and `36` that represents the _radix_ (the base in mathematical numeral systems) of the `string`. It is converted to a [32-bit integer](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#fixed-width_number_conversion); if it's outside the range of \\[2, 36] after conversion, the function will always return `NaN`. If `0` or not provided, the radix will be inferred based on `string`'s value. Be careful — this does NOT always default to `10`! The [description below](#description) explains in more detail what happens when `radix` is not provided.\n\n### Return value\n\nAn integer parsed from the given `string`, or [`NaN`](./NaN.mdx) when\n\n- the `radix` as a 32-bit integer is smaller than `2` or bigger than `36`, or\n- the first non-whitespace character cannot be converted to a number.\n\n> **Note:** JavaScript does not have the distinction of \"floating point numbers\" and \"integers\" on the language level. `parseInt()` and [`parseFloat()`](./parseFloat.mdx) only differ in their parsing behavior, but not necessarily their return values. For example, `parseInt(\"42\")` and `parseFloat(\"42\")` would return the same value: a `Number` 42.\n\n## Description\n\nThe `parseInt` function converts its first argument to a string, parses that string, then returns an integer or `NaN`.\n\nIf not `NaN`, the return value will be the integer that is the first argument taken as a number in the specified `radix`. (For example, a `radix` of `10` converts from a decimal number, `8` converts from octal, `16` from hexadecimal, and so on.)\n\nThe `radix` argument is converted to a number. If it's unprovided, or if the value becomes 0, `NaN` or `Infinity` (`undefined` is coerced to `NaN`), JavaScript assumes the following:\n\n1. If the input `string`, with leading whitespace and possible `+`/`-` signs removed, begins with `0x` or `0X` (a zero, followed by lowercase or uppercase X), `radix` is assumed to be `16` and the rest of the string is parsed as a hexadecimal number.\n2. If the input `string` begins with any other value, the radix is `10` (decimal).\n\n> **Note:** Other prefixes like `0b`, which are valid in [number literals](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#binary), are treated as normal digits by `parseInt()`. `parseInt()` does _not_ treat strings beginning with a `0` character as octal values either. The only prefix that `parseInt()` recognizes is `0x` or `0X` for hexadecimal values — everything else is parsed as a decimal value if `radix` is missing.\n\nIf the radix is `16`, `parseInt()` allows the string to be optionally prefixed by `0x` or `0X` after the optional sign character (`+`/`-`).\n\nIf the radix value (coerced if necessary) is not in range \\[2, 36] (inclusive) `parseInt` returns `NaN`.\n\nFor radices above `10`, letters of the English alphabet indicate numerals greater than `9`. For example, for hexadecimal numbers (base `16`), `A` through `F` are used. The letters are case-insensitive.\n\n`parseInt` understands exactly two signs: `+` for positive, and `-` for negative. It is done as an initial step in the parsing after whitespace is removed. If no signs are found, the algorithm moves to the following step; otherwise, it removes the sign and runs the number-parsing on the rest of the string.\n\nIf `parseInt` encounters a character that is not a numeral in the specified `radix`, it ignores it and all succeeding characters and returns the integer value parsed up to that point. For example, although `1e3` technically encodes an integer (and will be correctly parsed to the integer `1000` by [`parseFloat()`](./parseFloat.mdx), `parseInt(\"1e3\", 10)` returns `1`, because `e` is not a valid numeral in base 10. Because `.` is not a numeral either, the return value will always be an integer.\n\nIf the first character cannot be converted to a number with the radix in use, `parseInt` returns `NaN`. Leading whitespace is allowed.\n\nFor arithmetic purposes, the `NaN` value is not a number in any radix. You can call the [`Number.isNaN`](./Number/isNaN.mdx) function to determine if the result of `parseInt` is `NaN`. If `NaN` is passed on to arithmetic operations, the operation result will also be `NaN`.\n\nBecause large numbers use the `e` character in their string representation (e.g. `6.022e23` for 6.022 × 10<sup>23</sup>), using `parseInt` to truncate numbers will produce unexpected results when used on very large or very small numbers. `parseInt` should _not_ be used as a substitute for [`Math.trunc()`](./Math/trunc.mdx).\n\nTo convert a number to its string literal in a particular radix, use [`thatNumber.toString(radix)`](./Number/prototype/toString.mdx).\n\nBecause `parseInt()` returns a number, it may suffer from loss of precision if the integer represented by the string is [outside the safe range](./Number/isSafeInteger.mdx). The [`BigInt`](./BigInt/BigInt.mdx) function supports parsing integers of arbitrary length accurately, by returning a `BigInt`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/performance/now.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# performance.now()\n\nThe **`performance.now()`** method returns a high resolution timestamp in milliseconds.\nIt represents the time elapsed since [`performance.timeOrigin`](./timeOrigin.mdx) (the time when the worker was instantiated).\n\n## Syntax\n\n```js\nnow()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns a number which represents the time since worker instantation measured in milliseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/performance/timeOrigin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# performance.timeOrigin\n\nThe **`timeOrigin`** read-only property of the Performance interface returns the high resolution timestamp that is used as the baseline for performance-related timestamps.\n\nThis value represents the time when the worker was instantiated.\n\n### Value\n\nReturns a number which represents the time when the worker was instantation."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/setInterval.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# setInterval()\n\nThe **`setInterval()`** method, repeatedly\ncalls a function or executes a code snippet, with a fixed time delay between each\ncall.\n\nThis method returns an interval ID which uniquely identifies the interval, so you\ncan remove it later by calling `clearInterval()`.\n\n## Syntax\n\n```js\nsetInterval(code)\nsetInterval(code, delay)\n\nsetInterval(func)\nsetInterval(func, delay)\nsetInterval(func, delay, arg0)\nsetInterval(func, delay, arg0, arg1)\nsetInterval(func, delay, arg0, arg1, /* … ,*/ argN)\n```\n\n### Parameters\n\n- `func`\n  - : A `function` to be executed every `delay` milliseconds. The first execution happens after `delay` milliseconds.\n- `code`\n  - : An optional syntax allows you to include a string instead of a function, which is\n    compiled and executed every `delay` milliseconds. This syntax is _not\n    recommended_ for the same reasons that make using `eval() a\n    security risk.\n- `delay` _**optional**_\n  - : The time, in milliseconds (thousandths of a second), the timer should delay in\n    between executions of the specified function or code. Defaults to 0 if not specified.\n    below for details on the permitted range of `delay` values.\n- `arg0, …, argN` _**optional**_\n  - : Additional arguments which are passed through to the function specified by\n    _func_ once the timer expires.\n\n### Return value\n\nThe returned `intervalID` is a numeric, non-zero value which identifies the\ntimer created by the call to `setInterval()`; this value can be passed to\n`clearInterval()` to cancel the interval.\n\nIt may be helpful to be aware that `setInterval()` and\n`setTimeout()` share the same pool\nof IDs, and that `clearInterval()` and\n`clearTimeout()` can technically\nbe used interchangeably. For clarity, however, you should try to always match them to\navoid confusion when maintaining your code.\n\n> **Note:** The `delay` argument is converted to a\n> signed 32-bit integer. This effectively limits `delay` to 2147483647 ms,\n> since it's specified as a signed integer in the IDL.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/setTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# setTimeout()\n\nThe global **`setTimeout()`** method sets a timer which executes a function or specified\npiece of code once the timer expires.\n\n## Syntax\n\n```js\nsetTimeout(code)\nsetTimeout(code, delay)\n\nsetTimeout(functionRef)\nsetTimeout(functionRef, delay)\nsetTimeout(functionRef, delay, param1)\nsetTimeout(functionRef, delay, param1, param2)\nsetTimeout(functionRef, delay, param1, param2, /* … ,*/ paramN)\n```\n\n### Parameters\n\n- `functionRef`\n  - : A `function` to be executed after the timer expires.\n- `code`\n  - : An alternative syntax that allows you to include a string instead of a function,\n    which is compiled and executed when the timer expires. This syntax is **not\n    recommended** for the same reasons that make using\n    `eval()` a security risk.\n- `delay` _**optional**_\n\n  - : The time, in milliseconds that the timer should wait before\n    the specified function or code is executed. If this parameter is omitted, a value of 0\n    is used, meaning execute \"immediately\", or more accurately, the next event cycle.\n\n- `param1`, …, `paramN` _**optional**_\n\n  - : Additional arguments which are passed through to the function specified by\n    `functionRef`.\n\n### Return value\n\nThe returned `timeoutID` is a positive integer value which\nidentifies the timer created by the call to `setTimeout()`. This value can be\npassed to `clearTimeout()` to\ncancel the timeout.\n\nIt is guaranteed that a `timeoutID` value will never be reused by a subsequent call to\n`setTimeout()` or `setInterval()` on the same object (a window or\na worker). However, different objects use separate pools of IDs.\n\n## Description\n\nTimeouts are cancelled using `clearTimeout()`.\n\nTo call a function repeatedly (e.g., every _N_ milliseconds), consider using\n`setInterval()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/structuredClone.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# structuredClone()\n\nThe global **`structuredClone()`** method creates a deep clone of a given value.\n\n## Syntax\n\n```js\nstructuredClone(value)\n```\n\n### Parameters\n\n- `value`\n  - : The object to be cloned.\n\n### Return value\n\nThe returned value is a deep copy of the original `value`.\n\n### Exceptions\n\n- `DataCloneError`\n  - : Thrown if any part of the input value is not serializable.\n\n## Description\n\nThis function can be used to deep copy JavaScript values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/undefined.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# undefined\n\nThe global **`undefined`** property represents the primitive\nvalue `undefined`. It is one of JavaScript's \"primitive types\".\n\n## Value\n\nThe primitive value `undefined`.\n\n## Description\n\n`undefined` is a property of the _global object_. That is, it is a variable in global scope.\n\n`undefined` is a non-configurable, non-writable property.\n\nA variable that has not been assigned a value is of type `undefined`. A\nmethod or statement also returns `undefined` if the variable that is being\nevaluated does not have an assigned value. A function returns `undefined` if\na value was not explicitly returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/globals/unescape.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# unescape()\n\n> **Note:** `unescape()` is a non-standard function implemented by browsers and was only standardized for cross-engine compatibility. It is not required to be implemented by all JavaScript engines and may not work everywhere. Use [`decodeURIComponent()`](./decodeURIComponent.mdx) or [`decodeURI()`](./decodeURI.mdx) if possible.\n\nThe **`unescape()`** function computes a new string in which hexadecimal escape sequences are replaced with the characters that they represent. The escape sequences might be introduced by a function like [`escape()`](./escape.mdx).\n\n## Syntax\n\n```js\nunescape(str)\n```\n\n### Parameters\n\n- `str`\n  - : A string to be decoded.\n\n### Return value\n\nA new string in which certain characters have been unescaped.\n\n## Description\n\n`unescape()` is a function property of the global object.\n\nThe `unescape()` function replaces any escape sequence with the character that it represents. Specifically, it replaces any escape sequence of the form `%XX` or `%uXXXX` (where `X` represents one hexadecimal digit) with the character that has the hexadecimal value `XX`/`XXXX`. If the escape sequence is not a valid escape sequence (for example, if `%` is followed by one or no hex digit), it is left as-is.\n\n> **Note:** This function was used mostly for URL encoding and is partly based on the escape format in rfc(1738). The `unescape()` function does _not_ evaluate [escape sequences](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#escape_sequences) in string literals. You can replace `\\xXX` with `%XX` and `\\uXXXX` with `%uXXXX` to get a string that can be handled by `unescape()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/html-rewriter/Element/prototype/after.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# after\n\nThe `after` method inserts content after the closing tag of the element.\n\n## Syntax\n\n```js\nelement.after(content);\nelement.after(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to insert after the element's closing tag.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.after(\"World\");\n// Result: <div>Hello</div>World\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/html-rewriter/Element/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# append\n\nThe `append` method inserts content at the end of the element's content.\n\n## Syntax\n\n```js\nelement.append(content);\nelement.append(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to insert at the end of the element's content.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.append(\", World\");\n// Result: <div>Hello, World</div>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/html-rewriter/Element/prototype/before.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# before\n\nThe `before` method inserts content before the opening tag of the element.\n\n## Syntax\n\n```js\nelement.before(content);\nelement.before(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to insert before the element's opening tag.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.before(\"Well\");\n// Result: Well<div>Hello</div>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/html-rewriter/Element/prototype/hasAttribute.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# hasAttribute\n\nThe `hasAttribute` method returns a `boolean` value indicating whether the specified attribute is present on the element.\n\n## Syntax\n\n```js\nelement.hasAttribute(attributeName);\n```\n\n### Parameters\n\n- `attributeName` _: string_\n  - The name of the attribute to check for.\n\n### Return value\n\nA boolean value indicating whether the attribute is present.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/html-rewriter/Element/prototype/prepend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# prepend\n\nThe `prepend` method inserts content at the beginning of the element's content.\n\n## Syntax\n\n```js\nelement.prepend(content);\nelement.prepend(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to insert at the beginning of the element's content.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.prepend(\"Well, \");\n// Result: <div>Well, Hello</div>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/html-rewriter/Element/prototype/removeAttribute.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# removeAttribute\n\nThe `removeAttribute` method removes the specified attribute from the element.\n\n## Syntax\n\n```js\nelement.removeAttribute(attributeName);\n```\n\n### Parameters\n\n- `attributeName` _: string_\n  - The name of the attribute to remove.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/html-rewriter/Element/prototype/replaceChildren.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# replaceChildren\n\nThe `replaceChildren` method replaces the element's children with new content.\n\n## Syntax\n\n```js\nelement.replaceChildren(content);\nelement.replaceChildren(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to replace the element's children with.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.replaceChildren(\"Greetings!\");\n// Result: <div>Greetings!</div>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/html-rewriter/Element/prototype/replaceWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# replaceWith\n\nThe `replaceWith` method replaces the element with new content.\n\n## Syntax\n\n```js\nelement.replaceWith(content);\nelement.replaceWith(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to replace the element with.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.replaceWith(\"<p>Greetings!</p>\");\n// Result: <p>Greetings!</p>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/html-rewriter/Element/prototype/selector.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# selector\n\nThe `selector` read-only property is a `string` representing the [CSS selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors) that matches the element.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/html-rewriter/Element/prototype/setAttribute.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# setAttribute\n\nThe `setAttribute` method sets the value of the specified attribute on the element. If the value already exists, it will be updated; otherwise, a new attribute with the specified name and value will be added to the element.\n\n## Syntax\n\n```js\nelement.setAttribute(attributeName, value);\n```\n\n### Parameters\n\n- `attributeName` _: string_\n  - The name of the attribute to set.\n- `value` _: string_\n  - The value to assign to the attribute.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/html-rewriter/Element/prototype/tag.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# tag\n\nThe `tag` read-only property is a `string` representing the tag name of the element.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/html-rewriter/HTMLRewritingStream/HTMLRewritingStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `HTMLRewritingStream()`\n\nThe **`HTMLRewritingStream`** lets you rewrite HTML by registering callbacks on CSS selectors. When an element matching the selector is encountered, the rewriter calls your callback. This callback can manipulate the attributes of the element, and add or remove content from the immediate context.\n\n## Syntax\n\n```js\nnew HTMLRewritingStream()\n```\n\n### Return value\n\nA new `HTMLRewritingStream` object.\n\n## Examples\n\nIn this example, we fetch an HTML page and use the HTML rewriter to add an attribute to all `div` tags and prepend the text `Header:` to all `h1` tags:\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { HTMLRewritingStream } from 'fastly:html-rewriter';\n\nasync function handleRequest(event) {\n  let transformer = new HTMLRewritingStream()\n    .onElement(\"h1\", e => e.prepend(\"Header: \"))\n    .onElement(\"div\", e => e.setAttribute(\"special-attribute\", \"top-secret\"));\n  let body = (await fetch(\"https://example.com/\")).body.pipeThrough(transformer);\n\n  return new Response(body, {\n    status: 200,\n    headers: new Headers({\n      \"content-type\": \"text/html; charset=utf-8\",\n    })\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/html-rewriter/HTMLRewritingStream/prototype/onElement.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# onElement\n\n▸ **onElement**`(selector: string, handler: (element: Element) => void): this`\n\nRegisters an element handler with the [`HTMLRewritingStream`] that will be called for each [`Element`] that matches the [CSS selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors) `selector`.\n\nElements added by handlers will not be processed by other handlers.\n\n## Syntax\n\n```js\n.onElement(selector, handler)\n```\n\n### Parameters\n\n- `selector` _: string_\n  - A CSS selector that determines the elements for which `handler` will be called\n  - The following types of CSS selector are supported:\n\nCurrently the rewriter supports the following CSS selectors:\n\n| Pattern              | Description                                                                |\n|----------------------|----------------------------------------------------------------------------|\n| `*`                  | Any element                                                                |\n| `E`                  | All elements of type `E`                                                   |\n| `E F`                | `F` elements inside `E` elements                                           |\n| `E > F`              | `F` elements directly inside `E` elements                                  |\n| `E:nth-child(n)`     | The n-th child of type `E`                                                 |\n| `E:first-child`      | First child of type `E`                                                    |\n| `E:nth-of-type(n)`   | The n-th sibling of type `E`                                               |\n| `E:first-of-type`    | First sibling of type `E`                                                  |\n| `E:not(s)`           | Type `E` elements not matching selector `s`                                |\n| `E.myclass`          | Type `E` elements with class `\"myclass\"`                                   |\n| `E#myid`             | Type `E` elements with ID `\"myid\"`                                         |\n| `E[attr]`            | Type `E` elements with attribute `attr`                                    |\n| `E[attr=\"val\"]`      | Type `E` elements where `attr` is `\"val\"`                                  |\n| `E[attr=\"val\" i]`    | Type `E` elements where `attr` is `\"val\"`, case-insensitive                |\n| `E[attr=\"val\" s]`    | Type `E` elements where `attr` is `\"val\"`, case-sensitive                  |\n| `E[attr~=\"val\"]`     | Type `E` elements where `attr` contains `\"val\"` in a space-separated list  |\n| `E[attr`&#124`;=\"val\"]`| Type `E` elements where `attr` is hyphen-separated and starts with `\"val\"` |\n| `E[attr^=\"val\"]`     | Type `E` elements where `attr` starts with `\"val\"`                         |\n| `E[attr$=\"val\"]`     | Type `E` elements where `attr` ends with `\"val\"`                           |\n| `E[attr*=\"val\"]`     | Type `E` elements where `attr` contains `\"val\"`                            |\n\n- `handler` _: (element: Element) => void_\n  - A callback function that will be called once for each element that matches `selector`\n\n### Return value\n\nThe `HTMLRewritingStream`, so multiple calls to `onElement` can be chained.\n\n### Exceptions\n\n- `Error`\n  - If the provided `selector` is not a valid CSS selector.\n  - If the provided `handler` is not a function.\n\n## Examples\n\n\nIn this example, we fetch an HTML page and use the HTML rewriter to add an attribute to all `div` tags and prepend the text `Header:` to all `h1` tags:\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { HTMLRewritingStream } from 'fastly:html-rewriter';\n\nasync function handleRequest(event) {\n  let transformer = new HTMLRewritingStream()\n    .onElement(\"h1\", e => e.prepend(\"Header: \"))\n    .onElement(\"div\", e => e.setAttribute(\"special-attribute\", \"top-secret\"));\n  let body = (await fetch(\"https://example.com/\")).body.pipeThrough(transformer);\n\n  return new Response(body, {\n    status: 200,\n    headers: new Headers({\n      \"content-type\": \"text/html; charset=utf-8\",\n    })\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/image-optimizer/Auto.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Auto`\n\nEnumerator options for [`imageOptimizerOptions.auto`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `AVIF` (`\"avif\"`) If the browser's Accept header indicates compatibility, deliver an AVIF image.\n- `WEBP` (`\"webp\"`)\tIf the browser's Accept header indicates compatibility, deliver a WebP image.\n\n## Examples\n\n```js\nimport { Auto, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      auto: Auto.AVIF\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/image-optimizer/BWAlgorithm.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `BWAlgorithm`\n\nEnumerator options for [`imageOptimizerOptions.bw`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Threshold` (`\"threshold\"`) Uses a luminance threshold to convert the image to black and white.\n- `Atkinson` (`\"atkinson\"`)\tUses [Atkinson dithering](https://en.wikipedia.org/wiki/Atkinson_dithering) to convert the image to black and white.\n\n\n## Examples\n\n```js\nimport { Region, BWAlgorithm } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      bw: BWAlgorithm.Threshold\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/image-optimizer/CropMode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `CropMode`\n\nEnumerator options for [`imageOptimizerOptions.crop.mode`](./imageOptimizerOptions.mdx) and `imageOptimizerOptions.precrop.mode`.\n\n## Constants\n\n- `Smart` (`\"smart\"`) Enables content-aware algorithms to attempt to crop the image to the desired aspect ratio while intelligently focusing on the most important visual content, including the detection of faces.\n- `Safe` (`\"safe\"`)\tAllow cropping out-of-bounds regions.\n\n## Examples\n\n```js\nimport { CropMode, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      crop: {\n        size: { ratio: { width: 4, height: 3 } },\n        mode: CropMode.Smart,\n      }\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/image-optimizer/Disable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Disable`\n\nEnumerator options for [`imageOptimizerOptions.disable`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Upscale` (`\"upscale\"`) Prevent images being resized such that the output image's dimensions are larger than the source image.\n\n## Examples\n\n```js\nimport { Disable, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      width: 2560,\n      disable: Disable.Upscale\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/image-optimizer/Enable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Enable`\n\nEnumerator options for [`imageOptimizerOptions.enable`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Upscale` (`\"upscale\"`) Allow images to be resized such that the output image's dimensions are larger than the source image.\n\n## Examples\n\n```js\nimport { Enable, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      width: 2560,\n      enable: Enable.Upscale\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/image-optimizer/Fit.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Fit`\n\nEnumerator options for [`imageOptimizerOptions.fit`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Bounds` (`\"bounds\"`) Resize the image to fit entirely within the specified region, making one dimension smaller if needed.\n- `Cover` (`\"cover\"`) Resize the image to entirely cover the specified region, making one dimension larger if needed.\n- `Crop` (`\"crop\"`) Resize and crop the image centrally to exactly fit the specified region.\n\n## Examples\n\n```js\nimport { Fit, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      width: 150,\n      height; 150,\n      fit: Fit.Bounds\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/image-optimizer/Format.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Format`\n\nEnumerator options for [`imageOptimizerOptions.format`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Auto` (`\"auto\"`) Automatically use the best format based on browser support and image/transform characteristics\n- `AVIF` (`\"avif\"`) AVIF\n- `BJPG` (`\"bjpg\"`) Baseline JPEG \n- `GIF` (`\"gif\"`) Graphics Interchange Format\n- `JPG` (`\"jpg\"`) JPEG \n- `JXL` (`\"jxl\"`) JPEGXL \n- `MP4` (`\"mp4\"`) MP4 (H.264)\n- `PJPG` (`\"pjpg\"`) Progressive JPEG \n- `PJXL` (`\"pjxl\"`) Progressive JPEGXL\n- `PNG` (`\"png\"`) Portable Network Graphics\n- `PNG8` (`\"png8\"`) Portable Network Graphics palette image with 256 colors and 8-bit transparency\n- `SVG` (`\"svg\"`) Scalable Vector Graphics\n- `WEBP` (`\"webp\"`) WebP\n- `WEBPLL` (`\"webpll\"`) WebP (Lossless)\n- `WEBPLY` (`\"webply\"`) WebP (Lossy)\n\n## Examples\n\n```js\nimport { Format, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      format: Format.PNG\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/image-optimizer/Metadata.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Metadata`\n\nEnumerator options for [`imageOptimizerOptions.metadata`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Copyright` (`\"copyright\"`) Preserve [copyright notice](https://www.iptc.org/std/photometadata/specification/IPTC-PhotoMetadata#copyright-notice), creator, credit line, licensor, and web statement of rights fields.\n- `C2PA` (`\"c2pa\"`) Preserve the [C2PA manifest](https://c2pa.org/) and add any transformations performed by Fastly Image Optimizer.\n- `CopyRightAndC2PA` (`\"copyright,c2pa\"`) Resize and crop the image centrally to exactly fit the specified region.\n\n## Examples\n\n```js\nimport { Metadata, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      metadata: Metadata.Copyright\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/image-optimizer/Optimize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Optimize`\n\nEnumerator options for [`imageOptimizerOptions.optimize`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Low` (`\"low\"`) Output image quality will be similar to the input image quality.\n- `Medium` (`\"medium\"`) More optimization is allowed. We attempt to preserve the visual quality of the input image.\n- `High` (`\"high\"`) Minor visual artifacts may be visible. This produces the smallest file.\n\n## Examples\n\n```js\nimport { Optimize, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      optimize: Optimize.High\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/image-optimizer/Orient.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Orient`\n\nEnumerator options for [`imageOptimizerOptions.orient`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Default` (`\"1\"`) \n- `FlipHorizontal` (`\"2\"`) \n- `FlipHorizontalAndVertical` (`\"3\"`) \n- `FlipVertical` (`\"4\"`) \n- `FlipHorizontalOrientLeft` (`\"5\"`) \n- `OrientRight` (`\"6\"`) \n- `FlipHorizontalOrientRight` (`\"7\"`) \n- `OrientLeft` (`\"8\"`) \n\n## Examples\n\n```js\nimport { Orient, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      orient: Orient.FlipHorizontal\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/image-optimizer/Profile.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Profile`\n\nEnumerator options for [`imageOptimizerOptions.profile`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Baseline` (`\"baseline\"`) The profile recommended for video conferencing and mobile applications. (Default)\n- `Main` (`\"main\"`) The profile recommended for standard-definition broadcasts.\n- `High` (`\"high\"`) The profile recommended for high-definition broadcasts.\n\n## Examples\n\n```js\nimport { Profile, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      profile: Profile.Main\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/image-optimizer/Region.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Region`\n\nEnumerator options for [`imageOptimizerOptions.region`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `UsEast` (`\"us_east\"`)\n- `UsCentral` (`\"us_central\"`)\n- `UsWest` (`\"us_west\"`)\n- `EuCentral` (`\"eu_central\"`)\n- `EuWest` (`\"eu_west\"`)\n- `Asia` (`\"asia\"`)\n- `Australia` (`\"australia\"`)\n\n\n## Examples\n\n```js\nimport { Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/image-optimizer/ResizeFilter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `ResizeFilter`\n\nEnumerator options for [`imageOptimizerOptions.resizeFilter`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Nearest` (`\"nearest\"`) Uses the value of nearby translated pixel values.\n- `Bilinear` (`\"bilinear\"`) Uses an average of a 2x2 environment of pixels.\n- `Linear` (`\"linear\"`) Same as `Bilenear`.\n- `Bicubic` (`\"bicubic\"`) Uses an average of a 4x4 environment of pixels, weighing the innermost pixels higher.\n- `Cubic` (`\"cubic\"`) Same as `Bicubic`.\n- `Lanczos2` (`\"lanczos2\"`) Uses the Lanczos filter to increase the ability to detect edges and linear features within an image and uses sinc resampling to provide the best possible reconstruction.\n- `Lanczos3` (`\"lanczos3\"`) Lanczos3 uses a better approximation of the sinc resampling function. (Default)\n- `Lanczos` (`\"lanczos\"`) Same as `Lanczos3`.\n\n## Examples\n\n```js\nimport { ResizeFilter, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      width: 2560,\n      resizeFilter: ResizeFilter.Linear\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/image-optimizer/imageOptimizerOptions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `imageOptimizerOptions` \n\nOptions specified in the [`Request`](../globals/Request/Request.mdx) constructor for running the [Fastly Image Optimizer](https://docs.fastly.com/products/image-optimizer). More detailed documentation on all Image Optimizer options is available in the [Image Optimizer reference docs](https://www.fastly.com/documentation/reference/io/).\n\n## Parameters\n\nAll parameters other than `region` are optional.\n\n- `region`: _[`Region`](./Region.mdx)_ Where image optimizations should occur.\n- `auto`: _[`Auto`](./Auto.mdx)_ Enable optimization features automatically.\n- `bgColor`: _[`Color`](#color)_ Set the background color of an image.\n- `blur`: _`number` (0.5-1000) or [`Percentage`](#percentage)_ Set the blurriness of the output image.\n- `brightness`: _`number` (-100-100)_ Set the brightness of the output image.\n- `bw`: _[`BWAlgorithm`](./BWAlgorithm.mdx)_ Convert an image to black and white.\n- `canvas`: _`Object`_ Increase the size of the canvas around an image.\n    - `size`: _[`Size`](#size)_\n    - `position` (optional): _[`Position`](#position)_\n- `contrast`: _`number` (-100-100)_ Set the contrast of the output image.\n- `crop`: _`Object`_ Remove pixels from an image.\n    - `size`: _[`Size`](#size)_\n    - `position` (optional): _[`Position`](#position)_\n    - `mode` (optional): _[`CropMode`](./CropMode.mdx)_\n- `disable`: _[`Disable`](./Disable.mdx)_ Disable functionality that is enabled by default.\n- `dpr`: `number` Ratio between physical pixels and logical pixels.\n- `enable`: _[`Enable`](./Enable.mdx)_ Enable functionality that is disabled by default.\n- `fit`: _[`Fit`](./Fit.mdx)_ Set how the image will fit within the size bounds provided.\n- `format`: _[`Format`](./Format.mdx)_ Specify the output format to convert the image to.\n- `frame`: _`number` (must have the value 1)_ Extract the first frame from an animated image sequence.\n- `height`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ Resize the height of the image.\n- `level`: _`String` containing one of the [allowed values](https://www.fastly.com/documentation/reference/io/level/#allowed-values)_ Specify the level constraints when converting to video.\n- `metadata`: _[`Metadata`](./Metadata.mdx)_ Control which metadata fields are preserved during transformation.\n- `optimize`: _[`Optimize`](./Optimize.mdx)_ Automatically apply optimal quality compression.\n- `orient`: _[`Orient`](./Orient.mdx)_ Change the cardinal orientation of the image.\n- `pad`: _[`Sides`](#sides)_ Add pixels to the edge of an image.\n- `precrop`: _`Object`_ Remove pixels from an image before any other transformations occur.\n    - `size`: _[`Size`](#size)_\n    - `position`: _[`Position`](#position)_\n    - `mode`: _[`CropMode`](./CropMode.mdx)_\n- `profile`: _[`Profile`](./Profile.mdx)_ Specify the profile class of application when converting to video.\n- `quality`: _`integer` (1-100)_ Optimize the image to the given compression level for lossy file formatted images.\n- `resizeFilter`: _[`ResizeFilter`](./ResizeFilter.mdx)_ Specify the resize filter used when resizing images.\n- `saturation`: _`number` (-100-100)_ Set the saturation of the output image.\n- `sharpen`: _`Object`_ Set the sharpness of the output image.\n    - `amount`: _`number` (0-10)_\n    - `radius`: _`number` (0.5-1000)_\n    - `threshold`: _`integer` (0-255)_\n- `trim`: _[`Sides`](#sides)_ Remove pixels from the edge of an image.\n- `viewbox`: _`number` (must have the value 1)_ Remove explicit width and height properties in SVG output.\n- `width`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ Resize the width of the image.\n\n## Types\n\n### Color\n\nEither:\n\n- a 3 or 6 character hexadecimal string\n- an `Object` containing:\n    - `r`: _`integer` (0-255)_ Red component\n    - `g`: _`integer` (0-255)_ Green component\n    - `b`: _`integer` (0-255)_ Blue component\n    - `a` (optional): _`number` (0.0-1.0)_ Alpha component \n\n### Percentage\n\nA `String` containing a number suffixed with a percent sign (%).\n\n### Position\n\nAn `Object` containing:\n\n- Exactly one of:\n    - `x`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ \n    - `offsetX`: _`number` (interpreted as a percentage)_\n- Exactly one of: \n    - `y`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ \n    - `offsetY`: _`number` (interpreted as a percentage)_\n\n### Sides\n\nAn `Object` containing `top`, `bottom`, `left`, and `right`, all of which are either an `integer` or [`Percentage`](#percentage).\n\n### Size\n\nAn `Object` containing either:\n\n- `absolute`: _`Object`_\n    - `width`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ \n    - `height`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ \n- `ratio`: _`Object`_\n    - `width`: _`number`_\n    - `height`: _`number`_\n\n## Examples\n\n```js\nimport { Format, Orient, CropMode, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      format: Format.PNG,\n      bgColor: {\n        'r': 100,\n        'g': 255,\n        'b': 9,\n        'a': 0.5\n      },\n      blur: '1%',\n      brightness: -20,\n      contrast: -20,\n      height: 600,\n      level: '4.0',\n      orient: Orient.FlipVertical,\n      saturation: 80,\n      sharpen: { 'amount': 5, 'radius': 6, 'threshold': 44 },\n      canvas: { 'size': { 'absolute': { 'width': 400, 'height': 400 } } },\n      crop: { size: { absolute: { width: 200, height: 200 }, mode: CropMode.Safe } },\n      trim: { top: 10, left: 10, right: 10, bottom: 10 },\n      pad: { top: 30, left: 30, right: \"1%\", bottom: 30 }\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/index.mdx",
    "content": "---\nsidebar_position: 1\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n\n# JavaScript for Fastly Compute\n\nThis site is the full SDK reference for [`@fastly/js-compute`](https://www.npmjs.com/package/%40fastly/js-compute), the module that provides the interface between your JavaScript code and the [Fastly Compute](https://www.fastly.com) platform.\n\nIf you haven't used Fastly Compute before, start by [setting up your first Fastly Compute program](https://developer.fastly.com/learning/compute/) over on **developer.fastly.com** so that you have a working development environment.\n\nTo learn more about the fundamentals of using JavaScript with Fastly Compute, see our [using JavaScript](https://developer.fastly.com/learning/compute/javascript/) guide.\n\n## Understanding the JavaScript SDK\n\nIncoming HTTP requests to [domains that are attached to your Fastly service](https://developer.fastly.com/learning/concepts/) will start an instance of your application and invoke a `fetch` event, which can be bound using the `addEventListener` function:\n\n```js\naddEventListener(\"fetch\", event => event.respondWith(handleRequest(event)) );\n\nasync function handleRequest(event) {\n  const req = event.request;\n\n  return fetch(req, {\n    backend: \"example_backend\"\n  });\n}\n```\n\nFastly specific features are available as named imports from `fastly:` prefixed modules, all of which are documented in this site.  For example, the [env](https://js-compute-reference-docs.edgecompute.app/docs/fastly:env/env) function provides access to [environment variables](https://developer.fastly.com/reference/compute/ecp-env/) and can be imported into your application like this:\n\n```js\nimport { env } from \"fastly:env\"\n```\n\nJavaScript code compiled for Fastly Compute has access to a global environment with most of the globals you would expect in an ECMAScript runtime, like [`Date`](https://js-compute-reference-docs.edgecompute.app/docs/globals/Date/) and [`console`](https://js-compute-reference-docs.edgecompute.app/docs/globals/console/log).\n\n## Trying things out\n\n[Fastly fiddle](https://fiddle.fastly.dev) is an online web-based playground where you can run Fastly code.  You'll see fiddles included in many pages of our [developer hub](https://developer.fastly.com) and this SDK reference. These interactive examples can be executed right on the page by clicking the **RUN** tab:\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nasync function app(event) {\n    const request = event.request;\n    return new Response(\"You made a request to \" + request.url)\n}\naddEventListener(\"fetch\", event => {\n  event.respondWith(app(event));\n});\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nasync function app(event) {\n    const request = event.request;\n    return new Response(`You made a request to ${request.url}`)\n}\n\naddEventListener(\"fetch\", event => {\n  event.respondWith(app(event));\n});\n\n```\n\n</Fiddle>\n\nCheck out [`fiddle.fastly.dev`](https://fiddle.fastly.dev) to create your own.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/kv-store/KVStore/KVStore.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `KVStore()`\n\nThe **`KVStore` constructor** lets you connect your Fastly Compute application to a Fastly KV store.\n\nA Fastly KV store is a persistent, globally consistent key-value store. See [Data stores for Fastly services](https://developer.fastly.com/learning/concepts/edge-state/data-stores#kv-stores) for initialization and usage details.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew KVStore(name)\n```\n\n> **Note:** `KVStore()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Define a KV store instance using the resource link name.\n  \n### Return value\n\nA new `KVStore` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no KV Store exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name does not start with an ascii alphabetical character \n  - Thrown if the provided name contains control characters `(\\u0000-\\u001F)`\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then read back the value and return it to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/kv-store/KVStore/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# KVStore.prototype.delete\n\nDeletes the value associated with the key `key` in the KV store.\n\n## Syntax\n\n```js\ndelete(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the KV-store.\n\n### Return value\n\nReturns `undefined`\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is any of the strings `\"\"`, `\".\"`, or `\"..\"`\n    - Starts with the string `\".well-known/acme-challenge/\"`\n    - Contains any of the characters `\"#;?^|\\n\\r\"`\n    - Is longer than 1024 characters\n    - Does not exist\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then delete the entry.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n  await files.delete('hello')\n\n  const entry = await files.get('hello')\n  if (entry) {\n    return new Response(await entry.text())\n  } else {\n    return new Response('no file named hello exists')\n  }\n\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/kv-store/KVStore/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# KVStore.prototype.get\n\n▸ **get**(): `string`\n\nGets the value associated with the key `key` in the KV store.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the KV-store.\n\n### Return value\n\nIf the key does not exist in the KV store, this returns a `Promise` which resolves with `null`.\n\nIf the key does exist in the KV store, this returns a `Promise` which resolves with an `KVStoreEntry`.\n\n## Description\n\nSend the given message, converted to a string, to this KVStore instance's endpoint.\n\nThe `get()` method requires its `this` value to be a [`KVStore`](../KVStore.mdx) object.\n\nIf the `this` value does not inherit from `KVStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is any of the strings `\"\"`, `\".\"`, or `\"..\"`\n    - Starts with the string `\".well-known/acme-challenge/\"`\n    - Contains any of the characters `\"#;?^|\\n\\r\"`\n    - Is longer than 1024 characters\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then read back the value and return it to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/kv-store/KVStore/prototype/list.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStore.prototype.list\n\nThe **`list()`** can be used to list the keys of a store.\n\n## Syntax\n\n```js\nlist(options?)\n```\n\n### Parameters\n\n- `options` _: object_ _**optional**_\n  - List options supporting properties:\n  - `cursor` _: string_ _**optional**_\n    - The cursor used to pick up from a previous iteration.\n  - `limit` _: number_ _**optional**_\n    - The maximum number of keys to return.\n  - `prefix` _: string_ _**optional**_\n    - List only those keys that start with the given string prefix.\n  - `noSync` _: boolean_ _**optional**_\n    - Do not sync the key list first, instead provide a possibly out-of-date listing. May be faster but inconsistent.\n\n### Return value\n\nReturns a `Promise` which resolves with `{ list: string[], cursor: string | undefined }`.\n\n## Example\n\nIn this example we list the keys of a KV Store named `'files'`, iterating 10 at a time, counting the total;\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from 'fastly:kv-store';\n\nasync function app(event) {\n  const files = new KVStore('files');\n\n  let cursor,\n    list,\n    total = 0;\n  do {\n    ({ cursor, list } = await files.list({ limit: 10, cursor }));\n    total += list?.length;\n  } while (list);\n\n  return new Response(`Iterated ${total} entries`);\n}\n\naddEventListener('fetch', (event) => event.respondWith(app(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/kv-store/KVStore/prototype/put.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# KVStore.prototype.put\n\nThe **`put()`** method stores a `value` into the KV store under a `key`.\n\n> **Note**: KV stores are eventually consistent, this means that the updated contents associated with the key `key` may not be available to read from all edge locations immediately and some edge locations may continue returning the previous contents associated with the key.\n\n## Syntax\n\n```js\nput(key, value, options?)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to store the supplied value under within the KV store.\n- `value` _:  ArrayBuffer | TypedArray | DataView| ReadableStream | URLSearchParams | String | string literal_\n  - The value to store within the KV store.\n- `options` _: object_ _**optional**_\n  - An insert options parameter, supporting:\n  - `metadata` _: ArrayBuffer | TypedArray | DataView_ _**optional**_\n    - Binary metadata associated with the entry, may be up to 1000 bytes.\n  - `ttl` _: number_ _**optional**_\n    - TTL for the entry\n  - `mode` _: 'overwrite' | 'add' | 'append' | 'prepend'_ _**optional**_\n    - Insert mode, defaults to 'overwrite'\n  - `gen` _: number_ _**optional**_\n    - 'generation' header specific to the version of an entry key\n\n### Return value\n\nReturns a `Promise` which resolves with `undefined` when the provided `value` has been written into the KV store.\n\n## Description\n\nStores the supplied `value` into the KV store under the supplied `key`.\n\nThe `put()` method requires its `this` value to be a [`KVStore`](../KVStore.mdx) object.\n\nIf the `this` value does not inherit from `KVStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is any of the strings `\"\"`, `\".\"`, or `\"..\"`\n    - Starts with the string `\".well-known/acme-challenge/\"`\n    - Contains any of the characters `\"#;?^|\\n\\r\"`\n    - Is longer than 1024 characters\n- `TypeError`\n  - If the provided `gen`:\n    - Is not an number\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then read back the value and return it to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/kv-store/KVStoreEntry/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.arrayBuffer()\n\nThe `arrayBuffer()` method of the `KVStoreEntry` interface takes a `KVStoreEntry` stream and reads it to completion. It returns a promise that resolves with an `ArrayBuffer`.\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an `ArrayBuffer`."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/kv-store/KVStoreEntry/prototype/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.body\n\nThe `body` read-only property of the `KVStoreEntry` interface is a `ReadableStream` of the body contents.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/kv-store/KVStoreEntry/prototype/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.bodyUsed\n\nThe `bodyUsed` read-only property of the `KVStoreEntry` interface is a `boolean` value that indicates whether the body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/kv-store/KVStoreEntry/prototype/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.json()\n\nThe `json()` method of the `KVStoreEntry` interface takes a `KVStoreEntry` stream and reads it to completion. It returns a promise which resolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a JavaScript object. This object could be anything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/kv-store/KVStoreEntry/prototype/metadata.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.metadata()\n\nThe `metadata()` method of the `KVStoreEntry` interface provides the binary metadata associated with the `KVStoreEntry`.\n\nThe metadata binary may be up to 1000 bytes, and is returned as a `Uint8Array` TypedArray buffer, if metadata is set, or null otherwise.\n\n## Syntax\n\n```js\nmetadata()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a `Uint8Array` buffer object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/kv-store/KVStoreEntry/prototype/metadataText.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.metadataText()\n\nThe `metadataText()` method of the `KVStoreEntry` interface provides a String interpretation of binary metadata associated with the `KVStoreEntry`.\n\nIf the binary data is not a valid string, an encoding error will be thrown.\n\n## Syntax\n\n```js\nmetadataText()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a String.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/kv-store/KVStoreEntry/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.text()\n\nThe `text()` method of the `KVStoreEntry` interface takes a `KVStoreEntry` stream and reads it to completion. It returns a promise that resolves with a `String`. The `KVStoreEntry `is always decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a `String`."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/logger/Logger/Logger.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Logger()`\n\nThe **`Logger` constructor** lets you connect your Fastly Compute application to a [Fastly Named Logger](https://developer.fastly.com/learning/integrations/logging/).\n\n## Syntax\n\n```js\nnew Logger(name)\n```\n\n> **Note:** `Logger()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - The Fastly Logger which should be associated with this Logger instance\n\n### Return value\n\nA new `Logger` object.\n\n## Examples\n\nIn this example we have a create a logger named `\"splunk\"` and logs the incoming request method and destination.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Logger Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^3\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nasync function app (event) {\n  let logger = new Logger(\"splunk\");\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nconst logger = new Logger(\"splunk\");\nasync function app (event) {\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/logger/Logger/prototype/log.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Logger.prototype.log\n\n▸ **log**(): `string`\n\nSends the given message, converted to a string, to this Logger instance's endpoint.\n\n**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nlog(message)\n```\n\n### Return value\n\n`undefined`.\n\n## Description\n\nSend the given message, converted to a string, to this Logger instance's endpoint.\n\nThe `log()` method requires its `this` value to be a [`Logger`](../Logger.mdx) object.\n\nIf the `this` value does not inherit from `Logger.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n## Examples\n\nIn this example we have a create a logger named `\"splunk\"` and logs the incoming request method and destination.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Logger.prototype.log Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^3\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nlet logger = new Logger(\"splunk\");\nasync function app (event) {\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nasync function app (event) {\n  let logger = new Logger(\"splunk\");\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/logger/configureConsole.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# configureConsole\n\nThe **`configureConsole()`** function allows configuring the behaviour of the `console` global JS logger.\n\n## Syntax\n\n```js\nconfigureConsole(loggingOptions)\n```\n\n### Parameters\n\n- `loggingOptions` _: object_\n  - \n  - The name has to be between 1 and 254 characters inclusive.\n  - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n\n## Examples\n\nIn this example, we disable prefixing for `console.log` and use `stderr` output for `console.error`:\n\n```js\nimport { configureConsole } from \"fastly:logger\";\n\nconfigureConsole({\n  prefixing: false,\n  stderr: true\n});\n\nasync function handleRequest(event) {\n  console.log(JSON.stringify(event.request.headers));\n  const url = new URL(event.request.url);\n  try {\n    validate(url);\n  } catch (e) {\n    console.error(`Validation error: ${e}`);\n    return new Response('Bad Request', { status: 400 });\n  }\n  return new Response('OK');\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/migration-guide/index.mdx",
    "content": "---\nsidebar_position: 1\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Migrating from v2 to v3`\n\n## SimpleCache.delete renamed to SimpleCache.purge and requires purge options to be supplied as the second parameter\n\nWe are renaming because \"purge\" is already a well-known and documented concept for removing content from Fastly's cache.\n\nThe new addition of a second argument allows the caller to decide what scope to purge the content from, currently they can choose to purge from all of Fastly (\"global\") or from the POP that contains the currently executing instance (\"pop\"). We do not provide a default option right now, in the future we may provide a default option, if we discover a common pattern is being used.\n\nHere is an example of migrating an application using `SimpleCache.delete` to `SimpleCache.purge` with the same purging behaviour:\n```diff\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const url = new URL(event.request);\n  const path = url.pathname;\n  if (url.searchParams.has('delete')) {\n-    SimpleCache.delete(path);\n+    SimpleCache.purge(path, { scope: \"global\" });\n    return new Response(page, { status: 204 });\n  }\n\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n\n```\n\n\n# `Migrating from v1 to v2`\n\n## ObjectStore renamed to KVStore\n\nWe have renamed the `ObjectStore` class to `KVStore`, and the module name from `fastly:object-store` to `fastly:kv-store`.\n\nYou will need to update your code to use the new class name and module name.\n\nBelow is the change that would need to be made for the imported module name:\n```diff\n- import { ObjectStore } from 'fastly:object-store';\n+ import { KVStore } from 'fastly:kv-store';\n```\n\nAnd this is the change that would need to be made for constructing an instance of the class:\n```diff\n- const store = new ObjectStore('my-store');\n+ const store = new KVStore('my-store');\n```\n\n\nHere is a full example of migrating an application from ObjectStore to KVStore:\n```diff\n/// <reference types=\"@fastly/js-compute\" />\n\n- import { ObjectStore } from 'fastly:object-store';\n+ import { KVStore } from 'fastly:kv-store';\n\nasync function app(event) {\n-   const files = new ObjectStore('files');\n+   const files = new KVStore('files');\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/secret-store/SecretStore/SecretStore.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `SecretStore()`\n\nThe **`SecretStore` constructor** lets you connect your Fastly Compute application to a Fastly Secret store.\n\nA secret store is a persistent, globally distributed store for secrets accessible to Fastly Compute services during request processing.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew SecretStore(name)\n```\n\n> **Note:** `SecretStore()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Define a Secret Store instance using the resource link name.\n  \n### Return value\n\nA new `SecretStore` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Secret Store exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name contains characters other than letters, numbers, dashes (-), underscores (_), and periods (.)\n\n## Examples\n\nIn this example we connect to a Secret Store named `'secrets'` and retrieve a secret named `'cat-api-key'` use the value in a Request header.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SecretStore } from \"fastly:secret-store\";\n\nasync function app(event) {\n  const secrets = new SecretStore('secrets')\n\n  const catApiKey = await secrets.get('cat-api-key')\n\n  return fetch('/api/cat', {\n    headers: {\n      'cat-api-key': catApiKey.plaintext()\n    }\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/secret-store/SecretStore/fromBytes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# fromBytes\n\nThe **`fromBytes()`** function is used to create an in-memory secret from an array buffer.\n\n>**Note**: This API should be avoided when possible, by instead using [SecretStore.prototype.get](./prototype/get.mdx) to obtain secure secrets.\n\n## Syntax\n\n```js\nfromBytes(new Uint8Array([1, 2, 3]))\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns a `SecretStoreEntry`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/secret-store/SecretStore/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SecretStore.prototype.get\n\n▸ **get**(): `string`\n\nGets the value associated with the key `key` in the Secret store.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the Secret Store.\n\n### Return value\n\nIf the key does not exist in the Secret Store, this returns a `Promise` which resolves with `null`.\n\nIf the key does exist in the Secret Store, this returns a `Promise` which resolves with an `SecretStoreEntry`.\n\n## Description\n\nSend the given message, converted to a string, to this SecretStore instance's endpoint.\n\nThe `get()` method requires its `this` value to be a [`SecretStore`](../SecretStore.mdx) object.\n\nIf the `this` value does not inherit from `SecretStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Is longer than 255 characters\n    - Contains characters other than letters, numbers, dashes (-), underscores (_), and periods (.)\n\n## Examples\n\nIn this example we connect to a Secret Store named `'secrets'` and retrieve a secret named `'cat-api-key'` use the value in a Request header.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SecretStore } from \"fastly:secret-store\";\n\nasync function app(event) {\n  const secrets = new SecretStore('secrets')\n\n  const catApiKey = await secrets.get('cat-api-key')\n\n  return fetch('/api/cat', {\n    headers: {\n      'cat-api-key': catApiKey.plaintext()\n    }\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/secret-store/SecretStoreEntry/prototype/plaintext.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SecretStoreEntry.prototype.plaintext\n\n▸ **plaintext**(): `string`\n\nReturns the plaintext contents of the SecretStoreEntry instance as String.\n\n## Syntax\n\n```js\nplaintext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA String\n\n### Exceptions\n\nThe `plaintext()` method requires its `this` value to be a `SecretStoreEntry` object.\nIf the `this` value does not inherit from `SecretStoreEntry.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n## Examples\n\nIn this example we connect to a Secret Store named `'secrets'` and retrieve a secret named `'cat-api-key'` use the value in a Request header.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SecretStore } from \"fastly:secret-store\";\n\nasync function app(event) {\n  const secrets = new SecretStore('secrets')\n\n  const catApiKey = await secrets.get('cat-api-key')\n\n  return fetch('/api/cat', {\n    headers: {\n      'cat-api-key': catApiKey.plaintext()\n    }\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/secret-store/SecretStoreEntry/prototype/rawBytes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SecretStoreEntry.prototype.rawBytes\n\n▸ **rawBytes**(): `Uint8Array`\n\nReturns the raw byte contents of the SecretStoreEntry instance as a Uint8Array.\n\n## Syntax\n\n```js\nrawBytes()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Uint8Array\n\n### Exceptions\n\nThe `rawBytes()` method requires its `this` value to be a `SecretStoreEntry` object.\nIf the `this` value does not inherit from `SecretStoreEntry.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/security/inspect.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# inspect\n\nThe **`inspect()`** function inspects a request using the [Fastly Next-Gen WAF](https://docs.fastly.com/en/ngwaf/).\n\n## Syntax\n\n```js\ninspect(request, config);\n```\n\n### Parameters\n\n- `request` _: Request_\n  - The Request to get a WAF determination for.\n- `config` _: object_\n  - `corp` _: string_\n    - Set a corp name for the configuration.\n    - This parameter is currently required.\n  - `workspace` _: string_\n    - Set a workspace name for the configuration.\n    - This parameter is currently required.\n  - `overrideClientIp` _: string_\n    - Specify an explicit client IP address to inspect.\n    - By default, `inspect` will use the IP address that made the request to the\n      running Compute service, but you may want to use a different IP when\n      service chaining or if requests are proxied from outside of Fastly’s\n      network.\n\n### Return value\n\nReturns an `Object` with the `inspect` response, with the following fields:\n\n- `waf_response` _: number_\n  - Security status code.\n  \n- `redirect_url` _: string | null_\n  - A redirect URL returned from Security.\n\n- `tags` _: string[]_\n  - Tags returned by Security.\n\n- `verdict` _: string_\n  - The outcome of inspecting a request with Security. It can be one of the following:\n    - `\"allow\"`\n      - Security indicated that this request is allowed.\n    - `\"block\"`\n      - Security indicated that this request should be blocked.\n    - `\"unauthorized\"`\n      - Security indicated that this service is not authorized to inspect a request.\n    - Other verdicts may be returned but not currently documented.\n\n- `decision_ms` _: number_\n  - How long Security spent determining its verdict, in milliseconds.\n  \n## Examples\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { inspect } from \"fastly:security\";\n\nasync function app(event) {\n  const res = inspect(event.request, {\n    corp: \"mycorp\",\n    workspace: \"myws\"\n  });\n  switch (res.verdict) {\n    case \"allow\":\n      return await fetch(event.request);\n    case \"block\":\n      return new Response(\"Request Blocked\", { status: 400 });\n    case \"unauthorized\":\n      return new Response(\"Unauthorized\", { status: 401 });\n    default:\n      return new Response(\"idk\", { status: 500 });\n  }\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/shielding/Shield/Shield.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `Shield()`\n\nLoad information about the given shield.\n\nReturns an object representing the shield if it is active, or throws an exception if the string is malformed or the shield doesn’t exist.\n\nShield names are defined on [this webpage](https://www.fastly.com/documentation/guides/concepts/shielding/#shield-locations), in the “shield code” column. For example, the string “pdx-or-us” will look up our Portland, OR, USA shield site, while “paris-fr” will look up our Paris site.\n\nIf you are using a major cloud provider for your primary origin site, consider looking at the “Recommended for” column, to find the Fastly POP most closely located to the given cloud provider.\n\n## Syntax\n\n```js\nnew Shield(name)\n```\n\n> **Note:** `Shield()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Shield exists with the provided name\n\n## Examples\n\nIn this example, we create a Shield instance for the Sydney, Australia shield POP. If the code is running on that shield POP, it fetches directly from origin. Otherwise, it routes the request through the shield using an encrypted connection.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n    \nimport { Shield } from \"fastly:shielding\";\n\nasync function app(event) {\n    const shield = new Shield('wsi-australia-au');\n    // If running on the shield POP, fetch from the origin directly\n    if (shield.runningOn()) {\n        return await fetch('https://http-me.fastly.com/anything', { backend: 'httpme' });\n    }\n    // Otherwise, route the request through the shield using an encrypted connection\n    return await fetch(event.request, { backend: shield.encryptedBackend() });\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/shielding/Shield/prototype/encryptedBackend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Shield.prototype.encryptedBackend\n\n▸ **encryptedBackend**(configuration?): `Backend`\n\nReturns a `Backend` representing an encrypted connection to the POP.\n\nFor reference, this is almost always the backend that you want to use. Only use [`Shield::unencryptedBackend`](./unencryptedBackend.mdx) in situations in which you are 100% sure that all the data you will send and receive over the backend is already encrypted.\n\n## Parameters\n\n- `configuration` _: object_ _**optional**_\n  - `firstByteTimeout` _: number_ _**optional**_\n    - An optional first byte timeout (in milliseconds) to set on the returned backend.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/shielding/Shield/prototype/runningOn.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Shield.prototype.runningOn\n\n▸ **runningOn**(): `boolean`\n\nReturns whether we are currently operating on the given shield.\n\nTechnically, this may also return true in very isolated incidents in which Fastly is routing traffic from the target shield POP to the POP that this code is running on, but in these situations the results should be approximately identical.\n\n(For example, it may be the case that you are asking to shield to ‘pdx-or-us’. But, for load balancing, performance, or other reasons, Fastly is temporarily shifting shielding traffic from Portland to Seattle. In that case, this function may return true for hosts running on ‘bfi-wa-us’, our Seattle site, because effectively the shield has moved to that location. This should give you a slightly faster experience than the alternative, in which this function would return false, you would try to forward your traffic to the Portland site, and then that traffic would be caught and redirected back to Seattle.)\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/shielding/Shield/prototype/unencryptedBackend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Shield.prototype.unencryptedBackend\n\n▸ **unencryptedBackend**(configuration?): `Backend`\n\nReturns a `Backend` representing an unencrypted connection to the POP.\n\nGenerally speaking, we encourage users to use [`Shield::encryptedBackend`](./encryptedBackend.mdx) instead of this function. Data sent over this backend – the unencrypted version – will be sent over the open internet, with no protections. In most cases, this is not what you want. However, in some cases – such as when you want to ship large data blobs that you know are already encrypted — using these backends can prevent a double-encryption performance penalty.\n\n## Parameters\n\n- `configuration` _: object_ _**optional**_\n  - `firstByteTimeout` _: number_ _**optional**_\n    - An optional first byte timeout (in milliseconds) to set on the returned backend."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.0/websocket/createWebsocketHandoff.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# createWebsocketHandoff\n\nThe **`createWebsocketHandoff()`** function creates a Response instance which informs Fastly to pass the original Request through Websocket, to the declared backend.\n\n## Syntax\n\n```js\ncreateWebsocketHandoff(request, backend)\n```\n\n### Parameters\n\n- `request` _: Request_\n  - The request to pass through Websocket.\n- `backend` _: string_\n  - The name of the backend that Websocket should send the request to.\n  - The name has to be between 1 and 254 characters inclusive.\n  - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n\n### Return value\n\nA Response instance is returned, which can then be used via `event.respondWith`.\n\n## Examples\n\nIn this example application requests to the path `/stream` and sent handled via Websocket.\n\n```js\nimport { createWebsocketHandoff } from \"fastly:websocket\";\n\nasync function handleRequest(event) {\n  try {\n    const url = new URL(event.request.url);\n    if (url.pathname === '/stream') {\n      return createWebsocketHandoff(event.request, 'websocket_backend');\n    } else {\n      return new Response('oopsie, make a request to /stream for some websocket goodies', { status: 404 });\n    }\n  } catch (error) {\n    console.error({error});\n    return new Response(error.message, {status:500})\n  }\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/acl/Acl/open.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Acl.open()\n\nOpens the ACL with the given name, returning a new `Acl` instance with the given name on success.\n\n## Syntax\n\n```js\nAcl.open(name)\n```\n\n### Return value\n\nAn `Acl` instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/acl/Acl/prototype/lookup.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Acl.prototype.lookup()\n\nThe **`lookup(ipAddress)`** method returns the name associated with the `Acl` instance.\n\n## Syntax\n\n```js\nacl.lookup(ipAddress)\n```\n\n### Parameters\n\n- `ipAddress` _: string_\n  - IPv4 or IPv6 address to lookup\n\n### Return value\n\nAn Object of the form `{ action: 'ALLOW' | 'BlOCK', prefix: string }`, where `prefix` is the IP\naddress prefix that was matched in the ACL.\n\n## Example\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Acl } from 'fastly:acl';\naddEventListener('fetch', async (evt) => {\n  const myAcl = Acl.open('myacl');\n  const match = await myAcl.lookup(evt.client.address);\n  evt.respondWith(new Response(match?.action === 'BLOCK' ? 'blocked' : 'allowed'));\n});\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/backend/Backend/Backend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Backend()`\n\nThe **`Backend` constructor** lets you dynamically create new [Fastly Backends](https://developer.fastly.com/reference/api/services/backend/) for your Fastly Compute service.\n\n>**Note**: Dynamic backends are by default disabled at the Fastly service level. Contact [Fastly Support](https://support.fastly.com/hc/en-us/requests/new?ticket_form_id=360000269711) to request dynamic backends on Fastly Services.\n\nTo disable the usage of dynamic backends, see [enforceExplicitBackends](../enforceExplicitBackends.mdx).\n\n## Syntax\n\n```js\nnew Backend(backendConfiguration)\n```\n\n> **Note:** `Backend()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `backendConfiguration`\n\n  - : An Object which contains all the configuration options to apply to the newly created Backend.\n\n    - `name` _: string_\n      - The name of the backend.\n      - The name has to be between 1 and 254 characters inclusive.\n      - The name can be whatever you would like, as long as it does not match the name of any of the static service backends nor match any other dynamic backends built during a single execution of the application.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n    - `target` _: string_\n      - A hostname, IPv4, or IPv6 address for the backend as well as an optional port.\n      - The target has to be at-least 1 character.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. Is null, undefined, an empty string, not a valid IP address or host, or is the string `::`\n    - `hostOverride` _: string_ _**optional**_\n      - If set, will force the HTTP Host header on connections to this backend to be the supplied value.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `connectTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for a connection to this backend to be established.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `firstByteTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `betweenBytesTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend.\n      - If exceeded, the response received so far will be considered complete and the fetch will end.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `useSSL` _: boolean_ _**optional**_\n      - Whether or not to require TLS for connections to this backend.\n    - `dontPool` _: boolean_ _**optional**_\n      - Determine whether or not connections to the same backend should be pooled across different sessions.\n      - Fastly considers two backends “the same” if they're registered with the same name and the exact same settings.\n      - In those cases, when pooling is enabled, if Session 1 opens a connection to this backend it will be left open, and can be re-used by Session 2.\n      - This can help improve backend latency, by removing the need for the initial network / TLS handshake(s).\n      - By default, pooling is enabled for dynamic backends.\n    - `tlsMinVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Minimum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `tlsMaxVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Maximum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `certificateHostname` _: string_ _**optional**_\n      - Define the hostname that the server certificate should declare.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `caCertificate` _: string_ _**optional**_\n      - The CA certificate to use when checking the validity of the backend.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `ciphers` _: string_ _**optional**_\n      - List of OpenSSL ciphers to support for connections to this origin.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - [List of ciphers supported by Fastly](https://developer.fastly.com/learning/concepts/routing-traffic-to-fastly/#use-a-tls-configuration).\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `sniHostname` _: string_ _**optional**_\n      - The SNI hostname to use on connections to this backend.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `clientCertificate` _: object_ _**optional**_\n      - The client certificate to provide for the TLS handshake\n      - `certificate` _: string_\n        - The PEM certificate string.\n      - `key` _: SecretStoreEntry_\n        - The `SecretStoreEntry` to use for the key, created via [`SecretStore.prototype.get`](../../fastly:secret-store/SecretStore/prototype/get.mdx) or alteratively via [`SecretStore.fromBytes`](../../fastly:secret-store/SecretStore/fromBytes.mdx).\n    - `httpKeepalive` _: number_ _**optional**_\n      - Enable HTTP keepalive, setting the timout in milliseconds.\n    - `tcpKeepalive` _: boolean | object_ _**optional**_\n      - Enable TCP keepalive. When an object, optionally setting the keepalive configuration options.\n      - `timeSecs` _: number_ _**optional**_\n        - Configure how long to wait after the last sent data over the TCP connection before starting to send TCP keepalive probes.\n      - `intervalSecs` _: number_ _**optional**_\n        - Configure how long to wait between each TCP keepalive probe sent to the backend to determine if it is still active.\n      - `probes` _: number_ _**optional**_\n        - Number of probes to send to the backend before it is considered dead.\n    - `grpc` _: boolean_ _**optional**_\n      - **_Experimental feature_**\n      - When enabled, sets that this backend is to be used for gRPC traffic. \n      - _Warning: When using this experimental feature, no guarantees are provided for behaviours for backends that do not provide gRPC traffic._\n\nAll optional generic options can have their defaults set via [`setDefaultDynamicBackendConfig()`](../setDefaultDynamicBackendConfig.mdx).\n\nThis includes all configuration options above except for `name`, `target`, `hostOverride`, `sniHostname` and `grpc`.\n\n### Return value\n\nA new `Backend` object.\n\n## Examples\n\nIn this example an explicit Dynamic Backend is created and supplied to the fetch request, the response is then returned to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Explicit Dynamic Backend Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\",\n    connectTimeout: 1000,\n    firstByteTimeout: 15000,\n    betweenBytesTimeout: 10000,\n    useSSL: true,\n    tlsMinVersion: 1.3,\n    tlsMaxVersion: 1.3,\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\",\n    connectTimeout: 1000,\n    firstByteTimeout: 15000,\n    betweenBytesTimeout: 10000,\n    useSSL: true,\n    tlsMinVersion: 1.3,\n    tlsMaxVersion: 1.3,\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/backend/Backend/exists.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.exists()\n\nThe **`Backend.exists()`** method returns a boolean indicating if a Backend with the given name exists or not.\n\n## Syntax\n\n```js\nexists(name)\n```\n\n### Return value\n\nA boolean indicating if a Backend with the given name exists or not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/backend/Backend/fromName.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.fromName()\n\nReturns the `Backend` instance with the given name, if one exists. If one does not exist, an error is thrown.\n\n## Syntax\n\n```js\nfromName(name)\n```\n\n### Return value\n\nA `Backend` instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/backend/Backend/health.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.health()\n\n:::info\n\nThis method is deprecated, use [`Backend.prototype.health`](./prototype/health.mdx) instead.\n\n:::\n\nThe **`Backend.health()`** method returns a string representing the health of the given Backend instance.\n\n## Syntax\n\n```js\nBackend.health(backend)\n```\n\n### Return value\n\nA string representing the health of the specified Backend value.\n\nPossible values are:\n- `\"healthy\"` - The backend's health check has succeeded, indicating the backend is working as expected and should receive requests.\n- `\"unhealthy\"` - The backend's health check has failed, indicating the backend is not working as expected and should not receive requests.\n- `\"unknown\"` - The backend does not have a health check configured.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/backend/Backend/prototype/betweenBytesTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.betweenBytesTimeout\n\nThe read-only **`betweenBytesTimeout`** property of a `Backend` instance is an integer number\nproviding the between bytes timeout for this backend in milliseconds.\n\nWhen not set or in environments that do not support this property (such as Viceroy), `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/backend/Backend/prototype/connectTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.connectTimeout\n\nThe read-only **`connectTimeout`** property of a `Backend` instance is an integer number\nproviding the connect timeout for this backend in milliseconds.\n\nWhen not set or in environments that do not support this property (such as Viceroy), `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/backend/Backend/prototype/firstByteTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.firstByteTimeout\n\nThe read-only **`firstByteTimeout`** property of a `Backend` instance is an integer number\nproviding the first byte timeout for this backend in milliseconds.\n\nWhen not set or in environments that do not support this property (such as Viceroy), `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/backend/Backend/prototype/health.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.prototype.health()\n\nThe **`Backend.prototype.health()`** method returns a string representing the health of the given Backend instance.\n\n## Syntax\n\n```js\nhealth()\n```\n\n### Return value\n\nA string representing the health of the specified Backend value.\n\nPossible values are:\n- `\"healthy\"` - The backend's health check has succeeded, indicating the backend is working as expected and should receive requests.\n- `\"unhealthy\"` - The backend's health check has failed, indicating the backend is not working as expected and should not receive requests.\n- `\"unknown\"` - The backend does not have a health check configured.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/backend/Backend/prototype/hostOverride.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.hostOverride\n\nThe read-only **`hostOverride`** property of a `Backend` instance is the host header\noverride string used when sending requests to this backend.\n\n## Value\n\nA `string`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/backend/Backend/prototype/httpKeepaliveTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.httpKeepaliveTime\n\nThe read-only **`httpKeepaliveTime`** property of a `Backend` instance is the HTTP keepalive\ntime for this backend in milliseconds, or 0 if no keepalive is set.\n\n## Value\n\nA `number`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/backend/Backend/prototype/isDynamic.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.isDynamic\n\nThe read-only **`isDynamic`** property of a `Backend` instance is a boolean\nindicating if the backend was dynamically created for this service.\n\n## Value\n\nA `boolean`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/backend/Backend/prototype/isSSL.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.isSSL\n\nThe read-only **`isSSL`** property of a `Backend` instance is a boolean\nindicating if the backend is using an SSL connection.\n\n## Value\n\nA `boolean`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/backend/Backend/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# name\n\nThe read-only **`name`** property of the backend returns the backend name string.\n\n## Value\n\nA `string`.\n\n## Description\n\nProvides the name of the backend.\n\n## Examples\n\n### Using name\n\nThe following example logs the string value of a [Backend](../Backend.mdx) object:\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Backend.prototype.name Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\\\"@fastly/js-compute\\\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.name); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.name); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/backend/Backend/prototype/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.port\n\nThe read-only **`port`** property of a `Backend` instance is the port number\nof this backend.\n\n## Value\n\nA `number`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/backend/Backend/prototype/target.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.target\n\nThe read-only **`target`** property of a `Backend` instance is the host string\nthis backend is configured to use.\n\n## Value\n\nA `string`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/backend/Backend/prototype/tcpKeepalive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.tcpKeepalive\n\nThe read-only **`tcpKeepalive`** property of a `Backend` instance returns an object providing\nthe TCP keepalive configuration, if any, otherwise returning `null` if TCP keepalive is not enabled.\n\nThis object has the following properties:\n- `timeSecs` _: number or null._\n  - Configure how long to wait after the last sent data over the TCP connection before starting to send TCP keepalive probes.\n- `intervalSecs` _: number or null._\n  - Configure how long to wait between each TCP keepalive probe sent to the backend to determine if it is still active.\n- `probes` _: number or null._\n  - Number of probes to send to the backend before it is considered dead.\n\n## Value\n\nA `Object` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/backend/Backend/prototype/tlsMaxVersion.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.tlsMaxVersion\n\nThe read-only **`tlsMaxVersion`** property of a `Backend` instance is the max TLS version\nit is configured to use, as a number, either `1.0`, `1.1`, `1.2`, or `1.3`.\n\nWhen not used, or for environments that do not support this feature, such as Viceroy, `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/backend/Backend/prototype/tlsMinVersion.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.tlsMinVersion\n\nThe read-only **`tlsMinVersion`** property of a `Backend` instance is the max TLS version\nit is configured to use, as a number, either `1.0`, `1.1`, `1.2`, or `1.3`.\n\nWhen not used, or for environments that do not support this feature, such as Viceroy, `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/backend/Backend/prototype/toName.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.prototype.toName()\n\n:::info\n\nThis method is deprecated, use [`Backend.prototype.name`](./name.mdx) instead.\n\n:::\n\nThe **`toName()`** method returns the name associated with the `Backend` instance.\n\n## Syntax\n\n```js\ntoName()\n```\n\n### Return value\n\nA string which contains the name of the Backend.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/backend/Backend/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# toString\n\n:::info\n\nThis method is deprecated, use [`Backend.prototype.name`](./name.mdx) instead.\n\n:::\n\nThe **`toString()`** method returns a string representing the specified Backend value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified Backend value.\n\n## Description\n\nThe [Backend](../Backend.mdx) object overrides the `toString()` method of [Object](../../../globals//Object/Object.mdx); it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For [Backend](../Backend.mdx) values, the `toString` method returns the name given to the [Backend](../Backend.mdx) object during construction.\n\nThe `toString()` method requires its `this` value to be a [Backend](../Backend.mdx) object.\n\nIf the `this` value does not inherit from `Backend.prototype`, a [TypeError](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n## Examples\n\n### Using toString()\n\nThe following example logs the string value of a [Backend](../Backend.mdx) object:\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Backend.prototype.toString Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\\\"@fastly/js-compute\\\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.toString()); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.toString()); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/backend/allowDynamicBackends.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# allowDynamicBackends\n\n:::info\n\nThis method is deprecated, and dynamic backends are now always supported when enabled at the service level. See [`enforceExplicitBackends`](./enforceExplicitBackends.mdx) instead.\n\n:::\n\nThe **`allowDynamicBackends()`** function is used to control whether or not Dynamic Backends should be allowed within this Fastly Compute Service.\n\nBy default, Dynamic Backends are enabled, but can be a potential security concern since third-party JavaScript code may send arbitrary requests, potentially including sensitive/secret data, off to destinations that the JavaScript project was not intending.\n\nUsing `allowDynamicBackends(false)` this security property can be restored to only use explicit backend definitions.\n\n>**Note**: By default, while dynamic backends are allowed in the SDK, they are by default disabled at the Fastly service level.\n\n## Syntax\n\n```js\nallowDynamicBackends(enabledOrConfig)\n```\n\n### Parameters\n\n- `enabled` _: boolean_\n  - Whether or not to allow Dynamic Backends\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/backend/enforceExplicitBackends.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# enforceExplicitBackends\n\nCall this function to enforce the security property of explicitly-defined backends, even when dynamic backends are enabled at\nthe Fastly service level.\n\nBy default, if dynamic backends are supported for the Fastly service, they will be automatically used when creating a new\n`fetch()` request. This default behaviour for dynamic backends can be a potential security concern since third-party JavaScript\ncode may send arbitrary requests, including sensitive/secret data, off to destinations that the JavaScript project was not\nintending.\n\nWhen calling this function, an optional default backend name can be provided.\n\n>**Note**: This is a separate option to the service-level dynamic backend support for Fastly services, which is by deault disabled for Fastly services.\n\nThe **`enforceExplicitBackends()`** function is used to control whether or not Dynamic Backends should be allowed within this Fastly Compute Service.\n\nBy default, Dynamic Backends are enabled, but can be a potential security concern since third-party JavaScript code may send arbitrary requests, potentially including sensitive/secret data, off to destinations that the JavaScript project was not intending.\n\nUsing `allowDynamicBackends(false)` this security property can be restored to only use explicit backend definitions.\n\n>**Note**: Dynamic Backends are disabled by default for Fastly Services. Please contact [Fastly Support](https://support.fastly.com/hc/requests/new?ticket_form_id=360000269711) to request the feature be enabled or disabled on Fastly Services.\n\n## Syntax\n\n```js\nenforceExplicitBackends(defaultBackend?)\n```\n\n### Parameters\n\n- `defaultBackend` _: string_ _**optional**_\n  - An optional default backend string name to use in `fetch()` requests.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/backend/setDefaultDynamicBackendConfig.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# setDefaultDynamicBackendConfig()\n\nThe **`setDefaultDynamicBackendConfig()`** allows setting backend configuration defaults that should apply to any newly created dynamic backends via the `new Backend()` constructor.\n\n### Parameters\n\n- `defaultDynamicBackendConfig`\n\n  - : An Object which contains the generic configuration options to apply to newly created Backends.\n    - `connectTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for a connection to this backend to be established.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `firstByteTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `betweenBytesTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend.\n      - If exceeded, the response received so far will be considered complete and the fetch will end.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `useSSL` _: boolean_ _**optional**_\n      - Whether or not to require TLS for connections to this backend.\n    - `dontPool` _: boolean_ _**optional**_\n      - Determine whether or not connections to the same backend should be pooled across different sessions.\n      - Fastly considers two backends “the same” if they're registered with the same name and the exact same settings.\n      - In those cases, when pooling is enabled, if Session 1 opens a connection to this backend it will be left open, and can be re-used by Session 2.\n      - This can help improve backend latency, by removing the need for the initial network / TLS handshake(s).\n      - By default, pooling is enabled for dynamic backends.\n    - `tlsMinVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Minimum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `tlsMaxVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Maximum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `certificateHostname` _: string_ _**optional**_\n      - Define the hostname that the server certificate should declare.\n      - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `caCertificate` _: string_ _**optional**_\n      - The CA certificate to use when checking the validity of the backend.\n      - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `ciphers` _: string_ _**optional**_\n      - List of OpenSSL ciphers to support for connections to this origin.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - [List of ciphers supported by Fastly](https://developer.fastly.com/learning/concepts/routing-traffic-to-fastly/#use-a-tls-configuration).\n      - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `clientCertificate` _: object_ _**optional**_\n      - The client certificate to provide for the TLS handshake\n      - `certificate` _: string_\n        - The PEM certificate string.\n      - `key` _: SecretStoreEntry_\n        - The `SecretStoreEntry` to use for the key, created via [`SecretStore.prototype.get`](../fastly:secret-store/SecretStore/prototype/get.mdx) or alteratively via [`SecretStore.fromBytes`](../fastly:secret-store/SecretStore/fromBytes.mdx).\n    - `httpKeepalive` _: number_ _**optional**_\n      - Enable HTTP keepalive, setting the timout in milliseconds.\n    - `tcpKeepalive` _: boolean | object_ _**optional**_\n      - Enable TCP keepalive. When an object, optionally setting the keepalive configuration options.\n      - `timeSecs` _: number_ _**optional**_\n        - Configure how long to wait after the last sent data over the TCP connection before starting to send TCP keepalive probes.\n      - `intervalSecs` _: number_ _**optional**_\n        - Configure how long to wait between each TCP keepalive probe sent to the backend to determine if it is still active.\n      - `probes` _: number_ _**optional**_\n        - Number of probes to send to the backend before it is considered dead.\n\n## Syntax\n\n```js\nsetDefaultDynamicBackendConfig(defaultConfig)\n```\n\n### Return value\n\nNone.\n\n## Examples\n\nIn this example an explicit Dynamic Backend is created and supplied to the fetch request, with timeouts and TLS options provided from the default backend configuration options.\n\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Explicit Dynamic Backend Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nimport { Backend, setDefaultDynamicBackendConfig } from \"fastly:backend\";\nallowDynamicBackends(true);\nsetDefaultDynamicBackendConfig({\n  connectTimeout: 1000,\n  firstByteTimeout: 15_000,\n  betweenBytesTimeout: 10_000,\n  useSSL: true,\n  sslMinVersion: 1.3,\n  sslMaxVersion: 1.3\n});\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  // Timeouts and TLS configuration still get set from the default backend configuration above.\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\"\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nimport { Backend } from \"fastly:backend\";\nallowDynamicBackends(true);\nsetDefaultDynamicBackendConfig({\n  connectTimeout: 1000,\n  firstByteTimeout: 15_000,\n  betweenBytesTimeout: 10_000,\n  useSSL: true,\n  sslMinVersion: 1.3,\n  sslMaxVersion: 1.3\n});\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\"\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/cache/CacheEntry/age.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.age\n\nThe **`age`** method of the `CacheEntry` interface returns the current age in milliseconds of the cached item.\n\n## Syntax\n\n```js\nage()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the current age in milliseconds of the cached item."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/cache/CacheEntry/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.body\n\nThe **`body`** method of the `CacheEntry` interface retrieves the cached item contents as a `ReadableStream`.\n\nOnly one stream can be active at a time for a given `CacheEntry`. An error will be thrown if a stream is already active for this `CacheEntry`.\n\n## Syntax\n\n```js\nbody(options)\n```\n\n### Parameters\n\n- `options` _: object_ __optional__\n  - `start` _: number_\n    - The offset from which to start the range.\n  - `end` _: number_\n    - How long the range should be.\n\n### Return value\n\nA `ReadableStream` which contains the cached item contents."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/cache/CacheEntry/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.close\n\nThe **`close`** method of the `CacheEntry` interface closes the connection to the cache for this `CacheEntry`.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/cache/CacheEntry/hits.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.hits\n\nThe **`hits`** method of the `CacheEntry` interface returns the amount of cache hits for the cached item.\n\nNote: this hit count only reflects the view of the server that supplied the cached item. Due to clustering, this count may vary between potentially many servers within the data center where the item is cached. See the [clustering documentation](https://developer.fastly.com/learning/vcl/clustering/) for details, though note that the exact caching architecture of Compute is different from VCL services.\n\n## Syntax\n\n```js\nhits()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the number of cache hits to this cached item.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/cache/CacheEntry/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.length\n\nThe **`length`** method of the `CacheEntry` interface returns the size in bytes of the cached item, if known, otherwise returns `null` if the length is currently unknown.\n\nThe length of the cached item may be unknown if the item is currently being streamed into the cache without a fixed length.\n\n## Syntax\n\n```js\nlength()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` or `null` which represents the current length of the cached item.\n\n`null` is returned if the length is currently unknown."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/cache/CacheEntry/maxAge.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.maxAge\n\nThe **`maxAge`** method of the `CacheEntry` interface returns the time in milliseconds for which the cached item is considered fresh.\n\n## Syntax\n\n```js\nmaxAge()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the time in milliseconds for which the cached item is considered fresh."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/cache/CacheEntry/staleWhileRevalidate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.staleWhileRevalidate\n\nThe **`staleWhileRevalidate`** method of the `CacheEntry` interface returns the time in milliseconds for which a cached item can safely be used despite being considered stale.\n\n## Syntax\n\n```js\nstaleWhileRevalidate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the time in milliseconds for which a cached item can safely be used despite being considered stale."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/cache/CacheEntry/state.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.state\n\nThe **`state`** method of the `CacheEntry` interface returns a `CacheState` instance which reflects the current state of this `CacheEntry` instance.\n\n## Syntax\n\n```js\nstate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `CacheState` instance which reflects the current state of this `CacheEntry` instance."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/cache/CacheEntry/userMetadata.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.userMetadata\n\nThe **`userMetadata`** method of the `CacheEntry` interface returns the user-controlled metadata associated with the cached item.\n\n## Syntax\n\n```js\nuserMetadata()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nAn `ArrayBuffer` which contains the user-controlled metadata associated with the cached item."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/cache/CacheState/found.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheState.found\n\nThe **`found`** method of the `CacheState` interface returns `true` if a cached item was located.\n\nEven if an cached item is found, the cached item might be stale and require updating. Use `mustInsertOrUpdate()` to determine whether this transaction client is expected to update the cached item.\n\n## Syntax\n\n```js\nfound()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `boolean` which represents whether a cached item was located or not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/cache/CacheState/mustInsertOrUpdate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheState.mustInsertOrUpdate\n\nThe **`mustInsertOrUpdate`** method of the `CacheState` interface returns `true` if a fresh cache item was not found, and this transaction client is expected to insert a new item or update a stale item.\n\n\n## Syntax\n\n```js\nmustInsertOrUpdate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `boolean` which represents whether a fresh cached item was found not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/cache/CacheState/stale.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheState.stale\n\nThe **`stale`** method of the `CacheState` interface returns `true` if the cached item is stale.\n\nA cached item is stale if its age is greater than its `maxAge` period.\n\n## Syntax\n\n```js\nstale()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `boolean` which represents whether the cached item is stale or not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/cache/CacheState/usable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheState.usable\n\nThe **`usable`** method of the `CacheState` interface returns `true` if the cached item is usable.\n\nA cached item is usable if its age is less than the sum of the `maxAge` and `staleWhileRevalidate` periods.\n\n## Syntax\n\n```js\nusable()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `boolean` which represents whether a cached item is usable or not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/cache/CoreCache/insert.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CoreCache.insert\n\nPerforms a non-transactional insertion into the cache, returning a `FastlyBody` instance for providing the cached object itself.\nFor the insertion to complete successfully, the object must be written into the returned `FastlyBody` instance, and then `FastlyBody.protoype.close` must be called.\nIf `FastlyBody.prototype.close` does not get called, the insertion is considered incomplete, and any concurrent lookups that may be reading from the object as it is streamed into the cache may encounter a streaming error.\n\nNote: Like `CoreCache.lookup()`, `CoreCache.insert()` may race with concurrent lookups or insertions, and will unconditionally overwrite existing cached items rather than allowing for revalidation of an existing object.\nThe transactional equivalent of this function is `TransactionCacheEntry.insert()`, which may only be called following a `CoreCache.transactionLookup()` call and the returned `CacheEntry` when has a state where `CacheState.mustInsertOrUpdate()` returns true.\n\n## Syntax\n\n```js\ninsert(key, options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - A cache key which is a string with a length of up to 8,135 that identify a cached item.\n  - The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n- `options` _: object_\n  - `headers` _: HeadersInit_ __optional__\n    - The headers act as additional factors in object selection, and the choice of which headers to factor in is determined during insertion, via the `vary` property within `TransactionInsertOptions`.\n    - A lookup will succeed when there is at least one cached item that matches lookup’s `key`, and all of the lookup’s headers included in the cache items’ `vary` list match the corresponding headers in that cached item.\n    - A typical example is a cached HTTP response, where the request had an \"Accept-Encoding\" header. In that case, the origin server may or may not decide on a given encoding, and whether that same response is suitable for a request with a different (or missing) Accept-Encoding header is determined by whether Accept-Encoding is listed in Vary header in the origin’s response.\n    - Note: These headers are narrowly useful for implementing cache lookups incorporating the semantics of the HTTP Vary header.\n  - `maxAge` _: number_ __optional__\n    - Sets the “time to live” for the cache item in milliseconds: The time for which the item will be considered fresh.\n  - `vary` _: array_ __optional__\n    - Sets the list of headers that must match when looking up this cached item.\n  - `initialAge` _: number_ __optional__\n    - Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n    - The initial age is 0 by default.\n  - `staleWhileRevalidate` _: number_ __optional__\n    - Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n    - Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n    - The methods `CacheState.protoype.usable` and `CacheState.protoype.stale` can be used to determine the current state of an item.\n    - The stale-while-revalidate period is 0 by default.\n  - `surrogateKeys` _: array_ __optional__\n    - Sets the surrogate keys that can be used for purging this cached item.\n    - Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item’s TTL to elapse, or overwriting the item with insert().\n    - Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n    - [See the Fastly surrogate keys guide for details.](https://docs.fastly.com/en/guides/working-with-surrogate-keys)\n  - `length` _: number_ __optional__\n    - Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n    - It is preferable to provide a length, if possible.\n    - Clients that begin streaming the item’s contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n  - `userMetadata` _: ArrayBufferView | ArrayBuffer | URLSearchParams | string_ __optional__\n    - Sets the user-defined metadata to associate with the cached item.\n  - `sensitive` _: boolean_ __optional__\n    - Enable or disable PCI/HIPAA-compliant non-volatile caching.\n    - By default, this is false.\n    - [See the Fastly PCI-Compliant Caching and Delivery documentation for details.](https://docs.fastly.com/products/pci-compliant-caching-and-delivery)\n\n### Return value\n\nReturns a `FastlyBody`.\n\n### Exceptions\n\n- If the provided `key`:\n  - Cannot be coerced to a string\n  - Is an empty string\n  - Is longer than 8135 characters\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/cache/CoreCache/lookup.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# CoreCache.lookup\n\nPerform a non-transactional lookup into the cache, returning a CacheEntry if a usable cached item was found.\nA cached item is usable if its age is less than the sum of its TTL and its stale-while-revalidate period. Items beyond that age are unusably stale.\n\nNote: A non-transactional lookup will not attempt to coordinate with any concurrent cache lookups.\nIf two instances of the service perform a lookup at the same time for the same cache key, and the item is not yet cached, they will both return `null`.\nWithout further coordination, they may both end up performing the work needed to insert() the item (which usually involves origin requests and/or computation) and racing with each other to insert.\nTo resolve such races between concurrent lookups, use `CoreCache.transactionLookup()` instead.\n\n## Syntax\n\n```js\nlookup(key, options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - A cache key which is a string with a length of up to 8,135 that identify a cached item.\n  - The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n\n- `options` _: object_\n  - `headers` _: HeadersInit_ __optional__\n    - The headers act as additional factors in object selection, and the choice of which headers to factor in is determined during insertion, via the `vary` property within `TransactionInsertOptions`.\n    - A lookup will succeed when there is at least one cached item that matches lookup’s `key`, and all of the lookup’s headers included in the cache items’ `vary` list match the corresponding headers in that cached item.\n    - A typical example is a cached HTTP response, where the request had an \"Accept-Encoding\" header. In that case, the origin server may or may not decide on a given encoding, and whether that same response is suitable for a request with a different (or missing) Accept-Encoding header is determined by whether Accept-Encoding is listed in Vary header in the origin’s response.\n    - Note: These headers are narrowly useful for implementing cache lookups incorporating the semantics of the HTTP Vary header.\n\n### Return value\n\nReturns `CacheEntry` if a usable cached item was found, otherwise returns `null`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/cache/CoreCache/transactionLookup.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# CoreCache.transactionLookup\n\nPerform a transactional lookup into the cache, returning a `TransactionCacheEntry` instance.\n\nTransactions coordinate between concurrent actions on the same cache key, incorporating concepts of [request collapsing](https://developer.fastly.com/learning/concepts/request-collapsing/) and [revalidation](https://developer.fastly.com/learning/concepts/stale/), though at a lower level that does not automatically interpret HTTP semantics.\n\nRequest Collapsing:\nIf there are multiple concurrent calls to `CoreCache.transactionLookup()` for the same item and that item is not present,\njust one of the callers will be instructed to insert the item into the cache as part of the transaction.\nThe other callers will block until the metadata for the item has been inserted, and can then begin streaming its contents out of the cache at the same time that the inserting caller streams them into the cache.\n\nRevalidation:\nSimilarly, if an item is usable but stale, and multiple callers attempt a `CoreCache.transactionLookup()` concurrently, they will all be given access to the stale item, but only one will be designated to perform an asynchronous update (or insertion) to freshen the item in the cache.\n\n## Syntax\n\n```js\ntransactionLookup(key, options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - A cache key which is a string with a length of up to 8,135 that identify a cached item.\n  - The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n\n- `options` _: object_\n  - `headers` _: HeadersInit_ __optional__\n    - The headers act as additional factors in object selection, and the choice of which headers to factor in is determined during insertion, via the `vary` property within `TransactionInsertOptions`.\n    - A lookup will succeed when there is at least one cached item that matches lookup’s `key`, and all of the lookup’s headers included in the cache items’ `vary` list match the corresponding headers in that cached item.\n    - A typical example is a cached HTTP response, where the request had an \"Accept-Encoding\" header. In that case, the origin server may or may not decide on a given encoding, and whether that same response is suitable for a request with a different (or missing) Accept-Encoding header is determined by whether Accept-Encoding is listed in Vary header in the origin’s response.\n    - Note: These headers are narrowly useful for implementing cache lookups incorporating the semantics of the HTTP Vary header.\n\n### Return value\n\nReturns an instance of `TransactionCacheEntry`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/cache/SimpleCache/SimpleCache.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `SimpleCache`\n\nThe **`SimpleCache` class** provides a simplified interface to inserting and retrieving entries from Fastly's Cache.\n\nAll the methods on the class are static methods, there are no instance methods.\n\n\n## Examples\n\nIn this example we attempt to retrieve an entry from the Fastly Cache, if the entry does not exist, we create the content and insert it into the Fastly Cache before finally returning.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const path = new URL(event.request.url).pathname;\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/cache/SimpleCache/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCache.get\n\n▸ **get**(): `string`\n\nGets the entry associated with the key `key` from the cache.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the cache.\n\n### Return value\n\nIf the key does not exist in the cache, this returns `null`.\n\nIf the key does exist in the cache, this returns a `SimpleCacheEntry`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n## Examples\n\nIn this example we attempt to retrieve an entry from the Fastly Cache, and return a message stating whether the entry was in the Fastly Cache or not.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const path = new URL(event.request.url).pathname;\n  let page = SimpleCache.get(path);\n  return new Response(page ? `${path} is in the cache` : `${path} is not in the cache`, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/cache/SimpleCache/getOrSet.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCache.getOrSet\n\nThe **`getOrSet()`** method attempts to get an entry from the cache for the supplied `key`. If no entry is found (or has expired), the supplied `set` function is executed and its result is inserted into the cache under the supplied `key` and for the supplied `ttl` (Time-To-Live) duration, provided in seconds.\n\n## Syntax\n\n```js\ngetOrSet(key, set)\ngetOrSet(key, set, length)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to lookup and/or store the supplied entry under within the cache.\n- `set` _:  Function_\n  - The function to execute if and only if the cache does not have a usable entry for the supplied `key`.\n    The function should return a Promise which resolves with the following interface:\n    - `value` _:  ArrayBuffer | TypedArray | DataView | ReadableStream | URLSearchParams | String | string literal_\n      - The value to store within the cache.\n    - `ttl` _: number_\n      - The maximum number of seconds to store the supplied entry in the cache.\n    - `length` _: number_ __optional__\n      - The length of the value being stored within the cache. This is only used when the `value` is a `ReadableStream`.\n\n### Return value\n\nReturns a `SimpleCacheEntry`.\n\n### Exceptions\n\n- If the provided `key`:\n  - Cannot be coerced to a string\n  - Is an empty string\n  - Is longer than 8135 characters\n- If the provided `ttl`:\n  - Cannot be coerced to a number\n  - Is a negative number\n  - Is `NaN`\n  - Is Inifinity\n\n## Examples\n\nIn this example we attempt to retrieve an entry from the Fastly Cache. If the entry does not exist, we create the content and insert it into the Fastly Cache before finally returning.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const path = new URL(event.request.url).pathname;\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/cache/SimpleCache/purge.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# SimpleCache.purge\n\npurge the entry associated with the key `key` from the cache.\n\n## Syntax\n\n```js\npurge(key, options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to purge from within the cache.\n\n- `options` _: object_\n  - `scope` _: string_\n    - : Where to purge the content from.\n    - Possible values are:\n      - \"global\" - This will remove the content from all of Fastly.\n      - \"pop\" - This will remove the content from the POP that contains the currently executing instance.\n\n### Return value\n\nReturns `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n## Examples\n\nIn this example, when a request contains a `purge` querystring parameter, we purge the an entry from the cache.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const url = new URL(event.request.url);\n  const path = url.pathname;\n  if (url.searchParams.has('purge')) {\n    SimpleCache.purge(path, { scope: \"global\" });\n    return new Response(page, { status: 204 });\n  }\n\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/cache/SimpleCacheEntry/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the `SimpleCacheEntry` interface\ntakes the instance's stream and reads it to completion. It returns a promise\nthat resolves with an `ArrayBuffer`.\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an `ArrayBuffer`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/cache/SimpleCacheEntry/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.body\n\nThe **`body`** read-only property of the `SimpleCacheEntry` interface is a `ReadableStream` of the instance's contents.\n\n## Value\n\nA `ReadableStream`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/cache/SimpleCacheEntry/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.bodyUsed\n\nThe **`bodyUsed`** read-only property of the `SimpleCacheEntry` interface is a boolean value that indicates whether the body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/cache/SimpleCacheEntry/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.json()\n\nThe **`json()`** method of the `SimpleCacheEntry` interface takes\na `SimpleCacheEntry` stream and reads it to completion. It returns a promise which\nresolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a JavaScript object. This object could be\nanything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/cache/SimpleCacheEntry/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.text()\n\nThe **`text()`** method of the `SimpleCacheEntry` interface takes the instance's stream and reads it to completion.\nIt returns a promise that resolves with a `String`.\nThe result is _always_ decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Promise that resolves with a `String`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/cache/TransactionCacheEntry/age.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.age\n\nThe **`age`** method of the `TransactionCacheEntry` interface returns the current age in milliseconds of the cached item.\n\n## Syntax\n\n```js\nage()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the current age in milliseconds of the cached item."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/cache/TransactionCacheEntry/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.body\n\nThe **`body`** method of the `TransactionCacheEntry` interface retrieves the cached item contents as a `ReadableStream`.\n\nOnly one stream can be active at a time for a given `TransactionCacheEntry`. An error will be thrown if a stream is already active for this `TransactionCacheEntry`.\n\n## Syntax\n\n```js\nbody(options)\n```\n\n### Parameters\n\n- `options` _: object_ __optional__\n  - `start` _: number_\n    - The offset from which to start the range.\n  - `end` _: number_\n    - How long the range should be.\n\n### Return value\n\nA `ReadableStream` which contains the cached item contents."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/cache/TransactionCacheEntry/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.cancel\n\nThe **`cancel`** method of the `TransactionCacheEntry` interface cancels an obligation to provide an object to the cache.\n\n\n## Syntax\n\n```js\ncancel()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/cache/TransactionCacheEntry/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.close\n\nThe **`close`** method of the `TransactionCacheEntry` interface closes the connection to the cache for this `TransactionCacheEntry`.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/cache/TransactionCacheEntry/hits.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.hits\n\nThe **`hits`** method of the `TransactionCacheEntry` interface returns the amount of cache hits for the cached item.\n\nNote: this hit count only reflects the view of the server that supplied the cached item. Due to clustering, this count may vary between potentially many servers within the data center where the item is cached. See the [clustering documentation](https://developer.fastly.com/learning/vcl/clustering/) for details, though note that the exact caching architecture of Compute is different from VCL services.\n\n## Syntax\n\n```js\nhits()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the number of cache hits to this cached item.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/cache/TransactionCacheEntry/insert.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.insert\n\nPerform a transactional cache insertion, returning a `FastlyBody` instance for providing the cached object itself.\n\nThis method should only be called when `TransactionCacheEntry.state().mustInsertOrUpdate()` is true; otherwise, an error will be thrown when attempting to perform the insertion.\n\n## Syntax\n\n```js\ninsert(options)\n```\n\n### Parameters\n\n- `options` _: object_\n  - `maxAge` _: number_ __optional__\n    - Sets the “time to live” for the cache item in milliseconds: The time for which the item will be considered fresh.\n  - `vary` _: array_ __optional__\n    - Sets the list of headers that must match when looking up this cached item.\n  - `initialAge` _: number_ __optional__\n    - Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n    - The initial age is 0 by default.\n  - `staleWhileRevalidate` _: number_ __optional__\n    - Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n    - Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n    - The methods `CacheState.protoype.usable` and `CacheState.protoype.stale` can be used to determine the current state of an item.\n    - The stale-while-revalidate period is 0 by default.\n  - `surrogateKeys` _: array_ __optional__\n    - Sets the surrogate keys that can be used for purging this cached item.\n    - Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item’s TTL to elapse, or overwriting the item with insert().\n    - Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n    - [See the Fastly surrogate keys guide for details.](https://docs.fastly.com/en/guides/working-with-surrogate-keys)\n  - `length` _: number_ __optional__\n    - Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n    - It is preferable to provide a length, if possible.\n    - Clients that begin streaming the item's contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n  - `userMetadata` _: ArrayBufferView | ArrayBuffer | URLSearchParams | string_ __optional__\n    - Sets the user-defined metadata to associate with the cached item.\n  - `sensitive` _: boolean_ __optional__\n    - Enable or disable PCI/HIPAA-compliant non-volatile caching.\n    - By default, this is false.\n    - [See the Fastly PCI-Compliant Caching and Delivery documentation for details.](https://docs.fastly.com/products/pci-compliant-caching-and-delivery)\n\n### Return value\n\nReturns a `FastlyBody`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/cache/TransactionCacheEntry/insertAndStreamBack.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.insertAndStreamBack\n\nPerform a transaction cache insertion, returning a `FastlyBody` instance for providing the cached object itself, and a `CacheEntry` instance which can be used to stream out the newly-inserted cache item.\n\nFor the insertion to complete successfully, the object must be written into the returned `FastlyBody` instance, and then `FastlyBody.protoype.close` must be called.\nIf `FastlyBody.prototype.close` does not get called, the insertion is considered incomplete, and any concurrent lookups that may be reading from the object as it is streamed into the cache may encounter a streaming error.\n\n## Syntax\n\n```js\ninsertAndStreamBack(options)\n```\n\n### Parameters\n\n- `options` _: object_\n  - `maxAge` _: number_ __optional__\n    - Sets the “time to live” for the cache item in milliseconds: The time for which the item will be considered fresh.\n  - `vary` _: array_ __optional__\n    - Sets the list of headers that must match when looking up this cached item.\n  - `initialAge` _: number_ __optional__\n    - Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n    - The initial age is 0 by default.\n  - `staleWhileRevalidate` _: number_ __optional__\n    - Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n    - Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n    - The methods `CacheState.protoype.usable` and `CacheState.protoype.stale` can be used to determine the current state of an item.\n    - The stale-while-revalidate period is 0 by default.\n  - `surrogateKeys` _: array_ __optional__\n    - Sets the surrogate keys that can be used for purging this cached item.\n    - Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item’s TTL to elapse, or overwriting the item with insert().\n    - Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n    - [See the Fastly surrogate keys guide for details.](https://docs.fastly.com/en/guides/working-with-surrogate-keys)\n  - `length` _: number_ __optional__\n    - Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n    - It is preferable to provide a length, if possible.\n    - Clients that begin streaming the item's contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n  - `userMetadata` _: ArrayBufferView | ArrayBuffer | URLSearchParams | string_ __optional__\n    - Sets the user-defined metadata to associate with the cached item.\n  - `sensitive` _: boolean_ __optional__\n    - Enable or disable PCI/HIPAA-compliant non-volatile caching.\n    - By default, this is false.\n    - [See the Fastly PCI-Compliant Caching and Delivery documentation for details.](https://docs.fastly.com/products/pci-compliant-caching-and-delivery)\n\n### Return value\n\nReturns an array where the first item is a `FastlyBody` instance and the second item is a `CacheEntry` instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/cache/TransactionCacheEntry/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.length\n\nThe **`length`** method of the `TransactionCacheEntry` interface returns the size in bytes of the cached item, if known, otherwise returns `null` if the length is currently unknown.\n\nThe length of the cached item may be unknown if the item is currently being streamed into the cache without a fixed length.\n\n## Syntax\n\n```js\nlength()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` or `null` which represents the current length of the cached item.\n\n`null` is returned if the length is currently unknown."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/cache/TransactionCacheEntry/maxAge.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.maxAge\n\nThe **`maxAge`** method of the `TransactionCacheEntry` interface returns the time in milliseconds for which the cached item is considered fresh.\n\n## Syntax\n\n```js\nmaxAge()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the time in milliseconds for which the cached item is considered fresh."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/cache/TransactionCacheEntry/staleWhileRevalidate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.staleWhileRevalidate\n\nThe **`staleWhileRevalidate`** method of the `TransactionCacheEntry` interface returns the time in milliseconds for which a cached item can safely be used despite being considered stale.\n\n## Syntax\n\n```js\nstaleWhileRevalidate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the time in milliseconds for which a cached item can safely be used despite being considered stale."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/cache/TransactionCacheEntry/state.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.state\n\nThe **`state`** method of the `TransactionCacheEntry` interface returns a `CacheState` instance which reflects the current state of this `TransactionCacheEntry` instance.\n\n## Syntax\n\n```js\nstate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `CacheState` instance which reflects the current state of this `TransactionCacheEntry` instance."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/cache/TransactionCacheEntry/update.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.update\n\nPerform an update of the cache item's metadata.\n\n## Syntax\n\n```js\nupdate(options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - A cache key which is a string with a length of up to 8,135 that identify a cached item.\n  - The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n- `options` _: object_\n  - `maxAge` _: number_ __optional__\n    - Sets the “time to live” for the cache item in milliseconds: The time for which the item will be considered fresh.\n  - `vary` _: array_ __optional__\n    - Sets the list of headers that must match when looking up this cached item.\n  - `initialAge` _: number_ __optional__\n    - Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n    - The initial age is 0 by default.\n  - `staleWhileRevalidate` _: number_ __optional__\n    - Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n    - Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n    - The methods `CacheState.protoype.usable` and `CacheState.protoype.stale` can be used to determine the current state of an item.\n    - The stale-while-revalidate period is 0 by default.\n  - `surrogateKeys` _: array_ __optional__\n    - Sets the surrogate keys that can be used for purging this cached item.\n    - Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item’s TTL to elapse, or overwriting the item with insert().\n    - Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n    - [See the Fastly surrogate keys guide for details.](https://docs.fastly.com/en/guides/working-with-surrogate-keys)\n  - `length` _: number_ __optional__\n    - Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n    - It is preferable to provide a length, if possible.\n    - Clients that begin streaming the item's contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n  - `userMetadata` _: ArrayBufferView | ArrayBuffer | URLSearchParams | string_ __optional__\n    - Sets the user-defined metadata to associate with the cached item.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/cache/TransactionCacheEntry/userMetadata.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.userMetadata\n\nThe **`userMetadata`** method of the `TransactionCacheEntry` interface returns the user-controlled metadata associated with the cached item.\n\n## Syntax\n\n```js\nuserMetadata()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nAn `ArrayBuffer` which contains the user-controlled metadata associated with the cached item."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/cache-override/CacheOverride/CacheOverride.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `CacheOverride()`\n\nThe **`CacheOverride` constructor** lets you configure the caching behavior of a `Response`.\n\nNormally, the HTTP Headers on a [`Response`](../../globals/Response/Response.mdx) would control how the [`Response`](../../globals/Response/Response.mdx) is cached,\nbut `CacheOverride` can be set on a [`Request`](../../globals/Request/Request.mdx), to define custom caching behavior.\n\n## Syntax\n\n```js\nnew CacheOverride(mode)\nnew CacheOverride(mode, init)\nnew CacheOverride(init)\n```\n\n> **Note:** `CacheOverride()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `mode` _: string_\n  - Sets the cache override mode for a request\n  - If set to:\n    - `\"none\"`: Do not override the behavior specified in the origin response’s cache control headers.\n    - `\"pass\"`: Do not cache the response to this request, regardless of the origin response’s headers.\n    - `\"override\"`: Override particular cache control settings using the `CacheOverride` object's settings.\n       This options is also the default when providing an init object directly as the first argument.\n\n- `init`\n\n  - : An Object which contains all the configuration options to apply to the newly created `CacheOverride`.\n\n    - `pci` _: boolean_ _**optional**_\n      - Override the caching behavior of this request to enable or disable PCI/HIPAA-compliant non-volatile caching.\n      - By default, this is `false`, which means the request may not be PCI/HIPAA-compliant. Set it to `true` to enable compliant caching.\n      - See the [Fastly PCI-Compliant Caching and Delivery documentation](https://docs.fastly.com/products/pci-compliant-caching-and-delivery) for details.\n\n    - `surrogateKey` _: string_ _**optional**_\n      - Override the caching behavior of this request to include the given surrogate key, provided as a header value.\n      - See the [Fastly surrogate keys guide](https://docs.fastly.com/en/guides/purging-api-cache-with-surrogate-keys) for details.\n    - `swr` _: number_ _**optional**_\n      - Override the caching behavior of this request to use the given `stale-while-revalidate` time, in seconds\n\n    - `ttl` _: number_ _**optional**_\n      - Override the caching behavior of this request to use the given Time to Live (TTL), in seconds.\n    \n    - `beforeSend` _:Function_ _**optional**_\n      - `(request: Request) => void | PromiseLike<void>`\n      - Callback to be invoked if a request is going all the way to a backend, allowing the request to be modified beforehand.\n      - See [Modifying a request as it is forwarded to a backend](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/#modifying-a-request-as-it-is-forwarded-to-a-backend) in the Fastly cache interfaces documentation for details.\n\n    - `afterSend` _: Function_ _**optional**_\n      - `(response: Response) => void | CacheOptions | PromiseLike<void | CacheOptions>`\n      - Callback to be invoked after a response has been sent, but before it is stored into the cache.\n      - Where `CacheOptions` contains:\n        - `cache` _: boolean | 'uncacheable'_ _**optional**_\n          - Whether to cache this response. By default, leaving this field empty, responses will be cached based on their cache header information.\n          - Setting this to true or false will override this default cache behaviour, setting in the cache or not setting in the cache, even if the default behaviour would have been otherwise.\n          - Setting to 'uncacheable' the response will not only not be cached, but the cache will record that the originating request led to an uncacheable response, so that future cache lookups will result in immediately going to the backend, rather than attempting to coordinate concurrent requests to reduce backend traffic.\n          - See the [Fastly request collapsing guide](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/request-collapsing/) for more details on the mechanism that `uncacheable` disables.\n        - `bodyTransformFn` _: Function_ _**optional**_\n          - `(body: Uint8Array) => Uint8Array | PromiseLike<Uint8Array>`\n          - Provide a function to be used for transforming the response body prior to caching.\n          - Body transformations are performed by specifying a transform, rather than by directly working with the body during the onAfterSend callback function, because not every response contains a fresh body: 304 Not Modified responses, which are used to revalidate a stale cached response, are valuable precisely because they do not retransmit the body.\n          - For any other response status, the backend response will contain a relevant body, and the `bodyTransformFn` will be applied to it. The original backend body is passed in to the transform function, and the function is expected to return the new body.\n      - See [Controlling cache behavior based on backend response](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/#controlling-cache-behavior-based-on-backend-response) in the Fastly cache interfaces documentation for details.\n\n### Return value\n\nA new `CacheOverride` object.\n\n## Examples\n\nIn this example we override the cache for all the requests prefixed /static/ to have a long TTL (Time To Live),  and the home page to have a short TTL and a long SWR (Stale While Revalidate).\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"CacheOverride Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { CacheOverride } from \"fastly:cache-override\";\n// In this example we override the cache for all the requests prefixed /static/ \n// to have a long TTL (Time To Live), and the home page to have a short TTL and \n// a long SWR (Stale While Revalidate).\nasync function app (event) {\n  const path = (new URL(event.request.url)).pathname;\n  let cacheOverride;\n  if (path == '/') {\n    cacheOverride = new CacheOverride('override', {ttl: 10, swr: 86_400});\n  } else if (path.startsWith('/static/')) {\n    cacheOverride = new CacheOverride('override', {ttl: 86_400});\n  } else {\n    cacheOverride = new CacheOverride('none')\n  }\n  return fetch(event.request.url, {\n    cacheOverride,\n    backend: 'origin_0'\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { CacheOverride } from \"fastly:cache-override\";\n// In this example we override the cache for all the requests prefixed /static/ \n// to have a long TTL (Time To Live), and the home page to have a short TTL and \n// a long SWR (Stale While Revalidate).\nasync function app (event) {\n  const path = (new URL(event.request.url)).pathname;\n  let cacheOverride;\n  if (path == '/') {\n    cacheOverride = new CacheOverride('override', {ttl: 10, swr: 86_400});\n  } else if (path.startsWith('/static/')) {\n    cacheOverride = new CacheOverride('override', {ttl: 86_400});\n  } else {\n    cacheOverride = new CacheOverride('none')\n  }\n  return fetch(event.request.url, {\n    cacheOverride,\n    backend: 'origin_0'\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/compute/purgeSurrogateKey.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# purgeSurrogateKey\n\nThe **`purgeSurrogateKey()`** function is used to purge the given surrogate key string from Fastly's cache.\n\nThere are two purge modes: soft purge and hard purge, with hard purge as the default which clears all items\nfrom the cache immediately. When using a soft purge, stale entries are maintained in the cache, reducing\norgin load, while also enabling stale revalidations.\n\nSee the [Fastly Purge Documentation](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/purging/#surrogate-key-purge) for more information on caching and purge operations.\n\n## Syntax\n\n```js\npurgeSurrogateKey(surrogateKey, soft?)\n```\n\n### Parameters\n\n- `surrogateKey` _: string_\n  - The surrogate key string\n- `soft?` _: boolean_\n  - Enables a soft purge, retaining stale entries in the cache. Default is a hard purge.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/compute/vCpuTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# vCpuTime\n\nThe **`vCpuTime()`** function provides the vCPU time used by the current request handler in milliseconds.\n\n## Syntax\n\n```js\nvCpuTime()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`number`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/config-store/ConfigStore/ConfigStore.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `ConfigStore()`\n\nThe **`ConfigStore` constructor** lets you access a specific [Fastly Config Store](https://www.fastly.com/documentation/reference/api/services/resources/config-store/).\n\n> **Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew ConfigStore(name);\n```\n\n> **Note:** `ConfigStore()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Defines a config store instance using the resource link name.\n\n### Return value\n\nA new `ConfigStore` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Config Store exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name does not start with an ascii alphabetical character \n  - Thrown if the provided name does not contain only ascii alphanumeric, underscore, and whitespace characters\n\n## Examples\n\nIn this example we have a resource link named \"animals\" (which is linked to a config store) and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"ConfigStore Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/config-store/ConfigStore/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# ConfigStore.prototype.get\n\nThe **`get()`** method returns the value associated with the provided key in the config-store. If the provided key does not exist in the ConfigStore then this returns `null`.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from the dictionary.\n\n### Return value\n\nA `string` representing the specified ConfigStore value or `null` if the key does not exist in the ConfigStore\n\n## Description\n\nGet a value for a key in the config-store. If the provided key does not exist in the ConfigStore then this returns `null`.\n\nThe `get()` method requires its `this` value to be a [`ConfigStore`](../../../fastly%3Aconfig-store/ConfigStore/ConfigStore.mdx) object.\n\nIf the `this` value does not inherit from `ConfigStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided key is longer than 255 in length\n  - Thrown if the provided key is an empty string\n\n## Examples\n\nIn this example we have an Edge Dictionary named \"animals\" and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"ConfigStore Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/device/Device/lookup.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Device.lookup()\n\nLook up the data associated with a particular User-Agent string.\n\n\n## Syntax\n\n```js\nlookup(userAgent)\n```\n\n### Return value\n\nIf there is data associated with the User-Agent, a `Device` instance is returned.\nOtherwise, `null` is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/device/Device/prototype/brand.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.brand\n\nThe read-only **`brand`** property of the `Device` interface is\neither a string stating the brand of the device, which can be different from the manufacturer of that device.\nIf no brand is known, the value will be `null`.\n\n\n## Value\n\nEither a string value if a brand is known, otherwise `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/device/Device/prototype/hardwareType.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.hardwareType\n\nThe read-only **`hardwareType`** property of the `Device` interface is\neither a string stating the hardware type of the device, or `null` if the hardware type is not known.\n\nA string representation of the device's primary platform hardware. The most commonly used device types are also identified via boolean variables. Because a device may have multiple device types and this variable only has the primary type, we recommend using the boolean variables for logic and using this string representation for logging.\n\n\n\n## Value\n\nEither a string value if a hardware type is known, otherwise `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/device/Device/prototype/isBot.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isBot\n\nThe read-only **`isBot`** property of the `Device` interface is\neither a boolean stating if the device is a bot, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a bot, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/device/Device/prototype/isDesktop.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isDesktop\n\nThe read-only **`isDesktop`** property of the `Device` interface is\neither a boolean stating if the device is a desktop web browser, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a desktop web browser, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/device/Device/prototype/isGameConsole.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isGameConsole\n\nThe read-only **`isGameConsole`** property of the `Device` interface is\neither a boolean stating if the device is a video game console, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a video game console, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/device/Device/prototype/isMediaPlayer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isMediaPlayer\n\nThe read-only **`isMediaPlayer`** property of the `Device` interface is\neither a boolean stating if the device is a media player (like Blu-ray players, iPod devices, and smart speakers such as Amazon Echo), or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a media player (like Blu-ray players, iPod devices, and smart speakers such as Amazon Echo), or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/device/Device/prototype/isMobile.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isMobile\n\nThe read-only **`isMobile`** property of the `Device` interface is\neither a boolean stating if the device is a mobile phone, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a mobile phone, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/device/Device/prototype/isSmartTV.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isSmartTV\n\nThe read-only **`isSmartTV`** property of the `Device` interface is\neither a boolean stating if the device is a smart TV, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a smart TV, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/device/Device/prototype/isTablet.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isTablet\n\nThe read-only **`isTablet`** property of the `Device` interface is\neither a boolean stating if the device is a tablet (like an iPad), or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a tablet (like an iPad), or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/device/Device/prototype/isTouchscreen.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isTouchscreen\n\nThe read-only **`isTouchscreen`** property of the `Device` interface is\neither a boolean stating if the device's screen is touch sensitive, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device's screen is touch sensitive, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/device/Device/prototype/model.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.model\n\nThe read-only **`model`** property of the `Device` interface is\neither a string stating the model of the device, or `null` if the model is not known.\n\n\n## Value\n\nEither a string value if a model is known, otherwise `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/device/Device/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.name\n\nThe read-only **`name`** property of the `Device` interface is\neither a string stating the name of the device, or `null` if the name is not known.\n\n\n## Value\n\nEither a string value if a name is known, otherwise `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/device/Device/prototype/toJSON.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# toJSON\n\nThe `toJSON()` method of the Device interface is a serializer;\nit returns a JSON representation of the Device object.\n\nTo get a JSON string, you can use `JSON.stringify(device)` directly; it will call `toJSON()` automatically.\n\n## Syntax\n\n```js\ntoJSON()\n```\n\n### Return value\n\nA JSON object that is the serialization of the Device object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/dictionary/Dictionary/Dictionary.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Dictionary()`\n\n:::info\n\nThis Class is deprecated\n\n:::\n\nThe **`Dictionary` constructor** lets you access a specific [Fastly Edge Dictionary](https://docs.fastly.com/en/guides/about-edge-dictionaries).\n\n**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew Dictionary(name);\n```\n\n> **Note:** `Dictionary()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - The name of the [Fastly Edge Dictionary](https://docs.fastly.com/en/guides/about-edge-dictionaries) that this `Dictionary` instance should provide access to.\n\n### Return value\n\nA new `Dictionary` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Dictionary exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name does not start with an ascii alphabetical character \n  - Thrown if the provided name does not contain only ascii alphanumeric, underscore, and whitespace characters\n\n## Examples\n\nIn this example we have an Edge Dictionary named \"animals\" and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Dictionary Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/dictionary/Dictionary/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Dictionary.prototype.get\n\n:::info\n\nThis Class is deprecated, it has been renamed to [`ConfigStore`](../../../fastly:config-store/ConfigStore/ConfigStore.mdx) and can be imported via `import { ConfigStore } from 'fastly:config-store'`\n\nThe `get()` method exists on the [`ConfigStore`](../../../fastly:config-store/ConfigStore/ConfigStore.mdx) Class.\n\n:::\n\nThe **`get()`** method returns the value associated with the provided key in the dictionary. If the provided key does not exist in the Dictionary then this returns `null`.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from the dictionary.\n\n### Return value\n\nA `string` representing the specified Dictionary value or `null` if the key does not exist in the Dictionary\n\n## Description\n\nGet a value for a key in the dictionary. If the provided key does not exist in the Dictionary then this returns `null`.\n\nThe `get()` method requires its `this` value to be a [`Dictionary`](../Dictionary.mdx) object.\n\nIf the `this` value does not inherit from `Dictionary.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided key is longer than 255 in length\n  - Thrown if the provided key is an empty string\n\n## Examples\n\nIn this example we have an Edge Dictionary named \"animals\" and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Dictionary Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/edge-rate-limiter/EdgeRateLimiter/EdgeRateLimiter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `EdgeRateLimiter()`\n\nThe **`EdgeRateLimiter` constructor** lets you open an epen a [ERL](https://docs.fastly.com/products/edge-rate-limiting) with the given ratecounter and penaltybox.\n\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew EdgeRateLimiter(rateCounter, penaltyBox)\n```\n\n> **Note:** `EdgeRateLimiter()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `rateCounter` _: RateCounter_\n  - The RateCounter instance to associate with this EdgeRateLimiter instance\n- `penaltyBox` _: PenaltyBox_\n  - The PenaltyBox instance which should be associated with this EdgeRateLimiter instance\n\n### Return value\n\nA new `EdgeRateLimiter` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided rateCounter value is not an instance of RateCounter\n  - Thrown if the provided penaltyBox value is not an instance of PenaltyBox\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/edge-rate-limiter/EdgeRateLimiter/prototype/checkRate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# EdgeRateLimiter.prototype.checkRate\n\nIncrement an entry in the rate counter and check if the entry has exceeded some average number of requests per second (RPS) over the given window.\nIf the entry is over the RPS limit for the window, add to the penaltybox for the given `timeToLive`.\n\nValid `timeToLive` is 1 minute to 60 minutes and `timeToLive` value is truncated to the nearest minute.\n\n## Syntax\n```js\ncheckRate(entry, delta, window, limit, timeToLive)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to increment and check\n- `delta` _: number_\n  - The amount to increment the `entry` by\n- `window` _: number_\n  - The time period to check across, has to be either 1 second, 10 seconds, or 60 seconds\n- `limit` _: number_\n  - The requests-per-second limit\n- `timeToLive` _: number_\n  - In minutes, how long the entry should be added into the penalty-box\n  - Valid `timeToLive` is 1 minute to 60 minutes and `timeToLive` value is truncated to the nearest minute.\n\n\n### Return value\n\nReturns `true` if the entry has exceeded the average RPS for the window, otherwise returns `false`.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `name` value can not be coerced into a string\n  - Thrown if the provided `delta` value is not a positive finite number.\n  - Thrown if the provided `window` value is not either, 1, 10, or 60.\n  - Thrown if the provided `limit` value is not a positive finite number.\n  - Thrown if the provided `timeToLive` value is not either, a number between 1 and 60 inclusively.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/edge-rate-limiter/PenaltyBox/PenaltyBox.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `PenaltyBox()`\n\nThe **`PenaltyBox` constructor** can be used with a [Edge Rate Limiter](../EdgeRateLimiter/EdgeRateLimiter.mdx) or standalone for adding and checking if some entry is in the dataset.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew PenaltyBox(name)\n```\n\n> **Note:** `PenaltyBox()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Open a PenaltyBox with the given name\n\n\n### Return value\n\nA new `PenaltyBox` object instance.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `name` value can not be coerced into a string\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/edge-rate-limiter/PenaltyBox/prototype/add.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# PenaltyBox.prototype.add\n\nAdd an `entry` into the PenaltyBox for the duration of the given `timeToLive`.\n\n## Syntax\n```js\nadd(entry, timeToLive)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n- `timeToLive` _: number_\n  - In minutes, how long the entry should be added into the PenaltyBox\n  - Valid `timeToLive` is 1 minute to 60 minutes and `timeToLive` value is truncated to the nearest minute.\n\n\n### Return value\n\nReturns `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n  - Thrown if the provided `timeToLive` value is not either, a number between 1 and 60 inclusively.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/edge-rate-limiter/PenaltyBox/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# PenaltyBox.prototype.has\n\nCheck if the given entry is contained in in the PenaltyBox instance.\n\n## Syntax\n```js\nhas(entry)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n\n\n### Return value\n\nReturns `true` if the entry is contained in the PenaltyBox instance, otherwise returns `false`.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/edge-rate-limiter/RateCounter/RateCounter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `RateCounter()`\n\nThe **`RateCounter` constructor** can be used with a [Edge Rate Limiter](../EdgeRateLimiter/EdgeRateLimiter.mdx) or standalone for counting and rate calculations.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew RateCounter(name)\n```\n\n> **Note:** `RateCounter()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Open a RateCounter with the given name\n\n\n### Return value\n\nA new `RateCounter` object instance.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `name` value can not be coerced into a string\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/edge-rate-limiter/RateCounter/prototype/increment.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RateCounter.prototype.increment\n\nIncrement the given `entry` in the RateCounter instance with the given `delta` value.\n\n## Syntax\n```js\nincrement(entry, delta)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n- `delta` _: number_\n  - The amount to increment the entry by\n\n\n### Return value\n\nReturns `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n  - Thrown if the provided `delta` value is not a positive, finite number.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/edge-rate-limiter/RateCounter/prototype/lookupCount.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RateCounter.prototype.lookupCount\n\nLook up the current rate for the given `entry` and the given `duration`.\n\n## Syntax\n```js\nlookupCount(entry, duration)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n- `duration` _: number_\n  - The duration to lookup alongside the entry, has to be either, 10, 20, 30, 40, 50, or 60 seconds.\n\n\n### Return value\n\nReturns a number which is the count for the given `entry` and `duration` in this `RateCounter` instance.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n  - Thrown if the provided `duration` value is not either, 10, 20, 30, 40, 50 or 60.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/edge-rate-limiter/RateCounter/prototype/lookupRate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RateCounter.prototype.lookupRate\n\nLook up the current rate for the given `entry` and the given `window`.\n\n## Syntax\n```js\nlookupRate(entry, window)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n- `window` _: number_\n  - The window to look up alongside the entry, has to be either 1 second, 10 seconds, or 60 seconds\n\n\n### Return value\n\nReturns a number which is the rate for the given `entry` and `window` in this `RateCounter` instance.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n  - Thrown if the provided `window` value is not either, 1, 10, or 60.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/env/env.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# env\n\nThe **`env()`** function returns the value for the provided environment variable name.\n\nFor a list of available environment variables, see the [Fastly Developer Hub for Compute Environment Variables](https://developer.fastly.com/reference/compute/ecp-env/)\n\n>**Note**: The environment variables can only be retrieved when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nenv(name)\n```\n\n### Parameters\n\n- `name` _: string_\n  - The name of the environment variable to retrieve\n\n### Return value\n\nThe value for the requested environment variable, if no such environment variable exists then an empty string is returned.\n\n## Examples\n\nIn this example we log to stdout the environment variables [`FASTLY_HOSTNAME`](https://developer.fastly.com/reference/compute/ecp-env/fastly-hostname/) and [`FASTLY_TRACE_ID`](https://developer.fastly.com/reference/compute/ecp-env/fastly-trace-id/).\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"env Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { env } from \"fastly:env\";\nfunction app(event) {\n  console.log(\"FASTLY_HOSTNAME:\", env(\"FASTLY_HOSTNAME\"));\n  console.log(\"FASTLY_TRACE_ID:\", env(\"FASTLY_TRACE_ID\"));\n  return new Response(\"\", {\n    status: 200\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { env } from \"fastly:env\";\nfunction app(event) {\n  console.log(\"FASTLY_HOSTNAME:\", env(\"FASTLY_HOSTNAME\"));\n  console.log(\"FASTLY_TRACE_ID:\", env(\"FASTLY_TRACE_ID\"));\n  return new Response(\"\", {\n    status: 200\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/experimental/allowDynamicBackends.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# allowDynamicBackends\n\nThe **`allowDynamicBackends()`** function is used to control whether or not Dynamic Backends should be allowed within this Fastly Compute Service.\n\nBy default, Dynamic Backends are disabled within a JavaScript application as it can be a potential avenue for third-party JavaScript code to send requests, potentially including sensitive/secret data,  off to destinations that the JavaScript project was not intending, which could be a security issue.\n\n>**Note**: This feature is in disabled by default for Fastly Services. Please contact [Fastly Support](https://support.fastly.com/hc/requests/new?ticket_form_id=360000269711) to request the feature be enabled on the Fastly Services which require Dynamic Backends.\n\n## Syntax\n\n```js\nallowDynamicBackends(enabledOrConfig)\n```\n\n### Parameters\n\n- `enabledOrConfig` _: boolean_\n  - Whether or not to allow Dynamic Backends\n\nor\n\n- `enabledOrConfig` _: object_\n  - `connectTimeout` _: number_ _**optional**_\n    - Maximum duration in milliseconds to wait for a connection to this backend to be established.\n    - If exceeded, the connection is aborted and a 503 response will be presented instead.\n    - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n  - `firstByteTimeout` _: number_ _**optional**_\n    - Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent.\n    - If exceeded, the connection is aborted and a 503 response will be presented instead.\n    - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n  - `betweenBytesTimeout` _: number_ _**optional**_\n    - Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend.\n    - If exceeded, the response received so far will be considered complete and the fetch will end.\n    - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n\n### Return value\n\n`undefined`.\n\n## Examples\n\nIn this example an implicit Dynamic Backend is created when making the fetch request to https://www.fastly.com/ and the response is then returned to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Dynamic Backends Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nallowDynamicBackends(true);\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  return fetch('https://www.fastly.com/');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nallowDynamicBackends(true);\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  return fetch('https://www.fastly.com/');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/experimental/includeBytes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# includeBytes\n\nThe **`includeBytes()`** function is used embed a file as a Uint8Array.\n\n>**Note**: Can only be used during build-time initialization, not when processing requests.\n\n## Syntax\n\n```js\nincludeBytes(path)\n```\n\n### Parameters\n\n- `path` _: string_\n  - The path to include, relative to the Fastly Compute application's top-level directory during build-time initialization.\n\n### Return value\n\nReturns a `Uint8Array`\n\n## Examples\n\nIn this example we include the README.md file as a Uint8Array and use it for the body in the response we return to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { includeBytes } from \"fastly:experimental\";\nconst readme = includeBytes('README.md');\nasync function app() {\n    return new Response(readme);\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/experimental/mapAndLogError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# mapAndLogError\n\nThe **`mapAndLogError()`** function calls `mapError` on an `Error` object and sends the output to standard error. This includes the error name, message, and a call stack.\n\nIf `--enable-stack-traces` is specified during the build, the call stack will be mapped using source maps.\n\nIf `--enable-stack-traces` is specified and `--exclude-sources` is not specified during the build, then this will also include a code dump of neighboring lines of user code.\n\n## Syntax\n\n```js\nmapAndLogError(error)\n```\n\n### Parameters\n\n- `error` _: Error _ or _string_\n  - The error to retrieve information about. If a `string` is provided, then it is first converted to an `Error`.\n\n### Return value\n\n`undefined`.\n\n## Examples\n\nIn this example, build the application using the `--enable-stack-traces` flag.\n\n```js\naddEventListener('fetch', e => e.respondWith(handler(e)));\nasync function handler(event) {\n  try {\n    throw new TypeError('foo');\n  } catch (err) {\n    mapAndLogError(mapError(err));\n  }\n  return new Response('ok');\n}\n```\n\nThe following is output to the error log.\n\n```\nTypeError: foo\n  at handler (src/index.ts:4:11)\n      1 | addEventListener('fetch', e => e.respondWith(handler(e)));\n      2 | async function handler(event) {\n      3 |   try {\n>     4 |     throw new TypeError('foo');\n                    ^\n      5 |   } catch (err) {\n      6 |     mapAndLogError(mapError(err));\n      7 |   }\n  at src/index.ts:1:45\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/experimental/mapError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# mapError\n\nThe **`mapError()`** function extracts information from an `Error` object as a human-readable array of strings. This includes the error name, message, and a call stack.\n\nIf `--enable-stack-traces` is specified during the build, the call stack will be mapped using source maps.\n\nIf `--enable-stack-traces` is specified and `--exclude-sources` is not specified during the build, then this will also include a code dump of neighboring lines of user code.\n\n## Syntax\n\n```js\nmapError(error)\n```\n\n### Parameters\n\n- `error` _: Error _ or _string_\n  - The error to retrieve information about. If a `string` is provided, then it is first converted to an `Error`.\n\n### Return value\n\nReturns an array of `string`s.\n\n## Examples\n\nIn this example, build the application using the `--enable-stack-traces` flag.\n\n```js\naddEventListener('fetch', e => e.respondWith(handler(e)));\nasync function handler(event) {\n  try {\n    throw new TypeError('foo');\n  } catch (err) {\n    console.error(mapError(err));\n  }\n  return new Response('ok');\n}\n```\n\nThe following is output to the error log.\n\n```\nTypeError: foo\n  at handler (src/index.ts:4:11)\n      1 | addEventListener('fetch', e => e.respondWith(handler(e)));\n      2 | async function handler(event) {\n      3 |   try {\n>     4 |     throw new TypeError('foo');\n                    ^\n      5 |   } catch (err) {\n      6 |     console.error(mapError(err));\n      7 |   }\n  at src/index.ts:1:45\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/experimental/sdkVersion.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# sdkVersion\n\nThe read-only **`sdkVersion`** property is a string whose indicates what JavaScript SDK version is being used.\n\n## Value\n\nA string value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/fanout/createFanoutHandoff.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# createFanoutHandoff\n\nThe **`createFanoutHandoff()`** function creates a Response instance which informs Fastly to pass the original Request through Fanout, to the declared backend.\n\n## Syntax\n\n```js\ncreateFanoutHandoff(request, backend)\n```\n\n### Parameters\n\n- `request` _: Request_\n  - The request to pass through Fanout.\n- `backend` _: string_\n  - The name of the backend that Fanout should send the request to.\n  - The name has to be between 1 and 254 characters inclusive.\n  - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n\n### Return value\n\nA Response instance is returned, which can then be used via `event.respondWith`.\n\n## Examples\n\nIn this example application requests to the path `/stream` and sent handled via Fanout.\n\n```js\nimport { createFanoutHandoff } from \"fastly:fanout\";\n\nasync function handleRequest(event) {\n  try {\n    const url = new URL(event.request.url);\n    if (url.pathname === '/stream') {\n      return createFanoutHandoff(event.request, 'fanout');\n    } else {\n      return new Response('oopsie, make a request to /stream for some fanout goodies', { status: 404 });\n    }\n  } catch (error) {\n    console.error({error});\n    return new Response(error.message, {status:500})\n  }\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/geolocation/getGeolocationForIpAddress.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# getGeolocationForIpAddress\n\nThe **`getGeolocationForIpAddress()`** function is used to retrieve geolocation information about the given IP address.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\ngetGeolocationForIpAddress(address)\n```\n\n### Parameters\n\n- `address` _: string_\n  - The IPv4 or IPv6 address to query.\n\n### Return value\n\nReturns an `Object`, or `null` if no geolocation data was found.\n\nThe object contains information about the given IP address with the following properties:\n\n- `as_name`  _: string | null_\n  - The name of the organization associated with `as_number`.\n  - For example, fastly is the value given for IP addresses under AS-54113.\n\n- `as_number` _: number | null_\n  - [Autonomous system](https://en.wikipedia.org/wiki/Autonomous_system_(Internet)) (AS) number.\n\n- `area_code` _: number | null_\n  - The telephone area code associated with an IP address.\n  - These are only available for IP addresses in the United States, its territories, and Canada.\n\n- `city` _: string | null_\n  - City or town name.\n\n- `conn_speed` _: string | null_\n  - Connection speed.\n\n- `conn_type` _: string | null_\n  - Connection type.\n\n- `continent` _: string | null_\n  - Continent.\n\n- `country_code` _: string | null_\n  - A two-character [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) country code for the country associated with an IP address.\n  - The US country code is returned for IP addresses associated with overseas United States military bases.\n  - These values include subdivisions that are assigned their own country codes in ISO 3166-1. For example, subdivisions NO-21 and NO-22 are presented with the country code SJ for Svalbard and the Jan Mayen Islands.\n\n- `country_code3` _: string | null_\n  - A three-character [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) country code for the country associated with the IP address.\n  - The USA country code is returned for IP addresses associated with overseas United States military bases.\n\n- `country_name` _: string | null_\n  - Country name.\n  - This field is the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) English short name for a country.\n\n- `gmt_offset` _: string | null_\n  - Time zone offset from Greenwich Mean Time (GMT) for `city`.\n\n- `latitude` _: number | null_\n  - Latitude, in units of degrees from the equator.\n  - Values range from -90.0 to +90.0 inclusive, and are based on the [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System) coordinate reference system.\n\n- `longitude` _: number | null_\n  - Longitude, in units of degrees from the [IERS Reference Meridian](https://en.wikipedia.org/wiki/IERS_Reference_Meridian).\n  - Values range from -180.0 to +180.0 inclusive, and are based on the [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System) coordinate reference system.\n\n- `metro_code` _: number | null_\n  - Metro code, representing designated market areas (DMAs) in the United States.\n\n- `postal_code` _: string | null_\n  - The postal code associated with the IP address.\n  - These are available for some IP addresses in Australia, Canada, France, Germany, Italy, Spain, Switzerland, the United Kingdom, and the United States.\n  - For Canadian postal codes, this is the first 3 characters. For the United Kingdom, this is the first 2-4 characters (outward code). For countries with alphanumeric postal codes, this field is a lowercase transliteration.\n\n- `proxy_description` _: string | null_\n  - Client proxy description.\n\n- `proxy_type` _: string | null_\n  - Client proxy type.\n\n- `region` _: string | null_\n  - [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) country subdivision code.\n  - For countries with multiple levels of subdivision (for example, nations within the United Kingdom), this variable gives the more specific subdivision.\n  - This field can be None for countries that do not have ISO country subdivision codes. For example, None is given for IP addresses assigned to the Åland Islands (country code AX, illustrated below).\n\n- `utc_offset` _: number | null;_\n  - Time zone offset from coordinated universal time (UTC) for `city`.\n\n## Examples\n\nIn this example we return the geolocation details for the provided ip querystring parameter or for the incoming client request if the querystring parameter does not exist.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"getGeolocationForIpAddress Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { getGeolocationForIpAddress } from \"fastly:geolocation\"\nasync function app(event) {\n  try {\n    let ip = new URL(event.request.url).searchParams.get('ip') || event.client.address\n    let geo = getGeolocationForIpAddress(ip);\n    return new Response(JSON.stringify(geo), {\n      headers: {\n        \"Content-Type\": \"application/json\",\n      },\n    });\n  } catch (error) {\n    console.error(error);\n    return new Response(\"Internal Server Error\", {\n      status: 500\n    });\n  }\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { getGeolocationForIpAddress } from \"fastly:geolocation\"\nasync function app(event) {\n  try {\n    let ip = new URL(event.request.url).searchParams.get('ip') || event.client.address\n    let geo = getGeolocationForIpAddress(ip);\n    return new Response(JSON.stringify(geo), {\n      headers: {\n        \"Content-Type\": \"application/json\",\n      },\n    });\n  } catch (error) {\n    console.error(error);\n    return new Response(\"Internal Server Error\", {\n      status: 500\n    });\n  }\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/AggregrateError/AggregrateError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# AggregateError()\n\nThe **`AggregateError()`** constructor creates an error for several errors that need to be wrapped in a single error.\n\n## Syntax\n\n```js\nnew AggregateError(errors)\nnew AggregateError(errors, message)\nnew AggregateError(errors, message, options)\n\nAggregateError(errors)\nAggregateError(errors, message)\nAggregateError(errors, message, options)\n```\n\n> **Note:** `AggregateError()` can be called with or without `new`. Both create a new `AggregateError` instance.\n\n### Parameters\n\n- `errors`\n  - : An iterable of errors, may not actually be [`TypeError`](../Error/Error.mdx) instances.\n- `message` _**optional**_\n  - : An optional human-readable description of the aggregate error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Array/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array\\[Symbol.species]\n\nThe **`Array[Symbol.species]`** accessor property returns the constructor used to construct return values from array methods.\n\n> **Warning:** The existence of `[Symbol.species]` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Syntax\n\n```js\nArray[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get [Symbol.species]` was called. The return value is used to construct return values from array methods that create new arrays.\n\n## Description\n\nThe `[Symbol.species]` accessor property returns the default constructor for `Array` objects. Subclass constructors may override it to change the constructor assignment. The default implementation is basically:\n\n```js\n// Hypothetical underlying implementation for illustration\nclass Array {\n  static get [Symbol.species]() {\n    return this;\n  }\n}\n```\n\nBecause of this polymorphic implementation, `[Symbol.species]` of derived subclasses would also return the constructor itself by default.\n\n```js\nclass SubArray extends Array {}\nSubArray[Symbol.species] === SubArray; // true\n```\n\nWhen calling array methods that do not mutate the existing array but return a new array instance (for example, `filter()` and `map()`), the array's `constructor[Symbol.species]` will be accessed. The returned constructor will be used to construct the return value of the array method. This makes it technically possible to make array methods return objects unrelated to arrays.\n\n```js\nclass NotAnArray {\n  constructor(length) {\n    this.length = length;\n  }\n}\n\nconst arr = [0, 1, 2];\narr.constructor = { [Symbol.species]: NotAnArray };\narr.map((i) => i); // NotAnArray { '0': 0, '1': 1, '2': 2, length: 3 }\narr.filter((i) => i); // NotAnArray { '0': 1, '1': 2, length: 0 }\narr.concat([1, 2]); // NotAnArray { '0': 0, '1': 1, '2': 2, '3': 1, '4': 2, length: 5 }\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Array/Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array()\n\nThe **`Array()`** constructor is used to create `Array` objects.\n\n## Syntax\n\n```js\nnew Array(element0, element1, /* … ,*/ elementN)\nnew Array(arrayLength)\n\nArray(element0, element1, /* … ,*/ elementN)\nArray(arrayLength)\n```\n\n> **Note:** `Array()` can be called with or without `new`. Both create a new `Array` instance.\n\n### Parameters\n\n- `elementN`\n  - : A JavaScript array is initialized with the given elements, except in the case where\n    a single argument is passed to the `Array` constructor and that argument is\n    a number (see the `arrayLength` parameter below). Note that this special case only\n    applies to JavaScript arrays created with the `Array` constructor, not\n    array literals created with the bracket syntax.\n- `arrayLength`\n  - : If the only argument passed to the `Array` constructor is an integer\n    between 0 and 2<sup>32</sup> - 1 (inclusive), this returns a new JavaScript array with\n    its `length` property set to that number (**Note:** this\n    implies an array of `arrayLength` empty slots, not slots with actual\n    `undefined` values).\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if there's only one argument (`arrayLength`) and its value is not between 0 and 2<sup>32</sup> - 1 (inclusive).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Array/from.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.from\n\nThe **`Array.from()`** static method creates a new, shallow-copied `Array` instance from an iterable or array-like object.\n\n## Syntax\n\n```js\nArray.from(arrayLike)\n\n// Arrow function\nArray.from(arrayLike, (element) => { /* … */ })\nArray.from(arrayLike, (element, index) => { /* … */ })\n\n// Mapping function\nArray.from(arrayLike, mapFn)\nArray.from(arrayLike, mapFn, thisArg)\n\n// Inline mapping function\nArray.from(arrayLike, function (element) { /* … */ })\nArray.from(arrayLike, function (element, index) { /* … */ })\nArray.from(arrayLike, function (element) { /* … */ }, thisArg)\nArray.from(arrayLike, function (element, index) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `arrayLike`\n  - : An iterable or array-like object to convert to an array.\n- `mapFn` _**optional**_\n\n  - : Map function to call on every element of the array. If provided, every value to be added to the array is first passed through this function, and `mapFn`'s return value is added to the array instead.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `mapFn`.\n\n### Return value\n\nA new `Array` instance.\n\n## Description\n\n`Array.from()` lets you create `Array`s from:\n\n- [iterable objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) (objects such as [`Map`](../Map/Map.mdx) and [`Set`](../Set/Set.mdx); or, if the object is not iterable,\n- array-like objects (objects with a `length` property and indexed elements).\n\n`Array.from()` never creates a sparse array. If the `arrayLike` object is missing some index properties, they become `undefined` in the new array.\n\n`Array.from()` has an optional parameter `mapFn`, which allows you to execute a function on each element of the array being created, similar to [`Array.prototype.map()`](./prototype/map.mdx). More clearly, `Array.from(obj, mapFn, thisArg)` has the same result as `Array.from(obj).map(mapFn, thisArg)`, except that it does not create an intermediate array, and `mapFn` only receives two arguments (`element`, `index`) without the whole array, because the array is still under construction.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Array/isArray.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.isArray()\n\nThe **`Array.isArray()`** static method determines whether the passed value is an `Array`.\n\n## Syntax\n\n```js\nArray.isArray(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be checked.\n\n### Return value\n\n`true` if `value` is an `Array`; otherwise, `false`. `false` is always returned if `value` is a `TypedArray` instance.\n\n## Description\n\n`Array.isArray()` checks if the passed value is an `Array`. It does not check the value's prototype chain, nor does it rely on the `Array` constructor it is attached to. It returns `true` for any value that was created using the array literal syntax or the `Array` constructor. This makes it safe to use with cross-realm objects, where the identity of the `Array` constructor is different and would therefore cause `instanceof Array` to fail.\n\nSee the article [\"Determining with absolute accuracy whether or not a JavaScript object is an array\"](https://web.mit.edu/jwalden/www/isArray.html) for more details.\n\n`Array.isArray()` also rejects objects with `Array.prototype` in its prototype chain but aren't actual arrays, which `instanceof Array` would accept.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Array/of.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.of()\nThe **`Array.of()`** method creates a new `Array`\ninstance from a variable number of arguments, regardless of number or type of the\narguments.\n\n## Syntax\n\n```js\nArray.of(element0)\nArray.of(element0, element1)\nArray.of(element0, element1, /* … ,*/ elementN)\n```\n\n### Parameters\n\n- `elementN`\n  - : Elements used to create the array.\n\n### Return value\n\nA new `Array` instance.\n\n## Description\n\nThe difference between `Array.of()` and the [`Array()`](./Array.mdx) constructor is in the handling of single arguments: `Array.of(7)` creates an array with a single element, `7`, whereas `Array(7)` creates an empty array with a `length` property of `7`. (That implies an array of 7 empty slots, not slots with actual [`undefined`](../undefined.mdx) values.)\n\n```js\nArray.of(7); // [7]\nArray(7); // array of 7 empty slots\n\nArray.of(1, 2, 3); // [1, 2, 3]\nArray(1, 2, 3); // [1, 2, 3]\n```\n\nThe `Array.of()` method is a generic factory method. For example, if a subclass of `Array` inherits the `of()` method, the inherited `of()` method will return new instances of the subclass instead of `Array` instances. In fact, the `this` value can be any constructor function that accepts a single argument representing the length of the new array, and the constructor will be called with the number of arguments passed to `of()`. The final `length` will be set again when all elements are assigned. If the `this` value is not a constructor function, the plain `Array` constructor is used instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Array/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype\\[Symbol.iterator]()\n\nThe **`Symbol.iterator`** method of an `Array` object implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows arrays to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the value of each index in the array.\n\nThe initial value of this property is the same function object as the initial value of the [`Array.prototype.values`](./values.mdx) property.\n\n## Syntax\n\n```js\narray[Symbol.iterator]()\n```\n\n### Return value\n\nThe same return value as [`Array.prototype.values()`](./values.mdx): a new iterable iterator object that yields the value of each index in the array.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Array/prototype/@@unscopables.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype[Symbol.unscopables]\n\nThe **`@@unscopables`** data property of `Array.prototype` is shared by all `Array` instances. It contains property names that were not included in the ECMAScript standard prior to the ES2015 version and that are ignored for [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) statement-binding purposes.\n\n## Value\n\nA [`null`-prototype object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects) with property names given below and their values set to `true`.\n\n## Description\n\nThe default `Array` properties that are ignored for `with` statement-binding purposes are:\n\n- [`at()`](./at.mdx)\n- [`copyWithin()`](./copyWithin.mdx)\n- [`entries()`](./entries.mdx)\n- [`fill()`](./fill.mdx)\n- [`find()`](./find.mdx)\n- [`findIndex()`](./findIndex.mdx)\n- [`flat()`](./flat.mdx)\n- [`flatMap()`](./flatMap.mdx)\n- [`includes()`](./includes.mdx)\n- [`keys()`](./keys.mdx)\n- [`values()`](./values.mdx)\n\n`Array.prototype[@@unscopables]` is an empty object only containing all the above property names with the value `true`. Its [prototype is `null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects), so `Object.prototype` properties like [`toString`](../../Object/prototype/toString.mdx) won't accidentally be made unscopable, and a `toString()` within the `with` statement will continue to be called on the array.\n\nSee [`Symbol.unscopables`](../../Symbol/unscopables.mdx) for how to set unscopable properties for your own objects.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Array/prototype/at.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.at\n\nThe **`at()`** method takes an integer value and returns the item at that index, allowing for positive and negative integers. Negative integers count back from the last item in the array.\n\n## Syntax\n\n```js\nat(index)\n```\n\n### Parameters\n\n- `index`\n  - : Zero-based index of the array element to be returned, converted to an integer. Negative index counts back from the end of the array — if `index < 0`, `index + array.length` is accessed.\n\n### Return value\n\nThe element in the array matching the given index. Always returns [`undefined`](../../../globals/undefined.mdx) if `index < -array.length` or `index >= array.length` without attempting to access the corresponding property.\n\n## Description\n\nThe `at()` method is equivalent to the bracket notation when `index` is non-negative. For example, `array[0]` and `array.at(0)` both return the first item. However, when counting elements from the end of the array, you cannot use `array[-1]` like you may in Python or R, because all values inside the square brackets are treated literally as string properties, so you will end up reading `array[\"-1\"]`, which is just a normal string property instead of an array index.\n\nThe usual practice is to access [`Array.prototype.length`](./length.mdx) and calculate the index from that — for example, `array[array.length - 1]`. The `at()` method allows relative indexing, so this can be shortened to `array.at(-1)`.\n\nThe `at()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Array/prototype/concat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.concat\n\nThe **`concat()`** method is used to merge two or more arrays.\nThis method does not change the existing arrays, but instead returns a new array.\n\n## Syntax\n\n```js\nconcat()\nconcat(value0)\nconcat(value0, value1)\nconcat(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `valueN` _**optional**_\n  - : Arrays and/or values to concatenate into a new array. If all\n    `valueN` parameters are omitted, `concat` returns a\n    [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of the existing array on which it is called. See the description below\n    for more details.\n\n### Return value\n\nA new `Array` instance.\n\n## Description\n\nThe `concat` method creates a new array. The array will first be populated by the elements in the object on which it is called. Then, for each argument, its value will be concatenated into the array — for normal objects or primitives, the argument itself will become an element of the final array; for arrays or array-like objects with the property [`Symbol.isConcatSpreadable`](../../Symbol/isConcatSpreadable.mdx) set to a truthy value, each element of the argument will be independently added to the final array. The `concat` method does not recurse into nested array arguments.\n\nThe `concat()` method is a copying. It does not alter `this` or any of the arrays provided as arguments but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains the same elements as the ones from the original arrays.\n\nThe `concat()` method preserves empty slots if any of the source arrays is sparse.\n\nThe `concat()` method is generic. The `this` value is treated in the same way as the other arguments (except it will be converted to an object first), which means plain objects will be directly prepended to the resulting array, while array-like objects with truthy `Symbol.isConcatSpreadable` will be spread into the resulting array.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Array/prototype/copyWithin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.copyWithin\n\nThe **`copyWithin()`** method shallow copies part of an array\nto another location in the same array and returns it without modifying its length.\n\n\n\n## Syntax\n\n```js\ncopyWithin(target)\ncopyWithin(target, start)\ncopyWithin(target, start, end)\n```\n\n### Parameters\n\n- `target`\n  - : Zero-based index at which to copy the sequence to, converted to an integer.\n    - Negative index counts back from the end of the array — if `target < 0`, `target + array.length` is used.\n    - If `target < -array.length`, `0` is used.\n    - If `target >= array.length`, nothing is copied.\n    - If `target` is positioned after `start` after normalization, copying only happens until the end of `array.length` (in other words, `copyWithin()` never extends the array).\n- `start` _**optional**_\n  - : Zero-based index at which to start copying elements from, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, nothing is copied.\n- `end` _**optional**_\n  - : Zero-based index at which to end copying elements from, converted to an integer. `copyWithin()` copies up to but not including `end`.\n    - Negative index counts back from the end of the array — if `end < 0`, `end + array.length` is used.\n    - If `end < -array.length`, `0` is used.\n    - If `end >= array.length` or `end` is omitted, `array.length` is used, causing all elements until the end to be copied.\n    - If `end` is positioned before or at `start` after normalization, nothing is copied.\n\n### Return value\n\nThe modified array.\n\n## Description\n\nThe `copyWithin()` method works like C and C++'s `memmove`, and is a high-performance method to shift the data of an `Array`. The sequence is copied and pasted as one operation; the pasted sequence will have the copied values even when the copy and paste region overlap.\n\nThe `copyWithin()` method is a mutating method. It does not alter the length of `this`, but it will change the content of `this` and create new properties or delete existing properties, if necessary.\n\nThe `copyWithin()` method preserves empty slots. If the region to be copied from is sparse, the empty slots' corresponding new indices are [deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) and also become empty slots.\n\nThe `copyWithin()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Array/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.entries\n\nThe **`entries()`** method returns a new **Array\nIterator** object that contains the key/value pairs for each index in the\narray.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nA new `Array` iterator object.\n\n## Description\n\nWhen used on sparse arrays, the `entries()` method iterates empty slots as if they have the value `undefined`.\n\nThe `entries()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Array/prototype/every.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.every\n\nThe **`every()`** method tests whether\nall elements in the array pass the test implemented by the provided function. It\nreturns a Boolean value.\n\n## Syntax\n\n```js\n// Arrow function\nevery((element) => { /* … */ })\nevery((element, index) => { /* … */ })\nevery((element, index, array) => { /* … */ })\n\n// Callback function\nevery(callbackFn)\nevery(callbackFn, thisArg)\n\n// Inline callback function\nevery(function (element) { /* … */ })\nevery(function (element, index) { /* … */ })\nevery(function (element, index, array) { /* … */ })\nevery(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value to indicate the element passes the test, and a falsy value otherwise.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `every()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\n`true` if `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value for every array element. Otherwise, `false`.\n\n## Description\n\nThe `every()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array, until the `callbackFn` returns a [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value. If such an element is found, `every()` immediately returns `false` and stops iterating through the array. Otherwise, if `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value for all elements, `every()` returns `true`.\n\n`every` acts like the \"for all\" quantifier in mathematics. In particular, for an empty array, it returns `true`. (It is [vacuously true](https://en.wikipedia.org/wiki/Vacuous_truth) that all elements of the [empty set](https://en.wikipedia.org/wiki/Empty_set#Properties) satisfy any given condition.)\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\n`every()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `every()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `every()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Array/prototype/fill.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.fill\n\nThe **`fill()`** method changes all elements in an array to a static value, from a start index (default `0`) to an end index (default `array.length`).\nIt returns the modified array.\n\n## Syntax\n\n```js\nfill(value)\nfill(value, start)\nfill(value, start, end)\n```\n\n### Parameters\n\n- `value`\n  - : Value to fill the array with. Note all elements in the array will be this exact value: if `value` is an object, each slot in the array will reference that object.\n- `start` _**optional**_\n  - : Zero-based index at which to start filling, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, no index is filled.\n- `end` _**optional**_\n  - : Zero-based index at which to end filling, converted to an integer. `fill()` fills up to but not including `end`.\n    - Negative index counts back from the end of the array — if `end < 0`, `end + array.length` is used.\n    - If `end < -array.length`, `0` is used.\n    - If `end >= array.length` or `end` is omitted, `array.length` is used, causing all indices until the end to be filled.\n    - If `end` is positioned before or at `start` after normalization, no index is filled.\n\n### Return value\n\nThe modified array, filled with `value`.\n\n## Description\n\nThe `fill()` method is a mutating method. It does not alter the length of `this`, but it will change the content of `this`.\n\nThe `fill()` method fills empty slots in sparse arrays with `value` as well.\n\nThe `fill()` method is generic. It only expects the `this` value to have a `length` property. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Array/prototype/filter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.filter\n\nThe **`filter()`** method creates a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of a portion of a given array, filtered down to just the elements from the given array that pass the test implemented by the provided function.\n\n## Syntax\n\n```js\n// Arrow function\nfilter((element) => { /* … */ })\nfilter((element, index) => { /* … */ })\nfilter((element, index, array) => { /* … */ })\n\n// Callback function\nfilter(callbackFn)\nfilter(callbackFn, thisArg)\n\n// Inline callback function\nfilter(function (element) { /* … */ })\nfilter(function (element, index) { /* … */ })\nfilter(function (element, index, array) { /* … */ })\nfilter(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) to keep the element in the resulting array, and a falsy value otherwise.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `filter()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\nA [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of a portion of the given array, filtered down to just the elements from the given array that pass the test implemented by the provided function. If no elements pass the test, an empty array will be returned.\n\n## Description\n\nThe `filter()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array, and constructs a new array of all the values for which `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. Array elements which do not pass the `callbackFn` test are not included in the new array.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nThe `filter()` method is a copying method. It does not alter `this` but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains the same elements as the ones from the original array (with some filtered out). However, the function provided as `callbackFn` can mutate the array. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `filter()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\nThe `filter()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Array/prototype/find.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.find()\n\nThe `find()` method returns the first element in the provided array that satisfies the provided testing function.\nIf no values satisfy the testing function, [`undefined`](../../../globals/undefined.mdx) is returned.\n\n- If you need the **index** of the found element in the array, use [`findIndex()`](./findIndex.mdx).\n- If you need to find the **index of a value**, use [`indexOf()`](./indexOf.mdx).\n  (It's similar to [`findIndex()`](./findIndex.mdx), but checks each element for equality with the value instead of using a testing function.)\n- If you need to find if a value **exists** in an array, use [`includes()`](./includes.mdx).\n  Again, it checks each element for equality with the value instead of using a testing function.\n- If you need to find if any element satisfies the provided testing function, use [`some()`](./some.mdx).\n\n## Syntax\n\n```js\n// Arrow function\nfind((element) => { /* … */ })\nfind((element, index) => { /* … */ })\nfind((element, index, array) => { /* … */ })\n\n// Callback function\nfind(callbackFn)\nfind(callbackFn, thisArg)\n\n// Inline callback function\nfind(function (element) { /* … */ })\nfind(function (element, index) { /* … */ })\nfind(function (element, index, array) { /* … */ })\nfind(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value to indicate a matching element has been found.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `find()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\nThe first element in the array that satisfies the provided testing function.\nOtherwise, [`undefined`](../../../globals/undefined.mdx) is returned.\n\n## Description\n\nThe `find()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array in ascending-index order, until `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. `find()` then returns that element and stops iterating through the array. If `callbackFn` never returns a truthy value, `find()` returns [`undefined`](../../../globals/undefined.mdx).\n\n`callbackFn` is invoked for _every_ index of the array, not just those with assigned values. Empty slots in sparse arrays behave the same as `undefined`.\n\n`find()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `find()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are visited as if they were `undefined`.\n\nThe `find()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Array/prototype/findIndex.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.findIndex\n\nThe **`findIndex()`** method returns the index of the first element in an array that satisfies the provided testing function.\nIf no elements satisfy the testing function, -1 is returned.\n\nSee also the [`find()`](./find.mdx) method, which returns the first element that satisfies the testing function (rather than its index).\n\n## Syntax\n\n```js\n// Arrow function\nfindIndex((element) => { /* … */ })\nfindIndex((element, index) => { /* … */ })\nfindIndex((element, index, array) => { /* … */ })\n\n// Callback function\nfindIndex(callbackFn)\nfindIndex(callbackFn, thisArg)\n\n// Inline callback function\nfindIndex(function (element) { /* … */ })\nfindIndex(function (element, index) { /* … */ })\nfindIndex(function (element, index, array) { /* … */ })\nfindIndex(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value to indicate a matching element has been found.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `findIndex()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\nThe index of the first element in the array that passes the test. Otherwise, `-1`.\n\n## Description\n\nThe `findIndex()` is an iterative method. It calls a provided `callbackFn` function once for each element in an array in ascending-index order, until `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. `findIndex()` then returns the index of that element and stops iterating through the array. If `callbackFn` never returns a truthy value, `findIndex()` returns `-1`.\n\n`callbackFn` is invoked for _every_ index of the array, not just those with assigned values. Empty slots in sparse arrays behave the same as `undefined`.\n\n`findIndex()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `findIndex()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are visited as if they were `undefined`.\n\nThe `findIndex()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Array/prototype/flat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.flat\n\nThe **`flat()`** method creates a new array with all sub-array\nelements concatenated into it recursively up to the specified depth.\n\n## Syntax\n\n```js\nflat()\nflat(depth)\n```\n\n### Parameters\n\n- `depth` _**optional**_\n  - : The depth level specifying how deep a nested array structure should be flattened.\n    Defaults to 1.\n\n### Return value\n\nA new array with the sub-array elements concatenated into it.\n\n## Description\n\nThe `flat()` method is a copying method. It does not alter `this` but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains the same elements as the ones from the original array.\n\nThe `flat()` method ignores empty slots if the array being flattened is sparse. For example, if `depth` is 1, both empty slots in the root array and in the first level of nested arrays are ignored, but empty slots in further nested arrays are preserved with the arrays themselves.\n\nThe `flat()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. However, its elements must be arrays if they are to be flattened.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Array/prototype/flatMap.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.flatMap()\n\nThe **`flatMap()`** method returns a new array formed by applying a given callback function to each element of the array, and then flattening the result by one level. It is identical to a [`Array.prototype.map()`](./map.mdx) followed by a [`Array.prototype.flat()`](./flat.mdx) of depth 1 (`arr.map(...args).flat()`), but slightly more efficient than calling those two methods separately.\n\n## Syntax\n\n```js\n// Arrow function\nflatMap((element) => { /* … */ })\nflatMap((element, index) => { /* … */ })\nflatMap((element, index, array) => { /* … */ })\n\n// Callback function\nflatMap(callbackFn)\nflatMap(callbackFn, thisArg)\n\n// Inline callback function\nflatMap(function (element) { /* … */ })\nflatMap(function (element, index) { /* … */ })\nflatMap(function (element, index, array) { /* … */ })\nflatMap(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return an array containing new elements of the new array, or a single non-array value to be added to the new array.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `flatMap()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\nA new array with each element being the result of the callback function and flattened\nby a depth of 1.\n\n## Description\n\nThe `flatMap()` method is an iterative method. See [`Array.prototype.map()`](./map.mdx) for a detailed description of the callback function. The `flatMap()` method is identical to [`map(callbackFn, thisArg)`](./map.mdx) followed by [`flat(1)`](./flat.mdx) — for each element, it produces an array of new elements, and concatenates the resulting arrays together to form a new array.\n\nThe `flatMap()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. However, the value returned from `callbackFn` must be an array if it is to be flattened.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Array/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.forEach()\n\nThe **`forEach()`** method executes a provided function once\nfor each array element.\n\n## Syntax\n\n```js\n// Arrow function\nforEach((element) => { /* … */ })\nforEach((element, index) => { /* … */ })\nforEach((element, index, array) => { /* … */ })\n\n// Callback function\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n\n// Inline callback function\nforEach(function (element) { /* … */ })\nforEach(function (element, index) { /* … */ })\nforEach(function (element, index, array) { /* … */ })\nforEach(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value is discarded.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `forEach()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\n`undefined`.\n\n## Description\n\nThe `forEach()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array in ascending-index order. Unlike [`Array.prototype.map()`](./map.mdx), `forEach()` always returns [`undefined`](../../../globals/undefined.mdx) and is not chainable. The typical use case is to execute side effects at the end of a chain.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\n`forEach()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `forEach()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\nThe `forEach()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n\nThere is no way to stop or break a `forEach()` loop other than by throwing an exception. If you need such behavior, the `forEach()` method is the wrong tool.\n\nEarly termination may be accomplished with looping statements like [`for`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for), [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of), and [`for...in`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...in). Array methods like [`Array.prototype.some()`](./some.mdx), [`Array.prototype.some()`](./some.mdx), [`Array.prototype.find()`](./find.mdx), and [`Array.prototype.findIndex()`](./findIndex.mdx) also stops iteration immediately when further iteration is not necessary.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Array/prototype/includes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.includes()\n\nThe **`includes()`** method determines whether an array\nincludes a certain value among its entries, returning `true` or\n`false` as appropriate.\n\n## Syntax\n\n```js\nincludes(searchElement)\nincludes(searchElement, fromIndex)\n```\n\n### Parameters\n\n- `searchElement`\n  - : The value to search for.\n- `fromIndex` _**optional**_\n  - : Zero-based index at which to start searching, converted to an integer.\n    - Negative index counts back from the end of the array — if `fromIndex < 0`, `fromIndex + array.length` is used. However, the array is still searched from front to back in this case.\n    - If `fromIndex < -array.length` or `fromIndex` is omitted, `0` is used, causing the entire array to be searched.\n    - If `fromIndex >= array.length`, the array is not searched and `false` is returned.\n\n### Return value\n\nA boolean value which is `true` if the value `searchElement` is found within the array (or the part of the array indicated by the index `fromIndex`, if specified).\n\n## Description\n\nThe `includes()` method compares `searchElement` to elements of the array using the [SameValueZero](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) algorithm. Values of zero are all considered to be equal, regardless of sign. (That is, `-0` is equal to `0`), but `false` is _not_ considered to be the same as `0`. [`NaN`](../../NaN.mdx) can be correctly searched for.\n\nWhen used on sparse arrays, the `includes()` method iterates empty slots as if they have the value `undefined`.\n\nThe `includes()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Array/prototype/indexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.indexOf()\n\nThe **`indexOf()`** method returns the first index at which a\ngiven element can be found in the array, or -1 if it is not present.\n\n## Syntax\n\n```js\nindexOf(searchElement)\nindexOf(searchElement, fromIndex)\n```\n\n### Parameters\n\n- `searchElement`\n  - : Element to locate in the array.\n- `fromIndex` _**optional**_\n  - : Zero-based index at which to start searching, converted to an integer.\n    - Negative index counts back from the end of the array — if `fromIndex < 0`, `fromIndex + array.length` is used. Note, the array is still searched from front to back in this case.\n    - If `fromIndex < -array.length` or `fromIndex` is omitted, `0` is used, causing the entire array to be searched.\n    - If `fromIndex >= array.length`, the array is not searched and `-1` is returned.\n\n### Return value\n\nThe first index of the element in the array; **-1** if not found.\n\n## Description\n\nThe `indexOf()` method compares `searchElement` to elements of the array using [strict equality](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) (the same algorithm used by the `===` operator).\n\nThe `indexOf()` method skips empty slots in sparse arrays.\n\nThe `indexOf()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Array/prototype/join.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.join()\n\nThe **`join()`** method creates and\nreturns a new string by concatenating all of the elements in an array\n(or an [array-like object](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects)),\nseparated by commas or a specified separator string. If the array has\nonly one item, then that item will be returned without using the separator.\n\n## Syntax\n\n```js\njoin()\njoin(separator)\n```\n\n### Parameters\n\n- `separator` _**optional**_\n  - : Specifies a string to separate each pair of adjacent elements of the array. The\n    separator is converted to a string if necessary. If omitted, the array elements are\n    separated with a comma (\",\"). If `separator` is an empty string, all\n    elements are joined without any characters in between them.\n\n### Return value\n\nA string with all array elements joined. If `arr.length` is\n`0`, the empty string is returned.\n\n## Description\n\nThe string conversions of all array elements are joined into one string. If an element is `undefined`, `null`, it is converted to an empty string instead of the string `\"null\"` or `\"undefined\"`.\n\nThe `join` method is accessed internally by [`Array.prototype.toString()`](./toString.mdx) with no arguments. Overriding `join` of an array instance will override its `toString` behavior as well.\n\nWhen used on sparse arrays, the `join()` method iterates empty slots as if they have the value `undefined`.\n\nThe `join()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Array/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.keys()\n\nThe **`keys()`** method returns a new **Array\nIterator** object that contains the keys for each index in the array.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nA new `Array` iterator object.\n\n## Description\n\nWhen used on sparse arrays, the `keys()` method iterates empty slots as if they have the value `undefined`.\n\nThe `keys()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Array/prototype/lastIndexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.lastIndexOf()\n\nThe **`lastIndexOf()`** method returns the last index at which\na given element can be found in the array, or -1 if it is not present. The array is\nsearched backwards, starting at `fromIndex`.\n\n## Syntax\n\n```js\nlastIndexOf(searchElement)\nlastIndexOf(searchElement, fromIndex)\n```\n\n### Parameters\n\n- `searchElement`\n  - : Element to locate in the array.\n- `fromIndex` _**optional**_\n  - : Zero-based index at which to start searching backwards, converted to an integer.\n    - Negative index counts back from the end of the array — if `fromIndex < 0`, `fromIndex + array.length` is used.\n    - If `fromIndex < -array.length`, the array is not searched and `-1` is returned. You can think of it conceptually as starting at a nonexistent position before the beginning of the array and going backwards from there. There are no array elements on the way, so `searchElement` is never found.\n    - If `fromIndex >= array.length` or `fromIndex` is omitted, `array.length - 1` is used, causing the entire array to be searched. You can think of it conceptually as starting at a nonexistent position beyond the end of the array and going backwards from there. It eventually reaches the real end position of the array, at which point it starts searching backwards through the actual array elements.\n\n### Return value\n\nThe last index of the element in the array; **-1** if not found.\n\n## Description\n\nThe `lastIndexOf()` method compares `searchElement` to elements of the array using [strict equality](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) (the same algorithm used by the `===` operator).\n\nThe `lastIndexOf()` method skips empty slots in sparse arrays.\n\nThe `lastIndexOf()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Array/prototype/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.length\n\nThe **`length`** data property of an `Array` instance represents the number of elements in that array. The value is an unsigned, 32-bit integer that is always numerically greater than the highest index in the array.\n\n## Value\n\nA non-negative integer less than 2<sup>32</sup>.\n\n## Description\n\nThe value of the `length` property is a non-negative integer with a value less than 2<sup>32</sup>.\n\n```js\nconst listA = [1, 2, 3];\nconst listB = new Array(6);\n\nconsole.log(listA.length);\n// 3\n\nconsole.log(listB.length);\n// 6\n\nlistB.length = 2 ** 32; // 4294967296\n// RangeError: Invalid array length\n\nconst listC = new Array(-100); // Negative numbers are not allowed\n// RangeError: Invalid array length\n```\n\nThe array object observes the `length` property, and automatically syncs the `length` value with the array's content. This means:\n\n- Setting `length` to a value smaller than the current length truncates the array — elements beyond the new `length` are deleted.\n- Setting any array index (a non-negative integer smaller than 2<sup>32</sup>) beyond the current `length` extends the array — the `length` property is increased to reflect the new highest index.\n- Setting `length` to an invalid value (e.g. a negative number or a non-integer) throws a `RangeError` exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Array/prototype/map.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.map()\n\nThe **`map()`** method **creates\na new array** populated with the results of calling a provided function on\nevery element in the calling array.\n\n## Syntax\n\n```js\n// Arrow function\nmap((element) => { /* … */ })\nmap((element, index) => { /* … */ })\nmap((element, index, array) => { /* … */ })\n\n// Callback function\nmap(callbackFn)\nmap(callbackFn, thisArg)\n\n// Inline callback function\nmap(function (element) { /* … */ })\nmap(function (element, index) { /* … */ })\nmap(function (element, index, array) { /* … */ })\nmap(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value is added as a single element in the new array.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `map()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\nA new array with each element being the result of the callback function.\n\n## Description\n\nThe `map()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array and constructs a new array from the results.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nThe `map()` method is a copying method. It does not alter `this`. However, the function provided as `callbackFn` can mutate the array. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `map()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `map()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n\nSince `map` builds a new array, calling it without using the returned\narray is an anti-pattern; use [`Array.prototype.forEach()`](./forEach.mdx) or\n`for...of` instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Array/prototype/pop.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.pop()\n\nThe **`pop()`** method removes the **last**\nelement from an array and returns that element. This method changes the length of the\narray.\n\n## Syntax\n\n```js\npop()\n```\n\n### Return value\n\nThe removed element from the array; [`undefined`](../../../globals/undefined.mdx) if the array is empty.\n\n## Description\n\nThe `pop()` method removes the last element from an array and returns that value to the caller. If you call `pop()` on an empty array, it returns [`undefined`](../../../globals/undefined.mdx).\n\n[`Array.prototype.shift()`](./shift.mdx) has similar behavior to `pop()`, but applied to the first element in an array.\n\nThe `pop()` method is a mutating method. It changes the length and the content of `this`. In case you want the value of `this` to be the same, but return a new array with the last element removed, you can use [`arr.slice(0, -1)`](./slice.mdx) instead.\n\nThe `pop()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Array/prototype/push.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.push()\n\nThe **`push()`** method adds one or more elements to the end of\nan array and returns the new length of the array.\n\n## Syntax\n\n```js\npush(element0)\npush(element0, element1)\npush(element0, element1, /* … ,*/ elementN)\n```\n\n### Parameters\n\n- `elementN`\n  - : The element(s) to add to the end of the array.\n\n### Return value\n\nThe new [`Array.prototype.length`](./length.mdx) property of the object upon which the method was called.\n\n## Description\n\nThe `push()` method appends values to an array.\n\n[`Array.prototype.unshift()`](./unshift.mdx)has similar behavior to `push()`, but applied to the start of an array.\n\nThe `push()` method is a mutating method. It changes the length and the content of `this`. In case you want the value of `this` to be the same, but return a new array with elements appended to the end, you can use [`arr.concat([element0, element1, /* ... ,*/ elementN])`](./concat.mdx) instead. Notice that the elements are wrapped in an extra array — otherwise, if the element is an array itself, it would be spread instead of pushed as a single element due to the behavior of `concat()`.\n\nThe `push()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Array/prototype/reduce.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.reduce()\n\nThe **`reduce()`** method executes a user-supplied \"reducer\" callback function on each element of the array, in order, passing in the return value from the calculation on the preceding element.\nThe final result of running the reducer across all elements of the array is a single value.\n\nThe first time that the callback is run there is no \"return value of the previous calculation\".\nIf supplied, an initial value may be used in its place.\nOtherwise the array element at index 0 is used as the initial value and iteration starts from the next element (index 1 instead of index 0).\n\nPerhaps the easiest-to-understand case for `reduce()` is to return the sum of all the elements in an array:\n\nThe reducer walks through the array element-by-element, at each step adding the current array value to the result from the previous step (this result is the running sum of all the previous steps) — until there are no more elements to add.\n\n## Syntax\n\n```js\n// Arrow function\nreduce((accumulator, currentValue) => { /* … */ })\nreduce((accumulator, currentValue, currentIndex) => { /* … */ })\nreduce((accumulator, currentValue, currentIndex, array) => { /* … */ })\n\nreduce((accumulator, currentValue) => { /* … */ }, initialValue)\nreduce((accumulator, currentValue, currentIndex) => { /* … */ }, initialValue)\nreduce((accumulator, currentValue, currentIndex, array) => { /* … */ }, initialValue)\n\n// Callback function\nreduce(callbackFn)\nreduce(callbackFn, initialValue)\n\n// Inline callback function\nreduce(function (accumulator, currentValue) { /* … */ })\nreduce(function (accumulator, currentValue, currentIndex) { /* … */ })\nreduce(function (accumulator, currentValue, currentIndex, array) { /* … */ })\n\nreduce(function (accumulator, currentValue) { /* … */ }, initialValue)\nreduce(function (accumulator, currentValue, currentIndex) { /* … */ }, initialValue)\nreduce(function (accumulator, currentValue, currentIndex, array) { /* … */ }, initialValue)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value becomes the value of the `accumulator` parameter on the next invocation of `callbackFn`. For the last invocation, the return value becomes the return value of `reduce()`.\n\n    The function is called with the following arguments:\n\n    - `accumulator`\n      - : The value resulting from the previous call to `callbackFn`. On first call, `initialValue` if specified, otherwise the value of `array[0]`.\n    - `currentValue`\n      - : The value of the current element. On first call, the value of `array[0]` if an `initialValue` was specified, otherwise the value of `array[1]`.\n    - `currentIndex`\n      - : The index position of `currentValue` in the array. On first call, `0` if `initialValue` was specified, otherwise `1`.\n    - `array`\n      - : The array `reduce()` was called upon.\n\n- `initialValue` _**optional**_\n  - : A value to which `accumulator` is initialized the first time the callback is called.\n    If `initialValue` is specified, `callbackFn` starts executing with the first value in the array as `currentValue`.\n    If `initialValue` is _not_ specified, `accumulator` is initialized to the first value in the array, and `callbackFn` starts executing with the second value in the array as `currentValue`. In this case, if the array is empty (so that there's no first value to return as `accumulator`), an error is thrown.\n\n### Return value\n\nThe value that results from running the \"reducer\" callback function to completion over the entire array.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n\n  - : The array contains no elements and `initialValue` is not provided.\n\n## Description\n\nThe `reduce()` method is an iterative method. It runs a \"reducer\" callback function over all elements in the array, in ascending-index order, and accumulates them into a single value. Every time, the return value of `callbackFn` is passed into `callbackFn` again on next invocation as `accumulator`. The final value of `accumulator` (which is the value returned from `callbackFn` on the final iteration of the array) becomes the return value of `reduce()`.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nUnlike other [iterative methods](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array#iterative_methods), `reduce()` does not accept a `thisArg` argument. `callbackFn` is always called with `undefined` as `this`, which gets substituted with `globalThis` if `callbackFn` is non-strict.\n\n`reduce()` is a central concept in [functional programming](https://en.wikipedia.org/wiki/Functional_programming), where it's not possible to mutate any value, so in order to accumulate all values in an array, one must return a new accumulator value on every iteration. This convention propagates to JavaScript's `reduce()`: you should use [spreading](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) or other copying methods where possible to create new arrays and objects as the accumulator, rather than mutating the existing one. If you decided to mutate the accumulator instead of copying it, remember to still return the modified object in the callback, or the next iteration will receive undefined.\n\n`reduce()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `reduce()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `reduce()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n\n### When to not use reduce()\n\nRecursive functions like `reduce()` can be powerful but sometimes difficult to understand, especially for less-experienced JavaScript developers. If code becomes clearer when using other array methods, developers must weigh the readability tradeoff against the other benefits of using `reduce()`. In cases where `reduce()` is the best choice, documentation and semantic variable naming can help mitigate readability drawbacks.\n\n### Edge cases\n\nIf the array only has one element (regardless of position) and no `initialValue` is provided, or if `initialValue` is provided but the array is empty, the solo value will be returned _without_ calling `callbackFn`.\n\nIf `initialValue` is provided and the array is not empty, then the reduce method will always invoke the callback function starting at index 0.\n\nIf `initialValue` is not provided then the reduce method will act differently for arrays with length larger than 1, equal to 1 and 0, as shown in the following example:\n\n```js\nconst getMax = (a, b) => Math.max(a, b);\n\n// callback is invoked for each element in the array starting at index 0\n[1, 100].reduce(getMax, 50); // 100\n[50].reduce(getMax, 10); // 50\n\n// callback is invoked once for element at index 1\n[1, 100].reduce(getMax); // 100\n\n// callback is not invoked\n[50].reduce(getMax); // 50\n[].reduce(getMax, 1); // 1\n\n[].reduce(getMax); // TypeError\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Array/prototype/reduceRight.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.reduceRight()\n\nThe **`reduceRight()`** method applies a function against an\naccumulator and each value of the array (from right-to-left) to reduce it to a single\nvalue.\n\nSee also [`Array.prototype.reduce()`](./reduce.mdx) for left-to-right.\n\n## Syntax\n\n```js\n// Arrow function\nreduceRight((accumulator, currentValue) => { /* … */ })\nreduceRight((accumulator, currentValue, index) => { /* … */ })\nreduceRight((accumulator, currentValue, index, array) => { /* … */ })\nreduceRight((accumulator, currentValue, index, array) => { /* … */ }, initialValue)\n\n// Callback function\nreduceRight(callbackFn)\nreduceRight(callbackFn, initialValue)\n\n// Callback reducer function\nreduceRight(function (accumulator, currentValue) { /* … */ })\nreduceRight(function (accumulator, currentValue, index) { /* … */ })\nreduceRight(function (accumulator, currentValue, index, array) { /* … */ })\nreduceRight(function (accumulator, currentValue, index, array) { /* … */ }, initialValue)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value becomes the value of the `accumulator` parameter on the next invocation of `callbackFn`. For the last invocation, the return value becomes the return value of `reduce()`.\n\n    The function is called with the following arguments:\n\n    - `accumulator`\n      - : The value previously returned in the last invocation of the callback, or\n        `initialValue`, if supplied. (See below.)\n    - `currentValue`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `reduceRight()` was called upon.\n\n- `initialValue` _**optional**_\n  - : Value to use as accumulator to the first call of the\n    `callbackFn`. If no initial value is supplied, the last element in\n    the array will be used and skipped. Calling reduce or reduceRight on an empty array\n    without an initial value creates a `TypeError`.\n\n### Return value\n\nThe value that results from the reduction.\n\n## Description\n\nThe `reduceRight()` method is an iterative method. It runs a \"reducer\" callback function over all elements in the array, in descending-index order, and accumulates them into a single value.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nUnlike other [iterative methods](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array#iterative_methods), `reduce()` does not accept a `thisArg` argument. `callbackFn` is always called with `undefined` as `this`, which gets substituted with `globalThis` if `callbackFn` is non-strict.\n\n`reduceRight()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `reduceRight()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `reduceRight()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Array/prototype/reverse.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.reverse()\n\nThe **`reverse()`** method reverses an array _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_ and returns the reference to the same array, the first array element now becoming the last, and the last array element becoming the first. In other words, elements order in the array will be turned towards the direction opposite to that previously stated.\n\n## Syntax\n\n```js\nreverse()\n```\n\n### Return value\n\nThe reference to the original array, now reversed. Note that the array is reversed _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_, and no copy is made.\n\n## Description\n\nThe `reverse()` method transposes the elements of the calling array object in\nplace, mutating the array, and returning a reference to the array.\n\nThe `reverse()` method preserves empty slots. If the source array is sparse, the empty slots' corresponding new indices are [deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) and also become empty slots.\n\nThe `reverse()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Array/prototype/shift.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.shift()\n\nThe **`shift()`** method removes the **first**\nelement from an array and returns that removed element. This method changes the length\nof the array.\n\n## Syntax\n\n```js\nshift()\n```\n\n### Return value\n\nThe removed element from the array; [`undefined`](../../../globals/undefined.mdx) if the array is empty.\n\n## Description\n\nThe `shift()` method removes the element at the zeroth index and shifts the\nvalues at consecutive indexes down, then returns the removed value. If the\n[`Array.prototype.length`](./length.mdx) property is 0, [`undefined`](../../../globals/undefined.mdx) is returned.\n\nThe [`Array.prototype.pop()`](./pop.mdx) method has similar behavior to `shift()`, but applied to the last element in an array.\n\nThe `shift()` method is a mutating method. It changes the length and the content of `this`. In case you want the value of `this` to be the same, but return a new array with the first element removed, you can use [`arr.slice(1)`](./slice.mdx) instead.\n\nThe `shift()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Array/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.slice()\n\nThe **`slice()`** method returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of a portion of\nan array into a new array object selected from `start` to `end`\n(`end` not included) where `start` and `end` represent\nthe index of items in that array. The original array will not be modified.\n\n## Syntax\n\n```js\nslice()\nslice(start)\nslice(start, end)\n```\n\n### Parameters\n\n- `start` _**optional**_\n  - : Zero-based index at which to start extraction, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, nothing is extracted.\n- `end` _**optional**_\n  - : Zero-based index at which to end extraction, converted to an integer. `slice()` extracts up to but not including `end`.\n    - Negative index counts back from the end of the array — if `end < 0`, `end + array.length` is used.\n    - If `end < -array.length`, `0` is used.\n    - If `end >= array.length` or `end` is omitted, `array.length` is used, causing all elements until the end to be extracted.\n    - If `end` is positioned before or at `start` after normalization, nothing is extracted.\n\n### Return value\n\nA new array containing the extracted elements.\n\n## Description\n\nThe `slice()` method is a copying method. It does not alter `this` but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains some of the same elements as the ones from the original array.\n\nThe `slice()` method preserves empty slots. If the sliced portion is sparse, the returned array is sparse as well.\n\nThe `slice()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Array/prototype/some.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.some()\n\nThe **`some()`** method tests whether\nat least one element in the array passes the test implemented by the provided\nfunction. It returns true if, in the array, it finds an element for which the provided function returns true; otherwise it returns false. It doesn't modify the array.\n\n## Syntax\n\n```js\n// Arrow function\nsome((element) => { /* … */ })\nsome((element, index) => { /* … */ })\nsome((element, index, array) => { /* … */ })\n\n// Callback function\nsome(callbackFn)\nsome(callbackFn, thisArg)\n\n// Inline callback function\nsome(function (element) { /* … */ })\nsome(function (element, index) { /* … */ })\nsome(function (element, index, array) { /* … */ })\nsome(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) to indicate the element passes the test, and a falsy value otherwise.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `some()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\n`true` if the callback function returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value for at least one element in the array. Otherwise, `false`.\n\n## Description\n\nThe `some()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array, until the `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. If such an element is found, `some()` immediately returns `true` and stops iterating through the array. Otherwise, if `callbackFn` returns a [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value for all elements, `some()` returns `false`.\n\n`some()` acts like the \"there exists\" quantifier in mathematics. In particular, for an empty array, it returns `false` for any condition.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\n`some()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `some()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\nThe `some()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Array/prototype/sort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.sort()\n\nThe **`sort()`** method sorts the elements of an array _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_ and returns the reference to the same array, now sorted. The default sort order is ascending, built upon converting the elements into strings, then comparing their sequences of UTF-16 code units values.\n\nThe time and space complexity of the sort cannot be guaranteed as it depends on the\nimplementation.\n\n## Syntax\n\n```js\n// Functionless\nsort()\n\n// Arrow function\nsort((a, b) => { /* … */ } )\n\n// Compare function\nsort(compareFn)\n\n// Inline compare function\nsort(function compareFn(a, b) { /* … */ })\n```\n\n### Parameters\n\n- `compareFn` _**optional**_\n\n  - : Specifies a function that defines the sort order. If omitted, the array elements are converted to strings, then sorted according to each character's Unicode code point value.\n\n    - `a`\n      - : The first element for comparison.\n    - `b`\n      - : The second element for comparison.\n\n### Return value\n\nThe reference to the original array, now sorted. Note that the array is sorted _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_, and no copy is made.\n\n## Description\n\nIf `compareFn` is not supplied, all non-`undefined` array\nelements are sorted by converting them to strings and comparing strings in UTF-16 code\nunits order. For example, \"banana\" comes before \"cherry\". In a numeric sort, 9 comes\nbefore 80, but because numbers are converted to strings, \"80\" comes before \"9\" in the\nUnicode order. All `undefined` elements are sorted to the end of the array.\n\nThe `sort()` method preserves empty slots. If the source array is sparse, the empty slots are moved to the end of the array, and always come after all the `undefined`.\n\n> **Note:** In UTF-16, Unicode characters above `\\uFFFF` are\n> encoded as two surrogate code units, of the range\n> `\\uD800` - `\\uDFFF`. The value of each code unit is taken\n> separately into account for the comparison. Thus the character formed by the surrogate\n> pair `\\uD855\\uDE51` will be sorted before the character\n> `\\uFF3A`.\n\nIf `compareFn` is supplied, all non-`undefined` array\nelements are sorted according to the return value of the compare function (all\n`undefined` elements are sorted to the end of the array, with no call to\n`compareFn`).\n\n| `compareFn(a, b)` return value | sort order                         |\n| ------------------------------ | ---------------------------------- |\n| > 0                            | sort `a` after `b`                 |\n| < 0                            | sort `a` before `b`                |\n| === 0                          | keep original order of `a` and `b` |\n\nSo, the compare function has the following form:\n\n```js\nfunction compareFn(a, b) {\n  if (a is less than b by some ordering criterion) {\n    return -1;\n  }\n  if (a is greater than b by the ordering criterion) {\n    return 1;\n  }\n  // a must be equal to b\n  return 0;\n}\n```\n\nMore formally, the comparator is expected to have the following properties, in order to ensure proper sort behavior:\n\n- _Pure_: The comparator does not mutate the objects being compared or any external state. (This is important because there's no guarantee _when_ and _how_ the comparator will be called, so any particular call should not produce visible effects to the outside.)\n- _Stable_: The comparator returns the same result with the same pair of input.\n- _Reflexive_: `compareFn(a, a) === 0`.\n- _Anti-symmetric_: `compareFn(a, b)` and `compareFn(b, a)` must both be `0` or have opposite signs.\n- _Transitive_: If `compareFn(a, b)` and `compareFn(b, c)` are both positive, zero, or negative, then `compareFn(a, c)` has the same positivity as the previous two.\n\nA comparator conforming to the constraints above will always be able to return all of `1`, `0`, and `-1`, or consistently return `0`. For example, if a comparator only returns `1` and `0`, or only returns `0` and `-1`, it will not be able to sort reliably because _anti-symmetry_ is broken. A comparator that always returns `0` will cause the array to not be changed at all, but is reliable nonetheless.\n\nThe default lexicographic comparator satisfies all constraints above.\n\nTo compare numbers instead of strings, the compare function can subtract `b`\nfrom `a`. The following function will sort the array in ascending order (if\nit doesn't contain `Infinity` and `NaN`):\n\n```js\nfunction compareNumbers(a, b) {\n  return a - b;\n}\n```\n\nThe `sort()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Array/prototype/splice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.splice()\n\nThe **`splice()`** method changes the contents of an array by\nremoving or replacing existing elements and/or adding new elements [in place](https://en.wikipedia.org/wiki/In-place_algorithm). To access part of an array without modifying it, see [`Array.prototype.slice()`](./slice.mdx).\n\n## Syntax\n\n```js\nsplice(start)\nsplice(start, deleteCount)\nsplice(start, deleteCount, item1)\nsplice(start, deleteCount, item1, item2, itemN)\n```\n\n### Parameters\n\n- `start`\n\n  - : Zero-based index at which to start changing the array, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, no element will be deleted, but the method will behave as an adding function, adding as many elements as provided.\n\n- `deleteCount` _**optional**_\n\n  - : An integer indicating the number of elements in the array to remove from `start`.\n\n    If `deleteCount` is omitted, or if its value is greater than or equal to the number of elements after the position specified by `start`, then all the elements from `start` to the end of the array will be deleted. However, if you wish to pass any `itemN` parameter, you should pass `Infinity` as `deleteCount` to delete all elements after `start`, because an explicit `undefined` gets [converted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#integer_conversion) to `0`.\n\n    If `deleteCount` is `0` or negative, no elements are removed.\n    In this case, you should specify at least one new element (see below).\n\n- `item1`, …, `itemN` _**optional**_\n\n  - : The elements to add to the array, beginning from `start`.\n\n    If you do not specify any elements, `splice()` will only remove elements from the array.\n\n### Return value\n\nAn array containing the deleted elements.\n\nIf only one element is removed, an array of one element is returned.\n\nIf no elements are removed, an empty array is returned.\n\n## Description\n\nThe `splice()` method is a mutating method. It may change the content of `this`. If the specified number of elements to insert differs from the number of elements being removed, the array's `length` will be changed as well. At the same time, it uses [`@@species`](../@@species.mdx) to create a new array instance to be returned.\n\nIf the deleted portion is sparse, the array returned by `splice()` is sparse as well, with those corresponding indices being empty slots.\n\nThe `splice()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Array/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string representing\nthe elements of the array. The elements are converted to Strings using their\n`toLocaleString` methods and these Strings are separated by a locale-specific\nString (such as a comma \",\").\n\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\n- `locales` _**optional**_\n  - : A string with a BCP 47 language tag, or an array of such strings. For the general form and interpretation of the `locales` argument, see [Locale identification and negotiation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation).\n- `options` _**optional**_\n  - : An object with configuration properties. For numbers, see [`Number.prototype.toLocaleString()`](../../../globals/Number/prototype/toLocaleString.mdx); for dates, see [`Date.prototype.toLocaleString()`](../../../globals/Date/prototype/toLocaleString.mdx).\n\n### Return value\n\nA string representing the elements of the array.\n\n## Description\n\nThe `Array.prototype.toLocaleString` method traverses its content, calling the `toLocaleString` method of every element with the `locales` and `options` parameters provided, and concatenates them with an implementation-defined separator (such as a comma \",\"). Note that the method itself does not consume the two parameters — it only passes them to the `toLocaleString()` of each element. The choice of the separator string depends on the host's current locale, not the `locales` parameter.\n\nIf an element is `undefined`, `null`, it is converted to an empty string instead of the string `\"null\"` or `\"undefined\"`.\n\nWhen used on sparse arrays, the `toLocaleString()` method iterates empty slots as if they have the value `undefined`.\n\nThe `toLocaleString()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Array/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.toString()\n\nThe **`toString()`** method returns a string representing the\nspecified array and its elements.\n\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the elements of the array.\n\n## Description\n\nThe `Array` object overrides the `toString` method of `Object`. The `toString` method of arrays calls [`join()`](../../../globals/Array/prototype/join.mdx) internally, which joins the array and returns one string containing each array element separated by commas. If the `join` method is unavailable or is not a function, [`Object.prototype.toString`](../../../globals/Object/prototype/toString.mdx) is used instead, returning `[object Array]`.\n\n```js\nconst arr = [];\narr.join = 1; // re-assign `join` with a non-function\nconsole.log(arr.toString()); // [object Array]\n\nconsole.log(Array.prototype.toString.call({ join: () => 1 })); // 1\n```\n\nJavaScript calls the `toString` method automatically when an array is to be represented as a text value or when an array is referred to in a string concatenation.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Array/prototype/unshift.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.unshift()\n\nThe **`unshift()`** method adds one or more elements to the\nbeginning of an array and returns the new length of the array.\n\n## Syntax\n\n```js\nunshift(element0)\nunshift(element0, element1)\nunshift(element0, element1, /* … ,*/ elementN)\n```\n\n### Parameters\n\n- `elementN`\n  - : The elements to add to the front of the `arr`.\n\n### Return value\n\nThe new [`Array.prototype.length`](./length.mdx) property of the object upon which the\nmethod was called.\n\n## Description\n\nThe `unshift()` method inserts the given values to the beginning of an\narray-like object.\n\n[`Array.prototype.push()`](./push.mdx) has similar behavior to `unshift()`, but applied to the end of an array.\n\nPlease note that, if multiple elements are passed as parameters, they're inserted in\nchunk at the beginning of the object, in the exact same order they were passed as\nparameters. Hence, calling `unshift()` with `n`\narguments **once**, or calling it `n` times with\n**1** argument (with a loop, for example), don't yield the same results.\n\nSee example:\n\n```js\nlet arr = [4, 5, 6];\n\narr.unshift(1, 2, 3);\nconsole.log(arr);\n// [1, 2, 3, 4, 5, 6]\n\narr = [4, 5, 6]; // resetting the array\n\narr.unshift(1);\narr.unshift(2);\narr.unshift(3);\n\nconsole.log(arr);\n// [3, 2, 1, 4, 5, 6]\n```\n\nThe `unshift()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Array/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.values()\n\nThe **`values()`** method returns a new _array [iterator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterator_protocol)_ object that iterates the value of each index in the array.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nA new iterable iterator object.\n\n## Description\n\n`Array.prototype.values()` is the default implementation of [`Array.prototype[@@iterator]()`](./@@iterator.mdx).\n\n```js\nArray.prototype.values === Array.prototype[Symbol.iterator]; // true\n```\n\nWhen used on sparse arrays, the `values()` method iterates empty slots as if they have the value `undefined`.\n\nThe `values()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/ArrayBuffer/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get ArrayBuffer\\[Symbol.species]\n\nThe **`ArrayBuffer[Symbol.species]`** accessor property returns the constructor used to construct return values from array buffer methods.\n\n> **Warning:** The existence of `Symbol.species` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Syntax\n\n```js\nArrayBuffer[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct return values from array buffer methods that create new array buffers.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `ArrayBuffer` objects. Subclass constructors may override it to change the constructor assignment. The default implementation is basically:\n\n```js\n// Hypothetical underlying implementation for illustration\nclass ArrayBuffer {\n  static get [Symbol.species]() {\n    return this;\n  }\n}\n```\n\nBecause of this polymorphic implementation, `Symbol.species` of derived subclasses would also return the constructor itself by default.\n\n```js\nclass SubArrayBuffer extends ArrayBuffer {}\nSubArrayBuffer[Symbol.species] === SubArrayBuffer; // true\n```\n\nWhen calling array buffer methods that do not mutate the existing object but return a new array buffer instance (for example, [`slice()`](./prototype/slice.mdx)), the object's `constructor[Symbol.species]` will be accessed. The returned constructor will be used to construct the return value of the array buffer method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/ArrayBuffer/ArrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer()\n\nThe **`ArrayBuffer()`** constructor is used to create \"ArrayBuffer\" objects.\n\n## Syntax\n\n```js\nnew ArrayBuffer(length)\n```\n\n> **Note:** `ArrayBuffer()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `length`\n  - : The size, in bytes, of the array buffer to create.\n\n### Return value\n\nA new `ArrayBuffer` object of the specified size. Its contents are\ninitialized to 0.\n\n### Exceptions\n\n- [`RangeError`](../RangeError/RangeError.mdx)\n  - : Thrown if the `length` is larger than `Number_MAX_SAFE_INTEGER` (≥ 2<sup>53</sup>) or negative.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/ArrayBuffer/isView.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer.isView\n\nThe **`ArrayBuffer.isView()`** method determines whether the\npassed value is one of the `ArrayBuffer` views,\nsuch as [typed array objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray)\nor a [`DataView`](../DataView/DataView.mdx).\n\n## Syntax\n\n```js\nArrayBuffer.isView(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be checked.\n\n### Return value\n\n`true` if the given argument is one of the `ArrayBuffer` views;\notherwise, `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/ArrayBuffer/prototype/byteLength.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer.prototype.byteLength\n\nThe **`byteLength`** accessor property represents the length of an `ArrayBuffer` in bytes.\n\n## Description\n\nThe `byteLength` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when the array is constructed and cannot be changed. This property returns 0 if this `ArrayBuffer` has been detached.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/ArrayBuffer/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer.prototype.slice()\n\nThe **`slice()`** method returns a new `ArrayBuffer`\nwhose contents are a copy of this `ArrayBuffer`'s bytes from\n`begin`, inclusive, up to `end`, exclusive.\n\n## Syntax\n\n```js\nslice(begin)\nslice(begin, end)\n```\n\n### Parameters\n\n- `begin`\n  - : Zero-based byte index at which to begin slicing.\n- `end` _**optional**_\n  - : Byte index before which to end slicing. If end is unspecified, the new\n    `ArrayBuffer` contains all bytes from begin to the end of this\n    `ArrayBuffer`. If negative, it will make the Byte index begin from the last\n    Byte.\n\n### Return value\n\nA new `ArrayBuffer` object.\n\n## Description\n\nThe `slice()` method copies up to, but not including, the byte indicated by\nthe `end` parameter. If either `begin` or `end` is\nnegative, it refers to an index from the end of the array, as opposed to from the\nbeginning.\n\nThe range specified by the `begin` and `end` parameters is\nclamped to the valid index range for the current array. If the computed length of the\nnew `ArrayBuffer` would be negative, it is clamped to zero.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/BigInt/BigInt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt()\n\nThe **`BigInt()`** function returns a value of type **bigint**.\n\n## Syntax\n\n```js\nBigInt(value)\n```\n\n> **Note:** `BigInt()` can only be called without `new`. Attempting to construct it with `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `value`\n  - : The numeric value of the object being created. It may be a string, an integer, a boolean, or another `BigInt`.\n\n### Return value\n\nA `BigInt` value. Number values must be integers and are converted to BigInts. The boolean value `true` becomes `1n`, and `false` becomes `0n`. Strings are parsed as if they are source text for integer literals, which means they can have leading and trailing whitespaces and can be prefixed with `0b`, `0o`, or `0x`.\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if the parameter is a non-integral number.\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if at least one of these conditions is met:\n    - The parameter cannot be converted to a primitive.\n    - After conversion to a primitive, the result is [`undefined`](../undefined.mdx), `null`, `Symbol`.\n- [`SyntaxError`](../SyntaxError/SyntaxError.mdx)\n  - : Thrown if the parameter is a string that cannot be parsed as a `BigInt`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/BigInt/asIntN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.asIntN()\n\nThe **`BigInt.asIntN`** static method clamps a `BigInt` value to the given number of bits, and returns that value as a signed integer.\n\n## Syntax\n\n```js\nBigInt.asIntN(bits, bigint)\n```\n\n### Parameters\n\n- `bits`\n  - : The amount of bits available for the returned BigInt. Should be an integer between 0 and 2<sup>53</sup> - 1, inclusive.\n- `bigint`\n  - : The BigInt value to clamp to fit into the supplied bits.\n\n### Return value\n\nThe value of `bigint` modulo 2^`bits`, as a signed integer.\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `bits` is negative or greater than 2<sup>53</sup> - 1.\n\n## Description\n\nThe `BigInt.asIntN` method clamps a `BigInt` value to the given number of bits, and interprets the result as a signed integer. For example, for `BigInt.asIntN(3, 25n)`, the value `25n` is clamped to `1n`:\n\n```plain\n25n = 00011001 (base 2)\n          ^=== Clamp to three remaining bits\n===>       001 (base 2) = 1n\n```\n\nIf the leading bit of the remaining number is `1`, the result is negative. For example, `BigInt.asIntN(4, 25n)` yields `-7n`, because `1001` is the encoding of `-7` under two's complement:\n\n```plain\n25n = 00011001 (base 2)\n         ^==== Clamp to four remaining bits\n===>      1001 (base 2) = -7n\n```\n\n> **Note:** `BigInt` values are always encoded as two's complement in binary.\n\nUnlike similar language APIs such as [`Number.prototype.toExponential()`](../Number/prototype/toExponential.mdx), `asIntN` is a static property of `BigInt`, so you always use it as `BigInt.asIntN()`, rather than as a method of a BigInt value. Exposing `asIntN()` as a \"standard library function\" allows [interop with asm.js](https://github.com/tc39/proposal-bigint/blob/master/ADVANCED.md#dont-break-asmjs).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/BigInt/asUintN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.asUintN()\n\nThe **`BigInt.asUintN`** static method clamps a `BigInt` value to the given number of bits, and returns that value as an unsigned integer.\n\n## Syntax\n\n```js\nBigInt.asUintN(bits, bigint)\n```\n\n### Parameters\n\n- `bits`\n  - : The amount of bits available for the returned BigInt. Should be an integer between 0 and 2<sup>53</sup> - 1, inclusive.\n- `bigint`\n  - : The BigInt value to clamp to fit into the supplied bits.\n\n### Return value\n\nThe value of `bigint` modulo 2^`bits`, as an unsigned integer.\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `bits` is negative or greater than 2<sup>53</sup> - 1.\n\n## Description\n\nThe `BigInt.asUintN` method clamps a `BigInt` value to the given number of bits, and interprets the result as an unsigned integer. Unsigned integers have no sign bits and are always non-negative. For example, for `BigInt.asUintN(4, 25n)`, the value `25n` is clamped to `9n`:\n\n```plain\n25n = 00011001 (base 2)\n         ^==== Clamp to four remaining bits\n===>      1001 (base 2) = 9n\n```\n\n> **Note:** `BigInt` values are always encoded as two's complement in binary.\n\nUnlike similar language APIs such as [`Number.prototype.toExponential()`](../Number/prototype/toExponential.mdx), `asUintN` is a static property of `BigInt`, so you always use it as `BigInt.asUintN()`, rather than as a method of a BigInt value. Exposing `asUintN()` as a \"standard library function\" allows [interop with asm.js](https://github.com/tc39/proposal-bigint/blob/master/ADVANCED.md#dont-break-asmjs).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/BigInt/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string with a language-sensitive representation of this BigInt. In implementations with [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) support, this method simply calls `Intl.NumberFormat`.\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` parameters customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat), these parameters correspond exactly to the [`Intl.NumberFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) constructor's parameters. Implementations without `Intl.NumberFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#locales) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored.\n\nSee the [`Intl.NumberFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string with a language-sensitive representation of the given BigInt.\n\nIn implementations with `Intl.NumberFormat`, this is equivalent to `new Intl.NumberFormat(locales, options).format(number)`.\n\n## Performance\n\nWhen formatting large numbers of numbers, it is better to create a\n`Intl.NumberFormat` object and use the function provided by its\n`format()` method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/BigInt/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified `BigInt` value. The trailing \"n\" is not part of the string.\n\n## Syntax\n\n```js\ntoString()\ntoString(radix)\n```\n\n### Parameters\n\n- `radix` _**optional**_\n  - : An integer in the range 2 through 36 specifying the base to use for representing the BigInt value. Defaults to 10.\n\n### Return value\n\nA string representing the specified `BigInt` value.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `radix` is less than 2 or greater than 36.\n\n## Description\n\nThe `BigInt` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../Object/prototype/toString.mdx). For `BigInt` values, the `toString()` method returns a string representation of the value in the specified radix.\n\nFor radixes above 10, the letters of the alphabet indicate digits greater than 9. For example, for hexadecimal numbers (base 16) `a` through `f` are used.\n\nIf the specified BigInt value is negative, the sign is preserved. This is the case even if the radix is 2; the string returned is the positive binary representation of the BigInt value preceded by a `-` sign, **not** the two's complement of the BigInt value.\n\nThe `toString()` method requires its `this` value to be a `BigInt` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to BigInt values.\n\nBecause `BigInt` doesn't have a [`[Symbol.toPrimitive]()`](../../Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `BigInt` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, BigInt _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — rather, they are directly converted using the same algorithm as the initial `toString()` implementation.\n\n```js\nBigInt.prototype.toString = () => \"Overridden\";\nconsole.log(`${1n}`); // \"1\"\nconsole.log(`${Object(1n)}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/BigInt/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.prototype.valueOf()\n\nThe **`valueOf()`** method returns the wrapped primitive value\nof a `BigInt` object.\n\n## Syntax\n\n```js\nbigIntObj.valueOf()\n```\n\n### Return value\n\nA BigInt representing the primitive value of the specified `BigInt` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/BigInt64Array/BigInt64Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt64Array()\n\nThe **`BigInt64Array()`** typed array constructor creates a\nnew `BigInt64Array` object, which is, an array of 64-bit signed integers\nin the platform byte order. If control over byte order is needed, use\n[`DataView`](../DataView/DataView.mdx) instead. The contents are initialized to `0n`. Once\nestablished, you can reference elements in the array using the object's methods, or by\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew BigInt64Array()\nnew BigInt64Array(length)\nnew BigInt64Array(typedArray)\nnew BigInt64Array(object)\n\nnew BigInt64Array(buffer)\nnew BigInt64Array(buffer, byteOffset)\nnew BigInt64Array(buffer, byteOffset, length)\n```\n\n> **Note:** `BigInt64Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/BigUint64Array/BigUint64Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigUint64Array()\n\nThe **`BigUint64Array()`** typed array constructor creates a\nnew `BigUint64Array` object, which is, an array of 64-bit unsigned integers\nin the platform byte order. If control over byte order is needed, use\n[`DataView`](../DataView/DataView.mdx) instead. The contents are initialized to `0n`. Once\nestablished, you can reference elements in the array using the object's methods, or by\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew BigUint64Array()\nnew BigUint64Array(length)\nnew BigUint64Array(typedArray)\nnew BigUint64Array(object)\n\nnew BigUint64Array(buffer)\nnew BigUint64Array(buffer, byteOffset)\nnew BigUint64Array(buffer, byteOffset, length)\n```\n\n> **Note:** `BigUint64Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](..//TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Blob/Blob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob()\n\nThe **`Blob()`** constructor creates a `Blob` object, which represents a file-like object of immutable, raw data.\n\n## Syntax\n\n```js\nnew Blob()\nnew Blob(array)\nnew Blob(array, options)\n```\n\n> **Note:** `Blob()` can only be constructed with `new`. Attempting to call it without `new` throws a `TypeError`.\n\n### Parameters\n\n- `array` _**optional**_\n\n  - : An array of values to include in the `Blob`. These can be [`ArrayBuffer`](../../globals/ArrayBuffer/ArrayBuffer.mdx), [`Blob`](../../globals/Blob/Blob.mdx), or strings. If any of these elements is a [`Blob`](../../globals/Blob/Blob.mdx), its content (and not the object itself) is copied into the Blob being constructed.\n\n- `options` _**optional**_\n\n  - : An object containing optional attributes for the `Blob`.\n    - `type`\n      - : A string indicating the MIME type of the data. The default value is the empty string `\"\"`.\n    - `endings`\n      - : A string indicating how to handle line endings in the data. This can be either `\"transparent\"` (default) to keep line endings unchanged, or `\"native\"` to convert line endings to the platform's native line endings (e.g., `\\r\\n` on Windows).\n\n### Return value\n\nA new `Blob` object containing the specified data.\n\n## Description\n\n`Blob` objects represent data that isn't necessarily in a JavaScript-native format. The `File` interface is based on `Blob`, inheriting its functionality and expanding it to support files on the user's system.\n\nTo construct a `Blob` from other non-blob objects and data, use the `Blob()` constructor. To create a blob that contains a subset of another blob's data, use the [`slice()`](../../globals/Blob/prototype/slice.mdx) method.\n\nThe `type` property of a `Blob` object will match the MIME type specified in the constructor's `options` parameter, defaulting to an empty string if not specified.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Blob/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the `Blob` interface returns a `Promise` that resolves with an `ArrayBuffer` containing the entire contents of the `Blob` as binary data.\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with an `ArrayBuffer` containing the blob's data.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Blob/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.size\n\nThe **`size`** read-only property of the `Blob` interface returns the size of the `Blob` in bytes.\n\n## Value\n\nA number representing the size of the `Blob` in bytes.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Blob/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.slice()\n\nThe **`slice()`** method of the `Blob` interface creates and returns a new `Blob` object which contains data from a subset of the blob on which it's called.\n\n## Syntax\n\n```js\nslice()\nslice(start)\nslice(start, end)\nslice(start, end, contentType)\n```\n\n### Parameters\n\n- `start` _**optional**_\n  - : The 0-based index of the first byte to include in the new `Blob`. If negative, it refers to an index from the end of the `Blob`. The default value is 0.\n- `end` _**optional**_\n  - : The 0-based index of the first byte that will not be included in the new `Blob`. If negative, it refers to an index from the end of the `Blob`. The default value is `size`.\n- `contentType` _**optional**_\n  - : A string indicating the content type to assign to the new `Blob`. The default value is an empty string.\n\n### Return value\n\nA new `Blob` object containing the specified subset of data.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Blob/prototype/stream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.stream()\n\nThe **`stream()`** method of the `Blob` interface returns a `ReadableStream` that can be used to read the contents of the `Blob`.\n\n## Syntax\n\n```js\nstream()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `ReadableStream` that provides the data contained within the `Blob`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Blob/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.text()\n\nThe **`text()`** method of the `Blob` interface returns a `Promise` that resolves with a string containing the contents of the blob, interpreted as UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a string containing the blob's data as a text string. The data is always interpreted as UTF-8.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Blob/prototype/type.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.type\n\nThe **`type`** read-only property of the `Blob` interface returns the MIME type of the `Blob`.\n\n## Value\n\nA string indicating the MIME type of the `Blob`. If the type cannot be determined, this returns an empty string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Boolean/Boolean.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Boolean()\n\nThe **`Boolean()`** constructor can create `Boolean` objects or return primitive values of type boolean.\n\n## Syntax\n\n```js\nnew Boolean(value)\nBoolean(value)\n```\n\n> **Note:** `Boolean()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\n- `value`\n  - : The initial value of the `Boolean` object.\n\n### Return value\n\nWhen `Boolean()` is called as a constructor (with `new`), it creates a `Boolean` object, which is **not** a primitive.\n\nWhen `Boolean()` is called as a function (without `new`), it coerces the parameter to a boolean primitive.\n\n> **Warning:** You should rarely find yourself using `Boolean` as a constructor.\n\n## Description\n\nThe value passed as the first parameter is [converted to a boolean value](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean#boolean_coercion). If the value is omitted or is `0`, `-0`, `0n`, [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null), `false`, [`NaN`](../NaN.mdx), [`undefined`](../undefined.mdx), or the empty string (`\"\"`), then the object has an initial value of `false`. All other values, including any object, an empty array (`[]`), or the string `\"false\"`, create an object with an initial value of `true`.\n\n> **Note:** When the non-standard property [`document.all`](https://developer.mozilla.org/docs/Web/API/Document/all) is used as an argument for this constructor, the result is a `Boolean` object with the value `false`. This property is legacy and non-standard and should not be used.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Boolean/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Boolean.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified boolean value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified boolean value.\n\n## Description\n\nThe `Boolean` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../Object/prototype/toString.mdx). For `Boolean` values, the `toString` method returns a string representation of the boolean value, which is either `\"true\"` or `\"false\"`.\n\nThe `toString()` method requires its `this` value to be a `Boolean` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to boolean values.\n\nBecause `Boolean` doesn't have a [`[Symbol.toPrimitive]()`](../../Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `Boolean` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, boolean _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — rather, they are directly converted using the same algorithm as the initial `toString()` implementation.\n\n```js\nBoolean.prototype.toString = () => \"Overridden\";\nconsole.log(`${true}`); // \"true\"\nconsole.log(`${new Boolean(true)}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Boolean/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Boolean.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a\n`Boolean` object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nThe primitive value of the given `Boolean` object.\n\n## Description\n\nThe `valueOf()` method of `Boolean` returns the primitive value\nof a `Boolean` object or literal `Boolean` as a Boolean data type.\n\nThis method is usually called internally by JavaScript and not explicitly in code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/ByteLengthQueuingStrategy/ByteLengthQueuingStrategy.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ByteLengthQueuingStrategy()\n\nThe **`ByteLengthQueuingStrategy()`**\nconstructor creates and returns a `ByteLengthQueuingStrategy` object\ninstance.\n\n## Syntax\n\n```js\nnew ByteLengthQueuingStrategy(highWaterMark)\n```\n\n### Parameters\n\nAn object with the following property:\n\n- `highWaterMark`\n\n  - : The total number of bytes that can be contained in the internal queue before backpressure is applied.\n\n    Unlike `CountQueuingStrategy()` where the `highWaterMark` parameter specifies a simple count of the number of chunks, with `ByteLengthQueuingStrategy()`, the `highWaterMark` parameter specifies a number of _bytes_ — specifically, given a stream of chunks, how many bytes worth of those chunks (rather than a count of how many of those chunks) can be contained in the internal queue before backpressure is applied.\n\n### Return value\n\nAn instance of the `ByteLengthQueuingStrategy` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/ByteLengthQueuingStrategy/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ByteLengthQueuingStrategy.size()\n\nThe **`size()`** method of the\n`ByteLengthQueuingStrategy` interface returns the given chunk's\n`byteLength` property.\n\n## Syntax\n\n```js\nsize(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : A chunk of data being passed through the stream.\n\n### Return value\n\nAn integer representing the byte length of the given chunk.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/CompressionStream/CompressionStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CompressionStream()\n\nThe **`CompressionStream()`** constructor creates a new `CompressionStream` object which compresses a stream of data.\n\n## Syntax\n\n```js\nnew CompressionStream(format)\n```\n\n### Parameters\n\n- `format`\n\n  - : One of the following allowed compression formats:\n\n    - `\"gzip\"`\n    - `\"deflate\"`\n    - `\"deflate-raw\"`\n\n## Exceptions\n\n- `TypeError`\n  - : Thrown if the format passed to the constructor is not supported.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/CompressionStream/prototype/readable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CompressionStream.readable\n\nThe **`readable`** read-only property of the `CompressionStream` interface returns a `ReadableStream`.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/CompressionStream/prototype/writable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CompressionStream.writable\n\nThe **`writable`** read-only property of the `CompressionStream` interface returns a `WritableStream`.\n\n## Value\n\nA `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/CryptoKey/CryptoKey.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CryptoKey\n\nThe **`CryptoKey`** interface represents a cryptographic key obtained from one of the [`SubtleCrypto`](../SubtleCrypto/SubtleCrypto.mdx) method [`importKey()`](../SubtleCrypto/prototype/importKey.mdx).\n\n## Instance properties\n\n- [`type`](./prototype/type.mdx) _**readonly**_\n  - : The type of key the object represents. It may take one of the following values: `\"secret\"`, `\"private\"` or `\"public\"`.\n\n- [`extractable`](./prototype/extractable.mdx) _**readonly**_\n  - : A boolean value indicating whether or not the key may be extracted.\n\n- [`algorithm`](./prototype/algorithm.mdx) _**readonly**_\n  - : An object describing the algorithm for which this key can be used and any associated extra parameters.\n\n- [`usages`](./prototype/usages.mdx) _**readonly**_\n  - : An `Array` of strings, indicating what can be done with the key. Possible values for array elements are `\"encrypt\"`, `\"decrypt\"`, `\"sign\"`, `\"verify\"`, `\"deriveKey\"`, `\"deriveBits\"`, `\"wrapKey\"`, and `\"unwrapKey\"`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/CryptoKey/prototype/algorithm.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# algorithm\n\nThe read-only **`algorithm`** property of the [`CryptoKey`](../CryptoKey.mdx) interface returns an object describing the algorithm for which this key can be used, and any associated extra parameters.\n\nThe object returned depends of the algorithm used to generate the key.\n\n## Value\n\nAn object matching:\n\n- [`RsaHashedImportParams`](../../RsaHashedImportParams/RsaHashedImportParams.mdx) if the algorithm is any of the RSA variants.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/CryptoKey/prototype/extractable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# extractable\n\nThe read-only **`extractable`** property indicates whether or not the key may be extracted.\n\nIf the key cannot be exported, an exception will be thrown if an attempt to extract the key is made.\n\n## Value\n\nA boolean value that is `true` if the key can be exported and `false` if not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/CryptoKey/prototype/type.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# type\n\nThe read-only **`type`** property indicates which kind of key is represented by the object. It can have the following values:\n\n- `\"secret\"`: This key is a secret key for use with a symmetric algorithm.\n- `\"private\"`: This key is the private half of an asymmetric algorithm's key pair.\n- `\"public\"`: This key is the public half of an asymmetric algorithm's key pair.\n\n## Value\n\nOne of the following strings: `\"secret\"`, `\"private\"`, or `\"public\"`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/CryptoKey/prototype/usages.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# usages\n\nThe read-only **`usages`** property indicates what can be done with the key.\n\n## Value\n\nAn `Array` of strings from the following list:\n\n- `\"encrypt\"`: The key may be used to encrypt messages.\n- `\"decrypt\"`: The key may be used to decrypt messages.\n- `\"sign\"`: The key may be used to sign messages.\n- `\"verify\"`: The key may be used to verify signatures.\n- `\"deriveKey\"`: The key may be used in deriving a new key.\n- `\"deriveBits\"`: The key may be used in deriving bits.\n- `\"wrapKey\"`: The key may be used to wrap a key.\n- `\"unwrapKey\"`: The key may be used to unwrap a key.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/DOMException/DOMException.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException()\n\nThe **`DOMException()`** constructor returns a `DOMException` object with a specified message and name.\n\n## Syntax\n\n```js\nnew DOMException()\nnew DOMException(message)\nnew DOMException(message, name)\n```\n\n### Parameters\n\n- `message` _optional_\n  - : A description of the exception. If not present, the empty string `''` is\n    used.\n- `name` _optional_\n  - : A string. If the specified name is a [standard error name](#error-names), then getting the [`code`](./code.mdx) property of the `DOMException` object will return the code number corresponding to the specified name.\n\n### Return value\n\nA newly created `DOMException` object.\n\n## Error names\n\nCommon error names are listed here. Some APIs define their own sets of names, so this is not necessarily a complete list.\n\nNote that the following deprecated historical errors don't have an error name but instead have only a legacy constant code value and a legacy constant name:\n\n- Legacy code value: `2`, legacy constant name: `DOMSTRING_SIZE_ERR`\n- Legacy code value: `6`, legacy constant name: `NO_DATA_ALLOWED_ERR`\n- Legacy code value: `16`, legacy constant name: `VALIDATION_ERR`\n\n> **Note:** Because historically the errors were identified by a numeric value that corresponded with a named variable defined to have that value, some of the entries below indicate the legacy code value and constant name that were used in the past.\n\n- `IndexSizeError`\n  - : The index is not in the allowed range. (Legacy code value: `1` and legacy constant name: `INDEX_SIZE_ERR`)\n- `HierarchyRequestError`\n  - : The node tree hierarchy is not correct. (Legacy code value: `3` and legacy constant name: `HIERARCHY_REQUEST_ERR`)\n- `WrongDocumentError`\n  - : The object is in the wrong `Document`. (Legacy code value: `4` and legacy constant name: `WRONG_DOCUMENT_ERR`)\n- `InvalidCharacterError`\n  - : The string contains invalid characters. (Legacy code value: `5` and legacy constant name: `INVALID_CHARACTER_ERR`)\n- `NoModificationAllowedError`\n  - : The object cannot be modified. (Legacy code value: `7` and legacy constant name: `NO_MODIFICATION_ALLOWED_ERR`)\n- `NotFoundError`\n  - : The object cannot be found here. (Legacy code value: `8` and legacy constant name: `NOT_FOUND_ERR`)\n- `NotSupportedError`\n  - : The operation is not supported. (Legacy code value: `9` and legacy constant name: `NOT_SUPPORTED_ERR`)\n- `InvalidStateError`\n  - : The object is in an invalid state. (Legacy code value: `11` and legacy constant name: `INVALID_STATE_ERR`)\n- `InUseAttributeError`\n  - : The attribute is in use. (Legacy code value: `10` and legacy constant name: `INUSE_ATTRIBUTE_ERR`)\n- `SyntaxError`\n  - : The string did not match the expected pattern. (Legacy code value: `12` and legacy constant name: `SYNTAX_ERR`)\n- `InvalidModificationError`\n  - : The object cannot be modified in this way. (Legacy code value: `13` and legacy constant name: `INVALID_MODIFICATION_ERR`)\n- `NamespaceError`\n  - : The operation is not allowed by Namespaces in XML. (Legacy code value: `14` and legacy constant name: `NAMESPACE_ERR`)\n- `InvalidAccessError`\n  - : The object does not support the operation or argument. (Legacy code value: `15` and legacy constant name: `INVALID_ACCESS_ERR`)\n- `TypeMismatchError` *deprecated*\n  - : The type of the object does not match the expected type. (Legacy code value: `17` and legacy constant name: `TYPE_MISMATCH_ERR`) This value is deprecated; the JavaScript `TypeError` exception is now raised instead of a `DOMException` with this value.\n- `SecurityError`\n  - : The operation is insecure. (Legacy code value: `18` and legacy constant name: `SECURITY_ERR`)\n- `NetworkError`\n  - : A network error occurred. (Legacy code value: `19` and legacy constant name: `NETWORK_ERR`)\n- `AbortError`\n  - : The operation was aborted. (Legacy code value: `20` and legacy constant name: `ABORT_ERR`)\n- `URLMismatchError`\n  - : The given URL does not match another URL. (Legacy code value: `21` and legacy constant name: `URL_MISMATCH_ERR`)\n- `QuotaExceededError`\n  - : The quota has been exceeded. (Legacy code value: `22` and legacy constant name: `QUOTA_EXCEEDED_ERR`)\n- `TimeoutError`\n  - : The operation timed out. (Legacy code value: `23` and legacy constant name: `TIMEOUT_ERR`)\n- `InvalidNodeTypeError`\n  - : The node is incorrect or has an incorrect ancestor for this operation. (Legacy code value: `24` and legacy constant name: `INVALID_NODE_TYPE_ERR`)\n- `DataCloneError`\n  - : The object can not be cloned. (Legacy code value: `25` and legacy constant name: `DATA_CLONE_ERR`)\n- `EncodingError`\n  - : The encoding or decoding operation failed (No legacy code value and constant name).\n- `NotReadableError`\n  - : The input/output read operation failed (No legacy code value and constant name).\n- `UnknownError`\n  - : The operation failed for an unknown transient reason (e.g. out of memory) (No legacy code value and constant name).\n- `ConstraintError`\n  - : A mutation operation in a transaction failed because a constraint was not satisfied (No legacy code value and constant name).\n- `DataError`\n  - : Provided data is inadequate (No legacy code value and constant name).\n- `TransactionInactiveError`\n  - : A request was placed against a transaction that is currently not active or is finished (No legacy code value and constant name).\n- `ReadOnlyError`\n  - : The mutating operation was attempted in a \"readonly\" transaction (No legacy code value and constant name).\n- `VersionError`\n  - : An attempt was made to open a database using a lower version than the existing version (No legacy code value and constant name).\n- `OperationError`\n  - : The operation failed for an operation-specific reason (No legacy code value and constant name).\n- `NotAllowedError`\n  - : The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission (No legacy code value and constant name)."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/DOMException/code.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException.prototype.code\n\nThe **`code`** read-only property of the `DOMException` interface returns one of the legacy [error code constants](./DOMException.mdx#error-names), or `0` if none match.\n\nThis field is used for historical reasons. New DOM exceptions don't use this anymore: they put this info in the [`name`](./name.mdx) attribute.\n\n## Value\n\nOne of the [error code constants](./DOMException.mdx#error-names), or `0` if none match.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/DOMException/message.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException.prototype.message\n\nThe **`message`** read-only property of the `DOMException` interface returns a string representing a message or description associated with the given [error name](./DOMException.mdx#error-names).\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/DOMException/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException.prototype.name\n\nThe **`name`** read-only property of the `DOMException` interface returns a string that contains one of the strings associated with an [error name](./DOMException.mdx#error-names).\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/DataView/DataView.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView()\n\nThe **`DataView()`** constructor is used to create `DataView` objects.\n\n## Syntax\n\n```js\nnew DataView(buffer)\nnew DataView(buffer, byteOffset)\nnew DataView(buffer, byteOffset, byteLength)\n```\n\n> **Note:** `DataView()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `buffer`\n  - : An existing `ArrayBuffer` to use as\n    the storage backing the new `DataView` object.\n- `byteOffset` _**optional**_\n  - : The offset, in bytes, to the first byte in the above buffer for the new view to\n    reference. If unspecified, the buffer view starts with the first byte.\n- `byteLength` _**optional**_\n  - : The number of elements in the byte array. If unspecified, the view's length will\n    match the buffer's length.\n\n### Return value\n\nA new `DataView` object representing the specified data buffer.\n\n### Exceptions\n\n- [`RangeError`](../RangeError/RangeError.mdx)\n\n  - : Thrown if the `byteOffset` or `byteLength` parameter values\n    result in the view extending past the end of the buffer.\n\n    For example, if the buffer is 16 bytes long, the `byteOffset` is 8, and\n    the `byteLength` is 10, this error is thrown because the resulting view\n    tries to extend 2 bytes past the total length of the buffer.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/DataView/prototype/buffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.buffer\n\nThe **`buffer`** accessor property represents the `ArrayBuffer` referenced by the `DataView` at construction time.\n\n## Description\n\nThe `buffer` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when the `DataView` is constructed and cannot be changed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/DataView/prototype/byteLength.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.byteLength\n\nThe **`byteLength`** accessor property represents the length (in bytes) of the dataview.\n\n## Description\n\nThe `byteLength` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when an `DataView` is constructed and cannot be changed. If the `DataView` is not specifying an offset or a `byteLength`, the `byteLength` of the referenced `ArrayBuffer` or `SharedArrayBuffer` will be returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/DataView/prototype/byteOffset.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.byteOffset\n\nThe **`byteOffset`** accessor property represents the offset (in bytes) of this view from the start of its `ArrayBuffer`.\n\n## Description\n\nThe `byteOffset` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when an `DataView` is constructed and cannot be changed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/DataView/prototype/getBigInt64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getBigInt64()\n\nThe **`getBigInt64()`** method gets a signed 64-bit integer\n(long long) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetBigInt64(byteOffset)\ngetBigInt64(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to read the data from.\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is read.\n\n### Return value\n\nA `BigInt`.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would read beyond the end\n    of the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/DataView/prototype/getBigUint64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getBigUint64()\n\nThe **`getBigUint64()`** method gets an unsigned 64-bit integer\n(unsigned long long) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetBigUint64(byteOffset)\ngetBigUint64(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to read the data from.\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is read.\n\n### Return value\n\nA `BigInt`.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would read beyond the end\n    of the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/DataView/prototype/getFloat32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getFloat32()\n\nThe **`getFloat32()`** method gets a signed 32-bit float\n(float) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetFloat32(byteOffset)\ngetFloat32(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 32-bit float number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/DataView/prototype/getFloat64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getFloat64()\n\nThe **`getFloat64()`** method gets a signed 64-bit float\n(double) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetFloat64(byteOffset)\ngetFloat64(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 64-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 64-bit float number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/DataView/prototype/getInt16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getInt16()\n\nThe **`getInt16()`** method gets a signed 16-bit integer\n(short) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetInt16(byteOffset)\ngetInt16(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 16-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/DataView/prototype/getInt32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getInt32()\n\nThe **`getInt32()`** method gets a signed 32-bit integer (long)\nat the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetInt32(byteOffset)\ngetInt32(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in bytes, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 32-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/DataView/prototype/getInt8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getInt8()\n\nThe **`getInt8()`** method gets a signed 8-bit integer (byte)\nat the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetInt8(byteOffset)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n\n### Return value\n\nA signed 8-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/DataView/prototype/getUint16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getUint16()\n\nThe **`getUint16()`** method gets an unsigned 16-bit integer\n(unsigned short) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n\n\n## Syntax\n\n```js\ngetUint16(byteOffset)\ngetUint16(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nAn unsigned 16-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/DataView/prototype/getUint32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getUint32()\n\nThe **`getUint32()`** method gets an unsigned 32-bit integer\n(unsigned long) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n\n\n## Syntax\n\n```js\ngetUint32(byteOffset)\ngetUint32(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nAn unsigned 32-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/DataView/prototype/getUint8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getUint8()\n\nThe **`getUint8()`** method gets an unsigned 8-bit integer\n(unsigned byte) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetUint8(byteOffset)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n\n### Return value\n\nAn unsigned 8-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/DataView/prototype/setBigInt64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setBigInt64()\n\nThe **`setBigInt64()`** method stores a signed 64-bit integer\n(long long) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetBigInt64(byteOffset, value)\nsetBigInt64(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to store the data from.\n- value\n  - : The value to set as a `BigInt`. The highest possible value that fits in\n    a signed 64-bit integer is\n    `2n ** (64n -1n) - 1n` (`9223372036854775807n`). Upon\n    overflow, it will be negative (`-9223372036854775808n`).\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/DataView/prototype/setBigUint64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setBigUint64()\n\nThe **`setBigUint64()`** method stores an unsigned 64-bit\ninteger (unsigned long long) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetBigUint64(byteOffset, value)\nsetBigUint64(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to store the data from.\n- value\n  - : The value to set as a `BigInt`. The highest possible value that fits in\n    an unsigned 64-bit integer is\n    `2n ** 64n - 1n`\n    (`18446744073709551615n`). Upon overflow, it will be zero\n    (`0n`).\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/DataView/prototype/setFloat32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setFloat32()\n\nThe **`setFloat32()`** method stores a signed 32-bit float\n(float) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetFloat32(byteOffset, value)\nsetFloat32(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/DataView/prototype/setFloat64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setFloat64()\n\nThe **`setFloat64()`** method stores a signed 64-bit float\n(double) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetFloat64(byteOffset, value)\nsetFloat64(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 64-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/DataView/prototype/setInt16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setInt16()\n\nThe **`setInt16()`** method stores a signed 16-bit integer\n(short) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetInt16(byteOffset, value)\nsetInt16(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/DataView/prototype/setInt32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setInt32()\n\nThe **`setInt32()`** method stores a signed 32-bit integer\n(long) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetInt32(byteOffset, value)\nsetInt32(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/DataView/prototype/setInt8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setInt8()\n\nThe **`setInt8()`** method stores a signed 8-bit integer (byte)\nvalue at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetInt8(byteOffset, value)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/DataView/prototype/setUint16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setUint16()\n\nThe **`setUint16()`** method stores an unsigned 16-bit integer\n(unsigned short) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetUint16(byteOffset, value)\nsetUint16(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/DataView/prototype/setUint32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setUint32()\n\nThe **`setUint32()`** method stores an unsigned 32-bit integer\n(unsigned long) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetUint32(byteOffset, value)\nsetUint32(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/DataView/prototype/setUint8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setUint8()\n\nThe **`setUint8()`** method stores an unsigned 8-bit integer\n(byte) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetUint8(byteOffset, value)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/Date.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date()\n\nThe **`Date()`** constructor can create a `Date` instance or return a string representing the current time.\n\n## Syntax\n\n```js\nnew Date()\nnew Date(value)\nnew Date(dateString)\nnew Date(dateObject)\n\nnew Date(year, monthIndex)\nnew Date(year, monthIndex, day)\nnew Date(year, monthIndex, day, hours)\nnew Date(year, monthIndex, day, hours, minutes)\nnew Date(year, monthIndex, day, hours, minutes, seconds)\nnew Date(year, monthIndex, day, hours, minutes, seconds, milliseconds)\n\nDate()\n```\n\n> **Note:** `Date()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\nThere are five basic forms for the `Date()` constructor:\n\n#### No parameters\n\nWhen no parameters are provided, the newly-created `Date` object represents the current date and time as of the time of instantiation.\n\n#### Time value or timestamp number\n\n- `value`\n  - : An integer value representing the number of milliseconds since January 1, 1970, 00:00:00 UTC (the ECMAScript epoch, equivalent to the UNIX epoch), with leap seconds ignored. Keep in mind that most [UNIX Timestamp](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_16) functions are only accurate to the nearest second.\n\n#### Date string\n\n- `dateString`\n\n  - : A string value representing a date, in a format recognized by the [`Date.parse()`](./parse.mdx) method. (The ECMA262 spec specifies a [simplified version of ISO 8601](https://tc39.es/ecma262/#sec-date-time-string-format), but other formats can be implementation-defined, which commonly include [IETF-compliant RFC 2822 timestamps](https://datatracker.ietf.org/doc/html/rfc2822#page-14).)\n\n    > **Note:** When parsing date strings with the `Date` constructor (and `Date.parse`, they are equivalent), always make sure that the input conforms to the ISO 8601 format (`YYYY-MM-DDTHH:mm:ss.sssZ`) — the parsing behavior with other formats is implementation-defined and may not work across all browsers. Support for [RFC 2822](https://datatracker.ietf.org/doc/html/rfc2822) format strings is by convention only. A library can help if many different formats are to be accommodated.\n    >\n    > Date-only strings (e.g. `\"1970-01-01\"`) are treated as UTC, while date-time strings (e.g. `\"1970-01-01T12:00\"`) are treated as local. You are therefore also advised to make sure the input format is consistent between the two types.\n\n#### Date object\n\n- `dateObject`\n  - : An existing `Date` object. This effectively makes a copy of the existing `Date` object with the same date and time. This is equivalent to `new Date(dateObject.valueOf())`, except the `valueOf()` method is not called.\n\nWhen one parameter is passed to the `Date()` constructor, `Date` instances are specially treated. All other values are [converted to primitives](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion). If the result is a string, it will be parsed as a date string. Otherwise, the resulting primitive is further coerced to a number and treated as a timestamp.\n\n#### Individual date and time component values\n\nGiven at least a year and month, this form of `Date()` returns a `Date` object whose component values (year, month, day, hour, minute, second, and millisecond) all come from the following parameters. Any missing fields are given the lowest possible value (`1` for `day` and `0` for every other component). The parameter values are all evaluated against the local time zone, rather than UTC.\n\nIf any parameter overflows its defined bounds, it \"carries over\". For example, if a `monthIndex` greater than `11` is passed in, those months will cause the year to increment; if a `minutes` greater than `59` is passed in, `hours` will increment accordingly, etc. Therefore, `new Date(1990, 12, 1)` will return January 1st, 1991; `new Date(2020, 5, 19, 25, 65)` will return 2:05 A.M. June 20th, 2020.\n\nSimilarly, if any parameter underflows, it \"borrows\" from the higher positions. For example, `new Date(2020, 5, 0)` will return May 31st, 2020.\n\n- `year`\n  - : Integer value representing the year. Values from `0` to `99` map to the years `1900` to `1999`. All other values are the actual year. See the [example](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years).\n- `monthIndex`\n  - : Integer value representing the month, beginning with `0` for January to `11` for December.\n- `day` _**optional**_\n  - : Integer value representing the day of the month. The default is `1`.\n- `hours` _**optional**_\n  - : Integer value between `0` and `23` representing the hour of the day. Defaults to `0`.\n- `minutes` _**optional**_\n  - : Integer value representing the minute segment of a time. The default is `0` minutes past the hour.\n- `seconds` _**optional**_\n  - : Integer value representing the second segment of a time. The default is `0` seconds past the minute.\n- `milliseconds` _**optional**_\n  - : Integer value representing the millisecond segment of a time. The default is `0` milliseconds past the second.\n\n### Return value\n\nCalling `new Date()` (the `Date()` constructor) returns a [`Date`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date) object. If called with an invalid date string, or if the date to be constructed will have a UNIX timestamp less than `-8,640,000,000,000,000` or greater than `8,640,000,000,000,000` milliseconds, it returns a `Date` object whose [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toString) method returns the literal string `Invalid Date`.\n\nCalling the `Date()` function (without the `new` keyword) returns a string representation of the current date and time, exactly as `new Date().toString()` does. Any arguments given in a `Date()` function call (without the `new` keyword) are ignored; regardless of whether it's called with an invalid date string — or even called with any arbitrary object or other primitive as an argument — it always returns a string representation of the current date and time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/UTC.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.UTC()\n\nThe **`Date.UTC()`** method accepts parameters similar to the\n`Date` constructor, but treats them as UTC. It returns the number of\nmilliseconds since January 1, 1970, 00:00:00 UTC.\n\n\n\n## Syntax\n\n```js\nDate.UTC(year)\nDate.UTC(year, monthIndex)\nDate.UTC(year, monthIndex, day)\nDate.UTC(year, monthIndex, day, hour)\nDate.UTC(year, monthIndex, day, hour, minute)\nDate.UTC(year, monthIndex, day, hour, minute, second)\nDate.UTC(year, monthIndex, day, hour, minute, second, millisecond)\n```\n\n- `year`\n\n  - : Integer value representing the year.\n\n    Values from `0` to `99` map to the years\n    `1900` to `1999`. All other values are the actual year.\n    See the [example](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years).\n\n- `monthIndex` _**optional**_\n  - : An integer between `0` (January) and `11` (December)\n    representing the month. Since ECMAScript 2017 it defaults to `0` if\n    omitted. _(Up until ECMAScript 2016, `monthIndex` was a required\n    parameter. As of ES2017, it no longer is.)_\n- `day` _**optional**_\n  - : An integer between `1` and `31` representing the day of the\n    month. If omitted, defaults to `1`.\n- `hour` _**optional**_\n  - : An integer between `0` and `23` representing the hours. If\n    omitted, defaults to `0`.\n- `minute` _**optional**_\n  - : An integer between `0` and `59` representing the minutes. If\n    omitted, defaults to `0`.\n- `second` _**optional**_\n  - : An integer between `0` and `59` representing the seconds. If\n    omitted, defaults to `0`.\n- `millisecond` _**optional**_\n  - : An integer between `0` and `999` representing the\n    milliseconds. If omitted, defaults to `0`.\n\n### Return value\n\nA number representing the number of milliseconds for the given date since January 1,\n1970, 00:00:00, UTC.\n\n## Description\n\n`UTC()` takes comma-delimited date and time parameters and returns the\nnumber of milliseconds between January 1, 1970, 00:00:00, universal time and the\nspecified date and time.\n\nYears between `0` and `99` are converted to a year in the\n20th century `(1900 + year)`. For example, `95` is\nconverted to the year `1995`.\n\nThe `UTC()` method differs from the `Date` constructor in two\nways:\n\n1. `Date.UTC()` uses universal time instead of the local time.\n2. `Date.UTC()` returns a time value as a number instead of creating a\n   `Date` object.\n\nIf a parameter is outside of the expected range, the `UTC()` method updates\nthe other parameters to accommodate the value. For example, if `15` is used\nfor `monthIndex`, the year will be incremented by 1\n`(year + 1)` and `3` will be used for the month.\n\n`UTC()` is a static method of `Date`, so it's called as\n`Date.UTC()` rather than as a method of a `Date` instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/now.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.now()\n\nThe static **`Date.now()`** method returns the number of milliseconds elapsed since the [epoch](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps), which is defined as the midnight at the beginning of January 1, 1970, UTC.\n\n## Syntax\n\n```js\nDate.now()\n```\n\n### Return value\n\nA number representing the number of milliseconds elapsed since the [epoch](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps), which is defined as the midnight at the beginning of January 1, 1970, UTC.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/parse.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.parse()\n\nThe **`Date.parse()`** method parses a string representation of\na date, and returns the number of milliseconds since January 1, 1970, 00:00:00 UTC or\n`NaN` if the string is unrecognized or, in some cases, contains illegal date\nvalues (e.g. 2015-02-31).\n\nOnly the [ISO 8601 format](https://tc39.es/ecma262/#sec-date-time-string-format) (`YYYY-MM-DDTHH:mm:ss.sssZ`) is explicitly specified to be supported. Other formats are implementation-defined and may not work across all browsers. A library can help if many different formats are to be accommodated.\n\n## Syntax\n\n```js\nDate.parse(dateString)\n```\n\n### Parameters\n\n- `dateString`\n  - : A string representing [a simplification of the ISO 8601 calendar date extended format](#date-time-string-format).\n    (Other formats may be used, but results are implementation-dependent.)\n\n### Return value\n\nA number representing the milliseconds elapsed since January 1, 1970, 00:00:00 UTC and\nthe date obtained by parsing the given string representation of a date. If the argument\ndoesn't represent a valid date, [`NaN`](../NaN.mdx) is returned.\n\n## Description\n\nThe `parse()` method takes a date string (such as\n`\"2011-10-10T14:48:00\"`) and returns the number of milliseconds since January\n1, 1970, 00:00:00 UTC.\n\nThis function is useful for setting date values based on string values, for example in\nconjunction with the [`setTime()`](./prototype/setTime.mdx) method and the\n`Date` object.\n\n### Date Time String Format\n\nThe standard string representation of a date time string is a simplification of the ISO\n8601 calendar date extended format.\n(See the section [Date Time String Format](https://tc39.es/ecma262/#sec-date-time-string-format)\nin the ECMAScript specification for more details.)\n\nFor example, `\"2011-10-10\"` (_date-only_ form),\n`\"2011-10-10T14:48:00\"` (_date-time_ form), or\n`\"2011-10-10T14:48:00.000+09:00\"` (_date-time_ form with milliseconds\nand time zone) can be passed and will be parsed. When the time zone offset is absent,\ndate-only forms are interpreted as a UTC time and date-time forms are interpreted as\nlocal time.\n\nWhile time zone specifiers are used during date string parsing to interpret the\nargument, the value returned is always the number of milliseconds between January 1,\n1970 00:00:00 UTC and the point in time represented by the argument or `NaN`.\n\nBecause `parse()` is a static method of `Date`, it is called as\n`Date.parse()` rather than as a method of a `Date` instance.\n\n### Fall-back to implementation-specific date formats\n\n> **Note:** This section contains implementation-specific behavior that can be inconsistent\n> across implementations.\n\nThe ECMAScript specification states: If the String does not conform to the standard\nformat the function may fall back to any implementation–specific heuristics or\nimplementation–specific parsing algorithm. Unrecognizable strings or dates containing\nillegal element values in ISO formatted strings shall cause `Date.parse()` to\nreturn [`NaN`](../NaN.mdx).\n\nHowever, invalid values in date strings not recognized as simplified ISO format as\ndefined by ECMA-262 may or may not result in [`NaN`](../NaN.mdx), depending on the browser\nand values provided, e.g.:\n\n```js\n// Non-ISO string with invalid date values\nnew Date(\"23/25/2014\");\n```\n\nwill be treated as a local date of 25 November, 2015 in Firefox 30 and an invalid date\nin Safari 7.\n\nHowever, if the string is recognized as an ISO format string and it contains invalid\nvalues, it will return [`NaN`](../NaN.mdx):\n\n```js\n// ISO string with invalid values\nnew Date(\"2014-25-23\").toISOString();\n// throws \"RangeError: invalid date\"\n```\n\nSpiderMonkey's implementation-specific heuristic can be found in [`jsdate.cpp`](https://searchfox.org/mozilla-central/source/js/src/jsdate.cpp?rev=64553c483cd1#889).\nThe string `\"10 06 2014\"` is an example of a non-conforming ISO format and\nthus falls back to a custom routine. See also this [rough outline](https://bugzilla.mozilla.org/show_bug.cgi?id=1023155#c6) on\nhow the parsing works.\n\n```js\nnew Date(\"10 06 2014\");\n```\n\nwill be treated as a local date of 6 October, 2014, and not 10 June, 2014.\n\nOther examples:\n\n```js\nnew Date(\"foo-bar 2014\").toString();\n// returns: \"Invalid Date\"\n\nDate.parse(\"foo-bar 2014\");\n// returns: NaN\n```\n\n### Differences in assumed time zone\n\n> **Note:** This section contains implementation-specific behavior that can be inconsistent\n> across implementations.\n\nGiven a non-standard date string of `\"March 7, 2014\"`, `parse()` assumes a local time zone, but given a simplification of the ISO 8601 calendar date extended format such as `\"2014-03-07\"`, it will assume a time zone of UTC. Therefore `Date` objects produced using those strings may represent different moments in time depending on the version of ECMAScript supported unless the system is set with a local time zone of UTC. This means that two date strings that appear equivalent may result in two different values depending on the format of the string that is being converted.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/@@toPrimitive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype\\[Symbol.toPrimitive]\n\nThe **`[Symbol.toPrimitive]()`** method converts a `Date`\nobject to a primitive value.\n\n## Syntax\n\n```js\nDate()[Symbol.toPrimitive](hint)\n```\n\n### Return value\n\nThe primitive value of the given `Date` object. Depending on the argument,\nthe method can return either a string or a number.\n\n## Description\n\nThe `[Symbol.toPrimitive]()` method of the `Date` object returns a\nprimitive value, that is either of type number or of type string.\n\nIf `hint` is `string` or `default`,\n`[Symbol.toPrimitive]()` tries to call the [`toString`](../../Object/prototype/toString.mdx) method. If the `toString` property does not exist, it tries to\ncall the [`valueOf`](../../Object/prototype/valueOf.mdx) method and if the\n`valueOf` does not exist either, `[Symbol.toPrimitive]()` throws a\n[`TypeError`](../../../globals/TypeError/TypeError.mdx).\n\nIf `hint` is `number`, `[Symbol.toPrimitive]()` first tries\nto call `valueOf`, and if that fails, it calls `toString`.\n\nJavaScript calls the `[Symbol.toPrimitive]()` method to convert an object to a\nprimitive value. You rarely need to invoke the `[Symbol.toPrimitive]()` method\nyourself; JavaScript automatically invokes it when encountering an object where a\nprimitive value is expected.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/getDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getDate()\n\nThe **`getDate()`** method returns the day of the month for the\nspecified date according to local time.\n\n## Syntax\n\n```js\ngetDate()\n```\n\n### Return value\n\nAn integer number, between 1 and 31, representing the day of the month for the given\ndate according to local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/getDay.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getDay()\n\nThe **`getDay()`** method returns the\nday of the week for the specified date according to local time, where 0 represents\nSunday. For the day of the month, see [`Date.prototype.getDate()`](./getDate.mdx).\n\n## Syntax\n\n```js\ngetDay()\n```\n\n### Return value\n\nAn integer number, between 0 and 6, corresponding to the day of the week for the given\ndate, according to local time: 0 for Sunday, 1 for Monday, 2 for Tuesday, and so on.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/getFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getFullYear()\n\nThe **`getFullYear()`** method returns the year of the\nspecified date according to local time.\n\nUse this method instead of the [`Date.prototype.getYear()`](./getYear.mdx) method.\n\n## Syntax\n\n```js\ngetFullYear()\n```\n\n### Return value\n\nA number corresponding to the year of the given date, according to local time.\n\n## Description\n\nThe value returned by `getFullYear()` is an absolute number. For dates\nbetween the years 1000 and 9999, `getFullYear()` returns a four-digit number,\nfor example, 1995. Use this function to make sure a year is compliant with years after\n2000\\.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/getHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getHours()\n\nThe **`getHours()`** method returns the hour for the specified\ndate, according to local time.\n\n## Syntax\n\n```js\ngetHours()\n```\n\n### Return value\n\nAn integer number, between 0 and 23, representing the hour for the given date according\nto local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/getMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getMilliseconds()\n\nThe **`getMilliseconds()`** method returns the milliseconds in\nthe specified date according to local time.\n\n## Syntax\n\n```js\ngetMilliseconds()\n```\n\n### Return value\n\nA number, between 0 and 999, representing the milliseconds for the given date according\nto local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/getMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getMinutes()\n\nThe **`getMinutes()`** method returns the minutes in the\nspecified date according to local time.\n\n## Syntax\n\n```js\ngetMinutes()\n```\n\n### Return value\n\nAn integer number, between 0 and 59, representing the minutes in the given date\naccording to local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/getMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getMonth()\n\nThe **`getMonth()`** method returns the month in the specified\ndate according to local time, as a zero-based value (where zero indicates the first\nmonth of the year).\n\n## Syntax\n\n```js\ngetMonth()\n```\n\n### Return value\n\nAn integer number, between 0 and 11, representing the month in the given date according\nto local time. 0 corresponds to January, 1 to February, and so on.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/getSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getSeconds()\n\nThe **`getSeconds()`** method returns the seconds in the\nspecified date according to local time.\n\n## Syntax\n\n```js\ngetSeconds()\n```\n\n### Return value\n\nAn integer number, between 0 and 59, representing the seconds in the given date\naccording to local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/getTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getTime()\n\nThe **`getTime()`** method returns the number of milliseconds since the [epoch](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps), which is defined as the midnight at the beginning of January 1, 1970, UTC.\n\nYou can use this method to help assign a date and time to another `Date`\nobject. This method is functionally equivalent to the [`Date.prototype.valueOf()`](./valueOf.mdx) method.\n\n## Syntax\n\n```js\ngetTime()\n```\n\n### Return value\n\nA number representing the milliseconds elapsed between 1 January 1970 00:00:00 UTC and\nthe given date.\n\n## Description\n\nTo offer protection against timing attacks and fingerprinting, the precision of\n`new Date().getTime()` might get rounded depending on browser settings.\n\n```js\n// reduced time precision (2ms) in Firefox 60\nnew Date().getTime();\n// 1519211809934\n// 1519211810362\n// 1519211811670\n// …\n\n// reduced time precision with `privacy.resistFingerprinting` enabled\nnew Date().getTime();\n// 1519129853500\n// 1519129858900\n// 1519129864400\n// …\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/getTimezoneOffset.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getTimezoneOffset()\n\nThe **`getTimezoneOffset()`** method returns the difference, in minutes, between a date as evaluated in the UTC time zone, and the same date as evaluated in the local time zone.\n\n## Syntax\n\n```js\ngetTimezoneOffset()\n```\n\n### Return value\n\nThe difference, in minutes, between the date as evaluated in the UTC time zone and as evaluated in the local time zone. The actual local time algorithm is implementation-defined, and the return value is allowed to be zero in runtimes without appropriate data.\n\n## Description\n\n`date.getTimezoneOffset()` returns the difference, in minutes, between `date` as evaluated in the UTC time zone and as evaluated in the local time zone — that is, the time zone of the host system in which the browser is being used (if the code is run from the Web in a browser), or otherwise the host system of whatever JavaScript runtime (for example, a Node.js environment) the code is executed in.\n\n### Negative values and positive values\n\nThe number of minutes returned by `getTimezoneOffset()` is positive if the local time zone is behind UTC, and negative if the local time zone is ahead of UTC. For example, for UTC+10, `-600` will be returned.\n\n| Current time zone | Return value |\n| ----------------- | ------------ |\n| UTC-8             | 480          |\n| UTC               | 0            |\n| UTC+3             | -180         |\n\n### Varied results in Daylight Saving Time (DST) regions\n\nIn a region that annually shifts in and out of Daylight Saving Time (DST), as `date` varies, the number of minutes returned by calling `getTimezoneOffset()` can be non-uniform.\n\n> **Note:** `getTimezoneOffset()`'s behavior will never differ based on the time when the code is run — its behavior is always consistent when running in the same region. Only the value of `date` affects the result.\n\nIn most implementations, the [IANA time zone database](https://en.wikipedia.org/wiki/Daylight_saving_time#IANA_time_zone_database) (tzdata) is used to precisely determine the offset of the local timezone at the moment of the `date`. However, if such information is unavailable, an implementation may return zero.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/getUTCDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCDate()\n\nThe **`getUTCDate()`** method returns the day of the month (from\n1 to 31) in the specified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCDate()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer number ranging from 1 to 31\nrepresenting day of month for the given date, according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/getUTCDay.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCDay()\n\nThe **`getUTCDay()`** method returns the day of the week in the\nspecified date according to universal time, where 0 represents Sunday.\n\n## Syntax\n\n```js\ngetUTCDay()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer number corresponding to the day\nof the week for the given date, according to universal time: 0 for Sunday, 1 for Monday,\n2 for Tuesday, and so on.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/getUTCFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCFullYear()\n\nThe **`getUTCFullYear()`** method returns the year in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCFullYear()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer representing the year in the given date\naccording to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n\n## Description\n\nThe value returned by `getUTCFullYear()` is an absolute number that is\ncompliant with year-2000, for example, 1995.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/getUTCHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCHours()\n\nThe **`getUTCHours()`** method returns the hours in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCHours()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 23, representing the hours in the given date according\nto Coordinated Universal Time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/getUTCMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCMilliseconds()\n\nThe **`getUTCMilliseconds()`** method returns the milliseconds\nportion of the time object's value according to universal time.\n\n## Syntax\n\n```js\ngetUTCMilliseconds()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 999, representing\nthe milliseconds portion of the given `Date` object according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n\nNot to be confused with Unix epoch time. To get the total milliseconds since 1970/01/01,\nuse the [`getTime()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/getTime) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/getUTCMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCMinutes()\n\nThe **`getUTCMinutes()`** method returns the minutes in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCMinutes()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 59,\nrepresenting the minutes in the given date according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/getUTCMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCMonth()\n\nThe **`getUTCMonth()`** returns the month of the specified date\naccording to universal time, as a zero-based value (where zero indicates the first month\nof the year).\n\n## Syntax\n\n```js\ngetUTCMonth()\n```\n\n### Return value\n\nA number. If the `Date` object represents a valid date, an integer number, between 0 and 11,\ncorresponding to the month of the given date according to universal time. 0 for January,\n1 for February, 2 for March, and so on. Otherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/getUTCSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCSeconds()\n\nThe **`getUTCSeconds()`** method returns the seconds in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCSeconds()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 59, representing\nthe seconds in the given date according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/getYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getYear()\n\nThe **`getYear()`** method returns the year in the specified\ndate according to local time. Because `getYear()` does not return full years\n(\"year 2000 problem\"), it is no longer used and has been replaced by the\n[`Date.prototype.getFullYear()`](./getFullYear.mdx) method.\n\n## Syntax\n\n```js\ngetYear()\n```\n\n### Return value\n\nA number representing the year of the given date, according to local time, minus 1900.\n\n## Description\n\n- For years greater than or equal to 2000, the value returned by\n  `getYear()` is 100 or greater. For example, if the year is 2026,\n  `getYear()` returns 126.\n- For years between and including 1900 and 1999, the value returned by\n  `getYear()` is between 0 and 99. For example, if the year is 1976,\n  `getYear()` returns 76.\n- For years less than 1900, the value returned by `getYear()` is less than 0. For example, if the year is 1800, `getYear()` returns -100.\n\nTo take into account years before and after 2000, you should use\n[`Date.prototype.getFullYear()`](./getFullYear.mdx) instead of\n`getYear()` so that the year is specified in full.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/setDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setDate()\n\nThe **`setDate()`** method changes the day of the month of a given `Date` instance, based on local time.\n\nTo instead change the day of the month for a given `Date` instance based on UTC time, use the [`Date.prototype.setUTCDate()`](./setUTCDate.mdx) method.\n\n## Syntax\n\n```js\nsetDate(dayValue)\n```\n\n### Parameters\n\n- `dayValue`\n  - : An integer representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the given date (the\n`Date` object is also changed in place).\n\n## Description\n\nIf the `dayValue` is outside of the range of date values for the month, `setDate()` will update the `Date` object accordingly.\n\nFor example, if 0 is provided for `dayValue`, the date will be set to the last day of the previous month. If you use 40 for `dayValue`, and the month stored in the `Date` object is June, the day will be changed to 10 and the month will be incremented to July.\n\nIf a negative number is provided for `dayValue`, the date will be set counting backwards from the last day of the previous month. -1 would result in the date being set to 1 day before the last day of the previous month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/setFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setFullYear()\n\nThe **`setFullYear()`** method sets the full year for a\nspecified date according to local time. Returns new timestamp.\n\n## Syntax\n\n```js\nsetFullYear(yearValue)\nsetFullYear(yearValue, monthValue)\nsetFullYear(yearValue, monthValue, dateValue)\n```\n\n### Parameters\n\n- `yearValue`\n  - : An integer specifying the numeric value of the year, for example, 1995.\n- `monthValue`\n  - : Optional. An integer between 0 and 11 representing the months January through\n    December.\n- `dateValue`\n  - : Optional. An integer between 1 and 31 representing the day of the month. If you\n    specify the `dateValue` parameter, you must also specify the\n    `monthValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `monthValue` and\n`dateValue` parameters, the values returned from the\n[`Date.prototype.getMonth()`](./getMonth.mdx) and\n[`Date.prototype.getDate()`](./getDate.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range, `setFullYear()`\nattempts to update the other parameters and the date information in the\n`Date` object accordingly. For example, if you specify 15 for\n`monthValue`, the year is incremented by 1\n(`yearValue + 1`), and 3 is used for the month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/setHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setHours()\n\nThe **`setHours()`** method sets the hours for a specified date\naccording to local time, and returns the number of milliseconds since January 1, 1970\n00:00:00 UTC until the time represented by the updated `Date` instance.\n\n## Syntax\n\n```js\nsetHours(hoursValue)\nsetHours(hoursValue, minutesValue)\nsetHours(hoursValue, minutesValue, secondsValue)\nsetHours(hoursValue, minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `hoursValue`\n  - : Ideally, an integer between 0 and 23, representing the hour. If a value greater than\n    23 is provided, the datetime will be incremented by the extra hours.\n- `minutesValue`\n  - : Optional. Ideally, an integer between 0 and 59, representing the minutes. If a value\n    greater than 59 is provided, the datetime will be incremented by the extra minutes.\n- `secondsValue`\n  - : Optional. Ideally, an integer between 0 and 59, representing the seconds. If a value\n    greater than 59 is provided, the datetime will be incremented by the extra seconds. If\n    you specify the `secondsValue` parameter, you must also specify\n    the `minutesValue`.\n- `msValue`\n  - : Optional. Ideally, a number between 0 and 999, representing the milliseconds. If a\n    value greater than 999 is provided, the datetime will be incremented by the extra\n    milliseconds. If you specify the `msValue` parameter, you must\n    also specify the `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between January 1, 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `minutesValue`,\n`secondsValue`, and `msValue` parameters,\nthe values returned from the [`Date.prototype.getMinutes()`](./getMinutes.mdx),\n[`Date.prototype.getSeconds()`](./getSeconds.mdx), and\n[`Date.prototype.getMilliseconds()`](./getMilliseconds.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range, `setHours()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes will\nbe incremented by 1 (`minutesValue + 1`), and 40 will be used for\nseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/setMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setMilliseconds()\n\nThe **`setMilliseconds()`** method sets the milliseconds for a\nspecified date according to local time.\n\n## Syntax\n\n```js\nsetMilliseconds(millisecondsValue)\n```\n\n### Parameters\n\n- `millisecondsValue`\n  - : A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you specify a number outside the expected range, the date information in the\n`Date` object is updated accordingly. For example, if you specify 1005, the\nnumber of seconds is incremented by 1, and 5 is used for the milliseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/setMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setMinutes()\n\nThe **`setMinutes()`** method sets the minutes for a specified\ndate according to local time.\n\n## Syntax\n\n```js\nsetMinutes(minutesValue)\nsetMinutes(minutesValue, secondsValue)\nsetMinutes(minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `minutesValue`\n  - : An integer between 0 and 59, representing the minutes.\n- `secondsValue`\n  - : Optional. An integer between 0 and 59, representing the seconds. If you specify the\n    `secondsValue` parameter, you must also specify the\n    `minutesValue`.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds. If you specify\n    the `msValue` parameter, you must also specify the\n    `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `secondsValue` and\n`msValue` parameters, the values returned from\n[`Date.prototype.getSeconds()`](./getSeconds.mdx) and\n[`Date.prototype.getMilliseconds()`](./getMilliseconds.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range, `setMinutes()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes will\nbe incremented by 1 (`minutesValue + 1`), and 40 will be used for\nseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/setMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setMonth()\n\nThe **`setMonth()`** method sets the month for a specified date according to the currently set year.\n\n## Syntax\n\n```js\nsetMonth(monthValue)\nsetMonth(monthValue, dayValue)\n```\n\n### Parameters\n\n- `monthValue`\n  - : A zero-based integer representing the month of the year offset from the start of the\n    year. So, 0 represents January, 11 represents December, -1 represents December of the\n    previous year, and 12 represents January of the following year.\n- `dayValue`\n  - : Optional. An integer from 1 to 31, representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `dayValue` parameter, the value\nreturned from the [`Date.prototype.getDate()`](./getDate.mdx) method is used.\n\nIf a parameter you specify is outside of the expected range, `setMonth()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 15 for `monthValue`, the year will be\nincremented by 1, and 3 will be used for month.\n\nThe current day of month will have an impact on the behavior of this method.\nConceptually it will add the number of days given by the current day of the month to the\n1st day of the new month specified as the parameter, to return the new date.\nFor example, if the current value is 31st January 2016, calling setMonth with a value of 1 will return 2nd March 2016.\nThis is because in 2016 February had 29 days.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/setSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setSeconds()\n\nThe **`setSeconds()`** method sets the seconds for a specified\ndate according to local time.\n\n## Syntax\n\n```js\nsetSeconds(secondsValue)\nsetSeconds(secondsValue, msValue)\n```\n\n### Parameters\n\n- `secondsValue`\n  - : An integer between 0 and 59, representing the seconds.\n- `msValue` _**optional**_\n  - : Optional. A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `msValue` parameter, the value returned\nfrom the [`Date.prototype.getMilliseconds()`](./getMilliseconds.mdx) method is\nused.\n\nIf a parameter you specify is outside of the expected range, `setSeconds()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes stored\nin the `Date` object will be incremented by 1, and 40 will be used for\nseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/setTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setTime()\n\nThe **`setTime()`** method sets the `Date` object\nto the time represented by a number of milliseconds since January 1, 1970, 00:00:00 UTC.\n\n## Syntax\n\n```js\nsetTime(timeValue)\n```\n\n### Parameters\n\n- `timeValue`\n  - : An integer representing the number of milliseconds since 1 January 1970, 00:00:00\n    UTC.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date\n(effectively, the value of the argument).\n\n## Description\n\nUse the `setTime()` method to help assign a date and time to another\n`Date` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/setUTCDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCDate()\n\nThe **`setUTCDate()`** method changes the day of the month of a given `Date` instance, based on UTC time.\n\nTo instead change the day of the month for a given `Date` instance based on local time, use the [`Date.prototype.setDate()`](././setDate.mdx) method.\n\n## Syntax\n\n```js\nsetUTCDate(dayValue)\n```\n\n### Parameters\n\n- `dayValue`\n  - : An integer from 1 to 31, representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf the `dayValue` is outside of the range of date values for the month, `setDate()` will update the `Date` object accordingly.\n\nFor example, if 0 is provided for `dayValue`, the date will be set to the last day of the previous month. If you use 40 for `dayValue`, and the month stored in the `Date` object is June, the day will be changed to 10 and the month will be incremented to July.\n\nIf a negative number is provided for `dayValue`, the date will be set counting backwards from the last day of the previous month. -1 would result in the date being set to 1 day before the last day of the previous month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/setUTCFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCFullYear()\n\nThe **`setUTCFullYear()`** method sets the full year for a\nspecified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCFullYear(yearValue)\nsetUTCFullYear(yearValue, monthValue)\nsetUTCFullYear(yearValue, monthValue, dayValue)\n```\n\n### Parameters\n\n- `yearValue`\n  - : An integer specifying the numeric value of the year, for example, 1995.\n- `monthValue`\n  - : Optional. An integer between 0 and 11 representing the months January through\n    December.\n- `dayValue`\n  - : Optional. An integer between 1 and 31 representing the day of the month. If you\n    specify the `dayValue` parameter, you must also specify the\n    `monthValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `monthValue` and\n`dayValue` parameters, the values returned from the\n[`Date.prototype.getUTCMonth()`](./getUTCMonth.mdx) and\n[`Date.prototype.getUTCDate()`](./getUTCDate.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range,\n`setUTCFullYear()` attempts to update the other parameters and the date\ninformation in the `Date` object accordingly. For example, if you specify 15\nfor `monthValue`, the year is incremented by 1\n(`yearValue + 1`), and 3 is used for the month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/setUTCHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCHours()\n\nThe **`setUTCHours()`** method sets the hour for a specified\ndate according to universal time, and returns the number of milliseconds since January\n1, 1970 00:00:00 UTC until the time represented by the updated `Date`\ninstance.\n\n## Syntax\n\n```js\nsetUTCHours(hoursValue)\nsetUTCHours(hoursValue, minutesValue)\nsetUTCHours(hoursValue, minutesValue, secondsValue)\nsetUTCHours(hoursValue, minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `hoursValue`\n  - : An integer between 0 and 23, representing the hour.\n- `minutesValue`\n  - : Optional. An integer between 0 and 59, representing the minutes.\n- `secondsValue`\n  - : Optional. An integer between 0 and 59, representing the seconds. If you specify the\n    `secondsValue` parameter, you must also specify the\n    `minutesValue`.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds. If you specify\n    the `msValue` parameter, you must also specify the\n    `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between January 1, 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `minutesValue`,\n`secondsValue`, and `msValue` parameters,\nthe values returned from the [`Date.prototype.getUTCMinutes()`](./getUTCMinutes.mdx), [`Date.prototype.getUTCSeconds()`](./getUTCSeconds.mdx),\nand [`Date.prototype.getUTCMilliseconds()`](./getUTCMilliseconds.mdx) methods\nare used.\n\nIf a parameter you specify is outside of the expected range, `setUTCHours()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes will\nbe incremented by 1 (`minutesValue + 1`), and 40 will be used for seconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/setUTCMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCMilliseconds()\n\nThe **`setUTCMilliseconds()`** method sets the milliseconds for\na specified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCMilliseconds(millisecondsValue)\n```\n\n### Parameters\n\n- `millisecondsValue`\n  - : A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf a parameter you specify is outside of the expected range,\n`setUTCMilliseconds()` attempts to update the date information in the\n`Date` object accordingly. For example, if you use 1100 for\n`millisecondsValue`, the seconds stored in the `Date`\nobject will be incremented by 1, and 100 will be used for milliseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/setUTCMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCMinutes()\n\nThe **`setUTCMinutes()`** method sets the minutes for a\nspecified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCMinutes(minutesValue)\nsetUTCMinutes(minutesValue, secondsValue)\nsetUTCMinutes(minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `minutesValue`\n  - : An integer between 0 and 59, representing the minutes.\n- `secondsValue`\n  - : Optional. An integer between 0 and 59, representing the seconds. If you specify the\n    `secondsValue` parameter, you must also specify the\n    `minutesValue`.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds. If you specify\n    the `msValue` parameter, you must also specify the\n    `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `secondsValue` and\n`msValue` parameters, the values returned from\n[`Date.prototype.getUTCSeconds()`](./getUTCSeconds.mdx) and\n[`Date.prototype.getUTCMilliseconds()`](./getUTCMilliseconds.mdx) methods are\nused.\n\nIf a parameter you specify is outside of the expected range,\n`setUTCMinutes()` attempts to update the date information in the\n`Date` object accordingly. For example, if you use 100 for\n`secondsValue`, the minutes will be incremented by 1\n(`minutesValue + 1`), and 40 will be used for seconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/setUTCMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCMonth()\n\nThe **`setUTCMonth()`** method sets the month for a specified\ndate according to universal time.\n\n## Syntax\n\n```js\nsetUTCMonth(monthValue)\nsetUTCMonth(monthValue, dayValue)\n```\n\n### Parameters\n\n- `monthValue`\n  - : An integer between 0 and 11, representing the months January through December.\n- `dayValue`\n  - : Optional. An integer from 1 to 31, representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `dayValue` parameter, the value returned from the\n[`Date.prototype.getUTCDate()`](./getUTCDate.mdx) method is used.\n\nIf a parameter you specify is outside of the expected range, `setUTCMonth()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 15 for `monthValue`, the year will be incremented by\n1, and 3 will be used for month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/setUTCSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCSeconds()\n\nThe **`setUTCSeconds()`** method sets the seconds for a\nspecified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCSeconds(secondsValue)\nsetUTCSeconds(secondsValue, msValue)\n```\n\n### Parameters\n\n- `secondsValue`\n  - : An integer between 0 and 59, representing the seconds.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `msValue` parameter, the value returned from the\n[`Date.prototype.getUTCMilliseconds()`](./getUTCMilliseconds.mdx) method is\nused.\n\nIf a parameter you specify is outside of the expected range,\n`setUTCSeconds()` attempts to update the date information in the\n`Date` object accordingly. For example, if you use 100 for\n`secondsValue`, the minutes stored in the `Date` object will be\nincremented by 1, and 40 will be used for seconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/setYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setYear()\n\nThe legacy **`setYear()`** method sets the year for a specified date according to local time.\n\nHowever, the way the legacy `setYear()` method sets year values is different from how the preferred [`Date.prototype.setFullYear()`](./setFullYear.mdx) method sets year values — and in some cases, also different from how `new Date()` and [`Date.parse()`](../parse.mdx) set year values. Specifically, given two-digit numbers, such as `22` and `61`:\n\n- `setYear()` interprets any two-digit number as an offset to `1900`; so `date.setYear(22)` results in the year value being set to `1922`, and `date.setYear(61)` results in the year value being set to `1961`. (In contrast, while `new Date(61, 1)` also results in the year value being set to `1961`, `new Date(\"2/1/22\")` results in the year value being set to `2022`; and similarly for [`Date.parse()`](../parse.mdx)).\n\n- [`Date.prototype.setFullYear()`](./setFullYear.mdx) does no special interpretation but instead uses the literal two-digit value as-is to set the year; so `date.setFullYear(61)` results in the year value being set to `0061`, and `date.setFullYear(22)` results in the year value being set to `0022`.\n\nBecause of those differences in behavior, you should no longer use the legacy `setYear()` method, but should instead use the preferred [`Date.prototype.setFullYear()`](./setFullYear.mdx) method.\n\n## Syntax\n\n```js\nsetYear(yearValue)\n```\n\n### Parameters\n\n- `yearValue`\n  - : An integer.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf `yearValue` is a number between 0 and 99 (inclusive), then the year for\n`dateObj` is set to `1900 + yearValue`. Otherwise, the year for\n`dateObj` is set to `yearValue`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/toDateString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toDateString()\n\nThe **`toDateString()`** method returns the date portion of a `Date` object interpreted in the local timezone in English.\n\n## Syntax\n\n```js\ntoDateString()\n```\n\n### Return value\n\nA string representing the date portion of the given `Date` object in human readable form in English.\n\n## Description\n\n`Date` instances refer to a specific point in time. `toDateString()` interprets the date in the local timezone and formats the _date_ part in English. It always uses the following format, separated by spaces:\n\n1. First three letters of the week day name\n2. First three letters of the month name\n3. Two-digit day of the month, padded on the left a zero if necessary\n4. Four-digit year (at least), padded on the left with zeros if necessary. May have a negative sign\n\nFor example: \"Thu Jan 01 1970\".\n\n- If you want to get the _time_ part, use [`toTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString).\n- If you want to get both the date and time, use [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toString).\n- If you want to make the date interpreted as UTC instead of local timezone, use [`toUTCString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString).\n- If you want to format the date in a more user-friendly format (e.g. localization), use [`toLocaleDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/toISOString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toISOString()\n\nThe **`toISOString()`** method returns a string in _simplified_ extended ISO format ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)), which is always 24 or 27 characters long (`YYYY-MM-DDTHH:mm:ss.sssZ` or `±YYYYYY-MM-DDTHH:mm:ss.sssZ`, respectively). The timezone is always zero UTC offset, as denoted by the suffix `Z`.\n\n## Syntax\n\n```js\ntoISOString()\n```\n\n### Return value\n\nA string representing the given date in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format according to universal time. It's the same format as the one required to be recognized by [`Date.parse()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/parse#date-time-string-format).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/toJSON.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toJSON()\n\nThe **`toJSON()`** method returns a string representation of\nthe `Date` object.\n\n## Syntax\n\n```js\ntoJSON()\n```\n\n### Return value\n\nA string representation of the given date.\n\n## Description\n\n`Date` instances refer to a specific point in time. `toJSON()` calls the object's [`Date.prototype.toISOString()`](./toISOString.mdx) method, which returns a string representing the `Date` object's value. This method is generally intended to, by default, usefully serialize `Date` objects during [JSON](https://developer.mozilla.org/docs/Glossary/JSON) serialization, which can then be deserialized using the [`Date()` constructor](../Date.mdx) or [`Date.parse()`](../parse.mdx) as the reviver of [`JSON.parse()`](../../JSON/parse.mdx).\n\nThe method first attempts to convert its `this` value [to a primitive](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion) by calling its [`[Symbol.toPrimitive]()`](../../Symbol/toPrimitive.mdx) (with `\"number\"` as hint), [`valueOf()`](../../Object/prototype/valueOf.mdx), and [`toString()`](../../Object/prototype/toString.mdx) methods, in that order. If the result is a [non-finite](../../Number/isFinite.mdx) number, `null` is returned. (This generally corresponds to an invalid date, whose [`valueOf()`](./valueOf.mdx) returns [`NaN`](../../NaN.mdx).) Otherwise, if the converted primitive is not a number or is a finite number, the return value of `this.toISOString()` is returned.\n\nNote that the method does not check whether the `this` value is a valid `Date` object. However, calling `Date.prototype.toJSON()` on non-`Date` objects does not have well-defined semantics.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/toLocaleDateString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toLocaleDateString()\n\nThe **`toLocaleDateString()`** method returns a string with a language-sensitive representation of the date portion of the specified date in the user agent's timezone. In implementations with [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) support, this method simply calls `Intl.DateTimeFormat`.\n\n## Syntax\n\n```js\ntoLocaleDateString()\ntoLocaleDateString(locales)\ntoLocaleDateString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat), these parameters correspond exactly to the [`Intl.DateTimeFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) constructor's parameters. Implementations without `Intl.DateTimeFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales) parameter of the `Intl.DateTimeFormat()` constructor.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options) parameter of the `Intl.DateTimeFormat()` constructor. The `timeStyle` option must be undefined, or a [`TypeError`](../../../globals/TypeError/TypeError.mdx) would be thrown. If `weekday`, `year`, `month`, and `day` are all undefined, then `year`, `month`, and `day` will be set to `\"numeric\"`.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored.\n\nSee the [`Intl.DateTimeFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string representing the date portion of the given `Date` instance according to language-specific conventions.\n\nIn implementations with `Intl.DateTimeFormat`, this is equivalent to `new Intl.DateTimeFormat(locales, options).format(date)`, where `options` has been normalized as described above.\n\n## Performance\n\nWhen formatting large numbers of dates, it is better to create an [`Intl.DateTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) object and use its [`format()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/format) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string with a language-sensitive representation of this date. In implementations with [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) support, this method simply calls `Intl.DateTimeFormat`.\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat), these parameters correspond exactly to the [`Intl.DateTimeFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) constructor's parameters. Implementations without `Intl.DateTimeFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales) parameter of the `Intl.DateTimeFormat()` constructor.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options) parameter of the `Intl.DateTimeFormat()` constructor. If `weekday`, `year`, `month`, `day`, `dayPeriod`, `hour`, `minute`, `second`, and `fractionalSecondDigits` are all undefined, then `year`, `month`, `day`, `hour`, `minute`, `second` will be set to `\"numeric\"`.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored.\n\nSee the [`Intl.DateTimeFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string representing the given date according to language-specific conventions.\n\nIn implementations with `Intl.DateTimeFormat`, this is equivalent to `new Intl.DateTimeFormat(locales, options).format(date)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/toLocaleTimeString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toLocaleTimeString()\n\nThe **`toLocaleTimeString()`** method returns a string with a language-sensitive representation of the time portion of the date. In implementations with [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) support, this method simply calls `Intl.DateTimeFormat`.\n\n## Syntax\n\n```js\ntoLocaleTimeString()\ntoLocaleTimeString(locales)\ntoLocaleTimeString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat), these parameters correspond exactly to the [`Intl.DateTimeFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) constructor's parameters. Implementations without `Intl.DateTimeFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales) parameter of the `Intl.DateTimeFormat()` constructor.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options) parameter of the `Intl.DateTimeFormat()` constructor. If `dayPeriod`, `hour`, `minute`, `second`, and `fractionalSecondDigits` are all undefined, then `hour`, `minute`, `second` will be set to `\"numeric\"`.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored.\n\nSee the [`Intl.DateTimeFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string representing the time portion of the given `Date` instance according to language-specific conventions.\n\nIn implementations with `Intl.DateTimeFormat`, this is equivalent to `new Intl.DateTimeFormat(locales, options).format(date)`, where `options` has been normalized as described above.\n\n## Performance\n\nWhen formatting large numbers of dates, it is better to create an [`Intl.DateTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) object and use its [`format()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/format) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified `Date` object interpreted in the local timezone.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the given date.\n\n## Description\n\nThe `Date` object overrides the `toString()` method of `Object`. `Date.prototype.toString()` returns a string representation of the Date as interpreted in the local timezone, containing both the date and the time — it joins the string representation specified in [`toDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString) and [`toTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString) together, adding a space in between.\n\nFor example: \"Thu Jan 01 1970 04:42:04 GMT+0000 (Coordinated Universal Time)\"\n\nThe `toString()` method is automatically called when a date is coerced to a string, such as `const today = 'Today is ' + new Date()`.\n\n`Date.prototype.toString()` must be called on `Date` instances. If the `this` value does not inherit from `Date.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n- If you only want to get the _date_ part, use [`toDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString).\n- If you only want to get the _time_ part, use [`toTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString).\n- If you want to make the date interpreted as UTC instead of local timezone, use [`toUTCString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString).\n- If you want to format the date in a more user-friendly format (e.g. localization), use [`toLocaleString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/toTimeString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toTimeString()\n\nThe **`toTimeString()`** method returns the time portion of a `Date` object interpreted in the local timezone in English.\n\n## Syntax\n\n```js\ntoTimeString()\n```\n\n### Return value\n\nA string representing the time portion of the given date in human readable form in English.\n\n## Description\n\n`Date` instances refer to a specific point in time. `toTimeString()` interprets the date in the local timezone and formats the _time_ part in English. It always uses the format of `hh:mm:ss GMT±xxxx (TZ)`, where:\n\n| Format String | Description                                                                                           |\n| ------------- | ----------------------------------------------------------------------------------------------------- |\n| `hh`          | Hour, as two digits with leading zero if required                                                     |\n| `mm`          | Minute, as two digits with leading zero if required                                                   |\n| `ss`          | Seconds, as two digits with leading zero if required                                                  |\n| `±xxxx`       | The local timezone's offset — two digits for hours and two digits for minutes (e.g. `-0500`, `+0800`) |\n| `TZ`          | The timezone's name (e.g. `PDT`, `PST`)                                                               |\n\nFor example: \"04:42:04 GMT+0000 (Coordinated Universal Time)\".\n\n- If you want to get the _date_ part, use [`toDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString).\n- If you want to get both the date and time, use [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toString).\n- If you want to make the date interpreted as UTC instead of local timezone, use [`toUTCString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString).\n- If you want to format the date in a more user-friendly format (e.g. localization), use [`toLocaleTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleTimeString).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/toUTCString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toUTCString()\n\nThe **`toUTCString()`** method converts a date to a string, interpreting it in the UTC time zone. `toGMTString()` is an alias of this method.\n\nBased on [rfc7231](https://datatracker.ietf.org/doc/html/rfc7231#section-7.1.1.1) and modified according to [ECMA-262 toUTCString](https://tc39.es/ecma262/#sec-date.prototype.toutcstring), it can have negative values.\n\n## Syntax\n\n```js\ntoUTCString()\n```\n\n### Return value\n\nA string representing the given date using the UTC time zone.\n\n## Description\n\nThe value returned by `toUTCString()` is a string in the form `Www, dd Mmm yyyy hh:mm:ss GMT`, where:\n\n| Format String | Description                                                  |\n| ------------- | ------------------------------------------------------------ |\n| `Www`         | Day of week, as three letters (e.g. `Sun`, `Mon`)            |\n| `dd`          | Day of month, as two digits with leading zero if required    |\n| `Mmm`         | Month, as three letters (e.g. `Jan`, `Feb`)                  |\n| `yyyy`        | Year, as four or more digits with leading zeroes if required |\n| `hh`          | Hour, as two digits with leading zero if required            |\n| `mm`          | Minute, as two digits with leading zero if required          |\n| `ss`          | Seconds, as two digits with leading zero if required         |\n\n### Aliasing\n\nJavaScript's `Date` API was inspired by Java's `java.util.Date` library (while the latter had become de facto legacy since Java 1.1 in 1997). In particular, the Java `Date` class had a method called `toGMTString` — which was poorly named, because the [Greenwich Mean Time](https://en.wikipedia.org/wiki/Greenwich_Mean_Time) is not equivalent to the [Coordinated Universal Time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time), while JavaScript dates always operate by UTC time. For web compatibility reasons, `toGMTString` remains as an alias to `toUTCString`, and they refer to the exact same function object. This means:\n\n```js\nDate.prototype.toGMTString.name === \"toUTCString\";\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Date/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a\n`Date` object.\n\n\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the given date, or [`NaN`](../../NaN.mdx) in case of an invalid date.\n\n## Description\n\nThe `valueOf()` method returns the primitive value of a `Date`\nobject as a number data type, the number of milliseconds since midnight 01 January, 1970\nUTC.\n\nThis method is functionally equivalent to the [`Date.prototype.getTime()`](./getTime.mdx)\nmethod.\n\nThis method is usually called internally by JavaScript and not explicitly in code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/DecompressionStream/DecompressionStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DecompressionStream()\n\nThe **`DecompressionStream()`** constructor creates a new `DecompressionStream` object which decompresses a stream of data.\n\n## Syntax\n\n```js\nnew DecompressionStream(format)\n```\n\n### Parameters\n\n- `format`\n\n  - : One of the following compression formats:\n\n    - `\"gzip\"`\n    - `\"deflate\"`\n    - `\"deflate-raw\"`\n\n## Exceptions\n\n- `TypeError`\n  - : Thrown if the format passed to the constructor is not supported.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/DecompressionStream/prototype/readable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DecompressionStream.readable\n\nThe **`readable`** read-only property of the `DecompressionStream` interface returns a `ReadableStream`.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/DecompressionStream/prototype/writable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DecompressionStream.writable\n\nThe **`writable`** read-only property of the `DecompressionStream` interface returns a `WritableStream`.\n\n## Value\n\nA `WritableStream`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/EcKeyImportParams/EcKeyImportParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# EcKeyImportParams\n\nThe **`EcKeyImportParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.importKey()`, when generating any elliptic-curve-based key pair: that is, when the algorithm is identified as ECDSA.\n\n## Instance properties\n\n- `name`\n  - : A string. This should be set to `ECDSA`.\n- `namedCurve`\n\n  - : A string representing the name of the elliptic curve to use. This may be any of the following names for [NIST](https://www.nist.gov/)-approved curves:\n\n    - `P-256`\n    - `P-384`\n    - `P-521`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/EcdsaParams/EcdsaParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# EcdsaParams\n\nThe **`EcdsaParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.sign()` or `SubtleCrypto.verify()` when using the ECDSA algorithm.\n\n## Instance properties\n\n- `name`\n    - : A string. This should be set to `ECDSA`.\n- `hash`\n\n    - : A string. An identifier for the digest algorithm to use. This should be one of the following:\n\n        - `SHA-256`: selects the SHA-256 algorithm.\n        - `SHA-384`: selects the SHA-384 algorithm.\n        - `SHA-512`: selects the SHA-512 algorithm.\n\n        > **Warning:** `SHA-1` is also supported here but the SHA-1 algorithm is considered vulnerable and should no longer be used.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Error/Error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error\n\nThe **`Error()`** constructor creates an error object.\n\n## Syntax\n\n```js\nnew Error()\nnew Error(message)\nnew Error(message, options)\nnew Error(message, fileName)\nnew Error(message, fileName, lineNumber)\n\nError()\nError(message)\nError(message, options)\nError(message, fileName)\nError(message, fileName, lineNumber)\n```\n\n> **Note:** `Error()` can be called with or without `new`. Both create a new `Error` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : A human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A value indicating the specific cause of the error, reflected in the [`Error.prototype.cause`](./prototype/cause.mdx) property. When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Error/prototype/cause.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.cause\n\nThe **`cause`** data property of an [`Error`](../../../globals/Error/Error.mdx) instance indicates the specific original cause of the error.\n\nIt is used when catching and re-throwing an error with a more-specific or useful error message in order to still have access to the original error.\n\n## Value\n\nThe value that was passed to the [`Error`](../Error.mdx) constructor in the `options.cause` argument. It may not be present.\n\n## Description\n\nThe value of `cause` can be of any type. You should not make assumptions that the error you caught has an `Error` as its `cause`, in the same way that you cannot be sure the variable bound in the `catch` statement is an `Error` either. The \"Providing structured data as the error cause\" example below shows a case where a non-error is deliberately provided as the cause.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Error/prototype/message.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.message\n\nThe **`message`** data property of an [`Error`](../Error.mdx) instance is a human-readable description of the error.\n\n## Value\n\nA string corresponding to the value passed to the [`Error`](../Error.mdx) constructor as the first argument.\n\n## Description\n\nThis property contains a brief description of the error if one is available or has been set. The `message` property combined with the [`name`](./name.mdx) property is used by the [`Error.prototype.toString()`](./toString.mdx) method to create a string representation of the Error.\n\nBy default, the `message` property is an empty string, but this behavior can be overridden for an instance by specifying a message as the first argument to the [`Error`](../Error.mdx) constructor.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Error/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.name\n\nThe **`name`** data property of `Error.prototype` is shared by all [`Error`](../Error.mdx) instances. It represents the name for the type of error. For `Error.prototype.name`, the initial value is `\"Error\"`. Subclasses like [`TypeError`](../../../globals/TypeError/TypeError.mdx) and [`SyntaxError`](../../SyntaxError/SyntaxError.mdx) provide their own `name` properties.\n\n## Value\n\nA string. For `Error.prototype.name`, the initial value is `\"Error\"`.\n\n## Description\n\nBy default, [`Error`](../Error.mdx) instances are given the name \"Error\". The `name` property, in addition to the [`message`](./message.mdx) property, is used by the [`Error.prototype.toString()`](./toString.mdx) method to create a string representation of the error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Error/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.toString()\n\nThe **`toString()`** method returns a string representing the\nspecified [`Error`](../Error.mdx) object.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified [`Error`](../Error.mdx) object.\n\n## Description\n\nThe [`Error`](../Error.mdx) object overrides the [`Object.prototype.toString()`](../../Object/prototype/toString.mdx)\nmethod inherited by all objects. \n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/EvalError/EvalError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# EvalError\n\nThe **`EvalError()`** constructor creates a new `EvalError` instance.\n\n## Syntax\n\n```js\nnew EvalError()\nnew EvalError(message)\nnew EvalError(message, options)\nnew EvalError(message, fileName)\nnew EvalError(message, fileName, lineNumber)\n\nEvalError()\nEvalError(message)\nEvalError(message, options)\nEvalError(message, fileName)\nEvalError(message, fileName, lineNumber)\n```\n\n> **Note:** `EvalError()` can be called with or without `new`. Both create a new `EvalError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/FetchEvent/FetchEvent.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent\n\nThis is the event type for `fetch` events. It contains information about the fetch, including the request and how the receiver will treat the response. \nIt provides the [`event.respondWith()`](./prototype/respondWith.mdx) method, which allows us to provide a response to this fetch.\n\n## Instance properties\n\n- `FetchEvent.request` _**readonly**_\n    - : The `Request` that was received by the application.\n- `FetchEvent.client` _**readonly**_\n    - : Information about the downstream client that made the request.\n        While these fields are always defined on Compute, they may be *null* when not available in testing environments\n        such as Viceroy.\n    - `FetchEvent.client.address` _**readonly**_\n        - : A string representation of the IPv4 or IPv6 address of the downstream client.\n    - `FetchEvent.client.geo` _**readonly**_\n        - : Either `null`, or a [geolocation dictionary](../../fastly:geolocation/getGeolocationForIpAddress.mdx) corresponding to the IP address of the downstream client.\n    - `FetchEvent.client.tlsJA3MD5` _**readonly**_\n        - : Either `null` or a string representation of the JA3 hash of the TLS ClientHello message.\n    - `FetchEvent.client.tlsCipherOpensslName` _**readonly**_\n        - : Either `null` or a string representation of the cipher suite used to secure the client TLS connection.\n    - `FetchEvent.client.tlsProtocol` _**readonly**_\n        - : Either `null` or a string representation of the TLS protocol version used to secure the client TLS connection.\n    - `FetchEvent.client.tlsClientCertificate` _**readonly**_\n        - : Either `null` or an ArrayBuffer containing the raw client certificate in the mutual TLS handshake message. It is in PEM format. Returns an empty ArrayBuffer if this is not mTLS or available.\n    - `FetchEvent.client.tlsClientHello` _**readonly**_\n        - : Either `null` or an ArrayBuffer containing the raw bytes sent by the client in the TLS ClientHello message.\n    - `FetchEvent.client.tlsJA4` _**readonly**_\n        - : Either `null` or a string representation of the JA4 fingerprint of the TLS ClientHello message.\n    - `FetchEvent.client.h2Fingerprint` _**readonly**_\n        - : Either `null` or a string representation of the HTTP/2 fingerprint for HTTP/2 connections. Returns `null` for HTTP/1.1 connections.\n    - `FetchEvent.client.ohFingerprint` _**readonly**_\n        - : Either `null` or a string representation of the Original Header fingerprint based on the order and presence of request headers.\n- `FetchEvent.server` _**readonly**_\n    - : Information about the server receiving the request for the Fastly Compute service.\n    - `FetchEvent.server.address` _**readonly**_\n        - : A string representation of the IPv4 or IPv6 address of the server which received the request.\n\n## Instance methods\n\n- [`FetchEvent.respondWith()`](./prototype/respondWith.mdx)\n    - : Provide (a promise for) a response for this request.\n- [`FetchEvent.sendEarlyHints()`](./prototype/sendEarlyHints.mdx)\n    - : Send a [103 Early Hints](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/103) response for this request.\n- [`FetchEvent.waitUntil()`](./prototype/waitUntil.mdx)\n    - : Extends the lifetime of the event. Used to notify the host environment of tasks that extend beyond the returning of a response, such as streaming and caching.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/FetchEvent/prototype/respondWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent.respondWith()\n\nThe **`respondWith()`** method allows you to provide a promise for a [`Response`](../../Response/Response.mdx) to send back to the client which made the incoming request to your application.\n\n## Syntax\n\n```js\nrespondWith(response)\n```\n\n### Parameters\n\n- `response`\n  - : A [`Response`](../../Response/Response.mdx) or a [`Promise`](../../Promise/Promise.mdx) that resolves to a\n    [`Response`](../../Response/Response.mdx). Otherwise, a network error is returned to Fetch.\n\n### Return value\n\nAlways returns `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/FetchEvent/prototype/sendEarlyHints.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent.sendEarlyHints()\n\nThe **`sendEarlyHints()`** method allows you to send a [103 Early Hints](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/103) response back to the client which made the incoming request to your application.\n\n## Syntax\n\n```js\nsendEarlyHints(headers)\n```\n\n### Parameters\n\n- `headers`\n  - : Any headers you want to add to your response, contained\n        within a [`Headers`](../../Headers/Headers.mdx) object or object literal of\n        [`String`](../../String/String.mdx) key/value pairs.\n\n### Return value\n\nAlways returns `undefined`.\n\n### Examples\n\n```js\nevent.sendEarlyHints({ link: '</style.css>; rel=preload; as=style' });\n\nevent.sendEarlyHints([\n        ['link', '</style.css>; rel=preload; as=style'],\n        ['link', '</style2.css>; rel=preload; as=style']\n    ]);\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/FetchEvent/prototype/waitUntil.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent.waitUntil()\n\n\nThe **`waitUntil()`** method tells the host environment that work is ongoing until the promise settles, and it shouldn't terminate\nthe application if it wants that work to complete.\n\nThe `waitUntil()` method must be initially called synchronously within the event callback,\nbut after that it can be called multiple times, and will hold the process open until all the promises passed to it\nsettle.\n\n## Syntax\n\n```js\nwaitUntil(promise)\n```\n\n### Parameters\n\nA [`Promise`](../../Promise/Promise.mdx).\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/FinalizationRegistry/FinalizationRegistry.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FinalizationRegistry()\n\nThe **`FinalizationRegistry`** constructor creates a `FinalizationRegistry` object that uses the given callback.\n\n## Syntax\n\n```js\n// Arrow callback function\nnew FinalizationRegistry((heldValue) => { /* … */ })\n\n// Callback function\nnew FinalizationRegistry(callbackFn)\n\n// Inline callback function\nnew FinalizationRegistry(function(heldValue) { /* … */ })\n```\n\n> **Note:** `FinalizationRegistry()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `callback`\n  - : The callback function this registry should use.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/FinalizationRegistry/prototype/register.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FinalizationRegistry.prototype.register()\n\nThe `register()` method registers an object with a\n`FinalizationRegistry` instance so that if the object is garbage-collected,\nthe registry's callback may get called.\n\n## Syntax\n\n```js\nregister(target, heldValue)\nregister(target, heldValue, unregisterToken)\n```\n\n### Parameters\n\n- `target`\n  - : The target object to register.\n- `heldValue`\n  - : The value to pass to the finalizer for this object. This cannot be the `target` object but can be anything else, including functions and primitives.\n- `unregisterToken` _**optional**_\n  - : A token that may be used with the `unregister` method later to unregister\n    the target object. If provided (and not `undefined`), this must be an\n    object. If not provided, the target cannot be unregistered.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown when one of the following condition is met:\n    - `target` is not an object (object as opposed to primitives; functions are objects as well)\n    - `target` is the same as `heldvalue` (`target === heldValue`)\n    - `unregisterToken` is not an object\n\n## Description\n\nSee the [Avoid where possible](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry#avoid_where_possible)\nand [Notes on cleanup callbacks](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry#notes_on_cleanup_callbacks)\nsections of the `FinalizationRegistry` page for important caveats.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/FinalizationRegistry/prototype/unregister.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FinalizationRegistry.prototype.unregister()\n\nThe `unregister()` method unregisters a target object from a\n`FinalizationRegistry` instance.\n\n## Syntax\n\n```js\nunregister(unregisterToken)\n```\n\n### Parameters\n\n- `unregisterToken`\n  - : The token used with the [`FinalizationRegistry.prototype.register`](./register.mdx) method when registering the target object. Multiple cells registered with the same `unregisterToken` will be unregistered together.\n\n### Return value\n\nA boolean value that is `true` if at least one cell was unregistered and `false` if no cell was unregistered.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown when `unregisterToken` is not an object.\n\n## Description\n\nWhen a target object has been reclaimed, it is no longer registered in the registry.\nThere is no need to call `unregister` in your cleanup callback. Only call\n`unregister` if you haven't received a cleanup callback and no longer need\nto receive one.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Float32Array/Float32Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Float32Array()\n\nThe **`Float32Array()`** typed array constructor creates a new\n`Float32Array` object, which is, an array of 32-bit floating point numbers\n(corresponding to the C `float` data type) in the platform byte order. If\ncontrol over byte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are\ninitialized to `0`. Once established, you can reference elements in the array\nusing the object's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Float32Array()\nnew Float32Array(length)\nnew Float32Array(typedArray)\nnew Float32Array(object)\n\nnew Float32Array(buffer)\nnew Float32Array(buffer, byteOffset)\nnew Float32Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Float32Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Float64Array/Float64Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Float64Array()\n\nThe **`Float64Array()`** typed array constructor creates a new\n`Float64Array` object, which is, an array of 64-bit floating point numbers\n(corresponding to the C `double` data type) in the platform byte order. If\ncontrol over byte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are\ninitialized to `0`. Once established, you can reference elements in the array\nusing the object's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Float64Array()\nnew Float64Array(length)\nnew Float64Array(typedArray)\nnew Float64Array(object)\n\nnew Float64Array(buffer)\nnew Float64Array(buffer, byteOffset)\nnew Float64Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Float64Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/FormData/FormData.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData()\n\nThe **`FormData()`** constructor creates a new `FormData` object.\n\n## Syntax\n\n```js\nnew FormData()\nnew FormData(form)\n```\n\n> **Note:** `FormData()` can only be constructed with `new`. Attempting to call it without `new` throws a `TypeError`.\n\n### Parameters\n\n- `form` _**optional**_\n  - : An HTML `<form>` element — when specified, the `FormData` object will be populated with the form's current key/value pairs using the name property of each element for the keys and their submitted value for the values. File input elements are handled specially: their values are taken from the files selected by the user in the upload control.\n\n### Return value\n\nA new `FormData` object, pre-populated with form data if the optional `form` parameter was provided.\n\n## Description\n\nThe `FormData` interface provides a way to construct a set of key/value pairs representing form fields and their values, which can be sent using methods such as `fetch()`. It uses the same format a form would use if the encoding type were set to `\"multipart/form-data\"`.\n\nYou can also append additional data to the `FormData` object after it's created using its various methods.\n\nA `FormData` object can be used in a number of ways with other APIs:\n\n1. It can be sent with the `fetch()` API\n2. It works seamlessly with the `Request` and `Response` objects - it can be used directly as the body of a `Request` object\n3. It can be obtained from a `Response` object using the `formData()` method\n4. It can be passed directly to the `URLSearchParams` constructor\n\nThe transmitted data is in the same format that the form's `submit()` method would use to send the data if the form's encoding type were set to `\"multipart/form-data\"`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/FormData/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.append()\n\nThe **`append()`** method of the `FormData` interface appends a new value onto an existing key inside a `FormData` object, or adds the key if it does not already exist.\n\n## Syntax\n\n```js\nappend(name, value)\nappend(name, value, filename)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the field whose data is contained in `value`.\n- `value`\n  - : The value of the field. This can be a string or a `Blob` (including subclasses such as `File`). If none of these, the value is converted to a string.\n- `filename` _**optional**_\n  - : The filename reported to the server when a `Blob` or `File` is passed as the second parameter. The default filename for `Blob` objects is \"blob\". The default filename for `File` objects is the file's filename.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/FormData/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.delete()\n\nThe **`delete()`** method of the `FormData` interface removes all key/value pairs with the given name from the `FormData` object.\n\n## Syntax\n\n```js\ndelete(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the key you want to delete.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/FormData/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.entries()\n\nThe **`entries()`** method of the `FormData` interface returns an iterator allowing iteration through all key/value pairs contained in this object. The iterator yields a new array for each key/value pair, with the first element being the key and the second element being the value.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nAn `iterator`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/FormData/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.forEach()\n\nThe **`forEach()`** method of the `FormData` interface executes the provided callback function once for each key/value pair in the `FormData` object.\n\n## Syntax\n\n```js\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n  - : A function to execute for each entry in the object. The function will be passed the following arguments:\n    - `value`\n      - : The value of the current entry.\n    - `key`\n      - : The key of the current entry.\n    - `formData`\n      - : The `FormData` object being traversed.\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/FormData/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.get()\n\nThe **`get()`** method of the `FormData` interface returns the first value associated with a given key from within a `FormData` object. If you expect multiple values and want all of them, use the [`getAll()`](../../../globals/FormData/prototype/getAll.mdx) method instead.\n\n## Syntax\n\n```js\nget(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the key you want to retrieve.\n\n### Return value\n\nA `FormDataEntryValue` containing the value. If the key does not exist, it returns `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/FormData/prototype/getAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.getAll()\n\nThe **`getAll()`** method of the `FormData` interface returns all the values associated with a given key from within a `FormData` object.\n\n## Syntax\n\n```js\ngetAll(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the key you want to retrieve.\n\n### Return value\n\nAn array of `FormDataEntryValue` items containing all values with the given key. If the key doesn't exist, an empty array is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/FormData/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.has()\n\nThe **`has()`** method of the `FormData` interface returns a boolean indicating whether a `FormData` object contains a key/value pair with the given name.\n\n## Syntax\n\n```js\nhas(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the key you want to test for existence.\n\n### Return value\n\n`true` if a key/value pair with the specified name exists; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/FormData/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.keys()\n\nThe **`keys()`** method of the `FormData` interface returns an iterator allowing iteration through all keys contained in this object. The iterator yields the key for each value.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nAn `iterator`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/FormData/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.set()\n\nThe **`set()`** method of the `FormData` interface sets a new value for an existing key inside a `FormData` object, or adds the key/value if it does not already exist.\n\nThe difference between `set()` and [`append()`](../../../globals/FormData/prototype/append.mdx) is that if the specified key already exists, `set()` overwrites all existing values with the new one, whereas `append()` appends the new value onto the end of the existing values.\n\n## Syntax\n\n```js\nset(name, value)\nset(name, value, filename)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the field whose data is contained in `value`.\n- `value`\n  - : The value of the field. This can be a string or a `Blob` (including subclasses such as `File`). If none of these, the value is converted to a string.\n- `filename` _**optional**_\n  - : The filename reported to the server when a `Blob` or `File` is passed as the second parameter. The default filename for `Blob` objects is \"blob\". The default filename for `File` objects is the file's filename.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/FormData/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.values()\n\nThe **`values()`** method of the `FormData` interface returns an iterator allowing iteration through all values contained in this object. The iterator yields the value for each key/value pair.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nAn `iterator`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Function/Function.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function()\n\nThe **`Function()`** constructor creates a new [`Function`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function) object. Calling the constructor directly can create functions dynamically, but suffers from security and similar (but far less significant) performance issues as `eval()`. However, unlike `eval` (which may have access to the local scope), the `Function` constructor creates functions which execute in the global scope only.\n\n\n\n## Syntax\n\n```js\nnew Function(functionBody)\nnew Function(arg0, functionBody)\nnew Function(arg0, arg1, functionBody)\nnew Function(arg0, arg1, /* … ,*/ argN, functionBody)\n\nFunction(functionBody)\nFunction(arg0, functionBody)\nFunction(arg0, arg1, functionBody)\nFunction(arg0, arg1, /* … ,*/ argN, functionBody)\n```\n\n> **Note:** `Function()` can be called with or without `new`. Both create a new `Function` instance.\n\n### Parameters\n\n- `argN` _**optional**_\n\n  - : Names to be used by the function as formal argument names. Each must be a string that corresponds to a valid JavaScript parameter (any of plain [identifier](https://developer.mozilla.org/docs/Glossary/Identifier), [rest parameter](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/rest_parameters), or [destructured](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment) parameter, optionally with a [default](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/Default_parameters)), or a list of such strings separated with commas.\n\n    As the parameters are parsed in the same way as function expressions, whitespace and comments are accepted. For example: `\"x\", \"theValue = 42\", \"[a, b] /* numbers */\"` — or `\"x, theValue = 42, [a, b] /* numbers */\"`. (`\"x, theValue = 42\", \"[a, b]\"` is also correct, though very confusing to read.)\n\n- `functionBody`\n  - : A string containing the JavaScript statements comprising the function definition.\n\n## Description\n\n`Function` objects created with the `Function` constructor are parsed when the function is created. This is less efficient than creating a function with a [function expression](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/function) or [function declaration](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function) and calling it within your code, because such functions are parsed with the rest of the code.\n\nAll arguments passed to the function, except the last, are treated as the names of the identifiers of the parameters in the function to be created, in the order in which they are passed. The function will be dynamically compiled as a function expression, with the source assembled in the following fashion:\n\n```js\n`function anonymous(${args.join(\",\")}\n) {\n${functionBody}\n}`\n```\n\nThis is observable by calling the function's [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/toString) method.\n\nHowever, unlike normal [function expressions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/function), the name `anonymous` is not added to the `functionBody`'s scope, since `functionBody` only has access the global scope. If `functionBody` is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode) (the body itself needs to have the `\"use strict\"` directive since it doesn't inherit the strictness from the context), you may use [`arguments.callee`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/arguments/callee) to refer to the function itself. Alternatively, you can define the recursive part as an inner function:\n\n```js\nconst recursiveFn = new Function(\"count\", `\n(function recursiveFn(count) {\n  if (count < 0) {\n    return;\n  }\n  console.log(count);\n  recursiveFn(count - 1);\n})(count);\n`);\n```\n\nNote that the two dynamic parts of the assembled source — the parameters list `args.join(\",\")` and `functionBody` — will first be parsed separately to ensure they are each syntactically valid. This prevents injection-like attempts.\n\n```js\nnew Function(\"/*\", \"*/) {\");\n// SyntaxError: Unexpected end of arg string\n// Doesn't become \"function anonymous(/*) {*/) {}\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Function/prototype/apply.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.apply()\n\nThe **`apply()`** method calls the specified function with a given `this` value, and `arguments` provided as an array (or an [array-like object](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects)).\n\n\n\n## Syntax\n\n```js\napply(thisArg)\napply(thisArg, argsArray)\n```\n\n### Parameters\n\n- `thisArg`\n  - : The value of `this` provided for the call to `func`. If the function is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) will be replaced with the global object, and primitive values will be converted to objects.\n- `argsArray` _**optional**_\n  - : An array-like object, specifying the arguments with which `func` should be called, or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../../globals/undefined.mdx) if no arguments should be provided to the function.\n\n### Return value\n\nThe result of calling the function with the specified `this` value and arguments.\n\n## Description\n\n> **Note:** This function is almost identical to [`Function.prototype.call()`](../../../globals/Function/prototype/call.mdx), except that `call()` accepts an **argument list**, while `apply()` accepts a **single array of arguments** — for example, `func.apply(this, ['eat', 'bananas'])` vs. `func.call(this, 'eat', 'bananas')`.\n\nNormally, when calling a function, the value of [`this`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this) inside the function is the object that the function was accessed on. With `apply()`, you can assign an arbitrary value as `this` when calling an existing function, without first attaching the function to the object as a property. This allows you to use methods of one object as generic utility functions.\n\n> **Warning:** Do not use `apply()` to chain constructors (for example, to implement inheritance). This invokes the constructor function as a plain function, which means [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target) is `undefined`, and classes throw an error because they can't be called without `new`. Use [`Reflect.construct()`](../../../globals/Reflect/construct.mdx) or [`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Function/prototype/bind.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.bind()\n\nThe **`bind()`** method creates a new function that, when called, has its `this` keyword set to the provided value, with a given sequence of arguments preceding any provided when the new function is called.\n\n\n\n## Syntax\n\n```js\nbind(thisArg)\nbind(thisArg, arg1)\nbind(thisArg, arg1, arg2)\nbind(thisArg, arg1, arg2, /* …, */ argN)\n```\n\n### Parameters\n\n- `thisArg`\n  - : The value to be passed as the `this` parameter to the target function `func` when the bound function is called. If the function is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) will be replaced with the global object, and primitive values will be converted to objects. The value is ignored if the bound function is constructed using the `new` operator.\n- `arg1, …, argN` _**optional**_\n  - : Arguments to prepend to arguments provided to the bound function when invoking `func`.\n\n### Return value\n\nA copy of the given function with the specified `this` value, and initial arguments (if provided).\n\n## Description\n\nThe `bind()` function creates a new _bound function_. Calling the bound function generally results in the execution of the function it wraps, which is also called the _target function_. The bound function will store the parameters passed — which include the value of `this` and the first few arguments — as its internal state. These values are stored in advance, instead of being passed at call time. You can generally see `const boundFn = fn.bind(thisArg, arg1, arg2)` as being equivalent to `const boundFn = (...restArgs) => fn.call(thisArg, arg1, arg2, ...restArgs)` for the effect when it's called (but not when `boundFn` is constructed).\n\nA bound function can be further bound by calling `boundFn.bind(thisArg, /* more args */)`, which creates another bound function `boundFn2`. The newly bound `thisArg` value is ignored, because the target function of `boundFn2`, which is `boundFn`, already has a bound `this`. When `boundFn2` is called, it would call `boundFn`, which in turn calls `fn`. The arguments that `fn` ultimately receives are, in order: the arguments bound by `boundFn`, arguments bound by `boundFn2`, and the arguments received by `boundFn2`.\n\n```js\n\"use strict\"; // prevent `this` from being boxed into the wrapper object\n\nfunction log(...args) {\n  console.log(this, ...args);\n}\nconst boundLog = log.bind(\"this value\", 1, 2);\nconst boundLog2 = boundLog.bind(\"new this value\", 3, 4);\nboundLog2(5, 6); // \"this value\", 1, 2, 3, 4, 5, 6\n```\n\nA bound function may also be constructed using the `new` operator if its target function is constructable. Doing so acts as though the target function had instead been constructed. The prepended arguments are provided to the target function as usual, while the provided `this` value is ignored (because construction prepares its own `this`, as seen by the parameters of [`Reflect.construct`](../../../globals/Reflect/construct.mdx)). If the bound function is directly constructed, [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target) will be the target function instead. (That is, the bound function is transparent to `new.target`.)\n\n```js\nclass Base {\n  constructor(...args) {\n    console.log(new.target === Base);\n    console.log(args);\n  }\n}\n\nconst BoundBase = Base.bind(null, 1, 2);\n\nnew BoundBase(3, 4); // true, [1, 2, 3, 4]\n```\n\nHowever, because a bound function does not have the [`prototype`](../../../globals/Function/prototype/) property, it cannot be used as a base class for [`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends).\n\n```js example-bad\nclass Derived extends class {}.bind(null) {}\n// TypeError: Class extends value does not have valid prototype property undefined\n```\n\nWhen using a bound function as the right-hand side of [`instanceof`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/instanceof), `instanceof` would reach for the target function (which is stored internally in the bound function) and read its `prototype` instead.\n\n```js\nclass Base {}\nconst BoundBase = Base.bind(null, 1, 2);\nconsole.log(new Base() instanceof BoundBase); // true\n```\n\nThe bound function has the following properties:\n\n- [`length`](../../../globals/Function/prototype/length.mdx)\n  - : The `length` of the target function minus the number of arguments being bound (not counting the `thisArg` parameter), with 0 being the minimum value.\n- [`name`](../../../globals/Function/prototype/name.mdx)\n  - : The `name` of the target function plus a `\"bound \"` prefix.\n\nThe bound function also inherits the [prototype chain](https://developer.mozilla.org/docs/Web/JavaScript/Inheritance_and_the_prototype_chain) of the target function. However, it doesn't have other own properties of the target function (such as [static properties](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/static) if the target function is a class).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Function/prototype/call.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.call()\n\nThe **`call()`** method calls the function with a given `this` value and arguments provided individually.\n\n## Syntax\n\n```js\ncall(thisArg)\ncall(thisArg, arg1)\ncall(thisArg, arg1, /* …, */ argN)\n```\n\n### Parameters\n\n- `thisArg`\n  - : The value to use as `this` when calling `func`. If the function is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) will be replaced with the global object, and primitive values will be converted to objects.\n- `arg1, …, argN` _**optional**_\n  - : Arguments for the function.\n\n### Return value\n\nThe result of calling the function with the specified `this` value and arguments.\n\n## Description\n\n> **Note:** This function is almost identical to [`Function.prototype.apply()`](../../../globals/Function/prototype/apply.mdx), except that `call()` accepts an **argument list**, while `apply()` accepts a **single array of arguments** — for example, `func.apply(this, ['eat', 'bananas'])` vs. `func.call(this, 'eat', 'bananas')`.\n\nNormally, when calling a function, the value of [`this`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this) inside the function is the object that the function was accessed on. With `call()`, you can assign an arbitrary value as `this` when calling an existing function, without first attaching the function to the object as a property. This allows you to use methods of one object as generic utility functions.\n\n> **Warning:** Do not use `call()` to chain constructors (for example, to implement inheritance). This invokes the constructor function as a plain function, which means [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target) is `undefined`, and classes throw an error because they can't be called without `new`. Use [`Reflect.construct()`](../../../globals/Reflect/construct.mdx) or [`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Function/prototype/index.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.prototype\n\nThe **`prototype`** data property of a `Function` instance is used when the function is used as a constructor with the `new` operator. It will become the new object's prototype.\n\n> **Note:** Not all `Function` objects have the `prototype` property — see [description](#description).\n\n## Value\n\nAn object.\n\n> **Note:** The `prototype` property of [classes](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes) is not writable.\n\n## Description\n\nWhen a function is called with `new`, the constructor's `prototype` property will become the resulting object's prototype.\n\n```js\nfunction Ctor() {}\nconst inst = new Ctor();\nconsole.log(Object.getPrototypeOf(inst) === Ctor.prototype); // true\n```\n\nYou can read [Inheritance and the prototype chain](https://developer.mozilla.org/docs/Web/JavaScript/Inheritance_and_the_prototype_chain#constructors) for more information about the interactions between a constructor function's `prototype` property and the resulting object's prototype.\n\nA function having a `prototype` property is not sufficient for it to be eligible as a constructor. [Generator functions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function*) have a `prototype` property, but cannot be called with `new`:\n\n```js\nasync function* asyncGeneratorFunction() {}\nfunction* generatorFunction() {}\n```\n\nInstead, generator functions' `prototype` property is used when they are called _without_ `new`. The `prototype` property will become the returned [`Generator`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Generator) object's prototype.\n\nIn addition, some functions may have a `prototype` but throw unconditionally when called with `new`. For example, the [`Symbol()`](../../../globals/Symbol/Symbol.mdx) and [`BigInt`](../../../globals/BigInt/BigInt.mdx) functions throw when called with `new`, because `Symbol.prototype` and `BigInt.prototype` are only intended to provide methods for the primitive values, but the wrapper objects should not be directly constructed.\n\nThe following functions do not have `prototype`, and are therefore ineligible as constructors, even if a `prototype` property is later manually assigned:\n\n```js\nconst method = { foo() {} }.foo;\nconst arrowFunction = () => {};\nasync function asyncFunction() {}\n```\n\nThe following are valid constructors that have `prototype`:\n\n```js\nclass Class {}\nfunction fn() {}\n```\n\nA [bound function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/bind) does not have a `prototype` property, but may be constructable. When it's constructed, the target function is constructed instead, and if the target function is constructable, it would return a normal instance.\n\n```js\nconst boundFunction = function () {}.bind(null);\n```\n\nA function's `prototype` property, by default, is a plain object with one property: (`constructor`)[../../../globals/Object/prototype/constructor.mdx), which is a reference to the function itself. The `constructor` property is writable, non-enumerable, and configurable.\n\nIf the `prototype` of a function is reassigned with something other than an `Object`, when the function is called with `new`, the returned object's prototype would be `Object.prototype` instead. (In other words, `new` ignores the `prototype` property and constructs a plain object.)\n\n```js\nfunction Ctor() {}\nCtor.prototype = 3;\nconsole.log(Object.getPrototypeOf(new Ctor()) === Object.prototype); // true\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Function/prototype/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.length\n\nThe **`length`** data property of a `Function` instance indicates the number of parameters expected by the function.\n\n## Value\n\nA number.\n\n## Description\n\nA `Function` object's `length` property indicates how many arguments the function expects, i.e. the number of formal parameters. \n\nThe `Function` constructor is itself a `Function` object. Its `length` data property has a value of `1`.\n\nDue to historical reasons, `Function.prototype` is a callable itself. The `length` property of `Function.prototype` has a value of `0`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Function/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.name\n\nThe **`name`** property of a `Function` instance indicates the function's name as specified when it was created, or it may be either `anonymous` or `''` (an empty string) for functions created anonymously.\n\n## Value\n\nA string.\n\n> **Note:** In non-standard, pre-ES2015 implementations the `configurable` attribute was `false` as well.\n\n## Description\n\nThe function's `name` property can be used to identify the function in debugging tools or error messages. It has no semantic significance to the language itself.\n\nThe `name` property is read-only and cannot be changed by the assignment operator:\n\n```js\nfunction someFunction() {}\n\nsomeFunction.name = 'otherFunction';\nconsole.log(someFunction.name); // someFunction\n```\n\nTo change it, use [`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx).\n\nThe `name` property is typically inferred from how the function is defined. In the following sections, we will describe the various ways in which it can be inferred.\n\n### Function declaration\n\nThe `name` property returns the name of a function declaration.\n\n```js\nfunction doSomething() {}\ndoSomething.name; // \"doSomething\"\n```\n\n### Default-exported function declaration\n\nAn [`export default`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/export) declaration exports the function as a declaration instead of an expression. If the declaration is anonymous, the name is `\"default\"`.\n\n```js\n// -- someModule.js --\nexport default function () {};\n\n// -- main.js --\nimport someModule from \"./someModule.js\";\n\nsomeModule.name; // \"default\"\n```\n\n### Function constructor\n\nFunctions created with the [`Function()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/Function) constructor have name \"anonymous\".\n\n```js\nnew Function().name; // \"anonymous\"\n```\n\n### Function expression\n\nIf the function expression is named, that name is used as the `name` property.\n\n```js\nconst someFunction = function someFunctionName() {};\nsomeFunction.name; // \"someFunctionName\"\n```\n\nAnonymous function expressions created using the keyword `function` or arrow functions would have `\"\"` (an empty string) as their name.\n\n```js\n(function () {}).name; // \"\"\n(() => {}).name; // \"\"\n```\n\nHowever, such cases are rare — usually, in order to refer to the expression elsewhere, the function expression is attached to an identifier when it's created (such as in a variable declaration). In such cases, the name can be inferred, as the following few subsections demonstrate.\n\nOne practical case where the name cannot be inferred is a function returned from another function:\n\n```js\nfunction getFoo() {\n  return () => {};\n}\ngetFoo().name; // \"\"\n```\n\n### Variable declaration and method\n\nVariables and methods can infer the name of an anonymous function from its syntactic position.\n\n```js\nconst f = function () {};\nconst object = {\n  someMethod: function () {}\n};\n\nconsole.log(f.name); // \"f\"\nconsole.log(object.someMethod.name); // \"someMethod\"\n```\n\nThe same applies to assignment:\n\n```js\nlet f;\nf = () => {};\nf.name; // \"f\"\n```\n\n### Initializer and default value\n\nFunctions in initializers (default values) of [destructuring](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#default_value), [default parameters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/Default_parameters), [class fields](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/Public_class_fields), etc., will inherit the name of the bound identifier as their `name`.\n\n```js\nconst [f = () => {}] = [];\nf.name; // \"f\"\n\nconst { someMethod: m = () => {} } = {};\nm.name; // \"m\"\n\nfunction foo(f = () => {}) {\n  console.log(f.name);\n}\nfoo(); // \"f\"\n\nclass Foo {\n  static someMethod = () => {};\n}\nFoo.someMethod.name; // someMethod\n```\n\n### Shorthand method\n\n```js\nconst o = {\n  foo() {},\n};\no.foo.name; // \"foo\";\n```\n\n### Bound function\n\n[`Function.prototype.bind()`](../../../globals/Function/prototype/bind.mdx) produces a function whose name is \"bound \" plus the function name.\n\n```js\nfunction foo() {};\nfoo.bind({}).name; // \"bound foo\"\n```\n\n### Getter and setter\n\nWhen using [`get`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/get) and [`set`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/set) accessor properties, \"get\" or \"set\" will appear in the function name.\n\n```js\nconst o = {\n  get foo() {},\n  set foo(x) {},\n};\n\nconst descriptor = Object.getOwnPropertyDescriptor(o, \"foo\");\ndescriptor.get.name; // \"get foo\"\ndescriptor.set.name; // \"set foo\";\n```\n\n### Class\n\nA class's name follows the same algorithm as function declarations and expressions.\n\n```js\nclass Foo {}\nFoo.name; // \"Foo\"\n```\n\n> **Warning:** JavaScript will set the function's `name` property only if a function does not have an own property called `name`. However, classes' [static members](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/static) will be set as own properties of the class constructor function, and thus prevent the built-in `name` from being applied. See [telling the constructor name of an object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name#telling_the_constructor_name_of_an_object) for more details.\n\n### Symbol as function name\n\nIf a `Symbol` is used a function name and the symbol has a description, the method's name is the description in square brackets.\n\n```js\nconst sym1 = Symbol(\"foo\");\nconst sym2 = Symbol();\n\nconst o = {\n  [sym1]() {},\n  [sym2]() {},\n};\n\no[sym1].name; // \"[foo]\"\no[sym2].name; // \"[]\"\n```\n\n### Private property\n\nPrivate fields and private methods have the hash (`#`) as part of their names.\n\n```js\nclass Foo {\n  #field = () => {};\n  #method() {}\n  getNames() {\n    console.log(this.#field.name);\n    console.log(this.#method.name);\n  }\n}\n\nnew Foo().getNames();\n// \"#field\"\n// \"#method\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Function/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.toString()\n\nThe **`toString()`** method returns a string representing the source code of the specified `Function`.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the source code of the function.\n\n## Description\n\nThe `Function` object overrides the `toString()` method\ninherited from `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For user-defined `Function`\nobjects, the `toString` method returns a string containing the source text\nsegment which was used to define the function.\n\nJavaScript calls the `toString` method automatically when a\n`Function` is to be represented as a text value, e.g. when a function is\nconcatenated with a string.\n\nThe `toString()` method will throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) exception\n(\"Function.prototype.toString called on incompatible object\"), if its\n`this` value object is not a `Function` object.\n\n```js example-bad\nFunction.prototype.toString.call('foo'); // throws TypeError\n```\n\nIf the `toString()` method is called on built-in function objects, a\nfunction created by [`Function.prototype.bind()`](../../../globals/Function/prototype/bind.mdx), or\nother non-JavaScript functions, then `toString()` returns a\n_native function string_ which looks like\n\n```js\n\"function someName() { [native code] }\"\n```\n\nFor intrinsic object methods and functions, `someName` is the initial name of the function; otherwise its content may be implementation-defined, but will always be in property name syntax, like `[1 + 1]`, `someName`, or `1`.\n\n> **Note:** This means using [`eval()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/eval) on native function strings is a guaranteed syntax error.\n\nIf the `toString()` method is called on a function created by the `Function` constructor, `toString()` returns the source code of a synthesized function declaration named \"anonymous\" using the provided parameters and function body. For example, `Function(\"a\", \"b\", \"return a + b\").toString()` will return:\n\n```js\n\"function anonymous(a,b\\n) {\\nreturn a + b\\n}\"\n```\n\nSince ES2018, the spec requires the return value of `toString()` to be the exact same source code as it was declared, including any whitespace and/or comments — or, if the host doesn't have the source code available for some reason, requires returning a native function string. Support for this revised behavior can be found in the [browser compatibility table](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/toString#browser_compatibility).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Headers/Headers.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers()\n\nThe **`Headers()`** constructor creates a new `Headers` object.\n\n## Syntax\n\n```js\nnew Headers()\nnew Headers(init)\n```\n\n### Parameters\n\n- `init` _**optional**_\n  - : An object containing any HTTP headers that you want to pre-populate your `Headers` object with. This can be a\n    simple object literal with `String` values, an array of name-value pairs, where each pair is a 2-element string array; or an existing\n    `Headers` object. In the last case, the new `Headers` object\n    copies its data from the existing `Headers` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Headers/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.append()\n\nThe **`append()`** method of the `Headers`\ninterface appends a new value onto an existing header inside a `Headers`\nobject, or adds the header if it does not already exist.\n\nThe difference between `Headers.prototype.set()` and `append()` is\nthat if the specified header already exists and accepts multiple values,\n`set()` will overwrite the existing value with the new one, whereas\n`append()` will append the new value onto the end of the set of values.\n\n## Syntax\n\n```js\nappend(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to add to the `Headers` object.\n- `value`\n  - : The value of the HTTP header you want to add.\n\n### Return value\n\nNone (`undefined`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Headers/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.delete()\n\nThe **`delete()`** method of the `Headers`\ninterface deletes a header from the current `Headers` object.\n\nThis method throws a `TypeError` for the following reasons:\n\n- The value of the name parameter is not the name of an HTTP header.\n\n## Syntax\n\n```js\ndelete(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to delete from the `Headers` object.\n\n### Return value\n\nNone (`undefined`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Headers/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.entries()\n\nThe **`Headers.entries()`** method returns an iterator allowing to go through all key/value pairs\ncontained in this object. The both the key and value of each pairs are `String` objects.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Headers/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.forEach()\n\nThe **`Headers.forEach()`** method executes a callback function once per each key/value pair in the `Headers` object.\n\n## Syntax\n\n```js\n// Arrow function\nforEach((value, key) => { /* … */ })\nforEach((value, key, object) => { /* … */ })\n\n// Inline callback function\nforEach(function (value, key) { /* … */ })\nforEach(function (value, key, object) { /* … */ })\nforEach(function (value, key) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n  - : Function to execute for each entry in the map. It takes the following arguments:\n    - `value`\n      - : Value of the currently visited header entry.\n    - `key`\n      - : Name of the currently visited header entry.\n    - `object`\n      - : The Headers object being iterated.\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `callback`.\n\n### Return value\n\n`undefined`.\n\n## Description\n\nThe `Headers.forEach()` method executes the provided callback once for each key of the Headers which actually exist. It is not invoked for keys which have been deleted. However, it is executed for keys which are present but have the value undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Headers/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.get()\n\nThe **`get()`** method of the [`Headers`](../../../globals/Headers/Headers.mdx) interface\nreturns a byte string of all the values of a header within a `Headers` object\nwith a given name. If the requested header doesn't exist in the `Headers`\nobject, it returns `null`.\n\n## Syntax\n\n```js\nget(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header whose values you want to retrieve from the\n    `Headers` object. If the given name is not the name of an HTTP header, this\n    method throws a `TypeError`. The name is case-insensitive.\n\n### Return value\n\nA [`String`](../../../globals/String/String.mdx) sequence representing the values of the retrieved header or\n`null` if this header is not set.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Headers/prototype/getSetCookie.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.getSetCookie()\n\nThe **`getSetCookie()`** method of the [`Headers`](../../../globals/Headers/Headers.mdx) interface\nreturns an array of all the values of the `Set-Cookie` headers, returning\nan empty list if none are present.\n\n## Syntax\n\n```js\ngetSetCookie()\n```\n\n### Return value\n\n`String[]` representing the list of `Set-Cookie` headers.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Headers/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.has()\n\nThe **`has()`** method of the `Headers` interface\nreturns a boolean stating whether a `Headers` object contains a certain\nheader.\n\n## Syntax\n\n```js\nhas(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to test for. If the given name is not a valid\n    HTTP header name, this method throws a `TypeError`.\n\n### Return value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Headers/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.keys()\n\nThe **`Headers.keys()`** method returns an iterator allowing to go through all keys contained\nin this object. The keys are `String` objects.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Headers/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.set()\n\nThe **`set()`** method of the `Headers` interface\nsets a new value for an existing header inside a `Headers` object, or adds\nthe header if it does not already exist.\n\nThe difference between `set()` and `Headers.append` is that if\nthe specified header already exists and accepts multiple values, `set()`\noverwrites the existing value with the new one, whereas `Headers.append`\nappends the new value to the end of the set of values.\n\n## Syntax\n\n```js\nset(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to set to a new value. If the given name is not\n    the name of an HTTP header, this method throws a `TypeError`.\n- `value`\n  - : The new value you want to set.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Headers/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.values()\n\nThe **`Headers.values()`** method returns an iterator allowing to go through all values contained\nin this object. The values are `String` objects.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/HmacImportParams/HmacImportParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# HmacImportParams\n\nThe **`HmacImportParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.importKey`, when generating a key for the `HMAC` algorithm.\n\n## Instance properties\n\n- `name`\n  - : A string. This should be set to `HMAC`.\n- `hash`\n\n  - : A string representing the name of the digest function to use. The can take a value of `SHA-1`, `SHA-256`, `SHA-384`, or `SHA-512`.\n\n- `length` _optional_\n  - : A `Number` representing the length in bits of the key. If this is omitted the length of the key is equal to the length of the digest generated by the digest function you have chosen. Unless you have a good reason to use a different length, omit this property and use the default.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Infinity.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Infinity\n\nThe global property **`Infinity`** is a numeric value representing infinity.\n\n## Value\n\nThe same number value as `Number.POSITIVE_INFINITY`.\n\n## Description\n\n`Infinity` is a property of the _global object_. In other words, it is a variable in global scope.\n\nThe value `Infinity` (positive infinity) is greater than any other number.\n\nThis value behaves slightly differently than mathematical infinity; see `Number.POSITIVE_INFINITY` for details.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Int16Array/Int16Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Int16Array()\n\nThe **`Int16Array()`** typed array constructor creates an array\nof twos-complement 16-bit signed integers in the platform byte order. If control over\nbyte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are initialized\nto `0`. Once established, you can reference elements in the array using the\nobject's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Int16Array()\nnew Int16Array(length)\nnew Int16Array(typedArray)\nnew Int16Array(object)\n\nnew Int16Array(buffer)\nnew Int16Array(buffer, byteOffset)\nnew Int16Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Int16Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Int32Array/Int32Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Int32Array()\n\nThe **`Int32Array()`** typed array constructor creates an array\nof twos-complement 32-bit signed integers in the platform byte order. If control over\nbyte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are initialized\nto `0`. Once established, you can reference elements in the array using the\nobject's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Int32Array()\nnew Int32Array(length)\nnew Int32Array(typedArray)\nnew Int32Array(object)\n\nnew Int32Array(buffer)\nnew Int32Array(buffer, byteOffset)\nnew Int32Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Int32Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Int8Array/Int8Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Int8Array()\n\nThe **`Int8Array()`** constructor creates a typed array of\ntwos-complement 8-bit signed integers. The contents are initialized to `0`.\nOnce established, you can reference elements in the array using the object's methods, or\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew Int8Array()\nnew Int8Array(length)\nnew Int8Array(typedArray)\nnew Int8Array(object)\n\nnew Int8Array(buffer)\nnew Int8Array(buffer, byteOffset)\nnew Int8Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Int8Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/JSON/parse.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# JSON.parse()\n\nThe **`JSON.parse()`** method parses a JSON string, constructing the JavaScript value or object described by the string. An optional _reviver_ function can be provided to perform a transformation on the resulting object before it is returned.\n\n## Syntax\n\n```js\nJSON.parse(text)\nJSON.parse(text, reviver)\n```\n\n### Parameters\n\n- `text`\n  - : The string to parse as JSON.\n- `reviver` _**optional**_\n  - : If a function, this prescribes how each value originally produced by parsing is transformed before being returned. Non-callable values are ignored. The function is called with the following arguments:\n    - `key`\n      - : The key associated with the value.\n    - `value`\n      - : The value produced by parsing.\n\n### Return value\n\nThe `Object`, `Array`, string, number, boolean, or `null` value corresponding to the given JSON `text`.\n\n### Exceptions\n\n- [`SyntaxError`](../../globals/SyntaxError/SyntaxError.mdx)\n  - : Thrown if the string to parse is not valid JSON.\n\n## Description\n\n`JSON.parse()` parses a JSON string according to the [JSON grammar](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/JSON#full_json_grammar), then evaluates the string as if it's a JavaScript expression. The only instance where a piece of JSON text represents a different value from the same JavaScript expression is when dealing with the `\"__proto__\"` key — see [Object literal syntax vs. JSON](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Object_initializer#object_literal_syntax_vs._json).\n\n### The reviver parameter\n\nIf a `reviver` is specified, the value computed by parsing is _transformed_ before being returned. Specifically, the computed value and all its properties (in a [depth-first](https://en.wikipedia.org/wiki/Depth-first_search) fashion, beginning with the most nested properties and proceeding to the original value itself) are individually run through the `reviver`.\n\nThe `reviver` is called with the object containing the property being processed as `this`, and two arguments: `key` and `value`, representing the property name as a string (even for arrays) and the property value. If the `reviver` function returns [`undefined`](../../globals/undefined.mdx) (or returns no value — for example, if execution falls off the end of the function), the property is deleted from the object. Otherwise, the property is redefined to be the return value. If the `reviver` only transforms some values and not others, be certain to return all untransformed values as-is — otherwise, they will be deleted from the resulting object.\n\nSimilar to the `replacer` parameter of [`JSON.stringify()`](../../globals/JSON/stringify.mdx), `reviver` will be last called on the root object with an empty string as the `key` and the root object as the `value`. For JSON text parsing to primitive values, `reviver` will be called once.\n\nNote that `reviver` is run after the value is parsed. So, for example, numbers in JSON text will have already been converted to JavaScript numbers, and may lose precision in the process. To transfer large numbers without loss of precision, serialize them as strings, and revive them to [BigInts](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/BigInt), or other appropriate arbitrary precision formats.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/JSON/stringify.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# JSON.stringify()\n\nThe **`JSON.stringify()`** method converts a JavaScript value to a JSON string, optionally replacing values if a replacer function is specified or optionally including only the specified properties if a replacer array is specified.\n\n## Syntax\n\n```js\nJSON.stringify(value)\nJSON.stringify(value, replacer)\nJSON.stringify(value, replacer, space)\n```\n\n### Parameters\n\n- `value`\n  - : The value to convert to a JSON string.\n- `replacer` _**optional**_\n  - : A function that alters the behavior of the stringification process, or an array of strings or numbers naming properties of `value` that should be included in the output. If `replacer` is an array, all elements that are not strings or numbers (can be either primitives or wrapper objects), including `Symbol` values, are completely ignored. If `replacer` is anything other than a function or an array (e.g. [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or not provided), all properties of the object are included in the resulting JSON string.\n- `space` _**optional**_\n\n  - : A string or number that's used to insert white space (including indentation, line break characters, etc.) into the output JSON string for readability purposes.\n\n    If this is a number, it indicates the number of space characters to be used as indentation, clamped to 10 (that is, any number greater than `10` is treated as if it were `10`). Values less than 1 indicate that no space should be used.\n\n    If this is a string, the string (or the first 10 characters of the string, if it's longer than that) is inserted before every nested object or array.\n\n    If `space` is anything other than a string or number (can be either a primitive or a wrapper object) — for example, is [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or not provided — no white space is used.\n\n### Return value\n\nA JSON string representing the given value, or undefined.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if one of the following is true:\n    - `value` contains a circular reference.\n    - A `BigInt` value is encountered.\n\n## Description\n\n`JSON.stringify()` converts a value to JSON notation representing it:\n\n- `Boolean`, `Number`, `String`, and `BigInt` (obtainable via [`Object()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/Object)) objects are converted to the corresponding primitive values during stringification, in accordance with the traditional conversion semantics. `Symbol` objects (obtainable via [`Object()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/Object)) are treated as plain objects.\n- Attempting to serialize `BigInt` values will throw. However, if the BigInt has a `toJSON()` method (through monkeypatching: `BigInt.prototype.toJSON = ...`), that method can provide the serialization result. This constraint ensures that a proper serialization (and, very likely, its accompanying deserialization) behavior is always explicitly provided by the user.\n- [`undefined`](../../globals/undefined.mdx), `Function`, and `Symbol` values are not valid JSON values. If any such values are encountered during conversion, they are either omitted (when found in an object) or changed to [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) (when found in an array). `JSON.stringify()` can return `undefined` when passing in \"pure\" values like `JSON.stringify(() => {})` or `JSON.stringify(undefined)`.\n- The numbers [`Infinity`](../../globals/Infinity.mdx) and [`NaN`](../../globals/NaN.mdx), as well as the value [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null), are all considered `null`. (But unlike the values in the previous point, they would never be omitted.)\n- Arrays are serialized as arrays (enclosed by square brackets). Only array indices between 0 and `length - 1` (inclusive) are serialized; other properties are ignored.\n- For other objects:\n\n  - All `Symbol`-keyed properties will be completely ignored, even when using the [`replacer`](#the-replacer-parameter) parameter.\n\n  - If the value has a `toJSON()` method, it's responsible to define what data will be serialized. Instead of the object being serialized, the value returned by the `toJSON()` method when called will be serialized. `JSON.stringify()` calls `toJSON` with one parameter, the `key`, which has the same semantic as the `key` parameter of the [`replacer`](#the-replacer-parameter) function:\n\n    - if this object is a property value, the property name\n    - if it is in an array, the index in the array, as a string\n    - if `JSON.stringify()` was directly called on this object, an empty string\n\n    `Date` objects implement the [`toJSON()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toJSON) method which returns a string (the same as [`date.toISOString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)). Thus, they will be stringified as strings.\n\n  - Only [enumerable own properties](https://developer.mozilla.org/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) are visited. This means [Map](../../globals/Map/Map.mdx), [Set](../../globals/Set/Set.mdx), etc. will become `\"{}\"`. You can use the [`replacer`](#the-replacer-parameter) parameter to serialize them to something more useful.\n\n    Properties are visited using the same algorithm as [`Object.keys()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/keys), which has a well-defined order and is stable across implementations. For example, `JSON.stringify` on the same object will always produce the same string, and `JSON.parse(JSON.stringify(obj))` would produce an object with the same key ordering as the original (assuming the object is completely JSON-serializable).\n\n### The replacer parameter\n\nThe `replacer` parameter can be either a function or an array.\n\nAs an array, its elements indicate the names of the properties in the object that should be included in the resulting JSON string. Only string and number values are taken into account; symbol keys are ignored.\n\nAs a function, it takes two parameters: the `key` and the `value` being stringified. The object in which the key was found is provided as the `replacer`'s `this` context.\n\nThe `replacer` function is called for the initial object being stringified as well, in which case the `key` is an empty string (`\"\"`). It is then called for each property on the object or array being stringified. Array indices will be provided in its string form as `key`. The current property value will be replaced with the `replacer`'s return value for stringification. This means:\n\n- If you return a number, string, boolean, or `null`, that value is directly serialized and used as the property's value. (Returning a BigInt will throw as well.)\n- If you return a `Function`, `Symbol`, or [`undefined`](../../globals/undefined.mdx), the property is not included in the output.\n- If you return any other object, the object is recursively stringified, calling the `replacer` function on each property.\n\n> **Note:** When parsing JSON generated with `replacer` functions, you would likely want to use the [`reviver`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#using_the_reviver_parameter) parameter to perform the reverse operation.\n\nTypically, array elements' index would never shift (even when the element is an invalid value like a function, it will become `null` instead of omitted). Using the `replacer` function allows you to control the order of the array elements by returning a different array.\n\n### The space parameter\n\nThe `space` parameter may be used to control spacing in the final string.\n\n- If it is a number, successive levels in the stringification will each be indented by this many space characters.\n- If it is a string, successive levels will be indented by this string.\n\nEach level of indentation will never be longer than 10. Number values of `space` are clamped to 10, and string values are truncated to 10 characters.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Map/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get Map\\[Symbol.species]\n\nThe **`Map[Symbol.species]`** accessor property is an unused accessor property specifying how to copy `Map` objects.\n\n## Syntax\n\n```js\nMap[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct copied `Map` instances.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `Map` objects. Subclass constructors may override it to change the constructor assignment.\n\n> **Note:** This property is currently unused by all `Map` methods.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Map/Map.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map()\n\nThe **`Map()` constructor** creates [Map](../../globals/Map/Map.mdx) objects.\n\n## Syntax\n\n```js\nnew Map()\nnew Map(iterable)\n```\n\n> **Note:** `Map()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable` _**optional**_\n  - : An `Array` or other\n    [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) object\n    whose elements are key-value pairs. (For example, arrays with two elements,\n    such as `[[ 1, 'one' ],[ 2, 'two' ]]`.) Each key-value pair is added to the\n    new `Map`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Map/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype\\[Symbol.iterator]()\n\nThe **`Symbol.iterator`** method of a `Map` object implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows maps to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the key-value pairs of the map.\n\nThe initial value of this property is the same function object as the initial value of the [`Map.prototype.entries`](../../../globals/Map/prototype/entries.mdx) property.\n\n## Syntax\n\n```js\nmap[Symbol.iterator]()\n```\n\n### Return value\n\nThe same return value as [`Map.prototype.entries()`](../../../globals/Map/prototype/entries.mdx): a new iterable iterator object that yields the key-value pairs of the map.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Map/prototype/clear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.clear()\n\nThe **`clear()`** method removes all elements from a `Map` object.\n\n## Syntax\n\n```js\nclear()\n```\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Map/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.delete()\n\nThe **`delete()`** method removes the specified element from a `Map` object by\nkey.\n\n## Syntax\n\n```js\ndelete(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to remove from the `Map` object.\n\n### Return value\n\n`true` if an element in the `Map` object existed and has been removed, or\n`false` if the element does not exist.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Map/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.entries()\n\nThe **`entries()`** method returns a new\n_[iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators)_ object\nthat contains the `[key, value]` pairs for each element in the `Map` object in\ninsertion order. In this particular case, this iterator object is also an\niterable, so the for-of loop can be used. When the protocol `[Symbol.iterator]`\nis used, it returns a function that, when invoked, returns this iterator itself.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nA new [Map](../../../globals/Map/Map.mdx) iterator object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Map/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.forEach()\n\nThe **`forEach()`** method executes a provided function once per each key/value\npair in the `Map` object, in insertion order.\n\n## Syntax\n\n```js\n// Arrow function\nforEach(() => { /* … */ } )\nforEach((value) => { /* … */ } )\nforEach((value, key) => { /* … */ } )\nforEach((value, key, map) => { /* … */ } )\n\n// Callback function\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n\n// Inline callback function\nforEach(function() { /* … */ })\nforEach(function(value) { /* … */ })\nforEach(function(value, key) { /* … */ })\nforEach(function(value, key, map) { /* … */ })\nforEach(function(value, key, map) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n  - : Function to execute for each entry in the map. It takes the following\n    arguments:\n    - `value` _**optional**_\n      - : Value of each iteration.\n    - `key` _**optional**_\n      - : Key of each iteration.\n    - `map` _**optional**_\n      - : The map being iterated.\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `callback`.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n## Description\n\nThe `forEach` method executes the provided `callback` once for each key of the\nmap which actually exist. It is not invoked for keys which have been deleted.\nHowever, it is executed for values which are present but have the value\n`undefined`.\n\n`callback` is invoked with **three arguments**:\n\n- the entry's `value`\n- the entry's `key`\n- the **`Map` object** being traversed\n\nIf a `thisArg` parameter is provided to `forEach`, it will be passed to\n`callback` when invoked, for use as its `this` value. Otherwise, the value\n`undefined` will be passed for use as its `this` value. The `this` value\nultimately observable by `callback` is determined according to\n[the usual rules for determining the `this` seen by a function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this).\n\nEach value is visited once, except in the case when it was deleted and re-added\nbefore `forEach` has finished. `callback` is not invoked for values deleted\nbefore being visited. New values added before `forEach` has finished will be\nvisited.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Map/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.get()\n\nThe **`get()`** method returns a specified element from a `Map` object. If the\nvalue that is associated to the provided key is an object, then you will get a\nreference to that object and any change made to that object will effectively\nmodify it inside the `Map` object.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to return from the `Map` object.\n\n### Return value\n\nThe element associated with the specified key, or\n[`undefined`](../../../globals/undefined.mdx) if the key can't be found in the `Map` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Map/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.has()\n\nThe **`has()`** method returns a boolean indicating whether an element with the\nspecified key exists or not.\n\n## Syntax\n\n```js\nhas(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to test for presence in the `Map` object.\n\n### Return value\n\n`true` if an element with the specified key exists in the `Map` object;\notherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Map/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.keys()\n\nThe **`keys()`** method returns a new\n_[iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators)_ object\nthat contains the keys for each element in the `Map` object in insertion order. In this particular case, this iterator object is also an iterable, so a [for...of](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loop can be used.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nA new [Map](../../../globals/Map/Map.mdx) iterator object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Map/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.set()\n\nThe **`set()`** method adds or updates an entry in a `Map` object with a specified key and a value.\n\n## Syntax\n\n```js\nset(key, value)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to add to the `Map` object. The key may be any [JavaScript type](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures) (any [primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_values) or any type of [JavaScript object](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#objects)).\n- `value`\n  - : The value of the element to add to the `Map` object. The value may be any [JavaScript type](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures) (any [primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_values) or any type of [JavaScript object](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#objects)).\n\n### Return value\n\nThe `Map` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Map/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.size\n\nThe **`size`** accessor property returns the number of elements in a\n[Map](../../../globals/Map/Map.mdx) object.\n\n## Description\n\nThe value of `size` is an integer representing how many entries the `Map` object\nhas. A set accessor function for `size` is `undefined`; you can not change this\nproperty.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Map/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.values()\n\nThe **`values()`** method returns a new\n_[iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators)_ object\nthat contains the values for each element in the `Map` object in insertion\norder.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nA new [Map](../../../globals/Map/Map.mdx) iterator object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/E.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.E\n\nThe **`Math.E`** property represents Euler's number, the base of natural logarithms, e, which is approximately 2.718.\n\n## Value\n\n`2.718281828459045`\n\n## Description\n\nBecause `E` is a static property of `Math`, you always use it as `Math.E`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/LN10.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LN10\n\nThe **`Math.LN10`** property represents the natural logarithm of 10, approximately 2.302.\n\n## Value\n\n`2.302585092994046`\n\n## Description\n\nBecause `LN10` is a static property of `Math`, you always use it as `Math.LN10`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/LN2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LN2\n\nThe **`Math.LN2`** property represents the natural logarithm of 2, approximately 0.693:\n\n## Value\n\n`0.6931471805599453`\n\n## Description\n\nBecause `LN2` is a static property of `Math`, you always use it as `Math.LN2`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/LOG10e.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LOG10E\n\nThe **`Math.LOG10E`** property represents the base 10 logarithm of [E](./E.mdx), approximately 0.434.\n\n## Value\n\n`0.4342944819032518`\n\n## Description\n\nBecause `LOG10E` is a static property of `Math`, you always use it as `Math.LOG10E`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/LOG2e.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LOG2E\n\nThe **`Math.LOG2E`** property represents the base 2 logarithm of [E](./E.mdx), approximately 1.442.\n\n## Value\n\n`1.4426950408889634`\n\n## Description\n\nBecause `LOG2E` is a static property of `Math`, you always use it as `Math.LOG2E`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/PI.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.PI\n\nThe **`Math.PI`** property represents the ratio of the circumference of a circle to its diameter, approximately 3.14159.\n\n## Value\n\n`3.141592653589793`\n\n## Description\n\nBecause `PI` is a static property of `Math`, you always use it as `Math.PI`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/SQRT1_2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.SQRT1_2\n\nThe **`Math.SQRT1_2`** property represents the square root of 1/2, which is approximately 0.707.\n\n## Value\n\n`0.7071067811865476`\n\n## Description\n\n`Math.SQRT1_2` is a constant and a more performant equivalent to [`Math.sqrt(0.5)`](./sqrt.mdx).\n\nBecause `SQRT1_2` is a static property of `Math`, you always use it as `Math.SQRT1_2`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/SQRT2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.SQRT2\n\nThe **`Math.SQRT2`** property represents the square root of 2, approximately 1.414.\n\n## Value\n\n`0.7071067811865476`\n\n## Description\n\n`Math.SQRT2` is a constant and a more performant equivalent to [`Math.sqrt(2)`](./sqrt.mdx).\n\nBecause `SQRT2` is a static property of `Math`, you always use it as `Math.SQRT2`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/abs.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.abs()\n\nThe **`Math.abs()`** function returns the absolute value of a number.\n\n\n## Syntax\n\n```js\nMath.abs(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe absolute value of `x`. If `x` is negative (including `-0`), returns `-x`. Otherwise, returns `x`. The result is therefore always a positive number or `0`.\n\n## Description\n\nBecause `abs()` is a static method of `Math`, you always use it as `Math.abs()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/acos.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.acos()\n\nThe **`Math.acos()`** function returns the inverse cosine (in radians) of a number.\n\n## Syntax\n\n```js\nMath.acos(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number between -1 and 1, inclusive, representing the angle's cosine value.\n\n### Return value\n\nThe inverse cosine (angle in radians between 0 and π, inclusive) of `x`. If `x` is less than -1 or greater than 1, returns `NaN`.\n\n## Description\n\nBecause `acos()` is a static method of `Math`, you always use it as `Math.acos()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/acosh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.acosh()\n\nThe **`Math.acosh()`** function returns the inverse hyperbolic cosine of a number.\n\n## Syntax\n\n```js\nMath.acosh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 1.\n\n### Return value\n\nThe inverse hyperbolic cosine of `x`. If `x` is less than 1, returns `NaN`.\n\n## Description\n\nBecause `acosh()` is a static method of `Math`, you always use it as `Math.acosh()`, rather than as a method of a `Math` object you created (`Math` is no constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/asin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.asin()\n\nThe **`Math.asin()`** function returns the inverse sine (in radians) of a number.\n\n## Syntax\n\n```js\nMath.asin(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number between -1 and 1, inclusive, representing the angle's sine value.\n\n### Return value\n\nThe inverse sine (angle in radians between <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math>, inclusive) of `x`. If `x` is less than -1 or greater than 1, returns `NaN`.\n\n## Description\n\nBecause `asin()` is a static method of `Math`, you always use it as `Math.asin()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/asinh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.asinh()\n\nThe **`Math.asinh()`** function returns the inverse hyperbolic sine of a number. \n\n## Syntax\n\n```js\nMath.asinh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe inverse hyperbolic sine of `x`.\n\n## Description\n\nBecause `asinh()` is a static method of `Math`, you always use it as `Math.asinh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/atan.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.atan()\n\nThe **`Math.atan()`** function returns the inverse tangent (in radians) of a number.\n\n## Syntax\n\n```js\nMath.atan(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe inverse tangent (angle in radians between <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math> and <math><semantics><mfrac><mi>π</mi><mn>2</mn></mfrac></semantics></math>, inclusive) of `x`. If `x` is `Infinity`, it returns <math><semantics><mfrac><mi>π</mi><mn>2</mn></mfrac></semantics></math>. If `x` is `-Infinity`, it returns <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math>.\n\n## Description\n\nBecause `atan()` is a static method of `Math`, you always use it as `Math.atan()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/atan2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.atan2()\n\nThe **`Math.atan2()`** function returns the angle in the plane (in radians) between the positive x-axis and the ray from (0, 0) to the point (x, y), for `Math.atan2(y, x)`.\n\n## Syntax\n\n```js\nMath.atan2(y, x)\n```\n\n### Parameters\n\n- `y`\n  - : The y coordinate of the point.\n- `x`\n  - : The x coordinate of the point.\n\n### Return value\n\nThe angle in radians (between -π and π, inclusive) between the positive x-axis and the ray from (0, 0) to the point (x, y).\n\n## Description\n\nThe `Math.atan2()` method measures the counterclockwise angle θ, in radians, between the positive x-axis and the point `(x, y)`. Note that the arguments to this function pass the y-coordinate first and the x-coordinate second.\n\n`Math.atan2()` is passed separate `x` and `y` arguments, while [`Math.atan()`](./atan.mdx) is passed the ratio of those two arguments. `Math.atan2(y, x)` differs from `Math.atan(y / x)` in the following cases:\n\n| `x`                  | `y`         | `Math.atan2(y, x)` | `Math.atan(y / x)` |\n| -------------------- | ----------- | ------------------ | ------------------ |\n| `Infinity`           | `Infinity`  | π / 4              | `NaN`              |\n| `Infinity`           | `-Infinity` | -π / 4             | `NaN`              |\n| `-Infinity`          | `Infinity`  | 3π / 4             | `NaN`              |\n| `-Infinity`          | `-Infinity` | -3π / 4            | `NaN`              |\n| 0                    | 0           | 0                  | `NaN`              |\n| 0                    | -0          | -0                 | `NaN`              |\n| < 0 (including `-0`) | 0           | π                  | 0                  |\n| < 0 (including `-0`) | -0          | -π                 | 0                  |\n| `-Infinity`          | > 0         | π                  | -0                 |\n| -0                   | > 0         | π / 2              | -π / 2             |\n| `-Infinity`          | < 0         | -π                 | 0                  |\n| -0                   | < 0         | -π / 2             | π / 2              |\n\nIn addition, for points in the second and third quadrants (`x < 0`), `Math.atan2()` would output an angle less than <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math> or greater than <math><semantics><mfrac><mi>π</mi><mn>2</mn></mfrac></semantics></math>.\n\nBecause `atan2()` is a static method of `Math`, you always use it as `Math.atan2()`, rather than as a method of a `Math` object you created (`Math` is not a constructor)."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/atanh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.atanh()\n\nThe **`Math.atanh()`** function returns the inverse hyperbolic tangent of a number. \n\n## Syntax\n\n```js\nMath.atanh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number between -1 and 1, inclusive.\n\n### Return value\n\nThe inverse hyperbolic tangent of `x`. If `x` is 1, returns `Infinity`. If `x` is -1, returns `-Infinity`. If `x` is less than -1 or greater than 1, returns `NaN`.\n\n## Description\n\nBecause `atanh()` is a static method of `Math`, you always use it as `Math.atanh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/cbrt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.cbrt()\n\nThe **`Math.cbrt()`** function returns the cube root of a number.\n\n## Syntax\n\n```js\nMath.cbrt(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe cube root of `x`.\n\n## Description\n\nBecause `cbrt()` is a static method of `Math`, you always use it as `Math.cbrt()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/ceil.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.ceil()\n\nThe **`Math.ceil()`** function always rounds up and returns the smaller integer greater than or equal to a given number.\n\n## Syntax\n\n```js\nMath.ceil(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe smallest integer greater than or equal to `x`. It's the same value as [`-Math.floor(-x)`](./floor.mdx).\n\n## Description\n\nBecause `ceil()` is a static method of `Math`, you always use it as `Math.ceil()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/clz32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.clz32()\n\nThe **`Math.clz32()`** function returns the number of leading zero bits in the 32-bit binary representation of a number.\n\n## Syntax\n\n```js\nMath.clz32(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe number of leading zero bits in the 32-bit binary representation of `x`.\n\n## Description\n\n`clz32` is short for **C**ount**L**eading**Z**eros**32**.\n\nIf `x` is not a number, it will be converted to a number first, then converted to a 32-bit unsigned integer.\n\nIf the converted 32-bit unsigned integer is `0`, `32` is returned, because all bits are `0`. If the most significant bit is `1` (i.e. the number is greater than or equal to 2<sup>31</sup>), `0` is returned.\n\nThis function is particularly useful for systems that compile to JS, like [Emscripten](https://emscripten.org).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/cos.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.cos()\n\nThe **`Math.cos()`** function returns the cosine of a number in radians.\n\n## Syntax\n\n```js\nMath.cos(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number representing an angle in radians.\n\n### Return value\n\nThe cosine of `x`, between -1 and 1, inclusive. If `x` is `Infinity`, `-Infinity`, or `NaN`, returns `NaN`.\n\n## Description\n\nBecause `cos()` is a static method of `Math`, you always use it as `Math.cos()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/cosh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.cosh()\n\nThe **`Math.cosh()`** function returns the hyperbolic cosine of a number. \n\n## Syntax\n\n```js\nMath.cosh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe hyperbolic cosine of `x`.\n\n## Description\n\nBecause `cosh()` is a static method of `Math`, you always use it as `Math.cosh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor)."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/exp.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.exp()\n\nThe **`Math.exp()`** function returns [E](./E.mdx) raised to the power of a number.\n\n## Syntax\n\n```js\nMath.exp(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nA nonnegative number representing e<sup>x</sup>, where e is [the base of the natural logarithm](./E.mdx).\n\n## Description\n\nBecause `exp()` is a static method of `Math`, you always use it as `Math.exp()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nBeware that `e` to the power of a number very close to 0 will be very close to 1 and suffer from loss of precision. In this case, you may want to use `Math.expm1` instead, and obtain a much higher-precision fractional part of the answer.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/expm1.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.expm1()\n\nThe **`Math.expm1()`** function returns [E](./E.mdx) raised to the power of a number, subtracted by 1.\n\n## Syntax\n\n```js\nMath.expm1(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nA number representing e<sup>x</sup> - 1, where e is [the base of the natural logarithm](./E.mdx).\n\n## Description\n\nFor very small values of _x_, adding 1 can reduce or eliminate precision. The double floats used in JS give you about 15 digits of precision. 1 + 1e-15 \\= 1.000000000000001, but 1 + 1e-16 = 1.000000000000000 and therefore exactly 1.0 in that arithmetic, because digits past 15 are rounded off.\n\nWhen you calculate <math display=\"inline\"><semantics><msup><mi mathvariant=\"normal\">e</mi><mi>x</mi></msup></semantics></math> where x is a number very close to 0, you should get an answer very close to 1 + x, because <math display=\"inline\"><semantics><mrow><munder><mo lspace=\"0em\" rspace=\"0em\">lim</mo><mrow><mi>x</mi><mo stretchy=\"false\">→</mo><mn>0</mn></mrow></munder><mfrac><mrow><msup><mi mathvariant=\"normal\">e</mi><mi>x</mi></msup><mo>−</mo><mn>1</mn></mrow><mi>x</mi></mfrac><mo>=</mo><mn>1</mn></mrow></semantics></math>. If you calculate `Math.exp(1.1111111111e-15) - 1`, you should get an answer close to `1.1111111111e-15`. Instead, due to the highest significant figure in the result of `Math.exp` being the units digit `1`, the final value ends up being `1.1102230246251565e-15`, with only 3 correct digits. If, instead, you calculate `Math.exp1m(1.1111111111e-15)`, you will get a much more accurate answer `1.1111111111000007e-15`, with 11 correct digits of precision.\n\nBecause `expm1()` is a static method of `Math`, you always use it as `Math.expm1()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/floor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.floor()\n\nThe **`Math.floor()`** function always rounds down and returns the largest integer less than or equal to a given number.\n\n## Syntax\n\n```js\nMath.floor(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe largest integer smaller than or equal to `x`. It's the same value as [`-Math.ceil(-x)`](./ceil.mdx).\n\n## Description\n\nBecause `floor()` is a static method of `Math`, you always use it as `Math.floor()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/fround.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.fround()\n\nThe **`Math.fround()`** function returns the nearest [32-bit single precision](https://en.wikipedia.org/wiki/Single-precision_floating-point_format) float representation of a number.\n\n## Syntax\n\n```js\nMath.fround(doubleFloat)\n```\n\n### Parameters\n\n- `doubleFloat`\n  - : A number.\n\n### Return value\n\nThe nearest [32-bit single precision](https://en.wikipedia.org/wiki/Single-precision_floating-point_format) float representation of `x`.\n\n## Description\n\nJavaScript uses 64-bit double floating-point numbers internally, which offer a very high precision. However, sometimes you may be working with 32-bit floating-point numbers, for example if you are reading values from a `Float32Array`. This can create confusion: checking a 64-bit float and a 32-bit float for equality may fail even though the numbers are seemingly identical.\n\nTo solve this, `Math.fround()` can be used to cast the 64-bit float to a 32-bit float. Internally, JavaScript continues to treat the number as a 64-bit float, it just performs a \"round to even\" on the 23rd bit of the mantissa, and sets all following mantissa bits to `0`. If the number is outside the range of a 32-bit float, `Infinity` or `-Infinity` is returned.\n\nBecause `fround()` is a static method of `Math`, you always use it as `Math.fround()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/hypot.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.hypot()\n\nThe **`Math.hypot()`** function returns the square root of the sum of squares of its arguments. \n\n## Syntax\n\n```js\nMath.hypot()\nMath.hypot(value0)\nMath.hypot(value0, value1)\nMath.hypot(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `value1`, …, `valueN`\n  - : Numbers.\n\n### Return value\n\nThe square root of the sum of squares of the given arguments. Returns Infinity if any of the arguments is ±Infinity. Otherwise, if at least one of the arguments is or is converted to NaN, returns NaN. Returns `0` if no arguments are given or all arguments are ±0.\n\n## Description\n\nCalculating the hypotenuse of a right triangle, or the magnitude of a complex number, uses the formula `Math.sqrt(v1*v1 + v2*v2)`, where v1 and v2 are the lengths of the triangle's legs, or the complex number's real and complex components. The corresponding distance in 2 or more dimensions can be calculated by adding more squares under the square root: `Math.sqrt(v1*v1 + v2*v2 + v3*v3 + v4*v4)`.\n\nThis function makes this calculation easier and faster; you call `Math.hypot(v1, v2)`, or `Math.hypot(v1, /* … ,*/, vN)`.\n\n`Math.hypot` also avoids overflow/underflow problems if the magnitude of your numbers is very large. The largest number you can represent in JS is [`Number.MAX_VALUE`](../Number/MAX_VALUE.mdx), which is around 10<sup>308</sup>. If your numbers are larger than about 10<sup>154</sup>, taking the square of them will result in Infinity. For example, `Math.sqrt(1e200*1e200 + 1e200*1e200) = Infinity`. If you use `hypot()` instead, you get a better answer: `Math.hypot(1e200, 1e200) = 1.4142...e+200` . This is also true with very small numbers. `Math.sqrt(1e-200*1e-200 + 1e-200*1e-200) = 0`, but `Math.hypot(1e-200, 1e-200) = 1.4142...e-200`.\n\nWith one argument, `Math.hypot()` is equivalent to [`Math.abs()`](./abs.mdx). [`Math.hypot.length`](../Function/prototype/length.mdx) is 2, which weakly signals that it's designed to handle at least two parameters.\n\nBecause `hypot()` is a static method of `Math`, you always use it as `Math.hypot()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/imul.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.imul()\n\nThe **`Math.imul()`** function returns the result of the C-like 32-bit multiplication of the two parameters.\n\n\n## Syntax\n\n```js\nMath.imul(a, b)\n```\n\n### Parameters\n\n- `a`\n  - : First number.\n- `b`\n  - : Second number.\n\n### Return value\n\nThe result of the C-like 32-bit multiplication of the given arguments.\n\n## Description\n\n`Math.imul()` allows for 32-bit integer multiplication with C-like semantics. This feature is useful for projects like [Emscripten](https://en.wikipedia.org/wiki/Emscripten).\n\nBecause `imul()` is a static method of `Math`, you always use it as `Math.imul()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nIf you use normal JavaScript floating point numbers in `imul()`, you will experience a degrade in performance. This is because of the costly conversion from a floating point to an integer for multiplication, and then converting the multiplied integer back into a floating point.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/log.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log()\n\nThe **`Math.log()`** function returns the natural logarithm (base [E](./E.mdx)) of a number.\n\n## Syntax\n\n```js\nMath.log(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe natural logarithm (base [E](./E.mdx)) of `x`. If `x` is ±0, returns [`-Infinity`](../Number/NEGATIVE_INFINITY.mdx). If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `log()` is a static method of `Math`, you always use it as `Math.log()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nIf you need the natural log of 2 or 10, use the constants `Math.LN2` or `Math.LN10`. If you need a logarithm to base 2 or 10, use `Math.log2()` or `Math.log10()`. If you need a logarithm to other bases, use `Math.log(x) / Math.log(otherBase)` as in the example below; you might want to precalculate `1 / Math.log(otherBase)` since multiplication in `Math.log(x) * constant` is much faster.\n\nBeware that positive numbers very close to 1 can suffer from loss of precision and make its natural logarithm less accurate. In this case, you may want to use `Math.log1p` instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/log10.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log10()\n\nThe **`Math.log10()`** function returns the base 10 logarithm of a number. \n\n## Syntax\n\n```js\nMath.log10(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe base 10 logarithm of `x`. If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `log10()` is a static method of `Math`, you always use it as `Math.log10()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nThis function is the equivalent of `Math.log(x) / Math.log(10)`. For `log10(e)`, use the constant `Math.LOG10E`, which is 1 / `Math.LN10`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/log1p.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log1p()\n\nThe **`Math.log1p()`** function returns the natural logarithm (base [E](./E.mdx)) of `1 + x`, where `x` is the argument.\n\n## Syntax\n\n```js\nMath.log1p(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to -1.\n\n### Return value\n\nThe natural logarithm (base [E](./E.mdx)) of `x + 1`. If `x` is -1, returns [`-Infinity`](../Number/NEGATIVE_INFINITY.mdx). If `x < -1`, returns `NaN`.\n\n## Description\n\nFor very small values of _x_, adding 1 can reduce or eliminate precision. The double floats used in JS give you about 15 digits of precision. 1 + 1e-15 \\= 1.000000000000001, but 1 + 1e-16 = 1.000000000000000 and therefore exactly 1.0 in that arithmetic, because digits past 15 are rounded off.\n\nWhen you calculate log(1 + _x_) where _x_ is a small positive number, you should get an answer very close to _x_, because <math display=\"inline\"><semantics><mrow><munder><mo movablelimits=\"true\" form=\"prefix\">lim</mo><mrow ><mi>x</mi><mo stretchy=\"false\">→</mo><mn>0</mn></mrow></munder><mfrac><mrow><mi>log</mi><mo>⁡</mo><mo stretchy=\"false\">(</mo><mn>1</mn><mo>+</mo><mi>x</mi><mo stretchy=\"false\">)</mo></mrow><mi>x</mi></mfrac><mo>=</mo><mn>1</mn></mrow></semantics></math>. If you calculate `Math.log(1 + 1.1111111111e-15)`, you should get an answer close to `1.1111111111e-15`. Instead, you will end up taking the logarithm of `1.00000000000000111022` (the roundoff is in binary, so sometimes it gets ugly), and get the answer 1.11022…e-15, with only 3 correct digits. If, instead, you calculate `Math.log1p(1.1111111111e-15)`, you will get a much more accurate answer `1.1111111110999995e-15`, with 15 correct digits of precision (actually 16 in this case).\n\nIf the value of `x` is less than -1, the return value is always `NaN`.\n\nBecause `log1p()` is a static method of `Math`, you always use it as `Math.log1p()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/log2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log2()\n\nThe **`Math.log2()`** function returns the base 2 logarithm of a number.\n\n## Syntax\n\n```js\nMath.log2(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe base 2 logarithm of `x`. If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `log2()` is a static method of `Math`, you always use it as `Math.log2()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nThis function is the equivalent of `Math.log(x) / Math.log(2)`. For `log2(e)`, use the constant `Math.LOG2E`, which is 1 / `Math.LN2`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/max.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.max()\n\nThe **`Math.max()`** function returns the largest of the numbers given as input parameters, or `-Infinity` if there are no parameters.\n\n## Syntax\n\n```js\nMath.max()\nMath.max(value0)\nMath.max(value0, value1)\nMath.max(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `value1`, `value2`, … , `valueN`\n  - : Zero or more numbers among which the largest value will be selected and returned.\n\n### Return value\n\nThe largest of the given numbers. Returns `NaN` if any of the parameters is or is converted into `NaN`. Returns `-Infinity` if no parameters are provided.\n\n## Description\n\nBecause `max()` is a static method of `Math`, you always use it as `Math.max()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n[`Math.max.length`](../Function/prototype/length.mdx) is 2, which weakly signals that it's designed to handle at least two parameters.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/min.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.min()\n\nThe **`Math.min()`** function returns the smallest of the numbers given as input parameters, or `Infinity` if there are no parameters.\n\n## Syntax\n\n```js\nMath.min()\nMath.min(value0)\nMath.min(value0, value1)\nMath.min(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `value1`, …, `valueN`\n  - : Zero or more numbers among which the lowest value will be selected and returned.\n\n### Return value\n\nThe smallest of the given numbers. Returns `NaN` if any of the parameters is or is converted into `NaN`. Returns `Infinity` if no parameters are provided.\n\n## Description\n\nBecause `min()` is a static method of `Math`, you always use it as `Math.min()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n[`Math.min.length`](../Function/prototype/length.mdx) is 2, which weakly signals that it's designed to handle at least two parameters.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/pow.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.pow()\n\nThe **`Math.pow()`** method returns the value of a base raised to a power.\n\n## Syntax\n\n```js\nMath.pow(base, exponent)\n```\n\n### Parameters\n\n- `base`\n  - : The base number.\n- `exponent`\n  - : The exponent number.\n\n### Return value\n\nA number representing `base` taken to the power of `exponent`. Returns `NaN` in one of the following cases:\n\n- `exponent` is `NaN`.\n- `base` is `NaN` and `exponent` is not `0`.\n- `base` is ±1 and `exponent` is ±`Infinity`.\n- `base < 0` and `exponent` is not an integer.\n\n## Description\n\n`Math.pow()` is equivalent to the `**` operator, except `Math.pow()` only accepts numbers.\n\n`Math.pow(NaN, 0)` (and the equivalent `NaN ** 0`) is the only case where `NaN` doesn't propagate through mathematical operations — it returns `1` despite the operand being `NaN`. In addition, the behavior where `base` is 1 and `exponent` is non-finite (±Infinity or `NaN`) is different from IEEE 754, which specifies that the result should be 1, whereas JavaScript returns `NaN` to preserve backward compatibility with its original behavior.\n\nBecause `pow()` is a static method of `Math`, use it as `Math.pow()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/random.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.random()\n\nThe **`Math.random()`** function returns a floating-point, pseudo-random number that's greater than or equal to 0 and less than 1, with approximately uniform distribution over that range — which you can then scale to your desired range. The implementation selects the initial seed to the random number generation algorithm; it cannot be chosen or reset by the user.\n\n> **Note:** `Math.random()` _does not_ provide cryptographically secure random numbers. Do not use them for anything related to security. Use the Web Crypto API instead, and more precisely the `crypto.getRandomValues()` method.\n\n## Syntax\n\n```js\nMath.random()\n```\n\n### Return value\n\nA floating-point, pseudo-random number between 0 (inclusive) and 1 (exclusive).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/round.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.round()\n\nThe **`Math.round()`** function returns the value of a number rounded to the nearest integer.\n\n## Syntax\n\n```js\nMath.round(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe value of `x` rounded to the nearest integer.\n\n## Description\n\nIf the fractional portion of the argument is greater than 0.5, the argument is rounded to the integer with the next higher absolute value. If it is less than 0.5, the argument is rounded to the integer with the lower absolute value. If the fractional portion is exactly 0.5, the argument is rounded to the next integer in the direction of +∞.\n\n> **Note:** This differs from many languages' `round()` functions, which often round half-increments _away from zero_, giving a different result in the case of negative numbers with a fractional part of exactly 0.5.\n\n`Math.round(x)` is not exactly the same as [`Math.floor(x + 0.5)`](./floor.mdx). When `x` is -0, or -0.5 ≤ x < 0, `Math.round(x)` returns -0, while `Math.floor(x + 0.5)` returns 0. However, neglecting that difference and potential precision errors, `Math.round(x)` and `Math.floor(x + 0.5)` are generally equivalent.\n\nBecause `round()` is a static method of `Math`, you always use it as `Math.round()`, rather than as a method of a `Math` object you created (`Math` has no constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/sign.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sign()\n\nThe **`Math.sign()`** function returns 1 or -1, indicating the sign of the number passed as argument. If the input is 0 or -0, it will be returned as-is.\n\n## Syntax\n\n```js\nMath.sign(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nA number representing the sign of `x`:\n\n- If `x` is positive, returns `1`.\n- If `x` is negative, returns `-1`.\n- If `x` is positive zero, returns `0`.\n- If `x` is negative zero, returns `-0`.\n- Otherwise, returns `NaN`.\n\n## Description\n\nBecause `sign()` is a static method of `Math`, you always use it as `Math.sign()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/sin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sin()\n\nThe **`Math.sin()`** function returns the sine of a number in radians.\n\n## Syntax\n\n```js\nMath.sin(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number representing an angle in radians.\n\n### Return value\n\nThe sine of `x`, between -1 and 1, inclusive. If `x` is `Infinity`, `-Infinity`, or `NaN`, returns `NaN`.\n\n## Description\n\nBecause `sin()` is a static method of `Math`, you always use it as `Math.sin()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/sinh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sinh()\n\nThe **`Math.sinh()`** function returns the hyperbolic sine of a number. \n\n## Syntax\n\n```js\nMath.sinh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe hyperbolic sine of `x`.\n\n## Description\n\nBecause `sinh()` is a static method of `Math`, you always use it as `Math.sinh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/sqrt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sqrt()\n\nThe **`Math.sqrt()`** function returns the square root of a number.\n\n## Syntax\n\n```js\nMath.sqrt(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe square root of `x`, a nonnegative number. If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `sqrt()` is a static method of `Math`, you always use it as `Math.sqrt()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/tan.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.tan()\n\nThe **`Math.tan()`** function returns the tangent of a number in radians.\n\n\n## Syntax\n\n```js\nMath.tan(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number representing an angle in radians.\n\n### Return value\n\nThe tangent of `x`. If `x` is `Infinity`, `-Infinity`, or `NaN`, returns `NaN`.\n\n> **Note:** Due to floating point precision, it's not possible to obtain the exact value π/2, so the result is always finite if not `NaN`.\n\n## Description\n\nBecause `tan()` is a static method of `Math`, you always use it as `Math.tan()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/tanh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.tanh()\n\nThe **`Math.tanh()`** function returns the hyperbolic tangent of a number. \n\n## Syntax\n\n```js\nMath.tanh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe hyperbolic tangent of `x`.\n\n## Description\n\nBecause `tanh()` is a static method of `Math`, you always use it as `Math.tanh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Math/trunc.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.trunc()\n\nThe **`Math.trunc()`** function returns the integer part of a number by removing any fractional digits.\n\n## Syntax\n\n```js\nMath.trunc(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe integer part of `x`.\n\n## Description\n\nUnlike the other three `Math` methods: `Math.floor()`, `Math.ceil()` and `Math.round()`, the way `Math.trunc()` works is very simple. It _truncates_ (cuts off) the dot and the digits to the right of it, no matter whether the argument is a positive or negative number.\n\nBecause `trunc()` is a static method of `Math`, you always use it as `Math.trunc()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/NaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# NaN\n\nThe global **`NaN`** property is a value representing Not-A-Number.\n\n## Value\n\nThe same number value as [`Number.NaN`](./Number/NaN.mdx).\n\n## Description\n\n`NaN` is a property of the _global object_. In other words, it is a variable in global scope.\n\nIn modern browsers, `NaN` is a non-configurable, non-writable property. Even when this is not the case, avoid overriding it.\n\nThere are five different types of operations that return `NaN`:\n\n- Failed number conversion (e.g. explicit ones like `parseInt(\"blabla\")`, `Number(undefined)`, or implicit ones like `Math.abs(undefined)`)\n- Math operation where the result is not a real number (e.g. `Math.sqrt(-1)`)\n- Indeterminate form (e.g. `0 * Infinity`, `1 ** Infinity`, `Infinity / Infinity`, `Infinity - Infinity`)\n- A method or expression whose operand is or gets coerced to `NaN` (e.g. `7 ** NaN`, `7 * \"blabla\"`) — this means `NaN` is contagious\n- Other cases where an invalid value is to be represented as a number (e.g. an invalid `new Date(\"blabla\").getTime()`, `\"\".charCodeAt(1)`)\n\n`NaN` and its behaviors are not invented by JavaScript. Its semantics in floating point arithmetic (including that `NaN !== NaN`) are specified by [IEEE 754](https://en.wikipedia.org/wiki/Double_precision_floating-point_format). `NaN`'s behaviors include:\n\n- If `NaN` is involved in a mathematical operation (but not [bitwise operations](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators#bitwise_shift_operators)), the result is usually also `NaN`. (See see [silently escaping NaN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN#silently_escaping_nan) for a counter-example.)\n- When `NaN` is one of the operands of any relational comparison (`>`, `<`, `>=`, `<=`), the result is always `false`.\n- `NaN` compares unequal (via [`==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Equality), [`!=`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Inequality), [`===`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality), and [`!==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_inequality)) to any other value — including to another `NaN` value.\n\n`NaN` is also one of the [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) values in JavaScript.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Number/MAX_SAFE_INTEGER.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MAX_SAFE_INTEGER\n\nThe **`Number.MAX_SAFE_INTEGER`** constant represents the maximum safe integer in JavaScript (2<sup>53</sup> – 1).\n\nFor larger integers, consider using `BigInt`.\n\n## Value\n\n`9007199254740991` (9,007,199,254,740,991, or \\~9 quadrillion).\n\n## Description\n\n[Double precision floating point format](https://en.wikipedia.org/wiki/Double_precision_floating-point_format) only has 52 bits to represent the [mantissa](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_encoding), so it can only safely represent integers between -(2<sup>53</sup> – 1) and 2<sup>53</sup> – 1. \"Safe\" in this context refers to the ability to represent integers exactly and to compare them correctly. For example, `Number.MAX_SAFE_INTEGER + 1 === Number.MAX_SAFE_INTEGER + 2` will evaluate to true, which is mathematically incorrect. See `Number.isSafeInteger()` for more information.\n\nBecause `MAX_SAFE_INTEGER` is a static property of `Number`, you always use it as `Number.MAX_SAFE_INTEGER`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Number/MAX_VALUE.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MAX_VALUE\n\nThe **`Number.MAX_VALUE`** property represents the maximum numeric value representable in JavaScript.\n\n## Value\n\n2<sup>1024</sup> - 1, or approximately `1.7976931348623157E+308`.\n\n## Description\n\nValues larger than `MAX_VALUE` are represented as [`Infinity`](../../globals/Infinity.mdx) and will lose their actual value.\n\nBecause `MAX_VALUE` is a static property of `Number`, you always use it as `Number.MAX_VALUE`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Number/MIN_SAFE_INTEGER.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MIN_SAFE_INTEGER\n\nThe **`Number.MIN_SAFE_INTEGER`** constant represents the minimum safe integer in JavaScript, or -(2<sup>53</sup> - 1).\n\nTo represent integers smaller than this, consider using `BigInt`.\n\n## Value\n\n`-9007199254740991` (-9,007,199,254,740,991, or about -9 quadrillion).\n\n## Description\n\n[Double precision floating point format](https://en.wikipedia.org/wiki/Double_precision_floating-point_format) only has 52 bits to represent the [mantissa](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_encoding), so it can only safely represent integers between -(2<sup>53</sup> – 1) and 2<sup>53</sup> – 1. Safe in this context refers to the ability to represent integers exactly and to correctly compare them. For example, `Number.MIN_SAFE_INTEGER - 1 === Number.MIN_SAFE_INTEGER - 2` will evaluate to true, which is mathematically incorrect. See `Number.isSafeInteger()` for more information.\n\nBecause `MIN_SAFE_INTEGER` is a static property of `Number`, you always use it as `Number.MIN_SAFE_INTEGER`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Number/MIN_VALUE.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MIN_VALUE\n\nThe **`Number.MIN_VALUE`** property represents the smallest positive numeric value representable in JavaScript.\n\n## Value\n\n2<sup>-1074</sup>, or `5E-324`.\n\n## Description\n\n`Number.MIN_VALUE` is the smallest positive number (not the most negative number) that can be represented within float precision — in other words, the number closest to 0. The ECMAScript spec doesn't define a precise value that implementations are required to support — instead the spec says, _\"must be the smallest non-zero positive value that can actually be represented by the implementation\"_. This is because small IEEE-754 floating point numbers are [denormalized](https://en.wikipedia.org/wiki/Subnormal_number), but implementations are not required to support this representation, in which case `Number.MIN_VALUE` may be larger.\n\nIn practice, its precise value in mainstream engines like V8 (used by Chrome, Edge, Node.js), SpiderMonkey (used by Firefox), and JavaScriptCore (used by Safari) is 2<sup>-1074</sup>, or `5E-324`.\n\nBecause `MIN_VALUE` is a static property of `Number`, you always use it as `Number.MIN_VALUE`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Number/NEGATIVE_INFINITY.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.NEGATIVE_INFINITY\n\nThe **`Number.NEGATIVE_INFINITY`** property represents the negative Infinity value.\n\n## Value\n\nThe same as the negative value of the global [`Infinity`](../../globals/Infinity.mdx) property.\n\n## Description\n\nThe `Number.NEGATIVE_INFINITY` value behaves slightly differently than mathematical infinity:\n\n- Any positive value, including `Number.POSITIVE_INFINITY`, multiplied by `Number.NEGATIVE_INFINITY` is `Number.NEGATIVE_INFINITY`.\n- Any negative value, including `Number.NEGATIVE_INFINITY`, multiplied by `Number.NEGATIVE_INFINITY` is `Number.POSITIVE_INFINITY`.\n- Any positive value divided by `Number.NEGATIVE_INFINITY` is [negative zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754)).\n- Any negative value divided by `Number.NEGATIVE_INFINITY` is [positive zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754)).\n- Zero multiplied by `Number.NEGATIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- [`NaN`](../../globals/NaN.mdx) multiplied by `Number.NEGATIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- `Number.NEGATIVE_INFINITY`, divided by any negative value except `Number.NEGATIVE_INFINITY`, is `Number.POSITIVE_INFINITY`.\n- `Number.NEGATIVE_INFINITY`, divided by any positive value except `Number.POSITIVE_INFINITY`, is `Number.NEGATIVE_INFINITY`.\n- `Number.NEGATIVE_INFINITY`, divided by either `Number.NEGATIVE_INFINITY` or `Number.POSITIVE_INFINITY`, is [`NaN`](../../globals/NaN.mdx).\n- `x > Number.NEGATIVE_INFINITY` is true for any number _x_ that isn't `Number.NEGATIVE_INFINITY`.\n\nYou might use the `Number.NEGATIVE_INFINITY` property to indicate an error condition that returns a finite number in case of success. Note, however, that [`NaN`](../../globals/NaN.mdx) would be more appropriate in such a case.\n\nBecause `Number.NEGATIVE_INFINITY` is a static property of `Number`, you always use it as `Number.NEGATIVE_INFINITY`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Number/NaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.NaN\n\nThe **`Number.NaN`** property represents Not-A-Number, which is equivalent to [description for the global property](../../globals/NaN.mdx). For more information about the behaviors of `NaN`, see the [`NaN`](../../globals/NaN.mdx).\n\n## Value\n\nThe number value [`NaN`](../../globals/NaN.mdx).\n\n## Description\n\nBecause `NaN` is a static property of `Number`, you always use it as `Number.NaN`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Number/Number.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number() constructor\n\nThe **`Number()` constructor** creates a `Number` object. When called instead as a function, it performs type conversion to a primitive number, which is usually more useful.\n\n## Syntax\n\n```js\nnew Number(value)\nNumber(value)\n```\n\n> **Note:** `Number()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\n- `value`\n  - : The numeric value of the object being created.\n\n### Return value\n\nWhen `Number` is called as a constructor (with `new`), it creates a `Number` object, which is **not** a primitive.\n\nWhen `Number` is called as a function, it [coerces the parameter to a number primitive](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_coercion). [BigInts](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/BigInt) are converted to numbers. If the value can't be converted, it returns [`NaN`](../../globals/NaN.mdx).\n\n> **Warning:** You should rarely find yourself using `Number` as a constructor.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Number/POSITIVE_INFINITY.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.POSITIVE_INFINITY\n\nThe **`Number.POSITIVE_INFINITY`** property represents the positive Infinity value.\n\n## Value\n\nThe same as the value of the global [`Infinity`](../../globals/Infinity.mdx) property.\n\n## Description\n\nThe `Number.POSITIVE_INFINITY` value behaves slightly differently than mathematical infinity:\n\n- Any positive value, including `Number.POSITIVE_INFINITY`, multiplied by `Number.POSITIVE_INFINITY` is `Number.POSITIVE_INFINITY`.\n- Any negative value, including `Number.NEGATIVE_INFINITY`, multiplied by `Number.POSITIVE_INFINITY` is `Number.NEGATIVE_INFINITY`.\n- Any positive number divided by `Number.POSITIVE_INFINITY` is [positive zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754)).\n- Any negative number divided by `Number.POSITIVE_INFINITY` is [negative zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754).\n- Zero multiplied by `Number.POSITIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- `NaN` multiplied by `Number.POSITIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- `Number.POSITIVE_INFINITY`, divided by any negative value except `Number.NEGATIVE_INFINITY`, is `Number.NEGATIVE_INFINITY`.\n- `Number.POSITIVE_INFINITY`, divided by any positive value except `Number.POSITIVE_INFINITY`, is `Number.POSITIVE_INFINITY`.\n- `Number.POSITIVE_INFINITY`, divided by either `Number.NEGATIVE_INFINITY` or `Number.POSITIVE_INFINITY`, is [`NaN`](../../globals/NaN.mdx).\n- `Number.POSITIVE_INFINITY > x` is true for any number _x_ that isn't `Number.POSITIVE_INFINITY`.\n\nYou might use the `Number.POSITIVE_INFINITY` property to indicate an error condition that returns a finite number in case of success. Note, however, that [`NaN`](../../globals/NaN.mdx) would be more appropriate in such a case.\n\nBecause `Number.POSITIVE_INFINITY` is a static property of `Number`, you always use it as `Number.POSITIVE_INFINITY`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Number/epsilon.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.EPSILON\n\nThe **`Number.EPSILON`** property represents the difference between 1 and the smallest floating point number greater than 1.\n\n## Value\n\n2<sup>-52</sup>, or approximately `2.2204460492503130808472633361816E-16`.\n\n## Description\n\n`Number.EPSILON` is the difference between 1 and the next greater number representable in the Number format, because [double precision floating point format](https://en.wikipedia.org/wiki/Double_precision_floating-point_format) only has 52 bits to represent the [mantissa](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_encoding), and the lowest bit has a significance of 2<sup>-52</sup>.\n\nNote that the absolute accuracy of floating numbers decreases as the number gets larger, because the exponent grows while the mantissa's accuracy stays the same. `Number.MIN_VALUE` is the smallest representable positive number, which is much smaller than `Number.EPSILON`.\n\nBecause `EPSILON` is a static property of `Number`, you always use it as `Number.EPSILON`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Number/isFinite.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isFinite()\n\nThe **`Number.isFinite()`** method determines whether the passed value is a finite number — that is, it checks that a given value is a number, and the number is neither positive [`Infinity`](../../globals/Infinity.mdx), negative `Infinity`, nor [`NaN`](../../globals/NaN.mdx).\n\n## Syntax\n\n```js\nNumber.isFinite(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested for finiteness.\n\n### Return value\n\nThe boolean value `true` if the given value is a finite number. Otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Number/isInteger.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isInteger()\n\nThe **`Number.isInteger()`** method determines whether the passed value is an integer.\n\n## Syntax\n\n```js\nNumber.isInteger(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested for being an integer.\n\n### Return value\n\nThe boolean value `true` if the given value is an integer. Otherwise `false`.\n\n## Description\n\nIf the target value is an integer, return `true`, otherwise return `false`. If the value is [`NaN`](../../globals/NaN.mdx) or [`Infinity`](../../globals/Infinity.mdx), return `false`. The method will also return `true` for floating point numbers that can be represented as integer. It will always return `false` if the value is not a number.\n\nNote that some number literals, while looking like non-integers, actually represent integers — due to the precision limit of ECMAScript floating-point number encoding (IEEE-754). For example, `5.0000000000000001` only differs from `5` by `1e-16`, which is too small to be represented. (For reference, [`Number.EPSILON`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/EPSILON) stores the distance between 1 and the next representable floating-point number greater than 1, and that is about `2.22e-16`.) Therefore, `5.0000000000000001` will be represented with the same encoding as `5`, thus making `Number.isInteger(5.0000000000000001)` return `true`.\n\nIn a similar sense, numbers around the magnitude of [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER) will suffer from loss of precision and make `Number.isInteger` return `true` even when it's not an integer. (The actual threshold varies based on how many bits are needed to represent the decimal — for example, `Number.isInteger(4500000000000000.1)` is `true`, but `Number.isInteger(4500000000000000.5)` is `false`.)\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Number/isNaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isNaN()\n\nThe **`Number.isNaN()`** method determines whether the passed value is the number value [`NaN`](../../globals/NaN.mdx), and returns `false` if the input is not of the Number type. It is a more robust version of the original, global `isNaN()` function.\n\n## Syntax\n\n```js\nNumber.isNaN(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested for [`NaN`](../../globals/NaN.mdx).\n\n### Return value\n\nThe boolean value `true` if the given value is a number with value [`NaN`](../../globals/NaN.mdx). Otherwise, `false`.\n\n## Description\n\nThe function `Number.isNaN()` provides a convenient way to check for equality with `NaN`. Note that you cannot test for equality with `NaN` using either the [`==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Equality) or [`===`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) operators, because unlike all other value comparisons in JavaScript, these evaluate to `false` whenever one operand is [`NaN`](../../globals/NaN.mdx), even if the other operand is also [`NaN`](../../globals/NaN.mdx).\n\nSince `x !== x` is only true for `NaN` among all possible JavaScript values, `Number.isNaN(x)` can also be replaced with a test for `x !== x`, despite the latter being less readable.\n\nAs opposed to the global `isNaN()` function, the `Number.isNaN()` method doesn't force-convert the parameter to a number. This makes it safe to pass values that would normally convert to [`NaN`](../../globals/NaN.mdx) but aren't actually the same value as [`NaN`](../../globals/NaN.mdx). This also means that only values of the Number type that are also [`NaN`](../../globals/NaN.mdx) return `true`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Number/isSafeInteger.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isSafeInteger()\n\nThe **`Number.isSafeInteger()`** method determines whether the provided value is a number that is a _safe integer_.\n\n## Syntax\n\n```js\nNumber.isSafeInteger(testValue)\n```\n\n### Parameters\n\n- `testValue`\n  - : The value to be tested for being a safe integer.\n\n### Return value\n\nThe boolean value `true` if the given value is a number that is a safe integer. Otherwise `false`.\n\n## Description\n\nThe safe integers consist of all integers from -(2<sup>53</sup> - 1) to 2<sup>53</sup> - 1, inclusive (±9,007,199,254,740,991). A safe integer is an integer that:\n\n- can be exactly represented as an IEEE-754 double precision number, and\n- whose IEEE-754 representation cannot be the result of rounding any other integer to fit the IEEE-754 representation.\n\nFor example, 2<sup>53</sup> - 1 is a safe integer: it can be exactly represented, and no other integer rounds to it under any IEEE-754 rounding mode. In contrast, 2<sup>53</sup> is _not_ a safe integer: it can be exactly represented in IEEE-754, but the integer 2<sup>53</sup> + 1 can't be directly represented in IEEE-754 but instead rounds to 2<sup>53</sup> under round-to-nearest and round-to-zero rounding.\n\nHandling values larger or smaller than \\~9 quadrillion with full precision requires using an [arbitrary precision arithmetic library](https://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic). See [What Every Programmer Needs to Know about Floating Point Arithmetic](https://floating-point-gui.de/) for more information on floating point representations of numbers.\n\nFor larger integers, consider using the `BigInt` type.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Number/parseFloat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.parseFloat()\n\nThe **`Number.parseFloat()`** method parses an argument and returns a floating point number. If a number cannot be parsed from the argument, it returns [`NaN`](../../globals/NaN.mdx).\n\n## Syntax\n\n```js\nNumber.parseFloat(string)\n```\n\n### Parameters\n\n- `string`\n  - : The value to parse, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). Leading whitespace in this argument is ignored.\n\n### Return value\n\nA floating point number parsed from the given `string`.\n\nOr [`NaN`](../../globals/NaN.mdx) when the first non-whitespace character cannot be converted to a number.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Number/parseInt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.parseInt()\n\nThe **`Number.parseInt()`** method parses a string argument and\nreturns an integer of the specified radix or base.\n\n## Syntax\n\n```js\nNumber.parseInt(string)\nNumber.parseInt(string, radix)\n```\n\n### Parameters\n\n- `string`\n  - : The value to parse, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). Leading whitespace in this argument is ignored.\n- `radix` _**optional**_\n\n  - : An integer between `2` and `36` that represents the\n    _radix_ (the base in mathematical numeral systems) of the\n    `string`.\n\n    If `radix` is undefined or `0`, it is assumed to be `10` except when the number begins with the code unit pairs `0x` or `0X`, in which case a radix of `16` is assumed.\n\n### Return value\n\nAn integer parsed from the given `string`.\n\nIf the `radix` is smaller than `2` or bigger than\n`36`, or the first non-whitespace character cannot be converted to a number,\n[`NaN`](../../globals/NaN.mdx) is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Number/prototype/toExponential.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toExponential()\n\nThe **`toExponential()`** method returns a string representing\nthe `Number` object in exponential notation.\n\n## Syntax\n\n```js\ntoExponential()\ntoExponential(fractionDigits)\n```\n\n### Parameters\n\n- `fractionDigits` _**optional**_\n  - : Optional. An integer specifying the number of digits after the decimal point.\n    Defaults to as many digits as necessary to specify the number.\n\n### Return value\n\nA string representing the given `Number` object in exponential notation\nwith one digit before the decimal point, rounded to\n`fractionDigits` digits after the decimal point.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : If `fractionDigits` is too small or too large. Values between\n    `0` and `100`, inclusive, will not cause a\n    [`RangeError`](../../../globals/RangeError/RangeError.mdx).\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If this method is invoked on an object that is not a `Number`.\n\n## Description\n\nIf the `fractionDigits` argument is omitted, the number of digits\nafter the decimal point defaults to the number of digits necessary to represent the\nvalue uniquely.\n\nIf you use the `toExponential()` method for a numeric literal and the\nnumeric literal has no exponent and no decimal point, leave whitespace(s) before the dot\nthat precedes the method call to prevent the dot from being interpreted as a decimal\npoint.\n\nIf a number has more digits than requested by the\n`fractionDigits` parameter, the number is rounded to the nearest\nnumber represented by `fractionDigits` digits. See the discussion\nof rounding in the description of the [`Number.prototype.toFixed()`](../../../globals/Number/prototype/toFixed.mdx) method, which also applies to `toExponential()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Number/prototype/toFixed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toFixed()\n\nThe **`toFixed()`** method formats a number using fixed-point notation.\n\n## Syntax\n\n```js\ntoFixed()\ntoFixed(digits)\n```\n\n### Parameters\n\n- `digits` _**optional**_\n  - : The number of digits to appear after the decimal point; should be a value between `0` and `100`, inclusive. If this argument is omitted, it is treated as `0`.\n\n### Return value\n\nA string representing the given number using fixed-point notation.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : If `digits` is smaller than `0`, larger than `100`, or is `NaN`.\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If this method is invoked on an object that is not a `Number`.\n\n## Description\n\nThe `toFixed()` method returns a string representation of `numObj` that does not use exponential notation and has exactly `digits` digits after the decimal place. The number is rounded if necessary, and the fractional part is padded with zeros if necessary so that it has the specified length.\n\nIf the absolute value of `numObj` is greater or equal to 10<sup>21</sup>, this method uses the same algorithm as [`Number.prototype.toString()`](../../../globals/Number/prototype/toString.mdx) and returns a string in exponential notation. `toFixed()` returns `\"Infinity\"`, `\"NaN\"`, or `\"-Infinity\"` if the value of `numObj` is non-finite.\n\nThe output of `toFixed()` may be more precise than [`toString()`](../../../globals/Number/prototype/toString.mdx) for some values, because `toString()` only prints enough significant digits to distinguish the number from adjacent number values. For example:\n\n```js\n(1000000000000000128).toString(); // '1000000000000000100'\n(1000000000000000128).toFixed(0); // '1000000000000000128'\n```\n\nHowever, choosing a `digits` precision that's too high can return unexpected results, because decimal fractional numbers cannot be represented precisely in floating point. For example:\n\n```js\n0.3.toFixed(50); // '0.29999999999999998889776975374843459576368331909180'\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Number/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string with a language-sensitive representation of this number. In implementations with [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) support, this method simply calls `Intl.NumberFormat`.\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` parameters customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat), these parameters correspond exactly to the [`Intl.NumberFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) constructor's parameters. Implementations without `Intl.NumberFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#locales) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored.\n\nSee the [`Intl.NumberFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string with a language-sensitive representation of the given number.\n\nIn implementations with `Intl.NumberFormat`, this is equivalent to `new Intl.NumberFormat(locales, options).format(number)`.\n\n## Performance\n\nWhen formatting large numbers of numbers, it is better to create a\n`Intl.NumberFormat` object and use the function provided by its\n`format` property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Number/prototype/toPrecision.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toPrecision()\n\nThe **`toPrecision()`** method returns a string representing\nthe `Number` object to the specified precision.\n\n## Syntax\n\n```js\ntoPrecision()\ntoPrecision(precision)\n```\n\n### Parameters\n\n- `precision` _**optional**_\n  - : An integer specifying the number of significant digits.\n\n### Return value\n\nA string representing a `Number` object in fixed-point or exponential\nnotation rounded to `precision` significant digits. See the discussion of\nrounding in the description of the [`Number.prototype.toFixed()`](../../../globals/Number/prototype/toFixed.mdx) method,\nwhich also applies to `toPrecision()`.\n\nIf the `precision` argument is omitted, behaves as\n[`Number.prototype.toString()`](../../../globals/Number/prototype/toString.mdx). If the `precision` argument is a\nnon-integer value, it is rounded to the nearest integer.\n\n### Exceptions\n\n- `RangeError`\n  - : If `precision` is not between `1` and `100`\n    (inclusive), a [`RangeError`](../../../globals/RangeError/RangeError.mdx) is thrown. Implementations are allowed to\n    support larger and smaller values as well. ECMA-262 only requires a precision of up to\n    21 significant digits.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Number/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified number value.\n\n## Syntax\n\n```js\ntoString()\ntoString(radix)\n```\n\n### Parameters\n\n- `radix` _**optional**_\n  - : An integer in the range `2` through `36` specifying the base to use for representing the number value. Defaults to 10.\n\n### Return value\n\nA string representing the specified number value.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `radix` is less than 2 or greater than 36.\n\n## Description\n\nThe `Number` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For `Number` values, the `toString` method returns a string representation of the value in the specified radix.\n\nFor radixes above 10, the letters of the alphabet indicate digits greater than 9. For example, for hexadecimal numbers (base 16) `a` through `f` are used.\n\nIf the specified number value is negative, the sign is preserved. This is the case even if the radix is 2; the string returned is the positive binary representation of the number value preceded by a `-` sign, **not** the two's complement of the number value.\n\nBoth `0` and `-0` have `\"0\"` as their string representation. [`Infinity`](../../../globals/Infinity.mdx) returns `\"Infinity\"` and [`NaN`](../../../globals/NaN.mdx) returns `\"NaN\"`.\n\nIf the number is not a whole number, the decimal point `.` is used to separate the decimal places. [Scientific notation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#exponential) is used if the radix is 10 and the number's magnitude (ignoring sign) is greater than or equal to 10<sup>21</sup> or less than 10<sup>-6</sup>. In this case, the returned string always explicitly specifies the sign of the exponent.\n\n```js\nconsole.log((10 ** 21.5).toString()); // \"3.1622776601683794e+21\"\nconsole.log((10 ** 21.5).toString(8)); // \"526665530627250154000000\"\n```\n\nThe `toString()` method requires its `this` value to be a `Number` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to number values.\n\nBecause `Number` doesn't have a [`[Symbol.toPrimitive]()`](../../../globals/Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `Number` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, Number _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — rather, they are directly converted using the same algorithm as the initial `toString()` implementation.\n\n```js\nNumber.prototype.toString = () => \"Overridden\";\nconsole.log(`${1}`); // \"1\"\nconsole.log(`${new Number(1)}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Number/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.valueOf()\n\nThe **`valueOf()`** method returns the wrapped primitive value\nof a `Number` object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nA number representing the primitive value of the specified `Number` object.\n\n## Description\n\nThis method is usually called internally by JavaScript and not explicitly in web code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Object/Object.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object()\n\nThe **`Object` constructor** turns the input into an object. Its behavior depends on the input's type.\n\n- If the value is [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../globals/undefined.mdx), it creates and returns an empty object.\n- Otherwise, it returns an object of a Type that corresponds to the given value.\n- If the value is an object already, it returns the value.\n\n## Syntax\n\n```js\nnew Object(value)\nObject(value)\n```\n\n> **Note:** `Object()` can be called with or without `new`. Both create a new object.\n\n### Parameters\n\n- `value`\n  - : Any value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Object/assign.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.assign()\n\nThe **`Object.assign()`** method\ncopies all [enumerable](../../globals/Object/prototype/propertyIsEnumerable.mdx)\n[own properties](../../globals/Object/hasOwn.mdx) from one or more\n_source objects_ to a _target object_. It returns the modified target\nobject.\n\n## Syntax\n\n```js\nObject.assign(target, ...sources)\n```\n\n### Parameters\n\n- `target`\n  - : The target object — what to apply the sources' properties to, which is returned\n    after it is modified.\n- `sources`\n  - : The source object(s) — objects containing the properties you want to apply.\n\n### Return value\n\nThe target object.\n\n## Description\n\nProperties in the target object are overwritten by properties in the sources if they\nhave the same \"key\". Later sources' properties overwrite earlier ones.\n\nThe `Object.assign()` method only copies _enumerable_ and\n_own_ properties from a source object to a target object. It uses\n`[[Get]]` on the source and `[[Set]]` on the target, so it will\ninvoke [getters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/get) and [setters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/set). Therefore it\n_assigns_ properties, versus copying or defining new properties. This may make it\nunsuitable for merging new properties into a prototype if the merge sources contain\ngetters.\n\nFor copying property definitions (including their enumerability) into prototypes, use\n[`Object.getOwnPropertyDescriptor()`](../../globals/Object/getOwnPropertyDescriptor.mdx) and\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx) instead.\n\nBoth `String` and `Symbol` properties are copied.\n\nIn case of an error, for example if a property is non-writable, a\n[`TypeError`](../../globals/TypeError/TypeError.mdx) is raised, and the `target` object is\nchanged if any properties are added before the error is raised.\n\n> **Note:** `Object.assign()` does not throw on\n> [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../globals/undefined.mdx) sources.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Object/create.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.create()\n\nThe **`Object.create()`** method creates a new object, using an existing object as the prototype of the newly created object.\n\n## Syntax\n\n```js\nObject.create(proto)\nObject.create(proto, propertiesObject)\n```\n\n### Parameters\n\n- `proto`\n  - : The object which should be the prototype of the newly-created object.\n- `propertiesObject` _**optional**_\n  - : If specified and not [`undefined`](../../globals/undefined.mdx), an object whose [enumerable own properties](https://developer.mozilla.org/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) specify property descriptors to be added to the newly-created object, with the corresponding property names. These properties correspond to the second argument of [`Object.defineProperties()`](../../globals/Object/defineProperties.mdx).\n\n### Return value\n\nA new object with the specified prototype object and properties.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if `proto` is neither [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) nor an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Object/defineProperties.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.defineProperties()\n\nThe **`Object.defineProperties()`** method defines new or\nmodifies existing properties directly on an object, returning the object.\n\n## Syntax\n\n```js\nObject.defineProperties(obj, props)\n```\n\n### Parameters\n\n- `obj`\n  - : The object on which to define or modify properties.\n- `props`\n\n  - : An object whose keys represent the names of properties to be defined or modified and\n    whose values are objects describing those properties. Each value in `props`\n    must be either a data descriptor or an accessor descriptor; it cannot be both (see\n    [`Object.defineProperty()`](../../globals/Object/defineProperty.mdx) for more details).\n\n    Data descriptors and accessor descriptors may optionally contain the following keys:\n\n    - `configurable`\n      - : `true` if and only if the type of this property descriptor may be\n        changed and if the property may be deleted from the corresponding object.\n        **Defaults to `false`.**\n    - `enumerable`\n      - : `true` if and only if this property shows up during enumeration of\n        the properties on the corresponding object.\n        **Defaults to `false`.**\n\n    A data descriptor also has the following optional keys:\n\n    - `value`\n      - : The value associated with the property. Can be any valid JavaScript value\n        (number, object, function, etc.).\n        **Defaults to [`undefined`](../../globals/undefined.mdx).**\n    - `writable`\n      - : `true` if and only if the value associated with the property may be\n        changed with an assignment operator.\n        **Defaults to `false`.**\n\n    An accessor descriptor also has the following optional keys:\n\n    - `get`\n      - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx)\n        if there is no getter. The function's return value will be used as the value of\n        the property.\n        **Defaults to [`undefined`](../../globals/undefined.mdx).**\n    - `set`\n      - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx)\n        if there is no setter. The function will receive as its only argument the new\n        value being assigned to the property.\n        **Defaults to [`undefined`](../../globals/undefined.mdx).**\n\n    If a descriptor has neither of `value`, `writable`,\n    `get` and `set` keys, it is treated as a data descriptor. If a\n    descriptor has both `value` or `writable` and `get`\n    or `set` keys, an exception is thrown.\n\n### Return value\n\nThe object that was passed to the function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Object/defineProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.defineProperty()\n\nThe static method **`Object.defineProperty()`** defines a new\nproperty directly on an object, or modifies an existing property on an object, and\nreturns the object.\n\n## Syntax\n\n```js\nObject.defineProperty(obj, prop, descriptor)\n```\n\n### Parameters\n\n- `obj`\n  - : The object on which to define the property.\n- `prop`\n  - : The name or `Symbol` of the property to be defined or modified.\n- `descriptor`\n  - : The descriptor for the property being defined or modified.\n\n### Return value\n\nThe object that was passed to the function.\n\n## Description\n\nThis method allows a precise addition to or modification of a property on an object.\nNormal property addition through assignment creates properties which show up during\nproperty enumeration (`for...in` loop or\n[`Object.keys`](../../globals/Object/keys.mdx) method), whose values may be changed, and which may be\ndeleted. This method allows these extra details\nto be changed from their defaults. By default, properties added using\n`Object.defineProperty()` are not writable, not enumerable, and not configurable.\n\nProperty descriptors present in objects come in two main flavors: data descriptors and\naccessor descriptors. A **data descriptor** is a property that has a\nvalue, which may or may not be writable. An **accessor descriptor** is a\nproperty described by a getter-setter pair of functions. A descriptor must be one of\nthese two flavors; it cannot be both.\n\nBoth data and accessor descriptors are objects. They share the following optional keys\n(please note: the **defaults** mentioned here are in the case of defining\nproperties using `Object.defineProperty()`):\n\n- `configurable`\n\n  - : when this is set to `false`,\n\n    - the type of this property cannot be changed between data property and accessor property, and\n    - the property may not be deleted, and\n    - other attributes of its descriptor cannot be changed (however, if it's a data descriptor with `writable: true`, the `value` can be changed, and `writable` can be changed to `false`).\n\n    **Defaults to `false`.**\n\n- `enumerable`\n  - : `true` if and only if this property shows up during enumeration of the\n    properties on the corresponding object.\n    **Defaults to `false`.**\n\nA **data descriptor** also has the following optional keys:\n\n- `value`\n  - : The value associated with the property. Can be any valid JavaScript value (number,\n    object, function, etc.).\n    **Defaults to [`undefined`](../../globals/undefined.mdx).**\n- `writable`\n  - : `true` if the value associated with the property may be changed with an\n    assignment operator.\n    **Defaults to `false`.**\n\nAn **accessor descriptor** also has the following optional keys:\n\n- `get`\n  - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no getter. When the property is accessed, this function is called without\n    arguments and with `this` set to the object through which the property is\n    accessed (this may not be the object on which the property is defined due to\n    inheritance). The return value will be used as the value of the property.\n    **Defaults to [`undefined`](../../globals/undefined.mdx).**\n- `set`\n  - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no setter. When the property is assigned, this function is called with one\n    argument (the value being assigned to the property) and with `this` set to\n    the object through which the property is assigned.\n    **Defaults to [`undefined`](../../globals/undefined.mdx).**\n\nIf a descriptor has neither of `value`, `writable`,\n`get` and `set` keys, it is treated as a data descriptor. If a\ndescriptor has both \\[`value` or `writable`] and \\[`get` or `set`] keys, an exception is thrown.\n\nBear in mind that these attributes are not necessarily the descriptor's own properties.\nInherited properties will be considered as well. In order to ensure these defaults are\npreserved, you might freeze existing objects in the descriptor object's prototype chain upfront, specify all\noptions explicitly, or point to [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) with [`Object.create(null)`](../../globals/Object/create.mdx).\n\n```js\nconst obj = {};\n// 1. Using a null prototype: no inherited properties\nconst descriptor = Object.create(null);\ndescriptor.value = 'static';\n\n// not enumerable, not configurable, not writable as defaults\nObject.defineProperty(obj, 'key', descriptor);\n\n// 2. Being explicit by using a throw-away object literal with all attributes present\nObject.defineProperty(obj, 'key2', {\n  enumerable: false,\n  configurable: false,\n  writable: false,\n  value: 'static'\n});\n\n// 3. Recycling same object\nfunction withValue(value) {\n  const d = withValue.d || (\n    withValue.d = {\n      enumerable: false,\n      writable: false,\n      configurable: false,\n      value,\n    }\n  );\n\n  // avoiding duplicate operation for assigning value\n  if (d.value !== value) d.value = value;\n\n  return d;\n}\n// and\nObject.defineProperty(obj, 'key', withValue('static'));\n\n// if freeze is available, prevents adding or\n// removing the object prototype properties\n// (value, get, set, enumerable, writable, configurable)\n(Object.freeze || Object)(Object.prototype);\n```\n\nWhen the property already exists, `Object.defineProperty()` attempts to modify the property according to the values in the descriptor and the property's current configuration.\n\nIf the old descriptor had its `configurable` attribute set to `false`, the property is said to be _non-configurable_. It is not possible to change any attribute of a non-configurable accessor property, and it is not possible to switch between data and accessor property types. For data properties with `writable: true`, it is possible to modify the value and change the `writable` attribute from `true` to `false`. A [`TypeError`](../../globals/TypeError/TypeError.mdx) is thrown when attempts are made to change non-configurable property attributes (except `value` and `writable`, if permitted), except when defining a value same as the original value on a data property.\n\nWhen the current property is configurable, defining an attribute to `undefined` effectively deletes it. For example, if `o.k` is an accessor property, `Object.defineProperty(o, \"k\", { set: undefined })` will remove the setter, making `k` only have a getter and become readonly. If an attribute is absent from the new descriptor, the old descriptor attribute's value is kept (it won't be implicitly re-defined to `undefined`). It is possible to toggle between data and accessor property by giving a descriptor of a different \"flavor\". For example, if the new descriptor is a data descriptor (with `value` or `writable`), the original descriptor's `get` and `set` attributes will both be dropped.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Object/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.entries()\n\nThe **`Object.entries()`** method returns an array of a given object's own enumerable string-keyed property key-value pairs.\n\n## Syntax\n\n```js\nObject.entries(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : An object.\n\n### Return value\n\nAn array of the given object's own enumerable string-keyed property key-value pairs. Each key-value pair is an array with two elements: the first element is the property key (which is always a string), and the second element is the property value.\n\n## Description\n\n`Object.entries()` returns an array whose elements are arrays corresponding to the enumerable string-keyed property key-value pairs found directly upon `object`. This is the same as iterating with a `for...in` loop, except that a `for...in` loop enumerates properties in the prototype chain as well. The order of the array returned by `Object.entries()` is the same as that provided by a `for...in` loop.\n\nIf you only need the property keys, use [`Object.keys()`](../../globals/Object/keys.mdx) instead. If you only need the property values, use [`Object.values()`](../../globals/Object/values.mdx) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Object/freeze.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.freeze()\n\nThe **`Object.freeze()`** method _freezes_ an object. Freezing an object [prevents extensions](../../globals/Object/preventExtensions.mdx) and makes existing properties non-writable and non-configurable. A frozen object can no longer be changed: new properties cannot be added, existing properties cannot be removed, their enumerability, configurability, writability, or value cannot be changed, and the object's prototype cannot be re-assigned. `freeze()` returns the same object that was passed in.\n\nFreezing an object is the highest integrity level that JavaScript provides.\n\n## Syntax\n\n```js\nObject.freeze(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object to freeze.\n\n### Return value\n\nThe object that was passed to the function.\n\n## Description\n\nFreezing an object is equivalent to [preventing extensions](../../globals/Object/preventExtensions.mdx) and then changing all existing [properties' descriptors'](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty#description) `configurable` to `false` — and for data properties, `writable` to `false` as well. Nothing can be added to or removed from the properties set of a frozen object. Any attempt to do so will fail, either silently or by throwing a [`TypeError`](../../globals/TypeError/TypeError.mdx) exception (most commonly, but not exclusively, when in \"strict mode\").\n\nFor data properties of a frozen object, their values cannot be changed since the writable and\nconfigurable attributes are set to false. Accessor properties (getters and setters) work the same — the property value returned by the getter may still change, and the setter can still be called without throwing errors when setting the property. Note that values\nthat are objects can still be modified, unless they are also frozen. As an object, an\narray can be frozen; after doing so, its elements cannot be altered and no elements can\nbe added to or removed from the array.\n\n`freeze()` returns the same object that was passed into the function. It\n_does not_ create a frozen copy.\n\nA `TypedArray` or a [`DataView`](../../globals/DataView/DataView.mdx) with elements will cause a [`TypeError`](../../globals/TypeError/TypeError.mdx),\nas they are views over memory and will definitely cause other possible issues:\n\n```js\nObject.freeze(new Uint8Array(0)) // No elements\n// Uint8Array []\n\nObject.freeze(new Uint8Array(1)) // Has elements\n// TypeError: Cannot freeze array buffer views with elements\n\nObject.freeze(new DataView(new ArrayBuffer(32))) // No elements\n// DataView {}\n\nObject.freeze(new Float64Array(new ArrayBuffer(64), 63, 0)) // No elements\n// Float64Array []\n\nObject.freeze(new Float64Array(new ArrayBuffer(64), 32, 2)) // Has elements\n// TypeError: Cannot freeze array buffer views with elements\n```\n\nNote that as the standard three properties (`buf.byteLength`,\n`buf.byteOffset` and `buf.buffer`) are read-only (as are those of\nan `ArrayBuffer`, there is no reason for\nattempting to freeze these properties.\n\nUnlike [`Object.seal()`](../../globals/Object/seal.mdx), existing properties in objects frozen with `Object.freeze()` are made immutable and data properties cannot be re-assigned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Object/fromEntries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.fromEntries()\n\nThe **`Object.fromEntries()`** method transforms a list of key-value pairs into an object.\n\n## Syntax\n\n```js\nObject.fromEntries(iterable)\n```\n\n### Parameters\n\n- `iterable`\n\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol), such as an `Array` or [Map](../../globals/Map/Map.mdx), containing a list of objects. Each object should have two properties:\n\n    - `0`\n      - : A string or `Symbol` representing the property key.\n    - `1`\n      - : The property value.\n\n    Typically, this object is implemented as a two-element array, with the first element being the property key and the second element being the property value.\n\n### Return value\n\nA new object whose properties are given by the entries of the iterable.\n\n## Description\n\nThe `Object.fromEntries()` method takes a list of key-value pairs and returns a new object whose properties are given by those entries. The `iterable` argument is expected to be an object that implements an `@@iterator` method. The method returns an iterator object that produces two-element array-like objects. The first element is a value that will be used as a property key, and the second element is the value to associate with that property key.\n\n`Object.fromEntries()` performs the reverse of [`Object.entries()`](../../globals/Object/entries.mdx), except that `Object.entries()` only returns string-keyed properties, while `Object.fromEntries()` can also create symbol-keyed properties.\n\n> **Note:** Unlike [`Array.from()`](../../globals/Array/from.mdx), `Object.fromEntries()` does not use the value of `this`, so calling it on another constructor does not create objects of that type.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Object/getOwnPropertyDescriptor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertyDescriptor()\n\nThe **`Object.getOwnPropertyDescriptor()`** method returns an\nobject describing the configuration of a specific property on a given object (that is,\none directly present on an object and not in the object's prototype chain). The object\nreturned is mutable but mutating it has no effect on the original property's\nconfiguration.\n\n## Syntax\n\n```js\nObject.getOwnPropertyDescriptor(obj, prop)\n```\n\n### Parameters\n\n- `obj`\n  - : The object in which to look for the property.\n- `prop`\n  - : The name or `Symbol` of the property whose description is to be\n    retrieved.\n\n### Return value\n\nA property descriptor of the given property if it exists on the object,\n[`undefined`](../../globals/undefined.mdx) otherwise.\n\n## Description\n\nThis method permits examination of the precise description of a property. A\n_property_ in JavaScript consists of either a string-valued name or a\n`Symbol` and a property descriptor. Further information about property\ndescriptor types and their attributes can be found in\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx).\n\nA _property descriptor_ is a record with some of the following attributes:\n\n- `value`\n  - : The value associated with the property (data descriptors only).\n- `writable`\n  - : `true` if and only if the value associated with the property may be\n    changed (data descriptors only).\n- `get`\n  - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no getter (accessor descriptors only).\n- `set`\n  - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no setter (accessor descriptors only).\n- `configurable`\n  - : `true` if and only if the type of this property descriptor may be changed\n    and if the property may be deleted from the corresponding object.\n- `enumerable`\n  - : `true` if and only if this property shows up during enumeration of the\n    properties on the corresponding object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Object/getOwnPropertyDescriptors.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertyDescriptors()\n\nThe **`Object.getOwnPropertyDescriptors()`** method returns all\nown property descriptors of a given object.\n\n## Syntax\n\n```js\nObject.getOwnPropertyDescriptors(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object for which to get all own property descriptors.\n\n### Return value\n\nAn object containing all own property descriptors of an object. Might be an empty\nobject, if there are no properties.\n\n## Description\n\nThis method permits examination of the precise description of all own properties of an\nobject. A _property_ in JavaScript consists of either a string-valued name or a\n`Symbol` and a property descriptor. Further information about property\ndescriptor types and their attributes can be found in\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx).\n\nA _property descriptor_ is a record with some of the following attributes:\n\n- `value`\n  - : The value associated with the property (data descriptors only).\n- `writable`\n  - : `true` if and only if the value associated with the property may be\n    changed (data descriptors only).\n- `get`\n  - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no getter (accessor descriptors only).\n- `set`\n  - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no setter (accessor descriptors only).\n- `configurable`\n  - : `true` if and only if the type of this property descriptor may be changed\n    and if the property may be deleted from the corresponding object.\n- `enumerable`\n  - : `true` if and only if this property shows up during enumeration of the\n    properties on the corresponding object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Object/getOwnPropertyNames.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertyNames()\n\nThe **`Object.getOwnPropertyNames()`** method returns an array of all properties (including non-enumerable properties except for those which use Symbol) found directly in a given object.\n\n## Syntax\n\n```js\nObject.getOwnPropertyNames(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object whose enumerable and non-enumerable properties are to be returned.\n\n### Return value\n\nAn array of strings that corresponds to the properties found directly in the given object.\n\n## Description\n\n`Object.getOwnPropertyNames()` returns an array whose elements are strings corresponding to the enumerable and non-enumerable properties found directly in a given object `obj`. The ordering of the enumerable properties in the array is consistent with the ordering exposed by a `for...in` loop (or by [`Object.keys()`](../../globals/Object/keys.mdx)) over the properties of the object. The non-negative integer keys of the object (both enumerable and non-enumerable) are added in ascending order to the array first, followed by the string keys in the order of insertion.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Object/getOwnPropertySymbols.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertySymbols()\n\nThe **`Object.getOwnPropertySymbols()`** method returns an array of all symbol properties found directly upon a given object.\n\n## Syntax\n\n```js\nObject.getOwnPropertySymbols(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object whose symbol properties are to be returned.\n\n### Return value\n\nAn array of all symbol properties found directly upon the given object.\n\n## Description\n\nSimilar to [`Object.getOwnPropertyNames()`](../../globals/Object/getOwnPropertyNames.mdx), you can get all symbol properties of a given object as an array of symbols. Note that [`Object.getOwnPropertyNames()`](../../globals/Object/getOwnPropertyNames.mdx) itself does not contain the symbol properties of an object and only the string properties.\n\nAs all objects have no own symbol properties initially, `Object.getOwnPropertySymbols()` returns an empty array unless you have set symbol properties on your object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Object/getPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getPrototypeOf()\n\nThe **`Object.getPrototypeOf()`** method returns the prototype\n(i.e. the value of the internal `[[Prototype]]` property) of the specified\nobject.\n\n## Syntax\n\n```js\nObject.getPrototypeOf(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object whose prototype is to be returned.\n\n### Return value\n\nThe prototype of the given object, which may be `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Object/hasOwn.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.hasOwn()\n\nThe **`Object.hasOwn()`** static method returns `true` if the specified object has the indicated property as its _own_ property.\nIf the property is inherited, or does not exist, the method returns `false`.\n\n> **Note:** `Object.hasOwn()` is intended as a replacement for [`Object.prototype.hasOwnProperty()`](../../globals/Object/prototype/hasOwnProperty.mdx).\n\n\n\n## Syntax\n\n```js\nhasOwn(instance, prop)\n```\n\n### Parameters\n\n- `instance`\n  - : The JavaScript object instance to test.\n- `prop`\n  - : The `String` name or [Symbol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol) of the property to test.\n\n### Return value\n\n`true` if the specified object has directly defined the specified property.\nOtherwise `false`\n\n## Description\n\nThe **`Object.hasOwn()`** method returns `true` if the specified property is a\ndirect property of the object — even if the property value is `null` or `undefined`.\nThe method returns `false` if the property is inherited, or has not been declared at all.\nUnlike the `in` operator, this\nmethod does not check for the specified property in the object's prototype chain.\n\nIt is recommended over [`Object.prototype.hasOwnProperty()`](../../globals/Object/prototype/hasOwnProperty.mdx) because\nit works for objects created using `Object.create(null)` and with objects that\nhave overridden the inherited `hasOwnProperty()` method. While it is possible to\nworkaround these problems by calling `Object.prototype.hasOwnProperty()` on an\nexternal object, `Object.hasOwn()` is more intuitive.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Object/is.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.is()\n\nThe **`Object.is()`** method determines whether two values are [the same value](https://developer.mozilla.org/docs/Web/JavaScript/Equality_comparisons_and_sameness#same-value_equality_using_object.is).\n\n## Syntax\n\n```js\nObject.is(value1, value2)\n```\n\n### Parameters\n\n- `value1`\n  - : The first value to compare.\n- `value2`\n  - : The second value to compare.\n\n### Return value\n\nA boolean indicating whether or not the two arguments are the same value.\n\n## Description\n\n`Object.is()` determines whether two values are [the same value](https://developer.mozilla.org/docs/Web/JavaScript/Equality_comparisons_and_sameness#same-value_equality_using_object.is). Two values are the same if one of the following holds:\n\n- both [`undefined`](../../globals/undefined.mdx)\n- both `null`\n- both `true` or both `false`\n- both strings of the same length with the same characters in the same order\n- both the same object (meaning both values reference the same object in memory)\n- both `BigInts` with the same numeric value\n- both `Symbols` that reference the same symbol value\n- both numbers and\n\n  - both `+0`\n  - both `-0`\n  - both [`NaN`](../../globals/NaN.mdx)\n  - or both non-zero, not [`NaN`](../../globals/NaN.mdx), and have the same value\n\n`Object.is()` is not equivalent to the [`==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Equality) operator. The `==` operator applies various coercions to both sides (if they are not the same type) before testing for equality (resulting in such behavior as `\"\" == false` being `true`), but `Object.is()` doesn't coerce either value.\n\n`Object.is()` is also _not_ equivalent to the [`===`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) operator. The only difference between `Object.is()` and `===` is in their treatment of signed zeros and `NaN` values. The `===` operator (and the `==` operator) treats the number values `-0` and `+0` as equal, but treats [`NaN`](../../globals/NaN.mdx) as not equal to each other.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Object/isExtensible.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.isExtensible()\n\nThe **`Object.isExtensible()`** method determines if an object\nis extensible (whether it can have new properties added to it).\n\n## Syntax\n\n```js\nObject.isExtensible(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be checked.\n\n### Return value\n\nA `Boolean` indicating whether or not the given object is extensible.\n\n## Description\n\nObjects are extensible by default: they can have new properties added to them, and their `[[Prototype]]` can be re-assigned. An object can be marked as non-extensible using one of [`Object.preventExtensions()`](../../globals/Object/preventExtensions.mdx), [`Object.seal()`](../../globals/Object/seal.mdx), [`Object.freeze()`](../../globals/Object/freeze.mdx), or [`Reflect.preventExtensions()`](../../globals/Reflect/preventExtensions.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Object/isFrozen.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.isFrozen()\n\nThe **`Object.isFrozen()`** determines if an object is\n[frozen](../../globals/Object/freeze.mdx).\n\n## Syntax\n\n```js\nObject.isFrozen(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be checked.\n\n### Return value\n\nA `Boolean` indicating whether or not the given object is frozen.\n\n## Description\n\nAn object is frozen if and only if it is not [extensible](../../globals/Object/isExtensible.mdx), all its properties are non-configurable, and all its data\nproperties (that is, properties which are not accessor properties with getter or setter\ncomponents) are non-writable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Object/isSealed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.isSealed()\n\nThe **`Object.isSealed()`** method determines if an object is\nsealed.\n\n## Syntax\n\n```js\nObject.isSealed(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be checked.\n\n### Return value\n\nA `Boolean` indicating whether or not the given object is sealed.\n\n## Description\n\nReturns `true` if the object is sealed, otherwise `false`. An\nobject is sealed if it is not [extensible](../../globals/Object/isExtensible.mdx) and\nif all its properties are non-configurable and therefore not removable (but not\nnecessarily non-writable).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Object/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.keys()\n\nThe **`Object.keys()`** method returns an array of a given object's own enumerable string-keyed property names.\n\n## Syntax\n\n```js\nObject.keys(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : An object.\n\n### Return value\n\nAn array of strings representing the given object's own enumerable string-keyed property keys.\n\n## Description\n\n`Object.keys()` returns an array whose elements are strings corresponding to the enumerable string-keyed property names found directly upon `object`. This is the same as iterating with a `for...in` loop, except that a `for...in` loop enumerates properties in the prototype chain as well. The order of the array returned by `Object.keys()` is the same as that provided by a `for...in` loop.\n\nIf you need the property values, use [`Object.values()`](../../globals/Object/values.mdx) instead. If you need both the property keys and values, use [`Object.entries()`](../../globals/Object/entries.mdx) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Object/preventExtensions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.preventExtensions()\n\nThe **`Object.preventExtensions()`** method prevents new\nproperties from ever being added to an object (i.e. prevents future extensions to the\nobject). It also prevents the object's prototype from being re-assigned.\n\n## Syntax\n\n```js\nObject.preventExtensions(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be made non-extensible.\n\n### Return value\n\nThe object being made non-extensible.\n\n## Description\n\nAn object is extensible if new properties can be added to it.\n`Object.preventExtensions()` marks an object as no longer extensible, so that\nit will never have properties beyond the ones it had at the time it was marked as\nnon-extensible. Note that the properties of a non-extensible object, in general, may\nstill be _deleted_. Attempting to add new properties to a non-extensible object\nwill fail, either silently or, in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), throwing a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\nUnlike [`Object.seal()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/seal) and [`Object.freeze()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze), `Object.preventExtensions()` invokes an intrinsic JavaScript behavior and cannot be replaced with a composition of several other operations. It also has its `Reflect` counterpart (which only exists for intrinsic operations), [`Reflect.preventExtensions()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Reflect/preventExtensions).\n\n`Object.preventExtensions()` only prevents addition of own properties. Properties can still be added to the object prototype.\n\nThis method makes the `[[Prototype]]` of the target immutable; any `[[Prototype]]` re-assignment will throw a `TypeError`. This behavior is specific to the internal `[[Prototype]]` property; other properties of the target object will remain mutable.\n\nThere is no way to make an object extensible again once it has been made non-extensible.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Object/prototype/constructor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.constructor\n\nThe **`constructor`** data property of an `Object` instance returns a reference to the constructor function that created the instance object. Note that the value of this property is a reference to _the function itself_, not a string containing the function's name.\n\n> **Note:** This is a property of JavaScript objects. For the `constructor` method in classes, see [its own reference page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/constructor).\n\n## Value\n\nA reference to the constructor function that created the instance object.\n\n> **Note:** This property is created by default on the [`prototype`](../../../globals/Function/prototype/) property of every constructor function and is inherited by all objects created by that constructor.\n\n## Description\n\nAny object (with the exception of [`null` prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) will have a `constructor` property on its `[[Prototype]]`. Objects created with literals will also have a `constructor` property that points to the constructor type for that object — for example, array literals create `Array` objects, and [object literals](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Object_initializer) create plain objects.\n\n```js\nconst o1 = {};\no1.constructor === Object; // true\n\nconst o2 = new Object();\no2.constructor === Object; // true\n\nconst a1 = [];\na1.constructor === Array; // true\n\nconst a2 = new Array();\na2.constructor === Array; // true\n\nconst n = 3;\nn.constructor === Number; // true\n```\n\nNote that `constructor` usually comes from the constructor's [`prototype`](../../../globals/Function/prototype/) property. If you have a longer prototype chain, you can usually expect every object in the chain to have a `constructor` property.\n\n```js\nconst o = new TypeError(); // Inheritance: TypeError -> Error -> Object\nconst proto = Object.getPrototypeOf;\nproto(o).constructor === TypeError; // true\nproto(proto(o)).constructor === Error; // true\nproto(proto(proto(o))).constructor === Object; // true\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Object/prototype/hasOwnProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.hasOwnProperty()\n\nThe **`hasOwnProperty()`** method returns a boolean indicating whether the\nobject has the specified property as its own property (as opposed to inheriting\nit).\n\n> **Note:** [`Object.hasOwn()`](../../../globals/Object/hasOwn.mdx) is recommended over\n> `hasOwnProperty()`, in browsers where it is supported.\n\n## Syntax\n\n```js\nhasOwnProperty(prop)\n```\n\n### Parameters\n\n- `prop`\n  - : The `String` name or `Symbol` of the property to test.\n\n### Return value\n\nReturns `true` if the object has the specified property as own property; `false`\notherwise.\n\n## Description\n\nThe **`hasOwnProperty()`** method returns `true` if the specified property is a\ndirect property of the object — even if the value is `null` or `undefined`. The\nmethod returns `false` if the property is inherited, or has not been declared at\nall. Unlike the `in` operator, this\nmethod does not check for the specified property in the object's prototype\nchain.\n\nThe method can be called on _most_ JavaScript objects, because most objects\ndescend from `Object`, and hence inherit its methods. For\nexample `Array` is an `Object`, so you can\nuse `hasOwnProperty()` method to check whether an index exists:\n\n```js\nconst fruits = ['Apple', 'Banana','Watermelon', 'Orange'];\nfruits.hasOwnProperty(3);   // true ('Orange')\nfruits.hasOwnProperty(4);   // false - not defined\n```\n\nThe method will not be available in objects where it is reimplemented, or on\nobjects created using `Object.create(null)` (as these don't inherit from\n`Object.prototype`). Examples for these cases are given below.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Object/prototype/isPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.isPrototypeOf()\n\nThe **`isPrototypeOf()`** method checks if an object exists in another object's prototype chain.\n\n> **Note:** `isPrototypeOf()` differs from the [`instanceof`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/instanceof) operator. In the expression `object instanceof AFunction`, `object`'s prototype chain is checked against `AFunction.prototype`, not against `AFunction` itself.\n\n## Syntax\n\n```js\nisPrototypeOf(object)\n```\n\n### Parameters\n\n- `object`\n  - : The object whose prototype chain will be searched.\n\n### Return value\n\nA boolean indicating whether the calling object (`this`) lies in the prototype chain of `object`. Directly returns `false` when `object` is not an object (i.e. a primitive).\n\n### Errors thrown\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown if `this` is `null` or `undefined` (because it can't be [converted to an object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#object_coercion)).\n\n## Description\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `isPrototypeOf()` method. This method allows you to check whether or not the object exists within another object's prototype chain. If the `object` passed as the parameter is not an object (i.e. a primitive), the method directly returns `false`. Otherwise, the `this` value is [converted to an object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#object_coercion), and the prototype chain of `object` is searched for the `this` value, until the end of the chain is reached or the `this` value is found.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Object/prototype/propertyIsEnumerable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.propertyIsEnumerable()\n\nThe **`propertyIsEnumerable()`** method returns a boolean indicating whether the specified property is the object's [enumerable own](https://developer.mozilla.org/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) property.\n\n## Syntax\n\n```js\npropertyIsEnumerable(prop)\n```\n\n### Parameters\n\n- `prop`\n  - : The name of the property to test. Can be a string or a `Symbol`.\n\n### Return value\n\nA boolean value indicating whether the specified property is enumerable and is the object's own property.\n\n## Description\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `propertyIsEnumerable()` method. This method determines if the specified property, string or symbol, is an enumerable own property of the object. If the object does not have the specified property, this method returns `false`.\n\nThis method is equivalent to [`Object.getOwnPropertyDescriptor(obj, prop)?.enumerable ?? false`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Object/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string representing the object. This method is meant to be overridden by derived objects for locale-specific purposes.\n\n## Syntax\n\n```js\ntoLocaleString()\n```\n\n### Parameters\n\nNone. However, all objects that override this method are expected to accept at most two parameters, corresponding to `locales` and `options`, such as [`Date.prototype.toLocaleString()`](../../../globals/Date/prototype/toLocaleString.mdx). The parameter positions should not be used for any other purpose.\n\n### Return value\n\nThe return value of calling `this.toString()`.\n\n## Description\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `toLocaleString()` method. `Object`'s `toLocaleString` returns the result of calling [`this.toString()`](../../../globals/Object/prototype/toString.mdx).\n\nThis function is provided to give objects a generic `toLocaleString` method, even though not all may use it. In the core language, these built-in objects override `toLocaleString` to provide locale-specific formatting:\n\n- `Array`: [`Array.prototype.toLocaleString()`](../../../globals/Array/prototype/toLocaleString.mdx)\n- `Number`: [`Number.prototype.toLocaleString()`](../../../globals/Number/prototype/toLocaleString.mdx)\n- `Date`: [`Date.prototype.toLocaleString()`](../../../globals/Date/prototype/toLocaleString.mdx)\n- `BigInt`: [`BigInt.prototype.toLocaleString()`](../../../globals/BigInt/prototype/toLocaleString.mdx)\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Object/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.toString()\n\nThe **`toString()`** method returns a string representing the object. This method is meant to be overridden by derived objects for custom [type conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) logic.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nBy default `toString()` takes no parameters. However, objects that inherit from `Object` may override it with their own implementations that do take parameters. For example, the [`Number.prototype.toString()`](../../../globals/Number/prototype/toString.mdx) and [`BigInt.prototype.toString()`](../../../globals/BigInt/prototype/toString.mdx) methods take an optional `radix` parameter.\n\n### Return value\n\nA string representing the object.\n\n## Description\n\nJavaScript calls the `toString` method to [convert an object to a primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion). You rarely need to invoke the `toString` method yourself; JavaScript automatically invokes it when encountering an object where a primitive value is expected.\n\nThis method is called in priority by [string conversion](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion), but [numeric conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#numeric_coercion) and [primitive conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion) call `valueOf()` in priority. However, because the base [`valueOf()`](../../../globals/Object/prototype/valueOf.mdx) method returns an object, the `toString()` method is usually called in the end, unless the object overrides `valueOf()`. For example, `+[1]` returns `1`, because its [`toString`](../../../globals/Array/prototype/toString.mdx) method returns `\"1\"`, which is then converted to a number.\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `toString()` method. When you create a custom object, you can override `toString()` to call a custom method, so that your custom object can be converted to a string value. Alternatively, you can add a [`Symbol.toPrimitive`](../../../globals/Symbol/toPrimitive.mdx) method, which allows even more control over the conversion process, and will always be preferred over `valueOf` or `toString` for any type conversion.\n\nTo use the base `Object.prototype.toString()` with an object that has it overridden (or to invoke it on `null` or `undefined`), you need to call [`Function.prototype.call()`](../../../globals/Function/prototype/call.mdx) or [`Function.prototype.apply()`](../../../globals/Function/prototype/apply.mdx) on it, passing the object you want to inspect as the first parameter (called `thisArg`).\n\n```js\nconst arr = [1, 2, 3];\n\narr.toString(); // \"1,2,3\"\nObject.prototype.toString.call(arr); // \"[object Array]\"\n```\n\n`Object.prototype.toString()` returns `\"[object Type]\"`, where `Type` is the object type. If the object has a [`Symbol.toStringTag`](../../../globals/Symbol/toStringTag.mdx) property whose value is a string, that value will be used as the `Type`. Many built-in objects, including [`Map`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map) and [`Symbol`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol), have a `Symbol.toStringTag`. Some objects predating ES6 do not have `Symbol.toStringTag`, but have a special tag nonetheless. They include (the tag is the same as the type name given below):\n\n- [`Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\n- [`Function`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions) (anything whose [`typeof`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/typeof) returns `\"function\"`)\n- [`Error`](../../../globals/Error/Error.mdx)\n- [`Boolean`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)\n- [`Number`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)\n- [`String`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\n- [`Date`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date)\n- [`RegExp`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp)\n\nThe [`arguments`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/arguments) object returns `\"[object Arguments]\"`. Everything else, including user-defined classes, unless with a custom `Symbol.toStringTag`, will return `\"[object Object]\"`.\n\n`Object.prototype.toString()` invoked on [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) returns `[object Null]` and `[object Undefined]`, respectively.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Object/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.valueOf()\n\nThe **`valueOf()`** method of `Object` converts the `this` value [to an object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#object_coercion). This method is meant to be overridden by derived objects for custom [type conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) logic.\n\n\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nThe `this` value, converted to an object.\n\n> **Note:** In order for `valueOf` to be useful during type conversion, it must return a primitive. Because all primitive types have their own `valueOf()` methods, calling `aPrimitiveValue.valueOf()` generally does not invoke `Object.prototype.valueOf()`.\n\n## Description\n\nJavaScript calls the `valueOf` method to [convert an object to a primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion). You rarely need to invoke the `valueOf` method yourself; JavaScript automatically invokes it when encountering an object where a primitive value is expected.\n\nThis method is called in priority by [numeric conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#numeric_coercion) and [primitive conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion), but [string conversion](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) calls `toString()` in priority, and `toString()` is very likely to return a string value (even for the [`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx) base implementation), so `valueOf()` is usually not called in this case.\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `toString()` method. The `Object.prototype.valueOf()` base implementation is deliberately useless: by returning an object, its return value will never be used by any [primitive conversion algorithm](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion). Many built-in objects override this method to return an appropriate primitive value. When you create a custom object, you can override `valueOf()` to call a custom method, so that your custom object can be converted to a primitive value. Generally, `valueOf()` is used to return a value that is most meaningful for the object — unlike `toString()`, it does not need to be a string. Alternatively, you can add a [`Symbol.toPrimitive`](../../../globals/Symbol/toPrimitive.mdx) method, which allows even more control over the conversion process, and will always be preferred over `valueOf` or `toString` for any type conversion.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Object/seal.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.seal()\n\nThe **`Object.seal()`** method _seals_ an object. Sealing an object [prevents extensions](../../globals/Object/preventExtensions.mdx) and makes existing properties non-configurable. A sealed object has a fixed set of properties: new properties cannot be added, existing properties cannot be removed, their enumerability and configurability cannot be changed, and its prototype cannot be re-assigned. Values of existing properties can still be changed as long as they are writable. `seal()` returns the same object that was passed in.\n\n## Syntax\n\n```js\nObject.seal(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be sealed.\n\n### Return value\n\nThe object being sealed.\n\n## Description\n\nSealing an object is equivalent to [preventing extensions](../../globals/Object/preventExtensions.mdx) and then changing all existing properties' descriptors to `configurable: false`. This has the effect of making the set of properties on the object fixed. Making all properties non-configurable\nalso prevents them from being converted from data properties to accessor properties and\nvice versa, but it does not prevent the values of data properties from being changed.\nAttempting to delete or add properties to a sealed object, or to convert a data property\nto accessor or vice versa, will fail, either silently or by throwing a\n[`TypeError`](../../globals/TypeError/TypeError.mdx) (most commonly, although not exclusively, when in \"strict mode\" code).\n\nThe prototype chain remains untouched. However, due to the effect of [preventing extensions](../../globals/Object/preventExtensions.mdx), the `[[Prototype]]` cannot be reassigned.\n\nUnlike [`Object.freeze()`](../../globals/Object/freeze.mdx), objects sealed with `Object.seal()` may have their existing\nproperties changed, as long as they are writable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Object/setPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.setPrototypeOf()\n\nThe **`Object.setPrototypeOf()`** method sets the prototype (i.e., the internal `[[Prototype]]` property) of a specified object to another object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null).\n\n> **Warning:** Changing the `[[Prototype]]` of an object is, by the nature of how modern JavaScript engines optimize property accesses, currently a very slow operation in every browser and JavaScript engine. In addition, the effects of altering inheritance are subtle and far-flung, and are not limited to the time spent in the `Object.setPrototypeOf(...)` statement, but may extend to **_any_** code that has access to any object whose `[[Prototype]]` has been altered. You can read more in [JavaScript engine fundamentals: optimizing prototypes](https://mathiasbynens.be/notes/prototypes).\n>\n> Because this feature is a part of the language, it is still the burden on engine developers to implement that feature performantly (ideally). Until engine developers address this issue, if you are concerned about performance, you should avoid setting the `[[Prototype]]` of an object. Instead, create a new object with the desired `[[Prototype]]` using [`Object.create()`](../../globals/Object/create.mdx).\n\n## Syntax\n\n```js\nObject.setPrototypeOf(obj, prototype)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which is to have its prototype set.\n- `prototype`\n  - : The object's new prototype (an object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null)).\n\n### Return value\n\nThe specified object.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if one of the following conditions is met:\n    - The `obj` parameter is [non-extensible](../../globals/Object/isExtensible.mdx), or it's an [immutable prototype exotic object](https://tc39.es/ecma262/#sec-immutable-prototype-exotic-objects), such as `Object.prototype`.\n    - The `prototype` parameter is not an object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null).\n\n## Description\n\n`Object.setPrototypeOf()` is generally considered the proper way to set the prototype of an object.\n\nIf the `obj` parameter is not an object (e.g. number, string, etc.), this method does nothing.\n\nFor security concerns, there are certain built-in objects that are designed to have an _immutable prototype_. This prevents prototype pollution attacks, especially [proxy-related ones](https://github.com/tc39/ecma262/issues/272). The core language only specifies `Object.prototype` as an immutable prototype exotic object, whose prototype is always `null`.\n\n```js\nObject.isExtensible(Object.prototype); // true; you can add more properties\nObject.setPrototypeOf(Object.prototype, {}); // TypeError: Immutable prototype object '#<Object>' cannot have their prototype set\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Object/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.values()\n\nThe **`Object.values()`** method returns an array of a given object's own enumerable string-keyed property values.\n\n## Syntax\n\n```js\nObject.values(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : An object.\n\n### Return value\n\nAn array containing the given object's own enumerable string-keyed property values.\n\n## Description\n\n`Object.values()` returns an array whose elements are strings corresponding to the enumerable string-keyed property values found directly upon `object`. This is the same as iterating with a `for...in` loop, except that a `for...in` loop enumerates properties in the prototype chain as well. The order of the array returned by `Object.values()` is the same as that provided by a `for...in` loop.\n\nIf you need the property keys, use [`Object.keys()`](../../globals/Object/keys.mdx) instead. If you need both the property keys and values, use [`Object.entries()`](../../globals/Object/entries.mdx) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Promise/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get Promise[Symbol.species]\n\nThe **`Promise[Symbol.species]`** accessor property returns the constructor used to construct return values from promise methods.\n\n> **Warning:** The existence of `Symbol.species` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Syntax\n\n```js\nPromise[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct return values from promise chaining methods that create new promises.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `Promise` objects. Subclass constructors may override it to change the constructor assignment. The default implementation is basically:\n\n```js\n// Hypothetical underlying implementation for illustration\nclass Promise {\n  static get [Symbol.species]() {\n    return this;\n  }\n}\n```\n\nBecause of this polymorphic implementation, `Symbol.species` of derived subclasses would also return the constructor itself by default.\n\n```js\nclass SubPromise extends Promise {}\nSubPromise[Symbol.species] === Promise; // true\n```\n\nPromise chaining methods — [`then()`](../../globals/Promise/prototype/then.mdx), [`finally()`](../../globals/Promise/prototype/finally.mdx) — return new promise objects. They get the constructor to construct the new promise through `this.constructor[Symbol.species]`. If `this.constructor` is `undefined`, or if `this.constructor[Symbol.species]` is `undefined` or `null`, the default [`Promise()`](../../globals/Promise/Promise.mdx) constructor is used. Otherwise, the constructor returned by `this.constructor[Symbol.species]` is used to construct the new promise object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Promise/Promise.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise()\n\nThe **`Promise()`** constructor is primarily used to wrap functions that do not already support promises.\n\n## Syntax\n\n```js\nnew Promise(executor)\n```\n\n> **Note:** `Promise()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `executor`\n  - : A `function` to be executed by the constructor. It receives two functions as parameters: `resolveFunc` and `rejectFunc`. Any errors thrown in the `executor` will cause the promise to be rejected, and the return value will be neglected. The semantics of `executor` are detailed below.\n\n### Return value\n\nWhen called via `new`, the `Promise` constructor returns a promise object. The promise object will become _resolved_ when either of the functions `resolveFunc` or `rejectFunc` are invoked. Note that if you call `resolveFunc` or `rejectFunc` and pass another `Promise` object as an argument, it can be said to be \"resolved\", but still not \"settled\". See the [Promise description](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#description) for more explanation.\n\n## Description\n\nTraditionally (before promises), asynchronous tasks were designed as callbacks.\n\n```js\nreadFile(\"./data.txt\", (error, result) => {\n  // This callback will be called when the task is done, with the\n  // final `error` or `result`. Any operation dependent on the\n  // result must be defined within this callback.\n});\n// Code here is immediately executed after the `readFile` request\n// is fired. It does not wait for the callback to be called, hence\n// making `readFile` \"asynchronous\".\n```\n\nTo take advantage of the readability improvement and language features offered by promises, the `Promise()` constructor allows one to transform the callback-based API to a promise-based one.\n\n> **Note:** If your task is already promise-based, you likely do not need the `Promise()` constructor.\n\nThe `executor` is custom code that ties an outcome in a callback to a promise. You, the programmer, write the `executor`. Its signature is expected to be:\n\n```js\nfunction executor(resolveFunc, rejectFunc) {\n  // Typically, some asynchronous operation that accepts a callback,\n  // like the `readFile` function above\n}\n```\n\n`resolveFunc` and `rejectFunc` are also functions, and you can give them whatever actual names you want. Their signatures are simple: they accept a single parameter of any type.\n\n```js\nresolveFunc(value); // call on resolved\nrejectFunc(reason); // call on rejected\n```\n\nThe `value` parameter passed to `resolveFunc` can be another promise object, in which case the newly constructed promise's state will be \"locked in\" to the promise passed (as part of the [resolution](#resolver-function) promise). The `rejectFunc` has semantics close to the [`throw`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/throw) statement, so `reason` is typically an [`Error`](../../globals/Error/Error.mdx) instance. If either `value` or `reason` is omitted, the promise is fulfilled/rejected with `undefined`.\n\nThe `executor`'s completion state has limited effect on the promise's state:\n\n- The `executor` return value is ignored. `return` statements within the `executor` merely impact control flow and alter whether a part of the function is executed, but do not have any impact on the promise's fulfillment value. If `executor` exits and it's impossible for `resolveFunc` or `rejectFunc` to be called in the future (for example, there are no async tasks scheduled), then the promise remains pending forever.\n- If an error is thrown in the `executor`, the promise is rejected, unless `resolveFunc` or `rejectFunc` has already been called.\n\n> **Note:** The existence of pending promises does not prevent the program from exiting. If the event loop is empty, the program exits despite any pending promises (because those are necessarily forever-pending).\n\nHere's a summary of the typical flow:\n\n1. At the time when the constructor generates the new `Promise` object, it also generates a corresponding pair of functions for `resolveFunc` and `rejectFunc`; these are \"tethered\" to the `Promise` object.\n2. `executor` typically wraps some asynchronous operation which provides a callback-based API. The callback (the one passed to the original callback-based API) is defined within the `executor` code, so it has access to the `resolveFunc` and `rejectFunc`.\n3. The `executor` is called synchronously (as soon as the `Promise` is constructed) with the `resolveFunc` and `rejectFunc` functions as arguments.\n4. The code within the `executor` has the opportunity to perform some operation. The eventual completion of the asynchronous task is communicated with the promise instance via the side effect caused by `resolveFunc` or `rejectFunc`. The side effect is that the `Promise` object becomes \"resolved\".\n   - If `resolveFunc` is called first, the value passed will be [resolved](#resolver-function). The promise may stay pending (in case another [thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) is passed), become fulfilled (in most cases where a non-thenable value is passed), or become rejected (in case of an invalid resolution value).\n   - If `rejectFunc` is called first, the promise instantly becomes rejected.\n   - Once one of the resolving functions (`resolveFunc` or `rejectFunc`) is called, the promise stays resolved. Only the first call to `resolveFunc` or `rejectFunc` affects the promise's eventual state, and subsequent calls to either function can neither change the fulfillment value/rejection reason nor toggle its eventual state from \"fulfilled\" to \"rejected\" or opposite.\n   - If `executor` exits by throwing an error, then the promise is rejected. However, the error is ignored if one of the resolving functions has already been called (so that the promise is already resolved).\n   - Resolving the promise does not necessarily cause the promise to become fulfilled or rejected (i.e. settled). The promise may still be pending because it's resolved with another thenable, but its eventual state will match that of the resolved thenable.\n5. Once the promise settles, it (asynchronously) invokes any further handlers associated through [`Promise.prototype.then`](../../globals/Promise/prototype/then.mdx), [`Promise.prototype.catch`](../../globals/Promise/prototype/catch.mdx), or [`Promise.prototype.finally`](../../globals/Promise/prototype/finally.mdx). The eventual fulfillment value or rejection reason is passed to the invocation of fulfillment and rejection handlers as an input parameter (see [Chained Promises](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#chained_promises)).\n\nFor example, the callback-based `readFile` API above can be transformed into a promise-based one.\n\n```js\nconst readFilePromise = (path) =>\n  new Promise((resolve, reject) => {\n    readFile(path, (error, result) => {\n      if (error) {\n        reject(error);\n      } else {\n        resolve(result);\n      }\n    });\n  });\n\nreadFilePromise(\"./data.txt\")\n  .then((result) => console.log(result))\n  .catch((error) => console.error(\"Failed to read data\"));\n```\n\n### Resolver function\n\nThe resolver function `resolveFunc` has the following behaviors:\n\n- If it's called with the same value as the newly created promise (the promise it's \"tethered to\"), the promise is rejected with a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n- If it's called with a non-[thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) value (a primitive, or an object whose `then` property is not callable, including when the property is not present), the promise is immediately fulfilled with that value.\n- If it's called with a thenable value (including another `Promise` instance), then the thenable's `then` method is saved and called in the future (it's always called asynchronously). The `then` method will be called with two callbacks, which are two new functions with the exact same behaviors as the `resolveFunc` and `rejectFunc` passed to the `executor` function. If calling the `then` method throws, then the current promise is rejected with the thrown error.\n\nIn the last case, it means code like:\n\n```js\nnew Promise((resolve, reject) => {\n  resolve(thenable);\n});\n```\n\nIs roughly equivalent to:\n\n```js\nnew Promise((resolve, reject) => {\n  try {\n    thenable.then(\n      (value) => resolve(value),\n      (reason) => reject(reason),\n    );\n  } catch (e) {\n    reject(e);\n  }\n});\n```\n\nExcept that in the `resolve(thenable)` case:\n\n1. `resolve` is called synchronously, so that calling `resolve` or `reject` again has no effect, even when the handlers attached through `anotherPromise.then()` are not called yet.\n2. The `then` method is called asynchronously, so that the promise will never be instantly resolved if a thenable is passed.\n\nBecause `resolve` is called again with whatever `thenable.then()` passes to it as `value`, the resolver function is able to flatten nested thenables, where a thenable calls its `onFulfilled` handler with another thenable. The effect is that the fulfillment handler of a real promise will never receive a thenable as its fulfillment value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Promise/all.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.all()\n\nThe **`Promise.all()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise fulfills when all of the input's promises fulfill (including when an empty iterable is passed), with an array of the fulfillment values. It rejects when any of the input's promises rejects, with this first rejection reason.\n\n## Syntax\n\n```js\nPromise.all(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array` of promises.\n\n### Return value\n\nA `Promise` that is:\n\n- **Already fulfilled**, if the `iterable` passed is empty.\n- **Asynchronously fulfilled**, when all the promises in the given `iterable` fulfill. The fulfillment value is an array of fulfillment values, in the order of the promises passed, regardless of completion order. If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) fulfilled.\n- **Asynchronously rejected**, when any of the promises in the given `iterable` rejects. The rejection reason is the rejection reason of the first promise that was rejected.\n\n## Description\n\nThe `Promise.all()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. It can be useful for aggregating the results of multiple promises. It is typically used when there are multiple related asynchronous tasks that the overall code relies on to work successfully — all of whom we want to fulfill before the code execution continues.\n\n`Promise.all()` will reject immediately upon **any** of the input promises rejecting. In comparison, the promise returned by [`Promise.allSettled()`](../../globals/Promise/allSettled.mdx) will wait for all input promises to complete, regardless of whether or not one rejects. Use `allSettled()` if you need the final result of every promise in the input iterable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Promise/allSettled.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.allSettled()\n\nThe **`Promise.allSettled()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise fulfills when all of the input's promises settle (including when an empty iterable is passed), with an array of objects that describe the outcome of each promise.\n\n## Syntax\n\n```js\nPromise.allSettled(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array` of promises.\n\n### Return value\n\nA `Promise` that is:\n\n- **Already fulfilled**, if the `iterable` passed is empty.\n- **Asynchronously fulfilled**, when all promise in the given `iterable` have settled (either fulfilled or rejected). The fulfillment value is an array of objects, each describing the outcome of one promise in the `iterable`, in the order of the promises passed, regardless of completion order. Each outcome object has the following properties:\n\n  - `status`\n    - : A string, either `\"fulfilled\"` or `\"rejected\"`, indicating the eventual state of the promise.\n  - `value`\n    - : Only present if `status` is `\"fulfilled\"`. The value that the promise was fulfilled with.\n  - `reason`\n    - : Only present if `status` is `\"rejected\"`. The reason that the promise was rejected with.\n\n  If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) fulfilled.\n\n## Description\n\nThe `Promise.allSettled()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. `Promise.allSettled()` is typically used when you have multiple asynchronous tasks that are not dependent on one another to complete successfully, or you'd always like to know the result of each promise.\n\nIn comparison, the Promise returned by [`Promise.all()`](../../globals/Promise/all.mdx) may be more appropriate if the tasks are dependent on each other, or if you'd like to immediately reject upon any of them rejecting.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Promise/any.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.any()\n\nThe **`Promise.any()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise fulfills when any of the input's promises fulfills, with this first fulfillment value. It rejects when all of the input's promises reject (including when an empty iterable is passed), with an `AggregateError` containing an array of rejection reasons.\n\n## Syntax\n\n```js\nPromise.any(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array` of promises.\n\n### Return value\n\nA `Promise` that is:\n\n- **Already rejected**, if the `iterable` passed is empty.\n- **Asynchronously fulfilled**, when any of the promises in the given `iterable` fulfills. The fulfillment value is the fulfillment value of the first promise that was fulfilled.\n- **Asynchronously rejected**, when all of the promises in the given `iterable` reject. The rejection reason is an `AggregateError` containing an array of rejection reasons in its `errors` property. The errors are in the order of the promises passed, regardless of completion order. If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) rejected.\n\n## Description\n\nThe `Promise.any()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. This method is useful for returning the first promise that fulfills. It short-circuits after a promise fulfills, so it does not wait for the other promises to complete once it finds one.\n\nUnlike [`Promise.all()`](../../globals/Promise/all.mdx), which returns an _array_ of fulfillment values, we only get one fulfillment value (assuming at least one promise fulfills). This can be beneficial if we need only one promise to fulfill but we do not care which one does. Note another difference: this method rejects upon receiving an _empty iterable_, since, truthfully, the iterable contains no items that fulfill. You may compare `Promise.any()` and `Promise.all()` with [`Array.prototype.some()`](../../globals/Array/prototype/some.mdx) and [`Array.prototype.every()`](../../globals/Array/prototype/every.mdx).\n\nAlso, unlike [`Promise.race()`](../../globals/Promise/race.mdx), which returns the first _settled_ value (either fulfillment or rejection), this method returns the first _fulfilled_ value. This method ignores all rejected promises up until the first promise that fulfills.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Promise/prototype/catch.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.prototype.catch()\n\nThe **`catch()`** method of a `Promise` object schedules a function to be called when the promise is rejected. It immediately returns an equivalent `Promise` object, allowing you to [chain](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining) calls to other promise methods. It is a shortcut for [`Promise.prototype.then(undefined, onRejected)`](../../../globals/Promise/prototype/then.mdx).\n\n## Syntax\n\n```js\ncatch(onRejected)\n\ncatch((reason) => {\n  // rejection handler\n})\n```\n\n### Parameters\n\n- `onRejected`\n  - : A `Function` called when the `Promise` is rejected. This function has one parameter: the _rejection reason_.\n\n### Return value\n\nReturns a new `Promise`. This new promise is always pending when returned, regardless of the current promise's status. It's eventually rejected if `onRejected` throws an error or returns a Promise which is itself rejected; otherwise, it's eventually fulfilled.\n\n## Description\n\nThe `catch` method is used for error handling in promise composition. Since it returns a `Promise`, it [can be chained](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining_after_a_catch) in the same way as its sister method, [`Promise.prototype.then()`](../../../globals/Promise/prototype/then.mdx).\n\nIf a promise becomes rejected, and there are no rejection handlers to call (a handler can be attached through any of [`Promise.prototype.then`](../../../globals/Promise/prototype/then.mdx), [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx), or [`Promise.prototype.finally`](../../../globals/Promise/prototype/finally.mdx)), then the rejection event is surfaced by the host. In the browser, this results in an [`unhandledrejection`](https://developer.mozilla.org/docs/Web/API/Window/unhandledrejection_event) event. If a handler is attached to a rejected promise whose rejection has already caused an unhandled rejection event, then another [`rejectionhandled`](https://developer.mozilla.org/docs/Web/API/Window/rejectionhandled_event) event is fired.\n\n`catch()` internally calls `then()` on the object upon which it was called, passing `undefined` and `onRejected` as arguments. The value of that call is directly returned. This is observable if you wrap the methods.\n\n```js\n// overriding original Promise.prototype.then/catch just to add some logs\n((Promise) => {\n  const originalThen = Promise.prototype.then;\n  const originalCatch = Promise.prototype.catch;\n\n  Promise.prototype.then = function (...args) {\n    console.log(\"Called .then on %o with arguments: %o\", this, args);\n    return originalThen.apply(this, args);\n  };\n  Promise.prototype.catch = function (...args) {\n    console.error(\"Called .catch on %o with arguments: %o\", this, args);\n    return originalCatch.apply(this, args);\n  };\n})(Promise);\n\n// calling catch on an already resolved promise\nPromise.resolve().catch(function XXX() {});\n\n// Logs:\n// Called .catch on Promise{} with arguments: Arguments{1} [0: function XXX()]\n// Called .then on Promise{} with arguments: Arguments{2} [0: undefined, 1: function XXX()]\n```\n\nThis means that passing `undefined` still causes the returned promise to be rejected, and you have to pass a function to prevent the final promise from being rejected.\n\nBecause `catch()` just calls `then()`, it supports subclassing.\n\n> **Note:** The examples below are throwing instances of [`Error`](../../../globals/Error/Error.mdx). As with synchronous [`throw`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/throw) statements, this is considered a good practice; otherwise, the part doing the catching would have to perform checks to see if the argument was a string or an error, and you might lose valuable information such as stack traces.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Promise/prototype/finally.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.prototype.finally()\n\nThe **`finally()`** method of a `Promise` object schedules a function to be called when the promise is settled (either fulfilled or rejected). It immediately returns an equivalent `Promise` object, allowing you to [chain](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining) calls to other promise methods.\n\nThis lets you avoid duplicating code in both the promise's [`Promise.prototype.then`](../../../globals/Promise/prototype/then.mdx) and [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx) handlers.\n\n## Syntax\n\n```js\nfinally(onFinally)\n\nfinally(() => {\n  // Code that will run after promise is settled (fulfilled or rejected)\n})\n```\n\n### Parameters\n\n- `onFinally`\n  - : A `Function` called when the `Promise` is settled. This handler receives no parameters.\n\n### Return value\n\nReturns an equivalent `Promise`. If the handler throws an error or returns a rejected promise, the promise returned by `finally()` will be rejected with that value instead. Otherwise, the return value of the handler does not affect the state of the original promise.\n\n## Description\n\nThe `finally()` method can be useful if you want to do some processing or cleanup once the promise is settled, regardless of its outcome.\n\nThe `finally()` method is very similar to calling [`then(onFinally, onFinally)`](../../../globals/Promise/prototype/then.mdx). However, there are a couple of differences:\n\n- When creating a function inline, you can pass it once, instead of being forced to either declare it twice, or create a variable for it.\n- The `onFinally` callback does not receive any argument. This use case is for precisely when you _do not care_ about the rejection reason or the fulfillment value, and so there's no need to provide it.\n- A `finally()` call is usually transparent and does not change the eventual state of the original promise. So for example:\n  - Unlike `Promise.resolve(2).then(() => 77, () => {})`, which returns a promise eventually fulfilled with the value `77`, `Promise.resolve(2).finally(() => 77)` returns a promise eventually fulfilled with the value `2`.\n  - Similarly, unlike `Promise.reject(3).then(() => {}, () => 88)`, which returns a promise eventually fulfilled with the value `88`, `Promise.reject(3).finally(() => 88)` returns a promise eventually rejected with the reason `3`.\n\n> **Note:** A `throw` (or returning a rejected promise) in the `finally` callback still rejects the returned promise. For example, both `Promise.reject(3).finally(() => { throw 99; })` and `Promise.reject(3).finally(() => Promise.reject(99))` reject the returned promise with the reason `99`.\n\nLike [`Promise.prototype.catch()`](../../../globals/Promise/prototype/catch.mdx), `finally()` internally calls the `then` method on the object upon which it was called. If `onFinally` is not a function, `then()` is called with `onFinally` as both arguments — which, for [`Promise.prototype.then()`](../../../globals/Promise/prototype/then.mdx), means that no useful handler is attached. Otherwise, `then()` is called with two internally created functions, which behave like the following:\n\n> **Warning:** This is only for demonstration purposes and is not a polyfill.\n\n```js\npromise.then(\n  (value) => Promise.resolve(onFinally()).then(() => value),\n  (reason) =>\n    Promise.resolve(onFinally()).then(() => {\n      throw reason;\n    }),\n);\n```\n\nBecause `finally()` calls `then()`, it supports subclassing. Moreover, notice the [`Promise.resolve()`](../../../globals/Promise/resolve.mdx) call above — in reality, `onFinally()`'s return value is resolved using the same algorithm as `Promise.resolve()`, but the actual constructor used to construct the resolved promise will be the subclass. `finally()` gets this constructor through [`promise.constructor[Symbol.species]`](../../../globals/Promise/@@species.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Promise/prototype/then.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.prototype.then()\n\nThe **`then()`** method of a `Promise` object takes up to two arguments: callback functions for the fulfilled and rejected cases of the `Promise`. It immediately returns an equivalent `Promise` object, allowing you to [chain](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining) calls to other promise methods.\n\n## Syntax\n\n```js\nthen(onFulfilled)\nthen(onFulfilled, onRejected)\n\nthen(\n  (value) => { /* fulfillment handler */ },\n  (reason) => { /* rejection handler */ },\n)\n```\n\n### Parameters\n\n- `onFulfilled` _**optional**_\n  - : A `Function` asynchronously called if the `Promise` is fulfilled. This function has one parameter, the _fulfillment value_. If it is not a function, it is internally replaced with an _identity_ function (`(x) => x`) which simply passes the fulfillment value forward.\n- `onRejected` _**optional**_\n  - : A `Function` asynchronously called if the `Promise` is rejected. This function has one parameter, the _rejection reason_. If it is not a function, it is internally replaced with a _thrower_ function (`(x) => { throw x; }`) which throws the rejection reason it received.\n\n### Return value\n\nReturns a new `Promise` immediately. This new promise is always pending when returned, regardless of the current promise's status.\n\nOne of the `onFulfilled` and `onRejected` handlers will be executed to handle the current promise's fulfillment or rejection. The call always happens asynchronously, even when the current promise is already settled. The behavior of the returned promise (call it `p`) depends on the handler's execution result, following a specific set of rules. If the handler function:\n\n- returns a value: `p` gets fulfilled with the returned value as its value.\n- doesn't return anything: `p` gets fulfilled with `undefined`.\n- throws an error: `p` gets rejected with the thrown error as its value.\n- returns an already fulfilled promise: `p` gets fulfilled with that promise's value as its value.\n- returns an already rejected promise: `p` gets rejected with that promise's value as its value.\n- returns another pending promise: the fulfillment/rejection of the promise returned by `then` will be subsequent to the resolution/rejection of the promise returned by the handler. Also, the resolved value of the promise returned by `then` will be the same as the resolved value of the promise returned by the handler.\n\n## Description\n\nThe `then()` method schedules callback functions for the eventual completion of a Promise — either fulfillment or rejection. It is the primitive method of promises: the [thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) protocol expects all promise-like objects to expose a `then()` method, and the [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx) and [`Promise.prototype.finally`](../../../globals/Promise/prototype/finally.mdx) methods both work by invoking the object's `then()` method.\n\nFor more information about the `onRejected` handler, see the [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx) reference.\n\n`then()` returns a new promise object. If you call the `then()` method twice on the same promise object (instead of chaining), then this promise object will have two pairs of settlement handlers. All handlers attached to the same promise object are always called in the order they were added. Moreover, the two promises returned by each call of `then()` start separate chains and do not wait for each other's settlement.\n\n[Thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) objects that arise along the `then()` chain are always [resolved](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise/Promise#the_resolver_function) — the `onFulfilled` handler never receives a thenable object, and any thenable returned by either handler are always resolved before being passed to the next handler. This is because when constructing the new promise, the `resolve` and `reject` functions passed by the `executor` are saved, and when the current promise settles, the respective function will be called with the fulfillment value or rejection reason. The resolving logic comes from the resolver function passed by the [`Promise()`](../../../globals/Promise/Promise.mdx) constructor.\n\n`then()` supports subclassing, which means it can be called on instances of subclasses of `Promise`, and the result will be a promise of the subclass type. You can customize the type of the return value through the [`[Symbol.species]`](../../../globals/Promise/@@species.mdx) property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Promise/race.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.race()\n\nThe **`Promise.race()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise settles with the eventual state of the first promise that settles.\n\n## Syntax\n\n```js\nPromise.race(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array`) of promises.\n\n### Return value\n\nA `Promise` that **asynchronously settles** with the eventual state of the first promise in the `iterable` to settle. In other words, it fulfills if the first promise to settle is fulfilled, and rejects if the first promise to settle is rejected. The returned promise remains pending forever if the `iterable` passed is empty. If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) settled.\n\n## Description\n\nThe `Promise.race()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. It's useful when you want the first async task to complete, but do not care about its eventual state (i.e. it can either succeed or fail).\n\nIf the iterable contains one or more non-promise values and/or an already settled promise, then `Promise.race()` will settle to the first of these values found in the iterable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Promise/reject.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.reject()\n\nThe **`Promise.reject()`** method returns a `Promise` object that is rejected with a given reason.\n\n## Syntax\n\n```js\nPromise.reject(reason)\n```\n\n### Parameters\n\n- `reason`\n  - : Reason why this `Promise` rejected.\n\n### Return value\n\nA `Promise` that is rejected with the given reason.\n\n## Description\n\nThe static `Promise.reject` function returns a `Promise` that is rejected. For debugging purposes and selective error catching, it is useful to make `reason` an `instanceof` [`Error`](../../globals/Error/Error.mdx).\n\n`Promise.reject()` is generic and supports subclassing, which means it can be called on subclasses of `Promise`, and the result will be a promise of the subclass type. To do so, the subclass's constructor must implement the same signature as the [`Promise()`](../../globals/Promise/Promise.mdx) constructor — accepting a single `executor` function that can be called with the `resolve` and `reject` callbacks as parameters. `Promise.reject()` is essentially a shorthand for `new Promise((resolve, reject) => reject(reason))`.\n\nUnlike [`Promise.resolve()`](../../globals/Promise/resolve.mdx), `Promise.reject()` always wraps `reason` in a new `Promise` object, even when `reason` is already a `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Promise/resolve.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.resolve()\n\nThe **`Promise.resolve()`** method \"resolves\" a given value to a `Promise`. If the value is a promise, that promise is returned; if the value is a [thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables), `Promise.resolve()` will call the `then()` method with two callbacks it prepared; otherwise the returned promise will be fulfilled with the value.\n\nThis function flattens nested layers of promise-like objects (e.g. a promise that fulfills to a promise that fulfills to something) into a single layer — a promise that fulfills to a non-thenable value.\n\n## Syntax\n\n```js\nPromise.resolve(value)\n```\n\n### Parameters\n\n- `value`\n  - : Argument to be resolved by this `Promise`. Can also be a `Promise` or a thenable to resolve.\n\n### Return value\n\nA `Promise` that is resolved with the given value, or the promise passed as value, if the value was a promise object. A resolved promise can be in any of the states — fulfilled, rejected, or pending. For example, resolving a rejected promise will still result in a rejected promise.\n\n## Description\n\n`Promise.resolve()` _resolves_ a promise, which is not the same as fulfilling or rejecting the promise. See [Promise description](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#description) for definitions of the terminology. In brief, `Promise.resolve()` returns a promise whose eventual state depends on another promise, thenable object, or other value.\n\n`Promise.resolve()` is generic and supports subclassing, which means it can be called on subclasses of `Promise`, and the result will be a promise of the subclass type. To do so, the subclass's constructor must implement the same signature as the [`Promise()`](../../globals/Promise/Promise.mdx) constructor — accepting a single `executor` function that can be called with the `resolve` and `reject` callbacks as parameters.\n\n`Promise.resolve()` special-cases native `Promise` instances. If `value` belongs to `Promise` or a subclass, and `value.constructor === Promise`, then `value` is directly returned by `Promise.resolve()`, without creating a new `Promise` instance. Otherwise, `Promise.resolve()` is essentially a shorthand for `new Promise((resolve) => resolve(value))`.\n\nThe bulk of the resolving logic is actually implemented by the [resolver function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise/Promise#the_resolver_function) passed by the `Promise()` constructor. In summary:\n\n- If a non-[thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) value is passed, the returned promise is already fulfilled with that value.\n- If a thenable is passed, the returned promise will adopt the state of that thenable by calling the `then` method and passing a pair of resolving functions as arguments. (But because native promises directly pass through `Promise.resolve()` without creating a wrapper, the `then` method is not called on native promises.) If the resolver function receives another thenable object, it will be resolved agin, so that the eventual fulfillment value of the promise will never be thenable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Proxy/Proxy.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Proxy()\n\nThe **`Proxy()`** constructor is used to create `Proxy` objects.\n\n## Syntax\n\n```js\nnew Proxy(target, handler)\n```\n\n> **Note:** `Proxy()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `target`\n  - : A target object to wrap with `Proxy`. It can be any sort of object,\n    including a native array, a function, or even another proxy.\n- `handler`\n  - : An object whose properties are functions that define the behavior of the proxy when\n    an operation is performed on it.\n\n## Description\n\nUse the `Proxy()` constructor to create a new `Proxy` object.\nThis constructor takes two mandatory arguments:\n\n- `target` is the object for which you want to create the proxy\n- `handler` is the object that defines the custom behavior of the proxy.\n\nAn empty handler will create a proxy that behaves, in almost all respects, exactly like\nthe target. By defining any of a set group of functions on the `handler`\nobject, you can customize specific aspects of the proxy's behavior. For example, by\ndefining `get()` you can provide a customized version of the target's\n[property accessor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Property_Accessors).\n\n### Handler functions\n\nThis section lists all the handler functions you can define. Handler functions are\nsometimes called _traps_, because they trap calls to the underlying target\nobject.\n\n- [`handler.apply()`](../../globals/Proxy/proxy/apply.mdx)\n  - : A trap for a function call.\n- [`handler.construct()`](../../globals/Proxy/proxy/construct.mdx)\n  - : A trap for the `new` operator.\n- [`handler.defineProperty()`](../../globals/Proxy/proxy/defineProperty.mdx)\n  - : A trap for [`Object.defineProperty`](../../globals/Object/defineProperty.mdx).\n- [`handler.deleteProperty()`](../../globals/Proxy/proxy/deleteProperty.mdx)\n  - : A trap for the `delete` operator.\n- [`handler.get()`](../../globals/Proxy/proxy/get.mdx)\n  - : A trap for getting property values.\n- [`handler.getOwnPropertyDescriptor()`)}](../../globals/Proxy/proxy/getOwnPropertyDescriptor.mdx)\n  - : A trap for [`Object.getOwnPropertyDescriptor`](../../globals/Object/getOwnPropertyDescriptor.mdx).\n- [`handler.getPrototypeOf()`](../../globals/Proxy/proxy/getPrototypeOf.mdx)\n  - : A trap for [`Object.getPrototypeOf()`](../../globals/Object/getPrototypeOf.mdx).\n- [`handler.has()`](../../globals/Proxy/proxy/has.mdx)\n  - : A trap for the `in` operator.\n- [`handler.isExtensible()`](../../globals/Proxy/proxy/isExtensible.mdx)\n  - : A trap for [`Object.isExtensible()`](../../globals/Object/isExtensible.mdx).\n- [`handler.ownKeys()`](../../globals/Proxy/proxy/ownKeys.mdx)\n  - : A trap for [`Object.getOwnPropertyNames()`](../../globals/Object/getOwnPropertyNames.mdx) and\n    [`Object.getOwnPropertySymbols()`](../../globals/Object/getOwnPropertySymbols.mdx).\n- [`handler.preventExtensions()`)}](../../globals/Proxy/proxy/preventExtensions.mdx)\n  - : A trap for [`Object.preventExtensions()`](../../globals/Object/preventExtensions.mdx).\n- [`handler.set()`](../../globals/Proxy/proxy/set.mdx)\n  - : A trap for setting property values.\n- [`handler.setPrototypeOf()`](../../globals/Proxy/proxy/setPrototypeOf.mdx)\n  - : A trap for [`Object.setPrototypeOf()`](../../globals/Object/setPrototypeOf.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Proxy/proxy/apply.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.apply()\n\nThe **`handler.apply()`** method is a trap for a function call.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  apply(target, thisArg, argumentsList) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `apply()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target callable object.\n- `thisArg`\n  - : The `this` argument for the call.\n- `argumentsList`\n  - : The list of arguments for the call.\n\n### Return value\n\nThe `apply()` method can return any value.\n\n## Description\n\nThe **`handler.apply()`** method is a trap for a function call.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- Function call: `proxy(...args)`\n- [`Function.prototype.apply()`](../../../globals/Function/prototype/apply.mdx) and [`Function.prototype.call()`](../../../globals/Function/prototype/call.mdx)\n- [`Reflect.apply()`](../../../globals/Reflect/apply.mdx)\n\nOr any other operation that invokes the `[[Call]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The `target` must be a callable itself. That is, it must be a function object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Proxy/proxy/construct.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.construct()\n\nThe **`handler.construct()`** method is a trap for the `new` operator. In order for the new operation to be valid on the resulting Proxy object, the target used to initialize the proxy must itself have a `[[Construct]]` internal method (i.e. `new target` must be valid).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  construct(target, argumentsList, newTarget) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `construct()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `argumentsList`\n  - : The list of arguments for the constructor.\n- `newTarget`\n  - : The constructor that was originally called, `p` above.\n\n### Return value\n\nThe `construct` method must return an object.\n\n## Description\n\nThe **`handler.construct()`** method is a trap for the `new` operator.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- The `new` operator: `new myFunction(...args)`\n- [`Reflect.construct()`](../../../globals/Reflect/construct.mdx)\n\nOr any other operation that invokes the `[[Construct]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The result must be an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Proxy/proxy/defineProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.defineProperty()\n\nThe **`handler.defineProperty()`** method is a trap for\n[`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  defineProperty(target, property, descriptor) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `defineProperty()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property whose description is to be\n    retrieved.\n- `descriptor`\n  - : The descriptor for the property being defined or modified.\n\n### Return value\n\nThe `defineProperty()` method must return a `Boolean` indicating\nwhether or not the property has been successfully defined.\n\n## Description\n\nThe **`handler.defineProperty()`** method is a trap for\n[`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx), [`Object.defineProperties()`](../../../globals/Object/defineProperties.mdx)\n- [`Reflect.defineProperty()`](../../../globals/Reflect/defineProperty.mdx)\n\nOr any other operation that invokes the `[[DefineOwnProperty]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- A property cannot be added, if the target object is not extensible.\n- A property cannot be added as or modified to be non-configurable, if it does not\n  exists as a non-configurable own property of the target object.\n- A property may not be non-configurable, if a corresponding configurable property of\n  the target object exists.\n- If a property has a corresponding target object property then\n  `Object.defineProperty(target, prop, descriptor)`\n  will not throw an exception.\n- In strict mode, a `false` return value from the\n  `defineProperty()` handler will throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Proxy/proxy/deleteProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.deleteProperty()\n\nThe **`handler.deleteProperty()`** method is a trap for the `delete` operator.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  deleteProperty(target, property) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `deleteProperty()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property to delete.\n\n### Return value\n\nThe `deleteProperty()` method must return a `Boolean` indicating\nwhether or not the property has been successfully deleted.\n\n## Description\n\nThe **`handler.deleteProperty()`** method is a trap for the `delete` operator.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- The [`delete`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) operator: `delete proxy[foo]` and\n  `delete proxy.foo`\n- [`Reflect.deleteProperty()`](../../../globals/Reflect/deleteProperty.mdx)\n\nOr any other operation that invokes the `[[Delete]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- A property cannot be deleted, if it exists as a non-configurable own property of the\n  target object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Proxy/proxy/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.get()\n\nThe **`handler.get()`** method is a trap for getting a property\nvalue.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  get(target, property, receiver) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `get()` method. `this`\nis bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property to get.\n- `receiver`\n  - : Either the proxy or an object that inherits from the proxy.\n\n### Return value\n\nThe `get()` method can return any value.\n\n## Description\n\nThe **`handler.get()`** method is a trap for getting a property\nvalue.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- Property access: `proxy[foo]` and `proxy.bar`\n- [`Reflect.get()`](../../../globals/Reflect/get.mdx)\n\nOr any other operation that invokes the `[[Get]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The value reported for a property must be the same as the value of the corresponding\n  target object property if the target object property is a non-writable,\n  non-configurable own data property.\n- The value reported for a property must be undefined if the corresponding target\n  object property is a non-configurable own accessor property that has\n  `undefined` as its `[[Get]]` attribute.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Proxy/proxy/getOwnPropertyDescriptor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.getOwnPropertyDescriptor()\n\nThe **`handler.getOwnPropertyDescriptor()`** method is a trap for [`Object.getOwnPropertyDescriptor()`](../../../globals/Object/getOwnPropertyDescriptor.mdx).\n\n\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  getOwnPropertyDescriptor(target, prop) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `getOwnPropertyDescriptor()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `prop`\n  - : The name of the property whose description should be retrieved.\n\n### Return value\n\nThe `getOwnPropertyDescriptor()` method must return an object or `undefined`.\n\n## Description\n\nThe **`handler.getOwnPropertyDescriptor()`** method is a trap for [`Object.getOwnPropertyDescriptor()`](../../../globals/Object/getOwnPropertyDescriptor.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.getOwnPropertyDescriptor()`](../../../globals/Object/getOwnPropertyDescriptor.mdx)\n- [`Reflect.getOwnPropertyDescriptor()`](../../../globals/Reflect/getOwnPropertyDescriptor.mdx)\n\nOr any other operation that invokes the `[[GetOwnProperty]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `getOwnPropertyDescriptor()` must return an object or `undefined`.\n- A property cannot be reported as non-existent, if it exists as a non-configurable own property of the target object.\n- A property cannot be reported as non-existent, if it exists as an own property of the target object and the target object is not extensible.\n- A property cannot be reported as existent, if it does not exists as an own property of the target object and the target object is not extensible.\n- A property cannot be reported as non-configurable, if it does not exists as an own property of the target object or if it exists as a configurable own property of the target object.\n- The result of `Object.getOwnPropertyDescriptor(target)` can be applied to the target object using `Object.defineProperty()` and will not throw an exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Proxy/proxy/getPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.getPrototypeOf()\n\nThe **`handler.getPrototypeOf()`** method is a trap for the\n`[[GetPrototypeOf]]` internal method.\n\n## Syntax\n\n```js\nnew Proxy(obj, {\n  getPrototypeOf(target) {\n    // …\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `getPrototypeOf()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `getPrototypeOf()` method must return an object or `null`.\n\n## Description\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.getPrototypeOf()`](../../../globals/Object/getPrototypeOf.mdx)\n- [`Reflect.getPrototypeOf()`](../../../globals/Reflect/getPrototypeOf.mdx)\n- [`Object.prototype.isPrototypeOf()`](../../../globals/Object/prototype/isPrototypeOf.mdx)\n- `instanceof`\n\nOr any other operation that invokes the `[[GetPrototypeOf]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `getPrototypeOf()` method must return an object or `null`.\n- If `target` is not extensible,\n  `Object.getPrototypeOf(proxy)` method must return the same\n  value as `Object.getPrototypeOf(target)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Proxy/proxy/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.has()\n\nThe **`handler.has()`** method is a trap for the `in` operator.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  has(target, prop) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to `has()` method. `this` is\nbound to the handler.\n\n- `target`\n  - : The target object.\n- `prop`\n  - : The name or `Symbol` of the property to check for existence.\n\n### Return value\n\nThe `has()` method must return a boolean value.\n\n## Description\n\nThe **`handler.has()`** method is a trap for the `in` operator.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- The [`in`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/in) operator: `foo in proxy`\n- [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) check: `with(proxy) { (foo); }`\n- [`Reflect.has()`](../../../globals/Reflect/has.mdx)\n\nOr any other operation that invokes the `[[HasProperty]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- A property cannot be reported as non-existent, if it exists as a non-configurable\n  own property of the target object.\n- A property cannot be reported as non-existent, if it exists as an own property of\n  the target object and the target object is not extensible.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Proxy/proxy/isExtensible.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.isExtensible()\n\nThe **`handler.isExtensible()`** method is a trap for\n[`Object.isExtensible()`](../../../globals/Object/isExtensible.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  isExtensible(target) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `isExtensible()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `isExtensible()` method must return a boolean value.\n\n## Description\n\nThe **`handler.isExtensible()`** method is a trap for\n[`Object.isExtensible()`](../../../globals/Object/isExtensible.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.isExtensible()`](../../../globals/Object/isExtensible.mdx)\n- [`Reflect.isExtensible()`](../../../globals/Reflect/isExtensible.mdx)\n\nOr any other operation that invokes the `[[IsExtensible]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `Object.isExtensible(proxy)` must return the same value as\n  `Object.isExtensible(target)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Proxy/proxy/ownKeys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.ownKeys()\n\nThe **`handler.ownKeys()`** method is a trap for\n[`Reflect.ownKeys()`](../../../globals/Reflect/ownKeys.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  ownKeys(target) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `ownKeys()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `ownKeys()` method must return an enumerable object.\n\n## Description\n\nThe **`handler.ownKeys()`** method is a trap for\n[`Reflect.ownKeys()`](../../../globals/Reflect/ownKeys.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.getOwnPropertyNames()`](../../../globals/Object/getOwnPropertyNames.mdx)\n- [`Object.getOwnPropertySymbols()`](../../../globals/Object/getOwnPropertySymbols.mdx)\n- [`Object.keys()`](../../../globals/Object/keys.mdx)\n- [`Reflect.ownKeys()`](../../../globals/Reflect/ownKeys.mdx)\n\nOr any other operation that invokes the `[[OwnPropertyKeys]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The result of `ownKeys()` must be an array.\n- The type of each array element is either a `String` or a `Symbol`.\n- The result List must contain the keys of all non-configurable own properties of the\n  target object.\n- If the target object is not extensible, then the result List must contain all the\n  keys of the own properties of the target object and no other values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Proxy/proxy/preventExtensions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.preventExtensions()\n\nThe **`handler.preventExtensions()`** method is a trap for [`Object.preventExtensions()`](../../../globals/Object/preventExtensions.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  preventExtensions(target) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `preventExtensions()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `preventExtensions()` method must return a boolean value.\n\n## Description\n\nThe **`handler.preventExtensions()`** method is a trap for [`Object.preventExtensions()`](../../../globals/Object/preventExtensions.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.preventExtensions()`](../../../globals/Object/preventExtensions.mdx)\n- [`Reflect.preventExtensions()`](../../../globals/Reflect/preventExtensions.mdx)\n- [`Object.seal()`](../../../globals/Object/seal.mdx)\n- [`Object.freeze()`](../../../globals/Object/freeze.mdx)\n\nOr any other operation that invokes the `[[PreventExtensions]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `Object.preventExtensions(proxy)` only returns `true` if `Object.isExtensible(proxy)` is `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Proxy/proxy/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.set()\n\nThe **`handler.set()`** method is a trap for setting a property\nvalue.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  set(target, property, value, receiver) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `set()` method. `this`\nis bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property to set.\n- `value`\n  - : The new value of the property to set.\n- `receiver`\n\n  - : The object to which the assignment was originally directed. This is usually the\n    proxy itself. But a `set()` handler can also be called indirectly, via\n    the prototype chain or various other ways.\n\n    For example, suppose a script does\n    `obj.name = \"jen\"`, and `obj` is not a\n    proxy, and has no own property `.name`, but it has a proxy on its\n    prototype chain. That proxy's `set()` handler will be called, and\n    `obj` will be passed as the receiver.\n\n### Return value\n\nThe `set()` method should return a boolean value.\n\n- Return `true` to indicate that assignment succeeded.\n- If the `set()` method returns `false`, and the assignment\n  happened in strict-mode code, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) will be thrown.\n\n## Description\n\nThe **`handler.set()`** method is a trap for setting property\nvalue.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- Property assignment: `proxy[foo] = bar` and `proxy.foo = bar`\n- [`Reflect.set()`](../../../globals/Reflect/set.mdx)\n\nOr any other operation that invokes the `[[Set]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- Cannot change the value of a property to be different from the value of the\n  corresponding target object property if the corresponding target object property is a\n  non-writable, non-configurable data property.\n- Cannot set the value of a property if the corresponding target object property is a\n  non-configurable accessor property that has `undefined` as its\n  `[[Set]]` attribute.\n- In strict mode, a `false` return value from the `set()`\n  handler will throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Proxy/proxy/setPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.setPrototypeOf()\n\nThe **`handler.setPrototypeOf()`** method is a trap for\n[`Object.setPrototypeOf()`](../../../globals/Object/setPrototypeOf.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  setPrototypeOf(target, prototype) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `setPrototypeOf()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `prototype`\n  - : The object's new prototype or `null`.\n\n### Return value\n\nThe `setPrototypeOf()` method returns `true` if the\n`[[Prototype]]` was successfully changed, otherwise `false`.\n\n## Description\n\nThe **`handler.setPrototypeOf()`** method is a trap for\n[`Object.setPrototypeOf()`](../../../globals/Object/setPrototypeOf.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.setPrototypeOf()`](../../../globals/Object/setPrototypeOf.mdx)\n- [`Reflect.setPrototypeOf()`](../../../globals/Reflect/setPrototypeOf.mdx)\n\nOr any other operation that invokes the `[[SetPrototypeOf]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- If `target` is not extensible, the `prototype`\n  parameter must be the same value as\n  `Object.getPrototypeOf(target)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Proxy/revocable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Proxy.revocable()\n\nThe **`Proxy.revocable()`** static method creates a revocable `Proxy` object.\n\n## Syntax\n\n```js\nProxy.revocable(target, handler)\n```\n\n### Parameters\n\n- `target`\n  - : A target object to wrap with `Proxy`. It can be any sort of object, including a native array, a function, or even another proxy.\n- `handler`\n  - : An object whose properties are functions defining the behavior of `proxy` when an operation is performed on it.\n\n### Return value\n\nA plain object with the following two properties:\n\n- `proxy`\n  - : A Proxy object exactly the same as one created with a [`new Proxy(target, handler)`](../../globals/Proxy/Proxy.mdx) call.\n- `revoke`\n  - : A function with no parameters to revoke (switch off) the `proxy`.\n\n## Description\n\nThe `Proxy.revocable()` factory function is the same as the [`Proxy()`](../../globals/Proxy/Proxy.mdx) constructor, except that in addition to creating a proxy object, it also creates a `revoke` function that can be called to disable the proxy. The proxy object and the `revoke` function are wrapped in a plain object.\n\nThe `revoke` function does not take any parameters, nor does it rely on the `this` value. The created `proxy` object is attached to the `revoke` function as a [private property](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/Private_class_fields) that the `revoke` function accesses on itself when called (the existence of the private property is not observable from the outside, but it has implications on how garbage collection happens). The `proxy` object is _not_ captured within the [closure](https://developer.mozilla.org/docs/Web/JavaScript/Closures) of the `revoke` function (which will make garbage collection of `proxy` impossible if `revoke` is still alive).\n\nAfter the `revoke()` function gets called, the proxy becomes unusable: any trap to a handler throws a [`TypeError`](../../globals/TypeError/TypeError.mdx). Once a proxy is revoked, it remains revoked, and calling `revoke()` again has no effect — in fact, the call to `revoke()` detaches the `proxy` object from the `revoke` function, so the `revoke` function will not be able to access the proxy again at all. If the proxy is not referenced elsewhere, it will then be eligible for garbage collection. The `revoke` function also detaches `target` and `handler` from the `proxy`, so if `target` is not referenced elsewhere, it will also be eligible for garbage collection, even when its proxy is still alive, since there's no longer a way to meaningfully interact with the target object.\n\nLetting users interact with an object through a revocable proxy allows you to [control the lifetime](https://developer.mozilla.org/docs/Web/JavaScript/Memory_Management) of the object exposed to the user — you can make the object garbage-collectable even when the user is still holding a reference to its proxy.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/RangeError/RangeError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RangeError\n\nThe **`RangeError()`** constructor creates an error\nwhen a value is not in the set or range of allowed values.\n\n## Syntax\n\n```js\nnew RangeError()\nnew RangeError(message)\nnew RangeError(message, options)\nnew RangeError(message, fileName)\nnew RangeError(message, fileName, lineNumber)\n\nRangeError()\nRangeError(message)\nRangeError(message, options)\nRangeError(message, fileName)\nRangeError(message, fileName, lineNumber)\n```\n\n> **Note:** `RangeError()` can be called with or without `new`. Both create a new `RangeError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/ReadableByteStreamController/prototype/byobRequest.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# byobRequest\n\nThe **`byobRequest`** read-only property of the `ReadableByteStreamController` interface returns the current BYOB request, or `null` if there are no pending requests.\n\nAn underlying byte source should check this property, and use it to write data to the stream if it exists (rather than using `ReadableByteStreamController.enqueue()`).\nThis will result in an efficient zero-byte transfer of the data to the consumer.\n\n## Value\n\nA `ReadableStreamBYOBRequest` object instance, or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/ReadableByteStreamController/prototype/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# close()\n\nThe **`close()`** method of the `ReadableByteStreamController` interface closes the associated stream.\n\nThis might be called by the underlying source when its data source has been exhausted/completed.\n\n> **Note:** Readers will still be able to read any previously-enqueued chunks from the stream, but once those are read, the stream will become closed.\n> However if there is an outstanding and partially written `byobRequest` when `close()` is called, the stream will be errored.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableByteStreamController`, it is already closed, or the stream is not readable for some other reason.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/ReadableByteStreamController/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# desiredSize\n\nThe **`desiredSize`** read-only property of the`ReadableByteStreamController` interface returns the number of bytes required to fill the stream's internal queue to its \"desired size\".\n\nThe value is used by the stream to indicate a preferred flow rate to the underlying source.\nSources that support throttling or pausing their inflow of data (not all do!) should control the inflow such that `desiredSize` of the stream buffer is kept positive and as close to zero as possible.\n\nThe `desiredSize` is used to apply backpressure from downstream consumers.\n\n## Value\n\nAn integer. Note that this can be negative if the queue is over-full.\n\nThe value will be `null` if the stream has errored and `0` if it is closed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/ReadableByteStreamController/prototype/enqueue.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# enqueue()\n\nThe **`enqueue()`** method of the `ReadableByteStreamController` interface enqueues a given chunk on the associated readable byte stream (the chunk is copied into the stream's internal queues).\n\nThis should only be used to transfer data to the queue when `byobRequest` is `null`.\n\n## Syntax\n\n```js\nenqueue(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : The chunk to enqueue.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableByteStreamController`, or the stream cannot be read for some other reason, or the chunk is not an object, or the chunk's internal array buffer is non-existent, zero-length, or detached.\n    It is also thrown if the stream has been closed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/ReadableByteStreamController/prototype/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# error()\n\nThe **`error()`** method of the `ReadableByteStreamController` interface causes any future interactions with the associated stream to error with the specified reason.\n\nThis is commonly called by an underlying source to surface an error from the interface where it gets its data (such as a file-read or socket error).\nIt can also be called from elsewhere to trigger a stream error, for example if another part of the system that the stream relies on fails.\n\n## Syntax\n\n```js\nerror(errorObject)\n```\n\n### Parameters\n\n- `errorObject`\n  - : Any object that you want future interactions to fail with.\n\n### Return value\n\n`undefined`\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableByteStreamController`, or the stream is not readable for some other reason.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/ReadableStream/ReadableStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream()\n\nThe **`ReadableStream()`** constructor creates and returns a readable stream object from the given handlers.\n\n## Syntax\n\n```js\nnew ReadableStream()\nnew ReadableStream(underlyingSource)\nnew ReadableStream(underlyingSource, queuingStrategy)\n```\n\n### Parameters\n\n- `underlyingSource` _**optional**_\n\n  - : An object containing methods and properties that define how the constructed stream instance will behave.\n    `underlyingSource` can contain the following:\n\n    - `start` (controller) _**optional**_\n      - : This is a method, called immediately when the object is constructed. The\n        contents of this method are defined by the developer, and should aim to get access\n        to the stream source, and do anything else required to set up the stream\n        functionality. If this process is to be done asynchronously, it can return a\n        promise to signal success or failure. The `controller` parameter passed\n        to this method is a `ReadableStreamDefaultController` or a\n        `ReadableByteStreamController`, depending on the value of the\n        `type` property. This can be used by the developer to control the\n        stream during set up.\n    - `pull` (controller) _**optional**_\n      - : This method, also defined by the developer, will be called repeatedly when the\n        stream's internal queue of chunks is not full, up until it reaches its high water\n        mark. If `pull()` returns a promise, then it won't be called again\n        until that promise fulfills; if the promise rejects, the stream will become\n        errored. The `controller` parameter passed to this method is a\n        `ReadableStreamDefaultController` or a\n        `ReadableByteStreamController`, depending on the value of the\n        `type` property. This can be used by the developer to control the\n        stream as more chunks are fetched.\n    - `cancel` (reason) _**optional**_\n      - : This method, also defined by the developer, will be called if the app signals\n        that the stream is to be cancelled (e.g. if `ReadableStream.cancel()`\n        is called). The contents should do whatever is necessary to release access to the\n        stream source. If this process is asynchronous, it can return a promise to signal\n        success or failure. The `reason` parameter contains a\n        string describing why the stream was cancelled.\n    - `type` _**optional**_\n      - : This property controls what type of readable stream is being dealt with. If it\n        is included with a value set to `\"bytes\"`, the passed controller object\n        will be a `ReadableByteStreamController` capable of handling a BYOB\n        (bring your own buffer)/byte stream. If it is not included, the passed controller\n        will be a `ReadableStreamDefaultController`.\n    - `autoAllocateChunkSize` _**optional**_\n\n      - : For byte streams, the developer can set the `autoAllocateChunkSize` with a positive integer value to turn on the stream's auto-allocation feature.\n        With this is set, the stream implementation will automatically allocate a view buffer of the specified size in `ReadableByteStreamController.byobRequest` when required.\n\n        This must be set to enable zero-copy transfers to be used with a default `ReadableStreamDefaultReader`.\n        If not set, a default reader will still stream data, but `ReadableByteStreamController.byobRequest` will always be `null` and transfers to the consumer must be via the stream's internal queues.\n\n- `queuingStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer — this defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk` — this indicates the size to\n        use for each chunk, in bytes.\n\n    > **Note:** You could define your own custom\n    > `queuingStrategy`, or use an instance of\n    > `ByteLengthQueuingStrategy` or `CountQueuingStrategy`\n    > for this object value. If no `queuingStrategy` is supplied, the default\n    > used is the same as a `CountQueuingStrategy` with a high water mark of\n    > 1\\.\n\n### Return value\n\nAn instance of the `ReadableStream` object.\n\n### Exceptions\n\n- `RangeError`\n  - Thrown if the supplied type value is neither `\"bytes\"` nor `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/ReadableStream/prototype/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.cancel()\n\nThe **`cancel()`** method of the\n`ReadableStream` interface returns a `Promise` that\nresolves when the stream is canceled.\n\nCancel is used when you've completely finished with the stream and don't need any more\ndata from it, even if there are chunks enqueued waiting to be read. That data is lost\nafter cancel is called, and the stream is not readable any more. To read those chunks\nstill and not completely get rid of the stream, you'd use\n`ReadableStreamDefaultController.close()`.\n\n## Syntax\n\n```js\ncancel()\ncancel(reason)\n```\n\n### Parameters\n\n- `reason` _**optional**_\n  - : A human-readable reason for the cancellation. The underlying source may or may not use it.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason` parameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to cancel is not a `ReadableStream`, or it is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/ReadableStream/prototype/getReader.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.getReader()\n\nThe **`getReader()`** method of the `ReadableStream` interface creates a reader and locks the stream to it.\nWhile the stream is locked, no other reader can be acquired until this one is released.\n\n## Syntax\n\n```js\ngetReader()\ngetReader(options)\n```\n\n### Parameters\n\n- `options` _**optional**_\n\n  - : An object containing the following properties:\n\n    - `mode` _**optional**_\n\n      - : A property that specifies the type of reader to create.\n        Values can be:\n\n        - `\"byob\"`, which results in a `ReadableStreamBYOBReader` being created that can read readable byte streams (streams that support zero-copy transfer from an underlying byte source to the reader when internal stream buffers are empty).\n        - `undefined` (or not specified at all — this is the default), which results in a `ReadableStreamDefaultReader` being created that can read individual chunks from a stream.\n\n### Return value\n\nA `ReadableStreamDefaultReader` or `ReadableStreamBYOBReader` object instance, depending on the `mode` value.\n\n### Exceptions\n\n- `RangeError`\n  - : Thrown if the provided mode value is not `\"byob\"` or `undefined`.\n- `TypeError`\n  - : Thrown if the stream you are trying to create a reader for is already locked, or not a `ReadableStream`."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/ReadableStream/prototype/locked.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.locked\n\nThe **`locked`** read-only property of the `ReadableStream` interface returns whether or not the readable stream is locked to a reader.\n\nA readable stream can have at most one active reader at a time, and is locked to that reader until it is released.\nA reader might be obtained using `ReadableStream.getReader()` and released using the reader's `releaseLock()` method.\n\n## Value\n\nA `boolean` value indicating whether or not the readable stream is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/ReadableStream/prototype/pipeThrough.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.pipeThrough()\n\nThe **`pipeThrough()`** method of the `ReadableStream` interface provides a chainable way of piping the current stream through a transform stream or any other writable/readable pair.\n\nPiping a stream will generally lock it for the duration of the pipe, preventing other readers from locking it.\n\n## Syntax\n\n```js\npipeThrough(transformStream)\npipeThrough(transformStream, options)\n```\n\n### Parameters\n\n- `transformStream`\n\n  - : A `TransformStream` (or an object with the structure\n    `{writable, readable}`) consisting of a readable stream and a writable\n    stream working together to transform some data from one form to another. Data written\n    to the `writable` stream can be read in some transformed state by the\n    `readable` stream. For example, a `TextDecoder`, has bytes\n    written to it and strings read from it, while a video decoder has encoded bytes\n    written to it and uncompressed video frames read from it.\n\n- `options` _**optional**_\n\n  - : The options that should be used when piping to the `writable` stream.\n    Available options are:\n\n    - `preventClose`\n\n      - : If this is set to `true`, the source `ReadableStream` closing will no longer cause the destination `WritableStream` to be closed.\n        The method will return a fulfilled promise once this process completes, unless an error is encountered while closing the destination, in which case it will be rejected with that error.\n\n    - `preventAbort`\n\n      - : If this is set to `true`, errors in the source `ReadableStream` will no longer abort the destination `WritableStream`.\n        The method will return a promise rejected with the source's error, or with any error that occurs during aborting the destination.\n\n    - `preventCancel`\n\n      - : If this is set to `true`, errors in the destination `WritableStream` will no longer cancel the source `ReadableStream`.\n        In this case the method will return a promise rejected with the source's error, or with any error that occurs during canceling the source.\n        In addition, if the destination writable stream starts out closed or closing, the source readable stream will no longer be canceled.\n        In this case the method will return a promise rejected with an error indicating piping to a closed stream failed, or with any error that occurs during canceling the source.\n\n### Return value\n\nThe `readable` side of the `transformStream`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the `writable` and/or `readable` property of `transformStream` are undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/ReadableStream/prototype/pipeTo.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.pipeTo()\n\nThe **`pipeTo()`** method of the `ReadableStream` interface pipes the current `ReadableStream` to a given `WritableStream` and returns a `Promise` that fulfills when the piping process completes successfully, or rejects if any errors were encountered.\n\nPiping a stream will generally `lock` it for the duration of the pipe, preventing other readers from locking it.\n\n## Syntax\n\n```js\npipeTo(destination)\npipeTo(destination, options)\n```\n\n### Parameters\n\n- `destination`\n\n  - : A `WritableStream` that acts as the final destination for the `ReadableStream`.\n\n- `options` _**optional**_\n\n  - : The options that should be used when piping to the `writable` stream.\n    Available options are:\n\n    - `preventClose`\n      - : If this is set to `true`, the source `ReadableStream` closing will no longer cause the destination `WritableStream` to be closed.\n        The method will return a fulfilled promise once this process completes, unless an error is encountered while closing the destination in which case it will be rejected with that error.\n    - `preventAbort`\n      - : If this is set to `true`, errors in the source `ReadableStream` will no longer abort the destination `WritableStream`.\n        The method will return a promise rejected with the source's error, or with any error that occurs during aborting the destination.\n    - `preventCancel`\n      - : If this is set to `true`, errors in the destination `WritableStream` will no longer cancel the source `ReadableStream`.\n        In this case the method will return a promise rejected with the source's error, or with any error that occurs during canceling the source.\n        In addition, if the destination writable stream starts out closed or closing, the source readable stream will no longer be canceled.\n        In this case the method will return a promise rejected with an error indicating piping to a closed stream failed, or with any error that occurs during canceling the source.\n\n### Return value\n\nA `Promise` that resolves when the piping process has completed.\n\n### Exceptions\n\n- `TypeError`\n  - : The `writableStream` and/or `readableStream` objects are not a writable stream/readable stream, or one or both of the streams are locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/ReadableStream/prototype/tee.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.tee()\n\nThe **`tee()`** method of the\n`ReadableStream` interface [tees](https://streams.spec.whatwg.org/#tee-a-readable-stream) the current readable stream, returning a\ntwo-element array containing the two resulting branches as\nnew `ReadableStream` instances.\n\nThis is useful for allowing two readers to read a stream sequentially or simultaneously,\nperhaps at different speeds.\nFor example, you might do this in a ServiceWorker if you want to fetch\na response from the server and stream it to the browser, but also stream it to the\nServiceWorker cache. Since a response body cannot be consumed more than once, you'd need\ntwo copies to do this.\n\nA teed stream will partially signal backpressure at the rate of the _faster_ consumer\nof the two `ReadableStream` branches,\nand unread data is enqueued internally on the slower consumed `ReadableStream`\nwithout any limit or backpressure.\nThat is, when _both_ branches have an unread element in their internal queue,\nthen the original `ReadableStream`'s controller's internal queue will start to fill up,\nand once its `ReadableStreamDefaultController.desiredSize\", \"desiredSize` ≤ 0\nor byte stream controller `ReadableByteStreamController.desiredSize\", \"desiredSize` ≤ 0,\nthen the controller will stop calling `pull(controller)` on the\nunderlying source passed to `ReadableStream.ReadableStream\", \"new ReadableStream()`.\nIf only one branch is consumed, then the entire body will be enqueued in memory.\nTherefore, you should not use the built-in `tee()` to read very large streams\nin parallel at different speeds.\nInstead, search for an implementation that fully backpressures\nto the speed of the _slower_ consumed branch.\n\nTo cancel the stream you then need to cancel both resulting branches. Teeing a stream\nwill generally lock it for the duration, preventing other readers from locking it.\n\n## Syntax\n\n```js\ntee()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nAn `Array` containing two `ReadableStream` instances.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source stream is not a `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/ReadableStreamBYOBReader/ReadableStreamBYOBReader.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# ReadableStreamBYOBReader()\n\nThe **`ReadableStreamBYOBReader()`** constructor creates and returns a `ReadableStreamBYOBReader` object instance.\n\n> **Note:** You generally wouldn't use this constructor manually;\n> instead, you'd use the `ReadableStream.getReader()` method with the argument `\"byob\"`.\n\n## Syntax\n\n```js\nnew ReadableStreamBYOBReader(stream)\n```\n\n### Parameters\n\n- `stream`\n  - : The `ReadableStream` to be read.\n\n### Return value\n\nAn instance of the `ReadableStreamBYOBReader` object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the supplied `stream` parameter is not a `ReadableStream`, or it is already locked for reading by another reader, or its stream controller is not a `ReadableByteStreamController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/ReadableStreamBYOBReader/prototype/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# cancel()\n\nThe **`cancel()`** method of the `ReadableStreamBYOBReader` interface returns a `Promise` that resolves when the stream is canceled.\nCalling this method signals a loss of interest in the stream by a consumer.\n\n> **Note:** If the reader is active, the `cancel()` method behaves the same as that for the associated stream (`ReadableStream.cancel()`).\n\n## Syntax\n\n```js\ncancel()\ncancel(reason)\n```\n\n### Parameters\n\n- `reason` __optional__\n  - : A human-readable reason for the cancellation. The underlying source may or may not use it.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason` parameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamBYOBReader`, or the stream has no owner.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/ReadableStreamBYOBReader/prototype/closed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# closed\n\nThe **`closed`** read-only property of the `ReadableStreamBYOBReader` interface returns a `Promise` that fulfills when the stream closes, or rejects if the stream throws an error or the reader's lock is released.\n\nThis property enables you to write code that responds to an end to the streaming process.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/ReadableStreamBYOBReader/prototype/read.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# read()\n\nThe **`read()`** method of the `ReadableStreamBYOBReader` interface is used to read data into a view on a user-supplied buffer from an associated readable byte stream.\nA request for data will be satisfied from the stream's internal queues if there is any data present.\nIf the stream queues are empty, the request may be supplied as a zero-copy transfer from the underlying byte source.\n\nThe method takes as an argument a view on a buffer that supplied data is to be read into, and returns a `Promise`.\nThe promise fulfills with an object that has properties `value` and `done` when data comes available, or if the stream is cancelled.\nIf the stream is errored, the promise will be rejected with the relevant error object.\n\nIf a chunk of data is supplied, the `value` property will contain a new view.\nThis will be a view over the same buffer/backing memory (and of the same type) as the original `view` passed to the `read()` method, now populated with the new chunk of data.\nNote that once the promise fulfills, the original `view` passed to the method will be detached and no longer usable.\nThe promise will fulfill with a `value: undefined` if the stream has been cancelled.\nIn this case the backing memory region of `view` is discarded and not returned to the caller (all previously read data in the view's buffer is lost).\n\nThe `done` property indicates whether or not more data is expected.\nThe value is set `true` if the stream is closed or cancelled, and `false` otherwise.\n\n## Syntax\n\n```js\nread(view)\n```\n\n### Parameters\n\n- `view`\n  - : The view that data is to be read into.\n\n### Return value\n\nA `Promise`, which fulfills/rejects with a result depending on the state of the stream.\n\nThe following are possible:\n\n- If a chunk is available and the stream is still active, the promise fulfills with an object of the form:\n\n  ```\n  { value: theChunk, done: false }\n  ```\n\n  `theChunk` is a view containing the new data.\n  This is a view of the same type and over the same backing memory as the `view` passed to the `read()` method.\n  The original `view` will be detached and no longer usable.\n\n- If the stream is closed, the promise fulfills with an object of the form (where `theChunk` has the same properties as above):\n\n  ```\n  { value: theChunk, done: true }\n  ```\n\n- If the stream is cancelled, the promise fulfills with an object of the form:\n\n  ```\n  { value: undefined, done: true }\n  ```\n\n  In this case the backing memory is discarded.\n\n- If the stream throws an error, the promise rejects with the relevant error.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamBYOBReader`, the stream has no owner, the view is not an object or has become detached, the view's length is 0, or `ReadableStreamBYOBReader.releaseLock()` is called (when there's is a pending read request).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/ReadableStreamBYOBReader/prototype/releaseLock.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# releaseLock()\n\nThe **`releaseLock()`** method of the `ReadableStreamBYOBReader` interface releases the reader's lock on the stream.\nAfter the lock is released, the reader is no longer active.\n\nThe reader will appear errored if the associated stream is errored when the lock is released; otherwise, the reader will appear closed.\n\nIf the reader's lock is released while it still has pending read requests then the promises returned by the reader's `ReadableStreamBYOBReader.read()` method are immediately rejected with a `TypeError`.\nUnread chunks remain in the stream's internal queue and can be read later by acquiring a new reader.\n\n## Syntax\n\n```js\nreleaseLock()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamBYOBReader`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/ReadableStreamBYOBRequest/prototype/respond.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# respond()\n\nThe **`respond()`** method of the `ReadableStreamBYOBRequest` interface is used to signal to the associated readable byte stream that the specified number of bytes were written into the `ReadableStreamBYOBRequest.view`.\n\nAfter this method is called, the `view` will be transferred and no longer modifiable.\n\n## Syntax\n\n```js\nrespond(bytesWritten)\n```\n\n### Parameters\n\n- `bytesWritten`\n  - : The number of bytes written into `ReadableStreamBYOBRequest.view`.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : The request does not have an associated `ReadableByteStreamController` or the view buffer is not detached/cannot be transferred into.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/ReadableStreamBYOBRequest/prototype/respondWithNewView.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# respondWithNewView()\n\nThe **`respondWithNewView()`** method of the `ReadableStreamBYOBRequest` interface specifies a new view that the consumer of the associated readable byte stream should write to instead of `ReadableStreamBYOBRequest.view`.\n\nThe new view must be a `TypedArray` or a `DataView` that provides a view onto the same backing memory region as `ReadableStreamBYOBRequest.view`.\nAfter this method is called, the view that was passed into the method will be transferred and no longer modifiable.\n\nThe method is intended for use cases where an underlying byte source needs to transfer a `byobRequest.view` internally before finishing its response.\nFor example, the source may transfer the BYOB view to a separate worker thread, and wait for the worker to transfer it back once it has been filled.\n\n## Syntax\n\n```js\nrespondWithNewView(view)\n```\n\n### Parameters\n\n- `view`\n\n  - : A `TypedArray` or a `DataView` that the consumer of the associated readable byte stream should write to instead of `ReadableStreamBYOBRequest.view`.\n\n    This must be a view onto the same backing memory region as `ReadableStreamBYOBRequest.view` and occupy the same or less memory.\n    Specifically, it must be either the view's buffer or a transferred version, must have the same `byteOffset`, and a `byteLength` (number of bytes written) that is less than or equal to that of the view.\n\n### Return value\n\n`undefined`\n\n### Exceptions\n\n- `TypeError`\n\n  - : Thrown if the source object is not a `ReadableStreamBYOBRequest`, or there is no associated controller, or the associated internal array buffer is non-existent or detached.\n    It may also be thrown if the `view` is zero-length when there is an active reader, or non-zero when called on a closed stream.\n\n- `RangeError`\n  - : Thrown if the new `view` does not match the backing memory region of `ReadableStreamBYOBRequest.view`.\n    For example, it is not the same buffer (or a transferred version), has a different `byteOffset`, or is larger than the memory available to the backing view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/ReadableStreamBYOBRequest/prototype/view.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# view\n\nThe **`view`** getter property of the `ReadableStreamBYOBRequest` interface returns the current view.\n\n## Value\n\nA typed array representing the destination region to which the controller can write generated data.\n\n`null` if the request has already been responded to, by calling `ReadableStreamBYOBRequest.respond()` or `ReadableStreamBYOBRequest.respondWithNewView()`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/ReadableStreamDefaultController/prototype/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.close()\n\nThe **`close()`** method of the\n`ReadableStreamDefaultController` interface closes the associated stream.\n\nReaders will still be able to read any previously-enqueued chunks from the stream,\nbut once those are read, the stream will become closed. If you want to completely get\nrid of the stream and discard any enqueued chunks, you'd use\n`ReadableStream.cancel()` or\n`ReadableStreamDefaultReader.cancel()`.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/ReadableStreamDefaultController/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.desiredSize\n\nThe **`desiredSize`** read-only property of the\n`ReadableStreamDefaultController` interface returns the desired size\nrequired to fill the stream's internal queue.\n\n## Value\n\nAn integer. Note that this can be negative if the queue is over-full.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/ReadableStreamDefaultController/prototype/enqueue.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.enqueue()\n\nThe **`enqueue()`** method of the\n`ReadableStreamDefaultController` interface enqueues a given chunk in the\nassociated stream.\n\n## Syntax\n\n```js\nenqueue(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : The chunk to enqueue.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/ReadableStreamDefaultController/prototype/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.error()\n\nThe **`error()`** method of the\n`ReadableStreamDefaultController` interface causes any future interactions\nwith the associated stream to error.\n\n> **Note:** The `error()` method can be called\n> more than once, and can be called when the stream is not readable.\n\n## Syntax\n\n```js\nerror(e)\n```\n\n### Parameters\n\n- `e`\n  - : The error you want future interactions to fail with.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/ReadableStreamDefaultReader/ReadableStreamDefaultReader.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader()\n\nThe **`ReadableStreamDefaultReader()`**\nconstructor creates and returns a `ReadableStreamDefaultReader` object\ninstance.\n\n## Syntax\n\n```js\nnew ReadableStreamDefaultReader(stream)\n```\n\n### Parameters\n\n- `stream`\n  - : The `ReadableStream` to be read.\n\n### Return value\n\nAn instance of the `ReadableStreamDefaultReader` object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the supplied `stream` parameter is not a `ReadableStream`,\n    or it is already locked for reading by another reader.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/ReadableStreamDefaultReader/prototype/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n~ ReadableStreamDefaultReader.cancel()\n\nThe **`cancel()`** method of the\n`ReadableStreamDefaultReader` interface returns a `Promise` that resolves when the stream is canceled. Calling this method signals a loss of interest in the stream by a consumer.\n\nCancel is used when you've completely finished with the stream and don't need any more\ndata from it, even if there are chunks enqueued waiting to be read. That data is lost\nafter cancel is called, and the stream is not readable any more. To read those chunks\nstill and not completely get rid of the stream, you'd use\n`ReadableStreamDefaultController.close()`.\n\n> **Note:** If the reader is active, the\n> `cancel()` method behaves the same as that for the associated stream\n> (`ReadableStream.cancel()`).\n\n## Syntax\n\n```js\ncancel()\ncancel(reason)\n```\n\n### Parameters\n\n- `reason` _**optional**_\n  - : A human-readable reason for the cancellation. This value may or may not be used.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason`\nparameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamDefaultReader`, or the stream\n    has no owner.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/ReadableStreamDefaultReader/prototype/closed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader.closed\n\nThe **`closed`** read-only property of the\n`ReadableStreamDefaultReader` interface returns a\n`Promise` that fulfills when the stream closes, or rejects if the\nstream throws an error or the reader's lock is released. This property enables you\nto write code that responds to an end to the streaming process.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/ReadableStreamDefaultReader/prototype/read.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader.read()\n\nThe **`read()`** method of the `ReadableStreamDefaultReader` interface returns a `Promise` providing access to the next chunk in the stream's internal queue.\n\n## Syntax\n\n```js\nread()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise`, which fulfills/rejects with a result depending on the state of the stream.\nThe different possibilities are as follows:\n\n- If a chunk is available, the promise will be fulfilled with an object of the form `{ value: theChunk, done: false }`.\n- If the stream becomes closed, the promise will be fulfilled with an object of the form `{ value: undefined, done: true }`.\n- If the stream becomes errored, the promise will be rejected with the relevant error.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamDefaultReader`, the stream has no owner, or `ReadableStreamDefaultReader.releaseLock()` is called (when there's a pending read request).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/ReadableStreamDefaultReader/prototype/releaseLock.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader.releaseLock()\n\nThe **`releaseLock()`** method of the `ReadableStreamDefaultReader` interface releases the reader's lock on the stream.\n\nIf the associated stream is errored when the lock is released, the reader will appear errored in that same way subsequently; otherwise, the reader will appear closed.\n\nIf the reader's lock is released while it still has pending read requests then the promises returned by the reader's `ReadableStreamDefaultReader.read()` method are immediately rejected with a `TypeError`.\nUnread chunks remain in the stream's internal queue and can be read later by acquiring a new reader.\n\n## Syntax\n\n```js\nreleaseLock()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultReader`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/ReferenceError/ReferenceError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReferenceError\n\nThe **`ReferenceError`** object represents an error when a\nnon-existent variable is referenced.\n\n## Syntax\n\n```js\nnew ReferenceError()\nnew ReferenceError(message)\nnew ReferenceError(message, options)\nnew ReferenceError(message, fileName)\nnew ReferenceError(message, fileName, lineNumber)\n\nReferenceError()\nReferenceError(message)\nReferenceError(message, options)\nReferenceError(message, fileName)\nReferenceError(message, fileName, lineNumber)\n```\n\n> **Note:** `ReferenceError()` can be called with or without `new`. Both create a new `ReferenceError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Reflect/apply.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.apply()\n\nThe static **`Reflect.apply()`** method calls a target function\nwith arguments as specified.\n\n## Syntax\n\n```js\nReflect.apply(target, thisArgument, argumentsList)\n```\n\n### Parameters\n\n- `target`\n  - : The target function to call.\n- `thisArgument`\n  - : The value of `this` provided for the call to\n    `target`.\n- `argumentsList`\n  - : An array-like object specifying the arguments with which\n    `target` should be called.\n\n### Return value\n\nThe result of calling the given `target` function with the\nspecified `this` value and arguments.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if the `target` is not callable.\n\n## Description\n\nIn ES5, you typically use the [`Function.prototype.apply()`](../../globals/Function/prototype/apply.mdx) method to call a\nfunction with a given `this` value and `arguments` provided as an array\n(or an [array-like object](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects)).\n\n```js\nFunction.prototype.apply.call(Math.floor, undefined, [1.75]);\n```\n\nWith `Reflect.apply()` this becomes less verbose and easier to understand.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Reflect/construct.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.construct()\n\nThe static **`Reflect.construct()`** method acts like the\n`new` operator, but as a function. It is equivalent to\ncalling `new target(...args)`. It gives also the added option to specify a\ndifferent prototype.\n\n## Syntax\n\n```js\nReflect.construct(target, argumentsList)\nReflect.construct(target, argumentsList, newTarget)\n```\n\n### Parameters\n\n- `target`\n  - : The target function to call.\n- `argumentsList`\n  - : An array-like object specifying the arguments with which\n    `target` should be called.\n- `newTarget` _**optional**_\n  - : The constructor whose prototype should be used. See also the [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target)\n    operator. If `newTarget` is not present, its value defaults\n    to `target`.\n\n### Return value\n\nA new instance of `target` (or `newTarget`,\nif present), initialized by `target` as a constructor with the\ngiven `argumentsList`.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` or\n`newTarget` are not constructors.\n\n## Description\n\n`Reflect.construct()` allows you to invoke a constructor with a variable\nnumber of arguments. (This would also be possible by using the\n[spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) combined with the\n[`new` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new).)\n\n```js\nconst obj = new Foo(...args);\nconst obj = Reflect.construct(Foo, args);\n```\n\n### Reflect.construct() vs Object.create()\n\nPrior to the introduction of `Reflect`, objects could be constructed using\nan arbitrary combination of constructor and prototype by using\n[`Object.create()`](../../globals/Object/create.mdx).\n\n```js\nfunction OneClass() {\n  this.name = \"one\";\n}\n\nfunction OtherClass() {\n  this.name = \"other\";\n}\n\n// Calling this:\nconst obj1 = Reflect.construct(OneClass, args, OtherClass);\n\n// ...has the same result as this:\nconst obj2 = Object.create(OtherClass.prototype);\nOneClass.apply(obj2, args);\n\nconsole.log(obj1.name); // 'one'\nconsole.log(obj2.name); // 'one'\n\nconsole.log(obj1 instanceof OneClass); // false\nconsole.log(obj2 instanceof OneClass); // false\n\nconsole.log(obj1 instanceof OtherClass); // true\nconsole.log(obj2 instanceof OtherClass); // true\n\n// Another example to demonstrate below:\n\nfunction func1(a, b, c, d) {\n  console.log(arguments[3]);\n}\n\nfunction func2(d, e, f, g) {\n  console.log(arguments[3]);\n}\n\nconst obj1 = Reflect.construct(func1, [\"I\", \"Love\", \"my\", \"country\"]);\n```\n\nHowever, while the end result is the same, there is one important difference in the\nprocess. When using `Object.create()` and\n[`Function.prototype.apply()`](../../globals/Function/prototype/apply.mdx), the `new.target` operator will\npoint to `undefined` within the function used as the constructor, since the\n`new` keyword is not being used to create the object.\n\nWhen invoking `Reflect.construct()`, on the other hand, the\n`new.target` operator will point to the `newTarget`\nparameter if supplied, or `target` if not.\n\n```js\nfunction OneClass() {\n  console.log(\"OneClass\");\n  console.log(new.target);\n}\nfunction OtherClass() {\n  console.log(\"OtherClass\");\n  console.log(new.target);\n}\n\nconst obj1 = Reflect.construct(OneClass, args);\n// Logs:\n// OneClass\n// function OneClass { ... }\n\nconst obj2 = Reflect.construct(OneClass, args, OtherClass);\n// Logs:\n// OneClass\n// function OtherClass { ... }\n\nconst obj3 = Object.create(OtherClass.prototype);\nOneClass.apply(obj3, args);\n// Logs:\n// OneClass\n// undefined\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Reflect/defineProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.defineProperty()\n\nThe static **`Reflect.defineProperty()`** method is like\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx) but returns a `Boolean`.\n\n## Syntax\n\n```js\nReflect.defineProperty(target, propertyKey, attributes)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to define the property.\n- `propertyKey`\n  - : The name of the property to be defined or modified.\n- `attributes`\n  - : The attributes for the property being defined or modified.\n\n### Return value\n\nA `Boolean` indicating whether or not the property was successfully\ndefined.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.defineProperty` method allows precise addition to or\nmodification of a property on an object. For more details, see the\n[`Object.defineProperty`](../../globals/Object/defineProperty.mdx) which is similar.\n\n> **Note:** `Object.defineProperty` returns the\n> object or throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the property has not been successfully\n> defined. `Reflect.defineProperty`, however, returns a `Boolean`\n> indicating whether or not the property was successfully defined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Reflect/deleteProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.deleteProperty()\n\nThe static\n**`Reflect.deleteProperty()`**\nmethod allows to delete properties. It is like the\n[`delete` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete)\nas a function.\n\n## Syntax\n\n```js\nReflect.deleteProperty(target, propertyKey)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to delete the property.\n- `propertyKey`\n  - : The name of the property to be deleted.\n\n### Return value\n\nA `Boolean` indicating whether or not the property was successfully\ndeleted.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.deleteProperty` method allows you to delete a property on an\nobject. It returns a `Boolean` indicating whether or not the property was\nsuccessfully deleted. It is almost identical to the non-strict\n[`delete` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Reflect/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.get()\n\nThe static **`Reflect.get()`** method works like getting a\nproperty from an object (`target[propertyKey]`) as a function.\n\n## Syntax\n\n```js\nReflect.get(target, propertyKey)\nReflect.get(target, propertyKey, receiver)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to get the property.\n- `propertyKey`\n  - : The name of the property to get.\n- `receiver` _**optional**_\n  - : The value of `this` provided for the call to\n    `target` if a getter is encountered. When used with\n    `Proxy`, it can be an object that inherits from\n    `target`.\n\n### Return value\n\nThe value of the property.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.get` method allows you to get a property on an object. It is like the\n[property accessor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Property_Accessors) syntax as a function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Reflect/getOwnPropertyDescriptor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.getOwnPropertyDescriptor()\n\nThe static\n**`Reflect.getOwnPropertyDescriptor()`** method is similar to\n[`Object.getOwnPropertyDescriptor()`](../../globals/Object/getOwnPropertyDescriptor.mdx). It returns a property descriptor of\nthe given property if it exists on the object, `undefined`\notherwise.\n\n\n\n## Syntax\n\n```js\nReflect.getOwnPropertyDescriptor(target, propertyKey)\n```\n\n### Parameters\n\n- `target`\n  - : The target object in which to look for the property.\n- `propertyKey`\n  - : The name of the property to get an own property descriptor for.\n\n### Return value\n\nA property descriptor object if the property exists in `target`\nobject; otherwise, [`undefined`](../../globals/undefined.mdx).\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.getOwnPropertyDescriptor` method returns a property descriptor\nof the given property if it exists in the `target` object,\n[`undefined`](../../globals/undefined.mdx) otherwise. The only difference to\n[`Object.getOwnPropertyDescriptor()`](../../globals/Object/getOwnPropertyDescriptor.mdx) is how non-object targets are handled.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Reflect/getPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.getPrototypeOf()\n\nThe static **`Reflect.getPrototypeOf()`** method is almost the\nsame method as [`Object.getPrototypeOf()`](../../globals/Object/getPrototypeOf.mdx). It returns the prototype (i.e. the\nvalue of the internal `[[Prototype]]` property) of the specified object.\n\n\n\n## Syntax\n\n```js\nReflect.getPrototypeOf(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object of which to get the prototype.\n\n### Return value\n\nThe prototype of the given object. If there are no inherited properties,\n[`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) is returned.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.getPrototypeOf` method returns the prototype (i.e. the value of\nthe internal `[[Prototype]]` property) of the specified object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Reflect/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.has()\n\nThe static **`Reflect.has()`** method works like the [`in` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/in)\nas a function.\n\n## Syntax\n\n```js\nReflect.has(target, propertyKey)\n```\n\n### Parameters\n\n- `target`\n  - : The target object in which to look for the property.\n- `propertyKey`\n  - : The name of the property to check.\n\n### Return value\n\nA `Boolean` indicating whether or not the `target`\nhas the property.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.has` method allows you to check if a property is in an object.\nIt works like the [`in` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/in)\nas a function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Reflect/isExtensible.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.isExtensible()\n\nThe static **`Reflect.isExtensible()`** method determines if an object is extensible (whether it can have new properties added to it). It is similar to [`Object.isExtensible()`](../../globals/Object/isExtensible.mdx), but with [some differences](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/isExtensible#difference_with_object.isextensible).\n\n## Syntax\n\n```js\nReflect.isExtensible(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object which to check if it is extensible.\n\n### Return value\n\nA `Boolean` indicating whether or not the target is extensible.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Reflect/ownKeys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.ownKeys()\n\nThe static **`Reflect.ownKeys()`** method returns an array of\nthe `target` object's own property keys.\n\n## Syntax\n\n```js\nReflect.ownKeys(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object from which to get the own keys.\n\n### Return value\n\nAn `Array` of the `target` object's own property\nkeys.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.ownKeys` method returns an array of the\n`target` object's own property keys. Its return value is\nequivalent to `Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target))`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Reflect/preventExtensions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.preventExtensions()\n\nThe static **`Reflect.preventExtensions()`** method prevents new properties from ever being added to an object (i.e., prevents future extensions to the object). It is similar to [`Object.preventExtensions()`](../../globals/Object/preventExtensions.mdx), but with [some differences](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/preventExtensions#difference_with_object.preventextensions).\n\n## Syntax\n\n```js\nReflect.preventExtensions(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to prevent extensions.\n\n### Return value\n\nA `Boolean` indicating whether or not the target was successfully set to prevent extensions.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Reflect/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.set()\n\nThe static **`Reflect.set()`** method works like setting a\nproperty on an object.\n\n## Syntax\n\n```js\nReflect.set(target, propertyKey, value)\nReflect.set(target, propertyKey, value, receiver)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to set the property.\n- `propertyKey`\n  - : The name of the property to set.\n- `value`\n  - : The value to set.\n- `receiver` _**optional**_\n  - : The value of `this` provided for the call to the setter for `propertyKey` on `target`. If provided and `target` does not have a setter for `propertyKey`, the property will be set on `receiver` instead.\n\n### Return value\n\nA `Boolean` indicating whether or not setting the property was successful.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.set` method allows you to set a property on an object. It does\nproperty assignment and is like the\n[property accessor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Property_Accessors) syntax as a function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Reflect/setPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.setPrototypeOf()\n\nThe static\n**`Reflect.setPrototypeOf()`** method is the same method as\n[`Object.setPrototypeOf()`](../../globals/Object/setPrototypeOf.mdx), except for its return type. It sets the\nprototype (i.e., the internal `[[Prototype]]` property) of a specified\nobject to another object or to [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null), and returns `true` if\nthe operation was successful, or `false` otherwise.\n\n## Syntax\n\n```js\nReflect.setPrototypeOf(target, prototype)\n```\n\n### Parameters\n\n- `target`\n  - : The target object of which to set the prototype.\n- `prototype`\n  - : The object's new prototype (an object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null)).\n\n### Return value\n\nA `Boolean` indicating whether or not the prototype was successfully set.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object` or if `prototype` is neither an object nor\n[`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null).\n\n## Description\n\nThe `Reflect.setPrototypeOf` method changes the prototype (i.e. the value of\nthe internal `[[Prototype]]` property) of the specified object.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Request/Request.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request()\n\nThe **`Request()`** constructor creates a new\n`Request` object.\n\n## Syntax\n\n```js\nnew Request(input)\nnew Request(input, options)\n```\n\n### Parameters\n\n- `input`\n\n  - : Defines the resource that you wish to fetch. This can either be:\n\n    - A string containing the direct URL of the resource you want to\n      fetch.\n    - A `Request` object, effectively creating a copy.\n\n- `options` _**optional**_\n\n  - : An object containing any custom settings that you want to apply to the\n    request. The possible options are:\n\n    - `method`\n      - : The request method, e.g., `GET`, `POST`. The default is `GET`.\n    - `headers`\n      - : Any headers you want to add to your request, contained\n        within a `Headers` object or an object literal with `String` values.\n    - `body`\n      - : Any body that you want to add to your request: this can be an `ArrayBuffer`, a `TypedArray`, a `DataView`, a `URLSearchParams`, string object or literal, a `ReadableStream` object, a [`Blob`](../../globals/Blob/Blob.mdx) object, or a [`FormData`](../../globals/FormData/FormData.mdx) object.\n    - `backend` _**Fastly-specific**_\n    - `cacheOverride` _**Fastly-specific**_, see [`CacheOverride`](../../fastly:cache-override/CacheOverride/CacheOverride.mdx).\n    - `cacheKey` _**Fastly-specific**_\n    - `manualFramingHeaders`_: boolean_ _**optional**_ _**Fastly-specific**_\n      - : The default value is `false`, which means that the framing headers are automatically created based on the message body.\n        In \"automatic\" mode, a `Content-Length` is used when the size of the body can be determined before it is sent.\n        Requests sent in streaming mode, where headers are sent immediately but the content of the body is streamed later, will receive a `Transfer-Encoding: chunked` to accommodate the dynamic generation of the body.\n        In \"manual\" mode, any `Content-Length` or `Transfer-Encoding` headers will be honored.\n        You must ensure that those headers have correct values permitted by the [HTTP/1.1 specification](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).\n        If the provided headers are not permitted by the specification, the headers will revert to \"automatic\" mode and a diagnostic message will be logged about what was wrong.\n        If a `Content-Length` is permitted by the specification, but the value does not match the size of the actual body, the body will either be truncated (if it is too long), or the connection will be hung up early (if it is too short).\n    - `fastly` _**Fastly-specific**_\n      - `decompressGzip`_: boolean_ _**optional**_\n        - Whether to automatically gzip decompress the Response or not."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Request/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the `Request` interface\nreads the request body and returns it as a promise that resolves with an `ArrayBuffer`.\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an `ArrayBuffer`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Request/prototype/blob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.blob()\n\nThe **`blob()`** method of the `Request` interface reads the request body and returns it as a promise that resolves with a `Blob`.\n\n## Syntax\n\n```js\nblob()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a [`Blob`](../../../globals/Blob/Blob.mdx).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the request body has already been used or if the request's method is `GET` or `HEAD`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Request/prototype/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.body\n\nThe read-only **`body`** property of the `Request`\ninterface contains a `ReadableStream` with the body contents\nthat have been added to the request. Note that a request using the\n`GET` or `HEAD` method cannot have a body\nand `null` is returned in these cases.\n\n## Value\n\nA `ReadableStream` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Request/prototype/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.bodyUsed\n\nThe read-only **`bodyUsed`** property of the\n`Request` interface is a boolean value that indicates\nwhether the request body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Request/prototype/clone.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.clone()\n\nThe **`clone()`** method of the `Request` interface creates a copy of the current `Request` object.\n\nLike the underlying `ReadableStream.tee`` api, the `body` of a cloned `Response`\nwill signal backpressure at the rate of the _faster_ consumer of the two bodies,\nand unread data is enqueued internally on the slower consumed `body`\nwithout any limit or backpressure.\nBeware when you construct a `Request` from a stream and then `clone` it.\n\n`clone()` throws a `TypeError` if the request body has already been used. In fact, the main reason `clone()` exists is to allow multiple uses of body objects (when they are one-use only.)\n\nIf you intend to modify the request, you may prefer the `Request` constructor.\n\n## Syntax\n\n```js\nclone()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Request` object, which is an exact copy of the `Request` that `clone()` was called on.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Request/prototype/formData.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.formData()\n\nThe **`formData()`** method of the `Request` interface reads the request body and returns it as a promise that resolves with a `FormData` object.\n\n## Syntax\n\n```js\nformData()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a [`FormData`](../../../globals/FormData/FormData.mdx) object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the request body has already been used or if the request's method is `GET` or `HEAD`.\n- `SyntaxError`\n  - : Thrown if the request's content type is not `multipart/form-data` or `application/x-www-form-urlencoded`, or if the content cannot be parsed as form data.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Request/prototype/headers.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.headers\n\nThe **`headers`** read-only property of the\n`Request` interface contains the `Headers` object associated\nwith the request.\n\n## Value\n\nA `Headers` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Request/prototype/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.json()\n\nThe **`json()`** method of the `Request` interface\nreads the request body and returns it as a promise that resolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a JavaScript object. This object could be\nanything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Request/prototype/method.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.method\n\nThe **`method`** read-only property of the\n`Request` interface contains the request's method (`GET`, `POST`, etc.)\n\n## Value\n\nA `String` indicating the method of the request.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Request/prototype/setManualFramingHeaders.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.setManualFramingHeaders()\n\nThe **`setManualFramingHeaders()`** method of the `Request` interface controls how the framing headers should be determined.\n\nBy default the framing headers are set to \"automatic\" mode, which means they are created based on the body of the associated Request instance.\nIn \"automatic\" mode, a `Content-Length` is used when the size of the body can be determined before it is sent.\nRequests sent in streaming mode, where headers are sent immediately but the content of the body is streamed later, will receive a `Transfer-Encoding: chunked` to accommodate the dynamic generation of the body.\nIn \"manual\" mode, any `Content-Length` or `Transfer-Encoding` headers will be honored.\nYou must ensure that those headers have correct values permitted by the [HTTP/1.1 specification](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).\nIf the provided headers are not permitted by the specification, the headers will revert to \"automatic\" mode and a diagnostic message will be logged about what was wrong.\nIf a `Content-Length` is permitted by the specification, but the value does not match the size of the actual body, the body will either be truncated (if it is too long), or the connection will be hung up early (if it is too short).\n\n## Syntax\n\n## Syntax\n\n```js\nsetManualFramingHeaders(manual)\n```\n\n### Parameters\n\n- `manual` _: boolean_\n  - : Whether or not to use \"manual\" mode for the framing headers.\n\n### Return value\n\n`undefined`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Request/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.text()\n\nThe **`text()`** method of the `Request` interface\nreads the request body and returns it as a promise that resolves with a `String`.\nThe response is _always_ decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Promise that resolves with a `String`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Request/prototype/url.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.url\n\nThe **`url`** read-only property of the `Request` interface contains the URL of the request.\n\n## Value\n\nA string indicating the URL of the request.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Response/Response.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response()\n\nThe **`Response()`** constructor creates a new `Response` object.\n\n## Syntax\n\n```js\nnew Response()\nnew Response(body)\nnew Response(body, options)\n```\n\n### Parameters\n\n- `body` _**optional**_\n\n  - : An object defining a body for the response. This can be `null` (which is\n    the default value), or one of:\n\n    - [`ArrayBuffer`](../../globals/ArrayBuffer/ArrayBuffer.mdx)\n    - `TypedArray`\n    - [`DataView`](../../globals/DataView/DataView.mdx)\n    - [`ReadableStream`](../../globals/ReadableStream/ReadableStream.mdx)\n    - [`URLSearchParams`](../../globals/URLSearchParams/URLSearchParams.mdx)\n    - [`String`](../../globals/String/String.mdx)\n    - string literal\n    - [`Blob`](../../globals/Blob/Blob.mdx)\n    - [`FormData`](../../globals/FormData/FormData.mdx)\n\n- `options` _**optional**_\n\n  - : An options object containing any custom settings that you want to apply to the\n    response, or an empty object (which is the default value). The possible options are:\n\n    - `status`\n      - : The status code for the response, e.g., `200`.\n    - `statusText`\n      - : The status message associated with the status code,\n        e.g., `OK`.\n    - `headers`\n      - : Any headers you want to add to your response, contained\n        within a [`Headers`](../../globals/Headers/Headers.mdx) object or object literal of\n        [`String`](../../globals/String/String.mdx) key/value pairs.\n    - `manualFramingHeaders`_: boolean_ _**optional**_ _**Fastly-specific**_\n      - : The default value is `false`, which means that the framing headers are automatically created based on the message body.\n        In \"automatic\" mode, a `Content-Length` is used when the size of the body can be determined before it is sent.\n        Responses sent in streaming mode, where headers are sent immediately but the content of the body is streamed later, will receive a `Transfer-Encoding: chunked` to accommodate the dynamic generation of the body.\n        In \"manual\" mode, any `Content-Length` or `Transfer-Encoding` headers will be honored.\n        You must ensure that those headers have correct values permitted by the [HTTP/1.1 specification](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).\n        If the provided headers are not permitted by the specification, the headers will revert to \"automatic\" mode and a diagnostic message will be logged about what was wrong.\n        If a `Content-Length` is permitted by the specification, but the value does not match the size of the actual body, the body will either be truncated (if it is too long), or the connection will be hung up early (if it is too short).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Response/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface\ntakes a [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion. It returns a promise\nthat resolves with an [`ArrayBuffer`](../../../globals/ArrayBuffer/ArrayBuffer.mdx).\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an [`ArrayBuffer`](../../../globals/ArrayBuffer/ArrayBuffer.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Response/prototype/blob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.blob()\n\nThe **`blob()`** method of the [`Response`](../Response.mdx) interface takes a [`Response`](../Response.mdx) stream and reads it to completion. It returns a promise that resolves with a `Blob`.\n\n## Syntax\n\n```js\nblob()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a [`Blob`](../../../globals/Blob/Blob.mdx).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the response body has already been consumed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Response/prototype/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.body\n\nThe **`body`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface is a [`ReadableStream`](../../../globals/ReadableStream/ReadableStream.mdx) of the body contents.\n\n## Value\n\nA [`ReadableStream`](../../../globals/ReadableStream/ReadableStream.mdx), or else `null` for any `Response` object [constructed](../../../globals/Response/Response.mdx) with a null `body` property, or for any actual HTTP response that has no body.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Response/prototype/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.bodyUsed\n\nThe **`bodyUsed`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface is a boolean value that indicates whether the body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Response/prototype/formData.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.formData()\n\nThe **`formData()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface takes a [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion. It returns a promise that resolves with a `FormData` object.\n\n## Syntax\n\n```js\nformData()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a [`FormData`](../../../globals/FormData/FormData.mdx) object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the response body has already been consumed.\n- `SyntaxError`\n  - : Thrown if the response's content type is not `multipart/form-data` or `application/x-www-form-urlencoded`, or if the content cannot be parsed as form data.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Response/prototype/headers.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.headers\n\nThe **`headers`** read-only property of the\n[`Response`](../../../globals/Response/Response.mdx) interface contains the [`Headers`](../../../globals/Headers/Headers.mdx) object associated\nwith the response.\n\n## Value\n\nA [`Headers`](../../Headers/Headers.mdx) object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Response/prototype/ip.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.ip\n\nThe **`ip`** getter of the `Response` interface returns the IP address associated with the request, as either an IPv6 or IPv4 string.\n\nIn the case where no IP address is available (say the response is cached, or was manually created), `undefined` will be returned.\n\nTo ensure an origin request with an IP, pass a [`CacheOverride`](../../../fastly:cache-override/CacheOverride/CacheOverride.mdx) value.\n\n## Value\n\n`undefined` or `string`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Response/prototype/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.json()\n\nThe **`json()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface takes\na [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion. It returns a promise which\nresolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA [`Promise`](../../../globals/Promise/Promise.mdx) that resolves to a JavaScript object. This object could be\nanything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Response/prototype/ok.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.ok\n\nThe **`ok`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains a Boolean stating whether the response was successful (status in the range 200-299) or not.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Response/prototype/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.port\n\nThe **`port`** getter of the `Response` interface returns the port associated with the request, as a number.\n\nIn the case where no port is available (say the response is cached, or was manually created), `undefined` will be returned.\n\nTo ensure an origin request with a port, pass a [`CacheOverride`](../../../fastly:cache-override/CacheOverride/CacheOverride.mdx) value.\n\n## Value\n\n`undefined` or `number`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Response/prototype/setManualFramingHeaders.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.setManualFramingHeaders()\n\nThe **`setManualFramingHeaders()`** method of the `Response` interface controls how the framing headers should be determined.\n\nBy default the framing headers are set to \"automatic\" mode, which means they are created based on the body of the associated Response instance.\nIn \"automatic\" mode, a `Content-Length` is used when the size of the body can be determined before it is sent.\nResponses sent in streaming mode, where headers are sent immediately but the content of the body is streamed later, will receive a `Transfer-Encoding: chunked` to accommodate the dynamic generation of the body.\nIn \"manual\" mode, any `Content-Length` or `Transfer-Encoding` headers will be honored.\nYou must ensure that those headers have correct values permitted by the [HTTP/1.1 specification](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).\nIf the provided headers are not permitted by the specification, the headers will revert to \"automatic\" mode and a diagnostic message will be logged about what was wrong.\nIf a `Content-Length` is permitted by the specification, but the value does not match the size of the actual body, the body will either be truncated (if it is too long), or the connection will be hung up early (if it is too short).\n\n## Syntax\n\n```js\nsetManualFramingHeaders(manual)\n```\n\n### Parameters\n\n- `manual` _: boolean_\n  - : Whether or not to use \"manual\" mode for the framing headers.\n\n### Return value\n\n`undefined`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Response/prototype/status.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.status\n\nThe **`status`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains the HTTP status code of the response.\n\nFor example, `200` for success, `404` if the resource could not be found.\n\n## Value\n\nAn unsigned short number.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Response/prototype/statusText.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.statusText\n\nThe **`statusText`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains the status message corresponding to the HTTP status code in [`status`](../../../globals/Response/prototype/status.mdx).\n\nFor example, this would be `OK` for a status code `200`, `Continue` for `100`, `Not Found` for `404`.\n\n## Value\n\nA [`String`](../../../globals/String/String.mdx) containing the HTTP status message associated with the response.\nThe default value is \"\".\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Response/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.text()\n\nThe **`text()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface takes a [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion.\nIt returns a promise that resolves with a [`String`](../../../globals/String/String.mdx).\nThe response is _always_ decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Promise that resolves with a [`String`](../../../globals/String/String.mdx).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Response/prototype/url.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.url\n\nThe **`url`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains the URL of the response.\nThe value of the `url` property will be the final URL obtained after any redirects.\n\n## Value\n\nA string.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Response/redirect.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Response.redirect()\n\nThe **`redirect()`** static method of the `Response` interface returns a `Response` resulting in a redirect to the specified URL.\n\n## Syntax\n\n```js\nResponse.redirect(url)\nResponse.redirect(url, status)\n```\n\n### Parameters\n\n- `url`\n  - : The URL that the new response is to originate from.\n- `status` __optional__\n  - : An optional status code for the response (e.g., `302`.)\n\n### Return value\n\nA `Response` object.\n\n### Exceptions\n\n- `RangeError`\n  - : The specified status is not a redirect status.\n- `TypeError`\n  - : The specified URL is invalid.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/RsaHashedImportParams/RsaHashedImportParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RsaHashedImportParams\n\nThe **`RsaHashedImportParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.importKey()`, when importing any RSA-based key pair.\n\n## Instance properties\n\n- `name`\n  - : A string. This should be set to `RSASSA-PKCS1-v1_5`.\n\n- `hash`\n  - : A string representing the name of the digest function to use. This can be one of `SHA-256`, `SHA-384`, or `SHA-512`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Set/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get Set\\[Symbol.species]\n\nThe **`Set[Symbol.species]`** accessor property is an unused accessor property specifying how to copy `Set` objects.\n\n## Syntax\n\n```js\nSet[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct copied `Set` instances.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `Set` objects. Subclass constructors may override it to change the constructor assignment.\n\n> **Note:** This property is currently unused by all `Set` methods.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Set/Set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set()\n\nThe **`Set` constructor** lets you\ncreate `Set` objects that store unique values of any type, whether [primitive values](https://developer.mozilla.org/docs/Glossary/Primitive) or object\nreferences.\n\n## Syntax\n\n```js\nnew Set()\nnew Set(iterable)\n```\n\n> **Note:** `Set()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable` _**optional**_\n\n  - : If an [iterable object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) is passed, all of its elements will be added to the new\n    `Set`.\n\n    If you don't specify this parameter, or its value is `null`, the new\n    `Set` is empty.\n\n### Return value\n\nA new `Set` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Set/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype\\[Symbol.iterator]()\n\nThe **`[Symbol.iterator`** method of a `Set` object implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows sets to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the values of the set.\n\nThe initial value of this property is the same function object as the initial value of the [`Set.prototype.values`](../../../globals/Set/prototype/values.mdx) property.\n\n## Syntax\n\n```js\nset[Symbol.iterator]()\n```\n\n### Return value\n\nThe same return value as [`Set.prototype.values()`](../../../globals/Set/prototype/values.mdx): a new iterable iterator object that yields the values of the set.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Set/prototype/add.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.add()\n\nThe **`add()`** method inserts a new element with a specified value in to a `Set` object, if there isn't an element with the same value already in the `Set`.\n\n## Syntax\n\n```js\nadd(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value of the element to add to the `Set` object.\n\n### Return value\n\nThe `Set` object with added value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Set/prototype/clear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.clear()\n\nThe **`clear()`** method removes all elements from a\n`Set` object.\n\n## Syntax\n\n```js\nclear()\n```\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Set/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.delete()\n\nThe **`delete()`** method removes a specified value from a\n`Set` object, if it is in the set.\n\n## Syntax\n\n```js\ndelete(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to remove from `Set`.\n\n### Return value\n\nReturns `true` if `value` was already in\n`Set`; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Set/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.entries()\n\nThe **`entries()`** method returns a new [Iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators) object\nthat contains **an array of `[value, value]`** for each element\nin the `Set` object, in insertion order. For `Set` objects there\nis no `key` like in `Map` objects. However, to keep the API\nsimilar to the `Map` object, each _entry_ has the same value for its\n_key_ and _value_ here, so that an array `[value, value]` is\nreturned.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nA new iterator object that contains an array of `[value, value]` for each\nelement in the given `Set`, in insertion order.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Set/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.forEach()\n\nThe **`forEach()`** method executes a provided function once\nfor each value in the `Set` object, in insertion order.\n\n## Syntax\n\n```js\n// Arrow function\nforEach(() => { /* ... */ } )\nforEach((value) => { /* ... */ } )\nforEach((value, key) => { /* ... */ } )\nforEach((value, key, set) => { /* ... */ } )\n\n// Callback function\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n\n// Inline callback function\nforEach(function() { /* ... */ })\nforEach(function(value) { /* ... */ })\nforEach(function(value, key) { /* ... */ })\nforEach(function(value, key, set) { /* ... */ })\nforEach(function(value, key, set) { /* ... */ }, thisArg)\n```\n\n### Parameters\n\n- `callback`\n\n  - : Function to execute for each element, taking three arguments:\n\n    - `value`, `key`\n      - : The current element being processed in the `Set`. As there are no\n        keys in `Set`, the value is passed for both arguments.\n    - `set`\n      - : The `Set` object which `forEach()` was called upon.\n\n- `thisArg`\n  - : Value to use as `this` when executing `callbackFn`.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n## Description\n\nThe `forEach()` method executes the provided\n`callback` once for each value which actually exists in the\n`Set` object. It is not invoked for values which have been deleted. However,\nit is executed for values which are present but have the value `undefined`.\n\n`callback` is invoked with **three arguments**:\n\n- the **element value**\n- the **element key**\n- the **`Set` object being traversed**\n\nThere are no keys in `Set` objects, however, so the first two arguments are\nboth **values** contained in the [Set](../../../globals/Set/Set.mdx). This is to make it\nconsistent with other `forEach()` methods for [`Map.prototype.forEach()`](../../../globals/Map/prototype/forEach.mdx) and [`Array.prototype.forEach()`](../../../globals/Array/prototype/forEach.mdx).\n\nIf a `thisArg` parameter is provided to `forEach()`,\nit will be passed to `callback` when invoked, for use as its\n`this` value. Otherwise, the value `undefined` will be passed for\nuse as its `this` value. The `this` value ultimately observable by\n`callback` is determined according to\n[the usual rules for determining the `this` seen by a function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this).\n\nEach value is visited once, except in the case when it was deleted and re-added before\n`forEach()` has finished. `callback` is not invoked for\nvalues deleted before being visited. New values added before `forEach()` has\nfinished will be visited.\n\n`forEach()` executes the `callback` function once for\neach element in the `Set` object; it does not return a value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Set/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.has()\n\nThe **`has()`** method returns a boolean indicating whether an\nelement with the specified value exists in a `Set` object or not.\n\n## Syntax\n\n```js\nhas(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to test for presence in the `Set` object.\n\n### Return value\n\nReturns `true` if an element with the specified value exists in the `Set` object; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Set/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.keys()\n\nThe **`keys()`** method is an alias for the [`values()`](../../../globals/Set/prototype/values.mdx) method.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nA new iterator object containing the values for each element in the given\n`Set`, in insertion order.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Set/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.size\n\nThe **`size`** accessor property returns the number of (unique) elements in a [Set](../../../globals/Set/Set.mdx) object.\n\n## Description\n\nThe value of `size` is an integer representing how many entries the `Set` object has. A set accessor function for `size` is `undefined`; you cannot change this property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Set/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.values()\n\nThe **`values()`** method returns a new [Iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators) object that\ncontains the values for each element in the `Set` object in insertion order.\n\n> **Note:** The **`keys()`** method is an alias\n> for this method (for similarity with [Map](../../../globals/Map/Map.mdx) objects), hence the\n> `keys()` page redirecting here. It behaves exactly the same and returns\n> **values** of `Set` elements.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nA new iterator object containing the values for each element in the given\n`Set`, in insertion order.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/String/String.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String() constructor\n\nThe **`String`** constructor is used to create a new\n`String` object. When called instead as a function, it performs type\nconversion to a \"primitive string\" which is usually more\nuseful.\n\n## Syntax\n\n```js\nnew String(thing)\nString(thing)\n```\n\n> **Note:** `String()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\n- `thing`\n  - : Anything to be converted to a string.\n\n### Return value\n\nWhen `String` is called as a constructor (with `new`), it creates a `String` object, which is **not** a primitive.\n\nWhen `String` is called as a function, it coerces the parameter to a string primitive. `Symbol` values would be converted to `\"Symbol(description)\"`, where `description` is the [description](../../globals/Symbol/prototype/description.mdx) of the Symbol, instead of throwing.\n\n> **Warning:** You should rarely find yourself using `String` as a constructor.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/String/fromCharCode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.fromCharCode()\n\nThe static **`String.fromCharCode()`** method returns a string\ncreated from the specified sequence of UTF-16 code units.\n\n## Syntax\n\n```js\nString.fromCharCode(num1)\nString.fromCharCode(num1, num2)\nString.fromCharCode(num1, num2, /* …, */ numN)\n```\n\n### Parameters\n\n- `num1, ..., numN`\n  - : A sequence of numbers that are UTF-16 code units. The range is between\n    `0` and `65535` (`0xFFFF`). Numbers greater than\n    `0xFFFF` are truncated. No validity checks are performed.\n\n### Return value\n\nA string of length `N` consisting of the\n`N` specified UTF-16 code units.\n\n## Description\n\nThis method returns a string and not a `String` object.\n\nBecause `fromCharCode()` is a static method of `String`, you\nalways use it as `String.fromCharCode()`, rather than as a method of a\n`String` object you created.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/String/fromCodePoint.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.fromCodePoint()\n\nThe static **`String.fromCodePoint()`** method returns a string\ncreated by using the specified sequence of code points.\n\n## Syntax\n\n```js\nString.fromCodePoint(num1)\nString.fromCodePoint(num1, num2)\nString.fromCodePoint(num1, num2, /* …, */ numN)\n```\n\n### Parameters\n\n- `num1, ..., numN`\n  - : A sequence of code points.\n\n### Return value\n\nA string created by using the specified sequence of code points.\n\n### Exceptions\n\n- A `RangeError` is thrown if an invalid Unicode\n  code point is given (e.g. `\"RangeError: NaN is not a valid code point\"`).\n\n## Description\n\nThis method returns a string (and _not_ a `String` object).\n\nBecause `fromCodePoint()` is a static method of `String`, you\nmust call it as `String.fromCodePoint()`, rather than as a method of a\n`String` object you created.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/String/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype\\[Symbol.iterator]()\n\nThe **`Symbol.iterator`** method of a string implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows strings to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the Unicode code points of the string value as individual strings.\n\n## Syntax\n\n```js\nstring[Symbol.iterator]()\n```\n\n### Return value\n\nA new iterable iterator object that yields the Unicode code points of the string value as individual strings.\n\n## Description\n\nStrings are iterated by Unicode code points. This means grapheme clusters will be split, but surrogate pairs will be preserved.\n\n```js\n// \"Backhand Index Pointing Right: Dark Skin Tone\"\n[...\"👉🏿\"]; // ['👉', '🏿']\n// splits into the basic \"Backhand Index Pointing Right\" emoji and\n// the \"Dark skin tone\" emoji\n\n// \"Family: Man, Boy\"\n[...\"👨‍👦\"]; // [ '👨', '‍', '👦' ]\n// splits into the \"Man\" and \"Boy\" emoji, joined by a ZWJ\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/String/prototype/at.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.at()\n\nThe **`at()`** method takes an integer value and returns a `('String` consisting of the single UTF-16 code unit located at the specified offset. This method allows for positive and negative integers. Negative integers count back from the last string character.\n\n## Syntax\n\n```js\nat(index)\n```\n\n### Parameters\n\n- `index`\n  - : The index (position) of the string character to be returned. Supports relative indexing from the end of the string when passed a negative index; i.e. if a negative number is used, the character returned will be found by counting back from the end of the string.\n\n### Return value\n\n`('String` consisting of the single UTF-16 code unit located at the specified position. Returns [`undefined`](../../../globals/undefined.mdx) if the given index can not be found.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/String/prototype/charAt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.charAt()\n\nThe `String` object's\n**`charAt()`** method returns a new string consisting of the\nsingle UTF-16 code unit located at the specified offset into the string.\n\n## Syntax\n\n```js\ncharAt(index)\n```\n\n### Parameters\n\n- `index`\n  - : An integer between `0` and `str.length - 1`. If the\n    `index` cannot be converted to the integer or no\n    `index` is provided, the default is `0`, so the first\n    character of `str` is returned.\n\n### Return value\n\nA string representing the character (exactly one UTF-16 code unit) at the specified\n`index`. If `index` is out of range,\n`charAt()` returns an empty string.\n\n## Description\n\nCharacters in a string are indexed from left to right. The index of the first character\nis `0`, and the index of the last character—in a string called\n`stringName` is `stringName.length - 1`. If\nthe `index` you supply is out of this range, JavaScript returns an\nempty string.\n\nIf no `index` is provided to `charAt()`, the default\nis `0`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/String/prototype/charCodeAt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.charCodeAt()\n\nThe **`charCodeAt()`** method returns\nan integer between `0` and `65535` representing the UTF-16 code\nunit at the given index.\n\nThe UTF-16 code unit matches the Unicode code point for code points which can be\nrepresented in a single UTF-16 code unit. If the Unicode code point cannot be\nrepresented in a single UTF-16 code unit (because its value is greater than\n`0xFFFF`) then the code unit returned will be _the first part of a\nsurrogate pair_ for the code point. If you want the entire code point value, use\n[`codePointAt()`](../../../globals/String/prototype/codePointAt.mdx).\n\n## Syntax\n\n```js\ncharCodeAt(index)\n```\n\n### Parameters\n\n- `index`\n  - : An integer greater than or equal to `0` and less than the\n    `length` of the string. If `index` is not a number,\n    it defaults to `0`.\n\n### Return value\n\nA number representing the UTF-16 code unit value of the character at the given\n`index`. If `index` is out of range,\n`charCodeAt()` returns `NaN`.\n\n## Description\n\nUnicode code points range from `0` to `1114111`\n(`0x10FFFF`). The first 128 Unicode code points are a direct match of the\nASCII character encoding. (For information on Unicode, see [UTF-16 characters, Unicode codepoints, and grapheme clusters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters).)\n\n> **Note:** `charCodeAt()` will always return a value that is\n> less than `65536`. This is because the higher code points are represented\n> by _a pair_ of (lower valued) \"surrogate\" pseudo-characters which are used to\n> comprise the real character.\n>\n> Because of this, in order to examine (or reproduce) the full character for individual\n> character values of `65536` or greater, for such characters, it is\n> necessary to retrieve not only `charCodeAt(i)`, but also\n> `charCodeAt(i+1)` (as if manipulating a string with two\n> letters), or to use `codePointAt(i)` instead. See examples 2 and\n> 3 (below).\n\n`charCodeAt()` returns `NaN` if the given\nindex is less than `0`, or if it is equal to or greater than the\n`length` of the string.\n\nBackward compatibility: In historic versions (like JavaScript 1.2) the\n`charCodeAt()` method returns a number indicating the ISO-Latin-1 codeset\nvalue of the character at the given index. The ISO-Latin-1 codeset ranges from\n`0` to `255`. The first `0` to `127` are a\ndirect match of the ASCII character set.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/String/prototype/codePointAt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.codePointAt()\n\nThe **`codePointAt()`** method returns a non-negative integer\nthat is the Unicode code point value at the given position.\nNote that this function does not give the nth code point in a string,\nbut the code point starting at the specified string index.\n\n## Syntax\n\n```js\ncodePointAt(pos)\n```\n\n### Parameters\n\n- `pos`\n  - : Position of an element in `str` to return the code point value\n    from.\n\n### Return value\n\nA decimal number representing the code point value of the character at the given `pos`.\n\n- If there is no element at `pos`, returns [`undefined`](../../../globals/undefined.mdx).\n- If the element at `pos` is a UTF-16 high surrogate, returns the code point of the surrogate _pair_.\n- If the element at `pos` is a UTF-16 low surrogate, returns _only_ the low surrogate code point.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/String/prototype/concat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.concat()\n\nThe **`concat()`** method concatenates\nthe string arguments to the calling string and returns a new string.\n\n## Syntax\n\n```js\nconcat(str1)\nconcat(str1, str2)\nconcat(str1, str2, /* …, */ strN)\n```\n\n### Parameters\n\n- `strN`\n  - : One or more strings to concatenate to `str`.\n\n### Return value\n\nA new string containing the combined text of the strings provided.\n\n## Description\n\nThe `concat()` function concatenates the string arguments to the calling\nstring and returns a new string. Changes to the original string or the returned string\ndon't affect the other.\n\nIf the arguments are not of the type string, they are converted to string values before\nconcatenating.\n\nThe `concat()` method is very similar to the [addition/string concatenation operators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Addition) (`+`, `+=`), except that `concat()` [coerces its arguments directly to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion), while addition coerces its operands to primitives first. For more information, see the reference page for the [`+` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Addition).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/String/prototype/endsWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.endsWith()\n\nThe **`endsWith()`** method determines whether a string ends with the characters of a specified string, returning `true` or `false` as appropriate.\n\n## Syntax\n\n```js\nendsWith(searchString)\nendsWith(searchString, endPosition)\n```\n\n### Parameters\n\n- `searchString`\n  - : The characters to be searched for at the end of `str`. Cannot be a regex.\n- `endPosition` _**optional**_\n  - : The end position at which `searchString` is expected to be found (the index of `searchString`'s last character plus 1). Defaults to `str.length`.\n\n### Return value\n\n**`true`** if the given characters are found at the end of the string; otherwise, **`false`**.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If `searchString` is a regex.\n\n## Description\n\nThis method lets you determine whether or not a string ends with another string. This method is case-sensitive.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/String/prototype/includes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.includes()\n\nThe **`includes()`** method performs a case-sensitive search to determine whether one string may be found within another string, returning `true` or `false` as appropriate.\n\n## Syntax\n\n```js\nincludes(searchString)\nincludes(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n  - : A string to be searched for within `str`. Cannot be a regex.\n- `position` _**optional**_\n  - : The position within the string at which to begin searching for `searchString`. (Defaults to `0`.)\n\n### Return value\n\n**`true`** if the search string is found anywhere within the given string; otherwise, **`false`** if not.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If `searchString` is a regex.\n\n## Description\n\nThis method lets you determine whether or not a string includes another string.\n\n### Case-sensitivity\n\nThe `includes()` method is case sensitive. For example, the following expression returns `false`:\n\n```js\n\"Blue Whale\".includes(\"blue\"); // returns false\n```\n\nYou can work around this constraint by transforming both the original string and the search string to all lowercase:\n\n```js\n\"Blue Whale\".toLowerCase().includes(\"blue\"); // returns true\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/String/prototype/indexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.indexOf()\n\nThe **`indexOf()`** method, given one argument: a substring to search for, searches the entire calling string, and returns the index of the first occurrence of the specified substring. Given a second argument: a number, the method returns the first occurrence of the specified substring at an index greater than or equal to the specified number.\n\n## Syntax\n\n```js\nindexOf(searchString)\nindexOf(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n\n  - : Substring to search for, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion).\n\n    If the method is called with no arguments, `searchString` is coerced to `\"undefined\"`. Therefore,`\"undefined\".indexOf()` returns `0` — because the substring `\"undefined\"` is found at position `0` in the string `\"undefined\"`. But `\"undefine\".indexOf()`, returns `-1` — because the substring `\"undefined\"` is not found in the string `\"undefine\"`.\n\n- `position` _**optional**_\n\n  - : The method returns the index of the first occurrence of the specified substring at a position greater than or equal to `position`, which defaults to `0`. If `position` is greater than the length of the calling string, the method doesn't search the calling string at all. If `position` is less than zero, the method behaves as it would if `position` were `0`.\n\n    - `'hello world hello'.indexOf('o', -5)` returns `4` — because it causes the method to behave as if the second argument were `0`, and the first occurrence of `o` at a position greater or equal to `0` is at position `4`.\n\n    - `'hello world hello'.indexOf('world', 12)` returns `-1` — because, while it's true the substring `world` occurs at index `6`, that position is not greater than or equal to `12`.\n\n    - `'hello world hello'.indexOf('o', 99)` returns `-1` — because `99` is greater than the length of `hello world hello`, which causes the method to not search the string at all.\n\n### Return value\n\nThe index of the first occurrence of `searchString` found, or `-1` if not found.\n\n#### Return value when using an empty search string\n\nSearching for an empty search string produces strange results. With no second argument, or with a second argument whose value is less than the calling string's length, the return value is the same as the value of the second argument:\n\n```js\n\"hello world\".indexOf(\"\"); // returns 0\n\"hello world\".indexOf(\"\", 0); // returns 0\n\"hello world\".indexOf(\"\", 3); // returns 3\n\"hello world\".indexOf(\"\", 8); // returns 8\n```\n\nHowever, with a second argument whose value is greater than or equal to the string's length, the return value is the string's length:\n\n```js\n\"hello world\".indexOf(\"\", 11); // returns 11\n\"hello world\".indexOf(\"\", 13); // returns 11\n\"hello world\".indexOf(\"\", 22); // returns 11\n```\n\nIn the former instance, the method behaves as if it found an empty string just after the position specified in the second argument. In the latter instance, the method behaves as if it found an empty string at the end of the calling string.\n\n## Description\n\nStrings are zero-indexed: The index of a string's first character is `0`, and the index of a string's last character is the length of the string minus 1.\n\n```js\n\"Blue Whale\".indexOf(\"Blue\"); // returns  0\n\"Blue Whale\".indexOf(\"Blute\"); // returns -1\n\"Blue Whale\".indexOf(\"Whale\", 0); // returns  5\n\"Blue Whale\".indexOf(\"Whale\", 5); // returns  5\n\"Blue Whale\".indexOf(\"Whale\", 7); // returns -1\n\"Blue Whale\".indexOf(\"\"); // returns  0\n\"Blue Whale\".indexOf(\"\", 9); // returns  9\n\"Blue Whale\".indexOf(\"\", 10); // returns 10\n\"Blue Whale\".indexOf(\"\", 11); // returns 10\n```\n\nThe `indexOf()` method is case sensitive. For example, the following\nexpression returns `-1`:\n\n```js\n\"Blue Whale\".indexOf(\"blue\"); // returns -1\n```\n\n### Checking occurrences\n\nWhen checking if a specific substring occurs within a string, the correct way to check is test whether the return value is `-1`:\n\n```js\n\"Blue Whale\".indexOf(\"Blue\") !== -1; // true; found 'Blue' in 'Blue Whale'\n\"Blue Whale\".indexOf(\"Bloe\") !== -1; // false; no 'Bloe' in 'Blue Whale'\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/String/prototype/lastIndexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.lastIndexOf()\n\nThe **`lastIndexOf()`** method, given one argument: a substring to search for, searches the entire calling string, and returns the index of the last occurrence of the specified substring. Given a second argument: a number, the method returns the last occurrence of the specified substring at an index less than or equal to the specified number.\n\n## Syntax\n\n```js\nlastIndexOf(searchString)\nlastIndexOf(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n\n  - : Substring to search for, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion).\n\n    If the method is called with no arguments, `searchString` is coerced to `\"undefined\"`. Therefore,`\"undefined\".lastIndexOf()` returns `0` — because the substring `\"undefined\"` is found at position `0` in the string `\"undefined\"`. But `\"undefine\".lastIndexOf()`, returns `-1` — because the substring `\"undefined\"` is not found in the string `\"undefine\"`.\n\n- `position` _**optional**_\n\n  - : The method returns the index of the last occurrence of the specified substring at a position less than or equal to `position`, which defaults to `+Infinity`. If `position` is greater than the length of the calling string, the method searches the entire string. If `position` is less than `0`, the behavior is the same as for `0` — that is, the method looks for the specified substring only at index `0`.\n\n    - `'hello world hello'.lastIndexOf('world', 4)` returns `-1` — because, while the substring `world` does occurs at index `6`, that position is not less than or equal to `4`.\n\n    - `'hello world hello'.lastIndexOf('hello', 99)` returns `12` — because the last occurrence of `hello` at a position less than or equal to `99` is at position `12`.\n\n    - `'hello world hello'.lastIndexOf('hello', 0)` and `'hello world hello'.lastIndexOf('hello', -5)` both return `0` — because both cause the method to only look for `hello` at index `0`.\n\n### Return value\n\nThe index of the last occurrence of `searchString` found, or `-1` if not found.\n\n## Description\n\nStrings are zero-indexed: The index of a string's first character is `0`, and the index of a string's last character is the length of the string minus 1.\n\n```js\n\"canal\".lastIndexOf(\"a\"); // returns 3\n\"canal\".lastIndexOf(\"a\", 2); // returns 1\n\"canal\".lastIndexOf(\"a\", 0); // returns -1\n\"canal\".lastIndexOf(\"x\"); // returns -1\n\"canal\".lastIndexOf(\"c\", -5); // returns 0\n\"canal\".lastIndexOf(\"c\", 0); // returns 0\n\"canal\".lastIndexOf(\"\"); // returns 5\n\"canal\".lastIndexOf(\"\", 2); // returns 2\n```\n\n### Case-sensitivity\n\nThe `lastIndexOf()` method is case sensitive. For example, the following\nexpression returns `-1`:\n\n```js\n\"Blue Whale, Killer Whale\".lastIndexOf(\"blue\"); // returns -1\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/String/prototype/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.length\n\nThe **`length`** data property of a string contains the length of the string in UTF-16 code units.\n\n## Value\n\nA non-negative integer.\n\n## Description\n\nThis property returns the number of code units in the string. JavaScript uses [UTF-16](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters) encoding, where each Unicode character may be encoded as one or two code units, so it's possible for the value returned by `length` to not match the actual number of Unicode characters in the string. For common scripts like Latin, Cyrillic, wellknown CJK characters, etc., this should not be an issue, but if you are working with certain scripts, such as emojis, [mathematical symbols](https://en.wikipedia.org/wiki/Mathematical_Alphanumeric_Symbols), or obscure Chinese characters, you may need to account for the difference between code units and characters.\n\nThe language specification requires strings to have a maximum length of 2<sup>53</sup> - 1 elements, which is the upper limit for [precise integers](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER). However, a string with this length needs 16384TiB of storage, which cannot fit in any reasonable device's memory, so implementations tend to lower the threshold, which allows the string's length to be conveniently stored in a 32-bit integer.\n\n- In V8 (used by Chrome and Node), the maximum length is 2<sup>29</sup> - 24 (\\~1GiB). On 32-bit systems, the maximum length is 2<sup>28</sup> - 16 (\\~512MiB).\n- In Firefox, the maximum length is 2<sup>30</sup> - 2 (\\~2GiB). Before Firefox 65, the maximum length was 2<sup>28</sup> - 1 (\\~512MiB).\n- In Safari, the maximum length is 2<sup>31</sup> - 1 (\\~4GiB).\n\nFor an empty string, `length` is 0.\n\nThe static property `String.length` is unrelated to the length of strings. It's the [arity](../../../globals/Function/prototype/length.mdx) of the `String` function (loosely, the number of formal parameters it has), which is 1.\n\nSince `length` counts code units instead of characters, if you want to get the number of characters, you can first split the string with its [iterator](../../../globals/String/prototype/@@iterator.mdx), which iterates by characters:\n\n```js\nfunction getCharacterLength(str) {\n  // The string iterator that is used here iterates over characters,\n  // not mere code units\n  return [...str].length;\n}\n\nconsole.log(getCharacterLength(\"A\\uD87E\\uDC04Z\")); // 3\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/String/prototype/localeCompare.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.localeCompare()\n\nThe **`localeCompare()`** method returns a number indicating whether a reference string comes before, or after, or is the same as the given string in sort order. In implementations with [`Intl.Collator` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator) support, this method simply calls `Intl.Collator`.\n\n## Syntax\n\n```js\nlocaleCompare(compareString)\nlocaleCompare(compareString, locales)\nlocaleCompare(compareString, locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` parameters customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.Collator` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator), these parameters correspond exactly to the [`Intl.Collator()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator) constructor's parameters. Implementations without `Intl.Collator` support are asked to ignore both parameters, making the comparison result returned entirely implementation-dependent — it's only required to be _consistent_.\n\n- `compareString`\n  - : The string against which the `referenceStr` is compared.\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator#locales) parameter of the `Intl.Collator()` constructor.\n\n    In implementations without `Intl.Collator` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator#options) parameter of the `Intl.Collator()` constructor.\n\n    In implementations without `Intl.Collator` support, this parameter is ignored.\n\nSee the [`Intl.Collator()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator) for details on the `locales` and `options` parameters and how to use them.\n\n### Return value\n\nA **negative** number if `referenceStr` occurs before `compareString`; **positive** if the `referenceStr` occurs after `compareString`; `0` if they are equivalent.\n\nIn implementations with `Intl.Collator`, this is equivalent to `new Intl.Collator(locales, options).compare(referenceStr, compareString)`.\n\n## Description\n\nReturns an integer indicating whether the `referenceStr` comes\nbefore, after or is equivalent to the `compareString`.\n\n- Negative when the `referenceStr` occurs before\n  `compareString`\n- Positive when the `referenceStr` occurs after\n  `compareString`\n- Returns `0` if they are equivalent\n\n> **Warning:** Do not rely on exact return values of `-1` or `1`!\n>\n> Negative and positive integer results vary between browsers (as well as between\n> browser versions) because the W3C specification only mandates negative and positive\n> values. Some browsers may return `-2` or `2`, or even some other\n> negative or positive value.\n\n## Performance\n\nWhen comparing large numbers of strings, such as in sorting large arrays, it is better to create an [`Intl.Collator`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator) object and use the function provided by its [`compare()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/compare) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/String/prototype/match.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.match()\n\nThe **`match()`** method retrieves the result of matching a string against a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions).\n\n## Syntax\n\n```js\nmatch(regexp)\n```\n\n### Parameters\n\n- `regexp`\n\n  - : A regular expression object, or any object that has a [`Symbol.match`](../../../globals/Symbol/match.mdx) method.\n\n    If `regexp` is not a `RegExp` object and does not have a `Symbol.match` method, it is implicitly converted to a `RegExp` by using `new RegExp(regexp)`.\n\n    If you don't give any parameter and use the `match()` method directly, you will get an `Array` with an empty string: `[\"\"]`, because this is equivalent to `match(/(?:)/)`.\n\n### Return value\n\nAn `Array` whose contents depend on the presence or absence of the global (`g`) flag, or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) if no matches are found.\n\n- If the `g` flag is used, all results matching the complete regular expression will be returned, but capturing groups are not included.\n- If the `g` flag is not used, only the first complete match and its related capturing groups are returned. In this case, `match()` will return the same result as `RegExp.prototype.exec()` (an array with some extra properties).\n\n## Description\n\nThe implementation of `String.prototype.match` itself is very simple — it simply calls the `Symbol.match` method of the argument with the string as the first parameter. The actual implementation comes from [`RegExp.prototype[@@match]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@match).\n\n- If you need to know if a string matches a regular expression `RegExp`, use `RegExp.prototype.test()`.\n- If you only want the first match found, you might want to use `RegExp.prototype.exec()` instead.\n- If you want to obtain capture groups and the global flag is set, you need to use `RegExp.prototype.exec()` or [`String.prototype.matchAll()`](../../../globals/String/prototype/matchAll.mdx) instead.\n\nFor more information about the semantics of `match()` when a regex is passed, see [`RegExp.prototype[@@match]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@match).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/String/prototype/matchAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.matchAll()\n\nThe **`matchAll()`** method returns an iterator of all results matching a string against a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions), including [capturing groups](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions/Groups_and_Backreferences).\n\n## Syntax\n\n```js\nmatchAll(regexp)\n```\n\n### Parameters\n\n- `regexp`\n\n  - : A regular expression object, or any object that has a [`Symbol.matchAll`](../../../globals/Symbol/matchAll.mdx) method.\n\n    If `regexp` is not a `RegExp` object and does not have a `Symbol.matchAll` method, it is implicitly converted to a `RegExp` by using `new RegExp(regexp, 'g')`.\n\n    If `regexp` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes), then it must have the global (`g`) flag set, or a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Return value\n\nAn [iterable iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators) (which is not restartable) of matches. Each match is an array with the same shape as the return value of `RegExp.prototype.exec()`.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown if the `regexp` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes) that does not have the global (`g`) flag set (its [`flags`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/flags) property does not contain `\"g\"`).\n\n## Description\n\nThe implementation of `String.prototype.matchAll` itself is very simple — it simply calls the `Symbol.matchAll` method of the argument with the string as the first parameter (apart from the extra input validation that the regex is global). The actual implementation comes from [`RegExp.prototype[@@matchAll]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@matchAll).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/String/prototype/padEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.padEnd()\n\nThe **`padEnd()`** method pads the current string with a given\nstring (repeated, if needed) so that the resulting string reaches a given length. The\npadding is applied from the end of the current string.\n\n## Syntax\n\n```js\npadEnd(targetLength)\npadEnd(targetLength, padString)\n```\n\n### Parameters\n\n- `targetLength`\n  - : The length of the resulting string once the current `str` has\n    been padded. If the value is lower than `str.length`, the\n    current string will be returned as-is.\n- `padString` _**optional**_\n  - : The string to pad the current `str` with. If\n    `padString` is too long to stay within\n    `targetLength`, it will be truncated: for left-to-right\n    languages the left-most part and for right-to-left languages the right-most will be\n    applied. The default value for this parameter is \" \"\n    (`U+0020`).\n\n### Return value\n\nA `String` of the specified `targetLength` with the\n`padString` applied at the end of the current\n`str`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/String/prototype/padStart.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.padStart()\n\nThe **`padStart()`** method pads the\ncurrent string with another string (multiple times, if needed) until the resulting\nstring reaches the given length. The padding is applied from the start of the\ncurrent string.\n\n## Syntax\n\n```js\npadStart(targetLength)\npadStart(targetLength, padString)\n```\n\n### Parameters\n\n- `targetLength`\n  - : The length of the resulting string once the current `str` has\n    been padded. If the value is less than `str.length`, then\n    `str` is returned as-is.\n- `padString` _**optional**_\n  - : The string to pad the current `str` with. If\n    `padString` is too long to stay within the\n    `targetLength`, it will be truncated from the end.\n    The default value is the unicode \"space\" character (U+0020).\n\n### Return value\n\nA `String` of the specified `targetLength` with\n`padString` applied from the start.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/String/prototype/repeat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.repeat()\n\nThe **`repeat()`** method constructs and returns a new string\nwhich contains the specified number of copies of the string on which it was called,\nconcatenated together.\n\n## Syntax\n\n```js\nrepeat(count)\n```\n\n### Parameters\n\n- `count`\n  - : An integer between `0` and\n    [`+Infinity`](../../../globals/Number/POSITIVE_INFINITY.mdx), indicating the\n    number of times to repeat the string.\n\n### Return value\n\nA new string containing the specified number of copies of the given string.\n\n### Exceptions\n\n- Throws a `RangeError` if repeat count is negative.\n- Throws a `RangeError` if repeat count is infinity or overflows maximum string size.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/String/prototype/replace.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.replace()\n\nThe **`replace()`** method returns a new string with one, some, or all matches of a `pattern` replaced by a `replacement`. The `pattern` can be a string or a `RegExp`, and the `replacement` can be a string or a function called for each match. If `pattern` is a string, only the first occurrence will be replaced. The original string is left unchanged.\n\n## Syntax\n\n```js\nreplace(pattern, replacement)\n```\n\n### Parameters\n\n- `pattern`\n  - : Can be a string or an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method — the typical example being a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp). Any value that doesn't have the `Symbol.replace` method will be coerced to a string.\n- `replacement`\n  - : Can be a string or a function.\n    - If it's a string, it will replace the substring matched by `pattern`. A number of special replacement patterns are supported; see the [Specifying a string as the replacement](#specifying-a-string-as-the-replacement) section below.\n    - If it's a function, it will be invoked for every match and its return value is used as the replacement text. The arguments supplied to this function are described in the [Specifying a function as the replacement](#specifying-a-function-as-the-replacement) section below.\n\n### Return value\n\nA new string, with one, some, or all matches of the pattern replaced by the specified replacement.\n\n## Description\n\nThis method does not mutate the string value it's called on. It returns a new string.\n\nA string pattern will only be replaced once. To perform a global search and replace, use a regular expression with the `g` flag, or use [`replaceAll()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/replaceAll) instead.\n\nIf `pattern` is an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method (including `RegExp` objects), that method is called with the target string and `replacement` as arguments. Its return value becomes the return value of `replace()`. In this case the behavior of `replace()` is entirely encoded by the `@@replace` method — for example, any mention of \"capturing groups\" in the description below is actually functionality provided by [`RegExp.prototype[@@replace]`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@replace).\n\nIf the `pattern` is an empty string, the replacement is prepended to the start of the string.\n\n```js\n\"xxx\".replace(\"\", \"_\"); // \"_xxx\"\n```\n\nA regexp with the `g` flag is the only case where `replace()` replaces more than once. For more information about how regex properties (especially the [sticky](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky) flag) interact with `replace()`, see [`RegExp.prototype[@@replace]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@replace).\n\n### Specifying a string as the replacement\n\nThe replacement string can include the following special replacement patterns:\n\n| Pattern   | Inserts                                                                                        |\n| --------- | ---------------------------------------------------------------------------------------------- |\n| `$$`      | Inserts a `\"$\"`.                                                                               |\n| `$&`      | Inserts the matched substring.                                                                 |\n| `` $` ``  | Inserts the portion of the string that precedes the matched substring.                         |\n| `$'`      | Inserts the portion of the string that follows the matched substring.                          |\n| `$n`      | Inserts the `n`th (`1`-indexed) capturing group where `n` is a positive integer less than 100. |\n| `$<Name>` | Inserts the named capturing group where `Name` is the group name.                              |\n\n`$n` and `$<Name>` are only available if the `pattern` argument is a `RegExp` object. If the `pattern` is a string, or if the corresponding capturing group isn't present in the regex, then the pattern will be replaced as a literal. If the group is present but isn't matched (because it's part of a disjunction), it will be replaced with an empty string.\n\n```js\n\"foo\".replace(/(f)/, \"$2\");\n// \"$2oo\"; the regex doesn't have the second group\n\n\"foo\".replace(\"f\", \"$1\");\n// \"$1oo\"; the pattern is a string, so it doesn't have any groups\n\n\"foo\".replace(/(f)|(g)/, \"$2\");\n// \"oo\"; the second group exists but isn't matched\n```\n\n### Specifying a function as the replacement\n\nYou can specify a function as the second parameter. In this case, the function will be invoked after the match has been performed. The function's result (return value) will be used as the replacement string.\n\n> **Note:** The above-mentioned special replacement patterns do _not_ apply for strings returned from the replacer function.\n\nThe function has the following signature:\n\n```js\nfunction replacer(match, p1, p2, /* …, */ pN, offset, string, groups) {\n  return replacement;\n}\n```\n\nThe arguments to the function are as follows:\n\n- `match`\n  - : The matched substring. (Corresponds to `$&` above.)\n- `p1, p2, …, pN`\n  - : The `n`th string found by a capture group (including named capturing groups), provided the first argument to `replace()` is a `RegExp` object. (Corresponds to `$1`, `$2`, etc. above.) For example, if the `pattern` is `/(\\a+)(\\b+)/`, then `p1` is the match for `\\a+`, and `p2` is the match for `\\b+`. If the group is part of a disjunction (e.g. `\"abc\".replace(/(a)|(b)/, replacer)`), the unmatched alternative will be `undefined`.\n- `offset`\n  - : The offset of the matched substring within the whole string being examined. For example, if the whole string was `'abcd'`, and the matched substring was `'bc'`, then this argument will be `1`.\n- `string`\n  - : The whole string being examined.\n- `groups`\n  - : An object whose keys are the used group names, and whose values are the matched portions (`undefined` if not matched). Only present if the `pattern` contains at least one named capturing group.\n\nThe exact number of arguments depends on whether the first argument is a `RegExp` object — and, if so, how many capture groups it has.\n\nThe following example will set `newString` to `'abc - 12345 - #$*%'`:\n\n```js\nfunction replacer(match, p1, p2, p3, offset, string) {\n  // p1 is non-digits, p2 digits, and p3 non-alphanumerics\n  return [p1, p2, p3].join(\" - \");\n}\nconst newString = \"abc12345#$*%\".replace(/([^\\d]*)(\\d*)([^\\w]*)/, replacer);\nconsole.log(newString); // abc - 12345 - #$*%\n```\n\nThe function will be invoked multiple times for each full match to be replaced if the regular expression in the first parameter is global.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/String/prototype/replaceAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.replaceAll()\n\nThe **`replaceAll()`** method returns a new string with all matches of a `pattern` replaced by a `replacement`. The `pattern` can be a string or a `RegExp`, and the `replacement` can be a string or a function to be called for each match. The original string is left unchanged.\n\n## Syntax\n\n```js\nreplaceAll(pattern, replacement)\n```\n\n### Parameters\n\n- `pattern`\n\n  - : Can be a string or an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method — the typical example being a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp). Any value that doesn't have the `Symbol.replace` method will be coerced to a string.\n\n    If `pattern` is a regex, then it must have the global (`g`) flag set, or a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n- `replacement`\n  - : Can be a string or a function. The replacement has the same semantics as that of [`String.prototype.replace()`](../../../globals/String/prototype/replace.mdx).\n\n### Return value\n\nA new string, with all matches of a pattern replaced by a replacement.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown if the `pattern` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes) that does not have the global (`g`) flag set (its [`flags`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/flags) property does not contain `\"g\"`).\n\n## Description\n\nThis method does not mutate the string value it's called on. It returns a new string.\n\nUnlike [`String.prototype.replace()`](../../../globals/String/prototype/replace.mdx), this method would replace all occurrences of a string, not just the first one. This is especially useful if the string is not statically known, as calling the [`RegExp()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/RegExp) constructor without escaping special characters may unintentionally change its semantics.\n\n```js\nfunction unsafeRedactName(text, name) {\n  return text.replace(new RegExp(name, \"g\"), \"[REDACTED]\");\n}\nfunction safeRedactName(text, name) {\n  return text.replaceAll(name, \"[REDACTED]\");\n}\n\nconst report =\n  \"A hacker called ha.*er used special characters in their name to breach the system.\";\n\nconsole.log(unsafeRedactName(report, \"ha.*er\")); // \"A [REDACTED]s in their name to breach the system.\"\nconsole.log(safeRedactName(report, \"ha.*er\")); // \"A hacker called [REDACTED] used special characters in their name to breach the system.\"\n```\n\nIf `pattern` is an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method (including `RegExp` objects), that method is called with the target string and `replacement` as arguments. Its return value becomes the return value of `replaceAll()`. In this case the behavior of `replaceAll()` is entirely encoded by the `Symbol.replace` method, and therefore will have the same result as `replace()` (apart from the extra input validation that the regex is global).\n\nIf the `pattern` is an empty string, the replacement will be inserted in between every UTF-16 code unit, similar to [`String.prototype.split()`](../../../globals/String/prototype/split.mdx) behavior.\n\n```js\n\"xxx\".replaceAll(\"\", \"_\"); // \"_x_x_x_\"\n```\n\nFor more information about how regex properties (especially the [sticky](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky) flag) interact with `replaceAll()`, see [`RegExp.prototype[@@replace]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@replace).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/String/prototype/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.search()\n\nThe **`search()`** method executes a search for a match between a regular expression and this `String` object.\n\n## Syntax\n\n```js\nsearch(regexp)\n```\n\n### Parameters\n\n- `regexp`\n\n  - : A regular expression object, or any object that has a [`Symbol.search`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/search) method.\n\n    If `regexp` is not a `RegExp` object and does not have a `Symbol.search` method, it is implicitly converted to a `RegExp` by using `new RegExp(regexp)`.\n\n### Return value\n\nThe index of the first match between the regular expression and the given string, or `-1` if no match was found.\n\n## Description\n\nThe implementation of `String.prototype.search()` itself is very simple — it simply calls the `Symbol.search` method of the argument with the string as the first parameter. The actual implementation comes from [`RegExp.prototype[@@search]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@search).\n\nThe `g` flag of `regexp` has no effect on the `search()` result, and the search always happens as if the regex's `lastIndex` is 0. For more information on the behavior of `search()`, see [`RegExp.prototype[@@search]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@search).\n\nWhen you want to know whether a pattern is found, and _also_ know its index within a string, use `search()`.\n\n- If you only want to know if it exists, use the `RegExp.prototype.test()` method, which returns a boolean.\n- If you need the content of the matched text, use `String.prototype.match()` or `RegExp.prototype.exec()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/String/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.slice()\n\nThe **`slice()`** method extracts a section of a string and\nreturns it as a new string, without modifying the original string.\n\n## Syntax\n\n```js\nslice(indexStart)\nslice(indexStart, indexEnd)\n```\n\n### Parameters\n\n- `indexStart`\n  - : The index of the first character to include in the returned substring.\n- `indexEnd` _**optional**_\n  - : The index of the first character to exclude from the returned substring.\n\n### Return value\n\nA new string containing the extracted section of the string.\n\n## Description\n\n`slice()` extracts the text from one string and returns a new string. Changes to the text in one string do not affect the other string.\n\n`slice()` extracts up to but not including `indexEnd`. For example, `str.slice(1, 4)` extracts the second character through the fourth character (characters indexed `1`, `2`, and `3`).\n\n- If `indexStart >= str.length`, an empty string is returned.\n- If `indexStart < 0`, the index is counted from the end of the string. More formally, in this case, the substring starts at `max(indexStart + str.length, 0)`.\n- If `indexStart` is omitted, undefined, or cannot be converted to a number (using [`Number()`](../../../globals/Number/Number.mdx)), it's treated as `0`.\n- If `indexEnd` is omitted, undefined, or cannot be converted to a number (using [`Number()`](../../../globals/Number/Number.mdx)), or if `indexEnd >= str.length`, `slice()` extracts to the end of the string.\n- If `indexEnd < 0`, the index is counted from the end of the string. More formally, in this case, the substring ends at `max(indexEnd + str.length, 0)`.\n- If `indexEnd <= indexStart` after normalizing negative values (i.e. `indexEnd` represents a character that's before `indexStart`), an empty string is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/String/prototype/split.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.split()\n\nThe **`split()`** method takes a pattern and divides a `String` into an ordered list of substrings by searching for the pattern, puts these substrings into an array, and returns the array.\n\n## Syntax\n\n```js\nsplit()\nsplit(separator)\nsplit(separator, limit)\n```\n\n### Parameters\n\n- `separator` _**optional**_\n  - : The pattern describing where each split should occur. Can be a string or an object with a [`Symbol.split`](../../../globals/Symbol/split.mdx) method — the typical example being a regular expression. If undefined, the original target string is returned wrapped in an array.\n- `limit` _**optional**_\n  - : A non-negative integer specifying a limit on the number of substrings to be included in the array. If provided, splits the string at each occurrence of the specified `separator`, but stops when `limit` entries have been placed in the array. Any leftover text is not included in the array at all.\n    - The array may contain fewer entries than `limit` if the end of the string is reached before the limit is reached.\n    - If `limit` is `0`, `[]` is returned.\n\n### Return value\n\nAn `Array` of strings, split at each point where the `separator` occurs in the given string.\n\n## Description\n\nIf `separator` is a non-empty string, the target string is split by all matches of the `separator` without including `separator` in the results. For example, a string containing tab separated values (TSV) could be parsed by passing a tab character as the separator, like `myString.split(\"\\t\")`. If `separator` contains multiple characters, that entire character sequence must be found in order to split. If `separator` appears at the beginning (or end) of the string, it still has the effect of splitting, resulting in an empty (i.e. zero length) string appearing at the first (or last) position of the returned array. If `separator` does not occur in `str`, the returned array contains one element consisting of the entire string.\n\nIf `separator` is an empty string (`\"\"`), `str` is converted to an array of each of its UTF-16 \"characters\", without empty strings on either ends of the resulting string.\n\n> **Note:** `\"\".split(\"\")` is therefore the only way to produce an empty array when a string is passed as `separator`.\n\n> **Warning:** When the empty string (`\"\"`) is used as a separator, the string is **not** split by _user-perceived characters_ ([grapheme clusters](https://unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries)) or unicode characters (codepoints), but by UTF-16 codeunits. This destroys [surrogate pairs](https://unicode.org/faq/utf_bom.html#utf16-2). See [\"How do you get a string to a character array in JavaScript?\" on StackOverflow](https://stackoverflow.com/questions/4547609/how-to-get-character-array-from-a-string/34717402#34717402).\n\nIf `separator` is a regexp that matches empty strings, whether the match is split by UTF-16 code units or Unicode codepoints depends on if the [`u`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/unicode) flag is set.\n\n```js\n\"😄😄\".split(/(?:)/); // [ \"\\ud83d\", \"\\ude04\", \"\\ud83d\", \"\\ude04\" ]\n\"😄😄\".split(/(?:)/u); // [ \"😄\", \"😄\" ]\n```\n\nIf `separator` is a regular expression with capturing groups, then each time `separator` matches, the captured groups (including any `undefined` results) are spliced into the output array. This behavior is specified by the regexp's [`Symbol.split`](../../../globals/Symbol/split.mdx) method.\n\nIf `separator` is an object with a [`Symbol.split`](../../../globals/Symbol/split.mdx) method, that method is called with the target string and `limit` as arguments, and `this` set to the object. Its return value becomes the return value of `split`.\n\nAny other value will be coerced to a string before being used as separator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/String/prototype/startsWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.startsWith()\n\nThe **`startsWith()`** method determines whether a string begins with the characters of a specified string, returning `true` or `false` as appropriate.\n\n## Syntax\n\n```js\nstartsWith(searchString)\nstartsWith(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n  - : The characters to be searched for at the start of this string. Cannot be a regex.\n- `position` _**optional**_\n  - : The start position at which `searchString` is expected to be found (the index of `searchString`'s first character). Defaults to `0`.\n\n### Return value\n\n**`true`** if the given characters are found at the beginning of the string; otherwise, **`false`**.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If `searchString` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes).\n\n## Description\n\nThis method lets you determine whether or not a string begins with another string. This method is case-sensitive.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/String/prototype/substr.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.substr()\n\nThe **`substr()`** method returns a portion of the string, starting at the specified index and extending for a given number of characters afterwards.\n\n> **Note:** `substr()` is not part of the main ECMAScript specification — it's defined in [Annex B: Additional ECMAScript Features for Web Browsers](https://tc39.es/ecma262/#sec-additional-ecmascript-features-for-web-browsers), which is normative optional for non-browser runtimes. Therefore, people are advised to use the standard [`String.prototype.substring()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/substring) and [`String.prototype.slice()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/slice) methods instead to make their code maximally cross-platform friendly. The [`String.prototype.substring()` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/substring#the_difference_between_substring_and_substr) has some comparisons between the three methods.\n\n\n\n## Syntax\n\n```js\nsubstr(start)\nsubstr(start, length)\n```\n\n### Parameters\n\n- `start`\n  - : The index of the first character to include in the returned substring.\n- `length` _**optional**_\n  - : The number of characters to extract.\n\n### Return value\n\nA new string containing the specified part of the given string.\n\n## Description\n\nA string's `substr()` method extracts `length` characters from the string, counting from the `start` index.\n\n- If `start >= str.length`, an empty string is returned.\n- If `start < 0`, the index starts counting from the end of the string. More formally, in this case the substring starts at `max(start + str.length, 0)`.\n- If `start` is omitted or [`undefined`](../../../globals/undefined.mdx), it's treated as `0`.\n- If `length` is omitted or [`undefined`](../../../globals/undefined.mdx), or if `start + length >= str.length`, `substr()` extracts characters to the end of the string.\n- If `length < 0`, an empty string is returned.\n- For both `start` and `length`, [`NaN`](../../../globals/NaN.mdx) is treated as `0`.\n\nAlthough you are encouraged to avoid using `substr()`, there is no trivial way to migrate `substr()` to either `slice()` or `substring()` in legacy code without essentially writing a polyfill for `substr()`. For example, `str.substr(a, l)`, `str.slice(a, a + l)`, and `str.substring(a, a + l)` all have different results when `str = \"01234\", a = 1, l = -2` — `substr()` returns an empty string, `slice()` returns `\"123\"`, while `substring()` returns `\"0\"`. The actual refactoring path depends on the knowledge of the range of `a` and `l`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/String/prototype/substring.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.substring()\n\nThe **`substring()`** method returns the part of the `string` from the start index up to and excluding the end index, or to the end of the string if no end index is supplied.\n\n## Syntax\n\n```js\nsubstring(indexStart)\nsubstring(indexStart, indexEnd)\n```\n\n### Parameters\n\n- `indexStart`\n  - : The index of the first character to include in the returned substring.\n- `indexEnd` _**optional**_\n  - : The index of the first character to exclude from the returned substring.\n\n### Return value\n\nA new string containing the specified part of the given string.\n\n## Description\n\n`substring()` extracts characters from `indexStart` up to _but not including_ `indexEnd`. In particular:\n\n- If `indexEnd` is omitted, `substring()` extracts characters to the end of the string.\n- If `indexStart` is equal to `indexEnd`, `substring()` returns an empty string.\n- If `indexStart` is greater than `indexEnd`, then the effect of `substring()` is as if the two arguments were swapped; see example below.\n\nAny argument value that is less than `0` or greater than `str.length` is treated as if it were `0` and `str.length`, respectively.\n\nAny argument value that is [`NaN`](../../../globals/NaN.mdx) is treated as if it were `0`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/String/prototype/toLocaleLowerCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toLocaleLowerCase()\n\nThe **`toLocaleLowerCase()`** method returns the calling string\nvalue converted to lower case, according to any locale-specific case mappings.\n\n## Syntax\n\n```js\ntoLocaleLowerCase()\ntoLocaleLowerCase(locales)\n```\n\n### Parameters\n\n- `locales` _**optional**_\n  - : A string with a BCP 47 language tag, or an array of such strings. Indicates the locale to be used to convert to lower case according to any locale-specific case mappings. For the general form and interpretation of the `locales` argument, see [Locale identification and negotiation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation).\n\n### Return value\n\nA new string representing the calling string converted to lower case, according to any\nlocale-specific case mappings.\n\n### Exceptions\n\n- A [`RangeError`](../../../globals/RangeError/RangeError.mdx) (\"invalid language tag: xx_yy\") is thrown if a\n  `locale` argument isn't a valid language tag.\n- A [`TypeError`](../../../globals/TypeError/TypeError.mdx) (\"invalid element in locales argument\") is thrown if an\n  array element isn't of type string.\n\n## Description\n\nThe `toLocaleLowerCase()` method returns the value of the string converted\nto lower case according to any locale-specific case mappings.\n`toLocaleLowerCase()` does not affect the value of the string itself. In most\ncases, this will produce the same result as [`String.prototype.toLowerCase()`](../../../globals/String/prototype/toLowerCase.mdx), but for some locales, such as Turkish, whose case mappings do not\nfollow the default case mappings in Unicode, there may be a different result.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/String/prototype/toLocaleUpperCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toLocaleUpperCase()\n\nThe **`toLocaleUpperCase()`** method returns the calling string\nvalue converted to upper case, according to any locale-specific case mappings.\n\n## Syntax\n\n```js\ntoLocaleUpperCase()\ntoLocaleUpperCase(locales)\n```\n\n### Parameters\n\n- `locales` _**optional**_\n  - : A string with a BCP 47 language tag, or an array of such strings. Indicates the locale to be used to convert to upper case according to any locale-specific case mappings. For the general form and interpretation of the `locales` argument, see [Locale identification and negotiation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation).\n\n### Return value\n\nA new string representing the calling string converted to upper case, according to any\nlocale-specific case mappings.\n\n### Exceptions\n\n- A [`RangeError`](../../../globals/RangeError/RangeError.mdx) (\"invalid language tag: xx_yy\") is thrown if a\n  `locale` argument isn't a valid language tag.\n- A [`TypeError`](../../../globals/TypeError/TypeError.mdx) (\"invalid element in locales argument\") is thrown if an\n  array element isn't of type string.\n\n## Description\n\nThe `toLocaleUpperCase()` method returns the value of the string converted\nto upper case according to any locale-specific case mappings.\n`toLocaleUpperCase()` does not affect the value of the string itself. In most\ncases, this will produce the same result as [`String.prototype.toUpperCase()`](../../../globals/String/prototype/toUpperCase.mdx), but for some locales, such as Turkish, whose case mappings do not\nfollow the default case mappings in Unicode, there may be a different result.\n\nAlso notice that conversion is not necessarily a 1:1 character mapping, as some\ncharacters might result in two (or even more) characters when transformed to upper-case.\nTherefore the length of the result string can differ from the input length. This also\nimplies that the conversion is not stable, so i.E. the following can return\n`false`:\n`x.toLocaleLowerCase() === x.toLocaleUpperCase().toLocaleLowerCase()`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/String/prototype/toLowerCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toLowerCase()\n\nThe **`toLowerCase()`** method returns the calling string value\nconverted to lower case.\n\n## Syntax\n\n```js\ntoLowerCase()\n```\n\n### Return value\n\nA new string representing the calling string converted to lower case.\n\n## Description\n\nThe `toLowerCase()` method returns the value of the string converted to\nlower case. `toLowerCase()` does not affect the value of the string\n`str` itself.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/String/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified string value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified string value.\n\n## Description\n\nThe `String` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For `String` values, the `toString` method returns the string itself (if it's a primitive) or the string that the `String` object wraps. It has the exact same implementation as [`String.prototype.valueOf()`](../../../globals/String/prototype/valueOf.mdx).\n\nThe `toString()` method requires its `this` value to be a `String` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to string values.\n\nBecause `String` doesn't have a [`[Symbol.toPrimitive]()`](../../../globals/Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `String` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, String _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — since they are already strings, no conversion is performed.\n\n```js\nString.prototype.toString = () => \"Overridden\";\nconsole.log(`${\"foo\"}`); // \"foo\"\nconsole.log(`${new String(\"foo\")}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/String/prototype/toUpperCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toUpperCase()\n\nThe **`toUpperCase()`** method returns the calling string value\nconverted to uppercase (the value will be converted to a string if it isn't one).\n\n## Syntax\n\n```js\ntoUpperCase()\n```\n\n### Return value\n\nA new string representing the calling string converted to upper case.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : When called on [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../../globals/undefined.mdx), for example,\n    `String.prototype.toUpperCase.call(undefined)`.\n\n## Description\n\nThe `toUpperCase()` method returns the value of the string converted to\nuppercase. This method does not affect the value of the string itself since JavaScript\nstrings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/String/prototype/trim.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.trim()\n\nThe **`trim()`** method removes whitespace from both ends of a string and returns a new string, without modifying the original string.\n\nTo return a new string with whitespace trimmed from just one end, use [`String.prototype.trimStart()`](../../../globals/String/prototype/trimStart.mdx) or [`String.prototype.trimEnd()`](../../../globals/String/prototype/trimEnd.mdx).\n\n## Syntax\n\n```js\ntrim()\n```\n\n### Return value\n\nA new string representing `str` stripped of whitespace from both its beginning and end. Whitespace is defined as [white space](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#white_space) characters plus [line terminators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#line_terminators).\n\nIf neither the beginning or end of `str` has any whitespace, a new string is still returned (essentially a copy of `str`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/String/prototype/trimEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.trimEnd()\n\nThe **`trimEnd()`** method removes whitespace from the end of a string and returns a new string, without modifying the original string. `trimRight()` is an alias of this method.\n\n## Syntax\n\n```js\ntrimEnd()\n\ntrimRight()\n```\n\n### Return value\n\nA new string representing `str` stripped of whitespace from its end (right side). Whitespace is defined as [white space](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#white_space) characters plus [line terminators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#line_terminators).\n\nIf the end of `str` has no whitespace, a new string is still returned (essentially a copy of `str`).\n\n### Aliasing\n\nAfter [`String.prototype.trim()`](../../../globals/String/prototype/trim.mdx) was standardized, engines also implemented the non-standard method `trimRight`. However, for consistency with [`String.prototype.pedEnd()`](../../../globals/String/prototype/trim.mdx), when the method got standardized, its name was chosen as `trimEnd`. For web compatibility reasons, `trimRight` remains as an alias to `trimEnd`, and they refer to the exact same function object. In some engines this means:\n\n```js\nString.prototype.trimRight.name === \"trimEnd\";\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/String/prototype/trimStart.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.trimStart()\n\nThe **`trimStart()`** method removes whitespace from the beginning of a string and returns a new string, without modifying the original string. `trimLeft()` is an alias of this method.\n\n## Syntax\n\n```js\ntrimStart()\n\ntrimLeft()\n```\n\n### Return value\n\nA new string representing `str` stripped of whitespace from its beginning (left side). Whitespace is defined as [white space](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#white_space) characters plus [line terminators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#line_terminators).\n\nIf the beginning of `str` has no whitespace, a new string is still returned (essentially a copy of `str`).\n\n### Aliasing\n\nAfter [`String.prototype.trim()`](../../../globals/String/prototype/trim.mdx) was standardized, engines also implemented the non-standard method `trimLeft`. However, for consistency with [`String.prototype.padEnd()`](../../../globals/String/prototype/padEnd.mdx), when the method got standardized, its name was chosen as `trimStart`. For web compatibility reasons, `trimLeft` remains as an alias to `trimStart`, and they refer to the exact same function object. In some engines this means:\n\n```js\nString.prototype.trimLeft.name === \"trimStart\";\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/String/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a\n`String` object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nA string representing the primitive value of a given `String` object.\n\n## Description\n\nThe `valueOf()` method of `String` returns the primitive value\nof a `String` object as a string data type. This value is equivalent to\n[`String.prototype.toString()`](../../../globals/String/prototype/toString.mdx).\n\nThis method is usually called internally by JavaScript and not explicitly in code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/String/raw.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.raw()\n\nThe static **`String.raw()`** method is a tag function of [template literals](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). This is similar to the `r` prefix in Python, or the `@` prefix in C# for string literals. It's used to get the raw string form of template literals — that is, substitutions (e.g. `${foo}`) are processed, but escape sequences (e.g. `\\n`) are not.\n\n## Syntax\n\n```js\nString.raw(strings, ...substitutions)\n\nString.raw`templateString`\n```\n\n### Parameters\n\n- `strings`\n  - : Well-formed template literal array object, like `{ raw: ['foo', 'bar', 'baz'] }`. Should be an object with a `raw` property whose value is an array-like object of strings.\n- `...substitutions`\n  - : Contains substitution values.\n- `templateString`\n  - : A [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals), optionally with substitutions (`${...}`).\n\n### Return value\n\nThe raw string form of a given template literal.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if the first argument doesn't have a `raw` property, or the `raw` property is `undefined` or `null`.\n\n## Description\n\nIn most cases, `String.raw()` is used with template literals. The first syntax mentioned above is only rarely used, because the JavaScript engine will call this with proper arguments for you, (just like with other [tag functions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals#tagged_templates)).\n\n`String.raw()` is the only built-in template literal tag. It has close semantics to an untagged literal since it concatenates all arguments and returns a string. You can even re-implement it with normal JavaScript code.\n\n> **Warning:** You should not use `String.raw` directly as an \"identity\" tag. See [Building an identity tag](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/raw#building_an_identity_tag) for how to implement this.\n\nIf `String.raw()` is called with an object whose `raw` property doesn't have a `length` property or a non-positive `length`, it returns an empty string `\"\"`. If `substitutions.length < strings.raw.length - 1` (i.e. there are not enough substitutions to fill the placeholders — which can't happen in a well-formed tagged template literal), the rest of the placeholders are filled with empty strings.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/SubtleCrypto/SubtleCrypto.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SubtleCrypto\n\nThe **`SubtleCrypto`** interface provides a number of low-level cryptographic functions. Access to the features of `SubtleCrypto` is obtained through the [`crypto.subtle`](../crypto/subtle.mdx) property.\n\n> **Warning:** This API provides a number of low-level cryptographic primitives. It's very easy to misuse them, and the pitfalls involved can be very subtle.\n>\n> Even assuming you use the basic cryptographic functions correctly, secure key management and overall security system design are extremely hard to get right, and are generally the domain of specialist security experts.\n>\n> Errors in security system design and implementation can make the security of the system completely ineffective.\n>\n> Please learn and experiment, but don't guarantee or imply the security of your work before an individual knowledgeable in this subject matter thoroughly reviews it. The [Crypto 101 Course](https://www.crypto101.io/) can be a great place to start learning about the design and implementation of secure systems.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/SubtleCrypto/prototype/digest.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# digest()\n\nThe **`digest()`** method of the [`SubtleCrypto`](../SubtleCrypto.mdx)\ninterface generates a digest of the given data. A digest is a short\nfixed-length value derived from some variable-length input. Cryptographic digests should\nexhibit collision-resistance, meaning that it's hard to come up with two different\ninputs that have the same digest value.\n\nIt takes as its arguments an identifier for the digest algorithm to use and the data to\ndigest. It returns a [`Promise`](../../Promise/Promise.mdx) which will be fulfilled with the digest.\n\n## Syntax\n\n```js\ndigest(algorithm, data)\n```\n\n### Parameters\n\n- `algorithm`\n  - : This may be a string or an object with a single property `name` that is a string. The string names the hash function to use. Supported values are:\n    - `\"MD5\"` (but don't use this in cryptographic applications)\n    - `\"SHA-1\"` (but don't use this in cryptographic applications)\n    - `\"SHA-256\"`\n    - `\"SHA-384\"`\n    - `\"SHA-512\"`.\n- `data`\n  - : An `ArrayBuffer`, a `TypedArray` or a `DataView` object containing the data to be digested.\n\n### Return value\n\nA [`Promise`](../../Promise/Promise.mdx) that fulfills with an `ArrayBuffer` containing the digest.\n\n## Supported algorithms\n\nDigest algorithms, also known as cryptographic hash functions,\ntransform an arbitrarily large block of data into a fixed-size output,\nusually much shorter than the input. They have a variety of applications in\ncryptography.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/SubtleCrypto/prototype/importKey.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# importKey()\n\nThe **`importKey()`** method of the [`SubtleCrypto`](../SubtleCrypto.mdx)\ninterface imports a key: that is, it takes as input a key in an external, portable\nformat and gives you a [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) object that you can use.\n\nThe function accepts several import formats: see [Supported formats](#supported-formats) for details.\n\n## Syntax\n\n```js\nimportKey(format, keyData, algorithm, extractable, keyUsages)\n```\n\n### Parameters\n\n- `format`\n  - : A string describing the data format of the key to import. It can be one of the following:\n    - `raw`: [Raw](#raw) format.\n    - `jwk`: [JSON Web Key](#json-web-key) format.\n- `keyData`\n  - : An `ArrayBuffer`, a TypedArray, a `DataView`, or a `JSONWebKey` object containing the key in\n    the given format.\n- `algorithm`\n  - : An object defining the type of key to import and providing extra algorithm-specific parameters.\n    - For RSASSA-PKCS1-v1_5:\n      Pass an [`RsaHashedImportParams`](../../RsaHashedImportParams/RsaHashedImportParams.mdx) object.\n    - For HMAC:\n      Pass an [`HmacImportParams`](../../HmacImportParams/HmacImportParams.mdx) object.\n    - For ECDSA:\n      Pass an [`EcKeyImportParams`](../../EcKeyImportParams/EcKeyImportParams.mdx) object.\n- `extractable`\n  - : A boolean value indicating whether it will be possible to export the key.\n- `keyUsages`\n  - : An `Array` indicating what can be done with the key. Possible array values are:\n    - `encrypt`: The key may be used to encrypt messages.\n    - `decrypt`: The key may be used to decrypt messages.\n    - `sign`: The key may be used to sign messages.\n    - `verify`: The key may be used to verify signatures.\n    - `deriveKey`: The key may be used in deriving a new key.\n    - `deriveBits`: The key may be used in deriving bits.\n    - `wrapKey`: The key may be used to wrap a key.\n    - `unwrapKey`: The key may be used to unwrap a key.\n\n### Return value\n\nA [`Promise`](../../Promise/Promise.mdx)\nthat fulfills with the imported key as a [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) object.\n\n### Exceptions\n\nThe promise is rejected when one of the following exceptions is encountered:\n\n- `SyntaxError`\n  - : Raised when `keyUsages` is empty but the unwrapped key is of\n    type `secret` or `private`.\n- `TypeError`\n  - : Raised when trying to use an invalid format or if the `keyData`\n    is not suited for that format.\n\n## Supported formats\n\nThis API currently supports one key import/export format: JSON Web Key.\n\n### Raw\n\nYou can use this format to import or export AES or HMAC secret keys, or Elliptic Curve\npublic keys.\n\nIn this format the key is supplied as an `ArrayBuffer` containing the raw bytes for the key.\n\n\n### JSON Web Key\n\nYou can use JSON Web Key format to import or export RSA or Elliptic Curve public or\nprivate keys, as well as AES and HMAC secret keys.\n\nJSON Web Key format is defined in [RFC 7517](https://datatracker.ietf.org/doc/html/rfc7517).\nIt describes a way to represent public, private, and secret keys as JSON objects.\n\nA JSON Web Key looks something like this (this is an EC private key):\n\n```json\n{\n  \"crv\": \"P-384\",\n  \"d\": \"wouCtU7Nw4E8_7n5C1-xBjB4xqSb_liZhYMsy8MGgxUny6Q8NCoH9xSiviwLFfK_\",\n  \"ext\": true,\n  \"key_ops\": [\"sign\"],\n  \"kty\": \"EC\",\n  \"x\": \"SzrRXmyI8VWFJg1dPUNbFcc9jZvjZEfH7ulKI1UkXAltd7RGWrcfFxqyGPcwu6AQ\",\n  \"y\": \"hHUag3OvDzEr0uUQND4PXHQTXP5IDGdYhJhL-WLKjnGjQAw0rNGy5V29-aV-yseW\"\n};\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/SubtleCrypto/prototype/sign.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# sign()\n\nThe **`sign()`** method of the [`SubtleCrypto`](../SubtleCrypto.mdx) interface generates a digital signature.\n\nIt takes as its arguments a key to sign with, some algorithm-specific\nparameters, and the data to sign. It returns a `Promise` which will be\nfulfilled with the signature.\n\nYou can use the corresponding [`verify()`](./verify.mdx) method to verify the signature.\n\n## Syntax\n\n```js\nsign(algorithm, key, data)\n```\n\n### Parameters\n\n- `algorithm`\n  - : A string or object that specifies the signature algorithm to use and its parameters:\n    - To use [RSASSA-PKCS1-v1_5](#rsassa-pkcs1-v1_5), pass the string `\"RSASSA-PKCS1-v1_5\"` or an object of the form `{ \"name\": \"RSASSA-PKCS1-v1_5\" }`.\n    - To use [HMAC](#hmac), pass the string `\"HMAC\"` or an object of the form `{ \"name\": \"HMAC\" }`.\n- `key`\n  - : A [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) object containing the key to be used for signing.\n    If `algorithm` identifies a public-key cryptosystem, this is the private key.\n- `data`\n  - : An `ArrayBuffer`, a TypedArray or a `DataView` object containing the data to be signed.\n\n### Return value\n\nA `Promise` that fulfills with an `ArrayBuffer` containing the signature.\n\n### Exceptions\n\nThe promise is rejected when the following exception is encountered:\n\n- `InvalidAccessError`\n  - : Raised when the signing key is not a key for the request signing algorithm or when\n    trying to use an algorithm that is either unknown or isn't suitable for signing.\n\n## Supported algorithms\n\n### RSASSA-PKCS1-v1_5\n\nThe RSASSA-PKCS1-v1_5 algorithm is specified in [RFC 3447](https://datatracker.ietf.org/doc/html/rfc3447).\n\n### HMAC\n\nThe HMAC algorithm calculates and verifies hash-based message authentication codes according to the\n[FIPS 198-1 standard](https://csrc.nist.gov/csrc/media/publications/fips/198/1/final/documents/fips-198-1_final.pdf).\n\nThe digest algorithm to use is specified in the\n[`HmacImportParams`](../../HmacImportParams/HmacImportParams.mdx) object\nthat you pass into [`SubtleCrypto.importKey()`](./importKey.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/SubtleCrypto/prototype/verify.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# verify()\n\nThe **`verify()`** method verifies a digital signature.\n\nIt takes as its arguments a key to verify the signature with, some algorithm-specific parameters, the signature, and the original signed data.\nIt returns a `Promise` which will be fulfilled with a boolean value indicating whether the signature is valid.\n\n## Syntax\n\n```js\nverify(algorithm, key, signature, data)\n```\n\n### Parameters\n\n- `algorithm`\n  - : A string or object defining the algorithm to use, and for some algorithm choices, some extra parameters.\n    The values given for the extra parameters must match those passed into the corresponding [`sign()`](./sign.mdx) call.\n    - To use RSASSA-PKCS1-v1_5, pass the string `\"RSASSA-PKCS1-v1_5\"` or an object of the form `{ \"name\": \"RSASSA-PKCS1-v1_5\" }`.\n    - To use HMAC, pass the string `\"HMAC\"` or an object of the form `{ \"name\": \"HMAC\" }`.\n- `key`\n  - : A [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) containing the key that will be used to verify the signature.\n    It is the secret key for a symmetric algorithm and the public key for a public-key system.\n- `signature`\n  - : A `ArrayBuffer` containing the signature to verify.\n- `data`\n  - : A `ArrayBuffer` containing the data whose signature is to be verified.\n\n### Return value\n\nA `Promise` that fulfills with a\nboolean value: `true` if the signature is valid, `false`\notherwise.\n\n### Exceptions\n\nThe promise is rejected when the following exception is encountered:\n\n- `InvalidAccessError`\n  - : Raised when the encryption key is not a key for the requested verifying algorithm or\n    when trying to use an algorithm that is either unknown or isn't suitable for a verify\n    operation.\n\n## Supported algorithms\n\nThe `verify()` method supports the same algorithms as the [`sign()`](./sign.mdx) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Symbol/Symbol.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol()\n\nThe `Symbol()` constructor returns a value of type **symbol**,\nbut is incomplete as a constructor because it does not support the syntax\n\"`new Symbol()`\" and it is not intended to be subclassed. It may be used as\nthe value of an\n[`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends)\nclause of a `class` definition but a\n[`super`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/super)\ncall to it will cause an exception.\n\n## Syntax\n\n```js\nSymbol()\nSymbol(description)\n```\n\n> **Note:** `Symbol()` can only be called without `new`. Attempting to construct it with `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `description` _**optional**_\n  - : A string. A description of the symbol which can be used for debugging but not to\n    access the symbol itself.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Symbol/asyncIterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.asyncIterator\n\nThe **`Symbol.asyncIterator`** well-known symbol specifies the default [async iterator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_async_iterator_and_async_iterable_protocols) for an object. If this property is set on an object, it is an async iterable and can be used in a [`for await...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for-await...of) loop.\n\n## Value\n\nThe well-known symbol `Symbol.asyncIterator`.\n\n## Description\n\nThe `Symbol.asyncIterator` symbol is a builtin symbol that is used to access an object's `Symbol.asyncIterator` method. In order for an object to be async iterable, it must have a `Symbol.asyncIterator` key.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Symbol/for.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.for()\n\nThe **`Symbol.for(key)`** method searches for existing symbols\nin a runtime-wide symbol registry with the given key and returns it if found. Otherwise\na new symbol gets created in the global symbol registry with this key.\n\n## Syntax\n\n```js\nSymbol.for(key)\n```\n\n### Parameters\n\n- `key`\n  - : String, required. The key for the symbol (and also used for the description of the\n    symbol).\n\n### Return value\n\nAn existing symbol with the given key if found; otherwise, a new symbol is created and\nreturned.\n\n## Description\n\nIn contrast to `Symbol()`, the `Symbol.for()` function creates a\nsymbol available in a [global symbol registry](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol#shared_symbols_in_the_global_symbol_registry) list. `Symbol.for()` does also\nnot necessarily create a new symbol on every call, but checks first if a symbol with the\ngiven `key` is already present in the registry. In that case, that symbol is\nreturned. If no symbol with the given key is found, `Symbol.for()` will\ncreate a new global symbol.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Symbol/hasInstance.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.hasInstance\n\nThe **`Symbol.hasInstance`** well-known symbol is used to determine if a constructor object recognizes an object as its instance. The `instanceof` operator's behavior can be customized by this symbol.\n\n## Value\n\nThe well-known symbol `Symbol.hasInstance`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Symbol/isConcatSpreadable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.isConcatSpreadable\n\nThe **`Symbol.isConcatSpreadable`** well-known symbol is used to configure if an object should be flattened to its array elements when using the [`Array.prototype.concat()`](../../globals/Array/prototype/concat.mdx) method.\n\n## Value\n\nThe well-known symbol `Symbol.isConcatSpreadable`.\n\n## Description\n\nThe `Symbol.isConcatSpreadable` symbol (`Symbol.isConcatSpreadable`) can be defined as an own or inherited property and its value is a boolean. It can control behavior for arrays and array-like objects:\n\n- For array objects, the default behavior is to spread (flatten) elements. `Symbol.isConcatSpreadable` can avoid flattening in these cases.\n- For array-like objects, the default behavior is no spreading or flattening. `Symbol.isConcatSpreadable` can force flattening in these cases.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Symbol/iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.iterator\n\nThe well-known **`Symbol.iterator`** symbol specifies the default iterator for an object. Used by [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of).\n\n## Value\n\nThe well-known symbol `Symbol.iterator`.\n\n## Description\n\nWhenever an object needs to be iterated (such as at the beginning of a `for...of` loop), its `Symbol.iterator` method is called with no arguments, and the returned **iterator** is used to obtain the values to be iterated.\n\nSome built-in types have a default iteration behavior, while other types (such as `Object`) do not. The built-in types with a `Symbol.iterator` method are:\n\n- [`Array.prototype[Symbol.iterator]()`](../../globals/Array/prototype/@@iterator.mdx)\n- [`String.prototype[Symbol.iterator]()`](../../globals/String/prototype/@@iterator.mdx)\n- [`Map.prototype[Symbol.iterator]()`](../../globals/Map/prototype/@@iterator.mdx)\n- [`Set.prototype[Symbol.iterator]()`](../../globals/Set/prototype/@@iterator.mdx)\n\nSee also [Iteration protocols](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) for more information.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Symbol/keyFor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.keyFor()\n\nThe **`Symbol.keyFor(sym)`** method retrieves a shared symbol\nkey from the global symbol registry for the given symbol.\n\n## Syntax\n\n```js\nSymbol.keyFor(sym)\n```\n\n### Parameters\n\n- `sym`\n  - : Symbol, required. The symbol to find a key for.\n\n### Return value\n\nA string representing the key for the given symbol if one is found on the [global registry](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol#shared_symbols_in_the_global_symbol_registry); otherwise, [`undefined`](../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Symbol/match.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.match\n\nThe **`Symbol.match`** well-known symbol specifies the matching of a regular expression against a string. This function is called by the [`String.prototype.match()`](../../globals/String/prototype/match.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.match]()` and [`String.prototype.match()`](../../globals/String/prototype/match.mdx).\n\n## Value\n\nThe well-known symbol `Symbolmatch`.\n\n## Description\n\nThis function is also used to identify [if objects have the behavior of regular expressions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes). For example, the methods [`String.prototype.startsWith()`](../../globals/String/prototype/startsWith.mdx), [`String.prototype.endsWith()`](../../globals/String/prototype/endsWith.mdx) and [`String.prototype.includes()`](../../globals/String/prototype/includes.mdx), check if their first argument is a regular expression and will throw a [`TypeError`](../../globals/TypeError/TypeError.mdx) if they are. Now, if the `match` symbol is set to `false` (or a [Falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value except `undefined`), it indicates that the object is not intended to be used as a regular expression object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Symbol/matchAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.matchAll\n\nThe **`Symbol.matchAll`** well-known symbol specifies the method that returns an iterator, that yields matches of the regular expression against a string. This function is called by the [`String.prototype.matchAll()`](../../globals/String/prototype/matchAll.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.matchAll]()` and [`String.prototype.matchAll()`](../../globals/String/prototype/matchAll.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.matchAll`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Symbol/prototype/@@toPrimitive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype[Symbol.toPrimitive]\n\nThe **`[Symbol.toPrimitive]()`** method converts a Symbol object to\na primitive value.\n\n## Syntax\n\n```js\nSymbol()[Symbol.toPrimitive](hint)\n```\n\n### Return value\n\nThe primitive value of the specified `Symbol` object.\n\n## Description\n\nThe `[Symbol.toPrimitive]()` method of `Symbol` returns the primitive\nvalue of a Symbol object as a Symbol data type. The `hint`\nargument is not used.\n\nJavaScript calls the `[Symbol.toPrimitive]()` method to convert an object to a\nprimitive value. You rarely need to invoke the `[Symbol.toPrimitive]()` method\nyourself; JavaScript automatically invokes it when encountering an object where a\nprimitive value is expected.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Symbol/prototype/description.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype.description\n\nThe read-only **`description`** property is a string returning the optional description of `Symbol` objects.\n\n## Description\n\n`Symbol` objects can be created with an optional description which can be used for debugging but not to access the symbol itself. The `Symbol.prototype.description` property can be used to read that description. It is different to `Symbol.prototype.toString()` as it does not contain the enclosing `\"Symbol()\"` string. See the examples.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Symbol/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified symbol value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified symbol value.\n\n## Description\n\nThe `Symbol` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For `Symbol` values, the `toString` method returns a descriptive string in the form `\"Symbol(description)\"`, where `description` is the symbol's [`Symbol.prototype.description`](../../../globals/Symbol/prototype/description.mdx).\n\nThe `toString()` method requires its `this` value to be a `Symbol` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to symbol values.\n\nBecause `Symbol` has a [`[Symbol.toPrimitive]()`](../../../globals/Symbol/toPrimitive.mdx) method, that method always takes priority over `toString()` when a `Symbol` object is [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). However, because `Symbol.prototype[Symbol.toPrimitive]()` returns a symbol primitive, and symbol primitives throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when implicitly converted to a string, the `toString()` method is never implicitly called by the language. To stringify a symbol, you must explicitly call its `toString()` method or use the [`String()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/String#using_string_to_stringify_a_symbol) function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Symbol/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a Symbol object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nThe primitive value of the specified `Symbol` object.\n\n## Description\n\nThe `valueOf()` method of `Symbol` returns the primitive value of a Symbol object as a Symbol data type.\n\nJavaScript calls the `valueOf()` method to convert an object to a primitive value. You rarely need to invoke the `valueOf()` method yourself; JavaScript automatically invokes it when encountering an object where a primitive value is expected.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Symbol/replace.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.replace\n\nThe **`Symbol.replace`** well-known symbol specifies the method that replaces matched substrings of a string. This function is called by the [`String.prototype.replace()`](../../globals/String/prototype/replace.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.replace]()` and [`String.prototype.replace()`](../../globals/String/prototype/replace.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.replace`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Symbol/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.search\n\nThe **`Symbol.search`** well-known symbol specifies the method that returns the index within a string that matches the regular expression. This function is called by the [`String.prototype.search()`](../../globals/String/prototype/search.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.search]()` and [`String.prototype.search()`](../../globals/String/prototype/search.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.search`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Symbol/species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.species\n\nThe well-known symbol **`Symbol.species`** specifies a function-valued property that the constructor function uses to create derived objects.\n\n> **Warning:** The existence of `Symbol.species` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Value\n\nThe well-known symbol `Symbol.species`.\n\n## Description\n\nThe `Symbol.species` accessor property allows subclasses to override the default constructor for objects. This specifies a protocol about how instances should be copied. For example, when you use copying methods of arrays, such as [`Array.prototype.map()`](../../globals/Array/prototype/map.mdx). the `map()` method uses `instance.constructor[Symbol.species]` to get the constructor for constructing the new array.\n\nAll built-in implementations of `Symbol.species` return the `this` value, which is the current instance's constructor. This allows copying methods to create instances of derived classes rather than the base class — for example, `map()` will return an array of the same type as the original array.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Symbol/split.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.split\n\nThe **`Symbol.split`** well-known symbol specifies the method that splits a string at the indices that match a regular expression. This function is called by the [`String.prototype.split()`](../../globals/String/prototype/split.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.split]()` and [`String.prototype.split()`](../../globals/String/prototype/split.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.split`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Symbol/toPrimitive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.toPrimitive\n\nThe **`Symbol.toPrimitive`** well-known symbol specifies a method that accepts a preferred type and returns a primitive representation of an object. It is called in priority by all [type coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) algorithms.\n\n## Value\n\nThe well-known symbol `Symbol.toPrimitive`.\n\n## Description\n\nWith the help of the `Symbol.toPrimitive` property (used as a function value), an object can be converted to a primitive value. The function is called with a string argument `hint`, which specifies the preferred type of the result primitive value. The `hint` argument can be one of `\"number\"`, `\"string\"`, and `\"default\"`.\n\nThe `\"number\"` hint is used by [numeric coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#numeric_coercion) algorithms. The `\"string\"` hint is used by the [string coercion](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) algorithm. The `\"default\"` hint is used by the [primitive coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion) algorithm. The `hint` only acts as a weak signal of preference, and the implementation is free to ignore it (as [`Symbol.prototype[Symbol.toPrimitive]()`](../../globals/Symbol/prototype/@@toPrimitive.mdx) does). The language does not enforce alignment between the `hint` and the result type, although `[Symbol.toPrimitive]()` must return a primitive, or a [`TypeError`](../../globals/TypeError/TypeError.mdx) is thrown.\n\nObjects without the `Symbol.toPrimitive` property are converted to primitives by calling the `valueOf()` and `toString()` methods in different orders, which is explained in more detail in the [type coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) section. `Symbol.toPrimitive` allows full control over the primitive conversion process. For example, `Symbol.prototype.toString()` won't be called, and `Symbol` objects must always be explicitly converted to strings through [`String()`](../../globals/String/String.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Symbol/toStringTag.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.toStringTag\n\nThe **`Symbol.toStringTag`** well-known symbol is a string valued property that is used in the creation of the default string description of an object. It is accessed internally by the [`Object.prototype.toString()`](../../globals/Object/prototype/toString.mdx) method.\n\n## Value\n\nThe well-known symbol `Symbol.toStringTag`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Symbol/unscopables.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.unscopables\n\nThe **`Symbol.unscopables`** well-known symbol is used to specify an object value of whose own and inherited property names are excluded from the [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) environment bindings of the associated object.\n\n## Value\n\nThe well-known symbol `@@unscopables`.\n\n## Description\n\nThe `@@unscopables` symbol (accessed via `Symbol.unscopables`) can be defined on any object to exclude property names from being exposed as lexical variables in [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) environment bindings. Note that when using [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), `with` statements are not available, and this symbol is likely not needed.\n\nSetting a property of the `@@unscopables` object to `true` (or any [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value) will make the corresponding property of the `with` scope object _unscopable_ and therefore won't be introduced to the `with` body scope. Setting a property to `false` (or any [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value) will make it _scopable_ and thus appear as lexical scope variables.\n\nWhen deciding whether `x` is unscopable, the entire prototype chain of the `@@unscopables` property is looked up for a property called `x`. This means if you declared `@@unscopables` as a plain object, `Object.prototype` properties like [`toString`](../../globals/Object/prototype/toString.mdx) would become unscopable as well, which may cause backward incompatibility for legacy code assuming those properties are normally scoped (see [an example here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/unscopables#avoid_using_a_non-null-prototype_object_as_symbol.unscopables)). You are advised to make your custom `@@unscopables` property have `null` as its prototype, like [`Array.prototype[Symbol.unscopables]`](../../globals/Array/prototype/@@unscopables.mdx) does.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/SyntaxError/SyntaxError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SyntaxError\n\nThe **`SyntaxError`** constructor creates a new error object\nthat represents an error when trying to interpret syntactically invalid code.\n\n## Syntax\n\n```js\nnew SyntaxError()\nnew SyntaxError(message)\nnew SyntaxError(message, options)\nnew SyntaxError(message, fileName)\nnew SyntaxError(message, fileName, lineNumber)\n\nSyntaxError()\nSyntaxError(message)\nSyntaxError(message, options)\nSyntaxError(message, fileName)\nSyntaxError(message, fileName, lineNumber)\n```\n\n> **Note:** `SyntaxError()` can be called with or without `new`. Both create a new `SyntaxError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/TextDecoder/TextDecoder.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder()\n\nThe **`TextDecoder()`** constructor returns a newly created `TextDecoder` object for the encoding specified in parameter.\n\n## Syntax\n\n```js\nnew TextDecoder()\nnew TextDecoder(label)\nnew TextDecoder(label, options)\n```\n\n### Parameters\n\n- `label` _**optional**_\n  - : A string, defaulting to `\"utf-8\"`.\n- `options` _**optional**_\n\n  - : An object with the property:\n\n    - `fatal`\n      - : A boolean value indicating if the `TextDecoder.decode()` method must throw a `TypeError` when decoding invalid data.\n        It defaults to `false`, which means that the decoder will substitute malformed data with a replacement character.\n\n    - `ignoreBOM`\n      - : A boolean value indicating whether the [byte order mark](https://www.w3.org/International/questions/qa-byte-order-mark) is ignored.\n        It defaults to `false`.\n\n### Exceptions\n\n- `RangeError`\n  - : Thrown if the value of `label` is unknown, or is one of the values leading to a `'replacement'` decoding algorithm (`\"iso-2022-cn\"` or `\"iso-2022-cn-ext\"`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/TextDecoder/prototype/decode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.decode()\n\nThe **`TextDecoder.decode()`** method returns a string containing text decoded from the buffer passed as a parameter.\n\nThe decoding method is defined in the current `TextDecoder` object.\nThis includes the expected encoding of the data, and how decoding errors are handled.\n\n## Syntax\n\n```js\ndecode()\ndecode(buffer)\ndecode(buffer, options)\n```\n\n### Parameters\n\n- `buffer` _**optional**_\n  - : Is an `ArrayBuffer`, a `TypedArray` or a `DataView` object containing the encoded text to decode.\n- `options` _**optional**_\n\n  - : An object with the property:\n\n    - `stream`\n      - : A boolean flag indicating that additional data will follow in subsequent calls to `decode()`.\n        Set to `true` if processing the data in chunks, and `false` for the final chunk or if the data is not chunked.\n        It defaults to `false`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if there is a decoding error when the property `TextDecoder.fatal` is `true`.\n\n### Return value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/TextDecoder/prototype/encoding.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.encoding\n\nThe **`TextDecoder.encoding`** read-only property returns a string containing the name of the decoding algorithm used by the specific decoder object.\n\nThe encoding is set by the constructor `label` parameter, and defaults to `utf-8`.\n\n## Value\n\nA lower-cased ASCII string, which can be one of the following values:\n\n- The recommended encoding for the Web: `'utf-8'`.\n- The legacy single-byte encodings:\n  ['ibm866'](https://en.wikipedia.org/wiki/Code_page_866),\n  ['iso-8859-2'](https://en.wikipedia.org/wiki/ISO/IEC_8859-2),\n  ['iso-8859-3'](https://en.wikipedia.org/wiki/ISO/IEC_8859-3),\n  ['iso-8859-4'](https://en.wikipedia.org/wiki/ISO/IEC_8859-4),\n  ['iso-8859-5'](https://en.wikipedia.org/wiki/ISO/IEC_8859-5),\n  ['iso-8859-6'](https://en.wikipedia.org/wiki/ISO/IEC_8859-6),\n  ['iso-8859-7'](https://en.wikipedia.org/wiki/ISO/IEC_8859-7),\n  ['iso-8859-8'](https://en.wikipedia.org/wiki/ISO/IEC_8859-8)'`,\n  ['iso-8859-8i'](https://en.wikipedia.org/wiki/ISO-8859-8-I),\n  ['iso-8859-10'](https://en.wikipedia.org/wiki/ISO/IEC_8859-10),\n  ['iso-8859-13'](https://en.wikipedia.org/wiki/ISO/IEC_8859-13),\n  ['iso-8859-14'](https://en.wikipedia.org/wiki/ISO/IEC_8859-14),\n  ['iso-8859-15'](https://en.wikipedia.org/wiki/ISO/IEC_8859-15),\n  ['iso-8859-16'](https://en.wikipedia.org/wiki/ISO/IEC_8859-16),\n  ['koi8-r'](https://en.wikipedia.org/wiki/KOI8-R),\n  ['koi8-u'](https://en.wikipedia.org/wiki/KOI8-U),\n  ['macintosh'](https://en.wikipedia.org/wiki/Mac_OS_Roman),\n  ['windows-874'](https://en.wikipedia.org/wiki/Windows-874),\n  ['windows-1250'](https://en.wikipedia.org/wiki/Windows-1250),\n  ['windows-1251'](https://en.wikipedia.org/wiki/Windows-1251),\n  ['windows-1252'](https://en.wikipedia.org/wiki/Windows-1252),\n  ['windows-1253'](https://en.wikipedia.org/wiki/Windows-1253),\n  ['windows-1254'](https://en.wikipedia.org/wiki/Windows-1254),\n  ['windows-1255'](https://en.wikipedia.org/wiki/Windows-1255),\n  ['windows-1256'](https://en.wikipedia.org/wiki/Windows-1256),\n  ['windows-1257'](https://en.wikipedia.org/wiki/Windows-1257),\n  ['windows-1258'](https://en.wikipedia.org/wiki/Windows-1258), or\n  ['x-mac-cyrillic'](https://en.wikipedia.org/wiki/Macintosh_Cyrillic_encoding).\n- The legacy multi-byte Chinese (simplified) encodings:\n  ['gbk'](https://en.wikipedia.org/wiki/GBK),\n  ['gb18030'](https://en.wikipedia.org/wiki/GB_18030)\n- The legacy multi-byte Chinese (traditional) encoding:\n  ['big5'](https://en.wikipedia.org/wiki/Big5).\n- The legacy multi-byte Japanese encodings:\n  ['euc-jp'](https://en.wikipedia.org/wiki/Extended_Unix_Code#EUC-JP),\n  ['iso-2022-jp'](https://en.wikipedia.org/wiki/ISO/IEC_2022#ISO-2022-JP),\n  ['shift-jis'](https://en.wikipedia.org/wiki/Shift_JIS).\n- The legacy multi-byte Korean encodings:\n  ['euc-kr'](https://en.wikipedia.org/wiki/Extended_Unix_Code#EUC-KR)\n- The legacy miscellaneous encodings:\n  ['utf-16be'](https://en.wikipedia.org/wiki/UTF-16#Byte_order_encoding_schemes),\n  ['utf-16le'](https://en.wikipedia.org/wiki/UTF-16#Byte_order_encoding_schemes),\n  `'x-user-defined'`.\n- A special encoding, `'replacement'`.\n  This decodes empty input into empty output and any other arbitrary-length input into a single replacement character.\n  It is used to prevent attacks that mismatch encodings between the client and server.\n  The following encodings also map to the replacement encoding: `ISO-2022-CN`, `ISO-2022-CN-ext`, ['iso-2022-kr'](https://en.wikipedia.org/wiki/ISO/IEC_2022#ISO-2022-KR) and ['hz-gb-2312'](https://en.wikipedia.org/wiki/HZ_(character_encoding)).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/TextDecoder/prototype/fatal.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.fatal\n\nThe **`fatal`** read-only property of the `TextDecoder` interface is a `Boolean` indicating whether the error mode is fatal.\n\nIf the property is `true` then a decoder will throw a `TypeError` if it encounters malformed data while decoding.\nIf `false` the decoder will substitute the invalid data with the replacement character `U+FFFD` (�).\nThe value of the property is set in the `TextDecoder()` constructor.\n\n## Value\n\nA `boolean` which will return `true` if the error mode is set to `fatal`.\nOtherwise it returns `false`, indicating that the error mode is \"replacement\".\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/TextDecoder/prototype/ignoreBOM.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.ignoreBOM\n\nThe **`ignoreBOM`** read-only property of the `TextDecoder` interface is a `Boolean` indicating whether the [byte order mark](https://www.w3.org/International/questions/qa-byte-order-mark) is ignored.\n\n## Value\n\n`true` if the byte order mark is ignored; `false` otherwise.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/TextEncoder/TextEncoder.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextEncoder()\n\nThe **`TextEncoder()`** constructor returns a newly created `TextEncoder` object that will generate a byte stream with UTF-8 encoding.\n\n## Syntax\n\n```js\nnew TextEncoder()\n```\n\n### Parameters\n\nNone.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/TextEncoder/prototype/encode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextEncoder.encode()\n\nThe **`TextEncoder.encode()`** method takes a string as input, and returns a `Uint8Array` containing the text given in parameters encoded with the specific method for that `TextEncoder` object.\n\n## Syntax\n\n```js\nencode(string)\n```\n\n### Parameters\n\n- `string`\n  - : A string containing the text to encode.\n\n### Return value\n\nA `Uint8Array` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/TextEncoder/prototype/encoding.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextEncoder.encoding\n\nThe **`TextEncoder.encoding`** read-only property returns a string containing the name of the encoding algorithm used by the specific encoder.\n\nIt can only have the following value `utf-8`.\n\n## Value\n\nA string with the value `utf-8`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/TransformStream/TransformStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStream()\n\nThe **`TransformStream()`** constructor creates a new `TransformStream` object which represents a pair of streams: a `WritableStream` representing the writable side, and a `ReadableStream` representing the readable side.\n\n## Syntax\n\n```js\nnew TransformStream()\nnew TransformStream(transformer)\nnew TransformStream(transformer, writableStrategy)\nnew TransformStream(transformer, writableStrategy, readableStrategy)\n```\n\n### Parameters\n\n- `transformer` _**optional**_\n\n  - : An object representing the `transformer`. If not supplied the resulting stream will be an **identity transform stream** which forwards all chunks written to its writable side to its readable side, without any changes.\n\n    The transformer object can contain any of the following methods. In each method `controller` is an instance of `TransformStreamDefaultController`.\n\n    - `start(controller)`\n      - : Called when the `TransformStream` is constructed. It is typically used to enqueue chunks using `TransformStreamDefaultController.enqueue()`.\n    - `transform(chunk, controller)`\n      - : Called when a chunk written to the writable side is ready to be transformed, and performs the work of the transformation stream. If no `transform()` method is supplied, the identity transform is used, and the chunk will be enqueued with no changes.\n    - `flush(controller)`\n      - : Called after all chunks written to the writable side have been successfully transformed, and the writable side is about to be closed.\n\n- `writableStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer. This defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk`. This indicates the size to\n        use for each chunk, in bytes.\n\n- `readableStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer. This defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk`. This indicates the size to\n        use for each chunk, in bytes.\n\n> **Note:** You could define your own custom\n> `readableStrategy` or `writableStrategy`, or use an instance of\n> `ByteLengthQueuingStrategy` or `CountQueuingStrategy`\n> for the object values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/TransformStream/prototype/readable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStream.readable\n\nThe **`readable`** read-only property of the `TransformStream` interface returns the `ReadableStream` instance controlled by this `TransformStream`.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/TransformStream/prototype/writable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStream.writable\n\nThe **`writable`** read-only property of the `TransformStream` interface returns the `WritableStream` instance controlled by this `TransformStream`.\n\n## Value\n\nA `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/TransformStreamDefaultController/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.desiredSize\n\nThe **`desiredSize`** read-only property of the `TransformStreamDefaultController` interface returns the desired size to fill the queue of the associated [`ReadableStream`](../../../globals/ReadableStream/ReadableStream.mdx).\n\nThe internal queue of a `ReadableStream` contains chunks that have been enqueued, but not yet read.\n\nIf the `desiredSize` is `0` then the queue is full. Therefore you can use this information to manually apply backpressure to manage the queue.\n\n## Value\n\nThe desired size.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/TransformStreamDefaultController/prototype/enqueue.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.enqueue()\n\nThe **`enqueue()`** method of the `TransformStreamDefaultController` interface enqueues the given chunk in the readable side of the stream.\n\n## Syntax\n\n```js\nenqueue(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : The chunk being queued. A chunk is a single piece of data. It can be any type of data, and a stream can contain chunks of different types.\n\n### Return value\n\nNone `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream is not readable.\n    This might occur if the stream is errored via `controller.error()`, or when it is closed without its controller's `controller.close()` method ever being called.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/TransformStreamDefaultController/prototype/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.error()\n\nThe **`error()`** method of the `TransformStreamDefaultController` interface errors both sides of the stream. Any further interactions with it will fail with the given error message, and any chunks in the queue will be discarded.\n\n## Syntax\n\n```js\nerror(reason)\n```\n\n### Parameters\n\n- `reason`\n  - : A string containing the error message to be returned on any further interaction with the stream.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/TransformStreamDefaultController/prototype/terminate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.terminate()\n\nThe **`terminate()`** method of the `TransformStreamDefaultController` interface closes the readable side and errors the writable side of the stream.\n\n## Syntax\n\n```js\nterminate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone (`undefined`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/TypeError/TypeError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TypeError\n\nThe **`TypeError()`** constructor creates a new error when an\noperation could not be performed, typically (but not exclusively) when a value is not of\nthe expected type.\n\n## Syntax\n\n```js\nnew TypeError()\nnew TypeError(message)\nnew TypeError(message, options)\nnew TypeError(message, fileName)\nnew TypeError(message, fileName, lineNumber)\n\nTypeError()\nTypeError(message)\nTypeError(message, options)\nTypeError(message, fileName)\nTypeError(message, fileName, lineNumber)\n```\n\n> **Note:** `TypeError()` can be called with or without `new`. Both create a new `TypeError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/URIError/URIError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URIError\n\nThe **`URIError()`** constructor creates an error when a global\nURI handling function was used in a wrong way.\n\n## Syntax\n\n```js\nnew URIError()\nnew URIError(message)\nnew URIError(message, options)\nnew URIError(message, fileName)\nnew URIError(message, fileName, lineNumber)\n\nURIError()\nURIError(message)\nURIError(message, options)\nURIError(message, fileName)\nURIError(message, fileName, lineNumber)\n```\n\n> **Note:** `URIError()` can be called with or without `new`. Both create a new `URIError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/URL/URL.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL()\n\nThe **`URL()`** constructor returns a newly created\n`URL` object representing the URL defined by the parameters.\n\nIf the given base URL or the resulting URL are not valid URLs, the JavaScript\n`TypeError` exception is thrown.\n\n## Syntax\n\n```js\nnew URL(url)\nnew URL(url, base)\n```\n\n### Parameters\n\n- `url`\n  - : A string or any other object with a `toString()` method.\n    If `url` is a relative URL, `base` is\n    required, and will be used as the base URL. If `url` is an\n    absolute URL, a given `base` will be ignored.\n- `base` _**optional**_\n  - : A string representing the base URL to use in cases where\n    `url` is a relative URL. If not specified, it defaults to\n    `undefined`.\n\n> **Note:** The `url` and `base` arguments will\n> each be stringified from whatever value you pass, just like with other Web APIs\n> that accept a string. In particular, you can use an existing\n> `URL` object for either argument, and it will stringify to the\n> object's `URL.href\", \"href` property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/URL/prototype/hash.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.hash\n\nThe **`hash`** property of the\n`URL` interface is a string containing a\n`'#'` followed by the fragment identifier of the URL.\n\nThe fragment is not percent-decoded. If the URL does not\nhave a fragment identifier, this property contains an empty string — `\"\"`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/URL/prototype/host.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.host\n\nThe **`host`** property of the `URL` interface is\na string containing the host, that is the `URL.hostname`, and then, if the `port` of the URL is nonempty, a\n`':'`, followed by the `port` of the URL.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/URL/prototype/hostname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.hostname\n\nThe **`hostname`** property of the `URL` interface\nis a string containing the domain name of the URL.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/URL/prototype/href.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.href\n\nThe **`href`** property of the `URL` interface is\na string containing the whole URL.\n\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/URL/prototype/origin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.origin\n\nThe **`origin`** read-only property of\nthe `URL` interface returns a string containing the\nUnicode serialization of the origin of the represented URL.\n\nThe exact structure\nvaries depending on the type of URL:\n\n- For `http` or `https` URLs, the scheme followed by\n  `'://'`, followed by the domain, followed by `':'`, followed by\n  the port (the default port, `80` and `443` respectively, if\n  explicitly specified).\n- For `file:` URLs, the value is browser dependent.\n- for `blob:` URLs, the origin of the URL following `blob:` will\n  be used. For example, `\"blob:https://mozilla.org\"` will be returned as\n  `\"https://mozilla.org\".`\n\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/URL/prototype/password.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.password\n\nThe **`password`** property of the `URL` interface\nis a string containing the password specified before the domain name.\n\nIf it is set without first setting the `URL.username` property, it silently fails.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/URL/prototype/pathname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.pathname\n\nThe **`pathname`** property of the `URL` interface represents a location in a hierarchical structure. It is a string constructed from a list of path segments, each of which is prefixed by a `/` character. If the URL has no path segments, the value of its `pathname` property will be the empty string.\n\nURLs such as `https` and `http` URLs that have [hierarchical schemes](https://www.rfc-editor.org/rfc/rfc3986#section-1.2.3) (which the URL standard calls \"[special schemes](https://url.spec.whatwg.org/#special-scheme)\") always have at least one (invisible) path segment: the empty string. Thus the `pathname` value for such \"special scheme\" URLs can never be the empty string, but will instead always have a least one `/` character.\n\nFor example, the URL `https://developer.mozilla.org` has just one path segment: the empty string, so its `pathname` value is constructed by prefixing a `/` character to the empty string.\n\nSome systems define the term _slug_ to mean the final segment of a non-empty path if it identifies a page in human-readable keywords. For example, the URL `https://example.org/articles/this-that-other-outre-collection` has `this-that-other-outre-collection` as its slug.\n\nSome systems use the `;` and `=` characters to delimit parameters and parameter values applicable to a path segment. For example, with the URL `https://example.org/users;id=42/tasks;state=open?sort=modified`, a system might extract and use the path segment parameters `id=42` and `state=open` from the path segments `users;id=42` and `tasks;state=open`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/URL/prototype/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.port\n\nThe **`port`** property of the `URL` interface is\na string containing the port number of the URL.\n\n> **Note:** If an input string passed to the `URL()` constructor doesn't contain an explicit port number (e.g., `https://localhost`) or contains a port number that's the default port number corresponding to the protocol part of the input string (e.g., `https://localhost:443`), then in the `URL` object the constructor returns, the value of the port property will be the empty string: `''`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/URL/prototype/protocol.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.protocol\n\nThe **`protocol`** property of the `URL` interface\nis a string representing the protocol scheme of the URL, including the\nfinal `':'`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/URL/prototype/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.search\n\nThe **`search`** property of the `URL` interface\nis a search string, also called a _query string_, that is a\nstring containing a `'?'` followed by the parameters of the\nURL.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/URL/prototype/searchParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.searchParams\n\nThe **`searchParams`** readonly property of the\n`URL` interface returns a `URLSearchParams` object allowing\naccess to the `GET` decoded query arguments contained in the URL.\n\n## Value\n\nA `URLSearchParams` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/URL/prototype/toJSON.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.toJSON()\n\nThe **`toJSON()`** method of the `URL` interface\nreturns a string containing a serialized version of the URL,\nalthough in practice it seems to have the same effect as\n`URL.toString()`.\n\n## Syntax\n\n```js\ntoJSON()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/URL/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.toString()\n\nThe **`URL.toString()`** method returns a\nstring containing the whole URL. It is effectively a read-only version\nof `URL.prototype.href`.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/URL/prototype/username.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.username\n\nThe **`username`** property of the `URL` interface\nis a string containing the username specified before the domain name.\n\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/URLSearchParams/URLSearchParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams()\n\nThe **`URLSearchParams()`** constructor creates and returns a\nnew `URLSearchParams` object.\n\n\n\n## Syntax\n\n```js\nnew URLSearchParams()\nnew URLSearchParams(options)\n```\n\n### Parameters\n\n- `options` _**optional**_\n  - : One of:\n    - A string, which will be parsed from `application/x-www-form-urlencoded` format. A leading `'?'` character is ignored.\n    - A literal sequence of name-value string pairs, or any object with an iterator that produces a sequence of string pairs.\n    - A record of string keys and string values. Note that nesting is not supported.\n\n### Return value\n\nA `URLSearchParams` object instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/URLSearchParams/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.append()\n\nThe **`append()`** method of the `URLSearchParams`\ninterface appends a specified key/value pair as a new search parameter.\n\nAs shown in the example below, if the same key is appended multiple times it will\nappear in the parameter string multiple times for each value.\n\n## Syntax\n\n```js\nappend(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to append.\n- `value`\n  - : The value of the parameter to append.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/URLSearchParams/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.delete()\n\nThe **`delete()`** method of the `URLSearchParams`\ninterface deletes the given search parameter and all its associated values, from the\nlist of all search parameters.\n\n## Syntax\n\n```js\ndelete(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to be deleted.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/URLSearchParams/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.entries()\n\nThe **`entries()`** method of the\n`URLSearchParams` interface returns an\niterator allowing iteration through all key/value\npairs contained in this object. The iterator returns key/value pairs in the same order as they appear in the query string. The key and value of each pair are\nstring objects.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/URLSearchParams/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.forEach()\n\nThe **`forEach()`** method of the\n`URLSearchParams` interface allows iteration through all values contained\nin this object via a callback function.\n\n## Syntax\n\n```js\nforEach(callback)\nforEach(callback, thisArg)\n```\n\n### Parameters\n\n- `callback`\n\n  - : Function to execute on each element, which is passed the following arguments:\n\n    - `value`\n      - : The value of the current entry being processed in the `URLSearchParams` object.\n    - `key`\n      - : The key of the current entry being processed in the `URLSearchParams` object.\n    - `searchParams`\n      - : The `URLSearchParams` object the `forEach()` was called upon.\n\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `callback`.\n\n### Return value\n\nNone `undefined`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/URLSearchParams/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.get()\n\nThe **`get()`** method of the `URLSearchParams`\ninterface returns the first value associated to the given search parameter.\n\n## Syntax\n\n```js\nget(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to return.\n\n### Return value\n\nA string if the given search parameter is found; otherwise,\n**`null`**.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/URLSearchParams/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.has()\n\nThe **`has()`** method of the `URLSearchParams`\ninterface returns a boolean value that indicates whether a parameter with the\nspecified name exists.\n\n## Syntax\n\n```js\nhas(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to find.\n\n### Return value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/URLSearchParams/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.keys()\n\nThe **`keys()`** method of the `URLSearchParams`\ninterface returns an iterator allowing iteration\nthrough all keys contained in this object. The keys are string\nobjects.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/URLSearchParams/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.set()\n\nThe **`set()`** method of the `URLSearchParams`\ninterface sets the value associated with a given search parameter to the given value.\nIf there were several matching values, this method deletes the others. If the search\nparameter doesn't exist, this method creates it.\n\n## Syntax\n\n```js\nset(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to set.\n- `value`\n  - : The value of the parameter to set.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/URLSearchParams/prototype/sort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.sort()\n\nThe **`URLSearchParams.sort()`** method sorts all key/value\npairs contained in this object in place and returns `undefined`. The sort\norder is according to unicode code points of the keys. This method uses a stable sorting\nalgorithm (i.e. the relative order between key/value pairs with equal keys will be\npreserved).\n\n## Syntax\n\n```js\nsort()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/URLSearchParams/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.toString()\n\nThe **`toString()`** method of the\n`URLSearchParams` interface returns a query string suitable for use in a\nURL.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string, without the question mark. (Returns an empty string if no\nsearch parameters have been set.)\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/URLSearchParams/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.values()\n\nThe **`values()`** method of the `URLSearchParams`\ninterface returns an iterator allowing iteration\nthrough all values contained in this object. The values are string\nobjects.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Uint16Array/Uint16Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint16Array\n\nThe **`Uint16Array()`** typed array constructor creates an\narray of 16-bit unsigned integers in the platform byte order.\n\n## Syntax\n\n```js\nnew Uint16Array()\nnew Uint16Array(length)\nnew Uint16Array(typedArray)\nnew Uint16Array(object)\n\nnew Uint16Array(buffer)\nnew Uint16Array(buffer, byteOffset)\nnew Uint16Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint16Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Uint32Array/Uint32Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint32Array\n\nThe **`Uint32Array()`** typed array constructor creates an\narray of 32-bit unsigned integers in the platform byte order. If control over byte order\nis needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are initialized to\n`0`. Once established, you can reference elements in the array using the\nobject's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Uint32Array()\nnew Uint32Array(length)\nnew Uint32Array(typedArray)\nnew Uint32Array(object)\n\nnew Uint32Array(buffer)\nnew Uint32Array(buffer, byteOffset)\nnew Uint32Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint32Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Uint8Array/Uint8Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint8Array\n\nThe **`Uint8Array()`** constructor creates a typed array of\n8-bit unsigned integers. The contents are initialized to `0`. Once\nestablished, you can reference elements in the array using the object's methods, or\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew Uint8Array()\nnew Uint8Array(length)\nnew Uint8Array(typedArray)\nnew Uint8Array(object)\n\nnew Uint8Array(buffer)\nnew Uint8Array(buffer, byteOffset)\nnew Uint8Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint8Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/Uint8ClampedArray/Uint8ClampedArray.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint8ClampedArray\n\nThe **`Uint8ClampedArray()`** constructor creates a typed array\nof 8-bit unsigned integers clamped to 0-255; if you specified a value that is out of the\nrange of \\[0,255], 0 or 255 will be set instead; if you specify a non-integer, the\nnearest integer will be set. The contents are initialized to `0`. Once\nestablished, you can reference elements in the array using the object's methods, or\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew Uint8ClampedArray()\nnew Uint8ClampedArray(length)\nnew Uint8ClampedArray(typedArray)\nnew Uint8ClampedArray(object)\n\nnew Uint8ClampedArray(buffer)\nnew Uint8ClampedArray(buffer, byteOffset)\nnew Uint8ClampedArray(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint8ClampedArray()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/WeakMap/WeakMap.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap\n\nThe **`WeakMap()` constructor** creates a `WeakMap` object, optionally based on a provided `Array` or other iterable object.\n\n## Syntax\n\n```js\nnew WeakMap()\nnew WeakMap(iterable)\n```\n\n> **Note:** `WeakMap()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable`\n  - : An `Array` or other object that implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol)  that returns an iterator object that produces a two-element array-like object whose first element is a value that will be used as a `WeakMap` key and whose second element is the value to associate with that key. Each key-value pair will be added to the new `WeakMap`. null is treated as undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/WeakMap/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.delete()\n\nThe **`delete()`** method removes the specified element from a\n`WeakMap` object.\n\n## Syntax\n\n```js\ndelete(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to remove from the `WeakMap` object.\n\n### Return value\n\n`true` if an element in the `WeakMap` object has been removed\nsuccessfully. `false` if the key is not found in the `WeakMap` or\nif the key is not an object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/WeakMap/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.get()\n\nThe **`get()`** method returns a specified element from a\n`WeakMap` object.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key`\n  - : Required. The key of the element to return from the `WeakMap` object.\n\n### Return value\n\nThe element associated with the specified key in the `WeakMap` object. If\nthe key can't be found, [`undefined`](../../../globals/undefined.mdx) is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/WeakMap/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.has()\n\nThe **`has()`** method returns a boolean indicating whether an\nelement with the specified key exists in the `WeakMap` object or not.\n\n## Syntax\n\n```js\nhas(key)\n```\n\n### Parameters\n\n- `key`\n  - : Required. The key of the element to test for presence in the `WeakMap`\n    object.\n\n### Return value\n\n- Boolean\n  - : Returns `true` if an element with the specified key exists in the\n    `WeakMap` object; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/WeakMap/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.set\n\nThe **`set()`** method adds a new element with a specified key\nand value to a `WeakMap` object.\n\n## Syntax\n\n```js\nset(key, value)\n```\n\n### Parameters\n\n- `key`\n  - : Required. Must be `object`. The key of the element to add to the\n    `WeakMap` object.\n- `value`\n  - : Required. Any value. The value of the element to add to the `WeakMap`\n    object.\n\n### Return value\n\nThe `WeakMap` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/WeakRef/WeakRef.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakRef\n\nThe **`WeakRef`** constructor creates a `WeakRef`\nobject referring to a given target object.\n\n## Syntax\n\n```js\nnew WeakRef(targetObject)\n```\n\n> **Note:** `WeakRef()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `targetObject`\n  - : The target object the WeakRef should refer to (also called the _referent_).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/WeakRef/prototype/deref.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakRef.prototype.deref()\n\nThe `deref` method returns the `WeakRef` instance's target\nobject, or `undefined` if the target object has been garbage-collected.\n\n## Syntax\n\n```js\nderef()\n```\n\n### Return value\n\nThe target object of the WeakRef, or `undefined` if the object has been\ngarbage-collected.\n\n## Description\n\nSee the [Notes on WeakRefs](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WeakRef#notes_on_weakrefs) section of the `WeakRef` page for some important notes.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/WeakSet/WeakSet.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet\n\nThe **`WeakSet`** constructor lets you create\n`WeakSet` objects that store weakly held _objects_ in a collection.\n\n## Syntax\n\n```js\nnew WeakSet()\nnew WeakSet(iterable)\n```\n\n> **Note:** `WeakSet()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable` _**optional**_\n  - : If an [iterable object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) is passed, all of its elements will be added to the new\n    `WeakSet`. null is treated as undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/WeakSet/prototype/add.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet.prototype.add\n\nThe **`add()`** method appends a new object to the end of a\n`WeakSet` object.\n\n## Syntax\n\n```js\nadd(value)\n```\n\n### Parameters\n\n- value\n  - : Required. The object to add to the `WeakSet` collection.\n\n### Return value\n\nThe `WeakSet` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/WeakSet/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet.prototype.delete\n\nThe **`delete()`** method removes the specified element from a\n`WeakSet` object.\n\n## Syntax\n\n```js\ndelete(value)\n```\n\n### Parameters\n\n- `value`\n  - : Required. The object remove from the `WeakSet` object.\n\n### Return value\n\n`true` if an element in the `WeakSet` object has been removed\nsuccessfully. `false` if the `value` is not found in\nthe `WeakSet` or if the `value` is not an object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/WeakSet/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet.prototype.has\n\nThe **`has()`** method returns a boolean indicating whether an\nobject exists in a `WeakSet` or not.\n\n## Syntax\n\n```js\nhas(value)\n```\n\n### Parameters\n\n- `value`\n  - : Required. The object to test for presence in the `WeakSet`.\n\n### Return value\n\n- Boolean\n  - : Returns `true` if an element with the specified value exists in the\n    `WeakSet` object; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/WorkerLocation/WorkerLocation.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# WorkerLocation\n\nThe **`WorkerLocation`** interface defines the absolute location of the script executed by the Worker. Such an object is initialized for each worker and is available via the [`location`](../../globals/location.mdx) property obtained by calling `globalThis.location`.\n\n## Instance properties\n\n- [`WorkerLocation.href`](../../globals/WorkerLocation/href.mdx) _**read-only**_\n  - : Returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location.\n- [`WorkerLocation.protocol`](../../globals/WorkerLocation/protocol.mdx) _**read-only**_\n  - : Returns the [`protocol`](../../globals/URL/prototype/protocol.mdx) part of the worker's location.\n- [`WorkerLocation.host`](../../globals/WorkerLocation/host.mdx) _**read-only**_\n  - : Returns the [`host`](../../globals/URL/prototype/host.mdx) part of the worker's location.\n- [`WorkerLocation.hostname`](../../globals/WorkerLocation/hostname.mdx) _**read-only**_\n  - : Returns the [`hostname`](../../globals/URL/prototype/hostname.mdx) part of the worker's location.\n- [`WorkerLocation.origin`](../../globals/WorkerLocation/origin.mdx) _**read-only**_\n  - : Returns the worker's [`origin`](../../globals/URL/prototype/origin.mdx).\n- [`WorkerLocation.port`](../../globals/WorkerLocation/port.mdx) _**read-only**_\n  - : Returns the [`port`](../../globals/URL/prototype/port.mdx) part of the worker's location.\n- [`WorkerLocation.pathname`](../../globals/WorkerLocation/pathname.mdx) _**read-only**_\n  - : Returns the [`pathname`](../../globals/URL/prototype/pathname.mdx) part of the worker's location.\n- [`WorkerLocation.search`](../../globals/WorkerLocation/search.mdx) _**read-only**_\n  - : Returns the [`search`](../../globals/URL/prototype/search.mdx) part of the worker's location.\n- [`WorkerLocation.hash`](../../globals/WorkerLocation/hash.mdx) _**read-only**_\n  - : Returns the [`hash`](../../globals/URL/prototype/hash.mdx) part of the worker's location.\n\n## Instance methods\n\n- [`WorkerLocation.toString`](../../globals/WorkerLocation/toString.mdx)\n  - : Returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location. It is a synonym for [`WorkerLocation.href`](../../globals/WorkerLocation/href.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/WorkerLocation/hash.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.hash\n\nThe **`hash`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`hash`](../../globals/URL/prototype/hash.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/WorkerLocation/host.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.host\n\nThe **`host`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`host`](../../globals/URL/prototype/host.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/WorkerLocation/hostname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.hostname\n\nThe **`hostname`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`hostname`](../../globals/URL/prototype/hostname.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/WorkerLocation/href.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.href\n\nThe **`href`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/WorkerLocation/origin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.origin\n\nThe **`origin`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the worker's [`origin`](../../globals/URL/prototype/origin.mdx).\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/WorkerLocation/pathname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.pathname\n\nThe **`pathname`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`pathname`](../../globals/URL/prototype/pathname.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/WorkerLocation/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.port\n\nThe **`port`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`port`](../../globals/URL/prototype/port.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/WorkerLocation/protocol.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.protocol\n\nThe **`protocol`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`protocol`](../../globals/URL/prototype/protocol.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/WorkerLocation/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.search\n\nThe **`search`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`search`](../../globals/URL/prototype/search.mdx) part of the worker's location.\n\n## Value\n\nA string.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/WorkerLocation/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.toString()\n\nThe **`toString()`** method of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location. It is a synonym for [`WorkerLocation.href`](../../globals/WorkerLocation/href.mdx).\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone [`undefined`](../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/WritableStream/WritableStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream()\n\nThe **`WritableStream()`** constructor creates\na new `WritableStream` object instance.\n\n## Syntax\n\n```js\nnew WritableStream(underlyingSink)\nnew WritableStream(underlyingSink, queuingStrategy)\n```\n\n### Parameters\n\n- `underlyingSink` _**optional**_\n\n  - : An object containing methods and properties that define how the constructed stream\n    instance will behave. `underlyingSink` can contain the following:\n\n    - `start(controller)` _**optional**_\n      - : This is a method, called immediately when the object is constructed. The\n        contents of this method are defined by the developer, and should aim to get access\n        to the underlying sink. If this process is to be done asynchronously, it can\n        return a promise to signal success or failure. The `controller`\n        parameter passed to this method is a\n        `WritableStreamDefaultController`. This can be used by the developer\n        to control the stream during set up.\n    - `write(chunk, controller)` _**optional**_\n      - : This method, also defined by the developer, will be called when a new chunk of\n        data (specified in the `chunk` parameter) is ready to be written to the\n        underlying sink. It can return a promise to signal success or failure of the write\n        operation. The `controller` parameter passed to this method is a\n        `WritableStreamDefaultController` that can be used by the developer\n        to control the stream as more chunks are submitted for writing. This method will\n        be called only after previous writes have succeeded, and never after the stream is\n        closed or aborted (see below).\n    - `close(controller)` _**optional**_\n      - : This method, also defined by the developer, will be called if the app signals\n        that it has finished writing chunks to the stream. The contents should do whatever\n        is necessary to finalize writes to the underlying sink, and release access to it.\n        If this process is asynchronous, it can return a promise to signal success or\n        failure. This method will be called only after all queued-up writes have\n        succeeded. The `controller` parameter passed to this method is a\n        `WritableStreamDefaultController`, which can be used to control the\n        stream at the end of writing.\n    - `abort(reason)` _**optional**_\n      - : This method, also defined by the developer, will be called if the app signals\n        that it wishes to abruptly close the stream and put it in an errored state. It can\n        clean up any held resources, much like `close()`, but\n        `abort()` will be called even if writes are queued up — those chunks\n        will be thrown away. If this process is asynchronous, it can return a promise to\n        signal success or failure. The `reason` parameter contains a\n        string describing why the stream was aborted.\n\n- `queuingStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer — this defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk` — this indicates the size to use for each chunk, in bytes.\n\n    > **Note:** You could define your own custom\n    > `queuingStrategy`, or use an instance of\n    > `ByteLengthQueuingStrategy` or `CountQueuingStrategy`\n    > for this object value. If no `queuingStrategy` is supplied, the default\n    > used is the same as a `CountQueuingStrategy` with a high water mark of 1\\.\n\n### Return value\n\nAn instance of the `WritableStream` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/WritableStream/prototype/abort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream.abort()\n\nThe **`abort()`** method of the `WritableStream` interface aborts the stream, signaling that the producer can no longer successfully write to the stream and it is to be immediately moved to an error state, with any queued writes discarded.\n\n## Syntax\n\n```js\nabort(reason)\n```\n\n### Parameters\n\n- `reason`\n  - : A string providing a human-readable reason for the abort.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason` parameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to abort is not a `WritableStream`, or it is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/WritableStream/prototype/getWriter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream.getWriter()\n\nThe **`getWriter()`** method of the `WritableStream` interface returns a new instance of `WritableStreamDefaultWriter` and locks the stream to that instance.\nWhile the stream is locked, no other writer can be acquired until this one is released.\n\n## Syntax\n\n```js\ngetWriter()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `WritableStreamDefaultWriter` object instance.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to create a writer for is not a `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/WritableStream/prototype/locked.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream.locked\n\nThe **`locked`** read-only property of the `WritableStream` interface returns a boolean indicating whether the `WritableStream` is locked to a writer.\n\n## Value\n\nA boolean value indicating whether or not the writable stream is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/WritableStreamDefaultController/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultController.error()\n\nThe **`error()`** method of the\n`WritableStreamDefaultController` interface causes any future interactions\nwith the associated stream to error.\n\nThis method is rarely used, since usually it suffices to return a rejected promise from\none of the underlying sink's methods. However, it can be useful for suddenly shutting\ndown a stream in response to an event outside the normal lifecycle of interactions with\nthe underlying sink.\n\n## Syntax\n\n```js\nerror(message)\n```\n\n### Parameters\n\n- `message`\n  - : A string representing the error you want future interactions to\n    fail with.\n\n### Return value\n\nNone `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to error is not a `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/WritableStreamDefaultWriter/WritableStreamDefaultWriter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter()\n\nThe **`WritableStreamDefaultWriter()`**\nconstructor creates a new `WritableStreamDefaultWriter` object instance.\n\n## Syntax\n\n```js\nnew WritableStreamDefaultWriter(stream)\n```\n\n### Parameters\n\n- `stream`\n  - : The `WritableStream` to be written to.\n\n### Return value\n\nAn instance of the `WritableStreamDefaultWriter` object.\n\n### Exceptions\n\n- `TypeError`\n  - : The provided `stream` value is not a `WritableStream`, or it\n    is locked to another writer already.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/WritableStreamDefaultWriter/prototype/abort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.abort()\n\nThe **`abort()`** method of the\n`WritableStreamDefaultWriter` interface aborts the stream, signaling that\nthe producer can no longer successfully write to the stream and it is to be immediately\nmoved to an error state, with any queued writes discarded.\n\nIf the writer is active, the `abort()` method behaves the same as that for\nthe associated stream (`WritableStream.abort()`). If not, it returns a\nrejected promise.\n\n## Syntax\n\n```js\nabort()\nabort(reason)\n```\n\n### Parameters\n\n- `reason` _**optional**_\n  - : A string representing a human-readable reason for the abort.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason`\nparameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to abort is not a `WritableStream`, or it is\n    locked.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/WritableStreamDefaultWriter/prototype/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.close()\n\nThe **`close()`** method of the\n`WritableStreamDefaultWriter` interface closes the associated writable\nstream.\n\nThe underlying sink will finish processing any previously-written chunks, before\ninvoking the close behavior. During this time any further attempts to write will fail\n(without erroring the stream).\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise`, which fulfills with the `undefined` if all\nremaining chunks were successfully written before the close, or rejects with an error if\na problem was encountered during the process.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to close is not a `WritableStream`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/WritableStreamDefaultWriter/prototype/closed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.closed\n\nThe **`closed`** read-only property of the\n`WritableStreamDefaultWriter` interface returns a\n`Promise` that fulfills if the stream becomes closed, or rejects if\nthe stream errors or the writer's lock is released.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/WritableStreamDefaultWriter/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.desiredSize\n\nThe **`desiredSize`** read-only property of the\n`WritableStreamDefaultWriter` interface returns the desired size required\nto fill the stream's internal queue.\n\n## Value\n\nAn integer. Note that this can be negative if the queue is over-full.\n\nThe value will be `null` if the stream cannot be successfully written to\n(due to either being errored, or having an abort queued up), and zero if the stream is\nclosed.\n\n### Exceptions\n\n- `TypeError`\n  - : The writer's lock is released.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/WritableStreamDefaultWriter/prototype/ready.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.ready\n\nThe **`ready`** read-only property of the\n`WritableStreamDefaultWriter` interface returns a `Promise`\nthat resolves when the desired size of the stream's internal queue transitions from\nnon-positive to positive, signaling that it is no longer applying backpressure.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/WritableStreamDefaultWriter/prototype/releaseLock.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.releaseLock()\n\nThe **`releaseLock()`** method of the\n`WritableStreamDefaultWriter` interface releases the writer's lock on the\ncorresponding stream. After the lock is released, the writer is no longer active. If the\nassociated stream is errored when the lock is released, the writer will appear errored\nin the same way from now on; otherwise, the writer will appear closed.\n\n## Syntax\n\n```js\nreleaseLock()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone `undefined`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/WritableStreamDefaultWriter/prototype/write.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.write()\n\nThe **`write()`** method of the\n`WritableStreamDefaultWriter` interface writes a passed chunk of data to a\n`WritableStream` and its underlying sink, then returns a\n`Promise` that resolves to indicate the success or failure of the write\noperation.\n\nNote that what \"success\" means is up to the underlying sink; it might indicate that the\nchunk has been accepted, and not necessarily that it is safely saved to its ultimate\ndestination.\n\n## Syntax\n\n```js\nwrite(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : A block of binary data to pass to the `WritableStream`.\n\n### Return value\n\nA `Promise`, which fulfills with the `undefined` upon a\nsuccessful write, or rejects if the write fails or stream becomes errored before the\nwriting process is initiated.\n\n### Exceptions\n\n- `TypeError`\n  - : The target stream is not a writable stream, or it does not have an owner.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/atob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# atob()\n\nThe **`atob()`** function decodes a\nstring of data which has been encoded using Base64 encoding. You can use\nthe `btoa()` method to encode and transmit\ndata which may otherwise cause communication problems, then transmit it and use the\n`atob()` method to decode the data again. For example, you can encode,\ntransmit, and decode control characters such as ASCII values 0 through 31.\n\nFor use with Unicode or UTF-8 strings, see the note on \"Unicode strings\" in the page\nfor `btoa()`.\n\n## Syntax\n\n```js\natob(encodedData)\n```\n\n### Parameters\n\n- `encodedData`\n  - : A binary string (i.e., a string in which each character in the string is treated as a byte of binary data) containing base64-encoded data.\n\n### Return value\n\nAn ASCII string containing decoded data from `encodedData`.\n\n### Exceptions\n\n- `InvalidCharacterError`\n  - : Thrown if `encodedData` is not valid base64.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/btoa.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# btoa()\n\nThe **`btoa()`** method creates a\nBase64-encoded ASCII string from a _binary string_ (i.e., a\nstring in which each character in the string is treated as a byte\nof binary data).\n\nYou can use this method to encode data which may otherwise cause communication\nproblems, transmit it, then use the `atob()` method to decode the data again. For example, you can encode control\ncharacters such as ASCII values 0 through 31.\n\n## Syntax\n\n```js\nbtoa(stringToEncode)\n```\n\n### Parameters\n\n- `stringToEncode`\n  - : The _binary string_ to encode.\n\n### Return value\n\nAn ASCII string containing the Base64 representation of\n`stringToEncode`.\n\n### Exceptions\n\n- `InvalidCharacterError`\n  - : The string contained a character that did not fit in a single byte. See \"Unicode\n    strings\" below for more detail.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/clearInterval.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# clearInterval()\n\nThe global **`clearInterval()`** method cancels a timed, repeating action which\nwas previously established by a call to `setInterval()`.\nIf the parameter provided does not identify a previously established action,\nthis method does nothing.\n\n## Syntax\n\n```js\nclearInterval(intervalID)\n```\n\n### Parameters\n\n- `intervalID`\n  - : The identifier of the repeated action you want to cancel. This ID was returned by\n    the corresponding call to `setInterval()`.\n\nIt's worth noting that the pool of IDs used by\n`setInterval()` and\n`setTimeout()` are shared, which\nmeans you can technically use `clearInterval()` and\n`clearTimeout()` interchangeably.\nHowever, for clarity, you should avoid doing so.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/clearTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# clearTimeout()\n\nThe global **`clearTimeout()`** method cancels a timeout previously established\nby calling `setTimeout()`.\n\nIf the parameter provided does not identify a previously established action,\nthis method does nothing.\n\n## Syntax\n\n```js\nclearTimeout(timeoutID)\n```\n\n### Parameters\n\n- `timeoutID`\n  - : The identifier of the timeout you want to cancel. This ID was returned by the\n    corresponding call to `setTimeout()`.\n\nIt's worth noting that the pool of IDs used by\n`setTimeout()` and\n`setInterval()` are shared, which\nmeans you can technically use `clearTimeout()` and\n`clearInterval()`\ninterchangeably. However, for clarity, you should avoid doing so.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/console/assert.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.assert()\n\nThe **`console.assert()`** method writes an error message to\nthe console if the assertion is false. If the assertion is true, nothing happens.\n\n## Syntax\n\n```js\nassert(assertion, obj1)\nassert(assertion, obj1, obj2)\nassert(assertion, obj1, obj2, /* … ,*/ objN)\n\nassert(assertion, msg)\nassert(assertion, msg, subst1)\nassert(assertion, msg, subst1, /* … ,*/ substN)\n```\n\n### Parameters\n\n- `assertion`\n  - : Any boolean expression. If the assertion is false, the message is written to the\n    console.\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output.\n- `msg`\n  - : A JavaScript string containing zero or more substitution strings.\n- `subst1` … `substN`\n  - : JavaScript objects with which to replace substitution strings within\n    `msg`. This parameter gives you additional control over the format of the\n    output.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/console/clear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.clear()\n\nThe **`console.clear()`** method clears the console if the console allows it.\n\n## Syntax\n\n```js\nclear()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/console/count.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.count()\n\nThe **`console.count()`** method logs the number of times that\nthis particular call to `count()` has been called.\n\n\n## Syntax\n\n```js\ncount()\ncount(label)\n```\n\n### Parameters\n\n- `label` _optional_\n  - : A string. If supplied, `count()` outputs the number of\n    times it has been called with that label. If omitted, `count()` behaves as\n    though it was called with the \"default\" label.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/console/countReset.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.countReset()\n\nThe **`console.countReset()`** method resets counter used with `console.count()`.\n\n## Syntax\n\n```js\ncountReset()\ncountReset(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : A string. If supplied, `countReset()` resets the count for\n    that label to 0. If omitted, `countReset()` resets the default counter to\n    0.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/console/debug.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.debug()\n\nThe **`console.debug()`** method outputs a message to the console at the \"debug\" log level.\n\n## Syntax\n\n```js\ndebug(obj1)\ndebug(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output to the console.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/console/dir.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.dir()\n\nThe method **`console.dir()`** displays a list of the properties of\nthe specified JavaScript object.\n\n## Syntax\n\n```js\ndir(object)\n```\n\n### Parameters\n\n- `object`\n  - : A JavaScript object whose properties should be output.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/console/dirxml.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.dirxml()\n\nThe **`console.dirxml()`** method displays the supplied object in the console.\n\n## Syntax\n\n```js\ndirxml(object)\n```\n\n### Parameters\n\n- `object`\n  - : A JavaScript object whose properties should be output.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/console/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.error()\n\nThe **`console.error()`** method outputs an error message console.\n\n## Syntax\n\n```js\nerror(obj1)\nerror(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of\n    these objects are appended together in the order listed and output.\n\n### Return value\n\nNone `undefined`."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/console/group.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.group()\n\nThe **`console.group()`** method creates a new inline group in the console, until `console.groupEnd()` is called.\n\n## Syntax\n\n```js\ngroup()\ngroup(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : Label for the group.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/console/groupCollapsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.groupCollapsed()\n\nThe **`console.groupCollapsed()`** method creates a new inline group in the Web Console. Unlike `console.group()`,\nhowever, the new group is created collapsed. The user will need to use the disclosure\nbutton next to it to expand it, revealing the entries created in the group.\n\nCall `console.groupEnd()` to back out to the parent group.\n\n## Syntax\n\n```js\ngroupCollapsed()\ngroupCollapsed(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : Label for the group.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/console/groupEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.groupEnd()\n\nThe **`console.groupEnd()`** method exits the current inline group in the console.\n\n## Syntax\n\n```js\ngroupEnd()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/console/info.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.info()\n\nThe **`console.info()`** method outputs an informational message to the console.\n\n## Syntax\n\n```js\ninfo(obj1)\ninfo(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/console/log.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.log()\n\nThe **`console.log()`** method outputs a message to the console.\n\n## Syntax\n\n```js\nlog(obj1)\nlog(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output. Please be warned that if\n    you log objects in the latest versions of Chrome and Firefox what you get logged on\n    the console is a _reference to the object_, which is not necessarily the\n    'value' of the object at the moment in time you call `console.log()`, but\n    it is the value of the object at the moment you open the console.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/console/time.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.time()\n\nThe **`console.time()`** method starts a timer you can use to track\nhow long an operation takes. You give each timer a unique name. When you call `console.timeEnd()` with the same name, the\nbrowser will output the time, in milliseconds, that elapsed since the timer was started.\n\n## Syntax\n\n```js\ntime(label)\n```\n\n### Parameters\n\n- `label`\n  - : A `string` representing the name to give the new timer. This will identify the timer; use the same name when\n    calling `console.timeEnd()` to stop the timer and get the time output to\n    the console.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/console/timeEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.timeEnd()\n\nThe **`console.timeEnd()`** stops a timer that was previously started by calling `console.time()`.\n\n## Syntax\n\n```js\ntimeEnd(label)\n```\n\n### Parameters\n\n- `label`\n  - : A `string` representing the name of the timer to stop. Once stopped, the elapsed time is automatically\n    displayed in the console.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/console/timeLog.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.timeLog()\n\nThe **`console.timeLog()`** method logs the current value of a timer that was previously started by calling `console.time()`.\n\n## Syntax\n\n```js\ntimeLog()\ntimeLog(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : The name of the timer to log to the console. If this is omitted the label \"default\" is used.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/console/trace.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.trace()\n\nThe **`console.trace()`** method outputs a stack trace to the console.\n\n## Syntax\n\n```js\ntrace()\ntrace(object1, /* …, */ objectN)\n```\n\n### Parameters\n\n- `objects` __optional__\n  - : Zero or more objects to be output to console along with the trace. These are\n    assembled and formatted the same way they would be if passed to the `console.log()` method.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/console/warn.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.warn()\n\nThe **`console.warn()`** method outputs a warning message to the console.\n\n## Syntax\n\n```js\nwarn(obj1)\nwarn(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/crypto/getRandomValues.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Crypto.getRandomValues()\n\nThe **`Crypto.getRandomValues()`** method lets you get cryptographically strong random values.\nThe array given as the parameter is filled with random numbers (random in its cryptographic meaning).\n\n## Syntax\n\n```js\ngetRandomValues(typedArray)\n```\n\n### Parameters\n\n- `typedArray`\n  - : An integer-based `TypedArray`, that is one of: `Int8Array`, `Uint8Array`,\n    `Uint8ClampedArray`, `Int16Array`, `Uint16Array`,\n    `Int32Array`, `Uint32Array`, `BigInt64Array`,\n    `BigUint64Array` (but **not** `Float32Array` nor `Float64Array`).\n    All elements in the array will be overwritten with random numbers.\n\n### Return value\n\nThe same array passed as `typedArray` but with its contents replaced with the newly generated random numbers.\nNote that `typedArray` is modified in-place, and no copy is made.\n\n### Exceptions\n\n- `QuotaExceededError`\n  - : Thrown if the `byteLength` of `typedArray` exceeds 65,536.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/crypto/randomUUID.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Crypto.randomUUID()\n\nThe **`randomUUID()`** method is used to generate a v4 [UUID](https://developer.mozilla.org/en-US/docs/Glossary/UUID) using a cryptographically secure random number generator.\n\n## Syntax\n\n```js\nrandomUUID()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string containing a randomly generated, 36 character long v4 UUID."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/crypto/subtle.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Crypto.subtle\n\nThe **`Crypto.subtle`** read-only property returns a\n[`SubtleCrypto`](../SubtleCrypto/SubtleCrypto.mdx) which can then be used to perform low-level\ncryptographic operations.\n\n## Value\n\nA [`SubtleCrypto`](../SubtleCrypto/SubtleCrypto.mdx) object you can use to interact with the Web Crypto API's\nlow-level cryptography features.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/decodeURI.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# decodeURI\n\nThe **`decodeURI()`** function decodes a Uniform Resource Identifier (URI) previously created by [`encodeURI()`](../globals/encodeURI.mdx) or a similar routine.\n\n## Syntax\n\n```js\ndecodeURI(encodedURI)\n```\n\n### Parameters\n\n- `encodedURI`\n  - : A complete, encoded Uniform Resource Identifier.\n\n### Return value\n\nA new string representing the unencoded version of the given encoded Uniform Resource Identifier (URI).\n\n### Exceptions\n\n- [`URIError`](../globals/URIError/URIError.mdx)\n  - : Thrown if `encodedURI` contains a `%` not followed by two hexadecimal digits, or if the escape sequence does not encode a valid UTF-8 character.\n\n## Description\n\n`decodeURI()` is a function property of the global object.\n\nThe `decodeURI()` function decodes the URI by treating each escape sequence in the form `%XX` as one UTF-8 code unit (one byte). In UTF-8, the number of leading 1 bits in the first byte, which may be 0 (for 1-byte ASCII characters), 2, 3, or 4, indicates the number of bytes in the character. So by reading the first escape sequence, `decodeURI()` can determine how many more escape sequences to consume. If `decodeURI()` fails to find the expected number of sequences, or if the escape sequences don't encode a valid UTF-8 character, a [`URIError`](../globals/URIError/URIError.mdx) is thrown.\n\n`decodeURI()` decodes all escape sequences, but if the escape sequence encodes one of the following characters, the escape sequence is preserved in the output string (because they are part of the URI syntax):\n\n```\n; / ? : @ & = + $ , #\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/decodeURIComponent.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# decodeURIComponent\n\nThe **`decodeURIComponent()`** function decodes a Uniform Resource Identifier (URI) component previously created by [`encodeURIComponent()`](./encodeURIComponent.mdx) or by a similar routine.\n\n\n## Syntax\n\n```js\ndecodeURIComponent(encodedURI)\n```\n\n### Parameters\n\n- `encodedURI`\n  - : An encoded component of a Uniform Resource Identifier.\n\n### Return value\n\nA new string representing the decoded version of the given encoded Uniform Resource Identifier (URI) component.\n\n### Exceptions\n\n- [`URIError`](../globals/URIError/URIError.mdx)\n  - : Thrown if `encodedURI` contains a `%` not followed by two hexadecimal digits, or if the escape sequence does not encode a valid UTF-8 character.\n\n## Description\n\n`decodeURIComponent()` is a function property of the global object.\n\n`decodeURIComponent()` uses the same decoding algorithm as described in [`decodeURI()`](./decodeURI.mdx). It decodes _all_ escape sequences, including those that are not created by [`encodeURIComponent()`](./encodeURIComponent.mdx), like `-.!~*'()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/encodeURI.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# encodeURI()\n\nThe **`encodeURI()`** function encodes a URI by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character (will only be four escape sequences for characters composed of two surrogate characters). Compared to [`encodeURIComponent()`](./encodeURIComponent.mdx), this function encodes fewer characters, preserving those that are part of the URI syntax.\n\n## Syntax\n\n```js\nencodeURI(uri)\n```\n\n### Parameters\n\n- `uri`\n  - : A string to be encoded as a URI.\n\n### Return value\n\nA new string representing the provided string encoded as a URI.\n\n### Exceptions\n\n- [`URIError`](./URIError/URIError.mdx)\n  - : Thrown if `uri` contains a [lone surrogate](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters).\n\n## Description\n\n`encodeURI()` is a function property of the global object.\n\nThe `encodeURI()` function escapes characters by UTF-8 code units, with each octet encoded in the format `%XX`, left-padded with 0 if necessary. Because lone surrogates in UTF-16 do not encode any valid Unicode character, they cause `encodeURI()` to throw a [`URIError`](./URIError/URIError.mdx).\n\n`encodeURI()` escapes all characters **except**:\n\n```\nA–Z a–z 0–9 - _ . ! ~ * ' ( )\n\n; / ? : @ & = + $ , #\n```\n\nThe characters on the second line are characters that may be part of the URI syntax, and are only escaped by `encodeURIComponent()`. Both `encodeURI()` and `encodeURIComponent()` do not encode the characters `-.!~*'()`, known as \"unreserved marks\", which do not have a reserved purpose but are allowed in a URI \"as is\". (See [RFC2396](https://www.ietf.org/rfc/rfc2396.txt))\n\nThe `encodeURI()` function does not encode characters that have special meaning (reserved characters) for a URI. The following example shows all the parts that a URI can possibly contain. Note how certain characters are used to signify special meaning:\n\n```\nhttp://username:password@www.example.com:80/path/to/file.php?foo=316&bar=this+has+spaces#anchor\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/encodeURIComponent.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# encodeURIComponent\n\nThe **`encodeURIComponent()`** function encodes a URI by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character (will only be four escape sequences for characters composed of two surrogate characters). Compared to [`encodeURI()`](./encodeURI.mdx), this function encodes more characters, including those that are part of the URI syntax.\n\n## Syntax\n\n```js\nencodeURIComponent(uriComponent)\n```\n\n### Parameters\n\n- `uriComponent`\n  - : A string to be encoded as a URI component (a path, query string, fragment, etc.). Other values are [converted to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion).\n\n### Return value\n\nA new string representing the provided `uriComponent` encoded as a URI component.\n\n### Exceptions\n\n- [`URIError`](./URIError/URIError.mdx)\n  - : Thrown if `uriComponent` contains a [lone surrogate](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters).\n\n## Description\n\n`encodeURIComponent()` is a function property of the global object.\n\n`encodeURIComponent()` uses the same encoding algorithm as described in [`encodeURI()`](./encodeURI.mdx). It escapes all characters **except**:\n\n```text\nA–Z a–z 0–9 - _ . ! ~ * ' ( )\n```\n\nCompared to [`encodeURI()`](./encodeURI.mdx), `encodeURIComponent()` escapes a larger set of characters. Use `encodeURIComponent()` on user-entered fields from forms `POST`'d to the server — this will encode `&` symbols that may inadvertently be generated during data entry for special HTML entities or other characters that require encoding/decoding. For example, if a user writes `Jack & Jill`, without `encodeURIComponent()`, the ampersand could be interpreted on the server as the start of a new field and jeopardize the integrity of the data.\n\nFor [`application/x-www-form-urlencoded`](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#application/x-www-form-urlencoded-encoding-algorithm), spaces are to be replaced by `+`, so one may wish to follow a `encodeURIComponent()` replacement with an additional replacement of `%20` with `+`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/escape.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# escape()\n\n> **Note:** `escape()` is a non-standard function implemented by browsers and was only standardized for cross-engine compatibility. It is not required to be implemented by all JavaScript engines and may not work everywhere. Use [`encodeURIComponent()`](./encodeURIComponent.mdx) or [`encodeURI()`](./encodeURI.mdx) if possible.\n\nThe **`escape()`** function computes a new string in which certain characters have been replaced by hexadecimal escape sequences.\n\n## Syntax\n\n```js\nescape(str)\n```\n\n### Parameters\n\n- `str`\n  - : A string to be encoded.\n\n### Return value\n\nA new string in which certain characters have been escaped.\n\n## Description\n\n`escape()` is a function property of the global object.\n\nThe `escape()` function replaces all characters with escape sequences, with the exception of ASCII word characters (A–Z, a–z, 0–9, _) and `@*_+-./`. Characters are escaped by UTF-16 code units. If the code unit's value is less than 256, it is represented by a two-digit hexadecimal number in the format `%XX`, left-padded with 0 if necessary. Otherwise, it is represented by a four-digit hexadecimal number in the format `%uXXXX`, left-padded with 0 if necessary.\n\n> **Note:** This function was used mostly for URL encoding and is partly based on the escape format in rfc(1738). The escape format is _not_ an [escape sequence](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#escape_sequences) in string literals. You can replace `%XX` with `\\xXX` and `%uXXXX` with `\\uXXXX` to get a string containing actual string-literal escape sequences.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/eval.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# eval\n\n> **Warning:** Executing JavaScript from a string is an enormous security risk. It is far too easy for a bad actor to run arbitrary code when you use `eval()`. See [never use direct eval](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval#never_use_direct_eval!) for details.\n\nThe **`eval()`** function evaluates JavaScript code represented as a string and returns its completion value. The source is parsed as a script.\n\n## Syntax\n\n```js\neval(script)\n```\n\n### Parameters\n\n- `script`\n  - : A string representing a JavaScript expression, statement, or sequence of statements. The expression can include variables and properties of existing objects. It will be parsed as a script, so [`import`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/import) declarations (which can only exist in modules) are not allowed.\n\n### Return value\n\nThe completion value of evaluating the given code. If the completion value is empty, [`undefined`](./undefined.mdx) is returned. If `script` is not a string primitive, `eval()` returns the argument unchanged.\n\n### Exceptions\n\nThrows any exception that occurs during evaluation of the code, including[ `SyntaxError`](./SyntaxError/SyntaxError.mdx) if `script` fails to be parsed as a script.\n\n## Description\n\n`eval()` is a function property of the global object.\n\nThe argument of the `eval()` function is a string. It will evaluate the source string as a script body, which means both statements and expressions are allowed. It returns the completion value of the code. For expressions, it's the value the expression evaluates to. Many statements and declarations have completion values as well, but the result may be surprising (for example, the completion value of an assignment is the assigned value, but the completion value of [`let`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/let) is undefined), so it's recommended to not rely on statements' completion values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/fetch.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# fetch()\n\nThe global **`fetch()`** method starts the process of fetching a\nresource from the network, returning a promise which is fulfilled once the response is\navailable.\n\nThe promise resolves to the `Response` object\nrepresenting the response to your request.\n\nA `fetch()` promise only rejects when a\nnetwork error is encountered (which is usually when there's a permissions issue or\nsimilar). A `fetch()` promise _does\nnot_ reject on HTTP errors (`404`, etc.). Instead, a\n`then()` handler must check the `Response.ok` and/or\n`Response.status` properties.\n\n> **Note:** The `fetch()` method's parameters are identical to\n> those of the `Request()` constructor.\n\n## Explicit Backends\n\nInternally, Fastly uses named backends to handle fetch requests, which need to be explicitly defined to enable custom HTTP origins to be fetched by the service.\n\nThis `backend` option is then a special Fastly-specific fetch option that is provided to the `fetch()` call:\n\n```js\nfetch('https://origin.com/path', { backend: 'origin' });\n```\n\nBackends are configured using the Fastly service backend configuration, see the [Backend documentation](https://developer.fastly.com/reference/api/services/backend/) for more information.\n\n## Dynamic Backends\n\nDynamic backends are a compute feature that allow services to define backends for themselves.\n\nIf the `backend` option is not provided when making `fetch()` requests, a backend will be automatically created by extracting the protocol, host, and port from the provided URL.\n\nIn addition, custom backend configuration options can then also be provided through the [`Backend()`](../fastly:backend/Backend/Backend.mdx) constructor.\n\n## Syntax\n\n```js\nfetch(resource)\nfetch(resource, options)\n```\n\n### Parameters\n\n- `resource`\n\n  - : This defines the resource that you wish to fetch. This can either be:\n\n    - A string or any other object with a \"toString\" method.\n    - A `Request` object.\n\n- `options` _**optional**_\n\n  - : An object containing any custom settings that you want to apply to the request. The\n    possible options are:\n\n    - `method`\n      - : The request method, e.g., `GET`, `POST`.\n    - `headers`\n      - : Any headers you want to add to your request, contained within a\n        `Headers` object or an object literal with `String`\n        values.\n    - `body`\n      - : Any body that you want to add to your request: this can be an `ArrayBuffer`, a `TypedArray`, a `DataView`, a `URLSearchParams`, string object or literal, or a `ReadableStream` object.\n    - `backend` _**Fastly-specific**_\n      - *Fastly-specific*\n    - `cacheOverride` _**Fastly-specific**_\n    - `cacheKey` _**Fastly-specific**_\n    - `imageOptimizerOptions` _**Fastly-specific**_, see [`imageOptimizerOptions`](../fastly:image-optimizer/imageOptimizerOptions.mdx).\n    - `fastly` _**Fastly-specific**_\n      - `decompressGzip`_: boolean_ _**optional**_\n        - Whether to automatically gzip decompress the Response or not.\n\n### Return value\n\nA `Promise` that resolves to a `Response` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/globalThis.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# globalThis\n\nThe global **`globalThis`** property contains the [global `this`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this#global_context) value, which is usually akin to the [global object](https://developer.mozilla.org/docs/Glossary/Global_object).\n\n## Value\n\nThe global `this` object.\n\n> **Note:** The `globalThis` property is configurable and writable so that code authors can hide it when executing untrusted code and prevent exposing the global object.\n\n## Description\n\nThe `globalThis` property provides a standard way of accessing the global `this` value (and hence the global object itself) across environments.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/isFinite.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# isFinite\n\nThe global **`isFinite()`** function determines whether the\npassed value is a finite number. If needed, the parameter is first converted to a\nnumber.\n\n## Syntax\n\n```js\nisFinite(testValue)\n```\n\n### Parameters\n\n- `testValue`\n  - : The value to be tested for finiteness.\n\n### Return value\n\n**`false`** if the argument is (or will be coerced to) positive\nor negative [`Infinity`](./Infinity.mdx) or [`NaN`](./NaN.mdx) or [`undefined`](./undefined.mdx);\notherwise, **`true`**.\n\n## Description\n\n`isFinite` is a function property of the global object.\n\nYou can use this function to determine whether a number is a finite number. The\n`isFinite` function examines the number in its argument. If the argument is\n`NaN`, positive infinity, or negative infinity, this method returns\n`false`; otherwise, it returns `true`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/isNaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# isNaN()\n\nThe **`isNaN()`** function determines whether a value is [`NaN`](./NaN.mdx) when converted to a number. Because coercion inside the `isNaN()` function can be [surprising](#description), you may alternatively want to use [`Number.isNaN()`](./Number/isNaN.mdx).\n\n## Syntax\n\n```js\nisNaN(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested.\n\n### Return value\n\n`true` if the given value is [`NaN`](./NaN.mdx) after being [converted to a number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_coercion); otherwise, `false`.\n\n## Description\n\n`isNaN()` is a function property of the global object.\n\nFor number values, `isNaN()` tests if the number is the value [`NaN`](./NaN.mdx). When the argument to the `isNaN()` function is not of type [Number](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#number_type), the value is first coerced to a number, and the resulting value is then compared against [`NaN`](./NaN.mdx).\n\nThis behavior of `isNaN()` for non-numeric arguments can be confusing! For example, an empty string is coerced to 0, while a boolean is coerced to 0 or 1; both values are intuitively \"not numbers\", but they don't evaluate to `NaN`, so `isNaN()` returns `false`. Therefore, `isNaN()` answers neither the question \"is the input the floating point [`NaN`](./NaN.mdx) value\" nor the question \"is the input not a number\".\n\n[`Number.isNaN()`](./Number/isNaN.mdx) is a more reliable way to test whether a value is the number value `NaN` or not. Alternatively, the expression `x !== x` can be used, and neither of the solutions is subject to the false positives that make the global `isNaN()` unreliable. To test if a value is a number, use [`typeof x === \"number\"`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/typeof).\n\nThe `isNaN()` function answers the question \"is the input functionally equivalent to [`NaN`](./NaN.mdx) when used in a number context\". If `isNaN(x)` returns `false`, you can use `x` in an arithmetic expression as if it's a valid number that's not `NaN`. If `isNaN(x)` returns `true`, `x` will get coerced to `NaN` and make most arithmetic expressions return `NaN` (because `NaN` propagates). You can use this, for example, to test whether an argument to a function is arithmetically processable (usable \"like\" a number), and handle values that are not number-like by throwing an error, providing a default value, etc. This way, you can have a function that makes use of the full versatility JavaScript provides by implicitly converting values depending on context.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/location.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# location\n\nThe **`location`** read-only property returns a\n[`Location`](../globals/WorkerLocation/WorkerLocation.mdx) object with information about the current location of the\ndocument.\n\nSee [`Location`](../globals/WorkerLocation/WorkerLocation.mdx) for all available properties.\n\n## Value\n\nA [`Location`](../globals/WorkerLocation/WorkerLocation.mdx) object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/parseFloat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# parseFloat()\n\nThe **`parseFloat()`** function parses a string argument and returns a floating point number.\n\n## Syntax\n\n```js\nparseFloat(string)\n```\n\n### Parameters\n\n- `string`\n  - : The value to parse, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). Leading whitespace in this argument is ignored.\n\n### Return value\n\nA floating point number parsed from the given `string`, or [`NaN`](./NaN.mdx) when the first non-whitespace character cannot be converted to a number.\n\n> **Note:** JavaScript does not have the distinction of \"floating point numbers\" and \"integers\" on the language level. [`parseInt()`](./parseInt.mdx) and `parseFloat()` only differ in their parsing behavior, but not necessarily their return values. For example, `parseInt(\"42\")` and `parseFloat(\"42\")` would return the same value: a `Number` 42.\n\n## Description\n\nThe `parseFloat` function converts its first argument to a string, parses that string as a decimal number literal, then returns a number or `NaN`. The number syntax it accepts can be summarized as:\n\n- The characters accepted by `parseFloat()` are plus sign (`+`), minus sign (`-` U+002D HYPHEN-MINUS), decimal digits (`0` – `9`), decimal point (`.`), exponent indicator (`e` or `E`), and the `\"Infinity\"` literal.\n- The `+`/`-` signs can only appear strictly at the beginning of the string, or immediately following the `e`/`E` character. The decimal point can only appear once, and only before the `e`/`E` character. The `e`/`E` character can only appear once, and only if there is at least one digit before it.\n- Leading spaces in the argument are trimmed and ignored.\n- `parseFloat()` can also parse and return [`Infinity`](./Infinity.mdx) or `-Infinity` if the string starts with `\"Infinity\"` or `\"-Infinity\"` preceded by none or more white spaces.\n- `parseFloat()` picks the longest substring starting from the beginning that generates a valid number literal. If it encounters an invalid character, it returns the number represented up to that point, ignoring the invalid character and all characters following it.\n- If the argument's first character can't start a legal number literal per the syntax above, `parseFloat` returns [`NaN`](./NaN.mdx).\n\nSyntax-wise, `parseFloat()` parses a subset of the syntax that the [`Number()`](./Number/Number.mdx) function accepts. Namely, `parseFloat()` does not support non-decimal literals with `0x`, `0b`, or `0o` prefixes but supports everything else. However, `parseFloat()` is more lenient than `Number()` because it ignores trailing invalid characters, which would cause `Number()` to return `NaN`.\n\nSimilar to number literals and `Number()`, the number returned from `parseFloat()` may not be exactly equal to the number represented by the string, due to floating point range and inaccuracy. For numbers outside the `-1.7976931348623158e+308` – `1.7976931348623158e+308` range (see `Number.MAX_VALUE`), `-Infinity` or `Infinity` is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/parseInt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# parseInt\n\nThe **`parseInt()`** function parses a string argument and returns an integer of the specified [radix](https://en.wikipedia.org/wiki/Radix) (the base in mathematical numeral systems).\n\n\n\n## Syntax\n\n```js\nparseInt(string)\nparseInt(string, radix)\n```\n\n### Parameters\n\n- `string`\n  - : A string starting with an integer. Leading whitespace in this argument is ignored.\n- `radix` _**optional**_\n\n  - : An integer between `2` and `36` that represents the _radix_ (the base in mathematical numeral systems) of the `string`. It is converted to a [32-bit integer](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#fixed-width_number_conversion); if it's outside the range of \\[2, 36] after conversion, the function will always return `NaN`. If `0` or not provided, the radix will be inferred based on `string`'s value. Be careful — this does NOT always default to `10`! The [description below](#description) explains in more detail what happens when `radix` is not provided.\n\n### Return value\n\nAn integer parsed from the given `string`, or [`NaN`](./NaN.mdx) when\n\n- the `radix` as a 32-bit integer is smaller than `2` or bigger than `36`, or\n- the first non-whitespace character cannot be converted to a number.\n\n> **Note:** JavaScript does not have the distinction of \"floating point numbers\" and \"integers\" on the language level. `parseInt()` and [`parseFloat()`](./parseFloat.mdx) only differ in their parsing behavior, but not necessarily their return values. For example, `parseInt(\"42\")` and `parseFloat(\"42\")` would return the same value: a `Number` 42.\n\n## Description\n\nThe `parseInt` function converts its first argument to a string, parses that string, then returns an integer or `NaN`.\n\nIf not `NaN`, the return value will be the integer that is the first argument taken as a number in the specified `radix`. (For example, a `radix` of `10` converts from a decimal number, `8` converts from octal, `16` from hexadecimal, and so on.)\n\nThe `radix` argument is converted to a number. If it's unprovided, or if the value becomes 0, `NaN` or `Infinity` (`undefined` is coerced to `NaN`), JavaScript assumes the following:\n\n1. If the input `string`, with leading whitespace and possible `+`/`-` signs removed, begins with `0x` or `0X` (a zero, followed by lowercase or uppercase X), `radix` is assumed to be `16` and the rest of the string is parsed as a hexadecimal number.\n2. If the input `string` begins with any other value, the radix is `10` (decimal).\n\n> **Note:** Other prefixes like `0b`, which are valid in [number literals](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#binary), are treated as normal digits by `parseInt()`. `parseInt()` does _not_ treat strings beginning with a `0` character as octal values either. The only prefix that `parseInt()` recognizes is `0x` or `0X` for hexadecimal values — everything else is parsed as a decimal value if `radix` is missing.\n\nIf the radix is `16`, `parseInt()` allows the string to be optionally prefixed by `0x` or `0X` after the optional sign character (`+`/`-`).\n\nIf the radix value (coerced if necessary) is not in range \\[2, 36] (inclusive) `parseInt` returns `NaN`.\n\nFor radices above `10`, letters of the English alphabet indicate numerals greater than `9`. For example, for hexadecimal numbers (base `16`), `A` through `F` are used. The letters are case-insensitive.\n\n`parseInt` understands exactly two signs: `+` for positive, and `-` for negative. It is done as an initial step in the parsing after whitespace is removed. If no signs are found, the algorithm moves to the following step; otherwise, it removes the sign and runs the number-parsing on the rest of the string.\n\nIf `parseInt` encounters a character that is not a numeral in the specified `radix`, it ignores it and all succeeding characters and returns the integer value parsed up to that point. For example, although `1e3` technically encodes an integer (and will be correctly parsed to the integer `1000` by [`parseFloat()`](./parseFloat.mdx), `parseInt(\"1e3\", 10)` returns `1`, because `e` is not a valid numeral in base 10. Because `.` is not a numeral either, the return value will always be an integer.\n\nIf the first character cannot be converted to a number with the radix in use, `parseInt` returns `NaN`. Leading whitespace is allowed.\n\nFor arithmetic purposes, the `NaN` value is not a number in any radix. You can call the [`Number.isNaN`](./Number/isNaN.mdx) function to determine if the result of `parseInt` is `NaN`. If `NaN` is passed on to arithmetic operations, the operation result will also be `NaN`.\n\nBecause large numbers use the `e` character in their string representation (e.g. `6.022e23` for 6.022 × 10<sup>23</sup>), using `parseInt` to truncate numbers will produce unexpected results when used on very large or very small numbers. `parseInt` should _not_ be used as a substitute for [`Math.trunc()`](./Math/trunc.mdx).\n\nTo convert a number to its string literal in a particular radix, use [`thatNumber.toString(radix)`](./Number/prototype/toString.mdx).\n\nBecause `parseInt()` returns a number, it may suffer from loss of precision if the integer represented by the string is [outside the safe range](./Number/isSafeInteger.mdx). The [`BigInt`](./BigInt/BigInt.mdx) function supports parsing integers of arbitrary length accurately, by returning a `BigInt`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/performance/now.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# performance.now()\n\nThe **`performance.now()`** method returns a high resolution timestamp in milliseconds.\nIt represents the time elapsed since [`performance.timeOrigin`](./timeOrigin.mdx) (the time when the worker was instantiated).\n\n## Syntax\n\n```js\nnow()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns a number which represents the time since worker instantation measured in milliseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/performance/timeOrigin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# performance.timeOrigin\n\nThe **`timeOrigin`** read-only property of the Performance interface returns the high resolution timestamp that is used as the baseline for performance-related timestamps.\n\nThis value represents the time when the worker was instantiated.\n\n### Value\n\nReturns a number which represents the time when the worker was instantation."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/setInterval.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# setInterval()\n\nThe **`setInterval()`** method, repeatedly\ncalls a function or executes a code snippet, with a fixed time delay between each\ncall.\n\nThis method returns an interval ID which uniquely identifies the interval, so you\ncan remove it later by calling `clearInterval()`.\n\n## Syntax\n\n```js\nsetInterval(code)\nsetInterval(code, delay)\n\nsetInterval(func)\nsetInterval(func, delay)\nsetInterval(func, delay, arg0)\nsetInterval(func, delay, arg0, arg1)\nsetInterval(func, delay, arg0, arg1, /* … ,*/ argN)\n```\n\n### Parameters\n\n- `func`\n  - : A `function` to be executed every `delay` milliseconds. The first execution happens after `delay` milliseconds.\n- `code`\n  - : An optional syntax allows you to include a string instead of a function, which is\n    compiled and executed every `delay` milliseconds. This syntax is _not\n    recommended_ for the same reasons that make using `eval() a\n    security risk.\n- `delay` _**optional**_\n  - : The time, in milliseconds (thousandths of a second), the timer should delay in\n    between executions of the specified function or code. Defaults to 0 if not specified.\n    below for details on the permitted range of `delay` values.\n- `arg0, …, argN` _**optional**_\n  - : Additional arguments which are passed through to the function specified by\n    _func_ once the timer expires.\n\n### Return value\n\nThe returned `intervalID` is a numeric, non-zero value which identifies the\ntimer created by the call to `setInterval()`; this value can be passed to\n`clearInterval()` to cancel the interval.\n\nIt may be helpful to be aware that `setInterval()` and\n`setTimeout()` share the same pool\nof IDs, and that `clearInterval()` and\n`clearTimeout()` can technically\nbe used interchangeably. For clarity, however, you should try to always match them to\navoid confusion when maintaining your code.\n\n> **Note:** The `delay` argument is converted to a\n> signed 32-bit integer. This effectively limits `delay` to 2147483647 ms,\n> since it's specified as a signed integer in the IDL.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/setTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# setTimeout()\n\nThe global **`setTimeout()`** method sets a timer which executes a function or specified\npiece of code once the timer expires.\n\n## Syntax\n\n```js\nsetTimeout(code)\nsetTimeout(code, delay)\n\nsetTimeout(functionRef)\nsetTimeout(functionRef, delay)\nsetTimeout(functionRef, delay, param1)\nsetTimeout(functionRef, delay, param1, param2)\nsetTimeout(functionRef, delay, param1, param2, /* … ,*/ paramN)\n```\n\n### Parameters\n\n- `functionRef`\n  - : A `function` to be executed after the timer expires.\n- `code`\n  - : An alternative syntax that allows you to include a string instead of a function,\n    which is compiled and executed when the timer expires. This syntax is **not\n    recommended** for the same reasons that make using\n    `eval()` a security risk.\n- `delay` _**optional**_\n\n  - : The time, in milliseconds that the timer should wait before\n    the specified function or code is executed. If this parameter is omitted, a value of 0\n    is used, meaning execute \"immediately\", or more accurately, the next event cycle.\n\n- `param1`, …, `paramN` _**optional**_\n\n  - : Additional arguments which are passed through to the function specified by\n    `functionRef`.\n\n### Return value\n\nThe returned `timeoutID` is a positive integer value which\nidentifies the timer created by the call to `setTimeout()`. This value can be\npassed to `clearTimeout()` to\ncancel the timeout.\n\nIt is guaranteed that a `timeoutID` value will never be reused by a subsequent call to\n`setTimeout()` or `setInterval()` on the same object (a window or\na worker). However, different objects use separate pools of IDs.\n\n## Description\n\nTimeouts are cancelled using `clearTimeout()`.\n\nTo call a function repeatedly (e.g., every _N_ milliseconds), consider using\n`setInterval()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/structuredClone.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# structuredClone()\n\nThe global **`structuredClone()`** method creates a deep clone of a given value.\n\n## Syntax\n\n```js\nstructuredClone(value)\n```\n\n### Parameters\n\n- `value`\n  - : The object to be cloned.\n\n### Return value\n\nThe returned value is a deep copy of the original `value`.\n\n### Exceptions\n\n- `DataCloneError`\n  - : Thrown if any part of the input value is not serializable.\n\n## Description\n\nThis function can be used to deep copy JavaScript values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/undefined.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# undefined\n\nThe global **`undefined`** property represents the primitive\nvalue `undefined`. It is one of JavaScript's \"primitive types\".\n\n## Value\n\nThe primitive value `undefined`.\n\n## Description\n\n`undefined` is a property of the _global object_. That is, it is a variable in global scope.\n\n`undefined` is a non-configurable, non-writable property.\n\nA variable that has not been assigned a value is of type `undefined`. A\nmethod or statement also returns `undefined` if the variable that is being\nevaluated does not have an assigned value. A function returns `undefined` if\na value was not explicitly returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/globals/unescape.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# unescape()\n\n> **Note:** `unescape()` is a non-standard function implemented by browsers and was only standardized for cross-engine compatibility. It is not required to be implemented by all JavaScript engines and may not work everywhere. Use [`decodeURIComponent()`](./decodeURIComponent.mdx) or [`decodeURI()`](./decodeURI.mdx) if possible.\n\nThe **`unescape()`** function computes a new string in which hexadecimal escape sequences are replaced with the characters that they represent. The escape sequences might be introduced by a function like [`escape()`](./escape.mdx).\n\n## Syntax\n\n```js\nunescape(str)\n```\n\n### Parameters\n\n- `str`\n  - : A string to be decoded.\n\n### Return value\n\nA new string in which certain characters have been unescaped.\n\n## Description\n\n`unescape()` is a function property of the global object.\n\nThe `unescape()` function replaces any escape sequence with the character that it represents. Specifically, it replaces any escape sequence of the form `%XX` or `%uXXXX` (where `X` represents one hexadecimal digit) with the character that has the hexadecimal value `XX`/`XXXX`. If the escape sequence is not a valid escape sequence (for example, if `%` is followed by one or no hex digit), it is left as-is.\n\n> **Note:** This function was used mostly for URL encoding and is partly based on the escape format in rfc(1738). The `unescape()` function does _not_ evaluate [escape sequences](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#escape_sequences) in string literals. You can replace `\\xXX` with `%XX` and `\\uXXXX` with `%uXXXX` to get a string that can be handled by `unescape()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/html-rewriter/Element/prototype/after.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# after\n\nThe `after` method inserts content after the closing tag of the element.\n\n## Syntax\n\n```js\nelement.after(content);\nelement.after(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to insert after the element's closing tag.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.after(\"World\");\n// Result: <div>Hello</div>World\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/html-rewriter/Element/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# append\n\nThe `append` method inserts content at the end of the element's content.\n\n## Syntax\n\n```js\nelement.append(content);\nelement.append(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to insert at the end of the element's content.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.append(\", World\");\n// Result: <div>Hello, World</div>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/html-rewriter/Element/prototype/before.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# before\n\nThe `before` method inserts content before the opening tag of the element.\n\n## Syntax\n\n```js\nelement.before(content);\nelement.before(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to insert before the element's opening tag.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.before(\"Well\");\n// Result: Well<div>Hello</div>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/html-rewriter/Element/prototype/hasAttribute.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# hasAttribute\n\nThe `hasAttribute` method returns a `boolean` value indicating whether the specified attribute is present on the element.\n\n## Syntax\n\n```js\nelement.hasAttribute(attributeName);\n```\n\n### Parameters\n\n- `attributeName` _: string_\n  - The name of the attribute to check for.\n\n### Return value\n\nA boolean value indicating whether the attribute is present.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/html-rewriter/Element/prototype/prepend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# prepend\n\nThe `prepend` method inserts content at the beginning of the element's content.\n\n## Syntax\n\n```js\nelement.prepend(content);\nelement.prepend(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to insert at the beginning of the element's content.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.prepend(\"Well, \");\n// Result: <div>Well, Hello</div>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/html-rewriter/Element/prototype/removeAttribute.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# removeAttribute\n\nThe `removeAttribute` method removes the specified attribute from the element.\n\n## Syntax\n\n```js\nelement.removeAttribute(attributeName);\n```\n\n### Parameters\n\n- `attributeName` _: string_\n  - The name of the attribute to remove.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/html-rewriter/Element/prototype/replaceChildren.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# replaceChildren\n\nThe `replaceChildren` method replaces the element's children with new content.\n\n## Syntax\n\n```js\nelement.replaceChildren(content);\nelement.replaceChildren(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to replace the element's children with.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.replaceChildren(\"Greetings!\");\n// Result: <div>Greetings!</div>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/html-rewriter/Element/prototype/replaceWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# replaceWith\n\nThe `replaceWith` method replaces the element with new content.\n\n## Syntax\n\n```js\nelement.replaceWith(content);\nelement.replaceWith(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to replace the element with.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.replaceWith(\"<p>Greetings!</p>\");\n// Result: <p>Greetings!</p>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/html-rewriter/Element/prototype/selector.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# selector\n\nThe `selector` read-only property is a `string` representing the [CSS selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors) that matches the element.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/html-rewriter/Element/prototype/setAttribute.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# setAttribute\n\nThe `setAttribute` method sets the value of the specified attribute on the element. If the value already exists, it will be updated; otherwise, a new attribute with the specified name and value will be added to the element.\n\n## Syntax\n\n```js\nelement.setAttribute(attributeName, value);\n```\n\n### Parameters\n\n- `attributeName` _: string_\n  - The name of the attribute to set.\n- `value` _: string_\n  - The value to assign to the attribute.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/html-rewriter/Element/prototype/tag.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# tag\n\nThe `tag` read-only property is a `string` representing the tag name of the element.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/html-rewriter/HTMLRewritingStream/HTMLRewritingStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `HTMLRewritingStream()`\n\nThe **`HTMLRewritingStream`** lets you rewrite HTML by registering callbacks on CSS selectors. When an element matching the selector is encountered, the rewriter calls your callback. This callback can manipulate the attributes of the element, and add or remove content from the immediate context.\n\n## Syntax\n\n```js\nnew HTMLRewritingStream()\n```\n\n### Return value\n\nA new `HTMLRewritingStream` object.\n\n## Examples\n\nIn this example, we fetch an HTML page and use the HTML rewriter to add an attribute to all `div` tags and prepend the text `Header:` to all `h1` tags:\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { HTMLRewritingStream } from 'fastly:html-rewriter';\n\nasync function handleRequest(event) {\n  let transformer = new HTMLRewritingStream()\n    .onElement(\"h1\", e => e.prepend(\"Header: \"))\n    .onElement(\"div\", e => e.setAttribute(\"special-attribute\", \"top-secret\"));\n  let body = (await fetch(\"https://example.com/\")).body.pipeThrough(transformer);\n\n  return new Response(body, {\n    status: 200,\n    headers: new Headers({\n      \"content-type\": \"text/html; charset=utf-8\",\n    })\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/html-rewriter/HTMLRewritingStream/prototype/onElement.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# onElement\n\n▸ **onElement**`(selector: string, handler: (element: Element) => void): this`\n\nRegisters an element handler with the [`HTMLRewritingStream`] that will be called for each [`Element`] that matches the [CSS selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors) `selector`.\n\nElements added by handlers will not be processed by other handlers.\n\n## Syntax\n\n```js\n.onElement(selector, handler)\n```\n\n### Parameters\n\n- `selector` _: string_\n  - A CSS selector that determines the elements for which `handler` will be called\n  - The following types of CSS selector are supported:\n\nCurrently the rewriter supports the following CSS selectors:\n\n| Pattern              | Description                                                                |\n|----------------------|----------------------------------------------------------------------------|\n| `*`                  | Any element                                                                |\n| `E`                  | All elements of type `E`                                                   |\n| `E F`                | `F` elements inside `E` elements                                           |\n| `E > F`              | `F` elements directly inside `E` elements                                  |\n| `E:nth-child(n)`     | The n-th child of type `E`                                                 |\n| `E:first-child`      | First child of type `E`                                                    |\n| `E:nth-of-type(n)`   | The n-th sibling of type `E`                                               |\n| `E:first-of-type`    | First sibling of type `E`                                                  |\n| `E:not(s)`           | Type `E` elements not matching selector `s`                                |\n| `E.myclass`          | Type `E` elements with class `\"myclass\"`                                   |\n| `E#myid`             | Type `E` elements with ID `\"myid\"`                                         |\n| `E[attr]`            | Type `E` elements with attribute `attr`                                    |\n| `E[attr=\"val\"]`      | Type `E` elements where `attr` is `\"val\"`                                  |\n| `E[attr=\"val\" i]`    | Type `E` elements where `attr` is `\"val\"`, case-insensitive                |\n| `E[attr=\"val\" s]`    | Type `E` elements where `attr` is `\"val\"`, case-sensitive                  |\n| `E[attr~=\"val\"]`     | Type `E` elements where `attr` contains `\"val\"` in a space-separated list  |\n| `E[attr`&#124`;=\"val\"]`| Type `E` elements where `attr` is hyphen-separated and starts with `\"val\"` |\n| `E[attr^=\"val\"]`     | Type `E` elements where `attr` starts with `\"val\"`                         |\n| `E[attr$=\"val\"]`     | Type `E` elements where `attr` ends with `\"val\"`                           |\n| `E[attr*=\"val\"]`     | Type `E` elements where `attr` contains `\"val\"`                            |\n\n- `handler` _: (element: Element) => void_\n  - A callback function that will be called once for each element that matches `selector`\n\n### Return value\n\nThe `HTMLRewritingStream`, so multiple calls to `onElement` can be chained.\n\n### Exceptions\n\n- `Error`\n  - If the provided `selector` is not a valid CSS selector.\n  - If the provided `handler` is not a function.\n\n## Examples\n\n\nIn this example, we fetch an HTML page and use the HTML rewriter to add an attribute to all `div` tags and prepend the text `Header:` to all `h1` tags:\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { HTMLRewritingStream } from 'fastly:html-rewriter';\n\nasync function handleRequest(event) {\n  let transformer = new HTMLRewritingStream()\n    .onElement(\"h1\", e => e.prepend(\"Header: \"))\n    .onElement(\"div\", e => e.setAttribute(\"special-attribute\", \"top-secret\"));\n  let body = (await fetch(\"https://example.com/\")).body.pipeThrough(transformer);\n\n  return new Response(body, {\n    status: 200,\n    headers: new Headers({\n      \"content-type\": \"text/html; charset=utf-8\",\n    })\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/image-optimizer/Auto.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Auto`\n\nEnumerator options for [`imageOptimizerOptions.auto`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `AVIF` (`\"avif\"`) If the browser's Accept header indicates compatibility, deliver an AVIF image.\n- `WEBP` (`\"webp\"`)\tIf the browser's Accept header indicates compatibility, deliver a WebP image.\n\n## Examples\n\n```js\nimport { Auto, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      auto: Auto.AVIF\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/image-optimizer/BWAlgorithm.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `BWAlgorithm`\n\nEnumerator options for [`imageOptimizerOptions.bw`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Threshold` (`\"threshold\"`) Uses a luminance threshold to convert the image to black and white.\n- `Atkinson` (`\"atkinson\"`)\tUses [Atkinson dithering](https://en.wikipedia.org/wiki/Atkinson_dithering) to convert the image to black and white.\n\n\n## Examples\n\n```js\nimport { Region, BWAlgorithm } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      bw: BWAlgorithm.Threshold\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/image-optimizer/CropMode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `CropMode`\n\nEnumerator options for [`imageOptimizerOptions.crop.mode`](./imageOptimizerOptions.mdx) and `imageOptimizerOptions.precrop.mode`.\n\n## Constants\n\n- `Smart` (`\"smart\"`) Enables content-aware algorithms to attempt to crop the image to the desired aspect ratio while intelligently focusing on the most important visual content, including the detection of faces.\n- `Safe` (`\"safe\"`)\tAllow cropping out-of-bounds regions.\n\n## Examples\n\n```js\nimport { CropMode, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      crop: {\n        size: { ratio: { width: 4, height: 3 } },\n        mode: CropMode.Smart,\n      }\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/image-optimizer/Disable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Disable`\n\nEnumerator options for [`imageOptimizerOptions.disable`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Upscale` (`\"upscale\"`) Prevent images being resized such that the output image's dimensions are larger than the source image.\n\n## Examples\n\n```js\nimport { Disable, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      width: 2560,\n      disable: Disable.Upscale\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/image-optimizer/Enable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Enable`\n\nEnumerator options for [`imageOptimizerOptions.enable`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Upscale` (`\"upscale\"`) Allow images to be resized such that the output image's dimensions are larger than the source image.\n\n## Examples\n\n```js\nimport { Enable, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      width: 2560,\n      enable: Enable.Upscale\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/image-optimizer/Fit.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Fit`\n\nEnumerator options for [`imageOptimizerOptions.fit`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Bounds` (`\"bounds\"`) Resize the image to fit entirely within the specified region, making one dimension smaller if needed.\n- `Cover` (`\"cover\"`) Resize the image to entirely cover the specified region, making one dimension larger if needed.\n- `Crop` (`\"crop\"`) Resize and crop the image centrally to exactly fit the specified region.\n\n## Examples\n\n```js\nimport { Fit, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      width: 150,\n      height; 150,\n      fit: Fit.Bounds\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/image-optimizer/Format.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Format`\n\nEnumerator options for [`imageOptimizerOptions.format`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Auto` (`\"auto\"`) Automatically use the best format based on browser support and image/transform characteristics\n- `AVIF` (`\"avif\"`) AVIF\n- `BJPG` (`\"bjpg\"`) Baseline JPEG \n- `GIF` (`\"gif\"`) Graphics Interchange Format\n- `JPG` (`\"jpg\"`) JPEG \n- `JXL` (`\"jxl\"`) JPEGXL \n- `MP4` (`\"mp4\"`) MP4 (H.264)\n- `PJPG` (`\"pjpg\"`) Progressive JPEG \n- `PJXL` (`\"pjxl\"`) Progressive JPEGXL\n- `PNG` (`\"png\"`) Portable Network Graphics\n- `PNG8` (`\"png8\"`) Portable Network Graphics palette image with 256 colors and 8-bit transparency\n- `SVG` (`\"svg\"`) Scalable Vector Graphics\n- `WEBP` (`\"webp\"`) WebP\n- `WEBPLL` (`\"webpll\"`) WebP (Lossless)\n- `WEBPLY` (`\"webply\"`) WebP (Lossy)\n\n## Examples\n\n```js\nimport { Format, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      format: Format.PNG\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/image-optimizer/Metadata.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Metadata`\n\nEnumerator options for [`imageOptimizerOptions.metadata`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Copyright` (`\"copyright\"`) Preserve [copyright notice](https://www.iptc.org/std/photometadata/specification/IPTC-PhotoMetadata#copyright-notice), creator, credit line, licensor, and web statement of rights fields.\n- `C2PA` (`\"c2pa\"`) Preserve the [C2PA manifest](https://c2pa.org/) and add any transformations performed by Fastly Image Optimizer.\n- `CopyRightAndC2PA` (`\"copyright,c2pa\"`) Resize and crop the image centrally to exactly fit the specified region.\n\n## Examples\n\n```js\nimport { Metadata, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      metadata: Metadata.Copyright\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/image-optimizer/Optimize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Optimize`\n\nEnumerator options for [`imageOptimizerOptions.optimize`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Low` (`\"low\"`) Output image quality will be similar to the input image quality.\n- `Medium` (`\"medium\"`) More optimization is allowed. We attempt to preserve the visual quality of the input image.\n- `High` (`\"high\"`) Minor visual artifacts may be visible. This produces the smallest file.\n\n## Examples\n\n```js\nimport { Optimize, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      optimize: Optimize.High\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/image-optimizer/Orient.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Orient`\n\nEnumerator options for [`imageOptimizerOptions.orient`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Default` (`\"1\"`) \n- `FlipHorizontal` (`\"2\"`) \n- `FlipHorizontalAndVertical` (`\"3\"`) \n- `FlipVertical` (`\"4\"`) \n- `FlipHorizontalOrientLeft` (`\"5\"`) \n- `OrientRight` (`\"6\"`) \n- `FlipHorizontalOrientRight` (`\"7\"`) \n- `OrientLeft` (`\"8\"`) \n\n## Examples\n\n```js\nimport { Orient, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      orient: Orient.FlipHorizontal\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/image-optimizer/Profile.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Profile`\n\nEnumerator options for [`imageOptimizerOptions.profile`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Baseline` (`\"baseline\"`) The profile recommended for video conferencing and mobile applications. (Default)\n- `Main` (`\"main\"`) The profile recommended for standard-definition broadcasts.\n- `High` (`\"high\"`) The profile recommended for high-definition broadcasts.\n\n## Examples\n\n```js\nimport { Profile, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      profile: Profile.Main\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/image-optimizer/Region.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Region`\n\nEnumerator options for [`imageOptimizerOptions.region`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `UsEast` (`\"us_east\"`)\n- `UsCentral` (`\"us_central\"`)\n- `UsWest` (`\"us_west\"`)\n- `EuCentral` (`\"eu_central\"`)\n- `EuWest` (`\"eu_west\"`)\n- `Asia` (`\"asia\"`)\n- `Australia` (`\"australia\"`)\n\n\n## Examples\n\n```js\nimport { Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/image-optimizer/ResizeFilter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `ResizeFilter`\n\nEnumerator options for [`imageOptimizerOptions.resizeFilter`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Nearest` (`\"nearest\"`) Uses the value of nearby translated pixel values.\n- `Bilinear` (`\"bilinear\"`) Uses an average of a 2x2 environment of pixels.\n- `Linear` (`\"linear\"`) Same as `Bilenear`.\n- `Bicubic` (`\"bicubic\"`) Uses an average of a 4x4 environment of pixels, weighing the innermost pixels higher.\n- `Cubic` (`\"cubic\"`) Same as `Bicubic`.\n- `Lanczos2` (`\"lanczos2\"`) Uses the Lanczos filter to increase the ability to detect edges and linear features within an image and uses sinc resampling to provide the best possible reconstruction.\n- `Lanczos3` (`\"lanczos3\"`) Lanczos3 uses a better approximation of the sinc resampling function. (Default)\n- `Lanczos` (`\"lanczos\"`) Same as `Lanczos3`.\n\n## Examples\n\n```js\nimport { ResizeFilter, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      width: 2560,\n      resizeFilter: ResizeFilter.Linear\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/image-optimizer/imageOptimizerOptions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `imageOptimizerOptions` \n\nOptions specified in the [`Request`](../globals/Request/Request.mdx) constructor for running the [Fastly Image Optimizer](https://docs.fastly.com/products/image-optimizer). More detailed documentation on all Image Optimizer options is available in the [Image Optimizer reference docs](https://www.fastly.com/documentation/reference/io/).\n\n## Parameters\n\nAll parameters other than `region` are optional.\n\n- `region`: _[`Region`](./Region.mdx)_ Where image optimizations should occur.\n- `auto`: _[`Auto`](./Auto.mdx)_ Enable optimization features automatically.\n- `bgColor`: _[`Color`](#color)_ Set the background color of an image.\n- `blur`: _`number` (0.5-1000) or [`Percentage`](#percentage)_ Set the blurriness of the output image.\n- `brightness`: _`number` (-100-100)_ Set the brightness of the output image.\n- `bw`: _[`BWAlgorithm`](./BWAlgorithm.mdx)_ Convert an image to black and white.\n- `canvas`: _`Object`_ Increase the size of the canvas around an image.\n    - `size`: _[`Size`](#size)_\n    - `position` (optional): _[`Position`](#position)_\n- `contrast`: _`number` (-100-100)_ Set the contrast of the output image.\n- `crop`: _`Object`_ Remove pixels from an image.\n    - `size`: _[`Size`](#size)_\n    - `position` (optional): _[`Position`](#position)_\n    - `mode` (optional): _[`CropMode`](./CropMode.mdx)_\n- `disable`: _[`Disable`](./Disable.mdx)_ Disable functionality that is enabled by default.\n- `dpr`: `number` Ratio between physical pixels and logical pixels.\n- `enable`: _[`Enable`](./Enable.mdx)_ Enable functionality that is disabled by default.\n- `fit`: _[`Fit`](./Fit.mdx)_ Set how the image will fit within the size bounds provided.\n- `format`: _[`Format`](./Format.mdx)_ Specify the output format to convert the image to.\n- `frame`: _`number` (must have the value 1)_ Extract the first frame from an animated image sequence.\n- `height`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ Resize the height of the image.\n- `level`: _`String` containing one of the [allowed values](https://www.fastly.com/documentation/reference/io/level/#allowed-values)_ Specify the level constraints when converting to video.\n- `metadata`: _[`Metadata`](./Metadata.mdx)_ Control which metadata fields are preserved during transformation.\n- `optimize`: _[`Optimize`](./Optimize.mdx)_ Automatically apply optimal quality compression.\n- `orient`: _[`Orient`](./Orient.mdx)_ Change the cardinal orientation of the image.\n- `pad`: _[`Sides`](#sides)_ Add pixels to the edge of an image.\n- `precrop`: _`Object`_ Remove pixels from an image before any other transformations occur.\n    - `size`: _[`Size`](#size)_\n    - `position`: _[`Position`](#position)_\n    - `mode`: _[`CropMode`](./CropMode.mdx)_\n- `profile`: _[`Profile`](./Profile.mdx)_ Specify the profile class of application when converting to video.\n- `quality`: _`integer` (1-100)_ Optimize the image to the given compression level for lossy file formatted images.\n- `resizeFilter`: _[`ResizeFilter`](./ResizeFilter.mdx)_ Specify the resize filter used when resizing images.\n- `saturation`: _`number` (-100-100)_ Set the saturation of the output image.\n- `sharpen`: _`Object`_ Set the sharpness of the output image.\n    - `amount`: _`number` (0-10)_\n    - `radius`: _`number` (0.5-1000)_\n    - `threshold`: _`integer` (0-255)_\n- `trim`: _[`Sides`](#sides)_ Remove pixels from the edge of an image.\n- `viewbox`: _`number` (must have the value 1)_ Remove explicit width and height properties in SVG output.\n- `width`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ Resize the width of the image.\n\n## Types\n\n### Color\n\nEither:\n\n- a 3 or 6 character hexadecimal string\n- an `Object` containing:\n    - `r`: _`integer` (0-255)_ Red component\n    - `g`: _`integer` (0-255)_ Green component\n    - `b`: _`integer` (0-255)_ Blue component\n    - `a` (optional): _`number` (0.0-1.0)_ Alpha component \n\n### Percentage\n\nA `String` containing a number suffixed with a percent sign (%).\n\n### Position\n\nAn `Object` containing:\n\n- Exactly one of:\n    - `x`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ \n    - `offsetX`: _`number` (interpreted as a percentage)_\n- Exactly one of: \n    - `y`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ \n    - `offsetY`: _`number` (interpreted as a percentage)_\n\n### Sides\n\nAn `Object` containing `top`, `bottom`, `left`, and `right`, all of which are either an `integer` or [`Percentage`](#percentage).\n\n### Size\n\nAn `Object` containing either:\n\n- `absolute`: _`Object`_\n    - `width`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ \n    - `height`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ \n- `ratio`: _`Object`_\n    - `width`: _`number`_\n    - `height`: _`number`_\n\n## Examples\n\n```js\nimport { Format, Orient, CropMode, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      format: Format.PNG,\n      bgColor: {\n        'r': 100,\n        'g': 255,\n        'b': 9,\n        'a': 0.5\n      },\n      blur: '1%',\n      brightness: -20,\n      contrast: -20,\n      height: 600,\n      level: '4.0',\n      orient: Orient.FlipVertical,\n      saturation: 80,\n      sharpen: { 'amount': 5, 'radius': 6, 'threshold': 44 },\n      canvas: { 'size': { 'absolute': { 'width': 400, 'height': 400 } } },\n      crop: { size: { absolute: { width: 200, height: 200 }, mode: CropMode.Safe } },\n      trim: { top: 10, left: 10, right: 10, bottom: 10 },\n      pad: { top: 30, left: 30, right: \"1%\", bottom: 30 }\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/index.mdx",
    "content": "---\nsidebar_position: 1\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n\n# JavaScript for Fastly Compute\n\nThis site is the full SDK reference for [`@fastly/js-compute`](https://www.npmjs.com/package/%40fastly/js-compute), the module that provides the interface between your JavaScript code and the [Fastly Compute](https://www.fastly.com) platform.\n\nIf you haven't used Fastly Compute before, start by [setting up your first Fastly Compute program](https://developer.fastly.com/learning/compute/) over on **developer.fastly.com** so that you have a working development environment.\n\nTo learn more about the fundamentals of using JavaScript with Fastly Compute, see our [using JavaScript](https://developer.fastly.com/learning/compute/javascript/) guide.\n\n## Understanding the JavaScript SDK\n\nIncoming HTTP requests to [domains that are attached to your Fastly service](https://developer.fastly.com/learning/concepts/) will start an instance of your application and invoke a `fetch` event, which can be bound using the `addEventListener` function:\n\n```js\naddEventListener(\"fetch\", event => event.respondWith(handleRequest(event)) );\n\nasync function handleRequest(event) {\n  const req = event.request;\n\n  return fetch(req, {\n    backend: \"example_backend\"\n  });\n}\n```\n\nFastly specific features are available as named imports from `fastly:` prefixed modules, all of which are documented in this site.  For example, the [env](https://js-compute-reference-docs.edgecompute.app/docs/fastly:env/env) function provides access to [environment variables](https://developer.fastly.com/reference/compute/ecp-env/) and can be imported into your application like this:\n\n```js\nimport { env } from \"fastly:env\"\n```\n\nJavaScript code compiled for Fastly Compute has access to a global environment with most of the globals you would expect in an ECMAScript runtime, like [`Date`](https://js-compute-reference-docs.edgecompute.app/docs/globals/Date/) and [`console`](https://js-compute-reference-docs.edgecompute.app/docs/globals/console/log).\n\n## Trying things out\n\n[Fastly fiddle](https://fiddle.fastly.dev) is an online web-based playground where you can run Fastly code.  You'll see fiddles included in many pages of our [developer hub](https://developer.fastly.com) and this SDK reference. These interactive examples can be executed right on the page by clicking the **RUN** tab:\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nasync function app(event) {\n    const request = event.request;\n    return new Response(\"You made a request to \" + request.url)\n}\naddEventListener(\"fetch\", event => {\n  event.respondWith(app(event));\n});\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nasync function app(event) {\n    const request = event.request;\n    return new Response(`You made a request to ${request.url}`)\n}\n\naddEventListener(\"fetch\", event => {\n  event.respondWith(app(event));\n});\n\n```\n\n</Fiddle>\n\nCheck out [`fiddle.fastly.dev`](https://fiddle.fastly.dev) to create your own.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/kv-store/KVStore/KVStore.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `KVStore()`\n\nThe **`KVStore` constructor** lets you connect your Fastly Compute application to a Fastly KV store.\n\nA Fastly KV store is a persistent, globally consistent key-value store. See [Data stores for Fastly services](https://developer.fastly.com/learning/concepts/edge-state/data-stores#kv-stores) for initialization and usage details.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew KVStore(name)\n```\n\n> **Note:** `KVStore()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Define a KV store instance using the resource link name.\n  \n### Return value\n\nA new `KVStore` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no KV Store exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name does not start with an ascii alphabetical character \n  - Thrown if the provided name contains control characters `(\\u0000-\\u001F)`\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then read back the value and return it to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/kv-store/KVStore/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# KVStore.prototype.delete\n\nDeletes the value associated with the key `key` in the KV store.\n\n## Syntax\n\n```js\ndelete(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the KV-store.\n\n### Return value\n\nReturns `undefined`\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is any of the strings `\"\"`, `\".\"`, or `\"..\"`\n    - Starts with the string `\".well-known/acme-challenge/\"`\n    - Contains any of the characters `\"#;?^|\\n\\r\"`\n    - Is longer than 1024 characters\n    - Does not exist\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then delete the entry.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n  await files.delete('hello')\n\n  const entry = await files.get('hello')\n  if (entry) {\n    return new Response(await entry.text())\n  } else {\n    return new Response('no file named hello exists')\n  }\n\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/kv-store/KVStore/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# KVStore.prototype.get\n\n▸ **get**(): `string`\n\nGets the value associated with the key `key` in the KV store.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the KV-store.\n\n### Return value\n\nIf the key does not exist in the KV store, this returns a `Promise` which resolves with `null`.\n\nIf the key does exist in the KV store, this returns a `Promise` which resolves with an `KVStoreEntry`.\n\n## Description\n\nSend the given message, converted to a string, to this KVStore instance's endpoint.\n\nThe `get()` method requires its `this` value to be a [`KVStore`](../KVStore.mdx) object.\n\nIf the `this` value does not inherit from `KVStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is any of the strings `\"\"`, `\".\"`, or `\"..\"`\n    - Starts with the string `\".well-known/acme-challenge/\"`\n    - Contains any of the characters `\"#;?^|\\n\\r\"`\n    - Is longer than 1024 characters\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then read back the value and return it to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/kv-store/KVStore/prototype/list.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStore.prototype.list\n\nThe **`list()`** can be used to list the keys of a store.\n\n## Syntax\n\n```js\nlist(options?)\n```\n\n### Parameters\n\n- `options` _: object_ _**optional**_\n  - List options supporting properties:\n  - `cursor` _: string_ _**optional**_\n    - The cursor used to pick up from a previous iteration.\n  - `limit` _: number_ _**optional**_\n    - The maximum number of keys to return.\n  - `prefix` _: string_ _**optional**_\n    - List only those keys that start with the given string prefix.\n  - `noSync` _: boolean_ _**optional**_\n    - Do not sync the key list first, instead provide a possibly out-of-date listing. May be faster but inconsistent.\n\n### Return value\n\nReturns a `Promise` which resolves with `{ list: string[], cursor: string | undefined }`.\n\n## Example\n\nIn this example we list the keys of a KV Store named `'files'`, iterating 10 at a time, counting the total;\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from 'fastly:kv-store';\n\nasync function app(event) {\n  const files = new KVStore('files');\n\n  let cursor,\n    list,\n    total = 0;\n  do {\n    ({ cursor, list } = await files.list({ limit: 10, cursor }));\n    total += list?.length;\n  } while (list);\n\n  return new Response(`Iterated ${total} entries`);\n}\n\naddEventListener('fetch', (event) => event.respondWith(app(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/kv-store/KVStore/prototype/put.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# KVStore.prototype.put\n\nThe **`put()`** method stores a `value` into the KV store under a `key`.\n\n> **Note**: KV stores are eventually consistent, this means that the updated contents associated with the key `key` may not be available to read from all edge locations immediately and some edge locations may continue returning the previous contents associated with the key.\n\n## Syntax\n\n```js\nput(key, value, options?)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to store the supplied value under within the KV store.\n- `value` _:  ArrayBuffer | TypedArray | DataView| ReadableStream | URLSearchParams | String | string literal_\n  - The value to store within the KV store.\n- `options` _: object_ _**optional**_\n  - An insert options parameter, supporting:\n  - `metadata` _: ArrayBuffer | TypedArray | DataView_ _**optional**_\n    - Binary metadata associated with the entry, may be up to 1000 bytes.\n  - `ttl` _: number_ _**optional**_\n    - TTL for the entry\n  - `mode` _: 'overwrite' | 'add' | 'append' | 'prepend'_ _**optional**_\n    - Insert mode, defaults to 'overwrite'\n  - `gen` _: number_ _**optional**_\n    - 'generation' header specific to the version of an entry key\n\n### Return value\n\nReturns a `Promise` which resolves with `undefined` when the provided `value` has been written into the KV store.\n\n## Description\n\nStores the supplied `value` into the KV store under the supplied `key`.\n\nThe `put()` method requires its `this` value to be a [`KVStore`](../KVStore.mdx) object.\n\nIf the `this` value does not inherit from `KVStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is any of the strings `\"\"`, `\".\"`, or `\"..\"`\n    - Starts with the string `\".well-known/acme-challenge/\"`\n    - Contains any of the characters `\"#;?^|\\n\\r\"`\n    - Is longer than 1024 characters\n- `TypeError`\n  - If the provided `gen`:\n    - Is not an number\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then read back the value and return it to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/kv-store/KVStoreEntry/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.arrayBuffer()\n\nThe `arrayBuffer()` method of the `KVStoreEntry` interface takes a `KVStoreEntry` stream and reads it to completion. It returns a promise that resolves with an `ArrayBuffer`.\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an `ArrayBuffer`."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/kv-store/KVStoreEntry/prototype/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.body\n\nThe `body` read-only property of the `KVStoreEntry` interface is a `ReadableStream` of the body contents.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/kv-store/KVStoreEntry/prototype/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.bodyUsed\n\nThe `bodyUsed` read-only property of the `KVStoreEntry` interface is a `boolean` value that indicates whether the body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/kv-store/KVStoreEntry/prototype/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.json()\n\nThe `json()` method of the `KVStoreEntry` interface takes a `KVStoreEntry` stream and reads it to completion. It returns a promise which resolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a JavaScript object. This object could be anything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/kv-store/KVStoreEntry/prototype/metadata.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.metadata()\n\nThe `metadata()` method of the `KVStoreEntry` interface provides the binary metadata associated with the `KVStoreEntry`.\n\nThe metadata binary may be up to 1000 bytes, and is returned as a `Uint8Array` TypedArray buffer, if metadata is set, or null otherwise.\n\n## Syntax\n\n```js\nmetadata()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a `Uint8Array` buffer object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/kv-store/KVStoreEntry/prototype/metadataText.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.metadataText()\n\nThe `metadataText()` method of the `KVStoreEntry` interface provides a String interpretation of binary metadata associated with the `KVStoreEntry`.\n\nIf the binary data is not a valid string, an encoding error will be thrown.\n\n## Syntax\n\n```js\nmetadataText()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a String.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/kv-store/KVStoreEntry/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.text()\n\nThe `text()` method of the `KVStoreEntry` interface takes a `KVStoreEntry` stream and reads it to completion. It returns a promise that resolves with a `String`. The `KVStoreEntry `is always decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a `String`."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/logger/Logger/Logger.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Logger()`\n\nThe **`Logger` constructor** lets you connect your Fastly Compute application to a [Fastly Named Logger](https://developer.fastly.com/learning/integrations/logging/).\n\n## Syntax\n\n```js\nnew Logger(name)\n```\n\n> **Note:** `Logger()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - The Fastly Logger which should be associated with this Logger instance\n\n### Return value\n\nA new `Logger` object.\n\n## Examples\n\nIn this example we have a create a logger named `\"splunk\"` and logs the incoming request method and destination.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Logger Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^3\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nasync function app (event) {\n  let logger = new Logger(\"splunk\");\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nconst logger = new Logger(\"splunk\");\nasync function app (event) {\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/logger/Logger/prototype/log.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Logger.prototype.log\n\n▸ **log**(): `string`\n\nSends the given message, converted to a string, to this Logger instance's endpoint.\n\n**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nlog(message)\n```\n\n### Return value\n\n`undefined`.\n\n## Description\n\nSend the given message, converted to a string, to this Logger instance's endpoint.\n\nThe `log()` method requires its `this` value to be a [`Logger`](../Logger.mdx) object.\n\nIf the `this` value does not inherit from `Logger.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n## Examples\n\nIn this example we have a create a logger named `\"splunk\"` and logs the incoming request method and destination.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Logger.prototype.log Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^3\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nlet logger = new Logger(\"splunk\");\nasync function app (event) {\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nasync function app (event) {\n  let logger = new Logger(\"splunk\");\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/logger/configureConsole.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# configureConsole\n\nThe **`configureConsole()`** function allows configuring the behaviour of the `console` global JS logger.\n\n## Syntax\n\n```js\nconfigureConsole(loggingOptions)\n```\n\n### Parameters\n\n- `loggingOptions` _: object_\n  - \n  - The name has to be between 1 and 254 characters inclusive.\n  - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n\n## Examples\n\nIn this example, we disable prefixing for `console.log` and use `stderr` output for `console.error`:\n\n```js\nimport { configureConsole } from \"fastly:logger\";\n\nconfigureConsole({\n  prefixing: false,\n  stderr: true\n});\n\nasync function handleRequest(event) {\n  console.log(JSON.stringify(event.request.headers));\n  const url = new URL(event.request.url);\n  try {\n    validate(url);\n  } catch (e) {\n    console.error(`Validation error: ${e}`);\n    return new Response('Bad Request', { status: 400 });\n  }\n  return new Response('OK');\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/migration-guide/index.mdx",
    "content": "---\nsidebar_position: 1\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Migrating from v2 to v3`\n\n## SimpleCache.delete renamed to SimpleCache.purge and requires purge options to be supplied as the second parameter\n\nWe are renaming because \"purge\" is already a well-known and documented concept for removing content from Fastly's cache.\n\nThe new addition of a second argument allows the caller to decide what scope to purge the content from, currently they can choose to purge from all of Fastly (\"global\") or from the POP that contains the currently executing instance (\"pop\"). We do not provide a default option right now, in the future we may provide a default option, if we discover a common pattern is being used.\n\nHere is an example of migrating an application using `SimpleCache.delete` to `SimpleCache.purge` with the same purging behaviour:\n```diff\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const url = new URL(event.request);\n  const path = url.pathname;\n  if (url.searchParams.has('delete')) {\n-    SimpleCache.delete(path);\n+    SimpleCache.purge(path, { scope: \"global\" });\n    return new Response(page, { status: 204 });\n  }\n\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n\n```\n\n\n# `Migrating from v1 to v2`\n\n## ObjectStore renamed to KVStore\n\nWe have renamed the `ObjectStore` class to `KVStore`, and the module name from `fastly:object-store` to `fastly:kv-store`.\n\nYou will need to update your code to use the new class name and module name.\n\nBelow is the change that would need to be made for the imported module name:\n```diff\n- import { ObjectStore } from 'fastly:object-store';\n+ import { KVStore } from 'fastly:kv-store';\n```\n\nAnd this is the change that would need to be made for constructing an instance of the class:\n```diff\n- const store = new ObjectStore('my-store');\n+ const store = new KVStore('my-store');\n```\n\n\nHere is a full example of migrating an application from ObjectStore to KVStore:\n```diff\n/// <reference types=\"@fastly/js-compute\" />\n\n- import { ObjectStore } from 'fastly:object-store';\n+ import { KVStore } from 'fastly:kv-store';\n\nasync function app(event) {\n-   const files = new ObjectStore('files');\n+   const files = new KVStore('files');\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/secret-store/SecretStore/SecretStore.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `SecretStore()`\n\nThe **`SecretStore` constructor** lets you connect your Fastly Compute application to a Fastly Secret store.\n\nA secret store is a persistent, globally distributed store for secrets accessible to Fastly Compute services during request processing.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew SecretStore(name)\n```\n\n> **Note:** `SecretStore()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Define a Secret Store instance using the resource link name.\n  \n### Return value\n\nA new `SecretStore` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Secret Store exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name contains characters other than letters, numbers, dashes (-), underscores (_), and periods (.)\n\n## Examples\n\nIn this example we connect to a Secret Store named `'secrets'` and retrieve a secret named `'cat-api-key'` use the value in a Request header.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SecretStore } from \"fastly:secret-store\";\n\nasync function app(event) {\n  const secrets = new SecretStore('secrets')\n\n  const catApiKey = await secrets.get('cat-api-key')\n\n  return fetch('/api/cat', {\n    headers: {\n      'cat-api-key': catApiKey.plaintext()\n    }\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/secret-store/SecretStore/fromBytes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# fromBytes\n\nThe **`fromBytes()`** function is used to create an in-memory secret from an array buffer.\n\n>**Note**: This API should be avoided when possible, by instead using [SecretStore.prototype.get](./prototype/get.mdx) to obtain secure secrets.\n\n## Syntax\n\n```js\nfromBytes(new Uint8Array([1, 2, 3]))\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns a `SecretStoreEntry`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/secret-store/SecretStore/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SecretStore.prototype.get\n\n▸ **get**(): `string`\n\nGets the value associated with the key `key` in the Secret store.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the Secret Store.\n\n### Return value\n\nIf the key does not exist in the Secret Store, this returns a `Promise` which resolves with `null`.\n\nIf the key does exist in the Secret Store, this returns a `Promise` which resolves with an `SecretStoreEntry`.\n\n## Description\n\nSend the given message, converted to a string, to this SecretStore instance's endpoint.\n\nThe `get()` method requires its `this` value to be a [`SecretStore`](../SecretStore.mdx) object.\n\nIf the `this` value does not inherit from `SecretStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Is longer than 255 characters\n    - Contains characters other than letters, numbers, dashes (-), underscores (_), and periods (.)\n\n## Examples\n\nIn this example we connect to a Secret Store named `'secrets'` and retrieve a secret named `'cat-api-key'` use the value in a Request header.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SecretStore } from \"fastly:secret-store\";\n\nasync function app(event) {\n  const secrets = new SecretStore('secrets')\n\n  const catApiKey = await secrets.get('cat-api-key')\n\n  return fetch('/api/cat', {\n    headers: {\n      'cat-api-key': catApiKey.plaintext()\n    }\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/secret-store/SecretStoreEntry/prototype/plaintext.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SecretStoreEntry.prototype.plaintext\n\n▸ **plaintext**(): `string`\n\nReturns the plaintext contents of the SecretStoreEntry instance as String.\n\n## Syntax\n\n```js\nplaintext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA String\n\n### Exceptions\n\nThe `plaintext()` method requires its `this` value to be a `SecretStoreEntry` object.\nIf the `this` value does not inherit from `SecretStoreEntry.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n## Examples\n\nIn this example we connect to a Secret Store named `'secrets'` and retrieve a secret named `'cat-api-key'` use the value in a Request header.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SecretStore } from \"fastly:secret-store\";\n\nasync function app(event) {\n  const secrets = new SecretStore('secrets')\n\n  const catApiKey = await secrets.get('cat-api-key')\n\n  return fetch('/api/cat', {\n    headers: {\n      'cat-api-key': catApiKey.plaintext()\n    }\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/secret-store/SecretStoreEntry/prototype/rawBytes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SecretStoreEntry.prototype.rawBytes\n\n▸ **rawBytes**(): `Uint8Array`\n\nReturns the raw byte contents of the SecretStoreEntry instance as a Uint8Array.\n\n## Syntax\n\n```js\nrawBytes()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Uint8Array\n\n### Exceptions\n\nThe `rawBytes()` method requires its `this` value to be a `SecretStoreEntry` object.\nIf the `this` value does not inherit from `SecretStoreEntry.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/security/inspect.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# inspect\n\nThe **`inspect()`** function inspects a request using the [Fastly Next-Gen WAF](https://docs.fastly.com/en/ngwaf/).\n\n## Syntax\n\n```js\ninspect(request, config);\n```\n\n### Parameters\n\n- `request` _: Request_\n  - The Request to get a WAF determination for.\n- `config` _: object_\n  - `corp` _: string_\n    - Set a corp name for the configuration.\n    - This parameter is currently required.\n  - `workspace` _: string_\n    - Set a workspace name for the configuration.\n    - This parameter is currently required.\n  - `overrideClientIp` _: string_\n    - Specify an explicit client IP address to inspect.\n    - By default, `inspect` will use the IP address that made the request to the\n      running Compute service, but you may want to use a different IP when\n      service chaining or if requests are proxied from outside of Fastly’s\n      network.\n\n### Return value\n\nReturns an `Object` with the `inspect` response, with the following fields:\n\n- `waf_response` _: number_\n  - Security status code.\n  \n- `redirect_url` _: string | null_\n  - A redirect URL returned from Security.\n\n- `tags` _: string[]_\n  - Tags returned by Security.\n\n- `verdict` _: string_\n  - The outcome of inspecting a request with Security. It can be one of the following:\n    - `\"allow\"`\n      - Security indicated that this request is allowed.\n    - `\"block\"`\n      - Security indicated that this request should be blocked.\n    - `\"unauthorized\"`\n      - Security indicated that this service is not authorized to inspect a request.\n    - Other verdicts may be returned but not currently documented.\n\n- `decision_ms` _: number_\n  - How long Security spent determining its verdict, in milliseconds.\n  \n## Examples\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { inspect } from \"fastly:security\";\n\nasync function app(event) {\n  const res = inspect(event.request, {\n    corp: \"mycorp\",\n    workspace: \"myws\"\n  });\n  switch (res.verdict) {\n    case \"allow\":\n      return await fetch(event.request);\n    case \"block\":\n      return new Response(\"Request Blocked\", { status: 400 });\n    case \"unauthorized\":\n      return new Response(\"Unauthorized\", { status: 401 });\n    default:\n      return new Response(\"idk\", { status: 500 });\n  }\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/shielding/Shield/Shield.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `Shield()`\n\nLoad information about the given shield.\n\nReturns an object representing the shield if it is active, or throws an exception if the string is malformed or the shield doesn’t exist.\n\nShield names are defined on [this webpage](https://www.fastly.com/documentation/guides/concepts/shielding/#shield-locations), in the “shield code” column. For example, the string “pdx-or-us” will look up our Portland, OR, USA shield site, while “paris-fr” will look up our Paris site.\n\nIf you are using a major cloud provider for your primary origin site, consider looking at the “Recommended for” column, to find the Fastly POP most closely located to the given cloud provider.\n\n## Syntax\n\n```js\nnew Shield(name)\n```\n\n> **Note:** `Shield()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Shield exists with the provided name\n\n## Examples\n\nIn this example, we create a Shield instance for the Sydney, Australia shield POP. If the code is running on that shield POP, it fetches directly from origin. Otherwise, it routes the request through the shield using an encrypted connection.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n    \nimport { Shield } from \"fastly:shielding\";\n\nasync function app(event) {\n    const shield = new Shield('wsi-australia-au');\n    // If running on the shield POP, fetch from the origin directly\n    if (shield.runningOn()) {\n        return await fetch('https://http-me.fastly.com/anything', { backend: 'httpme' });\n    }\n    // Otherwise, route the request through the shield using an encrypted connection\n    return await fetch(event.request, { backend: shield.encryptedBackend() });\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/shielding/Shield/prototype/encryptedBackend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Shield.prototype.encryptedBackend\n\n▸ **encryptedBackend**(configuration?): `Backend`\n\nReturns a `Backend` representing an encrypted connection to the POP.\n\nFor reference, this is almost always the backend that you want to use. Only use [`Shield::unencryptedBackend`](./unencryptedBackend.mdx) in situations in which you are 100% sure that all the data you will send and receive over the backend is already encrypted.\n\n## Parameters\n\n- `configuration` _: object_ _**optional**_\n  - `firstByteTimeout` _: number_ _**optional**_\n    - An optional first byte timeout (in milliseconds) to set on the returned backend.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/shielding/Shield/prototype/runningOn.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Shield.prototype.runningOn\n\n▸ **runningOn**(): `boolean`\n\nReturns whether we are currently operating on the given shield.\n\nTechnically, this may also return true in very isolated incidents in which Fastly is routing traffic from the target shield POP to the POP that this code is running on, but in these situations the results should be approximately identical.\n\n(For example, it may be the case that you are asking to shield to ‘pdx-or-us’. But, for load balancing, performance, or other reasons, Fastly is temporarily shifting shielding traffic from Portland to Seattle. In that case, this function may return true for hosts running on ‘bfi-wa-us’, our Seattle site, because effectively the shield has moved to that location. This should give you a slightly faster experience than the alternative, in which this function would return false, you would try to forward your traffic to the Portland site, and then that traffic would be caught and redirected back to Seattle.)\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/shielding/Shield/prototype/unencryptedBackend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Shield.prototype.unencryptedBackend\n\n▸ **unencryptedBackend**(configuration?): `Backend`\n\nReturns a `Backend` representing an unencrypted connection to the POP.\n\nGenerally speaking, we encourage users to use [`Shield::encryptedBackend`](./encryptedBackend.mdx) instead of this function. Data sent over this backend – the unencrypted version – will be sent over the open internet, with no protections. In most cases, this is not what you want. However, in some cases – such as when you want to ship large data blobs that you know are already encrypted — using these backends can prevent a double-encryption performance penalty.\n\n## Parameters\n\n- `configuration` _: object_ _**optional**_\n  - `firstByteTimeout` _: number_ _**optional**_\n    - An optional first byte timeout (in milliseconds) to set on the returned backend."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.1/websocket/createWebsocketHandoff.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# createWebsocketHandoff\n\nThe **`createWebsocketHandoff()`** function creates a Response instance which informs Fastly to pass the original Request through Websocket, to the declared backend.\n\n## Syntax\n\n```js\ncreateWebsocketHandoff(request, backend)\n```\n\n### Parameters\n\n- `request` _: Request_\n  - The request to pass through Websocket.\n- `backend` _: string_\n  - The name of the backend that Websocket should send the request to.\n  - The name has to be between 1 and 254 characters inclusive.\n  - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n\n### Return value\n\nA Response instance is returned, which can then be used via `event.respondWith`.\n\n## Examples\n\nIn this example application requests to the path `/stream` and sent handled via Websocket.\n\n```js\nimport { createWebsocketHandoff } from \"fastly:websocket\";\n\nasync function handleRequest(event) {\n  try {\n    const url = new URL(event.request.url);\n    if (url.pathname === '/stream') {\n      return createWebsocketHandoff(event.request, 'websocket_backend');\n    } else {\n      return new Response('oopsie, make a request to /stream for some websocket goodies', { status: 404 });\n    }\n  } catch (error) {\n    console.error({error});\n    return new Response(error.message, {status:500})\n  }\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/acl/Acl/open.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Acl.open()\n\nOpens the ACL with the given name, returning a new `Acl` instance with the given name on success.\n\n## Syntax\n\n```js\nAcl.open(name)\n```\n\n### Return value\n\nAn `Acl` instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/acl/Acl/prototype/lookup.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Acl.prototype.lookup()\n\nThe **`lookup(ipAddress)`** method returns the name associated with the `Acl` instance.\n\n## Syntax\n\n```js\nacl.lookup(ipAddress)\n```\n\n### Parameters\n\n- `ipAddress` _: string_\n  - IPv4 or IPv6 address to lookup\n\n### Return value\n\nAn Object of the form `{ action: 'ALLOW' | 'BlOCK', prefix: string }`, where `prefix` is the IP\naddress prefix that was matched in the ACL.\n\n## Example\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Acl } from 'fastly:acl';\naddEventListener('fetch', async (evt) => {\n  const myAcl = Acl.open('myacl');\n  const match = await myAcl.lookup(evt.client.address);\n  evt.respondWith(new Response(match?.action === 'BLOCK' ? 'blocked' : 'allowed'));\n});\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/backend/Backend/Backend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Backend()`\n\nThe **`Backend` constructor** lets you dynamically create new [Fastly Backends](https://developer.fastly.com/reference/api/services/backend/) for your Fastly Compute service.\n\n>**Note**: Dynamic backends are by default disabled at the Fastly service level. Contact [Fastly Support](https://support.fastly.com/hc/en-us/requests/new?ticket_form_id=360000269711) to request dynamic backends on Fastly Services.\n\nTo disable the usage of dynamic backends, see [enforceExplicitBackends](../enforceExplicitBackends.mdx).\n\n## Syntax\n\n```js\nnew Backend(backendConfiguration)\n```\n\n> **Note:** `Backend()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `backendConfiguration`\n\n  - : An Object which contains all the configuration options to apply to the newly created Backend.\n\n    - `name` _: string_\n      - The name of the backend.\n      - The name has to be between 1 and 254 characters inclusive.\n      - The name can be whatever you would like, as long as it does not match the name of any of the static service backends nor match any other dynamic backends built during a single execution of the application.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n    - `target` _: string_\n      - A hostname, IPv4, or IPv6 address for the backend as well as an optional port.\n      - The target has to be at-least 1 character.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. Is null, undefined, an empty string, not a valid IP address or host, or is the string `::`\n    - `hostOverride` _: string_ _**optional**_\n      - If set, will force the HTTP Host header on connections to this backend to be the supplied value.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `connectTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for a connection to this backend to be established.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `firstByteTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `betweenBytesTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend.\n      - If exceeded, the response received so far will be considered complete and the fetch will end.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `useSSL` _: boolean_ _**optional**_\n      - Whether or not to require TLS for connections to this backend.\n    - `dontPool` _: boolean_ _**optional**_\n      - Determine whether or not connections to the same backend should be pooled across different sessions.\n      - Fastly considers two backends “the same” if they're registered with the same name and the exact same settings.\n      - In those cases, when pooling is enabled, if Session 1 opens a connection to this backend it will be left open, and can be re-used by Session 2.\n      - This can help improve backend latency, by removing the need for the initial network / TLS handshake(s).\n      - By default, pooling is enabled for dynamic backends.\n    - `tlsMinVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Minimum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `tlsMaxVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Maximum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `certificateHostname` _: string_ _**optional**_\n      - Define the hostname that the server certificate should declare.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `caCertificate` _: string_ _**optional**_\n      - The CA certificate to use when checking the validity of the backend.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `ciphers` _: string_ _**optional**_\n      - List of OpenSSL ciphers to support for connections to this origin.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - [List of ciphers supported by Fastly](https://developer.fastly.com/learning/concepts/routing-traffic-to-fastly/#use-a-tls-configuration).\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `sniHostname` _: string_ _**optional**_\n      - The SNI hostname to use on connections to this backend.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `clientCertificate` _: object_ _**optional**_\n      - The client certificate to provide for the TLS handshake\n      - `certificate` _: string_\n        - The PEM certificate string.\n      - `key` _: SecretStoreEntry_\n        - The `SecretStoreEntry` to use for the key, created via [`SecretStore.prototype.get`](../../fastly:secret-store/SecretStore/prototype/get.mdx) or alteratively via [`SecretStore.fromBytes`](../../fastly:secret-store/SecretStore/fromBytes.mdx).\n    - `httpKeepalive` _: number_ _**optional**_\n      - Enable HTTP keepalive, setting the timout in milliseconds.\n    - `tcpKeepalive` _: boolean | object_ _**optional**_\n      - Enable TCP keepalive. When an object, optionally setting the keepalive configuration options.\n      - `timeSecs` _: number_ _**optional**_\n        - Configure how long to wait after the last sent data over the TCP connection before starting to send TCP keepalive probes.\n      - `intervalSecs` _: number_ _**optional**_\n        - Configure how long to wait between each TCP keepalive probe sent to the backend to determine if it is still active.\n      - `probes` _: number_ _**optional**_\n        - Number of probes to send to the backend before it is considered dead.\n    - `grpc` _: boolean_ _**optional**_\n      - **_Experimental feature_**\n      - When enabled, sets that this backend is to be used for gRPC traffic. \n      - _Warning: When using this experimental feature, no guarantees are provided for behaviours for backends that do not provide gRPC traffic._\n\nAll optional generic options can have their defaults set via [`setDefaultDynamicBackendConfig()`](../setDefaultDynamicBackendConfig.mdx).\n\nThis includes all configuration options above except for `name`, `target`, `hostOverride`, `sniHostname` and `grpc`.\n\n### Return value\n\nA new `Backend` object.\n\n## Examples\n\nIn this example an explicit Dynamic Backend is created and supplied to the fetch request, the response is then returned to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Explicit Dynamic Backend Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\",\n    connectTimeout: 1000,\n    firstByteTimeout: 15000,\n    betweenBytesTimeout: 10000,\n    useSSL: true,\n    tlsMinVersion: 1.3,\n    tlsMaxVersion: 1.3,\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\",\n    connectTimeout: 1000,\n    firstByteTimeout: 15000,\n    betweenBytesTimeout: 10000,\n    useSSL: true,\n    tlsMinVersion: 1.3,\n    tlsMaxVersion: 1.3,\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/backend/Backend/exists.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.exists()\n\nThe **`Backend.exists()`** method returns a boolean indicating if a Backend with the given name exists or not.\n\n## Syntax\n\n```js\nexists(name)\n```\n\n### Return value\n\nA boolean indicating if a Backend with the given name exists or not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/backend/Backend/fromName.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.fromName()\n\nReturns the `Backend` instance with the given name, if one exists. If one does not exist, an error is thrown.\n\n## Syntax\n\n```js\nfromName(name)\n```\n\n### Return value\n\nA `Backend` instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/backend/Backend/health.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.health()\n\n:::info\n\nThis method is deprecated, use [`Backend.prototype.health`](./prototype/health.mdx) instead.\n\n:::\n\nThe **`Backend.health()`** method returns a string representing the health of the given Backend instance.\n\n## Syntax\n\n```js\nBackend.health(backend)\n```\n\n### Return value\n\nA string representing the health of the specified Backend value.\n\nPossible values are:\n- `\"healthy\"` - The backend's health check has succeeded, indicating the backend is working as expected and should receive requests.\n- `\"unhealthy\"` - The backend's health check has failed, indicating the backend is not working as expected and should not receive requests.\n- `\"unknown\"` - The backend does not have a health check configured.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/backend/Backend/prototype/betweenBytesTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.betweenBytesTimeout\n\nThe read-only **`betweenBytesTimeout`** property of a `Backend` instance is an integer number\nproviding the between bytes timeout for this backend in milliseconds.\n\nWhen not set or in environments that do not support this property (such as Viceroy), `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/backend/Backend/prototype/connectTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.connectTimeout\n\nThe read-only **`connectTimeout`** property of a `Backend` instance is an integer number\nproviding the connect timeout for this backend in milliseconds.\n\nWhen not set or in environments that do not support this property (such as Viceroy), `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/backend/Backend/prototype/firstByteTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.firstByteTimeout\n\nThe read-only **`firstByteTimeout`** property of a `Backend` instance is an integer number\nproviding the first byte timeout for this backend in milliseconds.\n\nWhen not set or in environments that do not support this property (such as Viceroy), `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/backend/Backend/prototype/health.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.prototype.health()\n\nThe **`Backend.prototype.health()`** method returns a string representing the health of the given Backend instance.\n\n## Syntax\n\n```js\nhealth()\n```\n\n### Return value\n\nA string representing the health of the specified Backend value.\n\nPossible values are:\n- `\"healthy\"` - The backend's health check has succeeded, indicating the backend is working as expected and should receive requests.\n- `\"unhealthy\"` - The backend's health check has failed, indicating the backend is not working as expected and should not receive requests.\n- `\"unknown\"` - The backend does not have a health check configured.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/backend/Backend/prototype/hostOverride.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.hostOverride\n\nThe read-only **`hostOverride`** property of a `Backend` instance is the host header\noverride string used when sending requests to this backend.\n\n## Value\n\nA `string`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/backend/Backend/prototype/httpKeepaliveTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.httpKeepaliveTime\n\nThe read-only **`httpKeepaliveTime`** property of a `Backend` instance is the HTTP keepalive\ntime for this backend in milliseconds, or 0 if no keepalive is set.\n\n## Value\n\nA `number`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/backend/Backend/prototype/isDynamic.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.isDynamic\n\nThe read-only **`isDynamic`** property of a `Backend` instance is a boolean\nindicating if the backend was dynamically created for this service.\n\n## Value\n\nA `boolean`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/backend/Backend/prototype/isSSL.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.isSSL\n\nThe read-only **`isSSL`** property of a `Backend` instance is a boolean\nindicating if the backend is using an SSL connection.\n\n## Value\n\nA `boolean`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/backend/Backend/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# name\n\nThe read-only **`name`** property of the backend returns the backend name string.\n\n## Value\n\nA `string`.\n\n## Description\n\nProvides the name of the backend.\n\n## Examples\n\n### Using name\n\nThe following example logs the string value of a [Backend](../Backend.mdx) object:\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Backend.prototype.name Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\\\"@fastly/js-compute\\\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.name); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.name); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/backend/Backend/prototype/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.port\n\nThe read-only **`port`** property of a `Backend` instance is the port number\nof this backend.\n\n## Value\n\nA `number`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/backend/Backend/prototype/target.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.target\n\nThe read-only **`target`** property of a `Backend` instance is the host string\nthis backend is configured to use.\n\n## Value\n\nA `string`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/backend/Backend/prototype/tcpKeepalive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.tcpKeepalive\n\nThe read-only **`tcpKeepalive`** property of a `Backend` instance returns an object providing\nthe TCP keepalive configuration, if any, otherwise returning `null` if TCP keepalive is not enabled.\n\nThis object has the following properties:\n- `timeSecs` _: number or null._\n  - Configure how long to wait after the last sent data over the TCP connection before starting to send TCP keepalive probes.\n- `intervalSecs` _: number or null._\n  - Configure how long to wait between each TCP keepalive probe sent to the backend to determine if it is still active.\n- `probes` _: number or null._\n  - Number of probes to send to the backend before it is considered dead.\n\n## Value\n\nA `Object` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/backend/Backend/prototype/tlsMaxVersion.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.tlsMaxVersion\n\nThe read-only **`tlsMaxVersion`** property of a `Backend` instance is the max TLS version\nit is configured to use, as a number, either `1.0`, `1.1`, `1.2`, or `1.3`.\n\nWhen not used, or for environments that do not support this feature, such as Viceroy, `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/backend/Backend/prototype/tlsMinVersion.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.tlsMinVersion\n\nThe read-only **`tlsMinVersion`** property of a `Backend` instance is the max TLS version\nit is configured to use, as a number, either `1.0`, `1.1`, `1.2`, or `1.3`.\n\nWhen not used, or for environments that do not support this feature, such as Viceroy, `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/backend/Backend/prototype/toName.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.prototype.toName()\n\n:::info\n\nThis method is deprecated, use [`Backend.prototype.name`](./name.mdx) instead.\n\n:::\n\nThe **`toName()`** method returns the name associated with the `Backend` instance.\n\n## Syntax\n\n```js\ntoName()\n```\n\n### Return value\n\nA string which contains the name of the Backend.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/backend/Backend/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# toString\n\n:::info\n\nThis method is deprecated, use [`Backend.prototype.name`](./name.mdx) instead.\n\n:::\n\nThe **`toString()`** method returns a string representing the specified Backend value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified Backend value.\n\n## Description\n\nThe [Backend](../Backend.mdx) object overrides the `toString()` method of [Object](../../../globals//Object/Object.mdx); it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For [Backend](../Backend.mdx) values, the `toString` method returns the name given to the [Backend](../Backend.mdx) object during construction.\n\nThe `toString()` method requires its `this` value to be a [Backend](../Backend.mdx) object.\n\nIf the `this` value does not inherit from `Backend.prototype`, a [TypeError](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n## Examples\n\n### Using toString()\n\nThe following example logs the string value of a [Backend](../Backend.mdx) object:\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Backend.prototype.toString Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\\\"@fastly/js-compute\\\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.toString()); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.toString()); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/backend/allowDynamicBackends.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# allowDynamicBackends\n\n:::info\n\nThis method is deprecated, and dynamic backends are now always supported when enabled at the service level. See [`enforceExplicitBackends`](./enforceExplicitBackends.mdx) instead.\n\n:::\n\nThe **`allowDynamicBackends()`** function is used to control whether or not Dynamic Backends should be allowed within this Fastly Compute Service.\n\nBy default, Dynamic Backends are enabled, but can be a potential security concern since third-party JavaScript code may send arbitrary requests, potentially including sensitive/secret data, off to destinations that the JavaScript project was not intending.\n\nUsing `allowDynamicBackends(false)` this security property can be restored to only use explicit backend definitions.\n\n>**Note**: By default, while dynamic backends are allowed in the SDK, they are by default disabled at the Fastly service level.\n\n## Syntax\n\n```js\nallowDynamicBackends(enabledOrConfig)\n```\n\n### Parameters\n\n- `enabled` _: boolean_\n  - Whether or not to allow Dynamic Backends\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/backend/enforceExplicitBackends.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# enforceExplicitBackends\n\nCall this function to enforce the security property of explicitly-defined backends, even when dynamic backends are enabled at\nthe Fastly service level.\n\nBy default, if dynamic backends are supported for the Fastly service, they will be automatically used when creating a new\n`fetch()` request. This default behaviour for dynamic backends can be a potential security concern since third-party JavaScript\ncode may send arbitrary requests, including sensitive/secret data, off to destinations that the JavaScript project was not\nintending.\n\nWhen calling this function, an optional default backend name can be provided.\n\n>**Note**: This is a separate option to the service-level dynamic backend support for Fastly services, which is by deault disabled for Fastly services.\n\nThe **`enforceExplicitBackends()`** function is used to control whether or not Dynamic Backends should be allowed within this Fastly Compute Service.\n\nBy default, Dynamic Backends are enabled, but can be a potential security concern since third-party JavaScript code may send arbitrary requests, potentially including sensitive/secret data, off to destinations that the JavaScript project was not intending.\n\nUsing `allowDynamicBackends(false)` this security property can be restored to only use explicit backend definitions.\n\n>**Note**: Dynamic Backends are disabled by default for Fastly Services. Please contact [Fastly Support](https://support.fastly.com/hc/requests/new?ticket_form_id=360000269711) to request the feature be enabled or disabled on Fastly Services.\n\n## Syntax\n\n```js\nenforceExplicitBackends(defaultBackend?)\n```\n\n### Parameters\n\n- `defaultBackend` _: string_ _**optional**_\n  - An optional default backend string name to use in `fetch()` requests.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/backend/setDefaultDynamicBackendConfig.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# setDefaultDynamicBackendConfig()\n\nThe **`setDefaultDynamicBackendConfig()`** allows setting backend configuration defaults that should apply to any newly created dynamic backends via the `new Backend()` constructor.\n\n### Parameters\n\n- `defaultDynamicBackendConfig`\n\n  - : An Object which contains the generic configuration options to apply to newly created Backends.\n    - `connectTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for a connection to this backend to be established.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `firstByteTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `betweenBytesTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend.\n      - If exceeded, the response received so far will be considered complete and the fetch will end.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `useSSL` _: boolean_ _**optional**_\n      - Whether or not to require TLS for connections to this backend.\n    - `dontPool` _: boolean_ _**optional**_\n      - Determine whether or not connections to the same backend should be pooled across different sessions.\n      - Fastly considers two backends “the same” if they're registered with the same name and the exact same settings.\n      - In those cases, when pooling is enabled, if Session 1 opens a connection to this backend it will be left open, and can be re-used by Session 2.\n      - This can help improve backend latency, by removing the need for the initial network / TLS handshake(s).\n      - By default, pooling is enabled for dynamic backends.\n    - `tlsMinVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Minimum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `tlsMaxVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Maximum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `certificateHostname` _: string_ _**optional**_\n      - Define the hostname that the server certificate should declare.\n      - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `caCertificate` _: string_ _**optional**_\n      - The CA certificate to use when checking the validity of the backend.\n      - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `ciphers` _: string_ _**optional**_\n      - List of OpenSSL ciphers to support for connections to this origin.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - [List of ciphers supported by Fastly](https://developer.fastly.com/learning/concepts/routing-traffic-to-fastly/#use-a-tls-configuration).\n      - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `clientCertificate` _: object_ _**optional**_\n      - The client certificate to provide for the TLS handshake\n      - `certificate` _: string_\n        - The PEM certificate string.\n      - `key` _: SecretStoreEntry_\n        - The `SecretStoreEntry` to use for the key, created via [`SecretStore.prototype.get`](../fastly:secret-store/SecretStore/prototype/get.mdx) or alteratively via [`SecretStore.fromBytes`](../fastly:secret-store/SecretStore/fromBytes.mdx).\n    - `httpKeepalive` _: number_ _**optional**_\n      - Enable HTTP keepalive, setting the timout in milliseconds.\n    - `tcpKeepalive` _: boolean | object_ _**optional**_\n      - Enable TCP keepalive. When an object, optionally setting the keepalive configuration options.\n      - `timeSecs` _: number_ _**optional**_\n        - Configure how long to wait after the last sent data over the TCP connection before starting to send TCP keepalive probes.\n      - `intervalSecs` _: number_ _**optional**_\n        - Configure how long to wait between each TCP keepalive probe sent to the backend to determine if it is still active.\n      - `probes` _: number_ _**optional**_\n        - Number of probes to send to the backend before it is considered dead.\n\n## Syntax\n\n```js\nsetDefaultDynamicBackendConfig(defaultConfig)\n```\n\n### Return value\n\nNone.\n\n## Examples\n\nIn this example an explicit Dynamic Backend is created and supplied to the fetch request, with timeouts and TLS options provided from the default backend configuration options.\n\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Explicit Dynamic Backend Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nimport { Backend, setDefaultDynamicBackendConfig } from \"fastly:backend\";\nallowDynamicBackends(true);\nsetDefaultDynamicBackendConfig({\n  connectTimeout: 1000,\n  firstByteTimeout: 15_000,\n  betweenBytesTimeout: 10_000,\n  useSSL: true,\n  sslMinVersion: 1.3,\n  sslMaxVersion: 1.3\n});\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  // Timeouts and TLS configuration still get set from the default backend configuration above.\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\"\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nimport { Backend } from \"fastly:backend\";\nallowDynamicBackends(true);\nsetDefaultDynamicBackendConfig({\n  connectTimeout: 1000,\n  firstByteTimeout: 15_000,\n  betweenBytesTimeout: 10_000,\n  useSSL: true,\n  sslMinVersion: 1.3,\n  sslMaxVersion: 1.3\n});\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\"\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/cache/CacheEntry/age.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.age\n\nThe **`age`** method of the `CacheEntry` interface returns the current age in milliseconds of the cached item.\n\n## Syntax\n\n```js\nage()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the current age in milliseconds of the cached item."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/cache/CacheEntry/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.body\n\nThe **`body`** method of the `CacheEntry` interface retrieves the cached item contents as a `ReadableStream`.\n\nOnly one stream can be active at a time for a given `CacheEntry`. An error will be thrown if a stream is already active for this `CacheEntry`.\n\n## Syntax\n\n```js\nbody(options)\n```\n\n### Parameters\n\n- `options` _: object_ __optional__\n  - `start` _: number_\n    - The offset from which to start the range.\n  - `end` _: number_\n    - How long the range should be.\n\n### Return value\n\nA `ReadableStream` which contains the cached item contents."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/cache/CacheEntry/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.close\n\nThe **`close`** method of the `CacheEntry` interface closes the connection to the cache for this `CacheEntry`.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/cache/CacheEntry/hits.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.hits\n\nThe **`hits`** method of the `CacheEntry` interface returns the amount of cache hits for the cached item.\n\nNote: this hit count only reflects the view of the server that supplied the cached item. Due to clustering, this count may vary between potentially many servers within the data center where the item is cached. See the [clustering documentation](https://developer.fastly.com/learning/vcl/clustering/) for details, though note that the exact caching architecture of Compute is different from VCL services.\n\n## Syntax\n\n```js\nhits()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the number of cache hits to this cached item.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/cache/CacheEntry/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.length\n\nThe **`length`** method of the `CacheEntry` interface returns the size in bytes of the cached item, if known, otherwise returns `null` if the length is currently unknown.\n\nThe length of the cached item may be unknown if the item is currently being streamed into the cache without a fixed length.\n\n## Syntax\n\n```js\nlength()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` or `null` which represents the current length of the cached item.\n\n`null` is returned if the length is currently unknown."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/cache/CacheEntry/maxAge.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.maxAge\n\nThe **`maxAge`** method of the `CacheEntry` interface returns the time in milliseconds for which the cached item is considered fresh.\n\n## Syntax\n\n```js\nmaxAge()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the time in milliseconds for which the cached item is considered fresh."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/cache/CacheEntry/staleWhileRevalidate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.staleWhileRevalidate\n\nThe **`staleWhileRevalidate`** method of the `CacheEntry` interface returns the time in milliseconds for which a cached item can safely be used despite being considered stale.\n\n## Syntax\n\n```js\nstaleWhileRevalidate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the time in milliseconds for which a cached item can safely be used despite being considered stale."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/cache/CacheEntry/state.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.state\n\nThe **`state`** method of the `CacheEntry` interface returns a `CacheState` instance which reflects the current state of this `CacheEntry` instance.\n\n## Syntax\n\n```js\nstate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `CacheState` instance which reflects the current state of this `CacheEntry` instance."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/cache/CacheEntry/userMetadata.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.userMetadata\n\nThe **`userMetadata`** method of the `CacheEntry` interface returns the user-controlled metadata associated with the cached item.\n\n## Syntax\n\n```js\nuserMetadata()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nAn `ArrayBuffer` which contains the user-controlled metadata associated with the cached item."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/cache/CacheState/found.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheState.found\n\nThe **`found`** method of the `CacheState` interface returns `true` if a cached item was located.\n\nEven if an cached item is found, the cached item might be stale and require updating. Use `mustInsertOrUpdate()` to determine whether this transaction client is expected to update the cached item.\n\n## Syntax\n\n```js\nfound()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `boolean` which represents whether a cached item was located or not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/cache/CacheState/mustInsertOrUpdate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheState.mustInsertOrUpdate\n\nThe **`mustInsertOrUpdate`** method of the `CacheState` interface returns `true` if a fresh cache item was not found, and this transaction client is expected to insert a new item or update a stale item.\n\n\n## Syntax\n\n```js\nmustInsertOrUpdate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `boolean` which represents whether a fresh cached item was found not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/cache/CacheState/stale.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheState.stale\n\nThe **`stale`** method of the `CacheState` interface returns `true` if the cached item is stale.\n\nA cached item is stale if its age is greater than its `maxAge` period.\n\n## Syntax\n\n```js\nstale()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `boolean` which represents whether the cached item is stale or not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/cache/CacheState/usable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheState.usable\n\nThe **`usable`** method of the `CacheState` interface returns `true` if the cached item is usable.\n\nA cached item is usable if its age is less than the sum of the `maxAge` and `staleWhileRevalidate` periods.\n\n## Syntax\n\n```js\nusable()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `boolean` which represents whether a cached item is usable or not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/cache/CoreCache/insert.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CoreCache.insert\n\nPerforms a non-transactional insertion into the cache, returning a `FastlyBody` instance for providing the cached object itself.\nFor the insertion to complete successfully, the object must be written into the returned `FastlyBody` instance, and then `FastlyBody.protoype.close` must be called.\nIf `FastlyBody.prototype.close` does not get called, the insertion is considered incomplete, and any concurrent lookups that may be reading from the object as it is streamed into the cache may encounter a streaming error.\n\nNote: Like `CoreCache.lookup()`, `CoreCache.insert()` may race with concurrent lookups or insertions, and will unconditionally overwrite existing cached items rather than allowing for revalidation of an existing object.\nThe transactional equivalent of this function is `TransactionCacheEntry.insert()`, which may only be called following a `CoreCache.transactionLookup()` call and the returned `CacheEntry` when has a state where `CacheState.mustInsertOrUpdate()` returns true.\n\n## Syntax\n\n```js\ninsert(key, options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - A cache key which is a string with a length of up to 8,135 that identify a cached item.\n  - The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n- `options` _: object_\n  - `headers` _: HeadersInit_ __optional__\n    - The headers act as additional factors in object selection, and the choice of which headers to factor in is determined during insertion, via the `vary` property within `TransactionInsertOptions`.\n    - A lookup will succeed when there is at least one cached item that matches lookup’s `key`, and all of the lookup’s headers included in the cache items’ `vary` list match the corresponding headers in that cached item.\n    - A typical example is a cached HTTP response, where the request had an \"Accept-Encoding\" header. In that case, the origin server may or may not decide on a given encoding, and whether that same response is suitable for a request with a different (or missing) Accept-Encoding header is determined by whether Accept-Encoding is listed in Vary header in the origin’s response.\n    - Note: These headers are narrowly useful for implementing cache lookups incorporating the semantics of the HTTP Vary header.\n  - `maxAge` _: number_ __optional__\n    - Sets the “time to live” for the cache item in milliseconds: The time for which the item will be considered fresh.\n  - `vary` _: array_ __optional__\n    - Sets the list of headers that must match when looking up this cached item.\n  - `initialAge` _: number_ __optional__\n    - Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n    - The initial age is 0 by default.\n  - `staleWhileRevalidate` _: number_ __optional__\n    - Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n    - Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n    - The methods `CacheState.protoype.usable` and `CacheState.protoype.stale` can be used to determine the current state of an item.\n    - The stale-while-revalidate period is 0 by default.\n  - `surrogateKeys` _: array_ __optional__\n    - Sets the surrogate keys that can be used for purging this cached item.\n    - Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item’s TTL to elapse, or overwriting the item with insert().\n    - Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n    - [See the Fastly surrogate keys guide for details.](https://docs.fastly.com/en/guides/working-with-surrogate-keys)\n  - `length` _: number_ __optional__\n    - Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n    - It is preferable to provide a length, if possible.\n    - Clients that begin streaming the item’s contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n  - `userMetadata` _: ArrayBufferView | ArrayBuffer | URLSearchParams | string_ __optional__\n    - Sets the user-defined metadata to associate with the cached item.\n  - `sensitive` _: boolean_ __optional__\n    - Enable or disable PCI/HIPAA-compliant non-volatile caching.\n    - By default, this is false.\n    - [See the Fastly PCI-Compliant Caching and Delivery documentation for details.](https://docs.fastly.com/products/pci-compliant-caching-and-delivery)\n\n### Return value\n\nReturns a `FastlyBody`.\n\n### Exceptions\n\n- If the provided `key`:\n  - Cannot be coerced to a string\n  - Is an empty string\n  - Is longer than 8135 characters\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/cache/CoreCache/lookup.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# CoreCache.lookup\n\nPerform a non-transactional lookup into the cache, returning a CacheEntry if a usable cached item was found.\nA cached item is usable if its age is less than the sum of its TTL and its stale-while-revalidate period. Items beyond that age are unusably stale.\n\nNote: A non-transactional lookup will not attempt to coordinate with any concurrent cache lookups.\nIf two instances of the service perform a lookup at the same time for the same cache key, and the item is not yet cached, they will both return `null`.\nWithout further coordination, they may both end up performing the work needed to insert() the item (which usually involves origin requests and/or computation) and racing with each other to insert.\nTo resolve such races between concurrent lookups, use `CoreCache.transactionLookup()` instead.\n\n## Syntax\n\n```js\nlookup(key, options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - A cache key which is a string with a length of up to 8,135 that identify a cached item.\n  - The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n\n- `options` _: object_\n  - `headers` _: HeadersInit_ __optional__\n    - The headers act as additional factors in object selection, and the choice of which headers to factor in is determined during insertion, via the `vary` property within `TransactionInsertOptions`.\n    - A lookup will succeed when there is at least one cached item that matches lookup’s `key`, and all of the lookup’s headers included in the cache items’ `vary` list match the corresponding headers in that cached item.\n    - A typical example is a cached HTTP response, where the request had an \"Accept-Encoding\" header. In that case, the origin server may or may not decide on a given encoding, and whether that same response is suitable for a request with a different (or missing) Accept-Encoding header is determined by whether Accept-Encoding is listed in Vary header in the origin’s response.\n    - Note: These headers are narrowly useful for implementing cache lookups incorporating the semantics of the HTTP Vary header.\n\n### Return value\n\nReturns `CacheEntry` if a usable cached item was found, otherwise returns `null`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/cache/CoreCache/transactionLookup.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# CoreCache.transactionLookup\n\nPerform a transactional lookup into the cache, returning a `TransactionCacheEntry` instance.\n\nTransactions coordinate between concurrent actions on the same cache key, incorporating concepts of [request collapsing](https://developer.fastly.com/learning/concepts/request-collapsing/) and [revalidation](https://developer.fastly.com/learning/concepts/stale/), though at a lower level that does not automatically interpret HTTP semantics.\n\nRequest Collapsing:\nIf there are multiple concurrent calls to `CoreCache.transactionLookup()` for the same item and that item is not present,\njust one of the callers will be instructed to insert the item into the cache as part of the transaction.\nThe other callers will block until the metadata for the item has been inserted, and can then begin streaming its contents out of the cache at the same time that the inserting caller streams them into the cache.\n\nRevalidation:\nSimilarly, if an item is usable but stale, and multiple callers attempt a `CoreCache.transactionLookup()` concurrently, they will all be given access to the stale item, but only one will be designated to perform an asynchronous update (or insertion) to freshen the item in the cache.\n\n## Syntax\n\n```js\ntransactionLookup(key, options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - A cache key which is a string with a length of up to 8,135 that identify a cached item.\n  - The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n\n- `options` _: object_\n  - `headers` _: HeadersInit_ __optional__\n    - The headers act as additional factors in object selection, and the choice of which headers to factor in is determined during insertion, via the `vary` property within `TransactionInsertOptions`.\n    - A lookup will succeed when there is at least one cached item that matches lookup’s `key`, and all of the lookup’s headers included in the cache items’ `vary` list match the corresponding headers in that cached item.\n    - A typical example is a cached HTTP response, where the request had an \"Accept-Encoding\" header. In that case, the origin server may or may not decide on a given encoding, and whether that same response is suitable for a request with a different (or missing) Accept-Encoding header is determined by whether Accept-Encoding is listed in Vary header in the origin’s response.\n    - Note: These headers are narrowly useful for implementing cache lookups incorporating the semantics of the HTTP Vary header.\n\n### Return value\n\nReturns an instance of `TransactionCacheEntry`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/cache/SimpleCache/SimpleCache.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `SimpleCache`\n\nThe **`SimpleCache` class** provides a simplified interface to inserting and retrieving entries from Fastly's Cache.\n\nAll the methods on the class are static methods, there are no instance methods.\n\n\n## Examples\n\nIn this example we attempt to retrieve an entry from the Fastly Cache, if the entry does not exist, we create the content and insert it into the Fastly Cache before finally returning.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const path = new URL(event.request.url).pathname;\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/cache/SimpleCache/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCache.get\n\n▸ **get**(): `string`\n\nGets the entry associated with the key `key` from the cache.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the cache.\n\n### Return value\n\nIf the key does not exist in the cache, this returns `null`.\n\nIf the key does exist in the cache, this returns a `SimpleCacheEntry`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n## Examples\n\nIn this example we attempt to retrieve an entry from the Fastly Cache, and return a message stating whether the entry was in the Fastly Cache or not.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const path = new URL(event.request.url).pathname;\n  let page = SimpleCache.get(path);\n  return new Response(page ? `${path} is in the cache` : `${path} is not in the cache`, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/cache/SimpleCache/getOrSet.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCache.getOrSet\n\nThe **`getOrSet()`** method attempts to get an entry from the cache for the supplied `key`. If no entry is found (or has expired), the supplied `set` function is executed and its result is inserted into the cache under the supplied `key` and for the supplied `ttl` (Time-To-Live) duration, provided in seconds.\n\n## Syntax\n\n```js\ngetOrSet(key, set)\ngetOrSet(key, set, length)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to lookup and/or store the supplied entry under within the cache.\n- `set` _:  Function_\n  - The function to execute if and only if the cache does not have a usable entry for the supplied `key`.\n    The function should return a Promise which resolves with the following interface:\n    - `value` _:  ArrayBuffer | TypedArray | DataView | ReadableStream | URLSearchParams | String | string literal_\n      - The value to store within the cache.\n    - `ttl` _: number_\n      - The maximum number of seconds to store the supplied entry in the cache.\n    - `length` _: number_ __optional__\n      - The length of the value being stored within the cache. This is only used when the `value` is a `ReadableStream`.\n\n### Return value\n\nReturns a `SimpleCacheEntry`.\n\n### Exceptions\n\n- If the provided `key`:\n  - Cannot be coerced to a string\n  - Is an empty string\n  - Is longer than 8135 characters\n- If the provided `ttl`:\n  - Cannot be coerced to a number\n  - Is a negative number\n  - Is `NaN`\n  - Is Inifinity\n\n## Examples\n\nIn this example we attempt to retrieve an entry from the Fastly Cache. If the entry does not exist, we create the content and insert it into the Fastly Cache before finally returning.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const path = new URL(event.request.url).pathname;\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/cache/SimpleCache/purge.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# SimpleCache.purge\n\npurge the entry associated with the key `key` from the cache.\n\n## Syntax\n\n```js\npurge(key, options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to purge from within the cache.\n\n- `options` _: object_\n  - `scope` _: string_\n    - : Where to purge the content from.\n    - Possible values are:\n      - \"global\" - This will remove the content from all of Fastly.\n      - \"pop\" - This will remove the content from the POP that contains the currently executing instance.\n\n### Return value\n\nReturns `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n## Examples\n\nIn this example, when a request contains a `purge` querystring parameter, we purge the an entry from the cache.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const url = new URL(event.request.url);\n  const path = url.pathname;\n  if (url.searchParams.has('purge')) {\n    SimpleCache.purge(path, { scope: \"global\" });\n    return new Response(page, { status: 204 });\n  }\n\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/cache/SimpleCacheEntry/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the `SimpleCacheEntry` interface\ntakes the instance's stream and reads it to completion. It returns a promise\nthat resolves with an `ArrayBuffer`.\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an `ArrayBuffer`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/cache/SimpleCacheEntry/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.body\n\nThe **`body`** read-only property of the `SimpleCacheEntry` interface is a `ReadableStream` of the instance's contents.\n\n## Value\n\nA `ReadableStream`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/cache/SimpleCacheEntry/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.bodyUsed\n\nThe **`bodyUsed`** read-only property of the `SimpleCacheEntry` interface is a boolean value that indicates whether the body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/cache/SimpleCacheEntry/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.json()\n\nThe **`json()`** method of the `SimpleCacheEntry` interface takes\na `SimpleCacheEntry` stream and reads it to completion. It returns a promise which\nresolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a JavaScript object. This object could be\nanything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/cache/SimpleCacheEntry/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.text()\n\nThe **`text()`** method of the `SimpleCacheEntry` interface takes the instance's stream and reads it to completion.\nIt returns a promise that resolves with a `String`.\nThe result is _always_ decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Promise that resolves with a `String`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/cache/TransactionCacheEntry/age.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.age\n\nThe **`age`** method of the `TransactionCacheEntry` interface returns the current age in milliseconds of the cached item.\n\n## Syntax\n\n```js\nage()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the current age in milliseconds of the cached item."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/cache/TransactionCacheEntry/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.body\n\nThe **`body`** method of the `TransactionCacheEntry` interface retrieves the cached item contents as a `ReadableStream`.\n\nOnly one stream can be active at a time for a given `TransactionCacheEntry`. An error will be thrown if a stream is already active for this `TransactionCacheEntry`.\n\n## Syntax\n\n```js\nbody(options)\n```\n\n### Parameters\n\n- `options` _: object_ __optional__\n  - `start` _: number_\n    - The offset from which to start the range.\n  - `end` _: number_\n    - How long the range should be.\n\n### Return value\n\nA `ReadableStream` which contains the cached item contents."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/cache/TransactionCacheEntry/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.cancel\n\nThe **`cancel`** method of the `TransactionCacheEntry` interface cancels an obligation to provide an object to the cache.\n\n\n## Syntax\n\n```js\ncancel()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/cache/TransactionCacheEntry/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.close\n\nThe **`close`** method of the `TransactionCacheEntry` interface closes the connection to the cache for this `TransactionCacheEntry`.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/cache/TransactionCacheEntry/hits.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.hits\n\nThe **`hits`** method of the `TransactionCacheEntry` interface returns the amount of cache hits for the cached item.\n\nNote: this hit count only reflects the view of the server that supplied the cached item. Due to clustering, this count may vary between potentially many servers within the data center where the item is cached. See the [clustering documentation](https://developer.fastly.com/learning/vcl/clustering/) for details, though note that the exact caching architecture of Compute is different from VCL services.\n\n## Syntax\n\n```js\nhits()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the number of cache hits to this cached item.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/cache/TransactionCacheEntry/insert.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.insert\n\nPerform a transactional cache insertion, returning a `FastlyBody` instance for providing the cached object itself.\n\nThis method should only be called when `TransactionCacheEntry.state().mustInsertOrUpdate()` is true; otherwise, an error will be thrown when attempting to perform the insertion.\n\n## Syntax\n\n```js\ninsert(options)\n```\n\n### Parameters\n\n- `options` _: object_\n  - `maxAge` _: number_ __optional__\n    - Sets the “time to live” for the cache item in milliseconds: The time for which the item will be considered fresh.\n  - `vary` _: array_ __optional__\n    - Sets the list of headers that must match when looking up this cached item.\n  - `initialAge` _: number_ __optional__\n    - Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n    - The initial age is 0 by default.\n  - `staleWhileRevalidate` _: number_ __optional__\n    - Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n    - Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n    - The methods `CacheState.protoype.usable` and `CacheState.protoype.stale` can be used to determine the current state of an item.\n    - The stale-while-revalidate period is 0 by default.\n  - `surrogateKeys` _: array_ __optional__\n    - Sets the surrogate keys that can be used for purging this cached item.\n    - Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item’s TTL to elapse, or overwriting the item with insert().\n    - Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n    - [See the Fastly surrogate keys guide for details.](https://docs.fastly.com/en/guides/working-with-surrogate-keys)\n  - `length` _: number_ __optional__\n    - Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n    - It is preferable to provide a length, if possible.\n    - Clients that begin streaming the item's contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n  - `userMetadata` _: ArrayBufferView | ArrayBuffer | URLSearchParams | string_ __optional__\n    - Sets the user-defined metadata to associate with the cached item.\n  - `sensitive` _: boolean_ __optional__\n    - Enable or disable PCI/HIPAA-compliant non-volatile caching.\n    - By default, this is false.\n    - [See the Fastly PCI-Compliant Caching and Delivery documentation for details.](https://docs.fastly.com/products/pci-compliant-caching-and-delivery)\n\n### Return value\n\nReturns a `FastlyBody`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/cache/TransactionCacheEntry/insertAndStreamBack.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.insertAndStreamBack\n\nPerform a transaction cache insertion, returning a `FastlyBody` instance for providing the cached object itself, and a `CacheEntry` instance which can be used to stream out the newly-inserted cache item.\n\nFor the insertion to complete successfully, the object must be written into the returned `FastlyBody` instance, and then `FastlyBody.protoype.close` must be called.\nIf `FastlyBody.prototype.close` does not get called, the insertion is considered incomplete, and any concurrent lookups that may be reading from the object as it is streamed into the cache may encounter a streaming error.\n\n## Syntax\n\n```js\ninsertAndStreamBack(options)\n```\n\n### Parameters\n\n- `options` _: object_\n  - `maxAge` _: number_ __optional__\n    - Sets the “time to live” for the cache item in milliseconds: The time for which the item will be considered fresh.\n  - `vary` _: array_ __optional__\n    - Sets the list of headers that must match when looking up this cached item.\n  - `initialAge` _: number_ __optional__\n    - Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n    - The initial age is 0 by default.\n  - `staleWhileRevalidate` _: number_ __optional__\n    - Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n    - Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n    - The methods `CacheState.protoype.usable` and `CacheState.protoype.stale` can be used to determine the current state of an item.\n    - The stale-while-revalidate period is 0 by default.\n  - `surrogateKeys` _: array_ __optional__\n    - Sets the surrogate keys that can be used for purging this cached item.\n    - Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item’s TTL to elapse, or overwriting the item with insert().\n    - Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n    - [See the Fastly surrogate keys guide for details.](https://docs.fastly.com/en/guides/working-with-surrogate-keys)\n  - `length` _: number_ __optional__\n    - Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n    - It is preferable to provide a length, if possible.\n    - Clients that begin streaming the item's contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n  - `userMetadata` _: ArrayBufferView | ArrayBuffer | URLSearchParams | string_ __optional__\n    - Sets the user-defined metadata to associate with the cached item.\n  - `sensitive` _: boolean_ __optional__\n    - Enable or disable PCI/HIPAA-compliant non-volatile caching.\n    - By default, this is false.\n    - [See the Fastly PCI-Compliant Caching and Delivery documentation for details.](https://docs.fastly.com/products/pci-compliant-caching-and-delivery)\n\n### Return value\n\nReturns an array where the first item is a `FastlyBody` instance and the second item is a `CacheEntry` instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/cache/TransactionCacheEntry/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.length\n\nThe **`length`** method of the `TransactionCacheEntry` interface returns the size in bytes of the cached item, if known, otherwise returns `null` if the length is currently unknown.\n\nThe length of the cached item may be unknown if the item is currently being streamed into the cache without a fixed length.\n\n## Syntax\n\n```js\nlength()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` or `null` which represents the current length of the cached item.\n\n`null` is returned if the length is currently unknown."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/cache/TransactionCacheEntry/maxAge.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.maxAge\n\nThe **`maxAge`** method of the `TransactionCacheEntry` interface returns the time in milliseconds for which the cached item is considered fresh.\n\n## Syntax\n\n```js\nmaxAge()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the time in milliseconds for which the cached item is considered fresh."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/cache/TransactionCacheEntry/staleWhileRevalidate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.staleWhileRevalidate\n\nThe **`staleWhileRevalidate`** method of the `TransactionCacheEntry` interface returns the time in milliseconds for which a cached item can safely be used despite being considered stale.\n\n## Syntax\n\n```js\nstaleWhileRevalidate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the time in milliseconds for which a cached item can safely be used despite being considered stale."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/cache/TransactionCacheEntry/state.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.state\n\nThe **`state`** method of the `TransactionCacheEntry` interface returns a `CacheState` instance which reflects the current state of this `TransactionCacheEntry` instance.\n\n## Syntax\n\n```js\nstate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `CacheState` instance which reflects the current state of this `TransactionCacheEntry` instance."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/cache/TransactionCacheEntry/update.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.update\n\nPerform an update of the cache item's metadata.\n\n## Syntax\n\n```js\nupdate(options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - A cache key which is a string with a length of up to 8,135 that identify a cached item.\n  - The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n- `options` _: object_\n  - `maxAge` _: number_ __optional__\n    - Sets the “time to live” for the cache item in milliseconds: The time for which the item will be considered fresh.\n  - `vary` _: array_ __optional__\n    - Sets the list of headers that must match when looking up this cached item.\n  - `initialAge` _: number_ __optional__\n    - Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n    - The initial age is 0 by default.\n  - `staleWhileRevalidate` _: number_ __optional__\n    - Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n    - Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n    - The methods `CacheState.protoype.usable` and `CacheState.protoype.stale` can be used to determine the current state of an item.\n    - The stale-while-revalidate period is 0 by default.\n  - `surrogateKeys` _: array_ __optional__\n    - Sets the surrogate keys that can be used for purging this cached item.\n    - Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item’s TTL to elapse, or overwriting the item with insert().\n    - Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n    - [See the Fastly surrogate keys guide for details.](https://docs.fastly.com/en/guides/working-with-surrogate-keys)\n  - `length` _: number_ __optional__\n    - Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n    - It is preferable to provide a length, if possible.\n    - Clients that begin streaming the item's contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n  - `userMetadata` _: ArrayBufferView | ArrayBuffer | URLSearchParams | string_ __optional__\n    - Sets the user-defined metadata to associate with the cached item.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/cache/TransactionCacheEntry/userMetadata.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.userMetadata\n\nThe **`userMetadata`** method of the `TransactionCacheEntry` interface returns the user-controlled metadata associated with the cached item.\n\n## Syntax\n\n```js\nuserMetadata()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nAn `ArrayBuffer` which contains the user-controlled metadata associated with the cached item."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/cache-override/CacheOverride/CacheOverride.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `CacheOverride()`\n\nThe **`CacheOverride` constructor** lets you configure the caching behavior of a `Response`.\n\nNormally, the HTTP Headers on a [`Response`](../../globals/Response/Response.mdx) would control how the [`Response`](../../globals/Response/Response.mdx) is cached,\nbut `CacheOverride` can be set on a [`Request`](../../globals/Request/Request.mdx), to define custom caching behavior.\n\n## Syntax\n\n```js\nnew CacheOverride(mode)\nnew CacheOverride(mode, init)\nnew CacheOverride(init)\n```\n\n> **Note:** `CacheOverride()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `mode` _: string_\n  - Sets the cache override mode for a request\n  - If set to:\n    - `\"none\"`: Do not override the behavior specified in the origin response’s cache control headers.\n    - `\"pass\"`: Do not cache the response to this request, regardless of the origin response’s headers.\n    - `\"override\"`: Override particular cache control settings using the `CacheOverride` object's settings.\n       This options is also the default when providing an init object directly as the first argument.\n\n- `init`\n\n  - : An Object which contains all the configuration options to apply to the newly created `CacheOverride`.\n\n    - `pci` _: boolean_ _**optional**_\n      - Override the caching behavior of this request to enable or disable PCI/HIPAA-compliant non-volatile caching.\n      - By default, this is `false`, which means the request may not be PCI/HIPAA-compliant. Set it to `true` to enable compliant caching.\n      - See the [Fastly PCI-Compliant Caching and Delivery documentation](https://docs.fastly.com/products/pci-compliant-caching-and-delivery) for details.\n\n    - `surrogateKey` _: string_ _**optional**_\n      - Override the caching behavior of this request to include the given surrogate key, provided as a header value.\n      - See the [Fastly surrogate keys guide](https://docs.fastly.com/en/guides/purging-api-cache-with-surrogate-keys) for details.\n    - `swr` _: number_ _**optional**_\n      - Override the caching behavior of this request to use the given `stale-while-revalidate` time, in seconds\n\n    - `ttl` _: number_ _**optional**_\n      - Override the caching behavior of this request to use the given Time to Live (TTL), in seconds.\n    \n    - `beforeSend` _:Function_ _**optional**_\n      - `(request: Request) => void | PromiseLike<void>`\n      - Callback to be invoked if a request is going all the way to a backend, allowing the request to be modified beforehand.\n      - See [Modifying a request as it is forwarded to a backend](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/#modifying-a-request-as-it-is-forwarded-to-a-backend) in the Fastly cache interfaces documentation for details.\n\n    - `afterSend` _: Function_ _**optional**_\n      - `(response: Response) => void | CacheOptions | PromiseLike<void | CacheOptions>`\n      - Callback to be invoked after a response has been sent, but before it is stored into the cache.\n      - Where `CacheOptions` contains:\n        - `cache` _: boolean | 'uncacheable'_ _**optional**_\n          - Whether to cache this response. By default, leaving this field empty, responses will be cached based on their cache header information.\n          - Setting this to true or false will override this default cache behaviour, setting in the cache or not setting in the cache, even if the default behaviour would have been otherwise.\n          - Setting to 'uncacheable' the response will not only not be cached, but the cache will record that the originating request led to an uncacheable response, so that future cache lookups will result in immediately going to the backend, rather than attempting to coordinate concurrent requests to reduce backend traffic.\n          - See the [Fastly request collapsing guide](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/request-collapsing/) for more details on the mechanism that `uncacheable` disables.\n        - `bodyTransformFn` _: Function_ _**optional**_\n          - `(body: Uint8Array) => Uint8Array | PromiseLike<Uint8Array>`\n          - Provide a function to be used for transforming the response body prior to caching.\n          - Body transformations are performed by specifying a transform, rather than by directly working with the body during the onAfterSend callback function, because not every response contains a fresh body: 304 Not Modified responses, which are used to revalidate a stale cached response, are valuable precisely because they do not retransmit the body.\n          - For any other response status, the backend response will contain a relevant body, and the `bodyTransformFn` will be applied to it. The original backend body is passed in to the transform function, and the function is expected to return the new body.\n      - See [Controlling cache behavior based on backend response](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/#controlling-cache-behavior-based-on-backend-response) in the Fastly cache interfaces documentation for details.\n\n### Return value\n\nA new `CacheOverride` object.\n\n## Examples\n\nIn this example we override the cache for all the requests prefixed /static/ to have a long TTL (Time To Live),  and the home page to have a short TTL and a long SWR (Stale While Revalidate).\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"CacheOverride Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { CacheOverride } from \"fastly:cache-override\";\n// In this example we override the cache for all the requests prefixed /static/ \n// to have a long TTL (Time To Live), and the home page to have a short TTL and \n// a long SWR (Stale While Revalidate).\nasync function app (event) {\n  const path = (new URL(event.request.url)).pathname;\n  let cacheOverride;\n  if (path == '/') {\n    cacheOverride = new CacheOverride('override', {ttl: 10, swr: 86_400});\n  } else if (path.startsWith('/static/')) {\n    cacheOverride = new CacheOverride('override', {ttl: 86_400});\n  } else {\n    cacheOverride = new CacheOverride('none')\n  }\n  return fetch(event.request.url, {\n    cacheOverride,\n    backend: 'origin_0'\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { CacheOverride } from \"fastly:cache-override\";\n// In this example we override the cache for all the requests prefixed /static/ \n// to have a long TTL (Time To Live), and the home page to have a short TTL and \n// a long SWR (Stale While Revalidate).\nasync function app (event) {\n  const path = (new URL(event.request.url)).pathname;\n  let cacheOverride;\n  if (path == '/') {\n    cacheOverride = new CacheOverride('override', {ttl: 10, swr: 86_400});\n  } else if (path.startsWith('/static/')) {\n    cacheOverride = new CacheOverride('override', {ttl: 86_400});\n  } else {\n    cacheOverride = new CacheOverride('none')\n  }\n  return fetch(event.request.url, {\n    cacheOverride,\n    backend: 'origin_0'\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/compute/purgeSurrogateKey.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# purgeSurrogateKey\n\nThe **`purgeSurrogateKey()`** function is used to purge the given surrogate key string from Fastly's cache.\n\nThere are two purge modes: soft purge and hard purge, with hard purge as the default which clears all items\nfrom the cache immediately. When using a soft purge, stale entries are maintained in the cache, reducing\norgin load, while also enabling stale revalidations.\n\nSee the [Fastly Purge Documentation](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/purging/#surrogate-key-purge) for more information on caching and purge operations.\n\n## Syntax\n\n```js\npurgeSurrogateKey(surrogateKey, soft?)\n```\n\n### Parameters\n\n- `surrogateKey` _: string_\n  - The surrogate key string\n- `soft?` _: boolean_\n  - Enables a soft purge, retaining stale entries in the cache. Default is a hard purge.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/compute/vCpuTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# vCpuTime\n\nThe **`vCpuTime()`** function provides the vCPU time used by the current request handler in milliseconds.\n\n## Syntax\n\n```js\nvCpuTime()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`number`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/config-store/ConfigStore/ConfigStore.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `ConfigStore()`\n\nThe **`ConfigStore` constructor** lets you access a specific [Fastly Config Store](https://www.fastly.com/documentation/reference/api/services/resources/config-store/).\n\n> **Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew ConfigStore(name);\n```\n\n> **Note:** `ConfigStore()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Defines a config store instance using the resource link name.\n\n### Return value\n\nA new `ConfigStore` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Config Store exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name does not start with an ascii alphabetical character \n  - Thrown if the provided name does not contain only ascii alphanumeric, underscore, and whitespace characters\n\n## Examples\n\nIn this example we have a resource link named \"animals\" (which is linked to a config store) and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"ConfigStore Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/config-store/ConfigStore/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# ConfigStore.prototype.get\n\nThe **`get()`** method returns the value associated with the provided key in the config-store. If the provided key does not exist in the ConfigStore then this returns `null`.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from the dictionary.\n\n### Return value\n\nA `string` representing the specified ConfigStore value or `null` if the key does not exist in the ConfigStore\n\n## Description\n\nGet a value for a key in the config-store. If the provided key does not exist in the ConfigStore then this returns `null`.\n\nThe `get()` method requires its `this` value to be a [`ConfigStore`](../../../fastly%3Aconfig-store/ConfigStore/ConfigStore.mdx) object.\n\nIf the `this` value does not inherit from `ConfigStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided key is longer than 255 in length\n  - Thrown if the provided key is an empty string\n\n## Examples\n\nIn this example we have an Edge Dictionary named \"animals\" and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"ConfigStore Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/device/Device/lookup.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Device.lookup()\n\nLook up the data associated with a particular User-Agent string.\n\n\n## Syntax\n\n```js\nlookup(userAgent)\n```\n\n### Return value\n\nIf there is data associated with the User-Agent, a `Device` instance is returned.\nOtherwise, `null` is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/device/Device/prototype/brand.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.brand\n\nThe read-only **`brand`** property of the `Device` interface is\neither a string stating the brand of the device, which can be different from the manufacturer of that device.\nIf no brand is known, the value will be `null`.\n\n\n## Value\n\nEither a string value if a brand is known, otherwise `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/device/Device/prototype/hardwareType.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.hardwareType\n\nThe read-only **`hardwareType`** property of the `Device` interface is\neither a string stating the hardware type of the device, or `null` if the hardware type is not known.\n\nA string representation of the device's primary platform hardware. The most commonly used device types are also identified via boolean variables. Because a device may have multiple device types and this variable only has the primary type, we recommend using the boolean variables for logic and using this string representation for logging.\n\n\n\n## Value\n\nEither a string value if a hardware type is known, otherwise `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/device/Device/prototype/isBot.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isBot\n\nThe read-only **`isBot`** property of the `Device` interface is\neither a boolean stating if the device is a bot, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a bot, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/device/Device/prototype/isDesktop.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isDesktop\n\nThe read-only **`isDesktop`** property of the `Device` interface is\neither a boolean stating if the device is a desktop web browser, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a desktop web browser, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/device/Device/prototype/isGameConsole.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isGameConsole\n\nThe read-only **`isGameConsole`** property of the `Device` interface is\neither a boolean stating if the device is a video game console, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a video game console, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/device/Device/prototype/isMediaPlayer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isMediaPlayer\n\nThe read-only **`isMediaPlayer`** property of the `Device` interface is\neither a boolean stating if the device is a media player (like Blu-ray players, iPod devices, and smart speakers such as Amazon Echo), or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a media player (like Blu-ray players, iPod devices, and smart speakers such as Amazon Echo), or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/device/Device/prototype/isMobile.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isMobile\n\nThe read-only **`isMobile`** property of the `Device` interface is\neither a boolean stating if the device is a mobile phone, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a mobile phone, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/device/Device/prototype/isSmartTV.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isSmartTV\n\nThe read-only **`isSmartTV`** property of the `Device` interface is\neither a boolean stating if the device is a smart TV, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a smart TV, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/device/Device/prototype/isTablet.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isTablet\n\nThe read-only **`isTablet`** property of the `Device` interface is\neither a boolean stating if the device is a tablet (like an iPad), or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a tablet (like an iPad), or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/device/Device/prototype/isTouchscreen.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isTouchscreen\n\nThe read-only **`isTouchscreen`** property of the `Device` interface is\neither a boolean stating if the device's screen is touch sensitive, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device's screen is touch sensitive, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/device/Device/prototype/model.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.model\n\nThe read-only **`model`** property of the `Device` interface is\neither a string stating the model of the device, or `null` if the model is not known.\n\n\n## Value\n\nEither a string value if a model is known, otherwise `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/device/Device/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.name\n\nThe read-only **`name`** property of the `Device` interface is\neither a string stating the name of the device, or `null` if the name is not known.\n\n\n## Value\n\nEither a string value if a name is known, otherwise `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/device/Device/prototype/toJSON.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# toJSON\n\nThe `toJSON()` method of the Device interface is a serializer;\nit returns a JSON representation of the Device object.\n\nTo get a JSON string, you can use `JSON.stringify(device)` directly; it will call `toJSON()` automatically.\n\n## Syntax\n\n```js\ntoJSON()\n```\n\n### Return value\n\nA JSON object that is the serialization of the Device object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/dictionary/Dictionary/Dictionary.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Dictionary()`\n\n:::info\n\nThis Class is deprecated\n\n:::\n\nThe **`Dictionary` constructor** lets you access a specific [Fastly Edge Dictionary](https://docs.fastly.com/en/guides/about-edge-dictionaries).\n\n**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew Dictionary(name);\n```\n\n> **Note:** `Dictionary()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - The name of the [Fastly Edge Dictionary](https://docs.fastly.com/en/guides/about-edge-dictionaries) that this `Dictionary` instance should provide access to.\n\n### Return value\n\nA new `Dictionary` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Dictionary exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name does not start with an ascii alphabetical character \n  - Thrown if the provided name does not contain only ascii alphanumeric, underscore, and whitespace characters\n\n## Examples\n\nIn this example we have an Edge Dictionary named \"animals\" and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Dictionary Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/dictionary/Dictionary/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Dictionary.prototype.get\n\n:::info\n\nThis Class is deprecated, it has been renamed to [`ConfigStore`](../../../fastly:config-store/ConfigStore/ConfigStore.mdx) and can be imported via `import { ConfigStore } from 'fastly:config-store'`\n\nThe `get()` method exists on the [`ConfigStore`](../../../fastly:config-store/ConfigStore/ConfigStore.mdx) Class.\n\n:::\n\nThe **`get()`** method returns the value associated with the provided key in the dictionary. If the provided key does not exist in the Dictionary then this returns `null`.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from the dictionary.\n\n### Return value\n\nA `string` representing the specified Dictionary value or `null` if the key does not exist in the Dictionary\n\n## Description\n\nGet a value for a key in the dictionary. If the provided key does not exist in the Dictionary then this returns `null`.\n\nThe `get()` method requires its `this` value to be a [`Dictionary`](../Dictionary.mdx) object.\n\nIf the `this` value does not inherit from `Dictionary.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided key is longer than 255 in length\n  - Thrown if the provided key is an empty string\n\n## Examples\n\nIn this example we have an Edge Dictionary named \"animals\" and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Dictionary Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/edge-rate-limiter/EdgeRateLimiter/EdgeRateLimiter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `EdgeRateLimiter()`\n\nThe **`EdgeRateLimiter` constructor** lets you open an epen a [ERL](https://docs.fastly.com/products/edge-rate-limiting) with the given ratecounter and penaltybox.\n\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew EdgeRateLimiter(rateCounter, penaltyBox)\n```\n\n> **Note:** `EdgeRateLimiter()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `rateCounter` _: RateCounter_\n  - The RateCounter instance to associate with this EdgeRateLimiter instance\n- `penaltyBox` _: PenaltyBox_\n  - The PenaltyBox instance which should be associated with this EdgeRateLimiter instance\n\n### Return value\n\nA new `EdgeRateLimiter` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided rateCounter value is not an instance of RateCounter\n  - Thrown if the provided penaltyBox value is not an instance of PenaltyBox\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/edge-rate-limiter/EdgeRateLimiter/prototype/checkRate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# EdgeRateLimiter.prototype.checkRate\n\nIncrement an entry in the rate counter and check if the entry has exceeded some average number of requests per second (RPS) over the given window.\nIf the entry is over the RPS limit for the window, add to the penaltybox for the given `timeToLive`.\n\nValid `timeToLive` is 1 minute to 60 minutes and `timeToLive` value is truncated to the nearest minute.\n\n## Syntax\n```js\ncheckRate(entry, delta, window, limit, timeToLive)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to increment and check\n- `delta` _: number_\n  - The amount to increment the `entry` by\n- `window` _: number_\n  - The time period to check across, has to be either 1 second, 10 seconds, or 60 seconds\n- `limit` _: number_\n  - The requests-per-second limit\n- `timeToLive` _: number_\n  - In minutes, how long the entry should be added into the penalty-box\n  - Valid `timeToLive` is 1 minute to 60 minutes and `timeToLive` value is truncated to the nearest minute.\n\n\n### Return value\n\nReturns `true` if the entry has exceeded the average RPS for the window, otherwise returns `false`.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `name` value can not be coerced into a string\n  - Thrown if the provided `delta` value is not a positive finite number.\n  - Thrown if the provided `window` value is not either, 1, 10, or 60.\n  - Thrown if the provided `limit` value is not a positive finite number.\n  - Thrown if the provided `timeToLive` value is not either, a number between 1 and 60 inclusively.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/edge-rate-limiter/PenaltyBox/PenaltyBox.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `PenaltyBox()`\n\nThe **`PenaltyBox` constructor** can be used with a [Edge Rate Limiter](../EdgeRateLimiter/EdgeRateLimiter.mdx) or standalone for adding and checking if some entry is in the dataset.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew PenaltyBox(name)\n```\n\n> **Note:** `PenaltyBox()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Open a PenaltyBox with the given name\n\n\n### Return value\n\nA new `PenaltyBox` object instance.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `name` value can not be coerced into a string\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/edge-rate-limiter/PenaltyBox/prototype/add.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# PenaltyBox.prototype.add\n\nAdd an `entry` into the PenaltyBox for the duration of the given `timeToLive`.\n\n## Syntax\n```js\nadd(entry, timeToLive)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n- `timeToLive` _: number_\n  - In minutes, how long the entry should be added into the PenaltyBox\n  - Valid `timeToLive` is 1 minute to 60 minutes and `timeToLive` value is truncated to the nearest minute.\n\n\n### Return value\n\nReturns `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n  - Thrown if the provided `timeToLive` value is not either, a number between 1 and 60 inclusively.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/edge-rate-limiter/PenaltyBox/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# PenaltyBox.prototype.has\n\nCheck if the given entry is contained in in the PenaltyBox instance.\n\n## Syntax\n```js\nhas(entry)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n\n\n### Return value\n\nReturns `true` if the entry is contained in the PenaltyBox instance, otherwise returns `false`.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/edge-rate-limiter/RateCounter/RateCounter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `RateCounter()`\n\nThe **`RateCounter` constructor** can be used with a [Edge Rate Limiter](../EdgeRateLimiter/EdgeRateLimiter.mdx) or standalone for counting and rate calculations.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew RateCounter(name)\n```\n\n> **Note:** `RateCounter()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Open a RateCounter with the given name\n\n\n### Return value\n\nA new `RateCounter` object instance.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `name` value can not be coerced into a string\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/edge-rate-limiter/RateCounter/prototype/increment.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RateCounter.prototype.increment\n\nIncrement the given `entry` in the RateCounter instance with the given `delta` value.\n\n## Syntax\n```js\nincrement(entry, delta)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n- `delta` _: number_\n  - The amount to increment the entry by\n\n\n### Return value\n\nReturns `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n  - Thrown if the provided `delta` value is not a positive, finite number.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/edge-rate-limiter/RateCounter/prototype/lookupCount.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RateCounter.prototype.lookupCount\n\nLook up the current rate for the given `entry` and the given `duration`.\n\n## Syntax\n```js\nlookupCount(entry, duration)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n- `duration` _: number_\n  - The duration to lookup alongside the entry, has to be either, 10, 20, 30, 40, 50, or 60 seconds.\n\n\n### Return value\n\nReturns a number which is the count for the given `entry` and `duration` in this `RateCounter` instance.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n  - Thrown if the provided `duration` value is not either, 10, 20, 30, 40, 50 or 60.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/edge-rate-limiter/RateCounter/prototype/lookupRate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RateCounter.prototype.lookupRate\n\nLook up the current rate for the given `entry` and the given `window`.\n\n## Syntax\n```js\nlookupRate(entry, window)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n- `window` _: number_\n  - The window to look up alongside the entry, has to be either 1 second, 10 seconds, or 60 seconds\n\n\n### Return value\n\nReturns a number which is the rate for the given `entry` and `window` in this `RateCounter` instance.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n  - Thrown if the provided `window` value is not either, 1, 10, or 60.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/env/env.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# env\n\nThe **`env()`** function returns the value for the provided environment variable name.\n\nFor a list of available environment variables, see the [Fastly Developer Hub for Compute Environment Variables](https://developer.fastly.com/reference/compute/ecp-env/)\n\n>**Note**: The environment variables can only be retrieved when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nenv(name)\n```\n\n### Parameters\n\n- `name` _: string_\n  - The name of the environment variable to retrieve\n\n### Return value\n\nThe value for the requested environment variable, if no such environment variable exists then an empty string is returned.\n\n## Examples\n\nIn this example we log to stdout the environment variables [`FASTLY_HOSTNAME`](https://developer.fastly.com/reference/compute/ecp-env/fastly-hostname/) and [`FASTLY_TRACE_ID`](https://developer.fastly.com/reference/compute/ecp-env/fastly-trace-id/).\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"env Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { env } from \"fastly:env\";\nfunction app(event) {\n  console.log(\"FASTLY_HOSTNAME:\", env(\"FASTLY_HOSTNAME\"));\n  console.log(\"FASTLY_TRACE_ID:\", env(\"FASTLY_TRACE_ID\"));\n  return new Response(\"\", {\n    status: 200\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { env } from \"fastly:env\";\nfunction app(event) {\n  console.log(\"FASTLY_HOSTNAME:\", env(\"FASTLY_HOSTNAME\"));\n  console.log(\"FASTLY_TRACE_ID:\", env(\"FASTLY_TRACE_ID\"));\n  return new Response(\"\", {\n    status: 200\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/experimental/allowDynamicBackends.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# allowDynamicBackends\n\nThe **`allowDynamicBackends()`** function is used to control whether or not Dynamic Backends should be allowed within this Fastly Compute Service.\n\nBy default, Dynamic Backends are disabled within a JavaScript application as it can be a potential avenue for third-party JavaScript code to send requests, potentially including sensitive/secret data,  off to destinations that the JavaScript project was not intending, which could be a security issue.\n\n>**Note**: This feature is in disabled by default for Fastly Services. Please contact [Fastly Support](https://support.fastly.com/hc/requests/new?ticket_form_id=360000269711) to request the feature be enabled on the Fastly Services which require Dynamic Backends.\n\n## Syntax\n\n```js\nallowDynamicBackends(enabledOrConfig)\n```\n\n### Parameters\n\n- `enabledOrConfig` _: boolean_\n  - Whether or not to allow Dynamic Backends\n\nor\n\n- `enabledOrConfig` _: object_\n  - `connectTimeout` _: number_ _**optional**_\n    - Maximum duration in milliseconds to wait for a connection to this backend to be established.\n    - If exceeded, the connection is aborted and a 503 response will be presented instead.\n    - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n  - `firstByteTimeout` _: number_ _**optional**_\n    - Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent.\n    - If exceeded, the connection is aborted and a 503 response will be presented instead.\n    - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n  - `betweenBytesTimeout` _: number_ _**optional**_\n    - Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend.\n    - If exceeded, the response received so far will be considered complete and the fetch will end.\n    - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n\n### Return value\n\n`undefined`.\n\n## Examples\n\nIn this example an implicit Dynamic Backend is created when making the fetch request to https://www.fastly.com/ and the response is then returned to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Dynamic Backends Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nallowDynamicBackends(true);\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  return fetch('https://www.fastly.com/');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nallowDynamicBackends(true);\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  return fetch('https://www.fastly.com/');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/experimental/includeBytes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# includeBytes\n\nThe **`includeBytes()`** function is used embed a file as a Uint8Array.\n\n>**Note**: Can only be used during build-time initialization, not when processing requests.\n\n## Syntax\n\n```js\nincludeBytes(path)\n```\n\n### Parameters\n\n- `path` _: string_\n  - The path to include, relative to the Fastly Compute application's top-level directory during build-time initialization.\n\n### Return value\n\nReturns a `Uint8Array`\n\n## Examples\n\nIn this example we include the README.md file as a Uint8Array and use it for the body in the response we return to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { includeBytes } from \"fastly:experimental\";\nconst readme = includeBytes('README.md');\nasync function app() {\n    return new Response(readme);\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/experimental/mapAndLogError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# mapAndLogError\n\nThe **`mapAndLogError()`** function calls `mapError` on an `Error` object and sends the output to standard error. This includes the error name, message, and a call stack.\n\nIf `--enable-stack-traces` is specified during the build, the call stack will be mapped using source maps.\n\nIf `--enable-stack-traces` is specified and `--exclude-sources` is not specified during the build, then this will also include a code dump of neighboring lines of user code.\n\n## Syntax\n\n```js\nmapAndLogError(error)\n```\n\n### Parameters\n\n- `error` _: Error _ or _string_\n  - The error to retrieve information about. If a `string` is provided, then it is first converted to an `Error`.\n\n### Return value\n\n`undefined`.\n\n## Examples\n\nIn this example, build the application using the `--enable-stack-traces` flag.\n\n```js\naddEventListener('fetch', e => e.respondWith(handler(e)));\nasync function handler(event) {\n  try {\n    throw new TypeError('foo');\n  } catch (err) {\n    mapAndLogError(mapError(err));\n  }\n  return new Response('ok');\n}\n```\n\nThe following is output to the error log.\n\n```\nTypeError: foo\n  at handler (src/index.ts:4:11)\n      1 | addEventListener('fetch', e => e.respondWith(handler(e)));\n      2 | async function handler(event) {\n      3 |   try {\n>     4 |     throw new TypeError('foo');\n                    ^\n      5 |   } catch (err) {\n      6 |     mapAndLogError(mapError(err));\n      7 |   }\n  at src/index.ts:1:45\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/experimental/mapError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# mapError\n\nThe **`mapError()`** function extracts information from an `Error` object as a human-readable array of strings. This includes the error name, message, and a call stack.\n\nIf `--enable-stack-traces` is specified during the build, the call stack will be mapped using source maps.\n\nIf `--enable-stack-traces` is specified and `--exclude-sources` is not specified during the build, then this will also include a code dump of neighboring lines of user code.\n\n## Syntax\n\n```js\nmapError(error)\n```\n\n### Parameters\n\n- `error` _: Error _ or _string_\n  - The error to retrieve information about. If a `string` is provided, then it is first converted to an `Error`.\n\n### Return value\n\nReturns an array of `string`s.\n\n## Examples\n\nIn this example, build the application using the `--enable-stack-traces` flag.\n\n```js\naddEventListener('fetch', e => e.respondWith(handler(e)));\nasync function handler(event) {\n  try {\n    throw new TypeError('foo');\n  } catch (err) {\n    console.error(mapError(err));\n  }\n  return new Response('ok');\n}\n```\n\nThe following is output to the error log.\n\n```\nTypeError: foo\n  at handler (src/index.ts:4:11)\n      1 | addEventListener('fetch', e => e.respondWith(handler(e)));\n      2 | async function handler(event) {\n      3 |   try {\n>     4 |     throw new TypeError('foo');\n                    ^\n      5 |   } catch (err) {\n      6 |     console.error(mapError(err));\n      7 |   }\n  at src/index.ts:1:45\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/experimental/sdkVersion.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# sdkVersion\n\nThe read-only **`sdkVersion`** property is a string whose indicates what JavaScript SDK version is being used.\n\n## Value\n\nA string value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/fanout/createFanoutHandoff.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# createFanoutHandoff\n\nThe **`createFanoutHandoff()`** function creates a Response instance which informs Fastly to pass the original Request through Fanout, to the declared backend.\n\n## Syntax\n\n```js\ncreateFanoutHandoff(request, backend)\n```\n\n### Parameters\n\n- `request` _: Request_\n  - The request to pass through Fanout.\n- `backend` _: string_\n  - The name of the backend that Fanout should send the request to.\n  - The name has to be between 1 and 254 characters inclusive.\n  - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n\n### Return value\n\nA Response instance is returned, which can then be used via `event.respondWith`.\n\n## Examples\n\nIn this example application requests to the path `/stream` and sent handled via Fanout.\n\n```js\nimport { createFanoutHandoff } from \"fastly:fanout\";\n\nasync function handleRequest(event) {\n  try {\n    const url = new URL(event.request.url);\n    if (url.pathname === '/stream') {\n      return createFanoutHandoff(event.request, 'fanout');\n    } else {\n      return new Response('oopsie, make a request to /stream for some fanout goodies', { status: 404 });\n    }\n  } catch (error) {\n    console.error({error});\n    return new Response(error.message, {status:500})\n  }\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/geolocation/getGeolocationForIpAddress.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# getGeolocationForIpAddress\n\nThe **`getGeolocationForIpAddress()`** function is used to retrieve geolocation information about the given IP address.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\ngetGeolocationForIpAddress(address)\n```\n\n### Parameters\n\n- `address` _: string_\n  - The IPv4 or IPv6 address to query.\n\n### Return value\n\nReturns an `Object`, or `null` if no geolocation data was found.\n\nThe object contains information about the given IP address with the following properties:\n\n- `as_name`  _: string | null_\n  - The name of the organization associated with `as_number`.\n  - For example, fastly is the value given for IP addresses under AS-54113.\n\n- `as_number` _: number | null_\n  - [Autonomous system](https://en.wikipedia.org/wiki/Autonomous_system_(Internet)) (AS) number.\n\n- `area_code` _: number | null_\n  - The telephone area code associated with an IP address.\n  - These are only available for IP addresses in the United States, its territories, and Canada.\n\n- `city` _: string | null_\n  - City or town name.\n\n- `conn_speed` _: string | null_\n  - Connection speed.\n\n- `conn_type` _: string | null_\n  - Connection type.\n\n- `continent` _: string | null_\n  - Continent.\n\n- `country_code` _: string | null_\n  - A two-character [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) country code for the country associated with an IP address.\n  - The US country code is returned for IP addresses associated with overseas United States military bases.\n  - These values include subdivisions that are assigned their own country codes in ISO 3166-1. For example, subdivisions NO-21 and NO-22 are presented with the country code SJ for Svalbard and the Jan Mayen Islands.\n\n- `country_code3` _: string | null_\n  - A three-character [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) country code for the country associated with the IP address.\n  - The USA country code is returned for IP addresses associated with overseas United States military bases.\n\n- `country_name` _: string | null_\n  - Country name.\n  - This field is the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) English short name for a country.\n\n- `gmt_offset` _: string | null_\n  - Time zone offset from Greenwich Mean Time (GMT) for `city`.\n\n- `latitude` _: number | null_\n  - Latitude, in units of degrees from the equator.\n  - Values range from -90.0 to +90.0 inclusive, and are based on the [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System) coordinate reference system.\n\n- `longitude` _: number | null_\n  - Longitude, in units of degrees from the [IERS Reference Meridian](https://en.wikipedia.org/wiki/IERS_Reference_Meridian).\n  - Values range from -180.0 to +180.0 inclusive, and are based on the [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System) coordinate reference system.\n\n- `metro_code` _: number | null_\n  - Metro code, representing designated market areas (DMAs) in the United States.\n\n- `postal_code` _: string | null_\n  - The postal code associated with the IP address.\n  - These are available for some IP addresses in Australia, Canada, France, Germany, Italy, Spain, Switzerland, the United Kingdom, and the United States.\n  - For Canadian postal codes, this is the first 3 characters. For the United Kingdom, this is the first 2-4 characters (outward code). For countries with alphanumeric postal codes, this field is a lowercase transliteration.\n\n- `proxy_description` _: string | null_\n  - Client proxy description.\n\n- `proxy_type` _: string | null_\n  - Client proxy type.\n\n- `region` _: string | null_\n  - [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) country subdivision code.\n  - For countries with multiple levels of subdivision (for example, nations within the United Kingdom), this variable gives the more specific subdivision.\n  - This field can be None for countries that do not have ISO country subdivision codes. For example, None is given for IP addresses assigned to the Åland Islands (country code AX, illustrated below).\n\n- `utc_offset` _: number | null;_\n  - Time zone offset from coordinated universal time (UTC) for `city`.\n\n## Examples\n\nIn this example we return the geolocation details for the provided ip querystring parameter or for the incoming client request if the querystring parameter does not exist.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"getGeolocationForIpAddress Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { getGeolocationForIpAddress } from \"fastly:geolocation\"\nasync function app(event) {\n  try {\n    let ip = new URL(event.request.url).searchParams.get('ip') || event.client.address\n    let geo = getGeolocationForIpAddress(ip);\n    return new Response(JSON.stringify(geo), {\n      headers: {\n        \"Content-Type\": \"application/json\",\n      },\n    });\n  } catch (error) {\n    console.error(error);\n    return new Response(\"Internal Server Error\", {\n      status: 500\n    });\n  }\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { getGeolocationForIpAddress } from \"fastly:geolocation\"\nasync function app(event) {\n  try {\n    let ip = new URL(event.request.url).searchParams.get('ip') || event.client.address\n    let geo = getGeolocationForIpAddress(ip);\n    return new Response(JSON.stringify(geo), {\n      headers: {\n        \"Content-Type\": \"application/json\",\n      },\n    });\n  } catch (error) {\n    console.error(error);\n    return new Response(\"Internal Server Error\", {\n      status: 500\n    });\n  }\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/AggregrateError/AggregrateError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# AggregateError()\n\nThe **`AggregateError()`** constructor creates an error for several errors that need to be wrapped in a single error.\n\n## Syntax\n\n```js\nnew AggregateError(errors)\nnew AggregateError(errors, message)\nnew AggregateError(errors, message, options)\n\nAggregateError(errors)\nAggregateError(errors, message)\nAggregateError(errors, message, options)\n```\n\n> **Note:** `AggregateError()` can be called with or without `new`. Both create a new `AggregateError` instance.\n\n### Parameters\n\n- `errors`\n  - : An iterable of errors, may not actually be [`TypeError`](../Error/Error.mdx) instances.\n- `message` _**optional**_\n  - : An optional human-readable description of the aggregate error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Array/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array\\[Symbol.species]\n\nThe **`Array[Symbol.species]`** accessor property returns the constructor used to construct return values from array methods.\n\n> **Warning:** The existence of `[Symbol.species]` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Syntax\n\n```js\nArray[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get [Symbol.species]` was called. The return value is used to construct return values from array methods that create new arrays.\n\n## Description\n\nThe `[Symbol.species]` accessor property returns the default constructor for `Array` objects. Subclass constructors may override it to change the constructor assignment. The default implementation is basically:\n\n```js\n// Hypothetical underlying implementation for illustration\nclass Array {\n  static get [Symbol.species]() {\n    return this;\n  }\n}\n```\n\nBecause of this polymorphic implementation, `[Symbol.species]` of derived subclasses would also return the constructor itself by default.\n\n```js\nclass SubArray extends Array {}\nSubArray[Symbol.species] === SubArray; // true\n```\n\nWhen calling array methods that do not mutate the existing array but return a new array instance (for example, `filter()` and `map()`), the array's `constructor[Symbol.species]` will be accessed. The returned constructor will be used to construct the return value of the array method. This makes it technically possible to make array methods return objects unrelated to arrays.\n\n```js\nclass NotAnArray {\n  constructor(length) {\n    this.length = length;\n  }\n}\n\nconst arr = [0, 1, 2];\narr.constructor = { [Symbol.species]: NotAnArray };\narr.map((i) => i); // NotAnArray { '0': 0, '1': 1, '2': 2, length: 3 }\narr.filter((i) => i); // NotAnArray { '0': 1, '1': 2, length: 0 }\narr.concat([1, 2]); // NotAnArray { '0': 0, '1': 1, '2': 2, '3': 1, '4': 2, length: 5 }\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Array/Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array()\n\nThe **`Array()`** constructor is used to create `Array` objects.\n\n## Syntax\n\n```js\nnew Array(element0, element1, /* … ,*/ elementN)\nnew Array(arrayLength)\n\nArray(element0, element1, /* … ,*/ elementN)\nArray(arrayLength)\n```\n\n> **Note:** `Array()` can be called with or without `new`. Both create a new `Array` instance.\n\n### Parameters\n\n- `elementN`\n  - : A JavaScript array is initialized with the given elements, except in the case where\n    a single argument is passed to the `Array` constructor and that argument is\n    a number (see the `arrayLength` parameter below). Note that this special case only\n    applies to JavaScript arrays created with the `Array` constructor, not\n    array literals created with the bracket syntax.\n- `arrayLength`\n  - : If the only argument passed to the `Array` constructor is an integer\n    between 0 and 2<sup>32</sup> - 1 (inclusive), this returns a new JavaScript array with\n    its `length` property set to that number (**Note:** this\n    implies an array of `arrayLength` empty slots, not slots with actual\n    `undefined` values).\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if there's only one argument (`arrayLength`) and its value is not between 0 and 2<sup>32</sup> - 1 (inclusive).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Array/from.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.from\n\nThe **`Array.from()`** static method creates a new, shallow-copied `Array` instance from an iterable or array-like object.\n\n## Syntax\n\n```js\nArray.from(arrayLike)\n\n// Arrow function\nArray.from(arrayLike, (element) => { /* … */ })\nArray.from(arrayLike, (element, index) => { /* … */ })\n\n// Mapping function\nArray.from(arrayLike, mapFn)\nArray.from(arrayLike, mapFn, thisArg)\n\n// Inline mapping function\nArray.from(arrayLike, function (element) { /* … */ })\nArray.from(arrayLike, function (element, index) { /* … */ })\nArray.from(arrayLike, function (element) { /* … */ }, thisArg)\nArray.from(arrayLike, function (element, index) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `arrayLike`\n  - : An iterable or array-like object to convert to an array.\n- `mapFn` _**optional**_\n\n  - : Map function to call on every element of the array. If provided, every value to be added to the array is first passed through this function, and `mapFn`'s return value is added to the array instead.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `mapFn`.\n\n### Return value\n\nA new `Array` instance.\n\n## Description\n\n`Array.from()` lets you create `Array`s from:\n\n- [iterable objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) (objects such as [`Map`](../Map/Map.mdx) and [`Set`](../Set/Set.mdx); or, if the object is not iterable,\n- array-like objects (objects with a `length` property and indexed elements).\n\n`Array.from()` never creates a sparse array. If the `arrayLike` object is missing some index properties, they become `undefined` in the new array.\n\n`Array.from()` has an optional parameter `mapFn`, which allows you to execute a function on each element of the array being created, similar to [`Array.prototype.map()`](./prototype/map.mdx). More clearly, `Array.from(obj, mapFn, thisArg)` has the same result as `Array.from(obj).map(mapFn, thisArg)`, except that it does not create an intermediate array, and `mapFn` only receives two arguments (`element`, `index`) without the whole array, because the array is still under construction.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Array/isArray.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.isArray()\n\nThe **`Array.isArray()`** static method determines whether the passed value is an `Array`.\n\n## Syntax\n\n```js\nArray.isArray(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be checked.\n\n### Return value\n\n`true` if `value` is an `Array`; otherwise, `false`. `false` is always returned if `value` is a `TypedArray` instance.\n\n## Description\n\n`Array.isArray()` checks if the passed value is an `Array`. It does not check the value's prototype chain, nor does it rely on the `Array` constructor it is attached to. It returns `true` for any value that was created using the array literal syntax or the `Array` constructor. This makes it safe to use with cross-realm objects, where the identity of the `Array` constructor is different and would therefore cause `instanceof Array` to fail.\n\nSee the article [\"Determining with absolute accuracy whether or not a JavaScript object is an array\"](https://web.mit.edu/jwalden/www/isArray.html) for more details.\n\n`Array.isArray()` also rejects objects with `Array.prototype` in its prototype chain but aren't actual arrays, which `instanceof Array` would accept.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Array/of.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.of()\nThe **`Array.of()`** method creates a new `Array`\ninstance from a variable number of arguments, regardless of number or type of the\narguments.\n\n## Syntax\n\n```js\nArray.of(element0)\nArray.of(element0, element1)\nArray.of(element0, element1, /* … ,*/ elementN)\n```\n\n### Parameters\n\n- `elementN`\n  - : Elements used to create the array.\n\n### Return value\n\nA new `Array` instance.\n\n## Description\n\nThe difference between `Array.of()` and the [`Array()`](./Array.mdx) constructor is in the handling of single arguments: `Array.of(7)` creates an array with a single element, `7`, whereas `Array(7)` creates an empty array with a `length` property of `7`. (That implies an array of 7 empty slots, not slots with actual [`undefined`](../undefined.mdx) values.)\n\n```js\nArray.of(7); // [7]\nArray(7); // array of 7 empty slots\n\nArray.of(1, 2, 3); // [1, 2, 3]\nArray(1, 2, 3); // [1, 2, 3]\n```\n\nThe `Array.of()` method is a generic factory method. For example, if a subclass of `Array` inherits the `of()` method, the inherited `of()` method will return new instances of the subclass instead of `Array` instances. In fact, the `this` value can be any constructor function that accepts a single argument representing the length of the new array, and the constructor will be called with the number of arguments passed to `of()`. The final `length` will be set again when all elements are assigned. If the `this` value is not a constructor function, the plain `Array` constructor is used instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Array/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype\\[Symbol.iterator]()\n\nThe **`Symbol.iterator`** method of an `Array` object implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows arrays to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the value of each index in the array.\n\nThe initial value of this property is the same function object as the initial value of the [`Array.prototype.values`](./values.mdx) property.\n\n## Syntax\n\n```js\narray[Symbol.iterator]()\n```\n\n### Return value\n\nThe same return value as [`Array.prototype.values()`](./values.mdx): a new iterable iterator object that yields the value of each index in the array.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Array/prototype/@@unscopables.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype[Symbol.unscopables]\n\nThe **`@@unscopables`** data property of `Array.prototype` is shared by all `Array` instances. It contains property names that were not included in the ECMAScript standard prior to the ES2015 version and that are ignored for [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) statement-binding purposes.\n\n## Value\n\nA [`null`-prototype object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects) with property names given below and their values set to `true`.\n\n## Description\n\nThe default `Array` properties that are ignored for `with` statement-binding purposes are:\n\n- [`at()`](./at.mdx)\n- [`copyWithin()`](./copyWithin.mdx)\n- [`entries()`](./entries.mdx)\n- [`fill()`](./fill.mdx)\n- [`find()`](./find.mdx)\n- [`findIndex()`](./findIndex.mdx)\n- [`flat()`](./flat.mdx)\n- [`flatMap()`](./flatMap.mdx)\n- [`includes()`](./includes.mdx)\n- [`keys()`](./keys.mdx)\n- [`values()`](./values.mdx)\n\n`Array.prototype[@@unscopables]` is an empty object only containing all the above property names with the value `true`. Its [prototype is `null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects), so `Object.prototype` properties like [`toString`](../../Object/prototype/toString.mdx) won't accidentally be made unscopable, and a `toString()` within the `with` statement will continue to be called on the array.\n\nSee [`Symbol.unscopables`](../../Symbol/unscopables.mdx) for how to set unscopable properties for your own objects.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Array/prototype/at.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.at\n\nThe **`at()`** method takes an integer value and returns the item at that index, allowing for positive and negative integers. Negative integers count back from the last item in the array.\n\n## Syntax\n\n```js\nat(index)\n```\n\n### Parameters\n\n- `index`\n  - : Zero-based index of the array element to be returned, converted to an integer. Negative index counts back from the end of the array — if `index < 0`, `index + array.length` is accessed.\n\n### Return value\n\nThe element in the array matching the given index. Always returns [`undefined`](../../../globals/undefined.mdx) if `index < -array.length` or `index >= array.length` without attempting to access the corresponding property.\n\n## Description\n\nThe `at()` method is equivalent to the bracket notation when `index` is non-negative. For example, `array[0]` and `array.at(0)` both return the first item. However, when counting elements from the end of the array, you cannot use `array[-1]` like you may in Python or R, because all values inside the square brackets are treated literally as string properties, so you will end up reading `array[\"-1\"]`, which is just a normal string property instead of an array index.\n\nThe usual practice is to access [`Array.prototype.length`](./length.mdx) and calculate the index from that — for example, `array[array.length - 1]`. The `at()` method allows relative indexing, so this can be shortened to `array.at(-1)`.\n\nThe `at()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Array/prototype/concat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.concat\n\nThe **`concat()`** method is used to merge two or more arrays.\nThis method does not change the existing arrays, but instead returns a new array.\n\n## Syntax\n\n```js\nconcat()\nconcat(value0)\nconcat(value0, value1)\nconcat(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `valueN` _**optional**_\n  - : Arrays and/or values to concatenate into a new array. If all\n    `valueN` parameters are omitted, `concat` returns a\n    [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of the existing array on which it is called. See the description below\n    for more details.\n\n### Return value\n\nA new `Array` instance.\n\n## Description\n\nThe `concat` method creates a new array. The array will first be populated by the elements in the object on which it is called. Then, for each argument, its value will be concatenated into the array — for normal objects or primitives, the argument itself will become an element of the final array; for arrays or array-like objects with the property [`Symbol.isConcatSpreadable`](../../Symbol/isConcatSpreadable.mdx) set to a truthy value, each element of the argument will be independently added to the final array. The `concat` method does not recurse into nested array arguments.\n\nThe `concat()` method is a copying. It does not alter `this` or any of the arrays provided as arguments but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains the same elements as the ones from the original arrays.\n\nThe `concat()` method preserves empty slots if any of the source arrays is sparse.\n\nThe `concat()` method is generic. The `this` value is treated in the same way as the other arguments (except it will be converted to an object first), which means plain objects will be directly prepended to the resulting array, while array-like objects with truthy `Symbol.isConcatSpreadable` will be spread into the resulting array.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Array/prototype/copyWithin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.copyWithin\n\nThe **`copyWithin()`** method shallow copies part of an array\nto another location in the same array and returns it without modifying its length.\n\n\n\n## Syntax\n\n```js\ncopyWithin(target)\ncopyWithin(target, start)\ncopyWithin(target, start, end)\n```\n\n### Parameters\n\n- `target`\n  - : Zero-based index at which to copy the sequence to, converted to an integer.\n    - Negative index counts back from the end of the array — if `target < 0`, `target + array.length` is used.\n    - If `target < -array.length`, `0` is used.\n    - If `target >= array.length`, nothing is copied.\n    - If `target` is positioned after `start` after normalization, copying only happens until the end of `array.length` (in other words, `copyWithin()` never extends the array).\n- `start` _**optional**_\n  - : Zero-based index at which to start copying elements from, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, nothing is copied.\n- `end` _**optional**_\n  - : Zero-based index at which to end copying elements from, converted to an integer. `copyWithin()` copies up to but not including `end`.\n    - Negative index counts back from the end of the array — if `end < 0`, `end + array.length` is used.\n    - If `end < -array.length`, `0` is used.\n    - If `end >= array.length` or `end` is omitted, `array.length` is used, causing all elements until the end to be copied.\n    - If `end` is positioned before or at `start` after normalization, nothing is copied.\n\n### Return value\n\nThe modified array.\n\n## Description\n\nThe `copyWithin()` method works like C and C++'s `memmove`, and is a high-performance method to shift the data of an `Array`. The sequence is copied and pasted as one operation; the pasted sequence will have the copied values even when the copy and paste region overlap.\n\nThe `copyWithin()` method is a mutating method. It does not alter the length of `this`, but it will change the content of `this` and create new properties or delete existing properties, if necessary.\n\nThe `copyWithin()` method preserves empty slots. If the region to be copied from is sparse, the empty slots' corresponding new indices are [deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) and also become empty slots.\n\nThe `copyWithin()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Array/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.entries\n\nThe **`entries()`** method returns a new **Array\nIterator** object that contains the key/value pairs for each index in the\narray.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nA new `Array` iterator object.\n\n## Description\n\nWhen used on sparse arrays, the `entries()` method iterates empty slots as if they have the value `undefined`.\n\nThe `entries()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Array/prototype/every.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.every\n\nThe **`every()`** method tests whether\nall elements in the array pass the test implemented by the provided function. It\nreturns a Boolean value.\n\n## Syntax\n\n```js\n// Arrow function\nevery((element) => { /* … */ })\nevery((element, index) => { /* … */ })\nevery((element, index, array) => { /* … */ })\n\n// Callback function\nevery(callbackFn)\nevery(callbackFn, thisArg)\n\n// Inline callback function\nevery(function (element) { /* … */ })\nevery(function (element, index) { /* … */ })\nevery(function (element, index, array) { /* … */ })\nevery(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value to indicate the element passes the test, and a falsy value otherwise.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `every()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\n`true` if `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value for every array element. Otherwise, `false`.\n\n## Description\n\nThe `every()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array, until the `callbackFn` returns a [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value. If such an element is found, `every()` immediately returns `false` and stops iterating through the array. Otherwise, if `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value for all elements, `every()` returns `true`.\n\n`every` acts like the \"for all\" quantifier in mathematics. In particular, for an empty array, it returns `true`. (It is [vacuously true](https://en.wikipedia.org/wiki/Vacuous_truth) that all elements of the [empty set](https://en.wikipedia.org/wiki/Empty_set#Properties) satisfy any given condition.)\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\n`every()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `every()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `every()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Array/prototype/fill.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.fill\n\nThe **`fill()`** method changes all elements in an array to a static value, from a start index (default `0`) to an end index (default `array.length`).\nIt returns the modified array.\n\n## Syntax\n\n```js\nfill(value)\nfill(value, start)\nfill(value, start, end)\n```\n\n### Parameters\n\n- `value`\n  - : Value to fill the array with. Note all elements in the array will be this exact value: if `value` is an object, each slot in the array will reference that object.\n- `start` _**optional**_\n  - : Zero-based index at which to start filling, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, no index is filled.\n- `end` _**optional**_\n  - : Zero-based index at which to end filling, converted to an integer. `fill()` fills up to but not including `end`.\n    - Negative index counts back from the end of the array — if `end < 0`, `end + array.length` is used.\n    - If `end < -array.length`, `0` is used.\n    - If `end >= array.length` or `end` is omitted, `array.length` is used, causing all indices until the end to be filled.\n    - If `end` is positioned before or at `start` after normalization, no index is filled.\n\n### Return value\n\nThe modified array, filled with `value`.\n\n## Description\n\nThe `fill()` method is a mutating method. It does not alter the length of `this`, but it will change the content of `this`.\n\nThe `fill()` method fills empty slots in sparse arrays with `value` as well.\n\nThe `fill()` method is generic. It only expects the `this` value to have a `length` property. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Array/prototype/filter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.filter\n\nThe **`filter()`** method creates a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of a portion of a given array, filtered down to just the elements from the given array that pass the test implemented by the provided function.\n\n## Syntax\n\n```js\n// Arrow function\nfilter((element) => { /* … */ })\nfilter((element, index) => { /* … */ })\nfilter((element, index, array) => { /* … */ })\n\n// Callback function\nfilter(callbackFn)\nfilter(callbackFn, thisArg)\n\n// Inline callback function\nfilter(function (element) { /* … */ })\nfilter(function (element, index) { /* … */ })\nfilter(function (element, index, array) { /* … */ })\nfilter(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) to keep the element in the resulting array, and a falsy value otherwise.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `filter()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\nA [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of a portion of the given array, filtered down to just the elements from the given array that pass the test implemented by the provided function. If no elements pass the test, an empty array will be returned.\n\n## Description\n\nThe `filter()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array, and constructs a new array of all the values for which `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. Array elements which do not pass the `callbackFn` test are not included in the new array.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nThe `filter()` method is a copying method. It does not alter `this` but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains the same elements as the ones from the original array (with some filtered out). However, the function provided as `callbackFn` can mutate the array. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `filter()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\nThe `filter()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Array/prototype/find.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.find()\n\nThe `find()` method returns the first element in the provided array that satisfies the provided testing function.\nIf no values satisfy the testing function, [`undefined`](../../../globals/undefined.mdx) is returned.\n\n- If you need the **index** of the found element in the array, use [`findIndex()`](./findIndex.mdx).\n- If you need to find the **index of a value**, use [`indexOf()`](./indexOf.mdx).\n  (It's similar to [`findIndex()`](./findIndex.mdx), but checks each element for equality with the value instead of using a testing function.)\n- If you need to find if a value **exists** in an array, use [`includes()`](./includes.mdx).\n  Again, it checks each element for equality with the value instead of using a testing function.\n- If you need to find if any element satisfies the provided testing function, use [`some()`](./some.mdx).\n\n## Syntax\n\n```js\n// Arrow function\nfind((element) => { /* … */ })\nfind((element, index) => { /* … */ })\nfind((element, index, array) => { /* … */ })\n\n// Callback function\nfind(callbackFn)\nfind(callbackFn, thisArg)\n\n// Inline callback function\nfind(function (element) { /* … */ })\nfind(function (element, index) { /* … */ })\nfind(function (element, index, array) { /* … */ })\nfind(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value to indicate a matching element has been found.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `find()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\nThe first element in the array that satisfies the provided testing function.\nOtherwise, [`undefined`](../../../globals/undefined.mdx) is returned.\n\n## Description\n\nThe `find()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array in ascending-index order, until `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. `find()` then returns that element and stops iterating through the array. If `callbackFn` never returns a truthy value, `find()` returns [`undefined`](../../../globals/undefined.mdx).\n\n`callbackFn` is invoked for _every_ index of the array, not just those with assigned values. Empty slots in sparse arrays behave the same as `undefined`.\n\n`find()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `find()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are visited as if they were `undefined`.\n\nThe `find()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Array/prototype/findIndex.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.findIndex\n\nThe **`findIndex()`** method returns the index of the first element in an array that satisfies the provided testing function.\nIf no elements satisfy the testing function, -1 is returned.\n\nSee also the [`find()`](./find.mdx) method, which returns the first element that satisfies the testing function (rather than its index).\n\n## Syntax\n\n```js\n// Arrow function\nfindIndex((element) => { /* … */ })\nfindIndex((element, index) => { /* … */ })\nfindIndex((element, index, array) => { /* … */ })\n\n// Callback function\nfindIndex(callbackFn)\nfindIndex(callbackFn, thisArg)\n\n// Inline callback function\nfindIndex(function (element) { /* … */ })\nfindIndex(function (element, index) { /* … */ })\nfindIndex(function (element, index, array) { /* … */ })\nfindIndex(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value to indicate a matching element has been found.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `findIndex()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\nThe index of the first element in the array that passes the test. Otherwise, `-1`.\n\n## Description\n\nThe `findIndex()` is an iterative method. It calls a provided `callbackFn` function once for each element in an array in ascending-index order, until `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. `findIndex()` then returns the index of that element and stops iterating through the array. If `callbackFn` never returns a truthy value, `findIndex()` returns `-1`.\n\n`callbackFn` is invoked for _every_ index of the array, not just those with assigned values. Empty slots in sparse arrays behave the same as `undefined`.\n\n`findIndex()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `findIndex()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are visited as if they were `undefined`.\n\nThe `findIndex()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Array/prototype/flat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.flat\n\nThe **`flat()`** method creates a new array with all sub-array\nelements concatenated into it recursively up to the specified depth.\n\n## Syntax\n\n```js\nflat()\nflat(depth)\n```\n\n### Parameters\n\n- `depth` _**optional**_\n  - : The depth level specifying how deep a nested array structure should be flattened.\n    Defaults to 1.\n\n### Return value\n\nA new array with the sub-array elements concatenated into it.\n\n## Description\n\nThe `flat()` method is a copying method. It does not alter `this` but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains the same elements as the ones from the original array.\n\nThe `flat()` method ignores empty slots if the array being flattened is sparse. For example, if `depth` is 1, both empty slots in the root array and in the first level of nested arrays are ignored, but empty slots in further nested arrays are preserved with the arrays themselves.\n\nThe `flat()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. However, its elements must be arrays if they are to be flattened.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Array/prototype/flatMap.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.flatMap()\n\nThe **`flatMap()`** method returns a new array formed by applying a given callback function to each element of the array, and then flattening the result by one level. It is identical to a [`Array.prototype.map()`](./map.mdx) followed by a [`Array.prototype.flat()`](./flat.mdx) of depth 1 (`arr.map(...args).flat()`), but slightly more efficient than calling those two methods separately.\n\n## Syntax\n\n```js\n// Arrow function\nflatMap((element) => { /* … */ })\nflatMap((element, index) => { /* … */ })\nflatMap((element, index, array) => { /* … */ })\n\n// Callback function\nflatMap(callbackFn)\nflatMap(callbackFn, thisArg)\n\n// Inline callback function\nflatMap(function (element) { /* … */ })\nflatMap(function (element, index) { /* … */ })\nflatMap(function (element, index, array) { /* … */ })\nflatMap(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return an array containing new elements of the new array, or a single non-array value to be added to the new array.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `flatMap()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\nA new array with each element being the result of the callback function and flattened\nby a depth of 1.\n\n## Description\n\nThe `flatMap()` method is an iterative method. See [`Array.prototype.map()`](./map.mdx) for a detailed description of the callback function. The `flatMap()` method is identical to [`map(callbackFn, thisArg)`](./map.mdx) followed by [`flat(1)`](./flat.mdx) — for each element, it produces an array of new elements, and concatenates the resulting arrays together to form a new array.\n\nThe `flatMap()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. However, the value returned from `callbackFn` must be an array if it is to be flattened.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Array/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.forEach()\n\nThe **`forEach()`** method executes a provided function once\nfor each array element.\n\n## Syntax\n\n```js\n// Arrow function\nforEach((element) => { /* … */ })\nforEach((element, index) => { /* … */ })\nforEach((element, index, array) => { /* … */ })\n\n// Callback function\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n\n// Inline callback function\nforEach(function (element) { /* … */ })\nforEach(function (element, index) { /* … */ })\nforEach(function (element, index, array) { /* … */ })\nforEach(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value is discarded.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `forEach()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\n`undefined`.\n\n## Description\n\nThe `forEach()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array in ascending-index order. Unlike [`Array.prototype.map()`](./map.mdx), `forEach()` always returns [`undefined`](../../../globals/undefined.mdx) and is not chainable. The typical use case is to execute side effects at the end of a chain.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\n`forEach()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `forEach()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\nThe `forEach()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n\nThere is no way to stop or break a `forEach()` loop other than by throwing an exception. If you need such behavior, the `forEach()` method is the wrong tool.\n\nEarly termination may be accomplished with looping statements like [`for`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for), [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of), and [`for...in`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...in). Array methods like [`Array.prototype.some()`](./some.mdx), [`Array.prototype.some()`](./some.mdx), [`Array.prototype.find()`](./find.mdx), and [`Array.prototype.findIndex()`](./findIndex.mdx) also stops iteration immediately when further iteration is not necessary.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Array/prototype/includes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.includes()\n\nThe **`includes()`** method determines whether an array\nincludes a certain value among its entries, returning `true` or\n`false` as appropriate.\n\n## Syntax\n\n```js\nincludes(searchElement)\nincludes(searchElement, fromIndex)\n```\n\n### Parameters\n\n- `searchElement`\n  - : The value to search for.\n- `fromIndex` _**optional**_\n  - : Zero-based index at which to start searching, converted to an integer.\n    - Negative index counts back from the end of the array — if `fromIndex < 0`, `fromIndex + array.length` is used. However, the array is still searched from front to back in this case.\n    - If `fromIndex < -array.length` or `fromIndex` is omitted, `0` is used, causing the entire array to be searched.\n    - If `fromIndex >= array.length`, the array is not searched and `false` is returned.\n\n### Return value\n\nA boolean value which is `true` if the value `searchElement` is found within the array (or the part of the array indicated by the index `fromIndex`, if specified).\n\n## Description\n\nThe `includes()` method compares `searchElement` to elements of the array using the [SameValueZero](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) algorithm. Values of zero are all considered to be equal, regardless of sign. (That is, `-0` is equal to `0`), but `false` is _not_ considered to be the same as `0`. [`NaN`](../../NaN.mdx) can be correctly searched for.\n\nWhen used on sparse arrays, the `includes()` method iterates empty slots as if they have the value `undefined`.\n\nThe `includes()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Array/prototype/indexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.indexOf()\n\nThe **`indexOf()`** method returns the first index at which a\ngiven element can be found in the array, or -1 if it is not present.\n\n## Syntax\n\n```js\nindexOf(searchElement)\nindexOf(searchElement, fromIndex)\n```\n\n### Parameters\n\n- `searchElement`\n  - : Element to locate in the array.\n- `fromIndex` _**optional**_\n  - : Zero-based index at which to start searching, converted to an integer.\n    - Negative index counts back from the end of the array — if `fromIndex < 0`, `fromIndex + array.length` is used. Note, the array is still searched from front to back in this case.\n    - If `fromIndex < -array.length` or `fromIndex` is omitted, `0` is used, causing the entire array to be searched.\n    - If `fromIndex >= array.length`, the array is not searched and `-1` is returned.\n\n### Return value\n\nThe first index of the element in the array; **-1** if not found.\n\n## Description\n\nThe `indexOf()` method compares `searchElement` to elements of the array using [strict equality](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) (the same algorithm used by the `===` operator).\n\nThe `indexOf()` method skips empty slots in sparse arrays.\n\nThe `indexOf()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Array/prototype/join.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.join()\n\nThe **`join()`** method creates and\nreturns a new string by concatenating all of the elements in an array\n(or an [array-like object](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects)),\nseparated by commas or a specified separator string. If the array has\nonly one item, then that item will be returned without using the separator.\n\n## Syntax\n\n```js\njoin()\njoin(separator)\n```\n\n### Parameters\n\n- `separator` _**optional**_\n  - : Specifies a string to separate each pair of adjacent elements of the array. The\n    separator is converted to a string if necessary. If omitted, the array elements are\n    separated with a comma (\",\"). If `separator` is an empty string, all\n    elements are joined without any characters in between them.\n\n### Return value\n\nA string with all array elements joined. If `arr.length` is\n`0`, the empty string is returned.\n\n## Description\n\nThe string conversions of all array elements are joined into one string. If an element is `undefined`, `null`, it is converted to an empty string instead of the string `\"null\"` or `\"undefined\"`.\n\nThe `join` method is accessed internally by [`Array.prototype.toString()`](./toString.mdx) with no arguments. Overriding `join` of an array instance will override its `toString` behavior as well.\n\nWhen used on sparse arrays, the `join()` method iterates empty slots as if they have the value `undefined`.\n\nThe `join()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Array/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.keys()\n\nThe **`keys()`** method returns a new **Array\nIterator** object that contains the keys for each index in the array.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nA new `Array` iterator object.\n\n## Description\n\nWhen used on sparse arrays, the `keys()` method iterates empty slots as if they have the value `undefined`.\n\nThe `keys()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Array/prototype/lastIndexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.lastIndexOf()\n\nThe **`lastIndexOf()`** method returns the last index at which\na given element can be found in the array, or -1 if it is not present. The array is\nsearched backwards, starting at `fromIndex`.\n\n## Syntax\n\n```js\nlastIndexOf(searchElement)\nlastIndexOf(searchElement, fromIndex)\n```\n\n### Parameters\n\n- `searchElement`\n  - : Element to locate in the array.\n- `fromIndex` _**optional**_\n  - : Zero-based index at which to start searching backwards, converted to an integer.\n    - Negative index counts back from the end of the array — if `fromIndex < 0`, `fromIndex + array.length` is used.\n    - If `fromIndex < -array.length`, the array is not searched and `-1` is returned. You can think of it conceptually as starting at a nonexistent position before the beginning of the array and going backwards from there. There are no array elements on the way, so `searchElement` is never found.\n    - If `fromIndex >= array.length` or `fromIndex` is omitted, `array.length - 1` is used, causing the entire array to be searched. You can think of it conceptually as starting at a nonexistent position beyond the end of the array and going backwards from there. It eventually reaches the real end position of the array, at which point it starts searching backwards through the actual array elements.\n\n### Return value\n\nThe last index of the element in the array; **-1** if not found.\n\n## Description\n\nThe `lastIndexOf()` method compares `searchElement` to elements of the array using [strict equality](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) (the same algorithm used by the `===` operator).\n\nThe `lastIndexOf()` method skips empty slots in sparse arrays.\n\nThe `lastIndexOf()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Array/prototype/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.length\n\nThe **`length`** data property of an `Array` instance represents the number of elements in that array. The value is an unsigned, 32-bit integer that is always numerically greater than the highest index in the array.\n\n## Value\n\nA non-negative integer less than 2<sup>32</sup>.\n\n## Description\n\nThe value of the `length` property is a non-negative integer with a value less than 2<sup>32</sup>.\n\n```js\nconst listA = [1, 2, 3];\nconst listB = new Array(6);\n\nconsole.log(listA.length);\n// 3\n\nconsole.log(listB.length);\n// 6\n\nlistB.length = 2 ** 32; // 4294967296\n// RangeError: Invalid array length\n\nconst listC = new Array(-100); // Negative numbers are not allowed\n// RangeError: Invalid array length\n```\n\nThe array object observes the `length` property, and automatically syncs the `length` value with the array's content. This means:\n\n- Setting `length` to a value smaller than the current length truncates the array — elements beyond the new `length` are deleted.\n- Setting any array index (a non-negative integer smaller than 2<sup>32</sup>) beyond the current `length` extends the array — the `length` property is increased to reflect the new highest index.\n- Setting `length` to an invalid value (e.g. a negative number or a non-integer) throws a `RangeError` exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Array/prototype/map.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.map()\n\nThe **`map()`** method **creates\na new array** populated with the results of calling a provided function on\nevery element in the calling array.\n\n## Syntax\n\n```js\n// Arrow function\nmap((element) => { /* … */ })\nmap((element, index) => { /* … */ })\nmap((element, index, array) => { /* … */ })\n\n// Callback function\nmap(callbackFn)\nmap(callbackFn, thisArg)\n\n// Inline callback function\nmap(function (element) { /* … */ })\nmap(function (element, index) { /* … */ })\nmap(function (element, index, array) { /* … */ })\nmap(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value is added as a single element in the new array.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `map()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\nA new array with each element being the result of the callback function.\n\n## Description\n\nThe `map()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array and constructs a new array from the results.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nThe `map()` method is a copying method. It does not alter `this`. However, the function provided as `callbackFn` can mutate the array. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `map()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `map()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n\nSince `map` builds a new array, calling it without using the returned\narray is an anti-pattern; use [`Array.prototype.forEach()`](./forEach.mdx) or\n`for...of` instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Array/prototype/pop.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.pop()\n\nThe **`pop()`** method removes the **last**\nelement from an array and returns that element. This method changes the length of the\narray.\n\n## Syntax\n\n```js\npop()\n```\n\n### Return value\n\nThe removed element from the array; [`undefined`](../../../globals/undefined.mdx) if the array is empty.\n\n## Description\n\nThe `pop()` method removes the last element from an array and returns that value to the caller. If you call `pop()` on an empty array, it returns [`undefined`](../../../globals/undefined.mdx).\n\n[`Array.prototype.shift()`](./shift.mdx) has similar behavior to `pop()`, but applied to the first element in an array.\n\nThe `pop()` method is a mutating method. It changes the length and the content of `this`. In case you want the value of `this` to be the same, but return a new array with the last element removed, you can use [`arr.slice(0, -1)`](./slice.mdx) instead.\n\nThe `pop()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Array/prototype/push.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.push()\n\nThe **`push()`** method adds one or more elements to the end of\nan array and returns the new length of the array.\n\n## Syntax\n\n```js\npush(element0)\npush(element0, element1)\npush(element0, element1, /* … ,*/ elementN)\n```\n\n### Parameters\n\n- `elementN`\n  - : The element(s) to add to the end of the array.\n\n### Return value\n\nThe new [`Array.prototype.length`](./length.mdx) property of the object upon which the method was called.\n\n## Description\n\nThe `push()` method appends values to an array.\n\n[`Array.prototype.unshift()`](./unshift.mdx)has similar behavior to `push()`, but applied to the start of an array.\n\nThe `push()` method is a mutating method. It changes the length and the content of `this`. In case you want the value of `this` to be the same, but return a new array with elements appended to the end, you can use [`arr.concat([element0, element1, /* ... ,*/ elementN])`](./concat.mdx) instead. Notice that the elements are wrapped in an extra array — otherwise, if the element is an array itself, it would be spread instead of pushed as a single element due to the behavior of `concat()`.\n\nThe `push()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Array/prototype/reduce.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.reduce()\n\nThe **`reduce()`** method executes a user-supplied \"reducer\" callback function on each element of the array, in order, passing in the return value from the calculation on the preceding element.\nThe final result of running the reducer across all elements of the array is a single value.\n\nThe first time that the callback is run there is no \"return value of the previous calculation\".\nIf supplied, an initial value may be used in its place.\nOtherwise the array element at index 0 is used as the initial value and iteration starts from the next element (index 1 instead of index 0).\n\nPerhaps the easiest-to-understand case for `reduce()` is to return the sum of all the elements in an array:\n\nThe reducer walks through the array element-by-element, at each step adding the current array value to the result from the previous step (this result is the running sum of all the previous steps) — until there are no more elements to add.\n\n## Syntax\n\n```js\n// Arrow function\nreduce((accumulator, currentValue) => { /* … */ })\nreduce((accumulator, currentValue, currentIndex) => { /* … */ })\nreduce((accumulator, currentValue, currentIndex, array) => { /* … */ })\n\nreduce((accumulator, currentValue) => { /* … */ }, initialValue)\nreduce((accumulator, currentValue, currentIndex) => { /* … */ }, initialValue)\nreduce((accumulator, currentValue, currentIndex, array) => { /* … */ }, initialValue)\n\n// Callback function\nreduce(callbackFn)\nreduce(callbackFn, initialValue)\n\n// Inline callback function\nreduce(function (accumulator, currentValue) { /* … */ })\nreduce(function (accumulator, currentValue, currentIndex) { /* … */ })\nreduce(function (accumulator, currentValue, currentIndex, array) { /* … */ })\n\nreduce(function (accumulator, currentValue) { /* … */ }, initialValue)\nreduce(function (accumulator, currentValue, currentIndex) { /* … */ }, initialValue)\nreduce(function (accumulator, currentValue, currentIndex, array) { /* … */ }, initialValue)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value becomes the value of the `accumulator` parameter on the next invocation of `callbackFn`. For the last invocation, the return value becomes the return value of `reduce()`.\n\n    The function is called with the following arguments:\n\n    - `accumulator`\n      - : The value resulting from the previous call to `callbackFn`. On first call, `initialValue` if specified, otherwise the value of `array[0]`.\n    - `currentValue`\n      - : The value of the current element. On first call, the value of `array[0]` if an `initialValue` was specified, otherwise the value of `array[1]`.\n    - `currentIndex`\n      - : The index position of `currentValue` in the array. On first call, `0` if `initialValue` was specified, otherwise `1`.\n    - `array`\n      - : The array `reduce()` was called upon.\n\n- `initialValue` _**optional**_\n  - : A value to which `accumulator` is initialized the first time the callback is called.\n    If `initialValue` is specified, `callbackFn` starts executing with the first value in the array as `currentValue`.\n    If `initialValue` is _not_ specified, `accumulator` is initialized to the first value in the array, and `callbackFn` starts executing with the second value in the array as `currentValue`. In this case, if the array is empty (so that there's no first value to return as `accumulator`), an error is thrown.\n\n### Return value\n\nThe value that results from running the \"reducer\" callback function to completion over the entire array.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n\n  - : The array contains no elements and `initialValue` is not provided.\n\n## Description\n\nThe `reduce()` method is an iterative method. It runs a \"reducer\" callback function over all elements in the array, in ascending-index order, and accumulates them into a single value. Every time, the return value of `callbackFn` is passed into `callbackFn` again on next invocation as `accumulator`. The final value of `accumulator` (which is the value returned from `callbackFn` on the final iteration of the array) becomes the return value of `reduce()`.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nUnlike other [iterative methods](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array#iterative_methods), `reduce()` does not accept a `thisArg` argument. `callbackFn` is always called with `undefined` as `this`, which gets substituted with `globalThis` if `callbackFn` is non-strict.\n\n`reduce()` is a central concept in [functional programming](https://en.wikipedia.org/wiki/Functional_programming), where it's not possible to mutate any value, so in order to accumulate all values in an array, one must return a new accumulator value on every iteration. This convention propagates to JavaScript's `reduce()`: you should use [spreading](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) or other copying methods where possible to create new arrays and objects as the accumulator, rather than mutating the existing one. If you decided to mutate the accumulator instead of copying it, remember to still return the modified object in the callback, or the next iteration will receive undefined.\n\n`reduce()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `reduce()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `reduce()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n\n### When to not use reduce()\n\nRecursive functions like `reduce()` can be powerful but sometimes difficult to understand, especially for less-experienced JavaScript developers. If code becomes clearer when using other array methods, developers must weigh the readability tradeoff against the other benefits of using `reduce()`. In cases where `reduce()` is the best choice, documentation and semantic variable naming can help mitigate readability drawbacks.\n\n### Edge cases\n\nIf the array only has one element (regardless of position) and no `initialValue` is provided, or if `initialValue` is provided but the array is empty, the solo value will be returned _without_ calling `callbackFn`.\n\nIf `initialValue` is provided and the array is not empty, then the reduce method will always invoke the callback function starting at index 0.\n\nIf `initialValue` is not provided then the reduce method will act differently for arrays with length larger than 1, equal to 1 and 0, as shown in the following example:\n\n```js\nconst getMax = (a, b) => Math.max(a, b);\n\n// callback is invoked for each element in the array starting at index 0\n[1, 100].reduce(getMax, 50); // 100\n[50].reduce(getMax, 10); // 50\n\n// callback is invoked once for element at index 1\n[1, 100].reduce(getMax); // 100\n\n// callback is not invoked\n[50].reduce(getMax); // 50\n[].reduce(getMax, 1); // 1\n\n[].reduce(getMax); // TypeError\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Array/prototype/reduceRight.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.reduceRight()\n\nThe **`reduceRight()`** method applies a function against an\naccumulator and each value of the array (from right-to-left) to reduce it to a single\nvalue.\n\nSee also [`Array.prototype.reduce()`](./reduce.mdx) for left-to-right.\n\n## Syntax\n\n```js\n// Arrow function\nreduceRight((accumulator, currentValue) => { /* … */ })\nreduceRight((accumulator, currentValue, index) => { /* … */ })\nreduceRight((accumulator, currentValue, index, array) => { /* … */ })\nreduceRight((accumulator, currentValue, index, array) => { /* … */ }, initialValue)\n\n// Callback function\nreduceRight(callbackFn)\nreduceRight(callbackFn, initialValue)\n\n// Callback reducer function\nreduceRight(function (accumulator, currentValue) { /* … */ })\nreduceRight(function (accumulator, currentValue, index) { /* … */ })\nreduceRight(function (accumulator, currentValue, index, array) { /* … */ })\nreduceRight(function (accumulator, currentValue, index, array) { /* … */ }, initialValue)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value becomes the value of the `accumulator` parameter on the next invocation of `callbackFn`. For the last invocation, the return value becomes the return value of `reduce()`.\n\n    The function is called with the following arguments:\n\n    - `accumulator`\n      - : The value previously returned in the last invocation of the callback, or\n        `initialValue`, if supplied. (See below.)\n    - `currentValue`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `reduceRight()` was called upon.\n\n- `initialValue` _**optional**_\n  - : Value to use as accumulator to the first call of the\n    `callbackFn`. If no initial value is supplied, the last element in\n    the array will be used and skipped. Calling reduce or reduceRight on an empty array\n    without an initial value creates a `TypeError`.\n\n### Return value\n\nThe value that results from the reduction.\n\n## Description\n\nThe `reduceRight()` method is an iterative method. It runs a \"reducer\" callback function over all elements in the array, in descending-index order, and accumulates them into a single value.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nUnlike other [iterative methods](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array#iterative_methods), `reduce()` does not accept a `thisArg` argument. `callbackFn` is always called with `undefined` as `this`, which gets substituted with `globalThis` if `callbackFn` is non-strict.\n\n`reduceRight()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `reduceRight()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `reduceRight()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Array/prototype/reverse.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.reverse()\n\nThe **`reverse()`** method reverses an array _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_ and returns the reference to the same array, the first array element now becoming the last, and the last array element becoming the first. In other words, elements order in the array will be turned towards the direction opposite to that previously stated.\n\n## Syntax\n\n```js\nreverse()\n```\n\n### Return value\n\nThe reference to the original array, now reversed. Note that the array is reversed _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_, and no copy is made.\n\n## Description\n\nThe `reverse()` method transposes the elements of the calling array object in\nplace, mutating the array, and returning a reference to the array.\n\nThe `reverse()` method preserves empty slots. If the source array is sparse, the empty slots' corresponding new indices are [deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) and also become empty slots.\n\nThe `reverse()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Array/prototype/shift.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.shift()\n\nThe **`shift()`** method removes the **first**\nelement from an array and returns that removed element. This method changes the length\nof the array.\n\n## Syntax\n\n```js\nshift()\n```\n\n### Return value\n\nThe removed element from the array; [`undefined`](../../../globals/undefined.mdx) if the array is empty.\n\n## Description\n\nThe `shift()` method removes the element at the zeroth index and shifts the\nvalues at consecutive indexes down, then returns the removed value. If the\n[`Array.prototype.length`](./length.mdx) property is 0, [`undefined`](../../../globals/undefined.mdx) is returned.\n\nThe [`Array.prototype.pop()`](./pop.mdx) method has similar behavior to `shift()`, but applied to the last element in an array.\n\nThe `shift()` method is a mutating method. It changes the length and the content of `this`. In case you want the value of `this` to be the same, but return a new array with the first element removed, you can use [`arr.slice(1)`](./slice.mdx) instead.\n\nThe `shift()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Array/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.slice()\n\nThe **`slice()`** method returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of a portion of\nan array into a new array object selected from `start` to `end`\n(`end` not included) where `start` and `end` represent\nthe index of items in that array. The original array will not be modified.\n\n## Syntax\n\n```js\nslice()\nslice(start)\nslice(start, end)\n```\n\n### Parameters\n\n- `start` _**optional**_\n  - : Zero-based index at which to start extraction, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, nothing is extracted.\n- `end` _**optional**_\n  - : Zero-based index at which to end extraction, converted to an integer. `slice()` extracts up to but not including `end`.\n    - Negative index counts back from the end of the array — if `end < 0`, `end + array.length` is used.\n    - If `end < -array.length`, `0` is used.\n    - If `end >= array.length` or `end` is omitted, `array.length` is used, causing all elements until the end to be extracted.\n    - If `end` is positioned before or at `start` after normalization, nothing is extracted.\n\n### Return value\n\nA new array containing the extracted elements.\n\n## Description\n\nThe `slice()` method is a copying method. It does not alter `this` but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains some of the same elements as the ones from the original array.\n\nThe `slice()` method preserves empty slots. If the sliced portion is sparse, the returned array is sparse as well.\n\nThe `slice()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Array/prototype/some.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.some()\n\nThe **`some()`** method tests whether\nat least one element in the array passes the test implemented by the provided\nfunction. It returns true if, in the array, it finds an element for which the provided function returns true; otherwise it returns false. It doesn't modify the array.\n\n## Syntax\n\n```js\n// Arrow function\nsome((element) => { /* … */ })\nsome((element, index) => { /* … */ })\nsome((element, index, array) => { /* … */ })\n\n// Callback function\nsome(callbackFn)\nsome(callbackFn, thisArg)\n\n// Inline callback function\nsome(function (element) { /* … */ })\nsome(function (element, index) { /* … */ })\nsome(function (element, index, array) { /* … */ })\nsome(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) to indicate the element passes the test, and a falsy value otherwise.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `some()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\n`true` if the callback function returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value for at least one element in the array. Otherwise, `false`.\n\n## Description\n\nThe `some()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array, until the `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. If such an element is found, `some()` immediately returns `true` and stops iterating through the array. Otherwise, if `callbackFn` returns a [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value for all elements, `some()` returns `false`.\n\n`some()` acts like the \"there exists\" quantifier in mathematics. In particular, for an empty array, it returns `false` for any condition.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\n`some()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `some()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\nThe `some()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Array/prototype/sort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.sort()\n\nThe **`sort()`** method sorts the elements of an array _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_ and returns the reference to the same array, now sorted. The default sort order is ascending, built upon converting the elements into strings, then comparing their sequences of UTF-16 code units values.\n\nThe time and space complexity of the sort cannot be guaranteed as it depends on the\nimplementation.\n\n## Syntax\n\n```js\n// Functionless\nsort()\n\n// Arrow function\nsort((a, b) => { /* … */ } )\n\n// Compare function\nsort(compareFn)\n\n// Inline compare function\nsort(function compareFn(a, b) { /* … */ })\n```\n\n### Parameters\n\n- `compareFn` _**optional**_\n\n  - : Specifies a function that defines the sort order. If omitted, the array elements are converted to strings, then sorted according to each character's Unicode code point value.\n\n    - `a`\n      - : The first element for comparison.\n    - `b`\n      - : The second element for comparison.\n\n### Return value\n\nThe reference to the original array, now sorted. Note that the array is sorted _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_, and no copy is made.\n\n## Description\n\nIf `compareFn` is not supplied, all non-`undefined` array\nelements are sorted by converting them to strings and comparing strings in UTF-16 code\nunits order. For example, \"banana\" comes before \"cherry\". In a numeric sort, 9 comes\nbefore 80, but because numbers are converted to strings, \"80\" comes before \"9\" in the\nUnicode order. All `undefined` elements are sorted to the end of the array.\n\nThe `sort()` method preserves empty slots. If the source array is sparse, the empty slots are moved to the end of the array, and always come after all the `undefined`.\n\n> **Note:** In UTF-16, Unicode characters above `\\uFFFF` are\n> encoded as two surrogate code units, of the range\n> `\\uD800` - `\\uDFFF`. The value of each code unit is taken\n> separately into account for the comparison. Thus the character formed by the surrogate\n> pair `\\uD855\\uDE51` will be sorted before the character\n> `\\uFF3A`.\n\nIf `compareFn` is supplied, all non-`undefined` array\nelements are sorted according to the return value of the compare function (all\n`undefined` elements are sorted to the end of the array, with no call to\n`compareFn`).\n\n| `compareFn(a, b)` return value | sort order                         |\n| ------------------------------ | ---------------------------------- |\n| > 0                            | sort `a` after `b`                 |\n| < 0                            | sort `a` before `b`                |\n| === 0                          | keep original order of `a` and `b` |\n\nSo, the compare function has the following form:\n\n```js\nfunction compareFn(a, b) {\n  if (a is less than b by some ordering criterion) {\n    return -1;\n  }\n  if (a is greater than b by the ordering criterion) {\n    return 1;\n  }\n  // a must be equal to b\n  return 0;\n}\n```\n\nMore formally, the comparator is expected to have the following properties, in order to ensure proper sort behavior:\n\n- _Pure_: The comparator does not mutate the objects being compared or any external state. (This is important because there's no guarantee _when_ and _how_ the comparator will be called, so any particular call should not produce visible effects to the outside.)\n- _Stable_: The comparator returns the same result with the same pair of input.\n- _Reflexive_: `compareFn(a, a) === 0`.\n- _Anti-symmetric_: `compareFn(a, b)` and `compareFn(b, a)` must both be `0` or have opposite signs.\n- _Transitive_: If `compareFn(a, b)` and `compareFn(b, c)` are both positive, zero, or negative, then `compareFn(a, c)` has the same positivity as the previous two.\n\nA comparator conforming to the constraints above will always be able to return all of `1`, `0`, and `-1`, or consistently return `0`. For example, if a comparator only returns `1` and `0`, or only returns `0` and `-1`, it will not be able to sort reliably because _anti-symmetry_ is broken. A comparator that always returns `0` will cause the array to not be changed at all, but is reliable nonetheless.\n\nThe default lexicographic comparator satisfies all constraints above.\n\nTo compare numbers instead of strings, the compare function can subtract `b`\nfrom `a`. The following function will sort the array in ascending order (if\nit doesn't contain `Infinity` and `NaN`):\n\n```js\nfunction compareNumbers(a, b) {\n  return a - b;\n}\n```\n\nThe `sort()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Array/prototype/splice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.splice()\n\nThe **`splice()`** method changes the contents of an array by\nremoving or replacing existing elements and/or adding new elements [in place](https://en.wikipedia.org/wiki/In-place_algorithm). To access part of an array without modifying it, see [`Array.prototype.slice()`](./slice.mdx).\n\n## Syntax\n\n```js\nsplice(start)\nsplice(start, deleteCount)\nsplice(start, deleteCount, item1)\nsplice(start, deleteCount, item1, item2, itemN)\n```\n\n### Parameters\n\n- `start`\n\n  - : Zero-based index at which to start changing the array, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, no element will be deleted, but the method will behave as an adding function, adding as many elements as provided.\n\n- `deleteCount` _**optional**_\n\n  - : An integer indicating the number of elements in the array to remove from `start`.\n\n    If `deleteCount` is omitted, or if its value is greater than or equal to the number of elements after the position specified by `start`, then all the elements from `start` to the end of the array will be deleted. However, if you wish to pass any `itemN` parameter, you should pass `Infinity` as `deleteCount` to delete all elements after `start`, because an explicit `undefined` gets [converted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#integer_conversion) to `0`.\n\n    If `deleteCount` is `0` or negative, no elements are removed.\n    In this case, you should specify at least one new element (see below).\n\n- `item1`, …, `itemN` _**optional**_\n\n  - : The elements to add to the array, beginning from `start`.\n\n    If you do not specify any elements, `splice()` will only remove elements from the array.\n\n### Return value\n\nAn array containing the deleted elements.\n\nIf only one element is removed, an array of one element is returned.\n\nIf no elements are removed, an empty array is returned.\n\n## Description\n\nThe `splice()` method is a mutating method. It may change the content of `this`. If the specified number of elements to insert differs from the number of elements being removed, the array's `length` will be changed as well. At the same time, it uses [`@@species`](../@@species.mdx) to create a new array instance to be returned.\n\nIf the deleted portion is sparse, the array returned by `splice()` is sparse as well, with those corresponding indices being empty slots.\n\nThe `splice()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Array/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string representing\nthe elements of the array. The elements are converted to Strings using their\n`toLocaleString` methods and these Strings are separated by a locale-specific\nString (such as a comma \",\").\n\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\n- `locales` _**optional**_\n  - : A string with a BCP 47 language tag, or an array of such strings. For the general form and interpretation of the `locales` argument, see [Locale identification and negotiation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation).\n- `options` _**optional**_\n  - : An object with configuration properties. For numbers, see [`Number.prototype.toLocaleString()`](../../../globals/Number/prototype/toLocaleString.mdx); for dates, see [`Date.prototype.toLocaleString()`](../../../globals/Date/prototype/toLocaleString.mdx).\n\n### Return value\n\nA string representing the elements of the array.\n\n## Description\n\nThe `Array.prototype.toLocaleString` method traverses its content, calling the `toLocaleString` method of every element with the `locales` and `options` parameters provided, and concatenates them with an implementation-defined separator (such as a comma \",\"). Note that the method itself does not consume the two parameters — it only passes them to the `toLocaleString()` of each element. The choice of the separator string depends on the host's current locale, not the `locales` parameter.\n\nIf an element is `undefined`, `null`, it is converted to an empty string instead of the string `\"null\"` or `\"undefined\"`.\n\nWhen used on sparse arrays, the `toLocaleString()` method iterates empty slots as if they have the value `undefined`.\n\nThe `toLocaleString()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Array/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.toString()\n\nThe **`toString()`** method returns a string representing the\nspecified array and its elements.\n\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the elements of the array.\n\n## Description\n\nThe `Array` object overrides the `toString` method of `Object`. The `toString` method of arrays calls [`join()`](../../../globals/Array/prototype/join.mdx) internally, which joins the array and returns one string containing each array element separated by commas. If the `join` method is unavailable or is not a function, [`Object.prototype.toString`](../../../globals/Object/prototype/toString.mdx) is used instead, returning `[object Array]`.\n\n```js\nconst arr = [];\narr.join = 1; // re-assign `join` with a non-function\nconsole.log(arr.toString()); // [object Array]\n\nconsole.log(Array.prototype.toString.call({ join: () => 1 })); // 1\n```\n\nJavaScript calls the `toString` method automatically when an array is to be represented as a text value or when an array is referred to in a string concatenation.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Array/prototype/unshift.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.unshift()\n\nThe **`unshift()`** method adds one or more elements to the\nbeginning of an array and returns the new length of the array.\n\n## Syntax\n\n```js\nunshift(element0)\nunshift(element0, element1)\nunshift(element0, element1, /* … ,*/ elementN)\n```\n\n### Parameters\n\n- `elementN`\n  - : The elements to add to the front of the `arr`.\n\n### Return value\n\nThe new [`Array.prototype.length`](./length.mdx) property of the object upon which the\nmethod was called.\n\n## Description\n\nThe `unshift()` method inserts the given values to the beginning of an\narray-like object.\n\n[`Array.prototype.push()`](./push.mdx) has similar behavior to `unshift()`, but applied to the end of an array.\n\nPlease note that, if multiple elements are passed as parameters, they're inserted in\nchunk at the beginning of the object, in the exact same order they were passed as\nparameters. Hence, calling `unshift()` with `n`\narguments **once**, or calling it `n` times with\n**1** argument (with a loop, for example), don't yield the same results.\n\nSee example:\n\n```js\nlet arr = [4, 5, 6];\n\narr.unshift(1, 2, 3);\nconsole.log(arr);\n// [1, 2, 3, 4, 5, 6]\n\narr = [4, 5, 6]; // resetting the array\n\narr.unshift(1);\narr.unshift(2);\narr.unshift(3);\n\nconsole.log(arr);\n// [3, 2, 1, 4, 5, 6]\n```\n\nThe `unshift()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Array/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.values()\n\nThe **`values()`** method returns a new _array [iterator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterator_protocol)_ object that iterates the value of each index in the array.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nA new iterable iterator object.\n\n## Description\n\n`Array.prototype.values()` is the default implementation of [`Array.prototype[@@iterator]()`](./@@iterator.mdx).\n\n```js\nArray.prototype.values === Array.prototype[Symbol.iterator]; // true\n```\n\nWhen used on sparse arrays, the `values()` method iterates empty slots as if they have the value `undefined`.\n\nThe `values()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/ArrayBuffer/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get ArrayBuffer\\[Symbol.species]\n\nThe **`ArrayBuffer[Symbol.species]`** accessor property returns the constructor used to construct return values from array buffer methods.\n\n> **Warning:** The existence of `Symbol.species` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Syntax\n\n```js\nArrayBuffer[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct return values from array buffer methods that create new array buffers.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `ArrayBuffer` objects. Subclass constructors may override it to change the constructor assignment. The default implementation is basically:\n\n```js\n// Hypothetical underlying implementation for illustration\nclass ArrayBuffer {\n  static get [Symbol.species]() {\n    return this;\n  }\n}\n```\n\nBecause of this polymorphic implementation, `Symbol.species` of derived subclasses would also return the constructor itself by default.\n\n```js\nclass SubArrayBuffer extends ArrayBuffer {}\nSubArrayBuffer[Symbol.species] === SubArrayBuffer; // true\n```\n\nWhen calling array buffer methods that do not mutate the existing object but return a new array buffer instance (for example, [`slice()`](./prototype/slice.mdx)), the object's `constructor[Symbol.species]` will be accessed. The returned constructor will be used to construct the return value of the array buffer method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/ArrayBuffer/ArrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer()\n\nThe **`ArrayBuffer()`** constructor is used to create \"ArrayBuffer\" objects.\n\n## Syntax\n\n```js\nnew ArrayBuffer(length)\n```\n\n> **Note:** `ArrayBuffer()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `length`\n  - : The size, in bytes, of the array buffer to create.\n\n### Return value\n\nA new `ArrayBuffer` object of the specified size. Its contents are\ninitialized to 0.\n\n### Exceptions\n\n- [`RangeError`](../RangeError/RangeError.mdx)\n  - : Thrown if the `length` is larger than `Number_MAX_SAFE_INTEGER` (≥ 2<sup>53</sup>) or negative.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/ArrayBuffer/isView.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer.isView\n\nThe **`ArrayBuffer.isView()`** method determines whether the\npassed value is one of the `ArrayBuffer` views,\nsuch as [typed array objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray)\nor a [`DataView`](../DataView/DataView.mdx).\n\n## Syntax\n\n```js\nArrayBuffer.isView(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be checked.\n\n### Return value\n\n`true` if the given argument is one of the `ArrayBuffer` views;\notherwise, `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/ArrayBuffer/prototype/byteLength.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer.prototype.byteLength\n\nThe **`byteLength`** accessor property represents the length of an `ArrayBuffer` in bytes.\n\n## Description\n\nThe `byteLength` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when the array is constructed and cannot be changed. This property returns 0 if this `ArrayBuffer` has been detached.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/ArrayBuffer/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer.prototype.slice()\n\nThe **`slice()`** method returns a new `ArrayBuffer`\nwhose contents are a copy of this `ArrayBuffer`'s bytes from\n`begin`, inclusive, up to `end`, exclusive.\n\n## Syntax\n\n```js\nslice(begin)\nslice(begin, end)\n```\n\n### Parameters\n\n- `begin`\n  - : Zero-based byte index at which to begin slicing.\n- `end` _**optional**_\n  - : Byte index before which to end slicing. If end is unspecified, the new\n    `ArrayBuffer` contains all bytes from begin to the end of this\n    `ArrayBuffer`. If negative, it will make the Byte index begin from the last\n    Byte.\n\n### Return value\n\nA new `ArrayBuffer` object.\n\n## Description\n\nThe `slice()` method copies up to, but not including, the byte indicated by\nthe `end` parameter. If either `begin` or `end` is\nnegative, it refers to an index from the end of the array, as opposed to from the\nbeginning.\n\nThe range specified by the `begin` and `end` parameters is\nclamped to the valid index range for the current array. If the computed length of the\nnew `ArrayBuffer` would be negative, it is clamped to zero.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/BigInt/BigInt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt()\n\nThe **`BigInt()`** function returns a value of type **bigint**.\n\n## Syntax\n\n```js\nBigInt(value)\n```\n\n> **Note:** `BigInt()` can only be called without `new`. Attempting to construct it with `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `value`\n  - : The numeric value of the object being created. It may be a string, an integer, a boolean, or another `BigInt`.\n\n### Return value\n\nA `BigInt` value. Number values must be integers and are converted to BigInts. The boolean value `true` becomes `1n`, and `false` becomes `0n`. Strings are parsed as if they are source text for integer literals, which means they can have leading and trailing whitespaces and can be prefixed with `0b`, `0o`, or `0x`.\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if the parameter is a non-integral number.\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if at least one of these conditions is met:\n    - The parameter cannot be converted to a primitive.\n    - After conversion to a primitive, the result is [`undefined`](../undefined.mdx), `null`, `Symbol`.\n- [`SyntaxError`](../SyntaxError/SyntaxError.mdx)\n  - : Thrown if the parameter is a string that cannot be parsed as a `BigInt`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/BigInt/asIntN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.asIntN()\n\nThe **`BigInt.asIntN`** static method clamps a `BigInt` value to the given number of bits, and returns that value as a signed integer.\n\n## Syntax\n\n```js\nBigInt.asIntN(bits, bigint)\n```\n\n### Parameters\n\n- `bits`\n  - : The amount of bits available for the returned BigInt. Should be an integer between 0 and 2<sup>53</sup> - 1, inclusive.\n- `bigint`\n  - : The BigInt value to clamp to fit into the supplied bits.\n\n### Return value\n\nThe value of `bigint` modulo 2^`bits`, as a signed integer.\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `bits` is negative or greater than 2<sup>53</sup> - 1.\n\n## Description\n\nThe `BigInt.asIntN` method clamps a `BigInt` value to the given number of bits, and interprets the result as a signed integer. For example, for `BigInt.asIntN(3, 25n)`, the value `25n` is clamped to `1n`:\n\n```plain\n25n = 00011001 (base 2)\n          ^=== Clamp to three remaining bits\n===>       001 (base 2) = 1n\n```\n\nIf the leading bit of the remaining number is `1`, the result is negative. For example, `BigInt.asIntN(4, 25n)` yields `-7n`, because `1001` is the encoding of `-7` under two's complement:\n\n```plain\n25n = 00011001 (base 2)\n         ^==== Clamp to four remaining bits\n===>      1001 (base 2) = -7n\n```\n\n> **Note:** `BigInt` values are always encoded as two's complement in binary.\n\nUnlike similar language APIs such as [`Number.prototype.toExponential()`](../Number/prototype/toExponential.mdx), `asIntN` is a static property of `BigInt`, so you always use it as `BigInt.asIntN()`, rather than as a method of a BigInt value. Exposing `asIntN()` as a \"standard library function\" allows [interop with asm.js](https://github.com/tc39/proposal-bigint/blob/master/ADVANCED.md#dont-break-asmjs).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/BigInt/asUintN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.asUintN()\n\nThe **`BigInt.asUintN`** static method clamps a `BigInt` value to the given number of bits, and returns that value as an unsigned integer.\n\n## Syntax\n\n```js\nBigInt.asUintN(bits, bigint)\n```\n\n### Parameters\n\n- `bits`\n  - : The amount of bits available for the returned BigInt. Should be an integer between 0 and 2<sup>53</sup> - 1, inclusive.\n- `bigint`\n  - : The BigInt value to clamp to fit into the supplied bits.\n\n### Return value\n\nThe value of `bigint` modulo 2^`bits`, as an unsigned integer.\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `bits` is negative or greater than 2<sup>53</sup> - 1.\n\n## Description\n\nThe `BigInt.asUintN` method clamps a `BigInt` value to the given number of bits, and interprets the result as an unsigned integer. Unsigned integers have no sign bits and are always non-negative. For example, for `BigInt.asUintN(4, 25n)`, the value `25n` is clamped to `9n`:\n\n```plain\n25n = 00011001 (base 2)\n         ^==== Clamp to four remaining bits\n===>      1001 (base 2) = 9n\n```\n\n> **Note:** `BigInt` values are always encoded as two's complement in binary.\n\nUnlike similar language APIs such as [`Number.prototype.toExponential()`](../Number/prototype/toExponential.mdx), `asUintN` is a static property of `BigInt`, so you always use it as `BigInt.asUintN()`, rather than as a method of a BigInt value. Exposing `asUintN()` as a \"standard library function\" allows [interop with asm.js](https://github.com/tc39/proposal-bigint/blob/master/ADVANCED.md#dont-break-asmjs).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/BigInt/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string with a language-sensitive representation of this BigInt. In implementations with [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) support, this method simply calls `Intl.NumberFormat`.\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` parameters customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat), these parameters correspond exactly to the [`Intl.NumberFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) constructor's parameters. Implementations without `Intl.NumberFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#locales) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored.\n\nSee the [`Intl.NumberFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string with a language-sensitive representation of the given BigInt.\n\nIn implementations with `Intl.NumberFormat`, this is equivalent to `new Intl.NumberFormat(locales, options).format(number)`.\n\n## Performance\n\nWhen formatting large numbers of numbers, it is better to create a\n`Intl.NumberFormat` object and use the function provided by its\n`format()` method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/BigInt/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified `BigInt` value. The trailing \"n\" is not part of the string.\n\n## Syntax\n\n```js\ntoString()\ntoString(radix)\n```\n\n### Parameters\n\n- `radix` _**optional**_\n  - : An integer in the range 2 through 36 specifying the base to use for representing the BigInt value. Defaults to 10.\n\n### Return value\n\nA string representing the specified `BigInt` value.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `radix` is less than 2 or greater than 36.\n\n## Description\n\nThe `BigInt` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../Object/prototype/toString.mdx). For `BigInt` values, the `toString()` method returns a string representation of the value in the specified radix.\n\nFor radixes above 10, the letters of the alphabet indicate digits greater than 9. For example, for hexadecimal numbers (base 16) `a` through `f` are used.\n\nIf the specified BigInt value is negative, the sign is preserved. This is the case even if the radix is 2; the string returned is the positive binary representation of the BigInt value preceded by a `-` sign, **not** the two's complement of the BigInt value.\n\nThe `toString()` method requires its `this` value to be a `BigInt` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to BigInt values.\n\nBecause `BigInt` doesn't have a [`[Symbol.toPrimitive]()`](../../Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `BigInt` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, BigInt _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — rather, they are directly converted using the same algorithm as the initial `toString()` implementation.\n\n```js\nBigInt.prototype.toString = () => \"Overridden\";\nconsole.log(`${1n}`); // \"1\"\nconsole.log(`${Object(1n)}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/BigInt/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.prototype.valueOf()\n\nThe **`valueOf()`** method returns the wrapped primitive value\nof a `BigInt` object.\n\n## Syntax\n\n```js\nbigIntObj.valueOf()\n```\n\n### Return value\n\nA BigInt representing the primitive value of the specified `BigInt` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/BigInt64Array/BigInt64Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt64Array()\n\nThe **`BigInt64Array()`** typed array constructor creates a\nnew `BigInt64Array` object, which is, an array of 64-bit signed integers\nin the platform byte order. If control over byte order is needed, use\n[`DataView`](../DataView/DataView.mdx) instead. The contents are initialized to `0n`. Once\nestablished, you can reference elements in the array using the object's methods, or by\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew BigInt64Array()\nnew BigInt64Array(length)\nnew BigInt64Array(typedArray)\nnew BigInt64Array(object)\n\nnew BigInt64Array(buffer)\nnew BigInt64Array(buffer, byteOffset)\nnew BigInt64Array(buffer, byteOffset, length)\n```\n\n> **Note:** `BigInt64Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/BigUint64Array/BigUint64Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigUint64Array()\n\nThe **`BigUint64Array()`** typed array constructor creates a\nnew `BigUint64Array` object, which is, an array of 64-bit unsigned integers\nin the platform byte order. If control over byte order is needed, use\n[`DataView`](../DataView/DataView.mdx) instead. The contents are initialized to `0n`. Once\nestablished, you can reference elements in the array using the object's methods, or by\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew BigUint64Array()\nnew BigUint64Array(length)\nnew BigUint64Array(typedArray)\nnew BigUint64Array(object)\n\nnew BigUint64Array(buffer)\nnew BigUint64Array(buffer, byteOffset)\nnew BigUint64Array(buffer, byteOffset, length)\n```\n\n> **Note:** `BigUint64Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](..//TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Blob/Blob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob()\n\nThe **`Blob()`** constructor creates a `Blob` object, which represents a file-like object of immutable, raw data.\n\n## Syntax\n\n```js\nnew Blob()\nnew Blob(array)\nnew Blob(array, options)\n```\n\n> **Note:** `Blob()` can only be constructed with `new`. Attempting to call it without `new` throws a `TypeError`.\n\n### Parameters\n\n- `array` _**optional**_\n\n  - : An array of values to include in the `Blob`. These can be [`ArrayBuffer`](../../globals/ArrayBuffer/ArrayBuffer.mdx), [`Blob`](../../globals/Blob/Blob.mdx), or strings. If any of these elements is a [`Blob`](../../globals/Blob/Blob.mdx), its content (and not the object itself) is copied into the Blob being constructed.\n\n- `options` _**optional**_\n\n  - : An object containing optional attributes for the `Blob`.\n    - `type`\n      - : A string indicating the MIME type of the data. The default value is the empty string `\"\"`.\n    - `endings`\n      - : A string indicating how to handle line endings in the data. This can be either `\"transparent\"` (default) to keep line endings unchanged, or `\"native\"` to convert line endings to the platform's native line endings (e.g., `\\r\\n` on Windows).\n\n### Return value\n\nA new `Blob` object containing the specified data.\n\n## Description\n\n`Blob` objects represent data that isn't necessarily in a JavaScript-native format. The `File` interface is based on `Blob`, inheriting its functionality and expanding it to support files on the user's system.\n\nTo construct a `Blob` from other non-blob objects and data, use the `Blob()` constructor. To create a blob that contains a subset of another blob's data, use the [`slice()`](../../globals/Blob/prototype/slice.mdx) method.\n\nThe `type` property of a `Blob` object will match the MIME type specified in the constructor's `options` parameter, defaulting to an empty string if not specified.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Blob/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the `Blob` interface returns a `Promise` that resolves with an `ArrayBuffer` containing the entire contents of the `Blob` as binary data.\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with an `ArrayBuffer` containing the blob's data.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Blob/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.size\n\nThe **`size`** read-only property of the `Blob` interface returns the size of the `Blob` in bytes.\n\n## Value\n\nA number representing the size of the `Blob` in bytes.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Blob/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.slice()\n\nThe **`slice()`** method of the `Blob` interface creates and returns a new `Blob` object which contains data from a subset of the blob on which it's called.\n\n## Syntax\n\n```js\nslice()\nslice(start)\nslice(start, end)\nslice(start, end, contentType)\n```\n\n### Parameters\n\n- `start` _**optional**_\n  - : The 0-based index of the first byte to include in the new `Blob`. If negative, it refers to an index from the end of the `Blob`. The default value is 0.\n- `end` _**optional**_\n  - : The 0-based index of the first byte that will not be included in the new `Blob`. If negative, it refers to an index from the end of the `Blob`. The default value is `size`.\n- `contentType` _**optional**_\n  - : A string indicating the content type to assign to the new `Blob`. The default value is an empty string.\n\n### Return value\n\nA new `Blob` object containing the specified subset of data.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Blob/prototype/stream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.stream()\n\nThe **`stream()`** method of the `Blob` interface returns a `ReadableStream` that can be used to read the contents of the `Blob`.\n\n## Syntax\n\n```js\nstream()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `ReadableStream` that provides the data contained within the `Blob`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Blob/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.text()\n\nThe **`text()`** method of the `Blob` interface returns a `Promise` that resolves with a string containing the contents of the blob, interpreted as UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a string containing the blob's data as a text string. The data is always interpreted as UTF-8.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Blob/prototype/type.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.type\n\nThe **`type`** read-only property of the `Blob` interface returns the MIME type of the `Blob`.\n\n## Value\n\nA string indicating the MIME type of the `Blob`. If the type cannot be determined, this returns an empty string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Boolean/Boolean.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Boolean()\n\nThe **`Boolean()`** constructor can create `Boolean` objects or return primitive values of type boolean.\n\n## Syntax\n\n```js\nnew Boolean(value)\nBoolean(value)\n```\n\n> **Note:** `Boolean()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\n- `value`\n  - : The initial value of the `Boolean` object.\n\n### Return value\n\nWhen `Boolean()` is called as a constructor (with `new`), it creates a `Boolean` object, which is **not** a primitive.\n\nWhen `Boolean()` is called as a function (without `new`), it coerces the parameter to a boolean primitive.\n\n> **Warning:** You should rarely find yourself using `Boolean` as a constructor.\n\n## Description\n\nThe value passed as the first parameter is [converted to a boolean value](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean#boolean_coercion). If the value is omitted or is `0`, `-0`, `0n`, [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null), `false`, [`NaN`](../NaN.mdx), [`undefined`](../undefined.mdx), or the empty string (`\"\"`), then the object has an initial value of `false`. All other values, including any object, an empty array (`[]`), or the string `\"false\"`, create an object with an initial value of `true`.\n\n> **Note:** When the non-standard property [`document.all`](https://developer.mozilla.org/docs/Web/API/Document/all) is used as an argument for this constructor, the result is a `Boolean` object with the value `false`. This property is legacy and non-standard and should not be used.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Boolean/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Boolean.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified boolean value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified boolean value.\n\n## Description\n\nThe `Boolean` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../Object/prototype/toString.mdx). For `Boolean` values, the `toString` method returns a string representation of the boolean value, which is either `\"true\"` or `\"false\"`.\n\nThe `toString()` method requires its `this` value to be a `Boolean` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to boolean values.\n\nBecause `Boolean` doesn't have a [`[Symbol.toPrimitive]()`](../../Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `Boolean` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, boolean _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — rather, they are directly converted using the same algorithm as the initial `toString()` implementation.\n\n```js\nBoolean.prototype.toString = () => \"Overridden\";\nconsole.log(`${true}`); // \"true\"\nconsole.log(`${new Boolean(true)}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Boolean/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Boolean.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a\n`Boolean` object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nThe primitive value of the given `Boolean` object.\n\n## Description\n\nThe `valueOf()` method of `Boolean` returns the primitive value\nof a `Boolean` object or literal `Boolean` as a Boolean data type.\n\nThis method is usually called internally by JavaScript and not explicitly in code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/ByteLengthQueuingStrategy/ByteLengthQueuingStrategy.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ByteLengthQueuingStrategy()\n\nThe **`ByteLengthQueuingStrategy()`**\nconstructor creates and returns a `ByteLengthQueuingStrategy` object\ninstance.\n\n## Syntax\n\n```js\nnew ByteLengthQueuingStrategy(highWaterMark)\n```\n\n### Parameters\n\nAn object with the following property:\n\n- `highWaterMark`\n\n  - : The total number of bytes that can be contained in the internal queue before backpressure is applied.\n\n    Unlike `CountQueuingStrategy()` where the `highWaterMark` parameter specifies a simple count of the number of chunks, with `ByteLengthQueuingStrategy()`, the `highWaterMark` parameter specifies a number of _bytes_ — specifically, given a stream of chunks, how many bytes worth of those chunks (rather than a count of how many of those chunks) can be contained in the internal queue before backpressure is applied.\n\n### Return value\n\nAn instance of the `ByteLengthQueuingStrategy` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/ByteLengthQueuingStrategy/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ByteLengthQueuingStrategy.size()\n\nThe **`size()`** method of the\n`ByteLengthQueuingStrategy` interface returns the given chunk's\n`byteLength` property.\n\n## Syntax\n\n```js\nsize(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : A chunk of data being passed through the stream.\n\n### Return value\n\nAn integer representing the byte length of the given chunk.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/CompressionStream/CompressionStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CompressionStream()\n\nThe **`CompressionStream()`** constructor creates a new `CompressionStream` object which compresses a stream of data.\n\n## Syntax\n\n```js\nnew CompressionStream(format)\n```\n\n### Parameters\n\n- `format`\n\n  - : One of the following allowed compression formats:\n\n    - `\"gzip\"`\n    - `\"deflate\"`\n    - `\"deflate-raw\"`\n\n## Exceptions\n\n- `TypeError`\n  - : Thrown if the format passed to the constructor is not supported.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/CompressionStream/prototype/readable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CompressionStream.readable\n\nThe **`readable`** read-only property of the `CompressionStream` interface returns a `ReadableStream`.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/CompressionStream/prototype/writable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CompressionStream.writable\n\nThe **`writable`** read-only property of the `CompressionStream` interface returns a `WritableStream`.\n\n## Value\n\nA `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/CryptoKey/CryptoKey.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CryptoKey\n\nThe **`CryptoKey`** interface represents a cryptographic key obtained from one of the [`SubtleCrypto`](../SubtleCrypto/SubtleCrypto.mdx) method [`importKey()`](../SubtleCrypto/prototype/importKey.mdx).\n\n## Instance properties\n\n- [`type`](./prototype/type.mdx) _**readonly**_\n  - : The type of key the object represents. It may take one of the following values: `\"secret\"`, `\"private\"` or `\"public\"`.\n\n- [`extractable`](./prototype/extractable.mdx) _**readonly**_\n  - : A boolean value indicating whether or not the key may be extracted.\n\n- [`algorithm`](./prototype/algorithm.mdx) _**readonly**_\n  - : An object describing the algorithm for which this key can be used and any associated extra parameters.\n\n- [`usages`](./prototype/usages.mdx) _**readonly**_\n  - : An `Array` of strings, indicating what can be done with the key. Possible values for array elements are `\"encrypt\"`, `\"decrypt\"`, `\"sign\"`, `\"verify\"`, `\"deriveKey\"`, `\"deriveBits\"`, `\"wrapKey\"`, and `\"unwrapKey\"`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/CryptoKey/prototype/algorithm.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# algorithm\n\nThe read-only **`algorithm`** property of the [`CryptoKey`](../CryptoKey.mdx) interface returns an object describing the algorithm for which this key can be used, and any associated extra parameters.\n\nThe object returned depends of the algorithm used to generate the key.\n\n## Value\n\nAn object matching:\n\n- [`RsaHashedImportParams`](../../RsaHashedImportParams/RsaHashedImportParams.mdx) if the algorithm is any of the RSA variants.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/CryptoKey/prototype/extractable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# extractable\n\nThe read-only **`extractable`** property indicates whether or not the key may be extracted.\n\nIf the key cannot be exported, an exception will be thrown if an attempt to extract the key is made.\n\n## Value\n\nA boolean value that is `true` if the key can be exported and `false` if not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/CryptoKey/prototype/type.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# type\n\nThe read-only **`type`** property indicates which kind of key is represented by the object. It can have the following values:\n\n- `\"secret\"`: This key is a secret key for use with a symmetric algorithm.\n- `\"private\"`: This key is the private half of an asymmetric algorithm's key pair.\n- `\"public\"`: This key is the public half of an asymmetric algorithm's key pair.\n\n## Value\n\nOne of the following strings: `\"secret\"`, `\"private\"`, or `\"public\"`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/CryptoKey/prototype/usages.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# usages\n\nThe read-only **`usages`** property indicates what can be done with the key.\n\n## Value\n\nAn `Array` of strings from the following list:\n\n- `\"encrypt\"`: The key may be used to encrypt messages.\n- `\"decrypt\"`: The key may be used to decrypt messages.\n- `\"sign\"`: The key may be used to sign messages.\n- `\"verify\"`: The key may be used to verify signatures.\n- `\"deriveKey\"`: The key may be used in deriving a new key.\n- `\"deriveBits\"`: The key may be used in deriving bits.\n- `\"wrapKey\"`: The key may be used to wrap a key.\n- `\"unwrapKey\"`: The key may be used to unwrap a key.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/DOMException/DOMException.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException()\n\nThe **`DOMException()`** constructor returns a `DOMException` object with a specified message and name.\n\n## Syntax\n\n```js\nnew DOMException()\nnew DOMException(message)\nnew DOMException(message, name)\n```\n\n### Parameters\n\n- `message` _optional_\n  - : A description of the exception. If not present, the empty string `''` is\n    used.\n- `name` _optional_\n  - : A string. If the specified name is a [standard error name](#error-names), then getting the [`code`](./code.mdx) property of the `DOMException` object will return the code number corresponding to the specified name.\n\n### Return value\n\nA newly created `DOMException` object.\n\n## Error names\n\nCommon error names are listed here. Some APIs define their own sets of names, so this is not necessarily a complete list.\n\nNote that the following deprecated historical errors don't have an error name but instead have only a legacy constant code value and a legacy constant name:\n\n- Legacy code value: `2`, legacy constant name: `DOMSTRING_SIZE_ERR`\n- Legacy code value: `6`, legacy constant name: `NO_DATA_ALLOWED_ERR`\n- Legacy code value: `16`, legacy constant name: `VALIDATION_ERR`\n\n> **Note:** Because historically the errors were identified by a numeric value that corresponded with a named variable defined to have that value, some of the entries below indicate the legacy code value and constant name that were used in the past.\n\n- `IndexSizeError`\n  - : The index is not in the allowed range. (Legacy code value: `1` and legacy constant name: `INDEX_SIZE_ERR`)\n- `HierarchyRequestError`\n  - : The node tree hierarchy is not correct. (Legacy code value: `3` and legacy constant name: `HIERARCHY_REQUEST_ERR`)\n- `WrongDocumentError`\n  - : The object is in the wrong `Document`. (Legacy code value: `4` and legacy constant name: `WRONG_DOCUMENT_ERR`)\n- `InvalidCharacterError`\n  - : The string contains invalid characters. (Legacy code value: `5` and legacy constant name: `INVALID_CHARACTER_ERR`)\n- `NoModificationAllowedError`\n  - : The object cannot be modified. (Legacy code value: `7` and legacy constant name: `NO_MODIFICATION_ALLOWED_ERR`)\n- `NotFoundError`\n  - : The object cannot be found here. (Legacy code value: `8` and legacy constant name: `NOT_FOUND_ERR`)\n- `NotSupportedError`\n  - : The operation is not supported. (Legacy code value: `9` and legacy constant name: `NOT_SUPPORTED_ERR`)\n- `InvalidStateError`\n  - : The object is in an invalid state. (Legacy code value: `11` and legacy constant name: `INVALID_STATE_ERR`)\n- `InUseAttributeError`\n  - : The attribute is in use. (Legacy code value: `10` and legacy constant name: `INUSE_ATTRIBUTE_ERR`)\n- `SyntaxError`\n  - : The string did not match the expected pattern. (Legacy code value: `12` and legacy constant name: `SYNTAX_ERR`)\n- `InvalidModificationError`\n  - : The object cannot be modified in this way. (Legacy code value: `13` and legacy constant name: `INVALID_MODIFICATION_ERR`)\n- `NamespaceError`\n  - : The operation is not allowed by Namespaces in XML. (Legacy code value: `14` and legacy constant name: `NAMESPACE_ERR`)\n- `InvalidAccessError`\n  - : The object does not support the operation or argument. (Legacy code value: `15` and legacy constant name: `INVALID_ACCESS_ERR`)\n- `TypeMismatchError` *deprecated*\n  - : The type of the object does not match the expected type. (Legacy code value: `17` and legacy constant name: `TYPE_MISMATCH_ERR`) This value is deprecated; the JavaScript `TypeError` exception is now raised instead of a `DOMException` with this value.\n- `SecurityError`\n  - : The operation is insecure. (Legacy code value: `18` and legacy constant name: `SECURITY_ERR`)\n- `NetworkError`\n  - : A network error occurred. (Legacy code value: `19` and legacy constant name: `NETWORK_ERR`)\n- `AbortError`\n  - : The operation was aborted. (Legacy code value: `20` and legacy constant name: `ABORT_ERR`)\n- `URLMismatchError`\n  - : The given URL does not match another URL. (Legacy code value: `21` and legacy constant name: `URL_MISMATCH_ERR`)\n- `QuotaExceededError`\n  - : The quota has been exceeded. (Legacy code value: `22` and legacy constant name: `QUOTA_EXCEEDED_ERR`)\n- `TimeoutError`\n  - : The operation timed out. (Legacy code value: `23` and legacy constant name: `TIMEOUT_ERR`)\n- `InvalidNodeTypeError`\n  - : The node is incorrect or has an incorrect ancestor for this operation. (Legacy code value: `24` and legacy constant name: `INVALID_NODE_TYPE_ERR`)\n- `DataCloneError`\n  - : The object can not be cloned. (Legacy code value: `25` and legacy constant name: `DATA_CLONE_ERR`)\n- `EncodingError`\n  - : The encoding or decoding operation failed (No legacy code value and constant name).\n- `NotReadableError`\n  - : The input/output read operation failed (No legacy code value and constant name).\n- `UnknownError`\n  - : The operation failed for an unknown transient reason (e.g. out of memory) (No legacy code value and constant name).\n- `ConstraintError`\n  - : A mutation operation in a transaction failed because a constraint was not satisfied (No legacy code value and constant name).\n- `DataError`\n  - : Provided data is inadequate (No legacy code value and constant name).\n- `TransactionInactiveError`\n  - : A request was placed against a transaction that is currently not active or is finished (No legacy code value and constant name).\n- `ReadOnlyError`\n  - : The mutating operation was attempted in a \"readonly\" transaction (No legacy code value and constant name).\n- `VersionError`\n  - : An attempt was made to open a database using a lower version than the existing version (No legacy code value and constant name).\n- `OperationError`\n  - : The operation failed for an operation-specific reason (No legacy code value and constant name).\n- `NotAllowedError`\n  - : The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission (No legacy code value and constant name)."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/DOMException/code.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException.prototype.code\n\nThe **`code`** read-only property of the `DOMException` interface returns one of the legacy [error code constants](./DOMException.mdx#error-names), or `0` if none match.\n\nThis field is used for historical reasons. New DOM exceptions don't use this anymore: they put this info in the [`name`](./name.mdx) attribute.\n\n## Value\n\nOne of the [error code constants](./DOMException.mdx#error-names), or `0` if none match.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/DOMException/message.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException.prototype.message\n\nThe **`message`** read-only property of the `DOMException` interface returns a string representing a message or description associated with the given [error name](./DOMException.mdx#error-names).\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/DOMException/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException.prototype.name\n\nThe **`name`** read-only property of the `DOMException` interface returns a string that contains one of the strings associated with an [error name](./DOMException.mdx#error-names).\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/DataView/DataView.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView()\n\nThe **`DataView()`** constructor is used to create `DataView` objects.\n\n## Syntax\n\n```js\nnew DataView(buffer)\nnew DataView(buffer, byteOffset)\nnew DataView(buffer, byteOffset, byteLength)\n```\n\n> **Note:** `DataView()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `buffer`\n  - : An existing `ArrayBuffer` to use as\n    the storage backing the new `DataView` object.\n- `byteOffset` _**optional**_\n  - : The offset, in bytes, to the first byte in the above buffer for the new view to\n    reference. If unspecified, the buffer view starts with the first byte.\n- `byteLength` _**optional**_\n  - : The number of elements in the byte array. If unspecified, the view's length will\n    match the buffer's length.\n\n### Return value\n\nA new `DataView` object representing the specified data buffer.\n\n### Exceptions\n\n- [`RangeError`](../RangeError/RangeError.mdx)\n\n  - : Thrown if the `byteOffset` or `byteLength` parameter values\n    result in the view extending past the end of the buffer.\n\n    For example, if the buffer is 16 bytes long, the `byteOffset` is 8, and\n    the `byteLength` is 10, this error is thrown because the resulting view\n    tries to extend 2 bytes past the total length of the buffer.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/DataView/prototype/buffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.buffer\n\nThe **`buffer`** accessor property represents the `ArrayBuffer` referenced by the `DataView` at construction time.\n\n## Description\n\nThe `buffer` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when the `DataView` is constructed and cannot be changed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/DataView/prototype/byteLength.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.byteLength\n\nThe **`byteLength`** accessor property represents the length (in bytes) of the dataview.\n\n## Description\n\nThe `byteLength` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when an `DataView` is constructed and cannot be changed. If the `DataView` is not specifying an offset or a `byteLength`, the `byteLength` of the referenced `ArrayBuffer` or `SharedArrayBuffer` will be returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/DataView/prototype/byteOffset.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.byteOffset\n\nThe **`byteOffset`** accessor property represents the offset (in bytes) of this view from the start of its `ArrayBuffer`.\n\n## Description\n\nThe `byteOffset` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when an `DataView` is constructed and cannot be changed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/DataView/prototype/getBigInt64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getBigInt64()\n\nThe **`getBigInt64()`** method gets a signed 64-bit integer\n(long long) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetBigInt64(byteOffset)\ngetBigInt64(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to read the data from.\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is read.\n\n### Return value\n\nA `BigInt`.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would read beyond the end\n    of the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/DataView/prototype/getBigUint64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getBigUint64()\n\nThe **`getBigUint64()`** method gets an unsigned 64-bit integer\n(unsigned long long) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetBigUint64(byteOffset)\ngetBigUint64(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to read the data from.\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is read.\n\n### Return value\n\nA `BigInt`.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would read beyond the end\n    of the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/DataView/prototype/getFloat32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getFloat32()\n\nThe **`getFloat32()`** method gets a signed 32-bit float\n(float) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetFloat32(byteOffset)\ngetFloat32(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 32-bit float number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/DataView/prototype/getFloat64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getFloat64()\n\nThe **`getFloat64()`** method gets a signed 64-bit float\n(double) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetFloat64(byteOffset)\ngetFloat64(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 64-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 64-bit float number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/DataView/prototype/getInt16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getInt16()\n\nThe **`getInt16()`** method gets a signed 16-bit integer\n(short) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetInt16(byteOffset)\ngetInt16(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 16-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/DataView/prototype/getInt32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getInt32()\n\nThe **`getInt32()`** method gets a signed 32-bit integer (long)\nat the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetInt32(byteOffset)\ngetInt32(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in bytes, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 32-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/DataView/prototype/getInt8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getInt8()\n\nThe **`getInt8()`** method gets a signed 8-bit integer (byte)\nat the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetInt8(byteOffset)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n\n### Return value\n\nA signed 8-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/DataView/prototype/getUint16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getUint16()\n\nThe **`getUint16()`** method gets an unsigned 16-bit integer\n(unsigned short) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n\n\n## Syntax\n\n```js\ngetUint16(byteOffset)\ngetUint16(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nAn unsigned 16-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/DataView/prototype/getUint32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getUint32()\n\nThe **`getUint32()`** method gets an unsigned 32-bit integer\n(unsigned long) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n\n\n## Syntax\n\n```js\ngetUint32(byteOffset)\ngetUint32(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nAn unsigned 32-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/DataView/prototype/getUint8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getUint8()\n\nThe **`getUint8()`** method gets an unsigned 8-bit integer\n(unsigned byte) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetUint8(byteOffset)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n\n### Return value\n\nAn unsigned 8-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/DataView/prototype/setBigInt64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setBigInt64()\n\nThe **`setBigInt64()`** method stores a signed 64-bit integer\n(long long) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetBigInt64(byteOffset, value)\nsetBigInt64(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to store the data from.\n- value\n  - : The value to set as a `BigInt`. The highest possible value that fits in\n    a signed 64-bit integer is\n    `2n ** (64n -1n) - 1n` (`9223372036854775807n`). Upon\n    overflow, it will be negative (`-9223372036854775808n`).\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/DataView/prototype/setBigUint64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setBigUint64()\n\nThe **`setBigUint64()`** method stores an unsigned 64-bit\ninteger (unsigned long long) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetBigUint64(byteOffset, value)\nsetBigUint64(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to store the data from.\n- value\n  - : The value to set as a `BigInt`. The highest possible value that fits in\n    an unsigned 64-bit integer is\n    `2n ** 64n - 1n`\n    (`18446744073709551615n`). Upon overflow, it will be zero\n    (`0n`).\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/DataView/prototype/setFloat32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setFloat32()\n\nThe **`setFloat32()`** method stores a signed 32-bit float\n(float) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetFloat32(byteOffset, value)\nsetFloat32(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/DataView/prototype/setFloat64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setFloat64()\n\nThe **`setFloat64()`** method stores a signed 64-bit float\n(double) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetFloat64(byteOffset, value)\nsetFloat64(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 64-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/DataView/prototype/setInt16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setInt16()\n\nThe **`setInt16()`** method stores a signed 16-bit integer\n(short) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetInt16(byteOffset, value)\nsetInt16(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/DataView/prototype/setInt32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setInt32()\n\nThe **`setInt32()`** method stores a signed 32-bit integer\n(long) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetInt32(byteOffset, value)\nsetInt32(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/DataView/prototype/setInt8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setInt8()\n\nThe **`setInt8()`** method stores a signed 8-bit integer (byte)\nvalue at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetInt8(byteOffset, value)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/DataView/prototype/setUint16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setUint16()\n\nThe **`setUint16()`** method stores an unsigned 16-bit integer\n(unsigned short) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetUint16(byteOffset, value)\nsetUint16(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/DataView/prototype/setUint32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setUint32()\n\nThe **`setUint32()`** method stores an unsigned 32-bit integer\n(unsigned long) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetUint32(byteOffset, value)\nsetUint32(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/DataView/prototype/setUint8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setUint8()\n\nThe **`setUint8()`** method stores an unsigned 8-bit integer\n(byte) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetUint8(byteOffset, value)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/Date.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date()\n\nThe **`Date()`** constructor can create a `Date` instance or return a string representing the current time.\n\n## Syntax\n\n```js\nnew Date()\nnew Date(value)\nnew Date(dateString)\nnew Date(dateObject)\n\nnew Date(year, monthIndex)\nnew Date(year, monthIndex, day)\nnew Date(year, monthIndex, day, hours)\nnew Date(year, monthIndex, day, hours, minutes)\nnew Date(year, monthIndex, day, hours, minutes, seconds)\nnew Date(year, monthIndex, day, hours, minutes, seconds, milliseconds)\n\nDate()\n```\n\n> **Note:** `Date()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\nThere are five basic forms for the `Date()` constructor:\n\n#### No parameters\n\nWhen no parameters are provided, the newly-created `Date` object represents the current date and time as of the time of instantiation.\n\n#### Time value or timestamp number\n\n- `value`\n  - : An integer value representing the number of milliseconds since January 1, 1970, 00:00:00 UTC (the ECMAScript epoch, equivalent to the UNIX epoch), with leap seconds ignored. Keep in mind that most [UNIX Timestamp](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_16) functions are only accurate to the nearest second.\n\n#### Date string\n\n- `dateString`\n\n  - : A string value representing a date, in a format recognized by the [`Date.parse()`](./parse.mdx) method. (The ECMA262 spec specifies a [simplified version of ISO 8601](https://tc39.es/ecma262/#sec-date-time-string-format), but other formats can be implementation-defined, which commonly include [IETF-compliant RFC 2822 timestamps](https://datatracker.ietf.org/doc/html/rfc2822#page-14).)\n\n    > **Note:** When parsing date strings with the `Date` constructor (and `Date.parse`, they are equivalent), always make sure that the input conforms to the ISO 8601 format (`YYYY-MM-DDTHH:mm:ss.sssZ`) — the parsing behavior with other formats is implementation-defined and may not work across all browsers. Support for [RFC 2822](https://datatracker.ietf.org/doc/html/rfc2822) format strings is by convention only. A library can help if many different formats are to be accommodated.\n    >\n    > Date-only strings (e.g. `\"1970-01-01\"`) are treated as UTC, while date-time strings (e.g. `\"1970-01-01T12:00\"`) are treated as local. You are therefore also advised to make sure the input format is consistent between the two types.\n\n#### Date object\n\n- `dateObject`\n  - : An existing `Date` object. This effectively makes a copy of the existing `Date` object with the same date and time. This is equivalent to `new Date(dateObject.valueOf())`, except the `valueOf()` method is not called.\n\nWhen one parameter is passed to the `Date()` constructor, `Date` instances are specially treated. All other values are [converted to primitives](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion). If the result is a string, it will be parsed as a date string. Otherwise, the resulting primitive is further coerced to a number and treated as a timestamp.\n\n#### Individual date and time component values\n\nGiven at least a year and month, this form of `Date()` returns a `Date` object whose component values (year, month, day, hour, minute, second, and millisecond) all come from the following parameters. Any missing fields are given the lowest possible value (`1` for `day` and `0` for every other component). The parameter values are all evaluated against the local time zone, rather than UTC.\n\nIf any parameter overflows its defined bounds, it \"carries over\". For example, if a `monthIndex` greater than `11` is passed in, those months will cause the year to increment; if a `minutes` greater than `59` is passed in, `hours` will increment accordingly, etc. Therefore, `new Date(1990, 12, 1)` will return January 1st, 1991; `new Date(2020, 5, 19, 25, 65)` will return 2:05 A.M. June 20th, 2020.\n\nSimilarly, if any parameter underflows, it \"borrows\" from the higher positions. For example, `new Date(2020, 5, 0)` will return May 31st, 2020.\n\n- `year`\n  - : Integer value representing the year. Values from `0` to `99` map to the years `1900` to `1999`. All other values are the actual year. See the [example](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years).\n- `monthIndex`\n  - : Integer value representing the month, beginning with `0` for January to `11` for December.\n- `day` _**optional**_\n  - : Integer value representing the day of the month. The default is `1`.\n- `hours` _**optional**_\n  - : Integer value between `0` and `23` representing the hour of the day. Defaults to `0`.\n- `minutes` _**optional**_\n  - : Integer value representing the minute segment of a time. The default is `0` minutes past the hour.\n- `seconds` _**optional**_\n  - : Integer value representing the second segment of a time. The default is `0` seconds past the minute.\n- `milliseconds` _**optional**_\n  - : Integer value representing the millisecond segment of a time. The default is `0` milliseconds past the second.\n\n### Return value\n\nCalling `new Date()` (the `Date()` constructor) returns a [`Date`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date) object. If called with an invalid date string, or if the date to be constructed will have a UNIX timestamp less than `-8,640,000,000,000,000` or greater than `8,640,000,000,000,000` milliseconds, it returns a `Date` object whose [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toString) method returns the literal string `Invalid Date`.\n\nCalling the `Date()` function (without the `new` keyword) returns a string representation of the current date and time, exactly as `new Date().toString()` does. Any arguments given in a `Date()` function call (without the `new` keyword) are ignored; regardless of whether it's called with an invalid date string — or even called with any arbitrary object or other primitive as an argument — it always returns a string representation of the current date and time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/UTC.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.UTC()\n\nThe **`Date.UTC()`** method accepts parameters similar to the\n`Date` constructor, but treats them as UTC. It returns the number of\nmilliseconds since January 1, 1970, 00:00:00 UTC.\n\n\n\n## Syntax\n\n```js\nDate.UTC(year)\nDate.UTC(year, monthIndex)\nDate.UTC(year, monthIndex, day)\nDate.UTC(year, monthIndex, day, hour)\nDate.UTC(year, monthIndex, day, hour, minute)\nDate.UTC(year, monthIndex, day, hour, minute, second)\nDate.UTC(year, monthIndex, day, hour, minute, second, millisecond)\n```\n\n- `year`\n\n  - : Integer value representing the year.\n\n    Values from `0` to `99` map to the years\n    `1900` to `1999`. All other values are the actual year.\n    See the [example](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years).\n\n- `monthIndex` _**optional**_\n  - : An integer between `0` (January) and `11` (December)\n    representing the month. Since ECMAScript 2017 it defaults to `0` if\n    omitted. _(Up until ECMAScript 2016, `monthIndex` was a required\n    parameter. As of ES2017, it no longer is.)_\n- `day` _**optional**_\n  - : An integer between `1` and `31` representing the day of the\n    month. If omitted, defaults to `1`.\n- `hour` _**optional**_\n  - : An integer between `0` and `23` representing the hours. If\n    omitted, defaults to `0`.\n- `minute` _**optional**_\n  - : An integer between `0` and `59` representing the minutes. If\n    omitted, defaults to `0`.\n- `second` _**optional**_\n  - : An integer between `0` and `59` representing the seconds. If\n    omitted, defaults to `0`.\n- `millisecond` _**optional**_\n  - : An integer between `0` and `999` representing the\n    milliseconds. If omitted, defaults to `0`.\n\n### Return value\n\nA number representing the number of milliseconds for the given date since January 1,\n1970, 00:00:00, UTC.\n\n## Description\n\n`UTC()` takes comma-delimited date and time parameters and returns the\nnumber of milliseconds between January 1, 1970, 00:00:00, universal time and the\nspecified date and time.\n\nYears between `0` and `99` are converted to a year in the\n20th century `(1900 + year)`. For example, `95` is\nconverted to the year `1995`.\n\nThe `UTC()` method differs from the `Date` constructor in two\nways:\n\n1. `Date.UTC()` uses universal time instead of the local time.\n2. `Date.UTC()` returns a time value as a number instead of creating a\n   `Date` object.\n\nIf a parameter is outside of the expected range, the `UTC()` method updates\nthe other parameters to accommodate the value. For example, if `15` is used\nfor `monthIndex`, the year will be incremented by 1\n`(year + 1)` and `3` will be used for the month.\n\n`UTC()` is a static method of `Date`, so it's called as\n`Date.UTC()` rather than as a method of a `Date` instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/now.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.now()\n\nThe static **`Date.now()`** method returns the number of milliseconds elapsed since the [epoch](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps), which is defined as the midnight at the beginning of January 1, 1970, UTC.\n\n## Syntax\n\n```js\nDate.now()\n```\n\n### Return value\n\nA number representing the number of milliseconds elapsed since the [epoch](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps), which is defined as the midnight at the beginning of January 1, 1970, UTC.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/parse.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.parse()\n\nThe **`Date.parse()`** method parses a string representation of\na date, and returns the number of milliseconds since January 1, 1970, 00:00:00 UTC or\n`NaN` if the string is unrecognized or, in some cases, contains illegal date\nvalues (e.g. 2015-02-31).\n\nOnly the [ISO 8601 format](https://tc39.es/ecma262/#sec-date-time-string-format) (`YYYY-MM-DDTHH:mm:ss.sssZ`) is explicitly specified to be supported. Other formats are implementation-defined and may not work across all browsers. A library can help if many different formats are to be accommodated.\n\n## Syntax\n\n```js\nDate.parse(dateString)\n```\n\n### Parameters\n\n- `dateString`\n  - : A string representing [a simplification of the ISO 8601 calendar date extended format](#date-time-string-format).\n    (Other formats may be used, but results are implementation-dependent.)\n\n### Return value\n\nA number representing the milliseconds elapsed since January 1, 1970, 00:00:00 UTC and\nthe date obtained by parsing the given string representation of a date. If the argument\ndoesn't represent a valid date, [`NaN`](../NaN.mdx) is returned.\n\n## Description\n\nThe `parse()` method takes a date string (such as\n`\"2011-10-10T14:48:00\"`) and returns the number of milliseconds since January\n1, 1970, 00:00:00 UTC.\n\nThis function is useful for setting date values based on string values, for example in\nconjunction with the [`setTime()`](./prototype/setTime.mdx) method and the\n`Date` object.\n\n### Date Time String Format\n\nThe standard string representation of a date time string is a simplification of the ISO\n8601 calendar date extended format.\n(See the section [Date Time String Format](https://tc39.es/ecma262/#sec-date-time-string-format)\nin the ECMAScript specification for more details.)\n\nFor example, `\"2011-10-10\"` (_date-only_ form),\n`\"2011-10-10T14:48:00\"` (_date-time_ form), or\n`\"2011-10-10T14:48:00.000+09:00\"` (_date-time_ form with milliseconds\nand time zone) can be passed and will be parsed. When the time zone offset is absent,\ndate-only forms are interpreted as a UTC time and date-time forms are interpreted as\nlocal time.\n\nWhile time zone specifiers are used during date string parsing to interpret the\nargument, the value returned is always the number of milliseconds between January 1,\n1970 00:00:00 UTC and the point in time represented by the argument or `NaN`.\n\nBecause `parse()` is a static method of `Date`, it is called as\n`Date.parse()` rather than as a method of a `Date` instance.\n\n### Fall-back to implementation-specific date formats\n\n> **Note:** This section contains implementation-specific behavior that can be inconsistent\n> across implementations.\n\nThe ECMAScript specification states: If the String does not conform to the standard\nformat the function may fall back to any implementation–specific heuristics or\nimplementation–specific parsing algorithm. Unrecognizable strings or dates containing\nillegal element values in ISO formatted strings shall cause `Date.parse()` to\nreturn [`NaN`](../NaN.mdx).\n\nHowever, invalid values in date strings not recognized as simplified ISO format as\ndefined by ECMA-262 may or may not result in [`NaN`](../NaN.mdx), depending on the browser\nand values provided, e.g.:\n\n```js\n// Non-ISO string with invalid date values\nnew Date(\"23/25/2014\");\n```\n\nwill be treated as a local date of 25 November, 2015 in Firefox 30 and an invalid date\nin Safari 7.\n\nHowever, if the string is recognized as an ISO format string and it contains invalid\nvalues, it will return [`NaN`](../NaN.mdx):\n\n```js\n// ISO string with invalid values\nnew Date(\"2014-25-23\").toISOString();\n// throws \"RangeError: invalid date\"\n```\n\nSpiderMonkey's implementation-specific heuristic can be found in [`jsdate.cpp`](https://searchfox.org/mozilla-central/source/js/src/jsdate.cpp?rev=64553c483cd1#889).\nThe string `\"10 06 2014\"` is an example of a non-conforming ISO format and\nthus falls back to a custom routine. See also this [rough outline](https://bugzilla.mozilla.org/show_bug.cgi?id=1023155#c6) on\nhow the parsing works.\n\n```js\nnew Date(\"10 06 2014\");\n```\n\nwill be treated as a local date of 6 October, 2014, and not 10 June, 2014.\n\nOther examples:\n\n```js\nnew Date(\"foo-bar 2014\").toString();\n// returns: \"Invalid Date\"\n\nDate.parse(\"foo-bar 2014\");\n// returns: NaN\n```\n\n### Differences in assumed time zone\n\n> **Note:** This section contains implementation-specific behavior that can be inconsistent\n> across implementations.\n\nGiven a non-standard date string of `\"March 7, 2014\"`, `parse()` assumes a local time zone, but given a simplification of the ISO 8601 calendar date extended format such as `\"2014-03-07\"`, it will assume a time zone of UTC. Therefore `Date` objects produced using those strings may represent different moments in time depending on the version of ECMAScript supported unless the system is set with a local time zone of UTC. This means that two date strings that appear equivalent may result in two different values depending on the format of the string that is being converted.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/@@toPrimitive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype\\[Symbol.toPrimitive]\n\nThe **`[Symbol.toPrimitive]()`** method converts a `Date`\nobject to a primitive value.\n\n## Syntax\n\n```js\nDate()[Symbol.toPrimitive](hint)\n```\n\n### Return value\n\nThe primitive value of the given `Date` object. Depending on the argument,\nthe method can return either a string or a number.\n\n## Description\n\nThe `[Symbol.toPrimitive]()` method of the `Date` object returns a\nprimitive value, that is either of type number or of type string.\n\nIf `hint` is `string` or `default`,\n`[Symbol.toPrimitive]()` tries to call the [`toString`](../../Object/prototype/toString.mdx) method. If the `toString` property does not exist, it tries to\ncall the [`valueOf`](../../Object/prototype/valueOf.mdx) method and if the\n`valueOf` does not exist either, `[Symbol.toPrimitive]()` throws a\n[`TypeError`](../../../globals/TypeError/TypeError.mdx).\n\nIf `hint` is `number`, `[Symbol.toPrimitive]()` first tries\nto call `valueOf`, and if that fails, it calls `toString`.\n\nJavaScript calls the `[Symbol.toPrimitive]()` method to convert an object to a\nprimitive value. You rarely need to invoke the `[Symbol.toPrimitive]()` method\nyourself; JavaScript automatically invokes it when encountering an object where a\nprimitive value is expected.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/getDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getDate()\n\nThe **`getDate()`** method returns the day of the month for the\nspecified date according to local time.\n\n## Syntax\n\n```js\ngetDate()\n```\n\n### Return value\n\nAn integer number, between 1 and 31, representing the day of the month for the given\ndate according to local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/getDay.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getDay()\n\nThe **`getDay()`** method returns the\nday of the week for the specified date according to local time, where 0 represents\nSunday. For the day of the month, see [`Date.prototype.getDate()`](./getDate.mdx).\n\n## Syntax\n\n```js\ngetDay()\n```\n\n### Return value\n\nAn integer number, between 0 and 6, corresponding to the day of the week for the given\ndate, according to local time: 0 for Sunday, 1 for Monday, 2 for Tuesday, and so on.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/getFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getFullYear()\n\nThe **`getFullYear()`** method returns the year of the\nspecified date according to local time.\n\nUse this method instead of the [`Date.prototype.getYear()`](./getYear.mdx) method.\n\n## Syntax\n\n```js\ngetFullYear()\n```\n\n### Return value\n\nA number corresponding to the year of the given date, according to local time.\n\n## Description\n\nThe value returned by `getFullYear()` is an absolute number. For dates\nbetween the years 1000 and 9999, `getFullYear()` returns a four-digit number,\nfor example, 1995. Use this function to make sure a year is compliant with years after\n2000\\.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/getHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getHours()\n\nThe **`getHours()`** method returns the hour for the specified\ndate, according to local time.\n\n## Syntax\n\n```js\ngetHours()\n```\n\n### Return value\n\nAn integer number, between 0 and 23, representing the hour for the given date according\nto local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/getMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getMilliseconds()\n\nThe **`getMilliseconds()`** method returns the milliseconds in\nthe specified date according to local time.\n\n## Syntax\n\n```js\ngetMilliseconds()\n```\n\n### Return value\n\nA number, between 0 and 999, representing the milliseconds for the given date according\nto local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/getMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getMinutes()\n\nThe **`getMinutes()`** method returns the minutes in the\nspecified date according to local time.\n\n## Syntax\n\n```js\ngetMinutes()\n```\n\n### Return value\n\nAn integer number, between 0 and 59, representing the minutes in the given date\naccording to local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/getMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getMonth()\n\nThe **`getMonth()`** method returns the month in the specified\ndate according to local time, as a zero-based value (where zero indicates the first\nmonth of the year).\n\n## Syntax\n\n```js\ngetMonth()\n```\n\n### Return value\n\nAn integer number, between 0 and 11, representing the month in the given date according\nto local time. 0 corresponds to January, 1 to February, and so on.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/getSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getSeconds()\n\nThe **`getSeconds()`** method returns the seconds in the\nspecified date according to local time.\n\n## Syntax\n\n```js\ngetSeconds()\n```\n\n### Return value\n\nAn integer number, between 0 and 59, representing the seconds in the given date\naccording to local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/getTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getTime()\n\nThe **`getTime()`** method returns the number of milliseconds since the [epoch](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps), which is defined as the midnight at the beginning of January 1, 1970, UTC.\n\nYou can use this method to help assign a date and time to another `Date`\nobject. This method is functionally equivalent to the [`Date.prototype.valueOf()`](./valueOf.mdx) method.\n\n## Syntax\n\n```js\ngetTime()\n```\n\n### Return value\n\nA number representing the milliseconds elapsed between 1 January 1970 00:00:00 UTC and\nthe given date.\n\n## Description\n\nTo offer protection against timing attacks and fingerprinting, the precision of\n`new Date().getTime()` might get rounded depending on browser settings.\n\n```js\n// reduced time precision (2ms) in Firefox 60\nnew Date().getTime();\n// 1519211809934\n// 1519211810362\n// 1519211811670\n// …\n\n// reduced time precision with `privacy.resistFingerprinting` enabled\nnew Date().getTime();\n// 1519129853500\n// 1519129858900\n// 1519129864400\n// …\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/getTimezoneOffset.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getTimezoneOffset()\n\nThe **`getTimezoneOffset()`** method returns the difference, in minutes, between a date as evaluated in the UTC time zone, and the same date as evaluated in the local time zone.\n\n## Syntax\n\n```js\ngetTimezoneOffset()\n```\n\n### Return value\n\nThe difference, in minutes, between the date as evaluated in the UTC time zone and as evaluated in the local time zone. The actual local time algorithm is implementation-defined, and the return value is allowed to be zero in runtimes without appropriate data.\n\n## Description\n\n`date.getTimezoneOffset()` returns the difference, in minutes, between `date` as evaluated in the UTC time zone and as evaluated in the local time zone — that is, the time zone of the host system in which the browser is being used (if the code is run from the Web in a browser), or otherwise the host system of whatever JavaScript runtime (for example, a Node.js environment) the code is executed in.\n\n### Negative values and positive values\n\nThe number of minutes returned by `getTimezoneOffset()` is positive if the local time zone is behind UTC, and negative if the local time zone is ahead of UTC. For example, for UTC+10, `-600` will be returned.\n\n| Current time zone | Return value |\n| ----------------- | ------------ |\n| UTC-8             | 480          |\n| UTC               | 0            |\n| UTC+3             | -180         |\n\n### Varied results in Daylight Saving Time (DST) regions\n\nIn a region that annually shifts in and out of Daylight Saving Time (DST), as `date` varies, the number of minutes returned by calling `getTimezoneOffset()` can be non-uniform.\n\n> **Note:** `getTimezoneOffset()`'s behavior will never differ based on the time when the code is run — its behavior is always consistent when running in the same region. Only the value of `date` affects the result.\n\nIn most implementations, the [IANA time zone database](https://en.wikipedia.org/wiki/Daylight_saving_time#IANA_time_zone_database) (tzdata) is used to precisely determine the offset of the local timezone at the moment of the `date`. However, if such information is unavailable, an implementation may return zero.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/getUTCDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCDate()\n\nThe **`getUTCDate()`** method returns the day of the month (from\n1 to 31) in the specified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCDate()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer number ranging from 1 to 31\nrepresenting day of month for the given date, according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/getUTCDay.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCDay()\n\nThe **`getUTCDay()`** method returns the day of the week in the\nspecified date according to universal time, where 0 represents Sunday.\n\n## Syntax\n\n```js\ngetUTCDay()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer number corresponding to the day\nof the week for the given date, according to universal time: 0 for Sunday, 1 for Monday,\n2 for Tuesday, and so on.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/getUTCFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCFullYear()\n\nThe **`getUTCFullYear()`** method returns the year in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCFullYear()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer representing the year in the given date\naccording to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n\n## Description\n\nThe value returned by `getUTCFullYear()` is an absolute number that is\ncompliant with year-2000, for example, 1995.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/getUTCHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCHours()\n\nThe **`getUTCHours()`** method returns the hours in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCHours()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 23, representing the hours in the given date according\nto Coordinated Universal Time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/getUTCMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCMilliseconds()\n\nThe **`getUTCMilliseconds()`** method returns the milliseconds\nportion of the time object's value according to universal time.\n\n## Syntax\n\n```js\ngetUTCMilliseconds()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 999, representing\nthe milliseconds portion of the given `Date` object according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n\nNot to be confused with Unix epoch time. To get the total milliseconds since 1970/01/01,\nuse the [`getTime()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/getTime) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/getUTCMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCMinutes()\n\nThe **`getUTCMinutes()`** method returns the minutes in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCMinutes()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 59,\nrepresenting the minutes in the given date according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/getUTCMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCMonth()\n\nThe **`getUTCMonth()`** returns the month of the specified date\naccording to universal time, as a zero-based value (where zero indicates the first month\nof the year).\n\n## Syntax\n\n```js\ngetUTCMonth()\n```\n\n### Return value\n\nA number. If the `Date` object represents a valid date, an integer number, between 0 and 11,\ncorresponding to the month of the given date according to universal time. 0 for January,\n1 for February, 2 for March, and so on. Otherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/getUTCSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCSeconds()\n\nThe **`getUTCSeconds()`** method returns the seconds in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCSeconds()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 59, representing\nthe seconds in the given date according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/getYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getYear()\n\nThe **`getYear()`** method returns the year in the specified\ndate according to local time. Because `getYear()` does not return full years\n(\"year 2000 problem\"), it is no longer used and has been replaced by the\n[`Date.prototype.getFullYear()`](./getFullYear.mdx) method.\n\n## Syntax\n\n```js\ngetYear()\n```\n\n### Return value\n\nA number representing the year of the given date, according to local time, minus 1900.\n\n## Description\n\n- For years greater than or equal to 2000, the value returned by\n  `getYear()` is 100 or greater. For example, if the year is 2026,\n  `getYear()` returns 126.\n- For years between and including 1900 and 1999, the value returned by\n  `getYear()` is between 0 and 99. For example, if the year is 1976,\n  `getYear()` returns 76.\n- For years less than 1900, the value returned by `getYear()` is less than 0. For example, if the year is 1800, `getYear()` returns -100.\n\nTo take into account years before and after 2000, you should use\n[`Date.prototype.getFullYear()`](./getFullYear.mdx) instead of\n`getYear()` so that the year is specified in full.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/setDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setDate()\n\nThe **`setDate()`** method changes the day of the month of a given `Date` instance, based on local time.\n\nTo instead change the day of the month for a given `Date` instance based on UTC time, use the [`Date.prototype.setUTCDate()`](./setUTCDate.mdx) method.\n\n## Syntax\n\n```js\nsetDate(dayValue)\n```\n\n### Parameters\n\n- `dayValue`\n  - : An integer representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the given date (the\n`Date` object is also changed in place).\n\n## Description\n\nIf the `dayValue` is outside of the range of date values for the month, `setDate()` will update the `Date` object accordingly.\n\nFor example, if 0 is provided for `dayValue`, the date will be set to the last day of the previous month. If you use 40 for `dayValue`, and the month stored in the `Date` object is June, the day will be changed to 10 and the month will be incremented to July.\n\nIf a negative number is provided for `dayValue`, the date will be set counting backwards from the last day of the previous month. -1 would result in the date being set to 1 day before the last day of the previous month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/setFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setFullYear()\n\nThe **`setFullYear()`** method sets the full year for a\nspecified date according to local time. Returns new timestamp.\n\n## Syntax\n\n```js\nsetFullYear(yearValue)\nsetFullYear(yearValue, monthValue)\nsetFullYear(yearValue, monthValue, dateValue)\n```\n\n### Parameters\n\n- `yearValue`\n  - : An integer specifying the numeric value of the year, for example, 1995.\n- `monthValue`\n  - : Optional. An integer between 0 and 11 representing the months January through\n    December.\n- `dateValue`\n  - : Optional. An integer between 1 and 31 representing the day of the month. If you\n    specify the `dateValue` parameter, you must also specify the\n    `monthValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `monthValue` and\n`dateValue` parameters, the values returned from the\n[`Date.prototype.getMonth()`](./getMonth.mdx) and\n[`Date.prototype.getDate()`](./getDate.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range, `setFullYear()`\nattempts to update the other parameters and the date information in the\n`Date` object accordingly. For example, if you specify 15 for\n`monthValue`, the year is incremented by 1\n(`yearValue + 1`), and 3 is used for the month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/setHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setHours()\n\nThe **`setHours()`** method sets the hours for a specified date\naccording to local time, and returns the number of milliseconds since January 1, 1970\n00:00:00 UTC until the time represented by the updated `Date` instance.\n\n## Syntax\n\n```js\nsetHours(hoursValue)\nsetHours(hoursValue, minutesValue)\nsetHours(hoursValue, minutesValue, secondsValue)\nsetHours(hoursValue, minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `hoursValue`\n  - : Ideally, an integer between 0 and 23, representing the hour. If a value greater than\n    23 is provided, the datetime will be incremented by the extra hours.\n- `minutesValue`\n  - : Optional. Ideally, an integer between 0 and 59, representing the minutes. If a value\n    greater than 59 is provided, the datetime will be incremented by the extra minutes.\n- `secondsValue`\n  - : Optional. Ideally, an integer between 0 and 59, representing the seconds. If a value\n    greater than 59 is provided, the datetime will be incremented by the extra seconds. If\n    you specify the `secondsValue` parameter, you must also specify\n    the `minutesValue`.\n- `msValue`\n  - : Optional. Ideally, a number between 0 and 999, representing the milliseconds. If a\n    value greater than 999 is provided, the datetime will be incremented by the extra\n    milliseconds. If you specify the `msValue` parameter, you must\n    also specify the `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between January 1, 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `minutesValue`,\n`secondsValue`, and `msValue` parameters,\nthe values returned from the [`Date.prototype.getMinutes()`](./getMinutes.mdx),\n[`Date.prototype.getSeconds()`](./getSeconds.mdx), and\n[`Date.prototype.getMilliseconds()`](./getMilliseconds.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range, `setHours()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes will\nbe incremented by 1 (`minutesValue + 1`), and 40 will be used for\nseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/setMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setMilliseconds()\n\nThe **`setMilliseconds()`** method sets the milliseconds for a\nspecified date according to local time.\n\n## Syntax\n\n```js\nsetMilliseconds(millisecondsValue)\n```\n\n### Parameters\n\n- `millisecondsValue`\n  - : A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you specify a number outside the expected range, the date information in the\n`Date` object is updated accordingly. For example, if you specify 1005, the\nnumber of seconds is incremented by 1, and 5 is used for the milliseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/setMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setMinutes()\n\nThe **`setMinutes()`** method sets the minutes for a specified\ndate according to local time.\n\n## Syntax\n\n```js\nsetMinutes(minutesValue)\nsetMinutes(minutesValue, secondsValue)\nsetMinutes(minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `minutesValue`\n  - : An integer between 0 and 59, representing the minutes.\n- `secondsValue`\n  - : Optional. An integer between 0 and 59, representing the seconds. If you specify the\n    `secondsValue` parameter, you must also specify the\n    `minutesValue`.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds. If you specify\n    the `msValue` parameter, you must also specify the\n    `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `secondsValue` and\n`msValue` parameters, the values returned from\n[`Date.prototype.getSeconds()`](./getSeconds.mdx) and\n[`Date.prototype.getMilliseconds()`](./getMilliseconds.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range, `setMinutes()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes will\nbe incremented by 1 (`minutesValue + 1`), and 40 will be used for\nseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/setMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setMonth()\n\nThe **`setMonth()`** method sets the month for a specified date according to the currently set year.\n\n## Syntax\n\n```js\nsetMonth(monthValue)\nsetMonth(monthValue, dayValue)\n```\n\n### Parameters\n\n- `monthValue`\n  - : A zero-based integer representing the month of the year offset from the start of the\n    year. So, 0 represents January, 11 represents December, -1 represents December of the\n    previous year, and 12 represents January of the following year.\n- `dayValue`\n  - : Optional. An integer from 1 to 31, representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `dayValue` parameter, the value\nreturned from the [`Date.prototype.getDate()`](./getDate.mdx) method is used.\n\nIf a parameter you specify is outside of the expected range, `setMonth()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 15 for `monthValue`, the year will be\nincremented by 1, and 3 will be used for month.\n\nThe current day of month will have an impact on the behavior of this method.\nConceptually it will add the number of days given by the current day of the month to the\n1st day of the new month specified as the parameter, to return the new date.\nFor example, if the current value is 31st January 2016, calling setMonth with a value of 1 will return 2nd March 2016.\nThis is because in 2016 February had 29 days.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/setSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setSeconds()\n\nThe **`setSeconds()`** method sets the seconds for a specified\ndate according to local time.\n\n## Syntax\n\n```js\nsetSeconds(secondsValue)\nsetSeconds(secondsValue, msValue)\n```\n\n### Parameters\n\n- `secondsValue`\n  - : An integer between 0 and 59, representing the seconds.\n- `msValue` _**optional**_\n  - : Optional. A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `msValue` parameter, the value returned\nfrom the [`Date.prototype.getMilliseconds()`](./getMilliseconds.mdx) method is\nused.\n\nIf a parameter you specify is outside of the expected range, `setSeconds()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes stored\nin the `Date` object will be incremented by 1, and 40 will be used for\nseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/setTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setTime()\n\nThe **`setTime()`** method sets the `Date` object\nto the time represented by a number of milliseconds since January 1, 1970, 00:00:00 UTC.\n\n## Syntax\n\n```js\nsetTime(timeValue)\n```\n\n### Parameters\n\n- `timeValue`\n  - : An integer representing the number of milliseconds since 1 January 1970, 00:00:00\n    UTC.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date\n(effectively, the value of the argument).\n\n## Description\n\nUse the `setTime()` method to help assign a date and time to another\n`Date` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/setUTCDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCDate()\n\nThe **`setUTCDate()`** method changes the day of the month of a given `Date` instance, based on UTC time.\n\nTo instead change the day of the month for a given `Date` instance based on local time, use the [`Date.prototype.setDate()`](././setDate.mdx) method.\n\n## Syntax\n\n```js\nsetUTCDate(dayValue)\n```\n\n### Parameters\n\n- `dayValue`\n  - : An integer from 1 to 31, representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf the `dayValue` is outside of the range of date values for the month, `setDate()` will update the `Date` object accordingly.\n\nFor example, if 0 is provided for `dayValue`, the date will be set to the last day of the previous month. If you use 40 for `dayValue`, and the month stored in the `Date` object is June, the day will be changed to 10 and the month will be incremented to July.\n\nIf a negative number is provided for `dayValue`, the date will be set counting backwards from the last day of the previous month. -1 would result in the date being set to 1 day before the last day of the previous month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/setUTCFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCFullYear()\n\nThe **`setUTCFullYear()`** method sets the full year for a\nspecified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCFullYear(yearValue)\nsetUTCFullYear(yearValue, monthValue)\nsetUTCFullYear(yearValue, monthValue, dayValue)\n```\n\n### Parameters\n\n- `yearValue`\n  - : An integer specifying the numeric value of the year, for example, 1995.\n- `monthValue`\n  - : Optional. An integer between 0 and 11 representing the months January through\n    December.\n- `dayValue`\n  - : Optional. An integer between 1 and 31 representing the day of the month. If you\n    specify the `dayValue` parameter, you must also specify the\n    `monthValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `monthValue` and\n`dayValue` parameters, the values returned from the\n[`Date.prototype.getUTCMonth()`](./getUTCMonth.mdx) and\n[`Date.prototype.getUTCDate()`](./getUTCDate.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range,\n`setUTCFullYear()` attempts to update the other parameters and the date\ninformation in the `Date` object accordingly. For example, if you specify 15\nfor `monthValue`, the year is incremented by 1\n(`yearValue + 1`), and 3 is used for the month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/setUTCHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCHours()\n\nThe **`setUTCHours()`** method sets the hour for a specified\ndate according to universal time, and returns the number of milliseconds since January\n1, 1970 00:00:00 UTC until the time represented by the updated `Date`\ninstance.\n\n## Syntax\n\n```js\nsetUTCHours(hoursValue)\nsetUTCHours(hoursValue, minutesValue)\nsetUTCHours(hoursValue, minutesValue, secondsValue)\nsetUTCHours(hoursValue, minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `hoursValue`\n  - : An integer between 0 and 23, representing the hour.\n- `minutesValue`\n  - : Optional. An integer between 0 and 59, representing the minutes.\n- `secondsValue`\n  - : Optional. An integer between 0 and 59, representing the seconds. If you specify the\n    `secondsValue` parameter, you must also specify the\n    `minutesValue`.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds. If you specify\n    the `msValue` parameter, you must also specify the\n    `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between January 1, 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `minutesValue`,\n`secondsValue`, and `msValue` parameters,\nthe values returned from the [`Date.prototype.getUTCMinutes()`](./getUTCMinutes.mdx), [`Date.prototype.getUTCSeconds()`](./getUTCSeconds.mdx),\nand [`Date.prototype.getUTCMilliseconds()`](./getUTCMilliseconds.mdx) methods\nare used.\n\nIf a parameter you specify is outside of the expected range, `setUTCHours()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes will\nbe incremented by 1 (`minutesValue + 1`), and 40 will be used for seconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/setUTCMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCMilliseconds()\n\nThe **`setUTCMilliseconds()`** method sets the milliseconds for\na specified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCMilliseconds(millisecondsValue)\n```\n\n### Parameters\n\n- `millisecondsValue`\n  - : A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf a parameter you specify is outside of the expected range,\n`setUTCMilliseconds()` attempts to update the date information in the\n`Date` object accordingly. For example, if you use 1100 for\n`millisecondsValue`, the seconds stored in the `Date`\nobject will be incremented by 1, and 100 will be used for milliseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/setUTCMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCMinutes()\n\nThe **`setUTCMinutes()`** method sets the minutes for a\nspecified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCMinutes(minutesValue)\nsetUTCMinutes(minutesValue, secondsValue)\nsetUTCMinutes(minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `minutesValue`\n  - : An integer between 0 and 59, representing the minutes.\n- `secondsValue`\n  - : Optional. An integer between 0 and 59, representing the seconds. If you specify the\n    `secondsValue` parameter, you must also specify the\n    `minutesValue`.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds. If you specify\n    the `msValue` parameter, you must also specify the\n    `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `secondsValue` and\n`msValue` parameters, the values returned from\n[`Date.prototype.getUTCSeconds()`](./getUTCSeconds.mdx) and\n[`Date.prototype.getUTCMilliseconds()`](./getUTCMilliseconds.mdx) methods are\nused.\n\nIf a parameter you specify is outside of the expected range,\n`setUTCMinutes()` attempts to update the date information in the\n`Date` object accordingly. For example, if you use 100 for\n`secondsValue`, the minutes will be incremented by 1\n(`minutesValue + 1`), and 40 will be used for seconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/setUTCMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCMonth()\n\nThe **`setUTCMonth()`** method sets the month for a specified\ndate according to universal time.\n\n## Syntax\n\n```js\nsetUTCMonth(monthValue)\nsetUTCMonth(monthValue, dayValue)\n```\n\n### Parameters\n\n- `monthValue`\n  - : An integer between 0 and 11, representing the months January through December.\n- `dayValue`\n  - : Optional. An integer from 1 to 31, representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `dayValue` parameter, the value returned from the\n[`Date.prototype.getUTCDate()`](./getUTCDate.mdx) method is used.\n\nIf a parameter you specify is outside of the expected range, `setUTCMonth()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 15 for `monthValue`, the year will be incremented by\n1, and 3 will be used for month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/setUTCSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCSeconds()\n\nThe **`setUTCSeconds()`** method sets the seconds for a\nspecified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCSeconds(secondsValue)\nsetUTCSeconds(secondsValue, msValue)\n```\n\n### Parameters\n\n- `secondsValue`\n  - : An integer between 0 and 59, representing the seconds.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `msValue` parameter, the value returned from the\n[`Date.prototype.getUTCMilliseconds()`](./getUTCMilliseconds.mdx) method is\nused.\n\nIf a parameter you specify is outside of the expected range,\n`setUTCSeconds()` attempts to update the date information in the\n`Date` object accordingly. For example, if you use 100 for\n`secondsValue`, the minutes stored in the `Date` object will be\nincremented by 1, and 40 will be used for seconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/setYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setYear()\n\nThe legacy **`setYear()`** method sets the year for a specified date according to local time.\n\nHowever, the way the legacy `setYear()` method sets year values is different from how the preferred [`Date.prototype.setFullYear()`](./setFullYear.mdx) method sets year values — and in some cases, also different from how `new Date()` and [`Date.parse()`](../parse.mdx) set year values. Specifically, given two-digit numbers, such as `22` and `61`:\n\n- `setYear()` interprets any two-digit number as an offset to `1900`; so `date.setYear(22)` results in the year value being set to `1922`, and `date.setYear(61)` results in the year value being set to `1961`. (In contrast, while `new Date(61, 1)` also results in the year value being set to `1961`, `new Date(\"2/1/22\")` results in the year value being set to `2022`; and similarly for [`Date.parse()`](../parse.mdx)).\n\n- [`Date.prototype.setFullYear()`](./setFullYear.mdx) does no special interpretation but instead uses the literal two-digit value as-is to set the year; so `date.setFullYear(61)` results in the year value being set to `0061`, and `date.setFullYear(22)` results in the year value being set to `0022`.\n\nBecause of those differences in behavior, you should no longer use the legacy `setYear()` method, but should instead use the preferred [`Date.prototype.setFullYear()`](./setFullYear.mdx) method.\n\n## Syntax\n\n```js\nsetYear(yearValue)\n```\n\n### Parameters\n\n- `yearValue`\n  - : An integer.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf `yearValue` is a number between 0 and 99 (inclusive), then the year for\n`dateObj` is set to `1900 + yearValue`. Otherwise, the year for\n`dateObj` is set to `yearValue`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/toDateString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toDateString()\n\nThe **`toDateString()`** method returns the date portion of a `Date` object interpreted in the local timezone in English.\n\n## Syntax\n\n```js\ntoDateString()\n```\n\n### Return value\n\nA string representing the date portion of the given `Date` object in human readable form in English.\n\n## Description\n\n`Date` instances refer to a specific point in time. `toDateString()` interprets the date in the local timezone and formats the _date_ part in English. It always uses the following format, separated by spaces:\n\n1. First three letters of the week day name\n2. First three letters of the month name\n3. Two-digit day of the month, padded on the left a zero if necessary\n4. Four-digit year (at least), padded on the left with zeros if necessary. May have a negative sign\n\nFor example: \"Thu Jan 01 1970\".\n\n- If you want to get the _time_ part, use [`toTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString).\n- If you want to get both the date and time, use [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toString).\n- If you want to make the date interpreted as UTC instead of local timezone, use [`toUTCString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString).\n- If you want to format the date in a more user-friendly format (e.g. localization), use [`toLocaleDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/toISOString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toISOString()\n\nThe **`toISOString()`** method returns a string in _simplified_ extended ISO format ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)), which is always 24 or 27 characters long (`YYYY-MM-DDTHH:mm:ss.sssZ` or `±YYYYYY-MM-DDTHH:mm:ss.sssZ`, respectively). The timezone is always zero UTC offset, as denoted by the suffix `Z`.\n\n## Syntax\n\n```js\ntoISOString()\n```\n\n### Return value\n\nA string representing the given date in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format according to universal time. It's the same format as the one required to be recognized by [`Date.parse()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/parse#date-time-string-format).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/toJSON.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toJSON()\n\nThe **`toJSON()`** method returns a string representation of\nthe `Date` object.\n\n## Syntax\n\n```js\ntoJSON()\n```\n\n### Return value\n\nA string representation of the given date.\n\n## Description\n\n`Date` instances refer to a specific point in time. `toJSON()` calls the object's [`Date.prototype.toISOString()`](./toISOString.mdx) method, which returns a string representing the `Date` object's value. This method is generally intended to, by default, usefully serialize `Date` objects during [JSON](https://developer.mozilla.org/docs/Glossary/JSON) serialization, which can then be deserialized using the [`Date()` constructor](../Date.mdx) or [`Date.parse()`](../parse.mdx) as the reviver of [`JSON.parse()`](../../JSON/parse.mdx).\n\nThe method first attempts to convert its `this` value [to a primitive](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion) by calling its [`[Symbol.toPrimitive]()`](../../Symbol/toPrimitive.mdx) (with `\"number\"` as hint), [`valueOf()`](../../Object/prototype/valueOf.mdx), and [`toString()`](../../Object/prototype/toString.mdx) methods, in that order. If the result is a [non-finite](../../Number/isFinite.mdx) number, `null` is returned. (This generally corresponds to an invalid date, whose [`valueOf()`](./valueOf.mdx) returns [`NaN`](../../NaN.mdx).) Otherwise, if the converted primitive is not a number or is a finite number, the return value of `this.toISOString()` is returned.\n\nNote that the method does not check whether the `this` value is a valid `Date` object. However, calling `Date.prototype.toJSON()` on non-`Date` objects does not have well-defined semantics.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/toLocaleDateString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toLocaleDateString()\n\nThe **`toLocaleDateString()`** method returns a string with a language-sensitive representation of the date portion of the specified date in the user agent's timezone. In implementations with [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) support, this method simply calls `Intl.DateTimeFormat`.\n\n## Syntax\n\n```js\ntoLocaleDateString()\ntoLocaleDateString(locales)\ntoLocaleDateString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat), these parameters correspond exactly to the [`Intl.DateTimeFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) constructor's parameters. Implementations without `Intl.DateTimeFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales) parameter of the `Intl.DateTimeFormat()` constructor.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options) parameter of the `Intl.DateTimeFormat()` constructor. The `timeStyle` option must be undefined, or a [`TypeError`](../../../globals/TypeError/TypeError.mdx) would be thrown. If `weekday`, `year`, `month`, and `day` are all undefined, then `year`, `month`, and `day` will be set to `\"numeric\"`.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored.\n\nSee the [`Intl.DateTimeFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string representing the date portion of the given `Date` instance according to language-specific conventions.\n\nIn implementations with `Intl.DateTimeFormat`, this is equivalent to `new Intl.DateTimeFormat(locales, options).format(date)`, where `options` has been normalized as described above.\n\n## Performance\n\nWhen formatting large numbers of dates, it is better to create an [`Intl.DateTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) object and use its [`format()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/format) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string with a language-sensitive representation of this date. In implementations with [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) support, this method simply calls `Intl.DateTimeFormat`.\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat), these parameters correspond exactly to the [`Intl.DateTimeFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) constructor's parameters. Implementations without `Intl.DateTimeFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales) parameter of the `Intl.DateTimeFormat()` constructor.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options) parameter of the `Intl.DateTimeFormat()` constructor. If `weekday`, `year`, `month`, `day`, `dayPeriod`, `hour`, `minute`, `second`, and `fractionalSecondDigits` are all undefined, then `year`, `month`, `day`, `hour`, `minute`, `second` will be set to `\"numeric\"`.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored.\n\nSee the [`Intl.DateTimeFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string representing the given date according to language-specific conventions.\n\nIn implementations with `Intl.DateTimeFormat`, this is equivalent to `new Intl.DateTimeFormat(locales, options).format(date)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/toLocaleTimeString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toLocaleTimeString()\n\nThe **`toLocaleTimeString()`** method returns a string with a language-sensitive representation of the time portion of the date. In implementations with [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) support, this method simply calls `Intl.DateTimeFormat`.\n\n## Syntax\n\n```js\ntoLocaleTimeString()\ntoLocaleTimeString(locales)\ntoLocaleTimeString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat), these parameters correspond exactly to the [`Intl.DateTimeFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) constructor's parameters. Implementations without `Intl.DateTimeFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales) parameter of the `Intl.DateTimeFormat()` constructor.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options) parameter of the `Intl.DateTimeFormat()` constructor. If `dayPeriod`, `hour`, `minute`, `second`, and `fractionalSecondDigits` are all undefined, then `hour`, `minute`, `second` will be set to `\"numeric\"`.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored.\n\nSee the [`Intl.DateTimeFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string representing the time portion of the given `Date` instance according to language-specific conventions.\n\nIn implementations with `Intl.DateTimeFormat`, this is equivalent to `new Intl.DateTimeFormat(locales, options).format(date)`, where `options` has been normalized as described above.\n\n## Performance\n\nWhen formatting large numbers of dates, it is better to create an [`Intl.DateTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) object and use its [`format()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/format) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified `Date` object interpreted in the local timezone.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the given date.\n\n## Description\n\nThe `Date` object overrides the `toString()` method of `Object`. `Date.prototype.toString()` returns a string representation of the Date as interpreted in the local timezone, containing both the date and the time — it joins the string representation specified in [`toDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString) and [`toTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString) together, adding a space in between.\n\nFor example: \"Thu Jan 01 1970 04:42:04 GMT+0000 (Coordinated Universal Time)\"\n\nThe `toString()` method is automatically called when a date is coerced to a string, such as `const today = 'Today is ' + new Date()`.\n\n`Date.prototype.toString()` must be called on `Date` instances. If the `this` value does not inherit from `Date.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n- If you only want to get the _date_ part, use [`toDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString).\n- If you only want to get the _time_ part, use [`toTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString).\n- If you want to make the date interpreted as UTC instead of local timezone, use [`toUTCString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString).\n- If you want to format the date in a more user-friendly format (e.g. localization), use [`toLocaleString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/toTimeString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toTimeString()\n\nThe **`toTimeString()`** method returns the time portion of a `Date` object interpreted in the local timezone in English.\n\n## Syntax\n\n```js\ntoTimeString()\n```\n\n### Return value\n\nA string representing the time portion of the given date in human readable form in English.\n\n## Description\n\n`Date` instances refer to a specific point in time. `toTimeString()` interprets the date in the local timezone and formats the _time_ part in English. It always uses the format of `hh:mm:ss GMT±xxxx (TZ)`, where:\n\n| Format String | Description                                                                                           |\n| ------------- | ----------------------------------------------------------------------------------------------------- |\n| `hh`          | Hour, as two digits with leading zero if required                                                     |\n| `mm`          | Minute, as two digits with leading zero if required                                                   |\n| `ss`          | Seconds, as two digits with leading zero if required                                                  |\n| `±xxxx`       | The local timezone's offset — two digits for hours and two digits for minutes (e.g. `-0500`, `+0800`) |\n| `TZ`          | The timezone's name (e.g. `PDT`, `PST`)                                                               |\n\nFor example: \"04:42:04 GMT+0000 (Coordinated Universal Time)\".\n\n- If you want to get the _date_ part, use [`toDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString).\n- If you want to get both the date and time, use [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toString).\n- If you want to make the date interpreted as UTC instead of local timezone, use [`toUTCString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString).\n- If you want to format the date in a more user-friendly format (e.g. localization), use [`toLocaleTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleTimeString).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/toUTCString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toUTCString()\n\nThe **`toUTCString()`** method converts a date to a string, interpreting it in the UTC time zone. `toGMTString()` is an alias of this method.\n\nBased on [rfc7231](https://datatracker.ietf.org/doc/html/rfc7231#section-7.1.1.1) and modified according to [ECMA-262 toUTCString](https://tc39.es/ecma262/#sec-date.prototype.toutcstring), it can have negative values.\n\n## Syntax\n\n```js\ntoUTCString()\n```\n\n### Return value\n\nA string representing the given date using the UTC time zone.\n\n## Description\n\nThe value returned by `toUTCString()` is a string in the form `Www, dd Mmm yyyy hh:mm:ss GMT`, where:\n\n| Format String | Description                                                  |\n| ------------- | ------------------------------------------------------------ |\n| `Www`         | Day of week, as three letters (e.g. `Sun`, `Mon`)            |\n| `dd`          | Day of month, as two digits with leading zero if required    |\n| `Mmm`         | Month, as three letters (e.g. `Jan`, `Feb`)                  |\n| `yyyy`        | Year, as four or more digits with leading zeroes if required |\n| `hh`          | Hour, as two digits with leading zero if required            |\n| `mm`          | Minute, as two digits with leading zero if required          |\n| `ss`          | Seconds, as two digits with leading zero if required         |\n\n### Aliasing\n\nJavaScript's `Date` API was inspired by Java's `java.util.Date` library (while the latter had become de facto legacy since Java 1.1 in 1997). In particular, the Java `Date` class had a method called `toGMTString` — which was poorly named, because the [Greenwich Mean Time](https://en.wikipedia.org/wiki/Greenwich_Mean_Time) is not equivalent to the [Coordinated Universal Time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time), while JavaScript dates always operate by UTC time. For web compatibility reasons, `toGMTString` remains as an alias to `toUTCString`, and they refer to the exact same function object. This means:\n\n```js\nDate.prototype.toGMTString.name === \"toUTCString\";\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Date/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a\n`Date` object.\n\n\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the given date, or [`NaN`](../../NaN.mdx) in case of an invalid date.\n\n## Description\n\nThe `valueOf()` method returns the primitive value of a `Date`\nobject as a number data type, the number of milliseconds since midnight 01 January, 1970\nUTC.\n\nThis method is functionally equivalent to the [`Date.prototype.getTime()`](./getTime.mdx)\nmethod.\n\nThis method is usually called internally by JavaScript and not explicitly in code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/DecompressionStream/DecompressionStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DecompressionStream()\n\nThe **`DecompressionStream()`** constructor creates a new `DecompressionStream` object which decompresses a stream of data.\n\n## Syntax\n\n```js\nnew DecompressionStream(format)\n```\n\n### Parameters\n\n- `format`\n\n  - : One of the following compression formats:\n\n    - `\"gzip\"`\n    - `\"deflate\"`\n    - `\"deflate-raw\"`\n\n## Exceptions\n\n- `TypeError`\n  - : Thrown if the format passed to the constructor is not supported.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/DecompressionStream/prototype/readable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DecompressionStream.readable\n\nThe **`readable`** read-only property of the `DecompressionStream` interface returns a `ReadableStream`.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/DecompressionStream/prototype/writable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DecompressionStream.writable\n\nThe **`writable`** read-only property of the `DecompressionStream` interface returns a `WritableStream`.\n\n## Value\n\nA `WritableStream`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/EcKeyImportParams/EcKeyImportParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# EcKeyImportParams\n\nThe **`EcKeyImportParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.importKey()`, when generating any elliptic-curve-based key pair: that is, when the algorithm is identified as ECDSA.\n\n## Instance properties\n\n- `name`\n  - : A string. This should be set to `ECDSA`.\n- `namedCurve`\n\n  - : A string representing the name of the elliptic curve to use. This may be any of the following names for [NIST](https://www.nist.gov/)-approved curves:\n\n    - `P-256`\n    - `P-384`\n    - `P-521`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/EcdsaParams/EcdsaParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# EcdsaParams\n\nThe **`EcdsaParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.sign()` or `SubtleCrypto.verify()` when using the ECDSA algorithm.\n\n## Instance properties\n\n- `name`\n    - : A string. This should be set to `ECDSA`.\n- `hash`\n\n    - : A string. An identifier for the digest algorithm to use. This should be one of the following:\n\n        - `SHA-256`: selects the SHA-256 algorithm.\n        - `SHA-384`: selects the SHA-384 algorithm.\n        - `SHA-512`: selects the SHA-512 algorithm.\n\n        > **Warning:** `SHA-1` is also supported here but the SHA-1 algorithm is considered vulnerable and should no longer be used.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Error/Error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error\n\nThe **`Error()`** constructor creates an error object.\n\n## Syntax\n\n```js\nnew Error()\nnew Error(message)\nnew Error(message, options)\nnew Error(message, fileName)\nnew Error(message, fileName, lineNumber)\n\nError()\nError(message)\nError(message, options)\nError(message, fileName)\nError(message, fileName, lineNumber)\n```\n\n> **Note:** `Error()` can be called with or without `new`. Both create a new `Error` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : A human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A value indicating the specific cause of the error, reflected in the [`Error.prototype.cause`](./prototype/cause.mdx) property. When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Error/prototype/cause.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.cause\n\nThe **`cause`** data property of an [`Error`](../../../globals/Error/Error.mdx) instance indicates the specific original cause of the error.\n\nIt is used when catching and re-throwing an error with a more-specific or useful error message in order to still have access to the original error.\n\n## Value\n\nThe value that was passed to the [`Error`](../Error.mdx) constructor in the `options.cause` argument. It may not be present.\n\n## Description\n\nThe value of `cause` can be of any type. You should not make assumptions that the error you caught has an `Error` as its `cause`, in the same way that you cannot be sure the variable bound in the `catch` statement is an `Error` either. The \"Providing structured data as the error cause\" example below shows a case where a non-error is deliberately provided as the cause.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Error/prototype/message.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.message\n\nThe **`message`** data property of an [`Error`](../Error.mdx) instance is a human-readable description of the error.\n\n## Value\n\nA string corresponding to the value passed to the [`Error`](../Error.mdx) constructor as the first argument.\n\n## Description\n\nThis property contains a brief description of the error if one is available or has been set. The `message` property combined with the [`name`](./name.mdx) property is used by the [`Error.prototype.toString()`](./toString.mdx) method to create a string representation of the Error.\n\nBy default, the `message` property is an empty string, but this behavior can be overridden for an instance by specifying a message as the first argument to the [`Error`](../Error.mdx) constructor.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Error/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.name\n\nThe **`name`** data property of `Error.prototype` is shared by all [`Error`](../Error.mdx) instances. It represents the name for the type of error. For `Error.prototype.name`, the initial value is `\"Error\"`. Subclasses like [`TypeError`](../../../globals/TypeError/TypeError.mdx) and [`SyntaxError`](../../SyntaxError/SyntaxError.mdx) provide their own `name` properties.\n\n## Value\n\nA string. For `Error.prototype.name`, the initial value is `\"Error\"`.\n\n## Description\n\nBy default, [`Error`](../Error.mdx) instances are given the name \"Error\". The `name` property, in addition to the [`message`](./message.mdx) property, is used by the [`Error.prototype.toString()`](./toString.mdx) method to create a string representation of the error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Error/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.toString()\n\nThe **`toString()`** method returns a string representing the\nspecified [`Error`](../Error.mdx) object.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified [`Error`](../Error.mdx) object.\n\n## Description\n\nThe [`Error`](../Error.mdx) object overrides the [`Object.prototype.toString()`](../../Object/prototype/toString.mdx)\nmethod inherited by all objects. \n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/EvalError/EvalError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# EvalError\n\nThe **`EvalError()`** constructor creates a new `EvalError` instance.\n\n## Syntax\n\n```js\nnew EvalError()\nnew EvalError(message)\nnew EvalError(message, options)\nnew EvalError(message, fileName)\nnew EvalError(message, fileName, lineNumber)\n\nEvalError()\nEvalError(message)\nEvalError(message, options)\nEvalError(message, fileName)\nEvalError(message, fileName, lineNumber)\n```\n\n> **Note:** `EvalError()` can be called with or without `new`. Both create a new `EvalError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/FetchEvent/FetchEvent.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent\n\nThis is the event type for `fetch` events. It contains information about the fetch, including the request and how the receiver will treat the response. \nIt provides the [`event.respondWith()`](./prototype/respondWith.mdx) method, which allows us to provide a response to this fetch.\n\n## Instance properties\n\n- `FetchEvent.request` _**readonly**_\n    - : The `Request` that was received by the application.\n- `FetchEvent.client` _**readonly**_\n    - : Information about the downstream client that made the request.\n        While these fields are always defined on Compute, they may be *null* when not available in testing environments\n        such as Viceroy.\n    - `FetchEvent.client.address` _**readonly**_\n        - : A string representation of the IPv4 or IPv6 address of the downstream client.\n    - `FetchEvent.client.geo` _**readonly**_\n        - : Either `null`, or a [geolocation dictionary](../../fastly:geolocation/getGeolocationForIpAddress.mdx) corresponding to the IP address of the downstream client.\n    - `FetchEvent.client.tlsJA3MD5` _**readonly**_\n        - : Either `null` or a string representation of the JA3 hash of the TLS ClientHello message.\n    - `FetchEvent.client.tlsCipherOpensslName` _**readonly**_\n        - : Either `null` or a string representation of the cipher suite used to secure the client TLS connection.\n    - `FetchEvent.client.tlsProtocol` _**readonly**_\n        - : Either `null` or a string representation of the TLS protocol version used to secure the client TLS connection.\n    - `FetchEvent.client.tlsClientCertificate` _**readonly**_\n        - : Either `null` or an ArrayBuffer containing the raw client certificate in the mutual TLS handshake message. It is in PEM format. Returns an empty ArrayBuffer if this is not mTLS or available.\n    - `FetchEvent.client.tlsClientHello` _**readonly**_\n        - : Either `null` or an ArrayBuffer containing the raw bytes sent by the client in the TLS ClientHello message.\n    - `FetchEvent.client.tlsJA4` _**readonly**_\n        - : Either `null` or a string representation of the JA4 fingerprint of the TLS ClientHello message.\n    - `FetchEvent.client.h2Fingerprint` _**readonly**_\n        - : Either `null` or a string representation of the HTTP/2 fingerprint for HTTP/2 connections. Returns `null` for HTTP/1.1 connections.\n    - `FetchEvent.client.ohFingerprint` _**readonly**_\n        - : Either `null` or a string representation of the Original Header fingerprint based on the order and presence of request headers.\n- `FetchEvent.server` _**readonly**_\n    - : Information about the server receiving the request for the Fastly Compute service.\n    - `FetchEvent.server.address` _**readonly**_\n        - : A string representation of the IPv4 or IPv6 address of the server which received the request.\n\n## Instance methods\n\n- [`FetchEvent.respondWith()`](./prototype/respondWith.mdx)\n    - : Provide (a promise for) a response for this request.\n- [`FetchEvent.sendEarlyHints()`](./prototype/sendEarlyHints.mdx)\n    - : Send a [103 Early Hints](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/103) response for this request.\n- [`FetchEvent.waitUntil()`](./prototype/waitUntil.mdx)\n    - : Extends the lifetime of the event. Used to notify the host environment of tasks that extend beyond the returning of a response, such as streaming and caching.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/FetchEvent/prototype/respondWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent.respondWith()\n\nThe **`respondWith()`** method allows you to provide a promise for a [`Response`](../../Response/Response.mdx) to send back to the client which made the incoming request to your application.\n\n## Syntax\n\n```js\nrespondWith(response)\n```\n\n### Parameters\n\n- `response`\n  - : A [`Response`](../../Response/Response.mdx) or a [`Promise`](../../Promise/Promise.mdx) that resolves to a\n    [`Response`](../../Response/Response.mdx). Otherwise, a network error is returned to Fetch.\n\n### Return value\n\nAlways returns `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/FetchEvent/prototype/sendEarlyHints.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent.sendEarlyHints()\n\nThe **`sendEarlyHints()`** method allows you to send a [103 Early Hints](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/103) response back to the client which made the incoming request to your application.\n\n## Syntax\n\n```js\nsendEarlyHints(headers)\n```\n\n### Parameters\n\n- `headers`\n  - : Any headers you want to add to your response, contained\n        within a [`Headers`](../../Headers/Headers.mdx) object or object literal of\n        [`String`](../../String/String.mdx) key/value pairs.\n\n### Return value\n\nAlways returns `undefined`.\n\n### Examples\n\n```js\nevent.sendEarlyHints({ link: '</style.css>; rel=preload; as=style' });\n\nevent.sendEarlyHints([\n        ['link', '</style.css>; rel=preload; as=style'],\n        ['link', '</style2.css>; rel=preload; as=style']\n    ]);\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/FetchEvent/prototype/waitUntil.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent.waitUntil()\n\n\nThe **`waitUntil()`** method tells the host environment that work is ongoing until the promise settles, and it shouldn't terminate\nthe application if it wants that work to complete.\n\nThe `waitUntil()` method must be initially called synchronously within the event callback,\nbut after that it can be called multiple times, and will hold the process open until all the promises passed to it\nsettle.\n\n## Syntax\n\n```js\nwaitUntil(promise)\n```\n\n### Parameters\n\nA [`Promise`](../../Promise/Promise.mdx).\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/FinalizationRegistry/FinalizationRegistry.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FinalizationRegistry()\n\nThe **`FinalizationRegistry`** constructor creates a `FinalizationRegistry` object that uses the given callback.\n\n## Syntax\n\n```js\n// Arrow callback function\nnew FinalizationRegistry((heldValue) => { /* … */ })\n\n// Callback function\nnew FinalizationRegistry(callbackFn)\n\n// Inline callback function\nnew FinalizationRegistry(function(heldValue) { /* … */ })\n```\n\n> **Note:** `FinalizationRegistry()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `callback`\n  - : The callback function this registry should use.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/FinalizationRegistry/prototype/register.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FinalizationRegistry.prototype.register()\n\nThe `register()` method registers an object with a\n`FinalizationRegistry` instance so that if the object is garbage-collected,\nthe registry's callback may get called.\n\n## Syntax\n\n```js\nregister(target, heldValue)\nregister(target, heldValue, unregisterToken)\n```\n\n### Parameters\n\n- `target`\n  - : The target object to register.\n- `heldValue`\n  - : The value to pass to the finalizer for this object. This cannot be the `target` object but can be anything else, including functions and primitives.\n- `unregisterToken` _**optional**_\n  - : A token that may be used with the `unregister` method later to unregister\n    the target object. If provided (and not `undefined`), this must be an\n    object. If not provided, the target cannot be unregistered.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown when one of the following condition is met:\n    - `target` is not an object (object as opposed to primitives; functions are objects as well)\n    - `target` is the same as `heldvalue` (`target === heldValue`)\n    - `unregisterToken` is not an object\n\n## Description\n\nSee the [Avoid where possible](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry#avoid_where_possible)\nand [Notes on cleanup callbacks](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry#notes_on_cleanup_callbacks)\nsections of the `FinalizationRegistry` page for important caveats.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/FinalizationRegistry/prototype/unregister.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FinalizationRegistry.prototype.unregister()\n\nThe `unregister()` method unregisters a target object from a\n`FinalizationRegistry` instance.\n\n## Syntax\n\n```js\nunregister(unregisterToken)\n```\n\n### Parameters\n\n- `unregisterToken`\n  - : The token used with the [`FinalizationRegistry.prototype.register`](./register.mdx) method when registering the target object. Multiple cells registered with the same `unregisterToken` will be unregistered together.\n\n### Return value\n\nA boolean value that is `true` if at least one cell was unregistered and `false` if no cell was unregistered.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown when `unregisterToken` is not an object.\n\n## Description\n\nWhen a target object has been reclaimed, it is no longer registered in the registry.\nThere is no need to call `unregister` in your cleanup callback. Only call\n`unregister` if you haven't received a cleanup callback and no longer need\nto receive one.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Float32Array/Float32Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Float32Array()\n\nThe **`Float32Array()`** typed array constructor creates a new\n`Float32Array` object, which is, an array of 32-bit floating point numbers\n(corresponding to the C `float` data type) in the platform byte order. If\ncontrol over byte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are\ninitialized to `0`. Once established, you can reference elements in the array\nusing the object's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Float32Array()\nnew Float32Array(length)\nnew Float32Array(typedArray)\nnew Float32Array(object)\n\nnew Float32Array(buffer)\nnew Float32Array(buffer, byteOffset)\nnew Float32Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Float32Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Float64Array/Float64Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Float64Array()\n\nThe **`Float64Array()`** typed array constructor creates a new\n`Float64Array` object, which is, an array of 64-bit floating point numbers\n(corresponding to the C `double` data type) in the platform byte order. If\ncontrol over byte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are\ninitialized to `0`. Once established, you can reference elements in the array\nusing the object's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Float64Array()\nnew Float64Array(length)\nnew Float64Array(typedArray)\nnew Float64Array(object)\n\nnew Float64Array(buffer)\nnew Float64Array(buffer, byteOffset)\nnew Float64Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Float64Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/FormData/FormData.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData()\n\nThe **`FormData()`** constructor creates a new `FormData` object.\n\n## Syntax\n\n```js\nnew FormData()\nnew FormData(form)\n```\n\n> **Note:** `FormData()` can only be constructed with `new`. Attempting to call it without `new` throws a `TypeError`.\n\n### Parameters\n\n- `form` _**optional**_\n  - : An HTML `<form>` element — when specified, the `FormData` object will be populated with the form's current key/value pairs using the name property of each element for the keys and their submitted value for the values. File input elements are handled specially: their values are taken from the files selected by the user in the upload control.\n\n### Return value\n\nA new `FormData` object, pre-populated with form data if the optional `form` parameter was provided.\n\n## Description\n\nThe `FormData` interface provides a way to construct a set of key/value pairs representing form fields and their values, which can be sent using methods such as `fetch()`. It uses the same format a form would use if the encoding type were set to `\"multipart/form-data\"`.\n\nYou can also append additional data to the `FormData` object after it's created using its various methods.\n\nA `FormData` object can be used in a number of ways with other APIs:\n\n1. It can be sent with the `fetch()` API\n2. It works seamlessly with the `Request` and `Response` objects - it can be used directly as the body of a `Request` object\n3. It can be obtained from a `Response` object using the `formData()` method\n4. It can be passed directly to the `URLSearchParams` constructor\n\nThe transmitted data is in the same format that the form's `submit()` method would use to send the data if the form's encoding type were set to `\"multipart/form-data\"`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/FormData/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.append()\n\nThe **`append()`** method of the `FormData` interface appends a new value onto an existing key inside a `FormData` object, or adds the key if it does not already exist.\n\n## Syntax\n\n```js\nappend(name, value)\nappend(name, value, filename)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the field whose data is contained in `value`.\n- `value`\n  - : The value of the field. This can be a string or a `Blob` (including subclasses such as `File`). If none of these, the value is converted to a string.\n- `filename` _**optional**_\n  - : The filename reported to the server when a `Blob` or `File` is passed as the second parameter. The default filename for `Blob` objects is \"blob\". The default filename for `File` objects is the file's filename.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/FormData/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.delete()\n\nThe **`delete()`** method of the `FormData` interface removes all key/value pairs with the given name from the `FormData` object.\n\n## Syntax\n\n```js\ndelete(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the key you want to delete.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/FormData/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.entries()\n\nThe **`entries()`** method of the `FormData` interface returns an iterator allowing iteration through all key/value pairs contained in this object. The iterator yields a new array for each key/value pair, with the first element being the key and the second element being the value.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nAn `iterator`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/FormData/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.forEach()\n\nThe **`forEach()`** method of the `FormData` interface executes the provided callback function once for each key/value pair in the `FormData` object.\n\n## Syntax\n\n```js\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n  - : A function to execute for each entry in the object. The function will be passed the following arguments:\n    - `value`\n      - : The value of the current entry.\n    - `key`\n      - : The key of the current entry.\n    - `formData`\n      - : The `FormData` object being traversed.\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/FormData/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.get()\n\nThe **`get()`** method of the `FormData` interface returns the first value associated with a given key from within a `FormData` object. If you expect multiple values and want all of them, use the [`getAll()`](../../../globals/FormData/prototype/getAll.mdx) method instead.\n\n## Syntax\n\n```js\nget(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the key you want to retrieve.\n\n### Return value\n\nA `FormDataEntryValue` containing the value. If the key does not exist, it returns `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/FormData/prototype/getAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.getAll()\n\nThe **`getAll()`** method of the `FormData` interface returns all the values associated with a given key from within a `FormData` object.\n\n## Syntax\n\n```js\ngetAll(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the key you want to retrieve.\n\n### Return value\n\nAn array of `FormDataEntryValue` items containing all values with the given key. If the key doesn't exist, an empty array is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/FormData/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.has()\n\nThe **`has()`** method of the `FormData` interface returns a boolean indicating whether a `FormData` object contains a key/value pair with the given name.\n\n## Syntax\n\n```js\nhas(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the key you want to test for existence.\n\n### Return value\n\n`true` if a key/value pair with the specified name exists; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/FormData/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.keys()\n\nThe **`keys()`** method of the `FormData` interface returns an iterator allowing iteration through all keys contained in this object. The iterator yields the key for each value.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nAn `iterator`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/FormData/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.set()\n\nThe **`set()`** method of the `FormData` interface sets a new value for an existing key inside a `FormData` object, or adds the key/value if it does not already exist.\n\nThe difference between `set()` and [`append()`](../../../globals/FormData/prototype/append.mdx) is that if the specified key already exists, `set()` overwrites all existing values with the new one, whereas `append()` appends the new value onto the end of the existing values.\n\n## Syntax\n\n```js\nset(name, value)\nset(name, value, filename)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the field whose data is contained in `value`.\n- `value`\n  - : The value of the field. This can be a string or a `Blob` (including subclasses such as `File`). If none of these, the value is converted to a string.\n- `filename` _**optional**_\n  - : The filename reported to the server when a `Blob` or `File` is passed as the second parameter. The default filename for `Blob` objects is \"blob\". The default filename for `File` objects is the file's filename.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/FormData/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.values()\n\nThe **`values()`** method of the `FormData` interface returns an iterator allowing iteration through all values contained in this object. The iterator yields the value for each key/value pair.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nAn `iterator`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Function/Function.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function()\n\nThe **`Function()`** constructor creates a new [`Function`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function) object. Calling the constructor directly can create functions dynamically, but suffers from security and similar (but far less significant) performance issues as `eval()`. However, unlike `eval` (which may have access to the local scope), the `Function` constructor creates functions which execute in the global scope only.\n\n\n\n## Syntax\n\n```js\nnew Function(functionBody)\nnew Function(arg0, functionBody)\nnew Function(arg0, arg1, functionBody)\nnew Function(arg0, arg1, /* … ,*/ argN, functionBody)\n\nFunction(functionBody)\nFunction(arg0, functionBody)\nFunction(arg0, arg1, functionBody)\nFunction(arg0, arg1, /* … ,*/ argN, functionBody)\n```\n\n> **Note:** `Function()` can be called with or without `new`. Both create a new `Function` instance.\n\n### Parameters\n\n- `argN` _**optional**_\n\n  - : Names to be used by the function as formal argument names. Each must be a string that corresponds to a valid JavaScript parameter (any of plain [identifier](https://developer.mozilla.org/docs/Glossary/Identifier), [rest parameter](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/rest_parameters), or [destructured](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment) parameter, optionally with a [default](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/Default_parameters)), or a list of such strings separated with commas.\n\n    As the parameters are parsed in the same way as function expressions, whitespace and comments are accepted. For example: `\"x\", \"theValue = 42\", \"[a, b] /* numbers */\"` — or `\"x, theValue = 42, [a, b] /* numbers */\"`. (`\"x, theValue = 42\", \"[a, b]\"` is also correct, though very confusing to read.)\n\n- `functionBody`\n  - : A string containing the JavaScript statements comprising the function definition.\n\n## Description\n\n`Function` objects created with the `Function` constructor are parsed when the function is created. This is less efficient than creating a function with a [function expression](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/function) or [function declaration](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function) and calling it within your code, because such functions are parsed with the rest of the code.\n\nAll arguments passed to the function, except the last, are treated as the names of the identifiers of the parameters in the function to be created, in the order in which they are passed. The function will be dynamically compiled as a function expression, with the source assembled in the following fashion:\n\n```js\n`function anonymous(${args.join(\",\")}\n) {\n${functionBody}\n}`\n```\n\nThis is observable by calling the function's [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/toString) method.\n\nHowever, unlike normal [function expressions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/function), the name `anonymous` is not added to the `functionBody`'s scope, since `functionBody` only has access the global scope. If `functionBody` is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode) (the body itself needs to have the `\"use strict\"` directive since it doesn't inherit the strictness from the context), you may use [`arguments.callee`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/arguments/callee) to refer to the function itself. Alternatively, you can define the recursive part as an inner function:\n\n```js\nconst recursiveFn = new Function(\"count\", `\n(function recursiveFn(count) {\n  if (count < 0) {\n    return;\n  }\n  console.log(count);\n  recursiveFn(count - 1);\n})(count);\n`);\n```\n\nNote that the two dynamic parts of the assembled source — the parameters list `args.join(\",\")` and `functionBody` — will first be parsed separately to ensure they are each syntactically valid. This prevents injection-like attempts.\n\n```js\nnew Function(\"/*\", \"*/) {\");\n// SyntaxError: Unexpected end of arg string\n// Doesn't become \"function anonymous(/*) {*/) {}\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Function/prototype/apply.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.apply()\n\nThe **`apply()`** method calls the specified function with a given `this` value, and `arguments` provided as an array (or an [array-like object](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects)).\n\n\n\n## Syntax\n\n```js\napply(thisArg)\napply(thisArg, argsArray)\n```\n\n### Parameters\n\n- `thisArg`\n  - : The value of `this` provided for the call to `func`. If the function is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) will be replaced with the global object, and primitive values will be converted to objects.\n- `argsArray` _**optional**_\n  - : An array-like object, specifying the arguments with which `func` should be called, or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../../globals/undefined.mdx) if no arguments should be provided to the function.\n\n### Return value\n\nThe result of calling the function with the specified `this` value and arguments.\n\n## Description\n\n> **Note:** This function is almost identical to [`Function.prototype.call()`](../../../globals/Function/prototype/call.mdx), except that `call()` accepts an **argument list**, while `apply()` accepts a **single array of arguments** — for example, `func.apply(this, ['eat', 'bananas'])` vs. `func.call(this, 'eat', 'bananas')`.\n\nNormally, when calling a function, the value of [`this`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this) inside the function is the object that the function was accessed on. With `apply()`, you can assign an arbitrary value as `this` when calling an existing function, without first attaching the function to the object as a property. This allows you to use methods of one object as generic utility functions.\n\n> **Warning:** Do not use `apply()` to chain constructors (for example, to implement inheritance). This invokes the constructor function as a plain function, which means [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target) is `undefined`, and classes throw an error because they can't be called without `new`. Use [`Reflect.construct()`](../../../globals/Reflect/construct.mdx) or [`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Function/prototype/bind.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.bind()\n\nThe **`bind()`** method creates a new function that, when called, has its `this` keyword set to the provided value, with a given sequence of arguments preceding any provided when the new function is called.\n\n\n\n## Syntax\n\n```js\nbind(thisArg)\nbind(thisArg, arg1)\nbind(thisArg, arg1, arg2)\nbind(thisArg, arg1, arg2, /* …, */ argN)\n```\n\n### Parameters\n\n- `thisArg`\n  - : The value to be passed as the `this` parameter to the target function `func` when the bound function is called. If the function is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) will be replaced with the global object, and primitive values will be converted to objects. The value is ignored if the bound function is constructed using the `new` operator.\n- `arg1, …, argN` _**optional**_\n  - : Arguments to prepend to arguments provided to the bound function when invoking `func`.\n\n### Return value\n\nA copy of the given function with the specified `this` value, and initial arguments (if provided).\n\n## Description\n\nThe `bind()` function creates a new _bound function_. Calling the bound function generally results in the execution of the function it wraps, which is also called the _target function_. The bound function will store the parameters passed — which include the value of `this` and the first few arguments — as its internal state. These values are stored in advance, instead of being passed at call time. You can generally see `const boundFn = fn.bind(thisArg, arg1, arg2)` as being equivalent to `const boundFn = (...restArgs) => fn.call(thisArg, arg1, arg2, ...restArgs)` for the effect when it's called (but not when `boundFn` is constructed).\n\nA bound function can be further bound by calling `boundFn.bind(thisArg, /* more args */)`, which creates another bound function `boundFn2`. The newly bound `thisArg` value is ignored, because the target function of `boundFn2`, which is `boundFn`, already has a bound `this`. When `boundFn2` is called, it would call `boundFn`, which in turn calls `fn`. The arguments that `fn` ultimately receives are, in order: the arguments bound by `boundFn`, arguments bound by `boundFn2`, and the arguments received by `boundFn2`.\n\n```js\n\"use strict\"; // prevent `this` from being boxed into the wrapper object\n\nfunction log(...args) {\n  console.log(this, ...args);\n}\nconst boundLog = log.bind(\"this value\", 1, 2);\nconst boundLog2 = boundLog.bind(\"new this value\", 3, 4);\nboundLog2(5, 6); // \"this value\", 1, 2, 3, 4, 5, 6\n```\n\nA bound function may also be constructed using the `new` operator if its target function is constructable. Doing so acts as though the target function had instead been constructed. The prepended arguments are provided to the target function as usual, while the provided `this` value is ignored (because construction prepares its own `this`, as seen by the parameters of [`Reflect.construct`](../../../globals/Reflect/construct.mdx)). If the bound function is directly constructed, [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target) will be the target function instead. (That is, the bound function is transparent to `new.target`.)\n\n```js\nclass Base {\n  constructor(...args) {\n    console.log(new.target === Base);\n    console.log(args);\n  }\n}\n\nconst BoundBase = Base.bind(null, 1, 2);\n\nnew BoundBase(3, 4); // true, [1, 2, 3, 4]\n```\n\nHowever, because a bound function does not have the [`prototype`](../../../globals/Function/prototype/) property, it cannot be used as a base class for [`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends).\n\n```js example-bad\nclass Derived extends class {}.bind(null) {}\n// TypeError: Class extends value does not have valid prototype property undefined\n```\n\nWhen using a bound function as the right-hand side of [`instanceof`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/instanceof), `instanceof` would reach for the target function (which is stored internally in the bound function) and read its `prototype` instead.\n\n```js\nclass Base {}\nconst BoundBase = Base.bind(null, 1, 2);\nconsole.log(new Base() instanceof BoundBase); // true\n```\n\nThe bound function has the following properties:\n\n- [`length`](../../../globals/Function/prototype/length.mdx)\n  - : The `length` of the target function minus the number of arguments being bound (not counting the `thisArg` parameter), with 0 being the minimum value.\n- [`name`](../../../globals/Function/prototype/name.mdx)\n  - : The `name` of the target function plus a `\"bound \"` prefix.\n\nThe bound function also inherits the [prototype chain](https://developer.mozilla.org/docs/Web/JavaScript/Inheritance_and_the_prototype_chain) of the target function. However, it doesn't have other own properties of the target function (such as [static properties](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/static) if the target function is a class).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Function/prototype/call.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.call()\n\nThe **`call()`** method calls the function with a given `this` value and arguments provided individually.\n\n## Syntax\n\n```js\ncall(thisArg)\ncall(thisArg, arg1)\ncall(thisArg, arg1, /* …, */ argN)\n```\n\n### Parameters\n\n- `thisArg`\n  - : The value to use as `this` when calling `func`. If the function is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) will be replaced with the global object, and primitive values will be converted to objects.\n- `arg1, …, argN` _**optional**_\n  - : Arguments for the function.\n\n### Return value\n\nThe result of calling the function with the specified `this` value and arguments.\n\n## Description\n\n> **Note:** This function is almost identical to [`Function.prototype.apply()`](../../../globals/Function/prototype/apply.mdx), except that `call()` accepts an **argument list**, while `apply()` accepts a **single array of arguments** — for example, `func.apply(this, ['eat', 'bananas'])` vs. `func.call(this, 'eat', 'bananas')`.\n\nNormally, when calling a function, the value of [`this`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this) inside the function is the object that the function was accessed on. With `call()`, you can assign an arbitrary value as `this` when calling an existing function, without first attaching the function to the object as a property. This allows you to use methods of one object as generic utility functions.\n\n> **Warning:** Do not use `call()` to chain constructors (for example, to implement inheritance). This invokes the constructor function as a plain function, which means [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target) is `undefined`, and classes throw an error because they can't be called without `new`. Use [`Reflect.construct()`](../../../globals/Reflect/construct.mdx) or [`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Function/prototype/index.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.prototype\n\nThe **`prototype`** data property of a `Function` instance is used when the function is used as a constructor with the `new` operator. It will become the new object's prototype.\n\n> **Note:** Not all `Function` objects have the `prototype` property — see [description](#description).\n\n## Value\n\nAn object.\n\n> **Note:** The `prototype` property of [classes](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes) is not writable.\n\n## Description\n\nWhen a function is called with `new`, the constructor's `prototype` property will become the resulting object's prototype.\n\n```js\nfunction Ctor() {}\nconst inst = new Ctor();\nconsole.log(Object.getPrototypeOf(inst) === Ctor.prototype); // true\n```\n\nYou can read [Inheritance and the prototype chain](https://developer.mozilla.org/docs/Web/JavaScript/Inheritance_and_the_prototype_chain#constructors) for more information about the interactions between a constructor function's `prototype` property and the resulting object's prototype.\n\nA function having a `prototype` property is not sufficient for it to be eligible as a constructor. [Generator functions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function*) have a `prototype` property, but cannot be called with `new`:\n\n```js\nasync function* asyncGeneratorFunction() {}\nfunction* generatorFunction() {}\n```\n\nInstead, generator functions' `prototype` property is used when they are called _without_ `new`. The `prototype` property will become the returned [`Generator`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Generator) object's prototype.\n\nIn addition, some functions may have a `prototype` but throw unconditionally when called with `new`. For example, the [`Symbol()`](../../../globals/Symbol/Symbol.mdx) and [`BigInt`](../../../globals/BigInt/BigInt.mdx) functions throw when called with `new`, because `Symbol.prototype` and `BigInt.prototype` are only intended to provide methods for the primitive values, but the wrapper objects should not be directly constructed.\n\nThe following functions do not have `prototype`, and are therefore ineligible as constructors, even if a `prototype` property is later manually assigned:\n\n```js\nconst method = { foo() {} }.foo;\nconst arrowFunction = () => {};\nasync function asyncFunction() {}\n```\n\nThe following are valid constructors that have `prototype`:\n\n```js\nclass Class {}\nfunction fn() {}\n```\n\nA [bound function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/bind) does not have a `prototype` property, but may be constructable. When it's constructed, the target function is constructed instead, and if the target function is constructable, it would return a normal instance.\n\n```js\nconst boundFunction = function () {}.bind(null);\n```\n\nA function's `prototype` property, by default, is a plain object with one property: (`constructor`)[../../../globals/Object/prototype/constructor.mdx), which is a reference to the function itself. The `constructor` property is writable, non-enumerable, and configurable.\n\nIf the `prototype` of a function is reassigned with something other than an `Object`, when the function is called with `new`, the returned object's prototype would be `Object.prototype` instead. (In other words, `new` ignores the `prototype` property and constructs a plain object.)\n\n```js\nfunction Ctor() {}\nCtor.prototype = 3;\nconsole.log(Object.getPrototypeOf(new Ctor()) === Object.prototype); // true\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Function/prototype/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.length\n\nThe **`length`** data property of a `Function` instance indicates the number of parameters expected by the function.\n\n## Value\n\nA number.\n\n## Description\n\nA `Function` object's `length` property indicates how many arguments the function expects, i.e. the number of formal parameters. \n\nThe `Function` constructor is itself a `Function` object. Its `length` data property has a value of `1`.\n\nDue to historical reasons, `Function.prototype` is a callable itself. The `length` property of `Function.prototype` has a value of `0`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Function/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.name\n\nThe **`name`** property of a `Function` instance indicates the function's name as specified when it was created, or it may be either `anonymous` or `''` (an empty string) for functions created anonymously.\n\n## Value\n\nA string.\n\n> **Note:** In non-standard, pre-ES2015 implementations the `configurable` attribute was `false` as well.\n\n## Description\n\nThe function's `name` property can be used to identify the function in debugging tools or error messages. It has no semantic significance to the language itself.\n\nThe `name` property is read-only and cannot be changed by the assignment operator:\n\n```js\nfunction someFunction() {}\n\nsomeFunction.name = 'otherFunction';\nconsole.log(someFunction.name); // someFunction\n```\n\nTo change it, use [`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx).\n\nThe `name` property is typically inferred from how the function is defined. In the following sections, we will describe the various ways in which it can be inferred.\n\n### Function declaration\n\nThe `name` property returns the name of a function declaration.\n\n```js\nfunction doSomething() {}\ndoSomething.name; // \"doSomething\"\n```\n\n### Default-exported function declaration\n\nAn [`export default`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/export) declaration exports the function as a declaration instead of an expression. If the declaration is anonymous, the name is `\"default\"`.\n\n```js\n// -- someModule.js --\nexport default function () {};\n\n// -- main.js --\nimport someModule from \"./someModule.js\";\n\nsomeModule.name; // \"default\"\n```\n\n### Function constructor\n\nFunctions created with the [`Function()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/Function) constructor have name \"anonymous\".\n\n```js\nnew Function().name; // \"anonymous\"\n```\n\n### Function expression\n\nIf the function expression is named, that name is used as the `name` property.\n\n```js\nconst someFunction = function someFunctionName() {};\nsomeFunction.name; // \"someFunctionName\"\n```\n\nAnonymous function expressions created using the keyword `function` or arrow functions would have `\"\"` (an empty string) as their name.\n\n```js\n(function () {}).name; // \"\"\n(() => {}).name; // \"\"\n```\n\nHowever, such cases are rare — usually, in order to refer to the expression elsewhere, the function expression is attached to an identifier when it's created (such as in a variable declaration). In such cases, the name can be inferred, as the following few subsections demonstrate.\n\nOne practical case where the name cannot be inferred is a function returned from another function:\n\n```js\nfunction getFoo() {\n  return () => {};\n}\ngetFoo().name; // \"\"\n```\n\n### Variable declaration and method\n\nVariables and methods can infer the name of an anonymous function from its syntactic position.\n\n```js\nconst f = function () {};\nconst object = {\n  someMethod: function () {}\n};\n\nconsole.log(f.name); // \"f\"\nconsole.log(object.someMethod.name); // \"someMethod\"\n```\n\nThe same applies to assignment:\n\n```js\nlet f;\nf = () => {};\nf.name; // \"f\"\n```\n\n### Initializer and default value\n\nFunctions in initializers (default values) of [destructuring](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#default_value), [default parameters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/Default_parameters), [class fields](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/Public_class_fields), etc., will inherit the name of the bound identifier as their `name`.\n\n```js\nconst [f = () => {}] = [];\nf.name; // \"f\"\n\nconst { someMethod: m = () => {} } = {};\nm.name; // \"m\"\n\nfunction foo(f = () => {}) {\n  console.log(f.name);\n}\nfoo(); // \"f\"\n\nclass Foo {\n  static someMethod = () => {};\n}\nFoo.someMethod.name; // someMethod\n```\n\n### Shorthand method\n\n```js\nconst o = {\n  foo() {},\n};\no.foo.name; // \"foo\";\n```\n\n### Bound function\n\n[`Function.prototype.bind()`](../../../globals/Function/prototype/bind.mdx) produces a function whose name is \"bound \" plus the function name.\n\n```js\nfunction foo() {};\nfoo.bind({}).name; // \"bound foo\"\n```\n\n### Getter and setter\n\nWhen using [`get`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/get) and [`set`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/set) accessor properties, \"get\" or \"set\" will appear in the function name.\n\n```js\nconst o = {\n  get foo() {},\n  set foo(x) {},\n};\n\nconst descriptor = Object.getOwnPropertyDescriptor(o, \"foo\");\ndescriptor.get.name; // \"get foo\"\ndescriptor.set.name; // \"set foo\";\n```\n\n### Class\n\nA class's name follows the same algorithm as function declarations and expressions.\n\n```js\nclass Foo {}\nFoo.name; // \"Foo\"\n```\n\n> **Warning:** JavaScript will set the function's `name` property only if a function does not have an own property called `name`. However, classes' [static members](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/static) will be set as own properties of the class constructor function, and thus prevent the built-in `name` from being applied. See [telling the constructor name of an object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name#telling_the_constructor_name_of_an_object) for more details.\n\n### Symbol as function name\n\nIf a `Symbol` is used a function name and the symbol has a description, the method's name is the description in square brackets.\n\n```js\nconst sym1 = Symbol(\"foo\");\nconst sym2 = Symbol();\n\nconst o = {\n  [sym1]() {},\n  [sym2]() {},\n};\n\no[sym1].name; // \"[foo]\"\no[sym2].name; // \"[]\"\n```\n\n### Private property\n\nPrivate fields and private methods have the hash (`#`) as part of their names.\n\n```js\nclass Foo {\n  #field = () => {};\n  #method() {}\n  getNames() {\n    console.log(this.#field.name);\n    console.log(this.#method.name);\n  }\n}\n\nnew Foo().getNames();\n// \"#field\"\n// \"#method\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Function/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.toString()\n\nThe **`toString()`** method returns a string representing the source code of the specified `Function`.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the source code of the function.\n\n## Description\n\nThe `Function` object overrides the `toString()` method\ninherited from `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For user-defined `Function`\nobjects, the `toString` method returns a string containing the source text\nsegment which was used to define the function.\n\nJavaScript calls the `toString` method automatically when a\n`Function` is to be represented as a text value, e.g. when a function is\nconcatenated with a string.\n\nThe `toString()` method will throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) exception\n(\"Function.prototype.toString called on incompatible object\"), if its\n`this` value object is not a `Function` object.\n\n```js example-bad\nFunction.prototype.toString.call('foo'); // throws TypeError\n```\n\nIf the `toString()` method is called on built-in function objects, a\nfunction created by [`Function.prototype.bind()`](../../../globals/Function/prototype/bind.mdx), or\nother non-JavaScript functions, then `toString()` returns a\n_native function string_ which looks like\n\n```js\n\"function someName() { [native code] }\"\n```\n\nFor intrinsic object methods and functions, `someName` is the initial name of the function; otherwise its content may be implementation-defined, but will always be in property name syntax, like `[1 + 1]`, `someName`, or `1`.\n\n> **Note:** This means using [`eval()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/eval) on native function strings is a guaranteed syntax error.\n\nIf the `toString()` method is called on a function created by the `Function` constructor, `toString()` returns the source code of a synthesized function declaration named \"anonymous\" using the provided parameters and function body. For example, `Function(\"a\", \"b\", \"return a + b\").toString()` will return:\n\n```js\n\"function anonymous(a,b\\n) {\\nreturn a + b\\n}\"\n```\n\nSince ES2018, the spec requires the return value of `toString()` to be the exact same source code as it was declared, including any whitespace and/or comments — or, if the host doesn't have the source code available for some reason, requires returning a native function string. Support for this revised behavior can be found in the [browser compatibility table](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/toString#browser_compatibility).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Headers/Headers.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers()\n\nThe **`Headers()`** constructor creates a new `Headers` object.\n\n## Syntax\n\n```js\nnew Headers()\nnew Headers(init)\n```\n\n### Parameters\n\n- `init` _**optional**_\n  - : An object containing any HTTP headers that you want to pre-populate your `Headers` object with. This can be a\n    simple object literal with `String` values, an array of name-value pairs, where each pair is a 2-element string array; or an existing\n    `Headers` object. In the last case, the new `Headers` object\n    copies its data from the existing `Headers` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Headers/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.append()\n\nThe **`append()`** method of the `Headers`\ninterface appends a new value onto an existing header inside a `Headers`\nobject, or adds the header if it does not already exist.\n\nThe difference between `Headers.prototype.set()` and `append()` is\nthat if the specified header already exists and accepts multiple values,\n`set()` will overwrite the existing value with the new one, whereas\n`append()` will append the new value onto the end of the set of values.\n\n## Syntax\n\n```js\nappend(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to add to the `Headers` object.\n- `value`\n  - : The value of the HTTP header you want to add.\n\n### Return value\n\nNone (`undefined`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Headers/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.delete()\n\nThe **`delete()`** method of the `Headers`\ninterface deletes a header from the current `Headers` object.\n\nThis method throws a `TypeError` for the following reasons:\n\n- The value of the name parameter is not the name of an HTTP header.\n\n## Syntax\n\n```js\ndelete(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to delete from the `Headers` object.\n\n### Return value\n\nNone (`undefined`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Headers/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.entries()\n\nThe **`Headers.entries()`** method returns an iterator allowing to go through all key/value pairs\ncontained in this object. The both the key and value of each pairs are `String` objects.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Headers/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.forEach()\n\nThe **`Headers.forEach()`** method executes a callback function once per each key/value pair in the `Headers` object.\n\n## Syntax\n\n```js\n// Arrow function\nforEach((value, key) => { /* … */ })\nforEach((value, key, object) => { /* … */ })\n\n// Inline callback function\nforEach(function (value, key) { /* … */ })\nforEach(function (value, key, object) { /* … */ })\nforEach(function (value, key) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n  - : Function to execute for each entry in the map. It takes the following arguments:\n    - `value`\n      - : Value of the currently visited header entry.\n    - `key`\n      - : Name of the currently visited header entry.\n    - `object`\n      - : The Headers object being iterated.\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `callback`.\n\n### Return value\n\n`undefined`.\n\n## Description\n\nThe `Headers.forEach()` method executes the provided callback once for each key of the Headers which actually exist. It is not invoked for keys which have been deleted. However, it is executed for keys which are present but have the value undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Headers/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.get()\n\nThe **`get()`** method of the [`Headers`](../../../globals/Headers/Headers.mdx) interface\nreturns a byte string of all the values of a header within a `Headers` object\nwith a given name. If the requested header doesn't exist in the `Headers`\nobject, it returns `null`.\n\n## Syntax\n\n```js\nget(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header whose values you want to retrieve from the\n    `Headers` object. If the given name is not the name of an HTTP header, this\n    method throws a `TypeError`. The name is case-insensitive.\n\n### Return value\n\nA [`String`](../../../globals/String/String.mdx) sequence representing the values of the retrieved header or\n`null` if this header is not set.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Headers/prototype/getSetCookie.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.getSetCookie()\n\nThe **`getSetCookie()`** method of the [`Headers`](../../../globals/Headers/Headers.mdx) interface\nreturns an array of all the values of the `Set-Cookie` headers, returning\nan empty list if none are present.\n\n## Syntax\n\n```js\ngetSetCookie()\n```\n\n### Return value\n\n`String[]` representing the list of `Set-Cookie` headers.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Headers/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.has()\n\nThe **`has()`** method of the `Headers` interface\nreturns a boolean stating whether a `Headers` object contains a certain\nheader.\n\n## Syntax\n\n```js\nhas(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to test for. If the given name is not a valid\n    HTTP header name, this method throws a `TypeError`.\n\n### Return value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Headers/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.keys()\n\nThe **`Headers.keys()`** method returns an iterator allowing to go through all keys contained\nin this object. The keys are `String` objects.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Headers/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.set()\n\nThe **`set()`** method of the `Headers` interface\nsets a new value for an existing header inside a `Headers` object, or adds\nthe header if it does not already exist.\n\nThe difference between `set()` and `Headers.append` is that if\nthe specified header already exists and accepts multiple values, `set()`\noverwrites the existing value with the new one, whereas `Headers.append`\nappends the new value to the end of the set of values.\n\n## Syntax\n\n```js\nset(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to set to a new value. If the given name is not\n    the name of an HTTP header, this method throws a `TypeError`.\n- `value`\n  - : The new value you want to set.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Headers/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.values()\n\nThe **`Headers.values()`** method returns an iterator allowing to go through all values contained\nin this object. The values are `String` objects.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/HmacImportParams/HmacImportParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# HmacImportParams\n\nThe **`HmacImportParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.importKey`, when generating a key for the `HMAC` algorithm.\n\n## Instance properties\n\n- `name`\n  - : A string. This should be set to `HMAC`.\n- `hash`\n\n  - : A string representing the name of the digest function to use. The can take a value of `SHA-1`, `SHA-256`, `SHA-384`, or `SHA-512`.\n\n- `length` _optional_\n  - : A `Number` representing the length in bits of the key. If this is omitted the length of the key is equal to the length of the digest generated by the digest function you have chosen. Unless you have a good reason to use a different length, omit this property and use the default.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Infinity.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Infinity\n\nThe global property **`Infinity`** is a numeric value representing infinity.\n\n## Value\n\nThe same number value as `Number.POSITIVE_INFINITY`.\n\n## Description\n\n`Infinity` is a property of the _global object_. In other words, it is a variable in global scope.\n\nThe value `Infinity` (positive infinity) is greater than any other number.\n\nThis value behaves slightly differently than mathematical infinity; see `Number.POSITIVE_INFINITY` for details.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Int16Array/Int16Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Int16Array()\n\nThe **`Int16Array()`** typed array constructor creates an array\nof twos-complement 16-bit signed integers in the platform byte order. If control over\nbyte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are initialized\nto `0`. Once established, you can reference elements in the array using the\nobject's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Int16Array()\nnew Int16Array(length)\nnew Int16Array(typedArray)\nnew Int16Array(object)\n\nnew Int16Array(buffer)\nnew Int16Array(buffer, byteOffset)\nnew Int16Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Int16Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Int32Array/Int32Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Int32Array()\n\nThe **`Int32Array()`** typed array constructor creates an array\nof twos-complement 32-bit signed integers in the platform byte order. If control over\nbyte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are initialized\nto `0`. Once established, you can reference elements in the array using the\nobject's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Int32Array()\nnew Int32Array(length)\nnew Int32Array(typedArray)\nnew Int32Array(object)\n\nnew Int32Array(buffer)\nnew Int32Array(buffer, byteOffset)\nnew Int32Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Int32Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Int8Array/Int8Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Int8Array()\n\nThe **`Int8Array()`** constructor creates a typed array of\ntwos-complement 8-bit signed integers. The contents are initialized to `0`.\nOnce established, you can reference elements in the array using the object's methods, or\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew Int8Array()\nnew Int8Array(length)\nnew Int8Array(typedArray)\nnew Int8Array(object)\n\nnew Int8Array(buffer)\nnew Int8Array(buffer, byteOffset)\nnew Int8Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Int8Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/JSON/parse.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# JSON.parse()\n\nThe **`JSON.parse()`** method parses a JSON string, constructing the JavaScript value or object described by the string. An optional _reviver_ function can be provided to perform a transformation on the resulting object before it is returned.\n\n## Syntax\n\n```js\nJSON.parse(text)\nJSON.parse(text, reviver)\n```\n\n### Parameters\n\n- `text`\n  - : The string to parse as JSON.\n- `reviver` _**optional**_\n  - : If a function, this prescribes how each value originally produced by parsing is transformed before being returned. Non-callable values are ignored. The function is called with the following arguments:\n    - `key`\n      - : The key associated with the value.\n    - `value`\n      - : The value produced by parsing.\n\n### Return value\n\nThe `Object`, `Array`, string, number, boolean, or `null` value corresponding to the given JSON `text`.\n\n### Exceptions\n\n- [`SyntaxError`](../../globals/SyntaxError/SyntaxError.mdx)\n  - : Thrown if the string to parse is not valid JSON.\n\n## Description\n\n`JSON.parse()` parses a JSON string according to the [JSON grammar](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/JSON#full_json_grammar), then evaluates the string as if it's a JavaScript expression. The only instance where a piece of JSON text represents a different value from the same JavaScript expression is when dealing with the `\"__proto__\"` key — see [Object literal syntax vs. JSON](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Object_initializer#object_literal_syntax_vs._json).\n\n### The reviver parameter\n\nIf a `reviver` is specified, the value computed by parsing is _transformed_ before being returned. Specifically, the computed value and all its properties (in a [depth-first](https://en.wikipedia.org/wiki/Depth-first_search) fashion, beginning with the most nested properties and proceeding to the original value itself) are individually run through the `reviver`.\n\nThe `reviver` is called with the object containing the property being processed as `this`, and two arguments: `key` and `value`, representing the property name as a string (even for arrays) and the property value. If the `reviver` function returns [`undefined`](../../globals/undefined.mdx) (or returns no value — for example, if execution falls off the end of the function), the property is deleted from the object. Otherwise, the property is redefined to be the return value. If the `reviver` only transforms some values and not others, be certain to return all untransformed values as-is — otherwise, they will be deleted from the resulting object.\n\nSimilar to the `replacer` parameter of [`JSON.stringify()`](../../globals/JSON/stringify.mdx), `reviver` will be last called on the root object with an empty string as the `key` and the root object as the `value`. For JSON text parsing to primitive values, `reviver` will be called once.\n\nNote that `reviver` is run after the value is parsed. So, for example, numbers in JSON text will have already been converted to JavaScript numbers, and may lose precision in the process. To transfer large numbers without loss of precision, serialize them as strings, and revive them to [BigInts](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/BigInt), or other appropriate arbitrary precision formats.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/JSON/stringify.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# JSON.stringify()\n\nThe **`JSON.stringify()`** method converts a JavaScript value to a JSON string, optionally replacing values if a replacer function is specified or optionally including only the specified properties if a replacer array is specified.\n\n## Syntax\n\n```js\nJSON.stringify(value)\nJSON.stringify(value, replacer)\nJSON.stringify(value, replacer, space)\n```\n\n### Parameters\n\n- `value`\n  - : The value to convert to a JSON string.\n- `replacer` _**optional**_\n  - : A function that alters the behavior of the stringification process, or an array of strings or numbers naming properties of `value` that should be included in the output. If `replacer` is an array, all elements that are not strings or numbers (can be either primitives or wrapper objects), including `Symbol` values, are completely ignored. If `replacer` is anything other than a function or an array (e.g. [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or not provided), all properties of the object are included in the resulting JSON string.\n- `space` _**optional**_\n\n  - : A string or number that's used to insert white space (including indentation, line break characters, etc.) into the output JSON string for readability purposes.\n\n    If this is a number, it indicates the number of space characters to be used as indentation, clamped to 10 (that is, any number greater than `10` is treated as if it were `10`). Values less than 1 indicate that no space should be used.\n\n    If this is a string, the string (or the first 10 characters of the string, if it's longer than that) is inserted before every nested object or array.\n\n    If `space` is anything other than a string or number (can be either a primitive or a wrapper object) — for example, is [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or not provided — no white space is used.\n\n### Return value\n\nA JSON string representing the given value, or undefined.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if one of the following is true:\n    - `value` contains a circular reference.\n    - A `BigInt` value is encountered.\n\n## Description\n\n`JSON.stringify()` converts a value to JSON notation representing it:\n\n- `Boolean`, `Number`, `String`, and `BigInt` (obtainable via [`Object()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/Object)) objects are converted to the corresponding primitive values during stringification, in accordance with the traditional conversion semantics. `Symbol` objects (obtainable via [`Object()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/Object)) are treated as plain objects.\n- Attempting to serialize `BigInt` values will throw. However, if the BigInt has a `toJSON()` method (through monkeypatching: `BigInt.prototype.toJSON = ...`), that method can provide the serialization result. This constraint ensures that a proper serialization (and, very likely, its accompanying deserialization) behavior is always explicitly provided by the user.\n- [`undefined`](../../globals/undefined.mdx), `Function`, and `Symbol` values are not valid JSON values. If any such values are encountered during conversion, they are either omitted (when found in an object) or changed to [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) (when found in an array). `JSON.stringify()` can return `undefined` when passing in \"pure\" values like `JSON.stringify(() => {})` or `JSON.stringify(undefined)`.\n- The numbers [`Infinity`](../../globals/Infinity.mdx) and [`NaN`](../../globals/NaN.mdx), as well as the value [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null), are all considered `null`. (But unlike the values in the previous point, they would never be omitted.)\n- Arrays are serialized as arrays (enclosed by square brackets). Only array indices between 0 and `length - 1` (inclusive) are serialized; other properties are ignored.\n- For other objects:\n\n  - All `Symbol`-keyed properties will be completely ignored, even when using the [`replacer`](#the-replacer-parameter) parameter.\n\n  - If the value has a `toJSON()` method, it's responsible to define what data will be serialized. Instead of the object being serialized, the value returned by the `toJSON()` method when called will be serialized. `JSON.stringify()` calls `toJSON` with one parameter, the `key`, which has the same semantic as the `key` parameter of the [`replacer`](#the-replacer-parameter) function:\n\n    - if this object is a property value, the property name\n    - if it is in an array, the index in the array, as a string\n    - if `JSON.stringify()` was directly called on this object, an empty string\n\n    `Date` objects implement the [`toJSON()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toJSON) method which returns a string (the same as [`date.toISOString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)). Thus, they will be stringified as strings.\n\n  - Only [enumerable own properties](https://developer.mozilla.org/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) are visited. This means [Map](../../globals/Map/Map.mdx), [Set](../../globals/Set/Set.mdx), etc. will become `\"{}\"`. You can use the [`replacer`](#the-replacer-parameter) parameter to serialize them to something more useful.\n\n    Properties are visited using the same algorithm as [`Object.keys()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/keys), which has a well-defined order and is stable across implementations. For example, `JSON.stringify` on the same object will always produce the same string, and `JSON.parse(JSON.stringify(obj))` would produce an object with the same key ordering as the original (assuming the object is completely JSON-serializable).\n\n### The replacer parameter\n\nThe `replacer` parameter can be either a function or an array.\n\nAs an array, its elements indicate the names of the properties in the object that should be included in the resulting JSON string. Only string and number values are taken into account; symbol keys are ignored.\n\nAs a function, it takes two parameters: the `key` and the `value` being stringified. The object in which the key was found is provided as the `replacer`'s `this` context.\n\nThe `replacer` function is called for the initial object being stringified as well, in which case the `key` is an empty string (`\"\"`). It is then called for each property on the object or array being stringified. Array indices will be provided in its string form as `key`. The current property value will be replaced with the `replacer`'s return value for stringification. This means:\n\n- If you return a number, string, boolean, or `null`, that value is directly serialized and used as the property's value. (Returning a BigInt will throw as well.)\n- If you return a `Function`, `Symbol`, or [`undefined`](../../globals/undefined.mdx), the property is not included in the output.\n- If you return any other object, the object is recursively stringified, calling the `replacer` function on each property.\n\n> **Note:** When parsing JSON generated with `replacer` functions, you would likely want to use the [`reviver`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#using_the_reviver_parameter) parameter to perform the reverse operation.\n\nTypically, array elements' index would never shift (even when the element is an invalid value like a function, it will become `null` instead of omitted). Using the `replacer` function allows you to control the order of the array elements by returning a different array.\n\n### The space parameter\n\nThe `space` parameter may be used to control spacing in the final string.\n\n- If it is a number, successive levels in the stringification will each be indented by this many space characters.\n- If it is a string, successive levels will be indented by this string.\n\nEach level of indentation will never be longer than 10. Number values of `space` are clamped to 10, and string values are truncated to 10 characters.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Map/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get Map\\[Symbol.species]\n\nThe **`Map[Symbol.species]`** accessor property is an unused accessor property specifying how to copy `Map` objects.\n\n## Syntax\n\n```js\nMap[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct copied `Map` instances.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `Map` objects. Subclass constructors may override it to change the constructor assignment.\n\n> **Note:** This property is currently unused by all `Map` methods.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Map/Map.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map()\n\nThe **`Map()` constructor** creates [Map](../../globals/Map/Map.mdx) objects.\n\n## Syntax\n\n```js\nnew Map()\nnew Map(iterable)\n```\n\n> **Note:** `Map()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable` _**optional**_\n  - : An `Array` or other\n    [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) object\n    whose elements are key-value pairs. (For example, arrays with two elements,\n    such as `[[ 1, 'one' ],[ 2, 'two' ]]`.) Each key-value pair is added to the\n    new `Map`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Map/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype\\[Symbol.iterator]()\n\nThe **`Symbol.iterator`** method of a `Map` object implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows maps to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the key-value pairs of the map.\n\nThe initial value of this property is the same function object as the initial value of the [`Map.prototype.entries`](../../../globals/Map/prototype/entries.mdx) property.\n\n## Syntax\n\n```js\nmap[Symbol.iterator]()\n```\n\n### Return value\n\nThe same return value as [`Map.prototype.entries()`](../../../globals/Map/prototype/entries.mdx): a new iterable iterator object that yields the key-value pairs of the map.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Map/prototype/clear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.clear()\n\nThe **`clear()`** method removes all elements from a `Map` object.\n\n## Syntax\n\n```js\nclear()\n```\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Map/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.delete()\n\nThe **`delete()`** method removes the specified element from a `Map` object by\nkey.\n\n## Syntax\n\n```js\ndelete(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to remove from the `Map` object.\n\n### Return value\n\n`true` if an element in the `Map` object existed and has been removed, or\n`false` if the element does not exist.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Map/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.entries()\n\nThe **`entries()`** method returns a new\n_[iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators)_ object\nthat contains the `[key, value]` pairs for each element in the `Map` object in\ninsertion order. In this particular case, this iterator object is also an\niterable, so the for-of loop can be used. When the protocol `[Symbol.iterator]`\nis used, it returns a function that, when invoked, returns this iterator itself.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nA new [Map](../../../globals/Map/Map.mdx) iterator object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Map/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.forEach()\n\nThe **`forEach()`** method executes a provided function once per each key/value\npair in the `Map` object, in insertion order.\n\n## Syntax\n\n```js\n// Arrow function\nforEach(() => { /* … */ } )\nforEach((value) => { /* … */ } )\nforEach((value, key) => { /* … */ } )\nforEach((value, key, map) => { /* … */ } )\n\n// Callback function\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n\n// Inline callback function\nforEach(function() { /* … */ })\nforEach(function(value) { /* … */ })\nforEach(function(value, key) { /* … */ })\nforEach(function(value, key, map) { /* … */ })\nforEach(function(value, key, map) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n  - : Function to execute for each entry in the map. It takes the following\n    arguments:\n    - `value` _**optional**_\n      - : Value of each iteration.\n    - `key` _**optional**_\n      - : Key of each iteration.\n    - `map` _**optional**_\n      - : The map being iterated.\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `callback`.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n## Description\n\nThe `forEach` method executes the provided `callback` once for each key of the\nmap which actually exist. It is not invoked for keys which have been deleted.\nHowever, it is executed for values which are present but have the value\n`undefined`.\n\n`callback` is invoked with **three arguments**:\n\n- the entry's `value`\n- the entry's `key`\n- the **`Map` object** being traversed\n\nIf a `thisArg` parameter is provided to `forEach`, it will be passed to\n`callback` when invoked, for use as its `this` value. Otherwise, the value\n`undefined` will be passed for use as its `this` value. The `this` value\nultimately observable by `callback` is determined according to\n[the usual rules for determining the `this` seen by a function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this).\n\nEach value is visited once, except in the case when it was deleted and re-added\nbefore `forEach` has finished. `callback` is not invoked for values deleted\nbefore being visited. New values added before `forEach` has finished will be\nvisited.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Map/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.get()\n\nThe **`get()`** method returns a specified element from a `Map` object. If the\nvalue that is associated to the provided key is an object, then you will get a\nreference to that object and any change made to that object will effectively\nmodify it inside the `Map` object.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to return from the `Map` object.\n\n### Return value\n\nThe element associated with the specified key, or\n[`undefined`](../../../globals/undefined.mdx) if the key can't be found in the `Map` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Map/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.has()\n\nThe **`has()`** method returns a boolean indicating whether an element with the\nspecified key exists or not.\n\n## Syntax\n\n```js\nhas(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to test for presence in the `Map` object.\n\n### Return value\n\n`true` if an element with the specified key exists in the `Map` object;\notherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Map/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.keys()\n\nThe **`keys()`** method returns a new\n_[iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators)_ object\nthat contains the keys for each element in the `Map` object in insertion order. In this particular case, this iterator object is also an iterable, so a [for...of](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loop can be used.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nA new [Map](../../../globals/Map/Map.mdx) iterator object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Map/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.set()\n\nThe **`set()`** method adds or updates an entry in a `Map` object with a specified key and a value.\n\n## Syntax\n\n```js\nset(key, value)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to add to the `Map` object. The key may be any [JavaScript type](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures) (any [primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_values) or any type of [JavaScript object](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#objects)).\n- `value`\n  - : The value of the element to add to the `Map` object. The value may be any [JavaScript type](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures) (any [primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_values) or any type of [JavaScript object](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#objects)).\n\n### Return value\n\nThe `Map` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Map/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.size\n\nThe **`size`** accessor property returns the number of elements in a\n[Map](../../../globals/Map/Map.mdx) object.\n\n## Description\n\nThe value of `size` is an integer representing how many entries the `Map` object\nhas. A set accessor function for `size` is `undefined`; you can not change this\nproperty.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Map/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.values()\n\nThe **`values()`** method returns a new\n_[iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators)_ object\nthat contains the values for each element in the `Map` object in insertion\norder.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nA new [Map](../../../globals/Map/Map.mdx) iterator object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/E.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.E\n\nThe **`Math.E`** property represents Euler's number, the base of natural logarithms, e, which is approximately 2.718.\n\n## Value\n\n`2.718281828459045`\n\n## Description\n\nBecause `E` is a static property of `Math`, you always use it as `Math.E`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/LN10.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LN10\n\nThe **`Math.LN10`** property represents the natural logarithm of 10, approximately 2.302.\n\n## Value\n\n`2.302585092994046`\n\n## Description\n\nBecause `LN10` is a static property of `Math`, you always use it as `Math.LN10`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/LN2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LN2\n\nThe **`Math.LN2`** property represents the natural logarithm of 2, approximately 0.693:\n\n## Value\n\n`0.6931471805599453`\n\n## Description\n\nBecause `LN2` is a static property of `Math`, you always use it as `Math.LN2`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/LOG10e.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LOG10E\n\nThe **`Math.LOG10E`** property represents the base 10 logarithm of [E](./E.mdx), approximately 0.434.\n\n## Value\n\n`0.4342944819032518`\n\n## Description\n\nBecause `LOG10E` is a static property of `Math`, you always use it as `Math.LOG10E`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/LOG2e.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LOG2E\n\nThe **`Math.LOG2E`** property represents the base 2 logarithm of [E](./E.mdx), approximately 1.442.\n\n## Value\n\n`1.4426950408889634`\n\n## Description\n\nBecause `LOG2E` is a static property of `Math`, you always use it as `Math.LOG2E`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/PI.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.PI\n\nThe **`Math.PI`** property represents the ratio of the circumference of a circle to its diameter, approximately 3.14159.\n\n## Value\n\n`3.141592653589793`\n\n## Description\n\nBecause `PI` is a static property of `Math`, you always use it as `Math.PI`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/SQRT1_2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.SQRT1_2\n\nThe **`Math.SQRT1_2`** property represents the square root of 1/2, which is approximately 0.707.\n\n## Value\n\n`0.7071067811865476`\n\n## Description\n\n`Math.SQRT1_2` is a constant and a more performant equivalent to [`Math.sqrt(0.5)`](./sqrt.mdx).\n\nBecause `SQRT1_2` is a static property of `Math`, you always use it as `Math.SQRT1_2`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/SQRT2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.SQRT2\n\nThe **`Math.SQRT2`** property represents the square root of 2, approximately 1.414.\n\n## Value\n\n`0.7071067811865476`\n\n## Description\n\n`Math.SQRT2` is a constant and a more performant equivalent to [`Math.sqrt(2)`](./sqrt.mdx).\n\nBecause `SQRT2` is a static property of `Math`, you always use it as `Math.SQRT2`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/abs.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.abs()\n\nThe **`Math.abs()`** function returns the absolute value of a number.\n\n\n## Syntax\n\n```js\nMath.abs(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe absolute value of `x`. If `x` is negative (including `-0`), returns `-x`. Otherwise, returns `x`. The result is therefore always a positive number or `0`.\n\n## Description\n\nBecause `abs()` is a static method of `Math`, you always use it as `Math.abs()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/acos.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.acos()\n\nThe **`Math.acos()`** function returns the inverse cosine (in radians) of a number.\n\n## Syntax\n\n```js\nMath.acos(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number between -1 and 1, inclusive, representing the angle's cosine value.\n\n### Return value\n\nThe inverse cosine (angle in radians between 0 and π, inclusive) of `x`. If `x` is less than -1 or greater than 1, returns `NaN`.\n\n## Description\n\nBecause `acos()` is a static method of `Math`, you always use it as `Math.acos()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/acosh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.acosh()\n\nThe **`Math.acosh()`** function returns the inverse hyperbolic cosine of a number.\n\n## Syntax\n\n```js\nMath.acosh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 1.\n\n### Return value\n\nThe inverse hyperbolic cosine of `x`. If `x` is less than 1, returns `NaN`.\n\n## Description\n\nBecause `acosh()` is a static method of `Math`, you always use it as `Math.acosh()`, rather than as a method of a `Math` object you created (`Math` is no constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/asin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.asin()\n\nThe **`Math.asin()`** function returns the inverse sine (in radians) of a number.\n\n## Syntax\n\n```js\nMath.asin(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number between -1 and 1, inclusive, representing the angle's sine value.\n\n### Return value\n\nThe inverse sine (angle in radians between <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math>, inclusive) of `x`. If `x` is less than -1 or greater than 1, returns `NaN`.\n\n## Description\n\nBecause `asin()` is a static method of `Math`, you always use it as `Math.asin()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/asinh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.asinh()\n\nThe **`Math.asinh()`** function returns the inverse hyperbolic sine of a number. \n\n## Syntax\n\n```js\nMath.asinh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe inverse hyperbolic sine of `x`.\n\n## Description\n\nBecause `asinh()` is a static method of `Math`, you always use it as `Math.asinh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/atan.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.atan()\n\nThe **`Math.atan()`** function returns the inverse tangent (in radians) of a number.\n\n## Syntax\n\n```js\nMath.atan(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe inverse tangent (angle in radians between <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math> and <math><semantics><mfrac><mi>π</mi><mn>2</mn></mfrac></semantics></math>, inclusive) of `x`. If `x` is `Infinity`, it returns <math><semantics><mfrac><mi>π</mi><mn>2</mn></mfrac></semantics></math>. If `x` is `-Infinity`, it returns <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math>.\n\n## Description\n\nBecause `atan()` is a static method of `Math`, you always use it as `Math.atan()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/atan2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.atan2()\n\nThe **`Math.atan2()`** function returns the angle in the plane (in radians) between the positive x-axis and the ray from (0, 0) to the point (x, y), for `Math.atan2(y, x)`.\n\n## Syntax\n\n```js\nMath.atan2(y, x)\n```\n\n### Parameters\n\n- `y`\n  - : The y coordinate of the point.\n- `x`\n  - : The x coordinate of the point.\n\n### Return value\n\nThe angle in radians (between -π and π, inclusive) between the positive x-axis and the ray from (0, 0) to the point (x, y).\n\n## Description\n\nThe `Math.atan2()` method measures the counterclockwise angle θ, in radians, between the positive x-axis and the point `(x, y)`. Note that the arguments to this function pass the y-coordinate first and the x-coordinate second.\n\n`Math.atan2()` is passed separate `x` and `y` arguments, while [`Math.atan()`](./atan.mdx) is passed the ratio of those two arguments. `Math.atan2(y, x)` differs from `Math.atan(y / x)` in the following cases:\n\n| `x`                  | `y`         | `Math.atan2(y, x)` | `Math.atan(y / x)` |\n| -------------------- | ----------- | ------------------ | ------------------ |\n| `Infinity`           | `Infinity`  | π / 4              | `NaN`              |\n| `Infinity`           | `-Infinity` | -π / 4             | `NaN`              |\n| `-Infinity`          | `Infinity`  | 3π / 4             | `NaN`              |\n| `-Infinity`          | `-Infinity` | -3π / 4            | `NaN`              |\n| 0                    | 0           | 0                  | `NaN`              |\n| 0                    | -0          | -0                 | `NaN`              |\n| < 0 (including `-0`) | 0           | π                  | 0                  |\n| < 0 (including `-0`) | -0          | -π                 | 0                  |\n| `-Infinity`          | > 0         | π                  | -0                 |\n| -0                   | > 0         | π / 2              | -π / 2             |\n| `-Infinity`          | < 0         | -π                 | 0                  |\n| -0                   | < 0         | -π / 2             | π / 2              |\n\nIn addition, for points in the second and third quadrants (`x < 0`), `Math.atan2()` would output an angle less than <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math> or greater than <math><semantics><mfrac><mi>π</mi><mn>2</mn></mfrac></semantics></math>.\n\nBecause `atan2()` is a static method of `Math`, you always use it as `Math.atan2()`, rather than as a method of a `Math` object you created (`Math` is not a constructor)."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/atanh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.atanh()\n\nThe **`Math.atanh()`** function returns the inverse hyperbolic tangent of a number. \n\n## Syntax\n\n```js\nMath.atanh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number between -1 and 1, inclusive.\n\n### Return value\n\nThe inverse hyperbolic tangent of `x`. If `x` is 1, returns `Infinity`. If `x` is -1, returns `-Infinity`. If `x` is less than -1 or greater than 1, returns `NaN`.\n\n## Description\n\nBecause `atanh()` is a static method of `Math`, you always use it as `Math.atanh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/cbrt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.cbrt()\n\nThe **`Math.cbrt()`** function returns the cube root of a number.\n\n## Syntax\n\n```js\nMath.cbrt(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe cube root of `x`.\n\n## Description\n\nBecause `cbrt()` is a static method of `Math`, you always use it as `Math.cbrt()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/ceil.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.ceil()\n\nThe **`Math.ceil()`** function always rounds up and returns the smaller integer greater than or equal to a given number.\n\n## Syntax\n\n```js\nMath.ceil(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe smallest integer greater than or equal to `x`. It's the same value as [`-Math.floor(-x)`](./floor.mdx).\n\n## Description\n\nBecause `ceil()` is a static method of `Math`, you always use it as `Math.ceil()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/clz32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.clz32()\n\nThe **`Math.clz32()`** function returns the number of leading zero bits in the 32-bit binary representation of a number.\n\n## Syntax\n\n```js\nMath.clz32(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe number of leading zero bits in the 32-bit binary representation of `x`.\n\n## Description\n\n`clz32` is short for **C**ount**L**eading**Z**eros**32**.\n\nIf `x` is not a number, it will be converted to a number first, then converted to a 32-bit unsigned integer.\n\nIf the converted 32-bit unsigned integer is `0`, `32` is returned, because all bits are `0`. If the most significant bit is `1` (i.e. the number is greater than or equal to 2<sup>31</sup>), `0` is returned.\n\nThis function is particularly useful for systems that compile to JS, like [Emscripten](https://emscripten.org).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/cos.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.cos()\n\nThe **`Math.cos()`** function returns the cosine of a number in radians.\n\n## Syntax\n\n```js\nMath.cos(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number representing an angle in radians.\n\n### Return value\n\nThe cosine of `x`, between -1 and 1, inclusive. If `x` is `Infinity`, `-Infinity`, or `NaN`, returns `NaN`.\n\n## Description\n\nBecause `cos()` is a static method of `Math`, you always use it as `Math.cos()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/cosh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.cosh()\n\nThe **`Math.cosh()`** function returns the hyperbolic cosine of a number. \n\n## Syntax\n\n```js\nMath.cosh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe hyperbolic cosine of `x`.\n\n## Description\n\nBecause `cosh()` is a static method of `Math`, you always use it as `Math.cosh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor)."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/exp.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.exp()\n\nThe **`Math.exp()`** function returns [E](./E.mdx) raised to the power of a number.\n\n## Syntax\n\n```js\nMath.exp(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nA nonnegative number representing e<sup>x</sup>, where e is [the base of the natural logarithm](./E.mdx).\n\n## Description\n\nBecause `exp()` is a static method of `Math`, you always use it as `Math.exp()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nBeware that `e` to the power of a number very close to 0 will be very close to 1 and suffer from loss of precision. In this case, you may want to use `Math.expm1` instead, and obtain a much higher-precision fractional part of the answer.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/expm1.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.expm1()\n\nThe **`Math.expm1()`** function returns [E](./E.mdx) raised to the power of a number, subtracted by 1.\n\n## Syntax\n\n```js\nMath.expm1(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nA number representing e<sup>x</sup> - 1, where e is [the base of the natural logarithm](./E.mdx).\n\n## Description\n\nFor very small values of _x_, adding 1 can reduce or eliminate precision. The double floats used in JS give you about 15 digits of precision. 1 + 1e-15 \\= 1.000000000000001, but 1 + 1e-16 = 1.000000000000000 and therefore exactly 1.0 in that arithmetic, because digits past 15 are rounded off.\n\nWhen you calculate <math display=\"inline\"><semantics><msup><mi mathvariant=\"normal\">e</mi><mi>x</mi></msup></semantics></math> where x is a number very close to 0, you should get an answer very close to 1 + x, because <math display=\"inline\"><semantics><mrow><munder><mo lspace=\"0em\" rspace=\"0em\">lim</mo><mrow><mi>x</mi><mo stretchy=\"false\">→</mo><mn>0</mn></mrow></munder><mfrac><mrow><msup><mi mathvariant=\"normal\">e</mi><mi>x</mi></msup><mo>−</mo><mn>1</mn></mrow><mi>x</mi></mfrac><mo>=</mo><mn>1</mn></mrow></semantics></math>. If you calculate `Math.exp(1.1111111111e-15) - 1`, you should get an answer close to `1.1111111111e-15`. Instead, due to the highest significant figure in the result of `Math.exp` being the units digit `1`, the final value ends up being `1.1102230246251565e-15`, with only 3 correct digits. If, instead, you calculate `Math.exp1m(1.1111111111e-15)`, you will get a much more accurate answer `1.1111111111000007e-15`, with 11 correct digits of precision.\n\nBecause `expm1()` is a static method of `Math`, you always use it as `Math.expm1()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/floor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.floor()\n\nThe **`Math.floor()`** function always rounds down and returns the largest integer less than or equal to a given number.\n\n## Syntax\n\n```js\nMath.floor(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe largest integer smaller than or equal to `x`. It's the same value as [`-Math.ceil(-x)`](./ceil.mdx).\n\n## Description\n\nBecause `floor()` is a static method of `Math`, you always use it as `Math.floor()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/fround.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.fround()\n\nThe **`Math.fround()`** function returns the nearest [32-bit single precision](https://en.wikipedia.org/wiki/Single-precision_floating-point_format) float representation of a number.\n\n## Syntax\n\n```js\nMath.fround(doubleFloat)\n```\n\n### Parameters\n\n- `doubleFloat`\n  - : A number.\n\n### Return value\n\nThe nearest [32-bit single precision](https://en.wikipedia.org/wiki/Single-precision_floating-point_format) float representation of `x`.\n\n## Description\n\nJavaScript uses 64-bit double floating-point numbers internally, which offer a very high precision. However, sometimes you may be working with 32-bit floating-point numbers, for example if you are reading values from a `Float32Array`. This can create confusion: checking a 64-bit float and a 32-bit float for equality may fail even though the numbers are seemingly identical.\n\nTo solve this, `Math.fround()` can be used to cast the 64-bit float to a 32-bit float. Internally, JavaScript continues to treat the number as a 64-bit float, it just performs a \"round to even\" on the 23rd bit of the mantissa, and sets all following mantissa bits to `0`. If the number is outside the range of a 32-bit float, `Infinity` or `-Infinity` is returned.\n\nBecause `fround()` is a static method of `Math`, you always use it as `Math.fround()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/hypot.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.hypot()\n\nThe **`Math.hypot()`** function returns the square root of the sum of squares of its arguments. \n\n## Syntax\n\n```js\nMath.hypot()\nMath.hypot(value0)\nMath.hypot(value0, value1)\nMath.hypot(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `value1`, …, `valueN`\n  - : Numbers.\n\n### Return value\n\nThe square root of the sum of squares of the given arguments. Returns Infinity if any of the arguments is ±Infinity. Otherwise, if at least one of the arguments is or is converted to NaN, returns NaN. Returns `0` if no arguments are given or all arguments are ±0.\n\n## Description\n\nCalculating the hypotenuse of a right triangle, or the magnitude of a complex number, uses the formula `Math.sqrt(v1*v1 + v2*v2)`, where v1 and v2 are the lengths of the triangle's legs, or the complex number's real and complex components. The corresponding distance in 2 or more dimensions can be calculated by adding more squares under the square root: `Math.sqrt(v1*v1 + v2*v2 + v3*v3 + v4*v4)`.\n\nThis function makes this calculation easier and faster; you call `Math.hypot(v1, v2)`, or `Math.hypot(v1, /* … ,*/, vN)`.\n\n`Math.hypot` also avoids overflow/underflow problems if the magnitude of your numbers is very large. The largest number you can represent in JS is [`Number.MAX_VALUE`](../Number/MAX_VALUE.mdx), which is around 10<sup>308</sup>. If your numbers are larger than about 10<sup>154</sup>, taking the square of them will result in Infinity. For example, `Math.sqrt(1e200*1e200 + 1e200*1e200) = Infinity`. If you use `hypot()` instead, you get a better answer: `Math.hypot(1e200, 1e200) = 1.4142...e+200` . This is also true with very small numbers. `Math.sqrt(1e-200*1e-200 + 1e-200*1e-200) = 0`, but `Math.hypot(1e-200, 1e-200) = 1.4142...e-200`.\n\nWith one argument, `Math.hypot()` is equivalent to [`Math.abs()`](./abs.mdx). [`Math.hypot.length`](../Function/prototype/length.mdx) is 2, which weakly signals that it's designed to handle at least two parameters.\n\nBecause `hypot()` is a static method of `Math`, you always use it as `Math.hypot()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/imul.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.imul()\n\nThe **`Math.imul()`** function returns the result of the C-like 32-bit multiplication of the two parameters.\n\n\n## Syntax\n\n```js\nMath.imul(a, b)\n```\n\n### Parameters\n\n- `a`\n  - : First number.\n- `b`\n  - : Second number.\n\n### Return value\n\nThe result of the C-like 32-bit multiplication of the given arguments.\n\n## Description\n\n`Math.imul()` allows for 32-bit integer multiplication with C-like semantics. This feature is useful for projects like [Emscripten](https://en.wikipedia.org/wiki/Emscripten).\n\nBecause `imul()` is a static method of `Math`, you always use it as `Math.imul()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nIf you use normal JavaScript floating point numbers in `imul()`, you will experience a degrade in performance. This is because of the costly conversion from a floating point to an integer for multiplication, and then converting the multiplied integer back into a floating point.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/log.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log()\n\nThe **`Math.log()`** function returns the natural logarithm (base [E](./E.mdx)) of a number.\n\n## Syntax\n\n```js\nMath.log(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe natural logarithm (base [E](./E.mdx)) of `x`. If `x` is ±0, returns [`-Infinity`](../Number/NEGATIVE_INFINITY.mdx). If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `log()` is a static method of `Math`, you always use it as `Math.log()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nIf you need the natural log of 2 or 10, use the constants `Math.LN2` or `Math.LN10`. If you need a logarithm to base 2 or 10, use `Math.log2()` or `Math.log10()`. If you need a logarithm to other bases, use `Math.log(x) / Math.log(otherBase)` as in the example below; you might want to precalculate `1 / Math.log(otherBase)` since multiplication in `Math.log(x) * constant` is much faster.\n\nBeware that positive numbers very close to 1 can suffer from loss of precision and make its natural logarithm less accurate. In this case, you may want to use `Math.log1p` instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/log10.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log10()\n\nThe **`Math.log10()`** function returns the base 10 logarithm of a number. \n\n## Syntax\n\n```js\nMath.log10(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe base 10 logarithm of `x`. If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `log10()` is a static method of `Math`, you always use it as `Math.log10()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nThis function is the equivalent of `Math.log(x) / Math.log(10)`. For `log10(e)`, use the constant `Math.LOG10E`, which is 1 / `Math.LN10`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/log1p.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log1p()\n\nThe **`Math.log1p()`** function returns the natural logarithm (base [E](./E.mdx)) of `1 + x`, where `x` is the argument.\n\n## Syntax\n\n```js\nMath.log1p(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to -1.\n\n### Return value\n\nThe natural logarithm (base [E](./E.mdx)) of `x + 1`. If `x` is -1, returns [`-Infinity`](../Number/NEGATIVE_INFINITY.mdx). If `x < -1`, returns `NaN`.\n\n## Description\n\nFor very small values of _x_, adding 1 can reduce or eliminate precision. The double floats used in JS give you about 15 digits of precision. 1 + 1e-15 \\= 1.000000000000001, but 1 + 1e-16 = 1.000000000000000 and therefore exactly 1.0 in that arithmetic, because digits past 15 are rounded off.\n\nWhen you calculate log(1 + _x_) where _x_ is a small positive number, you should get an answer very close to _x_, because <math display=\"inline\"><semantics><mrow><munder><mo movablelimits=\"true\" form=\"prefix\">lim</mo><mrow ><mi>x</mi><mo stretchy=\"false\">→</mo><mn>0</mn></mrow></munder><mfrac><mrow><mi>log</mi><mo>⁡</mo><mo stretchy=\"false\">(</mo><mn>1</mn><mo>+</mo><mi>x</mi><mo stretchy=\"false\">)</mo></mrow><mi>x</mi></mfrac><mo>=</mo><mn>1</mn></mrow></semantics></math>. If you calculate `Math.log(1 + 1.1111111111e-15)`, you should get an answer close to `1.1111111111e-15`. Instead, you will end up taking the logarithm of `1.00000000000000111022` (the roundoff is in binary, so sometimes it gets ugly), and get the answer 1.11022…e-15, with only 3 correct digits. If, instead, you calculate `Math.log1p(1.1111111111e-15)`, you will get a much more accurate answer `1.1111111110999995e-15`, with 15 correct digits of precision (actually 16 in this case).\n\nIf the value of `x` is less than -1, the return value is always `NaN`.\n\nBecause `log1p()` is a static method of `Math`, you always use it as `Math.log1p()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/log2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log2()\n\nThe **`Math.log2()`** function returns the base 2 logarithm of a number.\n\n## Syntax\n\n```js\nMath.log2(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe base 2 logarithm of `x`. If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `log2()` is a static method of `Math`, you always use it as `Math.log2()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nThis function is the equivalent of `Math.log(x) / Math.log(2)`. For `log2(e)`, use the constant `Math.LOG2E`, which is 1 / `Math.LN2`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/max.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.max()\n\nThe **`Math.max()`** function returns the largest of the numbers given as input parameters, or `-Infinity` if there are no parameters.\n\n## Syntax\n\n```js\nMath.max()\nMath.max(value0)\nMath.max(value0, value1)\nMath.max(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `value1`, `value2`, … , `valueN`\n  - : Zero or more numbers among which the largest value will be selected and returned.\n\n### Return value\n\nThe largest of the given numbers. Returns `NaN` if any of the parameters is or is converted into `NaN`. Returns `-Infinity` if no parameters are provided.\n\n## Description\n\nBecause `max()` is a static method of `Math`, you always use it as `Math.max()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n[`Math.max.length`](../Function/prototype/length.mdx) is 2, which weakly signals that it's designed to handle at least two parameters.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/min.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.min()\n\nThe **`Math.min()`** function returns the smallest of the numbers given as input parameters, or `Infinity` if there are no parameters.\n\n## Syntax\n\n```js\nMath.min()\nMath.min(value0)\nMath.min(value0, value1)\nMath.min(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `value1`, …, `valueN`\n  - : Zero or more numbers among which the lowest value will be selected and returned.\n\n### Return value\n\nThe smallest of the given numbers. Returns `NaN` if any of the parameters is or is converted into `NaN`. Returns `Infinity` if no parameters are provided.\n\n## Description\n\nBecause `min()` is a static method of `Math`, you always use it as `Math.min()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n[`Math.min.length`](../Function/prototype/length.mdx) is 2, which weakly signals that it's designed to handle at least two parameters.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/pow.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.pow()\n\nThe **`Math.pow()`** method returns the value of a base raised to a power.\n\n## Syntax\n\n```js\nMath.pow(base, exponent)\n```\n\n### Parameters\n\n- `base`\n  - : The base number.\n- `exponent`\n  - : The exponent number.\n\n### Return value\n\nA number representing `base` taken to the power of `exponent`. Returns `NaN` in one of the following cases:\n\n- `exponent` is `NaN`.\n- `base` is `NaN` and `exponent` is not `0`.\n- `base` is ±1 and `exponent` is ±`Infinity`.\n- `base < 0` and `exponent` is not an integer.\n\n## Description\n\n`Math.pow()` is equivalent to the `**` operator, except `Math.pow()` only accepts numbers.\n\n`Math.pow(NaN, 0)` (and the equivalent `NaN ** 0`) is the only case where `NaN` doesn't propagate through mathematical operations — it returns `1` despite the operand being `NaN`. In addition, the behavior where `base` is 1 and `exponent` is non-finite (±Infinity or `NaN`) is different from IEEE 754, which specifies that the result should be 1, whereas JavaScript returns `NaN` to preserve backward compatibility with its original behavior.\n\nBecause `pow()` is a static method of `Math`, use it as `Math.pow()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/random.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.random()\n\nThe **`Math.random()`** function returns a floating-point, pseudo-random number that's greater than or equal to 0 and less than 1, with approximately uniform distribution over that range — which you can then scale to your desired range. The implementation selects the initial seed to the random number generation algorithm; it cannot be chosen or reset by the user.\n\n> **Note:** `Math.random()` _does not_ provide cryptographically secure random numbers. Do not use them for anything related to security. Use the Web Crypto API instead, and more precisely the `crypto.getRandomValues()` method.\n\n## Syntax\n\n```js\nMath.random()\n```\n\n### Return value\n\nA floating-point, pseudo-random number between 0 (inclusive) and 1 (exclusive).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/round.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.round()\n\nThe **`Math.round()`** function returns the value of a number rounded to the nearest integer.\n\n## Syntax\n\n```js\nMath.round(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe value of `x` rounded to the nearest integer.\n\n## Description\n\nIf the fractional portion of the argument is greater than 0.5, the argument is rounded to the integer with the next higher absolute value. If it is less than 0.5, the argument is rounded to the integer with the lower absolute value. If the fractional portion is exactly 0.5, the argument is rounded to the next integer in the direction of +∞.\n\n> **Note:** This differs from many languages' `round()` functions, which often round half-increments _away from zero_, giving a different result in the case of negative numbers with a fractional part of exactly 0.5.\n\n`Math.round(x)` is not exactly the same as [`Math.floor(x + 0.5)`](./floor.mdx). When `x` is -0, or -0.5 ≤ x < 0, `Math.round(x)` returns -0, while `Math.floor(x + 0.5)` returns 0. However, neglecting that difference and potential precision errors, `Math.round(x)` and `Math.floor(x + 0.5)` are generally equivalent.\n\nBecause `round()` is a static method of `Math`, you always use it as `Math.round()`, rather than as a method of a `Math` object you created (`Math` has no constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/sign.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sign()\n\nThe **`Math.sign()`** function returns 1 or -1, indicating the sign of the number passed as argument. If the input is 0 or -0, it will be returned as-is.\n\n## Syntax\n\n```js\nMath.sign(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nA number representing the sign of `x`:\n\n- If `x` is positive, returns `1`.\n- If `x` is negative, returns `-1`.\n- If `x` is positive zero, returns `0`.\n- If `x` is negative zero, returns `-0`.\n- Otherwise, returns `NaN`.\n\n## Description\n\nBecause `sign()` is a static method of `Math`, you always use it as `Math.sign()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/sin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sin()\n\nThe **`Math.sin()`** function returns the sine of a number in radians.\n\n## Syntax\n\n```js\nMath.sin(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number representing an angle in radians.\n\n### Return value\n\nThe sine of `x`, between -1 and 1, inclusive. If `x` is `Infinity`, `-Infinity`, or `NaN`, returns `NaN`.\n\n## Description\n\nBecause `sin()` is a static method of `Math`, you always use it as `Math.sin()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/sinh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sinh()\n\nThe **`Math.sinh()`** function returns the hyperbolic sine of a number. \n\n## Syntax\n\n```js\nMath.sinh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe hyperbolic sine of `x`.\n\n## Description\n\nBecause `sinh()` is a static method of `Math`, you always use it as `Math.sinh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/sqrt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sqrt()\n\nThe **`Math.sqrt()`** function returns the square root of a number.\n\n## Syntax\n\n```js\nMath.sqrt(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe square root of `x`, a nonnegative number. If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `sqrt()` is a static method of `Math`, you always use it as `Math.sqrt()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/tan.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.tan()\n\nThe **`Math.tan()`** function returns the tangent of a number in radians.\n\n\n## Syntax\n\n```js\nMath.tan(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number representing an angle in radians.\n\n### Return value\n\nThe tangent of `x`. If `x` is `Infinity`, `-Infinity`, or `NaN`, returns `NaN`.\n\n> **Note:** Due to floating point precision, it's not possible to obtain the exact value π/2, so the result is always finite if not `NaN`.\n\n## Description\n\nBecause `tan()` is a static method of `Math`, you always use it as `Math.tan()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/tanh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.tanh()\n\nThe **`Math.tanh()`** function returns the hyperbolic tangent of a number. \n\n## Syntax\n\n```js\nMath.tanh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe hyperbolic tangent of `x`.\n\n## Description\n\nBecause `tanh()` is a static method of `Math`, you always use it as `Math.tanh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Math/trunc.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.trunc()\n\nThe **`Math.trunc()`** function returns the integer part of a number by removing any fractional digits.\n\n## Syntax\n\n```js\nMath.trunc(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe integer part of `x`.\n\n## Description\n\nUnlike the other three `Math` methods: `Math.floor()`, `Math.ceil()` and `Math.round()`, the way `Math.trunc()` works is very simple. It _truncates_ (cuts off) the dot and the digits to the right of it, no matter whether the argument is a positive or negative number.\n\nBecause `trunc()` is a static method of `Math`, you always use it as `Math.trunc()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/NaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# NaN\n\nThe global **`NaN`** property is a value representing Not-A-Number.\n\n## Value\n\nThe same number value as [`Number.NaN`](./Number/NaN.mdx).\n\n## Description\n\n`NaN` is a property of the _global object_. In other words, it is a variable in global scope.\n\nIn modern browsers, `NaN` is a non-configurable, non-writable property. Even when this is not the case, avoid overriding it.\n\nThere are five different types of operations that return `NaN`:\n\n- Failed number conversion (e.g. explicit ones like `parseInt(\"blabla\")`, `Number(undefined)`, or implicit ones like `Math.abs(undefined)`)\n- Math operation where the result is not a real number (e.g. `Math.sqrt(-1)`)\n- Indeterminate form (e.g. `0 * Infinity`, `1 ** Infinity`, `Infinity / Infinity`, `Infinity - Infinity`)\n- A method or expression whose operand is or gets coerced to `NaN` (e.g. `7 ** NaN`, `7 * \"blabla\"`) — this means `NaN` is contagious\n- Other cases where an invalid value is to be represented as a number (e.g. an invalid `new Date(\"blabla\").getTime()`, `\"\".charCodeAt(1)`)\n\n`NaN` and its behaviors are not invented by JavaScript. Its semantics in floating point arithmetic (including that `NaN !== NaN`) are specified by [IEEE 754](https://en.wikipedia.org/wiki/Double_precision_floating-point_format). `NaN`'s behaviors include:\n\n- If `NaN` is involved in a mathematical operation (but not [bitwise operations](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators#bitwise_shift_operators)), the result is usually also `NaN`. (See see [silently escaping NaN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN#silently_escaping_nan) for a counter-example.)\n- When `NaN` is one of the operands of any relational comparison (`>`, `<`, `>=`, `<=`), the result is always `false`.\n- `NaN` compares unequal (via [`==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Equality), [`!=`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Inequality), [`===`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality), and [`!==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_inequality)) to any other value — including to another `NaN` value.\n\n`NaN` is also one of the [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) values in JavaScript.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Number/MAX_SAFE_INTEGER.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MAX_SAFE_INTEGER\n\nThe **`Number.MAX_SAFE_INTEGER`** constant represents the maximum safe integer in JavaScript (2<sup>53</sup> – 1).\n\nFor larger integers, consider using `BigInt`.\n\n## Value\n\n`9007199254740991` (9,007,199,254,740,991, or \\~9 quadrillion).\n\n## Description\n\n[Double precision floating point format](https://en.wikipedia.org/wiki/Double_precision_floating-point_format) only has 52 bits to represent the [mantissa](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_encoding), so it can only safely represent integers between -(2<sup>53</sup> – 1) and 2<sup>53</sup> – 1. \"Safe\" in this context refers to the ability to represent integers exactly and to compare them correctly. For example, `Number.MAX_SAFE_INTEGER + 1 === Number.MAX_SAFE_INTEGER + 2` will evaluate to true, which is mathematically incorrect. See `Number.isSafeInteger()` for more information.\n\nBecause `MAX_SAFE_INTEGER` is a static property of `Number`, you always use it as `Number.MAX_SAFE_INTEGER`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Number/MAX_VALUE.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MAX_VALUE\n\nThe **`Number.MAX_VALUE`** property represents the maximum numeric value representable in JavaScript.\n\n## Value\n\n2<sup>1024</sup> - 1, or approximately `1.7976931348623157E+308`.\n\n## Description\n\nValues larger than `MAX_VALUE` are represented as [`Infinity`](../../globals/Infinity.mdx) and will lose their actual value.\n\nBecause `MAX_VALUE` is a static property of `Number`, you always use it as `Number.MAX_VALUE`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Number/MIN_SAFE_INTEGER.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MIN_SAFE_INTEGER\n\nThe **`Number.MIN_SAFE_INTEGER`** constant represents the minimum safe integer in JavaScript, or -(2<sup>53</sup> - 1).\n\nTo represent integers smaller than this, consider using `BigInt`.\n\n## Value\n\n`-9007199254740991` (-9,007,199,254,740,991, or about -9 quadrillion).\n\n## Description\n\n[Double precision floating point format](https://en.wikipedia.org/wiki/Double_precision_floating-point_format) only has 52 bits to represent the [mantissa](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_encoding), so it can only safely represent integers between -(2<sup>53</sup> – 1) and 2<sup>53</sup> – 1. Safe in this context refers to the ability to represent integers exactly and to correctly compare them. For example, `Number.MIN_SAFE_INTEGER - 1 === Number.MIN_SAFE_INTEGER - 2` will evaluate to true, which is mathematically incorrect. See `Number.isSafeInteger()` for more information.\n\nBecause `MIN_SAFE_INTEGER` is a static property of `Number`, you always use it as `Number.MIN_SAFE_INTEGER`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Number/MIN_VALUE.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MIN_VALUE\n\nThe **`Number.MIN_VALUE`** property represents the smallest positive numeric value representable in JavaScript.\n\n## Value\n\n2<sup>-1074</sup>, or `5E-324`.\n\n## Description\n\n`Number.MIN_VALUE` is the smallest positive number (not the most negative number) that can be represented within float precision — in other words, the number closest to 0. The ECMAScript spec doesn't define a precise value that implementations are required to support — instead the spec says, _\"must be the smallest non-zero positive value that can actually be represented by the implementation\"_. This is because small IEEE-754 floating point numbers are [denormalized](https://en.wikipedia.org/wiki/Subnormal_number), but implementations are not required to support this representation, in which case `Number.MIN_VALUE` may be larger.\n\nIn practice, its precise value in mainstream engines like V8 (used by Chrome, Edge, Node.js), SpiderMonkey (used by Firefox), and JavaScriptCore (used by Safari) is 2<sup>-1074</sup>, or `5E-324`.\n\nBecause `MIN_VALUE` is a static property of `Number`, you always use it as `Number.MIN_VALUE`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Number/NEGATIVE_INFINITY.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.NEGATIVE_INFINITY\n\nThe **`Number.NEGATIVE_INFINITY`** property represents the negative Infinity value.\n\n## Value\n\nThe same as the negative value of the global [`Infinity`](../../globals/Infinity.mdx) property.\n\n## Description\n\nThe `Number.NEGATIVE_INFINITY` value behaves slightly differently than mathematical infinity:\n\n- Any positive value, including `Number.POSITIVE_INFINITY`, multiplied by `Number.NEGATIVE_INFINITY` is `Number.NEGATIVE_INFINITY`.\n- Any negative value, including `Number.NEGATIVE_INFINITY`, multiplied by `Number.NEGATIVE_INFINITY` is `Number.POSITIVE_INFINITY`.\n- Any positive value divided by `Number.NEGATIVE_INFINITY` is [negative zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754)).\n- Any negative value divided by `Number.NEGATIVE_INFINITY` is [positive zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754)).\n- Zero multiplied by `Number.NEGATIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- [`NaN`](../../globals/NaN.mdx) multiplied by `Number.NEGATIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- `Number.NEGATIVE_INFINITY`, divided by any negative value except `Number.NEGATIVE_INFINITY`, is `Number.POSITIVE_INFINITY`.\n- `Number.NEGATIVE_INFINITY`, divided by any positive value except `Number.POSITIVE_INFINITY`, is `Number.NEGATIVE_INFINITY`.\n- `Number.NEGATIVE_INFINITY`, divided by either `Number.NEGATIVE_INFINITY` or `Number.POSITIVE_INFINITY`, is [`NaN`](../../globals/NaN.mdx).\n- `x > Number.NEGATIVE_INFINITY` is true for any number _x_ that isn't `Number.NEGATIVE_INFINITY`.\n\nYou might use the `Number.NEGATIVE_INFINITY` property to indicate an error condition that returns a finite number in case of success. Note, however, that [`NaN`](../../globals/NaN.mdx) would be more appropriate in such a case.\n\nBecause `Number.NEGATIVE_INFINITY` is a static property of `Number`, you always use it as `Number.NEGATIVE_INFINITY`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Number/NaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.NaN\n\nThe **`Number.NaN`** property represents Not-A-Number, which is equivalent to [description for the global property](../../globals/NaN.mdx). For more information about the behaviors of `NaN`, see the [`NaN`](../../globals/NaN.mdx).\n\n## Value\n\nThe number value [`NaN`](../../globals/NaN.mdx).\n\n## Description\n\nBecause `NaN` is a static property of `Number`, you always use it as `Number.NaN`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Number/Number.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number() constructor\n\nThe **`Number()` constructor** creates a `Number` object. When called instead as a function, it performs type conversion to a primitive number, which is usually more useful.\n\n## Syntax\n\n```js\nnew Number(value)\nNumber(value)\n```\n\n> **Note:** `Number()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\n- `value`\n  - : The numeric value of the object being created.\n\n### Return value\n\nWhen `Number` is called as a constructor (with `new`), it creates a `Number` object, which is **not** a primitive.\n\nWhen `Number` is called as a function, it [coerces the parameter to a number primitive](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_coercion). [BigInts](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/BigInt) are converted to numbers. If the value can't be converted, it returns [`NaN`](../../globals/NaN.mdx).\n\n> **Warning:** You should rarely find yourself using `Number` as a constructor.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Number/POSITIVE_INFINITY.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.POSITIVE_INFINITY\n\nThe **`Number.POSITIVE_INFINITY`** property represents the positive Infinity value.\n\n## Value\n\nThe same as the value of the global [`Infinity`](../../globals/Infinity.mdx) property.\n\n## Description\n\nThe `Number.POSITIVE_INFINITY` value behaves slightly differently than mathematical infinity:\n\n- Any positive value, including `Number.POSITIVE_INFINITY`, multiplied by `Number.POSITIVE_INFINITY` is `Number.POSITIVE_INFINITY`.\n- Any negative value, including `Number.NEGATIVE_INFINITY`, multiplied by `Number.POSITIVE_INFINITY` is `Number.NEGATIVE_INFINITY`.\n- Any positive number divided by `Number.POSITIVE_INFINITY` is [positive zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754)).\n- Any negative number divided by `Number.POSITIVE_INFINITY` is [negative zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754).\n- Zero multiplied by `Number.POSITIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- `NaN` multiplied by `Number.POSITIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- `Number.POSITIVE_INFINITY`, divided by any negative value except `Number.NEGATIVE_INFINITY`, is `Number.NEGATIVE_INFINITY`.\n- `Number.POSITIVE_INFINITY`, divided by any positive value except `Number.POSITIVE_INFINITY`, is `Number.POSITIVE_INFINITY`.\n- `Number.POSITIVE_INFINITY`, divided by either `Number.NEGATIVE_INFINITY` or `Number.POSITIVE_INFINITY`, is [`NaN`](../../globals/NaN.mdx).\n- `Number.POSITIVE_INFINITY > x` is true for any number _x_ that isn't `Number.POSITIVE_INFINITY`.\n\nYou might use the `Number.POSITIVE_INFINITY` property to indicate an error condition that returns a finite number in case of success. Note, however, that [`NaN`](../../globals/NaN.mdx) would be more appropriate in such a case.\n\nBecause `Number.POSITIVE_INFINITY` is a static property of `Number`, you always use it as `Number.POSITIVE_INFINITY`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Number/epsilon.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.EPSILON\n\nThe **`Number.EPSILON`** property represents the difference between 1 and the smallest floating point number greater than 1.\n\n## Value\n\n2<sup>-52</sup>, or approximately `2.2204460492503130808472633361816E-16`.\n\n## Description\n\n`Number.EPSILON` is the difference between 1 and the next greater number representable in the Number format, because [double precision floating point format](https://en.wikipedia.org/wiki/Double_precision_floating-point_format) only has 52 bits to represent the [mantissa](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_encoding), and the lowest bit has a significance of 2<sup>-52</sup>.\n\nNote that the absolute accuracy of floating numbers decreases as the number gets larger, because the exponent grows while the mantissa's accuracy stays the same. `Number.MIN_VALUE` is the smallest representable positive number, which is much smaller than `Number.EPSILON`.\n\nBecause `EPSILON` is a static property of `Number`, you always use it as `Number.EPSILON`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Number/isFinite.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isFinite()\n\nThe **`Number.isFinite()`** method determines whether the passed value is a finite number — that is, it checks that a given value is a number, and the number is neither positive [`Infinity`](../../globals/Infinity.mdx), negative `Infinity`, nor [`NaN`](../../globals/NaN.mdx).\n\n## Syntax\n\n```js\nNumber.isFinite(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested for finiteness.\n\n### Return value\n\nThe boolean value `true` if the given value is a finite number. Otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Number/isInteger.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isInteger()\n\nThe **`Number.isInteger()`** method determines whether the passed value is an integer.\n\n## Syntax\n\n```js\nNumber.isInteger(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested for being an integer.\n\n### Return value\n\nThe boolean value `true` if the given value is an integer. Otherwise `false`.\n\n## Description\n\nIf the target value is an integer, return `true`, otherwise return `false`. If the value is [`NaN`](../../globals/NaN.mdx) or [`Infinity`](../../globals/Infinity.mdx), return `false`. The method will also return `true` for floating point numbers that can be represented as integer. It will always return `false` if the value is not a number.\n\nNote that some number literals, while looking like non-integers, actually represent integers — due to the precision limit of ECMAScript floating-point number encoding (IEEE-754). For example, `5.0000000000000001` only differs from `5` by `1e-16`, which is too small to be represented. (For reference, [`Number.EPSILON`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/EPSILON) stores the distance between 1 and the next representable floating-point number greater than 1, and that is about `2.22e-16`.) Therefore, `5.0000000000000001` will be represented with the same encoding as `5`, thus making `Number.isInteger(5.0000000000000001)` return `true`.\n\nIn a similar sense, numbers around the magnitude of [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER) will suffer from loss of precision and make `Number.isInteger` return `true` even when it's not an integer. (The actual threshold varies based on how many bits are needed to represent the decimal — for example, `Number.isInteger(4500000000000000.1)` is `true`, but `Number.isInteger(4500000000000000.5)` is `false`.)\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Number/isNaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isNaN()\n\nThe **`Number.isNaN()`** method determines whether the passed value is the number value [`NaN`](../../globals/NaN.mdx), and returns `false` if the input is not of the Number type. It is a more robust version of the original, global `isNaN()` function.\n\n## Syntax\n\n```js\nNumber.isNaN(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested for [`NaN`](../../globals/NaN.mdx).\n\n### Return value\n\nThe boolean value `true` if the given value is a number with value [`NaN`](../../globals/NaN.mdx). Otherwise, `false`.\n\n## Description\n\nThe function `Number.isNaN()` provides a convenient way to check for equality with `NaN`. Note that you cannot test for equality with `NaN` using either the [`==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Equality) or [`===`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) operators, because unlike all other value comparisons in JavaScript, these evaluate to `false` whenever one operand is [`NaN`](../../globals/NaN.mdx), even if the other operand is also [`NaN`](../../globals/NaN.mdx).\n\nSince `x !== x` is only true for `NaN` among all possible JavaScript values, `Number.isNaN(x)` can also be replaced with a test for `x !== x`, despite the latter being less readable.\n\nAs opposed to the global `isNaN()` function, the `Number.isNaN()` method doesn't force-convert the parameter to a number. This makes it safe to pass values that would normally convert to [`NaN`](../../globals/NaN.mdx) but aren't actually the same value as [`NaN`](../../globals/NaN.mdx). This also means that only values of the Number type that are also [`NaN`](../../globals/NaN.mdx) return `true`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Number/isSafeInteger.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isSafeInteger()\n\nThe **`Number.isSafeInteger()`** method determines whether the provided value is a number that is a _safe integer_.\n\n## Syntax\n\n```js\nNumber.isSafeInteger(testValue)\n```\n\n### Parameters\n\n- `testValue`\n  - : The value to be tested for being a safe integer.\n\n### Return value\n\nThe boolean value `true` if the given value is a number that is a safe integer. Otherwise `false`.\n\n## Description\n\nThe safe integers consist of all integers from -(2<sup>53</sup> - 1) to 2<sup>53</sup> - 1, inclusive (±9,007,199,254,740,991). A safe integer is an integer that:\n\n- can be exactly represented as an IEEE-754 double precision number, and\n- whose IEEE-754 representation cannot be the result of rounding any other integer to fit the IEEE-754 representation.\n\nFor example, 2<sup>53</sup> - 1 is a safe integer: it can be exactly represented, and no other integer rounds to it under any IEEE-754 rounding mode. In contrast, 2<sup>53</sup> is _not_ a safe integer: it can be exactly represented in IEEE-754, but the integer 2<sup>53</sup> + 1 can't be directly represented in IEEE-754 but instead rounds to 2<sup>53</sup> under round-to-nearest and round-to-zero rounding.\n\nHandling values larger or smaller than \\~9 quadrillion with full precision requires using an [arbitrary precision arithmetic library](https://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic). See [What Every Programmer Needs to Know about Floating Point Arithmetic](https://floating-point-gui.de/) for more information on floating point representations of numbers.\n\nFor larger integers, consider using the `BigInt` type.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Number/parseFloat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.parseFloat()\n\nThe **`Number.parseFloat()`** method parses an argument and returns a floating point number. If a number cannot be parsed from the argument, it returns [`NaN`](../../globals/NaN.mdx).\n\n## Syntax\n\n```js\nNumber.parseFloat(string)\n```\n\n### Parameters\n\n- `string`\n  - : The value to parse, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). Leading whitespace in this argument is ignored.\n\n### Return value\n\nA floating point number parsed from the given `string`.\n\nOr [`NaN`](../../globals/NaN.mdx) when the first non-whitespace character cannot be converted to a number.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Number/parseInt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.parseInt()\n\nThe **`Number.parseInt()`** method parses a string argument and\nreturns an integer of the specified radix or base.\n\n## Syntax\n\n```js\nNumber.parseInt(string)\nNumber.parseInt(string, radix)\n```\n\n### Parameters\n\n- `string`\n  - : The value to parse, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). Leading whitespace in this argument is ignored.\n- `radix` _**optional**_\n\n  - : An integer between `2` and `36` that represents the\n    _radix_ (the base in mathematical numeral systems) of the\n    `string`.\n\n    If `radix` is undefined or `0`, it is assumed to be `10` except when the number begins with the code unit pairs `0x` or `0X`, in which case a radix of `16` is assumed.\n\n### Return value\n\nAn integer parsed from the given `string`.\n\nIf the `radix` is smaller than `2` or bigger than\n`36`, or the first non-whitespace character cannot be converted to a number,\n[`NaN`](../../globals/NaN.mdx) is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Number/prototype/toExponential.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toExponential()\n\nThe **`toExponential()`** method returns a string representing\nthe `Number` object in exponential notation.\n\n## Syntax\n\n```js\ntoExponential()\ntoExponential(fractionDigits)\n```\n\n### Parameters\n\n- `fractionDigits` _**optional**_\n  - : Optional. An integer specifying the number of digits after the decimal point.\n    Defaults to as many digits as necessary to specify the number.\n\n### Return value\n\nA string representing the given `Number` object in exponential notation\nwith one digit before the decimal point, rounded to\n`fractionDigits` digits after the decimal point.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : If `fractionDigits` is too small or too large. Values between\n    `0` and `100`, inclusive, will not cause a\n    [`RangeError`](../../../globals/RangeError/RangeError.mdx).\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If this method is invoked on an object that is not a `Number`.\n\n## Description\n\nIf the `fractionDigits` argument is omitted, the number of digits\nafter the decimal point defaults to the number of digits necessary to represent the\nvalue uniquely.\n\nIf you use the `toExponential()` method for a numeric literal and the\nnumeric literal has no exponent and no decimal point, leave whitespace(s) before the dot\nthat precedes the method call to prevent the dot from being interpreted as a decimal\npoint.\n\nIf a number has more digits than requested by the\n`fractionDigits` parameter, the number is rounded to the nearest\nnumber represented by `fractionDigits` digits. See the discussion\nof rounding in the description of the [`Number.prototype.toFixed()`](../../../globals/Number/prototype/toFixed.mdx) method, which also applies to `toExponential()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Number/prototype/toFixed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toFixed()\n\nThe **`toFixed()`** method formats a number using fixed-point notation.\n\n## Syntax\n\n```js\ntoFixed()\ntoFixed(digits)\n```\n\n### Parameters\n\n- `digits` _**optional**_\n  - : The number of digits to appear after the decimal point; should be a value between `0` and `100`, inclusive. If this argument is omitted, it is treated as `0`.\n\n### Return value\n\nA string representing the given number using fixed-point notation.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : If `digits` is smaller than `0`, larger than `100`, or is `NaN`.\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If this method is invoked on an object that is not a `Number`.\n\n## Description\n\nThe `toFixed()` method returns a string representation of `numObj` that does not use exponential notation and has exactly `digits` digits after the decimal place. The number is rounded if necessary, and the fractional part is padded with zeros if necessary so that it has the specified length.\n\nIf the absolute value of `numObj` is greater or equal to 10<sup>21</sup>, this method uses the same algorithm as [`Number.prototype.toString()`](../../../globals/Number/prototype/toString.mdx) and returns a string in exponential notation. `toFixed()` returns `\"Infinity\"`, `\"NaN\"`, or `\"-Infinity\"` if the value of `numObj` is non-finite.\n\nThe output of `toFixed()` may be more precise than [`toString()`](../../../globals/Number/prototype/toString.mdx) for some values, because `toString()` only prints enough significant digits to distinguish the number from adjacent number values. For example:\n\n```js\n(1000000000000000128).toString(); // '1000000000000000100'\n(1000000000000000128).toFixed(0); // '1000000000000000128'\n```\n\nHowever, choosing a `digits` precision that's too high can return unexpected results, because decimal fractional numbers cannot be represented precisely in floating point. For example:\n\n```js\n0.3.toFixed(50); // '0.29999999999999998889776975374843459576368331909180'\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Number/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string with a language-sensitive representation of this number. In implementations with [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) support, this method simply calls `Intl.NumberFormat`.\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` parameters customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat), these parameters correspond exactly to the [`Intl.NumberFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) constructor's parameters. Implementations without `Intl.NumberFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#locales) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored.\n\nSee the [`Intl.NumberFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string with a language-sensitive representation of the given number.\n\nIn implementations with `Intl.NumberFormat`, this is equivalent to `new Intl.NumberFormat(locales, options).format(number)`.\n\n## Performance\n\nWhen formatting large numbers of numbers, it is better to create a\n`Intl.NumberFormat` object and use the function provided by its\n`format` property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Number/prototype/toPrecision.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toPrecision()\n\nThe **`toPrecision()`** method returns a string representing\nthe `Number` object to the specified precision.\n\n## Syntax\n\n```js\ntoPrecision()\ntoPrecision(precision)\n```\n\n### Parameters\n\n- `precision` _**optional**_\n  - : An integer specifying the number of significant digits.\n\n### Return value\n\nA string representing a `Number` object in fixed-point or exponential\nnotation rounded to `precision` significant digits. See the discussion of\nrounding in the description of the [`Number.prototype.toFixed()`](../../../globals/Number/prototype/toFixed.mdx) method,\nwhich also applies to `toPrecision()`.\n\nIf the `precision` argument is omitted, behaves as\n[`Number.prototype.toString()`](../../../globals/Number/prototype/toString.mdx). If the `precision` argument is a\nnon-integer value, it is rounded to the nearest integer.\n\n### Exceptions\n\n- `RangeError`\n  - : If `precision` is not between `1` and `100`\n    (inclusive), a [`RangeError`](../../../globals/RangeError/RangeError.mdx) is thrown. Implementations are allowed to\n    support larger and smaller values as well. ECMA-262 only requires a precision of up to\n    21 significant digits.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Number/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified number value.\n\n## Syntax\n\n```js\ntoString()\ntoString(radix)\n```\n\n### Parameters\n\n- `radix` _**optional**_\n  - : An integer in the range `2` through `36` specifying the base to use for representing the number value. Defaults to 10.\n\n### Return value\n\nA string representing the specified number value.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `radix` is less than 2 or greater than 36.\n\n## Description\n\nThe `Number` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For `Number` values, the `toString` method returns a string representation of the value in the specified radix.\n\nFor radixes above 10, the letters of the alphabet indicate digits greater than 9. For example, for hexadecimal numbers (base 16) `a` through `f` are used.\n\nIf the specified number value is negative, the sign is preserved. This is the case even if the radix is 2; the string returned is the positive binary representation of the number value preceded by a `-` sign, **not** the two's complement of the number value.\n\nBoth `0` and `-0` have `\"0\"` as their string representation. [`Infinity`](../../../globals/Infinity.mdx) returns `\"Infinity\"` and [`NaN`](../../../globals/NaN.mdx) returns `\"NaN\"`.\n\nIf the number is not a whole number, the decimal point `.` is used to separate the decimal places. [Scientific notation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#exponential) is used if the radix is 10 and the number's magnitude (ignoring sign) is greater than or equal to 10<sup>21</sup> or less than 10<sup>-6</sup>. In this case, the returned string always explicitly specifies the sign of the exponent.\n\n```js\nconsole.log((10 ** 21.5).toString()); // \"3.1622776601683794e+21\"\nconsole.log((10 ** 21.5).toString(8)); // \"526665530627250154000000\"\n```\n\nThe `toString()` method requires its `this` value to be a `Number` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to number values.\n\nBecause `Number` doesn't have a [`[Symbol.toPrimitive]()`](../../../globals/Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `Number` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, Number _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — rather, they are directly converted using the same algorithm as the initial `toString()` implementation.\n\n```js\nNumber.prototype.toString = () => \"Overridden\";\nconsole.log(`${1}`); // \"1\"\nconsole.log(`${new Number(1)}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Number/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.valueOf()\n\nThe **`valueOf()`** method returns the wrapped primitive value\nof a `Number` object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nA number representing the primitive value of the specified `Number` object.\n\n## Description\n\nThis method is usually called internally by JavaScript and not explicitly in web code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Object/Object.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object()\n\nThe **`Object` constructor** turns the input into an object. Its behavior depends on the input's type.\n\n- If the value is [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../globals/undefined.mdx), it creates and returns an empty object.\n- Otherwise, it returns an object of a Type that corresponds to the given value.\n- If the value is an object already, it returns the value.\n\n## Syntax\n\n```js\nnew Object(value)\nObject(value)\n```\n\n> **Note:** `Object()` can be called with or without `new`. Both create a new object.\n\n### Parameters\n\n- `value`\n  - : Any value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Object/assign.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.assign()\n\nThe **`Object.assign()`** method\ncopies all [enumerable](../../globals/Object/prototype/propertyIsEnumerable.mdx)\n[own properties](../../globals/Object/hasOwn.mdx) from one or more\n_source objects_ to a _target object_. It returns the modified target\nobject.\n\n## Syntax\n\n```js\nObject.assign(target, ...sources)\n```\n\n### Parameters\n\n- `target`\n  - : The target object — what to apply the sources' properties to, which is returned\n    after it is modified.\n- `sources`\n  - : The source object(s) — objects containing the properties you want to apply.\n\n### Return value\n\nThe target object.\n\n## Description\n\nProperties in the target object are overwritten by properties in the sources if they\nhave the same \"key\". Later sources' properties overwrite earlier ones.\n\nThe `Object.assign()` method only copies _enumerable_ and\n_own_ properties from a source object to a target object. It uses\n`[[Get]]` on the source and `[[Set]]` on the target, so it will\ninvoke [getters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/get) and [setters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/set). Therefore it\n_assigns_ properties, versus copying or defining new properties. This may make it\nunsuitable for merging new properties into a prototype if the merge sources contain\ngetters.\n\nFor copying property definitions (including their enumerability) into prototypes, use\n[`Object.getOwnPropertyDescriptor()`](../../globals/Object/getOwnPropertyDescriptor.mdx) and\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx) instead.\n\nBoth `String` and `Symbol` properties are copied.\n\nIn case of an error, for example if a property is non-writable, a\n[`TypeError`](../../globals/TypeError/TypeError.mdx) is raised, and the `target` object is\nchanged if any properties are added before the error is raised.\n\n> **Note:** `Object.assign()` does not throw on\n> [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../globals/undefined.mdx) sources.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Object/create.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.create()\n\nThe **`Object.create()`** method creates a new object, using an existing object as the prototype of the newly created object.\n\n## Syntax\n\n```js\nObject.create(proto)\nObject.create(proto, propertiesObject)\n```\n\n### Parameters\n\n- `proto`\n  - : The object which should be the prototype of the newly-created object.\n- `propertiesObject` _**optional**_\n  - : If specified and not [`undefined`](../../globals/undefined.mdx), an object whose [enumerable own properties](https://developer.mozilla.org/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) specify property descriptors to be added to the newly-created object, with the corresponding property names. These properties correspond to the second argument of [`Object.defineProperties()`](../../globals/Object/defineProperties.mdx).\n\n### Return value\n\nA new object with the specified prototype object and properties.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if `proto` is neither [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) nor an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Object/defineProperties.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.defineProperties()\n\nThe **`Object.defineProperties()`** method defines new or\nmodifies existing properties directly on an object, returning the object.\n\n## Syntax\n\n```js\nObject.defineProperties(obj, props)\n```\n\n### Parameters\n\n- `obj`\n  - : The object on which to define or modify properties.\n- `props`\n\n  - : An object whose keys represent the names of properties to be defined or modified and\n    whose values are objects describing those properties. Each value in `props`\n    must be either a data descriptor or an accessor descriptor; it cannot be both (see\n    [`Object.defineProperty()`](../../globals/Object/defineProperty.mdx) for more details).\n\n    Data descriptors and accessor descriptors may optionally contain the following keys:\n\n    - `configurable`\n      - : `true` if and only if the type of this property descriptor may be\n        changed and if the property may be deleted from the corresponding object.\n        **Defaults to `false`.**\n    - `enumerable`\n      - : `true` if and only if this property shows up during enumeration of\n        the properties on the corresponding object.\n        **Defaults to `false`.**\n\n    A data descriptor also has the following optional keys:\n\n    - `value`\n      - : The value associated with the property. Can be any valid JavaScript value\n        (number, object, function, etc.).\n        **Defaults to [`undefined`](../../globals/undefined.mdx).**\n    - `writable`\n      - : `true` if and only if the value associated with the property may be\n        changed with an assignment operator.\n        **Defaults to `false`.**\n\n    An accessor descriptor also has the following optional keys:\n\n    - `get`\n      - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx)\n        if there is no getter. The function's return value will be used as the value of\n        the property.\n        **Defaults to [`undefined`](../../globals/undefined.mdx).**\n    - `set`\n      - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx)\n        if there is no setter. The function will receive as its only argument the new\n        value being assigned to the property.\n        **Defaults to [`undefined`](../../globals/undefined.mdx).**\n\n    If a descriptor has neither of `value`, `writable`,\n    `get` and `set` keys, it is treated as a data descriptor. If a\n    descriptor has both `value` or `writable` and `get`\n    or `set` keys, an exception is thrown.\n\n### Return value\n\nThe object that was passed to the function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Object/defineProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.defineProperty()\n\nThe static method **`Object.defineProperty()`** defines a new\nproperty directly on an object, or modifies an existing property on an object, and\nreturns the object.\n\n## Syntax\n\n```js\nObject.defineProperty(obj, prop, descriptor)\n```\n\n### Parameters\n\n- `obj`\n  - : The object on which to define the property.\n- `prop`\n  - : The name or `Symbol` of the property to be defined or modified.\n- `descriptor`\n  - : The descriptor for the property being defined or modified.\n\n### Return value\n\nThe object that was passed to the function.\n\n## Description\n\nThis method allows a precise addition to or modification of a property on an object.\nNormal property addition through assignment creates properties which show up during\nproperty enumeration (`for...in` loop or\n[`Object.keys`](../../globals/Object/keys.mdx) method), whose values may be changed, and which may be\ndeleted. This method allows these extra details\nto be changed from their defaults. By default, properties added using\n`Object.defineProperty()` are not writable, not enumerable, and not configurable.\n\nProperty descriptors present in objects come in two main flavors: data descriptors and\naccessor descriptors. A **data descriptor** is a property that has a\nvalue, which may or may not be writable. An **accessor descriptor** is a\nproperty described by a getter-setter pair of functions. A descriptor must be one of\nthese two flavors; it cannot be both.\n\nBoth data and accessor descriptors are objects. They share the following optional keys\n(please note: the **defaults** mentioned here are in the case of defining\nproperties using `Object.defineProperty()`):\n\n- `configurable`\n\n  - : when this is set to `false`,\n\n    - the type of this property cannot be changed between data property and accessor property, and\n    - the property may not be deleted, and\n    - other attributes of its descriptor cannot be changed (however, if it's a data descriptor with `writable: true`, the `value` can be changed, and `writable` can be changed to `false`).\n\n    **Defaults to `false`.**\n\n- `enumerable`\n  - : `true` if and only if this property shows up during enumeration of the\n    properties on the corresponding object.\n    **Defaults to `false`.**\n\nA **data descriptor** also has the following optional keys:\n\n- `value`\n  - : The value associated with the property. Can be any valid JavaScript value (number,\n    object, function, etc.).\n    **Defaults to [`undefined`](../../globals/undefined.mdx).**\n- `writable`\n  - : `true` if the value associated with the property may be changed with an\n    assignment operator.\n    **Defaults to `false`.**\n\nAn **accessor descriptor** also has the following optional keys:\n\n- `get`\n  - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no getter. When the property is accessed, this function is called without\n    arguments and with `this` set to the object through which the property is\n    accessed (this may not be the object on which the property is defined due to\n    inheritance). The return value will be used as the value of the property.\n    **Defaults to [`undefined`](../../globals/undefined.mdx).**\n- `set`\n  - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no setter. When the property is assigned, this function is called with one\n    argument (the value being assigned to the property) and with `this` set to\n    the object through which the property is assigned.\n    **Defaults to [`undefined`](../../globals/undefined.mdx).**\n\nIf a descriptor has neither of `value`, `writable`,\n`get` and `set` keys, it is treated as a data descriptor. If a\ndescriptor has both \\[`value` or `writable`] and \\[`get` or `set`] keys, an exception is thrown.\n\nBear in mind that these attributes are not necessarily the descriptor's own properties.\nInherited properties will be considered as well. In order to ensure these defaults are\npreserved, you might freeze existing objects in the descriptor object's prototype chain upfront, specify all\noptions explicitly, or point to [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) with [`Object.create(null)`](../../globals/Object/create.mdx).\n\n```js\nconst obj = {};\n// 1. Using a null prototype: no inherited properties\nconst descriptor = Object.create(null);\ndescriptor.value = 'static';\n\n// not enumerable, not configurable, not writable as defaults\nObject.defineProperty(obj, 'key', descriptor);\n\n// 2. Being explicit by using a throw-away object literal with all attributes present\nObject.defineProperty(obj, 'key2', {\n  enumerable: false,\n  configurable: false,\n  writable: false,\n  value: 'static'\n});\n\n// 3. Recycling same object\nfunction withValue(value) {\n  const d = withValue.d || (\n    withValue.d = {\n      enumerable: false,\n      writable: false,\n      configurable: false,\n      value,\n    }\n  );\n\n  // avoiding duplicate operation for assigning value\n  if (d.value !== value) d.value = value;\n\n  return d;\n}\n// and\nObject.defineProperty(obj, 'key', withValue('static'));\n\n// if freeze is available, prevents adding or\n// removing the object prototype properties\n// (value, get, set, enumerable, writable, configurable)\n(Object.freeze || Object)(Object.prototype);\n```\n\nWhen the property already exists, `Object.defineProperty()` attempts to modify the property according to the values in the descriptor and the property's current configuration.\n\nIf the old descriptor had its `configurable` attribute set to `false`, the property is said to be _non-configurable_. It is not possible to change any attribute of a non-configurable accessor property, and it is not possible to switch between data and accessor property types. For data properties with `writable: true`, it is possible to modify the value and change the `writable` attribute from `true` to `false`. A [`TypeError`](../../globals/TypeError/TypeError.mdx) is thrown when attempts are made to change non-configurable property attributes (except `value` and `writable`, if permitted), except when defining a value same as the original value on a data property.\n\nWhen the current property is configurable, defining an attribute to `undefined` effectively deletes it. For example, if `o.k` is an accessor property, `Object.defineProperty(o, \"k\", { set: undefined })` will remove the setter, making `k` only have a getter and become readonly. If an attribute is absent from the new descriptor, the old descriptor attribute's value is kept (it won't be implicitly re-defined to `undefined`). It is possible to toggle between data and accessor property by giving a descriptor of a different \"flavor\". For example, if the new descriptor is a data descriptor (with `value` or `writable`), the original descriptor's `get` and `set` attributes will both be dropped.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Object/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.entries()\n\nThe **`Object.entries()`** method returns an array of a given object's own enumerable string-keyed property key-value pairs.\n\n## Syntax\n\n```js\nObject.entries(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : An object.\n\n### Return value\n\nAn array of the given object's own enumerable string-keyed property key-value pairs. Each key-value pair is an array with two elements: the first element is the property key (which is always a string), and the second element is the property value.\n\n## Description\n\n`Object.entries()` returns an array whose elements are arrays corresponding to the enumerable string-keyed property key-value pairs found directly upon `object`. This is the same as iterating with a `for...in` loop, except that a `for...in` loop enumerates properties in the prototype chain as well. The order of the array returned by `Object.entries()` is the same as that provided by a `for...in` loop.\n\nIf you only need the property keys, use [`Object.keys()`](../../globals/Object/keys.mdx) instead. If you only need the property values, use [`Object.values()`](../../globals/Object/values.mdx) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Object/freeze.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.freeze()\n\nThe **`Object.freeze()`** method _freezes_ an object. Freezing an object [prevents extensions](../../globals/Object/preventExtensions.mdx) and makes existing properties non-writable and non-configurable. A frozen object can no longer be changed: new properties cannot be added, existing properties cannot be removed, their enumerability, configurability, writability, or value cannot be changed, and the object's prototype cannot be re-assigned. `freeze()` returns the same object that was passed in.\n\nFreezing an object is the highest integrity level that JavaScript provides.\n\n## Syntax\n\n```js\nObject.freeze(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object to freeze.\n\n### Return value\n\nThe object that was passed to the function.\n\n## Description\n\nFreezing an object is equivalent to [preventing extensions](../../globals/Object/preventExtensions.mdx) and then changing all existing [properties' descriptors'](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty#description) `configurable` to `false` — and for data properties, `writable` to `false` as well. Nothing can be added to or removed from the properties set of a frozen object. Any attempt to do so will fail, either silently or by throwing a [`TypeError`](../../globals/TypeError/TypeError.mdx) exception (most commonly, but not exclusively, when in \"strict mode\").\n\nFor data properties of a frozen object, their values cannot be changed since the writable and\nconfigurable attributes are set to false. Accessor properties (getters and setters) work the same — the property value returned by the getter may still change, and the setter can still be called without throwing errors when setting the property. Note that values\nthat are objects can still be modified, unless they are also frozen. As an object, an\narray can be frozen; after doing so, its elements cannot be altered and no elements can\nbe added to or removed from the array.\n\n`freeze()` returns the same object that was passed into the function. It\n_does not_ create a frozen copy.\n\nA `TypedArray` or a [`DataView`](../../globals/DataView/DataView.mdx) with elements will cause a [`TypeError`](../../globals/TypeError/TypeError.mdx),\nas they are views over memory and will definitely cause other possible issues:\n\n```js\nObject.freeze(new Uint8Array(0)) // No elements\n// Uint8Array []\n\nObject.freeze(new Uint8Array(1)) // Has elements\n// TypeError: Cannot freeze array buffer views with elements\n\nObject.freeze(new DataView(new ArrayBuffer(32))) // No elements\n// DataView {}\n\nObject.freeze(new Float64Array(new ArrayBuffer(64), 63, 0)) // No elements\n// Float64Array []\n\nObject.freeze(new Float64Array(new ArrayBuffer(64), 32, 2)) // Has elements\n// TypeError: Cannot freeze array buffer views with elements\n```\n\nNote that as the standard three properties (`buf.byteLength`,\n`buf.byteOffset` and `buf.buffer`) are read-only (as are those of\nan `ArrayBuffer`, there is no reason for\nattempting to freeze these properties.\n\nUnlike [`Object.seal()`](../../globals/Object/seal.mdx), existing properties in objects frozen with `Object.freeze()` are made immutable and data properties cannot be re-assigned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Object/fromEntries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.fromEntries()\n\nThe **`Object.fromEntries()`** method transforms a list of key-value pairs into an object.\n\n## Syntax\n\n```js\nObject.fromEntries(iterable)\n```\n\n### Parameters\n\n- `iterable`\n\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol), such as an `Array` or [Map](../../globals/Map/Map.mdx), containing a list of objects. Each object should have two properties:\n\n    - `0`\n      - : A string or `Symbol` representing the property key.\n    - `1`\n      - : The property value.\n\n    Typically, this object is implemented as a two-element array, with the first element being the property key and the second element being the property value.\n\n### Return value\n\nA new object whose properties are given by the entries of the iterable.\n\n## Description\n\nThe `Object.fromEntries()` method takes a list of key-value pairs and returns a new object whose properties are given by those entries. The `iterable` argument is expected to be an object that implements an `@@iterator` method. The method returns an iterator object that produces two-element array-like objects. The first element is a value that will be used as a property key, and the second element is the value to associate with that property key.\n\n`Object.fromEntries()` performs the reverse of [`Object.entries()`](../../globals/Object/entries.mdx), except that `Object.entries()` only returns string-keyed properties, while `Object.fromEntries()` can also create symbol-keyed properties.\n\n> **Note:** Unlike [`Array.from()`](../../globals/Array/from.mdx), `Object.fromEntries()` does not use the value of `this`, so calling it on another constructor does not create objects of that type.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Object/getOwnPropertyDescriptor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertyDescriptor()\n\nThe **`Object.getOwnPropertyDescriptor()`** method returns an\nobject describing the configuration of a specific property on a given object (that is,\none directly present on an object and not in the object's prototype chain). The object\nreturned is mutable but mutating it has no effect on the original property's\nconfiguration.\n\n## Syntax\n\n```js\nObject.getOwnPropertyDescriptor(obj, prop)\n```\n\n### Parameters\n\n- `obj`\n  - : The object in which to look for the property.\n- `prop`\n  - : The name or `Symbol` of the property whose description is to be\n    retrieved.\n\n### Return value\n\nA property descriptor of the given property if it exists on the object,\n[`undefined`](../../globals/undefined.mdx) otherwise.\n\n## Description\n\nThis method permits examination of the precise description of a property. A\n_property_ in JavaScript consists of either a string-valued name or a\n`Symbol` and a property descriptor. Further information about property\ndescriptor types and their attributes can be found in\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx).\n\nA _property descriptor_ is a record with some of the following attributes:\n\n- `value`\n  - : The value associated with the property (data descriptors only).\n- `writable`\n  - : `true` if and only if the value associated with the property may be\n    changed (data descriptors only).\n- `get`\n  - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no getter (accessor descriptors only).\n- `set`\n  - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no setter (accessor descriptors only).\n- `configurable`\n  - : `true` if and only if the type of this property descriptor may be changed\n    and if the property may be deleted from the corresponding object.\n- `enumerable`\n  - : `true` if and only if this property shows up during enumeration of the\n    properties on the corresponding object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Object/getOwnPropertyDescriptors.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertyDescriptors()\n\nThe **`Object.getOwnPropertyDescriptors()`** method returns all\nown property descriptors of a given object.\n\n## Syntax\n\n```js\nObject.getOwnPropertyDescriptors(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object for which to get all own property descriptors.\n\n### Return value\n\nAn object containing all own property descriptors of an object. Might be an empty\nobject, if there are no properties.\n\n## Description\n\nThis method permits examination of the precise description of all own properties of an\nobject. A _property_ in JavaScript consists of either a string-valued name or a\n`Symbol` and a property descriptor. Further information about property\ndescriptor types and their attributes can be found in\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx).\n\nA _property descriptor_ is a record with some of the following attributes:\n\n- `value`\n  - : The value associated with the property (data descriptors only).\n- `writable`\n  - : `true` if and only if the value associated with the property may be\n    changed (data descriptors only).\n- `get`\n  - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no getter (accessor descriptors only).\n- `set`\n  - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no setter (accessor descriptors only).\n- `configurable`\n  - : `true` if and only if the type of this property descriptor may be changed\n    and if the property may be deleted from the corresponding object.\n- `enumerable`\n  - : `true` if and only if this property shows up during enumeration of the\n    properties on the corresponding object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Object/getOwnPropertyNames.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertyNames()\n\nThe **`Object.getOwnPropertyNames()`** method returns an array of all properties (including non-enumerable properties except for those which use Symbol) found directly in a given object.\n\n## Syntax\n\n```js\nObject.getOwnPropertyNames(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object whose enumerable and non-enumerable properties are to be returned.\n\n### Return value\n\nAn array of strings that corresponds to the properties found directly in the given object.\n\n## Description\n\n`Object.getOwnPropertyNames()` returns an array whose elements are strings corresponding to the enumerable and non-enumerable properties found directly in a given object `obj`. The ordering of the enumerable properties in the array is consistent with the ordering exposed by a `for...in` loop (or by [`Object.keys()`](../../globals/Object/keys.mdx)) over the properties of the object. The non-negative integer keys of the object (both enumerable and non-enumerable) are added in ascending order to the array first, followed by the string keys in the order of insertion.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Object/getOwnPropertySymbols.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertySymbols()\n\nThe **`Object.getOwnPropertySymbols()`** method returns an array of all symbol properties found directly upon a given object.\n\n## Syntax\n\n```js\nObject.getOwnPropertySymbols(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object whose symbol properties are to be returned.\n\n### Return value\n\nAn array of all symbol properties found directly upon the given object.\n\n## Description\n\nSimilar to [`Object.getOwnPropertyNames()`](../../globals/Object/getOwnPropertyNames.mdx), you can get all symbol properties of a given object as an array of symbols. Note that [`Object.getOwnPropertyNames()`](../../globals/Object/getOwnPropertyNames.mdx) itself does not contain the symbol properties of an object and only the string properties.\n\nAs all objects have no own symbol properties initially, `Object.getOwnPropertySymbols()` returns an empty array unless you have set symbol properties on your object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Object/getPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getPrototypeOf()\n\nThe **`Object.getPrototypeOf()`** method returns the prototype\n(i.e. the value of the internal `[[Prototype]]` property) of the specified\nobject.\n\n## Syntax\n\n```js\nObject.getPrototypeOf(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object whose prototype is to be returned.\n\n### Return value\n\nThe prototype of the given object, which may be `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Object/hasOwn.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.hasOwn()\n\nThe **`Object.hasOwn()`** static method returns `true` if the specified object has the indicated property as its _own_ property.\nIf the property is inherited, or does not exist, the method returns `false`.\n\n> **Note:** `Object.hasOwn()` is intended as a replacement for [`Object.prototype.hasOwnProperty()`](../../globals/Object/prototype/hasOwnProperty.mdx).\n\n\n\n## Syntax\n\n```js\nhasOwn(instance, prop)\n```\n\n### Parameters\n\n- `instance`\n  - : The JavaScript object instance to test.\n- `prop`\n  - : The `String` name or [Symbol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol) of the property to test.\n\n### Return value\n\n`true` if the specified object has directly defined the specified property.\nOtherwise `false`\n\n## Description\n\nThe **`Object.hasOwn()`** method returns `true` if the specified property is a\ndirect property of the object — even if the property value is `null` or `undefined`.\nThe method returns `false` if the property is inherited, or has not been declared at all.\nUnlike the `in` operator, this\nmethod does not check for the specified property in the object's prototype chain.\n\nIt is recommended over [`Object.prototype.hasOwnProperty()`](../../globals/Object/prototype/hasOwnProperty.mdx) because\nit works for objects created using `Object.create(null)` and with objects that\nhave overridden the inherited `hasOwnProperty()` method. While it is possible to\nworkaround these problems by calling `Object.prototype.hasOwnProperty()` on an\nexternal object, `Object.hasOwn()` is more intuitive.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Object/is.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.is()\n\nThe **`Object.is()`** method determines whether two values are [the same value](https://developer.mozilla.org/docs/Web/JavaScript/Equality_comparisons_and_sameness#same-value_equality_using_object.is).\n\n## Syntax\n\n```js\nObject.is(value1, value2)\n```\n\n### Parameters\n\n- `value1`\n  - : The first value to compare.\n- `value2`\n  - : The second value to compare.\n\n### Return value\n\nA boolean indicating whether or not the two arguments are the same value.\n\n## Description\n\n`Object.is()` determines whether two values are [the same value](https://developer.mozilla.org/docs/Web/JavaScript/Equality_comparisons_and_sameness#same-value_equality_using_object.is). Two values are the same if one of the following holds:\n\n- both [`undefined`](../../globals/undefined.mdx)\n- both `null`\n- both `true` or both `false`\n- both strings of the same length with the same characters in the same order\n- both the same object (meaning both values reference the same object in memory)\n- both `BigInts` with the same numeric value\n- both `Symbols` that reference the same symbol value\n- both numbers and\n\n  - both `+0`\n  - both `-0`\n  - both [`NaN`](../../globals/NaN.mdx)\n  - or both non-zero, not [`NaN`](../../globals/NaN.mdx), and have the same value\n\n`Object.is()` is not equivalent to the [`==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Equality) operator. The `==` operator applies various coercions to both sides (if they are not the same type) before testing for equality (resulting in such behavior as `\"\" == false` being `true`), but `Object.is()` doesn't coerce either value.\n\n`Object.is()` is also _not_ equivalent to the [`===`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) operator. The only difference between `Object.is()` and `===` is in their treatment of signed zeros and `NaN` values. The `===` operator (and the `==` operator) treats the number values `-0` and `+0` as equal, but treats [`NaN`](../../globals/NaN.mdx) as not equal to each other.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Object/isExtensible.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.isExtensible()\n\nThe **`Object.isExtensible()`** method determines if an object\nis extensible (whether it can have new properties added to it).\n\n## Syntax\n\n```js\nObject.isExtensible(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be checked.\n\n### Return value\n\nA `Boolean` indicating whether or not the given object is extensible.\n\n## Description\n\nObjects are extensible by default: they can have new properties added to them, and their `[[Prototype]]` can be re-assigned. An object can be marked as non-extensible using one of [`Object.preventExtensions()`](../../globals/Object/preventExtensions.mdx), [`Object.seal()`](../../globals/Object/seal.mdx), [`Object.freeze()`](../../globals/Object/freeze.mdx), or [`Reflect.preventExtensions()`](../../globals/Reflect/preventExtensions.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Object/isFrozen.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.isFrozen()\n\nThe **`Object.isFrozen()`** determines if an object is\n[frozen](../../globals/Object/freeze.mdx).\n\n## Syntax\n\n```js\nObject.isFrozen(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be checked.\n\n### Return value\n\nA `Boolean` indicating whether or not the given object is frozen.\n\n## Description\n\nAn object is frozen if and only if it is not [extensible](../../globals/Object/isExtensible.mdx), all its properties are non-configurable, and all its data\nproperties (that is, properties which are not accessor properties with getter or setter\ncomponents) are non-writable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Object/isSealed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.isSealed()\n\nThe **`Object.isSealed()`** method determines if an object is\nsealed.\n\n## Syntax\n\n```js\nObject.isSealed(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be checked.\n\n### Return value\n\nA `Boolean` indicating whether or not the given object is sealed.\n\n## Description\n\nReturns `true` if the object is sealed, otherwise `false`. An\nobject is sealed if it is not [extensible](../../globals/Object/isExtensible.mdx) and\nif all its properties are non-configurable and therefore not removable (but not\nnecessarily non-writable).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Object/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.keys()\n\nThe **`Object.keys()`** method returns an array of a given object's own enumerable string-keyed property names.\n\n## Syntax\n\n```js\nObject.keys(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : An object.\n\n### Return value\n\nAn array of strings representing the given object's own enumerable string-keyed property keys.\n\n## Description\n\n`Object.keys()` returns an array whose elements are strings corresponding to the enumerable string-keyed property names found directly upon `object`. This is the same as iterating with a `for...in` loop, except that a `for...in` loop enumerates properties in the prototype chain as well. The order of the array returned by `Object.keys()` is the same as that provided by a `for...in` loop.\n\nIf you need the property values, use [`Object.values()`](../../globals/Object/values.mdx) instead. If you need both the property keys and values, use [`Object.entries()`](../../globals/Object/entries.mdx) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Object/preventExtensions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.preventExtensions()\n\nThe **`Object.preventExtensions()`** method prevents new\nproperties from ever being added to an object (i.e. prevents future extensions to the\nobject). It also prevents the object's prototype from being re-assigned.\n\n## Syntax\n\n```js\nObject.preventExtensions(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be made non-extensible.\n\n### Return value\n\nThe object being made non-extensible.\n\n## Description\n\nAn object is extensible if new properties can be added to it.\n`Object.preventExtensions()` marks an object as no longer extensible, so that\nit will never have properties beyond the ones it had at the time it was marked as\nnon-extensible. Note that the properties of a non-extensible object, in general, may\nstill be _deleted_. Attempting to add new properties to a non-extensible object\nwill fail, either silently or, in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), throwing a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\nUnlike [`Object.seal()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/seal) and [`Object.freeze()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze), `Object.preventExtensions()` invokes an intrinsic JavaScript behavior and cannot be replaced with a composition of several other operations. It also has its `Reflect` counterpart (which only exists for intrinsic operations), [`Reflect.preventExtensions()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Reflect/preventExtensions).\n\n`Object.preventExtensions()` only prevents addition of own properties. Properties can still be added to the object prototype.\n\nThis method makes the `[[Prototype]]` of the target immutable; any `[[Prototype]]` re-assignment will throw a `TypeError`. This behavior is specific to the internal `[[Prototype]]` property; other properties of the target object will remain mutable.\n\nThere is no way to make an object extensible again once it has been made non-extensible.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Object/prototype/constructor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.constructor\n\nThe **`constructor`** data property of an `Object` instance returns a reference to the constructor function that created the instance object. Note that the value of this property is a reference to _the function itself_, not a string containing the function's name.\n\n> **Note:** This is a property of JavaScript objects. For the `constructor` method in classes, see [its own reference page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/constructor).\n\n## Value\n\nA reference to the constructor function that created the instance object.\n\n> **Note:** This property is created by default on the [`prototype`](../../../globals/Function/prototype/) property of every constructor function and is inherited by all objects created by that constructor.\n\n## Description\n\nAny object (with the exception of [`null` prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) will have a `constructor` property on its `[[Prototype]]`. Objects created with literals will also have a `constructor` property that points to the constructor type for that object — for example, array literals create `Array` objects, and [object literals](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Object_initializer) create plain objects.\n\n```js\nconst o1 = {};\no1.constructor === Object; // true\n\nconst o2 = new Object();\no2.constructor === Object; // true\n\nconst a1 = [];\na1.constructor === Array; // true\n\nconst a2 = new Array();\na2.constructor === Array; // true\n\nconst n = 3;\nn.constructor === Number; // true\n```\n\nNote that `constructor` usually comes from the constructor's [`prototype`](../../../globals/Function/prototype/) property. If you have a longer prototype chain, you can usually expect every object in the chain to have a `constructor` property.\n\n```js\nconst o = new TypeError(); // Inheritance: TypeError -> Error -> Object\nconst proto = Object.getPrototypeOf;\nproto(o).constructor === TypeError; // true\nproto(proto(o)).constructor === Error; // true\nproto(proto(proto(o))).constructor === Object; // true\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Object/prototype/hasOwnProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.hasOwnProperty()\n\nThe **`hasOwnProperty()`** method returns a boolean indicating whether the\nobject has the specified property as its own property (as opposed to inheriting\nit).\n\n> **Note:** [`Object.hasOwn()`](../../../globals/Object/hasOwn.mdx) is recommended over\n> `hasOwnProperty()`, in browsers where it is supported.\n\n## Syntax\n\n```js\nhasOwnProperty(prop)\n```\n\n### Parameters\n\n- `prop`\n  - : The `String` name or `Symbol` of the property to test.\n\n### Return value\n\nReturns `true` if the object has the specified property as own property; `false`\notherwise.\n\n## Description\n\nThe **`hasOwnProperty()`** method returns `true` if the specified property is a\ndirect property of the object — even if the value is `null` or `undefined`. The\nmethod returns `false` if the property is inherited, or has not been declared at\nall. Unlike the `in` operator, this\nmethod does not check for the specified property in the object's prototype\nchain.\n\nThe method can be called on _most_ JavaScript objects, because most objects\ndescend from `Object`, and hence inherit its methods. For\nexample `Array` is an `Object`, so you can\nuse `hasOwnProperty()` method to check whether an index exists:\n\n```js\nconst fruits = ['Apple', 'Banana','Watermelon', 'Orange'];\nfruits.hasOwnProperty(3);   // true ('Orange')\nfruits.hasOwnProperty(4);   // false - not defined\n```\n\nThe method will not be available in objects where it is reimplemented, or on\nobjects created using `Object.create(null)` (as these don't inherit from\n`Object.prototype`). Examples for these cases are given below.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Object/prototype/isPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.isPrototypeOf()\n\nThe **`isPrototypeOf()`** method checks if an object exists in another object's prototype chain.\n\n> **Note:** `isPrototypeOf()` differs from the [`instanceof`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/instanceof) operator. In the expression `object instanceof AFunction`, `object`'s prototype chain is checked against `AFunction.prototype`, not against `AFunction` itself.\n\n## Syntax\n\n```js\nisPrototypeOf(object)\n```\n\n### Parameters\n\n- `object`\n  - : The object whose prototype chain will be searched.\n\n### Return value\n\nA boolean indicating whether the calling object (`this`) lies in the prototype chain of `object`. Directly returns `false` when `object` is not an object (i.e. a primitive).\n\n### Errors thrown\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown if `this` is `null` or `undefined` (because it can't be [converted to an object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#object_coercion)).\n\n## Description\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `isPrototypeOf()` method. This method allows you to check whether or not the object exists within another object's prototype chain. If the `object` passed as the parameter is not an object (i.e. a primitive), the method directly returns `false`. Otherwise, the `this` value is [converted to an object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#object_coercion), and the prototype chain of `object` is searched for the `this` value, until the end of the chain is reached or the `this` value is found.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Object/prototype/propertyIsEnumerable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.propertyIsEnumerable()\n\nThe **`propertyIsEnumerable()`** method returns a boolean indicating whether the specified property is the object's [enumerable own](https://developer.mozilla.org/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) property.\n\n## Syntax\n\n```js\npropertyIsEnumerable(prop)\n```\n\n### Parameters\n\n- `prop`\n  - : The name of the property to test. Can be a string or a `Symbol`.\n\n### Return value\n\nA boolean value indicating whether the specified property is enumerable and is the object's own property.\n\n## Description\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `propertyIsEnumerable()` method. This method determines if the specified property, string or symbol, is an enumerable own property of the object. If the object does not have the specified property, this method returns `false`.\n\nThis method is equivalent to [`Object.getOwnPropertyDescriptor(obj, prop)?.enumerable ?? false`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Object/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string representing the object. This method is meant to be overridden by derived objects for locale-specific purposes.\n\n## Syntax\n\n```js\ntoLocaleString()\n```\n\n### Parameters\n\nNone. However, all objects that override this method are expected to accept at most two parameters, corresponding to `locales` and `options`, such as [`Date.prototype.toLocaleString()`](../../../globals/Date/prototype/toLocaleString.mdx). The parameter positions should not be used for any other purpose.\n\n### Return value\n\nThe return value of calling `this.toString()`.\n\n## Description\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `toLocaleString()` method. `Object`'s `toLocaleString` returns the result of calling [`this.toString()`](../../../globals/Object/prototype/toString.mdx).\n\nThis function is provided to give objects a generic `toLocaleString` method, even though not all may use it. In the core language, these built-in objects override `toLocaleString` to provide locale-specific formatting:\n\n- `Array`: [`Array.prototype.toLocaleString()`](../../../globals/Array/prototype/toLocaleString.mdx)\n- `Number`: [`Number.prototype.toLocaleString()`](../../../globals/Number/prototype/toLocaleString.mdx)\n- `Date`: [`Date.prototype.toLocaleString()`](../../../globals/Date/prototype/toLocaleString.mdx)\n- `BigInt`: [`BigInt.prototype.toLocaleString()`](../../../globals/BigInt/prototype/toLocaleString.mdx)\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Object/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.toString()\n\nThe **`toString()`** method returns a string representing the object. This method is meant to be overridden by derived objects for custom [type conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) logic.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nBy default `toString()` takes no parameters. However, objects that inherit from `Object` may override it with their own implementations that do take parameters. For example, the [`Number.prototype.toString()`](../../../globals/Number/prototype/toString.mdx) and [`BigInt.prototype.toString()`](../../../globals/BigInt/prototype/toString.mdx) methods take an optional `radix` parameter.\n\n### Return value\n\nA string representing the object.\n\n## Description\n\nJavaScript calls the `toString` method to [convert an object to a primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion). You rarely need to invoke the `toString` method yourself; JavaScript automatically invokes it when encountering an object where a primitive value is expected.\n\nThis method is called in priority by [string conversion](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion), but [numeric conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#numeric_coercion) and [primitive conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion) call `valueOf()` in priority. However, because the base [`valueOf()`](../../../globals/Object/prototype/valueOf.mdx) method returns an object, the `toString()` method is usually called in the end, unless the object overrides `valueOf()`. For example, `+[1]` returns `1`, because its [`toString`](../../../globals/Array/prototype/toString.mdx) method returns `\"1\"`, which is then converted to a number.\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `toString()` method. When you create a custom object, you can override `toString()` to call a custom method, so that your custom object can be converted to a string value. Alternatively, you can add a [`Symbol.toPrimitive`](../../../globals/Symbol/toPrimitive.mdx) method, which allows even more control over the conversion process, and will always be preferred over `valueOf` or `toString` for any type conversion.\n\nTo use the base `Object.prototype.toString()` with an object that has it overridden (or to invoke it on `null` or `undefined`), you need to call [`Function.prototype.call()`](../../../globals/Function/prototype/call.mdx) or [`Function.prototype.apply()`](../../../globals/Function/prototype/apply.mdx) on it, passing the object you want to inspect as the first parameter (called `thisArg`).\n\n```js\nconst arr = [1, 2, 3];\n\narr.toString(); // \"1,2,3\"\nObject.prototype.toString.call(arr); // \"[object Array]\"\n```\n\n`Object.prototype.toString()` returns `\"[object Type]\"`, where `Type` is the object type. If the object has a [`Symbol.toStringTag`](../../../globals/Symbol/toStringTag.mdx) property whose value is a string, that value will be used as the `Type`. Many built-in objects, including [`Map`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map) and [`Symbol`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol), have a `Symbol.toStringTag`. Some objects predating ES6 do not have `Symbol.toStringTag`, but have a special tag nonetheless. They include (the tag is the same as the type name given below):\n\n- [`Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\n- [`Function`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions) (anything whose [`typeof`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/typeof) returns `\"function\"`)\n- [`Error`](../../../globals/Error/Error.mdx)\n- [`Boolean`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)\n- [`Number`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)\n- [`String`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\n- [`Date`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date)\n- [`RegExp`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp)\n\nThe [`arguments`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/arguments) object returns `\"[object Arguments]\"`. Everything else, including user-defined classes, unless with a custom `Symbol.toStringTag`, will return `\"[object Object]\"`.\n\n`Object.prototype.toString()` invoked on [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) returns `[object Null]` and `[object Undefined]`, respectively.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Object/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.valueOf()\n\nThe **`valueOf()`** method of `Object` converts the `this` value [to an object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#object_coercion). This method is meant to be overridden by derived objects for custom [type conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) logic.\n\n\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nThe `this` value, converted to an object.\n\n> **Note:** In order for `valueOf` to be useful during type conversion, it must return a primitive. Because all primitive types have their own `valueOf()` methods, calling `aPrimitiveValue.valueOf()` generally does not invoke `Object.prototype.valueOf()`.\n\n## Description\n\nJavaScript calls the `valueOf` method to [convert an object to a primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion). You rarely need to invoke the `valueOf` method yourself; JavaScript automatically invokes it when encountering an object where a primitive value is expected.\n\nThis method is called in priority by [numeric conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#numeric_coercion) and [primitive conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion), but [string conversion](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) calls `toString()` in priority, and `toString()` is very likely to return a string value (even for the [`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx) base implementation), so `valueOf()` is usually not called in this case.\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `toString()` method. The `Object.prototype.valueOf()` base implementation is deliberately useless: by returning an object, its return value will never be used by any [primitive conversion algorithm](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion). Many built-in objects override this method to return an appropriate primitive value. When you create a custom object, you can override `valueOf()` to call a custom method, so that your custom object can be converted to a primitive value. Generally, `valueOf()` is used to return a value that is most meaningful for the object — unlike `toString()`, it does not need to be a string. Alternatively, you can add a [`Symbol.toPrimitive`](../../../globals/Symbol/toPrimitive.mdx) method, which allows even more control over the conversion process, and will always be preferred over `valueOf` or `toString` for any type conversion.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Object/seal.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.seal()\n\nThe **`Object.seal()`** method _seals_ an object. Sealing an object [prevents extensions](../../globals/Object/preventExtensions.mdx) and makes existing properties non-configurable. A sealed object has a fixed set of properties: new properties cannot be added, existing properties cannot be removed, their enumerability and configurability cannot be changed, and its prototype cannot be re-assigned. Values of existing properties can still be changed as long as they are writable. `seal()` returns the same object that was passed in.\n\n## Syntax\n\n```js\nObject.seal(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be sealed.\n\n### Return value\n\nThe object being sealed.\n\n## Description\n\nSealing an object is equivalent to [preventing extensions](../../globals/Object/preventExtensions.mdx) and then changing all existing properties' descriptors to `configurable: false`. This has the effect of making the set of properties on the object fixed. Making all properties non-configurable\nalso prevents them from being converted from data properties to accessor properties and\nvice versa, but it does not prevent the values of data properties from being changed.\nAttempting to delete or add properties to a sealed object, or to convert a data property\nto accessor or vice versa, will fail, either silently or by throwing a\n[`TypeError`](../../globals/TypeError/TypeError.mdx) (most commonly, although not exclusively, when in \"strict mode\" code).\n\nThe prototype chain remains untouched. However, due to the effect of [preventing extensions](../../globals/Object/preventExtensions.mdx), the `[[Prototype]]` cannot be reassigned.\n\nUnlike [`Object.freeze()`](../../globals/Object/freeze.mdx), objects sealed with `Object.seal()` may have their existing\nproperties changed, as long as they are writable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Object/setPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.setPrototypeOf()\n\nThe **`Object.setPrototypeOf()`** method sets the prototype (i.e., the internal `[[Prototype]]` property) of a specified object to another object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null).\n\n> **Warning:** Changing the `[[Prototype]]` of an object is, by the nature of how modern JavaScript engines optimize property accesses, currently a very slow operation in every browser and JavaScript engine. In addition, the effects of altering inheritance are subtle and far-flung, and are not limited to the time spent in the `Object.setPrototypeOf(...)` statement, but may extend to **_any_** code that has access to any object whose `[[Prototype]]` has been altered. You can read more in [JavaScript engine fundamentals: optimizing prototypes](https://mathiasbynens.be/notes/prototypes).\n>\n> Because this feature is a part of the language, it is still the burden on engine developers to implement that feature performantly (ideally). Until engine developers address this issue, if you are concerned about performance, you should avoid setting the `[[Prototype]]` of an object. Instead, create a new object with the desired `[[Prototype]]` using [`Object.create()`](../../globals/Object/create.mdx).\n\n## Syntax\n\n```js\nObject.setPrototypeOf(obj, prototype)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which is to have its prototype set.\n- `prototype`\n  - : The object's new prototype (an object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null)).\n\n### Return value\n\nThe specified object.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if one of the following conditions is met:\n    - The `obj` parameter is [non-extensible](../../globals/Object/isExtensible.mdx), or it's an [immutable prototype exotic object](https://tc39.es/ecma262/#sec-immutable-prototype-exotic-objects), such as `Object.prototype`.\n    - The `prototype` parameter is not an object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null).\n\n## Description\n\n`Object.setPrototypeOf()` is generally considered the proper way to set the prototype of an object.\n\nIf the `obj` parameter is not an object (e.g. number, string, etc.), this method does nothing.\n\nFor security concerns, there are certain built-in objects that are designed to have an _immutable prototype_. This prevents prototype pollution attacks, especially [proxy-related ones](https://github.com/tc39/ecma262/issues/272). The core language only specifies `Object.prototype` as an immutable prototype exotic object, whose prototype is always `null`.\n\n```js\nObject.isExtensible(Object.prototype); // true; you can add more properties\nObject.setPrototypeOf(Object.prototype, {}); // TypeError: Immutable prototype object '#<Object>' cannot have their prototype set\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Object/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.values()\n\nThe **`Object.values()`** method returns an array of a given object's own enumerable string-keyed property values.\n\n## Syntax\n\n```js\nObject.values(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : An object.\n\n### Return value\n\nAn array containing the given object's own enumerable string-keyed property values.\n\n## Description\n\n`Object.values()` returns an array whose elements are strings corresponding to the enumerable string-keyed property values found directly upon `object`. This is the same as iterating with a `for...in` loop, except that a `for...in` loop enumerates properties in the prototype chain as well. The order of the array returned by `Object.values()` is the same as that provided by a `for...in` loop.\n\nIf you need the property keys, use [`Object.keys()`](../../globals/Object/keys.mdx) instead. If you need both the property keys and values, use [`Object.entries()`](../../globals/Object/entries.mdx) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Promise/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get Promise[Symbol.species]\n\nThe **`Promise[Symbol.species]`** accessor property returns the constructor used to construct return values from promise methods.\n\n> **Warning:** The existence of `Symbol.species` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Syntax\n\n```js\nPromise[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct return values from promise chaining methods that create new promises.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `Promise` objects. Subclass constructors may override it to change the constructor assignment. The default implementation is basically:\n\n```js\n// Hypothetical underlying implementation for illustration\nclass Promise {\n  static get [Symbol.species]() {\n    return this;\n  }\n}\n```\n\nBecause of this polymorphic implementation, `Symbol.species` of derived subclasses would also return the constructor itself by default.\n\n```js\nclass SubPromise extends Promise {}\nSubPromise[Symbol.species] === Promise; // true\n```\n\nPromise chaining methods — [`then()`](../../globals/Promise/prototype/then.mdx), [`finally()`](../../globals/Promise/prototype/finally.mdx) — return new promise objects. They get the constructor to construct the new promise through `this.constructor[Symbol.species]`. If `this.constructor` is `undefined`, or if `this.constructor[Symbol.species]` is `undefined` or `null`, the default [`Promise()`](../../globals/Promise/Promise.mdx) constructor is used. Otherwise, the constructor returned by `this.constructor[Symbol.species]` is used to construct the new promise object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Promise/Promise.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise()\n\nThe **`Promise()`** constructor is primarily used to wrap functions that do not already support promises.\n\n## Syntax\n\n```js\nnew Promise(executor)\n```\n\n> **Note:** `Promise()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `executor`\n  - : A `function` to be executed by the constructor. It receives two functions as parameters: `resolveFunc` and `rejectFunc`. Any errors thrown in the `executor` will cause the promise to be rejected, and the return value will be neglected. The semantics of `executor` are detailed below.\n\n### Return value\n\nWhen called via `new`, the `Promise` constructor returns a promise object. The promise object will become _resolved_ when either of the functions `resolveFunc` or `rejectFunc` are invoked. Note that if you call `resolveFunc` or `rejectFunc` and pass another `Promise` object as an argument, it can be said to be \"resolved\", but still not \"settled\". See the [Promise description](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#description) for more explanation.\n\n## Description\n\nTraditionally (before promises), asynchronous tasks were designed as callbacks.\n\n```js\nreadFile(\"./data.txt\", (error, result) => {\n  // This callback will be called when the task is done, with the\n  // final `error` or `result`. Any operation dependent on the\n  // result must be defined within this callback.\n});\n// Code here is immediately executed after the `readFile` request\n// is fired. It does not wait for the callback to be called, hence\n// making `readFile` \"asynchronous\".\n```\n\nTo take advantage of the readability improvement and language features offered by promises, the `Promise()` constructor allows one to transform the callback-based API to a promise-based one.\n\n> **Note:** If your task is already promise-based, you likely do not need the `Promise()` constructor.\n\nThe `executor` is custom code that ties an outcome in a callback to a promise. You, the programmer, write the `executor`. Its signature is expected to be:\n\n```js\nfunction executor(resolveFunc, rejectFunc) {\n  // Typically, some asynchronous operation that accepts a callback,\n  // like the `readFile` function above\n}\n```\n\n`resolveFunc` and `rejectFunc` are also functions, and you can give them whatever actual names you want. Their signatures are simple: they accept a single parameter of any type.\n\n```js\nresolveFunc(value); // call on resolved\nrejectFunc(reason); // call on rejected\n```\n\nThe `value` parameter passed to `resolveFunc` can be another promise object, in which case the newly constructed promise's state will be \"locked in\" to the promise passed (as part of the [resolution](#resolver-function) promise). The `rejectFunc` has semantics close to the [`throw`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/throw) statement, so `reason` is typically an [`Error`](../../globals/Error/Error.mdx) instance. If either `value` or `reason` is omitted, the promise is fulfilled/rejected with `undefined`.\n\nThe `executor`'s completion state has limited effect on the promise's state:\n\n- The `executor` return value is ignored. `return` statements within the `executor` merely impact control flow and alter whether a part of the function is executed, but do not have any impact on the promise's fulfillment value. If `executor` exits and it's impossible for `resolveFunc` or `rejectFunc` to be called in the future (for example, there are no async tasks scheduled), then the promise remains pending forever.\n- If an error is thrown in the `executor`, the promise is rejected, unless `resolveFunc` or `rejectFunc` has already been called.\n\n> **Note:** The existence of pending promises does not prevent the program from exiting. If the event loop is empty, the program exits despite any pending promises (because those are necessarily forever-pending).\n\nHere's a summary of the typical flow:\n\n1. At the time when the constructor generates the new `Promise` object, it also generates a corresponding pair of functions for `resolveFunc` and `rejectFunc`; these are \"tethered\" to the `Promise` object.\n2. `executor` typically wraps some asynchronous operation which provides a callback-based API. The callback (the one passed to the original callback-based API) is defined within the `executor` code, so it has access to the `resolveFunc` and `rejectFunc`.\n3. The `executor` is called synchronously (as soon as the `Promise` is constructed) with the `resolveFunc` and `rejectFunc` functions as arguments.\n4. The code within the `executor` has the opportunity to perform some operation. The eventual completion of the asynchronous task is communicated with the promise instance via the side effect caused by `resolveFunc` or `rejectFunc`. The side effect is that the `Promise` object becomes \"resolved\".\n   - If `resolveFunc` is called first, the value passed will be [resolved](#resolver-function). The promise may stay pending (in case another [thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) is passed), become fulfilled (in most cases where a non-thenable value is passed), or become rejected (in case of an invalid resolution value).\n   - If `rejectFunc` is called first, the promise instantly becomes rejected.\n   - Once one of the resolving functions (`resolveFunc` or `rejectFunc`) is called, the promise stays resolved. Only the first call to `resolveFunc` or `rejectFunc` affects the promise's eventual state, and subsequent calls to either function can neither change the fulfillment value/rejection reason nor toggle its eventual state from \"fulfilled\" to \"rejected\" or opposite.\n   - If `executor` exits by throwing an error, then the promise is rejected. However, the error is ignored if one of the resolving functions has already been called (so that the promise is already resolved).\n   - Resolving the promise does not necessarily cause the promise to become fulfilled or rejected (i.e. settled). The promise may still be pending because it's resolved with another thenable, but its eventual state will match that of the resolved thenable.\n5. Once the promise settles, it (asynchronously) invokes any further handlers associated through [`Promise.prototype.then`](../../globals/Promise/prototype/then.mdx), [`Promise.prototype.catch`](../../globals/Promise/prototype/catch.mdx), or [`Promise.prototype.finally`](../../globals/Promise/prototype/finally.mdx). The eventual fulfillment value or rejection reason is passed to the invocation of fulfillment and rejection handlers as an input parameter (see [Chained Promises](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#chained_promises)).\n\nFor example, the callback-based `readFile` API above can be transformed into a promise-based one.\n\n```js\nconst readFilePromise = (path) =>\n  new Promise((resolve, reject) => {\n    readFile(path, (error, result) => {\n      if (error) {\n        reject(error);\n      } else {\n        resolve(result);\n      }\n    });\n  });\n\nreadFilePromise(\"./data.txt\")\n  .then((result) => console.log(result))\n  .catch((error) => console.error(\"Failed to read data\"));\n```\n\n### Resolver function\n\nThe resolver function `resolveFunc` has the following behaviors:\n\n- If it's called with the same value as the newly created promise (the promise it's \"tethered to\"), the promise is rejected with a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n- If it's called with a non-[thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) value (a primitive, or an object whose `then` property is not callable, including when the property is not present), the promise is immediately fulfilled with that value.\n- If it's called with a thenable value (including another `Promise` instance), then the thenable's `then` method is saved and called in the future (it's always called asynchronously). The `then` method will be called with two callbacks, which are two new functions with the exact same behaviors as the `resolveFunc` and `rejectFunc` passed to the `executor` function. If calling the `then` method throws, then the current promise is rejected with the thrown error.\n\nIn the last case, it means code like:\n\n```js\nnew Promise((resolve, reject) => {\n  resolve(thenable);\n});\n```\n\nIs roughly equivalent to:\n\n```js\nnew Promise((resolve, reject) => {\n  try {\n    thenable.then(\n      (value) => resolve(value),\n      (reason) => reject(reason),\n    );\n  } catch (e) {\n    reject(e);\n  }\n});\n```\n\nExcept that in the `resolve(thenable)` case:\n\n1. `resolve` is called synchronously, so that calling `resolve` or `reject` again has no effect, even when the handlers attached through `anotherPromise.then()` are not called yet.\n2. The `then` method is called asynchronously, so that the promise will never be instantly resolved if a thenable is passed.\n\nBecause `resolve` is called again with whatever `thenable.then()` passes to it as `value`, the resolver function is able to flatten nested thenables, where a thenable calls its `onFulfilled` handler with another thenable. The effect is that the fulfillment handler of a real promise will never receive a thenable as its fulfillment value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Promise/all.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.all()\n\nThe **`Promise.all()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise fulfills when all of the input's promises fulfill (including when an empty iterable is passed), with an array of the fulfillment values. It rejects when any of the input's promises rejects, with this first rejection reason.\n\n## Syntax\n\n```js\nPromise.all(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array` of promises.\n\n### Return value\n\nA `Promise` that is:\n\n- **Already fulfilled**, if the `iterable` passed is empty.\n- **Asynchronously fulfilled**, when all the promises in the given `iterable` fulfill. The fulfillment value is an array of fulfillment values, in the order of the promises passed, regardless of completion order. If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) fulfilled.\n- **Asynchronously rejected**, when any of the promises in the given `iterable` rejects. The rejection reason is the rejection reason of the first promise that was rejected.\n\n## Description\n\nThe `Promise.all()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. It can be useful for aggregating the results of multiple promises. It is typically used when there are multiple related asynchronous tasks that the overall code relies on to work successfully — all of whom we want to fulfill before the code execution continues.\n\n`Promise.all()` will reject immediately upon **any** of the input promises rejecting. In comparison, the promise returned by [`Promise.allSettled()`](../../globals/Promise/allSettled.mdx) will wait for all input promises to complete, regardless of whether or not one rejects. Use `allSettled()` if you need the final result of every promise in the input iterable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Promise/allSettled.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.allSettled()\n\nThe **`Promise.allSettled()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise fulfills when all of the input's promises settle (including when an empty iterable is passed), with an array of objects that describe the outcome of each promise.\n\n## Syntax\n\n```js\nPromise.allSettled(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array` of promises.\n\n### Return value\n\nA `Promise` that is:\n\n- **Already fulfilled**, if the `iterable` passed is empty.\n- **Asynchronously fulfilled**, when all promise in the given `iterable` have settled (either fulfilled or rejected). The fulfillment value is an array of objects, each describing the outcome of one promise in the `iterable`, in the order of the promises passed, regardless of completion order. Each outcome object has the following properties:\n\n  - `status`\n    - : A string, either `\"fulfilled\"` or `\"rejected\"`, indicating the eventual state of the promise.\n  - `value`\n    - : Only present if `status` is `\"fulfilled\"`. The value that the promise was fulfilled with.\n  - `reason`\n    - : Only present if `status` is `\"rejected\"`. The reason that the promise was rejected with.\n\n  If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) fulfilled.\n\n## Description\n\nThe `Promise.allSettled()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. `Promise.allSettled()` is typically used when you have multiple asynchronous tasks that are not dependent on one another to complete successfully, or you'd always like to know the result of each promise.\n\nIn comparison, the Promise returned by [`Promise.all()`](../../globals/Promise/all.mdx) may be more appropriate if the tasks are dependent on each other, or if you'd like to immediately reject upon any of them rejecting.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Promise/any.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.any()\n\nThe **`Promise.any()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise fulfills when any of the input's promises fulfills, with this first fulfillment value. It rejects when all of the input's promises reject (including when an empty iterable is passed), with an `AggregateError` containing an array of rejection reasons.\n\n## Syntax\n\n```js\nPromise.any(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array` of promises.\n\n### Return value\n\nA `Promise` that is:\n\n- **Already rejected**, if the `iterable` passed is empty.\n- **Asynchronously fulfilled**, when any of the promises in the given `iterable` fulfills. The fulfillment value is the fulfillment value of the first promise that was fulfilled.\n- **Asynchronously rejected**, when all of the promises in the given `iterable` reject. The rejection reason is an `AggregateError` containing an array of rejection reasons in its `errors` property. The errors are in the order of the promises passed, regardless of completion order. If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) rejected.\n\n## Description\n\nThe `Promise.any()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. This method is useful for returning the first promise that fulfills. It short-circuits after a promise fulfills, so it does not wait for the other promises to complete once it finds one.\n\nUnlike [`Promise.all()`](../../globals/Promise/all.mdx), which returns an _array_ of fulfillment values, we only get one fulfillment value (assuming at least one promise fulfills). This can be beneficial if we need only one promise to fulfill but we do not care which one does. Note another difference: this method rejects upon receiving an _empty iterable_, since, truthfully, the iterable contains no items that fulfill. You may compare `Promise.any()` and `Promise.all()` with [`Array.prototype.some()`](../../globals/Array/prototype/some.mdx) and [`Array.prototype.every()`](../../globals/Array/prototype/every.mdx).\n\nAlso, unlike [`Promise.race()`](../../globals/Promise/race.mdx), which returns the first _settled_ value (either fulfillment or rejection), this method returns the first _fulfilled_ value. This method ignores all rejected promises up until the first promise that fulfills.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Promise/prototype/catch.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.prototype.catch()\n\nThe **`catch()`** method of a `Promise` object schedules a function to be called when the promise is rejected. It immediately returns an equivalent `Promise` object, allowing you to [chain](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining) calls to other promise methods. It is a shortcut for [`Promise.prototype.then(undefined, onRejected)`](../../../globals/Promise/prototype/then.mdx).\n\n## Syntax\n\n```js\ncatch(onRejected)\n\ncatch((reason) => {\n  // rejection handler\n})\n```\n\n### Parameters\n\n- `onRejected`\n  - : A `Function` called when the `Promise` is rejected. This function has one parameter: the _rejection reason_.\n\n### Return value\n\nReturns a new `Promise`. This new promise is always pending when returned, regardless of the current promise's status. It's eventually rejected if `onRejected` throws an error or returns a Promise which is itself rejected; otherwise, it's eventually fulfilled.\n\n## Description\n\nThe `catch` method is used for error handling in promise composition. Since it returns a `Promise`, it [can be chained](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining_after_a_catch) in the same way as its sister method, [`Promise.prototype.then()`](../../../globals/Promise/prototype/then.mdx).\n\nIf a promise becomes rejected, and there are no rejection handlers to call (a handler can be attached through any of [`Promise.prototype.then`](../../../globals/Promise/prototype/then.mdx), [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx), or [`Promise.prototype.finally`](../../../globals/Promise/prototype/finally.mdx)), then the rejection event is surfaced by the host. In the browser, this results in an [`unhandledrejection`](https://developer.mozilla.org/docs/Web/API/Window/unhandledrejection_event) event. If a handler is attached to a rejected promise whose rejection has already caused an unhandled rejection event, then another [`rejectionhandled`](https://developer.mozilla.org/docs/Web/API/Window/rejectionhandled_event) event is fired.\n\n`catch()` internally calls `then()` on the object upon which it was called, passing `undefined` and `onRejected` as arguments. The value of that call is directly returned. This is observable if you wrap the methods.\n\n```js\n// overriding original Promise.prototype.then/catch just to add some logs\n((Promise) => {\n  const originalThen = Promise.prototype.then;\n  const originalCatch = Promise.prototype.catch;\n\n  Promise.prototype.then = function (...args) {\n    console.log(\"Called .then on %o with arguments: %o\", this, args);\n    return originalThen.apply(this, args);\n  };\n  Promise.prototype.catch = function (...args) {\n    console.error(\"Called .catch on %o with arguments: %o\", this, args);\n    return originalCatch.apply(this, args);\n  };\n})(Promise);\n\n// calling catch on an already resolved promise\nPromise.resolve().catch(function XXX() {});\n\n// Logs:\n// Called .catch on Promise{} with arguments: Arguments{1} [0: function XXX()]\n// Called .then on Promise{} with arguments: Arguments{2} [0: undefined, 1: function XXX()]\n```\n\nThis means that passing `undefined` still causes the returned promise to be rejected, and you have to pass a function to prevent the final promise from being rejected.\n\nBecause `catch()` just calls `then()`, it supports subclassing.\n\n> **Note:** The examples below are throwing instances of [`Error`](../../../globals/Error/Error.mdx). As with synchronous [`throw`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/throw) statements, this is considered a good practice; otherwise, the part doing the catching would have to perform checks to see if the argument was a string or an error, and you might lose valuable information such as stack traces.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Promise/prototype/finally.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.prototype.finally()\n\nThe **`finally()`** method of a `Promise` object schedules a function to be called when the promise is settled (either fulfilled or rejected). It immediately returns an equivalent `Promise` object, allowing you to [chain](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining) calls to other promise methods.\n\nThis lets you avoid duplicating code in both the promise's [`Promise.prototype.then`](../../../globals/Promise/prototype/then.mdx) and [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx) handlers.\n\n## Syntax\n\n```js\nfinally(onFinally)\n\nfinally(() => {\n  // Code that will run after promise is settled (fulfilled or rejected)\n})\n```\n\n### Parameters\n\n- `onFinally`\n  - : A `Function` called when the `Promise` is settled. This handler receives no parameters.\n\n### Return value\n\nReturns an equivalent `Promise`. If the handler throws an error or returns a rejected promise, the promise returned by `finally()` will be rejected with that value instead. Otherwise, the return value of the handler does not affect the state of the original promise.\n\n## Description\n\nThe `finally()` method can be useful if you want to do some processing or cleanup once the promise is settled, regardless of its outcome.\n\nThe `finally()` method is very similar to calling [`then(onFinally, onFinally)`](../../../globals/Promise/prototype/then.mdx). However, there are a couple of differences:\n\n- When creating a function inline, you can pass it once, instead of being forced to either declare it twice, or create a variable for it.\n- The `onFinally` callback does not receive any argument. This use case is for precisely when you _do not care_ about the rejection reason or the fulfillment value, and so there's no need to provide it.\n- A `finally()` call is usually transparent and does not change the eventual state of the original promise. So for example:\n  - Unlike `Promise.resolve(2).then(() => 77, () => {})`, which returns a promise eventually fulfilled with the value `77`, `Promise.resolve(2).finally(() => 77)` returns a promise eventually fulfilled with the value `2`.\n  - Similarly, unlike `Promise.reject(3).then(() => {}, () => 88)`, which returns a promise eventually fulfilled with the value `88`, `Promise.reject(3).finally(() => 88)` returns a promise eventually rejected with the reason `3`.\n\n> **Note:** A `throw` (or returning a rejected promise) in the `finally` callback still rejects the returned promise. For example, both `Promise.reject(3).finally(() => { throw 99; })` and `Promise.reject(3).finally(() => Promise.reject(99))` reject the returned promise with the reason `99`.\n\nLike [`Promise.prototype.catch()`](../../../globals/Promise/prototype/catch.mdx), `finally()` internally calls the `then` method on the object upon which it was called. If `onFinally` is not a function, `then()` is called with `onFinally` as both arguments — which, for [`Promise.prototype.then()`](../../../globals/Promise/prototype/then.mdx), means that no useful handler is attached. Otherwise, `then()` is called with two internally created functions, which behave like the following:\n\n> **Warning:** This is only for demonstration purposes and is not a polyfill.\n\n```js\npromise.then(\n  (value) => Promise.resolve(onFinally()).then(() => value),\n  (reason) =>\n    Promise.resolve(onFinally()).then(() => {\n      throw reason;\n    }),\n);\n```\n\nBecause `finally()` calls `then()`, it supports subclassing. Moreover, notice the [`Promise.resolve()`](../../../globals/Promise/resolve.mdx) call above — in reality, `onFinally()`'s return value is resolved using the same algorithm as `Promise.resolve()`, but the actual constructor used to construct the resolved promise will be the subclass. `finally()` gets this constructor through [`promise.constructor[Symbol.species]`](../../../globals/Promise/@@species.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Promise/prototype/then.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.prototype.then()\n\nThe **`then()`** method of a `Promise` object takes up to two arguments: callback functions for the fulfilled and rejected cases of the `Promise`. It immediately returns an equivalent `Promise` object, allowing you to [chain](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining) calls to other promise methods.\n\n## Syntax\n\n```js\nthen(onFulfilled)\nthen(onFulfilled, onRejected)\n\nthen(\n  (value) => { /* fulfillment handler */ },\n  (reason) => { /* rejection handler */ },\n)\n```\n\n### Parameters\n\n- `onFulfilled` _**optional**_\n  - : A `Function` asynchronously called if the `Promise` is fulfilled. This function has one parameter, the _fulfillment value_. If it is not a function, it is internally replaced with an _identity_ function (`(x) => x`) which simply passes the fulfillment value forward.\n- `onRejected` _**optional**_\n  - : A `Function` asynchronously called if the `Promise` is rejected. This function has one parameter, the _rejection reason_. If it is not a function, it is internally replaced with a _thrower_ function (`(x) => { throw x; }`) which throws the rejection reason it received.\n\n### Return value\n\nReturns a new `Promise` immediately. This new promise is always pending when returned, regardless of the current promise's status.\n\nOne of the `onFulfilled` and `onRejected` handlers will be executed to handle the current promise's fulfillment or rejection. The call always happens asynchronously, even when the current promise is already settled. The behavior of the returned promise (call it `p`) depends on the handler's execution result, following a specific set of rules. If the handler function:\n\n- returns a value: `p` gets fulfilled with the returned value as its value.\n- doesn't return anything: `p` gets fulfilled with `undefined`.\n- throws an error: `p` gets rejected with the thrown error as its value.\n- returns an already fulfilled promise: `p` gets fulfilled with that promise's value as its value.\n- returns an already rejected promise: `p` gets rejected with that promise's value as its value.\n- returns another pending promise: the fulfillment/rejection of the promise returned by `then` will be subsequent to the resolution/rejection of the promise returned by the handler. Also, the resolved value of the promise returned by `then` will be the same as the resolved value of the promise returned by the handler.\n\n## Description\n\nThe `then()` method schedules callback functions for the eventual completion of a Promise — either fulfillment or rejection. It is the primitive method of promises: the [thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) protocol expects all promise-like objects to expose a `then()` method, and the [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx) and [`Promise.prototype.finally`](../../../globals/Promise/prototype/finally.mdx) methods both work by invoking the object's `then()` method.\n\nFor more information about the `onRejected` handler, see the [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx) reference.\n\n`then()` returns a new promise object. If you call the `then()` method twice on the same promise object (instead of chaining), then this promise object will have two pairs of settlement handlers. All handlers attached to the same promise object are always called in the order they were added. Moreover, the two promises returned by each call of `then()` start separate chains and do not wait for each other's settlement.\n\n[Thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) objects that arise along the `then()` chain are always [resolved](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise/Promise#the_resolver_function) — the `onFulfilled` handler never receives a thenable object, and any thenable returned by either handler are always resolved before being passed to the next handler. This is because when constructing the new promise, the `resolve` and `reject` functions passed by the `executor` are saved, and when the current promise settles, the respective function will be called with the fulfillment value or rejection reason. The resolving logic comes from the resolver function passed by the [`Promise()`](../../../globals/Promise/Promise.mdx) constructor.\n\n`then()` supports subclassing, which means it can be called on instances of subclasses of `Promise`, and the result will be a promise of the subclass type. You can customize the type of the return value through the [`[Symbol.species]`](../../../globals/Promise/@@species.mdx) property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Promise/race.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.race()\n\nThe **`Promise.race()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise settles with the eventual state of the first promise that settles.\n\n## Syntax\n\n```js\nPromise.race(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array`) of promises.\n\n### Return value\n\nA `Promise` that **asynchronously settles** with the eventual state of the first promise in the `iterable` to settle. In other words, it fulfills if the first promise to settle is fulfilled, and rejects if the first promise to settle is rejected. The returned promise remains pending forever if the `iterable` passed is empty. If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) settled.\n\n## Description\n\nThe `Promise.race()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. It's useful when you want the first async task to complete, but do not care about its eventual state (i.e. it can either succeed or fail).\n\nIf the iterable contains one or more non-promise values and/or an already settled promise, then `Promise.race()` will settle to the first of these values found in the iterable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Promise/reject.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.reject()\n\nThe **`Promise.reject()`** method returns a `Promise` object that is rejected with a given reason.\n\n## Syntax\n\n```js\nPromise.reject(reason)\n```\n\n### Parameters\n\n- `reason`\n  - : Reason why this `Promise` rejected.\n\n### Return value\n\nA `Promise` that is rejected with the given reason.\n\n## Description\n\nThe static `Promise.reject` function returns a `Promise` that is rejected. For debugging purposes and selective error catching, it is useful to make `reason` an `instanceof` [`Error`](../../globals/Error/Error.mdx).\n\n`Promise.reject()` is generic and supports subclassing, which means it can be called on subclasses of `Promise`, and the result will be a promise of the subclass type. To do so, the subclass's constructor must implement the same signature as the [`Promise()`](../../globals/Promise/Promise.mdx) constructor — accepting a single `executor` function that can be called with the `resolve` and `reject` callbacks as parameters. `Promise.reject()` is essentially a shorthand for `new Promise((resolve, reject) => reject(reason))`.\n\nUnlike [`Promise.resolve()`](../../globals/Promise/resolve.mdx), `Promise.reject()` always wraps `reason` in a new `Promise` object, even when `reason` is already a `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Promise/resolve.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.resolve()\n\nThe **`Promise.resolve()`** method \"resolves\" a given value to a `Promise`. If the value is a promise, that promise is returned; if the value is a [thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables), `Promise.resolve()` will call the `then()` method with two callbacks it prepared; otherwise the returned promise will be fulfilled with the value.\n\nThis function flattens nested layers of promise-like objects (e.g. a promise that fulfills to a promise that fulfills to something) into a single layer — a promise that fulfills to a non-thenable value.\n\n## Syntax\n\n```js\nPromise.resolve(value)\n```\n\n### Parameters\n\n- `value`\n  - : Argument to be resolved by this `Promise`. Can also be a `Promise` or a thenable to resolve.\n\n### Return value\n\nA `Promise` that is resolved with the given value, or the promise passed as value, if the value was a promise object. A resolved promise can be in any of the states — fulfilled, rejected, or pending. For example, resolving a rejected promise will still result in a rejected promise.\n\n## Description\n\n`Promise.resolve()` _resolves_ a promise, which is not the same as fulfilling or rejecting the promise. See [Promise description](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#description) for definitions of the terminology. In brief, `Promise.resolve()` returns a promise whose eventual state depends on another promise, thenable object, or other value.\n\n`Promise.resolve()` is generic and supports subclassing, which means it can be called on subclasses of `Promise`, and the result will be a promise of the subclass type. To do so, the subclass's constructor must implement the same signature as the [`Promise()`](../../globals/Promise/Promise.mdx) constructor — accepting a single `executor` function that can be called with the `resolve` and `reject` callbacks as parameters.\n\n`Promise.resolve()` special-cases native `Promise` instances. If `value` belongs to `Promise` or a subclass, and `value.constructor === Promise`, then `value` is directly returned by `Promise.resolve()`, without creating a new `Promise` instance. Otherwise, `Promise.resolve()` is essentially a shorthand for `new Promise((resolve) => resolve(value))`.\n\nThe bulk of the resolving logic is actually implemented by the [resolver function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise/Promise#the_resolver_function) passed by the `Promise()` constructor. In summary:\n\n- If a non-[thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) value is passed, the returned promise is already fulfilled with that value.\n- If a thenable is passed, the returned promise will adopt the state of that thenable by calling the `then` method and passing a pair of resolving functions as arguments. (But because native promises directly pass through `Promise.resolve()` without creating a wrapper, the `then` method is not called on native promises.) If the resolver function receives another thenable object, it will be resolved agin, so that the eventual fulfillment value of the promise will never be thenable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Proxy/Proxy.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Proxy()\n\nThe **`Proxy()`** constructor is used to create `Proxy` objects.\n\n## Syntax\n\n```js\nnew Proxy(target, handler)\n```\n\n> **Note:** `Proxy()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `target`\n  - : A target object to wrap with `Proxy`. It can be any sort of object,\n    including a native array, a function, or even another proxy.\n- `handler`\n  - : An object whose properties are functions that define the behavior of the proxy when\n    an operation is performed on it.\n\n## Description\n\nUse the `Proxy()` constructor to create a new `Proxy` object.\nThis constructor takes two mandatory arguments:\n\n- `target` is the object for which you want to create the proxy\n- `handler` is the object that defines the custom behavior of the proxy.\n\nAn empty handler will create a proxy that behaves, in almost all respects, exactly like\nthe target. By defining any of a set group of functions on the `handler`\nobject, you can customize specific aspects of the proxy's behavior. For example, by\ndefining `get()` you can provide a customized version of the target's\n[property accessor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Property_Accessors).\n\n### Handler functions\n\nThis section lists all the handler functions you can define. Handler functions are\nsometimes called _traps_, because they trap calls to the underlying target\nobject.\n\n- [`handler.apply()`](../../globals/Proxy/proxy/apply.mdx)\n  - : A trap for a function call.\n- [`handler.construct()`](../../globals/Proxy/proxy/construct.mdx)\n  - : A trap for the `new` operator.\n- [`handler.defineProperty()`](../../globals/Proxy/proxy/defineProperty.mdx)\n  - : A trap for [`Object.defineProperty`](../../globals/Object/defineProperty.mdx).\n- [`handler.deleteProperty()`](../../globals/Proxy/proxy/deleteProperty.mdx)\n  - : A trap for the `delete` operator.\n- [`handler.get()`](../../globals/Proxy/proxy/get.mdx)\n  - : A trap for getting property values.\n- [`handler.getOwnPropertyDescriptor()`)}](../../globals/Proxy/proxy/getOwnPropertyDescriptor.mdx)\n  - : A trap for [`Object.getOwnPropertyDescriptor`](../../globals/Object/getOwnPropertyDescriptor.mdx).\n- [`handler.getPrototypeOf()`](../../globals/Proxy/proxy/getPrototypeOf.mdx)\n  - : A trap for [`Object.getPrototypeOf()`](../../globals/Object/getPrototypeOf.mdx).\n- [`handler.has()`](../../globals/Proxy/proxy/has.mdx)\n  - : A trap for the `in` operator.\n- [`handler.isExtensible()`](../../globals/Proxy/proxy/isExtensible.mdx)\n  - : A trap for [`Object.isExtensible()`](../../globals/Object/isExtensible.mdx).\n- [`handler.ownKeys()`](../../globals/Proxy/proxy/ownKeys.mdx)\n  - : A trap for [`Object.getOwnPropertyNames()`](../../globals/Object/getOwnPropertyNames.mdx) and\n    [`Object.getOwnPropertySymbols()`](../../globals/Object/getOwnPropertySymbols.mdx).\n- [`handler.preventExtensions()`)}](../../globals/Proxy/proxy/preventExtensions.mdx)\n  - : A trap for [`Object.preventExtensions()`](../../globals/Object/preventExtensions.mdx).\n- [`handler.set()`](../../globals/Proxy/proxy/set.mdx)\n  - : A trap for setting property values.\n- [`handler.setPrototypeOf()`](../../globals/Proxy/proxy/setPrototypeOf.mdx)\n  - : A trap for [`Object.setPrototypeOf()`](../../globals/Object/setPrototypeOf.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Proxy/proxy/apply.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.apply()\n\nThe **`handler.apply()`** method is a trap for a function call.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  apply(target, thisArg, argumentsList) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `apply()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target callable object.\n- `thisArg`\n  - : The `this` argument for the call.\n- `argumentsList`\n  - : The list of arguments for the call.\n\n### Return value\n\nThe `apply()` method can return any value.\n\n## Description\n\nThe **`handler.apply()`** method is a trap for a function call.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- Function call: `proxy(...args)`\n- [`Function.prototype.apply()`](../../../globals/Function/prototype/apply.mdx) and [`Function.prototype.call()`](../../../globals/Function/prototype/call.mdx)\n- [`Reflect.apply()`](../../../globals/Reflect/apply.mdx)\n\nOr any other operation that invokes the `[[Call]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The `target` must be a callable itself. That is, it must be a function object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Proxy/proxy/construct.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.construct()\n\nThe **`handler.construct()`** method is a trap for the `new` operator. In order for the new operation to be valid on the resulting Proxy object, the target used to initialize the proxy must itself have a `[[Construct]]` internal method (i.e. `new target` must be valid).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  construct(target, argumentsList, newTarget) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `construct()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `argumentsList`\n  - : The list of arguments for the constructor.\n- `newTarget`\n  - : The constructor that was originally called, `p` above.\n\n### Return value\n\nThe `construct` method must return an object.\n\n## Description\n\nThe **`handler.construct()`** method is a trap for the `new` operator.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- The `new` operator: `new myFunction(...args)`\n- [`Reflect.construct()`](../../../globals/Reflect/construct.mdx)\n\nOr any other operation that invokes the `[[Construct]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The result must be an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Proxy/proxy/defineProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.defineProperty()\n\nThe **`handler.defineProperty()`** method is a trap for\n[`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  defineProperty(target, property, descriptor) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `defineProperty()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property whose description is to be\n    retrieved.\n- `descriptor`\n  - : The descriptor for the property being defined or modified.\n\n### Return value\n\nThe `defineProperty()` method must return a `Boolean` indicating\nwhether or not the property has been successfully defined.\n\n## Description\n\nThe **`handler.defineProperty()`** method is a trap for\n[`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx), [`Object.defineProperties()`](../../../globals/Object/defineProperties.mdx)\n- [`Reflect.defineProperty()`](../../../globals/Reflect/defineProperty.mdx)\n\nOr any other operation that invokes the `[[DefineOwnProperty]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- A property cannot be added, if the target object is not extensible.\n- A property cannot be added as or modified to be non-configurable, if it does not\n  exists as a non-configurable own property of the target object.\n- A property may not be non-configurable, if a corresponding configurable property of\n  the target object exists.\n- If a property has a corresponding target object property then\n  `Object.defineProperty(target, prop, descriptor)`\n  will not throw an exception.\n- In strict mode, a `false` return value from the\n  `defineProperty()` handler will throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Proxy/proxy/deleteProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.deleteProperty()\n\nThe **`handler.deleteProperty()`** method is a trap for the `delete` operator.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  deleteProperty(target, property) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `deleteProperty()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property to delete.\n\n### Return value\n\nThe `deleteProperty()` method must return a `Boolean` indicating\nwhether or not the property has been successfully deleted.\n\n## Description\n\nThe **`handler.deleteProperty()`** method is a trap for the `delete` operator.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- The [`delete`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) operator: `delete proxy[foo]` and\n  `delete proxy.foo`\n- [`Reflect.deleteProperty()`](../../../globals/Reflect/deleteProperty.mdx)\n\nOr any other operation that invokes the `[[Delete]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- A property cannot be deleted, if it exists as a non-configurable own property of the\n  target object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Proxy/proxy/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.get()\n\nThe **`handler.get()`** method is a trap for getting a property\nvalue.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  get(target, property, receiver) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `get()` method. `this`\nis bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property to get.\n- `receiver`\n  - : Either the proxy or an object that inherits from the proxy.\n\n### Return value\n\nThe `get()` method can return any value.\n\n## Description\n\nThe **`handler.get()`** method is a trap for getting a property\nvalue.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- Property access: `proxy[foo]` and `proxy.bar`\n- [`Reflect.get()`](../../../globals/Reflect/get.mdx)\n\nOr any other operation that invokes the `[[Get]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The value reported for a property must be the same as the value of the corresponding\n  target object property if the target object property is a non-writable,\n  non-configurable own data property.\n- The value reported for a property must be undefined if the corresponding target\n  object property is a non-configurable own accessor property that has\n  `undefined` as its `[[Get]]` attribute.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Proxy/proxy/getOwnPropertyDescriptor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.getOwnPropertyDescriptor()\n\nThe **`handler.getOwnPropertyDescriptor()`** method is a trap for [`Object.getOwnPropertyDescriptor()`](../../../globals/Object/getOwnPropertyDescriptor.mdx).\n\n\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  getOwnPropertyDescriptor(target, prop) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `getOwnPropertyDescriptor()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `prop`\n  - : The name of the property whose description should be retrieved.\n\n### Return value\n\nThe `getOwnPropertyDescriptor()` method must return an object or `undefined`.\n\n## Description\n\nThe **`handler.getOwnPropertyDescriptor()`** method is a trap for [`Object.getOwnPropertyDescriptor()`](../../../globals/Object/getOwnPropertyDescriptor.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.getOwnPropertyDescriptor()`](../../../globals/Object/getOwnPropertyDescriptor.mdx)\n- [`Reflect.getOwnPropertyDescriptor()`](../../../globals/Reflect/getOwnPropertyDescriptor.mdx)\n\nOr any other operation that invokes the `[[GetOwnProperty]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `getOwnPropertyDescriptor()` must return an object or `undefined`.\n- A property cannot be reported as non-existent, if it exists as a non-configurable own property of the target object.\n- A property cannot be reported as non-existent, if it exists as an own property of the target object and the target object is not extensible.\n- A property cannot be reported as existent, if it does not exists as an own property of the target object and the target object is not extensible.\n- A property cannot be reported as non-configurable, if it does not exists as an own property of the target object or if it exists as a configurable own property of the target object.\n- The result of `Object.getOwnPropertyDescriptor(target)` can be applied to the target object using `Object.defineProperty()` and will not throw an exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Proxy/proxy/getPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.getPrototypeOf()\n\nThe **`handler.getPrototypeOf()`** method is a trap for the\n`[[GetPrototypeOf]]` internal method.\n\n## Syntax\n\n```js\nnew Proxy(obj, {\n  getPrototypeOf(target) {\n    // …\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `getPrototypeOf()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `getPrototypeOf()` method must return an object or `null`.\n\n## Description\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.getPrototypeOf()`](../../../globals/Object/getPrototypeOf.mdx)\n- [`Reflect.getPrototypeOf()`](../../../globals/Reflect/getPrototypeOf.mdx)\n- [`Object.prototype.isPrototypeOf()`](../../../globals/Object/prototype/isPrototypeOf.mdx)\n- `instanceof`\n\nOr any other operation that invokes the `[[GetPrototypeOf]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `getPrototypeOf()` method must return an object or `null`.\n- If `target` is not extensible,\n  `Object.getPrototypeOf(proxy)` method must return the same\n  value as `Object.getPrototypeOf(target)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Proxy/proxy/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.has()\n\nThe **`handler.has()`** method is a trap for the `in` operator.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  has(target, prop) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to `has()` method. `this` is\nbound to the handler.\n\n- `target`\n  - : The target object.\n- `prop`\n  - : The name or `Symbol` of the property to check for existence.\n\n### Return value\n\nThe `has()` method must return a boolean value.\n\n## Description\n\nThe **`handler.has()`** method is a trap for the `in` operator.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- The [`in`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/in) operator: `foo in proxy`\n- [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) check: `with(proxy) { (foo); }`\n- [`Reflect.has()`](../../../globals/Reflect/has.mdx)\n\nOr any other operation that invokes the `[[HasProperty]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- A property cannot be reported as non-existent, if it exists as a non-configurable\n  own property of the target object.\n- A property cannot be reported as non-existent, if it exists as an own property of\n  the target object and the target object is not extensible.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Proxy/proxy/isExtensible.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.isExtensible()\n\nThe **`handler.isExtensible()`** method is a trap for\n[`Object.isExtensible()`](../../../globals/Object/isExtensible.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  isExtensible(target) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `isExtensible()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `isExtensible()` method must return a boolean value.\n\n## Description\n\nThe **`handler.isExtensible()`** method is a trap for\n[`Object.isExtensible()`](../../../globals/Object/isExtensible.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.isExtensible()`](../../../globals/Object/isExtensible.mdx)\n- [`Reflect.isExtensible()`](../../../globals/Reflect/isExtensible.mdx)\n\nOr any other operation that invokes the `[[IsExtensible]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `Object.isExtensible(proxy)` must return the same value as\n  `Object.isExtensible(target)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Proxy/proxy/ownKeys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.ownKeys()\n\nThe **`handler.ownKeys()`** method is a trap for\n[`Reflect.ownKeys()`](../../../globals/Reflect/ownKeys.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  ownKeys(target) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `ownKeys()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `ownKeys()` method must return an enumerable object.\n\n## Description\n\nThe **`handler.ownKeys()`** method is a trap for\n[`Reflect.ownKeys()`](../../../globals/Reflect/ownKeys.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.getOwnPropertyNames()`](../../../globals/Object/getOwnPropertyNames.mdx)\n- [`Object.getOwnPropertySymbols()`](../../../globals/Object/getOwnPropertySymbols.mdx)\n- [`Object.keys()`](../../../globals/Object/keys.mdx)\n- [`Reflect.ownKeys()`](../../../globals/Reflect/ownKeys.mdx)\n\nOr any other operation that invokes the `[[OwnPropertyKeys]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The result of `ownKeys()` must be an array.\n- The type of each array element is either a `String` or a `Symbol`.\n- The result List must contain the keys of all non-configurable own properties of the\n  target object.\n- If the target object is not extensible, then the result List must contain all the\n  keys of the own properties of the target object and no other values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Proxy/proxy/preventExtensions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.preventExtensions()\n\nThe **`handler.preventExtensions()`** method is a trap for [`Object.preventExtensions()`](../../../globals/Object/preventExtensions.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  preventExtensions(target) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `preventExtensions()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `preventExtensions()` method must return a boolean value.\n\n## Description\n\nThe **`handler.preventExtensions()`** method is a trap for [`Object.preventExtensions()`](../../../globals/Object/preventExtensions.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.preventExtensions()`](../../../globals/Object/preventExtensions.mdx)\n- [`Reflect.preventExtensions()`](../../../globals/Reflect/preventExtensions.mdx)\n- [`Object.seal()`](../../../globals/Object/seal.mdx)\n- [`Object.freeze()`](../../../globals/Object/freeze.mdx)\n\nOr any other operation that invokes the `[[PreventExtensions]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `Object.preventExtensions(proxy)` only returns `true` if `Object.isExtensible(proxy)` is `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Proxy/proxy/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.set()\n\nThe **`handler.set()`** method is a trap for setting a property\nvalue.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  set(target, property, value, receiver) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `set()` method. `this`\nis bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property to set.\n- `value`\n  - : The new value of the property to set.\n- `receiver`\n\n  - : The object to which the assignment was originally directed. This is usually the\n    proxy itself. But a `set()` handler can also be called indirectly, via\n    the prototype chain or various other ways.\n\n    For example, suppose a script does\n    `obj.name = \"jen\"`, and `obj` is not a\n    proxy, and has no own property `.name`, but it has a proxy on its\n    prototype chain. That proxy's `set()` handler will be called, and\n    `obj` will be passed as the receiver.\n\n### Return value\n\nThe `set()` method should return a boolean value.\n\n- Return `true` to indicate that assignment succeeded.\n- If the `set()` method returns `false`, and the assignment\n  happened in strict-mode code, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) will be thrown.\n\n## Description\n\nThe **`handler.set()`** method is a trap for setting property\nvalue.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- Property assignment: `proxy[foo] = bar` and `proxy.foo = bar`\n- [`Reflect.set()`](../../../globals/Reflect/set.mdx)\n\nOr any other operation that invokes the `[[Set]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- Cannot change the value of a property to be different from the value of the\n  corresponding target object property if the corresponding target object property is a\n  non-writable, non-configurable data property.\n- Cannot set the value of a property if the corresponding target object property is a\n  non-configurable accessor property that has `undefined` as its\n  `[[Set]]` attribute.\n- In strict mode, a `false` return value from the `set()`\n  handler will throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Proxy/proxy/setPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.setPrototypeOf()\n\nThe **`handler.setPrototypeOf()`** method is a trap for\n[`Object.setPrototypeOf()`](../../../globals/Object/setPrototypeOf.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  setPrototypeOf(target, prototype) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `setPrototypeOf()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `prototype`\n  - : The object's new prototype or `null`.\n\n### Return value\n\nThe `setPrototypeOf()` method returns `true` if the\n`[[Prototype]]` was successfully changed, otherwise `false`.\n\n## Description\n\nThe **`handler.setPrototypeOf()`** method is a trap for\n[`Object.setPrototypeOf()`](../../../globals/Object/setPrototypeOf.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.setPrototypeOf()`](../../../globals/Object/setPrototypeOf.mdx)\n- [`Reflect.setPrototypeOf()`](../../../globals/Reflect/setPrototypeOf.mdx)\n\nOr any other operation that invokes the `[[SetPrototypeOf]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- If `target` is not extensible, the `prototype`\n  parameter must be the same value as\n  `Object.getPrototypeOf(target)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Proxy/revocable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Proxy.revocable()\n\nThe **`Proxy.revocable()`** static method creates a revocable `Proxy` object.\n\n## Syntax\n\n```js\nProxy.revocable(target, handler)\n```\n\n### Parameters\n\n- `target`\n  - : A target object to wrap with `Proxy`. It can be any sort of object, including a native array, a function, or even another proxy.\n- `handler`\n  - : An object whose properties are functions defining the behavior of `proxy` when an operation is performed on it.\n\n### Return value\n\nA plain object with the following two properties:\n\n- `proxy`\n  - : A Proxy object exactly the same as one created with a [`new Proxy(target, handler)`](../../globals/Proxy/Proxy.mdx) call.\n- `revoke`\n  - : A function with no parameters to revoke (switch off) the `proxy`.\n\n## Description\n\nThe `Proxy.revocable()` factory function is the same as the [`Proxy()`](../../globals/Proxy/Proxy.mdx) constructor, except that in addition to creating a proxy object, it also creates a `revoke` function that can be called to disable the proxy. The proxy object and the `revoke` function are wrapped in a plain object.\n\nThe `revoke` function does not take any parameters, nor does it rely on the `this` value. The created `proxy` object is attached to the `revoke` function as a [private property](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/Private_class_fields) that the `revoke` function accesses on itself when called (the existence of the private property is not observable from the outside, but it has implications on how garbage collection happens). The `proxy` object is _not_ captured within the [closure](https://developer.mozilla.org/docs/Web/JavaScript/Closures) of the `revoke` function (which will make garbage collection of `proxy` impossible if `revoke` is still alive).\n\nAfter the `revoke()` function gets called, the proxy becomes unusable: any trap to a handler throws a [`TypeError`](../../globals/TypeError/TypeError.mdx). Once a proxy is revoked, it remains revoked, and calling `revoke()` again has no effect — in fact, the call to `revoke()` detaches the `proxy` object from the `revoke` function, so the `revoke` function will not be able to access the proxy again at all. If the proxy is not referenced elsewhere, it will then be eligible for garbage collection. The `revoke` function also detaches `target` and `handler` from the `proxy`, so if `target` is not referenced elsewhere, it will also be eligible for garbage collection, even when its proxy is still alive, since there's no longer a way to meaningfully interact with the target object.\n\nLetting users interact with an object through a revocable proxy allows you to [control the lifetime](https://developer.mozilla.org/docs/Web/JavaScript/Memory_Management) of the object exposed to the user — you can make the object garbage-collectable even when the user is still holding a reference to its proxy.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/RangeError/RangeError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RangeError\n\nThe **`RangeError()`** constructor creates an error\nwhen a value is not in the set or range of allowed values.\n\n## Syntax\n\n```js\nnew RangeError()\nnew RangeError(message)\nnew RangeError(message, options)\nnew RangeError(message, fileName)\nnew RangeError(message, fileName, lineNumber)\n\nRangeError()\nRangeError(message)\nRangeError(message, options)\nRangeError(message, fileName)\nRangeError(message, fileName, lineNumber)\n```\n\n> **Note:** `RangeError()` can be called with or without `new`. Both create a new `RangeError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/ReadableByteStreamController/prototype/byobRequest.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# byobRequest\n\nThe **`byobRequest`** read-only property of the `ReadableByteStreamController` interface returns the current BYOB request, or `null` if there are no pending requests.\n\nAn underlying byte source should check this property, and use it to write data to the stream if it exists (rather than using `ReadableByteStreamController.enqueue()`).\nThis will result in an efficient zero-byte transfer of the data to the consumer.\n\n## Value\n\nA `ReadableStreamBYOBRequest` object instance, or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/ReadableByteStreamController/prototype/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# close()\n\nThe **`close()`** method of the `ReadableByteStreamController` interface closes the associated stream.\n\nThis might be called by the underlying source when its data source has been exhausted/completed.\n\n> **Note:** Readers will still be able to read any previously-enqueued chunks from the stream, but once those are read, the stream will become closed.\n> However if there is an outstanding and partially written `byobRequest` when `close()` is called, the stream will be errored.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableByteStreamController`, it is already closed, or the stream is not readable for some other reason.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/ReadableByteStreamController/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# desiredSize\n\nThe **`desiredSize`** read-only property of the`ReadableByteStreamController` interface returns the number of bytes required to fill the stream's internal queue to its \"desired size\".\n\nThe value is used by the stream to indicate a preferred flow rate to the underlying source.\nSources that support throttling or pausing their inflow of data (not all do!) should control the inflow such that `desiredSize` of the stream buffer is kept positive and as close to zero as possible.\n\nThe `desiredSize` is used to apply backpressure from downstream consumers.\n\n## Value\n\nAn integer. Note that this can be negative if the queue is over-full.\n\nThe value will be `null` if the stream has errored and `0` if it is closed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/ReadableByteStreamController/prototype/enqueue.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# enqueue()\n\nThe **`enqueue()`** method of the `ReadableByteStreamController` interface enqueues a given chunk on the associated readable byte stream (the chunk is copied into the stream's internal queues).\n\nThis should only be used to transfer data to the queue when `byobRequest` is `null`.\n\n## Syntax\n\n```js\nenqueue(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : The chunk to enqueue.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableByteStreamController`, or the stream cannot be read for some other reason, or the chunk is not an object, or the chunk's internal array buffer is non-existent, zero-length, or detached.\n    It is also thrown if the stream has been closed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/ReadableByteStreamController/prototype/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# error()\n\nThe **`error()`** method of the `ReadableByteStreamController` interface causes any future interactions with the associated stream to error with the specified reason.\n\nThis is commonly called by an underlying source to surface an error from the interface where it gets its data (such as a file-read or socket error).\nIt can also be called from elsewhere to trigger a stream error, for example if another part of the system that the stream relies on fails.\n\n## Syntax\n\n```js\nerror(errorObject)\n```\n\n### Parameters\n\n- `errorObject`\n  - : Any object that you want future interactions to fail with.\n\n### Return value\n\n`undefined`\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableByteStreamController`, or the stream is not readable for some other reason.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/ReadableStream/ReadableStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream()\n\nThe **`ReadableStream()`** constructor creates and returns a readable stream object from the given handlers.\n\n## Syntax\n\n```js\nnew ReadableStream()\nnew ReadableStream(underlyingSource)\nnew ReadableStream(underlyingSource, queuingStrategy)\n```\n\n### Parameters\n\n- `underlyingSource` _**optional**_\n\n  - : An object containing methods and properties that define how the constructed stream instance will behave.\n    `underlyingSource` can contain the following:\n\n    - `start` (controller) _**optional**_\n      - : This is a method, called immediately when the object is constructed. The\n        contents of this method are defined by the developer, and should aim to get access\n        to the stream source, and do anything else required to set up the stream\n        functionality. If this process is to be done asynchronously, it can return a\n        promise to signal success or failure. The `controller` parameter passed\n        to this method is a `ReadableStreamDefaultController` or a\n        `ReadableByteStreamController`, depending on the value of the\n        `type` property. This can be used by the developer to control the\n        stream during set up.\n    - `pull` (controller) _**optional**_\n      - : This method, also defined by the developer, will be called repeatedly when the\n        stream's internal queue of chunks is not full, up until it reaches its high water\n        mark. If `pull()` returns a promise, then it won't be called again\n        until that promise fulfills; if the promise rejects, the stream will become\n        errored. The `controller` parameter passed to this method is a\n        `ReadableStreamDefaultController` or a\n        `ReadableByteStreamController`, depending on the value of the\n        `type` property. This can be used by the developer to control the\n        stream as more chunks are fetched.\n    - `cancel` (reason) _**optional**_\n      - : This method, also defined by the developer, will be called if the app signals\n        that the stream is to be cancelled (e.g. if `ReadableStream.cancel()`\n        is called). The contents should do whatever is necessary to release access to the\n        stream source. If this process is asynchronous, it can return a promise to signal\n        success or failure. The `reason` parameter contains a\n        string describing why the stream was cancelled.\n    - `type` _**optional**_\n      - : This property controls what type of readable stream is being dealt with. If it\n        is included with a value set to `\"bytes\"`, the passed controller object\n        will be a `ReadableByteStreamController` capable of handling a BYOB\n        (bring your own buffer)/byte stream. If it is not included, the passed controller\n        will be a `ReadableStreamDefaultController`.\n    - `autoAllocateChunkSize` _**optional**_\n\n      - : For byte streams, the developer can set the `autoAllocateChunkSize` with a positive integer value to turn on the stream's auto-allocation feature.\n        With this is set, the stream implementation will automatically allocate a view buffer of the specified size in `ReadableByteStreamController.byobRequest` when required.\n\n        This must be set to enable zero-copy transfers to be used with a default `ReadableStreamDefaultReader`.\n        If not set, a default reader will still stream data, but `ReadableByteStreamController.byobRequest` will always be `null` and transfers to the consumer must be via the stream's internal queues.\n\n- `queuingStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer — this defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk` — this indicates the size to\n        use for each chunk, in bytes.\n\n    > **Note:** You could define your own custom\n    > `queuingStrategy`, or use an instance of\n    > `ByteLengthQueuingStrategy` or `CountQueuingStrategy`\n    > for this object value. If no `queuingStrategy` is supplied, the default\n    > used is the same as a `CountQueuingStrategy` with a high water mark of\n    > 1\\.\n\n### Return value\n\nAn instance of the `ReadableStream` object.\n\n### Exceptions\n\n- `RangeError`\n  - Thrown if the supplied type value is neither `\"bytes\"` nor `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/ReadableStream/prototype/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.cancel()\n\nThe **`cancel()`** method of the\n`ReadableStream` interface returns a `Promise` that\nresolves when the stream is canceled.\n\nCancel is used when you've completely finished with the stream and don't need any more\ndata from it, even if there are chunks enqueued waiting to be read. That data is lost\nafter cancel is called, and the stream is not readable any more. To read those chunks\nstill and not completely get rid of the stream, you'd use\n`ReadableStreamDefaultController.close()`.\n\n## Syntax\n\n```js\ncancel()\ncancel(reason)\n```\n\n### Parameters\n\n- `reason` _**optional**_\n  - : A human-readable reason for the cancellation. The underlying source may or may not use it.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason` parameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to cancel is not a `ReadableStream`, or it is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/ReadableStream/prototype/getReader.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.getReader()\n\nThe **`getReader()`** method of the `ReadableStream` interface creates a reader and locks the stream to it.\nWhile the stream is locked, no other reader can be acquired until this one is released.\n\n## Syntax\n\n```js\ngetReader()\ngetReader(options)\n```\n\n### Parameters\n\n- `options` _**optional**_\n\n  - : An object containing the following properties:\n\n    - `mode` _**optional**_\n\n      - : A property that specifies the type of reader to create.\n        Values can be:\n\n        - `\"byob\"`, which results in a `ReadableStreamBYOBReader` being created that can read readable byte streams (streams that support zero-copy transfer from an underlying byte source to the reader when internal stream buffers are empty).\n        - `undefined` (or not specified at all — this is the default), which results in a `ReadableStreamDefaultReader` being created that can read individual chunks from a stream.\n\n### Return value\n\nA `ReadableStreamDefaultReader` or `ReadableStreamBYOBReader` object instance, depending on the `mode` value.\n\n### Exceptions\n\n- `RangeError`\n  - : Thrown if the provided mode value is not `\"byob\"` or `undefined`.\n- `TypeError`\n  - : Thrown if the stream you are trying to create a reader for is already locked, or not a `ReadableStream`."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/ReadableStream/prototype/locked.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.locked\n\nThe **`locked`** read-only property of the `ReadableStream` interface returns whether or not the readable stream is locked to a reader.\n\nA readable stream can have at most one active reader at a time, and is locked to that reader until it is released.\nA reader might be obtained using `ReadableStream.getReader()` and released using the reader's `releaseLock()` method.\n\n## Value\n\nA `boolean` value indicating whether or not the readable stream is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/ReadableStream/prototype/pipeThrough.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.pipeThrough()\n\nThe **`pipeThrough()`** method of the `ReadableStream` interface provides a chainable way of piping the current stream through a transform stream or any other writable/readable pair.\n\nPiping a stream will generally lock it for the duration of the pipe, preventing other readers from locking it.\n\n## Syntax\n\n```js\npipeThrough(transformStream)\npipeThrough(transformStream, options)\n```\n\n### Parameters\n\n- `transformStream`\n\n  - : A `TransformStream` (or an object with the structure\n    `{writable, readable}`) consisting of a readable stream and a writable\n    stream working together to transform some data from one form to another. Data written\n    to the `writable` stream can be read in some transformed state by the\n    `readable` stream. For example, a `TextDecoder`, has bytes\n    written to it and strings read from it, while a video decoder has encoded bytes\n    written to it and uncompressed video frames read from it.\n\n- `options` _**optional**_\n\n  - : The options that should be used when piping to the `writable` stream.\n    Available options are:\n\n    - `preventClose`\n\n      - : If this is set to `true`, the source `ReadableStream` closing will no longer cause the destination `WritableStream` to be closed.\n        The method will return a fulfilled promise once this process completes, unless an error is encountered while closing the destination, in which case it will be rejected with that error.\n\n    - `preventAbort`\n\n      - : If this is set to `true`, errors in the source `ReadableStream` will no longer abort the destination `WritableStream`.\n        The method will return a promise rejected with the source's error, or with any error that occurs during aborting the destination.\n\n    - `preventCancel`\n\n      - : If this is set to `true`, errors in the destination `WritableStream` will no longer cancel the source `ReadableStream`.\n        In this case the method will return a promise rejected with the source's error, or with any error that occurs during canceling the source.\n        In addition, if the destination writable stream starts out closed or closing, the source readable stream will no longer be canceled.\n        In this case the method will return a promise rejected with an error indicating piping to a closed stream failed, or with any error that occurs during canceling the source.\n\n### Return value\n\nThe `readable` side of the `transformStream`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the `writable` and/or `readable` property of `transformStream` are undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/ReadableStream/prototype/pipeTo.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.pipeTo()\n\nThe **`pipeTo()`** method of the `ReadableStream` interface pipes the current `ReadableStream` to a given `WritableStream` and returns a `Promise` that fulfills when the piping process completes successfully, or rejects if any errors were encountered.\n\nPiping a stream will generally `lock` it for the duration of the pipe, preventing other readers from locking it.\n\n## Syntax\n\n```js\npipeTo(destination)\npipeTo(destination, options)\n```\n\n### Parameters\n\n- `destination`\n\n  - : A `WritableStream` that acts as the final destination for the `ReadableStream`.\n\n- `options` _**optional**_\n\n  - : The options that should be used when piping to the `writable` stream.\n    Available options are:\n\n    - `preventClose`\n      - : If this is set to `true`, the source `ReadableStream` closing will no longer cause the destination `WritableStream` to be closed.\n        The method will return a fulfilled promise once this process completes, unless an error is encountered while closing the destination in which case it will be rejected with that error.\n    - `preventAbort`\n      - : If this is set to `true`, errors in the source `ReadableStream` will no longer abort the destination `WritableStream`.\n        The method will return a promise rejected with the source's error, or with any error that occurs during aborting the destination.\n    - `preventCancel`\n      - : If this is set to `true`, errors in the destination `WritableStream` will no longer cancel the source `ReadableStream`.\n        In this case the method will return a promise rejected with the source's error, or with any error that occurs during canceling the source.\n        In addition, if the destination writable stream starts out closed or closing, the source readable stream will no longer be canceled.\n        In this case the method will return a promise rejected with an error indicating piping to a closed stream failed, or with any error that occurs during canceling the source.\n\n### Return value\n\nA `Promise` that resolves when the piping process has completed.\n\n### Exceptions\n\n- `TypeError`\n  - : The `writableStream` and/or `readableStream` objects are not a writable stream/readable stream, or one or both of the streams are locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/ReadableStream/prototype/tee.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.tee()\n\nThe **`tee()`** method of the\n`ReadableStream` interface [tees](https://streams.spec.whatwg.org/#tee-a-readable-stream) the current readable stream, returning a\ntwo-element array containing the two resulting branches as\nnew `ReadableStream` instances.\n\nThis is useful for allowing two readers to read a stream sequentially or simultaneously,\nperhaps at different speeds.\nFor example, you might do this in a ServiceWorker if you want to fetch\na response from the server and stream it to the browser, but also stream it to the\nServiceWorker cache. Since a response body cannot be consumed more than once, you'd need\ntwo copies to do this.\n\nA teed stream will partially signal backpressure at the rate of the _faster_ consumer\nof the two `ReadableStream` branches,\nand unread data is enqueued internally on the slower consumed `ReadableStream`\nwithout any limit or backpressure.\nThat is, when _both_ branches have an unread element in their internal queue,\nthen the original `ReadableStream`'s controller's internal queue will start to fill up,\nand once its `ReadableStreamDefaultController.desiredSize\", \"desiredSize` ≤ 0\nor byte stream controller `ReadableByteStreamController.desiredSize\", \"desiredSize` ≤ 0,\nthen the controller will stop calling `pull(controller)` on the\nunderlying source passed to `ReadableStream.ReadableStream\", \"new ReadableStream()`.\nIf only one branch is consumed, then the entire body will be enqueued in memory.\nTherefore, you should not use the built-in `tee()` to read very large streams\nin parallel at different speeds.\nInstead, search for an implementation that fully backpressures\nto the speed of the _slower_ consumed branch.\n\nTo cancel the stream you then need to cancel both resulting branches. Teeing a stream\nwill generally lock it for the duration, preventing other readers from locking it.\n\n## Syntax\n\n```js\ntee()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nAn `Array` containing two `ReadableStream` instances.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source stream is not a `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/ReadableStreamBYOBReader/ReadableStreamBYOBReader.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# ReadableStreamBYOBReader()\n\nThe **`ReadableStreamBYOBReader()`** constructor creates and returns a `ReadableStreamBYOBReader` object instance.\n\n> **Note:** You generally wouldn't use this constructor manually;\n> instead, you'd use the `ReadableStream.getReader()` method with the argument `\"byob\"`.\n\n## Syntax\n\n```js\nnew ReadableStreamBYOBReader(stream)\n```\n\n### Parameters\n\n- `stream`\n  - : The `ReadableStream` to be read.\n\n### Return value\n\nAn instance of the `ReadableStreamBYOBReader` object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the supplied `stream` parameter is not a `ReadableStream`, or it is already locked for reading by another reader, or its stream controller is not a `ReadableByteStreamController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/ReadableStreamBYOBReader/prototype/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# cancel()\n\nThe **`cancel()`** method of the `ReadableStreamBYOBReader` interface returns a `Promise` that resolves when the stream is canceled.\nCalling this method signals a loss of interest in the stream by a consumer.\n\n> **Note:** If the reader is active, the `cancel()` method behaves the same as that for the associated stream (`ReadableStream.cancel()`).\n\n## Syntax\n\n```js\ncancel()\ncancel(reason)\n```\n\n### Parameters\n\n- `reason` __optional__\n  - : A human-readable reason for the cancellation. The underlying source may or may not use it.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason` parameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamBYOBReader`, or the stream has no owner.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/ReadableStreamBYOBReader/prototype/closed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# closed\n\nThe **`closed`** read-only property of the `ReadableStreamBYOBReader` interface returns a `Promise` that fulfills when the stream closes, or rejects if the stream throws an error or the reader's lock is released.\n\nThis property enables you to write code that responds to an end to the streaming process.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/ReadableStreamBYOBReader/prototype/read.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# read()\n\nThe **`read()`** method of the `ReadableStreamBYOBReader` interface is used to read data into a view on a user-supplied buffer from an associated readable byte stream.\nA request for data will be satisfied from the stream's internal queues if there is any data present.\nIf the stream queues are empty, the request may be supplied as a zero-copy transfer from the underlying byte source.\n\nThe method takes as an argument a view on a buffer that supplied data is to be read into, and returns a `Promise`.\nThe promise fulfills with an object that has properties `value` and `done` when data comes available, or if the stream is cancelled.\nIf the stream is errored, the promise will be rejected with the relevant error object.\n\nIf a chunk of data is supplied, the `value` property will contain a new view.\nThis will be a view over the same buffer/backing memory (and of the same type) as the original `view` passed to the `read()` method, now populated with the new chunk of data.\nNote that once the promise fulfills, the original `view` passed to the method will be detached and no longer usable.\nThe promise will fulfill with a `value: undefined` if the stream has been cancelled.\nIn this case the backing memory region of `view` is discarded and not returned to the caller (all previously read data in the view's buffer is lost).\n\nThe `done` property indicates whether or not more data is expected.\nThe value is set `true` if the stream is closed or cancelled, and `false` otherwise.\n\n## Syntax\n\n```js\nread(view)\n```\n\n### Parameters\n\n- `view`\n  - : The view that data is to be read into.\n\n### Return value\n\nA `Promise`, which fulfills/rejects with a result depending on the state of the stream.\n\nThe following are possible:\n\n- If a chunk is available and the stream is still active, the promise fulfills with an object of the form:\n\n  ```\n  { value: theChunk, done: false }\n  ```\n\n  `theChunk` is a view containing the new data.\n  This is a view of the same type and over the same backing memory as the `view` passed to the `read()` method.\n  The original `view` will be detached and no longer usable.\n\n- If the stream is closed, the promise fulfills with an object of the form (where `theChunk` has the same properties as above):\n\n  ```\n  { value: theChunk, done: true }\n  ```\n\n- If the stream is cancelled, the promise fulfills with an object of the form:\n\n  ```\n  { value: undefined, done: true }\n  ```\n\n  In this case the backing memory is discarded.\n\n- If the stream throws an error, the promise rejects with the relevant error.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamBYOBReader`, the stream has no owner, the view is not an object or has become detached, the view's length is 0, or `ReadableStreamBYOBReader.releaseLock()` is called (when there's is a pending read request).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/ReadableStreamBYOBReader/prototype/releaseLock.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# releaseLock()\n\nThe **`releaseLock()`** method of the `ReadableStreamBYOBReader` interface releases the reader's lock on the stream.\nAfter the lock is released, the reader is no longer active.\n\nThe reader will appear errored if the associated stream is errored when the lock is released; otherwise, the reader will appear closed.\n\nIf the reader's lock is released while it still has pending read requests then the promises returned by the reader's `ReadableStreamBYOBReader.read()` method are immediately rejected with a `TypeError`.\nUnread chunks remain in the stream's internal queue and can be read later by acquiring a new reader.\n\n## Syntax\n\n```js\nreleaseLock()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamBYOBReader`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/ReadableStreamBYOBRequest/prototype/respond.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# respond()\n\nThe **`respond()`** method of the `ReadableStreamBYOBRequest` interface is used to signal to the associated readable byte stream that the specified number of bytes were written into the `ReadableStreamBYOBRequest.view`.\n\nAfter this method is called, the `view` will be transferred and no longer modifiable.\n\n## Syntax\n\n```js\nrespond(bytesWritten)\n```\n\n### Parameters\n\n- `bytesWritten`\n  - : The number of bytes written into `ReadableStreamBYOBRequest.view`.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : The request does not have an associated `ReadableByteStreamController` or the view buffer is not detached/cannot be transferred into.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/ReadableStreamBYOBRequest/prototype/respondWithNewView.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# respondWithNewView()\n\nThe **`respondWithNewView()`** method of the `ReadableStreamBYOBRequest` interface specifies a new view that the consumer of the associated readable byte stream should write to instead of `ReadableStreamBYOBRequest.view`.\n\nThe new view must be a `TypedArray` or a `DataView` that provides a view onto the same backing memory region as `ReadableStreamBYOBRequest.view`.\nAfter this method is called, the view that was passed into the method will be transferred and no longer modifiable.\n\nThe method is intended for use cases where an underlying byte source needs to transfer a `byobRequest.view` internally before finishing its response.\nFor example, the source may transfer the BYOB view to a separate worker thread, and wait for the worker to transfer it back once it has been filled.\n\n## Syntax\n\n```js\nrespondWithNewView(view)\n```\n\n### Parameters\n\n- `view`\n\n  - : A `TypedArray` or a `DataView` that the consumer of the associated readable byte stream should write to instead of `ReadableStreamBYOBRequest.view`.\n\n    This must be a view onto the same backing memory region as `ReadableStreamBYOBRequest.view` and occupy the same or less memory.\n    Specifically, it must be either the view's buffer or a transferred version, must have the same `byteOffset`, and a `byteLength` (number of bytes written) that is less than or equal to that of the view.\n\n### Return value\n\n`undefined`\n\n### Exceptions\n\n- `TypeError`\n\n  - : Thrown if the source object is not a `ReadableStreamBYOBRequest`, or there is no associated controller, or the associated internal array buffer is non-existent or detached.\n    It may also be thrown if the `view` is zero-length when there is an active reader, or non-zero when called on a closed stream.\n\n- `RangeError`\n  - : Thrown if the new `view` does not match the backing memory region of `ReadableStreamBYOBRequest.view`.\n    For example, it is not the same buffer (or a transferred version), has a different `byteOffset`, or is larger than the memory available to the backing view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/ReadableStreamBYOBRequest/prototype/view.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# view\n\nThe **`view`** getter property of the `ReadableStreamBYOBRequest` interface returns the current view.\n\n## Value\n\nA typed array representing the destination region to which the controller can write generated data.\n\n`null` if the request has already been responded to, by calling `ReadableStreamBYOBRequest.respond()` or `ReadableStreamBYOBRequest.respondWithNewView()`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/ReadableStreamDefaultController/prototype/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.close()\n\nThe **`close()`** method of the\n`ReadableStreamDefaultController` interface closes the associated stream.\n\nReaders will still be able to read any previously-enqueued chunks from the stream,\nbut once those are read, the stream will become closed. If you want to completely get\nrid of the stream and discard any enqueued chunks, you'd use\n`ReadableStream.cancel()` or\n`ReadableStreamDefaultReader.cancel()`.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/ReadableStreamDefaultController/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.desiredSize\n\nThe **`desiredSize`** read-only property of the\n`ReadableStreamDefaultController` interface returns the desired size\nrequired to fill the stream's internal queue.\n\n## Value\n\nAn integer. Note that this can be negative if the queue is over-full.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/ReadableStreamDefaultController/prototype/enqueue.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.enqueue()\n\nThe **`enqueue()`** method of the\n`ReadableStreamDefaultController` interface enqueues a given chunk in the\nassociated stream.\n\n## Syntax\n\n```js\nenqueue(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : The chunk to enqueue.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/ReadableStreamDefaultController/prototype/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.error()\n\nThe **`error()`** method of the\n`ReadableStreamDefaultController` interface causes any future interactions\nwith the associated stream to error.\n\n> **Note:** The `error()` method can be called\n> more than once, and can be called when the stream is not readable.\n\n## Syntax\n\n```js\nerror(e)\n```\n\n### Parameters\n\n- `e`\n  - : The error you want future interactions to fail with.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/ReadableStreamDefaultReader/ReadableStreamDefaultReader.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader()\n\nThe **`ReadableStreamDefaultReader()`**\nconstructor creates and returns a `ReadableStreamDefaultReader` object\ninstance.\n\n## Syntax\n\n```js\nnew ReadableStreamDefaultReader(stream)\n```\n\n### Parameters\n\n- `stream`\n  - : The `ReadableStream` to be read.\n\n### Return value\n\nAn instance of the `ReadableStreamDefaultReader` object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the supplied `stream` parameter is not a `ReadableStream`,\n    or it is already locked for reading by another reader.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/ReadableStreamDefaultReader/prototype/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n~ ReadableStreamDefaultReader.cancel()\n\nThe **`cancel()`** method of the\n`ReadableStreamDefaultReader` interface returns a `Promise` that resolves when the stream is canceled. Calling this method signals a loss of interest in the stream by a consumer.\n\nCancel is used when you've completely finished with the stream and don't need any more\ndata from it, even if there are chunks enqueued waiting to be read. That data is lost\nafter cancel is called, and the stream is not readable any more. To read those chunks\nstill and not completely get rid of the stream, you'd use\n`ReadableStreamDefaultController.close()`.\n\n> **Note:** If the reader is active, the\n> `cancel()` method behaves the same as that for the associated stream\n> (`ReadableStream.cancel()`).\n\n## Syntax\n\n```js\ncancel()\ncancel(reason)\n```\n\n### Parameters\n\n- `reason` _**optional**_\n  - : A human-readable reason for the cancellation. This value may or may not be used.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason`\nparameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamDefaultReader`, or the stream\n    has no owner.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/ReadableStreamDefaultReader/prototype/closed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader.closed\n\nThe **`closed`** read-only property of the\n`ReadableStreamDefaultReader` interface returns a\n`Promise` that fulfills when the stream closes, or rejects if the\nstream throws an error or the reader's lock is released. This property enables you\nto write code that responds to an end to the streaming process.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/ReadableStreamDefaultReader/prototype/read.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader.read()\n\nThe **`read()`** method of the `ReadableStreamDefaultReader` interface returns a `Promise` providing access to the next chunk in the stream's internal queue.\n\n## Syntax\n\n```js\nread()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise`, which fulfills/rejects with a result depending on the state of the stream.\nThe different possibilities are as follows:\n\n- If a chunk is available, the promise will be fulfilled with an object of the form `{ value: theChunk, done: false }`.\n- If the stream becomes closed, the promise will be fulfilled with an object of the form `{ value: undefined, done: true }`.\n- If the stream becomes errored, the promise will be rejected with the relevant error.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamDefaultReader`, the stream has no owner, or `ReadableStreamDefaultReader.releaseLock()` is called (when there's a pending read request).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/ReadableStreamDefaultReader/prototype/releaseLock.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader.releaseLock()\n\nThe **`releaseLock()`** method of the `ReadableStreamDefaultReader` interface releases the reader's lock on the stream.\n\nIf the associated stream is errored when the lock is released, the reader will appear errored in that same way subsequently; otherwise, the reader will appear closed.\n\nIf the reader's lock is released while it still has pending read requests then the promises returned by the reader's `ReadableStreamDefaultReader.read()` method are immediately rejected with a `TypeError`.\nUnread chunks remain in the stream's internal queue and can be read later by acquiring a new reader.\n\n## Syntax\n\n```js\nreleaseLock()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultReader`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/ReferenceError/ReferenceError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReferenceError\n\nThe **`ReferenceError`** object represents an error when a\nnon-existent variable is referenced.\n\n## Syntax\n\n```js\nnew ReferenceError()\nnew ReferenceError(message)\nnew ReferenceError(message, options)\nnew ReferenceError(message, fileName)\nnew ReferenceError(message, fileName, lineNumber)\n\nReferenceError()\nReferenceError(message)\nReferenceError(message, options)\nReferenceError(message, fileName)\nReferenceError(message, fileName, lineNumber)\n```\n\n> **Note:** `ReferenceError()` can be called with or without `new`. Both create a new `ReferenceError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Reflect/apply.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.apply()\n\nThe static **`Reflect.apply()`** method calls a target function\nwith arguments as specified.\n\n## Syntax\n\n```js\nReflect.apply(target, thisArgument, argumentsList)\n```\n\n### Parameters\n\n- `target`\n  - : The target function to call.\n- `thisArgument`\n  - : The value of `this` provided for the call to\n    `target`.\n- `argumentsList`\n  - : An array-like object specifying the arguments with which\n    `target` should be called.\n\n### Return value\n\nThe result of calling the given `target` function with the\nspecified `this` value and arguments.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if the `target` is not callable.\n\n## Description\n\nIn ES5, you typically use the [`Function.prototype.apply()`](../../globals/Function/prototype/apply.mdx) method to call a\nfunction with a given `this` value and `arguments` provided as an array\n(or an [array-like object](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects)).\n\n```js\nFunction.prototype.apply.call(Math.floor, undefined, [1.75]);\n```\n\nWith `Reflect.apply()` this becomes less verbose and easier to understand.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Reflect/construct.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.construct()\n\nThe static **`Reflect.construct()`** method acts like the\n`new` operator, but as a function. It is equivalent to\ncalling `new target(...args)`. It gives also the added option to specify a\ndifferent prototype.\n\n## Syntax\n\n```js\nReflect.construct(target, argumentsList)\nReflect.construct(target, argumentsList, newTarget)\n```\n\n### Parameters\n\n- `target`\n  - : The target function to call.\n- `argumentsList`\n  - : An array-like object specifying the arguments with which\n    `target` should be called.\n- `newTarget` _**optional**_\n  - : The constructor whose prototype should be used. See also the [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target)\n    operator. If `newTarget` is not present, its value defaults\n    to `target`.\n\n### Return value\n\nA new instance of `target` (or `newTarget`,\nif present), initialized by `target` as a constructor with the\ngiven `argumentsList`.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` or\n`newTarget` are not constructors.\n\n## Description\n\n`Reflect.construct()` allows you to invoke a constructor with a variable\nnumber of arguments. (This would also be possible by using the\n[spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) combined with the\n[`new` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new).)\n\n```js\nconst obj = new Foo(...args);\nconst obj = Reflect.construct(Foo, args);\n```\n\n### Reflect.construct() vs Object.create()\n\nPrior to the introduction of `Reflect`, objects could be constructed using\nan arbitrary combination of constructor and prototype by using\n[`Object.create()`](../../globals/Object/create.mdx).\n\n```js\nfunction OneClass() {\n  this.name = \"one\";\n}\n\nfunction OtherClass() {\n  this.name = \"other\";\n}\n\n// Calling this:\nconst obj1 = Reflect.construct(OneClass, args, OtherClass);\n\n// ...has the same result as this:\nconst obj2 = Object.create(OtherClass.prototype);\nOneClass.apply(obj2, args);\n\nconsole.log(obj1.name); // 'one'\nconsole.log(obj2.name); // 'one'\n\nconsole.log(obj1 instanceof OneClass); // false\nconsole.log(obj2 instanceof OneClass); // false\n\nconsole.log(obj1 instanceof OtherClass); // true\nconsole.log(obj2 instanceof OtherClass); // true\n\n// Another example to demonstrate below:\n\nfunction func1(a, b, c, d) {\n  console.log(arguments[3]);\n}\n\nfunction func2(d, e, f, g) {\n  console.log(arguments[3]);\n}\n\nconst obj1 = Reflect.construct(func1, [\"I\", \"Love\", \"my\", \"country\"]);\n```\n\nHowever, while the end result is the same, there is one important difference in the\nprocess. When using `Object.create()` and\n[`Function.prototype.apply()`](../../globals/Function/prototype/apply.mdx), the `new.target` operator will\npoint to `undefined` within the function used as the constructor, since the\n`new` keyword is not being used to create the object.\n\nWhen invoking `Reflect.construct()`, on the other hand, the\n`new.target` operator will point to the `newTarget`\nparameter if supplied, or `target` if not.\n\n```js\nfunction OneClass() {\n  console.log(\"OneClass\");\n  console.log(new.target);\n}\nfunction OtherClass() {\n  console.log(\"OtherClass\");\n  console.log(new.target);\n}\n\nconst obj1 = Reflect.construct(OneClass, args);\n// Logs:\n// OneClass\n// function OneClass { ... }\n\nconst obj2 = Reflect.construct(OneClass, args, OtherClass);\n// Logs:\n// OneClass\n// function OtherClass { ... }\n\nconst obj3 = Object.create(OtherClass.prototype);\nOneClass.apply(obj3, args);\n// Logs:\n// OneClass\n// undefined\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Reflect/defineProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.defineProperty()\n\nThe static **`Reflect.defineProperty()`** method is like\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx) but returns a `Boolean`.\n\n## Syntax\n\n```js\nReflect.defineProperty(target, propertyKey, attributes)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to define the property.\n- `propertyKey`\n  - : The name of the property to be defined or modified.\n- `attributes`\n  - : The attributes for the property being defined or modified.\n\n### Return value\n\nA `Boolean` indicating whether or not the property was successfully\ndefined.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.defineProperty` method allows precise addition to or\nmodification of a property on an object. For more details, see the\n[`Object.defineProperty`](../../globals/Object/defineProperty.mdx) which is similar.\n\n> **Note:** `Object.defineProperty` returns the\n> object or throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the property has not been successfully\n> defined. `Reflect.defineProperty`, however, returns a `Boolean`\n> indicating whether or not the property was successfully defined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Reflect/deleteProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.deleteProperty()\n\nThe static\n**`Reflect.deleteProperty()`**\nmethod allows to delete properties. It is like the\n[`delete` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete)\nas a function.\n\n## Syntax\n\n```js\nReflect.deleteProperty(target, propertyKey)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to delete the property.\n- `propertyKey`\n  - : The name of the property to be deleted.\n\n### Return value\n\nA `Boolean` indicating whether or not the property was successfully\ndeleted.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.deleteProperty` method allows you to delete a property on an\nobject. It returns a `Boolean` indicating whether or not the property was\nsuccessfully deleted. It is almost identical to the non-strict\n[`delete` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Reflect/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.get()\n\nThe static **`Reflect.get()`** method works like getting a\nproperty from an object (`target[propertyKey]`) as a function.\n\n## Syntax\n\n```js\nReflect.get(target, propertyKey)\nReflect.get(target, propertyKey, receiver)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to get the property.\n- `propertyKey`\n  - : The name of the property to get.\n- `receiver` _**optional**_\n  - : The value of `this` provided for the call to\n    `target` if a getter is encountered. When used with\n    `Proxy`, it can be an object that inherits from\n    `target`.\n\n### Return value\n\nThe value of the property.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.get` method allows you to get a property on an object. It is like the\n[property accessor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Property_Accessors) syntax as a function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Reflect/getOwnPropertyDescriptor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.getOwnPropertyDescriptor()\n\nThe static\n**`Reflect.getOwnPropertyDescriptor()`** method is similar to\n[`Object.getOwnPropertyDescriptor()`](../../globals/Object/getOwnPropertyDescriptor.mdx). It returns a property descriptor of\nthe given property if it exists on the object, `undefined`\notherwise.\n\n\n\n## Syntax\n\n```js\nReflect.getOwnPropertyDescriptor(target, propertyKey)\n```\n\n### Parameters\n\n- `target`\n  - : The target object in which to look for the property.\n- `propertyKey`\n  - : The name of the property to get an own property descriptor for.\n\n### Return value\n\nA property descriptor object if the property exists in `target`\nobject; otherwise, [`undefined`](../../globals/undefined.mdx).\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.getOwnPropertyDescriptor` method returns a property descriptor\nof the given property if it exists in the `target` object,\n[`undefined`](../../globals/undefined.mdx) otherwise. The only difference to\n[`Object.getOwnPropertyDescriptor()`](../../globals/Object/getOwnPropertyDescriptor.mdx) is how non-object targets are handled.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Reflect/getPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.getPrototypeOf()\n\nThe static **`Reflect.getPrototypeOf()`** method is almost the\nsame method as [`Object.getPrototypeOf()`](../../globals/Object/getPrototypeOf.mdx). It returns the prototype (i.e. the\nvalue of the internal `[[Prototype]]` property) of the specified object.\n\n\n\n## Syntax\n\n```js\nReflect.getPrototypeOf(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object of which to get the prototype.\n\n### Return value\n\nThe prototype of the given object. If there are no inherited properties,\n[`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) is returned.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.getPrototypeOf` method returns the prototype (i.e. the value of\nthe internal `[[Prototype]]` property) of the specified object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Reflect/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.has()\n\nThe static **`Reflect.has()`** method works like the [`in` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/in)\nas a function.\n\n## Syntax\n\n```js\nReflect.has(target, propertyKey)\n```\n\n### Parameters\n\n- `target`\n  - : The target object in which to look for the property.\n- `propertyKey`\n  - : The name of the property to check.\n\n### Return value\n\nA `Boolean` indicating whether or not the `target`\nhas the property.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.has` method allows you to check if a property is in an object.\nIt works like the [`in` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/in)\nas a function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Reflect/isExtensible.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.isExtensible()\n\nThe static **`Reflect.isExtensible()`** method determines if an object is extensible (whether it can have new properties added to it). It is similar to [`Object.isExtensible()`](../../globals/Object/isExtensible.mdx), but with [some differences](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/isExtensible#difference_with_object.isextensible).\n\n## Syntax\n\n```js\nReflect.isExtensible(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object which to check if it is extensible.\n\n### Return value\n\nA `Boolean` indicating whether or not the target is extensible.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Reflect/ownKeys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.ownKeys()\n\nThe static **`Reflect.ownKeys()`** method returns an array of\nthe `target` object's own property keys.\n\n## Syntax\n\n```js\nReflect.ownKeys(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object from which to get the own keys.\n\n### Return value\n\nAn `Array` of the `target` object's own property\nkeys.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.ownKeys` method returns an array of the\n`target` object's own property keys. Its return value is\nequivalent to `Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target))`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Reflect/preventExtensions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.preventExtensions()\n\nThe static **`Reflect.preventExtensions()`** method prevents new properties from ever being added to an object (i.e., prevents future extensions to the object). It is similar to [`Object.preventExtensions()`](../../globals/Object/preventExtensions.mdx), but with [some differences](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/preventExtensions#difference_with_object.preventextensions).\n\n## Syntax\n\n```js\nReflect.preventExtensions(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to prevent extensions.\n\n### Return value\n\nA `Boolean` indicating whether or not the target was successfully set to prevent extensions.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Reflect/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.set()\n\nThe static **`Reflect.set()`** method works like setting a\nproperty on an object.\n\n## Syntax\n\n```js\nReflect.set(target, propertyKey, value)\nReflect.set(target, propertyKey, value, receiver)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to set the property.\n- `propertyKey`\n  - : The name of the property to set.\n- `value`\n  - : The value to set.\n- `receiver` _**optional**_\n  - : The value of `this` provided for the call to the setter for `propertyKey` on `target`. If provided and `target` does not have a setter for `propertyKey`, the property will be set on `receiver` instead.\n\n### Return value\n\nA `Boolean` indicating whether or not setting the property was successful.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.set` method allows you to set a property on an object. It does\nproperty assignment and is like the\n[property accessor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Property_Accessors) syntax as a function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Reflect/setPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.setPrototypeOf()\n\nThe static\n**`Reflect.setPrototypeOf()`** method is the same method as\n[`Object.setPrototypeOf()`](../../globals/Object/setPrototypeOf.mdx), except for its return type. It sets the\nprototype (i.e., the internal `[[Prototype]]` property) of a specified\nobject to another object or to [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null), and returns `true` if\nthe operation was successful, or `false` otherwise.\n\n## Syntax\n\n```js\nReflect.setPrototypeOf(target, prototype)\n```\n\n### Parameters\n\n- `target`\n  - : The target object of which to set the prototype.\n- `prototype`\n  - : The object's new prototype (an object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null)).\n\n### Return value\n\nA `Boolean` indicating whether or not the prototype was successfully set.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object` or if `prototype` is neither an object nor\n[`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null).\n\n## Description\n\nThe `Reflect.setPrototypeOf` method changes the prototype (i.e. the value of\nthe internal `[[Prototype]]` property) of the specified object.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Request/Request.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request()\n\nThe **`Request()`** constructor creates a new\n`Request` object.\n\n## Syntax\n\n```js\nnew Request(input)\nnew Request(input, options)\n```\n\n### Parameters\n\n- `input`\n\n  - : Defines the resource that you wish to fetch. This can either be:\n\n    - A string containing the direct URL of the resource you want to\n      fetch.\n    - A `Request` object, effectively creating a copy.\n\n- `options` _**optional**_\n\n  - : An object containing any custom settings that you want to apply to the\n    request. The possible options are:\n\n    - `method`\n      - : The request method, e.g., `GET`, `POST`. The default is `GET`.\n    - `headers`\n      - : Any headers you want to add to your request, contained\n        within a `Headers` object or an object literal with `String` values.\n    - `body`\n      - : Any body that you want to add to your request: this can be an `ArrayBuffer`, a `TypedArray`, a `DataView`, a `URLSearchParams`, string object or literal, a `ReadableStream` object, a [`Blob`](../../globals/Blob/Blob.mdx) object, or a [`FormData`](../../globals/FormData/FormData.mdx) object.\n    - `backend` _**Fastly-specific**_\n    - `cacheOverride` _**Fastly-specific**_, see [`CacheOverride`](../../fastly:cache-override/CacheOverride/CacheOverride.mdx).\n    - `cacheKey` _**Fastly-specific**_\n    - `manualFramingHeaders`_: boolean_ _**optional**_ _**Fastly-specific**_\n      - : The default value is `false`, which means that the framing headers are automatically created based on the message body.\n        In \"automatic\" mode, a `Content-Length` is used when the size of the body can be determined before it is sent.\n        Requests sent in streaming mode, where headers are sent immediately but the content of the body is streamed later, will receive a `Transfer-Encoding: chunked` to accommodate the dynamic generation of the body.\n        In \"manual\" mode, any `Content-Length` or `Transfer-Encoding` headers will be honored.\n        You must ensure that those headers have correct values permitted by the [HTTP/1.1 specification](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).\n        If the provided headers are not permitted by the specification, the headers will revert to \"automatic\" mode and a diagnostic message will be logged about what was wrong.\n        If a `Content-Length` is permitted by the specification, but the value does not match the size of the actual body, the body will either be truncated (if it is too long), or the connection will be hung up early (if it is too short).\n    - `fastly` _**Fastly-specific**_\n      - `decompressGzip`_: boolean_ _**optional**_\n        - Whether to automatically gzip decompress the Response or not."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Request/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the `Request` interface\nreads the request body and returns it as a promise that resolves with an `ArrayBuffer`.\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an `ArrayBuffer`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Request/prototype/blob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.blob()\n\nThe **`blob()`** method of the `Request` interface reads the request body and returns it as a promise that resolves with a `Blob`.\n\n## Syntax\n\n```js\nblob()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a [`Blob`](../../../globals/Blob/Blob.mdx).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the request body has already been used or if the request's method is `GET` or `HEAD`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Request/prototype/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.body\n\nThe read-only **`body`** property of the `Request`\ninterface contains a `ReadableStream` with the body contents\nthat have been added to the request. Note that a request using the\n`GET` or `HEAD` method cannot have a body\nand `null` is returned in these cases.\n\n## Value\n\nA `ReadableStream` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Request/prototype/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.bodyUsed\n\nThe read-only **`bodyUsed`** property of the\n`Request` interface is a boolean value that indicates\nwhether the request body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Request/prototype/clone.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.clone()\n\nThe **`clone()`** method of the `Request` interface creates a copy of the current `Request` object.\n\nLike the underlying `ReadableStream.tee`` api, the `body` of a cloned `Response`\nwill signal backpressure at the rate of the _faster_ consumer of the two bodies,\nand unread data is enqueued internally on the slower consumed `body`\nwithout any limit or backpressure.\nBeware when you construct a `Request` from a stream and then `clone` it.\n\n`clone()` throws a `TypeError` if the request body has already been used. In fact, the main reason `clone()` exists is to allow multiple uses of body objects (when they are one-use only.)\n\nIf you intend to modify the request, you may prefer the `Request` constructor.\n\n## Syntax\n\n```js\nclone()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Request` object, which is an exact copy of the `Request` that `clone()` was called on.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Request/prototype/formData.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.formData()\n\nThe **`formData()`** method of the `Request` interface reads the request body and returns it as a promise that resolves with a `FormData` object.\n\n## Syntax\n\n```js\nformData()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a [`FormData`](../../../globals/FormData/FormData.mdx) object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the request body has already been used or if the request's method is `GET` or `HEAD`.\n- `SyntaxError`\n  - : Thrown if the request's content type is not `multipart/form-data` or `application/x-www-form-urlencoded`, or if the content cannot be parsed as form data.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Request/prototype/headers.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.headers\n\nThe **`headers`** read-only property of the\n`Request` interface contains the `Headers` object associated\nwith the request.\n\n## Value\n\nA `Headers` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Request/prototype/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.json()\n\nThe **`json()`** method of the `Request` interface\nreads the request body and returns it as a promise that resolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a JavaScript object. This object could be\nanything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Request/prototype/method.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.method\n\nThe **`method`** read-only property of the\n`Request` interface contains the request's method (`GET`, `POST`, etc.)\n\n## Value\n\nA `String` indicating the method of the request.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Request/prototype/setManualFramingHeaders.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.setManualFramingHeaders()\n\nThe **`setManualFramingHeaders()`** method of the `Request` interface controls how the framing headers should be determined.\n\nBy default the framing headers are set to \"automatic\" mode, which means they are created based on the body of the associated Request instance.\nIn \"automatic\" mode, a `Content-Length` is used when the size of the body can be determined before it is sent.\nRequests sent in streaming mode, where headers are sent immediately but the content of the body is streamed later, will receive a `Transfer-Encoding: chunked` to accommodate the dynamic generation of the body.\nIn \"manual\" mode, any `Content-Length` or `Transfer-Encoding` headers will be honored.\nYou must ensure that those headers have correct values permitted by the [HTTP/1.1 specification](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).\nIf the provided headers are not permitted by the specification, the headers will revert to \"automatic\" mode and a diagnostic message will be logged about what was wrong.\nIf a `Content-Length` is permitted by the specification, but the value does not match the size of the actual body, the body will either be truncated (if it is too long), or the connection will be hung up early (if it is too short).\n\n## Syntax\n\n## Syntax\n\n```js\nsetManualFramingHeaders(manual)\n```\n\n### Parameters\n\n- `manual` _: boolean_\n  - : Whether or not to use \"manual\" mode for the framing headers.\n\n### Return value\n\n`undefined`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Request/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.text()\n\nThe **`text()`** method of the `Request` interface\nreads the request body and returns it as a promise that resolves with a `String`.\nThe response is _always_ decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Promise that resolves with a `String`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Request/prototype/url.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.url\n\nThe **`url`** read-only property of the `Request` interface contains the URL of the request.\n\n## Value\n\nA string indicating the URL of the request.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Response/Response.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response()\n\nThe **`Response()`** constructor creates a new `Response` object.\n\n## Syntax\n\n```js\nnew Response()\nnew Response(body)\nnew Response(body, options)\n```\n\n### Parameters\n\n- `body` _**optional**_\n\n  - : An object defining a body for the response. This can be `null` (which is\n    the default value), or one of:\n\n    - [`ArrayBuffer`](../../globals/ArrayBuffer/ArrayBuffer.mdx)\n    - `TypedArray`\n    - [`DataView`](../../globals/DataView/DataView.mdx)\n    - [`ReadableStream`](../../globals/ReadableStream/ReadableStream.mdx)\n    - [`URLSearchParams`](../../globals/URLSearchParams/URLSearchParams.mdx)\n    - [`String`](../../globals/String/String.mdx)\n    - string literal\n    - [`Blob`](../../globals/Blob/Blob.mdx)\n    - [`FormData`](../../globals/FormData/FormData.mdx)\n\n- `options` _**optional**_\n\n  - : An options object containing any custom settings that you want to apply to the\n    response, or an empty object (which is the default value). The possible options are:\n\n    - `status`\n      - : The status code for the response, e.g., `200`.\n    - `statusText`\n      - : The status message associated with the status code,\n        e.g., `OK`.\n    - `headers`\n      - : Any headers you want to add to your response, contained\n        within a [`Headers`](../../globals/Headers/Headers.mdx) object or object literal of\n        [`String`](../../globals/String/String.mdx) key/value pairs.\n    - `manualFramingHeaders`_: boolean_ _**optional**_ _**Fastly-specific**_\n      - : The default value is `false`, which means that the framing headers are automatically created based on the message body.\n        In \"automatic\" mode, a `Content-Length` is used when the size of the body can be determined before it is sent.\n        Responses sent in streaming mode, where headers are sent immediately but the content of the body is streamed later, will receive a `Transfer-Encoding: chunked` to accommodate the dynamic generation of the body.\n        In \"manual\" mode, any `Content-Length` or `Transfer-Encoding` headers will be honored.\n        You must ensure that those headers have correct values permitted by the [HTTP/1.1 specification](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).\n        If the provided headers are not permitted by the specification, the headers will revert to \"automatic\" mode and a diagnostic message will be logged about what was wrong.\n        If a `Content-Length` is permitted by the specification, but the value does not match the size of the actual body, the body will either be truncated (if it is too long), or the connection will be hung up early (if it is too short).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Response/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface\ntakes a [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion. It returns a promise\nthat resolves with an [`ArrayBuffer`](../../../globals/ArrayBuffer/ArrayBuffer.mdx).\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an [`ArrayBuffer`](../../../globals/ArrayBuffer/ArrayBuffer.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Response/prototype/blob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.blob()\n\nThe **`blob()`** method of the [`Response`](../Response.mdx) interface takes a [`Response`](../Response.mdx) stream and reads it to completion. It returns a promise that resolves with a `Blob`.\n\n## Syntax\n\n```js\nblob()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a [`Blob`](../../../globals/Blob/Blob.mdx).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the response body has already been consumed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Response/prototype/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.body\n\nThe **`body`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface is a [`ReadableStream`](../../../globals/ReadableStream/ReadableStream.mdx) of the body contents.\n\n## Value\n\nA [`ReadableStream`](../../../globals/ReadableStream/ReadableStream.mdx), or else `null` for any `Response` object [constructed](../../../globals/Response/Response.mdx) with a null `body` property, or for any actual HTTP response that has no body.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Response/prototype/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.bodyUsed\n\nThe **`bodyUsed`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface is a boolean value that indicates whether the body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Response/prototype/formData.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.formData()\n\nThe **`formData()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface takes a [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion. It returns a promise that resolves with a `FormData` object.\n\n## Syntax\n\n```js\nformData()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a [`FormData`](../../../globals/FormData/FormData.mdx) object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the response body has already been consumed.\n- `SyntaxError`\n  - : Thrown if the response's content type is not `multipart/form-data` or `application/x-www-form-urlencoded`, or if the content cannot be parsed as form data.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Response/prototype/headers.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.headers\n\nThe **`headers`** read-only property of the\n[`Response`](../../../globals/Response/Response.mdx) interface contains the [`Headers`](../../../globals/Headers/Headers.mdx) object associated\nwith the response.\n\n## Value\n\nA [`Headers`](../../Headers/Headers.mdx) object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Response/prototype/ip.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.ip\n\nThe **`ip`** getter of the `Response` interface returns the IP address associated with the request, as either an IPv6 or IPv4 string.\n\nIn the case where no IP address is available (say the response is cached, or was manually created), `undefined` will be returned.\n\nTo ensure an origin request with an IP, pass a [`CacheOverride`](../../../fastly:cache-override/CacheOverride/CacheOverride.mdx) value.\n\n## Value\n\n`undefined` or `string`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Response/prototype/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.json()\n\nThe **`json()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface takes\na [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion. It returns a promise which\nresolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA [`Promise`](../../../globals/Promise/Promise.mdx) that resolves to a JavaScript object. This object could be\nanything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Response/prototype/ok.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.ok\n\nThe **`ok`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains a Boolean stating whether the response was successful (status in the range 200-299) or not.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Response/prototype/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.port\n\nThe **`port`** getter of the `Response` interface returns the port associated with the request, as a number.\n\nIn the case where no port is available (say the response is cached, or was manually created), `undefined` will be returned.\n\nTo ensure an origin request with a port, pass a [`CacheOverride`](../../../fastly:cache-override/CacheOverride/CacheOverride.mdx) value.\n\n## Value\n\n`undefined` or `number`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Response/prototype/setManualFramingHeaders.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.setManualFramingHeaders()\n\nThe **`setManualFramingHeaders()`** method of the `Response` interface controls how the framing headers should be determined.\n\nBy default the framing headers are set to \"automatic\" mode, which means they are created based on the body of the associated Response instance.\nIn \"automatic\" mode, a `Content-Length` is used when the size of the body can be determined before it is sent.\nResponses sent in streaming mode, where headers are sent immediately but the content of the body is streamed later, will receive a `Transfer-Encoding: chunked` to accommodate the dynamic generation of the body.\nIn \"manual\" mode, any `Content-Length` or `Transfer-Encoding` headers will be honored.\nYou must ensure that those headers have correct values permitted by the [HTTP/1.1 specification](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).\nIf the provided headers are not permitted by the specification, the headers will revert to \"automatic\" mode and a diagnostic message will be logged about what was wrong.\nIf a `Content-Length` is permitted by the specification, but the value does not match the size of the actual body, the body will either be truncated (if it is too long), or the connection will be hung up early (if it is too short).\n\n## Syntax\n\n```js\nsetManualFramingHeaders(manual)\n```\n\n### Parameters\n\n- `manual` _: boolean_\n  - : Whether or not to use \"manual\" mode for the framing headers.\n\n### Return value\n\n`undefined`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Response/prototype/status.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.status\n\nThe **`status`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains the HTTP status code of the response.\n\nFor example, `200` for success, `404` if the resource could not be found.\n\n## Value\n\nAn unsigned short number.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Response/prototype/statusText.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.statusText\n\nThe **`statusText`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains the status message corresponding to the HTTP status code in [`status`](../../../globals/Response/prototype/status.mdx).\n\nFor example, this would be `OK` for a status code `200`, `Continue` for `100`, `Not Found` for `404`.\n\n## Value\n\nA [`String`](../../../globals/String/String.mdx) containing the HTTP status message associated with the response.\nThe default value is \"\".\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Response/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.text()\n\nThe **`text()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface takes a [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion.\nIt returns a promise that resolves with a [`String`](../../../globals/String/String.mdx).\nThe response is _always_ decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Promise that resolves with a [`String`](../../../globals/String/String.mdx).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Response/prototype/url.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.url\n\nThe **`url`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains the URL of the response.\nThe value of the `url` property will be the final URL obtained after any redirects.\n\n## Value\n\nA string.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Response/redirect.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Response.redirect()\n\nThe **`redirect()`** static method of the `Response` interface returns a `Response` resulting in a redirect to the specified URL.\n\n## Syntax\n\n```js\nResponse.redirect(url)\nResponse.redirect(url, status)\n```\n\n### Parameters\n\n- `url`\n  - : The URL that the new response is to originate from.\n- `status` __optional__\n  - : An optional status code for the response (e.g., `302`.)\n\n### Return value\n\nA `Response` object.\n\n### Exceptions\n\n- `RangeError`\n  - : The specified status is not a redirect status.\n- `TypeError`\n  - : The specified URL is invalid.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/RsaHashedImportParams/RsaHashedImportParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RsaHashedImportParams\n\nThe **`RsaHashedImportParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.importKey()`, when importing any RSA-based key pair.\n\n## Instance properties\n\n- `name`\n  - : A string. This should be set to `RSASSA-PKCS1-v1_5`.\n\n- `hash`\n  - : A string representing the name of the digest function to use. This can be one of `SHA-256`, `SHA-384`, or `SHA-512`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Set/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get Set\\[Symbol.species]\n\nThe **`Set[Symbol.species]`** accessor property is an unused accessor property specifying how to copy `Set` objects.\n\n## Syntax\n\n```js\nSet[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct copied `Set` instances.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `Set` objects. Subclass constructors may override it to change the constructor assignment.\n\n> **Note:** This property is currently unused by all `Set` methods.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Set/Set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set()\n\nThe **`Set` constructor** lets you\ncreate `Set` objects that store unique values of any type, whether [primitive values](https://developer.mozilla.org/docs/Glossary/Primitive) or object\nreferences.\n\n## Syntax\n\n```js\nnew Set()\nnew Set(iterable)\n```\n\n> **Note:** `Set()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable` _**optional**_\n\n  - : If an [iterable object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) is passed, all of its elements will be added to the new\n    `Set`.\n\n    If you don't specify this parameter, or its value is `null`, the new\n    `Set` is empty.\n\n### Return value\n\nA new `Set` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Set/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype\\[Symbol.iterator]()\n\nThe **`[Symbol.iterator`** method of a `Set` object implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows sets to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the values of the set.\n\nThe initial value of this property is the same function object as the initial value of the [`Set.prototype.values`](../../../globals/Set/prototype/values.mdx) property.\n\n## Syntax\n\n```js\nset[Symbol.iterator]()\n```\n\n### Return value\n\nThe same return value as [`Set.prototype.values()`](../../../globals/Set/prototype/values.mdx): a new iterable iterator object that yields the values of the set.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Set/prototype/add.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.add()\n\nThe **`add()`** method inserts a new element with a specified value in to a `Set` object, if there isn't an element with the same value already in the `Set`.\n\n## Syntax\n\n```js\nadd(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value of the element to add to the `Set` object.\n\n### Return value\n\nThe `Set` object with added value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Set/prototype/clear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.clear()\n\nThe **`clear()`** method removes all elements from a\n`Set` object.\n\n## Syntax\n\n```js\nclear()\n```\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Set/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.delete()\n\nThe **`delete()`** method removes a specified value from a\n`Set` object, if it is in the set.\n\n## Syntax\n\n```js\ndelete(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to remove from `Set`.\n\n### Return value\n\nReturns `true` if `value` was already in\n`Set`; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Set/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.entries()\n\nThe **`entries()`** method returns a new [Iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators) object\nthat contains **an array of `[value, value]`** for each element\nin the `Set` object, in insertion order. For `Set` objects there\nis no `key` like in `Map` objects. However, to keep the API\nsimilar to the `Map` object, each _entry_ has the same value for its\n_key_ and _value_ here, so that an array `[value, value]` is\nreturned.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nA new iterator object that contains an array of `[value, value]` for each\nelement in the given `Set`, in insertion order.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Set/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.forEach()\n\nThe **`forEach()`** method executes a provided function once\nfor each value in the `Set` object, in insertion order.\n\n## Syntax\n\n```js\n// Arrow function\nforEach(() => { /* ... */ } )\nforEach((value) => { /* ... */ } )\nforEach((value, key) => { /* ... */ } )\nforEach((value, key, set) => { /* ... */ } )\n\n// Callback function\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n\n// Inline callback function\nforEach(function() { /* ... */ })\nforEach(function(value) { /* ... */ })\nforEach(function(value, key) { /* ... */ })\nforEach(function(value, key, set) { /* ... */ })\nforEach(function(value, key, set) { /* ... */ }, thisArg)\n```\n\n### Parameters\n\n- `callback`\n\n  - : Function to execute for each element, taking three arguments:\n\n    - `value`, `key`\n      - : The current element being processed in the `Set`. As there are no\n        keys in `Set`, the value is passed for both arguments.\n    - `set`\n      - : The `Set` object which `forEach()` was called upon.\n\n- `thisArg`\n  - : Value to use as `this` when executing `callbackFn`.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n## Description\n\nThe `forEach()` method executes the provided\n`callback` once for each value which actually exists in the\n`Set` object. It is not invoked for values which have been deleted. However,\nit is executed for values which are present but have the value `undefined`.\n\n`callback` is invoked with **three arguments**:\n\n- the **element value**\n- the **element key**\n- the **`Set` object being traversed**\n\nThere are no keys in `Set` objects, however, so the first two arguments are\nboth **values** contained in the [Set](../../../globals/Set/Set.mdx). This is to make it\nconsistent with other `forEach()` methods for [`Map.prototype.forEach()`](../../../globals/Map/prototype/forEach.mdx) and [`Array.prototype.forEach()`](../../../globals/Array/prototype/forEach.mdx).\n\nIf a `thisArg` parameter is provided to `forEach()`,\nit will be passed to `callback` when invoked, for use as its\n`this` value. Otherwise, the value `undefined` will be passed for\nuse as its `this` value. The `this` value ultimately observable by\n`callback` is determined according to\n[the usual rules for determining the `this` seen by a function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this).\n\nEach value is visited once, except in the case when it was deleted and re-added before\n`forEach()` has finished. `callback` is not invoked for\nvalues deleted before being visited. New values added before `forEach()` has\nfinished will be visited.\n\n`forEach()` executes the `callback` function once for\neach element in the `Set` object; it does not return a value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Set/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.has()\n\nThe **`has()`** method returns a boolean indicating whether an\nelement with the specified value exists in a `Set` object or not.\n\n## Syntax\n\n```js\nhas(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to test for presence in the `Set` object.\n\n### Return value\n\nReturns `true` if an element with the specified value exists in the `Set` object; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Set/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.keys()\n\nThe **`keys()`** method is an alias for the [`values()`](../../../globals/Set/prototype/values.mdx) method.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nA new iterator object containing the values for each element in the given\n`Set`, in insertion order.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Set/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.size\n\nThe **`size`** accessor property returns the number of (unique) elements in a [Set](../../../globals/Set/Set.mdx) object.\n\n## Description\n\nThe value of `size` is an integer representing how many entries the `Set` object has. A set accessor function for `size` is `undefined`; you cannot change this property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Set/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.values()\n\nThe **`values()`** method returns a new [Iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators) object that\ncontains the values for each element in the `Set` object in insertion order.\n\n> **Note:** The **`keys()`** method is an alias\n> for this method (for similarity with [Map](../../../globals/Map/Map.mdx) objects), hence the\n> `keys()` page redirecting here. It behaves exactly the same and returns\n> **values** of `Set` elements.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nA new iterator object containing the values for each element in the given\n`Set`, in insertion order.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/String/String.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String() constructor\n\nThe **`String`** constructor is used to create a new\n`String` object. When called instead as a function, it performs type\nconversion to a \"primitive string\" which is usually more\nuseful.\n\n## Syntax\n\n```js\nnew String(thing)\nString(thing)\n```\n\n> **Note:** `String()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\n- `thing`\n  - : Anything to be converted to a string.\n\n### Return value\n\nWhen `String` is called as a constructor (with `new`), it creates a `String` object, which is **not** a primitive.\n\nWhen `String` is called as a function, it coerces the parameter to a string primitive. `Symbol` values would be converted to `\"Symbol(description)\"`, where `description` is the [description](../../globals/Symbol/prototype/description.mdx) of the Symbol, instead of throwing.\n\n> **Warning:** You should rarely find yourself using `String` as a constructor.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/String/fromCharCode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.fromCharCode()\n\nThe static **`String.fromCharCode()`** method returns a string\ncreated from the specified sequence of UTF-16 code units.\n\n## Syntax\n\n```js\nString.fromCharCode(num1)\nString.fromCharCode(num1, num2)\nString.fromCharCode(num1, num2, /* …, */ numN)\n```\n\n### Parameters\n\n- `num1, ..., numN`\n  - : A sequence of numbers that are UTF-16 code units. The range is between\n    `0` and `65535` (`0xFFFF`). Numbers greater than\n    `0xFFFF` are truncated. No validity checks are performed.\n\n### Return value\n\nA string of length `N` consisting of the\n`N` specified UTF-16 code units.\n\n## Description\n\nThis method returns a string and not a `String` object.\n\nBecause `fromCharCode()` is a static method of `String`, you\nalways use it as `String.fromCharCode()`, rather than as a method of a\n`String` object you created.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/String/fromCodePoint.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.fromCodePoint()\n\nThe static **`String.fromCodePoint()`** method returns a string\ncreated by using the specified sequence of code points.\n\n## Syntax\n\n```js\nString.fromCodePoint(num1)\nString.fromCodePoint(num1, num2)\nString.fromCodePoint(num1, num2, /* …, */ numN)\n```\n\n### Parameters\n\n- `num1, ..., numN`\n  - : A sequence of code points.\n\n### Return value\n\nA string created by using the specified sequence of code points.\n\n### Exceptions\n\n- A `RangeError` is thrown if an invalid Unicode\n  code point is given (e.g. `\"RangeError: NaN is not a valid code point\"`).\n\n## Description\n\nThis method returns a string (and _not_ a `String` object).\n\nBecause `fromCodePoint()` is a static method of `String`, you\nmust call it as `String.fromCodePoint()`, rather than as a method of a\n`String` object you created.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/String/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype\\[Symbol.iterator]()\n\nThe **`Symbol.iterator`** method of a string implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows strings to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the Unicode code points of the string value as individual strings.\n\n## Syntax\n\n```js\nstring[Symbol.iterator]()\n```\n\n### Return value\n\nA new iterable iterator object that yields the Unicode code points of the string value as individual strings.\n\n## Description\n\nStrings are iterated by Unicode code points. This means grapheme clusters will be split, but surrogate pairs will be preserved.\n\n```js\n// \"Backhand Index Pointing Right: Dark Skin Tone\"\n[...\"👉🏿\"]; // ['👉', '🏿']\n// splits into the basic \"Backhand Index Pointing Right\" emoji and\n// the \"Dark skin tone\" emoji\n\n// \"Family: Man, Boy\"\n[...\"👨‍👦\"]; // [ '👨', '‍', '👦' ]\n// splits into the \"Man\" and \"Boy\" emoji, joined by a ZWJ\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/String/prototype/at.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.at()\n\nThe **`at()`** method takes an integer value and returns a `('String` consisting of the single UTF-16 code unit located at the specified offset. This method allows for positive and negative integers. Negative integers count back from the last string character.\n\n## Syntax\n\n```js\nat(index)\n```\n\n### Parameters\n\n- `index`\n  - : The index (position) of the string character to be returned. Supports relative indexing from the end of the string when passed a negative index; i.e. if a negative number is used, the character returned will be found by counting back from the end of the string.\n\n### Return value\n\n`('String` consisting of the single UTF-16 code unit located at the specified position. Returns [`undefined`](../../../globals/undefined.mdx) if the given index can not be found.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/String/prototype/charAt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.charAt()\n\nThe `String` object's\n**`charAt()`** method returns a new string consisting of the\nsingle UTF-16 code unit located at the specified offset into the string.\n\n## Syntax\n\n```js\ncharAt(index)\n```\n\n### Parameters\n\n- `index`\n  - : An integer between `0` and `str.length - 1`. If the\n    `index` cannot be converted to the integer or no\n    `index` is provided, the default is `0`, so the first\n    character of `str` is returned.\n\n### Return value\n\nA string representing the character (exactly one UTF-16 code unit) at the specified\n`index`. If `index` is out of range,\n`charAt()` returns an empty string.\n\n## Description\n\nCharacters in a string are indexed from left to right. The index of the first character\nis `0`, and the index of the last character—in a string called\n`stringName` is `stringName.length - 1`. If\nthe `index` you supply is out of this range, JavaScript returns an\nempty string.\n\nIf no `index` is provided to `charAt()`, the default\nis `0`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/String/prototype/charCodeAt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.charCodeAt()\n\nThe **`charCodeAt()`** method returns\nan integer between `0` and `65535` representing the UTF-16 code\nunit at the given index.\n\nThe UTF-16 code unit matches the Unicode code point for code points which can be\nrepresented in a single UTF-16 code unit. If the Unicode code point cannot be\nrepresented in a single UTF-16 code unit (because its value is greater than\n`0xFFFF`) then the code unit returned will be _the first part of a\nsurrogate pair_ for the code point. If you want the entire code point value, use\n[`codePointAt()`](../../../globals/String/prototype/codePointAt.mdx).\n\n## Syntax\n\n```js\ncharCodeAt(index)\n```\n\n### Parameters\n\n- `index`\n  - : An integer greater than or equal to `0` and less than the\n    `length` of the string. If `index` is not a number,\n    it defaults to `0`.\n\n### Return value\n\nA number representing the UTF-16 code unit value of the character at the given\n`index`. If `index` is out of range,\n`charCodeAt()` returns `NaN`.\n\n## Description\n\nUnicode code points range from `0` to `1114111`\n(`0x10FFFF`). The first 128 Unicode code points are a direct match of the\nASCII character encoding. (For information on Unicode, see [UTF-16 characters, Unicode codepoints, and grapheme clusters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters).)\n\n> **Note:** `charCodeAt()` will always return a value that is\n> less than `65536`. This is because the higher code points are represented\n> by _a pair_ of (lower valued) \"surrogate\" pseudo-characters which are used to\n> comprise the real character.\n>\n> Because of this, in order to examine (or reproduce) the full character for individual\n> character values of `65536` or greater, for such characters, it is\n> necessary to retrieve not only `charCodeAt(i)`, but also\n> `charCodeAt(i+1)` (as if manipulating a string with two\n> letters), or to use `codePointAt(i)` instead. See examples 2 and\n> 3 (below).\n\n`charCodeAt()` returns `NaN` if the given\nindex is less than `0`, or if it is equal to or greater than the\n`length` of the string.\n\nBackward compatibility: In historic versions (like JavaScript 1.2) the\n`charCodeAt()` method returns a number indicating the ISO-Latin-1 codeset\nvalue of the character at the given index. The ISO-Latin-1 codeset ranges from\n`0` to `255`. The first `0` to `127` are a\ndirect match of the ASCII character set.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/String/prototype/codePointAt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.codePointAt()\n\nThe **`codePointAt()`** method returns a non-negative integer\nthat is the Unicode code point value at the given position.\nNote that this function does not give the nth code point in a string,\nbut the code point starting at the specified string index.\n\n## Syntax\n\n```js\ncodePointAt(pos)\n```\n\n### Parameters\n\n- `pos`\n  - : Position of an element in `str` to return the code point value\n    from.\n\n### Return value\n\nA decimal number representing the code point value of the character at the given `pos`.\n\n- If there is no element at `pos`, returns [`undefined`](../../../globals/undefined.mdx).\n- If the element at `pos` is a UTF-16 high surrogate, returns the code point of the surrogate _pair_.\n- If the element at `pos` is a UTF-16 low surrogate, returns _only_ the low surrogate code point.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/String/prototype/concat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.concat()\n\nThe **`concat()`** method concatenates\nthe string arguments to the calling string and returns a new string.\n\n## Syntax\n\n```js\nconcat(str1)\nconcat(str1, str2)\nconcat(str1, str2, /* …, */ strN)\n```\n\n### Parameters\n\n- `strN`\n  - : One or more strings to concatenate to `str`.\n\n### Return value\n\nA new string containing the combined text of the strings provided.\n\n## Description\n\nThe `concat()` function concatenates the string arguments to the calling\nstring and returns a new string. Changes to the original string or the returned string\ndon't affect the other.\n\nIf the arguments are not of the type string, they are converted to string values before\nconcatenating.\n\nThe `concat()` method is very similar to the [addition/string concatenation operators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Addition) (`+`, `+=`), except that `concat()` [coerces its arguments directly to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion), while addition coerces its operands to primitives first. For more information, see the reference page for the [`+` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Addition).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/String/prototype/endsWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.endsWith()\n\nThe **`endsWith()`** method determines whether a string ends with the characters of a specified string, returning `true` or `false` as appropriate.\n\n## Syntax\n\n```js\nendsWith(searchString)\nendsWith(searchString, endPosition)\n```\n\n### Parameters\n\n- `searchString`\n  - : The characters to be searched for at the end of `str`. Cannot be a regex.\n- `endPosition` _**optional**_\n  - : The end position at which `searchString` is expected to be found (the index of `searchString`'s last character plus 1). Defaults to `str.length`.\n\n### Return value\n\n**`true`** if the given characters are found at the end of the string; otherwise, **`false`**.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If `searchString` is a regex.\n\n## Description\n\nThis method lets you determine whether or not a string ends with another string. This method is case-sensitive.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/String/prototype/includes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.includes()\n\nThe **`includes()`** method performs a case-sensitive search to determine whether one string may be found within another string, returning `true` or `false` as appropriate.\n\n## Syntax\n\n```js\nincludes(searchString)\nincludes(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n  - : A string to be searched for within `str`. Cannot be a regex.\n- `position` _**optional**_\n  - : The position within the string at which to begin searching for `searchString`. (Defaults to `0`.)\n\n### Return value\n\n**`true`** if the search string is found anywhere within the given string; otherwise, **`false`** if not.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If `searchString` is a regex.\n\n## Description\n\nThis method lets you determine whether or not a string includes another string.\n\n### Case-sensitivity\n\nThe `includes()` method is case sensitive. For example, the following expression returns `false`:\n\n```js\n\"Blue Whale\".includes(\"blue\"); // returns false\n```\n\nYou can work around this constraint by transforming both the original string and the search string to all lowercase:\n\n```js\n\"Blue Whale\".toLowerCase().includes(\"blue\"); // returns true\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/String/prototype/indexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.indexOf()\n\nThe **`indexOf()`** method, given one argument: a substring to search for, searches the entire calling string, and returns the index of the first occurrence of the specified substring. Given a second argument: a number, the method returns the first occurrence of the specified substring at an index greater than or equal to the specified number.\n\n## Syntax\n\n```js\nindexOf(searchString)\nindexOf(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n\n  - : Substring to search for, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion).\n\n    If the method is called with no arguments, `searchString` is coerced to `\"undefined\"`. Therefore,`\"undefined\".indexOf()` returns `0` — because the substring `\"undefined\"` is found at position `0` in the string `\"undefined\"`. But `\"undefine\".indexOf()`, returns `-1` — because the substring `\"undefined\"` is not found in the string `\"undefine\"`.\n\n- `position` _**optional**_\n\n  - : The method returns the index of the first occurrence of the specified substring at a position greater than or equal to `position`, which defaults to `0`. If `position` is greater than the length of the calling string, the method doesn't search the calling string at all. If `position` is less than zero, the method behaves as it would if `position` were `0`.\n\n    - `'hello world hello'.indexOf('o', -5)` returns `4` — because it causes the method to behave as if the second argument were `0`, and the first occurrence of `o` at a position greater or equal to `0` is at position `4`.\n\n    - `'hello world hello'.indexOf('world', 12)` returns `-1` — because, while it's true the substring `world` occurs at index `6`, that position is not greater than or equal to `12`.\n\n    - `'hello world hello'.indexOf('o', 99)` returns `-1` — because `99` is greater than the length of `hello world hello`, which causes the method to not search the string at all.\n\n### Return value\n\nThe index of the first occurrence of `searchString` found, or `-1` if not found.\n\n#### Return value when using an empty search string\n\nSearching for an empty search string produces strange results. With no second argument, or with a second argument whose value is less than the calling string's length, the return value is the same as the value of the second argument:\n\n```js\n\"hello world\".indexOf(\"\"); // returns 0\n\"hello world\".indexOf(\"\", 0); // returns 0\n\"hello world\".indexOf(\"\", 3); // returns 3\n\"hello world\".indexOf(\"\", 8); // returns 8\n```\n\nHowever, with a second argument whose value is greater than or equal to the string's length, the return value is the string's length:\n\n```js\n\"hello world\".indexOf(\"\", 11); // returns 11\n\"hello world\".indexOf(\"\", 13); // returns 11\n\"hello world\".indexOf(\"\", 22); // returns 11\n```\n\nIn the former instance, the method behaves as if it found an empty string just after the position specified in the second argument. In the latter instance, the method behaves as if it found an empty string at the end of the calling string.\n\n## Description\n\nStrings are zero-indexed: The index of a string's first character is `0`, and the index of a string's last character is the length of the string minus 1.\n\n```js\n\"Blue Whale\".indexOf(\"Blue\"); // returns  0\n\"Blue Whale\".indexOf(\"Blute\"); // returns -1\n\"Blue Whale\".indexOf(\"Whale\", 0); // returns  5\n\"Blue Whale\".indexOf(\"Whale\", 5); // returns  5\n\"Blue Whale\".indexOf(\"Whale\", 7); // returns -1\n\"Blue Whale\".indexOf(\"\"); // returns  0\n\"Blue Whale\".indexOf(\"\", 9); // returns  9\n\"Blue Whale\".indexOf(\"\", 10); // returns 10\n\"Blue Whale\".indexOf(\"\", 11); // returns 10\n```\n\nThe `indexOf()` method is case sensitive. For example, the following\nexpression returns `-1`:\n\n```js\n\"Blue Whale\".indexOf(\"blue\"); // returns -1\n```\n\n### Checking occurrences\n\nWhen checking if a specific substring occurs within a string, the correct way to check is test whether the return value is `-1`:\n\n```js\n\"Blue Whale\".indexOf(\"Blue\") !== -1; // true; found 'Blue' in 'Blue Whale'\n\"Blue Whale\".indexOf(\"Bloe\") !== -1; // false; no 'Bloe' in 'Blue Whale'\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/String/prototype/lastIndexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.lastIndexOf()\n\nThe **`lastIndexOf()`** method, given one argument: a substring to search for, searches the entire calling string, and returns the index of the last occurrence of the specified substring. Given a second argument: a number, the method returns the last occurrence of the specified substring at an index less than or equal to the specified number.\n\n## Syntax\n\n```js\nlastIndexOf(searchString)\nlastIndexOf(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n\n  - : Substring to search for, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion).\n\n    If the method is called with no arguments, `searchString` is coerced to `\"undefined\"`. Therefore,`\"undefined\".lastIndexOf()` returns `0` — because the substring `\"undefined\"` is found at position `0` in the string `\"undefined\"`. But `\"undefine\".lastIndexOf()`, returns `-1` — because the substring `\"undefined\"` is not found in the string `\"undefine\"`.\n\n- `position` _**optional**_\n\n  - : The method returns the index of the last occurrence of the specified substring at a position less than or equal to `position`, which defaults to `+Infinity`. If `position` is greater than the length of the calling string, the method searches the entire string. If `position` is less than `0`, the behavior is the same as for `0` — that is, the method looks for the specified substring only at index `0`.\n\n    - `'hello world hello'.lastIndexOf('world', 4)` returns `-1` — because, while the substring `world` does occurs at index `6`, that position is not less than or equal to `4`.\n\n    - `'hello world hello'.lastIndexOf('hello', 99)` returns `12` — because the last occurrence of `hello` at a position less than or equal to `99` is at position `12`.\n\n    - `'hello world hello'.lastIndexOf('hello', 0)` and `'hello world hello'.lastIndexOf('hello', -5)` both return `0` — because both cause the method to only look for `hello` at index `0`.\n\n### Return value\n\nThe index of the last occurrence of `searchString` found, or `-1` if not found.\n\n## Description\n\nStrings are zero-indexed: The index of a string's first character is `0`, and the index of a string's last character is the length of the string minus 1.\n\n```js\n\"canal\".lastIndexOf(\"a\"); // returns 3\n\"canal\".lastIndexOf(\"a\", 2); // returns 1\n\"canal\".lastIndexOf(\"a\", 0); // returns -1\n\"canal\".lastIndexOf(\"x\"); // returns -1\n\"canal\".lastIndexOf(\"c\", -5); // returns 0\n\"canal\".lastIndexOf(\"c\", 0); // returns 0\n\"canal\".lastIndexOf(\"\"); // returns 5\n\"canal\".lastIndexOf(\"\", 2); // returns 2\n```\n\n### Case-sensitivity\n\nThe `lastIndexOf()` method is case sensitive. For example, the following\nexpression returns `-1`:\n\n```js\n\"Blue Whale, Killer Whale\".lastIndexOf(\"blue\"); // returns -1\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/String/prototype/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.length\n\nThe **`length`** data property of a string contains the length of the string in UTF-16 code units.\n\n## Value\n\nA non-negative integer.\n\n## Description\n\nThis property returns the number of code units in the string. JavaScript uses [UTF-16](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters) encoding, where each Unicode character may be encoded as one or two code units, so it's possible for the value returned by `length` to not match the actual number of Unicode characters in the string. For common scripts like Latin, Cyrillic, wellknown CJK characters, etc., this should not be an issue, but if you are working with certain scripts, such as emojis, [mathematical symbols](https://en.wikipedia.org/wiki/Mathematical_Alphanumeric_Symbols), or obscure Chinese characters, you may need to account for the difference between code units and characters.\n\nThe language specification requires strings to have a maximum length of 2<sup>53</sup> - 1 elements, which is the upper limit for [precise integers](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER). However, a string with this length needs 16384TiB of storage, which cannot fit in any reasonable device's memory, so implementations tend to lower the threshold, which allows the string's length to be conveniently stored in a 32-bit integer.\n\n- In V8 (used by Chrome and Node), the maximum length is 2<sup>29</sup> - 24 (\\~1GiB). On 32-bit systems, the maximum length is 2<sup>28</sup> - 16 (\\~512MiB).\n- In Firefox, the maximum length is 2<sup>30</sup> - 2 (\\~2GiB). Before Firefox 65, the maximum length was 2<sup>28</sup> - 1 (\\~512MiB).\n- In Safari, the maximum length is 2<sup>31</sup> - 1 (\\~4GiB).\n\nFor an empty string, `length` is 0.\n\nThe static property `String.length` is unrelated to the length of strings. It's the [arity](../../../globals/Function/prototype/length.mdx) of the `String` function (loosely, the number of formal parameters it has), which is 1.\n\nSince `length` counts code units instead of characters, if you want to get the number of characters, you can first split the string with its [iterator](../../../globals/String/prototype/@@iterator.mdx), which iterates by characters:\n\n```js\nfunction getCharacterLength(str) {\n  // The string iterator that is used here iterates over characters,\n  // not mere code units\n  return [...str].length;\n}\n\nconsole.log(getCharacterLength(\"A\\uD87E\\uDC04Z\")); // 3\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/String/prototype/localeCompare.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.localeCompare()\n\nThe **`localeCompare()`** method returns a number indicating whether a reference string comes before, or after, or is the same as the given string in sort order. In implementations with [`Intl.Collator` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator) support, this method simply calls `Intl.Collator`.\n\n## Syntax\n\n```js\nlocaleCompare(compareString)\nlocaleCompare(compareString, locales)\nlocaleCompare(compareString, locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` parameters customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.Collator` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator), these parameters correspond exactly to the [`Intl.Collator()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator) constructor's parameters. Implementations without `Intl.Collator` support are asked to ignore both parameters, making the comparison result returned entirely implementation-dependent — it's only required to be _consistent_.\n\n- `compareString`\n  - : The string against which the `referenceStr` is compared.\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator#locales) parameter of the `Intl.Collator()` constructor.\n\n    In implementations without `Intl.Collator` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator#options) parameter of the `Intl.Collator()` constructor.\n\n    In implementations without `Intl.Collator` support, this parameter is ignored.\n\nSee the [`Intl.Collator()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator) for details on the `locales` and `options` parameters and how to use them.\n\n### Return value\n\nA **negative** number if `referenceStr` occurs before `compareString`; **positive** if the `referenceStr` occurs after `compareString`; `0` if they are equivalent.\n\nIn implementations with `Intl.Collator`, this is equivalent to `new Intl.Collator(locales, options).compare(referenceStr, compareString)`.\n\n## Description\n\nReturns an integer indicating whether the `referenceStr` comes\nbefore, after or is equivalent to the `compareString`.\n\n- Negative when the `referenceStr` occurs before\n  `compareString`\n- Positive when the `referenceStr` occurs after\n  `compareString`\n- Returns `0` if they are equivalent\n\n> **Warning:** Do not rely on exact return values of `-1` or `1`!\n>\n> Negative and positive integer results vary between browsers (as well as between\n> browser versions) because the W3C specification only mandates negative and positive\n> values. Some browsers may return `-2` or `2`, or even some other\n> negative or positive value.\n\n## Performance\n\nWhen comparing large numbers of strings, such as in sorting large arrays, it is better to create an [`Intl.Collator`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator) object and use the function provided by its [`compare()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/compare) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/String/prototype/match.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.match()\n\nThe **`match()`** method retrieves the result of matching a string against a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions).\n\n## Syntax\n\n```js\nmatch(regexp)\n```\n\n### Parameters\n\n- `regexp`\n\n  - : A regular expression object, or any object that has a [`Symbol.match`](../../../globals/Symbol/match.mdx) method.\n\n    If `regexp` is not a `RegExp` object and does not have a `Symbol.match` method, it is implicitly converted to a `RegExp` by using `new RegExp(regexp)`.\n\n    If you don't give any parameter and use the `match()` method directly, you will get an `Array` with an empty string: `[\"\"]`, because this is equivalent to `match(/(?:)/)`.\n\n### Return value\n\nAn `Array` whose contents depend on the presence or absence of the global (`g`) flag, or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) if no matches are found.\n\n- If the `g` flag is used, all results matching the complete regular expression will be returned, but capturing groups are not included.\n- If the `g` flag is not used, only the first complete match and its related capturing groups are returned. In this case, `match()` will return the same result as `RegExp.prototype.exec()` (an array with some extra properties).\n\n## Description\n\nThe implementation of `String.prototype.match` itself is very simple — it simply calls the `Symbol.match` method of the argument with the string as the first parameter. The actual implementation comes from [`RegExp.prototype[@@match]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@match).\n\n- If you need to know if a string matches a regular expression `RegExp`, use `RegExp.prototype.test()`.\n- If you only want the first match found, you might want to use `RegExp.prototype.exec()` instead.\n- If you want to obtain capture groups and the global flag is set, you need to use `RegExp.prototype.exec()` or [`String.prototype.matchAll()`](../../../globals/String/prototype/matchAll.mdx) instead.\n\nFor more information about the semantics of `match()` when a regex is passed, see [`RegExp.prototype[@@match]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@match).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/String/prototype/matchAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.matchAll()\n\nThe **`matchAll()`** method returns an iterator of all results matching a string against a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions), including [capturing groups](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions/Groups_and_Backreferences).\n\n## Syntax\n\n```js\nmatchAll(regexp)\n```\n\n### Parameters\n\n- `regexp`\n\n  - : A regular expression object, or any object that has a [`Symbol.matchAll`](../../../globals/Symbol/matchAll.mdx) method.\n\n    If `regexp` is not a `RegExp` object and does not have a `Symbol.matchAll` method, it is implicitly converted to a `RegExp` by using `new RegExp(regexp, 'g')`.\n\n    If `regexp` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes), then it must have the global (`g`) flag set, or a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Return value\n\nAn [iterable iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators) (which is not restartable) of matches. Each match is an array with the same shape as the return value of `RegExp.prototype.exec()`.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown if the `regexp` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes) that does not have the global (`g`) flag set (its [`flags`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/flags) property does not contain `\"g\"`).\n\n## Description\n\nThe implementation of `String.prototype.matchAll` itself is very simple — it simply calls the `Symbol.matchAll` method of the argument with the string as the first parameter (apart from the extra input validation that the regex is global). The actual implementation comes from [`RegExp.prototype[@@matchAll]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@matchAll).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/String/prototype/padEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.padEnd()\n\nThe **`padEnd()`** method pads the current string with a given\nstring (repeated, if needed) so that the resulting string reaches a given length. The\npadding is applied from the end of the current string.\n\n## Syntax\n\n```js\npadEnd(targetLength)\npadEnd(targetLength, padString)\n```\n\n### Parameters\n\n- `targetLength`\n  - : The length of the resulting string once the current `str` has\n    been padded. If the value is lower than `str.length`, the\n    current string will be returned as-is.\n- `padString` _**optional**_\n  - : The string to pad the current `str` with. If\n    `padString` is too long to stay within\n    `targetLength`, it will be truncated: for left-to-right\n    languages the left-most part and for right-to-left languages the right-most will be\n    applied. The default value for this parameter is \" \"\n    (`U+0020`).\n\n### Return value\n\nA `String` of the specified `targetLength` with the\n`padString` applied at the end of the current\n`str`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/String/prototype/padStart.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.padStart()\n\nThe **`padStart()`** method pads the\ncurrent string with another string (multiple times, if needed) until the resulting\nstring reaches the given length. The padding is applied from the start of the\ncurrent string.\n\n## Syntax\n\n```js\npadStart(targetLength)\npadStart(targetLength, padString)\n```\n\n### Parameters\n\n- `targetLength`\n  - : The length of the resulting string once the current `str` has\n    been padded. If the value is less than `str.length`, then\n    `str` is returned as-is.\n- `padString` _**optional**_\n  - : The string to pad the current `str` with. If\n    `padString` is too long to stay within the\n    `targetLength`, it will be truncated from the end.\n    The default value is the unicode \"space\" character (U+0020).\n\n### Return value\n\nA `String` of the specified `targetLength` with\n`padString` applied from the start.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/String/prototype/repeat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.repeat()\n\nThe **`repeat()`** method constructs and returns a new string\nwhich contains the specified number of copies of the string on which it was called,\nconcatenated together.\n\n## Syntax\n\n```js\nrepeat(count)\n```\n\n### Parameters\n\n- `count`\n  - : An integer between `0` and\n    [`+Infinity`](../../../globals/Number/POSITIVE_INFINITY.mdx), indicating the\n    number of times to repeat the string.\n\n### Return value\n\nA new string containing the specified number of copies of the given string.\n\n### Exceptions\n\n- Throws a `RangeError` if repeat count is negative.\n- Throws a `RangeError` if repeat count is infinity or overflows maximum string size.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/String/prototype/replace.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.replace()\n\nThe **`replace()`** method returns a new string with one, some, or all matches of a `pattern` replaced by a `replacement`. The `pattern` can be a string or a `RegExp`, and the `replacement` can be a string or a function called for each match. If `pattern` is a string, only the first occurrence will be replaced. The original string is left unchanged.\n\n## Syntax\n\n```js\nreplace(pattern, replacement)\n```\n\n### Parameters\n\n- `pattern`\n  - : Can be a string or an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method — the typical example being a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp). Any value that doesn't have the `Symbol.replace` method will be coerced to a string.\n- `replacement`\n  - : Can be a string or a function.\n    - If it's a string, it will replace the substring matched by `pattern`. A number of special replacement patterns are supported; see the [Specifying a string as the replacement](#specifying-a-string-as-the-replacement) section below.\n    - If it's a function, it will be invoked for every match and its return value is used as the replacement text. The arguments supplied to this function are described in the [Specifying a function as the replacement](#specifying-a-function-as-the-replacement) section below.\n\n### Return value\n\nA new string, with one, some, or all matches of the pattern replaced by the specified replacement.\n\n## Description\n\nThis method does not mutate the string value it's called on. It returns a new string.\n\nA string pattern will only be replaced once. To perform a global search and replace, use a regular expression with the `g` flag, or use [`replaceAll()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/replaceAll) instead.\n\nIf `pattern` is an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method (including `RegExp` objects), that method is called with the target string and `replacement` as arguments. Its return value becomes the return value of `replace()`. In this case the behavior of `replace()` is entirely encoded by the `@@replace` method — for example, any mention of \"capturing groups\" in the description below is actually functionality provided by [`RegExp.prototype[@@replace]`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@replace).\n\nIf the `pattern` is an empty string, the replacement is prepended to the start of the string.\n\n```js\n\"xxx\".replace(\"\", \"_\"); // \"_xxx\"\n```\n\nA regexp with the `g` flag is the only case where `replace()` replaces more than once. For more information about how regex properties (especially the [sticky](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky) flag) interact with `replace()`, see [`RegExp.prototype[@@replace]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@replace).\n\n### Specifying a string as the replacement\n\nThe replacement string can include the following special replacement patterns:\n\n| Pattern   | Inserts                                                                                        |\n| --------- | ---------------------------------------------------------------------------------------------- |\n| `$$`      | Inserts a `\"$\"`.                                                                               |\n| `$&`      | Inserts the matched substring.                                                                 |\n| `` $` ``  | Inserts the portion of the string that precedes the matched substring.                         |\n| `$'`      | Inserts the portion of the string that follows the matched substring.                          |\n| `$n`      | Inserts the `n`th (`1`-indexed) capturing group where `n` is a positive integer less than 100. |\n| `$<Name>` | Inserts the named capturing group where `Name` is the group name.                              |\n\n`$n` and `$<Name>` are only available if the `pattern` argument is a `RegExp` object. If the `pattern` is a string, or if the corresponding capturing group isn't present in the regex, then the pattern will be replaced as a literal. If the group is present but isn't matched (because it's part of a disjunction), it will be replaced with an empty string.\n\n```js\n\"foo\".replace(/(f)/, \"$2\");\n// \"$2oo\"; the regex doesn't have the second group\n\n\"foo\".replace(\"f\", \"$1\");\n// \"$1oo\"; the pattern is a string, so it doesn't have any groups\n\n\"foo\".replace(/(f)|(g)/, \"$2\");\n// \"oo\"; the second group exists but isn't matched\n```\n\n### Specifying a function as the replacement\n\nYou can specify a function as the second parameter. In this case, the function will be invoked after the match has been performed. The function's result (return value) will be used as the replacement string.\n\n> **Note:** The above-mentioned special replacement patterns do _not_ apply for strings returned from the replacer function.\n\nThe function has the following signature:\n\n```js\nfunction replacer(match, p1, p2, /* …, */ pN, offset, string, groups) {\n  return replacement;\n}\n```\n\nThe arguments to the function are as follows:\n\n- `match`\n  - : The matched substring. (Corresponds to `$&` above.)\n- `p1, p2, …, pN`\n  - : The `n`th string found by a capture group (including named capturing groups), provided the first argument to `replace()` is a `RegExp` object. (Corresponds to `$1`, `$2`, etc. above.) For example, if the `pattern` is `/(\\a+)(\\b+)/`, then `p1` is the match for `\\a+`, and `p2` is the match for `\\b+`. If the group is part of a disjunction (e.g. `\"abc\".replace(/(a)|(b)/, replacer)`), the unmatched alternative will be `undefined`.\n- `offset`\n  - : The offset of the matched substring within the whole string being examined. For example, if the whole string was `'abcd'`, and the matched substring was `'bc'`, then this argument will be `1`.\n- `string`\n  - : The whole string being examined.\n- `groups`\n  - : An object whose keys are the used group names, and whose values are the matched portions (`undefined` if not matched). Only present if the `pattern` contains at least one named capturing group.\n\nThe exact number of arguments depends on whether the first argument is a `RegExp` object — and, if so, how many capture groups it has.\n\nThe following example will set `newString` to `'abc - 12345 - #$*%'`:\n\n```js\nfunction replacer(match, p1, p2, p3, offset, string) {\n  // p1 is non-digits, p2 digits, and p3 non-alphanumerics\n  return [p1, p2, p3].join(\" - \");\n}\nconst newString = \"abc12345#$*%\".replace(/([^\\d]*)(\\d*)([^\\w]*)/, replacer);\nconsole.log(newString); // abc - 12345 - #$*%\n```\n\nThe function will be invoked multiple times for each full match to be replaced if the regular expression in the first parameter is global.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/String/prototype/replaceAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.replaceAll()\n\nThe **`replaceAll()`** method returns a new string with all matches of a `pattern` replaced by a `replacement`. The `pattern` can be a string or a `RegExp`, and the `replacement` can be a string or a function to be called for each match. The original string is left unchanged.\n\n## Syntax\n\n```js\nreplaceAll(pattern, replacement)\n```\n\n### Parameters\n\n- `pattern`\n\n  - : Can be a string or an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method — the typical example being a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp). Any value that doesn't have the `Symbol.replace` method will be coerced to a string.\n\n    If `pattern` is a regex, then it must have the global (`g`) flag set, or a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n- `replacement`\n  - : Can be a string or a function. The replacement has the same semantics as that of [`String.prototype.replace()`](../../../globals/String/prototype/replace.mdx).\n\n### Return value\n\nA new string, with all matches of a pattern replaced by a replacement.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown if the `pattern` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes) that does not have the global (`g`) flag set (its [`flags`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/flags) property does not contain `\"g\"`).\n\n## Description\n\nThis method does not mutate the string value it's called on. It returns a new string.\n\nUnlike [`String.prototype.replace()`](../../../globals/String/prototype/replace.mdx), this method would replace all occurrences of a string, not just the first one. This is especially useful if the string is not statically known, as calling the [`RegExp()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/RegExp) constructor without escaping special characters may unintentionally change its semantics.\n\n```js\nfunction unsafeRedactName(text, name) {\n  return text.replace(new RegExp(name, \"g\"), \"[REDACTED]\");\n}\nfunction safeRedactName(text, name) {\n  return text.replaceAll(name, \"[REDACTED]\");\n}\n\nconst report =\n  \"A hacker called ha.*er used special characters in their name to breach the system.\";\n\nconsole.log(unsafeRedactName(report, \"ha.*er\")); // \"A [REDACTED]s in their name to breach the system.\"\nconsole.log(safeRedactName(report, \"ha.*er\")); // \"A hacker called [REDACTED] used special characters in their name to breach the system.\"\n```\n\nIf `pattern` is an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method (including `RegExp` objects), that method is called with the target string and `replacement` as arguments. Its return value becomes the return value of `replaceAll()`. In this case the behavior of `replaceAll()` is entirely encoded by the `Symbol.replace` method, and therefore will have the same result as `replace()` (apart from the extra input validation that the regex is global).\n\nIf the `pattern` is an empty string, the replacement will be inserted in between every UTF-16 code unit, similar to [`String.prototype.split()`](../../../globals/String/prototype/split.mdx) behavior.\n\n```js\n\"xxx\".replaceAll(\"\", \"_\"); // \"_x_x_x_\"\n```\n\nFor more information about how regex properties (especially the [sticky](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky) flag) interact with `replaceAll()`, see [`RegExp.prototype[@@replace]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@replace).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/String/prototype/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.search()\n\nThe **`search()`** method executes a search for a match between a regular expression and this `String` object.\n\n## Syntax\n\n```js\nsearch(regexp)\n```\n\n### Parameters\n\n- `regexp`\n\n  - : A regular expression object, or any object that has a [`Symbol.search`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/search) method.\n\n    If `regexp` is not a `RegExp` object and does not have a `Symbol.search` method, it is implicitly converted to a `RegExp` by using `new RegExp(regexp)`.\n\n### Return value\n\nThe index of the first match between the regular expression and the given string, or `-1` if no match was found.\n\n## Description\n\nThe implementation of `String.prototype.search()` itself is very simple — it simply calls the `Symbol.search` method of the argument with the string as the first parameter. The actual implementation comes from [`RegExp.prototype[@@search]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@search).\n\nThe `g` flag of `regexp` has no effect on the `search()` result, and the search always happens as if the regex's `lastIndex` is 0. For more information on the behavior of `search()`, see [`RegExp.prototype[@@search]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@search).\n\nWhen you want to know whether a pattern is found, and _also_ know its index within a string, use `search()`.\n\n- If you only want to know if it exists, use the `RegExp.prototype.test()` method, which returns a boolean.\n- If you need the content of the matched text, use `String.prototype.match()` or `RegExp.prototype.exec()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/String/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.slice()\n\nThe **`slice()`** method extracts a section of a string and\nreturns it as a new string, without modifying the original string.\n\n## Syntax\n\n```js\nslice(indexStart)\nslice(indexStart, indexEnd)\n```\n\n### Parameters\n\n- `indexStart`\n  - : The index of the first character to include in the returned substring.\n- `indexEnd` _**optional**_\n  - : The index of the first character to exclude from the returned substring.\n\n### Return value\n\nA new string containing the extracted section of the string.\n\n## Description\n\n`slice()` extracts the text from one string and returns a new string. Changes to the text in one string do not affect the other string.\n\n`slice()` extracts up to but not including `indexEnd`. For example, `str.slice(1, 4)` extracts the second character through the fourth character (characters indexed `1`, `2`, and `3`).\n\n- If `indexStart >= str.length`, an empty string is returned.\n- If `indexStart < 0`, the index is counted from the end of the string. More formally, in this case, the substring starts at `max(indexStart + str.length, 0)`.\n- If `indexStart` is omitted, undefined, or cannot be converted to a number (using [`Number()`](../../../globals/Number/Number.mdx)), it's treated as `0`.\n- If `indexEnd` is omitted, undefined, or cannot be converted to a number (using [`Number()`](../../../globals/Number/Number.mdx)), or if `indexEnd >= str.length`, `slice()` extracts to the end of the string.\n- If `indexEnd < 0`, the index is counted from the end of the string. More formally, in this case, the substring ends at `max(indexEnd + str.length, 0)`.\n- If `indexEnd <= indexStart` after normalizing negative values (i.e. `indexEnd` represents a character that's before `indexStart`), an empty string is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/String/prototype/split.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.split()\n\nThe **`split()`** method takes a pattern and divides a `String` into an ordered list of substrings by searching for the pattern, puts these substrings into an array, and returns the array.\n\n## Syntax\n\n```js\nsplit()\nsplit(separator)\nsplit(separator, limit)\n```\n\n### Parameters\n\n- `separator` _**optional**_\n  - : The pattern describing where each split should occur. Can be a string or an object with a [`Symbol.split`](../../../globals/Symbol/split.mdx) method — the typical example being a regular expression. If undefined, the original target string is returned wrapped in an array.\n- `limit` _**optional**_\n  - : A non-negative integer specifying a limit on the number of substrings to be included in the array. If provided, splits the string at each occurrence of the specified `separator`, but stops when `limit` entries have been placed in the array. Any leftover text is not included in the array at all.\n    - The array may contain fewer entries than `limit` if the end of the string is reached before the limit is reached.\n    - If `limit` is `0`, `[]` is returned.\n\n### Return value\n\nAn `Array` of strings, split at each point where the `separator` occurs in the given string.\n\n## Description\n\nIf `separator` is a non-empty string, the target string is split by all matches of the `separator` without including `separator` in the results. For example, a string containing tab separated values (TSV) could be parsed by passing a tab character as the separator, like `myString.split(\"\\t\")`. If `separator` contains multiple characters, that entire character sequence must be found in order to split. If `separator` appears at the beginning (or end) of the string, it still has the effect of splitting, resulting in an empty (i.e. zero length) string appearing at the first (or last) position of the returned array. If `separator` does not occur in `str`, the returned array contains one element consisting of the entire string.\n\nIf `separator` is an empty string (`\"\"`), `str` is converted to an array of each of its UTF-16 \"characters\", without empty strings on either ends of the resulting string.\n\n> **Note:** `\"\".split(\"\")` is therefore the only way to produce an empty array when a string is passed as `separator`.\n\n> **Warning:** When the empty string (`\"\"`) is used as a separator, the string is **not** split by _user-perceived characters_ ([grapheme clusters](https://unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries)) or unicode characters (codepoints), but by UTF-16 codeunits. This destroys [surrogate pairs](https://unicode.org/faq/utf_bom.html#utf16-2). See [\"How do you get a string to a character array in JavaScript?\" on StackOverflow](https://stackoverflow.com/questions/4547609/how-to-get-character-array-from-a-string/34717402#34717402).\n\nIf `separator` is a regexp that matches empty strings, whether the match is split by UTF-16 code units or Unicode codepoints depends on if the [`u`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/unicode) flag is set.\n\n```js\n\"😄😄\".split(/(?:)/); // [ \"\\ud83d\", \"\\ude04\", \"\\ud83d\", \"\\ude04\" ]\n\"😄😄\".split(/(?:)/u); // [ \"😄\", \"😄\" ]\n```\n\nIf `separator` is a regular expression with capturing groups, then each time `separator` matches, the captured groups (including any `undefined` results) are spliced into the output array. This behavior is specified by the regexp's [`Symbol.split`](../../../globals/Symbol/split.mdx) method.\n\nIf `separator` is an object with a [`Symbol.split`](../../../globals/Symbol/split.mdx) method, that method is called with the target string and `limit` as arguments, and `this` set to the object. Its return value becomes the return value of `split`.\n\nAny other value will be coerced to a string before being used as separator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/String/prototype/startsWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.startsWith()\n\nThe **`startsWith()`** method determines whether a string begins with the characters of a specified string, returning `true` or `false` as appropriate.\n\n## Syntax\n\n```js\nstartsWith(searchString)\nstartsWith(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n  - : The characters to be searched for at the start of this string. Cannot be a regex.\n- `position` _**optional**_\n  - : The start position at which `searchString` is expected to be found (the index of `searchString`'s first character). Defaults to `0`.\n\n### Return value\n\n**`true`** if the given characters are found at the beginning of the string; otherwise, **`false`**.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If `searchString` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes).\n\n## Description\n\nThis method lets you determine whether or not a string begins with another string. This method is case-sensitive.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/String/prototype/substr.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.substr()\n\nThe **`substr()`** method returns a portion of the string, starting at the specified index and extending for a given number of characters afterwards.\n\n> **Note:** `substr()` is not part of the main ECMAScript specification — it's defined in [Annex B: Additional ECMAScript Features for Web Browsers](https://tc39.es/ecma262/#sec-additional-ecmascript-features-for-web-browsers), which is normative optional for non-browser runtimes. Therefore, people are advised to use the standard [`String.prototype.substring()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/substring) and [`String.prototype.slice()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/slice) methods instead to make their code maximally cross-platform friendly. The [`String.prototype.substring()` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/substring#the_difference_between_substring_and_substr) has some comparisons between the three methods.\n\n\n\n## Syntax\n\n```js\nsubstr(start)\nsubstr(start, length)\n```\n\n### Parameters\n\n- `start`\n  - : The index of the first character to include in the returned substring.\n- `length` _**optional**_\n  - : The number of characters to extract.\n\n### Return value\n\nA new string containing the specified part of the given string.\n\n## Description\n\nA string's `substr()` method extracts `length` characters from the string, counting from the `start` index.\n\n- If `start >= str.length`, an empty string is returned.\n- If `start < 0`, the index starts counting from the end of the string. More formally, in this case the substring starts at `max(start + str.length, 0)`.\n- If `start` is omitted or [`undefined`](../../../globals/undefined.mdx), it's treated as `0`.\n- If `length` is omitted or [`undefined`](../../../globals/undefined.mdx), or if `start + length >= str.length`, `substr()` extracts characters to the end of the string.\n- If `length < 0`, an empty string is returned.\n- For both `start` and `length`, [`NaN`](../../../globals/NaN.mdx) is treated as `0`.\n\nAlthough you are encouraged to avoid using `substr()`, there is no trivial way to migrate `substr()` to either `slice()` or `substring()` in legacy code without essentially writing a polyfill for `substr()`. For example, `str.substr(a, l)`, `str.slice(a, a + l)`, and `str.substring(a, a + l)` all have different results when `str = \"01234\", a = 1, l = -2` — `substr()` returns an empty string, `slice()` returns `\"123\"`, while `substring()` returns `\"0\"`. The actual refactoring path depends on the knowledge of the range of `a` and `l`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/String/prototype/substring.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.substring()\n\nThe **`substring()`** method returns the part of the `string` from the start index up to and excluding the end index, or to the end of the string if no end index is supplied.\n\n## Syntax\n\n```js\nsubstring(indexStart)\nsubstring(indexStart, indexEnd)\n```\n\n### Parameters\n\n- `indexStart`\n  - : The index of the first character to include in the returned substring.\n- `indexEnd` _**optional**_\n  - : The index of the first character to exclude from the returned substring.\n\n### Return value\n\nA new string containing the specified part of the given string.\n\n## Description\n\n`substring()` extracts characters from `indexStart` up to _but not including_ `indexEnd`. In particular:\n\n- If `indexEnd` is omitted, `substring()` extracts characters to the end of the string.\n- If `indexStart` is equal to `indexEnd`, `substring()` returns an empty string.\n- If `indexStart` is greater than `indexEnd`, then the effect of `substring()` is as if the two arguments were swapped; see example below.\n\nAny argument value that is less than `0` or greater than `str.length` is treated as if it were `0` and `str.length`, respectively.\n\nAny argument value that is [`NaN`](../../../globals/NaN.mdx) is treated as if it were `0`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/String/prototype/toLocaleLowerCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toLocaleLowerCase()\n\nThe **`toLocaleLowerCase()`** method returns the calling string\nvalue converted to lower case, according to any locale-specific case mappings.\n\n## Syntax\n\n```js\ntoLocaleLowerCase()\ntoLocaleLowerCase(locales)\n```\n\n### Parameters\n\n- `locales` _**optional**_\n  - : A string with a BCP 47 language tag, or an array of such strings. Indicates the locale to be used to convert to lower case according to any locale-specific case mappings. For the general form and interpretation of the `locales` argument, see [Locale identification and negotiation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation).\n\n### Return value\n\nA new string representing the calling string converted to lower case, according to any\nlocale-specific case mappings.\n\n### Exceptions\n\n- A [`RangeError`](../../../globals/RangeError/RangeError.mdx) (\"invalid language tag: xx_yy\") is thrown if a\n  `locale` argument isn't a valid language tag.\n- A [`TypeError`](../../../globals/TypeError/TypeError.mdx) (\"invalid element in locales argument\") is thrown if an\n  array element isn't of type string.\n\n## Description\n\nThe `toLocaleLowerCase()` method returns the value of the string converted\nto lower case according to any locale-specific case mappings.\n`toLocaleLowerCase()` does not affect the value of the string itself. In most\ncases, this will produce the same result as [`String.prototype.toLowerCase()`](../../../globals/String/prototype/toLowerCase.mdx), but for some locales, such as Turkish, whose case mappings do not\nfollow the default case mappings in Unicode, there may be a different result.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/String/prototype/toLocaleUpperCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toLocaleUpperCase()\n\nThe **`toLocaleUpperCase()`** method returns the calling string\nvalue converted to upper case, according to any locale-specific case mappings.\n\n## Syntax\n\n```js\ntoLocaleUpperCase()\ntoLocaleUpperCase(locales)\n```\n\n### Parameters\n\n- `locales` _**optional**_\n  - : A string with a BCP 47 language tag, or an array of such strings. Indicates the locale to be used to convert to upper case according to any locale-specific case mappings. For the general form and interpretation of the `locales` argument, see [Locale identification and negotiation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation).\n\n### Return value\n\nA new string representing the calling string converted to upper case, according to any\nlocale-specific case mappings.\n\n### Exceptions\n\n- A [`RangeError`](../../../globals/RangeError/RangeError.mdx) (\"invalid language tag: xx_yy\") is thrown if a\n  `locale` argument isn't a valid language tag.\n- A [`TypeError`](../../../globals/TypeError/TypeError.mdx) (\"invalid element in locales argument\") is thrown if an\n  array element isn't of type string.\n\n## Description\n\nThe `toLocaleUpperCase()` method returns the value of the string converted\nto upper case according to any locale-specific case mappings.\n`toLocaleUpperCase()` does not affect the value of the string itself. In most\ncases, this will produce the same result as [`String.prototype.toUpperCase()`](../../../globals/String/prototype/toUpperCase.mdx), but for some locales, such as Turkish, whose case mappings do not\nfollow the default case mappings in Unicode, there may be a different result.\n\nAlso notice that conversion is not necessarily a 1:1 character mapping, as some\ncharacters might result in two (or even more) characters when transformed to upper-case.\nTherefore the length of the result string can differ from the input length. This also\nimplies that the conversion is not stable, so i.E. the following can return\n`false`:\n`x.toLocaleLowerCase() === x.toLocaleUpperCase().toLocaleLowerCase()`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/String/prototype/toLowerCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toLowerCase()\n\nThe **`toLowerCase()`** method returns the calling string value\nconverted to lower case.\n\n## Syntax\n\n```js\ntoLowerCase()\n```\n\n### Return value\n\nA new string representing the calling string converted to lower case.\n\n## Description\n\nThe `toLowerCase()` method returns the value of the string converted to\nlower case. `toLowerCase()` does not affect the value of the string\n`str` itself.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/String/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified string value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified string value.\n\n## Description\n\nThe `String` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For `String` values, the `toString` method returns the string itself (if it's a primitive) or the string that the `String` object wraps. It has the exact same implementation as [`String.prototype.valueOf()`](../../../globals/String/prototype/valueOf.mdx).\n\nThe `toString()` method requires its `this` value to be a `String` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to string values.\n\nBecause `String` doesn't have a [`[Symbol.toPrimitive]()`](../../../globals/Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `String` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, String _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — since they are already strings, no conversion is performed.\n\n```js\nString.prototype.toString = () => \"Overridden\";\nconsole.log(`${\"foo\"}`); // \"foo\"\nconsole.log(`${new String(\"foo\")}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/String/prototype/toUpperCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toUpperCase()\n\nThe **`toUpperCase()`** method returns the calling string value\nconverted to uppercase (the value will be converted to a string if it isn't one).\n\n## Syntax\n\n```js\ntoUpperCase()\n```\n\n### Return value\n\nA new string representing the calling string converted to upper case.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : When called on [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../../globals/undefined.mdx), for example,\n    `String.prototype.toUpperCase.call(undefined)`.\n\n## Description\n\nThe `toUpperCase()` method returns the value of the string converted to\nuppercase. This method does not affect the value of the string itself since JavaScript\nstrings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/String/prototype/trim.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.trim()\n\nThe **`trim()`** method removes whitespace from both ends of a string and returns a new string, without modifying the original string.\n\nTo return a new string with whitespace trimmed from just one end, use [`String.prototype.trimStart()`](../../../globals/String/prototype/trimStart.mdx) or [`String.prototype.trimEnd()`](../../../globals/String/prototype/trimEnd.mdx).\n\n## Syntax\n\n```js\ntrim()\n```\n\n### Return value\n\nA new string representing `str` stripped of whitespace from both its beginning and end. Whitespace is defined as [white space](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#white_space) characters plus [line terminators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#line_terminators).\n\nIf neither the beginning or end of `str` has any whitespace, a new string is still returned (essentially a copy of `str`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/String/prototype/trimEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.trimEnd()\n\nThe **`trimEnd()`** method removes whitespace from the end of a string and returns a new string, without modifying the original string. `trimRight()` is an alias of this method.\n\n## Syntax\n\n```js\ntrimEnd()\n\ntrimRight()\n```\n\n### Return value\n\nA new string representing `str` stripped of whitespace from its end (right side). Whitespace is defined as [white space](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#white_space) characters plus [line terminators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#line_terminators).\n\nIf the end of `str` has no whitespace, a new string is still returned (essentially a copy of `str`).\n\n### Aliasing\n\nAfter [`String.prototype.trim()`](../../../globals/String/prototype/trim.mdx) was standardized, engines also implemented the non-standard method `trimRight`. However, for consistency with [`String.prototype.pedEnd()`](../../../globals/String/prototype/trim.mdx), when the method got standardized, its name was chosen as `trimEnd`. For web compatibility reasons, `trimRight` remains as an alias to `trimEnd`, and they refer to the exact same function object. In some engines this means:\n\n```js\nString.prototype.trimRight.name === \"trimEnd\";\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/String/prototype/trimStart.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.trimStart()\n\nThe **`trimStart()`** method removes whitespace from the beginning of a string and returns a new string, without modifying the original string. `trimLeft()` is an alias of this method.\n\n## Syntax\n\n```js\ntrimStart()\n\ntrimLeft()\n```\n\n### Return value\n\nA new string representing `str` stripped of whitespace from its beginning (left side). Whitespace is defined as [white space](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#white_space) characters plus [line terminators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#line_terminators).\n\nIf the beginning of `str` has no whitespace, a new string is still returned (essentially a copy of `str`).\n\n### Aliasing\n\nAfter [`String.prototype.trim()`](../../../globals/String/prototype/trim.mdx) was standardized, engines also implemented the non-standard method `trimLeft`. However, for consistency with [`String.prototype.padEnd()`](../../../globals/String/prototype/padEnd.mdx), when the method got standardized, its name was chosen as `trimStart`. For web compatibility reasons, `trimLeft` remains as an alias to `trimStart`, and they refer to the exact same function object. In some engines this means:\n\n```js\nString.prototype.trimLeft.name === \"trimStart\";\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/String/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a\n`String` object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nA string representing the primitive value of a given `String` object.\n\n## Description\n\nThe `valueOf()` method of `String` returns the primitive value\nof a `String` object as a string data type. This value is equivalent to\n[`String.prototype.toString()`](../../../globals/String/prototype/toString.mdx).\n\nThis method is usually called internally by JavaScript and not explicitly in code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/String/raw.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.raw()\n\nThe static **`String.raw()`** method is a tag function of [template literals](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). This is similar to the `r` prefix in Python, or the `@` prefix in C# for string literals. It's used to get the raw string form of template literals — that is, substitutions (e.g. `${foo}`) are processed, but escape sequences (e.g. `\\n`) are not.\n\n## Syntax\n\n```js\nString.raw(strings, ...substitutions)\n\nString.raw`templateString`\n```\n\n### Parameters\n\n- `strings`\n  - : Well-formed template literal array object, like `{ raw: ['foo', 'bar', 'baz'] }`. Should be an object with a `raw` property whose value is an array-like object of strings.\n- `...substitutions`\n  - : Contains substitution values.\n- `templateString`\n  - : A [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals), optionally with substitutions (`${...}`).\n\n### Return value\n\nThe raw string form of a given template literal.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if the first argument doesn't have a `raw` property, or the `raw` property is `undefined` or `null`.\n\n## Description\n\nIn most cases, `String.raw()` is used with template literals. The first syntax mentioned above is only rarely used, because the JavaScript engine will call this with proper arguments for you, (just like with other [tag functions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals#tagged_templates)).\n\n`String.raw()` is the only built-in template literal tag. It has close semantics to an untagged literal since it concatenates all arguments and returns a string. You can even re-implement it with normal JavaScript code.\n\n> **Warning:** You should not use `String.raw` directly as an \"identity\" tag. See [Building an identity tag](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/raw#building_an_identity_tag) for how to implement this.\n\nIf `String.raw()` is called with an object whose `raw` property doesn't have a `length` property or a non-positive `length`, it returns an empty string `\"\"`. If `substitutions.length < strings.raw.length - 1` (i.e. there are not enough substitutions to fill the placeholders — which can't happen in a well-formed tagged template literal), the rest of the placeholders are filled with empty strings.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/SubtleCrypto/SubtleCrypto.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SubtleCrypto\n\nThe **`SubtleCrypto`** interface provides a number of low-level cryptographic functions. Access to the features of `SubtleCrypto` is obtained through the [`crypto.subtle`](../crypto/subtle.mdx) property.\n\n> **Warning:** This API provides a number of low-level cryptographic primitives. It's very easy to misuse them, and the pitfalls involved can be very subtle.\n>\n> Even assuming you use the basic cryptographic functions correctly, secure key management and overall security system design are extremely hard to get right, and are generally the domain of specialist security experts.\n>\n> Errors in security system design and implementation can make the security of the system completely ineffective.\n>\n> Please learn and experiment, but don't guarantee or imply the security of your work before an individual knowledgeable in this subject matter thoroughly reviews it. The [Crypto 101 Course](https://www.crypto101.io/) can be a great place to start learning about the design and implementation of secure systems.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/SubtleCrypto/prototype/digest.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# digest()\n\nThe **`digest()`** method of the [`SubtleCrypto`](../SubtleCrypto.mdx)\ninterface generates a digest of the given data. A digest is a short\nfixed-length value derived from some variable-length input. Cryptographic digests should\nexhibit collision-resistance, meaning that it's hard to come up with two different\ninputs that have the same digest value.\n\nIt takes as its arguments an identifier for the digest algorithm to use and the data to\ndigest. It returns a [`Promise`](../../Promise/Promise.mdx) which will be fulfilled with the digest.\n\n## Syntax\n\n```js\ndigest(algorithm, data)\n```\n\n### Parameters\n\n- `algorithm`\n  - : This may be a string or an object with a single property `name` that is a string. The string names the hash function to use. Supported values are:\n    - `\"MD5\"` (but don't use this in cryptographic applications)\n    - `\"SHA-1\"` (but don't use this in cryptographic applications)\n    - `\"SHA-256\"`\n    - `\"SHA-384\"`\n    - `\"SHA-512\"`.\n- `data`\n  - : An `ArrayBuffer`, a `TypedArray` or a `DataView` object containing the data to be digested.\n\n### Return value\n\nA [`Promise`](../../Promise/Promise.mdx) that fulfills with an `ArrayBuffer` containing the digest.\n\n## Supported algorithms\n\nDigest algorithms, also known as cryptographic hash functions,\ntransform an arbitrarily large block of data into a fixed-size output,\nusually much shorter than the input. They have a variety of applications in\ncryptography.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/SubtleCrypto/prototype/importKey.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# importKey()\n\nThe **`importKey()`** method of the [`SubtleCrypto`](../SubtleCrypto.mdx)\ninterface imports a key: that is, it takes as input a key in an external, portable\nformat and gives you a [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) object that you can use.\n\nThe function accepts several import formats: see [Supported formats](#supported-formats) for details.\n\n## Syntax\n\n```js\nimportKey(format, keyData, algorithm, extractable, keyUsages)\n```\n\n### Parameters\n\n- `format`\n  - : A string describing the data format of the key to import. It can be one of the following:\n    - `raw`: [Raw](#raw) format.\n    - `jwk`: [JSON Web Key](#json-web-key) format.\n- `keyData`\n  - : An `ArrayBuffer`, a TypedArray, a `DataView`, or a `JSONWebKey` object containing the key in\n    the given format.\n- `algorithm`\n  - : An object defining the type of key to import and providing extra algorithm-specific parameters.\n    - For RSASSA-PKCS1-v1_5:\n      Pass an [`RsaHashedImportParams`](../../RsaHashedImportParams/RsaHashedImportParams.mdx) object.\n    - For HMAC:\n      Pass an [`HmacImportParams`](../../HmacImportParams/HmacImportParams.mdx) object.\n    - For ECDSA:\n      Pass an [`EcKeyImportParams`](../../EcKeyImportParams/EcKeyImportParams.mdx) object.\n- `extractable`\n  - : A boolean value indicating whether it will be possible to export the key.\n- `keyUsages`\n  - : An `Array` indicating what can be done with the key. Possible array values are:\n    - `encrypt`: The key may be used to encrypt messages.\n    - `decrypt`: The key may be used to decrypt messages.\n    - `sign`: The key may be used to sign messages.\n    - `verify`: The key may be used to verify signatures.\n    - `deriveKey`: The key may be used in deriving a new key.\n    - `deriveBits`: The key may be used in deriving bits.\n    - `wrapKey`: The key may be used to wrap a key.\n    - `unwrapKey`: The key may be used to unwrap a key.\n\n### Return value\n\nA [`Promise`](../../Promise/Promise.mdx)\nthat fulfills with the imported key as a [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) object.\n\n### Exceptions\n\nThe promise is rejected when one of the following exceptions is encountered:\n\n- `SyntaxError`\n  - : Raised when `keyUsages` is empty but the unwrapped key is of\n    type `secret` or `private`.\n- `TypeError`\n  - : Raised when trying to use an invalid format or if the `keyData`\n    is not suited for that format.\n\n## Supported formats\n\nThis API currently supports one key import/export format: JSON Web Key.\n\n### Raw\n\nYou can use this format to import or export AES or HMAC secret keys, or Elliptic Curve\npublic keys.\n\nIn this format the key is supplied as an `ArrayBuffer` containing the raw bytes for the key.\n\n\n### JSON Web Key\n\nYou can use JSON Web Key format to import or export RSA or Elliptic Curve public or\nprivate keys, as well as AES and HMAC secret keys.\n\nJSON Web Key format is defined in [RFC 7517](https://datatracker.ietf.org/doc/html/rfc7517).\nIt describes a way to represent public, private, and secret keys as JSON objects.\n\nA JSON Web Key looks something like this (this is an EC private key):\n\n```json\n{\n  \"crv\": \"P-384\",\n  \"d\": \"wouCtU7Nw4E8_7n5C1-xBjB4xqSb_liZhYMsy8MGgxUny6Q8NCoH9xSiviwLFfK_\",\n  \"ext\": true,\n  \"key_ops\": [\"sign\"],\n  \"kty\": \"EC\",\n  \"x\": \"SzrRXmyI8VWFJg1dPUNbFcc9jZvjZEfH7ulKI1UkXAltd7RGWrcfFxqyGPcwu6AQ\",\n  \"y\": \"hHUag3OvDzEr0uUQND4PXHQTXP5IDGdYhJhL-WLKjnGjQAw0rNGy5V29-aV-yseW\"\n};\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/SubtleCrypto/prototype/sign.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# sign()\n\nThe **`sign()`** method of the [`SubtleCrypto`](../SubtleCrypto.mdx) interface generates a digital signature.\n\nIt takes as its arguments a key to sign with, some algorithm-specific\nparameters, and the data to sign. It returns a `Promise` which will be\nfulfilled with the signature.\n\nYou can use the corresponding [`verify()`](./verify.mdx) method to verify the signature.\n\n## Syntax\n\n```js\nsign(algorithm, key, data)\n```\n\n### Parameters\n\n- `algorithm`\n  - : A string or object that specifies the signature algorithm to use and its parameters:\n    - To use [RSASSA-PKCS1-v1_5](#rsassa-pkcs1-v1_5), pass the string `\"RSASSA-PKCS1-v1_5\"` or an object of the form `{ \"name\": \"RSASSA-PKCS1-v1_5\" }`.\n    - To use [HMAC](#hmac), pass the string `\"HMAC\"` or an object of the form `{ \"name\": \"HMAC\" }`.\n- `key`\n  - : A [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) object containing the key to be used for signing.\n    If `algorithm` identifies a public-key cryptosystem, this is the private key.\n- `data`\n  - : An `ArrayBuffer`, a TypedArray or a `DataView` object containing the data to be signed.\n\n### Return value\n\nA `Promise` that fulfills with an `ArrayBuffer` containing the signature.\n\n### Exceptions\n\nThe promise is rejected when the following exception is encountered:\n\n- `InvalidAccessError`\n  - : Raised when the signing key is not a key for the request signing algorithm or when\n    trying to use an algorithm that is either unknown or isn't suitable for signing.\n\n## Supported algorithms\n\n### RSASSA-PKCS1-v1_5\n\nThe RSASSA-PKCS1-v1_5 algorithm is specified in [RFC 3447](https://datatracker.ietf.org/doc/html/rfc3447).\n\n### HMAC\n\nThe HMAC algorithm calculates and verifies hash-based message authentication codes according to the\n[FIPS 198-1 standard](https://csrc.nist.gov/csrc/media/publications/fips/198/1/final/documents/fips-198-1_final.pdf).\n\nThe digest algorithm to use is specified in the\n[`HmacImportParams`](../../HmacImportParams/HmacImportParams.mdx) object\nthat you pass into [`SubtleCrypto.importKey()`](./importKey.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/SubtleCrypto/prototype/verify.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# verify()\n\nThe **`verify()`** method verifies a digital signature.\n\nIt takes as its arguments a key to verify the signature with, some algorithm-specific parameters, the signature, and the original signed data.\nIt returns a `Promise` which will be fulfilled with a boolean value indicating whether the signature is valid.\n\n## Syntax\n\n```js\nverify(algorithm, key, signature, data)\n```\n\n### Parameters\n\n- `algorithm`\n  - : A string or object defining the algorithm to use, and for some algorithm choices, some extra parameters.\n    The values given for the extra parameters must match those passed into the corresponding [`sign()`](./sign.mdx) call.\n    - To use RSASSA-PKCS1-v1_5, pass the string `\"RSASSA-PKCS1-v1_5\"` or an object of the form `{ \"name\": \"RSASSA-PKCS1-v1_5\" }`.\n    - To use HMAC, pass the string `\"HMAC\"` or an object of the form `{ \"name\": \"HMAC\" }`.\n- `key`\n  - : A [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) containing the key that will be used to verify the signature.\n    It is the secret key for a symmetric algorithm and the public key for a public-key system.\n- `signature`\n  - : A `ArrayBuffer` containing the signature to verify.\n- `data`\n  - : A `ArrayBuffer` containing the data whose signature is to be verified.\n\n### Return value\n\nA `Promise` that fulfills with a\nboolean value: `true` if the signature is valid, `false`\notherwise.\n\n### Exceptions\n\nThe promise is rejected when the following exception is encountered:\n\n- `InvalidAccessError`\n  - : Raised when the encryption key is not a key for the requested verifying algorithm or\n    when trying to use an algorithm that is either unknown or isn't suitable for a verify\n    operation.\n\n## Supported algorithms\n\nThe `verify()` method supports the same algorithms as the [`sign()`](./sign.mdx) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Symbol/Symbol.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol()\n\nThe `Symbol()` constructor returns a value of type **symbol**,\nbut is incomplete as a constructor because it does not support the syntax\n\"`new Symbol()`\" and it is not intended to be subclassed. It may be used as\nthe value of an\n[`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends)\nclause of a `class` definition but a\n[`super`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/super)\ncall to it will cause an exception.\n\n## Syntax\n\n```js\nSymbol()\nSymbol(description)\n```\n\n> **Note:** `Symbol()` can only be called without `new`. Attempting to construct it with `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `description` _**optional**_\n  - : A string. A description of the symbol which can be used for debugging but not to\n    access the symbol itself.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Symbol/asyncIterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.asyncIterator\n\nThe **`Symbol.asyncIterator`** well-known symbol specifies the default [async iterator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_async_iterator_and_async_iterable_protocols) for an object. If this property is set on an object, it is an async iterable and can be used in a [`for await...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for-await...of) loop.\n\n## Value\n\nThe well-known symbol `Symbol.asyncIterator`.\n\n## Description\n\nThe `Symbol.asyncIterator` symbol is a builtin symbol that is used to access an object's `Symbol.asyncIterator` method. In order for an object to be async iterable, it must have a `Symbol.asyncIterator` key.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Symbol/for.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.for()\n\nThe **`Symbol.for(key)`** method searches for existing symbols\nin a runtime-wide symbol registry with the given key and returns it if found. Otherwise\na new symbol gets created in the global symbol registry with this key.\n\n## Syntax\n\n```js\nSymbol.for(key)\n```\n\n### Parameters\n\n- `key`\n  - : String, required. The key for the symbol (and also used for the description of the\n    symbol).\n\n### Return value\n\nAn existing symbol with the given key if found; otherwise, a new symbol is created and\nreturned.\n\n## Description\n\nIn contrast to `Symbol()`, the `Symbol.for()` function creates a\nsymbol available in a [global symbol registry](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol#shared_symbols_in_the_global_symbol_registry) list. `Symbol.for()` does also\nnot necessarily create a new symbol on every call, but checks first if a symbol with the\ngiven `key` is already present in the registry. In that case, that symbol is\nreturned. If no symbol with the given key is found, `Symbol.for()` will\ncreate a new global symbol.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Symbol/hasInstance.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.hasInstance\n\nThe **`Symbol.hasInstance`** well-known symbol is used to determine if a constructor object recognizes an object as its instance. The `instanceof` operator's behavior can be customized by this symbol.\n\n## Value\n\nThe well-known symbol `Symbol.hasInstance`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Symbol/isConcatSpreadable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.isConcatSpreadable\n\nThe **`Symbol.isConcatSpreadable`** well-known symbol is used to configure if an object should be flattened to its array elements when using the [`Array.prototype.concat()`](../../globals/Array/prototype/concat.mdx) method.\n\n## Value\n\nThe well-known symbol `Symbol.isConcatSpreadable`.\n\n## Description\n\nThe `Symbol.isConcatSpreadable` symbol (`Symbol.isConcatSpreadable`) can be defined as an own or inherited property and its value is a boolean. It can control behavior for arrays and array-like objects:\n\n- For array objects, the default behavior is to spread (flatten) elements. `Symbol.isConcatSpreadable` can avoid flattening in these cases.\n- For array-like objects, the default behavior is no spreading or flattening. `Symbol.isConcatSpreadable` can force flattening in these cases.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Symbol/iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.iterator\n\nThe well-known **`Symbol.iterator`** symbol specifies the default iterator for an object. Used by [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of).\n\n## Value\n\nThe well-known symbol `Symbol.iterator`.\n\n## Description\n\nWhenever an object needs to be iterated (such as at the beginning of a `for...of` loop), its `Symbol.iterator` method is called with no arguments, and the returned **iterator** is used to obtain the values to be iterated.\n\nSome built-in types have a default iteration behavior, while other types (such as `Object`) do not. The built-in types with a `Symbol.iterator` method are:\n\n- [`Array.prototype[Symbol.iterator]()`](../../globals/Array/prototype/@@iterator.mdx)\n- [`String.prototype[Symbol.iterator]()`](../../globals/String/prototype/@@iterator.mdx)\n- [`Map.prototype[Symbol.iterator]()`](../../globals/Map/prototype/@@iterator.mdx)\n- [`Set.prototype[Symbol.iterator]()`](../../globals/Set/prototype/@@iterator.mdx)\n\nSee also [Iteration protocols](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) for more information.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Symbol/keyFor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.keyFor()\n\nThe **`Symbol.keyFor(sym)`** method retrieves a shared symbol\nkey from the global symbol registry for the given symbol.\n\n## Syntax\n\n```js\nSymbol.keyFor(sym)\n```\n\n### Parameters\n\n- `sym`\n  - : Symbol, required. The symbol to find a key for.\n\n### Return value\n\nA string representing the key for the given symbol if one is found on the [global registry](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol#shared_symbols_in_the_global_symbol_registry); otherwise, [`undefined`](../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Symbol/match.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.match\n\nThe **`Symbol.match`** well-known symbol specifies the matching of a regular expression against a string. This function is called by the [`String.prototype.match()`](../../globals/String/prototype/match.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.match]()` and [`String.prototype.match()`](../../globals/String/prototype/match.mdx).\n\n## Value\n\nThe well-known symbol `Symbolmatch`.\n\n## Description\n\nThis function is also used to identify [if objects have the behavior of regular expressions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes). For example, the methods [`String.prototype.startsWith()`](../../globals/String/prototype/startsWith.mdx), [`String.prototype.endsWith()`](../../globals/String/prototype/endsWith.mdx) and [`String.prototype.includes()`](../../globals/String/prototype/includes.mdx), check if their first argument is a regular expression and will throw a [`TypeError`](../../globals/TypeError/TypeError.mdx) if they are. Now, if the `match` symbol is set to `false` (or a [Falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value except `undefined`), it indicates that the object is not intended to be used as a regular expression object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Symbol/matchAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.matchAll\n\nThe **`Symbol.matchAll`** well-known symbol specifies the method that returns an iterator, that yields matches of the regular expression against a string. This function is called by the [`String.prototype.matchAll()`](../../globals/String/prototype/matchAll.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.matchAll]()` and [`String.prototype.matchAll()`](../../globals/String/prototype/matchAll.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.matchAll`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Symbol/prototype/@@toPrimitive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype[Symbol.toPrimitive]\n\nThe **`[Symbol.toPrimitive]()`** method converts a Symbol object to\na primitive value.\n\n## Syntax\n\n```js\nSymbol()[Symbol.toPrimitive](hint)\n```\n\n### Return value\n\nThe primitive value of the specified `Symbol` object.\n\n## Description\n\nThe `[Symbol.toPrimitive]()` method of `Symbol` returns the primitive\nvalue of a Symbol object as a Symbol data type. The `hint`\nargument is not used.\n\nJavaScript calls the `[Symbol.toPrimitive]()` method to convert an object to a\nprimitive value. You rarely need to invoke the `[Symbol.toPrimitive]()` method\nyourself; JavaScript automatically invokes it when encountering an object where a\nprimitive value is expected.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Symbol/prototype/description.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype.description\n\nThe read-only **`description`** property is a string returning the optional description of `Symbol` objects.\n\n## Description\n\n`Symbol` objects can be created with an optional description which can be used for debugging but not to access the symbol itself. The `Symbol.prototype.description` property can be used to read that description. It is different to `Symbol.prototype.toString()` as it does not contain the enclosing `\"Symbol()\"` string. See the examples.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Symbol/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified symbol value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified symbol value.\n\n## Description\n\nThe `Symbol` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For `Symbol` values, the `toString` method returns a descriptive string in the form `\"Symbol(description)\"`, where `description` is the symbol's [`Symbol.prototype.description`](../../../globals/Symbol/prototype/description.mdx).\n\nThe `toString()` method requires its `this` value to be a `Symbol` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to symbol values.\n\nBecause `Symbol` has a [`[Symbol.toPrimitive]()`](../../../globals/Symbol/toPrimitive.mdx) method, that method always takes priority over `toString()` when a `Symbol` object is [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). However, because `Symbol.prototype[Symbol.toPrimitive]()` returns a symbol primitive, and symbol primitives throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when implicitly converted to a string, the `toString()` method is never implicitly called by the language. To stringify a symbol, you must explicitly call its `toString()` method or use the [`String()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/String#using_string_to_stringify_a_symbol) function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Symbol/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a Symbol object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nThe primitive value of the specified `Symbol` object.\n\n## Description\n\nThe `valueOf()` method of `Symbol` returns the primitive value of a Symbol object as a Symbol data type.\n\nJavaScript calls the `valueOf()` method to convert an object to a primitive value. You rarely need to invoke the `valueOf()` method yourself; JavaScript automatically invokes it when encountering an object where a primitive value is expected.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Symbol/replace.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.replace\n\nThe **`Symbol.replace`** well-known symbol specifies the method that replaces matched substrings of a string. This function is called by the [`String.prototype.replace()`](../../globals/String/prototype/replace.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.replace]()` and [`String.prototype.replace()`](../../globals/String/prototype/replace.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.replace`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Symbol/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.search\n\nThe **`Symbol.search`** well-known symbol specifies the method that returns the index within a string that matches the regular expression. This function is called by the [`String.prototype.search()`](../../globals/String/prototype/search.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.search]()` and [`String.prototype.search()`](../../globals/String/prototype/search.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.search`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Symbol/species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.species\n\nThe well-known symbol **`Symbol.species`** specifies a function-valued property that the constructor function uses to create derived objects.\n\n> **Warning:** The existence of `Symbol.species` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Value\n\nThe well-known symbol `Symbol.species`.\n\n## Description\n\nThe `Symbol.species` accessor property allows subclasses to override the default constructor for objects. This specifies a protocol about how instances should be copied. For example, when you use copying methods of arrays, such as [`Array.prototype.map()`](../../globals/Array/prototype/map.mdx). the `map()` method uses `instance.constructor[Symbol.species]` to get the constructor for constructing the new array.\n\nAll built-in implementations of `Symbol.species` return the `this` value, which is the current instance's constructor. This allows copying methods to create instances of derived classes rather than the base class — for example, `map()` will return an array of the same type as the original array.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Symbol/split.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.split\n\nThe **`Symbol.split`** well-known symbol specifies the method that splits a string at the indices that match a regular expression. This function is called by the [`String.prototype.split()`](../../globals/String/prototype/split.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.split]()` and [`String.prototype.split()`](../../globals/String/prototype/split.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.split`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Symbol/toPrimitive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.toPrimitive\n\nThe **`Symbol.toPrimitive`** well-known symbol specifies a method that accepts a preferred type and returns a primitive representation of an object. It is called in priority by all [type coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) algorithms.\n\n## Value\n\nThe well-known symbol `Symbol.toPrimitive`.\n\n## Description\n\nWith the help of the `Symbol.toPrimitive` property (used as a function value), an object can be converted to a primitive value. The function is called with a string argument `hint`, which specifies the preferred type of the result primitive value. The `hint` argument can be one of `\"number\"`, `\"string\"`, and `\"default\"`.\n\nThe `\"number\"` hint is used by [numeric coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#numeric_coercion) algorithms. The `\"string\"` hint is used by the [string coercion](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) algorithm. The `\"default\"` hint is used by the [primitive coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion) algorithm. The `hint` only acts as a weak signal of preference, and the implementation is free to ignore it (as [`Symbol.prototype[Symbol.toPrimitive]()`](../../globals/Symbol/prototype/@@toPrimitive.mdx) does). The language does not enforce alignment between the `hint` and the result type, although `[Symbol.toPrimitive]()` must return a primitive, or a [`TypeError`](../../globals/TypeError/TypeError.mdx) is thrown.\n\nObjects without the `Symbol.toPrimitive` property are converted to primitives by calling the `valueOf()` and `toString()` methods in different orders, which is explained in more detail in the [type coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) section. `Symbol.toPrimitive` allows full control over the primitive conversion process. For example, `Symbol.prototype.toString()` won't be called, and `Symbol` objects must always be explicitly converted to strings through [`String()`](../../globals/String/String.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Symbol/toStringTag.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.toStringTag\n\nThe **`Symbol.toStringTag`** well-known symbol is a string valued property that is used in the creation of the default string description of an object. It is accessed internally by the [`Object.prototype.toString()`](../../globals/Object/prototype/toString.mdx) method.\n\n## Value\n\nThe well-known symbol `Symbol.toStringTag`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Symbol/unscopables.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.unscopables\n\nThe **`Symbol.unscopables`** well-known symbol is used to specify an object value of whose own and inherited property names are excluded from the [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) environment bindings of the associated object.\n\n## Value\n\nThe well-known symbol `@@unscopables`.\n\n## Description\n\nThe `@@unscopables` symbol (accessed via `Symbol.unscopables`) can be defined on any object to exclude property names from being exposed as lexical variables in [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) environment bindings. Note that when using [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), `with` statements are not available, and this symbol is likely not needed.\n\nSetting a property of the `@@unscopables` object to `true` (or any [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value) will make the corresponding property of the `with` scope object _unscopable_ and therefore won't be introduced to the `with` body scope. Setting a property to `false` (or any [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value) will make it _scopable_ and thus appear as lexical scope variables.\n\nWhen deciding whether `x` is unscopable, the entire prototype chain of the `@@unscopables` property is looked up for a property called `x`. This means if you declared `@@unscopables` as a plain object, `Object.prototype` properties like [`toString`](../../globals/Object/prototype/toString.mdx) would become unscopable as well, which may cause backward incompatibility for legacy code assuming those properties are normally scoped (see [an example here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/unscopables#avoid_using_a_non-null-prototype_object_as_symbol.unscopables)). You are advised to make your custom `@@unscopables` property have `null` as its prototype, like [`Array.prototype[Symbol.unscopables]`](../../globals/Array/prototype/@@unscopables.mdx) does.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/SyntaxError/SyntaxError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SyntaxError\n\nThe **`SyntaxError`** constructor creates a new error object\nthat represents an error when trying to interpret syntactically invalid code.\n\n## Syntax\n\n```js\nnew SyntaxError()\nnew SyntaxError(message)\nnew SyntaxError(message, options)\nnew SyntaxError(message, fileName)\nnew SyntaxError(message, fileName, lineNumber)\n\nSyntaxError()\nSyntaxError(message)\nSyntaxError(message, options)\nSyntaxError(message, fileName)\nSyntaxError(message, fileName, lineNumber)\n```\n\n> **Note:** `SyntaxError()` can be called with or without `new`. Both create a new `SyntaxError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/TextDecoder/TextDecoder.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder()\n\nThe **`TextDecoder()`** constructor returns a newly created `TextDecoder` object for the encoding specified in parameter.\n\n## Syntax\n\n```js\nnew TextDecoder()\nnew TextDecoder(label)\nnew TextDecoder(label, options)\n```\n\n### Parameters\n\n- `label` _**optional**_\n  - : A string, defaulting to `\"utf-8\"`.\n- `options` _**optional**_\n\n  - : An object with the property:\n\n    - `fatal`\n      - : A boolean value indicating if the `TextDecoder.decode()` method must throw a `TypeError` when decoding invalid data.\n        It defaults to `false`, which means that the decoder will substitute malformed data with a replacement character.\n\n    - `ignoreBOM`\n      - : A boolean value indicating whether the [byte order mark](https://www.w3.org/International/questions/qa-byte-order-mark) is ignored.\n        It defaults to `false`.\n\n### Exceptions\n\n- `RangeError`\n  - : Thrown if the value of `label` is unknown, or is one of the values leading to a `'replacement'` decoding algorithm (`\"iso-2022-cn\"` or `\"iso-2022-cn-ext\"`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/TextDecoder/prototype/decode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.decode()\n\nThe **`TextDecoder.decode()`** method returns a string containing text decoded from the buffer passed as a parameter.\n\nThe decoding method is defined in the current `TextDecoder` object.\nThis includes the expected encoding of the data, and how decoding errors are handled.\n\n## Syntax\n\n```js\ndecode()\ndecode(buffer)\ndecode(buffer, options)\n```\n\n### Parameters\n\n- `buffer` _**optional**_\n  - : Is an `ArrayBuffer`, a `TypedArray` or a `DataView` object containing the encoded text to decode.\n- `options` _**optional**_\n\n  - : An object with the property:\n\n    - `stream`\n      - : A boolean flag indicating that additional data will follow in subsequent calls to `decode()`.\n        Set to `true` if processing the data in chunks, and `false` for the final chunk or if the data is not chunked.\n        It defaults to `false`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if there is a decoding error when the property `TextDecoder.fatal` is `true`.\n\n### Return value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/TextDecoder/prototype/encoding.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.encoding\n\nThe **`TextDecoder.encoding`** read-only property returns a string containing the name of the decoding algorithm used by the specific decoder object.\n\nThe encoding is set by the constructor `label` parameter, and defaults to `utf-8`.\n\n## Value\n\nA lower-cased ASCII string, which can be one of the following values:\n\n- The recommended encoding for the Web: `'utf-8'`.\n- The legacy single-byte encodings:\n  ['ibm866'](https://en.wikipedia.org/wiki/Code_page_866),\n  ['iso-8859-2'](https://en.wikipedia.org/wiki/ISO/IEC_8859-2),\n  ['iso-8859-3'](https://en.wikipedia.org/wiki/ISO/IEC_8859-3),\n  ['iso-8859-4'](https://en.wikipedia.org/wiki/ISO/IEC_8859-4),\n  ['iso-8859-5'](https://en.wikipedia.org/wiki/ISO/IEC_8859-5),\n  ['iso-8859-6'](https://en.wikipedia.org/wiki/ISO/IEC_8859-6),\n  ['iso-8859-7'](https://en.wikipedia.org/wiki/ISO/IEC_8859-7),\n  ['iso-8859-8'](https://en.wikipedia.org/wiki/ISO/IEC_8859-8)'`,\n  ['iso-8859-8i'](https://en.wikipedia.org/wiki/ISO-8859-8-I),\n  ['iso-8859-10'](https://en.wikipedia.org/wiki/ISO/IEC_8859-10),\n  ['iso-8859-13'](https://en.wikipedia.org/wiki/ISO/IEC_8859-13),\n  ['iso-8859-14'](https://en.wikipedia.org/wiki/ISO/IEC_8859-14),\n  ['iso-8859-15'](https://en.wikipedia.org/wiki/ISO/IEC_8859-15),\n  ['iso-8859-16'](https://en.wikipedia.org/wiki/ISO/IEC_8859-16),\n  ['koi8-r'](https://en.wikipedia.org/wiki/KOI8-R),\n  ['koi8-u'](https://en.wikipedia.org/wiki/KOI8-U),\n  ['macintosh'](https://en.wikipedia.org/wiki/Mac_OS_Roman),\n  ['windows-874'](https://en.wikipedia.org/wiki/Windows-874),\n  ['windows-1250'](https://en.wikipedia.org/wiki/Windows-1250),\n  ['windows-1251'](https://en.wikipedia.org/wiki/Windows-1251),\n  ['windows-1252'](https://en.wikipedia.org/wiki/Windows-1252),\n  ['windows-1253'](https://en.wikipedia.org/wiki/Windows-1253),\n  ['windows-1254'](https://en.wikipedia.org/wiki/Windows-1254),\n  ['windows-1255'](https://en.wikipedia.org/wiki/Windows-1255),\n  ['windows-1256'](https://en.wikipedia.org/wiki/Windows-1256),\n  ['windows-1257'](https://en.wikipedia.org/wiki/Windows-1257),\n  ['windows-1258'](https://en.wikipedia.org/wiki/Windows-1258), or\n  ['x-mac-cyrillic'](https://en.wikipedia.org/wiki/Macintosh_Cyrillic_encoding).\n- The legacy multi-byte Chinese (simplified) encodings:\n  ['gbk'](https://en.wikipedia.org/wiki/GBK),\n  ['gb18030'](https://en.wikipedia.org/wiki/GB_18030)\n- The legacy multi-byte Chinese (traditional) encoding:\n  ['big5'](https://en.wikipedia.org/wiki/Big5).\n- The legacy multi-byte Japanese encodings:\n  ['euc-jp'](https://en.wikipedia.org/wiki/Extended_Unix_Code#EUC-JP),\n  ['iso-2022-jp'](https://en.wikipedia.org/wiki/ISO/IEC_2022#ISO-2022-JP),\n  ['shift-jis'](https://en.wikipedia.org/wiki/Shift_JIS).\n- The legacy multi-byte Korean encodings:\n  ['euc-kr'](https://en.wikipedia.org/wiki/Extended_Unix_Code#EUC-KR)\n- The legacy miscellaneous encodings:\n  ['utf-16be'](https://en.wikipedia.org/wiki/UTF-16#Byte_order_encoding_schemes),\n  ['utf-16le'](https://en.wikipedia.org/wiki/UTF-16#Byte_order_encoding_schemes),\n  `'x-user-defined'`.\n- A special encoding, `'replacement'`.\n  This decodes empty input into empty output and any other arbitrary-length input into a single replacement character.\n  It is used to prevent attacks that mismatch encodings between the client and server.\n  The following encodings also map to the replacement encoding: `ISO-2022-CN`, `ISO-2022-CN-ext`, ['iso-2022-kr'](https://en.wikipedia.org/wiki/ISO/IEC_2022#ISO-2022-KR) and ['hz-gb-2312'](https://en.wikipedia.org/wiki/HZ_(character_encoding)).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/TextDecoder/prototype/fatal.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.fatal\n\nThe **`fatal`** read-only property of the `TextDecoder` interface is a `Boolean` indicating whether the error mode is fatal.\n\nIf the property is `true` then a decoder will throw a `TypeError` if it encounters malformed data while decoding.\nIf `false` the decoder will substitute the invalid data with the replacement character `U+FFFD` (�).\nThe value of the property is set in the `TextDecoder()` constructor.\n\n## Value\n\nA `boolean` which will return `true` if the error mode is set to `fatal`.\nOtherwise it returns `false`, indicating that the error mode is \"replacement\".\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/TextDecoder/prototype/ignoreBOM.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.ignoreBOM\n\nThe **`ignoreBOM`** read-only property of the `TextDecoder` interface is a `Boolean` indicating whether the [byte order mark](https://www.w3.org/International/questions/qa-byte-order-mark) is ignored.\n\n## Value\n\n`true` if the byte order mark is ignored; `false` otherwise.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/TextEncoder/TextEncoder.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextEncoder()\n\nThe **`TextEncoder()`** constructor returns a newly created `TextEncoder` object that will generate a byte stream with UTF-8 encoding.\n\n## Syntax\n\n```js\nnew TextEncoder()\n```\n\n### Parameters\n\nNone.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/TextEncoder/prototype/encode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextEncoder.encode()\n\nThe **`TextEncoder.encode()`** method takes a string as input, and returns a `Uint8Array` containing the text given in parameters encoded with the specific method for that `TextEncoder` object.\n\n## Syntax\n\n```js\nencode(string)\n```\n\n### Parameters\n\n- `string`\n  - : A string containing the text to encode.\n\n### Return value\n\nA `Uint8Array` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/TextEncoder/prototype/encoding.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextEncoder.encoding\n\nThe **`TextEncoder.encoding`** read-only property returns a string containing the name of the encoding algorithm used by the specific encoder.\n\nIt can only have the following value `utf-8`.\n\n## Value\n\nA string with the value `utf-8`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/TransformStream/TransformStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStream()\n\nThe **`TransformStream()`** constructor creates a new `TransformStream` object which represents a pair of streams: a `WritableStream` representing the writable side, and a `ReadableStream` representing the readable side.\n\n## Syntax\n\n```js\nnew TransformStream()\nnew TransformStream(transformer)\nnew TransformStream(transformer, writableStrategy)\nnew TransformStream(transformer, writableStrategy, readableStrategy)\n```\n\n### Parameters\n\n- `transformer` _**optional**_\n\n  - : An object representing the `transformer`. If not supplied the resulting stream will be an **identity transform stream** which forwards all chunks written to its writable side to its readable side, without any changes.\n\n    The transformer object can contain any of the following methods. In each method `controller` is an instance of `TransformStreamDefaultController`.\n\n    - `start(controller)`\n      - : Called when the `TransformStream` is constructed. It is typically used to enqueue chunks using `TransformStreamDefaultController.enqueue()`.\n    - `transform(chunk, controller)`\n      - : Called when a chunk written to the writable side is ready to be transformed, and performs the work of the transformation stream. If no `transform()` method is supplied, the identity transform is used, and the chunk will be enqueued with no changes.\n    - `flush(controller)`\n      - : Called after all chunks written to the writable side have been successfully transformed, and the writable side is about to be closed.\n\n- `writableStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer. This defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk`. This indicates the size to\n        use for each chunk, in bytes.\n\n- `readableStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer. This defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk`. This indicates the size to\n        use for each chunk, in bytes.\n\n> **Note:** You could define your own custom\n> `readableStrategy` or `writableStrategy`, or use an instance of\n> `ByteLengthQueuingStrategy` or `CountQueuingStrategy`\n> for the object values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/TransformStream/prototype/readable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStream.readable\n\nThe **`readable`** read-only property of the `TransformStream` interface returns the `ReadableStream` instance controlled by this `TransformStream`.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/TransformStream/prototype/writable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStream.writable\n\nThe **`writable`** read-only property of the `TransformStream` interface returns the `WritableStream` instance controlled by this `TransformStream`.\n\n## Value\n\nA `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/TransformStreamDefaultController/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.desiredSize\n\nThe **`desiredSize`** read-only property of the `TransformStreamDefaultController` interface returns the desired size to fill the queue of the associated [`ReadableStream`](../../../globals/ReadableStream/ReadableStream.mdx).\n\nThe internal queue of a `ReadableStream` contains chunks that have been enqueued, but not yet read.\n\nIf the `desiredSize` is `0` then the queue is full. Therefore you can use this information to manually apply backpressure to manage the queue.\n\n## Value\n\nThe desired size.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/TransformStreamDefaultController/prototype/enqueue.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.enqueue()\n\nThe **`enqueue()`** method of the `TransformStreamDefaultController` interface enqueues the given chunk in the readable side of the stream.\n\n## Syntax\n\n```js\nenqueue(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : The chunk being queued. A chunk is a single piece of data. It can be any type of data, and a stream can contain chunks of different types.\n\n### Return value\n\nNone `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream is not readable.\n    This might occur if the stream is errored via `controller.error()`, or when it is closed without its controller's `controller.close()` method ever being called.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/TransformStreamDefaultController/prototype/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.error()\n\nThe **`error()`** method of the `TransformStreamDefaultController` interface errors both sides of the stream. Any further interactions with it will fail with the given error message, and any chunks in the queue will be discarded.\n\n## Syntax\n\n```js\nerror(reason)\n```\n\n### Parameters\n\n- `reason`\n  - : A string containing the error message to be returned on any further interaction with the stream.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/TransformStreamDefaultController/prototype/terminate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.terminate()\n\nThe **`terminate()`** method of the `TransformStreamDefaultController` interface closes the readable side and errors the writable side of the stream.\n\n## Syntax\n\n```js\nterminate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone (`undefined`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/TypeError/TypeError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TypeError\n\nThe **`TypeError()`** constructor creates a new error when an\noperation could not be performed, typically (but not exclusively) when a value is not of\nthe expected type.\n\n## Syntax\n\n```js\nnew TypeError()\nnew TypeError(message)\nnew TypeError(message, options)\nnew TypeError(message, fileName)\nnew TypeError(message, fileName, lineNumber)\n\nTypeError()\nTypeError(message)\nTypeError(message, options)\nTypeError(message, fileName)\nTypeError(message, fileName, lineNumber)\n```\n\n> **Note:** `TypeError()` can be called with or without `new`. Both create a new `TypeError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/URIError/URIError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URIError\n\nThe **`URIError()`** constructor creates an error when a global\nURI handling function was used in a wrong way.\n\n## Syntax\n\n```js\nnew URIError()\nnew URIError(message)\nnew URIError(message, options)\nnew URIError(message, fileName)\nnew URIError(message, fileName, lineNumber)\n\nURIError()\nURIError(message)\nURIError(message, options)\nURIError(message, fileName)\nURIError(message, fileName, lineNumber)\n```\n\n> **Note:** `URIError()` can be called with or without `new`. Both create a new `URIError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/URL/URL.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL()\n\nThe **`URL()`** constructor returns a newly created\n`URL` object representing the URL defined by the parameters.\n\nIf the given base URL or the resulting URL are not valid URLs, the JavaScript\n`TypeError` exception is thrown.\n\n## Syntax\n\n```js\nnew URL(url)\nnew URL(url, base)\n```\n\n### Parameters\n\n- `url`\n  - : A string or any other object with a `toString()` method.\n    If `url` is a relative URL, `base` is\n    required, and will be used as the base URL. If `url` is an\n    absolute URL, a given `base` will be ignored.\n- `base` _**optional**_\n  - : A string representing the base URL to use in cases where\n    `url` is a relative URL. If not specified, it defaults to\n    `undefined`.\n\n> **Note:** The `url` and `base` arguments will\n> each be stringified from whatever value you pass, just like with other Web APIs\n> that accept a string. In particular, you can use an existing\n> `URL` object for either argument, and it will stringify to the\n> object's `URL.href\", \"href` property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/URL/prototype/hash.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.hash\n\nThe **`hash`** property of the\n`URL` interface is a string containing a\n`'#'` followed by the fragment identifier of the URL.\n\nThe fragment is not percent-decoded. If the URL does not\nhave a fragment identifier, this property contains an empty string — `\"\"`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/URL/prototype/host.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.host\n\nThe **`host`** property of the `URL` interface is\na string containing the host, that is the `URL.hostname`, and then, if the `port` of the URL is nonempty, a\n`':'`, followed by the `port` of the URL.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/URL/prototype/hostname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.hostname\n\nThe **`hostname`** property of the `URL` interface\nis a string containing the domain name of the URL.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/URL/prototype/href.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.href\n\nThe **`href`** property of the `URL` interface is\na string containing the whole URL.\n\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/URL/prototype/origin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.origin\n\nThe **`origin`** read-only property of\nthe `URL` interface returns a string containing the\nUnicode serialization of the origin of the represented URL.\n\nThe exact structure\nvaries depending on the type of URL:\n\n- For `http` or `https` URLs, the scheme followed by\n  `'://'`, followed by the domain, followed by `':'`, followed by\n  the port (the default port, `80` and `443` respectively, if\n  explicitly specified).\n- For `file:` URLs, the value is browser dependent.\n- for `blob:` URLs, the origin of the URL following `blob:` will\n  be used. For example, `\"blob:https://mozilla.org\"` will be returned as\n  `\"https://mozilla.org\".`\n\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/URL/prototype/password.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.password\n\nThe **`password`** property of the `URL` interface\nis a string containing the password specified before the domain name.\n\nIf it is set without first setting the `URL.username` property, it silently fails.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/URL/prototype/pathname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.pathname\n\nThe **`pathname`** property of the `URL` interface represents a location in a hierarchical structure. It is a string constructed from a list of path segments, each of which is prefixed by a `/` character. If the URL has no path segments, the value of its `pathname` property will be the empty string.\n\nURLs such as `https` and `http` URLs that have [hierarchical schemes](https://www.rfc-editor.org/rfc/rfc3986#section-1.2.3) (which the URL standard calls \"[special schemes](https://url.spec.whatwg.org/#special-scheme)\") always have at least one (invisible) path segment: the empty string. Thus the `pathname` value for such \"special scheme\" URLs can never be the empty string, but will instead always have a least one `/` character.\n\nFor example, the URL `https://developer.mozilla.org` has just one path segment: the empty string, so its `pathname` value is constructed by prefixing a `/` character to the empty string.\n\nSome systems define the term _slug_ to mean the final segment of a non-empty path if it identifies a page in human-readable keywords. For example, the URL `https://example.org/articles/this-that-other-outre-collection` has `this-that-other-outre-collection` as its slug.\n\nSome systems use the `;` and `=` characters to delimit parameters and parameter values applicable to a path segment. For example, with the URL `https://example.org/users;id=42/tasks;state=open?sort=modified`, a system might extract and use the path segment parameters `id=42` and `state=open` from the path segments `users;id=42` and `tasks;state=open`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/URL/prototype/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.port\n\nThe **`port`** property of the `URL` interface is\na string containing the port number of the URL.\n\n> **Note:** If an input string passed to the `URL()` constructor doesn't contain an explicit port number (e.g., `https://localhost`) or contains a port number that's the default port number corresponding to the protocol part of the input string (e.g., `https://localhost:443`), then in the `URL` object the constructor returns, the value of the port property will be the empty string: `''`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/URL/prototype/protocol.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.protocol\n\nThe **`protocol`** property of the `URL` interface\nis a string representing the protocol scheme of the URL, including the\nfinal `':'`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/URL/prototype/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.search\n\nThe **`search`** property of the `URL` interface\nis a search string, also called a _query string_, that is a\nstring containing a `'?'` followed by the parameters of the\nURL.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/URL/prototype/searchParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.searchParams\n\nThe **`searchParams`** readonly property of the\n`URL` interface returns a `URLSearchParams` object allowing\naccess to the `GET` decoded query arguments contained in the URL.\n\n## Value\n\nA `URLSearchParams` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/URL/prototype/toJSON.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.toJSON()\n\nThe **`toJSON()`** method of the `URL` interface\nreturns a string containing a serialized version of the URL,\nalthough in practice it seems to have the same effect as\n`URL.toString()`.\n\n## Syntax\n\n```js\ntoJSON()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/URL/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.toString()\n\nThe **`URL.toString()`** method returns a\nstring containing the whole URL. It is effectively a read-only version\nof `URL.prototype.href`.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/URL/prototype/username.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.username\n\nThe **`username`** property of the `URL` interface\nis a string containing the username specified before the domain name.\n\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/URLSearchParams/URLSearchParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams()\n\nThe **`URLSearchParams()`** constructor creates and returns a\nnew `URLSearchParams` object.\n\n\n\n## Syntax\n\n```js\nnew URLSearchParams()\nnew URLSearchParams(options)\n```\n\n### Parameters\n\n- `options` _**optional**_\n  - : One of:\n    - A string, which will be parsed from `application/x-www-form-urlencoded` format. A leading `'?'` character is ignored.\n    - A literal sequence of name-value string pairs, or any object with an iterator that produces a sequence of string pairs.\n    - A record of string keys and string values. Note that nesting is not supported.\n\n### Return value\n\nA `URLSearchParams` object instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/URLSearchParams/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.append()\n\nThe **`append()`** method of the `URLSearchParams`\ninterface appends a specified key/value pair as a new search parameter.\n\nAs shown in the example below, if the same key is appended multiple times it will\nappear in the parameter string multiple times for each value.\n\n## Syntax\n\n```js\nappend(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to append.\n- `value`\n  - : The value of the parameter to append.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/URLSearchParams/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.delete()\n\nThe **`delete()`** method of the `URLSearchParams`\ninterface deletes the given search parameter and all its associated values, from the\nlist of all search parameters.\n\n## Syntax\n\n```js\ndelete(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to be deleted.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/URLSearchParams/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.entries()\n\nThe **`entries()`** method of the\n`URLSearchParams` interface returns an\niterator allowing iteration through all key/value\npairs contained in this object. The iterator returns key/value pairs in the same order as they appear in the query string. The key and value of each pair are\nstring objects.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/URLSearchParams/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.forEach()\n\nThe **`forEach()`** method of the\n`URLSearchParams` interface allows iteration through all values contained\nin this object via a callback function.\n\n## Syntax\n\n```js\nforEach(callback)\nforEach(callback, thisArg)\n```\n\n### Parameters\n\n- `callback`\n\n  - : Function to execute on each element, which is passed the following arguments:\n\n    - `value`\n      - : The value of the current entry being processed in the `URLSearchParams` object.\n    - `key`\n      - : The key of the current entry being processed in the `URLSearchParams` object.\n    - `searchParams`\n      - : The `URLSearchParams` object the `forEach()` was called upon.\n\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `callback`.\n\n### Return value\n\nNone `undefined`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/URLSearchParams/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.get()\n\nThe **`get()`** method of the `URLSearchParams`\ninterface returns the first value associated to the given search parameter.\n\n## Syntax\n\n```js\nget(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to return.\n\n### Return value\n\nA string if the given search parameter is found; otherwise,\n**`null`**.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/URLSearchParams/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.has()\n\nThe **`has()`** method of the `URLSearchParams`\ninterface returns a boolean value that indicates whether a parameter with the\nspecified name exists.\n\n## Syntax\n\n```js\nhas(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to find.\n\n### Return value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/URLSearchParams/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.keys()\n\nThe **`keys()`** method of the `URLSearchParams`\ninterface returns an iterator allowing iteration\nthrough all keys contained in this object. The keys are string\nobjects.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/URLSearchParams/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.set()\n\nThe **`set()`** method of the `URLSearchParams`\ninterface sets the value associated with a given search parameter to the given value.\nIf there were several matching values, this method deletes the others. If the search\nparameter doesn't exist, this method creates it.\n\n## Syntax\n\n```js\nset(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to set.\n- `value`\n  - : The value of the parameter to set.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/URLSearchParams/prototype/sort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.sort()\n\nThe **`URLSearchParams.sort()`** method sorts all key/value\npairs contained in this object in place and returns `undefined`. The sort\norder is according to unicode code points of the keys. This method uses a stable sorting\nalgorithm (i.e. the relative order between key/value pairs with equal keys will be\npreserved).\n\n## Syntax\n\n```js\nsort()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/URLSearchParams/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.toString()\n\nThe **`toString()`** method of the\n`URLSearchParams` interface returns a query string suitable for use in a\nURL.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string, without the question mark. (Returns an empty string if no\nsearch parameters have been set.)\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/URLSearchParams/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.values()\n\nThe **`values()`** method of the `URLSearchParams`\ninterface returns an iterator allowing iteration\nthrough all values contained in this object. The values are string\nobjects.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Uint16Array/Uint16Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint16Array\n\nThe **`Uint16Array()`** typed array constructor creates an\narray of 16-bit unsigned integers in the platform byte order.\n\n## Syntax\n\n```js\nnew Uint16Array()\nnew Uint16Array(length)\nnew Uint16Array(typedArray)\nnew Uint16Array(object)\n\nnew Uint16Array(buffer)\nnew Uint16Array(buffer, byteOffset)\nnew Uint16Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint16Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Uint32Array/Uint32Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint32Array\n\nThe **`Uint32Array()`** typed array constructor creates an\narray of 32-bit unsigned integers in the platform byte order. If control over byte order\nis needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are initialized to\n`0`. Once established, you can reference elements in the array using the\nobject's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Uint32Array()\nnew Uint32Array(length)\nnew Uint32Array(typedArray)\nnew Uint32Array(object)\n\nnew Uint32Array(buffer)\nnew Uint32Array(buffer, byteOffset)\nnew Uint32Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint32Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Uint8Array/Uint8Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint8Array\n\nThe **`Uint8Array()`** constructor creates a typed array of\n8-bit unsigned integers. The contents are initialized to `0`. Once\nestablished, you can reference elements in the array using the object's methods, or\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew Uint8Array()\nnew Uint8Array(length)\nnew Uint8Array(typedArray)\nnew Uint8Array(object)\n\nnew Uint8Array(buffer)\nnew Uint8Array(buffer, byteOffset)\nnew Uint8Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint8Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/Uint8ClampedArray/Uint8ClampedArray.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint8ClampedArray\n\nThe **`Uint8ClampedArray()`** constructor creates a typed array\nof 8-bit unsigned integers clamped to 0-255; if you specified a value that is out of the\nrange of \\[0,255], 0 or 255 will be set instead; if you specify a non-integer, the\nnearest integer will be set. The contents are initialized to `0`. Once\nestablished, you can reference elements in the array using the object's methods, or\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew Uint8ClampedArray()\nnew Uint8ClampedArray(length)\nnew Uint8ClampedArray(typedArray)\nnew Uint8ClampedArray(object)\n\nnew Uint8ClampedArray(buffer)\nnew Uint8ClampedArray(buffer, byteOffset)\nnew Uint8ClampedArray(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint8ClampedArray()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/WeakMap/WeakMap.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap\n\nThe **`WeakMap()` constructor** creates a `WeakMap` object, optionally based on a provided `Array` or other iterable object.\n\n## Syntax\n\n```js\nnew WeakMap()\nnew WeakMap(iterable)\n```\n\n> **Note:** `WeakMap()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable`\n  - : An `Array` or other object that implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol)  that returns an iterator object that produces a two-element array-like object whose first element is a value that will be used as a `WeakMap` key and whose second element is the value to associate with that key. Each key-value pair will be added to the new `WeakMap`. null is treated as undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/WeakMap/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.delete()\n\nThe **`delete()`** method removes the specified element from a\n`WeakMap` object.\n\n## Syntax\n\n```js\ndelete(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to remove from the `WeakMap` object.\n\n### Return value\n\n`true` if an element in the `WeakMap` object has been removed\nsuccessfully. `false` if the key is not found in the `WeakMap` or\nif the key is not an object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/WeakMap/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.get()\n\nThe **`get()`** method returns a specified element from a\n`WeakMap` object.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key`\n  - : Required. The key of the element to return from the `WeakMap` object.\n\n### Return value\n\nThe element associated with the specified key in the `WeakMap` object. If\nthe key can't be found, [`undefined`](../../../globals/undefined.mdx) is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/WeakMap/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.has()\n\nThe **`has()`** method returns a boolean indicating whether an\nelement with the specified key exists in the `WeakMap` object or not.\n\n## Syntax\n\n```js\nhas(key)\n```\n\n### Parameters\n\n- `key`\n  - : Required. The key of the element to test for presence in the `WeakMap`\n    object.\n\n### Return value\n\n- Boolean\n  - : Returns `true` if an element with the specified key exists in the\n    `WeakMap` object; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/WeakMap/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.set\n\nThe **`set()`** method adds a new element with a specified key\nand value to a `WeakMap` object.\n\n## Syntax\n\n```js\nset(key, value)\n```\n\n### Parameters\n\n- `key`\n  - : Required. Must be `object`. The key of the element to add to the\n    `WeakMap` object.\n- `value`\n  - : Required. Any value. The value of the element to add to the `WeakMap`\n    object.\n\n### Return value\n\nThe `WeakMap` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/WeakRef/WeakRef.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakRef\n\nThe **`WeakRef`** constructor creates a `WeakRef`\nobject referring to a given target object.\n\n## Syntax\n\n```js\nnew WeakRef(targetObject)\n```\n\n> **Note:** `WeakRef()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `targetObject`\n  - : The target object the WeakRef should refer to (also called the _referent_).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/WeakRef/prototype/deref.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakRef.prototype.deref()\n\nThe `deref` method returns the `WeakRef` instance's target\nobject, or `undefined` if the target object has been garbage-collected.\n\n## Syntax\n\n```js\nderef()\n```\n\n### Return value\n\nThe target object of the WeakRef, or `undefined` if the object has been\ngarbage-collected.\n\n## Description\n\nSee the [Notes on WeakRefs](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WeakRef#notes_on_weakrefs) section of the `WeakRef` page for some important notes.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/WeakSet/WeakSet.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet\n\nThe **`WeakSet`** constructor lets you create\n`WeakSet` objects that store weakly held _objects_ in a collection.\n\n## Syntax\n\n```js\nnew WeakSet()\nnew WeakSet(iterable)\n```\n\n> **Note:** `WeakSet()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable` _**optional**_\n  - : If an [iterable object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) is passed, all of its elements will be added to the new\n    `WeakSet`. null is treated as undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/WeakSet/prototype/add.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet.prototype.add\n\nThe **`add()`** method appends a new object to the end of a\n`WeakSet` object.\n\n## Syntax\n\n```js\nadd(value)\n```\n\n### Parameters\n\n- value\n  - : Required. The object to add to the `WeakSet` collection.\n\n### Return value\n\nThe `WeakSet` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/WeakSet/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet.prototype.delete\n\nThe **`delete()`** method removes the specified element from a\n`WeakSet` object.\n\n## Syntax\n\n```js\ndelete(value)\n```\n\n### Parameters\n\n- `value`\n  - : Required. The object remove from the `WeakSet` object.\n\n### Return value\n\n`true` if an element in the `WeakSet` object has been removed\nsuccessfully. `false` if the `value` is not found in\nthe `WeakSet` or if the `value` is not an object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/WeakSet/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet.prototype.has\n\nThe **`has()`** method returns a boolean indicating whether an\nobject exists in a `WeakSet` or not.\n\n## Syntax\n\n```js\nhas(value)\n```\n\n### Parameters\n\n- `value`\n  - : Required. The object to test for presence in the `WeakSet`.\n\n### Return value\n\n- Boolean\n  - : Returns `true` if an element with the specified value exists in the\n    `WeakSet` object; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/WorkerLocation/WorkerLocation.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# WorkerLocation\n\nThe **`WorkerLocation`** interface defines the absolute location of the script executed by the Worker. Such an object is initialized for each worker and is available via the [`location`](../../globals/location.mdx) property obtained by calling `globalThis.location`.\n\n## Instance properties\n\n- [`WorkerLocation.href`](../../globals/WorkerLocation/href.mdx) _**read-only**_\n  - : Returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location.\n- [`WorkerLocation.protocol`](../../globals/WorkerLocation/protocol.mdx) _**read-only**_\n  - : Returns the [`protocol`](../../globals/URL/prototype/protocol.mdx) part of the worker's location.\n- [`WorkerLocation.host`](../../globals/WorkerLocation/host.mdx) _**read-only**_\n  - : Returns the [`host`](../../globals/URL/prototype/host.mdx) part of the worker's location.\n- [`WorkerLocation.hostname`](../../globals/WorkerLocation/hostname.mdx) _**read-only**_\n  - : Returns the [`hostname`](../../globals/URL/prototype/hostname.mdx) part of the worker's location.\n- [`WorkerLocation.origin`](../../globals/WorkerLocation/origin.mdx) _**read-only**_\n  - : Returns the worker's [`origin`](../../globals/URL/prototype/origin.mdx).\n- [`WorkerLocation.port`](../../globals/WorkerLocation/port.mdx) _**read-only**_\n  - : Returns the [`port`](../../globals/URL/prototype/port.mdx) part of the worker's location.\n- [`WorkerLocation.pathname`](../../globals/WorkerLocation/pathname.mdx) _**read-only**_\n  - : Returns the [`pathname`](../../globals/URL/prototype/pathname.mdx) part of the worker's location.\n- [`WorkerLocation.search`](../../globals/WorkerLocation/search.mdx) _**read-only**_\n  - : Returns the [`search`](../../globals/URL/prototype/search.mdx) part of the worker's location.\n- [`WorkerLocation.hash`](../../globals/WorkerLocation/hash.mdx) _**read-only**_\n  - : Returns the [`hash`](../../globals/URL/prototype/hash.mdx) part of the worker's location.\n\n## Instance methods\n\n- [`WorkerLocation.toString`](../../globals/WorkerLocation/toString.mdx)\n  - : Returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location. It is a synonym for [`WorkerLocation.href`](../../globals/WorkerLocation/href.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/WorkerLocation/hash.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.hash\n\nThe **`hash`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`hash`](../../globals/URL/prototype/hash.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/WorkerLocation/host.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.host\n\nThe **`host`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`host`](../../globals/URL/prototype/host.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/WorkerLocation/hostname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.hostname\n\nThe **`hostname`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`hostname`](../../globals/URL/prototype/hostname.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/WorkerLocation/href.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.href\n\nThe **`href`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/WorkerLocation/origin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.origin\n\nThe **`origin`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the worker's [`origin`](../../globals/URL/prototype/origin.mdx).\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/WorkerLocation/pathname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.pathname\n\nThe **`pathname`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`pathname`](../../globals/URL/prototype/pathname.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/WorkerLocation/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.port\n\nThe **`port`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`port`](../../globals/URL/prototype/port.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/WorkerLocation/protocol.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.protocol\n\nThe **`protocol`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`protocol`](../../globals/URL/prototype/protocol.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/WorkerLocation/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.search\n\nThe **`search`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`search`](../../globals/URL/prototype/search.mdx) part of the worker's location.\n\n## Value\n\nA string.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/WorkerLocation/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.toString()\n\nThe **`toString()`** method of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location. It is a synonym for [`WorkerLocation.href`](../../globals/WorkerLocation/href.mdx).\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone [`undefined`](../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/WritableStream/WritableStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream()\n\nThe **`WritableStream()`** constructor creates\na new `WritableStream` object instance.\n\n## Syntax\n\n```js\nnew WritableStream(underlyingSink)\nnew WritableStream(underlyingSink, queuingStrategy)\n```\n\n### Parameters\n\n- `underlyingSink` _**optional**_\n\n  - : An object containing methods and properties that define how the constructed stream\n    instance will behave. `underlyingSink` can contain the following:\n\n    - `start(controller)` _**optional**_\n      - : This is a method, called immediately when the object is constructed. The\n        contents of this method are defined by the developer, and should aim to get access\n        to the underlying sink. If this process is to be done asynchronously, it can\n        return a promise to signal success or failure. The `controller`\n        parameter passed to this method is a\n        `WritableStreamDefaultController`. This can be used by the developer\n        to control the stream during set up.\n    - `write(chunk, controller)` _**optional**_\n      - : This method, also defined by the developer, will be called when a new chunk of\n        data (specified in the `chunk` parameter) is ready to be written to the\n        underlying sink. It can return a promise to signal success or failure of the write\n        operation. The `controller` parameter passed to this method is a\n        `WritableStreamDefaultController` that can be used by the developer\n        to control the stream as more chunks are submitted for writing. This method will\n        be called only after previous writes have succeeded, and never after the stream is\n        closed or aborted (see below).\n    - `close(controller)` _**optional**_\n      - : This method, also defined by the developer, will be called if the app signals\n        that it has finished writing chunks to the stream. The contents should do whatever\n        is necessary to finalize writes to the underlying sink, and release access to it.\n        If this process is asynchronous, it can return a promise to signal success or\n        failure. This method will be called only after all queued-up writes have\n        succeeded. The `controller` parameter passed to this method is a\n        `WritableStreamDefaultController`, which can be used to control the\n        stream at the end of writing.\n    - `abort(reason)` _**optional**_\n      - : This method, also defined by the developer, will be called if the app signals\n        that it wishes to abruptly close the stream and put it in an errored state. It can\n        clean up any held resources, much like `close()`, but\n        `abort()` will be called even if writes are queued up — those chunks\n        will be thrown away. If this process is asynchronous, it can return a promise to\n        signal success or failure. The `reason` parameter contains a\n        string describing why the stream was aborted.\n\n- `queuingStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer — this defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk` — this indicates the size to use for each chunk, in bytes.\n\n    > **Note:** You could define your own custom\n    > `queuingStrategy`, or use an instance of\n    > `ByteLengthQueuingStrategy` or `CountQueuingStrategy`\n    > for this object value. If no `queuingStrategy` is supplied, the default\n    > used is the same as a `CountQueuingStrategy` with a high water mark of 1\\.\n\n### Return value\n\nAn instance of the `WritableStream` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/WritableStream/prototype/abort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream.abort()\n\nThe **`abort()`** method of the `WritableStream` interface aborts the stream, signaling that the producer can no longer successfully write to the stream and it is to be immediately moved to an error state, with any queued writes discarded.\n\n## Syntax\n\n```js\nabort(reason)\n```\n\n### Parameters\n\n- `reason`\n  - : A string providing a human-readable reason for the abort.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason` parameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to abort is not a `WritableStream`, or it is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/WritableStream/prototype/getWriter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream.getWriter()\n\nThe **`getWriter()`** method of the `WritableStream` interface returns a new instance of `WritableStreamDefaultWriter` and locks the stream to that instance.\nWhile the stream is locked, no other writer can be acquired until this one is released.\n\n## Syntax\n\n```js\ngetWriter()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `WritableStreamDefaultWriter` object instance.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to create a writer for is not a `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/WritableStream/prototype/locked.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream.locked\n\nThe **`locked`** read-only property of the `WritableStream` interface returns a boolean indicating whether the `WritableStream` is locked to a writer.\n\n## Value\n\nA boolean value indicating whether or not the writable stream is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/WritableStreamDefaultController/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultController.error()\n\nThe **`error()`** method of the\n`WritableStreamDefaultController` interface causes any future interactions\nwith the associated stream to error.\n\nThis method is rarely used, since usually it suffices to return a rejected promise from\none of the underlying sink's methods. However, it can be useful for suddenly shutting\ndown a stream in response to an event outside the normal lifecycle of interactions with\nthe underlying sink.\n\n## Syntax\n\n```js\nerror(message)\n```\n\n### Parameters\n\n- `message`\n  - : A string representing the error you want future interactions to\n    fail with.\n\n### Return value\n\nNone `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to error is not a `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/WritableStreamDefaultWriter/WritableStreamDefaultWriter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter()\n\nThe **`WritableStreamDefaultWriter()`**\nconstructor creates a new `WritableStreamDefaultWriter` object instance.\n\n## Syntax\n\n```js\nnew WritableStreamDefaultWriter(stream)\n```\n\n### Parameters\n\n- `stream`\n  - : The `WritableStream` to be written to.\n\n### Return value\n\nAn instance of the `WritableStreamDefaultWriter` object.\n\n### Exceptions\n\n- `TypeError`\n  - : The provided `stream` value is not a `WritableStream`, or it\n    is locked to another writer already.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/WritableStreamDefaultWriter/prototype/abort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.abort()\n\nThe **`abort()`** method of the\n`WritableStreamDefaultWriter` interface aborts the stream, signaling that\nthe producer can no longer successfully write to the stream and it is to be immediately\nmoved to an error state, with any queued writes discarded.\n\nIf the writer is active, the `abort()` method behaves the same as that for\nthe associated stream (`WritableStream.abort()`). If not, it returns a\nrejected promise.\n\n## Syntax\n\n```js\nabort()\nabort(reason)\n```\n\n### Parameters\n\n- `reason` _**optional**_\n  - : A string representing a human-readable reason for the abort.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason`\nparameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to abort is not a `WritableStream`, or it is\n    locked.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/WritableStreamDefaultWriter/prototype/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.close()\n\nThe **`close()`** method of the\n`WritableStreamDefaultWriter` interface closes the associated writable\nstream.\n\nThe underlying sink will finish processing any previously-written chunks, before\ninvoking the close behavior. During this time any further attempts to write will fail\n(without erroring the stream).\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise`, which fulfills with the `undefined` if all\nremaining chunks were successfully written before the close, or rejects with an error if\na problem was encountered during the process.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to close is not a `WritableStream`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/WritableStreamDefaultWriter/prototype/closed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.closed\n\nThe **`closed`** read-only property of the\n`WritableStreamDefaultWriter` interface returns a\n`Promise` that fulfills if the stream becomes closed, or rejects if\nthe stream errors or the writer's lock is released.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/WritableStreamDefaultWriter/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.desiredSize\n\nThe **`desiredSize`** read-only property of the\n`WritableStreamDefaultWriter` interface returns the desired size required\nto fill the stream's internal queue.\n\n## Value\n\nAn integer. Note that this can be negative if the queue is over-full.\n\nThe value will be `null` if the stream cannot be successfully written to\n(due to either being errored, or having an abort queued up), and zero if the stream is\nclosed.\n\n### Exceptions\n\n- `TypeError`\n  - : The writer's lock is released.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/WritableStreamDefaultWriter/prototype/ready.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.ready\n\nThe **`ready`** read-only property of the\n`WritableStreamDefaultWriter` interface returns a `Promise`\nthat resolves when the desired size of the stream's internal queue transitions from\nnon-positive to positive, signaling that it is no longer applying backpressure.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/WritableStreamDefaultWriter/prototype/releaseLock.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.releaseLock()\n\nThe **`releaseLock()`** method of the\n`WritableStreamDefaultWriter` interface releases the writer's lock on the\ncorresponding stream. After the lock is released, the writer is no longer active. If the\nassociated stream is errored when the lock is released, the writer will appear errored\nin the same way from now on; otherwise, the writer will appear closed.\n\n## Syntax\n\n```js\nreleaseLock()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone `undefined`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/WritableStreamDefaultWriter/prototype/write.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.write()\n\nThe **`write()`** method of the\n`WritableStreamDefaultWriter` interface writes a passed chunk of data to a\n`WritableStream` and its underlying sink, then returns a\n`Promise` that resolves to indicate the success or failure of the write\noperation.\n\nNote that what \"success\" means is up to the underlying sink; it might indicate that the\nchunk has been accepted, and not necessarily that it is safely saved to its ultimate\ndestination.\n\n## Syntax\n\n```js\nwrite(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : A block of binary data to pass to the `WritableStream`.\n\n### Return value\n\nA `Promise`, which fulfills with the `undefined` upon a\nsuccessful write, or rejects if the write fails or stream becomes errored before the\nwriting process is initiated.\n\n### Exceptions\n\n- `TypeError`\n  - : The target stream is not a writable stream, or it does not have an owner.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/atob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# atob()\n\nThe **`atob()`** function decodes a\nstring of data which has been encoded using Base64 encoding. You can use\nthe `btoa()` method to encode and transmit\ndata which may otherwise cause communication problems, then transmit it and use the\n`atob()` method to decode the data again. For example, you can encode,\ntransmit, and decode control characters such as ASCII values 0 through 31.\n\nFor use with Unicode or UTF-8 strings, see the note on \"Unicode strings\" in the page\nfor `btoa()`.\n\n## Syntax\n\n```js\natob(encodedData)\n```\n\n### Parameters\n\n- `encodedData`\n  - : A binary string (i.e., a string in which each character in the string is treated as a byte of binary data) containing base64-encoded data.\n\n### Return value\n\nAn ASCII string containing decoded data from `encodedData`.\n\n### Exceptions\n\n- `InvalidCharacterError`\n  - : Thrown if `encodedData` is not valid base64.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/btoa.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# btoa()\n\nThe **`btoa()`** method creates a\nBase64-encoded ASCII string from a _binary string_ (i.e., a\nstring in which each character in the string is treated as a byte\nof binary data).\n\nYou can use this method to encode data which may otherwise cause communication\nproblems, transmit it, then use the `atob()` method to decode the data again. For example, you can encode control\ncharacters such as ASCII values 0 through 31.\n\n## Syntax\n\n```js\nbtoa(stringToEncode)\n```\n\n### Parameters\n\n- `stringToEncode`\n  - : The _binary string_ to encode.\n\n### Return value\n\nAn ASCII string containing the Base64 representation of\n`stringToEncode`.\n\n### Exceptions\n\n- `InvalidCharacterError`\n  - : The string contained a character that did not fit in a single byte. See \"Unicode\n    strings\" below for more detail.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/clearInterval.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# clearInterval()\n\nThe global **`clearInterval()`** method cancels a timed, repeating action which\nwas previously established by a call to `setInterval()`.\nIf the parameter provided does not identify a previously established action,\nthis method does nothing.\n\n## Syntax\n\n```js\nclearInterval(intervalID)\n```\n\n### Parameters\n\n- `intervalID`\n  - : The identifier of the repeated action you want to cancel. This ID was returned by\n    the corresponding call to `setInterval()`.\n\nIt's worth noting that the pool of IDs used by\n`setInterval()` and\n`setTimeout()` are shared, which\nmeans you can technically use `clearInterval()` and\n`clearTimeout()` interchangeably.\nHowever, for clarity, you should avoid doing so.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/clearTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# clearTimeout()\n\nThe global **`clearTimeout()`** method cancels a timeout previously established\nby calling `setTimeout()`.\n\nIf the parameter provided does not identify a previously established action,\nthis method does nothing.\n\n## Syntax\n\n```js\nclearTimeout(timeoutID)\n```\n\n### Parameters\n\n- `timeoutID`\n  - : The identifier of the timeout you want to cancel. This ID was returned by the\n    corresponding call to `setTimeout()`.\n\nIt's worth noting that the pool of IDs used by\n`setTimeout()` and\n`setInterval()` are shared, which\nmeans you can technically use `clearTimeout()` and\n`clearInterval()`\ninterchangeably. However, for clarity, you should avoid doing so.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/console/assert.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.assert()\n\nThe **`console.assert()`** method writes an error message to\nthe console if the assertion is false. If the assertion is true, nothing happens.\n\n## Syntax\n\n```js\nassert(assertion, obj1)\nassert(assertion, obj1, obj2)\nassert(assertion, obj1, obj2, /* … ,*/ objN)\n\nassert(assertion, msg)\nassert(assertion, msg, subst1)\nassert(assertion, msg, subst1, /* … ,*/ substN)\n```\n\n### Parameters\n\n- `assertion`\n  - : Any boolean expression. If the assertion is false, the message is written to the\n    console.\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output.\n- `msg`\n  - : A JavaScript string containing zero or more substitution strings.\n- `subst1` … `substN`\n  - : JavaScript objects with which to replace substitution strings within\n    `msg`. This parameter gives you additional control over the format of the\n    output.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/console/clear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.clear()\n\nThe **`console.clear()`** method clears the console if the console allows it.\n\n## Syntax\n\n```js\nclear()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/console/count.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.count()\n\nThe **`console.count()`** method logs the number of times that\nthis particular call to `count()` has been called.\n\n\n## Syntax\n\n```js\ncount()\ncount(label)\n```\n\n### Parameters\n\n- `label` _optional_\n  - : A string. If supplied, `count()` outputs the number of\n    times it has been called with that label. If omitted, `count()` behaves as\n    though it was called with the \"default\" label.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/console/countReset.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.countReset()\n\nThe **`console.countReset()`** method resets counter used with `console.count()`.\n\n## Syntax\n\n```js\ncountReset()\ncountReset(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : A string. If supplied, `countReset()` resets the count for\n    that label to 0. If omitted, `countReset()` resets the default counter to\n    0.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/console/debug.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.debug()\n\nThe **`console.debug()`** method outputs a message to the console at the \"debug\" log level.\n\n## Syntax\n\n```js\ndebug(obj1)\ndebug(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output to the console.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/console/dir.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.dir()\n\nThe method **`console.dir()`** displays a list of the properties of\nthe specified JavaScript object.\n\n## Syntax\n\n```js\ndir(object)\n```\n\n### Parameters\n\n- `object`\n  - : A JavaScript object whose properties should be output.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/console/dirxml.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.dirxml()\n\nThe **`console.dirxml()`** method displays the supplied object in the console.\n\n## Syntax\n\n```js\ndirxml(object)\n```\n\n### Parameters\n\n- `object`\n  - : A JavaScript object whose properties should be output.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/console/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.error()\n\nThe **`console.error()`** method outputs an error message console.\n\n## Syntax\n\n```js\nerror(obj1)\nerror(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of\n    these objects are appended together in the order listed and output.\n\n### Return value\n\nNone `undefined`."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/console/group.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.group()\n\nThe **`console.group()`** method creates a new inline group in the console, until `console.groupEnd()` is called.\n\n## Syntax\n\n```js\ngroup()\ngroup(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : Label for the group.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/console/groupCollapsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.groupCollapsed()\n\nThe **`console.groupCollapsed()`** method creates a new inline group in the Web Console. Unlike `console.group()`,\nhowever, the new group is created collapsed. The user will need to use the disclosure\nbutton next to it to expand it, revealing the entries created in the group.\n\nCall `console.groupEnd()` to back out to the parent group.\n\n## Syntax\n\n```js\ngroupCollapsed()\ngroupCollapsed(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : Label for the group.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/console/groupEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.groupEnd()\n\nThe **`console.groupEnd()`** method exits the current inline group in the console.\n\n## Syntax\n\n```js\ngroupEnd()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/console/info.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.info()\n\nThe **`console.info()`** method outputs an informational message to the console.\n\n## Syntax\n\n```js\ninfo(obj1)\ninfo(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/console/log.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.log()\n\nThe **`console.log()`** method outputs a message to the console.\n\n## Syntax\n\n```js\nlog(obj1)\nlog(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output. Please be warned that if\n    you log objects in the latest versions of Chrome and Firefox what you get logged on\n    the console is a _reference to the object_, which is not necessarily the\n    'value' of the object at the moment in time you call `console.log()`, but\n    it is the value of the object at the moment you open the console.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/console/time.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.time()\n\nThe **`console.time()`** method starts a timer you can use to track\nhow long an operation takes. You give each timer a unique name. When you call `console.timeEnd()` with the same name, the\nbrowser will output the time, in milliseconds, that elapsed since the timer was started.\n\n## Syntax\n\n```js\ntime(label)\n```\n\n### Parameters\n\n- `label`\n  - : A `string` representing the name to give the new timer. This will identify the timer; use the same name when\n    calling `console.timeEnd()` to stop the timer and get the time output to\n    the console.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/console/timeEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.timeEnd()\n\nThe **`console.timeEnd()`** stops a timer that was previously started by calling `console.time()`.\n\n## Syntax\n\n```js\ntimeEnd(label)\n```\n\n### Parameters\n\n- `label`\n  - : A `string` representing the name of the timer to stop. Once stopped, the elapsed time is automatically\n    displayed in the console.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/console/timeLog.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.timeLog()\n\nThe **`console.timeLog()`** method logs the current value of a timer that was previously started by calling `console.time()`.\n\n## Syntax\n\n```js\ntimeLog()\ntimeLog(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : The name of the timer to log to the console. If this is omitted the label \"default\" is used.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/console/trace.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.trace()\n\nThe **`console.trace()`** method outputs a stack trace to the console.\n\n## Syntax\n\n```js\ntrace()\ntrace(object1, /* …, */ objectN)\n```\n\n### Parameters\n\n- `objects` __optional__\n  - : Zero or more objects to be output to console along with the trace. These are\n    assembled and formatted the same way they would be if passed to the `console.log()` method.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/console/warn.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.warn()\n\nThe **`console.warn()`** method outputs a warning message to the console.\n\n## Syntax\n\n```js\nwarn(obj1)\nwarn(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/crypto/getRandomValues.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Crypto.getRandomValues()\n\nThe **`Crypto.getRandomValues()`** method lets you get cryptographically strong random values.\nThe array given as the parameter is filled with random numbers (random in its cryptographic meaning).\n\n## Syntax\n\n```js\ngetRandomValues(typedArray)\n```\n\n### Parameters\n\n- `typedArray`\n  - : An integer-based `TypedArray`, that is one of: `Int8Array`, `Uint8Array`,\n    `Uint8ClampedArray`, `Int16Array`, `Uint16Array`,\n    `Int32Array`, `Uint32Array`, `BigInt64Array`,\n    `BigUint64Array` (but **not** `Float32Array` nor `Float64Array`).\n    All elements in the array will be overwritten with random numbers.\n\n### Return value\n\nThe same array passed as `typedArray` but with its contents replaced with the newly generated random numbers.\nNote that `typedArray` is modified in-place, and no copy is made.\n\n### Exceptions\n\n- `QuotaExceededError`\n  - : Thrown if the `byteLength` of `typedArray` exceeds 65,536.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/crypto/randomUUID.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Crypto.randomUUID()\n\nThe **`randomUUID()`** method is used to generate a v4 [UUID](https://developer.mozilla.org/en-US/docs/Glossary/UUID) using a cryptographically secure random number generator.\n\n## Syntax\n\n```js\nrandomUUID()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string containing a randomly generated, 36 character long v4 UUID."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/crypto/subtle.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Crypto.subtle\n\nThe **`Crypto.subtle`** read-only property returns a\n[`SubtleCrypto`](../SubtleCrypto/SubtleCrypto.mdx) which can then be used to perform low-level\ncryptographic operations.\n\n## Value\n\nA [`SubtleCrypto`](../SubtleCrypto/SubtleCrypto.mdx) object you can use to interact with the Web Crypto API's\nlow-level cryptography features.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/decodeURI.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# decodeURI\n\nThe **`decodeURI()`** function decodes a Uniform Resource Identifier (URI) previously created by [`encodeURI()`](../globals/encodeURI.mdx) or a similar routine.\n\n## Syntax\n\n```js\ndecodeURI(encodedURI)\n```\n\n### Parameters\n\n- `encodedURI`\n  - : A complete, encoded Uniform Resource Identifier.\n\n### Return value\n\nA new string representing the unencoded version of the given encoded Uniform Resource Identifier (URI).\n\n### Exceptions\n\n- [`URIError`](../globals/URIError/URIError.mdx)\n  - : Thrown if `encodedURI` contains a `%` not followed by two hexadecimal digits, or if the escape sequence does not encode a valid UTF-8 character.\n\n## Description\n\n`decodeURI()` is a function property of the global object.\n\nThe `decodeURI()` function decodes the URI by treating each escape sequence in the form `%XX` as one UTF-8 code unit (one byte). In UTF-8, the number of leading 1 bits in the first byte, which may be 0 (for 1-byte ASCII characters), 2, 3, or 4, indicates the number of bytes in the character. So by reading the first escape sequence, `decodeURI()` can determine how many more escape sequences to consume. If `decodeURI()` fails to find the expected number of sequences, or if the escape sequences don't encode a valid UTF-8 character, a [`URIError`](../globals/URIError/URIError.mdx) is thrown.\n\n`decodeURI()` decodes all escape sequences, but if the escape sequence encodes one of the following characters, the escape sequence is preserved in the output string (because they are part of the URI syntax):\n\n```\n; / ? : @ & = + $ , #\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/decodeURIComponent.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# decodeURIComponent\n\nThe **`decodeURIComponent()`** function decodes a Uniform Resource Identifier (URI) component previously created by [`encodeURIComponent()`](./encodeURIComponent.mdx) or by a similar routine.\n\n\n## Syntax\n\n```js\ndecodeURIComponent(encodedURI)\n```\n\n### Parameters\n\n- `encodedURI`\n  - : An encoded component of a Uniform Resource Identifier.\n\n### Return value\n\nA new string representing the decoded version of the given encoded Uniform Resource Identifier (URI) component.\n\n### Exceptions\n\n- [`URIError`](../globals/URIError/URIError.mdx)\n  - : Thrown if `encodedURI` contains a `%` not followed by two hexadecimal digits, or if the escape sequence does not encode a valid UTF-8 character.\n\n## Description\n\n`decodeURIComponent()` is a function property of the global object.\n\n`decodeURIComponent()` uses the same decoding algorithm as described in [`decodeURI()`](./decodeURI.mdx). It decodes _all_ escape sequences, including those that are not created by [`encodeURIComponent()`](./encodeURIComponent.mdx), like `-.!~*'()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/encodeURI.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# encodeURI()\n\nThe **`encodeURI()`** function encodes a URI by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character (will only be four escape sequences for characters composed of two surrogate characters). Compared to [`encodeURIComponent()`](./encodeURIComponent.mdx), this function encodes fewer characters, preserving those that are part of the URI syntax.\n\n## Syntax\n\n```js\nencodeURI(uri)\n```\n\n### Parameters\n\n- `uri`\n  - : A string to be encoded as a URI.\n\n### Return value\n\nA new string representing the provided string encoded as a URI.\n\n### Exceptions\n\n- [`URIError`](./URIError/URIError.mdx)\n  - : Thrown if `uri` contains a [lone surrogate](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters).\n\n## Description\n\n`encodeURI()` is a function property of the global object.\n\nThe `encodeURI()` function escapes characters by UTF-8 code units, with each octet encoded in the format `%XX`, left-padded with 0 if necessary. Because lone surrogates in UTF-16 do not encode any valid Unicode character, they cause `encodeURI()` to throw a [`URIError`](./URIError/URIError.mdx).\n\n`encodeURI()` escapes all characters **except**:\n\n```\nA–Z a–z 0–9 - _ . ! ~ * ' ( )\n\n; / ? : @ & = + $ , #\n```\n\nThe characters on the second line are characters that may be part of the URI syntax, and are only escaped by `encodeURIComponent()`. Both `encodeURI()` and `encodeURIComponent()` do not encode the characters `-.!~*'()`, known as \"unreserved marks\", which do not have a reserved purpose but are allowed in a URI \"as is\". (See [RFC2396](https://www.ietf.org/rfc/rfc2396.txt))\n\nThe `encodeURI()` function does not encode characters that have special meaning (reserved characters) for a URI. The following example shows all the parts that a URI can possibly contain. Note how certain characters are used to signify special meaning:\n\n```\nhttp://username:password@www.example.com:80/path/to/file.php?foo=316&bar=this+has+spaces#anchor\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/encodeURIComponent.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# encodeURIComponent\n\nThe **`encodeURIComponent()`** function encodes a URI by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character (will only be four escape sequences for characters composed of two surrogate characters). Compared to [`encodeURI()`](./encodeURI.mdx), this function encodes more characters, including those that are part of the URI syntax.\n\n## Syntax\n\n```js\nencodeURIComponent(uriComponent)\n```\n\n### Parameters\n\n- `uriComponent`\n  - : A string to be encoded as a URI component (a path, query string, fragment, etc.). Other values are [converted to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion).\n\n### Return value\n\nA new string representing the provided `uriComponent` encoded as a URI component.\n\n### Exceptions\n\n- [`URIError`](./URIError/URIError.mdx)\n  - : Thrown if `uriComponent` contains a [lone surrogate](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters).\n\n## Description\n\n`encodeURIComponent()` is a function property of the global object.\n\n`encodeURIComponent()` uses the same encoding algorithm as described in [`encodeURI()`](./encodeURI.mdx). It escapes all characters **except**:\n\n```text\nA–Z a–z 0–9 - _ . ! ~ * ' ( )\n```\n\nCompared to [`encodeURI()`](./encodeURI.mdx), `encodeURIComponent()` escapes a larger set of characters. Use `encodeURIComponent()` on user-entered fields from forms `POST`'d to the server — this will encode `&` symbols that may inadvertently be generated during data entry for special HTML entities or other characters that require encoding/decoding. For example, if a user writes `Jack & Jill`, without `encodeURIComponent()`, the ampersand could be interpreted on the server as the start of a new field and jeopardize the integrity of the data.\n\nFor [`application/x-www-form-urlencoded`](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#application/x-www-form-urlencoded-encoding-algorithm), spaces are to be replaced by `+`, so one may wish to follow a `encodeURIComponent()` replacement with an additional replacement of `%20` with `+`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/escape.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# escape()\n\n> **Note:** `escape()` is a non-standard function implemented by browsers and was only standardized for cross-engine compatibility. It is not required to be implemented by all JavaScript engines and may not work everywhere. Use [`encodeURIComponent()`](./encodeURIComponent.mdx) or [`encodeURI()`](./encodeURI.mdx) if possible.\n\nThe **`escape()`** function computes a new string in which certain characters have been replaced by hexadecimal escape sequences.\n\n## Syntax\n\n```js\nescape(str)\n```\n\n### Parameters\n\n- `str`\n  - : A string to be encoded.\n\n### Return value\n\nA new string in which certain characters have been escaped.\n\n## Description\n\n`escape()` is a function property of the global object.\n\nThe `escape()` function replaces all characters with escape sequences, with the exception of ASCII word characters (A–Z, a–z, 0–9, _) and `@*_+-./`. Characters are escaped by UTF-16 code units. If the code unit's value is less than 256, it is represented by a two-digit hexadecimal number in the format `%XX`, left-padded with 0 if necessary. Otherwise, it is represented by a four-digit hexadecimal number in the format `%uXXXX`, left-padded with 0 if necessary.\n\n> **Note:** This function was used mostly for URL encoding and is partly based on the escape format in rfc(1738). The escape format is _not_ an [escape sequence](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#escape_sequences) in string literals. You can replace `%XX` with `\\xXX` and `%uXXXX` with `\\uXXXX` to get a string containing actual string-literal escape sequences.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/eval.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# eval\n\n> **Warning:** Executing JavaScript from a string is an enormous security risk. It is far too easy for a bad actor to run arbitrary code when you use `eval()`. See [never use direct eval](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval#never_use_direct_eval!) for details.\n\nThe **`eval()`** function evaluates JavaScript code represented as a string and returns its completion value. The source is parsed as a script.\n\n## Syntax\n\n```js\neval(script)\n```\n\n### Parameters\n\n- `script`\n  - : A string representing a JavaScript expression, statement, or sequence of statements. The expression can include variables and properties of existing objects. It will be parsed as a script, so [`import`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/import) declarations (which can only exist in modules) are not allowed.\n\n### Return value\n\nThe completion value of evaluating the given code. If the completion value is empty, [`undefined`](./undefined.mdx) is returned. If `script` is not a string primitive, `eval()` returns the argument unchanged.\n\n### Exceptions\n\nThrows any exception that occurs during evaluation of the code, including[ `SyntaxError`](./SyntaxError/SyntaxError.mdx) if `script` fails to be parsed as a script.\n\n## Description\n\n`eval()` is a function property of the global object.\n\nThe argument of the `eval()` function is a string. It will evaluate the source string as a script body, which means both statements and expressions are allowed. It returns the completion value of the code. For expressions, it's the value the expression evaluates to. Many statements and declarations have completion values as well, but the result may be surprising (for example, the completion value of an assignment is the assigned value, but the completion value of [`let`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/let) is undefined), so it's recommended to not rely on statements' completion values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/fetch.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# fetch()\n\nThe global **`fetch()`** method starts the process of fetching a\nresource from the network, returning a promise which is fulfilled once the response is\navailable.\n\nThe promise resolves to the `Response` object\nrepresenting the response to your request.\n\nA `fetch()` promise only rejects when a\nnetwork error is encountered (which is usually when there's a permissions issue or\nsimilar). A `fetch()` promise _does\nnot_ reject on HTTP errors (`404`, etc.). Instead, a\n`then()` handler must check the `Response.ok` and/or\n`Response.status` properties.\n\n> **Note:** The `fetch()` method's parameters are identical to\n> those of the `Request()` constructor.\n\n## Explicit Backends\n\nInternally, Fastly uses named backends to handle fetch requests, which need to be explicitly defined to enable custom HTTP origins to be fetched by the service.\n\nThis `backend` option is then a special Fastly-specific fetch option that is provided to the `fetch()` call:\n\n```js\nfetch('https://origin.com/path', { backend: 'origin' });\n```\n\nBackends are configured using the Fastly service backend configuration, see the [Backend documentation](https://developer.fastly.com/reference/api/services/backend/) for more information.\n\n## Dynamic Backends\n\nDynamic backends are a compute feature that allow services to define backends for themselves.\n\nIf the `backend` option is not provided when making `fetch()` requests, a backend will be automatically created by extracting the protocol, host, and port from the provided URL.\n\nIn addition, custom backend configuration options can then also be provided through the [`Backend()`](../fastly:backend/Backend/Backend.mdx) constructor.\n\n## Syntax\n\n```js\nfetch(resource)\nfetch(resource, options)\n```\n\n### Parameters\n\n- `resource`\n\n  - : This defines the resource that you wish to fetch. This can either be:\n\n    - A string or any other object with a \"toString\" method.\n    - A `Request` object.\n\n- `options` _**optional**_\n\n  - : An object containing any custom settings that you want to apply to the request. The\n    possible options are:\n\n    - `method`\n      - : The request method, e.g., `GET`, `POST`.\n    - `headers`\n      - : Any headers you want to add to your request, contained within a\n        `Headers` object or an object literal with `String`\n        values.\n    - `body`\n      - : Any body that you want to add to your request: this can be an `ArrayBuffer`, a `TypedArray`, a `DataView`, a `URLSearchParams`, string object or literal, or a `ReadableStream` object.\n    - `backend` _**Fastly-specific**_\n      - *Fastly-specific*\n    - `cacheOverride` _**Fastly-specific**_\n    - `cacheKey` _**Fastly-specific**_\n    - `imageOptimizerOptions` _**Fastly-specific**_, see [`imageOptimizerOptions`](../fastly:image-optimizer/imageOptimizerOptions.mdx).\n    - `fastly` _**Fastly-specific**_\n      - `decompressGzip`_: boolean_ _**optional**_\n        - Whether to automatically gzip decompress the Response or not.\n\n### Return value\n\nA `Promise` that resolves to a `Response` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/globalThis.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# globalThis\n\nThe global **`globalThis`** property contains the [global `this`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this#global_context) value, which is usually akin to the [global object](https://developer.mozilla.org/docs/Glossary/Global_object).\n\n## Value\n\nThe global `this` object.\n\n> **Note:** The `globalThis` property is configurable and writable so that code authors can hide it when executing untrusted code and prevent exposing the global object.\n\n## Description\n\nThe `globalThis` property provides a standard way of accessing the global `this` value (and hence the global object itself) across environments.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/isFinite.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# isFinite\n\nThe global **`isFinite()`** function determines whether the\npassed value is a finite number. If needed, the parameter is first converted to a\nnumber.\n\n## Syntax\n\n```js\nisFinite(testValue)\n```\n\n### Parameters\n\n- `testValue`\n  - : The value to be tested for finiteness.\n\n### Return value\n\n**`false`** if the argument is (or will be coerced to) positive\nor negative [`Infinity`](./Infinity.mdx) or [`NaN`](./NaN.mdx) or [`undefined`](./undefined.mdx);\notherwise, **`true`**.\n\n## Description\n\n`isFinite` is a function property of the global object.\n\nYou can use this function to determine whether a number is a finite number. The\n`isFinite` function examines the number in its argument. If the argument is\n`NaN`, positive infinity, or negative infinity, this method returns\n`false`; otherwise, it returns `true`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/isNaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# isNaN()\n\nThe **`isNaN()`** function determines whether a value is [`NaN`](./NaN.mdx) when converted to a number. Because coercion inside the `isNaN()` function can be [surprising](#description), you may alternatively want to use [`Number.isNaN()`](./Number/isNaN.mdx).\n\n## Syntax\n\n```js\nisNaN(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested.\n\n### Return value\n\n`true` if the given value is [`NaN`](./NaN.mdx) after being [converted to a number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_coercion); otherwise, `false`.\n\n## Description\n\n`isNaN()` is a function property of the global object.\n\nFor number values, `isNaN()` tests if the number is the value [`NaN`](./NaN.mdx). When the argument to the `isNaN()` function is not of type [Number](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#number_type), the value is first coerced to a number, and the resulting value is then compared against [`NaN`](./NaN.mdx).\n\nThis behavior of `isNaN()` for non-numeric arguments can be confusing! For example, an empty string is coerced to 0, while a boolean is coerced to 0 or 1; both values are intuitively \"not numbers\", but they don't evaluate to `NaN`, so `isNaN()` returns `false`. Therefore, `isNaN()` answers neither the question \"is the input the floating point [`NaN`](./NaN.mdx) value\" nor the question \"is the input not a number\".\n\n[`Number.isNaN()`](./Number/isNaN.mdx) is a more reliable way to test whether a value is the number value `NaN` or not. Alternatively, the expression `x !== x` can be used, and neither of the solutions is subject to the false positives that make the global `isNaN()` unreliable. To test if a value is a number, use [`typeof x === \"number\"`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/typeof).\n\nThe `isNaN()` function answers the question \"is the input functionally equivalent to [`NaN`](./NaN.mdx) when used in a number context\". If `isNaN(x)` returns `false`, you can use `x` in an arithmetic expression as if it's a valid number that's not `NaN`. If `isNaN(x)` returns `true`, `x` will get coerced to `NaN` and make most arithmetic expressions return `NaN` (because `NaN` propagates). You can use this, for example, to test whether an argument to a function is arithmetically processable (usable \"like\" a number), and handle values that are not number-like by throwing an error, providing a default value, etc. This way, you can have a function that makes use of the full versatility JavaScript provides by implicitly converting values depending on context.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/location.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# location\n\nThe **`location`** read-only property returns a\n[`Location`](../globals/WorkerLocation/WorkerLocation.mdx) object with information about the current location of the\ndocument.\n\nSee [`Location`](../globals/WorkerLocation/WorkerLocation.mdx) for all available properties.\n\n## Value\n\nA [`Location`](../globals/WorkerLocation/WorkerLocation.mdx) object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/parseFloat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# parseFloat()\n\nThe **`parseFloat()`** function parses a string argument and returns a floating point number.\n\n## Syntax\n\n```js\nparseFloat(string)\n```\n\n### Parameters\n\n- `string`\n  - : The value to parse, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). Leading whitespace in this argument is ignored.\n\n### Return value\n\nA floating point number parsed from the given `string`, or [`NaN`](./NaN.mdx) when the first non-whitespace character cannot be converted to a number.\n\n> **Note:** JavaScript does not have the distinction of \"floating point numbers\" and \"integers\" on the language level. [`parseInt()`](./parseInt.mdx) and `parseFloat()` only differ in their parsing behavior, but not necessarily their return values. For example, `parseInt(\"42\")` and `parseFloat(\"42\")` would return the same value: a `Number` 42.\n\n## Description\n\nThe `parseFloat` function converts its first argument to a string, parses that string as a decimal number literal, then returns a number or `NaN`. The number syntax it accepts can be summarized as:\n\n- The characters accepted by `parseFloat()` are plus sign (`+`), minus sign (`-` U+002D HYPHEN-MINUS), decimal digits (`0` – `9`), decimal point (`.`), exponent indicator (`e` or `E`), and the `\"Infinity\"` literal.\n- The `+`/`-` signs can only appear strictly at the beginning of the string, or immediately following the `e`/`E` character. The decimal point can only appear once, and only before the `e`/`E` character. The `e`/`E` character can only appear once, and only if there is at least one digit before it.\n- Leading spaces in the argument are trimmed and ignored.\n- `parseFloat()` can also parse and return [`Infinity`](./Infinity.mdx) or `-Infinity` if the string starts with `\"Infinity\"` or `\"-Infinity\"` preceded by none or more white spaces.\n- `parseFloat()` picks the longest substring starting from the beginning that generates a valid number literal. If it encounters an invalid character, it returns the number represented up to that point, ignoring the invalid character and all characters following it.\n- If the argument's first character can't start a legal number literal per the syntax above, `parseFloat` returns [`NaN`](./NaN.mdx).\n\nSyntax-wise, `parseFloat()` parses a subset of the syntax that the [`Number()`](./Number/Number.mdx) function accepts. Namely, `parseFloat()` does not support non-decimal literals with `0x`, `0b`, or `0o` prefixes but supports everything else. However, `parseFloat()` is more lenient than `Number()` because it ignores trailing invalid characters, which would cause `Number()` to return `NaN`.\n\nSimilar to number literals and `Number()`, the number returned from `parseFloat()` may not be exactly equal to the number represented by the string, due to floating point range and inaccuracy. For numbers outside the `-1.7976931348623158e+308` – `1.7976931348623158e+308` range (see `Number.MAX_VALUE`), `-Infinity` or `Infinity` is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/parseInt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# parseInt\n\nThe **`parseInt()`** function parses a string argument and returns an integer of the specified [radix](https://en.wikipedia.org/wiki/Radix) (the base in mathematical numeral systems).\n\n\n\n## Syntax\n\n```js\nparseInt(string)\nparseInt(string, radix)\n```\n\n### Parameters\n\n- `string`\n  - : A string starting with an integer. Leading whitespace in this argument is ignored.\n- `radix` _**optional**_\n\n  - : An integer between `2` and `36` that represents the _radix_ (the base in mathematical numeral systems) of the `string`. It is converted to a [32-bit integer](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#fixed-width_number_conversion); if it's outside the range of \\[2, 36] after conversion, the function will always return `NaN`. If `0` or not provided, the radix will be inferred based on `string`'s value. Be careful — this does NOT always default to `10`! The [description below](#description) explains in more detail what happens when `radix` is not provided.\n\n### Return value\n\nAn integer parsed from the given `string`, or [`NaN`](./NaN.mdx) when\n\n- the `radix` as a 32-bit integer is smaller than `2` or bigger than `36`, or\n- the first non-whitespace character cannot be converted to a number.\n\n> **Note:** JavaScript does not have the distinction of \"floating point numbers\" and \"integers\" on the language level. `parseInt()` and [`parseFloat()`](./parseFloat.mdx) only differ in their parsing behavior, but not necessarily their return values. For example, `parseInt(\"42\")` and `parseFloat(\"42\")` would return the same value: a `Number` 42.\n\n## Description\n\nThe `parseInt` function converts its first argument to a string, parses that string, then returns an integer or `NaN`.\n\nIf not `NaN`, the return value will be the integer that is the first argument taken as a number in the specified `radix`. (For example, a `radix` of `10` converts from a decimal number, `8` converts from octal, `16` from hexadecimal, and so on.)\n\nThe `radix` argument is converted to a number. If it's unprovided, or if the value becomes 0, `NaN` or `Infinity` (`undefined` is coerced to `NaN`), JavaScript assumes the following:\n\n1. If the input `string`, with leading whitespace and possible `+`/`-` signs removed, begins with `0x` or `0X` (a zero, followed by lowercase or uppercase X), `radix` is assumed to be `16` and the rest of the string is parsed as a hexadecimal number.\n2. If the input `string` begins with any other value, the radix is `10` (decimal).\n\n> **Note:** Other prefixes like `0b`, which are valid in [number literals](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#binary), are treated as normal digits by `parseInt()`. `parseInt()` does _not_ treat strings beginning with a `0` character as octal values either. The only prefix that `parseInt()` recognizes is `0x` or `0X` for hexadecimal values — everything else is parsed as a decimal value if `radix` is missing.\n\nIf the radix is `16`, `parseInt()` allows the string to be optionally prefixed by `0x` or `0X` after the optional sign character (`+`/`-`).\n\nIf the radix value (coerced if necessary) is not in range \\[2, 36] (inclusive) `parseInt` returns `NaN`.\n\nFor radices above `10`, letters of the English alphabet indicate numerals greater than `9`. For example, for hexadecimal numbers (base `16`), `A` through `F` are used. The letters are case-insensitive.\n\n`parseInt` understands exactly two signs: `+` for positive, and `-` for negative. It is done as an initial step in the parsing after whitespace is removed. If no signs are found, the algorithm moves to the following step; otherwise, it removes the sign and runs the number-parsing on the rest of the string.\n\nIf `parseInt` encounters a character that is not a numeral in the specified `radix`, it ignores it and all succeeding characters and returns the integer value parsed up to that point. For example, although `1e3` technically encodes an integer (and will be correctly parsed to the integer `1000` by [`parseFloat()`](./parseFloat.mdx), `parseInt(\"1e3\", 10)` returns `1`, because `e` is not a valid numeral in base 10. Because `.` is not a numeral either, the return value will always be an integer.\n\nIf the first character cannot be converted to a number with the radix in use, `parseInt` returns `NaN`. Leading whitespace is allowed.\n\nFor arithmetic purposes, the `NaN` value is not a number in any radix. You can call the [`Number.isNaN`](./Number/isNaN.mdx) function to determine if the result of `parseInt` is `NaN`. If `NaN` is passed on to arithmetic operations, the operation result will also be `NaN`.\n\nBecause large numbers use the `e` character in their string representation (e.g. `6.022e23` for 6.022 × 10<sup>23</sup>), using `parseInt` to truncate numbers will produce unexpected results when used on very large or very small numbers. `parseInt` should _not_ be used as a substitute for [`Math.trunc()`](./Math/trunc.mdx).\n\nTo convert a number to its string literal in a particular radix, use [`thatNumber.toString(radix)`](./Number/prototype/toString.mdx).\n\nBecause `parseInt()` returns a number, it may suffer from loss of precision if the integer represented by the string is [outside the safe range](./Number/isSafeInteger.mdx). The [`BigInt`](./BigInt/BigInt.mdx) function supports parsing integers of arbitrary length accurately, by returning a `BigInt`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/performance/now.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# performance.now()\n\nThe **`performance.now()`** method returns a high resolution timestamp in milliseconds.\nIt represents the time elapsed since [`performance.timeOrigin`](./timeOrigin.mdx) (the time when the worker was instantiated).\n\n## Syntax\n\n```js\nnow()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns a number which represents the time since worker instantation measured in milliseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/performance/timeOrigin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# performance.timeOrigin\n\nThe **`timeOrigin`** read-only property of the Performance interface returns the high resolution timestamp that is used as the baseline for performance-related timestamps.\n\nThis value represents the time when the worker was instantiated.\n\n### Value\n\nReturns a number which represents the time when the worker was instantation."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/setInterval.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# setInterval()\n\nThe **`setInterval()`** method, repeatedly\ncalls a function or executes a code snippet, with a fixed time delay between each\ncall.\n\nThis method returns an interval ID which uniquely identifies the interval, so you\ncan remove it later by calling `clearInterval()`.\n\n## Syntax\n\n```js\nsetInterval(code)\nsetInterval(code, delay)\n\nsetInterval(func)\nsetInterval(func, delay)\nsetInterval(func, delay, arg0)\nsetInterval(func, delay, arg0, arg1)\nsetInterval(func, delay, arg0, arg1, /* … ,*/ argN)\n```\n\n### Parameters\n\n- `func`\n  - : A `function` to be executed every `delay` milliseconds. The first execution happens after `delay` milliseconds.\n- `code`\n  - : An optional syntax allows you to include a string instead of a function, which is\n    compiled and executed every `delay` milliseconds. This syntax is _not\n    recommended_ for the same reasons that make using `eval() a\n    security risk.\n- `delay` _**optional**_\n  - : The time, in milliseconds (thousandths of a second), the timer should delay in\n    between executions of the specified function or code. Defaults to 0 if not specified.\n    below for details on the permitted range of `delay` values.\n- `arg0, …, argN` _**optional**_\n  - : Additional arguments which are passed through to the function specified by\n    _func_ once the timer expires.\n\n### Return value\n\nThe returned `intervalID` is a numeric, non-zero value which identifies the\ntimer created by the call to `setInterval()`; this value can be passed to\n`clearInterval()` to cancel the interval.\n\nIt may be helpful to be aware that `setInterval()` and\n`setTimeout()` share the same pool\nof IDs, and that `clearInterval()` and\n`clearTimeout()` can technically\nbe used interchangeably. For clarity, however, you should try to always match them to\navoid confusion when maintaining your code.\n\n> **Note:** The `delay` argument is converted to a\n> signed 32-bit integer. This effectively limits `delay` to 2147483647 ms,\n> since it's specified as a signed integer in the IDL.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/setTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# setTimeout()\n\nThe global **`setTimeout()`** method sets a timer which executes a function or specified\npiece of code once the timer expires.\n\n## Syntax\n\n```js\nsetTimeout(code)\nsetTimeout(code, delay)\n\nsetTimeout(functionRef)\nsetTimeout(functionRef, delay)\nsetTimeout(functionRef, delay, param1)\nsetTimeout(functionRef, delay, param1, param2)\nsetTimeout(functionRef, delay, param1, param2, /* … ,*/ paramN)\n```\n\n### Parameters\n\n- `functionRef`\n  - : A `function` to be executed after the timer expires.\n- `code`\n  - : An alternative syntax that allows you to include a string instead of a function,\n    which is compiled and executed when the timer expires. This syntax is **not\n    recommended** for the same reasons that make using\n    `eval()` a security risk.\n- `delay` _**optional**_\n\n  - : The time, in milliseconds that the timer should wait before\n    the specified function or code is executed. If this parameter is omitted, a value of 0\n    is used, meaning execute \"immediately\", or more accurately, the next event cycle.\n\n- `param1`, …, `paramN` _**optional**_\n\n  - : Additional arguments which are passed through to the function specified by\n    `functionRef`.\n\n### Return value\n\nThe returned `timeoutID` is a positive integer value which\nidentifies the timer created by the call to `setTimeout()`. This value can be\npassed to `clearTimeout()` to\ncancel the timeout.\n\nIt is guaranteed that a `timeoutID` value will never be reused by a subsequent call to\n`setTimeout()` or `setInterval()` on the same object (a window or\na worker). However, different objects use separate pools of IDs.\n\n## Description\n\nTimeouts are cancelled using `clearTimeout()`.\n\nTo call a function repeatedly (e.g., every _N_ milliseconds), consider using\n`setInterval()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/structuredClone.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# structuredClone()\n\nThe global **`structuredClone()`** method creates a deep clone of a given value.\n\n## Syntax\n\n```js\nstructuredClone(value)\n```\n\n### Parameters\n\n- `value`\n  - : The object to be cloned.\n\n### Return value\n\nThe returned value is a deep copy of the original `value`.\n\n### Exceptions\n\n- `DataCloneError`\n  - : Thrown if any part of the input value is not serializable.\n\n## Description\n\nThis function can be used to deep copy JavaScript values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/undefined.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# undefined\n\nThe global **`undefined`** property represents the primitive\nvalue `undefined`. It is one of JavaScript's \"primitive types\".\n\n## Value\n\nThe primitive value `undefined`.\n\n## Description\n\n`undefined` is a property of the _global object_. That is, it is a variable in global scope.\n\n`undefined` is a non-configurable, non-writable property.\n\nA variable that has not been assigned a value is of type `undefined`. A\nmethod or statement also returns `undefined` if the variable that is being\nevaluated does not have an assigned value. A function returns `undefined` if\na value was not explicitly returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/globals/unescape.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# unescape()\n\n> **Note:** `unescape()` is a non-standard function implemented by browsers and was only standardized for cross-engine compatibility. It is not required to be implemented by all JavaScript engines and may not work everywhere. Use [`decodeURIComponent()`](./decodeURIComponent.mdx) or [`decodeURI()`](./decodeURI.mdx) if possible.\n\nThe **`unescape()`** function computes a new string in which hexadecimal escape sequences are replaced with the characters that they represent. The escape sequences might be introduced by a function like [`escape()`](./escape.mdx).\n\n## Syntax\n\n```js\nunescape(str)\n```\n\n### Parameters\n\n- `str`\n  - : A string to be decoded.\n\n### Return value\n\nA new string in which certain characters have been unescaped.\n\n## Description\n\n`unescape()` is a function property of the global object.\n\nThe `unescape()` function replaces any escape sequence with the character that it represents. Specifically, it replaces any escape sequence of the form `%XX` or `%uXXXX` (where `X` represents one hexadecimal digit) with the character that has the hexadecimal value `XX`/`XXXX`. If the escape sequence is not a valid escape sequence (for example, if `%` is followed by one or no hex digit), it is left as-is.\n\n> **Note:** This function was used mostly for URL encoding and is partly based on the escape format in rfc(1738). The `unescape()` function does _not_ evaluate [escape sequences](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#escape_sequences) in string literals. You can replace `\\xXX` with `%XX` and `\\uXXXX` with `%uXXXX` to get a string that can be handled by `unescape()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/html-rewriter/Element/prototype/after.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# after\n\nThe `after` method inserts content after the closing tag of the element.\n\n## Syntax\n\n```js\nelement.after(content);\nelement.after(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to insert after the element's closing tag.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.after(\"World\");\n// Result: <div>Hello</div>World\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/html-rewriter/Element/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# append\n\nThe `append` method inserts content at the end of the element's content.\n\n## Syntax\n\n```js\nelement.append(content);\nelement.append(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to insert at the end of the element's content.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.append(\", World\");\n// Result: <div>Hello, World</div>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/html-rewriter/Element/prototype/before.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# before\n\nThe `before` method inserts content before the opening tag of the element.\n\n## Syntax\n\n```js\nelement.before(content);\nelement.before(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to insert before the element's opening tag.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.before(\"Well\");\n// Result: Well<div>Hello</div>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/html-rewriter/Element/prototype/hasAttribute.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# hasAttribute\n\nThe `hasAttribute` method returns a `boolean` value indicating whether the specified attribute is present on the element.\n\n## Syntax\n\n```js\nelement.hasAttribute(attributeName);\n```\n\n### Parameters\n\n- `attributeName` _: string_\n  - The name of the attribute to check for.\n\n### Return value\n\nA boolean value indicating whether the attribute is present.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/html-rewriter/Element/prototype/prepend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# prepend\n\nThe `prepend` method inserts content at the beginning of the element's content.\n\n## Syntax\n\n```js\nelement.prepend(content);\nelement.prepend(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to insert at the beginning of the element's content.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.prepend(\"Well, \");\n// Result: <div>Well, Hello</div>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/html-rewriter/Element/prototype/removeAttribute.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# removeAttribute\n\nThe `removeAttribute` method removes the specified attribute from the element.\n\n## Syntax\n\n```js\nelement.removeAttribute(attributeName);\n```\n\n### Parameters\n\n- `attributeName` _: string_\n  - The name of the attribute to remove.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/html-rewriter/Element/prototype/replaceChildren.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# replaceChildren\n\nThe `replaceChildren` method replaces the element's children with new content.\n\n## Syntax\n\n```js\nelement.replaceChildren(content);\nelement.replaceChildren(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to replace the element's children with.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.replaceChildren(\"Greetings!\");\n// Result: <div>Greetings!</div>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/html-rewriter/Element/prototype/replaceWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# replaceWith\n\nThe `replaceWith` method replaces the element with new content.\n\n## Syntax\n\n```js\nelement.replaceWith(content);\nelement.replaceWith(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to replace the element with.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.replaceWith(\"<p>Greetings!</p>\");\n// Result: <p>Greetings!</p>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/html-rewriter/Element/prototype/selector.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# selector\n\nThe `selector` read-only property is a `string` representing the [CSS selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors) that matches the element.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/html-rewriter/Element/prototype/setAttribute.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# setAttribute\n\nThe `setAttribute` method sets the value of the specified attribute on the element. If the value already exists, it will be updated; otherwise, a new attribute with the specified name and value will be added to the element.\n\n## Syntax\n\n```js\nelement.setAttribute(attributeName, value);\n```\n\n### Parameters\n\n- `attributeName` _: string_\n  - The name of the attribute to set.\n- `value` _: string_\n  - The value to assign to the attribute.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/html-rewriter/Element/prototype/tag.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# tag\n\nThe `tag` read-only property is a `string` representing the tag name of the element.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/html-rewriter/HTMLRewritingStream/HTMLRewritingStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `HTMLRewritingStream()`\n\nThe **`HTMLRewritingStream`** lets you rewrite HTML by registering callbacks on CSS selectors. When an element matching the selector is encountered, the rewriter calls your callback. This callback can manipulate the attributes of the element, and add or remove content from the immediate context.\n\n## Syntax\n\n```js\nnew HTMLRewritingStream()\n```\n\n### Return value\n\nA new `HTMLRewritingStream` object.\n\n## Examples\n\nIn this example, we fetch an HTML page and use the HTML rewriter to add an attribute to all `div` tags and prepend the text `Header:` to all `h1` tags:\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { HTMLRewritingStream } from 'fastly:html-rewriter';\n\nasync function handleRequest(event) {\n  let transformer = new HTMLRewritingStream()\n    .onElement(\"h1\", e => e.prepend(\"Header: \"))\n    .onElement(\"div\", e => e.setAttribute(\"special-attribute\", \"top-secret\"));\n  let body = (await fetch(\"https://example.com/\")).body.pipeThrough(transformer);\n\n  return new Response(body, {\n    status: 200,\n    headers: new Headers({\n      \"content-type\": \"text/html; charset=utf-8\",\n    })\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/html-rewriter/HTMLRewritingStream/prototype/onElement.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# onElement\n\n▸ **onElement**`(selector: string, handler: (element: Element) => void): this`\n\nRegisters an element handler with the [`HTMLRewritingStream`] that will be called for each [`Element`] that matches the [CSS selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors) `selector`.\n\nElements added by handlers will not be processed by other handlers.\n\n## Syntax\n\n```js\n.onElement(selector, handler)\n```\n\n### Parameters\n\n- `selector` _: string_\n  - A CSS selector that determines the elements for which `handler` will be called\n  - The following types of CSS selector are supported:\n\nCurrently the rewriter supports the following CSS selectors:\n\n| Pattern              | Description                                                                |\n|----------------------|----------------------------------------------------------------------------|\n| `*`                  | Any element                                                                |\n| `E`                  | All elements of type `E`                                                   |\n| `E F`                | `F` elements inside `E` elements                                           |\n| `E > F`              | `F` elements directly inside `E` elements                                  |\n| `E:nth-child(n)`     | The n-th child of type `E`                                                 |\n| `E:first-child`      | First child of type `E`                                                    |\n| `E:nth-of-type(n)`   | The n-th sibling of type `E`                                               |\n| `E:first-of-type`    | First sibling of type `E`                                                  |\n| `E:not(s)`           | Type `E` elements not matching selector `s`                                |\n| `E.myclass`          | Type `E` elements with class `\"myclass\"`                                   |\n| `E#myid`             | Type `E` elements with ID `\"myid\"`                                         |\n| `E[attr]`            | Type `E` elements with attribute `attr`                                    |\n| `E[attr=\"val\"]`      | Type `E` elements where `attr` is `\"val\"`                                  |\n| `E[attr=\"val\" i]`    | Type `E` elements where `attr` is `\"val\"`, case-insensitive                |\n| `E[attr=\"val\" s]`    | Type `E` elements where `attr` is `\"val\"`, case-sensitive                  |\n| `E[attr~=\"val\"]`     | Type `E` elements where `attr` contains `\"val\"` in a space-separated list  |\n| `E[attr`&#124`;=\"val\"]`| Type `E` elements where `attr` is hyphen-separated and starts with `\"val\"` |\n| `E[attr^=\"val\"]`     | Type `E` elements where `attr` starts with `\"val\"`                         |\n| `E[attr$=\"val\"]`     | Type `E` elements where `attr` ends with `\"val\"`                           |\n| `E[attr*=\"val\"]`     | Type `E` elements where `attr` contains `\"val\"`                            |\n\n- `handler` _: (element: Element) => void_\n  - A callback function that will be called once for each element that matches `selector`\n\n### Return value\n\nThe `HTMLRewritingStream`, so multiple calls to `onElement` can be chained.\n\n### Exceptions\n\n- `Error`\n  - If the provided `selector` is not a valid CSS selector.\n  - If the provided `handler` is not a function.\n\n## Examples\n\n\nIn this example, we fetch an HTML page and use the HTML rewriter to add an attribute to all `div` tags and prepend the text `Header:` to all `h1` tags:\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { HTMLRewritingStream } from 'fastly:html-rewriter';\n\nasync function handleRequest(event) {\n  let transformer = new HTMLRewritingStream()\n    .onElement(\"h1\", e => e.prepend(\"Header: \"))\n    .onElement(\"div\", e => e.setAttribute(\"special-attribute\", \"top-secret\"));\n  let body = (await fetch(\"https://example.com/\")).body.pipeThrough(transformer);\n\n  return new Response(body, {\n    status: 200,\n    headers: new Headers({\n      \"content-type\": \"text/html; charset=utf-8\",\n    })\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/image-optimizer/Auto.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Auto`\n\nEnumerator options for [`imageOptimizerOptions.auto`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `AVIF` (`\"avif\"`) If the browser's Accept header indicates compatibility, deliver an AVIF image.\n- `WEBP` (`\"webp\"`)\tIf the browser's Accept header indicates compatibility, deliver a WebP image.\n\n## Examples\n\n```js\nimport { Auto, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      auto: Auto.AVIF\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/image-optimizer/BWAlgorithm.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `BWAlgorithm`\n\nEnumerator options for [`imageOptimizerOptions.bw`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Threshold` (`\"threshold\"`) Uses a luminance threshold to convert the image to black and white.\n- `Atkinson` (`\"atkinson\"`)\tUses [Atkinson dithering](https://en.wikipedia.org/wiki/Atkinson_dithering) to convert the image to black and white.\n\n\n## Examples\n\n```js\nimport { Region, BWAlgorithm } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      bw: BWAlgorithm.Threshold\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/image-optimizer/CropMode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `CropMode`\n\nEnumerator options for [`imageOptimizerOptions.crop.mode`](./imageOptimizerOptions.mdx) and `imageOptimizerOptions.precrop.mode`.\n\n## Constants\n\n- `Smart` (`\"smart\"`) Enables content-aware algorithms to attempt to crop the image to the desired aspect ratio while intelligently focusing on the most important visual content, including the detection of faces.\n- `Safe` (`\"safe\"`)\tAllow cropping out-of-bounds regions.\n\n## Examples\n\n```js\nimport { CropMode, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      crop: {\n        size: { ratio: { width: 4, height: 3 } },\n        mode: CropMode.Smart,\n      }\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/image-optimizer/Disable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Disable`\n\nEnumerator options for [`imageOptimizerOptions.disable`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Upscale` (`\"upscale\"`) Prevent images being resized such that the output image's dimensions are larger than the source image.\n\n## Examples\n\n```js\nimport { Disable, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      width: 2560,\n      disable: Disable.Upscale\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/image-optimizer/Enable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Enable`\n\nEnumerator options for [`imageOptimizerOptions.enable`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Upscale` (`\"upscale\"`) Allow images to be resized such that the output image's dimensions are larger than the source image.\n\n## Examples\n\n```js\nimport { Enable, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      width: 2560,\n      enable: Enable.Upscale\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/image-optimizer/Fit.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Fit`\n\nEnumerator options for [`imageOptimizerOptions.fit`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Bounds` (`\"bounds\"`) Resize the image to fit entirely within the specified region, making one dimension smaller if needed.\n- `Cover` (`\"cover\"`) Resize the image to entirely cover the specified region, making one dimension larger if needed.\n- `Crop` (`\"crop\"`) Resize and crop the image centrally to exactly fit the specified region.\n\n## Examples\n\n```js\nimport { Fit, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      width: 150,\n      height; 150,\n      fit: Fit.Bounds\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/image-optimizer/Format.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Format`\n\nEnumerator options for [`imageOptimizerOptions.format`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Auto` (`\"auto\"`) Automatically use the best format based on browser support and image/transform characteristics\n- `AVIF` (`\"avif\"`) AVIF\n- `BJPG` (`\"bjpg\"`) Baseline JPEG \n- `GIF` (`\"gif\"`) Graphics Interchange Format\n- `JPG` (`\"jpg\"`) JPEG \n- `JXL` (`\"jxl\"`) JPEGXL \n- `MP4` (`\"mp4\"`) MP4 (H.264)\n- `PJPG` (`\"pjpg\"`) Progressive JPEG \n- `PJXL` (`\"pjxl\"`) Progressive JPEGXL\n- `PNG` (`\"png\"`) Portable Network Graphics\n- `PNG8` (`\"png8\"`) Portable Network Graphics palette image with 256 colors and 8-bit transparency\n- `SVG` (`\"svg\"`) Scalable Vector Graphics\n- `WEBP` (`\"webp\"`) WebP\n- `WEBPLL` (`\"webpll\"`) WebP (Lossless)\n- `WEBPLY` (`\"webply\"`) WebP (Lossy)\n\n## Examples\n\n```js\nimport { Format, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      format: Format.PNG\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/image-optimizer/Metadata.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Metadata`\n\nEnumerator options for [`imageOptimizerOptions.metadata`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Copyright` (`\"copyright\"`) Preserve [copyright notice](https://www.iptc.org/std/photometadata/specification/IPTC-PhotoMetadata#copyright-notice), creator, credit line, licensor, and web statement of rights fields.\n- `C2PA` (`\"c2pa\"`) Preserve the [C2PA manifest](https://c2pa.org/) and add any transformations performed by Fastly Image Optimizer.\n- `CopyRightAndC2PA` (`\"copyright,c2pa\"`) Resize and crop the image centrally to exactly fit the specified region.\n\n## Examples\n\n```js\nimport { Metadata, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      metadata: Metadata.Copyright\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/image-optimizer/Optimize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Optimize`\n\nEnumerator options for [`imageOptimizerOptions.optimize`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Low` (`\"low\"`) Output image quality will be similar to the input image quality.\n- `Medium` (`\"medium\"`) More optimization is allowed. We attempt to preserve the visual quality of the input image.\n- `High` (`\"high\"`) Minor visual artifacts may be visible. This produces the smallest file.\n\n## Examples\n\n```js\nimport { Optimize, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      optimize: Optimize.High\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/image-optimizer/Orient.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Orient`\n\nEnumerator options for [`imageOptimizerOptions.orient`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Default` (`\"1\"`) \n- `FlipHorizontal` (`\"2\"`) \n- `FlipHorizontalAndVertical` (`\"3\"`) \n- `FlipVertical` (`\"4\"`) \n- `FlipHorizontalOrientLeft` (`\"5\"`) \n- `OrientRight` (`\"6\"`) \n- `FlipHorizontalOrientRight` (`\"7\"`) \n- `OrientLeft` (`\"8\"`) \n\n## Examples\n\n```js\nimport { Orient, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      orient: Orient.FlipHorizontal\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/image-optimizer/Profile.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Profile`\n\nEnumerator options for [`imageOptimizerOptions.profile`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Baseline` (`\"baseline\"`) The profile recommended for video conferencing and mobile applications. (Default)\n- `Main` (`\"main\"`) The profile recommended for standard-definition broadcasts.\n- `High` (`\"high\"`) The profile recommended for high-definition broadcasts.\n\n## Examples\n\n```js\nimport { Profile, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      profile: Profile.Main\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/image-optimizer/Region.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Region`\n\nEnumerator options for [`imageOptimizerOptions.region`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `UsEast` (`\"us_east\"`)\n- `UsCentral` (`\"us_central\"`)\n- `UsWest` (`\"us_west\"`)\n- `EuCentral` (`\"eu_central\"`)\n- `EuWest` (`\"eu_west\"`)\n- `Asia` (`\"asia\"`)\n- `Australia` (`\"australia\"`)\n\n\n## Examples\n\n```js\nimport { Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/image-optimizer/ResizeFilter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `ResizeFilter`\n\nEnumerator options for [`imageOptimizerOptions.resizeFilter`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Nearest` (`\"nearest\"`) Uses the value of nearby translated pixel values.\n- `Bilinear` (`\"bilinear\"`) Uses an average of a 2x2 environment of pixels.\n- `Linear` (`\"linear\"`) Same as `Bilenear`.\n- `Bicubic` (`\"bicubic\"`) Uses an average of a 4x4 environment of pixels, weighing the innermost pixels higher.\n- `Cubic` (`\"cubic\"`) Same as `Bicubic`.\n- `Lanczos2` (`\"lanczos2\"`) Uses the Lanczos filter to increase the ability to detect edges and linear features within an image and uses sinc resampling to provide the best possible reconstruction.\n- `Lanczos3` (`\"lanczos3\"`) Lanczos3 uses a better approximation of the sinc resampling function. (Default)\n- `Lanczos` (`\"lanczos\"`) Same as `Lanczos3`.\n\n## Examples\n\n```js\nimport { ResizeFilter, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      width: 2560,\n      resizeFilter: ResizeFilter.Linear\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/image-optimizer/imageOptimizerOptions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `imageOptimizerOptions` \n\nOptions specified in the [`Request`](../globals/Request/Request.mdx) constructor for running the [Fastly Image Optimizer](https://docs.fastly.com/products/image-optimizer). More detailed documentation on all Image Optimizer options is available in the [Image Optimizer reference docs](https://www.fastly.com/documentation/reference/io/).\n\n## Parameters\n\nAll parameters other than `region` are optional.\n\n- `region`: _[`Region`](./Region.mdx)_ Where image optimizations should occur.\n- `auto`: _[`Auto`](./Auto.mdx)_ Enable optimization features automatically.\n- `bgColor`: _[`Color`](#color)_ Set the background color of an image.\n- `blur`: _`number` (0.5-1000) or [`Percentage`](#percentage)_ Set the blurriness of the output image.\n- `brightness`: _`number` (-100-100)_ Set the brightness of the output image.\n- `bw`: _[`BWAlgorithm`](./BWAlgorithm.mdx)_ Convert an image to black and white.\n- `canvas`: _`Object`_ Increase the size of the canvas around an image.\n    - `size`: _[`Size`](#size)_\n    - `position` (optional): _[`Position`](#position)_\n- `contrast`: _`number` (-100-100)_ Set the contrast of the output image.\n- `crop`: _`Object`_ Remove pixels from an image.\n    - `size`: _[`Size`](#size)_\n    - `position` (optional): _[`Position`](#position)_\n    - `mode` (optional): _[`CropMode`](./CropMode.mdx)_\n- `disable`: _[`Disable`](./Disable.mdx)_ Disable functionality that is enabled by default.\n- `dpr`: `number` Ratio between physical pixels and logical pixels.\n- `enable`: _[`Enable`](./Enable.mdx)_ Enable functionality that is disabled by default.\n- `fit`: _[`Fit`](./Fit.mdx)_ Set how the image will fit within the size bounds provided.\n- `format`: _[`Format`](./Format.mdx)_ Specify the output format to convert the image to.\n- `frame`: _`number` (must have the value 1)_ Extract the first frame from an animated image sequence.\n- `height`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ Resize the height of the image.\n- `level`: _`String` containing one of the [allowed values](https://www.fastly.com/documentation/reference/io/level/#allowed-values)_ Specify the level constraints when converting to video.\n- `metadata`: _[`Metadata`](./Metadata.mdx)_ Control which metadata fields are preserved during transformation.\n- `optimize`: _[`Optimize`](./Optimize.mdx)_ Automatically apply optimal quality compression.\n- `orient`: _[`Orient`](./Orient.mdx)_ Change the cardinal orientation of the image.\n- `pad`: _[`Sides`](#sides)_ Add pixels to the edge of an image.\n- `precrop`: _`Object`_ Remove pixels from an image before any other transformations occur.\n    - `size`: _[`Size`](#size)_\n    - `position`: _[`Position`](#position)_\n    - `mode`: _[`CropMode`](./CropMode.mdx)_\n- `profile`: _[`Profile`](./Profile.mdx)_ Specify the profile class of application when converting to video.\n- `quality`: _`integer` (1-100)_ Optimize the image to the given compression level for lossy file formatted images.\n- `resizeFilter`: _[`ResizeFilter`](./ResizeFilter.mdx)_ Specify the resize filter used when resizing images.\n- `saturation`: _`number` (-100-100)_ Set the saturation of the output image.\n- `sharpen`: _`Object`_ Set the sharpness of the output image.\n    - `amount`: _`number` (0-10)_\n    - `radius`: _`number` (0.5-1000)_\n    - `threshold`: _`integer` (0-255)_\n- `trim`: _[`Sides`](#sides)_ Remove pixels from the edge of an image.\n- `viewbox`: _`number` (must have the value 1)_ Remove explicit width and height properties in SVG output.\n- `width`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ Resize the width of the image.\n\n## Types\n\n### Color\n\nEither:\n\n- a 3 or 6 character hexadecimal string\n- an `Object` containing:\n    - `r`: _`integer` (0-255)_ Red component\n    - `g`: _`integer` (0-255)_ Green component\n    - `b`: _`integer` (0-255)_ Blue component\n    - `a` (optional): _`number` (0.0-1.0)_ Alpha component \n\n### Percentage\n\nA `String` containing a number suffixed with a percent sign (%).\n\n### Position\n\nAn `Object` containing:\n\n- Exactly one of:\n    - `x`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ \n    - `offsetX`: _`number` (interpreted as a percentage)_\n- Exactly one of: \n    - `y`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ \n    - `offsetY`: _`number` (interpreted as a percentage)_\n\n### Sides\n\nAn `Object` containing `top`, `bottom`, `left`, and `right`, all of which are either an `integer` or [`Percentage`](#percentage).\n\n### Size\n\nAn `Object` containing either:\n\n- `absolute`: _`Object`_\n    - `width`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ \n    - `height`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ \n- `ratio`: _`Object`_\n    - `width`: _`number`_\n    - `height`: _`number`_\n\n## Examples\n\n```js\nimport { Format, Orient, CropMode, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      format: Format.PNG,\n      bgColor: {\n        'r': 100,\n        'g': 255,\n        'b': 9,\n        'a': 0.5\n      },\n      blur: '1%',\n      brightness: -20,\n      contrast: -20,\n      height: 600,\n      level: '4.0',\n      orient: Orient.FlipVertical,\n      saturation: 80,\n      sharpen: { 'amount': 5, 'radius': 6, 'threshold': 44 },\n      canvas: { 'size': { 'absolute': { 'width': 400, 'height': 400 } } },\n      crop: { size: { absolute: { width: 200, height: 200 }, mode: CropMode.Safe } },\n      trim: { top: 10, left: 10, right: 10, bottom: 10 },\n      pad: { top: 30, left: 30, right: \"1%\", bottom: 30 }\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/index.mdx",
    "content": "---\nsidebar_position: 1\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n\n# JavaScript for Fastly Compute\n\nThis site is the full SDK reference for [`@fastly/js-compute`](https://www.npmjs.com/package/%40fastly/js-compute), the module that provides the interface between your JavaScript code and the [Fastly Compute](https://www.fastly.com) platform.\n\nIf you haven't used Fastly Compute before, start by [setting up your first Fastly Compute program](https://developer.fastly.com/learning/compute/) over on **developer.fastly.com** so that you have a working development environment.\n\nTo learn more about the fundamentals of using JavaScript with Fastly Compute, see our [using JavaScript](https://developer.fastly.com/learning/compute/javascript/) guide.\n\n## Understanding the JavaScript SDK\n\nIncoming HTTP requests to [domains that are attached to your Fastly service](https://developer.fastly.com/learning/concepts/) will start an instance of your application and invoke a `fetch` event, which can be bound using the `addEventListener` function:\n\n```js\naddEventListener(\"fetch\", event => event.respondWith(handleRequest(event)) );\n\nasync function handleRequest(event) {\n  const req = event.request;\n\n  return fetch(req, {\n    backend: \"example_backend\"\n  });\n}\n```\n\nFastly specific features are available as named imports from `fastly:` prefixed modules, all of which are documented in this site.  For example, the [env](https://js-compute-reference-docs.edgecompute.app/docs/fastly:env/env) function provides access to [environment variables](https://developer.fastly.com/reference/compute/ecp-env/) and can be imported into your application like this:\n\n```js\nimport { env } from \"fastly:env\"\n```\n\nJavaScript code compiled for Fastly Compute has access to a global environment with most of the globals you would expect in an ECMAScript runtime, like [`Date`](https://js-compute-reference-docs.edgecompute.app/docs/globals/Date/) and [`console`](https://js-compute-reference-docs.edgecompute.app/docs/globals/console/log).\n\n## Trying things out\n\n[Fastly fiddle](https://fiddle.fastly.dev) is an online web-based playground where you can run Fastly code.  You'll see fiddles included in many pages of our [developer hub](https://developer.fastly.com) and this SDK reference. These interactive examples can be executed right on the page by clicking the **RUN** tab:\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nasync function app(event) {\n    const request = event.request;\n    return new Response(\"You made a request to \" + request.url)\n}\naddEventListener(\"fetch\", event => {\n  event.respondWith(app(event));\n});\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nasync function app(event) {\n    const request = event.request;\n    return new Response(`You made a request to ${request.url}`)\n}\n\naddEventListener(\"fetch\", event => {\n  event.respondWith(app(event));\n});\n\n```\n\n</Fiddle>\n\nCheck out [`fiddle.fastly.dev`](https://fiddle.fastly.dev) to create your own.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/kv-store/KVStore/KVStore.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `KVStore()`\n\nThe **`KVStore` constructor** lets you connect your Fastly Compute application to a Fastly KV store.\n\nA Fastly KV store is a persistent, globally consistent key-value store. See [Data stores for Fastly services](https://developer.fastly.com/learning/concepts/edge-state/data-stores#kv-stores) for initialization and usage details.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew KVStore(name)\n```\n\n> **Note:** `KVStore()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Define a KV store instance using the resource link name.\n  \n### Return value\n\nA new `KVStore` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no KV Store exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name does not start with an ascii alphabetical character \n  - Thrown if the provided name contains control characters `(\\u0000-\\u001F)`\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then read back the value and return it to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/kv-store/KVStore/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# KVStore.prototype.delete\n\nDeletes the value associated with the key `key` in the KV store.\n\n## Syntax\n\n```js\ndelete(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the KV-store.\n\n### Return value\n\nReturns `undefined`\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is any of the strings `\"\"`, `\".\"`, or `\"..\"`\n    - Starts with the string `\".well-known/acme-challenge/\"`\n    - Contains any of the characters `\"#;?^|\\n\\r\"`\n    - Is longer than 1024 characters\n    - Does not exist\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then delete the entry.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n  await files.delete('hello')\n\n  const entry = await files.get('hello')\n  if (entry) {\n    return new Response(await entry.text())\n  } else {\n    return new Response('no file named hello exists')\n  }\n\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/kv-store/KVStore/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# KVStore.prototype.get\n\n▸ **get**(): `string`\n\nGets the value associated with the key `key` in the KV store.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the KV-store.\n\n### Return value\n\nIf the key does not exist in the KV store, this returns a `Promise` which resolves with `null`.\n\nIf the key does exist in the KV store, this returns a `Promise` which resolves with an `KVStoreEntry`.\n\n## Description\n\nSend the given message, converted to a string, to this KVStore instance's endpoint.\n\nThe `get()` method requires its `this` value to be a [`KVStore`](../KVStore.mdx) object.\n\nIf the `this` value does not inherit from `KVStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is any of the strings `\"\"`, `\".\"`, or `\"..\"`\n    - Starts with the string `\".well-known/acme-challenge/\"`\n    - Contains any of the characters `\"#;?^|\\n\\r\"`\n    - Is longer than 1024 characters\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then read back the value and return it to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/kv-store/KVStore/prototype/list.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStore.prototype.list\n\nThe **`list()`** can be used to list the keys of a store.\n\n## Syntax\n\n```js\nlist(options?)\n```\n\n### Parameters\n\n- `options` _: object_ _**optional**_\n  - List options supporting properties:\n  - `cursor` _: string_ _**optional**_\n    - The cursor used to pick up from a previous iteration.\n  - `limit` _: number_ _**optional**_\n    - The maximum number of keys to return.\n  - `prefix` _: string_ _**optional**_\n    - List only those keys that start with the given string prefix.\n  - `noSync` _: boolean_ _**optional**_\n    - Do not sync the key list first, instead provide a possibly out-of-date listing. May be faster but inconsistent.\n\n### Return value\n\nReturns a `Promise` which resolves with `{ list: string[], cursor: string | undefined }`.\n\n## Example\n\nIn this example we list the keys of a KV Store named `'files'`, iterating 10 at a time, counting the total;\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from 'fastly:kv-store';\n\nasync function app(event) {\n  const files = new KVStore('files');\n\n  let cursor,\n    list,\n    total = 0;\n  do {\n    ({ cursor, list } = await files.list({ limit: 10, cursor }));\n    total += list?.length;\n  } while (list);\n\n  return new Response(`Iterated ${total} entries`);\n}\n\naddEventListener('fetch', (event) => event.respondWith(app(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/kv-store/KVStore/prototype/put.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# KVStore.prototype.put\n\nThe **`put()`** method stores a `value` into the KV store under a `key`.\n\n> **Note**: KV stores are eventually consistent, this means that the updated contents associated with the key `key` may not be available to read from all edge locations immediately and some edge locations may continue returning the previous contents associated with the key.\n\n## Syntax\n\n```js\nput(key, value, options?)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to store the supplied value under within the KV store.\n- `value` _:  ArrayBuffer | TypedArray | DataView| ReadableStream | URLSearchParams | String | string literal_\n  - The value to store within the KV store.\n- `options` _: object_ _**optional**_\n  - An insert options parameter, supporting:\n  - `metadata` _: ArrayBuffer | TypedArray | DataView_ _**optional**_\n    - Binary metadata associated with the entry, may be up to 1000 bytes.\n  - `ttl` _: number_ _**optional**_\n    - TTL for the entry\n  - `mode` _: 'overwrite' | 'add' | 'append' | 'prepend'_ _**optional**_\n    - Insert mode, defaults to 'overwrite'\n  - `gen` _: number_ _**optional**_\n    - 'generation' header specific to the version of an entry key\n\n### Return value\n\nReturns a `Promise` which resolves with `undefined` when the provided `value` has been written into the KV store.\n\n## Description\n\nStores the supplied `value` into the KV store under the supplied `key`.\n\nThe `put()` method requires its `this` value to be a [`KVStore`](../KVStore.mdx) object.\n\nIf the `this` value does not inherit from `KVStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is any of the strings `\"\"`, `\".\"`, or `\"..\"`\n    - Starts with the string `\".well-known/acme-challenge/\"`\n    - Contains any of the characters `\"#;?^|\\n\\r\"`\n    - Is longer than 1024 characters\n- `TypeError`\n  - If the provided `gen`:\n    - Is not an number\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then read back the value and return it to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/kv-store/KVStoreEntry/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.arrayBuffer()\n\nThe `arrayBuffer()` method of the `KVStoreEntry` interface takes a `KVStoreEntry` stream and reads it to completion. It returns a promise that resolves with an `ArrayBuffer`.\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an `ArrayBuffer`."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/kv-store/KVStoreEntry/prototype/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.body\n\nThe `body` read-only property of the `KVStoreEntry` interface is a `ReadableStream` of the body contents.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/kv-store/KVStoreEntry/prototype/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.bodyUsed\n\nThe `bodyUsed` read-only property of the `KVStoreEntry` interface is a `boolean` value that indicates whether the body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/kv-store/KVStoreEntry/prototype/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.json()\n\nThe `json()` method of the `KVStoreEntry` interface takes a `KVStoreEntry` stream and reads it to completion. It returns a promise which resolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a JavaScript object. This object could be anything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/kv-store/KVStoreEntry/prototype/metadata.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.metadata()\n\nThe `metadata()` method of the `KVStoreEntry` interface provides the binary metadata associated with the `KVStoreEntry`.\n\nThe metadata binary may be up to 1000 bytes, and is returned as a `Uint8Array` TypedArray buffer, if metadata is set, or null otherwise.\n\n## Syntax\n\n```js\nmetadata()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a `Uint8Array` buffer object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/kv-store/KVStoreEntry/prototype/metadataText.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.metadataText()\n\nThe `metadataText()` method of the `KVStoreEntry` interface provides a String interpretation of binary metadata associated with the `KVStoreEntry`.\n\nIf the binary data is not a valid string, an encoding error will be thrown.\n\n## Syntax\n\n```js\nmetadataText()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a String.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/kv-store/KVStoreEntry/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.text()\n\nThe `text()` method of the `KVStoreEntry` interface takes a `KVStoreEntry` stream and reads it to completion. It returns a promise that resolves with a `String`. The `KVStoreEntry `is always decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a `String`."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/logger/Logger/Logger.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Logger()`\n\nThe **`Logger` constructor** lets you connect your Fastly Compute application to a [Fastly Named Logger](https://developer.fastly.com/learning/integrations/logging/).\n\n## Syntax\n\n```js\nnew Logger(name)\n```\n\n> **Note:** `Logger()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - The Fastly Logger which should be associated with this Logger instance\n\n### Return value\n\nA new `Logger` object.\n\n## Examples\n\nIn this example we have a create a logger named `\"splunk\"` and logs the incoming request method and destination.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Logger Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^3\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nasync function app (event) {\n  let logger = new Logger(\"splunk\");\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nconst logger = new Logger(\"splunk\");\nasync function app (event) {\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/logger/Logger/prototype/log.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Logger.prototype.log\n\n▸ **log**(): `string`\n\nSends the given message, converted to a string, to this Logger instance's endpoint.\n\n**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nlog(message)\n```\n\n### Return value\n\n`undefined`.\n\n## Description\n\nSend the given message, converted to a string, to this Logger instance's endpoint.\n\nThe `log()` method requires its `this` value to be a [`Logger`](../Logger.mdx) object.\n\nIf the `this` value does not inherit from `Logger.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n## Examples\n\nIn this example we have a create a logger named `\"splunk\"` and logs the incoming request method and destination.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Logger.prototype.log Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^3\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nlet logger = new Logger(\"splunk\");\nasync function app (event) {\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nasync function app (event) {\n  let logger = new Logger(\"splunk\");\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/logger/configureConsole.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# configureConsole\n\nThe **`configureConsole()`** function allows configuring the behaviour of the `console` global JS logger.\n\n## Syntax\n\n```js\nconfigureConsole(loggingOptions)\n```\n\n### Parameters\n\n- `loggingOptions` _: object_\n  - \n  - The name has to be between 1 and 254 characters inclusive.\n  - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n\n## Examples\n\nIn this example, we disable prefixing for `console.log` and use `stderr` output for `console.error`:\n\n```js\nimport { configureConsole } from \"fastly:logger\";\n\nconfigureConsole({\n  prefixing: false,\n  stderr: true\n});\n\nasync function handleRequest(event) {\n  console.log(JSON.stringify(event.request.headers));\n  const url = new URL(event.request.url);\n  try {\n    validate(url);\n  } catch (e) {\n    console.error(`Validation error: ${e}`);\n    return new Response('Bad Request', { status: 400 });\n  }\n  return new Response('OK');\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/migration-guide/index.mdx",
    "content": "---\nsidebar_position: 1\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Migrating from v2 to v3`\n\n## SimpleCache.delete renamed to SimpleCache.purge and requires purge options to be supplied as the second parameter\n\nWe are renaming because \"purge\" is already a well-known and documented concept for removing content from Fastly's cache.\n\nThe new addition of a second argument allows the caller to decide what scope to purge the content from, currently they can choose to purge from all of Fastly (\"global\") or from the POP that contains the currently executing instance (\"pop\"). We do not provide a default option right now, in the future we may provide a default option, if we discover a common pattern is being used.\n\nHere is an example of migrating an application using `SimpleCache.delete` to `SimpleCache.purge` with the same purging behaviour:\n```diff\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const url = new URL(event.request);\n  const path = url.pathname;\n  if (url.searchParams.has('delete')) {\n-    SimpleCache.delete(path);\n+    SimpleCache.purge(path, { scope: \"global\" });\n    return new Response(page, { status: 204 });\n  }\n\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n\n```\n\n\n# `Migrating from v1 to v2`\n\n## ObjectStore renamed to KVStore\n\nWe have renamed the `ObjectStore` class to `KVStore`, and the module name from `fastly:object-store` to `fastly:kv-store`.\n\nYou will need to update your code to use the new class name and module name.\n\nBelow is the change that would need to be made for the imported module name:\n```diff\n- import { ObjectStore } from 'fastly:object-store';\n+ import { KVStore } from 'fastly:kv-store';\n```\n\nAnd this is the change that would need to be made for constructing an instance of the class:\n```diff\n- const store = new ObjectStore('my-store');\n+ const store = new KVStore('my-store');\n```\n\n\nHere is a full example of migrating an application from ObjectStore to KVStore:\n```diff\n/// <reference types=\"@fastly/js-compute\" />\n\n- import { ObjectStore } from 'fastly:object-store';\n+ import { KVStore } from 'fastly:kv-store';\n\nasync function app(event) {\n-   const files = new ObjectStore('files');\n+   const files = new KVStore('files');\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/secret-store/SecretStore/SecretStore.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `SecretStore()`\n\nThe **`SecretStore` constructor** lets you connect your Fastly Compute application to a Fastly Secret store.\n\nA secret store is a persistent, globally distributed store for secrets accessible to Fastly Compute services during request processing.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew SecretStore(name)\n```\n\n> **Note:** `SecretStore()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Define a Secret Store instance using the resource link name.\n  \n### Return value\n\nA new `SecretStore` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Secret Store exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name contains characters other than letters, numbers, dashes (-), underscores (_), and periods (.)\n\n## Examples\n\nIn this example we connect to a Secret Store named `'secrets'` and retrieve a secret named `'cat-api-key'` use the value in a Request header.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SecretStore } from \"fastly:secret-store\";\n\nasync function app(event) {\n  const secrets = new SecretStore('secrets')\n\n  const catApiKey = await secrets.get('cat-api-key')\n\n  return fetch('/api/cat', {\n    headers: {\n      'cat-api-key': catApiKey.plaintext()\n    }\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/secret-store/SecretStore/fromBytes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# fromBytes\n\nThe **`fromBytes()`** function is used to create an in-memory secret from an array buffer.\n\n>**Note**: This API should be avoided when possible, by instead using [SecretStore.prototype.get](./prototype/get.mdx) to obtain secure secrets.\n\n## Syntax\n\n```js\nfromBytes(new Uint8Array([1, 2, 3]))\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns a `SecretStoreEntry`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/secret-store/SecretStore/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SecretStore.prototype.get\n\n▸ **get**(): `string`\n\nGets the value associated with the key `key` in the Secret store.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the Secret Store.\n\n### Return value\n\nIf the key does not exist in the Secret Store, this returns a `Promise` which resolves with `null`.\n\nIf the key does exist in the Secret Store, this returns a `Promise` which resolves with an `SecretStoreEntry`.\n\n## Description\n\nSend the given message, converted to a string, to this SecretStore instance's endpoint.\n\nThe `get()` method requires its `this` value to be a [`SecretStore`](../SecretStore.mdx) object.\n\nIf the `this` value does not inherit from `SecretStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Is longer than 255 characters\n    - Contains characters other than letters, numbers, dashes (-), underscores (_), and periods (.)\n\n## Examples\n\nIn this example we connect to a Secret Store named `'secrets'` and retrieve a secret named `'cat-api-key'` use the value in a Request header.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SecretStore } from \"fastly:secret-store\";\n\nasync function app(event) {\n  const secrets = new SecretStore('secrets')\n\n  const catApiKey = await secrets.get('cat-api-key')\n\n  return fetch('/api/cat', {\n    headers: {\n      'cat-api-key': catApiKey.plaintext()\n    }\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/secret-store/SecretStoreEntry/prototype/plaintext.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SecretStoreEntry.prototype.plaintext\n\n▸ **plaintext**(): `string`\n\nReturns the plaintext contents of the SecretStoreEntry instance as String.\n\n## Syntax\n\n```js\nplaintext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA String\n\n### Exceptions\n\nThe `plaintext()` method requires its `this` value to be a `SecretStoreEntry` object.\nIf the `this` value does not inherit from `SecretStoreEntry.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n## Examples\n\nIn this example we connect to a Secret Store named `'secrets'` and retrieve a secret named `'cat-api-key'` use the value in a Request header.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SecretStore } from \"fastly:secret-store\";\n\nasync function app(event) {\n  const secrets = new SecretStore('secrets')\n\n  const catApiKey = await secrets.get('cat-api-key')\n\n  return fetch('/api/cat', {\n    headers: {\n      'cat-api-key': catApiKey.plaintext()\n    }\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/secret-store/SecretStoreEntry/prototype/rawBytes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SecretStoreEntry.prototype.rawBytes\n\n▸ **rawBytes**(): `Uint8Array`\n\nReturns the raw byte contents of the SecretStoreEntry instance as a Uint8Array.\n\n## Syntax\n\n```js\nrawBytes()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Uint8Array\n\n### Exceptions\n\nThe `rawBytes()` method requires its `this` value to be a `SecretStoreEntry` object.\nIf the `this` value does not inherit from `SecretStoreEntry.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/security/inspect.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# inspect\n\nThe **`inspect()`** function inspects a request using the [Fastly Next-Gen WAF](https://docs.fastly.com/en/ngwaf/).\n\n## Syntax\n\n```js\ninspect(request, config);\n```\n\n### Parameters\n\n- `request` _: Request_\n  - The Request to get a WAF determination for.\n- `config` _: object_\n  - `corp` _: string_\n    - Set a corp name for the configuration.\n    - This parameter is currently required.\n  - `workspace` _: string_\n    - Set a workspace name for the configuration.\n    - This parameter is currently required.\n  - `overrideClientIp` _: string_\n    - Specify an explicit client IP address to inspect.\n    - By default, `inspect` will use the IP address that made the request to the\n      running Compute service, but you may want to use a different IP when\n      service chaining or if requests are proxied from outside of Fastly’s\n      network.\n\n### Return value\n\nReturns an `Object` with the `inspect` response, with the following fields:\n\n- `waf_response` _: number_\n  - Security status code.\n  \n- `redirect_url` _: string | null_\n  - A redirect URL returned from Security.\n\n- `tags` _: string[]_\n  - Tags returned by Security.\n\n- `verdict` _: string_\n  - The outcome of inspecting a request with Security. It can be one of the following:\n    - `\"allow\"`\n      - Security indicated that this request is allowed.\n    - `\"block\"`\n      - Security indicated that this request should be blocked.\n    - `\"unauthorized\"`\n      - Security indicated that this service is not authorized to inspect a request.\n    - Other verdicts may be returned but not currently documented.\n\n- `decision_ms` _: number_\n  - How long Security spent determining its verdict, in milliseconds.\n  \n## Examples\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { inspect } from \"fastly:security\";\n\nasync function app(event) {\n  const res = inspect(event.request, {\n    corp: \"mycorp\",\n    workspace: \"myws\"\n  });\n  switch (res.verdict) {\n    case \"allow\":\n      return await fetch(event.request);\n    case \"block\":\n      return new Response(\"Request Blocked\", { status: 400 });\n    case \"unauthorized\":\n      return new Response(\"Unauthorized\", { status: 401 });\n    default:\n      return new Response(\"idk\", { status: 500 });\n  }\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/shielding/Shield/Shield.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `Shield()`\n\nLoad information about the given shield.\n\nReturns an object representing the shield if it is active, or throws an exception if the string is malformed or the shield doesn’t exist.\n\nShield names are defined on [this webpage](https://www.fastly.com/documentation/guides/concepts/shielding/#shield-locations), in the “shield code” column. For example, the string “pdx-or-us” will look up our Portland, OR, USA shield site, while “paris-fr” will look up our Paris site.\n\nIf you are using a major cloud provider for your primary origin site, consider looking at the “Recommended for” column, to find the Fastly POP most closely located to the given cloud provider.\n\n## Syntax\n\n```js\nnew Shield(name)\n```\n\n> **Note:** `Shield()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Shield exists with the provided name\n\n## Examples\n\nIn this example, we create a Shield instance for the Sydney, Australia shield POP. If the code is running on that shield POP, it fetches directly from origin. Otherwise, it routes the request through the shield using an encrypted connection.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n    \nimport { Shield } from \"fastly:shielding\";\n\nasync function app(event) {\n    const shield = new Shield('wsi-australia-au');\n    // If running on the shield POP, fetch from the origin directly\n    if (shield.runningOn()) {\n        return await fetch('https://http-me.fastly.com/anything', { backend: 'httpme' });\n    }\n    // Otherwise, route the request through the shield using an encrypted connection\n    return await fetch(event.request, { backend: shield.encryptedBackend() });\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/shielding/Shield/prototype/encryptedBackend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Shield.prototype.encryptedBackend\n\n▸ **encryptedBackend**(configuration?): `Backend`\n\nReturns a `Backend` representing an encrypted connection to the POP.\n\nFor reference, this is almost always the backend that you want to use. Only use [`Shield::unencryptedBackend`](./unencryptedBackend.mdx) in situations in which you are 100% sure that all the data you will send and receive over the backend is already encrypted.\n\n## Parameters\n\n- `configuration` _: object_ _**optional**_\n  - `firstByteTimeout` _: number_ _**optional**_\n    - An optional first byte timeout (in milliseconds) to set on the returned backend.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/shielding/Shield/prototype/runningOn.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Shield.prototype.runningOn\n\n▸ **runningOn**(): `boolean`\n\nReturns whether we are currently operating on the given shield.\n\nTechnically, this may also return true in very isolated incidents in which Fastly is routing traffic from the target shield POP to the POP that this code is running on, but in these situations the results should be approximately identical.\n\n(For example, it may be the case that you are asking to shield to ‘pdx-or-us’. But, for load balancing, performance, or other reasons, Fastly is temporarily shifting shielding traffic from Portland to Seattle. In that case, this function may return true for hosts running on ‘bfi-wa-us’, our Seattle site, because effectively the shield has moved to that location. This should give you a slightly faster experience than the alternative, in which this function would return false, you would try to forward your traffic to the Portland site, and then that traffic would be caught and redirected back to Seattle.)\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/shielding/Shield/prototype/unencryptedBackend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Shield.prototype.unencryptedBackend\n\n▸ **unencryptedBackend**(configuration?): `Backend`\n\nReturns a `Backend` representing an unencrypted connection to the POP.\n\nGenerally speaking, we encourage users to use [`Shield::encryptedBackend`](./encryptedBackend.mdx) instead of this function. Data sent over this backend – the unencrypted version – will be sent over the open internet, with no protections. In most cases, this is not what you want. However, in some cases – such as when you want to ship large data blobs that you know are already encrypted — using these backends can prevent a double-encryption performance penalty.\n\n## Parameters\n\n- `configuration` _: object_ _**optional**_\n  - `firstByteTimeout` _: number_ _**optional**_\n    - An optional first byte timeout (in milliseconds) to set on the returned backend."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.2/websocket/createWebsocketHandoff.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# createWebsocketHandoff\n\nThe **`createWebsocketHandoff()`** function creates a Response instance which informs Fastly to pass the original Request through Websocket, to the declared backend.\n\n## Syntax\n\n```js\ncreateWebsocketHandoff(request, backend)\n```\n\n### Parameters\n\n- `request` _: Request_\n  - The request to pass through Websocket.\n- `backend` _: string_\n  - The name of the backend that Websocket should send the request to.\n  - The name has to be between 1 and 254 characters inclusive.\n  - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n\n### Return value\n\nA Response instance is returned, which can then be used via `event.respondWith`.\n\n## Examples\n\nIn this example application requests to the path `/stream` and sent handled via Websocket.\n\n```js\nimport { createWebsocketHandoff } from \"fastly:websocket\";\n\nasync function handleRequest(event) {\n  try {\n    const url = new URL(event.request.url);\n    if (url.pathname === '/stream') {\n      return createWebsocketHandoff(event.request, 'websocket_backend');\n    } else {\n      return new Response('oopsie, make a request to /stream for some websocket goodies', { status: 404 });\n    }\n  } catch (error) {\n    console.error({error});\n    return new Response(error.message, {status:500})\n  }\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/acl/Acl/open.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Acl.open()\n\nOpens the ACL with the given name, returning a new `Acl` instance with the given name on success.\n\n## Syntax\n\n```js\nAcl.open(name)\n```\n\n### Return value\n\nAn `Acl` instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/acl/Acl/prototype/lookup.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Acl.prototype.lookup()\n\nThe **`lookup(ipAddress)`** method returns the name associated with the `Acl` instance.\n\n## Syntax\n\n```js\nacl.lookup(ipAddress)\n```\n\n### Parameters\n\n- `ipAddress` _: string_\n  - IPv4 or IPv6 address to lookup\n\n### Return value\n\nAn Object of the form `{ action: 'ALLOW' | 'BlOCK', prefix: string }`, where `prefix` is the IP\naddress prefix that was matched in the ACL.\n\n## Example\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Acl } from 'fastly:acl';\naddEventListener('fetch', async (evt) => {\n  const myAcl = Acl.open('myacl');\n  const match = await myAcl.lookup(evt.client.address);\n  evt.respondWith(new Response(match?.action === 'BLOCK' ? 'blocked' : 'allowed'));\n});\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/backend/Backend/Backend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Backend()`\n\nThe **`Backend` constructor** lets you dynamically create new [Fastly Backends](https://developer.fastly.com/reference/api/services/backend/) for your Fastly Compute service.\n\n>**Note**: Dynamic backends are by default disabled at the Fastly service level. Contact [Fastly Support](https://support.fastly.com/hc/en-us/requests/new?ticket_form_id=360000269711) to request dynamic backends on Fastly Services.\n\nTo disable the usage of dynamic backends, see [enforceExplicitBackends](../enforceExplicitBackends.mdx).\n\n## Syntax\n\n```js\nnew Backend(backendConfiguration)\n```\n\n> **Note:** `Backend()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `backendConfiguration`\n\n  - : An Object which contains all the configuration options to apply to the newly created Backend.\n\n    - `name` _: string_\n      - The name of the backend.\n      - The name has to be between 1 and 254 characters inclusive.\n      - The name can be whatever you would like, as long as it does not match the name of any of the static service backends nor match any other dynamic backends built during a single execution of the application.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n    - `target` _: string_\n      - A hostname, IPv4, or IPv6 address for the backend as well as an optional port.\n      - The target has to be at-least 1 character.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. Is null, undefined, an empty string, not a valid IP address or host, or is the string `::`\n    - `hostOverride` _: string_ _**optional**_\n      - If set, will force the HTTP Host header on connections to this backend to be the supplied value.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `connectTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for a connection to this backend to be established.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `firstByteTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `betweenBytesTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend.\n      - If exceeded, the response received so far will be considered complete and the fetch will end.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `useSSL` _: boolean_ _**optional**_\n      - Whether or not to require TLS for connections to this backend.\n    - `dontPool` _: boolean_ _**optional**_\n      - Determine whether or not connections to the same backend should be pooled across different sessions.\n      - Fastly considers two backends “the same” if they're registered with the same name and the exact same settings.\n      - In those cases, when pooling is enabled, if Session 1 opens a connection to this backend it will be left open, and can be re-used by Session 2.\n      - This can help improve backend latency, by removing the need for the initial network / TLS handshake(s).\n      - By default, pooling is enabled for dynamic backends.\n    - `tlsMinVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Minimum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `tlsMaxVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Maximum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `certificateHostname` _: string_ _**optional**_\n      - Define the hostname that the server certificate should declare.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `caCertificate` _: string_ _**optional**_\n      - The CA certificate to use when checking the validity of the backend.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `ciphers` _: string_ _**optional**_\n      - List of OpenSSL ciphers to support for connections to this origin.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - [List of ciphers supported by Fastly](https://developer.fastly.com/learning/concepts/routing-traffic-to-fastly/#use-a-tls-configuration).\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `sniHostname` _: string_ _**optional**_\n      - The SNI hostname to use on connections to this backend.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `clientCertificate` _: object_ _**optional**_\n      - The client certificate to provide for the TLS handshake\n      - `certificate` _: string_\n        - The PEM certificate string.\n      - `key` _: SecretStoreEntry_\n        - The `SecretStoreEntry` to use for the key, created via [`SecretStore.prototype.get`](../../fastly:secret-store/SecretStore/prototype/get.mdx) or alteratively via [`SecretStore.fromBytes`](../../fastly:secret-store/SecretStore/fromBytes.mdx).\n    - `httpKeepalive` _: number_ _**optional**_\n      - Enable HTTP keepalive, setting the timout in milliseconds.\n    - `tcpKeepalive` _: boolean | object_ _**optional**_\n      - Enable TCP keepalive. When an object, optionally setting the keepalive configuration options.\n      - `timeSecs` _: number_ _**optional**_\n        - Configure how long to wait after the last sent data over the TCP connection before starting to send TCP keepalive probes.\n      - `intervalSecs` _: number_ _**optional**_\n        - Configure how long to wait between each TCP keepalive probe sent to the backend to determine if it is still active.\n      - `probes` _: number_ _**optional**_\n        - Number of probes to send to the backend before it is considered dead.\n    - `grpc` _: boolean_ _**optional**_\n      - **_Experimental feature_**\n      - When enabled, sets that this backend is to be used for gRPC traffic. \n      - _Warning: When using this experimental feature, no guarantees are provided for behaviours for backends that do not provide gRPC traffic._\n\nAll optional generic options can have their defaults set via [`setDefaultDynamicBackendConfig()`](../setDefaultDynamicBackendConfig.mdx).\n\nThis includes all configuration options above except for `name`, `target`, `hostOverride`, `sniHostname` and `grpc`.\n\n### Return value\n\nA new `Backend` object.\n\n## Examples\n\nIn this example an explicit Dynamic Backend is created and supplied to the fetch request, the response is then returned to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Explicit Dynamic Backend Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\",\n    connectTimeout: 1000,\n    firstByteTimeout: 15000,\n    betweenBytesTimeout: 10000,\n    useSSL: true,\n    tlsMinVersion: 1.3,\n    tlsMaxVersion: 1.3,\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\",\n    connectTimeout: 1000,\n    firstByteTimeout: 15000,\n    betweenBytesTimeout: 10000,\n    useSSL: true,\n    tlsMinVersion: 1.3,\n    tlsMaxVersion: 1.3,\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/backend/Backend/exists.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.exists()\n\nThe **`Backend.exists()`** method returns a boolean indicating if a Backend with the given name exists or not.\n\n## Syntax\n\n```js\nexists(name)\n```\n\n### Return value\n\nA boolean indicating if a Backend with the given name exists or not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/backend/Backend/fromName.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.fromName()\n\nReturns the `Backend` instance with the given name, if one exists. If one does not exist, an error is thrown.\n\n## Syntax\n\n```js\nfromName(name)\n```\n\n### Return value\n\nA `Backend` instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/backend/Backend/health.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.health()\n\n:::info\n\nThis method is deprecated, use [`Backend.prototype.health`](./prototype/health.mdx) instead.\n\n:::\n\nThe **`Backend.health()`** method returns a string representing the health of the given Backend instance.\n\n## Syntax\n\n```js\nBackend.health(backend)\n```\n\n### Return value\n\nA string representing the health of the specified Backend value.\n\nPossible values are:\n- `\"healthy\"` - The backend's health check has succeeded, indicating the backend is working as expected and should receive requests.\n- `\"unhealthy\"` - The backend's health check has failed, indicating the backend is not working as expected and should not receive requests.\n- `\"unknown\"` - The backend does not have a health check configured.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/backend/Backend/prototype/betweenBytesTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.betweenBytesTimeout\n\nThe read-only **`betweenBytesTimeout`** property of a `Backend` instance is an integer number\nproviding the between bytes timeout for this backend in milliseconds.\n\nWhen not set or in environments that do not support this property (such as Viceroy), `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/backend/Backend/prototype/connectTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.connectTimeout\n\nThe read-only **`connectTimeout`** property of a `Backend` instance is an integer number\nproviding the connect timeout for this backend in milliseconds.\n\nWhen not set or in environments that do not support this property (such as Viceroy), `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/backend/Backend/prototype/firstByteTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.firstByteTimeout\n\nThe read-only **`firstByteTimeout`** property of a `Backend` instance is an integer number\nproviding the first byte timeout for this backend in milliseconds.\n\nWhen not set or in environments that do not support this property (such as Viceroy), `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/backend/Backend/prototype/health.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.prototype.health()\n\nThe **`Backend.prototype.health()`** method returns a string representing the health of the given Backend instance.\n\n## Syntax\n\n```js\nhealth()\n```\n\n### Return value\n\nA string representing the health of the specified Backend value.\n\nPossible values are:\n- `\"healthy\"` - The backend's health check has succeeded, indicating the backend is working as expected and should receive requests.\n- `\"unhealthy\"` - The backend's health check has failed, indicating the backend is not working as expected and should not receive requests.\n- `\"unknown\"` - The backend does not have a health check configured.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/backend/Backend/prototype/hostOverride.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.hostOverride\n\nThe read-only **`hostOverride`** property of a `Backend` instance is the host header\noverride string used when sending requests to this backend.\n\n## Value\n\nA `string`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/backend/Backend/prototype/httpKeepaliveTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.httpKeepaliveTime\n\nThe read-only **`httpKeepaliveTime`** property of a `Backend` instance is the HTTP keepalive\ntime for this backend in milliseconds, or 0 if no keepalive is set.\n\n## Value\n\nA `number`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/backend/Backend/prototype/isDynamic.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.isDynamic\n\nThe read-only **`isDynamic`** property of a `Backend` instance is a boolean\nindicating if the backend was dynamically created for this service.\n\n## Value\n\nA `boolean`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/backend/Backend/prototype/isSSL.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.isSSL\n\nThe read-only **`isSSL`** property of a `Backend` instance is a boolean\nindicating if the backend is using an SSL connection.\n\n## Value\n\nA `boolean`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/backend/Backend/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# name\n\nThe read-only **`name`** property of the backend returns the backend name string.\n\n## Value\n\nA `string`.\n\n## Description\n\nProvides the name of the backend.\n\n## Examples\n\n### Using name\n\nThe following example logs the string value of a [Backend](../Backend.mdx) object:\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Backend.prototype.name Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\\\"@fastly/js-compute\\\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.name); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.name); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/backend/Backend/prototype/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.port\n\nThe read-only **`port`** property of a `Backend` instance is the port number\nof this backend.\n\n## Value\n\nA `number`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/backend/Backend/prototype/target.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.target\n\nThe read-only **`target`** property of a `Backend` instance is the host string\nthis backend is configured to use.\n\n## Value\n\nA `string`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/backend/Backend/prototype/tcpKeepalive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.tcpKeepalive\n\nThe read-only **`tcpKeepalive`** property of a `Backend` instance returns an object providing\nthe TCP keepalive configuration, if any, otherwise returning `null` if TCP keepalive is not enabled.\n\nThis object has the following properties:\n- `timeSecs` _: number or null._\n  - Configure how long to wait after the last sent data over the TCP connection before starting to send TCP keepalive probes.\n- `intervalSecs` _: number or null._\n  - Configure how long to wait between each TCP keepalive probe sent to the backend to determine if it is still active.\n- `probes` _: number or null._\n  - Number of probes to send to the backend before it is considered dead.\n\n## Value\n\nA `Object` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/backend/Backend/prototype/tlsMaxVersion.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.tlsMaxVersion\n\nThe read-only **`tlsMaxVersion`** property of a `Backend` instance is the max TLS version\nit is configured to use, as a number, either `1.0`, `1.1`, `1.2`, or `1.3`.\n\nWhen not used, or for environments that do not support this feature, such as Viceroy, `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/backend/Backend/prototype/tlsMinVersion.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.tlsMinVersion\n\nThe read-only **`tlsMinVersion`** property of a `Backend` instance is the max TLS version\nit is configured to use, as a number, either `1.0`, `1.1`, `1.2`, or `1.3`.\n\nWhen not used, or for environments that do not support this feature, such as Viceroy, `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/backend/Backend/prototype/toName.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.prototype.toName()\n\n:::info\n\nThis method is deprecated, use [`Backend.prototype.name`](./name.mdx) instead.\n\n:::\n\nThe **`toName()`** method returns the name associated with the `Backend` instance.\n\n## Syntax\n\n```js\ntoName()\n```\n\n### Return value\n\nA string which contains the name of the Backend.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/backend/Backend/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# toString\n\n:::info\n\nThis method is deprecated, use [`Backend.prototype.name`](./name.mdx) instead.\n\n:::\n\nThe **`toString()`** method returns a string representing the specified Backend value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified Backend value.\n\n## Description\n\nThe [Backend](../Backend.mdx) object overrides the `toString()` method of [Object](../../../globals//Object/Object.mdx); it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For [Backend](../Backend.mdx) values, the `toString` method returns the name given to the [Backend](../Backend.mdx) object during construction.\n\nThe `toString()` method requires its `this` value to be a [Backend](../Backend.mdx) object.\n\nIf the `this` value does not inherit from `Backend.prototype`, a [TypeError](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n## Examples\n\n### Using toString()\n\nThe following example logs the string value of a [Backend](../Backend.mdx) object:\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Backend.prototype.toString Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\\\"@fastly/js-compute\\\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.toString()); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.toString()); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/backend/allowDynamicBackends.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# allowDynamicBackends\n\n:::info\n\nThis method is deprecated, and dynamic backends are now always supported when enabled at the service level. See [`enforceExplicitBackends`](./enforceExplicitBackends.mdx) instead.\n\n:::\n\nThe **`allowDynamicBackends()`** function is used to control whether or not Dynamic Backends should be allowed within this Fastly Compute Service.\n\nBy default, Dynamic Backends are enabled, but can be a potential security concern since third-party JavaScript code may send arbitrary requests, potentially including sensitive/secret data, off to destinations that the JavaScript project was not intending.\n\nUsing `allowDynamicBackends(false)` this security property can be restored to only use explicit backend definitions.\n\n>**Note**: By default, while dynamic backends are allowed in the SDK, they are by default disabled at the Fastly service level.\n\n## Syntax\n\n```js\nallowDynamicBackends(enabledOrConfig)\n```\n\n### Parameters\n\n- `enabled` _: boolean_\n  - Whether or not to allow Dynamic Backends\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/backend/enforceExplicitBackends.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# enforceExplicitBackends\n\nCall this function to enforce the security property of explicitly-defined backends, even when dynamic backends are enabled at\nthe Fastly service level.\n\nBy default, if dynamic backends are supported for the Fastly service, they will be automatically used when creating a new\n`fetch()` request. This default behaviour for dynamic backends can be a potential security concern since third-party JavaScript\ncode may send arbitrary requests, including sensitive/secret data, off to destinations that the JavaScript project was not\nintending.\n\nWhen calling this function, an optional default backend name can be provided.\n\n>**Note**: This is a separate option to the service-level dynamic backend support for Fastly services, which is by deault disabled for Fastly services.\n\nThe **`enforceExplicitBackends()`** function is used to control whether or not Dynamic Backends should be allowed within this Fastly Compute Service.\n\nBy default, Dynamic Backends are enabled, but can be a potential security concern since third-party JavaScript code may send arbitrary requests, potentially including sensitive/secret data, off to destinations that the JavaScript project was not intending.\n\nUsing `allowDynamicBackends(false)` this security property can be restored to only use explicit backend definitions.\n\n>**Note**: Dynamic Backends are disabled by default for Fastly Services. Please contact [Fastly Support](https://support.fastly.com/hc/requests/new?ticket_form_id=360000269711) to request the feature be enabled or disabled on Fastly Services.\n\n## Syntax\n\n```js\nenforceExplicitBackends(defaultBackend?)\n```\n\n### Parameters\n\n- `defaultBackend` _: string_ _**optional**_\n  - An optional default backend string name to use in `fetch()` requests.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/backend/setDefaultDynamicBackendConfig.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# setDefaultDynamicBackendConfig()\n\nThe **`setDefaultDynamicBackendConfig()`** allows setting backend configuration defaults that should apply to any newly created dynamic backends via the `new Backend()` constructor.\n\n### Parameters\n\n- `defaultDynamicBackendConfig`\n\n  - : An Object which contains the generic configuration options to apply to newly created Backends.\n    - `connectTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for a connection to this backend to be established.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `firstByteTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `betweenBytesTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend.\n      - If exceeded, the response received so far will be considered complete and the fetch will end.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `useSSL` _: boolean_ _**optional**_\n      - Whether or not to require TLS for connections to this backend.\n    - `dontPool` _: boolean_ _**optional**_\n      - Determine whether or not connections to the same backend should be pooled across different sessions.\n      - Fastly considers two backends “the same” if they're registered with the same name and the exact same settings.\n      - In those cases, when pooling is enabled, if Session 1 opens a connection to this backend it will be left open, and can be re-used by Session 2.\n      - This can help improve backend latency, by removing the need for the initial network / TLS handshake(s).\n      - By default, pooling is enabled for dynamic backends.\n    - `tlsMinVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Minimum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `tlsMaxVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Maximum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `certificateHostname` _: string_ _**optional**_\n      - Define the hostname that the server certificate should declare.\n      - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `caCertificate` _: string_ _**optional**_\n      - The CA certificate to use when checking the validity of the backend.\n      - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `ciphers` _: string_ _**optional**_\n      - List of OpenSSL ciphers to support for connections to this origin.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - [List of ciphers supported by Fastly](https://developer.fastly.com/learning/concepts/routing-traffic-to-fastly/#use-a-tls-configuration).\n      - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `clientCertificate` _: object_ _**optional**_\n      - The client certificate to provide for the TLS handshake\n      - `certificate` _: string_\n        - The PEM certificate string.\n      - `key` _: SecretStoreEntry_\n        - The `SecretStoreEntry` to use for the key, created via [`SecretStore.prototype.get`](../fastly:secret-store/SecretStore/prototype/get.mdx) or alteratively via [`SecretStore.fromBytes`](../fastly:secret-store/SecretStore/fromBytes.mdx).\n    - `httpKeepalive` _: number_ _**optional**_\n      - Enable HTTP keepalive, setting the timout in milliseconds.\n    - `tcpKeepalive` _: boolean | object_ _**optional**_\n      - Enable TCP keepalive. When an object, optionally setting the keepalive configuration options.\n      - `timeSecs` _: number_ _**optional**_\n        - Configure how long to wait after the last sent data over the TCP connection before starting to send TCP keepalive probes.\n      - `intervalSecs` _: number_ _**optional**_\n        - Configure how long to wait between each TCP keepalive probe sent to the backend to determine if it is still active.\n      - `probes` _: number_ _**optional**_\n        - Number of probes to send to the backend before it is considered dead.\n\n## Syntax\n\n```js\nsetDefaultDynamicBackendConfig(defaultConfig)\n```\n\n### Return value\n\nNone.\n\n## Examples\n\nIn this example an explicit Dynamic Backend is created and supplied to the fetch request, with timeouts and TLS options provided from the default backend configuration options.\n\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Explicit Dynamic Backend Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nimport { Backend, setDefaultDynamicBackendConfig } from \"fastly:backend\";\nallowDynamicBackends(true);\nsetDefaultDynamicBackendConfig({\n  connectTimeout: 1000,\n  firstByteTimeout: 15_000,\n  betweenBytesTimeout: 10_000,\n  useSSL: true,\n  sslMinVersion: 1.3,\n  sslMaxVersion: 1.3\n});\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  // Timeouts and TLS configuration still get set from the default backend configuration above.\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\"\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nimport { Backend } from \"fastly:backend\";\nallowDynamicBackends(true);\nsetDefaultDynamicBackendConfig({\n  connectTimeout: 1000,\n  firstByteTimeout: 15_000,\n  betweenBytesTimeout: 10_000,\n  useSSL: true,\n  sslMinVersion: 1.3,\n  sslMaxVersion: 1.3\n});\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\"\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/cache/CacheEntry/age.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.age\n\nThe **`age`** method of the `CacheEntry` interface returns the current age in milliseconds of the cached item.\n\n## Syntax\n\n```js\nage()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the current age in milliseconds of the cached item."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/cache/CacheEntry/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.body\n\nThe **`body`** method of the `CacheEntry` interface retrieves the cached item contents as a `ReadableStream`.\n\nOnly one stream can be active at a time for a given `CacheEntry`. An error will be thrown if a stream is already active for this `CacheEntry`.\n\n## Syntax\n\n```js\nbody(options)\n```\n\n### Parameters\n\n- `options` _: object_ __optional__\n  - `start` _: number_\n    - The offset from which to start the range.\n  - `end` _: number_\n    - How long the range should be.\n\n### Return value\n\nA `ReadableStream` which contains the cached item contents."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/cache/CacheEntry/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.close\n\nThe **`close`** method of the `CacheEntry` interface closes the connection to the cache for this `CacheEntry`.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/cache/CacheEntry/hits.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.hits\n\nThe **`hits`** method of the `CacheEntry` interface returns the amount of cache hits for the cached item.\n\nNote: this hit count only reflects the view of the server that supplied the cached item. Due to clustering, this count may vary between potentially many servers within the data center where the item is cached. See the [clustering documentation](https://developer.fastly.com/learning/vcl/clustering/) for details, though note that the exact caching architecture of Compute is different from VCL services.\n\n## Syntax\n\n```js\nhits()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the number of cache hits to this cached item.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/cache/CacheEntry/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.length\n\nThe **`length`** method of the `CacheEntry` interface returns the size in bytes of the cached item, if known, otherwise returns `null` if the length is currently unknown.\n\nThe length of the cached item may be unknown if the item is currently being streamed into the cache without a fixed length.\n\n## Syntax\n\n```js\nlength()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` or `null` which represents the current length of the cached item.\n\n`null` is returned if the length is currently unknown."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/cache/CacheEntry/maxAge.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.maxAge\n\nThe **`maxAge`** method of the `CacheEntry` interface returns the time in milliseconds for which the cached item is considered fresh.\n\n## Syntax\n\n```js\nmaxAge()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the time in milliseconds for which the cached item is considered fresh."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/cache/CacheEntry/staleWhileRevalidate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.staleWhileRevalidate\n\nThe **`staleWhileRevalidate`** method of the `CacheEntry` interface returns the time in milliseconds for which a cached item can safely be used despite being considered stale.\n\n## Syntax\n\n```js\nstaleWhileRevalidate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the time in milliseconds for which a cached item can safely be used despite being considered stale."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/cache/CacheEntry/state.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.state\n\nThe **`state`** method of the `CacheEntry` interface returns a `CacheState` instance which reflects the current state of this `CacheEntry` instance.\n\n## Syntax\n\n```js\nstate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `CacheState` instance which reflects the current state of this `CacheEntry` instance."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/cache/CacheEntry/userMetadata.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.userMetadata\n\nThe **`userMetadata`** method of the `CacheEntry` interface returns the user-controlled metadata associated with the cached item.\n\n## Syntax\n\n```js\nuserMetadata()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nAn `ArrayBuffer` which contains the user-controlled metadata associated with the cached item."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/cache/CacheState/found.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheState.found\n\nThe **`found`** method of the `CacheState` interface returns `true` if a cached item was located.\n\nEven if an cached item is found, the cached item might be stale and require updating. Use `mustInsertOrUpdate()` to determine whether this transaction client is expected to update the cached item.\n\n## Syntax\n\n```js\nfound()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `boolean` which represents whether a cached item was located or not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/cache/CacheState/mustInsertOrUpdate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheState.mustInsertOrUpdate\n\nThe **`mustInsertOrUpdate`** method of the `CacheState` interface returns `true` if a fresh cache item was not found, and this transaction client is expected to insert a new item or update a stale item.\n\n\n## Syntax\n\n```js\nmustInsertOrUpdate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `boolean` which represents whether a fresh cached item was found not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/cache/CacheState/stale.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheState.stale\n\nThe **`stale`** method of the `CacheState` interface returns `true` if the cached item is stale.\n\nA cached item is stale if its age is greater than its `maxAge` period.\n\n## Syntax\n\n```js\nstale()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `boolean` which represents whether the cached item is stale or not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/cache/CacheState/usable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheState.usable\n\nThe **`usable`** method of the `CacheState` interface returns `true` if the cached item is usable.\n\nA cached item is usable if its age is less than the sum of the `maxAge` and `staleWhileRevalidate` periods.\n\n## Syntax\n\n```js\nusable()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `boolean` which represents whether a cached item is usable or not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/cache/CoreCache/insert.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CoreCache.insert\n\nPerforms a non-transactional insertion into the cache, returning a `FastlyBody` instance for providing the cached object itself.\nFor the insertion to complete successfully, the object must be written into the returned `FastlyBody` instance, and then `FastlyBody.protoype.close` must be called.\nIf `FastlyBody.prototype.close` does not get called, the insertion is considered incomplete, and any concurrent lookups that may be reading from the object as it is streamed into the cache may encounter a streaming error.\n\nNote: Like `CoreCache.lookup()`, `CoreCache.insert()` may race with concurrent lookups or insertions, and will unconditionally overwrite existing cached items rather than allowing for revalidation of an existing object.\nThe transactional equivalent of this function is `TransactionCacheEntry.insert()`, which may only be called following a `CoreCache.transactionLookup()` call and the returned `CacheEntry` when has a state where `CacheState.mustInsertOrUpdate()` returns true.\n\n## Syntax\n\n```js\ninsert(key, options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - A cache key which is a string with a length of up to 8,135 that identify a cached item.\n  - The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n- `options` _: object_\n  - `headers` _: HeadersInit_ __optional__\n    - The headers act as additional factors in object selection, and the choice of which headers to factor in is determined during insertion, via the `vary` property within `TransactionInsertOptions`.\n    - A lookup will succeed when there is at least one cached item that matches lookup’s `key`, and all of the lookup’s headers included in the cache items’ `vary` list match the corresponding headers in that cached item.\n    - A typical example is a cached HTTP response, where the request had an \"Accept-Encoding\" header. In that case, the origin server may or may not decide on a given encoding, and whether that same response is suitable for a request with a different (or missing) Accept-Encoding header is determined by whether Accept-Encoding is listed in Vary header in the origin’s response.\n    - Note: These headers are narrowly useful for implementing cache lookups incorporating the semantics of the HTTP Vary header.\n  - `maxAge` _: number_ __optional__\n    - Sets the “time to live” for the cache item in milliseconds: The time for which the item will be considered fresh.\n  - `vary` _: array_ __optional__\n    - Sets the list of headers that must match when looking up this cached item.\n  - `initialAge` _: number_ __optional__\n    - Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n    - The initial age is 0 by default.\n  - `staleWhileRevalidate` _: number_ __optional__\n    - Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n    - Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n    - The methods `CacheState.protoype.usable` and `CacheState.protoype.stale` can be used to determine the current state of an item.\n    - The stale-while-revalidate period is 0 by default.\n  - `surrogateKeys` _: array_ __optional__\n    - Sets the surrogate keys that can be used for purging this cached item.\n    - Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item’s TTL to elapse, or overwriting the item with insert().\n    - Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n    - [See the Fastly surrogate keys guide for details.](https://docs.fastly.com/en/guides/working-with-surrogate-keys)\n  - `length` _: number_ __optional__\n    - Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n    - It is preferable to provide a length, if possible.\n    - Clients that begin streaming the item’s contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n  - `userMetadata` _: ArrayBufferView | ArrayBuffer | URLSearchParams | string_ __optional__\n    - Sets the user-defined metadata to associate with the cached item.\n  - `sensitive` _: boolean_ __optional__\n    - Enable or disable PCI/HIPAA-compliant non-volatile caching.\n    - By default, this is false.\n    - [See the Fastly PCI-Compliant Caching and Delivery documentation for details.](https://docs.fastly.com/products/pci-compliant-caching-and-delivery)\n\n### Return value\n\nReturns a `FastlyBody`.\n\n### Exceptions\n\n- If the provided `key`:\n  - Cannot be coerced to a string\n  - Is an empty string\n  - Is longer than 8135 characters\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/cache/CoreCache/lookup.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# CoreCache.lookup\n\nPerform a non-transactional lookup into the cache, returning a CacheEntry if a usable cached item was found.\nA cached item is usable if its age is less than the sum of its TTL and its stale-while-revalidate period. Items beyond that age are unusably stale.\n\nNote: A non-transactional lookup will not attempt to coordinate with any concurrent cache lookups.\nIf two instances of the service perform a lookup at the same time for the same cache key, and the item is not yet cached, they will both return `null`.\nWithout further coordination, they may both end up performing the work needed to insert() the item (which usually involves origin requests and/or computation) and racing with each other to insert.\nTo resolve such races between concurrent lookups, use `CoreCache.transactionLookup()` instead.\n\n## Syntax\n\n```js\nlookup(key, options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - A cache key which is a string with a length of up to 8,135 that identify a cached item.\n  - The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n\n- `options` _: object_\n  - `headers` _: HeadersInit_ __optional__\n    - The headers act as additional factors in object selection, and the choice of which headers to factor in is determined during insertion, via the `vary` property within `TransactionInsertOptions`.\n    - A lookup will succeed when there is at least one cached item that matches lookup’s `key`, and all of the lookup’s headers included in the cache items’ `vary` list match the corresponding headers in that cached item.\n    - A typical example is a cached HTTP response, where the request had an \"Accept-Encoding\" header. In that case, the origin server may or may not decide on a given encoding, and whether that same response is suitable for a request with a different (or missing) Accept-Encoding header is determined by whether Accept-Encoding is listed in Vary header in the origin’s response.\n    - Note: These headers are narrowly useful for implementing cache lookups incorporating the semantics of the HTTP Vary header.\n\n### Return value\n\nReturns `CacheEntry` if a usable cached item was found, otherwise returns `null`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/cache/CoreCache/transactionLookup.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# CoreCache.transactionLookup\n\nPerform a transactional lookup into the cache, returning a `TransactionCacheEntry` instance.\n\nTransactions coordinate between concurrent actions on the same cache key, incorporating concepts of [request collapsing](https://developer.fastly.com/learning/concepts/request-collapsing/) and [revalidation](https://developer.fastly.com/learning/concepts/stale/), though at a lower level that does not automatically interpret HTTP semantics.\n\nRequest Collapsing:\nIf there are multiple concurrent calls to `CoreCache.transactionLookup()` for the same item and that item is not present,\njust one of the callers will be instructed to insert the item into the cache as part of the transaction.\nThe other callers will block until the metadata for the item has been inserted, and can then begin streaming its contents out of the cache at the same time that the inserting caller streams them into the cache.\n\nRevalidation:\nSimilarly, if an item is usable but stale, and multiple callers attempt a `CoreCache.transactionLookup()` concurrently, they will all be given access to the stale item, but only one will be designated to perform an asynchronous update (or insertion) to freshen the item in the cache.\n\n## Syntax\n\n```js\ntransactionLookup(key, options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - A cache key which is a string with a length of up to 8,135 that identify a cached item.\n  - The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n\n- `options` _: object_\n  - `headers` _: HeadersInit_ __optional__\n    - The headers act as additional factors in object selection, and the choice of which headers to factor in is determined during insertion, via the `vary` property within `TransactionInsertOptions`.\n    - A lookup will succeed when there is at least one cached item that matches lookup’s `key`, and all of the lookup’s headers included in the cache items’ `vary` list match the corresponding headers in that cached item.\n    - A typical example is a cached HTTP response, where the request had an \"Accept-Encoding\" header. In that case, the origin server may or may not decide on a given encoding, and whether that same response is suitable for a request with a different (or missing) Accept-Encoding header is determined by whether Accept-Encoding is listed in Vary header in the origin’s response.\n    - Note: These headers are narrowly useful for implementing cache lookups incorporating the semantics of the HTTP Vary header.\n\n### Return value\n\nReturns an instance of `TransactionCacheEntry`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/cache/SimpleCache/SimpleCache.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `SimpleCache`\n\nThe **`SimpleCache` class** provides a simplified interface to inserting and retrieving entries from Fastly's Cache.\n\nAll the methods on the class are static methods, there are no instance methods.\n\n\n## Examples\n\nIn this example we attempt to retrieve an entry from the Fastly Cache, if the entry does not exist, we create the content and insert it into the Fastly Cache before finally returning.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const path = new URL(event.request.url).pathname;\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/cache/SimpleCache/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCache.get\n\n▸ **get**(): `string`\n\nGets the entry associated with the key `key` from the cache.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the cache.\n\n### Return value\n\nIf the key does not exist in the cache, this returns `null`.\n\nIf the key does exist in the cache, this returns a `SimpleCacheEntry`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n## Examples\n\nIn this example we attempt to retrieve an entry from the Fastly Cache, and return a message stating whether the entry was in the Fastly Cache or not.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const path = new URL(event.request.url).pathname;\n  let page = SimpleCache.get(path);\n  return new Response(page ? `${path} is in the cache` : `${path} is not in the cache`, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/cache/SimpleCache/getOrSet.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCache.getOrSet\n\nThe **`getOrSet()`** method attempts to get an entry from the cache for the supplied `key`. If no entry is found (or has expired), the supplied `set` function is executed and its result is inserted into the cache under the supplied `key` and for the supplied `ttl` (Time-To-Live) duration, provided in seconds.\n\n## Syntax\n\n```js\ngetOrSet(key, set)\ngetOrSet(key, set, length)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to lookup and/or store the supplied entry under within the cache.\n- `set` _:  Function_\n  - The function to execute if and only if the cache does not have a usable entry for the supplied `key`.\n    The function should return a Promise which resolves with the following interface:\n    - `value` _:  ArrayBuffer | TypedArray | DataView | ReadableStream | URLSearchParams | String | string literal_\n      - The value to store within the cache.\n    - `ttl` _: number_\n      - The maximum number of seconds to store the supplied entry in the cache.\n    - `length` _: number_ __optional__\n      - The length of the value being stored within the cache. This is only used when the `value` is a `ReadableStream`.\n\n### Return value\n\nReturns a `SimpleCacheEntry`.\n\n### Exceptions\n\n- If the provided `key`:\n  - Cannot be coerced to a string\n  - Is an empty string\n  - Is longer than 8135 characters\n- If the provided `ttl`:\n  - Cannot be coerced to a number\n  - Is a negative number\n  - Is `NaN`\n  - Is Inifinity\n\n## Examples\n\nIn this example we attempt to retrieve an entry from the Fastly Cache. If the entry does not exist, we create the content and insert it into the Fastly Cache before finally returning.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const path = new URL(event.request.url).pathname;\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/cache/SimpleCache/purge.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# SimpleCache.purge\n\npurge the entry associated with the key `key` from the cache.\n\n## Syntax\n\n```js\npurge(key, options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to purge from within the cache.\n\n- `options` _: object_\n  - `scope` _: string_\n    - : Where to purge the content from.\n    - Possible values are:\n      - \"global\" - This will remove the content from all of Fastly.\n      - \"pop\" - This will remove the content from the POP that contains the currently executing instance.\n\n### Return value\n\nReturns `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n## Examples\n\nIn this example, when a request contains a `purge` querystring parameter, we purge the an entry from the cache.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const url = new URL(event.request.url);\n  const path = url.pathname;\n  if (url.searchParams.has('purge')) {\n    SimpleCache.purge(path, { scope: \"global\" });\n    return new Response(page, { status: 204 });\n  }\n\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/cache/SimpleCacheEntry/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the `SimpleCacheEntry` interface\ntakes the instance's stream and reads it to completion. It returns a promise\nthat resolves with an `ArrayBuffer`.\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an `ArrayBuffer`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/cache/SimpleCacheEntry/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.body\n\nThe **`body`** read-only property of the `SimpleCacheEntry` interface is a `ReadableStream` of the instance's contents.\n\n## Value\n\nA `ReadableStream`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/cache/SimpleCacheEntry/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.bodyUsed\n\nThe **`bodyUsed`** read-only property of the `SimpleCacheEntry` interface is a boolean value that indicates whether the body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/cache/SimpleCacheEntry/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.json()\n\nThe **`json()`** method of the `SimpleCacheEntry` interface takes\na `SimpleCacheEntry` stream and reads it to completion. It returns a promise which\nresolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a JavaScript object. This object could be\nanything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/cache/SimpleCacheEntry/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.text()\n\nThe **`text()`** method of the `SimpleCacheEntry` interface takes the instance's stream and reads it to completion.\nIt returns a promise that resolves with a `String`.\nThe result is _always_ decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Promise that resolves with a `String`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/cache/TransactionCacheEntry/age.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.age\n\nThe **`age`** method of the `TransactionCacheEntry` interface returns the current age in milliseconds of the cached item.\n\n## Syntax\n\n```js\nage()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the current age in milliseconds of the cached item."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/cache/TransactionCacheEntry/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.body\n\nThe **`body`** method of the `TransactionCacheEntry` interface retrieves the cached item contents as a `ReadableStream`.\n\nOnly one stream can be active at a time for a given `TransactionCacheEntry`. An error will be thrown if a stream is already active for this `TransactionCacheEntry`.\n\n## Syntax\n\n```js\nbody(options)\n```\n\n### Parameters\n\n- `options` _: object_ __optional__\n  - `start` _: number_\n    - The offset from which to start the range.\n  - `end` _: number_\n    - How long the range should be.\n\n### Return value\n\nA `ReadableStream` which contains the cached item contents."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/cache/TransactionCacheEntry/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.cancel\n\nThe **`cancel`** method of the `TransactionCacheEntry` interface cancels an obligation to provide an object to the cache.\n\n\n## Syntax\n\n```js\ncancel()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/cache/TransactionCacheEntry/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.close\n\nThe **`close`** method of the `TransactionCacheEntry` interface closes the connection to the cache for this `TransactionCacheEntry`.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/cache/TransactionCacheEntry/hits.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.hits\n\nThe **`hits`** method of the `TransactionCacheEntry` interface returns the amount of cache hits for the cached item.\n\nNote: this hit count only reflects the view of the server that supplied the cached item. Due to clustering, this count may vary between potentially many servers within the data center where the item is cached. See the [clustering documentation](https://developer.fastly.com/learning/vcl/clustering/) for details, though note that the exact caching architecture of Compute is different from VCL services.\n\n## Syntax\n\n```js\nhits()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the number of cache hits to this cached item.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/cache/TransactionCacheEntry/insert.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.insert\n\nPerform a transactional cache insertion, returning a `FastlyBody` instance for providing the cached object itself.\n\nThis method should only be called when `TransactionCacheEntry.state().mustInsertOrUpdate()` is true; otherwise, an error will be thrown when attempting to perform the insertion.\n\n## Syntax\n\n```js\ninsert(options)\n```\n\n### Parameters\n\n- `options` _: object_\n  - `maxAge` _: number_ __optional__\n    - Sets the “time to live” for the cache item in milliseconds: The time for which the item will be considered fresh.\n  - `vary` _: array_ __optional__\n    - Sets the list of headers that must match when looking up this cached item.\n  - `initialAge` _: number_ __optional__\n    - Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n    - The initial age is 0 by default.\n  - `staleWhileRevalidate` _: number_ __optional__\n    - Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n    - Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n    - The methods `CacheState.protoype.usable` and `CacheState.protoype.stale` can be used to determine the current state of an item.\n    - The stale-while-revalidate period is 0 by default.\n  - `surrogateKeys` _: array_ __optional__\n    - Sets the surrogate keys that can be used for purging this cached item.\n    - Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item’s TTL to elapse, or overwriting the item with insert().\n    - Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n    - [See the Fastly surrogate keys guide for details.](https://docs.fastly.com/en/guides/working-with-surrogate-keys)\n  - `length` _: number_ __optional__\n    - Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n    - It is preferable to provide a length, if possible.\n    - Clients that begin streaming the item's contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n  - `userMetadata` _: ArrayBufferView | ArrayBuffer | URLSearchParams | string_ __optional__\n    - Sets the user-defined metadata to associate with the cached item.\n  - `sensitive` _: boolean_ __optional__\n    - Enable or disable PCI/HIPAA-compliant non-volatile caching.\n    - By default, this is false.\n    - [See the Fastly PCI-Compliant Caching and Delivery documentation for details.](https://docs.fastly.com/products/pci-compliant-caching-and-delivery)\n\n### Return value\n\nReturns a `FastlyBody`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/cache/TransactionCacheEntry/insertAndStreamBack.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.insertAndStreamBack\n\nPerform a transaction cache insertion, returning a `FastlyBody` instance for providing the cached object itself, and a `CacheEntry` instance which can be used to stream out the newly-inserted cache item.\n\nFor the insertion to complete successfully, the object must be written into the returned `FastlyBody` instance, and then `FastlyBody.protoype.close` must be called.\nIf `FastlyBody.prototype.close` does not get called, the insertion is considered incomplete, and any concurrent lookups that may be reading from the object as it is streamed into the cache may encounter a streaming error.\n\n## Syntax\n\n```js\ninsertAndStreamBack(options)\n```\n\n### Parameters\n\n- `options` _: object_\n  - `maxAge` _: number_ __optional__\n    - Sets the “time to live” for the cache item in milliseconds: The time for which the item will be considered fresh.\n  - `vary` _: array_ __optional__\n    - Sets the list of headers that must match when looking up this cached item.\n  - `initialAge` _: number_ __optional__\n    - Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n    - The initial age is 0 by default.\n  - `staleWhileRevalidate` _: number_ __optional__\n    - Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n    - Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n    - The methods `CacheState.protoype.usable` and `CacheState.protoype.stale` can be used to determine the current state of an item.\n    - The stale-while-revalidate period is 0 by default.\n  - `surrogateKeys` _: array_ __optional__\n    - Sets the surrogate keys that can be used for purging this cached item.\n    - Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item’s TTL to elapse, or overwriting the item with insert().\n    - Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n    - [See the Fastly surrogate keys guide for details.](https://docs.fastly.com/en/guides/working-with-surrogate-keys)\n  - `length` _: number_ __optional__\n    - Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n    - It is preferable to provide a length, if possible.\n    - Clients that begin streaming the item's contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n  - `userMetadata` _: ArrayBufferView | ArrayBuffer | URLSearchParams | string_ __optional__\n    - Sets the user-defined metadata to associate with the cached item.\n  - `sensitive` _: boolean_ __optional__\n    - Enable or disable PCI/HIPAA-compliant non-volatile caching.\n    - By default, this is false.\n    - [See the Fastly PCI-Compliant Caching and Delivery documentation for details.](https://docs.fastly.com/products/pci-compliant-caching-and-delivery)\n\n### Return value\n\nReturns an array where the first item is a `FastlyBody` instance and the second item is a `CacheEntry` instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/cache/TransactionCacheEntry/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.length\n\nThe **`length`** method of the `TransactionCacheEntry` interface returns the size in bytes of the cached item, if known, otherwise returns `null` if the length is currently unknown.\n\nThe length of the cached item may be unknown if the item is currently being streamed into the cache without a fixed length.\n\n## Syntax\n\n```js\nlength()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` or `null` which represents the current length of the cached item.\n\n`null` is returned if the length is currently unknown."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/cache/TransactionCacheEntry/maxAge.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.maxAge\n\nThe **`maxAge`** method of the `TransactionCacheEntry` interface returns the time in milliseconds for which the cached item is considered fresh.\n\n## Syntax\n\n```js\nmaxAge()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the time in milliseconds for which the cached item is considered fresh."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/cache/TransactionCacheEntry/staleWhileRevalidate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.staleWhileRevalidate\n\nThe **`staleWhileRevalidate`** method of the `TransactionCacheEntry` interface returns the time in milliseconds for which a cached item can safely be used despite being considered stale.\n\n## Syntax\n\n```js\nstaleWhileRevalidate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the time in milliseconds for which a cached item can safely be used despite being considered stale."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/cache/TransactionCacheEntry/state.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.state\n\nThe **`state`** method of the `TransactionCacheEntry` interface returns a `CacheState` instance which reflects the current state of this `TransactionCacheEntry` instance.\n\n## Syntax\n\n```js\nstate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `CacheState` instance which reflects the current state of this `TransactionCacheEntry` instance."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/cache/TransactionCacheEntry/update.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.update\n\nPerform an update of the cache item's metadata.\n\n## Syntax\n\n```js\nupdate(options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - A cache key which is a string with a length of up to 8,135 that identify a cached item.\n  - The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n- `options` _: object_\n  - `maxAge` _: number_ __optional__\n    - Sets the “time to live” for the cache item in milliseconds: The time for which the item will be considered fresh.\n  - `vary` _: array_ __optional__\n    - Sets the list of headers that must match when looking up this cached item.\n  - `initialAge` _: number_ __optional__\n    - Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n    - The initial age is 0 by default.\n  - `staleWhileRevalidate` _: number_ __optional__\n    - Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n    - Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n    - The methods `CacheState.protoype.usable` and `CacheState.protoype.stale` can be used to determine the current state of an item.\n    - The stale-while-revalidate period is 0 by default.\n  - `surrogateKeys` _: array_ __optional__\n    - Sets the surrogate keys that can be used for purging this cached item.\n    - Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item’s TTL to elapse, or overwriting the item with insert().\n    - Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n    - [See the Fastly surrogate keys guide for details.](https://docs.fastly.com/en/guides/working-with-surrogate-keys)\n  - `length` _: number_ __optional__\n    - Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n    - It is preferable to provide a length, if possible.\n    - Clients that begin streaming the item's contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n  - `userMetadata` _: ArrayBufferView | ArrayBuffer | URLSearchParams | string_ __optional__\n    - Sets the user-defined metadata to associate with the cached item.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/cache/TransactionCacheEntry/userMetadata.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.userMetadata\n\nThe **`userMetadata`** method of the `TransactionCacheEntry` interface returns the user-controlled metadata associated with the cached item.\n\n## Syntax\n\n```js\nuserMetadata()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nAn `ArrayBuffer` which contains the user-controlled metadata associated with the cached item."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/cache-override/CacheOverride/CacheOverride.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `CacheOverride()`\n\nThe **`CacheOverride` constructor** lets you configure the caching behavior of a `Response`.\n\nNormally, the HTTP Headers on a [`Response`](../../globals/Response/Response.mdx) would control how the [`Response`](../../globals/Response/Response.mdx) is cached,\nbut `CacheOverride` can be set on a [`Request`](../../globals/Request/Request.mdx), to define custom caching behavior.\n\n## Syntax\n\n```js\nnew CacheOverride(mode)\nnew CacheOverride(mode, init)\nnew CacheOverride(init)\n```\n\n> **Note:** `CacheOverride()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `mode` _: string_\n  - Sets the cache override mode for a request\n  - If set to:\n    - `\"none\"`: Do not override the behavior specified in the origin response’s cache control headers.\n    - `\"pass\"`: Do not cache the response to this request, regardless of the origin response’s headers.\n    - `\"override\"`: Override particular cache control settings using the `CacheOverride` object's settings.\n       This options is also the default when providing an init object directly as the first argument.\n\n- `init`\n\n  - : An Object which contains all the configuration options to apply to the newly created `CacheOverride`.\n\n    - `pci` _: boolean_ _**optional**_\n      - Override the caching behavior of this request to enable or disable PCI/HIPAA-compliant non-volatile caching.\n      - By default, this is `false`, which means the request may not be PCI/HIPAA-compliant. Set it to `true` to enable compliant caching.\n      - See the [Fastly PCI-Compliant Caching and Delivery documentation](https://docs.fastly.com/products/pci-compliant-caching-and-delivery) for details.\n\n    - `surrogateKey` _: string_ _**optional**_\n      - Override the caching behavior of this request to include the given surrogate key, provided as a header value.\n      - See the [Fastly surrogate keys guide](https://docs.fastly.com/en/guides/purging-api-cache-with-surrogate-keys) for details.\n    - `swr` _: number_ _**optional**_\n      - Override the caching behavior of this request to use the given `stale-while-revalidate` time, in seconds\n\n    - `ttl` _: number_ _**optional**_\n      - Override the caching behavior of this request to use the given Time to Live (TTL), in seconds.\n    \n    - `beforeSend` _:Function_ _**optional**_\n      - `(request: Request) => void | PromiseLike<void>`\n      - Callback to be invoked if a request is going all the way to a backend, allowing the request to be modified beforehand.\n      - See [Modifying a request as it is forwarded to a backend](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/#modifying-a-request-as-it-is-forwarded-to-a-backend) in the Fastly cache interfaces documentation for details.\n\n    - `afterSend` _: Function_ _**optional**_\n      - `(response: Response) => void | CacheOptions | PromiseLike<void | CacheOptions>`\n      - Callback to be invoked after a response has been sent, but before it is stored into the cache.\n      - Where `CacheOptions` contains:\n        - `cache` _: boolean | 'uncacheable'_ _**optional**_\n          - Whether to cache this response. By default, leaving this field empty, responses will be cached based on their cache header information.\n          - Setting this to true or false will override this default cache behaviour, setting in the cache or not setting in the cache, even if the default behaviour would have been otherwise.\n          - Setting to 'uncacheable' the response will not only not be cached, but the cache will record that the originating request led to an uncacheable response, so that future cache lookups will result in immediately going to the backend, rather than attempting to coordinate concurrent requests to reduce backend traffic.\n          - See the [Fastly request collapsing guide](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/request-collapsing/) for more details on the mechanism that `uncacheable` disables.\n        - `bodyTransformFn` _: Function_ _**optional**_\n          - `(body: Uint8Array) => Uint8Array | PromiseLike<Uint8Array>`\n          - Provide a function to be used for transforming the response body prior to caching.\n          - Body transformations are performed by specifying a transform, rather than by directly working with the body during the onAfterSend callback function, because not every response contains a fresh body: 304 Not Modified responses, which are used to revalidate a stale cached response, are valuable precisely because they do not retransmit the body.\n          - For any other response status, the backend response will contain a relevant body, and the `bodyTransformFn` will be applied to it. The original backend body is passed in to the transform function, and the function is expected to return the new body.\n      - See [Controlling cache behavior based on backend response](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/#controlling-cache-behavior-based-on-backend-response) in the Fastly cache interfaces documentation for details.\n\n### Return value\n\nA new `CacheOverride` object.\n\n## Examples\n\nIn this example we override the cache for all the requests prefixed /static/ to have a long TTL (Time To Live),  and the home page to have a short TTL and a long SWR (Stale While Revalidate).\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"CacheOverride Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { CacheOverride } from \"fastly:cache-override\";\n// In this example we override the cache for all the requests prefixed /static/ \n// to have a long TTL (Time To Live), and the home page to have a short TTL and \n// a long SWR (Stale While Revalidate).\nasync function app (event) {\n  const path = (new URL(event.request.url)).pathname;\n  let cacheOverride;\n  if (path == '/') {\n    cacheOverride = new CacheOverride('override', {ttl: 10, swr: 86_400});\n  } else if (path.startsWith('/static/')) {\n    cacheOverride = new CacheOverride('override', {ttl: 86_400});\n  } else {\n    cacheOverride = new CacheOverride('none')\n  }\n  return fetch(event.request.url, {\n    cacheOverride,\n    backend: 'origin_0'\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { CacheOverride } from \"fastly:cache-override\";\n// In this example we override the cache for all the requests prefixed /static/ \n// to have a long TTL (Time To Live), and the home page to have a short TTL and \n// a long SWR (Stale While Revalidate).\nasync function app (event) {\n  const path = (new URL(event.request.url)).pathname;\n  let cacheOverride;\n  if (path == '/') {\n    cacheOverride = new CacheOverride('override', {ttl: 10, swr: 86_400});\n  } else if (path.startsWith('/static/')) {\n    cacheOverride = new CacheOverride('override', {ttl: 86_400});\n  } else {\n    cacheOverride = new CacheOverride('none')\n  }\n  return fetch(event.request.url, {\n    cacheOverride,\n    backend: 'origin_0'\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/compute/purgeSurrogateKey.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# purgeSurrogateKey\n\nThe **`purgeSurrogateKey()`** function is used to purge the given surrogate key string from Fastly's cache.\n\nThere are two purge modes: soft purge and hard purge, with hard purge as the default which clears all items\nfrom the cache immediately. When using a soft purge, stale entries are maintained in the cache, reducing\norgin load, while also enabling stale revalidations.\n\nSee the [Fastly Purge Documentation](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/purging/#surrogate-key-purge) for more information on caching and purge operations.\n\n## Syntax\n\n```js\npurgeSurrogateKey(surrogateKey, soft?)\n```\n\n### Parameters\n\n- `surrogateKey` _: string_\n  - The surrogate key string\n- `soft?` _: boolean_\n  - Enables a soft purge, retaining stale entries in the cache. Default is a hard purge.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/compute/vCpuTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# vCpuTime\n\nThe **`vCpuTime()`** function provides the vCPU time used by the current request handler in milliseconds.\n\n## Syntax\n\n```js\nvCpuTime()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`number`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/config-store/ConfigStore/ConfigStore.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `ConfigStore()`\n\nThe **`ConfigStore` constructor** lets you access a specific [Fastly Config Store](https://www.fastly.com/documentation/reference/api/services/resources/config-store/).\n\n> **Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew ConfigStore(name);\n```\n\n> **Note:** `ConfigStore()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Defines a config store instance using the resource link name.\n\n### Return value\n\nA new `ConfigStore` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Config Store exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name does not start with an ascii alphabetical character \n  - Thrown if the provided name does not contain only ascii alphanumeric, underscore, and whitespace characters\n\n## Examples\n\nIn this example we have a resource link named \"animals\" (which is linked to a config store) and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"ConfigStore Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/config-store/ConfigStore/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# ConfigStore.prototype.get\n\nThe **`get()`** method returns the value associated with the provided key in the config-store. If the provided key does not exist in the ConfigStore then this returns `null`.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from the dictionary.\n\n### Return value\n\nA `string` representing the specified ConfigStore value or `null` if the key does not exist in the ConfigStore\n\n## Description\n\nGet a value for a key in the config-store. If the provided key does not exist in the ConfigStore then this returns `null`.\n\nThe `get()` method requires its `this` value to be a [`ConfigStore`](../../../fastly%3Aconfig-store/ConfigStore/ConfigStore.mdx) object.\n\nIf the `this` value does not inherit from `ConfigStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided key is longer than 255 in length\n  - Thrown if the provided key is an empty string\n\n## Examples\n\nIn this example we have an Edge Dictionary named \"animals\" and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"ConfigStore Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/device/Device/lookup.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Device.lookup()\n\nLook up the data associated with a particular User-Agent string.\n\n\n## Syntax\n\n```js\nlookup(userAgent)\n```\n\n### Return value\n\nIf there is data associated with the User-Agent, a `Device` instance is returned.\nOtherwise, `null` is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/device/Device/prototype/brand.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.brand\n\nThe read-only **`brand`** property of the `Device` interface is\neither a string stating the brand of the device, which can be different from the manufacturer of that device.\nIf no brand is known, the value will be `null`.\n\n\n## Value\n\nEither a string value if a brand is known, otherwise `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/device/Device/prototype/hardwareType.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.hardwareType\n\nThe read-only **`hardwareType`** property of the `Device` interface is\neither a string stating the hardware type of the device, or `null` if the hardware type is not known.\n\nA string representation of the device's primary platform hardware. The most commonly used device types are also identified via boolean variables. Because a device may have multiple device types and this variable only has the primary type, we recommend using the boolean variables for logic and using this string representation for logging.\n\n\n\n## Value\n\nEither a string value if a hardware type is known, otherwise `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/device/Device/prototype/isBot.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isBot\n\nThe read-only **`isBot`** property of the `Device` interface is\neither a boolean stating if the device is a bot, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a bot, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/device/Device/prototype/isDesktop.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isDesktop\n\nThe read-only **`isDesktop`** property of the `Device` interface is\neither a boolean stating if the device is a desktop web browser, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a desktop web browser, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/device/Device/prototype/isGameConsole.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isGameConsole\n\nThe read-only **`isGameConsole`** property of the `Device` interface is\neither a boolean stating if the device is a video game console, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a video game console, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/device/Device/prototype/isMediaPlayer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isMediaPlayer\n\nThe read-only **`isMediaPlayer`** property of the `Device` interface is\neither a boolean stating if the device is a media player (like Blu-ray players, iPod devices, and smart speakers such as Amazon Echo), or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a media player (like Blu-ray players, iPod devices, and smart speakers such as Amazon Echo), or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/device/Device/prototype/isMobile.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isMobile\n\nThe read-only **`isMobile`** property of the `Device` interface is\neither a boolean stating if the device is a mobile phone, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a mobile phone, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/device/Device/prototype/isSmartTV.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isSmartTV\n\nThe read-only **`isSmartTV`** property of the `Device` interface is\neither a boolean stating if the device is a smart TV, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a smart TV, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/device/Device/prototype/isTablet.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isTablet\n\nThe read-only **`isTablet`** property of the `Device` interface is\neither a boolean stating if the device is a tablet (like an iPad), or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a tablet (like an iPad), or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/device/Device/prototype/isTouchscreen.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isTouchscreen\n\nThe read-only **`isTouchscreen`** property of the `Device` interface is\neither a boolean stating if the device's screen is touch sensitive, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device's screen is touch sensitive, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/device/Device/prototype/model.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.model\n\nThe read-only **`model`** property of the `Device` interface is\neither a string stating the model of the device, or `null` if the model is not known.\n\n\n## Value\n\nEither a string value if a model is known, otherwise `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/device/Device/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.name\n\nThe read-only **`name`** property of the `Device` interface is\neither a string stating the name of the device, or `null` if the name is not known.\n\n\n## Value\n\nEither a string value if a name is known, otherwise `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/device/Device/prototype/toJSON.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# toJSON\n\nThe `toJSON()` method of the Device interface is a serializer;\nit returns a JSON representation of the Device object.\n\nTo get a JSON string, you can use `JSON.stringify(device)` directly; it will call `toJSON()` automatically.\n\n## Syntax\n\n```js\ntoJSON()\n```\n\n### Return value\n\nA JSON object that is the serialization of the Device object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/dictionary/Dictionary/Dictionary.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Dictionary()`\n\n:::info\n\nThis Class is deprecated\n\n:::\n\nThe **`Dictionary` constructor** lets you access a specific [Fastly Edge Dictionary](https://docs.fastly.com/en/guides/about-edge-dictionaries).\n\n**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew Dictionary(name);\n```\n\n> **Note:** `Dictionary()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - The name of the [Fastly Edge Dictionary](https://docs.fastly.com/en/guides/about-edge-dictionaries) that this `Dictionary` instance should provide access to.\n\n### Return value\n\nA new `Dictionary` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Dictionary exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name does not start with an ascii alphabetical character \n  - Thrown if the provided name does not contain only ascii alphanumeric, underscore, and whitespace characters\n\n## Examples\n\nIn this example we have an Edge Dictionary named \"animals\" and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Dictionary Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/dictionary/Dictionary/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Dictionary.prototype.get\n\n:::info\n\nThis Class is deprecated, it has been renamed to [`ConfigStore`](../../../fastly:config-store/ConfigStore/ConfigStore.mdx) and can be imported via `import { ConfigStore } from 'fastly:config-store'`\n\nThe `get()` method exists on the [`ConfigStore`](../../../fastly:config-store/ConfigStore/ConfigStore.mdx) Class.\n\n:::\n\nThe **`get()`** method returns the value associated with the provided key in the dictionary. If the provided key does not exist in the Dictionary then this returns `null`.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from the dictionary.\n\n### Return value\n\nA `string` representing the specified Dictionary value or `null` if the key does not exist in the Dictionary\n\n## Description\n\nGet a value for a key in the dictionary. If the provided key does not exist in the Dictionary then this returns `null`.\n\nThe `get()` method requires its `this` value to be a [`Dictionary`](../Dictionary.mdx) object.\n\nIf the `this` value does not inherit from `Dictionary.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided key is longer than 255 in length\n  - Thrown if the provided key is an empty string\n\n## Examples\n\nIn this example we have an Edge Dictionary named \"animals\" and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Dictionary Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/edge-rate-limiter/EdgeRateLimiter/EdgeRateLimiter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `EdgeRateLimiter()`\n\nThe **`EdgeRateLimiter` constructor** lets you open an epen a [ERL](https://docs.fastly.com/products/edge-rate-limiting) with the given ratecounter and penaltybox.\n\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew EdgeRateLimiter(rateCounter, penaltyBox)\n```\n\n> **Note:** `EdgeRateLimiter()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `rateCounter` _: RateCounter_\n  - The RateCounter instance to associate with this EdgeRateLimiter instance\n- `penaltyBox` _: PenaltyBox_\n  - The PenaltyBox instance which should be associated with this EdgeRateLimiter instance\n\n### Return value\n\nA new `EdgeRateLimiter` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided rateCounter value is not an instance of RateCounter\n  - Thrown if the provided penaltyBox value is not an instance of PenaltyBox\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/edge-rate-limiter/EdgeRateLimiter/prototype/checkRate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# EdgeRateLimiter.prototype.checkRate\n\nIncrement an entry in the rate counter and check if the entry has exceeded some average number of requests per second (RPS) over the given window.\nIf the entry is over the RPS limit for the window, add to the penaltybox for the given `timeToLive`.\n\nValid `timeToLive` is 1 minute to 60 minutes and `timeToLive` value is truncated to the nearest minute.\n\n## Syntax\n```js\ncheckRate(entry, delta, window, limit, timeToLive)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to increment and check\n- `delta` _: number_\n  - The amount to increment the `entry` by\n- `window` _: number_\n  - The time period to check across, has to be either 1 second, 10 seconds, or 60 seconds\n- `limit` _: number_\n  - The requests-per-second limit\n- `timeToLive` _: number_\n  - In minutes, how long the entry should be added into the penalty-box\n  - Valid `timeToLive` is 1 minute to 60 minutes and `timeToLive` value is truncated to the nearest minute.\n\n\n### Return value\n\nReturns `true` if the entry has exceeded the average RPS for the window, otherwise returns `false`.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `name` value can not be coerced into a string\n  - Thrown if the provided `delta` value is not a positive finite number.\n  - Thrown if the provided `window` value is not either, 1, 10, or 60.\n  - Thrown if the provided `limit` value is not a positive finite number.\n  - Thrown if the provided `timeToLive` value is not either, a number between 1 and 60 inclusively.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/edge-rate-limiter/PenaltyBox/PenaltyBox.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `PenaltyBox()`\n\nThe **`PenaltyBox` constructor** can be used with a [Edge Rate Limiter](../EdgeRateLimiter/EdgeRateLimiter.mdx) or standalone for adding and checking if some entry is in the dataset.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew PenaltyBox(name)\n```\n\n> **Note:** `PenaltyBox()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Open a PenaltyBox with the given name\n\n\n### Return value\n\nA new `PenaltyBox` object instance.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `name` value can not be coerced into a string\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/edge-rate-limiter/PenaltyBox/prototype/add.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# PenaltyBox.prototype.add\n\nAdd an `entry` into the PenaltyBox for the duration of the given `timeToLive`.\n\n## Syntax\n```js\nadd(entry, timeToLive)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n- `timeToLive` _: number_\n  - In minutes, how long the entry should be added into the PenaltyBox\n  - Valid `timeToLive` is 1 minute to 60 minutes and `timeToLive` value is truncated to the nearest minute.\n\n\n### Return value\n\nReturns `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n  - Thrown if the provided `timeToLive` value is not either, a number between 1 and 60 inclusively.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/edge-rate-limiter/PenaltyBox/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# PenaltyBox.prototype.has\n\nCheck if the given entry is contained in in the PenaltyBox instance.\n\n## Syntax\n```js\nhas(entry)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n\n\n### Return value\n\nReturns `true` if the entry is contained in the PenaltyBox instance, otherwise returns `false`.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/edge-rate-limiter/RateCounter/RateCounter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `RateCounter()`\n\nThe **`RateCounter` constructor** can be used with a [Edge Rate Limiter](../EdgeRateLimiter/EdgeRateLimiter.mdx) or standalone for counting and rate calculations.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew RateCounter(name)\n```\n\n> **Note:** `RateCounter()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Open a RateCounter with the given name\n\n\n### Return value\n\nA new `RateCounter` object instance.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `name` value can not be coerced into a string\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/edge-rate-limiter/RateCounter/prototype/increment.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RateCounter.prototype.increment\n\nIncrement the given `entry` in the RateCounter instance with the given `delta` value.\n\n## Syntax\n```js\nincrement(entry, delta)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n- `delta` _: number_\n  - The amount to increment the entry by\n\n\n### Return value\n\nReturns `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n  - Thrown if the provided `delta` value is not a positive, finite number.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/edge-rate-limiter/RateCounter/prototype/lookupCount.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RateCounter.prototype.lookupCount\n\nLook up the current rate for the given `entry` and the given `duration`.\n\n## Syntax\n```js\nlookupCount(entry, duration)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n- `duration` _: number_\n  - The duration to lookup alongside the entry, has to be either, 10, 20, 30, 40, 50, or 60 seconds.\n\n\n### Return value\n\nReturns a number which is the count for the given `entry` and `duration` in this `RateCounter` instance.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n  - Thrown if the provided `duration` value is not either, 10, 20, 30, 40, 50 or 60.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/edge-rate-limiter/RateCounter/prototype/lookupRate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RateCounter.prototype.lookupRate\n\nLook up the current rate for the given `entry` and the given `window`.\n\n## Syntax\n```js\nlookupRate(entry, window)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n- `window` _: number_\n  - The window to look up alongside the entry, has to be either 1 second, 10 seconds, or 60 seconds\n\n\n### Return value\n\nReturns a number which is the rate for the given `entry` and `window` in this `RateCounter` instance.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n  - Thrown if the provided `window` value is not either, 1, 10, or 60.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/env/env.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# env\n\nThe **`env()`** function returns the value for the provided environment variable name.\n\nFor a list of available environment variables, see the [Fastly Developer Hub for Compute Environment Variables](https://developer.fastly.com/reference/compute/ecp-env/)\n\n>**Note**: The environment variables can only be retrieved when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nenv(name)\n```\n\n### Parameters\n\n- `name` _: string_\n  - The name of the environment variable to retrieve\n\n### Return value\n\nThe value for the requested environment variable, if no such environment variable exists then an empty string is returned.\n\n## Examples\n\nIn this example we log to stdout the environment variables [`FASTLY_HOSTNAME`](https://developer.fastly.com/reference/compute/ecp-env/fastly-hostname/) and [`FASTLY_TRACE_ID`](https://developer.fastly.com/reference/compute/ecp-env/fastly-trace-id/).\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"env Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { env } from \"fastly:env\";\nfunction app(event) {\n  console.log(\"FASTLY_HOSTNAME:\", env(\"FASTLY_HOSTNAME\"));\n  console.log(\"FASTLY_TRACE_ID:\", env(\"FASTLY_TRACE_ID\"));\n  return new Response(\"\", {\n    status: 200\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { env } from \"fastly:env\";\nfunction app(event) {\n  console.log(\"FASTLY_HOSTNAME:\", env(\"FASTLY_HOSTNAME\"));\n  console.log(\"FASTLY_TRACE_ID:\", env(\"FASTLY_TRACE_ID\"));\n  return new Response(\"\", {\n    status: 200\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/experimental/allowDynamicBackends.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# allowDynamicBackends\n\nThe **`allowDynamicBackends()`** function is used to control whether or not Dynamic Backends should be allowed within this Fastly Compute Service.\n\nBy default, Dynamic Backends are disabled within a JavaScript application as it can be a potential avenue for third-party JavaScript code to send requests, potentially including sensitive/secret data,  off to destinations that the JavaScript project was not intending, which could be a security issue.\n\n>**Note**: This feature is in disabled by default for Fastly Services. Please contact [Fastly Support](https://support.fastly.com/hc/requests/new?ticket_form_id=360000269711) to request the feature be enabled on the Fastly Services which require Dynamic Backends.\n\n## Syntax\n\n```js\nallowDynamicBackends(enabledOrConfig)\n```\n\n### Parameters\n\n- `enabledOrConfig` _: boolean_\n  - Whether or not to allow Dynamic Backends\n\nor\n\n- `enabledOrConfig` _: object_\n  - `connectTimeout` _: number_ _**optional**_\n    - Maximum duration in milliseconds to wait for a connection to this backend to be established.\n    - If exceeded, the connection is aborted and a 503 response will be presented instead.\n    - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n  - `firstByteTimeout` _: number_ _**optional**_\n    - Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent.\n    - If exceeded, the connection is aborted and a 503 response will be presented instead.\n    - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n  - `betweenBytesTimeout` _: number_ _**optional**_\n    - Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend.\n    - If exceeded, the response received so far will be considered complete and the fetch will end.\n    - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n\n### Return value\n\n`undefined`.\n\n## Examples\n\nIn this example an implicit Dynamic Backend is created when making the fetch request to https://www.fastly.com/ and the response is then returned to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Dynamic Backends Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nallowDynamicBackends(true);\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  return fetch('https://www.fastly.com/');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nallowDynamicBackends(true);\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  return fetch('https://www.fastly.com/');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/experimental/includeBytes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# includeBytes\n\nThe **`includeBytes()`** function is used embed a file as a Uint8Array.\n\n>**Note**: Can only be used during build-time initialization, not when processing requests.\n\n## Syntax\n\n```js\nincludeBytes(path)\n```\n\n### Parameters\n\n- `path` _: string_\n  - The path to include, relative to the Fastly Compute application's top-level directory during build-time initialization.\n\n### Return value\n\nReturns a `Uint8Array`\n\n## Examples\n\nIn this example we include the README.md file as a Uint8Array and use it for the body in the response we return to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { includeBytes } from \"fastly:experimental\";\nconst readme = includeBytes('README.md');\nasync function app() {\n    return new Response(readme);\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/experimental/mapAndLogError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# mapAndLogError\n\nThe **`mapAndLogError()`** function calls `mapError` on an `Error` object and sends the output to standard error. This includes the error name, message, and a call stack.\n\nIf `--enable-stack-traces` is specified during the build, the call stack will be mapped using source maps.\n\nIf `--enable-stack-traces` is specified and `--exclude-sources` is not specified during the build, then this will also include a code dump of neighboring lines of user code.\n\n## Syntax\n\n```js\nmapAndLogError(error)\n```\n\n### Parameters\n\n- `error` _: Error _ or _string_\n  - The error to retrieve information about. If a `string` is provided, then it is first converted to an `Error`.\n\n### Return value\n\n`undefined`.\n\n## Examples\n\nIn this example, build the application using the `--enable-stack-traces` flag.\n\n```js\naddEventListener('fetch', e => e.respondWith(handler(e)));\nasync function handler(event) {\n  try {\n    throw new TypeError('foo');\n  } catch (err) {\n    mapAndLogError(mapError(err));\n  }\n  return new Response('ok');\n}\n```\n\nThe following is output to the error log.\n\n```\nTypeError: foo\n  at handler (src/index.ts:4:11)\n      1 | addEventListener('fetch', e => e.respondWith(handler(e)));\n      2 | async function handler(event) {\n      3 |   try {\n>     4 |     throw new TypeError('foo');\n                    ^\n      5 |   } catch (err) {\n      6 |     mapAndLogError(mapError(err));\n      7 |   }\n  at src/index.ts:1:45\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/experimental/mapError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# mapError\n\nThe **`mapError()`** function extracts information from an `Error` object as a human-readable array of strings. This includes the error name, message, and a call stack.\n\nIf `--enable-stack-traces` is specified during the build, the call stack will be mapped using source maps.\n\nIf `--enable-stack-traces` is specified and `--exclude-sources` is not specified during the build, then this will also include a code dump of neighboring lines of user code.\n\n## Syntax\n\n```js\nmapError(error)\n```\n\n### Parameters\n\n- `error` _: Error _ or _string_\n  - The error to retrieve information about. If a `string` is provided, then it is first converted to an `Error`.\n\n### Return value\n\nReturns an array of `string`s.\n\n## Examples\n\nIn this example, build the application using the `--enable-stack-traces` flag.\n\n```js\naddEventListener('fetch', e => e.respondWith(handler(e)));\nasync function handler(event) {\n  try {\n    throw new TypeError('foo');\n  } catch (err) {\n    console.error(mapError(err));\n  }\n  return new Response('ok');\n}\n```\n\nThe following is output to the error log.\n\n```\nTypeError: foo\n  at handler (src/index.ts:4:11)\n      1 | addEventListener('fetch', e => e.respondWith(handler(e)));\n      2 | async function handler(event) {\n      3 |   try {\n>     4 |     throw new TypeError('foo');\n                    ^\n      5 |   } catch (err) {\n      6 |     console.error(mapError(err));\n      7 |   }\n  at src/index.ts:1:45\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/experimental/sdkVersion.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# sdkVersion\n\nThe read-only **`sdkVersion`** property is a string whose indicates what JavaScript SDK version is being used.\n\n## Value\n\nA string value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/fanout/createFanoutHandoff.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# createFanoutHandoff\n\nThe **`createFanoutHandoff()`** function creates a Response instance which informs Fastly to pass the original Request through Fanout, to the declared backend.\n\n## Syntax\n\n```js\ncreateFanoutHandoff(request, backend)\n```\n\n### Parameters\n\n- `request` _: Request_\n  - The request to pass through Fanout.\n- `backend` _: string_\n  - The name of the backend that Fanout should send the request to.\n  - The name has to be between 1 and 254 characters inclusive.\n  - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n\n### Return value\n\nA Response instance is returned, which can then be used via `event.respondWith`.\n\n## Examples\n\nIn this example application requests to the path `/stream` and sent handled via Fanout.\n\n```js\nimport { createFanoutHandoff } from \"fastly:fanout\";\n\nasync function handleRequest(event) {\n  try {\n    const url = new URL(event.request.url);\n    if (url.pathname === '/stream') {\n      return createFanoutHandoff(event.request, 'fanout');\n    } else {\n      return new Response('oopsie, make a request to /stream for some fanout goodies', { status: 404 });\n    }\n  } catch (error) {\n    console.error({error});\n    return new Response(error.message, {status:500})\n  }\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/geolocation/getGeolocationForIpAddress.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# getGeolocationForIpAddress\n\nThe **`getGeolocationForIpAddress()`** function is used to retrieve geolocation information about the given IP address.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\ngetGeolocationForIpAddress(address)\n```\n\n### Parameters\n\n- `address` _: string_\n  - The IPv4 or IPv6 address to query.\n\n### Return value\n\nReturns an `Object`, or `null` if no geolocation data was found.\n\nThe object contains information about the given IP address with the following properties:\n\n- `as_name`  _: string | null_\n  - The name of the organization associated with `as_number`.\n  - For example, fastly is the value given for IP addresses under AS-54113.\n\n- `as_number` _: number | null_\n  - [Autonomous system](https://en.wikipedia.org/wiki/Autonomous_system_(Internet)) (AS) number.\n\n- `area_code` _: number | null_\n  - The telephone area code associated with an IP address.\n  - These are only available for IP addresses in the United States, its territories, and Canada.\n\n- `city` _: string | null_\n  - City or town name.\n\n- `conn_speed` _: string | null_\n  - Connection speed.\n\n- `conn_type` _: string | null_\n  - Connection type.\n\n- `continent` _: string | null_\n  - Continent.\n\n- `country_code` _: string | null_\n  - A two-character [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) country code for the country associated with an IP address.\n  - The US country code is returned for IP addresses associated with overseas United States military bases.\n  - These values include subdivisions that are assigned their own country codes in ISO 3166-1. For example, subdivisions NO-21 and NO-22 are presented with the country code SJ for Svalbard and the Jan Mayen Islands.\n\n- `country_code3` _: string | null_\n  - A three-character [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) country code for the country associated with the IP address.\n  - The USA country code is returned for IP addresses associated with overseas United States military bases.\n\n- `country_name` _: string | null_\n  - Country name.\n  - This field is the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) English short name for a country.\n\n- `gmt_offset` _: string | null_\n  - Time zone offset from Greenwich Mean Time (GMT) for `city`.\n\n- `latitude` _: number | null_\n  - Latitude, in units of degrees from the equator.\n  - Values range from -90.0 to +90.0 inclusive, and are based on the [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System) coordinate reference system.\n\n- `longitude` _: number | null_\n  - Longitude, in units of degrees from the [IERS Reference Meridian](https://en.wikipedia.org/wiki/IERS_Reference_Meridian).\n  - Values range from -180.0 to +180.0 inclusive, and are based on the [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System) coordinate reference system.\n\n- `metro_code` _: number | null_\n  - Metro code, representing designated market areas (DMAs) in the United States.\n\n- `postal_code` _: string | null_\n  - The postal code associated with the IP address.\n  - These are available for some IP addresses in Australia, Canada, France, Germany, Italy, Spain, Switzerland, the United Kingdom, and the United States.\n  - For Canadian postal codes, this is the first 3 characters. For the United Kingdom, this is the first 2-4 characters (outward code). For countries with alphanumeric postal codes, this field is a lowercase transliteration.\n\n- `proxy_description` _: string | null_\n  - Client proxy description.\n\n- `proxy_type` _: string | null_\n  - Client proxy type.\n\n- `region` _: string | null_\n  - [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) country subdivision code.\n  - For countries with multiple levels of subdivision (for example, nations within the United Kingdom), this variable gives the more specific subdivision.\n  - This field can be None for countries that do not have ISO country subdivision codes. For example, None is given for IP addresses assigned to the Åland Islands (country code AX, illustrated below).\n\n- `utc_offset` _: number | null;_\n  - Time zone offset from coordinated universal time (UTC) for `city`.\n\n## Examples\n\nIn this example we return the geolocation details for the provided ip querystring parameter or for the incoming client request if the querystring parameter does not exist.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"getGeolocationForIpAddress Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { getGeolocationForIpAddress } from \"fastly:geolocation\"\nasync function app(event) {\n  try {\n    let ip = new URL(event.request.url).searchParams.get('ip') || event.client.address\n    let geo = getGeolocationForIpAddress(ip);\n    return new Response(JSON.stringify(geo), {\n      headers: {\n        \"Content-Type\": \"application/json\",\n      },\n    });\n  } catch (error) {\n    console.error(error);\n    return new Response(\"Internal Server Error\", {\n      status: 500\n    });\n  }\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { getGeolocationForIpAddress } from \"fastly:geolocation\"\nasync function app(event) {\n  try {\n    let ip = new URL(event.request.url).searchParams.get('ip') || event.client.address\n    let geo = getGeolocationForIpAddress(ip);\n    return new Response(JSON.stringify(geo), {\n      headers: {\n        \"Content-Type\": \"application/json\",\n      },\n    });\n  } catch (error) {\n    console.error(error);\n    return new Response(\"Internal Server Error\", {\n      status: 500\n    });\n  }\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/AggregrateError/AggregrateError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# AggregateError()\n\nThe **`AggregateError()`** constructor creates an error for several errors that need to be wrapped in a single error.\n\n## Syntax\n\n```js\nnew AggregateError(errors)\nnew AggregateError(errors, message)\nnew AggregateError(errors, message, options)\n\nAggregateError(errors)\nAggregateError(errors, message)\nAggregateError(errors, message, options)\n```\n\n> **Note:** `AggregateError()` can be called with or without `new`. Both create a new `AggregateError` instance.\n\n### Parameters\n\n- `errors`\n  - : An iterable of errors, may not actually be [`TypeError`](../Error/Error.mdx) instances.\n- `message` _**optional**_\n  - : An optional human-readable description of the aggregate error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Array/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array\\[Symbol.species]\n\nThe **`Array[Symbol.species]`** accessor property returns the constructor used to construct return values from array methods.\n\n> **Warning:** The existence of `[Symbol.species]` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Syntax\n\n```js\nArray[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get [Symbol.species]` was called. The return value is used to construct return values from array methods that create new arrays.\n\n## Description\n\nThe `[Symbol.species]` accessor property returns the default constructor for `Array` objects. Subclass constructors may override it to change the constructor assignment. The default implementation is basically:\n\n```js\n// Hypothetical underlying implementation for illustration\nclass Array {\n  static get [Symbol.species]() {\n    return this;\n  }\n}\n```\n\nBecause of this polymorphic implementation, `[Symbol.species]` of derived subclasses would also return the constructor itself by default.\n\n```js\nclass SubArray extends Array {}\nSubArray[Symbol.species] === SubArray; // true\n```\n\nWhen calling array methods that do not mutate the existing array but return a new array instance (for example, `filter()` and `map()`), the array's `constructor[Symbol.species]` will be accessed. The returned constructor will be used to construct the return value of the array method. This makes it technically possible to make array methods return objects unrelated to arrays.\n\n```js\nclass NotAnArray {\n  constructor(length) {\n    this.length = length;\n  }\n}\n\nconst arr = [0, 1, 2];\narr.constructor = { [Symbol.species]: NotAnArray };\narr.map((i) => i); // NotAnArray { '0': 0, '1': 1, '2': 2, length: 3 }\narr.filter((i) => i); // NotAnArray { '0': 1, '1': 2, length: 0 }\narr.concat([1, 2]); // NotAnArray { '0': 0, '1': 1, '2': 2, '3': 1, '4': 2, length: 5 }\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Array/Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array()\n\nThe **`Array()`** constructor is used to create `Array` objects.\n\n## Syntax\n\n```js\nnew Array(element0, element1, /* … ,*/ elementN)\nnew Array(arrayLength)\n\nArray(element0, element1, /* … ,*/ elementN)\nArray(arrayLength)\n```\n\n> **Note:** `Array()` can be called with or without `new`. Both create a new `Array` instance.\n\n### Parameters\n\n- `elementN`\n  - : A JavaScript array is initialized with the given elements, except in the case where\n    a single argument is passed to the `Array` constructor and that argument is\n    a number (see the `arrayLength` parameter below). Note that this special case only\n    applies to JavaScript arrays created with the `Array` constructor, not\n    array literals created with the bracket syntax.\n- `arrayLength`\n  - : If the only argument passed to the `Array` constructor is an integer\n    between 0 and 2<sup>32</sup> - 1 (inclusive), this returns a new JavaScript array with\n    its `length` property set to that number (**Note:** this\n    implies an array of `arrayLength` empty slots, not slots with actual\n    `undefined` values).\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if there's only one argument (`arrayLength`) and its value is not between 0 and 2<sup>32</sup> - 1 (inclusive).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Array/from.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.from\n\nThe **`Array.from()`** static method creates a new, shallow-copied `Array` instance from an iterable or array-like object.\n\n## Syntax\n\n```js\nArray.from(arrayLike)\n\n// Arrow function\nArray.from(arrayLike, (element) => { /* … */ })\nArray.from(arrayLike, (element, index) => { /* … */ })\n\n// Mapping function\nArray.from(arrayLike, mapFn)\nArray.from(arrayLike, mapFn, thisArg)\n\n// Inline mapping function\nArray.from(arrayLike, function (element) { /* … */ })\nArray.from(arrayLike, function (element, index) { /* … */ })\nArray.from(arrayLike, function (element) { /* … */ }, thisArg)\nArray.from(arrayLike, function (element, index) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `arrayLike`\n  - : An iterable or array-like object to convert to an array.\n- `mapFn` _**optional**_\n\n  - : Map function to call on every element of the array. If provided, every value to be added to the array is first passed through this function, and `mapFn`'s return value is added to the array instead.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `mapFn`.\n\n### Return value\n\nA new `Array` instance.\n\n## Description\n\n`Array.from()` lets you create `Array`s from:\n\n- [iterable objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) (objects such as [`Map`](../Map/Map.mdx) and [`Set`](../Set/Set.mdx); or, if the object is not iterable,\n- array-like objects (objects with a `length` property and indexed elements).\n\n`Array.from()` never creates a sparse array. If the `arrayLike` object is missing some index properties, they become `undefined` in the new array.\n\n`Array.from()` has an optional parameter `mapFn`, which allows you to execute a function on each element of the array being created, similar to [`Array.prototype.map()`](./prototype/map.mdx). More clearly, `Array.from(obj, mapFn, thisArg)` has the same result as `Array.from(obj).map(mapFn, thisArg)`, except that it does not create an intermediate array, and `mapFn` only receives two arguments (`element`, `index`) without the whole array, because the array is still under construction.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Array/isArray.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.isArray()\n\nThe **`Array.isArray()`** static method determines whether the passed value is an `Array`.\n\n## Syntax\n\n```js\nArray.isArray(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be checked.\n\n### Return value\n\n`true` if `value` is an `Array`; otherwise, `false`. `false` is always returned if `value` is a `TypedArray` instance.\n\n## Description\n\n`Array.isArray()` checks if the passed value is an `Array`. It does not check the value's prototype chain, nor does it rely on the `Array` constructor it is attached to. It returns `true` for any value that was created using the array literal syntax or the `Array` constructor. This makes it safe to use with cross-realm objects, where the identity of the `Array` constructor is different and would therefore cause `instanceof Array` to fail.\n\nSee the article [\"Determining with absolute accuracy whether or not a JavaScript object is an array\"](https://web.mit.edu/jwalden/www/isArray.html) for more details.\n\n`Array.isArray()` also rejects objects with `Array.prototype` in its prototype chain but aren't actual arrays, which `instanceof Array` would accept.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Array/of.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.of()\nThe **`Array.of()`** method creates a new `Array`\ninstance from a variable number of arguments, regardless of number or type of the\narguments.\n\n## Syntax\n\n```js\nArray.of(element0)\nArray.of(element0, element1)\nArray.of(element0, element1, /* … ,*/ elementN)\n```\n\n### Parameters\n\n- `elementN`\n  - : Elements used to create the array.\n\n### Return value\n\nA new `Array` instance.\n\n## Description\n\nThe difference between `Array.of()` and the [`Array()`](./Array.mdx) constructor is in the handling of single arguments: `Array.of(7)` creates an array with a single element, `7`, whereas `Array(7)` creates an empty array with a `length` property of `7`. (That implies an array of 7 empty slots, not slots with actual [`undefined`](../undefined.mdx) values.)\n\n```js\nArray.of(7); // [7]\nArray(7); // array of 7 empty slots\n\nArray.of(1, 2, 3); // [1, 2, 3]\nArray(1, 2, 3); // [1, 2, 3]\n```\n\nThe `Array.of()` method is a generic factory method. For example, if a subclass of `Array` inherits the `of()` method, the inherited `of()` method will return new instances of the subclass instead of `Array` instances. In fact, the `this` value can be any constructor function that accepts a single argument representing the length of the new array, and the constructor will be called with the number of arguments passed to `of()`. The final `length` will be set again when all elements are assigned. If the `this` value is not a constructor function, the plain `Array` constructor is used instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Array/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype\\[Symbol.iterator]()\n\nThe **`Symbol.iterator`** method of an `Array` object implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows arrays to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the value of each index in the array.\n\nThe initial value of this property is the same function object as the initial value of the [`Array.prototype.values`](./values.mdx) property.\n\n## Syntax\n\n```js\narray[Symbol.iterator]()\n```\n\n### Return value\n\nThe same return value as [`Array.prototype.values()`](./values.mdx): a new iterable iterator object that yields the value of each index in the array.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Array/prototype/@@unscopables.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype[Symbol.unscopables]\n\nThe **`@@unscopables`** data property of `Array.prototype` is shared by all `Array` instances. It contains property names that were not included in the ECMAScript standard prior to the ES2015 version and that are ignored for [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) statement-binding purposes.\n\n## Value\n\nA [`null`-prototype object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects) with property names given below and their values set to `true`.\n\n## Description\n\nThe default `Array` properties that are ignored for `with` statement-binding purposes are:\n\n- [`at()`](./at.mdx)\n- [`copyWithin()`](./copyWithin.mdx)\n- [`entries()`](./entries.mdx)\n- [`fill()`](./fill.mdx)\n- [`find()`](./find.mdx)\n- [`findIndex()`](./findIndex.mdx)\n- [`flat()`](./flat.mdx)\n- [`flatMap()`](./flatMap.mdx)\n- [`includes()`](./includes.mdx)\n- [`keys()`](./keys.mdx)\n- [`values()`](./values.mdx)\n\n`Array.prototype[@@unscopables]` is an empty object only containing all the above property names with the value `true`. Its [prototype is `null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects), so `Object.prototype` properties like [`toString`](../../Object/prototype/toString.mdx) won't accidentally be made unscopable, and a `toString()` within the `with` statement will continue to be called on the array.\n\nSee [`Symbol.unscopables`](../../Symbol/unscopables.mdx) for how to set unscopable properties for your own objects.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Array/prototype/at.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.at\n\nThe **`at()`** method takes an integer value and returns the item at that index, allowing for positive and negative integers. Negative integers count back from the last item in the array.\n\n## Syntax\n\n```js\nat(index)\n```\n\n### Parameters\n\n- `index`\n  - : Zero-based index of the array element to be returned, converted to an integer. Negative index counts back from the end of the array — if `index < 0`, `index + array.length` is accessed.\n\n### Return value\n\nThe element in the array matching the given index. Always returns [`undefined`](../../../globals/undefined.mdx) if `index < -array.length` or `index >= array.length` without attempting to access the corresponding property.\n\n## Description\n\nThe `at()` method is equivalent to the bracket notation when `index` is non-negative. For example, `array[0]` and `array.at(0)` both return the first item. However, when counting elements from the end of the array, you cannot use `array[-1]` like you may in Python or R, because all values inside the square brackets are treated literally as string properties, so you will end up reading `array[\"-1\"]`, which is just a normal string property instead of an array index.\n\nThe usual practice is to access [`Array.prototype.length`](./length.mdx) and calculate the index from that — for example, `array[array.length - 1]`. The `at()` method allows relative indexing, so this can be shortened to `array.at(-1)`.\n\nThe `at()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Array/prototype/concat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.concat\n\nThe **`concat()`** method is used to merge two or more arrays.\nThis method does not change the existing arrays, but instead returns a new array.\n\n## Syntax\n\n```js\nconcat()\nconcat(value0)\nconcat(value0, value1)\nconcat(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `valueN` _**optional**_\n  - : Arrays and/or values to concatenate into a new array. If all\n    `valueN` parameters are omitted, `concat` returns a\n    [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of the existing array on which it is called. See the description below\n    for more details.\n\n### Return value\n\nA new `Array` instance.\n\n## Description\n\nThe `concat` method creates a new array. The array will first be populated by the elements in the object on which it is called. Then, for each argument, its value will be concatenated into the array — for normal objects or primitives, the argument itself will become an element of the final array; for arrays or array-like objects with the property [`Symbol.isConcatSpreadable`](../../Symbol/isConcatSpreadable.mdx) set to a truthy value, each element of the argument will be independently added to the final array. The `concat` method does not recurse into nested array arguments.\n\nThe `concat()` method is a copying. It does not alter `this` or any of the arrays provided as arguments but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains the same elements as the ones from the original arrays.\n\nThe `concat()` method preserves empty slots if any of the source arrays is sparse.\n\nThe `concat()` method is generic. The `this` value is treated in the same way as the other arguments (except it will be converted to an object first), which means plain objects will be directly prepended to the resulting array, while array-like objects with truthy `Symbol.isConcatSpreadable` will be spread into the resulting array.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Array/prototype/copyWithin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.copyWithin\n\nThe **`copyWithin()`** method shallow copies part of an array\nto another location in the same array and returns it without modifying its length.\n\n\n\n## Syntax\n\n```js\ncopyWithin(target)\ncopyWithin(target, start)\ncopyWithin(target, start, end)\n```\n\n### Parameters\n\n- `target`\n  - : Zero-based index at which to copy the sequence to, converted to an integer.\n    - Negative index counts back from the end of the array — if `target < 0`, `target + array.length` is used.\n    - If `target < -array.length`, `0` is used.\n    - If `target >= array.length`, nothing is copied.\n    - If `target` is positioned after `start` after normalization, copying only happens until the end of `array.length` (in other words, `copyWithin()` never extends the array).\n- `start` _**optional**_\n  - : Zero-based index at which to start copying elements from, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, nothing is copied.\n- `end` _**optional**_\n  - : Zero-based index at which to end copying elements from, converted to an integer. `copyWithin()` copies up to but not including `end`.\n    - Negative index counts back from the end of the array — if `end < 0`, `end + array.length` is used.\n    - If `end < -array.length`, `0` is used.\n    - If `end >= array.length` or `end` is omitted, `array.length` is used, causing all elements until the end to be copied.\n    - If `end` is positioned before or at `start` after normalization, nothing is copied.\n\n### Return value\n\nThe modified array.\n\n## Description\n\nThe `copyWithin()` method works like C and C++'s `memmove`, and is a high-performance method to shift the data of an `Array`. The sequence is copied and pasted as one operation; the pasted sequence will have the copied values even when the copy and paste region overlap.\n\nThe `copyWithin()` method is a mutating method. It does not alter the length of `this`, but it will change the content of `this` and create new properties or delete existing properties, if necessary.\n\nThe `copyWithin()` method preserves empty slots. If the region to be copied from is sparse, the empty slots' corresponding new indices are [deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) and also become empty slots.\n\nThe `copyWithin()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Array/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.entries\n\nThe **`entries()`** method returns a new **Array\nIterator** object that contains the key/value pairs for each index in the\narray.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nA new `Array` iterator object.\n\n## Description\n\nWhen used on sparse arrays, the `entries()` method iterates empty slots as if they have the value `undefined`.\n\nThe `entries()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Array/prototype/every.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.every\n\nThe **`every()`** method tests whether\nall elements in the array pass the test implemented by the provided function. It\nreturns a Boolean value.\n\n## Syntax\n\n```js\n// Arrow function\nevery((element) => { /* … */ })\nevery((element, index) => { /* … */ })\nevery((element, index, array) => { /* … */ })\n\n// Callback function\nevery(callbackFn)\nevery(callbackFn, thisArg)\n\n// Inline callback function\nevery(function (element) { /* … */ })\nevery(function (element, index) { /* … */ })\nevery(function (element, index, array) { /* … */ })\nevery(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value to indicate the element passes the test, and a falsy value otherwise.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `every()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\n`true` if `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value for every array element. Otherwise, `false`.\n\n## Description\n\nThe `every()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array, until the `callbackFn` returns a [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value. If such an element is found, `every()` immediately returns `false` and stops iterating through the array. Otherwise, if `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value for all elements, `every()` returns `true`.\n\n`every` acts like the \"for all\" quantifier in mathematics. In particular, for an empty array, it returns `true`. (It is [vacuously true](https://en.wikipedia.org/wiki/Vacuous_truth) that all elements of the [empty set](https://en.wikipedia.org/wiki/Empty_set#Properties) satisfy any given condition.)\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\n`every()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `every()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `every()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Array/prototype/fill.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.fill\n\nThe **`fill()`** method changes all elements in an array to a static value, from a start index (default `0`) to an end index (default `array.length`).\nIt returns the modified array.\n\n## Syntax\n\n```js\nfill(value)\nfill(value, start)\nfill(value, start, end)\n```\n\n### Parameters\n\n- `value`\n  - : Value to fill the array with. Note all elements in the array will be this exact value: if `value` is an object, each slot in the array will reference that object.\n- `start` _**optional**_\n  - : Zero-based index at which to start filling, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, no index is filled.\n- `end` _**optional**_\n  - : Zero-based index at which to end filling, converted to an integer. `fill()` fills up to but not including `end`.\n    - Negative index counts back from the end of the array — if `end < 0`, `end + array.length` is used.\n    - If `end < -array.length`, `0` is used.\n    - If `end >= array.length` or `end` is omitted, `array.length` is used, causing all indices until the end to be filled.\n    - If `end` is positioned before or at `start` after normalization, no index is filled.\n\n### Return value\n\nThe modified array, filled with `value`.\n\n## Description\n\nThe `fill()` method is a mutating method. It does not alter the length of `this`, but it will change the content of `this`.\n\nThe `fill()` method fills empty slots in sparse arrays with `value` as well.\n\nThe `fill()` method is generic. It only expects the `this` value to have a `length` property. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Array/prototype/filter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.filter\n\nThe **`filter()`** method creates a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of a portion of a given array, filtered down to just the elements from the given array that pass the test implemented by the provided function.\n\n## Syntax\n\n```js\n// Arrow function\nfilter((element) => { /* … */ })\nfilter((element, index) => { /* … */ })\nfilter((element, index, array) => { /* … */ })\n\n// Callback function\nfilter(callbackFn)\nfilter(callbackFn, thisArg)\n\n// Inline callback function\nfilter(function (element) { /* … */ })\nfilter(function (element, index) { /* … */ })\nfilter(function (element, index, array) { /* … */ })\nfilter(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) to keep the element in the resulting array, and a falsy value otherwise.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `filter()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\nA [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of a portion of the given array, filtered down to just the elements from the given array that pass the test implemented by the provided function. If no elements pass the test, an empty array will be returned.\n\n## Description\n\nThe `filter()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array, and constructs a new array of all the values for which `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. Array elements which do not pass the `callbackFn` test are not included in the new array.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nThe `filter()` method is a copying method. It does not alter `this` but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains the same elements as the ones from the original array (with some filtered out). However, the function provided as `callbackFn` can mutate the array. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `filter()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\nThe `filter()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Array/prototype/find.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.find()\n\nThe `find()` method returns the first element in the provided array that satisfies the provided testing function.\nIf no values satisfy the testing function, [`undefined`](../../../globals/undefined.mdx) is returned.\n\n- If you need the **index** of the found element in the array, use [`findIndex()`](./findIndex.mdx).\n- If you need to find the **index of a value**, use [`indexOf()`](./indexOf.mdx).\n  (It's similar to [`findIndex()`](./findIndex.mdx), but checks each element for equality with the value instead of using a testing function.)\n- If you need to find if a value **exists** in an array, use [`includes()`](./includes.mdx).\n  Again, it checks each element for equality with the value instead of using a testing function.\n- If you need to find if any element satisfies the provided testing function, use [`some()`](./some.mdx).\n\n## Syntax\n\n```js\n// Arrow function\nfind((element) => { /* … */ })\nfind((element, index) => { /* … */ })\nfind((element, index, array) => { /* … */ })\n\n// Callback function\nfind(callbackFn)\nfind(callbackFn, thisArg)\n\n// Inline callback function\nfind(function (element) { /* … */ })\nfind(function (element, index) { /* … */ })\nfind(function (element, index, array) { /* … */ })\nfind(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value to indicate a matching element has been found.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `find()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\nThe first element in the array that satisfies the provided testing function.\nOtherwise, [`undefined`](../../../globals/undefined.mdx) is returned.\n\n## Description\n\nThe `find()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array in ascending-index order, until `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. `find()` then returns that element and stops iterating through the array. If `callbackFn` never returns a truthy value, `find()` returns [`undefined`](../../../globals/undefined.mdx).\n\n`callbackFn` is invoked for _every_ index of the array, not just those with assigned values. Empty slots in sparse arrays behave the same as `undefined`.\n\n`find()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `find()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are visited as if they were `undefined`.\n\nThe `find()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Array/prototype/findIndex.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.findIndex\n\nThe **`findIndex()`** method returns the index of the first element in an array that satisfies the provided testing function.\nIf no elements satisfy the testing function, -1 is returned.\n\nSee also the [`find()`](./find.mdx) method, which returns the first element that satisfies the testing function (rather than its index).\n\n## Syntax\n\n```js\n// Arrow function\nfindIndex((element) => { /* … */ })\nfindIndex((element, index) => { /* … */ })\nfindIndex((element, index, array) => { /* … */ })\n\n// Callback function\nfindIndex(callbackFn)\nfindIndex(callbackFn, thisArg)\n\n// Inline callback function\nfindIndex(function (element) { /* … */ })\nfindIndex(function (element, index) { /* … */ })\nfindIndex(function (element, index, array) { /* … */ })\nfindIndex(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value to indicate a matching element has been found.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `findIndex()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\nThe index of the first element in the array that passes the test. Otherwise, `-1`.\n\n## Description\n\nThe `findIndex()` is an iterative method. It calls a provided `callbackFn` function once for each element in an array in ascending-index order, until `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. `findIndex()` then returns the index of that element and stops iterating through the array. If `callbackFn` never returns a truthy value, `findIndex()` returns `-1`.\n\n`callbackFn` is invoked for _every_ index of the array, not just those with assigned values. Empty slots in sparse arrays behave the same as `undefined`.\n\n`findIndex()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `findIndex()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are visited as if they were `undefined`.\n\nThe `findIndex()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Array/prototype/flat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.flat\n\nThe **`flat()`** method creates a new array with all sub-array\nelements concatenated into it recursively up to the specified depth.\n\n## Syntax\n\n```js\nflat()\nflat(depth)\n```\n\n### Parameters\n\n- `depth` _**optional**_\n  - : The depth level specifying how deep a nested array structure should be flattened.\n    Defaults to 1.\n\n### Return value\n\nA new array with the sub-array elements concatenated into it.\n\n## Description\n\nThe `flat()` method is a copying method. It does not alter `this` but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains the same elements as the ones from the original array.\n\nThe `flat()` method ignores empty slots if the array being flattened is sparse. For example, if `depth` is 1, both empty slots in the root array and in the first level of nested arrays are ignored, but empty slots in further nested arrays are preserved with the arrays themselves.\n\nThe `flat()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. However, its elements must be arrays if they are to be flattened.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Array/prototype/flatMap.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.flatMap()\n\nThe **`flatMap()`** method returns a new array formed by applying a given callback function to each element of the array, and then flattening the result by one level. It is identical to a [`Array.prototype.map()`](./map.mdx) followed by a [`Array.prototype.flat()`](./flat.mdx) of depth 1 (`arr.map(...args).flat()`), but slightly more efficient than calling those two methods separately.\n\n## Syntax\n\n```js\n// Arrow function\nflatMap((element) => { /* … */ })\nflatMap((element, index) => { /* … */ })\nflatMap((element, index, array) => { /* … */ })\n\n// Callback function\nflatMap(callbackFn)\nflatMap(callbackFn, thisArg)\n\n// Inline callback function\nflatMap(function (element) { /* … */ })\nflatMap(function (element, index) { /* … */ })\nflatMap(function (element, index, array) { /* … */ })\nflatMap(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return an array containing new elements of the new array, or a single non-array value to be added to the new array.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `flatMap()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\nA new array with each element being the result of the callback function and flattened\nby a depth of 1.\n\n## Description\n\nThe `flatMap()` method is an iterative method. See [`Array.prototype.map()`](./map.mdx) for a detailed description of the callback function. The `flatMap()` method is identical to [`map(callbackFn, thisArg)`](./map.mdx) followed by [`flat(1)`](./flat.mdx) — for each element, it produces an array of new elements, and concatenates the resulting arrays together to form a new array.\n\nThe `flatMap()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. However, the value returned from `callbackFn` must be an array if it is to be flattened.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Array/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.forEach()\n\nThe **`forEach()`** method executes a provided function once\nfor each array element.\n\n## Syntax\n\n```js\n// Arrow function\nforEach((element) => { /* … */ })\nforEach((element, index) => { /* … */ })\nforEach((element, index, array) => { /* … */ })\n\n// Callback function\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n\n// Inline callback function\nforEach(function (element) { /* … */ })\nforEach(function (element, index) { /* … */ })\nforEach(function (element, index, array) { /* … */ })\nforEach(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value is discarded.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `forEach()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\n`undefined`.\n\n## Description\n\nThe `forEach()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array in ascending-index order. Unlike [`Array.prototype.map()`](./map.mdx), `forEach()` always returns [`undefined`](../../../globals/undefined.mdx) and is not chainable. The typical use case is to execute side effects at the end of a chain.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\n`forEach()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `forEach()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\nThe `forEach()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n\nThere is no way to stop or break a `forEach()` loop other than by throwing an exception. If you need such behavior, the `forEach()` method is the wrong tool.\n\nEarly termination may be accomplished with looping statements like [`for`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for), [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of), and [`for...in`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...in). Array methods like [`Array.prototype.some()`](./some.mdx), [`Array.prototype.some()`](./some.mdx), [`Array.prototype.find()`](./find.mdx), and [`Array.prototype.findIndex()`](./findIndex.mdx) also stops iteration immediately when further iteration is not necessary.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Array/prototype/includes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.includes()\n\nThe **`includes()`** method determines whether an array\nincludes a certain value among its entries, returning `true` or\n`false` as appropriate.\n\n## Syntax\n\n```js\nincludes(searchElement)\nincludes(searchElement, fromIndex)\n```\n\n### Parameters\n\n- `searchElement`\n  - : The value to search for.\n- `fromIndex` _**optional**_\n  - : Zero-based index at which to start searching, converted to an integer.\n    - Negative index counts back from the end of the array — if `fromIndex < 0`, `fromIndex + array.length` is used. However, the array is still searched from front to back in this case.\n    - If `fromIndex < -array.length` or `fromIndex` is omitted, `0` is used, causing the entire array to be searched.\n    - If `fromIndex >= array.length`, the array is not searched and `false` is returned.\n\n### Return value\n\nA boolean value which is `true` if the value `searchElement` is found within the array (or the part of the array indicated by the index `fromIndex`, if specified).\n\n## Description\n\nThe `includes()` method compares `searchElement` to elements of the array using the [SameValueZero](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) algorithm. Values of zero are all considered to be equal, regardless of sign. (That is, `-0` is equal to `0`), but `false` is _not_ considered to be the same as `0`. [`NaN`](../../NaN.mdx) can be correctly searched for.\n\nWhen used on sparse arrays, the `includes()` method iterates empty slots as if they have the value `undefined`.\n\nThe `includes()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Array/prototype/indexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.indexOf()\n\nThe **`indexOf()`** method returns the first index at which a\ngiven element can be found in the array, or -1 if it is not present.\n\n## Syntax\n\n```js\nindexOf(searchElement)\nindexOf(searchElement, fromIndex)\n```\n\n### Parameters\n\n- `searchElement`\n  - : Element to locate in the array.\n- `fromIndex` _**optional**_\n  - : Zero-based index at which to start searching, converted to an integer.\n    - Negative index counts back from the end of the array — if `fromIndex < 0`, `fromIndex + array.length` is used. Note, the array is still searched from front to back in this case.\n    - If `fromIndex < -array.length` or `fromIndex` is omitted, `0` is used, causing the entire array to be searched.\n    - If `fromIndex >= array.length`, the array is not searched and `-1` is returned.\n\n### Return value\n\nThe first index of the element in the array; **-1** if not found.\n\n## Description\n\nThe `indexOf()` method compares `searchElement` to elements of the array using [strict equality](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) (the same algorithm used by the `===` operator).\n\nThe `indexOf()` method skips empty slots in sparse arrays.\n\nThe `indexOf()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Array/prototype/join.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.join()\n\nThe **`join()`** method creates and\nreturns a new string by concatenating all of the elements in an array\n(or an [array-like object](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects)),\nseparated by commas or a specified separator string. If the array has\nonly one item, then that item will be returned without using the separator.\n\n## Syntax\n\n```js\njoin()\njoin(separator)\n```\n\n### Parameters\n\n- `separator` _**optional**_\n  - : Specifies a string to separate each pair of adjacent elements of the array. The\n    separator is converted to a string if necessary. If omitted, the array elements are\n    separated with a comma (\",\"). If `separator` is an empty string, all\n    elements are joined without any characters in between them.\n\n### Return value\n\nA string with all array elements joined. If `arr.length` is\n`0`, the empty string is returned.\n\n## Description\n\nThe string conversions of all array elements are joined into one string. If an element is `undefined`, `null`, it is converted to an empty string instead of the string `\"null\"` or `\"undefined\"`.\n\nThe `join` method is accessed internally by [`Array.prototype.toString()`](./toString.mdx) with no arguments. Overriding `join` of an array instance will override its `toString` behavior as well.\n\nWhen used on sparse arrays, the `join()` method iterates empty slots as if they have the value `undefined`.\n\nThe `join()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Array/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.keys()\n\nThe **`keys()`** method returns a new **Array\nIterator** object that contains the keys for each index in the array.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nA new `Array` iterator object.\n\n## Description\n\nWhen used on sparse arrays, the `keys()` method iterates empty slots as if they have the value `undefined`.\n\nThe `keys()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Array/prototype/lastIndexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.lastIndexOf()\n\nThe **`lastIndexOf()`** method returns the last index at which\na given element can be found in the array, or -1 if it is not present. The array is\nsearched backwards, starting at `fromIndex`.\n\n## Syntax\n\n```js\nlastIndexOf(searchElement)\nlastIndexOf(searchElement, fromIndex)\n```\n\n### Parameters\n\n- `searchElement`\n  - : Element to locate in the array.\n- `fromIndex` _**optional**_\n  - : Zero-based index at which to start searching backwards, converted to an integer.\n    - Negative index counts back from the end of the array — if `fromIndex < 0`, `fromIndex + array.length` is used.\n    - If `fromIndex < -array.length`, the array is not searched and `-1` is returned. You can think of it conceptually as starting at a nonexistent position before the beginning of the array and going backwards from there. There are no array elements on the way, so `searchElement` is never found.\n    - If `fromIndex >= array.length` or `fromIndex` is omitted, `array.length - 1` is used, causing the entire array to be searched. You can think of it conceptually as starting at a nonexistent position beyond the end of the array and going backwards from there. It eventually reaches the real end position of the array, at which point it starts searching backwards through the actual array elements.\n\n### Return value\n\nThe last index of the element in the array; **-1** if not found.\n\n## Description\n\nThe `lastIndexOf()` method compares `searchElement` to elements of the array using [strict equality](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) (the same algorithm used by the `===` operator).\n\nThe `lastIndexOf()` method skips empty slots in sparse arrays.\n\nThe `lastIndexOf()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Array/prototype/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.length\n\nThe **`length`** data property of an `Array` instance represents the number of elements in that array. The value is an unsigned, 32-bit integer that is always numerically greater than the highest index in the array.\n\n## Value\n\nA non-negative integer less than 2<sup>32</sup>.\n\n## Description\n\nThe value of the `length` property is a non-negative integer with a value less than 2<sup>32</sup>.\n\n```js\nconst listA = [1, 2, 3];\nconst listB = new Array(6);\n\nconsole.log(listA.length);\n// 3\n\nconsole.log(listB.length);\n// 6\n\nlistB.length = 2 ** 32; // 4294967296\n// RangeError: Invalid array length\n\nconst listC = new Array(-100); // Negative numbers are not allowed\n// RangeError: Invalid array length\n```\n\nThe array object observes the `length` property, and automatically syncs the `length` value with the array's content. This means:\n\n- Setting `length` to a value smaller than the current length truncates the array — elements beyond the new `length` are deleted.\n- Setting any array index (a non-negative integer smaller than 2<sup>32</sup>) beyond the current `length` extends the array — the `length` property is increased to reflect the new highest index.\n- Setting `length` to an invalid value (e.g. a negative number or a non-integer) throws a `RangeError` exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Array/prototype/map.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.map()\n\nThe **`map()`** method **creates\na new array** populated with the results of calling a provided function on\nevery element in the calling array.\n\n## Syntax\n\n```js\n// Arrow function\nmap((element) => { /* … */ })\nmap((element, index) => { /* … */ })\nmap((element, index, array) => { /* … */ })\n\n// Callback function\nmap(callbackFn)\nmap(callbackFn, thisArg)\n\n// Inline callback function\nmap(function (element) { /* … */ })\nmap(function (element, index) { /* … */ })\nmap(function (element, index, array) { /* … */ })\nmap(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value is added as a single element in the new array.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `map()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\nA new array with each element being the result of the callback function.\n\n## Description\n\nThe `map()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array and constructs a new array from the results.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nThe `map()` method is a copying method. It does not alter `this`. However, the function provided as `callbackFn` can mutate the array. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `map()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `map()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n\nSince `map` builds a new array, calling it without using the returned\narray is an anti-pattern; use [`Array.prototype.forEach()`](./forEach.mdx) or\n`for...of` instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Array/prototype/pop.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.pop()\n\nThe **`pop()`** method removes the **last**\nelement from an array and returns that element. This method changes the length of the\narray.\n\n## Syntax\n\n```js\npop()\n```\n\n### Return value\n\nThe removed element from the array; [`undefined`](../../../globals/undefined.mdx) if the array is empty.\n\n## Description\n\nThe `pop()` method removes the last element from an array and returns that value to the caller. If you call `pop()` on an empty array, it returns [`undefined`](../../../globals/undefined.mdx).\n\n[`Array.prototype.shift()`](./shift.mdx) has similar behavior to `pop()`, but applied to the first element in an array.\n\nThe `pop()` method is a mutating method. It changes the length and the content of `this`. In case you want the value of `this` to be the same, but return a new array with the last element removed, you can use [`arr.slice(0, -1)`](./slice.mdx) instead.\n\nThe `pop()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Array/prototype/push.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.push()\n\nThe **`push()`** method adds one or more elements to the end of\nan array and returns the new length of the array.\n\n## Syntax\n\n```js\npush(element0)\npush(element0, element1)\npush(element0, element1, /* … ,*/ elementN)\n```\n\n### Parameters\n\n- `elementN`\n  - : The element(s) to add to the end of the array.\n\n### Return value\n\nThe new [`Array.prototype.length`](./length.mdx) property of the object upon which the method was called.\n\n## Description\n\nThe `push()` method appends values to an array.\n\n[`Array.prototype.unshift()`](./unshift.mdx)has similar behavior to `push()`, but applied to the start of an array.\n\nThe `push()` method is a mutating method. It changes the length and the content of `this`. In case you want the value of `this` to be the same, but return a new array with elements appended to the end, you can use [`arr.concat([element0, element1, /* ... ,*/ elementN])`](./concat.mdx) instead. Notice that the elements are wrapped in an extra array — otherwise, if the element is an array itself, it would be spread instead of pushed as a single element due to the behavior of `concat()`.\n\nThe `push()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Array/prototype/reduce.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.reduce()\n\nThe **`reduce()`** method executes a user-supplied \"reducer\" callback function on each element of the array, in order, passing in the return value from the calculation on the preceding element.\nThe final result of running the reducer across all elements of the array is a single value.\n\nThe first time that the callback is run there is no \"return value of the previous calculation\".\nIf supplied, an initial value may be used in its place.\nOtherwise the array element at index 0 is used as the initial value and iteration starts from the next element (index 1 instead of index 0).\n\nPerhaps the easiest-to-understand case for `reduce()` is to return the sum of all the elements in an array:\n\nThe reducer walks through the array element-by-element, at each step adding the current array value to the result from the previous step (this result is the running sum of all the previous steps) — until there are no more elements to add.\n\n## Syntax\n\n```js\n// Arrow function\nreduce((accumulator, currentValue) => { /* … */ })\nreduce((accumulator, currentValue, currentIndex) => { /* … */ })\nreduce((accumulator, currentValue, currentIndex, array) => { /* … */ })\n\nreduce((accumulator, currentValue) => { /* … */ }, initialValue)\nreduce((accumulator, currentValue, currentIndex) => { /* … */ }, initialValue)\nreduce((accumulator, currentValue, currentIndex, array) => { /* … */ }, initialValue)\n\n// Callback function\nreduce(callbackFn)\nreduce(callbackFn, initialValue)\n\n// Inline callback function\nreduce(function (accumulator, currentValue) { /* … */ })\nreduce(function (accumulator, currentValue, currentIndex) { /* … */ })\nreduce(function (accumulator, currentValue, currentIndex, array) { /* … */ })\n\nreduce(function (accumulator, currentValue) { /* … */ }, initialValue)\nreduce(function (accumulator, currentValue, currentIndex) { /* … */ }, initialValue)\nreduce(function (accumulator, currentValue, currentIndex, array) { /* … */ }, initialValue)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value becomes the value of the `accumulator` parameter on the next invocation of `callbackFn`. For the last invocation, the return value becomes the return value of `reduce()`.\n\n    The function is called with the following arguments:\n\n    - `accumulator`\n      - : The value resulting from the previous call to `callbackFn`. On first call, `initialValue` if specified, otherwise the value of `array[0]`.\n    - `currentValue`\n      - : The value of the current element. On first call, the value of `array[0]` if an `initialValue` was specified, otherwise the value of `array[1]`.\n    - `currentIndex`\n      - : The index position of `currentValue` in the array. On first call, `0` if `initialValue` was specified, otherwise `1`.\n    - `array`\n      - : The array `reduce()` was called upon.\n\n- `initialValue` _**optional**_\n  - : A value to which `accumulator` is initialized the first time the callback is called.\n    If `initialValue` is specified, `callbackFn` starts executing with the first value in the array as `currentValue`.\n    If `initialValue` is _not_ specified, `accumulator` is initialized to the first value in the array, and `callbackFn` starts executing with the second value in the array as `currentValue`. In this case, if the array is empty (so that there's no first value to return as `accumulator`), an error is thrown.\n\n### Return value\n\nThe value that results from running the \"reducer\" callback function to completion over the entire array.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n\n  - : The array contains no elements and `initialValue` is not provided.\n\n## Description\n\nThe `reduce()` method is an iterative method. It runs a \"reducer\" callback function over all elements in the array, in ascending-index order, and accumulates them into a single value. Every time, the return value of `callbackFn` is passed into `callbackFn` again on next invocation as `accumulator`. The final value of `accumulator` (which is the value returned from `callbackFn` on the final iteration of the array) becomes the return value of `reduce()`.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nUnlike other [iterative methods](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array#iterative_methods), `reduce()` does not accept a `thisArg` argument. `callbackFn` is always called with `undefined` as `this`, which gets substituted with `globalThis` if `callbackFn` is non-strict.\n\n`reduce()` is a central concept in [functional programming](https://en.wikipedia.org/wiki/Functional_programming), where it's not possible to mutate any value, so in order to accumulate all values in an array, one must return a new accumulator value on every iteration. This convention propagates to JavaScript's `reduce()`: you should use [spreading](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) or other copying methods where possible to create new arrays and objects as the accumulator, rather than mutating the existing one. If you decided to mutate the accumulator instead of copying it, remember to still return the modified object in the callback, or the next iteration will receive undefined.\n\n`reduce()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `reduce()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `reduce()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n\n### When to not use reduce()\n\nRecursive functions like `reduce()` can be powerful but sometimes difficult to understand, especially for less-experienced JavaScript developers. If code becomes clearer when using other array methods, developers must weigh the readability tradeoff against the other benefits of using `reduce()`. In cases where `reduce()` is the best choice, documentation and semantic variable naming can help mitigate readability drawbacks.\n\n### Edge cases\n\nIf the array only has one element (regardless of position) and no `initialValue` is provided, or if `initialValue` is provided but the array is empty, the solo value will be returned _without_ calling `callbackFn`.\n\nIf `initialValue` is provided and the array is not empty, then the reduce method will always invoke the callback function starting at index 0.\n\nIf `initialValue` is not provided then the reduce method will act differently for arrays with length larger than 1, equal to 1 and 0, as shown in the following example:\n\n```js\nconst getMax = (a, b) => Math.max(a, b);\n\n// callback is invoked for each element in the array starting at index 0\n[1, 100].reduce(getMax, 50); // 100\n[50].reduce(getMax, 10); // 50\n\n// callback is invoked once for element at index 1\n[1, 100].reduce(getMax); // 100\n\n// callback is not invoked\n[50].reduce(getMax); // 50\n[].reduce(getMax, 1); // 1\n\n[].reduce(getMax); // TypeError\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Array/prototype/reduceRight.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.reduceRight()\n\nThe **`reduceRight()`** method applies a function against an\naccumulator and each value of the array (from right-to-left) to reduce it to a single\nvalue.\n\nSee also [`Array.prototype.reduce()`](./reduce.mdx) for left-to-right.\n\n## Syntax\n\n```js\n// Arrow function\nreduceRight((accumulator, currentValue) => { /* … */ })\nreduceRight((accumulator, currentValue, index) => { /* … */ })\nreduceRight((accumulator, currentValue, index, array) => { /* … */ })\nreduceRight((accumulator, currentValue, index, array) => { /* … */ }, initialValue)\n\n// Callback function\nreduceRight(callbackFn)\nreduceRight(callbackFn, initialValue)\n\n// Callback reducer function\nreduceRight(function (accumulator, currentValue) { /* … */ })\nreduceRight(function (accumulator, currentValue, index) { /* … */ })\nreduceRight(function (accumulator, currentValue, index, array) { /* … */ })\nreduceRight(function (accumulator, currentValue, index, array) { /* … */ }, initialValue)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value becomes the value of the `accumulator` parameter on the next invocation of `callbackFn`. For the last invocation, the return value becomes the return value of `reduce()`.\n\n    The function is called with the following arguments:\n\n    - `accumulator`\n      - : The value previously returned in the last invocation of the callback, or\n        `initialValue`, if supplied. (See below.)\n    - `currentValue`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `reduceRight()` was called upon.\n\n- `initialValue` _**optional**_\n  - : Value to use as accumulator to the first call of the\n    `callbackFn`. If no initial value is supplied, the last element in\n    the array will be used and skipped. Calling reduce or reduceRight on an empty array\n    without an initial value creates a `TypeError`.\n\n### Return value\n\nThe value that results from the reduction.\n\n## Description\n\nThe `reduceRight()` method is an iterative method. It runs a \"reducer\" callback function over all elements in the array, in descending-index order, and accumulates them into a single value.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nUnlike other [iterative methods](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array#iterative_methods), `reduce()` does not accept a `thisArg` argument. `callbackFn` is always called with `undefined` as `this`, which gets substituted with `globalThis` if `callbackFn` is non-strict.\n\n`reduceRight()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `reduceRight()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `reduceRight()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Array/prototype/reverse.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.reverse()\n\nThe **`reverse()`** method reverses an array _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_ and returns the reference to the same array, the first array element now becoming the last, and the last array element becoming the first. In other words, elements order in the array will be turned towards the direction opposite to that previously stated.\n\n## Syntax\n\n```js\nreverse()\n```\n\n### Return value\n\nThe reference to the original array, now reversed. Note that the array is reversed _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_, and no copy is made.\n\n## Description\n\nThe `reverse()` method transposes the elements of the calling array object in\nplace, mutating the array, and returning a reference to the array.\n\nThe `reverse()` method preserves empty slots. If the source array is sparse, the empty slots' corresponding new indices are [deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) and also become empty slots.\n\nThe `reverse()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Array/prototype/shift.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.shift()\n\nThe **`shift()`** method removes the **first**\nelement from an array and returns that removed element. This method changes the length\nof the array.\n\n## Syntax\n\n```js\nshift()\n```\n\n### Return value\n\nThe removed element from the array; [`undefined`](../../../globals/undefined.mdx) if the array is empty.\n\n## Description\n\nThe `shift()` method removes the element at the zeroth index and shifts the\nvalues at consecutive indexes down, then returns the removed value. If the\n[`Array.prototype.length`](./length.mdx) property is 0, [`undefined`](../../../globals/undefined.mdx) is returned.\n\nThe [`Array.prototype.pop()`](./pop.mdx) method has similar behavior to `shift()`, but applied to the last element in an array.\n\nThe `shift()` method is a mutating method. It changes the length and the content of `this`. In case you want the value of `this` to be the same, but return a new array with the first element removed, you can use [`arr.slice(1)`](./slice.mdx) instead.\n\nThe `shift()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Array/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.slice()\n\nThe **`slice()`** method returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of a portion of\nan array into a new array object selected from `start` to `end`\n(`end` not included) where `start` and `end` represent\nthe index of items in that array. The original array will not be modified.\n\n## Syntax\n\n```js\nslice()\nslice(start)\nslice(start, end)\n```\n\n### Parameters\n\n- `start` _**optional**_\n  - : Zero-based index at which to start extraction, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, nothing is extracted.\n- `end` _**optional**_\n  - : Zero-based index at which to end extraction, converted to an integer. `slice()` extracts up to but not including `end`.\n    - Negative index counts back from the end of the array — if `end < 0`, `end + array.length` is used.\n    - If `end < -array.length`, `0` is used.\n    - If `end >= array.length` or `end` is omitted, `array.length` is used, causing all elements until the end to be extracted.\n    - If `end` is positioned before or at `start` after normalization, nothing is extracted.\n\n### Return value\n\nA new array containing the extracted elements.\n\n## Description\n\nThe `slice()` method is a copying method. It does not alter `this` but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains some of the same elements as the ones from the original array.\n\nThe `slice()` method preserves empty slots. If the sliced portion is sparse, the returned array is sparse as well.\n\nThe `slice()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Array/prototype/some.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.some()\n\nThe **`some()`** method tests whether\nat least one element in the array passes the test implemented by the provided\nfunction. It returns true if, in the array, it finds an element for which the provided function returns true; otherwise it returns false. It doesn't modify the array.\n\n## Syntax\n\n```js\n// Arrow function\nsome((element) => { /* … */ })\nsome((element, index) => { /* … */ })\nsome((element, index, array) => { /* … */ })\n\n// Callback function\nsome(callbackFn)\nsome(callbackFn, thisArg)\n\n// Inline callback function\nsome(function (element) { /* … */ })\nsome(function (element, index) { /* … */ })\nsome(function (element, index, array) { /* … */ })\nsome(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) to indicate the element passes the test, and a falsy value otherwise.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `some()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\n`true` if the callback function returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value for at least one element in the array. Otherwise, `false`.\n\n## Description\n\nThe `some()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array, until the `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. If such an element is found, `some()` immediately returns `true` and stops iterating through the array. Otherwise, if `callbackFn` returns a [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value for all elements, `some()` returns `false`.\n\n`some()` acts like the \"there exists\" quantifier in mathematics. In particular, for an empty array, it returns `false` for any condition.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\n`some()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `some()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\nThe `some()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Array/prototype/sort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.sort()\n\nThe **`sort()`** method sorts the elements of an array _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_ and returns the reference to the same array, now sorted. The default sort order is ascending, built upon converting the elements into strings, then comparing their sequences of UTF-16 code units values.\n\nThe time and space complexity of the sort cannot be guaranteed as it depends on the\nimplementation.\n\n## Syntax\n\n```js\n// Functionless\nsort()\n\n// Arrow function\nsort((a, b) => { /* … */ } )\n\n// Compare function\nsort(compareFn)\n\n// Inline compare function\nsort(function compareFn(a, b) { /* … */ })\n```\n\n### Parameters\n\n- `compareFn` _**optional**_\n\n  - : Specifies a function that defines the sort order. If omitted, the array elements are converted to strings, then sorted according to each character's Unicode code point value.\n\n    - `a`\n      - : The first element for comparison.\n    - `b`\n      - : The second element for comparison.\n\n### Return value\n\nThe reference to the original array, now sorted. Note that the array is sorted _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_, and no copy is made.\n\n## Description\n\nIf `compareFn` is not supplied, all non-`undefined` array\nelements are sorted by converting them to strings and comparing strings in UTF-16 code\nunits order. For example, \"banana\" comes before \"cherry\". In a numeric sort, 9 comes\nbefore 80, but because numbers are converted to strings, \"80\" comes before \"9\" in the\nUnicode order. All `undefined` elements are sorted to the end of the array.\n\nThe `sort()` method preserves empty slots. If the source array is sparse, the empty slots are moved to the end of the array, and always come after all the `undefined`.\n\n> **Note:** In UTF-16, Unicode characters above `\\uFFFF` are\n> encoded as two surrogate code units, of the range\n> `\\uD800` - `\\uDFFF`. The value of each code unit is taken\n> separately into account for the comparison. Thus the character formed by the surrogate\n> pair `\\uD855\\uDE51` will be sorted before the character\n> `\\uFF3A`.\n\nIf `compareFn` is supplied, all non-`undefined` array\nelements are sorted according to the return value of the compare function (all\n`undefined` elements are sorted to the end of the array, with no call to\n`compareFn`).\n\n| `compareFn(a, b)` return value | sort order                         |\n| ------------------------------ | ---------------------------------- |\n| > 0                            | sort `a` after `b`                 |\n| < 0                            | sort `a` before `b`                |\n| === 0                          | keep original order of `a` and `b` |\n\nSo, the compare function has the following form:\n\n```js\nfunction compareFn(a, b) {\n  if (a is less than b by some ordering criterion) {\n    return -1;\n  }\n  if (a is greater than b by the ordering criterion) {\n    return 1;\n  }\n  // a must be equal to b\n  return 0;\n}\n```\n\nMore formally, the comparator is expected to have the following properties, in order to ensure proper sort behavior:\n\n- _Pure_: The comparator does not mutate the objects being compared or any external state. (This is important because there's no guarantee _when_ and _how_ the comparator will be called, so any particular call should not produce visible effects to the outside.)\n- _Stable_: The comparator returns the same result with the same pair of input.\n- _Reflexive_: `compareFn(a, a) === 0`.\n- _Anti-symmetric_: `compareFn(a, b)` and `compareFn(b, a)` must both be `0` or have opposite signs.\n- _Transitive_: If `compareFn(a, b)` and `compareFn(b, c)` are both positive, zero, or negative, then `compareFn(a, c)` has the same positivity as the previous two.\n\nA comparator conforming to the constraints above will always be able to return all of `1`, `0`, and `-1`, or consistently return `0`. For example, if a comparator only returns `1` and `0`, or only returns `0` and `-1`, it will not be able to sort reliably because _anti-symmetry_ is broken. A comparator that always returns `0` will cause the array to not be changed at all, but is reliable nonetheless.\n\nThe default lexicographic comparator satisfies all constraints above.\n\nTo compare numbers instead of strings, the compare function can subtract `b`\nfrom `a`. The following function will sort the array in ascending order (if\nit doesn't contain `Infinity` and `NaN`):\n\n```js\nfunction compareNumbers(a, b) {\n  return a - b;\n}\n```\n\nThe `sort()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Array/prototype/splice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.splice()\n\nThe **`splice()`** method changes the contents of an array by\nremoving or replacing existing elements and/or adding new elements [in place](https://en.wikipedia.org/wiki/In-place_algorithm). To access part of an array without modifying it, see [`Array.prototype.slice()`](./slice.mdx).\n\n## Syntax\n\n```js\nsplice(start)\nsplice(start, deleteCount)\nsplice(start, deleteCount, item1)\nsplice(start, deleteCount, item1, item2, itemN)\n```\n\n### Parameters\n\n- `start`\n\n  - : Zero-based index at which to start changing the array, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, no element will be deleted, but the method will behave as an adding function, adding as many elements as provided.\n\n- `deleteCount` _**optional**_\n\n  - : An integer indicating the number of elements in the array to remove from `start`.\n\n    If `deleteCount` is omitted, or if its value is greater than or equal to the number of elements after the position specified by `start`, then all the elements from `start` to the end of the array will be deleted. However, if you wish to pass any `itemN` parameter, you should pass `Infinity` as `deleteCount` to delete all elements after `start`, because an explicit `undefined` gets [converted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#integer_conversion) to `0`.\n\n    If `deleteCount` is `0` or negative, no elements are removed.\n    In this case, you should specify at least one new element (see below).\n\n- `item1`, …, `itemN` _**optional**_\n\n  - : The elements to add to the array, beginning from `start`.\n\n    If you do not specify any elements, `splice()` will only remove elements from the array.\n\n### Return value\n\nAn array containing the deleted elements.\n\nIf only one element is removed, an array of one element is returned.\n\nIf no elements are removed, an empty array is returned.\n\n## Description\n\nThe `splice()` method is a mutating method. It may change the content of `this`. If the specified number of elements to insert differs from the number of elements being removed, the array's `length` will be changed as well. At the same time, it uses [`@@species`](../@@species.mdx) to create a new array instance to be returned.\n\nIf the deleted portion is sparse, the array returned by `splice()` is sparse as well, with those corresponding indices being empty slots.\n\nThe `splice()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Array/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string representing\nthe elements of the array. The elements are converted to Strings using their\n`toLocaleString` methods and these Strings are separated by a locale-specific\nString (such as a comma \",\").\n\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\n- `locales` _**optional**_\n  - : A string with a BCP 47 language tag, or an array of such strings. For the general form and interpretation of the `locales` argument, see [Locale identification and negotiation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation).\n- `options` _**optional**_\n  - : An object with configuration properties. For numbers, see [`Number.prototype.toLocaleString()`](../../../globals/Number/prototype/toLocaleString.mdx); for dates, see [`Date.prototype.toLocaleString()`](../../../globals/Date/prototype/toLocaleString.mdx).\n\n### Return value\n\nA string representing the elements of the array.\n\n## Description\n\nThe `Array.prototype.toLocaleString` method traverses its content, calling the `toLocaleString` method of every element with the `locales` and `options` parameters provided, and concatenates them with an implementation-defined separator (such as a comma \",\"). Note that the method itself does not consume the two parameters — it only passes them to the `toLocaleString()` of each element. The choice of the separator string depends on the host's current locale, not the `locales` parameter.\n\nIf an element is `undefined`, `null`, it is converted to an empty string instead of the string `\"null\"` or `\"undefined\"`.\n\nWhen used on sparse arrays, the `toLocaleString()` method iterates empty slots as if they have the value `undefined`.\n\nThe `toLocaleString()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Array/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.toString()\n\nThe **`toString()`** method returns a string representing the\nspecified array and its elements.\n\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the elements of the array.\n\n## Description\n\nThe `Array` object overrides the `toString` method of `Object`. The `toString` method of arrays calls [`join()`](../../../globals/Array/prototype/join.mdx) internally, which joins the array and returns one string containing each array element separated by commas. If the `join` method is unavailable or is not a function, [`Object.prototype.toString`](../../../globals/Object/prototype/toString.mdx) is used instead, returning `[object Array]`.\n\n```js\nconst arr = [];\narr.join = 1; // re-assign `join` with a non-function\nconsole.log(arr.toString()); // [object Array]\n\nconsole.log(Array.prototype.toString.call({ join: () => 1 })); // 1\n```\n\nJavaScript calls the `toString` method automatically when an array is to be represented as a text value or when an array is referred to in a string concatenation.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Array/prototype/unshift.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.unshift()\n\nThe **`unshift()`** method adds one or more elements to the\nbeginning of an array and returns the new length of the array.\n\n## Syntax\n\n```js\nunshift(element0)\nunshift(element0, element1)\nunshift(element0, element1, /* … ,*/ elementN)\n```\n\n### Parameters\n\n- `elementN`\n  - : The elements to add to the front of the `arr`.\n\n### Return value\n\nThe new [`Array.prototype.length`](./length.mdx) property of the object upon which the\nmethod was called.\n\n## Description\n\nThe `unshift()` method inserts the given values to the beginning of an\narray-like object.\n\n[`Array.prototype.push()`](./push.mdx) has similar behavior to `unshift()`, but applied to the end of an array.\n\nPlease note that, if multiple elements are passed as parameters, they're inserted in\nchunk at the beginning of the object, in the exact same order they were passed as\nparameters. Hence, calling `unshift()` with `n`\narguments **once**, or calling it `n` times with\n**1** argument (with a loop, for example), don't yield the same results.\n\nSee example:\n\n```js\nlet arr = [4, 5, 6];\n\narr.unshift(1, 2, 3);\nconsole.log(arr);\n// [1, 2, 3, 4, 5, 6]\n\narr = [4, 5, 6]; // resetting the array\n\narr.unshift(1);\narr.unshift(2);\narr.unshift(3);\n\nconsole.log(arr);\n// [3, 2, 1, 4, 5, 6]\n```\n\nThe `unshift()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Array/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.values()\n\nThe **`values()`** method returns a new _array [iterator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterator_protocol)_ object that iterates the value of each index in the array.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nA new iterable iterator object.\n\n## Description\n\n`Array.prototype.values()` is the default implementation of [`Array.prototype[@@iterator]()`](./@@iterator.mdx).\n\n```js\nArray.prototype.values === Array.prototype[Symbol.iterator]; // true\n```\n\nWhen used on sparse arrays, the `values()` method iterates empty slots as if they have the value `undefined`.\n\nThe `values()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/ArrayBuffer/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get ArrayBuffer\\[Symbol.species]\n\nThe **`ArrayBuffer[Symbol.species]`** accessor property returns the constructor used to construct return values from array buffer methods.\n\n> **Warning:** The existence of `Symbol.species` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Syntax\n\n```js\nArrayBuffer[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct return values from array buffer methods that create new array buffers.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `ArrayBuffer` objects. Subclass constructors may override it to change the constructor assignment. The default implementation is basically:\n\n```js\n// Hypothetical underlying implementation for illustration\nclass ArrayBuffer {\n  static get [Symbol.species]() {\n    return this;\n  }\n}\n```\n\nBecause of this polymorphic implementation, `Symbol.species` of derived subclasses would also return the constructor itself by default.\n\n```js\nclass SubArrayBuffer extends ArrayBuffer {}\nSubArrayBuffer[Symbol.species] === SubArrayBuffer; // true\n```\n\nWhen calling array buffer methods that do not mutate the existing object but return a new array buffer instance (for example, [`slice()`](./prototype/slice.mdx)), the object's `constructor[Symbol.species]` will be accessed. The returned constructor will be used to construct the return value of the array buffer method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/ArrayBuffer/ArrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer()\n\nThe **`ArrayBuffer()`** constructor is used to create \"ArrayBuffer\" objects.\n\n## Syntax\n\n```js\nnew ArrayBuffer(length)\n```\n\n> **Note:** `ArrayBuffer()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `length`\n  - : The size, in bytes, of the array buffer to create.\n\n### Return value\n\nA new `ArrayBuffer` object of the specified size. Its contents are\ninitialized to 0.\n\n### Exceptions\n\n- [`RangeError`](../RangeError/RangeError.mdx)\n  - : Thrown if the `length` is larger than `Number_MAX_SAFE_INTEGER` (≥ 2<sup>53</sup>) or negative.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/ArrayBuffer/isView.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer.isView\n\nThe **`ArrayBuffer.isView()`** method determines whether the\npassed value is one of the `ArrayBuffer` views,\nsuch as [typed array objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray)\nor a [`DataView`](../DataView/DataView.mdx).\n\n## Syntax\n\n```js\nArrayBuffer.isView(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be checked.\n\n### Return value\n\n`true` if the given argument is one of the `ArrayBuffer` views;\notherwise, `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/ArrayBuffer/prototype/byteLength.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer.prototype.byteLength\n\nThe **`byteLength`** accessor property represents the length of an `ArrayBuffer` in bytes.\n\n## Description\n\nThe `byteLength` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when the array is constructed and cannot be changed. This property returns 0 if this `ArrayBuffer` has been detached.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/ArrayBuffer/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer.prototype.slice()\n\nThe **`slice()`** method returns a new `ArrayBuffer`\nwhose contents are a copy of this `ArrayBuffer`'s bytes from\n`begin`, inclusive, up to `end`, exclusive.\n\n## Syntax\n\n```js\nslice(begin)\nslice(begin, end)\n```\n\n### Parameters\n\n- `begin`\n  - : Zero-based byte index at which to begin slicing.\n- `end` _**optional**_\n  - : Byte index before which to end slicing. If end is unspecified, the new\n    `ArrayBuffer` contains all bytes from begin to the end of this\n    `ArrayBuffer`. If negative, it will make the Byte index begin from the last\n    Byte.\n\n### Return value\n\nA new `ArrayBuffer` object.\n\n## Description\n\nThe `slice()` method copies up to, but not including, the byte indicated by\nthe `end` parameter. If either `begin` or `end` is\nnegative, it refers to an index from the end of the array, as opposed to from the\nbeginning.\n\nThe range specified by the `begin` and `end` parameters is\nclamped to the valid index range for the current array. If the computed length of the\nnew `ArrayBuffer` would be negative, it is clamped to zero.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/BigInt/BigInt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt()\n\nThe **`BigInt()`** function returns a value of type **bigint**.\n\n## Syntax\n\n```js\nBigInt(value)\n```\n\n> **Note:** `BigInt()` can only be called without `new`. Attempting to construct it with `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `value`\n  - : The numeric value of the object being created. It may be a string, an integer, a boolean, or another `BigInt`.\n\n### Return value\n\nA `BigInt` value. Number values must be integers and are converted to BigInts. The boolean value `true` becomes `1n`, and `false` becomes `0n`. Strings are parsed as if they are source text for integer literals, which means they can have leading and trailing whitespaces and can be prefixed with `0b`, `0o`, or `0x`.\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if the parameter is a non-integral number.\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if at least one of these conditions is met:\n    - The parameter cannot be converted to a primitive.\n    - After conversion to a primitive, the result is [`undefined`](../undefined.mdx), `null`, `Symbol`.\n- [`SyntaxError`](../SyntaxError/SyntaxError.mdx)\n  - : Thrown if the parameter is a string that cannot be parsed as a `BigInt`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/BigInt/asIntN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.asIntN()\n\nThe **`BigInt.asIntN`** static method clamps a `BigInt` value to the given number of bits, and returns that value as a signed integer.\n\n## Syntax\n\n```js\nBigInt.asIntN(bits, bigint)\n```\n\n### Parameters\n\n- `bits`\n  - : The amount of bits available for the returned BigInt. Should be an integer between 0 and 2<sup>53</sup> - 1, inclusive.\n- `bigint`\n  - : The BigInt value to clamp to fit into the supplied bits.\n\n### Return value\n\nThe value of `bigint` modulo 2^`bits`, as a signed integer.\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `bits` is negative or greater than 2<sup>53</sup> - 1.\n\n## Description\n\nThe `BigInt.asIntN` method clamps a `BigInt` value to the given number of bits, and interprets the result as a signed integer. For example, for `BigInt.asIntN(3, 25n)`, the value `25n` is clamped to `1n`:\n\n```plain\n25n = 00011001 (base 2)\n          ^=== Clamp to three remaining bits\n===>       001 (base 2) = 1n\n```\n\nIf the leading bit of the remaining number is `1`, the result is negative. For example, `BigInt.asIntN(4, 25n)` yields `-7n`, because `1001` is the encoding of `-7` under two's complement:\n\n```plain\n25n = 00011001 (base 2)\n         ^==== Clamp to four remaining bits\n===>      1001 (base 2) = -7n\n```\n\n> **Note:** `BigInt` values are always encoded as two's complement in binary.\n\nUnlike similar language APIs such as [`Number.prototype.toExponential()`](../Number/prototype/toExponential.mdx), `asIntN` is a static property of `BigInt`, so you always use it as `BigInt.asIntN()`, rather than as a method of a BigInt value. Exposing `asIntN()` as a \"standard library function\" allows [interop with asm.js](https://github.com/tc39/proposal-bigint/blob/master/ADVANCED.md#dont-break-asmjs).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/BigInt/asUintN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.asUintN()\n\nThe **`BigInt.asUintN`** static method clamps a `BigInt` value to the given number of bits, and returns that value as an unsigned integer.\n\n## Syntax\n\n```js\nBigInt.asUintN(bits, bigint)\n```\n\n### Parameters\n\n- `bits`\n  - : The amount of bits available for the returned BigInt. Should be an integer between 0 and 2<sup>53</sup> - 1, inclusive.\n- `bigint`\n  - : The BigInt value to clamp to fit into the supplied bits.\n\n### Return value\n\nThe value of `bigint` modulo 2^`bits`, as an unsigned integer.\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `bits` is negative or greater than 2<sup>53</sup> - 1.\n\n## Description\n\nThe `BigInt.asUintN` method clamps a `BigInt` value to the given number of bits, and interprets the result as an unsigned integer. Unsigned integers have no sign bits and are always non-negative. For example, for `BigInt.asUintN(4, 25n)`, the value `25n` is clamped to `9n`:\n\n```plain\n25n = 00011001 (base 2)\n         ^==== Clamp to four remaining bits\n===>      1001 (base 2) = 9n\n```\n\n> **Note:** `BigInt` values are always encoded as two's complement in binary.\n\nUnlike similar language APIs such as [`Number.prototype.toExponential()`](../Number/prototype/toExponential.mdx), `asUintN` is a static property of `BigInt`, so you always use it as `BigInt.asUintN()`, rather than as a method of a BigInt value. Exposing `asUintN()` as a \"standard library function\" allows [interop with asm.js](https://github.com/tc39/proposal-bigint/blob/master/ADVANCED.md#dont-break-asmjs).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/BigInt/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string with a language-sensitive representation of this BigInt. In implementations with [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) support, this method simply calls `Intl.NumberFormat`.\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` parameters customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat), these parameters correspond exactly to the [`Intl.NumberFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) constructor's parameters. Implementations without `Intl.NumberFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#locales) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored.\n\nSee the [`Intl.NumberFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string with a language-sensitive representation of the given BigInt.\n\nIn implementations with `Intl.NumberFormat`, this is equivalent to `new Intl.NumberFormat(locales, options).format(number)`.\n\n## Performance\n\nWhen formatting large numbers of numbers, it is better to create a\n`Intl.NumberFormat` object and use the function provided by its\n`format()` method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/BigInt/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified `BigInt` value. The trailing \"n\" is not part of the string.\n\n## Syntax\n\n```js\ntoString()\ntoString(radix)\n```\n\n### Parameters\n\n- `radix` _**optional**_\n  - : An integer in the range 2 through 36 specifying the base to use for representing the BigInt value. Defaults to 10.\n\n### Return value\n\nA string representing the specified `BigInt` value.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `radix` is less than 2 or greater than 36.\n\n## Description\n\nThe `BigInt` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../Object/prototype/toString.mdx). For `BigInt` values, the `toString()` method returns a string representation of the value in the specified radix.\n\nFor radixes above 10, the letters of the alphabet indicate digits greater than 9. For example, for hexadecimal numbers (base 16) `a` through `f` are used.\n\nIf the specified BigInt value is negative, the sign is preserved. This is the case even if the radix is 2; the string returned is the positive binary representation of the BigInt value preceded by a `-` sign, **not** the two's complement of the BigInt value.\n\nThe `toString()` method requires its `this` value to be a `BigInt` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to BigInt values.\n\nBecause `BigInt` doesn't have a [`[Symbol.toPrimitive]()`](../../Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `BigInt` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, BigInt _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — rather, they are directly converted using the same algorithm as the initial `toString()` implementation.\n\n```js\nBigInt.prototype.toString = () => \"Overridden\";\nconsole.log(`${1n}`); // \"1\"\nconsole.log(`${Object(1n)}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/BigInt/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.prototype.valueOf()\n\nThe **`valueOf()`** method returns the wrapped primitive value\nof a `BigInt` object.\n\n## Syntax\n\n```js\nbigIntObj.valueOf()\n```\n\n### Return value\n\nA BigInt representing the primitive value of the specified `BigInt` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/BigInt64Array/BigInt64Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt64Array()\n\nThe **`BigInt64Array()`** typed array constructor creates a\nnew `BigInt64Array` object, which is, an array of 64-bit signed integers\nin the platform byte order. If control over byte order is needed, use\n[`DataView`](../DataView/DataView.mdx) instead. The contents are initialized to `0n`. Once\nestablished, you can reference elements in the array using the object's methods, or by\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew BigInt64Array()\nnew BigInt64Array(length)\nnew BigInt64Array(typedArray)\nnew BigInt64Array(object)\n\nnew BigInt64Array(buffer)\nnew BigInt64Array(buffer, byteOffset)\nnew BigInt64Array(buffer, byteOffset, length)\n```\n\n> **Note:** `BigInt64Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/BigUint64Array/BigUint64Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigUint64Array()\n\nThe **`BigUint64Array()`** typed array constructor creates a\nnew `BigUint64Array` object, which is, an array of 64-bit unsigned integers\nin the platform byte order. If control over byte order is needed, use\n[`DataView`](../DataView/DataView.mdx) instead. The contents are initialized to `0n`. Once\nestablished, you can reference elements in the array using the object's methods, or by\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew BigUint64Array()\nnew BigUint64Array(length)\nnew BigUint64Array(typedArray)\nnew BigUint64Array(object)\n\nnew BigUint64Array(buffer)\nnew BigUint64Array(buffer, byteOffset)\nnew BigUint64Array(buffer, byteOffset, length)\n```\n\n> **Note:** `BigUint64Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](..//TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Blob/Blob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob()\n\nThe **`Blob()`** constructor creates a `Blob` object, which represents a file-like object of immutable, raw data.\n\n## Syntax\n\n```js\nnew Blob()\nnew Blob(array)\nnew Blob(array, options)\n```\n\n> **Note:** `Blob()` can only be constructed with `new`. Attempting to call it without `new` throws a `TypeError`.\n\n### Parameters\n\n- `array` _**optional**_\n\n  - : An array of values to include in the `Blob`. These can be [`ArrayBuffer`](../../globals/ArrayBuffer/ArrayBuffer.mdx), [`Blob`](../../globals/Blob/Blob.mdx), or strings. If any of these elements is a [`Blob`](../../globals/Blob/Blob.mdx), its content (and not the object itself) is copied into the Blob being constructed.\n\n- `options` _**optional**_\n\n  - : An object containing optional attributes for the `Blob`.\n    - `type`\n      - : A string indicating the MIME type of the data. The default value is the empty string `\"\"`.\n    - `endings`\n      - : A string indicating how to handle line endings in the data. This can be either `\"transparent\"` (default) to keep line endings unchanged, or `\"native\"` to convert line endings to the platform's native line endings (e.g., `\\r\\n` on Windows).\n\n### Return value\n\nA new `Blob` object containing the specified data.\n\n## Description\n\n`Blob` objects represent data that isn't necessarily in a JavaScript-native format. The `File` interface is based on `Blob`, inheriting its functionality and expanding it to support files on the user's system.\n\nTo construct a `Blob` from other non-blob objects and data, use the `Blob()` constructor. To create a blob that contains a subset of another blob's data, use the [`slice()`](../../globals/Blob/prototype/slice.mdx) method.\n\nThe `type` property of a `Blob` object will match the MIME type specified in the constructor's `options` parameter, defaulting to an empty string if not specified.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Blob/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the `Blob` interface returns a `Promise` that resolves with an `ArrayBuffer` containing the entire contents of the `Blob` as binary data.\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with an `ArrayBuffer` containing the blob's data.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Blob/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.size\n\nThe **`size`** read-only property of the `Blob` interface returns the size of the `Blob` in bytes.\n\n## Value\n\nA number representing the size of the `Blob` in bytes.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Blob/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.slice()\n\nThe **`slice()`** method of the `Blob` interface creates and returns a new `Blob` object which contains data from a subset of the blob on which it's called.\n\n## Syntax\n\n```js\nslice()\nslice(start)\nslice(start, end)\nslice(start, end, contentType)\n```\n\n### Parameters\n\n- `start` _**optional**_\n  - : The 0-based index of the first byte to include in the new `Blob`. If negative, it refers to an index from the end of the `Blob`. The default value is 0.\n- `end` _**optional**_\n  - : The 0-based index of the first byte that will not be included in the new `Blob`. If negative, it refers to an index from the end of the `Blob`. The default value is `size`.\n- `contentType` _**optional**_\n  - : A string indicating the content type to assign to the new `Blob`. The default value is an empty string.\n\n### Return value\n\nA new `Blob` object containing the specified subset of data.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Blob/prototype/stream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.stream()\n\nThe **`stream()`** method of the `Blob` interface returns a `ReadableStream` that can be used to read the contents of the `Blob`.\n\n## Syntax\n\n```js\nstream()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `ReadableStream` that provides the data contained within the `Blob`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Blob/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.text()\n\nThe **`text()`** method of the `Blob` interface returns a `Promise` that resolves with a string containing the contents of the blob, interpreted as UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a string containing the blob's data as a text string. The data is always interpreted as UTF-8.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Blob/prototype/type.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.type\n\nThe **`type`** read-only property of the `Blob` interface returns the MIME type of the `Blob`.\n\n## Value\n\nA string indicating the MIME type of the `Blob`. If the type cannot be determined, this returns an empty string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Boolean/Boolean.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Boolean()\n\nThe **`Boolean()`** constructor can create `Boolean` objects or return primitive values of type boolean.\n\n## Syntax\n\n```js\nnew Boolean(value)\nBoolean(value)\n```\n\n> **Note:** `Boolean()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\n- `value`\n  - : The initial value of the `Boolean` object.\n\n### Return value\n\nWhen `Boolean()` is called as a constructor (with `new`), it creates a `Boolean` object, which is **not** a primitive.\n\nWhen `Boolean()` is called as a function (without `new`), it coerces the parameter to a boolean primitive.\n\n> **Warning:** You should rarely find yourself using `Boolean` as a constructor.\n\n## Description\n\nThe value passed as the first parameter is [converted to a boolean value](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean#boolean_coercion). If the value is omitted or is `0`, `-0`, `0n`, [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null), `false`, [`NaN`](../NaN.mdx), [`undefined`](../undefined.mdx), or the empty string (`\"\"`), then the object has an initial value of `false`. All other values, including any object, an empty array (`[]`), or the string `\"false\"`, create an object with an initial value of `true`.\n\n> **Note:** When the non-standard property [`document.all`](https://developer.mozilla.org/docs/Web/API/Document/all) is used as an argument for this constructor, the result is a `Boolean` object with the value `false`. This property is legacy and non-standard and should not be used.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Boolean/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Boolean.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified boolean value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified boolean value.\n\n## Description\n\nThe `Boolean` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../Object/prototype/toString.mdx). For `Boolean` values, the `toString` method returns a string representation of the boolean value, which is either `\"true\"` or `\"false\"`.\n\nThe `toString()` method requires its `this` value to be a `Boolean` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to boolean values.\n\nBecause `Boolean` doesn't have a [`[Symbol.toPrimitive]()`](../../Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `Boolean` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, boolean _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — rather, they are directly converted using the same algorithm as the initial `toString()` implementation.\n\n```js\nBoolean.prototype.toString = () => \"Overridden\";\nconsole.log(`${true}`); // \"true\"\nconsole.log(`${new Boolean(true)}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Boolean/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Boolean.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a\n`Boolean` object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nThe primitive value of the given `Boolean` object.\n\n## Description\n\nThe `valueOf()` method of `Boolean` returns the primitive value\nof a `Boolean` object or literal `Boolean` as a Boolean data type.\n\nThis method is usually called internally by JavaScript and not explicitly in code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/ByteLengthQueuingStrategy/ByteLengthQueuingStrategy.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ByteLengthQueuingStrategy()\n\nThe **`ByteLengthQueuingStrategy()`**\nconstructor creates and returns a `ByteLengthQueuingStrategy` object\ninstance.\n\n## Syntax\n\n```js\nnew ByteLengthQueuingStrategy(highWaterMark)\n```\n\n### Parameters\n\nAn object with the following property:\n\n- `highWaterMark`\n\n  - : The total number of bytes that can be contained in the internal queue before backpressure is applied.\n\n    Unlike `CountQueuingStrategy()` where the `highWaterMark` parameter specifies a simple count of the number of chunks, with `ByteLengthQueuingStrategy()`, the `highWaterMark` parameter specifies a number of _bytes_ — specifically, given a stream of chunks, how many bytes worth of those chunks (rather than a count of how many of those chunks) can be contained in the internal queue before backpressure is applied.\n\n### Return value\n\nAn instance of the `ByteLengthQueuingStrategy` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/ByteLengthQueuingStrategy/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ByteLengthQueuingStrategy.size()\n\nThe **`size()`** method of the\n`ByteLengthQueuingStrategy` interface returns the given chunk's\n`byteLength` property.\n\n## Syntax\n\n```js\nsize(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : A chunk of data being passed through the stream.\n\n### Return value\n\nAn integer representing the byte length of the given chunk.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/CompressionStream/CompressionStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CompressionStream()\n\nThe **`CompressionStream()`** constructor creates a new `CompressionStream` object which compresses a stream of data.\n\n## Syntax\n\n```js\nnew CompressionStream(format)\n```\n\n### Parameters\n\n- `format`\n\n  - : One of the following allowed compression formats:\n\n    - `\"gzip\"`\n    - `\"deflate\"`\n    - `\"deflate-raw\"`\n\n## Exceptions\n\n- `TypeError`\n  - : Thrown if the format passed to the constructor is not supported.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/CompressionStream/prototype/readable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CompressionStream.readable\n\nThe **`readable`** read-only property of the `CompressionStream` interface returns a `ReadableStream`.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/CompressionStream/prototype/writable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CompressionStream.writable\n\nThe **`writable`** read-only property of the `CompressionStream` interface returns a `WritableStream`.\n\n## Value\n\nA `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/CryptoKey/CryptoKey.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CryptoKey\n\nThe **`CryptoKey`** interface represents a cryptographic key obtained from one of the [`SubtleCrypto`](../SubtleCrypto/SubtleCrypto.mdx) method [`importKey()`](../SubtleCrypto/prototype/importKey.mdx).\n\n## Instance properties\n\n- [`type`](./prototype/type.mdx) _**readonly**_\n  - : The type of key the object represents. It may take one of the following values: `\"secret\"`, `\"private\"` or `\"public\"`.\n\n- [`extractable`](./prototype/extractable.mdx) _**readonly**_\n  - : A boolean value indicating whether or not the key may be extracted.\n\n- [`algorithm`](./prototype/algorithm.mdx) _**readonly**_\n  - : An object describing the algorithm for which this key can be used and any associated extra parameters.\n\n- [`usages`](./prototype/usages.mdx) _**readonly**_\n  - : An `Array` of strings, indicating what can be done with the key. Possible values for array elements are `\"encrypt\"`, `\"decrypt\"`, `\"sign\"`, `\"verify\"`, `\"deriveKey\"`, `\"deriveBits\"`, `\"wrapKey\"`, and `\"unwrapKey\"`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/CryptoKey/prototype/algorithm.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# algorithm\n\nThe read-only **`algorithm`** property of the [`CryptoKey`](../CryptoKey.mdx) interface returns an object describing the algorithm for which this key can be used, and any associated extra parameters.\n\nThe object returned depends of the algorithm used to generate the key.\n\n## Value\n\nAn object matching:\n\n- [`RsaHashedImportParams`](../../RsaHashedImportParams/RsaHashedImportParams.mdx) if the algorithm is any of the RSA variants.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/CryptoKey/prototype/extractable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# extractable\n\nThe read-only **`extractable`** property indicates whether or not the key may be extracted.\n\nIf the key cannot be exported, an exception will be thrown if an attempt to extract the key is made.\n\n## Value\n\nA boolean value that is `true` if the key can be exported and `false` if not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/CryptoKey/prototype/type.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# type\n\nThe read-only **`type`** property indicates which kind of key is represented by the object. It can have the following values:\n\n- `\"secret\"`: This key is a secret key for use with a symmetric algorithm.\n- `\"private\"`: This key is the private half of an asymmetric algorithm's key pair.\n- `\"public\"`: This key is the public half of an asymmetric algorithm's key pair.\n\n## Value\n\nOne of the following strings: `\"secret\"`, `\"private\"`, or `\"public\"`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/CryptoKey/prototype/usages.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# usages\n\nThe read-only **`usages`** property indicates what can be done with the key.\n\n## Value\n\nAn `Array` of strings from the following list:\n\n- `\"encrypt\"`: The key may be used to encrypt messages.\n- `\"decrypt\"`: The key may be used to decrypt messages.\n- `\"sign\"`: The key may be used to sign messages.\n- `\"verify\"`: The key may be used to verify signatures.\n- `\"deriveKey\"`: The key may be used in deriving a new key.\n- `\"deriveBits\"`: The key may be used in deriving bits.\n- `\"wrapKey\"`: The key may be used to wrap a key.\n- `\"unwrapKey\"`: The key may be used to unwrap a key.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/DOMException/DOMException.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException()\n\nThe **`DOMException()`** constructor returns a `DOMException` object with a specified message and name.\n\n## Syntax\n\n```js\nnew DOMException()\nnew DOMException(message)\nnew DOMException(message, name)\n```\n\n### Parameters\n\n- `message` _optional_\n  - : A description of the exception. If not present, the empty string `''` is\n    used.\n- `name` _optional_\n  - : A string. If the specified name is a [standard error name](#error-names), then getting the [`code`](./code.mdx) property of the `DOMException` object will return the code number corresponding to the specified name.\n\n### Return value\n\nA newly created `DOMException` object.\n\n## Error names\n\nCommon error names are listed here. Some APIs define their own sets of names, so this is not necessarily a complete list.\n\nNote that the following deprecated historical errors don't have an error name but instead have only a legacy constant code value and a legacy constant name:\n\n- Legacy code value: `2`, legacy constant name: `DOMSTRING_SIZE_ERR`\n- Legacy code value: `6`, legacy constant name: `NO_DATA_ALLOWED_ERR`\n- Legacy code value: `16`, legacy constant name: `VALIDATION_ERR`\n\n> **Note:** Because historically the errors were identified by a numeric value that corresponded with a named variable defined to have that value, some of the entries below indicate the legacy code value and constant name that were used in the past.\n\n- `IndexSizeError`\n  - : The index is not in the allowed range. (Legacy code value: `1` and legacy constant name: `INDEX_SIZE_ERR`)\n- `HierarchyRequestError`\n  - : The node tree hierarchy is not correct. (Legacy code value: `3` and legacy constant name: `HIERARCHY_REQUEST_ERR`)\n- `WrongDocumentError`\n  - : The object is in the wrong `Document`. (Legacy code value: `4` and legacy constant name: `WRONG_DOCUMENT_ERR`)\n- `InvalidCharacterError`\n  - : The string contains invalid characters. (Legacy code value: `5` and legacy constant name: `INVALID_CHARACTER_ERR`)\n- `NoModificationAllowedError`\n  - : The object cannot be modified. (Legacy code value: `7` and legacy constant name: `NO_MODIFICATION_ALLOWED_ERR`)\n- `NotFoundError`\n  - : The object cannot be found here. (Legacy code value: `8` and legacy constant name: `NOT_FOUND_ERR`)\n- `NotSupportedError`\n  - : The operation is not supported. (Legacy code value: `9` and legacy constant name: `NOT_SUPPORTED_ERR`)\n- `InvalidStateError`\n  - : The object is in an invalid state. (Legacy code value: `11` and legacy constant name: `INVALID_STATE_ERR`)\n- `InUseAttributeError`\n  - : The attribute is in use. (Legacy code value: `10` and legacy constant name: `INUSE_ATTRIBUTE_ERR`)\n- `SyntaxError`\n  - : The string did not match the expected pattern. (Legacy code value: `12` and legacy constant name: `SYNTAX_ERR`)\n- `InvalidModificationError`\n  - : The object cannot be modified in this way. (Legacy code value: `13` and legacy constant name: `INVALID_MODIFICATION_ERR`)\n- `NamespaceError`\n  - : The operation is not allowed by Namespaces in XML. (Legacy code value: `14` and legacy constant name: `NAMESPACE_ERR`)\n- `InvalidAccessError`\n  - : The object does not support the operation or argument. (Legacy code value: `15` and legacy constant name: `INVALID_ACCESS_ERR`)\n- `TypeMismatchError` *deprecated*\n  - : The type of the object does not match the expected type. (Legacy code value: `17` and legacy constant name: `TYPE_MISMATCH_ERR`) This value is deprecated; the JavaScript `TypeError` exception is now raised instead of a `DOMException` with this value.\n- `SecurityError`\n  - : The operation is insecure. (Legacy code value: `18` and legacy constant name: `SECURITY_ERR`)\n- `NetworkError`\n  - : A network error occurred. (Legacy code value: `19` and legacy constant name: `NETWORK_ERR`)\n- `AbortError`\n  - : The operation was aborted. (Legacy code value: `20` and legacy constant name: `ABORT_ERR`)\n- `URLMismatchError`\n  - : The given URL does not match another URL. (Legacy code value: `21` and legacy constant name: `URL_MISMATCH_ERR`)\n- `QuotaExceededError`\n  - : The quota has been exceeded. (Legacy code value: `22` and legacy constant name: `QUOTA_EXCEEDED_ERR`)\n- `TimeoutError`\n  - : The operation timed out. (Legacy code value: `23` and legacy constant name: `TIMEOUT_ERR`)\n- `InvalidNodeTypeError`\n  - : The node is incorrect or has an incorrect ancestor for this operation. (Legacy code value: `24` and legacy constant name: `INVALID_NODE_TYPE_ERR`)\n- `DataCloneError`\n  - : The object can not be cloned. (Legacy code value: `25` and legacy constant name: `DATA_CLONE_ERR`)\n- `EncodingError`\n  - : The encoding or decoding operation failed (No legacy code value and constant name).\n- `NotReadableError`\n  - : The input/output read operation failed (No legacy code value and constant name).\n- `UnknownError`\n  - : The operation failed for an unknown transient reason (e.g. out of memory) (No legacy code value and constant name).\n- `ConstraintError`\n  - : A mutation operation in a transaction failed because a constraint was not satisfied (No legacy code value and constant name).\n- `DataError`\n  - : Provided data is inadequate (No legacy code value and constant name).\n- `TransactionInactiveError`\n  - : A request was placed against a transaction that is currently not active or is finished (No legacy code value and constant name).\n- `ReadOnlyError`\n  - : The mutating operation was attempted in a \"readonly\" transaction (No legacy code value and constant name).\n- `VersionError`\n  - : An attempt was made to open a database using a lower version than the existing version (No legacy code value and constant name).\n- `OperationError`\n  - : The operation failed for an operation-specific reason (No legacy code value and constant name).\n- `NotAllowedError`\n  - : The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission (No legacy code value and constant name)."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/DOMException/code.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException.prototype.code\n\nThe **`code`** read-only property of the `DOMException` interface returns one of the legacy [error code constants](./DOMException.mdx#error-names), or `0` if none match.\n\nThis field is used for historical reasons. New DOM exceptions don't use this anymore: they put this info in the [`name`](./name.mdx) attribute.\n\n## Value\n\nOne of the [error code constants](./DOMException.mdx#error-names), or `0` if none match.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/DOMException/message.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException.prototype.message\n\nThe **`message`** read-only property of the `DOMException` interface returns a string representing a message or description associated with the given [error name](./DOMException.mdx#error-names).\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/DOMException/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException.prototype.name\n\nThe **`name`** read-only property of the `DOMException` interface returns a string that contains one of the strings associated with an [error name](./DOMException.mdx#error-names).\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/DataView/DataView.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView()\n\nThe **`DataView()`** constructor is used to create `DataView` objects.\n\n## Syntax\n\n```js\nnew DataView(buffer)\nnew DataView(buffer, byteOffset)\nnew DataView(buffer, byteOffset, byteLength)\n```\n\n> **Note:** `DataView()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `buffer`\n  - : An existing `ArrayBuffer` to use as\n    the storage backing the new `DataView` object.\n- `byteOffset` _**optional**_\n  - : The offset, in bytes, to the first byte in the above buffer for the new view to\n    reference. If unspecified, the buffer view starts with the first byte.\n- `byteLength` _**optional**_\n  - : The number of elements in the byte array. If unspecified, the view's length will\n    match the buffer's length.\n\n### Return value\n\nA new `DataView` object representing the specified data buffer.\n\n### Exceptions\n\n- [`RangeError`](../RangeError/RangeError.mdx)\n\n  - : Thrown if the `byteOffset` or `byteLength` parameter values\n    result in the view extending past the end of the buffer.\n\n    For example, if the buffer is 16 bytes long, the `byteOffset` is 8, and\n    the `byteLength` is 10, this error is thrown because the resulting view\n    tries to extend 2 bytes past the total length of the buffer.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/DataView/prototype/buffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.buffer\n\nThe **`buffer`** accessor property represents the `ArrayBuffer` referenced by the `DataView` at construction time.\n\n## Description\n\nThe `buffer` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when the `DataView` is constructed and cannot be changed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/DataView/prototype/byteLength.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.byteLength\n\nThe **`byteLength`** accessor property represents the length (in bytes) of the dataview.\n\n## Description\n\nThe `byteLength` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when an `DataView` is constructed and cannot be changed. If the `DataView` is not specifying an offset or a `byteLength`, the `byteLength` of the referenced `ArrayBuffer` or `SharedArrayBuffer` will be returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/DataView/prototype/byteOffset.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.byteOffset\n\nThe **`byteOffset`** accessor property represents the offset (in bytes) of this view from the start of its `ArrayBuffer`.\n\n## Description\n\nThe `byteOffset` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when an `DataView` is constructed and cannot be changed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/DataView/prototype/getBigInt64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getBigInt64()\n\nThe **`getBigInt64()`** method gets a signed 64-bit integer\n(long long) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetBigInt64(byteOffset)\ngetBigInt64(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to read the data from.\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is read.\n\n### Return value\n\nA `BigInt`.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would read beyond the end\n    of the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/DataView/prototype/getBigUint64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getBigUint64()\n\nThe **`getBigUint64()`** method gets an unsigned 64-bit integer\n(unsigned long long) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetBigUint64(byteOffset)\ngetBigUint64(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to read the data from.\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is read.\n\n### Return value\n\nA `BigInt`.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would read beyond the end\n    of the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/DataView/prototype/getFloat32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getFloat32()\n\nThe **`getFloat32()`** method gets a signed 32-bit float\n(float) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetFloat32(byteOffset)\ngetFloat32(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 32-bit float number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/DataView/prototype/getFloat64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getFloat64()\n\nThe **`getFloat64()`** method gets a signed 64-bit float\n(double) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetFloat64(byteOffset)\ngetFloat64(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 64-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 64-bit float number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/DataView/prototype/getInt16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getInt16()\n\nThe **`getInt16()`** method gets a signed 16-bit integer\n(short) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetInt16(byteOffset)\ngetInt16(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 16-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/DataView/prototype/getInt32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getInt32()\n\nThe **`getInt32()`** method gets a signed 32-bit integer (long)\nat the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetInt32(byteOffset)\ngetInt32(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in bytes, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 32-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/DataView/prototype/getInt8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getInt8()\n\nThe **`getInt8()`** method gets a signed 8-bit integer (byte)\nat the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetInt8(byteOffset)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n\n### Return value\n\nA signed 8-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/DataView/prototype/getUint16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getUint16()\n\nThe **`getUint16()`** method gets an unsigned 16-bit integer\n(unsigned short) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n\n\n## Syntax\n\n```js\ngetUint16(byteOffset)\ngetUint16(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nAn unsigned 16-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/DataView/prototype/getUint32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getUint32()\n\nThe **`getUint32()`** method gets an unsigned 32-bit integer\n(unsigned long) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n\n\n## Syntax\n\n```js\ngetUint32(byteOffset)\ngetUint32(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nAn unsigned 32-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/DataView/prototype/getUint8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getUint8()\n\nThe **`getUint8()`** method gets an unsigned 8-bit integer\n(unsigned byte) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetUint8(byteOffset)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n\n### Return value\n\nAn unsigned 8-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/DataView/prototype/setBigInt64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setBigInt64()\n\nThe **`setBigInt64()`** method stores a signed 64-bit integer\n(long long) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetBigInt64(byteOffset, value)\nsetBigInt64(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to store the data from.\n- value\n  - : The value to set as a `BigInt`. The highest possible value that fits in\n    a signed 64-bit integer is\n    `2n ** (64n -1n) - 1n` (`9223372036854775807n`). Upon\n    overflow, it will be negative (`-9223372036854775808n`).\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/DataView/prototype/setBigUint64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setBigUint64()\n\nThe **`setBigUint64()`** method stores an unsigned 64-bit\ninteger (unsigned long long) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetBigUint64(byteOffset, value)\nsetBigUint64(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to store the data from.\n- value\n  - : The value to set as a `BigInt`. The highest possible value that fits in\n    an unsigned 64-bit integer is\n    `2n ** 64n - 1n`\n    (`18446744073709551615n`). Upon overflow, it will be zero\n    (`0n`).\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/DataView/prototype/setFloat32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setFloat32()\n\nThe **`setFloat32()`** method stores a signed 32-bit float\n(float) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetFloat32(byteOffset, value)\nsetFloat32(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/DataView/prototype/setFloat64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setFloat64()\n\nThe **`setFloat64()`** method stores a signed 64-bit float\n(double) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetFloat64(byteOffset, value)\nsetFloat64(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 64-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/DataView/prototype/setInt16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setInt16()\n\nThe **`setInt16()`** method stores a signed 16-bit integer\n(short) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetInt16(byteOffset, value)\nsetInt16(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/DataView/prototype/setInt32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setInt32()\n\nThe **`setInt32()`** method stores a signed 32-bit integer\n(long) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetInt32(byteOffset, value)\nsetInt32(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/DataView/prototype/setInt8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setInt8()\n\nThe **`setInt8()`** method stores a signed 8-bit integer (byte)\nvalue at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetInt8(byteOffset, value)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/DataView/prototype/setUint16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setUint16()\n\nThe **`setUint16()`** method stores an unsigned 16-bit integer\n(unsigned short) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetUint16(byteOffset, value)\nsetUint16(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/DataView/prototype/setUint32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setUint32()\n\nThe **`setUint32()`** method stores an unsigned 32-bit integer\n(unsigned long) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetUint32(byteOffset, value)\nsetUint32(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/DataView/prototype/setUint8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setUint8()\n\nThe **`setUint8()`** method stores an unsigned 8-bit integer\n(byte) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetUint8(byteOffset, value)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/Date.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date()\n\nThe **`Date()`** constructor can create a `Date` instance or return a string representing the current time.\n\n## Syntax\n\n```js\nnew Date()\nnew Date(value)\nnew Date(dateString)\nnew Date(dateObject)\n\nnew Date(year, monthIndex)\nnew Date(year, monthIndex, day)\nnew Date(year, monthIndex, day, hours)\nnew Date(year, monthIndex, day, hours, minutes)\nnew Date(year, monthIndex, day, hours, minutes, seconds)\nnew Date(year, monthIndex, day, hours, minutes, seconds, milliseconds)\n\nDate()\n```\n\n> **Note:** `Date()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\nThere are five basic forms for the `Date()` constructor:\n\n#### No parameters\n\nWhen no parameters are provided, the newly-created `Date` object represents the current date and time as of the time of instantiation.\n\n#### Time value or timestamp number\n\n- `value`\n  - : An integer value representing the number of milliseconds since January 1, 1970, 00:00:00 UTC (the ECMAScript epoch, equivalent to the UNIX epoch), with leap seconds ignored. Keep in mind that most [UNIX Timestamp](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_16) functions are only accurate to the nearest second.\n\n#### Date string\n\n- `dateString`\n\n  - : A string value representing a date, in a format recognized by the [`Date.parse()`](./parse.mdx) method. (The ECMA262 spec specifies a [simplified version of ISO 8601](https://tc39.es/ecma262/#sec-date-time-string-format), but other formats can be implementation-defined, which commonly include [IETF-compliant RFC 2822 timestamps](https://datatracker.ietf.org/doc/html/rfc2822#page-14).)\n\n    > **Note:** When parsing date strings with the `Date` constructor (and `Date.parse`, they are equivalent), always make sure that the input conforms to the ISO 8601 format (`YYYY-MM-DDTHH:mm:ss.sssZ`) — the parsing behavior with other formats is implementation-defined and may not work across all browsers. Support for [RFC 2822](https://datatracker.ietf.org/doc/html/rfc2822) format strings is by convention only. A library can help if many different formats are to be accommodated.\n    >\n    > Date-only strings (e.g. `\"1970-01-01\"`) are treated as UTC, while date-time strings (e.g. `\"1970-01-01T12:00\"`) are treated as local. You are therefore also advised to make sure the input format is consistent between the two types.\n\n#### Date object\n\n- `dateObject`\n  - : An existing `Date` object. This effectively makes a copy of the existing `Date` object with the same date and time. This is equivalent to `new Date(dateObject.valueOf())`, except the `valueOf()` method is not called.\n\nWhen one parameter is passed to the `Date()` constructor, `Date` instances are specially treated. All other values are [converted to primitives](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion). If the result is a string, it will be parsed as a date string. Otherwise, the resulting primitive is further coerced to a number and treated as a timestamp.\n\n#### Individual date and time component values\n\nGiven at least a year and month, this form of `Date()` returns a `Date` object whose component values (year, month, day, hour, minute, second, and millisecond) all come from the following parameters. Any missing fields are given the lowest possible value (`1` for `day` and `0` for every other component). The parameter values are all evaluated against the local time zone, rather than UTC.\n\nIf any parameter overflows its defined bounds, it \"carries over\". For example, if a `monthIndex` greater than `11` is passed in, those months will cause the year to increment; if a `minutes` greater than `59` is passed in, `hours` will increment accordingly, etc. Therefore, `new Date(1990, 12, 1)` will return January 1st, 1991; `new Date(2020, 5, 19, 25, 65)` will return 2:05 A.M. June 20th, 2020.\n\nSimilarly, if any parameter underflows, it \"borrows\" from the higher positions. For example, `new Date(2020, 5, 0)` will return May 31st, 2020.\n\n- `year`\n  - : Integer value representing the year. Values from `0` to `99` map to the years `1900` to `1999`. All other values are the actual year. See the [example](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years).\n- `monthIndex`\n  - : Integer value representing the month, beginning with `0` for January to `11` for December.\n- `day` _**optional**_\n  - : Integer value representing the day of the month. The default is `1`.\n- `hours` _**optional**_\n  - : Integer value between `0` and `23` representing the hour of the day. Defaults to `0`.\n- `minutes` _**optional**_\n  - : Integer value representing the minute segment of a time. The default is `0` minutes past the hour.\n- `seconds` _**optional**_\n  - : Integer value representing the second segment of a time. The default is `0` seconds past the minute.\n- `milliseconds` _**optional**_\n  - : Integer value representing the millisecond segment of a time. The default is `0` milliseconds past the second.\n\n### Return value\n\nCalling `new Date()` (the `Date()` constructor) returns a [`Date`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date) object. If called with an invalid date string, or if the date to be constructed will have a UNIX timestamp less than `-8,640,000,000,000,000` or greater than `8,640,000,000,000,000` milliseconds, it returns a `Date` object whose [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toString) method returns the literal string `Invalid Date`.\n\nCalling the `Date()` function (without the `new` keyword) returns a string representation of the current date and time, exactly as `new Date().toString()` does. Any arguments given in a `Date()` function call (without the `new` keyword) are ignored; regardless of whether it's called with an invalid date string — or even called with any arbitrary object or other primitive as an argument — it always returns a string representation of the current date and time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/UTC.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.UTC()\n\nThe **`Date.UTC()`** method accepts parameters similar to the\n`Date` constructor, but treats them as UTC. It returns the number of\nmilliseconds since January 1, 1970, 00:00:00 UTC.\n\n\n\n## Syntax\n\n```js\nDate.UTC(year)\nDate.UTC(year, monthIndex)\nDate.UTC(year, monthIndex, day)\nDate.UTC(year, monthIndex, day, hour)\nDate.UTC(year, monthIndex, day, hour, minute)\nDate.UTC(year, monthIndex, day, hour, minute, second)\nDate.UTC(year, monthIndex, day, hour, minute, second, millisecond)\n```\n\n- `year`\n\n  - : Integer value representing the year.\n\n    Values from `0` to `99` map to the years\n    `1900` to `1999`. All other values are the actual year.\n    See the [example](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years).\n\n- `monthIndex` _**optional**_\n  - : An integer between `0` (January) and `11` (December)\n    representing the month. Since ECMAScript 2017 it defaults to `0` if\n    omitted. _(Up until ECMAScript 2016, `monthIndex` was a required\n    parameter. As of ES2017, it no longer is.)_\n- `day` _**optional**_\n  - : An integer between `1` and `31` representing the day of the\n    month. If omitted, defaults to `1`.\n- `hour` _**optional**_\n  - : An integer between `0` and `23` representing the hours. If\n    omitted, defaults to `0`.\n- `minute` _**optional**_\n  - : An integer between `0` and `59` representing the minutes. If\n    omitted, defaults to `0`.\n- `second` _**optional**_\n  - : An integer between `0` and `59` representing the seconds. If\n    omitted, defaults to `0`.\n- `millisecond` _**optional**_\n  - : An integer between `0` and `999` representing the\n    milliseconds. If omitted, defaults to `0`.\n\n### Return value\n\nA number representing the number of milliseconds for the given date since January 1,\n1970, 00:00:00, UTC.\n\n## Description\n\n`UTC()` takes comma-delimited date and time parameters and returns the\nnumber of milliseconds between January 1, 1970, 00:00:00, universal time and the\nspecified date and time.\n\nYears between `0` and `99` are converted to a year in the\n20th century `(1900 + year)`. For example, `95` is\nconverted to the year `1995`.\n\nThe `UTC()` method differs from the `Date` constructor in two\nways:\n\n1. `Date.UTC()` uses universal time instead of the local time.\n2. `Date.UTC()` returns a time value as a number instead of creating a\n   `Date` object.\n\nIf a parameter is outside of the expected range, the `UTC()` method updates\nthe other parameters to accommodate the value. For example, if `15` is used\nfor `monthIndex`, the year will be incremented by 1\n`(year + 1)` and `3` will be used for the month.\n\n`UTC()` is a static method of `Date`, so it's called as\n`Date.UTC()` rather than as a method of a `Date` instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/now.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.now()\n\nThe static **`Date.now()`** method returns the number of milliseconds elapsed since the [epoch](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps), which is defined as the midnight at the beginning of January 1, 1970, UTC.\n\n## Syntax\n\n```js\nDate.now()\n```\n\n### Return value\n\nA number representing the number of milliseconds elapsed since the [epoch](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps), which is defined as the midnight at the beginning of January 1, 1970, UTC.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/parse.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.parse()\n\nThe **`Date.parse()`** method parses a string representation of\na date, and returns the number of milliseconds since January 1, 1970, 00:00:00 UTC or\n`NaN` if the string is unrecognized or, in some cases, contains illegal date\nvalues (e.g. 2015-02-31).\n\nOnly the [ISO 8601 format](https://tc39.es/ecma262/#sec-date-time-string-format) (`YYYY-MM-DDTHH:mm:ss.sssZ`) is explicitly specified to be supported. Other formats are implementation-defined and may not work across all browsers. A library can help if many different formats are to be accommodated.\n\n## Syntax\n\n```js\nDate.parse(dateString)\n```\n\n### Parameters\n\n- `dateString`\n  - : A string representing [a simplification of the ISO 8601 calendar date extended format](#date-time-string-format).\n    (Other formats may be used, but results are implementation-dependent.)\n\n### Return value\n\nA number representing the milliseconds elapsed since January 1, 1970, 00:00:00 UTC and\nthe date obtained by parsing the given string representation of a date. If the argument\ndoesn't represent a valid date, [`NaN`](../NaN.mdx) is returned.\n\n## Description\n\nThe `parse()` method takes a date string (such as\n`\"2011-10-10T14:48:00\"`) and returns the number of milliseconds since January\n1, 1970, 00:00:00 UTC.\n\nThis function is useful for setting date values based on string values, for example in\nconjunction with the [`setTime()`](./prototype/setTime.mdx) method and the\n`Date` object.\n\n### Date Time String Format\n\nThe standard string representation of a date time string is a simplification of the ISO\n8601 calendar date extended format.\n(See the section [Date Time String Format](https://tc39.es/ecma262/#sec-date-time-string-format)\nin the ECMAScript specification for more details.)\n\nFor example, `\"2011-10-10\"` (_date-only_ form),\n`\"2011-10-10T14:48:00\"` (_date-time_ form), or\n`\"2011-10-10T14:48:00.000+09:00\"` (_date-time_ form with milliseconds\nand time zone) can be passed and will be parsed. When the time zone offset is absent,\ndate-only forms are interpreted as a UTC time and date-time forms are interpreted as\nlocal time.\n\nWhile time zone specifiers are used during date string parsing to interpret the\nargument, the value returned is always the number of milliseconds between January 1,\n1970 00:00:00 UTC and the point in time represented by the argument or `NaN`.\n\nBecause `parse()` is a static method of `Date`, it is called as\n`Date.parse()` rather than as a method of a `Date` instance.\n\n### Fall-back to implementation-specific date formats\n\n> **Note:** This section contains implementation-specific behavior that can be inconsistent\n> across implementations.\n\nThe ECMAScript specification states: If the String does not conform to the standard\nformat the function may fall back to any implementation–specific heuristics or\nimplementation–specific parsing algorithm. Unrecognizable strings or dates containing\nillegal element values in ISO formatted strings shall cause `Date.parse()` to\nreturn [`NaN`](../NaN.mdx).\n\nHowever, invalid values in date strings not recognized as simplified ISO format as\ndefined by ECMA-262 may or may not result in [`NaN`](../NaN.mdx), depending on the browser\nand values provided, e.g.:\n\n```js\n// Non-ISO string with invalid date values\nnew Date(\"23/25/2014\");\n```\n\nwill be treated as a local date of 25 November, 2015 in Firefox 30 and an invalid date\nin Safari 7.\n\nHowever, if the string is recognized as an ISO format string and it contains invalid\nvalues, it will return [`NaN`](../NaN.mdx):\n\n```js\n// ISO string with invalid values\nnew Date(\"2014-25-23\").toISOString();\n// throws \"RangeError: invalid date\"\n```\n\nSpiderMonkey's implementation-specific heuristic can be found in [`jsdate.cpp`](https://searchfox.org/mozilla-central/source/js/src/jsdate.cpp?rev=64553c483cd1#889).\nThe string `\"10 06 2014\"` is an example of a non-conforming ISO format and\nthus falls back to a custom routine. See also this [rough outline](https://bugzilla.mozilla.org/show_bug.cgi?id=1023155#c6) on\nhow the parsing works.\n\n```js\nnew Date(\"10 06 2014\");\n```\n\nwill be treated as a local date of 6 October, 2014, and not 10 June, 2014.\n\nOther examples:\n\n```js\nnew Date(\"foo-bar 2014\").toString();\n// returns: \"Invalid Date\"\n\nDate.parse(\"foo-bar 2014\");\n// returns: NaN\n```\n\n### Differences in assumed time zone\n\n> **Note:** This section contains implementation-specific behavior that can be inconsistent\n> across implementations.\n\nGiven a non-standard date string of `\"March 7, 2014\"`, `parse()` assumes a local time zone, but given a simplification of the ISO 8601 calendar date extended format such as `\"2014-03-07\"`, it will assume a time zone of UTC. Therefore `Date` objects produced using those strings may represent different moments in time depending on the version of ECMAScript supported unless the system is set with a local time zone of UTC. This means that two date strings that appear equivalent may result in two different values depending on the format of the string that is being converted.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/@@toPrimitive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype\\[Symbol.toPrimitive]\n\nThe **`[Symbol.toPrimitive]()`** method converts a `Date`\nobject to a primitive value.\n\n## Syntax\n\n```js\nDate()[Symbol.toPrimitive](hint)\n```\n\n### Return value\n\nThe primitive value of the given `Date` object. Depending on the argument,\nthe method can return either a string or a number.\n\n## Description\n\nThe `[Symbol.toPrimitive]()` method of the `Date` object returns a\nprimitive value, that is either of type number or of type string.\n\nIf `hint` is `string` or `default`,\n`[Symbol.toPrimitive]()` tries to call the [`toString`](../../Object/prototype/toString.mdx) method. If the `toString` property does not exist, it tries to\ncall the [`valueOf`](../../Object/prototype/valueOf.mdx) method and if the\n`valueOf` does not exist either, `[Symbol.toPrimitive]()` throws a\n[`TypeError`](../../../globals/TypeError/TypeError.mdx).\n\nIf `hint` is `number`, `[Symbol.toPrimitive]()` first tries\nto call `valueOf`, and if that fails, it calls `toString`.\n\nJavaScript calls the `[Symbol.toPrimitive]()` method to convert an object to a\nprimitive value. You rarely need to invoke the `[Symbol.toPrimitive]()` method\nyourself; JavaScript automatically invokes it when encountering an object where a\nprimitive value is expected.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/getDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getDate()\n\nThe **`getDate()`** method returns the day of the month for the\nspecified date according to local time.\n\n## Syntax\n\n```js\ngetDate()\n```\n\n### Return value\n\nAn integer number, between 1 and 31, representing the day of the month for the given\ndate according to local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/getDay.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getDay()\n\nThe **`getDay()`** method returns the\nday of the week for the specified date according to local time, where 0 represents\nSunday. For the day of the month, see [`Date.prototype.getDate()`](./getDate.mdx).\n\n## Syntax\n\n```js\ngetDay()\n```\n\n### Return value\n\nAn integer number, between 0 and 6, corresponding to the day of the week for the given\ndate, according to local time: 0 for Sunday, 1 for Monday, 2 for Tuesday, and so on.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/getFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getFullYear()\n\nThe **`getFullYear()`** method returns the year of the\nspecified date according to local time.\n\nUse this method instead of the [`Date.prototype.getYear()`](./getYear.mdx) method.\n\n## Syntax\n\n```js\ngetFullYear()\n```\n\n### Return value\n\nA number corresponding to the year of the given date, according to local time.\n\n## Description\n\nThe value returned by `getFullYear()` is an absolute number. For dates\nbetween the years 1000 and 9999, `getFullYear()` returns a four-digit number,\nfor example, 1995. Use this function to make sure a year is compliant with years after\n2000\\.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/getHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getHours()\n\nThe **`getHours()`** method returns the hour for the specified\ndate, according to local time.\n\n## Syntax\n\n```js\ngetHours()\n```\n\n### Return value\n\nAn integer number, between 0 and 23, representing the hour for the given date according\nto local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/getMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getMilliseconds()\n\nThe **`getMilliseconds()`** method returns the milliseconds in\nthe specified date according to local time.\n\n## Syntax\n\n```js\ngetMilliseconds()\n```\n\n### Return value\n\nA number, between 0 and 999, representing the milliseconds for the given date according\nto local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/getMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getMinutes()\n\nThe **`getMinutes()`** method returns the minutes in the\nspecified date according to local time.\n\n## Syntax\n\n```js\ngetMinutes()\n```\n\n### Return value\n\nAn integer number, between 0 and 59, representing the minutes in the given date\naccording to local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/getMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getMonth()\n\nThe **`getMonth()`** method returns the month in the specified\ndate according to local time, as a zero-based value (where zero indicates the first\nmonth of the year).\n\n## Syntax\n\n```js\ngetMonth()\n```\n\n### Return value\n\nAn integer number, between 0 and 11, representing the month in the given date according\nto local time. 0 corresponds to January, 1 to February, and so on.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/getSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getSeconds()\n\nThe **`getSeconds()`** method returns the seconds in the\nspecified date according to local time.\n\n## Syntax\n\n```js\ngetSeconds()\n```\n\n### Return value\n\nAn integer number, between 0 and 59, representing the seconds in the given date\naccording to local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/getTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getTime()\n\nThe **`getTime()`** method returns the number of milliseconds since the [epoch](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps), which is defined as the midnight at the beginning of January 1, 1970, UTC.\n\nYou can use this method to help assign a date and time to another `Date`\nobject. This method is functionally equivalent to the [`Date.prototype.valueOf()`](./valueOf.mdx) method.\n\n## Syntax\n\n```js\ngetTime()\n```\n\n### Return value\n\nA number representing the milliseconds elapsed between 1 January 1970 00:00:00 UTC and\nthe given date.\n\n## Description\n\nTo offer protection against timing attacks and fingerprinting, the precision of\n`new Date().getTime()` might get rounded depending on browser settings.\n\n```js\n// reduced time precision (2ms) in Firefox 60\nnew Date().getTime();\n// 1519211809934\n// 1519211810362\n// 1519211811670\n// …\n\n// reduced time precision with `privacy.resistFingerprinting` enabled\nnew Date().getTime();\n// 1519129853500\n// 1519129858900\n// 1519129864400\n// …\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/getTimezoneOffset.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getTimezoneOffset()\n\nThe **`getTimezoneOffset()`** method returns the difference, in minutes, between a date as evaluated in the UTC time zone, and the same date as evaluated in the local time zone.\n\n## Syntax\n\n```js\ngetTimezoneOffset()\n```\n\n### Return value\n\nThe difference, in minutes, between the date as evaluated in the UTC time zone and as evaluated in the local time zone. The actual local time algorithm is implementation-defined, and the return value is allowed to be zero in runtimes without appropriate data.\n\n## Description\n\n`date.getTimezoneOffset()` returns the difference, in minutes, between `date` as evaluated in the UTC time zone and as evaluated in the local time zone — that is, the time zone of the host system in which the browser is being used (if the code is run from the Web in a browser), or otherwise the host system of whatever JavaScript runtime (for example, a Node.js environment) the code is executed in.\n\n### Negative values and positive values\n\nThe number of minutes returned by `getTimezoneOffset()` is positive if the local time zone is behind UTC, and negative if the local time zone is ahead of UTC. For example, for UTC+10, `-600` will be returned.\n\n| Current time zone | Return value |\n| ----------------- | ------------ |\n| UTC-8             | 480          |\n| UTC               | 0            |\n| UTC+3             | -180         |\n\n### Varied results in Daylight Saving Time (DST) regions\n\nIn a region that annually shifts in and out of Daylight Saving Time (DST), as `date` varies, the number of minutes returned by calling `getTimezoneOffset()` can be non-uniform.\n\n> **Note:** `getTimezoneOffset()`'s behavior will never differ based on the time when the code is run — its behavior is always consistent when running in the same region. Only the value of `date` affects the result.\n\nIn most implementations, the [IANA time zone database](https://en.wikipedia.org/wiki/Daylight_saving_time#IANA_time_zone_database) (tzdata) is used to precisely determine the offset of the local timezone at the moment of the `date`. However, if such information is unavailable, an implementation may return zero.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/getUTCDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCDate()\n\nThe **`getUTCDate()`** method returns the day of the month (from\n1 to 31) in the specified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCDate()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer number ranging from 1 to 31\nrepresenting day of month for the given date, according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/getUTCDay.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCDay()\n\nThe **`getUTCDay()`** method returns the day of the week in the\nspecified date according to universal time, where 0 represents Sunday.\n\n## Syntax\n\n```js\ngetUTCDay()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer number corresponding to the day\nof the week for the given date, according to universal time: 0 for Sunday, 1 for Monday,\n2 for Tuesday, and so on.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/getUTCFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCFullYear()\n\nThe **`getUTCFullYear()`** method returns the year in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCFullYear()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer representing the year in the given date\naccording to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n\n## Description\n\nThe value returned by `getUTCFullYear()` is an absolute number that is\ncompliant with year-2000, for example, 1995.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/getUTCHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCHours()\n\nThe **`getUTCHours()`** method returns the hours in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCHours()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 23, representing the hours in the given date according\nto Coordinated Universal Time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/getUTCMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCMilliseconds()\n\nThe **`getUTCMilliseconds()`** method returns the milliseconds\nportion of the time object's value according to universal time.\n\n## Syntax\n\n```js\ngetUTCMilliseconds()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 999, representing\nthe milliseconds portion of the given `Date` object according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n\nNot to be confused with Unix epoch time. To get the total milliseconds since 1970/01/01,\nuse the [`getTime()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/getTime) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/getUTCMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCMinutes()\n\nThe **`getUTCMinutes()`** method returns the minutes in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCMinutes()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 59,\nrepresenting the minutes in the given date according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/getUTCMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCMonth()\n\nThe **`getUTCMonth()`** returns the month of the specified date\naccording to universal time, as a zero-based value (where zero indicates the first month\nof the year).\n\n## Syntax\n\n```js\ngetUTCMonth()\n```\n\n### Return value\n\nA number. If the `Date` object represents a valid date, an integer number, between 0 and 11,\ncorresponding to the month of the given date according to universal time. 0 for January,\n1 for February, 2 for March, and so on. Otherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/getUTCSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCSeconds()\n\nThe **`getUTCSeconds()`** method returns the seconds in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCSeconds()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 59, representing\nthe seconds in the given date according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/getYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getYear()\n\nThe **`getYear()`** method returns the year in the specified\ndate according to local time. Because `getYear()` does not return full years\n(\"year 2000 problem\"), it is no longer used and has been replaced by the\n[`Date.prototype.getFullYear()`](./getFullYear.mdx) method.\n\n## Syntax\n\n```js\ngetYear()\n```\n\n### Return value\n\nA number representing the year of the given date, according to local time, minus 1900.\n\n## Description\n\n- For years greater than or equal to 2000, the value returned by\n  `getYear()` is 100 or greater. For example, if the year is 2026,\n  `getYear()` returns 126.\n- For years between and including 1900 and 1999, the value returned by\n  `getYear()` is between 0 and 99. For example, if the year is 1976,\n  `getYear()` returns 76.\n- For years less than 1900, the value returned by `getYear()` is less than 0. For example, if the year is 1800, `getYear()` returns -100.\n\nTo take into account years before and after 2000, you should use\n[`Date.prototype.getFullYear()`](./getFullYear.mdx) instead of\n`getYear()` so that the year is specified in full.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/setDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setDate()\n\nThe **`setDate()`** method changes the day of the month of a given `Date` instance, based on local time.\n\nTo instead change the day of the month for a given `Date` instance based on UTC time, use the [`Date.prototype.setUTCDate()`](./setUTCDate.mdx) method.\n\n## Syntax\n\n```js\nsetDate(dayValue)\n```\n\n### Parameters\n\n- `dayValue`\n  - : An integer representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the given date (the\n`Date` object is also changed in place).\n\n## Description\n\nIf the `dayValue` is outside of the range of date values for the month, `setDate()` will update the `Date` object accordingly.\n\nFor example, if 0 is provided for `dayValue`, the date will be set to the last day of the previous month. If you use 40 for `dayValue`, and the month stored in the `Date` object is June, the day will be changed to 10 and the month will be incremented to July.\n\nIf a negative number is provided for `dayValue`, the date will be set counting backwards from the last day of the previous month. -1 would result in the date being set to 1 day before the last day of the previous month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/setFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setFullYear()\n\nThe **`setFullYear()`** method sets the full year for a\nspecified date according to local time. Returns new timestamp.\n\n## Syntax\n\n```js\nsetFullYear(yearValue)\nsetFullYear(yearValue, monthValue)\nsetFullYear(yearValue, monthValue, dateValue)\n```\n\n### Parameters\n\n- `yearValue`\n  - : An integer specifying the numeric value of the year, for example, 1995.\n- `monthValue`\n  - : Optional. An integer between 0 and 11 representing the months January through\n    December.\n- `dateValue`\n  - : Optional. An integer between 1 and 31 representing the day of the month. If you\n    specify the `dateValue` parameter, you must also specify the\n    `monthValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `monthValue` and\n`dateValue` parameters, the values returned from the\n[`Date.prototype.getMonth()`](./getMonth.mdx) and\n[`Date.prototype.getDate()`](./getDate.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range, `setFullYear()`\nattempts to update the other parameters and the date information in the\n`Date` object accordingly. For example, if you specify 15 for\n`monthValue`, the year is incremented by 1\n(`yearValue + 1`), and 3 is used for the month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/setHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setHours()\n\nThe **`setHours()`** method sets the hours for a specified date\naccording to local time, and returns the number of milliseconds since January 1, 1970\n00:00:00 UTC until the time represented by the updated `Date` instance.\n\n## Syntax\n\n```js\nsetHours(hoursValue)\nsetHours(hoursValue, minutesValue)\nsetHours(hoursValue, minutesValue, secondsValue)\nsetHours(hoursValue, minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `hoursValue`\n  - : Ideally, an integer between 0 and 23, representing the hour. If a value greater than\n    23 is provided, the datetime will be incremented by the extra hours.\n- `minutesValue`\n  - : Optional. Ideally, an integer between 0 and 59, representing the minutes. If a value\n    greater than 59 is provided, the datetime will be incremented by the extra minutes.\n- `secondsValue`\n  - : Optional. Ideally, an integer between 0 and 59, representing the seconds. If a value\n    greater than 59 is provided, the datetime will be incremented by the extra seconds. If\n    you specify the `secondsValue` parameter, you must also specify\n    the `minutesValue`.\n- `msValue`\n  - : Optional. Ideally, a number between 0 and 999, representing the milliseconds. If a\n    value greater than 999 is provided, the datetime will be incremented by the extra\n    milliseconds. If you specify the `msValue` parameter, you must\n    also specify the `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between January 1, 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `minutesValue`,\n`secondsValue`, and `msValue` parameters,\nthe values returned from the [`Date.prototype.getMinutes()`](./getMinutes.mdx),\n[`Date.prototype.getSeconds()`](./getSeconds.mdx), and\n[`Date.prototype.getMilliseconds()`](./getMilliseconds.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range, `setHours()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes will\nbe incremented by 1 (`minutesValue + 1`), and 40 will be used for\nseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/setMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setMilliseconds()\n\nThe **`setMilliseconds()`** method sets the milliseconds for a\nspecified date according to local time.\n\n## Syntax\n\n```js\nsetMilliseconds(millisecondsValue)\n```\n\n### Parameters\n\n- `millisecondsValue`\n  - : A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you specify a number outside the expected range, the date information in the\n`Date` object is updated accordingly. For example, if you specify 1005, the\nnumber of seconds is incremented by 1, and 5 is used for the milliseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/setMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setMinutes()\n\nThe **`setMinutes()`** method sets the minutes for a specified\ndate according to local time.\n\n## Syntax\n\n```js\nsetMinutes(minutesValue)\nsetMinutes(minutesValue, secondsValue)\nsetMinutes(minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `minutesValue`\n  - : An integer between 0 and 59, representing the minutes.\n- `secondsValue`\n  - : Optional. An integer between 0 and 59, representing the seconds. If you specify the\n    `secondsValue` parameter, you must also specify the\n    `minutesValue`.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds. If you specify\n    the `msValue` parameter, you must also specify the\n    `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `secondsValue` and\n`msValue` parameters, the values returned from\n[`Date.prototype.getSeconds()`](./getSeconds.mdx) and\n[`Date.prototype.getMilliseconds()`](./getMilliseconds.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range, `setMinutes()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes will\nbe incremented by 1 (`minutesValue + 1`), and 40 will be used for\nseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/setMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setMonth()\n\nThe **`setMonth()`** method sets the month for a specified date according to the currently set year.\n\n## Syntax\n\n```js\nsetMonth(monthValue)\nsetMonth(monthValue, dayValue)\n```\n\n### Parameters\n\n- `monthValue`\n  - : A zero-based integer representing the month of the year offset from the start of the\n    year. So, 0 represents January, 11 represents December, -1 represents December of the\n    previous year, and 12 represents January of the following year.\n- `dayValue`\n  - : Optional. An integer from 1 to 31, representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `dayValue` parameter, the value\nreturned from the [`Date.prototype.getDate()`](./getDate.mdx) method is used.\n\nIf a parameter you specify is outside of the expected range, `setMonth()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 15 for `monthValue`, the year will be\nincremented by 1, and 3 will be used for month.\n\nThe current day of month will have an impact on the behavior of this method.\nConceptually it will add the number of days given by the current day of the month to the\n1st day of the new month specified as the parameter, to return the new date.\nFor example, if the current value is 31st January 2016, calling setMonth with a value of 1 will return 2nd March 2016.\nThis is because in 2016 February had 29 days.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/setSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setSeconds()\n\nThe **`setSeconds()`** method sets the seconds for a specified\ndate according to local time.\n\n## Syntax\n\n```js\nsetSeconds(secondsValue)\nsetSeconds(secondsValue, msValue)\n```\n\n### Parameters\n\n- `secondsValue`\n  - : An integer between 0 and 59, representing the seconds.\n- `msValue` _**optional**_\n  - : Optional. A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `msValue` parameter, the value returned\nfrom the [`Date.prototype.getMilliseconds()`](./getMilliseconds.mdx) method is\nused.\n\nIf a parameter you specify is outside of the expected range, `setSeconds()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes stored\nin the `Date` object will be incremented by 1, and 40 will be used for\nseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/setTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setTime()\n\nThe **`setTime()`** method sets the `Date` object\nto the time represented by a number of milliseconds since January 1, 1970, 00:00:00 UTC.\n\n## Syntax\n\n```js\nsetTime(timeValue)\n```\n\n### Parameters\n\n- `timeValue`\n  - : An integer representing the number of milliseconds since 1 January 1970, 00:00:00\n    UTC.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date\n(effectively, the value of the argument).\n\n## Description\n\nUse the `setTime()` method to help assign a date and time to another\n`Date` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/setUTCDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCDate()\n\nThe **`setUTCDate()`** method changes the day of the month of a given `Date` instance, based on UTC time.\n\nTo instead change the day of the month for a given `Date` instance based on local time, use the [`Date.prototype.setDate()`](././setDate.mdx) method.\n\n## Syntax\n\n```js\nsetUTCDate(dayValue)\n```\n\n### Parameters\n\n- `dayValue`\n  - : An integer from 1 to 31, representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf the `dayValue` is outside of the range of date values for the month, `setDate()` will update the `Date` object accordingly.\n\nFor example, if 0 is provided for `dayValue`, the date will be set to the last day of the previous month. If you use 40 for `dayValue`, and the month stored in the `Date` object is June, the day will be changed to 10 and the month will be incremented to July.\n\nIf a negative number is provided for `dayValue`, the date will be set counting backwards from the last day of the previous month. -1 would result in the date being set to 1 day before the last day of the previous month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/setUTCFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCFullYear()\n\nThe **`setUTCFullYear()`** method sets the full year for a\nspecified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCFullYear(yearValue)\nsetUTCFullYear(yearValue, monthValue)\nsetUTCFullYear(yearValue, monthValue, dayValue)\n```\n\n### Parameters\n\n- `yearValue`\n  - : An integer specifying the numeric value of the year, for example, 1995.\n- `monthValue`\n  - : Optional. An integer between 0 and 11 representing the months January through\n    December.\n- `dayValue`\n  - : Optional. An integer between 1 and 31 representing the day of the month. If you\n    specify the `dayValue` parameter, you must also specify the\n    `monthValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `monthValue` and\n`dayValue` parameters, the values returned from the\n[`Date.prototype.getUTCMonth()`](./getUTCMonth.mdx) and\n[`Date.prototype.getUTCDate()`](./getUTCDate.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range,\n`setUTCFullYear()` attempts to update the other parameters and the date\ninformation in the `Date` object accordingly. For example, if you specify 15\nfor `monthValue`, the year is incremented by 1\n(`yearValue + 1`), and 3 is used for the month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/setUTCHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCHours()\n\nThe **`setUTCHours()`** method sets the hour for a specified\ndate according to universal time, and returns the number of milliseconds since January\n1, 1970 00:00:00 UTC until the time represented by the updated `Date`\ninstance.\n\n## Syntax\n\n```js\nsetUTCHours(hoursValue)\nsetUTCHours(hoursValue, minutesValue)\nsetUTCHours(hoursValue, minutesValue, secondsValue)\nsetUTCHours(hoursValue, minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `hoursValue`\n  - : An integer between 0 and 23, representing the hour.\n- `minutesValue`\n  - : Optional. An integer between 0 and 59, representing the minutes.\n- `secondsValue`\n  - : Optional. An integer between 0 and 59, representing the seconds. If you specify the\n    `secondsValue` parameter, you must also specify the\n    `minutesValue`.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds. If you specify\n    the `msValue` parameter, you must also specify the\n    `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between January 1, 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `minutesValue`,\n`secondsValue`, and `msValue` parameters,\nthe values returned from the [`Date.prototype.getUTCMinutes()`](./getUTCMinutes.mdx), [`Date.prototype.getUTCSeconds()`](./getUTCSeconds.mdx),\nand [`Date.prototype.getUTCMilliseconds()`](./getUTCMilliseconds.mdx) methods\nare used.\n\nIf a parameter you specify is outside of the expected range, `setUTCHours()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes will\nbe incremented by 1 (`minutesValue + 1`), and 40 will be used for seconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/setUTCMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCMilliseconds()\n\nThe **`setUTCMilliseconds()`** method sets the milliseconds for\na specified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCMilliseconds(millisecondsValue)\n```\n\n### Parameters\n\n- `millisecondsValue`\n  - : A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf a parameter you specify is outside of the expected range,\n`setUTCMilliseconds()` attempts to update the date information in the\n`Date` object accordingly. For example, if you use 1100 for\n`millisecondsValue`, the seconds stored in the `Date`\nobject will be incremented by 1, and 100 will be used for milliseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/setUTCMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCMinutes()\n\nThe **`setUTCMinutes()`** method sets the minutes for a\nspecified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCMinutes(minutesValue)\nsetUTCMinutes(minutesValue, secondsValue)\nsetUTCMinutes(minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `minutesValue`\n  - : An integer between 0 and 59, representing the minutes.\n- `secondsValue`\n  - : Optional. An integer between 0 and 59, representing the seconds. If you specify the\n    `secondsValue` parameter, you must also specify the\n    `minutesValue`.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds. If you specify\n    the `msValue` parameter, you must also specify the\n    `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `secondsValue` and\n`msValue` parameters, the values returned from\n[`Date.prototype.getUTCSeconds()`](./getUTCSeconds.mdx) and\n[`Date.prototype.getUTCMilliseconds()`](./getUTCMilliseconds.mdx) methods are\nused.\n\nIf a parameter you specify is outside of the expected range,\n`setUTCMinutes()` attempts to update the date information in the\n`Date` object accordingly. For example, if you use 100 for\n`secondsValue`, the minutes will be incremented by 1\n(`minutesValue + 1`), and 40 will be used for seconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/setUTCMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCMonth()\n\nThe **`setUTCMonth()`** method sets the month for a specified\ndate according to universal time.\n\n## Syntax\n\n```js\nsetUTCMonth(monthValue)\nsetUTCMonth(monthValue, dayValue)\n```\n\n### Parameters\n\n- `monthValue`\n  - : An integer between 0 and 11, representing the months January through December.\n- `dayValue`\n  - : Optional. An integer from 1 to 31, representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `dayValue` parameter, the value returned from the\n[`Date.prototype.getUTCDate()`](./getUTCDate.mdx) method is used.\n\nIf a parameter you specify is outside of the expected range, `setUTCMonth()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 15 for `monthValue`, the year will be incremented by\n1, and 3 will be used for month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/setUTCSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCSeconds()\n\nThe **`setUTCSeconds()`** method sets the seconds for a\nspecified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCSeconds(secondsValue)\nsetUTCSeconds(secondsValue, msValue)\n```\n\n### Parameters\n\n- `secondsValue`\n  - : An integer between 0 and 59, representing the seconds.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `msValue` parameter, the value returned from the\n[`Date.prototype.getUTCMilliseconds()`](./getUTCMilliseconds.mdx) method is\nused.\n\nIf a parameter you specify is outside of the expected range,\n`setUTCSeconds()` attempts to update the date information in the\n`Date` object accordingly. For example, if you use 100 for\n`secondsValue`, the minutes stored in the `Date` object will be\nincremented by 1, and 40 will be used for seconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/setYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setYear()\n\nThe legacy **`setYear()`** method sets the year for a specified date according to local time.\n\nHowever, the way the legacy `setYear()` method sets year values is different from how the preferred [`Date.prototype.setFullYear()`](./setFullYear.mdx) method sets year values — and in some cases, also different from how `new Date()` and [`Date.parse()`](../parse.mdx) set year values. Specifically, given two-digit numbers, such as `22` and `61`:\n\n- `setYear()` interprets any two-digit number as an offset to `1900`; so `date.setYear(22)` results in the year value being set to `1922`, and `date.setYear(61)` results in the year value being set to `1961`. (In contrast, while `new Date(61, 1)` also results in the year value being set to `1961`, `new Date(\"2/1/22\")` results in the year value being set to `2022`; and similarly for [`Date.parse()`](../parse.mdx)).\n\n- [`Date.prototype.setFullYear()`](./setFullYear.mdx) does no special interpretation but instead uses the literal two-digit value as-is to set the year; so `date.setFullYear(61)` results in the year value being set to `0061`, and `date.setFullYear(22)` results in the year value being set to `0022`.\n\nBecause of those differences in behavior, you should no longer use the legacy `setYear()` method, but should instead use the preferred [`Date.prototype.setFullYear()`](./setFullYear.mdx) method.\n\n## Syntax\n\n```js\nsetYear(yearValue)\n```\n\n### Parameters\n\n- `yearValue`\n  - : An integer.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf `yearValue` is a number between 0 and 99 (inclusive), then the year for\n`dateObj` is set to `1900 + yearValue`. Otherwise, the year for\n`dateObj` is set to `yearValue`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/toDateString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toDateString()\n\nThe **`toDateString()`** method returns the date portion of a `Date` object interpreted in the local timezone in English.\n\n## Syntax\n\n```js\ntoDateString()\n```\n\n### Return value\n\nA string representing the date portion of the given `Date` object in human readable form in English.\n\n## Description\n\n`Date` instances refer to a specific point in time. `toDateString()` interprets the date in the local timezone and formats the _date_ part in English. It always uses the following format, separated by spaces:\n\n1. First three letters of the week day name\n2. First three letters of the month name\n3. Two-digit day of the month, padded on the left a zero if necessary\n4. Four-digit year (at least), padded on the left with zeros if necessary. May have a negative sign\n\nFor example: \"Thu Jan 01 1970\".\n\n- If you want to get the _time_ part, use [`toTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString).\n- If you want to get both the date and time, use [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toString).\n- If you want to make the date interpreted as UTC instead of local timezone, use [`toUTCString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString).\n- If you want to format the date in a more user-friendly format (e.g. localization), use [`toLocaleDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/toISOString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toISOString()\n\nThe **`toISOString()`** method returns a string in _simplified_ extended ISO format ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)), which is always 24 or 27 characters long (`YYYY-MM-DDTHH:mm:ss.sssZ` or `±YYYYYY-MM-DDTHH:mm:ss.sssZ`, respectively). The timezone is always zero UTC offset, as denoted by the suffix `Z`.\n\n## Syntax\n\n```js\ntoISOString()\n```\n\n### Return value\n\nA string representing the given date in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format according to universal time. It's the same format as the one required to be recognized by [`Date.parse()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/parse#date-time-string-format).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/toJSON.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toJSON()\n\nThe **`toJSON()`** method returns a string representation of\nthe `Date` object.\n\n## Syntax\n\n```js\ntoJSON()\n```\n\n### Return value\n\nA string representation of the given date.\n\n## Description\n\n`Date` instances refer to a specific point in time. `toJSON()` calls the object's [`Date.prototype.toISOString()`](./toISOString.mdx) method, which returns a string representing the `Date` object's value. This method is generally intended to, by default, usefully serialize `Date` objects during [JSON](https://developer.mozilla.org/docs/Glossary/JSON) serialization, which can then be deserialized using the [`Date()` constructor](../Date.mdx) or [`Date.parse()`](../parse.mdx) as the reviver of [`JSON.parse()`](../../JSON/parse.mdx).\n\nThe method first attempts to convert its `this` value [to a primitive](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion) by calling its [`[Symbol.toPrimitive]()`](../../Symbol/toPrimitive.mdx) (with `\"number\"` as hint), [`valueOf()`](../../Object/prototype/valueOf.mdx), and [`toString()`](../../Object/prototype/toString.mdx) methods, in that order. If the result is a [non-finite](../../Number/isFinite.mdx) number, `null` is returned. (This generally corresponds to an invalid date, whose [`valueOf()`](./valueOf.mdx) returns [`NaN`](../../NaN.mdx).) Otherwise, if the converted primitive is not a number or is a finite number, the return value of `this.toISOString()` is returned.\n\nNote that the method does not check whether the `this` value is a valid `Date` object. However, calling `Date.prototype.toJSON()` on non-`Date` objects does not have well-defined semantics.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/toLocaleDateString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toLocaleDateString()\n\nThe **`toLocaleDateString()`** method returns a string with a language-sensitive representation of the date portion of the specified date in the user agent's timezone. In implementations with [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) support, this method simply calls `Intl.DateTimeFormat`.\n\n## Syntax\n\n```js\ntoLocaleDateString()\ntoLocaleDateString(locales)\ntoLocaleDateString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat), these parameters correspond exactly to the [`Intl.DateTimeFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) constructor's parameters. Implementations without `Intl.DateTimeFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales) parameter of the `Intl.DateTimeFormat()` constructor.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options) parameter of the `Intl.DateTimeFormat()` constructor. The `timeStyle` option must be undefined, or a [`TypeError`](../../../globals/TypeError/TypeError.mdx) would be thrown. If `weekday`, `year`, `month`, and `day` are all undefined, then `year`, `month`, and `day` will be set to `\"numeric\"`.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored.\n\nSee the [`Intl.DateTimeFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string representing the date portion of the given `Date` instance according to language-specific conventions.\n\nIn implementations with `Intl.DateTimeFormat`, this is equivalent to `new Intl.DateTimeFormat(locales, options).format(date)`, where `options` has been normalized as described above.\n\n## Performance\n\nWhen formatting large numbers of dates, it is better to create an [`Intl.DateTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) object and use its [`format()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/format) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string with a language-sensitive representation of this date. In implementations with [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) support, this method simply calls `Intl.DateTimeFormat`.\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat), these parameters correspond exactly to the [`Intl.DateTimeFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) constructor's parameters. Implementations without `Intl.DateTimeFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales) parameter of the `Intl.DateTimeFormat()` constructor.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options) parameter of the `Intl.DateTimeFormat()` constructor. If `weekday`, `year`, `month`, `day`, `dayPeriod`, `hour`, `minute`, `second`, and `fractionalSecondDigits` are all undefined, then `year`, `month`, `day`, `hour`, `minute`, `second` will be set to `\"numeric\"`.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored.\n\nSee the [`Intl.DateTimeFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string representing the given date according to language-specific conventions.\n\nIn implementations with `Intl.DateTimeFormat`, this is equivalent to `new Intl.DateTimeFormat(locales, options).format(date)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/toLocaleTimeString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toLocaleTimeString()\n\nThe **`toLocaleTimeString()`** method returns a string with a language-sensitive representation of the time portion of the date. In implementations with [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) support, this method simply calls `Intl.DateTimeFormat`.\n\n## Syntax\n\n```js\ntoLocaleTimeString()\ntoLocaleTimeString(locales)\ntoLocaleTimeString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat), these parameters correspond exactly to the [`Intl.DateTimeFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) constructor's parameters. Implementations without `Intl.DateTimeFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales) parameter of the `Intl.DateTimeFormat()` constructor.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options) parameter of the `Intl.DateTimeFormat()` constructor. If `dayPeriod`, `hour`, `minute`, `second`, and `fractionalSecondDigits` are all undefined, then `hour`, `minute`, `second` will be set to `\"numeric\"`.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored.\n\nSee the [`Intl.DateTimeFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string representing the time portion of the given `Date` instance according to language-specific conventions.\n\nIn implementations with `Intl.DateTimeFormat`, this is equivalent to `new Intl.DateTimeFormat(locales, options).format(date)`, where `options` has been normalized as described above.\n\n## Performance\n\nWhen formatting large numbers of dates, it is better to create an [`Intl.DateTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) object and use its [`format()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/format) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified `Date` object interpreted in the local timezone.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the given date.\n\n## Description\n\nThe `Date` object overrides the `toString()` method of `Object`. `Date.prototype.toString()` returns a string representation of the Date as interpreted in the local timezone, containing both the date and the time — it joins the string representation specified in [`toDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString) and [`toTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString) together, adding a space in between.\n\nFor example: \"Thu Jan 01 1970 04:42:04 GMT+0000 (Coordinated Universal Time)\"\n\nThe `toString()` method is automatically called when a date is coerced to a string, such as `const today = 'Today is ' + new Date()`.\n\n`Date.prototype.toString()` must be called on `Date` instances. If the `this` value does not inherit from `Date.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n- If you only want to get the _date_ part, use [`toDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString).\n- If you only want to get the _time_ part, use [`toTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString).\n- If you want to make the date interpreted as UTC instead of local timezone, use [`toUTCString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString).\n- If you want to format the date in a more user-friendly format (e.g. localization), use [`toLocaleString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/toTimeString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toTimeString()\n\nThe **`toTimeString()`** method returns the time portion of a `Date` object interpreted in the local timezone in English.\n\n## Syntax\n\n```js\ntoTimeString()\n```\n\n### Return value\n\nA string representing the time portion of the given date in human readable form in English.\n\n## Description\n\n`Date` instances refer to a specific point in time. `toTimeString()` interprets the date in the local timezone and formats the _time_ part in English. It always uses the format of `hh:mm:ss GMT±xxxx (TZ)`, where:\n\n| Format String | Description                                                                                           |\n| ------------- | ----------------------------------------------------------------------------------------------------- |\n| `hh`          | Hour, as two digits with leading zero if required                                                     |\n| `mm`          | Minute, as two digits with leading zero if required                                                   |\n| `ss`          | Seconds, as two digits with leading zero if required                                                  |\n| `±xxxx`       | The local timezone's offset — two digits for hours and two digits for minutes (e.g. `-0500`, `+0800`) |\n| `TZ`          | The timezone's name (e.g. `PDT`, `PST`)                                                               |\n\nFor example: \"04:42:04 GMT+0000 (Coordinated Universal Time)\".\n\n- If you want to get the _date_ part, use [`toDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString).\n- If you want to get both the date and time, use [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toString).\n- If you want to make the date interpreted as UTC instead of local timezone, use [`toUTCString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString).\n- If you want to format the date in a more user-friendly format (e.g. localization), use [`toLocaleTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleTimeString).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/toUTCString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toUTCString()\n\nThe **`toUTCString()`** method converts a date to a string, interpreting it in the UTC time zone. `toGMTString()` is an alias of this method.\n\nBased on [rfc7231](https://datatracker.ietf.org/doc/html/rfc7231#section-7.1.1.1) and modified according to [ECMA-262 toUTCString](https://tc39.es/ecma262/#sec-date.prototype.toutcstring), it can have negative values.\n\n## Syntax\n\n```js\ntoUTCString()\n```\n\n### Return value\n\nA string representing the given date using the UTC time zone.\n\n## Description\n\nThe value returned by `toUTCString()` is a string in the form `Www, dd Mmm yyyy hh:mm:ss GMT`, where:\n\n| Format String | Description                                                  |\n| ------------- | ------------------------------------------------------------ |\n| `Www`         | Day of week, as three letters (e.g. `Sun`, `Mon`)            |\n| `dd`          | Day of month, as two digits with leading zero if required    |\n| `Mmm`         | Month, as three letters (e.g. `Jan`, `Feb`)                  |\n| `yyyy`        | Year, as four or more digits with leading zeroes if required |\n| `hh`          | Hour, as two digits with leading zero if required            |\n| `mm`          | Minute, as two digits with leading zero if required          |\n| `ss`          | Seconds, as two digits with leading zero if required         |\n\n### Aliasing\n\nJavaScript's `Date` API was inspired by Java's `java.util.Date` library (while the latter had become de facto legacy since Java 1.1 in 1997). In particular, the Java `Date` class had a method called `toGMTString` — which was poorly named, because the [Greenwich Mean Time](https://en.wikipedia.org/wiki/Greenwich_Mean_Time) is not equivalent to the [Coordinated Universal Time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time), while JavaScript dates always operate by UTC time. For web compatibility reasons, `toGMTString` remains as an alias to `toUTCString`, and they refer to the exact same function object. This means:\n\n```js\nDate.prototype.toGMTString.name === \"toUTCString\";\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Date/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a\n`Date` object.\n\n\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the given date, or [`NaN`](../../NaN.mdx) in case of an invalid date.\n\n## Description\n\nThe `valueOf()` method returns the primitive value of a `Date`\nobject as a number data type, the number of milliseconds since midnight 01 January, 1970\nUTC.\n\nThis method is functionally equivalent to the [`Date.prototype.getTime()`](./getTime.mdx)\nmethod.\n\nThis method is usually called internally by JavaScript and not explicitly in code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/DecompressionStream/DecompressionStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DecompressionStream()\n\nThe **`DecompressionStream()`** constructor creates a new `DecompressionStream` object which decompresses a stream of data.\n\n## Syntax\n\n```js\nnew DecompressionStream(format)\n```\n\n### Parameters\n\n- `format`\n\n  - : One of the following compression formats:\n\n    - `\"gzip\"`\n    - `\"deflate\"`\n    - `\"deflate-raw\"`\n\n## Exceptions\n\n- `TypeError`\n  - : Thrown if the format passed to the constructor is not supported.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/DecompressionStream/prototype/readable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DecompressionStream.readable\n\nThe **`readable`** read-only property of the `DecompressionStream` interface returns a `ReadableStream`.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/DecompressionStream/prototype/writable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DecompressionStream.writable\n\nThe **`writable`** read-only property of the `DecompressionStream` interface returns a `WritableStream`.\n\n## Value\n\nA `WritableStream`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/EcKeyImportParams/EcKeyImportParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# EcKeyImportParams\n\nThe **`EcKeyImportParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.importKey()`, when generating any elliptic-curve-based key pair: that is, when the algorithm is identified as ECDSA.\n\n## Instance properties\n\n- `name`\n  - : A string. This should be set to `ECDSA`.\n- `namedCurve`\n\n  - : A string representing the name of the elliptic curve to use. This may be any of the following names for [NIST](https://www.nist.gov/)-approved curves:\n\n    - `P-256`\n    - `P-384`\n    - `P-521`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/EcdsaParams/EcdsaParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# EcdsaParams\n\nThe **`EcdsaParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.sign()` or `SubtleCrypto.verify()` when using the ECDSA algorithm.\n\n## Instance properties\n\n- `name`\n    - : A string. This should be set to `ECDSA`.\n- `hash`\n\n    - : A string. An identifier for the digest algorithm to use. This should be one of the following:\n\n        - `SHA-256`: selects the SHA-256 algorithm.\n        - `SHA-384`: selects the SHA-384 algorithm.\n        - `SHA-512`: selects the SHA-512 algorithm.\n\n        > **Warning:** `SHA-1` is also supported here but the SHA-1 algorithm is considered vulnerable and should no longer be used.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Error/Error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error\n\nThe **`Error()`** constructor creates an error object.\n\n## Syntax\n\n```js\nnew Error()\nnew Error(message)\nnew Error(message, options)\nnew Error(message, fileName)\nnew Error(message, fileName, lineNumber)\n\nError()\nError(message)\nError(message, options)\nError(message, fileName)\nError(message, fileName, lineNumber)\n```\n\n> **Note:** `Error()` can be called with or without `new`. Both create a new `Error` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : A human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A value indicating the specific cause of the error, reflected in the [`Error.prototype.cause`](./prototype/cause.mdx) property. When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Error/prototype/cause.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.cause\n\nThe **`cause`** data property of an [`Error`](../../../globals/Error/Error.mdx) instance indicates the specific original cause of the error.\n\nIt is used when catching and re-throwing an error with a more-specific or useful error message in order to still have access to the original error.\n\n## Value\n\nThe value that was passed to the [`Error`](../Error.mdx) constructor in the `options.cause` argument. It may not be present.\n\n## Description\n\nThe value of `cause` can be of any type. You should not make assumptions that the error you caught has an `Error` as its `cause`, in the same way that you cannot be sure the variable bound in the `catch` statement is an `Error` either. The \"Providing structured data as the error cause\" example below shows a case where a non-error is deliberately provided as the cause.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Error/prototype/message.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.message\n\nThe **`message`** data property of an [`Error`](../Error.mdx) instance is a human-readable description of the error.\n\n## Value\n\nA string corresponding to the value passed to the [`Error`](../Error.mdx) constructor as the first argument.\n\n## Description\n\nThis property contains a brief description of the error if one is available or has been set. The `message` property combined with the [`name`](./name.mdx) property is used by the [`Error.prototype.toString()`](./toString.mdx) method to create a string representation of the Error.\n\nBy default, the `message` property is an empty string, but this behavior can be overridden for an instance by specifying a message as the first argument to the [`Error`](../Error.mdx) constructor.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Error/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.name\n\nThe **`name`** data property of `Error.prototype` is shared by all [`Error`](../Error.mdx) instances. It represents the name for the type of error. For `Error.prototype.name`, the initial value is `\"Error\"`. Subclasses like [`TypeError`](../../../globals/TypeError/TypeError.mdx) and [`SyntaxError`](../../SyntaxError/SyntaxError.mdx) provide their own `name` properties.\n\n## Value\n\nA string. For `Error.prototype.name`, the initial value is `\"Error\"`.\n\n## Description\n\nBy default, [`Error`](../Error.mdx) instances are given the name \"Error\". The `name` property, in addition to the [`message`](./message.mdx) property, is used by the [`Error.prototype.toString()`](./toString.mdx) method to create a string representation of the error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Error/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.toString()\n\nThe **`toString()`** method returns a string representing the\nspecified [`Error`](../Error.mdx) object.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified [`Error`](../Error.mdx) object.\n\n## Description\n\nThe [`Error`](../Error.mdx) object overrides the [`Object.prototype.toString()`](../../Object/prototype/toString.mdx)\nmethod inherited by all objects. \n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/EvalError/EvalError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# EvalError\n\nThe **`EvalError()`** constructor creates a new `EvalError` instance.\n\n## Syntax\n\n```js\nnew EvalError()\nnew EvalError(message)\nnew EvalError(message, options)\nnew EvalError(message, fileName)\nnew EvalError(message, fileName, lineNumber)\n\nEvalError()\nEvalError(message)\nEvalError(message, options)\nEvalError(message, fileName)\nEvalError(message, fileName, lineNumber)\n```\n\n> **Note:** `EvalError()` can be called with or without `new`. Both create a new `EvalError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/FetchEvent/FetchEvent.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent\n\nThis is the event type for `fetch` events. It contains information about the fetch, including the request and how the receiver will treat the response. \nIt provides the [`event.respondWith()`](./prototype/respondWith.mdx) method, which allows us to provide a response to this fetch.\n\n## Instance properties\n\n- `FetchEvent.request` _**readonly**_\n    - : The `Request` that was received by the application.\n- `FetchEvent.client` _**readonly**_\n    - : Information about the downstream client that made the request.\n        While these fields are always defined on Compute, they may be *null* when not available in testing environments\n        such as Viceroy.\n    - `FetchEvent.client.address` _**readonly**_\n        - : A string representation of the IPv4 or IPv6 address of the downstream client.\n    - `FetchEvent.client.geo` _**readonly**_\n        - : Either `null`, or a [geolocation dictionary](../../fastly:geolocation/getGeolocationForIpAddress.mdx) corresponding to the IP address of the downstream client.\n    - `FetchEvent.client.tlsJA3MD5` _**readonly**_\n        - : Either `null` or a string representation of the JA3 hash of the TLS ClientHello message.\n    - `FetchEvent.client.tlsCipherOpensslName` _**readonly**_\n        - : Either `null` or a string representation of the cipher suite used to secure the client TLS connection.\n    - `FetchEvent.client.tlsProtocol` _**readonly**_\n        - : Either `null` or a string representation of the TLS protocol version used to secure the client TLS connection.\n    - `FetchEvent.client.tlsClientCertificate` _**readonly**_\n        - : Either `null` or an ArrayBuffer containing the raw client certificate in the mutual TLS handshake message. It is in PEM format. Returns an empty ArrayBuffer if this is not mTLS or available.\n    - `FetchEvent.client.tlsClientHello` _**readonly**_\n        - : Either `null` or an ArrayBuffer containing the raw bytes sent by the client in the TLS ClientHello message.\n    - `FetchEvent.client.tlsJA4` _**readonly**_\n        - : Either `null` or a string representation of the JA4 fingerprint of the TLS ClientHello message.\n    - `FetchEvent.client.h2Fingerprint` _**readonly**_\n        - : Either `null` or a string representation of the HTTP/2 fingerprint for HTTP/2 connections. Returns `null` for HTTP/1.1 connections.\n    - `FetchEvent.client.ohFingerprint` _**readonly**_\n        - : Either `null` or a string representation of the Original Header fingerprint based on the order and presence of request headers.\n- `FetchEvent.server` _**readonly**_\n    - : Information about the server receiving the request for the Fastly Compute service.\n    - `FetchEvent.server.address` _**readonly**_\n        - : A string representation of the IPv4 or IPv6 address of the server which received the request.\n\n## Instance methods\n\n- [`FetchEvent.respondWith()`](./prototype/respondWith.mdx)\n    - : Provide (a promise for) a response for this request.\n- [`FetchEvent.sendEarlyHints()`](./prototype/sendEarlyHints.mdx)\n    - : Send a [103 Early Hints](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/103) response for this request.\n- [`FetchEvent.waitUntil()`](./prototype/waitUntil.mdx)\n    - : Extends the lifetime of the event. Used to notify the host environment of tasks that extend beyond the returning of a response, such as streaming and caching.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/FetchEvent/prototype/respondWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent.respondWith()\n\nThe **`respondWith()`** method allows you to provide a promise for a [`Response`](../../Response/Response.mdx) to send back to the client which made the incoming request to your application.\n\n## Syntax\n\n```js\nrespondWith(response)\n```\n\n### Parameters\n\n- `response`\n  - : A [`Response`](../../Response/Response.mdx) or a [`Promise`](../../Promise/Promise.mdx) that resolves to a\n    [`Response`](../../Response/Response.mdx). Otherwise, a network error is returned to Fetch.\n\n### Return value\n\nAlways returns `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/FetchEvent/prototype/sendEarlyHints.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent.sendEarlyHints()\n\nThe **`sendEarlyHints()`** method allows you to send a [103 Early Hints](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/103) response back to the client which made the incoming request to your application.\n\n## Syntax\n\n```js\nsendEarlyHints(headers)\n```\n\n### Parameters\n\n- `headers`\n  - : Any headers you want to add to your response, contained\n        within a [`Headers`](../../Headers/Headers.mdx) object or object literal of\n        [`String`](../../String/String.mdx) key/value pairs.\n\n### Return value\n\nAlways returns `undefined`.\n\n### Examples\n\n```js\nevent.sendEarlyHints({ link: '</style.css>; rel=preload; as=style' });\n\nevent.sendEarlyHints([\n        ['link', '</style.css>; rel=preload; as=style'],\n        ['link', '</style2.css>; rel=preload; as=style']\n    ]);\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/FetchEvent/prototype/waitUntil.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent.waitUntil()\n\n\nThe **`waitUntil()`** method tells the host environment that work is ongoing until the promise settles, and it shouldn't terminate\nthe application if it wants that work to complete.\n\nThe `waitUntil()` method must be initially called synchronously within the event callback,\nbut after that it can be called multiple times, and will hold the process open until all the promises passed to it\nsettle.\n\n## Syntax\n\n```js\nwaitUntil(promise)\n```\n\n### Parameters\n\nA [`Promise`](../../Promise/Promise.mdx).\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/FinalizationRegistry/FinalizationRegistry.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FinalizationRegistry()\n\nThe **`FinalizationRegistry`** constructor creates a `FinalizationRegistry` object that uses the given callback.\n\n## Syntax\n\n```js\n// Arrow callback function\nnew FinalizationRegistry((heldValue) => { /* … */ })\n\n// Callback function\nnew FinalizationRegistry(callbackFn)\n\n// Inline callback function\nnew FinalizationRegistry(function(heldValue) { /* … */ })\n```\n\n> **Note:** `FinalizationRegistry()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `callback`\n  - : The callback function this registry should use.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/FinalizationRegistry/prototype/register.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FinalizationRegistry.prototype.register()\n\nThe `register()` method registers an object with a\n`FinalizationRegistry` instance so that if the object is garbage-collected,\nthe registry's callback may get called.\n\n## Syntax\n\n```js\nregister(target, heldValue)\nregister(target, heldValue, unregisterToken)\n```\n\n### Parameters\n\n- `target`\n  - : The target object to register.\n- `heldValue`\n  - : The value to pass to the finalizer for this object. This cannot be the `target` object but can be anything else, including functions and primitives.\n- `unregisterToken` _**optional**_\n  - : A token that may be used with the `unregister` method later to unregister\n    the target object. If provided (and not `undefined`), this must be an\n    object. If not provided, the target cannot be unregistered.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown when one of the following condition is met:\n    - `target` is not an object (object as opposed to primitives; functions are objects as well)\n    - `target` is the same as `heldvalue` (`target === heldValue`)\n    - `unregisterToken` is not an object\n\n## Description\n\nSee the [Avoid where possible](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry#avoid_where_possible)\nand [Notes on cleanup callbacks](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry#notes_on_cleanup_callbacks)\nsections of the `FinalizationRegistry` page for important caveats.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/FinalizationRegistry/prototype/unregister.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FinalizationRegistry.prototype.unregister()\n\nThe `unregister()` method unregisters a target object from a\n`FinalizationRegistry` instance.\n\n## Syntax\n\n```js\nunregister(unregisterToken)\n```\n\n### Parameters\n\n- `unregisterToken`\n  - : The token used with the [`FinalizationRegistry.prototype.register`](./register.mdx) method when registering the target object. Multiple cells registered with the same `unregisterToken` will be unregistered together.\n\n### Return value\n\nA boolean value that is `true` if at least one cell was unregistered and `false` if no cell was unregistered.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown when `unregisterToken` is not an object.\n\n## Description\n\nWhen a target object has been reclaimed, it is no longer registered in the registry.\nThere is no need to call `unregister` in your cleanup callback. Only call\n`unregister` if you haven't received a cleanup callback and no longer need\nto receive one.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Float32Array/Float32Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Float32Array()\n\nThe **`Float32Array()`** typed array constructor creates a new\n`Float32Array` object, which is, an array of 32-bit floating point numbers\n(corresponding to the C `float` data type) in the platform byte order. If\ncontrol over byte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are\ninitialized to `0`. Once established, you can reference elements in the array\nusing the object's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Float32Array()\nnew Float32Array(length)\nnew Float32Array(typedArray)\nnew Float32Array(object)\n\nnew Float32Array(buffer)\nnew Float32Array(buffer, byteOffset)\nnew Float32Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Float32Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Float64Array/Float64Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Float64Array()\n\nThe **`Float64Array()`** typed array constructor creates a new\n`Float64Array` object, which is, an array of 64-bit floating point numbers\n(corresponding to the C `double` data type) in the platform byte order. If\ncontrol over byte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are\ninitialized to `0`. Once established, you can reference elements in the array\nusing the object's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Float64Array()\nnew Float64Array(length)\nnew Float64Array(typedArray)\nnew Float64Array(object)\n\nnew Float64Array(buffer)\nnew Float64Array(buffer, byteOffset)\nnew Float64Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Float64Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/FormData/FormData.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData()\n\nThe **`FormData()`** constructor creates a new `FormData` object.\n\n## Syntax\n\n```js\nnew FormData()\nnew FormData(form)\n```\n\n> **Note:** `FormData()` can only be constructed with `new`. Attempting to call it without `new` throws a `TypeError`.\n\n### Parameters\n\n- `form` _**optional**_\n  - : An HTML `<form>` element — when specified, the `FormData` object will be populated with the form's current key/value pairs using the name property of each element for the keys and their submitted value for the values. File input elements are handled specially: their values are taken from the files selected by the user in the upload control.\n\n### Return value\n\nA new `FormData` object, pre-populated with form data if the optional `form` parameter was provided.\n\n## Description\n\nThe `FormData` interface provides a way to construct a set of key/value pairs representing form fields and their values, which can be sent using methods such as `fetch()`. It uses the same format a form would use if the encoding type were set to `\"multipart/form-data\"`.\n\nYou can also append additional data to the `FormData` object after it's created using its various methods.\n\nA `FormData` object can be used in a number of ways with other APIs:\n\n1. It can be sent with the `fetch()` API\n2. It works seamlessly with the `Request` and `Response` objects - it can be used directly as the body of a `Request` object\n3. It can be obtained from a `Response` object using the `formData()` method\n4. It can be passed directly to the `URLSearchParams` constructor\n\nThe transmitted data is in the same format that the form's `submit()` method would use to send the data if the form's encoding type were set to `\"multipart/form-data\"`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/FormData/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.append()\n\nThe **`append()`** method of the `FormData` interface appends a new value onto an existing key inside a `FormData` object, or adds the key if it does not already exist.\n\n## Syntax\n\n```js\nappend(name, value)\nappend(name, value, filename)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the field whose data is contained in `value`.\n- `value`\n  - : The value of the field. This can be a string or a `Blob` (including subclasses such as `File`). If none of these, the value is converted to a string.\n- `filename` _**optional**_\n  - : The filename reported to the server when a `Blob` or `File` is passed as the second parameter. The default filename for `Blob` objects is \"blob\". The default filename for `File` objects is the file's filename.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/FormData/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.delete()\n\nThe **`delete()`** method of the `FormData` interface removes all key/value pairs with the given name from the `FormData` object.\n\n## Syntax\n\n```js\ndelete(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the key you want to delete.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/FormData/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.entries()\n\nThe **`entries()`** method of the `FormData` interface returns an iterator allowing iteration through all key/value pairs contained in this object. The iterator yields a new array for each key/value pair, with the first element being the key and the second element being the value.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nAn `iterator`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/FormData/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.forEach()\n\nThe **`forEach()`** method of the `FormData` interface executes the provided callback function once for each key/value pair in the `FormData` object.\n\n## Syntax\n\n```js\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n  - : A function to execute for each entry in the object. The function will be passed the following arguments:\n    - `value`\n      - : The value of the current entry.\n    - `key`\n      - : The key of the current entry.\n    - `formData`\n      - : The `FormData` object being traversed.\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/FormData/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.get()\n\nThe **`get()`** method of the `FormData` interface returns the first value associated with a given key from within a `FormData` object. If you expect multiple values and want all of them, use the [`getAll()`](../../../globals/FormData/prototype/getAll.mdx) method instead.\n\n## Syntax\n\n```js\nget(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the key you want to retrieve.\n\n### Return value\n\nA `FormDataEntryValue` containing the value. If the key does not exist, it returns `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/FormData/prototype/getAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.getAll()\n\nThe **`getAll()`** method of the `FormData` interface returns all the values associated with a given key from within a `FormData` object.\n\n## Syntax\n\n```js\ngetAll(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the key you want to retrieve.\n\n### Return value\n\nAn array of `FormDataEntryValue` items containing all values with the given key. If the key doesn't exist, an empty array is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/FormData/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.has()\n\nThe **`has()`** method of the `FormData` interface returns a boolean indicating whether a `FormData` object contains a key/value pair with the given name.\n\n## Syntax\n\n```js\nhas(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the key you want to test for existence.\n\n### Return value\n\n`true` if a key/value pair with the specified name exists; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/FormData/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.keys()\n\nThe **`keys()`** method of the `FormData` interface returns an iterator allowing iteration through all keys contained in this object. The iterator yields the key for each value.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nAn `iterator`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/FormData/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.set()\n\nThe **`set()`** method of the `FormData` interface sets a new value for an existing key inside a `FormData` object, or adds the key/value if it does not already exist.\n\nThe difference between `set()` and [`append()`](../../../globals/FormData/prototype/append.mdx) is that if the specified key already exists, `set()` overwrites all existing values with the new one, whereas `append()` appends the new value onto the end of the existing values.\n\n## Syntax\n\n```js\nset(name, value)\nset(name, value, filename)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the field whose data is contained in `value`.\n- `value`\n  - : The value of the field. This can be a string or a `Blob` (including subclasses such as `File`). If none of these, the value is converted to a string.\n- `filename` _**optional**_\n  - : The filename reported to the server when a `Blob` or `File` is passed as the second parameter. The default filename for `Blob` objects is \"blob\". The default filename for `File` objects is the file's filename.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/FormData/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.values()\n\nThe **`values()`** method of the `FormData` interface returns an iterator allowing iteration through all values contained in this object. The iterator yields the value for each key/value pair.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nAn `iterator`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Function/Function.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function()\n\nThe **`Function()`** constructor creates a new [`Function`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function) object. Calling the constructor directly can create functions dynamically, but suffers from security and similar (but far less significant) performance issues as `eval()`. However, unlike `eval` (which may have access to the local scope), the `Function` constructor creates functions which execute in the global scope only.\n\n\n\n## Syntax\n\n```js\nnew Function(functionBody)\nnew Function(arg0, functionBody)\nnew Function(arg0, arg1, functionBody)\nnew Function(arg0, arg1, /* … ,*/ argN, functionBody)\n\nFunction(functionBody)\nFunction(arg0, functionBody)\nFunction(arg0, arg1, functionBody)\nFunction(arg0, arg1, /* … ,*/ argN, functionBody)\n```\n\n> **Note:** `Function()` can be called with or without `new`. Both create a new `Function` instance.\n\n### Parameters\n\n- `argN` _**optional**_\n\n  - : Names to be used by the function as formal argument names. Each must be a string that corresponds to a valid JavaScript parameter (any of plain [identifier](https://developer.mozilla.org/docs/Glossary/Identifier), [rest parameter](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/rest_parameters), or [destructured](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment) parameter, optionally with a [default](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/Default_parameters)), or a list of such strings separated with commas.\n\n    As the parameters are parsed in the same way as function expressions, whitespace and comments are accepted. For example: `\"x\", \"theValue = 42\", \"[a, b] /* numbers */\"` — or `\"x, theValue = 42, [a, b] /* numbers */\"`. (`\"x, theValue = 42\", \"[a, b]\"` is also correct, though very confusing to read.)\n\n- `functionBody`\n  - : A string containing the JavaScript statements comprising the function definition.\n\n## Description\n\n`Function` objects created with the `Function` constructor are parsed when the function is created. This is less efficient than creating a function with a [function expression](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/function) or [function declaration](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function) and calling it within your code, because such functions are parsed with the rest of the code.\n\nAll arguments passed to the function, except the last, are treated as the names of the identifiers of the parameters in the function to be created, in the order in which they are passed. The function will be dynamically compiled as a function expression, with the source assembled in the following fashion:\n\n```js\n`function anonymous(${args.join(\",\")}\n) {\n${functionBody}\n}`\n```\n\nThis is observable by calling the function's [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/toString) method.\n\nHowever, unlike normal [function expressions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/function), the name `anonymous` is not added to the `functionBody`'s scope, since `functionBody` only has access the global scope. If `functionBody` is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode) (the body itself needs to have the `\"use strict\"` directive since it doesn't inherit the strictness from the context), you may use [`arguments.callee`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/arguments/callee) to refer to the function itself. Alternatively, you can define the recursive part as an inner function:\n\n```js\nconst recursiveFn = new Function(\"count\", `\n(function recursiveFn(count) {\n  if (count < 0) {\n    return;\n  }\n  console.log(count);\n  recursiveFn(count - 1);\n})(count);\n`);\n```\n\nNote that the two dynamic parts of the assembled source — the parameters list `args.join(\",\")` and `functionBody` — will first be parsed separately to ensure they are each syntactically valid. This prevents injection-like attempts.\n\n```js\nnew Function(\"/*\", \"*/) {\");\n// SyntaxError: Unexpected end of arg string\n// Doesn't become \"function anonymous(/*) {*/) {}\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Function/prototype/apply.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.apply()\n\nThe **`apply()`** method calls the specified function with a given `this` value, and `arguments` provided as an array (or an [array-like object](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects)).\n\n\n\n## Syntax\n\n```js\napply(thisArg)\napply(thisArg, argsArray)\n```\n\n### Parameters\n\n- `thisArg`\n  - : The value of `this` provided for the call to `func`. If the function is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) will be replaced with the global object, and primitive values will be converted to objects.\n- `argsArray` _**optional**_\n  - : An array-like object, specifying the arguments with which `func` should be called, or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../../globals/undefined.mdx) if no arguments should be provided to the function.\n\n### Return value\n\nThe result of calling the function with the specified `this` value and arguments.\n\n## Description\n\n> **Note:** This function is almost identical to [`Function.prototype.call()`](../../../globals/Function/prototype/call.mdx), except that `call()` accepts an **argument list**, while `apply()` accepts a **single array of arguments** — for example, `func.apply(this, ['eat', 'bananas'])` vs. `func.call(this, 'eat', 'bananas')`.\n\nNormally, when calling a function, the value of [`this`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this) inside the function is the object that the function was accessed on. With `apply()`, you can assign an arbitrary value as `this` when calling an existing function, without first attaching the function to the object as a property. This allows you to use methods of one object as generic utility functions.\n\n> **Warning:** Do not use `apply()` to chain constructors (for example, to implement inheritance). This invokes the constructor function as a plain function, which means [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target) is `undefined`, and classes throw an error because they can't be called without `new`. Use [`Reflect.construct()`](../../../globals/Reflect/construct.mdx) or [`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Function/prototype/bind.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.bind()\n\nThe **`bind()`** method creates a new function that, when called, has its `this` keyword set to the provided value, with a given sequence of arguments preceding any provided when the new function is called.\n\n\n\n## Syntax\n\n```js\nbind(thisArg)\nbind(thisArg, arg1)\nbind(thisArg, arg1, arg2)\nbind(thisArg, arg1, arg2, /* …, */ argN)\n```\n\n### Parameters\n\n- `thisArg`\n  - : The value to be passed as the `this` parameter to the target function `func` when the bound function is called. If the function is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) will be replaced with the global object, and primitive values will be converted to objects. The value is ignored if the bound function is constructed using the `new` operator.\n- `arg1, …, argN` _**optional**_\n  - : Arguments to prepend to arguments provided to the bound function when invoking `func`.\n\n### Return value\n\nA copy of the given function with the specified `this` value, and initial arguments (if provided).\n\n## Description\n\nThe `bind()` function creates a new _bound function_. Calling the bound function generally results in the execution of the function it wraps, which is also called the _target function_. The bound function will store the parameters passed — which include the value of `this` and the first few arguments — as its internal state. These values are stored in advance, instead of being passed at call time. You can generally see `const boundFn = fn.bind(thisArg, arg1, arg2)` as being equivalent to `const boundFn = (...restArgs) => fn.call(thisArg, arg1, arg2, ...restArgs)` for the effect when it's called (but not when `boundFn` is constructed).\n\nA bound function can be further bound by calling `boundFn.bind(thisArg, /* more args */)`, which creates another bound function `boundFn2`. The newly bound `thisArg` value is ignored, because the target function of `boundFn2`, which is `boundFn`, already has a bound `this`. When `boundFn2` is called, it would call `boundFn`, which in turn calls `fn`. The arguments that `fn` ultimately receives are, in order: the arguments bound by `boundFn`, arguments bound by `boundFn2`, and the arguments received by `boundFn2`.\n\n```js\n\"use strict\"; // prevent `this` from being boxed into the wrapper object\n\nfunction log(...args) {\n  console.log(this, ...args);\n}\nconst boundLog = log.bind(\"this value\", 1, 2);\nconst boundLog2 = boundLog.bind(\"new this value\", 3, 4);\nboundLog2(5, 6); // \"this value\", 1, 2, 3, 4, 5, 6\n```\n\nA bound function may also be constructed using the `new` operator if its target function is constructable. Doing so acts as though the target function had instead been constructed. The prepended arguments are provided to the target function as usual, while the provided `this` value is ignored (because construction prepares its own `this`, as seen by the parameters of [`Reflect.construct`](../../../globals/Reflect/construct.mdx)). If the bound function is directly constructed, [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target) will be the target function instead. (That is, the bound function is transparent to `new.target`.)\n\n```js\nclass Base {\n  constructor(...args) {\n    console.log(new.target === Base);\n    console.log(args);\n  }\n}\n\nconst BoundBase = Base.bind(null, 1, 2);\n\nnew BoundBase(3, 4); // true, [1, 2, 3, 4]\n```\n\nHowever, because a bound function does not have the [`prototype`](../../../globals/Function/prototype/) property, it cannot be used as a base class for [`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends).\n\n```js example-bad\nclass Derived extends class {}.bind(null) {}\n// TypeError: Class extends value does not have valid prototype property undefined\n```\n\nWhen using a bound function as the right-hand side of [`instanceof`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/instanceof), `instanceof` would reach for the target function (which is stored internally in the bound function) and read its `prototype` instead.\n\n```js\nclass Base {}\nconst BoundBase = Base.bind(null, 1, 2);\nconsole.log(new Base() instanceof BoundBase); // true\n```\n\nThe bound function has the following properties:\n\n- [`length`](../../../globals/Function/prototype/length.mdx)\n  - : The `length` of the target function minus the number of arguments being bound (not counting the `thisArg` parameter), with 0 being the minimum value.\n- [`name`](../../../globals/Function/prototype/name.mdx)\n  - : The `name` of the target function plus a `\"bound \"` prefix.\n\nThe bound function also inherits the [prototype chain](https://developer.mozilla.org/docs/Web/JavaScript/Inheritance_and_the_prototype_chain) of the target function. However, it doesn't have other own properties of the target function (such as [static properties](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/static) if the target function is a class).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Function/prototype/call.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.call()\n\nThe **`call()`** method calls the function with a given `this` value and arguments provided individually.\n\n## Syntax\n\n```js\ncall(thisArg)\ncall(thisArg, arg1)\ncall(thisArg, arg1, /* …, */ argN)\n```\n\n### Parameters\n\n- `thisArg`\n  - : The value to use as `this` when calling `func`. If the function is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) will be replaced with the global object, and primitive values will be converted to objects.\n- `arg1, …, argN` _**optional**_\n  - : Arguments for the function.\n\n### Return value\n\nThe result of calling the function with the specified `this` value and arguments.\n\n## Description\n\n> **Note:** This function is almost identical to [`Function.prototype.apply()`](../../../globals/Function/prototype/apply.mdx), except that `call()` accepts an **argument list**, while `apply()` accepts a **single array of arguments** — for example, `func.apply(this, ['eat', 'bananas'])` vs. `func.call(this, 'eat', 'bananas')`.\n\nNormally, when calling a function, the value of [`this`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this) inside the function is the object that the function was accessed on. With `call()`, you can assign an arbitrary value as `this` when calling an existing function, without first attaching the function to the object as a property. This allows you to use methods of one object as generic utility functions.\n\n> **Warning:** Do not use `call()` to chain constructors (for example, to implement inheritance). This invokes the constructor function as a plain function, which means [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target) is `undefined`, and classes throw an error because they can't be called without `new`. Use [`Reflect.construct()`](../../../globals/Reflect/construct.mdx) or [`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Function/prototype/index.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.prototype\n\nThe **`prototype`** data property of a `Function` instance is used when the function is used as a constructor with the `new` operator. It will become the new object's prototype.\n\n> **Note:** Not all `Function` objects have the `prototype` property — see [description](#description).\n\n## Value\n\nAn object.\n\n> **Note:** The `prototype` property of [classes](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes) is not writable.\n\n## Description\n\nWhen a function is called with `new`, the constructor's `prototype` property will become the resulting object's prototype.\n\n```js\nfunction Ctor() {}\nconst inst = new Ctor();\nconsole.log(Object.getPrototypeOf(inst) === Ctor.prototype); // true\n```\n\nYou can read [Inheritance and the prototype chain](https://developer.mozilla.org/docs/Web/JavaScript/Inheritance_and_the_prototype_chain#constructors) for more information about the interactions between a constructor function's `prototype` property and the resulting object's prototype.\n\nA function having a `prototype` property is not sufficient for it to be eligible as a constructor. [Generator functions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function*) have a `prototype` property, but cannot be called with `new`:\n\n```js\nasync function* asyncGeneratorFunction() {}\nfunction* generatorFunction() {}\n```\n\nInstead, generator functions' `prototype` property is used when they are called _without_ `new`. The `prototype` property will become the returned [`Generator`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Generator) object's prototype.\n\nIn addition, some functions may have a `prototype` but throw unconditionally when called with `new`. For example, the [`Symbol()`](../../../globals/Symbol/Symbol.mdx) and [`BigInt`](../../../globals/BigInt/BigInt.mdx) functions throw when called with `new`, because `Symbol.prototype` and `BigInt.prototype` are only intended to provide methods for the primitive values, but the wrapper objects should not be directly constructed.\n\nThe following functions do not have `prototype`, and are therefore ineligible as constructors, even if a `prototype` property is later manually assigned:\n\n```js\nconst method = { foo() {} }.foo;\nconst arrowFunction = () => {};\nasync function asyncFunction() {}\n```\n\nThe following are valid constructors that have `prototype`:\n\n```js\nclass Class {}\nfunction fn() {}\n```\n\nA [bound function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/bind) does not have a `prototype` property, but may be constructable. When it's constructed, the target function is constructed instead, and if the target function is constructable, it would return a normal instance.\n\n```js\nconst boundFunction = function () {}.bind(null);\n```\n\nA function's `prototype` property, by default, is a plain object with one property: (`constructor`)[../../../globals/Object/prototype/constructor.mdx), which is a reference to the function itself. The `constructor` property is writable, non-enumerable, and configurable.\n\nIf the `prototype` of a function is reassigned with something other than an `Object`, when the function is called with `new`, the returned object's prototype would be `Object.prototype` instead. (In other words, `new` ignores the `prototype` property and constructs a plain object.)\n\n```js\nfunction Ctor() {}\nCtor.prototype = 3;\nconsole.log(Object.getPrototypeOf(new Ctor()) === Object.prototype); // true\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Function/prototype/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.length\n\nThe **`length`** data property of a `Function` instance indicates the number of parameters expected by the function.\n\n## Value\n\nA number.\n\n## Description\n\nA `Function` object's `length` property indicates how many arguments the function expects, i.e. the number of formal parameters. \n\nThe `Function` constructor is itself a `Function` object. Its `length` data property has a value of `1`.\n\nDue to historical reasons, `Function.prototype` is a callable itself. The `length` property of `Function.prototype` has a value of `0`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Function/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.name\n\nThe **`name`** property of a `Function` instance indicates the function's name as specified when it was created, or it may be either `anonymous` or `''` (an empty string) for functions created anonymously.\n\n## Value\n\nA string.\n\n> **Note:** In non-standard, pre-ES2015 implementations the `configurable` attribute was `false` as well.\n\n## Description\n\nThe function's `name` property can be used to identify the function in debugging tools or error messages. It has no semantic significance to the language itself.\n\nThe `name` property is read-only and cannot be changed by the assignment operator:\n\n```js\nfunction someFunction() {}\n\nsomeFunction.name = 'otherFunction';\nconsole.log(someFunction.name); // someFunction\n```\n\nTo change it, use [`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx).\n\nThe `name` property is typically inferred from how the function is defined. In the following sections, we will describe the various ways in which it can be inferred.\n\n### Function declaration\n\nThe `name` property returns the name of a function declaration.\n\n```js\nfunction doSomething() {}\ndoSomething.name; // \"doSomething\"\n```\n\n### Default-exported function declaration\n\nAn [`export default`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/export) declaration exports the function as a declaration instead of an expression. If the declaration is anonymous, the name is `\"default\"`.\n\n```js\n// -- someModule.js --\nexport default function () {};\n\n// -- main.js --\nimport someModule from \"./someModule.js\";\n\nsomeModule.name; // \"default\"\n```\n\n### Function constructor\n\nFunctions created with the [`Function()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/Function) constructor have name \"anonymous\".\n\n```js\nnew Function().name; // \"anonymous\"\n```\n\n### Function expression\n\nIf the function expression is named, that name is used as the `name` property.\n\n```js\nconst someFunction = function someFunctionName() {};\nsomeFunction.name; // \"someFunctionName\"\n```\n\nAnonymous function expressions created using the keyword `function` or arrow functions would have `\"\"` (an empty string) as their name.\n\n```js\n(function () {}).name; // \"\"\n(() => {}).name; // \"\"\n```\n\nHowever, such cases are rare — usually, in order to refer to the expression elsewhere, the function expression is attached to an identifier when it's created (such as in a variable declaration). In such cases, the name can be inferred, as the following few subsections demonstrate.\n\nOne practical case where the name cannot be inferred is a function returned from another function:\n\n```js\nfunction getFoo() {\n  return () => {};\n}\ngetFoo().name; // \"\"\n```\n\n### Variable declaration and method\n\nVariables and methods can infer the name of an anonymous function from its syntactic position.\n\n```js\nconst f = function () {};\nconst object = {\n  someMethod: function () {}\n};\n\nconsole.log(f.name); // \"f\"\nconsole.log(object.someMethod.name); // \"someMethod\"\n```\n\nThe same applies to assignment:\n\n```js\nlet f;\nf = () => {};\nf.name; // \"f\"\n```\n\n### Initializer and default value\n\nFunctions in initializers (default values) of [destructuring](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#default_value), [default parameters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/Default_parameters), [class fields](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/Public_class_fields), etc., will inherit the name of the bound identifier as their `name`.\n\n```js\nconst [f = () => {}] = [];\nf.name; // \"f\"\n\nconst { someMethod: m = () => {} } = {};\nm.name; // \"m\"\n\nfunction foo(f = () => {}) {\n  console.log(f.name);\n}\nfoo(); // \"f\"\n\nclass Foo {\n  static someMethod = () => {};\n}\nFoo.someMethod.name; // someMethod\n```\n\n### Shorthand method\n\n```js\nconst o = {\n  foo() {},\n};\no.foo.name; // \"foo\";\n```\n\n### Bound function\n\n[`Function.prototype.bind()`](../../../globals/Function/prototype/bind.mdx) produces a function whose name is \"bound \" plus the function name.\n\n```js\nfunction foo() {};\nfoo.bind({}).name; // \"bound foo\"\n```\n\n### Getter and setter\n\nWhen using [`get`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/get) and [`set`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/set) accessor properties, \"get\" or \"set\" will appear in the function name.\n\n```js\nconst o = {\n  get foo() {},\n  set foo(x) {},\n};\n\nconst descriptor = Object.getOwnPropertyDescriptor(o, \"foo\");\ndescriptor.get.name; // \"get foo\"\ndescriptor.set.name; // \"set foo\";\n```\n\n### Class\n\nA class's name follows the same algorithm as function declarations and expressions.\n\n```js\nclass Foo {}\nFoo.name; // \"Foo\"\n```\n\n> **Warning:** JavaScript will set the function's `name` property only if a function does not have an own property called `name`. However, classes' [static members](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/static) will be set as own properties of the class constructor function, and thus prevent the built-in `name` from being applied. See [telling the constructor name of an object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name#telling_the_constructor_name_of_an_object) for more details.\n\n### Symbol as function name\n\nIf a `Symbol` is used a function name and the symbol has a description, the method's name is the description in square brackets.\n\n```js\nconst sym1 = Symbol(\"foo\");\nconst sym2 = Symbol();\n\nconst o = {\n  [sym1]() {},\n  [sym2]() {},\n};\n\no[sym1].name; // \"[foo]\"\no[sym2].name; // \"[]\"\n```\n\n### Private property\n\nPrivate fields and private methods have the hash (`#`) as part of their names.\n\n```js\nclass Foo {\n  #field = () => {};\n  #method() {}\n  getNames() {\n    console.log(this.#field.name);\n    console.log(this.#method.name);\n  }\n}\n\nnew Foo().getNames();\n// \"#field\"\n// \"#method\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Function/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.toString()\n\nThe **`toString()`** method returns a string representing the source code of the specified `Function`.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the source code of the function.\n\n## Description\n\nThe `Function` object overrides the `toString()` method\ninherited from `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For user-defined `Function`\nobjects, the `toString` method returns a string containing the source text\nsegment which was used to define the function.\n\nJavaScript calls the `toString` method automatically when a\n`Function` is to be represented as a text value, e.g. when a function is\nconcatenated with a string.\n\nThe `toString()` method will throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) exception\n(\"Function.prototype.toString called on incompatible object\"), if its\n`this` value object is not a `Function` object.\n\n```js example-bad\nFunction.prototype.toString.call('foo'); // throws TypeError\n```\n\nIf the `toString()` method is called on built-in function objects, a\nfunction created by [`Function.prototype.bind()`](../../../globals/Function/prototype/bind.mdx), or\nother non-JavaScript functions, then `toString()` returns a\n_native function string_ which looks like\n\n```js\n\"function someName() { [native code] }\"\n```\n\nFor intrinsic object methods and functions, `someName` is the initial name of the function; otherwise its content may be implementation-defined, but will always be in property name syntax, like `[1 + 1]`, `someName`, or `1`.\n\n> **Note:** This means using [`eval()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/eval) on native function strings is a guaranteed syntax error.\n\nIf the `toString()` method is called on a function created by the `Function` constructor, `toString()` returns the source code of a synthesized function declaration named \"anonymous\" using the provided parameters and function body. For example, `Function(\"a\", \"b\", \"return a + b\").toString()` will return:\n\n```js\n\"function anonymous(a,b\\n) {\\nreturn a + b\\n}\"\n```\n\nSince ES2018, the spec requires the return value of `toString()` to be the exact same source code as it was declared, including any whitespace and/or comments — or, if the host doesn't have the source code available for some reason, requires returning a native function string. Support for this revised behavior can be found in the [browser compatibility table](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/toString#browser_compatibility).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Headers/Headers.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers()\n\nThe **`Headers()`** constructor creates a new `Headers` object.\n\n## Syntax\n\n```js\nnew Headers()\nnew Headers(init)\n```\n\n### Parameters\n\n- `init` _**optional**_\n  - : An object containing any HTTP headers that you want to pre-populate your `Headers` object with. This can be a\n    simple object literal with `String` values, an array of name-value pairs, where each pair is a 2-element string array; or an existing\n    `Headers` object. In the last case, the new `Headers` object\n    copies its data from the existing `Headers` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Headers/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.append()\n\nThe **`append()`** method of the `Headers`\ninterface appends a new value onto an existing header inside a `Headers`\nobject, or adds the header if it does not already exist.\n\nThe difference between `Headers.prototype.set()` and `append()` is\nthat if the specified header already exists and accepts multiple values,\n`set()` will overwrite the existing value with the new one, whereas\n`append()` will append the new value onto the end of the set of values.\n\n## Syntax\n\n```js\nappend(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to add to the `Headers` object.\n- `value`\n  - : The value of the HTTP header you want to add.\n\n### Return value\n\nNone (`undefined`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Headers/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.delete()\n\nThe **`delete()`** method of the `Headers`\ninterface deletes a header from the current `Headers` object.\n\nThis method throws a `TypeError` for the following reasons:\n\n- The value of the name parameter is not the name of an HTTP header.\n\n## Syntax\n\n```js\ndelete(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to delete from the `Headers` object.\n\n### Return value\n\nNone (`undefined`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Headers/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.entries()\n\nThe **`Headers.entries()`** method returns an iterator allowing to go through all key/value pairs\ncontained in this object. The both the key and value of each pairs are `String` objects.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Headers/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.forEach()\n\nThe **`Headers.forEach()`** method executes a callback function once per each key/value pair in the `Headers` object.\n\n## Syntax\n\n```js\n// Arrow function\nforEach((value, key) => { /* … */ })\nforEach((value, key, object) => { /* … */ })\n\n// Inline callback function\nforEach(function (value, key) { /* … */ })\nforEach(function (value, key, object) { /* … */ })\nforEach(function (value, key) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n  - : Function to execute for each entry in the map. It takes the following arguments:\n    - `value`\n      - : Value of the currently visited header entry.\n    - `key`\n      - : Name of the currently visited header entry.\n    - `object`\n      - : The Headers object being iterated.\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `callback`.\n\n### Return value\n\n`undefined`.\n\n## Description\n\nThe `Headers.forEach()` method executes the provided callback once for each key of the Headers which actually exist. It is not invoked for keys which have been deleted. However, it is executed for keys which are present but have the value undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Headers/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.get()\n\nThe **`get()`** method of the [`Headers`](../../../globals/Headers/Headers.mdx) interface\nreturns a byte string of all the values of a header within a `Headers` object\nwith a given name. If the requested header doesn't exist in the `Headers`\nobject, it returns `null`.\n\n## Syntax\n\n```js\nget(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header whose values you want to retrieve from the\n    `Headers` object. If the given name is not the name of an HTTP header, this\n    method throws a `TypeError`. The name is case-insensitive.\n\n### Return value\n\nA [`String`](../../../globals/String/String.mdx) sequence representing the values of the retrieved header or\n`null` if this header is not set.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Headers/prototype/getSetCookie.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.getSetCookie()\n\nThe **`getSetCookie()`** method of the [`Headers`](../../../globals/Headers/Headers.mdx) interface\nreturns an array of all the values of the `Set-Cookie` headers, returning\nan empty list if none are present.\n\n## Syntax\n\n```js\ngetSetCookie()\n```\n\n### Return value\n\n`String[]` representing the list of `Set-Cookie` headers.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Headers/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.has()\n\nThe **`has()`** method of the `Headers` interface\nreturns a boolean stating whether a `Headers` object contains a certain\nheader.\n\n## Syntax\n\n```js\nhas(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to test for. If the given name is not a valid\n    HTTP header name, this method throws a `TypeError`.\n\n### Return value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Headers/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.keys()\n\nThe **`Headers.keys()`** method returns an iterator allowing to go through all keys contained\nin this object. The keys are `String` objects.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Headers/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.set()\n\nThe **`set()`** method of the `Headers` interface\nsets a new value for an existing header inside a `Headers` object, or adds\nthe header if it does not already exist.\n\nThe difference between `set()` and `Headers.append` is that if\nthe specified header already exists and accepts multiple values, `set()`\noverwrites the existing value with the new one, whereas `Headers.append`\nappends the new value to the end of the set of values.\n\n## Syntax\n\n```js\nset(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to set to a new value. If the given name is not\n    the name of an HTTP header, this method throws a `TypeError`.\n- `value`\n  - : The new value you want to set.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Headers/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.values()\n\nThe **`Headers.values()`** method returns an iterator allowing to go through all values contained\nin this object. The values are `String` objects.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/HmacImportParams/HmacImportParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# HmacImportParams\n\nThe **`HmacImportParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.importKey`, when generating a key for the `HMAC` algorithm.\n\n## Instance properties\n\n- `name`\n  - : A string. This should be set to `HMAC`.\n- `hash`\n\n  - : A string representing the name of the digest function to use. The can take a value of `SHA-1`, `SHA-256`, `SHA-384`, or `SHA-512`.\n\n- `length` _optional_\n  - : A `Number` representing the length in bits of the key. If this is omitted the length of the key is equal to the length of the digest generated by the digest function you have chosen. Unless you have a good reason to use a different length, omit this property and use the default.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Infinity.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Infinity\n\nThe global property **`Infinity`** is a numeric value representing infinity.\n\n## Value\n\nThe same number value as `Number.POSITIVE_INFINITY`.\n\n## Description\n\n`Infinity` is a property of the _global object_. In other words, it is a variable in global scope.\n\nThe value `Infinity` (positive infinity) is greater than any other number.\n\nThis value behaves slightly differently than mathematical infinity; see `Number.POSITIVE_INFINITY` for details.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Int16Array/Int16Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Int16Array()\n\nThe **`Int16Array()`** typed array constructor creates an array\nof twos-complement 16-bit signed integers in the platform byte order. If control over\nbyte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are initialized\nto `0`. Once established, you can reference elements in the array using the\nobject's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Int16Array()\nnew Int16Array(length)\nnew Int16Array(typedArray)\nnew Int16Array(object)\n\nnew Int16Array(buffer)\nnew Int16Array(buffer, byteOffset)\nnew Int16Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Int16Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Int32Array/Int32Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Int32Array()\n\nThe **`Int32Array()`** typed array constructor creates an array\nof twos-complement 32-bit signed integers in the platform byte order. If control over\nbyte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are initialized\nto `0`. Once established, you can reference elements in the array using the\nobject's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Int32Array()\nnew Int32Array(length)\nnew Int32Array(typedArray)\nnew Int32Array(object)\n\nnew Int32Array(buffer)\nnew Int32Array(buffer, byteOffset)\nnew Int32Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Int32Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Int8Array/Int8Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Int8Array()\n\nThe **`Int8Array()`** constructor creates a typed array of\ntwos-complement 8-bit signed integers. The contents are initialized to `0`.\nOnce established, you can reference elements in the array using the object's methods, or\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew Int8Array()\nnew Int8Array(length)\nnew Int8Array(typedArray)\nnew Int8Array(object)\n\nnew Int8Array(buffer)\nnew Int8Array(buffer, byteOffset)\nnew Int8Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Int8Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/JSON/parse.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# JSON.parse()\n\nThe **`JSON.parse()`** method parses a JSON string, constructing the JavaScript value or object described by the string. An optional _reviver_ function can be provided to perform a transformation on the resulting object before it is returned.\n\n## Syntax\n\n```js\nJSON.parse(text)\nJSON.parse(text, reviver)\n```\n\n### Parameters\n\n- `text`\n  - : The string to parse as JSON.\n- `reviver` _**optional**_\n  - : If a function, this prescribes how each value originally produced by parsing is transformed before being returned. Non-callable values are ignored. The function is called with the following arguments:\n    - `key`\n      - : The key associated with the value.\n    - `value`\n      - : The value produced by parsing.\n\n### Return value\n\nThe `Object`, `Array`, string, number, boolean, or `null` value corresponding to the given JSON `text`.\n\n### Exceptions\n\n- [`SyntaxError`](../../globals/SyntaxError/SyntaxError.mdx)\n  - : Thrown if the string to parse is not valid JSON.\n\n## Description\n\n`JSON.parse()` parses a JSON string according to the [JSON grammar](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/JSON#full_json_grammar), then evaluates the string as if it's a JavaScript expression. The only instance where a piece of JSON text represents a different value from the same JavaScript expression is when dealing with the `\"__proto__\"` key — see [Object literal syntax vs. JSON](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Object_initializer#object_literal_syntax_vs._json).\n\n### The reviver parameter\n\nIf a `reviver` is specified, the value computed by parsing is _transformed_ before being returned. Specifically, the computed value and all its properties (in a [depth-first](https://en.wikipedia.org/wiki/Depth-first_search) fashion, beginning with the most nested properties and proceeding to the original value itself) are individually run through the `reviver`.\n\nThe `reviver` is called with the object containing the property being processed as `this`, and two arguments: `key` and `value`, representing the property name as a string (even for arrays) and the property value. If the `reviver` function returns [`undefined`](../../globals/undefined.mdx) (or returns no value — for example, if execution falls off the end of the function), the property is deleted from the object. Otherwise, the property is redefined to be the return value. If the `reviver` only transforms some values and not others, be certain to return all untransformed values as-is — otherwise, they will be deleted from the resulting object.\n\nSimilar to the `replacer` parameter of [`JSON.stringify()`](../../globals/JSON/stringify.mdx), `reviver` will be last called on the root object with an empty string as the `key` and the root object as the `value`. For JSON text parsing to primitive values, `reviver` will be called once.\n\nNote that `reviver` is run after the value is parsed. So, for example, numbers in JSON text will have already been converted to JavaScript numbers, and may lose precision in the process. To transfer large numbers without loss of precision, serialize them as strings, and revive them to [BigInts](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/BigInt), or other appropriate arbitrary precision formats.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/JSON/stringify.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# JSON.stringify()\n\nThe **`JSON.stringify()`** method converts a JavaScript value to a JSON string, optionally replacing values if a replacer function is specified or optionally including only the specified properties if a replacer array is specified.\n\n## Syntax\n\n```js\nJSON.stringify(value)\nJSON.stringify(value, replacer)\nJSON.stringify(value, replacer, space)\n```\n\n### Parameters\n\n- `value`\n  - : The value to convert to a JSON string.\n- `replacer` _**optional**_\n  - : A function that alters the behavior of the stringification process, or an array of strings or numbers naming properties of `value` that should be included in the output. If `replacer` is an array, all elements that are not strings or numbers (can be either primitives or wrapper objects), including `Symbol` values, are completely ignored. If `replacer` is anything other than a function or an array (e.g. [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or not provided), all properties of the object are included in the resulting JSON string.\n- `space` _**optional**_\n\n  - : A string or number that's used to insert white space (including indentation, line break characters, etc.) into the output JSON string for readability purposes.\n\n    If this is a number, it indicates the number of space characters to be used as indentation, clamped to 10 (that is, any number greater than `10` is treated as if it were `10`). Values less than 1 indicate that no space should be used.\n\n    If this is a string, the string (or the first 10 characters of the string, if it's longer than that) is inserted before every nested object or array.\n\n    If `space` is anything other than a string or number (can be either a primitive or a wrapper object) — for example, is [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or not provided — no white space is used.\n\n### Return value\n\nA JSON string representing the given value, or undefined.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if one of the following is true:\n    - `value` contains a circular reference.\n    - A `BigInt` value is encountered.\n\n## Description\n\n`JSON.stringify()` converts a value to JSON notation representing it:\n\n- `Boolean`, `Number`, `String`, and `BigInt` (obtainable via [`Object()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/Object)) objects are converted to the corresponding primitive values during stringification, in accordance with the traditional conversion semantics. `Symbol` objects (obtainable via [`Object()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/Object)) are treated as plain objects.\n- Attempting to serialize `BigInt` values will throw. However, if the BigInt has a `toJSON()` method (through monkeypatching: `BigInt.prototype.toJSON = ...`), that method can provide the serialization result. This constraint ensures that a proper serialization (and, very likely, its accompanying deserialization) behavior is always explicitly provided by the user.\n- [`undefined`](../../globals/undefined.mdx), `Function`, and `Symbol` values are not valid JSON values. If any such values are encountered during conversion, they are either omitted (when found in an object) or changed to [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) (when found in an array). `JSON.stringify()` can return `undefined` when passing in \"pure\" values like `JSON.stringify(() => {})` or `JSON.stringify(undefined)`.\n- The numbers [`Infinity`](../../globals/Infinity.mdx) and [`NaN`](../../globals/NaN.mdx), as well as the value [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null), are all considered `null`. (But unlike the values in the previous point, they would never be omitted.)\n- Arrays are serialized as arrays (enclosed by square brackets). Only array indices between 0 and `length - 1` (inclusive) are serialized; other properties are ignored.\n- For other objects:\n\n  - All `Symbol`-keyed properties will be completely ignored, even when using the [`replacer`](#the-replacer-parameter) parameter.\n\n  - If the value has a `toJSON()` method, it's responsible to define what data will be serialized. Instead of the object being serialized, the value returned by the `toJSON()` method when called will be serialized. `JSON.stringify()` calls `toJSON` with one parameter, the `key`, which has the same semantic as the `key` parameter of the [`replacer`](#the-replacer-parameter) function:\n\n    - if this object is a property value, the property name\n    - if it is in an array, the index in the array, as a string\n    - if `JSON.stringify()` was directly called on this object, an empty string\n\n    `Date` objects implement the [`toJSON()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toJSON) method which returns a string (the same as [`date.toISOString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)). Thus, they will be stringified as strings.\n\n  - Only [enumerable own properties](https://developer.mozilla.org/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) are visited. This means [Map](../../globals/Map/Map.mdx), [Set](../../globals/Set/Set.mdx), etc. will become `\"{}\"`. You can use the [`replacer`](#the-replacer-parameter) parameter to serialize them to something more useful.\n\n    Properties are visited using the same algorithm as [`Object.keys()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/keys), which has a well-defined order and is stable across implementations. For example, `JSON.stringify` on the same object will always produce the same string, and `JSON.parse(JSON.stringify(obj))` would produce an object with the same key ordering as the original (assuming the object is completely JSON-serializable).\n\n### The replacer parameter\n\nThe `replacer` parameter can be either a function or an array.\n\nAs an array, its elements indicate the names of the properties in the object that should be included in the resulting JSON string. Only string and number values are taken into account; symbol keys are ignored.\n\nAs a function, it takes two parameters: the `key` and the `value` being stringified. The object in which the key was found is provided as the `replacer`'s `this` context.\n\nThe `replacer` function is called for the initial object being stringified as well, in which case the `key` is an empty string (`\"\"`). It is then called for each property on the object or array being stringified. Array indices will be provided in its string form as `key`. The current property value will be replaced with the `replacer`'s return value for stringification. This means:\n\n- If you return a number, string, boolean, or `null`, that value is directly serialized and used as the property's value. (Returning a BigInt will throw as well.)\n- If you return a `Function`, `Symbol`, or [`undefined`](../../globals/undefined.mdx), the property is not included in the output.\n- If you return any other object, the object is recursively stringified, calling the `replacer` function on each property.\n\n> **Note:** When parsing JSON generated with `replacer` functions, you would likely want to use the [`reviver`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#using_the_reviver_parameter) parameter to perform the reverse operation.\n\nTypically, array elements' index would never shift (even when the element is an invalid value like a function, it will become `null` instead of omitted). Using the `replacer` function allows you to control the order of the array elements by returning a different array.\n\n### The space parameter\n\nThe `space` parameter may be used to control spacing in the final string.\n\n- If it is a number, successive levels in the stringification will each be indented by this many space characters.\n- If it is a string, successive levels will be indented by this string.\n\nEach level of indentation will never be longer than 10. Number values of `space` are clamped to 10, and string values are truncated to 10 characters.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Map/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get Map\\[Symbol.species]\n\nThe **`Map[Symbol.species]`** accessor property is an unused accessor property specifying how to copy `Map` objects.\n\n## Syntax\n\n```js\nMap[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct copied `Map` instances.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `Map` objects. Subclass constructors may override it to change the constructor assignment.\n\n> **Note:** This property is currently unused by all `Map` methods.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Map/Map.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map()\n\nThe **`Map()` constructor** creates [Map](../../globals/Map/Map.mdx) objects.\n\n## Syntax\n\n```js\nnew Map()\nnew Map(iterable)\n```\n\n> **Note:** `Map()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable` _**optional**_\n  - : An `Array` or other\n    [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) object\n    whose elements are key-value pairs. (For example, arrays with two elements,\n    such as `[[ 1, 'one' ],[ 2, 'two' ]]`.) Each key-value pair is added to the\n    new `Map`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Map/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype\\[Symbol.iterator]()\n\nThe **`Symbol.iterator`** method of a `Map` object implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows maps to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the key-value pairs of the map.\n\nThe initial value of this property is the same function object as the initial value of the [`Map.prototype.entries`](../../../globals/Map/prototype/entries.mdx) property.\n\n## Syntax\n\n```js\nmap[Symbol.iterator]()\n```\n\n### Return value\n\nThe same return value as [`Map.prototype.entries()`](../../../globals/Map/prototype/entries.mdx): a new iterable iterator object that yields the key-value pairs of the map.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Map/prototype/clear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.clear()\n\nThe **`clear()`** method removes all elements from a `Map` object.\n\n## Syntax\n\n```js\nclear()\n```\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Map/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.delete()\n\nThe **`delete()`** method removes the specified element from a `Map` object by\nkey.\n\n## Syntax\n\n```js\ndelete(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to remove from the `Map` object.\n\n### Return value\n\n`true` if an element in the `Map` object existed and has been removed, or\n`false` if the element does not exist.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Map/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.entries()\n\nThe **`entries()`** method returns a new\n_[iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators)_ object\nthat contains the `[key, value]` pairs for each element in the `Map` object in\ninsertion order. In this particular case, this iterator object is also an\niterable, so the for-of loop can be used. When the protocol `[Symbol.iterator]`\nis used, it returns a function that, when invoked, returns this iterator itself.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nA new [Map](../../../globals/Map/Map.mdx) iterator object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Map/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.forEach()\n\nThe **`forEach()`** method executes a provided function once per each key/value\npair in the `Map` object, in insertion order.\n\n## Syntax\n\n```js\n// Arrow function\nforEach(() => { /* … */ } )\nforEach((value) => { /* … */ } )\nforEach((value, key) => { /* … */ } )\nforEach((value, key, map) => { /* … */ } )\n\n// Callback function\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n\n// Inline callback function\nforEach(function() { /* … */ })\nforEach(function(value) { /* … */ })\nforEach(function(value, key) { /* … */ })\nforEach(function(value, key, map) { /* … */ })\nforEach(function(value, key, map) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n  - : Function to execute for each entry in the map. It takes the following\n    arguments:\n    - `value` _**optional**_\n      - : Value of each iteration.\n    - `key` _**optional**_\n      - : Key of each iteration.\n    - `map` _**optional**_\n      - : The map being iterated.\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `callback`.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n## Description\n\nThe `forEach` method executes the provided `callback` once for each key of the\nmap which actually exist. It is not invoked for keys which have been deleted.\nHowever, it is executed for values which are present but have the value\n`undefined`.\n\n`callback` is invoked with **three arguments**:\n\n- the entry's `value`\n- the entry's `key`\n- the **`Map` object** being traversed\n\nIf a `thisArg` parameter is provided to `forEach`, it will be passed to\n`callback` when invoked, for use as its `this` value. Otherwise, the value\n`undefined` will be passed for use as its `this` value. The `this` value\nultimately observable by `callback` is determined according to\n[the usual rules for determining the `this` seen by a function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this).\n\nEach value is visited once, except in the case when it was deleted and re-added\nbefore `forEach` has finished. `callback` is not invoked for values deleted\nbefore being visited. New values added before `forEach` has finished will be\nvisited.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Map/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.get()\n\nThe **`get()`** method returns a specified element from a `Map` object. If the\nvalue that is associated to the provided key is an object, then you will get a\nreference to that object and any change made to that object will effectively\nmodify it inside the `Map` object.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to return from the `Map` object.\n\n### Return value\n\nThe element associated with the specified key, or\n[`undefined`](../../../globals/undefined.mdx) if the key can't be found in the `Map` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Map/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.has()\n\nThe **`has()`** method returns a boolean indicating whether an element with the\nspecified key exists or not.\n\n## Syntax\n\n```js\nhas(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to test for presence in the `Map` object.\n\n### Return value\n\n`true` if an element with the specified key exists in the `Map` object;\notherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Map/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.keys()\n\nThe **`keys()`** method returns a new\n_[iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators)_ object\nthat contains the keys for each element in the `Map` object in insertion order. In this particular case, this iterator object is also an iterable, so a [for...of](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loop can be used.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nA new [Map](../../../globals/Map/Map.mdx) iterator object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Map/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.set()\n\nThe **`set()`** method adds or updates an entry in a `Map` object with a specified key and a value.\n\n## Syntax\n\n```js\nset(key, value)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to add to the `Map` object. The key may be any [JavaScript type](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures) (any [primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_values) or any type of [JavaScript object](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#objects)).\n- `value`\n  - : The value of the element to add to the `Map` object. The value may be any [JavaScript type](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures) (any [primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_values) or any type of [JavaScript object](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#objects)).\n\n### Return value\n\nThe `Map` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Map/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.size\n\nThe **`size`** accessor property returns the number of elements in a\n[Map](../../../globals/Map/Map.mdx) object.\n\n## Description\n\nThe value of `size` is an integer representing how many entries the `Map` object\nhas. A set accessor function for `size` is `undefined`; you can not change this\nproperty.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Map/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.values()\n\nThe **`values()`** method returns a new\n_[iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators)_ object\nthat contains the values for each element in the `Map` object in insertion\norder.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nA new [Map](../../../globals/Map/Map.mdx) iterator object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/E.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.E\n\nThe **`Math.E`** property represents Euler's number, the base of natural logarithms, e, which is approximately 2.718.\n\n## Value\n\n`2.718281828459045`\n\n## Description\n\nBecause `E` is a static property of `Math`, you always use it as `Math.E`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/LN10.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LN10\n\nThe **`Math.LN10`** property represents the natural logarithm of 10, approximately 2.302.\n\n## Value\n\n`2.302585092994046`\n\n## Description\n\nBecause `LN10` is a static property of `Math`, you always use it as `Math.LN10`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/LN2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LN2\n\nThe **`Math.LN2`** property represents the natural logarithm of 2, approximately 0.693:\n\n## Value\n\n`0.6931471805599453`\n\n## Description\n\nBecause `LN2` is a static property of `Math`, you always use it as `Math.LN2`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/LOG10e.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LOG10E\n\nThe **`Math.LOG10E`** property represents the base 10 logarithm of [E](./E.mdx), approximately 0.434.\n\n## Value\n\n`0.4342944819032518`\n\n## Description\n\nBecause `LOG10E` is a static property of `Math`, you always use it as `Math.LOG10E`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/LOG2e.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LOG2E\n\nThe **`Math.LOG2E`** property represents the base 2 logarithm of [E](./E.mdx), approximately 1.442.\n\n## Value\n\n`1.4426950408889634`\n\n## Description\n\nBecause `LOG2E` is a static property of `Math`, you always use it as `Math.LOG2E`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/PI.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.PI\n\nThe **`Math.PI`** property represents the ratio of the circumference of a circle to its diameter, approximately 3.14159.\n\n## Value\n\n`3.141592653589793`\n\n## Description\n\nBecause `PI` is a static property of `Math`, you always use it as `Math.PI`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/SQRT1_2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.SQRT1_2\n\nThe **`Math.SQRT1_2`** property represents the square root of 1/2, which is approximately 0.707.\n\n## Value\n\n`0.7071067811865476`\n\n## Description\n\n`Math.SQRT1_2` is a constant and a more performant equivalent to [`Math.sqrt(0.5)`](./sqrt.mdx).\n\nBecause `SQRT1_2` is a static property of `Math`, you always use it as `Math.SQRT1_2`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/SQRT2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.SQRT2\n\nThe **`Math.SQRT2`** property represents the square root of 2, approximately 1.414.\n\n## Value\n\n`0.7071067811865476`\n\n## Description\n\n`Math.SQRT2` is a constant and a more performant equivalent to [`Math.sqrt(2)`](./sqrt.mdx).\n\nBecause `SQRT2` is a static property of `Math`, you always use it as `Math.SQRT2`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/abs.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.abs()\n\nThe **`Math.abs()`** function returns the absolute value of a number.\n\n\n## Syntax\n\n```js\nMath.abs(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe absolute value of `x`. If `x` is negative (including `-0`), returns `-x`. Otherwise, returns `x`. The result is therefore always a positive number or `0`.\n\n## Description\n\nBecause `abs()` is a static method of `Math`, you always use it as `Math.abs()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/acos.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.acos()\n\nThe **`Math.acos()`** function returns the inverse cosine (in radians) of a number.\n\n## Syntax\n\n```js\nMath.acos(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number between -1 and 1, inclusive, representing the angle's cosine value.\n\n### Return value\n\nThe inverse cosine (angle in radians between 0 and π, inclusive) of `x`. If `x` is less than -1 or greater than 1, returns `NaN`.\n\n## Description\n\nBecause `acos()` is a static method of `Math`, you always use it as `Math.acos()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/acosh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.acosh()\n\nThe **`Math.acosh()`** function returns the inverse hyperbolic cosine of a number.\n\n## Syntax\n\n```js\nMath.acosh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 1.\n\n### Return value\n\nThe inverse hyperbolic cosine of `x`. If `x` is less than 1, returns `NaN`.\n\n## Description\n\nBecause `acosh()` is a static method of `Math`, you always use it as `Math.acosh()`, rather than as a method of a `Math` object you created (`Math` is no constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/asin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.asin()\n\nThe **`Math.asin()`** function returns the inverse sine (in radians) of a number.\n\n## Syntax\n\n```js\nMath.asin(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number between -1 and 1, inclusive, representing the angle's sine value.\n\n### Return value\n\nThe inverse sine (angle in radians between <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math>, inclusive) of `x`. If `x` is less than -1 or greater than 1, returns `NaN`.\n\n## Description\n\nBecause `asin()` is a static method of `Math`, you always use it as `Math.asin()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/asinh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.asinh()\n\nThe **`Math.asinh()`** function returns the inverse hyperbolic sine of a number. \n\n## Syntax\n\n```js\nMath.asinh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe inverse hyperbolic sine of `x`.\n\n## Description\n\nBecause `asinh()` is a static method of `Math`, you always use it as `Math.asinh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/atan.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.atan()\n\nThe **`Math.atan()`** function returns the inverse tangent (in radians) of a number.\n\n## Syntax\n\n```js\nMath.atan(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe inverse tangent (angle in radians between <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math> and <math><semantics><mfrac><mi>π</mi><mn>2</mn></mfrac></semantics></math>, inclusive) of `x`. If `x` is `Infinity`, it returns <math><semantics><mfrac><mi>π</mi><mn>2</mn></mfrac></semantics></math>. If `x` is `-Infinity`, it returns <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math>.\n\n## Description\n\nBecause `atan()` is a static method of `Math`, you always use it as `Math.atan()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/atan2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.atan2()\n\nThe **`Math.atan2()`** function returns the angle in the plane (in radians) between the positive x-axis and the ray from (0, 0) to the point (x, y), for `Math.atan2(y, x)`.\n\n## Syntax\n\n```js\nMath.atan2(y, x)\n```\n\n### Parameters\n\n- `y`\n  - : The y coordinate of the point.\n- `x`\n  - : The x coordinate of the point.\n\n### Return value\n\nThe angle in radians (between -π and π, inclusive) between the positive x-axis and the ray from (0, 0) to the point (x, y).\n\n## Description\n\nThe `Math.atan2()` method measures the counterclockwise angle θ, in radians, between the positive x-axis and the point `(x, y)`. Note that the arguments to this function pass the y-coordinate first and the x-coordinate second.\n\n`Math.atan2()` is passed separate `x` and `y` arguments, while [`Math.atan()`](./atan.mdx) is passed the ratio of those two arguments. `Math.atan2(y, x)` differs from `Math.atan(y / x)` in the following cases:\n\n| `x`                  | `y`         | `Math.atan2(y, x)` | `Math.atan(y / x)` |\n| -------------------- | ----------- | ------------------ | ------------------ |\n| `Infinity`           | `Infinity`  | π / 4              | `NaN`              |\n| `Infinity`           | `-Infinity` | -π / 4             | `NaN`              |\n| `-Infinity`          | `Infinity`  | 3π / 4             | `NaN`              |\n| `-Infinity`          | `-Infinity` | -3π / 4            | `NaN`              |\n| 0                    | 0           | 0                  | `NaN`              |\n| 0                    | -0          | -0                 | `NaN`              |\n| < 0 (including `-0`) | 0           | π                  | 0                  |\n| < 0 (including `-0`) | -0          | -π                 | 0                  |\n| `-Infinity`          | > 0         | π                  | -0                 |\n| -0                   | > 0         | π / 2              | -π / 2             |\n| `-Infinity`          | < 0         | -π                 | 0                  |\n| -0                   | < 0         | -π / 2             | π / 2              |\n\nIn addition, for points in the second and third quadrants (`x < 0`), `Math.atan2()` would output an angle less than <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math> or greater than <math><semantics><mfrac><mi>π</mi><mn>2</mn></mfrac></semantics></math>.\n\nBecause `atan2()` is a static method of `Math`, you always use it as `Math.atan2()`, rather than as a method of a `Math` object you created (`Math` is not a constructor)."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/atanh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.atanh()\n\nThe **`Math.atanh()`** function returns the inverse hyperbolic tangent of a number. \n\n## Syntax\n\n```js\nMath.atanh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number between -1 and 1, inclusive.\n\n### Return value\n\nThe inverse hyperbolic tangent of `x`. If `x` is 1, returns `Infinity`. If `x` is -1, returns `-Infinity`. If `x` is less than -1 or greater than 1, returns `NaN`.\n\n## Description\n\nBecause `atanh()` is a static method of `Math`, you always use it as `Math.atanh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/cbrt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.cbrt()\n\nThe **`Math.cbrt()`** function returns the cube root of a number.\n\n## Syntax\n\n```js\nMath.cbrt(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe cube root of `x`.\n\n## Description\n\nBecause `cbrt()` is a static method of `Math`, you always use it as `Math.cbrt()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/ceil.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.ceil()\n\nThe **`Math.ceil()`** function always rounds up and returns the smaller integer greater than or equal to a given number.\n\n## Syntax\n\n```js\nMath.ceil(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe smallest integer greater than or equal to `x`. It's the same value as [`-Math.floor(-x)`](./floor.mdx).\n\n## Description\n\nBecause `ceil()` is a static method of `Math`, you always use it as `Math.ceil()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/clz32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.clz32()\n\nThe **`Math.clz32()`** function returns the number of leading zero bits in the 32-bit binary representation of a number.\n\n## Syntax\n\n```js\nMath.clz32(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe number of leading zero bits in the 32-bit binary representation of `x`.\n\n## Description\n\n`clz32` is short for **C**ount**L**eading**Z**eros**32**.\n\nIf `x` is not a number, it will be converted to a number first, then converted to a 32-bit unsigned integer.\n\nIf the converted 32-bit unsigned integer is `0`, `32` is returned, because all bits are `0`. If the most significant bit is `1` (i.e. the number is greater than or equal to 2<sup>31</sup>), `0` is returned.\n\nThis function is particularly useful for systems that compile to JS, like [Emscripten](https://emscripten.org).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/cos.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.cos()\n\nThe **`Math.cos()`** function returns the cosine of a number in radians.\n\n## Syntax\n\n```js\nMath.cos(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number representing an angle in radians.\n\n### Return value\n\nThe cosine of `x`, between -1 and 1, inclusive. If `x` is `Infinity`, `-Infinity`, or `NaN`, returns `NaN`.\n\n## Description\n\nBecause `cos()` is a static method of `Math`, you always use it as `Math.cos()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/cosh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.cosh()\n\nThe **`Math.cosh()`** function returns the hyperbolic cosine of a number. \n\n## Syntax\n\n```js\nMath.cosh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe hyperbolic cosine of `x`.\n\n## Description\n\nBecause `cosh()` is a static method of `Math`, you always use it as `Math.cosh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor)."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/exp.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.exp()\n\nThe **`Math.exp()`** function returns [E](./E.mdx) raised to the power of a number.\n\n## Syntax\n\n```js\nMath.exp(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nA nonnegative number representing e<sup>x</sup>, where e is [the base of the natural logarithm](./E.mdx).\n\n## Description\n\nBecause `exp()` is a static method of `Math`, you always use it as `Math.exp()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nBeware that `e` to the power of a number very close to 0 will be very close to 1 and suffer from loss of precision. In this case, you may want to use `Math.expm1` instead, and obtain a much higher-precision fractional part of the answer.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/expm1.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.expm1()\n\nThe **`Math.expm1()`** function returns [E](./E.mdx) raised to the power of a number, subtracted by 1.\n\n## Syntax\n\n```js\nMath.expm1(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nA number representing e<sup>x</sup> - 1, where e is [the base of the natural logarithm](./E.mdx).\n\n## Description\n\nFor very small values of _x_, adding 1 can reduce or eliminate precision. The double floats used in JS give you about 15 digits of precision. 1 + 1e-15 \\= 1.000000000000001, but 1 + 1e-16 = 1.000000000000000 and therefore exactly 1.0 in that arithmetic, because digits past 15 are rounded off.\n\nWhen you calculate <math display=\"inline\"><semantics><msup><mi mathvariant=\"normal\">e</mi><mi>x</mi></msup></semantics></math> where x is a number very close to 0, you should get an answer very close to 1 + x, because <math display=\"inline\"><semantics><mrow><munder><mo lspace=\"0em\" rspace=\"0em\">lim</mo><mrow><mi>x</mi><mo stretchy=\"false\">→</mo><mn>0</mn></mrow></munder><mfrac><mrow><msup><mi mathvariant=\"normal\">e</mi><mi>x</mi></msup><mo>−</mo><mn>1</mn></mrow><mi>x</mi></mfrac><mo>=</mo><mn>1</mn></mrow></semantics></math>. If you calculate `Math.exp(1.1111111111e-15) - 1`, you should get an answer close to `1.1111111111e-15`. Instead, due to the highest significant figure in the result of `Math.exp` being the units digit `1`, the final value ends up being `1.1102230246251565e-15`, with only 3 correct digits. If, instead, you calculate `Math.exp1m(1.1111111111e-15)`, you will get a much more accurate answer `1.1111111111000007e-15`, with 11 correct digits of precision.\n\nBecause `expm1()` is a static method of `Math`, you always use it as `Math.expm1()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/floor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.floor()\n\nThe **`Math.floor()`** function always rounds down and returns the largest integer less than or equal to a given number.\n\n## Syntax\n\n```js\nMath.floor(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe largest integer smaller than or equal to `x`. It's the same value as [`-Math.ceil(-x)`](./ceil.mdx).\n\n## Description\n\nBecause `floor()` is a static method of `Math`, you always use it as `Math.floor()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/fround.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.fround()\n\nThe **`Math.fround()`** function returns the nearest [32-bit single precision](https://en.wikipedia.org/wiki/Single-precision_floating-point_format) float representation of a number.\n\n## Syntax\n\n```js\nMath.fround(doubleFloat)\n```\n\n### Parameters\n\n- `doubleFloat`\n  - : A number.\n\n### Return value\n\nThe nearest [32-bit single precision](https://en.wikipedia.org/wiki/Single-precision_floating-point_format) float representation of `x`.\n\n## Description\n\nJavaScript uses 64-bit double floating-point numbers internally, which offer a very high precision. However, sometimes you may be working with 32-bit floating-point numbers, for example if you are reading values from a `Float32Array`. This can create confusion: checking a 64-bit float and a 32-bit float for equality may fail even though the numbers are seemingly identical.\n\nTo solve this, `Math.fround()` can be used to cast the 64-bit float to a 32-bit float. Internally, JavaScript continues to treat the number as a 64-bit float, it just performs a \"round to even\" on the 23rd bit of the mantissa, and sets all following mantissa bits to `0`. If the number is outside the range of a 32-bit float, `Infinity` or `-Infinity` is returned.\n\nBecause `fround()` is a static method of `Math`, you always use it as `Math.fround()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/hypot.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.hypot()\n\nThe **`Math.hypot()`** function returns the square root of the sum of squares of its arguments. \n\n## Syntax\n\n```js\nMath.hypot()\nMath.hypot(value0)\nMath.hypot(value0, value1)\nMath.hypot(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `value1`, …, `valueN`\n  - : Numbers.\n\n### Return value\n\nThe square root of the sum of squares of the given arguments. Returns Infinity if any of the arguments is ±Infinity. Otherwise, if at least one of the arguments is or is converted to NaN, returns NaN. Returns `0` if no arguments are given or all arguments are ±0.\n\n## Description\n\nCalculating the hypotenuse of a right triangle, or the magnitude of a complex number, uses the formula `Math.sqrt(v1*v1 + v2*v2)`, where v1 and v2 are the lengths of the triangle's legs, or the complex number's real and complex components. The corresponding distance in 2 or more dimensions can be calculated by adding more squares under the square root: `Math.sqrt(v1*v1 + v2*v2 + v3*v3 + v4*v4)`.\n\nThis function makes this calculation easier and faster; you call `Math.hypot(v1, v2)`, or `Math.hypot(v1, /* … ,*/, vN)`.\n\n`Math.hypot` also avoids overflow/underflow problems if the magnitude of your numbers is very large. The largest number you can represent in JS is [`Number.MAX_VALUE`](../Number/MAX_VALUE.mdx), which is around 10<sup>308</sup>. If your numbers are larger than about 10<sup>154</sup>, taking the square of them will result in Infinity. For example, `Math.sqrt(1e200*1e200 + 1e200*1e200) = Infinity`. If you use `hypot()` instead, you get a better answer: `Math.hypot(1e200, 1e200) = 1.4142...e+200` . This is also true with very small numbers. `Math.sqrt(1e-200*1e-200 + 1e-200*1e-200) = 0`, but `Math.hypot(1e-200, 1e-200) = 1.4142...e-200`.\n\nWith one argument, `Math.hypot()` is equivalent to [`Math.abs()`](./abs.mdx). [`Math.hypot.length`](../Function/prototype/length.mdx) is 2, which weakly signals that it's designed to handle at least two parameters.\n\nBecause `hypot()` is a static method of `Math`, you always use it as `Math.hypot()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/imul.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.imul()\n\nThe **`Math.imul()`** function returns the result of the C-like 32-bit multiplication of the two parameters.\n\n\n## Syntax\n\n```js\nMath.imul(a, b)\n```\n\n### Parameters\n\n- `a`\n  - : First number.\n- `b`\n  - : Second number.\n\n### Return value\n\nThe result of the C-like 32-bit multiplication of the given arguments.\n\n## Description\n\n`Math.imul()` allows for 32-bit integer multiplication with C-like semantics. This feature is useful for projects like [Emscripten](https://en.wikipedia.org/wiki/Emscripten).\n\nBecause `imul()` is a static method of `Math`, you always use it as `Math.imul()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nIf you use normal JavaScript floating point numbers in `imul()`, you will experience a degrade in performance. This is because of the costly conversion from a floating point to an integer for multiplication, and then converting the multiplied integer back into a floating point.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/log.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log()\n\nThe **`Math.log()`** function returns the natural logarithm (base [E](./E.mdx)) of a number.\n\n## Syntax\n\n```js\nMath.log(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe natural logarithm (base [E](./E.mdx)) of `x`. If `x` is ±0, returns [`-Infinity`](../Number/NEGATIVE_INFINITY.mdx). If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `log()` is a static method of `Math`, you always use it as `Math.log()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nIf you need the natural log of 2 or 10, use the constants `Math.LN2` or `Math.LN10`. If you need a logarithm to base 2 or 10, use `Math.log2()` or `Math.log10()`. If you need a logarithm to other bases, use `Math.log(x) / Math.log(otherBase)` as in the example below; you might want to precalculate `1 / Math.log(otherBase)` since multiplication in `Math.log(x) * constant` is much faster.\n\nBeware that positive numbers very close to 1 can suffer from loss of precision and make its natural logarithm less accurate. In this case, you may want to use `Math.log1p` instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/log10.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log10()\n\nThe **`Math.log10()`** function returns the base 10 logarithm of a number. \n\n## Syntax\n\n```js\nMath.log10(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe base 10 logarithm of `x`. If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `log10()` is a static method of `Math`, you always use it as `Math.log10()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nThis function is the equivalent of `Math.log(x) / Math.log(10)`. For `log10(e)`, use the constant `Math.LOG10E`, which is 1 / `Math.LN10`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/log1p.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log1p()\n\nThe **`Math.log1p()`** function returns the natural logarithm (base [E](./E.mdx)) of `1 + x`, where `x` is the argument.\n\n## Syntax\n\n```js\nMath.log1p(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to -1.\n\n### Return value\n\nThe natural logarithm (base [E](./E.mdx)) of `x + 1`. If `x` is -1, returns [`-Infinity`](../Number/NEGATIVE_INFINITY.mdx). If `x < -1`, returns `NaN`.\n\n## Description\n\nFor very small values of _x_, adding 1 can reduce or eliminate precision. The double floats used in JS give you about 15 digits of precision. 1 + 1e-15 \\= 1.000000000000001, but 1 + 1e-16 = 1.000000000000000 and therefore exactly 1.0 in that arithmetic, because digits past 15 are rounded off.\n\nWhen you calculate log(1 + _x_) where _x_ is a small positive number, you should get an answer very close to _x_, because <math display=\"inline\"><semantics><mrow><munder><mo movablelimits=\"true\" form=\"prefix\">lim</mo><mrow ><mi>x</mi><mo stretchy=\"false\">→</mo><mn>0</mn></mrow></munder><mfrac><mrow><mi>log</mi><mo>⁡</mo><mo stretchy=\"false\">(</mo><mn>1</mn><mo>+</mo><mi>x</mi><mo stretchy=\"false\">)</mo></mrow><mi>x</mi></mfrac><mo>=</mo><mn>1</mn></mrow></semantics></math>. If you calculate `Math.log(1 + 1.1111111111e-15)`, you should get an answer close to `1.1111111111e-15`. Instead, you will end up taking the logarithm of `1.00000000000000111022` (the roundoff is in binary, so sometimes it gets ugly), and get the answer 1.11022…e-15, with only 3 correct digits. If, instead, you calculate `Math.log1p(1.1111111111e-15)`, you will get a much more accurate answer `1.1111111110999995e-15`, with 15 correct digits of precision (actually 16 in this case).\n\nIf the value of `x` is less than -1, the return value is always `NaN`.\n\nBecause `log1p()` is a static method of `Math`, you always use it as `Math.log1p()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/log2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log2()\n\nThe **`Math.log2()`** function returns the base 2 logarithm of a number.\n\n## Syntax\n\n```js\nMath.log2(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe base 2 logarithm of `x`. If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `log2()` is a static method of `Math`, you always use it as `Math.log2()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nThis function is the equivalent of `Math.log(x) / Math.log(2)`. For `log2(e)`, use the constant `Math.LOG2E`, which is 1 / `Math.LN2`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/max.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.max()\n\nThe **`Math.max()`** function returns the largest of the numbers given as input parameters, or `-Infinity` if there are no parameters.\n\n## Syntax\n\n```js\nMath.max()\nMath.max(value0)\nMath.max(value0, value1)\nMath.max(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `value1`, `value2`, … , `valueN`\n  - : Zero or more numbers among which the largest value will be selected and returned.\n\n### Return value\n\nThe largest of the given numbers. Returns `NaN` if any of the parameters is or is converted into `NaN`. Returns `-Infinity` if no parameters are provided.\n\n## Description\n\nBecause `max()` is a static method of `Math`, you always use it as `Math.max()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n[`Math.max.length`](../Function/prototype/length.mdx) is 2, which weakly signals that it's designed to handle at least two parameters.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/min.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.min()\n\nThe **`Math.min()`** function returns the smallest of the numbers given as input parameters, or `Infinity` if there are no parameters.\n\n## Syntax\n\n```js\nMath.min()\nMath.min(value0)\nMath.min(value0, value1)\nMath.min(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `value1`, …, `valueN`\n  - : Zero or more numbers among which the lowest value will be selected and returned.\n\n### Return value\n\nThe smallest of the given numbers. Returns `NaN` if any of the parameters is or is converted into `NaN`. Returns `Infinity` if no parameters are provided.\n\n## Description\n\nBecause `min()` is a static method of `Math`, you always use it as `Math.min()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n[`Math.min.length`](../Function/prototype/length.mdx) is 2, which weakly signals that it's designed to handle at least two parameters.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/pow.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.pow()\n\nThe **`Math.pow()`** method returns the value of a base raised to a power.\n\n## Syntax\n\n```js\nMath.pow(base, exponent)\n```\n\n### Parameters\n\n- `base`\n  - : The base number.\n- `exponent`\n  - : The exponent number.\n\n### Return value\n\nA number representing `base` taken to the power of `exponent`. Returns `NaN` in one of the following cases:\n\n- `exponent` is `NaN`.\n- `base` is `NaN` and `exponent` is not `0`.\n- `base` is ±1 and `exponent` is ±`Infinity`.\n- `base < 0` and `exponent` is not an integer.\n\n## Description\n\n`Math.pow()` is equivalent to the `**` operator, except `Math.pow()` only accepts numbers.\n\n`Math.pow(NaN, 0)` (and the equivalent `NaN ** 0`) is the only case where `NaN` doesn't propagate through mathematical operations — it returns `1` despite the operand being `NaN`. In addition, the behavior where `base` is 1 and `exponent` is non-finite (±Infinity or `NaN`) is different from IEEE 754, which specifies that the result should be 1, whereas JavaScript returns `NaN` to preserve backward compatibility with its original behavior.\n\nBecause `pow()` is a static method of `Math`, use it as `Math.pow()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/random.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.random()\n\nThe **`Math.random()`** function returns a floating-point, pseudo-random number that's greater than or equal to 0 and less than 1, with approximately uniform distribution over that range — which you can then scale to your desired range. The implementation selects the initial seed to the random number generation algorithm; it cannot be chosen or reset by the user.\n\n> **Note:** `Math.random()` _does not_ provide cryptographically secure random numbers. Do not use them for anything related to security. Use the Web Crypto API instead, and more precisely the `crypto.getRandomValues()` method.\n\n## Syntax\n\n```js\nMath.random()\n```\n\n### Return value\n\nA floating-point, pseudo-random number between 0 (inclusive) and 1 (exclusive).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/round.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.round()\n\nThe **`Math.round()`** function returns the value of a number rounded to the nearest integer.\n\n## Syntax\n\n```js\nMath.round(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe value of `x` rounded to the nearest integer.\n\n## Description\n\nIf the fractional portion of the argument is greater than 0.5, the argument is rounded to the integer with the next higher absolute value. If it is less than 0.5, the argument is rounded to the integer with the lower absolute value. If the fractional portion is exactly 0.5, the argument is rounded to the next integer in the direction of +∞.\n\n> **Note:** This differs from many languages' `round()` functions, which often round half-increments _away from zero_, giving a different result in the case of negative numbers with a fractional part of exactly 0.5.\n\n`Math.round(x)` is not exactly the same as [`Math.floor(x + 0.5)`](./floor.mdx). When `x` is -0, or -0.5 ≤ x < 0, `Math.round(x)` returns -0, while `Math.floor(x + 0.5)` returns 0. However, neglecting that difference and potential precision errors, `Math.round(x)` and `Math.floor(x + 0.5)` are generally equivalent.\n\nBecause `round()` is a static method of `Math`, you always use it as `Math.round()`, rather than as a method of a `Math` object you created (`Math` has no constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/sign.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sign()\n\nThe **`Math.sign()`** function returns 1 or -1, indicating the sign of the number passed as argument. If the input is 0 or -0, it will be returned as-is.\n\n## Syntax\n\n```js\nMath.sign(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nA number representing the sign of `x`:\n\n- If `x` is positive, returns `1`.\n- If `x` is negative, returns `-1`.\n- If `x` is positive zero, returns `0`.\n- If `x` is negative zero, returns `-0`.\n- Otherwise, returns `NaN`.\n\n## Description\n\nBecause `sign()` is a static method of `Math`, you always use it as `Math.sign()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/sin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sin()\n\nThe **`Math.sin()`** function returns the sine of a number in radians.\n\n## Syntax\n\n```js\nMath.sin(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number representing an angle in radians.\n\n### Return value\n\nThe sine of `x`, between -1 and 1, inclusive. If `x` is `Infinity`, `-Infinity`, or `NaN`, returns `NaN`.\n\n## Description\n\nBecause `sin()` is a static method of `Math`, you always use it as `Math.sin()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/sinh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sinh()\n\nThe **`Math.sinh()`** function returns the hyperbolic sine of a number. \n\n## Syntax\n\n```js\nMath.sinh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe hyperbolic sine of `x`.\n\n## Description\n\nBecause `sinh()` is a static method of `Math`, you always use it as `Math.sinh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/sqrt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sqrt()\n\nThe **`Math.sqrt()`** function returns the square root of a number.\n\n## Syntax\n\n```js\nMath.sqrt(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe square root of `x`, a nonnegative number. If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `sqrt()` is a static method of `Math`, you always use it as `Math.sqrt()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/tan.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.tan()\n\nThe **`Math.tan()`** function returns the tangent of a number in radians.\n\n\n## Syntax\n\n```js\nMath.tan(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number representing an angle in radians.\n\n### Return value\n\nThe tangent of `x`. If `x` is `Infinity`, `-Infinity`, or `NaN`, returns `NaN`.\n\n> **Note:** Due to floating point precision, it's not possible to obtain the exact value π/2, so the result is always finite if not `NaN`.\n\n## Description\n\nBecause `tan()` is a static method of `Math`, you always use it as `Math.tan()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/tanh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.tanh()\n\nThe **`Math.tanh()`** function returns the hyperbolic tangent of a number. \n\n## Syntax\n\n```js\nMath.tanh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe hyperbolic tangent of `x`.\n\n## Description\n\nBecause `tanh()` is a static method of `Math`, you always use it as `Math.tanh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Math/trunc.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.trunc()\n\nThe **`Math.trunc()`** function returns the integer part of a number by removing any fractional digits.\n\n## Syntax\n\n```js\nMath.trunc(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe integer part of `x`.\n\n## Description\n\nUnlike the other three `Math` methods: `Math.floor()`, `Math.ceil()` and `Math.round()`, the way `Math.trunc()` works is very simple. It _truncates_ (cuts off) the dot and the digits to the right of it, no matter whether the argument is a positive or negative number.\n\nBecause `trunc()` is a static method of `Math`, you always use it as `Math.trunc()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/NaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# NaN\n\nThe global **`NaN`** property is a value representing Not-A-Number.\n\n## Value\n\nThe same number value as [`Number.NaN`](./Number/NaN.mdx).\n\n## Description\n\n`NaN` is a property of the _global object_. In other words, it is a variable in global scope.\n\nIn modern browsers, `NaN` is a non-configurable, non-writable property. Even when this is not the case, avoid overriding it.\n\nThere are five different types of operations that return `NaN`:\n\n- Failed number conversion (e.g. explicit ones like `parseInt(\"blabla\")`, `Number(undefined)`, or implicit ones like `Math.abs(undefined)`)\n- Math operation where the result is not a real number (e.g. `Math.sqrt(-1)`)\n- Indeterminate form (e.g. `0 * Infinity`, `1 ** Infinity`, `Infinity / Infinity`, `Infinity - Infinity`)\n- A method or expression whose operand is or gets coerced to `NaN` (e.g. `7 ** NaN`, `7 * \"blabla\"`) — this means `NaN` is contagious\n- Other cases where an invalid value is to be represented as a number (e.g. an invalid `new Date(\"blabla\").getTime()`, `\"\".charCodeAt(1)`)\n\n`NaN` and its behaviors are not invented by JavaScript. Its semantics in floating point arithmetic (including that `NaN !== NaN`) are specified by [IEEE 754](https://en.wikipedia.org/wiki/Double_precision_floating-point_format). `NaN`'s behaviors include:\n\n- If `NaN` is involved in a mathematical operation (but not [bitwise operations](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators#bitwise_shift_operators)), the result is usually also `NaN`. (See see [silently escaping NaN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN#silently_escaping_nan) for a counter-example.)\n- When `NaN` is one of the operands of any relational comparison (`>`, `<`, `>=`, `<=`), the result is always `false`.\n- `NaN` compares unequal (via [`==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Equality), [`!=`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Inequality), [`===`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality), and [`!==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_inequality)) to any other value — including to another `NaN` value.\n\n`NaN` is also one of the [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) values in JavaScript.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Number/MAX_SAFE_INTEGER.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MAX_SAFE_INTEGER\n\nThe **`Number.MAX_SAFE_INTEGER`** constant represents the maximum safe integer in JavaScript (2<sup>53</sup> – 1).\n\nFor larger integers, consider using `BigInt`.\n\n## Value\n\n`9007199254740991` (9,007,199,254,740,991, or \\~9 quadrillion).\n\n## Description\n\n[Double precision floating point format](https://en.wikipedia.org/wiki/Double_precision_floating-point_format) only has 52 bits to represent the [mantissa](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_encoding), so it can only safely represent integers between -(2<sup>53</sup> – 1) and 2<sup>53</sup> – 1. \"Safe\" in this context refers to the ability to represent integers exactly and to compare them correctly. For example, `Number.MAX_SAFE_INTEGER + 1 === Number.MAX_SAFE_INTEGER + 2` will evaluate to true, which is mathematically incorrect. See `Number.isSafeInteger()` for more information.\n\nBecause `MAX_SAFE_INTEGER` is a static property of `Number`, you always use it as `Number.MAX_SAFE_INTEGER`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Number/MAX_VALUE.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MAX_VALUE\n\nThe **`Number.MAX_VALUE`** property represents the maximum numeric value representable in JavaScript.\n\n## Value\n\n2<sup>1024</sup> - 1, or approximately `1.7976931348623157E+308`.\n\n## Description\n\nValues larger than `MAX_VALUE` are represented as [`Infinity`](../../globals/Infinity.mdx) and will lose their actual value.\n\nBecause `MAX_VALUE` is a static property of `Number`, you always use it as `Number.MAX_VALUE`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Number/MIN_SAFE_INTEGER.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MIN_SAFE_INTEGER\n\nThe **`Number.MIN_SAFE_INTEGER`** constant represents the minimum safe integer in JavaScript, or -(2<sup>53</sup> - 1).\n\nTo represent integers smaller than this, consider using `BigInt`.\n\n## Value\n\n`-9007199254740991` (-9,007,199,254,740,991, or about -9 quadrillion).\n\n## Description\n\n[Double precision floating point format](https://en.wikipedia.org/wiki/Double_precision_floating-point_format) only has 52 bits to represent the [mantissa](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_encoding), so it can only safely represent integers between -(2<sup>53</sup> – 1) and 2<sup>53</sup> – 1. Safe in this context refers to the ability to represent integers exactly and to correctly compare them. For example, `Number.MIN_SAFE_INTEGER - 1 === Number.MIN_SAFE_INTEGER - 2` will evaluate to true, which is mathematically incorrect. See `Number.isSafeInteger()` for more information.\n\nBecause `MIN_SAFE_INTEGER` is a static property of `Number`, you always use it as `Number.MIN_SAFE_INTEGER`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Number/MIN_VALUE.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MIN_VALUE\n\nThe **`Number.MIN_VALUE`** property represents the smallest positive numeric value representable in JavaScript.\n\n## Value\n\n2<sup>-1074</sup>, or `5E-324`.\n\n## Description\n\n`Number.MIN_VALUE` is the smallest positive number (not the most negative number) that can be represented within float precision — in other words, the number closest to 0. The ECMAScript spec doesn't define a precise value that implementations are required to support — instead the spec says, _\"must be the smallest non-zero positive value that can actually be represented by the implementation\"_. This is because small IEEE-754 floating point numbers are [denormalized](https://en.wikipedia.org/wiki/Subnormal_number), but implementations are not required to support this representation, in which case `Number.MIN_VALUE` may be larger.\n\nIn practice, its precise value in mainstream engines like V8 (used by Chrome, Edge, Node.js), SpiderMonkey (used by Firefox), and JavaScriptCore (used by Safari) is 2<sup>-1074</sup>, or `5E-324`.\n\nBecause `MIN_VALUE` is a static property of `Number`, you always use it as `Number.MIN_VALUE`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Number/NEGATIVE_INFINITY.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.NEGATIVE_INFINITY\n\nThe **`Number.NEGATIVE_INFINITY`** property represents the negative Infinity value.\n\n## Value\n\nThe same as the negative value of the global [`Infinity`](../../globals/Infinity.mdx) property.\n\n## Description\n\nThe `Number.NEGATIVE_INFINITY` value behaves slightly differently than mathematical infinity:\n\n- Any positive value, including `Number.POSITIVE_INFINITY`, multiplied by `Number.NEGATIVE_INFINITY` is `Number.NEGATIVE_INFINITY`.\n- Any negative value, including `Number.NEGATIVE_INFINITY`, multiplied by `Number.NEGATIVE_INFINITY` is `Number.POSITIVE_INFINITY`.\n- Any positive value divided by `Number.NEGATIVE_INFINITY` is [negative zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754)).\n- Any negative value divided by `Number.NEGATIVE_INFINITY` is [positive zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754)).\n- Zero multiplied by `Number.NEGATIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- [`NaN`](../../globals/NaN.mdx) multiplied by `Number.NEGATIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- `Number.NEGATIVE_INFINITY`, divided by any negative value except `Number.NEGATIVE_INFINITY`, is `Number.POSITIVE_INFINITY`.\n- `Number.NEGATIVE_INFINITY`, divided by any positive value except `Number.POSITIVE_INFINITY`, is `Number.NEGATIVE_INFINITY`.\n- `Number.NEGATIVE_INFINITY`, divided by either `Number.NEGATIVE_INFINITY` or `Number.POSITIVE_INFINITY`, is [`NaN`](../../globals/NaN.mdx).\n- `x > Number.NEGATIVE_INFINITY` is true for any number _x_ that isn't `Number.NEGATIVE_INFINITY`.\n\nYou might use the `Number.NEGATIVE_INFINITY` property to indicate an error condition that returns a finite number in case of success. Note, however, that [`NaN`](../../globals/NaN.mdx) would be more appropriate in such a case.\n\nBecause `Number.NEGATIVE_INFINITY` is a static property of `Number`, you always use it as `Number.NEGATIVE_INFINITY`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Number/NaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.NaN\n\nThe **`Number.NaN`** property represents Not-A-Number, which is equivalent to [description for the global property](../../globals/NaN.mdx). For more information about the behaviors of `NaN`, see the [`NaN`](../../globals/NaN.mdx).\n\n## Value\n\nThe number value [`NaN`](../../globals/NaN.mdx).\n\n## Description\n\nBecause `NaN` is a static property of `Number`, you always use it as `Number.NaN`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Number/Number.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number() constructor\n\nThe **`Number()` constructor** creates a `Number` object. When called instead as a function, it performs type conversion to a primitive number, which is usually more useful.\n\n## Syntax\n\n```js\nnew Number(value)\nNumber(value)\n```\n\n> **Note:** `Number()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\n- `value`\n  - : The numeric value of the object being created.\n\n### Return value\n\nWhen `Number` is called as a constructor (with `new`), it creates a `Number` object, which is **not** a primitive.\n\nWhen `Number` is called as a function, it [coerces the parameter to a number primitive](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_coercion). [BigInts](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/BigInt) are converted to numbers. If the value can't be converted, it returns [`NaN`](../../globals/NaN.mdx).\n\n> **Warning:** You should rarely find yourself using `Number` as a constructor.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Number/POSITIVE_INFINITY.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.POSITIVE_INFINITY\n\nThe **`Number.POSITIVE_INFINITY`** property represents the positive Infinity value.\n\n## Value\n\nThe same as the value of the global [`Infinity`](../../globals/Infinity.mdx) property.\n\n## Description\n\nThe `Number.POSITIVE_INFINITY` value behaves slightly differently than mathematical infinity:\n\n- Any positive value, including `Number.POSITIVE_INFINITY`, multiplied by `Number.POSITIVE_INFINITY` is `Number.POSITIVE_INFINITY`.\n- Any negative value, including `Number.NEGATIVE_INFINITY`, multiplied by `Number.POSITIVE_INFINITY` is `Number.NEGATIVE_INFINITY`.\n- Any positive number divided by `Number.POSITIVE_INFINITY` is [positive zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754)).\n- Any negative number divided by `Number.POSITIVE_INFINITY` is [negative zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754).\n- Zero multiplied by `Number.POSITIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- `NaN` multiplied by `Number.POSITIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- `Number.POSITIVE_INFINITY`, divided by any negative value except `Number.NEGATIVE_INFINITY`, is `Number.NEGATIVE_INFINITY`.\n- `Number.POSITIVE_INFINITY`, divided by any positive value except `Number.POSITIVE_INFINITY`, is `Number.POSITIVE_INFINITY`.\n- `Number.POSITIVE_INFINITY`, divided by either `Number.NEGATIVE_INFINITY` or `Number.POSITIVE_INFINITY`, is [`NaN`](../../globals/NaN.mdx).\n- `Number.POSITIVE_INFINITY > x` is true for any number _x_ that isn't `Number.POSITIVE_INFINITY`.\n\nYou might use the `Number.POSITIVE_INFINITY` property to indicate an error condition that returns a finite number in case of success. Note, however, that [`NaN`](../../globals/NaN.mdx) would be more appropriate in such a case.\n\nBecause `Number.POSITIVE_INFINITY` is a static property of `Number`, you always use it as `Number.POSITIVE_INFINITY`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Number/epsilon.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.EPSILON\n\nThe **`Number.EPSILON`** property represents the difference between 1 and the smallest floating point number greater than 1.\n\n## Value\n\n2<sup>-52</sup>, or approximately `2.2204460492503130808472633361816E-16`.\n\n## Description\n\n`Number.EPSILON` is the difference between 1 and the next greater number representable in the Number format, because [double precision floating point format](https://en.wikipedia.org/wiki/Double_precision_floating-point_format) only has 52 bits to represent the [mantissa](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_encoding), and the lowest bit has a significance of 2<sup>-52</sup>.\n\nNote that the absolute accuracy of floating numbers decreases as the number gets larger, because the exponent grows while the mantissa's accuracy stays the same. `Number.MIN_VALUE` is the smallest representable positive number, which is much smaller than `Number.EPSILON`.\n\nBecause `EPSILON` is a static property of `Number`, you always use it as `Number.EPSILON`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Number/isFinite.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isFinite()\n\nThe **`Number.isFinite()`** method determines whether the passed value is a finite number — that is, it checks that a given value is a number, and the number is neither positive [`Infinity`](../../globals/Infinity.mdx), negative `Infinity`, nor [`NaN`](../../globals/NaN.mdx).\n\n## Syntax\n\n```js\nNumber.isFinite(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested for finiteness.\n\n### Return value\n\nThe boolean value `true` if the given value is a finite number. Otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Number/isInteger.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isInteger()\n\nThe **`Number.isInteger()`** method determines whether the passed value is an integer.\n\n## Syntax\n\n```js\nNumber.isInteger(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested for being an integer.\n\n### Return value\n\nThe boolean value `true` if the given value is an integer. Otherwise `false`.\n\n## Description\n\nIf the target value is an integer, return `true`, otherwise return `false`. If the value is [`NaN`](../../globals/NaN.mdx) or [`Infinity`](../../globals/Infinity.mdx), return `false`. The method will also return `true` for floating point numbers that can be represented as integer. It will always return `false` if the value is not a number.\n\nNote that some number literals, while looking like non-integers, actually represent integers — due to the precision limit of ECMAScript floating-point number encoding (IEEE-754). For example, `5.0000000000000001` only differs from `5` by `1e-16`, which is too small to be represented. (For reference, [`Number.EPSILON`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/EPSILON) stores the distance between 1 and the next representable floating-point number greater than 1, and that is about `2.22e-16`.) Therefore, `5.0000000000000001` will be represented with the same encoding as `5`, thus making `Number.isInteger(5.0000000000000001)` return `true`.\n\nIn a similar sense, numbers around the magnitude of [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER) will suffer from loss of precision and make `Number.isInteger` return `true` even when it's not an integer. (The actual threshold varies based on how many bits are needed to represent the decimal — for example, `Number.isInteger(4500000000000000.1)` is `true`, but `Number.isInteger(4500000000000000.5)` is `false`.)\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Number/isNaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isNaN()\n\nThe **`Number.isNaN()`** method determines whether the passed value is the number value [`NaN`](../../globals/NaN.mdx), and returns `false` if the input is not of the Number type. It is a more robust version of the original, global `isNaN()` function.\n\n## Syntax\n\n```js\nNumber.isNaN(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested for [`NaN`](../../globals/NaN.mdx).\n\n### Return value\n\nThe boolean value `true` if the given value is a number with value [`NaN`](../../globals/NaN.mdx). Otherwise, `false`.\n\n## Description\n\nThe function `Number.isNaN()` provides a convenient way to check for equality with `NaN`. Note that you cannot test for equality with `NaN` using either the [`==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Equality) or [`===`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) operators, because unlike all other value comparisons in JavaScript, these evaluate to `false` whenever one operand is [`NaN`](../../globals/NaN.mdx), even if the other operand is also [`NaN`](../../globals/NaN.mdx).\n\nSince `x !== x` is only true for `NaN` among all possible JavaScript values, `Number.isNaN(x)` can also be replaced with a test for `x !== x`, despite the latter being less readable.\n\nAs opposed to the global `isNaN()` function, the `Number.isNaN()` method doesn't force-convert the parameter to a number. This makes it safe to pass values that would normally convert to [`NaN`](../../globals/NaN.mdx) but aren't actually the same value as [`NaN`](../../globals/NaN.mdx). This also means that only values of the Number type that are also [`NaN`](../../globals/NaN.mdx) return `true`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Number/isSafeInteger.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isSafeInteger()\n\nThe **`Number.isSafeInteger()`** method determines whether the provided value is a number that is a _safe integer_.\n\n## Syntax\n\n```js\nNumber.isSafeInteger(testValue)\n```\n\n### Parameters\n\n- `testValue`\n  - : The value to be tested for being a safe integer.\n\n### Return value\n\nThe boolean value `true` if the given value is a number that is a safe integer. Otherwise `false`.\n\n## Description\n\nThe safe integers consist of all integers from -(2<sup>53</sup> - 1) to 2<sup>53</sup> - 1, inclusive (±9,007,199,254,740,991). A safe integer is an integer that:\n\n- can be exactly represented as an IEEE-754 double precision number, and\n- whose IEEE-754 representation cannot be the result of rounding any other integer to fit the IEEE-754 representation.\n\nFor example, 2<sup>53</sup> - 1 is a safe integer: it can be exactly represented, and no other integer rounds to it under any IEEE-754 rounding mode. In contrast, 2<sup>53</sup> is _not_ a safe integer: it can be exactly represented in IEEE-754, but the integer 2<sup>53</sup> + 1 can't be directly represented in IEEE-754 but instead rounds to 2<sup>53</sup> under round-to-nearest and round-to-zero rounding.\n\nHandling values larger or smaller than \\~9 quadrillion with full precision requires using an [arbitrary precision arithmetic library](https://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic). See [What Every Programmer Needs to Know about Floating Point Arithmetic](https://floating-point-gui.de/) for more information on floating point representations of numbers.\n\nFor larger integers, consider using the `BigInt` type.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Number/parseFloat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.parseFloat()\n\nThe **`Number.parseFloat()`** method parses an argument and returns a floating point number. If a number cannot be parsed from the argument, it returns [`NaN`](../../globals/NaN.mdx).\n\n## Syntax\n\n```js\nNumber.parseFloat(string)\n```\n\n### Parameters\n\n- `string`\n  - : The value to parse, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). Leading whitespace in this argument is ignored.\n\n### Return value\n\nA floating point number parsed from the given `string`.\n\nOr [`NaN`](../../globals/NaN.mdx) when the first non-whitespace character cannot be converted to a number.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Number/parseInt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.parseInt()\n\nThe **`Number.parseInt()`** method parses a string argument and\nreturns an integer of the specified radix or base.\n\n## Syntax\n\n```js\nNumber.parseInt(string)\nNumber.parseInt(string, radix)\n```\n\n### Parameters\n\n- `string`\n  - : The value to parse, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). Leading whitespace in this argument is ignored.\n- `radix` _**optional**_\n\n  - : An integer between `2` and `36` that represents the\n    _radix_ (the base in mathematical numeral systems) of the\n    `string`.\n\n    If `radix` is undefined or `0`, it is assumed to be `10` except when the number begins with the code unit pairs `0x` or `0X`, in which case a radix of `16` is assumed.\n\n### Return value\n\nAn integer parsed from the given `string`.\n\nIf the `radix` is smaller than `2` or bigger than\n`36`, or the first non-whitespace character cannot be converted to a number,\n[`NaN`](../../globals/NaN.mdx) is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Number/prototype/toExponential.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toExponential()\n\nThe **`toExponential()`** method returns a string representing\nthe `Number` object in exponential notation.\n\n## Syntax\n\n```js\ntoExponential()\ntoExponential(fractionDigits)\n```\n\n### Parameters\n\n- `fractionDigits` _**optional**_\n  - : Optional. An integer specifying the number of digits after the decimal point.\n    Defaults to as many digits as necessary to specify the number.\n\n### Return value\n\nA string representing the given `Number` object in exponential notation\nwith one digit before the decimal point, rounded to\n`fractionDigits` digits after the decimal point.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : If `fractionDigits` is too small or too large. Values between\n    `0` and `100`, inclusive, will not cause a\n    [`RangeError`](../../../globals/RangeError/RangeError.mdx).\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If this method is invoked on an object that is not a `Number`.\n\n## Description\n\nIf the `fractionDigits` argument is omitted, the number of digits\nafter the decimal point defaults to the number of digits necessary to represent the\nvalue uniquely.\n\nIf you use the `toExponential()` method for a numeric literal and the\nnumeric literal has no exponent and no decimal point, leave whitespace(s) before the dot\nthat precedes the method call to prevent the dot from being interpreted as a decimal\npoint.\n\nIf a number has more digits than requested by the\n`fractionDigits` parameter, the number is rounded to the nearest\nnumber represented by `fractionDigits` digits. See the discussion\nof rounding in the description of the [`Number.prototype.toFixed()`](../../../globals/Number/prototype/toFixed.mdx) method, which also applies to `toExponential()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Number/prototype/toFixed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toFixed()\n\nThe **`toFixed()`** method formats a number using fixed-point notation.\n\n## Syntax\n\n```js\ntoFixed()\ntoFixed(digits)\n```\n\n### Parameters\n\n- `digits` _**optional**_\n  - : The number of digits to appear after the decimal point; should be a value between `0` and `100`, inclusive. If this argument is omitted, it is treated as `0`.\n\n### Return value\n\nA string representing the given number using fixed-point notation.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : If `digits` is smaller than `0`, larger than `100`, or is `NaN`.\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If this method is invoked on an object that is not a `Number`.\n\n## Description\n\nThe `toFixed()` method returns a string representation of `numObj` that does not use exponential notation and has exactly `digits` digits after the decimal place. The number is rounded if necessary, and the fractional part is padded with zeros if necessary so that it has the specified length.\n\nIf the absolute value of `numObj` is greater or equal to 10<sup>21</sup>, this method uses the same algorithm as [`Number.prototype.toString()`](../../../globals/Number/prototype/toString.mdx) and returns a string in exponential notation. `toFixed()` returns `\"Infinity\"`, `\"NaN\"`, or `\"-Infinity\"` if the value of `numObj` is non-finite.\n\nThe output of `toFixed()` may be more precise than [`toString()`](../../../globals/Number/prototype/toString.mdx) for some values, because `toString()` only prints enough significant digits to distinguish the number from adjacent number values. For example:\n\n```js\n(1000000000000000128).toString(); // '1000000000000000100'\n(1000000000000000128).toFixed(0); // '1000000000000000128'\n```\n\nHowever, choosing a `digits` precision that's too high can return unexpected results, because decimal fractional numbers cannot be represented precisely in floating point. For example:\n\n```js\n0.3.toFixed(50); // '0.29999999999999998889776975374843459576368331909180'\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Number/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string with a language-sensitive representation of this number. In implementations with [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) support, this method simply calls `Intl.NumberFormat`.\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` parameters customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat), these parameters correspond exactly to the [`Intl.NumberFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) constructor's parameters. Implementations without `Intl.NumberFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#locales) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored.\n\nSee the [`Intl.NumberFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string with a language-sensitive representation of the given number.\n\nIn implementations with `Intl.NumberFormat`, this is equivalent to `new Intl.NumberFormat(locales, options).format(number)`.\n\n## Performance\n\nWhen formatting large numbers of numbers, it is better to create a\n`Intl.NumberFormat` object and use the function provided by its\n`format` property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Number/prototype/toPrecision.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toPrecision()\n\nThe **`toPrecision()`** method returns a string representing\nthe `Number` object to the specified precision.\n\n## Syntax\n\n```js\ntoPrecision()\ntoPrecision(precision)\n```\n\n### Parameters\n\n- `precision` _**optional**_\n  - : An integer specifying the number of significant digits.\n\n### Return value\n\nA string representing a `Number` object in fixed-point or exponential\nnotation rounded to `precision` significant digits. See the discussion of\nrounding in the description of the [`Number.prototype.toFixed()`](../../../globals/Number/prototype/toFixed.mdx) method,\nwhich also applies to `toPrecision()`.\n\nIf the `precision` argument is omitted, behaves as\n[`Number.prototype.toString()`](../../../globals/Number/prototype/toString.mdx). If the `precision` argument is a\nnon-integer value, it is rounded to the nearest integer.\n\n### Exceptions\n\n- `RangeError`\n  - : If `precision` is not between `1` and `100`\n    (inclusive), a [`RangeError`](../../../globals/RangeError/RangeError.mdx) is thrown. Implementations are allowed to\n    support larger and smaller values as well. ECMA-262 only requires a precision of up to\n    21 significant digits.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Number/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified number value.\n\n## Syntax\n\n```js\ntoString()\ntoString(radix)\n```\n\n### Parameters\n\n- `radix` _**optional**_\n  - : An integer in the range `2` through `36` specifying the base to use for representing the number value. Defaults to 10.\n\n### Return value\n\nA string representing the specified number value.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `radix` is less than 2 or greater than 36.\n\n## Description\n\nThe `Number` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For `Number` values, the `toString` method returns a string representation of the value in the specified radix.\n\nFor radixes above 10, the letters of the alphabet indicate digits greater than 9. For example, for hexadecimal numbers (base 16) `a` through `f` are used.\n\nIf the specified number value is negative, the sign is preserved. This is the case even if the radix is 2; the string returned is the positive binary representation of the number value preceded by a `-` sign, **not** the two's complement of the number value.\n\nBoth `0` and `-0` have `\"0\"` as their string representation. [`Infinity`](../../../globals/Infinity.mdx) returns `\"Infinity\"` and [`NaN`](../../../globals/NaN.mdx) returns `\"NaN\"`.\n\nIf the number is not a whole number, the decimal point `.` is used to separate the decimal places. [Scientific notation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#exponential) is used if the radix is 10 and the number's magnitude (ignoring sign) is greater than or equal to 10<sup>21</sup> or less than 10<sup>-6</sup>. In this case, the returned string always explicitly specifies the sign of the exponent.\n\n```js\nconsole.log((10 ** 21.5).toString()); // \"3.1622776601683794e+21\"\nconsole.log((10 ** 21.5).toString(8)); // \"526665530627250154000000\"\n```\n\nThe `toString()` method requires its `this` value to be a `Number` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to number values.\n\nBecause `Number` doesn't have a [`[Symbol.toPrimitive]()`](../../../globals/Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `Number` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, Number _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — rather, they are directly converted using the same algorithm as the initial `toString()` implementation.\n\n```js\nNumber.prototype.toString = () => \"Overridden\";\nconsole.log(`${1}`); // \"1\"\nconsole.log(`${new Number(1)}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Number/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.valueOf()\n\nThe **`valueOf()`** method returns the wrapped primitive value\nof a `Number` object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nA number representing the primitive value of the specified `Number` object.\n\n## Description\n\nThis method is usually called internally by JavaScript and not explicitly in web code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Object/Object.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object()\n\nThe **`Object` constructor** turns the input into an object. Its behavior depends on the input's type.\n\n- If the value is [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../globals/undefined.mdx), it creates and returns an empty object.\n- Otherwise, it returns an object of a Type that corresponds to the given value.\n- If the value is an object already, it returns the value.\n\n## Syntax\n\n```js\nnew Object(value)\nObject(value)\n```\n\n> **Note:** `Object()` can be called with or without `new`. Both create a new object.\n\n### Parameters\n\n- `value`\n  - : Any value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Object/assign.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.assign()\n\nThe **`Object.assign()`** method\ncopies all [enumerable](../../globals/Object/prototype/propertyIsEnumerable.mdx)\n[own properties](../../globals/Object/hasOwn.mdx) from one or more\n_source objects_ to a _target object_. It returns the modified target\nobject.\n\n## Syntax\n\n```js\nObject.assign(target, ...sources)\n```\n\n### Parameters\n\n- `target`\n  - : The target object — what to apply the sources' properties to, which is returned\n    after it is modified.\n- `sources`\n  - : The source object(s) — objects containing the properties you want to apply.\n\n### Return value\n\nThe target object.\n\n## Description\n\nProperties in the target object are overwritten by properties in the sources if they\nhave the same \"key\". Later sources' properties overwrite earlier ones.\n\nThe `Object.assign()` method only copies _enumerable_ and\n_own_ properties from a source object to a target object. It uses\n`[[Get]]` on the source and `[[Set]]` on the target, so it will\ninvoke [getters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/get) and [setters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/set). Therefore it\n_assigns_ properties, versus copying or defining new properties. This may make it\nunsuitable for merging new properties into a prototype if the merge sources contain\ngetters.\n\nFor copying property definitions (including their enumerability) into prototypes, use\n[`Object.getOwnPropertyDescriptor()`](../../globals/Object/getOwnPropertyDescriptor.mdx) and\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx) instead.\n\nBoth `String` and `Symbol` properties are copied.\n\nIn case of an error, for example if a property is non-writable, a\n[`TypeError`](../../globals/TypeError/TypeError.mdx) is raised, and the `target` object is\nchanged if any properties are added before the error is raised.\n\n> **Note:** `Object.assign()` does not throw on\n> [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../globals/undefined.mdx) sources.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Object/create.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.create()\n\nThe **`Object.create()`** method creates a new object, using an existing object as the prototype of the newly created object.\n\n## Syntax\n\n```js\nObject.create(proto)\nObject.create(proto, propertiesObject)\n```\n\n### Parameters\n\n- `proto`\n  - : The object which should be the prototype of the newly-created object.\n- `propertiesObject` _**optional**_\n  - : If specified and not [`undefined`](../../globals/undefined.mdx), an object whose [enumerable own properties](https://developer.mozilla.org/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) specify property descriptors to be added to the newly-created object, with the corresponding property names. These properties correspond to the second argument of [`Object.defineProperties()`](../../globals/Object/defineProperties.mdx).\n\n### Return value\n\nA new object with the specified prototype object and properties.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if `proto` is neither [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) nor an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Object/defineProperties.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.defineProperties()\n\nThe **`Object.defineProperties()`** method defines new or\nmodifies existing properties directly on an object, returning the object.\n\n## Syntax\n\n```js\nObject.defineProperties(obj, props)\n```\n\n### Parameters\n\n- `obj`\n  - : The object on which to define or modify properties.\n- `props`\n\n  - : An object whose keys represent the names of properties to be defined or modified and\n    whose values are objects describing those properties. Each value in `props`\n    must be either a data descriptor or an accessor descriptor; it cannot be both (see\n    [`Object.defineProperty()`](../../globals/Object/defineProperty.mdx) for more details).\n\n    Data descriptors and accessor descriptors may optionally contain the following keys:\n\n    - `configurable`\n      - : `true` if and only if the type of this property descriptor may be\n        changed and if the property may be deleted from the corresponding object.\n        **Defaults to `false`.**\n    - `enumerable`\n      - : `true` if and only if this property shows up during enumeration of\n        the properties on the corresponding object.\n        **Defaults to `false`.**\n\n    A data descriptor also has the following optional keys:\n\n    - `value`\n      - : The value associated with the property. Can be any valid JavaScript value\n        (number, object, function, etc.).\n        **Defaults to [`undefined`](../../globals/undefined.mdx).**\n    - `writable`\n      - : `true` if and only if the value associated with the property may be\n        changed with an assignment operator.\n        **Defaults to `false`.**\n\n    An accessor descriptor also has the following optional keys:\n\n    - `get`\n      - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx)\n        if there is no getter. The function's return value will be used as the value of\n        the property.\n        **Defaults to [`undefined`](../../globals/undefined.mdx).**\n    - `set`\n      - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx)\n        if there is no setter. The function will receive as its only argument the new\n        value being assigned to the property.\n        **Defaults to [`undefined`](../../globals/undefined.mdx).**\n\n    If a descriptor has neither of `value`, `writable`,\n    `get` and `set` keys, it is treated as a data descriptor. If a\n    descriptor has both `value` or `writable` and `get`\n    or `set` keys, an exception is thrown.\n\n### Return value\n\nThe object that was passed to the function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Object/defineProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.defineProperty()\n\nThe static method **`Object.defineProperty()`** defines a new\nproperty directly on an object, or modifies an existing property on an object, and\nreturns the object.\n\n## Syntax\n\n```js\nObject.defineProperty(obj, prop, descriptor)\n```\n\n### Parameters\n\n- `obj`\n  - : The object on which to define the property.\n- `prop`\n  - : The name or `Symbol` of the property to be defined or modified.\n- `descriptor`\n  - : The descriptor for the property being defined or modified.\n\n### Return value\n\nThe object that was passed to the function.\n\n## Description\n\nThis method allows a precise addition to or modification of a property on an object.\nNormal property addition through assignment creates properties which show up during\nproperty enumeration (`for...in` loop or\n[`Object.keys`](../../globals/Object/keys.mdx) method), whose values may be changed, and which may be\ndeleted. This method allows these extra details\nto be changed from their defaults. By default, properties added using\n`Object.defineProperty()` are not writable, not enumerable, and not configurable.\n\nProperty descriptors present in objects come in two main flavors: data descriptors and\naccessor descriptors. A **data descriptor** is a property that has a\nvalue, which may or may not be writable. An **accessor descriptor** is a\nproperty described by a getter-setter pair of functions. A descriptor must be one of\nthese two flavors; it cannot be both.\n\nBoth data and accessor descriptors are objects. They share the following optional keys\n(please note: the **defaults** mentioned here are in the case of defining\nproperties using `Object.defineProperty()`):\n\n- `configurable`\n\n  - : when this is set to `false`,\n\n    - the type of this property cannot be changed between data property and accessor property, and\n    - the property may not be deleted, and\n    - other attributes of its descriptor cannot be changed (however, if it's a data descriptor with `writable: true`, the `value` can be changed, and `writable` can be changed to `false`).\n\n    **Defaults to `false`.**\n\n- `enumerable`\n  - : `true` if and only if this property shows up during enumeration of the\n    properties on the corresponding object.\n    **Defaults to `false`.**\n\nA **data descriptor** also has the following optional keys:\n\n- `value`\n  - : The value associated with the property. Can be any valid JavaScript value (number,\n    object, function, etc.).\n    **Defaults to [`undefined`](../../globals/undefined.mdx).**\n- `writable`\n  - : `true` if the value associated with the property may be changed with an\n    assignment operator.\n    **Defaults to `false`.**\n\nAn **accessor descriptor** also has the following optional keys:\n\n- `get`\n  - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no getter. When the property is accessed, this function is called without\n    arguments and with `this` set to the object through which the property is\n    accessed (this may not be the object on which the property is defined due to\n    inheritance). The return value will be used as the value of the property.\n    **Defaults to [`undefined`](../../globals/undefined.mdx).**\n- `set`\n  - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no setter. When the property is assigned, this function is called with one\n    argument (the value being assigned to the property) and with `this` set to\n    the object through which the property is assigned.\n    **Defaults to [`undefined`](../../globals/undefined.mdx).**\n\nIf a descriptor has neither of `value`, `writable`,\n`get` and `set` keys, it is treated as a data descriptor. If a\ndescriptor has both \\[`value` or `writable`] and \\[`get` or `set`] keys, an exception is thrown.\n\nBear in mind that these attributes are not necessarily the descriptor's own properties.\nInherited properties will be considered as well. In order to ensure these defaults are\npreserved, you might freeze existing objects in the descriptor object's prototype chain upfront, specify all\noptions explicitly, or point to [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) with [`Object.create(null)`](../../globals/Object/create.mdx).\n\n```js\nconst obj = {};\n// 1. Using a null prototype: no inherited properties\nconst descriptor = Object.create(null);\ndescriptor.value = 'static';\n\n// not enumerable, not configurable, not writable as defaults\nObject.defineProperty(obj, 'key', descriptor);\n\n// 2. Being explicit by using a throw-away object literal with all attributes present\nObject.defineProperty(obj, 'key2', {\n  enumerable: false,\n  configurable: false,\n  writable: false,\n  value: 'static'\n});\n\n// 3. Recycling same object\nfunction withValue(value) {\n  const d = withValue.d || (\n    withValue.d = {\n      enumerable: false,\n      writable: false,\n      configurable: false,\n      value,\n    }\n  );\n\n  // avoiding duplicate operation for assigning value\n  if (d.value !== value) d.value = value;\n\n  return d;\n}\n// and\nObject.defineProperty(obj, 'key', withValue('static'));\n\n// if freeze is available, prevents adding or\n// removing the object prototype properties\n// (value, get, set, enumerable, writable, configurable)\n(Object.freeze || Object)(Object.prototype);\n```\n\nWhen the property already exists, `Object.defineProperty()` attempts to modify the property according to the values in the descriptor and the property's current configuration.\n\nIf the old descriptor had its `configurable` attribute set to `false`, the property is said to be _non-configurable_. It is not possible to change any attribute of a non-configurable accessor property, and it is not possible to switch between data and accessor property types. For data properties with `writable: true`, it is possible to modify the value and change the `writable` attribute from `true` to `false`. A [`TypeError`](../../globals/TypeError/TypeError.mdx) is thrown when attempts are made to change non-configurable property attributes (except `value` and `writable`, if permitted), except when defining a value same as the original value on a data property.\n\nWhen the current property is configurable, defining an attribute to `undefined` effectively deletes it. For example, if `o.k` is an accessor property, `Object.defineProperty(o, \"k\", { set: undefined })` will remove the setter, making `k` only have a getter and become readonly. If an attribute is absent from the new descriptor, the old descriptor attribute's value is kept (it won't be implicitly re-defined to `undefined`). It is possible to toggle between data and accessor property by giving a descriptor of a different \"flavor\". For example, if the new descriptor is a data descriptor (with `value` or `writable`), the original descriptor's `get` and `set` attributes will both be dropped.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Object/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.entries()\n\nThe **`Object.entries()`** method returns an array of a given object's own enumerable string-keyed property key-value pairs.\n\n## Syntax\n\n```js\nObject.entries(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : An object.\n\n### Return value\n\nAn array of the given object's own enumerable string-keyed property key-value pairs. Each key-value pair is an array with two elements: the first element is the property key (which is always a string), and the second element is the property value.\n\n## Description\n\n`Object.entries()` returns an array whose elements are arrays corresponding to the enumerable string-keyed property key-value pairs found directly upon `object`. This is the same as iterating with a `for...in` loop, except that a `for...in` loop enumerates properties in the prototype chain as well. The order of the array returned by `Object.entries()` is the same as that provided by a `for...in` loop.\n\nIf you only need the property keys, use [`Object.keys()`](../../globals/Object/keys.mdx) instead. If you only need the property values, use [`Object.values()`](../../globals/Object/values.mdx) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Object/freeze.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.freeze()\n\nThe **`Object.freeze()`** method _freezes_ an object. Freezing an object [prevents extensions](../../globals/Object/preventExtensions.mdx) and makes existing properties non-writable and non-configurable. A frozen object can no longer be changed: new properties cannot be added, existing properties cannot be removed, their enumerability, configurability, writability, or value cannot be changed, and the object's prototype cannot be re-assigned. `freeze()` returns the same object that was passed in.\n\nFreezing an object is the highest integrity level that JavaScript provides.\n\n## Syntax\n\n```js\nObject.freeze(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object to freeze.\n\n### Return value\n\nThe object that was passed to the function.\n\n## Description\n\nFreezing an object is equivalent to [preventing extensions](../../globals/Object/preventExtensions.mdx) and then changing all existing [properties' descriptors'](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty#description) `configurable` to `false` — and for data properties, `writable` to `false` as well. Nothing can be added to or removed from the properties set of a frozen object. Any attempt to do so will fail, either silently or by throwing a [`TypeError`](../../globals/TypeError/TypeError.mdx) exception (most commonly, but not exclusively, when in \"strict mode\").\n\nFor data properties of a frozen object, their values cannot be changed since the writable and\nconfigurable attributes are set to false. Accessor properties (getters and setters) work the same — the property value returned by the getter may still change, and the setter can still be called without throwing errors when setting the property. Note that values\nthat are objects can still be modified, unless they are also frozen. As an object, an\narray can be frozen; after doing so, its elements cannot be altered and no elements can\nbe added to or removed from the array.\n\n`freeze()` returns the same object that was passed into the function. It\n_does not_ create a frozen copy.\n\nA `TypedArray` or a [`DataView`](../../globals/DataView/DataView.mdx) with elements will cause a [`TypeError`](../../globals/TypeError/TypeError.mdx),\nas they are views over memory and will definitely cause other possible issues:\n\n```js\nObject.freeze(new Uint8Array(0)) // No elements\n// Uint8Array []\n\nObject.freeze(new Uint8Array(1)) // Has elements\n// TypeError: Cannot freeze array buffer views with elements\n\nObject.freeze(new DataView(new ArrayBuffer(32))) // No elements\n// DataView {}\n\nObject.freeze(new Float64Array(new ArrayBuffer(64), 63, 0)) // No elements\n// Float64Array []\n\nObject.freeze(new Float64Array(new ArrayBuffer(64), 32, 2)) // Has elements\n// TypeError: Cannot freeze array buffer views with elements\n```\n\nNote that as the standard three properties (`buf.byteLength`,\n`buf.byteOffset` and `buf.buffer`) are read-only (as are those of\nan `ArrayBuffer`, there is no reason for\nattempting to freeze these properties.\n\nUnlike [`Object.seal()`](../../globals/Object/seal.mdx), existing properties in objects frozen with `Object.freeze()` are made immutable and data properties cannot be re-assigned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Object/fromEntries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.fromEntries()\n\nThe **`Object.fromEntries()`** method transforms a list of key-value pairs into an object.\n\n## Syntax\n\n```js\nObject.fromEntries(iterable)\n```\n\n### Parameters\n\n- `iterable`\n\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol), such as an `Array` or [Map](../../globals/Map/Map.mdx), containing a list of objects. Each object should have two properties:\n\n    - `0`\n      - : A string or `Symbol` representing the property key.\n    - `1`\n      - : The property value.\n\n    Typically, this object is implemented as a two-element array, with the first element being the property key and the second element being the property value.\n\n### Return value\n\nA new object whose properties are given by the entries of the iterable.\n\n## Description\n\nThe `Object.fromEntries()` method takes a list of key-value pairs and returns a new object whose properties are given by those entries. The `iterable` argument is expected to be an object that implements an `@@iterator` method. The method returns an iterator object that produces two-element array-like objects. The first element is a value that will be used as a property key, and the second element is the value to associate with that property key.\n\n`Object.fromEntries()` performs the reverse of [`Object.entries()`](../../globals/Object/entries.mdx), except that `Object.entries()` only returns string-keyed properties, while `Object.fromEntries()` can also create symbol-keyed properties.\n\n> **Note:** Unlike [`Array.from()`](../../globals/Array/from.mdx), `Object.fromEntries()` does not use the value of `this`, so calling it on another constructor does not create objects of that type.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Object/getOwnPropertyDescriptor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertyDescriptor()\n\nThe **`Object.getOwnPropertyDescriptor()`** method returns an\nobject describing the configuration of a specific property on a given object (that is,\none directly present on an object and not in the object's prototype chain). The object\nreturned is mutable but mutating it has no effect on the original property's\nconfiguration.\n\n## Syntax\n\n```js\nObject.getOwnPropertyDescriptor(obj, prop)\n```\n\n### Parameters\n\n- `obj`\n  - : The object in which to look for the property.\n- `prop`\n  - : The name or `Symbol` of the property whose description is to be\n    retrieved.\n\n### Return value\n\nA property descriptor of the given property if it exists on the object,\n[`undefined`](../../globals/undefined.mdx) otherwise.\n\n## Description\n\nThis method permits examination of the precise description of a property. A\n_property_ in JavaScript consists of either a string-valued name or a\n`Symbol` and a property descriptor. Further information about property\ndescriptor types and their attributes can be found in\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx).\n\nA _property descriptor_ is a record with some of the following attributes:\n\n- `value`\n  - : The value associated with the property (data descriptors only).\n- `writable`\n  - : `true` if and only if the value associated with the property may be\n    changed (data descriptors only).\n- `get`\n  - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no getter (accessor descriptors only).\n- `set`\n  - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no setter (accessor descriptors only).\n- `configurable`\n  - : `true` if and only if the type of this property descriptor may be changed\n    and if the property may be deleted from the corresponding object.\n- `enumerable`\n  - : `true` if and only if this property shows up during enumeration of the\n    properties on the corresponding object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Object/getOwnPropertyDescriptors.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertyDescriptors()\n\nThe **`Object.getOwnPropertyDescriptors()`** method returns all\nown property descriptors of a given object.\n\n## Syntax\n\n```js\nObject.getOwnPropertyDescriptors(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object for which to get all own property descriptors.\n\n### Return value\n\nAn object containing all own property descriptors of an object. Might be an empty\nobject, if there are no properties.\n\n## Description\n\nThis method permits examination of the precise description of all own properties of an\nobject. A _property_ in JavaScript consists of either a string-valued name or a\n`Symbol` and a property descriptor. Further information about property\ndescriptor types and their attributes can be found in\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx).\n\nA _property descriptor_ is a record with some of the following attributes:\n\n- `value`\n  - : The value associated with the property (data descriptors only).\n- `writable`\n  - : `true` if and only if the value associated with the property may be\n    changed (data descriptors only).\n- `get`\n  - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no getter (accessor descriptors only).\n- `set`\n  - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no setter (accessor descriptors only).\n- `configurable`\n  - : `true` if and only if the type of this property descriptor may be changed\n    and if the property may be deleted from the corresponding object.\n- `enumerable`\n  - : `true` if and only if this property shows up during enumeration of the\n    properties on the corresponding object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Object/getOwnPropertyNames.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertyNames()\n\nThe **`Object.getOwnPropertyNames()`** method returns an array of all properties (including non-enumerable properties except for those which use Symbol) found directly in a given object.\n\n## Syntax\n\n```js\nObject.getOwnPropertyNames(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object whose enumerable and non-enumerable properties are to be returned.\n\n### Return value\n\nAn array of strings that corresponds to the properties found directly in the given object.\n\n## Description\n\n`Object.getOwnPropertyNames()` returns an array whose elements are strings corresponding to the enumerable and non-enumerable properties found directly in a given object `obj`. The ordering of the enumerable properties in the array is consistent with the ordering exposed by a `for...in` loop (or by [`Object.keys()`](../../globals/Object/keys.mdx)) over the properties of the object. The non-negative integer keys of the object (both enumerable and non-enumerable) are added in ascending order to the array first, followed by the string keys in the order of insertion.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Object/getOwnPropertySymbols.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertySymbols()\n\nThe **`Object.getOwnPropertySymbols()`** method returns an array of all symbol properties found directly upon a given object.\n\n## Syntax\n\n```js\nObject.getOwnPropertySymbols(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object whose symbol properties are to be returned.\n\n### Return value\n\nAn array of all symbol properties found directly upon the given object.\n\n## Description\n\nSimilar to [`Object.getOwnPropertyNames()`](../../globals/Object/getOwnPropertyNames.mdx), you can get all symbol properties of a given object as an array of symbols. Note that [`Object.getOwnPropertyNames()`](../../globals/Object/getOwnPropertyNames.mdx) itself does not contain the symbol properties of an object and only the string properties.\n\nAs all objects have no own symbol properties initially, `Object.getOwnPropertySymbols()` returns an empty array unless you have set symbol properties on your object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Object/getPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getPrototypeOf()\n\nThe **`Object.getPrototypeOf()`** method returns the prototype\n(i.e. the value of the internal `[[Prototype]]` property) of the specified\nobject.\n\n## Syntax\n\n```js\nObject.getPrototypeOf(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object whose prototype is to be returned.\n\n### Return value\n\nThe prototype of the given object, which may be `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Object/hasOwn.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.hasOwn()\n\nThe **`Object.hasOwn()`** static method returns `true` if the specified object has the indicated property as its _own_ property.\nIf the property is inherited, or does not exist, the method returns `false`.\n\n> **Note:** `Object.hasOwn()` is intended as a replacement for [`Object.prototype.hasOwnProperty()`](../../globals/Object/prototype/hasOwnProperty.mdx).\n\n\n\n## Syntax\n\n```js\nhasOwn(instance, prop)\n```\n\n### Parameters\n\n- `instance`\n  - : The JavaScript object instance to test.\n- `prop`\n  - : The `String` name or [Symbol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol) of the property to test.\n\n### Return value\n\n`true` if the specified object has directly defined the specified property.\nOtherwise `false`\n\n## Description\n\nThe **`Object.hasOwn()`** method returns `true` if the specified property is a\ndirect property of the object — even if the property value is `null` or `undefined`.\nThe method returns `false` if the property is inherited, or has not been declared at all.\nUnlike the `in` operator, this\nmethod does not check for the specified property in the object's prototype chain.\n\nIt is recommended over [`Object.prototype.hasOwnProperty()`](../../globals/Object/prototype/hasOwnProperty.mdx) because\nit works for objects created using `Object.create(null)` and with objects that\nhave overridden the inherited `hasOwnProperty()` method. While it is possible to\nworkaround these problems by calling `Object.prototype.hasOwnProperty()` on an\nexternal object, `Object.hasOwn()` is more intuitive.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Object/is.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.is()\n\nThe **`Object.is()`** method determines whether two values are [the same value](https://developer.mozilla.org/docs/Web/JavaScript/Equality_comparisons_and_sameness#same-value_equality_using_object.is).\n\n## Syntax\n\n```js\nObject.is(value1, value2)\n```\n\n### Parameters\n\n- `value1`\n  - : The first value to compare.\n- `value2`\n  - : The second value to compare.\n\n### Return value\n\nA boolean indicating whether or not the two arguments are the same value.\n\n## Description\n\n`Object.is()` determines whether two values are [the same value](https://developer.mozilla.org/docs/Web/JavaScript/Equality_comparisons_and_sameness#same-value_equality_using_object.is). Two values are the same if one of the following holds:\n\n- both [`undefined`](../../globals/undefined.mdx)\n- both `null`\n- both `true` or both `false`\n- both strings of the same length with the same characters in the same order\n- both the same object (meaning both values reference the same object in memory)\n- both `BigInts` with the same numeric value\n- both `Symbols` that reference the same symbol value\n- both numbers and\n\n  - both `+0`\n  - both `-0`\n  - both [`NaN`](../../globals/NaN.mdx)\n  - or both non-zero, not [`NaN`](../../globals/NaN.mdx), and have the same value\n\n`Object.is()` is not equivalent to the [`==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Equality) operator. The `==` operator applies various coercions to both sides (if they are not the same type) before testing for equality (resulting in such behavior as `\"\" == false` being `true`), but `Object.is()` doesn't coerce either value.\n\n`Object.is()` is also _not_ equivalent to the [`===`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) operator. The only difference between `Object.is()` and `===` is in their treatment of signed zeros and `NaN` values. The `===` operator (and the `==` operator) treats the number values `-0` and `+0` as equal, but treats [`NaN`](../../globals/NaN.mdx) as not equal to each other.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Object/isExtensible.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.isExtensible()\n\nThe **`Object.isExtensible()`** method determines if an object\nis extensible (whether it can have new properties added to it).\n\n## Syntax\n\n```js\nObject.isExtensible(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be checked.\n\n### Return value\n\nA `Boolean` indicating whether or not the given object is extensible.\n\n## Description\n\nObjects are extensible by default: they can have new properties added to them, and their `[[Prototype]]` can be re-assigned. An object can be marked as non-extensible using one of [`Object.preventExtensions()`](../../globals/Object/preventExtensions.mdx), [`Object.seal()`](../../globals/Object/seal.mdx), [`Object.freeze()`](../../globals/Object/freeze.mdx), or [`Reflect.preventExtensions()`](../../globals/Reflect/preventExtensions.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Object/isFrozen.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.isFrozen()\n\nThe **`Object.isFrozen()`** determines if an object is\n[frozen](../../globals/Object/freeze.mdx).\n\n## Syntax\n\n```js\nObject.isFrozen(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be checked.\n\n### Return value\n\nA `Boolean` indicating whether or not the given object is frozen.\n\n## Description\n\nAn object is frozen if and only if it is not [extensible](../../globals/Object/isExtensible.mdx), all its properties are non-configurable, and all its data\nproperties (that is, properties which are not accessor properties with getter or setter\ncomponents) are non-writable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Object/isSealed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.isSealed()\n\nThe **`Object.isSealed()`** method determines if an object is\nsealed.\n\n## Syntax\n\n```js\nObject.isSealed(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be checked.\n\n### Return value\n\nA `Boolean` indicating whether or not the given object is sealed.\n\n## Description\n\nReturns `true` if the object is sealed, otherwise `false`. An\nobject is sealed if it is not [extensible](../../globals/Object/isExtensible.mdx) and\nif all its properties are non-configurable and therefore not removable (but not\nnecessarily non-writable).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Object/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.keys()\n\nThe **`Object.keys()`** method returns an array of a given object's own enumerable string-keyed property names.\n\n## Syntax\n\n```js\nObject.keys(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : An object.\n\n### Return value\n\nAn array of strings representing the given object's own enumerable string-keyed property keys.\n\n## Description\n\n`Object.keys()` returns an array whose elements are strings corresponding to the enumerable string-keyed property names found directly upon `object`. This is the same as iterating with a `for...in` loop, except that a `for...in` loop enumerates properties in the prototype chain as well. The order of the array returned by `Object.keys()` is the same as that provided by a `for...in` loop.\n\nIf you need the property values, use [`Object.values()`](../../globals/Object/values.mdx) instead. If you need both the property keys and values, use [`Object.entries()`](../../globals/Object/entries.mdx) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Object/preventExtensions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.preventExtensions()\n\nThe **`Object.preventExtensions()`** method prevents new\nproperties from ever being added to an object (i.e. prevents future extensions to the\nobject). It also prevents the object's prototype from being re-assigned.\n\n## Syntax\n\n```js\nObject.preventExtensions(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be made non-extensible.\n\n### Return value\n\nThe object being made non-extensible.\n\n## Description\n\nAn object is extensible if new properties can be added to it.\n`Object.preventExtensions()` marks an object as no longer extensible, so that\nit will never have properties beyond the ones it had at the time it was marked as\nnon-extensible. Note that the properties of a non-extensible object, in general, may\nstill be _deleted_. Attempting to add new properties to a non-extensible object\nwill fail, either silently or, in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), throwing a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\nUnlike [`Object.seal()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/seal) and [`Object.freeze()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze), `Object.preventExtensions()` invokes an intrinsic JavaScript behavior and cannot be replaced with a composition of several other operations. It also has its `Reflect` counterpart (which only exists for intrinsic operations), [`Reflect.preventExtensions()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Reflect/preventExtensions).\n\n`Object.preventExtensions()` only prevents addition of own properties. Properties can still be added to the object prototype.\n\nThis method makes the `[[Prototype]]` of the target immutable; any `[[Prototype]]` re-assignment will throw a `TypeError`. This behavior is specific to the internal `[[Prototype]]` property; other properties of the target object will remain mutable.\n\nThere is no way to make an object extensible again once it has been made non-extensible.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Object/prototype/constructor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.constructor\n\nThe **`constructor`** data property of an `Object` instance returns a reference to the constructor function that created the instance object. Note that the value of this property is a reference to _the function itself_, not a string containing the function's name.\n\n> **Note:** This is a property of JavaScript objects. For the `constructor` method in classes, see [its own reference page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/constructor).\n\n## Value\n\nA reference to the constructor function that created the instance object.\n\n> **Note:** This property is created by default on the [`prototype`](../../../globals/Function/prototype/) property of every constructor function and is inherited by all objects created by that constructor.\n\n## Description\n\nAny object (with the exception of [`null` prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) will have a `constructor` property on its `[[Prototype]]`. Objects created with literals will also have a `constructor` property that points to the constructor type for that object — for example, array literals create `Array` objects, and [object literals](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Object_initializer) create plain objects.\n\n```js\nconst o1 = {};\no1.constructor === Object; // true\n\nconst o2 = new Object();\no2.constructor === Object; // true\n\nconst a1 = [];\na1.constructor === Array; // true\n\nconst a2 = new Array();\na2.constructor === Array; // true\n\nconst n = 3;\nn.constructor === Number; // true\n```\n\nNote that `constructor` usually comes from the constructor's [`prototype`](../../../globals/Function/prototype/) property. If you have a longer prototype chain, you can usually expect every object in the chain to have a `constructor` property.\n\n```js\nconst o = new TypeError(); // Inheritance: TypeError -> Error -> Object\nconst proto = Object.getPrototypeOf;\nproto(o).constructor === TypeError; // true\nproto(proto(o)).constructor === Error; // true\nproto(proto(proto(o))).constructor === Object; // true\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Object/prototype/hasOwnProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.hasOwnProperty()\n\nThe **`hasOwnProperty()`** method returns a boolean indicating whether the\nobject has the specified property as its own property (as opposed to inheriting\nit).\n\n> **Note:** [`Object.hasOwn()`](../../../globals/Object/hasOwn.mdx) is recommended over\n> `hasOwnProperty()`, in browsers where it is supported.\n\n## Syntax\n\n```js\nhasOwnProperty(prop)\n```\n\n### Parameters\n\n- `prop`\n  - : The `String` name or `Symbol` of the property to test.\n\n### Return value\n\nReturns `true` if the object has the specified property as own property; `false`\notherwise.\n\n## Description\n\nThe **`hasOwnProperty()`** method returns `true` if the specified property is a\ndirect property of the object — even if the value is `null` or `undefined`. The\nmethod returns `false` if the property is inherited, or has not been declared at\nall. Unlike the `in` operator, this\nmethod does not check for the specified property in the object's prototype\nchain.\n\nThe method can be called on _most_ JavaScript objects, because most objects\ndescend from `Object`, and hence inherit its methods. For\nexample `Array` is an `Object`, so you can\nuse `hasOwnProperty()` method to check whether an index exists:\n\n```js\nconst fruits = ['Apple', 'Banana','Watermelon', 'Orange'];\nfruits.hasOwnProperty(3);   // true ('Orange')\nfruits.hasOwnProperty(4);   // false - not defined\n```\n\nThe method will not be available in objects where it is reimplemented, or on\nobjects created using `Object.create(null)` (as these don't inherit from\n`Object.prototype`). Examples for these cases are given below.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Object/prototype/isPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.isPrototypeOf()\n\nThe **`isPrototypeOf()`** method checks if an object exists in another object's prototype chain.\n\n> **Note:** `isPrototypeOf()` differs from the [`instanceof`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/instanceof) operator. In the expression `object instanceof AFunction`, `object`'s prototype chain is checked against `AFunction.prototype`, not against `AFunction` itself.\n\n## Syntax\n\n```js\nisPrototypeOf(object)\n```\n\n### Parameters\n\n- `object`\n  - : The object whose prototype chain will be searched.\n\n### Return value\n\nA boolean indicating whether the calling object (`this`) lies in the prototype chain of `object`. Directly returns `false` when `object` is not an object (i.e. a primitive).\n\n### Errors thrown\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown if `this` is `null` or `undefined` (because it can't be [converted to an object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#object_coercion)).\n\n## Description\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `isPrototypeOf()` method. This method allows you to check whether or not the object exists within another object's prototype chain. If the `object` passed as the parameter is not an object (i.e. a primitive), the method directly returns `false`. Otherwise, the `this` value is [converted to an object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#object_coercion), and the prototype chain of `object` is searched for the `this` value, until the end of the chain is reached or the `this` value is found.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Object/prototype/propertyIsEnumerable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.propertyIsEnumerable()\n\nThe **`propertyIsEnumerable()`** method returns a boolean indicating whether the specified property is the object's [enumerable own](https://developer.mozilla.org/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) property.\n\n## Syntax\n\n```js\npropertyIsEnumerable(prop)\n```\n\n### Parameters\n\n- `prop`\n  - : The name of the property to test. Can be a string or a `Symbol`.\n\n### Return value\n\nA boolean value indicating whether the specified property is enumerable and is the object's own property.\n\n## Description\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `propertyIsEnumerable()` method. This method determines if the specified property, string or symbol, is an enumerable own property of the object. If the object does not have the specified property, this method returns `false`.\n\nThis method is equivalent to [`Object.getOwnPropertyDescriptor(obj, prop)?.enumerable ?? false`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Object/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string representing the object. This method is meant to be overridden by derived objects for locale-specific purposes.\n\n## Syntax\n\n```js\ntoLocaleString()\n```\n\n### Parameters\n\nNone. However, all objects that override this method are expected to accept at most two parameters, corresponding to `locales` and `options`, such as [`Date.prototype.toLocaleString()`](../../../globals/Date/prototype/toLocaleString.mdx). The parameter positions should not be used for any other purpose.\n\n### Return value\n\nThe return value of calling `this.toString()`.\n\n## Description\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `toLocaleString()` method. `Object`'s `toLocaleString` returns the result of calling [`this.toString()`](../../../globals/Object/prototype/toString.mdx).\n\nThis function is provided to give objects a generic `toLocaleString` method, even though not all may use it. In the core language, these built-in objects override `toLocaleString` to provide locale-specific formatting:\n\n- `Array`: [`Array.prototype.toLocaleString()`](../../../globals/Array/prototype/toLocaleString.mdx)\n- `Number`: [`Number.prototype.toLocaleString()`](../../../globals/Number/prototype/toLocaleString.mdx)\n- `Date`: [`Date.prototype.toLocaleString()`](../../../globals/Date/prototype/toLocaleString.mdx)\n- `BigInt`: [`BigInt.prototype.toLocaleString()`](../../../globals/BigInt/prototype/toLocaleString.mdx)\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Object/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.toString()\n\nThe **`toString()`** method returns a string representing the object. This method is meant to be overridden by derived objects for custom [type conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) logic.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nBy default `toString()` takes no parameters. However, objects that inherit from `Object` may override it with their own implementations that do take parameters. For example, the [`Number.prototype.toString()`](../../../globals/Number/prototype/toString.mdx) and [`BigInt.prototype.toString()`](../../../globals/BigInt/prototype/toString.mdx) methods take an optional `radix` parameter.\n\n### Return value\n\nA string representing the object.\n\n## Description\n\nJavaScript calls the `toString` method to [convert an object to a primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion). You rarely need to invoke the `toString` method yourself; JavaScript automatically invokes it when encountering an object where a primitive value is expected.\n\nThis method is called in priority by [string conversion](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion), but [numeric conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#numeric_coercion) and [primitive conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion) call `valueOf()` in priority. However, because the base [`valueOf()`](../../../globals/Object/prototype/valueOf.mdx) method returns an object, the `toString()` method is usually called in the end, unless the object overrides `valueOf()`. For example, `+[1]` returns `1`, because its [`toString`](../../../globals/Array/prototype/toString.mdx) method returns `\"1\"`, which is then converted to a number.\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `toString()` method. When you create a custom object, you can override `toString()` to call a custom method, so that your custom object can be converted to a string value. Alternatively, you can add a [`Symbol.toPrimitive`](../../../globals/Symbol/toPrimitive.mdx) method, which allows even more control over the conversion process, and will always be preferred over `valueOf` or `toString` for any type conversion.\n\nTo use the base `Object.prototype.toString()` with an object that has it overridden (or to invoke it on `null` or `undefined`), you need to call [`Function.prototype.call()`](../../../globals/Function/prototype/call.mdx) or [`Function.prototype.apply()`](../../../globals/Function/prototype/apply.mdx) on it, passing the object you want to inspect as the first parameter (called `thisArg`).\n\n```js\nconst arr = [1, 2, 3];\n\narr.toString(); // \"1,2,3\"\nObject.prototype.toString.call(arr); // \"[object Array]\"\n```\n\n`Object.prototype.toString()` returns `\"[object Type]\"`, where `Type` is the object type. If the object has a [`Symbol.toStringTag`](../../../globals/Symbol/toStringTag.mdx) property whose value is a string, that value will be used as the `Type`. Many built-in objects, including [`Map`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map) and [`Symbol`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol), have a `Symbol.toStringTag`. Some objects predating ES6 do not have `Symbol.toStringTag`, but have a special tag nonetheless. They include (the tag is the same as the type name given below):\n\n- [`Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\n- [`Function`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions) (anything whose [`typeof`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/typeof) returns `\"function\"`)\n- [`Error`](../../../globals/Error/Error.mdx)\n- [`Boolean`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)\n- [`Number`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)\n- [`String`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\n- [`Date`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date)\n- [`RegExp`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp)\n\nThe [`arguments`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/arguments) object returns `\"[object Arguments]\"`. Everything else, including user-defined classes, unless with a custom `Symbol.toStringTag`, will return `\"[object Object]\"`.\n\n`Object.prototype.toString()` invoked on [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) returns `[object Null]` and `[object Undefined]`, respectively.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Object/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.valueOf()\n\nThe **`valueOf()`** method of `Object` converts the `this` value [to an object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#object_coercion). This method is meant to be overridden by derived objects for custom [type conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) logic.\n\n\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nThe `this` value, converted to an object.\n\n> **Note:** In order for `valueOf` to be useful during type conversion, it must return a primitive. Because all primitive types have their own `valueOf()` methods, calling `aPrimitiveValue.valueOf()` generally does not invoke `Object.prototype.valueOf()`.\n\n## Description\n\nJavaScript calls the `valueOf` method to [convert an object to a primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion). You rarely need to invoke the `valueOf` method yourself; JavaScript automatically invokes it when encountering an object where a primitive value is expected.\n\nThis method is called in priority by [numeric conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#numeric_coercion) and [primitive conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion), but [string conversion](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) calls `toString()` in priority, and `toString()` is very likely to return a string value (even for the [`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx) base implementation), so `valueOf()` is usually not called in this case.\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `toString()` method. The `Object.prototype.valueOf()` base implementation is deliberately useless: by returning an object, its return value will never be used by any [primitive conversion algorithm](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion). Many built-in objects override this method to return an appropriate primitive value. When you create a custom object, you can override `valueOf()` to call a custom method, so that your custom object can be converted to a primitive value. Generally, `valueOf()` is used to return a value that is most meaningful for the object — unlike `toString()`, it does not need to be a string. Alternatively, you can add a [`Symbol.toPrimitive`](../../../globals/Symbol/toPrimitive.mdx) method, which allows even more control over the conversion process, and will always be preferred over `valueOf` or `toString` for any type conversion.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Object/seal.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.seal()\n\nThe **`Object.seal()`** method _seals_ an object. Sealing an object [prevents extensions](../../globals/Object/preventExtensions.mdx) and makes existing properties non-configurable. A sealed object has a fixed set of properties: new properties cannot be added, existing properties cannot be removed, their enumerability and configurability cannot be changed, and its prototype cannot be re-assigned. Values of existing properties can still be changed as long as they are writable. `seal()` returns the same object that was passed in.\n\n## Syntax\n\n```js\nObject.seal(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be sealed.\n\n### Return value\n\nThe object being sealed.\n\n## Description\n\nSealing an object is equivalent to [preventing extensions](../../globals/Object/preventExtensions.mdx) and then changing all existing properties' descriptors to `configurable: false`. This has the effect of making the set of properties on the object fixed. Making all properties non-configurable\nalso prevents them from being converted from data properties to accessor properties and\nvice versa, but it does not prevent the values of data properties from being changed.\nAttempting to delete or add properties to a sealed object, or to convert a data property\nto accessor or vice versa, will fail, either silently or by throwing a\n[`TypeError`](../../globals/TypeError/TypeError.mdx) (most commonly, although not exclusively, when in \"strict mode\" code).\n\nThe prototype chain remains untouched. However, due to the effect of [preventing extensions](../../globals/Object/preventExtensions.mdx), the `[[Prototype]]` cannot be reassigned.\n\nUnlike [`Object.freeze()`](../../globals/Object/freeze.mdx), objects sealed with `Object.seal()` may have their existing\nproperties changed, as long as they are writable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Object/setPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.setPrototypeOf()\n\nThe **`Object.setPrototypeOf()`** method sets the prototype (i.e., the internal `[[Prototype]]` property) of a specified object to another object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null).\n\n> **Warning:** Changing the `[[Prototype]]` of an object is, by the nature of how modern JavaScript engines optimize property accesses, currently a very slow operation in every browser and JavaScript engine. In addition, the effects of altering inheritance are subtle and far-flung, and are not limited to the time spent in the `Object.setPrototypeOf(...)` statement, but may extend to **_any_** code that has access to any object whose `[[Prototype]]` has been altered. You can read more in [JavaScript engine fundamentals: optimizing prototypes](https://mathiasbynens.be/notes/prototypes).\n>\n> Because this feature is a part of the language, it is still the burden on engine developers to implement that feature performantly (ideally). Until engine developers address this issue, if you are concerned about performance, you should avoid setting the `[[Prototype]]` of an object. Instead, create a new object with the desired `[[Prototype]]` using [`Object.create()`](../../globals/Object/create.mdx).\n\n## Syntax\n\n```js\nObject.setPrototypeOf(obj, prototype)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which is to have its prototype set.\n- `prototype`\n  - : The object's new prototype (an object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null)).\n\n### Return value\n\nThe specified object.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if one of the following conditions is met:\n    - The `obj` parameter is [non-extensible](../../globals/Object/isExtensible.mdx), or it's an [immutable prototype exotic object](https://tc39.es/ecma262/#sec-immutable-prototype-exotic-objects), such as `Object.prototype`.\n    - The `prototype` parameter is not an object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null).\n\n## Description\n\n`Object.setPrototypeOf()` is generally considered the proper way to set the prototype of an object.\n\nIf the `obj` parameter is not an object (e.g. number, string, etc.), this method does nothing.\n\nFor security concerns, there are certain built-in objects that are designed to have an _immutable prototype_. This prevents prototype pollution attacks, especially [proxy-related ones](https://github.com/tc39/ecma262/issues/272). The core language only specifies `Object.prototype` as an immutable prototype exotic object, whose prototype is always `null`.\n\n```js\nObject.isExtensible(Object.prototype); // true; you can add more properties\nObject.setPrototypeOf(Object.prototype, {}); // TypeError: Immutable prototype object '#<Object>' cannot have their prototype set\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Object/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.values()\n\nThe **`Object.values()`** method returns an array of a given object's own enumerable string-keyed property values.\n\n## Syntax\n\n```js\nObject.values(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : An object.\n\n### Return value\n\nAn array containing the given object's own enumerable string-keyed property values.\n\n## Description\n\n`Object.values()` returns an array whose elements are strings corresponding to the enumerable string-keyed property values found directly upon `object`. This is the same as iterating with a `for...in` loop, except that a `for...in` loop enumerates properties in the prototype chain as well. The order of the array returned by `Object.values()` is the same as that provided by a `for...in` loop.\n\nIf you need the property keys, use [`Object.keys()`](../../globals/Object/keys.mdx) instead. If you need both the property keys and values, use [`Object.entries()`](../../globals/Object/entries.mdx) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Promise/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get Promise[Symbol.species]\n\nThe **`Promise[Symbol.species]`** accessor property returns the constructor used to construct return values from promise methods.\n\n> **Warning:** The existence of `Symbol.species` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Syntax\n\n```js\nPromise[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct return values from promise chaining methods that create new promises.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `Promise` objects. Subclass constructors may override it to change the constructor assignment. The default implementation is basically:\n\n```js\n// Hypothetical underlying implementation for illustration\nclass Promise {\n  static get [Symbol.species]() {\n    return this;\n  }\n}\n```\n\nBecause of this polymorphic implementation, `Symbol.species` of derived subclasses would also return the constructor itself by default.\n\n```js\nclass SubPromise extends Promise {}\nSubPromise[Symbol.species] === Promise; // true\n```\n\nPromise chaining methods — [`then()`](../../globals/Promise/prototype/then.mdx), [`finally()`](../../globals/Promise/prototype/finally.mdx) — return new promise objects. They get the constructor to construct the new promise through `this.constructor[Symbol.species]`. If `this.constructor` is `undefined`, or if `this.constructor[Symbol.species]` is `undefined` or `null`, the default [`Promise()`](../../globals/Promise/Promise.mdx) constructor is used. Otherwise, the constructor returned by `this.constructor[Symbol.species]` is used to construct the new promise object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Promise/Promise.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise()\n\nThe **`Promise()`** constructor is primarily used to wrap functions that do not already support promises.\n\n## Syntax\n\n```js\nnew Promise(executor)\n```\n\n> **Note:** `Promise()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `executor`\n  - : A `function` to be executed by the constructor. It receives two functions as parameters: `resolveFunc` and `rejectFunc`. Any errors thrown in the `executor` will cause the promise to be rejected, and the return value will be neglected. The semantics of `executor` are detailed below.\n\n### Return value\n\nWhen called via `new`, the `Promise` constructor returns a promise object. The promise object will become _resolved_ when either of the functions `resolveFunc` or `rejectFunc` are invoked. Note that if you call `resolveFunc` or `rejectFunc` and pass another `Promise` object as an argument, it can be said to be \"resolved\", but still not \"settled\". See the [Promise description](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#description) for more explanation.\n\n## Description\n\nTraditionally (before promises), asynchronous tasks were designed as callbacks.\n\n```js\nreadFile(\"./data.txt\", (error, result) => {\n  // This callback will be called when the task is done, with the\n  // final `error` or `result`. Any operation dependent on the\n  // result must be defined within this callback.\n});\n// Code here is immediately executed after the `readFile` request\n// is fired. It does not wait for the callback to be called, hence\n// making `readFile` \"asynchronous\".\n```\n\nTo take advantage of the readability improvement and language features offered by promises, the `Promise()` constructor allows one to transform the callback-based API to a promise-based one.\n\n> **Note:** If your task is already promise-based, you likely do not need the `Promise()` constructor.\n\nThe `executor` is custom code that ties an outcome in a callback to a promise. You, the programmer, write the `executor`. Its signature is expected to be:\n\n```js\nfunction executor(resolveFunc, rejectFunc) {\n  // Typically, some asynchronous operation that accepts a callback,\n  // like the `readFile` function above\n}\n```\n\n`resolveFunc` and `rejectFunc` are also functions, and you can give them whatever actual names you want. Their signatures are simple: they accept a single parameter of any type.\n\n```js\nresolveFunc(value); // call on resolved\nrejectFunc(reason); // call on rejected\n```\n\nThe `value` parameter passed to `resolveFunc` can be another promise object, in which case the newly constructed promise's state will be \"locked in\" to the promise passed (as part of the [resolution](#resolver-function) promise). The `rejectFunc` has semantics close to the [`throw`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/throw) statement, so `reason` is typically an [`Error`](../../globals/Error/Error.mdx) instance. If either `value` or `reason` is omitted, the promise is fulfilled/rejected with `undefined`.\n\nThe `executor`'s completion state has limited effect on the promise's state:\n\n- The `executor` return value is ignored. `return` statements within the `executor` merely impact control flow and alter whether a part of the function is executed, but do not have any impact on the promise's fulfillment value. If `executor` exits and it's impossible for `resolveFunc` or `rejectFunc` to be called in the future (for example, there are no async tasks scheduled), then the promise remains pending forever.\n- If an error is thrown in the `executor`, the promise is rejected, unless `resolveFunc` or `rejectFunc` has already been called.\n\n> **Note:** The existence of pending promises does not prevent the program from exiting. If the event loop is empty, the program exits despite any pending promises (because those are necessarily forever-pending).\n\nHere's a summary of the typical flow:\n\n1. At the time when the constructor generates the new `Promise` object, it also generates a corresponding pair of functions for `resolveFunc` and `rejectFunc`; these are \"tethered\" to the `Promise` object.\n2. `executor` typically wraps some asynchronous operation which provides a callback-based API. The callback (the one passed to the original callback-based API) is defined within the `executor` code, so it has access to the `resolveFunc` and `rejectFunc`.\n3. The `executor` is called synchronously (as soon as the `Promise` is constructed) with the `resolveFunc` and `rejectFunc` functions as arguments.\n4. The code within the `executor` has the opportunity to perform some operation. The eventual completion of the asynchronous task is communicated with the promise instance via the side effect caused by `resolveFunc` or `rejectFunc`. The side effect is that the `Promise` object becomes \"resolved\".\n   - If `resolveFunc` is called first, the value passed will be [resolved](#resolver-function). The promise may stay pending (in case another [thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) is passed), become fulfilled (in most cases where a non-thenable value is passed), or become rejected (in case of an invalid resolution value).\n   - If `rejectFunc` is called first, the promise instantly becomes rejected.\n   - Once one of the resolving functions (`resolveFunc` or `rejectFunc`) is called, the promise stays resolved. Only the first call to `resolveFunc` or `rejectFunc` affects the promise's eventual state, and subsequent calls to either function can neither change the fulfillment value/rejection reason nor toggle its eventual state from \"fulfilled\" to \"rejected\" or opposite.\n   - If `executor` exits by throwing an error, then the promise is rejected. However, the error is ignored if one of the resolving functions has already been called (so that the promise is already resolved).\n   - Resolving the promise does not necessarily cause the promise to become fulfilled or rejected (i.e. settled). The promise may still be pending because it's resolved with another thenable, but its eventual state will match that of the resolved thenable.\n5. Once the promise settles, it (asynchronously) invokes any further handlers associated through [`Promise.prototype.then`](../../globals/Promise/prototype/then.mdx), [`Promise.prototype.catch`](../../globals/Promise/prototype/catch.mdx), or [`Promise.prototype.finally`](../../globals/Promise/prototype/finally.mdx). The eventual fulfillment value or rejection reason is passed to the invocation of fulfillment and rejection handlers as an input parameter (see [Chained Promises](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#chained_promises)).\n\nFor example, the callback-based `readFile` API above can be transformed into a promise-based one.\n\n```js\nconst readFilePromise = (path) =>\n  new Promise((resolve, reject) => {\n    readFile(path, (error, result) => {\n      if (error) {\n        reject(error);\n      } else {\n        resolve(result);\n      }\n    });\n  });\n\nreadFilePromise(\"./data.txt\")\n  .then((result) => console.log(result))\n  .catch((error) => console.error(\"Failed to read data\"));\n```\n\n### Resolver function\n\nThe resolver function `resolveFunc` has the following behaviors:\n\n- If it's called with the same value as the newly created promise (the promise it's \"tethered to\"), the promise is rejected with a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n- If it's called with a non-[thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) value (a primitive, or an object whose `then` property is not callable, including when the property is not present), the promise is immediately fulfilled with that value.\n- If it's called with a thenable value (including another `Promise` instance), then the thenable's `then` method is saved and called in the future (it's always called asynchronously). The `then` method will be called with two callbacks, which are two new functions with the exact same behaviors as the `resolveFunc` and `rejectFunc` passed to the `executor` function. If calling the `then` method throws, then the current promise is rejected with the thrown error.\n\nIn the last case, it means code like:\n\n```js\nnew Promise((resolve, reject) => {\n  resolve(thenable);\n});\n```\n\nIs roughly equivalent to:\n\n```js\nnew Promise((resolve, reject) => {\n  try {\n    thenable.then(\n      (value) => resolve(value),\n      (reason) => reject(reason),\n    );\n  } catch (e) {\n    reject(e);\n  }\n});\n```\n\nExcept that in the `resolve(thenable)` case:\n\n1. `resolve` is called synchronously, so that calling `resolve` or `reject` again has no effect, even when the handlers attached through `anotherPromise.then()` are not called yet.\n2. The `then` method is called asynchronously, so that the promise will never be instantly resolved if a thenable is passed.\n\nBecause `resolve` is called again with whatever `thenable.then()` passes to it as `value`, the resolver function is able to flatten nested thenables, where a thenable calls its `onFulfilled` handler with another thenable. The effect is that the fulfillment handler of a real promise will never receive a thenable as its fulfillment value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Promise/all.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.all()\n\nThe **`Promise.all()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise fulfills when all of the input's promises fulfill (including when an empty iterable is passed), with an array of the fulfillment values. It rejects when any of the input's promises rejects, with this first rejection reason.\n\n## Syntax\n\n```js\nPromise.all(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array` of promises.\n\n### Return value\n\nA `Promise` that is:\n\n- **Already fulfilled**, if the `iterable` passed is empty.\n- **Asynchronously fulfilled**, when all the promises in the given `iterable` fulfill. The fulfillment value is an array of fulfillment values, in the order of the promises passed, regardless of completion order. If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) fulfilled.\n- **Asynchronously rejected**, when any of the promises in the given `iterable` rejects. The rejection reason is the rejection reason of the first promise that was rejected.\n\n## Description\n\nThe `Promise.all()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. It can be useful for aggregating the results of multiple promises. It is typically used when there are multiple related asynchronous tasks that the overall code relies on to work successfully — all of whom we want to fulfill before the code execution continues.\n\n`Promise.all()` will reject immediately upon **any** of the input promises rejecting. In comparison, the promise returned by [`Promise.allSettled()`](../../globals/Promise/allSettled.mdx) will wait for all input promises to complete, regardless of whether or not one rejects. Use `allSettled()` if you need the final result of every promise in the input iterable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Promise/allSettled.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.allSettled()\n\nThe **`Promise.allSettled()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise fulfills when all of the input's promises settle (including when an empty iterable is passed), with an array of objects that describe the outcome of each promise.\n\n## Syntax\n\n```js\nPromise.allSettled(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array` of promises.\n\n### Return value\n\nA `Promise` that is:\n\n- **Already fulfilled**, if the `iterable` passed is empty.\n- **Asynchronously fulfilled**, when all promise in the given `iterable` have settled (either fulfilled or rejected). The fulfillment value is an array of objects, each describing the outcome of one promise in the `iterable`, in the order of the promises passed, regardless of completion order. Each outcome object has the following properties:\n\n  - `status`\n    - : A string, either `\"fulfilled\"` or `\"rejected\"`, indicating the eventual state of the promise.\n  - `value`\n    - : Only present if `status` is `\"fulfilled\"`. The value that the promise was fulfilled with.\n  - `reason`\n    - : Only present if `status` is `\"rejected\"`. The reason that the promise was rejected with.\n\n  If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) fulfilled.\n\n## Description\n\nThe `Promise.allSettled()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. `Promise.allSettled()` is typically used when you have multiple asynchronous tasks that are not dependent on one another to complete successfully, or you'd always like to know the result of each promise.\n\nIn comparison, the Promise returned by [`Promise.all()`](../../globals/Promise/all.mdx) may be more appropriate if the tasks are dependent on each other, or if you'd like to immediately reject upon any of them rejecting.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Promise/any.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.any()\n\nThe **`Promise.any()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise fulfills when any of the input's promises fulfills, with this first fulfillment value. It rejects when all of the input's promises reject (including when an empty iterable is passed), with an `AggregateError` containing an array of rejection reasons.\n\n## Syntax\n\n```js\nPromise.any(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array` of promises.\n\n### Return value\n\nA `Promise` that is:\n\n- **Already rejected**, if the `iterable` passed is empty.\n- **Asynchronously fulfilled**, when any of the promises in the given `iterable` fulfills. The fulfillment value is the fulfillment value of the first promise that was fulfilled.\n- **Asynchronously rejected**, when all of the promises in the given `iterable` reject. The rejection reason is an `AggregateError` containing an array of rejection reasons in its `errors` property. The errors are in the order of the promises passed, regardless of completion order. If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) rejected.\n\n## Description\n\nThe `Promise.any()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. This method is useful for returning the first promise that fulfills. It short-circuits after a promise fulfills, so it does not wait for the other promises to complete once it finds one.\n\nUnlike [`Promise.all()`](../../globals/Promise/all.mdx), which returns an _array_ of fulfillment values, we only get one fulfillment value (assuming at least one promise fulfills). This can be beneficial if we need only one promise to fulfill but we do not care which one does. Note another difference: this method rejects upon receiving an _empty iterable_, since, truthfully, the iterable contains no items that fulfill. You may compare `Promise.any()` and `Promise.all()` with [`Array.prototype.some()`](../../globals/Array/prototype/some.mdx) and [`Array.prototype.every()`](../../globals/Array/prototype/every.mdx).\n\nAlso, unlike [`Promise.race()`](../../globals/Promise/race.mdx), which returns the first _settled_ value (either fulfillment or rejection), this method returns the first _fulfilled_ value. This method ignores all rejected promises up until the first promise that fulfills.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Promise/prototype/catch.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.prototype.catch()\n\nThe **`catch()`** method of a `Promise` object schedules a function to be called when the promise is rejected. It immediately returns an equivalent `Promise` object, allowing you to [chain](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining) calls to other promise methods. It is a shortcut for [`Promise.prototype.then(undefined, onRejected)`](../../../globals/Promise/prototype/then.mdx).\n\n## Syntax\n\n```js\ncatch(onRejected)\n\ncatch((reason) => {\n  // rejection handler\n})\n```\n\n### Parameters\n\n- `onRejected`\n  - : A `Function` called when the `Promise` is rejected. This function has one parameter: the _rejection reason_.\n\n### Return value\n\nReturns a new `Promise`. This new promise is always pending when returned, regardless of the current promise's status. It's eventually rejected if `onRejected` throws an error or returns a Promise which is itself rejected; otherwise, it's eventually fulfilled.\n\n## Description\n\nThe `catch` method is used for error handling in promise composition. Since it returns a `Promise`, it [can be chained](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining_after_a_catch) in the same way as its sister method, [`Promise.prototype.then()`](../../../globals/Promise/prototype/then.mdx).\n\nIf a promise becomes rejected, and there are no rejection handlers to call (a handler can be attached through any of [`Promise.prototype.then`](../../../globals/Promise/prototype/then.mdx), [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx), or [`Promise.prototype.finally`](../../../globals/Promise/prototype/finally.mdx)), then the rejection event is surfaced by the host. In the browser, this results in an [`unhandledrejection`](https://developer.mozilla.org/docs/Web/API/Window/unhandledrejection_event) event. If a handler is attached to a rejected promise whose rejection has already caused an unhandled rejection event, then another [`rejectionhandled`](https://developer.mozilla.org/docs/Web/API/Window/rejectionhandled_event) event is fired.\n\n`catch()` internally calls `then()` on the object upon which it was called, passing `undefined` and `onRejected` as arguments. The value of that call is directly returned. This is observable if you wrap the methods.\n\n```js\n// overriding original Promise.prototype.then/catch just to add some logs\n((Promise) => {\n  const originalThen = Promise.prototype.then;\n  const originalCatch = Promise.prototype.catch;\n\n  Promise.prototype.then = function (...args) {\n    console.log(\"Called .then on %o with arguments: %o\", this, args);\n    return originalThen.apply(this, args);\n  };\n  Promise.prototype.catch = function (...args) {\n    console.error(\"Called .catch on %o with arguments: %o\", this, args);\n    return originalCatch.apply(this, args);\n  };\n})(Promise);\n\n// calling catch on an already resolved promise\nPromise.resolve().catch(function XXX() {});\n\n// Logs:\n// Called .catch on Promise{} with arguments: Arguments{1} [0: function XXX()]\n// Called .then on Promise{} with arguments: Arguments{2} [0: undefined, 1: function XXX()]\n```\n\nThis means that passing `undefined` still causes the returned promise to be rejected, and you have to pass a function to prevent the final promise from being rejected.\n\nBecause `catch()` just calls `then()`, it supports subclassing.\n\n> **Note:** The examples below are throwing instances of [`Error`](../../../globals/Error/Error.mdx). As with synchronous [`throw`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/throw) statements, this is considered a good practice; otherwise, the part doing the catching would have to perform checks to see if the argument was a string or an error, and you might lose valuable information such as stack traces.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Promise/prototype/finally.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.prototype.finally()\n\nThe **`finally()`** method of a `Promise` object schedules a function to be called when the promise is settled (either fulfilled or rejected). It immediately returns an equivalent `Promise` object, allowing you to [chain](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining) calls to other promise methods.\n\nThis lets you avoid duplicating code in both the promise's [`Promise.prototype.then`](../../../globals/Promise/prototype/then.mdx) and [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx) handlers.\n\n## Syntax\n\n```js\nfinally(onFinally)\n\nfinally(() => {\n  // Code that will run after promise is settled (fulfilled or rejected)\n})\n```\n\n### Parameters\n\n- `onFinally`\n  - : A `Function` called when the `Promise` is settled. This handler receives no parameters.\n\n### Return value\n\nReturns an equivalent `Promise`. If the handler throws an error or returns a rejected promise, the promise returned by `finally()` will be rejected with that value instead. Otherwise, the return value of the handler does not affect the state of the original promise.\n\n## Description\n\nThe `finally()` method can be useful if you want to do some processing or cleanup once the promise is settled, regardless of its outcome.\n\nThe `finally()` method is very similar to calling [`then(onFinally, onFinally)`](../../../globals/Promise/prototype/then.mdx). However, there are a couple of differences:\n\n- When creating a function inline, you can pass it once, instead of being forced to either declare it twice, or create a variable for it.\n- The `onFinally` callback does not receive any argument. This use case is for precisely when you _do not care_ about the rejection reason or the fulfillment value, and so there's no need to provide it.\n- A `finally()` call is usually transparent and does not change the eventual state of the original promise. So for example:\n  - Unlike `Promise.resolve(2).then(() => 77, () => {})`, which returns a promise eventually fulfilled with the value `77`, `Promise.resolve(2).finally(() => 77)` returns a promise eventually fulfilled with the value `2`.\n  - Similarly, unlike `Promise.reject(3).then(() => {}, () => 88)`, which returns a promise eventually fulfilled with the value `88`, `Promise.reject(3).finally(() => 88)` returns a promise eventually rejected with the reason `3`.\n\n> **Note:** A `throw` (or returning a rejected promise) in the `finally` callback still rejects the returned promise. For example, both `Promise.reject(3).finally(() => { throw 99; })` and `Promise.reject(3).finally(() => Promise.reject(99))` reject the returned promise with the reason `99`.\n\nLike [`Promise.prototype.catch()`](../../../globals/Promise/prototype/catch.mdx), `finally()` internally calls the `then` method on the object upon which it was called. If `onFinally` is not a function, `then()` is called with `onFinally` as both arguments — which, for [`Promise.prototype.then()`](../../../globals/Promise/prototype/then.mdx), means that no useful handler is attached. Otherwise, `then()` is called with two internally created functions, which behave like the following:\n\n> **Warning:** This is only for demonstration purposes and is not a polyfill.\n\n```js\npromise.then(\n  (value) => Promise.resolve(onFinally()).then(() => value),\n  (reason) =>\n    Promise.resolve(onFinally()).then(() => {\n      throw reason;\n    }),\n);\n```\n\nBecause `finally()` calls `then()`, it supports subclassing. Moreover, notice the [`Promise.resolve()`](../../../globals/Promise/resolve.mdx) call above — in reality, `onFinally()`'s return value is resolved using the same algorithm as `Promise.resolve()`, but the actual constructor used to construct the resolved promise will be the subclass. `finally()` gets this constructor through [`promise.constructor[Symbol.species]`](../../../globals/Promise/@@species.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Promise/prototype/then.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.prototype.then()\n\nThe **`then()`** method of a `Promise` object takes up to two arguments: callback functions for the fulfilled and rejected cases of the `Promise`. It immediately returns an equivalent `Promise` object, allowing you to [chain](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining) calls to other promise methods.\n\n## Syntax\n\n```js\nthen(onFulfilled)\nthen(onFulfilled, onRejected)\n\nthen(\n  (value) => { /* fulfillment handler */ },\n  (reason) => { /* rejection handler */ },\n)\n```\n\n### Parameters\n\n- `onFulfilled` _**optional**_\n  - : A `Function` asynchronously called if the `Promise` is fulfilled. This function has one parameter, the _fulfillment value_. If it is not a function, it is internally replaced with an _identity_ function (`(x) => x`) which simply passes the fulfillment value forward.\n- `onRejected` _**optional**_\n  - : A `Function` asynchronously called if the `Promise` is rejected. This function has one parameter, the _rejection reason_. If it is not a function, it is internally replaced with a _thrower_ function (`(x) => { throw x; }`) which throws the rejection reason it received.\n\n### Return value\n\nReturns a new `Promise` immediately. This new promise is always pending when returned, regardless of the current promise's status.\n\nOne of the `onFulfilled` and `onRejected` handlers will be executed to handle the current promise's fulfillment or rejection. The call always happens asynchronously, even when the current promise is already settled. The behavior of the returned promise (call it `p`) depends on the handler's execution result, following a specific set of rules. If the handler function:\n\n- returns a value: `p` gets fulfilled with the returned value as its value.\n- doesn't return anything: `p` gets fulfilled with `undefined`.\n- throws an error: `p` gets rejected with the thrown error as its value.\n- returns an already fulfilled promise: `p` gets fulfilled with that promise's value as its value.\n- returns an already rejected promise: `p` gets rejected with that promise's value as its value.\n- returns another pending promise: the fulfillment/rejection of the promise returned by `then` will be subsequent to the resolution/rejection of the promise returned by the handler. Also, the resolved value of the promise returned by `then` will be the same as the resolved value of the promise returned by the handler.\n\n## Description\n\nThe `then()` method schedules callback functions for the eventual completion of a Promise — either fulfillment or rejection. It is the primitive method of promises: the [thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) protocol expects all promise-like objects to expose a `then()` method, and the [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx) and [`Promise.prototype.finally`](../../../globals/Promise/prototype/finally.mdx) methods both work by invoking the object's `then()` method.\n\nFor more information about the `onRejected` handler, see the [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx) reference.\n\n`then()` returns a new promise object. If you call the `then()` method twice on the same promise object (instead of chaining), then this promise object will have two pairs of settlement handlers. All handlers attached to the same promise object are always called in the order they were added. Moreover, the two promises returned by each call of `then()` start separate chains and do not wait for each other's settlement.\n\n[Thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) objects that arise along the `then()` chain are always [resolved](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise/Promise#the_resolver_function) — the `onFulfilled` handler never receives a thenable object, and any thenable returned by either handler are always resolved before being passed to the next handler. This is because when constructing the new promise, the `resolve` and `reject` functions passed by the `executor` are saved, and when the current promise settles, the respective function will be called with the fulfillment value or rejection reason. The resolving logic comes from the resolver function passed by the [`Promise()`](../../../globals/Promise/Promise.mdx) constructor.\n\n`then()` supports subclassing, which means it can be called on instances of subclasses of `Promise`, and the result will be a promise of the subclass type. You can customize the type of the return value through the [`[Symbol.species]`](../../../globals/Promise/@@species.mdx) property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Promise/race.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.race()\n\nThe **`Promise.race()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise settles with the eventual state of the first promise that settles.\n\n## Syntax\n\n```js\nPromise.race(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array`) of promises.\n\n### Return value\n\nA `Promise` that **asynchronously settles** with the eventual state of the first promise in the `iterable` to settle. In other words, it fulfills if the first promise to settle is fulfilled, and rejects if the first promise to settle is rejected. The returned promise remains pending forever if the `iterable` passed is empty. If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) settled.\n\n## Description\n\nThe `Promise.race()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. It's useful when you want the first async task to complete, but do not care about its eventual state (i.e. it can either succeed or fail).\n\nIf the iterable contains one or more non-promise values and/or an already settled promise, then `Promise.race()` will settle to the first of these values found in the iterable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Promise/reject.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.reject()\n\nThe **`Promise.reject()`** method returns a `Promise` object that is rejected with a given reason.\n\n## Syntax\n\n```js\nPromise.reject(reason)\n```\n\n### Parameters\n\n- `reason`\n  - : Reason why this `Promise` rejected.\n\n### Return value\n\nA `Promise` that is rejected with the given reason.\n\n## Description\n\nThe static `Promise.reject` function returns a `Promise` that is rejected. For debugging purposes and selective error catching, it is useful to make `reason` an `instanceof` [`Error`](../../globals/Error/Error.mdx).\n\n`Promise.reject()` is generic and supports subclassing, which means it can be called on subclasses of `Promise`, and the result will be a promise of the subclass type. To do so, the subclass's constructor must implement the same signature as the [`Promise()`](../../globals/Promise/Promise.mdx) constructor — accepting a single `executor` function that can be called with the `resolve` and `reject` callbacks as parameters. `Promise.reject()` is essentially a shorthand for `new Promise((resolve, reject) => reject(reason))`.\n\nUnlike [`Promise.resolve()`](../../globals/Promise/resolve.mdx), `Promise.reject()` always wraps `reason` in a new `Promise` object, even when `reason` is already a `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Promise/resolve.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.resolve()\n\nThe **`Promise.resolve()`** method \"resolves\" a given value to a `Promise`. If the value is a promise, that promise is returned; if the value is a [thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables), `Promise.resolve()` will call the `then()` method with two callbacks it prepared; otherwise the returned promise will be fulfilled with the value.\n\nThis function flattens nested layers of promise-like objects (e.g. a promise that fulfills to a promise that fulfills to something) into a single layer — a promise that fulfills to a non-thenable value.\n\n## Syntax\n\n```js\nPromise.resolve(value)\n```\n\n### Parameters\n\n- `value`\n  - : Argument to be resolved by this `Promise`. Can also be a `Promise` or a thenable to resolve.\n\n### Return value\n\nA `Promise` that is resolved with the given value, or the promise passed as value, if the value was a promise object. A resolved promise can be in any of the states — fulfilled, rejected, or pending. For example, resolving a rejected promise will still result in a rejected promise.\n\n## Description\n\n`Promise.resolve()` _resolves_ a promise, which is not the same as fulfilling or rejecting the promise. See [Promise description](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#description) for definitions of the terminology. In brief, `Promise.resolve()` returns a promise whose eventual state depends on another promise, thenable object, or other value.\n\n`Promise.resolve()` is generic and supports subclassing, which means it can be called on subclasses of `Promise`, and the result will be a promise of the subclass type. To do so, the subclass's constructor must implement the same signature as the [`Promise()`](../../globals/Promise/Promise.mdx) constructor — accepting a single `executor` function that can be called with the `resolve` and `reject` callbacks as parameters.\n\n`Promise.resolve()` special-cases native `Promise` instances. If `value` belongs to `Promise` or a subclass, and `value.constructor === Promise`, then `value` is directly returned by `Promise.resolve()`, without creating a new `Promise` instance. Otherwise, `Promise.resolve()` is essentially a shorthand for `new Promise((resolve) => resolve(value))`.\n\nThe bulk of the resolving logic is actually implemented by the [resolver function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise/Promise#the_resolver_function) passed by the `Promise()` constructor. In summary:\n\n- If a non-[thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) value is passed, the returned promise is already fulfilled with that value.\n- If a thenable is passed, the returned promise will adopt the state of that thenable by calling the `then` method and passing a pair of resolving functions as arguments. (But because native promises directly pass through `Promise.resolve()` without creating a wrapper, the `then` method is not called on native promises.) If the resolver function receives another thenable object, it will be resolved agin, so that the eventual fulfillment value of the promise will never be thenable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Proxy/Proxy.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Proxy()\n\nThe **`Proxy()`** constructor is used to create `Proxy` objects.\n\n## Syntax\n\n```js\nnew Proxy(target, handler)\n```\n\n> **Note:** `Proxy()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `target`\n  - : A target object to wrap with `Proxy`. It can be any sort of object,\n    including a native array, a function, or even another proxy.\n- `handler`\n  - : An object whose properties are functions that define the behavior of the proxy when\n    an operation is performed on it.\n\n## Description\n\nUse the `Proxy()` constructor to create a new `Proxy` object.\nThis constructor takes two mandatory arguments:\n\n- `target` is the object for which you want to create the proxy\n- `handler` is the object that defines the custom behavior of the proxy.\n\nAn empty handler will create a proxy that behaves, in almost all respects, exactly like\nthe target. By defining any of a set group of functions on the `handler`\nobject, you can customize specific aspects of the proxy's behavior. For example, by\ndefining `get()` you can provide a customized version of the target's\n[property accessor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Property_Accessors).\n\n### Handler functions\n\nThis section lists all the handler functions you can define. Handler functions are\nsometimes called _traps_, because they trap calls to the underlying target\nobject.\n\n- [`handler.apply()`](../../globals/Proxy/proxy/apply.mdx)\n  - : A trap for a function call.\n- [`handler.construct()`](../../globals/Proxy/proxy/construct.mdx)\n  - : A trap for the `new` operator.\n- [`handler.defineProperty()`](../../globals/Proxy/proxy/defineProperty.mdx)\n  - : A trap for [`Object.defineProperty`](../../globals/Object/defineProperty.mdx).\n- [`handler.deleteProperty()`](../../globals/Proxy/proxy/deleteProperty.mdx)\n  - : A trap for the `delete` operator.\n- [`handler.get()`](../../globals/Proxy/proxy/get.mdx)\n  - : A trap for getting property values.\n- [`handler.getOwnPropertyDescriptor()`)}](../../globals/Proxy/proxy/getOwnPropertyDescriptor.mdx)\n  - : A trap for [`Object.getOwnPropertyDescriptor`](../../globals/Object/getOwnPropertyDescriptor.mdx).\n- [`handler.getPrototypeOf()`](../../globals/Proxy/proxy/getPrototypeOf.mdx)\n  - : A trap for [`Object.getPrototypeOf()`](../../globals/Object/getPrototypeOf.mdx).\n- [`handler.has()`](../../globals/Proxy/proxy/has.mdx)\n  - : A trap for the `in` operator.\n- [`handler.isExtensible()`](../../globals/Proxy/proxy/isExtensible.mdx)\n  - : A trap for [`Object.isExtensible()`](../../globals/Object/isExtensible.mdx).\n- [`handler.ownKeys()`](../../globals/Proxy/proxy/ownKeys.mdx)\n  - : A trap for [`Object.getOwnPropertyNames()`](../../globals/Object/getOwnPropertyNames.mdx) and\n    [`Object.getOwnPropertySymbols()`](../../globals/Object/getOwnPropertySymbols.mdx).\n- [`handler.preventExtensions()`)}](../../globals/Proxy/proxy/preventExtensions.mdx)\n  - : A trap for [`Object.preventExtensions()`](../../globals/Object/preventExtensions.mdx).\n- [`handler.set()`](../../globals/Proxy/proxy/set.mdx)\n  - : A trap for setting property values.\n- [`handler.setPrototypeOf()`](../../globals/Proxy/proxy/setPrototypeOf.mdx)\n  - : A trap for [`Object.setPrototypeOf()`](../../globals/Object/setPrototypeOf.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Proxy/proxy/apply.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.apply()\n\nThe **`handler.apply()`** method is a trap for a function call.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  apply(target, thisArg, argumentsList) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `apply()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target callable object.\n- `thisArg`\n  - : The `this` argument for the call.\n- `argumentsList`\n  - : The list of arguments for the call.\n\n### Return value\n\nThe `apply()` method can return any value.\n\n## Description\n\nThe **`handler.apply()`** method is a trap for a function call.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- Function call: `proxy(...args)`\n- [`Function.prototype.apply()`](../../../globals/Function/prototype/apply.mdx) and [`Function.prototype.call()`](../../../globals/Function/prototype/call.mdx)\n- [`Reflect.apply()`](../../../globals/Reflect/apply.mdx)\n\nOr any other operation that invokes the `[[Call]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The `target` must be a callable itself. That is, it must be a function object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Proxy/proxy/construct.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.construct()\n\nThe **`handler.construct()`** method is a trap for the `new` operator. In order for the new operation to be valid on the resulting Proxy object, the target used to initialize the proxy must itself have a `[[Construct]]` internal method (i.e. `new target` must be valid).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  construct(target, argumentsList, newTarget) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `construct()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `argumentsList`\n  - : The list of arguments for the constructor.\n- `newTarget`\n  - : The constructor that was originally called, `p` above.\n\n### Return value\n\nThe `construct` method must return an object.\n\n## Description\n\nThe **`handler.construct()`** method is a trap for the `new` operator.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- The `new` operator: `new myFunction(...args)`\n- [`Reflect.construct()`](../../../globals/Reflect/construct.mdx)\n\nOr any other operation that invokes the `[[Construct]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The result must be an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Proxy/proxy/defineProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.defineProperty()\n\nThe **`handler.defineProperty()`** method is a trap for\n[`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  defineProperty(target, property, descriptor) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `defineProperty()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property whose description is to be\n    retrieved.\n- `descriptor`\n  - : The descriptor for the property being defined or modified.\n\n### Return value\n\nThe `defineProperty()` method must return a `Boolean` indicating\nwhether or not the property has been successfully defined.\n\n## Description\n\nThe **`handler.defineProperty()`** method is a trap for\n[`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx), [`Object.defineProperties()`](../../../globals/Object/defineProperties.mdx)\n- [`Reflect.defineProperty()`](../../../globals/Reflect/defineProperty.mdx)\n\nOr any other operation that invokes the `[[DefineOwnProperty]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- A property cannot be added, if the target object is not extensible.\n- A property cannot be added as or modified to be non-configurable, if it does not\n  exists as a non-configurable own property of the target object.\n- A property may not be non-configurable, if a corresponding configurable property of\n  the target object exists.\n- If a property has a corresponding target object property then\n  `Object.defineProperty(target, prop, descriptor)`\n  will not throw an exception.\n- In strict mode, a `false` return value from the\n  `defineProperty()` handler will throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Proxy/proxy/deleteProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.deleteProperty()\n\nThe **`handler.deleteProperty()`** method is a trap for the `delete` operator.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  deleteProperty(target, property) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `deleteProperty()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property to delete.\n\n### Return value\n\nThe `deleteProperty()` method must return a `Boolean` indicating\nwhether or not the property has been successfully deleted.\n\n## Description\n\nThe **`handler.deleteProperty()`** method is a trap for the `delete` operator.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- The [`delete`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) operator: `delete proxy[foo]` and\n  `delete proxy.foo`\n- [`Reflect.deleteProperty()`](../../../globals/Reflect/deleteProperty.mdx)\n\nOr any other operation that invokes the `[[Delete]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- A property cannot be deleted, if it exists as a non-configurable own property of the\n  target object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Proxy/proxy/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.get()\n\nThe **`handler.get()`** method is a trap for getting a property\nvalue.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  get(target, property, receiver) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `get()` method. `this`\nis bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property to get.\n- `receiver`\n  - : Either the proxy or an object that inherits from the proxy.\n\n### Return value\n\nThe `get()` method can return any value.\n\n## Description\n\nThe **`handler.get()`** method is a trap for getting a property\nvalue.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- Property access: `proxy[foo]` and `proxy.bar`\n- [`Reflect.get()`](../../../globals/Reflect/get.mdx)\n\nOr any other operation that invokes the `[[Get]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The value reported for a property must be the same as the value of the corresponding\n  target object property if the target object property is a non-writable,\n  non-configurable own data property.\n- The value reported for a property must be undefined if the corresponding target\n  object property is a non-configurable own accessor property that has\n  `undefined` as its `[[Get]]` attribute.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Proxy/proxy/getOwnPropertyDescriptor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.getOwnPropertyDescriptor()\n\nThe **`handler.getOwnPropertyDescriptor()`** method is a trap for [`Object.getOwnPropertyDescriptor()`](../../../globals/Object/getOwnPropertyDescriptor.mdx).\n\n\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  getOwnPropertyDescriptor(target, prop) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `getOwnPropertyDescriptor()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `prop`\n  - : The name of the property whose description should be retrieved.\n\n### Return value\n\nThe `getOwnPropertyDescriptor()` method must return an object or `undefined`.\n\n## Description\n\nThe **`handler.getOwnPropertyDescriptor()`** method is a trap for [`Object.getOwnPropertyDescriptor()`](../../../globals/Object/getOwnPropertyDescriptor.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.getOwnPropertyDescriptor()`](../../../globals/Object/getOwnPropertyDescriptor.mdx)\n- [`Reflect.getOwnPropertyDescriptor()`](../../../globals/Reflect/getOwnPropertyDescriptor.mdx)\n\nOr any other operation that invokes the `[[GetOwnProperty]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `getOwnPropertyDescriptor()` must return an object or `undefined`.\n- A property cannot be reported as non-existent, if it exists as a non-configurable own property of the target object.\n- A property cannot be reported as non-existent, if it exists as an own property of the target object and the target object is not extensible.\n- A property cannot be reported as existent, if it does not exists as an own property of the target object and the target object is not extensible.\n- A property cannot be reported as non-configurable, if it does not exists as an own property of the target object or if it exists as a configurable own property of the target object.\n- The result of `Object.getOwnPropertyDescriptor(target)` can be applied to the target object using `Object.defineProperty()` and will not throw an exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Proxy/proxy/getPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.getPrototypeOf()\n\nThe **`handler.getPrototypeOf()`** method is a trap for the\n`[[GetPrototypeOf]]` internal method.\n\n## Syntax\n\n```js\nnew Proxy(obj, {\n  getPrototypeOf(target) {\n    // …\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `getPrototypeOf()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `getPrototypeOf()` method must return an object or `null`.\n\n## Description\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.getPrototypeOf()`](../../../globals/Object/getPrototypeOf.mdx)\n- [`Reflect.getPrototypeOf()`](../../../globals/Reflect/getPrototypeOf.mdx)\n- [`Object.prototype.isPrototypeOf()`](../../../globals/Object/prototype/isPrototypeOf.mdx)\n- `instanceof`\n\nOr any other operation that invokes the `[[GetPrototypeOf]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `getPrototypeOf()` method must return an object or `null`.\n- If `target` is not extensible,\n  `Object.getPrototypeOf(proxy)` method must return the same\n  value as `Object.getPrototypeOf(target)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Proxy/proxy/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.has()\n\nThe **`handler.has()`** method is a trap for the `in` operator.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  has(target, prop) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to `has()` method. `this` is\nbound to the handler.\n\n- `target`\n  - : The target object.\n- `prop`\n  - : The name or `Symbol` of the property to check for existence.\n\n### Return value\n\nThe `has()` method must return a boolean value.\n\n## Description\n\nThe **`handler.has()`** method is a trap for the `in` operator.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- The [`in`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/in) operator: `foo in proxy`\n- [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) check: `with(proxy) { (foo); }`\n- [`Reflect.has()`](../../../globals/Reflect/has.mdx)\n\nOr any other operation that invokes the `[[HasProperty]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- A property cannot be reported as non-existent, if it exists as a non-configurable\n  own property of the target object.\n- A property cannot be reported as non-existent, if it exists as an own property of\n  the target object and the target object is not extensible.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Proxy/proxy/isExtensible.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.isExtensible()\n\nThe **`handler.isExtensible()`** method is a trap for\n[`Object.isExtensible()`](../../../globals/Object/isExtensible.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  isExtensible(target) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `isExtensible()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `isExtensible()` method must return a boolean value.\n\n## Description\n\nThe **`handler.isExtensible()`** method is a trap for\n[`Object.isExtensible()`](../../../globals/Object/isExtensible.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.isExtensible()`](../../../globals/Object/isExtensible.mdx)\n- [`Reflect.isExtensible()`](../../../globals/Reflect/isExtensible.mdx)\n\nOr any other operation that invokes the `[[IsExtensible]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `Object.isExtensible(proxy)` must return the same value as\n  `Object.isExtensible(target)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Proxy/proxy/ownKeys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.ownKeys()\n\nThe **`handler.ownKeys()`** method is a trap for\n[`Reflect.ownKeys()`](../../../globals/Reflect/ownKeys.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  ownKeys(target) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `ownKeys()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `ownKeys()` method must return an enumerable object.\n\n## Description\n\nThe **`handler.ownKeys()`** method is a trap for\n[`Reflect.ownKeys()`](../../../globals/Reflect/ownKeys.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.getOwnPropertyNames()`](../../../globals/Object/getOwnPropertyNames.mdx)\n- [`Object.getOwnPropertySymbols()`](../../../globals/Object/getOwnPropertySymbols.mdx)\n- [`Object.keys()`](../../../globals/Object/keys.mdx)\n- [`Reflect.ownKeys()`](../../../globals/Reflect/ownKeys.mdx)\n\nOr any other operation that invokes the `[[OwnPropertyKeys]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The result of `ownKeys()` must be an array.\n- The type of each array element is either a `String` or a `Symbol`.\n- The result List must contain the keys of all non-configurable own properties of the\n  target object.\n- If the target object is not extensible, then the result List must contain all the\n  keys of the own properties of the target object and no other values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Proxy/proxy/preventExtensions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.preventExtensions()\n\nThe **`handler.preventExtensions()`** method is a trap for [`Object.preventExtensions()`](../../../globals/Object/preventExtensions.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  preventExtensions(target) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `preventExtensions()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `preventExtensions()` method must return a boolean value.\n\n## Description\n\nThe **`handler.preventExtensions()`** method is a trap for [`Object.preventExtensions()`](../../../globals/Object/preventExtensions.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.preventExtensions()`](../../../globals/Object/preventExtensions.mdx)\n- [`Reflect.preventExtensions()`](../../../globals/Reflect/preventExtensions.mdx)\n- [`Object.seal()`](../../../globals/Object/seal.mdx)\n- [`Object.freeze()`](../../../globals/Object/freeze.mdx)\n\nOr any other operation that invokes the `[[PreventExtensions]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `Object.preventExtensions(proxy)` only returns `true` if `Object.isExtensible(proxy)` is `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Proxy/proxy/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.set()\n\nThe **`handler.set()`** method is a trap for setting a property\nvalue.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  set(target, property, value, receiver) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `set()` method. `this`\nis bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property to set.\n- `value`\n  - : The new value of the property to set.\n- `receiver`\n\n  - : The object to which the assignment was originally directed. This is usually the\n    proxy itself. But a `set()` handler can also be called indirectly, via\n    the prototype chain or various other ways.\n\n    For example, suppose a script does\n    `obj.name = \"jen\"`, and `obj` is not a\n    proxy, and has no own property `.name`, but it has a proxy on its\n    prototype chain. That proxy's `set()` handler will be called, and\n    `obj` will be passed as the receiver.\n\n### Return value\n\nThe `set()` method should return a boolean value.\n\n- Return `true` to indicate that assignment succeeded.\n- If the `set()` method returns `false`, and the assignment\n  happened in strict-mode code, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) will be thrown.\n\n## Description\n\nThe **`handler.set()`** method is a trap for setting property\nvalue.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- Property assignment: `proxy[foo] = bar` and `proxy.foo = bar`\n- [`Reflect.set()`](../../../globals/Reflect/set.mdx)\n\nOr any other operation that invokes the `[[Set]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- Cannot change the value of a property to be different from the value of the\n  corresponding target object property if the corresponding target object property is a\n  non-writable, non-configurable data property.\n- Cannot set the value of a property if the corresponding target object property is a\n  non-configurable accessor property that has `undefined` as its\n  `[[Set]]` attribute.\n- In strict mode, a `false` return value from the `set()`\n  handler will throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Proxy/proxy/setPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.setPrototypeOf()\n\nThe **`handler.setPrototypeOf()`** method is a trap for\n[`Object.setPrototypeOf()`](../../../globals/Object/setPrototypeOf.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  setPrototypeOf(target, prototype) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `setPrototypeOf()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `prototype`\n  - : The object's new prototype or `null`.\n\n### Return value\n\nThe `setPrototypeOf()` method returns `true` if the\n`[[Prototype]]` was successfully changed, otherwise `false`.\n\n## Description\n\nThe **`handler.setPrototypeOf()`** method is a trap for\n[`Object.setPrototypeOf()`](../../../globals/Object/setPrototypeOf.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.setPrototypeOf()`](../../../globals/Object/setPrototypeOf.mdx)\n- [`Reflect.setPrototypeOf()`](../../../globals/Reflect/setPrototypeOf.mdx)\n\nOr any other operation that invokes the `[[SetPrototypeOf]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- If `target` is not extensible, the `prototype`\n  parameter must be the same value as\n  `Object.getPrototypeOf(target)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Proxy/revocable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Proxy.revocable()\n\nThe **`Proxy.revocable()`** static method creates a revocable `Proxy` object.\n\n## Syntax\n\n```js\nProxy.revocable(target, handler)\n```\n\n### Parameters\n\n- `target`\n  - : A target object to wrap with `Proxy`. It can be any sort of object, including a native array, a function, or even another proxy.\n- `handler`\n  - : An object whose properties are functions defining the behavior of `proxy` when an operation is performed on it.\n\n### Return value\n\nA plain object with the following two properties:\n\n- `proxy`\n  - : A Proxy object exactly the same as one created with a [`new Proxy(target, handler)`](../../globals/Proxy/Proxy.mdx) call.\n- `revoke`\n  - : A function with no parameters to revoke (switch off) the `proxy`.\n\n## Description\n\nThe `Proxy.revocable()` factory function is the same as the [`Proxy()`](../../globals/Proxy/Proxy.mdx) constructor, except that in addition to creating a proxy object, it also creates a `revoke` function that can be called to disable the proxy. The proxy object and the `revoke` function are wrapped in a plain object.\n\nThe `revoke` function does not take any parameters, nor does it rely on the `this` value. The created `proxy` object is attached to the `revoke` function as a [private property](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/Private_class_fields) that the `revoke` function accesses on itself when called (the existence of the private property is not observable from the outside, but it has implications on how garbage collection happens). The `proxy` object is _not_ captured within the [closure](https://developer.mozilla.org/docs/Web/JavaScript/Closures) of the `revoke` function (which will make garbage collection of `proxy` impossible if `revoke` is still alive).\n\nAfter the `revoke()` function gets called, the proxy becomes unusable: any trap to a handler throws a [`TypeError`](../../globals/TypeError/TypeError.mdx). Once a proxy is revoked, it remains revoked, and calling `revoke()` again has no effect — in fact, the call to `revoke()` detaches the `proxy` object from the `revoke` function, so the `revoke` function will not be able to access the proxy again at all. If the proxy is not referenced elsewhere, it will then be eligible for garbage collection. The `revoke` function also detaches `target` and `handler` from the `proxy`, so if `target` is not referenced elsewhere, it will also be eligible for garbage collection, even when its proxy is still alive, since there's no longer a way to meaningfully interact with the target object.\n\nLetting users interact with an object through a revocable proxy allows you to [control the lifetime](https://developer.mozilla.org/docs/Web/JavaScript/Memory_Management) of the object exposed to the user — you can make the object garbage-collectable even when the user is still holding a reference to its proxy.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/RangeError/RangeError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RangeError\n\nThe **`RangeError()`** constructor creates an error\nwhen a value is not in the set or range of allowed values.\n\n## Syntax\n\n```js\nnew RangeError()\nnew RangeError(message)\nnew RangeError(message, options)\nnew RangeError(message, fileName)\nnew RangeError(message, fileName, lineNumber)\n\nRangeError()\nRangeError(message)\nRangeError(message, options)\nRangeError(message, fileName)\nRangeError(message, fileName, lineNumber)\n```\n\n> **Note:** `RangeError()` can be called with or without `new`. Both create a new `RangeError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/ReadableByteStreamController/prototype/byobRequest.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# byobRequest\n\nThe **`byobRequest`** read-only property of the `ReadableByteStreamController` interface returns the current BYOB request, or `null` if there are no pending requests.\n\nAn underlying byte source should check this property, and use it to write data to the stream if it exists (rather than using `ReadableByteStreamController.enqueue()`).\nThis will result in an efficient zero-byte transfer of the data to the consumer.\n\n## Value\n\nA `ReadableStreamBYOBRequest` object instance, or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/ReadableByteStreamController/prototype/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# close()\n\nThe **`close()`** method of the `ReadableByteStreamController` interface closes the associated stream.\n\nThis might be called by the underlying source when its data source has been exhausted/completed.\n\n> **Note:** Readers will still be able to read any previously-enqueued chunks from the stream, but once those are read, the stream will become closed.\n> However if there is an outstanding and partially written `byobRequest` when `close()` is called, the stream will be errored.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableByteStreamController`, it is already closed, or the stream is not readable for some other reason.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/ReadableByteStreamController/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# desiredSize\n\nThe **`desiredSize`** read-only property of the`ReadableByteStreamController` interface returns the number of bytes required to fill the stream's internal queue to its \"desired size\".\n\nThe value is used by the stream to indicate a preferred flow rate to the underlying source.\nSources that support throttling or pausing their inflow of data (not all do!) should control the inflow such that `desiredSize` of the stream buffer is kept positive and as close to zero as possible.\n\nThe `desiredSize` is used to apply backpressure from downstream consumers.\n\n## Value\n\nAn integer. Note that this can be negative if the queue is over-full.\n\nThe value will be `null` if the stream has errored and `0` if it is closed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/ReadableByteStreamController/prototype/enqueue.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# enqueue()\n\nThe **`enqueue()`** method of the `ReadableByteStreamController` interface enqueues a given chunk on the associated readable byte stream (the chunk is copied into the stream's internal queues).\n\nThis should only be used to transfer data to the queue when `byobRequest` is `null`.\n\n## Syntax\n\n```js\nenqueue(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : The chunk to enqueue.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableByteStreamController`, or the stream cannot be read for some other reason, or the chunk is not an object, or the chunk's internal array buffer is non-existent, zero-length, or detached.\n    It is also thrown if the stream has been closed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/ReadableByteStreamController/prototype/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# error()\n\nThe **`error()`** method of the `ReadableByteStreamController` interface causes any future interactions with the associated stream to error with the specified reason.\n\nThis is commonly called by an underlying source to surface an error from the interface where it gets its data (such as a file-read or socket error).\nIt can also be called from elsewhere to trigger a stream error, for example if another part of the system that the stream relies on fails.\n\n## Syntax\n\n```js\nerror(errorObject)\n```\n\n### Parameters\n\n- `errorObject`\n  - : Any object that you want future interactions to fail with.\n\n### Return value\n\n`undefined`\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableByteStreamController`, or the stream is not readable for some other reason.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/ReadableStream/ReadableStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream()\n\nThe **`ReadableStream()`** constructor creates and returns a readable stream object from the given handlers.\n\n## Syntax\n\n```js\nnew ReadableStream()\nnew ReadableStream(underlyingSource)\nnew ReadableStream(underlyingSource, queuingStrategy)\n```\n\n### Parameters\n\n- `underlyingSource` _**optional**_\n\n  - : An object containing methods and properties that define how the constructed stream instance will behave.\n    `underlyingSource` can contain the following:\n\n    - `start` (controller) _**optional**_\n      - : This is a method, called immediately when the object is constructed. The\n        contents of this method are defined by the developer, and should aim to get access\n        to the stream source, and do anything else required to set up the stream\n        functionality. If this process is to be done asynchronously, it can return a\n        promise to signal success or failure. The `controller` parameter passed\n        to this method is a `ReadableStreamDefaultController` or a\n        `ReadableByteStreamController`, depending on the value of the\n        `type` property. This can be used by the developer to control the\n        stream during set up.\n    - `pull` (controller) _**optional**_\n      - : This method, also defined by the developer, will be called repeatedly when the\n        stream's internal queue of chunks is not full, up until it reaches its high water\n        mark. If `pull()` returns a promise, then it won't be called again\n        until that promise fulfills; if the promise rejects, the stream will become\n        errored. The `controller` parameter passed to this method is a\n        `ReadableStreamDefaultController` or a\n        `ReadableByteStreamController`, depending on the value of the\n        `type` property. This can be used by the developer to control the\n        stream as more chunks are fetched.\n    - `cancel` (reason) _**optional**_\n      - : This method, also defined by the developer, will be called if the app signals\n        that the stream is to be cancelled (e.g. if `ReadableStream.cancel()`\n        is called). The contents should do whatever is necessary to release access to the\n        stream source. If this process is asynchronous, it can return a promise to signal\n        success or failure. The `reason` parameter contains a\n        string describing why the stream was cancelled.\n    - `type` _**optional**_\n      - : This property controls what type of readable stream is being dealt with. If it\n        is included with a value set to `\"bytes\"`, the passed controller object\n        will be a `ReadableByteStreamController` capable of handling a BYOB\n        (bring your own buffer)/byte stream. If it is not included, the passed controller\n        will be a `ReadableStreamDefaultController`.\n    - `autoAllocateChunkSize` _**optional**_\n\n      - : For byte streams, the developer can set the `autoAllocateChunkSize` with a positive integer value to turn on the stream's auto-allocation feature.\n        With this is set, the stream implementation will automatically allocate a view buffer of the specified size in `ReadableByteStreamController.byobRequest` when required.\n\n        This must be set to enable zero-copy transfers to be used with a default `ReadableStreamDefaultReader`.\n        If not set, a default reader will still stream data, but `ReadableByteStreamController.byobRequest` will always be `null` and transfers to the consumer must be via the stream's internal queues.\n\n- `queuingStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer — this defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk` — this indicates the size to\n        use for each chunk, in bytes.\n\n    > **Note:** You could define your own custom\n    > `queuingStrategy`, or use an instance of\n    > `ByteLengthQueuingStrategy` or `CountQueuingStrategy`\n    > for this object value. If no `queuingStrategy` is supplied, the default\n    > used is the same as a `CountQueuingStrategy` with a high water mark of\n    > 1\\.\n\n### Return value\n\nAn instance of the `ReadableStream` object.\n\n### Exceptions\n\n- `RangeError`\n  - Thrown if the supplied type value is neither `\"bytes\"` nor `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/ReadableStream/prototype/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.cancel()\n\nThe **`cancel()`** method of the\n`ReadableStream` interface returns a `Promise` that\nresolves when the stream is canceled.\n\nCancel is used when you've completely finished with the stream and don't need any more\ndata from it, even if there are chunks enqueued waiting to be read. That data is lost\nafter cancel is called, and the stream is not readable any more. To read those chunks\nstill and not completely get rid of the stream, you'd use\n`ReadableStreamDefaultController.close()`.\n\n## Syntax\n\n```js\ncancel()\ncancel(reason)\n```\n\n### Parameters\n\n- `reason` _**optional**_\n  - : A human-readable reason for the cancellation. The underlying source may or may not use it.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason` parameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to cancel is not a `ReadableStream`, or it is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/ReadableStream/prototype/getReader.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.getReader()\n\nThe **`getReader()`** method of the `ReadableStream` interface creates a reader and locks the stream to it.\nWhile the stream is locked, no other reader can be acquired until this one is released.\n\n## Syntax\n\n```js\ngetReader()\ngetReader(options)\n```\n\n### Parameters\n\n- `options` _**optional**_\n\n  - : An object containing the following properties:\n\n    - `mode` _**optional**_\n\n      - : A property that specifies the type of reader to create.\n        Values can be:\n\n        - `\"byob\"`, which results in a `ReadableStreamBYOBReader` being created that can read readable byte streams (streams that support zero-copy transfer from an underlying byte source to the reader when internal stream buffers are empty).\n        - `undefined` (or not specified at all — this is the default), which results in a `ReadableStreamDefaultReader` being created that can read individual chunks from a stream.\n\n### Return value\n\nA `ReadableStreamDefaultReader` or `ReadableStreamBYOBReader` object instance, depending on the `mode` value.\n\n### Exceptions\n\n- `RangeError`\n  - : Thrown if the provided mode value is not `\"byob\"` or `undefined`.\n- `TypeError`\n  - : Thrown if the stream you are trying to create a reader for is already locked, or not a `ReadableStream`."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/ReadableStream/prototype/locked.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.locked\n\nThe **`locked`** read-only property of the `ReadableStream` interface returns whether or not the readable stream is locked to a reader.\n\nA readable stream can have at most one active reader at a time, and is locked to that reader until it is released.\nA reader might be obtained using `ReadableStream.getReader()` and released using the reader's `releaseLock()` method.\n\n## Value\n\nA `boolean` value indicating whether or not the readable stream is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/ReadableStream/prototype/pipeThrough.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.pipeThrough()\n\nThe **`pipeThrough()`** method of the `ReadableStream` interface provides a chainable way of piping the current stream through a transform stream or any other writable/readable pair.\n\nPiping a stream will generally lock it for the duration of the pipe, preventing other readers from locking it.\n\n## Syntax\n\n```js\npipeThrough(transformStream)\npipeThrough(transformStream, options)\n```\n\n### Parameters\n\n- `transformStream`\n\n  - : A `TransformStream` (or an object with the structure\n    `{writable, readable}`) consisting of a readable stream and a writable\n    stream working together to transform some data from one form to another. Data written\n    to the `writable` stream can be read in some transformed state by the\n    `readable` stream. For example, a `TextDecoder`, has bytes\n    written to it and strings read from it, while a video decoder has encoded bytes\n    written to it and uncompressed video frames read from it.\n\n- `options` _**optional**_\n\n  - : The options that should be used when piping to the `writable` stream.\n    Available options are:\n\n    - `preventClose`\n\n      - : If this is set to `true`, the source `ReadableStream` closing will no longer cause the destination `WritableStream` to be closed.\n        The method will return a fulfilled promise once this process completes, unless an error is encountered while closing the destination, in which case it will be rejected with that error.\n\n    - `preventAbort`\n\n      - : If this is set to `true`, errors in the source `ReadableStream` will no longer abort the destination `WritableStream`.\n        The method will return a promise rejected with the source's error, or with any error that occurs during aborting the destination.\n\n    - `preventCancel`\n\n      - : If this is set to `true`, errors in the destination `WritableStream` will no longer cancel the source `ReadableStream`.\n        In this case the method will return a promise rejected with the source's error, or with any error that occurs during canceling the source.\n        In addition, if the destination writable stream starts out closed or closing, the source readable stream will no longer be canceled.\n        In this case the method will return a promise rejected with an error indicating piping to a closed stream failed, or with any error that occurs during canceling the source.\n\n### Return value\n\nThe `readable` side of the `transformStream`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the `writable` and/or `readable` property of `transformStream` are undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/ReadableStream/prototype/pipeTo.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.pipeTo()\n\nThe **`pipeTo()`** method of the `ReadableStream` interface pipes the current `ReadableStream` to a given `WritableStream` and returns a `Promise` that fulfills when the piping process completes successfully, or rejects if any errors were encountered.\n\nPiping a stream will generally `lock` it for the duration of the pipe, preventing other readers from locking it.\n\n## Syntax\n\n```js\npipeTo(destination)\npipeTo(destination, options)\n```\n\n### Parameters\n\n- `destination`\n\n  - : A `WritableStream` that acts as the final destination for the `ReadableStream`.\n\n- `options` _**optional**_\n\n  - : The options that should be used when piping to the `writable` stream.\n    Available options are:\n\n    - `preventClose`\n      - : If this is set to `true`, the source `ReadableStream` closing will no longer cause the destination `WritableStream` to be closed.\n        The method will return a fulfilled promise once this process completes, unless an error is encountered while closing the destination in which case it will be rejected with that error.\n    - `preventAbort`\n      - : If this is set to `true`, errors in the source `ReadableStream` will no longer abort the destination `WritableStream`.\n        The method will return a promise rejected with the source's error, or with any error that occurs during aborting the destination.\n    - `preventCancel`\n      - : If this is set to `true`, errors in the destination `WritableStream` will no longer cancel the source `ReadableStream`.\n        In this case the method will return a promise rejected with the source's error, or with any error that occurs during canceling the source.\n        In addition, if the destination writable stream starts out closed or closing, the source readable stream will no longer be canceled.\n        In this case the method will return a promise rejected with an error indicating piping to a closed stream failed, or with any error that occurs during canceling the source.\n\n### Return value\n\nA `Promise` that resolves when the piping process has completed.\n\n### Exceptions\n\n- `TypeError`\n  - : The `writableStream` and/or `readableStream` objects are not a writable stream/readable stream, or one or both of the streams are locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/ReadableStream/prototype/tee.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.tee()\n\nThe **`tee()`** method of the\n`ReadableStream` interface [tees](https://streams.spec.whatwg.org/#tee-a-readable-stream) the current readable stream, returning a\ntwo-element array containing the two resulting branches as\nnew `ReadableStream` instances.\n\nThis is useful for allowing two readers to read a stream sequentially or simultaneously,\nperhaps at different speeds.\nFor example, you might do this in a ServiceWorker if you want to fetch\na response from the server and stream it to the browser, but also stream it to the\nServiceWorker cache. Since a response body cannot be consumed more than once, you'd need\ntwo copies to do this.\n\nA teed stream will partially signal backpressure at the rate of the _faster_ consumer\nof the two `ReadableStream` branches,\nand unread data is enqueued internally on the slower consumed `ReadableStream`\nwithout any limit or backpressure.\nThat is, when _both_ branches have an unread element in their internal queue,\nthen the original `ReadableStream`'s controller's internal queue will start to fill up,\nand once its `ReadableStreamDefaultController.desiredSize\", \"desiredSize` ≤ 0\nor byte stream controller `ReadableByteStreamController.desiredSize\", \"desiredSize` ≤ 0,\nthen the controller will stop calling `pull(controller)` on the\nunderlying source passed to `ReadableStream.ReadableStream\", \"new ReadableStream()`.\nIf only one branch is consumed, then the entire body will be enqueued in memory.\nTherefore, you should not use the built-in `tee()` to read very large streams\nin parallel at different speeds.\nInstead, search for an implementation that fully backpressures\nto the speed of the _slower_ consumed branch.\n\nTo cancel the stream you then need to cancel both resulting branches. Teeing a stream\nwill generally lock it for the duration, preventing other readers from locking it.\n\n## Syntax\n\n```js\ntee()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nAn `Array` containing two `ReadableStream` instances.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source stream is not a `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/ReadableStreamBYOBReader/ReadableStreamBYOBReader.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# ReadableStreamBYOBReader()\n\nThe **`ReadableStreamBYOBReader()`** constructor creates and returns a `ReadableStreamBYOBReader` object instance.\n\n> **Note:** You generally wouldn't use this constructor manually;\n> instead, you'd use the `ReadableStream.getReader()` method with the argument `\"byob\"`.\n\n## Syntax\n\n```js\nnew ReadableStreamBYOBReader(stream)\n```\n\n### Parameters\n\n- `stream`\n  - : The `ReadableStream` to be read.\n\n### Return value\n\nAn instance of the `ReadableStreamBYOBReader` object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the supplied `stream` parameter is not a `ReadableStream`, or it is already locked for reading by another reader, or its stream controller is not a `ReadableByteStreamController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/ReadableStreamBYOBReader/prototype/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# cancel()\n\nThe **`cancel()`** method of the `ReadableStreamBYOBReader` interface returns a `Promise` that resolves when the stream is canceled.\nCalling this method signals a loss of interest in the stream by a consumer.\n\n> **Note:** If the reader is active, the `cancel()` method behaves the same as that for the associated stream (`ReadableStream.cancel()`).\n\n## Syntax\n\n```js\ncancel()\ncancel(reason)\n```\n\n### Parameters\n\n- `reason` __optional__\n  - : A human-readable reason for the cancellation. The underlying source may or may not use it.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason` parameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamBYOBReader`, or the stream has no owner.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/ReadableStreamBYOBReader/prototype/closed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# closed\n\nThe **`closed`** read-only property of the `ReadableStreamBYOBReader` interface returns a `Promise` that fulfills when the stream closes, or rejects if the stream throws an error or the reader's lock is released.\n\nThis property enables you to write code that responds to an end to the streaming process.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/ReadableStreamBYOBReader/prototype/read.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# read()\n\nThe **`read()`** method of the `ReadableStreamBYOBReader` interface is used to read data into a view on a user-supplied buffer from an associated readable byte stream.\nA request for data will be satisfied from the stream's internal queues if there is any data present.\nIf the stream queues are empty, the request may be supplied as a zero-copy transfer from the underlying byte source.\n\nThe method takes as an argument a view on a buffer that supplied data is to be read into, and returns a `Promise`.\nThe promise fulfills with an object that has properties `value` and `done` when data comes available, or if the stream is cancelled.\nIf the stream is errored, the promise will be rejected with the relevant error object.\n\nIf a chunk of data is supplied, the `value` property will contain a new view.\nThis will be a view over the same buffer/backing memory (and of the same type) as the original `view` passed to the `read()` method, now populated with the new chunk of data.\nNote that once the promise fulfills, the original `view` passed to the method will be detached and no longer usable.\nThe promise will fulfill with a `value: undefined` if the stream has been cancelled.\nIn this case the backing memory region of `view` is discarded and not returned to the caller (all previously read data in the view's buffer is lost).\n\nThe `done` property indicates whether or not more data is expected.\nThe value is set `true` if the stream is closed or cancelled, and `false` otherwise.\n\n## Syntax\n\n```js\nread(view)\n```\n\n### Parameters\n\n- `view`\n  - : The view that data is to be read into.\n\n### Return value\n\nA `Promise`, which fulfills/rejects with a result depending on the state of the stream.\n\nThe following are possible:\n\n- If a chunk is available and the stream is still active, the promise fulfills with an object of the form:\n\n  ```\n  { value: theChunk, done: false }\n  ```\n\n  `theChunk` is a view containing the new data.\n  This is a view of the same type and over the same backing memory as the `view` passed to the `read()` method.\n  The original `view` will be detached and no longer usable.\n\n- If the stream is closed, the promise fulfills with an object of the form (where `theChunk` has the same properties as above):\n\n  ```\n  { value: theChunk, done: true }\n  ```\n\n- If the stream is cancelled, the promise fulfills with an object of the form:\n\n  ```\n  { value: undefined, done: true }\n  ```\n\n  In this case the backing memory is discarded.\n\n- If the stream throws an error, the promise rejects with the relevant error.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamBYOBReader`, the stream has no owner, the view is not an object or has become detached, the view's length is 0, or `ReadableStreamBYOBReader.releaseLock()` is called (when there's is a pending read request).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/ReadableStreamBYOBReader/prototype/releaseLock.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# releaseLock()\n\nThe **`releaseLock()`** method of the `ReadableStreamBYOBReader` interface releases the reader's lock on the stream.\nAfter the lock is released, the reader is no longer active.\n\nThe reader will appear errored if the associated stream is errored when the lock is released; otherwise, the reader will appear closed.\n\nIf the reader's lock is released while it still has pending read requests then the promises returned by the reader's `ReadableStreamBYOBReader.read()` method are immediately rejected with a `TypeError`.\nUnread chunks remain in the stream's internal queue and can be read later by acquiring a new reader.\n\n## Syntax\n\n```js\nreleaseLock()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamBYOBReader`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/ReadableStreamBYOBRequest/prototype/respond.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# respond()\n\nThe **`respond()`** method of the `ReadableStreamBYOBRequest` interface is used to signal to the associated readable byte stream that the specified number of bytes were written into the `ReadableStreamBYOBRequest.view`.\n\nAfter this method is called, the `view` will be transferred and no longer modifiable.\n\n## Syntax\n\n```js\nrespond(bytesWritten)\n```\n\n### Parameters\n\n- `bytesWritten`\n  - : The number of bytes written into `ReadableStreamBYOBRequest.view`.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : The request does not have an associated `ReadableByteStreamController` or the view buffer is not detached/cannot be transferred into.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/ReadableStreamBYOBRequest/prototype/respondWithNewView.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# respondWithNewView()\n\nThe **`respondWithNewView()`** method of the `ReadableStreamBYOBRequest` interface specifies a new view that the consumer of the associated readable byte stream should write to instead of `ReadableStreamBYOBRequest.view`.\n\nThe new view must be a `TypedArray` or a `DataView` that provides a view onto the same backing memory region as `ReadableStreamBYOBRequest.view`.\nAfter this method is called, the view that was passed into the method will be transferred and no longer modifiable.\n\nThe method is intended for use cases where an underlying byte source needs to transfer a `byobRequest.view` internally before finishing its response.\nFor example, the source may transfer the BYOB view to a separate worker thread, and wait for the worker to transfer it back once it has been filled.\n\n## Syntax\n\n```js\nrespondWithNewView(view)\n```\n\n### Parameters\n\n- `view`\n\n  - : A `TypedArray` or a `DataView` that the consumer of the associated readable byte stream should write to instead of `ReadableStreamBYOBRequest.view`.\n\n    This must be a view onto the same backing memory region as `ReadableStreamBYOBRequest.view` and occupy the same or less memory.\n    Specifically, it must be either the view's buffer or a transferred version, must have the same `byteOffset`, and a `byteLength` (number of bytes written) that is less than or equal to that of the view.\n\n### Return value\n\n`undefined`\n\n### Exceptions\n\n- `TypeError`\n\n  - : Thrown if the source object is not a `ReadableStreamBYOBRequest`, or there is no associated controller, or the associated internal array buffer is non-existent or detached.\n    It may also be thrown if the `view` is zero-length when there is an active reader, or non-zero when called on a closed stream.\n\n- `RangeError`\n  - : Thrown if the new `view` does not match the backing memory region of `ReadableStreamBYOBRequest.view`.\n    For example, it is not the same buffer (or a transferred version), has a different `byteOffset`, or is larger than the memory available to the backing view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/ReadableStreamBYOBRequest/prototype/view.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# view\n\nThe **`view`** getter property of the `ReadableStreamBYOBRequest` interface returns the current view.\n\n## Value\n\nA typed array representing the destination region to which the controller can write generated data.\n\n`null` if the request has already been responded to, by calling `ReadableStreamBYOBRequest.respond()` or `ReadableStreamBYOBRequest.respondWithNewView()`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/ReadableStreamDefaultController/prototype/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.close()\n\nThe **`close()`** method of the\n`ReadableStreamDefaultController` interface closes the associated stream.\n\nReaders will still be able to read any previously-enqueued chunks from the stream,\nbut once those are read, the stream will become closed. If you want to completely get\nrid of the stream and discard any enqueued chunks, you'd use\n`ReadableStream.cancel()` or\n`ReadableStreamDefaultReader.cancel()`.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/ReadableStreamDefaultController/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.desiredSize\n\nThe **`desiredSize`** read-only property of the\n`ReadableStreamDefaultController` interface returns the desired size\nrequired to fill the stream's internal queue.\n\n## Value\n\nAn integer. Note that this can be negative if the queue is over-full.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/ReadableStreamDefaultController/prototype/enqueue.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.enqueue()\n\nThe **`enqueue()`** method of the\n`ReadableStreamDefaultController` interface enqueues a given chunk in the\nassociated stream.\n\n## Syntax\n\n```js\nenqueue(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : The chunk to enqueue.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/ReadableStreamDefaultController/prototype/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.error()\n\nThe **`error()`** method of the\n`ReadableStreamDefaultController` interface causes any future interactions\nwith the associated stream to error.\n\n> **Note:** The `error()` method can be called\n> more than once, and can be called when the stream is not readable.\n\n## Syntax\n\n```js\nerror(e)\n```\n\n### Parameters\n\n- `e`\n  - : The error you want future interactions to fail with.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/ReadableStreamDefaultReader/ReadableStreamDefaultReader.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader()\n\nThe **`ReadableStreamDefaultReader()`**\nconstructor creates and returns a `ReadableStreamDefaultReader` object\ninstance.\n\n## Syntax\n\n```js\nnew ReadableStreamDefaultReader(stream)\n```\n\n### Parameters\n\n- `stream`\n  - : The `ReadableStream` to be read.\n\n### Return value\n\nAn instance of the `ReadableStreamDefaultReader` object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the supplied `stream` parameter is not a `ReadableStream`,\n    or it is already locked for reading by another reader.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/ReadableStreamDefaultReader/prototype/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n~ ReadableStreamDefaultReader.cancel()\n\nThe **`cancel()`** method of the\n`ReadableStreamDefaultReader` interface returns a `Promise` that resolves when the stream is canceled. Calling this method signals a loss of interest in the stream by a consumer.\n\nCancel is used when you've completely finished with the stream and don't need any more\ndata from it, even if there are chunks enqueued waiting to be read. That data is lost\nafter cancel is called, and the stream is not readable any more. To read those chunks\nstill and not completely get rid of the stream, you'd use\n`ReadableStreamDefaultController.close()`.\n\n> **Note:** If the reader is active, the\n> `cancel()` method behaves the same as that for the associated stream\n> (`ReadableStream.cancel()`).\n\n## Syntax\n\n```js\ncancel()\ncancel(reason)\n```\n\n### Parameters\n\n- `reason` _**optional**_\n  - : A human-readable reason for the cancellation. This value may or may not be used.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason`\nparameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamDefaultReader`, or the stream\n    has no owner.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/ReadableStreamDefaultReader/prototype/closed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader.closed\n\nThe **`closed`** read-only property of the\n`ReadableStreamDefaultReader` interface returns a\n`Promise` that fulfills when the stream closes, or rejects if the\nstream throws an error or the reader's lock is released. This property enables you\nto write code that responds to an end to the streaming process.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/ReadableStreamDefaultReader/prototype/read.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader.read()\n\nThe **`read()`** method of the `ReadableStreamDefaultReader` interface returns a `Promise` providing access to the next chunk in the stream's internal queue.\n\n## Syntax\n\n```js\nread()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise`, which fulfills/rejects with a result depending on the state of the stream.\nThe different possibilities are as follows:\n\n- If a chunk is available, the promise will be fulfilled with an object of the form `{ value: theChunk, done: false }`.\n- If the stream becomes closed, the promise will be fulfilled with an object of the form `{ value: undefined, done: true }`.\n- If the stream becomes errored, the promise will be rejected with the relevant error.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamDefaultReader`, the stream has no owner, or `ReadableStreamDefaultReader.releaseLock()` is called (when there's a pending read request).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/ReadableStreamDefaultReader/prototype/releaseLock.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader.releaseLock()\n\nThe **`releaseLock()`** method of the `ReadableStreamDefaultReader` interface releases the reader's lock on the stream.\n\nIf the associated stream is errored when the lock is released, the reader will appear errored in that same way subsequently; otherwise, the reader will appear closed.\n\nIf the reader's lock is released while it still has pending read requests then the promises returned by the reader's `ReadableStreamDefaultReader.read()` method are immediately rejected with a `TypeError`.\nUnread chunks remain in the stream's internal queue and can be read later by acquiring a new reader.\n\n## Syntax\n\n```js\nreleaseLock()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultReader`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/ReferenceError/ReferenceError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReferenceError\n\nThe **`ReferenceError`** object represents an error when a\nnon-existent variable is referenced.\n\n## Syntax\n\n```js\nnew ReferenceError()\nnew ReferenceError(message)\nnew ReferenceError(message, options)\nnew ReferenceError(message, fileName)\nnew ReferenceError(message, fileName, lineNumber)\n\nReferenceError()\nReferenceError(message)\nReferenceError(message, options)\nReferenceError(message, fileName)\nReferenceError(message, fileName, lineNumber)\n```\n\n> **Note:** `ReferenceError()` can be called with or without `new`. Both create a new `ReferenceError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Reflect/apply.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.apply()\n\nThe static **`Reflect.apply()`** method calls a target function\nwith arguments as specified.\n\n## Syntax\n\n```js\nReflect.apply(target, thisArgument, argumentsList)\n```\n\n### Parameters\n\n- `target`\n  - : The target function to call.\n- `thisArgument`\n  - : The value of `this` provided for the call to\n    `target`.\n- `argumentsList`\n  - : An array-like object specifying the arguments with which\n    `target` should be called.\n\n### Return value\n\nThe result of calling the given `target` function with the\nspecified `this` value and arguments.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if the `target` is not callable.\n\n## Description\n\nIn ES5, you typically use the [`Function.prototype.apply()`](../../globals/Function/prototype/apply.mdx) method to call a\nfunction with a given `this` value and `arguments` provided as an array\n(or an [array-like object](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects)).\n\n```js\nFunction.prototype.apply.call(Math.floor, undefined, [1.75]);\n```\n\nWith `Reflect.apply()` this becomes less verbose and easier to understand.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Reflect/construct.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.construct()\n\nThe static **`Reflect.construct()`** method acts like the\n`new` operator, but as a function. It is equivalent to\ncalling `new target(...args)`. It gives also the added option to specify a\ndifferent prototype.\n\n## Syntax\n\n```js\nReflect.construct(target, argumentsList)\nReflect.construct(target, argumentsList, newTarget)\n```\n\n### Parameters\n\n- `target`\n  - : The target function to call.\n- `argumentsList`\n  - : An array-like object specifying the arguments with which\n    `target` should be called.\n- `newTarget` _**optional**_\n  - : The constructor whose prototype should be used. See also the [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target)\n    operator. If `newTarget` is not present, its value defaults\n    to `target`.\n\n### Return value\n\nA new instance of `target` (or `newTarget`,\nif present), initialized by `target` as a constructor with the\ngiven `argumentsList`.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` or\n`newTarget` are not constructors.\n\n## Description\n\n`Reflect.construct()` allows you to invoke a constructor with a variable\nnumber of arguments. (This would also be possible by using the\n[spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) combined with the\n[`new` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new).)\n\n```js\nconst obj = new Foo(...args);\nconst obj = Reflect.construct(Foo, args);\n```\n\n### Reflect.construct() vs Object.create()\n\nPrior to the introduction of `Reflect`, objects could be constructed using\nan arbitrary combination of constructor and prototype by using\n[`Object.create()`](../../globals/Object/create.mdx).\n\n```js\nfunction OneClass() {\n  this.name = \"one\";\n}\n\nfunction OtherClass() {\n  this.name = \"other\";\n}\n\n// Calling this:\nconst obj1 = Reflect.construct(OneClass, args, OtherClass);\n\n// ...has the same result as this:\nconst obj2 = Object.create(OtherClass.prototype);\nOneClass.apply(obj2, args);\n\nconsole.log(obj1.name); // 'one'\nconsole.log(obj2.name); // 'one'\n\nconsole.log(obj1 instanceof OneClass); // false\nconsole.log(obj2 instanceof OneClass); // false\n\nconsole.log(obj1 instanceof OtherClass); // true\nconsole.log(obj2 instanceof OtherClass); // true\n\n// Another example to demonstrate below:\n\nfunction func1(a, b, c, d) {\n  console.log(arguments[3]);\n}\n\nfunction func2(d, e, f, g) {\n  console.log(arguments[3]);\n}\n\nconst obj1 = Reflect.construct(func1, [\"I\", \"Love\", \"my\", \"country\"]);\n```\n\nHowever, while the end result is the same, there is one important difference in the\nprocess. When using `Object.create()` and\n[`Function.prototype.apply()`](../../globals/Function/prototype/apply.mdx), the `new.target` operator will\npoint to `undefined` within the function used as the constructor, since the\n`new` keyword is not being used to create the object.\n\nWhen invoking `Reflect.construct()`, on the other hand, the\n`new.target` operator will point to the `newTarget`\nparameter if supplied, or `target` if not.\n\n```js\nfunction OneClass() {\n  console.log(\"OneClass\");\n  console.log(new.target);\n}\nfunction OtherClass() {\n  console.log(\"OtherClass\");\n  console.log(new.target);\n}\n\nconst obj1 = Reflect.construct(OneClass, args);\n// Logs:\n// OneClass\n// function OneClass { ... }\n\nconst obj2 = Reflect.construct(OneClass, args, OtherClass);\n// Logs:\n// OneClass\n// function OtherClass { ... }\n\nconst obj3 = Object.create(OtherClass.prototype);\nOneClass.apply(obj3, args);\n// Logs:\n// OneClass\n// undefined\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Reflect/defineProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.defineProperty()\n\nThe static **`Reflect.defineProperty()`** method is like\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx) but returns a `Boolean`.\n\n## Syntax\n\n```js\nReflect.defineProperty(target, propertyKey, attributes)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to define the property.\n- `propertyKey`\n  - : The name of the property to be defined or modified.\n- `attributes`\n  - : The attributes for the property being defined or modified.\n\n### Return value\n\nA `Boolean` indicating whether or not the property was successfully\ndefined.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.defineProperty` method allows precise addition to or\nmodification of a property on an object. For more details, see the\n[`Object.defineProperty`](../../globals/Object/defineProperty.mdx) which is similar.\n\n> **Note:** `Object.defineProperty` returns the\n> object or throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the property has not been successfully\n> defined. `Reflect.defineProperty`, however, returns a `Boolean`\n> indicating whether or not the property was successfully defined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Reflect/deleteProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.deleteProperty()\n\nThe static\n**`Reflect.deleteProperty()`**\nmethod allows to delete properties. It is like the\n[`delete` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete)\nas a function.\n\n## Syntax\n\n```js\nReflect.deleteProperty(target, propertyKey)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to delete the property.\n- `propertyKey`\n  - : The name of the property to be deleted.\n\n### Return value\n\nA `Boolean` indicating whether or not the property was successfully\ndeleted.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.deleteProperty` method allows you to delete a property on an\nobject. It returns a `Boolean` indicating whether or not the property was\nsuccessfully deleted. It is almost identical to the non-strict\n[`delete` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Reflect/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.get()\n\nThe static **`Reflect.get()`** method works like getting a\nproperty from an object (`target[propertyKey]`) as a function.\n\n## Syntax\n\n```js\nReflect.get(target, propertyKey)\nReflect.get(target, propertyKey, receiver)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to get the property.\n- `propertyKey`\n  - : The name of the property to get.\n- `receiver` _**optional**_\n  - : The value of `this` provided for the call to\n    `target` if a getter is encountered. When used with\n    `Proxy`, it can be an object that inherits from\n    `target`.\n\n### Return value\n\nThe value of the property.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.get` method allows you to get a property on an object. It is like the\n[property accessor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Property_Accessors) syntax as a function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Reflect/getOwnPropertyDescriptor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.getOwnPropertyDescriptor()\n\nThe static\n**`Reflect.getOwnPropertyDescriptor()`** method is similar to\n[`Object.getOwnPropertyDescriptor()`](../../globals/Object/getOwnPropertyDescriptor.mdx). It returns a property descriptor of\nthe given property if it exists on the object, `undefined`\notherwise.\n\n\n\n## Syntax\n\n```js\nReflect.getOwnPropertyDescriptor(target, propertyKey)\n```\n\n### Parameters\n\n- `target`\n  - : The target object in which to look for the property.\n- `propertyKey`\n  - : The name of the property to get an own property descriptor for.\n\n### Return value\n\nA property descriptor object if the property exists in `target`\nobject; otherwise, [`undefined`](../../globals/undefined.mdx).\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.getOwnPropertyDescriptor` method returns a property descriptor\nof the given property if it exists in the `target` object,\n[`undefined`](../../globals/undefined.mdx) otherwise. The only difference to\n[`Object.getOwnPropertyDescriptor()`](../../globals/Object/getOwnPropertyDescriptor.mdx) is how non-object targets are handled.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Reflect/getPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.getPrototypeOf()\n\nThe static **`Reflect.getPrototypeOf()`** method is almost the\nsame method as [`Object.getPrototypeOf()`](../../globals/Object/getPrototypeOf.mdx). It returns the prototype (i.e. the\nvalue of the internal `[[Prototype]]` property) of the specified object.\n\n\n\n## Syntax\n\n```js\nReflect.getPrototypeOf(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object of which to get the prototype.\n\n### Return value\n\nThe prototype of the given object. If there are no inherited properties,\n[`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) is returned.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.getPrototypeOf` method returns the prototype (i.e. the value of\nthe internal `[[Prototype]]` property) of the specified object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Reflect/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.has()\n\nThe static **`Reflect.has()`** method works like the [`in` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/in)\nas a function.\n\n## Syntax\n\n```js\nReflect.has(target, propertyKey)\n```\n\n### Parameters\n\n- `target`\n  - : The target object in which to look for the property.\n- `propertyKey`\n  - : The name of the property to check.\n\n### Return value\n\nA `Boolean` indicating whether or not the `target`\nhas the property.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.has` method allows you to check if a property is in an object.\nIt works like the [`in` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/in)\nas a function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Reflect/isExtensible.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.isExtensible()\n\nThe static **`Reflect.isExtensible()`** method determines if an object is extensible (whether it can have new properties added to it). It is similar to [`Object.isExtensible()`](../../globals/Object/isExtensible.mdx), but with [some differences](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/isExtensible#difference_with_object.isextensible).\n\n## Syntax\n\n```js\nReflect.isExtensible(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object which to check if it is extensible.\n\n### Return value\n\nA `Boolean` indicating whether or not the target is extensible.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Reflect/ownKeys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.ownKeys()\n\nThe static **`Reflect.ownKeys()`** method returns an array of\nthe `target` object's own property keys.\n\n## Syntax\n\n```js\nReflect.ownKeys(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object from which to get the own keys.\n\n### Return value\n\nAn `Array` of the `target` object's own property\nkeys.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.ownKeys` method returns an array of the\n`target` object's own property keys. Its return value is\nequivalent to `Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target))`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Reflect/preventExtensions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.preventExtensions()\n\nThe static **`Reflect.preventExtensions()`** method prevents new properties from ever being added to an object (i.e., prevents future extensions to the object). It is similar to [`Object.preventExtensions()`](../../globals/Object/preventExtensions.mdx), but with [some differences](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/preventExtensions#difference_with_object.preventextensions).\n\n## Syntax\n\n```js\nReflect.preventExtensions(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to prevent extensions.\n\n### Return value\n\nA `Boolean` indicating whether or not the target was successfully set to prevent extensions.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Reflect/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.set()\n\nThe static **`Reflect.set()`** method works like setting a\nproperty on an object.\n\n## Syntax\n\n```js\nReflect.set(target, propertyKey, value)\nReflect.set(target, propertyKey, value, receiver)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to set the property.\n- `propertyKey`\n  - : The name of the property to set.\n- `value`\n  - : The value to set.\n- `receiver` _**optional**_\n  - : The value of `this` provided for the call to the setter for `propertyKey` on `target`. If provided and `target` does not have a setter for `propertyKey`, the property will be set on `receiver` instead.\n\n### Return value\n\nA `Boolean` indicating whether or not setting the property was successful.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.set` method allows you to set a property on an object. It does\nproperty assignment and is like the\n[property accessor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Property_Accessors) syntax as a function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Reflect/setPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.setPrototypeOf()\n\nThe static\n**`Reflect.setPrototypeOf()`** method is the same method as\n[`Object.setPrototypeOf()`](../../globals/Object/setPrototypeOf.mdx), except for its return type. It sets the\nprototype (i.e., the internal `[[Prototype]]` property) of a specified\nobject to another object or to [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null), and returns `true` if\nthe operation was successful, or `false` otherwise.\n\n## Syntax\n\n```js\nReflect.setPrototypeOf(target, prototype)\n```\n\n### Parameters\n\n- `target`\n  - : The target object of which to set the prototype.\n- `prototype`\n  - : The object's new prototype (an object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null)).\n\n### Return value\n\nA `Boolean` indicating whether or not the prototype was successfully set.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object` or if `prototype` is neither an object nor\n[`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null).\n\n## Description\n\nThe `Reflect.setPrototypeOf` method changes the prototype (i.e. the value of\nthe internal `[[Prototype]]` property) of the specified object.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Request/Request.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request()\n\nThe **`Request()`** constructor creates a new\n`Request` object.\n\n## Syntax\n\n```js\nnew Request(input)\nnew Request(input, options)\n```\n\n### Parameters\n\n- `input`\n\n  - : Defines the resource that you wish to fetch. This can either be:\n\n    - A string containing the direct URL of the resource you want to\n      fetch.\n    - A `Request` object, effectively creating a copy.\n\n- `options` _**optional**_\n\n  - : An object containing any custom settings that you want to apply to the\n    request. The possible options are:\n\n    - `method`\n      - : The request method, e.g., `GET`, `POST`. The default is `GET`.\n    - `headers`\n      - : Any headers you want to add to your request, contained\n        within a `Headers` object or an object literal with `String` values.\n    - `body`\n      - : Any body that you want to add to your request: this can be an `ArrayBuffer`, a `TypedArray`, a `DataView`, a `URLSearchParams`, string object or literal, a `ReadableStream` object, a [`Blob`](../../globals/Blob/Blob.mdx) object, or a [`FormData`](../../globals/FormData/FormData.mdx) object.\n    - `backend` _**Fastly-specific**_\n    - `cacheOverride` _**Fastly-specific**_, see [`CacheOverride`](../../fastly:cache-override/CacheOverride/CacheOverride.mdx).\n    - `cacheKey` _**Fastly-specific**_\n    - `manualFramingHeaders`_: boolean_ _**optional**_ _**Fastly-specific**_\n      - : The default value is `false`, which means that the framing headers are automatically created based on the message body.\n        In \"automatic\" mode, a `Content-Length` is used when the size of the body can be determined before it is sent.\n        Requests sent in streaming mode, where headers are sent immediately but the content of the body is streamed later, will receive a `Transfer-Encoding: chunked` to accommodate the dynamic generation of the body.\n        In \"manual\" mode, any `Content-Length` or `Transfer-Encoding` headers will be honored.\n        You must ensure that those headers have correct values permitted by the [HTTP/1.1 specification](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).\n        If the provided headers are not permitted by the specification, the headers will revert to \"automatic\" mode and a diagnostic message will be logged about what was wrong.\n        If a `Content-Length` is permitted by the specification, but the value does not match the size of the actual body, the body will either be truncated (if it is too long), or the connection will be hung up early (if it is too short).\n    - `fastly` _**Fastly-specific**_\n      - `decompressGzip`_: boolean_ _**optional**_\n        - Whether to automatically gzip decompress the Response or not."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Request/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the `Request` interface\nreads the request body and returns it as a promise that resolves with an `ArrayBuffer`.\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an `ArrayBuffer`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Request/prototype/blob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.blob()\n\nThe **`blob()`** method of the `Request` interface reads the request body and returns it as a promise that resolves with a `Blob`.\n\n## Syntax\n\n```js\nblob()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a [`Blob`](../../../globals/Blob/Blob.mdx).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the request body has already been used or if the request's method is `GET` or `HEAD`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Request/prototype/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.body\n\nThe read-only **`body`** property of the `Request`\ninterface contains a `ReadableStream` with the body contents\nthat have been added to the request. Note that a request using the\n`GET` or `HEAD` method cannot have a body\nand `null` is returned in these cases.\n\n## Value\n\nA `ReadableStream` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Request/prototype/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.bodyUsed\n\nThe read-only **`bodyUsed`** property of the\n`Request` interface is a boolean value that indicates\nwhether the request body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Request/prototype/clone.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.clone()\n\nThe **`clone()`** method of the `Request` interface creates a copy of the current `Request` object.\n\nLike the underlying `ReadableStream.tee`` api, the `body` of a cloned `Response`\nwill signal backpressure at the rate of the _faster_ consumer of the two bodies,\nand unread data is enqueued internally on the slower consumed `body`\nwithout any limit or backpressure.\nBeware when you construct a `Request` from a stream and then `clone` it.\n\n`clone()` throws a `TypeError` if the request body has already been used. In fact, the main reason `clone()` exists is to allow multiple uses of body objects (when they are one-use only.)\n\nIf you intend to modify the request, you may prefer the `Request` constructor.\n\n## Syntax\n\n```js\nclone()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Request` object, which is an exact copy of the `Request` that `clone()` was called on.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Request/prototype/formData.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.formData()\n\nThe **`formData()`** method of the `Request` interface reads the request body and returns it as a promise that resolves with a `FormData` object.\n\n## Syntax\n\n```js\nformData()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a [`FormData`](../../../globals/FormData/FormData.mdx) object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the request body has already been used or if the request's method is `GET` or `HEAD`.\n- `SyntaxError`\n  - : Thrown if the request's content type is not `multipart/form-data` or `application/x-www-form-urlencoded`, or if the content cannot be parsed as form data.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Request/prototype/headers.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.headers\n\nThe **`headers`** read-only property of the\n`Request` interface contains the `Headers` object associated\nwith the request.\n\n## Value\n\nA `Headers` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Request/prototype/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.json()\n\nThe **`json()`** method of the `Request` interface\nreads the request body and returns it as a promise that resolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a JavaScript object. This object could be\nanything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Request/prototype/method.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.method\n\nThe **`method`** read-only property of the\n`Request` interface contains the request's method (`GET`, `POST`, etc.)\n\n## Value\n\nA `String` indicating the method of the request.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Request/prototype/setManualFramingHeaders.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.setManualFramingHeaders()\n\nThe **`setManualFramingHeaders()`** method of the `Request` interface controls how the framing headers should be determined.\n\nBy default the framing headers are set to \"automatic\" mode, which means they are created based on the body of the associated Request instance.\nIn \"automatic\" mode, a `Content-Length` is used when the size of the body can be determined before it is sent.\nRequests sent in streaming mode, where headers are sent immediately but the content of the body is streamed later, will receive a `Transfer-Encoding: chunked` to accommodate the dynamic generation of the body.\nIn \"manual\" mode, any `Content-Length` or `Transfer-Encoding` headers will be honored.\nYou must ensure that those headers have correct values permitted by the [HTTP/1.1 specification](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).\nIf the provided headers are not permitted by the specification, the headers will revert to \"automatic\" mode and a diagnostic message will be logged about what was wrong.\nIf a `Content-Length` is permitted by the specification, but the value does not match the size of the actual body, the body will either be truncated (if it is too long), or the connection will be hung up early (if it is too short).\n\n## Syntax\n\n## Syntax\n\n```js\nsetManualFramingHeaders(manual)\n```\n\n### Parameters\n\n- `manual` _: boolean_\n  - : Whether or not to use \"manual\" mode for the framing headers.\n\n### Return value\n\n`undefined`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Request/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.text()\n\nThe **`text()`** method of the `Request` interface\nreads the request body and returns it as a promise that resolves with a `String`.\nThe response is _always_ decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Promise that resolves with a `String`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Request/prototype/url.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.url\n\nThe **`url`** read-only property of the `Request` interface contains the URL of the request.\n\n## Value\n\nA string indicating the URL of the request.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Response/Response.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response()\n\nThe **`Response()`** constructor creates a new `Response` object.\n\n## Syntax\n\n```js\nnew Response()\nnew Response(body)\nnew Response(body, options)\n```\n\n### Parameters\n\n- `body` _**optional**_\n\n  - : An object defining a body for the response. This can be `null` (which is\n    the default value), or one of:\n\n    - [`ArrayBuffer`](../../globals/ArrayBuffer/ArrayBuffer.mdx)\n    - `TypedArray`\n    - [`DataView`](../../globals/DataView/DataView.mdx)\n    - [`ReadableStream`](../../globals/ReadableStream/ReadableStream.mdx)\n    - [`URLSearchParams`](../../globals/URLSearchParams/URLSearchParams.mdx)\n    - [`String`](../../globals/String/String.mdx)\n    - string literal\n    - [`Blob`](../../globals/Blob/Blob.mdx)\n    - [`FormData`](../../globals/FormData/FormData.mdx)\n\n- `options` _**optional**_\n\n  - : An options object containing any custom settings that you want to apply to the\n    response, or an empty object (which is the default value). The possible options are:\n\n    - `status`\n      - : The status code for the response, e.g., `200`.\n    - `statusText`\n      - : The status message associated with the status code,\n        e.g., `OK`.\n    - `headers`\n      - : Any headers you want to add to your response, contained\n        within a [`Headers`](../../globals/Headers/Headers.mdx) object or object literal of\n        [`String`](../../globals/String/String.mdx) key/value pairs.\n    - `manualFramingHeaders`_: boolean_ _**optional**_ _**Fastly-specific**_\n      - : The default value is `false`, which means that the framing headers are automatically created based on the message body.\n        In \"automatic\" mode, a `Content-Length` is used when the size of the body can be determined before it is sent.\n        Responses sent in streaming mode, where headers are sent immediately but the content of the body is streamed later, will receive a `Transfer-Encoding: chunked` to accommodate the dynamic generation of the body.\n        In \"manual\" mode, any `Content-Length` or `Transfer-Encoding` headers will be honored.\n        You must ensure that those headers have correct values permitted by the [HTTP/1.1 specification](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).\n        If the provided headers are not permitted by the specification, the headers will revert to \"automatic\" mode and a diagnostic message will be logged about what was wrong.\n        If a `Content-Length` is permitted by the specification, but the value does not match the size of the actual body, the body will either be truncated (if it is too long), or the connection will be hung up early (if it is too short).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Response/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface\ntakes a [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion. It returns a promise\nthat resolves with an [`ArrayBuffer`](../../../globals/ArrayBuffer/ArrayBuffer.mdx).\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an [`ArrayBuffer`](../../../globals/ArrayBuffer/ArrayBuffer.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Response/prototype/blob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.blob()\n\nThe **`blob()`** method of the [`Response`](../Response.mdx) interface takes a [`Response`](../Response.mdx) stream and reads it to completion. It returns a promise that resolves with a `Blob`.\n\n## Syntax\n\n```js\nblob()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a [`Blob`](../../../globals/Blob/Blob.mdx).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the response body has already been consumed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Response/prototype/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.body\n\nThe **`body`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface is a [`ReadableStream`](../../../globals/ReadableStream/ReadableStream.mdx) of the body contents.\n\n## Value\n\nA [`ReadableStream`](../../../globals/ReadableStream/ReadableStream.mdx), or else `null` for any `Response` object [constructed](../../../globals/Response/Response.mdx) with a null `body` property, or for any actual HTTP response that has no body.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Response/prototype/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.bodyUsed\n\nThe **`bodyUsed`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface is a boolean value that indicates whether the body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Response/prototype/formData.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.formData()\n\nThe **`formData()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface takes a [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion. It returns a promise that resolves with a `FormData` object.\n\n## Syntax\n\n```js\nformData()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a [`FormData`](../../../globals/FormData/FormData.mdx) object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the response body has already been consumed.\n- `SyntaxError`\n  - : Thrown if the response's content type is not `multipart/form-data` or `application/x-www-form-urlencoded`, or if the content cannot be parsed as form data.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Response/prototype/headers.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.headers\n\nThe **`headers`** read-only property of the\n[`Response`](../../../globals/Response/Response.mdx) interface contains the [`Headers`](../../../globals/Headers/Headers.mdx) object associated\nwith the response.\n\n## Value\n\nA [`Headers`](../../Headers/Headers.mdx) object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Response/prototype/ip.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.ip\n\nThe **`ip`** getter of the `Response` interface returns the IP address associated with the request, as either an IPv6 or IPv4 string.\n\nIn the case where no IP address is available (say the response is cached, or was manually created), `undefined` will be returned.\n\nTo ensure an origin request with an IP, pass a [`CacheOverride`](../../../fastly:cache-override/CacheOverride/CacheOverride.mdx) value.\n\n## Value\n\n`undefined` or `string`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Response/prototype/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.json()\n\nThe **`json()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface takes\na [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion. It returns a promise which\nresolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA [`Promise`](../../../globals/Promise/Promise.mdx) that resolves to a JavaScript object. This object could be\nanything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Response/prototype/ok.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.ok\n\nThe **`ok`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains a Boolean stating whether the response was successful (status in the range 200-299) or not.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Response/prototype/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.port\n\nThe **`port`** getter of the `Response` interface returns the port associated with the request, as a number.\n\nIn the case where no port is available (say the response is cached, or was manually created), `undefined` will be returned.\n\nTo ensure an origin request with a port, pass a [`CacheOverride`](../../../fastly:cache-override/CacheOverride/CacheOverride.mdx) value.\n\n## Value\n\n`undefined` or `number`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Response/prototype/setManualFramingHeaders.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.setManualFramingHeaders()\n\nThe **`setManualFramingHeaders()`** method of the `Response` interface controls how the framing headers should be determined.\n\nBy default the framing headers are set to \"automatic\" mode, which means they are created based on the body of the associated Response instance.\nIn \"automatic\" mode, a `Content-Length` is used when the size of the body can be determined before it is sent.\nResponses sent in streaming mode, where headers are sent immediately but the content of the body is streamed later, will receive a `Transfer-Encoding: chunked` to accommodate the dynamic generation of the body.\nIn \"manual\" mode, any `Content-Length` or `Transfer-Encoding` headers will be honored.\nYou must ensure that those headers have correct values permitted by the [HTTP/1.1 specification](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).\nIf the provided headers are not permitted by the specification, the headers will revert to \"automatic\" mode and a diagnostic message will be logged about what was wrong.\nIf a `Content-Length` is permitted by the specification, but the value does not match the size of the actual body, the body will either be truncated (if it is too long), or the connection will be hung up early (if it is too short).\n\n## Syntax\n\n```js\nsetManualFramingHeaders(manual)\n```\n\n### Parameters\n\n- `manual` _: boolean_\n  - : Whether or not to use \"manual\" mode for the framing headers.\n\n### Return value\n\n`undefined`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Response/prototype/status.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.status\n\nThe **`status`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains the HTTP status code of the response.\n\nFor example, `200` for success, `404` if the resource could not be found.\n\n## Value\n\nAn unsigned short number.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Response/prototype/statusText.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.statusText\n\nThe **`statusText`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains the status message corresponding to the HTTP status code in [`status`](../../../globals/Response/prototype/status.mdx).\n\nFor example, this would be `OK` for a status code `200`, `Continue` for `100`, `Not Found` for `404`.\n\n## Value\n\nA [`String`](../../../globals/String/String.mdx) containing the HTTP status message associated with the response.\nThe default value is \"\".\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Response/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.text()\n\nThe **`text()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface takes a [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion.\nIt returns a promise that resolves with a [`String`](../../../globals/String/String.mdx).\nThe response is _always_ decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Promise that resolves with a [`String`](../../../globals/String/String.mdx).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Response/prototype/url.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.url\n\nThe **`url`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains the URL of the response.\nThe value of the `url` property will be the final URL obtained after any redirects.\n\n## Value\n\nA string.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Response/redirect.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Response.redirect()\n\nThe **`redirect()`** static method of the `Response` interface returns a `Response` resulting in a redirect to the specified URL.\n\n## Syntax\n\n```js\nResponse.redirect(url)\nResponse.redirect(url, status)\n```\n\n### Parameters\n\n- `url`\n  - : The URL that the new response is to originate from.\n- `status` __optional__\n  - : An optional status code for the response (e.g., `302`.)\n\n### Return value\n\nA `Response` object.\n\n### Exceptions\n\n- `RangeError`\n  - : The specified status is not a redirect status.\n- `TypeError`\n  - : The specified URL is invalid.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/RsaHashedImportParams/RsaHashedImportParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RsaHashedImportParams\n\nThe **`RsaHashedImportParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.importKey()`, when importing any RSA-based key pair.\n\n## Instance properties\n\n- `name`\n  - : A string. This should be set to `RSASSA-PKCS1-v1_5`.\n\n- `hash`\n  - : A string representing the name of the digest function to use. This can be one of `SHA-256`, `SHA-384`, or `SHA-512`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Set/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get Set\\[Symbol.species]\n\nThe **`Set[Symbol.species]`** accessor property is an unused accessor property specifying how to copy `Set` objects.\n\n## Syntax\n\n```js\nSet[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct copied `Set` instances.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `Set` objects. Subclass constructors may override it to change the constructor assignment.\n\n> **Note:** This property is currently unused by all `Set` methods.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Set/Set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set()\n\nThe **`Set` constructor** lets you\ncreate `Set` objects that store unique values of any type, whether [primitive values](https://developer.mozilla.org/docs/Glossary/Primitive) or object\nreferences.\n\n## Syntax\n\n```js\nnew Set()\nnew Set(iterable)\n```\n\n> **Note:** `Set()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable` _**optional**_\n\n  - : If an [iterable object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) is passed, all of its elements will be added to the new\n    `Set`.\n\n    If you don't specify this parameter, or its value is `null`, the new\n    `Set` is empty.\n\n### Return value\n\nA new `Set` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Set/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype\\[Symbol.iterator]()\n\nThe **`[Symbol.iterator`** method of a `Set` object implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows sets to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the values of the set.\n\nThe initial value of this property is the same function object as the initial value of the [`Set.prototype.values`](../../../globals/Set/prototype/values.mdx) property.\n\n## Syntax\n\n```js\nset[Symbol.iterator]()\n```\n\n### Return value\n\nThe same return value as [`Set.prototype.values()`](../../../globals/Set/prototype/values.mdx): a new iterable iterator object that yields the values of the set.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Set/prototype/add.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.add()\n\nThe **`add()`** method inserts a new element with a specified value in to a `Set` object, if there isn't an element with the same value already in the `Set`.\n\n## Syntax\n\n```js\nadd(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value of the element to add to the `Set` object.\n\n### Return value\n\nThe `Set` object with added value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Set/prototype/clear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.clear()\n\nThe **`clear()`** method removes all elements from a\n`Set` object.\n\n## Syntax\n\n```js\nclear()\n```\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Set/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.delete()\n\nThe **`delete()`** method removes a specified value from a\n`Set` object, if it is in the set.\n\n## Syntax\n\n```js\ndelete(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to remove from `Set`.\n\n### Return value\n\nReturns `true` if `value` was already in\n`Set`; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Set/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.entries()\n\nThe **`entries()`** method returns a new [Iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators) object\nthat contains **an array of `[value, value]`** for each element\nin the `Set` object, in insertion order. For `Set` objects there\nis no `key` like in `Map` objects. However, to keep the API\nsimilar to the `Map` object, each _entry_ has the same value for its\n_key_ and _value_ here, so that an array `[value, value]` is\nreturned.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nA new iterator object that contains an array of `[value, value]` for each\nelement in the given `Set`, in insertion order.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Set/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.forEach()\n\nThe **`forEach()`** method executes a provided function once\nfor each value in the `Set` object, in insertion order.\n\n## Syntax\n\n```js\n// Arrow function\nforEach(() => { /* ... */ } )\nforEach((value) => { /* ... */ } )\nforEach((value, key) => { /* ... */ } )\nforEach((value, key, set) => { /* ... */ } )\n\n// Callback function\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n\n// Inline callback function\nforEach(function() { /* ... */ })\nforEach(function(value) { /* ... */ })\nforEach(function(value, key) { /* ... */ })\nforEach(function(value, key, set) { /* ... */ })\nforEach(function(value, key, set) { /* ... */ }, thisArg)\n```\n\n### Parameters\n\n- `callback`\n\n  - : Function to execute for each element, taking three arguments:\n\n    - `value`, `key`\n      - : The current element being processed in the `Set`. As there are no\n        keys in `Set`, the value is passed for both arguments.\n    - `set`\n      - : The `Set` object which `forEach()` was called upon.\n\n- `thisArg`\n  - : Value to use as `this` when executing `callbackFn`.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n## Description\n\nThe `forEach()` method executes the provided\n`callback` once for each value which actually exists in the\n`Set` object. It is not invoked for values which have been deleted. However,\nit is executed for values which are present but have the value `undefined`.\n\n`callback` is invoked with **three arguments**:\n\n- the **element value**\n- the **element key**\n- the **`Set` object being traversed**\n\nThere are no keys in `Set` objects, however, so the first two arguments are\nboth **values** contained in the [Set](../../../globals/Set/Set.mdx). This is to make it\nconsistent with other `forEach()` methods for [`Map.prototype.forEach()`](../../../globals/Map/prototype/forEach.mdx) and [`Array.prototype.forEach()`](../../../globals/Array/prototype/forEach.mdx).\n\nIf a `thisArg` parameter is provided to `forEach()`,\nit will be passed to `callback` when invoked, for use as its\n`this` value. Otherwise, the value `undefined` will be passed for\nuse as its `this` value. The `this` value ultimately observable by\n`callback` is determined according to\n[the usual rules for determining the `this` seen by a function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this).\n\nEach value is visited once, except in the case when it was deleted and re-added before\n`forEach()` has finished. `callback` is not invoked for\nvalues deleted before being visited. New values added before `forEach()` has\nfinished will be visited.\n\n`forEach()` executes the `callback` function once for\neach element in the `Set` object; it does not return a value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Set/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.has()\n\nThe **`has()`** method returns a boolean indicating whether an\nelement with the specified value exists in a `Set` object or not.\n\n## Syntax\n\n```js\nhas(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to test for presence in the `Set` object.\n\n### Return value\n\nReturns `true` if an element with the specified value exists in the `Set` object; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Set/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.keys()\n\nThe **`keys()`** method is an alias for the [`values()`](../../../globals/Set/prototype/values.mdx) method.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nA new iterator object containing the values for each element in the given\n`Set`, in insertion order.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Set/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.size\n\nThe **`size`** accessor property returns the number of (unique) elements in a [Set](../../../globals/Set/Set.mdx) object.\n\n## Description\n\nThe value of `size` is an integer representing how many entries the `Set` object has. A set accessor function for `size` is `undefined`; you cannot change this property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Set/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.values()\n\nThe **`values()`** method returns a new [Iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators) object that\ncontains the values for each element in the `Set` object in insertion order.\n\n> **Note:** The **`keys()`** method is an alias\n> for this method (for similarity with [Map](../../../globals/Map/Map.mdx) objects), hence the\n> `keys()` page redirecting here. It behaves exactly the same and returns\n> **values** of `Set` elements.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nA new iterator object containing the values for each element in the given\n`Set`, in insertion order.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/String/String.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String() constructor\n\nThe **`String`** constructor is used to create a new\n`String` object. When called instead as a function, it performs type\nconversion to a \"primitive string\" which is usually more\nuseful.\n\n## Syntax\n\n```js\nnew String(thing)\nString(thing)\n```\n\n> **Note:** `String()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\n- `thing`\n  - : Anything to be converted to a string.\n\n### Return value\n\nWhen `String` is called as a constructor (with `new`), it creates a `String` object, which is **not** a primitive.\n\nWhen `String` is called as a function, it coerces the parameter to a string primitive. `Symbol` values would be converted to `\"Symbol(description)\"`, where `description` is the [description](../../globals/Symbol/prototype/description.mdx) of the Symbol, instead of throwing.\n\n> **Warning:** You should rarely find yourself using `String` as a constructor.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/String/fromCharCode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.fromCharCode()\n\nThe static **`String.fromCharCode()`** method returns a string\ncreated from the specified sequence of UTF-16 code units.\n\n## Syntax\n\n```js\nString.fromCharCode(num1)\nString.fromCharCode(num1, num2)\nString.fromCharCode(num1, num2, /* …, */ numN)\n```\n\n### Parameters\n\n- `num1, ..., numN`\n  - : A sequence of numbers that are UTF-16 code units. The range is between\n    `0` and `65535` (`0xFFFF`). Numbers greater than\n    `0xFFFF` are truncated. No validity checks are performed.\n\n### Return value\n\nA string of length `N` consisting of the\n`N` specified UTF-16 code units.\n\n## Description\n\nThis method returns a string and not a `String` object.\n\nBecause `fromCharCode()` is a static method of `String`, you\nalways use it as `String.fromCharCode()`, rather than as a method of a\n`String` object you created.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/String/fromCodePoint.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.fromCodePoint()\n\nThe static **`String.fromCodePoint()`** method returns a string\ncreated by using the specified sequence of code points.\n\n## Syntax\n\n```js\nString.fromCodePoint(num1)\nString.fromCodePoint(num1, num2)\nString.fromCodePoint(num1, num2, /* …, */ numN)\n```\n\n### Parameters\n\n- `num1, ..., numN`\n  - : A sequence of code points.\n\n### Return value\n\nA string created by using the specified sequence of code points.\n\n### Exceptions\n\n- A `RangeError` is thrown if an invalid Unicode\n  code point is given (e.g. `\"RangeError: NaN is not a valid code point\"`).\n\n## Description\n\nThis method returns a string (and _not_ a `String` object).\n\nBecause `fromCodePoint()` is a static method of `String`, you\nmust call it as `String.fromCodePoint()`, rather than as a method of a\n`String` object you created.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/String/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype\\[Symbol.iterator]()\n\nThe **`Symbol.iterator`** method of a string implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows strings to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the Unicode code points of the string value as individual strings.\n\n## Syntax\n\n```js\nstring[Symbol.iterator]()\n```\n\n### Return value\n\nA new iterable iterator object that yields the Unicode code points of the string value as individual strings.\n\n## Description\n\nStrings are iterated by Unicode code points. This means grapheme clusters will be split, but surrogate pairs will be preserved.\n\n```js\n// \"Backhand Index Pointing Right: Dark Skin Tone\"\n[...\"👉🏿\"]; // ['👉', '🏿']\n// splits into the basic \"Backhand Index Pointing Right\" emoji and\n// the \"Dark skin tone\" emoji\n\n// \"Family: Man, Boy\"\n[...\"👨‍👦\"]; // [ '👨', '‍', '👦' ]\n// splits into the \"Man\" and \"Boy\" emoji, joined by a ZWJ\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/String/prototype/at.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.at()\n\nThe **`at()`** method takes an integer value and returns a `('String` consisting of the single UTF-16 code unit located at the specified offset. This method allows for positive and negative integers. Negative integers count back from the last string character.\n\n## Syntax\n\n```js\nat(index)\n```\n\n### Parameters\n\n- `index`\n  - : The index (position) of the string character to be returned. Supports relative indexing from the end of the string when passed a negative index; i.e. if a negative number is used, the character returned will be found by counting back from the end of the string.\n\n### Return value\n\n`('String` consisting of the single UTF-16 code unit located at the specified position. Returns [`undefined`](../../../globals/undefined.mdx) if the given index can not be found.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/String/prototype/charAt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.charAt()\n\nThe `String` object's\n**`charAt()`** method returns a new string consisting of the\nsingle UTF-16 code unit located at the specified offset into the string.\n\n## Syntax\n\n```js\ncharAt(index)\n```\n\n### Parameters\n\n- `index`\n  - : An integer between `0` and `str.length - 1`. If the\n    `index` cannot be converted to the integer or no\n    `index` is provided, the default is `0`, so the first\n    character of `str` is returned.\n\n### Return value\n\nA string representing the character (exactly one UTF-16 code unit) at the specified\n`index`. If `index` is out of range,\n`charAt()` returns an empty string.\n\n## Description\n\nCharacters in a string are indexed from left to right. The index of the first character\nis `0`, and the index of the last character—in a string called\n`stringName` is `stringName.length - 1`. If\nthe `index` you supply is out of this range, JavaScript returns an\nempty string.\n\nIf no `index` is provided to `charAt()`, the default\nis `0`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/String/prototype/charCodeAt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.charCodeAt()\n\nThe **`charCodeAt()`** method returns\nan integer between `0` and `65535` representing the UTF-16 code\nunit at the given index.\n\nThe UTF-16 code unit matches the Unicode code point for code points which can be\nrepresented in a single UTF-16 code unit. If the Unicode code point cannot be\nrepresented in a single UTF-16 code unit (because its value is greater than\n`0xFFFF`) then the code unit returned will be _the first part of a\nsurrogate pair_ for the code point. If you want the entire code point value, use\n[`codePointAt()`](../../../globals/String/prototype/codePointAt.mdx).\n\n## Syntax\n\n```js\ncharCodeAt(index)\n```\n\n### Parameters\n\n- `index`\n  - : An integer greater than or equal to `0` and less than the\n    `length` of the string. If `index` is not a number,\n    it defaults to `0`.\n\n### Return value\n\nA number representing the UTF-16 code unit value of the character at the given\n`index`. If `index` is out of range,\n`charCodeAt()` returns `NaN`.\n\n## Description\n\nUnicode code points range from `0` to `1114111`\n(`0x10FFFF`). The first 128 Unicode code points are a direct match of the\nASCII character encoding. (For information on Unicode, see [UTF-16 characters, Unicode codepoints, and grapheme clusters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters).)\n\n> **Note:** `charCodeAt()` will always return a value that is\n> less than `65536`. This is because the higher code points are represented\n> by _a pair_ of (lower valued) \"surrogate\" pseudo-characters which are used to\n> comprise the real character.\n>\n> Because of this, in order to examine (or reproduce) the full character for individual\n> character values of `65536` or greater, for such characters, it is\n> necessary to retrieve not only `charCodeAt(i)`, but also\n> `charCodeAt(i+1)` (as if manipulating a string with two\n> letters), or to use `codePointAt(i)` instead. See examples 2 and\n> 3 (below).\n\n`charCodeAt()` returns `NaN` if the given\nindex is less than `0`, or if it is equal to or greater than the\n`length` of the string.\n\nBackward compatibility: In historic versions (like JavaScript 1.2) the\n`charCodeAt()` method returns a number indicating the ISO-Latin-1 codeset\nvalue of the character at the given index. The ISO-Latin-1 codeset ranges from\n`0` to `255`. The first `0` to `127` are a\ndirect match of the ASCII character set.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/String/prototype/codePointAt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.codePointAt()\n\nThe **`codePointAt()`** method returns a non-negative integer\nthat is the Unicode code point value at the given position.\nNote that this function does not give the nth code point in a string,\nbut the code point starting at the specified string index.\n\n## Syntax\n\n```js\ncodePointAt(pos)\n```\n\n### Parameters\n\n- `pos`\n  - : Position of an element in `str` to return the code point value\n    from.\n\n### Return value\n\nA decimal number representing the code point value of the character at the given `pos`.\n\n- If there is no element at `pos`, returns [`undefined`](../../../globals/undefined.mdx).\n- If the element at `pos` is a UTF-16 high surrogate, returns the code point of the surrogate _pair_.\n- If the element at `pos` is a UTF-16 low surrogate, returns _only_ the low surrogate code point.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/String/prototype/concat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.concat()\n\nThe **`concat()`** method concatenates\nthe string arguments to the calling string and returns a new string.\n\n## Syntax\n\n```js\nconcat(str1)\nconcat(str1, str2)\nconcat(str1, str2, /* …, */ strN)\n```\n\n### Parameters\n\n- `strN`\n  - : One or more strings to concatenate to `str`.\n\n### Return value\n\nA new string containing the combined text of the strings provided.\n\n## Description\n\nThe `concat()` function concatenates the string arguments to the calling\nstring and returns a new string. Changes to the original string or the returned string\ndon't affect the other.\n\nIf the arguments are not of the type string, they are converted to string values before\nconcatenating.\n\nThe `concat()` method is very similar to the [addition/string concatenation operators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Addition) (`+`, `+=`), except that `concat()` [coerces its arguments directly to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion), while addition coerces its operands to primitives first. For more information, see the reference page for the [`+` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Addition).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/String/prototype/endsWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.endsWith()\n\nThe **`endsWith()`** method determines whether a string ends with the characters of a specified string, returning `true` or `false` as appropriate.\n\n## Syntax\n\n```js\nendsWith(searchString)\nendsWith(searchString, endPosition)\n```\n\n### Parameters\n\n- `searchString`\n  - : The characters to be searched for at the end of `str`. Cannot be a regex.\n- `endPosition` _**optional**_\n  - : The end position at which `searchString` is expected to be found (the index of `searchString`'s last character plus 1). Defaults to `str.length`.\n\n### Return value\n\n**`true`** if the given characters are found at the end of the string; otherwise, **`false`**.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If `searchString` is a regex.\n\n## Description\n\nThis method lets you determine whether or not a string ends with another string. This method is case-sensitive.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/String/prototype/includes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.includes()\n\nThe **`includes()`** method performs a case-sensitive search to determine whether one string may be found within another string, returning `true` or `false` as appropriate.\n\n## Syntax\n\n```js\nincludes(searchString)\nincludes(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n  - : A string to be searched for within `str`. Cannot be a regex.\n- `position` _**optional**_\n  - : The position within the string at which to begin searching for `searchString`. (Defaults to `0`.)\n\n### Return value\n\n**`true`** if the search string is found anywhere within the given string; otherwise, **`false`** if not.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If `searchString` is a regex.\n\n## Description\n\nThis method lets you determine whether or not a string includes another string.\n\n### Case-sensitivity\n\nThe `includes()` method is case sensitive. For example, the following expression returns `false`:\n\n```js\n\"Blue Whale\".includes(\"blue\"); // returns false\n```\n\nYou can work around this constraint by transforming both the original string and the search string to all lowercase:\n\n```js\n\"Blue Whale\".toLowerCase().includes(\"blue\"); // returns true\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/String/prototype/indexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.indexOf()\n\nThe **`indexOf()`** method, given one argument: a substring to search for, searches the entire calling string, and returns the index of the first occurrence of the specified substring. Given a second argument: a number, the method returns the first occurrence of the specified substring at an index greater than or equal to the specified number.\n\n## Syntax\n\n```js\nindexOf(searchString)\nindexOf(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n\n  - : Substring to search for, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion).\n\n    If the method is called with no arguments, `searchString` is coerced to `\"undefined\"`. Therefore,`\"undefined\".indexOf()` returns `0` — because the substring `\"undefined\"` is found at position `0` in the string `\"undefined\"`. But `\"undefine\".indexOf()`, returns `-1` — because the substring `\"undefined\"` is not found in the string `\"undefine\"`.\n\n- `position` _**optional**_\n\n  - : The method returns the index of the first occurrence of the specified substring at a position greater than or equal to `position`, which defaults to `0`. If `position` is greater than the length of the calling string, the method doesn't search the calling string at all. If `position` is less than zero, the method behaves as it would if `position` were `0`.\n\n    - `'hello world hello'.indexOf('o', -5)` returns `4` — because it causes the method to behave as if the second argument were `0`, and the first occurrence of `o` at a position greater or equal to `0` is at position `4`.\n\n    - `'hello world hello'.indexOf('world', 12)` returns `-1` — because, while it's true the substring `world` occurs at index `6`, that position is not greater than or equal to `12`.\n\n    - `'hello world hello'.indexOf('o', 99)` returns `-1` — because `99` is greater than the length of `hello world hello`, which causes the method to not search the string at all.\n\n### Return value\n\nThe index of the first occurrence of `searchString` found, or `-1` if not found.\n\n#### Return value when using an empty search string\n\nSearching for an empty search string produces strange results. With no second argument, or with a second argument whose value is less than the calling string's length, the return value is the same as the value of the second argument:\n\n```js\n\"hello world\".indexOf(\"\"); // returns 0\n\"hello world\".indexOf(\"\", 0); // returns 0\n\"hello world\".indexOf(\"\", 3); // returns 3\n\"hello world\".indexOf(\"\", 8); // returns 8\n```\n\nHowever, with a second argument whose value is greater than or equal to the string's length, the return value is the string's length:\n\n```js\n\"hello world\".indexOf(\"\", 11); // returns 11\n\"hello world\".indexOf(\"\", 13); // returns 11\n\"hello world\".indexOf(\"\", 22); // returns 11\n```\n\nIn the former instance, the method behaves as if it found an empty string just after the position specified in the second argument. In the latter instance, the method behaves as if it found an empty string at the end of the calling string.\n\n## Description\n\nStrings are zero-indexed: The index of a string's first character is `0`, and the index of a string's last character is the length of the string minus 1.\n\n```js\n\"Blue Whale\".indexOf(\"Blue\"); // returns  0\n\"Blue Whale\".indexOf(\"Blute\"); // returns -1\n\"Blue Whale\".indexOf(\"Whale\", 0); // returns  5\n\"Blue Whale\".indexOf(\"Whale\", 5); // returns  5\n\"Blue Whale\".indexOf(\"Whale\", 7); // returns -1\n\"Blue Whale\".indexOf(\"\"); // returns  0\n\"Blue Whale\".indexOf(\"\", 9); // returns  9\n\"Blue Whale\".indexOf(\"\", 10); // returns 10\n\"Blue Whale\".indexOf(\"\", 11); // returns 10\n```\n\nThe `indexOf()` method is case sensitive. For example, the following\nexpression returns `-1`:\n\n```js\n\"Blue Whale\".indexOf(\"blue\"); // returns -1\n```\n\n### Checking occurrences\n\nWhen checking if a specific substring occurs within a string, the correct way to check is test whether the return value is `-1`:\n\n```js\n\"Blue Whale\".indexOf(\"Blue\") !== -1; // true; found 'Blue' in 'Blue Whale'\n\"Blue Whale\".indexOf(\"Bloe\") !== -1; // false; no 'Bloe' in 'Blue Whale'\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/String/prototype/lastIndexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.lastIndexOf()\n\nThe **`lastIndexOf()`** method, given one argument: a substring to search for, searches the entire calling string, and returns the index of the last occurrence of the specified substring. Given a second argument: a number, the method returns the last occurrence of the specified substring at an index less than or equal to the specified number.\n\n## Syntax\n\n```js\nlastIndexOf(searchString)\nlastIndexOf(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n\n  - : Substring to search for, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion).\n\n    If the method is called with no arguments, `searchString` is coerced to `\"undefined\"`. Therefore,`\"undefined\".lastIndexOf()` returns `0` — because the substring `\"undefined\"` is found at position `0` in the string `\"undefined\"`. But `\"undefine\".lastIndexOf()`, returns `-1` — because the substring `\"undefined\"` is not found in the string `\"undefine\"`.\n\n- `position` _**optional**_\n\n  - : The method returns the index of the last occurrence of the specified substring at a position less than or equal to `position`, which defaults to `+Infinity`. If `position` is greater than the length of the calling string, the method searches the entire string. If `position` is less than `0`, the behavior is the same as for `0` — that is, the method looks for the specified substring only at index `0`.\n\n    - `'hello world hello'.lastIndexOf('world', 4)` returns `-1` — because, while the substring `world` does occurs at index `6`, that position is not less than or equal to `4`.\n\n    - `'hello world hello'.lastIndexOf('hello', 99)` returns `12` — because the last occurrence of `hello` at a position less than or equal to `99` is at position `12`.\n\n    - `'hello world hello'.lastIndexOf('hello', 0)` and `'hello world hello'.lastIndexOf('hello', -5)` both return `0` — because both cause the method to only look for `hello` at index `0`.\n\n### Return value\n\nThe index of the last occurrence of `searchString` found, or `-1` if not found.\n\n## Description\n\nStrings are zero-indexed: The index of a string's first character is `0`, and the index of a string's last character is the length of the string minus 1.\n\n```js\n\"canal\".lastIndexOf(\"a\"); // returns 3\n\"canal\".lastIndexOf(\"a\", 2); // returns 1\n\"canal\".lastIndexOf(\"a\", 0); // returns -1\n\"canal\".lastIndexOf(\"x\"); // returns -1\n\"canal\".lastIndexOf(\"c\", -5); // returns 0\n\"canal\".lastIndexOf(\"c\", 0); // returns 0\n\"canal\".lastIndexOf(\"\"); // returns 5\n\"canal\".lastIndexOf(\"\", 2); // returns 2\n```\n\n### Case-sensitivity\n\nThe `lastIndexOf()` method is case sensitive. For example, the following\nexpression returns `-1`:\n\n```js\n\"Blue Whale, Killer Whale\".lastIndexOf(\"blue\"); // returns -1\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/String/prototype/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.length\n\nThe **`length`** data property of a string contains the length of the string in UTF-16 code units.\n\n## Value\n\nA non-negative integer.\n\n## Description\n\nThis property returns the number of code units in the string. JavaScript uses [UTF-16](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters) encoding, where each Unicode character may be encoded as one or two code units, so it's possible for the value returned by `length` to not match the actual number of Unicode characters in the string. For common scripts like Latin, Cyrillic, wellknown CJK characters, etc., this should not be an issue, but if you are working with certain scripts, such as emojis, [mathematical symbols](https://en.wikipedia.org/wiki/Mathematical_Alphanumeric_Symbols), or obscure Chinese characters, you may need to account for the difference between code units and characters.\n\nThe language specification requires strings to have a maximum length of 2<sup>53</sup> - 1 elements, which is the upper limit for [precise integers](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER). However, a string with this length needs 16384TiB of storage, which cannot fit in any reasonable device's memory, so implementations tend to lower the threshold, which allows the string's length to be conveniently stored in a 32-bit integer.\n\n- In V8 (used by Chrome and Node), the maximum length is 2<sup>29</sup> - 24 (\\~1GiB). On 32-bit systems, the maximum length is 2<sup>28</sup> - 16 (\\~512MiB).\n- In Firefox, the maximum length is 2<sup>30</sup> - 2 (\\~2GiB). Before Firefox 65, the maximum length was 2<sup>28</sup> - 1 (\\~512MiB).\n- In Safari, the maximum length is 2<sup>31</sup> - 1 (\\~4GiB).\n\nFor an empty string, `length` is 0.\n\nThe static property `String.length` is unrelated to the length of strings. It's the [arity](../../../globals/Function/prototype/length.mdx) of the `String` function (loosely, the number of formal parameters it has), which is 1.\n\nSince `length` counts code units instead of characters, if you want to get the number of characters, you can first split the string with its [iterator](../../../globals/String/prototype/@@iterator.mdx), which iterates by characters:\n\n```js\nfunction getCharacterLength(str) {\n  // The string iterator that is used here iterates over characters,\n  // not mere code units\n  return [...str].length;\n}\n\nconsole.log(getCharacterLength(\"A\\uD87E\\uDC04Z\")); // 3\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/String/prototype/localeCompare.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.localeCompare()\n\nThe **`localeCompare()`** method returns a number indicating whether a reference string comes before, or after, or is the same as the given string in sort order. In implementations with [`Intl.Collator` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator) support, this method simply calls `Intl.Collator`.\n\n## Syntax\n\n```js\nlocaleCompare(compareString)\nlocaleCompare(compareString, locales)\nlocaleCompare(compareString, locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` parameters customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.Collator` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator), these parameters correspond exactly to the [`Intl.Collator()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator) constructor's parameters. Implementations without `Intl.Collator` support are asked to ignore both parameters, making the comparison result returned entirely implementation-dependent — it's only required to be _consistent_.\n\n- `compareString`\n  - : The string against which the `referenceStr` is compared.\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator#locales) parameter of the `Intl.Collator()` constructor.\n\n    In implementations without `Intl.Collator` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator#options) parameter of the `Intl.Collator()` constructor.\n\n    In implementations without `Intl.Collator` support, this parameter is ignored.\n\nSee the [`Intl.Collator()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator) for details on the `locales` and `options` parameters and how to use them.\n\n### Return value\n\nA **negative** number if `referenceStr` occurs before `compareString`; **positive** if the `referenceStr` occurs after `compareString`; `0` if they are equivalent.\n\nIn implementations with `Intl.Collator`, this is equivalent to `new Intl.Collator(locales, options).compare(referenceStr, compareString)`.\n\n## Description\n\nReturns an integer indicating whether the `referenceStr` comes\nbefore, after or is equivalent to the `compareString`.\n\n- Negative when the `referenceStr` occurs before\n  `compareString`\n- Positive when the `referenceStr` occurs after\n  `compareString`\n- Returns `0` if they are equivalent\n\n> **Warning:** Do not rely on exact return values of `-1` or `1`!\n>\n> Negative and positive integer results vary between browsers (as well as between\n> browser versions) because the W3C specification only mandates negative and positive\n> values. Some browsers may return `-2` or `2`, or even some other\n> negative or positive value.\n\n## Performance\n\nWhen comparing large numbers of strings, such as in sorting large arrays, it is better to create an [`Intl.Collator`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator) object and use the function provided by its [`compare()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/compare) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/String/prototype/match.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.match()\n\nThe **`match()`** method retrieves the result of matching a string against a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions).\n\n## Syntax\n\n```js\nmatch(regexp)\n```\n\n### Parameters\n\n- `regexp`\n\n  - : A regular expression object, or any object that has a [`Symbol.match`](../../../globals/Symbol/match.mdx) method.\n\n    If `regexp` is not a `RegExp` object and does not have a `Symbol.match` method, it is implicitly converted to a `RegExp` by using `new RegExp(regexp)`.\n\n    If you don't give any parameter and use the `match()` method directly, you will get an `Array` with an empty string: `[\"\"]`, because this is equivalent to `match(/(?:)/)`.\n\n### Return value\n\nAn `Array` whose contents depend on the presence or absence of the global (`g`) flag, or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) if no matches are found.\n\n- If the `g` flag is used, all results matching the complete regular expression will be returned, but capturing groups are not included.\n- If the `g` flag is not used, only the first complete match and its related capturing groups are returned. In this case, `match()` will return the same result as `RegExp.prototype.exec()` (an array with some extra properties).\n\n## Description\n\nThe implementation of `String.prototype.match` itself is very simple — it simply calls the `Symbol.match` method of the argument with the string as the first parameter. The actual implementation comes from [`RegExp.prototype[@@match]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@match).\n\n- If you need to know if a string matches a regular expression `RegExp`, use `RegExp.prototype.test()`.\n- If you only want the first match found, you might want to use `RegExp.prototype.exec()` instead.\n- If you want to obtain capture groups and the global flag is set, you need to use `RegExp.prototype.exec()` or [`String.prototype.matchAll()`](../../../globals/String/prototype/matchAll.mdx) instead.\n\nFor more information about the semantics of `match()` when a regex is passed, see [`RegExp.prototype[@@match]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@match).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/String/prototype/matchAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.matchAll()\n\nThe **`matchAll()`** method returns an iterator of all results matching a string against a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions), including [capturing groups](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions/Groups_and_Backreferences).\n\n## Syntax\n\n```js\nmatchAll(regexp)\n```\n\n### Parameters\n\n- `regexp`\n\n  - : A regular expression object, or any object that has a [`Symbol.matchAll`](../../../globals/Symbol/matchAll.mdx) method.\n\n    If `regexp` is not a `RegExp` object and does not have a `Symbol.matchAll` method, it is implicitly converted to a `RegExp` by using `new RegExp(regexp, 'g')`.\n\n    If `regexp` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes), then it must have the global (`g`) flag set, or a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Return value\n\nAn [iterable iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators) (which is not restartable) of matches. Each match is an array with the same shape as the return value of `RegExp.prototype.exec()`.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown if the `regexp` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes) that does not have the global (`g`) flag set (its [`flags`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/flags) property does not contain `\"g\"`).\n\n## Description\n\nThe implementation of `String.prototype.matchAll` itself is very simple — it simply calls the `Symbol.matchAll` method of the argument with the string as the first parameter (apart from the extra input validation that the regex is global). The actual implementation comes from [`RegExp.prototype[@@matchAll]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@matchAll).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/String/prototype/padEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.padEnd()\n\nThe **`padEnd()`** method pads the current string with a given\nstring (repeated, if needed) so that the resulting string reaches a given length. The\npadding is applied from the end of the current string.\n\n## Syntax\n\n```js\npadEnd(targetLength)\npadEnd(targetLength, padString)\n```\n\n### Parameters\n\n- `targetLength`\n  - : The length of the resulting string once the current `str` has\n    been padded. If the value is lower than `str.length`, the\n    current string will be returned as-is.\n- `padString` _**optional**_\n  - : The string to pad the current `str` with. If\n    `padString` is too long to stay within\n    `targetLength`, it will be truncated: for left-to-right\n    languages the left-most part and for right-to-left languages the right-most will be\n    applied. The default value for this parameter is \" \"\n    (`U+0020`).\n\n### Return value\n\nA `String` of the specified `targetLength` with the\n`padString` applied at the end of the current\n`str`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/String/prototype/padStart.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.padStart()\n\nThe **`padStart()`** method pads the\ncurrent string with another string (multiple times, if needed) until the resulting\nstring reaches the given length. The padding is applied from the start of the\ncurrent string.\n\n## Syntax\n\n```js\npadStart(targetLength)\npadStart(targetLength, padString)\n```\n\n### Parameters\n\n- `targetLength`\n  - : The length of the resulting string once the current `str` has\n    been padded. If the value is less than `str.length`, then\n    `str` is returned as-is.\n- `padString` _**optional**_\n  - : The string to pad the current `str` with. If\n    `padString` is too long to stay within the\n    `targetLength`, it will be truncated from the end.\n    The default value is the unicode \"space\" character (U+0020).\n\n### Return value\n\nA `String` of the specified `targetLength` with\n`padString` applied from the start.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/String/prototype/repeat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.repeat()\n\nThe **`repeat()`** method constructs and returns a new string\nwhich contains the specified number of copies of the string on which it was called,\nconcatenated together.\n\n## Syntax\n\n```js\nrepeat(count)\n```\n\n### Parameters\n\n- `count`\n  - : An integer between `0` and\n    [`+Infinity`](../../../globals/Number/POSITIVE_INFINITY.mdx), indicating the\n    number of times to repeat the string.\n\n### Return value\n\nA new string containing the specified number of copies of the given string.\n\n### Exceptions\n\n- Throws a `RangeError` if repeat count is negative.\n- Throws a `RangeError` if repeat count is infinity or overflows maximum string size.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/String/prototype/replace.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.replace()\n\nThe **`replace()`** method returns a new string with one, some, or all matches of a `pattern` replaced by a `replacement`. The `pattern` can be a string or a `RegExp`, and the `replacement` can be a string or a function called for each match. If `pattern` is a string, only the first occurrence will be replaced. The original string is left unchanged.\n\n## Syntax\n\n```js\nreplace(pattern, replacement)\n```\n\n### Parameters\n\n- `pattern`\n  - : Can be a string or an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method — the typical example being a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp). Any value that doesn't have the `Symbol.replace` method will be coerced to a string.\n- `replacement`\n  - : Can be a string or a function.\n    - If it's a string, it will replace the substring matched by `pattern`. A number of special replacement patterns are supported; see the [Specifying a string as the replacement](#specifying-a-string-as-the-replacement) section below.\n    - If it's a function, it will be invoked for every match and its return value is used as the replacement text. The arguments supplied to this function are described in the [Specifying a function as the replacement](#specifying-a-function-as-the-replacement) section below.\n\n### Return value\n\nA new string, with one, some, or all matches of the pattern replaced by the specified replacement.\n\n## Description\n\nThis method does not mutate the string value it's called on. It returns a new string.\n\nA string pattern will only be replaced once. To perform a global search and replace, use a regular expression with the `g` flag, or use [`replaceAll()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/replaceAll) instead.\n\nIf `pattern` is an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method (including `RegExp` objects), that method is called with the target string and `replacement` as arguments. Its return value becomes the return value of `replace()`. In this case the behavior of `replace()` is entirely encoded by the `@@replace` method — for example, any mention of \"capturing groups\" in the description below is actually functionality provided by [`RegExp.prototype[@@replace]`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@replace).\n\nIf the `pattern` is an empty string, the replacement is prepended to the start of the string.\n\n```js\n\"xxx\".replace(\"\", \"_\"); // \"_xxx\"\n```\n\nA regexp with the `g` flag is the only case where `replace()` replaces more than once. For more information about how regex properties (especially the [sticky](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky) flag) interact with `replace()`, see [`RegExp.prototype[@@replace]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@replace).\n\n### Specifying a string as the replacement\n\nThe replacement string can include the following special replacement patterns:\n\n| Pattern   | Inserts                                                                                        |\n| --------- | ---------------------------------------------------------------------------------------------- |\n| `$$`      | Inserts a `\"$\"`.                                                                               |\n| `$&`      | Inserts the matched substring.                                                                 |\n| `` $` ``  | Inserts the portion of the string that precedes the matched substring.                         |\n| `$'`      | Inserts the portion of the string that follows the matched substring.                          |\n| `$n`      | Inserts the `n`th (`1`-indexed) capturing group where `n` is a positive integer less than 100. |\n| `$<Name>` | Inserts the named capturing group where `Name` is the group name.                              |\n\n`$n` and `$<Name>` are only available if the `pattern` argument is a `RegExp` object. If the `pattern` is a string, or if the corresponding capturing group isn't present in the regex, then the pattern will be replaced as a literal. If the group is present but isn't matched (because it's part of a disjunction), it will be replaced with an empty string.\n\n```js\n\"foo\".replace(/(f)/, \"$2\");\n// \"$2oo\"; the regex doesn't have the second group\n\n\"foo\".replace(\"f\", \"$1\");\n// \"$1oo\"; the pattern is a string, so it doesn't have any groups\n\n\"foo\".replace(/(f)|(g)/, \"$2\");\n// \"oo\"; the second group exists but isn't matched\n```\n\n### Specifying a function as the replacement\n\nYou can specify a function as the second parameter. In this case, the function will be invoked after the match has been performed. The function's result (return value) will be used as the replacement string.\n\n> **Note:** The above-mentioned special replacement patterns do _not_ apply for strings returned from the replacer function.\n\nThe function has the following signature:\n\n```js\nfunction replacer(match, p1, p2, /* …, */ pN, offset, string, groups) {\n  return replacement;\n}\n```\n\nThe arguments to the function are as follows:\n\n- `match`\n  - : The matched substring. (Corresponds to `$&` above.)\n- `p1, p2, …, pN`\n  - : The `n`th string found by a capture group (including named capturing groups), provided the first argument to `replace()` is a `RegExp` object. (Corresponds to `$1`, `$2`, etc. above.) For example, if the `pattern` is `/(\\a+)(\\b+)/`, then `p1` is the match for `\\a+`, and `p2` is the match for `\\b+`. If the group is part of a disjunction (e.g. `\"abc\".replace(/(a)|(b)/, replacer)`), the unmatched alternative will be `undefined`.\n- `offset`\n  - : The offset of the matched substring within the whole string being examined. For example, if the whole string was `'abcd'`, and the matched substring was `'bc'`, then this argument will be `1`.\n- `string`\n  - : The whole string being examined.\n- `groups`\n  - : An object whose keys are the used group names, and whose values are the matched portions (`undefined` if not matched). Only present if the `pattern` contains at least one named capturing group.\n\nThe exact number of arguments depends on whether the first argument is a `RegExp` object — and, if so, how many capture groups it has.\n\nThe following example will set `newString` to `'abc - 12345 - #$*%'`:\n\n```js\nfunction replacer(match, p1, p2, p3, offset, string) {\n  // p1 is non-digits, p2 digits, and p3 non-alphanumerics\n  return [p1, p2, p3].join(\" - \");\n}\nconst newString = \"abc12345#$*%\".replace(/([^\\d]*)(\\d*)([^\\w]*)/, replacer);\nconsole.log(newString); // abc - 12345 - #$*%\n```\n\nThe function will be invoked multiple times for each full match to be replaced if the regular expression in the first parameter is global.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/String/prototype/replaceAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.replaceAll()\n\nThe **`replaceAll()`** method returns a new string with all matches of a `pattern` replaced by a `replacement`. The `pattern` can be a string or a `RegExp`, and the `replacement` can be a string or a function to be called for each match. The original string is left unchanged.\n\n## Syntax\n\n```js\nreplaceAll(pattern, replacement)\n```\n\n### Parameters\n\n- `pattern`\n\n  - : Can be a string or an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method — the typical example being a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp). Any value that doesn't have the `Symbol.replace` method will be coerced to a string.\n\n    If `pattern` is a regex, then it must have the global (`g`) flag set, or a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n- `replacement`\n  - : Can be a string or a function. The replacement has the same semantics as that of [`String.prototype.replace()`](../../../globals/String/prototype/replace.mdx).\n\n### Return value\n\nA new string, with all matches of a pattern replaced by a replacement.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown if the `pattern` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes) that does not have the global (`g`) flag set (its [`flags`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/flags) property does not contain `\"g\"`).\n\n## Description\n\nThis method does not mutate the string value it's called on. It returns a new string.\n\nUnlike [`String.prototype.replace()`](../../../globals/String/prototype/replace.mdx), this method would replace all occurrences of a string, not just the first one. This is especially useful if the string is not statically known, as calling the [`RegExp()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/RegExp) constructor without escaping special characters may unintentionally change its semantics.\n\n```js\nfunction unsafeRedactName(text, name) {\n  return text.replace(new RegExp(name, \"g\"), \"[REDACTED]\");\n}\nfunction safeRedactName(text, name) {\n  return text.replaceAll(name, \"[REDACTED]\");\n}\n\nconst report =\n  \"A hacker called ha.*er used special characters in their name to breach the system.\";\n\nconsole.log(unsafeRedactName(report, \"ha.*er\")); // \"A [REDACTED]s in their name to breach the system.\"\nconsole.log(safeRedactName(report, \"ha.*er\")); // \"A hacker called [REDACTED] used special characters in their name to breach the system.\"\n```\n\nIf `pattern` is an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method (including `RegExp` objects), that method is called with the target string and `replacement` as arguments. Its return value becomes the return value of `replaceAll()`. In this case the behavior of `replaceAll()` is entirely encoded by the `Symbol.replace` method, and therefore will have the same result as `replace()` (apart from the extra input validation that the regex is global).\n\nIf the `pattern` is an empty string, the replacement will be inserted in between every UTF-16 code unit, similar to [`String.prototype.split()`](../../../globals/String/prototype/split.mdx) behavior.\n\n```js\n\"xxx\".replaceAll(\"\", \"_\"); // \"_x_x_x_\"\n```\n\nFor more information about how regex properties (especially the [sticky](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky) flag) interact with `replaceAll()`, see [`RegExp.prototype[@@replace]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@replace).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/String/prototype/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.search()\n\nThe **`search()`** method executes a search for a match between a regular expression and this `String` object.\n\n## Syntax\n\n```js\nsearch(regexp)\n```\n\n### Parameters\n\n- `regexp`\n\n  - : A regular expression object, or any object that has a [`Symbol.search`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/search) method.\n\n    If `regexp` is not a `RegExp` object and does not have a `Symbol.search` method, it is implicitly converted to a `RegExp` by using `new RegExp(regexp)`.\n\n### Return value\n\nThe index of the first match between the regular expression and the given string, or `-1` if no match was found.\n\n## Description\n\nThe implementation of `String.prototype.search()` itself is very simple — it simply calls the `Symbol.search` method of the argument with the string as the first parameter. The actual implementation comes from [`RegExp.prototype[@@search]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@search).\n\nThe `g` flag of `regexp` has no effect on the `search()` result, and the search always happens as if the regex's `lastIndex` is 0. For more information on the behavior of `search()`, see [`RegExp.prototype[@@search]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@search).\n\nWhen you want to know whether a pattern is found, and _also_ know its index within a string, use `search()`.\n\n- If you only want to know if it exists, use the `RegExp.prototype.test()` method, which returns a boolean.\n- If you need the content of the matched text, use `String.prototype.match()` or `RegExp.prototype.exec()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/String/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.slice()\n\nThe **`slice()`** method extracts a section of a string and\nreturns it as a new string, without modifying the original string.\n\n## Syntax\n\n```js\nslice(indexStart)\nslice(indexStart, indexEnd)\n```\n\n### Parameters\n\n- `indexStart`\n  - : The index of the first character to include in the returned substring.\n- `indexEnd` _**optional**_\n  - : The index of the first character to exclude from the returned substring.\n\n### Return value\n\nA new string containing the extracted section of the string.\n\n## Description\n\n`slice()` extracts the text from one string and returns a new string. Changes to the text in one string do not affect the other string.\n\n`slice()` extracts up to but not including `indexEnd`. For example, `str.slice(1, 4)` extracts the second character through the fourth character (characters indexed `1`, `2`, and `3`).\n\n- If `indexStart >= str.length`, an empty string is returned.\n- If `indexStart < 0`, the index is counted from the end of the string. More formally, in this case, the substring starts at `max(indexStart + str.length, 0)`.\n- If `indexStart` is omitted, undefined, or cannot be converted to a number (using [`Number()`](../../../globals/Number/Number.mdx)), it's treated as `0`.\n- If `indexEnd` is omitted, undefined, or cannot be converted to a number (using [`Number()`](../../../globals/Number/Number.mdx)), or if `indexEnd >= str.length`, `slice()` extracts to the end of the string.\n- If `indexEnd < 0`, the index is counted from the end of the string. More formally, in this case, the substring ends at `max(indexEnd + str.length, 0)`.\n- If `indexEnd <= indexStart` after normalizing negative values (i.e. `indexEnd` represents a character that's before `indexStart`), an empty string is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/String/prototype/split.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.split()\n\nThe **`split()`** method takes a pattern and divides a `String` into an ordered list of substrings by searching for the pattern, puts these substrings into an array, and returns the array.\n\n## Syntax\n\n```js\nsplit()\nsplit(separator)\nsplit(separator, limit)\n```\n\n### Parameters\n\n- `separator` _**optional**_\n  - : The pattern describing where each split should occur. Can be a string or an object with a [`Symbol.split`](../../../globals/Symbol/split.mdx) method — the typical example being a regular expression. If undefined, the original target string is returned wrapped in an array.\n- `limit` _**optional**_\n  - : A non-negative integer specifying a limit on the number of substrings to be included in the array. If provided, splits the string at each occurrence of the specified `separator`, but stops when `limit` entries have been placed in the array. Any leftover text is not included in the array at all.\n    - The array may contain fewer entries than `limit` if the end of the string is reached before the limit is reached.\n    - If `limit` is `0`, `[]` is returned.\n\n### Return value\n\nAn `Array` of strings, split at each point where the `separator` occurs in the given string.\n\n## Description\n\nIf `separator` is a non-empty string, the target string is split by all matches of the `separator` without including `separator` in the results. For example, a string containing tab separated values (TSV) could be parsed by passing a tab character as the separator, like `myString.split(\"\\t\")`. If `separator` contains multiple characters, that entire character sequence must be found in order to split. If `separator` appears at the beginning (or end) of the string, it still has the effect of splitting, resulting in an empty (i.e. zero length) string appearing at the first (or last) position of the returned array. If `separator` does not occur in `str`, the returned array contains one element consisting of the entire string.\n\nIf `separator` is an empty string (`\"\"`), `str` is converted to an array of each of its UTF-16 \"characters\", without empty strings on either ends of the resulting string.\n\n> **Note:** `\"\".split(\"\")` is therefore the only way to produce an empty array when a string is passed as `separator`.\n\n> **Warning:** When the empty string (`\"\"`) is used as a separator, the string is **not** split by _user-perceived characters_ ([grapheme clusters](https://unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries)) or unicode characters (codepoints), but by UTF-16 codeunits. This destroys [surrogate pairs](https://unicode.org/faq/utf_bom.html#utf16-2). See [\"How do you get a string to a character array in JavaScript?\" on StackOverflow](https://stackoverflow.com/questions/4547609/how-to-get-character-array-from-a-string/34717402#34717402).\n\nIf `separator` is a regexp that matches empty strings, whether the match is split by UTF-16 code units or Unicode codepoints depends on if the [`u`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/unicode) flag is set.\n\n```js\n\"😄😄\".split(/(?:)/); // [ \"\\ud83d\", \"\\ude04\", \"\\ud83d\", \"\\ude04\" ]\n\"😄😄\".split(/(?:)/u); // [ \"😄\", \"😄\" ]\n```\n\nIf `separator` is a regular expression with capturing groups, then each time `separator` matches, the captured groups (including any `undefined` results) are spliced into the output array. This behavior is specified by the regexp's [`Symbol.split`](../../../globals/Symbol/split.mdx) method.\n\nIf `separator` is an object with a [`Symbol.split`](../../../globals/Symbol/split.mdx) method, that method is called with the target string and `limit` as arguments, and `this` set to the object. Its return value becomes the return value of `split`.\n\nAny other value will be coerced to a string before being used as separator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/String/prototype/startsWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.startsWith()\n\nThe **`startsWith()`** method determines whether a string begins with the characters of a specified string, returning `true` or `false` as appropriate.\n\n## Syntax\n\n```js\nstartsWith(searchString)\nstartsWith(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n  - : The characters to be searched for at the start of this string. Cannot be a regex.\n- `position` _**optional**_\n  - : The start position at which `searchString` is expected to be found (the index of `searchString`'s first character). Defaults to `0`.\n\n### Return value\n\n**`true`** if the given characters are found at the beginning of the string; otherwise, **`false`**.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If `searchString` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes).\n\n## Description\n\nThis method lets you determine whether or not a string begins with another string. This method is case-sensitive.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/String/prototype/substr.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.substr()\n\nThe **`substr()`** method returns a portion of the string, starting at the specified index and extending for a given number of characters afterwards.\n\n> **Note:** `substr()` is not part of the main ECMAScript specification — it's defined in [Annex B: Additional ECMAScript Features for Web Browsers](https://tc39.es/ecma262/#sec-additional-ecmascript-features-for-web-browsers), which is normative optional for non-browser runtimes. Therefore, people are advised to use the standard [`String.prototype.substring()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/substring) and [`String.prototype.slice()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/slice) methods instead to make their code maximally cross-platform friendly. The [`String.prototype.substring()` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/substring#the_difference_between_substring_and_substr) has some comparisons between the three methods.\n\n\n\n## Syntax\n\n```js\nsubstr(start)\nsubstr(start, length)\n```\n\n### Parameters\n\n- `start`\n  - : The index of the first character to include in the returned substring.\n- `length` _**optional**_\n  - : The number of characters to extract.\n\n### Return value\n\nA new string containing the specified part of the given string.\n\n## Description\n\nA string's `substr()` method extracts `length` characters from the string, counting from the `start` index.\n\n- If `start >= str.length`, an empty string is returned.\n- If `start < 0`, the index starts counting from the end of the string. More formally, in this case the substring starts at `max(start + str.length, 0)`.\n- If `start` is omitted or [`undefined`](../../../globals/undefined.mdx), it's treated as `0`.\n- If `length` is omitted or [`undefined`](../../../globals/undefined.mdx), or if `start + length >= str.length`, `substr()` extracts characters to the end of the string.\n- If `length < 0`, an empty string is returned.\n- For both `start` and `length`, [`NaN`](../../../globals/NaN.mdx) is treated as `0`.\n\nAlthough you are encouraged to avoid using `substr()`, there is no trivial way to migrate `substr()` to either `slice()` or `substring()` in legacy code without essentially writing a polyfill for `substr()`. For example, `str.substr(a, l)`, `str.slice(a, a + l)`, and `str.substring(a, a + l)` all have different results when `str = \"01234\", a = 1, l = -2` — `substr()` returns an empty string, `slice()` returns `\"123\"`, while `substring()` returns `\"0\"`. The actual refactoring path depends on the knowledge of the range of `a` and `l`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/String/prototype/substring.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.substring()\n\nThe **`substring()`** method returns the part of the `string` from the start index up to and excluding the end index, or to the end of the string if no end index is supplied.\n\n## Syntax\n\n```js\nsubstring(indexStart)\nsubstring(indexStart, indexEnd)\n```\n\n### Parameters\n\n- `indexStart`\n  - : The index of the first character to include in the returned substring.\n- `indexEnd` _**optional**_\n  - : The index of the first character to exclude from the returned substring.\n\n### Return value\n\nA new string containing the specified part of the given string.\n\n## Description\n\n`substring()` extracts characters from `indexStart` up to _but not including_ `indexEnd`. In particular:\n\n- If `indexEnd` is omitted, `substring()` extracts characters to the end of the string.\n- If `indexStart` is equal to `indexEnd`, `substring()` returns an empty string.\n- If `indexStart` is greater than `indexEnd`, then the effect of `substring()` is as if the two arguments were swapped; see example below.\n\nAny argument value that is less than `0` or greater than `str.length` is treated as if it were `0` and `str.length`, respectively.\n\nAny argument value that is [`NaN`](../../../globals/NaN.mdx) is treated as if it were `0`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/String/prototype/toLocaleLowerCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toLocaleLowerCase()\n\nThe **`toLocaleLowerCase()`** method returns the calling string\nvalue converted to lower case, according to any locale-specific case mappings.\n\n## Syntax\n\n```js\ntoLocaleLowerCase()\ntoLocaleLowerCase(locales)\n```\n\n### Parameters\n\n- `locales` _**optional**_\n  - : A string with a BCP 47 language tag, or an array of such strings. Indicates the locale to be used to convert to lower case according to any locale-specific case mappings. For the general form and interpretation of the `locales` argument, see [Locale identification and negotiation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation).\n\n### Return value\n\nA new string representing the calling string converted to lower case, according to any\nlocale-specific case mappings.\n\n### Exceptions\n\n- A [`RangeError`](../../../globals/RangeError/RangeError.mdx) (\"invalid language tag: xx_yy\") is thrown if a\n  `locale` argument isn't a valid language tag.\n- A [`TypeError`](../../../globals/TypeError/TypeError.mdx) (\"invalid element in locales argument\") is thrown if an\n  array element isn't of type string.\n\n## Description\n\nThe `toLocaleLowerCase()` method returns the value of the string converted\nto lower case according to any locale-specific case mappings.\n`toLocaleLowerCase()` does not affect the value of the string itself. In most\ncases, this will produce the same result as [`String.prototype.toLowerCase()`](../../../globals/String/prototype/toLowerCase.mdx), but for some locales, such as Turkish, whose case mappings do not\nfollow the default case mappings in Unicode, there may be a different result.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/String/prototype/toLocaleUpperCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toLocaleUpperCase()\n\nThe **`toLocaleUpperCase()`** method returns the calling string\nvalue converted to upper case, according to any locale-specific case mappings.\n\n## Syntax\n\n```js\ntoLocaleUpperCase()\ntoLocaleUpperCase(locales)\n```\n\n### Parameters\n\n- `locales` _**optional**_\n  - : A string with a BCP 47 language tag, or an array of such strings. Indicates the locale to be used to convert to upper case according to any locale-specific case mappings. For the general form and interpretation of the `locales` argument, see [Locale identification and negotiation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation).\n\n### Return value\n\nA new string representing the calling string converted to upper case, according to any\nlocale-specific case mappings.\n\n### Exceptions\n\n- A [`RangeError`](../../../globals/RangeError/RangeError.mdx) (\"invalid language tag: xx_yy\") is thrown if a\n  `locale` argument isn't a valid language tag.\n- A [`TypeError`](../../../globals/TypeError/TypeError.mdx) (\"invalid element in locales argument\") is thrown if an\n  array element isn't of type string.\n\n## Description\n\nThe `toLocaleUpperCase()` method returns the value of the string converted\nto upper case according to any locale-specific case mappings.\n`toLocaleUpperCase()` does not affect the value of the string itself. In most\ncases, this will produce the same result as [`String.prototype.toUpperCase()`](../../../globals/String/prototype/toUpperCase.mdx), but for some locales, such as Turkish, whose case mappings do not\nfollow the default case mappings in Unicode, there may be a different result.\n\nAlso notice that conversion is not necessarily a 1:1 character mapping, as some\ncharacters might result in two (or even more) characters when transformed to upper-case.\nTherefore the length of the result string can differ from the input length. This also\nimplies that the conversion is not stable, so i.E. the following can return\n`false`:\n`x.toLocaleLowerCase() === x.toLocaleUpperCase().toLocaleLowerCase()`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/String/prototype/toLowerCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toLowerCase()\n\nThe **`toLowerCase()`** method returns the calling string value\nconverted to lower case.\n\n## Syntax\n\n```js\ntoLowerCase()\n```\n\n### Return value\n\nA new string representing the calling string converted to lower case.\n\n## Description\n\nThe `toLowerCase()` method returns the value of the string converted to\nlower case. `toLowerCase()` does not affect the value of the string\n`str` itself.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/String/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified string value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified string value.\n\n## Description\n\nThe `String` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For `String` values, the `toString` method returns the string itself (if it's a primitive) or the string that the `String` object wraps. It has the exact same implementation as [`String.prototype.valueOf()`](../../../globals/String/prototype/valueOf.mdx).\n\nThe `toString()` method requires its `this` value to be a `String` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to string values.\n\nBecause `String` doesn't have a [`[Symbol.toPrimitive]()`](../../../globals/Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `String` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, String _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — since they are already strings, no conversion is performed.\n\n```js\nString.prototype.toString = () => \"Overridden\";\nconsole.log(`${\"foo\"}`); // \"foo\"\nconsole.log(`${new String(\"foo\")}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/String/prototype/toUpperCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toUpperCase()\n\nThe **`toUpperCase()`** method returns the calling string value\nconverted to uppercase (the value will be converted to a string if it isn't one).\n\n## Syntax\n\n```js\ntoUpperCase()\n```\n\n### Return value\n\nA new string representing the calling string converted to upper case.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : When called on [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../../globals/undefined.mdx), for example,\n    `String.prototype.toUpperCase.call(undefined)`.\n\n## Description\n\nThe `toUpperCase()` method returns the value of the string converted to\nuppercase. This method does not affect the value of the string itself since JavaScript\nstrings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/String/prototype/trim.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.trim()\n\nThe **`trim()`** method removes whitespace from both ends of a string and returns a new string, without modifying the original string.\n\nTo return a new string with whitespace trimmed from just one end, use [`String.prototype.trimStart()`](../../../globals/String/prototype/trimStart.mdx) or [`String.prototype.trimEnd()`](../../../globals/String/prototype/trimEnd.mdx).\n\n## Syntax\n\n```js\ntrim()\n```\n\n### Return value\n\nA new string representing `str` stripped of whitespace from both its beginning and end. Whitespace is defined as [white space](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#white_space) characters plus [line terminators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#line_terminators).\n\nIf neither the beginning or end of `str` has any whitespace, a new string is still returned (essentially a copy of `str`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/String/prototype/trimEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.trimEnd()\n\nThe **`trimEnd()`** method removes whitespace from the end of a string and returns a new string, without modifying the original string. `trimRight()` is an alias of this method.\n\n## Syntax\n\n```js\ntrimEnd()\n\ntrimRight()\n```\n\n### Return value\n\nA new string representing `str` stripped of whitespace from its end (right side). Whitespace is defined as [white space](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#white_space) characters plus [line terminators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#line_terminators).\n\nIf the end of `str` has no whitespace, a new string is still returned (essentially a copy of `str`).\n\n### Aliasing\n\nAfter [`String.prototype.trim()`](../../../globals/String/prototype/trim.mdx) was standardized, engines also implemented the non-standard method `trimRight`. However, for consistency with [`String.prototype.pedEnd()`](../../../globals/String/prototype/trim.mdx), when the method got standardized, its name was chosen as `trimEnd`. For web compatibility reasons, `trimRight` remains as an alias to `trimEnd`, and they refer to the exact same function object. In some engines this means:\n\n```js\nString.prototype.trimRight.name === \"trimEnd\";\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/String/prototype/trimStart.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.trimStart()\n\nThe **`trimStart()`** method removes whitespace from the beginning of a string and returns a new string, without modifying the original string. `trimLeft()` is an alias of this method.\n\n## Syntax\n\n```js\ntrimStart()\n\ntrimLeft()\n```\n\n### Return value\n\nA new string representing `str` stripped of whitespace from its beginning (left side). Whitespace is defined as [white space](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#white_space) characters plus [line terminators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#line_terminators).\n\nIf the beginning of `str` has no whitespace, a new string is still returned (essentially a copy of `str`).\n\n### Aliasing\n\nAfter [`String.prototype.trim()`](../../../globals/String/prototype/trim.mdx) was standardized, engines also implemented the non-standard method `trimLeft`. However, for consistency with [`String.prototype.padEnd()`](../../../globals/String/prototype/padEnd.mdx), when the method got standardized, its name was chosen as `trimStart`. For web compatibility reasons, `trimLeft` remains as an alias to `trimStart`, and they refer to the exact same function object. In some engines this means:\n\n```js\nString.prototype.trimLeft.name === \"trimStart\";\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/String/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a\n`String` object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nA string representing the primitive value of a given `String` object.\n\n## Description\n\nThe `valueOf()` method of `String` returns the primitive value\nof a `String` object as a string data type. This value is equivalent to\n[`String.prototype.toString()`](../../../globals/String/prototype/toString.mdx).\n\nThis method is usually called internally by JavaScript and not explicitly in code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/String/raw.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.raw()\n\nThe static **`String.raw()`** method is a tag function of [template literals](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). This is similar to the `r` prefix in Python, or the `@` prefix in C# for string literals. It's used to get the raw string form of template literals — that is, substitutions (e.g. `${foo}`) are processed, but escape sequences (e.g. `\\n`) are not.\n\n## Syntax\n\n```js\nString.raw(strings, ...substitutions)\n\nString.raw`templateString`\n```\n\n### Parameters\n\n- `strings`\n  - : Well-formed template literal array object, like `{ raw: ['foo', 'bar', 'baz'] }`. Should be an object with a `raw` property whose value is an array-like object of strings.\n- `...substitutions`\n  - : Contains substitution values.\n- `templateString`\n  - : A [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals), optionally with substitutions (`${...}`).\n\n### Return value\n\nThe raw string form of a given template literal.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if the first argument doesn't have a `raw` property, or the `raw` property is `undefined` or `null`.\n\n## Description\n\nIn most cases, `String.raw()` is used with template literals. The first syntax mentioned above is only rarely used, because the JavaScript engine will call this with proper arguments for you, (just like with other [tag functions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals#tagged_templates)).\n\n`String.raw()` is the only built-in template literal tag. It has close semantics to an untagged literal since it concatenates all arguments and returns a string. You can even re-implement it with normal JavaScript code.\n\n> **Warning:** You should not use `String.raw` directly as an \"identity\" tag. See [Building an identity tag](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/raw#building_an_identity_tag) for how to implement this.\n\nIf `String.raw()` is called with an object whose `raw` property doesn't have a `length` property or a non-positive `length`, it returns an empty string `\"\"`. If `substitutions.length < strings.raw.length - 1` (i.e. there are not enough substitutions to fill the placeholders — which can't happen in a well-formed tagged template literal), the rest of the placeholders are filled with empty strings.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/SubtleCrypto/SubtleCrypto.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SubtleCrypto\n\nThe **`SubtleCrypto`** interface provides a number of low-level cryptographic functions. Access to the features of `SubtleCrypto` is obtained through the [`crypto.subtle`](../crypto/subtle.mdx) property.\n\n> **Warning:** This API provides a number of low-level cryptographic primitives. It's very easy to misuse them, and the pitfalls involved can be very subtle.\n>\n> Even assuming you use the basic cryptographic functions correctly, secure key management and overall security system design are extremely hard to get right, and are generally the domain of specialist security experts.\n>\n> Errors in security system design and implementation can make the security of the system completely ineffective.\n>\n> Please learn and experiment, but don't guarantee or imply the security of your work before an individual knowledgeable in this subject matter thoroughly reviews it. The [Crypto 101 Course](https://www.crypto101.io/) can be a great place to start learning about the design and implementation of secure systems.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/SubtleCrypto/prototype/digest.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# digest()\n\nThe **`digest()`** method of the [`SubtleCrypto`](../SubtleCrypto.mdx)\ninterface generates a digest of the given data. A digest is a short\nfixed-length value derived from some variable-length input. Cryptographic digests should\nexhibit collision-resistance, meaning that it's hard to come up with two different\ninputs that have the same digest value.\n\nIt takes as its arguments an identifier for the digest algorithm to use and the data to\ndigest. It returns a [`Promise`](../../Promise/Promise.mdx) which will be fulfilled with the digest.\n\n## Syntax\n\n```js\ndigest(algorithm, data)\n```\n\n### Parameters\n\n- `algorithm`\n  - : This may be a string or an object with a single property `name` that is a string. The string names the hash function to use. Supported values are:\n    - `\"MD5\"` (but don't use this in cryptographic applications)\n    - `\"SHA-1\"` (but don't use this in cryptographic applications)\n    - `\"SHA-256\"`\n    - `\"SHA-384\"`\n    - `\"SHA-512\"`.\n- `data`\n  - : An `ArrayBuffer`, a `TypedArray` or a `DataView` object containing the data to be digested.\n\n### Return value\n\nA [`Promise`](../../Promise/Promise.mdx) that fulfills with an `ArrayBuffer` containing the digest.\n\n## Supported algorithms\n\nDigest algorithms, also known as cryptographic hash functions,\ntransform an arbitrarily large block of data into a fixed-size output,\nusually much shorter than the input. They have a variety of applications in\ncryptography.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/SubtleCrypto/prototype/importKey.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# importKey()\n\nThe **`importKey()`** method of the [`SubtleCrypto`](../SubtleCrypto.mdx)\ninterface imports a key: that is, it takes as input a key in an external, portable\nformat and gives you a [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) object that you can use.\n\nThe function accepts several import formats: see [Supported formats](#supported-formats) for details.\n\n## Syntax\n\n```js\nimportKey(format, keyData, algorithm, extractable, keyUsages)\n```\n\n### Parameters\n\n- `format`\n  - : A string describing the data format of the key to import. It can be one of the following:\n    - `raw`: [Raw](#raw) format.\n    - `jwk`: [JSON Web Key](#json-web-key) format.\n- `keyData`\n  - : An `ArrayBuffer`, a TypedArray, a `DataView`, or a `JSONWebKey` object containing the key in\n    the given format.\n- `algorithm`\n  - : An object defining the type of key to import and providing extra algorithm-specific parameters.\n    - For RSASSA-PKCS1-v1_5:\n      Pass an [`RsaHashedImportParams`](../../RsaHashedImportParams/RsaHashedImportParams.mdx) object.\n    - For HMAC:\n      Pass an [`HmacImportParams`](../../HmacImportParams/HmacImportParams.mdx) object.\n    - For ECDSA:\n      Pass an [`EcKeyImportParams`](../../EcKeyImportParams/EcKeyImportParams.mdx) object.\n- `extractable`\n  - : A boolean value indicating whether it will be possible to export the key.\n- `keyUsages`\n  - : An `Array` indicating what can be done with the key. Possible array values are:\n    - `encrypt`: The key may be used to encrypt messages.\n    - `decrypt`: The key may be used to decrypt messages.\n    - `sign`: The key may be used to sign messages.\n    - `verify`: The key may be used to verify signatures.\n    - `deriveKey`: The key may be used in deriving a new key.\n    - `deriveBits`: The key may be used in deriving bits.\n    - `wrapKey`: The key may be used to wrap a key.\n    - `unwrapKey`: The key may be used to unwrap a key.\n\n### Return value\n\nA [`Promise`](../../Promise/Promise.mdx)\nthat fulfills with the imported key as a [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) object.\n\n### Exceptions\n\nThe promise is rejected when one of the following exceptions is encountered:\n\n- `SyntaxError`\n  - : Raised when `keyUsages` is empty but the unwrapped key is of\n    type `secret` or `private`.\n- `TypeError`\n  - : Raised when trying to use an invalid format or if the `keyData`\n    is not suited for that format.\n\n## Supported formats\n\nThis API currently supports one key import/export format: JSON Web Key.\n\n### Raw\n\nYou can use this format to import or export AES or HMAC secret keys, or Elliptic Curve\npublic keys.\n\nIn this format the key is supplied as an `ArrayBuffer` containing the raw bytes for the key.\n\n\n### JSON Web Key\n\nYou can use JSON Web Key format to import or export RSA or Elliptic Curve public or\nprivate keys, as well as AES and HMAC secret keys.\n\nJSON Web Key format is defined in [RFC 7517](https://datatracker.ietf.org/doc/html/rfc7517).\nIt describes a way to represent public, private, and secret keys as JSON objects.\n\nA JSON Web Key looks something like this (this is an EC private key):\n\n```json\n{\n  \"crv\": \"P-384\",\n  \"d\": \"wouCtU7Nw4E8_7n5C1-xBjB4xqSb_liZhYMsy8MGgxUny6Q8NCoH9xSiviwLFfK_\",\n  \"ext\": true,\n  \"key_ops\": [\"sign\"],\n  \"kty\": \"EC\",\n  \"x\": \"SzrRXmyI8VWFJg1dPUNbFcc9jZvjZEfH7ulKI1UkXAltd7RGWrcfFxqyGPcwu6AQ\",\n  \"y\": \"hHUag3OvDzEr0uUQND4PXHQTXP5IDGdYhJhL-WLKjnGjQAw0rNGy5V29-aV-yseW\"\n};\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/SubtleCrypto/prototype/sign.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# sign()\n\nThe **`sign()`** method of the [`SubtleCrypto`](../SubtleCrypto.mdx) interface generates a digital signature.\n\nIt takes as its arguments a key to sign with, some algorithm-specific\nparameters, and the data to sign. It returns a `Promise` which will be\nfulfilled with the signature.\n\nYou can use the corresponding [`verify()`](./verify.mdx) method to verify the signature.\n\n## Syntax\n\n```js\nsign(algorithm, key, data)\n```\n\n### Parameters\n\n- `algorithm`\n  - : A string or object that specifies the signature algorithm to use and its parameters:\n    - To use [RSASSA-PKCS1-v1_5](#rsassa-pkcs1-v1_5), pass the string `\"RSASSA-PKCS1-v1_5\"` or an object of the form `{ \"name\": \"RSASSA-PKCS1-v1_5\" }`.\n    - To use [HMAC](#hmac), pass the string `\"HMAC\"` or an object of the form `{ \"name\": \"HMAC\" }`.\n- `key`\n  - : A [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) object containing the key to be used for signing.\n    If `algorithm` identifies a public-key cryptosystem, this is the private key.\n- `data`\n  - : An `ArrayBuffer`, a TypedArray or a `DataView` object containing the data to be signed.\n\n### Return value\n\nA `Promise` that fulfills with an `ArrayBuffer` containing the signature.\n\n### Exceptions\n\nThe promise is rejected when the following exception is encountered:\n\n- `InvalidAccessError`\n  - : Raised when the signing key is not a key for the request signing algorithm or when\n    trying to use an algorithm that is either unknown or isn't suitable for signing.\n\n## Supported algorithms\n\n### RSASSA-PKCS1-v1_5\n\nThe RSASSA-PKCS1-v1_5 algorithm is specified in [RFC 3447](https://datatracker.ietf.org/doc/html/rfc3447).\n\n### HMAC\n\nThe HMAC algorithm calculates and verifies hash-based message authentication codes according to the\n[FIPS 198-1 standard](https://csrc.nist.gov/csrc/media/publications/fips/198/1/final/documents/fips-198-1_final.pdf).\n\nThe digest algorithm to use is specified in the\n[`HmacImportParams`](../../HmacImportParams/HmacImportParams.mdx) object\nthat you pass into [`SubtleCrypto.importKey()`](./importKey.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/SubtleCrypto/prototype/verify.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# verify()\n\nThe **`verify()`** method verifies a digital signature.\n\nIt takes as its arguments a key to verify the signature with, some algorithm-specific parameters, the signature, and the original signed data.\nIt returns a `Promise` which will be fulfilled with a boolean value indicating whether the signature is valid.\n\n## Syntax\n\n```js\nverify(algorithm, key, signature, data)\n```\n\n### Parameters\n\n- `algorithm`\n  - : A string or object defining the algorithm to use, and for some algorithm choices, some extra parameters.\n    The values given for the extra parameters must match those passed into the corresponding [`sign()`](./sign.mdx) call.\n    - To use RSASSA-PKCS1-v1_5, pass the string `\"RSASSA-PKCS1-v1_5\"` or an object of the form `{ \"name\": \"RSASSA-PKCS1-v1_5\" }`.\n    - To use HMAC, pass the string `\"HMAC\"` or an object of the form `{ \"name\": \"HMAC\" }`.\n- `key`\n  - : A [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) containing the key that will be used to verify the signature.\n    It is the secret key for a symmetric algorithm and the public key for a public-key system.\n- `signature`\n  - : A `ArrayBuffer` containing the signature to verify.\n- `data`\n  - : A `ArrayBuffer` containing the data whose signature is to be verified.\n\n### Return value\n\nA `Promise` that fulfills with a\nboolean value: `true` if the signature is valid, `false`\notherwise.\n\n### Exceptions\n\nThe promise is rejected when the following exception is encountered:\n\n- `InvalidAccessError`\n  - : Raised when the encryption key is not a key for the requested verifying algorithm or\n    when trying to use an algorithm that is either unknown or isn't suitable for a verify\n    operation.\n\n## Supported algorithms\n\nThe `verify()` method supports the same algorithms as the [`sign()`](./sign.mdx) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Symbol/Symbol.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol()\n\nThe `Symbol()` constructor returns a value of type **symbol**,\nbut is incomplete as a constructor because it does not support the syntax\n\"`new Symbol()`\" and it is not intended to be subclassed. It may be used as\nthe value of an\n[`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends)\nclause of a `class` definition but a\n[`super`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/super)\ncall to it will cause an exception.\n\n## Syntax\n\n```js\nSymbol()\nSymbol(description)\n```\n\n> **Note:** `Symbol()` can only be called without `new`. Attempting to construct it with `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `description` _**optional**_\n  - : A string. A description of the symbol which can be used for debugging but not to\n    access the symbol itself.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Symbol/asyncIterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.asyncIterator\n\nThe **`Symbol.asyncIterator`** well-known symbol specifies the default [async iterator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_async_iterator_and_async_iterable_protocols) for an object. If this property is set on an object, it is an async iterable and can be used in a [`for await...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for-await...of) loop.\n\n## Value\n\nThe well-known symbol `Symbol.asyncIterator`.\n\n## Description\n\nThe `Symbol.asyncIterator` symbol is a builtin symbol that is used to access an object's `Symbol.asyncIterator` method. In order for an object to be async iterable, it must have a `Symbol.asyncIterator` key.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Symbol/for.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.for()\n\nThe **`Symbol.for(key)`** method searches for existing symbols\nin a runtime-wide symbol registry with the given key and returns it if found. Otherwise\na new symbol gets created in the global symbol registry with this key.\n\n## Syntax\n\n```js\nSymbol.for(key)\n```\n\n### Parameters\n\n- `key`\n  - : String, required. The key for the symbol (and also used for the description of the\n    symbol).\n\n### Return value\n\nAn existing symbol with the given key if found; otherwise, a new symbol is created and\nreturned.\n\n## Description\n\nIn contrast to `Symbol()`, the `Symbol.for()` function creates a\nsymbol available in a [global symbol registry](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol#shared_symbols_in_the_global_symbol_registry) list. `Symbol.for()` does also\nnot necessarily create a new symbol on every call, but checks first if a symbol with the\ngiven `key` is already present in the registry. In that case, that symbol is\nreturned. If no symbol with the given key is found, `Symbol.for()` will\ncreate a new global symbol.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Symbol/hasInstance.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.hasInstance\n\nThe **`Symbol.hasInstance`** well-known symbol is used to determine if a constructor object recognizes an object as its instance. The `instanceof` operator's behavior can be customized by this symbol.\n\n## Value\n\nThe well-known symbol `Symbol.hasInstance`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Symbol/isConcatSpreadable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.isConcatSpreadable\n\nThe **`Symbol.isConcatSpreadable`** well-known symbol is used to configure if an object should be flattened to its array elements when using the [`Array.prototype.concat()`](../../globals/Array/prototype/concat.mdx) method.\n\n## Value\n\nThe well-known symbol `Symbol.isConcatSpreadable`.\n\n## Description\n\nThe `Symbol.isConcatSpreadable` symbol (`Symbol.isConcatSpreadable`) can be defined as an own or inherited property and its value is a boolean. It can control behavior for arrays and array-like objects:\n\n- For array objects, the default behavior is to spread (flatten) elements. `Symbol.isConcatSpreadable` can avoid flattening in these cases.\n- For array-like objects, the default behavior is no spreading or flattening. `Symbol.isConcatSpreadable` can force flattening in these cases.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Symbol/iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.iterator\n\nThe well-known **`Symbol.iterator`** symbol specifies the default iterator for an object. Used by [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of).\n\n## Value\n\nThe well-known symbol `Symbol.iterator`.\n\n## Description\n\nWhenever an object needs to be iterated (such as at the beginning of a `for...of` loop), its `Symbol.iterator` method is called with no arguments, and the returned **iterator** is used to obtain the values to be iterated.\n\nSome built-in types have a default iteration behavior, while other types (such as `Object`) do not. The built-in types with a `Symbol.iterator` method are:\n\n- [`Array.prototype[Symbol.iterator]()`](../../globals/Array/prototype/@@iterator.mdx)\n- [`String.prototype[Symbol.iterator]()`](../../globals/String/prototype/@@iterator.mdx)\n- [`Map.prototype[Symbol.iterator]()`](../../globals/Map/prototype/@@iterator.mdx)\n- [`Set.prototype[Symbol.iterator]()`](../../globals/Set/prototype/@@iterator.mdx)\n\nSee also [Iteration protocols](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) for more information.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Symbol/keyFor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.keyFor()\n\nThe **`Symbol.keyFor(sym)`** method retrieves a shared symbol\nkey from the global symbol registry for the given symbol.\n\n## Syntax\n\n```js\nSymbol.keyFor(sym)\n```\n\n### Parameters\n\n- `sym`\n  - : Symbol, required. The symbol to find a key for.\n\n### Return value\n\nA string representing the key for the given symbol if one is found on the [global registry](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol#shared_symbols_in_the_global_symbol_registry); otherwise, [`undefined`](../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Symbol/match.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.match\n\nThe **`Symbol.match`** well-known symbol specifies the matching of a regular expression against a string. This function is called by the [`String.prototype.match()`](../../globals/String/prototype/match.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.match]()` and [`String.prototype.match()`](../../globals/String/prototype/match.mdx).\n\n## Value\n\nThe well-known symbol `Symbolmatch`.\n\n## Description\n\nThis function is also used to identify [if objects have the behavior of regular expressions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes). For example, the methods [`String.prototype.startsWith()`](../../globals/String/prototype/startsWith.mdx), [`String.prototype.endsWith()`](../../globals/String/prototype/endsWith.mdx) and [`String.prototype.includes()`](../../globals/String/prototype/includes.mdx), check if their first argument is a regular expression and will throw a [`TypeError`](../../globals/TypeError/TypeError.mdx) if they are. Now, if the `match` symbol is set to `false` (or a [Falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value except `undefined`), it indicates that the object is not intended to be used as a regular expression object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Symbol/matchAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.matchAll\n\nThe **`Symbol.matchAll`** well-known symbol specifies the method that returns an iterator, that yields matches of the regular expression against a string. This function is called by the [`String.prototype.matchAll()`](../../globals/String/prototype/matchAll.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.matchAll]()` and [`String.prototype.matchAll()`](../../globals/String/prototype/matchAll.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.matchAll`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Symbol/prototype/@@toPrimitive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype[Symbol.toPrimitive]\n\nThe **`[Symbol.toPrimitive]()`** method converts a Symbol object to\na primitive value.\n\n## Syntax\n\n```js\nSymbol()[Symbol.toPrimitive](hint)\n```\n\n### Return value\n\nThe primitive value of the specified `Symbol` object.\n\n## Description\n\nThe `[Symbol.toPrimitive]()` method of `Symbol` returns the primitive\nvalue of a Symbol object as a Symbol data type. The `hint`\nargument is not used.\n\nJavaScript calls the `[Symbol.toPrimitive]()` method to convert an object to a\nprimitive value. You rarely need to invoke the `[Symbol.toPrimitive]()` method\nyourself; JavaScript automatically invokes it when encountering an object where a\nprimitive value is expected.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Symbol/prototype/description.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype.description\n\nThe read-only **`description`** property is a string returning the optional description of `Symbol` objects.\n\n## Description\n\n`Symbol` objects can be created with an optional description which can be used for debugging but not to access the symbol itself. The `Symbol.prototype.description` property can be used to read that description. It is different to `Symbol.prototype.toString()` as it does not contain the enclosing `\"Symbol()\"` string. See the examples.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Symbol/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified symbol value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified symbol value.\n\n## Description\n\nThe `Symbol` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For `Symbol` values, the `toString` method returns a descriptive string in the form `\"Symbol(description)\"`, where `description` is the symbol's [`Symbol.prototype.description`](../../../globals/Symbol/prototype/description.mdx).\n\nThe `toString()` method requires its `this` value to be a `Symbol` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to symbol values.\n\nBecause `Symbol` has a [`[Symbol.toPrimitive]()`](../../../globals/Symbol/toPrimitive.mdx) method, that method always takes priority over `toString()` when a `Symbol` object is [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). However, because `Symbol.prototype[Symbol.toPrimitive]()` returns a symbol primitive, and symbol primitives throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when implicitly converted to a string, the `toString()` method is never implicitly called by the language. To stringify a symbol, you must explicitly call its `toString()` method or use the [`String()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/String#using_string_to_stringify_a_symbol) function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Symbol/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a Symbol object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nThe primitive value of the specified `Symbol` object.\n\n## Description\n\nThe `valueOf()` method of `Symbol` returns the primitive value of a Symbol object as a Symbol data type.\n\nJavaScript calls the `valueOf()` method to convert an object to a primitive value. You rarely need to invoke the `valueOf()` method yourself; JavaScript automatically invokes it when encountering an object where a primitive value is expected.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Symbol/replace.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.replace\n\nThe **`Symbol.replace`** well-known symbol specifies the method that replaces matched substrings of a string. This function is called by the [`String.prototype.replace()`](../../globals/String/prototype/replace.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.replace]()` and [`String.prototype.replace()`](../../globals/String/prototype/replace.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.replace`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Symbol/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.search\n\nThe **`Symbol.search`** well-known symbol specifies the method that returns the index within a string that matches the regular expression. This function is called by the [`String.prototype.search()`](../../globals/String/prototype/search.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.search]()` and [`String.prototype.search()`](../../globals/String/prototype/search.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.search`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Symbol/species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.species\n\nThe well-known symbol **`Symbol.species`** specifies a function-valued property that the constructor function uses to create derived objects.\n\n> **Warning:** The existence of `Symbol.species` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Value\n\nThe well-known symbol `Symbol.species`.\n\n## Description\n\nThe `Symbol.species` accessor property allows subclasses to override the default constructor for objects. This specifies a protocol about how instances should be copied. For example, when you use copying methods of arrays, such as [`Array.prototype.map()`](../../globals/Array/prototype/map.mdx). the `map()` method uses `instance.constructor[Symbol.species]` to get the constructor for constructing the new array.\n\nAll built-in implementations of `Symbol.species` return the `this` value, which is the current instance's constructor. This allows copying methods to create instances of derived classes rather than the base class — for example, `map()` will return an array of the same type as the original array.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Symbol/split.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.split\n\nThe **`Symbol.split`** well-known symbol specifies the method that splits a string at the indices that match a regular expression. This function is called by the [`String.prototype.split()`](../../globals/String/prototype/split.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.split]()` and [`String.prototype.split()`](../../globals/String/prototype/split.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.split`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Symbol/toPrimitive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.toPrimitive\n\nThe **`Symbol.toPrimitive`** well-known symbol specifies a method that accepts a preferred type and returns a primitive representation of an object. It is called in priority by all [type coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) algorithms.\n\n## Value\n\nThe well-known symbol `Symbol.toPrimitive`.\n\n## Description\n\nWith the help of the `Symbol.toPrimitive` property (used as a function value), an object can be converted to a primitive value. The function is called with a string argument `hint`, which specifies the preferred type of the result primitive value. The `hint` argument can be one of `\"number\"`, `\"string\"`, and `\"default\"`.\n\nThe `\"number\"` hint is used by [numeric coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#numeric_coercion) algorithms. The `\"string\"` hint is used by the [string coercion](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) algorithm. The `\"default\"` hint is used by the [primitive coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion) algorithm. The `hint` only acts as a weak signal of preference, and the implementation is free to ignore it (as [`Symbol.prototype[Symbol.toPrimitive]()`](../../globals/Symbol/prototype/@@toPrimitive.mdx) does). The language does not enforce alignment between the `hint` and the result type, although `[Symbol.toPrimitive]()` must return a primitive, or a [`TypeError`](../../globals/TypeError/TypeError.mdx) is thrown.\n\nObjects without the `Symbol.toPrimitive` property are converted to primitives by calling the `valueOf()` and `toString()` methods in different orders, which is explained in more detail in the [type coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) section. `Symbol.toPrimitive` allows full control over the primitive conversion process. For example, `Symbol.prototype.toString()` won't be called, and `Symbol` objects must always be explicitly converted to strings through [`String()`](../../globals/String/String.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Symbol/toStringTag.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.toStringTag\n\nThe **`Symbol.toStringTag`** well-known symbol is a string valued property that is used in the creation of the default string description of an object. It is accessed internally by the [`Object.prototype.toString()`](../../globals/Object/prototype/toString.mdx) method.\n\n## Value\n\nThe well-known symbol `Symbol.toStringTag`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Symbol/unscopables.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.unscopables\n\nThe **`Symbol.unscopables`** well-known symbol is used to specify an object value of whose own and inherited property names are excluded from the [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) environment bindings of the associated object.\n\n## Value\n\nThe well-known symbol `@@unscopables`.\n\n## Description\n\nThe `@@unscopables` symbol (accessed via `Symbol.unscopables`) can be defined on any object to exclude property names from being exposed as lexical variables in [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) environment bindings. Note that when using [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), `with` statements are not available, and this symbol is likely not needed.\n\nSetting a property of the `@@unscopables` object to `true` (or any [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value) will make the corresponding property of the `with` scope object _unscopable_ and therefore won't be introduced to the `with` body scope. Setting a property to `false` (or any [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value) will make it _scopable_ and thus appear as lexical scope variables.\n\nWhen deciding whether `x` is unscopable, the entire prototype chain of the `@@unscopables` property is looked up for a property called `x`. This means if you declared `@@unscopables` as a plain object, `Object.prototype` properties like [`toString`](../../globals/Object/prototype/toString.mdx) would become unscopable as well, which may cause backward incompatibility for legacy code assuming those properties are normally scoped (see [an example here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/unscopables#avoid_using_a_non-null-prototype_object_as_symbol.unscopables)). You are advised to make your custom `@@unscopables` property have `null` as its prototype, like [`Array.prototype[Symbol.unscopables]`](../../globals/Array/prototype/@@unscopables.mdx) does.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/SyntaxError/SyntaxError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SyntaxError\n\nThe **`SyntaxError`** constructor creates a new error object\nthat represents an error when trying to interpret syntactically invalid code.\n\n## Syntax\n\n```js\nnew SyntaxError()\nnew SyntaxError(message)\nnew SyntaxError(message, options)\nnew SyntaxError(message, fileName)\nnew SyntaxError(message, fileName, lineNumber)\n\nSyntaxError()\nSyntaxError(message)\nSyntaxError(message, options)\nSyntaxError(message, fileName)\nSyntaxError(message, fileName, lineNumber)\n```\n\n> **Note:** `SyntaxError()` can be called with or without `new`. Both create a new `SyntaxError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/TextDecoder/TextDecoder.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder()\n\nThe **`TextDecoder()`** constructor returns a newly created `TextDecoder` object for the encoding specified in parameter.\n\n## Syntax\n\n```js\nnew TextDecoder()\nnew TextDecoder(label)\nnew TextDecoder(label, options)\n```\n\n### Parameters\n\n- `label` _**optional**_\n  - : A string, defaulting to `\"utf-8\"`.\n- `options` _**optional**_\n\n  - : An object with the property:\n\n    - `fatal`\n      - : A boolean value indicating if the `TextDecoder.decode()` method must throw a `TypeError` when decoding invalid data.\n        It defaults to `false`, which means that the decoder will substitute malformed data with a replacement character.\n\n    - `ignoreBOM`\n      - : A boolean value indicating whether the [byte order mark](https://www.w3.org/International/questions/qa-byte-order-mark) is ignored.\n        It defaults to `false`.\n\n### Exceptions\n\n- `RangeError`\n  - : Thrown if the value of `label` is unknown, or is one of the values leading to a `'replacement'` decoding algorithm (`\"iso-2022-cn\"` or `\"iso-2022-cn-ext\"`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/TextDecoder/prototype/decode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.decode()\n\nThe **`TextDecoder.decode()`** method returns a string containing text decoded from the buffer passed as a parameter.\n\nThe decoding method is defined in the current `TextDecoder` object.\nThis includes the expected encoding of the data, and how decoding errors are handled.\n\n## Syntax\n\n```js\ndecode()\ndecode(buffer)\ndecode(buffer, options)\n```\n\n### Parameters\n\n- `buffer` _**optional**_\n  - : Is an `ArrayBuffer`, a `TypedArray` or a `DataView` object containing the encoded text to decode.\n- `options` _**optional**_\n\n  - : An object with the property:\n\n    - `stream`\n      - : A boolean flag indicating that additional data will follow in subsequent calls to `decode()`.\n        Set to `true` if processing the data in chunks, and `false` for the final chunk or if the data is not chunked.\n        It defaults to `false`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if there is a decoding error when the property `TextDecoder.fatal` is `true`.\n\n### Return value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/TextDecoder/prototype/encoding.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.encoding\n\nThe **`TextDecoder.encoding`** read-only property returns a string containing the name of the decoding algorithm used by the specific decoder object.\n\nThe encoding is set by the constructor `label` parameter, and defaults to `utf-8`.\n\n## Value\n\nA lower-cased ASCII string, which can be one of the following values:\n\n- The recommended encoding for the Web: `'utf-8'`.\n- The legacy single-byte encodings:\n  ['ibm866'](https://en.wikipedia.org/wiki/Code_page_866),\n  ['iso-8859-2'](https://en.wikipedia.org/wiki/ISO/IEC_8859-2),\n  ['iso-8859-3'](https://en.wikipedia.org/wiki/ISO/IEC_8859-3),\n  ['iso-8859-4'](https://en.wikipedia.org/wiki/ISO/IEC_8859-4),\n  ['iso-8859-5'](https://en.wikipedia.org/wiki/ISO/IEC_8859-5),\n  ['iso-8859-6'](https://en.wikipedia.org/wiki/ISO/IEC_8859-6),\n  ['iso-8859-7'](https://en.wikipedia.org/wiki/ISO/IEC_8859-7),\n  ['iso-8859-8'](https://en.wikipedia.org/wiki/ISO/IEC_8859-8)'`,\n  ['iso-8859-8i'](https://en.wikipedia.org/wiki/ISO-8859-8-I),\n  ['iso-8859-10'](https://en.wikipedia.org/wiki/ISO/IEC_8859-10),\n  ['iso-8859-13'](https://en.wikipedia.org/wiki/ISO/IEC_8859-13),\n  ['iso-8859-14'](https://en.wikipedia.org/wiki/ISO/IEC_8859-14),\n  ['iso-8859-15'](https://en.wikipedia.org/wiki/ISO/IEC_8859-15),\n  ['iso-8859-16'](https://en.wikipedia.org/wiki/ISO/IEC_8859-16),\n  ['koi8-r'](https://en.wikipedia.org/wiki/KOI8-R),\n  ['koi8-u'](https://en.wikipedia.org/wiki/KOI8-U),\n  ['macintosh'](https://en.wikipedia.org/wiki/Mac_OS_Roman),\n  ['windows-874'](https://en.wikipedia.org/wiki/Windows-874),\n  ['windows-1250'](https://en.wikipedia.org/wiki/Windows-1250),\n  ['windows-1251'](https://en.wikipedia.org/wiki/Windows-1251),\n  ['windows-1252'](https://en.wikipedia.org/wiki/Windows-1252),\n  ['windows-1253'](https://en.wikipedia.org/wiki/Windows-1253),\n  ['windows-1254'](https://en.wikipedia.org/wiki/Windows-1254),\n  ['windows-1255'](https://en.wikipedia.org/wiki/Windows-1255),\n  ['windows-1256'](https://en.wikipedia.org/wiki/Windows-1256),\n  ['windows-1257'](https://en.wikipedia.org/wiki/Windows-1257),\n  ['windows-1258'](https://en.wikipedia.org/wiki/Windows-1258), or\n  ['x-mac-cyrillic'](https://en.wikipedia.org/wiki/Macintosh_Cyrillic_encoding).\n- The legacy multi-byte Chinese (simplified) encodings:\n  ['gbk'](https://en.wikipedia.org/wiki/GBK),\n  ['gb18030'](https://en.wikipedia.org/wiki/GB_18030)\n- The legacy multi-byte Chinese (traditional) encoding:\n  ['big5'](https://en.wikipedia.org/wiki/Big5).\n- The legacy multi-byte Japanese encodings:\n  ['euc-jp'](https://en.wikipedia.org/wiki/Extended_Unix_Code#EUC-JP),\n  ['iso-2022-jp'](https://en.wikipedia.org/wiki/ISO/IEC_2022#ISO-2022-JP),\n  ['shift-jis'](https://en.wikipedia.org/wiki/Shift_JIS).\n- The legacy multi-byte Korean encodings:\n  ['euc-kr'](https://en.wikipedia.org/wiki/Extended_Unix_Code#EUC-KR)\n- The legacy miscellaneous encodings:\n  ['utf-16be'](https://en.wikipedia.org/wiki/UTF-16#Byte_order_encoding_schemes),\n  ['utf-16le'](https://en.wikipedia.org/wiki/UTF-16#Byte_order_encoding_schemes),\n  `'x-user-defined'`.\n- A special encoding, `'replacement'`.\n  This decodes empty input into empty output and any other arbitrary-length input into a single replacement character.\n  It is used to prevent attacks that mismatch encodings between the client and server.\n  The following encodings also map to the replacement encoding: `ISO-2022-CN`, `ISO-2022-CN-ext`, ['iso-2022-kr'](https://en.wikipedia.org/wiki/ISO/IEC_2022#ISO-2022-KR) and ['hz-gb-2312'](https://en.wikipedia.org/wiki/HZ_(character_encoding)).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/TextDecoder/prototype/fatal.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.fatal\n\nThe **`fatal`** read-only property of the `TextDecoder` interface is a `Boolean` indicating whether the error mode is fatal.\n\nIf the property is `true` then a decoder will throw a `TypeError` if it encounters malformed data while decoding.\nIf `false` the decoder will substitute the invalid data with the replacement character `U+FFFD` (�).\nThe value of the property is set in the `TextDecoder()` constructor.\n\n## Value\n\nA `boolean` which will return `true` if the error mode is set to `fatal`.\nOtherwise it returns `false`, indicating that the error mode is \"replacement\".\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/TextDecoder/prototype/ignoreBOM.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.ignoreBOM\n\nThe **`ignoreBOM`** read-only property of the `TextDecoder` interface is a `Boolean` indicating whether the [byte order mark](https://www.w3.org/International/questions/qa-byte-order-mark) is ignored.\n\n## Value\n\n`true` if the byte order mark is ignored; `false` otherwise.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/TextEncoder/TextEncoder.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextEncoder()\n\nThe **`TextEncoder()`** constructor returns a newly created `TextEncoder` object that will generate a byte stream with UTF-8 encoding.\n\n## Syntax\n\n```js\nnew TextEncoder()\n```\n\n### Parameters\n\nNone.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/TextEncoder/prototype/encode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextEncoder.encode()\n\nThe **`TextEncoder.encode()`** method takes a string as input, and returns a `Uint8Array` containing the text given in parameters encoded with the specific method for that `TextEncoder` object.\n\n## Syntax\n\n```js\nencode(string)\n```\n\n### Parameters\n\n- `string`\n  - : A string containing the text to encode.\n\n### Return value\n\nA `Uint8Array` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/TextEncoder/prototype/encoding.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextEncoder.encoding\n\nThe **`TextEncoder.encoding`** read-only property returns a string containing the name of the encoding algorithm used by the specific encoder.\n\nIt can only have the following value `utf-8`.\n\n## Value\n\nA string with the value `utf-8`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/TransformStream/TransformStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStream()\n\nThe **`TransformStream()`** constructor creates a new `TransformStream` object which represents a pair of streams: a `WritableStream` representing the writable side, and a `ReadableStream` representing the readable side.\n\n## Syntax\n\n```js\nnew TransformStream()\nnew TransformStream(transformer)\nnew TransformStream(transformer, writableStrategy)\nnew TransformStream(transformer, writableStrategy, readableStrategy)\n```\n\n### Parameters\n\n- `transformer` _**optional**_\n\n  - : An object representing the `transformer`. If not supplied the resulting stream will be an **identity transform stream** which forwards all chunks written to its writable side to its readable side, without any changes.\n\n    The transformer object can contain any of the following methods. In each method `controller` is an instance of `TransformStreamDefaultController`.\n\n    - `start(controller)`\n      - : Called when the `TransformStream` is constructed. It is typically used to enqueue chunks using `TransformStreamDefaultController.enqueue()`.\n    - `transform(chunk, controller)`\n      - : Called when a chunk written to the writable side is ready to be transformed, and performs the work of the transformation stream. If no `transform()` method is supplied, the identity transform is used, and the chunk will be enqueued with no changes.\n    - `flush(controller)`\n      - : Called after all chunks written to the writable side have been successfully transformed, and the writable side is about to be closed.\n\n- `writableStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer. This defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk`. This indicates the size to\n        use for each chunk, in bytes.\n\n- `readableStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer. This defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk`. This indicates the size to\n        use for each chunk, in bytes.\n\n> **Note:** You could define your own custom\n> `readableStrategy` or `writableStrategy`, or use an instance of\n> `ByteLengthQueuingStrategy` or `CountQueuingStrategy`\n> for the object values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/TransformStream/prototype/readable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStream.readable\n\nThe **`readable`** read-only property of the `TransformStream` interface returns the `ReadableStream` instance controlled by this `TransformStream`.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/TransformStream/prototype/writable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStream.writable\n\nThe **`writable`** read-only property of the `TransformStream` interface returns the `WritableStream` instance controlled by this `TransformStream`.\n\n## Value\n\nA `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/TransformStreamDefaultController/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.desiredSize\n\nThe **`desiredSize`** read-only property of the `TransformStreamDefaultController` interface returns the desired size to fill the queue of the associated [`ReadableStream`](../../../globals/ReadableStream/ReadableStream.mdx).\n\nThe internal queue of a `ReadableStream` contains chunks that have been enqueued, but not yet read.\n\nIf the `desiredSize` is `0` then the queue is full. Therefore you can use this information to manually apply backpressure to manage the queue.\n\n## Value\n\nThe desired size.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/TransformStreamDefaultController/prototype/enqueue.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.enqueue()\n\nThe **`enqueue()`** method of the `TransformStreamDefaultController` interface enqueues the given chunk in the readable side of the stream.\n\n## Syntax\n\n```js\nenqueue(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : The chunk being queued. A chunk is a single piece of data. It can be any type of data, and a stream can contain chunks of different types.\n\n### Return value\n\nNone `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream is not readable.\n    This might occur if the stream is errored via `controller.error()`, or when it is closed without its controller's `controller.close()` method ever being called.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/TransformStreamDefaultController/prototype/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.error()\n\nThe **`error()`** method of the `TransformStreamDefaultController` interface errors both sides of the stream. Any further interactions with it will fail with the given error message, and any chunks in the queue will be discarded.\n\n## Syntax\n\n```js\nerror(reason)\n```\n\n### Parameters\n\n- `reason`\n  - : A string containing the error message to be returned on any further interaction with the stream.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/TransformStreamDefaultController/prototype/terminate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.terminate()\n\nThe **`terminate()`** method of the `TransformStreamDefaultController` interface closes the readable side and errors the writable side of the stream.\n\n## Syntax\n\n```js\nterminate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone (`undefined`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/TypeError/TypeError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TypeError\n\nThe **`TypeError()`** constructor creates a new error when an\noperation could not be performed, typically (but not exclusively) when a value is not of\nthe expected type.\n\n## Syntax\n\n```js\nnew TypeError()\nnew TypeError(message)\nnew TypeError(message, options)\nnew TypeError(message, fileName)\nnew TypeError(message, fileName, lineNumber)\n\nTypeError()\nTypeError(message)\nTypeError(message, options)\nTypeError(message, fileName)\nTypeError(message, fileName, lineNumber)\n```\n\n> **Note:** `TypeError()` can be called with or without `new`. Both create a new `TypeError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/URIError/URIError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URIError\n\nThe **`URIError()`** constructor creates an error when a global\nURI handling function was used in a wrong way.\n\n## Syntax\n\n```js\nnew URIError()\nnew URIError(message)\nnew URIError(message, options)\nnew URIError(message, fileName)\nnew URIError(message, fileName, lineNumber)\n\nURIError()\nURIError(message)\nURIError(message, options)\nURIError(message, fileName)\nURIError(message, fileName, lineNumber)\n```\n\n> **Note:** `URIError()` can be called with or without `new`. Both create a new `URIError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/URL/URL.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL()\n\nThe **`URL()`** constructor returns a newly created\n`URL` object representing the URL defined by the parameters.\n\nIf the given base URL or the resulting URL are not valid URLs, the JavaScript\n`TypeError` exception is thrown.\n\n## Syntax\n\n```js\nnew URL(url)\nnew URL(url, base)\n```\n\n### Parameters\n\n- `url`\n  - : A string or any other object with a `toString()` method.\n    If `url` is a relative URL, `base` is\n    required, and will be used as the base URL. If `url` is an\n    absolute URL, a given `base` will be ignored.\n- `base` _**optional**_\n  - : A string representing the base URL to use in cases where\n    `url` is a relative URL. If not specified, it defaults to\n    `undefined`.\n\n> **Note:** The `url` and `base` arguments will\n> each be stringified from whatever value you pass, just like with other Web APIs\n> that accept a string. In particular, you can use an existing\n> `URL` object for either argument, and it will stringify to the\n> object's `URL.href\", \"href` property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/URL/prototype/hash.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.hash\n\nThe **`hash`** property of the\n`URL` interface is a string containing a\n`'#'` followed by the fragment identifier of the URL.\n\nThe fragment is not percent-decoded. If the URL does not\nhave a fragment identifier, this property contains an empty string — `\"\"`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/URL/prototype/host.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.host\n\nThe **`host`** property of the `URL` interface is\na string containing the host, that is the `URL.hostname`, and then, if the `port` of the URL is nonempty, a\n`':'`, followed by the `port` of the URL.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/URL/prototype/hostname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.hostname\n\nThe **`hostname`** property of the `URL` interface\nis a string containing the domain name of the URL.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/URL/prototype/href.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.href\n\nThe **`href`** property of the `URL` interface is\na string containing the whole URL.\n\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/URL/prototype/origin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.origin\n\nThe **`origin`** read-only property of\nthe `URL` interface returns a string containing the\nUnicode serialization of the origin of the represented URL.\n\nThe exact structure\nvaries depending on the type of URL:\n\n- For `http` or `https` URLs, the scheme followed by\n  `'://'`, followed by the domain, followed by `':'`, followed by\n  the port (the default port, `80` and `443` respectively, if\n  explicitly specified).\n- For `file:` URLs, the value is browser dependent.\n- for `blob:` URLs, the origin of the URL following `blob:` will\n  be used. For example, `\"blob:https://mozilla.org\"` will be returned as\n  `\"https://mozilla.org\".`\n\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/URL/prototype/password.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.password\n\nThe **`password`** property of the `URL` interface\nis a string containing the password specified before the domain name.\n\nIf it is set without first setting the `URL.username` property, it silently fails.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/URL/prototype/pathname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.pathname\n\nThe **`pathname`** property of the `URL` interface represents a location in a hierarchical structure. It is a string constructed from a list of path segments, each of which is prefixed by a `/` character. If the URL has no path segments, the value of its `pathname` property will be the empty string.\n\nURLs such as `https` and `http` URLs that have [hierarchical schemes](https://www.rfc-editor.org/rfc/rfc3986#section-1.2.3) (which the URL standard calls \"[special schemes](https://url.spec.whatwg.org/#special-scheme)\") always have at least one (invisible) path segment: the empty string. Thus the `pathname` value for such \"special scheme\" URLs can never be the empty string, but will instead always have a least one `/` character.\n\nFor example, the URL `https://developer.mozilla.org` has just one path segment: the empty string, so its `pathname` value is constructed by prefixing a `/` character to the empty string.\n\nSome systems define the term _slug_ to mean the final segment of a non-empty path if it identifies a page in human-readable keywords. For example, the URL `https://example.org/articles/this-that-other-outre-collection` has `this-that-other-outre-collection` as its slug.\n\nSome systems use the `;` and `=` characters to delimit parameters and parameter values applicable to a path segment. For example, with the URL `https://example.org/users;id=42/tasks;state=open?sort=modified`, a system might extract and use the path segment parameters `id=42` and `state=open` from the path segments `users;id=42` and `tasks;state=open`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/URL/prototype/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.port\n\nThe **`port`** property of the `URL` interface is\na string containing the port number of the URL.\n\n> **Note:** If an input string passed to the `URL()` constructor doesn't contain an explicit port number (e.g., `https://localhost`) or contains a port number that's the default port number corresponding to the protocol part of the input string (e.g., `https://localhost:443`), then in the `URL` object the constructor returns, the value of the port property will be the empty string: `''`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/URL/prototype/protocol.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.protocol\n\nThe **`protocol`** property of the `URL` interface\nis a string representing the protocol scheme of the URL, including the\nfinal `':'`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/URL/prototype/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.search\n\nThe **`search`** property of the `URL` interface\nis a search string, also called a _query string_, that is a\nstring containing a `'?'` followed by the parameters of the\nURL.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/URL/prototype/searchParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.searchParams\n\nThe **`searchParams`** readonly property of the\n`URL` interface returns a `URLSearchParams` object allowing\naccess to the `GET` decoded query arguments contained in the URL.\n\n## Value\n\nA `URLSearchParams` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/URL/prototype/toJSON.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.toJSON()\n\nThe **`toJSON()`** method of the `URL` interface\nreturns a string containing a serialized version of the URL,\nalthough in practice it seems to have the same effect as\n`URL.toString()`.\n\n## Syntax\n\n```js\ntoJSON()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/URL/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.toString()\n\nThe **`URL.toString()`** method returns a\nstring containing the whole URL. It is effectively a read-only version\nof `URL.prototype.href`.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/URL/prototype/username.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.username\n\nThe **`username`** property of the `URL` interface\nis a string containing the username specified before the domain name.\n\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/URLSearchParams/URLSearchParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams()\n\nThe **`URLSearchParams()`** constructor creates and returns a\nnew `URLSearchParams` object.\n\n\n\n## Syntax\n\n```js\nnew URLSearchParams()\nnew URLSearchParams(options)\n```\n\n### Parameters\n\n- `options` _**optional**_\n  - : One of:\n    - A string, which will be parsed from `application/x-www-form-urlencoded` format. A leading `'?'` character is ignored.\n    - A literal sequence of name-value string pairs, or any object with an iterator that produces a sequence of string pairs.\n    - A record of string keys and string values. Note that nesting is not supported.\n\n### Return value\n\nA `URLSearchParams` object instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/URLSearchParams/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.append()\n\nThe **`append()`** method of the `URLSearchParams`\ninterface appends a specified key/value pair as a new search parameter.\n\nAs shown in the example below, if the same key is appended multiple times it will\nappear in the parameter string multiple times for each value.\n\n## Syntax\n\n```js\nappend(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to append.\n- `value`\n  - : The value of the parameter to append.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/URLSearchParams/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.delete()\n\nThe **`delete()`** method of the `URLSearchParams`\ninterface deletes the given search parameter and all its associated values, from the\nlist of all search parameters.\n\n## Syntax\n\n```js\ndelete(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to be deleted.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/URLSearchParams/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.entries()\n\nThe **`entries()`** method of the\n`URLSearchParams` interface returns an\niterator allowing iteration through all key/value\npairs contained in this object. The iterator returns key/value pairs in the same order as they appear in the query string. The key and value of each pair are\nstring objects.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/URLSearchParams/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.forEach()\n\nThe **`forEach()`** method of the\n`URLSearchParams` interface allows iteration through all values contained\nin this object via a callback function.\n\n## Syntax\n\n```js\nforEach(callback)\nforEach(callback, thisArg)\n```\n\n### Parameters\n\n- `callback`\n\n  - : Function to execute on each element, which is passed the following arguments:\n\n    - `value`\n      - : The value of the current entry being processed in the `URLSearchParams` object.\n    - `key`\n      - : The key of the current entry being processed in the `URLSearchParams` object.\n    - `searchParams`\n      - : The `URLSearchParams` object the `forEach()` was called upon.\n\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `callback`.\n\n### Return value\n\nNone `undefined`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/URLSearchParams/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.get()\n\nThe **`get()`** method of the `URLSearchParams`\ninterface returns the first value associated to the given search parameter.\n\n## Syntax\n\n```js\nget(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to return.\n\n### Return value\n\nA string if the given search parameter is found; otherwise,\n**`null`**.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/URLSearchParams/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.has()\n\nThe **`has()`** method of the `URLSearchParams`\ninterface returns a boolean value that indicates whether a parameter with the\nspecified name exists.\n\n## Syntax\n\n```js\nhas(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to find.\n\n### Return value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/URLSearchParams/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.keys()\n\nThe **`keys()`** method of the `URLSearchParams`\ninterface returns an iterator allowing iteration\nthrough all keys contained in this object. The keys are string\nobjects.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/URLSearchParams/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.set()\n\nThe **`set()`** method of the `URLSearchParams`\ninterface sets the value associated with a given search parameter to the given value.\nIf there were several matching values, this method deletes the others. If the search\nparameter doesn't exist, this method creates it.\n\n## Syntax\n\n```js\nset(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to set.\n- `value`\n  - : The value of the parameter to set.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/URLSearchParams/prototype/sort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.sort()\n\nThe **`URLSearchParams.sort()`** method sorts all key/value\npairs contained in this object in place and returns `undefined`. The sort\norder is according to unicode code points of the keys. This method uses a stable sorting\nalgorithm (i.e. the relative order between key/value pairs with equal keys will be\npreserved).\n\n## Syntax\n\n```js\nsort()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/URLSearchParams/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.toString()\n\nThe **`toString()`** method of the\n`URLSearchParams` interface returns a query string suitable for use in a\nURL.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string, without the question mark. (Returns an empty string if no\nsearch parameters have been set.)\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/URLSearchParams/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.values()\n\nThe **`values()`** method of the `URLSearchParams`\ninterface returns an iterator allowing iteration\nthrough all values contained in this object. The values are string\nobjects.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Uint16Array/Uint16Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint16Array\n\nThe **`Uint16Array()`** typed array constructor creates an\narray of 16-bit unsigned integers in the platform byte order.\n\n## Syntax\n\n```js\nnew Uint16Array()\nnew Uint16Array(length)\nnew Uint16Array(typedArray)\nnew Uint16Array(object)\n\nnew Uint16Array(buffer)\nnew Uint16Array(buffer, byteOffset)\nnew Uint16Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint16Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Uint32Array/Uint32Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint32Array\n\nThe **`Uint32Array()`** typed array constructor creates an\narray of 32-bit unsigned integers in the platform byte order. If control over byte order\nis needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are initialized to\n`0`. Once established, you can reference elements in the array using the\nobject's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Uint32Array()\nnew Uint32Array(length)\nnew Uint32Array(typedArray)\nnew Uint32Array(object)\n\nnew Uint32Array(buffer)\nnew Uint32Array(buffer, byteOffset)\nnew Uint32Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint32Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Uint8Array/Uint8Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint8Array\n\nThe **`Uint8Array()`** constructor creates a typed array of\n8-bit unsigned integers. The contents are initialized to `0`. Once\nestablished, you can reference elements in the array using the object's methods, or\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew Uint8Array()\nnew Uint8Array(length)\nnew Uint8Array(typedArray)\nnew Uint8Array(object)\n\nnew Uint8Array(buffer)\nnew Uint8Array(buffer, byteOffset)\nnew Uint8Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint8Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/Uint8ClampedArray/Uint8ClampedArray.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint8ClampedArray\n\nThe **`Uint8ClampedArray()`** constructor creates a typed array\nof 8-bit unsigned integers clamped to 0-255; if you specified a value that is out of the\nrange of \\[0,255], 0 or 255 will be set instead; if you specify a non-integer, the\nnearest integer will be set. The contents are initialized to `0`. Once\nestablished, you can reference elements in the array using the object's methods, or\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew Uint8ClampedArray()\nnew Uint8ClampedArray(length)\nnew Uint8ClampedArray(typedArray)\nnew Uint8ClampedArray(object)\n\nnew Uint8ClampedArray(buffer)\nnew Uint8ClampedArray(buffer, byteOffset)\nnew Uint8ClampedArray(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint8ClampedArray()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/WeakMap/WeakMap.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap\n\nThe **`WeakMap()` constructor** creates a `WeakMap` object, optionally based on a provided `Array` or other iterable object.\n\n## Syntax\n\n```js\nnew WeakMap()\nnew WeakMap(iterable)\n```\n\n> **Note:** `WeakMap()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable`\n  - : An `Array` or other object that implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol)  that returns an iterator object that produces a two-element array-like object whose first element is a value that will be used as a `WeakMap` key and whose second element is the value to associate with that key. Each key-value pair will be added to the new `WeakMap`. null is treated as undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/WeakMap/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.delete()\n\nThe **`delete()`** method removes the specified element from a\n`WeakMap` object.\n\n## Syntax\n\n```js\ndelete(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to remove from the `WeakMap` object.\n\n### Return value\n\n`true` if an element in the `WeakMap` object has been removed\nsuccessfully. `false` if the key is not found in the `WeakMap` or\nif the key is not an object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/WeakMap/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.get()\n\nThe **`get()`** method returns a specified element from a\n`WeakMap` object.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key`\n  - : Required. The key of the element to return from the `WeakMap` object.\n\n### Return value\n\nThe element associated with the specified key in the `WeakMap` object. If\nthe key can't be found, [`undefined`](../../../globals/undefined.mdx) is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/WeakMap/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.has()\n\nThe **`has()`** method returns a boolean indicating whether an\nelement with the specified key exists in the `WeakMap` object or not.\n\n## Syntax\n\n```js\nhas(key)\n```\n\n### Parameters\n\n- `key`\n  - : Required. The key of the element to test for presence in the `WeakMap`\n    object.\n\n### Return value\n\n- Boolean\n  - : Returns `true` if an element with the specified key exists in the\n    `WeakMap` object; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/WeakMap/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.set\n\nThe **`set()`** method adds a new element with a specified key\nand value to a `WeakMap` object.\n\n## Syntax\n\n```js\nset(key, value)\n```\n\n### Parameters\n\n- `key`\n  - : Required. Must be `object`. The key of the element to add to the\n    `WeakMap` object.\n- `value`\n  - : Required. Any value. The value of the element to add to the `WeakMap`\n    object.\n\n### Return value\n\nThe `WeakMap` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/WeakRef/WeakRef.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakRef\n\nThe **`WeakRef`** constructor creates a `WeakRef`\nobject referring to a given target object.\n\n## Syntax\n\n```js\nnew WeakRef(targetObject)\n```\n\n> **Note:** `WeakRef()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `targetObject`\n  - : The target object the WeakRef should refer to (also called the _referent_).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/WeakRef/prototype/deref.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakRef.prototype.deref()\n\nThe `deref` method returns the `WeakRef` instance's target\nobject, or `undefined` if the target object has been garbage-collected.\n\n## Syntax\n\n```js\nderef()\n```\n\n### Return value\n\nThe target object of the WeakRef, or `undefined` if the object has been\ngarbage-collected.\n\n## Description\n\nSee the [Notes on WeakRefs](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WeakRef#notes_on_weakrefs) section of the `WeakRef` page for some important notes.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/WeakSet/WeakSet.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet\n\nThe **`WeakSet`** constructor lets you create\n`WeakSet` objects that store weakly held _objects_ in a collection.\n\n## Syntax\n\n```js\nnew WeakSet()\nnew WeakSet(iterable)\n```\n\n> **Note:** `WeakSet()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable` _**optional**_\n  - : If an [iterable object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) is passed, all of its elements will be added to the new\n    `WeakSet`. null is treated as undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/WeakSet/prototype/add.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet.prototype.add\n\nThe **`add()`** method appends a new object to the end of a\n`WeakSet` object.\n\n## Syntax\n\n```js\nadd(value)\n```\n\n### Parameters\n\n- value\n  - : Required. The object to add to the `WeakSet` collection.\n\n### Return value\n\nThe `WeakSet` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/WeakSet/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet.prototype.delete\n\nThe **`delete()`** method removes the specified element from a\n`WeakSet` object.\n\n## Syntax\n\n```js\ndelete(value)\n```\n\n### Parameters\n\n- `value`\n  - : Required. The object remove from the `WeakSet` object.\n\n### Return value\n\n`true` if an element in the `WeakSet` object has been removed\nsuccessfully. `false` if the `value` is not found in\nthe `WeakSet` or if the `value` is not an object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/WeakSet/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet.prototype.has\n\nThe **`has()`** method returns a boolean indicating whether an\nobject exists in a `WeakSet` or not.\n\n## Syntax\n\n```js\nhas(value)\n```\n\n### Parameters\n\n- `value`\n  - : Required. The object to test for presence in the `WeakSet`.\n\n### Return value\n\n- Boolean\n  - : Returns `true` if an element with the specified value exists in the\n    `WeakSet` object; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/WorkerLocation/WorkerLocation.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# WorkerLocation\n\nThe **`WorkerLocation`** interface defines the absolute location of the script executed by the Worker. Such an object is initialized for each worker and is available via the [`location`](../../globals/location.mdx) property obtained by calling `globalThis.location`.\n\n## Instance properties\n\n- [`WorkerLocation.href`](../../globals/WorkerLocation/href.mdx) _**read-only**_\n  - : Returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location.\n- [`WorkerLocation.protocol`](../../globals/WorkerLocation/protocol.mdx) _**read-only**_\n  - : Returns the [`protocol`](../../globals/URL/prototype/protocol.mdx) part of the worker's location.\n- [`WorkerLocation.host`](../../globals/WorkerLocation/host.mdx) _**read-only**_\n  - : Returns the [`host`](../../globals/URL/prototype/host.mdx) part of the worker's location.\n- [`WorkerLocation.hostname`](../../globals/WorkerLocation/hostname.mdx) _**read-only**_\n  - : Returns the [`hostname`](../../globals/URL/prototype/hostname.mdx) part of the worker's location.\n- [`WorkerLocation.origin`](../../globals/WorkerLocation/origin.mdx) _**read-only**_\n  - : Returns the worker's [`origin`](../../globals/URL/prototype/origin.mdx).\n- [`WorkerLocation.port`](../../globals/WorkerLocation/port.mdx) _**read-only**_\n  - : Returns the [`port`](../../globals/URL/prototype/port.mdx) part of the worker's location.\n- [`WorkerLocation.pathname`](../../globals/WorkerLocation/pathname.mdx) _**read-only**_\n  - : Returns the [`pathname`](../../globals/URL/prototype/pathname.mdx) part of the worker's location.\n- [`WorkerLocation.search`](../../globals/WorkerLocation/search.mdx) _**read-only**_\n  - : Returns the [`search`](../../globals/URL/prototype/search.mdx) part of the worker's location.\n- [`WorkerLocation.hash`](../../globals/WorkerLocation/hash.mdx) _**read-only**_\n  - : Returns the [`hash`](../../globals/URL/prototype/hash.mdx) part of the worker's location.\n\n## Instance methods\n\n- [`WorkerLocation.toString`](../../globals/WorkerLocation/toString.mdx)\n  - : Returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location. It is a synonym for [`WorkerLocation.href`](../../globals/WorkerLocation/href.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/WorkerLocation/hash.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.hash\n\nThe **`hash`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`hash`](../../globals/URL/prototype/hash.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/WorkerLocation/host.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.host\n\nThe **`host`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`host`](../../globals/URL/prototype/host.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/WorkerLocation/hostname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.hostname\n\nThe **`hostname`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`hostname`](../../globals/URL/prototype/hostname.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/WorkerLocation/href.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.href\n\nThe **`href`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/WorkerLocation/origin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.origin\n\nThe **`origin`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the worker's [`origin`](../../globals/URL/prototype/origin.mdx).\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/WorkerLocation/pathname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.pathname\n\nThe **`pathname`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`pathname`](../../globals/URL/prototype/pathname.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/WorkerLocation/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.port\n\nThe **`port`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`port`](../../globals/URL/prototype/port.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/WorkerLocation/protocol.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.protocol\n\nThe **`protocol`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`protocol`](../../globals/URL/prototype/protocol.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/WorkerLocation/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.search\n\nThe **`search`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`search`](../../globals/URL/prototype/search.mdx) part of the worker's location.\n\n## Value\n\nA string.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/WorkerLocation/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.toString()\n\nThe **`toString()`** method of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location. It is a synonym for [`WorkerLocation.href`](../../globals/WorkerLocation/href.mdx).\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone [`undefined`](../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/WritableStream/WritableStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream()\n\nThe **`WritableStream()`** constructor creates\na new `WritableStream` object instance.\n\n## Syntax\n\n```js\nnew WritableStream(underlyingSink)\nnew WritableStream(underlyingSink, queuingStrategy)\n```\n\n### Parameters\n\n- `underlyingSink` _**optional**_\n\n  - : An object containing methods and properties that define how the constructed stream\n    instance will behave. `underlyingSink` can contain the following:\n\n    - `start(controller)` _**optional**_\n      - : This is a method, called immediately when the object is constructed. The\n        contents of this method are defined by the developer, and should aim to get access\n        to the underlying sink. If this process is to be done asynchronously, it can\n        return a promise to signal success or failure. The `controller`\n        parameter passed to this method is a\n        `WritableStreamDefaultController`. This can be used by the developer\n        to control the stream during set up.\n    - `write(chunk, controller)` _**optional**_\n      - : This method, also defined by the developer, will be called when a new chunk of\n        data (specified in the `chunk` parameter) is ready to be written to the\n        underlying sink. It can return a promise to signal success or failure of the write\n        operation. The `controller` parameter passed to this method is a\n        `WritableStreamDefaultController` that can be used by the developer\n        to control the stream as more chunks are submitted for writing. This method will\n        be called only after previous writes have succeeded, and never after the stream is\n        closed or aborted (see below).\n    - `close(controller)` _**optional**_\n      - : This method, also defined by the developer, will be called if the app signals\n        that it has finished writing chunks to the stream. The contents should do whatever\n        is necessary to finalize writes to the underlying sink, and release access to it.\n        If this process is asynchronous, it can return a promise to signal success or\n        failure. This method will be called only after all queued-up writes have\n        succeeded. The `controller` parameter passed to this method is a\n        `WritableStreamDefaultController`, which can be used to control the\n        stream at the end of writing.\n    - `abort(reason)` _**optional**_\n      - : This method, also defined by the developer, will be called if the app signals\n        that it wishes to abruptly close the stream and put it in an errored state. It can\n        clean up any held resources, much like `close()`, but\n        `abort()` will be called even if writes are queued up — those chunks\n        will be thrown away. If this process is asynchronous, it can return a promise to\n        signal success or failure. The `reason` parameter contains a\n        string describing why the stream was aborted.\n\n- `queuingStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer — this defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk` — this indicates the size to use for each chunk, in bytes.\n\n    > **Note:** You could define your own custom\n    > `queuingStrategy`, or use an instance of\n    > `ByteLengthQueuingStrategy` or `CountQueuingStrategy`\n    > for this object value. If no `queuingStrategy` is supplied, the default\n    > used is the same as a `CountQueuingStrategy` with a high water mark of 1\\.\n\n### Return value\n\nAn instance of the `WritableStream` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/WritableStream/prototype/abort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream.abort()\n\nThe **`abort()`** method of the `WritableStream` interface aborts the stream, signaling that the producer can no longer successfully write to the stream and it is to be immediately moved to an error state, with any queued writes discarded.\n\n## Syntax\n\n```js\nabort(reason)\n```\n\n### Parameters\n\n- `reason`\n  - : A string providing a human-readable reason for the abort.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason` parameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to abort is not a `WritableStream`, or it is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/WritableStream/prototype/getWriter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream.getWriter()\n\nThe **`getWriter()`** method of the `WritableStream` interface returns a new instance of `WritableStreamDefaultWriter` and locks the stream to that instance.\nWhile the stream is locked, no other writer can be acquired until this one is released.\n\n## Syntax\n\n```js\ngetWriter()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `WritableStreamDefaultWriter` object instance.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to create a writer for is not a `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/WritableStream/prototype/locked.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream.locked\n\nThe **`locked`** read-only property of the `WritableStream` interface returns a boolean indicating whether the `WritableStream` is locked to a writer.\n\n## Value\n\nA boolean value indicating whether or not the writable stream is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/WritableStreamDefaultController/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultController.error()\n\nThe **`error()`** method of the\n`WritableStreamDefaultController` interface causes any future interactions\nwith the associated stream to error.\n\nThis method is rarely used, since usually it suffices to return a rejected promise from\none of the underlying sink's methods. However, it can be useful for suddenly shutting\ndown a stream in response to an event outside the normal lifecycle of interactions with\nthe underlying sink.\n\n## Syntax\n\n```js\nerror(message)\n```\n\n### Parameters\n\n- `message`\n  - : A string representing the error you want future interactions to\n    fail with.\n\n### Return value\n\nNone `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to error is not a `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/WritableStreamDefaultWriter/WritableStreamDefaultWriter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter()\n\nThe **`WritableStreamDefaultWriter()`**\nconstructor creates a new `WritableStreamDefaultWriter` object instance.\n\n## Syntax\n\n```js\nnew WritableStreamDefaultWriter(stream)\n```\n\n### Parameters\n\n- `stream`\n  - : The `WritableStream` to be written to.\n\n### Return value\n\nAn instance of the `WritableStreamDefaultWriter` object.\n\n### Exceptions\n\n- `TypeError`\n  - : The provided `stream` value is not a `WritableStream`, or it\n    is locked to another writer already.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/WritableStreamDefaultWriter/prototype/abort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.abort()\n\nThe **`abort()`** method of the\n`WritableStreamDefaultWriter` interface aborts the stream, signaling that\nthe producer can no longer successfully write to the stream and it is to be immediately\nmoved to an error state, with any queued writes discarded.\n\nIf the writer is active, the `abort()` method behaves the same as that for\nthe associated stream (`WritableStream.abort()`). If not, it returns a\nrejected promise.\n\n## Syntax\n\n```js\nabort()\nabort(reason)\n```\n\n### Parameters\n\n- `reason` _**optional**_\n  - : A string representing a human-readable reason for the abort.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason`\nparameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to abort is not a `WritableStream`, or it is\n    locked.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/WritableStreamDefaultWriter/prototype/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.close()\n\nThe **`close()`** method of the\n`WritableStreamDefaultWriter` interface closes the associated writable\nstream.\n\nThe underlying sink will finish processing any previously-written chunks, before\ninvoking the close behavior. During this time any further attempts to write will fail\n(without erroring the stream).\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise`, which fulfills with the `undefined` if all\nremaining chunks were successfully written before the close, or rejects with an error if\na problem was encountered during the process.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to close is not a `WritableStream`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/WritableStreamDefaultWriter/prototype/closed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.closed\n\nThe **`closed`** read-only property of the\n`WritableStreamDefaultWriter` interface returns a\n`Promise` that fulfills if the stream becomes closed, or rejects if\nthe stream errors or the writer's lock is released.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/WritableStreamDefaultWriter/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.desiredSize\n\nThe **`desiredSize`** read-only property of the\n`WritableStreamDefaultWriter` interface returns the desired size required\nto fill the stream's internal queue.\n\n## Value\n\nAn integer. Note that this can be negative if the queue is over-full.\n\nThe value will be `null` if the stream cannot be successfully written to\n(due to either being errored, or having an abort queued up), and zero if the stream is\nclosed.\n\n### Exceptions\n\n- `TypeError`\n  - : The writer's lock is released.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/WritableStreamDefaultWriter/prototype/ready.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.ready\n\nThe **`ready`** read-only property of the\n`WritableStreamDefaultWriter` interface returns a `Promise`\nthat resolves when the desired size of the stream's internal queue transitions from\nnon-positive to positive, signaling that it is no longer applying backpressure.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/WritableStreamDefaultWriter/prototype/releaseLock.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.releaseLock()\n\nThe **`releaseLock()`** method of the\n`WritableStreamDefaultWriter` interface releases the writer's lock on the\ncorresponding stream. After the lock is released, the writer is no longer active. If the\nassociated stream is errored when the lock is released, the writer will appear errored\nin the same way from now on; otherwise, the writer will appear closed.\n\n## Syntax\n\n```js\nreleaseLock()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone `undefined`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/WritableStreamDefaultWriter/prototype/write.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.write()\n\nThe **`write()`** method of the\n`WritableStreamDefaultWriter` interface writes a passed chunk of data to a\n`WritableStream` and its underlying sink, then returns a\n`Promise` that resolves to indicate the success or failure of the write\noperation.\n\nNote that what \"success\" means is up to the underlying sink; it might indicate that the\nchunk has been accepted, and not necessarily that it is safely saved to its ultimate\ndestination.\n\n## Syntax\n\n```js\nwrite(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : A block of binary data to pass to the `WritableStream`.\n\n### Return value\n\nA `Promise`, which fulfills with the `undefined` upon a\nsuccessful write, or rejects if the write fails or stream becomes errored before the\nwriting process is initiated.\n\n### Exceptions\n\n- `TypeError`\n  - : The target stream is not a writable stream, or it does not have an owner.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/atob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# atob()\n\nThe **`atob()`** function decodes a\nstring of data which has been encoded using Base64 encoding. You can use\nthe `btoa()` method to encode and transmit\ndata which may otherwise cause communication problems, then transmit it and use the\n`atob()` method to decode the data again. For example, you can encode,\ntransmit, and decode control characters such as ASCII values 0 through 31.\n\nFor use with Unicode or UTF-8 strings, see the note on \"Unicode strings\" in the page\nfor `btoa()`.\n\n## Syntax\n\n```js\natob(encodedData)\n```\n\n### Parameters\n\n- `encodedData`\n  - : A binary string (i.e., a string in which each character in the string is treated as a byte of binary data) containing base64-encoded data.\n\n### Return value\n\nAn ASCII string containing decoded data from `encodedData`.\n\n### Exceptions\n\n- `InvalidCharacterError`\n  - : Thrown if `encodedData` is not valid base64.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/btoa.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# btoa()\n\nThe **`btoa()`** method creates a\nBase64-encoded ASCII string from a _binary string_ (i.e., a\nstring in which each character in the string is treated as a byte\nof binary data).\n\nYou can use this method to encode data which may otherwise cause communication\nproblems, transmit it, then use the `atob()` method to decode the data again. For example, you can encode control\ncharacters such as ASCII values 0 through 31.\n\n## Syntax\n\n```js\nbtoa(stringToEncode)\n```\n\n### Parameters\n\n- `stringToEncode`\n  - : The _binary string_ to encode.\n\n### Return value\n\nAn ASCII string containing the Base64 representation of\n`stringToEncode`.\n\n### Exceptions\n\n- `InvalidCharacterError`\n  - : The string contained a character that did not fit in a single byte. See \"Unicode\n    strings\" below for more detail.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/clearInterval.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# clearInterval()\n\nThe global **`clearInterval()`** method cancels a timed, repeating action which\nwas previously established by a call to `setInterval()`.\nIf the parameter provided does not identify a previously established action,\nthis method does nothing.\n\n## Syntax\n\n```js\nclearInterval(intervalID)\n```\n\n### Parameters\n\n- `intervalID`\n  - : The identifier of the repeated action you want to cancel. This ID was returned by\n    the corresponding call to `setInterval()`.\n\nIt's worth noting that the pool of IDs used by\n`setInterval()` and\n`setTimeout()` are shared, which\nmeans you can technically use `clearInterval()` and\n`clearTimeout()` interchangeably.\nHowever, for clarity, you should avoid doing so.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/clearTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# clearTimeout()\n\nThe global **`clearTimeout()`** method cancels a timeout previously established\nby calling `setTimeout()`.\n\nIf the parameter provided does not identify a previously established action,\nthis method does nothing.\n\n## Syntax\n\n```js\nclearTimeout(timeoutID)\n```\n\n### Parameters\n\n- `timeoutID`\n  - : The identifier of the timeout you want to cancel. This ID was returned by the\n    corresponding call to `setTimeout()`.\n\nIt's worth noting that the pool of IDs used by\n`setTimeout()` and\n`setInterval()` are shared, which\nmeans you can technically use `clearTimeout()` and\n`clearInterval()`\ninterchangeably. However, for clarity, you should avoid doing so.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/console/assert.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.assert()\n\nThe **`console.assert()`** method writes an error message to\nthe console if the assertion is false. If the assertion is true, nothing happens.\n\n## Syntax\n\n```js\nassert(assertion, obj1)\nassert(assertion, obj1, obj2)\nassert(assertion, obj1, obj2, /* … ,*/ objN)\n\nassert(assertion, msg)\nassert(assertion, msg, subst1)\nassert(assertion, msg, subst1, /* … ,*/ substN)\n```\n\n### Parameters\n\n- `assertion`\n  - : Any boolean expression. If the assertion is false, the message is written to the\n    console.\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output.\n- `msg`\n  - : A JavaScript string containing zero or more substitution strings.\n- `subst1` … `substN`\n  - : JavaScript objects with which to replace substitution strings within\n    `msg`. This parameter gives you additional control over the format of the\n    output.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/console/clear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.clear()\n\nThe **`console.clear()`** method clears the console if the console allows it.\n\n## Syntax\n\n```js\nclear()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/console/count.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.count()\n\nThe **`console.count()`** method logs the number of times that\nthis particular call to `count()` has been called.\n\n\n## Syntax\n\n```js\ncount()\ncount(label)\n```\n\n### Parameters\n\n- `label` _optional_\n  - : A string. If supplied, `count()` outputs the number of\n    times it has been called with that label. If omitted, `count()` behaves as\n    though it was called with the \"default\" label.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/console/countReset.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.countReset()\n\nThe **`console.countReset()`** method resets counter used with `console.count()`.\n\n## Syntax\n\n```js\ncountReset()\ncountReset(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : A string. If supplied, `countReset()` resets the count for\n    that label to 0. If omitted, `countReset()` resets the default counter to\n    0.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/console/debug.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.debug()\n\nThe **`console.debug()`** method outputs a message to the console at the \"debug\" log level.\n\n## Syntax\n\n```js\ndebug(obj1)\ndebug(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output to the console.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/console/dir.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.dir()\n\nThe method **`console.dir()`** displays a list of the properties of\nthe specified JavaScript object.\n\n## Syntax\n\n```js\ndir(object)\n```\n\n### Parameters\n\n- `object`\n  - : A JavaScript object whose properties should be output.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/console/dirxml.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.dirxml()\n\nThe **`console.dirxml()`** method displays the supplied object in the console.\n\n## Syntax\n\n```js\ndirxml(object)\n```\n\n### Parameters\n\n- `object`\n  - : A JavaScript object whose properties should be output.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/console/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.error()\n\nThe **`console.error()`** method outputs an error message console.\n\n## Syntax\n\n```js\nerror(obj1)\nerror(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of\n    these objects are appended together in the order listed and output.\n\n### Return value\n\nNone `undefined`."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/console/group.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.group()\n\nThe **`console.group()`** method creates a new inline group in the console, until `console.groupEnd()` is called.\n\n## Syntax\n\n```js\ngroup()\ngroup(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : Label for the group.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/console/groupCollapsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.groupCollapsed()\n\nThe **`console.groupCollapsed()`** method creates a new inline group in the Web Console. Unlike `console.group()`,\nhowever, the new group is created collapsed. The user will need to use the disclosure\nbutton next to it to expand it, revealing the entries created in the group.\n\nCall `console.groupEnd()` to back out to the parent group.\n\n## Syntax\n\n```js\ngroupCollapsed()\ngroupCollapsed(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : Label for the group.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/console/groupEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.groupEnd()\n\nThe **`console.groupEnd()`** method exits the current inline group in the console.\n\n## Syntax\n\n```js\ngroupEnd()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/console/info.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.info()\n\nThe **`console.info()`** method outputs an informational message to the console.\n\n## Syntax\n\n```js\ninfo(obj1)\ninfo(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/console/log.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.log()\n\nThe **`console.log()`** method outputs a message to the console.\n\n## Syntax\n\n```js\nlog(obj1)\nlog(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output. Please be warned that if\n    you log objects in the latest versions of Chrome and Firefox what you get logged on\n    the console is a _reference to the object_, which is not necessarily the\n    'value' of the object at the moment in time you call `console.log()`, but\n    it is the value of the object at the moment you open the console.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/console/time.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.time()\n\nThe **`console.time()`** method starts a timer you can use to track\nhow long an operation takes. You give each timer a unique name. When you call `console.timeEnd()` with the same name, the\nbrowser will output the time, in milliseconds, that elapsed since the timer was started.\n\n## Syntax\n\n```js\ntime(label)\n```\n\n### Parameters\n\n- `label`\n  - : A `string` representing the name to give the new timer. This will identify the timer; use the same name when\n    calling `console.timeEnd()` to stop the timer and get the time output to\n    the console.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/console/timeEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.timeEnd()\n\nThe **`console.timeEnd()`** stops a timer that was previously started by calling `console.time()`.\n\n## Syntax\n\n```js\ntimeEnd(label)\n```\n\n### Parameters\n\n- `label`\n  - : A `string` representing the name of the timer to stop. Once stopped, the elapsed time is automatically\n    displayed in the console.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/console/timeLog.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.timeLog()\n\nThe **`console.timeLog()`** method logs the current value of a timer that was previously started by calling `console.time()`.\n\n## Syntax\n\n```js\ntimeLog()\ntimeLog(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : The name of the timer to log to the console. If this is omitted the label \"default\" is used.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/console/trace.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.trace()\n\nThe **`console.trace()`** method outputs a stack trace to the console.\n\n## Syntax\n\n```js\ntrace()\ntrace(object1, /* …, */ objectN)\n```\n\n### Parameters\n\n- `objects` __optional__\n  - : Zero or more objects to be output to console along with the trace. These are\n    assembled and formatted the same way they would be if passed to the `console.log()` method.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/console/warn.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.warn()\n\nThe **`console.warn()`** method outputs a warning message to the console.\n\n## Syntax\n\n```js\nwarn(obj1)\nwarn(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/crypto/getRandomValues.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Crypto.getRandomValues()\n\nThe **`Crypto.getRandomValues()`** method lets you get cryptographically strong random values.\nThe array given as the parameter is filled with random numbers (random in its cryptographic meaning).\n\n## Syntax\n\n```js\ngetRandomValues(typedArray)\n```\n\n### Parameters\n\n- `typedArray`\n  - : An integer-based `TypedArray`, that is one of: `Int8Array`, `Uint8Array`,\n    `Uint8ClampedArray`, `Int16Array`, `Uint16Array`,\n    `Int32Array`, `Uint32Array`, `BigInt64Array`,\n    `BigUint64Array` (but **not** `Float32Array` nor `Float64Array`).\n    All elements in the array will be overwritten with random numbers.\n\n### Return value\n\nThe same array passed as `typedArray` but with its contents replaced with the newly generated random numbers.\nNote that `typedArray` is modified in-place, and no copy is made.\n\n### Exceptions\n\n- `QuotaExceededError`\n  - : Thrown if the `byteLength` of `typedArray` exceeds 65,536.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/crypto/randomUUID.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Crypto.randomUUID()\n\nThe **`randomUUID()`** method is used to generate a v4 [UUID](https://developer.mozilla.org/en-US/docs/Glossary/UUID) using a cryptographically secure random number generator.\n\n## Syntax\n\n```js\nrandomUUID()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string containing a randomly generated, 36 character long v4 UUID."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/crypto/subtle.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Crypto.subtle\n\nThe **`Crypto.subtle`** read-only property returns a\n[`SubtleCrypto`](../SubtleCrypto/SubtleCrypto.mdx) which can then be used to perform low-level\ncryptographic operations.\n\n## Value\n\nA [`SubtleCrypto`](../SubtleCrypto/SubtleCrypto.mdx) object you can use to interact with the Web Crypto API's\nlow-level cryptography features.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/decodeURI.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# decodeURI\n\nThe **`decodeURI()`** function decodes a Uniform Resource Identifier (URI) previously created by [`encodeURI()`](../globals/encodeURI.mdx) or a similar routine.\n\n## Syntax\n\n```js\ndecodeURI(encodedURI)\n```\n\n### Parameters\n\n- `encodedURI`\n  - : A complete, encoded Uniform Resource Identifier.\n\n### Return value\n\nA new string representing the unencoded version of the given encoded Uniform Resource Identifier (URI).\n\n### Exceptions\n\n- [`URIError`](../globals/URIError/URIError.mdx)\n  - : Thrown if `encodedURI` contains a `%` not followed by two hexadecimal digits, or if the escape sequence does not encode a valid UTF-8 character.\n\n## Description\n\n`decodeURI()` is a function property of the global object.\n\nThe `decodeURI()` function decodes the URI by treating each escape sequence in the form `%XX` as one UTF-8 code unit (one byte). In UTF-8, the number of leading 1 bits in the first byte, which may be 0 (for 1-byte ASCII characters), 2, 3, or 4, indicates the number of bytes in the character. So by reading the first escape sequence, `decodeURI()` can determine how many more escape sequences to consume. If `decodeURI()` fails to find the expected number of sequences, or if the escape sequences don't encode a valid UTF-8 character, a [`URIError`](../globals/URIError/URIError.mdx) is thrown.\n\n`decodeURI()` decodes all escape sequences, but if the escape sequence encodes one of the following characters, the escape sequence is preserved in the output string (because they are part of the URI syntax):\n\n```\n; / ? : @ & = + $ , #\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/decodeURIComponent.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# decodeURIComponent\n\nThe **`decodeURIComponent()`** function decodes a Uniform Resource Identifier (URI) component previously created by [`encodeURIComponent()`](./encodeURIComponent.mdx) or by a similar routine.\n\n\n## Syntax\n\n```js\ndecodeURIComponent(encodedURI)\n```\n\n### Parameters\n\n- `encodedURI`\n  - : An encoded component of a Uniform Resource Identifier.\n\n### Return value\n\nA new string representing the decoded version of the given encoded Uniform Resource Identifier (URI) component.\n\n### Exceptions\n\n- [`URIError`](../globals/URIError/URIError.mdx)\n  - : Thrown if `encodedURI` contains a `%` not followed by two hexadecimal digits, or if the escape sequence does not encode a valid UTF-8 character.\n\n## Description\n\n`decodeURIComponent()` is a function property of the global object.\n\n`decodeURIComponent()` uses the same decoding algorithm as described in [`decodeURI()`](./decodeURI.mdx). It decodes _all_ escape sequences, including those that are not created by [`encodeURIComponent()`](./encodeURIComponent.mdx), like `-.!~*'()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/encodeURI.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# encodeURI()\n\nThe **`encodeURI()`** function encodes a URI by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character (will only be four escape sequences for characters composed of two surrogate characters). Compared to [`encodeURIComponent()`](./encodeURIComponent.mdx), this function encodes fewer characters, preserving those that are part of the URI syntax.\n\n## Syntax\n\n```js\nencodeURI(uri)\n```\n\n### Parameters\n\n- `uri`\n  - : A string to be encoded as a URI.\n\n### Return value\n\nA new string representing the provided string encoded as a URI.\n\n### Exceptions\n\n- [`URIError`](./URIError/URIError.mdx)\n  - : Thrown if `uri` contains a [lone surrogate](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters).\n\n## Description\n\n`encodeURI()` is a function property of the global object.\n\nThe `encodeURI()` function escapes characters by UTF-8 code units, with each octet encoded in the format `%XX`, left-padded with 0 if necessary. Because lone surrogates in UTF-16 do not encode any valid Unicode character, they cause `encodeURI()` to throw a [`URIError`](./URIError/URIError.mdx).\n\n`encodeURI()` escapes all characters **except**:\n\n```\nA–Z a–z 0–9 - _ . ! ~ * ' ( )\n\n; / ? : @ & = + $ , #\n```\n\nThe characters on the second line are characters that may be part of the URI syntax, and are only escaped by `encodeURIComponent()`. Both `encodeURI()` and `encodeURIComponent()` do not encode the characters `-.!~*'()`, known as \"unreserved marks\", which do not have a reserved purpose but are allowed in a URI \"as is\". (See [RFC2396](https://www.ietf.org/rfc/rfc2396.txt))\n\nThe `encodeURI()` function does not encode characters that have special meaning (reserved characters) for a URI. The following example shows all the parts that a URI can possibly contain. Note how certain characters are used to signify special meaning:\n\n```\nhttp://username:password@www.example.com:80/path/to/file.php?foo=316&bar=this+has+spaces#anchor\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/encodeURIComponent.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# encodeURIComponent\n\nThe **`encodeURIComponent()`** function encodes a URI by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character (will only be four escape sequences for characters composed of two surrogate characters). Compared to [`encodeURI()`](./encodeURI.mdx), this function encodes more characters, including those that are part of the URI syntax.\n\n## Syntax\n\n```js\nencodeURIComponent(uriComponent)\n```\n\n### Parameters\n\n- `uriComponent`\n  - : A string to be encoded as a URI component (a path, query string, fragment, etc.). Other values are [converted to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion).\n\n### Return value\n\nA new string representing the provided `uriComponent` encoded as a URI component.\n\n### Exceptions\n\n- [`URIError`](./URIError/URIError.mdx)\n  - : Thrown if `uriComponent` contains a [lone surrogate](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters).\n\n## Description\n\n`encodeURIComponent()` is a function property of the global object.\n\n`encodeURIComponent()` uses the same encoding algorithm as described in [`encodeURI()`](./encodeURI.mdx). It escapes all characters **except**:\n\n```text\nA–Z a–z 0–9 - _ . ! ~ * ' ( )\n```\n\nCompared to [`encodeURI()`](./encodeURI.mdx), `encodeURIComponent()` escapes a larger set of characters. Use `encodeURIComponent()` on user-entered fields from forms `POST`'d to the server — this will encode `&` symbols that may inadvertently be generated during data entry for special HTML entities or other characters that require encoding/decoding. For example, if a user writes `Jack & Jill`, without `encodeURIComponent()`, the ampersand could be interpreted on the server as the start of a new field and jeopardize the integrity of the data.\n\nFor [`application/x-www-form-urlencoded`](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#application/x-www-form-urlencoded-encoding-algorithm), spaces are to be replaced by `+`, so one may wish to follow a `encodeURIComponent()` replacement with an additional replacement of `%20` with `+`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/escape.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# escape()\n\n> **Note:** `escape()` is a non-standard function implemented by browsers and was only standardized for cross-engine compatibility. It is not required to be implemented by all JavaScript engines and may not work everywhere. Use [`encodeURIComponent()`](./encodeURIComponent.mdx) or [`encodeURI()`](./encodeURI.mdx) if possible.\n\nThe **`escape()`** function computes a new string in which certain characters have been replaced by hexadecimal escape sequences.\n\n## Syntax\n\n```js\nescape(str)\n```\n\n### Parameters\n\n- `str`\n  - : A string to be encoded.\n\n### Return value\n\nA new string in which certain characters have been escaped.\n\n## Description\n\n`escape()` is a function property of the global object.\n\nThe `escape()` function replaces all characters with escape sequences, with the exception of ASCII word characters (A–Z, a–z, 0–9, _) and `@*_+-./`. Characters are escaped by UTF-16 code units. If the code unit's value is less than 256, it is represented by a two-digit hexadecimal number in the format `%XX`, left-padded with 0 if necessary. Otherwise, it is represented by a four-digit hexadecimal number in the format `%uXXXX`, left-padded with 0 if necessary.\n\n> **Note:** This function was used mostly for URL encoding and is partly based on the escape format in rfc(1738). The escape format is _not_ an [escape sequence](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#escape_sequences) in string literals. You can replace `%XX` with `\\xXX` and `%uXXXX` with `\\uXXXX` to get a string containing actual string-literal escape sequences.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/eval.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# eval\n\n> **Warning:** Executing JavaScript from a string is an enormous security risk. It is far too easy for a bad actor to run arbitrary code when you use `eval()`. See [never use direct eval](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval#never_use_direct_eval!) for details.\n\nThe **`eval()`** function evaluates JavaScript code represented as a string and returns its completion value. The source is parsed as a script.\n\n## Syntax\n\n```js\neval(script)\n```\n\n### Parameters\n\n- `script`\n  - : A string representing a JavaScript expression, statement, or sequence of statements. The expression can include variables and properties of existing objects. It will be parsed as a script, so [`import`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/import) declarations (which can only exist in modules) are not allowed.\n\n### Return value\n\nThe completion value of evaluating the given code. If the completion value is empty, [`undefined`](./undefined.mdx) is returned. If `script` is not a string primitive, `eval()` returns the argument unchanged.\n\n### Exceptions\n\nThrows any exception that occurs during evaluation of the code, including[ `SyntaxError`](./SyntaxError/SyntaxError.mdx) if `script` fails to be parsed as a script.\n\n## Description\n\n`eval()` is a function property of the global object.\n\nThe argument of the `eval()` function is a string. It will evaluate the source string as a script body, which means both statements and expressions are allowed. It returns the completion value of the code. For expressions, it's the value the expression evaluates to. Many statements and declarations have completion values as well, but the result may be surprising (for example, the completion value of an assignment is the assigned value, but the completion value of [`let`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/let) is undefined), so it's recommended to not rely on statements' completion values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/fetch.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# fetch()\n\nThe global **`fetch()`** method starts the process of fetching a\nresource from the network, returning a promise which is fulfilled once the response is\navailable.\n\nThe promise resolves to the `Response` object\nrepresenting the response to your request.\n\nA `fetch()` promise only rejects when a\nnetwork error is encountered (which is usually when there's a permissions issue or\nsimilar). A `fetch()` promise _does\nnot_ reject on HTTP errors (`404`, etc.). Instead, a\n`then()` handler must check the `Response.ok` and/or\n`Response.status` properties.\n\n> **Note:** The `fetch()` method's parameters are identical to\n> those of the `Request()` constructor.\n\n## Explicit Backends\n\nInternally, Fastly uses named backends to handle fetch requests, which need to be explicitly defined to enable custom HTTP origins to be fetched by the service.\n\nThis `backend` option is then a special Fastly-specific fetch option that is provided to the `fetch()` call:\n\n```js\nfetch('https://origin.com/path', { backend: 'origin' });\n```\n\nBackends are configured using the Fastly service backend configuration, see the [Backend documentation](https://developer.fastly.com/reference/api/services/backend/) for more information.\n\n## Dynamic Backends\n\nDynamic backends are a compute feature that allow services to define backends for themselves.\n\nIf the `backend` option is not provided when making `fetch()` requests, a backend will be automatically created by extracting the protocol, host, and port from the provided URL.\n\nIn addition, custom backend configuration options can then also be provided through the [`Backend()`](../fastly:backend/Backend/Backend.mdx) constructor.\n\n## Syntax\n\n```js\nfetch(resource)\nfetch(resource, options)\n```\n\n### Parameters\n\n- `resource`\n\n  - : This defines the resource that you wish to fetch. This can either be:\n\n    - A string or any other object with a \"toString\" method.\n    - A `Request` object.\n\n- `options` _**optional**_\n\n  - : An object containing any custom settings that you want to apply to the request. The\n    possible options are:\n\n    - `method`\n      - : The request method, e.g., `GET`, `POST`.\n    - `headers`\n      - : Any headers you want to add to your request, contained within a\n        `Headers` object or an object literal with `String`\n        values.\n    - `body`\n      - : Any body that you want to add to your request: this can be an `ArrayBuffer`, a `TypedArray`, a `DataView`, a `URLSearchParams`, string object or literal, or a `ReadableStream` object.\n    - `backend` _**Fastly-specific**_\n      - *Fastly-specific*\n    - `cacheOverride` _**Fastly-specific**_\n    - `cacheKey` _**Fastly-specific**_\n    - `imageOptimizerOptions` _**Fastly-specific**_, see [`imageOptimizerOptions`](../fastly:image-optimizer/imageOptimizerOptions.mdx).\n    - `fastly` _**Fastly-specific**_\n      - `decompressGzip`_: boolean_ _**optional**_\n        - Whether to automatically gzip decompress the Response or not.\n\n### Return value\n\nA `Promise` that resolves to a `Response` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/globalThis.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# globalThis\n\nThe global **`globalThis`** property contains the [global `this`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this#global_context) value, which is usually akin to the [global object](https://developer.mozilla.org/docs/Glossary/Global_object).\n\n## Value\n\nThe global `this` object.\n\n> **Note:** The `globalThis` property is configurable and writable so that code authors can hide it when executing untrusted code and prevent exposing the global object.\n\n## Description\n\nThe `globalThis` property provides a standard way of accessing the global `this` value (and hence the global object itself) across environments.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/isFinite.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# isFinite\n\nThe global **`isFinite()`** function determines whether the\npassed value is a finite number. If needed, the parameter is first converted to a\nnumber.\n\n## Syntax\n\n```js\nisFinite(testValue)\n```\n\n### Parameters\n\n- `testValue`\n  - : The value to be tested for finiteness.\n\n### Return value\n\n**`false`** if the argument is (or will be coerced to) positive\nor negative [`Infinity`](./Infinity.mdx) or [`NaN`](./NaN.mdx) or [`undefined`](./undefined.mdx);\notherwise, **`true`**.\n\n## Description\n\n`isFinite` is a function property of the global object.\n\nYou can use this function to determine whether a number is a finite number. The\n`isFinite` function examines the number in its argument. If the argument is\n`NaN`, positive infinity, or negative infinity, this method returns\n`false`; otherwise, it returns `true`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/isNaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# isNaN()\n\nThe **`isNaN()`** function determines whether a value is [`NaN`](./NaN.mdx) when converted to a number. Because coercion inside the `isNaN()` function can be [surprising](#description), you may alternatively want to use [`Number.isNaN()`](./Number/isNaN.mdx).\n\n## Syntax\n\n```js\nisNaN(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested.\n\n### Return value\n\n`true` if the given value is [`NaN`](./NaN.mdx) after being [converted to a number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_coercion); otherwise, `false`.\n\n## Description\n\n`isNaN()` is a function property of the global object.\n\nFor number values, `isNaN()` tests if the number is the value [`NaN`](./NaN.mdx). When the argument to the `isNaN()` function is not of type [Number](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#number_type), the value is first coerced to a number, and the resulting value is then compared against [`NaN`](./NaN.mdx).\n\nThis behavior of `isNaN()` for non-numeric arguments can be confusing! For example, an empty string is coerced to 0, while a boolean is coerced to 0 or 1; both values are intuitively \"not numbers\", but they don't evaluate to `NaN`, so `isNaN()` returns `false`. Therefore, `isNaN()` answers neither the question \"is the input the floating point [`NaN`](./NaN.mdx) value\" nor the question \"is the input not a number\".\n\n[`Number.isNaN()`](./Number/isNaN.mdx) is a more reliable way to test whether a value is the number value `NaN` or not. Alternatively, the expression `x !== x` can be used, and neither of the solutions is subject to the false positives that make the global `isNaN()` unreliable. To test if a value is a number, use [`typeof x === \"number\"`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/typeof).\n\nThe `isNaN()` function answers the question \"is the input functionally equivalent to [`NaN`](./NaN.mdx) when used in a number context\". If `isNaN(x)` returns `false`, you can use `x` in an arithmetic expression as if it's a valid number that's not `NaN`. If `isNaN(x)` returns `true`, `x` will get coerced to `NaN` and make most arithmetic expressions return `NaN` (because `NaN` propagates). You can use this, for example, to test whether an argument to a function is arithmetically processable (usable \"like\" a number), and handle values that are not number-like by throwing an error, providing a default value, etc. This way, you can have a function that makes use of the full versatility JavaScript provides by implicitly converting values depending on context.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/location.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# location\n\nThe **`location`** read-only property returns a\n[`Location`](../globals/WorkerLocation/WorkerLocation.mdx) object with information about the current location of the\ndocument.\n\nSee [`Location`](../globals/WorkerLocation/WorkerLocation.mdx) for all available properties.\n\n## Value\n\nA [`Location`](../globals/WorkerLocation/WorkerLocation.mdx) object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/parseFloat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# parseFloat()\n\nThe **`parseFloat()`** function parses a string argument and returns a floating point number.\n\n## Syntax\n\n```js\nparseFloat(string)\n```\n\n### Parameters\n\n- `string`\n  - : The value to parse, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). Leading whitespace in this argument is ignored.\n\n### Return value\n\nA floating point number parsed from the given `string`, or [`NaN`](./NaN.mdx) when the first non-whitespace character cannot be converted to a number.\n\n> **Note:** JavaScript does not have the distinction of \"floating point numbers\" and \"integers\" on the language level. [`parseInt()`](./parseInt.mdx) and `parseFloat()` only differ in their parsing behavior, but not necessarily their return values. For example, `parseInt(\"42\")` and `parseFloat(\"42\")` would return the same value: a `Number` 42.\n\n## Description\n\nThe `parseFloat` function converts its first argument to a string, parses that string as a decimal number literal, then returns a number or `NaN`. The number syntax it accepts can be summarized as:\n\n- The characters accepted by `parseFloat()` are plus sign (`+`), minus sign (`-` U+002D HYPHEN-MINUS), decimal digits (`0` – `9`), decimal point (`.`), exponent indicator (`e` or `E`), and the `\"Infinity\"` literal.\n- The `+`/`-` signs can only appear strictly at the beginning of the string, or immediately following the `e`/`E` character. The decimal point can only appear once, and only before the `e`/`E` character. The `e`/`E` character can only appear once, and only if there is at least one digit before it.\n- Leading spaces in the argument are trimmed and ignored.\n- `parseFloat()` can also parse and return [`Infinity`](./Infinity.mdx) or `-Infinity` if the string starts with `\"Infinity\"` or `\"-Infinity\"` preceded by none or more white spaces.\n- `parseFloat()` picks the longest substring starting from the beginning that generates a valid number literal. If it encounters an invalid character, it returns the number represented up to that point, ignoring the invalid character and all characters following it.\n- If the argument's first character can't start a legal number literal per the syntax above, `parseFloat` returns [`NaN`](./NaN.mdx).\n\nSyntax-wise, `parseFloat()` parses a subset of the syntax that the [`Number()`](./Number/Number.mdx) function accepts. Namely, `parseFloat()` does not support non-decimal literals with `0x`, `0b`, or `0o` prefixes but supports everything else. However, `parseFloat()` is more lenient than `Number()` because it ignores trailing invalid characters, which would cause `Number()` to return `NaN`.\n\nSimilar to number literals and `Number()`, the number returned from `parseFloat()` may not be exactly equal to the number represented by the string, due to floating point range and inaccuracy. For numbers outside the `-1.7976931348623158e+308` – `1.7976931348623158e+308` range (see `Number.MAX_VALUE`), `-Infinity` or `Infinity` is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/parseInt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# parseInt\n\nThe **`parseInt()`** function parses a string argument and returns an integer of the specified [radix](https://en.wikipedia.org/wiki/Radix) (the base in mathematical numeral systems).\n\n\n\n## Syntax\n\n```js\nparseInt(string)\nparseInt(string, radix)\n```\n\n### Parameters\n\n- `string`\n  - : A string starting with an integer. Leading whitespace in this argument is ignored.\n- `radix` _**optional**_\n\n  - : An integer between `2` and `36` that represents the _radix_ (the base in mathematical numeral systems) of the `string`. It is converted to a [32-bit integer](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#fixed-width_number_conversion); if it's outside the range of \\[2, 36] after conversion, the function will always return `NaN`. If `0` or not provided, the radix will be inferred based on `string`'s value. Be careful — this does NOT always default to `10`! The [description below](#description) explains in more detail what happens when `radix` is not provided.\n\n### Return value\n\nAn integer parsed from the given `string`, or [`NaN`](./NaN.mdx) when\n\n- the `radix` as a 32-bit integer is smaller than `2` or bigger than `36`, or\n- the first non-whitespace character cannot be converted to a number.\n\n> **Note:** JavaScript does not have the distinction of \"floating point numbers\" and \"integers\" on the language level. `parseInt()` and [`parseFloat()`](./parseFloat.mdx) only differ in their parsing behavior, but not necessarily their return values. For example, `parseInt(\"42\")` and `parseFloat(\"42\")` would return the same value: a `Number` 42.\n\n## Description\n\nThe `parseInt` function converts its first argument to a string, parses that string, then returns an integer or `NaN`.\n\nIf not `NaN`, the return value will be the integer that is the first argument taken as a number in the specified `radix`. (For example, a `radix` of `10` converts from a decimal number, `8` converts from octal, `16` from hexadecimal, and so on.)\n\nThe `radix` argument is converted to a number. If it's unprovided, or if the value becomes 0, `NaN` or `Infinity` (`undefined` is coerced to `NaN`), JavaScript assumes the following:\n\n1. If the input `string`, with leading whitespace and possible `+`/`-` signs removed, begins with `0x` or `0X` (a zero, followed by lowercase or uppercase X), `radix` is assumed to be `16` and the rest of the string is parsed as a hexadecimal number.\n2. If the input `string` begins with any other value, the radix is `10` (decimal).\n\n> **Note:** Other prefixes like `0b`, which are valid in [number literals](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#binary), are treated as normal digits by `parseInt()`. `parseInt()` does _not_ treat strings beginning with a `0` character as octal values either. The only prefix that `parseInt()` recognizes is `0x` or `0X` for hexadecimal values — everything else is parsed as a decimal value if `radix` is missing.\n\nIf the radix is `16`, `parseInt()` allows the string to be optionally prefixed by `0x` or `0X` after the optional sign character (`+`/`-`).\n\nIf the radix value (coerced if necessary) is not in range \\[2, 36] (inclusive) `parseInt` returns `NaN`.\n\nFor radices above `10`, letters of the English alphabet indicate numerals greater than `9`. For example, for hexadecimal numbers (base `16`), `A` through `F` are used. The letters are case-insensitive.\n\n`parseInt` understands exactly two signs: `+` for positive, and `-` for negative. It is done as an initial step in the parsing after whitespace is removed. If no signs are found, the algorithm moves to the following step; otherwise, it removes the sign and runs the number-parsing on the rest of the string.\n\nIf `parseInt` encounters a character that is not a numeral in the specified `radix`, it ignores it and all succeeding characters and returns the integer value parsed up to that point. For example, although `1e3` technically encodes an integer (and will be correctly parsed to the integer `1000` by [`parseFloat()`](./parseFloat.mdx), `parseInt(\"1e3\", 10)` returns `1`, because `e` is not a valid numeral in base 10. Because `.` is not a numeral either, the return value will always be an integer.\n\nIf the first character cannot be converted to a number with the radix in use, `parseInt` returns `NaN`. Leading whitespace is allowed.\n\nFor arithmetic purposes, the `NaN` value is not a number in any radix. You can call the [`Number.isNaN`](./Number/isNaN.mdx) function to determine if the result of `parseInt` is `NaN`. If `NaN` is passed on to arithmetic operations, the operation result will also be `NaN`.\n\nBecause large numbers use the `e` character in their string representation (e.g. `6.022e23` for 6.022 × 10<sup>23</sup>), using `parseInt` to truncate numbers will produce unexpected results when used on very large or very small numbers. `parseInt` should _not_ be used as a substitute for [`Math.trunc()`](./Math/trunc.mdx).\n\nTo convert a number to its string literal in a particular radix, use [`thatNumber.toString(radix)`](./Number/prototype/toString.mdx).\n\nBecause `parseInt()` returns a number, it may suffer from loss of precision if the integer represented by the string is [outside the safe range](./Number/isSafeInteger.mdx). The [`BigInt`](./BigInt/BigInt.mdx) function supports parsing integers of arbitrary length accurately, by returning a `BigInt`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/performance/now.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# performance.now()\n\nThe **`performance.now()`** method returns a high resolution timestamp in milliseconds.\nIt represents the time elapsed since [`performance.timeOrigin`](./timeOrigin.mdx) (the time when the worker was instantiated).\n\n## Syntax\n\n```js\nnow()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns a number which represents the time since worker instantation measured in milliseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/performance/timeOrigin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# performance.timeOrigin\n\nThe **`timeOrigin`** read-only property of the Performance interface returns the high resolution timestamp that is used as the baseline for performance-related timestamps.\n\nThis value represents the time when the worker was instantiated.\n\n### Value\n\nReturns a number which represents the time when the worker was instantation."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/setInterval.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# setInterval()\n\nThe **`setInterval()`** method, repeatedly\ncalls a function or executes a code snippet, with a fixed time delay between each\ncall.\n\nThis method returns an interval ID which uniquely identifies the interval, so you\ncan remove it later by calling `clearInterval()`.\n\n## Syntax\n\n```js\nsetInterval(code)\nsetInterval(code, delay)\n\nsetInterval(func)\nsetInterval(func, delay)\nsetInterval(func, delay, arg0)\nsetInterval(func, delay, arg0, arg1)\nsetInterval(func, delay, arg0, arg1, /* … ,*/ argN)\n```\n\n### Parameters\n\n- `func`\n  - : A `function` to be executed every `delay` milliseconds. The first execution happens after `delay` milliseconds.\n- `code`\n  - : An optional syntax allows you to include a string instead of a function, which is\n    compiled and executed every `delay` milliseconds. This syntax is _not\n    recommended_ for the same reasons that make using `eval() a\n    security risk.\n- `delay` _**optional**_\n  - : The time, in milliseconds (thousandths of a second), the timer should delay in\n    between executions of the specified function or code. Defaults to 0 if not specified.\n    below for details on the permitted range of `delay` values.\n- `arg0, …, argN` _**optional**_\n  - : Additional arguments which are passed through to the function specified by\n    _func_ once the timer expires.\n\n### Return value\n\nThe returned `intervalID` is a numeric, non-zero value which identifies the\ntimer created by the call to `setInterval()`; this value can be passed to\n`clearInterval()` to cancel the interval.\n\nIt may be helpful to be aware that `setInterval()` and\n`setTimeout()` share the same pool\nof IDs, and that `clearInterval()` and\n`clearTimeout()` can technically\nbe used interchangeably. For clarity, however, you should try to always match them to\navoid confusion when maintaining your code.\n\n> **Note:** The `delay` argument is converted to a\n> signed 32-bit integer. This effectively limits `delay` to 2147483647 ms,\n> since it's specified as a signed integer in the IDL.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/setTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# setTimeout()\n\nThe global **`setTimeout()`** method sets a timer which executes a function or specified\npiece of code once the timer expires.\n\n## Syntax\n\n```js\nsetTimeout(code)\nsetTimeout(code, delay)\n\nsetTimeout(functionRef)\nsetTimeout(functionRef, delay)\nsetTimeout(functionRef, delay, param1)\nsetTimeout(functionRef, delay, param1, param2)\nsetTimeout(functionRef, delay, param1, param2, /* … ,*/ paramN)\n```\n\n### Parameters\n\n- `functionRef`\n  - : A `function` to be executed after the timer expires.\n- `code`\n  - : An alternative syntax that allows you to include a string instead of a function,\n    which is compiled and executed when the timer expires. This syntax is **not\n    recommended** for the same reasons that make using\n    `eval()` a security risk.\n- `delay` _**optional**_\n\n  - : The time, in milliseconds that the timer should wait before\n    the specified function or code is executed. If this parameter is omitted, a value of 0\n    is used, meaning execute \"immediately\", or more accurately, the next event cycle.\n\n- `param1`, …, `paramN` _**optional**_\n\n  - : Additional arguments which are passed through to the function specified by\n    `functionRef`.\n\n### Return value\n\nThe returned `timeoutID` is a positive integer value which\nidentifies the timer created by the call to `setTimeout()`. This value can be\npassed to `clearTimeout()` to\ncancel the timeout.\n\nIt is guaranteed that a `timeoutID` value will never be reused by a subsequent call to\n`setTimeout()` or `setInterval()` on the same object (a window or\na worker). However, different objects use separate pools of IDs.\n\n## Description\n\nTimeouts are cancelled using `clearTimeout()`.\n\nTo call a function repeatedly (e.g., every _N_ milliseconds), consider using\n`setInterval()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/structuredClone.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# structuredClone()\n\nThe global **`structuredClone()`** method creates a deep clone of a given value.\n\n## Syntax\n\n```js\nstructuredClone(value)\n```\n\n### Parameters\n\n- `value`\n  - : The object to be cloned.\n\n### Return value\n\nThe returned value is a deep copy of the original `value`.\n\n### Exceptions\n\n- `DataCloneError`\n  - : Thrown if any part of the input value is not serializable.\n\n## Description\n\nThis function can be used to deep copy JavaScript values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/undefined.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# undefined\n\nThe global **`undefined`** property represents the primitive\nvalue `undefined`. It is one of JavaScript's \"primitive types\".\n\n## Value\n\nThe primitive value `undefined`.\n\n## Description\n\n`undefined` is a property of the _global object_. That is, it is a variable in global scope.\n\n`undefined` is a non-configurable, non-writable property.\n\nA variable that has not been assigned a value is of type `undefined`. A\nmethod or statement also returns `undefined` if the variable that is being\nevaluated does not have an assigned value. A function returns `undefined` if\na value was not explicitly returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/globals/unescape.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# unescape()\n\n> **Note:** `unescape()` is a non-standard function implemented by browsers and was only standardized for cross-engine compatibility. It is not required to be implemented by all JavaScript engines and may not work everywhere. Use [`decodeURIComponent()`](./decodeURIComponent.mdx) or [`decodeURI()`](./decodeURI.mdx) if possible.\n\nThe **`unescape()`** function computes a new string in which hexadecimal escape sequences are replaced with the characters that they represent. The escape sequences might be introduced by a function like [`escape()`](./escape.mdx).\n\n## Syntax\n\n```js\nunescape(str)\n```\n\n### Parameters\n\n- `str`\n  - : A string to be decoded.\n\n### Return value\n\nA new string in which certain characters have been unescaped.\n\n## Description\n\n`unescape()` is a function property of the global object.\n\nThe `unescape()` function replaces any escape sequence with the character that it represents. Specifically, it replaces any escape sequence of the form `%XX` or `%uXXXX` (where `X` represents one hexadecimal digit) with the character that has the hexadecimal value `XX`/`XXXX`. If the escape sequence is not a valid escape sequence (for example, if `%` is followed by one or no hex digit), it is left as-is.\n\n> **Note:** This function was used mostly for URL encoding and is partly based on the escape format in rfc(1738). The `unescape()` function does _not_ evaluate [escape sequences](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#escape_sequences) in string literals. You can replace `\\xXX` with `%XX` and `\\uXXXX` with `%uXXXX` to get a string that can be handled by `unescape()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/html-rewriter/Element/prototype/after.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# after\n\nThe `after` method inserts content after the closing tag of the element.\n\n## Syntax\n\n```js\nelement.after(content);\nelement.after(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to insert after the element's closing tag.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.after(\"World\");\n// Result: <div>Hello</div>World\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/html-rewriter/Element/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# append\n\nThe `append` method inserts content at the end of the element's content.\n\n## Syntax\n\n```js\nelement.append(content);\nelement.append(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to insert at the end of the element's content.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.append(\", World\");\n// Result: <div>Hello, World</div>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/html-rewriter/Element/prototype/before.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# before\n\nThe `before` method inserts content before the opening tag of the element.\n\n## Syntax\n\n```js\nelement.before(content);\nelement.before(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to insert before the element's opening tag.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.before(\"Well\");\n// Result: Well<div>Hello</div>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/html-rewriter/Element/prototype/hasAttribute.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# hasAttribute\n\nThe `hasAttribute` method returns a `boolean` value indicating whether the specified attribute is present on the element.\n\n## Syntax\n\n```js\nelement.hasAttribute(attributeName);\n```\n\n### Parameters\n\n- `attributeName` _: string_\n  - The name of the attribute to check for.\n\n### Return value\n\nA boolean value indicating whether the attribute is present.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/html-rewriter/Element/prototype/prepend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# prepend\n\nThe `prepend` method inserts content at the beginning of the element's content.\n\n## Syntax\n\n```js\nelement.prepend(content);\nelement.prepend(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to insert at the beginning of the element's content.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.prepend(\"Well, \");\n// Result: <div>Well, Hello</div>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/html-rewriter/Element/prototype/removeAttribute.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# removeAttribute\n\nThe `removeAttribute` method removes the specified attribute from the element.\n\n## Syntax\n\n```js\nelement.removeAttribute(attributeName);\n```\n\n### Parameters\n\n- `attributeName` _: string_\n  - The name of the attribute to remove.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/html-rewriter/Element/prototype/replaceChildren.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# replaceChildren\n\nThe `replaceChildren` method replaces the element's children with new content.\n\n## Syntax\n\n```js\nelement.replaceChildren(content);\nelement.replaceChildren(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to replace the element's children with.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.replaceChildren(\"Greetings!\");\n// Result: <div>Greetings!</div>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/html-rewriter/Element/prototype/replaceWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# replaceWith\n\nThe `replaceWith` method replaces the element with new content.\n\n## Syntax\n\n```js\nelement.replaceWith(content);\nelement.replaceWith(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to replace the element with.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.replaceWith(\"<p>Greetings!</p>\");\n// Result: <p>Greetings!</p>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/html-rewriter/Element/prototype/selector.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# selector\n\nThe `selector` read-only property is a `string` representing the [CSS selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors) that matches the element.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/html-rewriter/Element/prototype/setAttribute.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# setAttribute\n\nThe `setAttribute` method sets the value of the specified attribute on the element. If the value already exists, it will be updated; otherwise, a new attribute with the specified name and value will be added to the element.\n\n## Syntax\n\n```js\nelement.setAttribute(attributeName, value);\n```\n\n### Parameters\n\n- `attributeName` _: string_\n  - The name of the attribute to set.\n- `value` _: string_\n  - The value to assign to the attribute.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/html-rewriter/Element/prototype/tag.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# tag\n\nThe `tag` read-only property is a `string` representing the tag name of the element.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/html-rewriter/HTMLRewritingStream/HTMLRewritingStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `HTMLRewritingStream()`\n\nThe **`HTMLRewritingStream`** lets you rewrite HTML by registering callbacks on CSS selectors. When an element matching the selector is encountered, the rewriter calls your callback. This callback can manipulate the attributes of the element, and add or remove content from the immediate context.\n\n## Syntax\n\n```js\nnew HTMLRewritingStream()\n```\n\n### Return value\n\nA new `HTMLRewritingStream` object.\n\n## Examples\n\nIn this example, we fetch an HTML page and use the HTML rewriter to add an attribute to all `div` tags and prepend the text `Header:` to all `h1` tags:\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { HTMLRewritingStream } from 'fastly:html-rewriter';\n\nasync function handleRequest(event) {\n  let transformer = new HTMLRewritingStream()\n    .onElement(\"h1\", e => e.prepend(\"Header: \"))\n    .onElement(\"div\", e => e.setAttribute(\"special-attribute\", \"top-secret\"));\n  let body = (await fetch(\"https://example.com/\")).body.pipeThrough(transformer);\n\n  return new Response(body, {\n    status: 200,\n    headers: new Headers({\n      \"content-type\": \"text/html; charset=utf-8\",\n    })\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/html-rewriter/HTMLRewritingStream/prototype/onElement.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# onElement\n\n▸ **onElement**`(selector: string, handler: (element: Element) => void): this`\n\nRegisters an element handler with the [`HTMLRewritingStream`] that will be called for each [`Element`] that matches the [CSS selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors) `selector`.\n\nElements added by handlers will not be processed by other handlers.\n\n## Syntax\n\n```js\n.onElement(selector, handler)\n```\n\n### Parameters\n\n- `selector` _: string_\n  - A CSS selector that determines the elements for which `handler` will be called\n  - The following types of CSS selector are supported:\n\nCurrently the rewriter supports the following CSS selectors:\n\n| Pattern              | Description                                                                |\n|----------------------|----------------------------------------------------------------------------|\n| `*`                  | Any element                                                                |\n| `E`                  | All elements of type `E`                                                   |\n| `E F`                | `F` elements inside `E` elements                                           |\n| `E > F`              | `F` elements directly inside `E` elements                                  |\n| `E:nth-child(n)`     | The n-th child of type `E`                                                 |\n| `E:first-child`      | First child of type `E`                                                    |\n| `E:nth-of-type(n)`   | The n-th sibling of type `E`                                               |\n| `E:first-of-type`    | First sibling of type `E`                                                  |\n| `E:not(s)`           | Type `E` elements not matching selector `s`                                |\n| `E.myclass`          | Type `E` elements with class `\"myclass\"`                                   |\n| `E#myid`             | Type `E` elements with ID `\"myid\"`                                         |\n| `E[attr]`            | Type `E` elements with attribute `attr`                                    |\n| `E[attr=\"val\"]`      | Type `E` elements where `attr` is `\"val\"`                                  |\n| `E[attr=\"val\" i]`    | Type `E` elements where `attr` is `\"val\"`, case-insensitive                |\n| `E[attr=\"val\" s]`    | Type `E` elements where `attr` is `\"val\"`, case-sensitive                  |\n| `E[attr~=\"val\"]`     | Type `E` elements where `attr` contains `\"val\"` in a space-separated list  |\n| `E[attr`&#124`;=\"val\"]`| Type `E` elements where `attr` is hyphen-separated and starts with `\"val\"` |\n| `E[attr^=\"val\"]`     | Type `E` elements where `attr` starts with `\"val\"`                         |\n| `E[attr$=\"val\"]`     | Type `E` elements where `attr` ends with `\"val\"`                           |\n| `E[attr*=\"val\"]`     | Type `E` elements where `attr` contains `\"val\"`                            |\n\n- `handler` _: (element: Element) => void_\n  - A callback function that will be called once for each element that matches `selector`\n\n### Return value\n\nThe `HTMLRewritingStream`, so multiple calls to `onElement` can be chained.\n\n### Exceptions\n\n- `Error`\n  - If the provided `selector` is not a valid CSS selector.\n  - If the provided `handler` is not a function.\n\n## Examples\n\n\nIn this example, we fetch an HTML page and use the HTML rewriter to add an attribute to all `div` tags and prepend the text `Header:` to all `h1` tags:\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { HTMLRewritingStream } from 'fastly:html-rewriter';\n\nasync function handleRequest(event) {\n  let transformer = new HTMLRewritingStream()\n    .onElement(\"h1\", e => e.prepend(\"Header: \"))\n    .onElement(\"div\", e => e.setAttribute(\"special-attribute\", \"top-secret\"));\n  let body = (await fetch(\"https://example.com/\")).body.pipeThrough(transformer);\n\n  return new Response(body, {\n    status: 200,\n    headers: new Headers({\n      \"content-type\": \"text/html; charset=utf-8\",\n    })\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/image-optimizer/Auto.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Auto`\n\nEnumerator options for [`imageOptimizerOptions.auto`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `AVIF` (`\"avif\"`) If the browser's Accept header indicates compatibility, deliver an AVIF image.\n- `WEBP` (`\"webp\"`)\tIf the browser's Accept header indicates compatibility, deliver a WebP image.\n\n## Examples\n\n```js\nimport { Auto, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      auto: Auto.AVIF\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/image-optimizer/BWAlgorithm.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `BWAlgorithm`\n\nEnumerator options for [`imageOptimizerOptions.bw`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Threshold` (`\"threshold\"`) Uses a luminance threshold to convert the image to black and white.\n- `Atkinson` (`\"atkinson\"`)\tUses [Atkinson dithering](https://en.wikipedia.org/wiki/Atkinson_dithering) to convert the image to black and white.\n\n\n## Examples\n\n```js\nimport { Region, BWAlgorithm } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      bw: BWAlgorithm.Threshold\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/image-optimizer/CropMode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `CropMode`\n\nEnumerator options for [`imageOptimizerOptions.crop.mode`](./imageOptimizerOptions.mdx) and `imageOptimizerOptions.precrop.mode`.\n\n## Constants\n\n- `Smart` (`\"smart\"`) Enables content-aware algorithms to attempt to crop the image to the desired aspect ratio while intelligently focusing on the most important visual content, including the detection of faces.\n- `Safe` (`\"safe\"`)\tAllow cropping out-of-bounds regions.\n\n## Examples\n\n```js\nimport { CropMode, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      crop: {\n        size: { ratio: { width: 4, height: 3 } },\n        mode: CropMode.Smart,\n      }\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/image-optimizer/Disable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Disable`\n\nEnumerator options for [`imageOptimizerOptions.disable`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Upscale` (`\"upscale\"`) Prevent images being resized such that the output image's dimensions are larger than the source image.\n\n## Examples\n\n```js\nimport { Disable, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      width: 2560,\n      disable: Disable.Upscale\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/image-optimizer/Enable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Enable`\n\nEnumerator options for [`imageOptimizerOptions.enable`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Upscale` (`\"upscale\"`) Allow images to be resized such that the output image's dimensions are larger than the source image.\n\n## Examples\n\n```js\nimport { Enable, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      width: 2560,\n      enable: Enable.Upscale\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/image-optimizer/Fit.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Fit`\n\nEnumerator options for [`imageOptimizerOptions.fit`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Bounds` (`\"bounds\"`) Resize the image to fit entirely within the specified region, making one dimension smaller if needed.\n- `Cover` (`\"cover\"`) Resize the image to entirely cover the specified region, making one dimension larger if needed.\n- `Crop` (`\"crop\"`) Resize and crop the image centrally to exactly fit the specified region.\n\n## Examples\n\n```js\nimport { Fit, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      width: 150,\n      height; 150,\n      fit: Fit.Bounds\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/image-optimizer/Format.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Format`\n\nEnumerator options for [`imageOptimizerOptions.format`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Auto` (`\"auto\"`) Automatically use the best format based on browser support and image/transform characteristics\n- `AVIF` (`\"avif\"`) AVIF\n- `BJPG` (`\"bjpg\"`) Baseline JPEG \n- `GIF` (`\"gif\"`) Graphics Interchange Format\n- `JPG` (`\"jpg\"`) JPEG \n- `JXL` (`\"jxl\"`) JPEGXL \n- `MP4` (`\"mp4\"`) MP4 (H.264)\n- `PJPG` (`\"pjpg\"`) Progressive JPEG \n- `PJXL` (`\"pjxl\"`) Progressive JPEGXL\n- `PNG` (`\"png\"`) Portable Network Graphics\n- `PNG8` (`\"png8\"`) Portable Network Graphics palette image with 256 colors and 8-bit transparency\n- `SVG` (`\"svg\"`) Scalable Vector Graphics\n- `WEBP` (`\"webp\"`) WebP\n- `WEBPLL` (`\"webpll\"`) WebP (Lossless)\n- `WEBPLY` (`\"webply\"`) WebP (Lossy)\n\n## Examples\n\n```js\nimport { Format, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      format: Format.PNG\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/image-optimizer/Metadata.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Metadata`\n\nEnumerator options for [`imageOptimizerOptions.metadata`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Copyright` (`\"copyright\"`) Preserve [copyright notice](https://www.iptc.org/std/photometadata/specification/IPTC-PhotoMetadata#copyright-notice), creator, credit line, licensor, and web statement of rights fields.\n- `C2PA` (`\"c2pa\"`) Preserve the [C2PA manifest](https://c2pa.org/) and add any transformations performed by Fastly Image Optimizer.\n- `CopyRightAndC2PA` (`\"copyright,c2pa\"`) Resize and crop the image centrally to exactly fit the specified region.\n\n## Examples\n\n```js\nimport { Metadata, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      metadata: Metadata.Copyright\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/image-optimizer/Optimize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Optimize`\n\nEnumerator options for [`imageOptimizerOptions.optimize`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Low` (`\"low\"`) Output image quality will be similar to the input image quality.\n- `Medium` (`\"medium\"`) More optimization is allowed. We attempt to preserve the visual quality of the input image.\n- `High` (`\"high\"`) Minor visual artifacts may be visible. This produces the smallest file.\n\n## Examples\n\n```js\nimport { Optimize, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      optimize: Optimize.High\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/image-optimizer/Orient.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Orient`\n\nEnumerator options for [`imageOptimizerOptions.orient`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Default` (`\"1\"`) \n- `FlipHorizontal` (`\"2\"`) \n- `FlipHorizontalAndVertical` (`\"3\"`) \n- `FlipVertical` (`\"4\"`) \n- `FlipHorizontalOrientLeft` (`\"5\"`) \n- `OrientRight` (`\"6\"`) \n- `FlipHorizontalOrientRight` (`\"7\"`) \n- `OrientLeft` (`\"8\"`) \n\n## Examples\n\n```js\nimport { Orient, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      orient: Orient.FlipHorizontal\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/image-optimizer/Profile.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Profile`\n\nEnumerator options for [`imageOptimizerOptions.profile`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Baseline` (`\"baseline\"`) The profile recommended for video conferencing and mobile applications. (Default)\n- `Main` (`\"main\"`) The profile recommended for standard-definition broadcasts.\n- `High` (`\"high\"`) The profile recommended for high-definition broadcasts.\n\n## Examples\n\n```js\nimport { Profile, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      profile: Profile.Main\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/image-optimizer/Region.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Region`\n\nEnumerator options for [`imageOptimizerOptions.region`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `UsEast` (`\"us_east\"`)\n- `UsCentral` (`\"us_central\"`)\n- `UsWest` (`\"us_west\"`)\n- `EuCentral` (`\"eu_central\"`)\n- `EuWest` (`\"eu_west\"`)\n- `Asia` (`\"asia\"`)\n- `Australia` (`\"australia\"`)\n\n\n## Examples\n\n```js\nimport { Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/image-optimizer/ResizeFilter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `ResizeFilter`\n\nEnumerator options for [`imageOptimizerOptions.resizeFilter`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Nearest` (`\"nearest\"`) Uses the value of nearby translated pixel values.\n- `Bilinear` (`\"bilinear\"`) Uses an average of a 2x2 environment of pixels.\n- `Linear` (`\"linear\"`) Same as `Bilenear`.\n- `Bicubic` (`\"bicubic\"`) Uses an average of a 4x4 environment of pixels, weighing the innermost pixels higher.\n- `Cubic` (`\"cubic\"`) Same as `Bicubic`.\n- `Lanczos2` (`\"lanczos2\"`) Uses the Lanczos filter to increase the ability to detect edges and linear features within an image and uses sinc resampling to provide the best possible reconstruction.\n- `Lanczos3` (`\"lanczos3\"`) Lanczos3 uses a better approximation of the sinc resampling function. (Default)\n- `Lanczos` (`\"lanczos\"`) Same as `Lanczos3`.\n\n## Examples\n\n```js\nimport { ResizeFilter, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      width: 2560,\n      resizeFilter: ResizeFilter.Linear\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/image-optimizer/imageOptimizerOptions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `imageOptimizerOptions` \n\nOptions specified in the [`Request`](../globals/Request/Request.mdx) constructor for running the [Fastly Image Optimizer](https://docs.fastly.com/products/image-optimizer). More detailed documentation on all Image Optimizer options is available in the [Image Optimizer reference docs](https://www.fastly.com/documentation/reference/io/).\n\n## Parameters\n\nAll parameters other than `region` are optional.\n\n- `region`: _[`Region`](./Region.mdx)_ Where image optimizations should occur.\n- `auto`: _[`Auto`](./Auto.mdx)_ Enable optimization features automatically.\n- `bgColor`: _[`Color`](#color)_ Set the background color of an image.\n- `blur`: _`number` (0.5-1000) or [`Percentage`](#percentage)_ Set the blurriness of the output image.\n- `brightness`: _`number` (-100-100)_ Set the brightness of the output image.\n- `bw`: _[`BWAlgorithm`](./BWAlgorithm.mdx)_ Convert an image to black and white.\n- `canvas`: _`Object`_ Increase the size of the canvas around an image.\n    - `size`: _[`Size`](#size)_\n    - `position` (optional): _[`Position`](#position)_\n- `contrast`: _`number` (-100-100)_ Set the contrast of the output image.\n- `crop`: _`Object`_ Remove pixels from an image.\n    - `size`: _[`Size`](#size)_\n    - `position` (optional): _[`Position`](#position)_\n    - `mode` (optional): _[`CropMode`](./CropMode.mdx)_\n- `disable`: _[`Disable`](./Disable.mdx)_ Disable functionality that is enabled by default.\n- `dpr`: `number` Ratio between physical pixels and logical pixels.\n- `enable`: _[`Enable`](./Enable.mdx)_ Enable functionality that is disabled by default.\n- `fit`: _[`Fit`](./Fit.mdx)_ Set how the image will fit within the size bounds provided.\n- `format`: _[`Format`](./Format.mdx)_ Specify the output format to convert the image to.\n- `frame`: _`number` (must have the value 1)_ Extract the first frame from an animated image sequence.\n- `height`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ Resize the height of the image.\n- `level`: _`String` containing one of the [allowed values](https://www.fastly.com/documentation/reference/io/level/#allowed-values)_ Specify the level constraints when converting to video.\n- `metadata`: _[`Metadata`](./Metadata.mdx)_ Control which metadata fields are preserved during transformation.\n- `optimize`: _[`Optimize`](./Optimize.mdx)_ Automatically apply optimal quality compression.\n- `orient`: _[`Orient`](./Orient.mdx)_ Change the cardinal orientation of the image.\n- `pad`: _[`Sides`](#sides)_ Add pixels to the edge of an image.\n- `precrop`: _`Object`_ Remove pixels from an image before any other transformations occur.\n    - `size`: _[`Size`](#size)_\n    - `position`: _[`Position`](#position)_\n    - `mode`: _[`CropMode`](./CropMode.mdx)_\n- `profile`: _[`Profile`](./Profile.mdx)_ Specify the profile class of application when converting to video.\n- `quality`: _`integer` (1-100)_ Optimize the image to the given compression level for lossy file formatted images.\n- `resizeFilter`: _[`ResizeFilter`](./ResizeFilter.mdx)_ Specify the resize filter used when resizing images.\n- `saturation`: _`number` (-100-100)_ Set the saturation of the output image.\n- `sharpen`: _`Object`_ Set the sharpness of the output image.\n    - `amount`: _`number` (0-10)_\n    - `radius`: _`number` (0.5-1000)_\n    - `threshold`: _`integer` (0-255)_\n- `trim`: _[`Sides`](#sides)_ Remove pixels from the edge of an image.\n- `viewbox`: _`number` (must have the value 1)_ Remove explicit width and height properties in SVG output.\n- `width`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ Resize the width of the image.\n\n## Types\n\n### Color\n\nEither:\n\n- a 3 or 6 character hexadecimal string\n- an `Object` containing:\n    - `r`: _`integer` (0-255)_ Red component\n    - `g`: _`integer` (0-255)_ Green component\n    - `b`: _`integer` (0-255)_ Blue component\n    - `a` (optional): _`number` (0.0-1.0)_ Alpha component \n\n### Percentage\n\nA `String` containing a number suffixed with a percent sign (%).\n\n### Position\n\nAn `Object` containing:\n\n- Exactly one of:\n    - `x`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ \n    - `offsetX`: _`number` (interpreted as a percentage)_\n- Exactly one of: \n    - `y`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ \n    - `offsetY`: _`number` (interpreted as a percentage)_\n\n### Sides\n\nAn `Object` containing `top`, `bottom`, `left`, and `right`, all of which are either an `integer` or [`Percentage`](#percentage).\n\n### Size\n\nAn `Object` containing either:\n\n- `absolute`: _`Object`_\n    - `width`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ \n    - `height`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ \n- `ratio`: _`Object`_\n    - `width`: _`number`_\n    - `height`: _`number`_\n\n## Examples\n\n```js\nimport { Format, Orient, CropMode, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      format: Format.PNG,\n      bgColor: {\n        'r': 100,\n        'g': 255,\n        'b': 9,\n        'a': 0.5\n      },\n      blur: '1%',\n      brightness: -20,\n      contrast: -20,\n      height: 600,\n      level: '4.0',\n      orient: Orient.FlipVertical,\n      saturation: 80,\n      sharpen: { 'amount': 5, 'radius': 6, 'threshold': 44 },\n      canvas: { 'size': { 'absolute': { 'width': 400, 'height': 400 } } },\n      crop: { size: { absolute: { width: 200, height: 200 }, mode: CropMode.Safe } },\n      trim: { top: 10, left: 10, right: 10, bottom: 10 },\n      pad: { top: 30, left: 30, right: \"1%\", bottom: 30 }\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/index.mdx",
    "content": "---\nsidebar_position: 1\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n\n# JavaScript for Fastly Compute\n\nThis site is the full SDK reference for [`@fastly/js-compute`](https://www.npmjs.com/package/%40fastly/js-compute), the module that provides the interface between your JavaScript code and the [Fastly Compute](https://www.fastly.com) platform.\n\nIf you haven't used Fastly Compute before, start by [setting up your first Fastly Compute program](https://developer.fastly.com/learning/compute/) over on **developer.fastly.com** so that you have a working development environment.\n\nTo learn more about the fundamentals of using JavaScript with Fastly Compute, see our [using JavaScript](https://developer.fastly.com/learning/compute/javascript/) guide.\n\n## Understanding the JavaScript SDK\n\nIncoming HTTP requests to [domains that are attached to your Fastly service](https://developer.fastly.com/learning/concepts/) will start an instance of your application and invoke a `fetch` event, which can be bound using the `addEventListener` function:\n\n```js\naddEventListener(\"fetch\", event => event.respondWith(handleRequest(event)) );\n\nasync function handleRequest(event) {\n  const req = event.request;\n\n  return fetch(req, {\n    backend: \"example_backend\"\n  });\n}\n```\n\nFastly specific features are available as named imports from `fastly:` prefixed modules, all of which are documented in this site.  For example, the [env](https://js-compute-reference-docs.edgecompute.app/docs/fastly:env/env) function provides access to [environment variables](https://developer.fastly.com/reference/compute/ecp-env/) and can be imported into your application like this:\n\n```js\nimport { env } from \"fastly:env\"\n```\n\nJavaScript code compiled for Fastly Compute has access to a global environment with most of the globals you would expect in an ECMAScript runtime, like [`Date`](https://js-compute-reference-docs.edgecompute.app/docs/globals/Date/) and [`console`](https://js-compute-reference-docs.edgecompute.app/docs/globals/console/log).\n\n## Trying things out\n\n[Fastly fiddle](https://fiddle.fastly.dev) is an online web-based playground where you can run Fastly code.  You'll see fiddles included in many pages of our [developer hub](https://developer.fastly.com) and this SDK reference. These interactive examples can be executed right on the page by clicking the **RUN** tab:\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nasync function app(event) {\n    const request = event.request;\n    return new Response(\"You made a request to \" + request.url)\n}\naddEventListener(\"fetch\", event => {\n  event.respondWith(app(event));\n});\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nasync function app(event) {\n    const request = event.request;\n    return new Response(`You made a request to ${request.url}`)\n}\n\naddEventListener(\"fetch\", event => {\n  event.respondWith(app(event));\n});\n\n```\n\n</Fiddle>\n\nCheck out [`fiddle.fastly.dev`](https://fiddle.fastly.dev) to create your own.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/kv-store/KVStore/KVStore.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `KVStore()`\n\nThe **`KVStore` constructor** lets you connect your Fastly Compute application to a Fastly KV store.\n\nA Fastly KV store is a persistent, globally consistent key-value store. See [Data stores for Fastly services](https://developer.fastly.com/learning/concepts/edge-state/data-stores#kv-stores) for initialization and usage details.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew KVStore(name)\n```\n\n> **Note:** `KVStore()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Define a KV store instance using the resource link name.\n  \n### Return value\n\nA new `KVStore` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no KV Store exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name does not start with an ascii alphabetical character \n  - Thrown if the provided name contains control characters `(\\u0000-\\u001F)`\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then read back the value and return it to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/kv-store/KVStore/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# KVStore.prototype.delete\n\nDeletes the value associated with the key `key` in the KV store.\n\n## Syntax\n\n```js\ndelete(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the KV-store.\n\n### Return value\n\nReturns `undefined`\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is any of the strings `\"\"`, `\".\"`, or `\"..\"`\n    - Starts with the string `\".well-known/acme-challenge/\"`\n    - Contains any of the characters `\"#;?^|\\n\\r\"`\n    - Is longer than 1024 characters\n    - Does not exist\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then delete the entry.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n  await files.delete('hello')\n\n  const entry = await files.get('hello')\n  if (entry) {\n    return new Response(await entry.text())\n  } else {\n    return new Response('no file named hello exists')\n  }\n\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/kv-store/KVStore/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# KVStore.prototype.get\n\n▸ **get**(): `string`\n\nGets the value associated with the key `key` in the KV store.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the KV-store.\n\n### Return value\n\nIf the key does not exist in the KV store, this returns a `Promise` which resolves with `null`.\n\nIf the key does exist in the KV store, this returns a `Promise` which resolves with an `KVStoreEntry`.\n\n## Description\n\nSend the given message, converted to a string, to this KVStore instance's endpoint.\n\nThe `get()` method requires its `this` value to be a [`KVStore`](../KVStore.mdx) object.\n\nIf the `this` value does not inherit from `KVStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is any of the strings `\"\"`, `\".\"`, or `\"..\"`\n    - Starts with the string `\".well-known/acme-challenge/\"`\n    - Contains any of the characters `\"#;?^|\\n\\r\"`\n    - Is longer than 1024 characters\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then read back the value and return it to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/kv-store/KVStore/prototype/list.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStore.prototype.list\n\nThe **`list()`** can be used to list the keys of a store.\n\n## Syntax\n\n```js\nlist(options?)\n```\n\n### Parameters\n\n- `options` _: object_ _**optional**_\n  - List options supporting properties:\n  - `cursor` _: string_ _**optional**_\n    - The cursor used to pick up from a previous iteration.\n  - `limit` _: number_ _**optional**_\n    - The maximum number of keys to return.\n  - `prefix` _: string_ _**optional**_\n    - List only those keys that start with the given string prefix.\n  - `noSync` _: boolean_ _**optional**_\n    - Do not sync the key list first, instead provide a possibly out-of-date listing. May be faster but inconsistent.\n\n### Return value\n\nReturns a `Promise` which resolves with `{ list: string[], cursor: string | undefined }`.\n\n## Example\n\nIn this example we list the keys of a KV Store named `'files'`, iterating 10 at a time, counting the total;\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from 'fastly:kv-store';\n\nasync function app(event) {\n  const files = new KVStore('files');\n\n  let cursor,\n    list,\n    total = 0;\n  do {\n    ({ cursor, list } = await files.list({ limit: 10, cursor }));\n    total += list?.length;\n  } while (list);\n\n  return new Response(`Iterated ${total} entries`);\n}\n\naddEventListener('fetch', (event) => event.respondWith(app(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/kv-store/KVStore/prototype/put.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# KVStore.prototype.put\n\nThe **`put()`** method stores a `value` into the KV store under a `key`.\n\n> **Note**: KV stores are eventually consistent, this means that the updated contents associated with the key `key` may not be available to read from all edge locations immediately and some edge locations may continue returning the previous contents associated with the key.\n\n## Syntax\n\n```js\nput(key, value, options?)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to store the supplied value under within the KV store.\n- `value` _:  ArrayBuffer | TypedArray | DataView| ReadableStream | URLSearchParams | String | string literal_\n  - The value to store within the KV store.\n- `options` _: object_ _**optional**_\n  - An insert options parameter, supporting:\n  - `metadata` _: ArrayBuffer | TypedArray | DataView_ _**optional**_\n    - Binary metadata associated with the entry, may be up to 1000 bytes.\n  - `ttl` _: number_ _**optional**_\n    - TTL for the entry\n  - `mode` _: 'overwrite' | 'add' | 'append' | 'prepend'_ _**optional**_\n    - Insert mode, defaults to 'overwrite'\n  - `gen` _: number_ _**optional**_\n    - 'generation' header specific to the version of an entry key\n\n### Return value\n\nReturns a `Promise` which resolves with `undefined` when the provided `value` has been written into the KV store.\n\n## Description\n\nStores the supplied `value` into the KV store under the supplied `key`.\n\nThe `put()` method requires its `this` value to be a [`KVStore`](../KVStore.mdx) object.\n\nIf the `this` value does not inherit from `KVStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is any of the strings `\"\"`, `\".\"`, or `\"..\"`\n    - Starts with the string `\".well-known/acme-challenge/\"`\n    - Contains any of the characters `\"#;?^|\\n\\r\"`\n    - Is longer than 1024 characters\n- `TypeError`\n  - If the provided `gen`:\n    - Is not an number\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then read back the value and return it to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/kv-store/KVStoreEntry/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.arrayBuffer()\n\nThe `arrayBuffer()` method of the `KVStoreEntry` interface takes a `KVStoreEntry` stream and reads it to completion. It returns a promise that resolves with an `ArrayBuffer`.\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an `ArrayBuffer`."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/kv-store/KVStoreEntry/prototype/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.body\n\nThe `body` read-only property of the `KVStoreEntry` interface is a `ReadableStream` of the body contents.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/kv-store/KVStoreEntry/prototype/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.bodyUsed\n\nThe `bodyUsed` read-only property of the `KVStoreEntry` interface is a `boolean` value that indicates whether the body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/kv-store/KVStoreEntry/prototype/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.json()\n\nThe `json()` method of the `KVStoreEntry` interface takes a `KVStoreEntry` stream and reads it to completion. It returns a promise which resolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a JavaScript object. This object could be anything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/kv-store/KVStoreEntry/prototype/metadata.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.metadata()\n\nThe `metadata()` method of the `KVStoreEntry` interface provides the binary metadata associated with the `KVStoreEntry`.\n\nThe metadata binary may be up to 1000 bytes, and is returned as a `Uint8Array` TypedArray buffer, if metadata is set, or null otherwise.\n\n## Syntax\n\n```js\nmetadata()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a `Uint8Array` buffer object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/kv-store/KVStoreEntry/prototype/metadataText.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.metadataText()\n\nThe `metadataText()` method of the `KVStoreEntry` interface provides a String interpretation of binary metadata associated with the `KVStoreEntry`.\n\nIf the binary data is not a valid string, an encoding error will be thrown.\n\n## Syntax\n\n```js\nmetadataText()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a String.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/kv-store/KVStoreEntry/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.text()\n\nThe `text()` method of the `KVStoreEntry` interface takes a `KVStoreEntry` stream and reads it to completion. It returns a promise that resolves with a `String`. The `KVStoreEntry `is always decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a `String`."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/logger/Logger/Logger.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Logger()`\n\nThe **`Logger` constructor** lets you connect your Fastly Compute application to a [Fastly Named Logger](https://developer.fastly.com/learning/integrations/logging/).\n\n## Syntax\n\n```js\nnew Logger(name)\n```\n\n> **Note:** `Logger()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - The Fastly Logger which should be associated with this Logger instance\n\n### Return value\n\nA new `Logger` object.\n\n## Examples\n\nIn this example we have a create a logger named `\"splunk\"` and logs the incoming request method and destination.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Logger Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^3\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nasync function app (event) {\n  let logger = new Logger(\"splunk\");\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nconst logger = new Logger(\"splunk\");\nasync function app (event) {\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/logger/Logger/prototype/log.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Logger.prototype.log\n\n▸ **log**(): `string`\n\nSends the given message, converted to a string, to this Logger instance's endpoint.\n\n**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nlog(message)\n```\n\n### Return value\n\n`undefined`.\n\n## Description\n\nSend the given message, converted to a string, to this Logger instance's endpoint.\n\nThe `log()` method requires its `this` value to be a [`Logger`](../Logger.mdx) object.\n\nIf the `this` value does not inherit from `Logger.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n## Examples\n\nIn this example we have a create a logger named `\"splunk\"` and logs the incoming request method and destination.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Logger.prototype.log Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^3\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nlet logger = new Logger(\"splunk\");\nasync function app (event) {\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nasync function app (event) {\n  let logger = new Logger(\"splunk\");\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/logger/configureConsole.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# configureConsole\n\nThe **`configureConsole()`** function allows configuring the behaviour of the `console` global JS logger.\n\n## Syntax\n\n```js\nconfigureConsole(loggingOptions)\n```\n\n### Parameters\n\n- `loggingOptions` _: object_\n  - \n  - The name has to be between 1 and 254 characters inclusive.\n  - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n\n## Examples\n\nIn this example, we disable prefixing for `console.log` and use `stderr` output for `console.error`:\n\n```js\nimport { configureConsole } from \"fastly:logger\";\n\nconfigureConsole({\n  prefixing: false,\n  stderr: true\n});\n\nasync function handleRequest(event) {\n  console.log(JSON.stringify(event.request.headers));\n  const url = new URL(event.request.url);\n  try {\n    validate(url);\n  } catch (e) {\n    console.error(`Validation error: ${e}`);\n    return new Response('Bad Request', { status: 400 });\n  }\n  return new Response('OK');\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/migration-guide/index.mdx",
    "content": "---\nsidebar_position: 1\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Migrating from v2 to v3`\n\n## SimpleCache.delete renamed to SimpleCache.purge and requires purge options to be supplied as the second parameter\n\nWe are renaming because \"purge\" is already a well-known and documented concept for removing content from Fastly's cache.\n\nThe new addition of a second argument allows the caller to decide what scope to purge the content from, currently they can choose to purge from all of Fastly (\"global\") or from the POP that contains the currently executing instance (\"pop\"). We do not provide a default option right now, in the future we may provide a default option, if we discover a common pattern is being used.\n\nHere is an example of migrating an application using `SimpleCache.delete` to `SimpleCache.purge` with the same purging behaviour:\n```diff\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const url = new URL(event.request);\n  const path = url.pathname;\n  if (url.searchParams.has('delete')) {\n-    SimpleCache.delete(path);\n+    SimpleCache.purge(path, { scope: \"global\" });\n    return new Response(page, { status: 204 });\n  }\n\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n\n```\n\n\n# `Migrating from v1 to v2`\n\n## ObjectStore renamed to KVStore\n\nWe have renamed the `ObjectStore` class to `KVStore`, and the module name from `fastly:object-store` to `fastly:kv-store`.\n\nYou will need to update your code to use the new class name and module name.\n\nBelow is the change that would need to be made for the imported module name:\n```diff\n- import { ObjectStore } from 'fastly:object-store';\n+ import { KVStore } from 'fastly:kv-store';\n```\n\nAnd this is the change that would need to be made for constructing an instance of the class:\n```diff\n- const store = new ObjectStore('my-store');\n+ const store = new KVStore('my-store');\n```\n\n\nHere is a full example of migrating an application from ObjectStore to KVStore:\n```diff\n/// <reference types=\"@fastly/js-compute\" />\n\n- import { ObjectStore } from 'fastly:object-store';\n+ import { KVStore } from 'fastly:kv-store';\n\nasync function app(event) {\n-   const files = new ObjectStore('files');\n+   const files = new KVStore('files');\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/secret-store/SecretStore/SecretStore.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `SecretStore()`\n\nThe **`SecretStore` constructor** lets you connect your Fastly Compute application to a Fastly Secret store.\n\nA secret store is a persistent, globally distributed store for secrets accessible to Fastly Compute services during request processing.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew SecretStore(name)\n```\n\n> **Note:** `SecretStore()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Define a Secret Store instance using the resource link name.\n  \n### Return value\n\nA new `SecretStore` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Secret Store exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name contains characters other than letters, numbers, dashes (-), underscores (_), and periods (.)\n\n## Examples\n\nIn this example we connect to a Secret Store named `'secrets'` and retrieve a secret named `'cat-api-key'` use the value in a Request header.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SecretStore } from \"fastly:secret-store\";\n\nasync function app(event) {\n  const secrets = new SecretStore('secrets')\n\n  const catApiKey = await secrets.get('cat-api-key')\n\n  return fetch('/api/cat', {\n    headers: {\n      'cat-api-key': catApiKey.plaintext()\n    }\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/secret-store/SecretStore/fromBytes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# fromBytes\n\nThe **`fromBytes()`** function is used to create an in-memory secret from an array buffer.\n\n>**Note**: This API should be avoided when possible, by instead using [SecretStore.prototype.get](./prototype/get.mdx) to obtain secure secrets.\n\n## Syntax\n\n```js\nfromBytes(new Uint8Array([1, 2, 3]))\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns a `SecretStoreEntry`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/secret-store/SecretStore/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SecretStore.prototype.get\n\n▸ **get**(): `string`\n\nGets the value associated with the key `key` in the Secret store.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the Secret Store.\n\n### Return value\n\nIf the key does not exist in the Secret Store, this returns a `Promise` which resolves with `null`.\n\nIf the key does exist in the Secret Store, this returns a `Promise` which resolves with an `SecretStoreEntry`.\n\n## Description\n\nSend the given message, converted to a string, to this SecretStore instance's endpoint.\n\nThe `get()` method requires its `this` value to be a [`SecretStore`](../SecretStore.mdx) object.\n\nIf the `this` value does not inherit from `SecretStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Is longer than 255 characters\n    - Contains characters other than letters, numbers, dashes (-), underscores (_), and periods (.)\n\n## Examples\n\nIn this example we connect to a Secret Store named `'secrets'` and retrieve a secret named `'cat-api-key'` use the value in a Request header.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SecretStore } from \"fastly:secret-store\";\n\nasync function app(event) {\n  const secrets = new SecretStore('secrets')\n\n  const catApiKey = await secrets.get('cat-api-key')\n\n  return fetch('/api/cat', {\n    headers: {\n      'cat-api-key': catApiKey.plaintext()\n    }\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/secret-store/SecretStoreEntry/prototype/plaintext.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SecretStoreEntry.prototype.plaintext\n\n▸ **plaintext**(): `string`\n\nReturns the plaintext contents of the SecretStoreEntry instance as String.\n\n## Syntax\n\n```js\nplaintext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA String\n\n### Exceptions\n\nThe `plaintext()` method requires its `this` value to be a `SecretStoreEntry` object.\nIf the `this` value does not inherit from `SecretStoreEntry.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n## Examples\n\nIn this example we connect to a Secret Store named `'secrets'` and retrieve a secret named `'cat-api-key'` use the value in a Request header.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SecretStore } from \"fastly:secret-store\";\n\nasync function app(event) {\n  const secrets = new SecretStore('secrets')\n\n  const catApiKey = await secrets.get('cat-api-key')\n\n  return fetch('/api/cat', {\n    headers: {\n      'cat-api-key': catApiKey.plaintext()\n    }\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/secret-store/SecretStoreEntry/prototype/rawBytes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SecretStoreEntry.prototype.rawBytes\n\n▸ **rawBytes**(): `Uint8Array`\n\nReturns the raw byte contents of the SecretStoreEntry instance as a Uint8Array.\n\n## Syntax\n\n```js\nrawBytes()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Uint8Array\n\n### Exceptions\n\nThe `rawBytes()` method requires its `this` value to be a `SecretStoreEntry` object.\nIf the `this` value does not inherit from `SecretStoreEntry.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/security/inspect.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# inspect\n\nThe **`inspect()`** function inspects a request using the [Fastly Next-Gen WAF](https://docs.fastly.com/en/ngwaf/).\n\n## Syntax\n\n```js\ninspect(request, config);\n```\n\n### Parameters\n\n- `request` _: Request_\n  - The Request to get a WAF determination for.\n- `config` _: object_\n  - `corp` _: string_\n    - Set a corp name for the configuration.\n    - This parameter is currently required.\n  - `workspace` _: string_\n    - Set a workspace name for the configuration.\n    - This parameter is currently required.\n  - `overrideClientIp` _: string_\n    - Specify an explicit client IP address to inspect.\n    - By default, `inspect` will use the IP address that made the request to the\n      running Compute service, but you may want to use a different IP when\n      service chaining or if requests are proxied from outside of Fastly’s\n      network.\n\n### Return value\n\nReturns an `Object` with the `inspect` response, with the following fields:\n\n- `waf_response` _: number_\n  - Security status code.\n  \n- `redirect_url` _: string | null_\n  - A redirect URL returned from Security.\n\n- `tags` _: string[]_\n  - Tags returned by Security.\n\n- `verdict` _: string_\n  - The outcome of inspecting a request with Security. It can be one of the following:\n    - `\"allow\"`\n      - Security indicated that this request is allowed.\n    - `\"block\"`\n      - Security indicated that this request should be blocked.\n    - `\"unauthorized\"`\n      - Security indicated that this service is not authorized to inspect a request.\n    - Other verdicts may be returned but not currently documented.\n\n- `decision_ms` _: number_\n  - How long Security spent determining its verdict, in milliseconds.\n  \n## Examples\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { inspect } from \"fastly:security\";\n\nasync function app(event) {\n  const res = inspect(event.request, {\n    corp: \"mycorp\",\n    workspace: \"myws\"\n  });\n  switch (res.verdict) {\n    case \"allow\":\n      return await fetch(event.request);\n    case \"block\":\n      return new Response(\"Request Blocked\", { status: 400 });\n    case \"unauthorized\":\n      return new Response(\"Unauthorized\", { status: 401 });\n    default:\n      return new Response(\"idk\", { status: 500 });\n  }\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/shielding/Shield/Shield.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `Shield()`\n\nLoad information about the given shield.\n\nReturns an object representing the shield if it is active, or throws an exception if the string is malformed or the shield doesn’t exist.\n\nShield names are defined on [this webpage](https://www.fastly.com/documentation/guides/concepts/shielding/#shield-locations), in the “shield code” column. For example, the string “pdx-or-us” will look up our Portland, OR, USA shield site, while “paris-fr” will look up our Paris site.\n\nIf you are using a major cloud provider for your primary origin site, consider looking at the “Recommended for” column, to find the Fastly POP most closely located to the given cloud provider.\n\n## Syntax\n\n```js\nnew Shield(name)\n```\n\n> **Note:** `Shield()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Shield exists with the provided name\n\n## Examples\n\nIn this example, we create a Shield instance for the Sydney, Australia shield POP. If the code is running on that shield POP, it fetches directly from origin. Otherwise, it routes the request through the shield using an encrypted connection.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n    \nimport { Shield } from \"fastly:shielding\";\n\nasync function app(event) {\n    const shield = new Shield('wsi-australia-au');\n    // If running on the shield POP, fetch from the origin directly\n    if (shield.runningOn()) {\n        return await fetch('https://http-me.fastly.com/anything', { backend: 'httpme' });\n    }\n    // Otherwise, route the request through the shield using an encrypted connection\n    return await fetch(event.request, { backend: shield.encryptedBackend() });\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/shielding/Shield/prototype/encryptedBackend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Shield.prototype.encryptedBackend\n\n▸ **encryptedBackend**(configuration?): `Backend`\n\nReturns a `Backend` representing an encrypted connection to the POP.\n\nFor reference, this is almost always the backend that you want to use. Only use [`Shield::unencryptedBackend`](./unencryptedBackend.mdx) in situations in which you are 100% sure that all the data you will send and receive over the backend is already encrypted.\n\n## Parameters\n\n- `configuration` _: object_ _**optional**_\n  - `firstByteTimeout` _: number_ _**optional**_\n    - An optional first byte timeout (in milliseconds) to set on the returned backend.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/shielding/Shield/prototype/runningOn.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Shield.prototype.runningOn\n\n▸ **runningOn**(): `boolean`\n\nReturns whether we are currently operating on the given shield.\n\nTechnically, this may also return true in very isolated incidents in which Fastly is routing traffic from the target shield POP to the POP that this code is running on, but in these situations the results should be approximately identical.\n\n(For example, it may be the case that you are asking to shield to ‘pdx-or-us’. But, for load balancing, performance, or other reasons, Fastly is temporarily shifting shielding traffic from Portland to Seattle. In that case, this function may return true for hosts running on ‘bfi-wa-us’, our Seattle site, because effectively the shield has moved to that location. This should give you a slightly faster experience than the alternative, in which this function would return false, you would try to forward your traffic to the Portland site, and then that traffic would be caught and redirected back to Seattle.)\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/shielding/Shield/prototype/unencryptedBackend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Shield.prototype.unencryptedBackend\n\n▸ **unencryptedBackend**(configuration?): `Backend`\n\nReturns a `Backend` representing an unencrypted connection to the POP.\n\nGenerally speaking, we encourage users to use [`Shield::encryptedBackend`](./encryptedBackend.mdx) instead of this function. Data sent over this backend – the unencrypted version – will be sent over the open internet, with no protections. In most cases, this is not what you want. However, in some cases – such as when you want to ship large data blobs that you know are already encrypted — using these backends can prevent a double-encryption performance penalty.\n\n## Parameters\n\n- `configuration` _: object_ _**optional**_\n  - `firstByteTimeout` _: number_ _**optional**_\n    - An optional first byte timeout (in milliseconds) to set on the returned backend."
  },
  {
    "path": "documentation/versioned_docs/version-3.39.3/websocket/createWebsocketHandoff.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# createWebsocketHandoff\n\nThe **`createWebsocketHandoff()`** function creates a Response instance which informs Fastly to pass the original Request through Websocket, to the declared backend.\n\n## Syntax\n\n```js\ncreateWebsocketHandoff(request, backend)\n```\n\n### Parameters\n\n- `request` _: Request_\n  - The request to pass through Websocket.\n- `backend` _: string_\n  - The name of the backend that Websocket should send the request to.\n  - The name has to be between 1 and 254 characters inclusive.\n  - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n\n### Return value\n\nA Response instance is returned, which can then be used via `event.respondWith`.\n\n## Examples\n\nIn this example application requests to the path `/stream` and sent handled via Websocket.\n\n```js\nimport { createWebsocketHandoff } from \"fastly:websocket\";\n\nasync function handleRequest(event) {\n  try {\n    const url = new URL(event.request.url);\n    if (url.pathname === '/stream') {\n      return createWebsocketHandoff(event.request, 'websocket_backend');\n    } else {\n      return new Response('oopsie, make a request to /stream for some websocket goodies', { status: 404 });\n    }\n  } catch (error) {\n    console.error({error});\n    return new Response(error.message, {status:500})\n  }\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/acl/Acl/open.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Acl.open()\n\nOpens the ACL with the given name, returning a new `Acl` instance with the given name on success.\n\n## Syntax\n\n```js\nAcl.open(name)\n```\n\n### Return value\n\nAn `Acl` instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/acl/Acl/prototype/lookup.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Acl.prototype.lookup()\n\nThe **`lookup(ipAddress)`** method returns the name associated with the `Acl` instance.\n\n## Syntax\n\n```js\nacl.lookup(ipAddress)\n```\n\n### Parameters\n\n- `ipAddress` _: string_\n  - IPv4 or IPv6 address to lookup\n\n### Return value\n\nAn Object of the form `{ action: 'ALLOW' | 'BlOCK', prefix: string }`, where `prefix` is the IP\naddress prefix that was matched in the ACL.\n\n## Example\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Acl } from 'fastly:acl';\naddEventListener('fetch', async (evt) => {\n  const myAcl = Acl.open('myacl');\n  const match = await myAcl.lookup(evt.client.address);\n  evt.respondWith(new Response(match?.action === 'BLOCK' ? 'blocked' : 'allowed'));\n});\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/backend/Backend/Backend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Backend()`\n\nThe **`Backend` constructor** lets you dynamically create new [Fastly Backends](https://developer.fastly.com/reference/api/services/backend/) for your Fastly Compute service.\n\n>**Note**: Dynamic backends are by default disabled at the Fastly service level. Contact [Fastly Support](https://support.fastly.com/hc/en-us/requests/new?ticket_form_id=360000269711) to request dynamic backends on Fastly Services.\n\nTo disable the usage of dynamic backends, see [enforceExplicitBackends](../enforceExplicitBackends.mdx).\n\n## Syntax\n\n```js\nnew Backend(backendConfiguration)\n```\n\n> **Note:** `Backend()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `backendConfiguration`\n\n  - : An Object which contains all the configuration options to apply to the newly created Backend.\n\n    - `name` _: string_\n      - The name of the backend.\n      - The name has to be between 1 and 254 characters inclusive.\n      - The name can be whatever you would like, as long as it does not match the name of any of the static service backends nor match any other dynamic backends built during a single execution of the application.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n    - `target` _: string_\n      - A hostname, IPv4, or IPv6 address for the backend as well as an optional port.\n      - The target has to be at-least 1 character.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. Is null, undefined, an empty string, not a valid IP address or host, or is the string `::`\n    - `hostOverride` _: string_ _**optional**_\n      - If set, will force the HTTP Host header on connections to this backend to be the supplied value.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `connectTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for a connection to this backend to be established.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `firstByteTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `betweenBytesTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend.\n      - If exceeded, the response received so far will be considered complete and the fetch will end.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `useSSL` _: boolean_ _**optional**_\n      - Whether or not to require TLS for connections to this backend.\n    - `dontPool` _: boolean_ _**optional**_\n      - Determine whether or not connections to the same backend should be pooled across different sessions.\n      - Fastly considers two backends “the same” if they're registered with the same name and the exact same settings.\n      - In those cases, when pooling is enabled, if Session 1 opens a connection to this backend it will be left open, and can be re-used by Session 2.\n      - This can help improve backend latency, by removing the need for the initial network / TLS handshake(s).\n      - By default, pooling is enabled for dynamic backends.\n    - `tlsMinVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Minimum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `tlsMaxVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Maximum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `certificateHostname` _: string_ _**optional**_\n      - Define the hostname that the server certificate should declare.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `caCertificate` _: string_ _**optional**_\n      - The CA certificate to use when checking the validity of the backend.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `ciphers` _: string_ _**optional**_\n      - List of OpenSSL ciphers to support for connections to this origin.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - [List of ciphers supported by Fastly](https://developer.fastly.com/learning/concepts/routing-traffic-to-fastly/#use-a-tls-configuration).\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `sniHostname` _: string_ _**optional**_\n      - The SNI hostname to use on connections to this backend.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `clientCertificate` _: object_ _**optional**_\n      - The client certificate to provide for the TLS handshake\n      - `certificate` _: string_\n        - The PEM certificate string.\n      - `key` _: SecretStoreEntry_\n        - The `SecretStoreEntry` to use for the key, created via [`SecretStore.prototype.get`](../../fastly:secret-store/SecretStore/prototype/get.mdx) or alteratively via [`SecretStore.fromBytes`](../../fastly:secret-store/SecretStore/fromBytes.mdx).\n    - `httpKeepalive` _: number_ _**optional**_\n      - Enable HTTP keepalive, setting the timout in milliseconds.\n    - `tcpKeepalive` _: boolean | object_ _**optional**_\n      - Enable TCP keepalive. When an object, optionally setting the keepalive configuration options.\n      - `timeSecs` _: number_ _**optional**_\n        - Configure how long to wait after the last sent data over the TCP connection before starting to send TCP keepalive probes.\n      - `intervalSecs` _: number_ _**optional**_\n        - Configure how long to wait between each TCP keepalive probe sent to the backend to determine if it is still active.\n      - `probes` _: number_ _**optional**_\n        - Number of probes to send to the backend before it is considered dead.\n    - `grpc` _: boolean_ _**optional**_\n      - **_Experimental feature_**\n      - When enabled, sets that this backend is to be used for gRPC traffic. \n      - _Warning: When using this experimental feature, no guarantees are provided for behaviours for backends that do not provide gRPC traffic._\n\nAll optional generic options can have their defaults set via [`setDefaultDynamicBackendConfig()`](../setDefaultDynamicBackendConfig.mdx).\n\nThis includes all configuration options above except for `name`, `target`, `hostOverride`, `sniHostname` and `grpc`.\n\n### Return value\n\nA new `Backend` object.\n\n## Examples\n\nIn this example an explicit Dynamic Backend is created and supplied to the fetch request, the response is then returned to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Explicit Dynamic Backend Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\",\n    connectTimeout: 1000,\n    firstByteTimeout: 15000,\n    betweenBytesTimeout: 10000,\n    useSSL: true,\n    tlsMinVersion: 1.3,\n    tlsMaxVersion: 1.3,\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\",\n    connectTimeout: 1000,\n    firstByteTimeout: 15000,\n    betweenBytesTimeout: 10000,\n    useSSL: true,\n    tlsMinVersion: 1.3,\n    tlsMaxVersion: 1.3,\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/backend/Backend/exists.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.exists()\n\nThe **`Backend.exists()`** method returns a boolean indicating if a Backend with the given name exists or not.\n\n## Syntax\n\n```js\nexists(name)\n```\n\n### Return value\n\nA boolean indicating if a Backend with the given name exists or not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/backend/Backend/fromName.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.fromName()\n\nReturns the `Backend` instance with the given name, if one exists. If one does not exist, an error is thrown.\n\n## Syntax\n\n```js\nfromName(name)\n```\n\n### Return value\n\nA `Backend` instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/backend/Backend/health.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.health()\n\n:::info\n\nThis method is deprecated, use [`Backend.prototype.health`](./prototype/health.mdx) instead.\n\n:::\n\nThe **`Backend.health()`** method returns a string representing the health of the given Backend instance.\n\n## Syntax\n\n```js\nBackend.health(backend)\n```\n\n### Return value\n\nA string representing the health of the specified Backend value.\n\nPossible values are:\n- `\"healthy\"` - The backend's health check has succeeded, indicating the backend is working as expected and should receive requests.\n- `\"unhealthy\"` - The backend's health check has failed, indicating the backend is not working as expected and should not receive requests.\n- `\"unknown\"` - The backend does not have a health check configured.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/backend/Backend/prototype/betweenBytesTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.betweenBytesTimeout\n\nThe read-only **`betweenBytesTimeout`** property of a `Backend` instance is an integer number\nproviding the between bytes timeout for this backend in milliseconds.\n\nWhen not set or in environments that do not support this property (such as Viceroy), `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/backend/Backend/prototype/connectTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.connectTimeout\n\nThe read-only **`connectTimeout`** property of a `Backend` instance is an integer number\nproviding the connect timeout for this backend in milliseconds.\n\nWhen not set or in environments that do not support this property (such as Viceroy), `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/backend/Backend/prototype/firstByteTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.firstByteTimeout\n\nThe read-only **`firstByteTimeout`** property of a `Backend` instance is an integer number\nproviding the first byte timeout for this backend in milliseconds.\n\nWhen not set or in environments that do not support this property (such as Viceroy), `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/backend/Backend/prototype/health.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.prototype.health()\n\nThe **`Backend.prototype.health()`** method returns a string representing the health of the given Backend instance.\n\n## Syntax\n\n```js\nhealth()\n```\n\n### Return value\n\nA string representing the health of the specified Backend value.\n\nPossible values are:\n- `\"healthy\"` - The backend's health check has succeeded, indicating the backend is working as expected and should receive requests.\n- `\"unhealthy\"` - The backend's health check has failed, indicating the backend is not working as expected and should not receive requests.\n- `\"unknown\"` - The backend does not have a health check configured.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/backend/Backend/prototype/hostOverride.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.hostOverride\n\nThe read-only **`hostOverride`** property of a `Backend` instance is the host header\noverride string used when sending requests to this backend.\n\n## Value\n\nA `string`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/backend/Backend/prototype/httpKeepaliveTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.httpKeepaliveTime\n\nThe read-only **`httpKeepaliveTime`** property of a `Backend` instance is the HTTP keepalive\ntime for this backend in milliseconds, or 0 if no keepalive is set.\n\n## Value\n\nA `number`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/backend/Backend/prototype/isDynamic.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.isDynamic\n\nThe read-only **`isDynamic`** property of a `Backend` instance is a boolean\nindicating if the backend was dynamically created for this service.\n\n## Value\n\nA `boolean`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/backend/Backend/prototype/isSSL.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.isSSL\n\nThe read-only **`isSSL`** property of a `Backend` instance is a boolean\nindicating if the backend is using an SSL connection.\n\n## Value\n\nA `boolean`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/backend/Backend/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# name\n\nThe read-only **`name`** property of the backend returns the backend name string.\n\n## Value\n\nA `string`.\n\n## Description\n\nProvides the name of the backend.\n\n## Examples\n\n### Using name\n\nThe following example logs the string value of a [Backend](../Backend.mdx) object:\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Backend.prototype.name Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\\\"@fastly/js-compute\\\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.name); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.name); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/backend/Backend/prototype/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.port\n\nThe read-only **`port`** property of a `Backend` instance is the port number\nof this backend.\n\n## Value\n\nA `number`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/backend/Backend/prototype/target.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.target\n\nThe read-only **`target`** property of a `Backend` instance is the host string\nthis backend is configured to use.\n\n## Value\n\nA `string`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/backend/Backend/prototype/tcpKeepalive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.tcpKeepalive\n\nThe read-only **`tcpKeepalive`** property of a `Backend` instance returns an object providing\nthe TCP keepalive configuration, if any, otherwise returning `null` if TCP keepalive is not enabled.\n\nThis object has the following properties:\n- `timeSecs` _: number or null._\n  - Configure how long to wait after the last sent data over the TCP connection before starting to send TCP keepalive probes.\n- `intervalSecs` _: number or null._\n  - Configure how long to wait between each TCP keepalive probe sent to the backend to determine if it is still active.\n- `probes` _: number or null._\n  - Number of probes to send to the backend before it is considered dead.\n\n## Value\n\nA `Object` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/backend/Backend/prototype/tlsMaxVersion.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.tlsMaxVersion\n\nThe read-only **`tlsMaxVersion`** property of a `Backend` instance is the max TLS version\nit is configured to use, as a number, either `1.0`, `1.1`, `1.2`, or `1.3`.\n\nWhen not used, or for environments that do not support this feature, such as Viceroy, `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/backend/Backend/prototype/tlsMinVersion.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.tlsMinVersion\n\nThe read-only **`tlsMinVersion`** property of a `Backend` instance is the max TLS version\nit is configured to use, as a number, either `1.0`, `1.1`, `1.2`, or `1.3`.\n\nWhen not used, or for environments that do not support this feature, such as Viceroy, `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/backend/Backend/prototype/toName.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.prototype.toName()\n\n:::info\n\nThis method is deprecated, use [`Backend.prototype.name`](./name.mdx) instead.\n\n:::\n\nThe **`toName()`** method returns the name associated with the `Backend` instance.\n\n## Syntax\n\n```js\ntoName()\n```\n\n### Return value\n\nA string which contains the name of the Backend.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/backend/Backend/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# toString\n\n:::info\n\nThis method is deprecated, use [`Backend.prototype.name`](./name.mdx) instead.\n\n:::\n\nThe **`toString()`** method returns a string representing the specified Backend value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified Backend value.\n\n## Description\n\nThe [Backend](../Backend.mdx) object overrides the `toString()` method of [Object](../../../globals//Object/Object.mdx); it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For [Backend](../Backend.mdx) values, the `toString` method returns the name given to the [Backend](../Backend.mdx) object during construction.\n\nThe `toString()` method requires its `this` value to be a [Backend](../Backend.mdx) object.\n\nIf the `this` value does not inherit from `Backend.prototype`, a [TypeError](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n## Examples\n\n### Using toString()\n\nThe following example logs the string value of a [Backend](../Backend.mdx) object:\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Backend.prototype.toString Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\\\"@fastly/js-compute\\\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.toString()); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.toString()); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/backend/allowDynamicBackends.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# allowDynamicBackends\n\n:::info\n\nThis method is deprecated, and dynamic backends are now always supported when enabled at the service level. See [`enforceExplicitBackends`](./enforceExplicitBackends.mdx) instead.\n\n:::\n\nThe **`allowDynamicBackends()`** function is used to control whether or not Dynamic Backends should be allowed within this Fastly Compute Service.\n\nBy default, Dynamic Backends are enabled, but can be a potential security concern since third-party JavaScript code may send arbitrary requests, potentially including sensitive/secret data, off to destinations that the JavaScript project was not intending.\n\nUsing `allowDynamicBackends(false)` this security property can be restored to only use explicit backend definitions.\n\n>**Note**: By default, while dynamic backends are allowed in the SDK, they are by default disabled at the Fastly service level.\n\n## Syntax\n\n```js\nallowDynamicBackends(enabledOrConfig)\n```\n\n### Parameters\n\n- `enabled` _: boolean_\n  - Whether or not to allow Dynamic Backends\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/backend/enforceExplicitBackends.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# enforceExplicitBackends\n\nCall this function to enforce the security property of explicitly-defined backends, even when dynamic backends are enabled at\nthe Fastly service level.\n\nBy default, if dynamic backends are supported for the Fastly service, they will be automatically used when creating a new\n`fetch()` request. This default behaviour for dynamic backends can be a potential security concern since third-party JavaScript\ncode may send arbitrary requests, including sensitive/secret data, off to destinations that the JavaScript project was not\nintending.\n\nWhen calling this function, an optional default backend name can be provided.\n\n>**Note**: This is a separate option to the service-level dynamic backend support for Fastly services, which is by deault disabled for Fastly services.\n\nThe **`enforceExplicitBackends()`** function is used to control whether or not Dynamic Backends should be allowed within this Fastly Compute Service.\n\nBy default, Dynamic Backends are enabled, but can be a potential security concern since third-party JavaScript code may send arbitrary requests, potentially including sensitive/secret data, off to destinations that the JavaScript project was not intending.\n\nUsing `allowDynamicBackends(false)` this security property can be restored to only use explicit backend definitions.\n\n>**Note**: Dynamic Backends are disabled by default for Fastly Services. Please contact [Fastly Support](https://support.fastly.com/hc/requests/new?ticket_form_id=360000269711) to request the feature be enabled or disabled on Fastly Services.\n\n## Syntax\n\n```js\nenforceExplicitBackends(defaultBackend?)\n```\n\n### Parameters\n\n- `defaultBackend` _: string_ _**optional**_\n  - An optional default backend string name to use in `fetch()` requests.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/backend/setDefaultDynamicBackendConfig.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# setDefaultDynamicBackendConfig()\n\nThe **`setDefaultDynamicBackendConfig()`** allows setting backend configuration defaults that should apply to any newly created dynamic backends via the `new Backend()` constructor.\n\n### Parameters\n\n- `defaultDynamicBackendConfig`\n\n  - : An Object which contains the generic configuration options to apply to newly created Backends.\n    - `connectTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for a connection to this backend to be established.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `firstByteTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `betweenBytesTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend.\n      - If exceeded, the response received so far will be considered complete and the fetch will end.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `useSSL` _: boolean_ _**optional**_\n      - Whether or not to require TLS for connections to this backend.\n    - `dontPool` _: boolean_ _**optional**_\n      - Determine whether or not connections to the same backend should be pooled across different sessions.\n      - Fastly considers two backends “the same” if they're registered with the same name and the exact same settings.\n      - In those cases, when pooling is enabled, if Session 1 opens a connection to this backend it will be left open, and can be re-used by Session 2.\n      - This can help improve backend latency, by removing the need for the initial network / TLS handshake(s).\n      - By default, pooling is enabled for dynamic backends.\n    - `tlsMinVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Minimum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `tlsMaxVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Maximum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `certificateHostname` _: string_ _**optional**_\n      - Define the hostname that the server certificate should declare.\n      - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `caCertificate` _: string_ _**optional**_\n      - The CA certificate to use when checking the validity of the backend.\n      - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `ciphers` _: string_ _**optional**_\n      - List of OpenSSL ciphers to support for connections to this origin.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - [List of ciphers supported by Fastly](https://developer.fastly.com/learning/concepts/routing-traffic-to-fastly/#use-a-tls-configuration).\n      - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `clientCertificate` _: object_ _**optional**_\n      - The client certificate to provide for the TLS handshake\n      - `certificate` _: string_\n        - The PEM certificate string.\n      - `key` _: SecretStoreEntry_\n        - The `SecretStoreEntry` to use for the key, created via [`SecretStore.prototype.get`](../fastly:secret-store/SecretStore/prototype/get.mdx) or alteratively via [`SecretStore.fromBytes`](../fastly:secret-store/SecretStore/fromBytes.mdx).\n    - `httpKeepalive` _: number_ _**optional**_\n      - Enable HTTP keepalive, setting the timout in milliseconds.\n    - `tcpKeepalive` _: boolean | object_ _**optional**_\n      - Enable TCP keepalive. When an object, optionally setting the keepalive configuration options.\n      - `timeSecs` _: number_ _**optional**_\n        - Configure how long to wait after the last sent data over the TCP connection before starting to send TCP keepalive probes.\n      - `intervalSecs` _: number_ _**optional**_\n        - Configure how long to wait between each TCP keepalive probe sent to the backend to determine if it is still active.\n      - `probes` _: number_ _**optional**_\n        - Number of probes to send to the backend before it is considered dead.\n\n## Syntax\n\n```js\nsetDefaultDynamicBackendConfig(defaultConfig)\n```\n\n### Return value\n\nNone.\n\n## Examples\n\nIn this example an explicit Dynamic Backend is created and supplied to the fetch request, with timeouts and TLS options provided from the default backend configuration options.\n\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Explicit Dynamic Backend Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nimport { Backend, setDefaultDynamicBackendConfig } from \"fastly:backend\";\nallowDynamicBackends(true);\nsetDefaultDynamicBackendConfig({\n  connectTimeout: 1000,\n  firstByteTimeout: 15_000,\n  betweenBytesTimeout: 10_000,\n  useSSL: true,\n  sslMinVersion: 1.3,\n  sslMaxVersion: 1.3\n});\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  // Timeouts and TLS configuration still get set from the default backend configuration above.\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\"\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nimport { Backend } from \"fastly:backend\";\nallowDynamicBackends(true);\nsetDefaultDynamicBackendConfig({\n  connectTimeout: 1000,\n  firstByteTimeout: 15_000,\n  betweenBytesTimeout: 10_000,\n  useSSL: true,\n  sslMinVersion: 1.3,\n  sslMaxVersion: 1.3\n});\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\"\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/cache/CacheEntry/age.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.age\n\nThe **`age`** method of the `CacheEntry` interface returns the current age in milliseconds of the cached item.\n\n## Syntax\n\n```js\nage()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the current age in milliseconds of the cached item."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/cache/CacheEntry/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.body\n\nThe **`body`** method of the `CacheEntry` interface retrieves the cached item contents as a `ReadableStream`.\n\nOnly one stream can be active at a time for a given `CacheEntry`. An error will be thrown if a stream is already active for this `CacheEntry`.\n\n## Syntax\n\n```js\nbody(options)\n```\n\n### Parameters\n\n- `options` _: object_ __optional__\n  - `start` _: number_\n    - The offset from which to start the range.\n  - `end` _: number_\n    - How long the range should be.\n\n### Return value\n\nA `ReadableStream` which contains the cached item contents."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/cache/CacheEntry/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.close\n\nThe **`close`** method of the `CacheEntry` interface closes the connection to the cache for this `CacheEntry`.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/cache/CacheEntry/hits.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.hits\n\nThe **`hits`** method of the `CacheEntry` interface returns the amount of cache hits for the cached item.\n\nNote: this hit count only reflects the view of the server that supplied the cached item. Due to clustering, this count may vary between potentially many servers within the data center where the item is cached. See the [clustering documentation](https://developer.fastly.com/learning/vcl/clustering/) for details, though note that the exact caching architecture of Compute is different from VCL services.\n\n## Syntax\n\n```js\nhits()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the number of cache hits to this cached item.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/cache/CacheEntry/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.length\n\nThe **`length`** method of the `CacheEntry` interface returns the size in bytes of the cached item, if known, otherwise returns `null` if the length is currently unknown.\n\nThe length of the cached item may be unknown if the item is currently being streamed into the cache without a fixed length.\n\n## Syntax\n\n```js\nlength()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` or `null` which represents the current length of the cached item.\n\n`null` is returned if the length is currently unknown."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/cache/CacheEntry/maxAge.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.maxAge\n\nThe **`maxAge`** method of the `CacheEntry` interface returns the time in milliseconds for which the cached item is considered fresh.\n\n## Syntax\n\n```js\nmaxAge()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the time in milliseconds for which the cached item is considered fresh."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/cache/CacheEntry/staleWhileRevalidate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.staleWhileRevalidate\n\nThe **`staleWhileRevalidate`** method of the `CacheEntry` interface returns the time in milliseconds for which a cached item can safely be used despite being considered stale.\n\n## Syntax\n\n```js\nstaleWhileRevalidate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the time in milliseconds for which a cached item can safely be used despite being considered stale."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/cache/CacheEntry/state.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.state\n\nThe **`state`** method of the `CacheEntry` interface returns a `CacheState` instance which reflects the current state of this `CacheEntry` instance.\n\n## Syntax\n\n```js\nstate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `CacheState` instance which reflects the current state of this `CacheEntry` instance."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/cache/CacheEntry/userMetadata.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.userMetadata\n\nThe **`userMetadata`** method of the `CacheEntry` interface returns the user-controlled metadata associated with the cached item.\n\n## Syntax\n\n```js\nuserMetadata()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nAn `ArrayBuffer` which contains the user-controlled metadata associated with the cached item."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/cache/CacheState/found.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheState.found\n\nThe **`found`** method of the `CacheState` interface returns `true` if a cached item was located.\n\nEven if an cached item is found, the cached item might be stale and require updating. Use `mustInsertOrUpdate()` to determine whether this transaction client is expected to update the cached item.\n\n## Syntax\n\n```js\nfound()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `boolean` which represents whether a cached item was located or not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/cache/CacheState/mustInsertOrUpdate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheState.mustInsertOrUpdate\n\nThe **`mustInsertOrUpdate`** method of the `CacheState` interface returns `true` if a fresh cache item was not found, and this transaction client is expected to insert a new item or update a stale item.\n\n\n## Syntax\n\n```js\nmustInsertOrUpdate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `boolean` which represents whether a fresh cached item was found not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/cache/CacheState/stale.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheState.stale\n\nThe **`stale`** method of the `CacheState` interface returns `true` if the cached item is stale.\n\nA cached item is stale if its age is greater than its `maxAge` period.\n\n## Syntax\n\n```js\nstale()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `boolean` which represents whether the cached item is stale or not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/cache/CacheState/usable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheState.usable\n\nThe **`usable`** method of the `CacheState` interface returns `true` if the cached item is usable.\n\nA cached item is usable if its age is less than the sum of the `maxAge` and `staleWhileRevalidate` periods.\n\n## Syntax\n\n```js\nusable()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `boolean` which represents whether a cached item is usable or not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/cache/CoreCache/insert.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CoreCache.insert\n\nPerforms a non-transactional insertion into the cache, returning a `FastlyBody` instance for providing the cached object itself.\nFor the insertion to complete successfully, the object must be written into the returned `FastlyBody` instance, and then `FastlyBody.protoype.close` must be called.\nIf `FastlyBody.prototype.close` does not get called, the insertion is considered incomplete, and any concurrent lookups that may be reading from the object as it is streamed into the cache may encounter a streaming error.\n\nNote: Like `CoreCache.lookup()`, `CoreCache.insert()` may race with concurrent lookups or insertions, and will unconditionally overwrite existing cached items rather than allowing for revalidation of an existing object.\nThe transactional equivalent of this function is `TransactionCacheEntry.insert()`, which may only be called following a `CoreCache.transactionLookup()` call and the returned `CacheEntry` when has a state where `CacheState.mustInsertOrUpdate()` returns true.\n\n## Syntax\n\n```js\ninsert(key, options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - A cache key which is a string with a length of up to 8,135 that identify a cached item.\n  - The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n- `options` _: object_\n  - `headers` _: HeadersInit_ __optional__\n    - The headers act as additional factors in object selection, and the choice of which headers to factor in is determined during insertion, via the `vary` property within `TransactionInsertOptions`.\n    - A lookup will succeed when there is at least one cached item that matches lookup’s `key`, and all of the lookup’s headers included in the cache items’ `vary` list match the corresponding headers in that cached item.\n    - A typical example is a cached HTTP response, where the request had an \"Accept-Encoding\" header. In that case, the origin server may or may not decide on a given encoding, and whether that same response is suitable for a request with a different (or missing) Accept-Encoding header is determined by whether Accept-Encoding is listed in Vary header in the origin’s response.\n    - Note: These headers are narrowly useful for implementing cache lookups incorporating the semantics of the HTTP Vary header.\n  - `maxAge` _: number_ __optional__\n    - Sets the “time to live” for the cache item in milliseconds: The time for which the item will be considered fresh.\n  - `vary` _: array_ __optional__\n    - Sets the list of headers that must match when looking up this cached item.\n  - `initialAge` _: number_ __optional__\n    - Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n    - The initial age is 0 by default.\n  - `staleWhileRevalidate` _: number_ __optional__\n    - Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n    - Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n    - The methods `CacheState.protoype.usable` and `CacheState.protoype.stale` can be used to determine the current state of an item.\n    - The stale-while-revalidate period is 0 by default.\n  - `surrogateKeys` _: array_ __optional__\n    - Sets the surrogate keys that can be used for purging this cached item.\n    - Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item’s TTL to elapse, or overwriting the item with insert().\n    - Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n    - [See the Fastly surrogate keys guide for details.](https://docs.fastly.com/en/guides/working-with-surrogate-keys)\n  - `length` _: number_ __optional__\n    - Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n    - It is preferable to provide a length, if possible.\n    - Clients that begin streaming the item’s contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n  - `userMetadata` _: ArrayBufferView | ArrayBuffer | URLSearchParams | string_ __optional__\n    - Sets the user-defined metadata to associate with the cached item.\n  - `sensitive` _: boolean_ __optional__\n    - Enable or disable PCI/HIPAA-compliant non-volatile caching.\n    - By default, this is false.\n    - [See the Fastly PCI-Compliant Caching and Delivery documentation for details.](https://docs.fastly.com/products/pci-compliant-caching-and-delivery)\n\n### Return value\n\nReturns a `FastlyBody`.\n\n### Exceptions\n\n- If the provided `key`:\n  - Cannot be coerced to a string\n  - Is an empty string\n  - Is longer than 8135 characters\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/cache/CoreCache/lookup.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# CoreCache.lookup\n\nPerform a non-transactional lookup into the cache, returning a CacheEntry if a usable cached item was found.\nA cached item is usable if its age is less than the sum of its TTL and its stale-while-revalidate period. Items beyond that age are unusably stale.\n\nNote: A non-transactional lookup will not attempt to coordinate with any concurrent cache lookups.\nIf two instances of the service perform a lookup at the same time for the same cache key, and the item is not yet cached, they will both return `null`.\nWithout further coordination, they may both end up performing the work needed to insert() the item (which usually involves origin requests and/or computation) and racing with each other to insert.\nTo resolve such races between concurrent lookups, use `CoreCache.transactionLookup()` instead.\n\n## Syntax\n\n```js\nlookup(key, options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - A cache key which is a string with a length of up to 8,135 that identify a cached item.\n  - The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n\n- `options` _: object_\n  - `headers` _: HeadersInit_ __optional__\n    - The headers act as additional factors in object selection, and the choice of which headers to factor in is determined during insertion, via the `vary` property within `TransactionInsertOptions`.\n    - A lookup will succeed when there is at least one cached item that matches lookup’s `key`, and all of the lookup’s headers included in the cache items’ `vary` list match the corresponding headers in that cached item.\n    - A typical example is a cached HTTP response, where the request had an \"Accept-Encoding\" header. In that case, the origin server may or may not decide on a given encoding, and whether that same response is suitable for a request with a different (or missing) Accept-Encoding header is determined by whether Accept-Encoding is listed in Vary header in the origin’s response.\n    - Note: These headers are narrowly useful for implementing cache lookups incorporating the semantics of the HTTP Vary header.\n\n### Return value\n\nReturns `CacheEntry` if a usable cached item was found, otherwise returns `null`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/cache/CoreCache/transactionLookup.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# CoreCache.transactionLookup\n\nPerform a transactional lookup into the cache, returning a `TransactionCacheEntry` instance.\n\nTransactions coordinate between concurrent actions on the same cache key, incorporating concepts of [request collapsing](https://developer.fastly.com/learning/concepts/request-collapsing/) and [revalidation](https://developer.fastly.com/learning/concepts/stale/), though at a lower level that does not automatically interpret HTTP semantics.\n\nRequest Collapsing:\nIf there are multiple concurrent calls to `CoreCache.transactionLookup()` for the same item and that item is not present,\njust one of the callers will be instructed to insert the item into the cache as part of the transaction.\nThe other callers will block until the metadata for the item has been inserted, and can then begin streaming its contents out of the cache at the same time that the inserting caller streams them into the cache.\n\nRevalidation:\nSimilarly, if an item is usable but stale, and multiple callers attempt a `CoreCache.transactionLookup()` concurrently, they will all be given access to the stale item, but only one will be designated to perform an asynchronous update (or insertion) to freshen the item in the cache.\n\n## Syntax\n\n```js\ntransactionLookup(key, options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - A cache key which is a string with a length of up to 8,135 that identify a cached item.\n  - The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n\n- `options` _: object_\n  - `headers` _: HeadersInit_ __optional__\n    - The headers act as additional factors in object selection, and the choice of which headers to factor in is determined during insertion, via the `vary` property within `TransactionInsertOptions`.\n    - A lookup will succeed when there is at least one cached item that matches lookup’s `key`, and all of the lookup’s headers included in the cache items’ `vary` list match the corresponding headers in that cached item.\n    - A typical example is a cached HTTP response, where the request had an \"Accept-Encoding\" header. In that case, the origin server may or may not decide on a given encoding, and whether that same response is suitable for a request with a different (or missing) Accept-Encoding header is determined by whether Accept-Encoding is listed in Vary header in the origin’s response.\n    - Note: These headers are narrowly useful for implementing cache lookups incorporating the semantics of the HTTP Vary header.\n\n### Return value\n\nReturns an instance of `TransactionCacheEntry`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/cache/SimpleCache/SimpleCache.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `SimpleCache`\n\nThe **`SimpleCache` class** provides a simplified interface to inserting and retrieving entries from Fastly's Cache.\n\nAll the methods on the class are static methods, there are no instance methods.\n\n\n## Examples\n\nIn this example we attempt to retrieve an entry from the Fastly Cache, if the entry does not exist, we create the content and insert it into the Fastly Cache before finally returning.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const path = new URL(event.request.url).pathname;\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/cache/SimpleCache/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCache.get\n\n▸ **get**(): `string`\n\nGets the entry associated with the key `key` from the cache.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the cache.\n\n### Return value\n\nIf the key does not exist in the cache, this returns `null`.\n\nIf the key does exist in the cache, this returns a `SimpleCacheEntry`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n## Examples\n\nIn this example we attempt to retrieve an entry from the Fastly Cache, and return a message stating whether the entry was in the Fastly Cache or not.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const path = new URL(event.request.url).pathname;\n  let page = SimpleCache.get(path);\n  return new Response(page ? `${path} is in the cache` : `${path} is not in the cache`, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/cache/SimpleCache/getOrSet.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCache.getOrSet\n\nThe **`getOrSet()`** method attempts to get an entry from the cache for the supplied `key`. If no entry is found (or has expired), the supplied `set` function is executed and its result is inserted into the cache under the supplied `key` and for the supplied `ttl` (Time-To-Live) duration, provided in seconds.\n\n## Syntax\n\n```js\ngetOrSet(key, set)\ngetOrSet(key, set, length)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to lookup and/or store the supplied entry under within the cache.\n- `set` _:  Function_\n  - The function to execute if and only if the cache does not have a usable entry for the supplied `key`.\n    The function should return a Promise which resolves with the following interface:\n    - `value` _:  ArrayBuffer | TypedArray | DataView | ReadableStream | URLSearchParams | String | string literal_\n      - The value to store within the cache.\n    - `ttl` _: number_\n      - The maximum number of seconds to store the supplied entry in the cache.\n    - `length` _: number_ __optional__\n      - The length of the value being stored within the cache. This is only used when the `value` is a `ReadableStream`.\n\n### Return value\n\nReturns a `SimpleCacheEntry`.\n\n### Exceptions\n\n- If the provided `key`:\n  - Cannot be coerced to a string\n  - Is an empty string\n  - Is longer than 8135 characters\n- If the provided `ttl`:\n  - Cannot be coerced to a number\n  - Is a negative number\n  - Is `NaN`\n  - Is Inifinity\n\n## Examples\n\nIn this example we attempt to retrieve an entry from the Fastly Cache. If the entry does not exist, we create the content and insert it into the Fastly Cache before finally returning.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const path = new URL(event.request.url).pathname;\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/cache/SimpleCache/purge.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# SimpleCache.purge\n\npurge the entry associated with the key `key` from the cache.\n\n## Syntax\n\n```js\npurge(key, options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to purge from within the cache.\n\n- `options` _: object_\n  - `scope` _: string_\n    - : Where to purge the content from.\n    - Possible values are:\n      - \"global\" - This will remove the content from all of Fastly.\n      - \"pop\" - This will remove the content from the POP that contains the currently executing instance.\n\n### Return value\n\nReturns `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n## Examples\n\nIn this example, when a request contains a `purge` querystring parameter, we purge the an entry from the cache.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const url = new URL(event.request.url);\n  const path = url.pathname;\n  if (url.searchParams.has('purge')) {\n    SimpleCache.purge(path, { scope: \"global\" });\n    return new Response(page, { status: 204 });\n  }\n\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/cache/SimpleCacheEntry/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the `SimpleCacheEntry` interface\ntakes the instance's stream and reads it to completion. It returns a promise\nthat resolves with an `ArrayBuffer`.\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an `ArrayBuffer`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/cache/SimpleCacheEntry/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.body\n\nThe **`body`** read-only property of the `SimpleCacheEntry` interface is a `ReadableStream` of the instance's contents.\n\n## Value\n\nA `ReadableStream`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/cache/SimpleCacheEntry/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.bodyUsed\n\nThe **`bodyUsed`** read-only property of the `SimpleCacheEntry` interface is a boolean value that indicates whether the body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/cache/SimpleCacheEntry/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.json()\n\nThe **`json()`** method of the `SimpleCacheEntry` interface takes\na `SimpleCacheEntry` stream and reads it to completion. It returns a promise which\nresolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a JavaScript object. This object could be\nanything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/cache/SimpleCacheEntry/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.text()\n\nThe **`text()`** method of the `SimpleCacheEntry` interface takes the instance's stream and reads it to completion.\nIt returns a promise that resolves with a `String`.\nThe result is _always_ decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Promise that resolves with a `String`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/cache/TransactionCacheEntry/age.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.age\n\nThe **`age`** method of the `TransactionCacheEntry` interface returns the current age in milliseconds of the cached item.\n\n## Syntax\n\n```js\nage()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the current age in milliseconds of the cached item."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/cache/TransactionCacheEntry/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.body\n\nThe **`body`** method of the `TransactionCacheEntry` interface retrieves the cached item contents as a `ReadableStream`.\n\nOnly one stream can be active at a time for a given `TransactionCacheEntry`. An error will be thrown if a stream is already active for this `TransactionCacheEntry`.\n\n## Syntax\n\n```js\nbody(options)\n```\n\n### Parameters\n\n- `options` _: object_ __optional__\n  - `start` _: number_\n    - The offset from which to start the range.\n  - `end` _: number_\n    - How long the range should be.\n\n### Return value\n\nA `ReadableStream` which contains the cached item contents."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/cache/TransactionCacheEntry/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.cancel\n\nThe **`cancel`** method of the `TransactionCacheEntry` interface cancels an obligation to provide an object to the cache.\n\n\n## Syntax\n\n```js\ncancel()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/cache/TransactionCacheEntry/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.close\n\nThe **`close`** method of the `TransactionCacheEntry` interface closes the connection to the cache for this `TransactionCacheEntry`.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/cache/TransactionCacheEntry/hits.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.hits\n\nThe **`hits`** method of the `TransactionCacheEntry` interface returns the amount of cache hits for the cached item.\n\nNote: this hit count only reflects the view of the server that supplied the cached item. Due to clustering, this count may vary between potentially many servers within the data center where the item is cached. See the [clustering documentation](https://developer.fastly.com/learning/vcl/clustering/) for details, though note that the exact caching architecture of Compute is different from VCL services.\n\n## Syntax\n\n```js\nhits()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the number of cache hits to this cached item.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/cache/TransactionCacheEntry/insert.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.insert\n\nPerform a transactional cache insertion, returning a `FastlyBody` instance for providing the cached object itself.\n\nThis method should only be called when `TransactionCacheEntry.state().mustInsertOrUpdate()` is true; otherwise, an error will be thrown when attempting to perform the insertion.\n\n## Syntax\n\n```js\ninsert(options)\n```\n\n### Parameters\n\n- `options` _: object_\n  - `maxAge` _: number_ __optional__\n    - Sets the “time to live” for the cache item in milliseconds: The time for which the item will be considered fresh.\n  - `vary` _: array_ __optional__\n    - Sets the list of headers that must match when looking up this cached item.\n  - `initialAge` _: number_ __optional__\n    - Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n    - The initial age is 0 by default.\n  - `staleWhileRevalidate` _: number_ __optional__\n    - Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n    - Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n    - The methods `CacheState.protoype.usable` and `CacheState.protoype.stale` can be used to determine the current state of an item.\n    - The stale-while-revalidate period is 0 by default.\n  - `surrogateKeys` _: array_ __optional__\n    - Sets the surrogate keys that can be used for purging this cached item.\n    - Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item’s TTL to elapse, or overwriting the item with insert().\n    - Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n    - [See the Fastly surrogate keys guide for details.](https://docs.fastly.com/en/guides/working-with-surrogate-keys)\n  - `length` _: number_ __optional__\n    - Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n    - It is preferable to provide a length, if possible.\n    - Clients that begin streaming the item's contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n  - `userMetadata` _: ArrayBufferView | ArrayBuffer | URLSearchParams | string_ __optional__\n    - Sets the user-defined metadata to associate with the cached item.\n  - `sensitive` _: boolean_ __optional__\n    - Enable or disable PCI/HIPAA-compliant non-volatile caching.\n    - By default, this is false.\n    - [See the Fastly PCI-Compliant Caching and Delivery documentation for details.](https://docs.fastly.com/products/pci-compliant-caching-and-delivery)\n\n### Return value\n\nReturns a `FastlyBody`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/cache/TransactionCacheEntry/insertAndStreamBack.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.insertAndStreamBack\n\nPerform a transaction cache insertion, returning a `FastlyBody` instance for providing the cached object itself, and a `CacheEntry` instance which can be used to stream out the newly-inserted cache item.\n\nFor the insertion to complete successfully, the object must be written into the returned `FastlyBody` instance, and then `FastlyBody.protoype.close` must be called.\nIf `FastlyBody.prototype.close` does not get called, the insertion is considered incomplete, and any concurrent lookups that may be reading from the object as it is streamed into the cache may encounter a streaming error.\n\n## Syntax\n\n```js\ninsertAndStreamBack(options)\n```\n\n### Parameters\n\n- `options` _: object_\n  - `maxAge` _: number_ __optional__\n    - Sets the “time to live” for the cache item in milliseconds: The time for which the item will be considered fresh.\n  - `vary` _: array_ __optional__\n    - Sets the list of headers that must match when looking up this cached item.\n  - `initialAge` _: number_ __optional__\n    - Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n    - The initial age is 0 by default.\n  - `staleWhileRevalidate` _: number_ __optional__\n    - Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n    - Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n    - The methods `CacheState.protoype.usable` and `CacheState.protoype.stale` can be used to determine the current state of an item.\n    - The stale-while-revalidate period is 0 by default.\n  - `surrogateKeys` _: array_ __optional__\n    - Sets the surrogate keys that can be used for purging this cached item.\n    - Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item’s TTL to elapse, or overwriting the item with insert().\n    - Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n    - [See the Fastly surrogate keys guide for details.](https://docs.fastly.com/en/guides/working-with-surrogate-keys)\n  - `length` _: number_ __optional__\n    - Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n    - It is preferable to provide a length, if possible.\n    - Clients that begin streaming the item's contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n  - `userMetadata` _: ArrayBufferView | ArrayBuffer | URLSearchParams | string_ __optional__\n    - Sets the user-defined metadata to associate with the cached item.\n  - `sensitive` _: boolean_ __optional__\n    - Enable or disable PCI/HIPAA-compliant non-volatile caching.\n    - By default, this is false.\n    - [See the Fastly PCI-Compliant Caching and Delivery documentation for details.](https://docs.fastly.com/products/pci-compliant-caching-and-delivery)\n\n### Return value\n\nReturns an array where the first item is a `FastlyBody` instance and the second item is a `CacheEntry` instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/cache/TransactionCacheEntry/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.length\n\nThe **`length`** method of the `TransactionCacheEntry` interface returns the size in bytes of the cached item, if known, otherwise returns `null` if the length is currently unknown.\n\nThe length of the cached item may be unknown if the item is currently being streamed into the cache without a fixed length.\n\n## Syntax\n\n```js\nlength()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` or `null` which represents the current length of the cached item.\n\n`null` is returned if the length is currently unknown."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/cache/TransactionCacheEntry/maxAge.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.maxAge\n\nThe **`maxAge`** method of the `TransactionCacheEntry` interface returns the time in milliseconds for which the cached item is considered fresh.\n\n## Syntax\n\n```js\nmaxAge()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the time in milliseconds for which the cached item is considered fresh."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/cache/TransactionCacheEntry/staleWhileRevalidate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.staleWhileRevalidate\n\nThe **`staleWhileRevalidate`** method of the `TransactionCacheEntry` interface returns the time in milliseconds for which a cached item can safely be used despite being considered stale.\n\n## Syntax\n\n```js\nstaleWhileRevalidate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the time in milliseconds for which a cached item can safely be used despite being considered stale."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/cache/TransactionCacheEntry/state.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.state\n\nThe **`state`** method of the `TransactionCacheEntry` interface returns a `CacheState` instance which reflects the current state of this `TransactionCacheEntry` instance.\n\n## Syntax\n\n```js\nstate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `CacheState` instance which reflects the current state of this `TransactionCacheEntry` instance."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/cache/TransactionCacheEntry/update.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.update\n\nPerform an update of the cache item's metadata.\n\n## Syntax\n\n```js\nupdate(options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - A cache key which is a string with a length of up to 8,135 that identify a cached item.\n  - The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n- `options` _: object_\n  - `maxAge` _: number_ __optional__\n    - Sets the “time to live” for the cache item in milliseconds: The time for which the item will be considered fresh.\n  - `vary` _: array_ __optional__\n    - Sets the list of headers that must match when looking up this cached item.\n  - `initialAge` _: number_ __optional__\n    - Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n    - The initial age is 0 by default.\n  - `staleWhileRevalidate` _: number_ __optional__\n    - Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n    - Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n    - The methods `CacheState.protoype.usable` and `CacheState.protoype.stale` can be used to determine the current state of an item.\n    - The stale-while-revalidate period is 0 by default.\n  - `surrogateKeys` _: array_ __optional__\n    - Sets the surrogate keys that can be used for purging this cached item.\n    - Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item’s TTL to elapse, or overwriting the item with insert().\n    - Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n    - [See the Fastly surrogate keys guide for details.](https://docs.fastly.com/en/guides/working-with-surrogate-keys)\n  - `length` _: number_ __optional__\n    - Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n    - It is preferable to provide a length, if possible.\n    - Clients that begin streaming the item's contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n  - `userMetadata` _: ArrayBufferView | ArrayBuffer | URLSearchParams | string_ __optional__\n    - Sets the user-defined metadata to associate with the cached item.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/cache/TransactionCacheEntry/userMetadata.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.userMetadata\n\nThe **`userMetadata`** method of the `TransactionCacheEntry` interface returns the user-controlled metadata associated with the cached item.\n\n## Syntax\n\n```js\nuserMetadata()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nAn `ArrayBuffer` which contains the user-controlled metadata associated with the cached item."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/cache-override/CacheOverride/CacheOverride.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `CacheOverride()`\n\nThe **`CacheOverride` constructor** lets you configure the caching behavior of a `Response`.\n\nNormally, the HTTP Headers on a [`Response`](../../globals/Response/Response.mdx) would control how the [`Response`](../../globals/Response/Response.mdx) is cached,\nbut `CacheOverride` can be set on a [`Request`](../../globals/Request/Request.mdx), to define custom caching behavior.\n\n## Syntax\n\n```js\nnew CacheOverride(mode)\nnew CacheOverride(mode, init)\nnew CacheOverride(init)\n```\n\n> **Note:** `CacheOverride()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `mode` _: string_\n  - Sets the cache override mode for a request\n  - If set to:\n    - `\"none\"`: Do not override the behavior specified in the origin response’s cache control headers.\n    - `\"pass\"`: Do not cache the response to this request, regardless of the origin response’s headers.\n    - `\"override\"`: Override particular cache control settings using the `CacheOverride` object's settings.\n       This options is also the default when providing an init object directly as the first argument.\n\n- `init`\n\n  - : An Object which contains all the configuration options to apply to the newly created `CacheOverride`.\n\n    - `pci` _: boolean_ _**optional**_\n      - Override the caching behavior of this request to enable or disable PCI/HIPAA-compliant non-volatile caching.\n      - By default, this is `false`, which means the request may not be PCI/HIPAA-compliant. Set it to `true` to enable compliant caching.\n      - See the [Fastly PCI-Compliant Caching and Delivery documentation](https://docs.fastly.com/products/pci-compliant-caching-and-delivery) for details.\n\n    - `surrogateKey` _: string_ _**optional**_\n      - Override the caching behavior of this request to include the given surrogate key, provided as a header value.\n      - See the [Fastly surrogate keys guide](https://docs.fastly.com/en/guides/purging-api-cache-with-surrogate-keys) for details.\n    - `swr` _: number_ _**optional**_\n      - Override the caching behavior of this request to use the given `stale-while-revalidate` time, in seconds\n\n    - `ttl` _: number_ _**optional**_\n      - Override the caching behavior of this request to use the given Time to Live (TTL), in seconds.\n    \n    - `beforeSend` _:Function_ _**optional**_\n      - `(request: Request) => void | PromiseLike<void>`\n      - Callback to be invoked if a request is going all the way to a backend, allowing the request to be modified beforehand.\n      - See [Modifying a request as it is forwarded to a backend](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/#modifying-a-request-as-it-is-forwarded-to-a-backend) in the Fastly cache interfaces documentation for details.\n\n    - `afterSend` _: Function_ _**optional**_\n      - `(response: Response) => void | CacheOptions | PromiseLike<void | CacheOptions>`\n      - Callback to be invoked after a response has been sent, but before it is stored into the cache.\n      - Where `CacheOptions` contains:\n        - `cache` _: boolean | 'uncacheable'_ _**optional**_\n          - Whether to cache this response. By default, leaving this field empty, responses will be cached based on their cache header information.\n          - Setting this to true or false will override this default cache behaviour, setting in the cache or not setting in the cache, even if the default behaviour would have been otherwise.\n          - Setting to 'uncacheable' the response will not only not be cached, but the cache will record that the originating request led to an uncacheable response, so that future cache lookups will result in immediately going to the backend, rather than attempting to coordinate concurrent requests to reduce backend traffic.\n          - See the [Fastly request collapsing guide](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/request-collapsing/) for more details on the mechanism that `uncacheable` disables.\n        - `bodyTransformFn` _: Function_ _**optional**_\n          - `(body: Uint8Array) => Uint8Array | PromiseLike<Uint8Array>`\n          - Provide a function to be used for transforming the response body prior to caching.\n          - Body transformations are performed by specifying a transform, rather than by directly working with the body during the onAfterSend callback function, because not every response contains a fresh body: 304 Not Modified responses, which are used to revalidate a stale cached response, are valuable precisely because they do not retransmit the body.\n          - For any other response status, the backend response will contain a relevant body, and the `bodyTransformFn` will be applied to it. The original backend body is passed in to the transform function, and the function is expected to return the new body.\n      - See [Controlling cache behavior based on backend response](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/#controlling-cache-behavior-based-on-backend-response) in the Fastly cache interfaces documentation for details.\n\n### Return value\n\nA new `CacheOverride` object.\n\n## Examples\n\nIn this example we override the cache for all the requests prefixed /static/ to have a long TTL (Time To Live),  and the home page to have a short TTL and a long SWR (Stale While Revalidate).\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"CacheOverride Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { CacheOverride } from \"fastly:cache-override\";\n// In this example we override the cache for all the requests prefixed /static/ \n// to have a long TTL (Time To Live), and the home page to have a short TTL and \n// a long SWR (Stale While Revalidate).\nasync function app (event) {\n  const path = (new URL(event.request.url)).pathname;\n  let cacheOverride;\n  if (path == '/') {\n    cacheOverride = new CacheOverride('override', {ttl: 10, swr: 86_400});\n  } else if (path.startsWith('/static/')) {\n    cacheOverride = new CacheOverride('override', {ttl: 86_400});\n  } else {\n    cacheOverride = new CacheOverride('none')\n  }\n  return fetch(event.request.url, {\n    cacheOverride,\n    backend: 'origin_0'\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { CacheOverride } from \"fastly:cache-override\";\n// In this example we override the cache for all the requests prefixed /static/ \n// to have a long TTL (Time To Live), and the home page to have a short TTL and \n// a long SWR (Stale While Revalidate).\nasync function app (event) {\n  const path = (new URL(event.request.url)).pathname;\n  let cacheOverride;\n  if (path == '/') {\n    cacheOverride = new CacheOverride('override', {ttl: 10, swr: 86_400});\n  } else if (path.startsWith('/static/')) {\n    cacheOverride = new CacheOverride('override', {ttl: 86_400});\n  } else {\n    cacheOverride = new CacheOverride('none')\n  }\n  return fetch(event.request.url, {\n    cacheOverride,\n    backend: 'origin_0'\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/compute/purgeSurrogateKey.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# purgeSurrogateKey\n\nThe **`purgeSurrogateKey()`** function is used to purge the given surrogate key string from Fastly's cache.\n\nThere are two purge modes: soft purge and hard purge, with hard purge as the default which clears all items\nfrom the cache immediately. When using a soft purge, stale entries are maintained in the cache, reducing\norgin load, while also enabling stale revalidations.\n\nSee the [Fastly Purge Documentation](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/purging/#surrogate-key-purge) for more information on caching and purge operations.\n\n## Syntax\n\n```js\npurgeSurrogateKey(surrogateKey, soft?)\n```\n\n### Parameters\n\n- `surrogateKey` _: string_\n  - The surrogate key string\n- `soft?` _: boolean_\n  - Enables a soft purge, retaining stale entries in the cache. Default is a hard purge.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/compute/vCpuTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# vCpuTime\n\nThe **`vCpuTime()`** function provides the vCPU time used by the current request handler in milliseconds.\n\n## Syntax\n\n```js\nvCpuTime()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`number`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/config-store/ConfigStore/ConfigStore.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `ConfigStore()`\n\nThe **`ConfigStore` constructor** lets you access a specific [Fastly Config Store](https://www.fastly.com/documentation/reference/api/services/resources/config-store/).\n\n> **Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew ConfigStore(name);\n```\n\n> **Note:** `ConfigStore()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Defines a config store instance using the resource link name.\n\n### Return value\n\nA new `ConfigStore` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Config Store exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name does not start with an ascii alphabetical character \n  - Thrown if the provided name does not contain only ascii alphanumeric, underscore, and whitespace characters\n\n## Examples\n\nIn this example we have a resource link named \"animals\" (which is linked to a config store) and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"ConfigStore Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/config-store/ConfigStore/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# ConfigStore.prototype.get\n\nThe **`get()`** method returns the value associated with the provided key in the config-store. If the provided key does not exist in the ConfigStore then this returns `null`.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from the dictionary.\n\n### Return value\n\nA `string` representing the specified ConfigStore value or `null` if the key does not exist in the ConfigStore\n\n## Description\n\nGet a value for a key in the config-store. If the provided key does not exist in the ConfigStore then this returns `null`.\n\nThe `get()` method requires its `this` value to be a [`ConfigStore`](../../../fastly%3Aconfig-store/ConfigStore/ConfigStore.mdx) object.\n\nIf the `this` value does not inherit from `ConfigStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided key is longer than 255 in length\n  - Thrown if the provided key is an empty string\n\n## Examples\n\nIn this example we have an Edge Dictionary named \"animals\" and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"ConfigStore Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/device/Device/lookup.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Device.lookup()\n\nLook up the data associated with a particular User-Agent string.\n\n\n## Syntax\n\n```js\nlookup(userAgent)\n```\n\n### Return value\n\nIf there is data associated with the User-Agent, a `Device` instance is returned.\nOtherwise, `null` is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/device/Device/prototype/brand.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.brand\n\nThe read-only **`brand`** property of the `Device` interface is\neither a string stating the brand of the device, which can be different from the manufacturer of that device.\nIf no brand is known, the value will be `null`.\n\n\n## Value\n\nEither a string value if a brand is known, otherwise `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/device/Device/prototype/hardwareType.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.hardwareType\n\nThe read-only **`hardwareType`** property of the `Device` interface is\neither a string stating the hardware type of the device, or `null` if the hardware type is not known.\n\nA string representation of the device's primary platform hardware. The most commonly used device types are also identified via boolean variables. Because a device may have multiple device types and this variable only has the primary type, we recommend using the boolean variables for logic and using this string representation for logging.\n\n\n\n## Value\n\nEither a string value if a hardware type is known, otherwise `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/device/Device/prototype/isBot.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isBot\n\nThe read-only **`isBot`** property of the `Device` interface is\neither a boolean stating if the device is a bot, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a bot, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/device/Device/prototype/isDesktop.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isDesktop\n\nThe read-only **`isDesktop`** property of the `Device` interface is\neither a boolean stating if the device is a desktop web browser, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a desktop web browser, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/device/Device/prototype/isGameConsole.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isGameConsole\n\nThe read-only **`isGameConsole`** property of the `Device` interface is\neither a boolean stating if the device is a video game console, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a video game console, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/device/Device/prototype/isMediaPlayer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isMediaPlayer\n\nThe read-only **`isMediaPlayer`** property of the `Device` interface is\neither a boolean stating if the device is a media player (like Blu-ray players, iPod devices, and smart speakers such as Amazon Echo), or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a media player (like Blu-ray players, iPod devices, and smart speakers such as Amazon Echo), or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/device/Device/prototype/isMobile.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isMobile\n\nThe read-only **`isMobile`** property of the `Device` interface is\neither a boolean stating if the device is a mobile phone, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a mobile phone, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/device/Device/prototype/isSmartTV.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isSmartTV\n\nThe read-only **`isSmartTV`** property of the `Device` interface is\neither a boolean stating if the device is a smart TV, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a smart TV, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/device/Device/prototype/isTablet.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isTablet\n\nThe read-only **`isTablet`** property of the `Device` interface is\neither a boolean stating if the device is a tablet (like an iPad), or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a tablet (like an iPad), or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/device/Device/prototype/isTouchscreen.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isTouchscreen\n\nThe read-only **`isTouchscreen`** property of the `Device` interface is\neither a boolean stating if the device's screen is touch sensitive, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device's screen is touch sensitive, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/device/Device/prototype/model.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.model\n\nThe read-only **`model`** property of the `Device` interface is\neither a string stating the model of the device, or `null` if the model is not known.\n\n\n## Value\n\nEither a string value if a model is known, otherwise `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/device/Device/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.name\n\nThe read-only **`name`** property of the `Device` interface is\neither a string stating the name of the device, or `null` if the name is not known.\n\n\n## Value\n\nEither a string value if a name is known, otherwise `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/device/Device/prototype/toJSON.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# toJSON\n\nThe `toJSON()` method of the Device interface is a serializer;\nit returns a JSON representation of the Device object.\n\nTo get a JSON string, you can use `JSON.stringify(device)` directly; it will call `toJSON()` automatically.\n\n## Syntax\n\n```js\ntoJSON()\n```\n\n### Return value\n\nA JSON object that is the serialization of the Device object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/dictionary/Dictionary/Dictionary.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Dictionary()`\n\n:::info\n\nThis Class is deprecated\n\n:::\n\nThe **`Dictionary` constructor** lets you access a specific [Fastly Edge Dictionary](https://docs.fastly.com/en/guides/about-edge-dictionaries).\n\n**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew Dictionary(name);\n```\n\n> **Note:** `Dictionary()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - The name of the [Fastly Edge Dictionary](https://docs.fastly.com/en/guides/about-edge-dictionaries) that this `Dictionary` instance should provide access to.\n\n### Return value\n\nA new `Dictionary` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Dictionary exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name does not start with an ascii alphabetical character \n  - Thrown if the provided name does not contain only ascii alphanumeric, underscore, and whitespace characters\n\n## Examples\n\nIn this example we have an Edge Dictionary named \"animals\" and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Dictionary Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/dictionary/Dictionary/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Dictionary.prototype.get\n\n:::info\n\nThis Class is deprecated, it has been renamed to [`ConfigStore`](../../../fastly:config-store/ConfigStore/ConfigStore.mdx) and can be imported via `import { ConfigStore } from 'fastly:config-store'`\n\nThe `get()` method exists on the [`ConfigStore`](../../../fastly:config-store/ConfigStore/ConfigStore.mdx) Class.\n\n:::\n\nThe **`get()`** method returns the value associated with the provided key in the dictionary. If the provided key does not exist in the Dictionary then this returns `null`.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from the dictionary.\n\n### Return value\n\nA `string` representing the specified Dictionary value or `null` if the key does not exist in the Dictionary\n\n## Description\n\nGet a value for a key in the dictionary. If the provided key does not exist in the Dictionary then this returns `null`.\n\nThe `get()` method requires its `this` value to be a [`Dictionary`](../Dictionary.mdx) object.\n\nIf the `this` value does not inherit from `Dictionary.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided key is longer than 255 in length\n  - Thrown if the provided key is an empty string\n\n## Examples\n\nIn this example we have an Edge Dictionary named \"animals\" and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Dictionary Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/edge-rate-limiter/EdgeRateLimiter/EdgeRateLimiter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `EdgeRateLimiter()`\n\nThe **`EdgeRateLimiter` constructor** lets you open an epen a [ERL](https://docs.fastly.com/products/edge-rate-limiting) with the given ratecounter and penaltybox.\n\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew EdgeRateLimiter(rateCounter, penaltyBox)\n```\n\n> **Note:** `EdgeRateLimiter()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `rateCounter` _: RateCounter_\n  - The RateCounter instance to associate with this EdgeRateLimiter instance\n- `penaltyBox` _: PenaltyBox_\n  - The PenaltyBox instance which should be associated with this EdgeRateLimiter instance\n\n### Return value\n\nA new `EdgeRateLimiter` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided rateCounter value is not an instance of RateCounter\n  - Thrown if the provided penaltyBox value is not an instance of PenaltyBox\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/edge-rate-limiter/EdgeRateLimiter/prototype/checkRate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# EdgeRateLimiter.prototype.checkRate\n\nIncrement an entry in the rate counter and check if the entry has exceeded some average number of requests per second (RPS) over the given window.\nIf the entry is over the RPS limit for the window, add to the penaltybox for the given `timeToLive`.\n\nValid `timeToLive` is 1 minute to 60 minutes and `timeToLive` value is truncated to the nearest minute.\n\n## Syntax\n```js\ncheckRate(entry, delta, window, limit, timeToLive)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to increment and check\n- `delta` _: number_\n  - The amount to increment the `entry` by\n- `window` _: number_\n  - The time period to check across, has to be either 1 second, 10 seconds, or 60 seconds\n- `limit` _: number_\n  - The requests-per-second limit\n- `timeToLive` _: number_\n  - In minutes, how long the entry should be added into the penalty-box\n  - Valid `timeToLive` is 1 minute to 60 minutes and `timeToLive` value is truncated to the nearest minute.\n\n\n### Return value\n\nReturns `true` if the entry has exceeded the average RPS for the window, otherwise returns `false`.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `name` value can not be coerced into a string\n  - Thrown if the provided `delta` value is not a positive finite number.\n  - Thrown if the provided `window` value is not either, 1, 10, or 60.\n  - Thrown if the provided `limit` value is not a positive finite number.\n  - Thrown if the provided `timeToLive` value is not either, a number between 1 and 60 inclusively.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/edge-rate-limiter/PenaltyBox/PenaltyBox.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `PenaltyBox()`\n\nThe **`PenaltyBox` constructor** can be used with a [Edge Rate Limiter](../EdgeRateLimiter/EdgeRateLimiter.mdx) or standalone for adding and checking if some entry is in the dataset.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew PenaltyBox(name)\n```\n\n> **Note:** `PenaltyBox()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Open a PenaltyBox with the given name\n\n\n### Return value\n\nA new `PenaltyBox` object instance.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `name` value can not be coerced into a string\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/edge-rate-limiter/PenaltyBox/prototype/add.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# PenaltyBox.prototype.add\n\nAdd an `entry` into the PenaltyBox for the duration of the given `timeToLive`.\n\n## Syntax\n```js\nadd(entry, timeToLive)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n- `timeToLive` _: number_\n  - In minutes, how long the entry should be added into the PenaltyBox\n  - Valid `timeToLive` is 1 minute to 60 minutes and `timeToLive` value is truncated to the nearest minute.\n\n\n### Return value\n\nReturns `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n  - Thrown if the provided `timeToLive` value is not either, a number between 1 and 60 inclusively.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/edge-rate-limiter/PenaltyBox/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# PenaltyBox.prototype.has\n\nCheck if the given entry is contained in in the PenaltyBox instance.\n\n## Syntax\n```js\nhas(entry)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n\n\n### Return value\n\nReturns `true` if the entry is contained in the PenaltyBox instance, otherwise returns `false`.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/edge-rate-limiter/RateCounter/RateCounter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `RateCounter()`\n\nThe **`RateCounter` constructor** can be used with a [Edge Rate Limiter](../EdgeRateLimiter/EdgeRateLimiter.mdx) or standalone for counting and rate calculations.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew RateCounter(name)\n```\n\n> **Note:** `RateCounter()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Open a RateCounter with the given name\n\n\n### Return value\n\nA new `RateCounter` object instance.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `name` value can not be coerced into a string\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/edge-rate-limiter/RateCounter/prototype/increment.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RateCounter.prototype.increment\n\nIncrement the given `entry` in the RateCounter instance with the given `delta` value.\n\n## Syntax\n```js\nincrement(entry, delta)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n- `delta` _: number_\n  - The amount to increment the entry by\n\n\n### Return value\n\nReturns `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n  - Thrown if the provided `delta` value is not a positive, finite number.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/edge-rate-limiter/RateCounter/prototype/lookupCount.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RateCounter.prototype.lookupCount\n\nLook up the current rate for the given `entry` and the given `duration`.\n\n## Syntax\n```js\nlookupCount(entry, duration)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n- `duration` _: number_\n  - The duration to lookup alongside the entry, has to be either, 10, 20, 30, 40, 50, or 60 seconds.\n\n\n### Return value\n\nReturns a number which is the count for the given `entry` and `duration` in this `RateCounter` instance.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n  - Thrown if the provided `duration` value is not either, 10, 20, 30, 40, 50 or 60.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/edge-rate-limiter/RateCounter/prototype/lookupRate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RateCounter.prototype.lookupRate\n\nLook up the current rate for the given `entry` and the given `window`.\n\n## Syntax\n```js\nlookupRate(entry, window)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n- `window` _: number_\n  - The window to look up alongside the entry, has to be either 1 second, 10 seconds, or 60 seconds\n\n\n### Return value\n\nReturns a number which is the rate for the given `entry` and `window` in this `RateCounter` instance.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n  - Thrown if the provided `window` value is not either, 1, 10, or 60.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/env/env.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# env\n\nThe **`env()`** function returns the value for the provided environment variable name.\n\nFor a list of available environment variables, see the [Fastly Developer Hub for Compute Environment Variables](https://developer.fastly.com/reference/compute/ecp-env/)\n\n>**Note**: The environment variables can only be retrieved when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nenv(name)\n```\n\n### Parameters\n\n- `name` _: string_\n  - The name of the environment variable to retrieve\n\n### Return value\n\nThe value for the requested environment variable, if no such environment variable exists then an empty string is returned.\n\n## Examples\n\nIn this example we log to stdout the environment variables [`FASTLY_HOSTNAME`](https://developer.fastly.com/reference/compute/ecp-env/fastly-hostname/) and [`FASTLY_TRACE_ID`](https://developer.fastly.com/reference/compute/ecp-env/fastly-trace-id/).\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"env Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { env } from \"fastly:env\";\nfunction app(event) {\n  console.log(\"FASTLY_HOSTNAME:\", env(\"FASTLY_HOSTNAME\"));\n  console.log(\"FASTLY_TRACE_ID:\", env(\"FASTLY_TRACE_ID\"));\n  return new Response(\"\", {\n    status: 200\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { env } from \"fastly:env\";\nfunction app(event) {\n  console.log(\"FASTLY_HOSTNAME:\", env(\"FASTLY_HOSTNAME\"));\n  console.log(\"FASTLY_TRACE_ID:\", env(\"FASTLY_TRACE_ID\"));\n  return new Response(\"\", {\n    status: 200\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/experimental/allowDynamicBackends.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# allowDynamicBackends\n\nThe **`allowDynamicBackends()`** function is used to control whether or not Dynamic Backends should be allowed within this Fastly Compute Service.\n\nBy default, Dynamic Backends are disabled within a JavaScript application as it can be a potential avenue for third-party JavaScript code to send requests, potentially including sensitive/secret data,  off to destinations that the JavaScript project was not intending, which could be a security issue.\n\n>**Note**: This feature is in disabled by default for Fastly Services. Please contact [Fastly Support](https://support.fastly.com/hc/requests/new?ticket_form_id=360000269711) to request the feature be enabled on the Fastly Services which require Dynamic Backends.\n\n## Syntax\n\n```js\nallowDynamicBackends(enabledOrConfig)\n```\n\n### Parameters\n\n- `enabledOrConfig` _: boolean_\n  - Whether or not to allow Dynamic Backends\n\nor\n\n- `enabledOrConfig` _: object_\n  - `connectTimeout` _: number_ _**optional**_\n    - Maximum duration in milliseconds to wait for a connection to this backend to be established.\n    - If exceeded, the connection is aborted and a 503 response will be presented instead.\n    - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n  - `firstByteTimeout` _: number_ _**optional**_\n    - Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent.\n    - If exceeded, the connection is aborted and a 503 response will be presented instead.\n    - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n  - `betweenBytesTimeout` _: number_ _**optional**_\n    - Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend.\n    - If exceeded, the response received so far will be considered complete and the fetch will end.\n    - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n\n### Return value\n\n`undefined`.\n\n## Examples\n\nIn this example an implicit Dynamic Backend is created when making the fetch request to https://www.fastly.com/ and the response is then returned to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Dynamic Backends Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nallowDynamicBackends(true);\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  return fetch('https://www.fastly.com/');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nallowDynamicBackends(true);\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  return fetch('https://www.fastly.com/');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/experimental/includeBytes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# includeBytes\n\nThe **`includeBytes()`** function is used embed a file as a Uint8Array.\n\n>**Note**: Can only be used during build-time initialization, not when processing requests.\n\n## Syntax\n\n```js\nincludeBytes(path)\n```\n\n### Parameters\n\n- `path` _: string_\n  - The path to include, relative to the Fastly Compute application's top-level directory during build-time initialization.\n\n### Return value\n\nReturns a `Uint8Array`\n\n## Examples\n\nIn this example we include the README.md file as a Uint8Array and use it for the body in the response we return to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { includeBytes } from \"fastly:experimental\";\nconst readme = includeBytes('README.md');\nasync function app() {\n    return new Response(readme);\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/experimental/mapAndLogError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# mapAndLogError\n\nThe **`mapAndLogError()`** function calls `mapError` on an `Error` object and sends the output to standard error. This includes the error name, message, and a call stack.\n\nIf `--enable-stack-traces` is specified during the build, the call stack will be mapped using source maps.\n\nIf `--enable-stack-traces` is specified and `--exclude-sources` is not specified during the build, then this will also include a code dump of neighboring lines of user code.\n\n## Syntax\n\n```js\nmapAndLogError(error)\n```\n\n### Parameters\n\n- `error` _: Error _ or _string_\n  - The error to retrieve information about. If a `string` is provided, then it is first converted to an `Error`.\n\n### Return value\n\n`undefined`.\n\n## Examples\n\nIn this example, build the application using the `--enable-stack-traces` flag.\n\n```js\naddEventListener('fetch', e => e.respondWith(handler(e)));\nasync function handler(event) {\n  try {\n    throw new TypeError('foo');\n  } catch (err) {\n    mapAndLogError(mapError(err));\n  }\n  return new Response('ok');\n}\n```\n\nThe following is output to the error log.\n\n```\nTypeError: foo\n  at handler (src/index.ts:4:11)\n      1 | addEventListener('fetch', e => e.respondWith(handler(e)));\n      2 | async function handler(event) {\n      3 |   try {\n>     4 |     throw new TypeError('foo');\n                    ^\n      5 |   } catch (err) {\n      6 |     mapAndLogError(mapError(err));\n      7 |   }\n  at src/index.ts:1:45\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/experimental/mapError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# mapError\n\nThe **`mapError()`** function extracts information from an `Error` object as a human-readable array of strings. This includes the error name, message, and a call stack.\n\nIf `--enable-stack-traces` is specified during the build, the call stack will be mapped using source maps.\n\nIf `--enable-stack-traces` is specified and `--exclude-sources` is not specified during the build, then this will also include a code dump of neighboring lines of user code.\n\n## Syntax\n\n```js\nmapError(error)\n```\n\n### Parameters\n\n- `error` _: Error _ or _string_\n  - The error to retrieve information about. If a `string` is provided, then it is first converted to an `Error`.\n\n### Return value\n\nReturns an array of `string`s.\n\n## Examples\n\nIn this example, build the application using the `--enable-stack-traces` flag.\n\n```js\naddEventListener('fetch', e => e.respondWith(handler(e)));\nasync function handler(event) {\n  try {\n    throw new TypeError('foo');\n  } catch (err) {\n    console.error(mapError(err));\n  }\n  return new Response('ok');\n}\n```\n\nThe following is output to the error log.\n\n```\nTypeError: foo\n  at handler (src/index.ts:4:11)\n      1 | addEventListener('fetch', e => e.respondWith(handler(e)));\n      2 | async function handler(event) {\n      3 |   try {\n>     4 |     throw new TypeError('foo');\n                    ^\n      5 |   } catch (err) {\n      6 |     console.error(mapError(err));\n      7 |   }\n  at src/index.ts:1:45\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/experimental/sdkVersion.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# sdkVersion\n\nThe read-only **`sdkVersion`** property is a string whose indicates what JavaScript SDK version is being used.\n\n## Value\n\nA string value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/experimental/setReusableSandboxOptions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# setReusableSandboxOptions\n\nThe **`setReusableSandboxOptions()`** function configures the reuse of the same underlying sandbox for multiple requests, which can improve performance by avoiding the overhead of initializing a new sandbox for each request.\n\n## Syntax\n\n```js\nsetReusableSandboxOptions(options)\n```\n\n### Parameters\n\n- `options` _: Object_\n  - The configuration options for the reusable sandbox.\n    - `maxRequests` _: number_ (default: `1`, `0` means unlimited)\n      - The maximum number of requests that can be handled by a single sandbox before it is recycled.\n    - `betweenRequestTimeoutMs` _: number_ (default: not specified)\n      - The amount of time in milliseconds to wait between requests before recycling the sandbox.\n    - `maxMemoryMiB` _: number_ (default: no limit)\n      - The maximum amount of memory in MiB that the sandbox can use before it is recycled.\n    - `sandboxTimeoutMs` _: number_ (default: no timeout)\n      - The maximum amount of time in milliseconds that a sandbox can be active before it is recycled.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/fanout/createFanoutHandoff.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# createFanoutHandoff\n\nThe **`createFanoutHandoff()`** function creates a Response instance which informs Fastly to pass the original Request through Fanout, to the declared backend.\n\n## Syntax\n\n```js\ncreateFanoutHandoff(request, backend)\n```\n\n### Parameters\n\n- `request` _: Request_\n  - The request to pass through Fanout.\n- `backend` _: string_\n  - The name of the backend that Fanout should send the request to.\n  - The name has to be between 1 and 254 characters inclusive.\n  - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n\n### Return value\n\nA Response instance is returned, which can then be used via `event.respondWith`.\n\n## Examples\n\nIn this example application requests to the path `/stream` and sent handled via Fanout.\n\n```js\nimport { createFanoutHandoff } from \"fastly:fanout\";\n\nasync function handleRequest(event) {\n  try {\n    const url = new URL(event.request.url);\n    if (url.pathname === '/stream') {\n      return createFanoutHandoff(event.request, 'fanout');\n    } else {\n      return new Response('oopsie, make a request to /stream for some fanout goodies', { status: 404 });\n    }\n  } catch (error) {\n    console.error({error});\n    return new Response(error.message, {status:500})\n  }\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/geolocation/getGeolocationForIpAddress.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# getGeolocationForIpAddress\n\nThe **`getGeolocationForIpAddress()`** function is used to retrieve geolocation information about the given IP address.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\ngetGeolocationForIpAddress(address)\n```\n\n### Parameters\n\n- `address` _: string_\n  - The IPv4 or IPv6 address to query.\n\n### Return value\n\nReturns an `Object`, or `null` if no geolocation data was found.\n\nThe object contains information about the given IP address with the following properties:\n\n- `as_name`  _: string | null_\n  - The name of the organization associated with `as_number`.\n  - For example, fastly is the value given for IP addresses under AS-54113.\n\n- `as_number` _: number | null_\n  - [Autonomous system](https://en.wikipedia.org/wiki/Autonomous_system_(Internet)) (AS) number.\n\n- `area_code` _: number | null_\n  - The telephone area code associated with an IP address.\n  - These are only available for IP addresses in the United States, its territories, and Canada.\n\n- `city` _: string | null_\n  - City or town name.\n\n- `conn_speed` _: string | null_\n  - Connection speed.\n\n- `conn_type` _: string | null_\n  - Connection type.\n\n- `continent` _: string | null_\n  - Continent.\n\n- `country_code` _: string | null_\n  - A two-character [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) country code for the country associated with an IP address.\n  - The US country code is returned for IP addresses associated with overseas United States military bases.\n  - These values include subdivisions that are assigned their own country codes in ISO 3166-1. For example, subdivisions NO-21 and NO-22 are presented with the country code SJ for Svalbard and the Jan Mayen Islands.\n\n- `country_code3` _: string | null_\n  - A three-character [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) country code for the country associated with the IP address.\n  - The USA country code is returned for IP addresses associated with overseas United States military bases.\n\n- `country_name` _: string | null_\n  - Country name.\n  - This field is the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) English short name for a country.\n\n- `gmt_offset` _: string | null_\n  - Time zone offset from Greenwich Mean Time (GMT) for `city`.\n\n- `latitude` _: number | null_\n  - Latitude, in units of degrees from the equator.\n  - Values range from -90.0 to +90.0 inclusive, and are based on the [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System) coordinate reference system.\n\n- `longitude` _: number | null_\n  - Longitude, in units of degrees from the [IERS Reference Meridian](https://en.wikipedia.org/wiki/IERS_Reference_Meridian).\n  - Values range from -180.0 to +180.0 inclusive, and are based on the [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System) coordinate reference system.\n\n- `metro_code` _: number | null_\n  - Metro code, representing designated market areas (DMAs) in the United States.\n\n- `postal_code` _: string | null_\n  - The postal code associated with the IP address.\n  - These are available for some IP addresses in Australia, Canada, France, Germany, Italy, Spain, Switzerland, the United Kingdom, and the United States.\n  - For Canadian postal codes, this is the first 3 characters. For the United Kingdom, this is the first 2-4 characters (outward code). For countries with alphanumeric postal codes, this field is a lowercase transliteration.\n\n- `proxy_description` _: string | null_\n  - Client proxy description.\n\n- `proxy_type` _: string | null_\n  - Client proxy type.\n\n- `region` _: string | null_\n  - [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) country subdivision code.\n  - For countries with multiple levels of subdivision (for example, nations within the United Kingdom), this variable gives the more specific subdivision.\n  - This field can be None for countries that do not have ISO country subdivision codes. For example, None is given for IP addresses assigned to the Åland Islands (country code AX, illustrated below).\n\n- `utc_offset` _: number | null;_\n  - Time zone offset from coordinated universal time (UTC) for `city`.\n\n## Examples\n\nIn this example we return the geolocation details for the provided ip querystring parameter or for the incoming client request if the querystring parameter does not exist.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"getGeolocationForIpAddress Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { getGeolocationForIpAddress } from \"fastly:geolocation\"\nasync function app(event) {\n  try {\n    let ip = new URL(event.request.url).searchParams.get('ip') || event.client.address\n    let geo = getGeolocationForIpAddress(ip);\n    return new Response(JSON.stringify(geo), {\n      headers: {\n        \"Content-Type\": \"application/json\",\n      },\n    });\n  } catch (error) {\n    console.error(error);\n    return new Response(\"Internal Server Error\", {\n      status: 500\n    });\n  }\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { getGeolocationForIpAddress } from \"fastly:geolocation\"\nasync function app(event) {\n  try {\n    let ip = new URL(event.request.url).searchParams.get('ip') || event.client.address\n    let geo = getGeolocationForIpAddress(ip);\n    return new Response(JSON.stringify(geo), {\n      headers: {\n        \"Content-Type\": \"application/json\",\n      },\n    });\n  } catch (error) {\n    console.error(error);\n    return new Response(\"Internal Server Error\", {\n      status: 500\n    });\n  }\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/AggregrateError/AggregrateError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# AggregateError()\n\nThe **`AggregateError()`** constructor creates an error for several errors that need to be wrapped in a single error.\n\n## Syntax\n\n```js\nnew AggregateError(errors)\nnew AggregateError(errors, message)\nnew AggregateError(errors, message, options)\n\nAggregateError(errors)\nAggregateError(errors, message)\nAggregateError(errors, message, options)\n```\n\n> **Note:** `AggregateError()` can be called with or without `new`. Both create a new `AggregateError` instance.\n\n### Parameters\n\n- `errors`\n  - : An iterable of errors, may not actually be [`TypeError`](../Error/Error.mdx) instances.\n- `message` _**optional**_\n  - : An optional human-readable description of the aggregate error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Array/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array\\[Symbol.species]\n\nThe **`Array[Symbol.species]`** accessor property returns the constructor used to construct return values from array methods.\n\n> **Warning:** The existence of `[Symbol.species]` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Syntax\n\n```js\nArray[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get [Symbol.species]` was called. The return value is used to construct return values from array methods that create new arrays.\n\n## Description\n\nThe `[Symbol.species]` accessor property returns the default constructor for `Array` objects. Subclass constructors may override it to change the constructor assignment. The default implementation is basically:\n\n```js\n// Hypothetical underlying implementation for illustration\nclass Array {\n  static get [Symbol.species]() {\n    return this;\n  }\n}\n```\n\nBecause of this polymorphic implementation, `[Symbol.species]` of derived subclasses would also return the constructor itself by default.\n\n```js\nclass SubArray extends Array {}\nSubArray[Symbol.species] === SubArray; // true\n```\n\nWhen calling array methods that do not mutate the existing array but return a new array instance (for example, `filter()` and `map()`), the array's `constructor[Symbol.species]` will be accessed. The returned constructor will be used to construct the return value of the array method. This makes it technically possible to make array methods return objects unrelated to arrays.\n\n```js\nclass NotAnArray {\n  constructor(length) {\n    this.length = length;\n  }\n}\n\nconst arr = [0, 1, 2];\narr.constructor = { [Symbol.species]: NotAnArray };\narr.map((i) => i); // NotAnArray { '0': 0, '1': 1, '2': 2, length: 3 }\narr.filter((i) => i); // NotAnArray { '0': 1, '1': 2, length: 0 }\narr.concat([1, 2]); // NotAnArray { '0': 0, '1': 1, '2': 2, '3': 1, '4': 2, length: 5 }\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Array/Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array()\n\nThe **`Array()`** constructor is used to create `Array` objects.\n\n## Syntax\n\n```js\nnew Array(element0, element1, /* … ,*/ elementN)\nnew Array(arrayLength)\n\nArray(element0, element1, /* … ,*/ elementN)\nArray(arrayLength)\n```\n\n> **Note:** `Array()` can be called with or without `new`. Both create a new `Array` instance.\n\n### Parameters\n\n- `elementN`\n  - : A JavaScript array is initialized with the given elements, except in the case where\n    a single argument is passed to the `Array` constructor and that argument is\n    a number (see the `arrayLength` parameter below). Note that this special case only\n    applies to JavaScript arrays created with the `Array` constructor, not\n    array literals created with the bracket syntax.\n- `arrayLength`\n  - : If the only argument passed to the `Array` constructor is an integer\n    between 0 and 2<sup>32</sup> - 1 (inclusive), this returns a new JavaScript array with\n    its `length` property set to that number (**Note:** this\n    implies an array of `arrayLength` empty slots, not slots with actual\n    `undefined` values).\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if there's only one argument (`arrayLength`) and its value is not between 0 and 2<sup>32</sup> - 1 (inclusive).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Array/from.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.from\n\nThe **`Array.from()`** static method creates a new, shallow-copied `Array` instance from an iterable or array-like object.\n\n## Syntax\n\n```js\nArray.from(arrayLike)\n\n// Arrow function\nArray.from(arrayLike, (element) => { /* … */ })\nArray.from(arrayLike, (element, index) => { /* … */ })\n\n// Mapping function\nArray.from(arrayLike, mapFn)\nArray.from(arrayLike, mapFn, thisArg)\n\n// Inline mapping function\nArray.from(arrayLike, function (element) { /* … */ })\nArray.from(arrayLike, function (element, index) { /* … */ })\nArray.from(arrayLike, function (element) { /* … */ }, thisArg)\nArray.from(arrayLike, function (element, index) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `arrayLike`\n  - : An iterable or array-like object to convert to an array.\n- `mapFn` _**optional**_\n\n  - : Map function to call on every element of the array. If provided, every value to be added to the array is first passed through this function, and `mapFn`'s return value is added to the array instead.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `mapFn`.\n\n### Return value\n\nA new `Array` instance.\n\n## Description\n\n`Array.from()` lets you create `Array`s from:\n\n- [iterable objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) (objects such as [`Map`](../Map/Map.mdx) and [`Set`](../Set/Set.mdx); or, if the object is not iterable,\n- array-like objects (objects with a `length` property and indexed elements).\n\n`Array.from()` never creates a sparse array. If the `arrayLike` object is missing some index properties, they become `undefined` in the new array.\n\n`Array.from()` has an optional parameter `mapFn`, which allows you to execute a function on each element of the array being created, similar to [`Array.prototype.map()`](./prototype/map.mdx). More clearly, `Array.from(obj, mapFn, thisArg)` has the same result as `Array.from(obj).map(mapFn, thisArg)`, except that it does not create an intermediate array, and `mapFn` only receives two arguments (`element`, `index`) without the whole array, because the array is still under construction.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Array/isArray.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.isArray()\n\nThe **`Array.isArray()`** static method determines whether the passed value is an `Array`.\n\n## Syntax\n\n```js\nArray.isArray(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be checked.\n\n### Return value\n\n`true` if `value` is an `Array`; otherwise, `false`. `false` is always returned if `value` is a `TypedArray` instance.\n\n## Description\n\n`Array.isArray()` checks if the passed value is an `Array`. It does not check the value's prototype chain, nor does it rely on the `Array` constructor it is attached to. It returns `true` for any value that was created using the array literal syntax or the `Array` constructor. This makes it safe to use with cross-realm objects, where the identity of the `Array` constructor is different and would therefore cause `instanceof Array` to fail.\n\nSee the article [\"Determining with absolute accuracy whether or not a JavaScript object is an array\"](https://web.mit.edu/jwalden/www/isArray.html) for more details.\n\n`Array.isArray()` also rejects objects with `Array.prototype` in its prototype chain but aren't actual arrays, which `instanceof Array` would accept.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Array/of.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.of()\nThe **`Array.of()`** method creates a new `Array`\ninstance from a variable number of arguments, regardless of number or type of the\narguments.\n\n## Syntax\n\n```js\nArray.of(element0)\nArray.of(element0, element1)\nArray.of(element0, element1, /* … ,*/ elementN)\n```\n\n### Parameters\n\n- `elementN`\n  - : Elements used to create the array.\n\n### Return value\n\nA new `Array` instance.\n\n## Description\n\nThe difference between `Array.of()` and the [`Array()`](./Array.mdx) constructor is in the handling of single arguments: `Array.of(7)` creates an array with a single element, `7`, whereas `Array(7)` creates an empty array with a `length` property of `7`. (That implies an array of 7 empty slots, not slots with actual [`undefined`](../undefined.mdx) values.)\n\n```js\nArray.of(7); // [7]\nArray(7); // array of 7 empty slots\n\nArray.of(1, 2, 3); // [1, 2, 3]\nArray(1, 2, 3); // [1, 2, 3]\n```\n\nThe `Array.of()` method is a generic factory method. For example, if a subclass of `Array` inherits the `of()` method, the inherited `of()` method will return new instances of the subclass instead of `Array` instances. In fact, the `this` value can be any constructor function that accepts a single argument representing the length of the new array, and the constructor will be called with the number of arguments passed to `of()`. The final `length` will be set again when all elements are assigned. If the `this` value is not a constructor function, the plain `Array` constructor is used instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Array/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype\\[Symbol.iterator]()\n\nThe **`Symbol.iterator`** method of an `Array` object implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows arrays to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the value of each index in the array.\n\nThe initial value of this property is the same function object as the initial value of the [`Array.prototype.values`](./values.mdx) property.\n\n## Syntax\n\n```js\narray[Symbol.iterator]()\n```\n\n### Return value\n\nThe same return value as [`Array.prototype.values()`](./values.mdx): a new iterable iterator object that yields the value of each index in the array.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Array/prototype/@@unscopables.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype[Symbol.unscopables]\n\nThe **`@@unscopables`** data property of `Array.prototype` is shared by all `Array` instances. It contains property names that were not included in the ECMAScript standard prior to the ES2015 version and that are ignored for [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) statement-binding purposes.\n\n## Value\n\nA [`null`-prototype object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects) with property names given below and their values set to `true`.\n\n## Description\n\nThe default `Array` properties that are ignored for `with` statement-binding purposes are:\n\n- [`at()`](./at.mdx)\n- [`copyWithin()`](./copyWithin.mdx)\n- [`entries()`](./entries.mdx)\n- [`fill()`](./fill.mdx)\n- [`find()`](./find.mdx)\n- [`findIndex()`](./findIndex.mdx)\n- [`flat()`](./flat.mdx)\n- [`flatMap()`](./flatMap.mdx)\n- [`includes()`](./includes.mdx)\n- [`keys()`](./keys.mdx)\n- [`values()`](./values.mdx)\n\n`Array.prototype[@@unscopables]` is an empty object only containing all the above property names with the value `true`. Its [prototype is `null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects), so `Object.prototype` properties like [`toString`](../../Object/prototype/toString.mdx) won't accidentally be made unscopable, and a `toString()` within the `with` statement will continue to be called on the array.\n\nSee [`Symbol.unscopables`](../../Symbol/unscopables.mdx) for how to set unscopable properties for your own objects.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Array/prototype/at.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.at\n\nThe **`at()`** method takes an integer value and returns the item at that index, allowing for positive and negative integers. Negative integers count back from the last item in the array.\n\n## Syntax\n\n```js\nat(index)\n```\n\n### Parameters\n\n- `index`\n  - : Zero-based index of the array element to be returned, converted to an integer. Negative index counts back from the end of the array — if `index < 0`, `index + array.length` is accessed.\n\n### Return value\n\nThe element in the array matching the given index. Always returns [`undefined`](../../../globals/undefined.mdx) if `index < -array.length` or `index >= array.length` without attempting to access the corresponding property.\n\n## Description\n\nThe `at()` method is equivalent to the bracket notation when `index` is non-negative. For example, `array[0]` and `array.at(0)` both return the first item. However, when counting elements from the end of the array, you cannot use `array[-1]` like you may in Python or R, because all values inside the square brackets are treated literally as string properties, so you will end up reading `array[\"-1\"]`, which is just a normal string property instead of an array index.\n\nThe usual practice is to access [`Array.prototype.length`](./length.mdx) and calculate the index from that — for example, `array[array.length - 1]`. The `at()` method allows relative indexing, so this can be shortened to `array.at(-1)`.\n\nThe `at()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Array/prototype/concat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.concat\n\nThe **`concat()`** method is used to merge two or more arrays.\nThis method does not change the existing arrays, but instead returns a new array.\n\n## Syntax\n\n```js\nconcat()\nconcat(value0)\nconcat(value0, value1)\nconcat(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `valueN` _**optional**_\n  - : Arrays and/or values to concatenate into a new array. If all\n    `valueN` parameters are omitted, `concat` returns a\n    [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of the existing array on which it is called. See the description below\n    for more details.\n\n### Return value\n\nA new `Array` instance.\n\n## Description\n\nThe `concat` method creates a new array. The array will first be populated by the elements in the object on which it is called. Then, for each argument, its value will be concatenated into the array — for normal objects or primitives, the argument itself will become an element of the final array; for arrays or array-like objects with the property [`Symbol.isConcatSpreadable`](../../Symbol/isConcatSpreadable.mdx) set to a truthy value, each element of the argument will be independently added to the final array. The `concat` method does not recurse into nested array arguments.\n\nThe `concat()` method is a copying. It does not alter `this` or any of the arrays provided as arguments but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains the same elements as the ones from the original arrays.\n\nThe `concat()` method preserves empty slots if any of the source arrays is sparse.\n\nThe `concat()` method is generic. The `this` value is treated in the same way as the other arguments (except it will be converted to an object first), which means plain objects will be directly prepended to the resulting array, while array-like objects with truthy `Symbol.isConcatSpreadable` will be spread into the resulting array.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Array/prototype/copyWithin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.copyWithin\n\nThe **`copyWithin()`** method shallow copies part of an array\nto another location in the same array and returns it without modifying its length.\n\n\n\n## Syntax\n\n```js\ncopyWithin(target)\ncopyWithin(target, start)\ncopyWithin(target, start, end)\n```\n\n### Parameters\n\n- `target`\n  - : Zero-based index at which to copy the sequence to, converted to an integer.\n    - Negative index counts back from the end of the array — if `target < 0`, `target + array.length` is used.\n    - If `target < -array.length`, `0` is used.\n    - If `target >= array.length`, nothing is copied.\n    - If `target` is positioned after `start` after normalization, copying only happens until the end of `array.length` (in other words, `copyWithin()` never extends the array).\n- `start` _**optional**_\n  - : Zero-based index at which to start copying elements from, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, nothing is copied.\n- `end` _**optional**_\n  - : Zero-based index at which to end copying elements from, converted to an integer. `copyWithin()` copies up to but not including `end`.\n    - Negative index counts back from the end of the array — if `end < 0`, `end + array.length` is used.\n    - If `end < -array.length`, `0` is used.\n    - If `end >= array.length` or `end` is omitted, `array.length` is used, causing all elements until the end to be copied.\n    - If `end` is positioned before or at `start` after normalization, nothing is copied.\n\n### Return value\n\nThe modified array.\n\n## Description\n\nThe `copyWithin()` method works like C and C++'s `memmove`, and is a high-performance method to shift the data of an `Array`. The sequence is copied and pasted as one operation; the pasted sequence will have the copied values even when the copy and paste region overlap.\n\nThe `copyWithin()` method is a mutating method. It does not alter the length of `this`, but it will change the content of `this` and create new properties or delete existing properties, if necessary.\n\nThe `copyWithin()` method preserves empty slots. If the region to be copied from is sparse, the empty slots' corresponding new indices are [deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) and also become empty slots.\n\nThe `copyWithin()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Array/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.entries\n\nThe **`entries()`** method returns a new **Array\nIterator** object that contains the key/value pairs for each index in the\narray.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nA new `Array` iterator object.\n\n## Description\n\nWhen used on sparse arrays, the `entries()` method iterates empty slots as if they have the value `undefined`.\n\nThe `entries()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Array/prototype/every.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.every\n\nThe **`every()`** method tests whether\nall elements in the array pass the test implemented by the provided function. It\nreturns a Boolean value.\n\n## Syntax\n\n```js\n// Arrow function\nevery((element) => { /* … */ })\nevery((element, index) => { /* … */ })\nevery((element, index, array) => { /* … */ })\n\n// Callback function\nevery(callbackFn)\nevery(callbackFn, thisArg)\n\n// Inline callback function\nevery(function (element) { /* … */ })\nevery(function (element, index) { /* … */ })\nevery(function (element, index, array) { /* … */ })\nevery(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value to indicate the element passes the test, and a falsy value otherwise.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `every()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\n`true` if `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value for every array element. Otherwise, `false`.\n\n## Description\n\nThe `every()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array, until the `callbackFn` returns a [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value. If such an element is found, `every()` immediately returns `false` and stops iterating through the array. Otherwise, if `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value for all elements, `every()` returns `true`.\n\n`every` acts like the \"for all\" quantifier in mathematics. In particular, for an empty array, it returns `true`. (It is [vacuously true](https://en.wikipedia.org/wiki/Vacuous_truth) that all elements of the [empty set](https://en.wikipedia.org/wiki/Empty_set#Properties) satisfy any given condition.)\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\n`every()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `every()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `every()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Array/prototype/fill.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.fill\n\nThe **`fill()`** method changes all elements in an array to a static value, from a start index (default `0`) to an end index (default `array.length`).\nIt returns the modified array.\n\n## Syntax\n\n```js\nfill(value)\nfill(value, start)\nfill(value, start, end)\n```\n\n### Parameters\n\n- `value`\n  - : Value to fill the array with. Note all elements in the array will be this exact value: if `value` is an object, each slot in the array will reference that object.\n- `start` _**optional**_\n  - : Zero-based index at which to start filling, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, no index is filled.\n- `end` _**optional**_\n  - : Zero-based index at which to end filling, converted to an integer. `fill()` fills up to but not including `end`.\n    - Negative index counts back from the end of the array — if `end < 0`, `end + array.length` is used.\n    - If `end < -array.length`, `0` is used.\n    - If `end >= array.length` or `end` is omitted, `array.length` is used, causing all indices until the end to be filled.\n    - If `end` is positioned before or at `start` after normalization, no index is filled.\n\n### Return value\n\nThe modified array, filled with `value`.\n\n## Description\n\nThe `fill()` method is a mutating method. It does not alter the length of `this`, but it will change the content of `this`.\n\nThe `fill()` method fills empty slots in sparse arrays with `value` as well.\n\nThe `fill()` method is generic. It only expects the `this` value to have a `length` property. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Array/prototype/filter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.filter\n\nThe **`filter()`** method creates a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of a portion of a given array, filtered down to just the elements from the given array that pass the test implemented by the provided function.\n\n## Syntax\n\n```js\n// Arrow function\nfilter((element) => { /* … */ })\nfilter((element, index) => { /* … */ })\nfilter((element, index, array) => { /* … */ })\n\n// Callback function\nfilter(callbackFn)\nfilter(callbackFn, thisArg)\n\n// Inline callback function\nfilter(function (element) { /* … */ })\nfilter(function (element, index) { /* … */ })\nfilter(function (element, index, array) { /* … */ })\nfilter(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) to keep the element in the resulting array, and a falsy value otherwise.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `filter()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\nA [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of a portion of the given array, filtered down to just the elements from the given array that pass the test implemented by the provided function. If no elements pass the test, an empty array will be returned.\n\n## Description\n\nThe `filter()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array, and constructs a new array of all the values for which `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. Array elements which do not pass the `callbackFn` test are not included in the new array.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nThe `filter()` method is a copying method. It does not alter `this` but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains the same elements as the ones from the original array (with some filtered out). However, the function provided as `callbackFn` can mutate the array. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `filter()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\nThe `filter()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Array/prototype/find.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.find()\n\nThe `find()` method returns the first element in the provided array that satisfies the provided testing function.\nIf no values satisfy the testing function, [`undefined`](../../../globals/undefined.mdx) is returned.\n\n- If you need the **index** of the found element in the array, use [`findIndex()`](./findIndex.mdx).\n- If you need to find the **index of a value**, use [`indexOf()`](./indexOf.mdx).\n  (It's similar to [`findIndex()`](./findIndex.mdx), but checks each element for equality with the value instead of using a testing function.)\n- If you need to find if a value **exists** in an array, use [`includes()`](./includes.mdx).\n  Again, it checks each element for equality with the value instead of using a testing function.\n- If you need to find if any element satisfies the provided testing function, use [`some()`](./some.mdx).\n\n## Syntax\n\n```js\n// Arrow function\nfind((element) => { /* … */ })\nfind((element, index) => { /* … */ })\nfind((element, index, array) => { /* … */ })\n\n// Callback function\nfind(callbackFn)\nfind(callbackFn, thisArg)\n\n// Inline callback function\nfind(function (element) { /* … */ })\nfind(function (element, index) { /* … */ })\nfind(function (element, index, array) { /* … */ })\nfind(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value to indicate a matching element has been found.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `find()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\nThe first element in the array that satisfies the provided testing function.\nOtherwise, [`undefined`](../../../globals/undefined.mdx) is returned.\n\n## Description\n\nThe `find()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array in ascending-index order, until `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. `find()` then returns that element and stops iterating through the array. If `callbackFn` never returns a truthy value, `find()` returns [`undefined`](../../../globals/undefined.mdx).\n\n`callbackFn` is invoked for _every_ index of the array, not just those with assigned values. Empty slots in sparse arrays behave the same as `undefined`.\n\n`find()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `find()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are visited as if they were `undefined`.\n\nThe `find()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Array/prototype/findIndex.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.findIndex\n\nThe **`findIndex()`** method returns the index of the first element in an array that satisfies the provided testing function.\nIf no elements satisfy the testing function, -1 is returned.\n\nSee also the [`find()`](./find.mdx) method, which returns the first element that satisfies the testing function (rather than its index).\n\n## Syntax\n\n```js\n// Arrow function\nfindIndex((element) => { /* … */ })\nfindIndex((element, index) => { /* … */ })\nfindIndex((element, index, array) => { /* … */ })\n\n// Callback function\nfindIndex(callbackFn)\nfindIndex(callbackFn, thisArg)\n\n// Inline callback function\nfindIndex(function (element) { /* … */ })\nfindIndex(function (element, index) { /* … */ })\nfindIndex(function (element, index, array) { /* … */ })\nfindIndex(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value to indicate a matching element has been found.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `findIndex()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\nThe index of the first element in the array that passes the test. Otherwise, `-1`.\n\n## Description\n\nThe `findIndex()` is an iterative method. It calls a provided `callbackFn` function once for each element in an array in ascending-index order, until `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. `findIndex()` then returns the index of that element and stops iterating through the array. If `callbackFn` never returns a truthy value, `findIndex()` returns `-1`.\n\n`callbackFn` is invoked for _every_ index of the array, not just those with assigned values. Empty slots in sparse arrays behave the same as `undefined`.\n\n`findIndex()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `findIndex()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are visited as if they were `undefined`.\n\nThe `findIndex()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Array/prototype/flat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.flat\n\nThe **`flat()`** method creates a new array with all sub-array\nelements concatenated into it recursively up to the specified depth.\n\n## Syntax\n\n```js\nflat()\nflat(depth)\n```\n\n### Parameters\n\n- `depth` _**optional**_\n  - : The depth level specifying how deep a nested array structure should be flattened.\n    Defaults to 1.\n\n### Return value\n\nA new array with the sub-array elements concatenated into it.\n\n## Description\n\nThe `flat()` method is a copying method. It does not alter `this` but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains the same elements as the ones from the original array.\n\nThe `flat()` method ignores empty slots if the array being flattened is sparse. For example, if `depth` is 1, both empty slots in the root array and in the first level of nested arrays are ignored, but empty slots in further nested arrays are preserved with the arrays themselves.\n\nThe `flat()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. However, its elements must be arrays if they are to be flattened.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Array/prototype/flatMap.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.flatMap()\n\nThe **`flatMap()`** method returns a new array formed by applying a given callback function to each element of the array, and then flattening the result by one level. It is identical to a [`Array.prototype.map()`](./map.mdx) followed by a [`Array.prototype.flat()`](./flat.mdx) of depth 1 (`arr.map(...args).flat()`), but slightly more efficient than calling those two methods separately.\n\n## Syntax\n\n```js\n// Arrow function\nflatMap((element) => { /* … */ })\nflatMap((element, index) => { /* … */ })\nflatMap((element, index, array) => { /* … */ })\n\n// Callback function\nflatMap(callbackFn)\nflatMap(callbackFn, thisArg)\n\n// Inline callback function\nflatMap(function (element) { /* … */ })\nflatMap(function (element, index) { /* … */ })\nflatMap(function (element, index, array) { /* … */ })\nflatMap(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return an array containing new elements of the new array, or a single non-array value to be added to the new array.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `flatMap()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\nA new array with each element being the result of the callback function and flattened\nby a depth of 1.\n\n## Description\n\nThe `flatMap()` method is an iterative method. See [`Array.prototype.map()`](./map.mdx) for a detailed description of the callback function. The `flatMap()` method is identical to [`map(callbackFn, thisArg)`](./map.mdx) followed by [`flat(1)`](./flat.mdx) — for each element, it produces an array of new elements, and concatenates the resulting arrays together to form a new array.\n\nThe `flatMap()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. However, the value returned from `callbackFn` must be an array if it is to be flattened.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Array/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.forEach()\n\nThe **`forEach()`** method executes a provided function once\nfor each array element.\n\n## Syntax\n\n```js\n// Arrow function\nforEach((element) => { /* … */ })\nforEach((element, index) => { /* … */ })\nforEach((element, index, array) => { /* … */ })\n\n// Callback function\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n\n// Inline callback function\nforEach(function (element) { /* … */ })\nforEach(function (element, index) { /* … */ })\nforEach(function (element, index, array) { /* … */ })\nforEach(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value is discarded.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `forEach()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\n`undefined`.\n\n## Description\n\nThe `forEach()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array in ascending-index order. Unlike [`Array.prototype.map()`](./map.mdx), `forEach()` always returns [`undefined`](../../../globals/undefined.mdx) and is not chainable. The typical use case is to execute side effects at the end of a chain.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\n`forEach()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `forEach()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\nThe `forEach()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n\nThere is no way to stop or break a `forEach()` loop other than by throwing an exception. If you need such behavior, the `forEach()` method is the wrong tool.\n\nEarly termination may be accomplished with looping statements like [`for`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for), [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of), and [`for...in`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...in). Array methods like [`Array.prototype.some()`](./some.mdx), [`Array.prototype.some()`](./some.mdx), [`Array.prototype.find()`](./find.mdx), and [`Array.prototype.findIndex()`](./findIndex.mdx) also stops iteration immediately when further iteration is not necessary.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Array/prototype/includes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.includes()\n\nThe **`includes()`** method determines whether an array\nincludes a certain value among its entries, returning `true` or\n`false` as appropriate.\n\n## Syntax\n\n```js\nincludes(searchElement)\nincludes(searchElement, fromIndex)\n```\n\n### Parameters\n\n- `searchElement`\n  - : The value to search for.\n- `fromIndex` _**optional**_\n  - : Zero-based index at which to start searching, converted to an integer.\n    - Negative index counts back from the end of the array — if `fromIndex < 0`, `fromIndex + array.length` is used. However, the array is still searched from front to back in this case.\n    - If `fromIndex < -array.length` or `fromIndex` is omitted, `0` is used, causing the entire array to be searched.\n    - If `fromIndex >= array.length`, the array is not searched and `false` is returned.\n\n### Return value\n\nA boolean value which is `true` if the value `searchElement` is found within the array (or the part of the array indicated by the index `fromIndex`, if specified).\n\n## Description\n\nThe `includes()` method compares `searchElement` to elements of the array using the [SameValueZero](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) algorithm. Values of zero are all considered to be equal, regardless of sign. (That is, `-0` is equal to `0`), but `false` is _not_ considered to be the same as `0`. [`NaN`](../../NaN.mdx) can be correctly searched for.\n\nWhen used on sparse arrays, the `includes()` method iterates empty slots as if they have the value `undefined`.\n\nThe `includes()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Array/prototype/indexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.indexOf()\n\nThe **`indexOf()`** method returns the first index at which a\ngiven element can be found in the array, or -1 if it is not present.\n\n## Syntax\n\n```js\nindexOf(searchElement)\nindexOf(searchElement, fromIndex)\n```\n\n### Parameters\n\n- `searchElement`\n  - : Element to locate in the array.\n- `fromIndex` _**optional**_\n  - : Zero-based index at which to start searching, converted to an integer.\n    - Negative index counts back from the end of the array — if `fromIndex < 0`, `fromIndex + array.length` is used. Note, the array is still searched from front to back in this case.\n    - If `fromIndex < -array.length` or `fromIndex` is omitted, `0` is used, causing the entire array to be searched.\n    - If `fromIndex >= array.length`, the array is not searched and `-1` is returned.\n\n### Return value\n\nThe first index of the element in the array; **-1** if not found.\n\n## Description\n\nThe `indexOf()` method compares `searchElement` to elements of the array using [strict equality](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) (the same algorithm used by the `===` operator).\n\nThe `indexOf()` method skips empty slots in sparse arrays.\n\nThe `indexOf()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Array/prototype/join.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.join()\n\nThe **`join()`** method creates and\nreturns a new string by concatenating all of the elements in an array\n(or an [array-like object](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects)),\nseparated by commas or a specified separator string. If the array has\nonly one item, then that item will be returned without using the separator.\n\n## Syntax\n\n```js\njoin()\njoin(separator)\n```\n\n### Parameters\n\n- `separator` _**optional**_\n  - : Specifies a string to separate each pair of adjacent elements of the array. The\n    separator is converted to a string if necessary. If omitted, the array elements are\n    separated with a comma (\",\"). If `separator` is an empty string, all\n    elements are joined without any characters in between them.\n\n### Return value\n\nA string with all array elements joined. If `arr.length` is\n`0`, the empty string is returned.\n\n## Description\n\nThe string conversions of all array elements are joined into one string. If an element is `undefined`, `null`, it is converted to an empty string instead of the string `\"null\"` or `\"undefined\"`.\n\nThe `join` method is accessed internally by [`Array.prototype.toString()`](./toString.mdx) with no arguments. Overriding `join` of an array instance will override its `toString` behavior as well.\n\nWhen used on sparse arrays, the `join()` method iterates empty slots as if they have the value `undefined`.\n\nThe `join()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Array/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.keys()\n\nThe **`keys()`** method returns a new **Array\nIterator** object that contains the keys for each index in the array.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nA new `Array` iterator object.\n\n## Description\n\nWhen used on sparse arrays, the `keys()` method iterates empty slots as if they have the value `undefined`.\n\nThe `keys()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Array/prototype/lastIndexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.lastIndexOf()\n\nThe **`lastIndexOf()`** method returns the last index at which\na given element can be found in the array, or -1 if it is not present. The array is\nsearched backwards, starting at `fromIndex`.\n\n## Syntax\n\n```js\nlastIndexOf(searchElement)\nlastIndexOf(searchElement, fromIndex)\n```\n\n### Parameters\n\n- `searchElement`\n  - : Element to locate in the array.\n- `fromIndex` _**optional**_\n  - : Zero-based index at which to start searching backwards, converted to an integer.\n    - Negative index counts back from the end of the array — if `fromIndex < 0`, `fromIndex + array.length` is used.\n    - If `fromIndex < -array.length`, the array is not searched and `-1` is returned. You can think of it conceptually as starting at a nonexistent position before the beginning of the array and going backwards from there. There are no array elements on the way, so `searchElement` is never found.\n    - If `fromIndex >= array.length` or `fromIndex` is omitted, `array.length - 1` is used, causing the entire array to be searched. You can think of it conceptually as starting at a nonexistent position beyond the end of the array and going backwards from there. It eventually reaches the real end position of the array, at which point it starts searching backwards through the actual array elements.\n\n### Return value\n\nThe last index of the element in the array; **-1** if not found.\n\n## Description\n\nThe `lastIndexOf()` method compares `searchElement` to elements of the array using [strict equality](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) (the same algorithm used by the `===` operator).\n\nThe `lastIndexOf()` method skips empty slots in sparse arrays.\n\nThe `lastIndexOf()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Array/prototype/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.length\n\nThe **`length`** data property of an `Array` instance represents the number of elements in that array. The value is an unsigned, 32-bit integer that is always numerically greater than the highest index in the array.\n\n## Value\n\nA non-negative integer less than 2<sup>32</sup>.\n\n## Description\n\nThe value of the `length` property is a non-negative integer with a value less than 2<sup>32</sup>.\n\n```js\nconst listA = [1, 2, 3];\nconst listB = new Array(6);\n\nconsole.log(listA.length);\n// 3\n\nconsole.log(listB.length);\n// 6\n\nlistB.length = 2 ** 32; // 4294967296\n// RangeError: Invalid array length\n\nconst listC = new Array(-100); // Negative numbers are not allowed\n// RangeError: Invalid array length\n```\n\nThe array object observes the `length` property, and automatically syncs the `length` value with the array's content. This means:\n\n- Setting `length` to a value smaller than the current length truncates the array — elements beyond the new `length` are deleted.\n- Setting any array index (a non-negative integer smaller than 2<sup>32</sup>) beyond the current `length` extends the array — the `length` property is increased to reflect the new highest index.\n- Setting `length` to an invalid value (e.g. a negative number or a non-integer) throws a `RangeError` exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Array/prototype/map.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.map()\n\nThe **`map()`** method **creates\na new array** populated with the results of calling a provided function on\nevery element in the calling array.\n\n## Syntax\n\n```js\n// Arrow function\nmap((element) => { /* … */ })\nmap((element, index) => { /* … */ })\nmap((element, index, array) => { /* … */ })\n\n// Callback function\nmap(callbackFn)\nmap(callbackFn, thisArg)\n\n// Inline callback function\nmap(function (element) { /* … */ })\nmap(function (element, index) { /* … */ })\nmap(function (element, index, array) { /* … */ })\nmap(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value is added as a single element in the new array.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `map()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\nA new array with each element being the result of the callback function.\n\n## Description\n\nThe `map()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array and constructs a new array from the results.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nThe `map()` method is a copying method. It does not alter `this`. However, the function provided as `callbackFn` can mutate the array. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `map()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `map()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n\nSince `map` builds a new array, calling it without using the returned\narray is an anti-pattern; use [`Array.prototype.forEach()`](./forEach.mdx) or\n`for...of` instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Array/prototype/pop.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.pop()\n\nThe **`pop()`** method removes the **last**\nelement from an array and returns that element. This method changes the length of the\narray.\n\n## Syntax\n\n```js\npop()\n```\n\n### Return value\n\nThe removed element from the array; [`undefined`](../../../globals/undefined.mdx) if the array is empty.\n\n## Description\n\nThe `pop()` method removes the last element from an array and returns that value to the caller. If you call `pop()` on an empty array, it returns [`undefined`](../../../globals/undefined.mdx).\n\n[`Array.prototype.shift()`](./shift.mdx) has similar behavior to `pop()`, but applied to the first element in an array.\n\nThe `pop()` method is a mutating method. It changes the length and the content of `this`. In case you want the value of `this` to be the same, but return a new array with the last element removed, you can use [`arr.slice(0, -1)`](./slice.mdx) instead.\n\nThe `pop()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Array/prototype/push.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.push()\n\nThe **`push()`** method adds one or more elements to the end of\nan array and returns the new length of the array.\n\n## Syntax\n\n```js\npush(element0)\npush(element0, element1)\npush(element0, element1, /* … ,*/ elementN)\n```\n\n### Parameters\n\n- `elementN`\n  - : The element(s) to add to the end of the array.\n\n### Return value\n\nThe new [`Array.prototype.length`](./length.mdx) property of the object upon which the method was called.\n\n## Description\n\nThe `push()` method appends values to an array.\n\n[`Array.prototype.unshift()`](./unshift.mdx)has similar behavior to `push()`, but applied to the start of an array.\n\nThe `push()` method is a mutating method. It changes the length and the content of `this`. In case you want the value of `this` to be the same, but return a new array with elements appended to the end, you can use [`arr.concat([element0, element1, /* ... ,*/ elementN])`](./concat.mdx) instead. Notice that the elements are wrapped in an extra array — otherwise, if the element is an array itself, it would be spread instead of pushed as a single element due to the behavior of `concat()`.\n\nThe `push()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Array/prototype/reduce.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.reduce()\n\nThe **`reduce()`** method executes a user-supplied \"reducer\" callback function on each element of the array, in order, passing in the return value from the calculation on the preceding element.\nThe final result of running the reducer across all elements of the array is a single value.\n\nThe first time that the callback is run there is no \"return value of the previous calculation\".\nIf supplied, an initial value may be used in its place.\nOtherwise the array element at index 0 is used as the initial value and iteration starts from the next element (index 1 instead of index 0).\n\nPerhaps the easiest-to-understand case for `reduce()` is to return the sum of all the elements in an array:\n\nThe reducer walks through the array element-by-element, at each step adding the current array value to the result from the previous step (this result is the running sum of all the previous steps) — until there are no more elements to add.\n\n## Syntax\n\n```js\n// Arrow function\nreduce((accumulator, currentValue) => { /* … */ })\nreduce((accumulator, currentValue, currentIndex) => { /* … */ })\nreduce((accumulator, currentValue, currentIndex, array) => { /* … */ })\n\nreduce((accumulator, currentValue) => { /* … */ }, initialValue)\nreduce((accumulator, currentValue, currentIndex) => { /* … */ }, initialValue)\nreduce((accumulator, currentValue, currentIndex, array) => { /* … */ }, initialValue)\n\n// Callback function\nreduce(callbackFn)\nreduce(callbackFn, initialValue)\n\n// Inline callback function\nreduce(function (accumulator, currentValue) { /* … */ })\nreduce(function (accumulator, currentValue, currentIndex) { /* … */ })\nreduce(function (accumulator, currentValue, currentIndex, array) { /* … */ })\n\nreduce(function (accumulator, currentValue) { /* … */ }, initialValue)\nreduce(function (accumulator, currentValue, currentIndex) { /* … */ }, initialValue)\nreduce(function (accumulator, currentValue, currentIndex, array) { /* … */ }, initialValue)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value becomes the value of the `accumulator` parameter on the next invocation of `callbackFn`. For the last invocation, the return value becomes the return value of `reduce()`.\n\n    The function is called with the following arguments:\n\n    - `accumulator`\n      - : The value resulting from the previous call to `callbackFn`. On first call, `initialValue` if specified, otherwise the value of `array[0]`.\n    - `currentValue`\n      - : The value of the current element. On first call, the value of `array[0]` if an `initialValue` was specified, otherwise the value of `array[1]`.\n    - `currentIndex`\n      - : The index position of `currentValue` in the array. On first call, `0` if `initialValue` was specified, otherwise `1`.\n    - `array`\n      - : The array `reduce()` was called upon.\n\n- `initialValue` _**optional**_\n  - : A value to which `accumulator` is initialized the first time the callback is called.\n    If `initialValue` is specified, `callbackFn` starts executing with the first value in the array as `currentValue`.\n    If `initialValue` is _not_ specified, `accumulator` is initialized to the first value in the array, and `callbackFn` starts executing with the second value in the array as `currentValue`. In this case, if the array is empty (so that there's no first value to return as `accumulator`), an error is thrown.\n\n### Return value\n\nThe value that results from running the \"reducer\" callback function to completion over the entire array.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n\n  - : The array contains no elements and `initialValue` is not provided.\n\n## Description\n\nThe `reduce()` method is an iterative method. It runs a \"reducer\" callback function over all elements in the array, in ascending-index order, and accumulates them into a single value. Every time, the return value of `callbackFn` is passed into `callbackFn` again on next invocation as `accumulator`. The final value of `accumulator` (which is the value returned from `callbackFn` on the final iteration of the array) becomes the return value of `reduce()`.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nUnlike other [iterative methods](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array#iterative_methods), `reduce()` does not accept a `thisArg` argument. `callbackFn` is always called with `undefined` as `this`, which gets substituted with `globalThis` if `callbackFn` is non-strict.\n\n`reduce()` is a central concept in [functional programming](https://en.wikipedia.org/wiki/Functional_programming), where it's not possible to mutate any value, so in order to accumulate all values in an array, one must return a new accumulator value on every iteration. This convention propagates to JavaScript's `reduce()`: you should use [spreading](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) or other copying methods where possible to create new arrays and objects as the accumulator, rather than mutating the existing one. If you decided to mutate the accumulator instead of copying it, remember to still return the modified object in the callback, or the next iteration will receive undefined.\n\n`reduce()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `reduce()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `reduce()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n\n### When to not use reduce()\n\nRecursive functions like `reduce()` can be powerful but sometimes difficult to understand, especially for less-experienced JavaScript developers. If code becomes clearer when using other array methods, developers must weigh the readability tradeoff against the other benefits of using `reduce()`. In cases where `reduce()` is the best choice, documentation and semantic variable naming can help mitigate readability drawbacks.\n\n### Edge cases\n\nIf the array only has one element (regardless of position) and no `initialValue` is provided, or if `initialValue` is provided but the array is empty, the solo value will be returned _without_ calling `callbackFn`.\n\nIf `initialValue` is provided and the array is not empty, then the reduce method will always invoke the callback function starting at index 0.\n\nIf `initialValue` is not provided then the reduce method will act differently for arrays with length larger than 1, equal to 1 and 0, as shown in the following example:\n\n```js\nconst getMax = (a, b) => Math.max(a, b);\n\n// callback is invoked for each element in the array starting at index 0\n[1, 100].reduce(getMax, 50); // 100\n[50].reduce(getMax, 10); // 50\n\n// callback is invoked once for element at index 1\n[1, 100].reduce(getMax); // 100\n\n// callback is not invoked\n[50].reduce(getMax); // 50\n[].reduce(getMax, 1); // 1\n\n[].reduce(getMax); // TypeError\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Array/prototype/reduceRight.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.reduceRight()\n\nThe **`reduceRight()`** method applies a function against an\naccumulator and each value of the array (from right-to-left) to reduce it to a single\nvalue.\n\nSee also [`Array.prototype.reduce()`](./reduce.mdx) for left-to-right.\n\n## Syntax\n\n```js\n// Arrow function\nreduceRight((accumulator, currentValue) => { /* … */ })\nreduceRight((accumulator, currentValue, index) => { /* … */ })\nreduceRight((accumulator, currentValue, index, array) => { /* … */ })\nreduceRight((accumulator, currentValue, index, array) => { /* … */ }, initialValue)\n\n// Callback function\nreduceRight(callbackFn)\nreduceRight(callbackFn, initialValue)\n\n// Callback reducer function\nreduceRight(function (accumulator, currentValue) { /* … */ })\nreduceRight(function (accumulator, currentValue, index) { /* … */ })\nreduceRight(function (accumulator, currentValue, index, array) { /* … */ })\nreduceRight(function (accumulator, currentValue, index, array) { /* … */ }, initialValue)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value becomes the value of the `accumulator` parameter on the next invocation of `callbackFn`. For the last invocation, the return value becomes the return value of `reduce()`.\n\n    The function is called with the following arguments:\n\n    - `accumulator`\n      - : The value previously returned in the last invocation of the callback, or\n        `initialValue`, if supplied. (See below.)\n    - `currentValue`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `reduceRight()` was called upon.\n\n- `initialValue` _**optional**_\n  - : Value to use as accumulator to the first call of the\n    `callbackFn`. If no initial value is supplied, the last element in\n    the array will be used and skipped. Calling reduce or reduceRight on an empty array\n    without an initial value creates a `TypeError`.\n\n### Return value\n\nThe value that results from the reduction.\n\n## Description\n\nThe `reduceRight()` method is an iterative method. It runs a \"reducer\" callback function over all elements in the array, in descending-index order, and accumulates them into a single value.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nUnlike other [iterative methods](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array#iterative_methods), `reduce()` does not accept a `thisArg` argument. `callbackFn` is always called with `undefined` as `this`, which gets substituted with `globalThis` if `callbackFn` is non-strict.\n\n`reduceRight()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `reduceRight()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `reduceRight()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Array/prototype/reverse.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.reverse()\n\nThe **`reverse()`** method reverses an array _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_ and returns the reference to the same array, the first array element now becoming the last, and the last array element becoming the first. In other words, elements order in the array will be turned towards the direction opposite to that previously stated.\n\n## Syntax\n\n```js\nreverse()\n```\n\n### Return value\n\nThe reference to the original array, now reversed. Note that the array is reversed _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_, and no copy is made.\n\n## Description\n\nThe `reverse()` method transposes the elements of the calling array object in\nplace, mutating the array, and returning a reference to the array.\n\nThe `reverse()` method preserves empty slots. If the source array is sparse, the empty slots' corresponding new indices are [deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) and also become empty slots.\n\nThe `reverse()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Array/prototype/shift.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.shift()\n\nThe **`shift()`** method removes the **first**\nelement from an array and returns that removed element. This method changes the length\nof the array.\n\n## Syntax\n\n```js\nshift()\n```\n\n### Return value\n\nThe removed element from the array; [`undefined`](../../../globals/undefined.mdx) if the array is empty.\n\n## Description\n\nThe `shift()` method removes the element at the zeroth index and shifts the\nvalues at consecutive indexes down, then returns the removed value. If the\n[`Array.prototype.length`](./length.mdx) property is 0, [`undefined`](../../../globals/undefined.mdx) is returned.\n\nThe [`Array.prototype.pop()`](./pop.mdx) method has similar behavior to `shift()`, but applied to the last element in an array.\n\nThe `shift()` method is a mutating method. It changes the length and the content of `this`. In case you want the value of `this` to be the same, but return a new array with the first element removed, you can use [`arr.slice(1)`](./slice.mdx) instead.\n\nThe `shift()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Array/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.slice()\n\nThe **`slice()`** method returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of a portion of\nan array into a new array object selected from `start` to `end`\n(`end` not included) where `start` and `end` represent\nthe index of items in that array. The original array will not be modified.\n\n## Syntax\n\n```js\nslice()\nslice(start)\nslice(start, end)\n```\n\n### Parameters\n\n- `start` _**optional**_\n  - : Zero-based index at which to start extraction, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, nothing is extracted.\n- `end` _**optional**_\n  - : Zero-based index at which to end extraction, converted to an integer. `slice()` extracts up to but not including `end`.\n    - Negative index counts back from the end of the array — if `end < 0`, `end + array.length` is used.\n    - If `end < -array.length`, `0` is used.\n    - If `end >= array.length` or `end` is omitted, `array.length` is used, causing all elements until the end to be extracted.\n    - If `end` is positioned before or at `start` after normalization, nothing is extracted.\n\n### Return value\n\nA new array containing the extracted elements.\n\n## Description\n\nThe `slice()` method is a copying method. It does not alter `this` but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains some of the same elements as the ones from the original array.\n\nThe `slice()` method preserves empty slots. If the sliced portion is sparse, the returned array is sparse as well.\n\nThe `slice()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Array/prototype/some.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.some()\n\nThe **`some()`** method tests whether\nat least one element in the array passes the test implemented by the provided\nfunction. It returns true if, in the array, it finds an element for which the provided function returns true; otherwise it returns false. It doesn't modify the array.\n\n## Syntax\n\n```js\n// Arrow function\nsome((element) => { /* … */ })\nsome((element, index) => { /* … */ })\nsome((element, index, array) => { /* … */ })\n\n// Callback function\nsome(callbackFn)\nsome(callbackFn, thisArg)\n\n// Inline callback function\nsome(function (element) { /* … */ })\nsome(function (element, index) { /* … */ })\nsome(function (element, index, array) { /* … */ })\nsome(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) to indicate the element passes the test, and a falsy value otherwise.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `some()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\n`true` if the callback function returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value for at least one element in the array. Otherwise, `false`.\n\n## Description\n\nThe `some()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array, until the `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. If such an element is found, `some()` immediately returns `true` and stops iterating through the array. Otherwise, if `callbackFn` returns a [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value for all elements, `some()` returns `false`.\n\n`some()` acts like the \"there exists\" quantifier in mathematics. In particular, for an empty array, it returns `false` for any condition.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\n`some()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `some()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\nThe `some()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Array/prototype/sort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.sort()\n\nThe **`sort()`** method sorts the elements of an array _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_ and returns the reference to the same array, now sorted. The default sort order is ascending, built upon converting the elements into strings, then comparing their sequences of UTF-16 code units values.\n\nThe time and space complexity of the sort cannot be guaranteed as it depends on the\nimplementation.\n\n## Syntax\n\n```js\n// Functionless\nsort()\n\n// Arrow function\nsort((a, b) => { /* … */ } )\n\n// Compare function\nsort(compareFn)\n\n// Inline compare function\nsort(function compareFn(a, b) { /* … */ })\n```\n\n### Parameters\n\n- `compareFn` _**optional**_\n\n  - : Specifies a function that defines the sort order. If omitted, the array elements are converted to strings, then sorted according to each character's Unicode code point value.\n\n    - `a`\n      - : The first element for comparison.\n    - `b`\n      - : The second element for comparison.\n\n### Return value\n\nThe reference to the original array, now sorted. Note that the array is sorted _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_, and no copy is made.\n\n## Description\n\nIf `compareFn` is not supplied, all non-`undefined` array\nelements are sorted by converting them to strings and comparing strings in UTF-16 code\nunits order. For example, \"banana\" comes before \"cherry\". In a numeric sort, 9 comes\nbefore 80, but because numbers are converted to strings, \"80\" comes before \"9\" in the\nUnicode order. All `undefined` elements are sorted to the end of the array.\n\nThe `sort()` method preserves empty slots. If the source array is sparse, the empty slots are moved to the end of the array, and always come after all the `undefined`.\n\n> **Note:** In UTF-16, Unicode characters above `\\uFFFF` are\n> encoded as two surrogate code units, of the range\n> `\\uD800` - `\\uDFFF`. The value of each code unit is taken\n> separately into account for the comparison. Thus the character formed by the surrogate\n> pair `\\uD855\\uDE51` will be sorted before the character\n> `\\uFF3A`.\n\nIf `compareFn` is supplied, all non-`undefined` array\nelements are sorted according to the return value of the compare function (all\n`undefined` elements are sorted to the end of the array, with no call to\n`compareFn`).\n\n| `compareFn(a, b)` return value | sort order                         |\n| ------------------------------ | ---------------------------------- |\n| > 0                            | sort `a` after `b`                 |\n| < 0                            | sort `a` before `b`                |\n| === 0                          | keep original order of `a` and `b` |\n\nSo, the compare function has the following form:\n\n```js\nfunction compareFn(a, b) {\n  if (a is less than b by some ordering criterion) {\n    return -1;\n  }\n  if (a is greater than b by the ordering criterion) {\n    return 1;\n  }\n  // a must be equal to b\n  return 0;\n}\n```\n\nMore formally, the comparator is expected to have the following properties, in order to ensure proper sort behavior:\n\n- _Pure_: The comparator does not mutate the objects being compared or any external state. (This is important because there's no guarantee _when_ and _how_ the comparator will be called, so any particular call should not produce visible effects to the outside.)\n- _Stable_: The comparator returns the same result with the same pair of input.\n- _Reflexive_: `compareFn(a, a) === 0`.\n- _Anti-symmetric_: `compareFn(a, b)` and `compareFn(b, a)` must both be `0` or have opposite signs.\n- _Transitive_: If `compareFn(a, b)` and `compareFn(b, c)` are both positive, zero, or negative, then `compareFn(a, c)` has the same positivity as the previous two.\n\nA comparator conforming to the constraints above will always be able to return all of `1`, `0`, and `-1`, or consistently return `0`. For example, if a comparator only returns `1` and `0`, or only returns `0` and `-1`, it will not be able to sort reliably because _anti-symmetry_ is broken. A comparator that always returns `0` will cause the array to not be changed at all, but is reliable nonetheless.\n\nThe default lexicographic comparator satisfies all constraints above.\n\nTo compare numbers instead of strings, the compare function can subtract `b`\nfrom `a`. The following function will sort the array in ascending order (if\nit doesn't contain `Infinity` and `NaN`):\n\n```js\nfunction compareNumbers(a, b) {\n  return a - b;\n}\n```\n\nThe `sort()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Array/prototype/splice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.splice()\n\nThe **`splice()`** method changes the contents of an array by\nremoving or replacing existing elements and/or adding new elements [in place](https://en.wikipedia.org/wiki/In-place_algorithm). To access part of an array without modifying it, see [`Array.prototype.slice()`](./slice.mdx).\n\n## Syntax\n\n```js\nsplice(start)\nsplice(start, deleteCount)\nsplice(start, deleteCount, item1)\nsplice(start, deleteCount, item1, item2, itemN)\n```\n\n### Parameters\n\n- `start`\n\n  - : Zero-based index at which to start changing the array, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, no element will be deleted, but the method will behave as an adding function, adding as many elements as provided.\n\n- `deleteCount` _**optional**_\n\n  - : An integer indicating the number of elements in the array to remove from `start`.\n\n    If `deleteCount` is omitted, or if its value is greater than or equal to the number of elements after the position specified by `start`, then all the elements from `start` to the end of the array will be deleted. However, if you wish to pass any `itemN` parameter, you should pass `Infinity` as `deleteCount` to delete all elements after `start`, because an explicit `undefined` gets [converted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#integer_conversion) to `0`.\n\n    If `deleteCount` is `0` or negative, no elements are removed.\n    In this case, you should specify at least one new element (see below).\n\n- `item1`, …, `itemN` _**optional**_\n\n  - : The elements to add to the array, beginning from `start`.\n\n    If you do not specify any elements, `splice()` will only remove elements from the array.\n\n### Return value\n\nAn array containing the deleted elements.\n\nIf only one element is removed, an array of one element is returned.\n\nIf no elements are removed, an empty array is returned.\n\n## Description\n\nThe `splice()` method is a mutating method. It may change the content of `this`. If the specified number of elements to insert differs from the number of elements being removed, the array's `length` will be changed as well. At the same time, it uses [`@@species`](../@@species.mdx) to create a new array instance to be returned.\n\nIf the deleted portion is sparse, the array returned by `splice()` is sparse as well, with those corresponding indices being empty slots.\n\nThe `splice()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Array/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string representing\nthe elements of the array. The elements are converted to Strings using their\n`toLocaleString` methods and these Strings are separated by a locale-specific\nString (such as a comma \",\").\n\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\n- `locales` _**optional**_\n  - : A string with a BCP 47 language tag, or an array of such strings. For the general form and interpretation of the `locales` argument, see [Locale identification and negotiation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation).\n- `options` _**optional**_\n  - : An object with configuration properties. For numbers, see [`Number.prototype.toLocaleString()`](../../../globals/Number/prototype/toLocaleString.mdx); for dates, see [`Date.prototype.toLocaleString()`](../../../globals/Date/prototype/toLocaleString.mdx).\n\n### Return value\n\nA string representing the elements of the array.\n\n## Description\n\nThe `Array.prototype.toLocaleString` method traverses its content, calling the `toLocaleString` method of every element with the `locales` and `options` parameters provided, and concatenates them with an implementation-defined separator (such as a comma \",\"). Note that the method itself does not consume the two parameters — it only passes them to the `toLocaleString()` of each element. The choice of the separator string depends on the host's current locale, not the `locales` parameter.\n\nIf an element is `undefined`, `null`, it is converted to an empty string instead of the string `\"null\"` or `\"undefined\"`.\n\nWhen used on sparse arrays, the `toLocaleString()` method iterates empty slots as if they have the value `undefined`.\n\nThe `toLocaleString()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Array/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.toString()\n\nThe **`toString()`** method returns a string representing the\nspecified array and its elements.\n\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the elements of the array.\n\n## Description\n\nThe `Array` object overrides the `toString` method of `Object`. The `toString` method of arrays calls [`join()`](../../../globals/Array/prototype/join.mdx) internally, which joins the array and returns one string containing each array element separated by commas. If the `join` method is unavailable or is not a function, [`Object.prototype.toString`](../../../globals/Object/prototype/toString.mdx) is used instead, returning `[object Array]`.\n\n```js\nconst arr = [];\narr.join = 1; // re-assign `join` with a non-function\nconsole.log(arr.toString()); // [object Array]\n\nconsole.log(Array.prototype.toString.call({ join: () => 1 })); // 1\n```\n\nJavaScript calls the `toString` method automatically when an array is to be represented as a text value or when an array is referred to in a string concatenation.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Array/prototype/unshift.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.unshift()\n\nThe **`unshift()`** method adds one or more elements to the\nbeginning of an array and returns the new length of the array.\n\n## Syntax\n\n```js\nunshift(element0)\nunshift(element0, element1)\nunshift(element0, element1, /* … ,*/ elementN)\n```\n\n### Parameters\n\n- `elementN`\n  - : The elements to add to the front of the `arr`.\n\n### Return value\n\nThe new [`Array.prototype.length`](./length.mdx) property of the object upon which the\nmethod was called.\n\n## Description\n\nThe `unshift()` method inserts the given values to the beginning of an\narray-like object.\n\n[`Array.prototype.push()`](./push.mdx) has similar behavior to `unshift()`, but applied to the end of an array.\n\nPlease note that, if multiple elements are passed as parameters, they're inserted in\nchunk at the beginning of the object, in the exact same order they were passed as\nparameters. Hence, calling `unshift()` with `n`\narguments **once**, or calling it `n` times with\n**1** argument (with a loop, for example), don't yield the same results.\n\nSee example:\n\n```js\nlet arr = [4, 5, 6];\n\narr.unshift(1, 2, 3);\nconsole.log(arr);\n// [1, 2, 3, 4, 5, 6]\n\narr = [4, 5, 6]; // resetting the array\n\narr.unshift(1);\narr.unshift(2);\narr.unshift(3);\n\nconsole.log(arr);\n// [3, 2, 1, 4, 5, 6]\n```\n\nThe `unshift()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Array/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.values()\n\nThe **`values()`** method returns a new _array [iterator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterator_protocol)_ object that iterates the value of each index in the array.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nA new iterable iterator object.\n\n## Description\n\n`Array.prototype.values()` is the default implementation of [`Array.prototype[@@iterator]()`](./@@iterator.mdx).\n\n```js\nArray.prototype.values === Array.prototype[Symbol.iterator]; // true\n```\n\nWhen used on sparse arrays, the `values()` method iterates empty slots as if they have the value `undefined`.\n\nThe `values()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/ArrayBuffer/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get ArrayBuffer\\[Symbol.species]\n\nThe **`ArrayBuffer[Symbol.species]`** accessor property returns the constructor used to construct return values from array buffer methods.\n\n> **Warning:** The existence of `Symbol.species` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Syntax\n\n```js\nArrayBuffer[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct return values from array buffer methods that create new array buffers.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `ArrayBuffer` objects. Subclass constructors may override it to change the constructor assignment. The default implementation is basically:\n\n```js\n// Hypothetical underlying implementation for illustration\nclass ArrayBuffer {\n  static get [Symbol.species]() {\n    return this;\n  }\n}\n```\n\nBecause of this polymorphic implementation, `Symbol.species` of derived subclasses would also return the constructor itself by default.\n\n```js\nclass SubArrayBuffer extends ArrayBuffer {}\nSubArrayBuffer[Symbol.species] === SubArrayBuffer; // true\n```\n\nWhen calling array buffer methods that do not mutate the existing object but return a new array buffer instance (for example, [`slice()`](./prototype/slice.mdx)), the object's `constructor[Symbol.species]` will be accessed. The returned constructor will be used to construct the return value of the array buffer method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/ArrayBuffer/ArrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer()\n\nThe **`ArrayBuffer()`** constructor is used to create \"ArrayBuffer\" objects.\n\n## Syntax\n\n```js\nnew ArrayBuffer(length)\n```\n\n> **Note:** `ArrayBuffer()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `length`\n  - : The size, in bytes, of the array buffer to create.\n\n### Return value\n\nA new `ArrayBuffer` object of the specified size. Its contents are\ninitialized to 0.\n\n### Exceptions\n\n- [`RangeError`](../RangeError/RangeError.mdx)\n  - : Thrown if the `length` is larger than `Number_MAX_SAFE_INTEGER` (≥ 2<sup>53</sup>) or negative.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/ArrayBuffer/isView.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer.isView\n\nThe **`ArrayBuffer.isView()`** method determines whether the\npassed value is one of the `ArrayBuffer` views,\nsuch as [typed array objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray)\nor a [`DataView`](../DataView/DataView.mdx).\n\n## Syntax\n\n```js\nArrayBuffer.isView(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be checked.\n\n### Return value\n\n`true` if the given argument is one of the `ArrayBuffer` views;\notherwise, `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/ArrayBuffer/prototype/byteLength.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer.prototype.byteLength\n\nThe **`byteLength`** accessor property represents the length of an `ArrayBuffer` in bytes.\n\n## Description\n\nThe `byteLength` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when the array is constructed and cannot be changed. This property returns 0 if this `ArrayBuffer` has been detached.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/ArrayBuffer/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer.prototype.slice()\n\nThe **`slice()`** method returns a new `ArrayBuffer`\nwhose contents are a copy of this `ArrayBuffer`'s bytes from\n`begin`, inclusive, up to `end`, exclusive.\n\n## Syntax\n\n```js\nslice(begin)\nslice(begin, end)\n```\n\n### Parameters\n\n- `begin`\n  - : Zero-based byte index at which to begin slicing.\n- `end` _**optional**_\n  - : Byte index before which to end slicing. If end is unspecified, the new\n    `ArrayBuffer` contains all bytes from begin to the end of this\n    `ArrayBuffer`. If negative, it will make the Byte index begin from the last\n    Byte.\n\n### Return value\n\nA new `ArrayBuffer` object.\n\n## Description\n\nThe `slice()` method copies up to, but not including, the byte indicated by\nthe `end` parameter. If either `begin` or `end` is\nnegative, it refers to an index from the end of the array, as opposed to from the\nbeginning.\n\nThe range specified by the `begin` and `end` parameters is\nclamped to the valid index range for the current array. If the computed length of the\nnew `ArrayBuffer` would be negative, it is clamped to zero.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/BigInt/BigInt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt()\n\nThe **`BigInt()`** function returns a value of type **bigint**.\n\n## Syntax\n\n```js\nBigInt(value)\n```\n\n> **Note:** `BigInt()` can only be called without `new`. Attempting to construct it with `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `value`\n  - : The numeric value of the object being created. It may be a string, an integer, a boolean, or another `BigInt`.\n\n### Return value\n\nA `BigInt` value. Number values must be integers and are converted to BigInts. The boolean value `true` becomes `1n`, and `false` becomes `0n`. Strings are parsed as if they are source text for integer literals, which means they can have leading and trailing whitespaces and can be prefixed with `0b`, `0o`, or `0x`.\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if the parameter is a non-integral number.\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if at least one of these conditions is met:\n    - The parameter cannot be converted to a primitive.\n    - After conversion to a primitive, the result is [`undefined`](../undefined.mdx), `null`, `Symbol`.\n- [`SyntaxError`](../SyntaxError/SyntaxError.mdx)\n  - : Thrown if the parameter is a string that cannot be parsed as a `BigInt`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/BigInt/asIntN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.asIntN()\n\nThe **`BigInt.asIntN`** static method clamps a `BigInt` value to the given number of bits, and returns that value as a signed integer.\n\n## Syntax\n\n```js\nBigInt.asIntN(bits, bigint)\n```\n\n### Parameters\n\n- `bits`\n  - : The amount of bits available for the returned BigInt. Should be an integer between 0 and 2<sup>53</sup> - 1, inclusive.\n- `bigint`\n  - : The BigInt value to clamp to fit into the supplied bits.\n\n### Return value\n\nThe value of `bigint` modulo 2^`bits`, as a signed integer.\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `bits` is negative or greater than 2<sup>53</sup> - 1.\n\n## Description\n\nThe `BigInt.asIntN` method clamps a `BigInt` value to the given number of bits, and interprets the result as a signed integer. For example, for `BigInt.asIntN(3, 25n)`, the value `25n` is clamped to `1n`:\n\n```plain\n25n = 00011001 (base 2)\n          ^=== Clamp to three remaining bits\n===>       001 (base 2) = 1n\n```\n\nIf the leading bit of the remaining number is `1`, the result is negative. For example, `BigInt.asIntN(4, 25n)` yields `-7n`, because `1001` is the encoding of `-7` under two's complement:\n\n```plain\n25n = 00011001 (base 2)\n         ^==== Clamp to four remaining bits\n===>      1001 (base 2) = -7n\n```\n\n> **Note:** `BigInt` values are always encoded as two's complement in binary.\n\nUnlike similar language APIs such as [`Number.prototype.toExponential()`](../Number/prototype/toExponential.mdx), `asIntN` is a static property of `BigInt`, so you always use it as `BigInt.asIntN()`, rather than as a method of a BigInt value. Exposing `asIntN()` as a \"standard library function\" allows [interop with asm.js](https://github.com/tc39/proposal-bigint/blob/master/ADVANCED.md#dont-break-asmjs).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/BigInt/asUintN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.asUintN()\n\nThe **`BigInt.asUintN`** static method clamps a `BigInt` value to the given number of bits, and returns that value as an unsigned integer.\n\n## Syntax\n\n```js\nBigInt.asUintN(bits, bigint)\n```\n\n### Parameters\n\n- `bits`\n  - : The amount of bits available for the returned BigInt. Should be an integer between 0 and 2<sup>53</sup> - 1, inclusive.\n- `bigint`\n  - : The BigInt value to clamp to fit into the supplied bits.\n\n### Return value\n\nThe value of `bigint` modulo 2^`bits`, as an unsigned integer.\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `bits` is negative or greater than 2<sup>53</sup> - 1.\n\n## Description\n\nThe `BigInt.asUintN` method clamps a `BigInt` value to the given number of bits, and interprets the result as an unsigned integer. Unsigned integers have no sign bits and are always non-negative. For example, for `BigInt.asUintN(4, 25n)`, the value `25n` is clamped to `9n`:\n\n```plain\n25n = 00011001 (base 2)\n         ^==== Clamp to four remaining bits\n===>      1001 (base 2) = 9n\n```\n\n> **Note:** `BigInt` values are always encoded as two's complement in binary.\n\nUnlike similar language APIs such as [`Number.prototype.toExponential()`](../Number/prototype/toExponential.mdx), `asUintN` is a static property of `BigInt`, so you always use it as `BigInt.asUintN()`, rather than as a method of a BigInt value. Exposing `asUintN()` as a \"standard library function\" allows [interop with asm.js](https://github.com/tc39/proposal-bigint/blob/master/ADVANCED.md#dont-break-asmjs).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/BigInt/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string with a language-sensitive representation of this BigInt. In implementations with [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) support, this method simply calls `Intl.NumberFormat`.\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` parameters customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat), these parameters correspond exactly to the [`Intl.NumberFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) constructor's parameters. Implementations without `Intl.NumberFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#locales) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored.\n\nSee the [`Intl.NumberFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string with a language-sensitive representation of the given BigInt.\n\nIn implementations with `Intl.NumberFormat`, this is equivalent to `new Intl.NumberFormat(locales, options).format(number)`.\n\n## Performance\n\nWhen formatting large numbers of numbers, it is better to create a\n`Intl.NumberFormat` object and use the function provided by its\n`format()` method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/BigInt/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified `BigInt` value. The trailing \"n\" is not part of the string.\n\n## Syntax\n\n```js\ntoString()\ntoString(radix)\n```\n\n### Parameters\n\n- `radix` _**optional**_\n  - : An integer in the range 2 through 36 specifying the base to use for representing the BigInt value. Defaults to 10.\n\n### Return value\n\nA string representing the specified `BigInt` value.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `radix` is less than 2 or greater than 36.\n\n## Description\n\nThe `BigInt` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../Object/prototype/toString.mdx). For `BigInt` values, the `toString()` method returns a string representation of the value in the specified radix.\n\nFor radixes above 10, the letters of the alphabet indicate digits greater than 9. For example, for hexadecimal numbers (base 16) `a` through `f` are used.\n\nIf the specified BigInt value is negative, the sign is preserved. This is the case even if the radix is 2; the string returned is the positive binary representation of the BigInt value preceded by a `-` sign, **not** the two's complement of the BigInt value.\n\nThe `toString()` method requires its `this` value to be a `BigInt` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to BigInt values.\n\nBecause `BigInt` doesn't have a [`[Symbol.toPrimitive]()`](../../Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `BigInt` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, BigInt _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — rather, they are directly converted using the same algorithm as the initial `toString()` implementation.\n\n```js\nBigInt.prototype.toString = () => \"Overridden\";\nconsole.log(`${1n}`); // \"1\"\nconsole.log(`${Object(1n)}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/BigInt/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.prototype.valueOf()\n\nThe **`valueOf()`** method returns the wrapped primitive value\nof a `BigInt` object.\n\n## Syntax\n\n```js\nbigIntObj.valueOf()\n```\n\n### Return value\n\nA BigInt representing the primitive value of the specified `BigInt` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/BigInt64Array/BigInt64Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt64Array()\n\nThe **`BigInt64Array()`** typed array constructor creates a\nnew `BigInt64Array` object, which is, an array of 64-bit signed integers\nin the platform byte order. If control over byte order is needed, use\n[`DataView`](../DataView/DataView.mdx) instead. The contents are initialized to `0n`. Once\nestablished, you can reference elements in the array using the object's methods, or by\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew BigInt64Array()\nnew BigInt64Array(length)\nnew BigInt64Array(typedArray)\nnew BigInt64Array(object)\n\nnew BigInt64Array(buffer)\nnew BigInt64Array(buffer, byteOffset)\nnew BigInt64Array(buffer, byteOffset, length)\n```\n\n> **Note:** `BigInt64Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/BigUint64Array/BigUint64Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigUint64Array()\n\nThe **`BigUint64Array()`** typed array constructor creates a\nnew `BigUint64Array` object, which is, an array of 64-bit unsigned integers\nin the platform byte order. If control over byte order is needed, use\n[`DataView`](../DataView/DataView.mdx) instead. The contents are initialized to `0n`. Once\nestablished, you can reference elements in the array using the object's methods, or by\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew BigUint64Array()\nnew BigUint64Array(length)\nnew BigUint64Array(typedArray)\nnew BigUint64Array(object)\n\nnew BigUint64Array(buffer)\nnew BigUint64Array(buffer, byteOffset)\nnew BigUint64Array(buffer, byteOffset, length)\n```\n\n> **Note:** `BigUint64Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](..//TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Blob/Blob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob()\n\nThe **`Blob()`** constructor creates a `Blob` object, which represents a file-like object of immutable, raw data.\n\n## Syntax\n\n```js\nnew Blob()\nnew Blob(array)\nnew Blob(array, options)\n```\n\n> **Note:** `Blob()` can only be constructed with `new`. Attempting to call it without `new` throws a `TypeError`.\n\n### Parameters\n\n- `array` _**optional**_\n\n  - : An array of values to include in the `Blob`. These can be [`ArrayBuffer`](../../globals/ArrayBuffer/ArrayBuffer.mdx), [`Blob`](../../globals/Blob/Blob.mdx), or strings. If any of these elements is a [`Blob`](../../globals/Blob/Blob.mdx), its content (and not the object itself) is copied into the Blob being constructed.\n\n- `options` _**optional**_\n\n  - : An object containing optional attributes for the `Blob`.\n    - `type`\n      - : A string indicating the MIME type of the data. The default value is the empty string `\"\"`.\n    - `endings`\n      - : A string indicating how to handle line endings in the data. This can be either `\"transparent\"` (default) to keep line endings unchanged, or `\"native\"` to convert line endings to the platform's native line endings (e.g., `\\r\\n` on Windows).\n\n### Return value\n\nA new `Blob` object containing the specified data.\n\n## Description\n\n`Blob` objects represent data that isn't necessarily in a JavaScript-native format. The `File` interface is based on `Blob`, inheriting its functionality and expanding it to support files on the user's system.\n\nTo construct a `Blob` from other non-blob objects and data, use the `Blob()` constructor. To create a blob that contains a subset of another blob's data, use the [`slice()`](../../globals/Blob/prototype/slice.mdx) method.\n\nThe `type` property of a `Blob` object will match the MIME type specified in the constructor's `options` parameter, defaulting to an empty string if not specified.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Blob/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the `Blob` interface returns a `Promise` that resolves with an `ArrayBuffer` containing the entire contents of the `Blob` as binary data.\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with an `ArrayBuffer` containing the blob's data.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Blob/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.size\n\nThe **`size`** read-only property of the `Blob` interface returns the size of the `Blob` in bytes.\n\n## Value\n\nA number representing the size of the `Blob` in bytes.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Blob/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.slice()\n\nThe **`slice()`** method of the `Blob` interface creates and returns a new `Blob` object which contains data from a subset of the blob on which it's called.\n\n## Syntax\n\n```js\nslice()\nslice(start)\nslice(start, end)\nslice(start, end, contentType)\n```\n\n### Parameters\n\n- `start` _**optional**_\n  - : The 0-based index of the first byte to include in the new `Blob`. If negative, it refers to an index from the end of the `Blob`. The default value is 0.\n- `end` _**optional**_\n  - : The 0-based index of the first byte that will not be included in the new `Blob`. If negative, it refers to an index from the end of the `Blob`. The default value is `size`.\n- `contentType` _**optional**_\n  - : A string indicating the content type to assign to the new `Blob`. The default value is an empty string.\n\n### Return value\n\nA new `Blob` object containing the specified subset of data.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Blob/prototype/stream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.stream()\n\nThe **`stream()`** method of the `Blob` interface returns a `ReadableStream` that can be used to read the contents of the `Blob`.\n\n## Syntax\n\n```js\nstream()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `ReadableStream` that provides the data contained within the `Blob`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Blob/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.text()\n\nThe **`text()`** method of the `Blob` interface returns a `Promise` that resolves with a string containing the contents of the blob, interpreted as UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a string containing the blob's data as a text string. The data is always interpreted as UTF-8.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Blob/prototype/type.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.type\n\nThe **`type`** read-only property of the `Blob` interface returns the MIME type of the `Blob`.\n\n## Value\n\nA string indicating the MIME type of the `Blob`. If the type cannot be determined, this returns an empty string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Boolean/Boolean.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Boolean()\n\nThe **`Boolean()`** constructor can create `Boolean` objects or return primitive values of type boolean.\n\n## Syntax\n\n```js\nnew Boolean(value)\nBoolean(value)\n```\n\n> **Note:** `Boolean()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\n- `value`\n  - : The initial value of the `Boolean` object.\n\n### Return value\n\nWhen `Boolean()` is called as a constructor (with `new`), it creates a `Boolean` object, which is **not** a primitive.\n\nWhen `Boolean()` is called as a function (without `new`), it coerces the parameter to a boolean primitive.\n\n> **Warning:** You should rarely find yourself using `Boolean` as a constructor.\n\n## Description\n\nThe value passed as the first parameter is [converted to a boolean value](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean#boolean_coercion). If the value is omitted or is `0`, `-0`, `0n`, [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null), `false`, [`NaN`](../NaN.mdx), [`undefined`](../undefined.mdx), or the empty string (`\"\"`), then the object has an initial value of `false`. All other values, including any object, an empty array (`[]`), or the string `\"false\"`, create an object with an initial value of `true`.\n\n> **Note:** When the non-standard property [`document.all`](https://developer.mozilla.org/docs/Web/API/Document/all) is used as an argument for this constructor, the result is a `Boolean` object with the value `false`. This property is legacy and non-standard and should not be used.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Boolean/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Boolean.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified boolean value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified boolean value.\n\n## Description\n\nThe `Boolean` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../Object/prototype/toString.mdx). For `Boolean` values, the `toString` method returns a string representation of the boolean value, which is either `\"true\"` or `\"false\"`.\n\nThe `toString()` method requires its `this` value to be a `Boolean` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to boolean values.\n\nBecause `Boolean` doesn't have a [`[Symbol.toPrimitive]()`](../../Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `Boolean` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, boolean _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — rather, they are directly converted using the same algorithm as the initial `toString()` implementation.\n\n```js\nBoolean.prototype.toString = () => \"Overridden\";\nconsole.log(`${true}`); // \"true\"\nconsole.log(`${new Boolean(true)}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Boolean/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Boolean.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a\n`Boolean` object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nThe primitive value of the given `Boolean` object.\n\n## Description\n\nThe `valueOf()` method of `Boolean` returns the primitive value\nof a `Boolean` object or literal `Boolean` as a Boolean data type.\n\nThis method is usually called internally by JavaScript and not explicitly in code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/ByteLengthQueuingStrategy/ByteLengthQueuingStrategy.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ByteLengthQueuingStrategy()\n\nThe **`ByteLengthQueuingStrategy()`**\nconstructor creates and returns a `ByteLengthQueuingStrategy` object\ninstance.\n\n## Syntax\n\n```js\nnew ByteLengthQueuingStrategy(highWaterMark)\n```\n\n### Parameters\n\nAn object with the following property:\n\n- `highWaterMark`\n\n  - : The total number of bytes that can be contained in the internal queue before backpressure is applied.\n\n    Unlike `CountQueuingStrategy()` where the `highWaterMark` parameter specifies a simple count of the number of chunks, with `ByteLengthQueuingStrategy()`, the `highWaterMark` parameter specifies a number of _bytes_ — specifically, given a stream of chunks, how many bytes worth of those chunks (rather than a count of how many of those chunks) can be contained in the internal queue before backpressure is applied.\n\n### Return value\n\nAn instance of the `ByteLengthQueuingStrategy` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/ByteLengthQueuingStrategy/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ByteLengthQueuingStrategy.size()\n\nThe **`size()`** method of the\n`ByteLengthQueuingStrategy` interface returns the given chunk's\n`byteLength` property.\n\n## Syntax\n\n```js\nsize(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : A chunk of data being passed through the stream.\n\n### Return value\n\nAn integer representing the byte length of the given chunk.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/CompressionStream/CompressionStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CompressionStream()\n\nThe **`CompressionStream()`** constructor creates a new `CompressionStream` object which compresses a stream of data.\n\n## Syntax\n\n```js\nnew CompressionStream(format)\n```\n\n### Parameters\n\n- `format`\n\n  - : One of the following allowed compression formats:\n\n    - `\"gzip\"`\n    - `\"deflate\"`\n    - `\"deflate-raw\"`\n\n## Exceptions\n\n- `TypeError`\n  - : Thrown if the format passed to the constructor is not supported.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/CompressionStream/prototype/readable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CompressionStream.readable\n\nThe **`readable`** read-only property of the `CompressionStream` interface returns a `ReadableStream`.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/CompressionStream/prototype/writable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CompressionStream.writable\n\nThe **`writable`** read-only property of the `CompressionStream` interface returns a `WritableStream`.\n\n## Value\n\nA `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/CryptoKey/CryptoKey.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CryptoKey\n\nThe **`CryptoKey`** interface represents a cryptographic key obtained from one of the [`SubtleCrypto`](../SubtleCrypto/SubtleCrypto.mdx) method [`importKey()`](../SubtleCrypto/prototype/importKey.mdx).\n\n## Instance properties\n\n- [`type`](./prototype/type.mdx) _**readonly**_\n  - : The type of key the object represents. It may take one of the following values: `\"secret\"`, `\"private\"` or `\"public\"`.\n\n- [`extractable`](./prototype/extractable.mdx) _**readonly**_\n  - : A boolean value indicating whether or not the key may be extracted.\n\n- [`algorithm`](./prototype/algorithm.mdx) _**readonly**_\n  - : An object describing the algorithm for which this key can be used and any associated extra parameters.\n\n- [`usages`](./prototype/usages.mdx) _**readonly**_\n  - : An `Array` of strings, indicating what can be done with the key. Possible values for array elements are `\"encrypt\"`, `\"decrypt\"`, `\"sign\"`, `\"verify\"`, `\"deriveKey\"`, `\"deriveBits\"`, `\"wrapKey\"`, and `\"unwrapKey\"`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/CryptoKey/prototype/algorithm.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# algorithm\n\nThe read-only **`algorithm`** property of the [`CryptoKey`](../CryptoKey.mdx) interface returns an object describing the algorithm for which this key can be used, and any associated extra parameters.\n\nThe object returned depends of the algorithm used to generate the key.\n\n## Value\n\nAn object matching:\n\n- [`RsaHashedImportParams`](../../RsaHashedImportParams/RsaHashedImportParams.mdx) if the algorithm is any of the RSA variants.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/CryptoKey/prototype/extractable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# extractable\n\nThe read-only **`extractable`** property indicates whether or not the key may be extracted.\n\nIf the key cannot be exported, an exception will be thrown if an attempt to extract the key is made.\n\n## Value\n\nA boolean value that is `true` if the key can be exported and `false` if not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/CryptoKey/prototype/type.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# type\n\nThe read-only **`type`** property indicates which kind of key is represented by the object. It can have the following values:\n\n- `\"secret\"`: This key is a secret key for use with a symmetric algorithm.\n- `\"private\"`: This key is the private half of an asymmetric algorithm's key pair.\n- `\"public\"`: This key is the public half of an asymmetric algorithm's key pair.\n\n## Value\n\nOne of the following strings: `\"secret\"`, `\"private\"`, or `\"public\"`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/CryptoKey/prototype/usages.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# usages\n\nThe read-only **`usages`** property indicates what can be done with the key.\n\n## Value\n\nAn `Array` of strings from the following list:\n\n- `\"encrypt\"`: The key may be used to encrypt messages.\n- `\"decrypt\"`: The key may be used to decrypt messages.\n- `\"sign\"`: The key may be used to sign messages.\n- `\"verify\"`: The key may be used to verify signatures.\n- `\"deriveKey\"`: The key may be used in deriving a new key.\n- `\"deriveBits\"`: The key may be used in deriving bits.\n- `\"wrapKey\"`: The key may be used to wrap a key.\n- `\"unwrapKey\"`: The key may be used to unwrap a key.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/DOMException/DOMException.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException()\n\nThe **`DOMException()`** constructor returns a `DOMException` object with a specified message and name.\n\n## Syntax\n\n```js\nnew DOMException()\nnew DOMException(message)\nnew DOMException(message, name)\n```\n\n### Parameters\n\n- `message` _optional_\n  - : A description of the exception. If not present, the empty string `''` is\n    used.\n- `name` _optional_\n  - : A string. If the specified name is a [standard error name](#error-names), then getting the [`code`](./code.mdx) property of the `DOMException` object will return the code number corresponding to the specified name.\n\n### Return value\n\nA newly created `DOMException` object.\n\n## Error names\n\nCommon error names are listed here. Some APIs define their own sets of names, so this is not necessarily a complete list.\n\nNote that the following deprecated historical errors don't have an error name but instead have only a legacy constant code value and a legacy constant name:\n\n- Legacy code value: `2`, legacy constant name: `DOMSTRING_SIZE_ERR`\n- Legacy code value: `6`, legacy constant name: `NO_DATA_ALLOWED_ERR`\n- Legacy code value: `16`, legacy constant name: `VALIDATION_ERR`\n\n> **Note:** Because historically the errors were identified by a numeric value that corresponded with a named variable defined to have that value, some of the entries below indicate the legacy code value and constant name that were used in the past.\n\n- `IndexSizeError`\n  - : The index is not in the allowed range. (Legacy code value: `1` and legacy constant name: `INDEX_SIZE_ERR`)\n- `HierarchyRequestError`\n  - : The node tree hierarchy is not correct. (Legacy code value: `3` and legacy constant name: `HIERARCHY_REQUEST_ERR`)\n- `WrongDocumentError`\n  - : The object is in the wrong `Document`. (Legacy code value: `4` and legacy constant name: `WRONG_DOCUMENT_ERR`)\n- `InvalidCharacterError`\n  - : The string contains invalid characters. (Legacy code value: `5` and legacy constant name: `INVALID_CHARACTER_ERR`)\n- `NoModificationAllowedError`\n  - : The object cannot be modified. (Legacy code value: `7` and legacy constant name: `NO_MODIFICATION_ALLOWED_ERR`)\n- `NotFoundError`\n  - : The object cannot be found here. (Legacy code value: `8` and legacy constant name: `NOT_FOUND_ERR`)\n- `NotSupportedError`\n  - : The operation is not supported. (Legacy code value: `9` and legacy constant name: `NOT_SUPPORTED_ERR`)\n- `InvalidStateError`\n  - : The object is in an invalid state. (Legacy code value: `11` and legacy constant name: `INVALID_STATE_ERR`)\n- `InUseAttributeError`\n  - : The attribute is in use. (Legacy code value: `10` and legacy constant name: `INUSE_ATTRIBUTE_ERR`)\n- `SyntaxError`\n  - : The string did not match the expected pattern. (Legacy code value: `12` and legacy constant name: `SYNTAX_ERR`)\n- `InvalidModificationError`\n  - : The object cannot be modified in this way. (Legacy code value: `13` and legacy constant name: `INVALID_MODIFICATION_ERR`)\n- `NamespaceError`\n  - : The operation is not allowed by Namespaces in XML. (Legacy code value: `14` and legacy constant name: `NAMESPACE_ERR`)\n- `InvalidAccessError`\n  - : The object does not support the operation or argument. (Legacy code value: `15` and legacy constant name: `INVALID_ACCESS_ERR`)\n- `TypeMismatchError` *deprecated*\n  - : The type of the object does not match the expected type. (Legacy code value: `17` and legacy constant name: `TYPE_MISMATCH_ERR`) This value is deprecated; the JavaScript `TypeError` exception is now raised instead of a `DOMException` with this value.\n- `SecurityError`\n  - : The operation is insecure. (Legacy code value: `18` and legacy constant name: `SECURITY_ERR`)\n- `NetworkError`\n  - : A network error occurred. (Legacy code value: `19` and legacy constant name: `NETWORK_ERR`)\n- `AbortError`\n  - : The operation was aborted. (Legacy code value: `20` and legacy constant name: `ABORT_ERR`)\n- `URLMismatchError`\n  - : The given URL does not match another URL. (Legacy code value: `21` and legacy constant name: `URL_MISMATCH_ERR`)\n- `QuotaExceededError`\n  - : The quota has been exceeded. (Legacy code value: `22` and legacy constant name: `QUOTA_EXCEEDED_ERR`)\n- `TimeoutError`\n  - : The operation timed out. (Legacy code value: `23` and legacy constant name: `TIMEOUT_ERR`)\n- `InvalidNodeTypeError`\n  - : The node is incorrect or has an incorrect ancestor for this operation. (Legacy code value: `24` and legacy constant name: `INVALID_NODE_TYPE_ERR`)\n- `DataCloneError`\n  - : The object can not be cloned. (Legacy code value: `25` and legacy constant name: `DATA_CLONE_ERR`)\n- `EncodingError`\n  - : The encoding or decoding operation failed (No legacy code value and constant name).\n- `NotReadableError`\n  - : The input/output read operation failed (No legacy code value and constant name).\n- `UnknownError`\n  - : The operation failed for an unknown transient reason (e.g. out of memory) (No legacy code value and constant name).\n- `ConstraintError`\n  - : A mutation operation in a transaction failed because a constraint was not satisfied (No legacy code value and constant name).\n- `DataError`\n  - : Provided data is inadequate (No legacy code value and constant name).\n- `TransactionInactiveError`\n  - : A request was placed against a transaction that is currently not active or is finished (No legacy code value and constant name).\n- `ReadOnlyError`\n  - : The mutating operation was attempted in a \"readonly\" transaction (No legacy code value and constant name).\n- `VersionError`\n  - : An attempt was made to open a database using a lower version than the existing version (No legacy code value and constant name).\n- `OperationError`\n  - : The operation failed for an operation-specific reason (No legacy code value and constant name).\n- `NotAllowedError`\n  - : The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission (No legacy code value and constant name)."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/DOMException/code.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException.prototype.code\n\nThe **`code`** read-only property of the `DOMException` interface returns one of the legacy [error code constants](./DOMException.mdx#error-names), or `0` if none match.\n\nThis field is used for historical reasons. New DOM exceptions don't use this anymore: they put this info in the [`name`](./name.mdx) attribute.\n\n## Value\n\nOne of the [error code constants](./DOMException.mdx#error-names), or `0` if none match.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/DOMException/message.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException.prototype.message\n\nThe **`message`** read-only property of the `DOMException` interface returns a string representing a message or description associated with the given [error name](./DOMException.mdx#error-names).\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/DOMException/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException.prototype.name\n\nThe **`name`** read-only property of the `DOMException` interface returns a string that contains one of the strings associated with an [error name](./DOMException.mdx#error-names).\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/DataView/DataView.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView()\n\nThe **`DataView()`** constructor is used to create `DataView` objects.\n\n## Syntax\n\n```js\nnew DataView(buffer)\nnew DataView(buffer, byteOffset)\nnew DataView(buffer, byteOffset, byteLength)\n```\n\n> **Note:** `DataView()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `buffer`\n  - : An existing `ArrayBuffer` to use as\n    the storage backing the new `DataView` object.\n- `byteOffset` _**optional**_\n  - : The offset, in bytes, to the first byte in the above buffer for the new view to\n    reference. If unspecified, the buffer view starts with the first byte.\n- `byteLength` _**optional**_\n  - : The number of elements in the byte array. If unspecified, the view's length will\n    match the buffer's length.\n\n### Return value\n\nA new `DataView` object representing the specified data buffer.\n\n### Exceptions\n\n- [`RangeError`](../RangeError/RangeError.mdx)\n\n  - : Thrown if the `byteOffset` or `byteLength` parameter values\n    result in the view extending past the end of the buffer.\n\n    For example, if the buffer is 16 bytes long, the `byteOffset` is 8, and\n    the `byteLength` is 10, this error is thrown because the resulting view\n    tries to extend 2 bytes past the total length of the buffer.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/DataView/prototype/buffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.buffer\n\nThe **`buffer`** accessor property represents the `ArrayBuffer` referenced by the `DataView` at construction time.\n\n## Description\n\nThe `buffer` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when the `DataView` is constructed and cannot be changed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/DataView/prototype/byteLength.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.byteLength\n\nThe **`byteLength`** accessor property represents the length (in bytes) of the dataview.\n\n## Description\n\nThe `byteLength` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when an `DataView` is constructed and cannot be changed. If the `DataView` is not specifying an offset or a `byteLength`, the `byteLength` of the referenced `ArrayBuffer` or `SharedArrayBuffer` will be returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/DataView/prototype/byteOffset.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.byteOffset\n\nThe **`byteOffset`** accessor property represents the offset (in bytes) of this view from the start of its `ArrayBuffer`.\n\n## Description\n\nThe `byteOffset` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when an `DataView` is constructed and cannot be changed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/DataView/prototype/getBigInt64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getBigInt64()\n\nThe **`getBigInt64()`** method gets a signed 64-bit integer\n(long long) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetBigInt64(byteOffset)\ngetBigInt64(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to read the data from.\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is read.\n\n### Return value\n\nA `BigInt`.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would read beyond the end\n    of the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/DataView/prototype/getBigUint64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getBigUint64()\n\nThe **`getBigUint64()`** method gets an unsigned 64-bit integer\n(unsigned long long) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetBigUint64(byteOffset)\ngetBigUint64(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to read the data from.\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is read.\n\n### Return value\n\nA `BigInt`.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would read beyond the end\n    of the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/DataView/prototype/getFloat32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getFloat32()\n\nThe **`getFloat32()`** method gets a signed 32-bit float\n(float) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetFloat32(byteOffset)\ngetFloat32(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 32-bit float number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/DataView/prototype/getFloat64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getFloat64()\n\nThe **`getFloat64()`** method gets a signed 64-bit float\n(double) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetFloat64(byteOffset)\ngetFloat64(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 64-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 64-bit float number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/DataView/prototype/getInt16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getInt16()\n\nThe **`getInt16()`** method gets a signed 16-bit integer\n(short) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetInt16(byteOffset)\ngetInt16(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 16-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/DataView/prototype/getInt32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getInt32()\n\nThe **`getInt32()`** method gets a signed 32-bit integer (long)\nat the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetInt32(byteOffset)\ngetInt32(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in bytes, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 32-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/DataView/prototype/getInt8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getInt8()\n\nThe **`getInt8()`** method gets a signed 8-bit integer (byte)\nat the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetInt8(byteOffset)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n\n### Return value\n\nA signed 8-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/DataView/prototype/getUint16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getUint16()\n\nThe **`getUint16()`** method gets an unsigned 16-bit integer\n(unsigned short) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n\n\n## Syntax\n\n```js\ngetUint16(byteOffset)\ngetUint16(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nAn unsigned 16-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/DataView/prototype/getUint32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getUint32()\n\nThe **`getUint32()`** method gets an unsigned 32-bit integer\n(unsigned long) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n\n\n## Syntax\n\n```js\ngetUint32(byteOffset)\ngetUint32(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nAn unsigned 32-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/DataView/prototype/getUint8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getUint8()\n\nThe **`getUint8()`** method gets an unsigned 8-bit integer\n(unsigned byte) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetUint8(byteOffset)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n\n### Return value\n\nAn unsigned 8-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/DataView/prototype/setBigInt64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setBigInt64()\n\nThe **`setBigInt64()`** method stores a signed 64-bit integer\n(long long) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetBigInt64(byteOffset, value)\nsetBigInt64(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to store the data from.\n- value\n  - : The value to set as a `BigInt`. The highest possible value that fits in\n    a signed 64-bit integer is\n    `2n ** (64n -1n) - 1n` (`9223372036854775807n`). Upon\n    overflow, it will be negative (`-9223372036854775808n`).\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/DataView/prototype/setBigUint64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setBigUint64()\n\nThe **`setBigUint64()`** method stores an unsigned 64-bit\ninteger (unsigned long long) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetBigUint64(byteOffset, value)\nsetBigUint64(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to store the data from.\n- value\n  - : The value to set as a `BigInt`. The highest possible value that fits in\n    an unsigned 64-bit integer is\n    `2n ** 64n - 1n`\n    (`18446744073709551615n`). Upon overflow, it will be zero\n    (`0n`).\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/DataView/prototype/setFloat32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setFloat32()\n\nThe **`setFloat32()`** method stores a signed 32-bit float\n(float) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetFloat32(byteOffset, value)\nsetFloat32(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/DataView/prototype/setFloat64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setFloat64()\n\nThe **`setFloat64()`** method stores a signed 64-bit float\n(double) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetFloat64(byteOffset, value)\nsetFloat64(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 64-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/DataView/prototype/setInt16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setInt16()\n\nThe **`setInt16()`** method stores a signed 16-bit integer\n(short) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetInt16(byteOffset, value)\nsetInt16(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/DataView/prototype/setInt32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setInt32()\n\nThe **`setInt32()`** method stores a signed 32-bit integer\n(long) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetInt32(byteOffset, value)\nsetInt32(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/DataView/prototype/setInt8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setInt8()\n\nThe **`setInt8()`** method stores a signed 8-bit integer (byte)\nvalue at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetInt8(byteOffset, value)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/DataView/prototype/setUint16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setUint16()\n\nThe **`setUint16()`** method stores an unsigned 16-bit integer\n(unsigned short) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetUint16(byteOffset, value)\nsetUint16(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/DataView/prototype/setUint32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setUint32()\n\nThe **`setUint32()`** method stores an unsigned 32-bit integer\n(unsigned long) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetUint32(byteOffset, value)\nsetUint32(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/DataView/prototype/setUint8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setUint8()\n\nThe **`setUint8()`** method stores an unsigned 8-bit integer\n(byte) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetUint8(byteOffset, value)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/Date.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date()\n\nThe **`Date()`** constructor can create a `Date` instance or return a string representing the current time.\n\n## Syntax\n\n```js\nnew Date()\nnew Date(value)\nnew Date(dateString)\nnew Date(dateObject)\n\nnew Date(year, monthIndex)\nnew Date(year, monthIndex, day)\nnew Date(year, monthIndex, day, hours)\nnew Date(year, monthIndex, day, hours, minutes)\nnew Date(year, monthIndex, day, hours, minutes, seconds)\nnew Date(year, monthIndex, day, hours, minutes, seconds, milliseconds)\n\nDate()\n```\n\n> **Note:** `Date()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\nThere are five basic forms for the `Date()` constructor:\n\n#### No parameters\n\nWhen no parameters are provided, the newly-created `Date` object represents the current date and time as of the time of instantiation.\n\n#### Time value or timestamp number\n\n- `value`\n  - : An integer value representing the number of milliseconds since January 1, 1970, 00:00:00 UTC (the ECMAScript epoch, equivalent to the UNIX epoch), with leap seconds ignored. Keep in mind that most [UNIX Timestamp](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_16) functions are only accurate to the nearest second.\n\n#### Date string\n\n- `dateString`\n\n  - : A string value representing a date, in a format recognized by the [`Date.parse()`](./parse.mdx) method. (The ECMA262 spec specifies a [simplified version of ISO 8601](https://tc39.es/ecma262/#sec-date-time-string-format), but other formats can be implementation-defined, which commonly include [IETF-compliant RFC 2822 timestamps](https://datatracker.ietf.org/doc/html/rfc2822#page-14).)\n\n    > **Note:** When parsing date strings with the `Date` constructor (and `Date.parse`, they are equivalent), always make sure that the input conforms to the ISO 8601 format (`YYYY-MM-DDTHH:mm:ss.sssZ`) — the parsing behavior with other formats is implementation-defined and may not work across all browsers. Support for [RFC 2822](https://datatracker.ietf.org/doc/html/rfc2822) format strings is by convention only. A library can help if many different formats are to be accommodated.\n    >\n    > Date-only strings (e.g. `\"1970-01-01\"`) are treated as UTC, while date-time strings (e.g. `\"1970-01-01T12:00\"`) are treated as local. You are therefore also advised to make sure the input format is consistent between the two types.\n\n#### Date object\n\n- `dateObject`\n  - : An existing `Date` object. This effectively makes a copy of the existing `Date` object with the same date and time. This is equivalent to `new Date(dateObject.valueOf())`, except the `valueOf()` method is not called.\n\nWhen one parameter is passed to the `Date()` constructor, `Date` instances are specially treated. All other values are [converted to primitives](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion). If the result is a string, it will be parsed as a date string. Otherwise, the resulting primitive is further coerced to a number and treated as a timestamp.\n\n#### Individual date and time component values\n\nGiven at least a year and month, this form of `Date()` returns a `Date` object whose component values (year, month, day, hour, minute, second, and millisecond) all come from the following parameters. Any missing fields are given the lowest possible value (`1` for `day` and `0` for every other component). The parameter values are all evaluated against the local time zone, rather than UTC.\n\nIf any parameter overflows its defined bounds, it \"carries over\". For example, if a `monthIndex` greater than `11` is passed in, those months will cause the year to increment; if a `minutes` greater than `59` is passed in, `hours` will increment accordingly, etc. Therefore, `new Date(1990, 12, 1)` will return January 1st, 1991; `new Date(2020, 5, 19, 25, 65)` will return 2:05 A.M. June 20th, 2020.\n\nSimilarly, if any parameter underflows, it \"borrows\" from the higher positions. For example, `new Date(2020, 5, 0)` will return May 31st, 2020.\n\n- `year`\n  - : Integer value representing the year. Values from `0` to `99` map to the years `1900` to `1999`. All other values are the actual year. See the [example](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years).\n- `monthIndex`\n  - : Integer value representing the month, beginning with `0` for January to `11` for December.\n- `day` _**optional**_\n  - : Integer value representing the day of the month. The default is `1`.\n- `hours` _**optional**_\n  - : Integer value between `0` and `23` representing the hour of the day. Defaults to `0`.\n- `minutes` _**optional**_\n  - : Integer value representing the minute segment of a time. The default is `0` minutes past the hour.\n- `seconds` _**optional**_\n  - : Integer value representing the second segment of a time. The default is `0` seconds past the minute.\n- `milliseconds` _**optional**_\n  - : Integer value representing the millisecond segment of a time. The default is `0` milliseconds past the second.\n\n### Return value\n\nCalling `new Date()` (the `Date()` constructor) returns a [`Date`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date) object. If called with an invalid date string, or if the date to be constructed will have a UNIX timestamp less than `-8,640,000,000,000,000` or greater than `8,640,000,000,000,000` milliseconds, it returns a `Date` object whose [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toString) method returns the literal string `Invalid Date`.\n\nCalling the `Date()` function (without the `new` keyword) returns a string representation of the current date and time, exactly as `new Date().toString()` does. Any arguments given in a `Date()` function call (without the `new` keyword) are ignored; regardless of whether it's called with an invalid date string — or even called with any arbitrary object or other primitive as an argument — it always returns a string representation of the current date and time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/UTC.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.UTC()\n\nThe **`Date.UTC()`** method accepts parameters similar to the\n`Date` constructor, but treats them as UTC. It returns the number of\nmilliseconds since January 1, 1970, 00:00:00 UTC.\n\n\n\n## Syntax\n\n```js\nDate.UTC(year)\nDate.UTC(year, monthIndex)\nDate.UTC(year, monthIndex, day)\nDate.UTC(year, monthIndex, day, hour)\nDate.UTC(year, monthIndex, day, hour, minute)\nDate.UTC(year, monthIndex, day, hour, minute, second)\nDate.UTC(year, monthIndex, day, hour, minute, second, millisecond)\n```\n\n- `year`\n\n  - : Integer value representing the year.\n\n    Values from `0` to `99` map to the years\n    `1900` to `1999`. All other values are the actual year.\n    See the [example](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years).\n\n- `monthIndex` _**optional**_\n  - : An integer between `0` (January) and `11` (December)\n    representing the month. Since ECMAScript 2017 it defaults to `0` if\n    omitted. _(Up until ECMAScript 2016, `monthIndex` was a required\n    parameter. As of ES2017, it no longer is.)_\n- `day` _**optional**_\n  - : An integer between `1` and `31` representing the day of the\n    month. If omitted, defaults to `1`.\n- `hour` _**optional**_\n  - : An integer between `0` and `23` representing the hours. If\n    omitted, defaults to `0`.\n- `minute` _**optional**_\n  - : An integer between `0` and `59` representing the minutes. If\n    omitted, defaults to `0`.\n- `second` _**optional**_\n  - : An integer between `0` and `59` representing the seconds. If\n    omitted, defaults to `0`.\n- `millisecond` _**optional**_\n  - : An integer between `0` and `999` representing the\n    milliseconds. If omitted, defaults to `0`.\n\n### Return value\n\nA number representing the number of milliseconds for the given date since January 1,\n1970, 00:00:00, UTC.\n\n## Description\n\n`UTC()` takes comma-delimited date and time parameters and returns the\nnumber of milliseconds between January 1, 1970, 00:00:00, universal time and the\nspecified date and time.\n\nYears between `0` and `99` are converted to a year in the\n20th century `(1900 + year)`. For example, `95` is\nconverted to the year `1995`.\n\nThe `UTC()` method differs from the `Date` constructor in two\nways:\n\n1. `Date.UTC()` uses universal time instead of the local time.\n2. `Date.UTC()` returns a time value as a number instead of creating a\n   `Date` object.\n\nIf a parameter is outside of the expected range, the `UTC()` method updates\nthe other parameters to accommodate the value. For example, if `15` is used\nfor `monthIndex`, the year will be incremented by 1\n`(year + 1)` and `3` will be used for the month.\n\n`UTC()` is a static method of `Date`, so it's called as\n`Date.UTC()` rather than as a method of a `Date` instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/now.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.now()\n\nThe static **`Date.now()`** method returns the number of milliseconds elapsed since the [epoch](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps), which is defined as the midnight at the beginning of January 1, 1970, UTC.\n\n## Syntax\n\n```js\nDate.now()\n```\n\n### Return value\n\nA number representing the number of milliseconds elapsed since the [epoch](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps), which is defined as the midnight at the beginning of January 1, 1970, UTC.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/parse.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.parse()\n\nThe **`Date.parse()`** method parses a string representation of\na date, and returns the number of milliseconds since January 1, 1970, 00:00:00 UTC or\n`NaN` if the string is unrecognized or, in some cases, contains illegal date\nvalues (e.g. 2015-02-31).\n\nOnly the [ISO 8601 format](https://tc39.es/ecma262/#sec-date-time-string-format) (`YYYY-MM-DDTHH:mm:ss.sssZ`) is explicitly specified to be supported. Other formats are implementation-defined and may not work across all browsers. A library can help if many different formats are to be accommodated.\n\n## Syntax\n\n```js\nDate.parse(dateString)\n```\n\n### Parameters\n\n- `dateString`\n  - : A string representing [a simplification of the ISO 8601 calendar date extended format](#date-time-string-format).\n    (Other formats may be used, but results are implementation-dependent.)\n\n### Return value\n\nA number representing the milliseconds elapsed since January 1, 1970, 00:00:00 UTC and\nthe date obtained by parsing the given string representation of a date. If the argument\ndoesn't represent a valid date, [`NaN`](../NaN.mdx) is returned.\n\n## Description\n\nThe `parse()` method takes a date string (such as\n`\"2011-10-10T14:48:00\"`) and returns the number of milliseconds since January\n1, 1970, 00:00:00 UTC.\n\nThis function is useful for setting date values based on string values, for example in\nconjunction with the [`setTime()`](./prototype/setTime.mdx) method and the\n`Date` object.\n\n### Date Time String Format\n\nThe standard string representation of a date time string is a simplification of the ISO\n8601 calendar date extended format.\n(See the section [Date Time String Format](https://tc39.es/ecma262/#sec-date-time-string-format)\nin the ECMAScript specification for more details.)\n\nFor example, `\"2011-10-10\"` (_date-only_ form),\n`\"2011-10-10T14:48:00\"` (_date-time_ form), or\n`\"2011-10-10T14:48:00.000+09:00\"` (_date-time_ form with milliseconds\nand time zone) can be passed and will be parsed. When the time zone offset is absent,\ndate-only forms are interpreted as a UTC time and date-time forms are interpreted as\nlocal time.\n\nWhile time zone specifiers are used during date string parsing to interpret the\nargument, the value returned is always the number of milliseconds between January 1,\n1970 00:00:00 UTC and the point in time represented by the argument or `NaN`.\n\nBecause `parse()` is a static method of `Date`, it is called as\n`Date.parse()` rather than as a method of a `Date` instance.\n\n### Fall-back to implementation-specific date formats\n\n> **Note:** This section contains implementation-specific behavior that can be inconsistent\n> across implementations.\n\nThe ECMAScript specification states: If the String does not conform to the standard\nformat the function may fall back to any implementation–specific heuristics or\nimplementation–specific parsing algorithm. Unrecognizable strings or dates containing\nillegal element values in ISO formatted strings shall cause `Date.parse()` to\nreturn [`NaN`](../NaN.mdx).\n\nHowever, invalid values in date strings not recognized as simplified ISO format as\ndefined by ECMA-262 may or may not result in [`NaN`](../NaN.mdx), depending on the browser\nand values provided, e.g.:\n\n```js\n// Non-ISO string with invalid date values\nnew Date(\"23/25/2014\");\n```\n\nwill be treated as a local date of 25 November, 2015 in Firefox 30 and an invalid date\nin Safari 7.\n\nHowever, if the string is recognized as an ISO format string and it contains invalid\nvalues, it will return [`NaN`](../NaN.mdx):\n\n```js\n// ISO string with invalid values\nnew Date(\"2014-25-23\").toISOString();\n// throws \"RangeError: invalid date\"\n```\n\nSpiderMonkey's implementation-specific heuristic can be found in [`jsdate.cpp`](https://searchfox.org/mozilla-central/source/js/src/jsdate.cpp?rev=64553c483cd1#889).\nThe string `\"10 06 2014\"` is an example of a non-conforming ISO format and\nthus falls back to a custom routine. See also this [rough outline](https://bugzilla.mozilla.org/show_bug.cgi?id=1023155#c6) on\nhow the parsing works.\n\n```js\nnew Date(\"10 06 2014\");\n```\n\nwill be treated as a local date of 6 October, 2014, and not 10 June, 2014.\n\nOther examples:\n\n```js\nnew Date(\"foo-bar 2014\").toString();\n// returns: \"Invalid Date\"\n\nDate.parse(\"foo-bar 2014\");\n// returns: NaN\n```\n\n### Differences in assumed time zone\n\n> **Note:** This section contains implementation-specific behavior that can be inconsistent\n> across implementations.\n\nGiven a non-standard date string of `\"March 7, 2014\"`, `parse()` assumes a local time zone, but given a simplification of the ISO 8601 calendar date extended format such as `\"2014-03-07\"`, it will assume a time zone of UTC. Therefore `Date` objects produced using those strings may represent different moments in time depending on the version of ECMAScript supported unless the system is set with a local time zone of UTC. This means that two date strings that appear equivalent may result in two different values depending on the format of the string that is being converted.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/@@toPrimitive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype\\[Symbol.toPrimitive]\n\nThe **`[Symbol.toPrimitive]()`** method converts a `Date`\nobject to a primitive value.\n\n## Syntax\n\n```js\nDate()[Symbol.toPrimitive](hint)\n```\n\n### Return value\n\nThe primitive value of the given `Date` object. Depending on the argument,\nthe method can return either a string or a number.\n\n## Description\n\nThe `[Symbol.toPrimitive]()` method of the `Date` object returns a\nprimitive value, that is either of type number or of type string.\n\nIf `hint` is `string` or `default`,\n`[Symbol.toPrimitive]()` tries to call the [`toString`](../../Object/prototype/toString.mdx) method. If the `toString` property does not exist, it tries to\ncall the [`valueOf`](../../Object/prototype/valueOf.mdx) method and if the\n`valueOf` does not exist either, `[Symbol.toPrimitive]()` throws a\n[`TypeError`](../../../globals/TypeError/TypeError.mdx).\n\nIf `hint` is `number`, `[Symbol.toPrimitive]()` first tries\nto call `valueOf`, and if that fails, it calls `toString`.\n\nJavaScript calls the `[Symbol.toPrimitive]()` method to convert an object to a\nprimitive value. You rarely need to invoke the `[Symbol.toPrimitive]()` method\nyourself; JavaScript automatically invokes it when encountering an object where a\nprimitive value is expected.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/getDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getDate()\n\nThe **`getDate()`** method returns the day of the month for the\nspecified date according to local time.\n\n## Syntax\n\n```js\ngetDate()\n```\n\n### Return value\n\nAn integer number, between 1 and 31, representing the day of the month for the given\ndate according to local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/getDay.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getDay()\n\nThe **`getDay()`** method returns the\nday of the week for the specified date according to local time, where 0 represents\nSunday. For the day of the month, see [`Date.prototype.getDate()`](./getDate.mdx).\n\n## Syntax\n\n```js\ngetDay()\n```\n\n### Return value\n\nAn integer number, between 0 and 6, corresponding to the day of the week for the given\ndate, according to local time: 0 for Sunday, 1 for Monday, 2 for Tuesday, and so on.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/getFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getFullYear()\n\nThe **`getFullYear()`** method returns the year of the\nspecified date according to local time.\n\nUse this method instead of the [`Date.prototype.getYear()`](./getYear.mdx) method.\n\n## Syntax\n\n```js\ngetFullYear()\n```\n\n### Return value\n\nA number corresponding to the year of the given date, according to local time.\n\n## Description\n\nThe value returned by `getFullYear()` is an absolute number. For dates\nbetween the years 1000 and 9999, `getFullYear()` returns a four-digit number,\nfor example, 1995. Use this function to make sure a year is compliant with years after\n2000\\.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/getHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getHours()\n\nThe **`getHours()`** method returns the hour for the specified\ndate, according to local time.\n\n## Syntax\n\n```js\ngetHours()\n```\n\n### Return value\n\nAn integer number, between 0 and 23, representing the hour for the given date according\nto local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/getMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getMilliseconds()\n\nThe **`getMilliseconds()`** method returns the milliseconds in\nthe specified date according to local time.\n\n## Syntax\n\n```js\ngetMilliseconds()\n```\n\n### Return value\n\nA number, between 0 and 999, representing the milliseconds for the given date according\nto local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/getMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getMinutes()\n\nThe **`getMinutes()`** method returns the minutes in the\nspecified date according to local time.\n\n## Syntax\n\n```js\ngetMinutes()\n```\n\n### Return value\n\nAn integer number, between 0 and 59, representing the minutes in the given date\naccording to local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/getMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getMonth()\n\nThe **`getMonth()`** method returns the month in the specified\ndate according to local time, as a zero-based value (where zero indicates the first\nmonth of the year).\n\n## Syntax\n\n```js\ngetMonth()\n```\n\n### Return value\n\nAn integer number, between 0 and 11, representing the month in the given date according\nto local time. 0 corresponds to January, 1 to February, and so on.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/getSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getSeconds()\n\nThe **`getSeconds()`** method returns the seconds in the\nspecified date according to local time.\n\n## Syntax\n\n```js\ngetSeconds()\n```\n\n### Return value\n\nAn integer number, between 0 and 59, representing the seconds in the given date\naccording to local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/getTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getTime()\n\nThe **`getTime()`** method returns the number of milliseconds since the [epoch](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps), which is defined as the midnight at the beginning of January 1, 1970, UTC.\n\nYou can use this method to help assign a date and time to another `Date`\nobject. This method is functionally equivalent to the [`Date.prototype.valueOf()`](./valueOf.mdx) method.\n\n## Syntax\n\n```js\ngetTime()\n```\n\n### Return value\n\nA number representing the milliseconds elapsed between 1 January 1970 00:00:00 UTC and\nthe given date.\n\n## Description\n\nTo offer protection against timing attacks and fingerprinting, the precision of\n`new Date().getTime()` might get rounded depending on browser settings.\n\n```js\n// reduced time precision (2ms) in Firefox 60\nnew Date().getTime();\n// 1519211809934\n// 1519211810362\n// 1519211811670\n// …\n\n// reduced time precision with `privacy.resistFingerprinting` enabled\nnew Date().getTime();\n// 1519129853500\n// 1519129858900\n// 1519129864400\n// …\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/getTimezoneOffset.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getTimezoneOffset()\n\nThe **`getTimezoneOffset()`** method returns the difference, in minutes, between a date as evaluated in the UTC time zone, and the same date as evaluated in the local time zone.\n\n## Syntax\n\n```js\ngetTimezoneOffset()\n```\n\n### Return value\n\nThe difference, in minutes, between the date as evaluated in the UTC time zone and as evaluated in the local time zone. The actual local time algorithm is implementation-defined, and the return value is allowed to be zero in runtimes without appropriate data.\n\n## Description\n\n`date.getTimezoneOffset()` returns the difference, in minutes, between `date` as evaluated in the UTC time zone and as evaluated in the local time zone — that is, the time zone of the host system in which the browser is being used (if the code is run from the Web in a browser), or otherwise the host system of whatever JavaScript runtime (for example, a Node.js environment) the code is executed in.\n\n### Negative values and positive values\n\nThe number of minutes returned by `getTimezoneOffset()` is positive if the local time zone is behind UTC, and negative if the local time zone is ahead of UTC. For example, for UTC+10, `-600` will be returned.\n\n| Current time zone | Return value |\n| ----------------- | ------------ |\n| UTC-8             | 480          |\n| UTC               | 0            |\n| UTC+3             | -180         |\n\n### Varied results in Daylight Saving Time (DST) regions\n\nIn a region that annually shifts in and out of Daylight Saving Time (DST), as `date` varies, the number of minutes returned by calling `getTimezoneOffset()` can be non-uniform.\n\n> **Note:** `getTimezoneOffset()`'s behavior will never differ based on the time when the code is run — its behavior is always consistent when running in the same region. Only the value of `date` affects the result.\n\nIn most implementations, the [IANA time zone database](https://en.wikipedia.org/wiki/Daylight_saving_time#IANA_time_zone_database) (tzdata) is used to precisely determine the offset of the local timezone at the moment of the `date`. However, if such information is unavailable, an implementation may return zero.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/getUTCDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCDate()\n\nThe **`getUTCDate()`** method returns the day of the month (from\n1 to 31) in the specified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCDate()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer number ranging from 1 to 31\nrepresenting day of month for the given date, according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/getUTCDay.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCDay()\n\nThe **`getUTCDay()`** method returns the day of the week in the\nspecified date according to universal time, where 0 represents Sunday.\n\n## Syntax\n\n```js\ngetUTCDay()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer number corresponding to the day\nof the week for the given date, according to universal time: 0 for Sunday, 1 for Monday,\n2 for Tuesday, and so on.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/getUTCFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCFullYear()\n\nThe **`getUTCFullYear()`** method returns the year in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCFullYear()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer representing the year in the given date\naccording to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n\n## Description\n\nThe value returned by `getUTCFullYear()` is an absolute number that is\ncompliant with year-2000, for example, 1995.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/getUTCHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCHours()\n\nThe **`getUTCHours()`** method returns the hours in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCHours()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 23, representing the hours in the given date according\nto Coordinated Universal Time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/getUTCMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCMilliseconds()\n\nThe **`getUTCMilliseconds()`** method returns the milliseconds\nportion of the time object's value according to universal time.\n\n## Syntax\n\n```js\ngetUTCMilliseconds()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 999, representing\nthe milliseconds portion of the given `Date` object according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n\nNot to be confused with Unix epoch time. To get the total milliseconds since 1970/01/01,\nuse the [`getTime()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/getTime) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/getUTCMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCMinutes()\n\nThe **`getUTCMinutes()`** method returns the minutes in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCMinutes()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 59,\nrepresenting the minutes in the given date according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/getUTCMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCMonth()\n\nThe **`getUTCMonth()`** returns the month of the specified date\naccording to universal time, as a zero-based value (where zero indicates the first month\nof the year).\n\n## Syntax\n\n```js\ngetUTCMonth()\n```\n\n### Return value\n\nA number. If the `Date` object represents a valid date, an integer number, between 0 and 11,\ncorresponding to the month of the given date according to universal time. 0 for January,\n1 for February, 2 for March, and so on. Otherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/getUTCSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCSeconds()\n\nThe **`getUTCSeconds()`** method returns the seconds in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCSeconds()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 59, representing\nthe seconds in the given date according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/getYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getYear()\n\nThe **`getYear()`** method returns the year in the specified\ndate according to local time. Because `getYear()` does not return full years\n(\"year 2000 problem\"), it is no longer used and has been replaced by the\n[`Date.prototype.getFullYear()`](./getFullYear.mdx) method.\n\n## Syntax\n\n```js\ngetYear()\n```\n\n### Return value\n\nA number representing the year of the given date, according to local time, minus 1900.\n\n## Description\n\n- For years greater than or equal to 2000, the value returned by\n  `getYear()` is 100 or greater. For example, if the year is 2026,\n  `getYear()` returns 126.\n- For years between and including 1900 and 1999, the value returned by\n  `getYear()` is between 0 and 99. For example, if the year is 1976,\n  `getYear()` returns 76.\n- For years less than 1900, the value returned by `getYear()` is less than 0. For example, if the year is 1800, `getYear()` returns -100.\n\nTo take into account years before and after 2000, you should use\n[`Date.prototype.getFullYear()`](./getFullYear.mdx) instead of\n`getYear()` so that the year is specified in full.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/setDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setDate()\n\nThe **`setDate()`** method changes the day of the month of a given `Date` instance, based on local time.\n\nTo instead change the day of the month for a given `Date` instance based on UTC time, use the [`Date.prototype.setUTCDate()`](./setUTCDate.mdx) method.\n\n## Syntax\n\n```js\nsetDate(dayValue)\n```\n\n### Parameters\n\n- `dayValue`\n  - : An integer representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the given date (the\n`Date` object is also changed in place).\n\n## Description\n\nIf the `dayValue` is outside of the range of date values for the month, `setDate()` will update the `Date` object accordingly.\n\nFor example, if 0 is provided for `dayValue`, the date will be set to the last day of the previous month. If you use 40 for `dayValue`, and the month stored in the `Date` object is June, the day will be changed to 10 and the month will be incremented to July.\n\nIf a negative number is provided for `dayValue`, the date will be set counting backwards from the last day of the previous month. -1 would result in the date being set to 1 day before the last day of the previous month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/setFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setFullYear()\n\nThe **`setFullYear()`** method sets the full year for a\nspecified date according to local time. Returns new timestamp.\n\n## Syntax\n\n```js\nsetFullYear(yearValue)\nsetFullYear(yearValue, monthValue)\nsetFullYear(yearValue, monthValue, dateValue)\n```\n\n### Parameters\n\n- `yearValue`\n  - : An integer specifying the numeric value of the year, for example, 1995.\n- `monthValue`\n  - : Optional. An integer between 0 and 11 representing the months January through\n    December.\n- `dateValue`\n  - : Optional. An integer between 1 and 31 representing the day of the month. If you\n    specify the `dateValue` parameter, you must also specify the\n    `monthValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `monthValue` and\n`dateValue` parameters, the values returned from the\n[`Date.prototype.getMonth()`](./getMonth.mdx) and\n[`Date.prototype.getDate()`](./getDate.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range, `setFullYear()`\nattempts to update the other parameters and the date information in the\n`Date` object accordingly. For example, if you specify 15 for\n`monthValue`, the year is incremented by 1\n(`yearValue + 1`), and 3 is used for the month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/setHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setHours()\n\nThe **`setHours()`** method sets the hours for a specified date\naccording to local time, and returns the number of milliseconds since January 1, 1970\n00:00:00 UTC until the time represented by the updated `Date` instance.\n\n## Syntax\n\n```js\nsetHours(hoursValue)\nsetHours(hoursValue, minutesValue)\nsetHours(hoursValue, minutesValue, secondsValue)\nsetHours(hoursValue, minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `hoursValue`\n  - : Ideally, an integer between 0 and 23, representing the hour. If a value greater than\n    23 is provided, the datetime will be incremented by the extra hours.\n- `minutesValue`\n  - : Optional. Ideally, an integer between 0 and 59, representing the minutes. If a value\n    greater than 59 is provided, the datetime will be incremented by the extra minutes.\n- `secondsValue`\n  - : Optional. Ideally, an integer between 0 and 59, representing the seconds. If a value\n    greater than 59 is provided, the datetime will be incremented by the extra seconds. If\n    you specify the `secondsValue` parameter, you must also specify\n    the `minutesValue`.\n- `msValue`\n  - : Optional. Ideally, a number between 0 and 999, representing the milliseconds. If a\n    value greater than 999 is provided, the datetime will be incremented by the extra\n    milliseconds. If you specify the `msValue` parameter, you must\n    also specify the `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between January 1, 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `minutesValue`,\n`secondsValue`, and `msValue` parameters,\nthe values returned from the [`Date.prototype.getMinutes()`](./getMinutes.mdx),\n[`Date.prototype.getSeconds()`](./getSeconds.mdx), and\n[`Date.prototype.getMilliseconds()`](./getMilliseconds.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range, `setHours()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes will\nbe incremented by 1 (`minutesValue + 1`), and 40 will be used for\nseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/setMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setMilliseconds()\n\nThe **`setMilliseconds()`** method sets the milliseconds for a\nspecified date according to local time.\n\n## Syntax\n\n```js\nsetMilliseconds(millisecondsValue)\n```\n\n### Parameters\n\n- `millisecondsValue`\n  - : A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you specify a number outside the expected range, the date information in the\n`Date` object is updated accordingly. For example, if you specify 1005, the\nnumber of seconds is incremented by 1, and 5 is used for the milliseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/setMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setMinutes()\n\nThe **`setMinutes()`** method sets the minutes for a specified\ndate according to local time.\n\n## Syntax\n\n```js\nsetMinutes(minutesValue)\nsetMinutes(minutesValue, secondsValue)\nsetMinutes(minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `minutesValue`\n  - : An integer between 0 and 59, representing the minutes.\n- `secondsValue`\n  - : Optional. An integer between 0 and 59, representing the seconds. If you specify the\n    `secondsValue` parameter, you must also specify the\n    `minutesValue`.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds. If you specify\n    the `msValue` parameter, you must also specify the\n    `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `secondsValue` and\n`msValue` parameters, the values returned from\n[`Date.prototype.getSeconds()`](./getSeconds.mdx) and\n[`Date.prototype.getMilliseconds()`](./getMilliseconds.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range, `setMinutes()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes will\nbe incremented by 1 (`minutesValue + 1`), and 40 will be used for\nseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/setMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setMonth()\n\nThe **`setMonth()`** method sets the month for a specified date according to the currently set year.\n\n## Syntax\n\n```js\nsetMonth(monthValue)\nsetMonth(monthValue, dayValue)\n```\n\n### Parameters\n\n- `monthValue`\n  - : A zero-based integer representing the month of the year offset from the start of the\n    year. So, 0 represents January, 11 represents December, -1 represents December of the\n    previous year, and 12 represents January of the following year.\n- `dayValue`\n  - : Optional. An integer from 1 to 31, representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `dayValue` parameter, the value\nreturned from the [`Date.prototype.getDate()`](./getDate.mdx) method is used.\n\nIf a parameter you specify is outside of the expected range, `setMonth()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 15 for `monthValue`, the year will be\nincremented by 1, and 3 will be used for month.\n\nThe current day of month will have an impact on the behavior of this method.\nConceptually it will add the number of days given by the current day of the month to the\n1st day of the new month specified as the parameter, to return the new date.\nFor example, if the current value is 31st January 2016, calling setMonth with a value of 1 will return 2nd March 2016.\nThis is because in 2016 February had 29 days.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/setSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setSeconds()\n\nThe **`setSeconds()`** method sets the seconds for a specified\ndate according to local time.\n\n## Syntax\n\n```js\nsetSeconds(secondsValue)\nsetSeconds(secondsValue, msValue)\n```\n\n### Parameters\n\n- `secondsValue`\n  - : An integer between 0 and 59, representing the seconds.\n- `msValue` _**optional**_\n  - : Optional. A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `msValue` parameter, the value returned\nfrom the [`Date.prototype.getMilliseconds()`](./getMilliseconds.mdx) method is\nused.\n\nIf a parameter you specify is outside of the expected range, `setSeconds()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes stored\nin the `Date` object will be incremented by 1, and 40 will be used for\nseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/setTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setTime()\n\nThe **`setTime()`** method sets the `Date` object\nto the time represented by a number of milliseconds since January 1, 1970, 00:00:00 UTC.\n\n## Syntax\n\n```js\nsetTime(timeValue)\n```\n\n### Parameters\n\n- `timeValue`\n  - : An integer representing the number of milliseconds since 1 January 1970, 00:00:00\n    UTC.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date\n(effectively, the value of the argument).\n\n## Description\n\nUse the `setTime()` method to help assign a date and time to another\n`Date` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/setUTCDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCDate()\n\nThe **`setUTCDate()`** method changes the day of the month of a given `Date` instance, based on UTC time.\n\nTo instead change the day of the month for a given `Date` instance based on local time, use the [`Date.prototype.setDate()`](././setDate.mdx) method.\n\n## Syntax\n\n```js\nsetUTCDate(dayValue)\n```\n\n### Parameters\n\n- `dayValue`\n  - : An integer from 1 to 31, representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf the `dayValue` is outside of the range of date values for the month, `setDate()` will update the `Date` object accordingly.\n\nFor example, if 0 is provided for `dayValue`, the date will be set to the last day of the previous month. If you use 40 for `dayValue`, and the month stored in the `Date` object is June, the day will be changed to 10 and the month will be incremented to July.\n\nIf a negative number is provided for `dayValue`, the date will be set counting backwards from the last day of the previous month. -1 would result in the date being set to 1 day before the last day of the previous month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/setUTCFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCFullYear()\n\nThe **`setUTCFullYear()`** method sets the full year for a\nspecified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCFullYear(yearValue)\nsetUTCFullYear(yearValue, monthValue)\nsetUTCFullYear(yearValue, monthValue, dayValue)\n```\n\n### Parameters\n\n- `yearValue`\n  - : An integer specifying the numeric value of the year, for example, 1995.\n- `monthValue`\n  - : Optional. An integer between 0 and 11 representing the months January through\n    December.\n- `dayValue`\n  - : Optional. An integer between 1 and 31 representing the day of the month. If you\n    specify the `dayValue` parameter, you must also specify the\n    `monthValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `monthValue` and\n`dayValue` parameters, the values returned from the\n[`Date.prototype.getUTCMonth()`](./getUTCMonth.mdx) and\n[`Date.prototype.getUTCDate()`](./getUTCDate.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range,\n`setUTCFullYear()` attempts to update the other parameters and the date\ninformation in the `Date` object accordingly. For example, if you specify 15\nfor `monthValue`, the year is incremented by 1\n(`yearValue + 1`), and 3 is used for the month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/setUTCHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCHours()\n\nThe **`setUTCHours()`** method sets the hour for a specified\ndate according to universal time, and returns the number of milliseconds since January\n1, 1970 00:00:00 UTC until the time represented by the updated `Date`\ninstance.\n\n## Syntax\n\n```js\nsetUTCHours(hoursValue)\nsetUTCHours(hoursValue, minutesValue)\nsetUTCHours(hoursValue, minutesValue, secondsValue)\nsetUTCHours(hoursValue, minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `hoursValue`\n  - : An integer between 0 and 23, representing the hour.\n- `minutesValue`\n  - : Optional. An integer between 0 and 59, representing the minutes.\n- `secondsValue`\n  - : Optional. An integer between 0 and 59, representing the seconds. If you specify the\n    `secondsValue` parameter, you must also specify the\n    `minutesValue`.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds. If you specify\n    the `msValue` parameter, you must also specify the\n    `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between January 1, 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `minutesValue`,\n`secondsValue`, and `msValue` parameters,\nthe values returned from the [`Date.prototype.getUTCMinutes()`](./getUTCMinutes.mdx), [`Date.prototype.getUTCSeconds()`](./getUTCSeconds.mdx),\nand [`Date.prototype.getUTCMilliseconds()`](./getUTCMilliseconds.mdx) methods\nare used.\n\nIf a parameter you specify is outside of the expected range, `setUTCHours()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes will\nbe incremented by 1 (`minutesValue + 1`), and 40 will be used for seconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/setUTCMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCMilliseconds()\n\nThe **`setUTCMilliseconds()`** method sets the milliseconds for\na specified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCMilliseconds(millisecondsValue)\n```\n\n### Parameters\n\n- `millisecondsValue`\n  - : A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf a parameter you specify is outside of the expected range,\n`setUTCMilliseconds()` attempts to update the date information in the\n`Date` object accordingly. For example, if you use 1100 for\n`millisecondsValue`, the seconds stored in the `Date`\nobject will be incremented by 1, and 100 will be used for milliseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/setUTCMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCMinutes()\n\nThe **`setUTCMinutes()`** method sets the minutes for a\nspecified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCMinutes(minutesValue)\nsetUTCMinutes(minutesValue, secondsValue)\nsetUTCMinutes(minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `minutesValue`\n  - : An integer between 0 and 59, representing the minutes.\n- `secondsValue`\n  - : Optional. An integer between 0 and 59, representing the seconds. If you specify the\n    `secondsValue` parameter, you must also specify the\n    `minutesValue`.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds. If you specify\n    the `msValue` parameter, you must also specify the\n    `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `secondsValue` and\n`msValue` parameters, the values returned from\n[`Date.prototype.getUTCSeconds()`](./getUTCSeconds.mdx) and\n[`Date.prototype.getUTCMilliseconds()`](./getUTCMilliseconds.mdx) methods are\nused.\n\nIf a parameter you specify is outside of the expected range,\n`setUTCMinutes()` attempts to update the date information in the\n`Date` object accordingly. For example, if you use 100 for\n`secondsValue`, the minutes will be incremented by 1\n(`minutesValue + 1`), and 40 will be used for seconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/setUTCMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCMonth()\n\nThe **`setUTCMonth()`** method sets the month for a specified\ndate according to universal time.\n\n## Syntax\n\n```js\nsetUTCMonth(monthValue)\nsetUTCMonth(monthValue, dayValue)\n```\n\n### Parameters\n\n- `monthValue`\n  - : An integer between 0 and 11, representing the months January through December.\n- `dayValue`\n  - : Optional. An integer from 1 to 31, representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `dayValue` parameter, the value returned from the\n[`Date.prototype.getUTCDate()`](./getUTCDate.mdx) method is used.\n\nIf a parameter you specify is outside of the expected range, `setUTCMonth()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 15 for `monthValue`, the year will be incremented by\n1, and 3 will be used for month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/setUTCSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCSeconds()\n\nThe **`setUTCSeconds()`** method sets the seconds for a\nspecified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCSeconds(secondsValue)\nsetUTCSeconds(secondsValue, msValue)\n```\n\n### Parameters\n\n- `secondsValue`\n  - : An integer between 0 and 59, representing the seconds.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `msValue` parameter, the value returned from the\n[`Date.prototype.getUTCMilliseconds()`](./getUTCMilliseconds.mdx) method is\nused.\n\nIf a parameter you specify is outside of the expected range,\n`setUTCSeconds()` attempts to update the date information in the\n`Date` object accordingly. For example, if you use 100 for\n`secondsValue`, the minutes stored in the `Date` object will be\nincremented by 1, and 40 will be used for seconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/setYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setYear()\n\nThe legacy **`setYear()`** method sets the year for a specified date according to local time.\n\nHowever, the way the legacy `setYear()` method sets year values is different from how the preferred [`Date.prototype.setFullYear()`](./setFullYear.mdx) method sets year values — and in some cases, also different from how `new Date()` and [`Date.parse()`](../parse.mdx) set year values. Specifically, given two-digit numbers, such as `22` and `61`:\n\n- `setYear()` interprets any two-digit number as an offset to `1900`; so `date.setYear(22)` results in the year value being set to `1922`, and `date.setYear(61)` results in the year value being set to `1961`. (In contrast, while `new Date(61, 1)` also results in the year value being set to `1961`, `new Date(\"2/1/22\")` results in the year value being set to `2022`; and similarly for [`Date.parse()`](../parse.mdx)).\n\n- [`Date.prototype.setFullYear()`](./setFullYear.mdx) does no special interpretation but instead uses the literal two-digit value as-is to set the year; so `date.setFullYear(61)` results in the year value being set to `0061`, and `date.setFullYear(22)` results in the year value being set to `0022`.\n\nBecause of those differences in behavior, you should no longer use the legacy `setYear()` method, but should instead use the preferred [`Date.prototype.setFullYear()`](./setFullYear.mdx) method.\n\n## Syntax\n\n```js\nsetYear(yearValue)\n```\n\n### Parameters\n\n- `yearValue`\n  - : An integer.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf `yearValue` is a number between 0 and 99 (inclusive), then the year for\n`dateObj` is set to `1900 + yearValue`. Otherwise, the year for\n`dateObj` is set to `yearValue`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/toDateString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toDateString()\n\nThe **`toDateString()`** method returns the date portion of a `Date` object interpreted in the local timezone in English.\n\n## Syntax\n\n```js\ntoDateString()\n```\n\n### Return value\n\nA string representing the date portion of the given `Date` object in human readable form in English.\n\n## Description\n\n`Date` instances refer to a specific point in time. `toDateString()` interprets the date in the local timezone and formats the _date_ part in English. It always uses the following format, separated by spaces:\n\n1. First three letters of the week day name\n2. First three letters of the month name\n3. Two-digit day of the month, padded on the left a zero if necessary\n4. Four-digit year (at least), padded on the left with zeros if necessary. May have a negative sign\n\nFor example: \"Thu Jan 01 1970\".\n\n- If you want to get the _time_ part, use [`toTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString).\n- If you want to get both the date and time, use [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toString).\n- If you want to make the date interpreted as UTC instead of local timezone, use [`toUTCString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString).\n- If you want to format the date in a more user-friendly format (e.g. localization), use [`toLocaleDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/toISOString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toISOString()\n\nThe **`toISOString()`** method returns a string in _simplified_ extended ISO format ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)), which is always 24 or 27 characters long (`YYYY-MM-DDTHH:mm:ss.sssZ` or `±YYYYYY-MM-DDTHH:mm:ss.sssZ`, respectively). The timezone is always zero UTC offset, as denoted by the suffix `Z`.\n\n## Syntax\n\n```js\ntoISOString()\n```\n\n### Return value\n\nA string representing the given date in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format according to universal time. It's the same format as the one required to be recognized by [`Date.parse()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/parse#date-time-string-format).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/toJSON.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toJSON()\n\nThe **`toJSON()`** method returns a string representation of\nthe `Date` object.\n\n## Syntax\n\n```js\ntoJSON()\n```\n\n### Return value\n\nA string representation of the given date.\n\n## Description\n\n`Date` instances refer to a specific point in time. `toJSON()` calls the object's [`Date.prototype.toISOString()`](./toISOString.mdx) method, which returns a string representing the `Date` object's value. This method is generally intended to, by default, usefully serialize `Date` objects during [JSON](https://developer.mozilla.org/docs/Glossary/JSON) serialization, which can then be deserialized using the [`Date()` constructor](../Date.mdx) or [`Date.parse()`](../parse.mdx) as the reviver of [`JSON.parse()`](../../JSON/parse.mdx).\n\nThe method first attempts to convert its `this` value [to a primitive](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion) by calling its [`[Symbol.toPrimitive]()`](../../Symbol/toPrimitive.mdx) (with `\"number\"` as hint), [`valueOf()`](../../Object/prototype/valueOf.mdx), and [`toString()`](../../Object/prototype/toString.mdx) methods, in that order. If the result is a [non-finite](../../Number/isFinite.mdx) number, `null` is returned. (This generally corresponds to an invalid date, whose [`valueOf()`](./valueOf.mdx) returns [`NaN`](../../NaN.mdx).) Otherwise, if the converted primitive is not a number or is a finite number, the return value of `this.toISOString()` is returned.\n\nNote that the method does not check whether the `this` value is a valid `Date` object. However, calling `Date.prototype.toJSON()` on non-`Date` objects does not have well-defined semantics.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/toLocaleDateString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toLocaleDateString()\n\nThe **`toLocaleDateString()`** method returns a string with a language-sensitive representation of the date portion of the specified date in the user agent's timezone. In implementations with [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) support, this method simply calls `Intl.DateTimeFormat`.\n\n## Syntax\n\n```js\ntoLocaleDateString()\ntoLocaleDateString(locales)\ntoLocaleDateString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat), these parameters correspond exactly to the [`Intl.DateTimeFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) constructor's parameters. Implementations without `Intl.DateTimeFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales) parameter of the `Intl.DateTimeFormat()` constructor.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options) parameter of the `Intl.DateTimeFormat()` constructor. The `timeStyle` option must be undefined, or a [`TypeError`](../../../globals/TypeError/TypeError.mdx) would be thrown. If `weekday`, `year`, `month`, and `day` are all undefined, then `year`, `month`, and `day` will be set to `\"numeric\"`.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored.\n\nSee the [`Intl.DateTimeFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string representing the date portion of the given `Date` instance according to language-specific conventions.\n\nIn implementations with `Intl.DateTimeFormat`, this is equivalent to `new Intl.DateTimeFormat(locales, options).format(date)`, where `options` has been normalized as described above.\n\n## Performance\n\nWhen formatting large numbers of dates, it is better to create an [`Intl.DateTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) object and use its [`format()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/format) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string with a language-sensitive representation of this date. In implementations with [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) support, this method simply calls `Intl.DateTimeFormat`.\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat), these parameters correspond exactly to the [`Intl.DateTimeFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) constructor's parameters. Implementations without `Intl.DateTimeFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales) parameter of the `Intl.DateTimeFormat()` constructor.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options) parameter of the `Intl.DateTimeFormat()` constructor. If `weekday`, `year`, `month`, `day`, `dayPeriod`, `hour`, `minute`, `second`, and `fractionalSecondDigits` are all undefined, then `year`, `month`, `day`, `hour`, `minute`, `second` will be set to `\"numeric\"`.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored.\n\nSee the [`Intl.DateTimeFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string representing the given date according to language-specific conventions.\n\nIn implementations with `Intl.DateTimeFormat`, this is equivalent to `new Intl.DateTimeFormat(locales, options).format(date)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/toLocaleTimeString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toLocaleTimeString()\n\nThe **`toLocaleTimeString()`** method returns a string with a language-sensitive representation of the time portion of the date. In implementations with [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) support, this method simply calls `Intl.DateTimeFormat`.\n\n## Syntax\n\n```js\ntoLocaleTimeString()\ntoLocaleTimeString(locales)\ntoLocaleTimeString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat), these parameters correspond exactly to the [`Intl.DateTimeFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) constructor's parameters. Implementations without `Intl.DateTimeFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales) parameter of the `Intl.DateTimeFormat()` constructor.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options) parameter of the `Intl.DateTimeFormat()` constructor. If `dayPeriod`, `hour`, `minute`, `second`, and `fractionalSecondDigits` are all undefined, then `hour`, `minute`, `second` will be set to `\"numeric\"`.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored.\n\nSee the [`Intl.DateTimeFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string representing the time portion of the given `Date` instance according to language-specific conventions.\n\nIn implementations with `Intl.DateTimeFormat`, this is equivalent to `new Intl.DateTimeFormat(locales, options).format(date)`, where `options` has been normalized as described above.\n\n## Performance\n\nWhen formatting large numbers of dates, it is better to create an [`Intl.DateTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) object and use its [`format()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/format) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified `Date` object interpreted in the local timezone.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the given date.\n\n## Description\n\nThe `Date` object overrides the `toString()` method of `Object`. `Date.prototype.toString()` returns a string representation of the Date as interpreted in the local timezone, containing both the date and the time — it joins the string representation specified in [`toDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString) and [`toTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString) together, adding a space in between.\n\nFor example: \"Thu Jan 01 1970 04:42:04 GMT+0000 (Coordinated Universal Time)\"\n\nThe `toString()` method is automatically called when a date is coerced to a string, such as `const today = 'Today is ' + new Date()`.\n\n`Date.prototype.toString()` must be called on `Date` instances. If the `this` value does not inherit from `Date.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n- If you only want to get the _date_ part, use [`toDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString).\n- If you only want to get the _time_ part, use [`toTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString).\n- If you want to make the date interpreted as UTC instead of local timezone, use [`toUTCString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString).\n- If you want to format the date in a more user-friendly format (e.g. localization), use [`toLocaleString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/toTimeString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toTimeString()\n\nThe **`toTimeString()`** method returns the time portion of a `Date` object interpreted in the local timezone in English.\n\n## Syntax\n\n```js\ntoTimeString()\n```\n\n### Return value\n\nA string representing the time portion of the given date in human readable form in English.\n\n## Description\n\n`Date` instances refer to a specific point in time. `toTimeString()` interprets the date in the local timezone and formats the _time_ part in English. It always uses the format of `hh:mm:ss GMT±xxxx (TZ)`, where:\n\n| Format String | Description                                                                                           |\n| ------------- | ----------------------------------------------------------------------------------------------------- |\n| `hh`          | Hour, as two digits with leading zero if required                                                     |\n| `mm`          | Minute, as two digits with leading zero if required                                                   |\n| `ss`          | Seconds, as two digits with leading zero if required                                                  |\n| `±xxxx`       | The local timezone's offset — two digits for hours and two digits for minutes (e.g. `-0500`, `+0800`) |\n| `TZ`          | The timezone's name (e.g. `PDT`, `PST`)                                                               |\n\nFor example: \"04:42:04 GMT+0000 (Coordinated Universal Time)\".\n\n- If you want to get the _date_ part, use [`toDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString).\n- If you want to get both the date and time, use [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toString).\n- If you want to make the date interpreted as UTC instead of local timezone, use [`toUTCString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString).\n- If you want to format the date in a more user-friendly format (e.g. localization), use [`toLocaleTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleTimeString).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/toUTCString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toUTCString()\n\nThe **`toUTCString()`** method converts a date to a string, interpreting it in the UTC time zone. `toGMTString()` is an alias of this method.\n\nBased on [rfc7231](https://datatracker.ietf.org/doc/html/rfc7231#section-7.1.1.1) and modified according to [ECMA-262 toUTCString](https://tc39.es/ecma262/#sec-date.prototype.toutcstring), it can have negative values.\n\n## Syntax\n\n```js\ntoUTCString()\n```\n\n### Return value\n\nA string representing the given date using the UTC time zone.\n\n## Description\n\nThe value returned by `toUTCString()` is a string in the form `Www, dd Mmm yyyy hh:mm:ss GMT`, where:\n\n| Format String | Description                                                  |\n| ------------- | ------------------------------------------------------------ |\n| `Www`         | Day of week, as three letters (e.g. `Sun`, `Mon`)            |\n| `dd`          | Day of month, as two digits with leading zero if required    |\n| `Mmm`         | Month, as three letters (e.g. `Jan`, `Feb`)                  |\n| `yyyy`        | Year, as four or more digits with leading zeroes if required |\n| `hh`          | Hour, as two digits with leading zero if required            |\n| `mm`          | Minute, as two digits with leading zero if required          |\n| `ss`          | Seconds, as two digits with leading zero if required         |\n\n### Aliasing\n\nJavaScript's `Date` API was inspired by Java's `java.util.Date` library (while the latter had become de facto legacy since Java 1.1 in 1997). In particular, the Java `Date` class had a method called `toGMTString` — which was poorly named, because the [Greenwich Mean Time](https://en.wikipedia.org/wiki/Greenwich_Mean_Time) is not equivalent to the [Coordinated Universal Time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time), while JavaScript dates always operate by UTC time. For web compatibility reasons, `toGMTString` remains as an alias to `toUTCString`, and they refer to the exact same function object. This means:\n\n```js\nDate.prototype.toGMTString.name === \"toUTCString\";\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Date/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a\n`Date` object.\n\n\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the given date, or [`NaN`](../../NaN.mdx) in case of an invalid date.\n\n## Description\n\nThe `valueOf()` method returns the primitive value of a `Date`\nobject as a number data type, the number of milliseconds since midnight 01 January, 1970\nUTC.\n\nThis method is functionally equivalent to the [`Date.prototype.getTime()`](./getTime.mdx)\nmethod.\n\nThis method is usually called internally by JavaScript and not explicitly in code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/DecompressionStream/DecompressionStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DecompressionStream()\n\nThe **`DecompressionStream()`** constructor creates a new `DecompressionStream` object which decompresses a stream of data.\n\n## Syntax\n\n```js\nnew DecompressionStream(format)\n```\n\n### Parameters\n\n- `format`\n\n  - : One of the following compression formats:\n\n    - `\"gzip\"`\n    - `\"deflate\"`\n    - `\"deflate-raw\"`\n\n## Exceptions\n\n- `TypeError`\n  - : Thrown if the format passed to the constructor is not supported.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/DecompressionStream/prototype/readable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DecompressionStream.readable\n\nThe **`readable`** read-only property of the `DecompressionStream` interface returns a `ReadableStream`.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/DecompressionStream/prototype/writable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DecompressionStream.writable\n\nThe **`writable`** read-only property of the `DecompressionStream` interface returns a `WritableStream`.\n\n## Value\n\nA `WritableStream`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/EcKeyImportParams/EcKeyImportParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# EcKeyImportParams\n\nThe **`EcKeyImportParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.importKey()`, when generating any elliptic-curve-based key pair: that is, when the algorithm is identified as ECDSA.\n\n## Instance properties\n\n- `name`\n  - : A string. This should be set to `ECDSA`.\n- `namedCurve`\n\n  - : A string representing the name of the elliptic curve to use. This may be any of the following names for [NIST](https://www.nist.gov/)-approved curves:\n\n    - `P-256`\n    - `P-384`\n    - `P-521`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/EcdsaParams/EcdsaParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# EcdsaParams\n\nThe **`EcdsaParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.sign()` or `SubtleCrypto.verify()` when using the ECDSA algorithm.\n\n## Instance properties\n\n- `name`\n    - : A string. This should be set to `ECDSA`.\n- `hash`\n\n    - : A string. An identifier for the digest algorithm to use. This should be one of the following:\n\n        - `SHA-256`: selects the SHA-256 algorithm.\n        - `SHA-384`: selects the SHA-384 algorithm.\n        - `SHA-512`: selects the SHA-512 algorithm.\n\n        > **Warning:** `SHA-1` is also supported here but the SHA-1 algorithm is considered vulnerable and should no longer be used.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Error/Error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error\n\nThe **`Error()`** constructor creates an error object.\n\n## Syntax\n\n```js\nnew Error()\nnew Error(message)\nnew Error(message, options)\nnew Error(message, fileName)\nnew Error(message, fileName, lineNumber)\n\nError()\nError(message)\nError(message, options)\nError(message, fileName)\nError(message, fileName, lineNumber)\n```\n\n> **Note:** `Error()` can be called with or without `new`. Both create a new `Error` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : A human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A value indicating the specific cause of the error, reflected in the [`Error.prototype.cause`](./prototype/cause.mdx) property. When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Error/prototype/cause.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.cause\n\nThe **`cause`** data property of an [`Error`](../../../globals/Error/Error.mdx) instance indicates the specific original cause of the error.\n\nIt is used when catching and re-throwing an error with a more-specific or useful error message in order to still have access to the original error.\n\n## Value\n\nThe value that was passed to the [`Error`](../Error.mdx) constructor in the `options.cause` argument. It may not be present.\n\n## Description\n\nThe value of `cause` can be of any type. You should not make assumptions that the error you caught has an `Error` as its `cause`, in the same way that you cannot be sure the variable bound in the `catch` statement is an `Error` either. The \"Providing structured data as the error cause\" example below shows a case where a non-error is deliberately provided as the cause.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Error/prototype/message.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.message\n\nThe **`message`** data property of an [`Error`](../Error.mdx) instance is a human-readable description of the error.\n\n## Value\n\nA string corresponding to the value passed to the [`Error`](../Error.mdx) constructor as the first argument.\n\n## Description\n\nThis property contains a brief description of the error if one is available or has been set. The `message` property combined with the [`name`](./name.mdx) property is used by the [`Error.prototype.toString()`](./toString.mdx) method to create a string representation of the Error.\n\nBy default, the `message` property is an empty string, but this behavior can be overridden for an instance by specifying a message as the first argument to the [`Error`](../Error.mdx) constructor.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Error/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.name\n\nThe **`name`** data property of `Error.prototype` is shared by all [`Error`](../Error.mdx) instances. It represents the name for the type of error. For `Error.prototype.name`, the initial value is `\"Error\"`. Subclasses like [`TypeError`](../../../globals/TypeError/TypeError.mdx) and [`SyntaxError`](../../SyntaxError/SyntaxError.mdx) provide their own `name` properties.\n\n## Value\n\nA string. For `Error.prototype.name`, the initial value is `\"Error\"`.\n\n## Description\n\nBy default, [`Error`](../Error.mdx) instances are given the name \"Error\". The `name` property, in addition to the [`message`](./message.mdx) property, is used by the [`Error.prototype.toString()`](./toString.mdx) method to create a string representation of the error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Error/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.toString()\n\nThe **`toString()`** method returns a string representing the\nspecified [`Error`](../Error.mdx) object.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified [`Error`](../Error.mdx) object.\n\n## Description\n\nThe [`Error`](../Error.mdx) object overrides the [`Object.prototype.toString()`](../../Object/prototype/toString.mdx)\nmethod inherited by all objects. \n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/EvalError/EvalError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# EvalError\n\nThe **`EvalError()`** constructor creates a new `EvalError` instance.\n\n## Syntax\n\n```js\nnew EvalError()\nnew EvalError(message)\nnew EvalError(message, options)\nnew EvalError(message, fileName)\nnew EvalError(message, fileName, lineNumber)\n\nEvalError()\nEvalError(message)\nEvalError(message, options)\nEvalError(message, fileName)\nEvalError(message, fileName, lineNumber)\n```\n\n> **Note:** `EvalError()` can be called with or without `new`. Both create a new `EvalError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/FetchEvent/FetchEvent.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent\n\nThis is the event type for `fetch` events. It contains information about the fetch, including the request and how the receiver will treat the response. \nIt provides the [`event.respondWith()`](./prototype/respondWith.mdx) method, which allows us to provide a response to this fetch.\n\n## Instance properties\n\n- `FetchEvent.request` _**readonly**_\n    - : The `Request` that was received by the application.\n- `FetchEvent.client` _**readonly**_\n    - : Information about the downstream client that made the request.\n        While these fields are always defined on Compute, they may be *null* when not available in testing environments\n        such as Viceroy.\n    - `FetchEvent.client.address` _**readonly**_\n        - : A string representation of the IPv4 or IPv6 address of the downstream client.\n    - `FetchEvent.client.geo` _**readonly**_\n        - : Either `null`, or a [geolocation dictionary](../../fastly:geolocation/getGeolocationForIpAddress.mdx) corresponding to the IP address of the downstream client.\n    - `FetchEvent.client.tlsJA3MD5` _**readonly**_\n        - : Either `null` or a string representation of the JA3 hash of the TLS ClientHello message.\n    - `FetchEvent.client.tlsCipherOpensslName` _**readonly**_\n        - : Either `null` or a string representation of the cipher suite used to secure the client TLS connection.\n    - `FetchEvent.client.tlsProtocol` _**readonly**_\n        - : Either `null` or a string representation of the TLS protocol version used to secure the client TLS connection.\n    - `FetchEvent.client.tlsClientCertificate` _**readonly**_\n        - : Either `null` or an ArrayBuffer containing the raw client certificate in the mutual TLS handshake message. It is in PEM format. Returns an empty ArrayBuffer if this is not mTLS or available.\n    - `FetchEvent.client.tlsClientHello` _**readonly**_\n        - : Either `null` or an ArrayBuffer containing the raw bytes sent by the client in the TLS ClientHello message.\n    - `FetchEvent.client.tlsJA4` _**readonly**_\n        - : Either `null` or a string representation of the JA4 fingerprint of the TLS ClientHello message.\n    - `FetchEvent.client.h2Fingerprint` _**readonly**_\n        - : Either `null` or a string representation of the HTTP/2 fingerprint for HTTP/2 connections. Returns `null` for HTTP/1.1 connections.\n    - `FetchEvent.client.ohFingerprint` _**readonly**_\n        - : Either `null` or a string representation of the Original Header fingerprint based on the order and presence of request headers.\n- `FetchEvent.server` _**readonly**_\n    - : Information about the server receiving the request for the Fastly Compute service.\n    - `FetchEvent.server.address` _**readonly**_\n        - : A string representation of the IPv4 or IPv6 address of the server which received the request.\n\n## Instance methods\n\n- [`FetchEvent.respondWith()`](./prototype/respondWith.mdx)\n    - : Provide (a promise for) a response for this request.\n- [`FetchEvent.sendEarlyHints()`](./prototype/sendEarlyHints.mdx)\n    - : Send a [103 Early Hints](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/103) response for this request.\n- [`FetchEvent.waitUntil()`](./prototype/waitUntil.mdx)\n    - : Extends the lifetime of the event. Used to notify the host environment of tasks that extend beyond the returning of a response, such as streaming and caching.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/FetchEvent/prototype/respondWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent.respondWith()\n\nThe **`respondWith()`** method allows you to provide a promise for a [`Response`](../../Response/Response.mdx) to send back to the client which made the incoming request to your application.\n\n## Syntax\n\n```js\nrespondWith(response)\n```\n\n### Parameters\n\n- `response`\n  - : A [`Response`](../../Response/Response.mdx) or a [`Promise`](../../Promise/Promise.mdx) that resolves to a\n    [`Response`](../../Response/Response.mdx). Otherwise, a network error is returned to Fetch.\n\n### Return value\n\nAlways returns `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/FetchEvent/prototype/sendEarlyHints.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent.sendEarlyHints()\n\nThe **`sendEarlyHints()`** method allows you to send a [103 Early Hints](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/103) response back to the client which made the incoming request to your application.\n\n## Syntax\n\n```js\nsendEarlyHints(headers)\n```\n\n### Parameters\n\n- `headers`\n  - : Any headers you want to add to your response, contained\n        within a [`Headers`](../../Headers/Headers.mdx) object or object literal of\n        [`String`](../../String/String.mdx) key/value pairs.\n\n### Return value\n\nAlways returns `undefined`.\n\n### Examples\n\n```js\nevent.sendEarlyHints({ link: '</style.css>; rel=preload; as=style' });\n\nevent.sendEarlyHints([\n        ['link', '</style.css>; rel=preload; as=style'],\n        ['link', '</style2.css>; rel=preload; as=style']\n    ]);\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/FetchEvent/prototype/waitUntil.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent.waitUntil()\n\n\nThe **`waitUntil()`** method tells the host environment that work is ongoing until the promise settles, and it shouldn't terminate\nthe application if it wants that work to complete.\n\nThe `waitUntil()` method must be initially called synchronously within the event callback,\nbut after that it can be called multiple times, and will hold the process open until all the promises passed to it\nsettle.\n\n## Syntax\n\n```js\nwaitUntil(promise)\n```\n\n### Parameters\n\nA [`Promise`](../../Promise/Promise.mdx).\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/FinalizationRegistry/FinalizationRegistry.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FinalizationRegistry()\n\nThe **`FinalizationRegistry`** constructor creates a `FinalizationRegistry` object that uses the given callback.\n\n## Syntax\n\n```js\n// Arrow callback function\nnew FinalizationRegistry((heldValue) => { /* … */ })\n\n// Callback function\nnew FinalizationRegistry(callbackFn)\n\n// Inline callback function\nnew FinalizationRegistry(function(heldValue) { /* … */ })\n```\n\n> **Note:** `FinalizationRegistry()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `callback`\n  - : The callback function this registry should use.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/FinalizationRegistry/prototype/register.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FinalizationRegistry.prototype.register()\n\nThe `register()` method registers an object with a\n`FinalizationRegistry` instance so that if the object is garbage-collected,\nthe registry's callback may get called.\n\n## Syntax\n\n```js\nregister(target, heldValue)\nregister(target, heldValue, unregisterToken)\n```\n\n### Parameters\n\n- `target`\n  - : The target object to register.\n- `heldValue`\n  - : The value to pass to the finalizer for this object. This cannot be the `target` object but can be anything else, including functions and primitives.\n- `unregisterToken` _**optional**_\n  - : A token that may be used with the `unregister` method later to unregister\n    the target object. If provided (and not `undefined`), this must be an\n    object. If not provided, the target cannot be unregistered.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown when one of the following condition is met:\n    - `target` is not an object (object as opposed to primitives; functions are objects as well)\n    - `target` is the same as `heldvalue` (`target === heldValue`)\n    - `unregisterToken` is not an object\n\n## Description\n\nSee the [Avoid where possible](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry#avoid_where_possible)\nand [Notes on cleanup callbacks](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry#notes_on_cleanup_callbacks)\nsections of the `FinalizationRegistry` page for important caveats.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/FinalizationRegistry/prototype/unregister.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FinalizationRegistry.prototype.unregister()\n\nThe `unregister()` method unregisters a target object from a\n`FinalizationRegistry` instance.\n\n## Syntax\n\n```js\nunregister(unregisterToken)\n```\n\n### Parameters\n\n- `unregisterToken`\n  - : The token used with the [`FinalizationRegistry.prototype.register`](./register.mdx) method when registering the target object. Multiple cells registered with the same `unregisterToken` will be unregistered together.\n\n### Return value\n\nA boolean value that is `true` if at least one cell was unregistered and `false` if no cell was unregistered.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown when `unregisterToken` is not an object.\n\n## Description\n\nWhen a target object has been reclaimed, it is no longer registered in the registry.\nThere is no need to call `unregister` in your cleanup callback. Only call\n`unregister` if you haven't received a cleanup callback and no longer need\nto receive one.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Float32Array/Float32Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Float32Array()\n\nThe **`Float32Array()`** typed array constructor creates a new\n`Float32Array` object, which is, an array of 32-bit floating point numbers\n(corresponding to the C `float` data type) in the platform byte order. If\ncontrol over byte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are\ninitialized to `0`. Once established, you can reference elements in the array\nusing the object's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Float32Array()\nnew Float32Array(length)\nnew Float32Array(typedArray)\nnew Float32Array(object)\n\nnew Float32Array(buffer)\nnew Float32Array(buffer, byteOffset)\nnew Float32Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Float32Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Float64Array/Float64Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Float64Array()\n\nThe **`Float64Array()`** typed array constructor creates a new\n`Float64Array` object, which is, an array of 64-bit floating point numbers\n(corresponding to the C `double` data type) in the platform byte order. If\ncontrol over byte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are\ninitialized to `0`. Once established, you can reference elements in the array\nusing the object's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Float64Array()\nnew Float64Array(length)\nnew Float64Array(typedArray)\nnew Float64Array(object)\n\nnew Float64Array(buffer)\nnew Float64Array(buffer, byteOffset)\nnew Float64Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Float64Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/FormData/FormData.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData()\n\nThe **`FormData()`** constructor creates a new `FormData` object.\n\n## Syntax\n\n```js\nnew FormData()\nnew FormData(form)\n```\n\n> **Note:** `FormData()` can only be constructed with `new`. Attempting to call it without `new` throws a `TypeError`.\n\n### Parameters\n\n- `form` _**optional**_\n  - : An HTML `<form>` element — when specified, the `FormData` object will be populated with the form's current key/value pairs using the name property of each element for the keys and their submitted value for the values. File input elements are handled specially: their values are taken from the files selected by the user in the upload control.\n\n### Return value\n\nA new `FormData` object, pre-populated with form data if the optional `form` parameter was provided.\n\n## Description\n\nThe `FormData` interface provides a way to construct a set of key/value pairs representing form fields and their values, which can be sent using methods such as `fetch()`. It uses the same format a form would use if the encoding type were set to `\"multipart/form-data\"`.\n\nYou can also append additional data to the `FormData` object after it's created using its various methods.\n\nA `FormData` object can be used in a number of ways with other APIs:\n\n1. It can be sent with the `fetch()` API\n2. It works seamlessly with the `Request` and `Response` objects - it can be used directly as the body of a `Request` object\n3. It can be obtained from a `Response` object using the `formData()` method\n4. It can be passed directly to the `URLSearchParams` constructor\n\nThe transmitted data is in the same format that the form's `submit()` method would use to send the data if the form's encoding type were set to `\"multipart/form-data\"`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/FormData/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.append()\n\nThe **`append()`** method of the `FormData` interface appends a new value onto an existing key inside a `FormData` object, or adds the key if it does not already exist.\n\n## Syntax\n\n```js\nappend(name, value)\nappend(name, value, filename)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the field whose data is contained in `value`.\n- `value`\n  - : The value of the field. This can be a string or a `Blob` (including subclasses such as `File`). If none of these, the value is converted to a string.\n- `filename` _**optional**_\n  - : The filename reported to the server when a `Blob` or `File` is passed as the second parameter. The default filename for `Blob` objects is \"blob\". The default filename for `File` objects is the file's filename.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/FormData/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.delete()\n\nThe **`delete()`** method of the `FormData` interface removes all key/value pairs with the given name from the `FormData` object.\n\n## Syntax\n\n```js\ndelete(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the key you want to delete.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/FormData/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.entries()\n\nThe **`entries()`** method of the `FormData` interface returns an iterator allowing iteration through all key/value pairs contained in this object. The iterator yields a new array for each key/value pair, with the first element being the key and the second element being the value.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nAn `iterator`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/FormData/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.forEach()\n\nThe **`forEach()`** method of the `FormData` interface executes the provided callback function once for each key/value pair in the `FormData` object.\n\n## Syntax\n\n```js\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n  - : A function to execute for each entry in the object. The function will be passed the following arguments:\n    - `value`\n      - : The value of the current entry.\n    - `key`\n      - : The key of the current entry.\n    - `formData`\n      - : The `FormData` object being traversed.\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/FormData/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.get()\n\nThe **`get()`** method of the `FormData` interface returns the first value associated with a given key from within a `FormData` object. If you expect multiple values and want all of them, use the [`getAll()`](../../../globals/FormData/prototype/getAll.mdx) method instead.\n\n## Syntax\n\n```js\nget(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the key you want to retrieve.\n\n### Return value\n\nA `FormDataEntryValue` containing the value. If the key does not exist, it returns `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/FormData/prototype/getAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.getAll()\n\nThe **`getAll()`** method of the `FormData` interface returns all the values associated with a given key from within a `FormData` object.\n\n## Syntax\n\n```js\ngetAll(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the key you want to retrieve.\n\n### Return value\n\nAn array of `FormDataEntryValue` items containing all values with the given key. If the key doesn't exist, an empty array is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/FormData/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.has()\n\nThe **`has()`** method of the `FormData` interface returns a boolean indicating whether a `FormData` object contains a key/value pair with the given name.\n\n## Syntax\n\n```js\nhas(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the key you want to test for existence.\n\n### Return value\n\n`true` if a key/value pair with the specified name exists; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/FormData/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.keys()\n\nThe **`keys()`** method of the `FormData` interface returns an iterator allowing iteration through all keys contained in this object. The iterator yields the key for each value.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nAn `iterator`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/FormData/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.set()\n\nThe **`set()`** method of the `FormData` interface sets a new value for an existing key inside a `FormData` object, or adds the key/value if it does not already exist.\n\nThe difference between `set()` and [`append()`](../../../globals/FormData/prototype/append.mdx) is that if the specified key already exists, `set()` overwrites all existing values with the new one, whereas `append()` appends the new value onto the end of the existing values.\n\n## Syntax\n\n```js\nset(name, value)\nset(name, value, filename)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the field whose data is contained in `value`.\n- `value`\n  - : The value of the field. This can be a string or a `Blob` (including subclasses such as `File`). If none of these, the value is converted to a string.\n- `filename` _**optional**_\n  - : The filename reported to the server when a `Blob` or `File` is passed as the second parameter. The default filename for `Blob` objects is \"blob\". The default filename for `File` objects is the file's filename.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/FormData/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.values()\n\nThe **`values()`** method of the `FormData` interface returns an iterator allowing iteration through all values contained in this object. The iterator yields the value for each key/value pair.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nAn `iterator`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Function/Function.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function()\n\nThe **`Function()`** constructor creates a new [`Function`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function) object. Calling the constructor directly can create functions dynamically, but suffers from security and similar (but far less significant) performance issues as `eval()`. However, unlike `eval` (which may have access to the local scope), the `Function` constructor creates functions which execute in the global scope only.\n\n\n\n## Syntax\n\n```js\nnew Function(functionBody)\nnew Function(arg0, functionBody)\nnew Function(arg0, arg1, functionBody)\nnew Function(arg0, arg1, /* … ,*/ argN, functionBody)\n\nFunction(functionBody)\nFunction(arg0, functionBody)\nFunction(arg0, arg1, functionBody)\nFunction(arg0, arg1, /* … ,*/ argN, functionBody)\n```\n\n> **Note:** `Function()` can be called with or without `new`. Both create a new `Function` instance.\n\n### Parameters\n\n- `argN` _**optional**_\n\n  - : Names to be used by the function as formal argument names. Each must be a string that corresponds to a valid JavaScript parameter (any of plain [identifier](https://developer.mozilla.org/docs/Glossary/Identifier), [rest parameter](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/rest_parameters), or [destructured](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment) parameter, optionally with a [default](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/Default_parameters)), or a list of such strings separated with commas.\n\n    As the parameters are parsed in the same way as function expressions, whitespace and comments are accepted. For example: `\"x\", \"theValue = 42\", \"[a, b] /* numbers */\"` — or `\"x, theValue = 42, [a, b] /* numbers */\"`. (`\"x, theValue = 42\", \"[a, b]\"` is also correct, though very confusing to read.)\n\n- `functionBody`\n  - : A string containing the JavaScript statements comprising the function definition.\n\n## Description\n\n`Function` objects created with the `Function` constructor are parsed when the function is created. This is less efficient than creating a function with a [function expression](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/function) or [function declaration](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function) and calling it within your code, because such functions are parsed with the rest of the code.\n\nAll arguments passed to the function, except the last, are treated as the names of the identifiers of the parameters in the function to be created, in the order in which they are passed. The function will be dynamically compiled as a function expression, with the source assembled in the following fashion:\n\n```js\n`function anonymous(${args.join(\",\")}\n) {\n${functionBody}\n}`\n```\n\nThis is observable by calling the function's [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/toString) method.\n\nHowever, unlike normal [function expressions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/function), the name `anonymous` is not added to the `functionBody`'s scope, since `functionBody` only has access the global scope. If `functionBody` is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode) (the body itself needs to have the `\"use strict\"` directive since it doesn't inherit the strictness from the context), you may use [`arguments.callee`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/arguments/callee) to refer to the function itself. Alternatively, you can define the recursive part as an inner function:\n\n```js\nconst recursiveFn = new Function(\"count\", `\n(function recursiveFn(count) {\n  if (count < 0) {\n    return;\n  }\n  console.log(count);\n  recursiveFn(count - 1);\n})(count);\n`);\n```\n\nNote that the two dynamic parts of the assembled source — the parameters list `args.join(\",\")` and `functionBody` — will first be parsed separately to ensure they are each syntactically valid. This prevents injection-like attempts.\n\n```js\nnew Function(\"/*\", \"*/) {\");\n// SyntaxError: Unexpected end of arg string\n// Doesn't become \"function anonymous(/*) {*/) {}\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Function/prototype/apply.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.apply()\n\nThe **`apply()`** method calls the specified function with a given `this` value, and `arguments` provided as an array (or an [array-like object](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects)).\n\n\n\n## Syntax\n\n```js\napply(thisArg)\napply(thisArg, argsArray)\n```\n\n### Parameters\n\n- `thisArg`\n  - : The value of `this` provided for the call to `func`. If the function is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) will be replaced with the global object, and primitive values will be converted to objects.\n- `argsArray` _**optional**_\n  - : An array-like object, specifying the arguments with which `func` should be called, or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../../globals/undefined.mdx) if no arguments should be provided to the function.\n\n### Return value\n\nThe result of calling the function with the specified `this` value and arguments.\n\n## Description\n\n> **Note:** This function is almost identical to [`Function.prototype.call()`](../../../globals/Function/prototype/call.mdx), except that `call()` accepts an **argument list**, while `apply()` accepts a **single array of arguments** — for example, `func.apply(this, ['eat', 'bananas'])` vs. `func.call(this, 'eat', 'bananas')`.\n\nNormally, when calling a function, the value of [`this`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this) inside the function is the object that the function was accessed on. With `apply()`, you can assign an arbitrary value as `this` when calling an existing function, without first attaching the function to the object as a property. This allows you to use methods of one object as generic utility functions.\n\n> **Warning:** Do not use `apply()` to chain constructors (for example, to implement inheritance). This invokes the constructor function as a plain function, which means [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target) is `undefined`, and classes throw an error because they can't be called without `new`. Use [`Reflect.construct()`](../../../globals/Reflect/construct.mdx) or [`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Function/prototype/bind.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.bind()\n\nThe **`bind()`** method creates a new function that, when called, has its `this` keyword set to the provided value, with a given sequence of arguments preceding any provided when the new function is called.\n\n\n\n## Syntax\n\n```js\nbind(thisArg)\nbind(thisArg, arg1)\nbind(thisArg, arg1, arg2)\nbind(thisArg, arg1, arg2, /* …, */ argN)\n```\n\n### Parameters\n\n- `thisArg`\n  - : The value to be passed as the `this` parameter to the target function `func` when the bound function is called. If the function is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) will be replaced with the global object, and primitive values will be converted to objects. The value is ignored if the bound function is constructed using the `new` operator.\n- `arg1, …, argN` _**optional**_\n  - : Arguments to prepend to arguments provided to the bound function when invoking `func`.\n\n### Return value\n\nA copy of the given function with the specified `this` value, and initial arguments (if provided).\n\n## Description\n\nThe `bind()` function creates a new _bound function_. Calling the bound function generally results in the execution of the function it wraps, which is also called the _target function_. The bound function will store the parameters passed — which include the value of `this` and the first few arguments — as its internal state. These values are stored in advance, instead of being passed at call time. You can generally see `const boundFn = fn.bind(thisArg, arg1, arg2)` as being equivalent to `const boundFn = (...restArgs) => fn.call(thisArg, arg1, arg2, ...restArgs)` for the effect when it's called (but not when `boundFn` is constructed).\n\nA bound function can be further bound by calling `boundFn.bind(thisArg, /* more args */)`, which creates another bound function `boundFn2`. The newly bound `thisArg` value is ignored, because the target function of `boundFn2`, which is `boundFn`, already has a bound `this`. When `boundFn2` is called, it would call `boundFn`, which in turn calls `fn`. The arguments that `fn` ultimately receives are, in order: the arguments bound by `boundFn`, arguments bound by `boundFn2`, and the arguments received by `boundFn2`.\n\n```js\n\"use strict\"; // prevent `this` from being boxed into the wrapper object\n\nfunction log(...args) {\n  console.log(this, ...args);\n}\nconst boundLog = log.bind(\"this value\", 1, 2);\nconst boundLog2 = boundLog.bind(\"new this value\", 3, 4);\nboundLog2(5, 6); // \"this value\", 1, 2, 3, 4, 5, 6\n```\n\nA bound function may also be constructed using the `new` operator if its target function is constructable. Doing so acts as though the target function had instead been constructed. The prepended arguments are provided to the target function as usual, while the provided `this` value is ignored (because construction prepares its own `this`, as seen by the parameters of [`Reflect.construct`](../../../globals/Reflect/construct.mdx)). If the bound function is directly constructed, [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target) will be the target function instead. (That is, the bound function is transparent to `new.target`.)\n\n```js\nclass Base {\n  constructor(...args) {\n    console.log(new.target === Base);\n    console.log(args);\n  }\n}\n\nconst BoundBase = Base.bind(null, 1, 2);\n\nnew BoundBase(3, 4); // true, [1, 2, 3, 4]\n```\n\nHowever, because a bound function does not have the [`prototype`](../../../globals/Function/prototype/) property, it cannot be used as a base class for [`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends).\n\n```js example-bad\nclass Derived extends class {}.bind(null) {}\n// TypeError: Class extends value does not have valid prototype property undefined\n```\n\nWhen using a bound function as the right-hand side of [`instanceof`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/instanceof), `instanceof` would reach for the target function (which is stored internally in the bound function) and read its `prototype` instead.\n\n```js\nclass Base {}\nconst BoundBase = Base.bind(null, 1, 2);\nconsole.log(new Base() instanceof BoundBase); // true\n```\n\nThe bound function has the following properties:\n\n- [`length`](../../../globals/Function/prototype/length.mdx)\n  - : The `length` of the target function minus the number of arguments being bound (not counting the `thisArg` parameter), with 0 being the minimum value.\n- [`name`](../../../globals/Function/prototype/name.mdx)\n  - : The `name` of the target function plus a `\"bound \"` prefix.\n\nThe bound function also inherits the [prototype chain](https://developer.mozilla.org/docs/Web/JavaScript/Inheritance_and_the_prototype_chain) of the target function. However, it doesn't have other own properties of the target function (such as [static properties](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/static) if the target function is a class).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Function/prototype/call.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.call()\n\nThe **`call()`** method calls the function with a given `this` value and arguments provided individually.\n\n## Syntax\n\n```js\ncall(thisArg)\ncall(thisArg, arg1)\ncall(thisArg, arg1, /* …, */ argN)\n```\n\n### Parameters\n\n- `thisArg`\n  - : The value to use as `this` when calling `func`. If the function is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) will be replaced with the global object, and primitive values will be converted to objects.\n- `arg1, …, argN` _**optional**_\n  - : Arguments for the function.\n\n### Return value\n\nThe result of calling the function with the specified `this` value and arguments.\n\n## Description\n\n> **Note:** This function is almost identical to [`Function.prototype.apply()`](../../../globals/Function/prototype/apply.mdx), except that `call()` accepts an **argument list**, while `apply()` accepts a **single array of arguments** — for example, `func.apply(this, ['eat', 'bananas'])` vs. `func.call(this, 'eat', 'bananas')`.\n\nNormally, when calling a function, the value of [`this`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this) inside the function is the object that the function was accessed on. With `call()`, you can assign an arbitrary value as `this` when calling an existing function, without first attaching the function to the object as a property. This allows you to use methods of one object as generic utility functions.\n\n> **Warning:** Do not use `call()` to chain constructors (for example, to implement inheritance). This invokes the constructor function as a plain function, which means [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target) is `undefined`, and classes throw an error because they can't be called without `new`. Use [`Reflect.construct()`](../../../globals/Reflect/construct.mdx) or [`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Function/prototype/index.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.prototype\n\nThe **`prototype`** data property of a `Function` instance is used when the function is used as a constructor with the `new` operator. It will become the new object's prototype.\n\n> **Note:** Not all `Function` objects have the `prototype` property — see [description](#description).\n\n## Value\n\nAn object.\n\n> **Note:** The `prototype` property of [classes](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes) is not writable.\n\n## Description\n\nWhen a function is called with `new`, the constructor's `prototype` property will become the resulting object's prototype.\n\n```js\nfunction Ctor() {}\nconst inst = new Ctor();\nconsole.log(Object.getPrototypeOf(inst) === Ctor.prototype); // true\n```\n\nYou can read [Inheritance and the prototype chain](https://developer.mozilla.org/docs/Web/JavaScript/Inheritance_and_the_prototype_chain#constructors) for more information about the interactions between a constructor function's `prototype` property and the resulting object's prototype.\n\nA function having a `prototype` property is not sufficient for it to be eligible as a constructor. [Generator functions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function*) have a `prototype` property, but cannot be called with `new`:\n\n```js\nasync function* asyncGeneratorFunction() {}\nfunction* generatorFunction() {}\n```\n\nInstead, generator functions' `prototype` property is used when they are called _without_ `new`. The `prototype` property will become the returned [`Generator`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Generator) object's prototype.\n\nIn addition, some functions may have a `prototype` but throw unconditionally when called with `new`. For example, the [`Symbol()`](../../../globals/Symbol/Symbol.mdx) and [`BigInt`](../../../globals/BigInt/BigInt.mdx) functions throw when called with `new`, because `Symbol.prototype` and `BigInt.prototype` are only intended to provide methods for the primitive values, but the wrapper objects should not be directly constructed.\n\nThe following functions do not have `prototype`, and are therefore ineligible as constructors, even if a `prototype` property is later manually assigned:\n\n```js\nconst method = { foo() {} }.foo;\nconst arrowFunction = () => {};\nasync function asyncFunction() {}\n```\n\nThe following are valid constructors that have `prototype`:\n\n```js\nclass Class {}\nfunction fn() {}\n```\n\nA [bound function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/bind) does not have a `prototype` property, but may be constructable. When it's constructed, the target function is constructed instead, and if the target function is constructable, it would return a normal instance.\n\n```js\nconst boundFunction = function () {}.bind(null);\n```\n\nA function's `prototype` property, by default, is a plain object with one property: (`constructor`)[../../../globals/Object/prototype/constructor.mdx), which is a reference to the function itself. The `constructor` property is writable, non-enumerable, and configurable.\n\nIf the `prototype` of a function is reassigned with something other than an `Object`, when the function is called with `new`, the returned object's prototype would be `Object.prototype` instead. (In other words, `new` ignores the `prototype` property and constructs a plain object.)\n\n```js\nfunction Ctor() {}\nCtor.prototype = 3;\nconsole.log(Object.getPrototypeOf(new Ctor()) === Object.prototype); // true\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Function/prototype/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.length\n\nThe **`length`** data property of a `Function` instance indicates the number of parameters expected by the function.\n\n## Value\n\nA number.\n\n## Description\n\nA `Function` object's `length` property indicates how many arguments the function expects, i.e. the number of formal parameters. \n\nThe `Function` constructor is itself a `Function` object. Its `length` data property has a value of `1`.\n\nDue to historical reasons, `Function.prototype` is a callable itself. The `length` property of `Function.prototype` has a value of `0`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Function/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.name\n\nThe **`name`** property of a `Function` instance indicates the function's name as specified when it was created, or it may be either `anonymous` or `''` (an empty string) for functions created anonymously.\n\n## Value\n\nA string.\n\n> **Note:** In non-standard, pre-ES2015 implementations the `configurable` attribute was `false` as well.\n\n## Description\n\nThe function's `name` property can be used to identify the function in debugging tools or error messages. It has no semantic significance to the language itself.\n\nThe `name` property is read-only and cannot be changed by the assignment operator:\n\n```js\nfunction someFunction() {}\n\nsomeFunction.name = 'otherFunction';\nconsole.log(someFunction.name); // someFunction\n```\n\nTo change it, use [`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx).\n\nThe `name` property is typically inferred from how the function is defined. In the following sections, we will describe the various ways in which it can be inferred.\n\n### Function declaration\n\nThe `name` property returns the name of a function declaration.\n\n```js\nfunction doSomething() {}\ndoSomething.name; // \"doSomething\"\n```\n\n### Default-exported function declaration\n\nAn [`export default`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/export) declaration exports the function as a declaration instead of an expression. If the declaration is anonymous, the name is `\"default\"`.\n\n```js\n// -- someModule.js --\nexport default function () {};\n\n// -- main.js --\nimport someModule from \"./someModule.js\";\n\nsomeModule.name; // \"default\"\n```\n\n### Function constructor\n\nFunctions created with the [`Function()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/Function) constructor have name \"anonymous\".\n\n```js\nnew Function().name; // \"anonymous\"\n```\n\n### Function expression\n\nIf the function expression is named, that name is used as the `name` property.\n\n```js\nconst someFunction = function someFunctionName() {};\nsomeFunction.name; // \"someFunctionName\"\n```\n\nAnonymous function expressions created using the keyword `function` or arrow functions would have `\"\"` (an empty string) as their name.\n\n```js\n(function () {}).name; // \"\"\n(() => {}).name; // \"\"\n```\n\nHowever, such cases are rare — usually, in order to refer to the expression elsewhere, the function expression is attached to an identifier when it's created (such as in a variable declaration). In such cases, the name can be inferred, as the following few subsections demonstrate.\n\nOne practical case where the name cannot be inferred is a function returned from another function:\n\n```js\nfunction getFoo() {\n  return () => {};\n}\ngetFoo().name; // \"\"\n```\n\n### Variable declaration and method\n\nVariables and methods can infer the name of an anonymous function from its syntactic position.\n\n```js\nconst f = function () {};\nconst object = {\n  someMethod: function () {}\n};\n\nconsole.log(f.name); // \"f\"\nconsole.log(object.someMethod.name); // \"someMethod\"\n```\n\nThe same applies to assignment:\n\n```js\nlet f;\nf = () => {};\nf.name; // \"f\"\n```\n\n### Initializer and default value\n\nFunctions in initializers (default values) of [destructuring](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#default_value), [default parameters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/Default_parameters), [class fields](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/Public_class_fields), etc., will inherit the name of the bound identifier as their `name`.\n\n```js\nconst [f = () => {}] = [];\nf.name; // \"f\"\n\nconst { someMethod: m = () => {} } = {};\nm.name; // \"m\"\n\nfunction foo(f = () => {}) {\n  console.log(f.name);\n}\nfoo(); // \"f\"\n\nclass Foo {\n  static someMethod = () => {};\n}\nFoo.someMethod.name; // someMethod\n```\n\n### Shorthand method\n\n```js\nconst o = {\n  foo() {},\n};\no.foo.name; // \"foo\";\n```\n\n### Bound function\n\n[`Function.prototype.bind()`](../../../globals/Function/prototype/bind.mdx) produces a function whose name is \"bound \" plus the function name.\n\n```js\nfunction foo() {};\nfoo.bind({}).name; // \"bound foo\"\n```\n\n### Getter and setter\n\nWhen using [`get`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/get) and [`set`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/set) accessor properties, \"get\" or \"set\" will appear in the function name.\n\n```js\nconst o = {\n  get foo() {},\n  set foo(x) {},\n};\n\nconst descriptor = Object.getOwnPropertyDescriptor(o, \"foo\");\ndescriptor.get.name; // \"get foo\"\ndescriptor.set.name; // \"set foo\";\n```\n\n### Class\n\nA class's name follows the same algorithm as function declarations and expressions.\n\n```js\nclass Foo {}\nFoo.name; // \"Foo\"\n```\n\n> **Warning:** JavaScript will set the function's `name` property only if a function does not have an own property called `name`. However, classes' [static members](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/static) will be set as own properties of the class constructor function, and thus prevent the built-in `name` from being applied. See [telling the constructor name of an object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name#telling_the_constructor_name_of_an_object) for more details.\n\n### Symbol as function name\n\nIf a `Symbol` is used a function name and the symbol has a description, the method's name is the description in square brackets.\n\n```js\nconst sym1 = Symbol(\"foo\");\nconst sym2 = Symbol();\n\nconst o = {\n  [sym1]() {},\n  [sym2]() {},\n};\n\no[sym1].name; // \"[foo]\"\no[sym2].name; // \"[]\"\n```\n\n### Private property\n\nPrivate fields and private methods have the hash (`#`) as part of their names.\n\n```js\nclass Foo {\n  #field = () => {};\n  #method() {}\n  getNames() {\n    console.log(this.#field.name);\n    console.log(this.#method.name);\n  }\n}\n\nnew Foo().getNames();\n// \"#field\"\n// \"#method\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Function/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.toString()\n\nThe **`toString()`** method returns a string representing the source code of the specified `Function`.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the source code of the function.\n\n## Description\n\nThe `Function` object overrides the `toString()` method\ninherited from `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For user-defined `Function`\nobjects, the `toString` method returns a string containing the source text\nsegment which was used to define the function.\n\nJavaScript calls the `toString` method automatically when a\n`Function` is to be represented as a text value, e.g. when a function is\nconcatenated with a string.\n\nThe `toString()` method will throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) exception\n(\"Function.prototype.toString called on incompatible object\"), if its\n`this` value object is not a `Function` object.\n\n```js example-bad\nFunction.prototype.toString.call('foo'); // throws TypeError\n```\n\nIf the `toString()` method is called on built-in function objects, a\nfunction created by [`Function.prototype.bind()`](../../../globals/Function/prototype/bind.mdx), or\nother non-JavaScript functions, then `toString()` returns a\n_native function string_ which looks like\n\n```js\n\"function someName() { [native code] }\"\n```\n\nFor intrinsic object methods and functions, `someName` is the initial name of the function; otherwise its content may be implementation-defined, but will always be in property name syntax, like `[1 + 1]`, `someName`, or `1`.\n\n> **Note:** This means using [`eval()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/eval) on native function strings is a guaranteed syntax error.\n\nIf the `toString()` method is called on a function created by the `Function` constructor, `toString()` returns the source code of a synthesized function declaration named \"anonymous\" using the provided parameters and function body. For example, `Function(\"a\", \"b\", \"return a + b\").toString()` will return:\n\n```js\n\"function anonymous(a,b\\n) {\\nreturn a + b\\n}\"\n```\n\nSince ES2018, the spec requires the return value of `toString()` to be the exact same source code as it was declared, including any whitespace and/or comments — or, if the host doesn't have the source code available for some reason, requires returning a native function string. Support for this revised behavior can be found in the [browser compatibility table](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/toString#browser_compatibility).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Headers/Headers.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers()\n\nThe **`Headers()`** constructor creates a new `Headers` object.\n\n## Syntax\n\n```js\nnew Headers()\nnew Headers(init)\n```\n\n### Parameters\n\n- `init` _**optional**_\n  - : An object containing any HTTP headers that you want to pre-populate your `Headers` object with. This can be a\n    simple object literal with `String` values, an array of name-value pairs, where each pair is a 2-element string array; or an existing\n    `Headers` object. In the last case, the new `Headers` object\n    copies its data from the existing `Headers` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Headers/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.append()\n\nThe **`append()`** method of the `Headers`\ninterface appends a new value onto an existing header inside a `Headers`\nobject, or adds the header if it does not already exist.\n\nThe difference between `Headers.prototype.set()` and `append()` is\nthat if the specified header already exists and accepts multiple values,\n`set()` will overwrite the existing value with the new one, whereas\n`append()` will append the new value onto the end of the set of values.\n\n## Syntax\n\n```js\nappend(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to add to the `Headers` object.\n- `value`\n  - : The value of the HTTP header you want to add.\n\n### Return value\n\nNone (`undefined`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Headers/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.delete()\n\nThe **`delete()`** method of the `Headers`\ninterface deletes a header from the current `Headers` object.\n\nThis method throws a `TypeError` for the following reasons:\n\n- The value of the name parameter is not the name of an HTTP header.\n\n## Syntax\n\n```js\ndelete(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to delete from the `Headers` object.\n\n### Return value\n\nNone (`undefined`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Headers/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.entries()\n\nThe **`Headers.entries()`** method returns an iterator allowing to go through all key/value pairs\ncontained in this object. The both the key and value of each pairs are `String` objects.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Headers/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.forEach()\n\nThe **`Headers.forEach()`** method executes a callback function once per each key/value pair in the `Headers` object.\n\n## Syntax\n\n```js\n// Arrow function\nforEach((value, key) => { /* … */ })\nforEach((value, key, object) => { /* … */ })\n\n// Inline callback function\nforEach(function (value, key) { /* … */ })\nforEach(function (value, key, object) { /* … */ })\nforEach(function (value, key) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n  - : Function to execute for each entry in the map. It takes the following arguments:\n    - `value`\n      - : Value of the currently visited header entry.\n    - `key`\n      - : Name of the currently visited header entry.\n    - `object`\n      - : The Headers object being iterated.\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `callback`.\n\n### Return value\n\n`undefined`.\n\n## Description\n\nThe `Headers.forEach()` method executes the provided callback once for each key of the Headers which actually exist. It is not invoked for keys which have been deleted. However, it is executed for keys which are present but have the value undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Headers/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.get()\n\nThe **`get()`** method of the [`Headers`](../../../globals/Headers/Headers.mdx) interface\nreturns a byte string of all the values of a header within a `Headers` object\nwith a given name. If the requested header doesn't exist in the `Headers`\nobject, it returns `null`.\n\n## Syntax\n\n```js\nget(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header whose values you want to retrieve from the\n    `Headers` object. If the given name is not the name of an HTTP header, this\n    method throws a `TypeError`. The name is case-insensitive.\n\n### Return value\n\nA [`String`](../../../globals/String/String.mdx) sequence representing the values of the retrieved header or\n`null` if this header is not set.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Headers/prototype/getSetCookie.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.getSetCookie()\n\nThe **`getSetCookie()`** method of the [`Headers`](../../../globals/Headers/Headers.mdx) interface\nreturns an array of all the values of the `Set-Cookie` headers, returning\nan empty list if none are present.\n\n## Syntax\n\n```js\ngetSetCookie()\n```\n\n### Return value\n\n`String[]` representing the list of `Set-Cookie` headers.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Headers/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.has()\n\nThe **`has()`** method of the `Headers` interface\nreturns a boolean stating whether a `Headers` object contains a certain\nheader.\n\n## Syntax\n\n```js\nhas(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to test for. If the given name is not a valid\n    HTTP header name, this method throws a `TypeError`.\n\n### Return value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Headers/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.keys()\n\nThe **`Headers.keys()`** method returns an iterator allowing to go through all keys contained\nin this object. The keys are `String` objects.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Headers/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.set()\n\nThe **`set()`** method of the `Headers` interface\nsets a new value for an existing header inside a `Headers` object, or adds\nthe header if it does not already exist.\n\nThe difference between `set()` and `Headers.append` is that if\nthe specified header already exists and accepts multiple values, `set()`\noverwrites the existing value with the new one, whereas `Headers.append`\nappends the new value to the end of the set of values.\n\n## Syntax\n\n```js\nset(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to set to a new value. If the given name is not\n    the name of an HTTP header, this method throws a `TypeError`.\n- `value`\n  - : The new value you want to set.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Headers/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.values()\n\nThe **`Headers.values()`** method returns an iterator allowing to go through all values contained\nin this object. The values are `String` objects.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/HmacImportParams/HmacImportParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# HmacImportParams\n\nThe **`HmacImportParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.importKey`, when generating a key for the `HMAC` algorithm.\n\n## Instance properties\n\n- `name`\n  - : A string. This should be set to `HMAC`.\n- `hash`\n\n  - : A string representing the name of the digest function to use. The can take a value of `SHA-1`, `SHA-256`, `SHA-384`, or `SHA-512`.\n\n- `length` _optional_\n  - : A `Number` representing the length in bits of the key. If this is omitted the length of the key is equal to the length of the digest generated by the digest function you have chosen. Unless you have a good reason to use a different length, omit this property and use the default.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Infinity.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Infinity\n\nThe global property **`Infinity`** is a numeric value representing infinity.\n\n## Value\n\nThe same number value as `Number.POSITIVE_INFINITY`.\n\n## Description\n\n`Infinity` is a property of the _global object_. In other words, it is a variable in global scope.\n\nThe value `Infinity` (positive infinity) is greater than any other number.\n\nThis value behaves slightly differently than mathematical infinity; see `Number.POSITIVE_INFINITY` for details.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Int16Array/Int16Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Int16Array()\n\nThe **`Int16Array()`** typed array constructor creates an array\nof twos-complement 16-bit signed integers in the platform byte order. If control over\nbyte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are initialized\nto `0`. Once established, you can reference elements in the array using the\nobject's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Int16Array()\nnew Int16Array(length)\nnew Int16Array(typedArray)\nnew Int16Array(object)\n\nnew Int16Array(buffer)\nnew Int16Array(buffer, byteOffset)\nnew Int16Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Int16Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Int32Array/Int32Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Int32Array()\n\nThe **`Int32Array()`** typed array constructor creates an array\nof twos-complement 32-bit signed integers in the platform byte order. If control over\nbyte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are initialized\nto `0`. Once established, you can reference elements in the array using the\nobject's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Int32Array()\nnew Int32Array(length)\nnew Int32Array(typedArray)\nnew Int32Array(object)\n\nnew Int32Array(buffer)\nnew Int32Array(buffer, byteOffset)\nnew Int32Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Int32Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Int8Array/Int8Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Int8Array()\n\nThe **`Int8Array()`** constructor creates a typed array of\ntwos-complement 8-bit signed integers. The contents are initialized to `0`.\nOnce established, you can reference elements in the array using the object's methods, or\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew Int8Array()\nnew Int8Array(length)\nnew Int8Array(typedArray)\nnew Int8Array(object)\n\nnew Int8Array(buffer)\nnew Int8Array(buffer, byteOffset)\nnew Int8Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Int8Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/JSON/parse.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# JSON.parse()\n\nThe **`JSON.parse()`** method parses a JSON string, constructing the JavaScript value or object described by the string. An optional _reviver_ function can be provided to perform a transformation on the resulting object before it is returned.\n\n## Syntax\n\n```js\nJSON.parse(text)\nJSON.parse(text, reviver)\n```\n\n### Parameters\n\n- `text`\n  - : The string to parse as JSON.\n- `reviver` _**optional**_\n  - : If a function, this prescribes how each value originally produced by parsing is transformed before being returned. Non-callable values are ignored. The function is called with the following arguments:\n    - `key`\n      - : The key associated with the value.\n    - `value`\n      - : The value produced by parsing.\n\n### Return value\n\nThe `Object`, `Array`, string, number, boolean, or `null` value corresponding to the given JSON `text`.\n\n### Exceptions\n\n- [`SyntaxError`](../../globals/SyntaxError/SyntaxError.mdx)\n  - : Thrown if the string to parse is not valid JSON.\n\n## Description\n\n`JSON.parse()` parses a JSON string according to the [JSON grammar](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/JSON#full_json_grammar), then evaluates the string as if it's a JavaScript expression. The only instance where a piece of JSON text represents a different value from the same JavaScript expression is when dealing with the `\"__proto__\"` key — see [Object literal syntax vs. JSON](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Object_initializer#object_literal_syntax_vs._json).\n\n### The reviver parameter\n\nIf a `reviver` is specified, the value computed by parsing is _transformed_ before being returned. Specifically, the computed value and all its properties (in a [depth-first](https://en.wikipedia.org/wiki/Depth-first_search) fashion, beginning with the most nested properties and proceeding to the original value itself) are individually run through the `reviver`.\n\nThe `reviver` is called with the object containing the property being processed as `this`, and two arguments: `key` and `value`, representing the property name as a string (even for arrays) and the property value. If the `reviver` function returns [`undefined`](../../globals/undefined.mdx) (or returns no value — for example, if execution falls off the end of the function), the property is deleted from the object. Otherwise, the property is redefined to be the return value. If the `reviver` only transforms some values and not others, be certain to return all untransformed values as-is — otherwise, they will be deleted from the resulting object.\n\nSimilar to the `replacer` parameter of [`JSON.stringify()`](../../globals/JSON/stringify.mdx), `reviver` will be last called on the root object with an empty string as the `key` and the root object as the `value`. For JSON text parsing to primitive values, `reviver` will be called once.\n\nNote that `reviver` is run after the value is parsed. So, for example, numbers in JSON text will have already been converted to JavaScript numbers, and may lose precision in the process. To transfer large numbers without loss of precision, serialize them as strings, and revive them to [BigInts](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/BigInt), or other appropriate arbitrary precision formats.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/JSON/stringify.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# JSON.stringify()\n\nThe **`JSON.stringify()`** method converts a JavaScript value to a JSON string, optionally replacing values if a replacer function is specified or optionally including only the specified properties if a replacer array is specified.\n\n## Syntax\n\n```js\nJSON.stringify(value)\nJSON.stringify(value, replacer)\nJSON.stringify(value, replacer, space)\n```\n\n### Parameters\n\n- `value`\n  - : The value to convert to a JSON string.\n- `replacer` _**optional**_\n  - : A function that alters the behavior of the stringification process, or an array of strings or numbers naming properties of `value` that should be included in the output. If `replacer` is an array, all elements that are not strings or numbers (can be either primitives or wrapper objects), including `Symbol` values, are completely ignored. If `replacer` is anything other than a function or an array (e.g. [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or not provided), all properties of the object are included in the resulting JSON string.\n- `space` _**optional**_\n\n  - : A string or number that's used to insert white space (including indentation, line break characters, etc.) into the output JSON string for readability purposes.\n\n    If this is a number, it indicates the number of space characters to be used as indentation, clamped to 10 (that is, any number greater than `10` is treated as if it were `10`). Values less than 1 indicate that no space should be used.\n\n    If this is a string, the string (or the first 10 characters of the string, if it's longer than that) is inserted before every nested object or array.\n\n    If `space` is anything other than a string or number (can be either a primitive or a wrapper object) — for example, is [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or not provided — no white space is used.\n\n### Return value\n\nA JSON string representing the given value, or undefined.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if one of the following is true:\n    - `value` contains a circular reference.\n    - A `BigInt` value is encountered.\n\n## Description\n\n`JSON.stringify()` converts a value to JSON notation representing it:\n\n- `Boolean`, `Number`, `String`, and `BigInt` (obtainable via [`Object()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/Object)) objects are converted to the corresponding primitive values during stringification, in accordance with the traditional conversion semantics. `Symbol` objects (obtainable via [`Object()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/Object)) are treated as plain objects.\n- Attempting to serialize `BigInt` values will throw. However, if the BigInt has a `toJSON()` method (through monkeypatching: `BigInt.prototype.toJSON = ...`), that method can provide the serialization result. This constraint ensures that a proper serialization (and, very likely, its accompanying deserialization) behavior is always explicitly provided by the user.\n- [`undefined`](../../globals/undefined.mdx), `Function`, and `Symbol` values are not valid JSON values. If any such values are encountered during conversion, they are either omitted (when found in an object) or changed to [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) (when found in an array). `JSON.stringify()` can return `undefined` when passing in \"pure\" values like `JSON.stringify(() => {})` or `JSON.stringify(undefined)`.\n- The numbers [`Infinity`](../../globals/Infinity.mdx) and [`NaN`](../../globals/NaN.mdx), as well as the value [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null), are all considered `null`. (But unlike the values in the previous point, they would never be omitted.)\n- Arrays are serialized as arrays (enclosed by square brackets). Only array indices between 0 and `length - 1` (inclusive) are serialized; other properties are ignored.\n- For other objects:\n\n  - All `Symbol`-keyed properties will be completely ignored, even when using the [`replacer`](#the-replacer-parameter) parameter.\n\n  - If the value has a `toJSON()` method, it's responsible to define what data will be serialized. Instead of the object being serialized, the value returned by the `toJSON()` method when called will be serialized. `JSON.stringify()` calls `toJSON` with one parameter, the `key`, which has the same semantic as the `key` parameter of the [`replacer`](#the-replacer-parameter) function:\n\n    - if this object is a property value, the property name\n    - if it is in an array, the index in the array, as a string\n    - if `JSON.stringify()` was directly called on this object, an empty string\n\n    `Date` objects implement the [`toJSON()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toJSON) method which returns a string (the same as [`date.toISOString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)). Thus, they will be stringified as strings.\n\n  - Only [enumerable own properties](https://developer.mozilla.org/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) are visited. This means [Map](../../globals/Map/Map.mdx), [Set](../../globals/Set/Set.mdx), etc. will become `\"{}\"`. You can use the [`replacer`](#the-replacer-parameter) parameter to serialize them to something more useful.\n\n    Properties are visited using the same algorithm as [`Object.keys()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/keys), which has a well-defined order and is stable across implementations. For example, `JSON.stringify` on the same object will always produce the same string, and `JSON.parse(JSON.stringify(obj))` would produce an object with the same key ordering as the original (assuming the object is completely JSON-serializable).\n\n### The replacer parameter\n\nThe `replacer` parameter can be either a function or an array.\n\nAs an array, its elements indicate the names of the properties in the object that should be included in the resulting JSON string. Only string and number values are taken into account; symbol keys are ignored.\n\nAs a function, it takes two parameters: the `key` and the `value` being stringified. The object in which the key was found is provided as the `replacer`'s `this` context.\n\nThe `replacer` function is called for the initial object being stringified as well, in which case the `key` is an empty string (`\"\"`). It is then called for each property on the object or array being stringified. Array indices will be provided in its string form as `key`. The current property value will be replaced with the `replacer`'s return value for stringification. This means:\n\n- If you return a number, string, boolean, or `null`, that value is directly serialized and used as the property's value. (Returning a BigInt will throw as well.)\n- If you return a `Function`, `Symbol`, or [`undefined`](../../globals/undefined.mdx), the property is not included in the output.\n- If you return any other object, the object is recursively stringified, calling the `replacer` function on each property.\n\n> **Note:** When parsing JSON generated with `replacer` functions, you would likely want to use the [`reviver`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#using_the_reviver_parameter) parameter to perform the reverse operation.\n\nTypically, array elements' index would never shift (even when the element is an invalid value like a function, it will become `null` instead of omitted). Using the `replacer` function allows you to control the order of the array elements by returning a different array.\n\n### The space parameter\n\nThe `space` parameter may be used to control spacing in the final string.\n\n- If it is a number, successive levels in the stringification will each be indented by this many space characters.\n- If it is a string, successive levels will be indented by this string.\n\nEach level of indentation will never be longer than 10. Number values of `space` are clamped to 10, and string values are truncated to 10 characters.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Map/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get Map\\[Symbol.species]\n\nThe **`Map[Symbol.species]`** accessor property is an unused accessor property specifying how to copy `Map` objects.\n\n## Syntax\n\n```js\nMap[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct copied `Map` instances.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `Map` objects. Subclass constructors may override it to change the constructor assignment.\n\n> **Note:** This property is currently unused by all `Map` methods.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Map/Map.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map()\n\nThe **`Map()` constructor** creates [Map](../../globals/Map/Map.mdx) objects.\n\n## Syntax\n\n```js\nnew Map()\nnew Map(iterable)\n```\n\n> **Note:** `Map()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable` _**optional**_\n  - : An `Array` or other\n    [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) object\n    whose elements are key-value pairs. (For example, arrays with two elements,\n    such as `[[ 1, 'one' ],[ 2, 'two' ]]`.) Each key-value pair is added to the\n    new `Map`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Map/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype\\[Symbol.iterator]()\n\nThe **`Symbol.iterator`** method of a `Map` object implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows maps to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the key-value pairs of the map.\n\nThe initial value of this property is the same function object as the initial value of the [`Map.prototype.entries`](../../../globals/Map/prototype/entries.mdx) property.\n\n## Syntax\n\n```js\nmap[Symbol.iterator]()\n```\n\n### Return value\n\nThe same return value as [`Map.prototype.entries()`](../../../globals/Map/prototype/entries.mdx): a new iterable iterator object that yields the key-value pairs of the map.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Map/prototype/clear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.clear()\n\nThe **`clear()`** method removes all elements from a `Map` object.\n\n## Syntax\n\n```js\nclear()\n```\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Map/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.delete()\n\nThe **`delete()`** method removes the specified element from a `Map` object by\nkey.\n\n## Syntax\n\n```js\ndelete(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to remove from the `Map` object.\n\n### Return value\n\n`true` if an element in the `Map` object existed and has been removed, or\n`false` if the element does not exist.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Map/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.entries()\n\nThe **`entries()`** method returns a new\n_[iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators)_ object\nthat contains the `[key, value]` pairs for each element in the `Map` object in\ninsertion order. In this particular case, this iterator object is also an\niterable, so the for-of loop can be used. When the protocol `[Symbol.iterator]`\nis used, it returns a function that, when invoked, returns this iterator itself.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nA new [Map](../../../globals/Map/Map.mdx) iterator object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Map/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.forEach()\n\nThe **`forEach()`** method executes a provided function once per each key/value\npair in the `Map` object, in insertion order.\n\n## Syntax\n\n```js\n// Arrow function\nforEach(() => { /* … */ } )\nforEach((value) => { /* … */ } )\nforEach((value, key) => { /* … */ } )\nforEach((value, key, map) => { /* … */ } )\n\n// Callback function\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n\n// Inline callback function\nforEach(function() { /* … */ })\nforEach(function(value) { /* … */ })\nforEach(function(value, key) { /* … */ })\nforEach(function(value, key, map) { /* … */ })\nforEach(function(value, key, map) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n  - : Function to execute for each entry in the map. It takes the following\n    arguments:\n    - `value` _**optional**_\n      - : Value of each iteration.\n    - `key` _**optional**_\n      - : Key of each iteration.\n    - `map` _**optional**_\n      - : The map being iterated.\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `callback`.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n## Description\n\nThe `forEach` method executes the provided `callback` once for each key of the\nmap which actually exist. It is not invoked for keys which have been deleted.\nHowever, it is executed for values which are present but have the value\n`undefined`.\n\n`callback` is invoked with **three arguments**:\n\n- the entry's `value`\n- the entry's `key`\n- the **`Map` object** being traversed\n\nIf a `thisArg` parameter is provided to `forEach`, it will be passed to\n`callback` when invoked, for use as its `this` value. Otherwise, the value\n`undefined` will be passed for use as its `this` value. The `this` value\nultimately observable by `callback` is determined according to\n[the usual rules for determining the `this` seen by a function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this).\n\nEach value is visited once, except in the case when it was deleted and re-added\nbefore `forEach` has finished. `callback` is not invoked for values deleted\nbefore being visited. New values added before `forEach` has finished will be\nvisited.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Map/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.get()\n\nThe **`get()`** method returns a specified element from a `Map` object. If the\nvalue that is associated to the provided key is an object, then you will get a\nreference to that object and any change made to that object will effectively\nmodify it inside the `Map` object.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to return from the `Map` object.\n\n### Return value\n\nThe element associated with the specified key, or\n[`undefined`](../../../globals/undefined.mdx) if the key can't be found in the `Map` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Map/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.has()\n\nThe **`has()`** method returns a boolean indicating whether an element with the\nspecified key exists or not.\n\n## Syntax\n\n```js\nhas(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to test for presence in the `Map` object.\n\n### Return value\n\n`true` if an element with the specified key exists in the `Map` object;\notherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Map/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.keys()\n\nThe **`keys()`** method returns a new\n_[iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators)_ object\nthat contains the keys for each element in the `Map` object in insertion order. In this particular case, this iterator object is also an iterable, so a [for...of](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loop can be used.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nA new [Map](../../../globals/Map/Map.mdx) iterator object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Map/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.set()\n\nThe **`set()`** method adds or updates an entry in a `Map` object with a specified key and a value.\n\n## Syntax\n\n```js\nset(key, value)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to add to the `Map` object. The key may be any [JavaScript type](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures) (any [primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_values) or any type of [JavaScript object](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#objects)).\n- `value`\n  - : The value of the element to add to the `Map` object. The value may be any [JavaScript type](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures) (any [primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_values) or any type of [JavaScript object](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#objects)).\n\n### Return value\n\nThe `Map` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Map/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.size\n\nThe **`size`** accessor property returns the number of elements in a\n[Map](../../../globals/Map/Map.mdx) object.\n\n## Description\n\nThe value of `size` is an integer representing how many entries the `Map` object\nhas. A set accessor function for `size` is `undefined`; you can not change this\nproperty.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Map/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.values()\n\nThe **`values()`** method returns a new\n_[iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators)_ object\nthat contains the values for each element in the `Map` object in insertion\norder.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nA new [Map](../../../globals/Map/Map.mdx) iterator object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/E.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.E\n\nThe **`Math.E`** property represents Euler's number, the base of natural logarithms, e, which is approximately 2.718.\n\n## Value\n\n`2.718281828459045`\n\n## Description\n\nBecause `E` is a static property of `Math`, you always use it as `Math.E`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/LN10.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LN10\n\nThe **`Math.LN10`** property represents the natural logarithm of 10, approximately 2.302.\n\n## Value\n\n`2.302585092994046`\n\n## Description\n\nBecause `LN10` is a static property of `Math`, you always use it as `Math.LN10`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/LN2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LN2\n\nThe **`Math.LN2`** property represents the natural logarithm of 2, approximately 0.693:\n\n## Value\n\n`0.6931471805599453`\n\n## Description\n\nBecause `LN2` is a static property of `Math`, you always use it as `Math.LN2`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/LOG10e.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LOG10E\n\nThe **`Math.LOG10E`** property represents the base 10 logarithm of [E](./E.mdx), approximately 0.434.\n\n## Value\n\n`0.4342944819032518`\n\n## Description\n\nBecause `LOG10E` is a static property of `Math`, you always use it as `Math.LOG10E`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/LOG2e.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LOG2E\n\nThe **`Math.LOG2E`** property represents the base 2 logarithm of [E](./E.mdx), approximately 1.442.\n\n## Value\n\n`1.4426950408889634`\n\n## Description\n\nBecause `LOG2E` is a static property of `Math`, you always use it as `Math.LOG2E`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/PI.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.PI\n\nThe **`Math.PI`** property represents the ratio of the circumference of a circle to its diameter, approximately 3.14159.\n\n## Value\n\n`3.141592653589793`\n\n## Description\n\nBecause `PI` is a static property of `Math`, you always use it as `Math.PI`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/SQRT1_2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.SQRT1_2\n\nThe **`Math.SQRT1_2`** property represents the square root of 1/2, which is approximately 0.707.\n\n## Value\n\n`0.7071067811865476`\n\n## Description\n\n`Math.SQRT1_2` is a constant and a more performant equivalent to [`Math.sqrt(0.5)`](./sqrt.mdx).\n\nBecause `SQRT1_2` is a static property of `Math`, you always use it as `Math.SQRT1_2`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/SQRT2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.SQRT2\n\nThe **`Math.SQRT2`** property represents the square root of 2, approximately 1.414.\n\n## Value\n\n`0.7071067811865476`\n\n## Description\n\n`Math.SQRT2` is a constant and a more performant equivalent to [`Math.sqrt(2)`](./sqrt.mdx).\n\nBecause `SQRT2` is a static property of `Math`, you always use it as `Math.SQRT2`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/abs.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.abs()\n\nThe **`Math.abs()`** function returns the absolute value of a number.\n\n\n## Syntax\n\n```js\nMath.abs(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe absolute value of `x`. If `x` is negative (including `-0`), returns `-x`. Otherwise, returns `x`. The result is therefore always a positive number or `0`.\n\n## Description\n\nBecause `abs()` is a static method of `Math`, you always use it as `Math.abs()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/acos.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.acos()\n\nThe **`Math.acos()`** function returns the inverse cosine (in radians) of a number.\n\n## Syntax\n\n```js\nMath.acos(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number between -1 and 1, inclusive, representing the angle's cosine value.\n\n### Return value\n\nThe inverse cosine (angle in radians between 0 and π, inclusive) of `x`. If `x` is less than -1 or greater than 1, returns `NaN`.\n\n## Description\n\nBecause `acos()` is a static method of `Math`, you always use it as `Math.acos()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/acosh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.acosh()\n\nThe **`Math.acosh()`** function returns the inverse hyperbolic cosine of a number.\n\n## Syntax\n\n```js\nMath.acosh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 1.\n\n### Return value\n\nThe inverse hyperbolic cosine of `x`. If `x` is less than 1, returns `NaN`.\n\n## Description\n\nBecause `acosh()` is a static method of `Math`, you always use it as `Math.acosh()`, rather than as a method of a `Math` object you created (`Math` is no constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/asin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.asin()\n\nThe **`Math.asin()`** function returns the inverse sine (in radians) of a number.\n\n## Syntax\n\n```js\nMath.asin(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number between -1 and 1, inclusive, representing the angle's sine value.\n\n### Return value\n\nThe inverse sine (angle in radians between <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math>, inclusive) of `x`. If `x` is less than -1 or greater than 1, returns `NaN`.\n\n## Description\n\nBecause `asin()` is a static method of `Math`, you always use it as `Math.asin()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/asinh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.asinh()\n\nThe **`Math.asinh()`** function returns the inverse hyperbolic sine of a number. \n\n## Syntax\n\n```js\nMath.asinh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe inverse hyperbolic sine of `x`.\n\n## Description\n\nBecause `asinh()` is a static method of `Math`, you always use it as `Math.asinh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/atan.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.atan()\n\nThe **`Math.atan()`** function returns the inverse tangent (in radians) of a number.\n\n## Syntax\n\n```js\nMath.atan(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe inverse tangent (angle in radians between <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math> and <math><semantics><mfrac><mi>π</mi><mn>2</mn></mfrac></semantics></math>, inclusive) of `x`. If `x` is `Infinity`, it returns <math><semantics><mfrac><mi>π</mi><mn>2</mn></mfrac></semantics></math>. If `x` is `-Infinity`, it returns <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math>.\n\n## Description\n\nBecause `atan()` is a static method of `Math`, you always use it as `Math.atan()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/atan2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.atan2()\n\nThe **`Math.atan2()`** function returns the angle in the plane (in radians) between the positive x-axis and the ray from (0, 0) to the point (x, y), for `Math.atan2(y, x)`.\n\n## Syntax\n\n```js\nMath.atan2(y, x)\n```\n\n### Parameters\n\n- `y`\n  - : The y coordinate of the point.\n- `x`\n  - : The x coordinate of the point.\n\n### Return value\n\nThe angle in radians (between -π and π, inclusive) between the positive x-axis and the ray from (0, 0) to the point (x, y).\n\n## Description\n\nThe `Math.atan2()` method measures the counterclockwise angle θ, in radians, between the positive x-axis and the point `(x, y)`. Note that the arguments to this function pass the y-coordinate first and the x-coordinate second.\n\n`Math.atan2()` is passed separate `x` and `y` arguments, while [`Math.atan()`](./atan.mdx) is passed the ratio of those two arguments. `Math.atan2(y, x)` differs from `Math.atan(y / x)` in the following cases:\n\n| `x`                  | `y`         | `Math.atan2(y, x)` | `Math.atan(y / x)` |\n| -------------------- | ----------- | ------------------ | ------------------ |\n| `Infinity`           | `Infinity`  | π / 4              | `NaN`              |\n| `Infinity`           | `-Infinity` | -π / 4             | `NaN`              |\n| `-Infinity`          | `Infinity`  | 3π / 4             | `NaN`              |\n| `-Infinity`          | `-Infinity` | -3π / 4            | `NaN`              |\n| 0                    | 0           | 0                  | `NaN`              |\n| 0                    | -0          | -0                 | `NaN`              |\n| < 0 (including `-0`) | 0           | π                  | 0                  |\n| < 0 (including `-0`) | -0          | -π                 | 0                  |\n| `-Infinity`          | > 0         | π                  | -0                 |\n| -0                   | > 0         | π / 2              | -π / 2             |\n| `-Infinity`          | < 0         | -π                 | 0                  |\n| -0                   | < 0         | -π / 2             | π / 2              |\n\nIn addition, for points in the second and third quadrants (`x < 0`), `Math.atan2()` would output an angle less than <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math> or greater than <math><semantics><mfrac><mi>π</mi><mn>2</mn></mfrac></semantics></math>.\n\nBecause `atan2()` is a static method of `Math`, you always use it as `Math.atan2()`, rather than as a method of a `Math` object you created (`Math` is not a constructor)."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/atanh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.atanh()\n\nThe **`Math.atanh()`** function returns the inverse hyperbolic tangent of a number. \n\n## Syntax\n\n```js\nMath.atanh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number between -1 and 1, inclusive.\n\n### Return value\n\nThe inverse hyperbolic tangent of `x`. If `x` is 1, returns `Infinity`. If `x` is -1, returns `-Infinity`. If `x` is less than -1 or greater than 1, returns `NaN`.\n\n## Description\n\nBecause `atanh()` is a static method of `Math`, you always use it as `Math.atanh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/cbrt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.cbrt()\n\nThe **`Math.cbrt()`** function returns the cube root of a number.\n\n## Syntax\n\n```js\nMath.cbrt(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe cube root of `x`.\n\n## Description\n\nBecause `cbrt()` is a static method of `Math`, you always use it as `Math.cbrt()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/ceil.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.ceil()\n\nThe **`Math.ceil()`** function always rounds up and returns the smaller integer greater than or equal to a given number.\n\n## Syntax\n\n```js\nMath.ceil(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe smallest integer greater than or equal to `x`. It's the same value as [`-Math.floor(-x)`](./floor.mdx).\n\n## Description\n\nBecause `ceil()` is a static method of `Math`, you always use it as `Math.ceil()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/clz32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.clz32()\n\nThe **`Math.clz32()`** function returns the number of leading zero bits in the 32-bit binary representation of a number.\n\n## Syntax\n\n```js\nMath.clz32(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe number of leading zero bits in the 32-bit binary representation of `x`.\n\n## Description\n\n`clz32` is short for **C**ount**L**eading**Z**eros**32**.\n\nIf `x` is not a number, it will be converted to a number first, then converted to a 32-bit unsigned integer.\n\nIf the converted 32-bit unsigned integer is `0`, `32` is returned, because all bits are `0`. If the most significant bit is `1` (i.e. the number is greater than or equal to 2<sup>31</sup>), `0` is returned.\n\nThis function is particularly useful for systems that compile to JS, like [Emscripten](https://emscripten.org).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/cos.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.cos()\n\nThe **`Math.cos()`** function returns the cosine of a number in radians.\n\n## Syntax\n\n```js\nMath.cos(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number representing an angle in radians.\n\n### Return value\n\nThe cosine of `x`, between -1 and 1, inclusive. If `x` is `Infinity`, `-Infinity`, or `NaN`, returns `NaN`.\n\n## Description\n\nBecause `cos()` is a static method of `Math`, you always use it as `Math.cos()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/cosh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.cosh()\n\nThe **`Math.cosh()`** function returns the hyperbolic cosine of a number. \n\n## Syntax\n\n```js\nMath.cosh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe hyperbolic cosine of `x`.\n\n## Description\n\nBecause `cosh()` is a static method of `Math`, you always use it as `Math.cosh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor)."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/exp.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.exp()\n\nThe **`Math.exp()`** function returns [E](./E.mdx) raised to the power of a number.\n\n## Syntax\n\n```js\nMath.exp(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nA nonnegative number representing e<sup>x</sup>, where e is [the base of the natural logarithm](./E.mdx).\n\n## Description\n\nBecause `exp()` is a static method of `Math`, you always use it as `Math.exp()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nBeware that `e` to the power of a number very close to 0 will be very close to 1 and suffer from loss of precision. In this case, you may want to use `Math.expm1` instead, and obtain a much higher-precision fractional part of the answer.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/expm1.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.expm1()\n\nThe **`Math.expm1()`** function returns [E](./E.mdx) raised to the power of a number, subtracted by 1.\n\n## Syntax\n\n```js\nMath.expm1(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nA number representing e<sup>x</sup> - 1, where e is [the base of the natural logarithm](./E.mdx).\n\n## Description\n\nFor very small values of _x_, adding 1 can reduce or eliminate precision. The double floats used in JS give you about 15 digits of precision. 1 + 1e-15 \\= 1.000000000000001, but 1 + 1e-16 = 1.000000000000000 and therefore exactly 1.0 in that arithmetic, because digits past 15 are rounded off.\n\nWhen you calculate <math display=\"inline\"><semantics><msup><mi mathvariant=\"normal\">e</mi><mi>x</mi></msup></semantics></math> where x is a number very close to 0, you should get an answer very close to 1 + x, because <math display=\"inline\"><semantics><mrow><munder><mo lspace=\"0em\" rspace=\"0em\">lim</mo><mrow><mi>x</mi><mo stretchy=\"false\">→</mo><mn>0</mn></mrow></munder><mfrac><mrow><msup><mi mathvariant=\"normal\">e</mi><mi>x</mi></msup><mo>−</mo><mn>1</mn></mrow><mi>x</mi></mfrac><mo>=</mo><mn>1</mn></mrow></semantics></math>. If you calculate `Math.exp(1.1111111111e-15) - 1`, you should get an answer close to `1.1111111111e-15`. Instead, due to the highest significant figure in the result of `Math.exp` being the units digit `1`, the final value ends up being `1.1102230246251565e-15`, with only 3 correct digits. If, instead, you calculate `Math.exp1m(1.1111111111e-15)`, you will get a much more accurate answer `1.1111111111000007e-15`, with 11 correct digits of precision.\n\nBecause `expm1()` is a static method of `Math`, you always use it as `Math.expm1()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/floor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.floor()\n\nThe **`Math.floor()`** function always rounds down and returns the largest integer less than or equal to a given number.\n\n## Syntax\n\n```js\nMath.floor(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe largest integer smaller than or equal to `x`. It's the same value as [`-Math.ceil(-x)`](./ceil.mdx).\n\n## Description\n\nBecause `floor()` is a static method of `Math`, you always use it as `Math.floor()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/fround.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.fround()\n\nThe **`Math.fround()`** function returns the nearest [32-bit single precision](https://en.wikipedia.org/wiki/Single-precision_floating-point_format) float representation of a number.\n\n## Syntax\n\n```js\nMath.fround(doubleFloat)\n```\n\n### Parameters\n\n- `doubleFloat`\n  - : A number.\n\n### Return value\n\nThe nearest [32-bit single precision](https://en.wikipedia.org/wiki/Single-precision_floating-point_format) float representation of `x`.\n\n## Description\n\nJavaScript uses 64-bit double floating-point numbers internally, which offer a very high precision. However, sometimes you may be working with 32-bit floating-point numbers, for example if you are reading values from a `Float32Array`. This can create confusion: checking a 64-bit float and a 32-bit float for equality may fail even though the numbers are seemingly identical.\n\nTo solve this, `Math.fround()` can be used to cast the 64-bit float to a 32-bit float. Internally, JavaScript continues to treat the number as a 64-bit float, it just performs a \"round to even\" on the 23rd bit of the mantissa, and sets all following mantissa bits to `0`. If the number is outside the range of a 32-bit float, `Infinity` or `-Infinity` is returned.\n\nBecause `fround()` is a static method of `Math`, you always use it as `Math.fround()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/hypot.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.hypot()\n\nThe **`Math.hypot()`** function returns the square root of the sum of squares of its arguments. \n\n## Syntax\n\n```js\nMath.hypot()\nMath.hypot(value0)\nMath.hypot(value0, value1)\nMath.hypot(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `value1`, …, `valueN`\n  - : Numbers.\n\n### Return value\n\nThe square root of the sum of squares of the given arguments. Returns Infinity if any of the arguments is ±Infinity. Otherwise, if at least one of the arguments is or is converted to NaN, returns NaN. Returns `0` if no arguments are given or all arguments are ±0.\n\n## Description\n\nCalculating the hypotenuse of a right triangle, or the magnitude of a complex number, uses the formula `Math.sqrt(v1*v1 + v2*v2)`, where v1 and v2 are the lengths of the triangle's legs, or the complex number's real and complex components. The corresponding distance in 2 or more dimensions can be calculated by adding more squares under the square root: `Math.sqrt(v1*v1 + v2*v2 + v3*v3 + v4*v4)`.\n\nThis function makes this calculation easier and faster; you call `Math.hypot(v1, v2)`, or `Math.hypot(v1, /* … ,*/, vN)`.\n\n`Math.hypot` also avoids overflow/underflow problems if the magnitude of your numbers is very large. The largest number you can represent in JS is [`Number.MAX_VALUE`](../Number/MAX_VALUE.mdx), which is around 10<sup>308</sup>. If your numbers are larger than about 10<sup>154</sup>, taking the square of them will result in Infinity. For example, `Math.sqrt(1e200*1e200 + 1e200*1e200) = Infinity`. If you use `hypot()` instead, you get a better answer: `Math.hypot(1e200, 1e200) = 1.4142...e+200` . This is also true with very small numbers. `Math.sqrt(1e-200*1e-200 + 1e-200*1e-200) = 0`, but `Math.hypot(1e-200, 1e-200) = 1.4142...e-200`.\n\nWith one argument, `Math.hypot()` is equivalent to [`Math.abs()`](./abs.mdx). [`Math.hypot.length`](../Function/prototype/length.mdx) is 2, which weakly signals that it's designed to handle at least two parameters.\n\nBecause `hypot()` is a static method of `Math`, you always use it as `Math.hypot()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/imul.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.imul()\n\nThe **`Math.imul()`** function returns the result of the C-like 32-bit multiplication of the two parameters.\n\n\n## Syntax\n\n```js\nMath.imul(a, b)\n```\n\n### Parameters\n\n- `a`\n  - : First number.\n- `b`\n  - : Second number.\n\n### Return value\n\nThe result of the C-like 32-bit multiplication of the given arguments.\n\n## Description\n\n`Math.imul()` allows for 32-bit integer multiplication with C-like semantics. This feature is useful for projects like [Emscripten](https://en.wikipedia.org/wiki/Emscripten).\n\nBecause `imul()` is a static method of `Math`, you always use it as `Math.imul()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nIf you use normal JavaScript floating point numbers in `imul()`, you will experience a degrade in performance. This is because of the costly conversion from a floating point to an integer for multiplication, and then converting the multiplied integer back into a floating point.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/log.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log()\n\nThe **`Math.log()`** function returns the natural logarithm (base [E](./E.mdx)) of a number.\n\n## Syntax\n\n```js\nMath.log(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe natural logarithm (base [E](./E.mdx)) of `x`. If `x` is ±0, returns [`-Infinity`](../Number/NEGATIVE_INFINITY.mdx). If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `log()` is a static method of `Math`, you always use it as `Math.log()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nIf you need the natural log of 2 or 10, use the constants `Math.LN2` or `Math.LN10`. If you need a logarithm to base 2 or 10, use `Math.log2()` or `Math.log10()`. If you need a logarithm to other bases, use `Math.log(x) / Math.log(otherBase)` as in the example below; you might want to precalculate `1 / Math.log(otherBase)` since multiplication in `Math.log(x) * constant` is much faster.\n\nBeware that positive numbers very close to 1 can suffer from loss of precision and make its natural logarithm less accurate. In this case, you may want to use `Math.log1p` instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/log10.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log10()\n\nThe **`Math.log10()`** function returns the base 10 logarithm of a number. \n\n## Syntax\n\n```js\nMath.log10(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe base 10 logarithm of `x`. If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `log10()` is a static method of `Math`, you always use it as `Math.log10()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nThis function is the equivalent of `Math.log(x) / Math.log(10)`. For `log10(e)`, use the constant `Math.LOG10E`, which is 1 / `Math.LN10`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/log1p.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log1p()\n\nThe **`Math.log1p()`** function returns the natural logarithm (base [E](./E.mdx)) of `1 + x`, where `x` is the argument.\n\n## Syntax\n\n```js\nMath.log1p(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to -1.\n\n### Return value\n\nThe natural logarithm (base [E](./E.mdx)) of `x + 1`. If `x` is -1, returns [`-Infinity`](../Number/NEGATIVE_INFINITY.mdx). If `x < -1`, returns `NaN`.\n\n## Description\n\nFor very small values of _x_, adding 1 can reduce or eliminate precision. The double floats used in JS give you about 15 digits of precision. 1 + 1e-15 \\= 1.000000000000001, but 1 + 1e-16 = 1.000000000000000 and therefore exactly 1.0 in that arithmetic, because digits past 15 are rounded off.\n\nWhen you calculate log(1 + _x_) where _x_ is a small positive number, you should get an answer very close to _x_, because <math display=\"inline\"><semantics><mrow><munder><mo movablelimits=\"true\" form=\"prefix\">lim</mo><mrow ><mi>x</mi><mo stretchy=\"false\">→</mo><mn>0</mn></mrow></munder><mfrac><mrow><mi>log</mi><mo>⁡</mo><mo stretchy=\"false\">(</mo><mn>1</mn><mo>+</mo><mi>x</mi><mo stretchy=\"false\">)</mo></mrow><mi>x</mi></mfrac><mo>=</mo><mn>1</mn></mrow></semantics></math>. If you calculate `Math.log(1 + 1.1111111111e-15)`, you should get an answer close to `1.1111111111e-15`. Instead, you will end up taking the logarithm of `1.00000000000000111022` (the roundoff is in binary, so sometimes it gets ugly), and get the answer 1.11022…e-15, with only 3 correct digits. If, instead, you calculate `Math.log1p(1.1111111111e-15)`, you will get a much more accurate answer `1.1111111110999995e-15`, with 15 correct digits of precision (actually 16 in this case).\n\nIf the value of `x` is less than -1, the return value is always `NaN`.\n\nBecause `log1p()` is a static method of `Math`, you always use it as `Math.log1p()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/log2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log2()\n\nThe **`Math.log2()`** function returns the base 2 logarithm of a number.\n\n## Syntax\n\n```js\nMath.log2(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe base 2 logarithm of `x`. If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `log2()` is a static method of `Math`, you always use it as `Math.log2()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nThis function is the equivalent of `Math.log(x) / Math.log(2)`. For `log2(e)`, use the constant `Math.LOG2E`, which is 1 / `Math.LN2`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/max.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.max()\n\nThe **`Math.max()`** function returns the largest of the numbers given as input parameters, or `-Infinity` if there are no parameters.\n\n## Syntax\n\n```js\nMath.max()\nMath.max(value0)\nMath.max(value0, value1)\nMath.max(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `value1`, `value2`, … , `valueN`\n  - : Zero or more numbers among which the largest value will be selected and returned.\n\n### Return value\n\nThe largest of the given numbers. Returns `NaN` if any of the parameters is or is converted into `NaN`. Returns `-Infinity` if no parameters are provided.\n\n## Description\n\nBecause `max()` is a static method of `Math`, you always use it as `Math.max()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n[`Math.max.length`](../Function/prototype/length.mdx) is 2, which weakly signals that it's designed to handle at least two parameters.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/min.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.min()\n\nThe **`Math.min()`** function returns the smallest of the numbers given as input parameters, or `Infinity` if there are no parameters.\n\n## Syntax\n\n```js\nMath.min()\nMath.min(value0)\nMath.min(value0, value1)\nMath.min(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `value1`, …, `valueN`\n  - : Zero or more numbers among which the lowest value will be selected and returned.\n\n### Return value\n\nThe smallest of the given numbers. Returns `NaN` if any of the parameters is or is converted into `NaN`. Returns `Infinity` if no parameters are provided.\n\n## Description\n\nBecause `min()` is a static method of `Math`, you always use it as `Math.min()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n[`Math.min.length`](../Function/prototype/length.mdx) is 2, which weakly signals that it's designed to handle at least two parameters.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/pow.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.pow()\n\nThe **`Math.pow()`** method returns the value of a base raised to a power.\n\n## Syntax\n\n```js\nMath.pow(base, exponent)\n```\n\n### Parameters\n\n- `base`\n  - : The base number.\n- `exponent`\n  - : The exponent number.\n\n### Return value\n\nA number representing `base` taken to the power of `exponent`. Returns `NaN` in one of the following cases:\n\n- `exponent` is `NaN`.\n- `base` is `NaN` and `exponent` is not `0`.\n- `base` is ±1 and `exponent` is ±`Infinity`.\n- `base < 0` and `exponent` is not an integer.\n\n## Description\n\n`Math.pow()` is equivalent to the `**` operator, except `Math.pow()` only accepts numbers.\n\n`Math.pow(NaN, 0)` (and the equivalent `NaN ** 0`) is the only case where `NaN` doesn't propagate through mathematical operations — it returns `1` despite the operand being `NaN`. In addition, the behavior where `base` is 1 and `exponent` is non-finite (±Infinity or `NaN`) is different from IEEE 754, which specifies that the result should be 1, whereas JavaScript returns `NaN` to preserve backward compatibility with its original behavior.\n\nBecause `pow()` is a static method of `Math`, use it as `Math.pow()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/random.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.random()\n\nThe **`Math.random()`** function returns a floating-point, pseudo-random number that's greater than or equal to 0 and less than 1, with approximately uniform distribution over that range — which you can then scale to your desired range. The implementation selects the initial seed to the random number generation algorithm; it cannot be chosen or reset by the user.\n\n> **Note:** `Math.random()` _does not_ provide cryptographically secure random numbers. Do not use them for anything related to security. Use the Web Crypto API instead, and more precisely the `crypto.getRandomValues()` method.\n\n## Syntax\n\n```js\nMath.random()\n```\n\n### Return value\n\nA floating-point, pseudo-random number between 0 (inclusive) and 1 (exclusive).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/round.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.round()\n\nThe **`Math.round()`** function returns the value of a number rounded to the nearest integer.\n\n## Syntax\n\n```js\nMath.round(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe value of `x` rounded to the nearest integer.\n\n## Description\n\nIf the fractional portion of the argument is greater than 0.5, the argument is rounded to the integer with the next higher absolute value. If it is less than 0.5, the argument is rounded to the integer with the lower absolute value. If the fractional portion is exactly 0.5, the argument is rounded to the next integer in the direction of +∞.\n\n> **Note:** This differs from many languages' `round()` functions, which often round half-increments _away from zero_, giving a different result in the case of negative numbers with a fractional part of exactly 0.5.\n\n`Math.round(x)` is not exactly the same as [`Math.floor(x + 0.5)`](./floor.mdx). When `x` is -0, or -0.5 ≤ x < 0, `Math.round(x)` returns -0, while `Math.floor(x + 0.5)` returns 0. However, neglecting that difference and potential precision errors, `Math.round(x)` and `Math.floor(x + 0.5)` are generally equivalent.\n\nBecause `round()` is a static method of `Math`, you always use it as `Math.round()`, rather than as a method of a `Math` object you created (`Math` has no constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/sign.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sign()\n\nThe **`Math.sign()`** function returns 1 or -1, indicating the sign of the number passed as argument. If the input is 0 or -0, it will be returned as-is.\n\n## Syntax\n\n```js\nMath.sign(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nA number representing the sign of `x`:\n\n- If `x` is positive, returns `1`.\n- If `x` is negative, returns `-1`.\n- If `x` is positive zero, returns `0`.\n- If `x` is negative zero, returns `-0`.\n- Otherwise, returns `NaN`.\n\n## Description\n\nBecause `sign()` is a static method of `Math`, you always use it as `Math.sign()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/sin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sin()\n\nThe **`Math.sin()`** function returns the sine of a number in radians.\n\n## Syntax\n\n```js\nMath.sin(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number representing an angle in radians.\n\n### Return value\n\nThe sine of `x`, between -1 and 1, inclusive. If `x` is `Infinity`, `-Infinity`, or `NaN`, returns `NaN`.\n\n## Description\n\nBecause `sin()` is a static method of `Math`, you always use it as `Math.sin()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/sinh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sinh()\n\nThe **`Math.sinh()`** function returns the hyperbolic sine of a number. \n\n## Syntax\n\n```js\nMath.sinh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe hyperbolic sine of `x`.\n\n## Description\n\nBecause `sinh()` is a static method of `Math`, you always use it as `Math.sinh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/sqrt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sqrt()\n\nThe **`Math.sqrt()`** function returns the square root of a number.\n\n## Syntax\n\n```js\nMath.sqrt(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe square root of `x`, a nonnegative number. If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `sqrt()` is a static method of `Math`, you always use it as `Math.sqrt()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/tan.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.tan()\n\nThe **`Math.tan()`** function returns the tangent of a number in radians.\n\n\n## Syntax\n\n```js\nMath.tan(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number representing an angle in radians.\n\n### Return value\n\nThe tangent of `x`. If `x` is `Infinity`, `-Infinity`, or `NaN`, returns `NaN`.\n\n> **Note:** Due to floating point precision, it's not possible to obtain the exact value π/2, so the result is always finite if not `NaN`.\n\n## Description\n\nBecause `tan()` is a static method of `Math`, you always use it as `Math.tan()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/tanh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.tanh()\n\nThe **`Math.tanh()`** function returns the hyperbolic tangent of a number. \n\n## Syntax\n\n```js\nMath.tanh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe hyperbolic tangent of `x`.\n\n## Description\n\nBecause `tanh()` is a static method of `Math`, you always use it as `Math.tanh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Math/trunc.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.trunc()\n\nThe **`Math.trunc()`** function returns the integer part of a number by removing any fractional digits.\n\n## Syntax\n\n```js\nMath.trunc(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe integer part of `x`.\n\n## Description\n\nUnlike the other three `Math` methods: `Math.floor()`, `Math.ceil()` and `Math.round()`, the way `Math.trunc()` works is very simple. It _truncates_ (cuts off) the dot and the digits to the right of it, no matter whether the argument is a positive or negative number.\n\nBecause `trunc()` is a static method of `Math`, you always use it as `Math.trunc()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/NaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# NaN\n\nThe global **`NaN`** property is a value representing Not-A-Number.\n\n## Value\n\nThe same number value as [`Number.NaN`](./Number/NaN.mdx).\n\n## Description\n\n`NaN` is a property of the _global object_. In other words, it is a variable in global scope.\n\nIn modern browsers, `NaN` is a non-configurable, non-writable property. Even when this is not the case, avoid overriding it.\n\nThere are five different types of operations that return `NaN`:\n\n- Failed number conversion (e.g. explicit ones like `parseInt(\"blabla\")`, `Number(undefined)`, or implicit ones like `Math.abs(undefined)`)\n- Math operation where the result is not a real number (e.g. `Math.sqrt(-1)`)\n- Indeterminate form (e.g. `0 * Infinity`, `1 ** Infinity`, `Infinity / Infinity`, `Infinity - Infinity`)\n- A method or expression whose operand is or gets coerced to `NaN` (e.g. `7 ** NaN`, `7 * \"blabla\"`) — this means `NaN` is contagious\n- Other cases where an invalid value is to be represented as a number (e.g. an invalid `new Date(\"blabla\").getTime()`, `\"\".charCodeAt(1)`)\n\n`NaN` and its behaviors are not invented by JavaScript. Its semantics in floating point arithmetic (including that `NaN !== NaN`) are specified by [IEEE 754](https://en.wikipedia.org/wiki/Double_precision_floating-point_format). `NaN`'s behaviors include:\n\n- If `NaN` is involved in a mathematical operation (but not [bitwise operations](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators#bitwise_shift_operators)), the result is usually also `NaN`. (See see [silently escaping NaN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN#silently_escaping_nan) for a counter-example.)\n- When `NaN` is one of the operands of any relational comparison (`>`, `<`, `>=`, `<=`), the result is always `false`.\n- `NaN` compares unequal (via [`==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Equality), [`!=`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Inequality), [`===`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality), and [`!==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_inequality)) to any other value — including to another `NaN` value.\n\n`NaN` is also one of the [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) values in JavaScript.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Number/MAX_SAFE_INTEGER.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MAX_SAFE_INTEGER\n\nThe **`Number.MAX_SAFE_INTEGER`** constant represents the maximum safe integer in JavaScript (2<sup>53</sup> – 1).\n\nFor larger integers, consider using `BigInt`.\n\n## Value\n\n`9007199254740991` (9,007,199,254,740,991, or \\~9 quadrillion).\n\n## Description\n\n[Double precision floating point format](https://en.wikipedia.org/wiki/Double_precision_floating-point_format) only has 52 bits to represent the [mantissa](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_encoding), so it can only safely represent integers between -(2<sup>53</sup> – 1) and 2<sup>53</sup> – 1. \"Safe\" in this context refers to the ability to represent integers exactly and to compare them correctly. For example, `Number.MAX_SAFE_INTEGER + 1 === Number.MAX_SAFE_INTEGER + 2` will evaluate to true, which is mathematically incorrect. See `Number.isSafeInteger()` for more information.\n\nBecause `MAX_SAFE_INTEGER` is a static property of `Number`, you always use it as `Number.MAX_SAFE_INTEGER`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Number/MAX_VALUE.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MAX_VALUE\n\nThe **`Number.MAX_VALUE`** property represents the maximum numeric value representable in JavaScript.\n\n## Value\n\n2<sup>1024</sup> - 1, or approximately `1.7976931348623157E+308`.\n\n## Description\n\nValues larger than `MAX_VALUE` are represented as [`Infinity`](../../globals/Infinity.mdx) and will lose their actual value.\n\nBecause `MAX_VALUE` is a static property of `Number`, you always use it as `Number.MAX_VALUE`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Number/MIN_SAFE_INTEGER.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MIN_SAFE_INTEGER\n\nThe **`Number.MIN_SAFE_INTEGER`** constant represents the minimum safe integer in JavaScript, or -(2<sup>53</sup> - 1).\n\nTo represent integers smaller than this, consider using `BigInt`.\n\n## Value\n\n`-9007199254740991` (-9,007,199,254,740,991, or about -9 quadrillion).\n\n## Description\n\n[Double precision floating point format](https://en.wikipedia.org/wiki/Double_precision_floating-point_format) only has 52 bits to represent the [mantissa](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_encoding), so it can only safely represent integers between -(2<sup>53</sup> – 1) and 2<sup>53</sup> – 1. Safe in this context refers to the ability to represent integers exactly and to correctly compare them. For example, `Number.MIN_SAFE_INTEGER - 1 === Number.MIN_SAFE_INTEGER - 2` will evaluate to true, which is mathematically incorrect. See `Number.isSafeInteger()` for more information.\n\nBecause `MIN_SAFE_INTEGER` is a static property of `Number`, you always use it as `Number.MIN_SAFE_INTEGER`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Number/MIN_VALUE.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MIN_VALUE\n\nThe **`Number.MIN_VALUE`** property represents the smallest positive numeric value representable in JavaScript.\n\n## Value\n\n2<sup>-1074</sup>, or `5E-324`.\n\n## Description\n\n`Number.MIN_VALUE` is the smallest positive number (not the most negative number) that can be represented within float precision — in other words, the number closest to 0. The ECMAScript spec doesn't define a precise value that implementations are required to support — instead the spec says, _\"must be the smallest non-zero positive value that can actually be represented by the implementation\"_. This is because small IEEE-754 floating point numbers are [denormalized](https://en.wikipedia.org/wiki/Subnormal_number), but implementations are not required to support this representation, in which case `Number.MIN_VALUE` may be larger.\n\nIn practice, its precise value in mainstream engines like V8 (used by Chrome, Edge, Node.js), SpiderMonkey (used by Firefox), and JavaScriptCore (used by Safari) is 2<sup>-1074</sup>, or `5E-324`.\n\nBecause `MIN_VALUE` is a static property of `Number`, you always use it as `Number.MIN_VALUE`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Number/NEGATIVE_INFINITY.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.NEGATIVE_INFINITY\n\nThe **`Number.NEGATIVE_INFINITY`** property represents the negative Infinity value.\n\n## Value\n\nThe same as the negative value of the global [`Infinity`](../../globals/Infinity.mdx) property.\n\n## Description\n\nThe `Number.NEGATIVE_INFINITY` value behaves slightly differently than mathematical infinity:\n\n- Any positive value, including `Number.POSITIVE_INFINITY`, multiplied by `Number.NEGATIVE_INFINITY` is `Number.NEGATIVE_INFINITY`.\n- Any negative value, including `Number.NEGATIVE_INFINITY`, multiplied by `Number.NEGATIVE_INFINITY` is `Number.POSITIVE_INFINITY`.\n- Any positive value divided by `Number.NEGATIVE_INFINITY` is [negative zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754)).\n- Any negative value divided by `Number.NEGATIVE_INFINITY` is [positive zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754)).\n- Zero multiplied by `Number.NEGATIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- [`NaN`](../../globals/NaN.mdx) multiplied by `Number.NEGATIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- `Number.NEGATIVE_INFINITY`, divided by any negative value except `Number.NEGATIVE_INFINITY`, is `Number.POSITIVE_INFINITY`.\n- `Number.NEGATIVE_INFINITY`, divided by any positive value except `Number.POSITIVE_INFINITY`, is `Number.NEGATIVE_INFINITY`.\n- `Number.NEGATIVE_INFINITY`, divided by either `Number.NEGATIVE_INFINITY` or `Number.POSITIVE_INFINITY`, is [`NaN`](../../globals/NaN.mdx).\n- `x > Number.NEGATIVE_INFINITY` is true for any number _x_ that isn't `Number.NEGATIVE_INFINITY`.\n\nYou might use the `Number.NEGATIVE_INFINITY` property to indicate an error condition that returns a finite number in case of success. Note, however, that [`NaN`](../../globals/NaN.mdx) would be more appropriate in such a case.\n\nBecause `Number.NEGATIVE_INFINITY` is a static property of `Number`, you always use it as `Number.NEGATIVE_INFINITY`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Number/NaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.NaN\n\nThe **`Number.NaN`** property represents Not-A-Number, which is equivalent to [description for the global property](../../globals/NaN.mdx). For more information about the behaviors of `NaN`, see the [`NaN`](../../globals/NaN.mdx).\n\n## Value\n\nThe number value [`NaN`](../../globals/NaN.mdx).\n\n## Description\n\nBecause `NaN` is a static property of `Number`, you always use it as `Number.NaN`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Number/Number.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number() constructor\n\nThe **`Number()` constructor** creates a `Number` object. When called instead as a function, it performs type conversion to a primitive number, which is usually more useful.\n\n## Syntax\n\n```js\nnew Number(value)\nNumber(value)\n```\n\n> **Note:** `Number()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\n- `value`\n  - : The numeric value of the object being created.\n\n### Return value\n\nWhen `Number` is called as a constructor (with `new`), it creates a `Number` object, which is **not** a primitive.\n\nWhen `Number` is called as a function, it [coerces the parameter to a number primitive](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_coercion). [BigInts](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/BigInt) are converted to numbers. If the value can't be converted, it returns [`NaN`](../../globals/NaN.mdx).\n\n> **Warning:** You should rarely find yourself using `Number` as a constructor.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Number/POSITIVE_INFINITY.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.POSITIVE_INFINITY\n\nThe **`Number.POSITIVE_INFINITY`** property represents the positive Infinity value.\n\n## Value\n\nThe same as the value of the global [`Infinity`](../../globals/Infinity.mdx) property.\n\n## Description\n\nThe `Number.POSITIVE_INFINITY` value behaves slightly differently than mathematical infinity:\n\n- Any positive value, including `Number.POSITIVE_INFINITY`, multiplied by `Number.POSITIVE_INFINITY` is `Number.POSITIVE_INFINITY`.\n- Any negative value, including `Number.NEGATIVE_INFINITY`, multiplied by `Number.POSITIVE_INFINITY` is `Number.NEGATIVE_INFINITY`.\n- Any positive number divided by `Number.POSITIVE_INFINITY` is [positive zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754)).\n- Any negative number divided by `Number.POSITIVE_INFINITY` is [negative zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754).\n- Zero multiplied by `Number.POSITIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- `NaN` multiplied by `Number.POSITIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- `Number.POSITIVE_INFINITY`, divided by any negative value except `Number.NEGATIVE_INFINITY`, is `Number.NEGATIVE_INFINITY`.\n- `Number.POSITIVE_INFINITY`, divided by any positive value except `Number.POSITIVE_INFINITY`, is `Number.POSITIVE_INFINITY`.\n- `Number.POSITIVE_INFINITY`, divided by either `Number.NEGATIVE_INFINITY` or `Number.POSITIVE_INFINITY`, is [`NaN`](../../globals/NaN.mdx).\n- `Number.POSITIVE_INFINITY > x` is true for any number _x_ that isn't `Number.POSITIVE_INFINITY`.\n\nYou might use the `Number.POSITIVE_INFINITY` property to indicate an error condition that returns a finite number in case of success. Note, however, that [`NaN`](../../globals/NaN.mdx) would be more appropriate in such a case.\n\nBecause `Number.POSITIVE_INFINITY` is a static property of `Number`, you always use it as `Number.POSITIVE_INFINITY`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Number/epsilon.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.EPSILON\n\nThe **`Number.EPSILON`** property represents the difference between 1 and the smallest floating point number greater than 1.\n\n## Value\n\n2<sup>-52</sup>, or approximately `2.2204460492503130808472633361816E-16`.\n\n## Description\n\n`Number.EPSILON` is the difference between 1 and the next greater number representable in the Number format, because [double precision floating point format](https://en.wikipedia.org/wiki/Double_precision_floating-point_format) only has 52 bits to represent the [mantissa](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_encoding), and the lowest bit has a significance of 2<sup>-52</sup>.\n\nNote that the absolute accuracy of floating numbers decreases as the number gets larger, because the exponent grows while the mantissa's accuracy stays the same. `Number.MIN_VALUE` is the smallest representable positive number, which is much smaller than `Number.EPSILON`.\n\nBecause `EPSILON` is a static property of `Number`, you always use it as `Number.EPSILON`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Number/isFinite.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isFinite()\n\nThe **`Number.isFinite()`** method determines whether the passed value is a finite number — that is, it checks that a given value is a number, and the number is neither positive [`Infinity`](../../globals/Infinity.mdx), negative `Infinity`, nor [`NaN`](../../globals/NaN.mdx).\n\n## Syntax\n\n```js\nNumber.isFinite(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested for finiteness.\n\n### Return value\n\nThe boolean value `true` if the given value is a finite number. Otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Number/isInteger.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isInteger()\n\nThe **`Number.isInteger()`** method determines whether the passed value is an integer.\n\n## Syntax\n\n```js\nNumber.isInteger(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested for being an integer.\n\n### Return value\n\nThe boolean value `true` if the given value is an integer. Otherwise `false`.\n\n## Description\n\nIf the target value is an integer, return `true`, otherwise return `false`. If the value is [`NaN`](../../globals/NaN.mdx) or [`Infinity`](../../globals/Infinity.mdx), return `false`. The method will also return `true` for floating point numbers that can be represented as integer. It will always return `false` if the value is not a number.\n\nNote that some number literals, while looking like non-integers, actually represent integers — due to the precision limit of ECMAScript floating-point number encoding (IEEE-754). For example, `5.0000000000000001` only differs from `5` by `1e-16`, which is too small to be represented. (For reference, [`Number.EPSILON`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/EPSILON) stores the distance between 1 and the next representable floating-point number greater than 1, and that is about `2.22e-16`.) Therefore, `5.0000000000000001` will be represented with the same encoding as `5`, thus making `Number.isInteger(5.0000000000000001)` return `true`.\n\nIn a similar sense, numbers around the magnitude of [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER) will suffer from loss of precision and make `Number.isInteger` return `true` even when it's not an integer. (The actual threshold varies based on how many bits are needed to represent the decimal — for example, `Number.isInteger(4500000000000000.1)` is `true`, but `Number.isInteger(4500000000000000.5)` is `false`.)\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Number/isNaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isNaN()\n\nThe **`Number.isNaN()`** method determines whether the passed value is the number value [`NaN`](../../globals/NaN.mdx), and returns `false` if the input is not of the Number type. It is a more robust version of the original, global `isNaN()` function.\n\n## Syntax\n\n```js\nNumber.isNaN(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested for [`NaN`](../../globals/NaN.mdx).\n\n### Return value\n\nThe boolean value `true` if the given value is a number with value [`NaN`](../../globals/NaN.mdx). Otherwise, `false`.\n\n## Description\n\nThe function `Number.isNaN()` provides a convenient way to check for equality with `NaN`. Note that you cannot test for equality with `NaN` using either the [`==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Equality) or [`===`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) operators, because unlike all other value comparisons in JavaScript, these evaluate to `false` whenever one operand is [`NaN`](../../globals/NaN.mdx), even if the other operand is also [`NaN`](../../globals/NaN.mdx).\n\nSince `x !== x` is only true for `NaN` among all possible JavaScript values, `Number.isNaN(x)` can also be replaced with a test for `x !== x`, despite the latter being less readable.\n\nAs opposed to the global `isNaN()` function, the `Number.isNaN()` method doesn't force-convert the parameter to a number. This makes it safe to pass values that would normally convert to [`NaN`](../../globals/NaN.mdx) but aren't actually the same value as [`NaN`](../../globals/NaN.mdx). This also means that only values of the Number type that are also [`NaN`](../../globals/NaN.mdx) return `true`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Number/isSafeInteger.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isSafeInteger()\n\nThe **`Number.isSafeInteger()`** method determines whether the provided value is a number that is a _safe integer_.\n\n## Syntax\n\n```js\nNumber.isSafeInteger(testValue)\n```\n\n### Parameters\n\n- `testValue`\n  - : The value to be tested for being a safe integer.\n\n### Return value\n\nThe boolean value `true` if the given value is a number that is a safe integer. Otherwise `false`.\n\n## Description\n\nThe safe integers consist of all integers from -(2<sup>53</sup> - 1) to 2<sup>53</sup> - 1, inclusive (±9,007,199,254,740,991). A safe integer is an integer that:\n\n- can be exactly represented as an IEEE-754 double precision number, and\n- whose IEEE-754 representation cannot be the result of rounding any other integer to fit the IEEE-754 representation.\n\nFor example, 2<sup>53</sup> - 1 is a safe integer: it can be exactly represented, and no other integer rounds to it under any IEEE-754 rounding mode. In contrast, 2<sup>53</sup> is _not_ a safe integer: it can be exactly represented in IEEE-754, but the integer 2<sup>53</sup> + 1 can't be directly represented in IEEE-754 but instead rounds to 2<sup>53</sup> under round-to-nearest and round-to-zero rounding.\n\nHandling values larger or smaller than \\~9 quadrillion with full precision requires using an [arbitrary precision arithmetic library](https://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic). See [What Every Programmer Needs to Know about Floating Point Arithmetic](https://floating-point-gui.de/) for more information on floating point representations of numbers.\n\nFor larger integers, consider using the `BigInt` type.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Number/parseFloat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.parseFloat()\n\nThe **`Number.parseFloat()`** method parses an argument and returns a floating point number. If a number cannot be parsed from the argument, it returns [`NaN`](../../globals/NaN.mdx).\n\n## Syntax\n\n```js\nNumber.parseFloat(string)\n```\n\n### Parameters\n\n- `string`\n  - : The value to parse, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). Leading whitespace in this argument is ignored.\n\n### Return value\n\nA floating point number parsed from the given `string`.\n\nOr [`NaN`](../../globals/NaN.mdx) when the first non-whitespace character cannot be converted to a number.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Number/parseInt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.parseInt()\n\nThe **`Number.parseInt()`** method parses a string argument and\nreturns an integer of the specified radix or base.\n\n## Syntax\n\n```js\nNumber.parseInt(string)\nNumber.parseInt(string, radix)\n```\n\n### Parameters\n\n- `string`\n  - : The value to parse, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). Leading whitespace in this argument is ignored.\n- `radix` _**optional**_\n\n  - : An integer between `2` and `36` that represents the\n    _radix_ (the base in mathematical numeral systems) of the\n    `string`.\n\n    If `radix` is undefined or `0`, it is assumed to be `10` except when the number begins with the code unit pairs `0x` or `0X`, in which case a radix of `16` is assumed.\n\n### Return value\n\nAn integer parsed from the given `string`.\n\nIf the `radix` is smaller than `2` or bigger than\n`36`, or the first non-whitespace character cannot be converted to a number,\n[`NaN`](../../globals/NaN.mdx) is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Number/prototype/toExponential.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toExponential()\n\nThe **`toExponential()`** method returns a string representing\nthe `Number` object in exponential notation.\n\n## Syntax\n\n```js\ntoExponential()\ntoExponential(fractionDigits)\n```\n\n### Parameters\n\n- `fractionDigits` _**optional**_\n  - : Optional. An integer specifying the number of digits after the decimal point.\n    Defaults to as many digits as necessary to specify the number.\n\n### Return value\n\nA string representing the given `Number` object in exponential notation\nwith one digit before the decimal point, rounded to\n`fractionDigits` digits after the decimal point.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : If `fractionDigits` is too small or too large. Values between\n    `0` and `100`, inclusive, will not cause a\n    [`RangeError`](../../../globals/RangeError/RangeError.mdx).\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If this method is invoked on an object that is not a `Number`.\n\n## Description\n\nIf the `fractionDigits` argument is omitted, the number of digits\nafter the decimal point defaults to the number of digits necessary to represent the\nvalue uniquely.\n\nIf you use the `toExponential()` method for a numeric literal and the\nnumeric literal has no exponent and no decimal point, leave whitespace(s) before the dot\nthat precedes the method call to prevent the dot from being interpreted as a decimal\npoint.\n\nIf a number has more digits than requested by the\n`fractionDigits` parameter, the number is rounded to the nearest\nnumber represented by `fractionDigits` digits. See the discussion\nof rounding in the description of the [`Number.prototype.toFixed()`](../../../globals/Number/prototype/toFixed.mdx) method, which also applies to `toExponential()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Number/prototype/toFixed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toFixed()\n\nThe **`toFixed()`** method formats a number using fixed-point notation.\n\n## Syntax\n\n```js\ntoFixed()\ntoFixed(digits)\n```\n\n### Parameters\n\n- `digits` _**optional**_\n  - : The number of digits to appear after the decimal point; should be a value between `0` and `100`, inclusive. If this argument is omitted, it is treated as `0`.\n\n### Return value\n\nA string representing the given number using fixed-point notation.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : If `digits` is smaller than `0`, larger than `100`, or is `NaN`.\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If this method is invoked on an object that is not a `Number`.\n\n## Description\n\nThe `toFixed()` method returns a string representation of `numObj` that does not use exponential notation and has exactly `digits` digits after the decimal place. The number is rounded if necessary, and the fractional part is padded with zeros if necessary so that it has the specified length.\n\nIf the absolute value of `numObj` is greater or equal to 10<sup>21</sup>, this method uses the same algorithm as [`Number.prototype.toString()`](../../../globals/Number/prototype/toString.mdx) and returns a string in exponential notation. `toFixed()` returns `\"Infinity\"`, `\"NaN\"`, or `\"-Infinity\"` if the value of `numObj` is non-finite.\n\nThe output of `toFixed()` may be more precise than [`toString()`](../../../globals/Number/prototype/toString.mdx) for some values, because `toString()` only prints enough significant digits to distinguish the number from adjacent number values. For example:\n\n```js\n(1000000000000000128).toString(); // '1000000000000000100'\n(1000000000000000128).toFixed(0); // '1000000000000000128'\n```\n\nHowever, choosing a `digits` precision that's too high can return unexpected results, because decimal fractional numbers cannot be represented precisely in floating point. For example:\n\n```js\n0.3.toFixed(50); // '0.29999999999999998889776975374843459576368331909180'\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Number/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string with a language-sensitive representation of this number. In implementations with [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) support, this method simply calls `Intl.NumberFormat`.\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` parameters customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat), these parameters correspond exactly to the [`Intl.NumberFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) constructor's parameters. Implementations without `Intl.NumberFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#locales) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored.\n\nSee the [`Intl.NumberFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string with a language-sensitive representation of the given number.\n\nIn implementations with `Intl.NumberFormat`, this is equivalent to `new Intl.NumberFormat(locales, options).format(number)`.\n\n## Performance\n\nWhen formatting large numbers of numbers, it is better to create a\n`Intl.NumberFormat` object and use the function provided by its\n`format` property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Number/prototype/toPrecision.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toPrecision()\n\nThe **`toPrecision()`** method returns a string representing\nthe `Number` object to the specified precision.\n\n## Syntax\n\n```js\ntoPrecision()\ntoPrecision(precision)\n```\n\n### Parameters\n\n- `precision` _**optional**_\n  - : An integer specifying the number of significant digits.\n\n### Return value\n\nA string representing a `Number` object in fixed-point or exponential\nnotation rounded to `precision` significant digits. See the discussion of\nrounding in the description of the [`Number.prototype.toFixed()`](../../../globals/Number/prototype/toFixed.mdx) method,\nwhich also applies to `toPrecision()`.\n\nIf the `precision` argument is omitted, behaves as\n[`Number.prototype.toString()`](../../../globals/Number/prototype/toString.mdx). If the `precision` argument is a\nnon-integer value, it is rounded to the nearest integer.\n\n### Exceptions\n\n- `RangeError`\n  - : If `precision` is not between `1` and `100`\n    (inclusive), a [`RangeError`](../../../globals/RangeError/RangeError.mdx) is thrown. Implementations are allowed to\n    support larger and smaller values as well. ECMA-262 only requires a precision of up to\n    21 significant digits.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Number/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified number value.\n\n## Syntax\n\n```js\ntoString()\ntoString(radix)\n```\n\n### Parameters\n\n- `radix` _**optional**_\n  - : An integer in the range `2` through `36` specifying the base to use for representing the number value. Defaults to 10.\n\n### Return value\n\nA string representing the specified number value.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `radix` is less than 2 or greater than 36.\n\n## Description\n\nThe `Number` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For `Number` values, the `toString` method returns a string representation of the value in the specified radix.\n\nFor radixes above 10, the letters of the alphabet indicate digits greater than 9. For example, for hexadecimal numbers (base 16) `a` through `f` are used.\n\nIf the specified number value is negative, the sign is preserved. This is the case even if the radix is 2; the string returned is the positive binary representation of the number value preceded by a `-` sign, **not** the two's complement of the number value.\n\nBoth `0` and `-0` have `\"0\"` as their string representation. [`Infinity`](../../../globals/Infinity.mdx) returns `\"Infinity\"` and [`NaN`](../../../globals/NaN.mdx) returns `\"NaN\"`.\n\nIf the number is not a whole number, the decimal point `.` is used to separate the decimal places. [Scientific notation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#exponential) is used if the radix is 10 and the number's magnitude (ignoring sign) is greater than or equal to 10<sup>21</sup> or less than 10<sup>-6</sup>. In this case, the returned string always explicitly specifies the sign of the exponent.\n\n```js\nconsole.log((10 ** 21.5).toString()); // \"3.1622776601683794e+21\"\nconsole.log((10 ** 21.5).toString(8)); // \"526665530627250154000000\"\n```\n\nThe `toString()` method requires its `this` value to be a `Number` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to number values.\n\nBecause `Number` doesn't have a [`[Symbol.toPrimitive]()`](../../../globals/Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `Number` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, Number _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — rather, they are directly converted using the same algorithm as the initial `toString()` implementation.\n\n```js\nNumber.prototype.toString = () => \"Overridden\";\nconsole.log(`${1}`); // \"1\"\nconsole.log(`${new Number(1)}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Number/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.valueOf()\n\nThe **`valueOf()`** method returns the wrapped primitive value\nof a `Number` object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nA number representing the primitive value of the specified `Number` object.\n\n## Description\n\nThis method is usually called internally by JavaScript and not explicitly in web code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Object/Object.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object()\n\nThe **`Object` constructor** turns the input into an object. Its behavior depends on the input's type.\n\n- If the value is [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../globals/undefined.mdx), it creates and returns an empty object.\n- Otherwise, it returns an object of a Type that corresponds to the given value.\n- If the value is an object already, it returns the value.\n\n## Syntax\n\n```js\nnew Object(value)\nObject(value)\n```\n\n> **Note:** `Object()` can be called with or without `new`. Both create a new object.\n\n### Parameters\n\n- `value`\n  - : Any value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Object/assign.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.assign()\n\nThe **`Object.assign()`** method\ncopies all [enumerable](../../globals/Object/prototype/propertyIsEnumerable.mdx)\n[own properties](../../globals/Object/hasOwn.mdx) from one or more\n_source objects_ to a _target object_. It returns the modified target\nobject.\n\n## Syntax\n\n```js\nObject.assign(target, ...sources)\n```\n\n### Parameters\n\n- `target`\n  - : The target object — what to apply the sources' properties to, which is returned\n    after it is modified.\n- `sources`\n  - : The source object(s) — objects containing the properties you want to apply.\n\n### Return value\n\nThe target object.\n\n## Description\n\nProperties in the target object are overwritten by properties in the sources if they\nhave the same \"key\". Later sources' properties overwrite earlier ones.\n\nThe `Object.assign()` method only copies _enumerable_ and\n_own_ properties from a source object to a target object. It uses\n`[[Get]]` on the source and `[[Set]]` on the target, so it will\ninvoke [getters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/get) and [setters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/set). Therefore it\n_assigns_ properties, versus copying or defining new properties. This may make it\nunsuitable for merging new properties into a prototype if the merge sources contain\ngetters.\n\nFor copying property definitions (including their enumerability) into prototypes, use\n[`Object.getOwnPropertyDescriptor()`](../../globals/Object/getOwnPropertyDescriptor.mdx) and\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx) instead.\n\nBoth `String` and `Symbol` properties are copied.\n\nIn case of an error, for example if a property is non-writable, a\n[`TypeError`](../../globals/TypeError/TypeError.mdx) is raised, and the `target` object is\nchanged if any properties are added before the error is raised.\n\n> **Note:** `Object.assign()` does not throw on\n> [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../globals/undefined.mdx) sources.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Object/create.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.create()\n\nThe **`Object.create()`** method creates a new object, using an existing object as the prototype of the newly created object.\n\n## Syntax\n\n```js\nObject.create(proto)\nObject.create(proto, propertiesObject)\n```\n\n### Parameters\n\n- `proto`\n  - : The object which should be the prototype of the newly-created object.\n- `propertiesObject` _**optional**_\n  - : If specified and not [`undefined`](../../globals/undefined.mdx), an object whose [enumerable own properties](https://developer.mozilla.org/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) specify property descriptors to be added to the newly-created object, with the corresponding property names. These properties correspond to the second argument of [`Object.defineProperties()`](../../globals/Object/defineProperties.mdx).\n\n### Return value\n\nA new object with the specified prototype object and properties.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if `proto` is neither [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) nor an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Object/defineProperties.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.defineProperties()\n\nThe **`Object.defineProperties()`** method defines new or\nmodifies existing properties directly on an object, returning the object.\n\n## Syntax\n\n```js\nObject.defineProperties(obj, props)\n```\n\n### Parameters\n\n- `obj`\n  - : The object on which to define or modify properties.\n- `props`\n\n  - : An object whose keys represent the names of properties to be defined or modified and\n    whose values are objects describing those properties. Each value in `props`\n    must be either a data descriptor or an accessor descriptor; it cannot be both (see\n    [`Object.defineProperty()`](../../globals/Object/defineProperty.mdx) for more details).\n\n    Data descriptors and accessor descriptors may optionally contain the following keys:\n\n    - `configurable`\n      - : `true` if and only if the type of this property descriptor may be\n        changed and if the property may be deleted from the corresponding object.\n        **Defaults to `false`.**\n    - `enumerable`\n      - : `true` if and only if this property shows up during enumeration of\n        the properties on the corresponding object.\n        **Defaults to `false`.**\n\n    A data descriptor also has the following optional keys:\n\n    - `value`\n      - : The value associated with the property. Can be any valid JavaScript value\n        (number, object, function, etc.).\n        **Defaults to [`undefined`](../../globals/undefined.mdx).**\n    - `writable`\n      - : `true` if and only if the value associated with the property may be\n        changed with an assignment operator.\n        **Defaults to `false`.**\n\n    An accessor descriptor also has the following optional keys:\n\n    - `get`\n      - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx)\n        if there is no getter. The function's return value will be used as the value of\n        the property.\n        **Defaults to [`undefined`](../../globals/undefined.mdx).**\n    - `set`\n      - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx)\n        if there is no setter. The function will receive as its only argument the new\n        value being assigned to the property.\n        **Defaults to [`undefined`](../../globals/undefined.mdx).**\n\n    If a descriptor has neither of `value`, `writable`,\n    `get` and `set` keys, it is treated as a data descriptor. If a\n    descriptor has both `value` or `writable` and `get`\n    or `set` keys, an exception is thrown.\n\n### Return value\n\nThe object that was passed to the function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Object/defineProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.defineProperty()\n\nThe static method **`Object.defineProperty()`** defines a new\nproperty directly on an object, or modifies an existing property on an object, and\nreturns the object.\n\n## Syntax\n\n```js\nObject.defineProperty(obj, prop, descriptor)\n```\n\n### Parameters\n\n- `obj`\n  - : The object on which to define the property.\n- `prop`\n  - : The name or `Symbol` of the property to be defined or modified.\n- `descriptor`\n  - : The descriptor for the property being defined or modified.\n\n### Return value\n\nThe object that was passed to the function.\n\n## Description\n\nThis method allows a precise addition to or modification of a property on an object.\nNormal property addition through assignment creates properties which show up during\nproperty enumeration (`for...in` loop or\n[`Object.keys`](../../globals/Object/keys.mdx) method), whose values may be changed, and which may be\ndeleted. This method allows these extra details\nto be changed from their defaults. By default, properties added using\n`Object.defineProperty()` are not writable, not enumerable, and not configurable.\n\nProperty descriptors present in objects come in two main flavors: data descriptors and\naccessor descriptors. A **data descriptor** is a property that has a\nvalue, which may or may not be writable. An **accessor descriptor** is a\nproperty described by a getter-setter pair of functions. A descriptor must be one of\nthese two flavors; it cannot be both.\n\nBoth data and accessor descriptors are objects. They share the following optional keys\n(please note: the **defaults** mentioned here are in the case of defining\nproperties using `Object.defineProperty()`):\n\n- `configurable`\n\n  - : when this is set to `false`,\n\n    - the type of this property cannot be changed between data property and accessor property, and\n    - the property may not be deleted, and\n    - other attributes of its descriptor cannot be changed (however, if it's a data descriptor with `writable: true`, the `value` can be changed, and `writable` can be changed to `false`).\n\n    **Defaults to `false`.**\n\n- `enumerable`\n  - : `true` if and only if this property shows up during enumeration of the\n    properties on the corresponding object.\n    **Defaults to `false`.**\n\nA **data descriptor** also has the following optional keys:\n\n- `value`\n  - : The value associated with the property. Can be any valid JavaScript value (number,\n    object, function, etc.).\n    **Defaults to [`undefined`](../../globals/undefined.mdx).**\n- `writable`\n  - : `true` if the value associated with the property may be changed with an\n    assignment operator.\n    **Defaults to `false`.**\n\nAn **accessor descriptor** also has the following optional keys:\n\n- `get`\n  - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no getter. When the property is accessed, this function is called without\n    arguments and with `this` set to the object through which the property is\n    accessed (this may not be the object on which the property is defined due to\n    inheritance). The return value will be used as the value of the property.\n    **Defaults to [`undefined`](../../globals/undefined.mdx).**\n- `set`\n  - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no setter. When the property is assigned, this function is called with one\n    argument (the value being assigned to the property) and with `this` set to\n    the object through which the property is assigned.\n    **Defaults to [`undefined`](../../globals/undefined.mdx).**\n\nIf a descriptor has neither of `value`, `writable`,\n`get` and `set` keys, it is treated as a data descriptor. If a\ndescriptor has both \\[`value` or `writable`] and \\[`get` or `set`] keys, an exception is thrown.\n\nBear in mind that these attributes are not necessarily the descriptor's own properties.\nInherited properties will be considered as well. In order to ensure these defaults are\npreserved, you might freeze existing objects in the descriptor object's prototype chain upfront, specify all\noptions explicitly, or point to [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) with [`Object.create(null)`](../../globals/Object/create.mdx).\n\n```js\nconst obj = {};\n// 1. Using a null prototype: no inherited properties\nconst descriptor = Object.create(null);\ndescriptor.value = 'static';\n\n// not enumerable, not configurable, not writable as defaults\nObject.defineProperty(obj, 'key', descriptor);\n\n// 2. Being explicit by using a throw-away object literal with all attributes present\nObject.defineProperty(obj, 'key2', {\n  enumerable: false,\n  configurable: false,\n  writable: false,\n  value: 'static'\n});\n\n// 3. Recycling same object\nfunction withValue(value) {\n  const d = withValue.d || (\n    withValue.d = {\n      enumerable: false,\n      writable: false,\n      configurable: false,\n      value,\n    }\n  );\n\n  // avoiding duplicate operation for assigning value\n  if (d.value !== value) d.value = value;\n\n  return d;\n}\n// and\nObject.defineProperty(obj, 'key', withValue('static'));\n\n// if freeze is available, prevents adding or\n// removing the object prototype properties\n// (value, get, set, enumerable, writable, configurable)\n(Object.freeze || Object)(Object.prototype);\n```\n\nWhen the property already exists, `Object.defineProperty()` attempts to modify the property according to the values in the descriptor and the property's current configuration.\n\nIf the old descriptor had its `configurable` attribute set to `false`, the property is said to be _non-configurable_. It is not possible to change any attribute of a non-configurable accessor property, and it is not possible to switch between data and accessor property types. For data properties with `writable: true`, it is possible to modify the value and change the `writable` attribute from `true` to `false`. A [`TypeError`](../../globals/TypeError/TypeError.mdx) is thrown when attempts are made to change non-configurable property attributes (except `value` and `writable`, if permitted), except when defining a value same as the original value on a data property.\n\nWhen the current property is configurable, defining an attribute to `undefined` effectively deletes it. For example, if `o.k` is an accessor property, `Object.defineProperty(o, \"k\", { set: undefined })` will remove the setter, making `k` only have a getter and become readonly. If an attribute is absent from the new descriptor, the old descriptor attribute's value is kept (it won't be implicitly re-defined to `undefined`). It is possible to toggle between data and accessor property by giving a descriptor of a different \"flavor\". For example, if the new descriptor is a data descriptor (with `value` or `writable`), the original descriptor's `get` and `set` attributes will both be dropped.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Object/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.entries()\n\nThe **`Object.entries()`** method returns an array of a given object's own enumerable string-keyed property key-value pairs.\n\n## Syntax\n\n```js\nObject.entries(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : An object.\n\n### Return value\n\nAn array of the given object's own enumerable string-keyed property key-value pairs. Each key-value pair is an array with two elements: the first element is the property key (which is always a string), and the second element is the property value.\n\n## Description\n\n`Object.entries()` returns an array whose elements are arrays corresponding to the enumerable string-keyed property key-value pairs found directly upon `object`. This is the same as iterating with a `for...in` loop, except that a `for...in` loop enumerates properties in the prototype chain as well. The order of the array returned by `Object.entries()` is the same as that provided by a `for...in` loop.\n\nIf you only need the property keys, use [`Object.keys()`](../../globals/Object/keys.mdx) instead. If you only need the property values, use [`Object.values()`](../../globals/Object/values.mdx) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Object/freeze.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.freeze()\n\nThe **`Object.freeze()`** method _freezes_ an object. Freezing an object [prevents extensions](../../globals/Object/preventExtensions.mdx) and makes existing properties non-writable and non-configurable. A frozen object can no longer be changed: new properties cannot be added, existing properties cannot be removed, their enumerability, configurability, writability, or value cannot be changed, and the object's prototype cannot be re-assigned. `freeze()` returns the same object that was passed in.\n\nFreezing an object is the highest integrity level that JavaScript provides.\n\n## Syntax\n\n```js\nObject.freeze(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object to freeze.\n\n### Return value\n\nThe object that was passed to the function.\n\n## Description\n\nFreezing an object is equivalent to [preventing extensions](../../globals/Object/preventExtensions.mdx) and then changing all existing [properties' descriptors'](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty#description) `configurable` to `false` — and for data properties, `writable` to `false` as well. Nothing can be added to or removed from the properties set of a frozen object. Any attempt to do so will fail, either silently or by throwing a [`TypeError`](../../globals/TypeError/TypeError.mdx) exception (most commonly, but not exclusively, when in \"strict mode\").\n\nFor data properties of a frozen object, their values cannot be changed since the writable and\nconfigurable attributes are set to false. Accessor properties (getters and setters) work the same — the property value returned by the getter may still change, and the setter can still be called without throwing errors when setting the property. Note that values\nthat are objects can still be modified, unless they are also frozen. As an object, an\narray can be frozen; after doing so, its elements cannot be altered and no elements can\nbe added to or removed from the array.\n\n`freeze()` returns the same object that was passed into the function. It\n_does not_ create a frozen copy.\n\nA `TypedArray` or a [`DataView`](../../globals/DataView/DataView.mdx) with elements will cause a [`TypeError`](../../globals/TypeError/TypeError.mdx),\nas they are views over memory and will definitely cause other possible issues:\n\n```js\nObject.freeze(new Uint8Array(0)) // No elements\n// Uint8Array []\n\nObject.freeze(new Uint8Array(1)) // Has elements\n// TypeError: Cannot freeze array buffer views with elements\n\nObject.freeze(new DataView(new ArrayBuffer(32))) // No elements\n// DataView {}\n\nObject.freeze(new Float64Array(new ArrayBuffer(64), 63, 0)) // No elements\n// Float64Array []\n\nObject.freeze(new Float64Array(new ArrayBuffer(64), 32, 2)) // Has elements\n// TypeError: Cannot freeze array buffer views with elements\n```\n\nNote that as the standard three properties (`buf.byteLength`,\n`buf.byteOffset` and `buf.buffer`) are read-only (as are those of\nan `ArrayBuffer`, there is no reason for\nattempting to freeze these properties.\n\nUnlike [`Object.seal()`](../../globals/Object/seal.mdx), existing properties in objects frozen with `Object.freeze()` are made immutable and data properties cannot be re-assigned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Object/fromEntries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.fromEntries()\n\nThe **`Object.fromEntries()`** method transforms a list of key-value pairs into an object.\n\n## Syntax\n\n```js\nObject.fromEntries(iterable)\n```\n\n### Parameters\n\n- `iterable`\n\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol), such as an `Array` or [Map](../../globals/Map/Map.mdx), containing a list of objects. Each object should have two properties:\n\n    - `0`\n      - : A string or `Symbol` representing the property key.\n    - `1`\n      - : The property value.\n\n    Typically, this object is implemented as a two-element array, with the first element being the property key and the second element being the property value.\n\n### Return value\n\nA new object whose properties are given by the entries of the iterable.\n\n## Description\n\nThe `Object.fromEntries()` method takes a list of key-value pairs and returns a new object whose properties are given by those entries. The `iterable` argument is expected to be an object that implements an `@@iterator` method. The method returns an iterator object that produces two-element array-like objects. The first element is a value that will be used as a property key, and the second element is the value to associate with that property key.\n\n`Object.fromEntries()` performs the reverse of [`Object.entries()`](../../globals/Object/entries.mdx), except that `Object.entries()` only returns string-keyed properties, while `Object.fromEntries()` can also create symbol-keyed properties.\n\n> **Note:** Unlike [`Array.from()`](../../globals/Array/from.mdx), `Object.fromEntries()` does not use the value of `this`, so calling it on another constructor does not create objects of that type.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Object/getOwnPropertyDescriptor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertyDescriptor()\n\nThe **`Object.getOwnPropertyDescriptor()`** method returns an\nobject describing the configuration of a specific property on a given object (that is,\none directly present on an object and not in the object's prototype chain). The object\nreturned is mutable but mutating it has no effect on the original property's\nconfiguration.\n\n## Syntax\n\n```js\nObject.getOwnPropertyDescriptor(obj, prop)\n```\n\n### Parameters\n\n- `obj`\n  - : The object in which to look for the property.\n- `prop`\n  - : The name or `Symbol` of the property whose description is to be\n    retrieved.\n\n### Return value\n\nA property descriptor of the given property if it exists on the object,\n[`undefined`](../../globals/undefined.mdx) otherwise.\n\n## Description\n\nThis method permits examination of the precise description of a property. A\n_property_ in JavaScript consists of either a string-valued name or a\n`Symbol` and a property descriptor. Further information about property\ndescriptor types and their attributes can be found in\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx).\n\nA _property descriptor_ is a record with some of the following attributes:\n\n- `value`\n  - : The value associated with the property (data descriptors only).\n- `writable`\n  - : `true` if and only if the value associated with the property may be\n    changed (data descriptors only).\n- `get`\n  - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no getter (accessor descriptors only).\n- `set`\n  - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no setter (accessor descriptors only).\n- `configurable`\n  - : `true` if and only if the type of this property descriptor may be changed\n    and if the property may be deleted from the corresponding object.\n- `enumerable`\n  - : `true` if and only if this property shows up during enumeration of the\n    properties on the corresponding object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Object/getOwnPropertyDescriptors.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertyDescriptors()\n\nThe **`Object.getOwnPropertyDescriptors()`** method returns all\nown property descriptors of a given object.\n\n## Syntax\n\n```js\nObject.getOwnPropertyDescriptors(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object for which to get all own property descriptors.\n\n### Return value\n\nAn object containing all own property descriptors of an object. Might be an empty\nobject, if there are no properties.\n\n## Description\n\nThis method permits examination of the precise description of all own properties of an\nobject. A _property_ in JavaScript consists of either a string-valued name or a\n`Symbol` and a property descriptor. Further information about property\ndescriptor types and their attributes can be found in\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx).\n\nA _property descriptor_ is a record with some of the following attributes:\n\n- `value`\n  - : The value associated with the property (data descriptors only).\n- `writable`\n  - : `true` if and only if the value associated with the property may be\n    changed (data descriptors only).\n- `get`\n  - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no getter (accessor descriptors only).\n- `set`\n  - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no setter (accessor descriptors only).\n- `configurable`\n  - : `true` if and only if the type of this property descriptor may be changed\n    and if the property may be deleted from the corresponding object.\n- `enumerable`\n  - : `true` if and only if this property shows up during enumeration of the\n    properties on the corresponding object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Object/getOwnPropertyNames.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertyNames()\n\nThe **`Object.getOwnPropertyNames()`** method returns an array of all properties (including non-enumerable properties except for those which use Symbol) found directly in a given object.\n\n## Syntax\n\n```js\nObject.getOwnPropertyNames(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object whose enumerable and non-enumerable properties are to be returned.\n\n### Return value\n\nAn array of strings that corresponds to the properties found directly in the given object.\n\n## Description\n\n`Object.getOwnPropertyNames()` returns an array whose elements are strings corresponding to the enumerable and non-enumerable properties found directly in a given object `obj`. The ordering of the enumerable properties in the array is consistent with the ordering exposed by a `for...in` loop (or by [`Object.keys()`](../../globals/Object/keys.mdx)) over the properties of the object. The non-negative integer keys of the object (both enumerable and non-enumerable) are added in ascending order to the array first, followed by the string keys in the order of insertion.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Object/getOwnPropertySymbols.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertySymbols()\n\nThe **`Object.getOwnPropertySymbols()`** method returns an array of all symbol properties found directly upon a given object.\n\n## Syntax\n\n```js\nObject.getOwnPropertySymbols(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object whose symbol properties are to be returned.\n\n### Return value\n\nAn array of all symbol properties found directly upon the given object.\n\n## Description\n\nSimilar to [`Object.getOwnPropertyNames()`](../../globals/Object/getOwnPropertyNames.mdx), you can get all symbol properties of a given object as an array of symbols. Note that [`Object.getOwnPropertyNames()`](../../globals/Object/getOwnPropertyNames.mdx) itself does not contain the symbol properties of an object and only the string properties.\n\nAs all objects have no own symbol properties initially, `Object.getOwnPropertySymbols()` returns an empty array unless you have set symbol properties on your object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Object/getPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getPrototypeOf()\n\nThe **`Object.getPrototypeOf()`** method returns the prototype\n(i.e. the value of the internal `[[Prototype]]` property) of the specified\nobject.\n\n## Syntax\n\n```js\nObject.getPrototypeOf(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object whose prototype is to be returned.\n\n### Return value\n\nThe prototype of the given object, which may be `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Object/hasOwn.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.hasOwn()\n\nThe **`Object.hasOwn()`** static method returns `true` if the specified object has the indicated property as its _own_ property.\nIf the property is inherited, or does not exist, the method returns `false`.\n\n> **Note:** `Object.hasOwn()` is intended as a replacement for [`Object.prototype.hasOwnProperty()`](../../globals/Object/prototype/hasOwnProperty.mdx).\n\n\n\n## Syntax\n\n```js\nhasOwn(instance, prop)\n```\n\n### Parameters\n\n- `instance`\n  - : The JavaScript object instance to test.\n- `prop`\n  - : The `String` name or [Symbol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol) of the property to test.\n\n### Return value\n\n`true` if the specified object has directly defined the specified property.\nOtherwise `false`\n\n## Description\n\nThe **`Object.hasOwn()`** method returns `true` if the specified property is a\ndirect property of the object — even if the property value is `null` or `undefined`.\nThe method returns `false` if the property is inherited, or has not been declared at all.\nUnlike the `in` operator, this\nmethod does not check for the specified property in the object's prototype chain.\n\nIt is recommended over [`Object.prototype.hasOwnProperty()`](../../globals/Object/prototype/hasOwnProperty.mdx) because\nit works for objects created using `Object.create(null)` and with objects that\nhave overridden the inherited `hasOwnProperty()` method. While it is possible to\nworkaround these problems by calling `Object.prototype.hasOwnProperty()` on an\nexternal object, `Object.hasOwn()` is more intuitive.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Object/is.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.is()\n\nThe **`Object.is()`** method determines whether two values are [the same value](https://developer.mozilla.org/docs/Web/JavaScript/Equality_comparisons_and_sameness#same-value_equality_using_object.is).\n\n## Syntax\n\n```js\nObject.is(value1, value2)\n```\n\n### Parameters\n\n- `value1`\n  - : The first value to compare.\n- `value2`\n  - : The second value to compare.\n\n### Return value\n\nA boolean indicating whether or not the two arguments are the same value.\n\n## Description\n\n`Object.is()` determines whether two values are [the same value](https://developer.mozilla.org/docs/Web/JavaScript/Equality_comparisons_and_sameness#same-value_equality_using_object.is). Two values are the same if one of the following holds:\n\n- both [`undefined`](../../globals/undefined.mdx)\n- both `null`\n- both `true` or both `false`\n- both strings of the same length with the same characters in the same order\n- both the same object (meaning both values reference the same object in memory)\n- both `BigInts` with the same numeric value\n- both `Symbols` that reference the same symbol value\n- both numbers and\n\n  - both `+0`\n  - both `-0`\n  - both [`NaN`](../../globals/NaN.mdx)\n  - or both non-zero, not [`NaN`](../../globals/NaN.mdx), and have the same value\n\n`Object.is()` is not equivalent to the [`==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Equality) operator. The `==` operator applies various coercions to both sides (if they are not the same type) before testing for equality (resulting in such behavior as `\"\" == false` being `true`), but `Object.is()` doesn't coerce either value.\n\n`Object.is()` is also _not_ equivalent to the [`===`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) operator. The only difference between `Object.is()` and `===` is in their treatment of signed zeros and `NaN` values. The `===` operator (and the `==` operator) treats the number values `-0` and `+0` as equal, but treats [`NaN`](../../globals/NaN.mdx) as not equal to each other.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Object/isExtensible.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.isExtensible()\n\nThe **`Object.isExtensible()`** method determines if an object\nis extensible (whether it can have new properties added to it).\n\n## Syntax\n\n```js\nObject.isExtensible(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be checked.\n\n### Return value\n\nA `Boolean` indicating whether or not the given object is extensible.\n\n## Description\n\nObjects are extensible by default: they can have new properties added to them, and their `[[Prototype]]` can be re-assigned. An object can be marked as non-extensible using one of [`Object.preventExtensions()`](../../globals/Object/preventExtensions.mdx), [`Object.seal()`](../../globals/Object/seal.mdx), [`Object.freeze()`](../../globals/Object/freeze.mdx), or [`Reflect.preventExtensions()`](../../globals/Reflect/preventExtensions.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Object/isFrozen.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.isFrozen()\n\nThe **`Object.isFrozen()`** determines if an object is\n[frozen](../../globals/Object/freeze.mdx).\n\n## Syntax\n\n```js\nObject.isFrozen(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be checked.\n\n### Return value\n\nA `Boolean` indicating whether or not the given object is frozen.\n\n## Description\n\nAn object is frozen if and only if it is not [extensible](../../globals/Object/isExtensible.mdx), all its properties are non-configurable, and all its data\nproperties (that is, properties which are not accessor properties with getter or setter\ncomponents) are non-writable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Object/isSealed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.isSealed()\n\nThe **`Object.isSealed()`** method determines if an object is\nsealed.\n\n## Syntax\n\n```js\nObject.isSealed(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be checked.\n\n### Return value\n\nA `Boolean` indicating whether or not the given object is sealed.\n\n## Description\n\nReturns `true` if the object is sealed, otherwise `false`. An\nobject is sealed if it is not [extensible](../../globals/Object/isExtensible.mdx) and\nif all its properties are non-configurable and therefore not removable (but not\nnecessarily non-writable).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Object/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.keys()\n\nThe **`Object.keys()`** method returns an array of a given object's own enumerable string-keyed property names.\n\n## Syntax\n\n```js\nObject.keys(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : An object.\n\n### Return value\n\nAn array of strings representing the given object's own enumerable string-keyed property keys.\n\n## Description\n\n`Object.keys()` returns an array whose elements are strings corresponding to the enumerable string-keyed property names found directly upon `object`. This is the same as iterating with a `for...in` loop, except that a `for...in` loop enumerates properties in the prototype chain as well. The order of the array returned by `Object.keys()` is the same as that provided by a `for...in` loop.\n\nIf you need the property values, use [`Object.values()`](../../globals/Object/values.mdx) instead. If you need both the property keys and values, use [`Object.entries()`](../../globals/Object/entries.mdx) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Object/preventExtensions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.preventExtensions()\n\nThe **`Object.preventExtensions()`** method prevents new\nproperties from ever being added to an object (i.e. prevents future extensions to the\nobject). It also prevents the object's prototype from being re-assigned.\n\n## Syntax\n\n```js\nObject.preventExtensions(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be made non-extensible.\n\n### Return value\n\nThe object being made non-extensible.\n\n## Description\n\nAn object is extensible if new properties can be added to it.\n`Object.preventExtensions()` marks an object as no longer extensible, so that\nit will never have properties beyond the ones it had at the time it was marked as\nnon-extensible. Note that the properties of a non-extensible object, in general, may\nstill be _deleted_. Attempting to add new properties to a non-extensible object\nwill fail, either silently or, in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), throwing a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\nUnlike [`Object.seal()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/seal) and [`Object.freeze()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze), `Object.preventExtensions()` invokes an intrinsic JavaScript behavior and cannot be replaced with a composition of several other operations. It also has its `Reflect` counterpart (which only exists for intrinsic operations), [`Reflect.preventExtensions()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Reflect/preventExtensions).\n\n`Object.preventExtensions()` only prevents addition of own properties. Properties can still be added to the object prototype.\n\nThis method makes the `[[Prototype]]` of the target immutable; any `[[Prototype]]` re-assignment will throw a `TypeError`. This behavior is specific to the internal `[[Prototype]]` property; other properties of the target object will remain mutable.\n\nThere is no way to make an object extensible again once it has been made non-extensible.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Object/prototype/constructor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.constructor\n\nThe **`constructor`** data property of an `Object` instance returns a reference to the constructor function that created the instance object. Note that the value of this property is a reference to _the function itself_, not a string containing the function's name.\n\n> **Note:** This is a property of JavaScript objects. For the `constructor` method in classes, see [its own reference page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/constructor).\n\n## Value\n\nA reference to the constructor function that created the instance object.\n\n> **Note:** This property is created by default on the [`prototype`](../../../globals/Function/prototype/) property of every constructor function and is inherited by all objects created by that constructor.\n\n## Description\n\nAny object (with the exception of [`null` prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) will have a `constructor` property on its `[[Prototype]]`. Objects created with literals will also have a `constructor` property that points to the constructor type for that object — for example, array literals create `Array` objects, and [object literals](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Object_initializer) create plain objects.\n\n```js\nconst o1 = {};\no1.constructor === Object; // true\n\nconst o2 = new Object();\no2.constructor === Object; // true\n\nconst a1 = [];\na1.constructor === Array; // true\n\nconst a2 = new Array();\na2.constructor === Array; // true\n\nconst n = 3;\nn.constructor === Number; // true\n```\n\nNote that `constructor` usually comes from the constructor's [`prototype`](../../../globals/Function/prototype/) property. If you have a longer prototype chain, you can usually expect every object in the chain to have a `constructor` property.\n\n```js\nconst o = new TypeError(); // Inheritance: TypeError -> Error -> Object\nconst proto = Object.getPrototypeOf;\nproto(o).constructor === TypeError; // true\nproto(proto(o)).constructor === Error; // true\nproto(proto(proto(o))).constructor === Object; // true\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Object/prototype/hasOwnProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.hasOwnProperty()\n\nThe **`hasOwnProperty()`** method returns a boolean indicating whether the\nobject has the specified property as its own property (as opposed to inheriting\nit).\n\n> **Note:** [`Object.hasOwn()`](../../../globals/Object/hasOwn.mdx) is recommended over\n> `hasOwnProperty()`, in browsers where it is supported.\n\n## Syntax\n\n```js\nhasOwnProperty(prop)\n```\n\n### Parameters\n\n- `prop`\n  - : The `String` name or `Symbol` of the property to test.\n\n### Return value\n\nReturns `true` if the object has the specified property as own property; `false`\notherwise.\n\n## Description\n\nThe **`hasOwnProperty()`** method returns `true` if the specified property is a\ndirect property of the object — even if the value is `null` or `undefined`. The\nmethod returns `false` if the property is inherited, or has not been declared at\nall. Unlike the `in` operator, this\nmethod does not check for the specified property in the object's prototype\nchain.\n\nThe method can be called on _most_ JavaScript objects, because most objects\ndescend from `Object`, and hence inherit its methods. For\nexample `Array` is an `Object`, so you can\nuse `hasOwnProperty()` method to check whether an index exists:\n\n```js\nconst fruits = ['Apple', 'Banana','Watermelon', 'Orange'];\nfruits.hasOwnProperty(3);   // true ('Orange')\nfruits.hasOwnProperty(4);   // false - not defined\n```\n\nThe method will not be available in objects where it is reimplemented, or on\nobjects created using `Object.create(null)` (as these don't inherit from\n`Object.prototype`). Examples for these cases are given below.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Object/prototype/isPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.isPrototypeOf()\n\nThe **`isPrototypeOf()`** method checks if an object exists in another object's prototype chain.\n\n> **Note:** `isPrototypeOf()` differs from the [`instanceof`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/instanceof) operator. In the expression `object instanceof AFunction`, `object`'s prototype chain is checked against `AFunction.prototype`, not against `AFunction` itself.\n\n## Syntax\n\n```js\nisPrototypeOf(object)\n```\n\n### Parameters\n\n- `object`\n  - : The object whose prototype chain will be searched.\n\n### Return value\n\nA boolean indicating whether the calling object (`this`) lies in the prototype chain of `object`. Directly returns `false` when `object` is not an object (i.e. a primitive).\n\n### Errors thrown\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown if `this` is `null` or `undefined` (because it can't be [converted to an object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#object_coercion)).\n\n## Description\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `isPrototypeOf()` method. This method allows you to check whether or not the object exists within another object's prototype chain. If the `object` passed as the parameter is not an object (i.e. a primitive), the method directly returns `false`. Otherwise, the `this` value is [converted to an object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#object_coercion), and the prototype chain of `object` is searched for the `this` value, until the end of the chain is reached or the `this` value is found.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Object/prototype/propertyIsEnumerable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.propertyIsEnumerable()\n\nThe **`propertyIsEnumerable()`** method returns a boolean indicating whether the specified property is the object's [enumerable own](https://developer.mozilla.org/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) property.\n\n## Syntax\n\n```js\npropertyIsEnumerable(prop)\n```\n\n### Parameters\n\n- `prop`\n  - : The name of the property to test. Can be a string or a `Symbol`.\n\n### Return value\n\nA boolean value indicating whether the specified property is enumerable and is the object's own property.\n\n## Description\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `propertyIsEnumerable()` method. This method determines if the specified property, string or symbol, is an enumerable own property of the object. If the object does not have the specified property, this method returns `false`.\n\nThis method is equivalent to [`Object.getOwnPropertyDescriptor(obj, prop)?.enumerable ?? false`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Object/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string representing the object. This method is meant to be overridden by derived objects for locale-specific purposes.\n\n## Syntax\n\n```js\ntoLocaleString()\n```\n\n### Parameters\n\nNone. However, all objects that override this method are expected to accept at most two parameters, corresponding to `locales` and `options`, such as [`Date.prototype.toLocaleString()`](../../../globals/Date/prototype/toLocaleString.mdx). The parameter positions should not be used for any other purpose.\n\n### Return value\n\nThe return value of calling `this.toString()`.\n\n## Description\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `toLocaleString()` method. `Object`'s `toLocaleString` returns the result of calling [`this.toString()`](../../../globals/Object/prototype/toString.mdx).\n\nThis function is provided to give objects a generic `toLocaleString` method, even though not all may use it. In the core language, these built-in objects override `toLocaleString` to provide locale-specific formatting:\n\n- `Array`: [`Array.prototype.toLocaleString()`](../../../globals/Array/prototype/toLocaleString.mdx)\n- `Number`: [`Number.prototype.toLocaleString()`](../../../globals/Number/prototype/toLocaleString.mdx)\n- `Date`: [`Date.prototype.toLocaleString()`](../../../globals/Date/prototype/toLocaleString.mdx)\n- `BigInt`: [`BigInt.prototype.toLocaleString()`](../../../globals/BigInt/prototype/toLocaleString.mdx)\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Object/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.toString()\n\nThe **`toString()`** method returns a string representing the object. This method is meant to be overridden by derived objects for custom [type conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) logic.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nBy default `toString()` takes no parameters. However, objects that inherit from `Object` may override it with their own implementations that do take parameters. For example, the [`Number.prototype.toString()`](../../../globals/Number/prototype/toString.mdx) and [`BigInt.prototype.toString()`](../../../globals/BigInt/prototype/toString.mdx) methods take an optional `radix` parameter.\n\n### Return value\n\nA string representing the object.\n\n## Description\n\nJavaScript calls the `toString` method to [convert an object to a primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion). You rarely need to invoke the `toString` method yourself; JavaScript automatically invokes it when encountering an object where a primitive value is expected.\n\nThis method is called in priority by [string conversion](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion), but [numeric conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#numeric_coercion) and [primitive conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion) call `valueOf()` in priority. However, because the base [`valueOf()`](../../../globals/Object/prototype/valueOf.mdx) method returns an object, the `toString()` method is usually called in the end, unless the object overrides `valueOf()`. For example, `+[1]` returns `1`, because its [`toString`](../../../globals/Array/prototype/toString.mdx) method returns `\"1\"`, which is then converted to a number.\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `toString()` method. When you create a custom object, you can override `toString()` to call a custom method, so that your custom object can be converted to a string value. Alternatively, you can add a [`Symbol.toPrimitive`](../../../globals/Symbol/toPrimitive.mdx) method, which allows even more control over the conversion process, and will always be preferred over `valueOf` or `toString` for any type conversion.\n\nTo use the base `Object.prototype.toString()` with an object that has it overridden (or to invoke it on `null` or `undefined`), you need to call [`Function.prototype.call()`](../../../globals/Function/prototype/call.mdx) or [`Function.prototype.apply()`](../../../globals/Function/prototype/apply.mdx) on it, passing the object you want to inspect as the first parameter (called `thisArg`).\n\n```js\nconst arr = [1, 2, 3];\n\narr.toString(); // \"1,2,3\"\nObject.prototype.toString.call(arr); // \"[object Array]\"\n```\n\n`Object.prototype.toString()` returns `\"[object Type]\"`, where `Type` is the object type. If the object has a [`Symbol.toStringTag`](../../../globals/Symbol/toStringTag.mdx) property whose value is a string, that value will be used as the `Type`. Many built-in objects, including [`Map`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map) and [`Symbol`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol), have a `Symbol.toStringTag`. Some objects predating ES6 do not have `Symbol.toStringTag`, but have a special tag nonetheless. They include (the tag is the same as the type name given below):\n\n- [`Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\n- [`Function`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions) (anything whose [`typeof`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/typeof) returns `\"function\"`)\n- [`Error`](../../../globals/Error/Error.mdx)\n- [`Boolean`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)\n- [`Number`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)\n- [`String`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\n- [`Date`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date)\n- [`RegExp`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp)\n\nThe [`arguments`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/arguments) object returns `\"[object Arguments]\"`. Everything else, including user-defined classes, unless with a custom `Symbol.toStringTag`, will return `\"[object Object]\"`.\n\n`Object.prototype.toString()` invoked on [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) returns `[object Null]` and `[object Undefined]`, respectively.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Object/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.valueOf()\n\nThe **`valueOf()`** method of `Object` converts the `this` value [to an object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#object_coercion). This method is meant to be overridden by derived objects for custom [type conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) logic.\n\n\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nThe `this` value, converted to an object.\n\n> **Note:** In order for `valueOf` to be useful during type conversion, it must return a primitive. Because all primitive types have their own `valueOf()` methods, calling `aPrimitiveValue.valueOf()` generally does not invoke `Object.prototype.valueOf()`.\n\n## Description\n\nJavaScript calls the `valueOf` method to [convert an object to a primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion). You rarely need to invoke the `valueOf` method yourself; JavaScript automatically invokes it when encountering an object where a primitive value is expected.\n\nThis method is called in priority by [numeric conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#numeric_coercion) and [primitive conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion), but [string conversion](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) calls `toString()` in priority, and `toString()` is very likely to return a string value (even for the [`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx) base implementation), so `valueOf()` is usually not called in this case.\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `toString()` method. The `Object.prototype.valueOf()` base implementation is deliberately useless: by returning an object, its return value will never be used by any [primitive conversion algorithm](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion). Many built-in objects override this method to return an appropriate primitive value. When you create a custom object, you can override `valueOf()` to call a custom method, so that your custom object can be converted to a primitive value. Generally, `valueOf()` is used to return a value that is most meaningful for the object — unlike `toString()`, it does not need to be a string. Alternatively, you can add a [`Symbol.toPrimitive`](../../../globals/Symbol/toPrimitive.mdx) method, which allows even more control over the conversion process, and will always be preferred over `valueOf` or `toString` for any type conversion.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Object/seal.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.seal()\n\nThe **`Object.seal()`** method _seals_ an object. Sealing an object [prevents extensions](../../globals/Object/preventExtensions.mdx) and makes existing properties non-configurable. A sealed object has a fixed set of properties: new properties cannot be added, existing properties cannot be removed, their enumerability and configurability cannot be changed, and its prototype cannot be re-assigned. Values of existing properties can still be changed as long as they are writable. `seal()` returns the same object that was passed in.\n\n## Syntax\n\n```js\nObject.seal(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be sealed.\n\n### Return value\n\nThe object being sealed.\n\n## Description\n\nSealing an object is equivalent to [preventing extensions](../../globals/Object/preventExtensions.mdx) and then changing all existing properties' descriptors to `configurable: false`. This has the effect of making the set of properties on the object fixed. Making all properties non-configurable\nalso prevents them from being converted from data properties to accessor properties and\nvice versa, but it does not prevent the values of data properties from being changed.\nAttempting to delete or add properties to a sealed object, or to convert a data property\nto accessor or vice versa, will fail, either silently or by throwing a\n[`TypeError`](../../globals/TypeError/TypeError.mdx) (most commonly, although not exclusively, when in \"strict mode\" code).\n\nThe prototype chain remains untouched. However, due to the effect of [preventing extensions](../../globals/Object/preventExtensions.mdx), the `[[Prototype]]` cannot be reassigned.\n\nUnlike [`Object.freeze()`](../../globals/Object/freeze.mdx), objects sealed with `Object.seal()` may have their existing\nproperties changed, as long as they are writable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Object/setPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.setPrototypeOf()\n\nThe **`Object.setPrototypeOf()`** method sets the prototype (i.e., the internal `[[Prototype]]` property) of a specified object to another object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null).\n\n> **Warning:** Changing the `[[Prototype]]` of an object is, by the nature of how modern JavaScript engines optimize property accesses, currently a very slow operation in every browser and JavaScript engine. In addition, the effects of altering inheritance are subtle and far-flung, and are not limited to the time spent in the `Object.setPrototypeOf(...)` statement, but may extend to **_any_** code that has access to any object whose `[[Prototype]]` has been altered. You can read more in [JavaScript engine fundamentals: optimizing prototypes](https://mathiasbynens.be/notes/prototypes).\n>\n> Because this feature is a part of the language, it is still the burden on engine developers to implement that feature performantly (ideally). Until engine developers address this issue, if you are concerned about performance, you should avoid setting the `[[Prototype]]` of an object. Instead, create a new object with the desired `[[Prototype]]` using [`Object.create()`](../../globals/Object/create.mdx).\n\n## Syntax\n\n```js\nObject.setPrototypeOf(obj, prototype)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which is to have its prototype set.\n- `prototype`\n  - : The object's new prototype (an object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null)).\n\n### Return value\n\nThe specified object.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if one of the following conditions is met:\n    - The `obj` parameter is [non-extensible](../../globals/Object/isExtensible.mdx), or it's an [immutable prototype exotic object](https://tc39.es/ecma262/#sec-immutable-prototype-exotic-objects), such as `Object.prototype`.\n    - The `prototype` parameter is not an object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null).\n\n## Description\n\n`Object.setPrototypeOf()` is generally considered the proper way to set the prototype of an object.\n\nIf the `obj` parameter is not an object (e.g. number, string, etc.), this method does nothing.\n\nFor security concerns, there are certain built-in objects that are designed to have an _immutable prototype_. This prevents prototype pollution attacks, especially [proxy-related ones](https://github.com/tc39/ecma262/issues/272). The core language only specifies `Object.prototype` as an immutable prototype exotic object, whose prototype is always `null`.\n\n```js\nObject.isExtensible(Object.prototype); // true; you can add more properties\nObject.setPrototypeOf(Object.prototype, {}); // TypeError: Immutable prototype object '#<Object>' cannot have their prototype set\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Object/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.values()\n\nThe **`Object.values()`** method returns an array of a given object's own enumerable string-keyed property values.\n\n## Syntax\n\n```js\nObject.values(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : An object.\n\n### Return value\n\nAn array containing the given object's own enumerable string-keyed property values.\n\n## Description\n\n`Object.values()` returns an array whose elements are strings corresponding to the enumerable string-keyed property values found directly upon `object`. This is the same as iterating with a `for...in` loop, except that a `for...in` loop enumerates properties in the prototype chain as well. The order of the array returned by `Object.values()` is the same as that provided by a `for...in` loop.\n\nIf you need the property keys, use [`Object.keys()`](../../globals/Object/keys.mdx) instead. If you need both the property keys and values, use [`Object.entries()`](../../globals/Object/entries.mdx) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Promise/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get Promise[Symbol.species]\n\nThe **`Promise[Symbol.species]`** accessor property returns the constructor used to construct return values from promise methods.\n\n> **Warning:** The existence of `Symbol.species` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Syntax\n\n```js\nPromise[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct return values from promise chaining methods that create new promises.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `Promise` objects. Subclass constructors may override it to change the constructor assignment. The default implementation is basically:\n\n```js\n// Hypothetical underlying implementation for illustration\nclass Promise {\n  static get [Symbol.species]() {\n    return this;\n  }\n}\n```\n\nBecause of this polymorphic implementation, `Symbol.species` of derived subclasses would also return the constructor itself by default.\n\n```js\nclass SubPromise extends Promise {}\nSubPromise[Symbol.species] === Promise; // true\n```\n\nPromise chaining methods — [`then()`](../../globals/Promise/prototype/then.mdx), [`finally()`](../../globals/Promise/prototype/finally.mdx) — return new promise objects. They get the constructor to construct the new promise through `this.constructor[Symbol.species]`. If `this.constructor` is `undefined`, or if `this.constructor[Symbol.species]` is `undefined` or `null`, the default [`Promise()`](../../globals/Promise/Promise.mdx) constructor is used. Otherwise, the constructor returned by `this.constructor[Symbol.species]` is used to construct the new promise object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Promise/Promise.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise()\n\nThe **`Promise()`** constructor is primarily used to wrap functions that do not already support promises.\n\n## Syntax\n\n```js\nnew Promise(executor)\n```\n\n> **Note:** `Promise()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `executor`\n  - : A `function` to be executed by the constructor. It receives two functions as parameters: `resolveFunc` and `rejectFunc`. Any errors thrown in the `executor` will cause the promise to be rejected, and the return value will be neglected. The semantics of `executor` are detailed below.\n\n### Return value\n\nWhen called via `new`, the `Promise` constructor returns a promise object. The promise object will become _resolved_ when either of the functions `resolveFunc` or `rejectFunc` are invoked. Note that if you call `resolveFunc` or `rejectFunc` and pass another `Promise` object as an argument, it can be said to be \"resolved\", but still not \"settled\". See the [Promise description](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#description) for more explanation.\n\n## Description\n\nTraditionally (before promises), asynchronous tasks were designed as callbacks.\n\n```js\nreadFile(\"./data.txt\", (error, result) => {\n  // This callback will be called when the task is done, with the\n  // final `error` or `result`. Any operation dependent on the\n  // result must be defined within this callback.\n});\n// Code here is immediately executed after the `readFile` request\n// is fired. It does not wait for the callback to be called, hence\n// making `readFile` \"asynchronous\".\n```\n\nTo take advantage of the readability improvement and language features offered by promises, the `Promise()` constructor allows one to transform the callback-based API to a promise-based one.\n\n> **Note:** If your task is already promise-based, you likely do not need the `Promise()` constructor.\n\nThe `executor` is custom code that ties an outcome in a callback to a promise. You, the programmer, write the `executor`. Its signature is expected to be:\n\n```js\nfunction executor(resolveFunc, rejectFunc) {\n  // Typically, some asynchronous operation that accepts a callback,\n  // like the `readFile` function above\n}\n```\n\n`resolveFunc` and `rejectFunc` are also functions, and you can give them whatever actual names you want. Their signatures are simple: they accept a single parameter of any type.\n\n```js\nresolveFunc(value); // call on resolved\nrejectFunc(reason); // call on rejected\n```\n\nThe `value` parameter passed to `resolveFunc` can be another promise object, in which case the newly constructed promise's state will be \"locked in\" to the promise passed (as part of the [resolution](#resolver-function) promise). The `rejectFunc` has semantics close to the [`throw`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/throw) statement, so `reason` is typically an [`Error`](../../globals/Error/Error.mdx) instance. If either `value` or `reason` is omitted, the promise is fulfilled/rejected with `undefined`.\n\nThe `executor`'s completion state has limited effect on the promise's state:\n\n- The `executor` return value is ignored. `return` statements within the `executor` merely impact control flow and alter whether a part of the function is executed, but do not have any impact on the promise's fulfillment value. If `executor` exits and it's impossible for `resolveFunc` or `rejectFunc` to be called in the future (for example, there are no async tasks scheduled), then the promise remains pending forever.\n- If an error is thrown in the `executor`, the promise is rejected, unless `resolveFunc` or `rejectFunc` has already been called.\n\n> **Note:** The existence of pending promises does not prevent the program from exiting. If the event loop is empty, the program exits despite any pending promises (because those are necessarily forever-pending).\n\nHere's a summary of the typical flow:\n\n1. At the time when the constructor generates the new `Promise` object, it also generates a corresponding pair of functions for `resolveFunc` and `rejectFunc`; these are \"tethered\" to the `Promise` object.\n2. `executor` typically wraps some asynchronous operation which provides a callback-based API. The callback (the one passed to the original callback-based API) is defined within the `executor` code, so it has access to the `resolveFunc` and `rejectFunc`.\n3. The `executor` is called synchronously (as soon as the `Promise` is constructed) with the `resolveFunc` and `rejectFunc` functions as arguments.\n4. The code within the `executor` has the opportunity to perform some operation. The eventual completion of the asynchronous task is communicated with the promise instance via the side effect caused by `resolveFunc` or `rejectFunc`. The side effect is that the `Promise` object becomes \"resolved\".\n   - If `resolveFunc` is called first, the value passed will be [resolved](#resolver-function). The promise may stay pending (in case another [thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) is passed), become fulfilled (in most cases where a non-thenable value is passed), or become rejected (in case of an invalid resolution value).\n   - If `rejectFunc` is called first, the promise instantly becomes rejected.\n   - Once one of the resolving functions (`resolveFunc` or `rejectFunc`) is called, the promise stays resolved. Only the first call to `resolveFunc` or `rejectFunc` affects the promise's eventual state, and subsequent calls to either function can neither change the fulfillment value/rejection reason nor toggle its eventual state from \"fulfilled\" to \"rejected\" or opposite.\n   - If `executor` exits by throwing an error, then the promise is rejected. However, the error is ignored if one of the resolving functions has already been called (so that the promise is already resolved).\n   - Resolving the promise does not necessarily cause the promise to become fulfilled or rejected (i.e. settled). The promise may still be pending because it's resolved with another thenable, but its eventual state will match that of the resolved thenable.\n5. Once the promise settles, it (asynchronously) invokes any further handlers associated through [`Promise.prototype.then`](../../globals/Promise/prototype/then.mdx), [`Promise.prototype.catch`](../../globals/Promise/prototype/catch.mdx), or [`Promise.prototype.finally`](../../globals/Promise/prototype/finally.mdx). The eventual fulfillment value or rejection reason is passed to the invocation of fulfillment and rejection handlers as an input parameter (see [Chained Promises](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#chained_promises)).\n\nFor example, the callback-based `readFile` API above can be transformed into a promise-based one.\n\n```js\nconst readFilePromise = (path) =>\n  new Promise((resolve, reject) => {\n    readFile(path, (error, result) => {\n      if (error) {\n        reject(error);\n      } else {\n        resolve(result);\n      }\n    });\n  });\n\nreadFilePromise(\"./data.txt\")\n  .then((result) => console.log(result))\n  .catch((error) => console.error(\"Failed to read data\"));\n```\n\n### Resolver function\n\nThe resolver function `resolveFunc` has the following behaviors:\n\n- If it's called with the same value as the newly created promise (the promise it's \"tethered to\"), the promise is rejected with a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n- If it's called with a non-[thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) value (a primitive, or an object whose `then` property is not callable, including when the property is not present), the promise is immediately fulfilled with that value.\n- If it's called with a thenable value (including another `Promise` instance), then the thenable's `then` method is saved and called in the future (it's always called asynchronously). The `then` method will be called with two callbacks, which are two new functions with the exact same behaviors as the `resolveFunc` and `rejectFunc` passed to the `executor` function. If calling the `then` method throws, then the current promise is rejected with the thrown error.\n\nIn the last case, it means code like:\n\n```js\nnew Promise((resolve, reject) => {\n  resolve(thenable);\n});\n```\n\nIs roughly equivalent to:\n\n```js\nnew Promise((resolve, reject) => {\n  try {\n    thenable.then(\n      (value) => resolve(value),\n      (reason) => reject(reason),\n    );\n  } catch (e) {\n    reject(e);\n  }\n});\n```\n\nExcept that in the `resolve(thenable)` case:\n\n1. `resolve` is called synchronously, so that calling `resolve` or `reject` again has no effect, even when the handlers attached through `anotherPromise.then()` are not called yet.\n2. The `then` method is called asynchronously, so that the promise will never be instantly resolved if a thenable is passed.\n\nBecause `resolve` is called again with whatever `thenable.then()` passes to it as `value`, the resolver function is able to flatten nested thenables, where a thenable calls its `onFulfilled` handler with another thenable. The effect is that the fulfillment handler of a real promise will never receive a thenable as its fulfillment value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Promise/all.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.all()\n\nThe **`Promise.all()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise fulfills when all of the input's promises fulfill (including when an empty iterable is passed), with an array of the fulfillment values. It rejects when any of the input's promises rejects, with this first rejection reason.\n\n## Syntax\n\n```js\nPromise.all(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array` of promises.\n\n### Return value\n\nA `Promise` that is:\n\n- **Already fulfilled**, if the `iterable` passed is empty.\n- **Asynchronously fulfilled**, when all the promises in the given `iterable` fulfill. The fulfillment value is an array of fulfillment values, in the order of the promises passed, regardless of completion order. If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) fulfilled.\n- **Asynchronously rejected**, when any of the promises in the given `iterable` rejects. The rejection reason is the rejection reason of the first promise that was rejected.\n\n## Description\n\nThe `Promise.all()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. It can be useful for aggregating the results of multiple promises. It is typically used when there are multiple related asynchronous tasks that the overall code relies on to work successfully — all of whom we want to fulfill before the code execution continues.\n\n`Promise.all()` will reject immediately upon **any** of the input promises rejecting. In comparison, the promise returned by [`Promise.allSettled()`](../../globals/Promise/allSettled.mdx) will wait for all input promises to complete, regardless of whether or not one rejects. Use `allSettled()` if you need the final result of every promise in the input iterable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Promise/allSettled.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.allSettled()\n\nThe **`Promise.allSettled()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise fulfills when all of the input's promises settle (including when an empty iterable is passed), with an array of objects that describe the outcome of each promise.\n\n## Syntax\n\n```js\nPromise.allSettled(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array` of promises.\n\n### Return value\n\nA `Promise` that is:\n\n- **Already fulfilled**, if the `iterable` passed is empty.\n- **Asynchronously fulfilled**, when all promise in the given `iterable` have settled (either fulfilled or rejected). The fulfillment value is an array of objects, each describing the outcome of one promise in the `iterable`, in the order of the promises passed, regardless of completion order. Each outcome object has the following properties:\n\n  - `status`\n    - : A string, either `\"fulfilled\"` or `\"rejected\"`, indicating the eventual state of the promise.\n  - `value`\n    - : Only present if `status` is `\"fulfilled\"`. The value that the promise was fulfilled with.\n  - `reason`\n    - : Only present if `status` is `\"rejected\"`. The reason that the promise was rejected with.\n\n  If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) fulfilled.\n\n## Description\n\nThe `Promise.allSettled()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. `Promise.allSettled()` is typically used when you have multiple asynchronous tasks that are not dependent on one another to complete successfully, or you'd always like to know the result of each promise.\n\nIn comparison, the Promise returned by [`Promise.all()`](../../globals/Promise/all.mdx) may be more appropriate if the tasks are dependent on each other, or if you'd like to immediately reject upon any of them rejecting.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Promise/any.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.any()\n\nThe **`Promise.any()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise fulfills when any of the input's promises fulfills, with this first fulfillment value. It rejects when all of the input's promises reject (including when an empty iterable is passed), with an `AggregateError` containing an array of rejection reasons.\n\n## Syntax\n\n```js\nPromise.any(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array` of promises.\n\n### Return value\n\nA `Promise` that is:\n\n- **Already rejected**, if the `iterable` passed is empty.\n- **Asynchronously fulfilled**, when any of the promises in the given `iterable` fulfills. The fulfillment value is the fulfillment value of the first promise that was fulfilled.\n- **Asynchronously rejected**, when all of the promises in the given `iterable` reject. The rejection reason is an `AggregateError` containing an array of rejection reasons in its `errors` property. The errors are in the order of the promises passed, regardless of completion order. If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) rejected.\n\n## Description\n\nThe `Promise.any()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. This method is useful for returning the first promise that fulfills. It short-circuits after a promise fulfills, so it does not wait for the other promises to complete once it finds one.\n\nUnlike [`Promise.all()`](../../globals/Promise/all.mdx), which returns an _array_ of fulfillment values, we only get one fulfillment value (assuming at least one promise fulfills). This can be beneficial if we need only one promise to fulfill but we do not care which one does. Note another difference: this method rejects upon receiving an _empty iterable_, since, truthfully, the iterable contains no items that fulfill. You may compare `Promise.any()` and `Promise.all()` with [`Array.prototype.some()`](../../globals/Array/prototype/some.mdx) and [`Array.prototype.every()`](../../globals/Array/prototype/every.mdx).\n\nAlso, unlike [`Promise.race()`](../../globals/Promise/race.mdx), which returns the first _settled_ value (either fulfillment or rejection), this method returns the first _fulfilled_ value. This method ignores all rejected promises up until the first promise that fulfills.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Promise/prototype/catch.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.prototype.catch()\n\nThe **`catch()`** method of a `Promise` object schedules a function to be called when the promise is rejected. It immediately returns an equivalent `Promise` object, allowing you to [chain](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining) calls to other promise methods. It is a shortcut for [`Promise.prototype.then(undefined, onRejected)`](../../../globals/Promise/prototype/then.mdx).\n\n## Syntax\n\n```js\ncatch(onRejected)\n\ncatch((reason) => {\n  // rejection handler\n})\n```\n\n### Parameters\n\n- `onRejected`\n  - : A `Function` called when the `Promise` is rejected. This function has one parameter: the _rejection reason_.\n\n### Return value\n\nReturns a new `Promise`. This new promise is always pending when returned, regardless of the current promise's status. It's eventually rejected if `onRejected` throws an error or returns a Promise which is itself rejected; otherwise, it's eventually fulfilled.\n\n## Description\n\nThe `catch` method is used for error handling in promise composition. Since it returns a `Promise`, it [can be chained](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining_after_a_catch) in the same way as its sister method, [`Promise.prototype.then()`](../../../globals/Promise/prototype/then.mdx).\n\nIf a promise becomes rejected, and there are no rejection handlers to call (a handler can be attached through any of [`Promise.prototype.then`](../../../globals/Promise/prototype/then.mdx), [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx), or [`Promise.prototype.finally`](../../../globals/Promise/prototype/finally.mdx)), then the rejection event is surfaced by the host. In the browser, this results in an [`unhandledrejection`](https://developer.mozilla.org/docs/Web/API/Window/unhandledrejection_event) event. If a handler is attached to a rejected promise whose rejection has already caused an unhandled rejection event, then another [`rejectionhandled`](https://developer.mozilla.org/docs/Web/API/Window/rejectionhandled_event) event is fired.\n\n`catch()` internally calls `then()` on the object upon which it was called, passing `undefined` and `onRejected` as arguments. The value of that call is directly returned. This is observable if you wrap the methods.\n\n```js\n// overriding original Promise.prototype.then/catch just to add some logs\n((Promise) => {\n  const originalThen = Promise.prototype.then;\n  const originalCatch = Promise.prototype.catch;\n\n  Promise.prototype.then = function (...args) {\n    console.log(\"Called .then on %o with arguments: %o\", this, args);\n    return originalThen.apply(this, args);\n  };\n  Promise.prototype.catch = function (...args) {\n    console.error(\"Called .catch on %o with arguments: %o\", this, args);\n    return originalCatch.apply(this, args);\n  };\n})(Promise);\n\n// calling catch on an already resolved promise\nPromise.resolve().catch(function XXX() {});\n\n// Logs:\n// Called .catch on Promise{} with arguments: Arguments{1} [0: function XXX()]\n// Called .then on Promise{} with arguments: Arguments{2} [0: undefined, 1: function XXX()]\n```\n\nThis means that passing `undefined` still causes the returned promise to be rejected, and you have to pass a function to prevent the final promise from being rejected.\n\nBecause `catch()` just calls `then()`, it supports subclassing.\n\n> **Note:** The examples below are throwing instances of [`Error`](../../../globals/Error/Error.mdx). As with synchronous [`throw`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/throw) statements, this is considered a good practice; otherwise, the part doing the catching would have to perform checks to see if the argument was a string or an error, and you might lose valuable information such as stack traces.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Promise/prototype/finally.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.prototype.finally()\n\nThe **`finally()`** method of a `Promise` object schedules a function to be called when the promise is settled (either fulfilled or rejected). It immediately returns an equivalent `Promise` object, allowing you to [chain](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining) calls to other promise methods.\n\nThis lets you avoid duplicating code in both the promise's [`Promise.prototype.then`](../../../globals/Promise/prototype/then.mdx) and [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx) handlers.\n\n## Syntax\n\n```js\nfinally(onFinally)\n\nfinally(() => {\n  // Code that will run after promise is settled (fulfilled or rejected)\n})\n```\n\n### Parameters\n\n- `onFinally`\n  - : A `Function` called when the `Promise` is settled. This handler receives no parameters.\n\n### Return value\n\nReturns an equivalent `Promise`. If the handler throws an error or returns a rejected promise, the promise returned by `finally()` will be rejected with that value instead. Otherwise, the return value of the handler does not affect the state of the original promise.\n\n## Description\n\nThe `finally()` method can be useful if you want to do some processing or cleanup once the promise is settled, regardless of its outcome.\n\nThe `finally()` method is very similar to calling [`then(onFinally, onFinally)`](../../../globals/Promise/prototype/then.mdx). However, there are a couple of differences:\n\n- When creating a function inline, you can pass it once, instead of being forced to either declare it twice, or create a variable for it.\n- The `onFinally` callback does not receive any argument. This use case is for precisely when you _do not care_ about the rejection reason or the fulfillment value, and so there's no need to provide it.\n- A `finally()` call is usually transparent and does not change the eventual state of the original promise. So for example:\n  - Unlike `Promise.resolve(2).then(() => 77, () => {})`, which returns a promise eventually fulfilled with the value `77`, `Promise.resolve(2).finally(() => 77)` returns a promise eventually fulfilled with the value `2`.\n  - Similarly, unlike `Promise.reject(3).then(() => {}, () => 88)`, which returns a promise eventually fulfilled with the value `88`, `Promise.reject(3).finally(() => 88)` returns a promise eventually rejected with the reason `3`.\n\n> **Note:** A `throw` (or returning a rejected promise) in the `finally` callback still rejects the returned promise. For example, both `Promise.reject(3).finally(() => { throw 99; })` and `Promise.reject(3).finally(() => Promise.reject(99))` reject the returned promise with the reason `99`.\n\nLike [`Promise.prototype.catch()`](../../../globals/Promise/prototype/catch.mdx), `finally()` internally calls the `then` method on the object upon which it was called. If `onFinally` is not a function, `then()` is called with `onFinally` as both arguments — which, for [`Promise.prototype.then()`](../../../globals/Promise/prototype/then.mdx), means that no useful handler is attached. Otherwise, `then()` is called with two internally created functions, which behave like the following:\n\n> **Warning:** This is only for demonstration purposes and is not a polyfill.\n\n```js\npromise.then(\n  (value) => Promise.resolve(onFinally()).then(() => value),\n  (reason) =>\n    Promise.resolve(onFinally()).then(() => {\n      throw reason;\n    }),\n);\n```\n\nBecause `finally()` calls `then()`, it supports subclassing. Moreover, notice the [`Promise.resolve()`](../../../globals/Promise/resolve.mdx) call above — in reality, `onFinally()`'s return value is resolved using the same algorithm as `Promise.resolve()`, but the actual constructor used to construct the resolved promise will be the subclass. `finally()` gets this constructor through [`promise.constructor[Symbol.species]`](../../../globals/Promise/@@species.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Promise/prototype/then.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.prototype.then()\n\nThe **`then()`** method of a `Promise` object takes up to two arguments: callback functions for the fulfilled and rejected cases of the `Promise`. It immediately returns an equivalent `Promise` object, allowing you to [chain](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining) calls to other promise methods.\n\n## Syntax\n\n```js\nthen(onFulfilled)\nthen(onFulfilled, onRejected)\n\nthen(\n  (value) => { /* fulfillment handler */ },\n  (reason) => { /* rejection handler */ },\n)\n```\n\n### Parameters\n\n- `onFulfilled` _**optional**_\n  - : A `Function` asynchronously called if the `Promise` is fulfilled. This function has one parameter, the _fulfillment value_. If it is not a function, it is internally replaced with an _identity_ function (`(x) => x`) which simply passes the fulfillment value forward.\n- `onRejected` _**optional**_\n  - : A `Function` asynchronously called if the `Promise` is rejected. This function has one parameter, the _rejection reason_. If it is not a function, it is internally replaced with a _thrower_ function (`(x) => { throw x; }`) which throws the rejection reason it received.\n\n### Return value\n\nReturns a new `Promise` immediately. This new promise is always pending when returned, regardless of the current promise's status.\n\nOne of the `onFulfilled` and `onRejected` handlers will be executed to handle the current promise's fulfillment or rejection. The call always happens asynchronously, even when the current promise is already settled. The behavior of the returned promise (call it `p`) depends on the handler's execution result, following a specific set of rules. If the handler function:\n\n- returns a value: `p` gets fulfilled with the returned value as its value.\n- doesn't return anything: `p` gets fulfilled with `undefined`.\n- throws an error: `p` gets rejected with the thrown error as its value.\n- returns an already fulfilled promise: `p` gets fulfilled with that promise's value as its value.\n- returns an already rejected promise: `p` gets rejected with that promise's value as its value.\n- returns another pending promise: the fulfillment/rejection of the promise returned by `then` will be subsequent to the resolution/rejection of the promise returned by the handler. Also, the resolved value of the promise returned by `then` will be the same as the resolved value of the promise returned by the handler.\n\n## Description\n\nThe `then()` method schedules callback functions for the eventual completion of a Promise — either fulfillment or rejection. It is the primitive method of promises: the [thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) protocol expects all promise-like objects to expose a `then()` method, and the [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx) and [`Promise.prototype.finally`](../../../globals/Promise/prototype/finally.mdx) methods both work by invoking the object's `then()` method.\n\nFor more information about the `onRejected` handler, see the [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx) reference.\n\n`then()` returns a new promise object. If you call the `then()` method twice on the same promise object (instead of chaining), then this promise object will have two pairs of settlement handlers. All handlers attached to the same promise object are always called in the order they were added. Moreover, the two promises returned by each call of `then()` start separate chains and do not wait for each other's settlement.\n\n[Thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) objects that arise along the `then()` chain are always [resolved](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise/Promise#the_resolver_function) — the `onFulfilled` handler never receives a thenable object, and any thenable returned by either handler are always resolved before being passed to the next handler. This is because when constructing the new promise, the `resolve` and `reject` functions passed by the `executor` are saved, and when the current promise settles, the respective function will be called with the fulfillment value or rejection reason. The resolving logic comes from the resolver function passed by the [`Promise()`](../../../globals/Promise/Promise.mdx) constructor.\n\n`then()` supports subclassing, which means it can be called on instances of subclasses of `Promise`, and the result will be a promise of the subclass type. You can customize the type of the return value through the [`[Symbol.species]`](../../../globals/Promise/@@species.mdx) property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Promise/race.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.race()\n\nThe **`Promise.race()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise settles with the eventual state of the first promise that settles.\n\n## Syntax\n\n```js\nPromise.race(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array`) of promises.\n\n### Return value\n\nA `Promise` that **asynchronously settles** with the eventual state of the first promise in the `iterable` to settle. In other words, it fulfills if the first promise to settle is fulfilled, and rejects if the first promise to settle is rejected. The returned promise remains pending forever if the `iterable` passed is empty. If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) settled.\n\n## Description\n\nThe `Promise.race()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. It's useful when you want the first async task to complete, but do not care about its eventual state (i.e. it can either succeed or fail).\n\nIf the iterable contains one or more non-promise values and/or an already settled promise, then `Promise.race()` will settle to the first of these values found in the iterable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Promise/reject.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.reject()\n\nThe **`Promise.reject()`** method returns a `Promise` object that is rejected with a given reason.\n\n## Syntax\n\n```js\nPromise.reject(reason)\n```\n\n### Parameters\n\n- `reason`\n  - : Reason why this `Promise` rejected.\n\n### Return value\n\nA `Promise` that is rejected with the given reason.\n\n## Description\n\nThe static `Promise.reject` function returns a `Promise` that is rejected. For debugging purposes and selective error catching, it is useful to make `reason` an `instanceof` [`Error`](../../globals/Error/Error.mdx).\n\n`Promise.reject()` is generic and supports subclassing, which means it can be called on subclasses of `Promise`, and the result will be a promise of the subclass type. To do so, the subclass's constructor must implement the same signature as the [`Promise()`](../../globals/Promise/Promise.mdx) constructor — accepting a single `executor` function that can be called with the `resolve` and `reject` callbacks as parameters. `Promise.reject()` is essentially a shorthand for `new Promise((resolve, reject) => reject(reason))`.\n\nUnlike [`Promise.resolve()`](../../globals/Promise/resolve.mdx), `Promise.reject()` always wraps `reason` in a new `Promise` object, even when `reason` is already a `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Promise/resolve.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.resolve()\n\nThe **`Promise.resolve()`** method \"resolves\" a given value to a `Promise`. If the value is a promise, that promise is returned; if the value is a [thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables), `Promise.resolve()` will call the `then()` method with two callbacks it prepared; otherwise the returned promise will be fulfilled with the value.\n\nThis function flattens nested layers of promise-like objects (e.g. a promise that fulfills to a promise that fulfills to something) into a single layer — a promise that fulfills to a non-thenable value.\n\n## Syntax\n\n```js\nPromise.resolve(value)\n```\n\n### Parameters\n\n- `value`\n  - : Argument to be resolved by this `Promise`. Can also be a `Promise` or a thenable to resolve.\n\n### Return value\n\nA `Promise` that is resolved with the given value, or the promise passed as value, if the value was a promise object. A resolved promise can be in any of the states — fulfilled, rejected, or pending. For example, resolving a rejected promise will still result in a rejected promise.\n\n## Description\n\n`Promise.resolve()` _resolves_ a promise, which is not the same as fulfilling or rejecting the promise. See [Promise description](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#description) for definitions of the terminology. In brief, `Promise.resolve()` returns a promise whose eventual state depends on another promise, thenable object, or other value.\n\n`Promise.resolve()` is generic and supports subclassing, which means it can be called on subclasses of `Promise`, and the result will be a promise of the subclass type. To do so, the subclass's constructor must implement the same signature as the [`Promise()`](../../globals/Promise/Promise.mdx) constructor — accepting a single `executor` function that can be called with the `resolve` and `reject` callbacks as parameters.\n\n`Promise.resolve()` special-cases native `Promise` instances. If `value` belongs to `Promise` or a subclass, and `value.constructor === Promise`, then `value` is directly returned by `Promise.resolve()`, without creating a new `Promise` instance. Otherwise, `Promise.resolve()` is essentially a shorthand for `new Promise((resolve) => resolve(value))`.\n\nThe bulk of the resolving logic is actually implemented by the [resolver function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise/Promise#the_resolver_function) passed by the `Promise()` constructor. In summary:\n\n- If a non-[thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) value is passed, the returned promise is already fulfilled with that value.\n- If a thenable is passed, the returned promise will adopt the state of that thenable by calling the `then` method and passing a pair of resolving functions as arguments. (But because native promises directly pass through `Promise.resolve()` without creating a wrapper, the `then` method is not called on native promises.) If the resolver function receives another thenable object, it will be resolved agin, so that the eventual fulfillment value of the promise will never be thenable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Proxy/Proxy.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Proxy()\n\nThe **`Proxy()`** constructor is used to create `Proxy` objects.\n\n## Syntax\n\n```js\nnew Proxy(target, handler)\n```\n\n> **Note:** `Proxy()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `target`\n  - : A target object to wrap with `Proxy`. It can be any sort of object,\n    including a native array, a function, or even another proxy.\n- `handler`\n  - : An object whose properties are functions that define the behavior of the proxy when\n    an operation is performed on it.\n\n## Description\n\nUse the `Proxy()` constructor to create a new `Proxy` object.\nThis constructor takes two mandatory arguments:\n\n- `target` is the object for which you want to create the proxy\n- `handler` is the object that defines the custom behavior of the proxy.\n\nAn empty handler will create a proxy that behaves, in almost all respects, exactly like\nthe target. By defining any of a set group of functions on the `handler`\nobject, you can customize specific aspects of the proxy's behavior. For example, by\ndefining `get()` you can provide a customized version of the target's\n[property accessor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Property_Accessors).\n\n### Handler functions\n\nThis section lists all the handler functions you can define. Handler functions are\nsometimes called _traps_, because they trap calls to the underlying target\nobject.\n\n- [`handler.apply()`](../../globals/Proxy/proxy/apply.mdx)\n  - : A trap for a function call.\n- [`handler.construct()`](../../globals/Proxy/proxy/construct.mdx)\n  - : A trap for the `new` operator.\n- [`handler.defineProperty()`](../../globals/Proxy/proxy/defineProperty.mdx)\n  - : A trap for [`Object.defineProperty`](../../globals/Object/defineProperty.mdx).\n- [`handler.deleteProperty()`](../../globals/Proxy/proxy/deleteProperty.mdx)\n  - : A trap for the `delete` operator.\n- [`handler.get()`](../../globals/Proxy/proxy/get.mdx)\n  - : A trap for getting property values.\n- [`handler.getOwnPropertyDescriptor()`)}](../../globals/Proxy/proxy/getOwnPropertyDescriptor.mdx)\n  - : A trap for [`Object.getOwnPropertyDescriptor`](../../globals/Object/getOwnPropertyDescriptor.mdx).\n- [`handler.getPrototypeOf()`](../../globals/Proxy/proxy/getPrototypeOf.mdx)\n  - : A trap for [`Object.getPrototypeOf()`](../../globals/Object/getPrototypeOf.mdx).\n- [`handler.has()`](../../globals/Proxy/proxy/has.mdx)\n  - : A trap for the `in` operator.\n- [`handler.isExtensible()`](../../globals/Proxy/proxy/isExtensible.mdx)\n  - : A trap for [`Object.isExtensible()`](../../globals/Object/isExtensible.mdx).\n- [`handler.ownKeys()`](../../globals/Proxy/proxy/ownKeys.mdx)\n  - : A trap for [`Object.getOwnPropertyNames()`](../../globals/Object/getOwnPropertyNames.mdx) and\n    [`Object.getOwnPropertySymbols()`](../../globals/Object/getOwnPropertySymbols.mdx).\n- [`handler.preventExtensions()`)}](../../globals/Proxy/proxy/preventExtensions.mdx)\n  - : A trap for [`Object.preventExtensions()`](../../globals/Object/preventExtensions.mdx).\n- [`handler.set()`](../../globals/Proxy/proxy/set.mdx)\n  - : A trap for setting property values.\n- [`handler.setPrototypeOf()`](../../globals/Proxy/proxy/setPrototypeOf.mdx)\n  - : A trap for [`Object.setPrototypeOf()`](../../globals/Object/setPrototypeOf.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Proxy/proxy/apply.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.apply()\n\nThe **`handler.apply()`** method is a trap for a function call.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  apply(target, thisArg, argumentsList) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `apply()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target callable object.\n- `thisArg`\n  - : The `this` argument for the call.\n- `argumentsList`\n  - : The list of arguments for the call.\n\n### Return value\n\nThe `apply()` method can return any value.\n\n## Description\n\nThe **`handler.apply()`** method is a trap for a function call.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- Function call: `proxy(...args)`\n- [`Function.prototype.apply()`](../../../globals/Function/prototype/apply.mdx) and [`Function.prototype.call()`](../../../globals/Function/prototype/call.mdx)\n- [`Reflect.apply()`](../../../globals/Reflect/apply.mdx)\n\nOr any other operation that invokes the `[[Call]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The `target` must be a callable itself. That is, it must be a function object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Proxy/proxy/construct.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.construct()\n\nThe **`handler.construct()`** method is a trap for the `new` operator. In order for the new operation to be valid on the resulting Proxy object, the target used to initialize the proxy must itself have a `[[Construct]]` internal method (i.e. `new target` must be valid).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  construct(target, argumentsList, newTarget) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `construct()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `argumentsList`\n  - : The list of arguments for the constructor.\n- `newTarget`\n  - : The constructor that was originally called, `p` above.\n\n### Return value\n\nThe `construct` method must return an object.\n\n## Description\n\nThe **`handler.construct()`** method is a trap for the `new` operator.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- The `new` operator: `new myFunction(...args)`\n- [`Reflect.construct()`](../../../globals/Reflect/construct.mdx)\n\nOr any other operation that invokes the `[[Construct]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The result must be an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Proxy/proxy/defineProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.defineProperty()\n\nThe **`handler.defineProperty()`** method is a trap for\n[`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  defineProperty(target, property, descriptor) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `defineProperty()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property whose description is to be\n    retrieved.\n- `descriptor`\n  - : The descriptor for the property being defined or modified.\n\n### Return value\n\nThe `defineProperty()` method must return a `Boolean` indicating\nwhether or not the property has been successfully defined.\n\n## Description\n\nThe **`handler.defineProperty()`** method is a trap for\n[`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx), [`Object.defineProperties()`](../../../globals/Object/defineProperties.mdx)\n- [`Reflect.defineProperty()`](../../../globals/Reflect/defineProperty.mdx)\n\nOr any other operation that invokes the `[[DefineOwnProperty]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- A property cannot be added, if the target object is not extensible.\n- A property cannot be added as or modified to be non-configurable, if it does not\n  exists as a non-configurable own property of the target object.\n- A property may not be non-configurable, if a corresponding configurable property of\n  the target object exists.\n- If a property has a corresponding target object property then\n  `Object.defineProperty(target, prop, descriptor)`\n  will not throw an exception.\n- In strict mode, a `false` return value from the\n  `defineProperty()` handler will throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Proxy/proxy/deleteProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.deleteProperty()\n\nThe **`handler.deleteProperty()`** method is a trap for the `delete` operator.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  deleteProperty(target, property) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `deleteProperty()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property to delete.\n\n### Return value\n\nThe `deleteProperty()` method must return a `Boolean` indicating\nwhether or not the property has been successfully deleted.\n\n## Description\n\nThe **`handler.deleteProperty()`** method is a trap for the `delete` operator.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- The [`delete`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) operator: `delete proxy[foo]` and\n  `delete proxy.foo`\n- [`Reflect.deleteProperty()`](../../../globals/Reflect/deleteProperty.mdx)\n\nOr any other operation that invokes the `[[Delete]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- A property cannot be deleted, if it exists as a non-configurable own property of the\n  target object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Proxy/proxy/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.get()\n\nThe **`handler.get()`** method is a trap for getting a property\nvalue.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  get(target, property, receiver) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `get()` method. `this`\nis bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property to get.\n- `receiver`\n  - : Either the proxy or an object that inherits from the proxy.\n\n### Return value\n\nThe `get()` method can return any value.\n\n## Description\n\nThe **`handler.get()`** method is a trap for getting a property\nvalue.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- Property access: `proxy[foo]` and `proxy.bar`\n- [`Reflect.get()`](../../../globals/Reflect/get.mdx)\n\nOr any other operation that invokes the `[[Get]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The value reported for a property must be the same as the value of the corresponding\n  target object property if the target object property is a non-writable,\n  non-configurable own data property.\n- The value reported for a property must be undefined if the corresponding target\n  object property is a non-configurable own accessor property that has\n  `undefined` as its `[[Get]]` attribute.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Proxy/proxy/getOwnPropertyDescriptor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.getOwnPropertyDescriptor()\n\nThe **`handler.getOwnPropertyDescriptor()`** method is a trap for [`Object.getOwnPropertyDescriptor()`](../../../globals/Object/getOwnPropertyDescriptor.mdx).\n\n\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  getOwnPropertyDescriptor(target, prop) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `getOwnPropertyDescriptor()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `prop`\n  - : The name of the property whose description should be retrieved.\n\n### Return value\n\nThe `getOwnPropertyDescriptor()` method must return an object or `undefined`.\n\n## Description\n\nThe **`handler.getOwnPropertyDescriptor()`** method is a trap for [`Object.getOwnPropertyDescriptor()`](../../../globals/Object/getOwnPropertyDescriptor.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.getOwnPropertyDescriptor()`](../../../globals/Object/getOwnPropertyDescriptor.mdx)\n- [`Reflect.getOwnPropertyDescriptor()`](../../../globals/Reflect/getOwnPropertyDescriptor.mdx)\n\nOr any other operation that invokes the `[[GetOwnProperty]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `getOwnPropertyDescriptor()` must return an object or `undefined`.\n- A property cannot be reported as non-existent, if it exists as a non-configurable own property of the target object.\n- A property cannot be reported as non-existent, if it exists as an own property of the target object and the target object is not extensible.\n- A property cannot be reported as existent, if it does not exists as an own property of the target object and the target object is not extensible.\n- A property cannot be reported as non-configurable, if it does not exists as an own property of the target object or if it exists as a configurable own property of the target object.\n- The result of `Object.getOwnPropertyDescriptor(target)` can be applied to the target object using `Object.defineProperty()` and will not throw an exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Proxy/proxy/getPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.getPrototypeOf()\n\nThe **`handler.getPrototypeOf()`** method is a trap for the\n`[[GetPrototypeOf]]` internal method.\n\n## Syntax\n\n```js\nnew Proxy(obj, {\n  getPrototypeOf(target) {\n    // …\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `getPrototypeOf()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `getPrototypeOf()` method must return an object or `null`.\n\n## Description\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.getPrototypeOf()`](../../../globals/Object/getPrototypeOf.mdx)\n- [`Reflect.getPrototypeOf()`](../../../globals/Reflect/getPrototypeOf.mdx)\n- [`Object.prototype.isPrototypeOf()`](../../../globals/Object/prototype/isPrototypeOf.mdx)\n- `instanceof`\n\nOr any other operation that invokes the `[[GetPrototypeOf]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `getPrototypeOf()` method must return an object or `null`.\n- If `target` is not extensible,\n  `Object.getPrototypeOf(proxy)` method must return the same\n  value as `Object.getPrototypeOf(target)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Proxy/proxy/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.has()\n\nThe **`handler.has()`** method is a trap for the `in` operator.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  has(target, prop) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to `has()` method. `this` is\nbound to the handler.\n\n- `target`\n  - : The target object.\n- `prop`\n  - : The name or `Symbol` of the property to check for existence.\n\n### Return value\n\nThe `has()` method must return a boolean value.\n\n## Description\n\nThe **`handler.has()`** method is a trap for the `in` operator.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- The [`in`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/in) operator: `foo in proxy`\n- [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) check: `with(proxy) { (foo); }`\n- [`Reflect.has()`](../../../globals/Reflect/has.mdx)\n\nOr any other operation that invokes the `[[HasProperty]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- A property cannot be reported as non-existent, if it exists as a non-configurable\n  own property of the target object.\n- A property cannot be reported as non-existent, if it exists as an own property of\n  the target object and the target object is not extensible.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Proxy/proxy/isExtensible.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.isExtensible()\n\nThe **`handler.isExtensible()`** method is a trap for\n[`Object.isExtensible()`](../../../globals/Object/isExtensible.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  isExtensible(target) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `isExtensible()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `isExtensible()` method must return a boolean value.\n\n## Description\n\nThe **`handler.isExtensible()`** method is a trap for\n[`Object.isExtensible()`](../../../globals/Object/isExtensible.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.isExtensible()`](../../../globals/Object/isExtensible.mdx)\n- [`Reflect.isExtensible()`](../../../globals/Reflect/isExtensible.mdx)\n\nOr any other operation that invokes the `[[IsExtensible]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `Object.isExtensible(proxy)` must return the same value as\n  `Object.isExtensible(target)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Proxy/proxy/ownKeys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.ownKeys()\n\nThe **`handler.ownKeys()`** method is a trap for\n[`Reflect.ownKeys()`](../../../globals/Reflect/ownKeys.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  ownKeys(target) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `ownKeys()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `ownKeys()` method must return an enumerable object.\n\n## Description\n\nThe **`handler.ownKeys()`** method is a trap for\n[`Reflect.ownKeys()`](../../../globals/Reflect/ownKeys.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.getOwnPropertyNames()`](../../../globals/Object/getOwnPropertyNames.mdx)\n- [`Object.getOwnPropertySymbols()`](../../../globals/Object/getOwnPropertySymbols.mdx)\n- [`Object.keys()`](../../../globals/Object/keys.mdx)\n- [`Reflect.ownKeys()`](../../../globals/Reflect/ownKeys.mdx)\n\nOr any other operation that invokes the `[[OwnPropertyKeys]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The result of `ownKeys()` must be an array.\n- The type of each array element is either a `String` or a `Symbol`.\n- The result List must contain the keys of all non-configurable own properties of the\n  target object.\n- If the target object is not extensible, then the result List must contain all the\n  keys of the own properties of the target object and no other values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Proxy/proxy/preventExtensions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.preventExtensions()\n\nThe **`handler.preventExtensions()`** method is a trap for [`Object.preventExtensions()`](../../../globals/Object/preventExtensions.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  preventExtensions(target) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `preventExtensions()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `preventExtensions()` method must return a boolean value.\n\n## Description\n\nThe **`handler.preventExtensions()`** method is a trap for [`Object.preventExtensions()`](../../../globals/Object/preventExtensions.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.preventExtensions()`](../../../globals/Object/preventExtensions.mdx)\n- [`Reflect.preventExtensions()`](../../../globals/Reflect/preventExtensions.mdx)\n- [`Object.seal()`](../../../globals/Object/seal.mdx)\n- [`Object.freeze()`](../../../globals/Object/freeze.mdx)\n\nOr any other operation that invokes the `[[PreventExtensions]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `Object.preventExtensions(proxy)` only returns `true` if `Object.isExtensible(proxy)` is `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Proxy/proxy/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.set()\n\nThe **`handler.set()`** method is a trap for setting a property\nvalue.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  set(target, property, value, receiver) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `set()` method. `this`\nis bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property to set.\n- `value`\n  - : The new value of the property to set.\n- `receiver`\n\n  - : The object to which the assignment was originally directed. This is usually the\n    proxy itself. But a `set()` handler can also be called indirectly, via\n    the prototype chain or various other ways.\n\n    For example, suppose a script does\n    `obj.name = \"jen\"`, and `obj` is not a\n    proxy, and has no own property `.name`, but it has a proxy on its\n    prototype chain. That proxy's `set()` handler will be called, and\n    `obj` will be passed as the receiver.\n\n### Return value\n\nThe `set()` method should return a boolean value.\n\n- Return `true` to indicate that assignment succeeded.\n- If the `set()` method returns `false`, and the assignment\n  happened in strict-mode code, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) will be thrown.\n\n## Description\n\nThe **`handler.set()`** method is a trap for setting property\nvalue.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- Property assignment: `proxy[foo] = bar` and `proxy.foo = bar`\n- [`Reflect.set()`](../../../globals/Reflect/set.mdx)\n\nOr any other operation that invokes the `[[Set]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- Cannot change the value of a property to be different from the value of the\n  corresponding target object property if the corresponding target object property is a\n  non-writable, non-configurable data property.\n- Cannot set the value of a property if the corresponding target object property is a\n  non-configurable accessor property that has `undefined` as its\n  `[[Set]]` attribute.\n- In strict mode, a `false` return value from the `set()`\n  handler will throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Proxy/proxy/setPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.setPrototypeOf()\n\nThe **`handler.setPrototypeOf()`** method is a trap for\n[`Object.setPrototypeOf()`](../../../globals/Object/setPrototypeOf.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  setPrototypeOf(target, prototype) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `setPrototypeOf()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `prototype`\n  - : The object's new prototype or `null`.\n\n### Return value\n\nThe `setPrototypeOf()` method returns `true` if the\n`[[Prototype]]` was successfully changed, otherwise `false`.\n\n## Description\n\nThe **`handler.setPrototypeOf()`** method is a trap for\n[`Object.setPrototypeOf()`](../../../globals/Object/setPrototypeOf.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.setPrototypeOf()`](../../../globals/Object/setPrototypeOf.mdx)\n- [`Reflect.setPrototypeOf()`](../../../globals/Reflect/setPrototypeOf.mdx)\n\nOr any other operation that invokes the `[[SetPrototypeOf]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- If `target` is not extensible, the `prototype`\n  parameter must be the same value as\n  `Object.getPrototypeOf(target)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Proxy/revocable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Proxy.revocable()\n\nThe **`Proxy.revocable()`** static method creates a revocable `Proxy` object.\n\n## Syntax\n\n```js\nProxy.revocable(target, handler)\n```\n\n### Parameters\n\n- `target`\n  - : A target object to wrap with `Proxy`. It can be any sort of object, including a native array, a function, or even another proxy.\n- `handler`\n  - : An object whose properties are functions defining the behavior of `proxy` when an operation is performed on it.\n\n### Return value\n\nA plain object with the following two properties:\n\n- `proxy`\n  - : A Proxy object exactly the same as one created with a [`new Proxy(target, handler)`](../../globals/Proxy/Proxy.mdx) call.\n- `revoke`\n  - : A function with no parameters to revoke (switch off) the `proxy`.\n\n## Description\n\nThe `Proxy.revocable()` factory function is the same as the [`Proxy()`](../../globals/Proxy/Proxy.mdx) constructor, except that in addition to creating a proxy object, it also creates a `revoke` function that can be called to disable the proxy. The proxy object and the `revoke` function are wrapped in a plain object.\n\nThe `revoke` function does not take any parameters, nor does it rely on the `this` value. The created `proxy` object is attached to the `revoke` function as a [private property](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/Private_class_fields) that the `revoke` function accesses on itself when called (the existence of the private property is not observable from the outside, but it has implications on how garbage collection happens). The `proxy` object is _not_ captured within the [closure](https://developer.mozilla.org/docs/Web/JavaScript/Closures) of the `revoke` function (which will make garbage collection of `proxy` impossible if `revoke` is still alive).\n\nAfter the `revoke()` function gets called, the proxy becomes unusable: any trap to a handler throws a [`TypeError`](../../globals/TypeError/TypeError.mdx). Once a proxy is revoked, it remains revoked, and calling `revoke()` again has no effect — in fact, the call to `revoke()` detaches the `proxy` object from the `revoke` function, so the `revoke` function will not be able to access the proxy again at all. If the proxy is not referenced elsewhere, it will then be eligible for garbage collection. The `revoke` function also detaches `target` and `handler` from the `proxy`, so if `target` is not referenced elsewhere, it will also be eligible for garbage collection, even when its proxy is still alive, since there's no longer a way to meaningfully interact with the target object.\n\nLetting users interact with an object through a revocable proxy allows you to [control the lifetime](https://developer.mozilla.org/docs/Web/JavaScript/Memory_Management) of the object exposed to the user — you can make the object garbage-collectable even when the user is still holding a reference to its proxy.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/RangeError/RangeError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RangeError\n\nThe **`RangeError()`** constructor creates an error\nwhen a value is not in the set or range of allowed values.\n\n## Syntax\n\n```js\nnew RangeError()\nnew RangeError(message)\nnew RangeError(message, options)\nnew RangeError(message, fileName)\nnew RangeError(message, fileName, lineNumber)\n\nRangeError()\nRangeError(message)\nRangeError(message, options)\nRangeError(message, fileName)\nRangeError(message, fileName, lineNumber)\n```\n\n> **Note:** `RangeError()` can be called with or without `new`. Both create a new `RangeError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/ReadableByteStreamController/prototype/byobRequest.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# byobRequest\n\nThe **`byobRequest`** read-only property of the `ReadableByteStreamController` interface returns the current BYOB request, or `null` if there are no pending requests.\n\nAn underlying byte source should check this property, and use it to write data to the stream if it exists (rather than using `ReadableByteStreamController.enqueue()`).\nThis will result in an efficient zero-byte transfer of the data to the consumer.\n\n## Value\n\nA `ReadableStreamBYOBRequest` object instance, or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/ReadableByteStreamController/prototype/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# close()\n\nThe **`close()`** method of the `ReadableByteStreamController` interface closes the associated stream.\n\nThis might be called by the underlying source when its data source has been exhausted/completed.\n\n> **Note:** Readers will still be able to read any previously-enqueued chunks from the stream, but once those are read, the stream will become closed.\n> However if there is an outstanding and partially written `byobRequest` when `close()` is called, the stream will be errored.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableByteStreamController`, it is already closed, or the stream is not readable for some other reason.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/ReadableByteStreamController/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# desiredSize\n\nThe **`desiredSize`** read-only property of the`ReadableByteStreamController` interface returns the number of bytes required to fill the stream's internal queue to its \"desired size\".\n\nThe value is used by the stream to indicate a preferred flow rate to the underlying source.\nSources that support throttling or pausing their inflow of data (not all do!) should control the inflow such that `desiredSize` of the stream buffer is kept positive and as close to zero as possible.\n\nThe `desiredSize` is used to apply backpressure from downstream consumers.\n\n## Value\n\nAn integer. Note that this can be negative if the queue is over-full.\n\nThe value will be `null` if the stream has errored and `0` if it is closed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/ReadableByteStreamController/prototype/enqueue.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# enqueue()\n\nThe **`enqueue()`** method of the `ReadableByteStreamController` interface enqueues a given chunk on the associated readable byte stream (the chunk is copied into the stream's internal queues).\n\nThis should only be used to transfer data to the queue when `byobRequest` is `null`.\n\n## Syntax\n\n```js\nenqueue(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : The chunk to enqueue.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableByteStreamController`, or the stream cannot be read for some other reason, or the chunk is not an object, or the chunk's internal array buffer is non-existent, zero-length, or detached.\n    It is also thrown if the stream has been closed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/ReadableByteStreamController/prototype/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# error()\n\nThe **`error()`** method of the `ReadableByteStreamController` interface causes any future interactions with the associated stream to error with the specified reason.\n\nThis is commonly called by an underlying source to surface an error from the interface where it gets its data (such as a file-read or socket error).\nIt can also be called from elsewhere to trigger a stream error, for example if another part of the system that the stream relies on fails.\n\n## Syntax\n\n```js\nerror(errorObject)\n```\n\n### Parameters\n\n- `errorObject`\n  - : Any object that you want future interactions to fail with.\n\n### Return value\n\n`undefined`\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableByteStreamController`, or the stream is not readable for some other reason.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/ReadableStream/ReadableStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream()\n\nThe **`ReadableStream()`** constructor creates and returns a readable stream object from the given handlers.\n\n## Syntax\n\n```js\nnew ReadableStream()\nnew ReadableStream(underlyingSource)\nnew ReadableStream(underlyingSource, queuingStrategy)\n```\n\n### Parameters\n\n- `underlyingSource` _**optional**_\n\n  - : An object containing methods and properties that define how the constructed stream instance will behave.\n    `underlyingSource` can contain the following:\n\n    - `start` (controller) _**optional**_\n      - : This is a method, called immediately when the object is constructed. The\n        contents of this method are defined by the developer, and should aim to get access\n        to the stream source, and do anything else required to set up the stream\n        functionality. If this process is to be done asynchronously, it can return a\n        promise to signal success or failure. The `controller` parameter passed\n        to this method is a `ReadableStreamDefaultController` or a\n        `ReadableByteStreamController`, depending on the value of the\n        `type` property. This can be used by the developer to control the\n        stream during set up.\n    - `pull` (controller) _**optional**_\n      - : This method, also defined by the developer, will be called repeatedly when the\n        stream's internal queue of chunks is not full, up until it reaches its high water\n        mark. If `pull()` returns a promise, then it won't be called again\n        until that promise fulfills; if the promise rejects, the stream will become\n        errored. The `controller` parameter passed to this method is a\n        `ReadableStreamDefaultController` or a\n        `ReadableByteStreamController`, depending on the value of the\n        `type` property. This can be used by the developer to control the\n        stream as more chunks are fetched.\n    - `cancel` (reason) _**optional**_\n      - : This method, also defined by the developer, will be called if the app signals\n        that the stream is to be cancelled (e.g. if `ReadableStream.cancel()`\n        is called). The contents should do whatever is necessary to release access to the\n        stream source. If this process is asynchronous, it can return a promise to signal\n        success or failure. The `reason` parameter contains a\n        string describing why the stream was cancelled.\n    - `type` _**optional**_\n      - : This property controls what type of readable stream is being dealt with. If it\n        is included with a value set to `\"bytes\"`, the passed controller object\n        will be a `ReadableByteStreamController` capable of handling a BYOB\n        (bring your own buffer)/byte stream. If it is not included, the passed controller\n        will be a `ReadableStreamDefaultController`.\n    - `autoAllocateChunkSize` _**optional**_\n\n      - : For byte streams, the developer can set the `autoAllocateChunkSize` with a positive integer value to turn on the stream's auto-allocation feature.\n        With this is set, the stream implementation will automatically allocate a view buffer of the specified size in `ReadableByteStreamController.byobRequest` when required.\n\n        This must be set to enable zero-copy transfers to be used with a default `ReadableStreamDefaultReader`.\n        If not set, a default reader will still stream data, but `ReadableByteStreamController.byobRequest` will always be `null` and transfers to the consumer must be via the stream's internal queues.\n\n- `queuingStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer — this defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk` — this indicates the size to\n        use for each chunk, in bytes.\n\n    > **Note:** You could define your own custom\n    > `queuingStrategy`, or use an instance of\n    > `ByteLengthQueuingStrategy` or `CountQueuingStrategy`\n    > for this object value. If no `queuingStrategy` is supplied, the default\n    > used is the same as a `CountQueuingStrategy` with a high water mark of\n    > 1\\.\n\n### Return value\n\nAn instance of the `ReadableStream` object.\n\n### Exceptions\n\n- `RangeError`\n  - Thrown if the supplied type value is neither `\"bytes\"` nor `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/ReadableStream/prototype/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.cancel()\n\nThe **`cancel()`** method of the\n`ReadableStream` interface returns a `Promise` that\nresolves when the stream is canceled.\n\nCancel is used when you've completely finished with the stream and don't need any more\ndata from it, even if there are chunks enqueued waiting to be read. That data is lost\nafter cancel is called, and the stream is not readable any more. To read those chunks\nstill and not completely get rid of the stream, you'd use\n`ReadableStreamDefaultController.close()`.\n\n## Syntax\n\n```js\ncancel()\ncancel(reason)\n```\n\n### Parameters\n\n- `reason` _**optional**_\n  - : A human-readable reason for the cancellation. The underlying source may or may not use it.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason` parameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to cancel is not a `ReadableStream`, or it is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/ReadableStream/prototype/getReader.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.getReader()\n\nThe **`getReader()`** method of the `ReadableStream` interface creates a reader and locks the stream to it.\nWhile the stream is locked, no other reader can be acquired until this one is released.\n\n## Syntax\n\n```js\ngetReader()\ngetReader(options)\n```\n\n### Parameters\n\n- `options` _**optional**_\n\n  - : An object containing the following properties:\n\n    - `mode` _**optional**_\n\n      - : A property that specifies the type of reader to create.\n        Values can be:\n\n        - `\"byob\"`, which results in a `ReadableStreamBYOBReader` being created that can read readable byte streams (streams that support zero-copy transfer from an underlying byte source to the reader when internal stream buffers are empty).\n        - `undefined` (or not specified at all — this is the default), which results in a `ReadableStreamDefaultReader` being created that can read individual chunks from a stream.\n\n### Return value\n\nA `ReadableStreamDefaultReader` or `ReadableStreamBYOBReader` object instance, depending on the `mode` value.\n\n### Exceptions\n\n- `RangeError`\n  - : Thrown if the provided mode value is not `\"byob\"` or `undefined`.\n- `TypeError`\n  - : Thrown if the stream you are trying to create a reader for is already locked, or not a `ReadableStream`."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/ReadableStream/prototype/locked.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.locked\n\nThe **`locked`** read-only property of the `ReadableStream` interface returns whether or not the readable stream is locked to a reader.\n\nA readable stream can have at most one active reader at a time, and is locked to that reader until it is released.\nA reader might be obtained using `ReadableStream.getReader()` and released using the reader's `releaseLock()` method.\n\n## Value\n\nA `boolean` value indicating whether or not the readable stream is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/ReadableStream/prototype/pipeThrough.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.pipeThrough()\n\nThe **`pipeThrough()`** method of the `ReadableStream` interface provides a chainable way of piping the current stream through a transform stream or any other writable/readable pair.\n\nPiping a stream will generally lock it for the duration of the pipe, preventing other readers from locking it.\n\n## Syntax\n\n```js\npipeThrough(transformStream)\npipeThrough(transformStream, options)\n```\n\n### Parameters\n\n- `transformStream`\n\n  - : A `TransformStream` (or an object with the structure\n    `{writable, readable}`) consisting of a readable stream and a writable\n    stream working together to transform some data from one form to another. Data written\n    to the `writable` stream can be read in some transformed state by the\n    `readable` stream. For example, a `TextDecoder`, has bytes\n    written to it and strings read from it, while a video decoder has encoded bytes\n    written to it and uncompressed video frames read from it.\n\n- `options` _**optional**_\n\n  - : The options that should be used when piping to the `writable` stream.\n    Available options are:\n\n    - `preventClose`\n\n      - : If this is set to `true`, the source `ReadableStream` closing will no longer cause the destination `WritableStream` to be closed.\n        The method will return a fulfilled promise once this process completes, unless an error is encountered while closing the destination, in which case it will be rejected with that error.\n\n    - `preventAbort`\n\n      - : If this is set to `true`, errors in the source `ReadableStream` will no longer abort the destination `WritableStream`.\n        The method will return a promise rejected with the source's error, or with any error that occurs during aborting the destination.\n\n    - `preventCancel`\n\n      - : If this is set to `true`, errors in the destination `WritableStream` will no longer cancel the source `ReadableStream`.\n        In this case the method will return a promise rejected with the source's error, or with any error that occurs during canceling the source.\n        In addition, if the destination writable stream starts out closed or closing, the source readable stream will no longer be canceled.\n        In this case the method will return a promise rejected with an error indicating piping to a closed stream failed, or with any error that occurs during canceling the source.\n\n### Return value\n\nThe `readable` side of the `transformStream`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the `writable` and/or `readable` property of `transformStream` are undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/ReadableStream/prototype/pipeTo.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.pipeTo()\n\nThe **`pipeTo()`** method of the `ReadableStream` interface pipes the current `ReadableStream` to a given `WritableStream` and returns a `Promise` that fulfills when the piping process completes successfully, or rejects if any errors were encountered.\n\nPiping a stream will generally `lock` it for the duration of the pipe, preventing other readers from locking it.\n\n## Syntax\n\n```js\npipeTo(destination)\npipeTo(destination, options)\n```\n\n### Parameters\n\n- `destination`\n\n  - : A `WritableStream` that acts as the final destination for the `ReadableStream`.\n\n- `options` _**optional**_\n\n  - : The options that should be used when piping to the `writable` stream.\n    Available options are:\n\n    - `preventClose`\n      - : If this is set to `true`, the source `ReadableStream` closing will no longer cause the destination `WritableStream` to be closed.\n        The method will return a fulfilled promise once this process completes, unless an error is encountered while closing the destination in which case it will be rejected with that error.\n    - `preventAbort`\n      - : If this is set to `true`, errors in the source `ReadableStream` will no longer abort the destination `WritableStream`.\n        The method will return a promise rejected with the source's error, or with any error that occurs during aborting the destination.\n    - `preventCancel`\n      - : If this is set to `true`, errors in the destination `WritableStream` will no longer cancel the source `ReadableStream`.\n        In this case the method will return a promise rejected with the source's error, or with any error that occurs during canceling the source.\n        In addition, if the destination writable stream starts out closed or closing, the source readable stream will no longer be canceled.\n        In this case the method will return a promise rejected with an error indicating piping to a closed stream failed, or with any error that occurs during canceling the source.\n\n### Return value\n\nA `Promise` that resolves when the piping process has completed.\n\n### Exceptions\n\n- `TypeError`\n  - : The `writableStream` and/or `readableStream` objects are not a writable stream/readable stream, or one or both of the streams are locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/ReadableStream/prototype/tee.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.tee()\n\nThe **`tee()`** method of the\n`ReadableStream` interface [tees](https://streams.spec.whatwg.org/#tee-a-readable-stream) the current readable stream, returning a\ntwo-element array containing the two resulting branches as\nnew `ReadableStream` instances.\n\nThis is useful for allowing two readers to read a stream sequentially or simultaneously,\nperhaps at different speeds.\nFor example, you might do this in a ServiceWorker if you want to fetch\na response from the server and stream it to the browser, but also stream it to the\nServiceWorker cache. Since a response body cannot be consumed more than once, you'd need\ntwo copies to do this.\n\nA teed stream will partially signal backpressure at the rate of the _faster_ consumer\nof the two `ReadableStream` branches,\nand unread data is enqueued internally on the slower consumed `ReadableStream`\nwithout any limit or backpressure.\nThat is, when _both_ branches have an unread element in their internal queue,\nthen the original `ReadableStream`'s controller's internal queue will start to fill up,\nand once its `ReadableStreamDefaultController.desiredSize\", \"desiredSize` ≤ 0\nor byte stream controller `ReadableByteStreamController.desiredSize\", \"desiredSize` ≤ 0,\nthen the controller will stop calling `pull(controller)` on the\nunderlying source passed to `ReadableStream.ReadableStream\", \"new ReadableStream()`.\nIf only one branch is consumed, then the entire body will be enqueued in memory.\nTherefore, you should not use the built-in `tee()` to read very large streams\nin parallel at different speeds.\nInstead, search for an implementation that fully backpressures\nto the speed of the _slower_ consumed branch.\n\nTo cancel the stream you then need to cancel both resulting branches. Teeing a stream\nwill generally lock it for the duration, preventing other readers from locking it.\n\n## Syntax\n\n```js\ntee()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nAn `Array` containing two `ReadableStream` instances.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source stream is not a `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/ReadableStreamBYOBReader/ReadableStreamBYOBReader.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# ReadableStreamBYOBReader()\n\nThe **`ReadableStreamBYOBReader()`** constructor creates and returns a `ReadableStreamBYOBReader` object instance.\n\n> **Note:** You generally wouldn't use this constructor manually;\n> instead, you'd use the `ReadableStream.getReader()` method with the argument `\"byob\"`.\n\n## Syntax\n\n```js\nnew ReadableStreamBYOBReader(stream)\n```\n\n### Parameters\n\n- `stream`\n  - : The `ReadableStream` to be read.\n\n### Return value\n\nAn instance of the `ReadableStreamBYOBReader` object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the supplied `stream` parameter is not a `ReadableStream`, or it is already locked for reading by another reader, or its stream controller is not a `ReadableByteStreamController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/ReadableStreamBYOBReader/prototype/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# cancel()\n\nThe **`cancel()`** method of the `ReadableStreamBYOBReader` interface returns a `Promise` that resolves when the stream is canceled.\nCalling this method signals a loss of interest in the stream by a consumer.\n\n> **Note:** If the reader is active, the `cancel()` method behaves the same as that for the associated stream (`ReadableStream.cancel()`).\n\n## Syntax\n\n```js\ncancel()\ncancel(reason)\n```\n\n### Parameters\n\n- `reason` __optional__\n  - : A human-readable reason for the cancellation. The underlying source may or may not use it.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason` parameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamBYOBReader`, or the stream has no owner.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/ReadableStreamBYOBReader/prototype/closed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# closed\n\nThe **`closed`** read-only property of the `ReadableStreamBYOBReader` interface returns a `Promise` that fulfills when the stream closes, or rejects if the stream throws an error or the reader's lock is released.\n\nThis property enables you to write code that responds to an end to the streaming process.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/ReadableStreamBYOBReader/prototype/read.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# read()\n\nThe **`read()`** method of the `ReadableStreamBYOBReader` interface is used to read data into a view on a user-supplied buffer from an associated readable byte stream.\nA request for data will be satisfied from the stream's internal queues if there is any data present.\nIf the stream queues are empty, the request may be supplied as a zero-copy transfer from the underlying byte source.\n\nThe method takes as an argument a view on a buffer that supplied data is to be read into, and returns a `Promise`.\nThe promise fulfills with an object that has properties `value` and `done` when data comes available, or if the stream is cancelled.\nIf the stream is errored, the promise will be rejected with the relevant error object.\n\nIf a chunk of data is supplied, the `value` property will contain a new view.\nThis will be a view over the same buffer/backing memory (and of the same type) as the original `view` passed to the `read()` method, now populated with the new chunk of data.\nNote that once the promise fulfills, the original `view` passed to the method will be detached and no longer usable.\nThe promise will fulfill with a `value: undefined` if the stream has been cancelled.\nIn this case the backing memory region of `view` is discarded and not returned to the caller (all previously read data in the view's buffer is lost).\n\nThe `done` property indicates whether or not more data is expected.\nThe value is set `true` if the stream is closed or cancelled, and `false` otherwise.\n\n## Syntax\n\n```js\nread(view)\n```\n\n### Parameters\n\n- `view`\n  - : The view that data is to be read into.\n\n### Return value\n\nA `Promise`, which fulfills/rejects with a result depending on the state of the stream.\n\nThe following are possible:\n\n- If a chunk is available and the stream is still active, the promise fulfills with an object of the form:\n\n  ```\n  { value: theChunk, done: false }\n  ```\n\n  `theChunk` is a view containing the new data.\n  This is a view of the same type and over the same backing memory as the `view` passed to the `read()` method.\n  The original `view` will be detached and no longer usable.\n\n- If the stream is closed, the promise fulfills with an object of the form (where `theChunk` has the same properties as above):\n\n  ```\n  { value: theChunk, done: true }\n  ```\n\n- If the stream is cancelled, the promise fulfills with an object of the form:\n\n  ```\n  { value: undefined, done: true }\n  ```\n\n  In this case the backing memory is discarded.\n\n- If the stream throws an error, the promise rejects with the relevant error.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamBYOBReader`, the stream has no owner, the view is not an object or has become detached, the view's length is 0, or `ReadableStreamBYOBReader.releaseLock()` is called (when there's is a pending read request).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/ReadableStreamBYOBReader/prototype/releaseLock.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# releaseLock()\n\nThe **`releaseLock()`** method of the `ReadableStreamBYOBReader` interface releases the reader's lock on the stream.\nAfter the lock is released, the reader is no longer active.\n\nThe reader will appear errored if the associated stream is errored when the lock is released; otherwise, the reader will appear closed.\n\nIf the reader's lock is released while it still has pending read requests then the promises returned by the reader's `ReadableStreamBYOBReader.read()` method are immediately rejected with a `TypeError`.\nUnread chunks remain in the stream's internal queue and can be read later by acquiring a new reader.\n\n## Syntax\n\n```js\nreleaseLock()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamBYOBReader`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/ReadableStreamBYOBRequest/prototype/respond.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# respond()\n\nThe **`respond()`** method of the `ReadableStreamBYOBRequest` interface is used to signal to the associated readable byte stream that the specified number of bytes were written into the `ReadableStreamBYOBRequest.view`.\n\nAfter this method is called, the `view` will be transferred and no longer modifiable.\n\n## Syntax\n\n```js\nrespond(bytesWritten)\n```\n\n### Parameters\n\n- `bytesWritten`\n  - : The number of bytes written into `ReadableStreamBYOBRequest.view`.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : The request does not have an associated `ReadableByteStreamController` or the view buffer is not detached/cannot be transferred into.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/ReadableStreamBYOBRequest/prototype/respondWithNewView.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# respondWithNewView()\n\nThe **`respondWithNewView()`** method of the `ReadableStreamBYOBRequest` interface specifies a new view that the consumer of the associated readable byte stream should write to instead of `ReadableStreamBYOBRequest.view`.\n\nThe new view must be a `TypedArray` or a `DataView` that provides a view onto the same backing memory region as `ReadableStreamBYOBRequest.view`.\nAfter this method is called, the view that was passed into the method will be transferred and no longer modifiable.\n\nThe method is intended for use cases where an underlying byte source needs to transfer a `byobRequest.view` internally before finishing its response.\nFor example, the source may transfer the BYOB view to a separate worker thread, and wait for the worker to transfer it back once it has been filled.\n\n## Syntax\n\n```js\nrespondWithNewView(view)\n```\n\n### Parameters\n\n- `view`\n\n  - : A `TypedArray` or a `DataView` that the consumer of the associated readable byte stream should write to instead of `ReadableStreamBYOBRequest.view`.\n\n    This must be a view onto the same backing memory region as `ReadableStreamBYOBRequest.view` and occupy the same or less memory.\n    Specifically, it must be either the view's buffer or a transferred version, must have the same `byteOffset`, and a `byteLength` (number of bytes written) that is less than or equal to that of the view.\n\n### Return value\n\n`undefined`\n\n### Exceptions\n\n- `TypeError`\n\n  - : Thrown if the source object is not a `ReadableStreamBYOBRequest`, or there is no associated controller, or the associated internal array buffer is non-existent or detached.\n    It may also be thrown if the `view` is zero-length when there is an active reader, or non-zero when called on a closed stream.\n\n- `RangeError`\n  - : Thrown if the new `view` does not match the backing memory region of `ReadableStreamBYOBRequest.view`.\n    For example, it is not the same buffer (or a transferred version), has a different `byteOffset`, or is larger than the memory available to the backing view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/ReadableStreamBYOBRequest/prototype/view.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# view\n\nThe **`view`** getter property of the `ReadableStreamBYOBRequest` interface returns the current view.\n\n## Value\n\nA typed array representing the destination region to which the controller can write generated data.\n\n`null` if the request has already been responded to, by calling `ReadableStreamBYOBRequest.respond()` or `ReadableStreamBYOBRequest.respondWithNewView()`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/ReadableStreamDefaultController/prototype/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.close()\n\nThe **`close()`** method of the\n`ReadableStreamDefaultController` interface closes the associated stream.\n\nReaders will still be able to read any previously-enqueued chunks from the stream,\nbut once those are read, the stream will become closed. If you want to completely get\nrid of the stream and discard any enqueued chunks, you'd use\n`ReadableStream.cancel()` or\n`ReadableStreamDefaultReader.cancel()`.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/ReadableStreamDefaultController/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.desiredSize\n\nThe **`desiredSize`** read-only property of the\n`ReadableStreamDefaultController` interface returns the desired size\nrequired to fill the stream's internal queue.\n\n## Value\n\nAn integer. Note that this can be negative if the queue is over-full.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/ReadableStreamDefaultController/prototype/enqueue.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.enqueue()\n\nThe **`enqueue()`** method of the\n`ReadableStreamDefaultController` interface enqueues a given chunk in the\nassociated stream.\n\n## Syntax\n\n```js\nenqueue(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : The chunk to enqueue.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/ReadableStreamDefaultController/prototype/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.error()\n\nThe **`error()`** method of the\n`ReadableStreamDefaultController` interface causes any future interactions\nwith the associated stream to error.\n\n> **Note:** The `error()` method can be called\n> more than once, and can be called when the stream is not readable.\n\n## Syntax\n\n```js\nerror(e)\n```\n\n### Parameters\n\n- `e`\n  - : The error you want future interactions to fail with.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/ReadableStreamDefaultReader/ReadableStreamDefaultReader.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader()\n\nThe **`ReadableStreamDefaultReader()`**\nconstructor creates and returns a `ReadableStreamDefaultReader` object\ninstance.\n\n## Syntax\n\n```js\nnew ReadableStreamDefaultReader(stream)\n```\n\n### Parameters\n\n- `stream`\n  - : The `ReadableStream` to be read.\n\n### Return value\n\nAn instance of the `ReadableStreamDefaultReader` object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the supplied `stream` parameter is not a `ReadableStream`,\n    or it is already locked for reading by another reader.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/ReadableStreamDefaultReader/prototype/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n~ ReadableStreamDefaultReader.cancel()\n\nThe **`cancel()`** method of the\n`ReadableStreamDefaultReader` interface returns a `Promise` that resolves when the stream is canceled. Calling this method signals a loss of interest in the stream by a consumer.\n\nCancel is used when you've completely finished with the stream and don't need any more\ndata from it, even if there are chunks enqueued waiting to be read. That data is lost\nafter cancel is called, and the stream is not readable any more. To read those chunks\nstill and not completely get rid of the stream, you'd use\n`ReadableStreamDefaultController.close()`.\n\n> **Note:** If the reader is active, the\n> `cancel()` method behaves the same as that for the associated stream\n> (`ReadableStream.cancel()`).\n\n## Syntax\n\n```js\ncancel()\ncancel(reason)\n```\n\n### Parameters\n\n- `reason` _**optional**_\n  - : A human-readable reason for the cancellation. This value may or may not be used.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason`\nparameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamDefaultReader`, or the stream\n    has no owner.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/ReadableStreamDefaultReader/prototype/closed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader.closed\n\nThe **`closed`** read-only property of the\n`ReadableStreamDefaultReader` interface returns a\n`Promise` that fulfills when the stream closes, or rejects if the\nstream throws an error or the reader's lock is released. This property enables you\nto write code that responds to an end to the streaming process.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/ReadableStreamDefaultReader/prototype/read.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader.read()\n\nThe **`read()`** method of the `ReadableStreamDefaultReader` interface returns a `Promise` providing access to the next chunk in the stream's internal queue.\n\n## Syntax\n\n```js\nread()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise`, which fulfills/rejects with a result depending on the state of the stream.\nThe different possibilities are as follows:\n\n- If a chunk is available, the promise will be fulfilled with an object of the form `{ value: theChunk, done: false }`.\n- If the stream becomes closed, the promise will be fulfilled with an object of the form `{ value: undefined, done: true }`.\n- If the stream becomes errored, the promise will be rejected with the relevant error.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamDefaultReader`, the stream has no owner, or `ReadableStreamDefaultReader.releaseLock()` is called (when there's a pending read request).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/ReadableStreamDefaultReader/prototype/releaseLock.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader.releaseLock()\n\nThe **`releaseLock()`** method of the `ReadableStreamDefaultReader` interface releases the reader's lock on the stream.\n\nIf the associated stream is errored when the lock is released, the reader will appear errored in that same way subsequently; otherwise, the reader will appear closed.\n\nIf the reader's lock is released while it still has pending read requests then the promises returned by the reader's `ReadableStreamDefaultReader.read()` method are immediately rejected with a `TypeError`.\nUnread chunks remain in the stream's internal queue and can be read later by acquiring a new reader.\n\n## Syntax\n\n```js\nreleaseLock()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultReader`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/ReferenceError/ReferenceError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReferenceError\n\nThe **`ReferenceError`** object represents an error when a\nnon-existent variable is referenced.\n\n## Syntax\n\n```js\nnew ReferenceError()\nnew ReferenceError(message)\nnew ReferenceError(message, options)\nnew ReferenceError(message, fileName)\nnew ReferenceError(message, fileName, lineNumber)\n\nReferenceError()\nReferenceError(message)\nReferenceError(message, options)\nReferenceError(message, fileName)\nReferenceError(message, fileName, lineNumber)\n```\n\n> **Note:** `ReferenceError()` can be called with or without `new`. Both create a new `ReferenceError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Reflect/apply.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.apply()\n\nThe static **`Reflect.apply()`** method calls a target function\nwith arguments as specified.\n\n## Syntax\n\n```js\nReflect.apply(target, thisArgument, argumentsList)\n```\n\n### Parameters\n\n- `target`\n  - : The target function to call.\n- `thisArgument`\n  - : The value of `this` provided for the call to\n    `target`.\n- `argumentsList`\n  - : An array-like object specifying the arguments with which\n    `target` should be called.\n\n### Return value\n\nThe result of calling the given `target` function with the\nspecified `this` value and arguments.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if the `target` is not callable.\n\n## Description\n\nIn ES5, you typically use the [`Function.prototype.apply()`](../../globals/Function/prototype/apply.mdx) method to call a\nfunction with a given `this` value and `arguments` provided as an array\n(or an [array-like object](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects)).\n\n```js\nFunction.prototype.apply.call(Math.floor, undefined, [1.75]);\n```\n\nWith `Reflect.apply()` this becomes less verbose and easier to understand.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Reflect/construct.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.construct()\n\nThe static **`Reflect.construct()`** method acts like the\n`new` operator, but as a function. It is equivalent to\ncalling `new target(...args)`. It gives also the added option to specify a\ndifferent prototype.\n\n## Syntax\n\n```js\nReflect.construct(target, argumentsList)\nReflect.construct(target, argumentsList, newTarget)\n```\n\n### Parameters\n\n- `target`\n  - : The target function to call.\n- `argumentsList`\n  - : An array-like object specifying the arguments with which\n    `target` should be called.\n- `newTarget` _**optional**_\n  - : The constructor whose prototype should be used. See also the [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target)\n    operator. If `newTarget` is not present, its value defaults\n    to `target`.\n\n### Return value\n\nA new instance of `target` (or `newTarget`,\nif present), initialized by `target` as a constructor with the\ngiven `argumentsList`.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` or\n`newTarget` are not constructors.\n\n## Description\n\n`Reflect.construct()` allows you to invoke a constructor with a variable\nnumber of arguments. (This would also be possible by using the\n[spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) combined with the\n[`new` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new).)\n\n```js\nconst obj = new Foo(...args);\nconst obj = Reflect.construct(Foo, args);\n```\n\n### Reflect.construct() vs Object.create()\n\nPrior to the introduction of `Reflect`, objects could be constructed using\nan arbitrary combination of constructor and prototype by using\n[`Object.create()`](../../globals/Object/create.mdx).\n\n```js\nfunction OneClass() {\n  this.name = \"one\";\n}\n\nfunction OtherClass() {\n  this.name = \"other\";\n}\n\n// Calling this:\nconst obj1 = Reflect.construct(OneClass, args, OtherClass);\n\n// ...has the same result as this:\nconst obj2 = Object.create(OtherClass.prototype);\nOneClass.apply(obj2, args);\n\nconsole.log(obj1.name); // 'one'\nconsole.log(obj2.name); // 'one'\n\nconsole.log(obj1 instanceof OneClass); // false\nconsole.log(obj2 instanceof OneClass); // false\n\nconsole.log(obj1 instanceof OtherClass); // true\nconsole.log(obj2 instanceof OtherClass); // true\n\n// Another example to demonstrate below:\n\nfunction func1(a, b, c, d) {\n  console.log(arguments[3]);\n}\n\nfunction func2(d, e, f, g) {\n  console.log(arguments[3]);\n}\n\nconst obj1 = Reflect.construct(func1, [\"I\", \"Love\", \"my\", \"country\"]);\n```\n\nHowever, while the end result is the same, there is one important difference in the\nprocess. When using `Object.create()` and\n[`Function.prototype.apply()`](../../globals/Function/prototype/apply.mdx), the `new.target` operator will\npoint to `undefined` within the function used as the constructor, since the\n`new` keyword is not being used to create the object.\n\nWhen invoking `Reflect.construct()`, on the other hand, the\n`new.target` operator will point to the `newTarget`\nparameter if supplied, or `target` if not.\n\n```js\nfunction OneClass() {\n  console.log(\"OneClass\");\n  console.log(new.target);\n}\nfunction OtherClass() {\n  console.log(\"OtherClass\");\n  console.log(new.target);\n}\n\nconst obj1 = Reflect.construct(OneClass, args);\n// Logs:\n// OneClass\n// function OneClass { ... }\n\nconst obj2 = Reflect.construct(OneClass, args, OtherClass);\n// Logs:\n// OneClass\n// function OtherClass { ... }\n\nconst obj3 = Object.create(OtherClass.prototype);\nOneClass.apply(obj3, args);\n// Logs:\n// OneClass\n// undefined\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Reflect/defineProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.defineProperty()\n\nThe static **`Reflect.defineProperty()`** method is like\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx) but returns a `Boolean`.\n\n## Syntax\n\n```js\nReflect.defineProperty(target, propertyKey, attributes)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to define the property.\n- `propertyKey`\n  - : The name of the property to be defined or modified.\n- `attributes`\n  - : The attributes for the property being defined or modified.\n\n### Return value\n\nA `Boolean` indicating whether or not the property was successfully\ndefined.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.defineProperty` method allows precise addition to or\nmodification of a property on an object. For more details, see the\n[`Object.defineProperty`](../../globals/Object/defineProperty.mdx) which is similar.\n\n> **Note:** `Object.defineProperty` returns the\n> object or throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the property has not been successfully\n> defined. `Reflect.defineProperty`, however, returns a `Boolean`\n> indicating whether or not the property was successfully defined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Reflect/deleteProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.deleteProperty()\n\nThe static\n**`Reflect.deleteProperty()`**\nmethod allows to delete properties. It is like the\n[`delete` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete)\nas a function.\n\n## Syntax\n\n```js\nReflect.deleteProperty(target, propertyKey)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to delete the property.\n- `propertyKey`\n  - : The name of the property to be deleted.\n\n### Return value\n\nA `Boolean` indicating whether or not the property was successfully\ndeleted.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.deleteProperty` method allows you to delete a property on an\nobject. It returns a `Boolean` indicating whether or not the property was\nsuccessfully deleted. It is almost identical to the non-strict\n[`delete` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Reflect/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.get()\n\nThe static **`Reflect.get()`** method works like getting a\nproperty from an object (`target[propertyKey]`) as a function.\n\n## Syntax\n\n```js\nReflect.get(target, propertyKey)\nReflect.get(target, propertyKey, receiver)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to get the property.\n- `propertyKey`\n  - : The name of the property to get.\n- `receiver` _**optional**_\n  - : The value of `this` provided for the call to\n    `target` if a getter is encountered. When used with\n    `Proxy`, it can be an object that inherits from\n    `target`.\n\n### Return value\n\nThe value of the property.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.get` method allows you to get a property on an object. It is like the\n[property accessor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Property_Accessors) syntax as a function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Reflect/getOwnPropertyDescriptor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.getOwnPropertyDescriptor()\n\nThe static\n**`Reflect.getOwnPropertyDescriptor()`** method is similar to\n[`Object.getOwnPropertyDescriptor()`](../../globals/Object/getOwnPropertyDescriptor.mdx). It returns a property descriptor of\nthe given property if it exists on the object, `undefined`\notherwise.\n\n\n\n## Syntax\n\n```js\nReflect.getOwnPropertyDescriptor(target, propertyKey)\n```\n\n### Parameters\n\n- `target`\n  - : The target object in which to look for the property.\n- `propertyKey`\n  - : The name of the property to get an own property descriptor for.\n\n### Return value\n\nA property descriptor object if the property exists in `target`\nobject; otherwise, [`undefined`](../../globals/undefined.mdx).\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.getOwnPropertyDescriptor` method returns a property descriptor\nof the given property if it exists in the `target` object,\n[`undefined`](../../globals/undefined.mdx) otherwise. The only difference to\n[`Object.getOwnPropertyDescriptor()`](../../globals/Object/getOwnPropertyDescriptor.mdx) is how non-object targets are handled.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Reflect/getPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.getPrototypeOf()\n\nThe static **`Reflect.getPrototypeOf()`** method is almost the\nsame method as [`Object.getPrototypeOf()`](../../globals/Object/getPrototypeOf.mdx). It returns the prototype (i.e. the\nvalue of the internal `[[Prototype]]` property) of the specified object.\n\n\n\n## Syntax\n\n```js\nReflect.getPrototypeOf(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object of which to get the prototype.\n\n### Return value\n\nThe prototype of the given object. If there are no inherited properties,\n[`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) is returned.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.getPrototypeOf` method returns the prototype (i.e. the value of\nthe internal `[[Prototype]]` property) of the specified object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Reflect/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.has()\n\nThe static **`Reflect.has()`** method works like the [`in` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/in)\nas a function.\n\n## Syntax\n\n```js\nReflect.has(target, propertyKey)\n```\n\n### Parameters\n\n- `target`\n  - : The target object in which to look for the property.\n- `propertyKey`\n  - : The name of the property to check.\n\n### Return value\n\nA `Boolean` indicating whether or not the `target`\nhas the property.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.has` method allows you to check if a property is in an object.\nIt works like the [`in` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/in)\nas a function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Reflect/isExtensible.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.isExtensible()\n\nThe static **`Reflect.isExtensible()`** method determines if an object is extensible (whether it can have new properties added to it). It is similar to [`Object.isExtensible()`](../../globals/Object/isExtensible.mdx), but with [some differences](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/isExtensible#difference_with_object.isextensible).\n\n## Syntax\n\n```js\nReflect.isExtensible(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object which to check if it is extensible.\n\n### Return value\n\nA `Boolean` indicating whether or not the target is extensible.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Reflect/ownKeys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.ownKeys()\n\nThe static **`Reflect.ownKeys()`** method returns an array of\nthe `target` object's own property keys.\n\n## Syntax\n\n```js\nReflect.ownKeys(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object from which to get the own keys.\n\n### Return value\n\nAn `Array` of the `target` object's own property\nkeys.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.ownKeys` method returns an array of the\n`target` object's own property keys. Its return value is\nequivalent to `Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target))`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Reflect/preventExtensions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.preventExtensions()\n\nThe static **`Reflect.preventExtensions()`** method prevents new properties from ever being added to an object (i.e., prevents future extensions to the object). It is similar to [`Object.preventExtensions()`](../../globals/Object/preventExtensions.mdx), but with [some differences](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/preventExtensions#difference_with_object.preventextensions).\n\n## Syntax\n\n```js\nReflect.preventExtensions(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to prevent extensions.\n\n### Return value\n\nA `Boolean` indicating whether or not the target was successfully set to prevent extensions.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Reflect/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.set()\n\nThe static **`Reflect.set()`** method works like setting a\nproperty on an object.\n\n## Syntax\n\n```js\nReflect.set(target, propertyKey, value)\nReflect.set(target, propertyKey, value, receiver)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to set the property.\n- `propertyKey`\n  - : The name of the property to set.\n- `value`\n  - : The value to set.\n- `receiver` _**optional**_\n  - : The value of `this` provided for the call to the setter for `propertyKey` on `target`. If provided and `target` does not have a setter for `propertyKey`, the property will be set on `receiver` instead.\n\n### Return value\n\nA `Boolean` indicating whether or not setting the property was successful.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.set` method allows you to set a property on an object. It does\nproperty assignment and is like the\n[property accessor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Property_Accessors) syntax as a function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Reflect/setPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.setPrototypeOf()\n\nThe static\n**`Reflect.setPrototypeOf()`** method is the same method as\n[`Object.setPrototypeOf()`](../../globals/Object/setPrototypeOf.mdx), except for its return type. It sets the\nprototype (i.e., the internal `[[Prototype]]` property) of a specified\nobject to another object or to [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null), and returns `true` if\nthe operation was successful, or `false` otherwise.\n\n## Syntax\n\n```js\nReflect.setPrototypeOf(target, prototype)\n```\n\n### Parameters\n\n- `target`\n  - : The target object of which to set the prototype.\n- `prototype`\n  - : The object's new prototype (an object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null)).\n\n### Return value\n\nA `Boolean` indicating whether or not the prototype was successfully set.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object` or if `prototype` is neither an object nor\n[`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null).\n\n## Description\n\nThe `Reflect.setPrototypeOf` method changes the prototype (i.e. the value of\nthe internal `[[Prototype]]` property) of the specified object.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Request/Request.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request()\n\nThe **`Request()`** constructor creates a new\n`Request` object.\n\n## Syntax\n\n```js\nnew Request(input)\nnew Request(input, options)\n```\n\n### Parameters\n\n- `input`\n\n  - : Defines the resource that you wish to fetch. This can either be:\n\n    - A string containing the direct URL of the resource you want to\n      fetch.\n    - A `Request` object, effectively creating a copy.\n\n- `options` _**optional**_\n\n  - : An object containing any custom settings that you want to apply to the\n    request. The possible options are:\n\n    - `method`\n      - : The request method, e.g., `GET`, `POST`. The default is `GET`.\n    - `headers`\n      - : Any headers you want to add to your request, contained\n        within a `Headers` object or an object literal with `String` values.\n    - `body`\n      - : Any body that you want to add to your request: this can be an `ArrayBuffer`, a `TypedArray`, a `DataView`, a `URLSearchParams`, string object or literal, a `ReadableStream` object, a [`Blob`](../../globals/Blob/Blob.mdx) object, or a [`FormData`](../../globals/FormData/FormData.mdx) object.\n    - `backend` _**Fastly-specific**_\n    - `cacheOverride` _**Fastly-specific**_, see [`CacheOverride`](../../fastly:cache-override/CacheOverride/CacheOverride.mdx).\n    - `cacheKey` _**Fastly-specific**_\n    - `manualFramingHeaders`_: boolean_ _**optional**_ _**Fastly-specific**_\n      - : The default value is `false`, which means that the framing headers are automatically created based on the message body.\n        In \"automatic\" mode, a `Content-Length` is used when the size of the body can be determined before it is sent.\n        Requests sent in streaming mode, where headers are sent immediately but the content of the body is streamed later, will receive a `Transfer-Encoding: chunked` to accommodate the dynamic generation of the body.\n        In \"manual\" mode, any `Content-Length` or `Transfer-Encoding` headers will be honored.\n        You must ensure that those headers have correct values permitted by the [HTTP/1.1 specification](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).\n        If the provided headers are not permitted by the specification, the headers will revert to \"automatic\" mode and a diagnostic message will be logged about what was wrong.\n        If a `Content-Length` is permitted by the specification, but the value does not match the size of the actual body, the body will either be truncated (if it is too long), or the connection will be hung up early (if it is too short).\n    - `fastly` _**Fastly-specific**_\n      - `decompressGzip`_: boolean_ _**optional**_\n        - Whether to automatically gzip decompress the Response or not."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Request/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the `Request` interface\nreads the request body and returns it as a promise that resolves with an `ArrayBuffer`.\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an `ArrayBuffer`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Request/prototype/blob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.blob()\n\nThe **`blob()`** method of the `Request` interface reads the request body and returns it as a promise that resolves with a `Blob`.\n\n## Syntax\n\n```js\nblob()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a [`Blob`](../../../globals/Blob/Blob.mdx).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the request body has already been used or if the request's method is `GET` or `HEAD`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Request/prototype/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.body\n\nThe read-only **`body`** property of the `Request`\ninterface contains a `ReadableStream` with the body contents\nthat have been added to the request. Note that a request using the\n`GET` or `HEAD` method cannot have a body\nand `null` is returned in these cases.\n\n## Value\n\nA `ReadableStream` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Request/prototype/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.bodyUsed\n\nThe read-only **`bodyUsed`** property of the\n`Request` interface is a boolean value that indicates\nwhether the request body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Request/prototype/clone.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.clone()\n\nThe **`clone()`** method of the `Request` interface creates a copy of the current `Request` object.\n\nLike the underlying `ReadableStream.tee`` api, the `body` of a cloned `Response`\nwill signal backpressure at the rate of the _faster_ consumer of the two bodies,\nand unread data is enqueued internally on the slower consumed `body`\nwithout any limit or backpressure.\nBeware when you construct a `Request` from a stream and then `clone` it.\n\n`clone()` throws a `TypeError` if the request body has already been used. In fact, the main reason `clone()` exists is to allow multiple uses of body objects (when they are one-use only.)\n\nIf you intend to modify the request, you may prefer the `Request` constructor.\n\n## Syntax\n\n```js\nclone()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Request` object, which is an exact copy of the `Request` that `clone()` was called on.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Request/prototype/formData.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.formData()\n\nThe **`formData()`** method of the `Request` interface reads the request body and returns it as a promise that resolves with a `FormData` object.\n\n## Syntax\n\n```js\nformData()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a [`FormData`](../../../globals/FormData/FormData.mdx) object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the request body has already been used or if the request's method is `GET` or `HEAD`.\n- `SyntaxError`\n  - : Thrown if the request's content type is not `multipart/form-data` or `application/x-www-form-urlencoded`, or if the content cannot be parsed as form data.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Request/prototype/headers.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.headers\n\nThe **`headers`** read-only property of the\n`Request` interface contains the `Headers` object associated\nwith the request.\n\n## Value\n\nA `Headers` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Request/prototype/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.json()\n\nThe **`json()`** method of the `Request` interface\nreads the request body and returns it as a promise that resolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a JavaScript object. This object could be\nanything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Request/prototype/method.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.method\n\nThe **`method`** read-only property of the\n`Request` interface contains the request's method (`GET`, `POST`, etc.)\n\n## Value\n\nA `String` indicating the method of the request.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Request/prototype/setManualFramingHeaders.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.setManualFramingHeaders()\n\nThe **`setManualFramingHeaders()`** method of the `Request` interface controls how the framing headers should be determined.\n\nBy default the framing headers are set to \"automatic\" mode, which means they are created based on the body of the associated Request instance.\nIn \"automatic\" mode, a `Content-Length` is used when the size of the body can be determined before it is sent.\nRequests sent in streaming mode, where headers are sent immediately but the content of the body is streamed later, will receive a `Transfer-Encoding: chunked` to accommodate the dynamic generation of the body.\nIn \"manual\" mode, any `Content-Length` or `Transfer-Encoding` headers will be honored.\nYou must ensure that those headers have correct values permitted by the [HTTP/1.1 specification](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).\nIf the provided headers are not permitted by the specification, the headers will revert to \"automatic\" mode and a diagnostic message will be logged about what was wrong.\nIf a `Content-Length` is permitted by the specification, but the value does not match the size of the actual body, the body will either be truncated (if it is too long), or the connection will be hung up early (if it is too short).\n\n## Syntax\n\n## Syntax\n\n```js\nsetManualFramingHeaders(manual)\n```\n\n### Parameters\n\n- `manual` _: boolean_\n  - : Whether or not to use \"manual\" mode for the framing headers.\n\n### Return value\n\n`undefined`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Request/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.text()\n\nThe **`text()`** method of the `Request` interface\nreads the request body and returns it as a promise that resolves with a `String`.\nThe response is _always_ decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Promise that resolves with a `String`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Request/prototype/url.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.url\n\nThe **`url`** read-only property of the `Request` interface contains the URL of the request.\n\n## Value\n\nA string indicating the URL of the request.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Response/Response.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response()\n\nThe **`Response()`** constructor creates a new `Response` object.\n\n## Syntax\n\n```js\nnew Response()\nnew Response(body)\nnew Response(body, options)\n```\n\n### Parameters\n\n- `body` _**optional**_\n\n  - : An object defining a body for the response. This can be `null` (which is\n    the default value), or one of:\n\n    - [`ArrayBuffer`](../../globals/ArrayBuffer/ArrayBuffer.mdx)\n    - `TypedArray`\n    - [`DataView`](../../globals/DataView/DataView.mdx)\n    - [`ReadableStream`](../../globals/ReadableStream/ReadableStream.mdx)\n    - [`URLSearchParams`](../../globals/URLSearchParams/URLSearchParams.mdx)\n    - [`String`](../../globals/String/String.mdx)\n    - string literal\n    - [`Blob`](../../globals/Blob/Blob.mdx)\n    - [`FormData`](../../globals/FormData/FormData.mdx)\n\n- `options` _**optional**_\n\n  - : An options object containing any custom settings that you want to apply to the\n    response, or an empty object (which is the default value). The possible options are:\n\n    - `status`\n      - : The status code for the response, e.g., `200`.\n    - `statusText`\n      - : The status message associated with the status code,\n        e.g., `OK`.\n    - `headers`\n      - : Any headers you want to add to your response, contained\n        within a [`Headers`](../../globals/Headers/Headers.mdx) object or object literal of\n        [`String`](../../globals/String/String.mdx) key/value pairs.\n    - `manualFramingHeaders`_: boolean_ _**optional**_ _**Fastly-specific**_\n      - : The default value is `false`, which means that the framing headers are automatically created based on the message body.\n        In \"automatic\" mode, a `Content-Length` is used when the size of the body can be determined before it is sent.\n        Responses sent in streaming mode, where headers are sent immediately but the content of the body is streamed later, will receive a `Transfer-Encoding: chunked` to accommodate the dynamic generation of the body.\n        In \"manual\" mode, any `Content-Length` or `Transfer-Encoding` headers will be honored.\n        You must ensure that those headers have correct values permitted by the [HTTP/1.1 specification](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).\n        If the provided headers are not permitted by the specification, the headers will revert to \"automatic\" mode and a diagnostic message will be logged about what was wrong.\n        If a `Content-Length` is permitted by the specification, but the value does not match the size of the actual body, the body will either be truncated (if it is too long), or the connection will be hung up early (if it is too short).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Response/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface\ntakes a [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion. It returns a promise\nthat resolves with an [`ArrayBuffer`](../../../globals/ArrayBuffer/ArrayBuffer.mdx).\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an [`ArrayBuffer`](../../../globals/ArrayBuffer/ArrayBuffer.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Response/prototype/blob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.blob()\n\nThe **`blob()`** method of the [`Response`](../Response.mdx) interface takes a [`Response`](../Response.mdx) stream and reads it to completion. It returns a promise that resolves with a `Blob`.\n\n## Syntax\n\n```js\nblob()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a [`Blob`](../../../globals/Blob/Blob.mdx).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the response body has already been consumed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Response/prototype/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.body\n\nThe **`body`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface is a [`ReadableStream`](../../../globals/ReadableStream/ReadableStream.mdx) of the body contents.\n\n## Value\n\nA [`ReadableStream`](../../../globals/ReadableStream/ReadableStream.mdx), or else `null` for any `Response` object [constructed](../../../globals/Response/Response.mdx) with a null `body` property, or for any actual HTTP response that has no body.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Response/prototype/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.bodyUsed\n\nThe **`bodyUsed`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface is a boolean value that indicates whether the body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Response/prototype/formData.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.formData()\n\nThe **`formData()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface takes a [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion. It returns a promise that resolves with a `FormData` object.\n\n## Syntax\n\n```js\nformData()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a [`FormData`](../../../globals/FormData/FormData.mdx) object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the response body has already been consumed.\n- `SyntaxError`\n  - : Thrown if the response's content type is not `multipart/form-data` or `application/x-www-form-urlencoded`, or if the content cannot be parsed as form data.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Response/prototype/headers.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.headers\n\nThe **`headers`** read-only property of the\n[`Response`](../../../globals/Response/Response.mdx) interface contains the [`Headers`](../../../globals/Headers/Headers.mdx) object associated\nwith the response.\n\n## Value\n\nA [`Headers`](../../Headers/Headers.mdx) object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Response/prototype/ip.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.ip\n\nThe **`ip`** getter of the `Response` interface returns the IP address associated with the request, as either an IPv6 or IPv4 string.\n\nIn the case where no IP address is available (say the response is cached, or was manually created), `undefined` will be returned.\n\nTo ensure an origin request with an IP, pass a [`CacheOverride`](../../../fastly:cache-override/CacheOverride/CacheOverride.mdx) value.\n\n## Value\n\n`undefined` or `string`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Response/prototype/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.json()\n\nThe **`json()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface takes\na [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion. It returns a promise which\nresolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA [`Promise`](../../../globals/Promise/Promise.mdx) that resolves to a JavaScript object. This object could be\nanything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Response/prototype/ok.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.ok\n\nThe **`ok`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains a Boolean stating whether the response was successful (status in the range 200-299) or not.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Response/prototype/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.port\n\nThe **`port`** getter of the `Response` interface returns the port associated with the request, as a number.\n\nIn the case where no port is available (say the response is cached, or was manually created), `undefined` will be returned.\n\nTo ensure an origin request with a port, pass a [`CacheOverride`](../../../fastly:cache-override/CacheOverride/CacheOverride.mdx) value.\n\n## Value\n\n`undefined` or `number`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Response/prototype/setManualFramingHeaders.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.setManualFramingHeaders()\n\nThe **`setManualFramingHeaders()`** method of the `Response` interface controls how the framing headers should be determined.\n\nBy default the framing headers are set to \"automatic\" mode, which means they are created based on the body of the associated Response instance.\nIn \"automatic\" mode, a `Content-Length` is used when the size of the body can be determined before it is sent.\nResponses sent in streaming mode, where headers are sent immediately but the content of the body is streamed later, will receive a `Transfer-Encoding: chunked` to accommodate the dynamic generation of the body.\nIn \"manual\" mode, any `Content-Length` or `Transfer-Encoding` headers will be honored.\nYou must ensure that those headers have correct values permitted by the [HTTP/1.1 specification](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).\nIf the provided headers are not permitted by the specification, the headers will revert to \"automatic\" mode and a diagnostic message will be logged about what was wrong.\nIf a `Content-Length` is permitted by the specification, but the value does not match the size of the actual body, the body will either be truncated (if it is too long), or the connection will be hung up early (if it is too short).\n\n## Syntax\n\n```js\nsetManualFramingHeaders(manual)\n```\n\n### Parameters\n\n- `manual` _: boolean_\n  - : Whether or not to use \"manual\" mode for the framing headers.\n\n### Return value\n\n`undefined`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Response/prototype/status.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.status\n\nThe **`status`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains the HTTP status code of the response.\n\nFor example, `200` for success, `404` if the resource could not be found.\n\n## Value\n\nAn unsigned short number.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Response/prototype/statusText.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.statusText\n\nThe **`statusText`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains the status message corresponding to the HTTP status code in [`status`](../../../globals/Response/prototype/status.mdx).\n\nFor example, this would be `OK` for a status code `200`, `Continue` for `100`, `Not Found` for `404`.\n\n## Value\n\nA [`String`](../../../globals/String/String.mdx) containing the HTTP status message associated with the response.\nThe default value is \"\".\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Response/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.text()\n\nThe **`text()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface takes a [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion.\nIt returns a promise that resolves with a [`String`](../../../globals/String/String.mdx).\nThe response is _always_ decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Promise that resolves with a [`String`](../../../globals/String/String.mdx).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Response/prototype/url.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.url\n\nThe **`url`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains the URL of the response.\nThe value of the `url` property will be the final URL obtained after any redirects.\n\n## Value\n\nA string.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Response/redirect.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Response.redirect()\n\nThe **`redirect()`** static method of the `Response` interface returns a `Response` resulting in a redirect to the specified URL.\n\n## Syntax\n\n```js\nResponse.redirect(url)\nResponse.redirect(url, status)\n```\n\n### Parameters\n\n- `url`\n  - : The URL that the new response is to originate from.\n- `status` __optional__\n  - : An optional status code for the response (e.g., `302`.)\n\n### Return value\n\nA `Response` object.\n\n### Exceptions\n\n- `RangeError`\n  - : The specified status is not a redirect status.\n- `TypeError`\n  - : The specified URL is invalid.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/RsaHashedImportParams/RsaHashedImportParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RsaHashedImportParams\n\nThe **`RsaHashedImportParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.importKey()`, when importing any RSA-based key pair.\n\n## Instance properties\n\n- `name`\n  - : A string. This should be set to `RSASSA-PKCS1-v1_5`.\n\n- `hash`\n  - : A string representing the name of the digest function to use. This can be one of `SHA-256`, `SHA-384`, or `SHA-512`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Set/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get Set\\[Symbol.species]\n\nThe **`Set[Symbol.species]`** accessor property is an unused accessor property specifying how to copy `Set` objects.\n\n## Syntax\n\n```js\nSet[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct copied `Set` instances.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `Set` objects. Subclass constructors may override it to change the constructor assignment.\n\n> **Note:** This property is currently unused by all `Set` methods.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Set/Set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set()\n\nThe **`Set` constructor** lets you\ncreate `Set` objects that store unique values of any type, whether [primitive values](https://developer.mozilla.org/docs/Glossary/Primitive) or object\nreferences.\n\n## Syntax\n\n```js\nnew Set()\nnew Set(iterable)\n```\n\n> **Note:** `Set()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable` _**optional**_\n\n  - : If an [iterable object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) is passed, all of its elements will be added to the new\n    `Set`.\n\n    If you don't specify this parameter, or its value is `null`, the new\n    `Set` is empty.\n\n### Return value\n\nA new `Set` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Set/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype\\[Symbol.iterator]()\n\nThe **`[Symbol.iterator`** method of a `Set` object implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows sets to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the values of the set.\n\nThe initial value of this property is the same function object as the initial value of the [`Set.prototype.values`](../../../globals/Set/prototype/values.mdx) property.\n\n## Syntax\n\n```js\nset[Symbol.iterator]()\n```\n\n### Return value\n\nThe same return value as [`Set.prototype.values()`](../../../globals/Set/prototype/values.mdx): a new iterable iterator object that yields the values of the set.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Set/prototype/add.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.add()\n\nThe **`add()`** method inserts a new element with a specified value in to a `Set` object, if there isn't an element with the same value already in the `Set`.\n\n## Syntax\n\n```js\nadd(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value of the element to add to the `Set` object.\n\n### Return value\n\nThe `Set` object with added value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Set/prototype/clear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.clear()\n\nThe **`clear()`** method removes all elements from a\n`Set` object.\n\n## Syntax\n\n```js\nclear()\n```\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Set/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.delete()\n\nThe **`delete()`** method removes a specified value from a\n`Set` object, if it is in the set.\n\n## Syntax\n\n```js\ndelete(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to remove from `Set`.\n\n### Return value\n\nReturns `true` if `value` was already in\n`Set`; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Set/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.entries()\n\nThe **`entries()`** method returns a new [Iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators) object\nthat contains **an array of `[value, value]`** for each element\nin the `Set` object, in insertion order. For `Set` objects there\nis no `key` like in `Map` objects. However, to keep the API\nsimilar to the `Map` object, each _entry_ has the same value for its\n_key_ and _value_ here, so that an array `[value, value]` is\nreturned.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nA new iterator object that contains an array of `[value, value]` for each\nelement in the given `Set`, in insertion order.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Set/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.forEach()\n\nThe **`forEach()`** method executes a provided function once\nfor each value in the `Set` object, in insertion order.\n\n## Syntax\n\n```js\n// Arrow function\nforEach(() => { /* ... */ } )\nforEach((value) => { /* ... */ } )\nforEach((value, key) => { /* ... */ } )\nforEach((value, key, set) => { /* ... */ } )\n\n// Callback function\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n\n// Inline callback function\nforEach(function() { /* ... */ })\nforEach(function(value) { /* ... */ })\nforEach(function(value, key) { /* ... */ })\nforEach(function(value, key, set) { /* ... */ })\nforEach(function(value, key, set) { /* ... */ }, thisArg)\n```\n\n### Parameters\n\n- `callback`\n\n  - : Function to execute for each element, taking three arguments:\n\n    - `value`, `key`\n      - : The current element being processed in the `Set`. As there are no\n        keys in `Set`, the value is passed for both arguments.\n    - `set`\n      - : The `Set` object which `forEach()` was called upon.\n\n- `thisArg`\n  - : Value to use as `this` when executing `callbackFn`.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n## Description\n\nThe `forEach()` method executes the provided\n`callback` once for each value which actually exists in the\n`Set` object. It is not invoked for values which have been deleted. However,\nit is executed for values which are present but have the value `undefined`.\n\n`callback` is invoked with **three arguments**:\n\n- the **element value**\n- the **element key**\n- the **`Set` object being traversed**\n\nThere are no keys in `Set` objects, however, so the first two arguments are\nboth **values** contained in the [Set](../../../globals/Set/Set.mdx). This is to make it\nconsistent with other `forEach()` methods for [`Map.prototype.forEach()`](../../../globals/Map/prototype/forEach.mdx) and [`Array.prototype.forEach()`](../../../globals/Array/prototype/forEach.mdx).\n\nIf a `thisArg` parameter is provided to `forEach()`,\nit will be passed to `callback` when invoked, for use as its\n`this` value. Otherwise, the value `undefined` will be passed for\nuse as its `this` value. The `this` value ultimately observable by\n`callback` is determined according to\n[the usual rules for determining the `this` seen by a function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this).\n\nEach value is visited once, except in the case when it was deleted and re-added before\n`forEach()` has finished. `callback` is not invoked for\nvalues deleted before being visited. New values added before `forEach()` has\nfinished will be visited.\n\n`forEach()` executes the `callback` function once for\neach element in the `Set` object; it does not return a value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Set/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.has()\n\nThe **`has()`** method returns a boolean indicating whether an\nelement with the specified value exists in a `Set` object or not.\n\n## Syntax\n\n```js\nhas(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to test for presence in the `Set` object.\n\n### Return value\n\nReturns `true` if an element with the specified value exists in the `Set` object; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Set/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.keys()\n\nThe **`keys()`** method is an alias for the [`values()`](../../../globals/Set/prototype/values.mdx) method.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nA new iterator object containing the values for each element in the given\n`Set`, in insertion order.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Set/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.size\n\nThe **`size`** accessor property returns the number of (unique) elements in a [Set](../../../globals/Set/Set.mdx) object.\n\n## Description\n\nThe value of `size` is an integer representing how many entries the `Set` object has. A set accessor function for `size` is `undefined`; you cannot change this property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Set/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.values()\n\nThe **`values()`** method returns a new [Iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators) object that\ncontains the values for each element in the `Set` object in insertion order.\n\n> **Note:** The **`keys()`** method is an alias\n> for this method (for similarity with [Map](../../../globals/Map/Map.mdx) objects), hence the\n> `keys()` page redirecting here. It behaves exactly the same and returns\n> **values** of `Set` elements.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nA new iterator object containing the values for each element in the given\n`Set`, in insertion order.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/String/String.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String() constructor\n\nThe **`String`** constructor is used to create a new\n`String` object. When called instead as a function, it performs type\nconversion to a \"primitive string\" which is usually more\nuseful.\n\n## Syntax\n\n```js\nnew String(thing)\nString(thing)\n```\n\n> **Note:** `String()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\n- `thing`\n  - : Anything to be converted to a string.\n\n### Return value\n\nWhen `String` is called as a constructor (with `new`), it creates a `String` object, which is **not** a primitive.\n\nWhen `String` is called as a function, it coerces the parameter to a string primitive. `Symbol` values would be converted to `\"Symbol(description)\"`, where `description` is the [description](../../globals/Symbol/prototype/description.mdx) of the Symbol, instead of throwing.\n\n> **Warning:** You should rarely find yourself using `String` as a constructor.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/String/fromCharCode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.fromCharCode()\n\nThe static **`String.fromCharCode()`** method returns a string\ncreated from the specified sequence of UTF-16 code units.\n\n## Syntax\n\n```js\nString.fromCharCode(num1)\nString.fromCharCode(num1, num2)\nString.fromCharCode(num1, num2, /* …, */ numN)\n```\n\n### Parameters\n\n- `num1, ..., numN`\n  - : A sequence of numbers that are UTF-16 code units. The range is between\n    `0` and `65535` (`0xFFFF`). Numbers greater than\n    `0xFFFF` are truncated. No validity checks are performed.\n\n### Return value\n\nA string of length `N` consisting of the\n`N` specified UTF-16 code units.\n\n## Description\n\nThis method returns a string and not a `String` object.\n\nBecause `fromCharCode()` is a static method of `String`, you\nalways use it as `String.fromCharCode()`, rather than as a method of a\n`String` object you created.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/String/fromCodePoint.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.fromCodePoint()\n\nThe static **`String.fromCodePoint()`** method returns a string\ncreated by using the specified sequence of code points.\n\n## Syntax\n\n```js\nString.fromCodePoint(num1)\nString.fromCodePoint(num1, num2)\nString.fromCodePoint(num1, num2, /* …, */ numN)\n```\n\n### Parameters\n\n- `num1, ..., numN`\n  - : A sequence of code points.\n\n### Return value\n\nA string created by using the specified sequence of code points.\n\n### Exceptions\n\n- A `RangeError` is thrown if an invalid Unicode\n  code point is given (e.g. `\"RangeError: NaN is not a valid code point\"`).\n\n## Description\n\nThis method returns a string (and _not_ a `String` object).\n\nBecause `fromCodePoint()` is a static method of `String`, you\nmust call it as `String.fromCodePoint()`, rather than as a method of a\n`String` object you created.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/String/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype\\[Symbol.iterator]()\n\nThe **`Symbol.iterator`** method of a string implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows strings to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the Unicode code points of the string value as individual strings.\n\n## Syntax\n\n```js\nstring[Symbol.iterator]()\n```\n\n### Return value\n\nA new iterable iterator object that yields the Unicode code points of the string value as individual strings.\n\n## Description\n\nStrings are iterated by Unicode code points. This means grapheme clusters will be split, but surrogate pairs will be preserved.\n\n```js\n// \"Backhand Index Pointing Right: Dark Skin Tone\"\n[...\"👉🏿\"]; // ['👉', '🏿']\n// splits into the basic \"Backhand Index Pointing Right\" emoji and\n// the \"Dark skin tone\" emoji\n\n// \"Family: Man, Boy\"\n[...\"👨‍👦\"]; // [ '👨', '‍', '👦' ]\n// splits into the \"Man\" and \"Boy\" emoji, joined by a ZWJ\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/String/prototype/at.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.at()\n\nThe **`at()`** method takes an integer value and returns a `('String` consisting of the single UTF-16 code unit located at the specified offset. This method allows for positive and negative integers. Negative integers count back from the last string character.\n\n## Syntax\n\n```js\nat(index)\n```\n\n### Parameters\n\n- `index`\n  - : The index (position) of the string character to be returned. Supports relative indexing from the end of the string when passed a negative index; i.e. if a negative number is used, the character returned will be found by counting back from the end of the string.\n\n### Return value\n\n`('String` consisting of the single UTF-16 code unit located at the specified position. Returns [`undefined`](../../../globals/undefined.mdx) if the given index can not be found.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/String/prototype/charAt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.charAt()\n\nThe `String` object's\n**`charAt()`** method returns a new string consisting of the\nsingle UTF-16 code unit located at the specified offset into the string.\n\n## Syntax\n\n```js\ncharAt(index)\n```\n\n### Parameters\n\n- `index`\n  - : An integer between `0` and `str.length - 1`. If the\n    `index` cannot be converted to the integer or no\n    `index` is provided, the default is `0`, so the first\n    character of `str` is returned.\n\n### Return value\n\nA string representing the character (exactly one UTF-16 code unit) at the specified\n`index`. If `index` is out of range,\n`charAt()` returns an empty string.\n\n## Description\n\nCharacters in a string are indexed from left to right. The index of the first character\nis `0`, and the index of the last character—in a string called\n`stringName` is `stringName.length - 1`. If\nthe `index` you supply is out of this range, JavaScript returns an\nempty string.\n\nIf no `index` is provided to `charAt()`, the default\nis `0`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/String/prototype/charCodeAt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.charCodeAt()\n\nThe **`charCodeAt()`** method returns\nan integer between `0` and `65535` representing the UTF-16 code\nunit at the given index.\n\nThe UTF-16 code unit matches the Unicode code point for code points which can be\nrepresented in a single UTF-16 code unit. If the Unicode code point cannot be\nrepresented in a single UTF-16 code unit (because its value is greater than\n`0xFFFF`) then the code unit returned will be _the first part of a\nsurrogate pair_ for the code point. If you want the entire code point value, use\n[`codePointAt()`](../../../globals/String/prototype/codePointAt.mdx).\n\n## Syntax\n\n```js\ncharCodeAt(index)\n```\n\n### Parameters\n\n- `index`\n  - : An integer greater than or equal to `0` and less than the\n    `length` of the string. If `index` is not a number,\n    it defaults to `0`.\n\n### Return value\n\nA number representing the UTF-16 code unit value of the character at the given\n`index`. If `index` is out of range,\n`charCodeAt()` returns `NaN`.\n\n## Description\n\nUnicode code points range from `0` to `1114111`\n(`0x10FFFF`). The first 128 Unicode code points are a direct match of the\nASCII character encoding. (For information on Unicode, see [UTF-16 characters, Unicode codepoints, and grapheme clusters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters).)\n\n> **Note:** `charCodeAt()` will always return a value that is\n> less than `65536`. This is because the higher code points are represented\n> by _a pair_ of (lower valued) \"surrogate\" pseudo-characters which are used to\n> comprise the real character.\n>\n> Because of this, in order to examine (or reproduce) the full character for individual\n> character values of `65536` or greater, for such characters, it is\n> necessary to retrieve not only `charCodeAt(i)`, but also\n> `charCodeAt(i+1)` (as if manipulating a string with two\n> letters), or to use `codePointAt(i)` instead. See examples 2 and\n> 3 (below).\n\n`charCodeAt()` returns `NaN` if the given\nindex is less than `0`, or if it is equal to or greater than the\n`length` of the string.\n\nBackward compatibility: In historic versions (like JavaScript 1.2) the\n`charCodeAt()` method returns a number indicating the ISO-Latin-1 codeset\nvalue of the character at the given index. The ISO-Latin-1 codeset ranges from\n`0` to `255`. The first `0` to `127` are a\ndirect match of the ASCII character set.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/String/prototype/codePointAt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.codePointAt()\n\nThe **`codePointAt()`** method returns a non-negative integer\nthat is the Unicode code point value at the given position.\nNote that this function does not give the nth code point in a string,\nbut the code point starting at the specified string index.\n\n## Syntax\n\n```js\ncodePointAt(pos)\n```\n\n### Parameters\n\n- `pos`\n  - : Position of an element in `str` to return the code point value\n    from.\n\n### Return value\n\nA decimal number representing the code point value of the character at the given `pos`.\n\n- If there is no element at `pos`, returns [`undefined`](../../../globals/undefined.mdx).\n- If the element at `pos` is a UTF-16 high surrogate, returns the code point of the surrogate _pair_.\n- If the element at `pos` is a UTF-16 low surrogate, returns _only_ the low surrogate code point.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/String/prototype/concat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.concat()\n\nThe **`concat()`** method concatenates\nthe string arguments to the calling string and returns a new string.\n\n## Syntax\n\n```js\nconcat(str1)\nconcat(str1, str2)\nconcat(str1, str2, /* …, */ strN)\n```\n\n### Parameters\n\n- `strN`\n  - : One or more strings to concatenate to `str`.\n\n### Return value\n\nA new string containing the combined text of the strings provided.\n\n## Description\n\nThe `concat()` function concatenates the string arguments to the calling\nstring and returns a new string. Changes to the original string or the returned string\ndon't affect the other.\n\nIf the arguments are not of the type string, they are converted to string values before\nconcatenating.\n\nThe `concat()` method is very similar to the [addition/string concatenation operators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Addition) (`+`, `+=`), except that `concat()` [coerces its arguments directly to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion), while addition coerces its operands to primitives first. For more information, see the reference page for the [`+` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Addition).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/String/prototype/endsWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.endsWith()\n\nThe **`endsWith()`** method determines whether a string ends with the characters of a specified string, returning `true` or `false` as appropriate.\n\n## Syntax\n\n```js\nendsWith(searchString)\nendsWith(searchString, endPosition)\n```\n\n### Parameters\n\n- `searchString`\n  - : The characters to be searched for at the end of `str`. Cannot be a regex.\n- `endPosition` _**optional**_\n  - : The end position at which `searchString` is expected to be found (the index of `searchString`'s last character plus 1). Defaults to `str.length`.\n\n### Return value\n\n**`true`** if the given characters are found at the end of the string; otherwise, **`false`**.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If `searchString` is a regex.\n\n## Description\n\nThis method lets you determine whether or not a string ends with another string. This method is case-sensitive.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/String/prototype/includes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.includes()\n\nThe **`includes()`** method performs a case-sensitive search to determine whether one string may be found within another string, returning `true` or `false` as appropriate.\n\n## Syntax\n\n```js\nincludes(searchString)\nincludes(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n  - : A string to be searched for within `str`. Cannot be a regex.\n- `position` _**optional**_\n  - : The position within the string at which to begin searching for `searchString`. (Defaults to `0`.)\n\n### Return value\n\n**`true`** if the search string is found anywhere within the given string; otherwise, **`false`** if not.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If `searchString` is a regex.\n\n## Description\n\nThis method lets you determine whether or not a string includes another string.\n\n### Case-sensitivity\n\nThe `includes()` method is case sensitive. For example, the following expression returns `false`:\n\n```js\n\"Blue Whale\".includes(\"blue\"); // returns false\n```\n\nYou can work around this constraint by transforming both the original string and the search string to all lowercase:\n\n```js\n\"Blue Whale\".toLowerCase().includes(\"blue\"); // returns true\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/String/prototype/indexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.indexOf()\n\nThe **`indexOf()`** method, given one argument: a substring to search for, searches the entire calling string, and returns the index of the first occurrence of the specified substring. Given a second argument: a number, the method returns the first occurrence of the specified substring at an index greater than or equal to the specified number.\n\n## Syntax\n\n```js\nindexOf(searchString)\nindexOf(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n\n  - : Substring to search for, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion).\n\n    If the method is called with no arguments, `searchString` is coerced to `\"undefined\"`. Therefore,`\"undefined\".indexOf()` returns `0` — because the substring `\"undefined\"` is found at position `0` in the string `\"undefined\"`. But `\"undefine\".indexOf()`, returns `-1` — because the substring `\"undefined\"` is not found in the string `\"undefine\"`.\n\n- `position` _**optional**_\n\n  - : The method returns the index of the first occurrence of the specified substring at a position greater than or equal to `position`, which defaults to `0`. If `position` is greater than the length of the calling string, the method doesn't search the calling string at all. If `position` is less than zero, the method behaves as it would if `position` were `0`.\n\n    - `'hello world hello'.indexOf('o', -5)` returns `4` — because it causes the method to behave as if the second argument were `0`, and the first occurrence of `o` at a position greater or equal to `0` is at position `4`.\n\n    - `'hello world hello'.indexOf('world', 12)` returns `-1` — because, while it's true the substring `world` occurs at index `6`, that position is not greater than or equal to `12`.\n\n    - `'hello world hello'.indexOf('o', 99)` returns `-1` — because `99` is greater than the length of `hello world hello`, which causes the method to not search the string at all.\n\n### Return value\n\nThe index of the first occurrence of `searchString` found, or `-1` if not found.\n\n#### Return value when using an empty search string\n\nSearching for an empty search string produces strange results. With no second argument, or with a second argument whose value is less than the calling string's length, the return value is the same as the value of the second argument:\n\n```js\n\"hello world\".indexOf(\"\"); // returns 0\n\"hello world\".indexOf(\"\", 0); // returns 0\n\"hello world\".indexOf(\"\", 3); // returns 3\n\"hello world\".indexOf(\"\", 8); // returns 8\n```\n\nHowever, with a second argument whose value is greater than or equal to the string's length, the return value is the string's length:\n\n```js\n\"hello world\".indexOf(\"\", 11); // returns 11\n\"hello world\".indexOf(\"\", 13); // returns 11\n\"hello world\".indexOf(\"\", 22); // returns 11\n```\n\nIn the former instance, the method behaves as if it found an empty string just after the position specified in the second argument. In the latter instance, the method behaves as if it found an empty string at the end of the calling string.\n\n## Description\n\nStrings are zero-indexed: The index of a string's first character is `0`, and the index of a string's last character is the length of the string minus 1.\n\n```js\n\"Blue Whale\".indexOf(\"Blue\"); // returns  0\n\"Blue Whale\".indexOf(\"Blute\"); // returns -1\n\"Blue Whale\".indexOf(\"Whale\", 0); // returns  5\n\"Blue Whale\".indexOf(\"Whale\", 5); // returns  5\n\"Blue Whale\".indexOf(\"Whale\", 7); // returns -1\n\"Blue Whale\".indexOf(\"\"); // returns  0\n\"Blue Whale\".indexOf(\"\", 9); // returns  9\n\"Blue Whale\".indexOf(\"\", 10); // returns 10\n\"Blue Whale\".indexOf(\"\", 11); // returns 10\n```\n\nThe `indexOf()` method is case sensitive. For example, the following\nexpression returns `-1`:\n\n```js\n\"Blue Whale\".indexOf(\"blue\"); // returns -1\n```\n\n### Checking occurrences\n\nWhen checking if a specific substring occurs within a string, the correct way to check is test whether the return value is `-1`:\n\n```js\n\"Blue Whale\".indexOf(\"Blue\") !== -1; // true; found 'Blue' in 'Blue Whale'\n\"Blue Whale\".indexOf(\"Bloe\") !== -1; // false; no 'Bloe' in 'Blue Whale'\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/String/prototype/lastIndexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.lastIndexOf()\n\nThe **`lastIndexOf()`** method, given one argument: a substring to search for, searches the entire calling string, and returns the index of the last occurrence of the specified substring. Given a second argument: a number, the method returns the last occurrence of the specified substring at an index less than or equal to the specified number.\n\n## Syntax\n\n```js\nlastIndexOf(searchString)\nlastIndexOf(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n\n  - : Substring to search for, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion).\n\n    If the method is called with no arguments, `searchString` is coerced to `\"undefined\"`. Therefore,`\"undefined\".lastIndexOf()` returns `0` — because the substring `\"undefined\"` is found at position `0` in the string `\"undefined\"`. But `\"undefine\".lastIndexOf()`, returns `-1` — because the substring `\"undefined\"` is not found in the string `\"undefine\"`.\n\n- `position` _**optional**_\n\n  - : The method returns the index of the last occurrence of the specified substring at a position less than or equal to `position`, which defaults to `+Infinity`. If `position` is greater than the length of the calling string, the method searches the entire string. If `position` is less than `0`, the behavior is the same as for `0` — that is, the method looks for the specified substring only at index `0`.\n\n    - `'hello world hello'.lastIndexOf('world', 4)` returns `-1` — because, while the substring `world` does occurs at index `6`, that position is not less than or equal to `4`.\n\n    - `'hello world hello'.lastIndexOf('hello', 99)` returns `12` — because the last occurrence of `hello` at a position less than or equal to `99` is at position `12`.\n\n    - `'hello world hello'.lastIndexOf('hello', 0)` and `'hello world hello'.lastIndexOf('hello', -5)` both return `0` — because both cause the method to only look for `hello` at index `0`.\n\n### Return value\n\nThe index of the last occurrence of `searchString` found, or `-1` if not found.\n\n## Description\n\nStrings are zero-indexed: The index of a string's first character is `0`, and the index of a string's last character is the length of the string minus 1.\n\n```js\n\"canal\".lastIndexOf(\"a\"); // returns 3\n\"canal\".lastIndexOf(\"a\", 2); // returns 1\n\"canal\".lastIndexOf(\"a\", 0); // returns -1\n\"canal\".lastIndexOf(\"x\"); // returns -1\n\"canal\".lastIndexOf(\"c\", -5); // returns 0\n\"canal\".lastIndexOf(\"c\", 0); // returns 0\n\"canal\".lastIndexOf(\"\"); // returns 5\n\"canal\".lastIndexOf(\"\", 2); // returns 2\n```\n\n### Case-sensitivity\n\nThe `lastIndexOf()` method is case sensitive. For example, the following\nexpression returns `-1`:\n\n```js\n\"Blue Whale, Killer Whale\".lastIndexOf(\"blue\"); // returns -1\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/String/prototype/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.length\n\nThe **`length`** data property of a string contains the length of the string in UTF-16 code units.\n\n## Value\n\nA non-negative integer.\n\n## Description\n\nThis property returns the number of code units in the string. JavaScript uses [UTF-16](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters) encoding, where each Unicode character may be encoded as one or two code units, so it's possible for the value returned by `length` to not match the actual number of Unicode characters in the string. For common scripts like Latin, Cyrillic, wellknown CJK characters, etc., this should not be an issue, but if you are working with certain scripts, such as emojis, [mathematical symbols](https://en.wikipedia.org/wiki/Mathematical_Alphanumeric_Symbols), or obscure Chinese characters, you may need to account for the difference between code units and characters.\n\nThe language specification requires strings to have a maximum length of 2<sup>53</sup> - 1 elements, which is the upper limit for [precise integers](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER). However, a string with this length needs 16384TiB of storage, which cannot fit in any reasonable device's memory, so implementations tend to lower the threshold, which allows the string's length to be conveniently stored in a 32-bit integer.\n\n- In V8 (used by Chrome and Node), the maximum length is 2<sup>29</sup> - 24 (\\~1GiB). On 32-bit systems, the maximum length is 2<sup>28</sup> - 16 (\\~512MiB).\n- In Firefox, the maximum length is 2<sup>30</sup> - 2 (\\~2GiB). Before Firefox 65, the maximum length was 2<sup>28</sup> - 1 (\\~512MiB).\n- In Safari, the maximum length is 2<sup>31</sup> - 1 (\\~4GiB).\n\nFor an empty string, `length` is 0.\n\nThe static property `String.length` is unrelated to the length of strings. It's the [arity](../../../globals/Function/prototype/length.mdx) of the `String` function (loosely, the number of formal parameters it has), which is 1.\n\nSince `length` counts code units instead of characters, if you want to get the number of characters, you can first split the string with its [iterator](../../../globals/String/prototype/@@iterator.mdx), which iterates by characters:\n\n```js\nfunction getCharacterLength(str) {\n  // The string iterator that is used here iterates over characters,\n  // not mere code units\n  return [...str].length;\n}\n\nconsole.log(getCharacterLength(\"A\\uD87E\\uDC04Z\")); // 3\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/String/prototype/localeCompare.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.localeCompare()\n\nThe **`localeCompare()`** method returns a number indicating whether a reference string comes before, or after, or is the same as the given string in sort order. In implementations with [`Intl.Collator` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator) support, this method simply calls `Intl.Collator`.\n\n## Syntax\n\n```js\nlocaleCompare(compareString)\nlocaleCompare(compareString, locales)\nlocaleCompare(compareString, locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` parameters customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.Collator` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator), these parameters correspond exactly to the [`Intl.Collator()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator) constructor's parameters. Implementations without `Intl.Collator` support are asked to ignore both parameters, making the comparison result returned entirely implementation-dependent — it's only required to be _consistent_.\n\n- `compareString`\n  - : The string against which the `referenceStr` is compared.\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator#locales) parameter of the `Intl.Collator()` constructor.\n\n    In implementations without `Intl.Collator` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator#options) parameter of the `Intl.Collator()` constructor.\n\n    In implementations without `Intl.Collator` support, this parameter is ignored.\n\nSee the [`Intl.Collator()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator) for details on the `locales` and `options` parameters and how to use them.\n\n### Return value\n\nA **negative** number if `referenceStr` occurs before `compareString`; **positive** if the `referenceStr` occurs after `compareString`; `0` if they are equivalent.\n\nIn implementations with `Intl.Collator`, this is equivalent to `new Intl.Collator(locales, options).compare(referenceStr, compareString)`.\n\n## Description\n\nReturns an integer indicating whether the `referenceStr` comes\nbefore, after or is equivalent to the `compareString`.\n\n- Negative when the `referenceStr` occurs before\n  `compareString`\n- Positive when the `referenceStr` occurs after\n  `compareString`\n- Returns `0` if they are equivalent\n\n> **Warning:** Do not rely on exact return values of `-1` or `1`!\n>\n> Negative and positive integer results vary between browsers (as well as between\n> browser versions) because the W3C specification only mandates negative and positive\n> values. Some browsers may return `-2` or `2`, or even some other\n> negative or positive value.\n\n## Performance\n\nWhen comparing large numbers of strings, such as in sorting large arrays, it is better to create an [`Intl.Collator`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator) object and use the function provided by its [`compare()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/compare) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/String/prototype/match.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.match()\n\nThe **`match()`** method retrieves the result of matching a string against a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions).\n\n## Syntax\n\n```js\nmatch(regexp)\n```\n\n### Parameters\n\n- `regexp`\n\n  - : A regular expression object, or any object that has a [`Symbol.match`](../../../globals/Symbol/match.mdx) method.\n\n    If `regexp` is not a `RegExp` object and does not have a `Symbol.match` method, it is implicitly converted to a `RegExp` by using `new RegExp(regexp)`.\n\n    If you don't give any parameter and use the `match()` method directly, you will get an `Array` with an empty string: `[\"\"]`, because this is equivalent to `match(/(?:)/)`.\n\n### Return value\n\nAn `Array` whose contents depend on the presence or absence of the global (`g`) flag, or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) if no matches are found.\n\n- If the `g` flag is used, all results matching the complete regular expression will be returned, but capturing groups are not included.\n- If the `g` flag is not used, only the first complete match and its related capturing groups are returned. In this case, `match()` will return the same result as `RegExp.prototype.exec()` (an array with some extra properties).\n\n## Description\n\nThe implementation of `String.prototype.match` itself is very simple — it simply calls the `Symbol.match` method of the argument with the string as the first parameter. The actual implementation comes from [`RegExp.prototype[@@match]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@match).\n\n- If you need to know if a string matches a regular expression `RegExp`, use `RegExp.prototype.test()`.\n- If you only want the first match found, you might want to use `RegExp.prototype.exec()` instead.\n- If you want to obtain capture groups and the global flag is set, you need to use `RegExp.prototype.exec()` or [`String.prototype.matchAll()`](../../../globals/String/prototype/matchAll.mdx) instead.\n\nFor more information about the semantics of `match()` when a regex is passed, see [`RegExp.prototype[@@match]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@match).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/String/prototype/matchAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.matchAll()\n\nThe **`matchAll()`** method returns an iterator of all results matching a string against a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions), including [capturing groups](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions/Groups_and_Backreferences).\n\n## Syntax\n\n```js\nmatchAll(regexp)\n```\n\n### Parameters\n\n- `regexp`\n\n  - : A regular expression object, or any object that has a [`Symbol.matchAll`](../../../globals/Symbol/matchAll.mdx) method.\n\n    If `regexp` is not a `RegExp` object and does not have a `Symbol.matchAll` method, it is implicitly converted to a `RegExp` by using `new RegExp(regexp, 'g')`.\n\n    If `regexp` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes), then it must have the global (`g`) flag set, or a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Return value\n\nAn [iterable iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators) (which is not restartable) of matches. Each match is an array with the same shape as the return value of `RegExp.prototype.exec()`.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown if the `regexp` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes) that does not have the global (`g`) flag set (its [`flags`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/flags) property does not contain `\"g\"`).\n\n## Description\n\nThe implementation of `String.prototype.matchAll` itself is very simple — it simply calls the `Symbol.matchAll` method of the argument with the string as the first parameter (apart from the extra input validation that the regex is global). The actual implementation comes from [`RegExp.prototype[@@matchAll]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@matchAll).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/String/prototype/padEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.padEnd()\n\nThe **`padEnd()`** method pads the current string with a given\nstring (repeated, if needed) so that the resulting string reaches a given length. The\npadding is applied from the end of the current string.\n\n## Syntax\n\n```js\npadEnd(targetLength)\npadEnd(targetLength, padString)\n```\n\n### Parameters\n\n- `targetLength`\n  - : The length of the resulting string once the current `str` has\n    been padded. If the value is lower than `str.length`, the\n    current string will be returned as-is.\n- `padString` _**optional**_\n  - : The string to pad the current `str` with. If\n    `padString` is too long to stay within\n    `targetLength`, it will be truncated: for left-to-right\n    languages the left-most part and for right-to-left languages the right-most will be\n    applied. The default value for this parameter is \" \"\n    (`U+0020`).\n\n### Return value\n\nA `String` of the specified `targetLength` with the\n`padString` applied at the end of the current\n`str`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/String/prototype/padStart.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.padStart()\n\nThe **`padStart()`** method pads the\ncurrent string with another string (multiple times, if needed) until the resulting\nstring reaches the given length. The padding is applied from the start of the\ncurrent string.\n\n## Syntax\n\n```js\npadStart(targetLength)\npadStart(targetLength, padString)\n```\n\n### Parameters\n\n- `targetLength`\n  - : The length of the resulting string once the current `str` has\n    been padded. If the value is less than `str.length`, then\n    `str` is returned as-is.\n- `padString` _**optional**_\n  - : The string to pad the current `str` with. If\n    `padString` is too long to stay within the\n    `targetLength`, it will be truncated from the end.\n    The default value is the unicode \"space\" character (U+0020).\n\n### Return value\n\nA `String` of the specified `targetLength` with\n`padString` applied from the start.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/String/prototype/repeat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.repeat()\n\nThe **`repeat()`** method constructs and returns a new string\nwhich contains the specified number of copies of the string on which it was called,\nconcatenated together.\n\n## Syntax\n\n```js\nrepeat(count)\n```\n\n### Parameters\n\n- `count`\n  - : An integer between `0` and\n    [`+Infinity`](../../../globals/Number/POSITIVE_INFINITY.mdx), indicating the\n    number of times to repeat the string.\n\n### Return value\n\nA new string containing the specified number of copies of the given string.\n\n### Exceptions\n\n- Throws a `RangeError` if repeat count is negative.\n- Throws a `RangeError` if repeat count is infinity or overflows maximum string size.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/String/prototype/replace.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.replace()\n\nThe **`replace()`** method returns a new string with one, some, or all matches of a `pattern` replaced by a `replacement`. The `pattern` can be a string or a `RegExp`, and the `replacement` can be a string or a function called for each match. If `pattern` is a string, only the first occurrence will be replaced. The original string is left unchanged.\n\n## Syntax\n\n```js\nreplace(pattern, replacement)\n```\n\n### Parameters\n\n- `pattern`\n  - : Can be a string or an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method — the typical example being a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp). Any value that doesn't have the `Symbol.replace` method will be coerced to a string.\n- `replacement`\n  - : Can be a string or a function.\n    - If it's a string, it will replace the substring matched by `pattern`. A number of special replacement patterns are supported; see the [Specifying a string as the replacement](#specifying-a-string-as-the-replacement) section below.\n    - If it's a function, it will be invoked for every match and its return value is used as the replacement text. The arguments supplied to this function are described in the [Specifying a function as the replacement](#specifying-a-function-as-the-replacement) section below.\n\n### Return value\n\nA new string, with one, some, or all matches of the pattern replaced by the specified replacement.\n\n## Description\n\nThis method does not mutate the string value it's called on. It returns a new string.\n\nA string pattern will only be replaced once. To perform a global search and replace, use a regular expression with the `g` flag, or use [`replaceAll()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/replaceAll) instead.\n\nIf `pattern` is an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method (including `RegExp` objects), that method is called with the target string and `replacement` as arguments. Its return value becomes the return value of `replace()`. In this case the behavior of `replace()` is entirely encoded by the `@@replace` method — for example, any mention of \"capturing groups\" in the description below is actually functionality provided by [`RegExp.prototype[@@replace]`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@replace).\n\nIf the `pattern` is an empty string, the replacement is prepended to the start of the string.\n\n```js\n\"xxx\".replace(\"\", \"_\"); // \"_xxx\"\n```\n\nA regexp with the `g` flag is the only case where `replace()` replaces more than once. For more information about how regex properties (especially the [sticky](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky) flag) interact with `replace()`, see [`RegExp.prototype[@@replace]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@replace).\n\n### Specifying a string as the replacement\n\nThe replacement string can include the following special replacement patterns:\n\n| Pattern   | Inserts                                                                                        |\n| --------- | ---------------------------------------------------------------------------------------------- |\n| `$$`      | Inserts a `\"$\"`.                                                                               |\n| `$&`      | Inserts the matched substring.                                                                 |\n| `` $` ``  | Inserts the portion of the string that precedes the matched substring.                         |\n| `$'`      | Inserts the portion of the string that follows the matched substring.                          |\n| `$n`      | Inserts the `n`th (`1`-indexed) capturing group where `n` is a positive integer less than 100. |\n| `$<Name>` | Inserts the named capturing group where `Name` is the group name.                              |\n\n`$n` and `$<Name>` are only available if the `pattern` argument is a `RegExp` object. If the `pattern` is a string, or if the corresponding capturing group isn't present in the regex, then the pattern will be replaced as a literal. If the group is present but isn't matched (because it's part of a disjunction), it will be replaced with an empty string.\n\n```js\n\"foo\".replace(/(f)/, \"$2\");\n// \"$2oo\"; the regex doesn't have the second group\n\n\"foo\".replace(\"f\", \"$1\");\n// \"$1oo\"; the pattern is a string, so it doesn't have any groups\n\n\"foo\".replace(/(f)|(g)/, \"$2\");\n// \"oo\"; the second group exists but isn't matched\n```\n\n### Specifying a function as the replacement\n\nYou can specify a function as the second parameter. In this case, the function will be invoked after the match has been performed. The function's result (return value) will be used as the replacement string.\n\n> **Note:** The above-mentioned special replacement patterns do _not_ apply for strings returned from the replacer function.\n\nThe function has the following signature:\n\n```js\nfunction replacer(match, p1, p2, /* …, */ pN, offset, string, groups) {\n  return replacement;\n}\n```\n\nThe arguments to the function are as follows:\n\n- `match`\n  - : The matched substring. (Corresponds to `$&` above.)\n- `p1, p2, …, pN`\n  - : The `n`th string found by a capture group (including named capturing groups), provided the first argument to `replace()` is a `RegExp` object. (Corresponds to `$1`, `$2`, etc. above.) For example, if the `pattern` is `/(\\a+)(\\b+)/`, then `p1` is the match for `\\a+`, and `p2` is the match for `\\b+`. If the group is part of a disjunction (e.g. `\"abc\".replace(/(a)|(b)/, replacer)`), the unmatched alternative will be `undefined`.\n- `offset`\n  - : The offset of the matched substring within the whole string being examined. For example, if the whole string was `'abcd'`, and the matched substring was `'bc'`, then this argument will be `1`.\n- `string`\n  - : The whole string being examined.\n- `groups`\n  - : An object whose keys are the used group names, and whose values are the matched portions (`undefined` if not matched). Only present if the `pattern` contains at least one named capturing group.\n\nThe exact number of arguments depends on whether the first argument is a `RegExp` object — and, if so, how many capture groups it has.\n\nThe following example will set `newString` to `'abc - 12345 - #$*%'`:\n\n```js\nfunction replacer(match, p1, p2, p3, offset, string) {\n  // p1 is non-digits, p2 digits, and p3 non-alphanumerics\n  return [p1, p2, p3].join(\" - \");\n}\nconst newString = \"abc12345#$*%\".replace(/([^\\d]*)(\\d*)([^\\w]*)/, replacer);\nconsole.log(newString); // abc - 12345 - #$*%\n```\n\nThe function will be invoked multiple times for each full match to be replaced if the regular expression in the first parameter is global.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/String/prototype/replaceAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.replaceAll()\n\nThe **`replaceAll()`** method returns a new string with all matches of a `pattern` replaced by a `replacement`. The `pattern` can be a string or a `RegExp`, and the `replacement` can be a string or a function to be called for each match. The original string is left unchanged.\n\n## Syntax\n\n```js\nreplaceAll(pattern, replacement)\n```\n\n### Parameters\n\n- `pattern`\n\n  - : Can be a string or an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method — the typical example being a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp). Any value that doesn't have the `Symbol.replace` method will be coerced to a string.\n\n    If `pattern` is a regex, then it must have the global (`g`) flag set, or a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n- `replacement`\n  - : Can be a string or a function. The replacement has the same semantics as that of [`String.prototype.replace()`](../../../globals/String/prototype/replace.mdx).\n\n### Return value\n\nA new string, with all matches of a pattern replaced by a replacement.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown if the `pattern` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes) that does not have the global (`g`) flag set (its [`flags`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/flags) property does not contain `\"g\"`).\n\n## Description\n\nThis method does not mutate the string value it's called on. It returns a new string.\n\nUnlike [`String.prototype.replace()`](../../../globals/String/prototype/replace.mdx), this method would replace all occurrences of a string, not just the first one. This is especially useful if the string is not statically known, as calling the [`RegExp()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/RegExp) constructor without escaping special characters may unintentionally change its semantics.\n\n```js\nfunction unsafeRedactName(text, name) {\n  return text.replace(new RegExp(name, \"g\"), \"[REDACTED]\");\n}\nfunction safeRedactName(text, name) {\n  return text.replaceAll(name, \"[REDACTED]\");\n}\n\nconst report =\n  \"A hacker called ha.*er used special characters in their name to breach the system.\";\n\nconsole.log(unsafeRedactName(report, \"ha.*er\")); // \"A [REDACTED]s in their name to breach the system.\"\nconsole.log(safeRedactName(report, \"ha.*er\")); // \"A hacker called [REDACTED] used special characters in their name to breach the system.\"\n```\n\nIf `pattern` is an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method (including `RegExp` objects), that method is called with the target string and `replacement` as arguments. Its return value becomes the return value of `replaceAll()`. In this case the behavior of `replaceAll()` is entirely encoded by the `Symbol.replace` method, and therefore will have the same result as `replace()` (apart from the extra input validation that the regex is global).\n\nIf the `pattern` is an empty string, the replacement will be inserted in between every UTF-16 code unit, similar to [`String.prototype.split()`](../../../globals/String/prototype/split.mdx) behavior.\n\n```js\n\"xxx\".replaceAll(\"\", \"_\"); // \"_x_x_x_\"\n```\n\nFor more information about how regex properties (especially the [sticky](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky) flag) interact with `replaceAll()`, see [`RegExp.prototype[@@replace]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@replace).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/String/prototype/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.search()\n\nThe **`search()`** method executes a search for a match between a regular expression and this `String` object.\n\n## Syntax\n\n```js\nsearch(regexp)\n```\n\n### Parameters\n\n- `regexp`\n\n  - : A regular expression object, or any object that has a [`Symbol.search`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/search) method.\n\n    If `regexp` is not a `RegExp` object and does not have a `Symbol.search` method, it is implicitly converted to a `RegExp` by using `new RegExp(regexp)`.\n\n### Return value\n\nThe index of the first match between the regular expression and the given string, or `-1` if no match was found.\n\n## Description\n\nThe implementation of `String.prototype.search()` itself is very simple — it simply calls the `Symbol.search` method of the argument with the string as the first parameter. The actual implementation comes from [`RegExp.prototype[@@search]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@search).\n\nThe `g` flag of `regexp` has no effect on the `search()` result, and the search always happens as if the regex's `lastIndex` is 0. For more information on the behavior of `search()`, see [`RegExp.prototype[@@search]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@search).\n\nWhen you want to know whether a pattern is found, and _also_ know its index within a string, use `search()`.\n\n- If you only want to know if it exists, use the `RegExp.prototype.test()` method, which returns a boolean.\n- If you need the content of the matched text, use `String.prototype.match()` or `RegExp.prototype.exec()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/String/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.slice()\n\nThe **`slice()`** method extracts a section of a string and\nreturns it as a new string, without modifying the original string.\n\n## Syntax\n\n```js\nslice(indexStart)\nslice(indexStart, indexEnd)\n```\n\n### Parameters\n\n- `indexStart`\n  - : The index of the first character to include in the returned substring.\n- `indexEnd` _**optional**_\n  - : The index of the first character to exclude from the returned substring.\n\n### Return value\n\nA new string containing the extracted section of the string.\n\n## Description\n\n`slice()` extracts the text from one string and returns a new string. Changes to the text in one string do not affect the other string.\n\n`slice()` extracts up to but not including `indexEnd`. For example, `str.slice(1, 4)` extracts the second character through the fourth character (characters indexed `1`, `2`, and `3`).\n\n- If `indexStart >= str.length`, an empty string is returned.\n- If `indexStart < 0`, the index is counted from the end of the string. More formally, in this case, the substring starts at `max(indexStart + str.length, 0)`.\n- If `indexStart` is omitted, undefined, or cannot be converted to a number (using [`Number()`](../../../globals/Number/Number.mdx)), it's treated as `0`.\n- If `indexEnd` is omitted, undefined, or cannot be converted to a number (using [`Number()`](../../../globals/Number/Number.mdx)), or if `indexEnd >= str.length`, `slice()` extracts to the end of the string.\n- If `indexEnd < 0`, the index is counted from the end of the string. More formally, in this case, the substring ends at `max(indexEnd + str.length, 0)`.\n- If `indexEnd <= indexStart` after normalizing negative values (i.e. `indexEnd` represents a character that's before `indexStart`), an empty string is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/String/prototype/split.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.split()\n\nThe **`split()`** method takes a pattern and divides a `String` into an ordered list of substrings by searching for the pattern, puts these substrings into an array, and returns the array.\n\n## Syntax\n\n```js\nsplit()\nsplit(separator)\nsplit(separator, limit)\n```\n\n### Parameters\n\n- `separator` _**optional**_\n  - : The pattern describing where each split should occur. Can be a string or an object with a [`Symbol.split`](../../../globals/Symbol/split.mdx) method — the typical example being a regular expression. If undefined, the original target string is returned wrapped in an array.\n- `limit` _**optional**_\n  - : A non-negative integer specifying a limit on the number of substrings to be included in the array. If provided, splits the string at each occurrence of the specified `separator`, but stops when `limit` entries have been placed in the array. Any leftover text is not included in the array at all.\n    - The array may contain fewer entries than `limit` if the end of the string is reached before the limit is reached.\n    - If `limit` is `0`, `[]` is returned.\n\n### Return value\n\nAn `Array` of strings, split at each point where the `separator` occurs in the given string.\n\n## Description\n\nIf `separator` is a non-empty string, the target string is split by all matches of the `separator` without including `separator` in the results. For example, a string containing tab separated values (TSV) could be parsed by passing a tab character as the separator, like `myString.split(\"\\t\")`. If `separator` contains multiple characters, that entire character sequence must be found in order to split. If `separator` appears at the beginning (or end) of the string, it still has the effect of splitting, resulting in an empty (i.e. zero length) string appearing at the first (or last) position of the returned array. If `separator` does not occur in `str`, the returned array contains one element consisting of the entire string.\n\nIf `separator` is an empty string (`\"\"`), `str` is converted to an array of each of its UTF-16 \"characters\", without empty strings on either ends of the resulting string.\n\n> **Note:** `\"\".split(\"\")` is therefore the only way to produce an empty array when a string is passed as `separator`.\n\n> **Warning:** When the empty string (`\"\"`) is used as a separator, the string is **not** split by _user-perceived characters_ ([grapheme clusters](https://unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries)) or unicode characters (codepoints), but by UTF-16 codeunits. This destroys [surrogate pairs](https://unicode.org/faq/utf_bom.html#utf16-2). See [\"How do you get a string to a character array in JavaScript?\" on StackOverflow](https://stackoverflow.com/questions/4547609/how-to-get-character-array-from-a-string/34717402#34717402).\n\nIf `separator` is a regexp that matches empty strings, whether the match is split by UTF-16 code units or Unicode codepoints depends on if the [`u`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/unicode) flag is set.\n\n```js\n\"😄😄\".split(/(?:)/); // [ \"\\ud83d\", \"\\ude04\", \"\\ud83d\", \"\\ude04\" ]\n\"😄😄\".split(/(?:)/u); // [ \"😄\", \"😄\" ]\n```\n\nIf `separator` is a regular expression with capturing groups, then each time `separator` matches, the captured groups (including any `undefined` results) are spliced into the output array. This behavior is specified by the regexp's [`Symbol.split`](../../../globals/Symbol/split.mdx) method.\n\nIf `separator` is an object with a [`Symbol.split`](../../../globals/Symbol/split.mdx) method, that method is called with the target string and `limit` as arguments, and `this` set to the object. Its return value becomes the return value of `split`.\n\nAny other value will be coerced to a string before being used as separator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/String/prototype/startsWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.startsWith()\n\nThe **`startsWith()`** method determines whether a string begins with the characters of a specified string, returning `true` or `false` as appropriate.\n\n## Syntax\n\n```js\nstartsWith(searchString)\nstartsWith(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n  - : The characters to be searched for at the start of this string. Cannot be a regex.\n- `position` _**optional**_\n  - : The start position at which `searchString` is expected to be found (the index of `searchString`'s first character). Defaults to `0`.\n\n### Return value\n\n**`true`** if the given characters are found at the beginning of the string; otherwise, **`false`**.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If `searchString` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes).\n\n## Description\n\nThis method lets you determine whether or not a string begins with another string. This method is case-sensitive.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/String/prototype/substr.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.substr()\n\nThe **`substr()`** method returns a portion of the string, starting at the specified index and extending for a given number of characters afterwards.\n\n> **Note:** `substr()` is not part of the main ECMAScript specification — it's defined in [Annex B: Additional ECMAScript Features for Web Browsers](https://tc39.es/ecma262/#sec-additional-ecmascript-features-for-web-browsers), which is normative optional for non-browser runtimes. Therefore, people are advised to use the standard [`String.prototype.substring()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/substring) and [`String.prototype.slice()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/slice) methods instead to make their code maximally cross-platform friendly. The [`String.prototype.substring()` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/substring#the_difference_between_substring_and_substr) has some comparisons between the three methods.\n\n\n\n## Syntax\n\n```js\nsubstr(start)\nsubstr(start, length)\n```\n\n### Parameters\n\n- `start`\n  - : The index of the first character to include in the returned substring.\n- `length` _**optional**_\n  - : The number of characters to extract.\n\n### Return value\n\nA new string containing the specified part of the given string.\n\n## Description\n\nA string's `substr()` method extracts `length` characters from the string, counting from the `start` index.\n\n- If `start >= str.length`, an empty string is returned.\n- If `start < 0`, the index starts counting from the end of the string. More formally, in this case the substring starts at `max(start + str.length, 0)`.\n- If `start` is omitted or [`undefined`](../../../globals/undefined.mdx), it's treated as `0`.\n- If `length` is omitted or [`undefined`](../../../globals/undefined.mdx), or if `start + length >= str.length`, `substr()` extracts characters to the end of the string.\n- If `length < 0`, an empty string is returned.\n- For both `start` and `length`, [`NaN`](../../../globals/NaN.mdx) is treated as `0`.\n\nAlthough you are encouraged to avoid using `substr()`, there is no trivial way to migrate `substr()` to either `slice()` or `substring()` in legacy code without essentially writing a polyfill for `substr()`. For example, `str.substr(a, l)`, `str.slice(a, a + l)`, and `str.substring(a, a + l)` all have different results when `str = \"01234\", a = 1, l = -2` — `substr()` returns an empty string, `slice()` returns `\"123\"`, while `substring()` returns `\"0\"`. The actual refactoring path depends on the knowledge of the range of `a` and `l`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/String/prototype/substring.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.substring()\n\nThe **`substring()`** method returns the part of the `string` from the start index up to and excluding the end index, or to the end of the string if no end index is supplied.\n\n## Syntax\n\n```js\nsubstring(indexStart)\nsubstring(indexStart, indexEnd)\n```\n\n### Parameters\n\n- `indexStart`\n  - : The index of the first character to include in the returned substring.\n- `indexEnd` _**optional**_\n  - : The index of the first character to exclude from the returned substring.\n\n### Return value\n\nA new string containing the specified part of the given string.\n\n## Description\n\n`substring()` extracts characters from `indexStart` up to _but not including_ `indexEnd`. In particular:\n\n- If `indexEnd` is omitted, `substring()` extracts characters to the end of the string.\n- If `indexStart` is equal to `indexEnd`, `substring()` returns an empty string.\n- If `indexStart` is greater than `indexEnd`, then the effect of `substring()` is as if the two arguments were swapped; see example below.\n\nAny argument value that is less than `0` or greater than `str.length` is treated as if it were `0` and `str.length`, respectively.\n\nAny argument value that is [`NaN`](../../../globals/NaN.mdx) is treated as if it were `0`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/String/prototype/toLocaleLowerCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toLocaleLowerCase()\n\nThe **`toLocaleLowerCase()`** method returns the calling string\nvalue converted to lower case, according to any locale-specific case mappings.\n\n## Syntax\n\n```js\ntoLocaleLowerCase()\ntoLocaleLowerCase(locales)\n```\n\n### Parameters\n\n- `locales` _**optional**_\n  - : A string with a BCP 47 language tag, or an array of such strings. Indicates the locale to be used to convert to lower case according to any locale-specific case mappings. For the general form and interpretation of the `locales` argument, see [Locale identification and negotiation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation).\n\n### Return value\n\nA new string representing the calling string converted to lower case, according to any\nlocale-specific case mappings.\n\n### Exceptions\n\n- A [`RangeError`](../../../globals/RangeError/RangeError.mdx) (\"invalid language tag: xx_yy\") is thrown if a\n  `locale` argument isn't a valid language tag.\n- A [`TypeError`](../../../globals/TypeError/TypeError.mdx) (\"invalid element in locales argument\") is thrown if an\n  array element isn't of type string.\n\n## Description\n\nThe `toLocaleLowerCase()` method returns the value of the string converted\nto lower case according to any locale-specific case mappings.\n`toLocaleLowerCase()` does not affect the value of the string itself. In most\ncases, this will produce the same result as [`String.prototype.toLowerCase()`](../../../globals/String/prototype/toLowerCase.mdx), but for some locales, such as Turkish, whose case mappings do not\nfollow the default case mappings in Unicode, there may be a different result.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/String/prototype/toLocaleUpperCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toLocaleUpperCase()\n\nThe **`toLocaleUpperCase()`** method returns the calling string\nvalue converted to upper case, according to any locale-specific case mappings.\n\n## Syntax\n\n```js\ntoLocaleUpperCase()\ntoLocaleUpperCase(locales)\n```\n\n### Parameters\n\n- `locales` _**optional**_\n  - : A string with a BCP 47 language tag, or an array of such strings. Indicates the locale to be used to convert to upper case according to any locale-specific case mappings. For the general form and interpretation of the `locales` argument, see [Locale identification and negotiation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation).\n\n### Return value\n\nA new string representing the calling string converted to upper case, according to any\nlocale-specific case mappings.\n\n### Exceptions\n\n- A [`RangeError`](../../../globals/RangeError/RangeError.mdx) (\"invalid language tag: xx_yy\") is thrown if a\n  `locale` argument isn't a valid language tag.\n- A [`TypeError`](../../../globals/TypeError/TypeError.mdx) (\"invalid element in locales argument\") is thrown if an\n  array element isn't of type string.\n\n## Description\n\nThe `toLocaleUpperCase()` method returns the value of the string converted\nto upper case according to any locale-specific case mappings.\n`toLocaleUpperCase()` does not affect the value of the string itself. In most\ncases, this will produce the same result as [`String.prototype.toUpperCase()`](../../../globals/String/prototype/toUpperCase.mdx), but for some locales, such as Turkish, whose case mappings do not\nfollow the default case mappings in Unicode, there may be a different result.\n\nAlso notice that conversion is not necessarily a 1:1 character mapping, as some\ncharacters might result in two (or even more) characters when transformed to upper-case.\nTherefore the length of the result string can differ from the input length. This also\nimplies that the conversion is not stable, so i.E. the following can return\n`false`:\n`x.toLocaleLowerCase() === x.toLocaleUpperCase().toLocaleLowerCase()`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/String/prototype/toLowerCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toLowerCase()\n\nThe **`toLowerCase()`** method returns the calling string value\nconverted to lower case.\n\n## Syntax\n\n```js\ntoLowerCase()\n```\n\n### Return value\n\nA new string representing the calling string converted to lower case.\n\n## Description\n\nThe `toLowerCase()` method returns the value of the string converted to\nlower case. `toLowerCase()` does not affect the value of the string\n`str` itself.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/String/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified string value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified string value.\n\n## Description\n\nThe `String` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For `String` values, the `toString` method returns the string itself (if it's a primitive) or the string that the `String` object wraps. It has the exact same implementation as [`String.prototype.valueOf()`](../../../globals/String/prototype/valueOf.mdx).\n\nThe `toString()` method requires its `this` value to be a `String` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to string values.\n\nBecause `String` doesn't have a [`[Symbol.toPrimitive]()`](../../../globals/Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `String` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, String _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — since they are already strings, no conversion is performed.\n\n```js\nString.prototype.toString = () => \"Overridden\";\nconsole.log(`${\"foo\"}`); // \"foo\"\nconsole.log(`${new String(\"foo\")}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/String/prototype/toUpperCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toUpperCase()\n\nThe **`toUpperCase()`** method returns the calling string value\nconverted to uppercase (the value will be converted to a string if it isn't one).\n\n## Syntax\n\n```js\ntoUpperCase()\n```\n\n### Return value\n\nA new string representing the calling string converted to upper case.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : When called on [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../../globals/undefined.mdx), for example,\n    `String.prototype.toUpperCase.call(undefined)`.\n\n## Description\n\nThe `toUpperCase()` method returns the value of the string converted to\nuppercase. This method does not affect the value of the string itself since JavaScript\nstrings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/String/prototype/trim.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.trim()\n\nThe **`trim()`** method removes whitespace from both ends of a string and returns a new string, without modifying the original string.\n\nTo return a new string with whitespace trimmed from just one end, use [`String.prototype.trimStart()`](../../../globals/String/prototype/trimStart.mdx) or [`String.prototype.trimEnd()`](../../../globals/String/prototype/trimEnd.mdx).\n\n## Syntax\n\n```js\ntrim()\n```\n\n### Return value\n\nA new string representing `str` stripped of whitespace from both its beginning and end. Whitespace is defined as [white space](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#white_space) characters plus [line terminators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#line_terminators).\n\nIf neither the beginning or end of `str` has any whitespace, a new string is still returned (essentially a copy of `str`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/String/prototype/trimEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.trimEnd()\n\nThe **`trimEnd()`** method removes whitespace from the end of a string and returns a new string, without modifying the original string. `trimRight()` is an alias of this method.\n\n## Syntax\n\n```js\ntrimEnd()\n\ntrimRight()\n```\n\n### Return value\n\nA new string representing `str` stripped of whitespace from its end (right side). Whitespace is defined as [white space](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#white_space) characters plus [line terminators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#line_terminators).\n\nIf the end of `str` has no whitespace, a new string is still returned (essentially a copy of `str`).\n\n### Aliasing\n\nAfter [`String.prototype.trim()`](../../../globals/String/prototype/trim.mdx) was standardized, engines also implemented the non-standard method `trimRight`. However, for consistency with [`String.prototype.pedEnd()`](../../../globals/String/prototype/trim.mdx), when the method got standardized, its name was chosen as `trimEnd`. For web compatibility reasons, `trimRight` remains as an alias to `trimEnd`, and they refer to the exact same function object. In some engines this means:\n\n```js\nString.prototype.trimRight.name === \"trimEnd\";\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/String/prototype/trimStart.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.trimStart()\n\nThe **`trimStart()`** method removes whitespace from the beginning of a string and returns a new string, without modifying the original string. `trimLeft()` is an alias of this method.\n\n## Syntax\n\n```js\ntrimStart()\n\ntrimLeft()\n```\n\n### Return value\n\nA new string representing `str` stripped of whitespace from its beginning (left side). Whitespace is defined as [white space](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#white_space) characters plus [line terminators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#line_terminators).\n\nIf the beginning of `str` has no whitespace, a new string is still returned (essentially a copy of `str`).\n\n### Aliasing\n\nAfter [`String.prototype.trim()`](../../../globals/String/prototype/trim.mdx) was standardized, engines also implemented the non-standard method `trimLeft`. However, for consistency with [`String.prototype.padEnd()`](../../../globals/String/prototype/padEnd.mdx), when the method got standardized, its name was chosen as `trimStart`. For web compatibility reasons, `trimLeft` remains as an alias to `trimStart`, and they refer to the exact same function object. In some engines this means:\n\n```js\nString.prototype.trimLeft.name === \"trimStart\";\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/String/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a\n`String` object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nA string representing the primitive value of a given `String` object.\n\n## Description\n\nThe `valueOf()` method of `String` returns the primitive value\nof a `String` object as a string data type. This value is equivalent to\n[`String.prototype.toString()`](../../../globals/String/prototype/toString.mdx).\n\nThis method is usually called internally by JavaScript and not explicitly in code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/String/raw.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.raw()\n\nThe static **`String.raw()`** method is a tag function of [template literals](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). This is similar to the `r` prefix in Python, or the `@` prefix in C# for string literals. It's used to get the raw string form of template literals — that is, substitutions (e.g. `${foo}`) are processed, but escape sequences (e.g. `\\n`) are not.\n\n## Syntax\n\n```js\nString.raw(strings, ...substitutions)\n\nString.raw`templateString`\n```\n\n### Parameters\n\n- `strings`\n  - : Well-formed template literal array object, like `{ raw: ['foo', 'bar', 'baz'] }`. Should be an object with a `raw` property whose value is an array-like object of strings.\n- `...substitutions`\n  - : Contains substitution values.\n- `templateString`\n  - : A [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals), optionally with substitutions (`${...}`).\n\n### Return value\n\nThe raw string form of a given template literal.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if the first argument doesn't have a `raw` property, or the `raw` property is `undefined` or `null`.\n\n## Description\n\nIn most cases, `String.raw()` is used with template literals. The first syntax mentioned above is only rarely used, because the JavaScript engine will call this with proper arguments for you, (just like with other [tag functions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals#tagged_templates)).\n\n`String.raw()` is the only built-in template literal tag. It has close semantics to an untagged literal since it concatenates all arguments and returns a string. You can even re-implement it with normal JavaScript code.\n\n> **Warning:** You should not use `String.raw` directly as an \"identity\" tag. See [Building an identity tag](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/raw#building_an_identity_tag) for how to implement this.\n\nIf `String.raw()` is called with an object whose `raw` property doesn't have a `length` property or a non-positive `length`, it returns an empty string `\"\"`. If `substitutions.length < strings.raw.length - 1` (i.e. there are not enough substitutions to fill the placeholders — which can't happen in a well-formed tagged template literal), the rest of the placeholders are filled with empty strings.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/SubtleCrypto/SubtleCrypto.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SubtleCrypto\n\nThe **`SubtleCrypto`** interface provides a number of low-level cryptographic functions. Access to the features of `SubtleCrypto` is obtained through the [`crypto.subtle`](../crypto/subtle.mdx) property.\n\n> **Warning:** This API provides a number of low-level cryptographic primitives. It's very easy to misuse them, and the pitfalls involved can be very subtle.\n>\n> Even assuming you use the basic cryptographic functions correctly, secure key management and overall security system design are extremely hard to get right, and are generally the domain of specialist security experts.\n>\n> Errors in security system design and implementation can make the security of the system completely ineffective.\n>\n> Please learn and experiment, but don't guarantee or imply the security of your work before an individual knowledgeable in this subject matter thoroughly reviews it. The [Crypto 101 Course](https://www.crypto101.io/) can be a great place to start learning about the design and implementation of secure systems.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/SubtleCrypto/prototype/digest.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# digest()\n\nThe **`digest()`** method of the [`SubtleCrypto`](../SubtleCrypto.mdx)\ninterface generates a digest of the given data. A digest is a short\nfixed-length value derived from some variable-length input. Cryptographic digests should\nexhibit collision-resistance, meaning that it's hard to come up with two different\ninputs that have the same digest value.\n\nIt takes as its arguments an identifier for the digest algorithm to use and the data to\ndigest. It returns a [`Promise`](../../Promise/Promise.mdx) which will be fulfilled with the digest.\n\n## Syntax\n\n```js\ndigest(algorithm, data)\n```\n\n### Parameters\n\n- `algorithm`\n  - : This may be a string or an object with a single property `name` that is a string. The string names the hash function to use. Supported values are:\n    - `\"MD5\"` (but don't use this in cryptographic applications)\n    - `\"SHA-1\"` (but don't use this in cryptographic applications)\n    - `\"SHA-256\"`\n    - `\"SHA-384\"`\n    - `\"SHA-512\"`.\n- `data`\n  - : An `ArrayBuffer`, a `TypedArray` or a `DataView` object containing the data to be digested.\n\n### Return value\n\nA [`Promise`](../../Promise/Promise.mdx) that fulfills with an `ArrayBuffer` containing the digest.\n\n## Supported algorithms\n\nDigest algorithms, also known as cryptographic hash functions,\ntransform an arbitrarily large block of data into a fixed-size output,\nusually much shorter than the input. They have a variety of applications in\ncryptography.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/SubtleCrypto/prototype/importKey.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# importKey()\n\nThe **`importKey()`** method of the [`SubtleCrypto`](../SubtleCrypto.mdx)\ninterface imports a key: that is, it takes as input a key in an external, portable\nformat and gives you a [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) object that you can use.\n\nThe function accepts several import formats: see [Supported formats](#supported-formats) for details.\n\n## Syntax\n\n```js\nimportKey(format, keyData, algorithm, extractable, keyUsages)\n```\n\n### Parameters\n\n- `format`\n  - : A string describing the data format of the key to import. It can be one of the following:\n    - `raw`: [Raw](#raw) format.\n    - `jwk`: [JSON Web Key](#json-web-key) format.\n- `keyData`\n  - : An `ArrayBuffer`, a TypedArray, a `DataView`, or a `JSONWebKey` object containing the key in\n    the given format.\n- `algorithm`\n  - : An object defining the type of key to import and providing extra algorithm-specific parameters.\n    - For RSASSA-PKCS1-v1_5:\n      Pass an [`RsaHashedImportParams`](../../RsaHashedImportParams/RsaHashedImportParams.mdx) object.\n    - For HMAC:\n      Pass an [`HmacImportParams`](../../HmacImportParams/HmacImportParams.mdx) object.\n    - For ECDSA:\n      Pass an [`EcKeyImportParams`](../../EcKeyImportParams/EcKeyImportParams.mdx) object.\n- `extractable`\n  - : A boolean value indicating whether it will be possible to export the key.\n- `keyUsages`\n  - : An `Array` indicating what can be done with the key. Possible array values are:\n    - `encrypt`: The key may be used to encrypt messages.\n    - `decrypt`: The key may be used to decrypt messages.\n    - `sign`: The key may be used to sign messages.\n    - `verify`: The key may be used to verify signatures.\n    - `deriveKey`: The key may be used in deriving a new key.\n    - `deriveBits`: The key may be used in deriving bits.\n    - `wrapKey`: The key may be used to wrap a key.\n    - `unwrapKey`: The key may be used to unwrap a key.\n\n### Return value\n\nA [`Promise`](../../Promise/Promise.mdx)\nthat fulfills with the imported key as a [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) object.\n\n### Exceptions\n\nThe promise is rejected when one of the following exceptions is encountered:\n\n- `SyntaxError`\n  - : Raised when `keyUsages` is empty but the unwrapped key is of\n    type `secret` or `private`.\n- `TypeError`\n  - : Raised when trying to use an invalid format or if the `keyData`\n    is not suited for that format.\n\n## Supported formats\n\nThis API currently supports one key import/export format: JSON Web Key.\n\n### Raw\n\nYou can use this format to import or export AES or HMAC secret keys, or Elliptic Curve\npublic keys.\n\nIn this format the key is supplied as an `ArrayBuffer` containing the raw bytes for the key.\n\n\n### JSON Web Key\n\nYou can use JSON Web Key format to import or export RSA or Elliptic Curve public or\nprivate keys, as well as AES and HMAC secret keys.\n\nJSON Web Key format is defined in [RFC 7517](https://datatracker.ietf.org/doc/html/rfc7517).\nIt describes a way to represent public, private, and secret keys as JSON objects.\n\nA JSON Web Key looks something like this (this is an EC private key):\n\n```json\n{\n  \"crv\": \"P-384\",\n  \"d\": \"wouCtU7Nw4E8_7n5C1-xBjB4xqSb_liZhYMsy8MGgxUny6Q8NCoH9xSiviwLFfK_\",\n  \"ext\": true,\n  \"key_ops\": [\"sign\"],\n  \"kty\": \"EC\",\n  \"x\": \"SzrRXmyI8VWFJg1dPUNbFcc9jZvjZEfH7ulKI1UkXAltd7RGWrcfFxqyGPcwu6AQ\",\n  \"y\": \"hHUag3OvDzEr0uUQND4PXHQTXP5IDGdYhJhL-WLKjnGjQAw0rNGy5V29-aV-yseW\"\n};\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/SubtleCrypto/prototype/sign.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# sign()\n\nThe **`sign()`** method of the [`SubtleCrypto`](../SubtleCrypto.mdx) interface generates a digital signature.\n\nIt takes as its arguments a key to sign with, some algorithm-specific\nparameters, and the data to sign. It returns a `Promise` which will be\nfulfilled with the signature.\n\nYou can use the corresponding [`verify()`](./verify.mdx) method to verify the signature.\n\n## Syntax\n\n```js\nsign(algorithm, key, data)\n```\n\n### Parameters\n\n- `algorithm`\n  - : A string or object that specifies the signature algorithm to use and its parameters:\n    - To use [RSASSA-PKCS1-v1_5](#rsassa-pkcs1-v1_5), pass the string `\"RSASSA-PKCS1-v1_5\"` or an object of the form `{ \"name\": \"RSASSA-PKCS1-v1_5\" }`.\n    - To use [HMAC](#hmac), pass the string `\"HMAC\"` or an object of the form `{ \"name\": \"HMAC\" }`.\n- `key`\n  - : A [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) object containing the key to be used for signing.\n    If `algorithm` identifies a public-key cryptosystem, this is the private key.\n- `data`\n  - : An `ArrayBuffer`, a TypedArray or a `DataView` object containing the data to be signed.\n\n### Return value\n\nA `Promise` that fulfills with an `ArrayBuffer` containing the signature.\n\n### Exceptions\n\nThe promise is rejected when the following exception is encountered:\n\n- `InvalidAccessError`\n  - : Raised when the signing key is not a key for the request signing algorithm or when\n    trying to use an algorithm that is either unknown or isn't suitable for signing.\n\n## Supported algorithms\n\n### RSASSA-PKCS1-v1_5\n\nThe RSASSA-PKCS1-v1_5 algorithm is specified in [RFC 3447](https://datatracker.ietf.org/doc/html/rfc3447).\n\n### HMAC\n\nThe HMAC algorithm calculates and verifies hash-based message authentication codes according to the\n[FIPS 198-1 standard](https://csrc.nist.gov/csrc/media/publications/fips/198/1/final/documents/fips-198-1_final.pdf).\n\nThe digest algorithm to use is specified in the\n[`HmacImportParams`](../../HmacImportParams/HmacImportParams.mdx) object\nthat you pass into [`SubtleCrypto.importKey()`](./importKey.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/SubtleCrypto/prototype/verify.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# verify()\n\nThe **`verify()`** method verifies a digital signature.\n\nIt takes as its arguments a key to verify the signature with, some algorithm-specific parameters, the signature, and the original signed data.\nIt returns a `Promise` which will be fulfilled with a boolean value indicating whether the signature is valid.\n\n## Syntax\n\n```js\nverify(algorithm, key, signature, data)\n```\n\n### Parameters\n\n- `algorithm`\n  - : A string or object defining the algorithm to use, and for some algorithm choices, some extra parameters.\n    The values given for the extra parameters must match those passed into the corresponding [`sign()`](./sign.mdx) call.\n    - To use RSASSA-PKCS1-v1_5, pass the string `\"RSASSA-PKCS1-v1_5\"` or an object of the form `{ \"name\": \"RSASSA-PKCS1-v1_5\" }`.\n    - To use HMAC, pass the string `\"HMAC\"` or an object of the form `{ \"name\": \"HMAC\" }`.\n- `key`\n  - : A [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) containing the key that will be used to verify the signature.\n    It is the secret key for a symmetric algorithm and the public key for a public-key system.\n- `signature`\n  - : A `ArrayBuffer` containing the signature to verify.\n- `data`\n  - : A `ArrayBuffer` containing the data whose signature is to be verified.\n\n### Return value\n\nA `Promise` that fulfills with a\nboolean value: `true` if the signature is valid, `false`\notherwise.\n\n### Exceptions\n\nThe promise is rejected when the following exception is encountered:\n\n- `InvalidAccessError`\n  - : Raised when the encryption key is not a key for the requested verifying algorithm or\n    when trying to use an algorithm that is either unknown or isn't suitable for a verify\n    operation.\n\n## Supported algorithms\n\nThe `verify()` method supports the same algorithms as the [`sign()`](./sign.mdx) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Symbol/Symbol.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol()\n\nThe `Symbol()` constructor returns a value of type **symbol**,\nbut is incomplete as a constructor because it does not support the syntax\n\"`new Symbol()`\" and it is not intended to be subclassed. It may be used as\nthe value of an\n[`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends)\nclause of a `class` definition but a\n[`super`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/super)\ncall to it will cause an exception.\n\n## Syntax\n\n```js\nSymbol()\nSymbol(description)\n```\n\n> **Note:** `Symbol()` can only be called without `new`. Attempting to construct it with `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `description` _**optional**_\n  - : A string. A description of the symbol which can be used for debugging but not to\n    access the symbol itself.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Symbol/asyncIterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.asyncIterator\n\nThe **`Symbol.asyncIterator`** well-known symbol specifies the default [async iterator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_async_iterator_and_async_iterable_protocols) for an object. If this property is set on an object, it is an async iterable and can be used in a [`for await...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for-await...of) loop.\n\n## Value\n\nThe well-known symbol `Symbol.asyncIterator`.\n\n## Description\n\nThe `Symbol.asyncIterator` symbol is a builtin symbol that is used to access an object's `Symbol.asyncIterator` method. In order for an object to be async iterable, it must have a `Symbol.asyncIterator` key.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Symbol/for.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.for()\n\nThe **`Symbol.for(key)`** method searches for existing symbols\nin a runtime-wide symbol registry with the given key and returns it if found. Otherwise\na new symbol gets created in the global symbol registry with this key.\n\n## Syntax\n\n```js\nSymbol.for(key)\n```\n\n### Parameters\n\n- `key`\n  - : String, required. The key for the symbol (and also used for the description of the\n    symbol).\n\n### Return value\n\nAn existing symbol with the given key if found; otherwise, a new symbol is created and\nreturned.\n\n## Description\n\nIn contrast to `Symbol()`, the `Symbol.for()` function creates a\nsymbol available in a [global symbol registry](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol#shared_symbols_in_the_global_symbol_registry) list. `Symbol.for()` does also\nnot necessarily create a new symbol on every call, but checks first if a symbol with the\ngiven `key` is already present in the registry. In that case, that symbol is\nreturned. If no symbol with the given key is found, `Symbol.for()` will\ncreate a new global symbol.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Symbol/hasInstance.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.hasInstance\n\nThe **`Symbol.hasInstance`** well-known symbol is used to determine if a constructor object recognizes an object as its instance. The `instanceof` operator's behavior can be customized by this symbol.\n\n## Value\n\nThe well-known symbol `Symbol.hasInstance`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Symbol/isConcatSpreadable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.isConcatSpreadable\n\nThe **`Symbol.isConcatSpreadable`** well-known symbol is used to configure if an object should be flattened to its array elements when using the [`Array.prototype.concat()`](../../globals/Array/prototype/concat.mdx) method.\n\n## Value\n\nThe well-known symbol `Symbol.isConcatSpreadable`.\n\n## Description\n\nThe `Symbol.isConcatSpreadable` symbol (`Symbol.isConcatSpreadable`) can be defined as an own or inherited property and its value is a boolean. It can control behavior for arrays and array-like objects:\n\n- For array objects, the default behavior is to spread (flatten) elements. `Symbol.isConcatSpreadable` can avoid flattening in these cases.\n- For array-like objects, the default behavior is no spreading or flattening. `Symbol.isConcatSpreadable` can force flattening in these cases.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Symbol/iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.iterator\n\nThe well-known **`Symbol.iterator`** symbol specifies the default iterator for an object. Used by [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of).\n\n## Value\n\nThe well-known symbol `Symbol.iterator`.\n\n## Description\n\nWhenever an object needs to be iterated (such as at the beginning of a `for...of` loop), its `Symbol.iterator` method is called with no arguments, and the returned **iterator** is used to obtain the values to be iterated.\n\nSome built-in types have a default iteration behavior, while other types (such as `Object`) do not. The built-in types with a `Symbol.iterator` method are:\n\n- [`Array.prototype[Symbol.iterator]()`](../../globals/Array/prototype/@@iterator.mdx)\n- [`String.prototype[Symbol.iterator]()`](../../globals/String/prototype/@@iterator.mdx)\n- [`Map.prototype[Symbol.iterator]()`](../../globals/Map/prototype/@@iterator.mdx)\n- [`Set.prototype[Symbol.iterator]()`](../../globals/Set/prototype/@@iterator.mdx)\n\nSee also [Iteration protocols](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) for more information.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Symbol/keyFor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.keyFor()\n\nThe **`Symbol.keyFor(sym)`** method retrieves a shared symbol\nkey from the global symbol registry for the given symbol.\n\n## Syntax\n\n```js\nSymbol.keyFor(sym)\n```\n\n### Parameters\n\n- `sym`\n  - : Symbol, required. The symbol to find a key for.\n\n### Return value\n\nA string representing the key for the given symbol if one is found on the [global registry](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol#shared_symbols_in_the_global_symbol_registry); otherwise, [`undefined`](../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Symbol/match.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.match\n\nThe **`Symbol.match`** well-known symbol specifies the matching of a regular expression against a string. This function is called by the [`String.prototype.match()`](../../globals/String/prototype/match.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.match]()` and [`String.prototype.match()`](../../globals/String/prototype/match.mdx).\n\n## Value\n\nThe well-known symbol `Symbolmatch`.\n\n## Description\n\nThis function is also used to identify [if objects have the behavior of regular expressions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes). For example, the methods [`String.prototype.startsWith()`](../../globals/String/prototype/startsWith.mdx), [`String.prototype.endsWith()`](../../globals/String/prototype/endsWith.mdx) and [`String.prototype.includes()`](../../globals/String/prototype/includes.mdx), check if their first argument is a regular expression and will throw a [`TypeError`](../../globals/TypeError/TypeError.mdx) if they are. Now, if the `match` symbol is set to `false` (or a [Falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value except `undefined`), it indicates that the object is not intended to be used as a regular expression object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Symbol/matchAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.matchAll\n\nThe **`Symbol.matchAll`** well-known symbol specifies the method that returns an iterator, that yields matches of the regular expression against a string. This function is called by the [`String.prototype.matchAll()`](../../globals/String/prototype/matchAll.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.matchAll]()` and [`String.prototype.matchAll()`](../../globals/String/prototype/matchAll.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.matchAll`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Symbol/prototype/@@toPrimitive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype[Symbol.toPrimitive]\n\nThe **`[Symbol.toPrimitive]()`** method converts a Symbol object to\na primitive value.\n\n## Syntax\n\n```js\nSymbol()[Symbol.toPrimitive](hint)\n```\n\n### Return value\n\nThe primitive value of the specified `Symbol` object.\n\n## Description\n\nThe `[Symbol.toPrimitive]()` method of `Symbol` returns the primitive\nvalue of a Symbol object as a Symbol data type. The `hint`\nargument is not used.\n\nJavaScript calls the `[Symbol.toPrimitive]()` method to convert an object to a\nprimitive value. You rarely need to invoke the `[Symbol.toPrimitive]()` method\nyourself; JavaScript automatically invokes it when encountering an object where a\nprimitive value is expected.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Symbol/prototype/description.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype.description\n\nThe read-only **`description`** property is a string returning the optional description of `Symbol` objects.\n\n## Description\n\n`Symbol` objects can be created with an optional description which can be used for debugging but not to access the symbol itself. The `Symbol.prototype.description` property can be used to read that description. It is different to `Symbol.prototype.toString()` as it does not contain the enclosing `\"Symbol()\"` string. See the examples.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Symbol/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified symbol value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified symbol value.\n\n## Description\n\nThe `Symbol` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For `Symbol` values, the `toString` method returns a descriptive string in the form `\"Symbol(description)\"`, where `description` is the symbol's [`Symbol.prototype.description`](../../../globals/Symbol/prototype/description.mdx).\n\nThe `toString()` method requires its `this` value to be a `Symbol` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to symbol values.\n\nBecause `Symbol` has a [`[Symbol.toPrimitive]()`](../../../globals/Symbol/toPrimitive.mdx) method, that method always takes priority over `toString()` when a `Symbol` object is [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). However, because `Symbol.prototype[Symbol.toPrimitive]()` returns a symbol primitive, and symbol primitives throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when implicitly converted to a string, the `toString()` method is never implicitly called by the language. To stringify a symbol, you must explicitly call its `toString()` method or use the [`String()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/String#using_string_to_stringify_a_symbol) function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Symbol/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a Symbol object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nThe primitive value of the specified `Symbol` object.\n\n## Description\n\nThe `valueOf()` method of `Symbol` returns the primitive value of a Symbol object as a Symbol data type.\n\nJavaScript calls the `valueOf()` method to convert an object to a primitive value. You rarely need to invoke the `valueOf()` method yourself; JavaScript automatically invokes it when encountering an object where a primitive value is expected.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Symbol/replace.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.replace\n\nThe **`Symbol.replace`** well-known symbol specifies the method that replaces matched substrings of a string. This function is called by the [`String.prototype.replace()`](../../globals/String/prototype/replace.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.replace]()` and [`String.prototype.replace()`](../../globals/String/prototype/replace.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.replace`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Symbol/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.search\n\nThe **`Symbol.search`** well-known symbol specifies the method that returns the index within a string that matches the regular expression. This function is called by the [`String.prototype.search()`](../../globals/String/prototype/search.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.search]()` and [`String.prototype.search()`](../../globals/String/prototype/search.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.search`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Symbol/species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.species\n\nThe well-known symbol **`Symbol.species`** specifies a function-valued property that the constructor function uses to create derived objects.\n\n> **Warning:** The existence of `Symbol.species` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Value\n\nThe well-known symbol `Symbol.species`.\n\n## Description\n\nThe `Symbol.species` accessor property allows subclasses to override the default constructor for objects. This specifies a protocol about how instances should be copied. For example, when you use copying methods of arrays, such as [`Array.prototype.map()`](../../globals/Array/prototype/map.mdx). the `map()` method uses `instance.constructor[Symbol.species]` to get the constructor for constructing the new array.\n\nAll built-in implementations of `Symbol.species` return the `this` value, which is the current instance's constructor. This allows copying methods to create instances of derived classes rather than the base class — for example, `map()` will return an array of the same type as the original array.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Symbol/split.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.split\n\nThe **`Symbol.split`** well-known symbol specifies the method that splits a string at the indices that match a regular expression. This function is called by the [`String.prototype.split()`](../../globals/String/prototype/split.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.split]()` and [`String.prototype.split()`](../../globals/String/prototype/split.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.split`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Symbol/toPrimitive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.toPrimitive\n\nThe **`Symbol.toPrimitive`** well-known symbol specifies a method that accepts a preferred type and returns a primitive representation of an object. It is called in priority by all [type coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) algorithms.\n\n## Value\n\nThe well-known symbol `Symbol.toPrimitive`.\n\n## Description\n\nWith the help of the `Symbol.toPrimitive` property (used as a function value), an object can be converted to a primitive value. The function is called with a string argument `hint`, which specifies the preferred type of the result primitive value. The `hint` argument can be one of `\"number\"`, `\"string\"`, and `\"default\"`.\n\nThe `\"number\"` hint is used by [numeric coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#numeric_coercion) algorithms. The `\"string\"` hint is used by the [string coercion](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) algorithm. The `\"default\"` hint is used by the [primitive coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion) algorithm. The `hint` only acts as a weak signal of preference, and the implementation is free to ignore it (as [`Symbol.prototype[Symbol.toPrimitive]()`](../../globals/Symbol/prototype/@@toPrimitive.mdx) does). The language does not enforce alignment between the `hint` and the result type, although `[Symbol.toPrimitive]()` must return a primitive, or a [`TypeError`](../../globals/TypeError/TypeError.mdx) is thrown.\n\nObjects without the `Symbol.toPrimitive` property are converted to primitives by calling the `valueOf()` and `toString()` methods in different orders, which is explained in more detail in the [type coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) section. `Symbol.toPrimitive` allows full control over the primitive conversion process. For example, `Symbol.prototype.toString()` won't be called, and `Symbol` objects must always be explicitly converted to strings through [`String()`](../../globals/String/String.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Symbol/toStringTag.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.toStringTag\n\nThe **`Symbol.toStringTag`** well-known symbol is a string valued property that is used in the creation of the default string description of an object. It is accessed internally by the [`Object.prototype.toString()`](../../globals/Object/prototype/toString.mdx) method.\n\n## Value\n\nThe well-known symbol `Symbol.toStringTag`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Symbol/unscopables.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.unscopables\n\nThe **`Symbol.unscopables`** well-known symbol is used to specify an object value of whose own and inherited property names are excluded from the [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) environment bindings of the associated object.\n\n## Value\n\nThe well-known symbol `@@unscopables`.\n\n## Description\n\nThe `@@unscopables` symbol (accessed via `Symbol.unscopables`) can be defined on any object to exclude property names from being exposed as lexical variables in [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) environment bindings. Note that when using [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), `with` statements are not available, and this symbol is likely not needed.\n\nSetting a property of the `@@unscopables` object to `true` (or any [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value) will make the corresponding property of the `with` scope object _unscopable_ and therefore won't be introduced to the `with` body scope. Setting a property to `false` (or any [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value) will make it _scopable_ and thus appear as lexical scope variables.\n\nWhen deciding whether `x` is unscopable, the entire prototype chain of the `@@unscopables` property is looked up for a property called `x`. This means if you declared `@@unscopables` as a plain object, `Object.prototype` properties like [`toString`](../../globals/Object/prototype/toString.mdx) would become unscopable as well, which may cause backward incompatibility for legacy code assuming those properties are normally scoped (see [an example here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/unscopables#avoid_using_a_non-null-prototype_object_as_symbol.unscopables)). You are advised to make your custom `@@unscopables` property have `null` as its prototype, like [`Array.prototype[Symbol.unscopables]`](../../globals/Array/prototype/@@unscopables.mdx) does.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/SyntaxError/SyntaxError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SyntaxError\n\nThe **`SyntaxError`** constructor creates a new error object\nthat represents an error when trying to interpret syntactically invalid code.\n\n## Syntax\n\n```js\nnew SyntaxError()\nnew SyntaxError(message)\nnew SyntaxError(message, options)\nnew SyntaxError(message, fileName)\nnew SyntaxError(message, fileName, lineNumber)\n\nSyntaxError()\nSyntaxError(message)\nSyntaxError(message, options)\nSyntaxError(message, fileName)\nSyntaxError(message, fileName, lineNumber)\n```\n\n> **Note:** `SyntaxError()` can be called with or without `new`. Both create a new `SyntaxError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/TextDecoder/TextDecoder.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder()\n\nThe **`TextDecoder()`** constructor returns a newly created `TextDecoder` object for the encoding specified in parameter.\n\n## Syntax\n\n```js\nnew TextDecoder()\nnew TextDecoder(label)\nnew TextDecoder(label, options)\n```\n\n### Parameters\n\n- `label` _**optional**_\n  - : A string, defaulting to `\"utf-8\"`.\n- `options` _**optional**_\n\n  - : An object with the property:\n\n    - `fatal`\n      - : A boolean value indicating if the `TextDecoder.decode()` method must throw a `TypeError` when decoding invalid data.\n        It defaults to `false`, which means that the decoder will substitute malformed data with a replacement character.\n\n    - `ignoreBOM`\n      - : A boolean value indicating whether the [byte order mark](https://www.w3.org/International/questions/qa-byte-order-mark) is ignored.\n        It defaults to `false`.\n\n### Exceptions\n\n- `RangeError`\n  - : Thrown if the value of `label` is unknown, or is one of the values leading to a `'replacement'` decoding algorithm (`\"iso-2022-cn\"` or `\"iso-2022-cn-ext\"`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/TextDecoder/prototype/decode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.decode()\n\nThe **`TextDecoder.decode()`** method returns a string containing text decoded from the buffer passed as a parameter.\n\nThe decoding method is defined in the current `TextDecoder` object.\nThis includes the expected encoding of the data, and how decoding errors are handled.\n\n## Syntax\n\n```js\ndecode()\ndecode(buffer)\ndecode(buffer, options)\n```\n\n### Parameters\n\n- `buffer` _**optional**_\n  - : Is an `ArrayBuffer`, a `TypedArray` or a `DataView` object containing the encoded text to decode.\n- `options` _**optional**_\n\n  - : An object with the property:\n\n    - `stream`\n      - : A boolean flag indicating that additional data will follow in subsequent calls to `decode()`.\n        Set to `true` if processing the data in chunks, and `false` for the final chunk or if the data is not chunked.\n        It defaults to `false`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if there is a decoding error when the property `TextDecoder.fatal` is `true`.\n\n### Return value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/TextDecoder/prototype/encoding.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.encoding\n\nThe **`TextDecoder.encoding`** read-only property returns a string containing the name of the decoding algorithm used by the specific decoder object.\n\nThe encoding is set by the constructor `label` parameter, and defaults to `utf-8`.\n\n## Value\n\nA lower-cased ASCII string, which can be one of the following values:\n\n- The recommended encoding for the Web: `'utf-8'`.\n- The legacy single-byte encodings:\n  ['ibm866'](https://en.wikipedia.org/wiki/Code_page_866),\n  ['iso-8859-2'](https://en.wikipedia.org/wiki/ISO/IEC_8859-2),\n  ['iso-8859-3'](https://en.wikipedia.org/wiki/ISO/IEC_8859-3),\n  ['iso-8859-4'](https://en.wikipedia.org/wiki/ISO/IEC_8859-4),\n  ['iso-8859-5'](https://en.wikipedia.org/wiki/ISO/IEC_8859-5),\n  ['iso-8859-6'](https://en.wikipedia.org/wiki/ISO/IEC_8859-6),\n  ['iso-8859-7'](https://en.wikipedia.org/wiki/ISO/IEC_8859-7),\n  ['iso-8859-8'](https://en.wikipedia.org/wiki/ISO/IEC_8859-8)'`,\n  ['iso-8859-8i'](https://en.wikipedia.org/wiki/ISO-8859-8-I),\n  ['iso-8859-10'](https://en.wikipedia.org/wiki/ISO/IEC_8859-10),\n  ['iso-8859-13'](https://en.wikipedia.org/wiki/ISO/IEC_8859-13),\n  ['iso-8859-14'](https://en.wikipedia.org/wiki/ISO/IEC_8859-14),\n  ['iso-8859-15'](https://en.wikipedia.org/wiki/ISO/IEC_8859-15),\n  ['iso-8859-16'](https://en.wikipedia.org/wiki/ISO/IEC_8859-16),\n  ['koi8-r'](https://en.wikipedia.org/wiki/KOI8-R),\n  ['koi8-u'](https://en.wikipedia.org/wiki/KOI8-U),\n  ['macintosh'](https://en.wikipedia.org/wiki/Mac_OS_Roman),\n  ['windows-874'](https://en.wikipedia.org/wiki/Windows-874),\n  ['windows-1250'](https://en.wikipedia.org/wiki/Windows-1250),\n  ['windows-1251'](https://en.wikipedia.org/wiki/Windows-1251),\n  ['windows-1252'](https://en.wikipedia.org/wiki/Windows-1252),\n  ['windows-1253'](https://en.wikipedia.org/wiki/Windows-1253),\n  ['windows-1254'](https://en.wikipedia.org/wiki/Windows-1254),\n  ['windows-1255'](https://en.wikipedia.org/wiki/Windows-1255),\n  ['windows-1256'](https://en.wikipedia.org/wiki/Windows-1256),\n  ['windows-1257'](https://en.wikipedia.org/wiki/Windows-1257),\n  ['windows-1258'](https://en.wikipedia.org/wiki/Windows-1258), or\n  ['x-mac-cyrillic'](https://en.wikipedia.org/wiki/Macintosh_Cyrillic_encoding).\n- The legacy multi-byte Chinese (simplified) encodings:\n  ['gbk'](https://en.wikipedia.org/wiki/GBK),\n  ['gb18030'](https://en.wikipedia.org/wiki/GB_18030)\n- The legacy multi-byte Chinese (traditional) encoding:\n  ['big5'](https://en.wikipedia.org/wiki/Big5).\n- The legacy multi-byte Japanese encodings:\n  ['euc-jp'](https://en.wikipedia.org/wiki/Extended_Unix_Code#EUC-JP),\n  ['iso-2022-jp'](https://en.wikipedia.org/wiki/ISO/IEC_2022#ISO-2022-JP),\n  ['shift-jis'](https://en.wikipedia.org/wiki/Shift_JIS).\n- The legacy multi-byte Korean encodings:\n  ['euc-kr'](https://en.wikipedia.org/wiki/Extended_Unix_Code#EUC-KR)\n- The legacy miscellaneous encodings:\n  ['utf-16be'](https://en.wikipedia.org/wiki/UTF-16#Byte_order_encoding_schemes),\n  ['utf-16le'](https://en.wikipedia.org/wiki/UTF-16#Byte_order_encoding_schemes),\n  `'x-user-defined'`.\n- A special encoding, `'replacement'`.\n  This decodes empty input into empty output and any other arbitrary-length input into a single replacement character.\n  It is used to prevent attacks that mismatch encodings between the client and server.\n  The following encodings also map to the replacement encoding: `ISO-2022-CN`, `ISO-2022-CN-ext`, ['iso-2022-kr'](https://en.wikipedia.org/wiki/ISO/IEC_2022#ISO-2022-KR) and ['hz-gb-2312'](https://en.wikipedia.org/wiki/HZ_(character_encoding)).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/TextDecoder/prototype/fatal.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.fatal\n\nThe **`fatal`** read-only property of the `TextDecoder` interface is a `Boolean` indicating whether the error mode is fatal.\n\nIf the property is `true` then a decoder will throw a `TypeError` if it encounters malformed data while decoding.\nIf `false` the decoder will substitute the invalid data with the replacement character `U+FFFD` (�).\nThe value of the property is set in the `TextDecoder()` constructor.\n\n## Value\n\nA `boolean` which will return `true` if the error mode is set to `fatal`.\nOtherwise it returns `false`, indicating that the error mode is \"replacement\".\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/TextDecoder/prototype/ignoreBOM.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.ignoreBOM\n\nThe **`ignoreBOM`** read-only property of the `TextDecoder` interface is a `Boolean` indicating whether the [byte order mark](https://www.w3.org/International/questions/qa-byte-order-mark) is ignored.\n\n## Value\n\n`true` if the byte order mark is ignored; `false` otherwise.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/TextEncoder/TextEncoder.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextEncoder()\n\nThe **`TextEncoder()`** constructor returns a newly created `TextEncoder` object that will generate a byte stream with UTF-8 encoding.\n\n## Syntax\n\n```js\nnew TextEncoder()\n```\n\n### Parameters\n\nNone.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/TextEncoder/prototype/encode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextEncoder.encode()\n\nThe **`TextEncoder.encode()`** method takes a string as input, and returns a `Uint8Array` containing the text given in parameters encoded with the specific method for that `TextEncoder` object.\n\n## Syntax\n\n```js\nencode(string)\n```\n\n### Parameters\n\n- `string`\n  - : A string containing the text to encode.\n\n### Return value\n\nA `Uint8Array` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/TextEncoder/prototype/encoding.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextEncoder.encoding\n\nThe **`TextEncoder.encoding`** read-only property returns a string containing the name of the encoding algorithm used by the specific encoder.\n\nIt can only have the following value `utf-8`.\n\n## Value\n\nA string with the value `utf-8`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/TransformStream/TransformStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStream()\n\nThe **`TransformStream()`** constructor creates a new `TransformStream` object which represents a pair of streams: a `WritableStream` representing the writable side, and a `ReadableStream` representing the readable side.\n\n## Syntax\n\n```js\nnew TransformStream()\nnew TransformStream(transformer)\nnew TransformStream(transformer, writableStrategy)\nnew TransformStream(transformer, writableStrategy, readableStrategy)\n```\n\n### Parameters\n\n- `transformer` _**optional**_\n\n  - : An object representing the `transformer`. If not supplied the resulting stream will be an **identity transform stream** which forwards all chunks written to its writable side to its readable side, without any changes.\n\n    The transformer object can contain any of the following methods. In each method `controller` is an instance of `TransformStreamDefaultController`.\n\n    - `start(controller)`\n      - : Called when the `TransformStream` is constructed. It is typically used to enqueue chunks using `TransformStreamDefaultController.enqueue()`.\n    - `transform(chunk, controller)`\n      - : Called when a chunk written to the writable side is ready to be transformed, and performs the work of the transformation stream. If no `transform()` method is supplied, the identity transform is used, and the chunk will be enqueued with no changes.\n    - `flush(controller)`\n      - : Called after all chunks written to the writable side have been successfully transformed, and the writable side is about to be closed.\n\n- `writableStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer. This defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk`. This indicates the size to\n        use for each chunk, in bytes.\n\n- `readableStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer. This defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk`. This indicates the size to\n        use for each chunk, in bytes.\n\n> **Note:** You could define your own custom\n> `readableStrategy` or `writableStrategy`, or use an instance of\n> `ByteLengthQueuingStrategy` or `CountQueuingStrategy`\n> for the object values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/TransformStream/prototype/readable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStream.readable\n\nThe **`readable`** read-only property of the `TransformStream` interface returns the `ReadableStream` instance controlled by this `TransformStream`.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/TransformStream/prototype/writable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStream.writable\n\nThe **`writable`** read-only property of the `TransformStream` interface returns the `WritableStream` instance controlled by this `TransformStream`.\n\n## Value\n\nA `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/TransformStreamDefaultController/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.desiredSize\n\nThe **`desiredSize`** read-only property of the `TransformStreamDefaultController` interface returns the desired size to fill the queue of the associated [`ReadableStream`](../../../globals/ReadableStream/ReadableStream.mdx).\n\nThe internal queue of a `ReadableStream` contains chunks that have been enqueued, but not yet read.\n\nIf the `desiredSize` is `0` then the queue is full. Therefore you can use this information to manually apply backpressure to manage the queue.\n\n## Value\n\nThe desired size.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/TransformStreamDefaultController/prototype/enqueue.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.enqueue()\n\nThe **`enqueue()`** method of the `TransformStreamDefaultController` interface enqueues the given chunk in the readable side of the stream.\n\n## Syntax\n\n```js\nenqueue(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : The chunk being queued. A chunk is a single piece of data. It can be any type of data, and a stream can contain chunks of different types.\n\n### Return value\n\nNone `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream is not readable.\n    This might occur if the stream is errored via `controller.error()`, or when it is closed without its controller's `controller.close()` method ever being called.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/TransformStreamDefaultController/prototype/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.error()\n\nThe **`error()`** method of the `TransformStreamDefaultController` interface errors both sides of the stream. Any further interactions with it will fail with the given error message, and any chunks in the queue will be discarded.\n\n## Syntax\n\n```js\nerror(reason)\n```\n\n### Parameters\n\n- `reason`\n  - : A string containing the error message to be returned on any further interaction with the stream.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/TransformStreamDefaultController/prototype/terminate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.terminate()\n\nThe **`terminate()`** method of the `TransformStreamDefaultController` interface closes the readable side and errors the writable side of the stream.\n\n## Syntax\n\n```js\nterminate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone (`undefined`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/TypeError/TypeError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TypeError\n\nThe **`TypeError()`** constructor creates a new error when an\noperation could not be performed, typically (but not exclusively) when a value is not of\nthe expected type.\n\n## Syntax\n\n```js\nnew TypeError()\nnew TypeError(message)\nnew TypeError(message, options)\nnew TypeError(message, fileName)\nnew TypeError(message, fileName, lineNumber)\n\nTypeError()\nTypeError(message)\nTypeError(message, options)\nTypeError(message, fileName)\nTypeError(message, fileName, lineNumber)\n```\n\n> **Note:** `TypeError()` can be called with or without `new`. Both create a new `TypeError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/URIError/URIError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URIError\n\nThe **`URIError()`** constructor creates an error when a global\nURI handling function was used in a wrong way.\n\n## Syntax\n\n```js\nnew URIError()\nnew URIError(message)\nnew URIError(message, options)\nnew URIError(message, fileName)\nnew URIError(message, fileName, lineNumber)\n\nURIError()\nURIError(message)\nURIError(message, options)\nURIError(message, fileName)\nURIError(message, fileName, lineNumber)\n```\n\n> **Note:** `URIError()` can be called with or without `new`. Both create a new `URIError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/URL/URL.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL()\n\nThe **`URL()`** constructor returns a newly created\n`URL` object representing the URL defined by the parameters.\n\nIf the given base URL or the resulting URL are not valid URLs, the JavaScript\n`TypeError` exception is thrown.\n\n## Syntax\n\n```js\nnew URL(url)\nnew URL(url, base)\n```\n\n### Parameters\n\n- `url`\n  - : A string or any other object with a `toString()` method.\n    If `url` is a relative URL, `base` is\n    required, and will be used as the base URL. If `url` is an\n    absolute URL, a given `base` will be ignored.\n- `base` _**optional**_\n  - : A string representing the base URL to use in cases where\n    `url` is a relative URL. If not specified, it defaults to\n    `undefined`.\n\n> **Note:** The `url` and `base` arguments will\n> each be stringified from whatever value you pass, just like with other Web APIs\n> that accept a string. In particular, you can use an existing\n> `URL` object for either argument, and it will stringify to the\n> object's `URL.href\", \"href` property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/URL/prototype/hash.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.hash\n\nThe **`hash`** property of the\n`URL` interface is a string containing a\n`'#'` followed by the fragment identifier of the URL.\n\nThe fragment is not percent-decoded. If the URL does not\nhave a fragment identifier, this property contains an empty string — `\"\"`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/URL/prototype/host.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.host\n\nThe **`host`** property of the `URL` interface is\na string containing the host, that is the `URL.hostname`, and then, if the `port` of the URL is nonempty, a\n`':'`, followed by the `port` of the URL.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/URL/prototype/hostname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.hostname\n\nThe **`hostname`** property of the `URL` interface\nis a string containing the domain name of the URL.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/URL/prototype/href.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.href\n\nThe **`href`** property of the `URL` interface is\na string containing the whole URL.\n\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/URL/prototype/origin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.origin\n\nThe **`origin`** read-only property of\nthe `URL` interface returns a string containing the\nUnicode serialization of the origin of the represented URL.\n\nThe exact structure\nvaries depending on the type of URL:\n\n- For `http` or `https` URLs, the scheme followed by\n  `'://'`, followed by the domain, followed by `':'`, followed by\n  the port (the default port, `80` and `443` respectively, if\n  explicitly specified).\n- For `file:` URLs, the value is browser dependent.\n- for `blob:` URLs, the origin of the URL following `blob:` will\n  be used. For example, `\"blob:https://mozilla.org\"` will be returned as\n  `\"https://mozilla.org\".`\n\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/URL/prototype/password.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.password\n\nThe **`password`** property of the `URL` interface\nis a string containing the password specified before the domain name.\n\nIf it is set without first setting the `URL.username` property, it silently fails.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/URL/prototype/pathname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.pathname\n\nThe **`pathname`** property of the `URL` interface represents a location in a hierarchical structure. It is a string constructed from a list of path segments, each of which is prefixed by a `/` character. If the URL has no path segments, the value of its `pathname` property will be the empty string.\n\nURLs such as `https` and `http` URLs that have [hierarchical schemes](https://www.rfc-editor.org/rfc/rfc3986#section-1.2.3) (which the URL standard calls \"[special schemes](https://url.spec.whatwg.org/#special-scheme)\") always have at least one (invisible) path segment: the empty string. Thus the `pathname` value for such \"special scheme\" URLs can never be the empty string, but will instead always have a least one `/` character.\n\nFor example, the URL `https://developer.mozilla.org` has just one path segment: the empty string, so its `pathname` value is constructed by prefixing a `/` character to the empty string.\n\nSome systems define the term _slug_ to mean the final segment of a non-empty path if it identifies a page in human-readable keywords. For example, the URL `https://example.org/articles/this-that-other-outre-collection` has `this-that-other-outre-collection` as its slug.\n\nSome systems use the `;` and `=` characters to delimit parameters and parameter values applicable to a path segment. For example, with the URL `https://example.org/users;id=42/tasks;state=open?sort=modified`, a system might extract and use the path segment parameters `id=42` and `state=open` from the path segments `users;id=42` and `tasks;state=open`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/URL/prototype/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.port\n\nThe **`port`** property of the `URL` interface is\na string containing the port number of the URL.\n\n> **Note:** If an input string passed to the `URL()` constructor doesn't contain an explicit port number (e.g., `https://localhost`) or contains a port number that's the default port number corresponding to the protocol part of the input string (e.g., `https://localhost:443`), then in the `URL` object the constructor returns, the value of the port property will be the empty string: `''`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/URL/prototype/protocol.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.protocol\n\nThe **`protocol`** property of the `URL` interface\nis a string representing the protocol scheme of the URL, including the\nfinal `':'`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/URL/prototype/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.search\n\nThe **`search`** property of the `URL` interface\nis a search string, also called a _query string_, that is a\nstring containing a `'?'` followed by the parameters of the\nURL.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/URL/prototype/searchParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.searchParams\n\nThe **`searchParams`** readonly property of the\n`URL` interface returns a `URLSearchParams` object allowing\naccess to the `GET` decoded query arguments contained in the URL.\n\n## Value\n\nA `URLSearchParams` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/URL/prototype/toJSON.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.toJSON()\n\nThe **`toJSON()`** method of the `URL` interface\nreturns a string containing a serialized version of the URL,\nalthough in practice it seems to have the same effect as\n`URL.toString()`.\n\n## Syntax\n\n```js\ntoJSON()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/URL/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.toString()\n\nThe **`URL.toString()`** method returns a\nstring containing the whole URL. It is effectively a read-only version\nof `URL.prototype.href`.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/URL/prototype/username.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.username\n\nThe **`username`** property of the `URL` interface\nis a string containing the username specified before the domain name.\n\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/URLSearchParams/URLSearchParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams()\n\nThe **`URLSearchParams()`** constructor creates and returns a\nnew `URLSearchParams` object.\n\n\n\n## Syntax\n\n```js\nnew URLSearchParams()\nnew URLSearchParams(options)\n```\n\n### Parameters\n\n- `options` _**optional**_\n  - : One of:\n    - A string, which will be parsed from `application/x-www-form-urlencoded` format. A leading `'?'` character is ignored.\n    - A literal sequence of name-value string pairs, or any object with an iterator that produces a sequence of string pairs.\n    - A record of string keys and string values. Note that nesting is not supported.\n\n### Return value\n\nA `URLSearchParams` object instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/URLSearchParams/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.append()\n\nThe **`append()`** method of the `URLSearchParams`\ninterface appends a specified key/value pair as a new search parameter.\n\nAs shown in the example below, if the same key is appended multiple times it will\nappear in the parameter string multiple times for each value.\n\n## Syntax\n\n```js\nappend(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to append.\n- `value`\n  - : The value of the parameter to append.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/URLSearchParams/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.delete()\n\nThe **`delete()`** method of the `URLSearchParams`\ninterface deletes the given search parameter and all its associated values, from the\nlist of all search parameters.\n\n## Syntax\n\n```js\ndelete(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to be deleted.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/URLSearchParams/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.entries()\n\nThe **`entries()`** method of the\n`URLSearchParams` interface returns an\niterator allowing iteration through all key/value\npairs contained in this object. The iterator returns key/value pairs in the same order as they appear in the query string. The key and value of each pair are\nstring objects.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/URLSearchParams/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.forEach()\n\nThe **`forEach()`** method of the\n`URLSearchParams` interface allows iteration through all values contained\nin this object via a callback function.\n\n## Syntax\n\n```js\nforEach(callback)\nforEach(callback, thisArg)\n```\n\n### Parameters\n\n- `callback`\n\n  - : Function to execute on each element, which is passed the following arguments:\n\n    - `value`\n      - : The value of the current entry being processed in the `URLSearchParams` object.\n    - `key`\n      - : The key of the current entry being processed in the `URLSearchParams` object.\n    - `searchParams`\n      - : The `URLSearchParams` object the `forEach()` was called upon.\n\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `callback`.\n\n### Return value\n\nNone `undefined`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/URLSearchParams/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.get()\n\nThe **`get()`** method of the `URLSearchParams`\ninterface returns the first value associated to the given search parameter.\n\n## Syntax\n\n```js\nget(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to return.\n\n### Return value\n\nA string if the given search parameter is found; otherwise,\n**`null`**.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/URLSearchParams/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.has()\n\nThe **`has()`** method of the `URLSearchParams`\ninterface returns a boolean value that indicates whether a parameter with the\nspecified name exists.\n\n## Syntax\n\n```js\nhas(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to find.\n\n### Return value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/URLSearchParams/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.keys()\n\nThe **`keys()`** method of the `URLSearchParams`\ninterface returns an iterator allowing iteration\nthrough all keys contained in this object. The keys are string\nobjects.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/URLSearchParams/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.set()\n\nThe **`set()`** method of the `URLSearchParams`\ninterface sets the value associated with a given search parameter to the given value.\nIf there were several matching values, this method deletes the others. If the search\nparameter doesn't exist, this method creates it.\n\n## Syntax\n\n```js\nset(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to set.\n- `value`\n  - : The value of the parameter to set.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/URLSearchParams/prototype/sort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.sort()\n\nThe **`URLSearchParams.sort()`** method sorts all key/value\npairs contained in this object in place and returns `undefined`. The sort\norder is according to unicode code points of the keys. This method uses a stable sorting\nalgorithm (i.e. the relative order between key/value pairs with equal keys will be\npreserved).\n\n## Syntax\n\n```js\nsort()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/URLSearchParams/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.toString()\n\nThe **`toString()`** method of the\n`URLSearchParams` interface returns a query string suitable for use in a\nURL.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string, without the question mark. (Returns an empty string if no\nsearch parameters have been set.)\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/URLSearchParams/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.values()\n\nThe **`values()`** method of the `URLSearchParams`\ninterface returns an iterator allowing iteration\nthrough all values contained in this object. The values are string\nobjects.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Uint16Array/Uint16Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint16Array\n\nThe **`Uint16Array()`** typed array constructor creates an\narray of 16-bit unsigned integers in the platform byte order.\n\n## Syntax\n\n```js\nnew Uint16Array()\nnew Uint16Array(length)\nnew Uint16Array(typedArray)\nnew Uint16Array(object)\n\nnew Uint16Array(buffer)\nnew Uint16Array(buffer, byteOffset)\nnew Uint16Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint16Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Uint32Array/Uint32Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint32Array\n\nThe **`Uint32Array()`** typed array constructor creates an\narray of 32-bit unsigned integers in the platform byte order. If control over byte order\nis needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are initialized to\n`0`. Once established, you can reference elements in the array using the\nobject's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Uint32Array()\nnew Uint32Array(length)\nnew Uint32Array(typedArray)\nnew Uint32Array(object)\n\nnew Uint32Array(buffer)\nnew Uint32Array(buffer, byteOffset)\nnew Uint32Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint32Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Uint8Array/Uint8Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint8Array\n\nThe **`Uint8Array()`** constructor creates a typed array of\n8-bit unsigned integers. The contents are initialized to `0`. Once\nestablished, you can reference elements in the array using the object's methods, or\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew Uint8Array()\nnew Uint8Array(length)\nnew Uint8Array(typedArray)\nnew Uint8Array(object)\n\nnew Uint8Array(buffer)\nnew Uint8Array(buffer, byteOffset)\nnew Uint8Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint8Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/Uint8ClampedArray/Uint8ClampedArray.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint8ClampedArray\n\nThe **`Uint8ClampedArray()`** constructor creates a typed array\nof 8-bit unsigned integers clamped to 0-255; if you specified a value that is out of the\nrange of \\[0,255], 0 or 255 will be set instead; if you specify a non-integer, the\nnearest integer will be set. The contents are initialized to `0`. Once\nestablished, you can reference elements in the array using the object's methods, or\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew Uint8ClampedArray()\nnew Uint8ClampedArray(length)\nnew Uint8ClampedArray(typedArray)\nnew Uint8ClampedArray(object)\n\nnew Uint8ClampedArray(buffer)\nnew Uint8ClampedArray(buffer, byteOffset)\nnew Uint8ClampedArray(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint8ClampedArray()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/WeakMap/WeakMap.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap\n\nThe **`WeakMap()` constructor** creates a `WeakMap` object, optionally based on a provided `Array` or other iterable object.\n\n## Syntax\n\n```js\nnew WeakMap()\nnew WeakMap(iterable)\n```\n\n> **Note:** `WeakMap()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable`\n  - : An `Array` or other object that implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol)  that returns an iterator object that produces a two-element array-like object whose first element is a value that will be used as a `WeakMap` key and whose second element is the value to associate with that key. Each key-value pair will be added to the new `WeakMap`. null is treated as undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/WeakMap/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.delete()\n\nThe **`delete()`** method removes the specified element from a\n`WeakMap` object.\n\n## Syntax\n\n```js\ndelete(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to remove from the `WeakMap` object.\n\n### Return value\n\n`true` if an element in the `WeakMap` object has been removed\nsuccessfully. `false` if the key is not found in the `WeakMap` or\nif the key is not an object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/WeakMap/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.get()\n\nThe **`get()`** method returns a specified element from a\n`WeakMap` object.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key`\n  - : Required. The key of the element to return from the `WeakMap` object.\n\n### Return value\n\nThe element associated with the specified key in the `WeakMap` object. If\nthe key can't be found, [`undefined`](../../../globals/undefined.mdx) is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/WeakMap/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.has()\n\nThe **`has()`** method returns a boolean indicating whether an\nelement with the specified key exists in the `WeakMap` object or not.\n\n## Syntax\n\n```js\nhas(key)\n```\n\n### Parameters\n\n- `key`\n  - : Required. The key of the element to test for presence in the `WeakMap`\n    object.\n\n### Return value\n\n- Boolean\n  - : Returns `true` if an element with the specified key exists in the\n    `WeakMap` object; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/WeakMap/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.set\n\nThe **`set()`** method adds a new element with a specified key\nand value to a `WeakMap` object.\n\n## Syntax\n\n```js\nset(key, value)\n```\n\n### Parameters\n\n- `key`\n  - : Required. Must be `object`. The key of the element to add to the\n    `WeakMap` object.\n- `value`\n  - : Required. Any value. The value of the element to add to the `WeakMap`\n    object.\n\n### Return value\n\nThe `WeakMap` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/WeakRef/WeakRef.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakRef\n\nThe **`WeakRef`** constructor creates a `WeakRef`\nobject referring to a given target object.\n\n## Syntax\n\n```js\nnew WeakRef(targetObject)\n```\n\n> **Note:** `WeakRef()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `targetObject`\n  - : The target object the WeakRef should refer to (also called the _referent_).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/WeakRef/prototype/deref.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakRef.prototype.deref()\n\nThe `deref` method returns the `WeakRef` instance's target\nobject, or `undefined` if the target object has been garbage-collected.\n\n## Syntax\n\n```js\nderef()\n```\n\n### Return value\n\nThe target object of the WeakRef, or `undefined` if the object has been\ngarbage-collected.\n\n## Description\n\nSee the [Notes on WeakRefs](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WeakRef#notes_on_weakrefs) section of the `WeakRef` page for some important notes.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/WeakSet/WeakSet.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet\n\nThe **`WeakSet`** constructor lets you create\n`WeakSet` objects that store weakly held _objects_ in a collection.\n\n## Syntax\n\n```js\nnew WeakSet()\nnew WeakSet(iterable)\n```\n\n> **Note:** `WeakSet()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable` _**optional**_\n  - : If an [iterable object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) is passed, all of its elements will be added to the new\n    `WeakSet`. null is treated as undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/WeakSet/prototype/add.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet.prototype.add\n\nThe **`add()`** method appends a new object to the end of a\n`WeakSet` object.\n\n## Syntax\n\n```js\nadd(value)\n```\n\n### Parameters\n\n- value\n  - : Required. The object to add to the `WeakSet` collection.\n\n### Return value\n\nThe `WeakSet` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/WeakSet/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet.prototype.delete\n\nThe **`delete()`** method removes the specified element from a\n`WeakSet` object.\n\n## Syntax\n\n```js\ndelete(value)\n```\n\n### Parameters\n\n- `value`\n  - : Required. The object remove from the `WeakSet` object.\n\n### Return value\n\n`true` if an element in the `WeakSet` object has been removed\nsuccessfully. `false` if the `value` is not found in\nthe `WeakSet` or if the `value` is not an object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/WeakSet/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet.prototype.has\n\nThe **`has()`** method returns a boolean indicating whether an\nobject exists in a `WeakSet` or not.\n\n## Syntax\n\n```js\nhas(value)\n```\n\n### Parameters\n\n- `value`\n  - : Required. The object to test for presence in the `WeakSet`.\n\n### Return value\n\n- Boolean\n  - : Returns `true` if an element with the specified value exists in the\n    `WeakSet` object; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/WorkerLocation/WorkerLocation.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# WorkerLocation\n\nThe **`WorkerLocation`** interface defines the absolute location of the script executed by the Worker. Such an object is initialized for each worker and is available via the [`location`](../../globals/location.mdx) property obtained by calling `globalThis.location`.\n\n## Instance properties\n\n- [`WorkerLocation.href`](../../globals/WorkerLocation/href.mdx) _**read-only**_\n  - : Returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location.\n- [`WorkerLocation.protocol`](../../globals/WorkerLocation/protocol.mdx) _**read-only**_\n  - : Returns the [`protocol`](../../globals/URL/prototype/protocol.mdx) part of the worker's location.\n- [`WorkerLocation.host`](../../globals/WorkerLocation/host.mdx) _**read-only**_\n  - : Returns the [`host`](../../globals/URL/prototype/host.mdx) part of the worker's location.\n- [`WorkerLocation.hostname`](../../globals/WorkerLocation/hostname.mdx) _**read-only**_\n  - : Returns the [`hostname`](../../globals/URL/prototype/hostname.mdx) part of the worker's location.\n- [`WorkerLocation.origin`](../../globals/WorkerLocation/origin.mdx) _**read-only**_\n  - : Returns the worker's [`origin`](../../globals/URL/prototype/origin.mdx).\n- [`WorkerLocation.port`](../../globals/WorkerLocation/port.mdx) _**read-only**_\n  - : Returns the [`port`](../../globals/URL/prototype/port.mdx) part of the worker's location.\n- [`WorkerLocation.pathname`](../../globals/WorkerLocation/pathname.mdx) _**read-only**_\n  - : Returns the [`pathname`](../../globals/URL/prototype/pathname.mdx) part of the worker's location.\n- [`WorkerLocation.search`](../../globals/WorkerLocation/search.mdx) _**read-only**_\n  - : Returns the [`search`](../../globals/URL/prototype/search.mdx) part of the worker's location.\n- [`WorkerLocation.hash`](../../globals/WorkerLocation/hash.mdx) _**read-only**_\n  - : Returns the [`hash`](../../globals/URL/prototype/hash.mdx) part of the worker's location.\n\n## Instance methods\n\n- [`WorkerLocation.toString`](../../globals/WorkerLocation/toString.mdx)\n  - : Returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location. It is a synonym for [`WorkerLocation.href`](../../globals/WorkerLocation/href.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/WorkerLocation/hash.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.hash\n\nThe **`hash`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`hash`](../../globals/URL/prototype/hash.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/WorkerLocation/host.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.host\n\nThe **`host`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`host`](../../globals/URL/prototype/host.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/WorkerLocation/hostname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.hostname\n\nThe **`hostname`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`hostname`](../../globals/URL/prototype/hostname.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/WorkerLocation/href.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.href\n\nThe **`href`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/WorkerLocation/origin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.origin\n\nThe **`origin`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the worker's [`origin`](../../globals/URL/prototype/origin.mdx).\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/WorkerLocation/pathname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.pathname\n\nThe **`pathname`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`pathname`](../../globals/URL/prototype/pathname.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/WorkerLocation/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.port\n\nThe **`port`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`port`](../../globals/URL/prototype/port.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/WorkerLocation/protocol.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.protocol\n\nThe **`protocol`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`protocol`](../../globals/URL/prototype/protocol.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/WorkerLocation/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.search\n\nThe **`search`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`search`](../../globals/URL/prototype/search.mdx) part of the worker's location.\n\n## Value\n\nA string.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/WorkerLocation/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.toString()\n\nThe **`toString()`** method of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location. It is a synonym for [`WorkerLocation.href`](../../globals/WorkerLocation/href.mdx).\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone [`undefined`](../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/WritableStream/WritableStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream()\n\nThe **`WritableStream()`** constructor creates\na new `WritableStream` object instance.\n\n## Syntax\n\n```js\nnew WritableStream(underlyingSink)\nnew WritableStream(underlyingSink, queuingStrategy)\n```\n\n### Parameters\n\n- `underlyingSink` _**optional**_\n\n  - : An object containing methods and properties that define how the constructed stream\n    instance will behave. `underlyingSink` can contain the following:\n\n    - `start(controller)` _**optional**_\n      - : This is a method, called immediately when the object is constructed. The\n        contents of this method are defined by the developer, and should aim to get access\n        to the underlying sink. If this process is to be done asynchronously, it can\n        return a promise to signal success or failure. The `controller`\n        parameter passed to this method is a\n        `WritableStreamDefaultController`. This can be used by the developer\n        to control the stream during set up.\n    - `write(chunk, controller)` _**optional**_\n      - : This method, also defined by the developer, will be called when a new chunk of\n        data (specified in the `chunk` parameter) is ready to be written to the\n        underlying sink. It can return a promise to signal success or failure of the write\n        operation. The `controller` parameter passed to this method is a\n        `WritableStreamDefaultController` that can be used by the developer\n        to control the stream as more chunks are submitted for writing. This method will\n        be called only after previous writes have succeeded, and never after the stream is\n        closed or aborted (see below).\n    - `close(controller)` _**optional**_\n      - : This method, also defined by the developer, will be called if the app signals\n        that it has finished writing chunks to the stream. The contents should do whatever\n        is necessary to finalize writes to the underlying sink, and release access to it.\n        If this process is asynchronous, it can return a promise to signal success or\n        failure. This method will be called only after all queued-up writes have\n        succeeded. The `controller` parameter passed to this method is a\n        `WritableStreamDefaultController`, which can be used to control the\n        stream at the end of writing.\n    - `abort(reason)` _**optional**_\n      - : This method, also defined by the developer, will be called if the app signals\n        that it wishes to abruptly close the stream and put it in an errored state. It can\n        clean up any held resources, much like `close()`, but\n        `abort()` will be called even if writes are queued up — those chunks\n        will be thrown away. If this process is asynchronous, it can return a promise to\n        signal success or failure. The `reason` parameter contains a\n        string describing why the stream was aborted.\n\n- `queuingStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer — this defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk` — this indicates the size to use for each chunk, in bytes.\n\n    > **Note:** You could define your own custom\n    > `queuingStrategy`, or use an instance of\n    > `ByteLengthQueuingStrategy` or `CountQueuingStrategy`\n    > for this object value. If no `queuingStrategy` is supplied, the default\n    > used is the same as a `CountQueuingStrategy` with a high water mark of 1\\.\n\n### Return value\n\nAn instance of the `WritableStream` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/WritableStream/prototype/abort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream.abort()\n\nThe **`abort()`** method of the `WritableStream` interface aborts the stream, signaling that the producer can no longer successfully write to the stream and it is to be immediately moved to an error state, with any queued writes discarded.\n\n## Syntax\n\n```js\nabort(reason)\n```\n\n### Parameters\n\n- `reason`\n  - : A string providing a human-readable reason for the abort.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason` parameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to abort is not a `WritableStream`, or it is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/WritableStream/prototype/getWriter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream.getWriter()\n\nThe **`getWriter()`** method of the `WritableStream` interface returns a new instance of `WritableStreamDefaultWriter` and locks the stream to that instance.\nWhile the stream is locked, no other writer can be acquired until this one is released.\n\n## Syntax\n\n```js\ngetWriter()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `WritableStreamDefaultWriter` object instance.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to create a writer for is not a `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/WritableStream/prototype/locked.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream.locked\n\nThe **`locked`** read-only property of the `WritableStream` interface returns a boolean indicating whether the `WritableStream` is locked to a writer.\n\n## Value\n\nA boolean value indicating whether or not the writable stream is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/WritableStreamDefaultController/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultController.error()\n\nThe **`error()`** method of the\n`WritableStreamDefaultController` interface causes any future interactions\nwith the associated stream to error.\n\nThis method is rarely used, since usually it suffices to return a rejected promise from\none of the underlying sink's methods. However, it can be useful for suddenly shutting\ndown a stream in response to an event outside the normal lifecycle of interactions with\nthe underlying sink.\n\n## Syntax\n\n```js\nerror(message)\n```\n\n### Parameters\n\n- `message`\n  - : A string representing the error you want future interactions to\n    fail with.\n\n### Return value\n\nNone `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to error is not a `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/WritableStreamDefaultWriter/WritableStreamDefaultWriter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter()\n\nThe **`WritableStreamDefaultWriter()`**\nconstructor creates a new `WritableStreamDefaultWriter` object instance.\n\n## Syntax\n\n```js\nnew WritableStreamDefaultWriter(stream)\n```\n\n### Parameters\n\n- `stream`\n  - : The `WritableStream` to be written to.\n\n### Return value\n\nAn instance of the `WritableStreamDefaultWriter` object.\n\n### Exceptions\n\n- `TypeError`\n  - : The provided `stream` value is not a `WritableStream`, or it\n    is locked to another writer already.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/WritableStreamDefaultWriter/prototype/abort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.abort()\n\nThe **`abort()`** method of the\n`WritableStreamDefaultWriter` interface aborts the stream, signaling that\nthe producer can no longer successfully write to the stream and it is to be immediately\nmoved to an error state, with any queued writes discarded.\n\nIf the writer is active, the `abort()` method behaves the same as that for\nthe associated stream (`WritableStream.abort()`). If not, it returns a\nrejected promise.\n\n## Syntax\n\n```js\nabort()\nabort(reason)\n```\n\n### Parameters\n\n- `reason` _**optional**_\n  - : A string representing a human-readable reason for the abort.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason`\nparameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to abort is not a `WritableStream`, or it is\n    locked.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/WritableStreamDefaultWriter/prototype/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.close()\n\nThe **`close()`** method of the\n`WritableStreamDefaultWriter` interface closes the associated writable\nstream.\n\nThe underlying sink will finish processing any previously-written chunks, before\ninvoking the close behavior. During this time any further attempts to write will fail\n(without erroring the stream).\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise`, which fulfills with the `undefined` if all\nremaining chunks were successfully written before the close, or rejects with an error if\na problem was encountered during the process.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to close is not a `WritableStream`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/WritableStreamDefaultWriter/prototype/closed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.closed\n\nThe **`closed`** read-only property of the\n`WritableStreamDefaultWriter` interface returns a\n`Promise` that fulfills if the stream becomes closed, or rejects if\nthe stream errors or the writer's lock is released.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/WritableStreamDefaultWriter/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.desiredSize\n\nThe **`desiredSize`** read-only property of the\n`WritableStreamDefaultWriter` interface returns the desired size required\nto fill the stream's internal queue.\n\n## Value\n\nAn integer. Note that this can be negative if the queue is over-full.\n\nThe value will be `null` if the stream cannot be successfully written to\n(due to either being errored, or having an abort queued up), and zero if the stream is\nclosed.\n\n### Exceptions\n\n- `TypeError`\n  - : The writer's lock is released.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/WritableStreamDefaultWriter/prototype/ready.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.ready\n\nThe **`ready`** read-only property of the\n`WritableStreamDefaultWriter` interface returns a `Promise`\nthat resolves when the desired size of the stream's internal queue transitions from\nnon-positive to positive, signaling that it is no longer applying backpressure.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/WritableStreamDefaultWriter/prototype/releaseLock.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.releaseLock()\n\nThe **`releaseLock()`** method of the\n`WritableStreamDefaultWriter` interface releases the writer's lock on the\ncorresponding stream. After the lock is released, the writer is no longer active. If the\nassociated stream is errored when the lock is released, the writer will appear errored\nin the same way from now on; otherwise, the writer will appear closed.\n\n## Syntax\n\n```js\nreleaseLock()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone `undefined`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/WritableStreamDefaultWriter/prototype/write.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.write()\n\nThe **`write()`** method of the\n`WritableStreamDefaultWriter` interface writes a passed chunk of data to a\n`WritableStream` and its underlying sink, then returns a\n`Promise` that resolves to indicate the success or failure of the write\noperation.\n\nNote that what \"success\" means is up to the underlying sink; it might indicate that the\nchunk has been accepted, and not necessarily that it is safely saved to its ultimate\ndestination.\n\n## Syntax\n\n```js\nwrite(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : A block of binary data to pass to the `WritableStream`.\n\n### Return value\n\nA `Promise`, which fulfills with the `undefined` upon a\nsuccessful write, or rejects if the write fails or stream becomes errored before the\nwriting process is initiated.\n\n### Exceptions\n\n- `TypeError`\n  - : The target stream is not a writable stream, or it does not have an owner.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/atob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# atob()\n\nThe **`atob()`** function decodes a\nstring of data which has been encoded using Base64 encoding. You can use\nthe `btoa()` method to encode and transmit\ndata which may otherwise cause communication problems, then transmit it and use the\n`atob()` method to decode the data again. For example, you can encode,\ntransmit, and decode control characters such as ASCII values 0 through 31.\n\nFor use with Unicode or UTF-8 strings, see the note on \"Unicode strings\" in the page\nfor `btoa()`.\n\n## Syntax\n\n```js\natob(encodedData)\n```\n\n### Parameters\n\n- `encodedData`\n  - : A binary string (i.e., a string in which each character in the string is treated as a byte of binary data) containing base64-encoded data.\n\n### Return value\n\nAn ASCII string containing decoded data from `encodedData`.\n\n### Exceptions\n\n- `InvalidCharacterError`\n  - : Thrown if `encodedData` is not valid base64.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/btoa.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# btoa()\n\nThe **`btoa()`** method creates a\nBase64-encoded ASCII string from a _binary string_ (i.e., a\nstring in which each character in the string is treated as a byte\nof binary data).\n\nYou can use this method to encode data which may otherwise cause communication\nproblems, transmit it, then use the `atob()` method to decode the data again. For example, you can encode control\ncharacters such as ASCII values 0 through 31.\n\n## Syntax\n\n```js\nbtoa(stringToEncode)\n```\n\n### Parameters\n\n- `stringToEncode`\n  - : The _binary string_ to encode.\n\n### Return value\n\nAn ASCII string containing the Base64 representation of\n`stringToEncode`.\n\n### Exceptions\n\n- `InvalidCharacterError`\n  - : The string contained a character that did not fit in a single byte. See \"Unicode\n    strings\" below for more detail.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/clearInterval.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# clearInterval()\n\nThe global **`clearInterval()`** method cancels a timed, repeating action which\nwas previously established by a call to `setInterval()`.\nIf the parameter provided does not identify a previously established action,\nthis method does nothing.\n\n## Syntax\n\n```js\nclearInterval(intervalID)\n```\n\n### Parameters\n\n- `intervalID`\n  - : The identifier of the repeated action you want to cancel. This ID was returned by\n    the corresponding call to `setInterval()`.\n\nIt's worth noting that the pool of IDs used by\n`setInterval()` and\n`setTimeout()` are shared, which\nmeans you can technically use `clearInterval()` and\n`clearTimeout()` interchangeably.\nHowever, for clarity, you should avoid doing so.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/clearTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# clearTimeout()\n\nThe global **`clearTimeout()`** method cancels a timeout previously established\nby calling `setTimeout()`.\n\nIf the parameter provided does not identify a previously established action,\nthis method does nothing.\n\n## Syntax\n\n```js\nclearTimeout(timeoutID)\n```\n\n### Parameters\n\n- `timeoutID`\n  - : The identifier of the timeout you want to cancel. This ID was returned by the\n    corresponding call to `setTimeout()`.\n\nIt's worth noting that the pool of IDs used by\n`setTimeout()` and\n`setInterval()` are shared, which\nmeans you can technically use `clearTimeout()` and\n`clearInterval()`\ninterchangeably. However, for clarity, you should avoid doing so.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/console/assert.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.assert()\n\nThe **`console.assert()`** method writes an error message to\nthe console if the assertion is false. If the assertion is true, nothing happens.\n\n## Syntax\n\n```js\nassert(assertion, obj1)\nassert(assertion, obj1, obj2)\nassert(assertion, obj1, obj2, /* … ,*/ objN)\n\nassert(assertion, msg)\nassert(assertion, msg, subst1)\nassert(assertion, msg, subst1, /* … ,*/ substN)\n```\n\n### Parameters\n\n- `assertion`\n  - : Any boolean expression. If the assertion is false, the message is written to the\n    console.\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output.\n- `msg`\n  - : A JavaScript string containing zero or more substitution strings.\n- `subst1` … `substN`\n  - : JavaScript objects with which to replace substitution strings within\n    `msg`. This parameter gives you additional control over the format of the\n    output.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/console/clear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.clear()\n\nThe **`console.clear()`** method clears the console if the console allows it.\n\n## Syntax\n\n```js\nclear()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/console/count.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.count()\n\nThe **`console.count()`** method logs the number of times that\nthis particular call to `count()` has been called.\n\n\n## Syntax\n\n```js\ncount()\ncount(label)\n```\n\n### Parameters\n\n- `label` _optional_\n  - : A string. If supplied, `count()` outputs the number of\n    times it has been called with that label. If omitted, `count()` behaves as\n    though it was called with the \"default\" label.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/console/countReset.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.countReset()\n\nThe **`console.countReset()`** method resets counter used with `console.count()`.\n\n## Syntax\n\n```js\ncountReset()\ncountReset(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : A string. If supplied, `countReset()` resets the count for\n    that label to 0. If omitted, `countReset()` resets the default counter to\n    0.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/console/debug.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.debug()\n\nThe **`console.debug()`** method outputs a message to the console at the \"debug\" log level.\n\n## Syntax\n\n```js\ndebug(obj1)\ndebug(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output to the console.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/console/dir.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.dir()\n\nThe method **`console.dir()`** displays a list of the properties of\nthe specified JavaScript object.\n\n## Syntax\n\n```js\ndir(object)\n```\n\n### Parameters\n\n- `object`\n  - : A JavaScript object whose properties should be output.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/console/dirxml.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.dirxml()\n\nThe **`console.dirxml()`** method displays the supplied object in the console.\n\n## Syntax\n\n```js\ndirxml(object)\n```\n\n### Parameters\n\n- `object`\n  - : A JavaScript object whose properties should be output.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/console/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.error()\n\nThe **`console.error()`** method outputs an error message console.\n\n## Syntax\n\n```js\nerror(obj1)\nerror(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of\n    these objects are appended together in the order listed and output.\n\n### Return value\n\nNone `undefined`."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/console/group.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.group()\n\nThe **`console.group()`** method creates a new inline group in the console, until `console.groupEnd()` is called.\n\n## Syntax\n\n```js\ngroup()\ngroup(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : Label for the group.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/console/groupCollapsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.groupCollapsed()\n\nThe **`console.groupCollapsed()`** method creates a new inline group in the Web Console. Unlike `console.group()`,\nhowever, the new group is created collapsed. The user will need to use the disclosure\nbutton next to it to expand it, revealing the entries created in the group.\n\nCall `console.groupEnd()` to back out to the parent group.\n\n## Syntax\n\n```js\ngroupCollapsed()\ngroupCollapsed(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : Label for the group.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/console/groupEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.groupEnd()\n\nThe **`console.groupEnd()`** method exits the current inline group in the console.\n\n## Syntax\n\n```js\ngroupEnd()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/console/info.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.info()\n\nThe **`console.info()`** method outputs an informational message to the console.\n\n## Syntax\n\n```js\ninfo(obj1)\ninfo(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/console/log.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.log()\n\nThe **`console.log()`** method outputs a message to the console.\n\n## Syntax\n\n```js\nlog(obj1)\nlog(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output. Please be warned that if\n    you log objects in the latest versions of Chrome and Firefox what you get logged on\n    the console is a _reference to the object_, which is not necessarily the\n    'value' of the object at the moment in time you call `console.log()`, but\n    it is the value of the object at the moment you open the console.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/console/time.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.time()\n\nThe **`console.time()`** method starts a timer you can use to track\nhow long an operation takes. You give each timer a unique name. When you call `console.timeEnd()` with the same name, the\nbrowser will output the time, in milliseconds, that elapsed since the timer was started.\n\n## Syntax\n\n```js\ntime(label)\n```\n\n### Parameters\n\n- `label`\n  - : A `string` representing the name to give the new timer. This will identify the timer; use the same name when\n    calling `console.timeEnd()` to stop the timer and get the time output to\n    the console.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/console/timeEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.timeEnd()\n\nThe **`console.timeEnd()`** stops a timer that was previously started by calling `console.time()`.\n\n## Syntax\n\n```js\ntimeEnd(label)\n```\n\n### Parameters\n\n- `label`\n  - : A `string` representing the name of the timer to stop. Once stopped, the elapsed time is automatically\n    displayed in the console.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/console/timeLog.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.timeLog()\n\nThe **`console.timeLog()`** method logs the current value of a timer that was previously started by calling `console.time()`.\n\n## Syntax\n\n```js\ntimeLog()\ntimeLog(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : The name of the timer to log to the console. If this is omitted the label \"default\" is used.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/console/trace.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.trace()\n\nThe **`console.trace()`** method outputs a stack trace to the console.\n\n## Syntax\n\n```js\ntrace()\ntrace(object1, /* …, */ objectN)\n```\n\n### Parameters\n\n- `objects` __optional__\n  - : Zero or more objects to be output to console along with the trace. These are\n    assembled and formatted the same way they would be if passed to the `console.log()` method.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/console/warn.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.warn()\n\nThe **`console.warn()`** method outputs a warning message to the console.\n\n## Syntax\n\n```js\nwarn(obj1)\nwarn(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/crypto/getRandomValues.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Crypto.getRandomValues()\n\nThe **`Crypto.getRandomValues()`** method lets you get cryptographically strong random values.\nThe array given as the parameter is filled with random numbers (random in its cryptographic meaning).\n\n## Syntax\n\n```js\ngetRandomValues(typedArray)\n```\n\n### Parameters\n\n- `typedArray`\n  - : An integer-based `TypedArray`, that is one of: `Int8Array`, `Uint8Array`,\n    `Uint8ClampedArray`, `Int16Array`, `Uint16Array`,\n    `Int32Array`, `Uint32Array`, `BigInt64Array`,\n    `BigUint64Array` (but **not** `Float32Array` nor `Float64Array`).\n    All elements in the array will be overwritten with random numbers.\n\n### Return value\n\nThe same array passed as `typedArray` but with its contents replaced with the newly generated random numbers.\nNote that `typedArray` is modified in-place, and no copy is made.\n\n### Exceptions\n\n- `QuotaExceededError`\n  - : Thrown if the `byteLength` of `typedArray` exceeds 65,536.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/crypto/randomUUID.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Crypto.randomUUID()\n\nThe **`randomUUID()`** method is used to generate a v4 [UUID](https://developer.mozilla.org/en-US/docs/Glossary/UUID) using a cryptographically secure random number generator.\n\n## Syntax\n\n```js\nrandomUUID()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string containing a randomly generated, 36 character long v4 UUID."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/crypto/subtle.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Crypto.subtle\n\nThe **`Crypto.subtle`** read-only property returns a\n[`SubtleCrypto`](../SubtleCrypto/SubtleCrypto.mdx) which can then be used to perform low-level\ncryptographic operations.\n\n## Value\n\nA [`SubtleCrypto`](../SubtleCrypto/SubtleCrypto.mdx) object you can use to interact with the Web Crypto API's\nlow-level cryptography features.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/decodeURI.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# decodeURI\n\nThe **`decodeURI()`** function decodes a Uniform Resource Identifier (URI) previously created by [`encodeURI()`](../globals/encodeURI.mdx) or a similar routine.\n\n## Syntax\n\n```js\ndecodeURI(encodedURI)\n```\n\n### Parameters\n\n- `encodedURI`\n  - : A complete, encoded Uniform Resource Identifier.\n\n### Return value\n\nA new string representing the unencoded version of the given encoded Uniform Resource Identifier (URI).\n\n### Exceptions\n\n- [`URIError`](../globals/URIError/URIError.mdx)\n  - : Thrown if `encodedURI` contains a `%` not followed by two hexadecimal digits, or if the escape sequence does not encode a valid UTF-8 character.\n\n## Description\n\n`decodeURI()` is a function property of the global object.\n\nThe `decodeURI()` function decodes the URI by treating each escape sequence in the form `%XX` as one UTF-8 code unit (one byte). In UTF-8, the number of leading 1 bits in the first byte, which may be 0 (for 1-byte ASCII characters), 2, 3, or 4, indicates the number of bytes in the character. So by reading the first escape sequence, `decodeURI()` can determine how many more escape sequences to consume. If `decodeURI()` fails to find the expected number of sequences, or if the escape sequences don't encode a valid UTF-8 character, a [`URIError`](../globals/URIError/URIError.mdx) is thrown.\n\n`decodeURI()` decodes all escape sequences, but if the escape sequence encodes one of the following characters, the escape sequence is preserved in the output string (because they are part of the URI syntax):\n\n```\n; / ? : @ & = + $ , #\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/decodeURIComponent.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# decodeURIComponent\n\nThe **`decodeURIComponent()`** function decodes a Uniform Resource Identifier (URI) component previously created by [`encodeURIComponent()`](./encodeURIComponent.mdx) or by a similar routine.\n\n\n## Syntax\n\n```js\ndecodeURIComponent(encodedURI)\n```\n\n### Parameters\n\n- `encodedURI`\n  - : An encoded component of a Uniform Resource Identifier.\n\n### Return value\n\nA new string representing the decoded version of the given encoded Uniform Resource Identifier (URI) component.\n\n### Exceptions\n\n- [`URIError`](../globals/URIError/URIError.mdx)\n  - : Thrown if `encodedURI` contains a `%` not followed by two hexadecimal digits, or if the escape sequence does not encode a valid UTF-8 character.\n\n## Description\n\n`decodeURIComponent()` is a function property of the global object.\n\n`decodeURIComponent()` uses the same decoding algorithm as described in [`decodeURI()`](./decodeURI.mdx). It decodes _all_ escape sequences, including those that are not created by [`encodeURIComponent()`](./encodeURIComponent.mdx), like `-.!~*'()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/encodeURI.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# encodeURI()\n\nThe **`encodeURI()`** function encodes a URI by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character (will only be four escape sequences for characters composed of two surrogate characters). Compared to [`encodeURIComponent()`](./encodeURIComponent.mdx), this function encodes fewer characters, preserving those that are part of the URI syntax.\n\n## Syntax\n\n```js\nencodeURI(uri)\n```\n\n### Parameters\n\n- `uri`\n  - : A string to be encoded as a URI.\n\n### Return value\n\nA new string representing the provided string encoded as a URI.\n\n### Exceptions\n\n- [`URIError`](./URIError/URIError.mdx)\n  - : Thrown if `uri` contains a [lone surrogate](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters).\n\n## Description\n\n`encodeURI()` is a function property of the global object.\n\nThe `encodeURI()` function escapes characters by UTF-8 code units, with each octet encoded in the format `%XX`, left-padded with 0 if necessary. Because lone surrogates in UTF-16 do not encode any valid Unicode character, they cause `encodeURI()` to throw a [`URIError`](./URIError/URIError.mdx).\n\n`encodeURI()` escapes all characters **except**:\n\n```\nA–Z a–z 0–9 - _ . ! ~ * ' ( )\n\n; / ? : @ & = + $ , #\n```\n\nThe characters on the second line are characters that may be part of the URI syntax, and are only escaped by `encodeURIComponent()`. Both `encodeURI()` and `encodeURIComponent()` do not encode the characters `-.!~*'()`, known as \"unreserved marks\", which do not have a reserved purpose but are allowed in a URI \"as is\". (See [RFC2396](https://www.ietf.org/rfc/rfc2396.txt))\n\nThe `encodeURI()` function does not encode characters that have special meaning (reserved characters) for a URI. The following example shows all the parts that a URI can possibly contain. Note how certain characters are used to signify special meaning:\n\n```\nhttp://username:password@www.example.com:80/path/to/file.php?foo=316&bar=this+has+spaces#anchor\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/encodeURIComponent.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# encodeURIComponent\n\nThe **`encodeURIComponent()`** function encodes a URI by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character (will only be four escape sequences for characters composed of two surrogate characters). Compared to [`encodeURI()`](./encodeURI.mdx), this function encodes more characters, including those that are part of the URI syntax.\n\n## Syntax\n\n```js\nencodeURIComponent(uriComponent)\n```\n\n### Parameters\n\n- `uriComponent`\n  - : A string to be encoded as a URI component (a path, query string, fragment, etc.). Other values are [converted to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion).\n\n### Return value\n\nA new string representing the provided `uriComponent` encoded as a URI component.\n\n### Exceptions\n\n- [`URIError`](./URIError/URIError.mdx)\n  - : Thrown if `uriComponent` contains a [lone surrogate](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters).\n\n## Description\n\n`encodeURIComponent()` is a function property of the global object.\n\n`encodeURIComponent()` uses the same encoding algorithm as described in [`encodeURI()`](./encodeURI.mdx). It escapes all characters **except**:\n\n```text\nA–Z a–z 0–9 - _ . ! ~ * ' ( )\n```\n\nCompared to [`encodeURI()`](./encodeURI.mdx), `encodeURIComponent()` escapes a larger set of characters. Use `encodeURIComponent()` on user-entered fields from forms `POST`'d to the server — this will encode `&` symbols that may inadvertently be generated during data entry for special HTML entities or other characters that require encoding/decoding. For example, if a user writes `Jack & Jill`, without `encodeURIComponent()`, the ampersand could be interpreted on the server as the start of a new field and jeopardize the integrity of the data.\n\nFor [`application/x-www-form-urlencoded`](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#application/x-www-form-urlencoded-encoding-algorithm), spaces are to be replaced by `+`, so one may wish to follow a `encodeURIComponent()` replacement with an additional replacement of `%20` with `+`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/escape.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# escape()\n\n> **Note:** `escape()` is a non-standard function implemented by browsers and was only standardized for cross-engine compatibility. It is not required to be implemented by all JavaScript engines and may not work everywhere. Use [`encodeURIComponent()`](./encodeURIComponent.mdx) or [`encodeURI()`](./encodeURI.mdx) if possible.\n\nThe **`escape()`** function computes a new string in which certain characters have been replaced by hexadecimal escape sequences.\n\n## Syntax\n\n```js\nescape(str)\n```\n\n### Parameters\n\n- `str`\n  - : A string to be encoded.\n\n### Return value\n\nA new string in which certain characters have been escaped.\n\n## Description\n\n`escape()` is a function property of the global object.\n\nThe `escape()` function replaces all characters with escape sequences, with the exception of ASCII word characters (A–Z, a–z, 0–9, _) and `@*_+-./`. Characters are escaped by UTF-16 code units. If the code unit's value is less than 256, it is represented by a two-digit hexadecimal number in the format `%XX`, left-padded with 0 if necessary. Otherwise, it is represented by a four-digit hexadecimal number in the format `%uXXXX`, left-padded with 0 if necessary.\n\n> **Note:** This function was used mostly for URL encoding and is partly based on the escape format in rfc(1738). The escape format is _not_ an [escape sequence](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#escape_sequences) in string literals. You can replace `%XX` with `\\xXX` and `%uXXXX` with `\\uXXXX` to get a string containing actual string-literal escape sequences.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/eval.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# eval\n\n> **Warning:** Executing JavaScript from a string is an enormous security risk. It is far too easy for a bad actor to run arbitrary code when you use `eval()`. See [never use direct eval](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval#never_use_direct_eval!) for details.\n\nThe **`eval()`** function evaluates JavaScript code represented as a string and returns its completion value. The source is parsed as a script.\n\n## Syntax\n\n```js\neval(script)\n```\n\n### Parameters\n\n- `script`\n  - : A string representing a JavaScript expression, statement, or sequence of statements. The expression can include variables and properties of existing objects. It will be parsed as a script, so [`import`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/import) declarations (which can only exist in modules) are not allowed.\n\n### Return value\n\nThe completion value of evaluating the given code. If the completion value is empty, [`undefined`](./undefined.mdx) is returned. If `script` is not a string primitive, `eval()` returns the argument unchanged.\n\n### Exceptions\n\nThrows any exception that occurs during evaluation of the code, including[ `SyntaxError`](./SyntaxError/SyntaxError.mdx) if `script` fails to be parsed as a script.\n\n## Description\n\n`eval()` is a function property of the global object.\n\nThe argument of the `eval()` function is a string. It will evaluate the source string as a script body, which means both statements and expressions are allowed. It returns the completion value of the code. For expressions, it's the value the expression evaluates to. Many statements and declarations have completion values as well, but the result may be surprising (for example, the completion value of an assignment is the assigned value, but the completion value of [`let`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/let) is undefined), so it's recommended to not rely on statements' completion values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/fetch.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# fetch()\n\nThe global **`fetch()`** method starts the process of fetching a\nresource from the network, returning a promise which is fulfilled once the response is\navailable.\n\nThe promise resolves to the `Response` object\nrepresenting the response to your request.\n\nA `fetch()` promise only rejects when a\nnetwork error is encountered (which is usually when there's a permissions issue or\nsimilar). A `fetch()` promise _does\nnot_ reject on HTTP errors (`404`, etc.). Instead, a\n`then()` handler must check the `Response.ok` and/or\n`Response.status` properties.\n\n> **Note:** The `fetch()` method's parameters are identical to\n> those of the `Request()` constructor.\n\n## Explicit Backends\n\nInternally, Fastly uses named backends to handle fetch requests, which need to be explicitly defined to enable custom HTTP origins to be fetched by the service.\n\nThis `backend` option is then a special Fastly-specific fetch option that is provided to the `fetch()` call:\n\n```js\nfetch('https://origin.com/path', { backend: 'origin' });\n```\n\nBackends are configured using the Fastly service backend configuration, see the [Backend documentation](https://developer.fastly.com/reference/api/services/backend/) for more information.\n\n## Dynamic Backends\n\nDynamic backends are a compute feature that allow services to define backends for themselves.\n\nIf the `backend` option is not provided when making `fetch()` requests, a backend will be automatically created by extracting the protocol, host, and port from the provided URL.\n\nIn addition, custom backend configuration options can then also be provided through the [`Backend()`](../fastly:backend/Backend/Backend.mdx) constructor.\n\n## Syntax\n\n```js\nfetch(resource)\nfetch(resource, options)\n```\n\n### Parameters\n\n- `resource`\n\n  - : This defines the resource that you wish to fetch. This can either be:\n\n    - A string or any other object with a \"toString\" method.\n    - A `Request` object.\n\n- `options` _**optional**_\n\n  - : An object containing any custom settings that you want to apply to the request. The\n    possible options are:\n\n    - `method`\n      - : The request method, e.g., `GET`, `POST`.\n    - `headers`\n      - : Any headers you want to add to your request, contained within a\n        `Headers` object or an object literal with `String`\n        values.\n    - `body`\n      - : Any body that you want to add to your request: this can be an `ArrayBuffer`, a `TypedArray`, a `DataView`, a `URLSearchParams`, string object or literal, or a `ReadableStream` object.\n    - `backend` _**Fastly-specific**_\n      - *Fastly-specific*\n    - `cacheOverride` _**Fastly-specific**_\n    - `cacheKey` _**Fastly-specific**_\n    - `imageOptimizerOptions` _**Fastly-specific**_, see [`imageOptimizerOptions`](../fastly:image-optimizer/imageOptimizerOptions.mdx).\n    - `fastly` _**Fastly-specific**_\n      - `decompressGzip`_: boolean_ _**optional**_\n        - Whether to automatically gzip decompress the Response or not.\n\n### Return value\n\nA `Promise` that resolves to a `Response` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/globalThis.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# globalThis\n\nThe global **`globalThis`** property contains the [global `this`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this#global_context) value, which is usually akin to the [global object](https://developer.mozilla.org/docs/Glossary/Global_object).\n\n## Value\n\nThe global `this` object.\n\n> **Note:** The `globalThis` property is configurable and writable so that code authors can hide it when executing untrusted code and prevent exposing the global object.\n\n## Description\n\nThe `globalThis` property provides a standard way of accessing the global `this` value (and hence the global object itself) across environments.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/isFinite.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# isFinite\n\nThe global **`isFinite()`** function determines whether the\npassed value is a finite number. If needed, the parameter is first converted to a\nnumber.\n\n## Syntax\n\n```js\nisFinite(testValue)\n```\n\n### Parameters\n\n- `testValue`\n  - : The value to be tested for finiteness.\n\n### Return value\n\n**`false`** if the argument is (or will be coerced to) positive\nor negative [`Infinity`](./Infinity.mdx) or [`NaN`](./NaN.mdx) or [`undefined`](./undefined.mdx);\notherwise, **`true`**.\n\n## Description\n\n`isFinite` is a function property of the global object.\n\nYou can use this function to determine whether a number is a finite number. The\n`isFinite` function examines the number in its argument. If the argument is\n`NaN`, positive infinity, or negative infinity, this method returns\n`false`; otherwise, it returns `true`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/isNaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# isNaN()\n\nThe **`isNaN()`** function determines whether a value is [`NaN`](./NaN.mdx) when converted to a number. Because coercion inside the `isNaN()` function can be [surprising](#description), you may alternatively want to use [`Number.isNaN()`](./Number/isNaN.mdx).\n\n## Syntax\n\n```js\nisNaN(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested.\n\n### Return value\n\n`true` if the given value is [`NaN`](./NaN.mdx) after being [converted to a number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_coercion); otherwise, `false`.\n\n## Description\n\n`isNaN()` is a function property of the global object.\n\nFor number values, `isNaN()` tests if the number is the value [`NaN`](./NaN.mdx). When the argument to the `isNaN()` function is not of type [Number](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#number_type), the value is first coerced to a number, and the resulting value is then compared against [`NaN`](./NaN.mdx).\n\nThis behavior of `isNaN()` for non-numeric arguments can be confusing! For example, an empty string is coerced to 0, while a boolean is coerced to 0 or 1; both values are intuitively \"not numbers\", but they don't evaluate to `NaN`, so `isNaN()` returns `false`. Therefore, `isNaN()` answers neither the question \"is the input the floating point [`NaN`](./NaN.mdx) value\" nor the question \"is the input not a number\".\n\n[`Number.isNaN()`](./Number/isNaN.mdx) is a more reliable way to test whether a value is the number value `NaN` or not. Alternatively, the expression `x !== x` can be used, and neither of the solutions is subject to the false positives that make the global `isNaN()` unreliable. To test if a value is a number, use [`typeof x === \"number\"`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/typeof).\n\nThe `isNaN()` function answers the question \"is the input functionally equivalent to [`NaN`](./NaN.mdx) when used in a number context\". If `isNaN(x)` returns `false`, you can use `x` in an arithmetic expression as if it's a valid number that's not `NaN`. If `isNaN(x)` returns `true`, `x` will get coerced to `NaN` and make most arithmetic expressions return `NaN` (because `NaN` propagates). You can use this, for example, to test whether an argument to a function is arithmetically processable (usable \"like\" a number), and handle values that are not number-like by throwing an error, providing a default value, etc. This way, you can have a function that makes use of the full versatility JavaScript provides by implicitly converting values depending on context.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/location.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# location\n\nThe **`location`** read-only property returns a\n[`Location`](../globals/WorkerLocation/WorkerLocation.mdx) object with information about the current location of the\ndocument.\n\nSee [`Location`](../globals/WorkerLocation/WorkerLocation.mdx) for all available properties.\n\n## Value\n\nA [`Location`](../globals/WorkerLocation/WorkerLocation.mdx) object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/parseFloat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# parseFloat()\n\nThe **`parseFloat()`** function parses a string argument and returns a floating point number.\n\n## Syntax\n\n```js\nparseFloat(string)\n```\n\n### Parameters\n\n- `string`\n  - : The value to parse, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). Leading whitespace in this argument is ignored.\n\n### Return value\n\nA floating point number parsed from the given `string`, or [`NaN`](./NaN.mdx) when the first non-whitespace character cannot be converted to a number.\n\n> **Note:** JavaScript does not have the distinction of \"floating point numbers\" and \"integers\" on the language level. [`parseInt()`](./parseInt.mdx) and `parseFloat()` only differ in their parsing behavior, but not necessarily their return values. For example, `parseInt(\"42\")` and `parseFloat(\"42\")` would return the same value: a `Number` 42.\n\n## Description\n\nThe `parseFloat` function converts its first argument to a string, parses that string as a decimal number literal, then returns a number or `NaN`. The number syntax it accepts can be summarized as:\n\n- The characters accepted by `parseFloat()` are plus sign (`+`), minus sign (`-` U+002D HYPHEN-MINUS), decimal digits (`0` – `9`), decimal point (`.`), exponent indicator (`e` or `E`), and the `\"Infinity\"` literal.\n- The `+`/`-` signs can only appear strictly at the beginning of the string, or immediately following the `e`/`E` character. The decimal point can only appear once, and only before the `e`/`E` character. The `e`/`E` character can only appear once, and only if there is at least one digit before it.\n- Leading spaces in the argument are trimmed and ignored.\n- `parseFloat()` can also parse and return [`Infinity`](./Infinity.mdx) or `-Infinity` if the string starts with `\"Infinity\"` or `\"-Infinity\"` preceded by none or more white spaces.\n- `parseFloat()` picks the longest substring starting from the beginning that generates a valid number literal. If it encounters an invalid character, it returns the number represented up to that point, ignoring the invalid character and all characters following it.\n- If the argument's first character can't start a legal number literal per the syntax above, `parseFloat` returns [`NaN`](./NaN.mdx).\n\nSyntax-wise, `parseFloat()` parses a subset of the syntax that the [`Number()`](./Number/Number.mdx) function accepts. Namely, `parseFloat()` does not support non-decimal literals with `0x`, `0b`, or `0o` prefixes but supports everything else. However, `parseFloat()` is more lenient than `Number()` because it ignores trailing invalid characters, which would cause `Number()` to return `NaN`.\n\nSimilar to number literals and `Number()`, the number returned from `parseFloat()` may not be exactly equal to the number represented by the string, due to floating point range and inaccuracy. For numbers outside the `-1.7976931348623158e+308` – `1.7976931348623158e+308` range (see `Number.MAX_VALUE`), `-Infinity` or `Infinity` is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/parseInt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# parseInt\n\nThe **`parseInt()`** function parses a string argument and returns an integer of the specified [radix](https://en.wikipedia.org/wiki/Radix) (the base in mathematical numeral systems).\n\n\n\n## Syntax\n\n```js\nparseInt(string)\nparseInt(string, radix)\n```\n\n### Parameters\n\n- `string`\n  - : A string starting with an integer. Leading whitespace in this argument is ignored.\n- `radix` _**optional**_\n\n  - : An integer between `2` and `36` that represents the _radix_ (the base in mathematical numeral systems) of the `string`. It is converted to a [32-bit integer](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#fixed-width_number_conversion); if it's outside the range of \\[2, 36] after conversion, the function will always return `NaN`. If `0` or not provided, the radix will be inferred based on `string`'s value. Be careful — this does NOT always default to `10`! The [description below](#description) explains in more detail what happens when `radix` is not provided.\n\n### Return value\n\nAn integer parsed from the given `string`, or [`NaN`](./NaN.mdx) when\n\n- the `radix` as a 32-bit integer is smaller than `2` or bigger than `36`, or\n- the first non-whitespace character cannot be converted to a number.\n\n> **Note:** JavaScript does not have the distinction of \"floating point numbers\" and \"integers\" on the language level. `parseInt()` and [`parseFloat()`](./parseFloat.mdx) only differ in their parsing behavior, but not necessarily their return values. For example, `parseInt(\"42\")` and `parseFloat(\"42\")` would return the same value: a `Number` 42.\n\n## Description\n\nThe `parseInt` function converts its first argument to a string, parses that string, then returns an integer or `NaN`.\n\nIf not `NaN`, the return value will be the integer that is the first argument taken as a number in the specified `radix`. (For example, a `radix` of `10` converts from a decimal number, `8` converts from octal, `16` from hexadecimal, and so on.)\n\nThe `radix` argument is converted to a number. If it's unprovided, or if the value becomes 0, `NaN` or `Infinity` (`undefined` is coerced to `NaN`), JavaScript assumes the following:\n\n1. If the input `string`, with leading whitespace and possible `+`/`-` signs removed, begins with `0x` or `0X` (a zero, followed by lowercase or uppercase X), `radix` is assumed to be `16` and the rest of the string is parsed as a hexadecimal number.\n2. If the input `string` begins with any other value, the radix is `10` (decimal).\n\n> **Note:** Other prefixes like `0b`, which are valid in [number literals](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#binary), are treated as normal digits by `parseInt()`. `parseInt()` does _not_ treat strings beginning with a `0` character as octal values either. The only prefix that `parseInt()` recognizes is `0x` or `0X` for hexadecimal values — everything else is parsed as a decimal value if `radix` is missing.\n\nIf the radix is `16`, `parseInt()` allows the string to be optionally prefixed by `0x` or `0X` after the optional sign character (`+`/`-`).\n\nIf the radix value (coerced if necessary) is not in range \\[2, 36] (inclusive) `parseInt` returns `NaN`.\n\nFor radices above `10`, letters of the English alphabet indicate numerals greater than `9`. For example, for hexadecimal numbers (base `16`), `A` through `F` are used. The letters are case-insensitive.\n\n`parseInt` understands exactly two signs: `+` for positive, and `-` for negative. It is done as an initial step in the parsing after whitespace is removed. If no signs are found, the algorithm moves to the following step; otherwise, it removes the sign and runs the number-parsing on the rest of the string.\n\nIf `parseInt` encounters a character that is not a numeral in the specified `radix`, it ignores it and all succeeding characters and returns the integer value parsed up to that point. For example, although `1e3` technically encodes an integer (and will be correctly parsed to the integer `1000` by [`parseFloat()`](./parseFloat.mdx), `parseInt(\"1e3\", 10)` returns `1`, because `e` is not a valid numeral in base 10. Because `.` is not a numeral either, the return value will always be an integer.\n\nIf the first character cannot be converted to a number with the radix in use, `parseInt` returns `NaN`. Leading whitespace is allowed.\n\nFor arithmetic purposes, the `NaN` value is not a number in any radix. You can call the [`Number.isNaN`](./Number/isNaN.mdx) function to determine if the result of `parseInt` is `NaN`. If `NaN` is passed on to arithmetic operations, the operation result will also be `NaN`.\n\nBecause large numbers use the `e` character in their string representation (e.g. `6.022e23` for 6.022 × 10<sup>23</sup>), using `parseInt` to truncate numbers will produce unexpected results when used on very large or very small numbers. `parseInt` should _not_ be used as a substitute for [`Math.trunc()`](./Math/trunc.mdx).\n\nTo convert a number to its string literal in a particular radix, use [`thatNumber.toString(radix)`](./Number/prototype/toString.mdx).\n\nBecause `parseInt()` returns a number, it may suffer from loss of precision if the integer represented by the string is [outside the safe range](./Number/isSafeInteger.mdx). The [`BigInt`](./BigInt/BigInt.mdx) function supports parsing integers of arbitrary length accurately, by returning a `BigInt`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/performance/now.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# performance.now()\n\nThe **`performance.now()`** method returns a high resolution timestamp in milliseconds.\nIt represents the time elapsed since [`performance.timeOrigin`](./timeOrigin.mdx) (the time when the worker was instantiated).\n\n## Syntax\n\n```js\nnow()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns a number which represents the time since worker instantation measured in milliseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/performance/timeOrigin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# performance.timeOrigin\n\nThe **`timeOrigin`** read-only property of the Performance interface returns the high resolution timestamp that is used as the baseline for performance-related timestamps.\n\nThis value represents the time when the worker was instantiated.\n\n### Value\n\nReturns a number which represents the time when the worker was instantation."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/setInterval.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# setInterval()\n\nThe **`setInterval()`** method, repeatedly\ncalls a function or executes a code snippet, with a fixed time delay between each\ncall.\n\nThis method returns an interval ID which uniquely identifies the interval, so you\ncan remove it later by calling `clearInterval()`.\n\n## Syntax\n\n```js\nsetInterval(code)\nsetInterval(code, delay)\n\nsetInterval(func)\nsetInterval(func, delay)\nsetInterval(func, delay, arg0)\nsetInterval(func, delay, arg0, arg1)\nsetInterval(func, delay, arg0, arg1, /* … ,*/ argN)\n```\n\n### Parameters\n\n- `func`\n  - : A `function` to be executed every `delay` milliseconds. The first execution happens after `delay` milliseconds.\n- `code`\n  - : An optional syntax allows you to include a string instead of a function, which is\n    compiled and executed every `delay` milliseconds. This syntax is _not\n    recommended_ for the same reasons that make using `eval() a\n    security risk.\n- `delay` _**optional**_\n  - : The time, in milliseconds (thousandths of a second), the timer should delay in\n    between executions of the specified function or code. Defaults to 0 if not specified.\n    below for details on the permitted range of `delay` values.\n- `arg0, …, argN` _**optional**_\n  - : Additional arguments which are passed through to the function specified by\n    _func_ once the timer expires.\n\n### Return value\n\nThe returned `intervalID` is a numeric, non-zero value which identifies the\ntimer created by the call to `setInterval()`; this value can be passed to\n`clearInterval()` to cancel the interval.\n\nIt may be helpful to be aware that `setInterval()` and\n`setTimeout()` share the same pool\nof IDs, and that `clearInterval()` and\n`clearTimeout()` can technically\nbe used interchangeably. For clarity, however, you should try to always match them to\navoid confusion when maintaining your code.\n\n> **Note:** The `delay` argument is converted to a\n> signed 32-bit integer. This effectively limits `delay` to 2147483647 ms,\n> since it's specified as a signed integer in the IDL.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/setTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# setTimeout()\n\nThe global **`setTimeout()`** method sets a timer which executes a function or specified\npiece of code once the timer expires.\n\n## Syntax\n\n```js\nsetTimeout(code)\nsetTimeout(code, delay)\n\nsetTimeout(functionRef)\nsetTimeout(functionRef, delay)\nsetTimeout(functionRef, delay, param1)\nsetTimeout(functionRef, delay, param1, param2)\nsetTimeout(functionRef, delay, param1, param2, /* … ,*/ paramN)\n```\n\n### Parameters\n\n- `functionRef`\n  - : A `function` to be executed after the timer expires.\n- `code`\n  - : An alternative syntax that allows you to include a string instead of a function,\n    which is compiled and executed when the timer expires. This syntax is **not\n    recommended** for the same reasons that make using\n    `eval()` a security risk.\n- `delay` _**optional**_\n\n  - : The time, in milliseconds that the timer should wait before\n    the specified function or code is executed. If this parameter is omitted, a value of 0\n    is used, meaning execute \"immediately\", or more accurately, the next event cycle.\n\n- `param1`, …, `paramN` _**optional**_\n\n  - : Additional arguments which are passed through to the function specified by\n    `functionRef`.\n\n### Return value\n\nThe returned `timeoutID` is a positive integer value which\nidentifies the timer created by the call to `setTimeout()`. This value can be\npassed to `clearTimeout()` to\ncancel the timeout.\n\nIt is guaranteed that a `timeoutID` value will never be reused by a subsequent call to\n`setTimeout()` or `setInterval()` on the same object (a window or\na worker). However, different objects use separate pools of IDs.\n\n## Description\n\nTimeouts are cancelled using `clearTimeout()`.\n\nTo call a function repeatedly (e.g., every _N_ milliseconds), consider using\n`setInterval()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/structuredClone.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# structuredClone()\n\nThe global **`structuredClone()`** method creates a deep clone of a given value.\n\n## Syntax\n\n```js\nstructuredClone(value)\n```\n\n### Parameters\n\n- `value`\n  - : The object to be cloned.\n\n### Return value\n\nThe returned value is a deep copy of the original `value`.\n\n### Exceptions\n\n- `DataCloneError`\n  - : Thrown if any part of the input value is not serializable.\n\n## Description\n\nThis function can be used to deep copy JavaScript values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/undefined.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# undefined\n\nThe global **`undefined`** property represents the primitive\nvalue `undefined`. It is one of JavaScript's \"primitive types\".\n\n## Value\n\nThe primitive value `undefined`.\n\n## Description\n\n`undefined` is a property of the _global object_. That is, it is a variable in global scope.\n\n`undefined` is a non-configurable, non-writable property.\n\nA variable that has not been assigned a value is of type `undefined`. A\nmethod or statement also returns `undefined` if the variable that is being\nevaluated does not have an assigned value. A function returns `undefined` if\na value was not explicitly returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/globals/unescape.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# unescape()\n\n> **Note:** `unescape()` is a non-standard function implemented by browsers and was only standardized for cross-engine compatibility. It is not required to be implemented by all JavaScript engines and may not work everywhere. Use [`decodeURIComponent()`](./decodeURIComponent.mdx) or [`decodeURI()`](./decodeURI.mdx) if possible.\n\nThe **`unescape()`** function computes a new string in which hexadecimal escape sequences are replaced with the characters that they represent. The escape sequences might be introduced by a function like [`escape()`](./escape.mdx).\n\n## Syntax\n\n```js\nunescape(str)\n```\n\n### Parameters\n\n- `str`\n  - : A string to be decoded.\n\n### Return value\n\nA new string in which certain characters have been unescaped.\n\n## Description\n\n`unescape()` is a function property of the global object.\n\nThe `unescape()` function replaces any escape sequence with the character that it represents. Specifically, it replaces any escape sequence of the form `%XX` or `%uXXXX` (where `X` represents one hexadecimal digit) with the character that has the hexadecimal value `XX`/`XXXX`. If the escape sequence is not a valid escape sequence (for example, if `%` is followed by one or no hex digit), it is left as-is.\n\n> **Note:** This function was used mostly for URL encoding and is partly based on the escape format in rfc(1738). The `unescape()` function does _not_ evaluate [escape sequences](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#escape_sequences) in string literals. You can replace `\\xXX` with `%XX` and `\\uXXXX` with `%uXXXX` to get a string that can be handled by `unescape()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/html-rewriter/Element/prototype/after.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# after\n\nThe `after` method inserts content after the closing tag of the element.\n\n## Syntax\n\n```js\nelement.after(content);\nelement.after(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to insert after the element's closing tag.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.after(\"World\");\n// Result: <div>Hello</div>World\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/html-rewriter/Element/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# append\n\nThe `append` method inserts content at the end of the element's content.\n\n## Syntax\n\n```js\nelement.append(content);\nelement.append(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to insert at the end of the element's content.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.append(\", World\");\n// Result: <div>Hello, World</div>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/html-rewriter/Element/prototype/before.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# before\n\nThe `before` method inserts content before the opening tag of the element.\n\n## Syntax\n\n```js\nelement.before(content);\nelement.before(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to insert before the element's opening tag.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.before(\"Well\");\n// Result: Well<div>Hello</div>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/html-rewriter/Element/prototype/hasAttribute.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# hasAttribute\n\nThe `hasAttribute` method returns a `boolean` value indicating whether the specified attribute is present on the element.\n\n## Syntax\n\n```js\nelement.hasAttribute(attributeName);\n```\n\n### Parameters\n\n- `attributeName` _: string_\n  - The name of the attribute to check for.\n\n### Return value\n\nA boolean value indicating whether the attribute is present.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/html-rewriter/Element/prototype/prepend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# prepend\n\nThe `prepend` method inserts content at the beginning of the element's content.\n\n## Syntax\n\n```js\nelement.prepend(content);\nelement.prepend(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to insert at the beginning of the element's content.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.prepend(\"Well, \");\n// Result: <div>Well, Hello</div>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/html-rewriter/Element/prototype/removeAttribute.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# removeAttribute\n\nThe `removeAttribute` method removes the specified attribute from the element.\n\n## Syntax\n\n```js\nelement.removeAttribute(attributeName);\n```\n\n### Parameters\n\n- `attributeName` _: string_\n  - The name of the attribute to remove.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/html-rewriter/Element/prototype/replaceChildren.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# replaceChildren\n\nThe `replaceChildren` method replaces the element's children with new content.\n\n## Syntax\n\n```js\nelement.replaceChildren(content);\nelement.replaceChildren(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to replace the element's children with.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.replaceChildren(\"Greetings!\");\n// Result: <div>Greetings!</div>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/html-rewriter/Element/prototype/replaceWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# replaceWith\n\nThe `replaceWith` method replaces the element with new content.\n\n## Syntax\n\n```js\nelement.replaceWith(content);\nelement.replaceWith(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to replace the element with.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.replaceWith(\"<p>Greetings!</p>\");\n// Result: <p>Greetings!</p>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/html-rewriter/Element/prototype/selector.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# selector\n\nThe `selector` read-only property is a `string` representing the [CSS selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors) that matches the element.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/html-rewriter/Element/prototype/setAttribute.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# setAttribute\n\nThe `setAttribute` method sets the value of the specified attribute on the element. If the value already exists, it will be updated; otherwise, a new attribute with the specified name and value will be added to the element.\n\n## Syntax\n\n```js\nelement.setAttribute(attributeName, value);\n```\n\n### Parameters\n\n- `attributeName` _: string_\n  - The name of the attribute to set.\n- `value` _: string_\n  - The value to assign to the attribute.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/html-rewriter/Element/prototype/tag.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# tag\n\nThe `tag` read-only property is a `string` representing the tag name of the element.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/html-rewriter/HTMLRewritingStream/HTMLRewritingStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `HTMLRewritingStream()`\n\nThe **`HTMLRewritingStream`** lets you rewrite HTML by registering callbacks on CSS selectors. When an element matching the selector is encountered, the rewriter calls your callback. This callback can manipulate the attributes of the element, and add or remove content from the immediate context.\n\n## Syntax\n\n```js\nnew HTMLRewritingStream()\n```\n\n### Return value\n\nA new `HTMLRewritingStream` object.\n\n## Examples\n\nIn this example, we fetch an HTML page and use the HTML rewriter to add an attribute to all `div` tags and prepend the text `Header:` to all `h1` tags:\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { HTMLRewritingStream } from 'fastly:html-rewriter';\n\nasync function handleRequest(event) {\n  let transformer = new HTMLRewritingStream()\n    .onElement(\"h1\", e => e.prepend(\"Header: \"))\n    .onElement(\"div\", e => e.setAttribute(\"special-attribute\", \"top-secret\"));\n  let body = (await fetch(\"https://example.com/\")).body.pipeThrough(transformer);\n\n  return new Response(body, {\n    status: 200,\n    headers: new Headers({\n      \"content-type\": \"text/html; charset=utf-8\",\n    })\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/html-rewriter/HTMLRewritingStream/prototype/onElement.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# onElement\n\n▸ **onElement**`(selector: string, handler: (element: Element) => void): this`\n\nRegisters an element handler with the [`HTMLRewritingStream`] that will be called for each [`Element`] that matches the [CSS selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors) `selector`.\n\nElements added by handlers will not be processed by other handlers.\n\n## Syntax\n\n```js\n.onElement(selector, handler)\n```\n\n### Parameters\n\n- `selector` _: string_\n  - A CSS selector that determines the elements for which `handler` will be called\n  - The following types of CSS selector are supported:\n\nCurrently the rewriter supports the following CSS selectors:\n\n| Pattern              | Description                                                                |\n|----------------------|----------------------------------------------------------------------------|\n| `*`                  | Any element                                                                |\n| `E`                  | All elements of type `E`                                                   |\n| `E F`                | `F` elements inside `E` elements                                           |\n| `E > F`              | `F` elements directly inside `E` elements                                  |\n| `E:nth-child(n)`     | The n-th child of type `E`                                                 |\n| `E:first-child`      | First child of type `E`                                                    |\n| `E:nth-of-type(n)`   | The n-th sibling of type `E`                                               |\n| `E:first-of-type`    | First sibling of type `E`                                                  |\n| `E:not(s)`           | Type `E` elements not matching selector `s`                                |\n| `E.myclass`          | Type `E` elements with class `\"myclass\"`                                   |\n| `E#myid`             | Type `E` elements with ID `\"myid\"`                                         |\n| `E[attr]`            | Type `E` elements with attribute `attr`                                    |\n| `E[attr=\"val\"]`      | Type `E` elements where `attr` is `\"val\"`                                  |\n| `E[attr=\"val\" i]`    | Type `E` elements where `attr` is `\"val\"`, case-insensitive                |\n| `E[attr=\"val\" s]`    | Type `E` elements where `attr` is `\"val\"`, case-sensitive                  |\n| `E[attr~=\"val\"]`     | Type `E` elements where `attr` contains `\"val\"` in a space-separated list  |\n| `E[attr`&#124`;=\"val\"]`| Type `E` elements where `attr` is hyphen-separated and starts with `\"val\"` |\n| `E[attr^=\"val\"]`     | Type `E` elements where `attr` starts with `\"val\"`                         |\n| `E[attr$=\"val\"]`     | Type `E` elements where `attr` ends with `\"val\"`                           |\n| `E[attr*=\"val\"]`     | Type `E` elements where `attr` contains `\"val\"`                            |\n\n- `handler` _: (element: Element) => void_\n  - A callback function that will be called once for each element that matches `selector`\n\n### Return value\n\nThe `HTMLRewritingStream`, so multiple calls to `onElement` can be chained.\n\n### Exceptions\n\n- `Error`\n  - If the provided `selector` is not a valid CSS selector.\n  - If the provided `handler` is not a function.\n\n## Examples\n\n\nIn this example, we fetch an HTML page and use the HTML rewriter to add an attribute to all `div` tags and prepend the text `Header:` to all `h1` tags:\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { HTMLRewritingStream } from 'fastly:html-rewriter';\n\nasync function handleRequest(event) {\n  let transformer = new HTMLRewritingStream()\n    .onElement(\"h1\", e => e.prepend(\"Header: \"))\n    .onElement(\"div\", e => e.setAttribute(\"special-attribute\", \"top-secret\"));\n  let body = (await fetch(\"https://example.com/\")).body.pipeThrough(transformer);\n\n  return new Response(body, {\n    status: 200,\n    headers: new Headers({\n      \"content-type\": \"text/html; charset=utf-8\",\n    })\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/image-optimizer/Auto.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Auto`\n\nEnumerator options for [`imageOptimizerOptions.auto`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `AVIF` (`\"avif\"`) If the browser's Accept header indicates compatibility, deliver an AVIF image.\n- `WEBP` (`\"webp\"`)\tIf the browser's Accept header indicates compatibility, deliver a WebP image.\n\n## Examples\n\n```js\nimport { Auto, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      auto: Auto.AVIF\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/image-optimizer/BWAlgorithm.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `BWAlgorithm`\n\nEnumerator options for [`imageOptimizerOptions.bw`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Threshold` (`\"threshold\"`) Uses a luminance threshold to convert the image to black and white.\n- `Atkinson` (`\"atkinson\"`)\tUses [Atkinson dithering](https://en.wikipedia.org/wiki/Atkinson_dithering) to convert the image to black and white.\n\n\n## Examples\n\n```js\nimport { Region, BWAlgorithm } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      bw: BWAlgorithm.Threshold\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/image-optimizer/CropMode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `CropMode`\n\nEnumerator options for [`imageOptimizerOptions.crop.mode`](./imageOptimizerOptions.mdx) and `imageOptimizerOptions.precrop.mode`.\n\n## Constants\n\n- `Smart` (`\"smart\"`) Enables content-aware algorithms to attempt to crop the image to the desired aspect ratio while intelligently focusing on the most important visual content, including the detection of faces.\n- `Safe` (`\"safe\"`)\tAllow cropping out-of-bounds regions.\n\n## Examples\n\n```js\nimport { CropMode, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      crop: {\n        size: { ratio: { width: 4, height: 3 } },\n        mode: CropMode.Smart,\n      }\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/image-optimizer/Disable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Disable`\n\nEnumerator options for [`imageOptimizerOptions.disable`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Upscale` (`\"upscale\"`) Prevent images being resized such that the output image's dimensions are larger than the source image.\n\n## Examples\n\n```js\nimport { Disable, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      width: 2560,\n      disable: Disable.Upscale\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/image-optimizer/Enable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Enable`\n\nEnumerator options for [`imageOptimizerOptions.enable`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Upscale` (`\"upscale\"`) Allow images to be resized such that the output image's dimensions are larger than the source image.\n\n## Examples\n\n```js\nimport { Enable, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      width: 2560,\n      enable: Enable.Upscale\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/image-optimizer/Fit.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Fit`\n\nEnumerator options for [`imageOptimizerOptions.fit`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Bounds` (`\"bounds\"`) Resize the image to fit entirely within the specified region, making one dimension smaller if needed.\n- `Cover` (`\"cover\"`) Resize the image to entirely cover the specified region, making one dimension larger if needed.\n- `Crop` (`\"crop\"`) Resize and crop the image centrally to exactly fit the specified region.\n\n## Examples\n\n```js\nimport { Fit, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      width: 150,\n      height; 150,\n      fit: Fit.Bounds\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/image-optimizer/Format.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Format`\n\nEnumerator options for [`imageOptimizerOptions.format`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Auto` (`\"auto\"`) Automatically use the best format based on browser support and image/transform characteristics\n- `AVIF` (`\"avif\"`) AVIF\n- `BJPG` (`\"bjpg\"`) Baseline JPEG \n- `GIF` (`\"gif\"`) Graphics Interchange Format\n- `JPG` (`\"jpg\"`) JPEG \n- `JXL` (`\"jxl\"`) JPEGXL \n- `MP4` (`\"mp4\"`) MP4 (H.264)\n- `PJPG` (`\"pjpg\"`) Progressive JPEG \n- `PJXL` (`\"pjxl\"`) Progressive JPEGXL\n- `PNG` (`\"png\"`) Portable Network Graphics\n- `PNG8` (`\"png8\"`) Portable Network Graphics palette image with 256 colors and 8-bit transparency\n- `SVG` (`\"svg\"`) Scalable Vector Graphics\n- `WEBP` (`\"webp\"`) WebP\n- `WEBPLL` (`\"webpll\"`) WebP (Lossless)\n- `WEBPLY` (`\"webply\"`) WebP (Lossy)\n\n## Examples\n\n```js\nimport { Format, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      format: Format.PNG\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/image-optimizer/Metadata.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Metadata`\n\nEnumerator options for [`imageOptimizerOptions.metadata`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Copyright` (`\"copyright\"`) Preserve [copyright notice](https://www.iptc.org/std/photometadata/specification/IPTC-PhotoMetadata#copyright-notice), creator, credit line, licensor, and web statement of rights fields.\n- `C2PA` (`\"c2pa\"`) Preserve the [C2PA manifest](https://c2pa.org/) and add any transformations performed by Fastly Image Optimizer.\n- `CopyRightAndC2PA` (`\"copyright,c2pa\"`) Resize and crop the image centrally to exactly fit the specified region.\n\n## Examples\n\n```js\nimport { Metadata, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      metadata: Metadata.Copyright\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/image-optimizer/Optimize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Optimize`\n\nEnumerator options for [`imageOptimizerOptions.optimize`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Low` (`\"low\"`) Output image quality will be similar to the input image quality.\n- `Medium` (`\"medium\"`) More optimization is allowed. We attempt to preserve the visual quality of the input image.\n- `High` (`\"high\"`) Minor visual artifacts may be visible. This produces the smallest file.\n\n## Examples\n\n```js\nimport { Optimize, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      optimize: Optimize.High\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/image-optimizer/Orient.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Orient`\n\nEnumerator options for [`imageOptimizerOptions.orient`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Default` (`\"1\"`) \n- `FlipHorizontal` (`\"2\"`) \n- `FlipHorizontalAndVertical` (`\"3\"`) \n- `FlipVertical` (`\"4\"`) \n- `FlipHorizontalOrientLeft` (`\"5\"`) \n- `OrientRight` (`\"6\"`) \n- `FlipHorizontalOrientRight` (`\"7\"`) \n- `OrientLeft` (`\"8\"`) \n\n## Examples\n\n```js\nimport { Orient, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      orient: Orient.FlipHorizontal\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/image-optimizer/Profile.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Profile`\n\nEnumerator options for [`imageOptimizerOptions.profile`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Baseline` (`\"baseline\"`) The profile recommended for video conferencing and mobile applications. (Default)\n- `Main` (`\"main\"`) The profile recommended for standard-definition broadcasts.\n- `High` (`\"high\"`) The profile recommended for high-definition broadcasts.\n\n## Examples\n\n```js\nimport { Profile, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      profile: Profile.Main\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/image-optimizer/Region.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Region`\n\nEnumerator options for [`imageOptimizerOptions.region`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `UsEast` (`\"us_east\"`)\n- `UsCentral` (`\"us_central\"`)\n- `UsWest` (`\"us_west\"`)\n- `EuCentral` (`\"eu_central\"`)\n- `EuWest` (`\"eu_west\"`)\n- `Asia` (`\"asia\"`)\n- `Australia` (`\"australia\"`)\n\n\n## Examples\n\n```js\nimport { Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/image-optimizer/ResizeFilter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `ResizeFilter`\n\nEnumerator options for [`imageOptimizerOptions.resizeFilter`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Nearest` (`\"nearest\"`) Uses the value of nearby translated pixel values.\n- `Bilinear` (`\"bilinear\"`) Uses an average of a 2x2 environment of pixels.\n- `Linear` (`\"linear\"`) Same as `Bilenear`.\n- `Bicubic` (`\"bicubic\"`) Uses an average of a 4x4 environment of pixels, weighing the innermost pixels higher.\n- `Cubic` (`\"cubic\"`) Same as `Bicubic`.\n- `Lanczos2` (`\"lanczos2\"`) Uses the Lanczos filter to increase the ability to detect edges and linear features within an image and uses sinc resampling to provide the best possible reconstruction.\n- `Lanczos3` (`\"lanczos3\"`) Lanczos3 uses a better approximation of the sinc resampling function. (Default)\n- `Lanczos` (`\"lanczos\"`) Same as `Lanczos3`.\n\n## Examples\n\n```js\nimport { ResizeFilter, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      width: 2560,\n      resizeFilter: ResizeFilter.Linear\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/image-optimizer/imageOptimizerOptions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `imageOptimizerOptions` \n\nOptions specified in the [`Request`](../globals/Request/Request.mdx) constructor for running the [Fastly Image Optimizer](https://docs.fastly.com/products/image-optimizer). More detailed documentation on all Image Optimizer options is available in the [Image Optimizer reference docs](https://www.fastly.com/documentation/reference/io/).\n\n## Parameters\n\nAll parameters other than `region` are optional.\n\n- `region`: _[`Region`](./Region.mdx)_ Where image optimizations should occur.\n- `auto`: _[`Auto`](./Auto.mdx)_ Enable optimization features automatically.\n- `bgColor`: _[`Color`](#color)_ Set the background color of an image.\n- `blur`: _`number` (0.5-1000) or [`Percentage`](#percentage)_ Set the blurriness of the output image.\n- `brightness`: _`number` (-100-100)_ Set the brightness of the output image.\n- `bw`: _[`BWAlgorithm`](./BWAlgorithm.mdx)_ Convert an image to black and white.\n- `canvas`: _`Object`_ Increase the size of the canvas around an image.\n    - `size`: _[`Size`](#size)_\n    - `position` (optional): _[`Position`](#position)_\n- `contrast`: _`number` (-100-100)_ Set the contrast of the output image.\n- `crop`: _`Object`_ Remove pixels from an image.\n    - `size`: _[`Size`](#size)_\n    - `position` (optional): _[`Position`](#position)_\n    - `mode` (optional): _[`CropMode`](./CropMode.mdx)_\n- `disable`: _[`Disable`](./Disable.mdx)_ Disable functionality that is enabled by default.\n- `dpr`: `number` Ratio between physical pixels and logical pixels.\n- `enable`: _[`Enable`](./Enable.mdx)_ Enable functionality that is disabled by default.\n- `fit`: _[`Fit`](./Fit.mdx)_ Set how the image will fit within the size bounds provided.\n- `format`: _[`Format`](./Format.mdx)_ Specify the output format to convert the image to.\n- `frame`: _`number` (must have the value 1)_ Extract the first frame from an animated image sequence.\n- `height`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ Resize the height of the image.\n- `level`: _`String` containing one of the [allowed values](https://www.fastly.com/documentation/reference/io/level/#allowed-values)_ Specify the level constraints when converting to video.\n- `metadata`: _[`Metadata`](./Metadata.mdx)_ Control which metadata fields are preserved during transformation.\n- `optimize`: _[`Optimize`](./Optimize.mdx)_ Automatically apply optimal quality compression.\n- `orient`: _[`Orient`](./Orient.mdx)_ Change the cardinal orientation of the image.\n- `pad`: _[`Sides`](#sides)_ Add pixels to the edge of an image.\n- `precrop`: _`Object`_ Remove pixels from an image before any other transformations occur.\n    - `size`: _[`Size`](#size)_\n    - `position`: _[`Position`](#position)_\n    - `mode`: _[`CropMode`](./CropMode.mdx)_\n- `profile`: _[`Profile`](./Profile.mdx)_ Specify the profile class of application when converting to video.\n- `quality`: _`integer` (1-100)_ Optimize the image to the given compression level for lossy file formatted images.\n- `resizeFilter`: _[`ResizeFilter`](./ResizeFilter.mdx)_ Specify the resize filter used when resizing images.\n- `saturation`: _`number` (-100-100)_ Set the saturation of the output image.\n- `sharpen`: _`Object`_ Set the sharpness of the output image.\n    - `amount`: _`number` (0-10)_\n    - `radius`: _`number` (0.5-1000)_\n    - `threshold`: _`integer` (0-255)_\n- `trim`: _[`Sides`](#sides)_ Remove pixels from the edge of an image.\n- `viewbox`: _`number` (must have the value 1)_ Remove explicit width and height properties in SVG output.\n- `width`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ Resize the width of the image.\n\n## Types\n\n### Color\n\nEither:\n\n- a 3 or 6 character hexadecimal string\n- an `Object` containing:\n    - `r`: _`integer` (0-255)_ Red component\n    - `g`: _`integer` (0-255)_ Green component\n    - `b`: _`integer` (0-255)_ Blue component\n    - `a` (optional): _`number` (0.0-1.0)_ Alpha component \n\n### Percentage\n\nA `String` containing a number suffixed with a percent sign (%).\n\n### Position\n\nAn `Object` containing:\n\n- Exactly one of:\n    - `x`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ \n    - `offsetX`: _`number` (interpreted as a percentage)_\n- Exactly one of: \n    - `y`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ \n    - `offsetY`: _`number` (interpreted as a percentage)_\n\n### Sides\n\nAn `Object` containing `top`, `bottom`, `left`, and `right`, all of which are either an `integer` or [`Percentage`](#percentage).\n\n### Size\n\nAn `Object` containing either:\n\n- `absolute`: _`Object`_\n    - `width`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ \n    - `height`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ \n- `ratio`: _`Object`_\n    - `width`: _`number`_\n    - `height`: _`number`_\n\n## Examples\n\n```js\nimport { Format, Orient, CropMode, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      format: Format.PNG,\n      bgColor: {\n        'r': 100,\n        'g': 255,\n        'b': 9,\n        'a': 0.5\n      },\n      blur: '1%',\n      brightness: -20,\n      contrast: -20,\n      height: 600,\n      level: '4.0',\n      orient: Orient.FlipVertical,\n      saturation: 80,\n      sharpen: { 'amount': 5, 'radius': 6, 'threshold': 44 },\n      canvas: { 'size': { 'absolute': { 'width': 400, 'height': 400 } } },\n      crop: { size: { absolute: { width: 200, height: 200 }, mode: CropMode.Safe } },\n      trim: { top: 10, left: 10, right: 10, bottom: 10 },\n      pad: { top: 30, left: 30, right: \"1%\", bottom: 30 }\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/index.mdx",
    "content": "---\nsidebar_position: 1\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n\n# JavaScript for Fastly Compute\n\nThis site is the full SDK reference for [`@fastly/js-compute`](https://www.npmjs.com/package/%40fastly/js-compute), the module that provides the interface between your JavaScript code and the [Fastly Compute](https://www.fastly.com) platform.\n\nIf you haven't used Fastly Compute before, start by [setting up your first Fastly Compute program](https://developer.fastly.com/learning/compute/) over on **developer.fastly.com** so that you have a working development environment.\n\nTo learn more about the fundamentals of using JavaScript with Fastly Compute, see our [using JavaScript](https://developer.fastly.com/learning/compute/javascript/) guide.\n\n## Understanding the JavaScript SDK\n\nIncoming HTTP requests to [domains that are attached to your Fastly service](https://developer.fastly.com/learning/concepts/) will start an instance of your application and invoke a `fetch` event, which can be bound using the `addEventListener` function:\n\n```js\naddEventListener(\"fetch\", event => event.respondWith(handleRequest(event)) );\n\nasync function handleRequest(event) {\n  const req = event.request;\n\n  return fetch(req, {\n    backend: \"example_backend\"\n  });\n}\n```\n\nFastly specific features are available as named imports from `fastly:` prefixed modules, all of which are documented in this site.  For example, the [env](https://js-compute-reference-docs.edgecompute.app/docs/fastly:env/env) function provides access to [environment variables](https://developer.fastly.com/reference/compute/ecp-env/) and can be imported into your application like this:\n\n```js\nimport { env } from \"fastly:env\"\n```\n\nJavaScript code compiled for Fastly Compute has access to a global environment with most of the globals you would expect in an ECMAScript runtime, like [`Date`](https://js-compute-reference-docs.edgecompute.app/docs/globals/Date/) and [`console`](https://js-compute-reference-docs.edgecompute.app/docs/globals/console/log).\n\n## Trying things out\n\n[Fastly fiddle](https://fiddle.fastly.dev) is an online web-based playground where you can run Fastly code.  You'll see fiddles included in many pages of our [developer hub](https://developer.fastly.com) and this SDK reference. These interactive examples can be executed right on the page by clicking the **RUN** tab:\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nasync function app(event) {\n    const request = event.request;\n    return new Response(\"You made a request to \" + request.url)\n}\naddEventListener(\"fetch\", event => {\n  event.respondWith(app(event));\n});\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nasync function app(event) {\n    const request = event.request;\n    return new Response(`You made a request to ${request.url}`)\n}\n\naddEventListener(\"fetch\", event => {\n  event.respondWith(app(event));\n});\n\n```\n\n</Fiddle>\n\nCheck out [`fiddle.fastly.dev`](https://fiddle.fastly.dev) to create your own.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/kv-store/KVStore/KVStore.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `KVStore()`\n\nThe **`KVStore` constructor** lets you connect your Fastly Compute application to a Fastly KV store.\n\nA Fastly KV store is a persistent, globally consistent key-value store. See [Data stores for Fastly services](https://developer.fastly.com/learning/concepts/edge-state/data-stores#kv-stores) for initialization and usage details.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew KVStore(name)\n```\n\n> **Note:** `KVStore()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Define a KV store instance using the resource link name.\n  \n### Return value\n\nA new `KVStore` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no KV Store exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name does not start with an ascii alphabetical character \n  - Thrown if the provided name contains control characters `(\\u0000-\\u001F)`\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then read back the value and return it to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/kv-store/KVStore/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# KVStore.prototype.delete\n\nDeletes the value associated with the key `key` in the KV store.\n\n## Syntax\n\n```js\ndelete(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the KV-store.\n\n### Return value\n\nReturns `undefined`\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is any of the strings `\"\"`, `\".\"`, or `\"..\"`\n    - Starts with the string `\".well-known/acme-challenge/\"`\n    - Contains any of the characters `\"#;?^|\\n\\r\"`\n    - Is longer than 1024 characters\n    - Does not exist\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then delete the entry.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n  await files.delete('hello')\n\n  const entry = await files.get('hello')\n  if (entry) {\n    return new Response(await entry.text())\n  } else {\n    return new Response('no file named hello exists')\n  }\n\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/kv-store/KVStore/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# KVStore.prototype.get\n\n▸ **get**(): `string`\n\nGets the value associated with the key `key` in the KV store.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the KV-store.\n\n### Return value\n\nIf the key does not exist in the KV store, this returns a `Promise` which resolves with `null`.\n\nIf the key does exist in the KV store, this returns a `Promise` which resolves with an `KVStoreEntry`.\n\n## Description\n\nSend the given message, converted to a string, to this KVStore instance's endpoint.\n\nThe `get()` method requires its `this` value to be a [`KVStore`](../KVStore.mdx) object.\n\nIf the `this` value does not inherit from `KVStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is any of the strings `\"\"`, `\".\"`, or `\"..\"`\n    - Starts with the string `\".well-known/acme-challenge/\"`\n    - Contains any of the characters `\"#;?^|\\n\\r\"`\n    - Is longer than 1024 characters\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then read back the value and return it to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/kv-store/KVStore/prototype/list.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStore.prototype.list\n\nThe **`list()`** can be used to list the keys of a store.\n\n## Syntax\n\n```js\nlist(options?)\n```\n\n### Parameters\n\n- `options` _: object_ _**optional**_\n  - List options supporting properties:\n  - `cursor` _: string_ _**optional**_\n    - The cursor used to pick up from a previous iteration.\n  - `limit` _: number_ _**optional**_\n    - The maximum number of keys to return.\n  - `prefix` _: string_ _**optional**_\n    - List only those keys that start with the given string prefix.\n  - `noSync` _: boolean_ _**optional**_\n    - Do not sync the key list first, instead provide a possibly out-of-date listing. May be faster but inconsistent.\n\n### Return value\n\nReturns a `Promise` which resolves with `{ list: string[], cursor: string | undefined }`.\n\n## Example\n\nIn this example we list the keys of a KV Store named `'files'`, iterating 10 at a time, counting the total;\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from 'fastly:kv-store';\n\nasync function app(event) {\n  const files = new KVStore('files');\n\n  let cursor,\n    list,\n    total = 0;\n  do {\n    ({ cursor, list } = await files.list({ limit: 10, cursor }));\n    total += list?.length;\n  } while (list);\n\n  return new Response(`Iterated ${total} entries`);\n}\n\naddEventListener('fetch', (event) => event.respondWith(app(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/kv-store/KVStore/prototype/put.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# KVStore.prototype.put\n\nThe **`put()`** method stores a `value` into the KV store under a `key`.\n\n> **Note**: KV stores are eventually consistent, this means that the updated contents associated with the key `key` may not be available to read from all edge locations immediately and some edge locations may continue returning the previous contents associated with the key.\n\n## Syntax\n\n```js\nput(key, value, options?)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to store the supplied value under within the KV store.\n- `value` _:  ArrayBuffer | TypedArray | DataView| ReadableStream | URLSearchParams | String | string literal_\n  - The value to store within the KV store.\n- `options` _: object_ _**optional**_\n  - An insert options parameter, supporting:\n  - `metadata` _: ArrayBuffer | TypedArray | DataView_ _**optional**_\n    - Binary metadata associated with the entry, may be up to 1000 bytes.\n  - `ttl` _: number_ _**optional**_\n    - TTL for the entry\n  - `mode` _: 'overwrite' | 'add' | 'append' | 'prepend'_ _**optional**_\n    - Insert mode, defaults to 'overwrite'\n  - `gen` _: number_ _**optional**_\n    - 'generation' header specific to the version of an entry key\n\n### Return value\n\nReturns a `Promise` which resolves with `undefined` when the provided `value` has been written into the KV store.\n\n## Description\n\nStores the supplied `value` into the KV store under the supplied `key`.\n\nThe `put()` method requires its `this` value to be a [`KVStore`](../KVStore.mdx) object.\n\nIf the `this` value does not inherit from `KVStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is any of the strings `\"\"`, `\".\"`, or `\"..\"`\n    - Starts with the string `\".well-known/acme-challenge/\"`\n    - Contains any of the characters `\"#;?^|\\n\\r\"`\n    - Is longer than 1024 characters\n- `TypeError`\n  - If the provided `gen`:\n    - Is not an number\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then read back the value and return it to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/kv-store/KVStoreEntry/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.arrayBuffer()\n\nThe `arrayBuffer()` method of the `KVStoreEntry` interface takes a `KVStoreEntry` stream and reads it to completion. It returns a promise that resolves with an `ArrayBuffer`.\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an `ArrayBuffer`."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/kv-store/KVStoreEntry/prototype/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.body\n\nThe `body` read-only property of the `KVStoreEntry` interface is a `ReadableStream` of the body contents.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/kv-store/KVStoreEntry/prototype/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.bodyUsed\n\nThe `bodyUsed` read-only property of the `KVStoreEntry` interface is a `boolean` value that indicates whether the body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/kv-store/KVStoreEntry/prototype/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.json()\n\nThe `json()` method of the `KVStoreEntry` interface takes a `KVStoreEntry` stream and reads it to completion. It returns a promise which resolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a JavaScript object. This object could be anything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/kv-store/KVStoreEntry/prototype/metadata.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.metadata()\n\nThe `metadata()` method of the `KVStoreEntry` interface provides the binary metadata associated with the `KVStoreEntry`.\n\nThe metadata binary may be up to 1000 bytes, and is returned as a `Uint8Array` TypedArray buffer, if metadata is set, or null otherwise.\n\n## Syntax\n\n```js\nmetadata()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a `Uint8Array` buffer object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/kv-store/KVStoreEntry/prototype/metadataText.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.metadataText()\n\nThe `metadataText()` method of the `KVStoreEntry` interface provides a String interpretation of binary metadata associated with the `KVStoreEntry`.\n\nIf the binary data is not a valid string, an encoding error will be thrown.\n\n## Syntax\n\n```js\nmetadataText()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a String.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/kv-store/KVStoreEntry/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.text()\n\nThe `text()` method of the `KVStoreEntry` interface takes a `KVStoreEntry` stream and reads it to completion. It returns a promise that resolves with a `String`. The `KVStoreEntry `is always decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a `String`."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/logger/Logger/Logger.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Logger()`\n\nThe **`Logger` constructor** lets you connect your Fastly Compute application to a [Fastly Named Logger](https://developer.fastly.com/learning/integrations/logging/).\n\n## Syntax\n\n```js\nnew Logger(name)\n```\n\n> **Note:** `Logger()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - The Fastly Logger which should be associated with this Logger instance\n\n### Return value\n\nA new `Logger` object.\n\n## Examples\n\nIn this example we have a create a logger named `\"splunk\"` and logs the incoming request method and destination.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Logger Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^3\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nasync function app (event) {\n  let logger = new Logger(\"splunk\");\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nconst logger = new Logger(\"splunk\");\nasync function app (event) {\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/logger/Logger/prototype/log.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Logger.prototype.log\n\n▸ **log**(): `string`\n\nSends the given message, converted to a string, to this Logger instance's endpoint.\n\n**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nlog(message)\n```\n\n### Return value\n\n`undefined`.\n\n## Description\n\nSend the given message, converted to a string, to this Logger instance's endpoint.\n\nThe `log()` method requires its `this` value to be a [`Logger`](../Logger.mdx) object.\n\nIf the `this` value does not inherit from `Logger.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n## Examples\n\nIn this example we have a create a logger named `\"splunk\"` and logs the incoming request method and destination.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Logger.prototype.log Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^3\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nlet logger = new Logger(\"splunk\");\nasync function app (event) {\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nasync function app (event) {\n  let logger = new Logger(\"splunk\");\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/logger/configureConsole.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# configureConsole\n\nThe **`configureConsole()`** function allows configuring the behaviour of the `console` global JS logger.\n\n## Syntax\n\n```js\nconfigureConsole(loggingOptions)\n```\n\n### Parameters\n\n- `loggingOptions` _: object_\n  - \n  - The name has to be between 1 and 254 characters inclusive.\n  - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n\n## Examples\n\nIn this example, we disable prefixing for `console.log` and use `stderr` output for `console.error`:\n\n```js\nimport { configureConsole } from \"fastly:logger\";\n\nconfigureConsole({\n  prefixing: false,\n  stderr: true\n});\n\nasync function handleRequest(event) {\n  console.log(JSON.stringify(event.request.headers));\n  const url = new URL(event.request.url);\n  try {\n    validate(url);\n  } catch (e) {\n    console.error(`Validation error: ${e}`);\n    return new Response('Bad Request', { status: 400 });\n  }\n  return new Response('OK');\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/migration-guide/index.mdx",
    "content": "---\nsidebar_position: 1\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Migrating from v2 to v3`\n\n## SimpleCache.delete renamed to SimpleCache.purge and requires purge options to be supplied as the second parameter\n\nWe are renaming because \"purge\" is already a well-known and documented concept for removing content from Fastly's cache.\n\nThe new addition of a second argument allows the caller to decide what scope to purge the content from, currently they can choose to purge from all of Fastly (\"global\") or from the POP that contains the currently executing instance (\"pop\"). We do not provide a default option right now, in the future we may provide a default option, if we discover a common pattern is being used.\n\nHere is an example of migrating an application using `SimpleCache.delete` to `SimpleCache.purge` with the same purging behaviour:\n```diff\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const url = new URL(event.request);\n  const path = url.pathname;\n  if (url.searchParams.has('delete')) {\n-    SimpleCache.delete(path);\n+    SimpleCache.purge(path, { scope: \"global\" });\n    return new Response(page, { status: 204 });\n  }\n\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n\n```\n\n\n# `Migrating from v1 to v2`\n\n## ObjectStore renamed to KVStore\n\nWe have renamed the `ObjectStore` class to `KVStore`, and the module name from `fastly:object-store` to `fastly:kv-store`.\n\nYou will need to update your code to use the new class name and module name.\n\nBelow is the change that would need to be made for the imported module name:\n```diff\n- import { ObjectStore } from 'fastly:object-store';\n+ import { KVStore } from 'fastly:kv-store';\n```\n\nAnd this is the change that would need to be made for constructing an instance of the class:\n```diff\n- const store = new ObjectStore('my-store');\n+ const store = new KVStore('my-store');\n```\n\n\nHere is a full example of migrating an application from ObjectStore to KVStore:\n```diff\n/// <reference types=\"@fastly/js-compute\" />\n\n- import { ObjectStore } from 'fastly:object-store';\n+ import { KVStore } from 'fastly:kv-store';\n\nasync function app(event) {\n-   const files = new ObjectStore('files');\n+   const files = new KVStore('files');\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/secret-store/SecretStore/SecretStore.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `SecretStore()`\n\nThe **`SecretStore` constructor** lets you connect your Fastly Compute application to a Fastly Secret store.\n\nA secret store is a persistent, globally distributed store for secrets accessible to Fastly Compute services during request processing.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew SecretStore(name)\n```\n\n> **Note:** `SecretStore()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Define a Secret Store instance using the resource link name.\n  \n### Return value\n\nA new `SecretStore` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Secret Store exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name contains characters other than letters, numbers, dashes (-), underscores (_), and periods (.)\n\n## Examples\n\nIn this example we connect to a Secret Store named `'secrets'` and retrieve a secret named `'cat-api-key'` use the value in a Request header.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SecretStore } from \"fastly:secret-store\";\n\nasync function app(event) {\n  const secrets = new SecretStore('secrets')\n\n  const catApiKey = await secrets.get('cat-api-key')\n\n  return fetch('/api/cat', {\n    headers: {\n      'cat-api-key': catApiKey.plaintext()\n    }\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/secret-store/SecretStore/fromBytes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# fromBytes\n\nThe **`fromBytes()`** function is used to create an in-memory secret from an array buffer.\n\n>**Note**: This API should be avoided when possible, by instead using [SecretStore.prototype.get](./prototype/get.mdx) to obtain secure secrets.\n\n## Syntax\n\n```js\nfromBytes(new Uint8Array([1, 2, 3]))\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns a `SecretStoreEntry`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/secret-store/SecretStore/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SecretStore.prototype.get\n\n▸ **get**(): `string`\n\nGets the value associated with the key `key` in the Secret store.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the Secret Store.\n\n### Return value\n\nIf the key does not exist in the Secret Store, this returns a `Promise` which resolves with `null`.\n\nIf the key does exist in the Secret Store, this returns a `Promise` which resolves with an `SecretStoreEntry`.\n\n## Description\n\nSend the given message, converted to a string, to this SecretStore instance's endpoint.\n\nThe `get()` method requires its `this` value to be a [`SecretStore`](../SecretStore.mdx) object.\n\nIf the `this` value does not inherit from `SecretStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Is longer than 255 characters\n    - Contains characters other than letters, numbers, dashes (-), underscores (_), and periods (.)\n\n## Examples\n\nIn this example we connect to a Secret Store named `'secrets'` and retrieve a secret named `'cat-api-key'` use the value in a Request header.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SecretStore } from \"fastly:secret-store\";\n\nasync function app(event) {\n  const secrets = new SecretStore('secrets')\n\n  const catApiKey = await secrets.get('cat-api-key')\n\n  return fetch('/api/cat', {\n    headers: {\n      'cat-api-key': catApiKey.plaintext()\n    }\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/secret-store/SecretStoreEntry/prototype/plaintext.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SecretStoreEntry.prototype.plaintext\n\n▸ **plaintext**(): `string`\n\nReturns the plaintext contents of the SecretStoreEntry instance as String.\n\n## Syntax\n\n```js\nplaintext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA String\n\n### Exceptions\n\nThe `plaintext()` method requires its `this` value to be a `SecretStoreEntry` object.\nIf the `this` value does not inherit from `SecretStoreEntry.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n## Examples\n\nIn this example we connect to a Secret Store named `'secrets'` and retrieve a secret named `'cat-api-key'` use the value in a Request header.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SecretStore } from \"fastly:secret-store\";\n\nasync function app(event) {\n  const secrets = new SecretStore('secrets')\n\n  const catApiKey = await secrets.get('cat-api-key')\n\n  return fetch('/api/cat', {\n    headers: {\n      'cat-api-key': catApiKey.plaintext()\n    }\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/secret-store/SecretStoreEntry/prototype/rawBytes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SecretStoreEntry.prototype.rawBytes\n\n▸ **rawBytes**(): `Uint8Array`\n\nReturns the raw byte contents of the SecretStoreEntry instance as a Uint8Array.\n\n## Syntax\n\n```js\nrawBytes()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Uint8Array\n\n### Exceptions\n\nThe `rawBytes()` method requires its `this` value to be a `SecretStoreEntry` object.\nIf the `this` value does not inherit from `SecretStoreEntry.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/security/inspect.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# inspect\n\nThe **`inspect()`** function inspects a request using the [Fastly Next-Gen WAF](https://docs.fastly.com/en/ngwaf/).\n\n## Syntax\n\n```js\ninspect(request, config);\n```\n\n### Parameters\n\n- `request` _: Request_\n  - The Request to get a WAF determination for.\n- `config` _: object_\n  - `corp` _: string_\n    - Set a corp name for the configuration.\n    - This parameter is currently required.\n  - `workspace` _: string_\n    - Set a workspace name for the configuration.\n    - This parameter is currently required.\n  - `overrideClientIp` _: string_\n    - Specify an explicit client IP address to inspect.\n    - By default, `inspect` will use the IP address that made the request to the\n      running Compute service, but you may want to use a different IP when\n      service chaining or if requests are proxied from outside of Fastly’s\n      network.\n\n### Return value\n\nReturns an `Object` with the `inspect` response, with the following fields:\n\n- `waf_response` _: number_\n  - Security status code.\n  \n- `redirect_url` _: string | null_\n  - A redirect URL returned from Security.\n\n- `tags` _: string[]_\n  - Tags returned by Security.\n\n- `verdict` _: string_\n  - The outcome of inspecting a request with Security. It can be one of the following:\n    - `\"allow\"`\n      - Security indicated that this request is allowed.\n    - `\"block\"`\n      - Security indicated that this request should be blocked.\n    - `\"unauthorized\"`\n      - Security indicated that this service is not authorized to inspect a request.\n    - Other verdicts may be returned but not currently documented.\n\n- `decision_ms` _: number_\n  - How long Security spent determining its verdict, in milliseconds.\n  \n## Examples\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { inspect } from \"fastly:security\";\n\nasync function app(event) {\n  const res = inspect(event.request, {\n    corp: \"mycorp\",\n    workspace: \"myws\"\n  });\n  switch (res.verdict) {\n    case \"allow\":\n      return await fetch(event.request);\n    case \"block\":\n      return new Response(\"Request Blocked\", { status: 400 });\n    case \"unauthorized\":\n      return new Response(\"Unauthorized\", { status: 401 });\n    default:\n      return new Response(\"idk\", { status: 500 });\n  }\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/shielding/Shield/Shield.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `Shield()`\n\nLoad information about the given shield.\n\nReturns an object representing the shield if it is active, or throws an exception if the string is malformed or the shield doesn’t exist.\n\nShield names are defined on [this webpage](https://www.fastly.com/documentation/guides/concepts/shielding/#shield-locations), in the “shield code” column. For example, the string “pdx-or-us” will look up our Portland, OR, USA shield site, while “paris-fr” will look up our Paris site.\n\nIf you are using a major cloud provider for your primary origin site, consider looking at the “Recommended for” column, to find the Fastly POP most closely located to the given cloud provider.\n\n## Syntax\n\n```js\nnew Shield(name)\n```\n\n> **Note:** `Shield()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Shield exists with the provided name\n\n## Examples\n\nIn this example, we create a Shield instance for the Sydney, Australia shield POP. If the code is running on that shield POP, it fetches directly from origin. Otherwise, it routes the request through the shield using an encrypted connection.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n    \nimport { Shield } from \"fastly:shielding\";\n\nasync function app(event) {\n    const shield = new Shield('wsi-australia-au');\n    // If running on the shield POP, fetch from the origin directly\n    if (shield.runningOn()) {\n        return await fetch('https://http-me.fastly.com/anything', { backend: 'httpme' });\n    }\n    // Otherwise, route the request through the shield using an encrypted connection\n    return await fetch(event.request, { backend: shield.encryptedBackend() });\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/shielding/Shield/prototype/encryptedBackend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Shield.prototype.encryptedBackend\n\n▸ **encryptedBackend**(configuration?): `Backend`\n\nReturns a `Backend` representing an encrypted connection to the POP.\n\nFor reference, this is almost always the backend that you want to use. Only use [`Shield::unencryptedBackend`](./unencryptedBackend.mdx) in situations in which you are 100% sure that all the data you will send and receive over the backend is already encrypted.\n\n## Parameters\n\n- `configuration` _: object_ _**optional**_\n  - `firstByteTimeout` _: number_ _**optional**_\n    - An optional first byte timeout (in milliseconds) to set on the returned backend.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/shielding/Shield/prototype/runningOn.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Shield.prototype.runningOn\n\n▸ **runningOn**(): `boolean`\n\nReturns whether we are currently operating on the given shield.\n\nTechnically, this may also return true in very isolated incidents in which Fastly is routing traffic from the target shield POP to the POP that this code is running on, but in these situations the results should be approximately identical.\n\n(For example, it may be the case that you are asking to shield to ‘pdx-or-us’. But, for load balancing, performance, or other reasons, Fastly is temporarily shifting shielding traffic from Portland to Seattle. In that case, this function may return true for hosts running on ‘bfi-wa-us’, our Seattle site, because effectively the shield has moved to that location. This should give you a slightly faster experience than the alternative, in which this function would return false, you would try to forward your traffic to the Portland site, and then that traffic would be caught and redirected back to Seattle.)\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/shielding/Shield/prototype/unencryptedBackend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Shield.prototype.unencryptedBackend\n\n▸ **unencryptedBackend**(configuration?): `Backend`\n\nReturns a `Backend` representing an unencrypted connection to the POP.\n\nGenerally speaking, we encourage users to use [`Shield::encryptedBackend`](./encryptedBackend.mdx) instead of this function. Data sent over this backend – the unencrypted version – will be sent over the open internet, with no protections. In most cases, this is not what you want. However, in some cases – such as when you want to ship large data blobs that you know are already encrypted — using these backends can prevent a double-encryption performance penalty.\n\n## Parameters\n\n- `configuration` _: object_ _**optional**_\n  - `firstByteTimeout` _: number_ _**optional**_\n    - An optional first byte timeout (in milliseconds) to set on the returned backend."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.0/websocket/createWebsocketHandoff.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# createWebsocketHandoff\n\nThe **`createWebsocketHandoff()`** function creates a Response instance which informs Fastly to pass the original Request through Websocket, to the declared backend.\n\n## Syntax\n\n```js\ncreateWebsocketHandoff(request, backend)\n```\n\n### Parameters\n\n- `request` _: Request_\n  - The request to pass through Websocket.\n- `backend` _: string_\n  - The name of the backend that Websocket should send the request to.\n  - The name has to be between 1 and 254 characters inclusive.\n  - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n\n### Return value\n\nA Response instance is returned, which can then be used via `event.respondWith`.\n\n## Examples\n\nIn this example application requests to the path `/stream` and sent handled via Websocket.\n\n```js\nimport { createWebsocketHandoff } from \"fastly:websocket\";\n\nasync function handleRequest(event) {\n  try {\n    const url = new URL(event.request.url);\n    if (url.pathname === '/stream') {\n      return createWebsocketHandoff(event.request, 'websocket_backend');\n    } else {\n      return new Response('oopsie, make a request to /stream for some websocket goodies', { status: 404 });\n    }\n  } catch (error) {\n    console.error({error});\n    return new Response(error.message, {status:500})\n  }\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/acl/Acl/open.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Acl.open()\n\nOpens the ACL with the given name, returning a new `Acl` instance with the given name on success.\n\n## Syntax\n\n```js\nAcl.open(name)\n```\n\n### Return value\n\nAn `Acl` instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/acl/Acl/prototype/lookup.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Acl.prototype.lookup()\n\nThe **`lookup(ipAddress)`** method returns the name associated with the `Acl` instance.\n\n## Syntax\n\n```js\nacl.lookup(ipAddress)\n```\n\n### Parameters\n\n- `ipAddress` _: string_\n  - IPv4 or IPv6 address to lookup\n\n### Return value\n\nAn Object of the form `{ action: 'ALLOW' | 'BlOCK', prefix: string }`, where `prefix` is the IP\naddress prefix that was matched in the ACL.\n\n## Example\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Acl } from 'fastly:acl';\naddEventListener('fetch', async (evt) => {\n  const myAcl = Acl.open('myacl');\n  const match = await myAcl.lookup(evt.client.address);\n  evt.respondWith(new Response(match?.action === 'BLOCK' ? 'blocked' : 'allowed'));\n});\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/backend/Backend/Backend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Backend()`\n\nThe **`Backend` constructor** lets you dynamically create new [Fastly Backends](https://developer.fastly.com/reference/api/services/backend/) for your Fastly Compute service.\n\n>**Note**: Dynamic backends are by default disabled at the Fastly service level. Contact [Fastly Support](https://support.fastly.com/hc/en-us/requests/new?ticket_form_id=360000269711) to request dynamic backends on Fastly Services.\n\nTo disable the usage of dynamic backends, see [enforceExplicitBackends](../enforceExplicitBackends.mdx).\n\n## Syntax\n\n```js\nnew Backend(backendConfiguration)\n```\n\n> **Note:** `Backend()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `backendConfiguration`\n\n  - : An Object which contains all the configuration options to apply to the newly created Backend.\n\n    - `name` _: string_\n      - The name of the backend.\n      - The name has to be between 1 and 254 characters inclusive.\n      - The name can be whatever you would like, as long as it does not match the name of any of the static service backends nor match any other dynamic backends built during a single execution of the application.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n    - `target` _: string_\n      - A hostname, IPv4, or IPv6 address for the backend as well as an optional port.\n      - The target has to be at-least 1 character.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. Is null, undefined, an empty string, not a valid IP address or host, or is the string `::`\n    - `hostOverride` _: string_ _**optional**_\n      - If set, will force the HTTP Host header on connections to this backend to be the supplied value.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `connectTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for a connection to this backend to be established.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `firstByteTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `betweenBytesTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend.\n      - If exceeded, the response received so far will be considered complete and the fetch will end.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `useSSL` _: boolean_ _**optional**_\n      - Whether or not to require TLS for connections to this backend.\n    - `dontPool` _: boolean_ _**optional**_\n      - Determine whether or not connections to the same backend should be pooled across different sessions.\n      - Fastly considers two backends “the same” if they're registered with the same name and the exact same settings.\n      - In those cases, when pooling is enabled, if Session 1 opens a connection to this backend it will be left open, and can be re-used by Session 2.\n      - This can help improve backend latency, by removing the need for the initial network / TLS handshake(s).\n      - By default, pooling is enabled for dynamic backends.\n    - `tlsMinVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Minimum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `tlsMaxVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Maximum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `certificateHostname` _: string_ _**optional**_\n      - Define the hostname that the server certificate should declare.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `caCertificate` _: string_ _**optional**_\n      - The CA certificate to use when checking the validity of the backend.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `ciphers` _: string_ _**optional**_\n      - List of OpenSSL ciphers to support for connections to this origin.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - [List of ciphers supported by Fastly](https://developer.fastly.com/learning/concepts/routing-traffic-to-fastly/#use-a-tls-configuration).\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `sniHostname` _: string_ _**optional**_\n      - The SNI hostname to use on connections to this backend.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `clientCertificate` _: object_ _**optional**_\n      - The client certificate to provide for the TLS handshake\n      - `certificate` _: string_\n        - The PEM certificate string.\n      - `key` _: SecretStoreEntry_\n        - The `SecretStoreEntry` to use for the key, created via [`SecretStore.prototype.get`](../../fastly:secret-store/SecretStore/prototype/get.mdx) or alteratively via [`SecretStore.fromBytes`](../../fastly:secret-store/SecretStore/fromBytes.mdx).\n    - `httpKeepalive` _: number_ _**optional**_\n      - Enable HTTP keepalive, setting the timout in milliseconds.\n    - `tcpKeepalive` _: boolean | object_ _**optional**_\n      - Enable TCP keepalive. When an object, optionally setting the keepalive configuration options.\n      - `timeSecs` _: number_ _**optional**_\n        - Configure how long to wait after the last sent data over the TCP connection before starting to send TCP keepalive probes.\n      - `intervalSecs` _: number_ _**optional**_\n        - Configure how long to wait between each TCP keepalive probe sent to the backend to determine if it is still active.\n      - `probes` _: number_ _**optional**_\n        - Number of probes to send to the backend before it is considered dead.\n    - `grpc` _: boolean_ _**optional**_\n      - **_Experimental feature_**\n      - When enabled, sets that this backend is to be used for gRPC traffic. \n      - _Warning: When using this experimental feature, no guarantees are provided for behaviours for backends that do not provide gRPC traffic._\n\nAll optional generic options can have their defaults set via [`setDefaultDynamicBackendConfig()`](../setDefaultDynamicBackendConfig.mdx).\n\nThis includes all configuration options above except for `name`, `target`, `hostOverride`, `sniHostname` and `grpc`.\n\n### Return value\n\nA new `Backend` object.\n\n## Examples\n\nIn this example an explicit Dynamic Backend is created and supplied to the fetch request, the response is then returned to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Explicit Dynamic Backend Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\",\n    connectTimeout: 1000,\n    firstByteTimeout: 15000,\n    betweenBytesTimeout: 10000,\n    useSSL: true,\n    tlsMinVersion: 1.3,\n    tlsMaxVersion: 1.3,\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\",\n    connectTimeout: 1000,\n    firstByteTimeout: 15000,\n    betweenBytesTimeout: 10000,\n    useSSL: true,\n    tlsMinVersion: 1.3,\n    tlsMaxVersion: 1.3,\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/backend/Backend/exists.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.exists()\n\nThe **`Backend.exists()`** method returns a boolean indicating if a Backend with the given name exists or not.\n\n## Syntax\n\n```js\nexists(name)\n```\n\n### Return value\n\nA boolean indicating if a Backend with the given name exists or not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/backend/Backend/fromName.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.fromName()\n\nReturns the `Backend` instance with the given name, if one exists. If one does not exist, an error is thrown.\n\n## Syntax\n\n```js\nfromName(name)\n```\n\n### Return value\n\nA `Backend` instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/backend/Backend/health.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.health()\n\n:::info\n\nThis method is deprecated, use [`Backend.prototype.health`](./prototype/health.mdx) instead.\n\n:::\n\nThe **`Backend.health()`** method returns a string representing the health of the given Backend instance.\n\n## Syntax\n\n```js\nBackend.health(backend)\n```\n\n### Return value\n\nA string representing the health of the specified Backend value.\n\nPossible values are:\n- `\"healthy\"` - The backend's health check has succeeded, indicating the backend is working as expected and should receive requests.\n- `\"unhealthy\"` - The backend's health check has failed, indicating the backend is not working as expected and should not receive requests.\n- `\"unknown\"` - The backend does not have a health check configured.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/backend/Backend/prototype/betweenBytesTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.betweenBytesTimeout\n\nThe read-only **`betweenBytesTimeout`** property of a `Backend` instance is an integer number\nproviding the between bytes timeout for this backend in milliseconds.\n\nWhen not set or in environments that do not support this property (such as Viceroy), `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/backend/Backend/prototype/connectTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.connectTimeout\n\nThe read-only **`connectTimeout`** property of a `Backend` instance is an integer number\nproviding the connect timeout for this backend in milliseconds.\n\nWhen not set or in environments that do not support this property (such as Viceroy), `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/backend/Backend/prototype/firstByteTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.firstByteTimeout\n\nThe read-only **`firstByteTimeout`** property of a `Backend` instance is an integer number\nproviding the first byte timeout for this backend in milliseconds.\n\nWhen not set or in environments that do not support this property (such as Viceroy), `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/backend/Backend/prototype/health.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.prototype.health()\n\nThe **`Backend.prototype.health()`** method returns a string representing the health of the given Backend instance.\n\n## Syntax\n\n```js\nhealth()\n```\n\n### Return value\n\nA string representing the health of the specified Backend value.\n\nPossible values are:\n- `\"healthy\"` - The backend's health check has succeeded, indicating the backend is working as expected and should receive requests.\n- `\"unhealthy\"` - The backend's health check has failed, indicating the backend is not working as expected and should not receive requests.\n- `\"unknown\"` - The backend does not have a health check configured.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/backend/Backend/prototype/hostOverride.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.hostOverride\n\nThe read-only **`hostOverride`** property of a `Backend` instance is the host header\noverride string used when sending requests to this backend.\n\n## Value\n\nA `string`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/backend/Backend/prototype/httpKeepaliveTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.httpKeepaliveTime\n\nThe read-only **`httpKeepaliveTime`** property of a `Backend` instance is the HTTP keepalive\ntime for this backend in milliseconds, or 0 if no keepalive is set.\n\n## Value\n\nA `number`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/backend/Backend/prototype/isDynamic.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.isDynamic\n\nThe read-only **`isDynamic`** property of a `Backend` instance is a boolean\nindicating if the backend was dynamically created for this service.\n\n## Value\n\nA `boolean`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/backend/Backend/prototype/isSSL.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.isSSL\n\nThe read-only **`isSSL`** property of a `Backend` instance is a boolean\nindicating if the backend is using an SSL connection.\n\n## Value\n\nA `boolean`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/backend/Backend/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# name\n\nThe read-only **`name`** property of the backend returns the backend name string.\n\n## Value\n\nA `string`.\n\n## Description\n\nProvides the name of the backend.\n\n## Examples\n\n### Using name\n\nThe following example logs the string value of a [Backend](../Backend.mdx) object:\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Backend.prototype.name Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\\\"@fastly/js-compute\\\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.name); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.name); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/backend/Backend/prototype/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.port\n\nThe read-only **`port`** property of a `Backend` instance is the port number\nof this backend.\n\n## Value\n\nA `number`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/backend/Backend/prototype/target.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.target\n\nThe read-only **`target`** property of a `Backend` instance is the host string\nthis backend is configured to use.\n\n## Value\n\nA `string`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/backend/Backend/prototype/tcpKeepalive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.tcpKeepalive\n\nThe read-only **`tcpKeepalive`** property of a `Backend` instance returns an object providing\nthe TCP keepalive configuration, if any, otherwise returning `null` if TCP keepalive is not enabled.\n\nThis object has the following properties:\n- `timeSecs` _: number or null._\n  - Configure how long to wait after the last sent data over the TCP connection before starting to send TCP keepalive probes.\n- `intervalSecs` _: number or null._\n  - Configure how long to wait between each TCP keepalive probe sent to the backend to determine if it is still active.\n- `probes` _: number or null._\n  - Number of probes to send to the backend before it is considered dead.\n\n## Value\n\nA `Object` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/backend/Backend/prototype/tlsMaxVersion.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.tlsMaxVersion\n\nThe read-only **`tlsMaxVersion`** property of a `Backend` instance is the max TLS version\nit is configured to use, as a number, either `1.0`, `1.1`, `1.2`, or `1.3`.\n\nWhen not used, or for environments that do not support this feature, such as Viceroy, `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/backend/Backend/prototype/tlsMinVersion.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.tlsMinVersion\n\nThe read-only **`tlsMinVersion`** property of a `Backend` instance is the max TLS version\nit is configured to use, as a number, either `1.0`, `1.1`, `1.2`, or `1.3`.\n\nWhen not used, or for environments that do not support this feature, such as Viceroy, `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/backend/Backend/prototype/toName.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.prototype.toName()\n\n:::info\n\nThis method is deprecated, use [`Backend.prototype.name`](./name.mdx) instead.\n\n:::\n\nThe **`toName()`** method returns the name associated with the `Backend` instance.\n\n## Syntax\n\n```js\ntoName()\n```\n\n### Return value\n\nA string which contains the name of the Backend.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/backend/Backend/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# toString\n\n:::info\n\nThis method is deprecated, use [`Backend.prototype.name`](./name.mdx) instead.\n\n:::\n\nThe **`toString()`** method returns a string representing the specified Backend value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified Backend value.\n\n## Description\n\nThe [Backend](../Backend.mdx) object overrides the `toString()` method of [Object](../../../globals//Object/Object.mdx); it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For [Backend](../Backend.mdx) values, the `toString` method returns the name given to the [Backend](../Backend.mdx) object during construction.\n\nThe `toString()` method requires its `this` value to be a [Backend](../Backend.mdx) object.\n\nIf the `this` value does not inherit from `Backend.prototype`, a [TypeError](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n## Examples\n\n### Using toString()\n\nThe following example logs the string value of a [Backend](../Backend.mdx) object:\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Backend.prototype.toString Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\\\"@fastly/js-compute\\\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.toString()); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.toString()); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/backend/allowDynamicBackends.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# allowDynamicBackends\n\n:::info\n\nThis method is deprecated, and dynamic backends are now always supported when enabled at the service level. See [`enforceExplicitBackends`](./enforceExplicitBackends.mdx) instead.\n\n:::\n\nThe **`allowDynamicBackends()`** function is used to control whether or not Dynamic Backends should be allowed within this Fastly Compute Service.\n\nBy default, Dynamic Backends are enabled, but can be a potential security concern since third-party JavaScript code may send arbitrary requests, potentially including sensitive/secret data, off to destinations that the JavaScript project was not intending.\n\nUsing `allowDynamicBackends(false)` this security property can be restored to only use explicit backend definitions.\n\n>**Note**: By default, while dynamic backends are allowed in the SDK, they are by default disabled at the Fastly service level.\n\n## Syntax\n\n```js\nallowDynamicBackends(enabledOrConfig)\n```\n\n### Parameters\n\n- `enabled` _: boolean_\n  - Whether or not to allow Dynamic Backends\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/backend/enforceExplicitBackends.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# enforceExplicitBackends\n\nCall this function to enforce the security property of explicitly-defined backends, even when dynamic backends are enabled at\nthe Fastly service level.\n\nBy default, if dynamic backends are supported for the Fastly service, they will be automatically used when creating a new\n`fetch()` request. This default behaviour for dynamic backends can be a potential security concern since third-party JavaScript\ncode may send arbitrary requests, including sensitive/secret data, off to destinations that the JavaScript project was not\nintending.\n\nWhen calling this function, an optional default backend name can be provided.\n\n>**Note**: This is a separate option to the service-level dynamic backend support for Fastly services, which is by deault disabled for Fastly services.\n\nThe **`enforceExplicitBackends()`** function is used to control whether or not Dynamic Backends should be allowed within this Fastly Compute Service.\n\nBy default, Dynamic Backends are enabled, but can be a potential security concern since third-party JavaScript code may send arbitrary requests, potentially including sensitive/secret data, off to destinations that the JavaScript project was not intending.\n\nUsing `allowDynamicBackends(false)` this security property can be restored to only use explicit backend definitions.\n\n>**Note**: Dynamic Backends are disabled by default for Fastly Services. Please contact [Fastly Support](https://support.fastly.com/hc/requests/new?ticket_form_id=360000269711) to request the feature be enabled or disabled on Fastly Services.\n\n## Syntax\n\n```js\nenforceExplicitBackends(defaultBackend?)\n```\n\n### Parameters\n\n- `defaultBackend` _: string_ _**optional**_\n  - An optional default backend string name to use in `fetch()` requests.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/backend/setDefaultDynamicBackendConfig.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# setDefaultDynamicBackendConfig()\n\nThe **`setDefaultDynamicBackendConfig()`** allows setting backend configuration defaults that should apply to any newly created dynamic backends via the `new Backend()` constructor.\n\n### Parameters\n\n- `defaultDynamicBackendConfig`\n\n  - : An Object which contains the generic configuration options to apply to newly created Backends.\n    - `connectTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for a connection to this backend to be established.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `firstByteTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `betweenBytesTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend.\n      - If exceeded, the response received so far will be considered complete and the fetch will end.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `useSSL` _: boolean_ _**optional**_\n      - Whether or not to require TLS for connections to this backend.\n    - `dontPool` _: boolean_ _**optional**_\n      - Determine whether or not connections to the same backend should be pooled across different sessions.\n      - Fastly considers two backends “the same” if they're registered with the same name and the exact same settings.\n      - In those cases, when pooling is enabled, if Session 1 opens a connection to this backend it will be left open, and can be re-used by Session 2.\n      - This can help improve backend latency, by removing the need for the initial network / TLS handshake(s).\n      - By default, pooling is enabled for dynamic backends.\n    - `tlsMinVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Minimum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `tlsMaxVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Maximum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `certificateHostname` _: string_ _**optional**_\n      - Define the hostname that the server certificate should declare.\n      - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `caCertificate` _: string_ _**optional**_\n      - The CA certificate to use when checking the validity of the backend.\n      - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `ciphers` _: string_ _**optional**_\n      - List of OpenSSL ciphers to support for connections to this origin.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - [List of ciphers supported by Fastly](https://developer.fastly.com/learning/concepts/routing-traffic-to-fastly/#use-a-tls-configuration).\n      - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `clientCertificate` _: object_ _**optional**_\n      - The client certificate to provide for the TLS handshake\n      - `certificate` _: string_\n        - The PEM certificate string.\n      - `key` _: SecretStoreEntry_\n        - The `SecretStoreEntry` to use for the key, created via [`SecretStore.prototype.get`](../fastly:secret-store/SecretStore/prototype/get.mdx) or alteratively via [`SecretStore.fromBytes`](../fastly:secret-store/SecretStore/fromBytes.mdx).\n    - `httpKeepalive` _: number_ _**optional**_\n      - Enable HTTP keepalive, setting the timout in milliseconds.\n    - `tcpKeepalive` _: boolean | object_ _**optional**_\n      - Enable TCP keepalive. When an object, optionally setting the keepalive configuration options.\n      - `timeSecs` _: number_ _**optional**_\n        - Configure how long to wait after the last sent data over the TCP connection before starting to send TCP keepalive probes.\n      - `intervalSecs` _: number_ _**optional**_\n        - Configure how long to wait between each TCP keepalive probe sent to the backend to determine if it is still active.\n      - `probes` _: number_ _**optional**_\n        - Number of probes to send to the backend before it is considered dead.\n\n## Syntax\n\n```js\nsetDefaultDynamicBackendConfig(defaultConfig)\n```\n\n### Return value\n\nNone.\n\n## Examples\n\nIn this example an explicit Dynamic Backend is created and supplied to the fetch request, with timeouts and TLS options provided from the default backend configuration options.\n\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Explicit Dynamic Backend Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nimport { Backend, setDefaultDynamicBackendConfig } from \"fastly:backend\";\nallowDynamicBackends(true);\nsetDefaultDynamicBackendConfig({\n  connectTimeout: 1000,\n  firstByteTimeout: 15_000,\n  betweenBytesTimeout: 10_000,\n  useSSL: true,\n  sslMinVersion: 1.3,\n  sslMaxVersion: 1.3\n});\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  // Timeouts and TLS configuration still get set from the default backend configuration above.\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\"\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nimport { Backend } from \"fastly:backend\";\nallowDynamicBackends(true);\nsetDefaultDynamicBackendConfig({\n  connectTimeout: 1000,\n  firstByteTimeout: 15_000,\n  betweenBytesTimeout: 10_000,\n  useSSL: true,\n  sslMinVersion: 1.3,\n  sslMaxVersion: 1.3\n});\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\"\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/cache/CacheEntry/age.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.age\n\nThe **`age`** method of the `CacheEntry` interface returns the current age in milliseconds of the cached item.\n\n## Syntax\n\n```js\nage()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the current age in milliseconds of the cached item."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/cache/CacheEntry/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.body\n\nThe **`body`** method of the `CacheEntry` interface retrieves the cached item contents as a `ReadableStream`.\n\nOnly one stream can be active at a time for a given `CacheEntry`. An error will be thrown if a stream is already active for this `CacheEntry`.\n\n## Syntax\n\n```js\nbody(options)\n```\n\n### Parameters\n\n- `options` _: object_ __optional__\n  - `start` _: number_\n    - The offset from which to start the range.\n  - `end` _: number_\n    - How long the range should be.\n\n### Return value\n\nA `ReadableStream` which contains the cached item contents."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/cache/CacheEntry/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.close\n\nThe **`close`** method of the `CacheEntry` interface closes the connection to the cache for this `CacheEntry`.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/cache/CacheEntry/hits.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.hits\n\nThe **`hits`** method of the `CacheEntry` interface returns the amount of cache hits for the cached item.\n\nNote: this hit count only reflects the view of the server that supplied the cached item. Due to clustering, this count may vary between potentially many servers within the data center where the item is cached. See the [clustering documentation](https://developer.fastly.com/learning/vcl/clustering/) for details, though note that the exact caching architecture of Compute is different from VCL services.\n\n## Syntax\n\n```js\nhits()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the number of cache hits to this cached item.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/cache/CacheEntry/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.length\n\nThe **`length`** method of the `CacheEntry` interface returns the size in bytes of the cached item, if known, otherwise returns `null` if the length is currently unknown.\n\nThe length of the cached item may be unknown if the item is currently being streamed into the cache without a fixed length.\n\n## Syntax\n\n```js\nlength()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` or `null` which represents the current length of the cached item.\n\n`null` is returned if the length is currently unknown."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/cache/CacheEntry/maxAge.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.maxAge\n\nThe **`maxAge`** method of the `CacheEntry` interface returns the time in milliseconds for which the cached item is considered fresh.\n\n## Syntax\n\n```js\nmaxAge()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the time in milliseconds for which the cached item is considered fresh."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/cache/CacheEntry/staleWhileRevalidate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.staleWhileRevalidate\n\nThe **`staleWhileRevalidate`** method of the `CacheEntry` interface returns the time in milliseconds for which a cached item can safely be used despite being considered stale.\n\n## Syntax\n\n```js\nstaleWhileRevalidate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the time in milliseconds for which a cached item can safely be used despite being considered stale."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/cache/CacheEntry/state.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.state\n\nThe **`state`** method of the `CacheEntry` interface returns a `CacheState` instance which reflects the current state of this `CacheEntry` instance.\n\n## Syntax\n\n```js\nstate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `CacheState` instance which reflects the current state of this `CacheEntry` instance."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/cache/CacheEntry/userMetadata.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.userMetadata\n\nThe **`userMetadata`** method of the `CacheEntry` interface returns the user-controlled metadata associated with the cached item.\n\n## Syntax\n\n```js\nuserMetadata()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nAn `ArrayBuffer` which contains the user-controlled metadata associated with the cached item."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/cache/CacheState/found.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheState.found\n\nThe **`found`** method of the `CacheState` interface returns `true` if a cached item was located.\n\nEven if an cached item is found, the cached item might be stale and require updating. Use `mustInsertOrUpdate()` to determine whether this transaction client is expected to update the cached item.\n\n## Syntax\n\n```js\nfound()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `boolean` which represents whether a cached item was located or not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/cache/CacheState/mustInsertOrUpdate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheState.mustInsertOrUpdate\n\nThe **`mustInsertOrUpdate`** method of the `CacheState` interface returns `true` if a fresh cache item was not found, and this transaction client is expected to insert a new item or update a stale item.\n\n\n## Syntax\n\n```js\nmustInsertOrUpdate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `boolean` which represents whether a fresh cached item was found not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/cache/CacheState/stale.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheState.stale\n\nThe **`stale`** method of the `CacheState` interface returns `true` if the cached item is stale.\n\nA cached item is stale if its age is greater than its `maxAge` period.\n\n## Syntax\n\n```js\nstale()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `boolean` which represents whether the cached item is stale or not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/cache/CacheState/usable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheState.usable\n\nThe **`usable`** method of the `CacheState` interface returns `true` if the cached item is usable.\n\nA cached item is usable if its age is less than the sum of the `maxAge` and `staleWhileRevalidate` periods.\n\n## Syntax\n\n```js\nusable()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `boolean` which represents whether a cached item is usable or not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/cache/CoreCache/insert.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CoreCache.insert\n\nPerforms a non-transactional insertion into the cache, returning a `FastlyBody` instance for providing the cached object itself.\nFor the insertion to complete successfully, the object must be written into the returned `FastlyBody` instance, and then `FastlyBody.protoype.close` must be called.\nIf `FastlyBody.prototype.close` does not get called, the insertion is considered incomplete, and any concurrent lookups that may be reading from the object as it is streamed into the cache may encounter a streaming error.\n\nNote: Like `CoreCache.lookup()`, `CoreCache.insert()` may race with concurrent lookups or insertions, and will unconditionally overwrite existing cached items rather than allowing for revalidation of an existing object.\nThe transactional equivalent of this function is `TransactionCacheEntry.insert()`, which may only be called following a `CoreCache.transactionLookup()` call and the returned `CacheEntry` when has a state where `CacheState.mustInsertOrUpdate()` returns true.\n\n## Syntax\n\n```js\ninsert(key, options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - A cache key which is a string with a length of up to 8,135 that identify a cached item.\n  - The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n- `options` _: object_\n  - `headers` _: HeadersInit_ __optional__\n    - The headers act as additional factors in object selection, and the choice of which headers to factor in is determined during insertion, via the `vary` property within `TransactionInsertOptions`.\n    - A lookup will succeed when there is at least one cached item that matches lookup’s `key`, and all of the lookup’s headers included in the cache items’ `vary` list match the corresponding headers in that cached item.\n    - A typical example is a cached HTTP response, where the request had an \"Accept-Encoding\" header. In that case, the origin server may or may not decide on a given encoding, and whether that same response is suitable for a request with a different (or missing) Accept-Encoding header is determined by whether Accept-Encoding is listed in Vary header in the origin’s response.\n    - Note: These headers are narrowly useful for implementing cache lookups incorporating the semantics of the HTTP Vary header.\n  - `maxAge` _: number_ __optional__\n    - Sets the “time to live” for the cache item in milliseconds: The time for which the item will be considered fresh.\n  - `vary` _: array_ __optional__\n    - Sets the list of headers that must match when looking up this cached item.\n  - `initialAge` _: number_ __optional__\n    - Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n    - The initial age is 0 by default.\n  - `staleWhileRevalidate` _: number_ __optional__\n    - Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n    - Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n    - The methods `CacheState.protoype.usable` and `CacheState.protoype.stale` can be used to determine the current state of an item.\n    - The stale-while-revalidate period is 0 by default.\n  - `surrogateKeys` _: array_ __optional__\n    - Sets the surrogate keys that can be used for purging this cached item.\n    - Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item’s TTL to elapse, or overwriting the item with insert().\n    - Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n    - [See the Fastly surrogate keys guide for details.](https://docs.fastly.com/en/guides/working-with-surrogate-keys)\n  - `length` _: number_ __optional__\n    - Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n    - It is preferable to provide a length, if possible.\n    - Clients that begin streaming the item’s contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n  - `userMetadata` _: ArrayBufferView | ArrayBuffer | URLSearchParams | string_ __optional__\n    - Sets the user-defined metadata to associate with the cached item.\n  - `sensitive` _: boolean_ __optional__\n    - Enable or disable PCI/HIPAA-compliant non-volatile caching.\n    - By default, this is false.\n    - [See the Fastly PCI-Compliant Caching and Delivery documentation for details.](https://docs.fastly.com/products/pci-compliant-caching-and-delivery)\n\n### Return value\n\nReturns a `FastlyBody`.\n\n### Exceptions\n\n- If the provided `key`:\n  - Cannot be coerced to a string\n  - Is an empty string\n  - Is longer than 8135 characters\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/cache/CoreCache/lookup.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# CoreCache.lookup\n\nPerform a non-transactional lookup into the cache, returning a CacheEntry if a usable cached item was found.\nA cached item is usable if its age is less than the sum of its TTL and its stale-while-revalidate period. Items beyond that age are unusably stale.\n\nNote: A non-transactional lookup will not attempt to coordinate with any concurrent cache lookups.\nIf two instances of the service perform a lookup at the same time for the same cache key, and the item is not yet cached, they will both return `null`.\nWithout further coordination, they may both end up performing the work needed to insert() the item (which usually involves origin requests and/or computation) and racing with each other to insert.\nTo resolve such races between concurrent lookups, use `CoreCache.transactionLookup()` instead.\n\n## Syntax\n\n```js\nlookup(key, options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - A cache key which is a string with a length of up to 8,135 that identify a cached item.\n  - The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n\n- `options` _: object_\n  - `headers` _: HeadersInit_ __optional__\n    - The headers act as additional factors in object selection, and the choice of which headers to factor in is determined during insertion, via the `vary` property within `TransactionInsertOptions`.\n    - A lookup will succeed when there is at least one cached item that matches lookup’s `key`, and all of the lookup’s headers included in the cache items’ `vary` list match the corresponding headers in that cached item.\n    - A typical example is a cached HTTP response, where the request had an \"Accept-Encoding\" header. In that case, the origin server may or may not decide on a given encoding, and whether that same response is suitable for a request with a different (or missing) Accept-Encoding header is determined by whether Accept-Encoding is listed in Vary header in the origin’s response.\n    - Note: These headers are narrowly useful for implementing cache lookups incorporating the semantics of the HTTP Vary header.\n\n### Return value\n\nReturns `CacheEntry` if a usable cached item was found, otherwise returns `null`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/cache/CoreCache/transactionLookup.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# CoreCache.transactionLookup\n\nPerform a transactional lookup into the cache, returning a `TransactionCacheEntry` instance.\n\nTransactions coordinate between concurrent actions on the same cache key, incorporating concepts of [request collapsing](https://developer.fastly.com/learning/concepts/request-collapsing/) and [revalidation](https://developer.fastly.com/learning/concepts/stale/), though at a lower level that does not automatically interpret HTTP semantics.\n\nRequest Collapsing:\nIf there are multiple concurrent calls to `CoreCache.transactionLookup()` for the same item and that item is not present,\njust one of the callers will be instructed to insert the item into the cache as part of the transaction.\nThe other callers will block until the metadata for the item has been inserted, and can then begin streaming its contents out of the cache at the same time that the inserting caller streams them into the cache.\n\nRevalidation:\nSimilarly, if an item is usable but stale, and multiple callers attempt a `CoreCache.transactionLookup()` concurrently, they will all be given access to the stale item, but only one will be designated to perform an asynchronous update (or insertion) to freshen the item in the cache.\n\n## Syntax\n\n```js\ntransactionLookup(key, options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - A cache key which is a string with a length of up to 8,135 that identify a cached item.\n  - The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n\n- `options` _: object_\n  - `headers` _: HeadersInit_ __optional__\n    - The headers act as additional factors in object selection, and the choice of which headers to factor in is determined during insertion, via the `vary` property within `TransactionInsertOptions`.\n    - A lookup will succeed when there is at least one cached item that matches lookup’s `key`, and all of the lookup’s headers included in the cache items’ `vary` list match the corresponding headers in that cached item.\n    - A typical example is a cached HTTP response, where the request had an \"Accept-Encoding\" header. In that case, the origin server may or may not decide on a given encoding, and whether that same response is suitable for a request with a different (or missing) Accept-Encoding header is determined by whether Accept-Encoding is listed in Vary header in the origin’s response.\n    - Note: These headers are narrowly useful for implementing cache lookups incorporating the semantics of the HTTP Vary header.\n\n### Return value\n\nReturns an instance of `TransactionCacheEntry`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/cache/SimpleCache/SimpleCache.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `SimpleCache`\n\nThe **`SimpleCache` class** provides a simplified interface to inserting and retrieving entries from Fastly's Cache.\n\nAll the methods on the class are static methods, there are no instance methods.\n\n\n## Examples\n\nIn this example we attempt to retrieve an entry from the Fastly Cache, if the entry does not exist, we create the content and insert it into the Fastly Cache before finally returning.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const path = new URL(event.request.url).pathname;\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/cache/SimpleCache/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCache.get\n\n▸ **get**(): `string`\n\nGets the entry associated with the key `key` from the cache.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the cache.\n\n### Return value\n\nIf the key does not exist in the cache, this returns `null`.\n\nIf the key does exist in the cache, this returns a `SimpleCacheEntry`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n## Examples\n\nIn this example we attempt to retrieve an entry from the Fastly Cache, and return a message stating whether the entry was in the Fastly Cache or not.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const path = new URL(event.request.url).pathname;\n  let page = SimpleCache.get(path);\n  return new Response(page ? `${path} is in the cache` : `${path} is not in the cache`, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/cache/SimpleCache/getOrSet.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCache.getOrSet\n\nThe **`getOrSet()`** method attempts to get an entry from the cache for the supplied `key`. If no entry is found (or has expired), the supplied `set` function is executed and its result is inserted into the cache under the supplied `key` and for the supplied `ttl` (Time-To-Live) duration, provided in seconds.\n\n## Syntax\n\n```js\ngetOrSet(key, set)\ngetOrSet(key, set, length)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to lookup and/or store the supplied entry under within the cache.\n- `set` _:  Function_\n  - The function to execute if and only if the cache does not have a usable entry for the supplied `key`.\n    The function should return a Promise which resolves with the following interface:\n    - `value` _:  ArrayBuffer | TypedArray | DataView | ReadableStream | URLSearchParams | String | string literal_\n      - The value to store within the cache.\n    - `ttl` _: number_\n      - The maximum number of seconds to store the supplied entry in the cache.\n    - `length` _: number_ __optional__\n      - The length of the value being stored within the cache. This is only used when the `value` is a `ReadableStream`.\n\n### Return value\n\nReturns a `SimpleCacheEntry`.\n\n### Exceptions\n\n- If the provided `key`:\n  - Cannot be coerced to a string\n  - Is an empty string\n  - Is longer than 8135 characters\n- If the provided `ttl`:\n  - Cannot be coerced to a number\n  - Is a negative number\n  - Is `NaN`\n  - Is Inifinity\n\n## Examples\n\nIn this example we attempt to retrieve an entry from the Fastly Cache. If the entry does not exist, we create the content and insert it into the Fastly Cache before finally returning.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const path = new URL(event.request.url).pathname;\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/cache/SimpleCache/purge.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# SimpleCache.purge\n\npurge the entry associated with the key `key` from the cache.\n\n## Syntax\n\n```js\npurge(key, options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to purge from within the cache.\n\n- `options` _: object_\n  - `scope` _: string_\n    - : Where to purge the content from.\n    - Possible values are:\n      - \"global\" - This will remove the content from all of Fastly.\n      - \"pop\" - This will remove the content from the POP that contains the currently executing instance.\n\n### Return value\n\nReturns `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n## Examples\n\nIn this example, when a request contains a `purge` querystring parameter, we purge the an entry from the cache.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const url = new URL(event.request.url);\n  const path = url.pathname;\n  if (url.searchParams.has('purge')) {\n    SimpleCache.purge(path, { scope: \"global\" });\n    return new Response(page, { status: 204 });\n  }\n\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/cache/SimpleCacheEntry/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the `SimpleCacheEntry` interface\ntakes the instance's stream and reads it to completion. It returns a promise\nthat resolves with an `ArrayBuffer`.\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an `ArrayBuffer`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/cache/SimpleCacheEntry/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.body\n\nThe **`body`** read-only property of the `SimpleCacheEntry` interface is a `ReadableStream` of the instance's contents.\n\n## Value\n\nA `ReadableStream`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/cache/SimpleCacheEntry/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.bodyUsed\n\nThe **`bodyUsed`** read-only property of the `SimpleCacheEntry` interface is a boolean value that indicates whether the body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/cache/SimpleCacheEntry/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.json()\n\nThe **`json()`** method of the `SimpleCacheEntry` interface takes\na `SimpleCacheEntry` stream and reads it to completion. It returns a promise which\nresolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a JavaScript object. This object could be\nanything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/cache/SimpleCacheEntry/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.text()\n\nThe **`text()`** method of the `SimpleCacheEntry` interface takes the instance's stream and reads it to completion.\nIt returns a promise that resolves with a `String`.\nThe result is _always_ decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Promise that resolves with a `String`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/cache/TransactionCacheEntry/age.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.age\n\nThe **`age`** method of the `TransactionCacheEntry` interface returns the current age in milliseconds of the cached item.\n\n## Syntax\n\n```js\nage()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the current age in milliseconds of the cached item."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/cache/TransactionCacheEntry/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.body\n\nThe **`body`** method of the `TransactionCacheEntry` interface retrieves the cached item contents as a `ReadableStream`.\n\nOnly one stream can be active at a time for a given `TransactionCacheEntry`. An error will be thrown if a stream is already active for this `TransactionCacheEntry`.\n\n## Syntax\n\n```js\nbody(options)\n```\n\n### Parameters\n\n- `options` _: object_ __optional__\n  - `start` _: number_\n    - The offset from which to start the range.\n  - `end` _: number_\n    - How long the range should be.\n\n### Return value\n\nA `ReadableStream` which contains the cached item contents."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/cache/TransactionCacheEntry/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.cancel\n\nThe **`cancel`** method of the `TransactionCacheEntry` interface cancels an obligation to provide an object to the cache.\n\n\n## Syntax\n\n```js\ncancel()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/cache/TransactionCacheEntry/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.close\n\nThe **`close`** method of the `TransactionCacheEntry` interface closes the connection to the cache for this `TransactionCacheEntry`.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/cache/TransactionCacheEntry/hits.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.hits\n\nThe **`hits`** method of the `TransactionCacheEntry` interface returns the amount of cache hits for the cached item.\n\nNote: this hit count only reflects the view of the server that supplied the cached item. Due to clustering, this count may vary between potentially many servers within the data center where the item is cached. See the [clustering documentation](https://developer.fastly.com/learning/vcl/clustering/) for details, though note that the exact caching architecture of Compute is different from VCL services.\n\n## Syntax\n\n```js\nhits()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the number of cache hits to this cached item.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/cache/TransactionCacheEntry/insert.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.insert\n\nPerform a transactional cache insertion, returning a `FastlyBody` instance for providing the cached object itself.\n\nThis method should only be called when `TransactionCacheEntry.state().mustInsertOrUpdate()` is true; otherwise, an error will be thrown when attempting to perform the insertion.\n\n## Syntax\n\n```js\ninsert(options)\n```\n\n### Parameters\n\n- `options` _: object_\n  - `maxAge` _: number_ __optional__\n    - Sets the “time to live” for the cache item in milliseconds: The time for which the item will be considered fresh.\n  - `vary` _: array_ __optional__\n    - Sets the list of headers that must match when looking up this cached item.\n  - `initialAge` _: number_ __optional__\n    - Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n    - The initial age is 0 by default.\n  - `staleWhileRevalidate` _: number_ __optional__\n    - Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n    - Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n    - The methods `CacheState.protoype.usable` and `CacheState.protoype.stale` can be used to determine the current state of an item.\n    - The stale-while-revalidate period is 0 by default.\n  - `surrogateKeys` _: array_ __optional__\n    - Sets the surrogate keys that can be used for purging this cached item.\n    - Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item’s TTL to elapse, or overwriting the item with insert().\n    - Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n    - [See the Fastly surrogate keys guide for details.](https://docs.fastly.com/en/guides/working-with-surrogate-keys)\n  - `length` _: number_ __optional__\n    - Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n    - It is preferable to provide a length, if possible.\n    - Clients that begin streaming the item's contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n  - `userMetadata` _: ArrayBufferView | ArrayBuffer | URLSearchParams | string_ __optional__\n    - Sets the user-defined metadata to associate with the cached item.\n  - `sensitive` _: boolean_ __optional__\n    - Enable or disable PCI/HIPAA-compliant non-volatile caching.\n    - By default, this is false.\n    - [See the Fastly PCI-Compliant Caching and Delivery documentation for details.](https://docs.fastly.com/products/pci-compliant-caching-and-delivery)\n\n### Return value\n\nReturns a `FastlyBody`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/cache/TransactionCacheEntry/insertAndStreamBack.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.insertAndStreamBack\n\nPerform a transaction cache insertion, returning a `FastlyBody` instance for providing the cached object itself, and a `CacheEntry` instance which can be used to stream out the newly-inserted cache item.\n\nFor the insertion to complete successfully, the object must be written into the returned `FastlyBody` instance, and then `FastlyBody.protoype.close` must be called.\nIf `FastlyBody.prototype.close` does not get called, the insertion is considered incomplete, and any concurrent lookups that may be reading from the object as it is streamed into the cache may encounter a streaming error.\n\n## Syntax\n\n```js\ninsertAndStreamBack(options)\n```\n\n### Parameters\n\n- `options` _: object_\n  - `maxAge` _: number_ __optional__\n    - Sets the “time to live” for the cache item in milliseconds: The time for which the item will be considered fresh.\n  - `vary` _: array_ __optional__\n    - Sets the list of headers that must match when looking up this cached item.\n  - `initialAge` _: number_ __optional__\n    - Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n    - The initial age is 0 by default.\n  - `staleWhileRevalidate` _: number_ __optional__\n    - Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n    - Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n    - The methods `CacheState.protoype.usable` and `CacheState.protoype.stale` can be used to determine the current state of an item.\n    - The stale-while-revalidate period is 0 by default.\n  - `surrogateKeys` _: array_ __optional__\n    - Sets the surrogate keys that can be used for purging this cached item.\n    - Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item’s TTL to elapse, or overwriting the item with insert().\n    - Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n    - [See the Fastly surrogate keys guide for details.](https://docs.fastly.com/en/guides/working-with-surrogate-keys)\n  - `length` _: number_ __optional__\n    - Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n    - It is preferable to provide a length, if possible.\n    - Clients that begin streaming the item's contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n  - `userMetadata` _: ArrayBufferView | ArrayBuffer | URLSearchParams | string_ __optional__\n    - Sets the user-defined metadata to associate with the cached item.\n  - `sensitive` _: boolean_ __optional__\n    - Enable or disable PCI/HIPAA-compliant non-volatile caching.\n    - By default, this is false.\n    - [See the Fastly PCI-Compliant Caching and Delivery documentation for details.](https://docs.fastly.com/products/pci-compliant-caching-and-delivery)\n\n### Return value\n\nReturns an array where the first item is a `FastlyBody` instance and the second item is a `CacheEntry` instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/cache/TransactionCacheEntry/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.length\n\nThe **`length`** method of the `TransactionCacheEntry` interface returns the size in bytes of the cached item, if known, otherwise returns `null` if the length is currently unknown.\n\nThe length of the cached item may be unknown if the item is currently being streamed into the cache without a fixed length.\n\n## Syntax\n\n```js\nlength()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` or `null` which represents the current length of the cached item.\n\n`null` is returned if the length is currently unknown."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/cache/TransactionCacheEntry/maxAge.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.maxAge\n\nThe **`maxAge`** method of the `TransactionCacheEntry` interface returns the time in milliseconds for which the cached item is considered fresh.\n\n## Syntax\n\n```js\nmaxAge()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the time in milliseconds for which the cached item is considered fresh."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/cache/TransactionCacheEntry/staleWhileRevalidate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.staleWhileRevalidate\n\nThe **`staleWhileRevalidate`** method of the `TransactionCacheEntry` interface returns the time in milliseconds for which a cached item can safely be used despite being considered stale.\n\n## Syntax\n\n```js\nstaleWhileRevalidate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the time in milliseconds for which a cached item can safely be used despite being considered stale."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/cache/TransactionCacheEntry/state.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.state\n\nThe **`state`** method of the `TransactionCacheEntry` interface returns a `CacheState` instance which reflects the current state of this `TransactionCacheEntry` instance.\n\n## Syntax\n\n```js\nstate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `CacheState` instance which reflects the current state of this `TransactionCacheEntry` instance."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/cache/TransactionCacheEntry/update.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.update\n\nPerform an update of the cache item's metadata.\n\n## Syntax\n\n```js\nupdate(options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - A cache key which is a string with a length of up to 8,135 that identify a cached item.\n  - The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n- `options` _: object_\n  - `maxAge` _: number_ __optional__\n    - Sets the “time to live” for the cache item in milliseconds: The time for which the item will be considered fresh.\n  - `vary` _: array_ __optional__\n    - Sets the list of headers that must match when looking up this cached item.\n  - `initialAge` _: number_ __optional__\n    - Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n    - The initial age is 0 by default.\n  - `staleWhileRevalidate` _: number_ __optional__\n    - Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n    - Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n    - The methods `CacheState.protoype.usable` and `CacheState.protoype.stale` can be used to determine the current state of an item.\n    - The stale-while-revalidate period is 0 by default.\n  - `surrogateKeys` _: array_ __optional__\n    - Sets the surrogate keys that can be used for purging this cached item.\n    - Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item’s TTL to elapse, or overwriting the item with insert().\n    - Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n    - [See the Fastly surrogate keys guide for details.](https://docs.fastly.com/en/guides/working-with-surrogate-keys)\n  - `length` _: number_ __optional__\n    - Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n    - It is preferable to provide a length, if possible.\n    - Clients that begin streaming the item's contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n  - `userMetadata` _: ArrayBufferView | ArrayBuffer | URLSearchParams | string_ __optional__\n    - Sets the user-defined metadata to associate with the cached item.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/cache/TransactionCacheEntry/userMetadata.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.userMetadata\n\nThe **`userMetadata`** method of the `TransactionCacheEntry` interface returns the user-controlled metadata associated with the cached item.\n\n## Syntax\n\n```js\nuserMetadata()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nAn `ArrayBuffer` which contains the user-controlled metadata associated with the cached item."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/cache-override/CacheOverride/CacheOverride.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `CacheOverride()`\n\nThe **`CacheOverride` constructor** lets you configure the caching behavior of a `Response`.\n\nNormally, the HTTP Headers on a [`Response`](../../globals/Response/Response.mdx) would control how the [`Response`](../../globals/Response/Response.mdx) is cached,\nbut `CacheOverride` can be set on a [`Request`](../../globals/Request/Request.mdx), to define custom caching behavior.\n\n## Syntax\n\n```js\nnew CacheOverride(mode)\nnew CacheOverride(mode, init)\nnew CacheOverride(init)\n```\n\n> **Note:** `CacheOverride()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `mode` _: string_\n  - Sets the cache override mode for a request\n  - If set to:\n    - `\"none\"`: Do not override the behavior specified in the origin response’s cache control headers.\n    - `\"pass\"`: Do not cache the response to this request, regardless of the origin response’s headers.\n    - `\"override\"`: Override particular cache control settings using the `CacheOverride` object's settings.\n       This options is also the default when providing an init object directly as the first argument.\n\n- `init`\n\n  - : An Object which contains all the configuration options to apply to the newly created `CacheOverride`.\n\n    - `pci` _: boolean_ _**optional**_\n      - Override the caching behavior of this request to enable or disable PCI/HIPAA-compliant non-volatile caching.\n      - By default, this is `false`, which means the request may not be PCI/HIPAA-compliant. Set it to `true` to enable compliant caching.\n      - See the [Fastly PCI-Compliant Caching and Delivery documentation](https://docs.fastly.com/products/pci-compliant-caching-and-delivery) for details.\n\n    - `surrogateKey` _: string_ _**optional**_\n      - Override the caching behavior of this request to include the given surrogate key, provided as a header value.\n      - See the [Fastly surrogate keys guide](https://docs.fastly.com/en/guides/purging-api-cache-with-surrogate-keys) for details.\n    - `swr` _: number_ _**optional**_\n      - Override the caching behavior of this request to use the given `stale-while-revalidate` time, in seconds\n\n    - `ttl` _: number_ _**optional**_\n      - Override the caching behavior of this request to use the given Time to Live (TTL), in seconds.\n    \n    - `beforeSend` _:Function_ _**optional**_\n      - `(request: Request) => void | PromiseLike<void>`\n      - Callback to be invoked if a request is going all the way to a backend, allowing the request to be modified beforehand.\n      - See [Modifying a request as it is forwarded to a backend](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/#modifying-a-request-as-it-is-forwarded-to-a-backend) in the Fastly cache interfaces documentation for details.\n\n    - `afterSend` _: Function_ _**optional**_\n      - `(response: Response) => void | CacheOptions | PromiseLike<void | CacheOptions>`\n      - Callback to be invoked after a response has been sent, but before it is stored into the cache.\n      - Where `CacheOptions` contains:\n        - `cache` _: boolean | 'uncacheable'_ _**optional**_\n          - Whether to cache this response. By default, leaving this field empty, responses will be cached based on their cache header information.\n          - Setting this to true or false will override this default cache behaviour, setting in the cache or not setting in the cache, even if the default behaviour would have been otherwise.\n          - Setting to 'uncacheable' the response will not only not be cached, but the cache will record that the originating request led to an uncacheable response, so that future cache lookups will result in immediately going to the backend, rather than attempting to coordinate concurrent requests to reduce backend traffic.\n          - See the [Fastly request collapsing guide](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/request-collapsing/) for more details on the mechanism that `uncacheable` disables.\n        - `bodyTransformFn` _: Function_ _**optional**_\n          - `(body: Uint8Array) => Uint8Array | PromiseLike<Uint8Array>`\n          - Provide a function to be used for transforming the response body prior to caching.\n          - Body transformations are performed by specifying a transform, rather than by directly working with the body during the onAfterSend callback function, because not every response contains a fresh body: 304 Not Modified responses, which are used to revalidate a stale cached response, are valuable precisely because they do not retransmit the body.\n          - For any other response status, the backend response will contain a relevant body, and the `bodyTransformFn` will be applied to it. The original backend body is passed in to the transform function, and the function is expected to return the new body.\n      - See [Controlling cache behavior based on backend response](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/#controlling-cache-behavior-based-on-backend-response) in the Fastly cache interfaces documentation for details.\n\n### Return value\n\nA new `CacheOverride` object.\n\n## Examples\n\nIn this example we override the cache for all the requests prefixed /static/ to have a long TTL (Time To Live),  and the home page to have a short TTL and a long SWR (Stale While Revalidate).\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"CacheOverride Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { CacheOverride } from \"fastly:cache-override\";\n// In this example we override the cache for all the requests prefixed /static/ \n// to have a long TTL (Time To Live), and the home page to have a short TTL and \n// a long SWR (Stale While Revalidate).\nasync function app (event) {\n  const path = (new URL(event.request.url)).pathname;\n  let cacheOverride;\n  if (path == '/') {\n    cacheOverride = new CacheOverride('override', {ttl: 10, swr: 86_400});\n  } else if (path.startsWith('/static/')) {\n    cacheOverride = new CacheOverride('override', {ttl: 86_400});\n  } else {\n    cacheOverride = new CacheOverride('none')\n  }\n  return fetch(event.request.url, {\n    cacheOverride,\n    backend: 'origin_0'\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { CacheOverride } from \"fastly:cache-override\";\n// In this example we override the cache for all the requests prefixed /static/ \n// to have a long TTL (Time To Live), and the home page to have a short TTL and \n// a long SWR (Stale While Revalidate).\nasync function app (event) {\n  const path = (new URL(event.request.url)).pathname;\n  let cacheOverride;\n  if (path == '/') {\n    cacheOverride = new CacheOverride('override', {ttl: 10, swr: 86_400});\n  } else if (path.startsWith('/static/')) {\n    cacheOverride = new CacheOverride('override', {ttl: 86_400});\n  } else {\n    cacheOverride = new CacheOverride('none')\n  }\n  return fetch(event.request.url, {\n    cacheOverride,\n    backend: 'origin_0'\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/compute/purgeSurrogateKey.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# purgeSurrogateKey\n\nThe **`purgeSurrogateKey()`** function is used to purge the given surrogate key string from Fastly's cache.\n\nThere are two purge modes: soft purge and hard purge, with hard purge as the default which clears all items\nfrom the cache immediately. When using a soft purge, stale entries are maintained in the cache, reducing\norgin load, while also enabling stale revalidations.\n\nSee the [Fastly Purge Documentation](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/purging/#surrogate-key-purge) for more information on caching and purge operations.\n\n## Syntax\n\n```js\npurgeSurrogateKey(surrogateKey, soft?)\n```\n\n### Parameters\n\n- `surrogateKey` _: string_\n  - The surrogate key string\n- `soft?` _: boolean_\n  - Enables a soft purge, retaining stale entries in the cache. Default is a hard purge.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/compute/vCpuTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# vCpuTime\n\nThe **`vCpuTime()`** function provides the vCPU time used by the current request handler in milliseconds.\n\n## Syntax\n\n```js\nvCpuTime()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`number`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/config-store/ConfigStore/ConfigStore.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `ConfigStore()`\n\nThe **`ConfigStore` constructor** lets you access a specific [Fastly Config Store](https://www.fastly.com/documentation/reference/api/services/resources/config-store/).\n\n> **Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew ConfigStore(name);\n```\n\n> **Note:** `ConfigStore()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Defines a config store instance using the resource link name.\n\n### Return value\n\nA new `ConfigStore` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Config Store exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name does not start with an ascii alphabetical character \n  - Thrown if the provided name does not contain only ascii alphanumeric, underscore, and whitespace characters\n\n## Examples\n\nIn this example we have a resource link named \"animals\" (which is linked to a config store) and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"ConfigStore Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/config-store/ConfigStore/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# ConfigStore.prototype.get\n\nThe **`get()`** method returns the value associated with the provided key in the config-store. If the provided key does not exist in the ConfigStore then this returns `null`.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from the dictionary.\n\n### Return value\n\nA `string` representing the specified ConfigStore value or `null` if the key does not exist in the ConfigStore\n\n## Description\n\nGet a value for a key in the config-store. If the provided key does not exist in the ConfigStore then this returns `null`.\n\nThe `get()` method requires its `this` value to be a [`ConfigStore`](../../../fastly%3Aconfig-store/ConfigStore/ConfigStore.mdx) object.\n\nIf the `this` value does not inherit from `ConfigStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided key is longer than 255 in length\n  - Thrown if the provided key is an empty string\n\n## Examples\n\nIn this example we have an Edge Dictionary named \"animals\" and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"ConfigStore Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/device/Device/lookup.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Device.lookup()\n\nLook up the data associated with a particular User-Agent string.\n\n\n## Syntax\n\n```js\nlookup(userAgent)\n```\n\n### Return value\n\nIf there is data associated with the User-Agent, a `Device` instance is returned.\nOtherwise, `null` is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/device/Device/prototype/brand.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.brand\n\nThe read-only **`brand`** property of the `Device` interface is\neither a string stating the brand of the device, which can be different from the manufacturer of that device.\nIf no brand is known, the value will be `null`.\n\n\n## Value\n\nEither a string value if a brand is known, otherwise `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/device/Device/prototype/hardwareType.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.hardwareType\n\nThe read-only **`hardwareType`** property of the `Device` interface is\neither a string stating the hardware type of the device, or `null` if the hardware type is not known.\n\nA string representation of the device's primary platform hardware. The most commonly used device types are also identified via boolean variables. Because a device may have multiple device types and this variable only has the primary type, we recommend using the boolean variables for logic and using this string representation for logging.\n\n\n\n## Value\n\nEither a string value if a hardware type is known, otherwise `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/device/Device/prototype/isBot.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isBot\n\nThe read-only **`isBot`** property of the `Device` interface is\neither a boolean stating if the device is a bot, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a bot, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/device/Device/prototype/isDesktop.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isDesktop\n\nThe read-only **`isDesktop`** property of the `Device` interface is\neither a boolean stating if the device is a desktop web browser, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a desktop web browser, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/device/Device/prototype/isGameConsole.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isGameConsole\n\nThe read-only **`isGameConsole`** property of the `Device` interface is\neither a boolean stating if the device is a video game console, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a video game console, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/device/Device/prototype/isMediaPlayer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isMediaPlayer\n\nThe read-only **`isMediaPlayer`** property of the `Device` interface is\neither a boolean stating if the device is a media player (like Blu-ray players, iPod devices, and smart speakers such as Amazon Echo), or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a media player (like Blu-ray players, iPod devices, and smart speakers such as Amazon Echo), or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/device/Device/prototype/isMobile.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isMobile\n\nThe read-only **`isMobile`** property of the `Device` interface is\neither a boolean stating if the device is a mobile phone, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a mobile phone, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/device/Device/prototype/isSmartTV.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isSmartTV\n\nThe read-only **`isSmartTV`** property of the `Device` interface is\neither a boolean stating if the device is a smart TV, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a smart TV, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/device/Device/prototype/isTablet.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isTablet\n\nThe read-only **`isTablet`** property of the `Device` interface is\neither a boolean stating if the device is a tablet (like an iPad), or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a tablet (like an iPad), or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/device/Device/prototype/isTouchscreen.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isTouchscreen\n\nThe read-only **`isTouchscreen`** property of the `Device` interface is\neither a boolean stating if the device's screen is touch sensitive, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device's screen is touch sensitive, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/device/Device/prototype/model.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.model\n\nThe read-only **`model`** property of the `Device` interface is\neither a string stating the model of the device, or `null` if the model is not known.\n\n\n## Value\n\nEither a string value if a model is known, otherwise `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/device/Device/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.name\n\nThe read-only **`name`** property of the `Device` interface is\neither a string stating the name of the device, or `null` if the name is not known.\n\n\n## Value\n\nEither a string value if a name is known, otherwise `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/device/Device/prototype/toJSON.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# toJSON\n\nThe `toJSON()` method of the Device interface is a serializer;\nit returns a JSON representation of the Device object.\n\nTo get a JSON string, you can use `JSON.stringify(device)` directly; it will call `toJSON()` automatically.\n\n## Syntax\n\n```js\ntoJSON()\n```\n\n### Return value\n\nA JSON object that is the serialization of the Device object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/dictionary/Dictionary/Dictionary.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Dictionary()`\n\n:::info\n\nThis Class is deprecated\n\n:::\n\nThe **`Dictionary` constructor** lets you access a specific [Fastly Edge Dictionary](https://docs.fastly.com/en/guides/about-edge-dictionaries).\n\n**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew Dictionary(name);\n```\n\n> **Note:** `Dictionary()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - The name of the [Fastly Edge Dictionary](https://docs.fastly.com/en/guides/about-edge-dictionaries) that this `Dictionary` instance should provide access to.\n\n### Return value\n\nA new `Dictionary` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Dictionary exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name does not start with an ascii alphabetical character \n  - Thrown if the provided name does not contain only ascii alphanumeric, underscore, and whitespace characters\n\n## Examples\n\nIn this example we have an Edge Dictionary named \"animals\" and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Dictionary Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/dictionary/Dictionary/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Dictionary.prototype.get\n\n:::info\n\nThis Class is deprecated, it has been renamed to [`ConfigStore`](../../../fastly:config-store/ConfigStore/ConfigStore.mdx) and can be imported via `import { ConfigStore } from 'fastly:config-store'`\n\nThe `get()` method exists on the [`ConfigStore`](../../../fastly:config-store/ConfigStore/ConfigStore.mdx) Class.\n\n:::\n\nThe **`get()`** method returns the value associated with the provided key in the dictionary. If the provided key does not exist in the Dictionary then this returns `null`.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from the dictionary.\n\n### Return value\n\nA `string` representing the specified Dictionary value or `null` if the key does not exist in the Dictionary\n\n## Description\n\nGet a value for a key in the dictionary. If the provided key does not exist in the Dictionary then this returns `null`.\n\nThe `get()` method requires its `this` value to be a [`Dictionary`](../Dictionary.mdx) object.\n\nIf the `this` value does not inherit from `Dictionary.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided key is longer than 255 in length\n  - Thrown if the provided key is an empty string\n\n## Examples\n\nIn this example we have an Edge Dictionary named \"animals\" and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Dictionary Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/edge-rate-limiter/EdgeRateLimiter/EdgeRateLimiter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `EdgeRateLimiter()`\n\nThe **`EdgeRateLimiter` constructor** lets you open an epen a [ERL](https://docs.fastly.com/products/edge-rate-limiting) with the given ratecounter and penaltybox.\n\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew EdgeRateLimiter(rateCounter, penaltyBox)\n```\n\n> **Note:** `EdgeRateLimiter()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `rateCounter` _: RateCounter_\n  - The RateCounter instance to associate with this EdgeRateLimiter instance\n- `penaltyBox` _: PenaltyBox_\n  - The PenaltyBox instance which should be associated with this EdgeRateLimiter instance\n\n### Return value\n\nA new `EdgeRateLimiter` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided rateCounter value is not an instance of RateCounter\n  - Thrown if the provided penaltyBox value is not an instance of PenaltyBox\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/edge-rate-limiter/EdgeRateLimiter/prototype/checkRate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# EdgeRateLimiter.prototype.checkRate\n\nIncrement an entry in the rate counter and check if the entry has exceeded some average number of requests per second (RPS) over the given window.\nIf the entry is over the RPS limit for the window, add to the penaltybox for the given `timeToLive`.\n\nValid `timeToLive` is 1 minute to 60 minutes and `timeToLive` value is truncated to the nearest minute.\n\n## Syntax\n```js\ncheckRate(entry, delta, window, limit, timeToLive)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to increment and check\n- `delta` _: number_\n  - The amount to increment the `entry` by\n- `window` _: number_\n  - The time period to check across, has to be either 1 second, 10 seconds, or 60 seconds\n- `limit` _: number_\n  - The requests-per-second limit\n- `timeToLive` _: number_\n  - In minutes, how long the entry should be added into the penalty-box\n  - Valid `timeToLive` is 1 minute to 60 minutes and `timeToLive` value is truncated to the nearest minute.\n\n\n### Return value\n\nReturns `true` if the entry has exceeded the average RPS for the window, otherwise returns `false`.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `name` value can not be coerced into a string\n  - Thrown if the provided `delta` value is not a positive finite number.\n  - Thrown if the provided `window` value is not either, 1, 10, or 60.\n  - Thrown if the provided `limit` value is not a positive finite number.\n  - Thrown if the provided `timeToLive` value is not either, a number between 1 and 60 inclusively.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/edge-rate-limiter/PenaltyBox/PenaltyBox.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `PenaltyBox()`\n\nThe **`PenaltyBox` constructor** can be used with a [Edge Rate Limiter](../EdgeRateLimiter/EdgeRateLimiter.mdx) or standalone for adding and checking if some entry is in the dataset.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew PenaltyBox(name)\n```\n\n> **Note:** `PenaltyBox()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Open a PenaltyBox with the given name\n\n\n### Return value\n\nA new `PenaltyBox` object instance.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `name` value can not be coerced into a string\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/edge-rate-limiter/PenaltyBox/prototype/add.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# PenaltyBox.prototype.add\n\nAdd an `entry` into the PenaltyBox for the duration of the given `timeToLive`.\n\n## Syntax\n```js\nadd(entry, timeToLive)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n- `timeToLive` _: number_\n  - In minutes, how long the entry should be added into the PenaltyBox\n  - Valid `timeToLive` is 1 minute to 60 minutes and `timeToLive` value is truncated to the nearest minute.\n\n\n### Return value\n\nReturns `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n  - Thrown if the provided `timeToLive` value is not either, a number between 1 and 60 inclusively.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/edge-rate-limiter/PenaltyBox/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# PenaltyBox.prototype.has\n\nCheck if the given entry is contained in in the PenaltyBox instance.\n\n## Syntax\n```js\nhas(entry)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n\n\n### Return value\n\nReturns `true` if the entry is contained in the PenaltyBox instance, otherwise returns `false`.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/edge-rate-limiter/RateCounter/RateCounter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `RateCounter()`\n\nThe **`RateCounter` constructor** can be used with a [Edge Rate Limiter](../EdgeRateLimiter/EdgeRateLimiter.mdx) or standalone for counting and rate calculations.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew RateCounter(name)\n```\n\n> **Note:** `RateCounter()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Open a RateCounter with the given name\n\n\n### Return value\n\nA new `RateCounter` object instance.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `name` value can not be coerced into a string\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/edge-rate-limiter/RateCounter/prototype/increment.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RateCounter.prototype.increment\n\nIncrement the given `entry` in the RateCounter instance with the given `delta` value.\n\n## Syntax\n```js\nincrement(entry, delta)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n- `delta` _: number_\n  - The amount to increment the entry by\n\n\n### Return value\n\nReturns `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n  - Thrown if the provided `delta` value is not a positive, finite number.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/edge-rate-limiter/RateCounter/prototype/lookupCount.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RateCounter.prototype.lookupCount\n\nLook up the current rate for the given `entry` and the given `duration`.\n\n## Syntax\n```js\nlookupCount(entry, duration)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n- `duration` _: number_\n  - The duration to lookup alongside the entry, has to be either, 10, 20, 30, 40, 50, or 60 seconds.\n\n\n### Return value\n\nReturns a number which is the count for the given `entry` and `duration` in this `RateCounter` instance.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n  - Thrown if the provided `duration` value is not either, 10, 20, 30, 40, 50 or 60.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/edge-rate-limiter/RateCounter/prototype/lookupRate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RateCounter.prototype.lookupRate\n\nLook up the current rate for the given `entry` and the given `window`.\n\n## Syntax\n```js\nlookupRate(entry, window)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n- `window` _: number_\n  - The window to look up alongside the entry, has to be either 1 second, 10 seconds, or 60 seconds\n\n\n### Return value\n\nReturns a number which is the rate for the given `entry` and `window` in this `RateCounter` instance.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n  - Thrown if the provided `window` value is not either, 1, 10, or 60.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/env/env.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# env\n\nThe **`env()`** function returns the value for the provided environment variable name.\n\nFor a list of available environment variables, see the [Fastly Developer Hub for Compute Environment Variables](https://developer.fastly.com/reference/compute/ecp-env/)\n\n>**Note**: The environment variables can only be retrieved when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nenv(name)\n```\n\n### Parameters\n\n- `name` _: string_\n  - The name of the environment variable to retrieve\n\n### Return value\n\nThe value for the requested environment variable, if no such environment variable exists then an empty string is returned.\n\n## Examples\n\nIn this example we log to stdout the environment variables [`FASTLY_HOSTNAME`](https://developer.fastly.com/reference/compute/ecp-env/fastly-hostname/) and [`FASTLY_TRACE_ID`](https://developer.fastly.com/reference/compute/ecp-env/fastly-trace-id/).\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"env Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { env } from \"fastly:env\";\nfunction app(event) {\n  console.log(\"FASTLY_HOSTNAME:\", env(\"FASTLY_HOSTNAME\"));\n  console.log(\"FASTLY_TRACE_ID:\", env(\"FASTLY_TRACE_ID\"));\n  return new Response(\"\", {\n    status: 200\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { env } from \"fastly:env\";\nfunction app(event) {\n  console.log(\"FASTLY_HOSTNAME:\", env(\"FASTLY_HOSTNAME\"));\n  console.log(\"FASTLY_TRACE_ID:\", env(\"FASTLY_TRACE_ID\"));\n  return new Response(\"\", {\n    status: 200\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/experimental/allowDynamicBackends.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# allowDynamicBackends\n\nThe **`allowDynamicBackends()`** function is used to control whether or not Dynamic Backends should be allowed within this Fastly Compute Service.\n\nBy default, Dynamic Backends are disabled within a JavaScript application as it can be a potential avenue for third-party JavaScript code to send requests, potentially including sensitive/secret data,  off to destinations that the JavaScript project was not intending, which could be a security issue.\n\n>**Note**: This feature is in disabled by default for Fastly Services. Please contact [Fastly Support](https://support.fastly.com/hc/requests/new?ticket_form_id=360000269711) to request the feature be enabled on the Fastly Services which require Dynamic Backends.\n\n## Syntax\n\n```js\nallowDynamicBackends(enabledOrConfig)\n```\n\n### Parameters\n\n- `enabledOrConfig` _: boolean_\n  - Whether or not to allow Dynamic Backends\n\nor\n\n- `enabledOrConfig` _: object_\n  - `connectTimeout` _: number_ _**optional**_\n    - Maximum duration in milliseconds to wait for a connection to this backend to be established.\n    - If exceeded, the connection is aborted and a 503 response will be presented instead.\n    - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n  - `firstByteTimeout` _: number_ _**optional**_\n    - Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent.\n    - If exceeded, the connection is aborted and a 503 response will be presented instead.\n    - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n  - `betweenBytesTimeout` _: number_ _**optional**_\n    - Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend.\n    - If exceeded, the response received so far will be considered complete and the fetch will end.\n    - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n\n### Return value\n\n`undefined`.\n\n## Examples\n\nIn this example an implicit Dynamic Backend is created when making the fetch request to https://www.fastly.com/ and the response is then returned to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Dynamic Backends Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nallowDynamicBackends(true);\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  return fetch('https://www.fastly.com/');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nallowDynamicBackends(true);\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  return fetch('https://www.fastly.com/');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/experimental/includeBytes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# includeBytes\n\nThe **`includeBytes()`** function is used embed a file as a Uint8Array.\n\n>**Note**: Can only be used during build-time initialization, not when processing requests.\n\n## Syntax\n\n```js\nincludeBytes(path)\n```\n\n### Parameters\n\n- `path` _: string_\n  - The path to include, relative to the Fastly Compute application's top-level directory during build-time initialization.\n\n### Return value\n\nReturns a `Uint8Array`\n\n## Examples\n\nIn this example we include the README.md file as a Uint8Array and use it for the body in the response we return to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { includeBytes } from \"fastly:experimental\";\nconst readme = includeBytes('README.md');\nasync function app() {\n    return new Response(readme);\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/experimental/mapAndLogError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# mapAndLogError\n\nThe **`mapAndLogError()`** function calls `mapError` on an `Error` object and sends the output to standard error. This includes the error name, message, and a call stack.\n\nIf `--enable-stack-traces` is specified during the build, the call stack will be mapped using source maps.\n\nIf `--enable-stack-traces` is specified and `--exclude-sources` is not specified during the build, then this will also include a code dump of neighboring lines of user code.\n\n## Syntax\n\n```js\nmapAndLogError(error)\n```\n\n### Parameters\n\n- `error` _: Error _ or _string_\n  - The error to retrieve information about. If a `string` is provided, then it is first converted to an `Error`.\n\n### Return value\n\n`undefined`.\n\n## Examples\n\nIn this example, build the application using the `--enable-stack-traces` flag.\n\n```js\naddEventListener('fetch', e => e.respondWith(handler(e)));\nasync function handler(event) {\n  try {\n    throw new TypeError('foo');\n  } catch (err) {\n    mapAndLogError(mapError(err));\n  }\n  return new Response('ok');\n}\n```\n\nThe following is output to the error log.\n\n```\nTypeError: foo\n  at handler (src/index.ts:4:11)\n      1 | addEventListener('fetch', e => e.respondWith(handler(e)));\n      2 | async function handler(event) {\n      3 |   try {\n>     4 |     throw new TypeError('foo');\n                    ^\n      5 |   } catch (err) {\n      6 |     mapAndLogError(mapError(err));\n      7 |   }\n  at src/index.ts:1:45\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/experimental/mapError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# mapError\n\nThe **`mapError()`** function extracts information from an `Error` object as a human-readable array of strings. This includes the error name, message, and a call stack.\n\nIf `--enable-stack-traces` is specified during the build, the call stack will be mapped using source maps.\n\nIf `--enable-stack-traces` is specified and `--exclude-sources` is not specified during the build, then this will also include a code dump of neighboring lines of user code.\n\n## Syntax\n\n```js\nmapError(error)\n```\n\n### Parameters\n\n- `error` _: Error _ or _string_\n  - The error to retrieve information about. If a `string` is provided, then it is first converted to an `Error`.\n\n### Return value\n\nReturns an array of `string`s.\n\n## Examples\n\nIn this example, build the application using the `--enable-stack-traces` flag.\n\n```js\naddEventListener('fetch', e => e.respondWith(handler(e)));\nasync function handler(event) {\n  try {\n    throw new TypeError('foo');\n  } catch (err) {\n    console.error(mapError(err));\n  }\n  return new Response('ok');\n}\n```\n\nThe following is output to the error log.\n\n```\nTypeError: foo\n  at handler (src/index.ts:4:11)\n      1 | addEventListener('fetch', e => e.respondWith(handler(e)));\n      2 | async function handler(event) {\n      3 |   try {\n>     4 |     throw new TypeError('foo');\n                    ^\n      5 |   } catch (err) {\n      6 |     console.error(mapError(err));\n      7 |   }\n  at src/index.ts:1:45\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/experimental/sdkVersion.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# sdkVersion\n\nThe read-only **`sdkVersion`** property is a string whose indicates what JavaScript SDK version is being used.\n\n## Value\n\nA string value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/experimental/setReusableSandboxOptions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# setReusableSandboxOptions\n\nThe **`setReusableSandboxOptions()`** function configures the reuse of the same underlying sandbox for multiple requests, which can improve performance by avoiding the overhead of initializing a new sandbox for each request.\n\n>**Note**: Can only be used during build-time initialization, not when processing requests.\n\n## Syntax\n\n```js\nsetReusableSandboxOptions(options)\n```\n\n### Parameters\n\n- `options` _: Object_\n  - The configuration options for the reusable sandbox.\n    - `maxRequests` _: number_ (default: `1`, `0` means unlimited)\n      - The maximum number of requests that can be handled by a single sandbox before it is recycled.\n    - `betweenRequestTimeoutMs` _: number_ (default: not specified)\n      - The amount of time in milliseconds to wait between requests before recycling the sandbox.\n    - `maxMemoryMiB` _: number_ (default: no limit)\n      - The maximum amount of memory in MiB that the sandbox can use before it is recycled.\n    - `sandboxTimeoutMs` _: number_ (default: no timeout)\n      - The maximum amount of time in milliseconds that a sandbox can be active before it is recycled.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/fanout/createFanoutHandoff.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# createFanoutHandoff\n\nThe **`createFanoutHandoff()`** function creates a Response instance which informs Fastly to pass the original Request through Fanout, to the declared backend.\n\n## Syntax\n\n```js\ncreateFanoutHandoff(request, backend)\n```\n\n### Parameters\n\n- `request` _: Request_\n  - The request to pass through Fanout.\n- `backend` _: string_\n  - The name of the backend that Fanout should send the request to.\n  - The name has to be between 1 and 254 characters inclusive.\n  - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n\n### Return value\n\nA Response instance is returned, which can then be used via `event.respondWith`.\n\n## Examples\n\nIn this example application requests to the path `/stream` and sent handled via Fanout.\n\n```js\nimport { createFanoutHandoff } from \"fastly:fanout\";\n\nasync function handleRequest(event) {\n  try {\n    const url = new URL(event.request.url);\n    if (url.pathname === '/stream') {\n      return createFanoutHandoff(event.request, 'fanout');\n    } else {\n      return new Response('oopsie, make a request to /stream for some fanout goodies', { status: 404 });\n    }\n  } catch (error) {\n    console.error({error});\n    return new Response(error.message, {status:500})\n  }\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/geolocation/getGeolocationForIpAddress.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# getGeolocationForIpAddress\n\nThe **`getGeolocationForIpAddress()`** function is used to retrieve geolocation information about the given IP address.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\ngetGeolocationForIpAddress(address)\n```\n\n### Parameters\n\n- `address` _: string_\n  - The IPv4 or IPv6 address to query.\n\n### Return value\n\nReturns an `Object`, or `null` if no geolocation data was found.\n\nThe object contains information about the given IP address with the following properties:\n\n- `as_name`  _: string | null_\n  - The name of the organization associated with `as_number`.\n  - For example, fastly is the value given for IP addresses under AS-54113.\n\n- `as_number` _: number | null_\n  - [Autonomous system](https://en.wikipedia.org/wiki/Autonomous_system_(Internet)) (AS) number.\n\n- `area_code` _: number | null_\n  - The telephone area code associated with an IP address.\n  - These are only available for IP addresses in the United States, its territories, and Canada.\n\n- `city` _: string | null_\n  - City or town name.\n\n- `conn_speed` _: string | null_\n  - Connection speed.\n\n- `conn_type` _: string | null_\n  - Connection type.\n\n- `continent` _: string | null_\n  - Continent.\n\n- `country_code` _: string | null_\n  - A two-character [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) country code for the country associated with an IP address.\n  - The US country code is returned for IP addresses associated with overseas United States military bases.\n  - These values include subdivisions that are assigned their own country codes in ISO 3166-1. For example, subdivisions NO-21 and NO-22 are presented with the country code SJ for Svalbard and the Jan Mayen Islands.\n\n- `country_code3` _: string | null_\n  - A three-character [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) country code for the country associated with the IP address.\n  - The USA country code is returned for IP addresses associated with overseas United States military bases.\n\n- `country_name` _: string | null_\n  - Country name.\n  - This field is the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) English short name for a country.\n\n- `gmt_offset` _: string | null_\n  - Time zone offset from Greenwich Mean Time (GMT) for `city`.\n\n- `latitude` _: number | null_\n  - Latitude, in units of degrees from the equator.\n  - Values range from -90.0 to +90.0 inclusive, and are based on the [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System) coordinate reference system.\n\n- `longitude` _: number | null_\n  - Longitude, in units of degrees from the [IERS Reference Meridian](https://en.wikipedia.org/wiki/IERS_Reference_Meridian).\n  - Values range from -180.0 to +180.0 inclusive, and are based on the [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System) coordinate reference system.\n\n- `metro_code` _: number | null_\n  - Metro code, representing designated market areas (DMAs) in the United States.\n\n- `postal_code` _: string | null_\n  - The postal code associated with the IP address.\n  - These are available for some IP addresses in Australia, Canada, France, Germany, Italy, Spain, Switzerland, the United Kingdom, and the United States.\n  - For Canadian postal codes, this is the first 3 characters. For the United Kingdom, this is the first 2-4 characters (outward code). For countries with alphanumeric postal codes, this field is a lowercase transliteration.\n\n- `proxy_description` _: string | null_\n  - Client proxy description.\n\n- `proxy_type` _: string | null_\n  - Client proxy type.\n\n- `region` _: string | null_\n  - [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) country subdivision code.\n  - For countries with multiple levels of subdivision (for example, nations within the United Kingdom), this variable gives the more specific subdivision.\n  - This field can be None for countries that do not have ISO country subdivision codes. For example, None is given for IP addresses assigned to the Åland Islands (country code AX, illustrated below).\n\n- `utc_offset` _: number | null;_\n  - Time zone offset from coordinated universal time (UTC) for `city`.\n\n## Examples\n\nIn this example we return the geolocation details for the provided ip querystring parameter or for the incoming client request if the querystring parameter does not exist.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"getGeolocationForIpAddress Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { getGeolocationForIpAddress } from \"fastly:geolocation\"\nasync function app(event) {\n  try {\n    let ip = new URL(event.request.url).searchParams.get('ip') || event.client.address\n    let geo = getGeolocationForIpAddress(ip);\n    return new Response(JSON.stringify(geo), {\n      headers: {\n        \"Content-Type\": \"application/json\",\n      },\n    });\n  } catch (error) {\n    console.error(error);\n    return new Response(\"Internal Server Error\", {\n      status: 500\n    });\n  }\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { getGeolocationForIpAddress } from \"fastly:geolocation\"\nasync function app(event) {\n  try {\n    let ip = new URL(event.request.url).searchParams.get('ip') || event.client.address\n    let geo = getGeolocationForIpAddress(ip);\n    return new Response(JSON.stringify(geo), {\n      headers: {\n        \"Content-Type\": \"application/json\",\n      },\n    });\n  } catch (error) {\n    console.error(error);\n    return new Response(\"Internal Server Error\", {\n      status: 500\n    });\n  }\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/AggregrateError/AggregrateError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# AggregateError()\n\nThe **`AggregateError()`** constructor creates an error for several errors that need to be wrapped in a single error.\n\n## Syntax\n\n```js\nnew AggregateError(errors)\nnew AggregateError(errors, message)\nnew AggregateError(errors, message, options)\n\nAggregateError(errors)\nAggregateError(errors, message)\nAggregateError(errors, message, options)\n```\n\n> **Note:** `AggregateError()` can be called with or without `new`. Both create a new `AggregateError` instance.\n\n### Parameters\n\n- `errors`\n  - : An iterable of errors, may not actually be [`TypeError`](../Error/Error.mdx) instances.\n- `message` _**optional**_\n  - : An optional human-readable description of the aggregate error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Array/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array\\[Symbol.species]\n\nThe **`Array[Symbol.species]`** accessor property returns the constructor used to construct return values from array methods.\n\n> **Warning:** The existence of `[Symbol.species]` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Syntax\n\n```js\nArray[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get [Symbol.species]` was called. The return value is used to construct return values from array methods that create new arrays.\n\n## Description\n\nThe `[Symbol.species]` accessor property returns the default constructor for `Array` objects. Subclass constructors may override it to change the constructor assignment. The default implementation is basically:\n\n```js\n// Hypothetical underlying implementation for illustration\nclass Array {\n  static get [Symbol.species]() {\n    return this;\n  }\n}\n```\n\nBecause of this polymorphic implementation, `[Symbol.species]` of derived subclasses would also return the constructor itself by default.\n\n```js\nclass SubArray extends Array {}\nSubArray[Symbol.species] === SubArray; // true\n```\n\nWhen calling array methods that do not mutate the existing array but return a new array instance (for example, `filter()` and `map()`), the array's `constructor[Symbol.species]` will be accessed. The returned constructor will be used to construct the return value of the array method. This makes it technically possible to make array methods return objects unrelated to arrays.\n\n```js\nclass NotAnArray {\n  constructor(length) {\n    this.length = length;\n  }\n}\n\nconst arr = [0, 1, 2];\narr.constructor = { [Symbol.species]: NotAnArray };\narr.map((i) => i); // NotAnArray { '0': 0, '1': 1, '2': 2, length: 3 }\narr.filter((i) => i); // NotAnArray { '0': 1, '1': 2, length: 0 }\narr.concat([1, 2]); // NotAnArray { '0': 0, '1': 1, '2': 2, '3': 1, '4': 2, length: 5 }\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Array/Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array()\n\nThe **`Array()`** constructor is used to create `Array` objects.\n\n## Syntax\n\n```js\nnew Array(element0, element1, /* … ,*/ elementN)\nnew Array(arrayLength)\n\nArray(element0, element1, /* … ,*/ elementN)\nArray(arrayLength)\n```\n\n> **Note:** `Array()` can be called with or without `new`. Both create a new `Array` instance.\n\n### Parameters\n\n- `elementN`\n  - : A JavaScript array is initialized with the given elements, except in the case where\n    a single argument is passed to the `Array` constructor and that argument is\n    a number (see the `arrayLength` parameter below). Note that this special case only\n    applies to JavaScript arrays created with the `Array` constructor, not\n    array literals created with the bracket syntax.\n- `arrayLength`\n  - : If the only argument passed to the `Array` constructor is an integer\n    between 0 and 2<sup>32</sup> - 1 (inclusive), this returns a new JavaScript array with\n    its `length` property set to that number (**Note:** this\n    implies an array of `arrayLength` empty slots, not slots with actual\n    `undefined` values).\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if there's only one argument (`arrayLength`) and its value is not between 0 and 2<sup>32</sup> - 1 (inclusive).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Array/from.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.from\n\nThe **`Array.from()`** static method creates a new, shallow-copied `Array` instance from an iterable or array-like object.\n\n## Syntax\n\n```js\nArray.from(arrayLike)\n\n// Arrow function\nArray.from(arrayLike, (element) => { /* … */ })\nArray.from(arrayLike, (element, index) => { /* … */ })\n\n// Mapping function\nArray.from(arrayLike, mapFn)\nArray.from(arrayLike, mapFn, thisArg)\n\n// Inline mapping function\nArray.from(arrayLike, function (element) { /* … */ })\nArray.from(arrayLike, function (element, index) { /* … */ })\nArray.from(arrayLike, function (element) { /* … */ }, thisArg)\nArray.from(arrayLike, function (element, index) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `arrayLike`\n  - : An iterable or array-like object to convert to an array.\n- `mapFn` _**optional**_\n\n  - : Map function to call on every element of the array. If provided, every value to be added to the array is first passed through this function, and `mapFn`'s return value is added to the array instead.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `mapFn`.\n\n### Return value\n\nA new `Array` instance.\n\n## Description\n\n`Array.from()` lets you create `Array`s from:\n\n- [iterable objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) (objects such as [`Map`](../Map/Map.mdx) and [`Set`](../Set/Set.mdx); or, if the object is not iterable,\n- array-like objects (objects with a `length` property and indexed elements).\n\n`Array.from()` never creates a sparse array. If the `arrayLike` object is missing some index properties, they become `undefined` in the new array.\n\n`Array.from()` has an optional parameter `mapFn`, which allows you to execute a function on each element of the array being created, similar to [`Array.prototype.map()`](./prototype/map.mdx). More clearly, `Array.from(obj, mapFn, thisArg)` has the same result as `Array.from(obj).map(mapFn, thisArg)`, except that it does not create an intermediate array, and `mapFn` only receives two arguments (`element`, `index`) without the whole array, because the array is still under construction.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Array/isArray.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.isArray()\n\nThe **`Array.isArray()`** static method determines whether the passed value is an `Array`.\n\n## Syntax\n\n```js\nArray.isArray(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be checked.\n\n### Return value\n\n`true` if `value` is an `Array`; otherwise, `false`. `false` is always returned if `value` is a `TypedArray` instance.\n\n## Description\n\n`Array.isArray()` checks if the passed value is an `Array`. It does not check the value's prototype chain, nor does it rely on the `Array` constructor it is attached to. It returns `true` for any value that was created using the array literal syntax or the `Array` constructor. This makes it safe to use with cross-realm objects, where the identity of the `Array` constructor is different and would therefore cause `instanceof Array` to fail.\n\nSee the article [\"Determining with absolute accuracy whether or not a JavaScript object is an array\"](https://web.mit.edu/jwalden/www/isArray.html) for more details.\n\n`Array.isArray()` also rejects objects with `Array.prototype` in its prototype chain but aren't actual arrays, which `instanceof Array` would accept.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Array/of.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.of()\nThe **`Array.of()`** method creates a new `Array`\ninstance from a variable number of arguments, regardless of number or type of the\narguments.\n\n## Syntax\n\n```js\nArray.of(element0)\nArray.of(element0, element1)\nArray.of(element0, element1, /* … ,*/ elementN)\n```\n\n### Parameters\n\n- `elementN`\n  - : Elements used to create the array.\n\n### Return value\n\nA new `Array` instance.\n\n## Description\n\nThe difference between `Array.of()` and the [`Array()`](./Array.mdx) constructor is in the handling of single arguments: `Array.of(7)` creates an array with a single element, `7`, whereas `Array(7)` creates an empty array with a `length` property of `7`. (That implies an array of 7 empty slots, not slots with actual [`undefined`](../undefined.mdx) values.)\n\n```js\nArray.of(7); // [7]\nArray(7); // array of 7 empty slots\n\nArray.of(1, 2, 3); // [1, 2, 3]\nArray(1, 2, 3); // [1, 2, 3]\n```\n\nThe `Array.of()` method is a generic factory method. For example, if a subclass of `Array` inherits the `of()` method, the inherited `of()` method will return new instances of the subclass instead of `Array` instances. In fact, the `this` value can be any constructor function that accepts a single argument representing the length of the new array, and the constructor will be called with the number of arguments passed to `of()`. The final `length` will be set again when all elements are assigned. If the `this` value is not a constructor function, the plain `Array` constructor is used instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Array/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype\\[Symbol.iterator]()\n\nThe **`Symbol.iterator`** method of an `Array` object implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows arrays to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the value of each index in the array.\n\nThe initial value of this property is the same function object as the initial value of the [`Array.prototype.values`](./values.mdx) property.\n\n## Syntax\n\n```js\narray[Symbol.iterator]()\n```\n\n### Return value\n\nThe same return value as [`Array.prototype.values()`](./values.mdx): a new iterable iterator object that yields the value of each index in the array.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Array/prototype/@@unscopables.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype[Symbol.unscopables]\n\nThe **`@@unscopables`** data property of `Array.prototype` is shared by all `Array` instances. It contains property names that were not included in the ECMAScript standard prior to the ES2015 version and that are ignored for [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) statement-binding purposes.\n\n## Value\n\nA [`null`-prototype object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects) with property names given below and their values set to `true`.\n\n## Description\n\nThe default `Array` properties that are ignored for `with` statement-binding purposes are:\n\n- [`at()`](./at.mdx)\n- [`copyWithin()`](./copyWithin.mdx)\n- [`entries()`](./entries.mdx)\n- [`fill()`](./fill.mdx)\n- [`find()`](./find.mdx)\n- [`findIndex()`](./findIndex.mdx)\n- [`flat()`](./flat.mdx)\n- [`flatMap()`](./flatMap.mdx)\n- [`includes()`](./includes.mdx)\n- [`keys()`](./keys.mdx)\n- [`values()`](./values.mdx)\n\n`Array.prototype[@@unscopables]` is an empty object only containing all the above property names with the value `true`. Its [prototype is `null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects), so `Object.prototype` properties like [`toString`](../../Object/prototype/toString.mdx) won't accidentally be made unscopable, and a `toString()` within the `with` statement will continue to be called on the array.\n\nSee [`Symbol.unscopables`](../../Symbol/unscopables.mdx) for how to set unscopable properties for your own objects.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Array/prototype/at.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.at\n\nThe **`at()`** method takes an integer value and returns the item at that index, allowing for positive and negative integers. Negative integers count back from the last item in the array.\n\n## Syntax\n\n```js\nat(index)\n```\n\n### Parameters\n\n- `index`\n  - : Zero-based index of the array element to be returned, converted to an integer. Negative index counts back from the end of the array — if `index < 0`, `index + array.length` is accessed.\n\n### Return value\n\nThe element in the array matching the given index. Always returns [`undefined`](../../../globals/undefined.mdx) if `index < -array.length` or `index >= array.length` without attempting to access the corresponding property.\n\n## Description\n\nThe `at()` method is equivalent to the bracket notation when `index` is non-negative. For example, `array[0]` and `array.at(0)` both return the first item. However, when counting elements from the end of the array, you cannot use `array[-1]` like you may in Python or R, because all values inside the square brackets are treated literally as string properties, so you will end up reading `array[\"-1\"]`, which is just a normal string property instead of an array index.\n\nThe usual practice is to access [`Array.prototype.length`](./length.mdx) and calculate the index from that — for example, `array[array.length - 1]`. The `at()` method allows relative indexing, so this can be shortened to `array.at(-1)`.\n\nThe `at()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Array/prototype/concat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.concat\n\nThe **`concat()`** method is used to merge two or more arrays.\nThis method does not change the existing arrays, but instead returns a new array.\n\n## Syntax\n\n```js\nconcat()\nconcat(value0)\nconcat(value0, value1)\nconcat(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `valueN` _**optional**_\n  - : Arrays and/or values to concatenate into a new array. If all\n    `valueN` parameters are omitted, `concat` returns a\n    [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of the existing array on which it is called. See the description below\n    for more details.\n\n### Return value\n\nA new `Array` instance.\n\n## Description\n\nThe `concat` method creates a new array. The array will first be populated by the elements in the object on which it is called. Then, for each argument, its value will be concatenated into the array — for normal objects or primitives, the argument itself will become an element of the final array; for arrays or array-like objects with the property [`Symbol.isConcatSpreadable`](../../Symbol/isConcatSpreadable.mdx) set to a truthy value, each element of the argument will be independently added to the final array. The `concat` method does not recurse into nested array arguments.\n\nThe `concat()` method is a copying. It does not alter `this` or any of the arrays provided as arguments but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains the same elements as the ones from the original arrays.\n\nThe `concat()` method preserves empty slots if any of the source arrays is sparse.\n\nThe `concat()` method is generic. The `this` value is treated in the same way as the other arguments (except it will be converted to an object first), which means plain objects will be directly prepended to the resulting array, while array-like objects with truthy `Symbol.isConcatSpreadable` will be spread into the resulting array.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Array/prototype/copyWithin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.copyWithin\n\nThe **`copyWithin()`** method shallow copies part of an array\nto another location in the same array and returns it without modifying its length.\n\n\n\n## Syntax\n\n```js\ncopyWithin(target)\ncopyWithin(target, start)\ncopyWithin(target, start, end)\n```\n\n### Parameters\n\n- `target`\n  - : Zero-based index at which to copy the sequence to, converted to an integer.\n    - Negative index counts back from the end of the array — if `target < 0`, `target + array.length` is used.\n    - If `target < -array.length`, `0` is used.\n    - If `target >= array.length`, nothing is copied.\n    - If `target` is positioned after `start` after normalization, copying only happens until the end of `array.length` (in other words, `copyWithin()` never extends the array).\n- `start` _**optional**_\n  - : Zero-based index at which to start copying elements from, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, nothing is copied.\n- `end` _**optional**_\n  - : Zero-based index at which to end copying elements from, converted to an integer. `copyWithin()` copies up to but not including `end`.\n    - Negative index counts back from the end of the array — if `end < 0`, `end + array.length` is used.\n    - If `end < -array.length`, `0` is used.\n    - If `end >= array.length` or `end` is omitted, `array.length` is used, causing all elements until the end to be copied.\n    - If `end` is positioned before or at `start` after normalization, nothing is copied.\n\n### Return value\n\nThe modified array.\n\n## Description\n\nThe `copyWithin()` method works like C and C++'s `memmove`, and is a high-performance method to shift the data of an `Array`. The sequence is copied and pasted as one operation; the pasted sequence will have the copied values even when the copy and paste region overlap.\n\nThe `copyWithin()` method is a mutating method. It does not alter the length of `this`, but it will change the content of `this` and create new properties or delete existing properties, if necessary.\n\nThe `copyWithin()` method preserves empty slots. If the region to be copied from is sparse, the empty slots' corresponding new indices are [deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) and also become empty slots.\n\nThe `copyWithin()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Array/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.entries\n\nThe **`entries()`** method returns a new **Array\nIterator** object that contains the key/value pairs for each index in the\narray.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nA new `Array` iterator object.\n\n## Description\n\nWhen used on sparse arrays, the `entries()` method iterates empty slots as if they have the value `undefined`.\n\nThe `entries()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Array/prototype/every.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.every\n\nThe **`every()`** method tests whether\nall elements in the array pass the test implemented by the provided function. It\nreturns a Boolean value.\n\n## Syntax\n\n```js\n// Arrow function\nevery((element) => { /* … */ })\nevery((element, index) => { /* … */ })\nevery((element, index, array) => { /* … */ })\n\n// Callback function\nevery(callbackFn)\nevery(callbackFn, thisArg)\n\n// Inline callback function\nevery(function (element) { /* … */ })\nevery(function (element, index) { /* … */ })\nevery(function (element, index, array) { /* … */ })\nevery(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value to indicate the element passes the test, and a falsy value otherwise.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `every()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\n`true` if `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value for every array element. Otherwise, `false`.\n\n## Description\n\nThe `every()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array, until the `callbackFn` returns a [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value. If such an element is found, `every()` immediately returns `false` and stops iterating through the array. Otherwise, if `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value for all elements, `every()` returns `true`.\n\n`every` acts like the \"for all\" quantifier in mathematics. In particular, for an empty array, it returns `true`. (It is [vacuously true](https://en.wikipedia.org/wiki/Vacuous_truth) that all elements of the [empty set](https://en.wikipedia.org/wiki/Empty_set#Properties) satisfy any given condition.)\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\n`every()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `every()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `every()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Array/prototype/fill.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.fill\n\nThe **`fill()`** method changes all elements in an array to a static value, from a start index (default `0`) to an end index (default `array.length`).\nIt returns the modified array.\n\n## Syntax\n\n```js\nfill(value)\nfill(value, start)\nfill(value, start, end)\n```\n\n### Parameters\n\n- `value`\n  - : Value to fill the array with. Note all elements in the array will be this exact value: if `value` is an object, each slot in the array will reference that object.\n- `start` _**optional**_\n  - : Zero-based index at which to start filling, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, no index is filled.\n- `end` _**optional**_\n  - : Zero-based index at which to end filling, converted to an integer. `fill()` fills up to but not including `end`.\n    - Negative index counts back from the end of the array — if `end < 0`, `end + array.length` is used.\n    - If `end < -array.length`, `0` is used.\n    - If `end >= array.length` or `end` is omitted, `array.length` is used, causing all indices until the end to be filled.\n    - If `end` is positioned before or at `start` after normalization, no index is filled.\n\n### Return value\n\nThe modified array, filled with `value`.\n\n## Description\n\nThe `fill()` method is a mutating method. It does not alter the length of `this`, but it will change the content of `this`.\n\nThe `fill()` method fills empty slots in sparse arrays with `value` as well.\n\nThe `fill()` method is generic. It only expects the `this` value to have a `length` property. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Array/prototype/filter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.filter\n\nThe **`filter()`** method creates a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of a portion of a given array, filtered down to just the elements from the given array that pass the test implemented by the provided function.\n\n## Syntax\n\n```js\n// Arrow function\nfilter((element) => { /* … */ })\nfilter((element, index) => { /* … */ })\nfilter((element, index, array) => { /* … */ })\n\n// Callback function\nfilter(callbackFn)\nfilter(callbackFn, thisArg)\n\n// Inline callback function\nfilter(function (element) { /* … */ })\nfilter(function (element, index) { /* … */ })\nfilter(function (element, index, array) { /* … */ })\nfilter(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) to keep the element in the resulting array, and a falsy value otherwise.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `filter()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\nA [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of a portion of the given array, filtered down to just the elements from the given array that pass the test implemented by the provided function. If no elements pass the test, an empty array will be returned.\n\n## Description\n\nThe `filter()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array, and constructs a new array of all the values for which `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. Array elements which do not pass the `callbackFn` test are not included in the new array.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nThe `filter()` method is a copying method. It does not alter `this` but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains the same elements as the ones from the original array (with some filtered out). However, the function provided as `callbackFn` can mutate the array. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `filter()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\nThe `filter()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Array/prototype/find.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.find()\n\nThe `find()` method returns the first element in the provided array that satisfies the provided testing function.\nIf no values satisfy the testing function, [`undefined`](../../../globals/undefined.mdx) is returned.\n\n- If you need the **index** of the found element in the array, use [`findIndex()`](./findIndex.mdx).\n- If you need to find the **index of a value**, use [`indexOf()`](./indexOf.mdx).\n  (It's similar to [`findIndex()`](./findIndex.mdx), but checks each element for equality with the value instead of using a testing function.)\n- If you need to find if a value **exists** in an array, use [`includes()`](./includes.mdx).\n  Again, it checks each element for equality with the value instead of using a testing function.\n- If you need to find if any element satisfies the provided testing function, use [`some()`](./some.mdx).\n\n## Syntax\n\n```js\n// Arrow function\nfind((element) => { /* … */ })\nfind((element, index) => { /* … */ })\nfind((element, index, array) => { /* … */ })\n\n// Callback function\nfind(callbackFn)\nfind(callbackFn, thisArg)\n\n// Inline callback function\nfind(function (element) { /* … */ })\nfind(function (element, index) { /* … */ })\nfind(function (element, index, array) { /* … */ })\nfind(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value to indicate a matching element has been found.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `find()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\nThe first element in the array that satisfies the provided testing function.\nOtherwise, [`undefined`](../../../globals/undefined.mdx) is returned.\n\n## Description\n\nThe `find()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array in ascending-index order, until `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. `find()` then returns that element and stops iterating through the array. If `callbackFn` never returns a truthy value, `find()` returns [`undefined`](../../../globals/undefined.mdx).\n\n`callbackFn` is invoked for _every_ index of the array, not just those with assigned values. Empty slots in sparse arrays behave the same as `undefined`.\n\n`find()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `find()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are visited as if they were `undefined`.\n\nThe `find()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Array/prototype/findIndex.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.findIndex\n\nThe **`findIndex()`** method returns the index of the first element in an array that satisfies the provided testing function.\nIf no elements satisfy the testing function, -1 is returned.\n\nSee also the [`find()`](./find.mdx) method, which returns the first element that satisfies the testing function (rather than its index).\n\n## Syntax\n\n```js\n// Arrow function\nfindIndex((element) => { /* … */ })\nfindIndex((element, index) => { /* … */ })\nfindIndex((element, index, array) => { /* … */ })\n\n// Callback function\nfindIndex(callbackFn)\nfindIndex(callbackFn, thisArg)\n\n// Inline callback function\nfindIndex(function (element) { /* … */ })\nfindIndex(function (element, index) { /* … */ })\nfindIndex(function (element, index, array) { /* … */ })\nfindIndex(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value to indicate a matching element has been found.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `findIndex()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\nThe index of the first element in the array that passes the test. Otherwise, `-1`.\n\n## Description\n\nThe `findIndex()` is an iterative method. It calls a provided `callbackFn` function once for each element in an array in ascending-index order, until `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. `findIndex()` then returns the index of that element and stops iterating through the array. If `callbackFn` never returns a truthy value, `findIndex()` returns `-1`.\n\n`callbackFn` is invoked for _every_ index of the array, not just those with assigned values. Empty slots in sparse arrays behave the same as `undefined`.\n\n`findIndex()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `findIndex()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are visited as if they were `undefined`.\n\nThe `findIndex()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Array/prototype/flat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.flat\n\nThe **`flat()`** method creates a new array with all sub-array\nelements concatenated into it recursively up to the specified depth.\n\n## Syntax\n\n```js\nflat()\nflat(depth)\n```\n\n### Parameters\n\n- `depth` _**optional**_\n  - : The depth level specifying how deep a nested array structure should be flattened.\n    Defaults to 1.\n\n### Return value\n\nA new array with the sub-array elements concatenated into it.\n\n## Description\n\nThe `flat()` method is a copying method. It does not alter `this` but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains the same elements as the ones from the original array.\n\nThe `flat()` method ignores empty slots if the array being flattened is sparse. For example, if `depth` is 1, both empty slots in the root array and in the first level of nested arrays are ignored, but empty slots in further nested arrays are preserved with the arrays themselves.\n\nThe `flat()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. However, its elements must be arrays if they are to be flattened.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Array/prototype/flatMap.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.flatMap()\n\nThe **`flatMap()`** method returns a new array formed by applying a given callback function to each element of the array, and then flattening the result by one level. It is identical to a [`Array.prototype.map()`](./map.mdx) followed by a [`Array.prototype.flat()`](./flat.mdx) of depth 1 (`arr.map(...args).flat()`), but slightly more efficient than calling those two methods separately.\n\n## Syntax\n\n```js\n// Arrow function\nflatMap((element) => { /* … */ })\nflatMap((element, index) => { /* … */ })\nflatMap((element, index, array) => { /* … */ })\n\n// Callback function\nflatMap(callbackFn)\nflatMap(callbackFn, thisArg)\n\n// Inline callback function\nflatMap(function (element) { /* … */ })\nflatMap(function (element, index) { /* … */ })\nflatMap(function (element, index, array) { /* … */ })\nflatMap(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return an array containing new elements of the new array, or a single non-array value to be added to the new array.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `flatMap()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\nA new array with each element being the result of the callback function and flattened\nby a depth of 1.\n\n## Description\n\nThe `flatMap()` method is an iterative method. See [`Array.prototype.map()`](./map.mdx) for a detailed description of the callback function. The `flatMap()` method is identical to [`map(callbackFn, thisArg)`](./map.mdx) followed by [`flat(1)`](./flat.mdx) — for each element, it produces an array of new elements, and concatenates the resulting arrays together to form a new array.\n\nThe `flatMap()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. However, the value returned from `callbackFn` must be an array if it is to be flattened.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Array/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.forEach()\n\nThe **`forEach()`** method executes a provided function once\nfor each array element.\n\n## Syntax\n\n```js\n// Arrow function\nforEach((element) => { /* … */ })\nforEach((element, index) => { /* … */ })\nforEach((element, index, array) => { /* … */ })\n\n// Callback function\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n\n// Inline callback function\nforEach(function (element) { /* … */ })\nforEach(function (element, index) { /* … */ })\nforEach(function (element, index, array) { /* … */ })\nforEach(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value is discarded.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `forEach()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\n`undefined`.\n\n## Description\n\nThe `forEach()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array in ascending-index order. Unlike [`Array.prototype.map()`](./map.mdx), `forEach()` always returns [`undefined`](../../../globals/undefined.mdx) and is not chainable. The typical use case is to execute side effects at the end of a chain.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\n`forEach()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `forEach()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\nThe `forEach()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n\nThere is no way to stop or break a `forEach()` loop other than by throwing an exception. If you need such behavior, the `forEach()` method is the wrong tool.\n\nEarly termination may be accomplished with looping statements like [`for`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for), [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of), and [`for...in`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...in). Array methods like [`Array.prototype.some()`](./some.mdx), [`Array.prototype.some()`](./some.mdx), [`Array.prototype.find()`](./find.mdx), and [`Array.prototype.findIndex()`](./findIndex.mdx) also stops iteration immediately when further iteration is not necessary.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Array/prototype/includes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.includes()\n\nThe **`includes()`** method determines whether an array\nincludes a certain value among its entries, returning `true` or\n`false` as appropriate.\n\n## Syntax\n\n```js\nincludes(searchElement)\nincludes(searchElement, fromIndex)\n```\n\n### Parameters\n\n- `searchElement`\n  - : The value to search for.\n- `fromIndex` _**optional**_\n  - : Zero-based index at which to start searching, converted to an integer.\n    - Negative index counts back from the end of the array — if `fromIndex < 0`, `fromIndex + array.length` is used. However, the array is still searched from front to back in this case.\n    - If `fromIndex < -array.length` or `fromIndex` is omitted, `0` is used, causing the entire array to be searched.\n    - If `fromIndex >= array.length`, the array is not searched and `false` is returned.\n\n### Return value\n\nA boolean value which is `true` if the value `searchElement` is found within the array (or the part of the array indicated by the index `fromIndex`, if specified).\n\n## Description\n\nThe `includes()` method compares `searchElement` to elements of the array using the [SameValueZero](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) algorithm. Values of zero are all considered to be equal, regardless of sign. (That is, `-0` is equal to `0`), but `false` is _not_ considered to be the same as `0`. [`NaN`](../../NaN.mdx) can be correctly searched for.\n\nWhen used on sparse arrays, the `includes()` method iterates empty slots as if they have the value `undefined`.\n\nThe `includes()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Array/prototype/indexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.indexOf()\n\nThe **`indexOf()`** method returns the first index at which a\ngiven element can be found in the array, or -1 if it is not present.\n\n## Syntax\n\n```js\nindexOf(searchElement)\nindexOf(searchElement, fromIndex)\n```\n\n### Parameters\n\n- `searchElement`\n  - : Element to locate in the array.\n- `fromIndex` _**optional**_\n  - : Zero-based index at which to start searching, converted to an integer.\n    - Negative index counts back from the end of the array — if `fromIndex < 0`, `fromIndex + array.length` is used. Note, the array is still searched from front to back in this case.\n    - If `fromIndex < -array.length` or `fromIndex` is omitted, `0` is used, causing the entire array to be searched.\n    - If `fromIndex >= array.length`, the array is not searched and `-1` is returned.\n\n### Return value\n\nThe first index of the element in the array; **-1** if not found.\n\n## Description\n\nThe `indexOf()` method compares `searchElement` to elements of the array using [strict equality](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) (the same algorithm used by the `===` operator).\n\nThe `indexOf()` method skips empty slots in sparse arrays.\n\nThe `indexOf()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Array/prototype/join.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.join()\n\nThe **`join()`** method creates and\nreturns a new string by concatenating all of the elements in an array\n(or an [array-like object](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects)),\nseparated by commas or a specified separator string. If the array has\nonly one item, then that item will be returned without using the separator.\n\n## Syntax\n\n```js\njoin()\njoin(separator)\n```\n\n### Parameters\n\n- `separator` _**optional**_\n  - : Specifies a string to separate each pair of adjacent elements of the array. The\n    separator is converted to a string if necessary. If omitted, the array elements are\n    separated with a comma (\",\"). If `separator` is an empty string, all\n    elements are joined without any characters in between them.\n\n### Return value\n\nA string with all array elements joined. If `arr.length` is\n`0`, the empty string is returned.\n\n## Description\n\nThe string conversions of all array elements are joined into one string. If an element is `undefined`, `null`, it is converted to an empty string instead of the string `\"null\"` or `\"undefined\"`.\n\nThe `join` method is accessed internally by [`Array.prototype.toString()`](./toString.mdx) with no arguments. Overriding `join` of an array instance will override its `toString` behavior as well.\n\nWhen used on sparse arrays, the `join()` method iterates empty slots as if they have the value `undefined`.\n\nThe `join()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Array/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.keys()\n\nThe **`keys()`** method returns a new **Array\nIterator** object that contains the keys for each index in the array.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nA new `Array` iterator object.\n\n## Description\n\nWhen used on sparse arrays, the `keys()` method iterates empty slots as if they have the value `undefined`.\n\nThe `keys()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Array/prototype/lastIndexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.lastIndexOf()\n\nThe **`lastIndexOf()`** method returns the last index at which\na given element can be found in the array, or -1 if it is not present. The array is\nsearched backwards, starting at `fromIndex`.\n\n## Syntax\n\n```js\nlastIndexOf(searchElement)\nlastIndexOf(searchElement, fromIndex)\n```\n\n### Parameters\n\n- `searchElement`\n  - : Element to locate in the array.\n- `fromIndex` _**optional**_\n  - : Zero-based index at which to start searching backwards, converted to an integer.\n    - Negative index counts back from the end of the array — if `fromIndex < 0`, `fromIndex + array.length` is used.\n    - If `fromIndex < -array.length`, the array is not searched and `-1` is returned. You can think of it conceptually as starting at a nonexistent position before the beginning of the array and going backwards from there. There are no array elements on the way, so `searchElement` is never found.\n    - If `fromIndex >= array.length` or `fromIndex` is omitted, `array.length - 1` is used, causing the entire array to be searched. You can think of it conceptually as starting at a nonexistent position beyond the end of the array and going backwards from there. It eventually reaches the real end position of the array, at which point it starts searching backwards through the actual array elements.\n\n### Return value\n\nThe last index of the element in the array; **-1** if not found.\n\n## Description\n\nThe `lastIndexOf()` method compares `searchElement` to elements of the array using [strict equality](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) (the same algorithm used by the `===` operator).\n\nThe `lastIndexOf()` method skips empty slots in sparse arrays.\n\nThe `lastIndexOf()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Array/prototype/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.length\n\nThe **`length`** data property of an `Array` instance represents the number of elements in that array. The value is an unsigned, 32-bit integer that is always numerically greater than the highest index in the array.\n\n## Value\n\nA non-negative integer less than 2<sup>32</sup>.\n\n## Description\n\nThe value of the `length` property is a non-negative integer with a value less than 2<sup>32</sup>.\n\n```js\nconst listA = [1, 2, 3];\nconst listB = new Array(6);\n\nconsole.log(listA.length);\n// 3\n\nconsole.log(listB.length);\n// 6\n\nlistB.length = 2 ** 32; // 4294967296\n// RangeError: Invalid array length\n\nconst listC = new Array(-100); // Negative numbers are not allowed\n// RangeError: Invalid array length\n```\n\nThe array object observes the `length` property, and automatically syncs the `length` value with the array's content. This means:\n\n- Setting `length` to a value smaller than the current length truncates the array — elements beyond the new `length` are deleted.\n- Setting any array index (a non-negative integer smaller than 2<sup>32</sup>) beyond the current `length` extends the array — the `length` property is increased to reflect the new highest index.\n- Setting `length` to an invalid value (e.g. a negative number or a non-integer) throws a `RangeError` exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Array/prototype/map.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.map()\n\nThe **`map()`** method **creates\na new array** populated with the results of calling a provided function on\nevery element in the calling array.\n\n## Syntax\n\n```js\n// Arrow function\nmap((element) => { /* … */ })\nmap((element, index) => { /* … */ })\nmap((element, index, array) => { /* … */ })\n\n// Callback function\nmap(callbackFn)\nmap(callbackFn, thisArg)\n\n// Inline callback function\nmap(function (element) { /* … */ })\nmap(function (element, index) { /* … */ })\nmap(function (element, index, array) { /* … */ })\nmap(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value is added as a single element in the new array.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `map()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\nA new array with each element being the result of the callback function.\n\n## Description\n\nThe `map()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array and constructs a new array from the results.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nThe `map()` method is a copying method. It does not alter `this`. However, the function provided as `callbackFn` can mutate the array. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `map()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `map()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n\nSince `map` builds a new array, calling it without using the returned\narray is an anti-pattern; use [`Array.prototype.forEach()`](./forEach.mdx) or\n`for...of` instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Array/prototype/pop.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.pop()\n\nThe **`pop()`** method removes the **last**\nelement from an array and returns that element. This method changes the length of the\narray.\n\n## Syntax\n\n```js\npop()\n```\n\n### Return value\n\nThe removed element from the array; [`undefined`](../../../globals/undefined.mdx) if the array is empty.\n\n## Description\n\nThe `pop()` method removes the last element from an array and returns that value to the caller. If you call `pop()` on an empty array, it returns [`undefined`](../../../globals/undefined.mdx).\n\n[`Array.prototype.shift()`](./shift.mdx) has similar behavior to `pop()`, but applied to the first element in an array.\n\nThe `pop()` method is a mutating method. It changes the length and the content of `this`. In case you want the value of `this` to be the same, but return a new array with the last element removed, you can use [`arr.slice(0, -1)`](./slice.mdx) instead.\n\nThe `pop()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Array/prototype/push.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.push()\n\nThe **`push()`** method adds one or more elements to the end of\nan array and returns the new length of the array.\n\n## Syntax\n\n```js\npush(element0)\npush(element0, element1)\npush(element0, element1, /* … ,*/ elementN)\n```\n\n### Parameters\n\n- `elementN`\n  - : The element(s) to add to the end of the array.\n\n### Return value\n\nThe new [`Array.prototype.length`](./length.mdx) property of the object upon which the method was called.\n\n## Description\n\nThe `push()` method appends values to an array.\n\n[`Array.prototype.unshift()`](./unshift.mdx)has similar behavior to `push()`, but applied to the start of an array.\n\nThe `push()` method is a mutating method. It changes the length and the content of `this`. In case you want the value of `this` to be the same, but return a new array with elements appended to the end, you can use [`arr.concat([element0, element1, /* ... ,*/ elementN])`](./concat.mdx) instead. Notice that the elements are wrapped in an extra array — otherwise, if the element is an array itself, it would be spread instead of pushed as a single element due to the behavior of `concat()`.\n\nThe `push()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Array/prototype/reduce.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.reduce()\n\nThe **`reduce()`** method executes a user-supplied \"reducer\" callback function on each element of the array, in order, passing in the return value from the calculation on the preceding element.\nThe final result of running the reducer across all elements of the array is a single value.\n\nThe first time that the callback is run there is no \"return value of the previous calculation\".\nIf supplied, an initial value may be used in its place.\nOtherwise the array element at index 0 is used as the initial value and iteration starts from the next element (index 1 instead of index 0).\n\nPerhaps the easiest-to-understand case for `reduce()` is to return the sum of all the elements in an array:\n\nThe reducer walks through the array element-by-element, at each step adding the current array value to the result from the previous step (this result is the running sum of all the previous steps) — until there are no more elements to add.\n\n## Syntax\n\n```js\n// Arrow function\nreduce((accumulator, currentValue) => { /* … */ })\nreduce((accumulator, currentValue, currentIndex) => { /* … */ })\nreduce((accumulator, currentValue, currentIndex, array) => { /* … */ })\n\nreduce((accumulator, currentValue) => { /* … */ }, initialValue)\nreduce((accumulator, currentValue, currentIndex) => { /* … */ }, initialValue)\nreduce((accumulator, currentValue, currentIndex, array) => { /* … */ }, initialValue)\n\n// Callback function\nreduce(callbackFn)\nreduce(callbackFn, initialValue)\n\n// Inline callback function\nreduce(function (accumulator, currentValue) { /* … */ })\nreduce(function (accumulator, currentValue, currentIndex) { /* … */ })\nreduce(function (accumulator, currentValue, currentIndex, array) { /* … */ })\n\nreduce(function (accumulator, currentValue) { /* … */ }, initialValue)\nreduce(function (accumulator, currentValue, currentIndex) { /* … */ }, initialValue)\nreduce(function (accumulator, currentValue, currentIndex, array) { /* … */ }, initialValue)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value becomes the value of the `accumulator` parameter on the next invocation of `callbackFn`. For the last invocation, the return value becomes the return value of `reduce()`.\n\n    The function is called with the following arguments:\n\n    - `accumulator`\n      - : The value resulting from the previous call to `callbackFn`. On first call, `initialValue` if specified, otherwise the value of `array[0]`.\n    - `currentValue`\n      - : The value of the current element. On first call, the value of `array[0]` if an `initialValue` was specified, otherwise the value of `array[1]`.\n    - `currentIndex`\n      - : The index position of `currentValue` in the array. On first call, `0` if `initialValue` was specified, otherwise `1`.\n    - `array`\n      - : The array `reduce()` was called upon.\n\n- `initialValue` _**optional**_\n  - : A value to which `accumulator` is initialized the first time the callback is called.\n    If `initialValue` is specified, `callbackFn` starts executing with the first value in the array as `currentValue`.\n    If `initialValue` is _not_ specified, `accumulator` is initialized to the first value in the array, and `callbackFn` starts executing with the second value in the array as `currentValue`. In this case, if the array is empty (so that there's no first value to return as `accumulator`), an error is thrown.\n\n### Return value\n\nThe value that results from running the \"reducer\" callback function to completion over the entire array.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n\n  - : The array contains no elements and `initialValue` is not provided.\n\n## Description\n\nThe `reduce()` method is an iterative method. It runs a \"reducer\" callback function over all elements in the array, in ascending-index order, and accumulates them into a single value. Every time, the return value of `callbackFn` is passed into `callbackFn` again on next invocation as `accumulator`. The final value of `accumulator` (which is the value returned from `callbackFn` on the final iteration of the array) becomes the return value of `reduce()`.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nUnlike other [iterative methods](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array#iterative_methods), `reduce()` does not accept a `thisArg` argument. `callbackFn` is always called with `undefined` as `this`, which gets substituted with `globalThis` if `callbackFn` is non-strict.\n\n`reduce()` is a central concept in [functional programming](https://en.wikipedia.org/wiki/Functional_programming), where it's not possible to mutate any value, so in order to accumulate all values in an array, one must return a new accumulator value on every iteration. This convention propagates to JavaScript's `reduce()`: you should use [spreading](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) or other copying methods where possible to create new arrays and objects as the accumulator, rather than mutating the existing one. If you decided to mutate the accumulator instead of copying it, remember to still return the modified object in the callback, or the next iteration will receive undefined.\n\n`reduce()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `reduce()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `reduce()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n\n### When to not use reduce()\n\nRecursive functions like `reduce()` can be powerful but sometimes difficult to understand, especially for less-experienced JavaScript developers. If code becomes clearer when using other array methods, developers must weigh the readability tradeoff against the other benefits of using `reduce()`. In cases where `reduce()` is the best choice, documentation and semantic variable naming can help mitigate readability drawbacks.\n\n### Edge cases\n\nIf the array only has one element (regardless of position) and no `initialValue` is provided, or if `initialValue` is provided but the array is empty, the solo value will be returned _without_ calling `callbackFn`.\n\nIf `initialValue` is provided and the array is not empty, then the reduce method will always invoke the callback function starting at index 0.\n\nIf `initialValue` is not provided then the reduce method will act differently for arrays with length larger than 1, equal to 1 and 0, as shown in the following example:\n\n```js\nconst getMax = (a, b) => Math.max(a, b);\n\n// callback is invoked for each element in the array starting at index 0\n[1, 100].reduce(getMax, 50); // 100\n[50].reduce(getMax, 10); // 50\n\n// callback is invoked once for element at index 1\n[1, 100].reduce(getMax); // 100\n\n// callback is not invoked\n[50].reduce(getMax); // 50\n[].reduce(getMax, 1); // 1\n\n[].reduce(getMax); // TypeError\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Array/prototype/reduceRight.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.reduceRight()\n\nThe **`reduceRight()`** method applies a function against an\naccumulator and each value of the array (from right-to-left) to reduce it to a single\nvalue.\n\nSee also [`Array.prototype.reduce()`](./reduce.mdx) for left-to-right.\n\n## Syntax\n\n```js\n// Arrow function\nreduceRight((accumulator, currentValue) => { /* … */ })\nreduceRight((accumulator, currentValue, index) => { /* … */ })\nreduceRight((accumulator, currentValue, index, array) => { /* … */ })\nreduceRight((accumulator, currentValue, index, array) => { /* … */ }, initialValue)\n\n// Callback function\nreduceRight(callbackFn)\nreduceRight(callbackFn, initialValue)\n\n// Callback reducer function\nreduceRight(function (accumulator, currentValue) { /* … */ })\nreduceRight(function (accumulator, currentValue, index) { /* … */ })\nreduceRight(function (accumulator, currentValue, index, array) { /* … */ })\nreduceRight(function (accumulator, currentValue, index, array) { /* … */ }, initialValue)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value becomes the value of the `accumulator` parameter on the next invocation of `callbackFn`. For the last invocation, the return value becomes the return value of `reduce()`.\n\n    The function is called with the following arguments:\n\n    - `accumulator`\n      - : The value previously returned in the last invocation of the callback, or\n        `initialValue`, if supplied. (See below.)\n    - `currentValue`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `reduceRight()` was called upon.\n\n- `initialValue` _**optional**_\n  - : Value to use as accumulator to the first call of the\n    `callbackFn`. If no initial value is supplied, the last element in\n    the array will be used and skipped. Calling reduce or reduceRight on an empty array\n    without an initial value creates a `TypeError`.\n\n### Return value\n\nThe value that results from the reduction.\n\n## Description\n\nThe `reduceRight()` method is an iterative method. It runs a \"reducer\" callback function over all elements in the array, in descending-index order, and accumulates them into a single value.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nUnlike other [iterative methods](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array#iterative_methods), `reduce()` does not accept a `thisArg` argument. `callbackFn` is always called with `undefined` as `this`, which gets substituted with `globalThis` if `callbackFn` is non-strict.\n\n`reduceRight()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `reduceRight()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `reduceRight()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Array/prototype/reverse.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.reverse()\n\nThe **`reverse()`** method reverses an array _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_ and returns the reference to the same array, the first array element now becoming the last, and the last array element becoming the first. In other words, elements order in the array will be turned towards the direction opposite to that previously stated.\n\n## Syntax\n\n```js\nreverse()\n```\n\n### Return value\n\nThe reference to the original array, now reversed. Note that the array is reversed _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_, and no copy is made.\n\n## Description\n\nThe `reverse()` method transposes the elements of the calling array object in\nplace, mutating the array, and returning a reference to the array.\n\nThe `reverse()` method preserves empty slots. If the source array is sparse, the empty slots' corresponding new indices are [deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) and also become empty slots.\n\nThe `reverse()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Array/prototype/shift.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.shift()\n\nThe **`shift()`** method removes the **first**\nelement from an array and returns that removed element. This method changes the length\nof the array.\n\n## Syntax\n\n```js\nshift()\n```\n\n### Return value\n\nThe removed element from the array; [`undefined`](../../../globals/undefined.mdx) if the array is empty.\n\n## Description\n\nThe `shift()` method removes the element at the zeroth index and shifts the\nvalues at consecutive indexes down, then returns the removed value. If the\n[`Array.prototype.length`](./length.mdx) property is 0, [`undefined`](../../../globals/undefined.mdx) is returned.\n\nThe [`Array.prototype.pop()`](./pop.mdx) method has similar behavior to `shift()`, but applied to the last element in an array.\n\nThe `shift()` method is a mutating method. It changes the length and the content of `this`. In case you want the value of `this` to be the same, but return a new array with the first element removed, you can use [`arr.slice(1)`](./slice.mdx) instead.\n\nThe `shift()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Array/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.slice()\n\nThe **`slice()`** method returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of a portion of\nan array into a new array object selected from `start` to `end`\n(`end` not included) where `start` and `end` represent\nthe index of items in that array. The original array will not be modified.\n\n## Syntax\n\n```js\nslice()\nslice(start)\nslice(start, end)\n```\n\n### Parameters\n\n- `start` _**optional**_\n  - : Zero-based index at which to start extraction, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, nothing is extracted.\n- `end` _**optional**_\n  - : Zero-based index at which to end extraction, converted to an integer. `slice()` extracts up to but not including `end`.\n    - Negative index counts back from the end of the array — if `end < 0`, `end + array.length` is used.\n    - If `end < -array.length`, `0` is used.\n    - If `end >= array.length` or `end` is omitted, `array.length` is used, causing all elements until the end to be extracted.\n    - If `end` is positioned before or at `start` after normalization, nothing is extracted.\n\n### Return value\n\nA new array containing the extracted elements.\n\n## Description\n\nThe `slice()` method is a copying method. It does not alter `this` but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains some of the same elements as the ones from the original array.\n\nThe `slice()` method preserves empty slots. If the sliced portion is sparse, the returned array is sparse as well.\n\nThe `slice()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Array/prototype/some.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.some()\n\nThe **`some()`** method tests whether\nat least one element in the array passes the test implemented by the provided\nfunction. It returns true if, in the array, it finds an element for which the provided function returns true; otherwise it returns false. It doesn't modify the array.\n\n## Syntax\n\n```js\n// Arrow function\nsome((element) => { /* … */ })\nsome((element, index) => { /* … */ })\nsome((element, index, array) => { /* … */ })\n\n// Callback function\nsome(callbackFn)\nsome(callbackFn, thisArg)\n\n// Inline callback function\nsome(function (element) { /* … */ })\nsome(function (element, index) { /* … */ })\nsome(function (element, index, array) { /* … */ })\nsome(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) to indicate the element passes the test, and a falsy value otherwise.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `some()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\n`true` if the callback function returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value for at least one element in the array. Otherwise, `false`.\n\n## Description\n\nThe `some()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array, until the `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. If such an element is found, `some()` immediately returns `true` and stops iterating through the array. Otherwise, if `callbackFn` returns a [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value for all elements, `some()` returns `false`.\n\n`some()` acts like the \"there exists\" quantifier in mathematics. In particular, for an empty array, it returns `false` for any condition.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\n`some()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `some()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\nThe `some()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Array/prototype/sort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.sort()\n\nThe **`sort()`** method sorts the elements of an array _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_ and returns the reference to the same array, now sorted. The default sort order is ascending, built upon converting the elements into strings, then comparing their sequences of UTF-16 code units values.\n\nThe time and space complexity of the sort cannot be guaranteed as it depends on the\nimplementation.\n\n## Syntax\n\n```js\n// Functionless\nsort()\n\n// Arrow function\nsort((a, b) => { /* … */ } )\n\n// Compare function\nsort(compareFn)\n\n// Inline compare function\nsort(function compareFn(a, b) { /* … */ })\n```\n\n### Parameters\n\n- `compareFn` _**optional**_\n\n  - : Specifies a function that defines the sort order. If omitted, the array elements are converted to strings, then sorted according to each character's Unicode code point value.\n\n    - `a`\n      - : The first element for comparison.\n    - `b`\n      - : The second element for comparison.\n\n### Return value\n\nThe reference to the original array, now sorted. Note that the array is sorted _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_, and no copy is made.\n\n## Description\n\nIf `compareFn` is not supplied, all non-`undefined` array\nelements are sorted by converting them to strings and comparing strings in UTF-16 code\nunits order. For example, \"banana\" comes before \"cherry\". In a numeric sort, 9 comes\nbefore 80, but because numbers are converted to strings, \"80\" comes before \"9\" in the\nUnicode order. All `undefined` elements are sorted to the end of the array.\n\nThe `sort()` method preserves empty slots. If the source array is sparse, the empty slots are moved to the end of the array, and always come after all the `undefined`.\n\n> **Note:** In UTF-16, Unicode characters above `\\uFFFF` are\n> encoded as two surrogate code units, of the range\n> `\\uD800` - `\\uDFFF`. The value of each code unit is taken\n> separately into account for the comparison. Thus the character formed by the surrogate\n> pair `\\uD855\\uDE51` will be sorted before the character\n> `\\uFF3A`.\n\nIf `compareFn` is supplied, all non-`undefined` array\nelements are sorted according to the return value of the compare function (all\n`undefined` elements are sorted to the end of the array, with no call to\n`compareFn`).\n\n| `compareFn(a, b)` return value | sort order                         |\n| ------------------------------ | ---------------------------------- |\n| > 0                            | sort `a` after `b`                 |\n| < 0                            | sort `a` before `b`                |\n| === 0                          | keep original order of `a` and `b` |\n\nSo, the compare function has the following form:\n\n```js\nfunction compareFn(a, b) {\n  if (a is less than b by some ordering criterion) {\n    return -1;\n  }\n  if (a is greater than b by the ordering criterion) {\n    return 1;\n  }\n  // a must be equal to b\n  return 0;\n}\n```\n\nMore formally, the comparator is expected to have the following properties, in order to ensure proper sort behavior:\n\n- _Pure_: The comparator does not mutate the objects being compared or any external state. (This is important because there's no guarantee _when_ and _how_ the comparator will be called, so any particular call should not produce visible effects to the outside.)\n- _Stable_: The comparator returns the same result with the same pair of input.\n- _Reflexive_: `compareFn(a, a) === 0`.\n- _Anti-symmetric_: `compareFn(a, b)` and `compareFn(b, a)` must both be `0` or have opposite signs.\n- _Transitive_: If `compareFn(a, b)` and `compareFn(b, c)` are both positive, zero, or negative, then `compareFn(a, c)` has the same positivity as the previous two.\n\nA comparator conforming to the constraints above will always be able to return all of `1`, `0`, and `-1`, or consistently return `0`. For example, if a comparator only returns `1` and `0`, or only returns `0` and `-1`, it will not be able to sort reliably because _anti-symmetry_ is broken. A comparator that always returns `0` will cause the array to not be changed at all, but is reliable nonetheless.\n\nThe default lexicographic comparator satisfies all constraints above.\n\nTo compare numbers instead of strings, the compare function can subtract `b`\nfrom `a`. The following function will sort the array in ascending order (if\nit doesn't contain `Infinity` and `NaN`):\n\n```js\nfunction compareNumbers(a, b) {\n  return a - b;\n}\n```\n\nThe `sort()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Array/prototype/splice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.splice()\n\nThe **`splice()`** method changes the contents of an array by\nremoving or replacing existing elements and/or adding new elements [in place](https://en.wikipedia.org/wiki/In-place_algorithm). To access part of an array without modifying it, see [`Array.prototype.slice()`](./slice.mdx).\n\n## Syntax\n\n```js\nsplice(start)\nsplice(start, deleteCount)\nsplice(start, deleteCount, item1)\nsplice(start, deleteCount, item1, item2, itemN)\n```\n\n### Parameters\n\n- `start`\n\n  - : Zero-based index at which to start changing the array, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, no element will be deleted, but the method will behave as an adding function, adding as many elements as provided.\n\n- `deleteCount` _**optional**_\n\n  - : An integer indicating the number of elements in the array to remove from `start`.\n\n    If `deleteCount` is omitted, or if its value is greater than or equal to the number of elements after the position specified by `start`, then all the elements from `start` to the end of the array will be deleted. However, if you wish to pass any `itemN` parameter, you should pass `Infinity` as `deleteCount` to delete all elements after `start`, because an explicit `undefined` gets [converted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#integer_conversion) to `0`.\n\n    If `deleteCount` is `0` or negative, no elements are removed.\n    In this case, you should specify at least one new element (see below).\n\n- `item1`, …, `itemN` _**optional**_\n\n  - : The elements to add to the array, beginning from `start`.\n\n    If you do not specify any elements, `splice()` will only remove elements from the array.\n\n### Return value\n\nAn array containing the deleted elements.\n\nIf only one element is removed, an array of one element is returned.\n\nIf no elements are removed, an empty array is returned.\n\n## Description\n\nThe `splice()` method is a mutating method. It may change the content of `this`. If the specified number of elements to insert differs from the number of elements being removed, the array's `length` will be changed as well. At the same time, it uses [`@@species`](../@@species.mdx) to create a new array instance to be returned.\n\nIf the deleted portion is sparse, the array returned by `splice()` is sparse as well, with those corresponding indices being empty slots.\n\nThe `splice()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Array/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string representing\nthe elements of the array. The elements are converted to Strings using their\n`toLocaleString` methods and these Strings are separated by a locale-specific\nString (such as a comma \",\").\n\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\n- `locales` _**optional**_\n  - : A string with a BCP 47 language tag, or an array of such strings. For the general form and interpretation of the `locales` argument, see [Locale identification and negotiation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation).\n- `options` _**optional**_\n  - : An object with configuration properties. For numbers, see [`Number.prototype.toLocaleString()`](../../../globals/Number/prototype/toLocaleString.mdx); for dates, see [`Date.prototype.toLocaleString()`](../../../globals/Date/prototype/toLocaleString.mdx).\n\n### Return value\n\nA string representing the elements of the array.\n\n## Description\n\nThe `Array.prototype.toLocaleString` method traverses its content, calling the `toLocaleString` method of every element with the `locales` and `options` parameters provided, and concatenates them with an implementation-defined separator (such as a comma \",\"). Note that the method itself does not consume the two parameters — it only passes them to the `toLocaleString()` of each element. The choice of the separator string depends on the host's current locale, not the `locales` parameter.\n\nIf an element is `undefined`, `null`, it is converted to an empty string instead of the string `\"null\"` or `\"undefined\"`.\n\nWhen used on sparse arrays, the `toLocaleString()` method iterates empty slots as if they have the value `undefined`.\n\nThe `toLocaleString()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Array/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.toString()\n\nThe **`toString()`** method returns a string representing the\nspecified array and its elements.\n\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the elements of the array.\n\n## Description\n\nThe `Array` object overrides the `toString` method of `Object`. The `toString` method of arrays calls [`join()`](../../../globals/Array/prototype/join.mdx) internally, which joins the array and returns one string containing each array element separated by commas. If the `join` method is unavailable or is not a function, [`Object.prototype.toString`](../../../globals/Object/prototype/toString.mdx) is used instead, returning `[object Array]`.\n\n```js\nconst arr = [];\narr.join = 1; // re-assign `join` with a non-function\nconsole.log(arr.toString()); // [object Array]\n\nconsole.log(Array.prototype.toString.call({ join: () => 1 })); // 1\n```\n\nJavaScript calls the `toString` method automatically when an array is to be represented as a text value or when an array is referred to in a string concatenation.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Array/prototype/unshift.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.unshift()\n\nThe **`unshift()`** method adds one or more elements to the\nbeginning of an array and returns the new length of the array.\n\n## Syntax\n\n```js\nunshift(element0)\nunshift(element0, element1)\nunshift(element0, element1, /* … ,*/ elementN)\n```\n\n### Parameters\n\n- `elementN`\n  - : The elements to add to the front of the `arr`.\n\n### Return value\n\nThe new [`Array.prototype.length`](./length.mdx) property of the object upon which the\nmethod was called.\n\n## Description\n\nThe `unshift()` method inserts the given values to the beginning of an\narray-like object.\n\n[`Array.prototype.push()`](./push.mdx) has similar behavior to `unshift()`, but applied to the end of an array.\n\nPlease note that, if multiple elements are passed as parameters, they're inserted in\nchunk at the beginning of the object, in the exact same order they were passed as\nparameters. Hence, calling `unshift()` with `n`\narguments **once**, or calling it `n` times with\n**1** argument (with a loop, for example), don't yield the same results.\n\nSee example:\n\n```js\nlet arr = [4, 5, 6];\n\narr.unshift(1, 2, 3);\nconsole.log(arr);\n// [1, 2, 3, 4, 5, 6]\n\narr = [4, 5, 6]; // resetting the array\n\narr.unshift(1);\narr.unshift(2);\narr.unshift(3);\n\nconsole.log(arr);\n// [3, 2, 1, 4, 5, 6]\n```\n\nThe `unshift()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Array/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.values()\n\nThe **`values()`** method returns a new _array [iterator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterator_protocol)_ object that iterates the value of each index in the array.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nA new iterable iterator object.\n\n## Description\n\n`Array.prototype.values()` is the default implementation of [`Array.prototype[@@iterator]()`](./@@iterator.mdx).\n\n```js\nArray.prototype.values === Array.prototype[Symbol.iterator]; // true\n```\n\nWhen used on sparse arrays, the `values()` method iterates empty slots as if they have the value `undefined`.\n\nThe `values()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/ArrayBuffer/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get ArrayBuffer\\[Symbol.species]\n\nThe **`ArrayBuffer[Symbol.species]`** accessor property returns the constructor used to construct return values from array buffer methods.\n\n> **Warning:** The existence of `Symbol.species` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Syntax\n\n```js\nArrayBuffer[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct return values from array buffer methods that create new array buffers.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `ArrayBuffer` objects. Subclass constructors may override it to change the constructor assignment. The default implementation is basically:\n\n```js\n// Hypothetical underlying implementation for illustration\nclass ArrayBuffer {\n  static get [Symbol.species]() {\n    return this;\n  }\n}\n```\n\nBecause of this polymorphic implementation, `Symbol.species` of derived subclasses would also return the constructor itself by default.\n\n```js\nclass SubArrayBuffer extends ArrayBuffer {}\nSubArrayBuffer[Symbol.species] === SubArrayBuffer; // true\n```\n\nWhen calling array buffer methods that do not mutate the existing object but return a new array buffer instance (for example, [`slice()`](./prototype/slice.mdx)), the object's `constructor[Symbol.species]` will be accessed. The returned constructor will be used to construct the return value of the array buffer method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/ArrayBuffer/ArrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer()\n\nThe **`ArrayBuffer()`** constructor is used to create \"ArrayBuffer\" objects.\n\n## Syntax\n\n```js\nnew ArrayBuffer(length)\n```\n\n> **Note:** `ArrayBuffer()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `length`\n  - : The size, in bytes, of the array buffer to create.\n\n### Return value\n\nA new `ArrayBuffer` object of the specified size. Its contents are\ninitialized to 0.\n\n### Exceptions\n\n- [`RangeError`](../RangeError/RangeError.mdx)\n  - : Thrown if the `length` is larger than `Number_MAX_SAFE_INTEGER` (≥ 2<sup>53</sup>) or negative.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/ArrayBuffer/isView.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer.isView\n\nThe **`ArrayBuffer.isView()`** method determines whether the\npassed value is one of the `ArrayBuffer` views,\nsuch as [typed array objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray)\nor a [`DataView`](../DataView/DataView.mdx).\n\n## Syntax\n\n```js\nArrayBuffer.isView(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be checked.\n\n### Return value\n\n`true` if the given argument is one of the `ArrayBuffer` views;\notherwise, `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/ArrayBuffer/prototype/byteLength.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer.prototype.byteLength\n\nThe **`byteLength`** accessor property represents the length of an `ArrayBuffer` in bytes.\n\n## Description\n\nThe `byteLength` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when the array is constructed and cannot be changed. This property returns 0 if this `ArrayBuffer` has been detached.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/ArrayBuffer/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer.prototype.slice()\n\nThe **`slice()`** method returns a new `ArrayBuffer`\nwhose contents are a copy of this `ArrayBuffer`'s bytes from\n`begin`, inclusive, up to `end`, exclusive.\n\n## Syntax\n\n```js\nslice(begin)\nslice(begin, end)\n```\n\n### Parameters\n\n- `begin`\n  - : Zero-based byte index at which to begin slicing.\n- `end` _**optional**_\n  - : Byte index before which to end slicing. If end is unspecified, the new\n    `ArrayBuffer` contains all bytes from begin to the end of this\n    `ArrayBuffer`. If negative, it will make the Byte index begin from the last\n    Byte.\n\n### Return value\n\nA new `ArrayBuffer` object.\n\n## Description\n\nThe `slice()` method copies up to, but not including, the byte indicated by\nthe `end` parameter. If either `begin` or `end` is\nnegative, it refers to an index from the end of the array, as opposed to from the\nbeginning.\n\nThe range specified by the `begin` and `end` parameters is\nclamped to the valid index range for the current array. If the computed length of the\nnew `ArrayBuffer` would be negative, it is clamped to zero.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/BigInt/BigInt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt()\n\nThe **`BigInt()`** function returns a value of type **bigint**.\n\n## Syntax\n\n```js\nBigInt(value)\n```\n\n> **Note:** `BigInt()` can only be called without `new`. Attempting to construct it with `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `value`\n  - : The numeric value of the object being created. It may be a string, an integer, a boolean, or another `BigInt`.\n\n### Return value\n\nA `BigInt` value. Number values must be integers and are converted to BigInts. The boolean value `true` becomes `1n`, and `false` becomes `0n`. Strings are parsed as if they are source text for integer literals, which means they can have leading and trailing whitespaces and can be prefixed with `0b`, `0o`, or `0x`.\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if the parameter is a non-integral number.\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if at least one of these conditions is met:\n    - The parameter cannot be converted to a primitive.\n    - After conversion to a primitive, the result is [`undefined`](../undefined.mdx), `null`, `Symbol`.\n- [`SyntaxError`](../SyntaxError/SyntaxError.mdx)\n  - : Thrown if the parameter is a string that cannot be parsed as a `BigInt`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/BigInt/asIntN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.asIntN()\n\nThe **`BigInt.asIntN`** static method clamps a `BigInt` value to the given number of bits, and returns that value as a signed integer.\n\n## Syntax\n\n```js\nBigInt.asIntN(bits, bigint)\n```\n\n### Parameters\n\n- `bits`\n  - : The amount of bits available for the returned BigInt. Should be an integer between 0 and 2<sup>53</sup> - 1, inclusive.\n- `bigint`\n  - : The BigInt value to clamp to fit into the supplied bits.\n\n### Return value\n\nThe value of `bigint` modulo 2^`bits`, as a signed integer.\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `bits` is negative or greater than 2<sup>53</sup> - 1.\n\n## Description\n\nThe `BigInt.asIntN` method clamps a `BigInt` value to the given number of bits, and interprets the result as a signed integer. For example, for `BigInt.asIntN(3, 25n)`, the value `25n` is clamped to `1n`:\n\n```plain\n25n = 00011001 (base 2)\n          ^=== Clamp to three remaining bits\n===>       001 (base 2) = 1n\n```\n\nIf the leading bit of the remaining number is `1`, the result is negative. For example, `BigInt.asIntN(4, 25n)` yields `-7n`, because `1001` is the encoding of `-7` under two's complement:\n\n```plain\n25n = 00011001 (base 2)\n         ^==== Clamp to four remaining bits\n===>      1001 (base 2) = -7n\n```\n\n> **Note:** `BigInt` values are always encoded as two's complement in binary.\n\nUnlike similar language APIs such as [`Number.prototype.toExponential()`](../Number/prototype/toExponential.mdx), `asIntN` is a static property of `BigInt`, so you always use it as `BigInt.asIntN()`, rather than as a method of a BigInt value. Exposing `asIntN()` as a \"standard library function\" allows [interop with asm.js](https://github.com/tc39/proposal-bigint/blob/master/ADVANCED.md#dont-break-asmjs).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/BigInt/asUintN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.asUintN()\n\nThe **`BigInt.asUintN`** static method clamps a `BigInt` value to the given number of bits, and returns that value as an unsigned integer.\n\n## Syntax\n\n```js\nBigInt.asUintN(bits, bigint)\n```\n\n### Parameters\n\n- `bits`\n  - : The amount of bits available for the returned BigInt. Should be an integer between 0 and 2<sup>53</sup> - 1, inclusive.\n- `bigint`\n  - : The BigInt value to clamp to fit into the supplied bits.\n\n### Return value\n\nThe value of `bigint` modulo 2^`bits`, as an unsigned integer.\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `bits` is negative or greater than 2<sup>53</sup> - 1.\n\n## Description\n\nThe `BigInt.asUintN` method clamps a `BigInt` value to the given number of bits, and interprets the result as an unsigned integer. Unsigned integers have no sign bits and are always non-negative. For example, for `BigInt.asUintN(4, 25n)`, the value `25n` is clamped to `9n`:\n\n```plain\n25n = 00011001 (base 2)\n         ^==== Clamp to four remaining bits\n===>      1001 (base 2) = 9n\n```\n\n> **Note:** `BigInt` values are always encoded as two's complement in binary.\n\nUnlike similar language APIs such as [`Number.prototype.toExponential()`](../Number/prototype/toExponential.mdx), `asUintN` is a static property of `BigInt`, so you always use it as `BigInt.asUintN()`, rather than as a method of a BigInt value. Exposing `asUintN()` as a \"standard library function\" allows [interop with asm.js](https://github.com/tc39/proposal-bigint/blob/master/ADVANCED.md#dont-break-asmjs).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/BigInt/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string with a language-sensitive representation of this BigInt. In implementations with [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) support, this method simply calls `Intl.NumberFormat`.\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` parameters customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat), these parameters correspond exactly to the [`Intl.NumberFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) constructor's parameters. Implementations without `Intl.NumberFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#locales) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored.\n\nSee the [`Intl.NumberFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string with a language-sensitive representation of the given BigInt.\n\nIn implementations with `Intl.NumberFormat`, this is equivalent to `new Intl.NumberFormat(locales, options).format(number)`.\n\n## Performance\n\nWhen formatting large numbers of numbers, it is better to create a\n`Intl.NumberFormat` object and use the function provided by its\n`format()` method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/BigInt/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified `BigInt` value. The trailing \"n\" is not part of the string.\n\n## Syntax\n\n```js\ntoString()\ntoString(radix)\n```\n\n### Parameters\n\n- `radix` _**optional**_\n  - : An integer in the range 2 through 36 specifying the base to use for representing the BigInt value. Defaults to 10.\n\n### Return value\n\nA string representing the specified `BigInt` value.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `radix` is less than 2 or greater than 36.\n\n## Description\n\nThe `BigInt` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../Object/prototype/toString.mdx). For `BigInt` values, the `toString()` method returns a string representation of the value in the specified radix.\n\nFor radixes above 10, the letters of the alphabet indicate digits greater than 9. For example, for hexadecimal numbers (base 16) `a` through `f` are used.\n\nIf the specified BigInt value is negative, the sign is preserved. This is the case even if the radix is 2; the string returned is the positive binary representation of the BigInt value preceded by a `-` sign, **not** the two's complement of the BigInt value.\n\nThe `toString()` method requires its `this` value to be a `BigInt` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to BigInt values.\n\nBecause `BigInt` doesn't have a [`[Symbol.toPrimitive]()`](../../Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `BigInt` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, BigInt _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — rather, they are directly converted using the same algorithm as the initial `toString()` implementation.\n\n```js\nBigInt.prototype.toString = () => \"Overridden\";\nconsole.log(`${1n}`); // \"1\"\nconsole.log(`${Object(1n)}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/BigInt/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.prototype.valueOf()\n\nThe **`valueOf()`** method returns the wrapped primitive value\nof a `BigInt` object.\n\n## Syntax\n\n```js\nbigIntObj.valueOf()\n```\n\n### Return value\n\nA BigInt representing the primitive value of the specified `BigInt` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/BigInt64Array/BigInt64Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt64Array()\n\nThe **`BigInt64Array()`** typed array constructor creates a\nnew `BigInt64Array` object, which is, an array of 64-bit signed integers\nin the platform byte order. If control over byte order is needed, use\n[`DataView`](../DataView/DataView.mdx) instead. The contents are initialized to `0n`. Once\nestablished, you can reference elements in the array using the object's methods, or by\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew BigInt64Array()\nnew BigInt64Array(length)\nnew BigInt64Array(typedArray)\nnew BigInt64Array(object)\n\nnew BigInt64Array(buffer)\nnew BigInt64Array(buffer, byteOffset)\nnew BigInt64Array(buffer, byteOffset, length)\n```\n\n> **Note:** `BigInt64Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/BigUint64Array/BigUint64Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigUint64Array()\n\nThe **`BigUint64Array()`** typed array constructor creates a\nnew `BigUint64Array` object, which is, an array of 64-bit unsigned integers\nin the platform byte order. If control over byte order is needed, use\n[`DataView`](../DataView/DataView.mdx) instead. The contents are initialized to `0n`. Once\nestablished, you can reference elements in the array using the object's methods, or by\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew BigUint64Array()\nnew BigUint64Array(length)\nnew BigUint64Array(typedArray)\nnew BigUint64Array(object)\n\nnew BigUint64Array(buffer)\nnew BigUint64Array(buffer, byteOffset)\nnew BigUint64Array(buffer, byteOffset, length)\n```\n\n> **Note:** `BigUint64Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](..//TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Blob/Blob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob()\n\nThe **`Blob()`** constructor creates a `Blob` object, which represents a file-like object of immutable, raw data.\n\n## Syntax\n\n```js\nnew Blob()\nnew Blob(array)\nnew Blob(array, options)\n```\n\n> **Note:** `Blob()` can only be constructed with `new`. Attempting to call it without `new` throws a `TypeError`.\n\n### Parameters\n\n- `array` _**optional**_\n\n  - : An array of values to include in the `Blob`. These can be [`ArrayBuffer`](../../globals/ArrayBuffer/ArrayBuffer.mdx), [`Blob`](../../globals/Blob/Blob.mdx), or strings. If any of these elements is a [`Blob`](../../globals/Blob/Blob.mdx), its content (and not the object itself) is copied into the Blob being constructed.\n\n- `options` _**optional**_\n\n  - : An object containing optional attributes for the `Blob`.\n    - `type`\n      - : A string indicating the MIME type of the data. The default value is the empty string `\"\"`.\n    - `endings`\n      - : A string indicating how to handle line endings in the data. This can be either `\"transparent\"` (default) to keep line endings unchanged, or `\"native\"` to convert line endings to the platform's native line endings (e.g., `\\r\\n` on Windows).\n\n### Return value\n\nA new `Blob` object containing the specified data.\n\n## Description\n\n`Blob` objects represent data that isn't necessarily in a JavaScript-native format. The `File` interface is based on `Blob`, inheriting its functionality and expanding it to support files on the user's system.\n\nTo construct a `Blob` from other non-blob objects and data, use the `Blob()` constructor. To create a blob that contains a subset of another blob's data, use the [`slice()`](../../globals/Blob/prototype/slice.mdx) method.\n\nThe `type` property of a `Blob` object will match the MIME type specified in the constructor's `options` parameter, defaulting to an empty string if not specified.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Blob/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the `Blob` interface returns a `Promise` that resolves with an `ArrayBuffer` containing the entire contents of the `Blob` as binary data.\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with an `ArrayBuffer` containing the blob's data.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Blob/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.size\n\nThe **`size`** read-only property of the `Blob` interface returns the size of the `Blob` in bytes.\n\n## Value\n\nA number representing the size of the `Blob` in bytes.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Blob/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.slice()\n\nThe **`slice()`** method of the `Blob` interface creates and returns a new `Blob` object which contains data from a subset of the blob on which it's called.\n\n## Syntax\n\n```js\nslice()\nslice(start)\nslice(start, end)\nslice(start, end, contentType)\n```\n\n### Parameters\n\n- `start` _**optional**_\n  - : The 0-based index of the first byte to include in the new `Blob`. If negative, it refers to an index from the end of the `Blob`. The default value is 0.\n- `end` _**optional**_\n  - : The 0-based index of the first byte that will not be included in the new `Blob`. If negative, it refers to an index from the end of the `Blob`. The default value is `size`.\n- `contentType` _**optional**_\n  - : A string indicating the content type to assign to the new `Blob`. The default value is an empty string.\n\n### Return value\n\nA new `Blob` object containing the specified subset of data.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Blob/prototype/stream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.stream()\n\nThe **`stream()`** method of the `Blob` interface returns a `ReadableStream` that can be used to read the contents of the `Blob`.\n\n## Syntax\n\n```js\nstream()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `ReadableStream` that provides the data contained within the `Blob`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Blob/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.text()\n\nThe **`text()`** method of the `Blob` interface returns a `Promise` that resolves with a string containing the contents of the blob, interpreted as UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a string containing the blob's data as a text string. The data is always interpreted as UTF-8.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Blob/prototype/type.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.type\n\nThe **`type`** read-only property of the `Blob` interface returns the MIME type of the `Blob`.\n\n## Value\n\nA string indicating the MIME type of the `Blob`. If the type cannot be determined, this returns an empty string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Boolean/Boolean.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Boolean()\n\nThe **`Boolean()`** constructor can create `Boolean` objects or return primitive values of type boolean.\n\n## Syntax\n\n```js\nnew Boolean(value)\nBoolean(value)\n```\n\n> **Note:** `Boolean()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\n- `value`\n  - : The initial value of the `Boolean` object.\n\n### Return value\n\nWhen `Boolean()` is called as a constructor (with `new`), it creates a `Boolean` object, which is **not** a primitive.\n\nWhen `Boolean()` is called as a function (without `new`), it coerces the parameter to a boolean primitive.\n\n> **Warning:** You should rarely find yourself using `Boolean` as a constructor.\n\n## Description\n\nThe value passed as the first parameter is [converted to a boolean value](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean#boolean_coercion). If the value is omitted or is `0`, `-0`, `0n`, [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null), `false`, [`NaN`](../NaN.mdx), [`undefined`](../undefined.mdx), or the empty string (`\"\"`), then the object has an initial value of `false`. All other values, including any object, an empty array (`[]`), or the string `\"false\"`, create an object with an initial value of `true`.\n\n> **Note:** When the non-standard property [`document.all`](https://developer.mozilla.org/docs/Web/API/Document/all) is used as an argument for this constructor, the result is a `Boolean` object with the value `false`. This property is legacy and non-standard and should not be used.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Boolean/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Boolean.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified boolean value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified boolean value.\n\n## Description\n\nThe `Boolean` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../Object/prototype/toString.mdx). For `Boolean` values, the `toString` method returns a string representation of the boolean value, which is either `\"true\"` or `\"false\"`.\n\nThe `toString()` method requires its `this` value to be a `Boolean` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to boolean values.\n\nBecause `Boolean` doesn't have a [`[Symbol.toPrimitive]()`](../../Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `Boolean` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, boolean _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — rather, they are directly converted using the same algorithm as the initial `toString()` implementation.\n\n```js\nBoolean.prototype.toString = () => \"Overridden\";\nconsole.log(`${true}`); // \"true\"\nconsole.log(`${new Boolean(true)}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Boolean/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Boolean.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a\n`Boolean` object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nThe primitive value of the given `Boolean` object.\n\n## Description\n\nThe `valueOf()` method of `Boolean` returns the primitive value\nof a `Boolean` object or literal `Boolean` as a Boolean data type.\n\nThis method is usually called internally by JavaScript and not explicitly in code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/ByteLengthQueuingStrategy/ByteLengthQueuingStrategy.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ByteLengthQueuingStrategy()\n\nThe **`ByteLengthQueuingStrategy()`**\nconstructor creates and returns a `ByteLengthQueuingStrategy` object\ninstance.\n\n## Syntax\n\n```js\nnew ByteLengthQueuingStrategy(highWaterMark)\n```\n\n### Parameters\n\nAn object with the following property:\n\n- `highWaterMark`\n\n  - : The total number of bytes that can be contained in the internal queue before backpressure is applied.\n\n    Unlike `CountQueuingStrategy()` where the `highWaterMark` parameter specifies a simple count of the number of chunks, with `ByteLengthQueuingStrategy()`, the `highWaterMark` parameter specifies a number of _bytes_ — specifically, given a stream of chunks, how many bytes worth of those chunks (rather than a count of how many of those chunks) can be contained in the internal queue before backpressure is applied.\n\n### Return value\n\nAn instance of the `ByteLengthQueuingStrategy` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/ByteLengthQueuingStrategy/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ByteLengthQueuingStrategy.size()\n\nThe **`size()`** method of the\n`ByteLengthQueuingStrategy` interface returns the given chunk's\n`byteLength` property.\n\n## Syntax\n\n```js\nsize(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : A chunk of data being passed through the stream.\n\n### Return value\n\nAn integer representing the byte length of the given chunk.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/CompressionStream/CompressionStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CompressionStream()\n\nThe **`CompressionStream()`** constructor creates a new `CompressionStream` object which compresses a stream of data.\n\n## Syntax\n\n```js\nnew CompressionStream(format)\n```\n\n### Parameters\n\n- `format`\n\n  - : One of the following allowed compression formats:\n\n    - `\"gzip\"`\n    - `\"deflate\"`\n    - `\"deflate-raw\"`\n\n## Exceptions\n\n- `TypeError`\n  - : Thrown if the format passed to the constructor is not supported.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/CompressionStream/prototype/readable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CompressionStream.readable\n\nThe **`readable`** read-only property of the `CompressionStream` interface returns a `ReadableStream`.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/CompressionStream/prototype/writable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CompressionStream.writable\n\nThe **`writable`** read-only property of the `CompressionStream` interface returns a `WritableStream`.\n\n## Value\n\nA `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/CryptoKey/CryptoKey.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CryptoKey\n\nThe **`CryptoKey`** interface represents a cryptographic key obtained from one of the [`SubtleCrypto`](../SubtleCrypto/SubtleCrypto.mdx) method [`importKey()`](../SubtleCrypto/prototype/importKey.mdx).\n\n## Instance properties\n\n- [`type`](./prototype/type.mdx) _**readonly**_\n  - : The type of key the object represents. It may take one of the following values: `\"secret\"`, `\"private\"` or `\"public\"`.\n\n- [`extractable`](./prototype/extractable.mdx) _**readonly**_\n  - : A boolean value indicating whether or not the key may be extracted.\n\n- [`algorithm`](./prototype/algorithm.mdx) _**readonly**_\n  - : An object describing the algorithm for which this key can be used and any associated extra parameters.\n\n- [`usages`](./prototype/usages.mdx) _**readonly**_\n  - : An `Array` of strings, indicating what can be done with the key. Possible values for array elements are `\"encrypt\"`, `\"decrypt\"`, `\"sign\"`, `\"verify\"`, `\"deriveKey\"`, `\"deriveBits\"`, `\"wrapKey\"`, and `\"unwrapKey\"`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/CryptoKey/prototype/algorithm.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# algorithm\n\nThe read-only **`algorithm`** property of the [`CryptoKey`](../CryptoKey.mdx) interface returns an object describing the algorithm for which this key can be used, and any associated extra parameters.\n\nThe object returned depends of the algorithm used to generate the key.\n\n## Value\n\nAn object matching:\n\n- [`RsaHashedImportParams`](../../RsaHashedImportParams/RsaHashedImportParams.mdx) if the algorithm is any of the RSA variants.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/CryptoKey/prototype/extractable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# extractable\n\nThe read-only **`extractable`** property indicates whether or not the key may be extracted.\n\nIf the key cannot be exported, an exception will be thrown if an attempt to extract the key is made.\n\n## Value\n\nA boolean value that is `true` if the key can be exported and `false` if not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/CryptoKey/prototype/type.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# type\n\nThe read-only **`type`** property indicates which kind of key is represented by the object. It can have the following values:\n\n- `\"secret\"`: This key is a secret key for use with a symmetric algorithm.\n- `\"private\"`: This key is the private half of an asymmetric algorithm's key pair.\n- `\"public\"`: This key is the public half of an asymmetric algorithm's key pair.\n\n## Value\n\nOne of the following strings: `\"secret\"`, `\"private\"`, or `\"public\"`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/CryptoKey/prototype/usages.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# usages\n\nThe read-only **`usages`** property indicates what can be done with the key.\n\n## Value\n\nAn `Array` of strings from the following list:\n\n- `\"encrypt\"`: The key may be used to encrypt messages.\n- `\"decrypt\"`: The key may be used to decrypt messages.\n- `\"sign\"`: The key may be used to sign messages.\n- `\"verify\"`: The key may be used to verify signatures.\n- `\"deriveKey\"`: The key may be used in deriving a new key.\n- `\"deriveBits\"`: The key may be used in deriving bits.\n- `\"wrapKey\"`: The key may be used to wrap a key.\n- `\"unwrapKey\"`: The key may be used to unwrap a key.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/DOMException/DOMException.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException()\n\nThe **`DOMException()`** constructor returns a `DOMException` object with a specified message and name.\n\n## Syntax\n\n```js\nnew DOMException()\nnew DOMException(message)\nnew DOMException(message, name)\n```\n\n### Parameters\n\n- `message` _optional_\n  - : A description of the exception. If not present, the empty string `''` is\n    used.\n- `name` _optional_\n  - : A string. If the specified name is a [standard error name](#error-names), then getting the [`code`](./code.mdx) property of the `DOMException` object will return the code number corresponding to the specified name.\n\n### Return value\n\nA newly created `DOMException` object.\n\n## Error names\n\nCommon error names are listed here. Some APIs define their own sets of names, so this is not necessarily a complete list.\n\nNote that the following deprecated historical errors don't have an error name but instead have only a legacy constant code value and a legacy constant name:\n\n- Legacy code value: `2`, legacy constant name: `DOMSTRING_SIZE_ERR`\n- Legacy code value: `6`, legacy constant name: `NO_DATA_ALLOWED_ERR`\n- Legacy code value: `16`, legacy constant name: `VALIDATION_ERR`\n\n> **Note:** Because historically the errors were identified by a numeric value that corresponded with a named variable defined to have that value, some of the entries below indicate the legacy code value and constant name that were used in the past.\n\n- `IndexSizeError`\n  - : The index is not in the allowed range. (Legacy code value: `1` and legacy constant name: `INDEX_SIZE_ERR`)\n- `HierarchyRequestError`\n  - : The node tree hierarchy is not correct. (Legacy code value: `3` and legacy constant name: `HIERARCHY_REQUEST_ERR`)\n- `WrongDocumentError`\n  - : The object is in the wrong `Document`. (Legacy code value: `4` and legacy constant name: `WRONG_DOCUMENT_ERR`)\n- `InvalidCharacterError`\n  - : The string contains invalid characters. (Legacy code value: `5` and legacy constant name: `INVALID_CHARACTER_ERR`)\n- `NoModificationAllowedError`\n  - : The object cannot be modified. (Legacy code value: `7` and legacy constant name: `NO_MODIFICATION_ALLOWED_ERR`)\n- `NotFoundError`\n  - : The object cannot be found here. (Legacy code value: `8` and legacy constant name: `NOT_FOUND_ERR`)\n- `NotSupportedError`\n  - : The operation is not supported. (Legacy code value: `9` and legacy constant name: `NOT_SUPPORTED_ERR`)\n- `InvalidStateError`\n  - : The object is in an invalid state. (Legacy code value: `11` and legacy constant name: `INVALID_STATE_ERR`)\n- `InUseAttributeError`\n  - : The attribute is in use. (Legacy code value: `10` and legacy constant name: `INUSE_ATTRIBUTE_ERR`)\n- `SyntaxError`\n  - : The string did not match the expected pattern. (Legacy code value: `12` and legacy constant name: `SYNTAX_ERR`)\n- `InvalidModificationError`\n  - : The object cannot be modified in this way. (Legacy code value: `13` and legacy constant name: `INVALID_MODIFICATION_ERR`)\n- `NamespaceError`\n  - : The operation is not allowed by Namespaces in XML. (Legacy code value: `14` and legacy constant name: `NAMESPACE_ERR`)\n- `InvalidAccessError`\n  - : The object does not support the operation or argument. (Legacy code value: `15` and legacy constant name: `INVALID_ACCESS_ERR`)\n- `TypeMismatchError` *deprecated*\n  - : The type of the object does not match the expected type. (Legacy code value: `17` and legacy constant name: `TYPE_MISMATCH_ERR`) This value is deprecated; the JavaScript `TypeError` exception is now raised instead of a `DOMException` with this value.\n- `SecurityError`\n  - : The operation is insecure. (Legacy code value: `18` and legacy constant name: `SECURITY_ERR`)\n- `NetworkError`\n  - : A network error occurred. (Legacy code value: `19` and legacy constant name: `NETWORK_ERR`)\n- `AbortError`\n  - : The operation was aborted. (Legacy code value: `20` and legacy constant name: `ABORT_ERR`)\n- `URLMismatchError`\n  - : The given URL does not match another URL. (Legacy code value: `21` and legacy constant name: `URL_MISMATCH_ERR`)\n- `QuotaExceededError`\n  - : The quota has been exceeded. (Legacy code value: `22` and legacy constant name: `QUOTA_EXCEEDED_ERR`)\n- `TimeoutError`\n  - : The operation timed out. (Legacy code value: `23` and legacy constant name: `TIMEOUT_ERR`)\n- `InvalidNodeTypeError`\n  - : The node is incorrect or has an incorrect ancestor for this operation. (Legacy code value: `24` and legacy constant name: `INVALID_NODE_TYPE_ERR`)\n- `DataCloneError`\n  - : The object can not be cloned. (Legacy code value: `25` and legacy constant name: `DATA_CLONE_ERR`)\n- `EncodingError`\n  - : The encoding or decoding operation failed (No legacy code value and constant name).\n- `NotReadableError`\n  - : The input/output read operation failed (No legacy code value and constant name).\n- `UnknownError`\n  - : The operation failed for an unknown transient reason (e.g. out of memory) (No legacy code value and constant name).\n- `ConstraintError`\n  - : A mutation operation in a transaction failed because a constraint was not satisfied (No legacy code value and constant name).\n- `DataError`\n  - : Provided data is inadequate (No legacy code value and constant name).\n- `TransactionInactiveError`\n  - : A request was placed against a transaction that is currently not active or is finished (No legacy code value and constant name).\n- `ReadOnlyError`\n  - : The mutating operation was attempted in a \"readonly\" transaction (No legacy code value and constant name).\n- `VersionError`\n  - : An attempt was made to open a database using a lower version than the existing version (No legacy code value and constant name).\n- `OperationError`\n  - : The operation failed for an operation-specific reason (No legacy code value and constant name).\n- `NotAllowedError`\n  - : The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission (No legacy code value and constant name)."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/DOMException/code.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException.prototype.code\n\nThe **`code`** read-only property of the `DOMException` interface returns one of the legacy [error code constants](./DOMException.mdx#error-names), or `0` if none match.\n\nThis field is used for historical reasons. New DOM exceptions don't use this anymore: they put this info in the [`name`](./name.mdx) attribute.\n\n## Value\n\nOne of the [error code constants](./DOMException.mdx#error-names), or `0` if none match.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/DOMException/message.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException.prototype.message\n\nThe **`message`** read-only property of the `DOMException` interface returns a string representing a message or description associated with the given [error name](./DOMException.mdx#error-names).\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/DOMException/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException.prototype.name\n\nThe **`name`** read-only property of the `DOMException` interface returns a string that contains one of the strings associated with an [error name](./DOMException.mdx#error-names).\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/DataView/DataView.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView()\n\nThe **`DataView()`** constructor is used to create `DataView` objects.\n\n## Syntax\n\n```js\nnew DataView(buffer)\nnew DataView(buffer, byteOffset)\nnew DataView(buffer, byteOffset, byteLength)\n```\n\n> **Note:** `DataView()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `buffer`\n  - : An existing `ArrayBuffer` to use as\n    the storage backing the new `DataView` object.\n- `byteOffset` _**optional**_\n  - : The offset, in bytes, to the first byte in the above buffer for the new view to\n    reference. If unspecified, the buffer view starts with the first byte.\n- `byteLength` _**optional**_\n  - : The number of elements in the byte array. If unspecified, the view's length will\n    match the buffer's length.\n\n### Return value\n\nA new `DataView` object representing the specified data buffer.\n\n### Exceptions\n\n- [`RangeError`](../RangeError/RangeError.mdx)\n\n  - : Thrown if the `byteOffset` or `byteLength` parameter values\n    result in the view extending past the end of the buffer.\n\n    For example, if the buffer is 16 bytes long, the `byteOffset` is 8, and\n    the `byteLength` is 10, this error is thrown because the resulting view\n    tries to extend 2 bytes past the total length of the buffer.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/DataView/prototype/buffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.buffer\n\nThe **`buffer`** accessor property represents the `ArrayBuffer` referenced by the `DataView` at construction time.\n\n## Description\n\nThe `buffer` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when the `DataView` is constructed and cannot be changed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/DataView/prototype/byteLength.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.byteLength\n\nThe **`byteLength`** accessor property represents the length (in bytes) of the dataview.\n\n## Description\n\nThe `byteLength` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when an `DataView` is constructed and cannot be changed. If the `DataView` is not specifying an offset or a `byteLength`, the `byteLength` of the referenced `ArrayBuffer` or `SharedArrayBuffer` will be returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/DataView/prototype/byteOffset.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.byteOffset\n\nThe **`byteOffset`** accessor property represents the offset (in bytes) of this view from the start of its `ArrayBuffer`.\n\n## Description\n\nThe `byteOffset` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when an `DataView` is constructed and cannot be changed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/DataView/prototype/getBigInt64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getBigInt64()\n\nThe **`getBigInt64()`** method gets a signed 64-bit integer\n(long long) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetBigInt64(byteOffset)\ngetBigInt64(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to read the data from.\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is read.\n\n### Return value\n\nA `BigInt`.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would read beyond the end\n    of the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/DataView/prototype/getBigUint64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getBigUint64()\n\nThe **`getBigUint64()`** method gets an unsigned 64-bit integer\n(unsigned long long) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetBigUint64(byteOffset)\ngetBigUint64(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to read the data from.\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is read.\n\n### Return value\n\nA `BigInt`.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would read beyond the end\n    of the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/DataView/prototype/getFloat32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getFloat32()\n\nThe **`getFloat32()`** method gets a signed 32-bit float\n(float) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetFloat32(byteOffset)\ngetFloat32(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 32-bit float number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/DataView/prototype/getFloat64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getFloat64()\n\nThe **`getFloat64()`** method gets a signed 64-bit float\n(double) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetFloat64(byteOffset)\ngetFloat64(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 64-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 64-bit float number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/DataView/prototype/getInt16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getInt16()\n\nThe **`getInt16()`** method gets a signed 16-bit integer\n(short) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetInt16(byteOffset)\ngetInt16(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 16-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/DataView/prototype/getInt32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getInt32()\n\nThe **`getInt32()`** method gets a signed 32-bit integer (long)\nat the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetInt32(byteOffset)\ngetInt32(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in bytes, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 32-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/DataView/prototype/getInt8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getInt8()\n\nThe **`getInt8()`** method gets a signed 8-bit integer (byte)\nat the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetInt8(byteOffset)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n\n### Return value\n\nA signed 8-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/DataView/prototype/getUint16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getUint16()\n\nThe **`getUint16()`** method gets an unsigned 16-bit integer\n(unsigned short) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n\n\n## Syntax\n\n```js\ngetUint16(byteOffset)\ngetUint16(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nAn unsigned 16-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/DataView/prototype/getUint32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getUint32()\n\nThe **`getUint32()`** method gets an unsigned 32-bit integer\n(unsigned long) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n\n\n## Syntax\n\n```js\ngetUint32(byteOffset)\ngetUint32(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nAn unsigned 32-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/DataView/prototype/getUint8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getUint8()\n\nThe **`getUint8()`** method gets an unsigned 8-bit integer\n(unsigned byte) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetUint8(byteOffset)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n\n### Return value\n\nAn unsigned 8-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/DataView/prototype/setBigInt64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setBigInt64()\n\nThe **`setBigInt64()`** method stores a signed 64-bit integer\n(long long) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetBigInt64(byteOffset, value)\nsetBigInt64(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to store the data from.\n- value\n  - : The value to set as a `BigInt`. The highest possible value that fits in\n    a signed 64-bit integer is\n    `2n ** (64n -1n) - 1n` (`9223372036854775807n`). Upon\n    overflow, it will be negative (`-9223372036854775808n`).\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/DataView/prototype/setBigUint64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setBigUint64()\n\nThe **`setBigUint64()`** method stores an unsigned 64-bit\ninteger (unsigned long long) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetBigUint64(byteOffset, value)\nsetBigUint64(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to store the data from.\n- value\n  - : The value to set as a `BigInt`. The highest possible value that fits in\n    an unsigned 64-bit integer is\n    `2n ** 64n - 1n`\n    (`18446744073709551615n`). Upon overflow, it will be zero\n    (`0n`).\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/DataView/prototype/setFloat32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setFloat32()\n\nThe **`setFloat32()`** method stores a signed 32-bit float\n(float) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetFloat32(byteOffset, value)\nsetFloat32(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/DataView/prototype/setFloat64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setFloat64()\n\nThe **`setFloat64()`** method stores a signed 64-bit float\n(double) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetFloat64(byteOffset, value)\nsetFloat64(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 64-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/DataView/prototype/setInt16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setInt16()\n\nThe **`setInt16()`** method stores a signed 16-bit integer\n(short) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetInt16(byteOffset, value)\nsetInt16(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/DataView/prototype/setInt32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setInt32()\n\nThe **`setInt32()`** method stores a signed 32-bit integer\n(long) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetInt32(byteOffset, value)\nsetInt32(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/DataView/prototype/setInt8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setInt8()\n\nThe **`setInt8()`** method stores a signed 8-bit integer (byte)\nvalue at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetInt8(byteOffset, value)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/DataView/prototype/setUint16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setUint16()\n\nThe **`setUint16()`** method stores an unsigned 16-bit integer\n(unsigned short) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetUint16(byteOffset, value)\nsetUint16(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/DataView/prototype/setUint32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setUint32()\n\nThe **`setUint32()`** method stores an unsigned 32-bit integer\n(unsigned long) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetUint32(byteOffset, value)\nsetUint32(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/DataView/prototype/setUint8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setUint8()\n\nThe **`setUint8()`** method stores an unsigned 8-bit integer\n(byte) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetUint8(byteOffset, value)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/Date.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date()\n\nThe **`Date()`** constructor can create a `Date` instance or return a string representing the current time.\n\n## Syntax\n\n```js\nnew Date()\nnew Date(value)\nnew Date(dateString)\nnew Date(dateObject)\n\nnew Date(year, monthIndex)\nnew Date(year, monthIndex, day)\nnew Date(year, monthIndex, day, hours)\nnew Date(year, monthIndex, day, hours, minutes)\nnew Date(year, monthIndex, day, hours, minutes, seconds)\nnew Date(year, monthIndex, day, hours, minutes, seconds, milliseconds)\n\nDate()\n```\n\n> **Note:** `Date()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\nThere are five basic forms for the `Date()` constructor:\n\n#### No parameters\n\nWhen no parameters are provided, the newly-created `Date` object represents the current date and time as of the time of instantiation.\n\n#### Time value or timestamp number\n\n- `value`\n  - : An integer value representing the number of milliseconds since January 1, 1970, 00:00:00 UTC (the ECMAScript epoch, equivalent to the UNIX epoch), with leap seconds ignored. Keep in mind that most [UNIX Timestamp](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_16) functions are only accurate to the nearest second.\n\n#### Date string\n\n- `dateString`\n\n  - : A string value representing a date, in a format recognized by the [`Date.parse()`](./parse.mdx) method. (The ECMA262 spec specifies a [simplified version of ISO 8601](https://tc39.es/ecma262/#sec-date-time-string-format), but other formats can be implementation-defined, which commonly include [IETF-compliant RFC 2822 timestamps](https://datatracker.ietf.org/doc/html/rfc2822#page-14).)\n\n    > **Note:** When parsing date strings with the `Date` constructor (and `Date.parse`, they are equivalent), always make sure that the input conforms to the ISO 8601 format (`YYYY-MM-DDTHH:mm:ss.sssZ`) — the parsing behavior with other formats is implementation-defined and may not work across all browsers. Support for [RFC 2822](https://datatracker.ietf.org/doc/html/rfc2822) format strings is by convention only. A library can help if many different formats are to be accommodated.\n    >\n    > Date-only strings (e.g. `\"1970-01-01\"`) are treated as UTC, while date-time strings (e.g. `\"1970-01-01T12:00\"`) are treated as local. You are therefore also advised to make sure the input format is consistent between the two types.\n\n#### Date object\n\n- `dateObject`\n  - : An existing `Date` object. This effectively makes a copy of the existing `Date` object with the same date and time. This is equivalent to `new Date(dateObject.valueOf())`, except the `valueOf()` method is not called.\n\nWhen one parameter is passed to the `Date()` constructor, `Date` instances are specially treated. All other values are [converted to primitives](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion). If the result is a string, it will be parsed as a date string. Otherwise, the resulting primitive is further coerced to a number and treated as a timestamp.\n\n#### Individual date and time component values\n\nGiven at least a year and month, this form of `Date()` returns a `Date` object whose component values (year, month, day, hour, minute, second, and millisecond) all come from the following parameters. Any missing fields are given the lowest possible value (`1` for `day` and `0` for every other component). The parameter values are all evaluated against the local time zone, rather than UTC.\n\nIf any parameter overflows its defined bounds, it \"carries over\". For example, if a `monthIndex` greater than `11` is passed in, those months will cause the year to increment; if a `minutes` greater than `59` is passed in, `hours` will increment accordingly, etc. Therefore, `new Date(1990, 12, 1)` will return January 1st, 1991; `new Date(2020, 5, 19, 25, 65)` will return 2:05 A.M. June 20th, 2020.\n\nSimilarly, if any parameter underflows, it \"borrows\" from the higher positions. For example, `new Date(2020, 5, 0)` will return May 31st, 2020.\n\n- `year`\n  - : Integer value representing the year. Values from `0` to `99` map to the years `1900` to `1999`. All other values are the actual year. See the [example](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years).\n- `monthIndex`\n  - : Integer value representing the month, beginning with `0` for January to `11` for December.\n- `day` _**optional**_\n  - : Integer value representing the day of the month. The default is `1`.\n- `hours` _**optional**_\n  - : Integer value between `0` and `23` representing the hour of the day. Defaults to `0`.\n- `minutes` _**optional**_\n  - : Integer value representing the minute segment of a time. The default is `0` minutes past the hour.\n- `seconds` _**optional**_\n  - : Integer value representing the second segment of a time. The default is `0` seconds past the minute.\n- `milliseconds` _**optional**_\n  - : Integer value representing the millisecond segment of a time. The default is `0` milliseconds past the second.\n\n### Return value\n\nCalling `new Date()` (the `Date()` constructor) returns a [`Date`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date) object. If called with an invalid date string, or if the date to be constructed will have a UNIX timestamp less than `-8,640,000,000,000,000` or greater than `8,640,000,000,000,000` milliseconds, it returns a `Date` object whose [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toString) method returns the literal string `Invalid Date`.\n\nCalling the `Date()` function (without the `new` keyword) returns a string representation of the current date and time, exactly as `new Date().toString()` does. Any arguments given in a `Date()` function call (without the `new` keyword) are ignored; regardless of whether it's called with an invalid date string — or even called with any arbitrary object or other primitive as an argument — it always returns a string representation of the current date and time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/UTC.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.UTC()\n\nThe **`Date.UTC()`** method accepts parameters similar to the\n`Date` constructor, but treats them as UTC. It returns the number of\nmilliseconds since January 1, 1970, 00:00:00 UTC.\n\n\n\n## Syntax\n\n```js\nDate.UTC(year)\nDate.UTC(year, monthIndex)\nDate.UTC(year, monthIndex, day)\nDate.UTC(year, monthIndex, day, hour)\nDate.UTC(year, monthIndex, day, hour, minute)\nDate.UTC(year, monthIndex, day, hour, minute, second)\nDate.UTC(year, monthIndex, day, hour, minute, second, millisecond)\n```\n\n- `year`\n\n  - : Integer value representing the year.\n\n    Values from `0` to `99` map to the years\n    `1900` to `1999`. All other values are the actual year.\n    See the [example](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years).\n\n- `monthIndex` _**optional**_\n  - : An integer between `0` (January) and `11` (December)\n    representing the month. Since ECMAScript 2017 it defaults to `0` if\n    omitted. _(Up until ECMAScript 2016, `monthIndex` was a required\n    parameter. As of ES2017, it no longer is.)_\n- `day` _**optional**_\n  - : An integer between `1` and `31` representing the day of the\n    month. If omitted, defaults to `1`.\n- `hour` _**optional**_\n  - : An integer between `0` and `23` representing the hours. If\n    omitted, defaults to `0`.\n- `minute` _**optional**_\n  - : An integer between `0` and `59` representing the minutes. If\n    omitted, defaults to `0`.\n- `second` _**optional**_\n  - : An integer between `0` and `59` representing the seconds. If\n    omitted, defaults to `0`.\n- `millisecond` _**optional**_\n  - : An integer between `0` and `999` representing the\n    milliseconds. If omitted, defaults to `0`.\n\n### Return value\n\nA number representing the number of milliseconds for the given date since January 1,\n1970, 00:00:00, UTC.\n\n## Description\n\n`UTC()` takes comma-delimited date and time parameters and returns the\nnumber of milliseconds between January 1, 1970, 00:00:00, universal time and the\nspecified date and time.\n\nYears between `0` and `99` are converted to a year in the\n20th century `(1900 + year)`. For example, `95` is\nconverted to the year `1995`.\n\nThe `UTC()` method differs from the `Date` constructor in two\nways:\n\n1. `Date.UTC()` uses universal time instead of the local time.\n2. `Date.UTC()` returns a time value as a number instead of creating a\n   `Date` object.\n\nIf a parameter is outside of the expected range, the `UTC()` method updates\nthe other parameters to accommodate the value. For example, if `15` is used\nfor `monthIndex`, the year will be incremented by 1\n`(year + 1)` and `3` will be used for the month.\n\n`UTC()` is a static method of `Date`, so it's called as\n`Date.UTC()` rather than as a method of a `Date` instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/now.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.now()\n\nThe static **`Date.now()`** method returns the number of milliseconds elapsed since the [epoch](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps), which is defined as the midnight at the beginning of January 1, 1970, UTC.\n\n## Syntax\n\n```js\nDate.now()\n```\n\n### Return value\n\nA number representing the number of milliseconds elapsed since the [epoch](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps), which is defined as the midnight at the beginning of January 1, 1970, UTC.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/parse.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.parse()\n\nThe **`Date.parse()`** method parses a string representation of\na date, and returns the number of milliseconds since January 1, 1970, 00:00:00 UTC or\n`NaN` if the string is unrecognized or, in some cases, contains illegal date\nvalues (e.g. 2015-02-31).\n\nOnly the [ISO 8601 format](https://tc39.es/ecma262/#sec-date-time-string-format) (`YYYY-MM-DDTHH:mm:ss.sssZ`) is explicitly specified to be supported. Other formats are implementation-defined and may not work across all browsers. A library can help if many different formats are to be accommodated.\n\n## Syntax\n\n```js\nDate.parse(dateString)\n```\n\n### Parameters\n\n- `dateString`\n  - : A string representing [a simplification of the ISO 8601 calendar date extended format](#date-time-string-format).\n    (Other formats may be used, but results are implementation-dependent.)\n\n### Return value\n\nA number representing the milliseconds elapsed since January 1, 1970, 00:00:00 UTC and\nthe date obtained by parsing the given string representation of a date. If the argument\ndoesn't represent a valid date, [`NaN`](../NaN.mdx) is returned.\n\n## Description\n\nThe `parse()` method takes a date string (such as\n`\"2011-10-10T14:48:00\"`) and returns the number of milliseconds since January\n1, 1970, 00:00:00 UTC.\n\nThis function is useful for setting date values based on string values, for example in\nconjunction with the [`setTime()`](./prototype/setTime.mdx) method and the\n`Date` object.\n\n### Date Time String Format\n\nThe standard string representation of a date time string is a simplification of the ISO\n8601 calendar date extended format.\n(See the section [Date Time String Format](https://tc39.es/ecma262/#sec-date-time-string-format)\nin the ECMAScript specification for more details.)\n\nFor example, `\"2011-10-10\"` (_date-only_ form),\n`\"2011-10-10T14:48:00\"` (_date-time_ form), or\n`\"2011-10-10T14:48:00.000+09:00\"` (_date-time_ form with milliseconds\nand time zone) can be passed and will be parsed. When the time zone offset is absent,\ndate-only forms are interpreted as a UTC time and date-time forms are interpreted as\nlocal time.\n\nWhile time zone specifiers are used during date string parsing to interpret the\nargument, the value returned is always the number of milliseconds between January 1,\n1970 00:00:00 UTC and the point in time represented by the argument or `NaN`.\n\nBecause `parse()` is a static method of `Date`, it is called as\n`Date.parse()` rather than as a method of a `Date` instance.\n\n### Fall-back to implementation-specific date formats\n\n> **Note:** This section contains implementation-specific behavior that can be inconsistent\n> across implementations.\n\nThe ECMAScript specification states: If the String does not conform to the standard\nformat the function may fall back to any implementation–specific heuristics or\nimplementation–specific parsing algorithm. Unrecognizable strings or dates containing\nillegal element values in ISO formatted strings shall cause `Date.parse()` to\nreturn [`NaN`](../NaN.mdx).\n\nHowever, invalid values in date strings not recognized as simplified ISO format as\ndefined by ECMA-262 may or may not result in [`NaN`](../NaN.mdx), depending on the browser\nand values provided, e.g.:\n\n```js\n// Non-ISO string with invalid date values\nnew Date(\"23/25/2014\");\n```\n\nwill be treated as a local date of 25 November, 2015 in Firefox 30 and an invalid date\nin Safari 7.\n\nHowever, if the string is recognized as an ISO format string and it contains invalid\nvalues, it will return [`NaN`](../NaN.mdx):\n\n```js\n// ISO string with invalid values\nnew Date(\"2014-25-23\").toISOString();\n// throws \"RangeError: invalid date\"\n```\n\nSpiderMonkey's implementation-specific heuristic can be found in [`jsdate.cpp`](https://searchfox.org/mozilla-central/source/js/src/jsdate.cpp?rev=64553c483cd1#889).\nThe string `\"10 06 2014\"` is an example of a non-conforming ISO format and\nthus falls back to a custom routine. See also this [rough outline](https://bugzilla.mozilla.org/show_bug.cgi?id=1023155#c6) on\nhow the parsing works.\n\n```js\nnew Date(\"10 06 2014\");\n```\n\nwill be treated as a local date of 6 October, 2014, and not 10 June, 2014.\n\nOther examples:\n\n```js\nnew Date(\"foo-bar 2014\").toString();\n// returns: \"Invalid Date\"\n\nDate.parse(\"foo-bar 2014\");\n// returns: NaN\n```\n\n### Differences in assumed time zone\n\n> **Note:** This section contains implementation-specific behavior that can be inconsistent\n> across implementations.\n\nGiven a non-standard date string of `\"March 7, 2014\"`, `parse()` assumes a local time zone, but given a simplification of the ISO 8601 calendar date extended format such as `\"2014-03-07\"`, it will assume a time zone of UTC. Therefore `Date` objects produced using those strings may represent different moments in time depending on the version of ECMAScript supported unless the system is set with a local time zone of UTC. This means that two date strings that appear equivalent may result in two different values depending on the format of the string that is being converted.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/@@toPrimitive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype\\[Symbol.toPrimitive]\n\nThe **`[Symbol.toPrimitive]()`** method converts a `Date`\nobject to a primitive value.\n\n## Syntax\n\n```js\nDate()[Symbol.toPrimitive](hint)\n```\n\n### Return value\n\nThe primitive value of the given `Date` object. Depending on the argument,\nthe method can return either a string or a number.\n\n## Description\n\nThe `[Symbol.toPrimitive]()` method of the `Date` object returns a\nprimitive value, that is either of type number or of type string.\n\nIf `hint` is `string` or `default`,\n`[Symbol.toPrimitive]()` tries to call the [`toString`](../../Object/prototype/toString.mdx) method. If the `toString` property does not exist, it tries to\ncall the [`valueOf`](../../Object/prototype/valueOf.mdx) method and if the\n`valueOf` does not exist either, `[Symbol.toPrimitive]()` throws a\n[`TypeError`](../../../globals/TypeError/TypeError.mdx).\n\nIf `hint` is `number`, `[Symbol.toPrimitive]()` first tries\nto call `valueOf`, and if that fails, it calls `toString`.\n\nJavaScript calls the `[Symbol.toPrimitive]()` method to convert an object to a\nprimitive value. You rarely need to invoke the `[Symbol.toPrimitive]()` method\nyourself; JavaScript automatically invokes it when encountering an object where a\nprimitive value is expected.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/getDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getDate()\n\nThe **`getDate()`** method returns the day of the month for the\nspecified date according to local time.\n\n## Syntax\n\n```js\ngetDate()\n```\n\n### Return value\n\nAn integer number, between 1 and 31, representing the day of the month for the given\ndate according to local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/getDay.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getDay()\n\nThe **`getDay()`** method returns the\nday of the week for the specified date according to local time, where 0 represents\nSunday. For the day of the month, see [`Date.prototype.getDate()`](./getDate.mdx).\n\n## Syntax\n\n```js\ngetDay()\n```\n\n### Return value\n\nAn integer number, between 0 and 6, corresponding to the day of the week for the given\ndate, according to local time: 0 for Sunday, 1 for Monday, 2 for Tuesday, and so on.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/getFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getFullYear()\n\nThe **`getFullYear()`** method returns the year of the\nspecified date according to local time.\n\nUse this method instead of the [`Date.prototype.getYear()`](./getYear.mdx) method.\n\n## Syntax\n\n```js\ngetFullYear()\n```\n\n### Return value\n\nA number corresponding to the year of the given date, according to local time.\n\n## Description\n\nThe value returned by `getFullYear()` is an absolute number. For dates\nbetween the years 1000 and 9999, `getFullYear()` returns a four-digit number,\nfor example, 1995. Use this function to make sure a year is compliant with years after\n2000\\.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/getHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getHours()\n\nThe **`getHours()`** method returns the hour for the specified\ndate, according to local time.\n\n## Syntax\n\n```js\ngetHours()\n```\n\n### Return value\n\nAn integer number, between 0 and 23, representing the hour for the given date according\nto local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/getMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getMilliseconds()\n\nThe **`getMilliseconds()`** method returns the milliseconds in\nthe specified date according to local time.\n\n## Syntax\n\n```js\ngetMilliseconds()\n```\n\n### Return value\n\nA number, between 0 and 999, representing the milliseconds for the given date according\nto local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/getMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getMinutes()\n\nThe **`getMinutes()`** method returns the minutes in the\nspecified date according to local time.\n\n## Syntax\n\n```js\ngetMinutes()\n```\n\n### Return value\n\nAn integer number, between 0 and 59, representing the minutes in the given date\naccording to local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/getMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getMonth()\n\nThe **`getMonth()`** method returns the month in the specified\ndate according to local time, as a zero-based value (where zero indicates the first\nmonth of the year).\n\n## Syntax\n\n```js\ngetMonth()\n```\n\n### Return value\n\nAn integer number, between 0 and 11, representing the month in the given date according\nto local time. 0 corresponds to January, 1 to February, and so on.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/getSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getSeconds()\n\nThe **`getSeconds()`** method returns the seconds in the\nspecified date according to local time.\n\n## Syntax\n\n```js\ngetSeconds()\n```\n\n### Return value\n\nAn integer number, between 0 and 59, representing the seconds in the given date\naccording to local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/getTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getTime()\n\nThe **`getTime()`** method returns the number of milliseconds since the [epoch](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps), which is defined as the midnight at the beginning of January 1, 1970, UTC.\n\nYou can use this method to help assign a date and time to another `Date`\nobject. This method is functionally equivalent to the [`Date.prototype.valueOf()`](./valueOf.mdx) method.\n\n## Syntax\n\n```js\ngetTime()\n```\n\n### Return value\n\nA number representing the milliseconds elapsed between 1 January 1970 00:00:00 UTC and\nthe given date.\n\n## Description\n\nTo offer protection against timing attacks and fingerprinting, the precision of\n`new Date().getTime()` might get rounded depending on browser settings.\n\n```js\n// reduced time precision (2ms) in Firefox 60\nnew Date().getTime();\n// 1519211809934\n// 1519211810362\n// 1519211811670\n// …\n\n// reduced time precision with `privacy.resistFingerprinting` enabled\nnew Date().getTime();\n// 1519129853500\n// 1519129858900\n// 1519129864400\n// …\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/getTimezoneOffset.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getTimezoneOffset()\n\nThe **`getTimezoneOffset()`** method returns the difference, in minutes, between a date as evaluated in the UTC time zone, and the same date as evaluated in the local time zone.\n\n## Syntax\n\n```js\ngetTimezoneOffset()\n```\n\n### Return value\n\nThe difference, in minutes, between the date as evaluated in the UTC time zone and as evaluated in the local time zone. The actual local time algorithm is implementation-defined, and the return value is allowed to be zero in runtimes without appropriate data.\n\n## Description\n\n`date.getTimezoneOffset()` returns the difference, in minutes, between `date` as evaluated in the UTC time zone and as evaluated in the local time zone — that is, the time zone of the host system in which the browser is being used (if the code is run from the Web in a browser), or otherwise the host system of whatever JavaScript runtime (for example, a Node.js environment) the code is executed in.\n\n### Negative values and positive values\n\nThe number of minutes returned by `getTimezoneOffset()` is positive if the local time zone is behind UTC, and negative if the local time zone is ahead of UTC. For example, for UTC+10, `-600` will be returned.\n\n| Current time zone | Return value |\n| ----------------- | ------------ |\n| UTC-8             | 480          |\n| UTC               | 0            |\n| UTC+3             | -180         |\n\n### Varied results in Daylight Saving Time (DST) regions\n\nIn a region that annually shifts in and out of Daylight Saving Time (DST), as `date` varies, the number of minutes returned by calling `getTimezoneOffset()` can be non-uniform.\n\n> **Note:** `getTimezoneOffset()`'s behavior will never differ based on the time when the code is run — its behavior is always consistent when running in the same region. Only the value of `date` affects the result.\n\nIn most implementations, the [IANA time zone database](https://en.wikipedia.org/wiki/Daylight_saving_time#IANA_time_zone_database) (tzdata) is used to precisely determine the offset of the local timezone at the moment of the `date`. However, if such information is unavailable, an implementation may return zero.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/getUTCDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCDate()\n\nThe **`getUTCDate()`** method returns the day of the month (from\n1 to 31) in the specified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCDate()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer number ranging from 1 to 31\nrepresenting day of month for the given date, according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/getUTCDay.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCDay()\n\nThe **`getUTCDay()`** method returns the day of the week in the\nspecified date according to universal time, where 0 represents Sunday.\n\n## Syntax\n\n```js\ngetUTCDay()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer number corresponding to the day\nof the week for the given date, according to universal time: 0 for Sunday, 1 for Monday,\n2 for Tuesday, and so on.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/getUTCFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCFullYear()\n\nThe **`getUTCFullYear()`** method returns the year in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCFullYear()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer representing the year in the given date\naccording to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n\n## Description\n\nThe value returned by `getUTCFullYear()` is an absolute number that is\ncompliant with year-2000, for example, 1995.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/getUTCHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCHours()\n\nThe **`getUTCHours()`** method returns the hours in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCHours()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 23, representing the hours in the given date according\nto Coordinated Universal Time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/getUTCMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCMilliseconds()\n\nThe **`getUTCMilliseconds()`** method returns the milliseconds\nportion of the time object's value according to universal time.\n\n## Syntax\n\n```js\ngetUTCMilliseconds()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 999, representing\nthe milliseconds portion of the given `Date` object according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n\nNot to be confused with Unix epoch time. To get the total milliseconds since 1970/01/01,\nuse the [`getTime()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/getTime) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/getUTCMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCMinutes()\n\nThe **`getUTCMinutes()`** method returns the minutes in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCMinutes()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 59,\nrepresenting the minutes in the given date according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/getUTCMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCMonth()\n\nThe **`getUTCMonth()`** returns the month of the specified date\naccording to universal time, as a zero-based value (where zero indicates the first month\nof the year).\n\n## Syntax\n\n```js\ngetUTCMonth()\n```\n\n### Return value\n\nA number. If the `Date` object represents a valid date, an integer number, between 0 and 11,\ncorresponding to the month of the given date according to universal time. 0 for January,\n1 for February, 2 for March, and so on. Otherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/getUTCSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCSeconds()\n\nThe **`getUTCSeconds()`** method returns the seconds in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCSeconds()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 59, representing\nthe seconds in the given date according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/getYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getYear()\n\nThe **`getYear()`** method returns the year in the specified\ndate according to local time. Because `getYear()` does not return full years\n(\"year 2000 problem\"), it is no longer used and has been replaced by the\n[`Date.prototype.getFullYear()`](./getFullYear.mdx) method.\n\n## Syntax\n\n```js\ngetYear()\n```\n\n### Return value\n\nA number representing the year of the given date, according to local time, minus 1900.\n\n## Description\n\n- For years greater than or equal to 2000, the value returned by\n  `getYear()` is 100 or greater. For example, if the year is 2026,\n  `getYear()` returns 126.\n- For years between and including 1900 and 1999, the value returned by\n  `getYear()` is between 0 and 99. For example, if the year is 1976,\n  `getYear()` returns 76.\n- For years less than 1900, the value returned by `getYear()` is less than 0. For example, if the year is 1800, `getYear()` returns -100.\n\nTo take into account years before and after 2000, you should use\n[`Date.prototype.getFullYear()`](./getFullYear.mdx) instead of\n`getYear()` so that the year is specified in full.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/setDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setDate()\n\nThe **`setDate()`** method changes the day of the month of a given `Date` instance, based on local time.\n\nTo instead change the day of the month for a given `Date` instance based on UTC time, use the [`Date.prototype.setUTCDate()`](./setUTCDate.mdx) method.\n\n## Syntax\n\n```js\nsetDate(dayValue)\n```\n\n### Parameters\n\n- `dayValue`\n  - : An integer representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the given date (the\n`Date` object is also changed in place).\n\n## Description\n\nIf the `dayValue` is outside of the range of date values for the month, `setDate()` will update the `Date` object accordingly.\n\nFor example, if 0 is provided for `dayValue`, the date will be set to the last day of the previous month. If you use 40 for `dayValue`, and the month stored in the `Date` object is June, the day will be changed to 10 and the month will be incremented to July.\n\nIf a negative number is provided for `dayValue`, the date will be set counting backwards from the last day of the previous month. -1 would result in the date being set to 1 day before the last day of the previous month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/setFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setFullYear()\n\nThe **`setFullYear()`** method sets the full year for a\nspecified date according to local time. Returns new timestamp.\n\n## Syntax\n\n```js\nsetFullYear(yearValue)\nsetFullYear(yearValue, monthValue)\nsetFullYear(yearValue, monthValue, dateValue)\n```\n\n### Parameters\n\n- `yearValue`\n  - : An integer specifying the numeric value of the year, for example, 1995.\n- `monthValue`\n  - : Optional. An integer between 0 and 11 representing the months January through\n    December.\n- `dateValue`\n  - : Optional. An integer between 1 and 31 representing the day of the month. If you\n    specify the `dateValue` parameter, you must also specify the\n    `monthValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `monthValue` and\n`dateValue` parameters, the values returned from the\n[`Date.prototype.getMonth()`](./getMonth.mdx) and\n[`Date.prototype.getDate()`](./getDate.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range, `setFullYear()`\nattempts to update the other parameters and the date information in the\n`Date` object accordingly. For example, if you specify 15 for\n`monthValue`, the year is incremented by 1\n(`yearValue + 1`), and 3 is used for the month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/setHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setHours()\n\nThe **`setHours()`** method sets the hours for a specified date\naccording to local time, and returns the number of milliseconds since January 1, 1970\n00:00:00 UTC until the time represented by the updated `Date` instance.\n\n## Syntax\n\n```js\nsetHours(hoursValue)\nsetHours(hoursValue, minutesValue)\nsetHours(hoursValue, minutesValue, secondsValue)\nsetHours(hoursValue, minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `hoursValue`\n  - : Ideally, an integer between 0 and 23, representing the hour. If a value greater than\n    23 is provided, the datetime will be incremented by the extra hours.\n- `minutesValue`\n  - : Optional. Ideally, an integer between 0 and 59, representing the minutes. If a value\n    greater than 59 is provided, the datetime will be incremented by the extra minutes.\n- `secondsValue`\n  - : Optional. Ideally, an integer between 0 and 59, representing the seconds. If a value\n    greater than 59 is provided, the datetime will be incremented by the extra seconds. If\n    you specify the `secondsValue` parameter, you must also specify\n    the `minutesValue`.\n- `msValue`\n  - : Optional. Ideally, a number between 0 and 999, representing the milliseconds. If a\n    value greater than 999 is provided, the datetime will be incremented by the extra\n    milliseconds. If you specify the `msValue` parameter, you must\n    also specify the `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between January 1, 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `minutesValue`,\n`secondsValue`, and `msValue` parameters,\nthe values returned from the [`Date.prototype.getMinutes()`](./getMinutes.mdx),\n[`Date.prototype.getSeconds()`](./getSeconds.mdx), and\n[`Date.prototype.getMilliseconds()`](./getMilliseconds.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range, `setHours()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes will\nbe incremented by 1 (`minutesValue + 1`), and 40 will be used for\nseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/setMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setMilliseconds()\n\nThe **`setMilliseconds()`** method sets the milliseconds for a\nspecified date according to local time.\n\n## Syntax\n\n```js\nsetMilliseconds(millisecondsValue)\n```\n\n### Parameters\n\n- `millisecondsValue`\n  - : A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you specify a number outside the expected range, the date information in the\n`Date` object is updated accordingly. For example, if you specify 1005, the\nnumber of seconds is incremented by 1, and 5 is used for the milliseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/setMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setMinutes()\n\nThe **`setMinutes()`** method sets the minutes for a specified\ndate according to local time.\n\n## Syntax\n\n```js\nsetMinutes(minutesValue)\nsetMinutes(minutesValue, secondsValue)\nsetMinutes(minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `minutesValue`\n  - : An integer between 0 and 59, representing the minutes.\n- `secondsValue`\n  - : Optional. An integer between 0 and 59, representing the seconds. If you specify the\n    `secondsValue` parameter, you must also specify the\n    `minutesValue`.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds. If you specify\n    the `msValue` parameter, you must also specify the\n    `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `secondsValue` and\n`msValue` parameters, the values returned from\n[`Date.prototype.getSeconds()`](./getSeconds.mdx) and\n[`Date.prototype.getMilliseconds()`](./getMilliseconds.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range, `setMinutes()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes will\nbe incremented by 1 (`minutesValue + 1`), and 40 will be used for\nseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/setMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setMonth()\n\nThe **`setMonth()`** method sets the month for a specified date according to the currently set year.\n\n## Syntax\n\n```js\nsetMonth(monthValue)\nsetMonth(monthValue, dayValue)\n```\n\n### Parameters\n\n- `monthValue`\n  - : A zero-based integer representing the month of the year offset from the start of the\n    year. So, 0 represents January, 11 represents December, -1 represents December of the\n    previous year, and 12 represents January of the following year.\n- `dayValue`\n  - : Optional. An integer from 1 to 31, representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `dayValue` parameter, the value\nreturned from the [`Date.prototype.getDate()`](./getDate.mdx) method is used.\n\nIf a parameter you specify is outside of the expected range, `setMonth()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 15 for `monthValue`, the year will be\nincremented by 1, and 3 will be used for month.\n\nThe current day of month will have an impact on the behavior of this method.\nConceptually it will add the number of days given by the current day of the month to the\n1st day of the new month specified as the parameter, to return the new date.\nFor example, if the current value is 31st January 2016, calling setMonth with a value of 1 will return 2nd March 2016.\nThis is because in 2016 February had 29 days.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/setSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setSeconds()\n\nThe **`setSeconds()`** method sets the seconds for a specified\ndate according to local time.\n\n## Syntax\n\n```js\nsetSeconds(secondsValue)\nsetSeconds(secondsValue, msValue)\n```\n\n### Parameters\n\n- `secondsValue`\n  - : An integer between 0 and 59, representing the seconds.\n- `msValue` _**optional**_\n  - : Optional. A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `msValue` parameter, the value returned\nfrom the [`Date.prototype.getMilliseconds()`](./getMilliseconds.mdx) method is\nused.\n\nIf a parameter you specify is outside of the expected range, `setSeconds()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes stored\nin the `Date` object will be incremented by 1, and 40 will be used for\nseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/setTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setTime()\n\nThe **`setTime()`** method sets the `Date` object\nto the time represented by a number of milliseconds since January 1, 1970, 00:00:00 UTC.\n\n## Syntax\n\n```js\nsetTime(timeValue)\n```\n\n### Parameters\n\n- `timeValue`\n  - : An integer representing the number of milliseconds since 1 January 1970, 00:00:00\n    UTC.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date\n(effectively, the value of the argument).\n\n## Description\n\nUse the `setTime()` method to help assign a date and time to another\n`Date` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/setUTCDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCDate()\n\nThe **`setUTCDate()`** method changes the day of the month of a given `Date` instance, based on UTC time.\n\nTo instead change the day of the month for a given `Date` instance based on local time, use the [`Date.prototype.setDate()`](././setDate.mdx) method.\n\n## Syntax\n\n```js\nsetUTCDate(dayValue)\n```\n\n### Parameters\n\n- `dayValue`\n  - : An integer from 1 to 31, representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf the `dayValue` is outside of the range of date values for the month, `setDate()` will update the `Date` object accordingly.\n\nFor example, if 0 is provided for `dayValue`, the date will be set to the last day of the previous month. If you use 40 for `dayValue`, and the month stored in the `Date` object is June, the day will be changed to 10 and the month will be incremented to July.\n\nIf a negative number is provided for `dayValue`, the date will be set counting backwards from the last day of the previous month. -1 would result in the date being set to 1 day before the last day of the previous month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/setUTCFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCFullYear()\n\nThe **`setUTCFullYear()`** method sets the full year for a\nspecified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCFullYear(yearValue)\nsetUTCFullYear(yearValue, monthValue)\nsetUTCFullYear(yearValue, monthValue, dayValue)\n```\n\n### Parameters\n\n- `yearValue`\n  - : An integer specifying the numeric value of the year, for example, 1995.\n- `monthValue`\n  - : Optional. An integer between 0 and 11 representing the months January through\n    December.\n- `dayValue`\n  - : Optional. An integer between 1 and 31 representing the day of the month. If you\n    specify the `dayValue` parameter, you must also specify the\n    `monthValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `monthValue` and\n`dayValue` parameters, the values returned from the\n[`Date.prototype.getUTCMonth()`](./getUTCMonth.mdx) and\n[`Date.prototype.getUTCDate()`](./getUTCDate.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range,\n`setUTCFullYear()` attempts to update the other parameters and the date\ninformation in the `Date` object accordingly. For example, if you specify 15\nfor `monthValue`, the year is incremented by 1\n(`yearValue + 1`), and 3 is used for the month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/setUTCHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCHours()\n\nThe **`setUTCHours()`** method sets the hour for a specified\ndate according to universal time, and returns the number of milliseconds since January\n1, 1970 00:00:00 UTC until the time represented by the updated `Date`\ninstance.\n\n## Syntax\n\n```js\nsetUTCHours(hoursValue)\nsetUTCHours(hoursValue, minutesValue)\nsetUTCHours(hoursValue, minutesValue, secondsValue)\nsetUTCHours(hoursValue, minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `hoursValue`\n  - : An integer between 0 and 23, representing the hour.\n- `minutesValue`\n  - : Optional. An integer between 0 and 59, representing the minutes.\n- `secondsValue`\n  - : Optional. An integer between 0 and 59, representing the seconds. If you specify the\n    `secondsValue` parameter, you must also specify the\n    `minutesValue`.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds. If you specify\n    the `msValue` parameter, you must also specify the\n    `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between January 1, 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `minutesValue`,\n`secondsValue`, and `msValue` parameters,\nthe values returned from the [`Date.prototype.getUTCMinutes()`](./getUTCMinutes.mdx), [`Date.prototype.getUTCSeconds()`](./getUTCSeconds.mdx),\nand [`Date.prototype.getUTCMilliseconds()`](./getUTCMilliseconds.mdx) methods\nare used.\n\nIf a parameter you specify is outside of the expected range, `setUTCHours()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes will\nbe incremented by 1 (`minutesValue + 1`), and 40 will be used for seconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/setUTCMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCMilliseconds()\n\nThe **`setUTCMilliseconds()`** method sets the milliseconds for\na specified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCMilliseconds(millisecondsValue)\n```\n\n### Parameters\n\n- `millisecondsValue`\n  - : A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf a parameter you specify is outside of the expected range,\n`setUTCMilliseconds()` attempts to update the date information in the\n`Date` object accordingly. For example, if you use 1100 for\n`millisecondsValue`, the seconds stored in the `Date`\nobject will be incremented by 1, and 100 will be used for milliseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/setUTCMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCMinutes()\n\nThe **`setUTCMinutes()`** method sets the minutes for a\nspecified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCMinutes(minutesValue)\nsetUTCMinutes(minutesValue, secondsValue)\nsetUTCMinutes(minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `minutesValue`\n  - : An integer between 0 and 59, representing the minutes.\n- `secondsValue`\n  - : Optional. An integer between 0 and 59, representing the seconds. If you specify the\n    `secondsValue` parameter, you must also specify the\n    `minutesValue`.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds. If you specify\n    the `msValue` parameter, you must also specify the\n    `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `secondsValue` and\n`msValue` parameters, the values returned from\n[`Date.prototype.getUTCSeconds()`](./getUTCSeconds.mdx) and\n[`Date.prototype.getUTCMilliseconds()`](./getUTCMilliseconds.mdx) methods are\nused.\n\nIf a parameter you specify is outside of the expected range,\n`setUTCMinutes()` attempts to update the date information in the\n`Date` object accordingly. For example, if you use 100 for\n`secondsValue`, the minutes will be incremented by 1\n(`minutesValue + 1`), and 40 will be used for seconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/setUTCMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCMonth()\n\nThe **`setUTCMonth()`** method sets the month for a specified\ndate according to universal time.\n\n## Syntax\n\n```js\nsetUTCMonth(monthValue)\nsetUTCMonth(monthValue, dayValue)\n```\n\n### Parameters\n\n- `monthValue`\n  - : An integer between 0 and 11, representing the months January through December.\n- `dayValue`\n  - : Optional. An integer from 1 to 31, representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `dayValue` parameter, the value returned from the\n[`Date.prototype.getUTCDate()`](./getUTCDate.mdx) method is used.\n\nIf a parameter you specify is outside of the expected range, `setUTCMonth()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 15 for `monthValue`, the year will be incremented by\n1, and 3 will be used for month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/setUTCSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCSeconds()\n\nThe **`setUTCSeconds()`** method sets the seconds for a\nspecified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCSeconds(secondsValue)\nsetUTCSeconds(secondsValue, msValue)\n```\n\n### Parameters\n\n- `secondsValue`\n  - : An integer between 0 and 59, representing the seconds.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `msValue` parameter, the value returned from the\n[`Date.prototype.getUTCMilliseconds()`](./getUTCMilliseconds.mdx) method is\nused.\n\nIf a parameter you specify is outside of the expected range,\n`setUTCSeconds()` attempts to update the date information in the\n`Date` object accordingly. For example, if you use 100 for\n`secondsValue`, the minutes stored in the `Date` object will be\nincremented by 1, and 40 will be used for seconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/setYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setYear()\n\nThe legacy **`setYear()`** method sets the year for a specified date according to local time.\n\nHowever, the way the legacy `setYear()` method sets year values is different from how the preferred [`Date.prototype.setFullYear()`](./setFullYear.mdx) method sets year values — and in some cases, also different from how `new Date()` and [`Date.parse()`](../parse.mdx) set year values. Specifically, given two-digit numbers, such as `22` and `61`:\n\n- `setYear()` interprets any two-digit number as an offset to `1900`; so `date.setYear(22)` results in the year value being set to `1922`, and `date.setYear(61)` results in the year value being set to `1961`. (In contrast, while `new Date(61, 1)` also results in the year value being set to `1961`, `new Date(\"2/1/22\")` results in the year value being set to `2022`; and similarly for [`Date.parse()`](../parse.mdx)).\n\n- [`Date.prototype.setFullYear()`](./setFullYear.mdx) does no special interpretation but instead uses the literal two-digit value as-is to set the year; so `date.setFullYear(61)` results in the year value being set to `0061`, and `date.setFullYear(22)` results in the year value being set to `0022`.\n\nBecause of those differences in behavior, you should no longer use the legacy `setYear()` method, but should instead use the preferred [`Date.prototype.setFullYear()`](./setFullYear.mdx) method.\n\n## Syntax\n\n```js\nsetYear(yearValue)\n```\n\n### Parameters\n\n- `yearValue`\n  - : An integer.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf `yearValue` is a number between 0 and 99 (inclusive), then the year for\n`dateObj` is set to `1900 + yearValue`. Otherwise, the year for\n`dateObj` is set to `yearValue`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/toDateString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toDateString()\n\nThe **`toDateString()`** method returns the date portion of a `Date` object interpreted in the local timezone in English.\n\n## Syntax\n\n```js\ntoDateString()\n```\n\n### Return value\n\nA string representing the date portion of the given `Date` object in human readable form in English.\n\n## Description\n\n`Date` instances refer to a specific point in time. `toDateString()` interprets the date in the local timezone and formats the _date_ part in English. It always uses the following format, separated by spaces:\n\n1. First three letters of the week day name\n2. First three letters of the month name\n3. Two-digit day of the month, padded on the left a zero if necessary\n4. Four-digit year (at least), padded on the left with zeros if necessary. May have a negative sign\n\nFor example: \"Thu Jan 01 1970\".\n\n- If you want to get the _time_ part, use [`toTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString).\n- If you want to get both the date and time, use [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toString).\n- If you want to make the date interpreted as UTC instead of local timezone, use [`toUTCString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString).\n- If you want to format the date in a more user-friendly format (e.g. localization), use [`toLocaleDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/toISOString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toISOString()\n\nThe **`toISOString()`** method returns a string in _simplified_ extended ISO format ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)), which is always 24 or 27 characters long (`YYYY-MM-DDTHH:mm:ss.sssZ` or `±YYYYYY-MM-DDTHH:mm:ss.sssZ`, respectively). The timezone is always zero UTC offset, as denoted by the suffix `Z`.\n\n## Syntax\n\n```js\ntoISOString()\n```\n\n### Return value\n\nA string representing the given date in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format according to universal time. It's the same format as the one required to be recognized by [`Date.parse()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/parse#date-time-string-format).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/toJSON.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toJSON()\n\nThe **`toJSON()`** method returns a string representation of\nthe `Date` object.\n\n## Syntax\n\n```js\ntoJSON()\n```\n\n### Return value\n\nA string representation of the given date.\n\n## Description\n\n`Date` instances refer to a specific point in time. `toJSON()` calls the object's [`Date.prototype.toISOString()`](./toISOString.mdx) method, which returns a string representing the `Date` object's value. This method is generally intended to, by default, usefully serialize `Date` objects during [JSON](https://developer.mozilla.org/docs/Glossary/JSON) serialization, which can then be deserialized using the [`Date()` constructor](../Date.mdx) or [`Date.parse()`](../parse.mdx) as the reviver of [`JSON.parse()`](../../JSON/parse.mdx).\n\nThe method first attempts to convert its `this` value [to a primitive](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion) by calling its [`[Symbol.toPrimitive]()`](../../Symbol/toPrimitive.mdx) (with `\"number\"` as hint), [`valueOf()`](../../Object/prototype/valueOf.mdx), and [`toString()`](../../Object/prototype/toString.mdx) methods, in that order. If the result is a [non-finite](../../Number/isFinite.mdx) number, `null` is returned. (This generally corresponds to an invalid date, whose [`valueOf()`](./valueOf.mdx) returns [`NaN`](../../NaN.mdx).) Otherwise, if the converted primitive is not a number or is a finite number, the return value of `this.toISOString()` is returned.\n\nNote that the method does not check whether the `this` value is a valid `Date` object. However, calling `Date.prototype.toJSON()` on non-`Date` objects does not have well-defined semantics.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/toLocaleDateString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toLocaleDateString()\n\nThe **`toLocaleDateString()`** method returns a string with a language-sensitive representation of the date portion of the specified date in the user agent's timezone. In implementations with [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) support, this method simply calls `Intl.DateTimeFormat`.\n\n## Syntax\n\n```js\ntoLocaleDateString()\ntoLocaleDateString(locales)\ntoLocaleDateString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat), these parameters correspond exactly to the [`Intl.DateTimeFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) constructor's parameters. Implementations without `Intl.DateTimeFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales) parameter of the `Intl.DateTimeFormat()` constructor.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options) parameter of the `Intl.DateTimeFormat()` constructor. The `timeStyle` option must be undefined, or a [`TypeError`](../../../globals/TypeError/TypeError.mdx) would be thrown. If `weekday`, `year`, `month`, and `day` are all undefined, then `year`, `month`, and `day` will be set to `\"numeric\"`.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored.\n\nSee the [`Intl.DateTimeFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string representing the date portion of the given `Date` instance according to language-specific conventions.\n\nIn implementations with `Intl.DateTimeFormat`, this is equivalent to `new Intl.DateTimeFormat(locales, options).format(date)`, where `options` has been normalized as described above.\n\n## Performance\n\nWhen formatting large numbers of dates, it is better to create an [`Intl.DateTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) object and use its [`format()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/format) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string with a language-sensitive representation of this date. In implementations with [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) support, this method simply calls `Intl.DateTimeFormat`.\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat), these parameters correspond exactly to the [`Intl.DateTimeFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) constructor's parameters. Implementations without `Intl.DateTimeFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales) parameter of the `Intl.DateTimeFormat()` constructor.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options) parameter of the `Intl.DateTimeFormat()` constructor. If `weekday`, `year`, `month`, `day`, `dayPeriod`, `hour`, `minute`, `second`, and `fractionalSecondDigits` are all undefined, then `year`, `month`, `day`, `hour`, `minute`, `second` will be set to `\"numeric\"`.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored.\n\nSee the [`Intl.DateTimeFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string representing the given date according to language-specific conventions.\n\nIn implementations with `Intl.DateTimeFormat`, this is equivalent to `new Intl.DateTimeFormat(locales, options).format(date)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/toLocaleTimeString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toLocaleTimeString()\n\nThe **`toLocaleTimeString()`** method returns a string with a language-sensitive representation of the time portion of the date. In implementations with [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) support, this method simply calls `Intl.DateTimeFormat`.\n\n## Syntax\n\n```js\ntoLocaleTimeString()\ntoLocaleTimeString(locales)\ntoLocaleTimeString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat), these parameters correspond exactly to the [`Intl.DateTimeFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) constructor's parameters. Implementations without `Intl.DateTimeFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales) parameter of the `Intl.DateTimeFormat()` constructor.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options) parameter of the `Intl.DateTimeFormat()` constructor. If `dayPeriod`, `hour`, `minute`, `second`, and `fractionalSecondDigits` are all undefined, then `hour`, `minute`, `second` will be set to `\"numeric\"`.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored.\n\nSee the [`Intl.DateTimeFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string representing the time portion of the given `Date` instance according to language-specific conventions.\n\nIn implementations with `Intl.DateTimeFormat`, this is equivalent to `new Intl.DateTimeFormat(locales, options).format(date)`, where `options` has been normalized as described above.\n\n## Performance\n\nWhen formatting large numbers of dates, it is better to create an [`Intl.DateTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) object and use its [`format()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/format) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified `Date` object interpreted in the local timezone.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the given date.\n\n## Description\n\nThe `Date` object overrides the `toString()` method of `Object`. `Date.prototype.toString()` returns a string representation of the Date as interpreted in the local timezone, containing both the date and the time — it joins the string representation specified in [`toDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString) and [`toTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString) together, adding a space in between.\n\nFor example: \"Thu Jan 01 1970 04:42:04 GMT+0000 (Coordinated Universal Time)\"\n\nThe `toString()` method is automatically called when a date is coerced to a string, such as `const today = 'Today is ' + new Date()`.\n\n`Date.prototype.toString()` must be called on `Date` instances. If the `this` value does not inherit from `Date.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n- If you only want to get the _date_ part, use [`toDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString).\n- If you only want to get the _time_ part, use [`toTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString).\n- If you want to make the date interpreted as UTC instead of local timezone, use [`toUTCString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString).\n- If you want to format the date in a more user-friendly format (e.g. localization), use [`toLocaleString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/toTimeString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toTimeString()\n\nThe **`toTimeString()`** method returns the time portion of a `Date` object interpreted in the local timezone in English.\n\n## Syntax\n\n```js\ntoTimeString()\n```\n\n### Return value\n\nA string representing the time portion of the given date in human readable form in English.\n\n## Description\n\n`Date` instances refer to a specific point in time. `toTimeString()` interprets the date in the local timezone and formats the _time_ part in English. It always uses the format of `hh:mm:ss GMT±xxxx (TZ)`, where:\n\n| Format String | Description                                                                                           |\n| ------------- | ----------------------------------------------------------------------------------------------------- |\n| `hh`          | Hour, as two digits with leading zero if required                                                     |\n| `mm`          | Minute, as two digits with leading zero if required                                                   |\n| `ss`          | Seconds, as two digits with leading zero if required                                                  |\n| `±xxxx`       | The local timezone's offset — two digits for hours and two digits for minutes (e.g. `-0500`, `+0800`) |\n| `TZ`          | The timezone's name (e.g. `PDT`, `PST`)                                                               |\n\nFor example: \"04:42:04 GMT+0000 (Coordinated Universal Time)\".\n\n- If you want to get the _date_ part, use [`toDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString).\n- If you want to get both the date and time, use [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toString).\n- If you want to make the date interpreted as UTC instead of local timezone, use [`toUTCString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString).\n- If you want to format the date in a more user-friendly format (e.g. localization), use [`toLocaleTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleTimeString).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/toUTCString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toUTCString()\n\nThe **`toUTCString()`** method converts a date to a string, interpreting it in the UTC time zone. `toGMTString()` is an alias of this method.\n\nBased on [rfc7231](https://datatracker.ietf.org/doc/html/rfc7231#section-7.1.1.1) and modified according to [ECMA-262 toUTCString](https://tc39.es/ecma262/#sec-date.prototype.toutcstring), it can have negative values.\n\n## Syntax\n\n```js\ntoUTCString()\n```\n\n### Return value\n\nA string representing the given date using the UTC time zone.\n\n## Description\n\nThe value returned by `toUTCString()` is a string in the form `Www, dd Mmm yyyy hh:mm:ss GMT`, where:\n\n| Format String | Description                                                  |\n| ------------- | ------------------------------------------------------------ |\n| `Www`         | Day of week, as three letters (e.g. `Sun`, `Mon`)            |\n| `dd`          | Day of month, as two digits with leading zero if required    |\n| `Mmm`         | Month, as three letters (e.g. `Jan`, `Feb`)                  |\n| `yyyy`        | Year, as four or more digits with leading zeroes if required |\n| `hh`          | Hour, as two digits with leading zero if required            |\n| `mm`          | Minute, as two digits with leading zero if required          |\n| `ss`          | Seconds, as two digits with leading zero if required         |\n\n### Aliasing\n\nJavaScript's `Date` API was inspired by Java's `java.util.Date` library (while the latter had become de facto legacy since Java 1.1 in 1997). In particular, the Java `Date` class had a method called `toGMTString` — which was poorly named, because the [Greenwich Mean Time](https://en.wikipedia.org/wiki/Greenwich_Mean_Time) is not equivalent to the [Coordinated Universal Time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time), while JavaScript dates always operate by UTC time. For web compatibility reasons, `toGMTString` remains as an alias to `toUTCString`, and they refer to the exact same function object. This means:\n\n```js\nDate.prototype.toGMTString.name === \"toUTCString\";\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Date/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a\n`Date` object.\n\n\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the given date, or [`NaN`](../../NaN.mdx) in case of an invalid date.\n\n## Description\n\nThe `valueOf()` method returns the primitive value of a `Date`\nobject as a number data type, the number of milliseconds since midnight 01 January, 1970\nUTC.\n\nThis method is functionally equivalent to the [`Date.prototype.getTime()`](./getTime.mdx)\nmethod.\n\nThis method is usually called internally by JavaScript and not explicitly in code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/DecompressionStream/DecompressionStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DecompressionStream()\n\nThe **`DecompressionStream()`** constructor creates a new `DecompressionStream` object which decompresses a stream of data.\n\n## Syntax\n\n```js\nnew DecompressionStream(format)\n```\n\n### Parameters\n\n- `format`\n\n  - : One of the following compression formats:\n\n    - `\"gzip\"`\n    - `\"deflate\"`\n    - `\"deflate-raw\"`\n\n## Exceptions\n\n- `TypeError`\n  - : Thrown if the format passed to the constructor is not supported.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/DecompressionStream/prototype/readable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DecompressionStream.readable\n\nThe **`readable`** read-only property of the `DecompressionStream` interface returns a `ReadableStream`.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/DecompressionStream/prototype/writable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DecompressionStream.writable\n\nThe **`writable`** read-only property of the `DecompressionStream` interface returns a `WritableStream`.\n\n## Value\n\nA `WritableStream`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/EcKeyImportParams/EcKeyImportParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# EcKeyImportParams\n\nThe **`EcKeyImportParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.importKey()`, when generating any elliptic-curve-based key pair: that is, when the algorithm is identified as ECDSA.\n\n## Instance properties\n\n- `name`\n  - : A string. This should be set to `ECDSA`.\n- `namedCurve`\n\n  - : A string representing the name of the elliptic curve to use. This may be any of the following names for [NIST](https://www.nist.gov/)-approved curves:\n\n    - `P-256`\n    - `P-384`\n    - `P-521`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/EcdsaParams/EcdsaParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# EcdsaParams\n\nThe **`EcdsaParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.sign()` or `SubtleCrypto.verify()` when using the ECDSA algorithm.\n\n## Instance properties\n\n- `name`\n    - : A string. This should be set to `ECDSA`.\n- `hash`\n\n    - : A string. An identifier for the digest algorithm to use. This should be one of the following:\n\n        - `SHA-256`: selects the SHA-256 algorithm.\n        - `SHA-384`: selects the SHA-384 algorithm.\n        - `SHA-512`: selects the SHA-512 algorithm.\n\n        > **Warning:** `SHA-1` is also supported here but the SHA-1 algorithm is considered vulnerable and should no longer be used.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Error/Error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error\n\nThe **`Error()`** constructor creates an error object.\n\n## Syntax\n\n```js\nnew Error()\nnew Error(message)\nnew Error(message, options)\nnew Error(message, fileName)\nnew Error(message, fileName, lineNumber)\n\nError()\nError(message)\nError(message, options)\nError(message, fileName)\nError(message, fileName, lineNumber)\n```\n\n> **Note:** `Error()` can be called with or without `new`. Both create a new `Error` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : A human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A value indicating the specific cause of the error, reflected in the [`Error.prototype.cause`](./prototype/cause.mdx) property. When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Error/prototype/cause.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.cause\n\nThe **`cause`** data property of an [`Error`](../../../globals/Error/Error.mdx) instance indicates the specific original cause of the error.\n\nIt is used when catching and re-throwing an error with a more-specific or useful error message in order to still have access to the original error.\n\n## Value\n\nThe value that was passed to the [`Error`](../Error.mdx) constructor in the `options.cause` argument. It may not be present.\n\n## Description\n\nThe value of `cause` can be of any type. You should not make assumptions that the error you caught has an `Error` as its `cause`, in the same way that you cannot be sure the variable bound in the `catch` statement is an `Error` either. The \"Providing structured data as the error cause\" example below shows a case where a non-error is deliberately provided as the cause.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Error/prototype/message.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.message\n\nThe **`message`** data property of an [`Error`](../Error.mdx) instance is a human-readable description of the error.\n\n## Value\n\nA string corresponding to the value passed to the [`Error`](../Error.mdx) constructor as the first argument.\n\n## Description\n\nThis property contains a brief description of the error if one is available or has been set. The `message` property combined with the [`name`](./name.mdx) property is used by the [`Error.prototype.toString()`](./toString.mdx) method to create a string representation of the Error.\n\nBy default, the `message` property is an empty string, but this behavior can be overridden for an instance by specifying a message as the first argument to the [`Error`](../Error.mdx) constructor.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Error/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.name\n\nThe **`name`** data property of `Error.prototype` is shared by all [`Error`](../Error.mdx) instances. It represents the name for the type of error. For `Error.prototype.name`, the initial value is `\"Error\"`. Subclasses like [`TypeError`](../../../globals/TypeError/TypeError.mdx) and [`SyntaxError`](../../SyntaxError/SyntaxError.mdx) provide their own `name` properties.\n\n## Value\n\nA string. For `Error.prototype.name`, the initial value is `\"Error\"`.\n\n## Description\n\nBy default, [`Error`](../Error.mdx) instances are given the name \"Error\". The `name` property, in addition to the [`message`](./message.mdx) property, is used by the [`Error.prototype.toString()`](./toString.mdx) method to create a string representation of the error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Error/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.toString()\n\nThe **`toString()`** method returns a string representing the\nspecified [`Error`](../Error.mdx) object.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified [`Error`](../Error.mdx) object.\n\n## Description\n\nThe [`Error`](../Error.mdx) object overrides the [`Object.prototype.toString()`](../../Object/prototype/toString.mdx)\nmethod inherited by all objects. \n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/EvalError/EvalError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# EvalError\n\nThe **`EvalError()`** constructor creates a new `EvalError` instance.\n\n## Syntax\n\n```js\nnew EvalError()\nnew EvalError(message)\nnew EvalError(message, options)\nnew EvalError(message, fileName)\nnew EvalError(message, fileName, lineNumber)\n\nEvalError()\nEvalError(message)\nEvalError(message, options)\nEvalError(message, fileName)\nEvalError(message, fileName, lineNumber)\n```\n\n> **Note:** `EvalError()` can be called with or without `new`. Both create a new `EvalError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/FetchEvent/FetchEvent.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent\n\nThis is the event type for `fetch` events. It contains information about the fetch, including the request and how the receiver will treat the response. \nIt provides the [`event.respondWith()`](./prototype/respondWith.mdx) method, which allows us to provide a response to this fetch.\n\n## Instance properties\n\n- `FetchEvent.request` _**readonly**_\n    - : The `Request` that was received by the application.\n- `FetchEvent.client` _**readonly**_\n    - : Information about the downstream client that made the request.\n        While these fields are always defined on Compute, they may be *null* when not available in testing environments\n        such as Viceroy.\n    - `FetchEvent.client.requestId` _**readonly**_\n        - : A UUID generated by Compute for each request.\n    - `FetchEvent.client.address` _**readonly**_\n        - : A string representation of the IPv4 or IPv6 address of the downstream client.\n    - `FetchEvent.client.geo` _**readonly**_\n        - : Either `null`, or a [geolocation dictionary](../../fastly:geolocation/getGeolocationForIpAddress.mdx) corresponding to the IP address of the downstream client.\n    - `FetchEvent.client.tlsJA3MD5` _**readonly**_\n        - : Either `null` or a string representation of the JA3 hash of the TLS ClientHello message.\n    - `FetchEvent.client.tlsCipherOpensslName` _**readonly**_\n        - : Either `null` or a string representation of the cipher suite used to secure the client TLS connection.\n    - `FetchEvent.client.tlsProtocol` _**readonly**_\n        - : Either `null` or a string representation of the TLS protocol version used to secure the client TLS connection.\n    - `FetchEvent.client.tlsClientCertificate` _**readonly**_\n        - : Either `null` or an ArrayBuffer containing the raw client certificate in the mutual TLS handshake message. It is in PEM format. Returns an empty ArrayBuffer if this is not mTLS or available.\n    - `FetchEvent.client.tlsClientHello` _**readonly**_\n        - : Either `null` or an ArrayBuffer containing the raw bytes sent by the client in the TLS ClientHello message.\n    - `FetchEvent.client.tlsJA4` _**readonly**_\n        - : Either `null` or a string representation of the JA4 fingerprint of the TLS ClientHello message.\n    - `FetchEvent.client.h2Fingerprint` _**readonly**_\n        - : Either `null` or a string representation of the HTTP/2 fingerprint for HTTP/2 connections. Returns `null` for HTTP/1.1 connections.\n    - `FetchEvent.client.ohFingerprint` _**readonly**_\n        - : Either `null` or a string representation of the Original Header fingerprint based on the order and presence of request headers.\n- `FetchEvent.server` _**readonly**_\n    - : Information about the server receiving the request for the Fastly Compute service.\n    - `FetchEvent.server.address` _**readonly**_\n        - : A string representation of the IPv4 or IPv6 address of the server which received the request.\n\n## Instance methods\n\n- [`FetchEvent.respondWith()`](./prototype/respondWith.mdx)\n    - : Provide (a promise for) a response for this request.\n- [`FetchEvent.sendEarlyHints()`](./prototype/sendEarlyHints.mdx)\n    - : Send a [103 Early Hints](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/103) response for this request.\n- [`FetchEvent.waitUntil()`](./prototype/waitUntil.mdx)\n    - : Extends the lifetime of the event. Used to notify the host environment of tasks that extend beyond the returning of a response, such as streaming and caching.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/FetchEvent/prototype/respondWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent.respondWith()\n\nThe **`respondWith()`** method allows you to provide a promise for a [`Response`](../../Response/Response.mdx) to send back to the client which made the incoming request to your application.\n\n## Syntax\n\n```js\nrespondWith(response)\n```\n\n### Parameters\n\n- `response`\n  - : A [`Response`](../../Response/Response.mdx) or a [`Promise`](../../Promise/Promise.mdx) that resolves to a\n    [`Response`](../../Response/Response.mdx). Otherwise, a network error is returned to Fetch.\n\n### Return value\n\nAlways returns `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/FetchEvent/prototype/sendEarlyHints.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent.sendEarlyHints()\n\nThe **`sendEarlyHints()`** method allows you to send a [103 Early Hints](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/103) response back to the client which made the incoming request to your application.\n\n## Syntax\n\n```js\nsendEarlyHints(headers)\n```\n\n### Parameters\n\n- `headers`\n  - : Any headers you want to add to your response, contained\n        within a [`Headers`](../../Headers/Headers.mdx) object or object literal of\n        [`String`](../../String/String.mdx) key/value pairs.\n\n### Return value\n\nAlways returns `undefined`.\n\n### Examples\n\n```js\nevent.sendEarlyHints({ link: '</style.css>; rel=preload; as=style' });\n\nevent.sendEarlyHints([\n        ['link', '</style.css>; rel=preload; as=style'],\n        ['link', '</style2.css>; rel=preload; as=style']\n    ]);\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/FetchEvent/prototype/waitUntil.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent.waitUntil()\n\n\nThe **`waitUntil()`** method tells the host environment that work is ongoing until the promise settles, and it shouldn't terminate\nthe application if it wants that work to complete.\n\nThe `waitUntil()` method must be initially called synchronously within the event callback,\nbut after that it can be called multiple times, and will hold the process open until all the promises passed to it\nsettle.\n\n## Syntax\n\n```js\nwaitUntil(promise)\n```\n\n### Parameters\n\nA [`Promise`](../../Promise/Promise.mdx).\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/FinalizationRegistry/FinalizationRegistry.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FinalizationRegistry()\n\nThe **`FinalizationRegistry`** constructor creates a `FinalizationRegistry` object that uses the given callback.\n\n## Syntax\n\n```js\n// Arrow callback function\nnew FinalizationRegistry((heldValue) => { /* … */ })\n\n// Callback function\nnew FinalizationRegistry(callbackFn)\n\n// Inline callback function\nnew FinalizationRegistry(function(heldValue) { /* … */ })\n```\n\n> **Note:** `FinalizationRegistry()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `callback`\n  - : The callback function this registry should use.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/FinalizationRegistry/prototype/register.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FinalizationRegistry.prototype.register()\n\nThe `register()` method registers an object with a\n`FinalizationRegistry` instance so that if the object is garbage-collected,\nthe registry's callback may get called.\n\n## Syntax\n\n```js\nregister(target, heldValue)\nregister(target, heldValue, unregisterToken)\n```\n\n### Parameters\n\n- `target`\n  - : The target object to register.\n- `heldValue`\n  - : The value to pass to the finalizer for this object. This cannot be the `target` object but can be anything else, including functions and primitives.\n- `unregisterToken` _**optional**_\n  - : A token that may be used with the `unregister` method later to unregister\n    the target object. If provided (and not `undefined`), this must be an\n    object. If not provided, the target cannot be unregistered.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown when one of the following condition is met:\n    - `target` is not an object (object as opposed to primitives; functions are objects as well)\n    - `target` is the same as `heldvalue` (`target === heldValue`)\n    - `unregisterToken` is not an object\n\n## Description\n\nSee the [Avoid where possible](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry#avoid_where_possible)\nand [Notes on cleanup callbacks](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry#notes_on_cleanup_callbacks)\nsections of the `FinalizationRegistry` page for important caveats.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/FinalizationRegistry/prototype/unregister.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FinalizationRegistry.prototype.unregister()\n\nThe `unregister()` method unregisters a target object from a\n`FinalizationRegistry` instance.\n\n## Syntax\n\n```js\nunregister(unregisterToken)\n```\n\n### Parameters\n\n- `unregisterToken`\n  - : The token used with the [`FinalizationRegistry.prototype.register`](./register.mdx) method when registering the target object. Multiple cells registered with the same `unregisterToken` will be unregistered together.\n\n### Return value\n\nA boolean value that is `true` if at least one cell was unregistered and `false` if no cell was unregistered.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown when `unregisterToken` is not an object.\n\n## Description\n\nWhen a target object has been reclaimed, it is no longer registered in the registry.\nThere is no need to call `unregister` in your cleanup callback. Only call\n`unregister` if you haven't received a cleanup callback and no longer need\nto receive one.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Float32Array/Float32Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Float32Array()\n\nThe **`Float32Array()`** typed array constructor creates a new\n`Float32Array` object, which is, an array of 32-bit floating point numbers\n(corresponding to the C `float` data type) in the platform byte order. If\ncontrol over byte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are\ninitialized to `0`. Once established, you can reference elements in the array\nusing the object's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Float32Array()\nnew Float32Array(length)\nnew Float32Array(typedArray)\nnew Float32Array(object)\n\nnew Float32Array(buffer)\nnew Float32Array(buffer, byteOffset)\nnew Float32Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Float32Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Float64Array/Float64Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Float64Array()\n\nThe **`Float64Array()`** typed array constructor creates a new\n`Float64Array` object, which is, an array of 64-bit floating point numbers\n(corresponding to the C `double` data type) in the platform byte order. If\ncontrol over byte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are\ninitialized to `0`. Once established, you can reference elements in the array\nusing the object's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Float64Array()\nnew Float64Array(length)\nnew Float64Array(typedArray)\nnew Float64Array(object)\n\nnew Float64Array(buffer)\nnew Float64Array(buffer, byteOffset)\nnew Float64Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Float64Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/FormData/FormData.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData()\n\nThe **`FormData()`** constructor creates a new `FormData` object.\n\n## Syntax\n\n```js\nnew FormData()\nnew FormData(form)\n```\n\n> **Note:** `FormData()` can only be constructed with `new`. Attempting to call it without `new` throws a `TypeError`.\n\n### Parameters\n\n- `form` _**optional**_\n  - : An HTML `<form>` element — when specified, the `FormData` object will be populated with the form's current key/value pairs using the name property of each element for the keys and their submitted value for the values. File input elements are handled specially: their values are taken from the files selected by the user in the upload control.\n\n### Return value\n\nA new `FormData` object, pre-populated with form data if the optional `form` parameter was provided.\n\n## Description\n\nThe `FormData` interface provides a way to construct a set of key/value pairs representing form fields and their values, which can be sent using methods such as `fetch()`. It uses the same format a form would use if the encoding type were set to `\"multipart/form-data\"`.\n\nYou can also append additional data to the `FormData` object after it's created using its various methods.\n\nA `FormData` object can be used in a number of ways with other APIs:\n\n1. It can be sent with the `fetch()` API\n2. It works seamlessly with the `Request` and `Response` objects - it can be used directly as the body of a `Request` object\n3. It can be obtained from a `Response` object using the `formData()` method\n4. It can be passed directly to the `URLSearchParams` constructor\n\nThe transmitted data is in the same format that the form's `submit()` method would use to send the data if the form's encoding type were set to `\"multipart/form-data\"`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/FormData/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.append()\n\nThe **`append()`** method of the `FormData` interface appends a new value onto an existing key inside a `FormData` object, or adds the key if it does not already exist.\n\n## Syntax\n\n```js\nappend(name, value)\nappend(name, value, filename)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the field whose data is contained in `value`.\n- `value`\n  - : The value of the field. This can be a string or a `Blob` (including subclasses such as `File`). If none of these, the value is converted to a string.\n- `filename` _**optional**_\n  - : The filename reported to the server when a `Blob` or `File` is passed as the second parameter. The default filename for `Blob` objects is \"blob\". The default filename for `File` objects is the file's filename.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/FormData/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.delete()\n\nThe **`delete()`** method of the `FormData` interface removes all key/value pairs with the given name from the `FormData` object.\n\n## Syntax\n\n```js\ndelete(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the key you want to delete.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/FormData/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.entries()\n\nThe **`entries()`** method of the `FormData` interface returns an iterator allowing iteration through all key/value pairs contained in this object. The iterator yields a new array for each key/value pair, with the first element being the key and the second element being the value.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nAn `iterator`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/FormData/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.forEach()\n\nThe **`forEach()`** method of the `FormData` interface executes the provided callback function once for each key/value pair in the `FormData` object.\n\n## Syntax\n\n```js\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n  - : A function to execute for each entry in the object. The function will be passed the following arguments:\n    - `value`\n      - : The value of the current entry.\n    - `key`\n      - : The key of the current entry.\n    - `formData`\n      - : The `FormData` object being traversed.\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/FormData/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.get()\n\nThe **`get()`** method of the `FormData` interface returns the first value associated with a given key from within a `FormData` object. If you expect multiple values and want all of them, use the [`getAll()`](../../../globals/FormData/prototype/getAll.mdx) method instead.\n\n## Syntax\n\n```js\nget(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the key you want to retrieve.\n\n### Return value\n\nA `FormDataEntryValue` containing the value. If the key does not exist, it returns `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/FormData/prototype/getAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.getAll()\n\nThe **`getAll()`** method of the `FormData` interface returns all the values associated with a given key from within a `FormData` object.\n\n## Syntax\n\n```js\ngetAll(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the key you want to retrieve.\n\n### Return value\n\nAn array of `FormDataEntryValue` items containing all values with the given key. If the key doesn't exist, an empty array is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/FormData/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.has()\n\nThe **`has()`** method of the `FormData` interface returns a boolean indicating whether a `FormData` object contains a key/value pair with the given name.\n\n## Syntax\n\n```js\nhas(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the key you want to test for existence.\n\n### Return value\n\n`true` if a key/value pair with the specified name exists; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/FormData/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.keys()\n\nThe **`keys()`** method of the `FormData` interface returns an iterator allowing iteration through all keys contained in this object. The iterator yields the key for each value.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nAn `iterator`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/FormData/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.set()\n\nThe **`set()`** method of the `FormData` interface sets a new value for an existing key inside a `FormData` object, or adds the key/value if it does not already exist.\n\nThe difference between `set()` and [`append()`](../../../globals/FormData/prototype/append.mdx) is that if the specified key already exists, `set()` overwrites all existing values with the new one, whereas `append()` appends the new value onto the end of the existing values.\n\n## Syntax\n\n```js\nset(name, value)\nset(name, value, filename)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the field whose data is contained in `value`.\n- `value`\n  - : The value of the field. This can be a string or a `Blob` (including subclasses such as `File`). If none of these, the value is converted to a string.\n- `filename` _**optional**_\n  - : The filename reported to the server when a `Blob` or `File` is passed as the second parameter. The default filename for `Blob` objects is \"blob\". The default filename for `File` objects is the file's filename.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/FormData/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.values()\n\nThe **`values()`** method of the `FormData` interface returns an iterator allowing iteration through all values contained in this object. The iterator yields the value for each key/value pair.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nAn `iterator`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Function/Function.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function()\n\nThe **`Function()`** constructor creates a new [`Function`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function) object. Calling the constructor directly can create functions dynamically, but suffers from security and similar (but far less significant) performance issues as `eval()`. However, unlike `eval` (which may have access to the local scope), the `Function` constructor creates functions which execute in the global scope only.\n\n\n\n## Syntax\n\n```js\nnew Function(functionBody)\nnew Function(arg0, functionBody)\nnew Function(arg0, arg1, functionBody)\nnew Function(arg0, arg1, /* … ,*/ argN, functionBody)\n\nFunction(functionBody)\nFunction(arg0, functionBody)\nFunction(arg0, arg1, functionBody)\nFunction(arg0, arg1, /* … ,*/ argN, functionBody)\n```\n\n> **Note:** `Function()` can be called with or without `new`. Both create a new `Function` instance.\n\n### Parameters\n\n- `argN` _**optional**_\n\n  - : Names to be used by the function as formal argument names. Each must be a string that corresponds to a valid JavaScript parameter (any of plain [identifier](https://developer.mozilla.org/docs/Glossary/Identifier), [rest parameter](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/rest_parameters), or [destructured](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment) parameter, optionally with a [default](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/Default_parameters)), or a list of such strings separated with commas.\n\n    As the parameters are parsed in the same way as function expressions, whitespace and comments are accepted. For example: `\"x\", \"theValue = 42\", \"[a, b] /* numbers */\"` — or `\"x, theValue = 42, [a, b] /* numbers */\"`. (`\"x, theValue = 42\", \"[a, b]\"` is also correct, though very confusing to read.)\n\n- `functionBody`\n  - : A string containing the JavaScript statements comprising the function definition.\n\n## Description\n\n`Function` objects created with the `Function` constructor are parsed when the function is created. This is less efficient than creating a function with a [function expression](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/function) or [function declaration](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function) and calling it within your code, because such functions are parsed with the rest of the code.\n\nAll arguments passed to the function, except the last, are treated as the names of the identifiers of the parameters in the function to be created, in the order in which they are passed. The function will be dynamically compiled as a function expression, with the source assembled in the following fashion:\n\n```js\n`function anonymous(${args.join(\",\")}\n) {\n${functionBody}\n}`\n```\n\nThis is observable by calling the function's [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/toString) method.\n\nHowever, unlike normal [function expressions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/function), the name `anonymous` is not added to the `functionBody`'s scope, since `functionBody` only has access the global scope. If `functionBody` is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode) (the body itself needs to have the `\"use strict\"` directive since it doesn't inherit the strictness from the context), you may use [`arguments.callee`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/arguments/callee) to refer to the function itself. Alternatively, you can define the recursive part as an inner function:\n\n```js\nconst recursiveFn = new Function(\"count\", `\n(function recursiveFn(count) {\n  if (count < 0) {\n    return;\n  }\n  console.log(count);\n  recursiveFn(count - 1);\n})(count);\n`);\n```\n\nNote that the two dynamic parts of the assembled source — the parameters list `args.join(\",\")` and `functionBody` — will first be parsed separately to ensure they are each syntactically valid. This prevents injection-like attempts.\n\n```js\nnew Function(\"/*\", \"*/) {\");\n// SyntaxError: Unexpected end of arg string\n// Doesn't become \"function anonymous(/*) {*/) {}\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Function/prototype/apply.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.apply()\n\nThe **`apply()`** method calls the specified function with a given `this` value, and `arguments` provided as an array (or an [array-like object](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects)).\n\n\n\n## Syntax\n\n```js\napply(thisArg)\napply(thisArg, argsArray)\n```\n\n### Parameters\n\n- `thisArg`\n  - : The value of `this` provided for the call to `func`. If the function is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) will be replaced with the global object, and primitive values will be converted to objects.\n- `argsArray` _**optional**_\n  - : An array-like object, specifying the arguments with which `func` should be called, or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../../globals/undefined.mdx) if no arguments should be provided to the function.\n\n### Return value\n\nThe result of calling the function with the specified `this` value and arguments.\n\n## Description\n\n> **Note:** This function is almost identical to [`Function.prototype.call()`](../../../globals/Function/prototype/call.mdx), except that `call()` accepts an **argument list**, while `apply()` accepts a **single array of arguments** — for example, `func.apply(this, ['eat', 'bananas'])` vs. `func.call(this, 'eat', 'bananas')`.\n\nNormally, when calling a function, the value of [`this`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this) inside the function is the object that the function was accessed on. With `apply()`, you can assign an arbitrary value as `this` when calling an existing function, without first attaching the function to the object as a property. This allows you to use methods of one object as generic utility functions.\n\n> **Warning:** Do not use `apply()` to chain constructors (for example, to implement inheritance). This invokes the constructor function as a plain function, which means [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target) is `undefined`, and classes throw an error because they can't be called without `new`. Use [`Reflect.construct()`](../../../globals/Reflect/construct.mdx) or [`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Function/prototype/bind.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.bind()\n\nThe **`bind()`** method creates a new function that, when called, has its `this` keyword set to the provided value, with a given sequence of arguments preceding any provided when the new function is called.\n\n\n\n## Syntax\n\n```js\nbind(thisArg)\nbind(thisArg, arg1)\nbind(thisArg, arg1, arg2)\nbind(thisArg, arg1, arg2, /* …, */ argN)\n```\n\n### Parameters\n\n- `thisArg`\n  - : The value to be passed as the `this` parameter to the target function `func` when the bound function is called. If the function is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) will be replaced with the global object, and primitive values will be converted to objects. The value is ignored if the bound function is constructed using the `new` operator.\n- `arg1, …, argN` _**optional**_\n  - : Arguments to prepend to arguments provided to the bound function when invoking `func`.\n\n### Return value\n\nA copy of the given function with the specified `this` value, and initial arguments (if provided).\n\n## Description\n\nThe `bind()` function creates a new _bound function_. Calling the bound function generally results in the execution of the function it wraps, which is also called the _target function_. The bound function will store the parameters passed — which include the value of `this` and the first few arguments — as its internal state. These values are stored in advance, instead of being passed at call time. You can generally see `const boundFn = fn.bind(thisArg, arg1, arg2)` as being equivalent to `const boundFn = (...restArgs) => fn.call(thisArg, arg1, arg2, ...restArgs)` for the effect when it's called (but not when `boundFn` is constructed).\n\nA bound function can be further bound by calling `boundFn.bind(thisArg, /* more args */)`, which creates another bound function `boundFn2`. The newly bound `thisArg` value is ignored, because the target function of `boundFn2`, which is `boundFn`, already has a bound `this`. When `boundFn2` is called, it would call `boundFn`, which in turn calls `fn`. The arguments that `fn` ultimately receives are, in order: the arguments bound by `boundFn`, arguments bound by `boundFn2`, and the arguments received by `boundFn2`.\n\n```js\n\"use strict\"; // prevent `this` from being boxed into the wrapper object\n\nfunction log(...args) {\n  console.log(this, ...args);\n}\nconst boundLog = log.bind(\"this value\", 1, 2);\nconst boundLog2 = boundLog.bind(\"new this value\", 3, 4);\nboundLog2(5, 6); // \"this value\", 1, 2, 3, 4, 5, 6\n```\n\nA bound function may also be constructed using the `new` operator if its target function is constructable. Doing so acts as though the target function had instead been constructed. The prepended arguments are provided to the target function as usual, while the provided `this` value is ignored (because construction prepares its own `this`, as seen by the parameters of [`Reflect.construct`](../../../globals/Reflect/construct.mdx)). If the bound function is directly constructed, [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target) will be the target function instead. (That is, the bound function is transparent to `new.target`.)\n\n```js\nclass Base {\n  constructor(...args) {\n    console.log(new.target === Base);\n    console.log(args);\n  }\n}\n\nconst BoundBase = Base.bind(null, 1, 2);\n\nnew BoundBase(3, 4); // true, [1, 2, 3, 4]\n```\n\nHowever, because a bound function does not have the [`prototype`](../../../globals/Function/prototype/) property, it cannot be used as a base class for [`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends).\n\n```js example-bad\nclass Derived extends class {}.bind(null) {}\n// TypeError: Class extends value does not have valid prototype property undefined\n```\n\nWhen using a bound function as the right-hand side of [`instanceof`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/instanceof), `instanceof` would reach for the target function (which is stored internally in the bound function) and read its `prototype` instead.\n\n```js\nclass Base {}\nconst BoundBase = Base.bind(null, 1, 2);\nconsole.log(new Base() instanceof BoundBase); // true\n```\n\nThe bound function has the following properties:\n\n- [`length`](../../../globals/Function/prototype/length.mdx)\n  - : The `length` of the target function minus the number of arguments being bound (not counting the `thisArg` parameter), with 0 being the minimum value.\n- [`name`](../../../globals/Function/prototype/name.mdx)\n  - : The `name` of the target function plus a `\"bound \"` prefix.\n\nThe bound function also inherits the [prototype chain](https://developer.mozilla.org/docs/Web/JavaScript/Inheritance_and_the_prototype_chain) of the target function. However, it doesn't have other own properties of the target function (such as [static properties](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/static) if the target function is a class).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Function/prototype/call.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.call()\n\nThe **`call()`** method calls the function with a given `this` value and arguments provided individually.\n\n## Syntax\n\n```js\ncall(thisArg)\ncall(thisArg, arg1)\ncall(thisArg, arg1, /* …, */ argN)\n```\n\n### Parameters\n\n- `thisArg`\n  - : The value to use as `this` when calling `func`. If the function is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) will be replaced with the global object, and primitive values will be converted to objects.\n- `arg1, …, argN` _**optional**_\n  - : Arguments for the function.\n\n### Return value\n\nThe result of calling the function with the specified `this` value and arguments.\n\n## Description\n\n> **Note:** This function is almost identical to [`Function.prototype.apply()`](../../../globals/Function/prototype/apply.mdx), except that `call()` accepts an **argument list**, while `apply()` accepts a **single array of arguments** — for example, `func.apply(this, ['eat', 'bananas'])` vs. `func.call(this, 'eat', 'bananas')`.\n\nNormally, when calling a function, the value of [`this`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this) inside the function is the object that the function was accessed on. With `call()`, you can assign an arbitrary value as `this` when calling an existing function, without first attaching the function to the object as a property. This allows you to use methods of one object as generic utility functions.\n\n> **Warning:** Do not use `call()` to chain constructors (for example, to implement inheritance). This invokes the constructor function as a plain function, which means [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target) is `undefined`, and classes throw an error because they can't be called without `new`. Use [`Reflect.construct()`](../../../globals/Reflect/construct.mdx) or [`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Function/prototype/index.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.prototype\n\nThe **`prototype`** data property of a `Function` instance is used when the function is used as a constructor with the `new` operator. It will become the new object's prototype.\n\n> **Note:** Not all `Function` objects have the `prototype` property — see [description](#description).\n\n## Value\n\nAn object.\n\n> **Note:** The `prototype` property of [classes](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes) is not writable.\n\n## Description\n\nWhen a function is called with `new`, the constructor's `prototype` property will become the resulting object's prototype.\n\n```js\nfunction Ctor() {}\nconst inst = new Ctor();\nconsole.log(Object.getPrototypeOf(inst) === Ctor.prototype); // true\n```\n\nYou can read [Inheritance and the prototype chain](https://developer.mozilla.org/docs/Web/JavaScript/Inheritance_and_the_prototype_chain#constructors) for more information about the interactions between a constructor function's `prototype` property and the resulting object's prototype.\n\nA function having a `prototype` property is not sufficient for it to be eligible as a constructor. [Generator functions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function*) have a `prototype` property, but cannot be called with `new`:\n\n```js\nasync function* asyncGeneratorFunction() {}\nfunction* generatorFunction() {}\n```\n\nInstead, generator functions' `prototype` property is used when they are called _without_ `new`. The `prototype` property will become the returned [`Generator`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Generator) object's prototype.\n\nIn addition, some functions may have a `prototype` but throw unconditionally when called with `new`. For example, the [`Symbol()`](../../../globals/Symbol/Symbol.mdx) and [`BigInt`](../../../globals/BigInt/BigInt.mdx) functions throw when called with `new`, because `Symbol.prototype` and `BigInt.prototype` are only intended to provide methods for the primitive values, but the wrapper objects should not be directly constructed.\n\nThe following functions do not have `prototype`, and are therefore ineligible as constructors, even if a `prototype` property is later manually assigned:\n\n```js\nconst method = { foo() {} }.foo;\nconst arrowFunction = () => {};\nasync function asyncFunction() {}\n```\n\nThe following are valid constructors that have `prototype`:\n\n```js\nclass Class {}\nfunction fn() {}\n```\n\nA [bound function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/bind) does not have a `prototype` property, but may be constructable. When it's constructed, the target function is constructed instead, and if the target function is constructable, it would return a normal instance.\n\n```js\nconst boundFunction = function () {}.bind(null);\n```\n\nA function's `prototype` property, by default, is a plain object with one property: (`constructor`)[../../../globals/Object/prototype/constructor.mdx), which is a reference to the function itself. The `constructor` property is writable, non-enumerable, and configurable.\n\nIf the `prototype` of a function is reassigned with something other than an `Object`, when the function is called with `new`, the returned object's prototype would be `Object.prototype` instead. (In other words, `new` ignores the `prototype` property and constructs a plain object.)\n\n```js\nfunction Ctor() {}\nCtor.prototype = 3;\nconsole.log(Object.getPrototypeOf(new Ctor()) === Object.prototype); // true\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Function/prototype/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.length\n\nThe **`length`** data property of a `Function` instance indicates the number of parameters expected by the function.\n\n## Value\n\nA number.\n\n## Description\n\nA `Function` object's `length` property indicates how many arguments the function expects, i.e. the number of formal parameters. \n\nThe `Function` constructor is itself a `Function` object. Its `length` data property has a value of `1`.\n\nDue to historical reasons, `Function.prototype` is a callable itself. The `length` property of `Function.prototype` has a value of `0`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Function/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.name\n\nThe **`name`** property of a `Function` instance indicates the function's name as specified when it was created, or it may be either `anonymous` or `''` (an empty string) for functions created anonymously.\n\n## Value\n\nA string.\n\n> **Note:** In non-standard, pre-ES2015 implementations the `configurable` attribute was `false` as well.\n\n## Description\n\nThe function's `name` property can be used to identify the function in debugging tools or error messages. It has no semantic significance to the language itself.\n\nThe `name` property is read-only and cannot be changed by the assignment operator:\n\n```js\nfunction someFunction() {}\n\nsomeFunction.name = 'otherFunction';\nconsole.log(someFunction.name); // someFunction\n```\n\nTo change it, use [`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx).\n\nThe `name` property is typically inferred from how the function is defined. In the following sections, we will describe the various ways in which it can be inferred.\n\n### Function declaration\n\nThe `name` property returns the name of a function declaration.\n\n```js\nfunction doSomething() {}\ndoSomething.name; // \"doSomething\"\n```\n\n### Default-exported function declaration\n\nAn [`export default`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/export) declaration exports the function as a declaration instead of an expression. If the declaration is anonymous, the name is `\"default\"`.\n\n```js\n// -- someModule.js --\nexport default function () {};\n\n// -- main.js --\nimport someModule from \"./someModule.js\";\n\nsomeModule.name; // \"default\"\n```\n\n### Function constructor\n\nFunctions created with the [`Function()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/Function) constructor have name \"anonymous\".\n\n```js\nnew Function().name; // \"anonymous\"\n```\n\n### Function expression\n\nIf the function expression is named, that name is used as the `name` property.\n\n```js\nconst someFunction = function someFunctionName() {};\nsomeFunction.name; // \"someFunctionName\"\n```\n\nAnonymous function expressions created using the keyword `function` or arrow functions would have `\"\"` (an empty string) as their name.\n\n```js\n(function () {}).name; // \"\"\n(() => {}).name; // \"\"\n```\n\nHowever, such cases are rare — usually, in order to refer to the expression elsewhere, the function expression is attached to an identifier when it's created (such as in a variable declaration). In such cases, the name can be inferred, as the following few subsections demonstrate.\n\nOne practical case where the name cannot be inferred is a function returned from another function:\n\n```js\nfunction getFoo() {\n  return () => {};\n}\ngetFoo().name; // \"\"\n```\n\n### Variable declaration and method\n\nVariables and methods can infer the name of an anonymous function from its syntactic position.\n\n```js\nconst f = function () {};\nconst object = {\n  someMethod: function () {}\n};\n\nconsole.log(f.name); // \"f\"\nconsole.log(object.someMethod.name); // \"someMethod\"\n```\n\nThe same applies to assignment:\n\n```js\nlet f;\nf = () => {};\nf.name; // \"f\"\n```\n\n### Initializer and default value\n\nFunctions in initializers (default values) of [destructuring](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#default_value), [default parameters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/Default_parameters), [class fields](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/Public_class_fields), etc., will inherit the name of the bound identifier as their `name`.\n\n```js\nconst [f = () => {}] = [];\nf.name; // \"f\"\n\nconst { someMethod: m = () => {} } = {};\nm.name; // \"m\"\n\nfunction foo(f = () => {}) {\n  console.log(f.name);\n}\nfoo(); // \"f\"\n\nclass Foo {\n  static someMethod = () => {};\n}\nFoo.someMethod.name; // someMethod\n```\n\n### Shorthand method\n\n```js\nconst o = {\n  foo() {},\n};\no.foo.name; // \"foo\";\n```\n\n### Bound function\n\n[`Function.prototype.bind()`](../../../globals/Function/prototype/bind.mdx) produces a function whose name is \"bound \" plus the function name.\n\n```js\nfunction foo() {};\nfoo.bind({}).name; // \"bound foo\"\n```\n\n### Getter and setter\n\nWhen using [`get`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/get) and [`set`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/set) accessor properties, \"get\" or \"set\" will appear in the function name.\n\n```js\nconst o = {\n  get foo() {},\n  set foo(x) {},\n};\n\nconst descriptor = Object.getOwnPropertyDescriptor(o, \"foo\");\ndescriptor.get.name; // \"get foo\"\ndescriptor.set.name; // \"set foo\";\n```\n\n### Class\n\nA class's name follows the same algorithm as function declarations and expressions.\n\n```js\nclass Foo {}\nFoo.name; // \"Foo\"\n```\n\n> **Warning:** JavaScript will set the function's `name` property only if a function does not have an own property called `name`. However, classes' [static members](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/static) will be set as own properties of the class constructor function, and thus prevent the built-in `name` from being applied. See [telling the constructor name of an object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name#telling_the_constructor_name_of_an_object) for more details.\n\n### Symbol as function name\n\nIf a `Symbol` is used a function name and the symbol has a description, the method's name is the description in square brackets.\n\n```js\nconst sym1 = Symbol(\"foo\");\nconst sym2 = Symbol();\n\nconst o = {\n  [sym1]() {},\n  [sym2]() {},\n};\n\no[sym1].name; // \"[foo]\"\no[sym2].name; // \"[]\"\n```\n\n### Private property\n\nPrivate fields and private methods have the hash (`#`) as part of their names.\n\n```js\nclass Foo {\n  #field = () => {};\n  #method() {}\n  getNames() {\n    console.log(this.#field.name);\n    console.log(this.#method.name);\n  }\n}\n\nnew Foo().getNames();\n// \"#field\"\n// \"#method\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Function/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.toString()\n\nThe **`toString()`** method returns a string representing the source code of the specified `Function`.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the source code of the function.\n\n## Description\n\nThe `Function` object overrides the `toString()` method\ninherited from `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For user-defined `Function`\nobjects, the `toString` method returns a string containing the source text\nsegment which was used to define the function.\n\nJavaScript calls the `toString` method automatically when a\n`Function` is to be represented as a text value, e.g. when a function is\nconcatenated with a string.\n\nThe `toString()` method will throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) exception\n(\"Function.prototype.toString called on incompatible object\"), if its\n`this` value object is not a `Function` object.\n\n```js example-bad\nFunction.prototype.toString.call('foo'); // throws TypeError\n```\n\nIf the `toString()` method is called on built-in function objects, a\nfunction created by [`Function.prototype.bind()`](../../../globals/Function/prototype/bind.mdx), or\nother non-JavaScript functions, then `toString()` returns a\n_native function string_ which looks like\n\n```js\n\"function someName() { [native code] }\"\n```\n\nFor intrinsic object methods and functions, `someName` is the initial name of the function; otherwise its content may be implementation-defined, but will always be in property name syntax, like `[1 + 1]`, `someName`, or `1`.\n\n> **Note:** This means using [`eval()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/eval) on native function strings is a guaranteed syntax error.\n\nIf the `toString()` method is called on a function created by the `Function` constructor, `toString()` returns the source code of a synthesized function declaration named \"anonymous\" using the provided parameters and function body. For example, `Function(\"a\", \"b\", \"return a + b\").toString()` will return:\n\n```js\n\"function anonymous(a,b\\n) {\\nreturn a + b\\n}\"\n```\n\nSince ES2018, the spec requires the return value of `toString()` to be the exact same source code as it was declared, including any whitespace and/or comments — or, if the host doesn't have the source code available for some reason, requires returning a native function string. Support for this revised behavior can be found in the [browser compatibility table](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/toString#browser_compatibility).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Headers/Headers.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers()\n\nThe **`Headers()`** constructor creates a new `Headers` object.\n\n## Syntax\n\n```js\nnew Headers()\nnew Headers(init)\n```\n\n### Parameters\n\n- `init` _**optional**_\n  - : An object containing any HTTP headers that you want to pre-populate your `Headers` object with. This can be a\n    simple object literal with `String` values, an array of name-value pairs, where each pair is a 2-element string array; or an existing\n    `Headers` object. In the last case, the new `Headers` object\n    copies its data from the existing `Headers` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Headers/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.append()\n\nThe **`append()`** method of the `Headers`\ninterface appends a new value onto an existing header inside a `Headers`\nobject, or adds the header if it does not already exist.\n\nThe difference between `Headers.prototype.set()` and `append()` is\nthat if the specified header already exists and accepts multiple values,\n`set()` will overwrite the existing value with the new one, whereas\n`append()` will append the new value onto the end of the set of values.\n\n## Syntax\n\n```js\nappend(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to add to the `Headers` object.\n- `value`\n  - : The value of the HTTP header you want to add.\n\n### Return value\n\nNone (`undefined`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Headers/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.delete()\n\nThe **`delete()`** method of the `Headers`\ninterface deletes a header from the current `Headers` object.\n\nThis method throws a `TypeError` for the following reasons:\n\n- The value of the name parameter is not the name of an HTTP header.\n\n## Syntax\n\n```js\ndelete(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to delete from the `Headers` object.\n\n### Return value\n\nNone (`undefined`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Headers/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.entries()\n\nThe **`Headers.entries()`** method returns an iterator allowing to go through all key/value pairs\ncontained in this object. The both the key and value of each pairs are `String` objects.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Headers/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.forEach()\n\nThe **`Headers.forEach()`** method executes a callback function once per each key/value pair in the `Headers` object.\n\n## Syntax\n\n```js\n// Arrow function\nforEach((value, key) => { /* … */ })\nforEach((value, key, object) => { /* … */ })\n\n// Inline callback function\nforEach(function (value, key) { /* … */ })\nforEach(function (value, key, object) { /* … */ })\nforEach(function (value, key) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n  - : Function to execute for each entry in the map. It takes the following arguments:\n    - `value`\n      - : Value of the currently visited header entry.\n    - `key`\n      - : Name of the currently visited header entry.\n    - `object`\n      - : The Headers object being iterated.\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `callback`.\n\n### Return value\n\n`undefined`.\n\n## Description\n\nThe `Headers.forEach()` method executes the provided callback once for each key of the Headers which actually exist. It is not invoked for keys which have been deleted. However, it is executed for keys which are present but have the value undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Headers/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.get()\n\nThe **`get()`** method of the [`Headers`](../../../globals/Headers/Headers.mdx) interface\nreturns a byte string of all the values of a header within a `Headers` object\nwith a given name. If the requested header doesn't exist in the `Headers`\nobject, it returns `null`.\n\n## Syntax\n\n```js\nget(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header whose values you want to retrieve from the\n    `Headers` object. If the given name is not the name of an HTTP header, this\n    method throws a `TypeError`. The name is case-insensitive.\n\n### Return value\n\nA [`String`](../../../globals/String/String.mdx) sequence representing the values of the retrieved header or\n`null` if this header is not set.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Headers/prototype/getSetCookie.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.getSetCookie()\n\nThe **`getSetCookie()`** method of the [`Headers`](../../../globals/Headers/Headers.mdx) interface\nreturns an array of all the values of the `Set-Cookie` headers, returning\nan empty list if none are present.\n\n## Syntax\n\n```js\ngetSetCookie()\n```\n\n### Return value\n\n`String[]` representing the list of `Set-Cookie` headers.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Headers/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.has()\n\nThe **`has()`** method of the `Headers` interface\nreturns a boolean stating whether a `Headers` object contains a certain\nheader.\n\n## Syntax\n\n```js\nhas(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to test for. If the given name is not a valid\n    HTTP header name, this method throws a `TypeError`.\n\n### Return value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Headers/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.keys()\n\nThe **`Headers.keys()`** method returns an iterator allowing to go through all keys contained\nin this object. The keys are `String` objects.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Headers/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.set()\n\nThe **`set()`** method of the `Headers` interface\nsets a new value for an existing header inside a `Headers` object, or adds\nthe header if it does not already exist.\n\nThe difference between `set()` and `Headers.append` is that if\nthe specified header already exists and accepts multiple values, `set()`\noverwrites the existing value with the new one, whereas `Headers.append`\nappends the new value to the end of the set of values.\n\n## Syntax\n\n```js\nset(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to set to a new value. If the given name is not\n    the name of an HTTP header, this method throws a `TypeError`.\n- `value`\n  - : The new value you want to set.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Headers/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.values()\n\nThe **`Headers.values()`** method returns an iterator allowing to go through all values contained\nin this object. The values are `String` objects.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/HmacImportParams/HmacImportParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# HmacImportParams\n\nThe **`HmacImportParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.importKey`, when generating a key for the `HMAC` algorithm.\n\n## Instance properties\n\n- `name`\n  - : A string. This should be set to `HMAC`.\n- `hash`\n\n  - : A string representing the name of the digest function to use. The can take a value of `SHA-1`, `SHA-256`, `SHA-384`, or `SHA-512`.\n\n- `length` _optional_\n  - : A `Number` representing the length in bits of the key. If this is omitted the length of the key is equal to the length of the digest generated by the digest function you have chosen. Unless you have a good reason to use a different length, omit this property and use the default.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Infinity.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Infinity\n\nThe global property **`Infinity`** is a numeric value representing infinity.\n\n## Value\n\nThe same number value as `Number.POSITIVE_INFINITY`.\n\n## Description\n\n`Infinity` is a property of the _global object_. In other words, it is a variable in global scope.\n\nThe value `Infinity` (positive infinity) is greater than any other number.\n\nThis value behaves slightly differently than mathematical infinity; see `Number.POSITIVE_INFINITY` for details.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Int16Array/Int16Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Int16Array()\n\nThe **`Int16Array()`** typed array constructor creates an array\nof twos-complement 16-bit signed integers in the platform byte order. If control over\nbyte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are initialized\nto `0`. Once established, you can reference elements in the array using the\nobject's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Int16Array()\nnew Int16Array(length)\nnew Int16Array(typedArray)\nnew Int16Array(object)\n\nnew Int16Array(buffer)\nnew Int16Array(buffer, byteOffset)\nnew Int16Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Int16Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Int32Array/Int32Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Int32Array()\n\nThe **`Int32Array()`** typed array constructor creates an array\nof twos-complement 32-bit signed integers in the platform byte order. If control over\nbyte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are initialized\nto `0`. Once established, you can reference elements in the array using the\nobject's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Int32Array()\nnew Int32Array(length)\nnew Int32Array(typedArray)\nnew Int32Array(object)\n\nnew Int32Array(buffer)\nnew Int32Array(buffer, byteOffset)\nnew Int32Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Int32Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Int8Array/Int8Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Int8Array()\n\nThe **`Int8Array()`** constructor creates a typed array of\ntwos-complement 8-bit signed integers. The contents are initialized to `0`.\nOnce established, you can reference elements in the array using the object's methods, or\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew Int8Array()\nnew Int8Array(length)\nnew Int8Array(typedArray)\nnew Int8Array(object)\n\nnew Int8Array(buffer)\nnew Int8Array(buffer, byteOffset)\nnew Int8Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Int8Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/JSON/parse.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# JSON.parse()\n\nThe **`JSON.parse()`** method parses a JSON string, constructing the JavaScript value or object described by the string. An optional _reviver_ function can be provided to perform a transformation on the resulting object before it is returned.\n\n## Syntax\n\n```js\nJSON.parse(text)\nJSON.parse(text, reviver)\n```\n\n### Parameters\n\n- `text`\n  - : The string to parse as JSON.\n- `reviver` _**optional**_\n  - : If a function, this prescribes how each value originally produced by parsing is transformed before being returned. Non-callable values are ignored. The function is called with the following arguments:\n    - `key`\n      - : The key associated with the value.\n    - `value`\n      - : The value produced by parsing.\n\n### Return value\n\nThe `Object`, `Array`, string, number, boolean, or `null` value corresponding to the given JSON `text`.\n\n### Exceptions\n\n- [`SyntaxError`](../../globals/SyntaxError/SyntaxError.mdx)\n  - : Thrown if the string to parse is not valid JSON.\n\n## Description\n\n`JSON.parse()` parses a JSON string according to the [JSON grammar](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/JSON#full_json_grammar), then evaluates the string as if it's a JavaScript expression. The only instance where a piece of JSON text represents a different value from the same JavaScript expression is when dealing with the `\"__proto__\"` key — see [Object literal syntax vs. JSON](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Object_initializer#object_literal_syntax_vs._json).\n\n### The reviver parameter\n\nIf a `reviver` is specified, the value computed by parsing is _transformed_ before being returned. Specifically, the computed value and all its properties (in a [depth-first](https://en.wikipedia.org/wiki/Depth-first_search) fashion, beginning with the most nested properties and proceeding to the original value itself) are individually run through the `reviver`.\n\nThe `reviver` is called with the object containing the property being processed as `this`, and two arguments: `key` and `value`, representing the property name as a string (even for arrays) and the property value. If the `reviver` function returns [`undefined`](../../globals/undefined.mdx) (or returns no value — for example, if execution falls off the end of the function), the property is deleted from the object. Otherwise, the property is redefined to be the return value. If the `reviver` only transforms some values and not others, be certain to return all untransformed values as-is — otherwise, they will be deleted from the resulting object.\n\nSimilar to the `replacer` parameter of [`JSON.stringify()`](../../globals/JSON/stringify.mdx), `reviver` will be last called on the root object with an empty string as the `key` and the root object as the `value`. For JSON text parsing to primitive values, `reviver` will be called once.\n\nNote that `reviver` is run after the value is parsed. So, for example, numbers in JSON text will have already been converted to JavaScript numbers, and may lose precision in the process. To transfer large numbers without loss of precision, serialize them as strings, and revive them to [BigInts](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/BigInt), or other appropriate arbitrary precision formats.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/JSON/stringify.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# JSON.stringify()\n\nThe **`JSON.stringify()`** method converts a JavaScript value to a JSON string, optionally replacing values if a replacer function is specified or optionally including only the specified properties if a replacer array is specified.\n\n## Syntax\n\n```js\nJSON.stringify(value)\nJSON.stringify(value, replacer)\nJSON.stringify(value, replacer, space)\n```\n\n### Parameters\n\n- `value`\n  - : The value to convert to a JSON string.\n- `replacer` _**optional**_\n  - : A function that alters the behavior of the stringification process, or an array of strings or numbers naming properties of `value` that should be included in the output. If `replacer` is an array, all elements that are not strings or numbers (can be either primitives or wrapper objects), including `Symbol` values, are completely ignored. If `replacer` is anything other than a function or an array (e.g. [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or not provided), all properties of the object are included in the resulting JSON string.\n- `space` _**optional**_\n\n  - : A string or number that's used to insert white space (including indentation, line break characters, etc.) into the output JSON string for readability purposes.\n\n    If this is a number, it indicates the number of space characters to be used as indentation, clamped to 10 (that is, any number greater than `10` is treated as if it were `10`). Values less than 1 indicate that no space should be used.\n\n    If this is a string, the string (or the first 10 characters of the string, if it's longer than that) is inserted before every nested object or array.\n\n    If `space` is anything other than a string or number (can be either a primitive or a wrapper object) — for example, is [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or not provided — no white space is used.\n\n### Return value\n\nA JSON string representing the given value, or undefined.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if one of the following is true:\n    - `value` contains a circular reference.\n    - A `BigInt` value is encountered.\n\n## Description\n\n`JSON.stringify()` converts a value to JSON notation representing it:\n\n- `Boolean`, `Number`, `String`, and `BigInt` (obtainable via [`Object()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/Object)) objects are converted to the corresponding primitive values during stringification, in accordance with the traditional conversion semantics. `Symbol` objects (obtainable via [`Object()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/Object)) are treated as plain objects.\n- Attempting to serialize `BigInt` values will throw. However, if the BigInt has a `toJSON()` method (through monkeypatching: `BigInt.prototype.toJSON = ...`), that method can provide the serialization result. This constraint ensures that a proper serialization (and, very likely, its accompanying deserialization) behavior is always explicitly provided by the user.\n- [`undefined`](../../globals/undefined.mdx), `Function`, and `Symbol` values are not valid JSON values. If any such values are encountered during conversion, they are either omitted (when found in an object) or changed to [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) (when found in an array). `JSON.stringify()` can return `undefined` when passing in \"pure\" values like `JSON.stringify(() => {})` or `JSON.stringify(undefined)`.\n- The numbers [`Infinity`](../../globals/Infinity.mdx) and [`NaN`](../../globals/NaN.mdx), as well as the value [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null), are all considered `null`. (But unlike the values in the previous point, they would never be omitted.)\n- Arrays are serialized as arrays (enclosed by square brackets). Only array indices between 0 and `length - 1` (inclusive) are serialized; other properties are ignored.\n- For other objects:\n\n  - All `Symbol`-keyed properties will be completely ignored, even when using the [`replacer`](#the-replacer-parameter) parameter.\n\n  - If the value has a `toJSON()` method, it's responsible to define what data will be serialized. Instead of the object being serialized, the value returned by the `toJSON()` method when called will be serialized. `JSON.stringify()` calls `toJSON` with one parameter, the `key`, which has the same semantic as the `key` parameter of the [`replacer`](#the-replacer-parameter) function:\n\n    - if this object is a property value, the property name\n    - if it is in an array, the index in the array, as a string\n    - if `JSON.stringify()` was directly called on this object, an empty string\n\n    `Date` objects implement the [`toJSON()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toJSON) method which returns a string (the same as [`date.toISOString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)). Thus, they will be stringified as strings.\n\n  - Only [enumerable own properties](https://developer.mozilla.org/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) are visited. This means [Map](../../globals/Map/Map.mdx), [Set](../../globals/Set/Set.mdx), etc. will become `\"{}\"`. You can use the [`replacer`](#the-replacer-parameter) parameter to serialize them to something more useful.\n\n    Properties are visited using the same algorithm as [`Object.keys()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/keys), which has a well-defined order and is stable across implementations. For example, `JSON.stringify` on the same object will always produce the same string, and `JSON.parse(JSON.stringify(obj))` would produce an object with the same key ordering as the original (assuming the object is completely JSON-serializable).\n\n### The replacer parameter\n\nThe `replacer` parameter can be either a function or an array.\n\nAs an array, its elements indicate the names of the properties in the object that should be included in the resulting JSON string. Only string and number values are taken into account; symbol keys are ignored.\n\nAs a function, it takes two parameters: the `key` and the `value` being stringified. The object in which the key was found is provided as the `replacer`'s `this` context.\n\nThe `replacer` function is called for the initial object being stringified as well, in which case the `key` is an empty string (`\"\"`). It is then called for each property on the object or array being stringified. Array indices will be provided in its string form as `key`. The current property value will be replaced with the `replacer`'s return value for stringification. This means:\n\n- If you return a number, string, boolean, or `null`, that value is directly serialized and used as the property's value. (Returning a BigInt will throw as well.)\n- If you return a `Function`, `Symbol`, or [`undefined`](../../globals/undefined.mdx), the property is not included in the output.\n- If you return any other object, the object is recursively stringified, calling the `replacer` function on each property.\n\n> **Note:** When parsing JSON generated with `replacer` functions, you would likely want to use the [`reviver`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#using_the_reviver_parameter) parameter to perform the reverse operation.\n\nTypically, array elements' index would never shift (even when the element is an invalid value like a function, it will become `null` instead of omitted). Using the `replacer` function allows you to control the order of the array elements by returning a different array.\n\n### The space parameter\n\nThe `space` parameter may be used to control spacing in the final string.\n\n- If it is a number, successive levels in the stringification will each be indented by this many space characters.\n- If it is a string, successive levels will be indented by this string.\n\nEach level of indentation will never be longer than 10. Number values of `space` are clamped to 10, and string values are truncated to 10 characters.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Map/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get Map\\[Symbol.species]\n\nThe **`Map[Symbol.species]`** accessor property is an unused accessor property specifying how to copy `Map` objects.\n\n## Syntax\n\n```js\nMap[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct copied `Map` instances.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `Map` objects. Subclass constructors may override it to change the constructor assignment.\n\n> **Note:** This property is currently unused by all `Map` methods.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Map/Map.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map()\n\nThe **`Map()` constructor** creates [Map](../../globals/Map/Map.mdx) objects.\n\n## Syntax\n\n```js\nnew Map()\nnew Map(iterable)\n```\n\n> **Note:** `Map()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable` _**optional**_\n  - : An `Array` or other\n    [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) object\n    whose elements are key-value pairs. (For example, arrays with two elements,\n    such as `[[ 1, 'one' ],[ 2, 'two' ]]`.) Each key-value pair is added to the\n    new `Map`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Map/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype\\[Symbol.iterator]()\n\nThe **`Symbol.iterator`** method of a `Map` object implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows maps to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the key-value pairs of the map.\n\nThe initial value of this property is the same function object as the initial value of the [`Map.prototype.entries`](../../../globals/Map/prototype/entries.mdx) property.\n\n## Syntax\n\n```js\nmap[Symbol.iterator]()\n```\n\n### Return value\n\nThe same return value as [`Map.prototype.entries()`](../../../globals/Map/prototype/entries.mdx): a new iterable iterator object that yields the key-value pairs of the map.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Map/prototype/clear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.clear()\n\nThe **`clear()`** method removes all elements from a `Map` object.\n\n## Syntax\n\n```js\nclear()\n```\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Map/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.delete()\n\nThe **`delete()`** method removes the specified element from a `Map` object by\nkey.\n\n## Syntax\n\n```js\ndelete(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to remove from the `Map` object.\n\n### Return value\n\n`true` if an element in the `Map` object existed and has been removed, or\n`false` if the element does not exist.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Map/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.entries()\n\nThe **`entries()`** method returns a new\n_[iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators)_ object\nthat contains the `[key, value]` pairs for each element in the `Map` object in\ninsertion order. In this particular case, this iterator object is also an\niterable, so the for-of loop can be used. When the protocol `[Symbol.iterator]`\nis used, it returns a function that, when invoked, returns this iterator itself.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nA new [Map](../../../globals/Map/Map.mdx) iterator object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Map/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.forEach()\n\nThe **`forEach()`** method executes a provided function once per each key/value\npair in the `Map` object, in insertion order.\n\n## Syntax\n\n```js\n// Arrow function\nforEach(() => { /* … */ } )\nforEach((value) => { /* … */ } )\nforEach((value, key) => { /* … */ } )\nforEach((value, key, map) => { /* … */ } )\n\n// Callback function\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n\n// Inline callback function\nforEach(function() { /* … */ })\nforEach(function(value) { /* … */ })\nforEach(function(value, key) { /* … */ })\nforEach(function(value, key, map) { /* … */ })\nforEach(function(value, key, map) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n  - : Function to execute for each entry in the map. It takes the following\n    arguments:\n    - `value` _**optional**_\n      - : Value of each iteration.\n    - `key` _**optional**_\n      - : Key of each iteration.\n    - `map` _**optional**_\n      - : The map being iterated.\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `callback`.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n## Description\n\nThe `forEach` method executes the provided `callback` once for each key of the\nmap which actually exist. It is not invoked for keys which have been deleted.\nHowever, it is executed for values which are present but have the value\n`undefined`.\n\n`callback` is invoked with **three arguments**:\n\n- the entry's `value`\n- the entry's `key`\n- the **`Map` object** being traversed\n\nIf a `thisArg` parameter is provided to `forEach`, it will be passed to\n`callback` when invoked, for use as its `this` value. Otherwise, the value\n`undefined` will be passed for use as its `this` value. The `this` value\nultimately observable by `callback` is determined according to\n[the usual rules for determining the `this` seen by a function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this).\n\nEach value is visited once, except in the case when it was deleted and re-added\nbefore `forEach` has finished. `callback` is not invoked for values deleted\nbefore being visited. New values added before `forEach` has finished will be\nvisited.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Map/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.get()\n\nThe **`get()`** method returns a specified element from a `Map` object. If the\nvalue that is associated to the provided key is an object, then you will get a\nreference to that object and any change made to that object will effectively\nmodify it inside the `Map` object.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to return from the `Map` object.\n\n### Return value\n\nThe element associated with the specified key, or\n[`undefined`](../../../globals/undefined.mdx) if the key can't be found in the `Map` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Map/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.has()\n\nThe **`has()`** method returns a boolean indicating whether an element with the\nspecified key exists or not.\n\n## Syntax\n\n```js\nhas(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to test for presence in the `Map` object.\n\n### Return value\n\n`true` if an element with the specified key exists in the `Map` object;\notherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Map/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.keys()\n\nThe **`keys()`** method returns a new\n_[iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators)_ object\nthat contains the keys for each element in the `Map` object in insertion order. In this particular case, this iterator object is also an iterable, so a [for...of](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loop can be used.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nA new [Map](../../../globals/Map/Map.mdx) iterator object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Map/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.set()\n\nThe **`set()`** method adds or updates an entry in a `Map` object with a specified key and a value.\n\n## Syntax\n\n```js\nset(key, value)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to add to the `Map` object. The key may be any [JavaScript type](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures) (any [primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_values) or any type of [JavaScript object](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#objects)).\n- `value`\n  - : The value of the element to add to the `Map` object. The value may be any [JavaScript type](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures) (any [primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_values) or any type of [JavaScript object](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#objects)).\n\n### Return value\n\nThe `Map` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Map/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.size\n\nThe **`size`** accessor property returns the number of elements in a\n[Map](../../../globals/Map/Map.mdx) object.\n\n## Description\n\nThe value of `size` is an integer representing how many entries the `Map` object\nhas. A set accessor function for `size` is `undefined`; you can not change this\nproperty.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Map/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.values()\n\nThe **`values()`** method returns a new\n_[iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators)_ object\nthat contains the values for each element in the `Map` object in insertion\norder.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nA new [Map](../../../globals/Map/Map.mdx) iterator object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/E.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.E\n\nThe **`Math.E`** property represents Euler's number, the base of natural logarithms, e, which is approximately 2.718.\n\n## Value\n\n`2.718281828459045`\n\n## Description\n\nBecause `E` is a static property of `Math`, you always use it as `Math.E`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/LN10.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LN10\n\nThe **`Math.LN10`** property represents the natural logarithm of 10, approximately 2.302.\n\n## Value\n\n`2.302585092994046`\n\n## Description\n\nBecause `LN10` is a static property of `Math`, you always use it as `Math.LN10`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/LN2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LN2\n\nThe **`Math.LN2`** property represents the natural logarithm of 2, approximately 0.693:\n\n## Value\n\n`0.6931471805599453`\n\n## Description\n\nBecause `LN2` is a static property of `Math`, you always use it as `Math.LN2`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/LOG10e.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LOG10E\n\nThe **`Math.LOG10E`** property represents the base 10 logarithm of [E](./E.mdx), approximately 0.434.\n\n## Value\n\n`0.4342944819032518`\n\n## Description\n\nBecause `LOG10E` is a static property of `Math`, you always use it as `Math.LOG10E`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/LOG2e.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LOG2E\n\nThe **`Math.LOG2E`** property represents the base 2 logarithm of [E](./E.mdx), approximately 1.442.\n\n## Value\n\n`1.4426950408889634`\n\n## Description\n\nBecause `LOG2E` is a static property of `Math`, you always use it as `Math.LOG2E`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/PI.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.PI\n\nThe **`Math.PI`** property represents the ratio of the circumference of a circle to its diameter, approximately 3.14159.\n\n## Value\n\n`3.141592653589793`\n\n## Description\n\nBecause `PI` is a static property of `Math`, you always use it as `Math.PI`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/SQRT1_2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.SQRT1_2\n\nThe **`Math.SQRT1_2`** property represents the square root of 1/2, which is approximately 0.707.\n\n## Value\n\n`0.7071067811865476`\n\n## Description\n\n`Math.SQRT1_2` is a constant and a more performant equivalent to [`Math.sqrt(0.5)`](./sqrt.mdx).\n\nBecause `SQRT1_2` is a static property of `Math`, you always use it as `Math.SQRT1_2`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/SQRT2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.SQRT2\n\nThe **`Math.SQRT2`** property represents the square root of 2, approximately 1.414.\n\n## Value\n\n`0.7071067811865476`\n\n## Description\n\n`Math.SQRT2` is a constant and a more performant equivalent to [`Math.sqrt(2)`](./sqrt.mdx).\n\nBecause `SQRT2` is a static property of `Math`, you always use it as `Math.SQRT2`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/abs.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.abs()\n\nThe **`Math.abs()`** function returns the absolute value of a number.\n\n\n## Syntax\n\n```js\nMath.abs(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe absolute value of `x`. If `x` is negative (including `-0`), returns `-x`. Otherwise, returns `x`. The result is therefore always a positive number or `0`.\n\n## Description\n\nBecause `abs()` is a static method of `Math`, you always use it as `Math.abs()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/acos.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.acos()\n\nThe **`Math.acos()`** function returns the inverse cosine (in radians) of a number.\n\n## Syntax\n\n```js\nMath.acos(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number between -1 and 1, inclusive, representing the angle's cosine value.\n\n### Return value\n\nThe inverse cosine (angle in radians between 0 and π, inclusive) of `x`. If `x` is less than -1 or greater than 1, returns `NaN`.\n\n## Description\n\nBecause `acos()` is a static method of `Math`, you always use it as `Math.acos()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/acosh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.acosh()\n\nThe **`Math.acosh()`** function returns the inverse hyperbolic cosine of a number.\n\n## Syntax\n\n```js\nMath.acosh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 1.\n\n### Return value\n\nThe inverse hyperbolic cosine of `x`. If `x` is less than 1, returns `NaN`.\n\n## Description\n\nBecause `acosh()` is a static method of `Math`, you always use it as `Math.acosh()`, rather than as a method of a `Math` object you created (`Math` is no constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/asin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.asin()\n\nThe **`Math.asin()`** function returns the inverse sine (in radians) of a number.\n\n## Syntax\n\n```js\nMath.asin(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number between -1 and 1, inclusive, representing the angle's sine value.\n\n### Return value\n\nThe inverse sine (angle in radians between <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math>, inclusive) of `x`. If `x` is less than -1 or greater than 1, returns `NaN`.\n\n## Description\n\nBecause `asin()` is a static method of `Math`, you always use it as `Math.asin()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/asinh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.asinh()\n\nThe **`Math.asinh()`** function returns the inverse hyperbolic sine of a number. \n\n## Syntax\n\n```js\nMath.asinh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe inverse hyperbolic sine of `x`.\n\n## Description\n\nBecause `asinh()` is a static method of `Math`, you always use it as `Math.asinh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/atan.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.atan()\n\nThe **`Math.atan()`** function returns the inverse tangent (in radians) of a number.\n\n## Syntax\n\n```js\nMath.atan(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe inverse tangent (angle in radians between <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math> and <math><semantics><mfrac><mi>π</mi><mn>2</mn></mfrac></semantics></math>, inclusive) of `x`. If `x` is `Infinity`, it returns <math><semantics><mfrac><mi>π</mi><mn>2</mn></mfrac></semantics></math>. If `x` is `-Infinity`, it returns <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math>.\n\n## Description\n\nBecause `atan()` is a static method of `Math`, you always use it as `Math.atan()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/atan2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.atan2()\n\nThe **`Math.atan2()`** function returns the angle in the plane (in radians) between the positive x-axis and the ray from (0, 0) to the point (x, y), for `Math.atan2(y, x)`.\n\n## Syntax\n\n```js\nMath.atan2(y, x)\n```\n\n### Parameters\n\n- `y`\n  - : The y coordinate of the point.\n- `x`\n  - : The x coordinate of the point.\n\n### Return value\n\nThe angle in radians (between -π and π, inclusive) between the positive x-axis and the ray from (0, 0) to the point (x, y).\n\n## Description\n\nThe `Math.atan2()` method measures the counterclockwise angle θ, in radians, between the positive x-axis and the point `(x, y)`. Note that the arguments to this function pass the y-coordinate first and the x-coordinate second.\n\n`Math.atan2()` is passed separate `x` and `y` arguments, while [`Math.atan()`](./atan.mdx) is passed the ratio of those two arguments. `Math.atan2(y, x)` differs from `Math.atan(y / x)` in the following cases:\n\n| `x`                  | `y`         | `Math.atan2(y, x)` | `Math.atan(y / x)` |\n| -------------------- | ----------- | ------------------ | ------------------ |\n| `Infinity`           | `Infinity`  | π / 4              | `NaN`              |\n| `Infinity`           | `-Infinity` | -π / 4             | `NaN`              |\n| `-Infinity`          | `Infinity`  | 3π / 4             | `NaN`              |\n| `-Infinity`          | `-Infinity` | -3π / 4            | `NaN`              |\n| 0                    | 0           | 0                  | `NaN`              |\n| 0                    | -0          | -0                 | `NaN`              |\n| < 0 (including `-0`) | 0           | π                  | 0                  |\n| < 0 (including `-0`) | -0          | -π                 | 0                  |\n| `-Infinity`          | > 0         | π                  | -0                 |\n| -0                   | > 0         | π / 2              | -π / 2             |\n| `-Infinity`          | < 0         | -π                 | 0                  |\n| -0                   | < 0         | -π / 2             | π / 2              |\n\nIn addition, for points in the second and third quadrants (`x < 0`), `Math.atan2()` would output an angle less than <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math> or greater than <math><semantics><mfrac><mi>π</mi><mn>2</mn></mfrac></semantics></math>.\n\nBecause `atan2()` is a static method of `Math`, you always use it as `Math.atan2()`, rather than as a method of a `Math` object you created (`Math` is not a constructor)."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/atanh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.atanh()\n\nThe **`Math.atanh()`** function returns the inverse hyperbolic tangent of a number. \n\n## Syntax\n\n```js\nMath.atanh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number between -1 and 1, inclusive.\n\n### Return value\n\nThe inverse hyperbolic tangent of `x`. If `x` is 1, returns `Infinity`. If `x` is -1, returns `-Infinity`. If `x` is less than -1 or greater than 1, returns `NaN`.\n\n## Description\n\nBecause `atanh()` is a static method of `Math`, you always use it as `Math.atanh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/cbrt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.cbrt()\n\nThe **`Math.cbrt()`** function returns the cube root of a number.\n\n## Syntax\n\n```js\nMath.cbrt(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe cube root of `x`.\n\n## Description\n\nBecause `cbrt()` is a static method of `Math`, you always use it as `Math.cbrt()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/ceil.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.ceil()\n\nThe **`Math.ceil()`** function always rounds up and returns the smaller integer greater than or equal to a given number.\n\n## Syntax\n\n```js\nMath.ceil(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe smallest integer greater than or equal to `x`. It's the same value as [`-Math.floor(-x)`](./floor.mdx).\n\n## Description\n\nBecause `ceil()` is a static method of `Math`, you always use it as `Math.ceil()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/clz32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.clz32()\n\nThe **`Math.clz32()`** function returns the number of leading zero bits in the 32-bit binary representation of a number.\n\n## Syntax\n\n```js\nMath.clz32(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe number of leading zero bits in the 32-bit binary representation of `x`.\n\n## Description\n\n`clz32` is short for **C**ount**L**eading**Z**eros**32**.\n\nIf `x` is not a number, it will be converted to a number first, then converted to a 32-bit unsigned integer.\n\nIf the converted 32-bit unsigned integer is `0`, `32` is returned, because all bits are `0`. If the most significant bit is `1` (i.e. the number is greater than or equal to 2<sup>31</sup>), `0` is returned.\n\nThis function is particularly useful for systems that compile to JS, like [Emscripten](https://emscripten.org).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/cos.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.cos()\n\nThe **`Math.cos()`** function returns the cosine of a number in radians.\n\n## Syntax\n\n```js\nMath.cos(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number representing an angle in radians.\n\n### Return value\n\nThe cosine of `x`, between -1 and 1, inclusive. If `x` is `Infinity`, `-Infinity`, or `NaN`, returns `NaN`.\n\n## Description\n\nBecause `cos()` is a static method of `Math`, you always use it as `Math.cos()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/cosh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.cosh()\n\nThe **`Math.cosh()`** function returns the hyperbolic cosine of a number. \n\n## Syntax\n\n```js\nMath.cosh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe hyperbolic cosine of `x`.\n\n## Description\n\nBecause `cosh()` is a static method of `Math`, you always use it as `Math.cosh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor)."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/exp.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.exp()\n\nThe **`Math.exp()`** function returns [E](./E.mdx) raised to the power of a number.\n\n## Syntax\n\n```js\nMath.exp(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nA nonnegative number representing e<sup>x</sup>, where e is [the base of the natural logarithm](./E.mdx).\n\n## Description\n\nBecause `exp()` is a static method of `Math`, you always use it as `Math.exp()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nBeware that `e` to the power of a number very close to 0 will be very close to 1 and suffer from loss of precision. In this case, you may want to use `Math.expm1` instead, and obtain a much higher-precision fractional part of the answer.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/expm1.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.expm1()\n\nThe **`Math.expm1()`** function returns [E](./E.mdx) raised to the power of a number, subtracted by 1.\n\n## Syntax\n\n```js\nMath.expm1(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nA number representing e<sup>x</sup> - 1, where e is [the base of the natural logarithm](./E.mdx).\n\n## Description\n\nFor very small values of _x_, adding 1 can reduce or eliminate precision. The double floats used in JS give you about 15 digits of precision. 1 + 1e-15 \\= 1.000000000000001, but 1 + 1e-16 = 1.000000000000000 and therefore exactly 1.0 in that arithmetic, because digits past 15 are rounded off.\n\nWhen you calculate <math display=\"inline\"><semantics><msup><mi mathvariant=\"normal\">e</mi><mi>x</mi></msup></semantics></math> where x is a number very close to 0, you should get an answer very close to 1 + x, because <math display=\"inline\"><semantics><mrow><munder><mo lspace=\"0em\" rspace=\"0em\">lim</mo><mrow><mi>x</mi><mo stretchy=\"false\">→</mo><mn>0</mn></mrow></munder><mfrac><mrow><msup><mi mathvariant=\"normal\">e</mi><mi>x</mi></msup><mo>−</mo><mn>1</mn></mrow><mi>x</mi></mfrac><mo>=</mo><mn>1</mn></mrow></semantics></math>. If you calculate `Math.exp(1.1111111111e-15) - 1`, you should get an answer close to `1.1111111111e-15`. Instead, due to the highest significant figure in the result of `Math.exp` being the units digit `1`, the final value ends up being `1.1102230246251565e-15`, with only 3 correct digits. If, instead, you calculate `Math.exp1m(1.1111111111e-15)`, you will get a much more accurate answer `1.1111111111000007e-15`, with 11 correct digits of precision.\n\nBecause `expm1()` is a static method of `Math`, you always use it as `Math.expm1()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/floor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.floor()\n\nThe **`Math.floor()`** function always rounds down and returns the largest integer less than or equal to a given number.\n\n## Syntax\n\n```js\nMath.floor(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe largest integer smaller than or equal to `x`. It's the same value as [`-Math.ceil(-x)`](./ceil.mdx).\n\n## Description\n\nBecause `floor()` is a static method of `Math`, you always use it as `Math.floor()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/fround.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.fround()\n\nThe **`Math.fround()`** function returns the nearest [32-bit single precision](https://en.wikipedia.org/wiki/Single-precision_floating-point_format) float representation of a number.\n\n## Syntax\n\n```js\nMath.fround(doubleFloat)\n```\n\n### Parameters\n\n- `doubleFloat`\n  - : A number.\n\n### Return value\n\nThe nearest [32-bit single precision](https://en.wikipedia.org/wiki/Single-precision_floating-point_format) float representation of `x`.\n\n## Description\n\nJavaScript uses 64-bit double floating-point numbers internally, which offer a very high precision. However, sometimes you may be working with 32-bit floating-point numbers, for example if you are reading values from a `Float32Array`. This can create confusion: checking a 64-bit float and a 32-bit float for equality may fail even though the numbers are seemingly identical.\n\nTo solve this, `Math.fround()` can be used to cast the 64-bit float to a 32-bit float. Internally, JavaScript continues to treat the number as a 64-bit float, it just performs a \"round to even\" on the 23rd bit of the mantissa, and sets all following mantissa bits to `0`. If the number is outside the range of a 32-bit float, `Infinity` or `-Infinity` is returned.\n\nBecause `fround()` is a static method of `Math`, you always use it as `Math.fround()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/hypot.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.hypot()\n\nThe **`Math.hypot()`** function returns the square root of the sum of squares of its arguments. \n\n## Syntax\n\n```js\nMath.hypot()\nMath.hypot(value0)\nMath.hypot(value0, value1)\nMath.hypot(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `value1`, …, `valueN`\n  - : Numbers.\n\n### Return value\n\nThe square root of the sum of squares of the given arguments. Returns Infinity if any of the arguments is ±Infinity. Otherwise, if at least one of the arguments is or is converted to NaN, returns NaN. Returns `0` if no arguments are given or all arguments are ±0.\n\n## Description\n\nCalculating the hypotenuse of a right triangle, or the magnitude of a complex number, uses the formula `Math.sqrt(v1*v1 + v2*v2)`, where v1 and v2 are the lengths of the triangle's legs, or the complex number's real and complex components. The corresponding distance in 2 or more dimensions can be calculated by adding more squares under the square root: `Math.sqrt(v1*v1 + v2*v2 + v3*v3 + v4*v4)`.\n\nThis function makes this calculation easier and faster; you call `Math.hypot(v1, v2)`, or `Math.hypot(v1, /* … ,*/, vN)`.\n\n`Math.hypot` also avoids overflow/underflow problems if the magnitude of your numbers is very large. The largest number you can represent in JS is [`Number.MAX_VALUE`](../Number/MAX_VALUE.mdx), which is around 10<sup>308</sup>. If your numbers are larger than about 10<sup>154</sup>, taking the square of them will result in Infinity. For example, `Math.sqrt(1e200*1e200 + 1e200*1e200) = Infinity`. If you use `hypot()` instead, you get a better answer: `Math.hypot(1e200, 1e200) = 1.4142...e+200` . This is also true with very small numbers. `Math.sqrt(1e-200*1e-200 + 1e-200*1e-200) = 0`, but `Math.hypot(1e-200, 1e-200) = 1.4142...e-200`.\n\nWith one argument, `Math.hypot()` is equivalent to [`Math.abs()`](./abs.mdx). [`Math.hypot.length`](../Function/prototype/length.mdx) is 2, which weakly signals that it's designed to handle at least two parameters.\n\nBecause `hypot()` is a static method of `Math`, you always use it as `Math.hypot()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/imul.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.imul()\n\nThe **`Math.imul()`** function returns the result of the C-like 32-bit multiplication of the two parameters.\n\n\n## Syntax\n\n```js\nMath.imul(a, b)\n```\n\n### Parameters\n\n- `a`\n  - : First number.\n- `b`\n  - : Second number.\n\n### Return value\n\nThe result of the C-like 32-bit multiplication of the given arguments.\n\n## Description\n\n`Math.imul()` allows for 32-bit integer multiplication with C-like semantics. This feature is useful for projects like [Emscripten](https://en.wikipedia.org/wiki/Emscripten).\n\nBecause `imul()` is a static method of `Math`, you always use it as `Math.imul()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nIf you use normal JavaScript floating point numbers in `imul()`, you will experience a degrade in performance. This is because of the costly conversion from a floating point to an integer for multiplication, and then converting the multiplied integer back into a floating point.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/log.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log()\n\nThe **`Math.log()`** function returns the natural logarithm (base [E](./E.mdx)) of a number.\n\n## Syntax\n\n```js\nMath.log(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe natural logarithm (base [E](./E.mdx)) of `x`. If `x` is ±0, returns [`-Infinity`](../Number/NEGATIVE_INFINITY.mdx). If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `log()` is a static method of `Math`, you always use it as `Math.log()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nIf you need the natural log of 2 or 10, use the constants `Math.LN2` or `Math.LN10`. If you need a logarithm to base 2 or 10, use `Math.log2()` or `Math.log10()`. If you need a logarithm to other bases, use `Math.log(x) / Math.log(otherBase)` as in the example below; you might want to precalculate `1 / Math.log(otherBase)` since multiplication in `Math.log(x) * constant` is much faster.\n\nBeware that positive numbers very close to 1 can suffer from loss of precision and make its natural logarithm less accurate. In this case, you may want to use `Math.log1p` instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/log10.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log10()\n\nThe **`Math.log10()`** function returns the base 10 logarithm of a number. \n\n## Syntax\n\n```js\nMath.log10(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe base 10 logarithm of `x`. If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `log10()` is a static method of `Math`, you always use it as `Math.log10()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nThis function is the equivalent of `Math.log(x) / Math.log(10)`. For `log10(e)`, use the constant `Math.LOG10E`, which is 1 / `Math.LN10`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/log1p.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log1p()\n\nThe **`Math.log1p()`** function returns the natural logarithm (base [E](./E.mdx)) of `1 + x`, where `x` is the argument.\n\n## Syntax\n\n```js\nMath.log1p(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to -1.\n\n### Return value\n\nThe natural logarithm (base [E](./E.mdx)) of `x + 1`. If `x` is -1, returns [`-Infinity`](../Number/NEGATIVE_INFINITY.mdx). If `x < -1`, returns `NaN`.\n\n## Description\n\nFor very small values of _x_, adding 1 can reduce or eliminate precision. The double floats used in JS give you about 15 digits of precision. 1 + 1e-15 \\= 1.000000000000001, but 1 + 1e-16 = 1.000000000000000 and therefore exactly 1.0 in that arithmetic, because digits past 15 are rounded off.\n\nWhen you calculate log(1 + _x_) where _x_ is a small positive number, you should get an answer very close to _x_, because <math display=\"inline\"><semantics><mrow><munder><mo movablelimits=\"true\" form=\"prefix\">lim</mo><mrow ><mi>x</mi><mo stretchy=\"false\">→</mo><mn>0</mn></mrow></munder><mfrac><mrow><mi>log</mi><mo>⁡</mo><mo stretchy=\"false\">(</mo><mn>1</mn><mo>+</mo><mi>x</mi><mo stretchy=\"false\">)</mo></mrow><mi>x</mi></mfrac><mo>=</mo><mn>1</mn></mrow></semantics></math>. If you calculate `Math.log(1 + 1.1111111111e-15)`, you should get an answer close to `1.1111111111e-15`. Instead, you will end up taking the logarithm of `1.00000000000000111022` (the roundoff is in binary, so sometimes it gets ugly), and get the answer 1.11022…e-15, with only 3 correct digits. If, instead, you calculate `Math.log1p(1.1111111111e-15)`, you will get a much more accurate answer `1.1111111110999995e-15`, with 15 correct digits of precision (actually 16 in this case).\n\nIf the value of `x` is less than -1, the return value is always `NaN`.\n\nBecause `log1p()` is a static method of `Math`, you always use it as `Math.log1p()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/log2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log2()\n\nThe **`Math.log2()`** function returns the base 2 logarithm of a number.\n\n## Syntax\n\n```js\nMath.log2(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe base 2 logarithm of `x`. If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `log2()` is a static method of `Math`, you always use it as `Math.log2()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nThis function is the equivalent of `Math.log(x) / Math.log(2)`. For `log2(e)`, use the constant `Math.LOG2E`, which is 1 / `Math.LN2`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/max.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.max()\n\nThe **`Math.max()`** function returns the largest of the numbers given as input parameters, or `-Infinity` if there are no parameters.\n\n## Syntax\n\n```js\nMath.max()\nMath.max(value0)\nMath.max(value0, value1)\nMath.max(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `value1`, `value2`, … , `valueN`\n  - : Zero or more numbers among which the largest value will be selected and returned.\n\n### Return value\n\nThe largest of the given numbers. Returns `NaN` if any of the parameters is or is converted into `NaN`. Returns `-Infinity` if no parameters are provided.\n\n## Description\n\nBecause `max()` is a static method of `Math`, you always use it as `Math.max()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n[`Math.max.length`](../Function/prototype/length.mdx) is 2, which weakly signals that it's designed to handle at least two parameters.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/min.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.min()\n\nThe **`Math.min()`** function returns the smallest of the numbers given as input parameters, or `Infinity` if there are no parameters.\n\n## Syntax\n\n```js\nMath.min()\nMath.min(value0)\nMath.min(value0, value1)\nMath.min(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `value1`, …, `valueN`\n  - : Zero or more numbers among which the lowest value will be selected and returned.\n\n### Return value\n\nThe smallest of the given numbers. Returns `NaN` if any of the parameters is or is converted into `NaN`. Returns `Infinity` if no parameters are provided.\n\n## Description\n\nBecause `min()` is a static method of `Math`, you always use it as `Math.min()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n[`Math.min.length`](../Function/prototype/length.mdx) is 2, which weakly signals that it's designed to handle at least two parameters.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/pow.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.pow()\n\nThe **`Math.pow()`** method returns the value of a base raised to a power.\n\n## Syntax\n\n```js\nMath.pow(base, exponent)\n```\n\n### Parameters\n\n- `base`\n  - : The base number.\n- `exponent`\n  - : The exponent number.\n\n### Return value\n\nA number representing `base` taken to the power of `exponent`. Returns `NaN` in one of the following cases:\n\n- `exponent` is `NaN`.\n- `base` is `NaN` and `exponent` is not `0`.\n- `base` is ±1 and `exponent` is ±`Infinity`.\n- `base < 0` and `exponent` is not an integer.\n\n## Description\n\n`Math.pow()` is equivalent to the `**` operator, except `Math.pow()` only accepts numbers.\n\n`Math.pow(NaN, 0)` (and the equivalent `NaN ** 0`) is the only case where `NaN` doesn't propagate through mathematical operations — it returns `1` despite the operand being `NaN`. In addition, the behavior where `base` is 1 and `exponent` is non-finite (±Infinity or `NaN`) is different from IEEE 754, which specifies that the result should be 1, whereas JavaScript returns `NaN` to preserve backward compatibility with its original behavior.\n\nBecause `pow()` is a static method of `Math`, use it as `Math.pow()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/random.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.random()\n\nThe **`Math.random()`** function returns a floating-point, pseudo-random number that's greater than or equal to 0 and less than 1, with approximately uniform distribution over that range — which you can then scale to your desired range. The implementation selects the initial seed to the random number generation algorithm; it cannot be chosen or reset by the user.\n\n> **Note:** `Math.random()` _does not_ provide cryptographically secure random numbers. Do not use them for anything related to security. Use the Web Crypto API instead, and more precisely the `crypto.getRandomValues()` method.\n\n## Syntax\n\n```js\nMath.random()\n```\n\n### Return value\n\nA floating-point, pseudo-random number between 0 (inclusive) and 1 (exclusive).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/round.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.round()\n\nThe **`Math.round()`** function returns the value of a number rounded to the nearest integer.\n\n## Syntax\n\n```js\nMath.round(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe value of `x` rounded to the nearest integer.\n\n## Description\n\nIf the fractional portion of the argument is greater than 0.5, the argument is rounded to the integer with the next higher absolute value. If it is less than 0.5, the argument is rounded to the integer with the lower absolute value. If the fractional portion is exactly 0.5, the argument is rounded to the next integer in the direction of +∞.\n\n> **Note:** This differs from many languages' `round()` functions, which often round half-increments _away from zero_, giving a different result in the case of negative numbers with a fractional part of exactly 0.5.\n\n`Math.round(x)` is not exactly the same as [`Math.floor(x + 0.5)`](./floor.mdx). When `x` is -0, or -0.5 ≤ x < 0, `Math.round(x)` returns -0, while `Math.floor(x + 0.5)` returns 0. However, neglecting that difference and potential precision errors, `Math.round(x)` and `Math.floor(x + 0.5)` are generally equivalent.\n\nBecause `round()` is a static method of `Math`, you always use it as `Math.round()`, rather than as a method of a `Math` object you created (`Math` has no constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/sign.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sign()\n\nThe **`Math.sign()`** function returns 1 or -1, indicating the sign of the number passed as argument. If the input is 0 or -0, it will be returned as-is.\n\n## Syntax\n\n```js\nMath.sign(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nA number representing the sign of `x`:\n\n- If `x` is positive, returns `1`.\n- If `x` is negative, returns `-1`.\n- If `x` is positive zero, returns `0`.\n- If `x` is negative zero, returns `-0`.\n- Otherwise, returns `NaN`.\n\n## Description\n\nBecause `sign()` is a static method of `Math`, you always use it as `Math.sign()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/sin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sin()\n\nThe **`Math.sin()`** function returns the sine of a number in radians.\n\n## Syntax\n\n```js\nMath.sin(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number representing an angle in radians.\n\n### Return value\n\nThe sine of `x`, between -1 and 1, inclusive. If `x` is `Infinity`, `-Infinity`, or `NaN`, returns `NaN`.\n\n## Description\n\nBecause `sin()` is a static method of `Math`, you always use it as `Math.sin()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/sinh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sinh()\n\nThe **`Math.sinh()`** function returns the hyperbolic sine of a number. \n\n## Syntax\n\n```js\nMath.sinh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe hyperbolic sine of `x`.\n\n## Description\n\nBecause `sinh()` is a static method of `Math`, you always use it as `Math.sinh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/sqrt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sqrt()\n\nThe **`Math.sqrt()`** function returns the square root of a number.\n\n## Syntax\n\n```js\nMath.sqrt(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe square root of `x`, a nonnegative number. If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `sqrt()` is a static method of `Math`, you always use it as `Math.sqrt()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/tan.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.tan()\n\nThe **`Math.tan()`** function returns the tangent of a number in radians.\n\n\n## Syntax\n\n```js\nMath.tan(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number representing an angle in radians.\n\n### Return value\n\nThe tangent of `x`. If `x` is `Infinity`, `-Infinity`, or `NaN`, returns `NaN`.\n\n> **Note:** Due to floating point precision, it's not possible to obtain the exact value π/2, so the result is always finite if not `NaN`.\n\n## Description\n\nBecause `tan()` is a static method of `Math`, you always use it as `Math.tan()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/tanh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.tanh()\n\nThe **`Math.tanh()`** function returns the hyperbolic tangent of a number. \n\n## Syntax\n\n```js\nMath.tanh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe hyperbolic tangent of `x`.\n\n## Description\n\nBecause `tanh()` is a static method of `Math`, you always use it as `Math.tanh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Math/trunc.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.trunc()\n\nThe **`Math.trunc()`** function returns the integer part of a number by removing any fractional digits.\n\n## Syntax\n\n```js\nMath.trunc(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe integer part of `x`.\n\n## Description\n\nUnlike the other three `Math` methods: `Math.floor()`, `Math.ceil()` and `Math.round()`, the way `Math.trunc()` works is very simple. It _truncates_ (cuts off) the dot and the digits to the right of it, no matter whether the argument is a positive or negative number.\n\nBecause `trunc()` is a static method of `Math`, you always use it as `Math.trunc()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/NaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# NaN\n\nThe global **`NaN`** property is a value representing Not-A-Number.\n\n## Value\n\nThe same number value as [`Number.NaN`](./Number/NaN.mdx).\n\n## Description\n\n`NaN` is a property of the _global object_. In other words, it is a variable in global scope.\n\nIn modern browsers, `NaN` is a non-configurable, non-writable property. Even when this is not the case, avoid overriding it.\n\nThere are five different types of operations that return `NaN`:\n\n- Failed number conversion (e.g. explicit ones like `parseInt(\"blabla\")`, `Number(undefined)`, or implicit ones like `Math.abs(undefined)`)\n- Math operation where the result is not a real number (e.g. `Math.sqrt(-1)`)\n- Indeterminate form (e.g. `0 * Infinity`, `1 ** Infinity`, `Infinity / Infinity`, `Infinity - Infinity`)\n- A method or expression whose operand is or gets coerced to `NaN` (e.g. `7 ** NaN`, `7 * \"blabla\"`) — this means `NaN` is contagious\n- Other cases where an invalid value is to be represented as a number (e.g. an invalid `new Date(\"blabla\").getTime()`, `\"\".charCodeAt(1)`)\n\n`NaN` and its behaviors are not invented by JavaScript. Its semantics in floating point arithmetic (including that `NaN !== NaN`) are specified by [IEEE 754](https://en.wikipedia.org/wiki/Double_precision_floating-point_format). `NaN`'s behaviors include:\n\n- If `NaN` is involved in a mathematical operation (but not [bitwise operations](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators#bitwise_shift_operators)), the result is usually also `NaN`. (See see [silently escaping NaN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN#silently_escaping_nan) for a counter-example.)\n- When `NaN` is one of the operands of any relational comparison (`>`, `<`, `>=`, `<=`), the result is always `false`.\n- `NaN` compares unequal (via [`==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Equality), [`!=`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Inequality), [`===`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality), and [`!==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_inequality)) to any other value — including to another `NaN` value.\n\n`NaN` is also one of the [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) values in JavaScript.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Number/MAX_SAFE_INTEGER.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MAX_SAFE_INTEGER\n\nThe **`Number.MAX_SAFE_INTEGER`** constant represents the maximum safe integer in JavaScript (2<sup>53</sup> – 1).\n\nFor larger integers, consider using `BigInt`.\n\n## Value\n\n`9007199254740991` (9,007,199,254,740,991, or \\~9 quadrillion).\n\n## Description\n\n[Double precision floating point format](https://en.wikipedia.org/wiki/Double_precision_floating-point_format) only has 52 bits to represent the [mantissa](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_encoding), so it can only safely represent integers between -(2<sup>53</sup> – 1) and 2<sup>53</sup> – 1. \"Safe\" in this context refers to the ability to represent integers exactly and to compare them correctly. For example, `Number.MAX_SAFE_INTEGER + 1 === Number.MAX_SAFE_INTEGER + 2` will evaluate to true, which is mathematically incorrect. See `Number.isSafeInteger()` for more information.\n\nBecause `MAX_SAFE_INTEGER` is a static property of `Number`, you always use it as `Number.MAX_SAFE_INTEGER`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Number/MAX_VALUE.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MAX_VALUE\n\nThe **`Number.MAX_VALUE`** property represents the maximum numeric value representable in JavaScript.\n\n## Value\n\n2<sup>1024</sup> - 1, or approximately `1.7976931348623157E+308`.\n\n## Description\n\nValues larger than `MAX_VALUE` are represented as [`Infinity`](../../globals/Infinity.mdx) and will lose their actual value.\n\nBecause `MAX_VALUE` is a static property of `Number`, you always use it as `Number.MAX_VALUE`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Number/MIN_SAFE_INTEGER.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MIN_SAFE_INTEGER\n\nThe **`Number.MIN_SAFE_INTEGER`** constant represents the minimum safe integer in JavaScript, or -(2<sup>53</sup> - 1).\n\nTo represent integers smaller than this, consider using `BigInt`.\n\n## Value\n\n`-9007199254740991` (-9,007,199,254,740,991, or about -9 quadrillion).\n\n## Description\n\n[Double precision floating point format](https://en.wikipedia.org/wiki/Double_precision_floating-point_format) only has 52 bits to represent the [mantissa](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_encoding), so it can only safely represent integers between -(2<sup>53</sup> – 1) and 2<sup>53</sup> – 1. Safe in this context refers to the ability to represent integers exactly and to correctly compare them. For example, `Number.MIN_SAFE_INTEGER - 1 === Number.MIN_SAFE_INTEGER - 2` will evaluate to true, which is mathematically incorrect. See `Number.isSafeInteger()` for more information.\n\nBecause `MIN_SAFE_INTEGER` is a static property of `Number`, you always use it as `Number.MIN_SAFE_INTEGER`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Number/MIN_VALUE.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MIN_VALUE\n\nThe **`Number.MIN_VALUE`** property represents the smallest positive numeric value representable in JavaScript.\n\n## Value\n\n2<sup>-1074</sup>, or `5E-324`.\n\n## Description\n\n`Number.MIN_VALUE` is the smallest positive number (not the most negative number) that can be represented within float precision — in other words, the number closest to 0. The ECMAScript spec doesn't define a precise value that implementations are required to support — instead the spec says, _\"must be the smallest non-zero positive value that can actually be represented by the implementation\"_. This is because small IEEE-754 floating point numbers are [denormalized](https://en.wikipedia.org/wiki/Subnormal_number), but implementations are not required to support this representation, in which case `Number.MIN_VALUE` may be larger.\n\nIn practice, its precise value in mainstream engines like V8 (used by Chrome, Edge, Node.js), SpiderMonkey (used by Firefox), and JavaScriptCore (used by Safari) is 2<sup>-1074</sup>, or `5E-324`.\n\nBecause `MIN_VALUE` is a static property of `Number`, you always use it as `Number.MIN_VALUE`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Number/NEGATIVE_INFINITY.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.NEGATIVE_INFINITY\n\nThe **`Number.NEGATIVE_INFINITY`** property represents the negative Infinity value.\n\n## Value\n\nThe same as the negative value of the global [`Infinity`](../../globals/Infinity.mdx) property.\n\n## Description\n\nThe `Number.NEGATIVE_INFINITY` value behaves slightly differently than mathematical infinity:\n\n- Any positive value, including `Number.POSITIVE_INFINITY`, multiplied by `Number.NEGATIVE_INFINITY` is `Number.NEGATIVE_INFINITY`.\n- Any negative value, including `Number.NEGATIVE_INFINITY`, multiplied by `Number.NEGATIVE_INFINITY` is `Number.POSITIVE_INFINITY`.\n- Any positive value divided by `Number.NEGATIVE_INFINITY` is [negative zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754)).\n- Any negative value divided by `Number.NEGATIVE_INFINITY` is [positive zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754)).\n- Zero multiplied by `Number.NEGATIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- [`NaN`](../../globals/NaN.mdx) multiplied by `Number.NEGATIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- `Number.NEGATIVE_INFINITY`, divided by any negative value except `Number.NEGATIVE_INFINITY`, is `Number.POSITIVE_INFINITY`.\n- `Number.NEGATIVE_INFINITY`, divided by any positive value except `Number.POSITIVE_INFINITY`, is `Number.NEGATIVE_INFINITY`.\n- `Number.NEGATIVE_INFINITY`, divided by either `Number.NEGATIVE_INFINITY` or `Number.POSITIVE_INFINITY`, is [`NaN`](../../globals/NaN.mdx).\n- `x > Number.NEGATIVE_INFINITY` is true for any number _x_ that isn't `Number.NEGATIVE_INFINITY`.\n\nYou might use the `Number.NEGATIVE_INFINITY` property to indicate an error condition that returns a finite number in case of success. Note, however, that [`NaN`](../../globals/NaN.mdx) would be more appropriate in such a case.\n\nBecause `Number.NEGATIVE_INFINITY` is a static property of `Number`, you always use it as `Number.NEGATIVE_INFINITY`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Number/NaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.NaN\n\nThe **`Number.NaN`** property represents Not-A-Number, which is equivalent to [description for the global property](../../globals/NaN.mdx). For more information about the behaviors of `NaN`, see the [`NaN`](../../globals/NaN.mdx).\n\n## Value\n\nThe number value [`NaN`](../../globals/NaN.mdx).\n\n## Description\n\nBecause `NaN` is a static property of `Number`, you always use it as `Number.NaN`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Number/Number.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number() constructor\n\nThe **`Number()` constructor** creates a `Number` object. When called instead as a function, it performs type conversion to a primitive number, which is usually more useful.\n\n## Syntax\n\n```js\nnew Number(value)\nNumber(value)\n```\n\n> **Note:** `Number()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\n- `value`\n  - : The numeric value of the object being created.\n\n### Return value\n\nWhen `Number` is called as a constructor (with `new`), it creates a `Number` object, which is **not** a primitive.\n\nWhen `Number` is called as a function, it [coerces the parameter to a number primitive](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_coercion). [BigInts](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/BigInt) are converted to numbers. If the value can't be converted, it returns [`NaN`](../../globals/NaN.mdx).\n\n> **Warning:** You should rarely find yourself using `Number` as a constructor.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Number/POSITIVE_INFINITY.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.POSITIVE_INFINITY\n\nThe **`Number.POSITIVE_INFINITY`** property represents the positive Infinity value.\n\n## Value\n\nThe same as the value of the global [`Infinity`](../../globals/Infinity.mdx) property.\n\n## Description\n\nThe `Number.POSITIVE_INFINITY` value behaves slightly differently than mathematical infinity:\n\n- Any positive value, including `Number.POSITIVE_INFINITY`, multiplied by `Number.POSITIVE_INFINITY` is `Number.POSITIVE_INFINITY`.\n- Any negative value, including `Number.NEGATIVE_INFINITY`, multiplied by `Number.POSITIVE_INFINITY` is `Number.NEGATIVE_INFINITY`.\n- Any positive number divided by `Number.POSITIVE_INFINITY` is [positive zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754)).\n- Any negative number divided by `Number.POSITIVE_INFINITY` is [negative zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754).\n- Zero multiplied by `Number.POSITIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- `NaN` multiplied by `Number.POSITIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- `Number.POSITIVE_INFINITY`, divided by any negative value except `Number.NEGATIVE_INFINITY`, is `Number.NEGATIVE_INFINITY`.\n- `Number.POSITIVE_INFINITY`, divided by any positive value except `Number.POSITIVE_INFINITY`, is `Number.POSITIVE_INFINITY`.\n- `Number.POSITIVE_INFINITY`, divided by either `Number.NEGATIVE_INFINITY` or `Number.POSITIVE_INFINITY`, is [`NaN`](../../globals/NaN.mdx).\n- `Number.POSITIVE_INFINITY > x` is true for any number _x_ that isn't `Number.POSITIVE_INFINITY`.\n\nYou might use the `Number.POSITIVE_INFINITY` property to indicate an error condition that returns a finite number in case of success. Note, however, that [`NaN`](../../globals/NaN.mdx) would be more appropriate in such a case.\n\nBecause `Number.POSITIVE_INFINITY` is a static property of `Number`, you always use it as `Number.POSITIVE_INFINITY`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Number/epsilon.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.EPSILON\n\nThe **`Number.EPSILON`** property represents the difference between 1 and the smallest floating point number greater than 1.\n\n## Value\n\n2<sup>-52</sup>, or approximately `2.2204460492503130808472633361816E-16`.\n\n## Description\n\n`Number.EPSILON` is the difference between 1 and the next greater number representable in the Number format, because [double precision floating point format](https://en.wikipedia.org/wiki/Double_precision_floating-point_format) only has 52 bits to represent the [mantissa](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_encoding), and the lowest bit has a significance of 2<sup>-52</sup>.\n\nNote that the absolute accuracy of floating numbers decreases as the number gets larger, because the exponent grows while the mantissa's accuracy stays the same. `Number.MIN_VALUE` is the smallest representable positive number, which is much smaller than `Number.EPSILON`.\n\nBecause `EPSILON` is a static property of `Number`, you always use it as `Number.EPSILON`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Number/isFinite.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isFinite()\n\nThe **`Number.isFinite()`** method determines whether the passed value is a finite number — that is, it checks that a given value is a number, and the number is neither positive [`Infinity`](../../globals/Infinity.mdx), negative `Infinity`, nor [`NaN`](../../globals/NaN.mdx).\n\n## Syntax\n\n```js\nNumber.isFinite(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested for finiteness.\n\n### Return value\n\nThe boolean value `true` if the given value is a finite number. Otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Number/isInteger.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isInteger()\n\nThe **`Number.isInteger()`** method determines whether the passed value is an integer.\n\n## Syntax\n\n```js\nNumber.isInteger(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested for being an integer.\n\n### Return value\n\nThe boolean value `true` if the given value is an integer. Otherwise `false`.\n\n## Description\n\nIf the target value is an integer, return `true`, otherwise return `false`. If the value is [`NaN`](../../globals/NaN.mdx) or [`Infinity`](../../globals/Infinity.mdx), return `false`. The method will also return `true` for floating point numbers that can be represented as integer. It will always return `false` if the value is not a number.\n\nNote that some number literals, while looking like non-integers, actually represent integers — due to the precision limit of ECMAScript floating-point number encoding (IEEE-754). For example, `5.0000000000000001` only differs from `5` by `1e-16`, which is too small to be represented. (For reference, [`Number.EPSILON`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/EPSILON) stores the distance between 1 and the next representable floating-point number greater than 1, and that is about `2.22e-16`.) Therefore, `5.0000000000000001` will be represented with the same encoding as `5`, thus making `Number.isInteger(5.0000000000000001)` return `true`.\n\nIn a similar sense, numbers around the magnitude of [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER) will suffer from loss of precision and make `Number.isInteger` return `true` even when it's not an integer. (The actual threshold varies based on how many bits are needed to represent the decimal — for example, `Number.isInteger(4500000000000000.1)` is `true`, but `Number.isInteger(4500000000000000.5)` is `false`.)\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Number/isNaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isNaN()\n\nThe **`Number.isNaN()`** method determines whether the passed value is the number value [`NaN`](../../globals/NaN.mdx), and returns `false` if the input is not of the Number type. It is a more robust version of the original, global `isNaN()` function.\n\n## Syntax\n\n```js\nNumber.isNaN(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested for [`NaN`](../../globals/NaN.mdx).\n\n### Return value\n\nThe boolean value `true` if the given value is a number with value [`NaN`](../../globals/NaN.mdx). Otherwise, `false`.\n\n## Description\n\nThe function `Number.isNaN()` provides a convenient way to check for equality with `NaN`. Note that you cannot test for equality with `NaN` using either the [`==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Equality) or [`===`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) operators, because unlike all other value comparisons in JavaScript, these evaluate to `false` whenever one operand is [`NaN`](../../globals/NaN.mdx), even if the other operand is also [`NaN`](../../globals/NaN.mdx).\n\nSince `x !== x` is only true for `NaN` among all possible JavaScript values, `Number.isNaN(x)` can also be replaced with a test for `x !== x`, despite the latter being less readable.\n\nAs opposed to the global `isNaN()` function, the `Number.isNaN()` method doesn't force-convert the parameter to a number. This makes it safe to pass values that would normally convert to [`NaN`](../../globals/NaN.mdx) but aren't actually the same value as [`NaN`](../../globals/NaN.mdx). This also means that only values of the Number type that are also [`NaN`](../../globals/NaN.mdx) return `true`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Number/isSafeInteger.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isSafeInteger()\n\nThe **`Number.isSafeInteger()`** method determines whether the provided value is a number that is a _safe integer_.\n\n## Syntax\n\n```js\nNumber.isSafeInteger(testValue)\n```\n\n### Parameters\n\n- `testValue`\n  - : The value to be tested for being a safe integer.\n\n### Return value\n\nThe boolean value `true` if the given value is a number that is a safe integer. Otherwise `false`.\n\n## Description\n\nThe safe integers consist of all integers from -(2<sup>53</sup> - 1) to 2<sup>53</sup> - 1, inclusive (±9,007,199,254,740,991). A safe integer is an integer that:\n\n- can be exactly represented as an IEEE-754 double precision number, and\n- whose IEEE-754 representation cannot be the result of rounding any other integer to fit the IEEE-754 representation.\n\nFor example, 2<sup>53</sup> - 1 is a safe integer: it can be exactly represented, and no other integer rounds to it under any IEEE-754 rounding mode. In contrast, 2<sup>53</sup> is _not_ a safe integer: it can be exactly represented in IEEE-754, but the integer 2<sup>53</sup> + 1 can't be directly represented in IEEE-754 but instead rounds to 2<sup>53</sup> under round-to-nearest and round-to-zero rounding.\n\nHandling values larger or smaller than \\~9 quadrillion with full precision requires using an [arbitrary precision arithmetic library](https://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic). See [What Every Programmer Needs to Know about Floating Point Arithmetic](https://floating-point-gui.de/) for more information on floating point representations of numbers.\n\nFor larger integers, consider using the `BigInt` type.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Number/parseFloat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.parseFloat()\n\nThe **`Number.parseFloat()`** method parses an argument and returns a floating point number. If a number cannot be parsed from the argument, it returns [`NaN`](../../globals/NaN.mdx).\n\n## Syntax\n\n```js\nNumber.parseFloat(string)\n```\n\n### Parameters\n\n- `string`\n  - : The value to parse, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). Leading whitespace in this argument is ignored.\n\n### Return value\n\nA floating point number parsed from the given `string`.\n\nOr [`NaN`](../../globals/NaN.mdx) when the first non-whitespace character cannot be converted to a number.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Number/parseInt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.parseInt()\n\nThe **`Number.parseInt()`** method parses a string argument and\nreturns an integer of the specified radix or base.\n\n## Syntax\n\n```js\nNumber.parseInt(string)\nNumber.parseInt(string, radix)\n```\n\n### Parameters\n\n- `string`\n  - : The value to parse, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). Leading whitespace in this argument is ignored.\n- `radix` _**optional**_\n\n  - : An integer between `2` and `36` that represents the\n    _radix_ (the base in mathematical numeral systems) of the\n    `string`.\n\n    If `radix` is undefined or `0`, it is assumed to be `10` except when the number begins with the code unit pairs `0x` or `0X`, in which case a radix of `16` is assumed.\n\n### Return value\n\nAn integer parsed from the given `string`.\n\nIf the `radix` is smaller than `2` or bigger than\n`36`, or the first non-whitespace character cannot be converted to a number,\n[`NaN`](../../globals/NaN.mdx) is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Number/prototype/toExponential.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toExponential()\n\nThe **`toExponential()`** method returns a string representing\nthe `Number` object in exponential notation.\n\n## Syntax\n\n```js\ntoExponential()\ntoExponential(fractionDigits)\n```\n\n### Parameters\n\n- `fractionDigits` _**optional**_\n  - : Optional. An integer specifying the number of digits after the decimal point.\n    Defaults to as many digits as necessary to specify the number.\n\n### Return value\n\nA string representing the given `Number` object in exponential notation\nwith one digit before the decimal point, rounded to\n`fractionDigits` digits after the decimal point.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : If `fractionDigits` is too small or too large. Values between\n    `0` and `100`, inclusive, will not cause a\n    [`RangeError`](../../../globals/RangeError/RangeError.mdx).\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If this method is invoked on an object that is not a `Number`.\n\n## Description\n\nIf the `fractionDigits` argument is omitted, the number of digits\nafter the decimal point defaults to the number of digits necessary to represent the\nvalue uniquely.\n\nIf you use the `toExponential()` method for a numeric literal and the\nnumeric literal has no exponent and no decimal point, leave whitespace(s) before the dot\nthat precedes the method call to prevent the dot from being interpreted as a decimal\npoint.\n\nIf a number has more digits than requested by the\n`fractionDigits` parameter, the number is rounded to the nearest\nnumber represented by `fractionDigits` digits. See the discussion\nof rounding in the description of the [`Number.prototype.toFixed()`](../../../globals/Number/prototype/toFixed.mdx) method, which also applies to `toExponential()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Number/prototype/toFixed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toFixed()\n\nThe **`toFixed()`** method formats a number using fixed-point notation.\n\n## Syntax\n\n```js\ntoFixed()\ntoFixed(digits)\n```\n\n### Parameters\n\n- `digits` _**optional**_\n  - : The number of digits to appear after the decimal point; should be a value between `0` and `100`, inclusive. If this argument is omitted, it is treated as `0`.\n\n### Return value\n\nA string representing the given number using fixed-point notation.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : If `digits` is smaller than `0`, larger than `100`, or is `NaN`.\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If this method is invoked on an object that is not a `Number`.\n\n## Description\n\nThe `toFixed()` method returns a string representation of `numObj` that does not use exponential notation and has exactly `digits` digits after the decimal place. The number is rounded if necessary, and the fractional part is padded with zeros if necessary so that it has the specified length.\n\nIf the absolute value of `numObj` is greater or equal to 10<sup>21</sup>, this method uses the same algorithm as [`Number.prototype.toString()`](../../../globals/Number/prototype/toString.mdx) and returns a string in exponential notation. `toFixed()` returns `\"Infinity\"`, `\"NaN\"`, or `\"-Infinity\"` if the value of `numObj` is non-finite.\n\nThe output of `toFixed()` may be more precise than [`toString()`](../../../globals/Number/prototype/toString.mdx) for some values, because `toString()` only prints enough significant digits to distinguish the number from adjacent number values. For example:\n\n```js\n(1000000000000000128).toString(); // '1000000000000000100'\n(1000000000000000128).toFixed(0); // '1000000000000000128'\n```\n\nHowever, choosing a `digits` precision that's too high can return unexpected results, because decimal fractional numbers cannot be represented precisely in floating point. For example:\n\n```js\n0.3.toFixed(50); // '0.29999999999999998889776975374843459576368331909180'\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Number/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string with a language-sensitive representation of this number. In implementations with [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) support, this method simply calls `Intl.NumberFormat`.\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` parameters customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat), these parameters correspond exactly to the [`Intl.NumberFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) constructor's parameters. Implementations without `Intl.NumberFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#locales) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored.\n\nSee the [`Intl.NumberFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string with a language-sensitive representation of the given number.\n\nIn implementations with `Intl.NumberFormat`, this is equivalent to `new Intl.NumberFormat(locales, options).format(number)`.\n\n## Performance\n\nWhen formatting large numbers of numbers, it is better to create a\n`Intl.NumberFormat` object and use the function provided by its\n`format` property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Number/prototype/toPrecision.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toPrecision()\n\nThe **`toPrecision()`** method returns a string representing\nthe `Number` object to the specified precision.\n\n## Syntax\n\n```js\ntoPrecision()\ntoPrecision(precision)\n```\n\n### Parameters\n\n- `precision` _**optional**_\n  - : An integer specifying the number of significant digits.\n\n### Return value\n\nA string representing a `Number` object in fixed-point or exponential\nnotation rounded to `precision` significant digits. See the discussion of\nrounding in the description of the [`Number.prototype.toFixed()`](../../../globals/Number/prototype/toFixed.mdx) method,\nwhich also applies to `toPrecision()`.\n\nIf the `precision` argument is omitted, behaves as\n[`Number.prototype.toString()`](../../../globals/Number/prototype/toString.mdx). If the `precision` argument is a\nnon-integer value, it is rounded to the nearest integer.\n\n### Exceptions\n\n- `RangeError`\n  - : If `precision` is not between `1` and `100`\n    (inclusive), a [`RangeError`](../../../globals/RangeError/RangeError.mdx) is thrown. Implementations are allowed to\n    support larger and smaller values as well. ECMA-262 only requires a precision of up to\n    21 significant digits.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Number/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified number value.\n\n## Syntax\n\n```js\ntoString()\ntoString(radix)\n```\n\n### Parameters\n\n- `radix` _**optional**_\n  - : An integer in the range `2` through `36` specifying the base to use for representing the number value. Defaults to 10.\n\n### Return value\n\nA string representing the specified number value.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `radix` is less than 2 or greater than 36.\n\n## Description\n\nThe `Number` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For `Number` values, the `toString` method returns a string representation of the value in the specified radix.\n\nFor radixes above 10, the letters of the alphabet indicate digits greater than 9. For example, for hexadecimal numbers (base 16) `a` through `f` are used.\n\nIf the specified number value is negative, the sign is preserved. This is the case even if the radix is 2; the string returned is the positive binary representation of the number value preceded by a `-` sign, **not** the two's complement of the number value.\n\nBoth `0` and `-0` have `\"0\"` as their string representation. [`Infinity`](../../../globals/Infinity.mdx) returns `\"Infinity\"` and [`NaN`](../../../globals/NaN.mdx) returns `\"NaN\"`.\n\nIf the number is not a whole number, the decimal point `.` is used to separate the decimal places. [Scientific notation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#exponential) is used if the radix is 10 and the number's magnitude (ignoring sign) is greater than or equal to 10<sup>21</sup> or less than 10<sup>-6</sup>. In this case, the returned string always explicitly specifies the sign of the exponent.\n\n```js\nconsole.log((10 ** 21.5).toString()); // \"3.1622776601683794e+21\"\nconsole.log((10 ** 21.5).toString(8)); // \"526665530627250154000000\"\n```\n\nThe `toString()` method requires its `this` value to be a `Number` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to number values.\n\nBecause `Number` doesn't have a [`[Symbol.toPrimitive]()`](../../../globals/Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `Number` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, Number _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — rather, they are directly converted using the same algorithm as the initial `toString()` implementation.\n\n```js\nNumber.prototype.toString = () => \"Overridden\";\nconsole.log(`${1}`); // \"1\"\nconsole.log(`${new Number(1)}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Number/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.valueOf()\n\nThe **`valueOf()`** method returns the wrapped primitive value\nof a `Number` object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nA number representing the primitive value of the specified `Number` object.\n\n## Description\n\nThis method is usually called internally by JavaScript and not explicitly in web code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Object/Object.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object()\n\nThe **`Object` constructor** turns the input into an object. Its behavior depends on the input's type.\n\n- If the value is [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../globals/undefined.mdx), it creates and returns an empty object.\n- Otherwise, it returns an object of a Type that corresponds to the given value.\n- If the value is an object already, it returns the value.\n\n## Syntax\n\n```js\nnew Object(value)\nObject(value)\n```\n\n> **Note:** `Object()` can be called with or without `new`. Both create a new object.\n\n### Parameters\n\n- `value`\n  - : Any value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Object/assign.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.assign()\n\nThe **`Object.assign()`** method\ncopies all [enumerable](../../globals/Object/prototype/propertyIsEnumerable.mdx)\n[own properties](../../globals/Object/hasOwn.mdx) from one or more\n_source objects_ to a _target object_. It returns the modified target\nobject.\n\n## Syntax\n\n```js\nObject.assign(target, ...sources)\n```\n\n### Parameters\n\n- `target`\n  - : The target object — what to apply the sources' properties to, which is returned\n    after it is modified.\n- `sources`\n  - : The source object(s) — objects containing the properties you want to apply.\n\n### Return value\n\nThe target object.\n\n## Description\n\nProperties in the target object are overwritten by properties in the sources if they\nhave the same \"key\". Later sources' properties overwrite earlier ones.\n\nThe `Object.assign()` method only copies _enumerable_ and\n_own_ properties from a source object to a target object. It uses\n`[[Get]]` on the source and `[[Set]]` on the target, so it will\ninvoke [getters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/get) and [setters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/set). Therefore it\n_assigns_ properties, versus copying or defining new properties. This may make it\nunsuitable for merging new properties into a prototype if the merge sources contain\ngetters.\n\nFor copying property definitions (including their enumerability) into prototypes, use\n[`Object.getOwnPropertyDescriptor()`](../../globals/Object/getOwnPropertyDescriptor.mdx) and\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx) instead.\n\nBoth `String` and `Symbol` properties are copied.\n\nIn case of an error, for example if a property is non-writable, a\n[`TypeError`](../../globals/TypeError/TypeError.mdx) is raised, and the `target` object is\nchanged if any properties are added before the error is raised.\n\n> **Note:** `Object.assign()` does not throw on\n> [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../globals/undefined.mdx) sources.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Object/create.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.create()\n\nThe **`Object.create()`** method creates a new object, using an existing object as the prototype of the newly created object.\n\n## Syntax\n\n```js\nObject.create(proto)\nObject.create(proto, propertiesObject)\n```\n\n### Parameters\n\n- `proto`\n  - : The object which should be the prototype of the newly-created object.\n- `propertiesObject` _**optional**_\n  - : If specified and not [`undefined`](../../globals/undefined.mdx), an object whose [enumerable own properties](https://developer.mozilla.org/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) specify property descriptors to be added to the newly-created object, with the corresponding property names. These properties correspond to the second argument of [`Object.defineProperties()`](../../globals/Object/defineProperties.mdx).\n\n### Return value\n\nA new object with the specified prototype object and properties.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if `proto` is neither [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) nor an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Object/defineProperties.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.defineProperties()\n\nThe **`Object.defineProperties()`** method defines new or\nmodifies existing properties directly on an object, returning the object.\n\n## Syntax\n\n```js\nObject.defineProperties(obj, props)\n```\n\n### Parameters\n\n- `obj`\n  - : The object on which to define or modify properties.\n- `props`\n\n  - : An object whose keys represent the names of properties to be defined or modified and\n    whose values are objects describing those properties. Each value in `props`\n    must be either a data descriptor or an accessor descriptor; it cannot be both (see\n    [`Object.defineProperty()`](../../globals/Object/defineProperty.mdx) for more details).\n\n    Data descriptors and accessor descriptors may optionally contain the following keys:\n\n    - `configurable`\n      - : `true` if and only if the type of this property descriptor may be\n        changed and if the property may be deleted from the corresponding object.\n        **Defaults to `false`.**\n    - `enumerable`\n      - : `true` if and only if this property shows up during enumeration of\n        the properties on the corresponding object.\n        **Defaults to `false`.**\n\n    A data descriptor also has the following optional keys:\n\n    - `value`\n      - : The value associated with the property. Can be any valid JavaScript value\n        (number, object, function, etc.).\n        **Defaults to [`undefined`](../../globals/undefined.mdx).**\n    - `writable`\n      - : `true` if and only if the value associated with the property may be\n        changed with an assignment operator.\n        **Defaults to `false`.**\n\n    An accessor descriptor also has the following optional keys:\n\n    - `get`\n      - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx)\n        if there is no getter. The function's return value will be used as the value of\n        the property.\n        **Defaults to [`undefined`](../../globals/undefined.mdx).**\n    - `set`\n      - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx)\n        if there is no setter. The function will receive as its only argument the new\n        value being assigned to the property.\n        **Defaults to [`undefined`](../../globals/undefined.mdx).**\n\n    If a descriptor has neither of `value`, `writable`,\n    `get` and `set` keys, it is treated as a data descriptor. If a\n    descriptor has both `value` or `writable` and `get`\n    or `set` keys, an exception is thrown.\n\n### Return value\n\nThe object that was passed to the function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Object/defineProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.defineProperty()\n\nThe static method **`Object.defineProperty()`** defines a new\nproperty directly on an object, or modifies an existing property on an object, and\nreturns the object.\n\n## Syntax\n\n```js\nObject.defineProperty(obj, prop, descriptor)\n```\n\n### Parameters\n\n- `obj`\n  - : The object on which to define the property.\n- `prop`\n  - : The name or `Symbol` of the property to be defined or modified.\n- `descriptor`\n  - : The descriptor for the property being defined or modified.\n\n### Return value\n\nThe object that was passed to the function.\n\n## Description\n\nThis method allows a precise addition to or modification of a property on an object.\nNormal property addition through assignment creates properties which show up during\nproperty enumeration (`for...in` loop or\n[`Object.keys`](../../globals/Object/keys.mdx) method), whose values may be changed, and which may be\ndeleted. This method allows these extra details\nto be changed from their defaults. By default, properties added using\n`Object.defineProperty()` are not writable, not enumerable, and not configurable.\n\nProperty descriptors present in objects come in two main flavors: data descriptors and\naccessor descriptors. A **data descriptor** is a property that has a\nvalue, which may or may not be writable. An **accessor descriptor** is a\nproperty described by a getter-setter pair of functions. A descriptor must be one of\nthese two flavors; it cannot be both.\n\nBoth data and accessor descriptors are objects. They share the following optional keys\n(please note: the **defaults** mentioned here are in the case of defining\nproperties using `Object.defineProperty()`):\n\n- `configurable`\n\n  - : when this is set to `false`,\n\n    - the type of this property cannot be changed between data property and accessor property, and\n    - the property may not be deleted, and\n    - other attributes of its descriptor cannot be changed (however, if it's a data descriptor with `writable: true`, the `value` can be changed, and `writable` can be changed to `false`).\n\n    **Defaults to `false`.**\n\n- `enumerable`\n  - : `true` if and only if this property shows up during enumeration of the\n    properties on the corresponding object.\n    **Defaults to `false`.**\n\nA **data descriptor** also has the following optional keys:\n\n- `value`\n  - : The value associated with the property. Can be any valid JavaScript value (number,\n    object, function, etc.).\n    **Defaults to [`undefined`](../../globals/undefined.mdx).**\n- `writable`\n  - : `true` if the value associated with the property may be changed with an\n    assignment operator.\n    **Defaults to `false`.**\n\nAn **accessor descriptor** also has the following optional keys:\n\n- `get`\n  - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no getter. When the property is accessed, this function is called without\n    arguments and with `this` set to the object through which the property is\n    accessed (this may not be the object on which the property is defined due to\n    inheritance). The return value will be used as the value of the property.\n    **Defaults to [`undefined`](../../globals/undefined.mdx).**\n- `set`\n  - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no setter. When the property is assigned, this function is called with one\n    argument (the value being assigned to the property) and with `this` set to\n    the object through which the property is assigned.\n    **Defaults to [`undefined`](../../globals/undefined.mdx).**\n\nIf a descriptor has neither of `value`, `writable`,\n`get` and `set` keys, it is treated as a data descriptor. If a\ndescriptor has both \\[`value` or `writable`] and \\[`get` or `set`] keys, an exception is thrown.\n\nBear in mind that these attributes are not necessarily the descriptor's own properties.\nInherited properties will be considered as well. In order to ensure these defaults are\npreserved, you might freeze existing objects in the descriptor object's prototype chain upfront, specify all\noptions explicitly, or point to [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) with [`Object.create(null)`](../../globals/Object/create.mdx).\n\n```js\nconst obj = {};\n// 1. Using a null prototype: no inherited properties\nconst descriptor = Object.create(null);\ndescriptor.value = 'static';\n\n// not enumerable, not configurable, not writable as defaults\nObject.defineProperty(obj, 'key', descriptor);\n\n// 2. Being explicit by using a throw-away object literal with all attributes present\nObject.defineProperty(obj, 'key2', {\n  enumerable: false,\n  configurable: false,\n  writable: false,\n  value: 'static'\n});\n\n// 3. Recycling same object\nfunction withValue(value) {\n  const d = withValue.d || (\n    withValue.d = {\n      enumerable: false,\n      writable: false,\n      configurable: false,\n      value,\n    }\n  );\n\n  // avoiding duplicate operation for assigning value\n  if (d.value !== value) d.value = value;\n\n  return d;\n}\n// and\nObject.defineProperty(obj, 'key', withValue('static'));\n\n// if freeze is available, prevents adding or\n// removing the object prototype properties\n// (value, get, set, enumerable, writable, configurable)\n(Object.freeze || Object)(Object.prototype);\n```\n\nWhen the property already exists, `Object.defineProperty()` attempts to modify the property according to the values in the descriptor and the property's current configuration.\n\nIf the old descriptor had its `configurable` attribute set to `false`, the property is said to be _non-configurable_. It is not possible to change any attribute of a non-configurable accessor property, and it is not possible to switch between data and accessor property types. For data properties with `writable: true`, it is possible to modify the value and change the `writable` attribute from `true` to `false`. A [`TypeError`](../../globals/TypeError/TypeError.mdx) is thrown when attempts are made to change non-configurable property attributes (except `value` and `writable`, if permitted), except when defining a value same as the original value on a data property.\n\nWhen the current property is configurable, defining an attribute to `undefined` effectively deletes it. For example, if `o.k` is an accessor property, `Object.defineProperty(o, \"k\", { set: undefined })` will remove the setter, making `k` only have a getter and become readonly. If an attribute is absent from the new descriptor, the old descriptor attribute's value is kept (it won't be implicitly re-defined to `undefined`). It is possible to toggle between data and accessor property by giving a descriptor of a different \"flavor\". For example, if the new descriptor is a data descriptor (with `value` or `writable`), the original descriptor's `get` and `set` attributes will both be dropped.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Object/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.entries()\n\nThe **`Object.entries()`** method returns an array of a given object's own enumerable string-keyed property key-value pairs.\n\n## Syntax\n\n```js\nObject.entries(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : An object.\n\n### Return value\n\nAn array of the given object's own enumerable string-keyed property key-value pairs. Each key-value pair is an array with two elements: the first element is the property key (which is always a string), and the second element is the property value.\n\n## Description\n\n`Object.entries()` returns an array whose elements are arrays corresponding to the enumerable string-keyed property key-value pairs found directly upon `object`. This is the same as iterating with a `for...in` loop, except that a `for...in` loop enumerates properties in the prototype chain as well. The order of the array returned by `Object.entries()` is the same as that provided by a `for...in` loop.\n\nIf you only need the property keys, use [`Object.keys()`](../../globals/Object/keys.mdx) instead. If you only need the property values, use [`Object.values()`](../../globals/Object/values.mdx) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Object/freeze.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.freeze()\n\nThe **`Object.freeze()`** method _freezes_ an object. Freezing an object [prevents extensions](../../globals/Object/preventExtensions.mdx) and makes existing properties non-writable and non-configurable. A frozen object can no longer be changed: new properties cannot be added, existing properties cannot be removed, their enumerability, configurability, writability, or value cannot be changed, and the object's prototype cannot be re-assigned. `freeze()` returns the same object that was passed in.\n\nFreezing an object is the highest integrity level that JavaScript provides.\n\n## Syntax\n\n```js\nObject.freeze(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object to freeze.\n\n### Return value\n\nThe object that was passed to the function.\n\n## Description\n\nFreezing an object is equivalent to [preventing extensions](../../globals/Object/preventExtensions.mdx) and then changing all existing [properties' descriptors'](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty#description) `configurable` to `false` — and for data properties, `writable` to `false` as well. Nothing can be added to or removed from the properties set of a frozen object. Any attempt to do so will fail, either silently or by throwing a [`TypeError`](../../globals/TypeError/TypeError.mdx) exception (most commonly, but not exclusively, when in \"strict mode\").\n\nFor data properties of a frozen object, their values cannot be changed since the writable and\nconfigurable attributes are set to false. Accessor properties (getters and setters) work the same — the property value returned by the getter may still change, and the setter can still be called without throwing errors when setting the property. Note that values\nthat are objects can still be modified, unless they are also frozen. As an object, an\narray can be frozen; after doing so, its elements cannot be altered and no elements can\nbe added to or removed from the array.\n\n`freeze()` returns the same object that was passed into the function. It\n_does not_ create a frozen copy.\n\nA `TypedArray` or a [`DataView`](../../globals/DataView/DataView.mdx) with elements will cause a [`TypeError`](../../globals/TypeError/TypeError.mdx),\nas they are views over memory and will definitely cause other possible issues:\n\n```js\nObject.freeze(new Uint8Array(0)) // No elements\n// Uint8Array []\n\nObject.freeze(new Uint8Array(1)) // Has elements\n// TypeError: Cannot freeze array buffer views with elements\n\nObject.freeze(new DataView(new ArrayBuffer(32))) // No elements\n// DataView {}\n\nObject.freeze(new Float64Array(new ArrayBuffer(64), 63, 0)) // No elements\n// Float64Array []\n\nObject.freeze(new Float64Array(new ArrayBuffer(64), 32, 2)) // Has elements\n// TypeError: Cannot freeze array buffer views with elements\n```\n\nNote that as the standard three properties (`buf.byteLength`,\n`buf.byteOffset` and `buf.buffer`) are read-only (as are those of\nan `ArrayBuffer`, there is no reason for\nattempting to freeze these properties.\n\nUnlike [`Object.seal()`](../../globals/Object/seal.mdx), existing properties in objects frozen with `Object.freeze()` are made immutable and data properties cannot be re-assigned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Object/fromEntries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.fromEntries()\n\nThe **`Object.fromEntries()`** method transforms a list of key-value pairs into an object.\n\n## Syntax\n\n```js\nObject.fromEntries(iterable)\n```\n\n### Parameters\n\n- `iterable`\n\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol), such as an `Array` or [Map](../../globals/Map/Map.mdx), containing a list of objects. Each object should have two properties:\n\n    - `0`\n      - : A string or `Symbol` representing the property key.\n    - `1`\n      - : The property value.\n\n    Typically, this object is implemented as a two-element array, with the first element being the property key and the second element being the property value.\n\n### Return value\n\nA new object whose properties are given by the entries of the iterable.\n\n## Description\n\nThe `Object.fromEntries()` method takes a list of key-value pairs and returns a new object whose properties are given by those entries. The `iterable` argument is expected to be an object that implements an `@@iterator` method. The method returns an iterator object that produces two-element array-like objects. The first element is a value that will be used as a property key, and the second element is the value to associate with that property key.\n\n`Object.fromEntries()` performs the reverse of [`Object.entries()`](../../globals/Object/entries.mdx), except that `Object.entries()` only returns string-keyed properties, while `Object.fromEntries()` can also create symbol-keyed properties.\n\n> **Note:** Unlike [`Array.from()`](../../globals/Array/from.mdx), `Object.fromEntries()` does not use the value of `this`, so calling it on another constructor does not create objects of that type.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Object/getOwnPropertyDescriptor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertyDescriptor()\n\nThe **`Object.getOwnPropertyDescriptor()`** method returns an\nobject describing the configuration of a specific property on a given object (that is,\none directly present on an object and not in the object's prototype chain). The object\nreturned is mutable but mutating it has no effect on the original property's\nconfiguration.\n\n## Syntax\n\n```js\nObject.getOwnPropertyDescriptor(obj, prop)\n```\n\n### Parameters\n\n- `obj`\n  - : The object in which to look for the property.\n- `prop`\n  - : The name or `Symbol` of the property whose description is to be\n    retrieved.\n\n### Return value\n\nA property descriptor of the given property if it exists on the object,\n[`undefined`](../../globals/undefined.mdx) otherwise.\n\n## Description\n\nThis method permits examination of the precise description of a property. A\n_property_ in JavaScript consists of either a string-valued name or a\n`Symbol` and a property descriptor. Further information about property\ndescriptor types and their attributes can be found in\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx).\n\nA _property descriptor_ is a record with some of the following attributes:\n\n- `value`\n  - : The value associated with the property (data descriptors only).\n- `writable`\n  - : `true` if and only if the value associated with the property may be\n    changed (data descriptors only).\n- `get`\n  - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no getter (accessor descriptors only).\n- `set`\n  - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no setter (accessor descriptors only).\n- `configurable`\n  - : `true` if and only if the type of this property descriptor may be changed\n    and if the property may be deleted from the corresponding object.\n- `enumerable`\n  - : `true` if and only if this property shows up during enumeration of the\n    properties on the corresponding object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Object/getOwnPropertyDescriptors.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertyDescriptors()\n\nThe **`Object.getOwnPropertyDescriptors()`** method returns all\nown property descriptors of a given object.\n\n## Syntax\n\n```js\nObject.getOwnPropertyDescriptors(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object for which to get all own property descriptors.\n\n### Return value\n\nAn object containing all own property descriptors of an object. Might be an empty\nobject, if there are no properties.\n\n## Description\n\nThis method permits examination of the precise description of all own properties of an\nobject. A _property_ in JavaScript consists of either a string-valued name or a\n`Symbol` and a property descriptor. Further information about property\ndescriptor types and their attributes can be found in\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx).\n\nA _property descriptor_ is a record with some of the following attributes:\n\n- `value`\n  - : The value associated with the property (data descriptors only).\n- `writable`\n  - : `true` if and only if the value associated with the property may be\n    changed (data descriptors only).\n- `get`\n  - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no getter (accessor descriptors only).\n- `set`\n  - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no setter (accessor descriptors only).\n- `configurable`\n  - : `true` if and only if the type of this property descriptor may be changed\n    and if the property may be deleted from the corresponding object.\n- `enumerable`\n  - : `true` if and only if this property shows up during enumeration of the\n    properties on the corresponding object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Object/getOwnPropertyNames.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertyNames()\n\nThe **`Object.getOwnPropertyNames()`** method returns an array of all properties (including non-enumerable properties except for those which use Symbol) found directly in a given object.\n\n## Syntax\n\n```js\nObject.getOwnPropertyNames(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object whose enumerable and non-enumerable properties are to be returned.\n\n### Return value\n\nAn array of strings that corresponds to the properties found directly in the given object.\n\n## Description\n\n`Object.getOwnPropertyNames()` returns an array whose elements are strings corresponding to the enumerable and non-enumerable properties found directly in a given object `obj`. The ordering of the enumerable properties in the array is consistent with the ordering exposed by a `for...in` loop (or by [`Object.keys()`](../../globals/Object/keys.mdx)) over the properties of the object. The non-negative integer keys of the object (both enumerable and non-enumerable) are added in ascending order to the array first, followed by the string keys in the order of insertion.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Object/getOwnPropertySymbols.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertySymbols()\n\nThe **`Object.getOwnPropertySymbols()`** method returns an array of all symbol properties found directly upon a given object.\n\n## Syntax\n\n```js\nObject.getOwnPropertySymbols(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object whose symbol properties are to be returned.\n\n### Return value\n\nAn array of all symbol properties found directly upon the given object.\n\n## Description\n\nSimilar to [`Object.getOwnPropertyNames()`](../../globals/Object/getOwnPropertyNames.mdx), you can get all symbol properties of a given object as an array of symbols. Note that [`Object.getOwnPropertyNames()`](../../globals/Object/getOwnPropertyNames.mdx) itself does not contain the symbol properties of an object and only the string properties.\n\nAs all objects have no own symbol properties initially, `Object.getOwnPropertySymbols()` returns an empty array unless you have set symbol properties on your object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Object/getPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getPrototypeOf()\n\nThe **`Object.getPrototypeOf()`** method returns the prototype\n(i.e. the value of the internal `[[Prototype]]` property) of the specified\nobject.\n\n## Syntax\n\n```js\nObject.getPrototypeOf(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object whose prototype is to be returned.\n\n### Return value\n\nThe prototype of the given object, which may be `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Object/hasOwn.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.hasOwn()\n\nThe **`Object.hasOwn()`** static method returns `true` if the specified object has the indicated property as its _own_ property.\nIf the property is inherited, or does not exist, the method returns `false`.\n\n> **Note:** `Object.hasOwn()` is intended as a replacement for [`Object.prototype.hasOwnProperty()`](../../globals/Object/prototype/hasOwnProperty.mdx).\n\n\n\n## Syntax\n\n```js\nhasOwn(instance, prop)\n```\n\n### Parameters\n\n- `instance`\n  - : The JavaScript object instance to test.\n- `prop`\n  - : The `String` name or [Symbol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol) of the property to test.\n\n### Return value\n\n`true` if the specified object has directly defined the specified property.\nOtherwise `false`\n\n## Description\n\nThe **`Object.hasOwn()`** method returns `true` if the specified property is a\ndirect property of the object — even if the property value is `null` or `undefined`.\nThe method returns `false` if the property is inherited, or has not been declared at all.\nUnlike the `in` operator, this\nmethod does not check for the specified property in the object's prototype chain.\n\nIt is recommended over [`Object.prototype.hasOwnProperty()`](../../globals/Object/prototype/hasOwnProperty.mdx) because\nit works for objects created using `Object.create(null)` and with objects that\nhave overridden the inherited `hasOwnProperty()` method. While it is possible to\nworkaround these problems by calling `Object.prototype.hasOwnProperty()` on an\nexternal object, `Object.hasOwn()` is more intuitive.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Object/is.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.is()\n\nThe **`Object.is()`** method determines whether two values are [the same value](https://developer.mozilla.org/docs/Web/JavaScript/Equality_comparisons_and_sameness#same-value_equality_using_object.is).\n\n## Syntax\n\n```js\nObject.is(value1, value2)\n```\n\n### Parameters\n\n- `value1`\n  - : The first value to compare.\n- `value2`\n  - : The second value to compare.\n\n### Return value\n\nA boolean indicating whether or not the two arguments are the same value.\n\n## Description\n\n`Object.is()` determines whether two values are [the same value](https://developer.mozilla.org/docs/Web/JavaScript/Equality_comparisons_and_sameness#same-value_equality_using_object.is). Two values are the same if one of the following holds:\n\n- both [`undefined`](../../globals/undefined.mdx)\n- both `null`\n- both `true` or both `false`\n- both strings of the same length with the same characters in the same order\n- both the same object (meaning both values reference the same object in memory)\n- both `BigInts` with the same numeric value\n- both `Symbols` that reference the same symbol value\n- both numbers and\n\n  - both `+0`\n  - both `-0`\n  - both [`NaN`](../../globals/NaN.mdx)\n  - or both non-zero, not [`NaN`](../../globals/NaN.mdx), and have the same value\n\n`Object.is()` is not equivalent to the [`==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Equality) operator. The `==` operator applies various coercions to both sides (if they are not the same type) before testing for equality (resulting in such behavior as `\"\" == false` being `true`), but `Object.is()` doesn't coerce either value.\n\n`Object.is()` is also _not_ equivalent to the [`===`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) operator. The only difference between `Object.is()` and `===` is in their treatment of signed zeros and `NaN` values. The `===` operator (and the `==` operator) treats the number values `-0` and `+0` as equal, but treats [`NaN`](../../globals/NaN.mdx) as not equal to each other.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Object/isExtensible.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.isExtensible()\n\nThe **`Object.isExtensible()`** method determines if an object\nis extensible (whether it can have new properties added to it).\n\n## Syntax\n\n```js\nObject.isExtensible(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be checked.\n\n### Return value\n\nA `Boolean` indicating whether or not the given object is extensible.\n\n## Description\n\nObjects are extensible by default: they can have new properties added to them, and their `[[Prototype]]` can be re-assigned. An object can be marked as non-extensible using one of [`Object.preventExtensions()`](../../globals/Object/preventExtensions.mdx), [`Object.seal()`](../../globals/Object/seal.mdx), [`Object.freeze()`](../../globals/Object/freeze.mdx), or [`Reflect.preventExtensions()`](../../globals/Reflect/preventExtensions.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Object/isFrozen.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.isFrozen()\n\nThe **`Object.isFrozen()`** determines if an object is\n[frozen](../../globals/Object/freeze.mdx).\n\n## Syntax\n\n```js\nObject.isFrozen(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be checked.\n\n### Return value\n\nA `Boolean` indicating whether or not the given object is frozen.\n\n## Description\n\nAn object is frozen if and only if it is not [extensible](../../globals/Object/isExtensible.mdx), all its properties are non-configurable, and all its data\nproperties (that is, properties which are not accessor properties with getter or setter\ncomponents) are non-writable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Object/isSealed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.isSealed()\n\nThe **`Object.isSealed()`** method determines if an object is\nsealed.\n\n## Syntax\n\n```js\nObject.isSealed(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be checked.\n\n### Return value\n\nA `Boolean` indicating whether or not the given object is sealed.\n\n## Description\n\nReturns `true` if the object is sealed, otherwise `false`. An\nobject is sealed if it is not [extensible](../../globals/Object/isExtensible.mdx) and\nif all its properties are non-configurable and therefore not removable (but not\nnecessarily non-writable).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Object/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.keys()\n\nThe **`Object.keys()`** method returns an array of a given object's own enumerable string-keyed property names.\n\n## Syntax\n\n```js\nObject.keys(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : An object.\n\n### Return value\n\nAn array of strings representing the given object's own enumerable string-keyed property keys.\n\n## Description\n\n`Object.keys()` returns an array whose elements are strings corresponding to the enumerable string-keyed property names found directly upon `object`. This is the same as iterating with a `for...in` loop, except that a `for...in` loop enumerates properties in the prototype chain as well. The order of the array returned by `Object.keys()` is the same as that provided by a `for...in` loop.\n\nIf you need the property values, use [`Object.values()`](../../globals/Object/values.mdx) instead. If you need both the property keys and values, use [`Object.entries()`](../../globals/Object/entries.mdx) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Object/preventExtensions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.preventExtensions()\n\nThe **`Object.preventExtensions()`** method prevents new\nproperties from ever being added to an object (i.e. prevents future extensions to the\nobject). It also prevents the object's prototype from being re-assigned.\n\n## Syntax\n\n```js\nObject.preventExtensions(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be made non-extensible.\n\n### Return value\n\nThe object being made non-extensible.\n\n## Description\n\nAn object is extensible if new properties can be added to it.\n`Object.preventExtensions()` marks an object as no longer extensible, so that\nit will never have properties beyond the ones it had at the time it was marked as\nnon-extensible. Note that the properties of a non-extensible object, in general, may\nstill be _deleted_. Attempting to add new properties to a non-extensible object\nwill fail, either silently or, in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), throwing a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\nUnlike [`Object.seal()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/seal) and [`Object.freeze()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze), `Object.preventExtensions()` invokes an intrinsic JavaScript behavior and cannot be replaced with a composition of several other operations. It also has its `Reflect` counterpart (which only exists for intrinsic operations), [`Reflect.preventExtensions()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Reflect/preventExtensions).\n\n`Object.preventExtensions()` only prevents addition of own properties. Properties can still be added to the object prototype.\n\nThis method makes the `[[Prototype]]` of the target immutable; any `[[Prototype]]` re-assignment will throw a `TypeError`. This behavior is specific to the internal `[[Prototype]]` property; other properties of the target object will remain mutable.\n\nThere is no way to make an object extensible again once it has been made non-extensible.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Object/prototype/constructor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.constructor\n\nThe **`constructor`** data property of an `Object` instance returns a reference to the constructor function that created the instance object. Note that the value of this property is a reference to _the function itself_, not a string containing the function's name.\n\n> **Note:** This is a property of JavaScript objects. For the `constructor` method in classes, see [its own reference page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/constructor).\n\n## Value\n\nA reference to the constructor function that created the instance object.\n\n> **Note:** This property is created by default on the [`prototype`](../../../globals/Function/prototype/) property of every constructor function and is inherited by all objects created by that constructor.\n\n## Description\n\nAny object (with the exception of [`null` prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) will have a `constructor` property on its `[[Prototype]]`. Objects created with literals will also have a `constructor` property that points to the constructor type for that object — for example, array literals create `Array` objects, and [object literals](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Object_initializer) create plain objects.\n\n```js\nconst o1 = {};\no1.constructor === Object; // true\n\nconst o2 = new Object();\no2.constructor === Object; // true\n\nconst a1 = [];\na1.constructor === Array; // true\n\nconst a2 = new Array();\na2.constructor === Array; // true\n\nconst n = 3;\nn.constructor === Number; // true\n```\n\nNote that `constructor` usually comes from the constructor's [`prototype`](../../../globals/Function/prototype/) property. If you have a longer prototype chain, you can usually expect every object in the chain to have a `constructor` property.\n\n```js\nconst o = new TypeError(); // Inheritance: TypeError -> Error -> Object\nconst proto = Object.getPrototypeOf;\nproto(o).constructor === TypeError; // true\nproto(proto(o)).constructor === Error; // true\nproto(proto(proto(o))).constructor === Object; // true\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Object/prototype/hasOwnProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.hasOwnProperty()\n\nThe **`hasOwnProperty()`** method returns a boolean indicating whether the\nobject has the specified property as its own property (as opposed to inheriting\nit).\n\n> **Note:** [`Object.hasOwn()`](../../../globals/Object/hasOwn.mdx) is recommended over\n> `hasOwnProperty()`, in browsers where it is supported.\n\n## Syntax\n\n```js\nhasOwnProperty(prop)\n```\n\n### Parameters\n\n- `prop`\n  - : The `String` name or `Symbol` of the property to test.\n\n### Return value\n\nReturns `true` if the object has the specified property as own property; `false`\notherwise.\n\n## Description\n\nThe **`hasOwnProperty()`** method returns `true` if the specified property is a\ndirect property of the object — even if the value is `null` or `undefined`. The\nmethod returns `false` if the property is inherited, or has not been declared at\nall. Unlike the `in` operator, this\nmethod does not check for the specified property in the object's prototype\nchain.\n\nThe method can be called on _most_ JavaScript objects, because most objects\ndescend from `Object`, and hence inherit its methods. For\nexample `Array` is an `Object`, so you can\nuse `hasOwnProperty()` method to check whether an index exists:\n\n```js\nconst fruits = ['Apple', 'Banana','Watermelon', 'Orange'];\nfruits.hasOwnProperty(3);   // true ('Orange')\nfruits.hasOwnProperty(4);   // false - not defined\n```\n\nThe method will not be available in objects where it is reimplemented, or on\nobjects created using `Object.create(null)` (as these don't inherit from\n`Object.prototype`). Examples for these cases are given below.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Object/prototype/isPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.isPrototypeOf()\n\nThe **`isPrototypeOf()`** method checks if an object exists in another object's prototype chain.\n\n> **Note:** `isPrototypeOf()` differs from the [`instanceof`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/instanceof) operator. In the expression `object instanceof AFunction`, `object`'s prototype chain is checked against `AFunction.prototype`, not against `AFunction` itself.\n\n## Syntax\n\n```js\nisPrototypeOf(object)\n```\n\n### Parameters\n\n- `object`\n  - : The object whose prototype chain will be searched.\n\n### Return value\n\nA boolean indicating whether the calling object (`this`) lies in the prototype chain of `object`. Directly returns `false` when `object` is not an object (i.e. a primitive).\n\n### Errors thrown\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown if `this` is `null` or `undefined` (because it can't be [converted to an object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#object_coercion)).\n\n## Description\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `isPrototypeOf()` method. This method allows you to check whether or not the object exists within another object's prototype chain. If the `object` passed as the parameter is not an object (i.e. a primitive), the method directly returns `false`. Otherwise, the `this` value is [converted to an object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#object_coercion), and the prototype chain of `object` is searched for the `this` value, until the end of the chain is reached or the `this` value is found.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Object/prototype/propertyIsEnumerable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.propertyIsEnumerable()\n\nThe **`propertyIsEnumerable()`** method returns a boolean indicating whether the specified property is the object's [enumerable own](https://developer.mozilla.org/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) property.\n\n## Syntax\n\n```js\npropertyIsEnumerable(prop)\n```\n\n### Parameters\n\n- `prop`\n  - : The name of the property to test. Can be a string or a `Symbol`.\n\n### Return value\n\nA boolean value indicating whether the specified property is enumerable and is the object's own property.\n\n## Description\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `propertyIsEnumerable()` method. This method determines if the specified property, string or symbol, is an enumerable own property of the object. If the object does not have the specified property, this method returns `false`.\n\nThis method is equivalent to [`Object.getOwnPropertyDescriptor(obj, prop)?.enumerable ?? false`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Object/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string representing the object. This method is meant to be overridden by derived objects for locale-specific purposes.\n\n## Syntax\n\n```js\ntoLocaleString()\n```\n\n### Parameters\n\nNone. However, all objects that override this method are expected to accept at most two parameters, corresponding to `locales` and `options`, such as [`Date.prototype.toLocaleString()`](../../../globals/Date/prototype/toLocaleString.mdx). The parameter positions should not be used for any other purpose.\n\n### Return value\n\nThe return value of calling `this.toString()`.\n\n## Description\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `toLocaleString()` method. `Object`'s `toLocaleString` returns the result of calling [`this.toString()`](../../../globals/Object/prototype/toString.mdx).\n\nThis function is provided to give objects a generic `toLocaleString` method, even though not all may use it. In the core language, these built-in objects override `toLocaleString` to provide locale-specific formatting:\n\n- `Array`: [`Array.prototype.toLocaleString()`](../../../globals/Array/prototype/toLocaleString.mdx)\n- `Number`: [`Number.prototype.toLocaleString()`](../../../globals/Number/prototype/toLocaleString.mdx)\n- `Date`: [`Date.prototype.toLocaleString()`](../../../globals/Date/prototype/toLocaleString.mdx)\n- `BigInt`: [`BigInt.prototype.toLocaleString()`](../../../globals/BigInt/prototype/toLocaleString.mdx)\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Object/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.toString()\n\nThe **`toString()`** method returns a string representing the object. This method is meant to be overridden by derived objects for custom [type conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) logic.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nBy default `toString()` takes no parameters. However, objects that inherit from `Object` may override it with their own implementations that do take parameters. For example, the [`Number.prototype.toString()`](../../../globals/Number/prototype/toString.mdx) and [`BigInt.prototype.toString()`](../../../globals/BigInt/prototype/toString.mdx) methods take an optional `radix` parameter.\n\n### Return value\n\nA string representing the object.\n\n## Description\n\nJavaScript calls the `toString` method to [convert an object to a primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion). You rarely need to invoke the `toString` method yourself; JavaScript automatically invokes it when encountering an object where a primitive value is expected.\n\nThis method is called in priority by [string conversion](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion), but [numeric conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#numeric_coercion) and [primitive conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion) call `valueOf()` in priority. However, because the base [`valueOf()`](../../../globals/Object/prototype/valueOf.mdx) method returns an object, the `toString()` method is usually called in the end, unless the object overrides `valueOf()`. For example, `+[1]` returns `1`, because its [`toString`](../../../globals/Array/prototype/toString.mdx) method returns `\"1\"`, which is then converted to a number.\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `toString()` method. When you create a custom object, you can override `toString()` to call a custom method, so that your custom object can be converted to a string value. Alternatively, you can add a [`Symbol.toPrimitive`](../../../globals/Symbol/toPrimitive.mdx) method, which allows even more control over the conversion process, and will always be preferred over `valueOf` or `toString` for any type conversion.\n\nTo use the base `Object.prototype.toString()` with an object that has it overridden (or to invoke it on `null` or `undefined`), you need to call [`Function.prototype.call()`](../../../globals/Function/prototype/call.mdx) or [`Function.prototype.apply()`](../../../globals/Function/prototype/apply.mdx) on it, passing the object you want to inspect as the first parameter (called `thisArg`).\n\n```js\nconst arr = [1, 2, 3];\n\narr.toString(); // \"1,2,3\"\nObject.prototype.toString.call(arr); // \"[object Array]\"\n```\n\n`Object.prototype.toString()` returns `\"[object Type]\"`, where `Type` is the object type. If the object has a [`Symbol.toStringTag`](../../../globals/Symbol/toStringTag.mdx) property whose value is a string, that value will be used as the `Type`. Many built-in objects, including [`Map`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map) and [`Symbol`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol), have a `Symbol.toStringTag`. Some objects predating ES6 do not have `Symbol.toStringTag`, but have a special tag nonetheless. They include (the tag is the same as the type name given below):\n\n- [`Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\n- [`Function`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions) (anything whose [`typeof`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/typeof) returns `\"function\"`)\n- [`Error`](../../../globals/Error/Error.mdx)\n- [`Boolean`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)\n- [`Number`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)\n- [`String`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\n- [`Date`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date)\n- [`RegExp`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp)\n\nThe [`arguments`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/arguments) object returns `\"[object Arguments]\"`. Everything else, including user-defined classes, unless with a custom `Symbol.toStringTag`, will return `\"[object Object]\"`.\n\n`Object.prototype.toString()` invoked on [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) returns `[object Null]` and `[object Undefined]`, respectively.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Object/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.valueOf()\n\nThe **`valueOf()`** method of `Object` converts the `this` value [to an object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#object_coercion). This method is meant to be overridden by derived objects for custom [type conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) logic.\n\n\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nThe `this` value, converted to an object.\n\n> **Note:** In order for `valueOf` to be useful during type conversion, it must return a primitive. Because all primitive types have their own `valueOf()` methods, calling `aPrimitiveValue.valueOf()` generally does not invoke `Object.prototype.valueOf()`.\n\n## Description\n\nJavaScript calls the `valueOf` method to [convert an object to a primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion). You rarely need to invoke the `valueOf` method yourself; JavaScript automatically invokes it when encountering an object where a primitive value is expected.\n\nThis method is called in priority by [numeric conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#numeric_coercion) and [primitive conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion), but [string conversion](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) calls `toString()` in priority, and `toString()` is very likely to return a string value (even for the [`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx) base implementation), so `valueOf()` is usually not called in this case.\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `toString()` method. The `Object.prototype.valueOf()` base implementation is deliberately useless: by returning an object, its return value will never be used by any [primitive conversion algorithm](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion). Many built-in objects override this method to return an appropriate primitive value. When you create a custom object, you can override `valueOf()` to call a custom method, so that your custom object can be converted to a primitive value. Generally, `valueOf()` is used to return a value that is most meaningful for the object — unlike `toString()`, it does not need to be a string. Alternatively, you can add a [`Symbol.toPrimitive`](../../../globals/Symbol/toPrimitive.mdx) method, which allows even more control over the conversion process, and will always be preferred over `valueOf` or `toString` for any type conversion.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Object/seal.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.seal()\n\nThe **`Object.seal()`** method _seals_ an object. Sealing an object [prevents extensions](../../globals/Object/preventExtensions.mdx) and makes existing properties non-configurable. A sealed object has a fixed set of properties: new properties cannot be added, existing properties cannot be removed, their enumerability and configurability cannot be changed, and its prototype cannot be re-assigned. Values of existing properties can still be changed as long as they are writable. `seal()` returns the same object that was passed in.\n\n## Syntax\n\n```js\nObject.seal(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be sealed.\n\n### Return value\n\nThe object being sealed.\n\n## Description\n\nSealing an object is equivalent to [preventing extensions](../../globals/Object/preventExtensions.mdx) and then changing all existing properties' descriptors to `configurable: false`. This has the effect of making the set of properties on the object fixed. Making all properties non-configurable\nalso prevents them from being converted from data properties to accessor properties and\nvice versa, but it does not prevent the values of data properties from being changed.\nAttempting to delete or add properties to a sealed object, or to convert a data property\nto accessor or vice versa, will fail, either silently or by throwing a\n[`TypeError`](../../globals/TypeError/TypeError.mdx) (most commonly, although not exclusively, when in \"strict mode\" code).\n\nThe prototype chain remains untouched. However, due to the effect of [preventing extensions](../../globals/Object/preventExtensions.mdx), the `[[Prototype]]` cannot be reassigned.\n\nUnlike [`Object.freeze()`](../../globals/Object/freeze.mdx), objects sealed with `Object.seal()` may have their existing\nproperties changed, as long as they are writable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Object/setPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.setPrototypeOf()\n\nThe **`Object.setPrototypeOf()`** method sets the prototype (i.e., the internal `[[Prototype]]` property) of a specified object to another object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null).\n\n> **Warning:** Changing the `[[Prototype]]` of an object is, by the nature of how modern JavaScript engines optimize property accesses, currently a very slow operation in every browser and JavaScript engine. In addition, the effects of altering inheritance are subtle and far-flung, and are not limited to the time spent in the `Object.setPrototypeOf(...)` statement, but may extend to **_any_** code that has access to any object whose `[[Prototype]]` has been altered. You can read more in [JavaScript engine fundamentals: optimizing prototypes](https://mathiasbynens.be/notes/prototypes).\n>\n> Because this feature is a part of the language, it is still the burden on engine developers to implement that feature performantly (ideally). Until engine developers address this issue, if you are concerned about performance, you should avoid setting the `[[Prototype]]` of an object. Instead, create a new object with the desired `[[Prototype]]` using [`Object.create()`](../../globals/Object/create.mdx).\n\n## Syntax\n\n```js\nObject.setPrototypeOf(obj, prototype)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which is to have its prototype set.\n- `prototype`\n  - : The object's new prototype (an object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null)).\n\n### Return value\n\nThe specified object.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if one of the following conditions is met:\n    - The `obj` parameter is [non-extensible](../../globals/Object/isExtensible.mdx), or it's an [immutable prototype exotic object](https://tc39.es/ecma262/#sec-immutable-prototype-exotic-objects), such as `Object.prototype`.\n    - The `prototype` parameter is not an object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null).\n\n## Description\n\n`Object.setPrototypeOf()` is generally considered the proper way to set the prototype of an object.\n\nIf the `obj` parameter is not an object (e.g. number, string, etc.), this method does nothing.\n\nFor security concerns, there are certain built-in objects that are designed to have an _immutable prototype_. This prevents prototype pollution attacks, especially [proxy-related ones](https://github.com/tc39/ecma262/issues/272). The core language only specifies `Object.prototype` as an immutable prototype exotic object, whose prototype is always `null`.\n\n```js\nObject.isExtensible(Object.prototype); // true; you can add more properties\nObject.setPrototypeOf(Object.prototype, {}); // TypeError: Immutable prototype object '#<Object>' cannot have their prototype set\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Object/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.values()\n\nThe **`Object.values()`** method returns an array of a given object's own enumerable string-keyed property values.\n\n## Syntax\n\n```js\nObject.values(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : An object.\n\n### Return value\n\nAn array containing the given object's own enumerable string-keyed property values.\n\n## Description\n\n`Object.values()` returns an array whose elements are strings corresponding to the enumerable string-keyed property values found directly upon `object`. This is the same as iterating with a `for...in` loop, except that a `for...in` loop enumerates properties in the prototype chain as well. The order of the array returned by `Object.values()` is the same as that provided by a `for...in` loop.\n\nIf you need the property keys, use [`Object.keys()`](../../globals/Object/keys.mdx) instead. If you need both the property keys and values, use [`Object.entries()`](../../globals/Object/entries.mdx) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Promise/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get Promise[Symbol.species]\n\nThe **`Promise[Symbol.species]`** accessor property returns the constructor used to construct return values from promise methods.\n\n> **Warning:** The existence of `Symbol.species` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Syntax\n\n```js\nPromise[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct return values from promise chaining methods that create new promises.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `Promise` objects. Subclass constructors may override it to change the constructor assignment. The default implementation is basically:\n\n```js\n// Hypothetical underlying implementation for illustration\nclass Promise {\n  static get [Symbol.species]() {\n    return this;\n  }\n}\n```\n\nBecause of this polymorphic implementation, `Symbol.species` of derived subclasses would also return the constructor itself by default.\n\n```js\nclass SubPromise extends Promise {}\nSubPromise[Symbol.species] === Promise; // true\n```\n\nPromise chaining methods — [`then()`](../../globals/Promise/prototype/then.mdx), [`finally()`](../../globals/Promise/prototype/finally.mdx) — return new promise objects. They get the constructor to construct the new promise through `this.constructor[Symbol.species]`. If `this.constructor` is `undefined`, or if `this.constructor[Symbol.species]` is `undefined` or `null`, the default [`Promise()`](../../globals/Promise/Promise.mdx) constructor is used. Otherwise, the constructor returned by `this.constructor[Symbol.species]` is used to construct the new promise object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Promise/Promise.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise()\n\nThe **`Promise()`** constructor is primarily used to wrap functions that do not already support promises.\n\n## Syntax\n\n```js\nnew Promise(executor)\n```\n\n> **Note:** `Promise()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `executor`\n  - : A `function` to be executed by the constructor. It receives two functions as parameters: `resolveFunc` and `rejectFunc`. Any errors thrown in the `executor` will cause the promise to be rejected, and the return value will be neglected. The semantics of `executor` are detailed below.\n\n### Return value\n\nWhen called via `new`, the `Promise` constructor returns a promise object. The promise object will become _resolved_ when either of the functions `resolveFunc` or `rejectFunc` are invoked. Note that if you call `resolveFunc` or `rejectFunc` and pass another `Promise` object as an argument, it can be said to be \"resolved\", but still not \"settled\". See the [Promise description](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#description) for more explanation.\n\n## Description\n\nTraditionally (before promises), asynchronous tasks were designed as callbacks.\n\n```js\nreadFile(\"./data.txt\", (error, result) => {\n  // This callback will be called when the task is done, with the\n  // final `error` or `result`. Any operation dependent on the\n  // result must be defined within this callback.\n});\n// Code here is immediately executed after the `readFile` request\n// is fired. It does not wait for the callback to be called, hence\n// making `readFile` \"asynchronous\".\n```\n\nTo take advantage of the readability improvement and language features offered by promises, the `Promise()` constructor allows one to transform the callback-based API to a promise-based one.\n\n> **Note:** If your task is already promise-based, you likely do not need the `Promise()` constructor.\n\nThe `executor` is custom code that ties an outcome in a callback to a promise. You, the programmer, write the `executor`. Its signature is expected to be:\n\n```js\nfunction executor(resolveFunc, rejectFunc) {\n  // Typically, some asynchronous operation that accepts a callback,\n  // like the `readFile` function above\n}\n```\n\n`resolveFunc` and `rejectFunc` are also functions, and you can give them whatever actual names you want. Their signatures are simple: they accept a single parameter of any type.\n\n```js\nresolveFunc(value); // call on resolved\nrejectFunc(reason); // call on rejected\n```\n\nThe `value` parameter passed to `resolveFunc` can be another promise object, in which case the newly constructed promise's state will be \"locked in\" to the promise passed (as part of the [resolution](#resolver-function) promise). The `rejectFunc` has semantics close to the [`throw`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/throw) statement, so `reason` is typically an [`Error`](../../globals/Error/Error.mdx) instance. If either `value` or `reason` is omitted, the promise is fulfilled/rejected with `undefined`.\n\nThe `executor`'s completion state has limited effect on the promise's state:\n\n- The `executor` return value is ignored. `return` statements within the `executor` merely impact control flow and alter whether a part of the function is executed, but do not have any impact on the promise's fulfillment value. If `executor` exits and it's impossible for `resolveFunc` or `rejectFunc` to be called in the future (for example, there are no async tasks scheduled), then the promise remains pending forever.\n- If an error is thrown in the `executor`, the promise is rejected, unless `resolveFunc` or `rejectFunc` has already been called.\n\n> **Note:** The existence of pending promises does not prevent the program from exiting. If the event loop is empty, the program exits despite any pending promises (because those are necessarily forever-pending).\n\nHere's a summary of the typical flow:\n\n1. At the time when the constructor generates the new `Promise` object, it also generates a corresponding pair of functions for `resolveFunc` and `rejectFunc`; these are \"tethered\" to the `Promise` object.\n2. `executor` typically wraps some asynchronous operation which provides a callback-based API. The callback (the one passed to the original callback-based API) is defined within the `executor` code, so it has access to the `resolveFunc` and `rejectFunc`.\n3. The `executor` is called synchronously (as soon as the `Promise` is constructed) with the `resolveFunc` and `rejectFunc` functions as arguments.\n4. The code within the `executor` has the opportunity to perform some operation. The eventual completion of the asynchronous task is communicated with the promise instance via the side effect caused by `resolveFunc` or `rejectFunc`. The side effect is that the `Promise` object becomes \"resolved\".\n   - If `resolveFunc` is called first, the value passed will be [resolved](#resolver-function). The promise may stay pending (in case another [thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) is passed), become fulfilled (in most cases where a non-thenable value is passed), or become rejected (in case of an invalid resolution value).\n   - If `rejectFunc` is called first, the promise instantly becomes rejected.\n   - Once one of the resolving functions (`resolveFunc` or `rejectFunc`) is called, the promise stays resolved. Only the first call to `resolveFunc` or `rejectFunc` affects the promise's eventual state, and subsequent calls to either function can neither change the fulfillment value/rejection reason nor toggle its eventual state from \"fulfilled\" to \"rejected\" or opposite.\n   - If `executor` exits by throwing an error, then the promise is rejected. However, the error is ignored if one of the resolving functions has already been called (so that the promise is already resolved).\n   - Resolving the promise does not necessarily cause the promise to become fulfilled or rejected (i.e. settled). The promise may still be pending because it's resolved with another thenable, but its eventual state will match that of the resolved thenable.\n5. Once the promise settles, it (asynchronously) invokes any further handlers associated through [`Promise.prototype.then`](../../globals/Promise/prototype/then.mdx), [`Promise.prototype.catch`](../../globals/Promise/prototype/catch.mdx), or [`Promise.prototype.finally`](../../globals/Promise/prototype/finally.mdx). The eventual fulfillment value or rejection reason is passed to the invocation of fulfillment and rejection handlers as an input parameter (see [Chained Promises](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#chained_promises)).\n\nFor example, the callback-based `readFile` API above can be transformed into a promise-based one.\n\n```js\nconst readFilePromise = (path) =>\n  new Promise((resolve, reject) => {\n    readFile(path, (error, result) => {\n      if (error) {\n        reject(error);\n      } else {\n        resolve(result);\n      }\n    });\n  });\n\nreadFilePromise(\"./data.txt\")\n  .then((result) => console.log(result))\n  .catch((error) => console.error(\"Failed to read data\"));\n```\n\n### Resolver function\n\nThe resolver function `resolveFunc` has the following behaviors:\n\n- If it's called with the same value as the newly created promise (the promise it's \"tethered to\"), the promise is rejected with a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n- If it's called with a non-[thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) value (a primitive, or an object whose `then` property is not callable, including when the property is not present), the promise is immediately fulfilled with that value.\n- If it's called with a thenable value (including another `Promise` instance), then the thenable's `then` method is saved and called in the future (it's always called asynchronously). The `then` method will be called with two callbacks, which are two new functions with the exact same behaviors as the `resolveFunc` and `rejectFunc` passed to the `executor` function. If calling the `then` method throws, then the current promise is rejected with the thrown error.\n\nIn the last case, it means code like:\n\n```js\nnew Promise((resolve, reject) => {\n  resolve(thenable);\n});\n```\n\nIs roughly equivalent to:\n\n```js\nnew Promise((resolve, reject) => {\n  try {\n    thenable.then(\n      (value) => resolve(value),\n      (reason) => reject(reason),\n    );\n  } catch (e) {\n    reject(e);\n  }\n});\n```\n\nExcept that in the `resolve(thenable)` case:\n\n1. `resolve` is called synchronously, so that calling `resolve` or `reject` again has no effect, even when the handlers attached through `anotherPromise.then()` are not called yet.\n2. The `then` method is called asynchronously, so that the promise will never be instantly resolved if a thenable is passed.\n\nBecause `resolve` is called again with whatever `thenable.then()` passes to it as `value`, the resolver function is able to flatten nested thenables, where a thenable calls its `onFulfilled` handler with another thenable. The effect is that the fulfillment handler of a real promise will never receive a thenable as its fulfillment value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Promise/all.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.all()\n\nThe **`Promise.all()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise fulfills when all of the input's promises fulfill (including when an empty iterable is passed), with an array of the fulfillment values. It rejects when any of the input's promises rejects, with this first rejection reason.\n\n## Syntax\n\n```js\nPromise.all(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array` of promises.\n\n### Return value\n\nA `Promise` that is:\n\n- **Already fulfilled**, if the `iterable` passed is empty.\n- **Asynchronously fulfilled**, when all the promises in the given `iterable` fulfill. The fulfillment value is an array of fulfillment values, in the order of the promises passed, regardless of completion order. If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) fulfilled.\n- **Asynchronously rejected**, when any of the promises in the given `iterable` rejects. The rejection reason is the rejection reason of the first promise that was rejected.\n\n## Description\n\nThe `Promise.all()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. It can be useful for aggregating the results of multiple promises. It is typically used when there are multiple related asynchronous tasks that the overall code relies on to work successfully — all of whom we want to fulfill before the code execution continues.\n\n`Promise.all()` will reject immediately upon **any** of the input promises rejecting. In comparison, the promise returned by [`Promise.allSettled()`](../../globals/Promise/allSettled.mdx) will wait for all input promises to complete, regardless of whether or not one rejects. Use `allSettled()` if you need the final result of every promise in the input iterable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Promise/allSettled.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.allSettled()\n\nThe **`Promise.allSettled()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise fulfills when all of the input's promises settle (including when an empty iterable is passed), with an array of objects that describe the outcome of each promise.\n\n## Syntax\n\n```js\nPromise.allSettled(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array` of promises.\n\n### Return value\n\nA `Promise` that is:\n\n- **Already fulfilled**, if the `iterable` passed is empty.\n- **Asynchronously fulfilled**, when all promise in the given `iterable` have settled (either fulfilled or rejected). The fulfillment value is an array of objects, each describing the outcome of one promise in the `iterable`, in the order of the promises passed, regardless of completion order. Each outcome object has the following properties:\n\n  - `status`\n    - : A string, either `\"fulfilled\"` or `\"rejected\"`, indicating the eventual state of the promise.\n  - `value`\n    - : Only present if `status` is `\"fulfilled\"`. The value that the promise was fulfilled with.\n  - `reason`\n    - : Only present if `status` is `\"rejected\"`. The reason that the promise was rejected with.\n\n  If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) fulfilled.\n\n## Description\n\nThe `Promise.allSettled()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. `Promise.allSettled()` is typically used when you have multiple asynchronous tasks that are not dependent on one another to complete successfully, or you'd always like to know the result of each promise.\n\nIn comparison, the Promise returned by [`Promise.all()`](../../globals/Promise/all.mdx) may be more appropriate if the tasks are dependent on each other, or if you'd like to immediately reject upon any of them rejecting.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Promise/any.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.any()\n\nThe **`Promise.any()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise fulfills when any of the input's promises fulfills, with this first fulfillment value. It rejects when all of the input's promises reject (including when an empty iterable is passed), with an `AggregateError` containing an array of rejection reasons.\n\n## Syntax\n\n```js\nPromise.any(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array` of promises.\n\n### Return value\n\nA `Promise` that is:\n\n- **Already rejected**, if the `iterable` passed is empty.\n- **Asynchronously fulfilled**, when any of the promises in the given `iterable` fulfills. The fulfillment value is the fulfillment value of the first promise that was fulfilled.\n- **Asynchronously rejected**, when all of the promises in the given `iterable` reject. The rejection reason is an `AggregateError` containing an array of rejection reasons in its `errors` property. The errors are in the order of the promises passed, regardless of completion order. If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) rejected.\n\n## Description\n\nThe `Promise.any()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. This method is useful for returning the first promise that fulfills. It short-circuits after a promise fulfills, so it does not wait for the other promises to complete once it finds one.\n\nUnlike [`Promise.all()`](../../globals/Promise/all.mdx), which returns an _array_ of fulfillment values, we only get one fulfillment value (assuming at least one promise fulfills). This can be beneficial if we need only one promise to fulfill but we do not care which one does. Note another difference: this method rejects upon receiving an _empty iterable_, since, truthfully, the iterable contains no items that fulfill. You may compare `Promise.any()` and `Promise.all()` with [`Array.prototype.some()`](../../globals/Array/prototype/some.mdx) and [`Array.prototype.every()`](../../globals/Array/prototype/every.mdx).\n\nAlso, unlike [`Promise.race()`](../../globals/Promise/race.mdx), which returns the first _settled_ value (either fulfillment or rejection), this method returns the first _fulfilled_ value. This method ignores all rejected promises up until the first promise that fulfills.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Promise/prototype/catch.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.prototype.catch()\n\nThe **`catch()`** method of a `Promise` object schedules a function to be called when the promise is rejected. It immediately returns an equivalent `Promise` object, allowing you to [chain](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining) calls to other promise methods. It is a shortcut for [`Promise.prototype.then(undefined, onRejected)`](../../../globals/Promise/prototype/then.mdx).\n\n## Syntax\n\n```js\ncatch(onRejected)\n\ncatch((reason) => {\n  // rejection handler\n})\n```\n\n### Parameters\n\n- `onRejected`\n  - : A `Function` called when the `Promise` is rejected. This function has one parameter: the _rejection reason_.\n\n### Return value\n\nReturns a new `Promise`. This new promise is always pending when returned, regardless of the current promise's status. It's eventually rejected if `onRejected` throws an error or returns a Promise which is itself rejected; otherwise, it's eventually fulfilled.\n\n## Description\n\nThe `catch` method is used for error handling in promise composition. Since it returns a `Promise`, it [can be chained](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining_after_a_catch) in the same way as its sister method, [`Promise.prototype.then()`](../../../globals/Promise/prototype/then.mdx).\n\nIf a promise becomes rejected, and there are no rejection handlers to call (a handler can be attached through any of [`Promise.prototype.then`](../../../globals/Promise/prototype/then.mdx), [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx), or [`Promise.prototype.finally`](../../../globals/Promise/prototype/finally.mdx)), then the rejection event is surfaced by the host. In the browser, this results in an [`unhandledrejection`](https://developer.mozilla.org/docs/Web/API/Window/unhandledrejection_event) event. If a handler is attached to a rejected promise whose rejection has already caused an unhandled rejection event, then another [`rejectionhandled`](https://developer.mozilla.org/docs/Web/API/Window/rejectionhandled_event) event is fired.\n\n`catch()` internally calls `then()` on the object upon which it was called, passing `undefined` and `onRejected` as arguments. The value of that call is directly returned. This is observable if you wrap the methods.\n\n```js\n// overriding original Promise.prototype.then/catch just to add some logs\n((Promise) => {\n  const originalThen = Promise.prototype.then;\n  const originalCatch = Promise.prototype.catch;\n\n  Promise.prototype.then = function (...args) {\n    console.log(\"Called .then on %o with arguments: %o\", this, args);\n    return originalThen.apply(this, args);\n  };\n  Promise.prototype.catch = function (...args) {\n    console.error(\"Called .catch on %o with arguments: %o\", this, args);\n    return originalCatch.apply(this, args);\n  };\n})(Promise);\n\n// calling catch on an already resolved promise\nPromise.resolve().catch(function XXX() {});\n\n// Logs:\n// Called .catch on Promise{} with arguments: Arguments{1} [0: function XXX()]\n// Called .then on Promise{} with arguments: Arguments{2} [0: undefined, 1: function XXX()]\n```\n\nThis means that passing `undefined` still causes the returned promise to be rejected, and you have to pass a function to prevent the final promise from being rejected.\n\nBecause `catch()` just calls `then()`, it supports subclassing.\n\n> **Note:** The examples below are throwing instances of [`Error`](../../../globals/Error/Error.mdx). As with synchronous [`throw`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/throw) statements, this is considered a good practice; otherwise, the part doing the catching would have to perform checks to see if the argument was a string or an error, and you might lose valuable information such as stack traces.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Promise/prototype/finally.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.prototype.finally()\n\nThe **`finally()`** method of a `Promise` object schedules a function to be called when the promise is settled (either fulfilled or rejected). It immediately returns an equivalent `Promise` object, allowing you to [chain](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining) calls to other promise methods.\n\nThis lets you avoid duplicating code in both the promise's [`Promise.prototype.then`](../../../globals/Promise/prototype/then.mdx) and [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx) handlers.\n\n## Syntax\n\n```js\nfinally(onFinally)\n\nfinally(() => {\n  // Code that will run after promise is settled (fulfilled or rejected)\n})\n```\n\n### Parameters\n\n- `onFinally`\n  - : A `Function` called when the `Promise` is settled. This handler receives no parameters.\n\n### Return value\n\nReturns an equivalent `Promise`. If the handler throws an error or returns a rejected promise, the promise returned by `finally()` will be rejected with that value instead. Otherwise, the return value of the handler does not affect the state of the original promise.\n\n## Description\n\nThe `finally()` method can be useful if you want to do some processing or cleanup once the promise is settled, regardless of its outcome.\n\nThe `finally()` method is very similar to calling [`then(onFinally, onFinally)`](../../../globals/Promise/prototype/then.mdx). However, there are a couple of differences:\n\n- When creating a function inline, you can pass it once, instead of being forced to either declare it twice, or create a variable for it.\n- The `onFinally` callback does not receive any argument. This use case is for precisely when you _do not care_ about the rejection reason or the fulfillment value, and so there's no need to provide it.\n- A `finally()` call is usually transparent and does not change the eventual state of the original promise. So for example:\n  - Unlike `Promise.resolve(2).then(() => 77, () => {})`, which returns a promise eventually fulfilled with the value `77`, `Promise.resolve(2).finally(() => 77)` returns a promise eventually fulfilled with the value `2`.\n  - Similarly, unlike `Promise.reject(3).then(() => {}, () => 88)`, which returns a promise eventually fulfilled with the value `88`, `Promise.reject(3).finally(() => 88)` returns a promise eventually rejected with the reason `3`.\n\n> **Note:** A `throw` (or returning a rejected promise) in the `finally` callback still rejects the returned promise. For example, both `Promise.reject(3).finally(() => { throw 99; })` and `Promise.reject(3).finally(() => Promise.reject(99))` reject the returned promise with the reason `99`.\n\nLike [`Promise.prototype.catch()`](../../../globals/Promise/prototype/catch.mdx), `finally()` internally calls the `then` method on the object upon which it was called. If `onFinally` is not a function, `then()` is called with `onFinally` as both arguments — which, for [`Promise.prototype.then()`](../../../globals/Promise/prototype/then.mdx), means that no useful handler is attached. Otherwise, `then()` is called with two internally created functions, which behave like the following:\n\n> **Warning:** This is only for demonstration purposes and is not a polyfill.\n\n```js\npromise.then(\n  (value) => Promise.resolve(onFinally()).then(() => value),\n  (reason) =>\n    Promise.resolve(onFinally()).then(() => {\n      throw reason;\n    }),\n);\n```\n\nBecause `finally()` calls `then()`, it supports subclassing. Moreover, notice the [`Promise.resolve()`](../../../globals/Promise/resolve.mdx) call above — in reality, `onFinally()`'s return value is resolved using the same algorithm as `Promise.resolve()`, but the actual constructor used to construct the resolved promise will be the subclass. `finally()` gets this constructor through [`promise.constructor[Symbol.species]`](../../../globals/Promise/@@species.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Promise/prototype/then.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.prototype.then()\n\nThe **`then()`** method of a `Promise` object takes up to two arguments: callback functions for the fulfilled and rejected cases of the `Promise`. It immediately returns an equivalent `Promise` object, allowing you to [chain](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining) calls to other promise methods.\n\n## Syntax\n\n```js\nthen(onFulfilled)\nthen(onFulfilled, onRejected)\n\nthen(\n  (value) => { /* fulfillment handler */ },\n  (reason) => { /* rejection handler */ },\n)\n```\n\n### Parameters\n\n- `onFulfilled` _**optional**_\n  - : A `Function` asynchronously called if the `Promise` is fulfilled. This function has one parameter, the _fulfillment value_. If it is not a function, it is internally replaced with an _identity_ function (`(x) => x`) which simply passes the fulfillment value forward.\n- `onRejected` _**optional**_\n  - : A `Function` asynchronously called if the `Promise` is rejected. This function has one parameter, the _rejection reason_. If it is not a function, it is internally replaced with a _thrower_ function (`(x) => { throw x; }`) which throws the rejection reason it received.\n\n### Return value\n\nReturns a new `Promise` immediately. This new promise is always pending when returned, regardless of the current promise's status.\n\nOne of the `onFulfilled` and `onRejected` handlers will be executed to handle the current promise's fulfillment or rejection. The call always happens asynchronously, even when the current promise is already settled. The behavior of the returned promise (call it `p`) depends on the handler's execution result, following a specific set of rules. If the handler function:\n\n- returns a value: `p` gets fulfilled with the returned value as its value.\n- doesn't return anything: `p` gets fulfilled with `undefined`.\n- throws an error: `p` gets rejected with the thrown error as its value.\n- returns an already fulfilled promise: `p` gets fulfilled with that promise's value as its value.\n- returns an already rejected promise: `p` gets rejected with that promise's value as its value.\n- returns another pending promise: the fulfillment/rejection of the promise returned by `then` will be subsequent to the resolution/rejection of the promise returned by the handler. Also, the resolved value of the promise returned by `then` will be the same as the resolved value of the promise returned by the handler.\n\n## Description\n\nThe `then()` method schedules callback functions for the eventual completion of a Promise — either fulfillment or rejection. It is the primitive method of promises: the [thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) protocol expects all promise-like objects to expose a `then()` method, and the [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx) and [`Promise.prototype.finally`](../../../globals/Promise/prototype/finally.mdx) methods both work by invoking the object's `then()` method.\n\nFor more information about the `onRejected` handler, see the [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx) reference.\n\n`then()` returns a new promise object. If you call the `then()` method twice on the same promise object (instead of chaining), then this promise object will have two pairs of settlement handlers. All handlers attached to the same promise object are always called in the order they were added. Moreover, the two promises returned by each call of `then()` start separate chains and do not wait for each other's settlement.\n\n[Thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) objects that arise along the `then()` chain are always [resolved](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise/Promise#the_resolver_function) — the `onFulfilled` handler never receives a thenable object, and any thenable returned by either handler are always resolved before being passed to the next handler. This is because when constructing the new promise, the `resolve` and `reject` functions passed by the `executor` are saved, and when the current promise settles, the respective function will be called with the fulfillment value or rejection reason. The resolving logic comes from the resolver function passed by the [`Promise()`](../../../globals/Promise/Promise.mdx) constructor.\n\n`then()` supports subclassing, which means it can be called on instances of subclasses of `Promise`, and the result will be a promise of the subclass type. You can customize the type of the return value through the [`[Symbol.species]`](../../../globals/Promise/@@species.mdx) property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Promise/race.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.race()\n\nThe **`Promise.race()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise settles with the eventual state of the first promise that settles.\n\n## Syntax\n\n```js\nPromise.race(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array`) of promises.\n\n### Return value\n\nA `Promise` that **asynchronously settles** with the eventual state of the first promise in the `iterable` to settle. In other words, it fulfills if the first promise to settle is fulfilled, and rejects if the first promise to settle is rejected. The returned promise remains pending forever if the `iterable` passed is empty. If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) settled.\n\n## Description\n\nThe `Promise.race()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. It's useful when you want the first async task to complete, but do not care about its eventual state (i.e. it can either succeed or fail).\n\nIf the iterable contains one or more non-promise values and/or an already settled promise, then `Promise.race()` will settle to the first of these values found in the iterable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Promise/reject.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.reject()\n\nThe **`Promise.reject()`** method returns a `Promise` object that is rejected with a given reason.\n\n## Syntax\n\n```js\nPromise.reject(reason)\n```\n\n### Parameters\n\n- `reason`\n  - : Reason why this `Promise` rejected.\n\n### Return value\n\nA `Promise` that is rejected with the given reason.\n\n## Description\n\nThe static `Promise.reject` function returns a `Promise` that is rejected. For debugging purposes and selective error catching, it is useful to make `reason` an `instanceof` [`Error`](../../globals/Error/Error.mdx).\n\n`Promise.reject()` is generic and supports subclassing, which means it can be called on subclasses of `Promise`, and the result will be a promise of the subclass type. To do so, the subclass's constructor must implement the same signature as the [`Promise()`](../../globals/Promise/Promise.mdx) constructor — accepting a single `executor` function that can be called with the `resolve` and `reject` callbacks as parameters. `Promise.reject()` is essentially a shorthand for `new Promise((resolve, reject) => reject(reason))`.\n\nUnlike [`Promise.resolve()`](../../globals/Promise/resolve.mdx), `Promise.reject()` always wraps `reason` in a new `Promise` object, even when `reason` is already a `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Promise/resolve.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.resolve()\n\nThe **`Promise.resolve()`** method \"resolves\" a given value to a `Promise`. If the value is a promise, that promise is returned; if the value is a [thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables), `Promise.resolve()` will call the `then()` method with two callbacks it prepared; otherwise the returned promise will be fulfilled with the value.\n\nThis function flattens nested layers of promise-like objects (e.g. a promise that fulfills to a promise that fulfills to something) into a single layer — a promise that fulfills to a non-thenable value.\n\n## Syntax\n\n```js\nPromise.resolve(value)\n```\n\n### Parameters\n\n- `value`\n  - : Argument to be resolved by this `Promise`. Can also be a `Promise` or a thenable to resolve.\n\n### Return value\n\nA `Promise` that is resolved with the given value, or the promise passed as value, if the value was a promise object. A resolved promise can be in any of the states — fulfilled, rejected, or pending. For example, resolving a rejected promise will still result in a rejected promise.\n\n## Description\n\n`Promise.resolve()` _resolves_ a promise, which is not the same as fulfilling or rejecting the promise. See [Promise description](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#description) for definitions of the terminology. In brief, `Promise.resolve()` returns a promise whose eventual state depends on another promise, thenable object, or other value.\n\n`Promise.resolve()` is generic and supports subclassing, which means it can be called on subclasses of `Promise`, and the result will be a promise of the subclass type. To do so, the subclass's constructor must implement the same signature as the [`Promise()`](../../globals/Promise/Promise.mdx) constructor — accepting a single `executor` function that can be called with the `resolve` and `reject` callbacks as parameters.\n\n`Promise.resolve()` special-cases native `Promise` instances. If `value` belongs to `Promise` or a subclass, and `value.constructor === Promise`, then `value` is directly returned by `Promise.resolve()`, without creating a new `Promise` instance. Otherwise, `Promise.resolve()` is essentially a shorthand for `new Promise((resolve) => resolve(value))`.\n\nThe bulk of the resolving logic is actually implemented by the [resolver function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise/Promise#the_resolver_function) passed by the `Promise()` constructor. In summary:\n\n- If a non-[thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) value is passed, the returned promise is already fulfilled with that value.\n- If a thenable is passed, the returned promise will adopt the state of that thenable by calling the `then` method and passing a pair of resolving functions as arguments. (But because native promises directly pass through `Promise.resolve()` without creating a wrapper, the `then` method is not called on native promises.) If the resolver function receives another thenable object, it will be resolved agin, so that the eventual fulfillment value of the promise will never be thenable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Proxy/Proxy.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Proxy()\n\nThe **`Proxy()`** constructor is used to create `Proxy` objects.\n\n## Syntax\n\n```js\nnew Proxy(target, handler)\n```\n\n> **Note:** `Proxy()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `target`\n  - : A target object to wrap with `Proxy`. It can be any sort of object,\n    including a native array, a function, or even another proxy.\n- `handler`\n  - : An object whose properties are functions that define the behavior of the proxy when\n    an operation is performed on it.\n\n## Description\n\nUse the `Proxy()` constructor to create a new `Proxy` object.\nThis constructor takes two mandatory arguments:\n\n- `target` is the object for which you want to create the proxy\n- `handler` is the object that defines the custom behavior of the proxy.\n\nAn empty handler will create a proxy that behaves, in almost all respects, exactly like\nthe target. By defining any of a set group of functions on the `handler`\nobject, you can customize specific aspects of the proxy's behavior. For example, by\ndefining `get()` you can provide a customized version of the target's\n[property accessor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Property_Accessors).\n\n### Handler functions\n\nThis section lists all the handler functions you can define. Handler functions are\nsometimes called _traps_, because they trap calls to the underlying target\nobject.\n\n- [`handler.apply()`](../../globals/Proxy/proxy/apply.mdx)\n  - : A trap for a function call.\n- [`handler.construct()`](../../globals/Proxy/proxy/construct.mdx)\n  - : A trap for the `new` operator.\n- [`handler.defineProperty()`](../../globals/Proxy/proxy/defineProperty.mdx)\n  - : A trap for [`Object.defineProperty`](../../globals/Object/defineProperty.mdx).\n- [`handler.deleteProperty()`](../../globals/Proxy/proxy/deleteProperty.mdx)\n  - : A trap for the `delete` operator.\n- [`handler.get()`](../../globals/Proxy/proxy/get.mdx)\n  - : A trap for getting property values.\n- [`handler.getOwnPropertyDescriptor()`)}](../../globals/Proxy/proxy/getOwnPropertyDescriptor.mdx)\n  - : A trap for [`Object.getOwnPropertyDescriptor`](../../globals/Object/getOwnPropertyDescriptor.mdx).\n- [`handler.getPrototypeOf()`](../../globals/Proxy/proxy/getPrototypeOf.mdx)\n  - : A trap for [`Object.getPrototypeOf()`](../../globals/Object/getPrototypeOf.mdx).\n- [`handler.has()`](../../globals/Proxy/proxy/has.mdx)\n  - : A trap for the `in` operator.\n- [`handler.isExtensible()`](../../globals/Proxy/proxy/isExtensible.mdx)\n  - : A trap for [`Object.isExtensible()`](../../globals/Object/isExtensible.mdx).\n- [`handler.ownKeys()`](../../globals/Proxy/proxy/ownKeys.mdx)\n  - : A trap for [`Object.getOwnPropertyNames()`](../../globals/Object/getOwnPropertyNames.mdx) and\n    [`Object.getOwnPropertySymbols()`](../../globals/Object/getOwnPropertySymbols.mdx).\n- [`handler.preventExtensions()`)}](../../globals/Proxy/proxy/preventExtensions.mdx)\n  - : A trap for [`Object.preventExtensions()`](../../globals/Object/preventExtensions.mdx).\n- [`handler.set()`](../../globals/Proxy/proxy/set.mdx)\n  - : A trap for setting property values.\n- [`handler.setPrototypeOf()`](../../globals/Proxy/proxy/setPrototypeOf.mdx)\n  - : A trap for [`Object.setPrototypeOf()`](../../globals/Object/setPrototypeOf.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Proxy/proxy/apply.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.apply()\n\nThe **`handler.apply()`** method is a trap for a function call.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  apply(target, thisArg, argumentsList) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `apply()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target callable object.\n- `thisArg`\n  - : The `this` argument for the call.\n- `argumentsList`\n  - : The list of arguments for the call.\n\n### Return value\n\nThe `apply()` method can return any value.\n\n## Description\n\nThe **`handler.apply()`** method is a trap for a function call.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- Function call: `proxy(...args)`\n- [`Function.prototype.apply()`](../../../globals/Function/prototype/apply.mdx) and [`Function.prototype.call()`](../../../globals/Function/prototype/call.mdx)\n- [`Reflect.apply()`](../../../globals/Reflect/apply.mdx)\n\nOr any other operation that invokes the `[[Call]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The `target` must be a callable itself. That is, it must be a function object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Proxy/proxy/construct.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.construct()\n\nThe **`handler.construct()`** method is a trap for the `new` operator. In order for the new operation to be valid on the resulting Proxy object, the target used to initialize the proxy must itself have a `[[Construct]]` internal method (i.e. `new target` must be valid).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  construct(target, argumentsList, newTarget) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `construct()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `argumentsList`\n  - : The list of arguments for the constructor.\n- `newTarget`\n  - : The constructor that was originally called, `p` above.\n\n### Return value\n\nThe `construct` method must return an object.\n\n## Description\n\nThe **`handler.construct()`** method is a trap for the `new` operator.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- The `new` operator: `new myFunction(...args)`\n- [`Reflect.construct()`](../../../globals/Reflect/construct.mdx)\n\nOr any other operation that invokes the `[[Construct]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The result must be an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Proxy/proxy/defineProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.defineProperty()\n\nThe **`handler.defineProperty()`** method is a trap for\n[`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  defineProperty(target, property, descriptor) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `defineProperty()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property whose description is to be\n    retrieved.\n- `descriptor`\n  - : The descriptor for the property being defined or modified.\n\n### Return value\n\nThe `defineProperty()` method must return a `Boolean` indicating\nwhether or not the property has been successfully defined.\n\n## Description\n\nThe **`handler.defineProperty()`** method is a trap for\n[`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx), [`Object.defineProperties()`](../../../globals/Object/defineProperties.mdx)\n- [`Reflect.defineProperty()`](../../../globals/Reflect/defineProperty.mdx)\n\nOr any other operation that invokes the `[[DefineOwnProperty]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- A property cannot be added, if the target object is not extensible.\n- A property cannot be added as or modified to be non-configurable, if it does not\n  exists as a non-configurable own property of the target object.\n- A property may not be non-configurable, if a corresponding configurable property of\n  the target object exists.\n- If a property has a corresponding target object property then\n  `Object.defineProperty(target, prop, descriptor)`\n  will not throw an exception.\n- In strict mode, a `false` return value from the\n  `defineProperty()` handler will throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Proxy/proxy/deleteProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.deleteProperty()\n\nThe **`handler.deleteProperty()`** method is a trap for the `delete` operator.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  deleteProperty(target, property) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `deleteProperty()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property to delete.\n\n### Return value\n\nThe `deleteProperty()` method must return a `Boolean` indicating\nwhether or not the property has been successfully deleted.\n\n## Description\n\nThe **`handler.deleteProperty()`** method is a trap for the `delete` operator.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- The [`delete`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) operator: `delete proxy[foo]` and\n  `delete proxy.foo`\n- [`Reflect.deleteProperty()`](../../../globals/Reflect/deleteProperty.mdx)\n\nOr any other operation that invokes the `[[Delete]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- A property cannot be deleted, if it exists as a non-configurable own property of the\n  target object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Proxy/proxy/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.get()\n\nThe **`handler.get()`** method is a trap for getting a property\nvalue.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  get(target, property, receiver) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `get()` method. `this`\nis bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property to get.\n- `receiver`\n  - : Either the proxy or an object that inherits from the proxy.\n\n### Return value\n\nThe `get()` method can return any value.\n\n## Description\n\nThe **`handler.get()`** method is a trap for getting a property\nvalue.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- Property access: `proxy[foo]` and `proxy.bar`\n- [`Reflect.get()`](../../../globals/Reflect/get.mdx)\n\nOr any other operation that invokes the `[[Get]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The value reported for a property must be the same as the value of the corresponding\n  target object property if the target object property is a non-writable,\n  non-configurable own data property.\n- The value reported for a property must be undefined if the corresponding target\n  object property is a non-configurable own accessor property that has\n  `undefined` as its `[[Get]]` attribute.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Proxy/proxy/getOwnPropertyDescriptor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.getOwnPropertyDescriptor()\n\nThe **`handler.getOwnPropertyDescriptor()`** method is a trap for [`Object.getOwnPropertyDescriptor()`](../../../globals/Object/getOwnPropertyDescriptor.mdx).\n\n\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  getOwnPropertyDescriptor(target, prop) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `getOwnPropertyDescriptor()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `prop`\n  - : The name of the property whose description should be retrieved.\n\n### Return value\n\nThe `getOwnPropertyDescriptor()` method must return an object or `undefined`.\n\n## Description\n\nThe **`handler.getOwnPropertyDescriptor()`** method is a trap for [`Object.getOwnPropertyDescriptor()`](../../../globals/Object/getOwnPropertyDescriptor.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.getOwnPropertyDescriptor()`](../../../globals/Object/getOwnPropertyDescriptor.mdx)\n- [`Reflect.getOwnPropertyDescriptor()`](../../../globals/Reflect/getOwnPropertyDescriptor.mdx)\n\nOr any other operation that invokes the `[[GetOwnProperty]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `getOwnPropertyDescriptor()` must return an object or `undefined`.\n- A property cannot be reported as non-existent, if it exists as a non-configurable own property of the target object.\n- A property cannot be reported as non-existent, if it exists as an own property of the target object and the target object is not extensible.\n- A property cannot be reported as existent, if it does not exists as an own property of the target object and the target object is not extensible.\n- A property cannot be reported as non-configurable, if it does not exists as an own property of the target object or if it exists as a configurable own property of the target object.\n- The result of `Object.getOwnPropertyDescriptor(target)` can be applied to the target object using `Object.defineProperty()` and will not throw an exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Proxy/proxy/getPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.getPrototypeOf()\n\nThe **`handler.getPrototypeOf()`** method is a trap for the\n`[[GetPrototypeOf]]` internal method.\n\n## Syntax\n\n```js\nnew Proxy(obj, {\n  getPrototypeOf(target) {\n    // …\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `getPrototypeOf()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `getPrototypeOf()` method must return an object or `null`.\n\n## Description\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.getPrototypeOf()`](../../../globals/Object/getPrototypeOf.mdx)\n- [`Reflect.getPrototypeOf()`](../../../globals/Reflect/getPrototypeOf.mdx)\n- [`Object.prototype.isPrototypeOf()`](../../../globals/Object/prototype/isPrototypeOf.mdx)\n- `instanceof`\n\nOr any other operation that invokes the `[[GetPrototypeOf]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `getPrototypeOf()` method must return an object or `null`.\n- If `target` is not extensible,\n  `Object.getPrototypeOf(proxy)` method must return the same\n  value as `Object.getPrototypeOf(target)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Proxy/proxy/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.has()\n\nThe **`handler.has()`** method is a trap for the `in` operator.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  has(target, prop) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to `has()` method. `this` is\nbound to the handler.\n\n- `target`\n  - : The target object.\n- `prop`\n  - : The name or `Symbol` of the property to check for existence.\n\n### Return value\n\nThe `has()` method must return a boolean value.\n\n## Description\n\nThe **`handler.has()`** method is a trap for the `in` operator.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- The [`in`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/in) operator: `foo in proxy`\n- [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) check: `with(proxy) { (foo); }`\n- [`Reflect.has()`](../../../globals/Reflect/has.mdx)\n\nOr any other operation that invokes the `[[HasProperty]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- A property cannot be reported as non-existent, if it exists as a non-configurable\n  own property of the target object.\n- A property cannot be reported as non-existent, if it exists as an own property of\n  the target object and the target object is not extensible.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Proxy/proxy/isExtensible.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.isExtensible()\n\nThe **`handler.isExtensible()`** method is a trap for\n[`Object.isExtensible()`](../../../globals/Object/isExtensible.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  isExtensible(target) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `isExtensible()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `isExtensible()` method must return a boolean value.\n\n## Description\n\nThe **`handler.isExtensible()`** method is a trap for\n[`Object.isExtensible()`](../../../globals/Object/isExtensible.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.isExtensible()`](../../../globals/Object/isExtensible.mdx)\n- [`Reflect.isExtensible()`](../../../globals/Reflect/isExtensible.mdx)\n\nOr any other operation that invokes the `[[IsExtensible]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `Object.isExtensible(proxy)` must return the same value as\n  `Object.isExtensible(target)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Proxy/proxy/ownKeys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.ownKeys()\n\nThe **`handler.ownKeys()`** method is a trap for\n[`Reflect.ownKeys()`](../../../globals/Reflect/ownKeys.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  ownKeys(target) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `ownKeys()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `ownKeys()` method must return an enumerable object.\n\n## Description\n\nThe **`handler.ownKeys()`** method is a trap for\n[`Reflect.ownKeys()`](../../../globals/Reflect/ownKeys.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.getOwnPropertyNames()`](../../../globals/Object/getOwnPropertyNames.mdx)\n- [`Object.getOwnPropertySymbols()`](../../../globals/Object/getOwnPropertySymbols.mdx)\n- [`Object.keys()`](../../../globals/Object/keys.mdx)\n- [`Reflect.ownKeys()`](../../../globals/Reflect/ownKeys.mdx)\n\nOr any other operation that invokes the `[[OwnPropertyKeys]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The result of `ownKeys()` must be an array.\n- The type of each array element is either a `String` or a `Symbol`.\n- The result List must contain the keys of all non-configurable own properties of the\n  target object.\n- If the target object is not extensible, then the result List must contain all the\n  keys of the own properties of the target object and no other values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Proxy/proxy/preventExtensions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.preventExtensions()\n\nThe **`handler.preventExtensions()`** method is a trap for [`Object.preventExtensions()`](../../../globals/Object/preventExtensions.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  preventExtensions(target) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `preventExtensions()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `preventExtensions()` method must return a boolean value.\n\n## Description\n\nThe **`handler.preventExtensions()`** method is a trap for [`Object.preventExtensions()`](../../../globals/Object/preventExtensions.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.preventExtensions()`](../../../globals/Object/preventExtensions.mdx)\n- [`Reflect.preventExtensions()`](../../../globals/Reflect/preventExtensions.mdx)\n- [`Object.seal()`](../../../globals/Object/seal.mdx)\n- [`Object.freeze()`](../../../globals/Object/freeze.mdx)\n\nOr any other operation that invokes the `[[PreventExtensions]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `Object.preventExtensions(proxy)` only returns `true` if `Object.isExtensible(proxy)` is `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Proxy/proxy/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.set()\n\nThe **`handler.set()`** method is a trap for setting a property\nvalue.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  set(target, property, value, receiver) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `set()` method. `this`\nis bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property to set.\n- `value`\n  - : The new value of the property to set.\n- `receiver`\n\n  - : The object to which the assignment was originally directed. This is usually the\n    proxy itself. But a `set()` handler can also be called indirectly, via\n    the prototype chain or various other ways.\n\n    For example, suppose a script does\n    `obj.name = \"jen\"`, and `obj` is not a\n    proxy, and has no own property `.name`, but it has a proxy on its\n    prototype chain. That proxy's `set()` handler will be called, and\n    `obj` will be passed as the receiver.\n\n### Return value\n\nThe `set()` method should return a boolean value.\n\n- Return `true` to indicate that assignment succeeded.\n- If the `set()` method returns `false`, and the assignment\n  happened in strict-mode code, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) will be thrown.\n\n## Description\n\nThe **`handler.set()`** method is a trap for setting property\nvalue.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- Property assignment: `proxy[foo] = bar` and `proxy.foo = bar`\n- [`Reflect.set()`](../../../globals/Reflect/set.mdx)\n\nOr any other operation that invokes the `[[Set]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- Cannot change the value of a property to be different from the value of the\n  corresponding target object property if the corresponding target object property is a\n  non-writable, non-configurable data property.\n- Cannot set the value of a property if the corresponding target object property is a\n  non-configurable accessor property that has `undefined` as its\n  `[[Set]]` attribute.\n- In strict mode, a `false` return value from the `set()`\n  handler will throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Proxy/proxy/setPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.setPrototypeOf()\n\nThe **`handler.setPrototypeOf()`** method is a trap for\n[`Object.setPrototypeOf()`](../../../globals/Object/setPrototypeOf.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  setPrototypeOf(target, prototype) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `setPrototypeOf()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `prototype`\n  - : The object's new prototype or `null`.\n\n### Return value\n\nThe `setPrototypeOf()` method returns `true` if the\n`[[Prototype]]` was successfully changed, otherwise `false`.\n\n## Description\n\nThe **`handler.setPrototypeOf()`** method is a trap for\n[`Object.setPrototypeOf()`](../../../globals/Object/setPrototypeOf.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.setPrototypeOf()`](../../../globals/Object/setPrototypeOf.mdx)\n- [`Reflect.setPrototypeOf()`](../../../globals/Reflect/setPrototypeOf.mdx)\n\nOr any other operation that invokes the `[[SetPrototypeOf]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- If `target` is not extensible, the `prototype`\n  parameter must be the same value as\n  `Object.getPrototypeOf(target)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Proxy/revocable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Proxy.revocable()\n\nThe **`Proxy.revocable()`** static method creates a revocable `Proxy` object.\n\n## Syntax\n\n```js\nProxy.revocable(target, handler)\n```\n\n### Parameters\n\n- `target`\n  - : A target object to wrap with `Proxy`. It can be any sort of object, including a native array, a function, or even another proxy.\n- `handler`\n  - : An object whose properties are functions defining the behavior of `proxy` when an operation is performed on it.\n\n### Return value\n\nA plain object with the following two properties:\n\n- `proxy`\n  - : A Proxy object exactly the same as one created with a [`new Proxy(target, handler)`](../../globals/Proxy/Proxy.mdx) call.\n- `revoke`\n  - : A function with no parameters to revoke (switch off) the `proxy`.\n\n## Description\n\nThe `Proxy.revocable()` factory function is the same as the [`Proxy()`](../../globals/Proxy/Proxy.mdx) constructor, except that in addition to creating a proxy object, it also creates a `revoke` function that can be called to disable the proxy. The proxy object and the `revoke` function are wrapped in a plain object.\n\nThe `revoke` function does not take any parameters, nor does it rely on the `this` value. The created `proxy` object is attached to the `revoke` function as a [private property](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/Private_class_fields) that the `revoke` function accesses on itself when called (the existence of the private property is not observable from the outside, but it has implications on how garbage collection happens). The `proxy` object is _not_ captured within the [closure](https://developer.mozilla.org/docs/Web/JavaScript/Closures) of the `revoke` function (which will make garbage collection of `proxy` impossible if `revoke` is still alive).\n\nAfter the `revoke()` function gets called, the proxy becomes unusable: any trap to a handler throws a [`TypeError`](../../globals/TypeError/TypeError.mdx). Once a proxy is revoked, it remains revoked, and calling `revoke()` again has no effect — in fact, the call to `revoke()` detaches the `proxy` object from the `revoke` function, so the `revoke` function will not be able to access the proxy again at all. If the proxy is not referenced elsewhere, it will then be eligible for garbage collection. The `revoke` function also detaches `target` and `handler` from the `proxy`, so if `target` is not referenced elsewhere, it will also be eligible for garbage collection, even when its proxy is still alive, since there's no longer a way to meaningfully interact with the target object.\n\nLetting users interact with an object through a revocable proxy allows you to [control the lifetime](https://developer.mozilla.org/docs/Web/JavaScript/Memory_Management) of the object exposed to the user — you can make the object garbage-collectable even when the user is still holding a reference to its proxy.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/RangeError/RangeError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RangeError\n\nThe **`RangeError()`** constructor creates an error\nwhen a value is not in the set or range of allowed values.\n\n## Syntax\n\n```js\nnew RangeError()\nnew RangeError(message)\nnew RangeError(message, options)\nnew RangeError(message, fileName)\nnew RangeError(message, fileName, lineNumber)\n\nRangeError()\nRangeError(message)\nRangeError(message, options)\nRangeError(message, fileName)\nRangeError(message, fileName, lineNumber)\n```\n\n> **Note:** `RangeError()` can be called with or without `new`. Both create a new `RangeError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/ReadableByteStreamController/prototype/byobRequest.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# byobRequest\n\nThe **`byobRequest`** read-only property of the `ReadableByteStreamController` interface returns the current BYOB request, or `null` if there are no pending requests.\n\nAn underlying byte source should check this property, and use it to write data to the stream if it exists (rather than using `ReadableByteStreamController.enqueue()`).\nThis will result in an efficient zero-byte transfer of the data to the consumer.\n\n## Value\n\nA `ReadableStreamBYOBRequest` object instance, or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/ReadableByteStreamController/prototype/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# close()\n\nThe **`close()`** method of the `ReadableByteStreamController` interface closes the associated stream.\n\nThis might be called by the underlying source when its data source has been exhausted/completed.\n\n> **Note:** Readers will still be able to read any previously-enqueued chunks from the stream, but once those are read, the stream will become closed.\n> However if there is an outstanding and partially written `byobRequest` when `close()` is called, the stream will be errored.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableByteStreamController`, it is already closed, or the stream is not readable for some other reason.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/ReadableByteStreamController/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# desiredSize\n\nThe **`desiredSize`** read-only property of the`ReadableByteStreamController` interface returns the number of bytes required to fill the stream's internal queue to its \"desired size\".\n\nThe value is used by the stream to indicate a preferred flow rate to the underlying source.\nSources that support throttling or pausing their inflow of data (not all do!) should control the inflow such that `desiredSize` of the stream buffer is kept positive and as close to zero as possible.\n\nThe `desiredSize` is used to apply backpressure from downstream consumers.\n\n## Value\n\nAn integer. Note that this can be negative if the queue is over-full.\n\nThe value will be `null` if the stream has errored and `0` if it is closed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/ReadableByteStreamController/prototype/enqueue.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# enqueue()\n\nThe **`enqueue()`** method of the `ReadableByteStreamController` interface enqueues a given chunk on the associated readable byte stream (the chunk is copied into the stream's internal queues).\n\nThis should only be used to transfer data to the queue when `byobRequest` is `null`.\n\n## Syntax\n\n```js\nenqueue(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : The chunk to enqueue.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableByteStreamController`, or the stream cannot be read for some other reason, or the chunk is not an object, or the chunk's internal array buffer is non-existent, zero-length, or detached.\n    It is also thrown if the stream has been closed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/ReadableByteStreamController/prototype/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# error()\n\nThe **`error()`** method of the `ReadableByteStreamController` interface causes any future interactions with the associated stream to error with the specified reason.\n\nThis is commonly called by an underlying source to surface an error from the interface where it gets its data (such as a file-read or socket error).\nIt can also be called from elsewhere to trigger a stream error, for example if another part of the system that the stream relies on fails.\n\n## Syntax\n\n```js\nerror(errorObject)\n```\n\n### Parameters\n\n- `errorObject`\n  - : Any object that you want future interactions to fail with.\n\n### Return value\n\n`undefined`\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableByteStreamController`, or the stream is not readable for some other reason.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/ReadableStream/ReadableStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream()\n\nThe **`ReadableStream()`** constructor creates and returns a readable stream object from the given handlers.\n\n## Syntax\n\n```js\nnew ReadableStream()\nnew ReadableStream(underlyingSource)\nnew ReadableStream(underlyingSource, queuingStrategy)\n```\n\n### Parameters\n\n- `underlyingSource` _**optional**_\n\n  - : An object containing methods and properties that define how the constructed stream instance will behave.\n    `underlyingSource` can contain the following:\n\n    - `start` (controller) _**optional**_\n      - : This is a method, called immediately when the object is constructed. The\n        contents of this method are defined by the developer, and should aim to get access\n        to the stream source, and do anything else required to set up the stream\n        functionality. If this process is to be done asynchronously, it can return a\n        promise to signal success or failure. The `controller` parameter passed\n        to this method is a `ReadableStreamDefaultController` or a\n        `ReadableByteStreamController`, depending on the value of the\n        `type` property. This can be used by the developer to control the\n        stream during set up.\n    - `pull` (controller) _**optional**_\n      - : This method, also defined by the developer, will be called repeatedly when the\n        stream's internal queue of chunks is not full, up until it reaches its high water\n        mark. If `pull()` returns a promise, then it won't be called again\n        until that promise fulfills; if the promise rejects, the stream will become\n        errored. The `controller` parameter passed to this method is a\n        `ReadableStreamDefaultController` or a\n        `ReadableByteStreamController`, depending on the value of the\n        `type` property. This can be used by the developer to control the\n        stream as more chunks are fetched.\n    - `cancel` (reason) _**optional**_\n      - : This method, also defined by the developer, will be called if the app signals\n        that the stream is to be cancelled (e.g. if `ReadableStream.cancel()`\n        is called). The contents should do whatever is necessary to release access to the\n        stream source. If this process is asynchronous, it can return a promise to signal\n        success or failure. The `reason` parameter contains a\n        string describing why the stream was cancelled.\n    - `type` _**optional**_\n      - : This property controls what type of readable stream is being dealt with. If it\n        is included with a value set to `\"bytes\"`, the passed controller object\n        will be a `ReadableByteStreamController` capable of handling a BYOB\n        (bring your own buffer)/byte stream. If it is not included, the passed controller\n        will be a `ReadableStreamDefaultController`.\n    - `autoAllocateChunkSize` _**optional**_\n\n      - : For byte streams, the developer can set the `autoAllocateChunkSize` with a positive integer value to turn on the stream's auto-allocation feature.\n        With this is set, the stream implementation will automatically allocate a view buffer of the specified size in `ReadableByteStreamController.byobRequest` when required.\n\n        This must be set to enable zero-copy transfers to be used with a default `ReadableStreamDefaultReader`.\n        If not set, a default reader will still stream data, but `ReadableByteStreamController.byobRequest` will always be `null` and transfers to the consumer must be via the stream's internal queues.\n\n- `queuingStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer — this defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk` — this indicates the size to\n        use for each chunk, in bytes.\n\n    > **Note:** You could define your own custom\n    > `queuingStrategy`, or use an instance of\n    > `ByteLengthQueuingStrategy` or `CountQueuingStrategy`\n    > for this object value. If no `queuingStrategy` is supplied, the default\n    > used is the same as a `CountQueuingStrategy` with a high water mark of\n    > 1\\.\n\n### Return value\n\nAn instance of the `ReadableStream` object.\n\n### Exceptions\n\n- `RangeError`\n  - Thrown if the supplied type value is neither `\"bytes\"` nor `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/ReadableStream/prototype/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.cancel()\n\nThe **`cancel()`** method of the\n`ReadableStream` interface returns a `Promise` that\nresolves when the stream is canceled.\n\nCancel is used when you've completely finished with the stream and don't need any more\ndata from it, even if there are chunks enqueued waiting to be read. That data is lost\nafter cancel is called, and the stream is not readable any more. To read those chunks\nstill and not completely get rid of the stream, you'd use\n`ReadableStreamDefaultController.close()`.\n\n## Syntax\n\n```js\ncancel()\ncancel(reason)\n```\n\n### Parameters\n\n- `reason` _**optional**_\n  - : A human-readable reason for the cancellation. The underlying source may or may not use it.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason` parameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to cancel is not a `ReadableStream`, or it is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/ReadableStream/prototype/getReader.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.getReader()\n\nThe **`getReader()`** method of the `ReadableStream` interface creates a reader and locks the stream to it.\nWhile the stream is locked, no other reader can be acquired until this one is released.\n\n## Syntax\n\n```js\ngetReader()\ngetReader(options)\n```\n\n### Parameters\n\n- `options` _**optional**_\n\n  - : An object containing the following properties:\n\n    - `mode` _**optional**_\n\n      - : A property that specifies the type of reader to create.\n        Values can be:\n\n        - `\"byob\"`, which results in a `ReadableStreamBYOBReader` being created that can read readable byte streams (streams that support zero-copy transfer from an underlying byte source to the reader when internal stream buffers are empty).\n        - `undefined` (or not specified at all — this is the default), which results in a `ReadableStreamDefaultReader` being created that can read individual chunks from a stream.\n\n### Return value\n\nA `ReadableStreamDefaultReader` or `ReadableStreamBYOBReader` object instance, depending on the `mode` value.\n\n### Exceptions\n\n- `RangeError`\n  - : Thrown if the provided mode value is not `\"byob\"` or `undefined`.\n- `TypeError`\n  - : Thrown if the stream you are trying to create a reader for is already locked, or not a `ReadableStream`."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/ReadableStream/prototype/locked.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.locked\n\nThe **`locked`** read-only property of the `ReadableStream` interface returns whether or not the readable stream is locked to a reader.\n\nA readable stream can have at most one active reader at a time, and is locked to that reader until it is released.\nA reader might be obtained using `ReadableStream.getReader()` and released using the reader's `releaseLock()` method.\n\n## Value\n\nA `boolean` value indicating whether or not the readable stream is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/ReadableStream/prototype/pipeThrough.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.pipeThrough()\n\nThe **`pipeThrough()`** method of the `ReadableStream` interface provides a chainable way of piping the current stream through a transform stream or any other writable/readable pair.\n\nPiping a stream will generally lock it for the duration of the pipe, preventing other readers from locking it.\n\n## Syntax\n\n```js\npipeThrough(transformStream)\npipeThrough(transformStream, options)\n```\n\n### Parameters\n\n- `transformStream`\n\n  - : A `TransformStream` (or an object with the structure\n    `{writable, readable}`) consisting of a readable stream and a writable\n    stream working together to transform some data from one form to another. Data written\n    to the `writable` stream can be read in some transformed state by the\n    `readable` stream. For example, a `TextDecoder`, has bytes\n    written to it and strings read from it, while a video decoder has encoded bytes\n    written to it and uncompressed video frames read from it.\n\n- `options` _**optional**_\n\n  - : The options that should be used when piping to the `writable` stream.\n    Available options are:\n\n    - `preventClose`\n\n      - : If this is set to `true`, the source `ReadableStream` closing will no longer cause the destination `WritableStream` to be closed.\n        The method will return a fulfilled promise once this process completes, unless an error is encountered while closing the destination, in which case it will be rejected with that error.\n\n    - `preventAbort`\n\n      - : If this is set to `true`, errors in the source `ReadableStream` will no longer abort the destination `WritableStream`.\n        The method will return a promise rejected with the source's error, or with any error that occurs during aborting the destination.\n\n    - `preventCancel`\n\n      - : If this is set to `true`, errors in the destination `WritableStream` will no longer cancel the source `ReadableStream`.\n        In this case the method will return a promise rejected with the source's error, or with any error that occurs during canceling the source.\n        In addition, if the destination writable stream starts out closed or closing, the source readable stream will no longer be canceled.\n        In this case the method will return a promise rejected with an error indicating piping to a closed stream failed, or with any error that occurs during canceling the source.\n\n### Return value\n\nThe `readable` side of the `transformStream`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the `writable` and/or `readable` property of `transformStream` are undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/ReadableStream/prototype/pipeTo.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.pipeTo()\n\nThe **`pipeTo()`** method of the `ReadableStream` interface pipes the current `ReadableStream` to a given `WritableStream` and returns a `Promise` that fulfills when the piping process completes successfully, or rejects if any errors were encountered.\n\nPiping a stream will generally `lock` it for the duration of the pipe, preventing other readers from locking it.\n\n## Syntax\n\n```js\npipeTo(destination)\npipeTo(destination, options)\n```\n\n### Parameters\n\n- `destination`\n\n  - : A `WritableStream` that acts as the final destination for the `ReadableStream`.\n\n- `options` _**optional**_\n\n  - : The options that should be used when piping to the `writable` stream.\n    Available options are:\n\n    - `preventClose`\n      - : If this is set to `true`, the source `ReadableStream` closing will no longer cause the destination `WritableStream` to be closed.\n        The method will return a fulfilled promise once this process completes, unless an error is encountered while closing the destination in which case it will be rejected with that error.\n    - `preventAbort`\n      - : If this is set to `true`, errors in the source `ReadableStream` will no longer abort the destination `WritableStream`.\n        The method will return a promise rejected with the source's error, or with any error that occurs during aborting the destination.\n    - `preventCancel`\n      - : If this is set to `true`, errors in the destination `WritableStream` will no longer cancel the source `ReadableStream`.\n        In this case the method will return a promise rejected with the source's error, or with any error that occurs during canceling the source.\n        In addition, if the destination writable stream starts out closed or closing, the source readable stream will no longer be canceled.\n        In this case the method will return a promise rejected with an error indicating piping to a closed stream failed, or with any error that occurs during canceling the source.\n\n### Return value\n\nA `Promise` that resolves when the piping process has completed.\n\n### Exceptions\n\n- `TypeError`\n  - : The `writableStream` and/or `readableStream` objects are not a writable stream/readable stream, or one or both of the streams are locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/ReadableStream/prototype/tee.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.tee()\n\nThe **`tee()`** method of the\n`ReadableStream` interface [tees](https://streams.spec.whatwg.org/#tee-a-readable-stream) the current readable stream, returning a\ntwo-element array containing the two resulting branches as\nnew `ReadableStream` instances.\n\nThis is useful for allowing two readers to read a stream sequentially or simultaneously,\nperhaps at different speeds.\nFor example, you might do this in a ServiceWorker if you want to fetch\na response from the server and stream it to the browser, but also stream it to the\nServiceWorker cache. Since a response body cannot be consumed more than once, you'd need\ntwo copies to do this.\n\nA teed stream will partially signal backpressure at the rate of the _faster_ consumer\nof the two `ReadableStream` branches,\nand unread data is enqueued internally on the slower consumed `ReadableStream`\nwithout any limit or backpressure.\nThat is, when _both_ branches have an unread element in their internal queue,\nthen the original `ReadableStream`'s controller's internal queue will start to fill up,\nand once its `ReadableStreamDefaultController.desiredSize\", \"desiredSize` ≤ 0\nor byte stream controller `ReadableByteStreamController.desiredSize\", \"desiredSize` ≤ 0,\nthen the controller will stop calling `pull(controller)` on the\nunderlying source passed to `ReadableStream.ReadableStream\", \"new ReadableStream()`.\nIf only one branch is consumed, then the entire body will be enqueued in memory.\nTherefore, you should not use the built-in `tee()` to read very large streams\nin parallel at different speeds.\nInstead, search for an implementation that fully backpressures\nto the speed of the _slower_ consumed branch.\n\nTo cancel the stream you then need to cancel both resulting branches. Teeing a stream\nwill generally lock it for the duration, preventing other readers from locking it.\n\n## Syntax\n\n```js\ntee()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nAn `Array` containing two `ReadableStream` instances.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source stream is not a `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/ReadableStreamBYOBReader/ReadableStreamBYOBReader.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# ReadableStreamBYOBReader()\n\nThe **`ReadableStreamBYOBReader()`** constructor creates and returns a `ReadableStreamBYOBReader` object instance.\n\n> **Note:** You generally wouldn't use this constructor manually;\n> instead, you'd use the `ReadableStream.getReader()` method with the argument `\"byob\"`.\n\n## Syntax\n\n```js\nnew ReadableStreamBYOBReader(stream)\n```\n\n### Parameters\n\n- `stream`\n  - : The `ReadableStream` to be read.\n\n### Return value\n\nAn instance of the `ReadableStreamBYOBReader` object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the supplied `stream` parameter is not a `ReadableStream`, or it is already locked for reading by another reader, or its stream controller is not a `ReadableByteStreamController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/ReadableStreamBYOBReader/prototype/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# cancel()\n\nThe **`cancel()`** method of the `ReadableStreamBYOBReader` interface returns a `Promise` that resolves when the stream is canceled.\nCalling this method signals a loss of interest in the stream by a consumer.\n\n> **Note:** If the reader is active, the `cancel()` method behaves the same as that for the associated stream (`ReadableStream.cancel()`).\n\n## Syntax\n\n```js\ncancel()\ncancel(reason)\n```\n\n### Parameters\n\n- `reason` __optional__\n  - : A human-readable reason for the cancellation. The underlying source may or may not use it.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason` parameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamBYOBReader`, or the stream has no owner.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/ReadableStreamBYOBReader/prototype/closed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# closed\n\nThe **`closed`** read-only property of the `ReadableStreamBYOBReader` interface returns a `Promise` that fulfills when the stream closes, or rejects if the stream throws an error or the reader's lock is released.\n\nThis property enables you to write code that responds to an end to the streaming process.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/ReadableStreamBYOBReader/prototype/read.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# read()\n\nThe **`read()`** method of the `ReadableStreamBYOBReader` interface is used to read data into a view on a user-supplied buffer from an associated readable byte stream.\nA request for data will be satisfied from the stream's internal queues if there is any data present.\nIf the stream queues are empty, the request may be supplied as a zero-copy transfer from the underlying byte source.\n\nThe method takes as an argument a view on a buffer that supplied data is to be read into, and returns a `Promise`.\nThe promise fulfills with an object that has properties `value` and `done` when data comes available, or if the stream is cancelled.\nIf the stream is errored, the promise will be rejected with the relevant error object.\n\nIf a chunk of data is supplied, the `value` property will contain a new view.\nThis will be a view over the same buffer/backing memory (and of the same type) as the original `view` passed to the `read()` method, now populated with the new chunk of data.\nNote that once the promise fulfills, the original `view` passed to the method will be detached and no longer usable.\nThe promise will fulfill with a `value: undefined` if the stream has been cancelled.\nIn this case the backing memory region of `view` is discarded and not returned to the caller (all previously read data in the view's buffer is lost).\n\nThe `done` property indicates whether or not more data is expected.\nThe value is set `true` if the stream is closed or cancelled, and `false` otherwise.\n\n## Syntax\n\n```js\nread(view)\n```\n\n### Parameters\n\n- `view`\n  - : The view that data is to be read into.\n\n### Return value\n\nA `Promise`, which fulfills/rejects with a result depending on the state of the stream.\n\nThe following are possible:\n\n- If a chunk is available and the stream is still active, the promise fulfills with an object of the form:\n\n  ```\n  { value: theChunk, done: false }\n  ```\n\n  `theChunk` is a view containing the new data.\n  This is a view of the same type and over the same backing memory as the `view` passed to the `read()` method.\n  The original `view` will be detached and no longer usable.\n\n- If the stream is closed, the promise fulfills with an object of the form (where `theChunk` has the same properties as above):\n\n  ```\n  { value: theChunk, done: true }\n  ```\n\n- If the stream is cancelled, the promise fulfills with an object of the form:\n\n  ```\n  { value: undefined, done: true }\n  ```\n\n  In this case the backing memory is discarded.\n\n- If the stream throws an error, the promise rejects with the relevant error.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamBYOBReader`, the stream has no owner, the view is not an object or has become detached, the view's length is 0, or `ReadableStreamBYOBReader.releaseLock()` is called (when there's is a pending read request).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/ReadableStreamBYOBReader/prototype/releaseLock.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# releaseLock()\n\nThe **`releaseLock()`** method of the `ReadableStreamBYOBReader` interface releases the reader's lock on the stream.\nAfter the lock is released, the reader is no longer active.\n\nThe reader will appear errored if the associated stream is errored when the lock is released; otherwise, the reader will appear closed.\n\nIf the reader's lock is released while it still has pending read requests then the promises returned by the reader's `ReadableStreamBYOBReader.read()` method are immediately rejected with a `TypeError`.\nUnread chunks remain in the stream's internal queue and can be read later by acquiring a new reader.\n\n## Syntax\n\n```js\nreleaseLock()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamBYOBReader`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/ReadableStreamBYOBRequest/prototype/respond.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# respond()\n\nThe **`respond()`** method of the `ReadableStreamBYOBRequest` interface is used to signal to the associated readable byte stream that the specified number of bytes were written into the `ReadableStreamBYOBRequest.view`.\n\nAfter this method is called, the `view` will be transferred and no longer modifiable.\n\n## Syntax\n\n```js\nrespond(bytesWritten)\n```\n\n### Parameters\n\n- `bytesWritten`\n  - : The number of bytes written into `ReadableStreamBYOBRequest.view`.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : The request does not have an associated `ReadableByteStreamController` or the view buffer is not detached/cannot be transferred into.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/ReadableStreamBYOBRequest/prototype/respondWithNewView.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# respondWithNewView()\n\nThe **`respondWithNewView()`** method of the `ReadableStreamBYOBRequest` interface specifies a new view that the consumer of the associated readable byte stream should write to instead of `ReadableStreamBYOBRequest.view`.\n\nThe new view must be a `TypedArray` or a `DataView` that provides a view onto the same backing memory region as `ReadableStreamBYOBRequest.view`.\nAfter this method is called, the view that was passed into the method will be transferred and no longer modifiable.\n\nThe method is intended for use cases where an underlying byte source needs to transfer a `byobRequest.view` internally before finishing its response.\nFor example, the source may transfer the BYOB view to a separate worker thread, and wait for the worker to transfer it back once it has been filled.\n\n## Syntax\n\n```js\nrespondWithNewView(view)\n```\n\n### Parameters\n\n- `view`\n\n  - : A `TypedArray` or a `DataView` that the consumer of the associated readable byte stream should write to instead of `ReadableStreamBYOBRequest.view`.\n\n    This must be a view onto the same backing memory region as `ReadableStreamBYOBRequest.view` and occupy the same or less memory.\n    Specifically, it must be either the view's buffer or a transferred version, must have the same `byteOffset`, and a `byteLength` (number of bytes written) that is less than or equal to that of the view.\n\n### Return value\n\n`undefined`\n\n### Exceptions\n\n- `TypeError`\n\n  - : Thrown if the source object is not a `ReadableStreamBYOBRequest`, or there is no associated controller, or the associated internal array buffer is non-existent or detached.\n    It may also be thrown if the `view` is zero-length when there is an active reader, or non-zero when called on a closed stream.\n\n- `RangeError`\n  - : Thrown if the new `view` does not match the backing memory region of `ReadableStreamBYOBRequest.view`.\n    For example, it is not the same buffer (or a transferred version), has a different `byteOffset`, or is larger than the memory available to the backing view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/ReadableStreamBYOBRequest/prototype/view.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# view\n\nThe **`view`** getter property of the `ReadableStreamBYOBRequest` interface returns the current view.\n\n## Value\n\nA typed array representing the destination region to which the controller can write generated data.\n\n`null` if the request has already been responded to, by calling `ReadableStreamBYOBRequest.respond()` or `ReadableStreamBYOBRequest.respondWithNewView()`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/ReadableStreamDefaultController/prototype/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.close()\n\nThe **`close()`** method of the\n`ReadableStreamDefaultController` interface closes the associated stream.\n\nReaders will still be able to read any previously-enqueued chunks from the stream,\nbut once those are read, the stream will become closed. If you want to completely get\nrid of the stream and discard any enqueued chunks, you'd use\n`ReadableStream.cancel()` or\n`ReadableStreamDefaultReader.cancel()`.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/ReadableStreamDefaultController/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.desiredSize\n\nThe **`desiredSize`** read-only property of the\n`ReadableStreamDefaultController` interface returns the desired size\nrequired to fill the stream's internal queue.\n\n## Value\n\nAn integer. Note that this can be negative if the queue is over-full.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/ReadableStreamDefaultController/prototype/enqueue.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.enqueue()\n\nThe **`enqueue()`** method of the\n`ReadableStreamDefaultController` interface enqueues a given chunk in the\nassociated stream.\n\n## Syntax\n\n```js\nenqueue(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : The chunk to enqueue.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/ReadableStreamDefaultController/prototype/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.error()\n\nThe **`error()`** method of the\n`ReadableStreamDefaultController` interface causes any future interactions\nwith the associated stream to error.\n\n> **Note:** The `error()` method can be called\n> more than once, and can be called when the stream is not readable.\n\n## Syntax\n\n```js\nerror(e)\n```\n\n### Parameters\n\n- `e`\n  - : The error you want future interactions to fail with.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/ReadableStreamDefaultReader/ReadableStreamDefaultReader.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader()\n\nThe **`ReadableStreamDefaultReader()`**\nconstructor creates and returns a `ReadableStreamDefaultReader` object\ninstance.\n\n## Syntax\n\n```js\nnew ReadableStreamDefaultReader(stream)\n```\n\n### Parameters\n\n- `stream`\n  - : The `ReadableStream` to be read.\n\n### Return value\n\nAn instance of the `ReadableStreamDefaultReader` object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the supplied `stream` parameter is not a `ReadableStream`,\n    or it is already locked for reading by another reader.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/ReadableStreamDefaultReader/prototype/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n~ ReadableStreamDefaultReader.cancel()\n\nThe **`cancel()`** method of the\n`ReadableStreamDefaultReader` interface returns a `Promise` that resolves when the stream is canceled. Calling this method signals a loss of interest in the stream by a consumer.\n\nCancel is used when you've completely finished with the stream and don't need any more\ndata from it, even if there are chunks enqueued waiting to be read. That data is lost\nafter cancel is called, and the stream is not readable any more. To read those chunks\nstill and not completely get rid of the stream, you'd use\n`ReadableStreamDefaultController.close()`.\n\n> **Note:** If the reader is active, the\n> `cancel()` method behaves the same as that for the associated stream\n> (`ReadableStream.cancel()`).\n\n## Syntax\n\n```js\ncancel()\ncancel(reason)\n```\n\n### Parameters\n\n- `reason` _**optional**_\n  - : A human-readable reason for the cancellation. This value may or may not be used.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason`\nparameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamDefaultReader`, or the stream\n    has no owner.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/ReadableStreamDefaultReader/prototype/closed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader.closed\n\nThe **`closed`** read-only property of the\n`ReadableStreamDefaultReader` interface returns a\n`Promise` that fulfills when the stream closes, or rejects if the\nstream throws an error or the reader's lock is released. This property enables you\nto write code that responds to an end to the streaming process.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/ReadableStreamDefaultReader/prototype/read.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader.read()\n\nThe **`read()`** method of the `ReadableStreamDefaultReader` interface returns a `Promise` providing access to the next chunk in the stream's internal queue.\n\n## Syntax\n\n```js\nread()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise`, which fulfills/rejects with a result depending on the state of the stream.\nThe different possibilities are as follows:\n\n- If a chunk is available, the promise will be fulfilled with an object of the form `{ value: theChunk, done: false }`.\n- If the stream becomes closed, the promise will be fulfilled with an object of the form `{ value: undefined, done: true }`.\n- If the stream becomes errored, the promise will be rejected with the relevant error.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamDefaultReader`, the stream has no owner, or `ReadableStreamDefaultReader.releaseLock()` is called (when there's a pending read request).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/ReadableStreamDefaultReader/prototype/releaseLock.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader.releaseLock()\n\nThe **`releaseLock()`** method of the `ReadableStreamDefaultReader` interface releases the reader's lock on the stream.\n\nIf the associated stream is errored when the lock is released, the reader will appear errored in that same way subsequently; otherwise, the reader will appear closed.\n\nIf the reader's lock is released while it still has pending read requests then the promises returned by the reader's `ReadableStreamDefaultReader.read()` method are immediately rejected with a `TypeError`.\nUnread chunks remain in the stream's internal queue and can be read later by acquiring a new reader.\n\n## Syntax\n\n```js\nreleaseLock()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultReader`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/ReferenceError/ReferenceError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReferenceError\n\nThe **`ReferenceError`** object represents an error when a\nnon-existent variable is referenced.\n\n## Syntax\n\n```js\nnew ReferenceError()\nnew ReferenceError(message)\nnew ReferenceError(message, options)\nnew ReferenceError(message, fileName)\nnew ReferenceError(message, fileName, lineNumber)\n\nReferenceError()\nReferenceError(message)\nReferenceError(message, options)\nReferenceError(message, fileName)\nReferenceError(message, fileName, lineNumber)\n```\n\n> **Note:** `ReferenceError()` can be called with or without `new`. Both create a new `ReferenceError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Reflect/apply.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.apply()\n\nThe static **`Reflect.apply()`** method calls a target function\nwith arguments as specified.\n\n## Syntax\n\n```js\nReflect.apply(target, thisArgument, argumentsList)\n```\n\n### Parameters\n\n- `target`\n  - : The target function to call.\n- `thisArgument`\n  - : The value of `this` provided for the call to\n    `target`.\n- `argumentsList`\n  - : An array-like object specifying the arguments with which\n    `target` should be called.\n\n### Return value\n\nThe result of calling the given `target` function with the\nspecified `this` value and arguments.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if the `target` is not callable.\n\n## Description\n\nIn ES5, you typically use the [`Function.prototype.apply()`](../../globals/Function/prototype/apply.mdx) method to call a\nfunction with a given `this` value and `arguments` provided as an array\n(or an [array-like object](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects)).\n\n```js\nFunction.prototype.apply.call(Math.floor, undefined, [1.75]);\n```\n\nWith `Reflect.apply()` this becomes less verbose and easier to understand.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Reflect/construct.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.construct()\n\nThe static **`Reflect.construct()`** method acts like the\n`new` operator, but as a function. It is equivalent to\ncalling `new target(...args)`. It gives also the added option to specify a\ndifferent prototype.\n\n## Syntax\n\n```js\nReflect.construct(target, argumentsList)\nReflect.construct(target, argumentsList, newTarget)\n```\n\n### Parameters\n\n- `target`\n  - : The target function to call.\n- `argumentsList`\n  - : An array-like object specifying the arguments with which\n    `target` should be called.\n- `newTarget` _**optional**_\n  - : The constructor whose prototype should be used. See also the [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target)\n    operator. If `newTarget` is not present, its value defaults\n    to `target`.\n\n### Return value\n\nA new instance of `target` (or `newTarget`,\nif present), initialized by `target` as a constructor with the\ngiven `argumentsList`.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` or\n`newTarget` are not constructors.\n\n## Description\n\n`Reflect.construct()` allows you to invoke a constructor with a variable\nnumber of arguments. (This would also be possible by using the\n[spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) combined with the\n[`new` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new).)\n\n```js\nconst obj = new Foo(...args);\nconst obj = Reflect.construct(Foo, args);\n```\n\n### Reflect.construct() vs Object.create()\n\nPrior to the introduction of `Reflect`, objects could be constructed using\nan arbitrary combination of constructor and prototype by using\n[`Object.create()`](../../globals/Object/create.mdx).\n\n```js\nfunction OneClass() {\n  this.name = \"one\";\n}\n\nfunction OtherClass() {\n  this.name = \"other\";\n}\n\n// Calling this:\nconst obj1 = Reflect.construct(OneClass, args, OtherClass);\n\n// ...has the same result as this:\nconst obj2 = Object.create(OtherClass.prototype);\nOneClass.apply(obj2, args);\n\nconsole.log(obj1.name); // 'one'\nconsole.log(obj2.name); // 'one'\n\nconsole.log(obj1 instanceof OneClass); // false\nconsole.log(obj2 instanceof OneClass); // false\n\nconsole.log(obj1 instanceof OtherClass); // true\nconsole.log(obj2 instanceof OtherClass); // true\n\n// Another example to demonstrate below:\n\nfunction func1(a, b, c, d) {\n  console.log(arguments[3]);\n}\n\nfunction func2(d, e, f, g) {\n  console.log(arguments[3]);\n}\n\nconst obj1 = Reflect.construct(func1, [\"I\", \"Love\", \"my\", \"country\"]);\n```\n\nHowever, while the end result is the same, there is one important difference in the\nprocess. When using `Object.create()` and\n[`Function.prototype.apply()`](../../globals/Function/prototype/apply.mdx), the `new.target` operator will\npoint to `undefined` within the function used as the constructor, since the\n`new` keyword is not being used to create the object.\n\nWhen invoking `Reflect.construct()`, on the other hand, the\n`new.target` operator will point to the `newTarget`\nparameter if supplied, or `target` if not.\n\n```js\nfunction OneClass() {\n  console.log(\"OneClass\");\n  console.log(new.target);\n}\nfunction OtherClass() {\n  console.log(\"OtherClass\");\n  console.log(new.target);\n}\n\nconst obj1 = Reflect.construct(OneClass, args);\n// Logs:\n// OneClass\n// function OneClass { ... }\n\nconst obj2 = Reflect.construct(OneClass, args, OtherClass);\n// Logs:\n// OneClass\n// function OtherClass { ... }\n\nconst obj3 = Object.create(OtherClass.prototype);\nOneClass.apply(obj3, args);\n// Logs:\n// OneClass\n// undefined\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Reflect/defineProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.defineProperty()\n\nThe static **`Reflect.defineProperty()`** method is like\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx) but returns a `Boolean`.\n\n## Syntax\n\n```js\nReflect.defineProperty(target, propertyKey, attributes)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to define the property.\n- `propertyKey`\n  - : The name of the property to be defined or modified.\n- `attributes`\n  - : The attributes for the property being defined or modified.\n\n### Return value\n\nA `Boolean` indicating whether or not the property was successfully\ndefined.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.defineProperty` method allows precise addition to or\nmodification of a property on an object. For more details, see the\n[`Object.defineProperty`](../../globals/Object/defineProperty.mdx) which is similar.\n\n> **Note:** `Object.defineProperty` returns the\n> object or throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the property has not been successfully\n> defined. `Reflect.defineProperty`, however, returns a `Boolean`\n> indicating whether or not the property was successfully defined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Reflect/deleteProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.deleteProperty()\n\nThe static\n**`Reflect.deleteProperty()`**\nmethod allows to delete properties. It is like the\n[`delete` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete)\nas a function.\n\n## Syntax\n\n```js\nReflect.deleteProperty(target, propertyKey)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to delete the property.\n- `propertyKey`\n  - : The name of the property to be deleted.\n\n### Return value\n\nA `Boolean` indicating whether or not the property was successfully\ndeleted.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.deleteProperty` method allows you to delete a property on an\nobject. It returns a `Boolean` indicating whether or not the property was\nsuccessfully deleted. It is almost identical to the non-strict\n[`delete` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Reflect/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.get()\n\nThe static **`Reflect.get()`** method works like getting a\nproperty from an object (`target[propertyKey]`) as a function.\n\n## Syntax\n\n```js\nReflect.get(target, propertyKey)\nReflect.get(target, propertyKey, receiver)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to get the property.\n- `propertyKey`\n  - : The name of the property to get.\n- `receiver` _**optional**_\n  - : The value of `this` provided for the call to\n    `target` if a getter is encountered. When used with\n    `Proxy`, it can be an object that inherits from\n    `target`.\n\n### Return value\n\nThe value of the property.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.get` method allows you to get a property on an object. It is like the\n[property accessor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Property_Accessors) syntax as a function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Reflect/getOwnPropertyDescriptor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.getOwnPropertyDescriptor()\n\nThe static\n**`Reflect.getOwnPropertyDescriptor()`** method is similar to\n[`Object.getOwnPropertyDescriptor()`](../../globals/Object/getOwnPropertyDescriptor.mdx). It returns a property descriptor of\nthe given property if it exists on the object, `undefined`\notherwise.\n\n\n\n## Syntax\n\n```js\nReflect.getOwnPropertyDescriptor(target, propertyKey)\n```\n\n### Parameters\n\n- `target`\n  - : The target object in which to look for the property.\n- `propertyKey`\n  - : The name of the property to get an own property descriptor for.\n\n### Return value\n\nA property descriptor object if the property exists in `target`\nobject; otherwise, [`undefined`](../../globals/undefined.mdx).\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.getOwnPropertyDescriptor` method returns a property descriptor\nof the given property if it exists in the `target` object,\n[`undefined`](../../globals/undefined.mdx) otherwise. The only difference to\n[`Object.getOwnPropertyDescriptor()`](../../globals/Object/getOwnPropertyDescriptor.mdx) is how non-object targets are handled.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Reflect/getPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.getPrototypeOf()\n\nThe static **`Reflect.getPrototypeOf()`** method is almost the\nsame method as [`Object.getPrototypeOf()`](../../globals/Object/getPrototypeOf.mdx). It returns the prototype (i.e. the\nvalue of the internal `[[Prototype]]` property) of the specified object.\n\n\n\n## Syntax\n\n```js\nReflect.getPrototypeOf(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object of which to get the prototype.\n\n### Return value\n\nThe prototype of the given object. If there are no inherited properties,\n[`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) is returned.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.getPrototypeOf` method returns the prototype (i.e. the value of\nthe internal `[[Prototype]]` property) of the specified object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Reflect/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.has()\n\nThe static **`Reflect.has()`** method works like the [`in` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/in)\nas a function.\n\n## Syntax\n\n```js\nReflect.has(target, propertyKey)\n```\n\n### Parameters\n\n- `target`\n  - : The target object in which to look for the property.\n- `propertyKey`\n  - : The name of the property to check.\n\n### Return value\n\nA `Boolean` indicating whether or not the `target`\nhas the property.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.has` method allows you to check if a property is in an object.\nIt works like the [`in` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/in)\nas a function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Reflect/isExtensible.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.isExtensible()\n\nThe static **`Reflect.isExtensible()`** method determines if an object is extensible (whether it can have new properties added to it). It is similar to [`Object.isExtensible()`](../../globals/Object/isExtensible.mdx), but with [some differences](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/isExtensible#difference_with_object.isextensible).\n\n## Syntax\n\n```js\nReflect.isExtensible(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object which to check if it is extensible.\n\n### Return value\n\nA `Boolean` indicating whether or not the target is extensible.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Reflect/ownKeys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.ownKeys()\n\nThe static **`Reflect.ownKeys()`** method returns an array of\nthe `target` object's own property keys.\n\n## Syntax\n\n```js\nReflect.ownKeys(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object from which to get the own keys.\n\n### Return value\n\nAn `Array` of the `target` object's own property\nkeys.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.ownKeys` method returns an array of the\n`target` object's own property keys. Its return value is\nequivalent to `Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target))`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Reflect/preventExtensions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.preventExtensions()\n\nThe static **`Reflect.preventExtensions()`** method prevents new properties from ever being added to an object (i.e., prevents future extensions to the object). It is similar to [`Object.preventExtensions()`](../../globals/Object/preventExtensions.mdx), but with [some differences](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/preventExtensions#difference_with_object.preventextensions).\n\n## Syntax\n\n```js\nReflect.preventExtensions(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to prevent extensions.\n\n### Return value\n\nA `Boolean` indicating whether or not the target was successfully set to prevent extensions.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Reflect/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.set()\n\nThe static **`Reflect.set()`** method works like setting a\nproperty on an object.\n\n## Syntax\n\n```js\nReflect.set(target, propertyKey, value)\nReflect.set(target, propertyKey, value, receiver)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to set the property.\n- `propertyKey`\n  - : The name of the property to set.\n- `value`\n  - : The value to set.\n- `receiver` _**optional**_\n  - : The value of `this` provided for the call to the setter for `propertyKey` on `target`. If provided and `target` does not have a setter for `propertyKey`, the property will be set on `receiver` instead.\n\n### Return value\n\nA `Boolean` indicating whether or not setting the property was successful.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.set` method allows you to set a property on an object. It does\nproperty assignment and is like the\n[property accessor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Property_Accessors) syntax as a function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Reflect/setPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.setPrototypeOf()\n\nThe static\n**`Reflect.setPrototypeOf()`** method is the same method as\n[`Object.setPrototypeOf()`](../../globals/Object/setPrototypeOf.mdx), except for its return type. It sets the\nprototype (i.e., the internal `[[Prototype]]` property) of a specified\nobject to another object or to [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null), and returns `true` if\nthe operation was successful, or `false` otherwise.\n\n## Syntax\n\n```js\nReflect.setPrototypeOf(target, prototype)\n```\n\n### Parameters\n\n- `target`\n  - : The target object of which to set the prototype.\n- `prototype`\n  - : The object's new prototype (an object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null)).\n\n### Return value\n\nA `Boolean` indicating whether or not the prototype was successfully set.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object` or if `prototype` is neither an object nor\n[`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null).\n\n## Description\n\nThe `Reflect.setPrototypeOf` method changes the prototype (i.e. the value of\nthe internal `[[Prototype]]` property) of the specified object.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Request/Request.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request()\n\nThe **`Request()`** constructor creates a new\n`Request` object.\n\n## Syntax\n\n```js\nnew Request(input)\nnew Request(input, options)\n```\n\n### Parameters\n\n- `input`\n\n  - : Defines the resource that you wish to fetch. This can either be:\n\n    - A string containing the direct URL of the resource you want to\n      fetch.\n    - A `Request` object, effectively creating a copy.\n\n- `options` _**optional**_\n\n  - : An object containing any custom settings that you want to apply to the\n    request. The possible options are:\n\n    - `method`\n      - : The request method, e.g., `GET`, `POST`. The default is `GET`.\n    - `headers`\n      - : Any headers you want to add to your request, contained\n        within a `Headers` object or an object literal with `String` values.\n    - `body`\n      - : Any body that you want to add to your request: this can be an `ArrayBuffer`, a `TypedArray`, a `DataView`, a `URLSearchParams`, string object or literal, a `ReadableStream` object, a [`Blob`](../../globals/Blob/Blob.mdx) object, or a [`FormData`](../../globals/FormData/FormData.mdx) object.\n    - `backend` _**Fastly-specific**_\n    - `cacheOverride` _**Fastly-specific**_, see [`CacheOverride`](../../fastly:cache-override/CacheOverride/CacheOverride.mdx).\n    - `cacheKey` _**Fastly-specific**_\n    - `manualFramingHeaders`_: boolean_ _**optional**_ _**Fastly-specific**_\n      - : The default value is `false`, which means that the framing headers are automatically created based on the message body.\n        In \"automatic\" mode, a `Content-Length` is used when the size of the body can be determined before it is sent.\n        Requests sent in streaming mode, where headers are sent immediately but the content of the body is streamed later, will receive a `Transfer-Encoding: chunked` to accommodate the dynamic generation of the body.\n        In \"manual\" mode, any `Content-Length` or `Transfer-Encoding` headers will be honored.\n        You must ensure that those headers have correct values permitted by the [HTTP/1.1 specification](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).\n        If the provided headers are not permitted by the specification, the headers will revert to \"automatic\" mode and a diagnostic message will be logged about what was wrong.\n        If a `Content-Length` is permitted by the specification, but the value does not match the size of the actual body, the body will either be truncated (if it is too long), or the connection will be hung up early (if it is too short).\n    - `fastly` _**Fastly-specific**_\n      - `decompressGzip`_: boolean_ _**optional**_\n        - Whether to automatically gzip decompress the Response or not."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Request/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the `Request` interface\nreads the request body and returns it as a promise that resolves with an `ArrayBuffer`.\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an `ArrayBuffer`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Request/prototype/blob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.blob()\n\nThe **`blob()`** method of the `Request` interface reads the request body and returns it as a promise that resolves with a `Blob`.\n\n## Syntax\n\n```js\nblob()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a [`Blob`](../../../globals/Blob/Blob.mdx).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the request body has already been used or if the request's method is `GET` or `HEAD`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Request/prototype/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.body\n\nThe read-only **`body`** property of the `Request`\ninterface contains a `ReadableStream` with the body contents\nthat have been added to the request. Note that a request using the\n`GET` or `HEAD` method cannot have a body\nand `null` is returned in these cases.\n\n## Value\n\nA `ReadableStream` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Request/prototype/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.bodyUsed\n\nThe read-only **`bodyUsed`** property of the\n`Request` interface is a boolean value that indicates\nwhether the request body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Request/prototype/clone.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.clone()\n\nThe **`clone()`** method of the `Request` interface creates a copy of the current `Request` object.\n\nLike the underlying `ReadableStream.tee`` api, the `body` of a cloned `Response`\nwill signal backpressure at the rate of the _faster_ consumer of the two bodies,\nand unread data is enqueued internally on the slower consumed `body`\nwithout any limit or backpressure.\nBeware when you construct a `Request` from a stream and then `clone` it.\n\n`clone()` throws a `TypeError` if the request body has already been used. In fact, the main reason `clone()` exists is to allow multiple uses of body objects (when they are one-use only.)\n\nIf you intend to modify the request, you may prefer the `Request` constructor.\n\n## Syntax\n\n```js\nclone()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Request` object, which is an exact copy of the `Request` that `clone()` was called on.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Request/prototype/formData.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.formData()\n\nThe **`formData()`** method of the `Request` interface reads the request body and returns it as a promise that resolves with a `FormData` object.\n\n## Syntax\n\n```js\nformData()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a [`FormData`](../../../globals/FormData/FormData.mdx) object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the request body has already been used or if the request's method is `GET` or `HEAD`.\n- `SyntaxError`\n  - : Thrown if the request's content type is not `multipart/form-data` or `application/x-www-form-urlencoded`, or if the content cannot be parsed as form data.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Request/prototype/headers.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.headers\n\nThe **`headers`** read-only property of the\n`Request` interface contains the `Headers` object associated\nwith the request.\n\n## Value\n\nA `Headers` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Request/prototype/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.json()\n\nThe **`json()`** method of the `Request` interface\nreads the request body and returns it as a promise that resolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a JavaScript object. This object could be\nanything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Request/prototype/method.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.method\n\nThe **`method`** read-only property of the\n`Request` interface contains the request's method (`GET`, `POST`, etc.)\n\n## Value\n\nA `String` indicating the method of the request.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Request/prototype/setManualFramingHeaders.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.setManualFramingHeaders()\n\nThe **`setManualFramingHeaders()`** method of the `Request` interface controls how the framing headers should be determined.\n\nBy default the framing headers are set to \"automatic\" mode, which means they are created based on the body of the associated Request instance.\nIn \"automatic\" mode, a `Content-Length` is used when the size of the body can be determined before it is sent.\nRequests sent in streaming mode, where headers are sent immediately but the content of the body is streamed later, will receive a `Transfer-Encoding: chunked` to accommodate the dynamic generation of the body.\nIn \"manual\" mode, any `Content-Length` or `Transfer-Encoding` headers will be honored.\nYou must ensure that those headers have correct values permitted by the [HTTP/1.1 specification](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).\nIf the provided headers are not permitted by the specification, the headers will revert to \"automatic\" mode and a diagnostic message will be logged about what was wrong.\nIf a `Content-Length` is permitted by the specification, but the value does not match the size of the actual body, the body will either be truncated (if it is too long), or the connection will be hung up early (if it is too short).\n\n## Syntax\n\n## Syntax\n\n```js\nsetManualFramingHeaders(manual)\n```\n\n### Parameters\n\n- `manual` _: boolean_\n  - : Whether or not to use \"manual\" mode for the framing headers.\n\n### Return value\n\n`undefined`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Request/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.text()\n\nThe **`text()`** method of the `Request` interface\nreads the request body and returns it as a promise that resolves with a `String`.\nThe response is _always_ decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Promise that resolves with a `String`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Request/prototype/url.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.url\n\nThe **`url`** read-only property of the `Request` interface contains the URL of the request.\n\n## Value\n\nA string indicating the URL of the request.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Response/Response.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response()\n\nThe **`Response()`** constructor creates a new `Response` object.\n\n## Syntax\n\n```js\nnew Response()\nnew Response(body)\nnew Response(body, options)\n```\n\n### Parameters\n\n- `body` _**optional**_\n\n  - : An object defining a body for the response. This can be `null` (which is\n    the default value), or one of:\n\n    - [`ArrayBuffer`](../../globals/ArrayBuffer/ArrayBuffer.mdx)\n    - `TypedArray`\n    - [`DataView`](../../globals/DataView/DataView.mdx)\n    - [`ReadableStream`](../../globals/ReadableStream/ReadableStream.mdx)\n    - [`URLSearchParams`](../../globals/URLSearchParams/URLSearchParams.mdx)\n    - [`String`](../../globals/String/String.mdx)\n    - string literal\n    - [`Blob`](../../globals/Blob/Blob.mdx)\n    - [`FormData`](../../globals/FormData/FormData.mdx)\n\n- `options` _**optional**_\n\n  - : An options object containing any custom settings that you want to apply to the\n    response, or an empty object (which is the default value). The possible options are:\n\n    - `status`\n      - : The status code for the response, e.g., `200`.\n    - `statusText`\n      - : The status message associated with the status code,\n        e.g., `OK`.\n    - `headers`\n      - : Any headers you want to add to your response, contained\n        within a [`Headers`](../../globals/Headers/Headers.mdx) object or object literal of\n        [`String`](../../globals/String/String.mdx) key/value pairs.\n    - `manualFramingHeaders`_: boolean_ _**optional**_ _**Fastly-specific**_\n      - : The default value is `false`, which means that the framing headers are automatically created based on the message body.\n        In \"automatic\" mode, a `Content-Length` is used when the size of the body can be determined before it is sent.\n        Responses sent in streaming mode, where headers are sent immediately but the content of the body is streamed later, will receive a `Transfer-Encoding: chunked` to accommodate the dynamic generation of the body.\n        In \"manual\" mode, any `Content-Length` or `Transfer-Encoding` headers will be honored.\n        You must ensure that those headers have correct values permitted by the [HTTP/1.1 specification](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).\n        If the provided headers are not permitted by the specification, the headers will revert to \"automatic\" mode and a diagnostic message will be logged about what was wrong.\n        If a `Content-Length` is permitted by the specification, but the value does not match the size of the actual body, the body will either be truncated (if it is too long), or the connection will be hung up early (if it is too short).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Response/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface\ntakes a [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion. It returns a promise\nthat resolves with an [`ArrayBuffer`](../../../globals/ArrayBuffer/ArrayBuffer.mdx).\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an [`ArrayBuffer`](../../../globals/ArrayBuffer/ArrayBuffer.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Response/prototype/blob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.blob()\n\nThe **`blob()`** method of the [`Response`](../Response.mdx) interface takes a [`Response`](../Response.mdx) stream and reads it to completion. It returns a promise that resolves with a `Blob`.\n\n## Syntax\n\n```js\nblob()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a [`Blob`](../../../globals/Blob/Blob.mdx).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the response body has already been consumed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Response/prototype/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.body\n\nThe **`body`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface is a [`ReadableStream`](../../../globals/ReadableStream/ReadableStream.mdx) of the body contents.\n\n## Value\n\nA [`ReadableStream`](../../../globals/ReadableStream/ReadableStream.mdx), or else `null` for any `Response` object [constructed](../../../globals/Response/Response.mdx) with a null `body` property, or for any actual HTTP response that has no body.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Response/prototype/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.bodyUsed\n\nThe **`bodyUsed`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface is a boolean value that indicates whether the body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Response/prototype/formData.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.formData()\n\nThe **`formData()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface takes a [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion. It returns a promise that resolves with a `FormData` object.\n\n## Syntax\n\n```js\nformData()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a [`FormData`](../../../globals/FormData/FormData.mdx) object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the response body has already been consumed.\n- `SyntaxError`\n  - : Thrown if the response's content type is not `multipart/form-data` or `application/x-www-form-urlencoded`, or if the content cannot be parsed as form data.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Response/prototype/headers.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.headers\n\nThe **`headers`** read-only property of the\n[`Response`](../../../globals/Response/Response.mdx) interface contains the [`Headers`](../../../globals/Headers/Headers.mdx) object associated\nwith the response.\n\n## Value\n\nA [`Headers`](../../Headers/Headers.mdx) object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Response/prototype/ip.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.ip\n\nThe **`ip`** getter of the `Response` interface returns the IP address associated with the request, as either an IPv6 or IPv4 string.\n\nIn the case where no IP address is available (say the response is cached, or was manually created), `undefined` will be returned.\n\nTo ensure an origin request with an IP, pass a [`CacheOverride`](../../../fastly:cache-override/CacheOverride/CacheOverride.mdx) value.\n\n## Value\n\n`undefined` or `string`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Response/prototype/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.json()\n\nThe **`json()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface takes\na [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion. It returns a promise which\nresolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA [`Promise`](../../../globals/Promise/Promise.mdx) that resolves to a JavaScript object. This object could be\nanything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Response/prototype/ok.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.ok\n\nThe **`ok`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains a Boolean stating whether the response was successful (status in the range 200-299) or not.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Response/prototype/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.port\n\nThe **`port`** getter of the `Response` interface returns the port associated with the request, as a number.\n\nIn the case where no port is available (say the response is cached, or was manually created), `undefined` will be returned.\n\nTo ensure an origin request with a port, pass a [`CacheOverride`](../../../fastly:cache-override/CacheOverride/CacheOverride.mdx) value.\n\n## Value\n\n`undefined` or `number`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Response/prototype/setManualFramingHeaders.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.setManualFramingHeaders()\n\nThe **`setManualFramingHeaders()`** method of the `Response` interface controls how the framing headers should be determined.\n\nBy default the framing headers are set to \"automatic\" mode, which means they are created based on the body of the associated Response instance.\nIn \"automatic\" mode, a `Content-Length` is used when the size of the body can be determined before it is sent.\nResponses sent in streaming mode, where headers are sent immediately but the content of the body is streamed later, will receive a `Transfer-Encoding: chunked` to accommodate the dynamic generation of the body.\nIn \"manual\" mode, any `Content-Length` or `Transfer-Encoding` headers will be honored.\nYou must ensure that those headers have correct values permitted by the [HTTP/1.1 specification](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).\nIf the provided headers are not permitted by the specification, the headers will revert to \"automatic\" mode and a diagnostic message will be logged about what was wrong.\nIf a `Content-Length` is permitted by the specification, but the value does not match the size of the actual body, the body will either be truncated (if it is too long), or the connection will be hung up early (if it is too short).\n\n## Syntax\n\n```js\nsetManualFramingHeaders(manual)\n```\n\n### Parameters\n\n- `manual` _: boolean_\n  - : Whether or not to use \"manual\" mode for the framing headers.\n\n### Return value\n\n`undefined`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Response/prototype/status.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.status\n\nThe **`status`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains the HTTP status code of the response.\n\nFor example, `200` for success, `404` if the resource could not be found.\n\n## Value\n\nAn unsigned short number.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Response/prototype/statusText.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.statusText\n\nThe **`statusText`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains the status message corresponding to the HTTP status code in [`status`](../../../globals/Response/prototype/status.mdx).\n\nFor example, this would be `OK` for a status code `200`, `Continue` for `100`, `Not Found` for `404`.\n\n## Value\n\nA [`String`](../../../globals/String/String.mdx) containing the HTTP status message associated with the response.\nThe default value is \"\".\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Response/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.text()\n\nThe **`text()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface takes a [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion.\nIt returns a promise that resolves with a [`String`](../../../globals/String/String.mdx).\nThe response is _always_ decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Promise that resolves with a [`String`](../../../globals/String/String.mdx).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Response/prototype/url.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.url\n\nThe **`url`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains the URL of the response.\nThe value of the `url` property will be the final URL obtained after any redirects.\n\n## Value\n\nA string.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Response/redirect.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Response.redirect()\n\nThe **`redirect()`** static method of the `Response` interface returns a `Response` resulting in a redirect to the specified URL.\n\n## Syntax\n\n```js\nResponse.redirect(url)\nResponse.redirect(url, status)\n```\n\n### Parameters\n\n- `url`\n  - : The URL that the new response is to originate from.\n- `status` __optional__\n  - : An optional status code for the response (e.g., `302`.)\n\n### Return value\n\nA `Response` object.\n\n### Exceptions\n\n- `RangeError`\n  - : The specified status is not a redirect status.\n- `TypeError`\n  - : The specified URL is invalid.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/RsaHashedImportParams/RsaHashedImportParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RsaHashedImportParams\n\nThe **`RsaHashedImportParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.importKey()`, when importing any RSA-based key pair.\n\n## Instance properties\n\n- `name`\n  - : A string. This should be set to `RSASSA-PKCS1-v1_5`.\n\n- `hash`\n  - : A string representing the name of the digest function to use. This can be one of `SHA-256`, `SHA-384`, or `SHA-512`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Set/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get Set\\[Symbol.species]\n\nThe **`Set[Symbol.species]`** accessor property is an unused accessor property specifying how to copy `Set` objects.\n\n## Syntax\n\n```js\nSet[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct copied `Set` instances.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `Set` objects. Subclass constructors may override it to change the constructor assignment.\n\n> **Note:** This property is currently unused by all `Set` methods.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Set/Set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set()\n\nThe **`Set` constructor** lets you\ncreate `Set` objects that store unique values of any type, whether [primitive values](https://developer.mozilla.org/docs/Glossary/Primitive) or object\nreferences.\n\n## Syntax\n\n```js\nnew Set()\nnew Set(iterable)\n```\n\n> **Note:** `Set()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable` _**optional**_\n\n  - : If an [iterable object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) is passed, all of its elements will be added to the new\n    `Set`.\n\n    If you don't specify this parameter, or its value is `null`, the new\n    `Set` is empty.\n\n### Return value\n\nA new `Set` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Set/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype\\[Symbol.iterator]()\n\nThe **`[Symbol.iterator`** method of a `Set` object implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows sets to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the values of the set.\n\nThe initial value of this property is the same function object as the initial value of the [`Set.prototype.values`](../../../globals/Set/prototype/values.mdx) property.\n\n## Syntax\n\n```js\nset[Symbol.iterator]()\n```\n\n### Return value\n\nThe same return value as [`Set.prototype.values()`](../../../globals/Set/prototype/values.mdx): a new iterable iterator object that yields the values of the set.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Set/prototype/add.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.add()\n\nThe **`add()`** method inserts a new element with a specified value in to a `Set` object, if there isn't an element with the same value already in the `Set`.\n\n## Syntax\n\n```js\nadd(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value of the element to add to the `Set` object.\n\n### Return value\n\nThe `Set` object with added value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Set/prototype/clear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.clear()\n\nThe **`clear()`** method removes all elements from a\n`Set` object.\n\n## Syntax\n\n```js\nclear()\n```\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Set/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.delete()\n\nThe **`delete()`** method removes a specified value from a\n`Set` object, if it is in the set.\n\n## Syntax\n\n```js\ndelete(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to remove from `Set`.\n\n### Return value\n\nReturns `true` if `value` was already in\n`Set`; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Set/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.entries()\n\nThe **`entries()`** method returns a new [Iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators) object\nthat contains **an array of `[value, value]`** for each element\nin the `Set` object, in insertion order. For `Set` objects there\nis no `key` like in `Map` objects. However, to keep the API\nsimilar to the `Map` object, each _entry_ has the same value for its\n_key_ and _value_ here, so that an array `[value, value]` is\nreturned.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nA new iterator object that contains an array of `[value, value]` for each\nelement in the given `Set`, in insertion order.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Set/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.forEach()\n\nThe **`forEach()`** method executes a provided function once\nfor each value in the `Set` object, in insertion order.\n\n## Syntax\n\n```js\n// Arrow function\nforEach(() => { /* ... */ } )\nforEach((value) => { /* ... */ } )\nforEach((value, key) => { /* ... */ } )\nforEach((value, key, set) => { /* ... */ } )\n\n// Callback function\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n\n// Inline callback function\nforEach(function() { /* ... */ })\nforEach(function(value) { /* ... */ })\nforEach(function(value, key) { /* ... */ })\nforEach(function(value, key, set) { /* ... */ })\nforEach(function(value, key, set) { /* ... */ }, thisArg)\n```\n\n### Parameters\n\n- `callback`\n\n  - : Function to execute for each element, taking three arguments:\n\n    - `value`, `key`\n      - : The current element being processed in the `Set`. As there are no\n        keys in `Set`, the value is passed for both arguments.\n    - `set`\n      - : The `Set` object which `forEach()` was called upon.\n\n- `thisArg`\n  - : Value to use as `this` when executing `callbackFn`.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n## Description\n\nThe `forEach()` method executes the provided\n`callback` once for each value which actually exists in the\n`Set` object. It is not invoked for values which have been deleted. However,\nit is executed for values which are present but have the value `undefined`.\n\n`callback` is invoked with **three arguments**:\n\n- the **element value**\n- the **element key**\n- the **`Set` object being traversed**\n\nThere are no keys in `Set` objects, however, so the first two arguments are\nboth **values** contained in the [Set](../../../globals/Set/Set.mdx). This is to make it\nconsistent with other `forEach()` methods for [`Map.prototype.forEach()`](../../../globals/Map/prototype/forEach.mdx) and [`Array.prototype.forEach()`](../../../globals/Array/prototype/forEach.mdx).\n\nIf a `thisArg` parameter is provided to `forEach()`,\nit will be passed to `callback` when invoked, for use as its\n`this` value. Otherwise, the value `undefined` will be passed for\nuse as its `this` value. The `this` value ultimately observable by\n`callback` is determined according to\n[the usual rules for determining the `this` seen by a function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this).\n\nEach value is visited once, except in the case when it was deleted and re-added before\n`forEach()` has finished. `callback` is not invoked for\nvalues deleted before being visited. New values added before `forEach()` has\nfinished will be visited.\n\n`forEach()` executes the `callback` function once for\neach element in the `Set` object; it does not return a value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Set/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.has()\n\nThe **`has()`** method returns a boolean indicating whether an\nelement with the specified value exists in a `Set` object or not.\n\n## Syntax\n\n```js\nhas(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to test for presence in the `Set` object.\n\n### Return value\n\nReturns `true` if an element with the specified value exists in the `Set` object; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Set/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.keys()\n\nThe **`keys()`** method is an alias for the [`values()`](../../../globals/Set/prototype/values.mdx) method.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nA new iterator object containing the values for each element in the given\n`Set`, in insertion order.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Set/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.size\n\nThe **`size`** accessor property returns the number of (unique) elements in a [Set](../../../globals/Set/Set.mdx) object.\n\n## Description\n\nThe value of `size` is an integer representing how many entries the `Set` object has. A set accessor function for `size` is `undefined`; you cannot change this property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Set/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.values()\n\nThe **`values()`** method returns a new [Iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators) object that\ncontains the values for each element in the `Set` object in insertion order.\n\n> **Note:** The **`keys()`** method is an alias\n> for this method (for similarity with [Map](../../../globals/Map/Map.mdx) objects), hence the\n> `keys()` page redirecting here. It behaves exactly the same and returns\n> **values** of `Set` elements.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nA new iterator object containing the values for each element in the given\n`Set`, in insertion order.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/String/String.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String() constructor\n\nThe **`String`** constructor is used to create a new\n`String` object. When called instead as a function, it performs type\nconversion to a \"primitive string\" which is usually more\nuseful.\n\n## Syntax\n\n```js\nnew String(thing)\nString(thing)\n```\n\n> **Note:** `String()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\n- `thing`\n  - : Anything to be converted to a string.\n\n### Return value\n\nWhen `String` is called as a constructor (with `new`), it creates a `String` object, which is **not** a primitive.\n\nWhen `String` is called as a function, it coerces the parameter to a string primitive. `Symbol` values would be converted to `\"Symbol(description)\"`, where `description` is the [description](../../globals/Symbol/prototype/description.mdx) of the Symbol, instead of throwing.\n\n> **Warning:** You should rarely find yourself using `String` as a constructor.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/String/fromCharCode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.fromCharCode()\n\nThe static **`String.fromCharCode()`** method returns a string\ncreated from the specified sequence of UTF-16 code units.\n\n## Syntax\n\n```js\nString.fromCharCode(num1)\nString.fromCharCode(num1, num2)\nString.fromCharCode(num1, num2, /* …, */ numN)\n```\n\n### Parameters\n\n- `num1, ..., numN`\n  - : A sequence of numbers that are UTF-16 code units. The range is between\n    `0` and `65535` (`0xFFFF`). Numbers greater than\n    `0xFFFF` are truncated. No validity checks are performed.\n\n### Return value\n\nA string of length `N` consisting of the\n`N` specified UTF-16 code units.\n\n## Description\n\nThis method returns a string and not a `String` object.\n\nBecause `fromCharCode()` is a static method of `String`, you\nalways use it as `String.fromCharCode()`, rather than as a method of a\n`String` object you created.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/String/fromCodePoint.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.fromCodePoint()\n\nThe static **`String.fromCodePoint()`** method returns a string\ncreated by using the specified sequence of code points.\n\n## Syntax\n\n```js\nString.fromCodePoint(num1)\nString.fromCodePoint(num1, num2)\nString.fromCodePoint(num1, num2, /* …, */ numN)\n```\n\n### Parameters\n\n- `num1, ..., numN`\n  - : A sequence of code points.\n\n### Return value\n\nA string created by using the specified sequence of code points.\n\n### Exceptions\n\n- A `RangeError` is thrown if an invalid Unicode\n  code point is given (e.g. `\"RangeError: NaN is not a valid code point\"`).\n\n## Description\n\nThis method returns a string (and _not_ a `String` object).\n\nBecause `fromCodePoint()` is a static method of `String`, you\nmust call it as `String.fromCodePoint()`, rather than as a method of a\n`String` object you created.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/String/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype\\[Symbol.iterator]()\n\nThe **`Symbol.iterator`** method of a string implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows strings to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the Unicode code points of the string value as individual strings.\n\n## Syntax\n\n```js\nstring[Symbol.iterator]()\n```\n\n### Return value\n\nA new iterable iterator object that yields the Unicode code points of the string value as individual strings.\n\n## Description\n\nStrings are iterated by Unicode code points. This means grapheme clusters will be split, but surrogate pairs will be preserved.\n\n```js\n// \"Backhand Index Pointing Right: Dark Skin Tone\"\n[...\"👉🏿\"]; // ['👉', '🏿']\n// splits into the basic \"Backhand Index Pointing Right\" emoji and\n// the \"Dark skin tone\" emoji\n\n// \"Family: Man, Boy\"\n[...\"👨‍👦\"]; // [ '👨', '‍', '👦' ]\n// splits into the \"Man\" and \"Boy\" emoji, joined by a ZWJ\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/String/prototype/at.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.at()\n\nThe **`at()`** method takes an integer value and returns a `('String` consisting of the single UTF-16 code unit located at the specified offset. This method allows for positive and negative integers. Negative integers count back from the last string character.\n\n## Syntax\n\n```js\nat(index)\n```\n\n### Parameters\n\n- `index`\n  - : The index (position) of the string character to be returned. Supports relative indexing from the end of the string when passed a negative index; i.e. if a negative number is used, the character returned will be found by counting back from the end of the string.\n\n### Return value\n\n`('String` consisting of the single UTF-16 code unit located at the specified position. Returns [`undefined`](../../../globals/undefined.mdx) if the given index can not be found.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/String/prototype/charAt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.charAt()\n\nThe `String` object's\n**`charAt()`** method returns a new string consisting of the\nsingle UTF-16 code unit located at the specified offset into the string.\n\n## Syntax\n\n```js\ncharAt(index)\n```\n\n### Parameters\n\n- `index`\n  - : An integer between `0` and `str.length - 1`. If the\n    `index` cannot be converted to the integer or no\n    `index` is provided, the default is `0`, so the first\n    character of `str` is returned.\n\n### Return value\n\nA string representing the character (exactly one UTF-16 code unit) at the specified\n`index`. If `index` is out of range,\n`charAt()` returns an empty string.\n\n## Description\n\nCharacters in a string are indexed from left to right. The index of the first character\nis `0`, and the index of the last character—in a string called\n`stringName` is `stringName.length - 1`. If\nthe `index` you supply is out of this range, JavaScript returns an\nempty string.\n\nIf no `index` is provided to `charAt()`, the default\nis `0`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/String/prototype/charCodeAt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.charCodeAt()\n\nThe **`charCodeAt()`** method returns\nan integer between `0` and `65535` representing the UTF-16 code\nunit at the given index.\n\nThe UTF-16 code unit matches the Unicode code point for code points which can be\nrepresented in a single UTF-16 code unit. If the Unicode code point cannot be\nrepresented in a single UTF-16 code unit (because its value is greater than\n`0xFFFF`) then the code unit returned will be _the first part of a\nsurrogate pair_ for the code point. If you want the entire code point value, use\n[`codePointAt()`](../../../globals/String/prototype/codePointAt.mdx).\n\n## Syntax\n\n```js\ncharCodeAt(index)\n```\n\n### Parameters\n\n- `index`\n  - : An integer greater than or equal to `0` and less than the\n    `length` of the string. If `index` is not a number,\n    it defaults to `0`.\n\n### Return value\n\nA number representing the UTF-16 code unit value of the character at the given\n`index`. If `index` is out of range,\n`charCodeAt()` returns `NaN`.\n\n## Description\n\nUnicode code points range from `0` to `1114111`\n(`0x10FFFF`). The first 128 Unicode code points are a direct match of the\nASCII character encoding. (For information on Unicode, see [UTF-16 characters, Unicode codepoints, and grapheme clusters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters).)\n\n> **Note:** `charCodeAt()` will always return a value that is\n> less than `65536`. This is because the higher code points are represented\n> by _a pair_ of (lower valued) \"surrogate\" pseudo-characters which are used to\n> comprise the real character.\n>\n> Because of this, in order to examine (or reproduce) the full character for individual\n> character values of `65536` or greater, for such characters, it is\n> necessary to retrieve not only `charCodeAt(i)`, but also\n> `charCodeAt(i+1)` (as if manipulating a string with two\n> letters), or to use `codePointAt(i)` instead. See examples 2 and\n> 3 (below).\n\n`charCodeAt()` returns `NaN` if the given\nindex is less than `0`, or if it is equal to or greater than the\n`length` of the string.\n\nBackward compatibility: In historic versions (like JavaScript 1.2) the\n`charCodeAt()` method returns a number indicating the ISO-Latin-1 codeset\nvalue of the character at the given index. The ISO-Latin-1 codeset ranges from\n`0` to `255`. The first `0` to `127` are a\ndirect match of the ASCII character set.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/String/prototype/codePointAt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.codePointAt()\n\nThe **`codePointAt()`** method returns a non-negative integer\nthat is the Unicode code point value at the given position.\nNote that this function does not give the nth code point in a string,\nbut the code point starting at the specified string index.\n\n## Syntax\n\n```js\ncodePointAt(pos)\n```\n\n### Parameters\n\n- `pos`\n  - : Position of an element in `str` to return the code point value\n    from.\n\n### Return value\n\nA decimal number representing the code point value of the character at the given `pos`.\n\n- If there is no element at `pos`, returns [`undefined`](../../../globals/undefined.mdx).\n- If the element at `pos` is a UTF-16 high surrogate, returns the code point of the surrogate _pair_.\n- If the element at `pos` is a UTF-16 low surrogate, returns _only_ the low surrogate code point.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/String/prototype/concat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.concat()\n\nThe **`concat()`** method concatenates\nthe string arguments to the calling string and returns a new string.\n\n## Syntax\n\n```js\nconcat(str1)\nconcat(str1, str2)\nconcat(str1, str2, /* …, */ strN)\n```\n\n### Parameters\n\n- `strN`\n  - : One or more strings to concatenate to `str`.\n\n### Return value\n\nA new string containing the combined text of the strings provided.\n\n## Description\n\nThe `concat()` function concatenates the string arguments to the calling\nstring and returns a new string. Changes to the original string or the returned string\ndon't affect the other.\n\nIf the arguments are not of the type string, they are converted to string values before\nconcatenating.\n\nThe `concat()` method is very similar to the [addition/string concatenation operators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Addition) (`+`, `+=`), except that `concat()` [coerces its arguments directly to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion), while addition coerces its operands to primitives first. For more information, see the reference page for the [`+` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Addition).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/String/prototype/endsWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.endsWith()\n\nThe **`endsWith()`** method determines whether a string ends with the characters of a specified string, returning `true` or `false` as appropriate.\n\n## Syntax\n\n```js\nendsWith(searchString)\nendsWith(searchString, endPosition)\n```\n\n### Parameters\n\n- `searchString`\n  - : The characters to be searched for at the end of `str`. Cannot be a regex.\n- `endPosition` _**optional**_\n  - : The end position at which `searchString` is expected to be found (the index of `searchString`'s last character plus 1). Defaults to `str.length`.\n\n### Return value\n\n**`true`** if the given characters are found at the end of the string; otherwise, **`false`**.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If `searchString` is a regex.\n\n## Description\n\nThis method lets you determine whether or not a string ends with another string. This method is case-sensitive.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/String/prototype/includes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.includes()\n\nThe **`includes()`** method performs a case-sensitive search to determine whether one string may be found within another string, returning `true` or `false` as appropriate.\n\n## Syntax\n\n```js\nincludes(searchString)\nincludes(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n  - : A string to be searched for within `str`. Cannot be a regex.\n- `position` _**optional**_\n  - : The position within the string at which to begin searching for `searchString`. (Defaults to `0`.)\n\n### Return value\n\n**`true`** if the search string is found anywhere within the given string; otherwise, **`false`** if not.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If `searchString` is a regex.\n\n## Description\n\nThis method lets you determine whether or not a string includes another string.\n\n### Case-sensitivity\n\nThe `includes()` method is case sensitive. For example, the following expression returns `false`:\n\n```js\n\"Blue Whale\".includes(\"blue\"); // returns false\n```\n\nYou can work around this constraint by transforming both the original string and the search string to all lowercase:\n\n```js\n\"Blue Whale\".toLowerCase().includes(\"blue\"); // returns true\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/String/prototype/indexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.indexOf()\n\nThe **`indexOf()`** method, given one argument: a substring to search for, searches the entire calling string, and returns the index of the first occurrence of the specified substring. Given a second argument: a number, the method returns the first occurrence of the specified substring at an index greater than or equal to the specified number.\n\n## Syntax\n\n```js\nindexOf(searchString)\nindexOf(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n\n  - : Substring to search for, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion).\n\n    If the method is called with no arguments, `searchString` is coerced to `\"undefined\"`. Therefore,`\"undefined\".indexOf()` returns `0` — because the substring `\"undefined\"` is found at position `0` in the string `\"undefined\"`. But `\"undefine\".indexOf()`, returns `-1` — because the substring `\"undefined\"` is not found in the string `\"undefine\"`.\n\n- `position` _**optional**_\n\n  - : The method returns the index of the first occurrence of the specified substring at a position greater than or equal to `position`, which defaults to `0`. If `position` is greater than the length of the calling string, the method doesn't search the calling string at all. If `position` is less than zero, the method behaves as it would if `position` were `0`.\n\n    - `'hello world hello'.indexOf('o', -5)` returns `4` — because it causes the method to behave as if the second argument were `0`, and the first occurrence of `o` at a position greater or equal to `0` is at position `4`.\n\n    - `'hello world hello'.indexOf('world', 12)` returns `-1` — because, while it's true the substring `world` occurs at index `6`, that position is not greater than or equal to `12`.\n\n    - `'hello world hello'.indexOf('o', 99)` returns `-1` — because `99` is greater than the length of `hello world hello`, which causes the method to not search the string at all.\n\n### Return value\n\nThe index of the first occurrence of `searchString` found, or `-1` if not found.\n\n#### Return value when using an empty search string\n\nSearching for an empty search string produces strange results. With no second argument, or with a second argument whose value is less than the calling string's length, the return value is the same as the value of the second argument:\n\n```js\n\"hello world\".indexOf(\"\"); // returns 0\n\"hello world\".indexOf(\"\", 0); // returns 0\n\"hello world\".indexOf(\"\", 3); // returns 3\n\"hello world\".indexOf(\"\", 8); // returns 8\n```\n\nHowever, with a second argument whose value is greater than or equal to the string's length, the return value is the string's length:\n\n```js\n\"hello world\".indexOf(\"\", 11); // returns 11\n\"hello world\".indexOf(\"\", 13); // returns 11\n\"hello world\".indexOf(\"\", 22); // returns 11\n```\n\nIn the former instance, the method behaves as if it found an empty string just after the position specified in the second argument. In the latter instance, the method behaves as if it found an empty string at the end of the calling string.\n\n## Description\n\nStrings are zero-indexed: The index of a string's first character is `0`, and the index of a string's last character is the length of the string minus 1.\n\n```js\n\"Blue Whale\".indexOf(\"Blue\"); // returns  0\n\"Blue Whale\".indexOf(\"Blute\"); // returns -1\n\"Blue Whale\".indexOf(\"Whale\", 0); // returns  5\n\"Blue Whale\".indexOf(\"Whale\", 5); // returns  5\n\"Blue Whale\".indexOf(\"Whale\", 7); // returns -1\n\"Blue Whale\".indexOf(\"\"); // returns  0\n\"Blue Whale\".indexOf(\"\", 9); // returns  9\n\"Blue Whale\".indexOf(\"\", 10); // returns 10\n\"Blue Whale\".indexOf(\"\", 11); // returns 10\n```\n\nThe `indexOf()` method is case sensitive. For example, the following\nexpression returns `-1`:\n\n```js\n\"Blue Whale\".indexOf(\"blue\"); // returns -1\n```\n\n### Checking occurrences\n\nWhen checking if a specific substring occurs within a string, the correct way to check is test whether the return value is `-1`:\n\n```js\n\"Blue Whale\".indexOf(\"Blue\") !== -1; // true; found 'Blue' in 'Blue Whale'\n\"Blue Whale\".indexOf(\"Bloe\") !== -1; // false; no 'Bloe' in 'Blue Whale'\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/String/prototype/lastIndexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.lastIndexOf()\n\nThe **`lastIndexOf()`** method, given one argument: a substring to search for, searches the entire calling string, and returns the index of the last occurrence of the specified substring. Given a second argument: a number, the method returns the last occurrence of the specified substring at an index less than or equal to the specified number.\n\n## Syntax\n\n```js\nlastIndexOf(searchString)\nlastIndexOf(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n\n  - : Substring to search for, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion).\n\n    If the method is called with no arguments, `searchString` is coerced to `\"undefined\"`. Therefore,`\"undefined\".lastIndexOf()` returns `0` — because the substring `\"undefined\"` is found at position `0` in the string `\"undefined\"`. But `\"undefine\".lastIndexOf()`, returns `-1` — because the substring `\"undefined\"` is not found in the string `\"undefine\"`.\n\n- `position` _**optional**_\n\n  - : The method returns the index of the last occurrence of the specified substring at a position less than or equal to `position`, which defaults to `+Infinity`. If `position` is greater than the length of the calling string, the method searches the entire string. If `position` is less than `0`, the behavior is the same as for `0` — that is, the method looks for the specified substring only at index `0`.\n\n    - `'hello world hello'.lastIndexOf('world', 4)` returns `-1` — because, while the substring `world` does occurs at index `6`, that position is not less than or equal to `4`.\n\n    - `'hello world hello'.lastIndexOf('hello', 99)` returns `12` — because the last occurrence of `hello` at a position less than or equal to `99` is at position `12`.\n\n    - `'hello world hello'.lastIndexOf('hello', 0)` and `'hello world hello'.lastIndexOf('hello', -5)` both return `0` — because both cause the method to only look for `hello` at index `0`.\n\n### Return value\n\nThe index of the last occurrence of `searchString` found, or `-1` if not found.\n\n## Description\n\nStrings are zero-indexed: The index of a string's first character is `0`, and the index of a string's last character is the length of the string minus 1.\n\n```js\n\"canal\".lastIndexOf(\"a\"); // returns 3\n\"canal\".lastIndexOf(\"a\", 2); // returns 1\n\"canal\".lastIndexOf(\"a\", 0); // returns -1\n\"canal\".lastIndexOf(\"x\"); // returns -1\n\"canal\".lastIndexOf(\"c\", -5); // returns 0\n\"canal\".lastIndexOf(\"c\", 0); // returns 0\n\"canal\".lastIndexOf(\"\"); // returns 5\n\"canal\".lastIndexOf(\"\", 2); // returns 2\n```\n\n### Case-sensitivity\n\nThe `lastIndexOf()` method is case sensitive. For example, the following\nexpression returns `-1`:\n\n```js\n\"Blue Whale, Killer Whale\".lastIndexOf(\"blue\"); // returns -1\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/String/prototype/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.length\n\nThe **`length`** data property of a string contains the length of the string in UTF-16 code units.\n\n## Value\n\nA non-negative integer.\n\n## Description\n\nThis property returns the number of code units in the string. JavaScript uses [UTF-16](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters) encoding, where each Unicode character may be encoded as one or two code units, so it's possible for the value returned by `length` to not match the actual number of Unicode characters in the string. For common scripts like Latin, Cyrillic, wellknown CJK characters, etc., this should not be an issue, but if you are working with certain scripts, such as emojis, [mathematical symbols](https://en.wikipedia.org/wiki/Mathematical_Alphanumeric_Symbols), or obscure Chinese characters, you may need to account for the difference between code units and characters.\n\nThe language specification requires strings to have a maximum length of 2<sup>53</sup> - 1 elements, which is the upper limit for [precise integers](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER). However, a string with this length needs 16384TiB of storage, which cannot fit in any reasonable device's memory, so implementations tend to lower the threshold, which allows the string's length to be conveniently stored in a 32-bit integer.\n\n- In V8 (used by Chrome and Node), the maximum length is 2<sup>29</sup> - 24 (\\~1GiB). On 32-bit systems, the maximum length is 2<sup>28</sup> - 16 (\\~512MiB).\n- In Firefox, the maximum length is 2<sup>30</sup> - 2 (\\~2GiB). Before Firefox 65, the maximum length was 2<sup>28</sup> - 1 (\\~512MiB).\n- In Safari, the maximum length is 2<sup>31</sup> - 1 (\\~4GiB).\n\nFor an empty string, `length` is 0.\n\nThe static property `String.length` is unrelated to the length of strings. It's the [arity](../../../globals/Function/prototype/length.mdx) of the `String` function (loosely, the number of formal parameters it has), which is 1.\n\nSince `length` counts code units instead of characters, if you want to get the number of characters, you can first split the string with its [iterator](../../../globals/String/prototype/@@iterator.mdx), which iterates by characters:\n\n```js\nfunction getCharacterLength(str) {\n  // The string iterator that is used here iterates over characters,\n  // not mere code units\n  return [...str].length;\n}\n\nconsole.log(getCharacterLength(\"A\\uD87E\\uDC04Z\")); // 3\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/String/prototype/localeCompare.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.localeCompare()\n\nThe **`localeCompare()`** method returns a number indicating whether a reference string comes before, or after, or is the same as the given string in sort order. In implementations with [`Intl.Collator` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator) support, this method simply calls `Intl.Collator`.\n\n## Syntax\n\n```js\nlocaleCompare(compareString)\nlocaleCompare(compareString, locales)\nlocaleCompare(compareString, locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` parameters customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.Collator` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator), these parameters correspond exactly to the [`Intl.Collator()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator) constructor's parameters. Implementations without `Intl.Collator` support are asked to ignore both parameters, making the comparison result returned entirely implementation-dependent — it's only required to be _consistent_.\n\n- `compareString`\n  - : The string against which the `referenceStr` is compared.\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator#locales) parameter of the `Intl.Collator()` constructor.\n\n    In implementations without `Intl.Collator` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator#options) parameter of the `Intl.Collator()` constructor.\n\n    In implementations without `Intl.Collator` support, this parameter is ignored.\n\nSee the [`Intl.Collator()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator) for details on the `locales` and `options` parameters and how to use them.\n\n### Return value\n\nA **negative** number if `referenceStr` occurs before `compareString`; **positive** if the `referenceStr` occurs after `compareString`; `0` if they are equivalent.\n\nIn implementations with `Intl.Collator`, this is equivalent to `new Intl.Collator(locales, options).compare(referenceStr, compareString)`.\n\n## Description\n\nReturns an integer indicating whether the `referenceStr` comes\nbefore, after or is equivalent to the `compareString`.\n\n- Negative when the `referenceStr` occurs before\n  `compareString`\n- Positive when the `referenceStr` occurs after\n  `compareString`\n- Returns `0` if they are equivalent\n\n> **Warning:** Do not rely on exact return values of `-1` or `1`!\n>\n> Negative and positive integer results vary between browsers (as well as between\n> browser versions) because the W3C specification only mandates negative and positive\n> values. Some browsers may return `-2` or `2`, or even some other\n> negative or positive value.\n\n## Performance\n\nWhen comparing large numbers of strings, such as in sorting large arrays, it is better to create an [`Intl.Collator`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator) object and use the function provided by its [`compare()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/compare) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/String/prototype/match.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.match()\n\nThe **`match()`** method retrieves the result of matching a string against a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions).\n\n## Syntax\n\n```js\nmatch(regexp)\n```\n\n### Parameters\n\n- `regexp`\n\n  - : A regular expression object, or any object that has a [`Symbol.match`](../../../globals/Symbol/match.mdx) method.\n\n    If `regexp` is not a `RegExp` object and does not have a `Symbol.match` method, it is implicitly converted to a `RegExp` by using `new RegExp(regexp)`.\n\n    If you don't give any parameter and use the `match()` method directly, you will get an `Array` with an empty string: `[\"\"]`, because this is equivalent to `match(/(?:)/)`.\n\n### Return value\n\nAn `Array` whose contents depend on the presence or absence of the global (`g`) flag, or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) if no matches are found.\n\n- If the `g` flag is used, all results matching the complete regular expression will be returned, but capturing groups are not included.\n- If the `g` flag is not used, only the first complete match and its related capturing groups are returned. In this case, `match()` will return the same result as `RegExp.prototype.exec()` (an array with some extra properties).\n\n## Description\n\nThe implementation of `String.prototype.match` itself is very simple — it simply calls the `Symbol.match` method of the argument with the string as the first parameter. The actual implementation comes from [`RegExp.prototype[@@match]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@match).\n\n- If you need to know if a string matches a regular expression `RegExp`, use `RegExp.prototype.test()`.\n- If you only want the first match found, you might want to use `RegExp.prototype.exec()` instead.\n- If you want to obtain capture groups and the global flag is set, you need to use `RegExp.prototype.exec()` or [`String.prototype.matchAll()`](../../../globals/String/prototype/matchAll.mdx) instead.\n\nFor more information about the semantics of `match()` when a regex is passed, see [`RegExp.prototype[@@match]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@match).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/String/prototype/matchAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.matchAll()\n\nThe **`matchAll()`** method returns an iterator of all results matching a string against a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions), including [capturing groups](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions/Groups_and_Backreferences).\n\n## Syntax\n\n```js\nmatchAll(regexp)\n```\n\n### Parameters\n\n- `regexp`\n\n  - : A regular expression object, or any object that has a [`Symbol.matchAll`](../../../globals/Symbol/matchAll.mdx) method.\n\n    If `regexp` is not a `RegExp` object and does not have a `Symbol.matchAll` method, it is implicitly converted to a `RegExp` by using `new RegExp(regexp, 'g')`.\n\n    If `regexp` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes), then it must have the global (`g`) flag set, or a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Return value\n\nAn [iterable iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators) (which is not restartable) of matches. Each match is an array with the same shape as the return value of `RegExp.prototype.exec()`.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown if the `regexp` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes) that does not have the global (`g`) flag set (its [`flags`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/flags) property does not contain `\"g\"`).\n\n## Description\n\nThe implementation of `String.prototype.matchAll` itself is very simple — it simply calls the `Symbol.matchAll` method of the argument with the string as the first parameter (apart from the extra input validation that the regex is global). The actual implementation comes from [`RegExp.prototype[@@matchAll]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@matchAll).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/String/prototype/padEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.padEnd()\n\nThe **`padEnd()`** method pads the current string with a given\nstring (repeated, if needed) so that the resulting string reaches a given length. The\npadding is applied from the end of the current string.\n\n## Syntax\n\n```js\npadEnd(targetLength)\npadEnd(targetLength, padString)\n```\n\n### Parameters\n\n- `targetLength`\n  - : The length of the resulting string once the current `str` has\n    been padded. If the value is lower than `str.length`, the\n    current string will be returned as-is.\n- `padString` _**optional**_\n  - : The string to pad the current `str` with. If\n    `padString` is too long to stay within\n    `targetLength`, it will be truncated: for left-to-right\n    languages the left-most part and for right-to-left languages the right-most will be\n    applied. The default value for this parameter is \" \"\n    (`U+0020`).\n\n### Return value\n\nA `String` of the specified `targetLength` with the\n`padString` applied at the end of the current\n`str`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/String/prototype/padStart.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.padStart()\n\nThe **`padStart()`** method pads the\ncurrent string with another string (multiple times, if needed) until the resulting\nstring reaches the given length. The padding is applied from the start of the\ncurrent string.\n\n## Syntax\n\n```js\npadStart(targetLength)\npadStart(targetLength, padString)\n```\n\n### Parameters\n\n- `targetLength`\n  - : The length of the resulting string once the current `str` has\n    been padded. If the value is less than `str.length`, then\n    `str` is returned as-is.\n- `padString` _**optional**_\n  - : The string to pad the current `str` with. If\n    `padString` is too long to stay within the\n    `targetLength`, it will be truncated from the end.\n    The default value is the unicode \"space\" character (U+0020).\n\n### Return value\n\nA `String` of the specified `targetLength` with\n`padString` applied from the start.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/String/prototype/repeat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.repeat()\n\nThe **`repeat()`** method constructs and returns a new string\nwhich contains the specified number of copies of the string on which it was called,\nconcatenated together.\n\n## Syntax\n\n```js\nrepeat(count)\n```\n\n### Parameters\n\n- `count`\n  - : An integer between `0` and\n    [`+Infinity`](../../../globals/Number/POSITIVE_INFINITY.mdx), indicating the\n    number of times to repeat the string.\n\n### Return value\n\nA new string containing the specified number of copies of the given string.\n\n### Exceptions\n\n- Throws a `RangeError` if repeat count is negative.\n- Throws a `RangeError` if repeat count is infinity or overflows maximum string size.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/String/prototype/replace.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.replace()\n\nThe **`replace()`** method returns a new string with one, some, or all matches of a `pattern` replaced by a `replacement`. The `pattern` can be a string or a `RegExp`, and the `replacement` can be a string or a function called for each match. If `pattern` is a string, only the first occurrence will be replaced. The original string is left unchanged.\n\n## Syntax\n\n```js\nreplace(pattern, replacement)\n```\n\n### Parameters\n\n- `pattern`\n  - : Can be a string or an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method — the typical example being a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp). Any value that doesn't have the `Symbol.replace` method will be coerced to a string.\n- `replacement`\n  - : Can be a string or a function.\n    - If it's a string, it will replace the substring matched by `pattern`. A number of special replacement patterns are supported; see the [Specifying a string as the replacement](#specifying-a-string-as-the-replacement) section below.\n    - If it's a function, it will be invoked for every match and its return value is used as the replacement text. The arguments supplied to this function are described in the [Specifying a function as the replacement](#specifying-a-function-as-the-replacement) section below.\n\n### Return value\n\nA new string, with one, some, or all matches of the pattern replaced by the specified replacement.\n\n## Description\n\nThis method does not mutate the string value it's called on. It returns a new string.\n\nA string pattern will only be replaced once. To perform a global search and replace, use a regular expression with the `g` flag, or use [`replaceAll()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/replaceAll) instead.\n\nIf `pattern` is an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method (including `RegExp` objects), that method is called with the target string and `replacement` as arguments. Its return value becomes the return value of `replace()`. In this case the behavior of `replace()` is entirely encoded by the `@@replace` method — for example, any mention of \"capturing groups\" in the description below is actually functionality provided by [`RegExp.prototype[@@replace]`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@replace).\n\nIf the `pattern` is an empty string, the replacement is prepended to the start of the string.\n\n```js\n\"xxx\".replace(\"\", \"_\"); // \"_xxx\"\n```\n\nA regexp with the `g` flag is the only case where `replace()` replaces more than once. For more information about how regex properties (especially the [sticky](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky) flag) interact with `replace()`, see [`RegExp.prototype[@@replace]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@replace).\n\n### Specifying a string as the replacement\n\nThe replacement string can include the following special replacement patterns:\n\n| Pattern   | Inserts                                                                                        |\n| --------- | ---------------------------------------------------------------------------------------------- |\n| `$$`      | Inserts a `\"$\"`.                                                                               |\n| `$&`      | Inserts the matched substring.                                                                 |\n| `` $` ``  | Inserts the portion of the string that precedes the matched substring.                         |\n| `$'`      | Inserts the portion of the string that follows the matched substring.                          |\n| `$n`      | Inserts the `n`th (`1`-indexed) capturing group where `n` is a positive integer less than 100. |\n| `$<Name>` | Inserts the named capturing group where `Name` is the group name.                              |\n\n`$n` and `$<Name>` are only available if the `pattern` argument is a `RegExp` object. If the `pattern` is a string, or if the corresponding capturing group isn't present in the regex, then the pattern will be replaced as a literal. If the group is present but isn't matched (because it's part of a disjunction), it will be replaced with an empty string.\n\n```js\n\"foo\".replace(/(f)/, \"$2\");\n// \"$2oo\"; the regex doesn't have the second group\n\n\"foo\".replace(\"f\", \"$1\");\n// \"$1oo\"; the pattern is a string, so it doesn't have any groups\n\n\"foo\".replace(/(f)|(g)/, \"$2\");\n// \"oo\"; the second group exists but isn't matched\n```\n\n### Specifying a function as the replacement\n\nYou can specify a function as the second parameter. In this case, the function will be invoked after the match has been performed. The function's result (return value) will be used as the replacement string.\n\n> **Note:** The above-mentioned special replacement patterns do _not_ apply for strings returned from the replacer function.\n\nThe function has the following signature:\n\n```js\nfunction replacer(match, p1, p2, /* …, */ pN, offset, string, groups) {\n  return replacement;\n}\n```\n\nThe arguments to the function are as follows:\n\n- `match`\n  - : The matched substring. (Corresponds to `$&` above.)\n- `p1, p2, …, pN`\n  - : The `n`th string found by a capture group (including named capturing groups), provided the first argument to `replace()` is a `RegExp` object. (Corresponds to `$1`, `$2`, etc. above.) For example, if the `pattern` is `/(\\a+)(\\b+)/`, then `p1` is the match for `\\a+`, and `p2` is the match for `\\b+`. If the group is part of a disjunction (e.g. `\"abc\".replace(/(a)|(b)/, replacer)`), the unmatched alternative will be `undefined`.\n- `offset`\n  - : The offset of the matched substring within the whole string being examined. For example, if the whole string was `'abcd'`, and the matched substring was `'bc'`, then this argument will be `1`.\n- `string`\n  - : The whole string being examined.\n- `groups`\n  - : An object whose keys are the used group names, and whose values are the matched portions (`undefined` if not matched). Only present if the `pattern` contains at least one named capturing group.\n\nThe exact number of arguments depends on whether the first argument is a `RegExp` object — and, if so, how many capture groups it has.\n\nThe following example will set `newString` to `'abc - 12345 - #$*%'`:\n\n```js\nfunction replacer(match, p1, p2, p3, offset, string) {\n  // p1 is non-digits, p2 digits, and p3 non-alphanumerics\n  return [p1, p2, p3].join(\" - \");\n}\nconst newString = \"abc12345#$*%\".replace(/([^\\d]*)(\\d*)([^\\w]*)/, replacer);\nconsole.log(newString); // abc - 12345 - #$*%\n```\n\nThe function will be invoked multiple times for each full match to be replaced if the regular expression in the first parameter is global.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/String/prototype/replaceAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.replaceAll()\n\nThe **`replaceAll()`** method returns a new string with all matches of a `pattern` replaced by a `replacement`. The `pattern` can be a string or a `RegExp`, and the `replacement` can be a string or a function to be called for each match. The original string is left unchanged.\n\n## Syntax\n\n```js\nreplaceAll(pattern, replacement)\n```\n\n### Parameters\n\n- `pattern`\n\n  - : Can be a string or an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method — the typical example being a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp). Any value that doesn't have the `Symbol.replace` method will be coerced to a string.\n\n    If `pattern` is a regex, then it must have the global (`g`) flag set, or a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n- `replacement`\n  - : Can be a string or a function. The replacement has the same semantics as that of [`String.prototype.replace()`](../../../globals/String/prototype/replace.mdx).\n\n### Return value\n\nA new string, with all matches of a pattern replaced by a replacement.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown if the `pattern` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes) that does not have the global (`g`) flag set (its [`flags`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/flags) property does not contain `\"g\"`).\n\n## Description\n\nThis method does not mutate the string value it's called on. It returns a new string.\n\nUnlike [`String.prototype.replace()`](../../../globals/String/prototype/replace.mdx), this method would replace all occurrences of a string, not just the first one. This is especially useful if the string is not statically known, as calling the [`RegExp()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/RegExp) constructor without escaping special characters may unintentionally change its semantics.\n\n```js\nfunction unsafeRedactName(text, name) {\n  return text.replace(new RegExp(name, \"g\"), \"[REDACTED]\");\n}\nfunction safeRedactName(text, name) {\n  return text.replaceAll(name, \"[REDACTED]\");\n}\n\nconst report =\n  \"A hacker called ha.*er used special characters in their name to breach the system.\";\n\nconsole.log(unsafeRedactName(report, \"ha.*er\")); // \"A [REDACTED]s in their name to breach the system.\"\nconsole.log(safeRedactName(report, \"ha.*er\")); // \"A hacker called [REDACTED] used special characters in their name to breach the system.\"\n```\n\nIf `pattern` is an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method (including `RegExp` objects), that method is called with the target string and `replacement` as arguments. Its return value becomes the return value of `replaceAll()`. In this case the behavior of `replaceAll()` is entirely encoded by the `Symbol.replace` method, and therefore will have the same result as `replace()` (apart from the extra input validation that the regex is global).\n\nIf the `pattern` is an empty string, the replacement will be inserted in between every UTF-16 code unit, similar to [`String.prototype.split()`](../../../globals/String/prototype/split.mdx) behavior.\n\n```js\n\"xxx\".replaceAll(\"\", \"_\"); // \"_x_x_x_\"\n```\n\nFor more information about how regex properties (especially the [sticky](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky) flag) interact with `replaceAll()`, see [`RegExp.prototype[@@replace]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@replace).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/String/prototype/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.search()\n\nThe **`search()`** method executes a search for a match between a regular expression and this `String` object.\n\n## Syntax\n\n```js\nsearch(regexp)\n```\n\n### Parameters\n\n- `regexp`\n\n  - : A regular expression object, or any object that has a [`Symbol.search`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/search) method.\n\n    If `regexp` is not a `RegExp` object and does not have a `Symbol.search` method, it is implicitly converted to a `RegExp` by using `new RegExp(regexp)`.\n\n### Return value\n\nThe index of the first match between the regular expression and the given string, or `-1` if no match was found.\n\n## Description\n\nThe implementation of `String.prototype.search()` itself is very simple — it simply calls the `Symbol.search` method of the argument with the string as the first parameter. The actual implementation comes from [`RegExp.prototype[@@search]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@search).\n\nThe `g` flag of `regexp` has no effect on the `search()` result, and the search always happens as if the regex's `lastIndex` is 0. For more information on the behavior of `search()`, see [`RegExp.prototype[@@search]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@search).\n\nWhen you want to know whether a pattern is found, and _also_ know its index within a string, use `search()`.\n\n- If you only want to know if it exists, use the `RegExp.prototype.test()` method, which returns a boolean.\n- If you need the content of the matched text, use `String.prototype.match()` or `RegExp.prototype.exec()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/String/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.slice()\n\nThe **`slice()`** method extracts a section of a string and\nreturns it as a new string, without modifying the original string.\n\n## Syntax\n\n```js\nslice(indexStart)\nslice(indexStart, indexEnd)\n```\n\n### Parameters\n\n- `indexStart`\n  - : The index of the first character to include in the returned substring.\n- `indexEnd` _**optional**_\n  - : The index of the first character to exclude from the returned substring.\n\n### Return value\n\nA new string containing the extracted section of the string.\n\n## Description\n\n`slice()` extracts the text from one string and returns a new string. Changes to the text in one string do not affect the other string.\n\n`slice()` extracts up to but not including `indexEnd`. For example, `str.slice(1, 4)` extracts the second character through the fourth character (characters indexed `1`, `2`, and `3`).\n\n- If `indexStart >= str.length`, an empty string is returned.\n- If `indexStart < 0`, the index is counted from the end of the string. More formally, in this case, the substring starts at `max(indexStart + str.length, 0)`.\n- If `indexStart` is omitted, undefined, or cannot be converted to a number (using [`Number()`](../../../globals/Number/Number.mdx)), it's treated as `0`.\n- If `indexEnd` is omitted, undefined, or cannot be converted to a number (using [`Number()`](../../../globals/Number/Number.mdx)), or if `indexEnd >= str.length`, `slice()` extracts to the end of the string.\n- If `indexEnd < 0`, the index is counted from the end of the string. More formally, in this case, the substring ends at `max(indexEnd + str.length, 0)`.\n- If `indexEnd <= indexStart` after normalizing negative values (i.e. `indexEnd` represents a character that's before `indexStart`), an empty string is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/String/prototype/split.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.split()\n\nThe **`split()`** method takes a pattern and divides a `String` into an ordered list of substrings by searching for the pattern, puts these substrings into an array, and returns the array.\n\n## Syntax\n\n```js\nsplit()\nsplit(separator)\nsplit(separator, limit)\n```\n\n### Parameters\n\n- `separator` _**optional**_\n  - : The pattern describing where each split should occur. Can be a string or an object with a [`Symbol.split`](../../../globals/Symbol/split.mdx) method — the typical example being a regular expression. If undefined, the original target string is returned wrapped in an array.\n- `limit` _**optional**_\n  - : A non-negative integer specifying a limit on the number of substrings to be included in the array. If provided, splits the string at each occurrence of the specified `separator`, but stops when `limit` entries have been placed in the array. Any leftover text is not included in the array at all.\n    - The array may contain fewer entries than `limit` if the end of the string is reached before the limit is reached.\n    - If `limit` is `0`, `[]` is returned.\n\n### Return value\n\nAn `Array` of strings, split at each point where the `separator` occurs in the given string.\n\n## Description\n\nIf `separator` is a non-empty string, the target string is split by all matches of the `separator` without including `separator` in the results. For example, a string containing tab separated values (TSV) could be parsed by passing a tab character as the separator, like `myString.split(\"\\t\")`. If `separator` contains multiple characters, that entire character sequence must be found in order to split. If `separator` appears at the beginning (or end) of the string, it still has the effect of splitting, resulting in an empty (i.e. zero length) string appearing at the first (or last) position of the returned array. If `separator` does not occur in `str`, the returned array contains one element consisting of the entire string.\n\nIf `separator` is an empty string (`\"\"`), `str` is converted to an array of each of its UTF-16 \"characters\", without empty strings on either ends of the resulting string.\n\n> **Note:** `\"\".split(\"\")` is therefore the only way to produce an empty array when a string is passed as `separator`.\n\n> **Warning:** When the empty string (`\"\"`) is used as a separator, the string is **not** split by _user-perceived characters_ ([grapheme clusters](https://unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries)) or unicode characters (codepoints), but by UTF-16 codeunits. This destroys [surrogate pairs](https://unicode.org/faq/utf_bom.html#utf16-2). See [\"How do you get a string to a character array in JavaScript?\" on StackOverflow](https://stackoverflow.com/questions/4547609/how-to-get-character-array-from-a-string/34717402#34717402).\n\nIf `separator` is a regexp that matches empty strings, whether the match is split by UTF-16 code units or Unicode codepoints depends on if the [`u`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/unicode) flag is set.\n\n```js\n\"😄😄\".split(/(?:)/); // [ \"\\ud83d\", \"\\ude04\", \"\\ud83d\", \"\\ude04\" ]\n\"😄😄\".split(/(?:)/u); // [ \"😄\", \"😄\" ]\n```\n\nIf `separator` is a regular expression with capturing groups, then each time `separator` matches, the captured groups (including any `undefined` results) are spliced into the output array. This behavior is specified by the regexp's [`Symbol.split`](../../../globals/Symbol/split.mdx) method.\n\nIf `separator` is an object with a [`Symbol.split`](../../../globals/Symbol/split.mdx) method, that method is called with the target string and `limit` as arguments, and `this` set to the object. Its return value becomes the return value of `split`.\n\nAny other value will be coerced to a string before being used as separator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/String/prototype/startsWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.startsWith()\n\nThe **`startsWith()`** method determines whether a string begins with the characters of a specified string, returning `true` or `false` as appropriate.\n\n## Syntax\n\n```js\nstartsWith(searchString)\nstartsWith(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n  - : The characters to be searched for at the start of this string. Cannot be a regex.\n- `position` _**optional**_\n  - : The start position at which `searchString` is expected to be found (the index of `searchString`'s first character). Defaults to `0`.\n\n### Return value\n\n**`true`** if the given characters are found at the beginning of the string; otherwise, **`false`**.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If `searchString` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes).\n\n## Description\n\nThis method lets you determine whether or not a string begins with another string. This method is case-sensitive.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/String/prototype/substr.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.substr()\n\nThe **`substr()`** method returns a portion of the string, starting at the specified index and extending for a given number of characters afterwards.\n\n> **Note:** `substr()` is not part of the main ECMAScript specification — it's defined in [Annex B: Additional ECMAScript Features for Web Browsers](https://tc39.es/ecma262/#sec-additional-ecmascript-features-for-web-browsers), which is normative optional for non-browser runtimes. Therefore, people are advised to use the standard [`String.prototype.substring()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/substring) and [`String.prototype.slice()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/slice) methods instead to make their code maximally cross-platform friendly. The [`String.prototype.substring()` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/substring#the_difference_between_substring_and_substr) has some comparisons between the three methods.\n\n\n\n## Syntax\n\n```js\nsubstr(start)\nsubstr(start, length)\n```\n\n### Parameters\n\n- `start`\n  - : The index of the first character to include in the returned substring.\n- `length` _**optional**_\n  - : The number of characters to extract.\n\n### Return value\n\nA new string containing the specified part of the given string.\n\n## Description\n\nA string's `substr()` method extracts `length` characters from the string, counting from the `start` index.\n\n- If `start >= str.length`, an empty string is returned.\n- If `start < 0`, the index starts counting from the end of the string. More formally, in this case the substring starts at `max(start + str.length, 0)`.\n- If `start` is omitted or [`undefined`](../../../globals/undefined.mdx), it's treated as `0`.\n- If `length` is omitted or [`undefined`](../../../globals/undefined.mdx), or if `start + length >= str.length`, `substr()` extracts characters to the end of the string.\n- If `length < 0`, an empty string is returned.\n- For both `start` and `length`, [`NaN`](../../../globals/NaN.mdx) is treated as `0`.\n\nAlthough you are encouraged to avoid using `substr()`, there is no trivial way to migrate `substr()` to either `slice()` or `substring()` in legacy code without essentially writing a polyfill for `substr()`. For example, `str.substr(a, l)`, `str.slice(a, a + l)`, and `str.substring(a, a + l)` all have different results when `str = \"01234\", a = 1, l = -2` — `substr()` returns an empty string, `slice()` returns `\"123\"`, while `substring()` returns `\"0\"`. The actual refactoring path depends on the knowledge of the range of `a` and `l`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/String/prototype/substring.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.substring()\n\nThe **`substring()`** method returns the part of the `string` from the start index up to and excluding the end index, or to the end of the string if no end index is supplied.\n\n## Syntax\n\n```js\nsubstring(indexStart)\nsubstring(indexStart, indexEnd)\n```\n\n### Parameters\n\n- `indexStart`\n  - : The index of the first character to include in the returned substring.\n- `indexEnd` _**optional**_\n  - : The index of the first character to exclude from the returned substring.\n\n### Return value\n\nA new string containing the specified part of the given string.\n\n## Description\n\n`substring()` extracts characters from `indexStart` up to _but not including_ `indexEnd`. In particular:\n\n- If `indexEnd` is omitted, `substring()` extracts characters to the end of the string.\n- If `indexStart` is equal to `indexEnd`, `substring()` returns an empty string.\n- If `indexStart` is greater than `indexEnd`, then the effect of `substring()` is as if the two arguments were swapped; see example below.\n\nAny argument value that is less than `0` or greater than `str.length` is treated as if it were `0` and `str.length`, respectively.\n\nAny argument value that is [`NaN`](../../../globals/NaN.mdx) is treated as if it were `0`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/String/prototype/toLocaleLowerCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toLocaleLowerCase()\n\nThe **`toLocaleLowerCase()`** method returns the calling string\nvalue converted to lower case, according to any locale-specific case mappings.\n\n## Syntax\n\n```js\ntoLocaleLowerCase()\ntoLocaleLowerCase(locales)\n```\n\n### Parameters\n\n- `locales` _**optional**_\n  - : A string with a BCP 47 language tag, or an array of such strings. Indicates the locale to be used to convert to lower case according to any locale-specific case mappings. For the general form and interpretation of the `locales` argument, see [Locale identification and negotiation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation).\n\n### Return value\n\nA new string representing the calling string converted to lower case, according to any\nlocale-specific case mappings.\n\n### Exceptions\n\n- A [`RangeError`](../../../globals/RangeError/RangeError.mdx) (\"invalid language tag: xx_yy\") is thrown if a\n  `locale` argument isn't a valid language tag.\n- A [`TypeError`](../../../globals/TypeError/TypeError.mdx) (\"invalid element in locales argument\") is thrown if an\n  array element isn't of type string.\n\n## Description\n\nThe `toLocaleLowerCase()` method returns the value of the string converted\nto lower case according to any locale-specific case mappings.\n`toLocaleLowerCase()` does not affect the value of the string itself. In most\ncases, this will produce the same result as [`String.prototype.toLowerCase()`](../../../globals/String/prototype/toLowerCase.mdx), but for some locales, such as Turkish, whose case mappings do not\nfollow the default case mappings in Unicode, there may be a different result.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/String/prototype/toLocaleUpperCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toLocaleUpperCase()\n\nThe **`toLocaleUpperCase()`** method returns the calling string\nvalue converted to upper case, according to any locale-specific case mappings.\n\n## Syntax\n\n```js\ntoLocaleUpperCase()\ntoLocaleUpperCase(locales)\n```\n\n### Parameters\n\n- `locales` _**optional**_\n  - : A string with a BCP 47 language tag, or an array of such strings. Indicates the locale to be used to convert to upper case according to any locale-specific case mappings. For the general form and interpretation of the `locales` argument, see [Locale identification and negotiation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation).\n\n### Return value\n\nA new string representing the calling string converted to upper case, according to any\nlocale-specific case mappings.\n\n### Exceptions\n\n- A [`RangeError`](../../../globals/RangeError/RangeError.mdx) (\"invalid language tag: xx_yy\") is thrown if a\n  `locale` argument isn't a valid language tag.\n- A [`TypeError`](../../../globals/TypeError/TypeError.mdx) (\"invalid element in locales argument\") is thrown if an\n  array element isn't of type string.\n\n## Description\n\nThe `toLocaleUpperCase()` method returns the value of the string converted\nto upper case according to any locale-specific case mappings.\n`toLocaleUpperCase()` does not affect the value of the string itself. In most\ncases, this will produce the same result as [`String.prototype.toUpperCase()`](../../../globals/String/prototype/toUpperCase.mdx), but for some locales, such as Turkish, whose case mappings do not\nfollow the default case mappings in Unicode, there may be a different result.\n\nAlso notice that conversion is not necessarily a 1:1 character mapping, as some\ncharacters might result in two (or even more) characters when transformed to upper-case.\nTherefore the length of the result string can differ from the input length. This also\nimplies that the conversion is not stable, so i.E. the following can return\n`false`:\n`x.toLocaleLowerCase() === x.toLocaleUpperCase().toLocaleLowerCase()`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/String/prototype/toLowerCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toLowerCase()\n\nThe **`toLowerCase()`** method returns the calling string value\nconverted to lower case.\n\n## Syntax\n\n```js\ntoLowerCase()\n```\n\n### Return value\n\nA new string representing the calling string converted to lower case.\n\n## Description\n\nThe `toLowerCase()` method returns the value of the string converted to\nlower case. `toLowerCase()` does not affect the value of the string\n`str` itself.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/String/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified string value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified string value.\n\n## Description\n\nThe `String` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For `String` values, the `toString` method returns the string itself (if it's a primitive) or the string that the `String` object wraps. It has the exact same implementation as [`String.prototype.valueOf()`](../../../globals/String/prototype/valueOf.mdx).\n\nThe `toString()` method requires its `this` value to be a `String` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to string values.\n\nBecause `String` doesn't have a [`[Symbol.toPrimitive]()`](../../../globals/Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `String` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, String _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — since they are already strings, no conversion is performed.\n\n```js\nString.prototype.toString = () => \"Overridden\";\nconsole.log(`${\"foo\"}`); // \"foo\"\nconsole.log(`${new String(\"foo\")}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/String/prototype/toUpperCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toUpperCase()\n\nThe **`toUpperCase()`** method returns the calling string value\nconverted to uppercase (the value will be converted to a string if it isn't one).\n\n## Syntax\n\n```js\ntoUpperCase()\n```\n\n### Return value\n\nA new string representing the calling string converted to upper case.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : When called on [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../../globals/undefined.mdx), for example,\n    `String.prototype.toUpperCase.call(undefined)`.\n\n## Description\n\nThe `toUpperCase()` method returns the value of the string converted to\nuppercase. This method does not affect the value of the string itself since JavaScript\nstrings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/String/prototype/trim.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.trim()\n\nThe **`trim()`** method removes whitespace from both ends of a string and returns a new string, without modifying the original string.\n\nTo return a new string with whitespace trimmed from just one end, use [`String.prototype.trimStart()`](../../../globals/String/prototype/trimStart.mdx) or [`String.prototype.trimEnd()`](../../../globals/String/prototype/trimEnd.mdx).\n\n## Syntax\n\n```js\ntrim()\n```\n\n### Return value\n\nA new string representing `str` stripped of whitespace from both its beginning and end. Whitespace is defined as [white space](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#white_space) characters plus [line terminators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#line_terminators).\n\nIf neither the beginning or end of `str` has any whitespace, a new string is still returned (essentially a copy of `str`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/String/prototype/trimEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.trimEnd()\n\nThe **`trimEnd()`** method removes whitespace from the end of a string and returns a new string, without modifying the original string. `trimRight()` is an alias of this method.\n\n## Syntax\n\n```js\ntrimEnd()\n\ntrimRight()\n```\n\n### Return value\n\nA new string representing `str` stripped of whitespace from its end (right side). Whitespace is defined as [white space](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#white_space) characters plus [line terminators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#line_terminators).\n\nIf the end of `str` has no whitespace, a new string is still returned (essentially a copy of `str`).\n\n### Aliasing\n\nAfter [`String.prototype.trim()`](../../../globals/String/prototype/trim.mdx) was standardized, engines also implemented the non-standard method `trimRight`. However, for consistency with [`String.prototype.pedEnd()`](../../../globals/String/prototype/trim.mdx), when the method got standardized, its name was chosen as `trimEnd`. For web compatibility reasons, `trimRight` remains as an alias to `trimEnd`, and they refer to the exact same function object. In some engines this means:\n\n```js\nString.prototype.trimRight.name === \"trimEnd\";\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/String/prototype/trimStart.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.trimStart()\n\nThe **`trimStart()`** method removes whitespace from the beginning of a string and returns a new string, without modifying the original string. `trimLeft()` is an alias of this method.\n\n## Syntax\n\n```js\ntrimStart()\n\ntrimLeft()\n```\n\n### Return value\n\nA new string representing `str` stripped of whitespace from its beginning (left side). Whitespace is defined as [white space](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#white_space) characters plus [line terminators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#line_terminators).\n\nIf the beginning of `str` has no whitespace, a new string is still returned (essentially a copy of `str`).\n\n### Aliasing\n\nAfter [`String.prototype.trim()`](../../../globals/String/prototype/trim.mdx) was standardized, engines also implemented the non-standard method `trimLeft`. However, for consistency with [`String.prototype.padEnd()`](../../../globals/String/prototype/padEnd.mdx), when the method got standardized, its name was chosen as `trimStart`. For web compatibility reasons, `trimLeft` remains as an alias to `trimStart`, and they refer to the exact same function object. In some engines this means:\n\n```js\nString.prototype.trimLeft.name === \"trimStart\";\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/String/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a\n`String` object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nA string representing the primitive value of a given `String` object.\n\n## Description\n\nThe `valueOf()` method of `String` returns the primitive value\nof a `String` object as a string data type. This value is equivalent to\n[`String.prototype.toString()`](../../../globals/String/prototype/toString.mdx).\n\nThis method is usually called internally by JavaScript and not explicitly in code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/String/raw.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.raw()\n\nThe static **`String.raw()`** method is a tag function of [template literals](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). This is similar to the `r` prefix in Python, or the `@` prefix in C# for string literals. It's used to get the raw string form of template literals — that is, substitutions (e.g. `${foo}`) are processed, but escape sequences (e.g. `\\n`) are not.\n\n## Syntax\n\n```js\nString.raw(strings, ...substitutions)\n\nString.raw`templateString`\n```\n\n### Parameters\n\n- `strings`\n  - : Well-formed template literal array object, like `{ raw: ['foo', 'bar', 'baz'] }`. Should be an object with a `raw` property whose value is an array-like object of strings.\n- `...substitutions`\n  - : Contains substitution values.\n- `templateString`\n  - : A [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals), optionally with substitutions (`${...}`).\n\n### Return value\n\nThe raw string form of a given template literal.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if the first argument doesn't have a `raw` property, or the `raw` property is `undefined` or `null`.\n\n## Description\n\nIn most cases, `String.raw()` is used with template literals. The first syntax mentioned above is only rarely used, because the JavaScript engine will call this with proper arguments for you, (just like with other [tag functions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals#tagged_templates)).\n\n`String.raw()` is the only built-in template literal tag. It has close semantics to an untagged literal since it concatenates all arguments and returns a string. You can even re-implement it with normal JavaScript code.\n\n> **Warning:** You should not use `String.raw` directly as an \"identity\" tag. See [Building an identity tag](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/raw#building_an_identity_tag) for how to implement this.\n\nIf `String.raw()` is called with an object whose `raw` property doesn't have a `length` property or a non-positive `length`, it returns an empty string `\"\"`. If `substitutions.length < strings.raw.length - 1` (i.e. there are not enough substitutions to fill the placeholders — which can't happen in a well-formed tagged template literal), the rest of the placeholders are filled with empty strings.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/SubtleCrypto/SubtleCrypto.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SubtleCrypto\n\nThe **`SubtleCrypto`** interface provides a number of low-level cryptographic functions. Access to the features of `SubtleCrypto` is obtained through the [`crypto.subtle`](../crypto/subtle.mdx) property.\n\n> **Warning:** This API provides a number of low-level cryptographic primitives. It's very easy to misuse them, and the pitfalls involved can be very subtle.\n>\n> Even assuming you use the basic cryptographic functions correctly, secure key management and overall security system design are extremely hard to get right, and are generally the domain of specialist security experts.\n>\n> Errors in security system design and implementation can make the security of the system completely ineffective.\n>\n> Please learn and experiment, but don't guarantee or imply the security of your work before an individual knowledgeable in this subject matter thoroughly reviews it. The [Crypto 101 Course](https://www.crypto101.io/) can be a great place to start learning about the design and implementation of secure systems.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/SubtleCrypto/prototype/digest.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# digest()\n\nThe **`digest()`** method of the [`SubtleCrypto`](../SubtleCrypto.mdx)\ninterface generates a digest of the given data. A digest is a short\nfixed-length value derived from some variable-length input. Cryptographic digests should\nexhibit collision-resistance, meaning that it's hard to come up with two different\ninputs that have the same digest value.\n\nIt takes as its arguments an identifier for the digest algorithm to use and the data to\ndigest. It returns a [`Promise`](../../Promise/Promise.mdx) which will be fulfilled with the digest.\n\n## Syntax\n\n```js\ndigest(algorithm, data)\n```\n\n### Parameters\n\n- `algorithm`\n  - : This may be a string or an object with a single property `name` that is a string. The string names the hash function to use. Supported values are:\n    - `\"MD5\"` (but don't use this in cryptographic applications)\n    - `\"SHA-1\"` (but don't use this in cryptographic applications)\n    - `\"SHA-256\"`\n    - `\"SHA-384\"`\n    - `\"SHA-512\"`.\n- `data`\n  - : An `ArrayBuffer`, a `TypedArray` or a `DataView` object containing the data to be digested.\n\n### Return value\n\nA [`Promise`](../../Promise/Promise.mdx) that fulfills with an `ArrayBuffer` containing the digest.\n\n## Supported algorithms\n\nDigest algorithms, also known as cryptographic hash functions,\ntransform an arbitrarily large block of data into a fixed-size output,\nusually much shorter than the input. They have a variety of applications in\ncryptography.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/SubtleCrypto/prototype/importKey.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# importKey()\n\nThe **`importKey()`** method of the [`SubtleCrypto`](../SubtleCrypto.mdx)\ninterface imports a key: that is, it takes as input a key in an external, portable\nformat and gives you a [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) object that you can use.\n\nThe function accepts several import formats: see [Supported formats](#supported-formats) for details.\n\n## Syntax\n\n```js\nimportKey(format, keyData, algorithm, extractable, keyUsages)\n```\n\n### Parameters\n\n- `format`\n  - : A string describing the data format of the key to import. It can be one of the following:\n    - `raw`: [Raw](#raw) format.\n    - `jwk`: [JSON Web Key](#json-web-key) format.\n- `keyData`\n  - : An `ArrayBuffer`, a TypedArray, a `DataView`, or a `JSONWebKey` object containing the key in\n    the given format.\n- `algorithm`\n  - : An object defining the type of key to import and providing extra algorithm-specific parameters.\n    - For RSASSA-PKCS1-v1_5:\n      Pass an [`RsaHashedImportParams`](../../RsaHashedImportParams/RsaHashedImportParams.mdx) object.\n    - For HMAC:\n      Pass an [`HmacImportParams`](../../HmacImportParams/HmacImportParams.mdx) object.\n    - For ECDSA:\n      Pass an [`EcKeyImportParams`](../../EcKeyImportParams/EcKeyImportParams.mdx) object.\n- `extractable`\n  - : A boolean value indicating whether it will be possible to export the key.\n- `keyUsages`\n  - : An `Array` indicating what can be done with the key. Possible array values are:\n    - `encrypt`: The key may be used to encrypt messages.\n    - `decrypt`: The key may be used to decrypt messages.\n    - `sign`: The key may be used to sign messages.\n    - `verify`: The key may be used to verify signatures.\n    - `deriveKey`: The key may be used in deriving a new key.\n    - `deriveBits`: The key may be used in deriving bits.\n    - `wrapKey`: The key may be used to wrap a key.\n    - `unwrapKey`: The key may be used to unwrap a key.\n\n### Return value\n\nA [`Promise`](../../Promise/Promise.mdx)\nthat fulfills with the imported key as a [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) object.\n\n### Exceptions\n\nThe promise is rejected when one of the following exceptions is encountered:\n\n- `SyntaxError`\n  - : Raised when `keyUsages` is empty but the unwrapped key is of\n    type `secret` or `private`.\n- `TypeError`\n  - : Raised when trying to use an invalid format or if the `keyData`\n    is not suited for that format.\n\n## Supported formats\n\nThis API currently supports one key import/export format: JSON Web Key.\n\n### Raw\n\nYou can use this format to import or export AES or HMAC secret keys, or Elliptic Curve\npublic keys.\n\nIn this format the key is supplied as an `ArrayBuffer` containing the raw bytes for the key.\n\n\n### JSON Web Key\n\nYou can use JSON Web Key format to import or export RSA or Elliptic Curve public or\nprivate keys, as well as AES and HMAC secret keys.\n\nJSON Web Key format is defined in [RFC 7517](https://datatracker.ietf.org/doc/html/rfc7517).\nIt describes a way to represent public, private, and secret keys as JSON objects.\n\nA JSON Web Key looks something like this (this is an EC private key):\n\n```json\n{\n  \"crv\": \"P-384\",\n  \"d\": \"wouCtU7Nw4E8_7n5C1-xBjB4xqSb_liZhYMsy8MGgxUny6Q8NCoH9xSiviwLFfK_\",\n  \"ext\": true,\n  \"key_ops\": [\"sign\"],\n  \"kty\": \"EC\",\n  \"x\": \"SzrRXmyI8VWFJg1dPUNbFcc9jZvjZEfH7ulKI1UkXAltd7RGWrcfFxqyGPcwu6AQ\",\n  \"y\": \"hHUag3OvDzEr0uUQND4PXHQTXP5IDGdYhJhL-WLKjnGjQAw0rNGy5V29-aV-yseW\"\n};\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/SubtleCrypto/prototype/sign.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# sign()\n\nThe **`sign()`** method of the [`SubtleCrypto`](../SubtleCrypto.mdx) interface generates a digital signature.\n\nIt takes as its arguments a key to sign with, some algorithm-specific\nparameters, and the data to sign. It returns a `Promise` which will be\nfulfilled with the signature.\n\nYou can use the corresponding [`verify()`](./verify.mdx) method to verify the signature.\n\n## Syntax\n\n```js\nsign(algorithm, key, data)\n```\n\n### Parameters\n\n- `algorithm`\n  - : A string or object that specifies the signature algorithm to use and its parameters:\n    - To use [RSASSA-PKCS1-v1_5](#rsassa-pkcs1-v1_5), pass the string `\"RSASSA-PKCS1-v1_5\"` or an object of the form `{ \"name\": \"RSASSA-PKCS1-v1_5\" }`.\n    - To use [HMAC](#hmac), pass the string `\"HMAC\"` or an object of the form `{ \"name\": \"HMAC\" }`.\n- `key`\n  - : A [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) object containing the key to be used for signing.\n    If `algorithm` identifies a public-key cryptosystem, this is the private key.\n- `data`\n  - : An `ArrayBuffer`, a TypedArray or a `DataView` object containing the data to be signed.\n\n### Return value\n\nA `Promise` that fulfills with an `ArrayBuffer` containing the signature.\n\n### Exceptions\n\nThe promise is rejected when the following exception is encountered:\n\n- `InvalidAccessError`\n  - : Raised when the signing key is not a key for the request signing algorithm or when\n    trying to use an algorithm that is either unknown or isn't suitable for signing.\n\n## Supported algorithms\n\n### RSASSA-PKCS1-v1_5\n\nThe RSASSA-PKCS1-v1_5 algorithm is specified in [RFC 3447](https://datatracker.ietf.org/doc/html/rfc3447).\n\n### HMAC\n\nThe HMAC algorithm calculates and verifies hash-based message authentication codes according to the\n[FIPS 198-1 standard](https://csrc.nist.gov/csrc/media/publications/fips/198/1/final/documents/fips-198-1_final.pdf).\n\nThe digest algorithm to use is specified in the\n[`HmacImportParams`](../../HmacImportParams/HmacImportParams.mdx) object\nthat you pass into [`SubtleCrypto.importKey()`](./importKey.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/SubtleCrypto/prototype/verify.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# verify()\n\nThe **`verify()`** method verifies a digital signature.\n\nIt takes as its arguments a key to verify the signature with, some algorithm-specific parameters, the signature, and the original signed data.\nIt returns a `Promise` which will be fulfilled with a boolean value indicating whether the signature is valid.\n\n## Syntax\n\n```js\nverify(algorithm, key, signature, data)\n```\n\n### Parameters\n\n- `algorithm`\n  - : A string or object defining the algorithm to use, and for some algorithm choices, some extra parameters.\n    The values given for the extra parameters must match those passed into the corresponding [`sign()`](./sign.mdx) call.\n    - To use RSASSA-PKCS1-v1_5, pass the string `\"RSASSA-PKCS1-v1_5\"` or an object of the form `{ \"name\": \"RSASSA-PKCS1-v1_5\" }`.\n    - To use HMAC, pass the string `\"HMAC\"` or an object of the form `{ \"name\": \"HMAC\" }`.\n- `key`\n  - : A [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) containing the key that will be used to verify the signature.\n    It is the secret key for a symmetric algorithm and the public key for a public-key system.\n- `signature`\n  - : A `ArrayBuffer` containing the signature to verify.\n- `data`\n  - : A `ArrayBuffer` containing the data whose signature is to be verified.\n\n### Return value\n\nA `Promise` that fulfills with a\nboolean value: `true` if the signature is valid, `false`\notherwise.\n\n### Exceptions\n\nThe promise is rejected when the following exception is encountered:\n\n- `InvalidAccessError`\n  - : Raised when the encryption key is not a key for the requested verifying algorithm or\n    when trying to use an algorithm that is either unknown or isn't suitable for a verify\n    operation.\n\n## Supported algorithms\n\nThe `verify()` method supports the same algorithms as the [`sign()`](./sign.mdx) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Symbol/Symbol.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol()\n\nThe `Symbol()` constructor returns a value of type **symbol**,\nbut is incomplete as a constructor because it does not support the syntax\n\"`new Symbol()`\" and it is not intended to be subclassed. It may be used as\nthe value of an\n[`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends)\nclause of a `class` definition but a\n[`super`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/super)\ncall to it will cause an exception.\n\n## Syntax\n\n```js\nSymbol()\nSymbol(description)\n```\n\n> **Note:** `Symbol()` can only be called without `new`. Attempting to construct it with `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `description` _**optional**_\n  - : A string. A description of the symbol which can be used for debugging but not to\n    access the symbol itself.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Symbol/asyncIterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.asyncIterator\n\nThe **`Symbol.asyncIterator`** well-known symbol specifies the default [async iterator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_async_iterator_and_async_iterable_protocols) for an object. If this property is set on an object, it is an async iterable and can be used in a [`for await...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for-await...of) loop.\n\n## Value\n\nThe well-known symbol `Symbol.asyncIterator`.\n\n## Description\n\nThe `Symbol.asyncIterator` symbol is a builtin symbol that is used to access an object's `Symbol.asyncIterator` method. In order for an object to be async iterable, it must have a `Symbol.asyncIterator` key.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Symbol/for.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.for()\n\nThe **`Symbol.for(key)`** method searches for existing symbols\nin a runtime-wide symbol registry with the given key and returns it if found. Otherwise\na new symbol gets created in the global symbol registry with this key.\n\n## Syntax\n\n```js\nSymbol.for(key)\n```\n\n### Parameters\n\n- `key`\n  - : String, required. The key for the symbol (and also used for the description of the\n    symbol).\n\n### Return value\n\nAn existing symbol with the given key if found; otherwise, a new symbol is created and\nreturned.\n\n## Description\n\nIn contrast to `Symbol()`, the `Symbol.for()` function creates a\nsymbol available in a [global symbol registry](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol#shared_symbols_in_the_global_symbol_registry) list. `Symbol.for()` does also\nnot necessarily create a new symbol on every call, but checks first if a symbol with the\ngiven `key` is already present in the registry. In that case, that symbol is\nreturned. If no symbol with the given key is found, `Symbol.for()` will\ncreate a new global symbol.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Symbol/hasInstance.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.hasInstance\n\nThe **`Symbol.hasInstance`** well-known symbol is used to determine if a constructor object recognizes an object as its instance. The `instanceof` operator's behavior can be customized by this symbol.\n\n## Value\n\nThe well-known symbol `Symbol.hasInstance`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Symbol/isConcatSpreadable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.isConcatSpreadable\n\nThe **`Symbol.isConcatSpreadable`** well-known symbol is used to configure if an object should be flattened to its array elements when using the [`Array.prototype.concat()`](../../globals/Array/prototype/concat.mdx) method.\n\n## Value\n\nThe well-known symbol `Symbol.isConcatSpreadable`.\n\n## Description\n\nThe `Symbol.isConcatSpreadable` symbol (`Symbol.isConcatSpreadable`) can be defined as an own or inherited property and its value is a boolean. It can control behavior for arrays and array-like objects:\n\n- For array objects, the default behavior is to spread (flatten) elements. `Symbol.isConcatSpreadable` can avoid flattening in these cases.\n- For array-like objects, the default behavior is no spreading or flattening. `Symbol.isConcatSpreadable` can force flattening in these cases.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Symbol/iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.iterator\n\nThe well-known **`Symbol.iterator`** symbol specifies the default iterator for an object. Used by [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of).\n\n## Value\n\nThe well-known symbol `Symbol.iterator`.\n\n## Description\n\nWhenever an object needs to be iterated (such as at the beginning of a `for...of` loop), its `Symbol.iterator` method is called with no arguments, and the returned **iterator** is used to obtain the values to be iterated.\n\nSome built-in types have a default iteration behavior, while other types (such as `Object`) do not. The built-in types with a `Symbol.iterator` method are:\n\n- [`Array.prototype[Symbol.iterator]()`](../../globals/Array/prototype/@@iterator.mdx)\n- [`String.prototype[Symbol.iterator]()`](../../globals/String/prototype/@@iterator.mdx)\n- [`Map.prototype[Symbol.iterator]()`](../../globals/Map/prototype/@@iterator.mdx)\n- [`Set.prototype[Symbol.iterator]()`](../../globals/Set/prototype/@@iterator.mdx)\n\nSee also [Iteration protocols](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) for more information.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Symbol/keyFor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.keyFor()\n\nThe **`Symbol.keyFor(sym)`** method retrieves a shared symbol\nkey from the global symbol registry for the given symbol.\n\n## Syntax\n\n```js\nSymbol.keyFor(sym)\n```\n\n### Parameters\n\n- `sym`\n  - : Symbol, required. The symbol to find a key for.\n\n### Return value\n\nA string representing the key for the given symbol if one is found on the [global registry](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol#shared_symbols_in_the_global_symbol_registry); otherwise, [`undefined`](../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Symbol/match.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.match\n\nThe **`Symbol.match`** well-known symbol specifies the matching of a regular expression against a string. This function is called by the [`String.prototype.match()`](../../globals/String/prototype/match.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.match]()` and [`String.prototype.match()`](../../globals/String/prototype/match.mdx).\n\n## Value\n\nThe well-known symbol `Symbolmatch`.\n\n## Description\n\nThis function is also used to identify [if objects have the behavior of regular expressions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes). For example, the methods [`String.prototype.startsWith()`](../../globals/String/prototype/startsWith.mdx), [`String.prototype.endsWith()`](../../globals/String/prototype/endsWith.mdx) and [`String.prototype.includes()`](../../globals/String/prototype/includes.mdx), check if their first argument is a regular expression and will throw a [`TypeError`](../../globals/TypeError/TypeError.mdx) if they are. Now, if the `match` symbol is set to `false` (or a [Falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value except `undefined`), it indicates that the object is not intended to be used as a regular expression object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Symbol/matchAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.matchAll\n\nThe **`Symbol.matchAll`** well-known symbol specifies the method that returns an iterator, that yields matches of the regular expression against a string. This function is called by the [`String.prototype.matchAll()`](../../globals/String/prototype/matchAll.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.matchAll]()` and [`String.prototype.matchAll()`](../../globals/String/prototype/matchAll.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.matchAll`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Symbol/prototype/@@toPrimitive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype[Symbol.toPrimitive]\n\nThe **`[Symbol.toPrimitive]()`** method converts a Symbol object to\na primitive value.\n\n## Syntax\n\n```js\nSymbol()[Symbol.toPrimitive](hint)\n```\n\n### Return value\n\nThe primitive value of the specified `Symbol` object.\n\n## Description\n\nThe `[Symbol.toPrimitive]()` method of `Symbol` returns the primitive\nvalue of a Symbol object as a Symbol data type. The `hint`\nargument is not used.\n\nJavaScript calls the `[Symbol.toPrimitive]()` method to convert an object to a\nprimitive value. You rarely need to invoke the `[Symbol.toPrimitive]()` method\nyourself; JavaScript automatically invokes it when encountering an object where a\nprimitive value is expected.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Symbol/prototype/description.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype.description\n\nThe read-only **`description`** property is a string returning the optional description of `Symbol` objects.\n\n## Description\n\n`Symbol` objects can be created with an optional description which can be used for debugging but not to access the symbol itself. The `Symbol.prototype.description` property can be used to read that description. It is different to `Symbol.prototype.toString()` as it does not contain the enclosing `\"Symbol()\"` string. See the examples.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Symbol/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified symbol value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified symbol value.\n\n## Description\n\nThe `Symbol` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For `Symbol` values, the `toString` method returns a descriptive string in the form `\"Symbol(description)\"`, where `description` is the symbol's [`Symbol.prototype.description`](../../../globals/Symbol/prototype/description.mdx).\n\nThe `toString()` method requires its `this` value to be a `Symbol` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to symbol values.\n\nBecause `Symbol` has a [`[Symbol.toPrimitive]()`](../../../globals/Symbol/toPrimitive.mdx) method, that method always takes priority over `toString()` when a `Symbol` object is [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). However, because `Symbol.prototype[Symbol.toPrimitive]()` returns a symbol primitive, and symbol primitives throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when implicitly converted to a string, the `toString()` method is never implicitly called by the language. To stringify a symbol, you must explicitly call its `toString()` method or use the [`String()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/String#using_string_to_stringify_a_symbol) function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Symbol/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a Symbol object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nThe primitive value of the specified `Symbol` object.\n\n## Description\n\nThe `valueOf()` method of `Symbol` returns the primitive value of a Symbol object as a Symbol data type.\n\nJavaScript calls the `valueOf()` method to convert an object to a primitive value. You rarely need to invoke the `valueOf()` method yourself; JavaScript automatically invokes it when encountering an object where a primitive value is expected.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Symbol/replace.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.replace\n\nThe **`Symbol.replace`** well-known symbol specifies the method that replaces matched substrings of a string. This function is called by the [`String.prototype.replace()`](../../globals/String/prototype/replace.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.replace]()` and [`String.prototype.replace()`](../../globals/String/prototype/replace.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.replace`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Symbol/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.search\n\nThe **`Symbol.search`** well-known symbol specifies the method that returns the index within a string that matches the regular expression. This function is called by the [`String.prototype.search()`](../../globals/String/prototype/search.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.search]()` and [`String.prototype.search()`](../../globals/String/prototype/search.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.search`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Symbol/species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.species\n\nThe well-known symbol **`Symbol.species`** specifies a function-valued property that the constructor function uses to create derived objects.\n\n> **Warning:** The existence of `Symbol.species` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Value\n\nThe well-known symbol `Symbol.species`.\n\n## Description\n\nThe `Symbol.species` accessor property allows subclasses to override the default constructor for objects. This specifies a protocol about how instances should be copied. For example, when you use copying methods of arrays, such as [`Array.prototype.map()`](../../globals/Array/prototype/map.mdx). the `map()` method uses `instance.constructor[Symbol.species]` to get the constructor for constructing the new array.\n\nAll built-in implementations of `Symbol.species` return the `this` value, which is the current instance's constructor. This allows copying methods to create instances of derived classes rather than the base class — for example, `map()` will return an array of the same type as the original array.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Symbol/split.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.split\n\nThe **`Symbol.split`** well-known symbol specifies the method that splits a string at the indices that match a regular expression. This function is called by the [`String.prototype.split()`](../../globals/String/prototype/split.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.split]()` and [`String.prototype.split()`](../../globals/String/prototype/split.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.split`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Symbol/toPrimitive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.toPrimitive\n\nThe **`Symbol.toPrimitive`** well-known symbol specifies a method that accepts a preferred type and returns a primitive representation of an object. It is called in priority by all [type coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) algorithms.\n\n## Value\n\nThe well-known symbol `Symbol.toPrimitive`.\n\n## Description\n\nWith the help of the `Symbol.toPrimitive` property (used as a function value), an object can be converted to a primitive value. The function is called with a string argument `hint`, which specifies the preferred type of the result primitive value. The `hint` argument can be one of `\"number\"`, `\"string\"`, and `\"default\"`.\n\nThe `\"number\"` hint is used by [numeric coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#numeric_coercion) algorithms. The `\"string\"` hint is used by the [string coercion](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) algorithm. The `\"default\"` hint is used by the [primitive coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion) algorithm. The `hint` only acts as a weak signal of preference, and the implementation is free to ignore it (as [`Symbol.prototype[Symbol.toPrimitive]()`](../../globals/Symbol/prototype/@@toPrimitive.mdx) does). The language does not enforce alignment between the `hint` and the result type, although `[Symbol.toPrimitive]()` must return a primitive, or a [`TypeError`](../../globals/TypeError/TypeError.mdx) is thrown.\n\nObjects without the `Symbol.toPrimitive` property are converted to primitives by calling the `valueOf()` and `toString()` methods in different orders, which is explained in more detail in the [type coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) section. `Symbol.toPrimitive` allows full control over the primitive conversion process. For example, `Symbol.prototype.toString()` won't be called, and `Symbol` objects must always be explicitly converted to strings through [`String()`](../../globals/String/String.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Symbol/toStringTag.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.toStringTag\n\nThe **`Symbol.toStringTag`** well-known symbol is a string valued property that is used in the creation of the default string description of an object. It is accessed internally by the [`Object.prototype.toString()`](../../globals/Object/prototype/toString.mdx) method.\n\n## Value\n\nThe well-known symbol `Symbol.toStringTag`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Symbol/unscopables.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.unscopables\n\nThe **`Symbol.unscopables`** well-known symbol is used to specify an object value of whose own and inherited property names are excluded from the [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) environment bindings of the associated object.\n\n## Value\n\nThe well-known symbol `@@unscopables`.\n\n## Description\n\nThe `@@unscopables` symbol (accessed via `Symbol.unscopables`) can be defined on any object to exclude property names from being exposed as lexical variables in [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) environment bindings. Note that when using [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), `with` statements are not available, and this symbol is likely not needed.\n\nSetting a property of the `@@unscopables` object to `true` (or any [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value) will make the corresponding property of the `with` scope object _unscopable_ and therefore won't be introduced to the `with` body scope. Setting a property to `false` (or any [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value) will make it _scopable_ and thus appear as lexical scope variables.\n\nWhen deciding whether `x` is unscopable, the entire prototype chain of the `@@unscopables` property is looked up for a property called `x`. This means if you declared `@@unscopables` as a plain object, `Object.prototype` properties like [`toString`](../../globals/Object/prototype/toString.mdx) would become unscopable as well, which may cause backward incompatibility for legacy code assuming those properties are normally scoped (see [an example here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/unscopables#avoid_using_a_non-null-prototype_object_as_symbol.unscopables)). You are advised to make your custom `@@unscopables` property have `null` as its prototype, like [`Array.prototype[Symbol.unscopables]`](../../globals/Array/prototype/@@unscopables.mdx) does.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/SyntaxError/SyntaxError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SyntaxError\n\nThe **`SyntaxError`** constructor creates a new error object\nthat represents an error when trying to interpret syntactically invalid code.\n\n## Syntax\n\n```js\nnew SyntaxError()\nnew SyntaxError(message)\nnew SyntaxError(message, options)\nnew SyntaxError(message, fileName)\nnew SyntaxError(message, fileName, lineNumber)\n\nSyntaxError()\nSyntaxError(message)\nSyntaxError(message, options)\nSyntaxError(message, fileName)\nSyntaxError(message, fileName, lineNumber)\n```\n\n> **Note:** `SyntaxError()` can be called with or without `new`. Both create a new `SyntaxError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/TextDecoder/TextDecoder.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder()\n\nThe **`TextDecoder()`** constructor returns a newly created `TextDecoder` object for the encoding specified in parameter.\n\n## Syntax\n\n```js\nnew TextDecoder()\nnew TextDecoder(label)\nnew TextDecoder(label, options)\n```\n\n### Parameters\n\n- `label` _**optional**_\n  - : A string, defaulting to `\"utf-8\"`.\n- `options` _**optional**_\n\n  - : An object with the property:\n\n    - `fatal`\n      - : A boolean value indicating if the `TextDecoder.decode()` method must throw a `TypeError` when decoding invalid data.\n        It defaults to `false`, which means that the decoder will substitute malformed data with a replacement character.\n\n    - `ignoreBOM`\n      - : A boolean value indicating whether the [byte order mark](https://www.w3.org/International/questions/qa-byte-order-mark) is ignored.\n        It defaults to `false`.\n\n### Exceptions\n\n- `RangeError`\n  - : Thrown if the value of `label` is unknown, or is one of the values leading to a `'replacement'` decoding algorithm (`\"iso-2022-cn\"` or `\"iso-2022-cn-ext\"`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/TextDecoder/prototype/decode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.decode()\n\nThe **`TextDecoder.decode()`** method returns a string containing text decoded from the buffer passed as a parameter.\n\nThe decoding method is defined in the current `TextDecoder` object.\nThis includes the expected encoding of the data, and how decoding errors are handled.\n\n## Syntax\n\n```js\ndecode()\ndecode(buffer)\ndecode(buffer, options)\n```\n\n### Parameters\n\n- `buffer` _**optional**_\n  - : Is an `ArrayBuffer`, a `TypedArray` or a `DataView` object containing the encoded text to decode.\n- `options` _**optional**_\n\n  - : An object with the property:\n\n    - `stream`\n      - : A boolean flag indicating that additional data will follow in subsequent calls to `decode()`.\n        Set to `true` if processing the data in chunks, and `false` for the final chunk or if the data is not chunked.\n        It defaults to `false`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if there is a decoding error when the property `TextDecoder.fatal` is `true`.\n\n### Return value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/TextDecoder/prototype/encoding.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.encoding\n\nThe **`TextDecoder.encoding`** read-only property returns a string containing the name of the decoding algorithm used by the specific decoder object.\n\nThe encoding is set by the constructor `label` parameter, and defaults to `utf-8`.\n\n## Value\n\nA lower-cased ASCII string, which can be one of the following values:\n\n- The recommended encoding for the Web: `'utf-8'`.\n- The legacy single-byte encodings:\n  ['ibm866'](https://en.wikipedia.org/wiki/Code_page_866),\n  ['iso-8859-2'](https://en.wikipedia.org/wiki/ISO/IEC_8859-2),\n  ['iso-8859-3'](https://en.wikipedia.org/wiki/ISO/IEC_8859-3),\n  ['iso-8859-4'](https://en.wikipedia.org/wiki/ISO/IEC_8859-4),\n  ['iso-8859-5'](https://en.wikipedia.org/wiki/ISO/IEC_8859-5),\n  ['iso-8859-6'](https://en.wikipedia.org/wiki/ISO/IEC_8859-6),\n  ['iso-8859-7'](https://en.wikipedia.org/wiki/ISO/IEC_8859-7),\n  ['iso-8859-8'](https://en.wikipedia.org/wiki/ISO/IEC_8859-8)'`,\n  ['iso-8859-8i'](https://en.wikipedia.org/wiki/ISO-8859-8-I),\n  ['iso-8859-10'](https://en.wikipedia.org/wiki/ISO/IEC_8859-10),\n  ['iso-8859-13'](https://en.wikipedia.org/wiki/ISO/IEC_8859-13),\n  ['iso-8859-14'](https://en.wikipedia.org/wiki/ISO/IEC_8859-14),\n  ['iso-8859-15'](https://en.wikipedia.org/wiki/ISO/IEC_8859-15),\n  ['iso-8859-16'](https://en.wikipedia.org/wiki/ISO/IEC_8859-16),\n  ['koi8-r'](https://en.wikipedia.org/wiki/KOI8-R),\n  ['koi8-u'](https://en.wikipedia.org/wiki/KOI8-U),\n  ['macintosh'](https://en.wikipedia.org/wiki/Mac_OS_Roman),\n  ['windows-874'](https://en.wikipedia.org/wiki/Windows-874),\n  ['windows-1250'](https://en.wikipedia.org/wiki/Windows-1250),\n  ['windows-1251'](https://en.wikipedia.org/wiki/Windows-1251),\n  ['windows-1252'](https://en.wikipedia.org/wiki/Windows-1252),\n  ['windows-1253'](https://en.wikipedia.org/wiki/Windows-1253),\n  ['windows-1254'](https://en.wikipedia.org/wiki/Windows-1254),\n  ['windows-1255'](https://en.wikipedia.org/wiki/Windows-1255),\n  ['windows-1256'](https://en.wikipedia.org/wiki/Windows-1256),\n  ['windows-1257'](https://en.wikipedia.org/wiki/Windows-1257),\n  ['windows-1258'](https://en.wikipedia.org/wiki/Windows-1258), or\n  ['x-mac-cyrillic'](https://en.wikipedia.org/wiki/Macintosh_Cyrillic_encoding).\n- The legacy multi-byte Chinese (simplified) encodings:\n  ['gbk'](https://en.wikipedia.org/wiki/GBK),\n  ['gb18030'](https://en.wikipedia.org/wiki/GB_18030)\n- The legacy multi-byte Chinese (traditional) encoding:\n  ['big5'](https://en.wikipedia.org/wiki/Big5).\n- The legacy multi-byte Japanese encodings:\n  ['euc-jp'](https://en.wikipedia.org/wiki/Extended_Unix_Code#EUC-JP),\n  ['iso-2022-jp'](https://en.wikipedia.org/wiki/ISO/IEC_2022#ISO-2022-JP),\n  ['shift-jis'](https://en.wikipedia.org/wiki/Shift_JIS).\n- The legacy multi-byte Korean encodings:\n  ['euc-kr'](https://en.wikipedia.org/wiki/Extended_Unix_Code#EUC-KR)\n- The legacy miscellaneous encodings:\n  ['utf-16be'](https://en.wikipedia.org/wiki/UTF-16#Byte_order_encoding_schemes),\n  ['utf-16le'](https://en.wikipedia.org/wiki/UTF-16#Byte_order_encoding_schemes),\n  `'x-user-defined'`.\n- A special encoding, `'replacement'`.\n  This decodes empty input into empty output and any other arbitrary-length input into a single replacement character.\n  It is used to prevent attacks that mismatch encodings between the client and server.\n  The following encodings also map to the replacement encoding: `ISO-2022-CN`, `ISO-2022-CN-ext`, ['iso-2022-kr'](https://en.wikipedia.org/wiki/ISO/IEC_2022#ISO-2022-KR) and ['hz-gb-2312'](https://en.wikipedia.org/wiki/HZ_(character_encoding)).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/TextDecoder/prototype/fatal.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.fatal\n\nThe **`fatal`** read-only property of the `TextDecoder` interface is a `Boolean` indicating whether the error mode is fatal.\n\nIf the property is `true` then a decoder will throw a `TypeError` if it encounters malformed data while decoding.\nIf `false` the decoder will substitute the invalid data with the replacement character `U+FFFD` (�).\nThe value of the property is set in the `TextDecoder()` constructor.\n\n## Value\n\nA `boolean` which will return `true` if the error mode is set to `fatal`.\nOtherwise it returns `false`, indicating that the error mode is \"replacement\".\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/TextDecoder/prototype/ignoreBOM.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.ignoreBOM\n\nThe **`ignoreBOM`** read-only property of the `TextDecoder` interface is a `Boolean` indicating whether the [byte order mark](https://www.w3.org/International/questions/qa-byte-order-mark) is ignored.\n\n## Value\n\n`true` if the byte order mark is ignored; `false` otherwise.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/TextEncoder/TextEncoder.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextEncoder()\n\nThe **`TextEncoder()`** constructor returns a newly created `TextEncoder` object that will generate a byte stream with UTF-8 encoding.\n\n## Syntax\n\n```js\nnew TextEncoder()\n```\n\n### Parameters\n\nNone.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/TextEncoder/prototype/encode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextEncoder.encode()\n\nThe **`TextEncoder.encode()`** method takes a string as input, and returns a `Uint8Array` containing the text given in parameters encoded with the specific method for that `TextEncoder` object.\n\n## Syntax\n\n```js\nencode(string)\n```\n\n### Parameters\n\n- `string`\n  - : A string containing the text to encode.\n\n### Return value\n\nA `Uint8Array` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/TextEncoder/prototype/encoding.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextEncoder.encoding\n\nThe **`TextEncoder.encoding`** read-only property returns a string containing the name of the encoding algorithm used by the specific encoder.\n\nIt can only have the following value `utf-8`.\n\n## Value\n\nA string with the value `utf-8`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/TransformStream/TransformStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStream()\n\nThe **`TransformStream()`** constructor creates a new `TransformStream` object which represents a pair of streams: a `WritableStream` representing the writable side, and a `ReadableStream` representing the readable side.\n\n## Syntax\n\n```js\nnew TransformStream()\nnew TransformStream(transformer)\nnew TransformStream(transformer, writableStrategy)\nnew TransformStream(transformer, writableStrategy, readableStrategy)\n```\n\n### Parameters\n\n- `transformer` _**optional**_\n\n  - : An object representing the `transformer`. If not supplied the resulting stream will be an **identity transform stream** which forwards all chunks written to its writable side to its readable side, without any changes.\n\n    The transformer object can contain any of the following methods. In each method `controller` is an instance of `TransformStreamDefaultController`.\n\n    - `start(controller)`\n      - : Called when the `TransformStream` is constructed. It is typically used to enqueue chunks using `TransformStreamDefaultController.enqueue()`.\n    - `transform(chunk, controller)`\n      - : Called when a chunk written to the writable side is ready to be transformed, and performs the work of the transformation stream. If no `transform()` method is supplied, the identity transform is used, and the chunk will be enqueued with no changes.\n    - `flush(controller)`\n      - : Called after all chunks written to the writable side have been successfully transformed, and the writable side is about to be closed.\n\n- `writableStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer. This defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk`. This indicates the size to\n        use for each chunk, in bytes.\n\n- `readableStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer. This defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk`. This indicates the size to\n        use for each chunk, in bytes.\n\n> **Note:** You could define your own custom\n> `readableStrategy` or `writableStrategy`, or use an instance of\n> `ByteLengthQueuingStrategy` or `CountQueuingStrategy`\n> for the object values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/TransformStream/prototype/readable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStream.readable\n\nThe **`readable`** read-only property of the `TransformStream` interface returns the `ReadableStream` instance controlled by this `TransformStream`.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/TransformStream/prototype/writable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStream.writable\n\nThe **`writable`** read-only property of the `TransformStream` interface returns the `WritableStream` instance controlled by this `TransformStream`.\n\n## Value\n\nA `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/TransformStreamDefaultController/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.desiredSize\n\nThe **`desiredSize`** read-only property of the `TransformStreamDefaultController` interface returns the desired size to fill the queue of the associated [`ReadableStream`](../../../globals/ReadableStream/ReadableStream.mdx).\n\nThe internal queue of a `ReadableStream` contains chunks that have been enqueued, but not yet read.\n\nIf the `desiredSize` is `0` then the queue is full. Therefore you can use this information to manually apply backpressure to manage the queue.\n\n## Value\n\nThe desired size.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/TransformStreamDefaultController/prototype/enqueue.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.enqueue()\n\nThe **`enqueue()`** method of the `TransformStreamDefaultController` interface enqueues the given chunk in the readable side of the stream.\n\n## Syntax\n\n```js\nenqueue(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : The chunk being queued. A chunk is a single piece of data. It can be any type of data, and a stream can contain chunks of different types.\n\n### Return value\n\nNone `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream is not readable.\n    This might occur if the stream is errored via `controller.error()`, or when it is closed without its controller's `controller.close()` method ever being called.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/TransformStreamDefaultController/prototype/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.error()\n\nThe **`error()`** method of the `TransformStreamDefaultController` interface errors both sides of the stream. Any further interactions with it will fail with the given error message, and any chunks in the queue will be discarded.\n\n## Syntax\n\n```js\nerror(reason)\n```\n\n### Parameters\n\n- `reason`\n  - : A string containing the error message to be returned on any further interaction with the stream.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/TransformStreamDefaultController/prototype/terminate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.terminate()\n\nThe **`terminate()`** method of the `TransformStreamDefaultController` interface closes the readable side and errors the writable side of the stream.\n\n## Syntax\n\n```js\nterminate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone (`undefined`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/TypeError/TypeError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TypeError\n\nThe **`TypeError()`** constructor creates a new error when an\noperation could not be performed, typically (but not exclusively) when a value is not of\nthe expected type.\n\n## Syntax\n\n```js\nnew TypeError()\nnew TypeError(message)\nnew TypeError(message, options)\nnew TypeError(message, fileName)\nnew TypeError(message, fileName, lineNumber)\n\nTypeError()\nTypeError(message)\nTypeError(message, options)\nTypeError(message, fileName)\nTypeError(message, fileName, lineNumber)\n```\n\n> **Note:** `TypeError()` can be called with or without `new`. Both create a new `TypeError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/URIError/URIError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URIError\n\nThe **`URIError()`** constructor creates an error when a global\nURI handling function was used in a wrong way.\n\n## Syntax\n\n```js\nnew URIError()\nnew URIError(message)\nnew URIError(message, options)\nnew URIError(message, fileName)\nnew URIError(message, fileName, lineNumber)\n\nURIError()\nURIError(message)\nURIError(message, options)\nURIError(message, fileName)\nURIError(message, fileName, lineNumber)\n```\n\n> **Note:** `URIError()` can be called with or without `new`. Both create a new `URIError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/URL/URL.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL()\n\nThe **`URL()`** constructor returns a newly created\n`URL` object representing the URL defined by the parameters.\n\nIf the given base URL or the resulting URL are not valid URLs, the JavaScript\n`TypeError` exception is thrown.\n\n## Syntax\n\n```js\nnew URL(url)\nnew URL(url, base)\n```\n\n### Parameters\n\n- `url`\n  - : A string or any other object with a `toString()` method.\n    If `url` is a relative URL, `base` is\n    required, and will be used as the base URL. If `url` is an\n    absolute URL, a given `base` will be ignored.\n- `base` _**optional**_\n  - : A string representing the base URL to use in cases where\n    `url` is a relative URL. If not specified, it defaults to\n    `undefined`.\n\n> **Note:** The `url` and `base` arguments will\n> each be stringified from whatever value you pass, just like with other Web APIs\n> that accept a string. In particular, you can use an existing\n> `URL` object for either argument, and it will stringify to the\n> object's `URL.href\", \"href` property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/URL/prototype/hash.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.hash\n\nThe **`hash`** property of the\n`URL` interface is a string containing a\n`'#'` followed by the fragment identifier of the URL.\n\nThe fragment is not percent-decoded. If the URL does not\nhave a fragment identifier, this property contains an empty string — `\"\"`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/URL/prototype/host.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.host\n\nThe **`host`** property of the `URL` interface is\na string containing the host, that is the `URL.hostname`, and then, if the `port` of the URL is nonempty, a\n`':'`, followed by the `port` of the URL.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/URL/prototype/hostname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.hostname\n\nThe **`hostname`** property of the `URL` interface\nis a string containing the domain name of the URL.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/URL/prototype/href.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.href\n\nThe **`href`** property of the `URL` interface is\na string containing the whole URL.\n\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/URL/prototype/origin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.origin\n\nThe **`origin`** read-only property of\nthe `URL` interface returns a string containing the\nUnicode serialization of the origin of the represented URL.\n\nThe exact structure\nvaries depending on the type of URL:\n\n- For `http` or `https` URLs, the scheme followed by\n  `'://'`, followed by the domain, followed by `':'`, followed by\n  the port (the default port, `80` and `443` respectively, if\n  explicitly specified).\n- For `file:` URLs, the value is browser dependent.\n- for `blob:` URLs, the origin of the URL following `blob:` will\n  be used. For example, `\"blob:https://mozilla.org\"` will be returned as\n  `\"https://mozilla.org\".`\n\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/URL/prototype/password.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.password\n\nThe **`password`** property of the `URL` interface\nis a string containing the password specified before the domain name.\n\nIf it is set without first setting the `URL.username` property, it silently fails.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/URL/prototype/pathname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.pathname\n\nThe **`pathname`** property of the `URL` interface represents a location in a hierarchical structure. It is a string constructed from a list of path segments, each of which is prefixed by a `/` character. If the URL has no path segments, the value of its `pathname` property will be the empty string.\n\nURLs such as `https` and `http` URLs that have [hierarchical schemes](https://www.rfc-editor.org/rfc/rfc3986#section-1.2.3) (which the URL standard calls \"[special schemes](https://url.spec.whatwg.org/#special-scheme)\") always have at least one (invisible) path segment: the empty string. Thus the `pathname` value for such \"special scheme\" URLs can never be the empty string, but will instead always have a least one `/` character.\n\nFor example, the URL `https://developer.mozilla.org` has just one path segment: the empty string, so its `pathname` value is constructed by prefixing a `/` character to the empty string.\n\nSome systems define the term _slug_ to mean the final segment of a non-empty path if it identifies a page in human-readable keywords. For example, the URL `https://example.org/articles/this-that-other-outre-collection` has `this-that-other-outre-collection` as its slug.\n\nSome systems use the `;` and `=` characters to delimit parameters and parameter values applicable to a path segment. For example, with the URL `https://example.org/users;id=42/tasks;state=open?sort=modified`, a system might extract and use the path segment parameters `id=42` and `state=open` from the path segments `users;id=42` and `tasks;state=open`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/URL/prototype/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.port\n\nThe **`port`** property of the `URL` interface is\na string containing the port number of the URL.\n\n> **Note:** If an input string passed to the `URL()` constructor doesn't contain an explicit port number (e.g., `https://localhost`) or contains a port number that's the default port number corresponding to the protocol part of the input string (e.g., `https://localhost:443`), then in the `URL` object the constructor returns, the value of the port property will be the empty string: `''`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/URL/prototype/protocol.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.protocol\n\nThe **`protocol`** property of the `URL` interface\nis a string representing the protocol scheme of the URL, including the\nfinal `':'`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/URL/prototype/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.search\n\nThe **`search`** property of the `URL` interface\nis a search string, also called a _query string_, that is a\nstring containing a `'?'` followed by the parameters of the\nURL.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/URL/prototype/searchParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.searchParams\n\nThe **`searchParams`** readonly property of the\n`URL` interface returns a `URLSearchParams` object allowing\naccess to the `GET` decoded query arguments contained in the URL.\n\n## Value\n\nA `URLSearchParams` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/URL/prototype/toJSON.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.toJSON()\n\nThe **`toJSON()`** method of the `URL` interface\nreturns a string containing a serialized version of the URL,\nalthough in practice it seems to have the same effect as\n`URL.toString()`.\n\n## Syntax\n\n```js\ntoJSON()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/URL/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.toString()\n\nThe **`URL.toString()`** method returns a\nstring containing the whole URL. It is effectively a read-only version\nof `URL.prototype.href`.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/URL/prototype/username.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.username\n\nThe **`username`** property of the `URL` interface\nis a string containing the username specified before the domain name.\n\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/URLSearchParams/URLSearchParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams()\n\nThe **`URLSearchParams()`** constructor creates and returns a\nnew `URLSearchParams` object.\n\n\n\n## Syntax\n\n```js\nnew URLSearchParams()\nnew URLSearchParams(options)\n```\n\n### Parameters\n\n- `options` _**optional**_\n  - : One of:\n    - A string, which will be parsed from `application/x-www-form-urlencoded` format. A leading `'?'` character is ignored.\n    - A literal sequence of name-value string pairs, or any object with an iterator that produces a sequence of string pairs.\n    - A record of string keys and string values. Note that nesting is not supported.\n\n### Return value\n\nA `URLSearchParams` object instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/URLSearchParams/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.append()\n\nThe **`append()`** method of the `URLSearchParams`\ninterface appends a specified key/value pair as a new search parameter.\n\nAs shown in the example below, if the same key is appended multiple times it will\nappear in the parameter string multiple times for each value.\n\n## Syntax\n\n```js\nappend(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to append.\n- `value`\n  - : The value of the parameter to append.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/URLSearchParams/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.delete()\n\nThe **`delete()`** method of the `URLSearchParams`\ninterface deletes the given search parameter and all its associated values, from the\nlist of all search parameters.\n\n## Syntax\n\n```js\ndelete(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to be deleted.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/URLSearchParams/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.entries()\n\nThe **`entries()`** method of the\n`URLSearchParams` interface returns an\niterator allowing iteration through all key/value\npairs contained in this object. The iterator returns key/value pairs in the same order as they appear in the query string. The key and value of each pair are\nstring objects.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/URLSearchParams/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.forEach()\n\nThe **`forEach()`** method of the\n`URLSearchParams` interface allows iteration through all values contained\nin this object via a callback function.\n\n## Syntax\n\n```js\nforEach(callback)\nforEach(callback, thisArg)\n```\n\n### Parameters\n\n- `callback`\n\n  - : Function to execute on each element, which is passed the following arguments:\n\n    - `value`\n      - : The value of the current entry being processed in the `URLSearchParams` object.\n    - `key`\n      - : The key of the current entry being processed in the `URLSearchParams` object.\n    - `searchParams`\n      - : The `URLSearchParams` object the `forEach()` was called upon.\n\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `callback`.\n\n### Return value\n\nNone `undefined`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/URLSearchParams/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.get()\n\nThe **`get()`** method of the `URLSearchParams`\ninterface returns the first value associated to the given search parameter.\n\n## Syntax\n\n```js\nget(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to return.\n\n### Return value\n\nA string if the given search parameter is found; otherwise,\n**`null`**.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/URLSearchParams/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.has()\n\nThe **`has()`** method of the `URLSearchParams`\ninterface returns a boolean value that indicates whether a parameter with the\nspecified name exists.\n\n## Syntax\n\n```js\nhas(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to find.\n\n### Return value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/URLSearchParams/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.keys()\n\nThe **`keys()`** method of the `URLSearchParams`\ninterface returns an iterator allowing iteration\nthrough all keys contained in this object. The keys are string\nobjects.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/URLSearchParams/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.set()\n\nThe **`set()`** method of the `URLSearchParams`\ninterface sets the value associated with a given search parameter to the given value.\nIf there were several matching values, this method deletes the others. If the search\nparameter doesn't exist, this method creates it.\n\n## Syntax\n\n```js\nset(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to set.\n- `value`\n  - : The value of the parameter to set.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/URLSearchParams/prototype/sort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.sort()\n\nThe **`URLSearchParams.sort()`** method sorts all key/value\npairs contained in this object in place and returns `undefined`. The sort\norder is according to unicode code points of the keys. This method uses a stable sorting\nalgorithm (i.e. the relative order between key/value pairs with equal keys will be\npreserved).\n\n## Syntax\n\n```js\nsort()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/URLSearchParams/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.toString()\n\nThe **`toString()`** method of the\n`URLSearchParams` interface returns a query string suitable for use in a\nURL.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string, without the question mark. (Returns an empty string if no\nsearch parameters have been set.)\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/URLSearchParams/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.values()\n\nThe **`values()`** method of the `URLSearchParams`\ninterface returns an iterator allowing iteration\nthrough all values contained in this object. The values are string\nobjects.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Uint16Array/Uint16Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint16Array\n\nThe **`Uint16Array()`** typed array constructor creates an\narray of 16-bit unsigned integers in the platform byte order.\n\n## Syntax\n\n```js\nnew Uint16Array()\nnew Uint16Array(length)\nnew Uint16Array(typedArray)\nnew Uint16Array(object)\n\nnew Uint16Array(buffer)\nnew Uint16Array(buffer, byteOffset)\nnew Uint16Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint16Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Uint32Array/Uint32Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint32Array\n\nThe **`Uint32Array()`** typed array constructor creates an\narray of 32-bit unsigned integers in the platform byte order. If control over byte order\nis needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are initialized to\n`0`. Once established, you can reference elements in the array using the\nobject's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Uint32Array()\nnew Uint32Array(length)\nnew Uint32Array(typedArray)\nnew Uint32Array(object)\n\nnew Uint32Array(buffer)\nnew Uint32Array(buffer, byteOffset)\nnew Uint32Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint32Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Uint8Array/Uint8Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint8Array\n\nThe **`Uint8Array()`** constructor creates a typed array of\n8-bit unsigned integers. The contents are initialized to `0`. Once\nestablished, you can reference elements in the array using the object's methods, or\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew Uint8Array()\nnew Uint8Array(length)\nnew Uint8Array(typedArray)\nnew Uint8Array(object)\n\nnew Uint8Array(buffer)\nnew Uint8Array(buffer, byteOffset)\nnew Uint8Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint8Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/Uint8ClampedArray/Uint8ClampedArray.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint8ClampedArray\n\nThe **`Uint8ClampedArray()`** constructor creates a typed array\nof 8-bit unsigned integers clamped to 0-255; if you specified a value that is out of the\nrange of \\[0,255], 0 or 255 will be set instead; if you specify a non-integer, the\nnearest integer will be set. The contents are initialized to `0`. Once\nestablished, you can reference elements in the array using the object's methods, or\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew Uint8ClampedArray()\nnew Uint8ClampedArray(length)\nnew Uint8ClampedArray(typedArray)\nnew Uint8ClampedArray(object)\n\nnew Uint8ClampedArray(buffer)\nnew Uint8ClampedArray(buffer, byteOffset)\nnew Uint8ClampedArray(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint8ClampedArray()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/WeakMap/WeakMap.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap\n\nThe **`WeakMap()` constructor** creates a `WeakMap` object, optionally based on a provided `Array` or other iterable object.\n\n## Syntax\n\n```js\nnew WeakMap()\nnew WeakMap(iterable)\n```\n\n> **Note:** `WeakMap()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable`\n  - : An `Array` or other object that implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol)  that returns an iterator object that produces a two-element array-like object whose first element is a value that will be used as a `WeakMap` key and whose second element is the value to associate with that key. Each key-value pair will be added to the new `WeakMap`. null is treated as undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/WeakMap/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.delete()\n\nThe **`delete()`** method removes the specified element from a\n`WeakMap` object.\n\n## Syntax\n\n```js\ndelete(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to remove from the `WeakMap` object.\n\n### Return value\n\n`true` if an element in the `WeakMap` object has been removed\nsuccessfully. `false` if the key is not found in the `WeakMap` or\nif the key is not an object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/WeakMap/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.get()\n\nThe **`get()`** method returns a specified element from a\n`WeakMap` object.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key`\n  - : Required. The key of the element to return from the `WeakMap` object.\n\n### Return value\n\nThe element associated with the specified key in the `WeakMap` object. If\nthe key can't be found, [`undefined`](../../../globals/undefined.mdx) is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/WeakMap/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.has()\n\nThe **`has()`** method returns a boolean indicating whether an\nelement with the specified key exists in the `WeakMap` object or not.\n\n## Syntax\n\n```js\nhas(key)\n```\n\n### Parameters\n\n- `key`\n  - : Required. The key of the element to test for presence in the `WeakMap`\n    object.\n\n### Return value\n\n- Boolean\n  - : Returns `true` if an element with the specified key exists in the\n    `WeakMap` object; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/WeakMap/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.set\n\nThe **`set()`** method adds a new element with a specified key\nand value to a `WeakMap` object.\n\n## Syntax\n\n```js\nset(key, value)\n```\n\n### Parameters\n\n- `key`\n  - : Required. Must be `object`. The key of the element to add to the\n    `WeakMap` object.\n- `value`\n  - : Required. Any value. The value of the element to add to the `WeakMap`\n    object.\n\n### Return value\n\nThe `WeakMap` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/WeakRef/WeakRef.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakRef\n\nThe **`WeakRef`** constructor creates a `WeakRef`\nobject referring to a given target object.\n\n## Syntax\n\n```js\nnew WeakRef(targetObject)\n```\n\n> **Note:** `WeakRef()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `targetObject`\n  - : The target object the WeakRef should refer to (also called the _referent_).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/WeakRef/prototype/deref.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakRef.prototype.deref()\n\nThe `deref` method returns the `WeakRef` instance's target\nobject, or `undefined` if the target object has been garbage-collected.\n\n## Syntax\n\n```js\nderef()\n```\n\n### Return value\n\nThe target object of the WeakRef, or `undefined` if the object has been\ngarbage-collected.\n\n## Description\n\nSee the [Notes on WeakRefs](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WeakRef#notes_on_weakrefs) section of the `WeakRef` page for some important notes.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/WeakSet/WeakSet.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet\n\nThe **`WeakSet`** constructor lets you create\n`WeakSet` objects that store weakly held _objects_ in a collection.\n\n## Syntax\n\n```js\nnew WeakSet()\nnew WeakSet(iterable)\n```\n\n> **Note:** `WeakSet()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable` _**optional**_\n  - : If an [iterable object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) is passed, all of its elements will be added to the new\n    `WeakSet`. null is treated as undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/WeakSet/prototype/add.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet.prototype.add\n\nThe **`add()`** method appends a new object to the end of a\n`WeakSet` object.\n\n## Syntax\n\n```js\nadd(value)\n```\n\n### Parameters\n\n- value\n  - : Required. The object to add to the `WeakSet` collection.\n\n### Return value\n\nThe `WeakSet` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/WeakSet/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet.prototype.delete\n\nThe **`delete()`** method removes the specified element from a\n`WeakSet` object.\n\n## Syntax\n\n```js\ndelete(value)\n```\n\n### Parameters\n\n- `value`\n  - : Required. The object remove from the `WeakSet` object.\n\n### Return value\n\n`true` if an element in the `WeakSet` object has been removed\nsuccessfully. `false` if the `value` is not found in\nthe `WeakSet` or if the `value` is not an object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/WeakSet/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet.prototype.has\n\nThe **`has()`** method returns a boolean indicating whether an\nobject exists in a `WeakSet` or not.\n\n## Syntax\n\n```js\nhas(value)\n```\n\n### Parameters\n\n- `value`\n  - : Required. The object to test for presence in the `WeakSet`.\n\n### Return value\n\n- Boolean\n  - : Returns `true` if an element with the specified value exists in the\n    `WeakSet` object; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/WorkerLocation/WorkerLocation.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# WorkerLocation\n\nThe **`WorkerLocation`** interface defines the absolute location of the script executed by the Worker. Such an object is initialized for each worker and is available via the [`location`](../../globals/location.mdx) property obtained by calling `globalThis.location`.\n\n## Instance properties\n\n- [`WorkerLocation.href`](../../globals/WorkerLocation/href.mdx) _**read-only**_\n  - : Returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location.\n- [`WorkerLocation.protocol`](../../globals/WorkerLocation/protocol.mdx) _**read-only**_\n  - : Returns the [`protocol`](../../globals/URL/prototype/protocol.mdx) part of the worker's location.\n- [`WorkerLocation.host`](../../globals/WorkerLocation/host.mdx) _**read-only**_\n  - : Returns the [`host`](../../globals/URL/prototype/host.mdx) part of the worker's location.\n- [`WorkerLocation.hostname`](../../globals/WorkerLocation/hostname.mdx) _**read-only**_\n  - : Returns the [`hostname`](../../globals/URL/prototype/hostname.mdx) part of the worker's location.\n- [`WorkerLocation.origin`](../../globals/WorkerLocation/origin.mdx) _**read-only**_\n  - : Returns the worker's [`origin`](../../globals/URL/prototype/origin.mdx).\n- [`WorkerLocation.port`](../../globals/WorkerLocation/port.mdx) _**read-only**_\n  - : Returns the [`port`](../../globals/URL/prototype/port.mdx) part of the worker's location.\n- [`WorkerLocation.pathname`](../../globals/WorkerLocation/pathname.mdx) _**read-only**_\n  - : Returns the [`pathname`](../../globals/URL/prototype/pathname.mdx) part of the worker's location.\n- [`WorkerLocation.search`](../../globals/WorkerLocation/search.mdx) _**read-only**_\n  - : Returns the [`search`](../../globals/URL/prototype/search.mdx) part of the worker's location.\n- [`WorkerLocation.hash`](../../globals/WorkerLocation/hash.mdx) _**read-only**_\n  - : Returns the [`hash`](../../globals/URL/prototype/hash.mdx) part of the worker's location.\n\n## Instance methods\n\n- [`WorkerLocation.toString`](../../globals/WorkerLocation/toString.mdx)\n  - : Returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location. It is a synonym for [`WorkerLocation.href`](../../globals/WorkerLocation/href.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/WorkerLocation/hash.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.hash\n\nThe **`hash`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`hash`](../../globals/URL/prototype/hash.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/WorkerLocation/host.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.host\n\nThe **`host`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`host`](../../globals/URL/prototype/host.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/WorkerLocation/hostname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.hostname\n\nThe **`hostname`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`hostname`](../../globals/URL/prototype/hostname.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/WorkerLocation/href.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.href\n\nThe **`href`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/WorkerLocation/origin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.origin\n\nThe **`origin`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the worker's [`origin`](../../globals/URL/prototype/origin.mdx).\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/WorkerLocation/pathname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.pathname\n\nThe **`pathname`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`pathname`](../../globals/URL/prototype/pathname.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/WorkerLocation/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.port\n\nThe **`port`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`port`](../../globals/URL/prototype/port.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/WorkerLocation/protocol.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.protocol\n\nThe **`protocol`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`protocol`](../../globals/URL/prototype/protocol.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/WorkerLocation/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.search\n\nThe **`search`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`search`](../../globals/URL/prototype/search.mdx) part of the worker's location.\n\n## Value\n\nA string.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/WorkerLocation/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.toString()\n\nThe **`toString()`** method of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location. It is a synonym for [`WorkerLocation.href`](../../globals/WorkerLocation/href.mdx).\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone [`undefined`](../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/WritableStream/WritableStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream()\n\nThe **`WritableStream()`** constructor creates\na new `WritableStream` object instance.\n\n## Syntax\n\n```js\nnew WritableStream(underlyingSink)\nnew WritableStream(underlyingSink, queuingStrategy)\n```\n\n### Parameters\n\n- `underlyingSink` _**optional**_\n\n  - : An object containing methods and properties that define how the constructed stream\n    instance will behave. `underlyingSink` can contain the following:\n\n    - `start(controller)` _**optional**_\n      - : This is a method, called immediately when the object is constructed. The\n        contents of this method are defined by the developer, and should aim to get access\n        to the underlying sink. If this process is to be done asynchronously, it can\n        return a promise to signal success or failure. The `controller`\n        parameter passed to this method is a\n        `WritableStreamDefaultController`. This can be used by the developer\n        to control the stream during set up.\n    - `write(chunk, controller)` _**optional**_\n      - : This method, also defined by the developer, will be called when a new chunk of\n        data (specified in the `chunk` parameter) is ready to be written to the\n        underlying sink. It can return a promise to signal success or failure of the write\n        operation. The `controller` parameter passed to this method is a\n        `WritableStreamDefaultController` that can be used by the developer\n        to control the stream as more chunks are submitted for writing. This method will\n        be called only after previous writes have succeeded, and never after the stream is\n        closed or aborted (see below).\n    - `close(controller)` _**optional**_\n      - : This method, also defined by the developer, will be called if the app signals\n        that it has finished writing chunks to the stream. The contents should do whatever\n        is necessary to finalize writes to the underlying sink, and release access to it.\n        If this process is asynchronous, it can return a promise to signal success or\n        failure. This method will be called only after all queued-up writes have\n        succeeded. The `controller` parameter passed to this method is a\n        `WritableStreamDefaultController`, which can be used to control the\n        stream at the end of writing.\n    - `abort(reason)` _**optional**_\n      - : This method, also defined by the developer, will be called if the app signals\n        that it wishes to abruptly close the stream and put it in an errored state. It can\n        clean up any held resources, much like `close()`, but\n        `abort()` will be called even if writes are queued up — those chunks\n        will be thrown away. If this process is asynchronous, it can return a promise to\n        signal success or failure. The `reason` parameter contains a\n        string describing why the stream was aborted.\n\n- `queuingStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer — this defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk` — this indicates the size to use for each chunk, in bytes.\n\n    > **Note:** You could define your own custom\n    > `queuingStrategy`, or use an instance of\n    > `ByteLengthQueuingStrategy` or `CountQueuingStrategy`\n    > for this object value. If no `queuingStrategy` is supplied, the default\n    > used is the same as a `CountQueuingStrategy` with a high water mark of 1\\.\n\n### Return value\n\nAn instance of the `WritableStream` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/WritableStream/prototype/abort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream.abort()\n\nThe **`abort()`** method of the `WritableStream` interface aborts the stream, signaling that the producer can no longer successfully write to the stream and it is to be immediately moved to an error state, with any queued writes discarded.\n\n## Syntax\n\n```js\nabort(reason)\n```\n\n### Parameters\n\n- `reason`\n  - : A string providing a human-readable reason for the abort.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason` parameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to abort is not a `WritableStream`, or it is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/WritableStream/prototype/getWriter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream.getWriter()\n\nThe **`getWriter()`** method of the `WritableStream` interface returns a new instance of `WritableStreamDefaultWriter` and locks the stream to that instance.\nWhile the stream is locked, no other writer can be acquired until this one is released.\n\n## Syntax\n\n```js\ngetWriter()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `WritableStreamDefaultWriter` object instance.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to create a writer for is not a `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/WritableStream/prototype/locked.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream.locked\n\nThe **`locked`** read-only property of the `WritableStream` interface returns a boolean indicating whether the `WritableStream` is locked to a writer.\n\n## Value\n\nA boolean value indicating whether or not the writable stream is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/WritableStreamDefaultController/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultController.error()\n\nThe **`error()`** method of the\n`WritableStreamDefaultController` interface causes any future interactions\nwith the associated stream to error.\n\nThis method is rarely used, since usually it suffices to return a rejected promise from\none of the underlying sink's methods. However, it can be useful for suddenly shutting\ndown a stream in response to an event outside the normal lifecycle of interactions with\nthe underlying sink.\n\n## Syntax\n\n```js\nerror(message)\n```\n\n### Parameters\n\n- `message`\n  - : A string representing the error you want future interactions to\n    fail with.\n\n### Return value\n\nNone `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to error is not a `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/WritableStreamDefaultWriter/WritableStreamDefaultWriter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter()\n\nThe **`WritableStreamDefaultWriter()`**\nconstructor creates a new `WritableStreamDefaultWriter` object instance.\n\n## Syntax\n\n```js\nnew WritableStreamDefaultWriter(stream)\n```\n\n### Parameters\n\n- `stream`\n  - : The `WritableStream` to be written to.\n\n### Return value\n\nAn instance of the `WritableStreamDefaultWriter` object.\n\n### Exceptions\n\n- `TypeError`\n  - : The provided `stream` value is not a `WritableStream`, or it\n    is locked to another writer already.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/WritableStreamDefaultWriter/prototype/abort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.abort()\n\nThe **`abort()`** method of the\n`WritableStreamDefaultWriter` interface aborts the stream, signaling that\nthe producer can no longer successfully write to the stream and it is to be immediately\nmoved to an error state, with any queued writes discarded.\n\nIf the writer is active, the `abort()` method behaves the same as that for\nthe associated stream (`WritableStream.abort()`). If not, it returns a\nrejected promise.\n\n## Syntax\n\n```js\nabort()\nabort(reason)\n```\n\n### Parameters\n\n- `reason` _**optional**_\n  - : A string representing a human-readable reason for the abort.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason`\nparameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to abort is not a `WritableStream`, or it is\n    locked.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/WritableStreamDefaultWriter/prototype/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.close()\n\nThe **`close()`** method of the\n`WritableStreamDefaultWriter` interface closes the associated writable\nstream.\n\nThe underlying sink will finish processing any previously-written chunks, before\ninvoking the close behavior. During this time any further attempts to write will fail\n(without erroring the stream).\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise`, which fulfills with the `undefined` if all\nremaining chunks were successfully written before the close, or rejects with an error if\na problem was encountered during the process.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to close is not a `WritableStream`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/WritableStreamDefaultWriter/prototype/closed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.closed\n\nThe **`closed`** read-only property of the\n`WritableStreamDefaultWriter` interface returns a\n`Promise` that fulfills if the stream becomes closed, or rejects if\nthe stream errors or the writer's lock is released.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/WritableStreamDefaultWriter/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.desiredSize\n\nThe **`desiredSize`** read-only property of the\n`WritableStreamDefaultWriter` interface returns the desired size required\nto fill the stream's internal queue.\n\n## Value\n\nAn integer. Note that this can be negative if the queue is over-full.\n\nThe value will be `null` if the stream cannot be successfully written to\n(due to either being errored, or having an abort queued up), and zero if the stream is\nclosed.\n\n### Exceptions\n\n- `TypeError`\n  - : The writer's lock is released.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/WritableStreamDefaultWriter/prototype/ready.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.ready\n\nThe **`ready`** read-only property of the\n`WritableStreamDefaultWriter` interface returns a `Promise`\nthat resolves when the desired size of the stream's internal queue transitions from\nnon-positive to positive, signaling that it is no longer applying backpressure.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/WritableStreamDefaultWriter/prototype/releaseLock.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.releaseLock()\n\nThe **`releaseLock()`** method of the\n`WritableStreamDefaultWriter` interface releases the writer's lock on the\ncorresponding stream. After the lock is released, the writer is no longer active. If the\nassociated stream is errored when the lock is released, the writer will appear errored\nin the same way from now on; otherwise, the writer will appear closed.\n\n## Syntax\n\n```js\nreleaseLock()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone `undefined`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/WritableStreamDefaultWriter/prototype/write.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.write()\n\nThe **`write()`** method of the\n`WritableStreamDefaultWriter` interface writes a passed chunk of data to a\n`WritableStream` and its underlying sink, then returns a\n`Promise` that resolves to indicate the success or failure of the write\noperation.\n\nNote that what \"success\" means is up to the underlying sink; it might indicate that the\nchunk has been accepted, and not necessarily that it is safely saved to its ultimate\ndestination.\n\n## Syntax\n\n```js\nwrite(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : A block of binary data to pass to the `WritableStream`.\n\n### Return value\n\nA `Promise`, which fulfills with the `undefined` upon a\nsuccessful write, or rejects if the write fails or stream becomes errored before the\nwriting process is initiated.\n\n### Exceptions\n\n- `TypeError`\n  - : The target stream is not a writable stream, or it does not have an owner.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/atob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# atob()\n\nThe **`atob()`** function decodes a\nstring of data which has been encoded using Base64 encoding. You can use\nthe `btoa()` method to encode and transmit\ndata which may otherwise cause communication problems, then transmit it and use the\n`atob()` method to decode the data again. For example, you can encode,\ntransmit, and decode control characters such as ASCII values 0 through 31.\n\nFor use with Unicode or UTF-8 strings, see the note on \"Unicode strings\" in the page\nfor `btoa()`.\n\n## Syntax\n\n```js\natob(encodedData)\n```\n\n### Parameters\n\n- `encodedData`\n  - : A binary string (i.e., a string in which each character in the string is treated as a byte of binary data) containing base64-encoded data.\n\n### Return value\n\nAn ASCII string containing decoded data from `encodedData`.\n\n### Exceptions\n\n- `InvalidCharacterError`\n  - : Thrown if `encodedData` is not valid base64.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/btoa.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# btoa()\n\nThe **`btoa()`** method creates a\nBase64-encoded ASCII string from a _binary string_ (i.e., a\nstring in which each character in the string is treated as a byte\nof binary data).\n\nYou can use this method to encode data which may otherwise cause communication\nproblems, transmit it, then use the `atob()` method to decode the data again. For example, you can encode control\ncharacters such as ASCII values 0 through 31.\n\n## Syntax\n\n```js\nbtoa(stringToEncode)\n```\n\n### Parameters\n\n- `stringToEncode`\n  - : The _binary string_ to encode.\n\n### Return value\n\nAn ASCII string containing the Base64 representation of\n`stringToEncode`.\n\n### Exceptions\n\n- `InvalidCharacterError`\n  - : The string contained a character that did not fit in a single byte. See \"Unicode\n    strings\" below for more detail.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/clearInterval.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# clearInterval()\n\nThe global **`clearInterval()`** method cancels a timed, repeating action which\nwas previously established by a call to `setInterval()`.\nIf the parameter provided does not identify a previously established action,\nthis method does nothing.\n\n## Syntax\n\n```js\nclearInterval(intervalID)\n```\n\n### Parameters\n\n- `intervalID`\n  - : The identifier of the repeated action you want to cancel. This ID was returned by\n    the corresponding call to `setInterval()`.\n\nIt's worth noting that the pool of IDs used by\n`setInterval()` and\n`setTimeout()` are shared, which\nmeans you can technically use `clearInterval()` and\n`clearTimeout()` interchangeably.\nHowever, for clarity, you should avoid doing so.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/clearTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# clearTimeout()\n\nThe global **`clearTimeout()`** method cancels a timeout previously established\nby calling `setTimeout()`.\n\nIf the parameter provided does not identify a previously established action,\nthis method does nothing.\n\n## Syntax\n\n```js\nclearTimeout(timeoutID)\n```\n\n### Parameters\n\n- `timeoutID`\n  - : The identifier of the timeout you want to cancel. This ID was returned by the\n    corresponding call to `setTimeout()`.\n\nIt's worth noting that the pool of IDs used by\n`setTimeout()` and\n`setInterval()` are shared, which\nmeans you can technically use `clearTimeout()` and\n`clearInterval()`\ninterchangeably. However, for clarity, you should avoid doing so.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/console/assert.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.assert()\n\nThe **`console.assert()`** method writes an error message to\nthe console if the assertion is false. If the assertion is true, nothing happens.\n\n## Syntax\n\n```js\nassert(assertion, obj1)\nassert(assertion, obj1, obj2)\nassert(assertion, obj1, obj2, /* … ,*/ objN)\n\nassert(assertion, msg)\nassert(assertion, msg, subst1)\nassert(assertion, msg, subst1, /* … ,*/ substN)\n```\n\n### Parameters\n\n- `assertion`\n  - : Any boolean expression. If the assertion is false, the message is written to the\n    console.\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output.\n- `msg`\n  - : A JavaScript string containing zero or more substitution strings.\n- `subst1` … `substN`\n  - : JavaScript objects with which to replace substitution strings within\n    `msg`. This parameter gives you additional control over the format of the\n    output.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/console/clear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.clear()\n\nThe **`console.clear()`** method clears the console if the console allows it.\n\n## Syntax\n\n```js\nclear()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/console/count.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.count()\n\nThe **`console.count()`** method logs the number of times that\nthis particular call to `count()` has been called.\n\n\n## Syntax\n\n```js\ncount()\ncount(label)\n```\n\n### Parameters\n\n- `label` _optional_\n  - : A string. If supplied, `count()` outputs the number of\n    times it has been called with that label. If omitted, `count()` behaves as\n    though it was called with the \"default\" label.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/console/countReset.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.countReset()\n\nThe **`console.countReset()`** method resets counter used with `console.count()`.\n\n## Syntax\n\n```js\ncountReset()\ncountReset(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : A string. If supplied, `countReset()` resets the count for\n    that label to 0. If omitted, `countReset()` resets the default counter to\n    0.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/console/debug.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.debug()\n\nThe **`console.debug()`** method outputs a message to the console at the \"debug\" log level.\n\n## Syntax\n\n```js\ndebug(obj1)\ndebug(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output to the console.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/console/dir.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.dir()\n\nThe method **`console.dir()`** displays a list of the properties of\nthe specified JavaScript object.\n\n## Syntax\n\n```js\ndir(object)\n```\n\n### Parameters\n\n- `object`\n  - : A JavaScript object whose properties should be output.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/console/dirxml.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.dirxml()\n\nThe **`console.dirxml()`** method displays the supplied object in the console.\n\n## Syntax\n\n```js\ndirxml(object)\n```\n\n### Parameters\n\n- `object`\n  - : A JavaScript object whose properties should be output.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/console/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.error()\n\nThe **`console.error()`** method outputs an error message console.\n\n## Syntax\n\n```js\nerror(obj1)\nerror(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of\n    these objects are appended together in the order listed and output.\n\n### Return value\n\nNone `undefined`."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/console/group.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.group()\n\nThe **`console.group()`** method creates a new inline group in the console, until `console.groupEnd()` is called.\n\n## Syntax\n\n```js\ngroup()\ngroup(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : Label for the group.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/console/groupCollapsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.groupCollapsed()\n\nThe **`console.groupCollapsed()`** method creates a new inline group in the Web Console. Unlike `console.group()`,\nhowever, the new group is created collapsed. The user will need to use the disclosure\nbutton next to it to expand it, revealing the entries created in the group.\n\nCall `console.groupEnd()` to back out to the parent group.\n\n## Syntax\n\n```js\ngroupCollapsed()\ngroupCollapsed(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : Label for the group.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/console/groupEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.groupEnd()\n\nThe **`console.groupEnd()`** method exits the current inline group in the console.\n\n## Syntax\n\n```js\ngroupEnd()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/console/info.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.info()\n\nThe **`console.info()`** method outputs an informational message to the console.\n\n## Syntax\n\n```js\ninfo(obj1)\ninfo(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/console/log.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.log()\n\nThe **`console.log()`** method outputs a message to the console.\n\n## Syntax\n\n```js\nlog(obj1)\nlog(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output. Please be warned that if\n    you log objects in the latest versions of Chrome and Firefox what you get logged on\n    the console is a _reference to the object_, which is not necessarily the\n    'value' of the object at the moment in time you call `console.log()`, but\n    it is the value of the object at the moment you open the console.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/console/time.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.time()\n\nThe **`console.time()`** method starts a timer you can use to track\nhow long an operation takes. You give each timer a unique name. When you call `console.timeEnd()` with the same name, the\nbrowser will output the time, in milliseconds, that elapsed since the timer was started.\n\n## Syntax\n\n```js\ntime(label)\n```\n\n### Parameters\n\n- `label`\n  - : A `string` representing the name to give the new timer. This will identify the timer; use the same name when\n    calling `console.timeEnd()` to stop the timer and get the time output to\n    the console.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/console/timeEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.timeEnd()\n\nThe **`console.timeEnd()`** stops a timer that was previously started by calling `console.time()`.\n\n## Syntax\n\n```js\ntimeEnd(label)\n```\n\n### Parameters\n\n- `label`\n  - : A `string` representing the name of the timer to stop. Once stopped, the elapsed time is automatically\n    displayed in the console.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/console/timeLog.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.timeLog()\n\nThe **`console.timeLog()`** method logs the current value of a timer that was previously started by calling `console.time()`.\n\n## Syntax\n\n```js\ntimeLog()\ntimeLog(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : The name of the timer to log to the console. If this is omitted the label \"default\" is used.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/console/trace.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.trace()\n\nThe **`console.trace()`** method outputs a stack trace to the console.\n\n## Syntax\n\n```js\ntrace()\ntrace(object1, /* …, */ objectN)\n```\n\n### Parameters\n\n- `objects` __optional__\n  - : Zero or more objects to be output to console along with the trace. These are\n    assembled and formatted the same way they would be if passed to the `console.log()` method.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/console/warn.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.warn()\n\nThe **`console.warn()`** method outputs a warning message to the console.\n\n## Syntax\n\n```js\nwarn(obj1)\nwarn(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/crypto/getRandomValues.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Crypto.getRandomValues()\n\nThe **`Crypto.getRandomValues()`** method lets you get cryptographically strong random values.\nThe array given as the parameter is filled with random numbers (random in its cryptographic meaning).\n\n## Syntax\n\n```js\ngetRandomValues(typedArray)\n```\n\n### Parameters\n\n- `typedArray`\n  - : An integer-based `TypedArray`, that is one of: `Int8Array`, `Uint8Array`,\n    `Uint8ClampedArray`, `Int16Array`, `Uint16Array`,\n    `Int32Array`, `Uint32Array`, `BigInt64Array`,\n    `BigUint64Array` (but **not** `Float32Array` nor `Float64Array`).\n    All elements in the array will be overwritten with random numbers.\n\n### Return value\n\nThe same array passed as `typedArray` but with its contents replaced with the newly generated random numbers.\nNote that `typedArray` is modified in-place, and no copy is made.\n\n### Exceptions\n\n- `QuotaExceededError`\n  - : Thrown if the `byteLength` of `typedArray` exceeds 65,536.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/crypto/randomUUID.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Crypto.randomUUID()\n\nThe **`randomUUID()`** method is used to generate a v4 [UUID](https://developer.mozilla.org/en-US/docs/Glossary/UUID) using a cryptographically secure random number generator.\n\n## Syntax\n\n```js\nrandomUUID()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string containing a randomly generated, 36 character long v4 UUID."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/crypto/subtle.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Crypto.subtle\n\nThe **`Crypto.subtle`** read-only property returns a\n[`SubtleCrypto`](../SubtleCrypto/SubtleCrypto.mdx) which can then be used to perform low-level\ncryptographic operations.\n\n## Value\n\nA [`SubtleCrypto`](../SubtleCrypto/SubtleCrypto.mdx) object you can use to interact with the Web Crypto API's\nlow-level cryptography features.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/decodeURI.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# decodeURI\n\nThe **`decodeURI()`** function decodes a Uniform Resource Identifier (URI) previously created by [`encodeURI()`](../globals/encodeURI.mdx) or a similar routine.\n\n## Syntax\n\n```js\ndecodeURI(encodedURI)\n```\n\n### Parameters\n\n- `encodedURI`\n  - : A complete, encoded Uniform Resource Identifier.\n\n### Return value\n\nA new string representing the unencoded version of the given encoded Uniform Resource Identifier (URI).\n\n### Exceptions\n\n- [`URIError`](../globals/URIError/URIError.mdx)\n  - : Thrown if `encodedURI` contains a `%` not followed by two hexadecimal digits, or if the escape sequence does not encode a valid UTF-8 character.\n\n## Description\n\n`decodeURI()` is a function property of the global object.\n\nThe `decodeURI()` function decodes the URI by treating each escape sequence in the form `%XX` as one UTF-8 code unit (one byte). In UTF-8, the number of leading 1 bits in the first byte, which may be 0 (for 1-byte ASCII characters), 2, 3, or 4, indicates the number of bytes in the character. So by reading the first escape sequence, `decodeURI()` can determine how many more escape sequences to consume. If `decodeURI()` fails to find the expected number of sequences, or if the escape sequences don't encode a valid UTF-8 character, a [`URIError`](../globals/URIError/URIError.mdx) is thrown.\n\n`decodeURI()` decodes all escape sequences, but if the escape sequence encodes one of the following characters, the escape sequence is preserved in the output string (because they are part of the URI syntax):\n\n```\n; / ? : @ & = + $ , #\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/decodeURIComponent.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# decodeURIComponent\n\nThe **`decodeURIComponent()`** function decodes a Uniform Resource Identifier (URI) component previously created by [`encodeURIComponent()`](./encodeURIComponent.mdx) or by a similar routine.\n\n\n## Syntax\n\n```js\ndecodeURIComponent(encodedURI)\n```\n\n### Parameters\n\n- `encodedURI`\n  - : An encoded component of a Uniform Resource Identifier.\n\n### Return value\n\nA new string representing the decoded version of the given encoded Uniform Resource Identifier (URI) component.\n\n### Exceptions\n\n- [`URIError`](../globals/URIError/URIError.mdx)\n  - : Thrown if `encodedURI` contains a `%` not followed by two hexadecimal digits, or if the escape sequence does not encode a valid UTF-8 character.\n\n## Description\n\n`decodeURIComponent()` is a function property of the global object.\n\n`decodeURIComponent()` uses the same decoding algorithm as described in [`decodeURI()`](./decodeURI.mdx). It decodes _all_ escape sequences, including those that are not created by [`encodeURIComponent()`](./encodeURIComponent.mdx), like `-.!~*'()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/encodeURI.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# encodeURI()\n\nThe **`encodeURI()`** function encodes a URI by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character (will only be four escape sequences for characters composed of two surrogate characters). Compared to [`encodeURIComponent()`](./encodeURIComponent.mdx), this function encodes fewer characters, preserving those that are part of the URI syntax.\n\n## Syntax\n\n```js\nencodeURI(uri)\n```\n\n### Parameters\n\n- `uri`\n  - : A string to be encoded as a URI.\n\n### Return value\n\nA new string representing the provided string encoded as a URI.\n\n### Exceptions\n\n- [`URIError`](./URIError/URIError.mdx)\n  - : Thrown if `uri` contains a [lone surrogate](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters).\n\n## Description\n\n`encodeURI()` is a function property of the global object.\n\nThe `encodeURI()` function escapes characters by UTF-8 code units, with each octet encoded in the format `%XX`, left-padded with 0 if necessary. Because lone surrogates in UTF-16 do not encode any valid Unicode character, they cause `encodeURI()` to throw a [`URIError`](./URIError/URIError.mdx).\n\n`encodeURI()` escapes all characters **except**:\n\n```\nA–Z a–z 0–9 - _ . ! ~ * ' ( )\n\n; / ? : @ & = + $ , #\n```\n\nThe characters on the second line are characters that may be part of the URI syntax, and are only escaped by `encodeURIComponent()`. Both `encodeURI()` and `encodeURIComponent()` do not encode the characters `-.!~*'()`, known as \"unreserved marks\", which do not have a reserved purpose but are allowed in a URI \"as is\". (See [RFC2396](https://www.ietf.org/rfc/rfc2396.txt))\n\nThe `encodeURI()` function does not encode characters that have special meaning (reserved characters) for a URI. The following example shows all the parts that a URI can possibly contain. Note how certain characters are used to signify special meaning:\n\n```\nhttp://username:password@www.example.com:80/path/to/file.php?foo=316&bar=this+has+spaces#anchor\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/encodeURIComponent.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# encodeURIComponent\n\nThe **`encodeURIComponent()`** function encodes a URI by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character (will only be four escape sequences for characters composed of two surrogate characters). Compared to [`encodeURI()`](./encodeURI.mdx), this function encodes more characters, including those that are part of the URI syntax.\n\n## Syntax\n\n```js\nencodeURIComponent(uriComponent)\n```\n\n### Parameters\n\n- `uriComponent`\n  - : A string to be encoded as a URI component (a path, query string, fragment, etc.). Other values are [converted to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion).\n\n### Return value\n\nA new string representing the provided `uriComponent` encoded as a URI component.\n\n### Exceptions\n\n- [`URIError`](./URIError/URIError.mdx)\n  - : Thrown if `uriComponent` contains a [lone surrogate](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters).\n\n## Description\n\n`encodeURIComponent()` is a function property of the global object.\n\n`encodeURIComponent()` uses the same encoding algorithm as described in [`encodeURI()`](./encodeURI.mdx). It escapes all characters **except**:\n\n```text\nA–Z a–z 0–9 - _ . ! ~ * ' ( )\n```\n\nCompared to [`encodeURI()`](./encodeURI.mdx), `encodeURIComponent()` escapes a larger set of characters. Use `encodeURIComponent()` on user-entered fields from forms `POST`'d to the server — this will encode `&` symbols that may inadvertently be generated during data entry for special HTML entities or other characters that require encoding/decoding. For example, if a user writes `Jack & Jill`, without `encodeURIComponent()`, the ampersand could be interpreted on the server as the start of a new field and jeopardize the integrity of the data.\n\nFor [`application/x-www-form-urlencoded`](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#application/x-www-form-urlencoded-encoding-algorithm), spaces are to be replaced by `+`, so one may wish to follow a `encodeURIComponent()` replacement with an additional replacement of `%20` with `+`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/escape.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# escape()\n\n> **Note:** `escape()` is a non-standard function implemented by browsers and was only standardized for cross-engine compatibility. It is not required to be implemented by all JavaScript engines and may not work everywhere. Use [`encodeURIComponent()`](./encodeURIComponent.mdx) or [`encodeURI()`](./encodeURI.mdx) if possible.\n\nThe **`escape()`** function computes a new string in which certain characters have been replaced by hexadecimal escape sequences.\n\n## Syntax\n\n```js\nescape(str)\n```\n\n### Parameters\n\n- `str`\n  - : A string to be encoded.\n\n### Return value\n\nA new string in which certain characters have been escaped.\n\n## Description\n\n`escape()` is a function property of the global object.\n\nThe `escape()` function replaces all characters with escape sequences, with the exception of ASCII word characters (A–Z, a–z, 0–9, _) and `@*_+-./`. Characters are escaped by UTF-16 code units. If the code unit's value is less than 256, it is represented by a two-digit hexadecimal number in the format `%XX`, left-padded with 0 if necessary. Otherwise, it is represented by a four-digit hexadecimal number in the format `%uXXXX`, left-padded with 0 if necessary.\n\n> **Note:** This function was used mostly for URL encoding and is partly based on the escape format in rfc(1738). The escape format is _not_ an [escape sequence](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#escape_sequences) in string literals. You can replace `%XX` with `\\xXX` and `%uXXXX` with `\\uXXXX` to get a string containing actual string-literal escape sequences.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/eval.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# eval\n\n> **Warning:** Executing JavaScript from a string is an enormous security risk. It is far too easy for a bad actor to run arbitrary code when you use `eval()`. See [never use direct eval](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval#never_use_direct_eval!) for details.\n\nThe **`eval()`** function evaluates JavaScript code represented as a string and returns its completion value. The source is parsed as a script.\n\n## Syntax\n\n```js\neval(script)\n```\n\n### Parameters\n\n- `script`\n  - : A string representing a JavaScript expression, statement, or sequence of statements. The expression can include variables and properties of existing objects. It will be parsed as a script, so [`import`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/import) declarations (which can only exist in modules) are not allowed.\n\n### Return value\n\nThe completion value of evaluating the given code. If the completion value is empty, [`undefined`](./undefined.mdx) is returned. If `script` is not a string primitive, `eval()` returns the argument unchanged.\n\n### Exceptions\n\nThrows any exception that occurs during evaluation of the code, including[ `SyntaxError`](./SyntaxError/SyntaxError.mdx) if `script` fails to be parsed as a script.\n\n## Description\n\n`eval()` is a function property of the global object.\n\nThe argument of the `eval()` function is a string. It will evaluate the source string as a script body, which means both statements and expressions are allowed. It returns the completion value of the code. For expressions, it's the value the expression evaluates to. Many statements and declarations have completion values as well, but the result may be surprising (for example, the completion value of an assignment is the assigned value, but the completion value of [`let`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/let) is undefined), so it's recommended to not rely on statements' completion values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/fetch.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# fetch()\n\nThe global **`fetch()`** method starts the process of fetching a\nresource from the network, returning a promise which is fulfilled once the response is\navailable.\n\nThe promise resolves to the `Response` object\nrepresenting the response to your request.\n\nA `fetch()` promise only rejects when a\nnetwork error is encountered (which is usually when there's a permissions issue or\nsimilar). A `fetch()` promise _does\nnot_ reject on HTTP errors (`404`, etc.). Instead, a\n`then()` handler must check the `Response.ok` and/or\n`Response.status` properties.\n\n> **Note:** The `fetch()` method's parameters are identical to\n> those of the `Request()` constructor.\n\n## Explicit Backends\n\nInternally, Fastly uses named backends to handle fetch requests, which need to be explicitly defined to enable custom HTTP origins to be fetched by the service.\n\nThis `backend` option is then a special Fastly-specific fetch option that is provided to the `fetch()` call:\n\n```js\nfetch('https://origin.com/path', { backend: 'origin' });\n```\n\nBackends are configured using the Fastly service backend configuration, see the [Backend documentation](https://developer.fastly.com/reference/api/services/backend/) for more information.\n\n## Dynamic Backends\n\nDynamic backends are a compute feature that allow services to define backends for themselves.\n\nIf the `backend` option is not provided when making `fetch()` requests, a backend will be automatically created by extracting the protocol, host, and port from the provided URL.\n\nIn addition, custom backend configuration options can then also be provided through the [`Backend()`](../fastly:backend/Backend/Backend.mdx) constructor.\n\n## Syntax\n\n```js\nfetch(resource)\nfetch(resource, options)\n```\n\n### Parameters\n\n- `resource`\n\n  - : This defines the resource that you wish to fetch. This can either be:\n\n    - A string or any other object with a \"toString\" method.\n    - A `Request` object.\n\n- `options` _**optional**_\n\n  - : An object containing any custom settings that you want to apply to the request. The\n    possible options are:\n\n    - `method`\n      - : The request method, e.g., `GET`, `POST`.\n    - `headers`\n      - : Any headers you want to add to your request, contained within a\n        `Headers` object or an object literal with `String`\n        values.\n    - `body`\n      - : Any body that you want to add to your request: this can be an `ArrayBuffer`, a `TypedArray`, a `DataView`, a `URLSearchParams`, string object or literal, or a `ReadableStream` object.\n    - `backend` _**Fastly-specific**_\n      - *Fastly-specific*\n    - `cacheOverride` _**Fastly-specific**_\n    - `cacheKey` _**Fastly-specific**_\n    - `imageOptimizerOptions` _**Fastly-specific**_, see [`imageOptimizerOptions`](../fastly:image-optimizer/imageOptimizerOptions.mdx).\n    - `fastly` _**Fastly-specific**_\n      - `decompressGzip`_: boolean_ _**optional**_\n        - Whether to automatically gzip decompress the Response or not.\n\n### Return value\n\nA `Promise` that resolves to a `Response` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/globalThis.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# globalThis\n\nThe global **`globalThis`** property contains the [global `this`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this#global_context) value, which is usually akin to the [global object](https://developer.mozilla.org/docs/Glossary/Global_object).\n\n## Value\n\nThe global `this` object.\n\n> **Note:** The `globalThis` property is configurable and writable so that code authors can hide it when executing untrusted code and prevent exposing the global object.\n\n## Description\n\nThe `globalThis` property provides a standard way of accessing the global `this` value (and hence the global object itself) across environments.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/isFinite.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# isFinite\n\nThe global **`isFinite()`** function determines whether the\npassed value is a finite number. If needed, the parameter is first converted to a\nnumber.\n\n## Syntax\n\n```js\nisFinite(testValue)\n```\n\n### Parameters\n\n- `testValue`\n  - : The value to be tested for finiteness.\n\n### Return value\n\n**`false`** if the argument is (or will be coerced to) positive\nor negative [`Infinity`](./Infinity.mdx) or [`NaN`](./NaN.mdx) or [`undefined`](./undefined.mdx);\notherwise, **`true`**.\n\n## Description\n\n`isFinite` is a function property of the global object.\n\nYou can use this function to determine whether a number is a finite number. The\n`isFinite` function examines the number in its argument. If the argument is\n`NaN`, positive infinity, or negative infinity, this method returns\n`false`; otherwise, it returns `true`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/isNaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# isNaN()\n\nThe **`isNaN()`** function determines whether a value is [`NaN`](./NaN.mdx) when converted to a number. Because coercion inside the `isNaN()` function can be [surprising](#description), you may alternatively want to use [`Number.isNaN()`](./Number/isNaN.mdx).\n\n## Syntax\n\n```js\nisNaN(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested.\n\n### Return value\n\n`true` if the given value is [`NaN`](./NaN.mdx) after being [converted to a number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_coercion); otherwise, `false`.\n\n## Description\n\n`isNaN()` is a function property of the global object.\n\nFor number values, `isNaN()` tests if the number is the value [`NaN`](./NaN.mdx). When the argument to the `isNaN()` function is not of type [Number](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#number_type), the value is first coerced to a number, and the resulting value is then compared against [`NaN`](./NaN.mdx).\n\nThis behavior of `isNaN()` for non-numeric arguments can be confusing! For example, an empty string is coerced to 0, while a boolean is coerced to 0 or 1; both values are intuitively \"not numbers\", but they don't evaluate to `NaN`, so `isNaN()` returns `false`. Therefore, `isNaN()` answers neither the question \"is the input the floating point [`NaN`](./NaN.mdx) value\" nor the question \"is the input not a number\".\n\n[`Number.isNaN()`](./Number/isNaN.mdx) is a more reliable way to test whether a value is the number value `NaN` or not. Alternatively, the expression `x !== x` can be used, and neither of the solutions is subject to the false positives that make the global `isNaN()` unreliable. To test if a value is a number, use [`typeof x === \"number\"`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/typeof).\n\nThe `isNaN()` function answers the question \"is the input functionally equivalent to [`NaN`](./NaN.mdx) when used in a number context\". If `isNaN(x)` returns `false`, you can use `x` in an arithmetic expression as if it's a valid number that's not `NaN`. If `isNaN(x)` returns `true`, `x` will get coerced to `NaN` and make most arithmetic expressions return `NaN` (because `NaN` propagates). You can use this, for example, to test whether an argument to a function is arithmetically processable (usable \"like\" a number), and handle values that are not number-like by throwing an error, providing a default value, etc. This way, you can have a function that makes use of the full versatility JavaScript provides by implicitly converting values depending on context.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/location.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# location\n\nThe **`location`** read-only property returns a\n[`Location`](../globals/WorkerLocation/WorkerLocation.mdx) object with information about the current location of the\ndocument.\n\nSee [`Location`](../globals/WorkerLocation/WorkerLocation.mdx) for all available properties.\n\n## Value\n\nA [`Location`](../globals/WorkerLocation/WorkerLocation.mdx) object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/parseFloat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# parseFloat()\n\nThe **`parseFloat()`** function parses a string argument and returns a floating point number.\n\n## Syntax\n\n```js\nparseFloat(string)\n```\n\n### Parameters\n\n- `string`\n  - : The value to parse, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). Leading whitespace in this argument is ignored.\n\n### Return value\n\nA floating point number parsed from the given `string`, or [`NaN`](./NaN.mdx) when the first non-whitespace character cannot be converted to a number.\n\n> **Note:** JavaScript does not have the distinction of \"floating point numbers\" and \"integers\" on the language level. [`parseInt()`](./parseInt.mdx) and `parseFloat()` only differ in their parsing behavior, but not necessarily their return values. For example, `parseInt(\"42\")` and `parseFloat(\"42\")` would return the same value: a `Number` 42.\n\n## Description\n\nThe `parseFloat` function converts its first argument to a string, parses that string as a decimal number literal, then returns a number or `NaN`. The number syntax it accepts can be summarized as:\n\n- The characters accepted by `parseFloat()` are plus sign (`+`), minus sign (`-` U+002D HYPHEN-MINUS), decimal digits (`0` – `9`), decimal point (`.`), exponent indicator (`e` or `E`), and the `\"Infinity\"` literal.\n- The `+`/`-` signs can only appear strictly at the beginning of the string, or immediately following the `e`/`E` character. The decimal point can only appear once, and only before the `e`/`E` character. The `e`/`E` character can only appear once, and only if there is at least one digit before it.\n- Leading spaces in the argument are trimmed and ignored.\n- `parseFloat()` can also parse and return [`Infinity`](./Infinity.mdx) or `-Infinity` if the string starts with `\"Infinity\"` or `\"-Infinity\"` preceded by none or more white spaces.\n- `parseFloat()` picks the longest substring starting from the beginning that generates a valid number literal. If it encounters an invalid character, it returns the number represented up to that point, ignoring the invalid character and all characters following it.\n- If the argument's first character can't start a legal number literal per the syntax above, `parseFloat` returns [`NaN`](./NaN.mdx).\n\nSyntax-wise, `parseFloat()` parses a subset of the syntax that the [`Number()`](./Number/Number.mdx) function accepts. Namely, `parseFloat()` does not support non-decimal literals with `0x`, `0b`, or `0o` prefixes but supports everything else. However, `parseFloat()` is more lenient than `Number()` because it ignores trailing invalid characters, which would cause `Number()` to return `NaN`.\n\nSimilar to number literals and `Number()`, the number returned from `parseFloat()` may not be exactly equal to the number represented by the string, due to floating point range and inaccuracy. For numbers outside the `-1.7976931348623158e+308` – `1.7976931348623158e+308` range (see `Number.MAX_VALUE`), `-Infinity` or `Infinity` is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/parseInt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# parseInt\n\nThe **`parseInt()`** function parses a string argument and returns an integer of the specified [radix](https://en.wikipedia.org/wiki/Radix) (the base in mathematical numeral systems).\n\n\n\n## Syntax\n\n```js\nparseInt(string)\nparseInt(string, radix)\n```\n\n### Parameters\n\n- `string`\n  - : A string starting with an integer. Leading whitespace in this argument is ignored.\n- `radix` _**optional**_\n\n  - : An integer between `2` and `36` that represents the _radix_ (the base in mathematical numeral systems) of the `string`. It is converted to a [32-bit integer](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#fixed-width_number_conversion); if it's outside the range of \\[2, 36] after conversion, the function will always return `NaN`. If `0` or not provided, the radix will be inferred based on `string`'s value. Be careful — this does NOT always default to `10`! The [description below](#description) explains in more detail what happens when `radix` is not provided.\n\n### Return value\n\nAn integer parsed from the given `string`, or [`NaN`](./NaN.mdx) when\n\n- the `radix` as a 32-bit integer is smaller than `2` or bigger than `36`, or\n- the first non-whitespace character cannot be converted to a number.\n\n> **Note:** JavaScript does not have the distinction of \"floating point numbers\" and \"integers\" on the language level. `parseInt()` and [`parseFloat()`](./parseFloat.mdx) only differ in their parsing behavior, but not necessarily their return values. For example, `parseInt(\"42\")` and `parseFloat(\"42\")` would return the same value: a `Number` 42.\n\n## Description\n\nThe `parseInt` function converts its first argument to a string, parses that string, then returns an integer or `NaN`.\n\nIf not `NaN`, the return value will be the integer that is the first argument taken as a number in the specified `radix`. (For example, a `radix` of `10` converts from a decimal number, `8` converts from octal, `16` from hexadecimal, and so on.)\n\nThe `radix` argument is converted to a number. If it's unprovided, or if the value becomes 0, `NaN` or `Infinity` (`undefined` is coerced to `NaN`), JavaScript assumes the following:\n\n1. If the input `string`, with leading whitespace and possible `+`/`-` signs removed, begins with `0x` or `0X` (a zero, followed by lowercase or uppercase X), `radix` is assumed to be `16` and the rest of the string is parsed as a hexadecimal number.\n2. If the input `string` begins with any other value, the radix is `10` (decimal).\n\n> **Note:** Other prefixes like `0b`, which are valid in [number literals](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#binary), are treated as normal digits by `parseInt()`. `parseInt()` does _not_ treat strings beginning with a `0` character as octal values either. The only prefix that `parseInt()` recognizes is `0x` or `0X` for hexadecimal values — everything else is parsed as a decimal value if `radix` is missing.\n\nIf the radix is `16`, `parseInt()` allows the string to be optionally prefixed by `0x` or `0X` after the optional sign character (`+`/`-`).\n\nIf the radix value (coerced if necessary) is not in range \\[2, 36] (inclusive) `parseInt` returns `NaN`.\n\nFor radices above `10`, letters of the English alphabet indicate numerals greater than `9`. For example, for hexadecimal numbers (base `16`), `A` through `F` are used. The letters are case-insensitive.\n\n`parseInt` understands exactly two signs: `+` for positive, and `-` for negative. It is done as an initial step in the parsing after whitespace is removed. If no signs are found, the algorithm moves to the following step; otherwise, it removes the sign and runs the number-parsing on the rest of the string.\n\nIf `parseInt` encounters a character that is not a numeral in the specified `radix`, it ignores it and all succeeding characters and returns the integer value parsed up to that point. For example, although `1e3` technically encodes an integer (and will be correctly parsed to the integer `1000` by [`parseFloat()`](./parseFloat.mdx), `parseInt(\"1e3\", 10)` returns `1`, because `e` is not a valid numeral in base 10. Because `.` is not a numeral either, the return value will always be an integer.\n\nIf the first character cannot be converted to a number with the radix in use, `parseInt` returns `NaN`. Leading whitespace is allowed.\n\nFor arithmetic purposes, the `NaN` value is not a number in any radix. You can call the [`Number.isNaN`](./Number/isNaN.mdx) function to determine if the result of `parseInt` is `NaN`. If `NaN` is passed on to arithmetic operations, the operation result will also be `NaN`.\n\nBecause large numbers use the `e` character in their string representation (e.g. `6.022e23` for 6.022 × 10<sup>23</sup>), using `parseInt` to truncate numbers will produce unexpected results when used on very large or very small numbers. `parseInt` should _not_ be used as a substitute for [`Math.trunc()`](./Math/trunc.mdx).\n\nTo convert a number to its string literal in a particular radix, use [`thatNumber.toString(radix)`](./Number/prototype/toString.mdx).\n\nBecause `parseInt()` returns a number, it may suffer from loss of precision if the integer represented by the string is [outside the safe range](./Number/isSafeInteger.mdx). The [`BigInt`](./BigInt/BigInt.mdx) function supports parsing integers of arbitrary length accurately, by returning a `BigInt`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/performance/now.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# performance.now()\n\nThe **`performance.now()`** method returns a high resolution timestamp in milliseconds.\nIt represents the time elapsed since [`performance.timeOrigin`](./timeOrigin.mdx) (the time when the worker was instantiated).\n\n## Syntax\n\n```js\nnow()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns a number which represents the time since worker instantation measured in milliseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/performance/timeOrigin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# performance.timeOrigin\n\nThe **`timeOrigin`** read-only property of the Performance interface returns the high resolution timestamp that is used as the baseline for performance-related timestamps.\n\nThis value represents the time when the worker was instantiated.\n\n### Value\n\nReturns a number which represents the time when the worker was instantation."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/setInterval.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# setInterval()\n\nThe **`setInterval()`** method, repeatedly\ncalls a function or executes a code snippet, with a fixed time delay between each\ncall.\n\nThis method returns an interval ID which uniquely identifies the interval, so you\ncan remove it later by calling `clearInterval()`.\n\n## Syntax\n\n```js\nsetInterval(code)\nsetInterval(code, delay)\n\nsetInterval(func)\nsetInterval(func, delay)\nsetInterval(func, delay, arg0)\nsetInterval(func, delay, arg0, arg1)\nsetInterval(func, delay, arg0, arg1, /* … ,*/ argN)\n```\n\n### Parameters\n\n- `func`\n  - : A `function` to be executed every `delay` milliseconds. The first execution happens after `delay` milliseconds.\n- `code`\n  - : An optional syntax allows you to include a string instead of a function, which is\n    compiled and executed every `delay` milliseconds. This syntax is _not\n    recommended_ for the same reasons that make using `eval() a\n    security risk.\n- `delay` _**optional**_\n  - : The time, in milliseconds (thousandths of a second), the timer should delay in\n    between executions of the specified function or code. Defaults to 0 if not specified.\n    below for details on the permitted range of `delay` values.\n- `arg0, …, argN` _**optional**_\n  - : Additional arguments which are passed through to the function specified by\n    _func_ once the timer expires.\n\n### Return value\n\nThe returned `intervalID` is a numeric, non-zero value which identifies the\ntimer created by the call to `setInterval()`; this value can be passed to\n`clearInterval()` to cancel the interval.\n\nIt may be helpful to be aware that `setInterval()` and\n`setTimeout()` share the same pool\nof IDs, and that `clearInterval()` and\n`clearTimeout()` can technically\nbe used interchangeably. For clarity, however, you should try to always match them to\navoid confusion when maintaining your code.\n\n> **Note:** The `delay` argument is converted to a\n> signed 32-bit integer. This effectively limits `delay` to 2147483647 ms,\n> since it's specified as a signed integer in the IDL.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/setTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# setTimeout()\n\nThe global **`setTimeout()`** method sets a timer which executes a function or specified\npiece of code once the timer expires.\n\n## Syntax\n\n```js\nsetTimeout(code)\nsetTimeout(code, delay)\n\nsetTimeout(functionRef)\nsetTimeout(functionRef, delay)\nsetTimeout(functionRef, delay, param1)\nsetTimeout(functionRef, delay, param1, param2)\nsetTimeout(functionRef, delay, param1, param2, /* … ,*/ paramN)\n```\n\n### Parameters\n\n- `functionRef`\n  - : A `function` to be executed after the timer expires.\n- `code`\n  - : An alternative syntax that allows you to include a string instead of a function,\n    which is compiled and executed when the timer expires. This syntax is **not\n    recommended** for the same reasons that make using\n    `eval()` a security risk.\n- `delay` _**optional**_\n\n  - : The time, in milliseconds that the timer should wait before\n    the specified function or code is executed. If this parameter is omitted, a value of 0\n    is used, meaning execute \"immediately\", or more accurately, the next event cycle.\n\n- `param1`, …, `paramN` _**optional**_\n\n  - : Additional arguments which are passed through to the function specified by\n    `functionRef`.\n\n### Return value\n\nThe returned `timeoutID` is a positive integer value which\nidentifies the timer created by the call to `setTimeout()`. This value can be\npassed to `clearTimeout()` to\ncancel the timeout.\n\nIt is guaranteed that a `timeoutID` value will never be reused by a subsequent call to\n`setTimeout()` or `setInterval()` on the same object (a window or\na worker). However, different objects use separate pools of IDs.\n\n## Description\n\nTimeouts are cancelled using `clearTimeout()`.\n\nTo call a function repeatedly (e.g., every _N_ milliseconds), consider using\n`setInterval()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/structuredClone.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# structuredClone()\n\nThe global **`structuredClone()`** method creates a deep clone of a given value.\n\n## Syntax\n\n```js\nstructuredClone(value)\n```\n\n### Parameters\n\n- `value`\n  - : The object to be cloned.\n\n### Return value\n\nThe returned value is a deep copy of the original `value`.\n\n### Exceptions\n\n- `DataCloneError`\n  - : Thrown if any part of the input value is not serializable.\n\n## Description\n\nThis function can be used to deep copy JavaScript values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/undefined.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# undefined\n\nThe global **`undefined`** property represents the primitive\nvalue `undefined`. It is one of JavaScript's \"primitive types\".\n\n## Value\n\nThe primitive value `undefined`.\n\n## Description\n\n`undefined` is a property of the _global object_. That is, it is a variable in global scope.\n\n`undefined` is a non-configurable, non-writable property.\n\nA variable that has not been assigned a value is of type `undefined`. A\nmethod or statement also returns `undefined` if the variable that is being\nevaluated does not have an assigned value. A function returns `undefined` if\na value was not explicitly returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/globals/unescape.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# unescape()\n\n> **Note:** `unescape()` is a non-standard function implemented by browsers and was only standardized for cross-engine compatibility. It is not required to be implemented by all JavaScript engines and may not work everywhere. Use [`decodeURIComponent()`](./decodeURIComponent.mdx) or [`decodeURI()`](./decodeURI.mdx) if possible.\n\nThe **`unescape()`** function computes a new string in which hexadecimal escape sequences are replaced with the characters that they represent. The escape sequences might be introduced by a function like [`escape()`](./escape.mdx).\n\n## Syntax\n\n```js\nunescape(str)\n```\n\n### Parameters\n\n- `str`\n  - : A string to be decoded.\n\n### Return value\n\nA new string in which certain characters have been unescaped.\n\n## Description\n\n`unescape()` is a function property of the global object.\n\nThe `unescape()` function replaces any escape sequence with the character that it represents. Specifically, it replaces any escape sequence of the form `%XX` or `%uXXXX` (where `X` represents one hexadecimal digit) with the character that has the hexadecimal value `XX`/`XXXX`. If the escape sequence is not a valid escape sequence (for example, if `%` is followed by one or no hex digit), it is left as-is.\n\n> **Note:** This function was used mostly for URL encoding and is partly based on the escape format in rfc(1738). The `unescape()` function does _not_ evaluate [escape sequences](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#escape_sequences) in string literals. You can replace `\\xXX` with `%XX` and `\\uXXXX` with `%uXXXX` to get a string that can be handled by `unescape()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/html-rewriter/Element/prototype/after.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# after\n\nThe `after` method inserts content after the closing tag of the element.\n\n## Syntax\n\n```js\nelement.after(content);\nelement.after(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to insert after the element's closing tag.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.after(\"World\");\n// Result: <div>Hello</div>World\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/html-rewriter/Element/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# append\n\nThe `append` method inserts content at the end of the element's content.\n\n## Syntax\n\n```js\nelement.append(content);\nelement.append(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to insert at the end of the element's content.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.append(\", World\");\n// Result: <div>Hello, World</div>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/html-rewriter/Element/prototype/before.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# before\n\nThe `before` method inserts content before the opening tag of the element.\n\n## Syntax\n\n```js\nelement.before(content);\nelement.before(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to insert before the element's opening tag.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.before(\"Well\");\n// Result: Well<div>Hello</div>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/html-rewriter/Element/prototype/hasAttribute.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# hasAttribute\n\nThe `hasAttribute` method returns a `boolean` value indicating whether the specified attribute is present on the element.\n\n## Syntax\n\n```js\nelement.hasAttribute(attributeName);\n```\n\n### Parameters\n\n- `attributeName` _: string_\n  - The name of the attribute to check for.\n\n### Return value\n\nA boolean value indicating whether the attribute is present.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/html-rewriter/Element/prototype/prepend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# prepend\n\nThe `prepend` method inserts content at the beginning of the element's content.\n\n## Syntax\n\n```js\nelement.prepend(content);\nelement.prepend(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to insert at the beginning of the element's content.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.prepend(\"Well, \");\n// Result: <div>Well, Hello</div>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/html-rewriter/Element/prototype/removeAttribute.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# removeAttribute\n\nThe `removeAttribute` method removes the specified attribute from the element.\n\n## Syntax\n\n```js\nelement.removeAttribute(attributeName);\n```\n\n### Parameters\n\n- `attributeName` _: string_\n  - The name of the attribute to remove.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/html-rewriter/Element/prototype/replaceChildren.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# replaceChildren\n\nThe `replaceChildren` method replaces the element's children with new content.\n\n## Syntax\n\n```js\nelement.replaceChildren(content);\nelement.replaceChildren(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to replace the element's children with.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.replaceChildren(\"Greetings!\");\n// Result: <div>Greetings!</div>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/html-rewriter/Element/prototype/replaceWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# replaceWith\n\nThe `replaceWith` method replaces the element with new content.\n\n## Syntax\n\n```js\nelement.replaceWith(content);\nelement.replaceWith(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to replace the element with.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.replaceWith(\"<p>Greetings!</p>\");\n// Result: <p>Greetings!</p>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/html-rewriter/Element/prototype/selector.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# selector\n\nThe `selector` read-only property is a `string` representing the [CSS selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors) that matches the element.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/html-rewriter/Element/prototype/setAttribute.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# setAttribute\n\nThe `setAttribute` method sets the value of the specified attribute on the element. If the value already exists, it will be updated; otherwise, a new attribute with the specified name and value will be added to the element.\n\n## Syntax\n\n```js\nelement.setAttribute(attributeName, value);\n```\n\n### Parameters\n\n- `attributeName` _: string_\n  - The name of the attribute to set.\n- `value` _: string_\n  - The value to assign to the attribute.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/html-rewriter/Element/prototype/tag.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# tag\n\nThe `tag` read-only property is a `string` representing the tag name of the element.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/html-rewriter/HTMLRewritingStream/HTMLRewritingStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `HTMLRewritingStream()`\n\nThe **`HTMLRewritingStream`** lets you rewrite HTML by registering callbacks on CSS selectors. When an element matching the selector is encountered, the rewriter calls your callback. This callback can manipulate the attributes of the element, and add or remove content from the immediate context.\n\n## Syntax\n\n```js\nnew HTMLRewritingStream()\n```\n\n### Return value\n\nA new `HTMLRewritingStream` object.\n\n## Examples\n\nIn this example, we fetch an HTML page and use the HTML rewriter to add an attribute to all `div` tags and prepend the text `Header:` to all `h1` tags:\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { HTMLRewritingStream } from 'fastly:html-rewriter';\n\nasync function handleRequest(event) {\n  let transformer = new HTMLRewritingStream()\n    .onElement(\"h1\", e => e.prepend(\"Header: \"))\n    .onElement(\"div\", e => e.setAttribute(\"special-attribute\", \"top-secret\"));\n  let body = (await fetch(\"https://example.com/\")).body.pipeThrough(transformer);\n\n  return new Response(body, {\n    status: 200,\n    headers: new Headers({\n      \"content-type\": \"text/html; charset=utf-8\",\n    })\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/html-rewriter/HTMLRewritingStream/prototype/onElement.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# onElement\n\n▸ **onElement**`(selector: string, handler: (element: Element) => void): this`\n\nRegisters an element handler with the [`HTMLRewritingStream`] that will be called for each [`Element`] that matches the [CSS selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors) `selector`.\n\nElements added by handlers will not be processed by other handlers.\n\n## Syntax\n\n```js\n.onElement(selector, handler)\n```\n\n### Parameters\n\n- `selector` _: string_\n  - A CSS selector that determines the elements for which `handler` will be called\n  - The following types of CSS selector are supported:\n\nCurrently the rewriter supports the following CSS selectors:\n\n| Pattern              | Description                                                                |\n|----------------------|----------------------------------------------------------------------------|\n| `*`                  | Any element                                                                |\n| `E`                  | All elements of type `E`                                                   |\n| `E F`                | `F` elements inside `E` elements                                           |\n| `E > F`              | `F` elements directly inside `E` elements                                  |\n| `E:nth-child(n)`     | The n-th child of type `E`                                                 |\n| `E:first-child`      | First child of type `E`                                                    |\n| `E:nth-of-type(n)`   | The n-th sibling of type `E`                                               |\n| `E:first-of-type`    | First sibling of type `E`                                                  |\n| `E:not(s)`           | Type `E` elements not matching selector `s`                                |\n| `E.myclass`          | Type `E` elements with class `\"myclass\"`                                   |\n| `E#myid`             | Type `E` elements with ID `\"myid\"`                                         |\n| `E[attr]`            | Type `E` elements with attribute `attr`                                    |\n| `E[attr=\"val\"]`      | Type `E` elements where `attr` is `\"val\"`                                  |\n| `E[attr=\"val\" i]`    | Type `E` elements where `attr` is `\"val\"`, case-insensitive                |\n| `E[attr=\"val\" s]`    | Type `E` elements where `attr` is `\"val\"`, case-sensitive                  |\n| `E[attr~=\"val\"]`     | Type `E` elements where `attr` contains `\"val\"` in a space-separated list  |\n| `E[attr`&#124`;=\"val\"]`| Type `E` elements where `attr` is hyphen-separated and starts with `\"val\"` |\n| `E[attr^=\"val\"]`     | Type `E` elements where `attr` starts with `\"val\"`                         |\n| `E[attr$=\"val\"]`     | Type `E` elements where `attr` ends with `\"val\"`                           |\n| `E[attr*=\"val\"]`     | Type `E` elements where `attr` contains `\"val\"`                            |\n\n- `handler` _: (element: Element) => void_\n  - A callback function that will be called once for each element that matches `selector`\n\n### Return value\n\nThe `HTMLRewritingStream`, so multiple calls to `onElement` can be chained.\n\n### Exceptions\n\n- `Error`\n  - If the provided `selector` is not a valid CSS selector.\n  - If the provided `handler` is not a function.\n\n## Examples\n\n\nIn this example, we fetch an HTML page and use the HTML rewriter to add an attribute to all `div` tags and prepend the text `Header:` to all `h1` tags:\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { HTMLRewritingStream } from 'fastly:html-rewriter';\n\nasync function handleRequest(event) {\n  let transformer = new HTMLRewritingStream()\n    .onElement(\"h1\", e => e.prepend(\"Header: \"))\n    .onElement(\"div\", e => e.setAttribute(\"special-attribute\", \"top-secret\"));\n  let body = (await fetch(\"https://example.com/\")).body.pipeThrough(transformer);\n\n  return new Response(body, {\n    status: 200,\n    headers: new Headers({\n      \"content-type\": \"text/html; charset=utf-8\",\n    })\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/image-optimizer/Auto.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Auto`\n\nEnumerator options for [`imageOptimizerOptions.auto`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `AVIF` (`\"avif\"`) If the browser's Accept header indicates compatibility, deliver an AVIF image.\n- `WEBP` (`\"webp\"`)\tIf the browser's Accept header indicates compatibility, deliver a WebP image.\n\n## Examples\n\n```js\nimport { Auto, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      auto: Auto.AVIF\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/image-optimizer/BWAlgorithm.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `BWAlgorithm`\n\nEnumerator options for [`imageOptimizerOptions.bw`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Threshold` (`\"threshold\"`) Uses a luminance threshold to convert the image to black and white.\n- `Atkinson` (`\"atkinson\"`)\tUses [Atkinson dithering](https://en.wikipedia.org/wiki/Atkinson_dithering) to convert the image to black and white.\n\n\n## Examples\n\n```js\nimport { Region, BWAlgorithm } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      bw: BWAlgorithm.Threshold\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/image-optimizer/CropMode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `CropMode`\n\nEnumerator options for [`imageOptimizerOptions.crop.mode`](./imageOptimizerOptions.mdx) and `imageOptimizerOptions.precrop.mode`.\n\n## Constants\n\n- `Smart` (`\"smart\"`) Enables content-aware algorithms to attempt to crop the image to the desired aspect ratio while intelligently focusing on the most important visual content, including the detection of faces.\n- `Safe` (`\"safe\"`)\tAllow cropping out-of-bounds regions.\n\n## Examples\n\n```js\nimport { CropMode, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      crop: {\n        size: { ratio: { width: 4, height: 3 } },\n        mode: CropMode.Smart,\n      }\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/image-optimizer/Disable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Disable`\n\nEnumerator options for [`imageOptimizerOptions.disable`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Upscale` (`\"upscale\"`) Prevent images being resized such that the output image's dimensions are larger than the source image.\n\n## Examples\n\n```js\nimport { Disable, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      width: 2560,\n      disable: Disable.Upscale\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/image-optimizer/Enable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Enable`\n\nEnumerator options for [`imageOptimizerOptions.enable`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Upscale` (`\"upscale\"`) Allow images to be resized such that the output image's dimensions are larger than the source image.\n\n## Examples\n\n```js\nimport { Enable, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      width: 2560,\n      enable: Enable.Upscale\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/image-optimizer/Fit.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Fit`\n\nEnumerator options for [`imageOptimizerOptions.fit`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Bounds` (`\"bounds\"`) Resize the image to fit entirely within the specified region, making one dimension smaller if needed.\n- `Cover` (`\"cover\"`) Resize the image to entirely cover the specified region, making one dimension larger if needed.\n- `Crop` (`\"crop\"`) Resize and crop the image centrally to exactly fit the specified region.\n\n## Examples\n\n```js\nimport { Fit, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      width: 150,\n      height; 150,\n      fit: Fit.Bounds\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/image-optimizer/Format.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Format`\n\nEnumerator options for [`imageOptimizerOptions.format`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Auto` (`\"auto\"`) Automatically use the best format based on browser support and image/transform characteristics\n- `AVIF` (`\"avif\"`) AVIF\n- `BJPG` (`\"bjpg\"`) Baseline JPEG \n- `GIF` (`\"gif\"`) Graphics Interchange Format\n- `JPG` (`\"jpg\"`) JPEG \n- `JXL` (`\"jxl\"`) JPEGXL \n- `MP4` (`\"mp4\"`) MP4 (H.264)\n- `PJPG` (`\"pjpg\"`) Progressive JPEG \n- `PJXL` (`\"pjxl\"`) Progressive JPEGXL\n- `PNG` (`\"png\"`) Portable Network Graphics\n- `PNG8` (`\"png8\"`) Portable Network Graphics palette image with 256 colors and 8-bit transparency\n- `SVG` (`\"svg\"`) Scalable Vector Graphics\n- `WEBP` (`\"webp\"`) WebP\n- `WEBPLL` (`\"webpll\"`) WebP (Lossless)\n- `WEBPLY` (`\"webply\"`) WebP (Lossy)\n\n## Examples\n\n```js\nimport { Format, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      format: Format.PNG\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/image-optimizer/Metadata.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Metadata`\n\nEnumerator options for [`imageOptimizerOptions.metadata`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Copyright` (`\"copyright\"`) Preserve [copyright notice](https://www.iptc.org/std/photometadata/specification/IPTC-PhotoMetadata#copyright-notice), creator, credit line, licensor, and web statement of rights fields.\n- `C2PA` (`\"c2pa\"`) Preserve the [C2PA manifest](https://c2pa.org/) and add any transformations performed by Fastly Image Optimizer.\n- `CopyRightAndC2PA` (`\"copyright,c2pa\"`) Resize and crop the image centrally to exactly fit the specified region.\n\n## Examples\n\n```js\nimport { Metadata, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      metadata: Metadata.Copyright\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/image-optimizer/Optimize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Optimize`\n\nEnumerator options for [`imageOptimizerOptions.optimize`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Low` (`\"low\"`) Output image quality will be similar to the input image quality.\n- `Medium` (`\"medium\"`) More optimization is allowed. We attempt to preserve the visual quality of the input image.\n- `High` (`\"high\"`) Minor visual artifacts may be visible. This produces the smallest file.\n\n## Examples\n\n```js\nimport { Optimize, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      optimize: Optimize.High\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/image-optimizer/Orient.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Orient`\n\nEnumerator options for [`imageOptimizerOptions.orient`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Default` (`\"1\"`) \n- `FlipHorizontal` (`\"2\"`) \n- `FlipHorizontalAndVertical` (`\"3\"`) \n- `FlipVertical` (`\"4\"`) \n- `FlipHorizontalOrientLeft` (`\"5\"`) \n- `OrientRight` (`\"6\"`) \n- `FlipHorizontalOrientRight` (`\"7\"`) \n- `OrientLeft` (`\"8\"`) \n\n## Examples\n\n```js\nimport { Orient, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      orient: Orient.FlipHorizontal\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/image-optimizer/Profile.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Profile`\n\nEnumerator options for [`imageOptimizerOptions.profile`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Baseline` (`\"baseline\"`) The profile recommended for video conferencing and mobile applications. (Default)\n- `Main` (`\"main\"`) The profile recommended for standard-definition broadcasts.\n- `High` (`\"high\"`) The profile recommended for high-definition broadcasts.\n\n## Examples\n\n```js\nimport { Profile, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      profile: Profile.Main\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/image-optimizer/Region.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Region`\n\nEnumerator options for [`imageOptimizerOptions.region`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `UsEast` (`\"us_east\"`)\n- `UsCentral` (`\"us_central\"`)\n- `UsWest` (`\"us_west\"`)\n- `EuCentral` (`\"eu_central\"`)\n- `EuWest` (`\"eu_west\"`)\n- `Asia` (`\"asia\"`)\n- `Australia` (`\"australia\"`)\n\n\n## Examples\n\n```js\nimport { Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/image-optimizer/ResizeFilter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `ResizeFilter`\n\nEnumerator options for [`imageOptimizerOptions.resizeFilter`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Nearest` (`\"nearest\"`) Uses the value of nearby translated pixel values.\n- `Bilinear` (`\"bilinear\"`) Uses an average of a 2x2 environment of pixels.\n- `Linear` (`\"linear\"`) Same as `Bilenear`.\n- `Bicubic` (`\"bicubic\"`) Uses an average of a 4x4 environment of pixels, weighing the innermost pixels higher.\n- `Cubic` (`\"cubic\"`) Same as `Bicubic`.\n- `Lanczos2` (`\"lanczos2\"`) Uses the Lanczos filter to increase the ability to detect edges and linear features within an image and uses sinc resampling to provide the best possible reconstruction.\n- `Lanczos3` (`\"lanczos3\"`) Lanczos3 uses a better approximation of the sinc resampling function. (Default)\n- `Lanczos` (`\"lanczos\"`) Same as `Lanczos3`.\n\n## Examples\n\n```js\nimport { ResizeFilter, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      width: 2560,\n      resizeFilter: ResizeFilter.Linear\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/image-optimizer/imageOptimizerOptions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `imageOptimizerOptions` \n\nOptions specified in the [`Request`](../globals/Request/Request.mdx) constructor for running the [Fastly Image Optimizer](https://docs.fastly.com/products/image-optimizer). More detailed documentation on all Image Optimizer options is available in the [Image Optimizer reference docs](https://www.fastly.com/documentation/reference/io/).\n\n## Parameters\n\nAll parameters other than `region` are optional.\n\n- `region`: _[`Region`](./Region.mdx)_ Where image optimizations should occur.\n- `auto`: _[`Auto`](./Auto.mdx)_ Enable optimization features automatically.\n- `bgColor`: _[`Color`](#color)_ Set the background color of an image.\n- `blur`: _`number` (0.5-1000) or [`Percentage`](#percentage)_ Set the blurriness of the output image.\n- `brightness`: _`number` (-100-100)_ Set the brightness of the output image.\n- `bw`: _[`BWAlgorithm`](./BWAlgorithm.mdx)_ Convert an image to black and white.\n- `canvas`: _`Object`_ Increase the size of the canvas around an image.\n    - `size`: _[`Size`](#size)_\n    - `position` (optional): _[`Position`](#position)_\n- `contrast`: _`number` (-100-100)_ Set the contrast of the output image.\n- `crop`: _`Object`_ Remove pixels from an image.\n    - `size`: _[`Size`](#size)_\n    - `position` (optional): _[`Position`](#position)_\n    - `mode` (optional): _[`CropMode`](./CropMode.mdx)_\n- `disable`: _[`Disable`](./Disable.mdx)_ Disable functionality that is enabled by default.\n- `dpr`: `number` Ratio between physical pixels and logical pixels.\n- `enable`: _[`Enable`](./Enable.mdx)_ Enable functionality that is disabled by default.\n- `fit`: _[`Fit`](./Fit.mdx)_ Set how the image will fit within the size bounds provided.\n- `format`: _[`Format`](./Format.mdx)_ Specify the output format to convert the image to.\n- `frame`: _`number` (must have the value 1)_ Extract the first frame from an animated image sequence.\n- `height`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ Resize the height of the image.\n- `level`: _`String` containing one of the [allowed values](https://www.fastly.com/documentation/reference/io/level/#allowed-values)_ Specify the level constraints when converting to video.\n- `metadata`: _[`Metadata`](./Metadata.mdx)_ Control which metadata fields are preserved during transformation.\n- `optimize`: _[`Optimize`](./Optimize.mdx)_ Automatically apply optimal quality compression.\n- `orient`: _[`Orient`](./Orient.mdx)_ Change the cardinal orientation of the image.\n- `pad`: _[`Sides`](#sides)_ Add pixels to the edge of an image.\n- `precrop`: _`Object`_ Remove pixels from an image before any other transformations occur.\n    - `size`: _[`Size`](#size)_\n    - `position`: _[`Position`](#position)_\n    - `mode`: _[`CropMode`](./CropMode.mdx)_\n- `profile`: _[`Profile`](./Profile.mdx)_ Specify the profile class of application when converting to video.\n- `quality`: _`integer` (1-100)_ Optimize the image to the given compression level for lossy file formatted images.\n- `resizeFilter`: _[`ResizeFilter`](./ResizeFilter.mdx)_ Specify the resize filter used when resizing images.\n- `saturation`: _`number` (-100-100)_ Set the saturation of the output image.\n- `sharpen`: _`Object`_ Set the sharpness of the output image.\n    - `amount`: _`number` (0-10)_\n    - `radius`: _`number` (0.5-1000)_\n    - `threshold`: _`integer` (0-255)_\n- `trim`: _[`Sides`](#sides)_ Remove pixels from the edge of an image.\n- `viewbox`: _`number` (must have the value 1)_ Remove explicit width and height properties in SVG output.\n- `width`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ Resize the width of the image.\n\n## Types\n\n### Color\n\nEither:\n\n- a 3 or 6 character hexadecimal string\n- an `Object` containing:\n    - `r`: _`integer` (0-255)_ Red component\n    - `g`: _`integer` (0-255)_ Green component\n    - `b`: _`integer` (0-255)_ Blue component\n    - `a` (optional): _`number` (0.0-1.0)_ Alpha component \n\n### Percentage\n\nA `String` containing a number suffixed with a percent sign (%).\n\n### Position\n\nAn `Object` containing:\n\n- Exactly one of:\n    - `x`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ \n    - `offsetX`: _`number` (interpreted as a percentage)_\n- Exactly one of: \n    - `y`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ \n    - `offsetY`: _`number` (interpreted as a percentage)_\n\n### Sides\n\nAn `Object` containing `top`, `bottom`, `left`, and `right`, all of which are either an `integer` or [`Percentage`](#percentage).\n\n### Size\n\nAn `Object` containing either:\n\n- `absolute`: _`Object`_\n    - `width`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ \n    - `height`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ \n- `ratio`: _`Object`_\n    - `width`: _`number`_\n    - `height`: _`number`_\n\n## Examples\n\n```js\nimport { Format, Orient, CropMode, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      format: Format.PNG,\n      bgColor: {\n        'r': 100,\n        'g': 255,\n        'b': 9,\n        'a': 0.5\n      },\n      blur: '1%',\n      brightness: -20,\n      contrast: -20,\n      height: 600,\n      level: '4.0',\n      orient: Orient.FlipVertical,\n      saturation: 80,\n      sharpen: { 'amount': 5, 'radius': 6, 'threshold': 44 },\n      canvas: { 'size': { 'absolute': { 'width': 400, 'height': 400 } } },\n      crop: { size: { absolute: { width: 200, height: 200 }, mode: CropMode.Safe } },\n      trim: { top: 10, left: 10, right: 10, bottom: 10 },\n      pad: { top: 30, left: 30, right: \"1%\", bottom: 30 }\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/index.mdx",
    "content": "---\nsidebar_position: 1\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n\n# JavaScript for Fastly Compute\n\nThis site is the full SDK reference for [`@fastly/js-compute`](https://www.npmjs.com/package/%40fastly/js-compute), the module that provides the interface between your JavaScript code and the [Fastly Compute](https://www.fastly.com) platform.\n\nIf you haven't used Fastly Compute before, start by [setting up your first Fastly Compute program](https://developer.fastly.com/learning/compute/) over on **developer.fastly.com** so that you have a working development environment.\n\nTo learn more about the fundamentals of using JavaScript with Fastly Compute, see our [using JavaScript](https://developer.fastly.com/learning/compute/javascript/) guide.\n\n## Understanding the JavaScript SDK\n\nIncoming HTTP requests to [domains that are attached to your Fastly service](https://developer.fastly.com/learning/concepts/) will start an instance of your application and invoke a `fetch` event, which can be bound using the `addEventListener` function:\n\n```js\naddEventListener(\"fetch\", event => event.respondWith(handleRequest(event)) );\n\nasync function handleRequest(event) {\n  const req = event.request;\n\n  return fetch(req, {\n    backend: \"example_backend\"\n  });\n}\n```\n\nFastly specific features are available as named imports from `fastly:` prefixed modules, all of which are documented in this site.  For example, the [env](https://js-compute-reference-docs.edgecompute.app/docs/fastly:env/env) function provides access to [environment variables](https://developer.fastly.com/reference/compute/ecp-env/) and can be imported into your application like this:\n\n```js\nimport { env } from \"fastly:env\"\n```\n\nJavaScript code compiled for Fastly Compute has access to a global environment with most of the globals you would expect in an ECMAScript runtime, like [`Date`](https://js-compute-reference-docs.edgecompute.app/docs/globals/Date/) and [`console`](https://js-compute-reference-docs.edgecompute.app/docs/globals/console/log).\n\n## Trying things out\n\n[Fastly fiddle](https://fiddle.fastly.dev) is an online web-based playground where you can run Fastly code.  You'll see fiddles included in many pages of our [developer hub](https://developer.fastly.com) and this SDK reference. These interactive examples can be executed right on the page by clicking the **RUN** tab:\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nasync function app(event) {\n    const request = event.request;\n    return new Response(\"You made a request to \" + request.url)\n}\naddEventListener(\"fetch\", event => {\n  event.respondWith(app(event));\n});\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nasync function app(event) {\n    const request = event.request;\n    return new Response(`You made a request to ${request.url}`)\n}\n\naddEventListener(\"fetch\", event => {\n  event.respondWith(app(event));\n});\n\n```\n\n</Fiddle>\n\nCheck out [`fiddle.fastly.dev`](https://fiddle.fastly.dev) to create your own.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/kv-store/KVStore/KVStore.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `KVStore()`\n\nThe **`KVStore` constructor** lets you connect your Fastly Compute application to a Fastly KV store.\n\nA Fastly KV store is a persistent, globally consistent key-value store. See [Data stores for Fastly services](https://developer.fastly.com/learning/concepts/edge-state/data-stores#kv-stores) for initialization and usage details.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew KVStore(name)\n```\n\n> **Note:** `KVStore()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Define a KV store instance using the resource link name.\n  \n### Return value\n\nA new `KVStore` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no KV Store exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name does not start with an ascii alphabetical character \n  - Thrown if the provided name contains control characters `(\\u0000-\\u001F)`\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then read back the value and return it to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/kv-store/KVStore/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# KVStore.prototype.delete\n\nDeletes the value associated with the key `key` in the KV store.\n\n## Syntax\n\n```js\ndelete(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the KV-store.\n\n### Return value\n\nReturns `undefined`\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is any of the strings `\"\"`, `\".\"`, or `\"..\"`\n    - Starts with the string `\".well-known/acme-challenge/\"`\n    - Contains any of the characters `\"#;?^|\\n\\r\"`\n    - Is longer than 1024 characters\n    - Does not exist\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then delete the entry.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n  await files.delete('hello')\n\n  const entry = await files.get('hello')\n  if (entry) {\n    return new Response(await entry.text())\n  } else {\n    return new Response('no file named hello exists')\n  }\n\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/kv-store/KVStore/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# KVStore.prototype.get\n\n▸ **get**(): `string`\n\nGets the value associated with the key `key` in the KV store.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the KV-store.\n\n### Return value\n\nIf the key does not exist in the KV store, this returns a `Promise` which resolves with `null`.\n\nIf the key does exist in the KV store, this returns a `Promise` which resolves with an `KVStoreEntry`.\n\n## Description\n\nSend the given message, converted to a string, to this KVStore instance's endpoint.\n\nThe `get()` method requires its `this` value to be a [`KVStore`](../KVStore.mdx) object.\n\nIf the `this` value does not inherit from `KVStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is any of the strings `\"\"`, `\".\"`, or `\"..\"`\n    - Starts with the string `\".well-known/acme-challenge/\"`\n    - Contains any of the characters `\"#;?^|\\n\\r\"`\n    - Is longer than 1024 characters\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then read back the value and return it to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/kv-store/KVStore/prototype/list.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStore.prototype.list\n\nThe **`list()`** can be used to list the keys of a store.\n\n## Syntax\n\n```js\nlist(options?)\n```\n\n### Parameters\n\n- `options` _: object_ _**optional**_\n  - List options supporting properties:\n  - `cursor` _: string_ _**optional**_\n    - The cursor used to pick up from a previous iteration.\n  - `limit` _: number_ _**optional**_\n    - The maximum number of keys to return.\n  - `prefix` _: string_ _**optional**_\n    - List only those keys that start with the given string prefix.\n  - `noSync` _: boolean_ _**optional**_\n    - Do not sync the key list first, instead provide a possibly out-of-date listing. May be faster but inconsistent.\n\n### Return value\n\nReturns a `Promise` which resolves with `{ list: string[], cursor: string | undefined }`.\n\n## Example\n\nIn this example we list the keys of a KV Store named `'files'`, iterating 10 at a time, counting the total;\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from 'fastly:kv-store';\n\nasync function app(event) {\n  const files = new KVStore('files');\n\n  let cursor,\n    list,\n    total = 0;\n  do {\n    ({ cursor, list } = await files.list({ limit: 10, cursor }));\n    total += list?.length;\n  } while (list);\n\n  return new Response(`Iterated ${total} entries`);\n}\n\naddEventListener('fetch', (event) => event.respondWith(app(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/kv-store/KVStore/prototype/put.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# KVStore.prototype.put\n\nThe **`put()`** method stores a `value` into the KV store under a `key`.\n\n> **Note**: KV stores are eventually consistent, this means that the updated contents associated with the key `key` may not be available to read from all edge locations immediately and some edge locations may continue returning the previous contents associated with the key.\n\n## Syntax\n\n```js\nput(key, value, options?)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to store the supplied value under within the KV store.\n- `value` _:  ArrayBuffer | TypedArray | DataView| ReadableStream | URLSearchParams | String | string literal_\n  - The value to store within the KV store.\n- `options` _: object_ _**optional**_\n  - An insert options parameter, supporting:\n  - `metadata` _: ArrayBuffer | TypedArray | DataView_ _**optional**_\n    - Binary metadata associated with the entry, may be up to 1000 bytes.\n  - `ttl` _: number_ _**optional**_\n    - TTL for the entry\n  - `mode` _: 'overwrite' | 'add' | 'append' | 'prepend'_ _**optional**_\n    - Insert mode, defaults to 'overwrite'\n  - `gen` _: number_ _**optional**_\n    - 'generation' header specific to the version of an entry key\n\n### Return value\n\nReturns a `Promise` which resolves with `undefined` when the provided `value` has been written into the KV store.\n\n## Description\n\nStores the supplied `value` into the KV store under the supplied `key`.\n\nThe `put()` method requires its `this` value to be a [`KVStore`](../KVStore.mdx) object.\n\nIf the `this` value does not inherit from `KVStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is any of the strings `\"\"`, `\".\"`, or `\"..\"`\n    - Starts with the string `\".well-known/acme-challenge/\"`\n    - Contains any of the characters `\"#;?^|\\n\\r\"`\n    - Is longer than 1024 characters\n- `TypeError`\n  - If the provided `gen`:\n    - Is not an number\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then read back the value and return it to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/kv-store/KVStoreEntry/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.arrayBuffer()\n\nThe `arrayBuffer()` method of the `KVStoreEntry` interface takes a `KVStoreEntry` stream and reads it to completion. It returns a promise that resolves with an `ArrayBuffer`.\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an `ArrayBuffer`."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/kv-store/KVStoreEntry/prototype/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.body\n\nThe `body` read-only property of the `KVStoreEntry` interface is a `ReadableStream` of the body contents.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/kv-store/KVStoreEntry/prototype/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.bodyUsed\n\nThe `bodyUsed` read-only property of the `KVStoreEntry` interface is a `boolean` value that indicates whether the body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/kv-store/KVStoreEntry/prototype/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.json()\n\nThe `json()` method of the `KVStoreEntry` interface takes a `KVStoreEntry` stream and reads it to completion. It returns a promise which resolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a JavaScript object. This object could be anything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/kv-store/KVStoreEntry/prototype/metadata.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.metadata()\n\nThe `metadata()` method of the `KVStoreEntry` interface provides the binary metadata associated with the `KVStoreEntry`.\n\nThe metadata binary may be up to 1000 bytes, and is returned as a `Uint8Array` TypedArray buffer, if metadata is set, or null otherwise.\n\n## Syntax\n\n```js\nmetadata()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a `Uint8Array` buffer object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/kv-store/KVStoreEntry/prototype/metadataText.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.metadataText()\n\nThe `metadataText()` method of the `KVStoreEntry` interface provides a String interpretation of binary metadata associated with the `KVStoreEntry`.\n\nIf the binary data is not a valid string, an encoding error will be thrown.\n\n## Syntax\n\n```js\nmetadataText()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a String.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/kv-store/KVStoreEntry/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.text()\n\nThe `text()` method of the `KVStoreEntry` interface takes a `KVStoreEntry` stream and reads it to completion. It returns a promise that resolves with a `String`. The `KVStoreEntry `is always decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a `String`."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/logger/Logger/Logger.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Logger()`\n\nThe **`Logger` constructor** lets you connect your Fastly Compute application to a [Fastly Named Logger](https://developer.fastly.com/learning/integrations/logging/).\n\n## Syntax\n\n```js\nnew Logger(name)\n```\n\n> **Note:** `Logger()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - The Fastly Logger which should be associated with this Logger instance\n\n### Return value\n\nA new `Logger` object.\n\n## Examples\n\nIn this example we have a create a logger named `\"splunk\"` and logs the incoming request method and destination.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Logger Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^3\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nasync function app (event) {\n  let logger = new Logger(\"splunk\");\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nconst logger = new Logger(\"splunk\");\nasync function app (event) {\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/logger/Logger/prototype/log.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Logger.prototype.log\n\n▸ **log**(): `string`\n\nSends the given message, converted to a string, to this Logger instance's endpoint.\n\n**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nlog(message)\n```\n\n### Return value\n\n`undefined`.\n\n## Description\n\nSend the given message, converted to a string, to this Logger instance's endpoint.\n\nThe `log()` method requires its `this` value to be a [`Logger`](../Logger.mdx) object.\n\nIf the `this` value does not inherit from `Logger.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n## Examples\n\nIn this example we have a create a logger named `\"splunk\"` and logs the incoming request method and destination.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Logger.prototype.log Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^3\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nlet logger = new Logger(\"splunk\");\nasync function app (event) {\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nasync function app (event) {\n  let logger = new Logger(\"splunk\");\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/logger/configureConsole.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# configureConsole\n\nThe **`configureConsole()`** function allows configuring the behaviour of the `console` global JS logger.\n\n## Syntax\n\n```js\nconfigureConsole(loggingOptions)\n```\n\n### Parameters\n\n- `loggingOptions` _: object_\n  - \n  - The name has to be between 1 and 254 characters inclusive.\n  - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n\n## Examples\n\nIn this example, we disable prefixing for `console.log` and use `stderr` output for `console.error`:\n\n```js\nimport { configureConsole } from \"fastly:logger\";\n\nconfigureConsole({\n  prefixing: false,\n  stderr: true\n});\n\nasync function handleRequest(event) {\n  console.log(JSON.stringify(event.request.headers));\n  const url = new URL(event.request.url);\n  try {\n    validate(url);\n  } catch (e) {\n    console.error(`Validation error: ${e}`);\n    return new Response('Bad Request', { status: 400 });\n  }\n  return new Response('OK');\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/migration-guide/index.mdx",
    "content": "---\nsidebar_position: 1\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Migrating from v2 to v3`\n\n## SimpleCache.delete renamed to SimpleCache.purge and requires purge options to be supplied as the second parameter\n\nWe are renaming because \"purge\" is already a well-known and documented concept for removing content from Fastly's cache.\n\nThe new addition of a second argument allows the caller to decide what scope to purge the content from, currently they can choose to purge from all of Fastly (\"global\") or from the POP that contains the currently executing instance (\"pop\"). We do not provide a default option right now, in the future we may provide a default option, if we discover a common pattern is being used.\n\nHere is an example of migrating an application using `SimpleCache.delete` to `SimpleCache.purge` with the same purging behaviour:\n```diff\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const url = new URL(event.request);\n  const path = url.pathname;\n  if (url.searchParams.has('delete')) {\n-    SimpleCache.delete(path);\n+    SimpleCache.purge(path, { scope: \"global\" });\n    return new Response(page, { status: 204 });\n  }\n\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n\n```\n\n\n# `Migrating from v1 to v2`\n\n## ObjectStore renamed to KVStore\n\nWe have renamed the `ObjectStore` class to `KVStore`, and the module name from `fastly:object-store` to `fastly:kv-store`.\n\nYou will need to update your code to use the new class name and module name.\n\nBelow is the change that would need to be made for the imported module name:\n```diff\n- import { ObjectStore } from 'fastly:object-store';\n+ import { KVStore } from 'fastly:kv-store';\n```\n\nAnd this is the change that would need to be made for constructing an instance of the class:\n```diff\n- const store = new ObjectStore('my-store');\n+ const store = new KVStore('my-store');\n```\n\n\nHere is a full example of migrating an application from ObjectStore to KVStore:\n```diff\n/// <reference types=\"@fastly/js-compute\" />\n\n- import { ObjectStore } from 'fastly:object-store';\n+ import { KVStore } from 'fastly:kv-store';\n\nasync function app(event) {\n-   const files = new ObjectStore('files');\n+   const files = new KVStore('files');\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/secret-store/SecretStore/SecretStore.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `SecretStore()`\n\nThe **`SecretStore` constructor** lets you connect your Fastly Compute application to a Fastly Secret store.\n\nA secret store is a persistent, globally distributed store for secrets accessible to Fastly Compute services during request processing.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew SecretStore(name)\n```\n\n> **Note:** `SecretStore()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Define a Secret Store instance using the resource link name.\n  \n### Return value\n\nA new `SecretStore` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Secret Store exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name contains characters other than letters, numbers, dashes (-), underscores (_), and periods (.)\n\n## Examples\n\nIn this example we connect to a Secret Store named `'secrets'` and retrieve a secret named `'cat-api-key'` use the value in a Request header.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SecretStore } from \"fastly:secret-store\";\n\nasync function app(event) {\n  const secrets = new SecretStore('secrets')\n\n  const catApiKey = await secrets.get('cat-api-key')\n\n  return fetch('/api/cat', {\n    headers: {\n      'cat-api-key': catApiKey.plaintext()\n    }\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/secret-store/SecretStore/fromBytes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# fromBytes\n\nThe **`fromBytes()`** function is used to create an in-memory secret from an array buffer.\n\n>**Note**: This API should be avoided when possible, by instead using [SecretStore.prototype.get](./prototype/get.mdx) to obtain secure secrets.\n\n## Syntax\n\n```js\nfromBytes(new Uint8Array([1, 2, 3]))\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns a `SecretStoreEntry`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/secret-store/SecretStore/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SecretStore.prototype.get\n\n▸ **get**(): `string`\n\nGets the value associated with the key `key` in the Secret store.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the Secret Store.\n\n### Return value\n\nIf the key does not exist in the Secret Store, this returns a `Promise` which resolves with `null`.\n\nIf the key does exist in the Secret Store, this returns a `Promise` which resolves with an `SecretStoreEntry`.\n\n## Description\n\nSend the given message, converted to a string, to this SecretStore instance's endpoint.\n\nThe `get()` method requires its `this` value to be a [`SecretStore`](../SecretStore.mdx) object.\n\nIf the `this` value does not inherit from `SecretStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Is longer than 255 characters\n    - Contains characters other than letters, numbers, dashes (-), underscores (_), and periods (.)\n\n## Examples\n\nIn this example we connect to a Secret Store named `'secrets'` and retrieve a secret named `'cat-api-key'` use the value in a Request header.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SecretStore } from \"fastly:secret-store\";\n\nasync function app(event) {\n  const secrets = new SecretStore('secrets')\n\n  const catApiKey = await secrets.get('cat-api-key')\n\n  return fetch('/api/cat', {\n    headers: {\n      'cat-api-key': catApiKey.plaintext()\n    }\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/secret-store/SecretStoreEntry/prototype/plaintext.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SecretStoreEntry.prototype.plaintext\n\n▸ **plaintext**(): `string`\n\nReturns the plaintext contents of the SecretStoreEntry instance as String.\n\n## Syntax\n\n```js\nplaintext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA String\n\n### Exceptions\n\nThe `plaintext()` method requires its `this` value to be a `SecretStoreEntry` object.\nIf the `this` value does not inherit from `SecretStoreEntry.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n## Examples\n\nIn this example we connect to a Secret Store named `'secrets'` and retrieve a secret named `'cat-api-key'` use the value in a Request header.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SecretStore } from \"fastly:secret-store\";\n\nasync function app(event) {\n  const secrets = new SecretStore('secrets')\n\n  const catApiKey = await secrets.get('cat-api-key')\n\n  return fetch('/api/cat', {\n    headers: {\n      'cat-api-key': catApiKey.plaintext()\n    }\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/secret-store/SecretStoreEntry/prototype/rawBytes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SecretStoreEntry.prototype.rawBytes\n\n▸ **rawBytes**(): `Uint8Array`\n\nReturns the raw byte contents of the SecretStoreEntry instance as a Uint8Array.\n\n## Syntax\n\n```js\nrawBytes()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Uint8Array\n\n### Exceptions\n\nThe `rawBytes()` method requires its `this` value to be a `SecretStoreEntry` object.\nIf the `this` value does not inherit from `SecretStoreEntry.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/security/inspect.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# inspect\n\nThe **`inspect()`** function inspects a request using the [Fastly Next-Gen WAF](https://docs.fastly.com/en/ngwaf/).\n\n## Syntax\n\n```js\ninspect(request, config);\n```\n\n### Parameters\n\n- `request` _: Request_\n  - The Request to get a WAF determination for.\n- `config` _: object_\n  - `corp` _: string_\n    - Set a corp name for the configuration.\n    - This parameter is currently required.\n  - `workspace` _: string_\n    - Set a workspace name for the configuration.\n    - This parameter is currently required.\n  - `overrideClientIp` _: string_\n    - Specify an explicit client IP address to inspect.\n    - By default, `inspect` will use the IP address that made the request to the\n      running Compute service, but you may want to use a different IP when\n      service chaining or if requests are proxied from outside of Fastly’s\n      network.\n\n### Return value\n\nReturns an `Object` with the `inspect` response, with the following fields:\n\n- `waf_response` _: number_\n  - Security status code.\n  \n- `redirect_url` _: string | null_\n  - A redirect URL returned from Security.\n\n- `tags` _: string[]_\n  - Tags returned by Security.\n\n- `verdict` _: string_\n  - The outcome of inspecting a request with Security. It can be one of the following:\n    - `\"allow\"`\n      - Security indicated that this request is allowed.\n    - `\"block\"`\n      - Security indicated that this request should be blocked.\n    - `\"unauthorized\"`\n      - Security indicated that this service is not authorized to inspect a request.\n    - Other verdicts may be returned but not currently documented.\n\n- `decision_ms` _: number_\n  - How long Security spent determining its verdict, in milliseconds.\n  \n## Examples\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { inspect } from \"fastly:security\";\n\nasync function app(event) {\n  const res = inspect(event.request, {\n    corp: \"mycorp\",\n    workspace: \"myws\"\n  });\n  switch (res.verdict) {\n    case \"allow\":\n      return await fetch(event.request);\n    case \"block\":\n      return new Response(\"Request Blocked\", { status: 400 });\n    case \"unauthorized\":\n      return new Response(\"Unauthorized\", { status: 401 });\n    default:\n      return new Response(\"idk\", { status: 500 });\n  }\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/shielding/Shield/Shield.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `Shield()`\n\nLoad information about the given shield.\n\nReturns an object representing the shield if it is active, or throws an exception if the string is malformed or the shield doesn’t exist.\n\nShield names are defined on [this webpage](https://www.fastly.com/documentation/guides/concepts/shielding/#shield-locations), in the “shield code” column. For example, the string “pdx-or-us” will look up our Portland, OR, USA shield site, while “paris-fr” will look up our Paris site.\n\nIf you are using a major cloud provider for your primary origin site, consider looking at the “Recommended for” column, to find the Fastly POP most closely located to the given cloud provider.\n\n## Syntax\n\n```js\nnew Shield(name)\n```\n\n> **Note:** `Shield()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Shield exists with the provided name\n\n## Examples\n\nIn this example, we create a Shield instance for the Sydney, Australia shield POP. If the code is running on that shield POP, it fetches directly from origin. Otherwise, it routes the request through the shield using an encrypted connection.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n    \nimport { Shield } from \"fastly:shielding\";\n\nasync function app(event) {\n    const shield = new Shield('wsi-australia-au');\n    // If running on the shield POP, fetch from the origin directly\n    if (shield.runningOn()) {\n        return await fetch('https://http-me.fastly.com/anything', { backend: 'httpme' });\n    }\n    // Otherwise, route the request through the shield using an encrypted connection\n    return await fetch(event.request, { backend: shield.encryptedBackend() });\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/shielding/Shield/prototype/encryptedBackend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Shield.prototype.encryptedBackend\n\n▸ **encryptedBackend**(configuration?): `Backend`\n\nReturns a `Backend` representing an encrypted connection to the POP.\n\nFor reference, this is almost always the backend that you want to use. Only use [`Shield::unencryptedBackend`](./unencryptedBackend.mdx) in situations in which you are 100% sure that all the data you will send and receive over the backend is already encrypted.\n\n## Parameters\n\n- `configuration` _: object_ _**optional**_\n  - `firstByteTimeout` _: number_ _**optional**_\n    - An optional first byte timeout (in milliseconds) to set on the returned backend.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/shielding/Shield/prototype/runningOn.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Shield.prototype.runningOn\n\n▸ **runningOn**(): `boolean`\n\nReturns whether we are currently operating on the given shield.\n\nTechnically, this may also return true in very isolated incidents in which Fastly is routing traffic from the target shield POP to the POP that this code is running on, but in these situations the results should be approximately identical.\n\n(For example, it may be the case that you are asking to shield to ‘pdx-or-us’. But, for load balancing, performance, or other reasons, Fastly is temporarily shifting shielding traffic from Portland to Seattle. In that case, this function may return true for hosts running on ‘bfi-wa-us’, our Seattle site, because effectively the shield has moved to that location. This should give you a slightly faster experience than the alternative, in which this function would return false, you would try to forward your traffic to the Portland site, and then that traffic would be caught and redirected back to Seattle.)\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/shielding/Shield/prototype/unencryptedBackend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Shield.prototype.unencryptedBackend\n\n▸ **unencryptedBackend**(configuration?): `Backend`\n\nReturns a `Backend` representing an unencrypted connection to the POP.\n\nGenerally speaking, we encourage users to use [`Shield::encryptedBackend`](./encryptedBackend.mdx) instead of this function. Data sent over this backend – the unencrypted version – will be sent over the open internet, with no protections. In most cases, this is not what you want. However, in some cases – such as when you want to ship large data blobs that you know are already encrypted — using these backends can prevent a double-encryption performance penalty.\n\n## Parameters\n\n- `configuration` _: object_ _**optional**_\n  - `firstByteTimeout` _: number_ _**optional**_\n    - An optional first byte timeout (in milliseconds) to set on the returned backend."
  },
  {
    "path": "documentation/versioned_docs/version-3.40.1/websocket/createWebsocketHandoff.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# createWebsocketHandoff\n\nThe **`createWebsocketHandoff()`** function creates a Response instance which informs Fastly to pass the original Request through Websocket, to the declared backend.\n\n## Syntax\n\n```js\ncreateWebsocketHandoff(request, backend)\n```\n\n### Parameters\n\n- `request` _: Request_\n  - The request to pass through Websocket.\n- `backend` _: string_\n  - The name of the backend that Websocket should send the request to.\n  - The name has to be between 1 and 254 characters inclusive.\n  - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n\n### Return value\n\nA Response instance is returned, which can then be used via `event.respondWith`.\n\n## Examples\n\nIn this example application requests to the path `/stream` and sent handled via Websocket.\n\n```js\nimport { createWebsocketHandoff } from \"fastly:websocket\";\n\nasync function handleRequest(event) {\n  try {\n    const url = new URL(event.request.url);\n    if (url.pathname === '/stream') {\n      return createWebsocketHandoff(event.request, 'websocket_backend');\n    } else {\n      return new Response('oopsie, make a request to /stream for some websocket goodies', { status: 404 });\n    }\n  } catch (error) {\n    console.error({error});\n    return new Response(error.message, {status:500})\n  }\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/acl/Acl/open.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Acl.open()\n\nOpens the ACL with the given name, returning a new `Acl` instance with the given name on success.\n\n## Syntax\n\n```js\nAcl.open(name)\n```\n\n### Return value\n\nAn `Acl` instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/acl/Acl/prototype/lookup.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Acl.prototype.lookup()\n\nThe **`lookup(ipAddress)`** method returns the name associated with the `Acl` instance.\n\n## Syntax\n\n```js\nacl.lookup(ipAddress)\n```\n\n### Parameters\n\n- `ipAddress` _: string_\n  - IPv4 or IPv6 address to lookup\n\n### Return value\n\nAn Object of the form `{ action: 'ALLOW' | 'BlOCK', prefix: string }`, where `prefix` is the IP\naddress prefix that was matched in the ACL.\n\n## Example\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Acl } from 'fastly:acl';\naddEventListener('fetch', async (evt) => {\n  const myAcl = Acl.open('myacl');\n  const match = await myAcl.lookup(evt.client.address);\n  evt.respondWith(new Response(match?.action === 'BLOCK' ? 'blocked' : 'allowed'));\n});\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/backend/Backend/Backend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Backend()`\n\nThe **`Backend` constructor** lets you dynamically create new [Fastly Backends](https://developer.fastly.com/reference/api/services/backend/) for your Fastly Compute service.\n\n>**Note**: Dynamic backends are by default disabled at the Fastly service level. Contact [Fastly Support](https://support.fastly.com/hc/en-us/requests/new?ticket_form_id=360000269711) to request dynamic backends on Fastly Services.\n\nTo disable the usage of dynamic backends, see [enforceExplicitBackends](../enforceExplicitBackends.mdx).\n\n## Syntax\n\n```js\nnew Backend(backendConfiguration)\n```\n\n> **Note:** `Backend()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `backendConfiguration`\n\n  - : An Object which contains all the configuration options to apply to the newly created Backend.\n\n    - `name` _: string_\n      - The name of the backend.\n      - The name has to be between 1 and 254 characters inclusive.\n      - The name can be whatever you would like, as long as it does not match the name of any of the static service backends nor match any other dynamic backends built during a single execution of the application.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n    - `target` _: string_\n      - A hostname, IPv4, or IPv6 address for the backend as well as an optional port.\n      - The target has to be at-least 1 character.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. Is null, undefined, an empty string, not a valid IP address or host, or is the string `::`\n    - `hostOverride` _: string_ _**optional**_\n      - If set, will force the HTTP Host header on connections to this backend to be the supplied value.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `connectTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for a connection to this backend to be established.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `firstByteTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `betweenBytesTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend.\n      - If exceeded, the response received so far will be considered complete and the fetch will end.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `useSSL` _: boolean_ _**optional**_\n      - Whether or not to require TLS for connections to this backend.\n    - `dontPool` _: boolean_ _**optional**_\n      - Determine whether or not connections to the same backend should be pooled across different sessions.\n      - Fastly considers two backends “the same” if they're registered with the same name and the exact same settings.\n      - In those cases, when pooling is enabled, if Session 1 opens a connection to this backend it will be left open, and can be re-used by Session 2.\n      - This can help improve backend latency, by removing the need for the initial network / TLS handshake(s).\n      - By default, pooling is enabled for dynamic backends.\n    - `tlsMinVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Minimum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `tlsMaxVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Maximum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `certificateHostname` _: string_ _**optional**_\n      - Define the hostname that the server certificate should declare.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `caCertificate` _: string_ _**optional**_\n      - The CA certificate to use when checking the validity of the backend.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `ciphers` _: string_ _**optional**_\n      - List of OpenSSL ciphers to support for connections to this origin.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - [List of ciphers supported by Fastly](https://developer.fastly.com/learning/concepts/routing-traffic-to-fastly/#use-a-tls-configuration).\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `sniHostname` _: string_ _**optional**_\n      - The SNI hostname to use on connections to this backend.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `clientCertificate` _: object_ _**optional**_\n      - The client certificate to provide for the TLS handshake\n      - `certificate` _: string_\n        - The PEM certificate string.\n      - `key` _: SecretStoreEntry_\n        - The `SecretStoreEntry` to use for the key, created via [`SecretStore.prototype.get`](../../fastly:secret-store/SecretStore/prototype/get.mdx) or alteratively via [`SecretStore.fromBytes`](../../fastly:secret-store/SecretStore/fromBytes.mdx).\n    - `httpKeepalive` _: number_ _**optional**_\n      - Enable HTTP keepalive, setting the timout in milliseconds.\n    - `tcpKeepalive` _: boolean | object_ _**optional**_\n      - Enable TCP keepalive. When an object, optionally setting the keepalive configuration options.\n      - `timeSecs` _: number_ _**optional**_\n        - Configure how long to wait after the last sent data over the TCP connection before starting to send TCP keepalive probes.\n      - `intervalSecs` _: number_ _**optional**_\n        - Configure how long to wait between each TCP keepalive probe sent to the backend to determine if it is still active.\n      - `probes` _: number_ _**optional**_\n        - Number of probes to send to the backend before it is considered dead.\n    - `grpc` _: boolean_ _**optional**_\n      - **_Experimental feature_**\n      - When enabled, sets that this backend is to be used for gRPC traffic. \n      - _Warning: When using this experimental feature, no guarantees are provided for behaviours for backends that do not provide gRPC traffic._\n\nAll optional generic options can have their defaults set via [`setDefaultDynamicBackendConfig()`](../setDefaultDynamicBackendConfig.mdx).\n\nThis includes all configuration options above except for `name`, `target`, `hostOverride`, `sniHostname` and `grpc`.\n\n### Return value\n\nA new `Backend` object.\n\n## Examples\n\nIn this example an explicit Dynamic Backend is created and supplied to the fetch request, the response is then returned to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Explicit Dynamic Backend Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\",\n    connectTimeout: 1000,\n    firstByteTimeout: 15000,\n    betweenBytesTimeout: 10000,\n    useSSL: true,\n    tlsMinVersion: 1.3,\n    tlsMaxVersion: 1.3,\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\",\n    connectTimeout: 1000,\n    firstByteTimeout: 15000,\n    betweenBytesTimeout: 10000,\n    useSSL: true,\n    tlsMinVersion: 1.3,\n    tlsMaxVersion: 1.3,\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/backend/Backend/exists.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.exists()\n\nThe **`Backend.exists()`** method returns a boolean indicating if a Backend with the given name exists or not.\n\n## Syntax\n\n```js\nexists(name)\n```\n\n### Return value\n\nA boolean indicating if a Backend with the given name exists or not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/backend/Backend/fromName.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.fromName()\n\nReturns the `Backend` instance with the given name, if one exists. If one does not exist, an error is thrown.\n\n## Syntax\n\n```js\nfromName(name)\n```\n\n### Return value\n\nA `Backend` instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/backend/Backend/health.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.health()\n\n:::info\n\nThis method is deprecated, use [`Backend.prototype.health`](./prototype/health.mdx) instead.\n\n:::\n\nThe **`Backend.health()`** method returns a string representing the health of the given Backend instance.\n\n## Syntax\n\n```js\nBackend.health(backend)\n```\n\n### Return value\n\nA string representing the health of the specified Backend value.\n\nPossible values are:\n- `\"healthy\"` - The backend's health check has succeeded, indicating the backend is working as expected and should receive requests.\n- `\"unhealthy\"` - The backend's health check has failed, indicating the backend is not working as expected and should not receive requests.\n- `\"unknown\"` - The backend does not have a health check configured.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/backend/Backend/prototype/betweenBytesTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.betweenBytesTimeout\n\nThe read-only **`betweenBytesTimeout`** property of a `Backend` instance is an integer number\nproviding the between bytes timeout for this backend in milliseconds.\n\nWhen not set or in environments that do not support this property (such as Viceroy), `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/backend/Backend/prototype/connectTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.connectTimeout\n\nThe read-only **`connectTimeout`** property of a `Backend` instance is an integer number\nproviding the connect timeout for this backend in milliseconds.\n\nWhen not set or in environments that do not support this property (such as Viceroy), `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/backend/Backend/prototype/firstByteTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.firstByteTimeout\n\nThe read-only **`firstByteTimeout`** property of a `Backend` instance is an integer number\nproviding the first byte timeout for this backend in milliseconds.\n\nWhen not set or in environments that do not support this property (such as Viceroy), `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/backend/Backend/prototype/health.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.prototype.health()\n\nThe **`Backend.prototype.health()`** method returns a string representing the health of the given Backend instance.\n\n## Syntax\n\n```js\nhealth()\n```\n\n### Return value\n\nA string representing the health of the specified Backend value.\n\nPossible values are:\n- `\"healthy\"` - The backend's health check has succeeded, indicating the backend is working as expected and should receive requests.\n- `\"unhealthy\"` - The backend's health check has failed, indicating the backend is not working as expected and should not receive requests.\n- `\"unknown\"` - The backend does not have a health check configured.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/backend/Backend/prototype/hostOverride.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.hostOverride\n\nThe read-only **`hostOverride`** property of a `Backend` instance is the host header\noverride string used when sending requests to this backend.\n\n## Value\n\nA `string`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/backend/Backend/prototype/httpKeepaliveTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.httpKeepaliveTime\n\nThe read-only **`httpKeepaliveTime`** property of a `Backend` instance is the HTTP keepalive\ntime for this backend in milliseconds, or 0 if no keepalive is set.\n\n## Value\n\nA `number`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/backend/Backend/prototype/isDynamic.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.isDynamic\n\nThe read-only **`isDynamic`** property of a `Backend` instance is a boolean\nindicating if the backend was dynamically created for this service.\n\n## Value\n\nA `boolean`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/backend/Backend/prototype/isSSL.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.isSSL\n\nThe read-only **`isSSL`** property of a `Backend` instance is a boolean\nindicating if the backend is using an SSL connection.\n\n## Value\n\nA `boolean`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/backend/Backend/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# name\n\nThe read-only **`name`** property of the backend returns the backend name string.\n\n## Value\n\nA `string`.\n\n## Description\n\nProvides the name of the backend.\n\n## Examples\n\n### Using name\n\nThe following example logs the string value of a [Backend](../Backend.mdx) object:\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Backend.prototype.name Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\\\"@fastly/js-compute\\\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.name); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.name); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/backend/Backend/prototype/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.port\n\nThe read-only **`port`** property of a `Backend` instance is the port number\nof this backend.\n\n## Value\n\nA `number`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/backend/Backend/prototype/target.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.target\n\nThe read-only **`target`** property of a `Backend` instance is the host string\nthis backend is configured to use.\n\n## Value\n\nA `string`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/backend/Backend/prototype/tcpKeepalive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.tcpKeepalive\n\nThe read-only **`tcpKeepalive`** property of a `Backend` instance returns an object providing\nthe TCP keepalive configuration, if any, otherwise returning `null` if TCP keepalive is not enabled.\n\nThis object has the following properties:\n- `timeSecs` _: number or null._\n  - Configure how long to wait after the last sent data over the TCP connection before starting to send TCP keepalive probes.\n- `intervalSecs` _: number or null._\n  - Configure how long to wait between each TCP keepalive probe sent to the backend to determine if it is still active.\n- `probes` _: number or null._\n  - Number of probes to send to the backend before it is considered dead.\n\n## Value\n\nA `Object` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/backend/Backend/prototype/tlsMaxVersion.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.tlsMaxVersion\n\nThe read-only **`tlsMaxVersion`** property of a `Backend` instance is the max TLS version\nit is configured to use, as a number, either `1.0`, `1.1`, `1.2`, or `1.3`.\n\nWhen not used, or for environments that do not support this feature, such as Viceroy, `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/backend/Backend/prototype/tlsMinVersion.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.tlsMinVersion\n\nThe read-only **`tlsMinVersion`** property of a `Backend` instance is the max TLS version\nit is configured to use, as a number, either `1.0`, `1.1`, `1.2`, or `1.3`.\n\nWhen not used, or for environments that do not support this feature, such as Viceroy, `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/backend/Backend/prototype/toName.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.prototype.toName()\n\n:::info\n\nThis method is deprecated, use [`Backend.prototype.name`](./name.mdx) instead.\n\n:::\n\nThe **`toName()`** method returns the name associated with the `Backend` instance.\n\n## Syntax\n\n```js\ntoName()\n```\n\n### Return value\n\nA string which contains the name of the Backend.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/backend/Backend/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# toString\n\n:::info\n\nThis method is deprecated, use [`Backend.prototype.name`](./name.mdx) instead.\n\n:::\n\nThe **`toString()`** method returns a string representing the specified Backend value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified Backend value.\n\n## Description\n\nThe [Backend](../Backend.mdx) object overrides the `toString()` method of [Object](../../../globals//Object/Object.mdx); it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For [Backend](../Backend.mdx) values, the `toString` method returns the name given to the [Backend](../Backend.mdx) object during construction.\n\nThe `toString()` method requires its `this` value to be a [Backend](../Backend.mdx) object.\n\nIf the `this` value does not inherit from `Backend.prototype`, a [TypeError](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n## Examples\n\n### Using toString()\n\nThe following example logs the string value of a [Backend](../Backend.mdx) object:\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Backend.prototype.toString Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\\\"@fastly/js-compute\\\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.toString()); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.toString()); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/backend/allowDynamicBackends.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# allowDynamicBackends\n\n:::info\n\nThis method is deprecated, and dynamic backends are now always supported when enabled at the service level. See [`enforceExplicitBackends`](./enforceExplicitBackends.mdx) instead.\n\n:::\n\nThe **`allowDynamicBackends()`** function is used to control whether or not Dynamic Backends should be allowed within this Fastly Compute Service.\n\nBy default, Dynamic Backends are enabled, but can be a potential security concern since third-party JavaScript code may send arbitrary requests, potentially including sensitive/secret data, off to destinations that the JavaScript project was not intending.\n\nUsing `allowDynamicBackends(false)` this security property can be restored to only use explicit backend definitions.\n\n>**Note**: By default, while dynamic backends are allowed in the SDK, they are by default disabled at the Fastly service level.\n\n## Syntax\n\n```js\nallowDynamicBackends(enabledOrConfig)\n```\n\n### Parameters\n\n- `enabled` _: boolean_\n  - Whether or not to allow Dynamic Backends\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/backend/enforceExplicitBackends.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# enforceExplicitBackends\n\nCall this function to enforce the security property of explicitly-defined backends, even when dynamic backends are enabled at\nthe Fastly service level.\n\nBy default, if dynamic backends are supported for the Fastly service, they will be automatically used when creating a new\n`fetch()` request. This default behaviour for dynamic backends can be a potential security concern since third-party JavaScript\ncode may send arbitrary requests, including sensitive/secret data, off to destinations that the JavaScript project was not\nintending.\n\nWhen calling this function, an optional default backend name can be provided.\n\n>**Note**: This is a separate option to the service-level dynamic backend support for Fastly services, which is by deault disabled for Fastly services.\n\nThe **`enforceExplicitBackends()`** function is used to control whether or not Dynamic Backends should be allowed within this Fastly Compute Service.\n\nBy default, Dynamic Backends are enabled, but can be a potential security concern since third-party JavaScript code may send arbitrary requests, potentially including sensitive/secret data, off to destinations that the JavaScript project was not intending.\n\nUsing `allowDynamicBackends(false)` this security property can be restored to only use explicit backend definitions.\n\n>**Note**: Dynamic Backends are disabled by default for Fastly Services. Please contact [Fastly Support](https://support.fastly.com/hc/requests/new?ticket_form_id=360000269711) to request the feature be enabled or disabled on Fastly Services.\n\n## Syntax\n\n```js\nenforceExplicitBackends(defaultBackend?)\n```\n\n### Parameters\n\n- `defaultBackend` _: string_ _**optional**_\n  - An optional default backend string name to use in `fetch()` requests.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/backend/setDefaultDynamicBackendConfig.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# setDefaultDynamicBackendConfig()\n\nThe **`setDefaultDynamicBackendConfig()`** allows setting backend configuration defaults that should apply to any newly created dynamic backends via the `new Backend()` constructor.\n\n### Parameters\n\n- `defaultDynamicBackendConfig`\n\n  - : An Object which contains the generic configuration options to apply to newly created Backends.\n    - `connectTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for a connection to this backend to be established.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `firstByteTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `betweenBytesTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend.\n      - If exceeded, the response received so far will be considered complete and the fetch will end.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `useSSL` _: boolean_ _**optional**_\n      - Whether or not to require TLS for connections to this backend.\n    - `dontPool` _: boolean_ _**optional**_\n      - Determine whether or not connections to the same backend should be pooled across different sessions.\n      - Fastly considers two backends “the same” if they're registered with the same name and the exact same settings.\n      - In those cases, when pooling is enabled, if Session 1 opens a connection to this backend it will be left open, and can be re-used by Session 2.\n      - This can help improve backend latency, by removing the need for the initial network / TLS handshake(s).\n      - By default, pooling is enabled for dynamic backends.\n    - `tlsMinVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Minimum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `tlsMaxVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Maximum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `certificateHostname` _: string_ _**optional**_\n      - Define the hostname that the server certificate should declare.\n      - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `caCertificate` _: string_ _**optional**_\n      - The CA certificate to use when checking the validity of the backend.\n      - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `ciphers` _: string_ _**optional**_\n      - List of OpenSSL ciphers to support for connections to this origin.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - [List of ciphers supported by Fastly](https://developer.fastly.com/learning/concepts/routing-traffic-to-fastly/#use-a-tls-configuration).\n      - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `clientCertificate` _: object_ _**optional**_\n      - The client certificate to provide for the TLS handshake\n      - `certificate` _: string_\n        - The PEM certificate string.\n      - `key` _: SecretStoreEntry_\n        - The `SecretStoreEntry` to use for the key, created via [`SecretStore.prototype.get`](../fastly:secret-store/SecretStore/prototype/get.mdx) or alteratively via [`SecretStore.fromBytes`](../fastly:secret-store/SecretStore/fromBytes.mdx).\n    - `httpKeepalive` _: number_ _**optional**_\n      - Enable HTTP keepalive, setting the timout in milliseconds.\n    - `tcpKeepalive` _: boolean | object_ _**optional**_\n      - Enable TCP keepalive. When an object, optionally setting the keepalive configuration options.\n      - `timeSecs` _: number_ _**optional**_\n        - Configure how long to wait after the last sent data over the TCP connection before starting to send TCP keepalive probes.\n      - `intervalSecs` _: number_ _**optional**_\n        - Configure how long to wait between each TCP keepalive probe sent to the backend to determine if it is still active.\n      - `probes` _: number_ _**optional**_\n        - Number of probes to send to the backend before it is considered dead.\n\n## Syntax\n\n```js\nsetDefaultDynamicBackendConfig(defaultConfig)\n```\n\n### Return value\n\nNone.\n\n## Examples\n\nIn this example an explicit Dynamic Backend is created and supplied to the fetch request, with timeouts and TLS options provided from the default backend configuration options.\n\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Explicit Dynamic Backend Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nimport { Backend, setDefaultDynamicBackendConfig } from \"fastly:backend\";\nallowDynamicBackends(true);\nsetDefaultDynamicBackendConfig({\n  connectTimeout: 1000,\n  firstByteTimeout: 15_000,\n  betweenBytesTimeout: 10_000,\n  useSSL: true,\n  sslMinVersion: 1.3,\n  sslMaxVersion: 1.3\n});\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  // Timeouts and TLS configuration still get set from the default backend configuration above.\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\"\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nimport { Backend } from \"fastly:backend\";\nallowDynamicBackends(true);\nsetDefaultDynamicBackendConfig({\n  connectTimeout: 1000,\n  firstByteTimeout: 15_000,\n  betweenBytesTimeout: 10_000,\n  useSSL: true,\n  sslMinVersion: 1.3,\n  sslMaxVersion: 1.3\n});\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\"\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/cache/CacheEntry/age.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.age\n\nThe **`age`** method of the `CacheEntry` interface returns the current age in milliseconds of the cached item.\n\n## Syntax\n\n```js\nage()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the current age in milliseconds of the cached item."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/cache/CacheEntry/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.body\n\nThe **`body`** method of the `CacheEntry` interface retrieves the cached item contents as a `ReadableStream`.\n\nOnly one stream can be active at a time for a given `CacheEntry`. An error will be thrown if a stream is already active for this `CacheEntry`.\n\n## Syntax\n\n```js\nbody(options)\n```\n\n### Parameters\n\n- `options` _: object_ __optional__\n  - `start` _: number_\n    - The offset from which to start the range.\n  - `end` _: number_\n    - How long the range should be.\n\n### Return value\n\nA `ReadableStream` which contains the cached item contents."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/cache/CacheEntry/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.close\n\nThe **`close`** method of the `CacheEntry` interface closes the connection to the cache for this `CacheEntry`.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/cache/CacheEntry/hits.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.hits\n\nThe **`hits`** method of the `CacheEntry` interface returns the amount of cache hits for the cached item.\n\nNote: this hit count only reflects the view of the server that supplied the cached item. Due to clustering, this count may vary between potentially many servers within the data center where the item is cached. See the [clustering documentation](https://developer.fastly.com/learning/vcl/clustering/) for details, though note that the exact caching architecture of Compute is different from VCL services.\n\n## Syntax\n\n```js\nhits()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the number of cache hits to this cached item.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/cache/CacheEntry/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.length\n\nThe **`length`** method of the `CacheEntry` interface returns the size in bytes of the cached item, if known, otherwise returns `null` if the length is currently unknown.\n\nThe length of the cached item may be unknown if the item is currently being streamed into the cache without a fixed length.\n\n## Syntax\n\n```js\nlength()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` or `null` which represents the current length of the cached item.\n\n`null` is returned if the length is currently unknown."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/cache/CacheEntry/maxAge.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.maxAge\n\nThe **`maxAge`** method of the `CacheEntry` interface returns the time in milliseconds for which the cached item is considered fresh.\n\n## Syntax\n\n```js\nmaxAge()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the time in milliseconds for which the cached item is considered fresh."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/cache/CacheEntry/staleWhileRevalidate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.staleWhileRevalidate\n\nThe **`staleWhileRevalidate`** method of the `CacheEntry` interface returns the time in milliseconds for which a cached item can safely be used despite being considered stale.\n\n## Syntax\n\n```js\nstaleWhileRevalidate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the time in milliseconds for which a cached item can safely be used despite being considered stale."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/cache/CacheEntry/state.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.state\n\nThe **`state`** method of the `CacheEntry` interface returns a `CacheState` instance which reflects the current state of this `CacheEntry` instance.\n\n## Syntax\n\n```js\nstate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `CacheState` instance which reflects the current state of this `CacheEntry` instance."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/cache/CacheEntry/userMetadata.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.userMetadata\n\nThe **`userMetadata`** method of the `CacheEntry` interface returns the user-controlled metadata associated with the cached item.\n\n## Syntax\n\n```js\nuserMetadata()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nAn `ArrayBuffer` which contains the user-controlled metadata associated with the cached item."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/cache/CacheState/found.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheState.found\n\nThe **`found`** method of the `CacheState` interface returns `true` if a cached item was located.\n\nEven if an cached item is found, the cached item might be stale and require updating. Use `mustInsertOrUpdate()` to determine whether this transaction client is expected to update the cached item.\n\n## Syntax\n\n```js\nfound()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `boolean` which represents whether a cached item was located or not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/cache/CacheState/mustInsertOrUpdate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheState.mustInsertOrUpdate\n\nThe **`mustInsertOrUpdate`** method of the `CacheState` interface returns `true` if a fresh cache item was not found, and this transaction client is expected to insert a new item or update a stale item.\n\n\n## Syntax\n\n```js\nmustInsertOrUpdate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `boolean` which represents whether a fresh cached item was found not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/cache/CacheState/stale.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheState.stale\n\nThe **`stale`** method of the `CacheState` interface returns `true` if the cached item is stale.\n\nA cached item is stale if its age is greater than its `maxAge` period.\n\n## Syntax\n\n```js\nstale()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `boolean` which represents whether the cached item is stale or not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/cache/CacheState/usable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheState.usable\n\nThe **`usable`** method of the `CacheState` interface returns `true` if the cached item is usable.\n\nA cached item is usable if its age is less than the sum of the `maxAge` and `staleWhileRevalidate` periods.\n\n## Syntax\n\n```js\nusable()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `boolean` which represents whether a cached item is usable or not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/cache/CoreCache/insert.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CoreCache.insert\n\nPerforms a non-transactional insertion into the cache, returning a `FastlyBody` instance for providing the cached object itself.\nFor the insertion to complete successfully, the object must be written into the returned `FastlyBody` instance, and then `FastlyBody.protoype.close` must be called.\nIf `FastlyBody.prototype.close` does not get called, the insertion is considered incomplete, and any concurrent lookups that may be reading from the object as it is streamed into the cache may encounter a streaming error.\n\nNote: Like `CoreCache.lookup()`, `CoreCache.insert()` may race with concurrent lookups or insertions, and will unconditionally overwrite existing cached items rather than allowing for revalidation of an existing object.\nThe transactional equivalent of this function is `TransactionCacheEntry.insert()`, which may only be called following a `CoreCache.transactionLookup()` call and the returned `CacheEntry` when has a state where `CacheState.mustInsertOrUpdate()` returns true.\n\n## Syntax\n\n```js\ninsert(key, options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - A cache key which is a string with a length of up to 8,135 that identify a cached item.\n  - The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n- `options` _: object_\n  - `headers` _: HeadersInit_ __optional__\n    - The headers act as additional factors in object selection, and the choice of which headers to factor in is determined during insertion, via the `vary` property within `TransactionInsertOptions`.\n    - A lookup will succeed when there is at least one cached item that matches lookup’s `key`, and all of the lookup’s headers included in the cache items’ `vary` list match the corresponding headers in that cached item.\n    - A typical example is a cached HTTP response, where the request had an \"Accept-Encoding\" header. In that case, the origin server may or may not decide on a given encoding, and whether that same response is suitable for a request with a different (or missing) Accept-Encoding header is determined by whether Accept-Encoding is listed in Vary header in the origin’s response.\n    - Note: These headers are narrowly useful for implementing cache lookups incorporating the semantics of the HTTP Vary header.\n  - `maxAge` _: number_ __optional__\n    - Sets the “time to live” for the cache item in milliseconds: The time for which the item will be considered fresh.\n  - `vary` _: array_ __optional__\n    - Sets the list of headers that must match when looking up this cached item.\n  - `initialAge` _: number_ __optional__\n    - Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n    - The initial age is 0 by default.\n  - `staleWhileRevalidate` _: number_ __optional__\n    - Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n    - Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n    - The methods `CacheState.protoype.usable` and `CacheState.protoype.stale` can be used to determine the current state of an item.\n    - The stale-while-revalidate period is 0 by default.\n  - `surrogateKeys` _: array_ __optional__\n    - Sets the surrogate keys that can be used for purging this cached item.\n    - Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item’s TTL to elapse, or overwriting the item with insert().\n    - Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n    - [See the Fastly surrogate keys guide for details.](https://docs.fastly.com/en/guides/working-with-surrogate-keys)\n  - `length` _: number_ __optional__\n    - Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n    - It is preferable to provide a length, if possible.\n    - Clients that begin streaming the item’s contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n  - `userMetadata` _: ArrayBufferView | ArrayBuffer | URLSearchParams | string_ __optional__\n    - Sets the user-defined metadata to associate with the cached item.\n  - `sensitive` _: boolean_ __optional__\n    - Enable or disable PCI/HIPAA-compliant non-volatile caching.\n    - By default, this is false.\n    - [See the Fastly PCI-Compliant Caching and Delivery documentation for details.](https://docs.fastly.com/products/pci-compliant-caching-and-delivery)\n\n### Return value\n\nReturns a `FastlyBody`.\n\n### Exceptions\n\n- If the provided `key`:\n  - Cannot be coerced to a string\n  - Is an empty string\n  - Is longer than 8135 characters\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/cache/CoreCache/lookup.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# CoreCache.lookup\n\nPerform a non-transactional lookup into the cache, returning a CacheEntry if a usable cached item was found.\nA cached item is usable if its age is less than the sum of its TTL and its stale-while-revalidate period. Items beyond that age are unusably stale.\n\nNote: A non-transactional lookup will not attempt to coordinate with any concurrent cache lookups.\nIf two instances of the service perform a lookup at the same time for the same cache key, and the item is not yet cached, they will both return `null`.\nWithout further coordination, they may both end up performing the work needed to insert() the item (which usually involves origin requests and/or computation) and racing with each other to insert.\nTo resolve such races between concurrent lookups, use `CoreCache.transactionLookup()` instead.\n\n## Syntax\n\n```js\nlookup(key, options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - A cache key which is a string with a length of up to 8,135 that identify a cached item.\n  - The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n\n- `options` _: object_\n  - `headers` _: HeadersInit_ __optional__\n    - The headers act as additional factors in object selection, and the choice of which headers to factor in is determined during insertion, via the `vary` property within `TransactionInsertOptions`.\n    - A lookup will succeed when there is at least one cached item that matches lookup’s `key`, and all of the lookup’s headers included in the cache items’ `vary` list match the corresponding headers in that cached item.\n    - A typical example is a cached HTTP response, where the request had an \"Accept-Encoding\" header. In that case, the origin server may or may not decide on a given encoding, and whether that same response is suitable for a request with a different (or missing) Accept-Encoding header is determined by whether Accept-Encoding is listed in Vary header in the origin’s response.\n    - Note: These headers are narrowly useful for implementing cache lookups incorporating the semantics of the HTTP Vary header.\n\n### Return value\n\nReturns `CacheEntry` if a usable cached item was found, otherwise returns `null`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/cache/CoreCache/transactionLookup.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# CoreCache.transactionLookup\n\nPerform a transactional lookup into the cache, returning a `TransactionCacheEntry` instance.\n\nTransactions coordinate between concurrent actions on the same cache key, incorporating concepts of [request collapsing](https://developer.fastly.com/learning/concepts/request-collapsing/) and [revalidation](https://developer.fastly.com/learning/concepts/stale/), though at a lower level that does not automatically interpret HTTP semantics.\n\nRequest Collapsing:\nIf there are multiple concurrent calls to `CoreCache.transactionLookup()` for the same item and that item is not present,\njust one of the callers will be instructed to insert the item into the cache as part of the transaction.\nThe other callers will block until the metadata for the item has been inserted, and can then begin streaming its contents out of the cache at the same time that the inserting caller streams them into the cache.\n\nRevalidation:\nSimilarly, if an item is usable but stale, and multiple callers attempt a `CoreCache.transactionLookup()` concurrently, they will all be given access to the stale item, but only one will be designated to perform an asynchronous update (or insertion) to freshen the item in the cache.\n\n## Syntax\n\n```js\ntransactionLookup(key, options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - A cache key which is a string with a length of up to 8,135 that identify a cached item.\n  - The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n\n- `options` _: object_\n  - `headers` _: HeadersInit_ __optional__\n    - The headers act as additional factors in object selection, and the choice of which headers to factor in is determined during insertion, via the `vary` property within `TransactionInsertOptions`.\n    - A lookup will succeed when there is at least one cached item that matches lookup’s `key`, and all of the lookup’s headers included in the cache items’ `vary` list match the corresponding headers in that cached item.\n    - A typical example is a cached HTTP response, where the request had an \"Accept-Encoding\" header. In that case, the origin server may or may not decide on a given encoding, and whether that same response is suitable for a request with a different (or missing) Accept-Encoding header is determined by whether Accept-Encoding is listed in Vary header in the origin’s response.\n    - Note: These headers are narrowly useful for implementing cache lookups incorporating the semantics of the HTTP Vary header.\n\n### Return value\n\nReturns an instance of `TransactionCacheEntry`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/cache/SimpleCache/SimpleCache.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `SimpleCache`\n\nThe **`SimpleCache` class** provides a simplified interface to inserting and retrieving entries from Fastly's Cache.\n\nAll the methods on the class are static methods, there are no instance methods.\n\n\n## Examples\n\nIn this example we attempt to retrieve an entry from the Fastly Cache, if the entry does not exist, we create the content and insert it into the Fastly Cache before finally returning.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const path = new URL(event.request.url).pathname;\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/cache/SimpleCache/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCache.get\n\n▸ **get**(): `string`\n\nGets the entry associated with the key `key` from the cache.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the cache.\n\n### Return value\n\nIf the key does not exist in the cache, this returns `null`.\n\nIf the key does exist in the cache, this returns a `SimpleCacheEntry`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n## Examples\n\nIn this example we attempt to retrieve an entry from the Fastly Cache, and return a message stating whether the entry was in the Fastly Cache or not.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const path = new URL(event.request.url).pathname;\n  let page = SimpleCache.get(path);\n  return new Response(page ? `${path} is in the cache` : `${path} is not in the cache`, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/cache/SimpleCache/getOrSet.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCache.getOrSet\n\nThe **`getOrSet()`** method attempts to get an entry from the cache for the supplied `key`. If no entry is found (or has expired), the supplied `set` function is executed and its result is inserted into the cache under the supplied `key` and for the supplied `ttl` (Time-To-Live) duration, provided in seconds.\n\n## Syntax\n\n```js\ngetOrSet(key, set)\ngetOrSet(key, set, length)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to lookup and/or store the supplied entry under within the cache.\n- `set` _:  Function_\n  - The function to execute if and only if the cache does not have a usable entry for the supplied `key`.\n    The function should return a Promise which resolves with the following interface:\n    - `value` _:  ArrayBuffer | TypedArray | DataView | ReadableStream | URLSearchParams | String | string literal_\n      - The value to store within the cache.\n    - `ttl` _: number_\n      - The maximum number of seconds to store the supplied entry in the cache.\n    - `length` _: number_ __optional__\n      - The length of the value being stored within the cache. This is only used when the `value` is a `ReadableStream`.\n\n### Return value\n\nReturns a `SimpleCacheEntry`.\n\n### Exceptions\n\n- If the provided `key`:\n  - Cannot be coerced to a string\n  - Is an empty string\n  - Is longer than 8135 characters\n- If the provided `ttl`:\n  - Cannot be coerced to a number\n  - Is a negative number\n  - Is `NaN`\n  - Is Inifinity\n\n## Examples\n\nIn this example we attempt to retrieve an entry from the Fastly Cache. If the entry does not exist, we create the content and insert it into the Fastly Cache before finally returning.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const path = new URL(event.request.url).pathname;\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/cache/SimpleCache/purge.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# SimpleCache.purge\n\npurge the entry associated with the key `key` from the cache.\n\n## Syntax\n\n```js\npurge(key, options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to purge from within the cache.\n\n- `options` _: object_\n  - `scope` _: string_\n    - : Where to purge the content from.\n    - Possible values are:\n      - \"global\" - This will remove the content from all of Fastly.\n      - \"pop\" - This will remove the content from the POP that contains the currently executing instance.\n\n### Return value\n\nReturns `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n## Examples\n\nIn this example, when a request contains a `purge` querystring parameter, we purge the an entry from the cache.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const url = new URL(event.request.url);\n  const path = url.pathname;\n  if (url.searchParams.has('purge')) {\n    SimpleCache.purge(path, { scope: \"global\" });\n    return new Response(page, { status: 204 });\n  }\n\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/cache/SimpleCacheEntry/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the `SimpleCacheEntry` interface\ntakes the instance's stream and reads it to completion. It returns a promise\nthat resolves with an `ArrayBuffer`.\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an `ArrayBuffer`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/cache/SimpleCacheEntry/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.body\n\nThe **`body`** read-only property of the `SimpleCacheEntry` interface is a `ReadableStream` of the instance's contents.\n\n## Value\n\nA `ReadableStream`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/cache/SimpleCacheEntry/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.bodyUsed\n\nThe **`bodyUsed`** read-only property of the `SimpleCacheEntry` interface is a boolean value that indicates whether the body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/cache/SimpleCacheEntry/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.json()\n\nThe **`json()`** method of the `SimpleCacheEntry` interface takes\na `SimpleCacheEntry` stream and reads it to completion. It returns a promise which\nresolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a JavaScript object. This object could be\nanything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/cache/SimpleCacheEntry/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.text()\n\nThe **`text()`** method of the `SimpleCacheEntry` interface takes the instance's stream and reads it to completion.\nIt returns a promise that resolves with a `String`.\nThe result is _always_ decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Promise that resolves with a `String`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/cache/TransactionCacheEntry/age.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.age\n\nThe **`age`** method of the `TransactionCacheEntry` interface returns the current age in milliseconds of the cached item.\n\n## Syntax\n\n```js\nage()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the current age in milliseconds of the cached item."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/cache/TransactionCacheEntry/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.body\n\nThe **`body`** method of the `TransactionCacheEntry` interface retrieves the cached item contents as a `ReadableStream`.\n\nOnly one stream can be active at a time for a given `TransactionCacheEntry`. An error will be thrown if a stream is already active for this `TransactionCacheEntry`.\n\n## Syntax\n\n```js\nbody(options)\n```\n\n### Parameters\n\n- `options` _: object_ __optional__\n  - `start` _: number_\n    - The offset from which to start the range.\n  - `end` _: number_\n    - How long the range should be.\n\n### Return value\n\nA `ReadableStream` which contains the cached item contents."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/cache/TransactionCacheEntry/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.cancel\n\nThe **`cancel`** method of the `TransactionCacheEntry` interface cancels an obligation to provide an object to the cache.\n\n\n## Syntax\n\n```js\ncancel()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/cache/TransactionCacheEntry/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.close\n\nThe **`close`** method of the `TransactionCacheEntry` interface closes the connection to the cache for this `TransactionCacheEntry`.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/cache/TransactionCacheEntry/hits.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.hits\n\nThe **`hits`** method of the `TransactionCacheEntry` interface returns the amount of cache hits for the cached item.\n\nNote: this hit count only reflects the view of the server that supplied the cached item. Due to clustering, this count may vary between potentially many servers within the data center where the item is cached. See the [clustering documentation](https://developer.fastly.com/learning/vcl/clustering/) for details, though note that the exact caching architecture of Compute is different from VCL services.\n\n## Syntax\n\n```js\nhits()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the number of cache hits to this cached item.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/cache/TransactionCacheEntry/insert.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.insert\n\nPerform a transactional cache insertion, returning a `FastlyBody` instance for providing the cached object itself.\n\nThis method should only be called when `TransactionCacheEntry.state().mustInsertOrUpdate()` is true; otherwise, an error will be thrown when attempting to perform the insertion.\n\n## Syntax\n\n```js\ninsert(options)\n```\n\n### Parameters\n\n- `options` _: object_\n  - `maxAge` _: number_ __optional__\n    - Sets the “time to live” for the cache item in milliseconds: The time for which the item will be considered fresh.\n  - `vary` _: array_ __optional__\n    - Sets the list of headers that must match when looking up this cached item.\n  - `initialAge` _: number_ __optional__\n    - Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n    - The initial age is 0 by default.\n  - `staleWhileRevalidate` _: number_ __optional__\n    - Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n    - Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n    - The methods `CacheState.protoype.usable` and `CacheState.protoype.stale` can be used to determine the current state of an item.\n    - The stale-while-revalidate period is 0 by default.\n  - `surrogateKeys` _: array_ __optional__\n    - Sets the surrogate keys that can be used for purging this cached item.\n    - Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item’s TTL to elapse, or overwriting the item with insert().\n    - Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n    - [See the Fastly surrogate keys guide for details.](https://docs.fastly.com/en/guides/working-with-surrogate-keys)\n  - `length` _: number_ __optional__\n    - Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n    - It is preferable to provide a length, if possible.\n    - Clients that begin streaming the item's contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n  - `userMetadata` _: ArrayBufferView | ArrayBuffer | URLSearchParams | string_ __optional__\n    - Sets the user-defined metadata to associate with the cached item.\n  - `sensitive` _: boolean_ __optional__\n    - Enable or disable PCI/HIPAA-compliant non-volatile caching.\n    - By default, this is false.\n    - [See the Fastly PCI-Compliant Caching and Delivery documentation for details.](https://docs.fastly.com/products/pci-compliant-caching-and-delivery)\n\n### Return value\n\nReturns a `FastlyBody`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/cache/TransactionCacheEntry/insertAndStreamBack.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.insertAndStreamBack\n\nPerform a transaction cache insertion, returning a `FastlyBody` instance for providing the cached object itself, and a `CacheEntry` instance which can be used to stream out the newly-inserted cache item.\n\nFor the insertion to complete successfully, the object must be written into the returned `FastlyBody` instance, and then `FastlyBody.protoype.close` must be called.\nIf `FastlyBody.prototype.close` does not get called, the insertion is considered incomplete, and any concurrent lookups that may be reading from the object as it is streamed into the cache may encounter a streaming error.\n\n## Syntax\n\n```js\ninsertAndStreamBack(options)\n```\n\n### Parameters\n\n- `options` _: object_\n  - `maxAge` _: number_ __optional__\n    - Sets the “time to live” for the cache item in milliseconds: The time for which the item will be considered fresh.\n  - `vary` _: array_ __optional__\n    - Sets the list of headers that must match when looking up this cached item.\n  - `initialAge` _: number_ __optional__\n    - Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n    - The initial age is 0 by default.\n  - `staleWhileRevalidate` _: number_ __optional__\n    - Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n    - Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n    - The methods `CacheState.protoype.usable` and `CacheState.protoype.stale` can be used to determine the current state of an item.\n    - The stale-while-revalidate period is 0 by default.\n  - `surrogateKeys` _: array_ __optional__\n    - Sets the surrogate keys that can be used for purging this cached item.\n    - Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item’s TTL to elapse, or overwriting the item with insert().\n    - Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n    - [See the Fastly surrogate keys guide for details.](https://docs.fastly.com/en/guides/working-with-surrogate-keys)\n  - `length` _: number_ __optional__\n    - Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n    - It is preferable to provide a length, if possible.\n    - Clients that begin streaming the item's contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n  - `userMetadata` _: ArrayBufferView | ArrayBuffer | URLSearchParams | string_ __optional__\n    - Sets the user-defined metadata to associate with the cached item.\n  - `sensitive` _: boolean_ __optional__\n    - Enable or disable PCI/HIPAA-compliant non-volatile caching.\n    - By default, this is false.\n    - [See the Fastly PCI-Compliant Caching and Delivery documentation for details.](https://docs.fastly.com/products/pci-compliant-caching-and-delivery)\n\n### Return value\n\nReturns an array where the first item is a `FastlyBody` instance and the second item is a `CacheEntry` instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/cache/TransactionCacheEntry/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.length\n\nThe **`length`** method of the `TransactionCacheEntry` interface returns the size in bytes of the cached item, if known, otherwise returns `null` if the length is currently unknown.\n\nThe length of the cached item may be unknown if the item is currently being streamed into the cache without a fixed length.\n\n## Syntax\n\n```js\nlength()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` or `null` which represents the current length of the cached item.\n\n`null` is returned if the length is currently unknown."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/cache/TransactionCacheEntry/maxAge.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.maxAge\n\nThe **`maxAge`** method of the `TransactionCacheEntry` interface returns the time in milliseconds for which the cached item is considered fresh.\n\n## Syntax\n\n```js\nmaxAge()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the time in milliseconds for which the cached item is considered fresh."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/cache/TransactionCacheEntry/staleWhileRevalidate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.staleWhileRevalidate\n\nThe **`staleWhileRevalidate`** method of the `TransactionCacheEntry` interface returns the time in milliseconds for which a cached item can safely be used despite being considered stale.\n\n## Syntax\n\n```js\nstaleWhileRevalidate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the time in milliseconds for which a cached item can safely be used despite being considered stale."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/cache/TransactionCacheEntry/state.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.state\n\nThe **`state`** method of the `TransactionCacheEntry` interface returns a `CacheState` instance which reflects the current state of this `TransactionCacheEntry` instance.\n\n## Syntax\n\n```js\nstate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `CacheState` instance which reflects the current state of this `TransactionCacheEntry` instance."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/cache/TransactionCacheEntry/update.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.update\n\nPerform an update of the cache item's metadata.\n\n## Syntax\n\n```js\nupdate(options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - A cache key which is a string with a length of up to 8,135 that identify a cached item.\n  - The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n- `options` _: object_\n  - `maxAge` _: number_ __optional__\n    - Sets the “time to live” for the cache item in milliseconds: The time for which the item will be considered fresh.\n  - `vary` _: array_ __optional__\n    - Sets the list of headers that must match when looking up this cached item.\n  - `initialAge` _: number_ __optional__\n    - Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n    - The initial age is 0 by default.\n  - `staleWhileRevalidate` _: number_ __optional__\n    - Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n    - Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n    - The methods `CacheState.protoype.usable` and `CacheState.protoype.stale` can be used to determine the current state of an item.\n    - The stale-while-revalidate period is 0 by default.\n  - `surrogateKeys` _: array_ __optional__\n    - Sets the surrogate keys that can be used for purging this cached item.\n    - Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item’s TTL to elapse, or overwriting the item with insert().\n    - Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n    - [See the Fastly surrogate keys guide for details.](https://docs.fastly.com/en/guides/working-with-surrogate-keys)\n  - `length` _: number_ __optional__\n    - Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n    - It is preferable to provide a length, if possible.\n    - Clients that begin streaming the item's contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n  - `userMetadata` _: ArrayBufferView | ArrayBuffer | URLSearchParams | string_ __optional__\n    - Sets the user-defined metadata to associate with the cached item.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/cache/TransactionCacheEntry/userMetadata.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.userMetadata\n\nThe **`userMetadata`** method of the `TransactionCacheEntry` interface returns the user-controlled metadata associated with the cached item.\n\n## Syntax\n\n```js\nuserMetadata()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nAn `ArrayBuffer` which contains the user-controlled metadata associated with the cached item."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/cache-override/CacheOverride/CacheOverride.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `CacheOverride()`\n\nThe **`CacheOverride` constructor** lets you configure the caching behavior of a `Response`.\n\nNormally, the HTTP Headers on a [`Response`](../../globals/Response/Response.mdx) would control how the [`Response`](../../globals/Response/Response.mdx) is cached,\nbut `CacheOverride` can be set on a [`Request`](../../globals/Request/Request.mdx), to define custom caching behavior.\n\n## Syntax\n\n```js\nnew CacheOverride(mode)\nnew CacheOverride(mode, init)\nnew CacheOverride(init)\n```\n\n> **Note:** `CacheOverride()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `mode` _: string_\n  - Sets the cache override mode for a request\n  - If set to:\n    - `\"none\"`: Do not override the behavior specified in the origin response’s cache control headers.\n    - `\"pass\"`: Do not cache the response to this request, regardless of the origin response’s headers.\n    - `\"override\"`: Override particular cache control settings using the `CacheOverride` object's settings.\n       This options is also the default when providing an init object directly as the first argument.\n\n- `init`\n\n  - : An Object which contains all the configuration options to apply to the newly created `CacheOverride`.\n\n    - `pci` _: boolean_ _**optional**_\n      - Override the caching behavior of this request to enable or disable PCI/HIPAA-compliant non-volatile caching.\n      - By default, this is `false`, which means the request may not be PCI/HIPAA-compliant. Set it to `true` to enable compliant caching.\n      - See the [Fastly PCI-Compliant Caching and Delivery documentation](https://docs.fastly.com/products/pci-compliant-caching-and-delivery) for details.\n\n    - `surrogateKey` _: string_ _**optional**_\n      - Override the caching behavior of this request to include the given surrogate key, provided as a header value.\n      - See the [Fastly surrogate keys guide](https://docs.fastly.com/en/guides/purging-api-cache-with-surrogate-keys) for details.\n    - `swr` _: number_ _**optional**_\n      - Override the caching behavior of this request to use the given `stale-while-revalidate` time, in seconds\n\n    - `ttl` _: number_ _**optional**_\n      - Override the caching behavior of this request to use the given Time to Live (TTL), in seconds.\n    \n    - `beforeSend` _:Function_ _**optional**_\n      - `(request: Request) => void | PromiseLike<void>`\n      - Callback to be invoked if a request is going all the way to a backend, allowing the request to be modified beforehand.\n      - See [Modifying a request as it is forwarded to a backend](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/#modifying-a-request-as-it-is-forwarded-to-a-backend) in the Fastly cache interfaces documentation for details.\n\n    - `afterSend` _: Function_ _**optional**_\n      - `(response: Response) => void | CacheOptions | PromiseLike<void | CacheOptions>`\n      - Callback to be invoked after a response has been sent, but before it is stored into the cache.\n      - Where `CacheOptions` contains:\n        - `cache` _: boolean | 'uncacheable'_ _**optional**_\n          - Whether to cache this response. By default, leaving this field empty, responses will be cached based on their cache header information.\n          - Setting this to true or false will override this default cache behaviour, setting in the cache or not setting in the cache, even if the default behaviour would have been otherwise.\n          - Setting to 'uncacheable' the response will not only not be cached, but the cache will record that the originating request led to an uncacheable response, so that future cache lookups will result in immediately going to the backend, rather than attempting to coordinate concurrent requests to reduce backend traffic.\n          - See the [Fastly request collapsing guide](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/request-collapsing/) for more details on the mechanism that `uncacheable` disables.\n        - `bodyTransformFn` _: Function_ _**optional**_\n          - `(body: Uint8Array) => Uint8Array | PromiseLike<Uint8Array>`\n          - Provide a function to be used for transforming the response body prior to caching.\n          - Body transformations are performed by specifying a transform, rather than by directly working with the body during the onAfterSend callback function, because not every response contains a fresh body: 304 Not Modified responses, which are used to revalidate a stale cached response, are valuable precisely because they do not retransmit the body.\n          - For any other response status, the backend response will contain a relevant body, and the `bodyTransformFn` will be applied to it. The original backend body is passed in to the transform function, and the function is expected to return the new body.\n      - See [Controlling cache behavior based on backend response](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/#controlling-cache-behavior-based-on-backend-response) in the Fastly cache interfaces documentation for details.\n\n### Return value\n\nA new `CacheOverride` object.\n\n## Examples\n\nIn this example we override the cache for all the requests prefixed /static/ to have a long TTL (Time To Live),  and the home page to have a short TTL and a long SWR (Stale While Revalidate).\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"CacheOverride Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { CacheOverride } from \"fastly:cache-override\";\n// In this example we override the cache for all the requests prefixed /static/ \n// to have a long TTL (Time To Live), and the home page to have a short TTL and \n// a long SWR (Stale While Revalidate).\nasync function app (event) {\n  const path = (new URL(event.request.url)).pathname;\n  let cacheOverride;\n  if (path == '/') {\n    cacheOverride = new CacheOverride('override', {ttl: 10, swr: 86_400});\n  } else if (path.startsWith('/static/')) {\n    cacheOverride = new CacheOverride('override', {ttl: 86_400});\n  } else {\n    cacheOverride = new CacheOverride('none')\n  }\n  return fetch(event.request.url, {\n    cacheOverride,\n    backend: 'origin_0'\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { CacheOverride } from \"fastly:cache-override\";\n// In this example we override the cache for all the requests prefixed /static/ \n// to have a long TTL (Time To Live), and the home page to have a short TTL and \n// a long SWR (Stale While Revalidate).\nasync function app (event) {\n  const path = (new URL(event.request.url)).pathname;\n  let cacheOverride;\n  if (path == '/') {\n    cacheOverride = new CacheOverride('override', {ttl: 10, swr: 86_400});\n  } else if (path.startsWith('/static/')) {\n    cacheOverride = new CacheOverride('override', {ttl: 86_400});\n  } else {\n    cacheOverride = new CacheOverride('none')\n  }\n  return fetch(event.request.url, {\n    cacheOverride,\n    backend: 'origin_0'\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/compute/purgeSurrogateKey.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# purgeSurrogateKey\n\nThe **`purgeSurrogateKey()`** function is used to purge the given surrogate key string from Fastly's cache.\n\nThere are two purge modes: soft purge and hard purge, with hard purge as the default which clears all items\nfrom the cache immediately. When using a soft purge, stale entries are maintained in the cache, reducing\norgin load, while also enabling stale revalidations.\n\nSee the [Fastly Purge Documentation](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/purging/#surrogate-key-purge) for more information on caching and purge operations.\n\n## Syntax\n\n```js\npurgeSurrogateKey(surrogateKey, soft?)\n```\n\n### Parameters\n\n- `surrogateKey` _: string_\n  - The surrogate key string\n- `soft?` _: boolean_\n  - Enables a soft purge, retaining stale entries in the cache. Default is a hard purge.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/compute/vCpuTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# vCpuTime\n\nThe **`vCpuTime()`** function provides the vCPU time used by the current request handler in milliseconds.\n\n## Syntax\n\n```js\nvCpuTime()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`number`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/config-store/ConfigStore/ConfigStore.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `ConfigStore()`\n\nThe **`ConfigStore` constructor** lets you access a specific [Fastly Config Store](https://www.fastly.com/documentation/reference/api/services/resources/config-store/).\n\n> **Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew ConfigStore(name);\n```\n\n> **Note:** `ConfigStore()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Defines a config store instance using the resource link name.\n\n### Return value\n\nA new `ConfigStore` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Config Store exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name does not start with an ascii alphabetical character \n  - Thrown if the provided name does not contain only ascii alphanumeric, underscore, and whitespace characters\n\n## Examples\n\nIn this example we have a resource link named \"animals\" (which is linked to a config store) and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"ConfigStore Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/config-store/ConfigStore/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# ConfigStore.prototype.get\n\nThe **`get()`** method returns the value associated with the provided key in the config-store. If the provided key does not exist in the ConfigStore then this returns `null`.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from the dictionary.\n\n### Return value\n\nA `string` representing the specified ConfigStore value or `null` if the key does not exist in the ConfigStore\n\n## Description\n\nGet a value for a key in the config-store. If the provided key does not exist in the ConfigStore then this returns `null`.\n\nThe `get()` method requires its `this` value to be a [`ConfigStore`](../../../fastly%3Aconfig-store/ConfigStore/ConfigStore.mdx) object.\n\nIf the `this` value does not inherit from `ConfigStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided key is longer than 255 in length\n  - Thrown if the provided key is an empty string\n\n## Examples\n\nIn this example we have an Edge Dictionary named \"animals\" and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"ConfigStore Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/device/Device/lookup.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Device.lookup()\n\nLook up the data associated with a particular User-Agent string.\n\n\n## Syntax\n\n```js\nlookup(userAgent)\n```\n\n### Return value\n\nIf there is data associated with the User-Agent, a `Device` instance is returned.\nOtherwise, `null` is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/device/Device/prototype/brand.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.brand\n\nThe read-only **`brand`** property of the `Device` interface is\neither a string stating the brand of the device, which can be different from the manufacturer of that device.\nIf no brand is known, the value will be `null`.\n\n\n## Value\n\nEither a string value if a brand is known, otherwise `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/device/Device/prototype/hardwareType.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.hardwareType\n\nThe read-only **`hardwareType`** property of the `Device` interface is\neither a string stating the hardware type of the device, or `null` if the hardware type is not known.\n\nA string representation of the device's primary platform hardware. The most commonly used device types are also identified via boolean variables. Because a device may have multiple device types and this variable only has the primary type, we recommend using the boolean variables for logic and using this string representation for logging.\n\n\n\n## Value\n\nEither a string value if a hardware type is known, otherwise `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/device/Device/prototype/isBot.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isBot\n\nThe read-only **`isBot`** property of the `Device` interface is\neither a boolean stating if the device is a bot, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a bot, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/device/Device/prototype/isDesktop.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isDesktop\n\nThe read-only **`isDesktop`** property of the `Device` interface is\neither a boolean stating if the device is a desktop web browser, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a desktop web browser, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/device/Device/prototype/isGameConsole.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isGameConsole\n\nThe read-only **`isGameConsole`** property of the `Device` interface is\neither a boolean stating if the device is a video game console, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a video game console, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/device/Device/prototype/isMediaPlayer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isMediaPlayer\n\nThe read-only **`isMediaPlayer`** property of the `Device` interface is\neither a boolean stating if the device is a media player (like Blu-ray players, iPod devices, and smart speakers such as Amazon Echo), or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a media player (like Blu-ray players, iPod devices, and smart speakers such as Amazon Echo), or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/device/Device/prototype/isMobile.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isMobile\n\nThe read-only **`isMobile`** property of the `Device` interface is\neither a boolean stating if the device is a mobile phone, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a mobile phone, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/device/Device/prototype/isSmartTV.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isSmartTV\n\nThe read-only **`isSmartTV`** property of the `Device` interface is\neither a boolean stating if the device is a smart TV, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a smart TV, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/device/Device/prototype/isTablet.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isTablet\n\nThe read-only **`isTablet`** property of the `Device` interface is\neither a boolean stating if the device is a tablet (like an iPad), or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a tablet (like an iPad), or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/device/Device/prototype/isTouchscreen.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isTouchscreen\n\nThe read-only **`isTouchscreen`** property of the `Device` interface is\neither a boolean stating if the device's screen is touch sensitive, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device's screen is touch sensitive, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/device/Device/prototype/model.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.model\n\nThe read-only **`model`** property of the `Device` interface is\neither a string stating the model of the device, or `null` if the model is not known.\n\n\n## Value\n\nEither a string value if a model is known, otherwise `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/device/Device/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.name\n\nThe read-only **`name`** property of the `Device` interface is\neither a string stating the name of the device, or `null` if the name is not known.\n\n\n## Value\n\nEither a string value if a name is known, otherwise `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/device/Device/prototype/toJSON.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# toJSON\n\nThe `toJSON()` method of the Device interface is a serializer;\nit returns a JSON representation of the Device object.\n\nTo get a JSON string, you can use `JSON.stringify(device)` directly; it will call `toJSON()` automatically.\n\n## Syntax\n\n```js\ntoJSON()\n```\n\n### Return value\n\nA JSON object that is the serialization of the Device object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/dictionary/Dictionary/Dictionary.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Dictionary()`\n\n:::info\n\nThis Class is deprecated\n\n:::\n\nThe **`Dictionary` constructor** lets you access a specific [Fastly Edge Dictionary](https://docs.fastly.com/en/guides/about-edge-dictionaries).\n\n**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew Dictionary(name);\n```\n\n> **Note:** `Dictionary()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - The name of the [Fastly Edge Dictionary](https://docs.fastly.com/en/guides/about-edge-dictionaries) that this `Dictionary` instance should provide access to.\n\n### Return value\n\nA new `Dictionary` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Dictionary exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name does not start with an ascii alphabetical character \n  - Thrown if the provided name does not contain only ascii alphanumeric, underscore, and whitespace characters\n\n## Examples\n\nIn this example we have an Edge Dictionary named \"animals\" and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Dictionary Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/dictionary/Dictionary/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Dictionary.prototype.get\n\n:::info\n\nThis Class is deprecated, it has been renamed to [`ConfigStore`](../../../fastly:config-store/ConfigStore/ConfigStore.mdx) and can be imported via `import { ConfigStore } from 'fastly:config-store'`\n\nThe `get()` method exists on the [`ConfigStore`](../../../fastly:config-store/ConfigStore/ConfigStore.mdx) Class.\n\n:::\n\nThe **`get()`** method returns the value associated with the provided key in the dictionary. If the provided key does not exist in the Dictionary then this returns `null`.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from the dictionary.\n\n### Return value\n\nA `string` representing the specified Dictionary value or `null` if the key does not exist in the Dictionary\n\n## Description\n\nGet a value for a key in the dictionary. If the provided key does not exist in the Dictionary then this returns `null`.\n\nThe `get()` method requires its `this` value to be a [`Dictionary`](../Dictionary.mdx) object.\n\nIf the `this` value does not inherit from `Dictionary.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided key is longer than 255 in length\n  - Thrown if the provided key is an empty string\n\n## Examples\n\nIn this example we have an Edge Dictionary named \"animals\" and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Dictionary Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/edge-rate-limiter/EdgeRateLimiter/EdgeRateLimiter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `EdgeRateLimiter()`\n\nThe **`EdgeRateLimiter` constructor** lets you open an epen a [ERL](https://docs.fastly.com/products/edge-rate-limiting) with the given ratecounter and penaltybox.\n\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew EdgeRateLimiter(rateCounter, penaltyBox)\n```\n\n> **Note:** `EdgeRateLimiter()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `rateCounter` _: RateCounter_\n  - The RateCounter instance to associate with this EdgeRateLimiter instance\n- `penaltyBox` _: PenaltyBox_\n  - The PenaltyBox instance which should be associated with this EdgeRateLimiter instance\n\n### Return value\n\nA new `EdgeRateLimiter` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided rateCounter value is not an instance of RateCounter\n  - Thrown if the provided penaltyBox value is not an instance of PenaltyBox\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/edge-rate-limiter/EdgeRateLimiter/prototype/checkRate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# EdgeRateLimiter.prototype.checkRate\n\nIncrement an entry in the rate counter and check if the entry has exceeded some average number of requests per second (RPS) over the given window.\nIf the entry is over the RPS limit for the window, add to the penaltybox for the given `timeToLive`.\n\nValid `timeToLive` is 1 minute to 60 minutes and `timeToLive` value is truncated to the nearest minute.\n\n## Syntax\n```js\ncheckRate(entry, delta, window, limit, timeToLive)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to increment and check\n- `delta` _: number_\n  - The amount to increment the `entry` by\n- `window` _: number_\n  - The time period to check across, has to be either 1 second, 10 seconds, or 60 seconds\n- `limit` _: number_\n  - The requests-per-second limit\n- `timeToLive` _: number_\n  - In minutes, how long the entry should be added into the penalty-box\n  - Valid `timeToLive` is 1 minute to 60 minutes and `timeToLive` value is truncated to the nearest minute.\n\n\n### Return value\n\nReturns `true` if the entry has exceeded the average RPS for the window, otherwise returns `false`.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `name` value can not be coerced into a string\n  - Thrown if the provided `delta` value is not a positive finite number.\n  - Thrown if the provided `window` value is not either, 1, 10, or 60.\n  - Thrown if the provided `limit` value is not a positive finite number.\n  - Thrown if the provided `timeToLive` value is not either, a number between 1 and 60 inclusively.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/edge-rate-limiter/PenaltyBox/PenaltyBox.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `PenaltyBox()`\n\nThe **`PenaltyBox` constructor** can be used with a [Edge Rate Limiter](../EdgeRateLimiter/EdgeRateLimiter.mdx) or standalone for adding and checking if some entry is in the dataset.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew PenaltyBox(name)\n```\n\n> **Note:** `PenaltyBox()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Open a PenaltyBox with the given name\n\n\n### Return value\n\nA new `PenaltyBox` object instance.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `name` value can not be coerced into a string\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/edge-rate-limiter/PenaltyBox/prototype/add.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# PenaltyBox.prototype.add\n\nAdd an `entry` into the PenaltyBox for the duration of the given `timeToLive`.\n\n## Syntax\n```js\nadd(entry, timeToLive)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n- `timeToLive` _: number_\n  - In minutes, how long the entry should be added into the PenaltyBox\n  - Valid `timeToLive` is 1 minute to 60 minutes and `timeToLive` value is truncated to the nearest minute.\n\n\n### Return value\n\nReturns `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n  - Thrown if the provided `timeToLive` value is not either, a number between 1 and 60 inclusively.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/edge-rate-limiter/PenaltyBox/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# PenaltyBox.prototype.has\n\nCheck if the given entry is contained in in the PenaltyBox instance.\n\n## Syntax\n```js\nhas(entry)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n\n\n### Return value\n\nReturns `true` if the entry is contained in the PenaltyBox instance, otherwise returns `false`.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/edge-rate-limiter/RateCounter/RateCounter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `RateCounter()`\n\nThe **`RateCounter` constructor** can be used with a [Edge Rate Limiter](../EdgeRateLimiter/EdgeRateLimiter.mdx) or standalone for counting and rate calculations.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew RateCounter(name)\n```\n\n> **Note:** `RateCounter()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Open a RateCounter with the given name\n\n\n### Return value\n\nA new `RateCounter` object instance.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `name` value can not be coerced into a string\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/edge-rate-limiter/RateCounter/prototype/increment.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RateCounter.prototype.increment\n\nIncrement the given `entry` in the RateCounter instance with the given `delta` value.\n\n## Syntax\n```js\nincrement(entry, delta)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n- `delta` _: number_\n  - The amount to increment the entry by\n\n\n### Return value\n\nReturns `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n  - Thrown if the provided `delta` value is not a positive, finite number.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/edge-rate-limiter/RateCounter/prototype/lookupCount.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RateCounter.prototype.lookupCount\n\nLook up the current rate for the given `entry` and the given `duration`.\n\n## Syntax\n```js\nlookupCount(entry, duration)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n- `duration` _: number_\n  - The duration to lookup alongside the entry, has to be either, 10, 20, 30, 40, 50, or 60 seconds.\n\n\n### Return value\n\nReturns a number which is the count for the given `entry` and `duration` in this `RateCounter` instance.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n  - Thrown if the provided `duration` value is not either, 10, 20, 30, 40, 50 or 60.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/edge-rate-limiter/RateCounter/prototype/lookupRate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RateCounter.prototype.lookupRate\n\nLook up the current rate for the given `entry` and the given `window`.\n\n## Syntax\n```js\nlookupRate(entry, window)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n- `window` _: number_\n  - The window to look up alongside the entry, has to be either 1 second, 10 seconds, or 60 seconds\n\n\n### Return value\n\nReturns a number which is the rate for the given `entry` and `window` in this `RateCounter` instance.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n  - Thrown if the provided `window` value is not either, 1, 10, or 60.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/env/env.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# env\n\nThe **`env()`** function returns the value for the provided environment variable name.\n\nFor a list of available environment variables, see the [Fastly Developer Hub for Compute Environment Variables](https://developer.fastly.com/reference/compute/ecp-env/)\n\n>**Note**: The environment variables can only be retrieved when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nenv(name)\n```\n\n### Parameters\n\n- `name` _: string_\n  - The name of the environment variable to retrieve\n\n### Return value\n\nThe value for the requested environment variable, if no such environment variable exists then an empty string is returned.\n\n## Examples\n\nIn this example we log to stdout the environment variables [`FASTLY_HOSTNAME`](https://developer.fastly.com/reference/compute/ecp-env/fastly-hostname/) and [`FASTLY_TRACE_ID`](https://developer.fastly.com/reference/compute/ecp-env/fastly-trace-id/).\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"env Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { env } from \"fastly:env\";\nfunction app(event) {\n  console.log(\"FASTLY_HOSTNAME:\", env(\"FASTLY_HOSTNAME\"));\n  console.log(\"FASTLY_TRACE_ID:\", env(\"FASTLY_TRACE_ID\"));\n  return new Response(\"\", {\n    status: 200\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { env } from \"fastly:env\";\nfunction app(event) {\n  console.log(\"FASTLY_HOSTNAME:\", env(\"FASTLY_HOSTNAME\"));\n  console.log(\"FASTLY_TRACE_ID:\", env(\"FASTLY_TRACE_ID\"));\n  return new Response(\"\", {\n    status: 200\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/experimental/allowDynamicBackends.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# allowDynamicBackends\n\nThe **`allowDynamicBackends()`** function is used to control whether or not Dynamic Backends should be allowed within this Fastly Compute Service.\n\nBy default, Dynamic Backends are disabled within a JavaScript application as it can be a potential avenue for third-party JavaScript code to send requests, potentially including sensitive/secret data,  off to destinations that the JavaScript project was not intending, which could be a security issue.\n\n>**Note**: This feature is in disabled by default for Fastly Services. Please contact [Fastly Support](https://support.fastly.com/hc/requests/new?ticket_form_id=360000269711) to request the feature be enabled on the Fastly Services which require Dynamic Backends.\n\n## Syntax\n\n```js\nallowDynamicBackends(enabledOrConfig)\n```\n\n### Parameters\n\n- `enabledOrConfig` _: boolean_\n  - Whether or not to allow Dynamic Backends\n\nor\n\n- `enabledOrConfig` _: object_\n  - `connectTimeout` _: number_ _**optional**_\n    - Maximum duration in milliseconds to wait for a connection to this backend to be established.\n    - If exceeded, the connection is aborted and a 503 response will be presented instead.\n    - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n  - `firstByteTimeout` _: number_ _**optional**_\n    - Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent.\n    - If exceeded, the connection is aborted and a 503 response will be presented instead.\n    - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n  - `betweenBytesTimeout` _: number_ _**optional**_\n    - Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend.\n    - If exceeded, the response received so far will be considered complete and the fetch will end.\n    - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n\n### Return value\n\n`undefined`.\n\n## Examples\n\nIn this example an implicit Dynamic Backend is created when making the fetch request to https://www.fastly.com/ and the response is then returned to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Dynamic Backends Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nallowDynamicBackends(true);\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  return fetch('https://www.fastly.com/');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nallowDynamicBackends(true);\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  return fetch('https://www.fastly.com/');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/experimental/includeBytes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# includeBytes\n\nThe **`includeBytes()`** function is used embed a file as a Uint8Array.\n\n>**Note**: Can only be used during build-time initialization, not when processing requests.\n\n## Syntax\n\n```js\nincludeBytes(path)\n```\n\n### Parameters\n\n- `path` _: string_\n  - The path to include, relative to the Fastly Compute application's top-level directory during build-time initialization.\n\n### Return value\n\nReturns a `Uint8Array`\n\n## Examples\n\nIn this example we include the README.md file as a Uint8Array and use it for the body in the response we return to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { includeBytes } from \"fastly:experimental\";\nconst readme = includeBytes('README.md');\nasync function app() {\n    return new Response(readme);\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/experimental/mapAndLogError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# mapAndLogError\n\nThe **`mapAndLogError()`** function calls `mapError` on an `Error` object and sends the output to standard error. This includes the error name, message, and a call stack.\n\nIf `--enable-stack-traces` is specified during the build, the call stack will be mapped using source maps.\n\nIf `--enable-stack-traces` is specified and `--exclude-sources` is not specified during the build, then this will also include a code dump of neighboring lines of user code.\n\n## Syntax\n\n```js\nmapAndLogError(error)\n```\n\n### Parameters\n\n- `error` _: Error _ or _string_\n  - The error to retrieve information about. If a `string` is provided, then it is first converted to an `Error`.\n\n### Return value\n\n`undefined`.\n\n## Examples\n\nIn this example, build the application using the `--enable-stack-traces` flag.\n\n```js\naddEventListener('fetch', e => e.respondWith(handler(e)));\nasync function handler(event) {\n  try {\n    throw new TypeError('foo');\n  } catch (err) {\n    mapAndLogError(mapError(err));\n  }\n  return new Response('ok');\n}\n```\n\nThe following is output to the error log.\n\n```\nTypeError: foo\n  at handler (src/index.ts:4:11)\n      1 | addEventListener('fetch', e => e.respondWith(handler(e)));\n      2 | async function handler(event) {\n      3 |   try {\n>     4 |     throw new TypeError('foo');\n                    ^\n      5 |   } catch (err) {\n      6 |     mapAndLogError(mapError(err));\n      7 |   }\n  at src/index.ts:1:45\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/experimental/mapError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# mapError\n\nThe **`mapError()`** function extracts information from an `Error` object as a human-readable array of strings. This includes the error name, message, and a call stack.\n\nIf `--enable-stack-traces` is specified during the build, the call stack will be mapped using source maps.\n\nIf `--enable-stack-traces` is specified and `--exclude-sources` is not specified during the build, then this will also include a code dump of neighboring lines of user code.\n\n## Syntax\n\n```js\nmapError(error)\n```\n\n### Parameters\n\n- `error` _: Error _ or _string_\n  - The error to retrieve information about. If a `string` is provided, then it is first converted to an `Error`.\n\n### Return value\n\nReturns an array of `string`s.\n\n## Examples\n\nIn this example, build the application using the `--enable-stack-traces` flag.\n\n```js\naddEventListener('fetch', e => e.respondWith(handler(e)));\nasync function handler(event) {\n  try {\n    throw new TypeError('foo');\n  } catch (err) {\n    console.error(mapError(err));\n  }\n  return new Response('ok');\n}\n```\n\nThe following is output to the error log.\n\n```\nTypeError: foo\n  at handler (src/index.ts:4:11)\n      1 | addEventListener('fetch', e => e.respondWith(handler(e)));\n      2 | async function handler(event) {\n      3 |   try {\n>     4 |     throw new TypeError('foo');\n                    ^\n      5 |   } catch (err) {\n      6 |     console.error(mapError(err));\n      7 |   }\n  at src/index.ts:1:45\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/experimental/sdkVersion.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# sdkVersion\n\nThe read-only **`sdkVersion`** property is a string whose indicates what JavaScript SDK version is being used.\n\n## Value\n\nA string value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/experimental/setReusableSandboxOptions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# setReusableSandboxOptions\n\nThe **`setReusableSandboxOptions()`** function configures the reuse of the same underlying sandbox for multiple requests, which can improve performance by avoiding the overhead of initializing a new sandbox for each request.\n\n>**Note**: Can only be used during build-time initialization, not when processing requests.\n\n## Syntax\n\n```js\nsetReusableSandboxOptions(options)\n```\n\n### Parameters\n\n- `options` _: Object_\n  - The configuration options for the reusable sandbox.\n    - `maxRequests` _: number_ (default: `1`, `0` means unlimited)\n      - The maximum number of requests that can be handled by a single sandbox before it is recycled.\n    - `betweenRequestTimeoutMs` _: number_ (default: not specified)\n      - The amount of time in milliseconds to wait between requests before recycling the sandbox.\n    - `maxMemoryMiB` _: number_ (default: no limit)\n      - The maximum amount of memory in MiB that the sandbox can use before it is recycled.\n    - `sandboxTimeoutMs` _: number_ (default: no timeout)\n      - The maximum amount of time in milliseconds that a sandbox can be active before it is recycled.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/fanout/createFanoutHandoff.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# createFanoutHandoff\n\nThe **`createFanoutHandoff()`** function creates a Response instance which informs Fastly to pass the original Request through Fanout, to the declared backend.\n\n## Syntax\n\n```js\ncreateFanoutHandoff(request, backend)\n```\n\n### Parameters\n\n- `request` _: Request_\n  - The request to pass through Fanout.\n- `backend` _: string_\n  - The name of the backend that Fanout should send the request to.\n  - The name has to be between 1 and 254 characters inclusive.\n  - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n\n### Return value\n\nA Response instance is returned, which can then be used via `event.respondWith`.\n\n## Examples\n\nIn this example application requests to the path `/stream` and sent handled via Fanout.\n\n```js\nimport { createFanoutHandoff } from \"fastly:fanout\";\n\nasync function handleRequest(event) {\n  try {\n    const url = new URL(event.request.url);\n    if (url.pathname === '/stream') {\n      return createFanoutHandoff(event.request, 'fanout');\n    } else {\n      return new Response('oopsie, make a request to /stream for some fanout goodies', { status: 404 });\n    }\n  } catch (error) {\n    console.error({error});\n    return new Response(error.message, {status:500})\n  }\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/geolocation/getGeolocationForIpAddress.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# getGeolocationForIpAddress\n\nThe **`getGeolocationForIpAddress()`** function is used to retrieve geolocation information about the given IP address.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\ngetGeolocationForIpAddress(address)\n```\n\n### Parameters\n\n- `address` _: string_\n  - The IPv4 or IPv6 address to query.\n\n### Return value\n\nReturns an `Object`, or `null` if no geolocation data was found.\n\nThe object contains information about the given IP address with the following properties:\n\n- `as_name`  _: string | null_\n  - The name of the organization associated with `as_number`.\n  - For example, fastly is the value given for IP addresses under AS-54113.\n\n- `as_number` _: number | null_\n  - [Autonomous system](https://en.wikipedia.org/wiki/Autonomous_system_(Internet)) (AS) number.\n\n- `area_code` _: number | null_\n  - The telephone area code associated with an IP address.\n  - These are only available for IP addresses in the United States, its territories, and Canada.\n\n- `city` _: string | null_\n  - City or town name.\n\n- `conn_speed` _: string | null_\n  - Connection speed.\n\n- `conn_type` _: string | null_\n  - Connection type.\n\n- `continent` _: string | null_\n  - Continent.\n\n- `country_code` _: string | null_\n  - A two-character [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) country code for the country associated with an IP address.\n  - The US country code is returned for IP addresses associated with overseas United States military bases.\n  - These values include subdivisions that are assigned their own country codes in ISO 3166-1. For example, subdivisions NO-21 and NO-22 are presented with the country code SJ for Svalbard and the Jan Mayen Islands.\n\n- `country_code3` _: string | null_\n  - A three-character [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) country code for the country associated with the IP address.\n  - The USA country code is returned for IP addresses associated with overseas United States military bases.\n\n- `country_name` _: string | null_\n  - Country name.\n  - This field is the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) English short name for a country.\n\n- `gmt_offset` _: string | null_\n  - Time zone offset from Greenwich Mean Time (GMT) for `city`.\n\n- `latitude` _: number | null_\n  - Latitude, in units of degrees from the equator.\n  - Values range from -90.0 to +90.0 inclusive, and are based on the [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System) coordinate reference system.\n\n- `longitude` _: number | null_\n  - Longitude, in units of degrees from the [IERS Reference Meridian](https://en.wikipedia.org/wiki/IERS_Reference_Meridian).\n  - Values range from -180.0 to +180.0 inclusive, and are based on the [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System) coordinate reference system.\n\n- `metro_code` _: number | null_\n  - Metro code, representing designated market areas (DMAs) in the United States.\n\n- `postal_code` _: string | null_\n  - The postal code associated with the IP address.\n  - These are available for some IP addresses in Australia, Canada, France, Germany, Italy, Spain, Switzerland, the United Kingdom, and the United States.\n  - For Canadian postal codes, this is the first 3 characters. For the United Kingdom, this is the first 2-4 characters (outward code). For countries with alphanumeric postal codes, this field is a lowercase transliteration.\n\n- `proxy_description` _: string | null_\n  - Client proxy description.\n\n- `proxy_type` _: string | null_\n  - Client proxy type.\n\n- `region` _: string | null_\n  - [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) country subdivision code.\n  - For countries with multiple levels of subdivision (for example, nations within the United Kingdom), this variable gives the more specific subdivision.\n  - This field can be None for countries that do not have ISO country subdivision codes. For example, None is given for IP addresses assigned to the Åland Islands (country code AX, illustrated below).\n\n- `utc_offset` _: number | null;_\n  - Time zone offset from coordinated universal time (UTC) for `city`.\n\n## Examples\n\nIn this example we return the geolocation details for the provided ip querystring parameter or for the incoming client request if the querystring parameter does not exist.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"getGeolocationForIpAddress Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { getGeolocationForIpAddress } from \"fastly:geolocation\"\nasync function app(event) {\n  try {\n    let ip = new URL(event.request.url).searchParams.get('ip') || event.client.address\n    let geo = getGeolocationForIpAddress(ip);\n    return new Response(JSON.stringify(geo), {\n      headers: {\n        \"Content-Type\": \"application/json\",\n      },\n    });\n  } catch (error) {\n    console.error(error);\n    return new Response(\"Internal Server Error\", {\n      status: 500\n    });\n  }\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { getGeolocationForIpAddress } from \"fastly:geolocation\"\nasync function app(event) {\n  try {\n    let ip = new URL(event.request.url).searchParams.get('ip') || event.client.address\n    let geo = getGeolocationForIpAddress(ip);\n    return new Response(JSON.stringify(geo), {\n      headers: {\n        \"Content-Type\": \"application/json\",\n      },\n    });\n  } catch (error) {\n    console.error(error);\n    return new Response(\"Internal Server Error\", {\n      status: 500\n    });\n  }\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/AggregrateError/AggregrateError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# AggregateError()\n\nThe **`AggregateError()`** constructor creates an error for several errors that need to be wrapped in a single error.\n\n## Syntax\n\n```js\nnew AggregateError(errors)\nnew AggregateError(errors, message)\nnew AggregateError(errors, message, options)\n\nAggregateError(errors)\nAggregateError(errors, message)\nAggregateError(errors, message, options)\n```\n\n> **Note:** `AggregateError()` can be called with or without `new`. Both create a new `AggregateError` instance.\n\n### Parameters\n\n- `errors`\n  - : An iterable of errors, may not actually be [`TypeError`](../Error/Error.mdx) instances.\n- `message` _**optional**_\n  - : An optional human-readable description of the aggregate error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Array/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array\\[Symbol.species]\n\nThe **`Array[Symbol.species]`** accessor property returns the constructor used to construct return values from array methods.\n\n> **Warning:** The existence of `[Symbol.species]` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Syntax\n\n```js\nArray[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get [Symbol.species]` was called. The return value is used to construct return values from array methods that create new arrays.\n\n## Description\n\nThe `[Symbol.species]` accessor property returns the default constructor for `Array` objects. Subclass constructors may override it to change the constructor assignment. The default implementation is basically:\n\n```js\n// Hypothetical underlying implementation for illustration\nclass Array {\n  static get [Symbol.species]() {\n    return this;\n  }\n}\n```\n\nBecause of this polymorphic implementation, `[Symbol.species]` of derived subclasses would also return the constructor itself by default.\n\n```js\nclass SubArray extends Array {}\nSubArray[Symbol.species] === SubArray; // true\n```\n\nWhen calling array methods that do not mutate the existing array but return a new array instance (for example, `filter()` and `map()`), the array's `constructor[Symbol.species]` will be accessed. The returned constructor will be used to construct the return value of the array method. This makes it technically possible to make array methods return objects unrelated to arrays.\n\n```js\nclass NotAnArray {\n  constructor(length) {\n    this.length = length;\n  }\n}\n\nconst arr = [0, 1, 2];\narr.constructor = { [Symbol.species]: NotAnArray };\narr.map((i) => i); // NotAnArray { '0': 0, '1': 1, '2': 2, length: 3 }\narr.filter((i) => i); // NotAnArray { '0': 1, '1': 2, length: 0 }\narr.concat([1, 2]); // NotAnArray { '0': 0, '1': 1, '2': 2, '3': 1, '4': 2, length: 5 }\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Array/Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array()\n\nThe **`Array()`** constructor is used to create `Array` objects.\n\n## Syntax\n\n```js\nnew Array(element0, element1, /* … ,*/ elementN)\nnew Array(arrayLength)\n\nArray(element0, element1, /* … ,*/ elementN)\nArray(arrayLength)\n```\n\n> **Note:** `Array()` can be called with or without `new`. Both create a new `Array` instance.\n\n### Parameters\n\n- `elementN`\n  - : A JavaScript array is initialized with the given elements, except in the case where\n    a single argument is passed to the `Array` constructor and that argument is\n    a number (see the `arrayLength` parameter below). Note that this special case only\n    applies to JavaScript arrays created with the `Array` constructor, not\n    array literals created with the bracket syntax.\n- `arrayLength`\n  - : If the only argument passed to the `Array` constructor is an integer\n    between 0 and 2<sup>32</sup> - 1 (inclusive), this returns a new JavaScript array with\n    its `length` property set to that number (**Note:** this\n    implies an array of `arrayLength` empty slots, not slots with actual\n    `undefined` values).\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if there's only one argument (`arrayLength`) and its value is not between 0 and 2<sup>32</sup> - 1 (inclusive).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Array/from.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.from\n\nThe **`Array.from()`** static method creates a new, shallow-copied `Array` instance from an iterable or array-like object.\n\n## Syntax\n\n```js\nArray.from(arrayLike)\n\n// Arrow function\nArray.from(arrayLike, (element) => { /* … */ })\nArray.from(arrayLike, (element, index) => { /* … */ })\n\n// Mapping function\nArray.from(arrayLike, mapFn)\nArray.from(arrayLike, mapFn, thisArg)\n\n// Inline mapping function\nArray.from(arrayLike, function (element) { /* … */ })\nArray.from(arrayLike, function (element, index) { /* … */ })\nArray.from(arrayLike, function (element) { /* … */ }, thisArg)\nArray.from(arrayLike, function (element, index) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `arrayLike`\n  - : An iterable or array-like object to convert to an array.\n- `mapFn` _**optional**_\n\n  - : Map function to call on every element of the array. If provided, every value to be added to the array is first passed through this function, and `mapFn`'s return value is added to the array instead.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `mapFn`.\n\n### Return value\n\nA new `Array` instance.\n\n## Description\n\n`Array.from()` lets you create `Array`s from:\n\n- [iterable objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) (objects such as [`Map`](../Map/Map.mdx) and [`Set`](../Set/Set.mdx); or, if the object is not iterable,\n- array-like objects (objects with a `length` property and indexed elements).\n\n`Array.from()` never creates a sparse array. If the `arrayLike` object is missing some index properties, they become `undefined` in the new array.\n\n`Array.from()` has an optional parameter `mapFn`, which allows you to execute a function on each element of the array being created, similar to [`Array.prototype.map()`](./prototype/map.mdx). More clearly, `Array.from(obj, mapFn, thisArg)` has the same result as `Array.from(obj).map(mapFn, thisArg)`, except that it does not create an intermediate array, and `mapFn` only receives two arguments (`element`, `index`) without the whole array, because the array is still under construction.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Array/isArray.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.isArray()\n\nThe **`Array.isArray()`** static method determines whether the passed value is an `Array`.\n\n## Syntax\n\n```js\nArray.isArray(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be checked.\n\n### Return value\n\n`true` if `value` is an `Array`; otherwise, `false`. `false` is always returned if `value` is a `TypedArray` instance.\n\n## Description\n\n`Array.isArray()` checks if the passed value is an `Array`. It does not check the value's prototype chain, nor does it rely on the `Array` constructor it is attached to. It returns `true` for any value that was created using the array literal syntax or the `Array` constructor. This makes it safe to use with cross-realm objects, where the identity of the `Array` constructor is different and would therefore cause `instanceof Array` to fail.\n\nSee the article [\"Determining with absolute accuracy whether or not a JavaScript object is an array\"](https://web.mit.edu/jwalden/www/isArray.html) for more details.\n\n`Array.isArray()` also rejects objects with `Array.prototype` in its prototype chain but aren't actual arrays, which `instanceof Array` would accept.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Array/of.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.of()\nThe **`Array.of()`** method creates a new `Array`\ninstance from a variable number of arguments, regardless of number or type of the\narguments.\n\n## Syntax\n\n```js\nArray.of(element0)\nArray.of(element0, element1)\nArray.of(element0, element1, /* … ,*/ elementN)\n```\n\n### Parameters\n\n- `elementN`\n  - : Elements used to create the array.\n\n### Return value\n\nA new `Array` instance.\n\n## Description\n\nThe difference between `Array.of()` and the [`Array()`](./Array.mdx) constructor is in the handling of single arguments: `Array.of(7)` creates an array with a single element, `7`, whereas `Array(7)` creates an empty array with a `length` property of `7`. (That implies an array of 7 empty slots, not slots with actual [`undefined`](../undefined.mdx) values.)\n\n```js\nArray.of(7); // [7]\nArray(7); // array of 7 empty slots\n\nArray.of(1, 2, 3); // [1, 2, 3]\nArray(1, 2, 3); // [1, 2, 3]\n```\n\nThe `Array.of()` method is a generic factory method. For example, if a subclass of `Array` inherits the `of()` method, the inherited `of()` method will return new instances of the subclass instead of `Array` instances. In fact, the `this` value can be any constructor function that accepts a single argument representing the length of the new array, and the constructor will be called with the number of arguments passed to `of()`. The final `length` will be set again when all elements are assigned. If the `this` value is not a constructor function, the plain `Array` constructor is used instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Array/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype\\[Symbol.iterator]()\n\nThe **`Symbol.iterator`** method of an `Array` object implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows arrays to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the value of each index in the array.\n\nThe initial value of this property is the same function object as the initial value of the [`Array.prototype.values`](./values.mdx) property.\n\n## Syntax\n\n```js\narray[Symbol.iterator]()\n```\n\n### Return value\n\nThe same return value as [`Array.prototype.values()`](./values.mdx): a new iterable iterator object that yields the value of each index in the array.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Array/prototype/@@unscopables.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype[Symbol.unscopables]\n\nThe **`@@unscopables`** data property of `Array.prototype` is shared by all `Array` instances. It contains property names that were not included in the ECMAScript standard prior to the ES2015 version and that are ignored for [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) statement-binding purposes.\n\n## Value\n\nA [`null`-prototype object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects) with property names given below and their values set to `true`.\n\n## Description\n\nThe default `Array` properties that are ignored for `with` statement-binding purposes are:\n\n- [`at()`](./at.mdx)\n- [`copyWithin()`](./copyWithin.mdx)\n- [`entries()`](./entries.mdx)\n- [`fill()`](./fill.mdx)\n- [`find()`](./find.mdx)\n- [`findIndex()`](./findIndex.mdx)\n- [`flat()`](./flat.mdx)\n- [`flatMap()`](./flatMap.mdx)\n- [`includes()`](./includes.mdx)\n- [`keys()`](./keys.mdx)\n- [`values()`](./values.mdx)\n\n`Array.prototype[@@unscopables]` is an empty object only containing all the above property names with the value `true`. Its [prototype is `null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects), so `Object.prototype` properties like [`toString`](../../Object/prototype/toString.mdx) won't accidentally be made unscopable, and a `toString()` within the `with` statement will continue to be called on the array.\n\nSee [`Symbol.unscopables`](../../Symbol/unscopables.mdx) for how to set unscopable properties for your own objects.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Array/prototype/at.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.at\n\nThe **`at()`** method takes an integer value and returns the item at that index, allowing for positive and negative integers. Negative integers count back from the last item in the array.\n\n## Syntax\n\n```js\nat(index)\n```\n\n### Parameters\n\n- `index`\n  - : Zero-based index of the array element to be returned, converted to an integer. Negative index counts back from the end of the array — if `index < 0`, `index + array.length` is accessed.\n\n### Return value\n\nThe element in the array matching the given index. Always returns [`undefined`](../../../globals/undefined.mdx) if `index < -array.length` or `index >= array.length` without attempting to access the corresponding property.\n\n## Description\n\nThe `at()` method is equivalent to the bracket notation when `index` is non-negative. For example, `array[0]` and `array.at(0)` both return the first item. However, when counting elements from the end of the array, you cannot use `array[-1]` like you may in Python or R, because all values inside the square brackets are treated literally as string properties, so you will end up reading `array[\"-1\"]`, which is just a normal string property instead of an array index.\n\nThe usual practice is to access [`Array.prototype.length`](./length.mdx) and calculate the index from that — for example, `array[array.length - 1]`. The `at()` method allows relative indexing, so this can be shortened to `array.at(-1)`.\n\nThe `at()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Array/prototype/concat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.concat\n\nThe **`concat()`** method is used to merge two or more arrays.\nThis method does not change the existing arrays, but instead returns a new array.\n\n## Syntax\n\n```js\nconcat()\nconcat(value0)\nconcat(value0, value1)\nconcat(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `valueN` _**optional**_\n  - : Arrays and/or values to concatenate into a new array. If all\n    `valueN` parameters are omitted, `concat` returns a\n    [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of the existing array on which it is called. See the description below\n    for more details.\n\n### Return value\n\nA new `Array` instance.\n\n## Description\n\nThe `concat` method creates a new array. The array will first be populated by the elements in the object on which it is called. Then, for each argument, its value will be concatenated into the array — for normal objects or primitives, the argument itself will become an element of the final array; for arrays or array-like objects with the property [`Symbol.isConcatSpreadable`](../../Symbol/isConcatSpreadable.mdx) set to a truthy value, each element of the argument will be independently added to the final array. The `concat` method does not recurse into nested array arguments.\n\nThe `concat()` method is a copying. It does not alter `this` or any of the arrays provided as arguments but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains the same elements as the ones from the original arrays.\n\nThe `concat()` method preserves empty slots if any of the source arrays is sparse.\n\nThe `concat()` method is generic. The `this` value is treated in the same way as the other arguments (except it will be converted to an object first), which means plain objects will be directly prepended to the resulting array, while array-like objects with truthy `Symbol.isConcatSpreadable` will be spread into the resulting array.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Array/prototype/copyWithin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.copyWithin\n\nThe **`copyWithin()`** method shallow copies part of an array\nto another location in the same array and returns it without modifying its length.\n\n\n\n## Syntax\n\n```js\ncopyWithin(target)\ncopyWithin(target, start)\ncopyWithin(target, start, end)\n```\n\n### Parameters\n\n- `target`\n  - : Zero-based index at which to copy the sequence to, converted to an integer.\n    - Negative index counts back from the end of the array — if `target < 0`, `target + array.length` is used.\n    - If `target < -array.length`, `0` is used.\n    - If `target >= array.length`, nothing is copied.\n    - If `target` is positioned after `start` after normalization, copying only happens until the end of `array.length` (in other words, `copyWithin()` never extends the array).\n- `start` _**optional**_\n  - : Zero-based index at which to start copying elements from, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, nothing is copied.\n- `end` _**optional**_\n  - : Zero-based index at which to end copying elements from, converted to an integer. `copyWithin()` copies up to but not including `end`.\n    - Negative index counts back from the end of the array — if `end < 0`, `end + array.length` is used.\n    - If `end < -array.length`, `0` is used.\n    - If `end >= array.length` or `end` is omitted, `array.length` is used, causing all elements until the end to be copied.\n    - If `end` is positioned before or at `start` after normalization, nothing is copied.\n\n### Return value\n\nThe modified array.\n\n## Description\n\nThe `copyWithin()` method works like C and C++'s `memmove`, and is a high-performance method to shift the data of an `Array`. The sequence is copied and pasted as one operation; the pasted sequence will have the copied values even when the copy and paste region overlap.\n\nThe `copyWithin()` method is a mutating method. It does not alter the length of `this`, but it will change the content of `this` and create new properties or delete existing properties, if necessary.\n\nThe `copyWithin()` method preserves empty slots. If the region to be copied from is sparse, the empty slots' corresponding new indices are [deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) and also become empty slots.\n\nThe `copyWithin()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Array/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.entries\n\nThe **`entries()`** method returns a new **Array\nIterator** object that contains the key/value pairs for each index in the\narray.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nA new `Array` iterator object.\n\n## Description\n\nWhen used on sparse arrays, the `entries()` method iterates empty slots as if they have the value `undefined`.\n\nThe `entries()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Array/prototype/every.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.every\n\nThe **`every()`** method tests whether\nall elements in the array pass the test implemented by the provided function. It\nreturns a Boolean value.\n\n## Syntax\n\n```js\n// Arrow function\nevery((element) => { /* … */ })\nevery((element, index) => { /* … */ })\nevery((element, index, array) => { /* … */ })\n\n// Callback function\nevery(callbackFn)\nevery(callbackFn, thisArg)\n\n// Inline callback function\nevery(function (element) { /* … */ })\nevery(function (element, index) { /* … */ })\nevery(function (element, index, array) { /* … */ })\nevery(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value to indicate the element passes the test, and a falsy value otherwise.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `every()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\n`true` if `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value for every array element. Otherwise, `false`.\n\n## Description\n\nThe `every()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array, until the `callbackFn` returns a [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value. If such an element is found, `every()` immediately returns `false` and stops iterating through the array. Otherwise, if `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value for all elements, `every()` returns `true`.\n\n`every` acts like the \"for all\" quantifier in mathematics. In particular, for an empty array, it returns `true`. (It is [vacuously true](https://en.wikipedia.org/wiki/Vacuous_truth) that all elements of the [empty set](https://en.wikipedia.org/wiki/Empty_set#Properties) satisfy any given condition.)\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\n`every()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `every()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `every()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Array/prototype/fill.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.fill\n\nThe **`fill()`** method changes all elements in an array to a static value, from a start index (default `0`) to an end index (default `array.length`).\nIt returns the modified array.\n\n## Syntax\n\n```js\nfill(value)\nfill(value, start)\nfill(value, start, end)\n```\n\n### Parameters\n\n- `value`\n  - : Value to fill the array with. Note all elements in the array will be this exact value: if `value` is an object, each slot in the array will reference that object.\n- `start` _**optional**_\n  - : Zero-based index at which to start filling, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, no index is filled.\n- `end` _**optional**_\n  - : Zero-based index at which to end filling, converted to an integer. `fill()` fills up to but not including `end`.\n    - Negative index counts back from the end of the array — if `end < 0`, `end + array.length` is used.\n    - If `end < -array.length`, `0` is used.\n    - If `end >= array.length` or `end` is omitted, `array.length` is used, causing all indices until the end to be filled.\n    - If `end` is positioned before or at `start` after normalization, no index is filled.\n\n### Return value\n\nThe modified array, filled with `value`.\n\n## Description\n\nThe `fill()` method is a mutating method. It does not alter the length of `this`, but it will change the content of `this`.\n\nThe `fill()` method fills empty slots in sparse arrays with `value` as well.\n\nThe `fill()` method is generic. It only expects the `this` value to have a `length` property. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Array/prototype/filter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.filter\n\nThe **`filter()`** method creates a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of a portion of a given array, filtered down to just the elements from the given array that pass the test implemented by the provided function.\n\n## Syntax\n\n```js\n// Arrow function\nfilter((element) => { /* … */ })\nfilter((element, index) => { /* … */ })\nfilter((element, index, array) => { /* … */ })\n\n// Callback function\nfilter(callbackFn)\nfilter(callbackFn, thisArg)\n\n// Inline callback function\nfilter(function (element) { /* … */ })\nfilter(function (element, index) { /* … */ })\nfilter(function (element, index, array) { /* … */ })\nfilter(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) to keep the element in the resulting array, and a falsy value otherwise.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `filter()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\nA [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of a portion of the given array, filtered down to just the elements from the given array that pass the test implemented by the provided function. If no elements pass the test, an empty array will be returned.\n\n## Description\n\nThe `filter()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array, and constructs a new array of all the values for which `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. Array elements which do not pass the `callbackFn` test are not included in the new array.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nThe `filter()` method is a copying method. It does not alter `this` but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains the same elements as the ones from the original array (with some filtered out). However, the function provided as `callbackFn` can mutate the array. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `filter()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\nThe `filter()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Array/prototype/find.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.find()\n\nThe `find()` method returns the first element in the provided array that satisfies the provided testing function.\nIf no values satisfy the testing function, [`undefined`](../../../globals/undefined.mdx) is returned.\n\n- If you need the **index** of the found element in the array, use [`findIndex()`](./findIndex.mdx).\n- If you need to find the **index of a value**, use [`indexOf()`](./indexOf.mdx).\n  (It's similar to [`findIndex()`](./findIndex.mdx), but checks each element for equality with the value instead of using a testing function.)\n- If you need to find if a value **exists** in an array, use [`includes()`](./includes.mdx).\n  Again, it checks each element for equality with the value instead of using a testing function.\n- If you need to find if any element satisfies the provided testing function, use [`some()`](./some.mdx).\n\n## Syntax\n\n```js\n// Arrow function\nfind((element) => { /* … */ })\nfind((element, index) => { /* … */ })\nfind((element, index, array) => { /* … */ })\n\n// Callback function\nfind(callbackFn)\nfind(callbackFn, thisArg)\n\n// Inline callback function\nfind(function (element) { /* … */ })\nfind(function (element, index) { /* … */ })\nfind(function (element, index, array) { /* … */ })\nfind(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value to indicate a matching element has been found.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `find()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\nThe first element in the array that satisfies the provided testing function.\nOtherwise, [`undefined`](../../../globals/undefined.mdx) is returned.\n\n## Description\n\nThe `find()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array in ascending-index order, until `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. `find()` then returns that element and stops iterating through the array. If `callbackFn` never returns a truthy value, `find()` returns [`undefined`](../../../globals/undefined.mdx).\n\n`callbackFn` is invoked for _every_ index of the array, not just those with assigned values. Empty slots in sparse arrays behave the same as `undefined`.\n\n`find()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `find()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are visited as if they were `undefined`.\n\nThe `find()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Array/prototype/findIndex.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.findIndex\n\nThe **`findIndex()`** method returns the index of the first element in an array that satisfies the provided testing function.\nIf no elements satisfy the testing function, -1 is returned.\n\nSee also the [`find()`](./find.mdx) method, which returns the first element that satisfies the testing function (rather than its index).\n\n## Syntax\n\n```js\n// Arrow function\nfindIndex((element) => { /* … */ })\nfindIndex((element, index) => { /* … */ })\nfindIndex((element, index, array) => { /* … */ })\n\n// Callback function\nfindIndex(callbackFn)\nfindIndex(callbackFn, thisArg)\n\n// Inline callback function\nfindIndex(function (element) { /* … */ })\nfindIndex(function (element, index) { /* … */ })\nfindIndex(function (element, index, array) { /* … */ })\nfindIndex(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value to indicate a matching element has been found.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `findIndex()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\nThe index of the first element in the array that passes the test. Otherwise, `-1`.\n\n## Description\n\nThe `findIndex()` is an iterative method. It calls a provided `callbackFn` function once for each element in an array in ascending-index order, until `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. `findIndex()` then returns the index of that element and stops iterating through the array. If `callbackFn` never returns a truthy value, `findIndex()` returns `-1`.\n\n`callbackFn` is invoked for _every_ index of the array, not just those with assigned values. Empty slots in sparse arrays behave the same as `undefined`.\n\n`findIndex()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `findIndex()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are visited as if they were `undefined`.\n\nThe `findIndex()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Array/prototype/flat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.flat\n\nThe **`flat()`** method creates a new array with all sub-array\nelements concatenated into it recursively up to the specified depth.\n\n## Syntax\n\n```js\nflat()\nflat(depth)\n```\n\n### Parameters\n\n- `depth` _**optional**_\n  - : The depth level specifying how deep a nested array structure should be flattened.\n    Defaults to 1.\n\n### Return value\n\nA new array with the sub-array elements concatenated into it.\n\n## Description\n\nThe `flat()` method is a copying method. It does not alter `this` but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains the same elements as the ones from the original array.\n\nThe `flat()` method ignores empty slots if the array being flattened is sparse. For example, if `depth` is 1, both empty slots in the root array and in the first level of nested arrays are ignored, but empty slots in further nested arrays are preserved with the arrays themselves.\n\nThe `flat()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. However, its elements must be arrays if they are to be flattened.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Array/prototype/flatMap.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.flatMap()\n\nThe **`flatMap()`** method returns a new array formed by applying a given callback function to each element of the array, and then flattening the result by one level. It is identical to a [`Array.prototype.map()`](./map.mdx) followed by a [`Array.prototype.flat()`](./flat.mdx) of depth 1 (`arr.map(...args).flat()`), but slightly more efficient than calling those two methods separately.\n\n## Syntax\n\n```js\n// Arrow function\nflatMap((element) => { /* … */ })\nflatMap((element, index) => { /* … */ })\nflatMap((element, index, array) => { /* … */ })\n\n// Callback function\nflatMap(callbackFn)\nflatMap(callbackFn, thisArg)\n\n// Inline callback function\nflatMap(function (element) { /* … */ })\nflatMap(function (element, index) { /* … */ })\nflatMap(function (element, index, array) { /* … */ })\nflatMap(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return an array containing new elements of the new array, or a single non-array value to be added to the new array.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `flatMap()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\nA new array with each element being the result of the callback function and flattened\nby a depth of 1.\n\n## Description\n\nThe `flatMap()` method is an iterative method. See [`Array.prototype.map()`](./map.mdx) for a detailed description of the callback function. The `flatMap()` method is identical to [`map(callbackFn, thisArg)`](./map.mdx) followed by [`flat(1)`](./flat.mdx) — for each element, it produces an array of new elements, and concatenates the resulting arrays together to form a new array.\n\nThe `flatMap()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. However, the value returned from `callbackFn` must be an array if it is to be flattened.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Array/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.forEach()\n\nThe **`forEach()`** method executes a provided function once\nfor each array element.\n\n## Syntax\n\n```js\n// Arrow function\nforEach((element) => { /* … */ })\nforEach((element, index) => { /* … */ })\nforEach((element, index, array) => { /* … */ })\n\n// Callback function\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n\n// Inline callback function\nforEach(function (element) { /* … */ })\nforEach(function (element, index) { /* … */ })\nforEach(function (element, index, array) { /* … */ })\nforEach(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value is discarded.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `forEach()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\n`undefined`.\n\n## Description\n\nThe `forEach()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array in ascending-index order. Unlike [`Array.prototype.map()`](./map.mdx), `forEach()` always returns [`undefined`](../../../globals/undefined.mdx) and is not chainable. The typical use case is to execute side effects at the end of a chain.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\n`forEach()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `forEach()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\nThe `forEach()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n\nThere is no way to stop or break a `forEach()` loop other than by throwing an exception. If you need such behavior, the `forEach()` method is the wrong tool.\n\nEarly termination may be accomplished with looping statements like [`for`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for), [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of), and [`for...in`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...in). Array methods like [`Array.prototype.some()`](./some.mdx), [`Array.prototype.some()`](./some.mdx), [`Array.prototype.find()`](./find.mdx), and [`Array.prototype.findIndex()`](./findIndex.mdx) also stops iteration immediately when further iteration is not necessary.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Array/prototype/includes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.includes()\n\nThe **`includes()`** method determines whether an array\nincludes a certain value among its entries, returning `true` or\n`false` as appropriate.\n\n## Syntax\n\n```js\nincludes(searchElement)\nincludes(searchElement, fromIndex)\n```\n\n### Parameters\n\n- `searchElement`\n  - : The value to search for.\n- `fromIndex` _**optional**_\n  - : Zero-based index at which to start searching, converted to an integer.\n    - Negative index counts back from the end of the array — if `fromIndex < 0`, `fromIndex + array.length` is used. However, the array is still searched from front to back in this case.\n    - If `fromIndex < -array.length` or `fromIndex` is omitted, `0` is used, causing the entire array to be searched.\n    - If `fromIndex >= array.length`, the array is not searched and `false` is returned.\n\n### Return value\n\nA boolean value which is `true` if the value `searchElement` is found within the array (or the part of the array indicated by the index `fromIndex`, if specified).\n\n## Description\n\nThe `includes()` method compares `searchElement` to elements of the array using the [SameValueZero](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) algorithm. Values of zero are all considered to be equal, regardless of sign. (That is, `-0` is equal to `0`), but `false` is _not_ considered to be the same as `0`. [`NaN`](../../NaN.mdx) can be correctly searched for.\n\nWhen used on sparse arrays, the `includes()` method iterates empty slots as if they have the value `undefined`.\n\nThe `includes()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Array/prototype/indexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.indexOf()\n\nThe **`indexOf()`** method returns the first index at which a\ngiven element can be found in the array, or -1 if it is not present.\n\n## Syntax\n\n```js\nindexOf(searchElement)\nindexOf(searchElement, fromIndex)\n```\n\n### Parameters\n\n- `searchElement`\n  - : Element to locate in the array.\n- `fromIndex` _**optional**_\n  - : Zero-based index at which to start searching, converted to an integer.\n    - Negative index counts back from the end of the array — if `fromIndex < 0`, `fromIndex + array.length` is used. Note, the array is still searched from front to back in this case.\n    - If `fromIndex < -array.length` or `fromIndex` is omitted, `0` is used, causing the entire array to be searched.\n    - If `fromIndex >= array.length`, the array is not searched and `-1` is returned.\n\n### Return value\n\nThe first index of the element in the array; **-1** if not found.\n\n## Description\n\nThe `indexOf()` method compares `searchElement` to elements of the array using [strict equality](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) (the same algorithm used by the `===` operator).\n\nThe `indexOf()` method skips empty slots in sparse arrays.\n\nThe `indexOf()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Array/prototype/join.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.join()\n\nThe **`join()`** method creates and\nreturns a new string by concatenating all of the elements in an array\n(or an [array-like object](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects)),\nseparated by commas or a specified separator string. If the array has\nonly one item, then that item will be returned without using the separator.\n\n## Syntax\n\n```js\njoin()\njoin(separator)\n```\n\n### Parameters\n\n- `separator` _**optional**_\n  - : Specifies a string to separate each pair of adjacent elements of the array. The\n    separator is converted to a string if necessary. If omitted, the array elements are\n    separated with a comma (\",\"). If `separator` is an empty string, all\n    elements are joined without any characters in between them.\n\n### Return value\n\nA string with all array elements joined. If `arr.length` is\n`0`, the empty string is returned.\n\n## Description\n\nThe string conversions of all array elements are joined into one string. If an element is `undefined`, `null`, it is converted to an empty string instead of the string `\"null\"` or `\"undefined\"`.\n\nThe `join` method is accessed internally by [`Array.prototype.toString()`](./toString.mdx) with no arguments. Overriding `join` of an array instance will override its `toString` behavior as well.\n\nWhen used on sparse arrays, the `join()` method iterates empty slots as if they have the value `undefined`.\n\nThe `join()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Array/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.keys()\n\nThe **`keys()`** method returns a new **Array\nIterator** object that contains the keys for each index in the array.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nA new `Array` iterator object.\n\n## Description\n\nWhen used on sparse arrays, the `keys()` method iterates empty slots as if they have the value `undefined`.\n\nThe `keys()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Array/prototype/lastIndexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.lastIndexOf()\n\nThe **`lastIndexOf()`** method returns the last index at which\na given element can be found in the array, or -1 if it is not present. The array is\nsearched backwards, starting at `fromIndex`.\n\n## Syntax\n\n```js\nlastIndexOf(searchElement)\nlastIndexOf(searchElement, fromIndex)\n```\n\n### Parameters\n\n- `searchElement`\n  - : Element to locate in the array.\n- `fromIndex` _**optional**_\n  - : Zero-based index at which to start searching backwards, converted to an integer.\n    - Negative index counts back from the end of the array — if `fromIndex < 0`, `fromIndex + array.length` is used.\n    - If `fromIndex < -array.length`, the array is not searched and `-1` is returned. You can think of it conceptually as starting at a nonexistent position before the beginning of the array and going backwards from there. There are no array elements on the way, so `searchElement` is never found.\n    - If `fromIndex >= array.length` or `fromIndex` is omitted, `array.length - 1` is used, causing the entire array to be searched. You can think of it conceptually as starting at a nonexistent position beyond the end of the array and going backwards from there. It eventually reaches the real end position of the array, at which point it starts searching backwards through the actual array elements.\n\n### Return value\n\nThe last index of the element in the array; **-1** if not found.\n\n## Description\n\nThe `lastIndexOf()` method compares `searchElement` to elements of the array using [strict equality](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) (the same algorithm used by the `===` operator).\n\nThe `lastIndexOf()` method skips empty slots in sparse arrays.\n\nThe `lastIndexOf()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Array/prototype/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.length\n\nThe **`length`** data property of an `Array` instance represents the number of elements in that array. The value is an unsigned, 32-bit integer that is always numerically greater than the highest index in the array.\n\n## Value\n\nA non-negative integer less than 2<sup>32</sup>.\n\n## Description\n\nThe value of the `length` property is a non-negative integer with a value less than 2<sup>32</sup>.\n\n```js\nconst listA = [1, 2, 3];\nconst listB = new Array(6);\n\nconsole.log(listA.length);\n// 3\n\nconsole.log(listB.length);\n// 6\n\nlistB.length = 2 ** 32; // 4294967296\n// RangeError: Invalid array length\n\nconst listC = new Array(-100); // Negative numbers are not allowed\n// RangeError: Invalid array length\n```\n\nThe array object observes the `length` property, and automatically syncs the `length` value with the array's content. This means:\n\n- Setting `length` to a value smaller than the current length truncates the array — elements beyond the new `length` are deleted.\n- Setting any array index (a non-negative integer smaller than 2<sup>32</sup>) beyond the current `length` extends the array — the `length` property is increased to reflect the new highest index.\n- Setting `length` to an invalid value (e.g. a negative number or a non-integer) throws a `RangeError` exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Array/prototype/map.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.map()\n\nThe **`map()`** method **creates\na new array** populated with the results of calling a provided function on\nevery element in the calling array.\n\n## Syntax\n\n```js\n// Arrow function\nmap((element) => { /* … */ })\nmap((element, index) => { /* … */ })\nmap((element, index, array) => { /* … */ })\n\n// Callback function\nmap(callbackFn)\nmap(callbackFn, thisArg)\n\n// Inline callback function\nmap(function (element) { /* … */ })\nmap(function (element, index) { /* … */ })\nmap(function (element, index, array) { /* … */ })\nmap(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value is added as a single element in the new array.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `map()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\nA new array with each element being the result of the callback function.\n\n## Description\n\nThe `map()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array and constructs a new array from the results.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nThe `map()` method is a copying method. It does not alter `this`. However, the function provided as `callbackFn` can mutate the array. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `map()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `map()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n\nSince `map` builds a new array, calling it without using the returned\narray is an anti-pattern; use [`Array.prototype.forEach()`](./forEach.mdx) or\n`for...of` instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Array/prototype/pop.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.pop()\n\nThe **`pop()`** method removes the **last**\nelement from an array and returns that element. This method changes the length of the\narray.\n\n## Syntax\n\n```js\npop()\n```\n\n### Return value\n\nThe removed element from the array; [`undefined`](../../../globals/undefined.mdx) if the array is empty.\n\n## Description\n\nThe `pop()` method removes the last element from an array and returns that value to the caller. If you call `pop()` on an empty array, it returns [`undefined`](../../../globals/undefined.mdx).\n\n[`Array.prototype.shift()`](./shift.mdx) has similar behavior to `pop()`, but applied to the first element in an array.\n\nThe `pop()` method is a mutating method. It changes the length and the content of `this`. In case you want the value of `this` to be the same, but return a new array with the last element removed, you can use [`arr.slice(0, -1)`](./slice.mdx) instead.\n\nThe `pop()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Array/prototype/push.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.push()\n\nThe **`push()`** method adds one or more elements to the end of\nan array and returns the new length of the array.\n\n## Syntax\n\n```js\npush(element0)\npush(element0, element1)\npush(element0, element1, /* … ,*/ elementN)\n```\n\n### Parameters\n\n- `elementN`\n  - : The element(s) to add to the end of the array.\n\n### Return value\n\nThe new [`Array.prototype.length`](./length.mdx) property of the object upon which the method was called.\n\n## Description\n\nThe `push()` method appends values to an array.\n\n[`Array.prototype.unshift()`](./unshift.mdx)has similar behavior to `push()`, but applied to the start of an array.\n\nThe `push()` method is a mutating method. It changes the length and the content of `this`. In case you want the value of `this` to be the same, but return a new array with elements appended to the end, you can use [`arr.concat([element0, element1, /* ... ,*/ elementN])`](./concat.mdx) instead. Notice that the elements are wrapped in an extra array — otherwise, if the element is an array itself, it would be spread instead of pushed as a single element due to the behavior of `concat()`.\n\nThe `push()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Array/prototype/reduce.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.reduce()\n\nThe **`reduce()`** method executes a user-supplied \"reducer\" callback function on each element of the array, in order, passing in the return value from the calculation on the preceding element.\nThe final result of running the reducer across all elements of the array is a single value.\n\nThe first time that the callback is run there is no \"return value of the previous calculation\".\nIf supplied, an initial value may be used in its place.\nOtherwise the array element at index 0 is used as the initial value and iteration starts from the next element (index 1 instead of index 0).\n\nPerhaps the easiest-to-understand case for `reduce()` is to return the sum of all the elements in an array:\n\nThe reducer walks through the array element-by-element, at each step adding the current array value to the result from the previous step (this result is the running sum of all the previous steps) — until there are no more elements to add.\n\n## Syntax\n\n```js\n// Arrow function\nreduce((accumulator, currentValue) => { /* … */ })\nreduce((accumulator, currentValue, currentIndex) => { /* … */ })\nreduce((accumulator, currentValue, currentIndex, array) => { /* … */ })\n\nreduce((accumulator, currentValue) => { /* … */ }, initialValue)\nreduce((accumulator, currentValue, currentIndex) => { /* … */ }, initialValue)\nreduce((accumulator, currentValue, currentIndex, array) => { /* … */ }, initialValue)\n\n// Callback function\nreduce(callbackFn)\nreduce(callbackFn, initialValue)\n\n// Inline callback function\nreduce(function (accumulator, currentValue) { /* … */ })\nreduce(function (accumulator, currentValue, currentIndex) { /* … */ })\nreduce(function (accumulator, currentValue, currentIndex, array) { /* … */ })\n\nreduce(function (accumulator, currentValue) { /* … */ }, initialValue)\nreduce(function (accumulator, currentValue, currentIndex) { /* … */ }, initialValue)\nreduce(function (accumulator, currentValue, currentIndex, array) { /* … */ }, initialValue)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value becomes the value of the `accumulator` parameter on the next invocation of `callbackFn`. For the last invocation, the return value becomes the return value of `reduce()`.\n\n    The function is called with the following arguments:\n\n    - `accumulator`\n      - : The value resulting from the previous call to `callbackFn`. On first call, `initialValue` if specified, otherwise the value of `array[0]`.\n    - `currentValue`\n      - : The value of the current element. On first call, the value of `array[0]` if an `initialValue` was specified, otherwise the value of `array[1]`.\n    - `currentIndex`\n      - : The index position of `currentValue` in the array. On first call, `0` if `initialValue` was specified, otherwise `1`.\n    - `array`\n      - : The array `reduce()` was called upon.\n\n- `initialValue` _**optional**_\n  - : A value to which `accumulator` is initialized the first time the callback is called.\n    If `initialValue` is specified, `callbackFn` starts executing with the first value in the array as `currentValue`.\n    If `initialValue` is _not_ specified, `accumulator` is initialized to the first value in the array, and `callbackFn` starts executing with the second value in the array as `currentValue`. In this case, if the array is empty (so that there's no first value to return as `accumulator`), an error is thrown.\n\n### Return value\n\nThe value that results from running the \"reducer\" callback function to completion over the entire array.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n\n  - : The array contains no elements and `initialValue` is not provided.\n\n## Description\n\nThe `reduce()` method is an iterative method. It runs a \"reducer\" callback function over all elements in the array, in ascending-index order, and accumulates them into a single value. Every time, the return value of `callbackFn` is passed into `callbackFn` again on next invocation as `accumulator`. The final value of `accumulator` (which is the value returned from `callbackFn` on the final iteration of the array) becomes the return value of `reduce()`.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nUnlike other [iterative methods](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array#iterative_methods), `reduce()` does not accept a `thisArg` argument. `callbackFn` is always called with `undefined` as `this`, which gets substituted with `globalThis` if `callbackFn` is non-strict.\n\n`reduce()` is a central concept in [functional programming](https://en.wikipedia.org/wiki/Functional_programming), where it's not possible to mutate any value, so in order to accumulate all values in an array, one must return a new accumulator value on every iteration. This convention propagates to JavaScript's `reduce()`: you should use [spreading](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) or other copying methods where possible to create new arrays and objects as the accumulator, rather than mutating the existing one. If you decided to mutate the accumulator instead of copying it, remember to still return the modified object in the callback, or the next iteration will receive undefined.\n\n`reduce()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `reduce()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `reduce()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n\n### When to not use reduce()\n\nRecursive functions like `reduce()` can be powerful but sometimes difficult to understand, especially for less-experienced JavaScript developers. If code becomes clearer when using other array methods, developers must weigh the readability tradeoff against the other benefits of using `reduce()`. In cases where `reduce()` is the best choice, documentation and semantic variable naming can help mitigate readability drawbacks.\n\n### Edge cases\n\nIf the array only has one element (regardless of position) and no `initialValue` is provided, or if `initialValue` is provided but the array is empty, the solo value will be returned _without_ calling `callbackFn`.\n\nIf `initialValue` is provided and the array is not empty, then the reduce method will always invoke the callback function starting at index 0.\n\nIf `initialValue` is not provided then the reduce method will act differently for arrays with length larger than 1, equal to 1 and 0, as shown in the following example:\n\n```js\nconst getMax = (a, b) => Math.max(a, b);\n\n// callback is invoked for each element in the array starting at index 0\n[1, 100].reduce(getMax, 50); // 100\n[50].reduce(getMax, 10); // 50\n\n// callback is invoked once for element at index 1\n[1, 100].reduce(getMax); // 100\n\n// callback is not invoked\n[50].reduce(getMax); // 50\n[].reduce(getMax, 1); // 1\n\n[].reduce(getMax); // TypeError\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Array/prototype/reduceRight.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.reduceRight()\n\nThe **`reduceRight()`** method applies a function against an\naccumulator and each value of the array (from right-to-left) to reduce it to a single\nvalue.\n\nSee also [`Array.prototype.reduce()`](./reduce.mdx) for left-to-right.\n\n## Syntax\n\n```js\n// Arrow function\nreduceRight((accumulator, currentValue) => { /* … */ })\nreduceRight((accumulator, currentValue, index) => { /* … */ })\nreduceRight((accumulator, currentValue, index, array) => { /* … */ })\nreduceRight((accumulator, currentValue, index, array) => { /* … */ }, initialValue)\n\n// Callback function\nreduceRight(callbackFn)\nreduceRight(callbackFn, initialValue)\n\n// Callback reducer function\nreduceRight(function (accumulator, currentValue) { /* … */ })\nreduceRight(function (accumulator, currentValue, index) { /* … */ })\nreduceRight(function (accumulator, currentValue, index, array) { /* … */ })\nreduceRight(function (accumulator, currentValue, index, array) { /* … */ }, initialValue)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value becomes the value of the `accumulator` parameter on the next invocation of `callbackFn`. For the last invocation, the return value becomes the return value of `reduce()`.\n\n    The function is called with the following arguments:\n\n    - `accumulator`\n      - : The value previously returned in the last invocation of the callback, or\n        `initialValue`, if supplied. (See below.)\n    - `currentValue`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `reduceRight()` was called upon.\n\n- `initialValue` _**optional**_\n  - : Value to use as accumulator to the first call of the\n    `callbackFn`. If no initial value is supplied, the last element in\n    the array will be used and skipped. Calling reduce or reduceRight on an empty array\n    without an initial value creates a `TypeError`.\n\n### Return value\n\nThe value that results from the reduction.\n\n## Description\n\nThe `reduceRight()` method is an iterative method. It runs a \"reducer\" callback function over all elements in the array, in descending-index order, and accumulates them into a single value.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nUnlike other [iterative methods](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array#iterative_methods), `reduce()` does not accept a `thisArg` argument. `callbackFn` is always called with `undefined` as `this`, which gets substituted with `globalThis` if `callbackFn` is non-strict.\n\n`reduceRight()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `reduceRight()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `reduceRight()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Array/prototype/reverse.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.reverse()\n\nThe **`reverse()`** method reverses an array _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_ and returns the reference to the same array, the first array element now becoming the last, and the last array element becoming the first. In other words, elements order in the array will be turned towards the direction opposite to that previously stated.\n\n## Syntax\n\n```js\nreverse()\n```\n\n### Return value\n\nThe reference to the original array, now reversed. Note that the array is reversed _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_, and no copy is made.\n\n## Description\n\nThe `reverse()` method transposes the elements of the calling array object in\nplace, mutating the array, and returning a reference to the array.\n\nThe `reverse()` method preserves empty slots. If the source array is sparse, the empty slots' corresponding new indices are [deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) and also become empty slots.\n\nThe `reverse()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Array/prototype/shift.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.shift()\n\nThe **`shift()`** method removes the **first**\nelement from an array and returns that removed element. This method changes the length\nof the array.\n\n## Syntax\n\n```js\nshift()\n```\n\n### Return value\n\nThe removed element from the array; [`undefined`](../../../globals/undefined.mdx) if the array is empty.\n\n## Description\n\nThe `shift()` method removes the element at the zeroth index and shifts the\nvalues at consecutive indexes down, then returns the removed value. If the\n[`Array.prototype.length`](./length.mdx) property is 0, [`undefined`](../../../globals/undefined.mdx) is returned.\n\nThe [`Array.prototype.pop()`](./pop.mdx) method has similar behavior to `shift()`, but applied to the last element in an array.\n\nThe `shift()` method is a mutating method. It changes the length and the content of `this`. In case you want the value of `this` to be the same, but return a new array with the first element removed, you can use [`arr.slice(1)`](./slice.mdx) instead.\n\nThe `shift()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Array/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.slice()\n\nThe **`slice()`** method returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of a portion of\nan array into a new array object selected from `start` to `end`\n(`end` not included) where `start` and `end` represent\nthe index of items in that array. The original array will not be modified.\n\n## Syntax\n\n```js\nslice()\nslice(start)\nslice(start, end)\n```\n\n### Parameters\n\n- `start` _**optional**_\n  - : Zero-based index at which to start extraction, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, nothing is extracted.\n- `end` _**optional**_\n  - : Zero-based index at which to end extraction, converted to an integer. `slice()` extracts up to but not including `end`.\n    - Negative index counts back from the end of the array — if `end < 0`, `end + array.length` is used.\n    - If `end < -array.length`, `0` is used.\n    - If `end >= array.length` or `end` is omitted, `array.length` is used, causing all elements until the end to be extracted.\n    - If `end` is positioned before or at `start` after normalization, nothing is extracted.\n\n### Return value\n\nA new array containing the extracted elements.\n\n## Description\n\nThe `slice()` method is a copying method. It does not alter `this` but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains some of the same elements as the ones from the original array.\n\nThe `slice()` method preserves empty slots. If the sliced portion is sparse, the returned array is sparse as well.\n\nThe `slice()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Array/prototype/some.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.some()\n\nThe **`some()`** method tests whether\nat least one element in the array passes the test implemented by the provided\nfunction. It returns true if, in the array, it finds an element for which the provided function returns true; otherwise it returns false. It doesn't modify the array.\n\n## Syntax\n\n```js\n// Arrow function\nsome((element) => { /* … */ })\nsome((element, index) => { /* … */ })\nsome((element, index, array) => { /* … */ })\n\n// Callback function\nsome(callbackFn)\nsome(callbackFn, thisArg)\n\n// Inline callback function\nsome(function (element) { /* … */ })\nsome(function (element, index) { /* … */ })\nsome(function (element, index, array) { /* … */ })\nsome(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) to indicate the element passes the test, and a falsy value otherwise.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `some()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\n`true` if the callback function returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value for at least one element in the array. Otherwise, `false`.\n\n## Description\n\nThe `some()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array, until the `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. If such an element is found, `some()` immediately returns `true` and stops iterating through the array. Otherwise, if `callbackFn` returns a [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value for all elements, `some()` returns `false`.\n\n`some()` acts like the \"there exists\" quantifier in mathematics. In particular, for an empty array, it returns `false` for any condition.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\n`some()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `some()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\nThe `some()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Array/prototype/sort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.sort()\n\nThe **`sort()`** method sorts the elements of an array _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_ and returns the reference to the same array, now sorted. The default sort order is ascending, built upon converting the elements into strings, then comparing their sequences of UTF-16 code units values.\n\nThe time and space complexity of the sort cannot be guaranteed as it depends on the\nimplementation.\n\n## Syntax\n\n```js\n// Functionless\nsort()\n\n// Arrow function\nsort((a, b) => { /* … */ } )\n\n// Compare function\nsort(compareFn)\n\n// Inline compare function\nsort(function compareFn(a, b) { /* … */ })\n```\n\n### Parameters\n\n- `compareFn` _**optional**_\n\n  - : Specifies a function that defines the sort order. If omitted, the array elements are converted to strings, then sorted according to each character's Unicode code point value.\n\n    - `a`\n      - : The first element for comparison.\n    - `b`\n      - : The second element for comparison.\n\n### Return value\n\nThe reference to the original array, now sorted. Note that the array is sorted _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_, and no copy is made.\n\n## Description\n\nIf `compareFn` is not supplied, all non-`undefined` array\nelements are sorted by converting them to strings and comparing strings in UTF-16 code\nunits order. For example, \"banana\" comes before \"cherry\". In a numeric sort, 9 comes\nbefore 80, but because numbers are converted to strings, \"80\" comes before \"9\" in the\nUnicode order. All `undefined` elements are sorted to the end of the array.\n\nThe `sort()` method preserves empty slots. If the source array is sparse, the empty slots are moved to the end of the array, and always come after all the `undefined`.\n\n> **Note:** In UTF-16, Unicode characters above `\\uFFFF` are\n> encoded as two surrogate code units, of the range\n> `\\uD800` - `\\uDFFF`. The value of each code unit is taken\n> separately into account for the comparison. Thus the character formed by the surrogate\n> pair `\\uD855\\uDE51` will be sorted before the character\n> `\\uFF3A`.\n\nIf `compareFn` is supplied, all non-`undefined` array\nelements are sorted according to the return value of the compare function (all\n`undefined` elements are sorted to the end of the array, with no call to\n`compareFn`).\n\n| `compareFn(a, b)` return value | sort order                         |\n| ------------------------------ | ---------------------------------- |\n| > 0                            | sort `a` after `b`                 |\n| < 0                            | sort `a` before `b`                |\n| === 0                          | keep original order of `a` and `b` |\n\nSo, the compare function has the following form:\n\n```js\nfunction compareFn(a, b) {\n  if (a is less than b by some ordering criterion) {\n    return -1;\n  }\n  if (a is greater than b by the ordering criterion) {\n    return 1;\n  }\n  // a must be equal to b\n  return 0;\n}\n```\n\nMore formally, the comparator is expected to have the following properties, in order to ensure proper sort behavior:\n\n- _Pure_: The comparator does not mutate the objects being compared or any external state. (This is important because there's no guarantee _when_ and _how_ the comparator will be called, so any particular call should not produce visible effects to the outside.)\n- _Stable_: The comparator returns the same result with the same pair of input.\n- _Reflexive_: `compareFn(a, a) === 0`.\n- _Anti-symmetric_: `compareFn(a, b)` and `compareFn(b, a)` must both be `0` or have opposite signs.\n- _Transitive_: If `compareFn(a, b)` and `compareFn(b, c)` are both positive, zero, or negative, then `compareFn(a, c)` has the same positivity as the previous two.\n\nA comparator conforming to the constraints above will always be able to return all of `1`, `0`, and `-1`, or consistently return `0`. For example, if a comparator only returns `1` and `0`, or only returns `0` and `-1`, it will not be able to sort reliably because _anti-symmetry_ is broken. A comparator that always returns `0` will cause the array to not be changed at all, but is reliable nonetheless.\n\nThe default lexicographic comparator satisfies all constraints above.\n\nTo compare numbers instead of strings, the compare function can subtract `b`\nfrom `a`. The following function will sort the array in ascending order (if\nit doesn't contain `Infinity` and `NaN`):\n\n```js\nfunction compareNumbers(a, b) {\n  return a - b;\n}\n```\n\nThe `sort()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Array/prototype/splice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.splice()\n\nThe **`splice()`** method changes the contents of an array by\nremoving or replacing existing elements and/or adding new elements [in place](https://en.wikipedia.org/wiki/In-place_algorithm). To access part of an array without modifying it, see [`Array.prototype.slice()`](./slice.mdx).\n\n## Syntax\n\n```js\nsplice(start)\nsplice(start, deleteCount)\nsplice(start, deleteCount, item1)\nsplice(start, deleteCount, item1, item2, itemN)\n```\n\n### Parameters\n\n- `start`\n\n  - : Zero-based index at which to start changing the array, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, no element will be deleted, but the method will behave as an adding function, adding as many elements as provided.\n\n- `deleteCount` _**optional**_\n\n  - : An integer indicating the number of elements in the array to remove from `start`.\n\n    If `deleteCount` is omitted, or if its value is greater than or equal to the number of elements after the position specified by `start`, then all the elements from `start` to the end of the array will be deleted. However, if you wish to pass any `itemN` parameter, you should pass `Infinity` as `deleteCount` to delete all elements after `start`, because an explicit `undefined` gets [converted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#integer_conversion) to `0`.\n\n    If `deleteCount` is `0` or negative, no elements are removed.\n    In this case, you should specify at least one new element (see below).\n\n- `item1`, …, `itemN` _**optional**_\n\n  - : The elements to add to the array, beginning from `start`.\n\n    If you do not specify any elements, `splice()` will only remove elements from the array.\n\n### Return value\n\nAn array containing the deleted elements.\n\nIf only one element is removed, an array of one element is returned.\n\nIf no elements are removed, an empty array is returned.\n\n## Description\n\nThe `splice()` method is a mutating method. It may change the content of `this`. If the specified number of elements to insert differs from the number of elements being removed, the array's `length` will be changed as well. At the same time, it uses [`@@species`](../@@species.mdx) to create a new array instance to be returned.\n\nIf the deleted portion is sparse, the array returned by `splice()` is sparse as well, with those corresponding indices being empty slots.\n\nThe `splice()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Array/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string representing\nthe elements of the array. The elements are converted to Strings using their\n`toLocaleString` methods and these Strings are separated by a locale-specific\nString (such as a comma \",\").\n\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\n- `locales` _**optional**_\n  - : A string with a BCP 47 language tag, or an array of such strings. For the general form and interpretation of the `locales` argument, see [Locale identification and negotiation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation).\n- `options` _**optional**_\n  - : An object with configuration properties. For numbers, see [`Number.prototype.toLocaleString()`](../../../globals/Number/prototype/toLocaleString.mdx); for dates, see [`Date.prototype.toLocaleString()`](../../../globals/Date/prototype/toLocaleString.mdx).\n\n### Return value\n\nA string representing the elements of the array.\n\n## Description\n\nThe `Array.prototype.toLocaleString` method traverses its content, calling the `toLocaleString` method of every element with the `locales` and `options` parameters provided, and concatenates them with an implementation-defined separator (such as a comma \",\"). Note that the method itself does not consume the two parameters — it only passes them to the `toLocaleString()` of each element. The choice of the separator string depends on the host's current locale, not the `locales` parameter.\n\nIf an element is `undefined`, `null`, it is converted to an empty string instead of the string `\"null\"` or `\"undefined\"`.\n\nWhen used on sparse arrays, the `toLocaleString()` method iterates empty slots as if they have the value `undefined`.\n\nThe `toLocaleString()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Array/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.toString()\n\nThe **`toString()`** method returns a string representing the\nspecified array and its elements.\n\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the elements of the array.\n\n## Description\n\nThe `Array` object overrides the `toString` method of `Object`. The `toString` method of arrays calls [`join()`](../../../globals/Array/prototype/join.mdx) internally, which joins the array and returns one string containing each array element separated by commas. If the `join` method is unavailable or is not a function, [`Object.prototype.toString`](../../../globals/Object/prototype/toString.mdx) is used instead, returning `[object Array]`.\n\n```js\nconst arr = [];\narr.join = 1; // re-assign `join` with a non-function\nconsole.log(arr.toString()); // [object Array]\n\nconsole.log(Array.prototype.toString.call({ join: () => 1 })); // 1\n```\n\nJavaScript calls the `toString` method automatically when an array is to be represented as a text value or when an array is referred to in a string concatenation.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Array/prototype/unshift.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.unshift()\n\nThe **`unshift()`** method adds one or more elements to the\nbeginning of an array and returns the new length of the array.\n\n## Syntax\n\n```js\nunshift(element0)\nunshift(element0, element1)\nunshift(element0, element1, /* … ,*/ elementN)\n```\n\n### Parameters\n\n- `elementN`\n  - : The elements to add to the front of the `arr`.\n\n### Return value\n\nThe new [`Array.prototype.length`](./length.mdx) property of the object upon which the\nmethod was called.\n\n## Description\n\nThe `unshift()` method inserts the given values to the beginning of an\narray-like object.\n\n[`Array.prototype.push()`](./push.mdx) has similar behavior to `unshift()`, but applied to the end of an array.\n\nPlease note that, if multiple elements are passed as parameters, they're inserted in\nchunk at the beginning of the object, in the exact same order they were passed as\nparameters. Hence, calling `unshift()` with `n`\narguments **once**, or calling it `n` times with\n**1** argument (with a loop, for example), don't yield the same results.\n\nSee example:\n\n```js\nlet arr = [4, 5, 6];\n\narr.unshift(1, 2, 3);\nconsole.log(arr);\n// [1, 2, 3, 4, 5, 6]\n\narr = [4, 5, 6]; // resetting the array\n\narr.unshift(1);\narr.unshift(2);\narr.unshift(3);\n\nconsole.log(arr);\n// [3, 2, 1, 4, 5, 6]\n```\n\nThe `unshift()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Array/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.values()\n\nThe **`values()`** method returns a new _array [iterator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterator_protocol)_ object that iterates the value of each index in the array.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nA new iterable iterator object.\n\n## Description\n\n`Array.prototype.values()` is the default implementation of [`Array.prototype[@@iterator]()`](./@@iterator.mdx).\n\n```js\nArray.prototype.values === Array.prototype[Symbol.iterator]; // true\n```\n\nWhen used on sparse arrays, the `values()` method iterates empty slots as if they have the value `undefined`.\n\nThe `values()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/ArrayBuffer/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get ArrayBuffer\\[Symbol.species]\n\nThe **`ArrayBuffer[Symbol.species]`** accessor property returns the constructor used to construct return values from array buffer methods.\n\n> **Warning:** The existence of `Symbol.species` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Syntax\n\n```js\nArrayBuffer[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct return values from array buffer methods that create new array buffers.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `ArrayBuffer` objects. Subclass constructors may override it to change the constructor assignment. The default implementation is basically:\n\n```js\n// Hypothetical underlying implementation for illustration\nclass ArrayBuffer {\n  static get [Symbol.species]() {\n    return this;\n  }\n}\n```\n\nBecause of this polymorphic implementation, `Symbol.species` of derived subclasses would also return the constructor itself by default.\n\n```js\nclass SubArrayBuffer extends ArrayBuffer {}\nSubArrayBuffer[Symbol.species] === SubArrayBuffer; // true\n```\n\nWhen calling array buffer methods that do not mutate the existing object but return a new array buffer instance (for example, [`slice()`](./prototype/slice.mdx)), the object's `constructor[Symbol.species]` will be accessed. The returned constructor will be used to construct the return value of the array buffer method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/ArrayBuffer/ArrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer()\n\nThe **`ArrayBuffer()`** constructor is used to create \"ArrayBuffer\" objects.\n\n## Syntax\n\n```js\nnew ArrayBuffer(length)\n```\n\n> **Note:** `ArrayBuffer()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `length`\n  - : The size, in bytes, of the array buffer to create.\n\n### Return value\n\nA new `ArrayBuffer` object of the specified size. Its contents are\ninitialized to 0.\n\n### Exceptions\n\n- [`RangeError`](../RangeError/RangeError.mdx)\n  - : Thrown if the `length` is larger than `Number_MAX_SAFE_INTEGER` (≥ 2<sup>53</sup>) or negative.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/ArrayBuffer/isView.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer.isView\n\nThe **`ArrayBuffer.isView()`** method determines whether the\npassed value is one of the `ArrayBuffer` views,\nsuch as [typed array objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray)\nor a [`DataView`](../DataView/DataView.mdx).\n\n## Syntax\n\n```js\nArrayBuffer.isView(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be checked.\n\n### Return value\n\n`true` if the given argument is one of the `ArrayBuffer` views;\notherwise, `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/ArrayBuffer/prototype/byteLength.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer.prototype.byteLength\n\nThe **`byteLength`** accessor property represents the length of an `ArrayBuffer` in bytes.\n\n## Description\n\nThe `byteLength` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when the array is constructed and cannot be changed. This property returns 0 if this `ArrayBuffer` has been detached.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/ArrayBuffer/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer.prototype.slice()\n\nThe **`slice()`** method returns a new `ArrayBuffer`\nwhose contents are a copy of this `ArrayBuffer`'s bytes from\n`begin`, inclusive, up to `end`, exclusive.\n\n## Syntax\n\n```js\nslice(begin)\nslice(begin, end)\n```\n\n### Parameters\n\n- `begin`\n  - : Zero-based byte index at which to begin slicing.\n- `end` _**optional**_\n  - : Byte index before which to end slicing. If end is unspecified, the new\n    `ArrayBuffer` contains all bytes from begin to the end of this\n    `ArrayBuffer`. If negative, it will make the Byte index begin from the last\n    Byte.\n\n### Return value\n\nA new `ArrayBuffer` object.\n\n## Description\n\nThe `slice()` method copies up to, but not including, the byte indicated by\nthe `end` parameter. If either `begin` or `end` is\nnegative, it refers to an index from the end of the array, as opposed to from the\nbeginning.\n\nThe range specified by the `begin` and `end` parameters is\nclamped to the valid index range for the current array. If the computed length of the\nnew `ArrayBuffer` would be negative, it is clamped to zero.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/BigInt/BigInt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt()\n\nThe **`BigInt()`** function returns a value of type **bigint**.\n\n## Syntax\n\n```js\nBigInt(value)\n```\n\n> **Note:** `BigInt()` can only be called without `new`. Attempting to construct it with `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `value`\n  - : The numeric value of the object being created. It may be a string, an integer, a boolean, or another `BigInt`.\n\n### Return value\n\nA `BigInt` value. Number values must be integers and are converted to BigInts. The boolean value `true` becomes `1n`, and `false` becomes `0n`. Strings are parsed as if they are source text for integer literals, which means they can have leading and trailing whitespaces and can be prefixed with `0b`, `0o`, or `0x`.\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if the parameter is a non-integral number.\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if at least one of these conditions is met:\n    - The parameter cannot be converted to a primitive.\n    - After conversion to a primitive, the result is [`undefined`](../undefined.mdx), `null`, `Symbol`.\n- [`SyntaxError`](../SyntaxError/SyntaxError.mdx)\n  - : Thrown if the parameter is a string that cannot be parsed as a `BigInt`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/BigInt/asIntN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.asIntN()\n\nThe **`BigInt.asIntN`** static method clamps a `BigInt` value to the given number of bits, and returns that value as a signed integer.\n\n## Syntax\n\n```js\nBigInt.asIntN(bits, bigint)\n```\n\n### Parameters\n\n- `bits`\n  - : The amount of bits available for the returned BigInt. Should be an integer between 0 and 2<sup>53</sup> - 1, inclusive.\n- `bigint`\n  - : The BigInt value to clamp to fit into the supplied bits.\n\n### Return value\n\nThe value of `bigint` modulo 2^`bits`, as a signed integer.\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `bits` is negative or greater than 2<sup>53</sup> - 1.\n\n## Description\n\nThe `BigInt.asIntN` method clamps a `BigInt` value to the given number of bits, and interprets the result as a signed integer. For example, for `BigInt.asIntN(3, 25n)`, the value `25n` is clamped to `1n`:\n\n```plain\n25n = 00011001 (base 2)\n          ^=== Clamp to three remaining bits\n===>       001 (base 2) = 1n\n```\n\nIf the leading bit of the remaining number is `1`, the result is negative. For example, `BigInt.asIntN(4, 25n)` yields `-7n`, because `1001` is the encoding of `-7` under two's complement:\n\n```plain\n25n = 00011001 (base 2)\n         ^==== Clamp to four remaining bits\n===>      1001 (base 2) = -7n\n```\n\n> **Note:** `BigInt` values are always encoded as two's complement in binary.\n\nUnlike similar language APIs such as [`Number.prototype.toExponential()`](../Number/prototype/toExponential.mdx), `asIntN` is a static property of `BigInt`, so you always use it as `BigInt.asIntN()`, rather than as a method of a BigInt value. Exposing `asIntN()` as a \"standard library function\" allows [interop with asm.js](https://github.com/tc39/proposal-bigint/blob/master/ADVANCED.md#dont-break-asmjs).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/BigInt/asUintN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.asUintN()\n\nThe **`BigInt.asUintN`** static method clamps a `BigInt` value to the given number of bits, and returns that value as an unsigned integer.\n\n## Syntax\n\n```js\nBigInt.asUintN(bits, bigint)\n```\n\n### Parameters\n\n- `bits`\n  - : The amount of bits available for the returned BigInt. Should be an integer between 0 and 2<sup>53</sup> - 1, inclusive.\n- `bigint`\n  - : The BigInt value to clamp to fit into the supplied bits.\n\n### Return value\n\nThe value of `bigint` modulo 2^`bits`, as an unsigned integer.\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `bits` is negative or greater than 2<sup>53</sup> - 1.\n\n## Description\n\nThe `BigInt.asUintN` method clamps a `BigInt` value to the given number of bits, and interprets the result as an unsigned integer. Unsigned integers have no sign bits and are always non-negative. For example, for `BigInt.asUintN(4, 25n)`, the value `25n` is clamped to `9n`:\n\n```plain\n25n = 00011001 (base 2)\n         ^==== Clamp to four remaining bits\n===>      1001 (base 2) = 9n\n```\n\n> **Note:** `BigInt` values are always encoded as two's complement in binary.\n\nUnlike similar language APIs such as [`Number.prototype.toExponential()`](../Number/prototype/toExponential.mdx), `asUintN` is a static property of `BigInt`, so you always use it as `BigInt.asUintN()`, rather than as a method of a BigInt value. Exposing `asUintN()` as a \"standard library function\" allows [interop with asm.js](https://github.com/tc39/proposal-bigint/blob/master/ADVANCED.md#dont-break-asmjs).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/BigInt/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string with a language-sensitive representation of this BigInt. In implementations with [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) support, this method simply calls `Intl.NumberFormat`.\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` parameters customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat), these parameters correspond exactly to the [`Intl.NumberFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) constructor's parameters. Implementations without `Intl.NumberFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#locales) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored.\n\nSee the [`Intl.NumberFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string with a language-sensitive representation of the given BigInt.\n\nIn implementations with `Intl.NumberFormat`, this is equivalent to `new Intl.NumberFormat(locales, options).format(number)`.\n\n## Performance\n\nWhen formatting large numbers of numbers, it is better to create a\n`Intl.NumberFormat` object and use the function provided by its\n`format()` method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/BigInt/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified `BigInt` value. The trailing \"n\" is not part of the string.\n\n## Syntax\n\n```js\ntoString()\ntoString(radix)\n```\n\n### Parameters\n\n- `radix` _**optional**_\n  - : An integer in the range 2 through 36 specifying the base to use for representing the BigInt value. Defaults to 10.\n\n### Return value\n\nA string representing the specified `BigInt` value.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `radix` is less than 2 or greater than 36.\n\n## Description\n\nThe `BigInt` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../Object/prototype/toString.mdx). For `BigInt` values, the `toString()` method returns a string representation of the value in the specified radix.\n\nFor radixes above 10, the letters of the alphabet indicate digits greater than 9. For example, for hexadecimal numbers (base 16) `a` through `f` are used.\n\nIf the specified BigInt value is negative, the sign is preserved. This is the case even if the radix is 2; the string returned is the positive binary representation of the BigInt value preceded by a `-` sign, **not** the two's complement of the BigInt value.\n\nThe `toString()` method requires its `this` value to be a `BigInt` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to BigInt values.\n\nBecause `BigInt` doesn't have a [`[Symbol.toPrimitive]()`](../../Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `BigInt` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, BigInt _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — rather, they are directly converted using the same algorithm as the initial `toString()` implementation.\n\n```js\nBigInt.prototype.toString = () => \"Overridden\";\nconsole.log(`${1n}`); // \"1\"\nconsole.log(`${Object(1n)}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/BigInt/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.prototype.valueOf()\n\nThe **`valueOf()`** method returns the wrapped primitive value\nof a `BigInt` object.\n\n## Syntax\n\n```js\nbigIntObj.valueOf()\n```\n\n### Return value\n\nA BigInt representing the primitive value of the specified `BigInt` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/BigInt64Array/BigInt64Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt64Array()\n\nThe **`BigInt64Array()`** typed array constructor creates a\nnew `BigInt64Array` object, which is, an array of 64-bit signed integers\nin the platform byte order. If control over byte order is needed, use\n[`DataView`](../DataView/DataView.mdx) instead. The contents are initialized to `0n`. Once\nestablished, you can reference elements in the array using the object's methods, or by\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew BigInt64Array()\nnew BigInt64Array(length)\nnew BigInt64Array(typedArray)\nnew BigInt64Array(object)\n\nnew BigInt64Array(buffer)\nnew BigInt64Array(buffer, byteOffset)\nnew BigInt64Array(buffer, byteOffset, length)\n```\n\n> **Note:** `BigInt64Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/BigUint64Array/BigUint64Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigUint64Array()\n\nThe **`BigUint64Array()`** typed array constructor creates a\nnew `BigUint64Array` object, which is, an array of 64-bit unsigned integers\nin the platform byte order. If control over byte order is needed, use\n[`DataView`](../DataView/DataView.mdx) instead. The contents are initialized to `0n`. Once\nestablished, you can reference elements in the array using the object's methods, or by\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew BigUint64Array()\nnew BigUint64Array(length)\nnew BigUint64Array(typedArray)\nnew BigUint64Array(object)\n\nnew BigUint64Array(buffer)\nnew BigUint64Array(buffer, byteOffset)\nnew BigUint64Array(buffer, byteOffset, length)\n```\n\n> **Note:** `BigUint64Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](..//TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Blob/Blob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob()\n\nThe **`Blob()`** constructor creates a `Blob` object, which represents a file-like object of immutable, raw data.\n\n## Syntax\n\n```js\nnew Blob()\nnew Blob(array)\nnew Blob(array, options)\n```\n\n> **Note:** `Blob()` can only be constructed with `new`. Attempting to call it without `new` throws a `TypeError`.\n\n### Parameters\n\n- `array` _**optional**_\n\n  - : An array of values to include in the `Blob`. These can be [`ArrayBuffer`](../../globals/ArrayBuffer/ArrayBuffer.mdx), [`Blob`](../../globals/Blob/Blob.mdx), or strings. If any of these elements is a [`Blob`](../../globals/Blob/Blob.mdx), its content (and not the object itself) is copied into the Blob being constructed.\n\n- `options` _**optional**_\n\n  - : An object containing optional attributes for the `Blob`.\n    - `type`\n      - : A string indicating the MIME type of the data. The default value is the empty string `\"\"`.\n    - `endings`\n      - : A string indicating how to handle line endings in the data. This can be either `\"transparent\"` (default) to keep line endings unchanged, or `\"native\"` to convert line endings to the platform's native line endings (e.g., `\\r\\n` on Windows).\n\n### Return value\n\nA new `Blob` object containing the specified data.\n\n## Description\n\n`Blob` objects represent data that isn't necessarily in a JavaScript-native format. The `File` interface is based on `Blob`, inheriting its functionality and expanding it to support files on the user's system.\n\nTo construct a `Blob` from other non-blob objects and data, use the `Blob()` constructor. To create a blob that contains a subset of another blob's data, use the [`slice()`](../../globals/Blob/prototype/slice.mdx) method.\n\nThe `type` property of a `Blob` object will match the MIME type specified in the constructor's `options` parameter, defaulting to an empty string if not specified.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Blob/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the `Blob` interface returns a `Promise` that resolves with an `ArrayBuffer` containing the entire contents of the `Blob` as binary data.\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with an `ArrayBuffer` containing the blob's data.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Blob/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.size\n\nThe **`size`** read-only property of the `Blob` interface returns the size of the `Blob` in bytes.\n\n## Value\n\nA number representing the size of the `Blob` in bytes.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Blob/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.slice()\n\nThe **`slice()`** method of the `Blob` interface creates and returns a new `Blob` object which contains data from a subset of the blob on which it's called.\n\n## Syntax\n\n```js\nslice()\nslice(start)\nslice(start, end)\nslice(start, end, contentType)\n```\n\n### Parameters\n\n- `start` _**optional**_\n  - : The 0-based index of the first byte to include in the new `Blob`. If negative, it refers to an index from the end of the `Blob`. The default value is 0.\n- `end` _**optional**_\n  - : The 0-based index of the first byte that will not be included in the new `Blob`. If negative, it refers to an index from the end of the `Blob`. The default value is `size`.\n- `contentType` _**optional**_\n  - : A string indicating the content type to assign to the new `Blob`. The default value is an empty string.\n\n### Return value\n\nA new `Blob` object containing the specified subset of data.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Blob/prototype/stream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.stream()\n\nThe **`stream()`** method of the `Blob` interface returns a `ReadableStream` that can be used to read the contents of the `Blob`.\n\n## Syntax\n\n```js\nstream()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `ReadableStream` that provides the data contained within the `Blob`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Blob/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.text()\n\nThe **`text()`** method of the `Blob` interface returns a `Promise` that resolves with a string containing the contents of the blob, interpreted as UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a string containing the blob's data as a text string. The data is always interpreted as UTF-8.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Blob/prototype/type.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.type\n\nThe **`type`** read-only property of the `Blob` interface returns the MIME type of the `Blob`.\n\n## Value\n\nA string indicating the MIME type of the `Blob`. If the type cannot be determined, this returns an empty string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Boolean/Boolean.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Boolean()\n\nThe **`Boolean()`** constructor can create `Boolean` objects or return primitive values of type boolean.\n\n## Syntax\n\n```js\nnew Boolean(value)\nBoolean(value)\n```\n\n> **Note:** `Boolean()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\n- `value`\n  - : The initial value of the `Boolean` object.\n\n### Return value\n\nWhen `Boolean()` is called as a constructor (with `new`), it creates a `Boolean` object, which is **not** a primitive.\n\nWhen `Boolean()` is called as a function (without `new`), it coerces the parameter to a boolean primitive.\n\n> **Warning:** You should rarely find yourself using `Boolean` as a constructor.\n\n## Description\n\nThe value passed as the first parameter is [converted to a boolean value](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean#boolean_coercion). If the value is omitted or is `0`, `-0`, `0n`, [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null), `false`, [`NaN`](../NaN.mdx), [`undefined`](../undefined.mdx), or the empty string (`\"\"`), then the object has an initial value of `false`. All other values, including any object, an empty array (`[]`), or the string `\"false\"`, create an object with an initial value of `true`.\n\n> **Note:** When the non-standard property [`document.all`](https://developer.mozilla.org/docs/Web/API/Document/all) is used as an argument for this constructor, the result is a `Boolean` object with the value `false`. This property is legacy and non-standard and should not be used.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Boolean/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Boolean.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified boolean value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified boolean value.\n\n## Description\n\nThe `Boolean` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../Object/prototype/toString.mdx). For `Boolean` values, the `toString` method returns a string representation of the boolean value, which is either `\"true\"` or `\"false\"`.\n\nThe `toString()` method requires its `this` value to be a `Boolean` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to boolean values.\n\nBecause `Boolean` doesn't have a [`[Symbol.toPrimitive]()`](../../Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `Boolean` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, boolean _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — rather, they are directly converted using the same algorithm as the initial `toString()` implementation.\n\n```js\nBoolean.prototype.toString = () => \"Overridden\";\nconsole.log(`${true}`); // \"true\"\nconsole.log(`${new Boolean(true)}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Boolean/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Boolean.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a\n`Boolean` object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nThe primitive value of the given `Boolean` object.\n\n## Description\n\nThe `valueOf()` method of `Boolean` returns the primitive value\nof a `Boolean` object or literal `Boolean` as a Boolean data type.\n\nThis method is usually called internally by JavaScript and not explicitly in code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/ByteLengthQueuingStrategy/ByteLengthQueuingStrategy.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ByteLengthQueuingStrategy()\n\nThe **`ByteLengthQueuingStrategy()`**\nconstructor creates and returns a `ByteLengthQueuingStrategy` object\ninstance.\n\n## Syntax\n\n```js\nnew ByteLengthQueuingStrategy(highWaterMark)\n```\n\n### Parameters\n\nAn object with the following property:\n\n- `highWaterMark`\n\n  - : The total number of bytes that can be contained in the internal queue before backpressure is applied.\n\n    Unlike `CountQueuingStrategy()` where the `highWaterMark` parameter specifies a simple count of the number of chunks, with `ByteLengthQueuingStrategy()`, the `highWaterMark` parameter specifies a number of _bytes_ — specifically, given a stream of chunks, how many bytes worth of those chunks (rather than a count of how many of those chunks) can be contained in the internal queue before backpressure is applied.\n\n### Return value\n\nAn instance of the `ByteLengthQueuingStrategy` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/ByteLengthQueuingStrategy/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ByteLengthQueuingStrategy.size()\n\nThe **`size()`** method of the\n`ByteLengthQueuingStrategy` interface returns the given chunk's\n`byteLength` property.\n\n## Syntax\n\n```js\nsize(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : A chunk of data being passed through the stream.\n\n### Return value\n\nAn integer representing the byte length of the given chunk.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/CompressionStream/CompressionStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CompressionStream()\n\nThe **`CompressionStream()`** constructor creates a new `CompressionStream` object which compresses a stream of data.\n\n## Syntax\n\n```js\nnew CompressionStream(format)\n```\n\n### Parameters\n\n- `format`\n\n  - : One of the following allowed compression formats:\n\n    - `\"gzip\"`\n    - `\"deflate\"`\n    - `\"deflate-raw\"`\n\n## Exceptions\n\n- `TypeError`\n  - : Thrown if the format passed to the constructor is not supported.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/CompressionStream/prototype/readable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CompressionStream.readable\n\nThe **`readable`** read-only property of the `CompressionStream` interface returns a `ReadableStream`.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/CompressionStream/prototype/writable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CompressionStream.writable\n\nThe **`writable`** read-only property of the `CompressionStream` interface returns a `WritableStream`.\n\n## Value\n\nA `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/CryptoKey/CryptoKey.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CryptoKey\n\nThe **`CryptoKey`** interface represents a cryptographic key obtained from one of the [`SubtleCrypto`](../SubtleCrypto/SubtleCrypto.mdx) method [`importKey()`](../SubtleCrypto/prototype/importKey.mdx).\n\n## Instance properties\n\n- [`type`](./prototype/type.mdx) _**readonly**_\n  - : The type of key the object represents. It may take one of the following values: `\"secret\"`, `\"private\"` or `\"public\"`.\n\n- [`extractable`](./prototype/extractable.mdx) _**readonly**_\n  - : A boolean value indicating whether or not the key may be extracted.\n\n- [`algorithm`](./prototype/algorithm.mdx) _**readonly**_\n  - : An object describing the algorithm for which this key can be used and any associated extra parameters.\n\n- [`usages`](./prototype/usages.mdx) _**readonly**_\n  - : An `Array` of strings, indicating what can be done with the key. Possible values for array elements are `\"encrypt\"`, `\"decrypt\"`, `\"sign\"`, `\"verify\"`, `\"deriveKey\"`, `\"deriveBits\"`, `\"wrapKey\"`, and `\"unwrapKey\"`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/CryptoKey/prototype/algorithm.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# algorithm\n\nThe read-only **`algorithm`** property of the [`CryptoKey`](../CryptoKey.mdx) interface returns an object describing the algorithm for which this key can be used, and any associated extra parameters.\n\nThe object returned depends of the algorithm used to generate the key.\n\n## Value\n\nAn object matching:\n\n- [`RsaHashedImportParams`](../../RsaHashedImportParams/RsaHashedImportParams.mdx) if the algorithm is any of the RSA variants.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/CryptoKey/prototype/extractable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# extractable\n\nThe read-only **`extractable`** property indicates whether or not the key may be extracted.\n\nIf the key cannot be exported, an exception will be thrown if an attempt to extract the key is made.\n\n## Value\n\nA boolean value that is `true` if the key can be exported and `false` if not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/CryptoKey/prototype/type.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# type\n\nThe read-only **`type`** property indicates which kind of key is represented by the object. It can have the following values:\n\n- `\"secret\"`: This key is a secret key for use with a symmetric algorithm.\n- `\"private\"`: This key is the private half of an asymmetric algorithm's key pair.\n- `\"public\"`: This key is the public half of an asymmetric algorithm's key pair.\n\n## Value\n\nOne of the following strings: `\"secret\"`, `\"private\"`, or `\"public\"`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/CryptoKey/prototype/usages.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# usages\n\nThe read-only **`usages`** property indicates what can be done with the key.\n\n## Value\n\nAn `Array` of strings from the following list:\n\n- `\"encrypt\"`: The key may be used to encrypt messages.\n- `\"decrypt\"`: The key may be used to decrypt messages.\n- `\"sign\"`: The key may be used to sign messages.\n- `\"verify\"`: The key may be used to verify signatures.\n- `\"deriveKey\"`: The key may be used in deriving a new key.\n- `\"deriveBits\"`: The key may be used in deriving bits.\n- `\"wrapKey\"`: The key may be used to wrap a key.\n- `\"unwrapKey\"`: The key may be used to unwrap a key.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/DOMException/DOMException.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException()\n\nThe **`DOMException()`** constructor returns a `DOMException` object with a specified message and name.\n\n## Syntax\n\n```js\nnew DOMException()\nnew DOMException(message)\nnew DOMException(message, name)\n```\n\n### Parameters\n\n- `message` _optional_\n  - : A description of the exception. If not present, the empty string `''` is\n    used.\n- `name` _optional_\n  - : A string. If the specified name is a [standard error name](#error-names), then getting the [`code`](./code.mdx) property of the `DOMException` object will return the code number corresponding to the specified name.\n\n### Return value\n\nA newly created `DOMException` object.\n\n## Error names\n\nCommon error names are listed here. Some APIs define their own sets of names, so this is not necessarily a complete list.\n\nNote that the following deprecated historical errors don't have an error name but instead have only a legacy constant code value and a legacy constant name:\n\n- Legacy code value: `2`, legacy constant name: `DOMSTRING_SIZE_ERR`\n- Legacy code value: `6`, legacy constant name: `NO_DATA_ALLOWED_ERR`\n- Legacy code value: `16`, legacy constant name: `VALIDATION_ERR`\n\n> **Note:** Because historically the errors were identified by a numeric value that corresponded with a named variable defined to have that value, some of the entries below indicate the legacy code value and constant name that were used in the past.\n\n- `IndexSizeError`\n  - : The index is not in the allowed range. (Legacy code value: `1` and legacy constant name: `INDEX_SIZE_ERR`)\n- `HierarchyRequestError`\n  - : The node tree hierarchy is not correct. (Legacy code value: `3` and legacy constant name: `HIERARCHY_REQUEST_ERR`)\n- `WrongDocumentError`\n  - : The object is in the wrong `Document`. (Legacy code value: `4` and legacy constant name: `WRONG_DOCUMENT_ERR`)\n- `InvalidCharacterError`\n  - : The string contains invalid characters. (Legacy code value: `5` and legacy constant name: `INVALID_CHARACTER_ERR`)\n- `NoModificationAllowedError`\n  - : The object cannot be modified. (Legacy code value: `7` and legacy constant name: `NO_MODIFICATION_ALLOWED_ERR`)\n- `NotFoundError`\n  - : The object cannot be found here. (Legacy code value: `8` and legacy constant name: `NOT_FOUND_ERR`)\n- `NotSupportedError`\n  - : The operation is not supported. (Legacy code value: `9` and legacy constant name: `NOT_SUPPORTED_ERR`)\n- `InvalidStateError`\n  - : The object is in an invalid state. (Legacy code value: `11` and legacy constant name: `INVALID_STATE_ERR`)\n- `InUseAttributeError`\n  - : The attribute is in use. (Legacy code value: `10` and legacy constant name: `INUSE_ATTRIBUTE_ERR`)\n- `SyntaxError`\n  - : The string did not match the expected pattern. (Legacy code value: `12` and legacy constant name: `SYNTAX_ERR`)\n- `InvalidModificationError`\n  - : The object cannot be modified in this way. (Legacy code value: `13` and legacy constant name: `INVALID_MODIFICATION_ERR`)\n- `NamespaceError`\n  - : The operation is not allowed by Namespaces in XML. (Legacy code value: `14` and legacy constant name: `NAMESPACE_ERR`)\n- `InvalidAccessError`\n  - : The object does not support the operation or argument. (Legacy code value: `15` and legacy constant name: `INVALID_ACCESS_ERR`)\n- `TypeMismatchError` *deprecated*\n  - : The type of the object does not match the expected type. (Legacy code value: `17` and legacy constant name: `TYPE_MISMATCH_ERR`) This value is deprecated; the JavaScript `TypeError` exception is now raised instead of a `DOMException` with this value.\n- `SecurityError`\n  - : The operation is insecure. (Legacy code value: `18` and legacy constant name: `SECURITY_ERR`)\n- `NetworkError`\n  - : A network error occurred. (Legacy code value: `19` and legacy constant name: `NETWORK_ERR`)\n- `AbortError`\n  - : The operation was aborted. (Legacy code value: `20` and legacy constant name: `ABORT_ERR`)\n- `URLMismatchError`\n  - : The given URL does not match another URL. (Legacy code value: `21` and legacy constant name: `URL_MISMATCH_ERR`)\n- `QuotaExceededError`\n  - : The quota has been exceeded. (Legacy code value: `22` and legacy constant name: `QUOTA_EXCEEDED_ERR`)\n- `TimeoutError`\n  - : The operation timed out. (Legacy code value: `23` and legacy constant name: `TIMEOUT_ERR`)\n- `InvalidNodeTypeError`\n  - : The node is incorrect or has an incorrect ancestor for this operation. (Legacy code value: `24` and legacy constant name: `INVALID_NODE_TYPE_ERR`)\n- `DataCloneError`\n  - : The object can not be cloned. (Legacy code value: `25` and legacy constant name: `DATA_CLONE_ERR`)\n- `EncodingError`\n  - : The encoding or decoding operation failed (No legacy code value and constant name).\n- `NotReadableError`\n  - : The input/output read operation failed (No legacy code value and constant name).\n- `UnknownError`\n  - : The operation failed for an unknown transient reason (e.g. out of memory) (No legacy code value and constant name).\n- `ConstraintError`\n  - : A mutation operation in a transaction failed because a constraint was not satisfied (No legacy code value and constant name).\n- `DataError`\n  - : Provided data is inadequate (No legacy code value and constant name).\n- `TransactionInactiveError`\n  - : A request was placed against a transaction that is currently not active or is finished (No legacy code value and constant name).\n- `ReadOnlyError`\n  - : The mutating operation was attempted in a \"readonly\" transaction (No legacy code value and constant name).\n- `VersionError`\n  - : An attempt was made to open a database using a lower version than the existing version (No legacy code value and constant name).\n- `OperationError`\n  - : The operation failed for an operation-specific reason (No legacy code value and constant name).\n- `NotAllowedError`\n  - : The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission (No legacy code value and constant name)."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/DOMException/code.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException.prototype.code\n\nThe **`code`** read-only property of the `DOMException` interface returns one of the legacy [error code constants](./DOMException.mdx#error-names), or `0` if none match.\n\nThis field is used for historical reasons. New DOM exceptions don't use this anymore: they put this info in the [`name`](./name.mdx) attribute.\n\n## Value\n\nOne of the [error code constants](./DOMException.mdx#error-names), or `0` if none match.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/DOMException/message.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException.prototype.message\n\nThe **`message`** read-only property of the `DOMException` interface returns a string representing a message or description associated with the given [error name](./DOMException.mdx#error-names).\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/DOMException/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException.prototype.name\n\nThe **`name`** read-only property of the `DOMException` interface returns a string that contains one of the strings associated with an [error name](./DOMException.mdx#error-names).\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/DataView/DataView.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView()\n\nThe **`DataView()`** constructor is used to create `DataView` objects.\n\n## Syntax\n\n```js\nnew DataView(buffer)\nnew DataView(buffer, byteOffset)\nnew DataView(buffer, byteOffset, byteLength)\n```\n\n> **Note:** `DataView()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `buffer`\n  - : An existing `ArrayBuffer` to use as\n    the storage backing the new `DataView` object.\n- `byteOffset` _**optional**_\n  - : The offset, in bytes, to the first byte in the above buffer for the new view to\n    reference. If unspecified, the buffer view starts with the first byte.\n- `byteLength` _**optional**_\n  - : The number of elements in the byte array. If unspecified, the view's length will\n    match the buffer's length.\n\n### Return value\n\nA new `DataView` object representing the specified data buffer.\n\n### Exceptions\n\n- [`RangeError`](../RangeError/RangeError.mdx)\n\n  - : Thrown if the `byteOffset` or `byteLength` parameter values\n    result in the view extending past the end of the buffer.\n\n    For example, if the buffer is 16 bytes long, the `byteOffset` is 8, and\n    the `byteLength` is 10, this error is thrown because the resulting view\n    tries to extend 2 bytes past the total length of the buffer.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/DataView/prototype/buffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.buffer\n\nThe **`buffer`** accessor property represents the `ArrayBuffer` referenced by the `DataView` at construction time.\n\n## Description\n\nThe `buffer` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when the `DataView` is constructed and cannot be changed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/DataView/prototype/byteLength.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.byteLength\n\nThe **`byteLength`** accessor property represents the length (in bytes) of the dataview.\n\n## Description\n\nThe `byteLength` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when an `DataView` is constructed and cannot be changed. If the `DataView` is not specifying an offset or a `byteLength`, the `byteLength` of the referenced `ArrayBuffer` or `SharedArrayBuffer` will be returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/DataView/prototype/byteOffset.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.byteOffset\n\nThe **`byteOffset`** accessor property represents the offset (in bytes) of this view from the start of its `ArrayBuffer`.\n\n## Description\n\nThe `byteOffset` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when an `DataView` is constructed and cannot be changed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/DataView/prototype/getBigInt64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getBigInt64()\n\nThe **`getBigInt64()`** method gets a signed 64-bit integer\n(long long) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetBigInt64(byteOffset)\ngetBigInt64(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to read the data from.\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is read.\n\n### Return value\n\nA `BigInt`.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would read beyond the end\n    of the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/DataView/prototype/getBigUint64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getBigUint64()\n\nThe **`getBigUint64()`** method gets an unsigned 64-bit integer\n(unsigned long long) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetBigUint64(byteOffset)\ngetBigUint64(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to read the data from.\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is read.\n\n### Return value\n\nA `BigInt`.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would read beyond the end\n    of the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/DataView/prototype/getFloat32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getFloat32()\n\nThe **`getFloat32()`** method gets a signed 32-bit float\n(float) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetFloat32(byteOffset)\ngetFloat32(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 32-bit float number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/DataView/prototype/getFloat64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getFloat64()\n\nThe **`getFloat64()`** method gets a signed 64-bit float\n(double) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetFloat64(byteOffset)\ngetFloat64(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 64-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 64-bit float number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/DataView/prototype/getInt16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getInt16()\n\nThe **`getInt16()`** method gets a signed 16-bit integer\n(short) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetInt16(byteOffset)\ngetInt16(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 16-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/DataView/prototype/getInt32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getInt32()\n\nThe **`getInt32()`** method gets a signed 32-bit integer (long)\nat the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetInt32(byteOffset)\ngetInt32(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in bytes, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 32-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/DataView/prototype/getInt8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getInt8()\n\nThe **`getInt8()`** method gets a signed 8-bit integer (byte)\nat the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetInt8(byteOffset)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n\n### Return value\n\nA signed 8-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/DataView/prototype/getUint16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getUint16()\n\nThe **`getUint16()`** method gets an unsigned 16-bit integer\n(unsigned short) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n\n\n## Syntax\n\n```js\ngetUint16(byteOffset)\ngetUint16(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nAn unsigned 16-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/DataView/prototype/getUint32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getUint32()\n\nThe **`getUint32()`** method gets an unsigned 32-bit integer\n(unsigned long) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n\n\n## Syntax\n\n```js\ngetUint32(byteOffset)\ngetUint32(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nAn unsigned 32-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/DataView/prototype/getUint8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getUint8()\n\nThe **`getUint8()`** method gets an unsigned 8-bit integer\n(unsigned byte) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetUint8(byteOffset)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n\n### Return value\n\nAn unsigned 8-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/DataView/prototype/setBigInt64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setBigInt64()\n\nThe **`setBigInt64()`** method stores a signed 64-bit integer\n(long long) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetBigInt64(byteOffset, value)\nsetBigInt64(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to store the data from.\n- value\n  - : The value to set as a `BigInt`. The highest possible value that fits in\n    a signed 64-bit integer is\n    `2n ** (64n -1n) - 1n` (`9223372036854775807n`). Upon\n    overflow, it will be negative (`-9223372036854775808n`).\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/DataView/prototype/setBigUint64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setBigUint64()\n\nThe **`setBigUint64()`** method stores an unsigned 64-bit\ninteger (unsigned long long) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetBigUint64(byteOffset, value)\nsetBigUint64(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to store the data from.\n- value\n  - : The value to set as a `BigInt`. The highest possible value that fits in\n    an unsigned 64-bit integer is\n    `2n ** 64n - 1n`\n    (`18446744073709551615n`). Upon overflow, it will be zero\n    (`0n`).\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/DataView/prototype/setFloat32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setFloat32()\n\nThe **`setFloat32()`** method stores a signed 32-bit float\n(float) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetFloat32(byteOffset, value)\nsetFloat32(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/DataView/prototype/setFloat64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setFloat64()\n\nThe **`setFloat64()`** method stores a signed 64-bit float\n(double) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetFloat64(byteOffset, value)\nsetFloat64(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 64-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/DataView/prototype/setInt16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setInt16()\n\nThe **`setInt16()`** method stores a signed 16-bit integer\n(short) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetInt16(byteOffset, value)\nsetInt16(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/DataView/prototype/setInt32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setInt32()\n\nThe **`setInt32()`** method stores a signed 32-bit integer\n(long) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetInt32(byteOffset, value)\nsetInt32(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/DataView/prototype/setInt8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setInt8()\n\nThe **`setInt8()`** method stores a signed 8-bit integer (byte)\nvalue at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetInt8(byteOffset, value)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/DataView/prototype/setUint16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setUint16()\n\nThe **`setUint16()`** method stores an unsigned 16-bit integer\n(unsigned short) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetUint16(byteOffset, value)\nsetUint16(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/DataView/prototype/setUint32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setUint32()\n\nThe **`setUint32()`** method stores an unsigned 32-bit integer\n(unsigned long) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetUint32(byteOffset, value)\nsetUint32(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/DataView/prototype/setUint8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setUint8()\n\nThe **`setUint8()`** method stores an unsigned 8-bit integer\n(byte) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetUint8(byteOffset, value)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/Date.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date()\n\nThe **`Date()`** constructor can create a `Date` instance or return a string representing the current time.\n\n## Syntax\n\n```js\nnew Date()\nnew Date(value)\nnew Date(dateString)\nnew Date(dateObject)\n\nnew Date(year, monthIndex)\nnew Date(year, monthIndex, day)\nnew Date(year, monthIndex, day, hours)\nnew Date(year, monthIndex, day, hours, minutes)\nnew Date(year, monthIndex, day, hours, minutes, seconds)\nnew Date(year, monthIndex, day, hours, minutes, seconds, milliseconds)\n\nDate()\n```\n\n> **Note:** `Date()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\nThere are five basic forms for the `Date()` constructor:\n\n#### No parameters\n\nWhen no parameters are provided, the newly-created `Date` object represents the current date and time as of the time of instantiation.\n\n#### Time value or timestamp number\n\n- `value`\n  - : An integer value representing the number of milliseconds since January 1, 1970, 00:00:00 UTC (the ECMAScript epoch, equivalent to the UNIX epoch), with leap seconds ignored. Keep in mind that most [UNIX Timestamp](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_16) functions are only accurate to the nearest second.\n\n#### Date string\n\n- `dateString`\n\n  - : A string value representing a date, in a format recognized by the [`Date.parse()`](./parse.mdx) method. (The ECMA262 spec specifies a [simplified version of ISO 8601](https://tc39.es/ecma262/#sec-date-time-string-format), but other formats can be implementation-defined, which commonly include [IETF-compliant RFC 2822 timestamps](https://datatracker.ietf.org/doc/html/rfc2822#page-14).)\n\n    > **Note:** When parsing date strings with the `Date` constructor (and `Date.parse`, they are equivalent), always make sure that the input conforms to the ISO 8601 format (`YYYY-MM-DDTHH:mm:ss.sssZ`) — the parsing behavior with other formats is implementation-defined and may not work across all browsers. Support for [RFC 2822](https://datatracker.ietf.org/doc/html/rfc2822) format strings is by convention only. A library can help if many different formats are to be accommodated.\n    >\n    > Date-only strings (e.g. `\"1970-01-01\"`) are treated as UTC, while date-time strings (e.g. `\"1970-01-01T12:00\"`) are treated as local. You are therefore also advised to make sure the input format is consistent between the two types.\n\n#### Date object\n\n- `dateObject`\n  - : An existing `Date` object. This effectively makes a copy of the existing `Date` object with the same date and time. This is equivalent to `new Date(dateObject.valueOf())`, except the `valueOf()` method is not called.\n\nWhen one parameter is passed to the `Date()` constructor, `Date` instances are specially treated. All other values are [converted to primitives](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion). If the result is a string, it will be parsed as a date string. Otherwise, the resulting primitive is further coerced to a number and treated as a timestamp.\n\n#### Individual date and time component values\n\nGiven at least a year and month, this form of `Date()` returns a `Date` object whose component values (year, month, day, hour, minute, second, and millisecond) all come from the following parameters. Any missing fields are given the lowest possible value (`1` for `day` and `0` for every other component). The parameter values are all evaluated against the local time zone, rather than UTC.\n\nIf any parameter overflows its defined bounds, it \"carries over\". For example, if a `monthIndex` greater than `11` is passed in, those months will cause the year to increment; if a `minutes` greater than `59` is passed in, `hours` will increment accordingly, etc. Therefore, `new Date(1990, 12, 1)` will return January 1st, 1991; `new Date(2020, 5, 19, 25, 65)` will return 2:05 A.M. June 20th, 2020.\n\nSimilarly, if any parameter underflows, it \"borrows\" from the higher positions. For example, `new Date(2020, 5, 0)` will return May 31st, 2020.\n\n- `year`\n  - : Integer value representing the year. Values from `0` to `99` map to the years `1900` to `1999`. All other values are the actual year. See the [example](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years).\n- `monthIndex`\n  - : Integer value representing the month, beginning with `0` for January to `11` for December.\n- `day` _**optional**_\n  - : Integer value representing the day of the month. The default is `1`.\n- `hours` _**optional**_\n  - : Integer value between `0` and `23` representing the hour of the day. Defaults to `0`.\n- `minutes` _**optional**_\n  - : Integer value representing the minute segment of a time. The default is `0` minutes past the hour.\n- `seconds` _**optional**_\n  - : Integer value representing the second segment of a time. The default is `0` seconds past the minute.\n- `milliseconds` _**optional**_\n  - : Integer value representing the millisecond segment of a time. The default is `0` milliseconds past the second.\n\n### Return value\n\nCalling `new Date()` (the `Date()` constructor) returns a [`Date`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date) object. If called with an invalid date string, or if the date to be constructed will have a UNIX timestamp less than `-8,640,000,000,000,000` or greater than `8,640,000,000,000,000` milliseconds, it returns a `Date` object whose [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toString) method returns the literal string `Invalid Date`.\n\nCalling the `Date()` function (without the `new` keyword) returns a string representation of the current date and time, exactly as `new Date().toString()` does. Any arguments given in a `Date()` function call (without the `new` keyword) are ignored; regardless of whether it's called with an invalid date string — or even called with any arbitrary object or other primitive as an argument — it always returns a string representation of the current date and time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/UTC.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.UTC()\n\nThe **`Date.UTC()`** method accepts parameters similar to the\n`Date` constructor, but treats them as UTC. It returns the number of\nmilliseconds since January 1, 1970, 00:00:00 UTC.\n\n\n\n## Syntax\n\n```js\nDate.UTC(year)\nDate.UTC(year, monthIndex)\nDate.UTC(year, monthIndex, day)\nDate.UTC(year, monthIndex, day, hour)\nDate.UTC(year, monthIndex, day, hour, minute)\nDate.UTC(year, monthIndex, day, hour, minute, second)\nDate.UTC(year, monthIndex, day, hour, minute, second, millisecond)\n```\n\n- `year`\n\n  - : Integer value representing the year.\n\n    Values from `0` to `99` map to the years\n    `1900` to `1999`. All other values are the actual year.\n    See the [example](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years).\n\n- `monthIndex` _**optional**_\n  - : An integer between `0` (January) and `11` (December)\n    representing the month. Since ECMAScript 2017 it defaults to `0` if\n    omitted. _(Up until ECMAScript 2016, `monthIndex` was a required\n    parameter. As of ES2017, it no longer is.)_\n- `day` _**optional**_\n  - : An integer between `1` and `31` representing the day of the\n    month. If omitted, defaults to `1`.\n- `hour` _**optional**_\n  - : An integer between `0` and `23` representing the hours. If\n    omitted, defaults to `0`.\n- `minute` _**optional**_\n  - : An integer between `0` and `59` representing the minutes. If\n    omitted, defaults to `0`.\n- `second` _**optional**_\n  - : An integer between `0` and `59` representing the seconds. If\n    omitted, defaults to `0`.\n- `millisecond` _**optional**_\n  - : An integer between `0` and `999` representing the\n    milliseconds. If omitted, defaults to `0`.\n\n### Return value\n\nA number representing the number of milliseconds for the given date since January 1,\n1970, 00:00:00, UTC.\n\n## Description\n\n`UTC()` takes comma-delimited date and time parameters and returns the\nnumber of milliseconds between January 1, 1970, 00:00:00, universal time and the\nspecified date and time.\n\nYears between `0` and `99` are converted to a year in the\n20th century `(1900 + year)`. For example, `95` is\nconverted to the year `1995`.\n\nThe `UTC()` method differs from the `Date` constructor in two\nways:\n\n1. `Date.UTC()` uses universal time instead of the local time.\n2. `Date.UTC()` returns a time value as a number instead of creating a\n   `Date` object.\n\nIf a parameter is outside of the expected range, the `UTC()` method updates\nthe other parameters to accommodate the value. For example, if `15` is used\nfor `monthIndex`, the year will be incremented by 1\n`(year + 1)` and `3` will be used for the month.\n\n`UTC()` is a static method of `Date`, so it's called as\n`Date.UTC()` rather than as a method of a `Date` instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/now.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.now()\n\nThe static **`Date.now()`** method returns the number of milliseconds elapsed since the [epoch](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps), which is defined as the midnight at the beginning of January 1, 1970, UTC.\n\n## Syntax\n\n```js\nDate.now()\n```\n\n### Return value\n\nA number representing the number of milliseconds elapsed since the [epoch](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps), which is defined as the midnight at the beginning of January 1, 1970, UTC.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/parse.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.parse()\n\nThe **`Date.parse()`** method parses a string representation of\na date, and returns the number of milliseconds since January 1, 1970, 00:00:00 UTC or\n`NaN` if the string is unrecognized or, in some cases, contains illegal date\nvalues (e.g. 2015-02-31).\n\nOnly the [ISO 8601 format](https://tc39.es/ecma262/#sec-date-time-string-format) (`YYYY-MM-DDTHH:mm:ss.sssZ`) is explicitly specified to be supported. Other formats are implementation-defined and may not work across all browsers. A library can help if many different formats are to be accommodated.\n\n## Syntax\n\n```js\nDate.parse(dateString)\n```\n\n### Parameters\n\n- `dateString`\n  - : A string representing [a simplification of the ISO 8601 calendar date extended format](#date-time-string-format).\n    (Other formats may be used, but results are implementation-dependent.)\n\n### Return value\n\nA number representing the milliseconds elapsed since January 1, 1970, 00:00:00 UTC and\nthe date obtained by parsing the given string representation of a date. If the argument\ndoesn't represent a valid date, [`NaN`](../NaN.mdx) is returned.\n\n## Description\n\nThe `parse()` method takes a date string (such as\n`\"2011-10-10T14:48:00\"`) and returns the number of milliseconds since January\n1, 1970, 00:00:00 UTC.\n\nThis function is useful for setting date values based on string values, for example in\nconjunction with the [`setTime()`](./prototype/setTime.mdx) method and the\n`Date` object.\n\n### Date Time String Format\n\nThe standard string representation of a date time string is a simplification of the ISO\n8601 calendar date extended format.\n(See the section [Date Time String Format](https://tc39.es/ecma262/#sec-date-time-string-format)\nin the ECMAScript specification for more details.)\n\nFor example, `\"2011-10-10\"` (_date-only_ form),\n`\"2011-10-10T14:48:00\"` (_date-time_ form), or\n`\"2011-10-10T14:48:00.000+09:00\"` (_date-time_ form with milliseconds\nand time zone) can be passed and will be parsed. When the time zone offset is absent,\ndate-only forms are interpreted as a UTC time and date-time forms are interpreted as\nlocal time.\n\nWhile time zone specifiers are used during date string parsing to interpret the\nargument, the value returned is always the number of milliseconds between January 1,\n1970 00:00:00 UTC and the point in time represented by the argument or `NaN`.\n\nBecause `parse()` is a static method of `Date`, it is called as\n`Date.parse()` rather than as a method of a `Date` instance.\n\n### Fall-back to implementation-specific date formats\n\n> **Note:** This section contains implementation-specific behavior that can be inconsistent\n> across implementations.\n\nThe ECMAScript specification states: If the String does not conform to the standard\nformat the function may fall back to any implementation–specific heuristics or\nimplementation–specific parsing algorithm. Unrecognizable strings or dates containing\nillegal element values in ISO formatted strings shall cause `Date.parse()` to\nreturn [`NaN`](../NaN.mdx).\n\nHowever, invalid values in date strings not recognized as simplified ISO format as\ndefined by ECMA-262 may or may not result in [`NaN`](../NaN.mdx), depending on the browser\nand values provided, e.g.:\n\n```js\n// Non-ISO string with invalid date values\nnew Date(\"23/25/2014\");\n```\n\nwill be treated as a local date of 25 November, 2015 in Firefox 30 and an invalid date\nin Safari 7.\n\nHowever, if the string is recognized as an ISO format string and it contains invalid\nvalues, it will return [`NaN`](../NaN.mdx):\n\n```js\n// ISO string with invalid values\nnew Date(\"2014-25-23\").toISOString();\n// throws \"RangeError: invalid date\"\n```\n\nSpiderMonkey's implementation-specific heuristic can be found in [`jsdate.cpp`](https://searchfox.org/mozilla-central/source/js/src/jsdate.cpp?rev=64553c483cd1#889).\nThe string `\"10 06 2014\"` is an example of a non-conforming ISO format and\nthus falls back to a custom routine. See also this [rough outline](https://bugzilla.mozilla.org/show_bug.cgi?id=1023155#c6) on\nhow the parsing works.\n\n```js\nnew Date(\"10 06 2014\");\n```\n\nwill be treated as a local date of 6 October, 2014, and not 10 June, 2014.\n\nOther examples:\n\n```js\nnew Date(\"foo-bar 2014\").toString();\n// returns: \"Invalid Date\"\n\nDate.parse(\"foo-bar 2014\");\n// returns: NaN\n```\n\n### Differences in assumed time zone\n\n> **Note:** This section contains implementation-specific behavior that can be inconsistent\n> across implementations.\n\nGiven a non-standard date string of `\"March 7, 2014\"`, `parse()` assumes a local time zone, but given a simplification of the ISO 8601 calendar date extended format such as `\"2014-03-07\"`, it will assume a time zone of UTC. Therefore `Date` objects produced using those strings may represent different moments in time depending on the version of ECMAScript supported unless the system is set with a local time zone of UTC. This means that two date strings that appear equivalent may result in two different values depending on the format of the string that is being converted.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/@@toPrimitive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype\\[Symbol.toPrimitive]\n\nThe **`[Symbol.toPrimitive]()`** method converts a `Date`\nobject to a primitive value.\n\n## Syntax\n\n```js\nDate()[Symbol.toPrimitive](hint)\n```\n\n### Return value\n\nThe primitive value of the given `Date` object. Depending on the argument,\nthe method can return either a string or a number.\n\n## Description\n\nThe `[Symbol.toPrimitive]()` method of the `Date` object returns a\nprimitive value, that is either of type number or of type string.\n\nIf `hint` is `string` or `default`,\n`[Symbol.toPrimitive]()` tries to call the [`toString`](../../Object/prototype/toString.mdx) method. If the `toString` property does not exist, it tries to\ncall the [`valueOf`](../../Object/prototype/valueOf.mdx) method and if the\n`valueOf` does not exist either, `[Symbol.toPrimitive]()` throws a\n[`TypeError`](../../../globals/TypeError/TypeError.mdx).\n\nIf `hint` is `number`, `[Symbol.toPrimitive]()` first tries\nto call `valueOf`, and if that fails, it calls `toString`.\n\nJavaScript calls the `[Symbol.toPrimitive]()` method to convert an object to a\nprimitive value. You rarely need to invoke the `[Symbol.toPrimitive]()` method\nyourself; JavaScript automatically invokes it when encountering an object where a\nprimitive value is expected.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/getDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getDate()\n\nThe **`getDate()`** method returns the day of the month for the\nspecified date according to local time.\n\n## Syntax\n\n```js\ngetDate()\n```\n\n### Return value\n\nAn integer number, between 1 and 31, representing the day of the month for the given\ndate according to local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/getDay.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getDay()\n\nThe **`getDay()`** method returns the\nday of the week for the specified date according to local time, where 0 represents\nSunday. For the day of the month, see [`Date.prototype.getDate()`](./getDate.mdx).\n\n## Syntax\n\n```js\ngetDay()\n```\n\n### Return value\n\nAn integer number, between 0 and 6, corresponding to the day of the week for the given\ndate, according to local time: 0 for Sunday, 1 for Monday, 2 for Tuesday, and so on.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/getFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getFullYear()\n\nThe **`getFullYear()`** method returns the year of the\nspecified date according to local time.\n\nUse this method instead of the [`Date.prototype.getYear()`](./getYear.mdx) method.\n\n## Syntax\n\n```js\ngetFullYear()\n```\n\n### Return value\n\nA number corresponding to the year of the given date, according to local time.\n\n## Description\n\nThe value returned by `getFullYear()` is an absolute number. For dates\nbetween the years 1000 and 9999, `getFullYear()` returns a four-digit number,\nfor example, 1995. Use this function to make sure a year is compliant with years after\n2000\\.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/getHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getHours()\n\nThe **`getHours()`** method returns the hour for the specified\ndate, according to local time.\n\n## Syntax\n\n```js\ngetHours()\n```\n\n### Return value\n\nAn integer number, between 0 and 23, representing the hour for the given date according\nto local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/getMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getMilliseconds()\n\nThe **`getMilliseconds()`** method returns the milliseconds in\nthe specified date according to local time.\n\n## Syntax\n\n```js\ngetMilliseconds()\n```\n\n### Return value\n\nA number, between 0 and 999, representing the milliseconds for the given date according\nto local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/getMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getMinutes()\n\nThe **`getMinutes()`** method returns the minutes in the\nspecified date according to local time.\n\n## Syntax\n\n```js\ngetMinutes()\n```\n\n### Return value\n\nAn integer number, between 0 and 59, representing the minutes in the given date\naccording to local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/getMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getMonth()\n\nThe **`getMonth()`** method returns the month in the specified\ndate according to local time, as a zero-based value (where zero indicates the first\nmonth of the year).\n\n## Syntax\n\n```js\ngetMonth()\n```\n\n### Return value\n\nAn integer number, between 0 and 11, representing the month in the given date according\nto local time. 0 corresponds to January, 1 to February, and so on.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/getSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getSeconds()\n\nThe **`getSeconds()`** method returns the seconds in the\nspecified date according to local time.\n\n## Syntax\n\n```js\ngetSeconds()\n```\n\n### Return value\n\nAn integer number, between 0 and 59, representing the seconds in the given date\naccording to local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/getTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getTime()\n\nThe **`getTime()`** method returns the number of milliseconds since the [epoch](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps), which is defined as the midnight at the beginning of January 1, 1970, UTC.\n\nYou can use this method to help assign a date and time to another `Date`\nobject. This method is functionally equivalent to the [`Date.prototype.valueOf()`](./valueOf.mdx) method.\n\n## Syntax\n\n```js\ngetTime()\n```\n\n### Return value\n\nA number representing the milliseconds elapsed between 1 January 1970 00:00:00 UTC and\nthe given date.\n\n## Description\n\nTo offer protection against timing attacks and fingerprinting, the precision of\n`new Date().getTime()` might get rounded depending on browser settings.\n\n```js\n// reduced time precision (2ms) in Firefox 60\nnew Date().getTime();\n// 1519211809934\n// 1519211810362\n// 1519211811670\n// …\n\n// reduced time precision with `privacy.resistFingerprinting` enabled\nnew Date().getTime();\n// 1519129853500\n// 1519129858900\n// 1519129864400\n// …\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/getTimezoneOffset.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getTimezoneOffset()\n\nThe **`getTimezoneOffset()`** method returns the difference, in minutes, between a date as evaluated in the UTC time zone, and the same date as evaluated in the local time zone.\n\n## Syntax\n\n```js\ngetTimezoneOffset()\n```\n\n### Return value\n\nThe difference, in minutes, between the date as evaluated in the UTC time zone and as evaluated in the local time zone. The actual local time algorithm is implementation-defined, and the return value is allowed to be zero in runtimes without appropriate data.\n\n## Description\n\n`date.getTimezoneOffset()` returns the difference, in minutes, between `date` as evaluated in the UTC time zone and as evaluated in the local time zone — that is, the time zone of the host system in which the browser is being used (if the code is run from the Web in a browser), or otherwise the host system of whatever JavaScript runtime (for example, a Node.js environment) the code is executed in.\n\n### Negative values and positive values\n\nThe number of minutes returned by `getTimezoneOffset()` is positive if the local time zone is behind UTC, and negative if the local time zone is ahead of UTC. For example, for UTC+10, `-600` will be returned.\n\n| Current time zone | Return value |\n| ----------------- | ------------ |\n| UTC-8             | 480          |\n| UTC               | 0            |\n| UTC+3             | -180         |\n\n### Varied results in Daylight Saving Time (DST) regions\n\nIn a region that annually shifts in and out of Daylight Saving Time (DST), as `date` varies, the number of minutes returned by calling `getTimezoneOffset()` can be non-uniform.\n\n> **Note:** `getTimezoneOffset()`'s behavior will never differ based on the time when the code is run — its behavior is always consistent when running in the same region. Only the value of `date` affects the result.\n\nIn most implementations, the [IANA time zone database](https://en.wikipedia.org/wiki/Daylight_saving_time#IANA_time_zone_database) (tzdata) is used to precisely determine the offset of the local timezone at the moment of the `date`. However, if such information is unavailable, an implementation may return zero.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/getUTCDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCDate()\n\nThe **`getUTCDate()`** method returns the day of the month (from\n1 to 31) in the specified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCDate()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer number ranging from 1 to 31\nrepresenting day of month for the given date, according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/getUTCDay.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCDay()\n\nThe **`getUTCDay()`** method returns the day of the week in the\nspecified date according to universal time, where 0 represents Sunday.\n\n## Syntax\n\n```js\ngetUTCDay()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer number corresponding to the day\nof the week for the given date, according to universal time: 0 for Sunday, 1 for Monday,\n2 for Tuesday, and so on.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/getUTCFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCFullYear()\n\nThe **`getUTCFullYear()`** method returns the year in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCFullYear()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer representing the year in the given date\naccording to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n\n## Description\n\nThe value returned by `getUTCFullYear()` is an absolute number that is\ncompliant with year-2000, for example, 1995.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/getUTCHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCHours()\n\nThe **`getUTCHours()`** method returns the hours in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCHours()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 23, representing the hours in the given date according\nto Coordinated Universal Time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/getUTCMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCMilliseconds()\n\nThe **`getUTCMilliseconds()`** method returns the milliseconds\nportion of the time object's value according to universal time.\n\n## Syntax\n\n```js\ngetUTCMilliseconds()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 999, representing\nthe milliseconds portion of the given `Date` object according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n\nNot to be confused with Unix epoch time. To get the total milliseconds since 1970/01/01,\nuse the [`getTime()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/getTime) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/getUTCMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCMinutes()\n\nThe **`getUTCMinutes()`** method returns the minutes in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCMinutes()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 59,\nrepresenting the minutes in the given date according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/getUTCMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCMonth()\n\nThe **`getUTCMonth()`** returns the month of the specified date\naccording to universal time, as a zero-based value (where zero indicates the first month\nof the year).\n\n## Syntax\n\n```js\ngetUTCMonth()\n```\n\n### Return value\n\nA number. If the `Date` object represents a valid date, an integer number, between 0 and 11,\ncorresponding to the month of the given date according to universal time. 0 for January,\n1 for February, 2 for March, and so on. Otherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/getUTCSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCSeconds()\n\nThe **`getUTCSeconds()`** method returns the seconds in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCSeconds()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 59, representing\nthe seconds in the given date according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/getYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getYear()\n\nThe **`getYear()`** method returns the year in the specified\ndate according to local time. Because `getYear()` does not return full years\n(\"year 2000 problem\"), it is no longer used and has been replaced by the\n[`Date.prototype.getFullYear()`](./getFullYear.mdx) method.\n\n## Syntax\n\n```js\ngetYear()\n```\n\n### Return value\n\nA number representing the year of the given date, according to local time, minus 1900.\n\n## Description\n\n- For years greater than or equal to 2000, the value returned by\n  `getYear()` is 100 or greater. For example, if the year is 2026,\n  `getYear()` returns 126.\n- For years between and including 1900 and 1999, the value returned by\n  `getYear()` is between 0 and 99. For example, if the year is 1976,\n  `getYear()` returns 76.\n- For years less than 1900, the value returned by `getYear()` is less than 0. For example, if the year is 1800, `getYear()` returns -100.\n\nTo take into account years before and after 2000, you should use\n[`Date.prototype.getFullYear()`](./getFullYear.mdx) instead of\n`getYear()` so that the year is specified in full.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/setDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setDate()\n\nThe **`setDate()`** method changes the day of the month of a given `Date` instance, based on local time.\n\nTo instead change the day of the month for a given `Date` instance based on UTC time, use the [`Date.prototype.setUTCDate()`](./setUTCDate.mdx) method.\n\n## Syntax\n\n```js\nsetDate(dayValue)\n```\n\n### Parameters\n\n- `dayValue`\n  - : An integer representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the given date (the\n`Date` object is also changed in place).\n\n## Description\n\nIf the `dayValue` is outside of the range of date values for the month, `setDate()` will update the `Date` object accordingly.\n\nFor example, if 0 is provided for `dayValue`, the date will be set to the last day of the previous month. If you use 40 for `dayValue`, and the month stored in the `Date` object is June, the day will be changed to 10 and the month will be incremented to July.\n\nIf a negative number is provided for `dayValue`, the date will be set counting backwards from the last day of the previous month. -1 would result in the date being set to 1 day before the last day of the previous month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/setFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setFullYear()\n\nThe **`setFullYear()`** method sets the full year for a\nspecified date according to local time. Returns new timestamp.\n\n## Syntax\n\n```js\nsetFullYear(yearValue)\nsetFullYear(yearValue, monthValue)\nsetFullYear(yearValue, monthValue, dateValue)\n```\n\n### Parameters\n\n- `yearValue`\n  - : An integer specifying the numeric value of the year, for example, 1995.\n- `monthValue`\n  - : Optional. An integer between 0 and 11 representing the months January through\n    December.\n- `dateValue`\n  - : Optional. An integer between 1 and 31 representing the day of the month. If you\n    specify the `dateValue` parameter, you must also specify the\n    `monthValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `monthValue` and\n`dateValue` parameters, the values returned from the\n[`Date.prototype.getMonth()`](./getMonth.mdx) and\n[`Date.prototype.getDate()`](./getDate.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range, `setFullYear()`\nattempts to update the other parameters and the date information in the\n`Date` object accordingly. For example, if you specify 15 for\n`monthValue`, the year is incremented by 1\n(`yearValue + 1`), and 3 is used for the month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/setHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setHours()\n\nThe **`setHours()`** method sets the hours for a specified date\naccording to local time, and returns the number of milliseconds since January 1, 1970\n00:00:00 UTC until the time represented by the updated `Date` instance.\n\n## Syntax\n\n```js\nsetHours(hoursValue)\nsetHours(hoursValue, minutesValue)\nsetHours(hoursValue, minutesValue, secondsValue)\nsetHours(hoursValue, minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `hoursValue`\n  - : Ideally, an integer between 0 and 23, representing the hour. If a value greater than\n    23 is provided, the datetime will be incremented by the extra hours.\n- `minutesValue`\n  - : Optional. Ideally, an integer between 0 and 59, representing the minutes. If a value\n    greater than 59 is provided, the datetime will be incremented by the extra minutes.\n- `secondsValue`\n  - : Optional. Ideally, an integer between 0 and 59, representing the seconds. If a value\n    greater than 59 is provided, the datetime will be incremented by the extra seconds. If\n    you specify the `secondsValue` parameter, you must also specify\n    the `minutesValue`.\n- `msValue`\n  - : Optional. Ideally, a number between 0 and 999, representing the milliseconds. If a\n    value greater than 999 is provided, the datetime will be incremented by the extra\n    milliseconds. If you specify the `msValue` parameter, you must\n    also specify the `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between January 1, 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `minutesValue`,\n`secondsValue`, and `msValue` parameters,\nthe values returned from the [`Date.prototype.getMinutes()`](./getMinutes.mdx),\n[`Date.prototype.getSeconds()`](./getSeconds.mdx), and\n[`Date.prototype.getMilliseconds()`](./getMilliseconds.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range, `setHours()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes will\nbe incremented by 1 (`minutesValue + 1`), and 40 will be used for\nseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/setMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setMilliseconds()\n\nThe **`setMilliseconds()`** method sets the milliseconds for a\nspecified date according to local time.\n\n## Syntax\n\n```js\nsetMilliseconds(millisecondsValue)\n```\n\n### Parameters\n\n- `millisecondsValue`\n  - : A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you specify a number outside the expected range, the date information in the\n`Date` object is updated accordingly. For example, if you specify 1005, the\nnumber of seconds is incremented by 1, and 5 is used for the milliseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/setMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setMinutes()\n\nThe **`setMinutes()`** method sets the minutes for a specified\ndate according to local time.\n\n## Syntax\n\n```js\nsetMinutes(minutesValue)\nsetMinutes(minutesValue, secondsValue)\nsetMinutes(minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `minutesValue`\n  - : An integer between 0 and 59, representing the minutes.\n- `secondsValue`\n  - : Optional. An integer between 0 and 59, representing the seconds. If you specify the\n    `secondsValue` parameter, you must also specify the\n    `minutesValue`.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds. If you specify\n    the `msValue` parameter, you must also specify the\n    `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `secondsValue` and\n`msValue` parameters, the values returned from\n[`Date.prototype.getSeconds()`](./getSeconds.mdx) and\n[`Date.prototype.getMilliseconds()`](./getMilliseconds.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range, `setMinutes()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes will\nbe incremented by 1 (`minutesValue + 1`), and 40 will be used for\nseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/setMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setMonth()\n\nThe **`setMonth()`** method sets the month for a specified date according to the currently set year.\n\n## Syntax\n\n```js\nsetMonth(monthValue)\nsetMonth(monthValue, dayValue)\n```\n\n### Parameters\n\n- `monthValue`\n  - : A zero-based integer representing the month of the year offset from the start of the\n    year. So, 0 represents January, 11 represents December, -1 represents December of the\n    previous year, and 12 represents January of the following year.\n- `dayValue`\n  - : Optional. An integer from 1 to 31, representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `dayValue` parameter, the value\nreturned from the [`Date.prototype.getDate()`](./getDate.mdx) method is used.\n\nIf a parameter you specify is outside of the expected range, `setMonth()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 15 for `monthValue`, the year will be\nincremented by 1, and 3 will be used for month.\n\nThe current day of month will have an impact on the behavior of this method.\nConceptually it will add the number of days given by the current day of the month to the\n1st day of the new month specified as the parameter, to return the new date.\nFor example, if the current value is 31st January 2016, calling setMonth with a value of 1 will return 2nd March 2016.\nThis is because in 2016 February had 29 days.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/setSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setSeconds()\n\nThe **`setSeconds()`** method sets the seconds for a specified\ndate according to local time.\n\n## Syntax\n\n```js\nsetSeconds(secondsValue)\nsetSeconds(secondsValue, msValue)\n```\n\n### Parameters\n\n- `secondsValue`\n  - : An integer between 0 and 59, representing the seconds.\n- `msValue` _**optional**_\n  - : Optional. A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `msValue` parameter, the value returned\nfrom the [`Date.prototype.getMilliseconds()`](./getMilliseconds.mdx) method is\nused.\n\nIf a parameter you specify is outside of the expected range, `setSeconds()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes stored\nin the `Date` object will be incremented by 1, and 40 will be used for\nseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/setTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setTime()\n\nThe **`setTime()`** method sets the `Date` object\nto the time represented by a number of milliseconds since January 1, 1970, 00:00:00 UTC.\n\n## Syntax\n\n```js\nsetTime(timeValue)\n```\n\n### Parameters\n\n- `timeValue`\n  - : An integer representing the number of milliseconds since 1 January 1970, 00:00:00\n    UTC.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date\n(effectively, the value of the argument).\n\n## Description\n\nUse the `setTime()` method to help assign a date and time to another\n`Date` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/setUTCDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCDate()\n\nThe **`setUTCDate()`** method changes the day of the month of a given `Date` instance, based on UTC time.\n\nTo instead change the day of the month for a given `Date` instance based on local time, use the [`Date.prototype.setDate()`](././setDate.mdx) method.\n\n## Syntax\n\n```js\nsetUTCDate(dayValue)\n```\n\n### Parameters\n\n- `dayValue`\n  - : An integer from 1 to 31, representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf the `dayValue` is outside of the range of date values for the month, `setDate()` will update the `Date` object accordingly.\n\nFor example, if 0 is provided for `dayValue`, the date will be set to the last day of the previous month. If you use 40 for `dayValue`, and the month stored in the `Date` object is June, the day will be changed to 10 and the month will be incremented to July.\n\nIf a negative number is provided for `dayValue`, the date will be set counting backwards from the last day of the previous month. -1 would result in the date being set to 1 day before the last day of the previous month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/setUTCFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCFullYear()\n\nThe **`setUTCFullYear()`** method sets the full year for a\nspecified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCFullYear(yearValue)\nsetUTCFullYear(yearValue, monthValue)\nsetUTCFullYear(yearValue, monthValue, dayValue)\n```\n\n### Parameters\n\n- `yearValue`\n  - : An integer specifying the numeric value of the year, for example, 1995.\n- `monthValue`\n  - : Optional. An integer between 0 and 11 representing the months January through\n    December.\n- `dayValue`\n  - : Optional. An integer between 1 and 31 representing the day of the month. If you\n    specify the `dayValue` parameter, you must also specify the\n    `monthValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `monthValue` and\n`dayValue` parameters, the values returned from the\n[`Date.prototype.getUTCMonth()`](./getUTCMonth.mdx) and\n[`Date.prototype.getUTCDate()`](./getUTCDate.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range,\n`setUTCFullYear()` attempts to update the other parameters and the date\ninformation in the `Date` object accordingly. For example, if you specify 15\nfor `monthValue`, the year is incremented by 1\n(`yearValue + 1`), and 3 is used for the month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/setUTCHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCHours()\n\nThe **`setUTCHours()`** method sets the hour for a specified\ndate according to universal time, and returns the number of milliseconds since January\n1, 1970 00:00:00 UTC until the time represented by the updated `Date`\ninstance.\n\n## Syntax\n\n```js\nsetUTCHours(hoursValue)\nsetUTCHours(hoursValue, minutesValue)\nsetUTCHours(hoursValue, minutesValue, secondsValue)\nsetUTCHours(hoursValue, minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `hoursValue`\n  - : An integer between 0 and 23, representing the hour.\n- `minutesValue`\n  - : Optional. An integer between 0 and 59, representing the minutes.\n- `secondsValue`\n  - : Optional. An integer between 0 and 59, representing the seconds. If you specify the\n    `secondsValue` parameter, you must also specify the\n    `minutesValue`.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds. If you specify\n    the `msValue` parameter, you must also specify the\n    `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between January 1, 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `minutesValue`,\n`secondsValue`, and `msValue` parameters,\nthe values returned from the [`Date.prototype.getUTCMinutes()`](./getUTCMinutes.mdx), [`Date.prototype.getUTCSeconds()`](./getUTCSeconds.mdx),\nand [`Date.prototype.getUTCMilliseconds()`](./getUTCMilliseconds.mdx) methods\nare used.\n\nIf a parameter you specify is outside of the expected range, `setUTCHours()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes will\nbe incremented by 1 (`minutesValue + 1`), and 40 will be used for seconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/setUTCMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCMilliseconds()\n\nThe **`setUTCMilliseconds()`** method sets the milliseconds for\na specified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCMilliseconds(millisecondsValue)\n```\n\n### Parameters\n\n- `millisecondsValue`\n  - : A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf a parameter you specify is outside of the expected range,\n`setUTCMilliseconds()` attempts to update the date information in the\n`Date` object accordingly. For example, if you use 1100 for\n`millisecondsValue`, the seconds stored in the `Date`\nobject will be incremented by 1, and 100 will be used for milliseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/setUTCMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCMinutes()\n\nThe **`setUTCMinutes()`** method sets the minutes for a\nspecified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCMinutes(minutesValue)\nsetUTCMinutes(minutesValue, secondsValue)\nsetUTCMinutes(minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `minutesValue`\n  - : An integer between 0 and 59, representing the minutes.\n- `secondsValue`\n  - : Optional. An integer between 0 and 59, representing the seconds. If you specify the\n    `secondsValue` parameter, you must also specify the\n    `minutesValue`.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds. If you specify\n    the `msValue` parameter, you must also specify the\n    `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `secondsValue` and\n`msValue` parameters, the values returned from\n[`Date.prototype.getUTCSeconds()`](./getUTCSeconds.mdx) and\n[`Date.prototype.getUTCMilliseconds()`](./getUTCMilliseconds.mdx) methods are\nused.\n\nIf a parameter you specify is outside of the expected range,\n`setUTCMinutes()` attempts to update the date information in the\n`Date` object accordingly. For example, if you use 100 for\n`secondsValue`, the minutes will be incremented by 1\n(`minutesValue + 1`), and 40 will be used for seconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/setUTCMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCMonth()\n\nThe **`setUTCMonth()`** method sets the month for a specified\ndate according to universal time.\n\n## Syntax\n\n```js\nsetUTCMonth(monthValue)\nsetUTCMonth(monthValue, dayValue)\n```\n\n### Parameters\n\n- `monthValue`\n  - : An integer between 0 and 11, representing the months January through December.\n- `dayValue`\n  - : Optional. An integer from 1 to 31, representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `dayValue` parameter, the value returned from the\n[`Date.prototype.getUTCDate()`](./getUTCDate.mdx) method is used.\n\nIf a parameter you specify is outside of the expected range, `setUTCMonth()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 15 for `monthValue`, the year will be incremented by\n1, and 3 will be used for month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/setUTCSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCSeconds()\n\nThe **`setUTCSeconds()`** method sets the seconds for a\nspecified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCSeconds(secondsValue)\nsetUTCSeconds(secondsValue, msValue)\n```\n\n### Parameters\n\n- `secondsValue`\n  - : An integer between 0 and 59, representing the seconds.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `msValue` parameter, the value returned from the\n[`Date.prototype.getUTCMilliseconds()`](./getUTCMilliseconds.mdx) method is\nused.\n\nIf a parameter you specify is outside of the expected range,\n`setUTCSeconds()` attempts to update the date information in the\n`Date` object accordingly. For example, if you use 100 for\n`secondsValue`, the minutes stored in the `Date` object will be\nincremented by 1, and 40 will be used for seconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/setYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setYear()\n\nThe legacy **`setYear()`** method sets the year for a specified date according to local time.\n\nHowever, the way the legacy `setYear()` method sets year values is different from how the preferred [`Date.prototype.setFullYear()`](./setFullYear.mdx) method sets year values — and in some cases, also different from how `new Date()` and [`Date.parse()`](../parse.mdx) set year values. Specifically, given two-digit numbers, such as `22` and `61`:\n\n- `setYear()` interprets any two-digit number as an offset to `1900`; so `date.setYear(22)` results in the year value being set to `1922`, and `date.setYear(61)` results in the year value being set to `1961`. (In contrast, while `new Date(61, 1)` also results in the year value being set to `1961`, `new Date(\"2/1/22\")` results in the year value being set to `2022`; and similarly for [`Date.parse()`](../parse.mdx)).\n\n- [`Date.prototype.setFullYear()`](./setFullYear.mdx) does no special interpretation but instead uses the literal two-digit value as-is to set the year; so `date.setFullYear(61)` results in the year value being set to `0061`, and `date.setFullYear(22)` results in the year value being set to `0022`.\n\nBecause of those differences in behavior, you should no longer use the legacy `setYear()` method, but should instead use the preferred [`Date.prototype.setFullYear()`](./setFullYear.mdx) method.\n\n## Syntax\n\n```js\nsetYear(yearValue)\n```\n\n### Parameters\n\n- `yearValue`\n  - : An integer.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf `yearValue` is a number between 0 and 99 (inclusive), then the year for\n`dateObj` is set to `1900 + yearValue`. Otherwise, the year for\n`dateObj` is set to `yearValue`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/toDateString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toDateString()\n\nThe **`toDateString()`** method returns the date portion of a `Date` object interpreted in the local timezone in English.\n\n## Syntax\n\n```js\ntoDateString()\n```\n\n### Return value\n\nA string representing the date portion of the given `Date` object in human readable form in English.\n\n## Description\n\n`Date` instances refer to a specific point in time. `toDateString()` interprets the date in the local timezone and formats the _date_ part in English. It always uses the following format, separated by spaces:\n\n1. First three letters of the week day name\n2. First three letters of the month name\n3. Two-digit day of the month, padded on the left a zero if necessary\n4. Four-digit year (at least), padded on the left with zeros if necessary. May have a negative sign\n\nFor example: \"Thu Jan 01 1970\".\n\n- If you want to get the _time_ part, use [`toTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString).\n- If you want to get both the date and time, use [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toString).\n- If you want to make the date interpreted as UTC instead of local timezone, use [`toUTCString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString).\n- If you want to format the date in a more user-friendly format (e.g. localization), use [`toLocaleDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/toISOString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toISOString()\n\nThe **`toISOString()`** method returns a string in _simplified_ extended ISO format ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)), which is always 24 or 27 characters long (`YYYY-MM-DDTHH:mm:ss.sssZ` or `±YYYYYY-MM-DDTHH:mm:ss.sssZ`, respectively). The timezone is always zero UTC offset, as denoted by the suffix `Z`.\n\n## Syntax\n\n```js\ntoISOString()\n```\n\n### Return value\n\nA string representing the given date in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format according to universal time. It's the same format as the one required to be recognized by [`Date.parse()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/parse#date-time-string-format).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/toJSON.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toJSON()\n\nThe **`toJSON()`** method returns a string representation of\nthe `Date` object.\n\n## Syntax\n\n```js\ntoJSON()\n```\n\n### Return value\n\nA string representation of the given date.\n\n## Description\n\n`Date` instances refer to a specific point in time. `toJSON()` calls the object's [`Date.prototype.toISOString()`](./toISOString.mdx) method, which returns a string representing the `Date` object's value. This method is generally intended to, by default, usefully serialize `Date` objects during [JSON](https://developer.mozilla.org/docs/Glossary/JSON) serialization, which can then be deserialized using the [`Date()` constructor](../Date.mdx) or [`Date.parse()`](../parse.mdx) as the reviver of [`JSON.parse()`](../../JSON/parse.mdx).\n\nThe method first attempts to convert its `this` value [to a primitive](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion) by calling its [`[Symbol.toPrimitive]()`](../../Symbol/toPrimitive.mdx) (with `\"number\"` as hint), [`valueOf()`](../../Object/prototype/valueOf.mdx), and [`toString()`](../../Object/prototype/toString.mdx) methods, in that order. If the result is a [non-finite](../../Number/isFinite.mdx) number, `null` is returned. (This generally corresponds to an invalid date, whose [`valueOf()`](./valueOf.mdx) returns [`NaN`](../../NaN.mdx).) Otherwise, if the converted primitive is not a number or is a finite number, the return value of `this.toISOString()` is returned.\n\nNote that the method does not check whether the `this` value is a valid `Date` object. However, calling `Date.prototype.toJSON()` on non-`Date` objects does not have well-defined semantics.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/toLocaleDateString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toLocaleDateString()\n\nThe **`toLocaleDateString()`** method returns a string with a language-sensitive representation of the date portion of the specified date in the user agent's timezone. In implementations with [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) support, this method simply calls `Intl.DateTimeFormat`.\n\n## Syntax\n\n```js\ntoLocaleDateString()\ntoLocaleDateString(locales)\ntoLocaleDateString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat), these parameters correspond exactly to the [`Intl.DateTimeFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) constructor's parameters. Implementations without `Intl.DateTimeFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales) parameter of the `Intl.DateTimeFormat()` constructor.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options) parameter of the `Intl.DateTimeFormat()` constructor. The `timeStyle` option must be undefined, or a [`TypeError`](../../../globals/TypeError/TypeError.mdx) would be thrown. If `weekday`, `year`, `month`, and `day` are all undefined, then `year`, `month`, and `day` will be set to `\"numeric\"`.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored.\n\nSee the [`Intl.DateTimeFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string representing the date portion of the given `Date` instance according to language-specific conventions.\n\nIn implementations with `Intl.DateTimeFormat`, this is equivalent to `new Intl.DateTimeFormat(locales, options).format(date)`, where `options` has been normalized as described above.\n\n## Performance\n\nWhen formatting large numbers of dates, it is better to create an [`Intl.DateTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) object and use its [`format()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/format) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string with a language-sensitive representation of this date. In implementations with [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) support, this method simply calls `Intl.DateTimeFormat`.\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat), these parameters correspond exactly to the [`Intl.DateTimeFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) constructor's parameters. Implementations without `Intl.DateTimeFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales) parameter of the `Intl.DateTimeFormat()` constructor.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options) parameter of the `Intl.DateTimeFormat()` constructor. If `weekday`, `year`, `month`, `day`, `dayPeriod`, `hour`, `minute`, `second`, and `fractionalSecondDigits` are all undefined, then `year`, `month`, `day`, `hour`, `minute`, `second` will be set to `\"numeric\"`.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored.\n\nSee the [`Intl.DateTimeFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string representing the given date according to language-specific conventions.\n\nIn implementations with `Intl.DateTimeFormat`, this is equivalent to `new Intl.DateTimeFormat(locales, options).format(date)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/toLocaleTimeString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toLocaleTimeString()\n\nThe **`toLocaleTimeString()`** method returns a string with a language-sensitive representation of the time portion of the date. In implementations with [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) support, this method simply calls `Intl.DateTimeFormat`.\n\n## Syntax\n\n```js\ntoLocaleTimeString()\ntoLocaleTimeString(locales)\ntoLocaleTimeString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat), these parameters correspond exactly to the [`Intl.DateTimeFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) constructor's parameters. Implementations without `Intl.DateTimeFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales) parameter of the `Intl.DateTimeFormat()` constructor.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options) parameter of the `Intl.DateTimeFormat()` constructor. If `dayPeriod`, `hour`, `minute`, `second`, and `fractionalSecondDigits` are all undefined, then `hour`, `minute`, `second` will be set to `\"numeric\"`.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored.\n\nSee the [`Intl.DateTimeFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string representing the time portion of the given `Date` instance according to language-specific conventions.\n\nIn implementations with `Intl.DateTimeFormat`, this is equivalent to `new Intl.DateTimeFormat(locales, options).format(date)`, where `options` has been normalized as described above.\n\n## Performance\n\nWhen formatting large numbers of dates, it is better to create an [`Intl.DateTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) object and use its [`format()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/format) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified `Date` object interpreted in the local timezone.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the given date.\n\n## Description\n\nThe `Date` object overrides the `toString()` method of `Object`. `Date.prototype.toString()` returns a string representation of the Date as interpreted in the local timezone, containing both the date and the time — it joins the string representation specified in [`toDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString) and [`toTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString) together, adding a space in between.\n\nFor example: \"Thu Jan 01 1970 04:42:04 GMT+0000 (Coordinated Universal Time)\"\n\nThe `toString()` method is automatically called when a date is coerced to a string, such as `const today = 'Today is ' + new Date()`.\n\n`Date.prototype.toString()` must be called on `Date` instances. If the `this` value does not inherit from `Date.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n- If you only want to get the _date_ part, use [`toDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString).\n- If you only want to get the _time_ part, use [`toTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString).\n- If you want to make the date interpreted as UTC instead of local timezone, use [`toUTCString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString).\n- If you want to format the date in a more user-friendly format (e.g. localization), use [`toLocaleString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/toTimeString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toTimeString()\n\nThe **`toTimeString()`** method returns the time portion of a `Date` object interpreted in the local timezone in English.\n\n## Syntax\n\n```js\ntoTimeString()\n```\n\n### Return value\n\nA string representing the time portion of the given date in human readable form in English.\n\n## Description\n\n`Date` instances refer to a specific point in time. `toTimeString()` interprets the date in the local timezone and formats the _time_ part in English. It always uses the format of `hh:mm:ss GMT±xxxx (TZ)`, where:\n\n| Format String | Description                                                                                           |\n| ------------- | ----------------------------------------------------------------------------------------------------- |\n| `hh`          | Hour, as two digits with leading zero if required                                                     |\n| `mm`          | Minute, as two digits with leading zero if required                                                   |\n| `ss`          | Seconds, as two digits with leading zero if required                                                  |\n| `±xxxx`       | The local timezone's offset — two digits for hours and two digits for minutes (e.g. `-0500`, `+0800`) |\n| `TZ`          | The timezone's name (e.g. `PDT`, `PST`)                                                               |\n\nFor example: \"04:42:04 GMT+0000 (Coordinated Universal Time)\".\n\n- If you want to get the _date_ part, use [`toDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString).\n- If you want to get both the date and time, use [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toString).\n- If you want to make the date interpreted as UTC instead of local timezone, use [`toUTCString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString).\n- If you want to format the date in a more user-friendly format (e.g. localization), use [`toLocaleTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleTimeString).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/toUTCString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toUTCString()\n\nThe **`toUTCString()`** method converts a date to a string, interpreting it in the UTC time zone. `toGMTString()` is an alias of this method.\n\nBased on [rfc7231](https://datatracker.ietf.org/doc/html/rfc7231#section-7.1.1.1) and modified according to [ECMA-262 toUTCString](https://tc39.es/ecma262/#sec-date.prototype.toutcstring), it can have negative values.\n\n## Syntax\n\n```js\ntoUTCString()\n```\n\n### Return value\n\nA string representing the given date using the UTC time zone.\n\n## Description\n\nThe value returned by `toUTCString()` is a string in the form `Www, dd Mmm yyyy hh:mm:ss GMT`, where:\n\n| Format String | Description                                                  |\n| ------------- | ------------------------------------------------------------ |\n| `Www`         | Day of week, as three letters (e.g. `Sun`, `Mon`)            |\n| `dd`          | Day of month, as two digits with leading zero if required    |\n| `Mmm`         | Month, as three letters (e.g. `Jan`, `Feb`)                  |\n| `yyyy`        | Year, as four or more digits with leading zeroes if required |\n| `hh`          | Hour, as two digits with leading zero if required            |\n| `mm`          | Minute, as two digits with leading zero if required          |\n| `ss`          | Seconds, as two digits with leading zero if required         |\n\n### Aliasing\n\nJavaScript's `Date` API was inspired by Java's `java.util.Date` library (while the latter had become de facto legacy since Java 1.1 in 1997). In particular, the Java `Date` class had a method called `toGMTString` — which was poorly named, because the [Greenwich Mean Time](https://en.wikipedia.org/wiki/Greenwich_Mean_Time) is not equivalent to the [Coordinated Universal Time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time), while JavaScript dates always operate by UTC time. For web compatibility reasons, `toGMTString` remains as an alias to `toUTCString`, and they refer to the exact same function object. This means:\n\n```js\nDate.prototype.toGMTString.name === \"toUTCString\";\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Date/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a\n`Date` object.\n\n\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the given date, or [`NaN`](../../NaN.mdx) in case of an invalid date.\n\n## Description\n\nThe `valueOf()` method returns the primitive value of a `Date`\nobject as a number data type, the number of milliseconds since midnight 01 January, 1970\nUTC.\n\nThis method is functionally equivalent to the [`Date.prototype.getTime()`](./getTime.mdx)\nmethod.\n\nThis method is usually called internally by JavaScript and not explicitly in code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/DecompressionStream/DecompressionStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DecompressionStream()\n\nThe **`DecompressionStream()`** constructor creates a new `DecompressionStream` object which decompresses a stream of data.\n\n## Syntax\n\n```js\nnew DecompressionStream(format)\n```\n\n### Parameters\n\n- `format`\n\n  - : One of the following compression formats:\n\n    - `\"gzip\"`\n    - `\"deflate\"`\n    - `\"deflate-raw\"`\n\n## Exceptions\n\n- `TypeError`\n  - : Thrown if the format passed to the constructor is not supported.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/DecompressionStream/prototype/readable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DecompressionStream.readable\n\nThe **`readable`** read-only property of the `DecompressionStream` interface returns a `ReadableStream`.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/DecompressionStream/prototype/writable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DecompressionStream.writable\n\nThe **`writable`** read-only property of the `DecompressionStream` interface returns a `WritableStream`.\n\n## Value\n\nA `WritableStream`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/EcKeyImportParams/EcKeyImportParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# EcKeyImportParams\n\nThe **`EcKeyImportParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.importKey()`, when generating any elliptic-curve-based key pair: that is, when the algorithm is identified as ECDSA.\n\n## Instance properties\n\n- `name`\n  - : A string. This should be set to `ECDSA`.\n- `namedCurve`\n\n  - : A string representing the name of the elliptic curve to use. This may be any of the following names for [NIST](https://www.nist.gov/)-approved curves:\n\n    - `P-256`\n    - `P-384`\n    - `P-521`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/EcdsaParams/EcdsaParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# EcdsaParams\n\nThe **`EcdsaParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.sign()` or `SubtleCrypto.verify()` when using the ECDSA algorithm.\n\n## Instance properties\n\n- `name`\n    - : A string. This should be set to `ECDSA`.\n- `hash`\n\n    - : A string. An identifier for the digest algorithm to use. This should be one of the following:\n\n        - `SHA-256`: selects the SHA-256 algorithm.\n        - `SHA-384`: selects the SHA-384 algorithm.\n        - `SHA-512`: selects the SHA-512 algorithm.\n\n        > **Warning:** `SHA-1` is also supported here but the SHA-1 algorithm is considered vulnerable and should no longer be used.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Error/Error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error\n\nThe **`Error()`** constructor creates an error object.\n\n## Syntax\n\n```js\nnew Error()\nnew Error(message)\nnew Error(message, options)\nnew Error(message, fileName)\nnew Error(message, fileName, lineNumber)\n\nError()\nError(message)\nError(message, options)\nError(message, fileName)\nError(message, fileName, lineNumber)\n```\n\n> **Note:** `Error()` can be called with or without `new`. Both create a new `Error` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : A human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A value indicating the specific cause of the error, reflected in the [`Error.prototype.cause`](./prototype/cause.mdx) property. When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Error/prototype/cause.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.cause\n\nThe **`cause`** data property of an [`Error`](../../../globals/Error/Error.mdx) instance indicates the specific original cause of the error.\n\nIt is used when catching and re-throwing an error with a more-specific or useful error message in order to still have access to the original error.\n\n## Value\n\nThe value that was passed to the [`Error`](../Error.mdx) constructor in the `options.cause` argument. It may not be present.\n\n## Description\n\nThe value of `cause` can be of any type. You should not make assumptions that the error you caught has an `Error` as its `cause`, in the same way that you cannot be sure the variable bound in the `catch` statement is an `Error` either. The \"Providing structured data as the error cause\" example below shows a case where a non-error is deliberately provided as the cause.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Error/prototype/message.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.message\n\nThe **`message`** data property of an [`Error`](../Error.mdx) instance is a human-readable description of the error.\n\n## Value\n\nA string corresponding to the value passed to the [`Error`](../Error.mdx) constructor as the first argument.\n\n## Description\n\nThis property contains a brief description of the error if one is available or has been set. The `message` property combined with the [`name`](./name.mdx) property is used by the [`Error.prototype.toString()`](./toString.mdx) method to create a string representation of the Error.\n\nBy default, the `message` property is an empty string, but this behavior can be overridden for an instance by specifying a message as the first argument to the [`Error`](../Error.mdx) constructor.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Error/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.name\n\nThe **`name`** data property of `Error.prototype` is shared by all [`Error`](../Error.mdx) instances. It represents the name for the type of error. For `Error.prototype.name`, the initial value is `\"Error\"`. Subclasses like [`TypeError`](../../../globals/TypeError/TypeError.mdx) and [`SyntaxError`](../../SyntaxError/SyntaxError.mdx) provide their own `name` properties.\n\n## Value\n\nA string. For `Error.prototype.name`, the initial value is `\"Error\"`.\n\n## Description\n\nBy default, [`Error`](../Error.mdx) instances are given the name \"Error\". The `name` property, in addition to the [`message`](./message.mdx) property, is used by the [`Error.prototype.toString()`](./toString.mdx) method to create a string representation of the error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Error/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.toString()\n\nThe **`toString()`** method returns a string representing the\nspecified [`Error`](../Error.mdx) object.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified [`Error`](../Error.mdx) object.\n\n## Description\n\nThe [`Error`](../Error.mdx) object overrides the [`Object.prototype.toString()`](../../Object/prototype/toString.mdx)\nmethod inherited by all objects. \n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/EvalError/EvalError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# EvalError\n\nThe **`EvalError()`** constructor creates a new `EvalError` instance.\n\n## Syntax\n\n```js\nnew EvalError()\nnew EvalError(message)\nnew EvalError(message, options)\nnew EvalError(message, fileName)\nnew EvalError(message, fileName, lineNumber)\n\nEvalError()\nEvalError(message)\nEvalError(message, options)\nEvalError(message, fileName)\nEvalError(message, fileName, lineNumber)\n```\n\n> **Note:** `EvalError()` can be called with or without `new`. Both create a new `EvalError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/FetchEvent/FetchEvent.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent\n\nThis is the event type for `fetch` events. It contains information about the fetch, including the request and how the receiver will treat the response. \nIt provides the [`event.respondWith()`](./prototype/respondWith.mdx) method, which allows us to provide a response to this fetch.\n\n## Instance properties\n\n- `FetchEvent.request` _**readonly**_\n    - : The `Request` that was received by the application.\n- `FetchEvent.client` _**readonly**_\n    - : Information about the downstream client that made the request.\n        While these fields are always defined on Compute, they may be *null* when not available in testing environments\n        such as Viceroy.\n    - `FetchEvent.client.requestId` _**readonly**_\n        - : A UUID generated by Compute for each request.\n    - `FetchEvent.client.address` _**readonly**_\n        - : A string representation of the IPv4 or IPv6 address of the downstream client.\n    - `FetchEvent.client.geo` _**readonly**_\n        - : Either `null`, or a [geolocation dictionary](../../fastly:geolocation/getGeolocationForIpAddress.mdx) corresponding to the IP address of the downstream client.\n    - `FetchEvent.client.tlsJA3MD5` _**readonly**_\n        - : Either `null` or a string representation of the JA3 hash of the TLS ClientHello message.\n    - `FetchEvent.client.tlsCipherOpensslName` _**readonly**_\n        - : Either `null` or a string representation of the cipher suite used to secure the client TLS connection.\n    - `FetchEvent.client.tlsProtocol` _**readonly**_\n        - : Either `null` or a string representation of the TLS protocol version used to secure the client TLS connection.\n    - `FetchEvent.client.tlsClientCertificate` _**readonly**_\n        - : Either `null` or an ArrayBuffer containing the raw client certificate in the mutual TLS handshake message. It is in PEM format. Returns an empty ArrayBuffer if this is not mTLS or available.\n    - `FetchEvent.client.tlsClientHello` _**readonly**_\n        - : Either `null` or an ArrayBuffer containing the raw bytes sent by the client in the TLS ClientHello message.\n    - `FetchEvent.client.tlsJA4` _**readonly**_\n        - : Either `null` or a string representation of the JA4 fingerprint of the TLS ClientHello message.\n    - `FetchEvent.client.h2Fingerprint` _**readonly**_\n        - : Either `null` or a string representation of the HTTP/2 fingerprint for HTTP/2 connections. Returns `null` for HTTP/1.1 connections.\n    - `FetchEvent.client.ohFingerprint` _**readonly**_\n        - : Either `null` or a string representation of the Original Header fingerprint based on the order and presence of request headers.\n- `FetchEvent.server` _**readonly**_\n    - : Information about the server receiving the request for the Fastly Compute service.\n    - `FetchEvent.server.address` _**readonly**_\n        - : A string representation of the IPv4 or IPv6 address of the server which received the request.\n\n## Instance methods\n\n- [`FetchEvent.respondWith()`](./prototype/respondWith.mdx)\n    - : Provide (a promise for) a response for this request.\n- [`FetchEvent.sendEarlyHints()`](./prototype/sendEarlyHints.mdx)\n    - : Send a [103 Early Hints](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/103) response for this request.\n- [`FetchEvent.waitUntil()`](./prototype/waitUntil.mdx)\n    - : Extends the lifetime of the event. Used to notify the host environment of tasks that extend beyond the returning of a response, such as streaming and caching.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/FetchEvent/prototype/respondWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent.respondWith()\n\nThe **`respondWith()`** method allows you to provide a promise for a [`Response`](../../Response/Response.mdx) to send back to the client which made the incoming request to your application.\n\n## Syntax\n\n```js\nrespondWith(response)\n```\n\n### Parameters\n\n- `response`\n  - : A [`Response`](../../Response/Response.mdx) or a [`Promise`](../../Promise/Promise.mdx) that resolves to a\n    [`Response`](../../Response/Response.mdx). Otherwise, a network error is returned to Fetch.\n\n### Return value\n\nAlways returns `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/FetchEvent/prototype/sendEarlyHints.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent.sendEarlyHints()\n\nThe **`sendEarlyHints()`** method allows you to send a [103 Early Hints](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/103) response back to the client which made the incoming request to your application.\n\n## Syntax\n\n```js\nsendEarlyHints(headers)\n```\n\n### Parameters\n\n- `headers`\n  - : Any headers you want to add to your response, contained\n        within a [`Headers`](../../Headers/Headers.mdx) object or object literal of\n        [`String`](../../String/String.mdx) key/value pairs.\n\n### Return value\n\nAlways returns `undefined`.\n\n### Examples\n\n```js\nevent.sendEarlyHints({ link: '</style.css>; rel=preload; as=style' });\n\nevent.sendEarlyHints([\n        ['link', '</style.css>; rel=preload; as=style'],\n        ['link', '</style2.css>; rel=preload; as=style']\n    ]);\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/FetchEvent/prototype/waitUntil.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent.waitUntil()\n\n\nThe **`waitUntil()`** method tells the host environment that work is ongoing until the promise settles, and it shouldn't terminate\nthe application if it wants that work to complete.\n\nThe `waitUntil()` method must be initially called synchronously within the event callback,\nbut after that it can be called multiple times, and will hold the process open until all the promises passed to it\nsettle.\n\n## Syntax\n\n```js\nwaitUntil(promise)\n```\n\n### Parameters\n\nA [`Promise`](../../Promise/Promise.mdx).\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/FinalizationRegistry/FinalizationRegistry.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FinalizationRegistry()\n\nThe **`FinalizationRegistry`** constructor creates a `FinalizationRegistry` object that uses the given callback.\n\n## Syntax\n\n```js\n// Arrow callback function\nnew FinalizationRegistry((heldValue) => { /* … */ })\n\n// Callback function\nnew FinalizationRegistry(callbackFn)\n\n// Inline callback function\nnew FinalizationRegistry(function(heldValue) { /* … */ })\n```\n\n> **Note:** `FinalizationRegistry()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `callback`\n  - : The callback function this registry should use.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/FinalizationRegistry/prototype/register.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FinalizationRegistry.prototype.register()\n\nThe `register()` method registers an object with a\n`FinalizationRegistry` instance so that if the object is garbage-collected,\nthe registry's callback may get called.\n\n## Syntax\n\n```js\nregister(target, heldValue)\nregister(target, heldValue, unregisterToken)\n```\n\n### Parameters\n\n- `target`\n  - : The target object to register.\n- `heldValue`\n  - : The value to pass to the finalizer for this object. This cannot be the `target` object but can be anything else, including functions and primitives.\n- `unregisterToken` _**optional**_\n  - : A token that may be used with the `unregister` method later to unregister\n    the target object. If provided (and not `undefined`), this must be an\n    object. If not provided, the target cannot be unregistered.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown when one of the following condition is met:\n    - `target` is not an object (object as opposed to primitives; functions are objects as well)\n    - `target` is the same as `heldvalue` (`target === heldValue`)\n    - `unregisterToken` is not an object\n\n## Description\n\nSee the [Avoid where possible](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry#avoid_where_possible)\nand [Notes on cleanup callbacks](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry#notes_on_cleanup_callbacks)\nsections of the `FinalizationRegistry` page for important caveats.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/FinalizationRegistry/prototype/unregister.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FinalizationRegistry.prototype.unregister()\n\nThe `unregister()` method unregisters a target object from a\n`FinalizationRegistry` instance.\n\n## Syntax\n\n```js\nunregister(unregisterToken)\n```\n\n### Parameters\n\n- `unregisterToken`\n  - : The token used with the [`FinalizationRegistry.prototype.register`](./register.mdx) method when registering the target object. Multiple cells registered with the same `unregisterToken` will be unregistered together.\n\n### Return value\n\nA boolean value that is `true` if at least one cell was unregistered and `false` if no cell was unregistered.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown when `unregisterToken` is not an object.\n\n## Description\n\nWhen a target object has been reclaimed, it is no longer registered in the registry.\nThere is no need to call `unregister` in your cleanup callback. Only call\n`unregister` if you haven't received a cleanup callback and no longer need\nto receive one.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Float32Array/Float32Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Float32Array()\n\nThe **`Float32Array()`** typed array constructor creates a new\n`Float32Array` object, which is, an array of 32-bit floating point numbers\n(corresponding to the C `float` data type) in the platform byte order. If\ncontrol over byte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are\ninitialized to `0`. Once established, you can reference elements in the array\nusing the object's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Float32Array()\nnew Float32Array(length)\nnew Float32Array(typedArray)\nnew Float32Array(object)\n\nnew Float32Array(buffer)\nnew Float32Array(buffer, byteOffset)\nnew Float32Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Float32Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Float64Array/Float64Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Float64Array()\n\nThe **`Float64Array()`** typed array constructor creates a new\n`Float64Array` object, which is, an array of 64-bit floating point numbers\n(corresponding to the C `double` data type) in the platform byte order. If\ncontrol over byte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are\ninitialized to `0`. Once established, you can reference elements in the array\nusing the object's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Float64Array()\nnew Float64Array(length)\nnew Float64Array(typedArray)\nnew Float64Array(object)\n\nnew Float64Array(buffer)\nnew Float64Array(buffer, byteOffset)\nnew Float64Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Float64Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/FormData/FormData.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData()\n\nThe **`FormData()`** constructor creates a new `FormData` object.\n\n## Syntax\n\n```js\nnew FormData()\nnew FormData(form)\n```\n\n> **Note:** `FormData()` can only be constructed with `new`. Attempting to call it without `new` throws a `TypeError`.\n\n### Parameters\n\n- `form` _**optional**_\n  - : An HTML `<form>` element — when specified, the `FormData` object will be populated with the form's current key/value pairs using the name property of each element for the keys and their submitted value for the values. File input elements are handled specially: their values are taken from the files selected by the user in the upload control.\n\n### Return value\n\nA new `FormData` object, pre-populated with form data if the optional `form` parameter was provided.\n\n## Description\n\nThe `FormData` interface provides a way to construct a set of key/value pairs representing form fields and their values, which can be sent using methods such as `fetch()`. It uses the same format a form would use if the encoding type were set to `\"multipart/form-data\"`.\n\nYou can also append additional data to the `FormData` object after it's created using its various methods.\n\nA `FormData` object can be used in a number of ways with other APIs:\n\n1. It can be sent with the `fetch()` API\n2. It works seamlessly with the `Request` and `Response` objects - it can be used directly as the body of a `Request` object\n3. It can be obtained from a `Response` object using the `formData()` method\n4. It can be passed directly to the `URLSearchParams` constructor\n\nThe transmitted data is in the same format that the form's `submit()` method would use to send the data if the form's encoding type were set to `\"multipart/form-data\"`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/FormData/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.append()\n\nThe **`append()`** method of the `FormData` interface appends a new value onto an existing key inside a `FormData` object, or adds the key if it does not already exist.\n\n## Syntax\n\n```js\nappend(name, value)\nappend(name, value, filename)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the field whose data is contained in `value`.\n- `value`\n  - : The value of the field. This can be a string or a `Blob` (including subclasses such as `File`). If none of these, the value is converted to a string.\n- `filename` _**optional**_\n  - : The filename reported to the server when a `Blob` or `File` is passed as the second parameter. The default filename for `Blob` objects is \"blob\". The default filename for `File` objects is the file's filename.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/FormData/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.delete()\n\nThe **`delete()`** method of the `FormData` interface removes all key/value pairs with the given name from the `FormData` object.\n\n## Syntax\n\n```js\ndelete(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the key you want to delete.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/FormData/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.entries()\n\nThe **`entries()`** method of the `FormData` interface returns an iterator allowing iteration through all key/value pairs contained in this object. The iterator yields a new array for each key/value pair, with the first element being the key and the second element being the value.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nAn `iterator`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/FormData/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.forEach()\n\nThe **`forEach()`** method of the `FormData` interface executes the provided callback function once for each key/value pair in the `FormData` object.\n\n## Syntax\n\n```js\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n  - : A function to execute for each entry in the object. The function will be passed the following arguments:\n    - `value`\n      - : The value of the current entry.\n    - `key`\n      - : The key of the current entry.\n    - `formData`\n      - : The `FormData` object being traversed.\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/FormData/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.get()\n\nThe **`get()`** method of the `FormData` interface returns the first value associated with a given key from within a `FormData` object. If you expect multiple values and want all of them, use the [`getAll()`](../../../globals/FormData/prototype/getAll.mdx) method instead.\n\n## Syntax\n\n```js\nget(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the key you want to retrieve.\n\n### Return value\n\nA `FormDataEntryValue` containing the value. If the key does not exist, it returns `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/FormData/prototype/getAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.getAll()\n\nThe **`getAll()`** method of the `FormData` interface returns all the values associated with a given key from within a `FormData` object.\n\n## Syntax\n\n```js\ngetAll(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the key you want to retrieve.\n\n### Return value\n\nAn array of `FormDataEntryValue` items containing all values with the given key. If the key doesn't exist, an empty array is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/FormData/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.has()\n\nThe **`has()`** method of the `FormData` interface returns a boolean indicating whether a `FormData` object contains a key/value pair with the given name.\n\n## Syntax\n\n```js\nhas(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the key you want to test for existence.\n\n### Return value\n\n`true` if a key/value pair with the specified name exists; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/FormData/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.keys()\n\nThe **`keys()`** method of the `FormData` interface returns an iterator allowing iteration through all keys contained in this object. The iterator yields the key for each value.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nAn `iterator`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/FormData/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.set()\n\nThe **`set()`** method of the `FormData` interface sets a new value for an existing key inside a `FormData` object, or adds the key/value if it does not already exist.\n\nThe difference between `set()` and [`append()`](../../../globals/FormData/prototype/append.mdx) is that if the specified key already exists, `set()` overwrites all existing values with the new one, whereas `append()` appends the new value onto the end of the existing values.\n\n## Syntax\n\n```js\nset(name, value)\nset(name, value, filename)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the field whose data is contained in `value`.\n- `value`\n  - : The value of the field. This can be a string or a `Blob` (including subclasses such as `File`). If none of these, the value is converted to a string.\n- `filename` _**optional**_\n  - : The filename reported to the server when a `Blob` or `File` is passed as the second parameter. The default filename for `Blob` objects is \"blob\". The default filename for `File` objects is the file's filename.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/FormData/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.values()\n\nThe **`values()`** method of the `FormData` interface returns an iterator allowing iteration through all values contained in this object. The iterator yields the value for each key/value pair.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nAn `iterator`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Function/Function.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function()\n\nThe **`Function()`** constructor creates a new [`Function`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function) object. Calling the constructor directly can create functions dynamically, but suffers from security and similar (but far less significant) performance issues as `eval()`. However, unlike `eval` (which may have access to the local scope), the `Function` constructor creates functions which execute in the global scope only.\n\n\n\n## Syntax\n\n```js\nnew Function(functionBody)\nnew Function(arg0, functionBody)\nnew Function(arg0, arg1, functionBody)\nnew Function(arg0, arg1, /* … ,*/ argN, functionBody)\n\nFunction(functionBody)\nFunction(arg0, functionBody)\nFunction(arg0, arg1, functionBody)\nFunction(arg0, arg1, /* … ,*/ argN, functionBody)\n```\n\n> **Note:** `Function()` can be called with or without `new`. Both create a new `Function` instance.\n\n### Parameters\n\n- `argN` _**optional**_\n\n  - : Names to be used by the function as formal argument names. Each must be a string that corresponds to a valid JavaScript parameter (any of plain [identifier](https://developer.mozilla.org/docs/Glossary/Identifier), [rest parameter](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/rest_parameters), or [destructured](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment) parameter, optionally with a [default](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/Default_parameters)), or a list of such strings separated with commas.\n\n    As the parameters are parsed in the same way as function expressions, whitespace and comments are accepted. For example: `\"x\", \"theValue = 42\", \"[a, b] /* numbers */\"` — or `\"x, theValue = 42, [a, b] /* numbers */\"`. (`\"x, theValue = 42\", \"[a, b]\"` is also correct, though very confusing to read.)\n\n- `functionBody`\n  - : A string containing the JavaScript statements comprising the function definition.\n\n## Description\n\n`Function` objects created with the `Function` constructor are parsed when the function is created. This is less efficient than creating a function with a [function expression](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/function) or [function declaration](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function) and calling it within your code, because such functions are parsed with the rest of the code.\n\nAll arguments passed to the function, except the last, are treated as the names of the identifiers of the parameters in the function to be created, in the order in which they are passed. The function will be dynamically compiled as a function expression, with the source assembled in the following fashion:\n\n```js\n`function anonymous(${args.join(\",\")}\n) {\n${functionBody}\n}`\n```\n\nThis is observable by calling the function's [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/toString) method.\n\nHowever, unlike normal [function expressions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/function), the name `anonymous` is not added to the `functionBody`'s scope, since `functionBody` only has access the global scope. If `functionBody` is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode) (the body itself needs to have the `\"use strict\"` directive since it doesn't inherit the strictness from the context), you may use [`arguments.callee`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/arguments/callee) to refer to the function itself. Alternatively, you can define the recursive part as an inner function:\n\n```js\nconst recursiveFn = new Function(\"count\", `\n(function recursiveFn(count) {\n  if (count < 0) {\n    return;\n  }\n  console.log(count);\n  recursiveFn(count - 1);\n})(count);\n`);\n```\n\nNote that the two dynamic parts of the assembled source — the parameters list `args.join(\",\")` and `functionBody` — will first be parsed separately to ensure they are each syntactically valid. This prevents injection-like attempts.\n\n```js\nnew Function(\"/*\", \"*/) {\");\n// SyntaxError: Unexpected end of arg string\n// Doesn't become \"function anonymous(/*) {*/) {}\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Function/prototype/apply.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.apply()\n\nThe **`apply()`** method calls the specified function with a given `this` value, and `arguments` provided as an array (or an [array-like object](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects)).\n\n\n\n## Syntax\n\n```js\napply(thisArg)\napply(thisArg, argsArray)\n```\n\n### Parameters\n\n- `thisArg`\n  - : The value of `this` provided for the call to `func`. If the function is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) will be replaced with the global object, and primitive values will be converted to objects.\n- `argsArray` _**optional**_\n  - : An array-like object, specifying the arguments with which `func` should be called, or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../../globals/undefined.mdx) if no arguments should be provided to the function.\n\n### Return value\n\nThe result of calling the function with the specified `this` value and arguments.\n\n## Description\n\n> **Note:** This function is almost identical to [`Function.prototype.call()`](../../../globals/Function/prototype/call.mdx), except that `call()` accepts an **argument list**, while `apply()` accepts a **single array of arguments** — for example, `func.apply(this, ['eat', 'bananas'])` vs. `func.call(this, 'eat', 'bananas')`.\n\nNormally, when calling a function, the value of [`this`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this) inside the function is the object that the function was accessed on. With `apply()`, you can assign an arbitrary value as `this` when calling an existing function, without first attaching the function to the object as a property. This allows you to use methods of one object as generic utility functions.\n\n> **Warning:** Do not use `apply()` to chain constructors (for example, to implement inheritance). This invokes the constructor function as a plain function, which means [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target) is `undefined`, and classes throw an error because they can't be called without `new`. Use [`Reflect.construct()`](../../../globals/Reflect/construct.mdx) or [`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Function/prototype/bind.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.bind()\n\nThe **`bind()`** method creates a new function that, when called, has its `this` keyword set to the provided value, with a given sequence of arguments preceding any provided when the new function is called.\n\n\n\n## Syntax\n\n```js\nbind(thisArg)\nbind(thisArg, arg1)\nbind(thisArg, arg1, arg2)\nbind(thisArg, arg1, arg2, /* …, */ argN)\n```\n\n### Parameters\n\n- `thisArg`\n  - : The value to be passed as the `this` parameter to the target function `func` when the bound function is called. If the function is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) will be replaced with the global object, and primitive values will be converted to objects. The value is ignored if the bound function is constructed using the `new` operator.\n- `arg1, …, argN` _**optional**_\n  - : Arguments to prepend to arguments provided to the bound function when invoking `func`.\n\n### Return value\n\nA copy of the given function with the specified `this` value, and initial arguments (if provided).\n\n## Description\n\nThe `bind()` function creates a new _bound function_. Calling the bound function generally results in the execution of the function it wraps, which is also called the _target function_. The bound function will store the parameters passed — which include the value of `this` and the first few arguments — as its internal state. These values are stored in advance, instead of being passed at call time. You can generally see `const boundFn = fn.bind(thisArg, arg1, arg2)` as being equivalent to `const boundFn = (...restArgs) => fn.call(thisArg, arg1, arg2, ...restArgs)` for the effect when it's called (but not when `boundFn` is constructed).\n\nA bound function can be further bound by calling `boundFn.bind(thisArg, /* more args */)`, which creates another bound function `boundFn2`. The newly bound `thisArg` value is ignored, because the target function of `boundFn2`, which is `boundFn`, already has a bound `this`. When `boundFn2` is called, it would call `boundFn`, which in turn calls `fn`. The arguments that `fn` ultimately receives are, in order: the arguments bound by `boundFn`, arguments bound by `boundFn2`, and the arguments received by `boundFn2`.\n\n```js\n\"use strict\"; // prevent `this` from being boxed into the wrapper object\n\nfunction log(...args) {\n  console.log(this, ...args);\n}\nconst boundLog = log.bind(\"this value\", 1, 2);\nconst boundLog2 = boundLog.bind(\"new this value\", 3, 4);\nboundLog2(5, 6); // \"this value\", 1, 2, 3, 4, 5, 6\n```\n\nA bound function may also be constructed using the `new` operator if its target function is constructable. Doing so acts as though the target function had instead been constructed. The prepended arguments are provided to the target function as usual, while the provided `this` value is ignored (because construction prepares its own `this`, as seen by the parameters of [`Reflect.construct`](../../../globals/Reflect/construct.mdx)). If the bound function is directly constructed, [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target) will be the target function instead. (That is, the bound function is transparent to `new.target`.)\n\n```js\nclass Base {\n  constructor(...args) {\n    console.log(new.target === Base);\n    console.log(args);\n  }\n}\n\nconst BoundBase = Base.bind(null, 1, 2);\n\nnew BoundBase(3, 4); // true, [1, 2, 3, 4]\n```\n\nHowever, because a bound function does not have the [`prototype`](../../../globals/Function/prototype/) property, it cannot be used as a base class for [`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends).\n\n```js example-bad\nclass Derived extends class {}.bind(null) {}\n// TypeError: Class extends value does not have valid prototype property undefined\n```\n\nWhen using a bound function as the right-hand side of [`instanceof`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/instanceof), `instanceof` would reach for the target function (which is stored internally in the bound function) and read its `prototype` instead.\n\n```js\nclass Base {}\nconst BoundBase = Base.bind(null, 1, 2);\nconsole.log(new Base() instanceof BoundBase); // true\n```\n\nThe bound function has the following properties:\n\n- [`length`](../../../globals/Function/prototype/length.mdx)\n  - : The `length` of the target function minus the number of arguments being bound (not counting the `thisArg` parameter), with 0 being the minimum value.\n- [`name`](../../../globals/Function/prototype/name.mdx)\n  - : The `name` of the target function plus a `\"bound \"` prefix.\n\nThe bound function also inherits the [prototype chain](https://developer.mozilla.org/docs/Web/JavaScript/Inheritance_and_the_prototype_chain) of the target function. However, it doesn't have other own properties of the target function (such as [static properties](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/static) if the target function is a class).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Function/prototype/call.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.call()\n\nThe **`call()`** method calls the function with a given `this` value and arguments provided individually.\n\n## Syntax\n\n```js\ncall(thisArg)\ncall(thisArg, arg1)\ncall(thisArg, arg1, /* …, */ argN)\n```\n\n### Parameters\n\n- `thisArg`\n  - : The value to use as `this` when calling `func`. If the function is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) will be replaced with the global object, and primitive values will be converted to objects.\n- `arg1, …, argN` _**optional**_\n  - : Arguments for the function.\n\n### Return value\n\nThe result of calling the function with the specified `this` value and arguments.\n\n## Description\n\n> **Note:** This function is almost identical to [`Function.prototype.apply()`](../../../globals/Function/prototype/apply.mdx), except that `call()` accepts an **argument list**, while `apply()` accepts a **single array of arguments** — for example, `func.apply(this, ['eat', 'bananas'])` vs. `func.call(this, 'eat', 'bananas')`.\n\nNormally, when calling a function, the value of [`this`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this) inside the function is the object that the function was accessed on. With `call()`, you can assign an arbitrary value as `this` when calling an existing function, without first attaching the function to the object as a property. This allows you to use methods of one object as generic utility functions.\n\n> **Warning:** Do not use `call()` to chain constructors (for example, to implement inheritance). This invokes the constructor function as a plain function, which means [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target) is `undefined`, and classes throw an error because they can't be called without `new`. Use [`Reflect.construct()`](../../../globals/Reflect/construct.mdx) or [`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Function/prototype/index.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.prototype\n\nThe **`prototype`** data property of a `Function` instance is used when the function is used as a constructor with the `new` operator. It will become the new object's prototype.\n\n> **Note:** Not all `Function` objects have the `prototype` property — see [description](#description).\n\n## Value\n\nAn object.\n\n> **Note:** The `prototype` property of [classes](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes) is not writable.\n\n## Description\n\nWhen a function is called with `new`, the constructor's `prototype` property will become the resulting object's prototype.\n\n```js\nfunction Ctor() {}\nconst inst = new Ctor();\nconsole.log(Object.getPrototypeOf(inst) === Ctor.prototype); // true\n```\n\nYou can read [Inheritance and the prototype chain](https://developer.mozilla.org/docs/Web/JavaScript/Inheritance_and_the_prototype_chain#constructors) for more information about the interactions between a constructor function's `prototype` property and the resulting object's prototype.\n\nA function having a `prototype` property is not sufficient for it to be eligible as a constructor. [Generator functions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function*) have a `prototype` property, but cannot be called with `new`:\n\n```js\nasync function* asyncGeneratorFunction() {}\nfunction* generatorFunction() {}\n```\n\nInstead, generator functions' `prototype` property is used when they are called _without_ `new`. The `prototype` property will become the returned [`Generator`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Generator) object's prototype.\n\nIn addition, some functions may have a `prototype` but throw unconditionally when called with `new`. For example, the [`Symbol()`](../../../globals/Symbol/Symbol.mdx) and [`BigInt`](../../../globals/BigInt/BigInt.mdx) functions throw when called with `new`, because `Symbol.prototype` and `BigInt.prototype` are only intended to provide methods for the primitive values, but the wrapper objects should not be directly constructed.\n\nThe following functions do not have `prototype`, and are therefore ineligible as constructors, even if a `prototype` property is later manually assigned:\n\n```js\nconst method = { foo() {} }.foo;\nconst arrowFunction = () => {};\nasync function asyncFunction() {}\n```\n\nThe following are valid constructors that have `prototype`:\n\n```js\nclass Class {}\nfunction fn() {}\n```\n\nA [bound function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/bind) does not have a `prototype` property, but may be constructable. When it's constructed, the target function is constructed instead, and if the target function is constructable, it would return a normal instance.\n\n```js\nconst boundFunction = function () {}.bind(null);\n```\n\nA function's `prototype` property, by default, is a plain object with one property: (`constructor`)[../../../globals/Object/prototype/constructor.mdx), which is a reference to the function itself. The `constructor` property is writable, non-enumerable, and configurable.\n\nIf the `prototype` of a function is reassigned with something other than an `Object`, when the function is called with `new`, the returned object's prototype would be `Object.prototype` instead. (In other words, `new` ignores the `prototype` property and constructs a plain object.)\n\n```js\nfunction Ctor() {}\nCtor.prototype = 3;\nconsole.log(Object.getPrototypeOf(new Ctor()) === Object.prototype); // true\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Function/prototype/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.length\n\nThe **`length`** data property of a `Function` instance indicates the number of parameters expected by the function.\n\n## Value\n\nA number.\n\n## Description\n\nA `Function` object's `length` property indicates how many arguments the function expects, i.e. the number of formal parameters. \n\nThe `Function` constructor is itself a `Function` object. Its `length` data property has a value of `1`.\n\nDue to historical reasons, `Function.prototype` is a callable itself. The `length` property of `Function.prototype` has a value of `0`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Function/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.name\n\nThe **`name`** property of a `Function` instance indicates the function's name as specified when it was created, or it may be either `anonymous` or `''` (an empty string) for functions created anonymously.\n\n## Value\n\nA string.\n\n> **Note:** In non-standard, pre-ES2015 implementations the `configurable` attribute was `false` as well.\n\n## Description\n\nThe function's `name` property can be used to identify the function in debugging tools or error messages. It has no semantic significance to the language itself.\n\nThe `name` property is read-only and cannot be changed by the assignment operator:\n\n```js\nfunction someFunction() {}\n\nsomeFunction.name = 'otherFunction';\nconsole.log(someFunction.name); // someFunction\n```\n\nTo change it, use [`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx).\n\nThe `name` property is typically inferred from how the function is defined. In the following sections, we will describe the various ways in which it can be inferred.\n\n### Function declaration\n\nThe `name` property returns the name of a function declaration.\n\n```js\nfunction doSomething() {}\ndoSomething.name; // \"doSomething\"\n```\n\n### Default-exported function declaration\n\nAn [`export default`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/export) declaration exports the function as a declaration instead of an expression. If the declaration is anonymous, the name is `\"default\"`.\n\n```js\n// -- someModule.js --\nexport default function () {};\n\n// -- main.js --\nimport someModule from \"./someModule.js\";\n\nsomeModule.name; // \"default\"\n```\n\n### Function constructor\n\nFunctions created with the [`Function()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/Function) constructor have name \"anonymous\".\n\n```js\nnew Function().name; // \"anonymous\"\n```\n\n### Function expression\n\nIf the function expression is named, that name is used as the `name` property.\n\n```js\nconst someFunction = function someFunctionName() {};\nsomeFunction.name; // \"someFunctionName\"\n```\n\nAnonymous function expressions created using the keyword `function` or arrow functions would have `\"\"` (an empty string) as their name.\n\n```js\n(function () {}).name; // \"\"\n(() => {}).name; // \"\"\n```\n\nHowever, such cases are rare — usually, in order to refer to the expression elsewhere, the function expression is attached to an identifier when it's created (such as in a variable declaration). In such cases, the name can be inferred, as the following few subsections demonstrate.\n\nOne practical case where the name cannot be inferred is a function returned from another function:\n\n```js\nfunction getFoo() {\n  return () => {};\n}\ngetFoo().name; // \"\"\n```\n\n### Variable declaration and method\n\nVariables and methods can infer the name of an anonymous function from its syntactic position.\n\n```js\nconst f = function () {};\nconst object = {\n  someMethod: function () {}\n};\n\nconsole.log(f.name); // \"f\"\nconsole.log(object.someMethod.name); // \"someMethod\"\n```\n\nThe same applies to assignment:\n\n```js\nlet f;\nf = () => {};\nf.name; // \"f\"\n```\n\n### Initializer and default value\n\nFunctions in initializers (default values) of [destructuring](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#default_value), [default parameters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/Default_parameters), [class fields](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/Public_class_fields), etc., will inherit the name of the bound identifier as their `name`.\n\n```js\nconst [f = () => {}] = [];\nf.name; // \"f\"\n\nconst { someMethod: m = () => {} } = {};\nm.name; // \"m\"\n\nfunction foo(f = () => {}) {\n  console.log(f.name);\n}\nfoo(); // \"f\"\n\nclass Foo {\n  static someMethod = () => {};\n}\nFoo.someMethod.name; // someMethod\n```\n\n### Shorthand method\n\n```js\nconst o = {\n  foo() {},\n};\no.foo.name; // \"foo\";\n```\n\n### Bound function\n\n[`Function.prototype.bind()`](../../../globals/Function/prototype/bind.mdx) produces a function whose name is \"bound \" plus the function name.\n\n```js\nfunction foo() {};\nfoo.bind({}).name; // \"bound foo\"\n```\n\n### Getter and setter\n\nWhen using [`get`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/get) and [`set`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/set) accessor properties, \"get\" or \"set\" will appear in the function name.\n\n```js\nconst o = {\n  get foo() {},\n  set foo(x) {},\n};\n\nconst descriptor = Object.getOwnPropertyDescriptor(o, \"foo\");\ndescriptor.get.name; // \"get foo\"\ndescriptor.set.name; // \"set foo\";\n```\n\n### Class\n\nA class's name follows the same algorithm as function declarations and expressions.\n\n```js\nclass Foo {}\nFoo.name; // \"Foo\"\n```\n\n> **Warning:** JavaScript will set the function's `name` property only if a function does not have an own property called `name`. However, classes' [static members](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/static) will be set as own properties of the class constructor function, and thus prevent the built-in `name` from being applied. See [telling the constructor name of an object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name#telling_the_constructor_name_of_an_object) for more details.\n\n### Symbol as function name\n\nIf a `Symbol` is used a function name and the symbol has a description, the method's name is the description in square brackets.\n\n```js\nconst sym1 = Symbol(\"foo\");\nconst sym2 = Symbol();\n\nconst o = {\n  [sym1]() {},\n  [sym2]() {},\n};\n\no[sym1].name; // \"[foo]\"\no[sym2].name; // \"[]\"\n```\n\n### Private property\n\nPrivate fields and private methods have the hash (`#`) as part of their names.\n\n```js\nclass Foo {\n  #field = () => {};\n  #method() {}\n  getNames() {\n    console.log(this.#field.name);\n    console.log(this.#method.name);\n  }\n}\n\nnew Foo().getNames();\n// \"#field\"\n// \"#method\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Function/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.toString()\n\nThe **`toString()`** method returns a string representing the source code of the specified `Function`.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the source code of the function.\n\n## Description\n\nThe `Function` object overrides the `toString()` method\ninherited from `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For user-defined `Function`\nobjects, the `toString` method returns a string containing the source text\nsegment which was used to define the function.\n\nJavaScript calls the `toString` method automatically when a\n`Function` is to be represented as a text value, e.g. when a function is\nconcatenated with a string.\n\nThe `toString()` method will throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) exception\n(\"Function.prototype.toString called on incompatible object\"), if its\n`this` value object is not a `Function` object.\n\n```js example-bad\nFunction.prototype.toString.call('foo'); // throws TypeError\n```\n\nIf the `toString()` method is called on built-in function objects, a\nfunction created by [`Function.prototype.bind()`](../../../globals/Function/prototype/bind.mdx), or\nother non-JavaScript functions, then `toString()` returns a\n_native function string_ which looks like\n\n```js\n\"function someName() { [native code] }\"\n```\n\nFor intrinsic object methods and functions, `someName` is the initial name of the function; otherwise its content may be implementation-defined, but will always be in property name syntax, like `[1 + 1]`, `someName`, or `1`.\n\n> **Note:** This means using [`eval()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/eval) on native function strings is a guaranteed syntax error.\n\nIf the `toString()` method is called on a function created by the `Function` constructor, `toString()` returns the source code of a synthesized function declaration named \"anonymous\" using the provided parameters and function body. For example, `Function(\"a\", \"b\", \"return a + b\").toString()` will return:\n\n```js\n\"function anonymous(a,b\\n) {\\nreturn a + b\\n}\"\n```\n\nSince ES2018, the spec requires the return value of `toString()` to be the exact same source code as it was declared, including any whitespace and/or comments — or, if the host doesn't have the source code available for some reason, requires returning a native function string. Support for this revised behavior can be found in the [browser compatibility table](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/toString#browser_compatibility).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Headers/Headers.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers()\n\nThe **`Headers()`** constructor creates a new `Headers` object.\n\n## Syntax\n\n```js\nnew Headers()\nnew Headers(init)\n```\n\n### Parameters\n\n- `init` _**optional**_\n  - : An object containing any HTTP headers that you want to pre-populate your `Headers` object with. This can be a\n    simple object literal with `String` values, an array of name-value pairs, where each pair is a 2-element string array; or an existing\n    `Headers` object. In the last case, the new `Headers` object\n    copies its data from the existing `Headers` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Headers/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.append()\n\nThe **`append()`** method of the `Headers`\ninterface appends a new value onto an existing header inside a `Headers`\nobject, or adds the header if it does not already exist.\n\nThe difference between `Headers.prototype.set()` and `append()` is\nthat if the specified header already exists and accepts multiple values,\n`set()` will overwrite the existing value with the new one, whereas\n`append()` will append the new value onto the end of the set of values.\n\n## Syntax\n\n```js\nappend(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to add to the `Headers` object.\n- `value`\n  - : The value of the HTTP header you want to add.\n\n### Return value\n\nNone (`undefined`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Headers/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.delete()\n\nThe **`delete()`** method of the `Headers`\ninterface deletes a header from the current `Headers` object.\n\nThis method throws a `TypeError` for the following reasons:\n\n- The value of the name parameter is not the name of an HTTP header.\n\n## Syntax\n\n```js\ndelete(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to delete from the `Headers` object.\n\n### Return value\n\nNone (`undefined`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Headers/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.entries()\n\nThe **`Headers.entries()`** method returns an iterator allowing to go through all key/value pairs\ncontained in this object. The both the key and value of each pairs are `String` objects.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Headers/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.forEach()\n\nThe **`Headers.forEach()`** method executes a callback function once per each key/value pair in the `Headers` object.\n\n## Syntax\n\n```js\n// Arrow function\nforEach((value, key) => { /* … */ })\nforEach((value, key, object) => { /* … */ })\n\n// Inline callback function\nforEach(function (value, key) { /* … */ })\nforEach(function (value, key, object) { /* … */ })\nforEach(function (value, key) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n  - : Function to execute for each entry in the map. It takes the following arguments:\n    - `value`\n      - : Value of the currently visited header entry.\n    - `key`\n      - : Name of the currently visited header entry.\n    - `object`\n      - : The Headers object being iterated.\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `callback`.\n\n### Return value\n\n`undefined`.\n\n## Description\n\nThe `Headers.forEach()` method executes the provided callback once for each key of the Headers which actually exist. It is not invoked for keys which have been deleted. However, it is executed for keys which are present but have the value undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Headers/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.get()\n\nThe **`get()`** method of the [`Headers`](../../../globals/Headers/Headers.mdx) interface\nreturns a byte string of all the values of a header within a `Headers` object\nwith a given name. If the requested header doesn't exist in the `Headers`\nobject, it returns `null`.\n\n## Syntax\n\n```js\nget(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header whose values you want to retrieve from the\n    `Headers` object. If the given name is not the name of an HTTP header, this\n    method throws a `TypeError`. The name is case-insensitive.\n\n### Return value\n\nA [`String`](../../../globals/String/String.mdx) sequence representing the values of the retrieved header or\n`null` if this header is not set.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Headers/prototype/getSetCookie.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.getSetCookie()\n\nThe **`getSetCookie()`** method of the [`Headers`](../../../globals/Headers/Headers.mdx) interface\nreturns an array of all the values of the `Set-Cookie` headers, returning\nan empty list if none are present.\n\n## Syntax\n\n```js\ngetSetCookie()\n```\n\n### Return value\n\n`String[]` representing the list of `Set-Cookie` headers.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Headers/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.has()\n\nThe **`has()`** method of the `Headers` interface\nreturns a boolean stating whether a `Headers` object contains a certain\nheader.\n\n## Syntax\n\n```js\nhas(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to test for. If the given name is not a valid\n    HTTP header name, this method throws a `TypeError`.\n\n### Return value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Headers/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.keys()\n\nThe **`Headers.keys()`** method returns an iterator allowing to go through all keys contained\nin this object. The keys are `String` objects.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Headers/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.set()\n\nThe **`set()`** method of the `Headers` interface\nsets a new value for an existing header inside a `Headers` object, or adds\nthe header if it does not already exist.\n\nThe difference between `set()` and `Headers.append` is that if\nthe specified header already exists and accepts multiple values, `set()`\noverwrites the existing value with the new one, whereas `Headers.append`\nappends the new value to the end of the set of values.\n\n## Syntax\n\n```js\nset(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to set to a new value. If the given name is not\n    the name of an HTTP header, this method throws a `TypeError`.\n- `value`\n  - : The new value you want to set.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Headers/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.values()\n\nThe **`Headers.values()`** method returns an iterator allowing to go through all values contained\nin this object. The values are `String` objects.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/HmacImportParams/HmacImportParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# HmacImportParams\n\nThe **`HmacImportParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.importKey`, when generating a key for the `HMAC` algorithm.\n\n## Instance properties\n\n- `name`\n  - : A string. This should be set to `HMAC`.\n- `hash`\n\n  - : A string representing the name of the digest function to use. The can take a value of `SHA-1`, `SHA-256`, `SHA-384`, or `SHA-512`.\n\n- `length` _optional_\n  - : A `Number` representing the length in bits of the key. If this is omitted the length of the key is equal to the length of the digest generated by the digest function you have chosen. Unless you have a good reason to use a different length, omit this property and use the default.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Infinity.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Infinity\n\nThe global property **`Infinity`** is a numeric value representing infinity.\n\n## Value\n\nThe same number value as `Number.POSITIVE_INFINITY`.\n\n## Description\n\n`Infinity` is a property of the _global object_. In other words, it is a variable in global scope.\n\nThe value `Infinity` (positive infinity) is greater than any other number.\n\nThis value behaves slightly differently than mathematical infinity; see `Number.POSITIVE_INFINITY` for details.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Int16Array/Int16Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Int16Array()\n\nThe **`Int16Array()`** typed array constructor creates an array\nof twos-complement 16-bit signed integers in the platform byte order. If control over\nbyte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are initialized\nto `0`. Once established, you can reference elements in the array using the\nobject's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Int16Array()\nnew Int16Array(length)\nnew Int16Array(typedArray)\nnew Int16Array(object)\n\nnew Int16Array(buffer)\nnew Int16Array(buffer, byteOffset)\nnew Int16Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Int16Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Int32Array/Int32Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Int32Array()\n\nThe **`Int32Array()`** typed array constructor creates an array\nof twos-complement 32-bit signed integers in the platform byte order. If control over\nbyte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are initialized\nto `0`. Once established, you can reference elements in the array using the\nobject's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Int32Array()\nnew Int32Array(length)\nnew Int32Array(typedArray)\nnew Int32Array(object)\n\nnew Int32Array(buffer)\nnew Int32Array(buffer, byteOffset)\nnew Int32Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Int32Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Int8Array/Int8Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Int8Array()\n\nThe **`Int8Array()`** constructor creates a typed array of\ntwos-complement 8-bit signed integers. The contents are initialized to `0`.\nOnce established, you can reference elements in the array using the object's methods, or\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew Int8Array()\nnew Int8Array(length)\nnew Int8Array(typedArray)\nnew Int8Array(object)\n\nnew Int8Array(buffer)\nnew Int8Array(buffer, byteOffset)\nnew Int8Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Int8Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/JSON/parse.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# JSON.parse()\n\nThe **`JSON.parse()`** method parses a JSON string, constructing the JavaScript value or object described by the string. An optional _reviver_ function can be provided to perform a transformation on the resulting object before it is returned.\n\n## Syntax\n\n```js\nJSON.parse(text)\nJSON.parse(text, reviver)\n```\n\n### Parameters\n\n- `text`\n  - : The string to parse as JSON.\n- `reviver` _**optional**_\n  - : If a function, this prescribes how each value originally produced by parsing is transformed before being returned. Non-callable values are ignored. The function is called with the following arguments:\n    - `key`\n      - : The key associated with the value.\n    - `value`\n      - : The value produced by parsing.\n\n### Return value\n\nThe `Object`, `Array`, string, number, boolean, or `null` value corresponding to the given JSON `text`.\n\n### Exceptions\n\n- [`SyntaxError`](../../globals/SyntaxError/SyntaxError.mdx)\n  - : Thrown if the string to parse is not valid JSON.\n\n## Description\n\n`JSON.parse()` parses a JSON string according to the [JSON grammar](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/JSON#full_json_grammar), then evaluates the string as if it's a JavaScript expression. The only instance where a piece of JSON text represents a different value from the same JavaScript expression is when dealing with the `\"__proto__\"` key — see [Object literal syntax vs. JSON](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Object_initializer#object_literal_syntax_vs._json).\n\n### The reviver parameter\n\nIf a `reviver` is specified, the value computed by parsing is _transformed_ before being returned. Specifically, the computed value and all its properties (in a [depth-first](https://en.wikipedia.org/wiki/Depth-first_search) fashion, beginning with the most nested properties and proceeding to the original value itself) are individually run through the `reviver`.\n\nThe `reviver` is called with the object containing the property being processed as `this`, and two arguments: `key` and `value`, representing the property name as a string (even for arrays) and the property value. If the `reviver` function returns [`undefined`](../../globals/undefined.mdx) (or returns no value — for example, if execution falls off the end of the function), the property is deleted from the object. Otherwise, the property is redefined to be the return value. If the `reviver` only transforms some values and not others, be certain to return all untransformed values as-is — otherwise, they will be deleted from the resulting object.\n\nSimilar to the `replacer` parameter of [`JSON.stringify()`](../../globals/JSON/stringify.mdx), `reviver` will be last called on the root object with an empty string as the `key` and the root object as the `value`. For JSON text parsing to primitive values, `reviver` will be called once.\n\nNote that `reviver` is run after the value is parsed. So, for example, numbers in JSON text will have already been converted to JavaScript numbers, and may lose precision in the process. To transfer large numbers without loss of precision, serialize them as strings, and revive them to [BigInts](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/BigInt), or other appropriate arbitrary precision formats.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/JSON/stringify.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# JSON.stringify()\n\nThe **`JSON.stringify()`** method converts a JavaScript value to a JSON string, optionally replacing values if a replacer function is specified or optionally including only the specified properties if a replacer array is specified.\n\n## Syntax\n\n```js\nJSON.stringify(value)\nJSON.stringify(value, replacer)\nJSON.stringify(value, replacer, space)\n```\n\n### Parameters\n\n- `value`\n  - : The value to convert to a JSON string.\n- `replacer` _**optional**_\n  - : A function that alters the behavior of the stringification process, or an array of strings or numbers naming properties of `value` that should be included in the output. If `replacer` is an array, all elements that are not strings or numbers (can be either primitives or wrapper objects), including `Symbol` values, are completely ignored. If `replacer` is anything other than a function or an array (e.g. [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or not provided), all properties of the object are included in the resulting JSON string.\n- `space` _**optional**_\n\n  - : A string or number that's used to insert white space (including indentation, line break characters, etc.) into the output JSON string for readability purposes.\n\n    If this is a number, it indicates the number of space characters to be used as indentation, clamped to 10 (that is, any number greater than `10` is treated as if it were `10`). Values less than 1 indicate that no space should be used.\n\n    If this is a string, the string (or the first 10 characters of the string, if it's longer than that) is inserted before every nested object or array.\n\n    If `space` is anything other than a string or number (can be either a primitive or a wrapper object) — for example, is [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or not provided — no white space is used.\n\n### Return value\n\nA JSON string representing the given value, or undefined.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if one of the following is true:\n    - `value` contains a circular reference.\n    - A `BigInt` value is encountered.\n\n## Description\n\n`JSON.stringify()` converts a value to JSON notation representing it:\n\n- `Boolean`, `Number`, `String`, and `BigInt` (obtainable via [`Object()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/Object)) objects are converted to the corresponding primitive values during stringification, in accordance with the traditional conversion semantics. `Symbol` objects (obtainable via [`Object()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/Object)) are treated as plain objects.\n- Attempting to serialize `BigInt` values will throw. However, if the BigInt has a `toJSON()` method (through monkeypatching: `BigInt.prototype.toJSON = ...`), that method can provide the serialization result. This constraint ensures that a proper serialization (and, very likely, its accompanying deserialization) behavior is always explicitly provided by the user.\n- [`undefined`](../../globals/undefined.mdx), `Function`, and `Symbol` values are not valid JSON values. If any such values are encountered during conversion, they are either omitted (when found in an object) or changed to [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) (when found in an array). `JSON.stringify()` can return `undefined` when passing in \"pure\" values like `JSON.stringify(() => {})` or `JSON.stringify(undefined)`.\n- The numbers [`Infinity`](../../globals/Infinity.mdx) and [`NaN`](../../globals/NaN.mdx), as well as the value [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null), are all considered `null`. (But unlike the values in the previous point, they would never be omitted.)\n- Arrays are serialized as arrays (enclosed by square brackets). Only array indices between 0 and `length - 1` (inclusive) are serialized; other properties are ignored.\n- For other objects:\n\n  - All `Symbol`-keyed properties will be completely ignored, even when using the [`replacer`](#the-replacer-parameter) parameter.\n\n  - If the value has a `toJSON()` method, it's responsible to define what data will be serialized. Instead of the object being serialized, the value returned by the `toJSON()` method when called will be serialized. `JSON.stringify()` calls `toJSON` with one parameter, the `key`, which has the same semantic as the `key` parameter of the [`replacer`](#the-replacer-parameter) function:\n\n    - if this object is a property value, the property name\n    - if it is in an array, the index in the array, as a string\n    - if `JSON.stringify()` was directly called on this object, an empty string\n\n    `Date` objects implement the [`toJSON()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toJSON) method which returns a string (the same as [`date.toISOString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)). Thus, they will be stringified as strings.\n\n  - Only [enumerable own properties](https://developer.mozilla.org/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) are visited. This means [Map](../../globals/Map/Map.mdx), [Set](../../globals/Set/Set.mdx), etc. will become `\"{}\"`. You can use the [`replacer`](#the-replacer-parameter) parameter to serialize them to something more useful.\n\n    Properties are visited using the same algorithm as [`Object.keys()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/keys), which has a well-defined order and is stable across implementations. For example, `JSON.stringify` on the same object will always produce the same string, and `JSON.parse(JSON.stringify(obj))` would produce an object with the same key ordering as the original (assuming the object is completely JSON-serializable).\n\n### The replacer parameter\n\nThe `replacer` parameter can be either a function or an array.\n\nAs an array, its elements indicate the names of the properties in the object that should be included in the resulting JSON string. Only string and number values are taken into account; symbol keys are ignored.\n\nAs a function, it takes two parameters: the `key` and the `value` being stringified. The object in which the key was found is provided as the `replacer`'s `this` context.\n\nThe `replacer` function is called for the initial object being stringified as well, in which case the `key` is an empty string (`\"\"`). It is then called for each property on the object or array being stringified. Array indices will be provided in its string form as `key`. The current property value will be replaced with the `replacer`'s return value for stringification. This means:\n\n- If you return a number, string, boolean, or `null`, that value is directly serialized and used as the property's value. (Returning a BigInt will throw as well.)\n- If you return a `Function`, `Symbol`, or [`undefined`](../../globals/undefined.mdx), the property is not included in the output.\n- If you return any other object, the object is recursively stringified, calling the `replacer` function on each property.\n\n> **Note:** When parsing JSON generated with `replacer` functions, you would likely want to use the [`reviver`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#using_the_reviver_parameter) parameter to perform the reverse operation.\n\nTypically, array elements' index would never shift (even when the element is an invalid value like a function, it will become `null` instead of omitted). Using the `replacer` function allows you to control the order of the array elements by returning a different array.\n\n### The space parameter\n\nThe `space` parameter may be used to control spacing in the final string.\n\n- If it is a number, successive levels in the stringification will each be indented by this many space characters.\n- If it is a string, successive levels will be indented by this string.\n\nEach level of indentation will never be longer than 10. Number values of `space` are clamped to 10, and string values are truncated to 10 characters.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Map/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get Map\\[Symbol.species]\n\nThe **`Map[Symbol.species]`** accessor property is an unused accessor property specifying how to copy `Map` objects.\n\n## Syntax\n\n```js\nMap[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct copied `Map` instances.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `Map` objects. Subclass constructors may override it to change the constructor assignment.\n\n> **Note:** This property is currently unused by all `Map` methods.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Map/Map.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map()\n\nThe **`Map()` constructor** creates [Map](../../globals/Map/Map.mdx) objects.\n\n## Syntax\n\n```js\nnew Map()\nnew Map(iterable)\n```\n\n> **Note:** `Map()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable` _**optional**_\n  - : An `Array` or other\n    [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) object\n    whose elements are key-value pairs. (For example, arrays with two elements,\n    such as `[[ 1, 'one' ],[ 2, 'two' ]]`.) Each key-value pair is added to the\n    new `Map`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Map/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype\\[Symbol.iterator]()\n\nThe **`Symbol.iterator`** method of a `Map` object implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows maps to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the key-value pairs of the map.\n\nThe initial value of this property is the same function object as the initial value of the [`Map.prototype.entries`](../../../globals/Map/prototype/entries.mdx) property.\n\n## Syntax\n\n```js\nmap[Symbol.iterator]()\n```\n\n### Return value\n\nThe same return value as [`Map.prototype.entries()`](../../../globals/Map/prototype/entries.mdx): a new iterable iterator object that yields the key-value pairs of the map.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Map/prototype/clear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.clear()\n\nThe **`clear()`** method removes all elements from a `Map` object.\n\n## Syntax\n\n```js\nclear()\n```\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Map/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.delete()\n\nThe **`delete()`** method removes the specified element from a `Map` object by\nkey.\n\n## Syntax\n\n```js\ndelete(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to remove from the `Map` object.\n\n### Return value\n\n`true` if an element in the `Map` object existed and has been removed, or\n`false` if the element does not exist.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Map/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.entries()\n\nThe **`entries()`** method returns a new\n_[iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators)_ object\nthat contains the `[key, value]` pairs for each element in the `Map` object in\ninsertion order. In this particular case, this iterator object is also an\niterable, so the for-of loop can be used. When the protocol `[Symbol.iterator]`\nis used, it returns a function that, when invoked, returns this iterator itself.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nA new [Map](../../../globals/Map/Map.mdx) iterator object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Map/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.forEach()\n\nThe **`forEach()`** method executes a provided function once per each key/value\npair in the `Map` object, in insertion order.\n\n## Syntax\n\n```js\n// Arrow function\nforEach(() => { /* … */ } )\nforEach((value) => { /* … */ } )\nforEach((value, key) => { /* … */ } )\nforEach((value, key, map) => { /* … */ } )\n\n// Callback function\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n\n// Inline callback function\nforEach(function() { /* … */ })\nforEach(function(value) { /* … */ })\nforEach(function(value, key) { /* … */ })\nforEach(function(value, key, map) { /* … */ })\nforEach(function(value, key, map) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n  - : Function to execute for each entry in the map. It takes the following\n    arguments:\n    - `value` _**optional**_\n      - : Value of each iteration.\n    - `key` _**optional**_\n      - : Key of each iteration.\n    - `map` _**optional**_\n      - : The map being iterated.\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `callback`.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n## Description\n\nThe `forEach` method executes the provided `callback` once for each key of the\nmap which actually exist. It is not invoked for keys which have been deleted.\nHowever, it is executed for values which are present but have the value\n`undefined`.\n\n`callback` is invoked with **three arguments**:\n\n- the entry's `value`\n- the entry's `key`\n- the **`Map` object** being traversed\n\nIf a `thisArg` parameter is provided to `forEach`, it will be passed to\n`callback` when invoked, for use as its `this` value. Otherwise, the value\n`undefined` will be passed for use as its `this` value. The `this` value\nultimately observable by `callback` is determined according to\n[the usual rules for determining the `this` seen by a function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this).\n\nEach value is visited once, except in the case when it was deleted and re-added\nbefore `forEach` has finished. `callback` is not invoked for values deleted\nbefore being visited. New values added before `forEach` has finished will be\nvisited.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Map/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.get()\n\nThe **`get()`** method returns a specified element from a `Map` object. If the\nvalue that is associated to the provided key is an object, then you will get a\nreference to that object and any change made to that object will effectively\nmodify it inside the `Map` object.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to return from the `Map` object.\n\n### Return value\n\nThe element associated with the specified key, or\n[`undefined`](../../../globals/undefined.mdx) if the key can't be found in the `Map` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Map/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.has()\n\nThe **`has()`** method returns a boolean indicating whether an element with the\nspecified key exists or not.\n\n## Syntax\n\n```js\nhas(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to test for presence in the `Map` object.\n\n### Return value\n\n`true` if an element with the specified key exists in the `Map` object;\notherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Map/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.keys()\n\nThe **`keys()`** method returns a new\n_[iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators)_ object\nthat contains the keys for each element in the `Map` object in insertion order. In this particular case, this iterator object is also an iterable, so a [for...of](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loop can be used.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nA new [Map](../../../globals/Map/Map.mdx) iterator object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Map/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.set()\n\nThe **`set()`** method adds or updates an entry in a `Map` object with a specified key and a value.\n\n## Syntax\n\n```js\nset(key, value)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to add to the `Map` object. The key may be any [JavaScript type](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures) (any [primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_values) or any type of [JavaScript object](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#objects)).\n- `value`\n  - : The value of the element to add to the `Map` object. The value may be any [JavaScript type](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures) (any [primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_values) or any type of [JavaScript object](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#objects)).\n\n### Return value\n\nThe `Map` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Map/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.size\n\nThe **`size`** accessor property returns the number of elements in a\n[Map](../../../globals/Map/Map.mdx) object.\n\n## Description\n\nThe value of `size` is an integer representing how many entries the `Map` object\nhas. A set accessor function for `size` is `undefined`; you can not change this\nproperty.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Map/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.values()\n\nThe **`values()`** method returns a new\n_[iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators)_ object\nthat contains the values for each element in the `Map` object in insertion\norder.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nA new [Map](../../../globals/Map/Map.mdx) iterator object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/E.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.E\n\nThe **`Math.E`** property represents Euler's number, the base of natural logarithms, e, which is approximately 2.718.\n\n## Value\n\n`2.718281828459045`\n\n## Description\n\nBecause `E` is a static property of `Math`, you always use it as `Math.E`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/LN10.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LN10\n\nThe **`Math.LN10`** property represents the natural logarithm of 10, approximately 2.302.\n\n## Value\n\n`2.302585092994046`\n\n## Description\n\nBecause `LN10` is a static property of `Math`, you always use it as `Math.LN10`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/LN2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LN2\n\nThe **`Math.LN2`** property represents the natural logarithm of 2, approximately 0.693:\n\n## Value\n\n`0.6931471805599453`\n\n## Description\n\nBecause `LN2` is a static property of `Math`, you always use it as `Math.LN2`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/LOG10e.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LOG10E\n\nThe **`Math.LOG10E`** property represents the base 10 logarithm of [E](./E.mdx), approximately 0.434.\n\n## Value\n\n`0.4342944819032518`\n\n## Description\n\nBecause `LOG10E` is a static property of `Math`, you always use it as `Math.LOG10E`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/LOG2e.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LOG2E\n\nThe **`Math.LOG2E`** property represents the base 2 logarithm of [E](./E.mdx), approximately 1.442.\n\n## Value\n\n`1.4426950408889634`\n\n## Description\n\nBecause `LOG2E` is a static property of `Math`, you always use it as `Math.LOG2E`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/PI.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.PI\n\nThe **`Math.PI`** property represents the ratio of the circumference of a circle to its diameter, approximately 3.14159.\n\n## Value\n\n`3.141592653589793`\n\n## Description\n\nBecause `PI` is a static property of `Math`, you always use it as `Math.PI`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/SQRT1_2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.SQRT1_2\n\nThe **`Math.SQRT1_2`** property represents the square root of 1/2, which is approximately 0.707.\n\n## Value\n\n`0.7071067811865476`\n\n## Description\n\n`Math.SQRT1_2` is a constant and a more performant equivalent to [`Math.sqrt(0.5)`](./sqrt.mdx).\n\nBecause `SQRT1_2` is a static property of `Math`, you always use it as `Math.SQRT1_2`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/SQRT2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.SQRT2\n\nThe **`Math.SQRT2`** property represents the square root of 2, approximately 1.414.\n\n## Value\n\n`0.7071067811865476`\n\n## Description\n\n`Math.SQRT2` is a constant and a more performant equivalent to [`Math.sqrt(2)`](./sqrt.mdx).\n\nBecause `SQRT2` is a static property of `Math`, you always use it as `Math.SQRT2`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/abs.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.abs()\n\nThe **`Math.abs()`** function returns the absolute value of a number.\n\n\n## Syntax\n\n```js\nMath.abs(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe absolute value of `x`. If `x` is negative (including `-0`), returns `-x`. Otherwise, returns `x`. The result is therefore always a positive number or `0`.\n\n## Description\n\nBecause `abs()` is a static method of `Math`, you always use it as `Math.abs()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/acos.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.acos()\n\nThe **`Math.acos()`** function returns the inverse cosine (in radians) of a number.\n\n## Syntax\n\n```js\nMath.acos(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number between -1 and 1, inclusive, representing the angle's cosine value.\n\n### Return value\n\nThe inverse cosine (angle in radians between 0 and π, inclusive) of `x`. If `x` is less than -1 or greater than 1, returns `NaN`.\n\n## Description\n\nBecause `acos()` is a static method of `Math`, you always use it as `Math.acos()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/acosh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.acosh()\n\nThe **`Math.acosh()`** function returns the inverse hyperbolic cosine of a number.\n\n## Syntax\n\n```js\nMath.acosh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 1.\n\n### Return value\n\nThe inverse hyperbolic cosine of `x`. If `x` is less than 1, returns `NaN`.\n\n## Description\n\nBecause `acosh()` is a static method of `Math`, you always use it as `Math.acosh()`, rather than as a method of a `Math` object you created (`Math` is no constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/asin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.asin()\n\nThe **`Math.asin()`** function returns the inverse sine (in radians) of a number.\n\n## Syntax\n\n```js\nMath.asin(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number between -1 and 1, inclusive, representing the angle's sine value.\n\n### Return value\n\nThe inverse sine (angle in radians between <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math>, inclusive) of `x`. If `x` is less than -1 or greater than 1, returns `NaN`.\n\n## Description\n\nBecause `asin()` is a static method of `Math`, you always use it as `Math.asin()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/asinh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.asinh()\n\nThe **`Math.asinh()`** function returns the inverse hyperbolic sine of a number. \n\n## Syntax\n\n```js\nMath.asinh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe inverse hyperbolic sine of `x`.\n\n## Description\n\nBecause `asinh()` is a static method of `Math`, you always use it as `Math.asinh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/atan.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.atan()\n\nThe **`Math.atan()`** function returns the inverse tangent (in radians) of a number.\n\n## Syntax\n\n```js\nMath.atan(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe inverse tangent (angle in radians between <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math> and <math><semantics><mfrac><mi>π</mi><mn>2</mn></mfrac></semantics></math>, inclusive) of `x`. If `x` is `Infinity`, it returns <math><semantics><mfrac><mi>π</mi><mn>2</mn></mfrac></semantics></math>. If `x` is `-Infinity`, it returns <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math>.\n\n## Description\n\nBecause `atan()` is a static method of `Math`, you always use it as `Math.atan()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/atan2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.atan2()\n\nThe **`Math.atan2()`** function returns the angle in the plane (in radians) between the positive x-axis and the ray from (0, 0) to the point (x, y), for `Math.atan2(y, x)`.\n\n## Syntax\n\n```js\nMath.atan2(y, x)\n```\n\n### Parameters\n\n- `y`\n  - : The y coordinate of the point.\n- `x`\n  - : The x coordinate of the point.\n\n### Return value\n\nThe angle in radians (between -π and π, inclusive) between the positive x-axis and the ray from (0, 0) to the point (x, y).\n\n## Description\n\nThe `Math.atan2()` method measures the counterclockwise angle θ, in radians, between the positive x-axis and the point `(x, y)`. Note that the arguments to this function pass the y-coordinate first and the x-coordinate second.\n\n`Math.atan2()` is passed separate `x` and `y` arguments, while [`Math.atan()`](./atan.mdx) is passed the ratio of those two arguments. `Math.atan2(y, x)` differs from `Math.atan(y / x)` in the following cases:\n\n| `x`                  | `y`         | `Math.atan2(y, x)` | `Math.atan(y / x)` |\n| -------------------- | ----------- | ------------------ | ------------------ |\n| `Infinity`           | `Infinity`  | π / 4              | `NaN`              |\n| `Infinity`           | `-Infinity` | -π / 4             | `NaN`              |\n| `-Infinity`          | `Infinity`  | 3π / 4             | `NaN`              |\n| `-Infinity`          | `-Infinity` | -3π / 4            | `NaN`              |\n| 0                    | 0           | 0                  | `NaN`              |\n| 0                    | -0          | -0                 | `NaN`              |\n| < 0 (including `-0`) | 0           | π                  | 0                  |\n| < 0 (including `-0`) | -0          | -π                 | 0                  |\n| `-Infinity`          | > 0         | π                  | -0                 |\n| -0                   | > 0         | π / 2              | -π / 2             |\n| `-Infinity`          | < 0         | -π                 | 0                  |\n| -0                   | < 0         | -π / 2             | π / 2              |\n\nIn addition, for points in the second and third quadrants (`x < 0`), `Math.atan2()` would output an angle less than <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math> or greater than <math><semantics><mfrac><mi>π</mi><mn>2</mn></mfrac></semantics></math>.\n\nBecause `atan2()` is a static method of `Math`, you always use it as `Math.atan2()`, rather than as a method of a `Math` object you created (`Math` is not a constructor)."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/atanh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.atanh()\n\nThe **`Math.atanh()`** function returns the inverse hyperbolic tangent of a number. \n\n## Syntax\n\n```js\nMath.atanh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number between -1 and 1, inclusive.\n\n### Return value\n\nThe inverse hyperbolic tangent of `x`. If `x` is 1, returns `Infinity`. If `x` is -1, returns `-Infinity`. If `x` is less than -1 or greater than 1, returns `NaN`.\n\n## Description\n\nBecause `atanh()` is a static method of `Math`, you always use it as `Math.atanh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/cbrt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.cbrt()\n\nThe **`Math.cbrt()`** function returns the cube root of a number.\n\n## Syntax\n\n```js\nMath.cbrt(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe cube root of `x`.\n\n## Description\n\nBecause `cbrt()` is a static method of `Math`, you always use it as `Math.cbrt()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/ceil.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.ceil()\n\nThe **`Math.ceil()`** function always rounds up and returns the smaller integer greater than or equal to a given number.\n\n## Syntax\n\n```js\nMath.ceil(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe smallest integer greater than or equal to `x`. It's the same value as [`-Math.floor(-x)`](./floor.mdx).\n\n## Description\n\nBecause `ceil()` is a static method of `Math`, you always use it as `Math.ceil()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/clz32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.clz32()\n\nThe **`Math.clz32()`** function returns the number of leading zero bits in the 32-bit binary representation of a number.\n\n## Syntax\n\n```js\nMath.clz32(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe number of leading zero bits in the 32-bit binary representation of `x`.\n\n## Description\n\n`clz32` is short for **C**ount**L**eading**Z**eros**32**.\n\nIf `x` is not a number, it will be converted to a number first, then converted to a 32-bit unsigned integer.\n\nIf the converted 32-bit unsigned integer is `0`, `32` is returned, because all bits are `0`. If the most significant bit is `1` (i.e. the number is greater than or equal to 2<sup>31</sup>), `0` is returned.\n\nThis function is particularly useful for systems that compile to JS, like [Emscripten](https://emscripten.org).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/cos.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.cos()\n\nThe **`Math.cos()`** function returns the cosine of a number in radians.\n\n## Syntax\n\n```js\nMath.cos(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number representing an angle in radians.\n\n### Return value\n\nThe cosine of `x`, between -1 and 1, inclusive. If `x` is `Infinity`, `-Infinity`, or `NaN`, returns `NaN`.\n\n## Description\n\nBecause `cos()` is a static method of `Math`, you always use it as `Math.cos()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/cosh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.cosh()\n\nThe **`Math.cosh()`** function returns the hyperbolic cosine of a number. \n\n## Syntax\n\n```js\nMath.cosh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe hyperbolic cosine of `x`.\n\n## Description\n\nBecause `cosh()` is a static method of `Math`, you always use it as `Math.cosh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor)."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/exp.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.exp()\n\nThe **`Math.exp()`** function returns [E](./E.mdx) raised to the power of a number.\n\n## Syntax\n\n```js\nMath.exp(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nA nonnegative number representing e<sup>x</sup>, where e is [the base of the natural logarithm](./E.mdx).\n\n## Description\n\nBecause `exp()` is a static method of `Math`, you always use it as `Math.exp()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nBeware that `e` to the power of a number very close to 0 will be very close to 1 and suffer from loss of precision. In this case, you may want to use `Math.expm1` instead, and obtain a much higher-precision fractional part of the answer.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/expm1.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.expm1()\n\nThe **`Math.expm1()`** function returns [E](./E.mdx) raised to the power of a number, subtracted by 1.\n\n## Syntax\n\n```js\nMath.expm1(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nA number representing e<sup>x</sup> - 1, where e is [the base of the natural logarithm](./E.mdx).\n\n## Description\n\nFor very small values of _x_, adding 1 can reduce or eliminate precision. The double floats used in JS give you about 15 digits of precision. 1 + 1e-15 \\= 1.000000000000001, but 1 + 1e-16 = 1.000000000000000 and therefore exactly 1.0 in that arithmetic, because digits past 15 are rounded off.\n\nWhen you calculate <math display=\"inline\"><semantics><msup><mi mathvariant=\"normal\">e</mi><mi>x</mi></msup></semantics></math> where x is a number very close to 0, you should get an answer very close to 1 + x, because <math display=\"inline\"><semantics><mrow><munder><mo lspace=\"0em\" rspace=\"0em\">lim</mo><mrow><mi>x</mi><mo stretchy=\"false\">→</mo><mn>0</mn></mrow></munder><mfrac><mrow><msup><mi mathvariant=\"normal\">e</mi><mi>x</mi></msup><mo>−</mo><mn>1</mn></mrow><mi>x</mi></mfrac><mo>=</mo><mn>1</mn></mrow></semantics></math>. If you calculate `Math.exp(1.1111111111e-15) - 1`, you should get an answer close to `1.1111111111e-15`. Instead, due to the highest significant figure in the result of `Math.exp` being the units digit `1`, the final value ends up being `1.1102230246251565e-15`, with only 3 correct digits. If, instead, you calculate `Math.exp1m(1.1111111111e-15)`, you will get a much more accurate answer `1.1111111111000007e-15`, with 11 correct digits of precision.\n\nBecause `expm1()` is a static method of `Math`, you always use it as `Math.expm1()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/floor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.floor()\n\nThe **`Math.floor()`** function always rounds down and returns the largest integer less than or equal to a given number.\n\n## Syntax\n\n```js\nMath.floor(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe largest integer smaller than or equal to `x`. It's the same value as [`-Math.ceil(-x)`](./ceil.mdx).\n\n## Description\n\nBecause `floor()` is a static method of `Math`, you always use it as `Math.floor()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/fround.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.fround()\n\nThe **`Math.fround()`** function returns the nearest [32-bit single precision](https://en.wikipedia.org/wiki/Single-precision_floating-point_format) float representation of a number.\n\n## Syntax\n\n```js\nMath.fround(doubleFloat)\n```\n\n### Parameters\n\n- `doubleFloat`\n  - : A number.\n\n### Return value\n\nThe nearest [32-bit single precision](https://en.wikipedia.org/wiki/Single-precision_floating-point_format) float representation of `x`.\n\n## Description\n\nJavaScript uses 64-bit double floating-point numbers internally, which offer a very high precision. However, sometimes you may be working with 32-bit floating-point numbers, for example if you are reading values from a `Float32Array`. This can create confusion: checking a 64-bit float and a 32-bit float for equality may fail even though the numbers are seemingly identical.\n\nTo solve this, `Math.fround()` can be used to cast the 64-bit float to a 32-bit float. Internally, JavaScript continues to treat the number as a 64-bit float, it just performs a \"round to even\" on the 23rd bit of the mantissa, and sets all following mantissa bits to `0`. If the number is outside the range of a 32-bit float, `Infinity` or `-Infinity` is returned.\n\nBecause `fround()` is a static method of `Math`, you always use it as `Math.fround()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/hypot.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.hypot()\n\nThe **`Math.hypot()`** function returns the square root of the sum of squares of its arguments. \n\n## Syntax\n\n```js\nMath.hypot()\nMath.hypot(value0)\nMath.hypot(value0, value1)\nMath.hypot(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `value1`, …, `valueN`\n  - : Numbers.\n\n### Return value\n\nThe square root of the sum of squares of the given arguments. Returns Infinity if any of the arguments is ±Infinity. Otherwise, if at least one of the arguments is or is converted to NaN, returns NaN. Returns `0` if no arguments are given or all arguments are ±0.\n\n## Description\n\nCalculating the hypotenuse of a right triangle, or the magnitude of a complex number, uses the formula `Math.sqrt(v1*v1 + v2*v2)`, where v1 and v2 are the lengths of the triangle's legs, or the complex number's real and complex components. The corresponding distance in 2 or more dimensions can be calculated by adding more squares under the square root: `Math.sqrt(v1*v1 + v2*v2 + v3*v3 + v4*v4)`.\n\nThis function makes this calculation easier and faster; you call `Math.hypot(v1, v2)`, or `Math.hypot(v1, /* … ,*/, vN)`.\n\n`Math.hypot` also avoids overflow/underflow problems if the magnitude of your numbers is very large. The largest number you can represent in JS is [`Number.MAX_VALUE`](../Number/MAX_VALUE.mdx), which is around 10<sup>308</sup>. If your numbers are larger than about 10<sup>154</sup>, taking the square of them will result in Infinity. For example, `Math.sqrt(1e200*1e200 + 1e200*1e200) = Infinity`. If you use `hypot()` instead, you get a better answer: `Math.hypot(1e200, 1e200) = 1.4142...e+200` . This is also true with very small numbers. `Math.sqrt(1e-200*1e-200 + 1e-200*1e-200) = 0`, but `Math.hypot(1e-200, 1e-200) = 1.4142...e-200`.\n\nWith one argument, `Math.hypot()` is equivalent to [`Math.abs()`](./abs.mdx). [`Math.hypot.length`](../Function/prototype/length.mdx) is 2, which weakly signals that it's designed to handle at least two parameters.\n\nBecause `hypot()` is a static method of `Math`, you always use it as `Math.hypot()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/imul.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.imul()\n\nThe **`Math.imul()`** function returns the result of the C-like 32-bit multiplication of the two parameters.\n\n\n## Syntax\n\n```js\nMath.imul(a, b)\n```\n\n### Parameters\n\n- `a`\n  - : First number.\n- `b`\n  - : Second number.\n\n### Return value\n\nThe result of the C-like 32-bit multiplication of the given arguments.\n\n## Description\n\n`Math.imul()` allows for 32-bit integer multiplication with C-like semantics. This feature is useful for projects like [Emscripten](https://en.wikipedia.org/wiki/Emscripten).\n\nBecause `imul()` is a static method of `Math`, you always use it as `Math.imul()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nIf you use normal JavaScript floating point numbers in `imul()`, you will experience a degrade in performance. This is because of the costly conversion from a floating point to an integer for multiplication, and then converting the multiplied integer back into a floating point.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/log.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log()\n\nThe **`Math.log()`** function returns the natural logarithm (base [E](./E.mdx)) of a number.\n\n## Syntax\n\n```js\nMath.log(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe natural logarithm (base [E](./E.mdx)) of `x`. If `x` is ±0, returns [`-Infinity`](../Number/NEGATIVE_INFINITY.mdx). If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `log()` is a static method of `Math`, you always use it as `Math.log()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nIf you need the natural log of 2 or 10, use the constants `Math.LN2` or `Math.LN10`. If you need a logarithm to base 2 or 10, use `Math.log2()` or `Math.log10()`. If you need a logarithm to other bases, use `Math.log(x) / Math.log(otherBase)` as in the example below; you might want to precalculate `1 / Math.log(otherBase)` since multiplication in `Math.log(x) * constant` is much faster.\n\nBeware that positive numbers very close to 1 can suffer from loss of precision and make its natural logarithm less accurate. In this case, you may want to use `Math.log1p` instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/log10.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log10()\n\nThe **`Math.log10()`** function returns the base 10 logarithm of a number. \n\n## Syntax\n\n```js\nMath.log10(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe base 10 logarithm of `x`. If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `log10()` is a static method of `Math`, you always use it as `Math.log10()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nThis function is the equivalent of `Math.log(x) / Math.log(10)`. For `log10(e)`, use the constant `Math.LOG10E`, which is 1 / `Math.LN10`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/log1p.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log1p()\n\nThe **`Math.log1p()`** function returns the natural logarithm (base [E](./E.mdx)) of `1 + x`, where `x` is the argument.\n\n## Syntax\n\n```js\nMath.log1p(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to -1.\n\n### Return value\n\nThe natural logarithm (base [E](./E.mdx)) of `x + 1`. If `x` is -1, returns [`-Infinity`](../Number/NEGATIVE_INFINITY.mdx). If `x < -1`, returns `NaN`.\n\n## Description\n\nFor very small values of _x_, adding 1 can reduce or eliminate precision. The double floats used in JS give you about 15 digits of precision. 1 + 1e-15 \\= 1.000000000000001, but 1 + 1e-16 = 1.000000000000000 and therefore exactly 1.0 in that arithmetic, because digits past 15 are rounded off.\n\nWhen you calculate log(1 + _x_) where _x_ is a small positive number, you should get an answer very close to _x_, because <math display=\"inline\"><semantics><mrow><munder><mo movablelimits=\"true\" form=\"prefix\">lim</mo><mrow ><mi>x</mi><mo stretchy=\"false\">→</mo><mn>0</mn></mrow></munder><mfrac><mrow><mi>log</mi><mo>⁡</mo><mo stretchy=\"false\">(</mo><mn>1</mn><mo>+</mo><mi>x</mi><mo stretchy=\"false\">)</mo></mrow><mi>x</mi></mfrac><mo>=</mo><mn>1</mn></mrow></semantics></math>. If you calculate `Math.log(1 + 1.1111111111e-15)`, you should get an answer close to `1.1111111111e-15`. Instead, you will end up taking the logarithm of `1.00000000000000111022` (the roundoff is in binary, so sometimes it gets ugly), and get the answer 1.11022…e-15, with only 3 correct digits. If, instead, you calculate `Math.log1p(1.1111111111e-15)`, you will get a much more accurate answer `1.1111111110999995e-15`, with 15 correct digits of precision (actually 16 in this case).\n\nIf the value of `x` is less than -1, the return value is always `NaN`.\n\nBecause `log1p()` is a static method of `Math`, you always use it as `Math.log1p()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/log2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log2()\n\nThe **`Math.log2()`** function returns the base 2 logarithm of a number.\n\n## Syntax\n\n```js\nMath.log2(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe base 2 logarithm of `x`. If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `log2()` is a static method of `Math`, you always use it as `Math.log2()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nThis function is the equivalent of `Math.log(x) / Math.log(2)`. For `log2(e)`, use the constant `Math.LOG2E`, which is 1 / `Math.LN2`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/max.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.max()\n\nThe **`Math.max()`** function returns the largest of the numbers given as input parameters, or `-Infinity` if there are no parameters.\n\n## Syntax\n\n```js\nMath.max()\nMath.max(value0)\nMath.max(value0, value1)\nMath.max(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `value1`, `value2`, … , `valueN`\n  - : Zero or more numbers among which the largest value will be selected and returned.\n\n### Return value\n\nThe largest of the given numbers. Returns `NaN` if any of the parameters is or is converted into `NaN`. Returns `-Infinity` if no parameters are provided.\n\n## Description\n\nBecause `max()` is a static method of `Math`, you always use it as `Math.max()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n[`Math.max.length`](../Function/prototype/length.mdx) is 2, which weakly signals that it's designed to handle at least two parameters.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/min.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.min()\n\nThe **`Math.min()`** function returns the smallest of the numbers given as input parameters, or `Infinity` if there are no parameters.\n\n## Syntax\n\n```js\nMath.min()\nMath.min(value0)\nMath.min(value0, value1)\nMath.min(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `value1`, …, `valueN`\n  - : Zero or more numbers among which the lowest value will be selected and returned.\n\n### Return value\n\nThe smallest of the given numbers. Returns `NaN` if any of the parameters is or is converted into `NaN`. Returns `Infinity` if no parameters are provided.\n\n## Description\n\nBecause `min()` is a static method of `Math`, you always use it as `Math.min()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n[`Math.min.length`](../Function/prototype/length.mdx) is 2, which weakly signals that it's designed to handle at least two parameters.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/pow.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.pow()\n\nThe **`Math.pow()`** method returns the value of a base raised to a power.\n\n## Syntax\n\n```js\nMath.pow(base, exponent)\n```\n\n### Parameters\n\n- `base`\n  - : The base number.\n- `exponent`\n  - : The exponent number.\n\n### Return value\n\nA number representing `base` taken to the power of `exponent`. Returns `NaN` in one of the following cases:\n\n- `exponent` is `NaN`.\n- `base` is `NaN` and `exponent` is not `0`.\n- `base` is ±1 and `exponent` is ±`Infinity`.\n- `base < 0` and `exponent` is not an integer.\n\n## Description\n\n`Math.pow()` is equivalent to the `**` operator, except `Math.pow()` only accepts numbers.\n\n`Math.pow(NaN, 0)` (and the equivalent `NaN ** 0`) is the only case where `NaN` doesn't propagate through mathematical operations — it returns `1` despite the operand being `NaN`. In addition, the behavior where `base` is 1 and `exponent` is non-finite (±Infinity or `NaN`) is different from IEEE 754, which specifies that the result should be 1, whereas JavaScript returns `NaN` to preserve backward compatibility with its original behavior.\n\nBecause `pow()` is a static method of `Math`, use it as `Math.pow()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/random.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.random()\n\nThe **`Math.random()`** function returns a floating-point, pseudo-random number that's greater than or equal to 0 and less than 1, with approximately uniform distribution over that range — which you can then scale to your desired range. The implementation selects the initial seed to the random number generation algorithm; it cannot be chosen or reset by the user.\n\n> **Note:** `Math.random()` _does not_ provide cryptographically secure random numbers. Do not use them for anything related to security. Use the Web Crypto API instead, and more precisely the `crypto.getRandomValues()` method.\n\n## Syntax\n\n```js\nMath.random()\n```\n\n### Return value\n\nA floating-point, pseudo-random number between 0 (inclusive) and 1 (exclusive).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/round.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.round()\n\nThe **`Math.round()`** function returns the value of a number rounded to the nearest integer.\n\n## Syntax\n\n```js\nMath.round(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe value of `x` rounded to the nearest integer.\n\n## Description\n\nIf the fractional portion of the argument is greater than 0.5, the argument is rounded to the integer with the next higher absolute value. If it is less than 0.5, the argument is rounded to the integer with the lower absolute value. If the fractional portion is exactly 0.5, the argument is rounded to the next integer in the direction of +∞.\n\n> **Note:** This differs from many languages' `round()` functions, which often round half-increments _away from zero_, giving a different result in the case of negative numbers with a fractional part of exactly 0.5.\n\n`Math.round(x)` is not exactly the same as [`Math.floor(x + 0.5)`](./floor.mdx). When `x` is -0, or -0.5 ≤ x < 0, `Math.round(x)` returns -0, while `Math.floor(x + 0.5)` returns 0. However, neglecting that difference and potential precision errors, `Math.round(x)` and `Math.floor(x + 0.5)` are generally equivalent.\n\nBecause `round()` is a static method of `Math`, you always use it as `Math.round()`, rather than as a method of a `Math` object you created (`Math` has no constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/sign.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sign()\n\nThe **`Math.sign()`** function returns 1 or -1, indicating the sign of the number passed as argument. If the input is 0 or -0, it will be returned as-is.\n\n## Syntax\n\n```js\nMath.sign(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nA number representing the sign of `x`:\n\n- If `x` is positive, returns `1`.\n- If `x` is negative, returns `-1`.\n- If `x` is positive zero, returns `0`.\n- If `x` is negative zero, returns `-0`.\n- Otherwise, returns `NaN`.\n\n## Description\n\nBecause `sign()` is a static method of `Math`, you always use it as `Math.sign()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/sin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sin()\n\nThe **`Math.sin()`** function returns the sine of a number in radians.\n\n## Syntax\n\n```js\nMath.sin(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number representing an angle in radians.\n\n### Return value\n\nThe sine of `x`, between -1 and 1, inclusive. If `x` is `Infinity`, `-Infinity`, or `NaN`, returns `NaN`.\n\n## Description\n\nBecause `sin()` is a static method of `Math`, you always use it as `Math.sin()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/sinh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sinh()\n\nThe **`Math.sinh()`** function returns the hyperbolic sine of a number. \n\n## Syntax\n\n```js\nMath.sinh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe hyperbolic sine of `x`.\n\n## Description\n\nBecause `sinh()` is a static method of `Math`, you always use it as `Math.sinh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/sqrt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sqrt()\n\nThe **`Math.sqrt()`** function returns the square root of a number.\n\n## Syntax\n\n```js\nMath.sqrt(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe square root of `x`, a nonnegative number. If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `sqrt()` is a static method of `Math`, you always use it as `Math.sqrt()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/tan.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.tan()\n\nThe **`Math.tan()`** function returns the tangent of a number in radians.\n\n\n## Syntax\n\n```js\nMath.tan(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number representing an angle in radians.\n\n### Return value\n\nThe tangent of `x`. If `x` is `Infinity`, `-Infinity`, or `NaN`, returns `NaN`.\n\n> **Note:** Due to floating point precision, it's not possible to obtain the exact value π/2, so the result is always finite if not `NaN`.\n\n## Description\n\nBecause `tan()` is a static method of `Math`, you always use it as `Math.tan()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/tanh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.tanh()\n\nThe **`Math.tanh()`** function returns the hyperbolic tangent of a number. \n\n## Syntax\n\n```js\nMath.tanh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe hyperbolic tangent of `x`.\n\n## Description\n\nBecause `tanh()` is a static method of `Math`, you always use it as `Math.tanh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Math/trunc.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.trunc()\n\nThe **`Math.trunc()`** function returns the integer part of a number by removing any fractional digits.\n\n## Syntax\n\n```js\nMath.trunc(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe integer part of `x`.\n\n## Description\n\nUnlike the other three `Math` methods: `Math.floor()`, `Math.ceil()` and `Math.round()`, the way `Math.trunc()` works is very simple. It _truncates_ (cuts off) the dot and the digits to the right of it, no matter whether the argument is a positive or negative number.\n\nBecause `trunc()` is a static method of `Math`, you always use it as `Math.trunc()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/NaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# NaN\n\nThe global **`NaN`** property is a value representing Not-A-Number.\n\n## Value\n\nThe same number value as [`Number.NaN`](./Number/NaN.mdx).\n\n## Description\n\n`NaN` is a property of the _global object_. In other words, it is a variable in global scope.\n\nIn modern browsers, `NaN` is a non-configurable, non-writable property. Even when this is not the case, avoid overriding it.\n\nThere are five different types of operations that return `NaN`:\n\n- Failed number conversion (e.g. explicit ones like `parseInt(\"blabla\")`, `Number(undefined)`, or implicit ones like `Math.abs(undefined)`)\n- Math operation where the result is not a real number (e.g. `Math.sqrt(-1)`)\n- Indeterminate form (e.g. `0 * Infinity`, `1 ** Infinity`, `Infinity / Infinity`, `Infinity - Infinity`)\n- A method or expression whose operand is or gets coerced to `NaN` (e.g. `7 ** NaN`, `7 * \"blabla\"`) — this means `NaN` is contagious\n- Other cases where an invalid value is to be represented as a number (e.g. an invalid `new Date(\"blabla\").getTime()`, `\"\".charCodeAt(1)`)\n\n`NaN` and its behaviors are not invented by JavaScript. Its semantics in floating point arithmetic (including that `NaN !== NaN`) are specified by [IEEE 754](https://en.wikipedia.org/wiki/Double_precision_floating-point_format). `NaN`'s behaviors include:\n\n- If `NaN` is involved in a mathematical operation (but not [bitwise operations](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators#bitwise_shift_operators)), the result is usually also `NaN`. (See see [silently escaping NaN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN#silently_escaping_nan) for a counter-example.)\n- When `NaN` is one of the operands of any relational comparison (`>`, `<`, `>=`, `<=`), the result is always `false`.\n- `NaN` compares unequal (via [`==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Equality), [`!=`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Inequality), [`===`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality), and [`!==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_inequality)) to any other value — including to another `NaN` value.\n\n`NaN` is also one of the [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) values in JavaScript.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Number/MAX_SAFE_INTEGER.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MAX_SAFE_INTEGER\n\nThe **`Number.MAX_SAFE_INTEGER`** constant represents the maximum safe integer in JavaScript (2<sup>53</sup> – 1).\n\nFor larger integers, consider using `BigInt`.\n\n## Value\n\n`9007199254740991` (9,007,199,254,740,991, or \\~9 quadrillion).\n\n## Description\n\n[Double precision floating point format](https://en.wikipedia.org/wiki/Double_precision_floating-point_format) only has 52 bits to represent the [mantissa](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_encoding), so it can only safely represent integers between -(2<sup>53</sup> – 1) and 2<sup>53</sup> – 1. \"Safe\" in this context refers to the ability to represent integers exactly and to compare them correctly. For example, `Number.MAX_SAFE_INTEGER + 1 === Number.MAX_SAFE_INTEGER + 2` will evaluate to true, which is mathematically incorrect. See `Number.isSafeInteger()` for more information.\n\nBecause `MAX_SAFE_INTEGER` is a static property of `Number`, you always use it as `Number.MAX_SAFE_INTEGER`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Number/MAX_VALUE.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MAX_VALUE\n\nThe **`Number.MAX_VALUE`** property represents the maximum numeric value representable in JavaScript.\n\n## Value\n\n2<sup>1024</sup> - 1, or approximately `1.7976931348623157E+308`.\n\n## Description\n\nValues larger than `MAX_VALUE` are represented as [`Infinity`](../../globals/Infinity.mdx) and will lose their actual value.\n\nBecause `MAX_VALUE` is a static property of `Number`, you always use it as `Number.MAX_VALUE`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Number/MIN_SAFE_INTEGER.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MIN_SAFE_INTEGER\n\nThe **`Number.MIN_SAFE_INTEGER`** constant represents the minimum safe integer in JavaScript, or -(2<sup>53</sup> - 1).\n\nTo represent integers smaller than this, consider using `BigInt`.\n\n## Value\n\n`-9007199254740991` (-9,007,199,254,740,991, or about -9 quadrillion).\n\n## Description\n\n[Double precision floating point format](https://en.wikipedia.org/wiki/Double_precision_floating-point_format) only has 52 bits to represent the [mantissa](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_encoding), so it can only safely represent integers between -(2<sup>53</sup> – 1) and 2<sup>53</sup> – 1. Safe in this context refers to the ability to represent integers exactly and to correctly compare them. For example, `Number.MIN_SAFE_INTEGER - 1 === Number.MIN_SAFE_INTEGER - 2` will evaluate to true, which is mathematically incorrect. See `Number.isSafeInteger()` for more information.\n\nBecause `MIN_SAFE_INTEGER` is a static property of `Number`, you always use it as `Number.MIN_SAFE_INTEGER`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Number/MIN_VALUE.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MIN_VALUE\n\nThe **`Number.MIN_VALUE`** property represents the smallest positive numeric value representable in JavaScript.\n\n## Value\n\n2<sup>-1074</sup>, or `5E-324`.\n\n## Description\n\n`Number.MIN_VALUE` is the smallest positive number (not the most negative number) that can be represented within float precision — in other words, the number closest to 0. The ECMAScript spec doesn't define a precise value that implementations are required to support — instead the spec says, _\"must be the smallest non-zero positive value that can actually be represented by the implementation\"_. This is because small IEEE-754 floating point numbers are [denormalized](https://en.wikipedia.org/wiki/Subnormal_number), but implementations are not required to support this representation, in which case `Number.MIN_VALUE` may be larger.\n\nIn practice, its precise value in mainstream engines like V8 (used by Chrome, Edge, Node.js), SpiderMonkey (used by Firefox), and JavaScriptCore (used by Safari) is 2<sup>-1074</sup>, or `5E-324`.\n\nBecause `MIN_VALUE` is a static property of `Number`, you always use it as `Number.MIN_VALUE`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Number/NEGATIVE_INFINITY.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.NEGATIVE_INFINITY\n\nThe **`Number.NEGATIVE_INFINITY`** property represents the negative Infinity value.\n\n## Value\n\nThe same as the negative value of the global [`Infinity`](../../globals/Infinity.mdx) property.\n\n## Description\n\nThe `Number.NEGATIVE_INFINITY` value behaves slightly differently than mathematical infinity:\n\n- Any positive value, including `Number.POSITIVE_INFINITY`, multiplied by `Number.NEGATIVE_INFINITY` is `Number.NEGATIVE_INFINITY`.\n- Any negative value, including `Number.NEGATIVE_INFINITY`, multiplied by `Number.NEGATIVE_INFINITY` is `Number.POSITIVE_INFINITY`.\n- Any positive value divided by `Number.NEGATIVE_INFINITY` is [negative zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754)).\n- Any negative value divided by `Number.NEGATIVE_INFINITY` is [positive zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754)).\n- Zero multiplied by `Number.NEGATIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- [`NaN`](../../globals/NaN.mdx) multiplied by `Number.NEGATIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- `Number.NEGATIVE_INFINITY`, divided by any negative value except `Number.NEGATIVE_INFINITY`, is `Number.POSITIVE_INFINITY`.\n- `Number.NEGATIVE_INFINITY`, divided by any positive value except `Number.POSITIVE_INFINITY`, is `Number.NEGATIVE_INFINITY`.\n- `Number.NEGATIVE_INFINITY`, divided by either `Number.NEGATIVE_INFINITY` or `Number.POSITIVE_INFINITY`, is [`NaN`](../../globals/NaN.mdx).\n- `x > Number.NEGATIVE_INFINITY` is true for any number _x_ that isn't `Number.NEGATIVE_INFINITY`.\n\nYou might use the `Number.NEGATIVE_INFINITY` property to indicate an error condition that returns a finite number in case of success. Note, however, that [`NaN`](../../globals/NaN.mdx) would be more appropriate in such a case.\n\nBecause `Number.NEGATIVE_INFINITY` is a static property of `Number`, you always use it as `Number.NEGATIVE_INFINITY`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Number/NaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.NaN\n\nThe **`Number.NaN`** property represents Not-A-Number, which is equivalent to [description for the global property](../../globals/NaN.mdx). For more information about the behaviors of `NaN`, see the [`NaN`](../../globals/NaN.mdx).\n\n## Value\n\nThe number value [`NaN`](../../globals/NaN.mdx).\n\n## Description\n\nBecause `NaN` is a static property of `Number`, you always use it as `Number.NaN`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Number/Number.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number() constructor\n\nThe **`Number()` constructor** creates a `Number` object. When called instead as a function, it performs type conversion to a primitive number, which is usually more useful.\n\n## Syntax\n\n```js\nnew Number(value)\nNumber(value)\n```\n\n> **Note:** `Number()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\n- `value`\n  - : The numeric value of the object being created.\n\n### Return value\n\nWhen `Number` is called as a constructor (with `new`), it creates a `Number` object, which is **not** a primitive.\n\nWhen `Number` is called as a function, it [coerces the parameter to a number primitive](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_coercion). [BigInts](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/BigInt) are converted to numbers. If the value can't be converted, it returns [`NaN`](../../globals/NaN.mdx).\n\n> **Warning:** You should rarely find yourself using `Number` as a constructor.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Number/POSITIVE_INFINITY.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.POSITIVE_INFINITY\n\nThe **`Number.POSITIVE_INFINITY`** property represents the positive Infinity value.\n\n## Value\n\nThe same as the value of the global [`Infinity`](../../globals/Infinity.mdx) property.\n\n## Description\n\nThe `Number.POSITIVE_INFINITY` value behaves slightly differently than mathematical infinity:\n\n- Any positive value, including `Number.POSITIVE_INFINITY`, multiplied by `Number.POSITIVE_INFINITY` is `Number.POSITIVE_INFINITY`.\n- Any negative value, including `Number.NEGATIVE_INFINITY`, multiplied by `Number.POSITIVE_INFINITY` is `Number.NEGATIVE_INFINITY`.\n- Any positive number divided by `Number.POSITIVE_INFINITY` is [positive zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754)).\n- Any negative number divided by `Number.POSITIVE_INFINITY` is [negative zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754).\n- Zero multiplied by `Number.POSITIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- `NaN` multiplied by `Number.POSITIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- `Number.POSITIVE_INFINITY`, divided by any negative value except `Number.NEGATIVE_INFINITY`, is `Number.NEGATIVE_INFINITY`.\n- `Number.POSITIVE_INFINITY`, divided by any positive value except `Number.POSITIVE_INFINITY`, is `Number.POSITIVE_INFINITY`.\n- `Number.POSITIVE_INFINITY`, divided by either `Number.NEGATIVE_INFINITY` or `Number.POSITIVE_INFINITY`, is [`NaN`](../../globals/NaN.mdx).\n- `Number.POSITIVE_INFINITY > x` is true for any number _x_ that isn't `Number.POSITIVE_INFINITY`.\n\nYou might use the `Number.POSITIVE_INFINITY` property to indicate an error condition that returns a finite number in case of success. Note, however, that [`NaN`](../../globals/NaN.mdx) would be more appropriate in such a case.\n\nBecause `Number.POSITIVE_INFINITY` is a static property of `Number`, you always use it as `Number.POSITIVE_INFINITY`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Number/epsilon.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.EPSILON\n\nThe **`Number.EPSILON`** property represents the difference between 1 and the smallest floating point number greater than 1.\n\n## Value\n\n2<sup>-52</sup>, or approximately `2.2204460492503130808472633361816E-16`.\n\n## Description\n\n`Number.EPSILON` is the difference between 1 and the next greater number representable in the Number format, because [double precision floating point format](https://en.wikipedia.org/wiki/Double_precision_floating-point_format) only has 52 bits to represent the [mantissa](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_encoding), and the lowest bit has a significance of 2<sup>-52</sup>.\n\nNote that the absolute accuracy of floating numbers decreases as the number gets larger, because the exponent grows while the mantissa's accuracy stays the same. `Number.MIN_VALUE` is the smallest representable positive number, which is much smaller than `Number.EPSILON`.\n\nBecause `EPSILON` is a static property of `Number`, you always use it as `Number.EPSILON`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Number/isFinite.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isFinite()\n\nThe **`Number.isFinite()`** method determines whether the passed value is a finite number — that is, it checks that a given value is a number, and the number is neither positive [`Infinity`](../../globals/Infinity.mdx), negative `Infinity`, nor [`NaN`](../../globals/NaN.mdx).\n\n## Syntax\n\n```js\nNumber.isFinite(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested for finiteness.\n\n### Return value\n\nThe boolean value `true` if the given value is a finite number. Otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Number/isInteger.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isInteger()\n\nThe **`Number.isInteger()`** method determines whether the passed value is an integer.\n\n## Syntax\n\n```js\nNumber.isInteger(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested for being an integer.\n\n### Return value\n\nThe boolean value `true` if the given value is an integer. Otherwise `false`.\n\n## Description\n\nIf the target value is an integer, return `true`, otherwise return `false`. If the value is [`NaN`](../../globals/NaN.mdx) or [`Infinity`](../../globals/Infinity.mdx), return `false`. The method will also return `true` for floating point numbers that can be represented as integer. It will always return `false` if the value is not a number.\n\nNote that some number literals, while looking like non-integers, actually represent integers — due to the precision limit of ECMAScript floating-point number encoding (IEEE-754). For example, `5.0000000000000001` only differs from `5` by `1e-16`, which is too small to be represented. (For reference, [`Number.EPSILON`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/EPSILON) stores the distance between 1 and the next representable floating-point number greater than 1, and that is about `2.22e-16`.) Therefore, `5.0000000000000001` will be represented with the same encoding as `5`, thus making `Number.isInteger(5.0000000000000001)` return `true`.\n\nIn a similar sense, numbers around the magnitude of [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER) will suffer from loss of precision and make `Number.isInteger` return `true` even when it's not an integer. (The actual threshold varies based on how many bits are needed to represent the decimal — for example, `Number.isInteger(4500000000000000.1)` is `true`, but `Number.isInteger(4500000000000000.5)` is `false`.)\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Number/isNaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isNaN()\n\nThe **`Number.isNaN()`** method determines whether the passed value is the number value [`NaN`](../../globals/NaN.mdx), and returns `false` if the input is not of the Number type. It is a more robust version of the original, global `isNaN()` function.\n\n## Syntax\n\n```js\nNumber.isNaN(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested for [`NaN`](../../globals/NaN.mdx).\n\n### Return value\n\nThe boolean value `true` if the given value is a number with value [`NaN`](../../globals/NaN.mdx). Otherwise, `false`.\n\n## Description\n\nThe function `Number.isNaN()` provides a convenient way to check for equality with `NaN`. Note that you cannot test for equality with `NaN` using either the [`==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Equality) or [`===`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) operators, because unlike all other value comparisons in JavaScript, these evaluate to `false` whenever one operand is [`NaN`](../../globals/NaN.mdx), even if the other operand is also [`NaN`](../../globals/NaN.mdx).\n\nSince `x !== x` is only true for `NaN` among all possible JavaScript values, `Number.isNaN(x)` can also be replaced with a test for `x !== x`, despite the latter being less readable.\n\nAs opposed to the global `isNaN()` function, the `Number.isNaN()` method doesn't force-convert the parameter to a number. This makes it safe to pass values that would normally convert to [`NaN`](../../globals/NaN.mdx) but aren't actually the same value as [`NaN`](../../globals/NaN.mdx). This also means that only values of the Number type that are also [`NaN`](../../globals/NaN.mdx) return `true`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Number/isSafeInteger.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isSafeInteger()\n\nThe **`Number.isSafeInteger()`** method determines whether the provided value is a number that is a _safe integer_.\n\n## Syntax\n\n```js\nNumber.isSafeInteger(testValue)\n```\n\n### Parameters\n\n- `testValue`\n  - : The value to be tested for being a safe integer.\n\n### Return value\n\nThe boolean value `true` if the given value is a number that is a safe integer. Otherwise `false`.\n\n## Description\n\nThe safe integers consist of all integers from -(2<sup>53</sup> - 1) to 2<sup>53</sup> - 1, inclusive (±9,007,199,254,740,991). A safe integer is an integer that:\n\n- can be exactly represented as an IEEE-754 double precision number, and\n- whose IEEE-754 representation cannot be the result of rounding any other integer to fit the IEEE-754 representation.\n\nFor example, 2<sup>53</sup> - 1 is a safe integer: it can be exactly represented, and no other integer rounds to it under any IEEE-754 rounding mode. In contrast, 2<sup>53</sup> is _not_ a safe integer: it can be exactly represented in IEEE-754, but the integer 2<sup>53</sup> + 1 can't be directly represented in IEEE-754 but instead rounds to 2<sup>53</sup> under round-to-nearest and round-to-zero rounding.\n\nHandling values larger or smaller than \\~9 quadrillion with full precision requires using an [arbitrary precision arithmetic library](https://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic). See [What Every Programmer Needs to Know about Floating Point Arithmetic](https://floating-point-gui.de/) for more information on floating point representations of numbers.\n\nFor larger integers, consider using the `BigInt` type.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Number/parseFloat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.parseFloat()\n\nThe **`Number.parseFloat()`** method parses an argument and returns a floating point number. If a number cannot be parsed from the argument, it returns [`NaN`](../../globals/NaN.mdx).\n\n## Syntax\n\n```js\nNumber.parseFloat(string)\n```\n\n### Parameters\n\n- `string`\n  - : The value to parse, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). Leading whitespace in this argument is ignored.\n\n### Return value\n\nA floating point number parsed from the given `string`.\n\nOr [`NaN`](../../globals/NaN.mdx) when the first non-whitespace character cannot be converted to a number.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Number/parseInt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.parseInt()\n\nThe **`Number.parseInt()`** method parses a string argument and\nreturns an integer of the specified radix or base.\n\n## Syntax\n\n```js\nNumber.parseInt(string)\nNumber.parseInt(string, radix)\n```\n\n### Parameters\n\n- `string`\n  - : The value to parse, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). Leading whitespace in this argument is ignored.\n- `radix` _**optional**_\n\n  - : An integer between `2` and `36` that represents the\n    _radix_ (the base in mathematical numeral systems) of the\n    `string`.\n\n    If `radix` is undefined or `0`, it is assumed to be `10` except when the number begins with the code unit pairs `0x` or `0X`, in which case a radix of `16` is assumed.\n\n### Return value\n\nAn integer parsed from the given `string`.\n\nIf the `radix` is smaller than `2` or bigger than\n`36`, or the first non-whitespace character cannot be converted to a number,\n[`NaN`](../../globals/NaN.mdx) is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Number/prototype/toExponential.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toExponential()\n\nThe **`toExponential()`** method returns a string representing\nthe `Number` object in exponential notation.\n\n## Syntax\n\n```js\ntoExponential()\ntoExponential(fractionDigits)\n```\n\n### Parameters\n\n- `fractionDigits` _**optional**_\n  - : Optional. An integer specifying the number of digits after the decimal point.\n    Defaults to as many digits as necessary to specify the number.\n\n### Return value\n\nA string representing the given `Number` object in exponential notation\nwith one digit before the decimal point, rounded to\n`fractionDigits` digits after the decimal point.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : If `fractionDigits` is too small or too large. Values between\n    `0` and `100`, inclusive, will not cause a\n    [`RangeError`](../../../globals/RangeError/RangeError.mdx).\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If this method is invoked on an object that is not a `Number`.\n\n## Description\n\nIf the `fractionDigits` argument is omitted, the number of digits\nafter the decimal point defaults to the number of digits necessary to represent the\nvalue uniquely.\n\nIf you use the `toExponential()` method for a numeric literal and the\nnumeric literal has no exponent and no decimal point, leave whitespace(s) before the dot\nthat precedes the method call to prevent the dot from being interpreted as a decimal\npoint.\n\nIf a number has more digits than requested by the\n`fractionDigits` parameter, the number is rounded to the nearest\nnumber represented by `fractionDigits` digits. See the discussion\nof rounding in the description of the [`Number.prototype.toFixed()`](../../../globals/Number/prototype/toFixed.mdx) method, which also applies to `toExponential()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Number/prototype/toFixed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toFixed()\n\nThe **`toFixed()`** method formats a number using fixed-point notation.\n\n## Syntax\n\n```js\ntoFixed()\ntoFixed(digits)\n```\n\n### Parameters\n\n- `digits` _**optional**_\n  - : The number of digits to appear after the decimal point; should be a value between `0` and `100`, inclusive. If this argument is omitted, it is treated as `0`.\n\n### Return value\n\nA string representing the given number using fixed-point notation.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : If `digits` is smaller than `0`, larger than `100`, or is `NaN`.\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If this method is invoked on an object that is not a `Number`.\n\n## Description\n\nThe `toFixed()` method returns a string representation of `numObj` that does not use exponential notation and has exactly `digits` digits after the decimal place. The number is rounded if necessary, and the fractional part is padded with zeros if necessary so that it has the specified length.\n\nIf the absolute value of `numObj` is greater or equal to 10<sup>21</sup>, this method uses the same algorithm as [`Number.prototype.toString()`](../../../globals/Number/prototype/toString.mdx) and returns a string in exponential notation. `toFixed()` returns `\"Infinity\"`, `\"NaN\"`, or `\"-Infinity\"` if the value of `numObj` is non-finite.\n\nThe output of `toFixed()` may be more precise than [`toString()`](../../../globals/Number/prototype/toString.mdx) for some values, because `toString()` only prints enough significant digits to distinguish the number from adjacent number values. For example:\n\n```js\n(1000000000000000128).toString(); // '1000000000000000100'\n(1000000000000000128).toFixed(0); // '1000000000000000128'\n```\n\nHowever, choosing a `digits` precision that's too high can return unexpected results, because decimal fractional numbers cannot be represented precisely in floating point. For example:\n\n```js\n0.3.toFixed(50); // '0.29999999999999998889776975374843459576368331909180'\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Number/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string with a language-sensitive representation of this number. In implementations with [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) support, this method simply calls `Intl.NumberFormat`.\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` parameters customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat), these parameters correspond exactly to the [`Intl.NumberFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) constructor's parameters. Implementations without `Intl.NumberFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#locales) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored.\n\nSee the [`Intl.NumberFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string with a language-sensitive representation of the given number.\n\nIn implementations with `Intl.NumberFormat`, this is equivalent to `new Intl.NumberFormat(locales, options).format(number)`.\n\n## Performance\n\nWhen formatting large numbers of numbers, it is better to create a\n`Intl.NumberFormat` object and use the function provided by its\n`format` property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Number/prototype/toPrecision.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toPrecision()\n\nThe **`toPrecision()`** method returns a string representing\nthe `Number` object to the specified precision.\n\n## Syntax\n\n```js\ntoPrecision()\ntoPrecision(precision)\n```\n\n### Parameters\n\n- `precision` _**optional**_\n  - : An integer specifying the number of significant digits.\n\n### Return value\n\nA string representing a `Number` object in fixed-point or exponential\nnotation rounded to `precision` significant digits. See the discussion of\nrounding in the description of the [`Number.prototype.toFixed()`](../../../globals/Number/prototype/toFixed.mdx) method,\nwhich also applies to `toPrecision()`.\n\nIf the `precision` argument is omitted, behaves as\n[`Number.prototype.toString()`](../../../globals/Number/prototype/toString.mdx). If the `precision` argument is a\nnon-integer value, it is rounded to the nearest integer.\n\n### Exceptions\n\n- `RangeError`\n  - : If `precision` is not between `1` and `100`\n    (inclusive), a [`RangeError`](../../../globals/RangeError/RangeError.mdx) is thrown. Implementations are allowed to\n    support larger and smaller values as well. ECMA-262 only requires a precision of up to\n    21 significant digits.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Number/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified number value.\n\n## Syntax\n\n```js\ntoString()\ntoString(radix)\n```\n\n### Parameters\n\n- `radix` _**optional**_\n  - : An integer in the range `2` through `36` specifying the base to use for representing the number value. Defaults to 10.\n\n### Return value\n\nA string representing the specified number value.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `radix` is less than 2 or greater than 36.\n\n## Description\n\nThe `Number` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For `Number` values, the `toString` method returns a string representation of the value in the specified radix.\n\nFor radixes above 10, the letters of the alphabet indicate digits greater than 9. For example, for hexadecimal numbers (base 16) `a` through `f` are used.\n\nIf the specified number value is negative, the sign is preserved. This is the case even if the radix is 2; the string returned is the positive binary representation of the number value preceded by a `-` sign, **not** the two's complement of the number value.\n\nBoth `0` and `-0` have `\"0\"` as their string representation. [`Infinity`](../../../globals/Infinity.mdx) returns `\"Infinity\"` and [`NaN`](../../../globals/NaN.mdx) returns `\"NaN\"`.\n\nIf the number is not a whole number, the decimal point `.` is used to separate the decimal places. [Scientific notation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#exponential) is used if the radix is 10 and the number's magnitude (ignoring sign) is greater than or equal to 10<sup>21</sup> or less than 10<sup>-6</sup>. In this case, the returned string always explicitly specifies the sign of the exponent.\n\n```js\nconsole.log((10 ** 21.5).toString()); // \"3.1622776601683794e+21\"\nconsole.log((10 ** 21.5).toString(8)); // \"526665530627250154000000\"\n```\n\nThe `toString()` method requires its `this` value to be a `Number` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to number values.\n\nBecause `Number` doesn't have a [`[Symbol.toPrimitive]()`](../../../globals/Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `Number` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, Number _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — rather, they are directly converted using the same algorithm as the initial `toString()` implementation.\n\n```js\nNumber.prototype.toString = () => \"Overridden\";\nconsole.log(`${1}`); // \"1\"\nconsole.log(`${new Number(1)}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Number/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.valueOf()\n\nThe **`valueOf()`** method returns the wrapped primitive value\nof a `Number` object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nA number representing the primitive value of the specified `Number` object.\n\n## Description\n\nThis method is usually called internally by JavaScript and not explicitly in web code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Object/Object.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object()\n\nThe **`Object` constructor** turns the input into an object. Its behavior depends on the input's type.\n\n- If the value is [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../globals/undefined.mdx), it creates and returns an empty object.\n- Otherwise, it returns an object of a Type that corresponds to the given value.\n- If the value is an object already, it returns the value.\n\n## Syntax\n\n```js\nnew Object(value)\nObject(value)\n```\n\n> **Note:** `Object()` can be called with or without `new`. Both create a new object.\n\n### Parameters\n\n- `value`\n  - : Any value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Object/assign.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.assign()\n\nThe **`Object.assign()`** method\ncopies all [enumerable](../../globals/Object/prototype/propertyIsEnumerable.mdx)\n[own properties](../../globals/Object/hasOwn.mdx) from one or more\n_source objects_ to a _target object_. It returns the modified target\nobject.\n\n## Syntax\n\n```js\nObject.assign(target, ...sources)\n```\n\n### Parameters\n\n- `target`\n  - : The target object — what to apply the sources' properties to, which is returned\n    after it is modified.\n- `sources`\n  - : The source object(s) — objects containing the properties you want to apply.\n\n### Return value\n\nThe target object.\n\n## Description\n\nProperties in the target object are overwritten by properties in the sources if they\nhave the same \"key\". Later sources' properties overwrite earlier ones.\n\nThe `Object.assign()` method only copies _enumerable_ and\n_own_ properties from a source object to a target object. It uses\n`[[Get]]` on the source and `[[Set]]` on the target, so it will\ninvoke [getters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/get) and [setters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/set). Therefore it\n_assigns_ properties, versus copying or defining new properties. This may make it\nunsuitable for merging new properties into a prototype if the merge sources contain\ngetters.\n\nFor copying property definitions (including their enumerability) into prototypes, use\n[`Object.getOwnPropertyDescriptor()`](../../globals/Object/getOwnPropertyDescriptor.mdx) and\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx) instead.\n\nBoth `String` and `Symbol` properties are copied.\n\nIn case of an error, for example if a property is non-writable, a\n[`TypeError`](../../globals/TypeError/TypeError.mdx) is raised, and the `target` object is\nchanged if any properties are added before the error is raised.\n\n> **Note:** `Object.assign()` does not throw on\n> [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../globals/undefined.mdx) sources.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Object/create.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.create()\n\nThe **`Object.create()`** method creates a new object, using an existing object as the prototype of the newly created object.\n\n## Syntax\n\n```js\nObject.create(proto)\nObject.create(proto, propertiesObject)\n```\n\n### Parameters\n\n- `proto`\n  - : The object which should be the prototype of the newly-created object.\n- `propertiesObject` _**optional**_\n  - : If specified and not [`undefined`](../../globals/undefined.mdx), an object whose [enumerable own properties](https://developer.mozilla.org/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) specify property descriptors to be added to the newly-created object, with the corresponding property names. These properties correspond to the second argument of [`Object.defineProperties()`](../../globals/Object/defineProperties.mdx).\n\n### Return value\n\nA new object with the specified prototype object and properties.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if `proto` is neither [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) nor an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Object/defineProperties.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.defineProperties()\n\nThe **`Object.defineProperties()`** method defines new or\nmodifies existing properties directly on an object, returning the object.\n\n## Syntax\n\n```js\nObject.defineProperties(obj, props)\n```\n\n### Parameters\n\n- `obj`\n  - : The object on which to define or modify properties.\n- `props`\n\n  - : An object whose keys represent the names of properties to be defined or modified and\n    whose values are objects describing those properties. Each value in `props`\n    must be either a data descriptor or an accessor descriptor; it cannot be both (see\n    [`Object.defineProperty()`](../../globals/Object/defineProperty.mdx) for more details).\n\n    Data descriptors and accessor descriptors may optionally contain the following keys:\n\n    - `configurable`\n      - : `true` if and only if the type of this property descriptor may be\n        changed and if the property may be deleted from the corresponding object.\n        **Defaults to `false`.**\n    - `enumerable`\n      - : `true` if and only if this property shows up during enumeration of\n        the properties on the corresponding object.\n        **Defaults to `false`.**\n\n    A data descriptor also has the following optional keys:\n\n    - `value`\n      - : The value associated with the property. Can be any valid JavaScript value\n        (number, object, function, etc.).\n        **Defaults to [`undefined`](../../globals/undefined.mdx).**\n    - `writable`\n      - : `true` if and only if the value associated with the property may be\n        changed with an assignment operator.\n        **Defaults to `false`.**\n\n    An accessor descriptor also has the following optional keys:\n\n    - `get`\n      - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx)\n        if there is no getter. The function's return value will be used as the value of\n        the property.\n        **Defaults to [`undefined`](../../globals/undefined.mdx).**\n    - `set`\n      - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx)\n        if there is no setter. The function will receive as its only argument the new\n        value being assigned to the property.\n        **Defaults to [`undefined`](../../globals/undefined.mdx).**\n\n    If a descriptor has neither of `value`, `writable`,\n    `get` and `set` keys, it is treated as a data descriptor. If a\n    descriptor has both `value` or `writable` and `get`\n    or `set` keys, an exception is thrown.\n\n### Return value\n\nThe object that was passed to the function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Object/defineProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.defineProperty()\n\nThe static method **`Object.defineProperty()`** defines a new\nproperty directly on an object, or modifies an existing property on an object, and\nreturns the object.\n\n## Syntax\n\n```js\nObject.defineProperty(obj, prop, descriptor)\n```\n\n### Parameters\n\n- `obj`\n  - : The object on which to define the property.\n- `prop`\n  - : The name or `Symbol` of the property to be defined or modified.\n- `descriptor`\n  - : The descriptor for the property being defined or modified.\n\n### Return value\n\nThe object that was passed to the function.\n\n## Description\n\nThis method allows a precise addition to or modification of a property on an object.\nNormal property addition through assignment creates properties which show up during\nproperty enumeration (`for...in` loop or\n[`Object.keys`](../../globals/Object/keys.mdx) method), whose values may be changed, and which may be\ndeleted. This method allows these extra details\nto be changed from their defaults. By default, properties added using\n`Object.defineProperty()` are not writable, not enumerable, and not configurable.\n\nProperty descriptors present in objects come in two main flavors: data descriptors and\naccessor descriptors. A **data descriptor** is a property that has a\nvalue, which may or may not be writable. An **accessor descriptor** is a\nproperty described by a getter-setter pair of functions. A descriptor must be one of\nthese two flavors; it cannot be both.\n\nBoth data and accessor descriptors are objects. They share the following optional keys\n(please note: the **defaults** mentioned here are in the case of defining\nproperties using `Object.defineProperty()`):\n\n- `configurable`\n\n  - : when this is set to `false`,\n\n    - the type of this property cannot be changed between data property and accessor property, and\n    - the property may not be deleted, and\n    - other attributes of its descriptor cannot be changed (however, if it's a data descriptor with `writable: true`, the `value` can be changed, and `writable` can be changed to `false`).\n\n    **Defaults to `false`.**\n\n- `enumerable`\n  - : `true` if and only if this property shows up during enumeration of the\n    properties on the corresponding object.\n    **Defaults to `false`.**\n\nA **data descriptor** also has the following optional keys:\n\n- `value`\n  - : The value associated with the property. Can be any valid JavaScript value (number,\n    object, function, etc.).\n    **Defaults to [`undefined`](../../globals/undefined.mdx).**\n- `writable`\n  - : `true` if the value associated with the property may be changed with an\n    assignment operator.\n    **Defaults to `false`.**\n\nAn **accessor descriptor** also has the following optional keys:\n\n- `get`\n  - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no getter. When the property is accessed, this function is called without\n    arguments and with `this` set to the object through which the property is\n    accessed (this may not be the object on which the property is defined due to\n    inheritance). The return value will be used as the value of the property.\n    **Defaults to [`undefined`](../../globals/undefined.mdx).**\n- `set`\n  - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no setter. When the property is assigned, this function is called with one\n    argument (the value being assigned to the property) and with `this` set to\n    the object through which the property is assigned.\n    **Defaults to [`undefined`](../../globals/undefined.mdx).**\n\nIf a descriptor has neither of `value`, `writable`,\n`get` and `set` keys, it is treated as a data descriptor. If a\ndescriptor has both \\[`value` or `writable`] and \\[`get` or `set`] keys, an exception is thrown.\n\nBear in mind that these attributes are not necessarily the descriptor's own properties.\nInherited properties will be considered as well. In order to ensure these defaults are\npreserved, you might freeze existing objects in the descriptor object's prototype chain upfront, specify all\noptions explicitly, or point to [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) with [`Object.create(null)`](../../globals/Object/create.mdx).\n\n```js\nconst obj = {};\n// 1. Using a null prototype: no inherited properties\nconst descriptor = Object.create(null);\ndescriptor.value = 'static';\n\n// not enumerable, not configurable, not writable as defaults\nObject.defineProperty(obj, 'key', descriptor);\n\n// 2. Being explicit by using a throw-away object literal with all attributes present\nObject.defineProperty(obj, 'key2', {\n  enumerable: false,\n  configurable: false,\n  writable: false,\n  value: 'static'\n});\n\n// 3. Recycling same object\nfunction withValue(value) {\n  const d = withValue.d || (\n    withValue.d = {\n      enumerable: false,\n      writable: false,\n      configurable: false,\n      value,\n    }\n  );\n\n  // avoiding duplicate operation for assigning value\n  if (d.value !== value) d.value = value;\n\n  return d;\n}\n// and\nObject.defineProperty(obj, 'key', withValue('static'));\n\n// if freeze is available, prevents adding or\n// removing the object prototype properties\n// (value, get, set, enumerable, writable, configurable)\n(Object.freeze || Object)(Object.prototype);\n```\n\nWhen the property already exists, `Object.defineProperty()` attempts to modify the property according to the values in the descriptor and the property's current configuration.\n\nIf the old descriptor had its `configurable` attribute set to `false`, the property is said to be _non-configurable_. It is not possible to change any attribute of a non-configurable accessor property, and it is not possible to switch between data and accessor property types. For data properties with `writable: true`, it is possible to modify the value and change the `writable` attribute from `true` to `false`. A [`TypeError`](../../globals/TypeError/TypeError.mdx) is thrown when attempts are made to change non-configurable property attributes (except `value` and `writable`, if permitted), except when defining a value same as the original value on a data property.\n\nWhen the current property is configurable, defining an attribute to `undefined` effectively deletes it. For example, if `o.k` is an accessor property, `Object.defineProperty(o, \"k\", { set: undefined })` will remove the setter, making `k` only have a getter and become readonly. If an attribute is absent from the new descriptor, the old descriptor attribute's value is kept (it won't be implicitly re-defined to `undefined`). It is possible to toggle between data and accessor property by giving a descriptor of a different \"flavor\". For example, if the new descriptor is a data descriptor (with `value` or `writable`), the original descriptor's `get` and `set` attributes will both be dropped.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Object/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.entries()\n\nThe **`Object.entries()`** method returns an array of a given object's own enumerable string-keyed property key-value pairs.\n\n## Syntax\n\n```js\nObject.entries(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : An object.\n\n### Return value\n\nAn array of the given object's own enumerable string-keyed property key-value pairs. Each key-value pair is an array with two elements: the first element is the property key (which is always a string), and the second element is the property value.\n\n## Description\n\n`Object.entries()` returns an array whose elements are arrays corresponding to the enumerable string-keyed property key-value pairs found directly upon `object`. This is the same as iterating with a `for...in` loop, except that a `for...in` loop enumerates properties in the prototype chain as well. The order of the array returned by `Object.entries()` is the same as that provided by a `for...in` loop.\n\nIf you only need the property keys, use [`Object.keys()`](../../globals/Object/keys.mdx) instead. If you only need the property values, use [`Object.values()`](../../globals/Object/values.mdx) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Object/freeze.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.freeze()\n\nThe **`Object.freeze()`** method _freezes_ an object. Freezing an object [prevents extensions](../../globals/Object/preventExtensions.mdx) and makes existing properties non-writable and non-configurable. A frozen object can no longer be changed: new properties cannot be added, existing properties cannot be removed, their enumerability, configurability, writability, or value cannot be changed, and the object's prototype cannot be re-assigned. `freeze()` returns the same object that was passed in.\n\nFreezing an object is the highest integrity level that JavaScript provides.\n\n## Syntax\n\n```js\nObject.freeze(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object to freeze.\n\n### Return value\n\nThe object that was passed to the function.\n\n## Description\n\nFreezing an object is equivalent to [preventing extensions](../../globals/Object/preventExtensions.mdx) and then changing all existing [properties' descriptors'](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty#description) `configurable` to `false` — and for data properties, `writable` to `false` as well. Nothing can be added to or removed from the properties set of a frozen object. Any attempt to do so will fail, either silently or by throwing a [`TypeError`](../../globals/TypeError/TypeError.mdx) exception (most commonly, but not exclusively, when in \"strict mode\").\n\nFor data properties of a frozen object, their values cannot be changed since the writable and\nconfigurable attributes are set to false. Accessor properties (getters and setters) work the same — the property value returned by the getter may still change, and the setter can still be called without throwing errors when setting the property. Note that values\nthat are objects can still be modified, unless they are also frozen. As an object, an\narray can be frozen; after doing so, its elements cannot be altered and no elements can\nbe added to or removed from the array.\n\n`freeze()` returns the same object that was passed into the function. It\n_does not_ create a frozen copy.\n\nA `TypedArray` or a [`DataView`](../../globals/DataView/DataView.mdx) with elements will cause a [`TypeError`](../../globals/TypeError/TypeError.mdx),\nas they are views over memory and will definitely cause other possible issues:\n\n```js\nObject.freeze(new Uint8Array(0)) // No elements\n// Uint8Array []\n\nObject.freeze(new Uint8Array(1)) // Has elements\n// TypeError: Cannot freeze array buffer views with elements\n\nObject.freeze(new DataView(new ArrayBuffer(32))) // No elements\n// DataView {}\n\nObject.freeze(new Float64Array(new ArrayBuffer(64), 63, 0)) // No elements\n// Float64Array []\n\nObject.freeze(new Float64Array(new ArrayBuffer(64), 32, 2)) // Has elements\n// TypeError: Cannot freeze array buffer views with elements\n```\n\nNote that as the standard three properties (`buf.byteLength`,\n`buf.byteOffset` and `buf.buffer`) are read-only (as are those of\nan `ArrayBuffer`, there is no reason for\nattempting to freeze these properties.\n\nUnlike [`Object.seal()`](../../globals/Object/seal.mdx), existing properties in objects frozen with `Object.freeze()` are made immutable and data properties cannot be re-assigned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Object/fromEntries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.fromEntries()\n\nThe **`Object.fromEntries()`** method transforms a list of key-value pairs into an object.\n\n## Syntax\n\n```js\nObject.fromEntries(iterable)\n```\n\n### Parameters\n\n- `iterable`\n\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol), such as an `Array` or [Map](../../globals/Map/Map.mdx), containing a list of objects. Each object should have two properties:\n\n    - `0`\n      - : A string or `Symbol` representing the property key.\n    - `1`\n      - : The property value.\n\n    Typically, this object is implemented as a two-element array, with the first element being the property key and the second element being the property value.\n\n### Return value\n\nA new object whose properties are given by the entries of the iterable.\n\n## Description\n\nThe `Object.fromEntries()` method takes a list of key-value pairs and returns a new object whose properties are given by those entries. The `iterable` argument is expected to be an object that implements an `@@iterator` method. The method returns an iterator object that produces two-element array-like objects. The first element is a value that will be used as a property key, and the second element is the value to associate with that property key.\n\n`Object.fromEntries()` performs the reverse of [`Object.entries()`](../../globals/Object/entries.mdx), except that `Object.entries()` only returns string-keyed properties, while `Object.fromEntries()` can also create symbol-keyed properties.\n\n> **Note:** Unlike [`Array.from()`](../../globals/Array/from.mdx), `Object.fromEntries()` does not use the value of `this`, so calling it on another constructor does not create objects of that type.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Object/getOwnPropertyDescriptor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertyDescriptor()\n\nThe **`Object.getOwnPropertyDescriptor()`** method returns an\nobject describing the configuration of a specific property on a given object (that is,\none directly present on an object and not in the object's prototype chain). The object\nreturned is mutable but mutating it has no effect on the original property's\nconfiguration.\n\n## Syntax\n\n```js\nObject.getOwnPropertyDescriptor(obj, prop)\n```\n\n### Parameters\n\n- `obj`\n  - : The object in which to look for the property.\n- `prop`\n  - : The name or `Symbol` of the property whose description is to be\n    retrieved.\n\n### Return value\n\nA property descriptor of the given property if it exists on the object,\n[`undefined`](../../globals/undefined.mdx) otherwise.\n\n## Description\n\nThis method permits examination of the precise description of a property. A\n_property_ in JavaScript consists of either a string-valued name or a\n`Symbol` and a property descriptor. Further information about property\ndescriptor types and their attributes can be found in\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx).\n\nA _property descriptor_ is a record with some of the following attributes:\n\n- `value`\n  - : The value associated with the property (data descriptors only).\n- `writable`\n  - : `true` if and only if the value associated with the property may be\n    changed (data descriptors only).\n- `get`\n  - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no getter (accessor descriptors only).\n- `set`\n  - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no setter (accessor descriptors only).\n- `configurable`\n  - : `true` if and only if the type of this property descriptor may be changed\n    and if the property may be deleted from the corresponding object.\n- `enumerable`\n  - : `true` if and only if this property shows up during enumeration of the\n    properties on the corresponding object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Object/getOwnPropertyDescriptors.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertyDescriptors()\n\nThe **`Object.getOwnPropertyDescriptors()`** method returns all\nown property descriptors of a given object.\n\n## Syntax\n\n```js\nObject.getOwnPropertyDescriptors(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object for which to get all own property descriptors.\n\n### Return value\n\nAn object containing all own property descriptors of an object. Might be an empty\nobject, if there are no properties.\n\n## Description\n\nThis method permits examination of the precise description of all own properties of an\nobject. A _property_ in JavaScript consists of either a string-valued name or a\n`Symbol` and a property descriptor. Further information about property\ndescriptor types and their attributes can be found in\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx).\n\nA _property descriptor_ is a record with some of the following attributes:\n\n- `value`\n  - : The value associated with the property (data descriptors only).\n- `writable`\n  - : `true` if and only if the value associated with the property may be\n    changed (data descriptors only).\n- `get`\n  - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no getter (accessor descriptors only).\n- `set`\n  - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no setter (accessor descriptors only).\n- `configurable`\n  - : `true` if and only if the type of this property descriptor may be changed\n    and if the property may be deleted from the corresponding object.\n- `enumerable`\n  - : `true` if and only if this property shows up during enumeration of the\n    properties on the corresponding object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Object/getOwnPropertyNames.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertyNames()\n\nThe **`Object.getOwnPropertyNames()`** method returns an array of all properties (including non-enumerable properties except for those which use Symbol) found directly in a given object.\n\n## Syntax\n\n```js\nObject.getOwnPropertyNames(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object whose enumerable and non-enumerable properties are to be returned.\n\n### Return value\n\nAn array of strings that corresponds to the properties found directly in the given object.\n\n## Description\n\n`Object.getOwnPropertyNames()` returns an array whose elements are strings corresponding to the enumerable and non-enumerable properties found directly in a given object `obj`. The ordering of the enumerable properties in the array is consistent with the ordering exposed by a `for...in` loop (or by [`Object.keys()`](../../globals/Object/keys.mdx)) over the properties of the object. The non-negative integer keys of the object (both enumerable and non-enumerable) are added in ascending order to the array first, followed by the string keys in the order of insertion.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Object/getOwnPropertySymbols.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertySymbols()\n\nThe **`Object.getOwnPropertySymbols()`** method returns an array of all symbol properties found directly upon a given object.\n\n## Syntax\n\n```js\nObject.getOwnPropertySymbols(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object whose symbol properties are to be returned.\n\n### Return value\n\nAn array of all symbol properties found directly upon the given object.\n\n## Description\n\nSimilar to [`Object.getOwnPropertyNames()`](../../globals/Object/getOwnPropertyNames.mdx), you can get all symbol properties of a given object as an array of symbols. Note that [`Object.getOwnPropertyNames()`](../../globals/Object/getOwnPropertyNames.mdx) itself does not contain the symbol properties of an object and only the string properties.\n\nAs all objects have no own symbol properties initially, `Object.getOwnPropertySymbols()` returns an empty array unless you have set symbol properties on your object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Object/getPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getPrototypeOf()\n\nThe **`Object.getPrototypeOf()`** method returns the prototype\n(i.e. the value of the internal `[[Prototype]]` property) of the specified\nobject.\n\n## Syntax\n\n```js\nObject.getPrototypeOf(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object whose prototype is to be returned.\n\n### Return value\n\nThe prototype of the given object, which may be `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Object/hasOwn.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.hasOwn()\n\nThe **`Object.hasOwn()`** static method returns `true` if the specified object has the indicated property as its _own_ property.\nIf the property is inherited, or does not exist, the method returns `false`.\n\n> **Note:** `Object.hasOwn()` is intended as a replacement for [`Object.prototype.hasOwnProperty()`](../../globals/Object/prototype/hasOwnProperty.mdx).\n\n\n\n## Syntax\n\n```js\nhasOwn(instance, prop)\n```\n\n### Parameters\n\n- `instance`\n  - : The JavaScript object instance to test.\n- `prop`\n  - : The `String` name or [Symbol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol) of the property to test.\n\n### Return value\n\n`true` if the specified object has directly defined the specified property.\nOtherwise `false`\n\n## Description\n\nThe **`Object.hasOwn()`** method returns `true` if the specified property is a\ndirect property of the object — even if the property value is `null` or `undefined`.\nThe method returns `false` if the property is inherited, or has not been declared at all.\nUnlike the `in` operator, this\nmethod does not check for the specified property in the object's prototype chain.\n\nIt is recommended over [`Object.prototype.hasOwnProperty()`](../../globals/Object/prototype/hasOwnProperty.mdx) because\nit works for objects created using `Object.create(null)` and with objects that\nhave overridden the inherited `hasOwnProperty()` method. While it is possible to\nworkaround these problems by calling `Object.prototype.hasOwnProperty()` on an\nexternal object, `Object.hasOwn()` is more intuitive.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Object/is.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.is()\n\nThe **`Object.is()`** method determines whether two values are [the same value](https://developer.mozilla.org/docs/Web/JavaScript/Equality_comparisons_and_sameness#same-value_equality_using_object.is).\n\n## Syntax\n\n```js\nObject.is(value1, value2)\n```\n\n### Parameters\n\n- `value1`\n  - : The first value to compare.\n- `value2`\n  - : The second value to compare.\n\n### Return value\n\nA boolean indicating whether or not the two arguments are the same value.\n\n## Description\n\n`Object.is()` determines whether two values are [the same value](https://developer.mozilla.org/docs/Web/JavaScript/Equality_comparisons_and_sameness#same-value_equality_using_object.is). Two values are the same if one of the following holds:\n\n- both [`undefined`](../../globals/undefined.mdx)\n- both `null`\n- both `true` or both `false`\n- both strings of the same length with the same characters in the same order\n- both the same object (meaning both values reference the same object in memory)\n- both `BigInts` with the same numeric value\n- both `Symbols` that reference the same symbol value\n- both numbers and\n\n  - both `+0`\n  - both `-0`\n  - both [`NaN`](../../globals/NaN.mdx)\n  - or both non-zero, not [`NaN`](../../globals/NaN.mdx), and have the same value\n\n`Object.is()` is not equivalent to the [`==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Equality) operator. The `==` operator applies various coercions to both sides (if they are not the same type) before testing for equality (resulting in such behavior as `\"\" == false` being `true`), but `Object.is()` doesn't coerce either value.\n\n`Object.is()` is also _not_ equivalent to the [`===`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) operator. The only difference between `Object.is()` and `===` is in their treatment of signed zeros and `NaN` values. The `===` operator (and the `==` operator) treats the number values `-0` and `+0` as equal, but treats [`NaN`](../../globals/NaN.mdx) as not equal to each other.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Object/isExtensible.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.isExtensible()\n\nThe **`Object.isExtensible()`** method determines if an object\nis extensible (whether it can have new properties added to it).\n\n## Syntax\n\n```js\nObject.isExtensible(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be checked.\n\n### Return value\n\nA `Boolean` indicating whether or not the given object is extensible.\n\n## Description\n\nObjects are extensible by default: they can have new properties added to them, and their `[[Prototype]]` can be re-assigned. An object can be marked as non-extensible using one of [`Object.preventExtensions()`](../../globals/Object/preventExtensions.mdx), [`Object.seal()`](../../globals/Object/seal.mdx), [`Object.freeze()`](../../globals/Object/freeze.mdx), or [`Reflect.preventExtensions()`](../../globals/Reflect/preventExtensions.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Object/isFrozen.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.isFrozen()\n\nThe **`Object.isFrozen()`** determines if an object is\n[frozen](../../globals/Object/freeze.mdx).\n\n## Syntax\n\n```js\nObject.isFrozen(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be checked.\n\n### Return value\n\nA `Boolean` indicating whether or not the given object is frozen.\n\n## Description\n\nAn object is frozen if and only if it is not [extensible](../../globals/Object/isExtensible.mdx), all its properties are non-configurable, and all its data\nproperties (that is, properties which are not accessor properties with getter or setter\ncomponents) are non-writable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Object/isSealed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.isSealed()\n\nThe **`Object.isSealed()`** method determines if an object is\nsealed.\n\n## Syntax\n\n```js\nObject.isSealed(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be checked.\n\n### Return value\n\nA `Boolean` indicating whether or not the given object is sealed.\n\n## Description\n\nReturns `true` if the object is sealed, otherwise `false`. An\nobject is sealed if it is not [extensible](../../globals/Object/isExtensible.mdx) and\nif all its properties are non-configurable and therefore not removable (but not\nnecessarily non-writable).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Object/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.keys()\n\nThe **`Object.keys()`** method returns an array of a given object's own enumerable string-keyed property names.\n\n## Syntax\n\n```js\nObject.keys(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : An object.\n\n### Return value\n\nAn array of strings representing the given object's own enumerable string-keyed property keys.\n\n## Description\n\n`Object.keys()` returns an array whose elements are strings corresponding to the enumerable string-keyed property names found directly upon `object`. This is the same as iterating with a `for...in` loop, except that a `for...in` loop enumerates properties in the prototype chain as well. The order of the array returned by `Object.keys()` is the same as that provided by a `for...in` loop.\n\nIf you need the property values, use [`Object.values()`](../../globals/Object/values.mdx) instead. If you need both the property keys and values, use [`Object.entries()`](../../globals/Object/entries.mdx) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Object/preventExtensions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.preventExtensions()\n\nThe **`Object.preventExtensions()`** method prevents new\nproperties from ever being added to an object (i.e. prevents future extensions to the\nobject). It also prevents the object's prototype from being re-assigned.\n\n## Syntax\n\n```js\nObject.preventExtensions(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be made non-extensible.\n\n### Return value\n\nThe object being made non-extensible.\n\n## Description\n\nAn object is extensible if new properties can be added to it.\n`Object.preventExtensions()` marks an object as no longer extensible, so that\nit will never have properties beyond the ones it had at the time it was marked as\nnon-extensible. Note that the properties of a non-extensible object, in general, may\nstill be _deleted_. Attempting to add new properties to a non-extensible object\nwill fail, either silently or, in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), throwing a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\nUnlike [`Object.seal()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/seal) and [`Object.freeze()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze), `Object.preventExtensions()` invokes an intrinsic JavaScript behavior and cannot be replaced with a composition of several other operations. It also has its `Reflect` counterpart (which only exists for intrinsic operations), [`Reflect.preventExtensions()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Reflect/preventExtensions).\n\n`Object.preventExtensions()` only prevents addition of own properties. Properties can still be added to the object prototype.\n\nThis method makes the `[[Prototype]]` of the target immutable; any `[[Prototype]]` re-assignment will throw a `TypeError`. This behavior is specific to the internal `[[Prototype]]` property; other properties of the target object will remain mutable.\n\nThere is no way to make an object extensible again once it has been made non-extensible.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Object/prototype/constructor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.constructor\n\nThe **`constructor`** data property of an `Object` instance returns a reference to the constructor function that created the instance object. Note that the value of this property is a reference to _the function itself_, not a string containing the function's name.\n\n> **Note:** This is a property of JavaScript objects. For the `constructor` method in classes, see [its own reference page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/constructor).\n\n## Value\n\nA reference to the constructor function that created the instance object.\n\n> **Note:** This property is created by default on the [`prototype`](../../../globals/Function/prototype/) property of every constructor function and is inherited by all objects created by that constructor.\n\n## Description\n\nAny object (with the exception of [`null` prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) will have a `constructor` property on its `[[Prototype]]`. Objects created with literals will also have a `constructor` property that points to the constructor type for that object — for example, array literals create `Array` objects, and [object literals](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Object_initializer) create plain objects.\n\n```js\nconst o1 = {};\no1.constructor === Object; // true\n\nconst o2 = new Object();\no2.constructor === Object; // true\n\nconst a1 = [];\na1.constructor === Array; // true\n\nconst a2 = new Array();\na2.constructor === Array; // true\n\nconst n = 3;\nn.constructor === Number; // true\n```\n\nNote that `constructor` usually comes from the constructor's [`prototype`](../../../globals/Function/prototype/) property. If you have a longer prototype chain, you can usually expect every object in the chain to have a `constructor` property.\n\n```js\nconst o = new TypeError(); // Inheritance: TypeError -> Error -> Object\nconst proto = Object.getPrototypeOf;\nproto(o).constructor === TypeError; // true\nproto(proto(o)).constructor === Error; // true\nproto(proto(proto(o))).constructor === Object; // true\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Object/prototype/hasOwnProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.hasOwnProperty()\n\nThe **`hasOwnProperty()`** method returns a boolean indicating whether the\nobject has the specified property as its own property (as opposed to inheriting\nit).\n\n> **Note:** [`Object.hasOwn()`](../../../globals/Object/hasOwn.mdx) is recommended over\n> `hasOwnProperty()`, in browsers where it is supported.\n\n## Syntax\n\n```js\nhasOwnProperty(prop)\n```\n\n### Parameters\n\n- `prop`\n  - : The `String` name or `Symbol` of the property to test.\n\n### Return value\n\nReturns `true` if the object has the specified property as own property; `false`\notherwise.\n\n## Description\n\nThe **`hasOwnProperty()`** method returns `true` if the specified property is a\ndirect property of the object — even if the value is `null` or `undefined`. The\nmethod returns `false` if the property is inherited, or has not been declared at\nall. Unlike the `in` operator, this\nmethod does not check for the specified property in the object's prototype\nchain.\n\nThe method can be called on _most_ JavaScript objects, because most objects\ndescend from `Object`, and hence inherit its methods. For\nexample `Array` is an `Object`, so you can\nuse `hasOwnProperty()` method to check whether an index exists:\n\n```js\nconst fruits = ['Apple', 'Banana','Watermelon', 'Orange'];\nfruits.hasOwnProperty(3);   // true ('Orange')\nfruits.hasOwnProperty(4);   // false - not defined\n```\n\nThe method will not be available in objects where it is reimplemented, or on\nobjects created using `Object.create(null)` (as these don't inherit from\n`Object.prototype`). Examples for these cases are given below.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Object/prototype/isPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.isPrototypeOf()\n\nThe **`isPrototypeOf()`** method checks if an object exists in another object's prototype chain.\n\n> **Note:** `isPrototypeOf()` differs from the [`instanceof`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/instanceof) operator. In the expression `object instanceof AFunction`, `object`'s prototype chain is checked against `AFunction.prototype`, not against `AFunction` itself.\n\n## Syntax\n\n```js\nisPrototypeOf(object)\n```\n\n### Parameters\n\n- `object`\n  - : The object whose prototype chain will be searched.\n\n### Return value\n\nA boolean indicating whether the calling object (`this`) lies in the prototype chain of `object`. Directly returns `false` when `object` is not an object (i.e. a primitive).\n\n### Errors thrown\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown if `this` is `null` or `undefined` (because it can't be [converted to an object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#object_coercion)).\n\n## Description\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `isPrototypeOf()` method. This method allows you to check whether or not the object exists within another object's prototype chain. If the `object` passed as the parameter is not an object (i.e. a primitive), the method directly returns `false`. Otherwise, the `this` value is [converted to an object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#object_coercion), and the prototype chain of `object` is searched for the `this` value, until the end of the chain is reached or the `this` value is found.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Object/prototype/propertyIsEnumerable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.propertyIsEnumerable()\n\nThe **`propertyIsEnumerable()`** method returns a boolean indicating whether the specified property is the object's [enumerable own](https://developer.mozilla.org/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) property.\n\n## Syntax\n\n```js\npropertyIsEnumerable(prop)\n```\n\n### Parameters\n\n- `prop`\n  - : The name of the property to test. Can be a string or a `Symbol`.\n\n### Return value\n\nA boolean value indicating whether the specified property is enumerable and is the object's own property.\n\n## Description\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `propertyIsEnumerable()` method. This method determines if the specified property, string or symbol, is an enumerable own property of the object. If the object does not have the specified property, this method returns `false`.\n\nThis method is equivalent to [`Object.getOwnPropertyDescriptor(obj, prop)?.enumerable ?? false`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Object/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string representing the object. This method is meant to be overridden by derived objects for locale-specific purposes.\n\n## Syntax\n\n```js\ntoLocaleString()\n```\n\n### Parameters\n\nNone. However, all objects that override this method are expected to accept at most two parameters, corresponding to `locales` and `options`, such as [`Date.prototype.toLocaleString()`](../../../globals/Date/prototype/toLocaleString.mdx). The parameter positions should not be used for any other purpose.\n\n### Return value\n\nThe return value of calling `this.toString()`.\n\n## Description\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `toLocaleString()` method. `Object`'s `toLocaleString` returns the result of calling [`this.toString()`](../../../globals/Object/prototype/toString.mdx).\n\nThis function is provided to give objects a generic `toLocaleString` method, even though not all may use it. In the core language, these built-in objects override `toLocaleString` to provide locale-specific formatting:\n\n- `Array`: [`Array.prototype.toLocaleString()`](../../../globals/Array/prototype/toLocaleString.mdx)\n- `Number`: [`Number.prototype.toLocaleString()`](../../../globals/Number/prototype/toLocaleString.mdx)\n- `Date`: [`Date.prototype.toLocaleString()`](../../../globals/Date/prototype/toLocaleString.mdx)\n- `BigInt`: [`BigInt.prototype.toLocaleString()`](../../../globals/BigInt/prototype/toLocaleString.mdx)\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Object/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.toString()\n\nThe **`toString()`** method returns a string representing the object. This method is meant to be overridden by derived objects for custom [type conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) logic.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nBy default `toString()` takes no parameters. However, objects that inherit from `Object` may override it with their own implementations that do take parameters. For example, the [`Number.prototype.toString()`](../../../globals/Number/prototype/toString.mdx) and [`BigInt.prototype.toString()`](../../../globals/BigInt/prototype/toString.mdx) methods take an optional `radix` parameter.\n\n### Return value\n\nA string representing the object.\n\n## Description\n\nJavaScript calls the `toString` method to [convert an object to a primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion). You rarely need to invoke the `toString` method yourself; JavaScript automatically invokes it when encountering an object where a primitive value is expected.\n\nThis method is called in priority by [string conversion](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion), but [numeric conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#numeric_coercion) and [primitive conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion) call `valueOf()` in priority. However, because the base [`valueOf()`](../../../globals/Object/prototype/valueOf.mdx) method returns an object, the `toString()` method is usually called in the end, unless the object overrides `valueOf()`. For example, `+[1]` returns `1`, because its [`toString`](../../../globals/Array/prototype/toString.mdx) method returns `\"1\"`, which is then converted to a number.\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `toString()` method. When you create a custom object, you can override `toString()` to call a custom method, so that your custom object can be converted to a string value. Alternatively, you can add a [`Symbol.toPrimitive`](../../../globals/Symbol/toPrimitive.mdx) method, which allows even more control over the conversion process, and will always be preferred over `valueOf` or `toString` for any type conversion.\n\nTo use the base `Object.prototype.toString()` with an object that has it overridden (or to invoke it on `null` or `undefined`), you need to call [`Function.prototype.call()`](../../../globals/Function/prototype/call.mdx) or [`Function.prototype.apply()`](../../../globals/Function/prototype/apply.mdx) on it, passing the object you want to inspect as the first parameter (called `thisArg`).\n\n```js\nconst arr = [1, 2, 3];\n\narr.toString(); // \"1,2,3\"\nObject.prototype.toString.call(arr); // \"[object Array]\"\n```\n\n`Object.prototype.toString()` returns `\"[object Type]\"`, where `Type` is the object type. If the object has a [`Symbol.toStringTag`](../../../globals/Symbol/toStringTag.mdx) property whose value is a string, that value will be used as the `Type`. Many built-in objects, including [`Map`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map) and [`Symbol`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol), have a `Symbol.toStringTag`. Some objects predating ES6 do not have `Symbol.toStringTag`, but have a special tag nonetheless. They include (the tag is the same as the type name given below):\n\n- [`Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\n- [`Function`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions) (anything whose [`typeof`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/typeof) returns `\"function\"`)\n- [`Error`](../../../globals/Error/Error.mdx)\n- [`Boolean`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)\n- [`Number`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)\n- [`String`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\n- [`Date`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date)\n- [`RegExp`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp)\n\nThe [`arguments`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/arguments) object returns `\"[object Arguments]\"`. Everything else, including user-defined classes, unless with a custom `Symbol.toStringTag`, will return `\"[object Object]\"`.\n\n`Object.prototype.toString()` invoked on [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) returns `[object Null]` and `[object Undefined]`, respectively.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Object/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.valueOf()\n\nThe **`valueOf()`** method of `Object` converts the `this` value [to an object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#object_coercion). This method is meant to be overridden by derived objects for custom [type conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) logic.\n\n\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nThe `this` value, converted to an object.\n\n> **Note:** In order for `valueOf` to be useful during type conversion, it must return a primitive. Because all primitive types have their own `valueOf()` methods, calling `aPrimitiveValue.valueOf()` generally does not invoke `Object.prototype.valueOf()`.\n\n## Description\n\nJavaScript calls the `valueOf` method to [convert an object to a primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion). You rarely need to invoke the `valueOf` method yourself; JavaScript automatically invokes it when encountering an object where a primitive value is expected.\n\nThis method is called in priority by [numeric conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#numeric_coercion) and [primitive conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion), but [string conversion](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) calls `toString()` in priority, and `toString()` is very likely to return a string value (even for the [`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx) base implementation), so `valueOf()` is usually not called in this case.\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `toString()` method. The `Object.prototype.valueOf()` base implementation is deliberately useless: by returning an object, its return value will never be used by any [primitive conversion algorithm](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion). Many built-in objects override this method to return an appropriate primitive value. When you create a custom object, you can override `valueOf()` to call a custom method, so that your custom object can be converted to a primitive value. Generally, `valueOf()` is used to return a value that is most meaningful for the object — unlike `toString()`, it does not need to be a string. Alternatively, you can add a [`Symbol.toPrimitive`](../../../globals/Symbol/toPrimitive.mdx) method, which allows even more control over the conversion process, and will always be preferred over `valueOf` or `toString` for any type conversion.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Object/seal.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.seal()\n\nThe **`Object.seal()`** method _seals_ an object. Sealing an object [prevents extensions](../../globals/Object/preventExtensions.mdx) and makes existing properties non-configurable. A sealed object has a fixed set of properties: new properties cannot be added, existing properties cannot be removed, their enumerability and configurability cannot be changed, and its prototype cannot be re-assigned. Values of existing properties can still be changed as long as they are writable. `seal()` returns the same object that was passed in.\n\n## Syntax\n\n```js\nObject.seal(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be sealed.\n\n### Return value\n\nThe object being sealed.\n\n## Description\n\nSealing an object is equivalent to [preventing extensions](../../globals/Object/preventExtensions.mdx) and then changing all existing properties' descriptors to `configurable: false`. This has the effect of making the set of properties on the object fixed. Making all properties non-configurable\nalso prevents them from being converted from data properties to accessor properties and\nvice versa, but it does not prevent the values of data properties from being changed.\nAttempting to delete or add properties to a sealed object, or to convert a data property\nto accessor or vice versa, will fail, either silently or by throwing a\n[`TypeError`](../../globals/TypeError/TypeError.mdx) (most commonly, although not exclusively, when in \"strict mode\" code).\n\nThe prototype chain remains untouched. However, due to the effect of [preventing extensions](../../globals/Object/preventExtensions.mdx), the `[[Prototype]]` cannot be reassigned.\n\nUnlike [`Object.freeze()`](../../globals/Object/freeze.mdx), objects sealed with `Object.seal()` may have their existing\nproperties changed, as long as they are writable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Object/setPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.setPrototypeOf()\n\nThe **`Object.setPrototypeOf()`** method sets the prototype (i.e., the internal `[[Prototype]]` property) of a specified object to another object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null).\n\n> **Warning:** Changing the `[[Prototype]]` of an object is, by the nature of how modern JavaScript engines optimize property accesses, currently a very slow operation in every browser and JavaScript engine. In addition, the effects of altering inheritance are subtle and far-flung, and are not limited to the time spent in the `Object.setPrototypeOf(...)` statement, but may extend to **_any_** code that has access to any object whose `[[Prototype]]` has been altered. You can read more in [JavaScript engine fundamentals: optimizing prototypes](https://mathiasbynens.be/notes/prototypes).\n>\n> Because this feature is a part of the language, it is still the burden on engine developers to implement that feature performantly (ideally). Until engine developers address this issue, if you are concerned about performance, you should avoid setting the `[[Prototype]]` of an object. Instead, create a new object with the desired `[[Prototype]]` using [`Object.create()`](../../globals/Object/create.mdx).\n\n## Syntax\n\n```js\nObject.setPrototypeOf(obj, prototype)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which is to have its prototype set.\n- `prototype`\n  - : The object's new prototype (an object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null)).\n\n### Return value\n\nThe specified object.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if one of the following conditions is met:\n    - The `obj` parameter is [non-extensible](../../globals/Object/isExtensible.mdx), or it's an [immutable prototype exotic object](https://tc39.es/ecma262/#sec-immutable-prototype-exotic-objects), such as `Object.prototype`.\n    - The `prototype` parameter is not an object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null).\n\n## Description\n\n`Object.setPrototypeOf()` is generally considered the proper way to set the prototype of an object.\n\nIf the `obj` parameter is not an object (e.g. number, string, etc.), this method does nothing.\n\nFor security concerns, there are certain built-in objects that are designed to have an _immutable prototype_. This prevents prototype pollution attacks, especially [proxy-related ones](https://github.com/tc39/ecma262/issues/272). The core language only specifies `Object.prototype` as an immutable prototype exotic object, whose prototype is always `null`.\n\n```js\nObject.isExtensible(Object.prototype); // true; you can add more properties\nObject.setPrototypeOf(Object.prototype, {}); // TypeError: Immutable prototype object '#<Object>' cannot have their prototype set\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Object/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.values()\n\nThe **`Object.values()`** method returns an array of a given object's own enumerable string-keyed property values.\n\n## Syntax\n\n```js\nObject.values(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : An object.\n\n### Return value\n\nAn array containing the given object's own enumerable string-keyed property values.\n\n## Description\n\n`Object.values()` returns an array whose elements are strings corresponding to the enumerable string-keyed property values found directly upon `object`. This is the same as iterating with a `for...in` loop, except that a `for...in` loop enumerates properties in the prototype chain as well. The order of the array returned by `Object.values()` is the same as that provided by a `for...in` loop.\n\nIf you need the property keys, use [`Object.keys()`](../../globals/Object/keys.mdx) instead. If you need both the property keys and values, use [`Object.entries()`](../../globals/Object/entries.mdx) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Promise/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get Promise[Symbol.species]\n\nThe **`Promise[Symbol.species]`** accessor property returns the constructor used to construct return values from promise methods.\n\n> **Warning:** The existence of `Symbol.species` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Syntax\n\n```js\nPromise[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct return values from promise chaining methods that create new promises.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `Promise` objects. Subclass constructors may override it to change the constructor assignment. The default implementation is basically:\n\n```js\n// Hypothetical underlying implementation for illustration\nclass Promise {\n  static get [Symbol.species]() {\n    return this;\n  }\n}\n```\n\nBecause of this polymorphic implementation, `Symbol.species` of derived subclasses would also return the constructor itself by default.\n\n```js\nclass SubPromise extends Promise {}\nSubPromise[Symbol.species] === Promise; // true\n```\n\nPromise chaining methods — [`then()`](../../globals/Promise/prototype/then.mdx), [`finally()`](../../globals/Promise/prototype/finally.mdx) — return new promise objects. They get the constructor to construct the new promise through `this.constructor[Symbol.species]`. If `this.constructor` is `undefined`, or if `this.constructor[Symbol.species]` is `undefined` or `null`, the default [`Promise()`](../../globals/Promise/Promise.mdx) constructor is used. Otherwise, the constructor returned by `this.constructor[Symbol.species]` is used to construct the new promise object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Promise/Promise.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise()\n\nThe **`Promise()`** constructor is primarily used to wrap functions that do not already support promises.\n\n## Syntax\n\n```js\nnew Promise(executor)\n```\n\n> **Note:** `Promise()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `executor`\n  - : A `function` to be executed by the constructor. It receives two functions as parameters: `resolveFunc` and `rejectFunc`. Any errors thrown in the `executor` will cause the promise to be rejected, and the return value will be neglected. The semantics of `executor` are detailed below.\n\n### Return value\n\nWhen called via `new`, the `Promise` constructor returns a promise object. The promise object will become _resolved_ when either of the functions `resolveFunc` or `rejectFunc` are invoked. Note that if you call `resolveFunc` or `rejectFunc` and pass another `Promise` object as an argument, it can be said to be \"resolved\", but still not \"settled\". See the [Promise description](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#description) for more explanation.\n\n## Description\n\nTraditionally (before promises), asynchronous tasks were designed as callbacks.\n\n```js\nreadFile(\"./data.txt\", (error, result) => {\n  // This callback will be called when the task is done, with the\n  // final `error` or `result`. Any operation dependent on the\n  // result must be defined within this callback.\n});\n// Code here is immediately executed after the `readFile` request\n// is fired. It does not wait for the callback to be called, hence\n// making `readFile` \"asynchronous\".\n```\n\nTo take advantage of the readability improvement and language features offered by promises, the `Promise()` constructor allows one to transform the callback-based API to a promise-based one.\n\n> **Note:** If your task is already promise-based, you likely do not need the `Promise()` constructor.\n\nThe `executor` is custom code that ties an outcome in a callback to a promise. You, the programmer, write the `executor`. Its signature is expected to be:\n\n```js\nfunction executor(resolveFunc, rejectFunc) {\n  // Typically, some asynchronous operation that accepts a callback,\n  // like the `readFile` function above\n}\n```\n\n`resolveFunc` and `rejectFunc` are also functions, and you can give them whatever actual names you want. Their signatures are simple: they accept a single parameter of any type.\n\n```js\nresolveFunc(value); // call on resolved\nrejectFunc(reason); // call on rejected\n```\n\nThe `value` parameter passed to `resolveFunc` can be another promise object, in which case the newly constructed promise's state will be \"locked in\" to the promise passed (as part of the [resolution](#resolver-function) promise). The `rejectFunc` has semantics close to the [`throw`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/throw) statement, so `reason` is typically an [`Error`](../../globals/Error/Error.mdx) instance. If either `value` or `reason` is omitted, the promise is fulfilled/rejected with `undefined`.\n\nThe `executor`'s completion state has limited effect on the promise's state:\n\n- The `executor` return value is ignored. `return` statements within the `executor` merely impact control flow and alter whether a part of the function is executed, but do not have any impact on the promise's fulfillment value. If `executor` exits and it's impossible for `resolveFunc` or `rejectFunc` to be called in the future (for example, there are no async tasks scheduled), then the promise remains pending forever.\n- If an error is thrown in the `executor`, the promise is rejected, unless `resolveFunc` or `rejectFunc` has already been called.\n\n> **Note:** The existence of pending promises does not prevent the program from exiting. If the event loop is empty, the program exits despite any pending promises (because those are necessarily forever-pending).\n\nHere's a summary of the typical flow:\n\n1. At the time when the constructor generates the new `Promise` object, it also generates a corresponding pair of functions for `resolveFunc` and `rejectFunc`; these are \"tethered\" to the `Promise` object.\n2. `executor` typically wraps some asynchronous operation which provides a callback-based API. The callback (the one passed to the original callback-based API) is defined within the `executor` code, so it has access to the `resolveFunc` and `rejectFunc`.\n3. The `executor` is called synchronously (as soon as the `Promise` is constructed) with the `resolveFunc` and `rejectFunc` functions as arguments.\n4. The code within the `executor` has the opportunity to perform some operation. The eventual completion of the asynchronous task is communicated with the promise instance via the side effect caused by `resolveFunc` or `rejectFunc`. The side effect is that the `Promise` object becomes \"resolved\".\n   - If `resolveFunc` is called first, the value passed will be [resolved](#resolver-function). The promise may stay pending (in case another [thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) is passed), become fulfilled (in most cases where a non-thenable value is passed), or become rejected (in case of an invalid resolution value).\n   - If `rejectFunc` is called first, the promise instantly becomes rejected.\n   - Once one of the resolving functions (`resolveFunc` or `rejectFunc`) is called, the promise stays resolved. Only the first call to `resolveFunc` or `rejectFunc` affects the promise's eventual state, and subsequent calls to either function can neither change the fulfillment value/rejection reason nor toggle its eventual state from \"fulfilled\" to \"rejected\" or opposite.\n   - If `executor` exits by throwing an error, then the promise is rejected. However, the error is ignored if one of the resolving functions has already been called (so that the promise is already resolved).\n   - Resolving the promise does not necessarily cause the promise to become fulfilled or rejected (i.e. settled). The promise may still be pending because it's resolved with another thenable, but its eventual state will match that of the resolved thenable.\n5. Once the promise settles, it (asynchronously) invokes any further handlers associated through [`Promise.prototype.then`](../../globals/Promise/prototype/then.mdx), [`Promise.prototype.catch`](../../globals/Promise/prototype/catch.mdx), or [`Promise.prototype.finally`](../../globals/Promise/prototype/finally.mdx). The eventual fulfillment value or rejection reason is passed to the invocation of fulfillment and rejection handlers as an input parameter (see [Chained Promises](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#chained_promises)).\n\nFor example, the callback-based `readFile` API above can be transformed into a promise-based one.\n\n```js\nconst readFilePromise = (path) =>\n  new Promise((resolve, reject) => {\n    readFile(path, (error, result) => {\n      if (error) {\n        reject(error);\n      } else {\n        resolve(result);\n      }\n    });\n  });\n\nreadFilePromise(\"./data.txt\")\n  .then((result) => console.log(result))\n  .catch((error) => console.error(\"Failed to read data\"));\n```\n\n### Resolver function\n\nThe resolver function `resolveFunc` has the following behaviors:\n\n- If it's called with the same value as the newly created promise (the promise it's \"tethered to\"), the promise is rejected with a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n- If it's called with a non-[thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) value (a primitive, or an object whose `then` property is not callable, including when the property is not present), the promise is immediately fulfilled with that value.\n- If it's called with a thenable value (including another `Promise` instance), then the thenable's `then` method is saved and called in the future (it's always called asynchronously). The `then` method will be called with two callbacks, which are two new functions with the exact same behaviors as the `resolveFunc` and `rejectFunc` passed to the `executor` function. If calling the `then` method throws, then the current promise is rejected with the thrown error.\n\nIn the last case, it means code like:\n\n```js\nnew Promise((resolve, reject) => {\n  resolve(thenable);\n});\n```\n\nIs roughly equivalent to:\n\n```js\nnew Promise((resolve, reject) => {\n  try {\n    thenable.then(\n      (value) => resolve(value),\n      (reason) => reject(reason),\n    );\n  } catch (e) {\n    reject(e);\n  }\n});\n```\n\nExcept that in the `resolve(thenable)` case:\n\n1. `resolve` is called synchronously, so that calling `resolve` or `reject` again has no effect, even when the handlers attached through `anotherPromise.then()` are not called yet.\n2. The `then` method is called asynchronously, so that the promise will never be instantly resolved if a thenable is passed.\n\nBecause `resolve` is called again with whatever `thenable.then()` passes to it as `value`, the resolver function is able to flatten nested thenables, where a thenable calls its `onFulfilled` handler with another thenable. The effect is that the fulfillment handler of a real promise will never receive a thenable as its fulfillment value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Promise/all.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.all()\n\nThe **`Promise.all()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise fulfills when all of the input's promises fulfill (including when an empty iterable is passed), with an array of the fulfillment values. It rejects when any of the input's promises rejects, with this first rejection reason.\n\n## Syntax\n\n```js\nPromise.all(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array` of promises.\n\n### Return value\n\nA `Promise` that is:\n\n- **Already fulfilled**, if the `iterable` passed is empty.\n- **Asynchronously fulfilled**, when all the promises in the given `iterable` fulfill. The fulfillment value is an array of fulfillment values, in the order of the promises passed, regardless of completion order. If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) fulfilled.\n- **Asynchronously rejected**, when any of the promises in the given `iterable` rejects. The rejection reason is the rejection reason of the first promise that was rejected.\n\n## Description\n\nThe `Promise.all()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. It can be useful for aggregating the results of multiple promises. It is typically used when there are multiple related asynchronous tasks that the overall code relies on to work successfully — all of whom we want to fulfill before the code execution continues.\n\n`Promise.all()` will reject immediately upon **any** of the input promises rejecting. In comparison, the promise returned by [`Promise.allSettled()`](../../globals/Promise/allSettled.mdx) will wait for all input promises to complete, regardless of whether or not one rejects. Use `allSettled()` if you need the final result of every promise in the input iterable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Promise/allSettled.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.allSettled()\n\nThe **`Promise.allSettled()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise fulfills when all of the input's promises settle (including when an empty iterable is passed), with an array of objects that describe the outcome of each promise.\n\n## Syntax\n\n```js\nPromise.allSettled(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array` of promises.\n\n### Return value\n\nA `Promise` that is:\n\n- **Already fulfilled**, if the `iterable` passed is empty.\n- **Asynchronously fulfilled**, when all promise in the given `iterable` have settled (either fulfilled or rejected). The fulfillment value is an array of objects, each describing the outcome of one promise in the `iterable`, in the order of the promises passed, regardless of completion order. Each outcome object has the following properties:\n\n  - `status`\n    - : A string, either `\"fulfilled\"` or `\"rejected\"`, indicating the eventual state of the promise.\n  - `value`\n    - : Only present if `status` is `\"fulfilled\"`. The value that the promise was fulfilled with.\n  - `reason`\n    - : Only present if `status` is `\"rejected\"`. The reason that the promise was rejected with.\n\n  If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) fulfilled.\n\n## Description\n\nThe `Promise.allSettled()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. `Promise.allSettled()` is typically used when you have multiple asynchronous tasks that are not dependent on one another to complete successfully, or you'd always like to know the result of each promise.\n\nIn comparison, the Promise returned by [`Promise.all()`](../../globals/Promise/all.mdx) may be more appropriate if the tasks are dependent on each other, or if you'd like to immediately reject upon any of them rejecting.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Promise/any.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.any()\n\nThe **`Promise.any()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise fulfills when any of the input's promises fulfills, with this first fulfillment value. It rejects when all of the input's promises reject (including when an empty iterable is passed), with an `AggregateError` containing an array of rejection reasons.\n\n## Syntax\n\n```js\nPromise.any(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array` of promises.\n\n### Return value\n\nA `Promise` that is:\n\n- **Already rejected**, if the `iterable` passed is empty.\n- **Asynchronously fulfilled**, when any of the promises in the given `iterable` fulfills. The fulfillment value is the fulfillment value of the first promise that was fulfilled.\n- **Asynchronously rejected**, when all of the promises in the given `iterable` reject. The rejection reason is an `AggregateError` containing an array of rejection reasons in its `errors` property. The errors are in the order of the promises passed, regardless of completion order. If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) rejected.\n\n## Description\n\nThe `Promise.any()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. This method is useful for returning the first promise that fulfills. It short-circuits after a promise fulfills, so it does not wait for the other promises to complete once it finds one.\n\nUnlike [`Promise.all()`](../../globals/Promise/all.mdx), which returns an _array_ of fulfillment values, we only get one fulfillment value (assuming at least one promise fulfills). This can be beneficial if we need only one promise to fulfill but we do not care which one does. Note another difference: this method rejects upon receiving an _empty iterable_, since, truthfully, the iterable contains no items that fulfill. You may compare `Promise.any()` and `Promise.all()` with [`Array.prototype.some()`](../../globals/Array/prototype/some.mdx) and [`Array.prototype.every()`](../../globals/Array/prototype/every.mdx).\n\nAlso, unlike [`Promise.race()`](../../globals/Promise/race.mdx), which returns the first _settled_ value (either fulfillment or rejection), this method returns the first _fulfilled_ value. This method ignores all rejected promises up until the first promise that fulfills.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Promise/prototype/catch.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.prototype.catch()\n\nThe **`catch()`** method of a `Promise` object schedules a function to be called when the promise is rejected. It immediately returns an equivalent `Promise` object, allowing you to [chain](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining) calls to other promise methods. It is a shortcut for [`Promise.prototype.then(undefined, onRejected)`](../../../globals/Promise/prototype/then.mdx).\n\n## Syntax\n\n```js\ncatch(onRejected)\n\ncatch((reason) => {\n  // rejection handler\n})\n```\n\n### Parameters\n\n- `onRejected`\n  - : A `Function` called when the `Promise` is rejected. This function has one parameter: the _rejection reason_.\n\n### Return value\n\nReturns a new `Promise`. This new promise is always pending when returned, regardless of the current promise's status. It's eventually rejected if `onRejected` throws an error or returns a Promise which is itself rejected; otherwise, it's eventually fulfilled.\n\n## Description\n\nThe `catch` method is used for error handling in promise composition. Since it returns a `Promise`, it [can be chained](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining_after_a_catch) in the same way as its sister method, [`Promise.prototype.then()`](../../../globals/Promise/prototype/then.mdx).\n\nIf a promise becomes rejected, and there are no rejection handlers to call (a handler can be attached through any of [`Promise.prototype.then`](../../../globals/Promise/prototype/then.mdx), [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx), or [`Promise.prototype.finally`](../../../globals/Promise/prototype/finally.mdx)), then the rejection event is surfaced by the host. In the browser, this results in an [`unhandledrejection`](https://developer.mozilla.org/docs/Web/API/Window/unhandledrejection_event) event. If a handler is attached to a rejected promise whose rejection has already caused an unhandled rejection event, then another [`rejectionhandled`](https://developer.mozilla.org/docs/Web/API/Window/rejectionhandled_event) event is fired.\n\n`catch()` internally calls `then()` on the object upon which it was called, passing `undefined` and `onRejected` as arguments. The value of that call is directly returned. This is observable if you wrap the methods.\n\n```js\n// overriding original Promise.prototype.then/catch just to add some logs\n((Promise) => {\n  const originalThen = Promise.prototype.then;\n  const originalCatch = Promise.prototype.catch;\n\n  Promise.prototype.then = function (...args) {\n    console.log(\"Called .then on %o with arguments: %o\", this, args);\n    return originalThen.apply(this, args);\n  };\n  Promise.prototype.catch = function (...args) {\n    console.error(\"Called .catch on %o with arguments: %o\", this, args);\n    return originalCatch.apply(this, args);\n  };\n})(Promise);\n\n// calling catch on an already resolved promise\nPromise.resolve().catch(function XXX() {});\n\n// Logs:\n// Called .catch on Promise{} with arguments: Arguments{1} [0: function XXX()]\n// Called .then on Promise{} with arguments: Arguments{2} [0: undefined, 1: function XXX()]\n```\n\nThis means that passing `undefined` still causes the returned promise to be rejected, and you have to pass a function to prevent the final promise from being rejected.\n\nBecause `catch()` just calls `then()`, it supports subclassing.\n\n> **Note:** The examples below are throwing instances of [`Error`](../../../globals/Error/Error.mdx). As with synchronous [`throw`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/throw) statements, this is considered a good practice; otherwise, the part doing the catching would have to perform checks to see if the argument was a string or an error, and you might lose valuable information such as stack traces.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Promise/prototype/finally.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.prototype.finally()\n\nThe **`finally()`** method of a `Promise` object schedules a function to be called when the promise is settled (either fulfilled or rejected). It immediately returns an equivalent `Promise` object, allowing you to [chain](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining) calls to other promise methods.\n\nThis lets you avoid duplicating code in both the promise's [`Promise.prototype.then`](../../../globals/Promise/prototype/then.mdx) and [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx) handlers.\n\n## Syntax\n\n```js\nfinally(onFinally)\n\nfinally(() => {\n  // Code that will run after promise is settled (fulfilled or rejected)\n})\n```\n\n### Parameters\n\n- `onFinally`\n  - : A `Function` called when the `Promise` is settled. This handler receives no parameters.\n\n### Return value\n\nReturns an equivalent `Promise`. If the handler throws an error or returns a rejected promise, the promise returned by `finally()` will be rejected with that value instead. Otherwise, the return value of the handler does not affect the state of the original promise.\n\n## Description\n\nThe `finally()` method can be useful if you want to do some processing or cleanup once the promise is settled, regardless of its outcome.\n\nThe `finally()` method is very similar to calling [`then(onFinally, onFinally)`](../../../globals/Promise/prototype/then.mdx). However, there are a couple of differences:\n\n- When creating a function inline, you can pass it once, instead of being forced to either declare it twice, or create a variable for it.\n- The `onFinally` callback does not receive any argument. This use case is for precisely when you _do not care_ about the rejection reason or the fulfillment value, and so there's no need to provide it.\n- A `finally()` call is usually transparent and does not change the eventual state of the original promise. So for example:\n  - Unlike `Promise.resolve(2).then(() => 77, () => {})`, which returns a promise eventually fulfilled with the value `77`, `Promise.resolve(2).finally(() => 77)` returns a promise eventually fulfilled with the value `2`.\n  - Similarly, unlike `Promise.reject(3).then(() => {}, () => 88)`, which returns a promise eventually fulfilled with the value `88`, `Promise.reject(3).finally(() => 88)` returns a promise eventually rejected with the reason `3`.\n\n> **Note:** A `throw` (or returning a rejected promise) in the `finally` callback still rejects the returned promise. For example, both `Promise.reject(3).finally(() => { throw 99; })` and `Promise.reject(3).finally(() => Promise.reject(99))` reject the returned promise with the reason `99`.\n\nLike [`Promise.prototype.catch()`](../../../globals/Promise/prototype/catch.mdx), `finally()` internally calls the `then` method on the object upon which it was called. If `onFinally` is not a function, `then()` is called with `onFinally` as both arguments — which, for [`Promise.prototype.then()`](../../../globals/Promise/prototype/then.mdx), means that no useful handler is attached. Otherwise, `then()` is called with two internally created functions, which behave like the following:\n\n> **Warning:** This is only for demonstration purposes and is not a polyfill.\n\n```js\npromise.then(\n  (value) => Promise.resolve(onFinally()).then(() => value),\n  (reason) =>\n    Promise.resolve(onFinally()).then(() => {\n      throw reason;\n    }),\n);\n```\n\nBecause `finally()` calls `then()`, it supports subclassing. Moreover, notice the [`Promise.resolve()`](../../../globals/Promise/resolve.mdx) call above — in reality, `onFinally()`'s return value is resolved using the same algorithm as `Promise.resolve()`, but the actual constructor used to construct the resolved promise will be the subclass. `finally()` gets this constructor through [`promise.constructor[Symbol.species]`](../../../globals/Promise/@@species.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Promise/prototype/then.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.prototype.then()\n\nThe **`then()`** method of a `Promise` object takes up to two arguments: callback functions for the fulfilled and rejected cases of the `Promise`. It immediately returns an equivalent `Promise` object, allowing you to [chain](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining) calls to other promise methods.\n\n## Syntax\n\n```js\nthen(onFulfilled)\nthen(onFulfilled, onRejected)\n\nthen(\n  (value) => { /* fulfillment handler */ },\n  (reason) => { /* rejection handler */ },\n)\n```\n\n### Parameters\n\n- `onFulfilled` _**optional**_\n  - : A `Function` asynchronously called if the `Promise` is fulfilled. This function has one parameter, the _fulfillment value_. If it is not a function, it is internally replaced with an _identity_ function (`(x) => x`) which simply passes the fulfillment value forward.\n- `onRejected` _**optional**_\n  - : A `Function` asynchronously called if the `Promise` is rejected. This function has one parameter, the _rejection reason_. If it is not a function, it is internally replaced with a _thrower_ function (`(x) => { throw x; }`) which throws the rejection reason it received.\n\n### Return value\n\nReturns a new `Promise` immediately. This new promise is always pending when returned, regardless of the current promise's status.\n\nOne of the `onFulfilled` and `onRejected` handlers will be executed to handle the current promise's fulfillment or rejection. The call always happens asynchronously, even when the current promise is already settled. The behavior of the returned promise (call it `p`) depends on the handler's execution result, following a specific set of rules. If the handler function:\n\n- returns a value: `p` gets fulfilled with the returned value as its value.\n- doesn't return anything: `p` gets fulfilled with `undefined`.\n- throws an error: `p` gets rejected with the thrown error as its value.\n- returns an already fulfilled promise: `p` gets fulfilled with that promise's value as its value.\n- returns an already rejected promise: `p` gets rejected with that promise's value as its value.\n- returns another pending promise: the fulfillment/rejection of the promise returned by `then` will be subsequent to the resolution/rejection of the promise returned by the handler. Also, the resolved value of the promise returned by `then` will be the same as the resolved value of the promise returned by the handler.\n\n## Description\n\nThe `then()` method schedules callback functions for the eventual completion of a Promise — either fulfillment or rejection. It is the primitive method of promises: the [thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) protocol expects all promise-like objects to expose a `then()` method, and the [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx) and [`Promise.prototype.finally`](../../../globals/Promise/prototype/finally.mdx) methods both work by invoking the object's `then()` method.\n\nFor more information about the `onRejected` handler, see the [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx) reference.\n\n`then()` returns a new promise object. If you call the `then()` method twice on the same promise object (instead of chaining), then this promise object will have two pairs of settlement handlers. All handlers attached to the same promise object are always called in the order they were added. Moreover, the two promises returned by each call of `then()` start separate chains and do not wait for each other's settlement.\n\n[Thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) objects that arise along the `then()` chain are always [resolved](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise/Promise#the_resolver_function) — the `onFulfilled` handler never receives a thenable object, and any thenable returned by either handler are always resolved before being passed to the next handler. This is because when constructing the new promise, the `resolve` and `reject` functions passed by the `executor` are saved, and when the current promise settles, the respective function will be called with the fulfillment value or rejection reason. The resolving logic comes from the resolver function passed by the [`Promise()`](../../../globals/Promise/Promise.mdx) constructor.\n\n`then()` supports subclassing, which means it can be called on instances of subclasses of `Promise`, and the result will be a promise of the subclass type. You can customize the type of the return value through the [`[Symbol.species]`](../../../globals/Promise/@@species.mdx) property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Promise/race.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.race()\n\nThe **`Promise.race()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise settles with the eventual state of the first promise that settles.\n\n## Syntax\n\n```js\nPromise.race(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array`) of promises.\n\n### Return value\n\nA `Promise` that **asynchronously settles** with the eventual state of the first promise in the `iterable` to settle. In other words, it fulfills if the first promise to settle is fulfilled, and rejects if the first promise to settle is rejected. The returned promise remains pending forever if the `iterable` passed is empty. If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) settled.\n\n## Description\n\nThe `Promise.race()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. It's useful when you want the first async task to complete, but do not care about its eventual state (i.e. it can either succeed or fail).\n\nIf the iterable contains one or more non-promise values and/or an already settled promise, then `Promise.race()` will settle to the first of these values found in the iterable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Promise/reject.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.reject()\n\nThe **`Promise.reject()`** method returns a `Promise` object that is rejected with a given reason.\n\n## Syntax\n\n```js\nPromise.reject(reason)\n```\n\n### Parameters\n\n- `reason`\n  - : Reason why this `Promise` rejected.\n\n### Return value\n\nA `Promise` that is rejected with the given reason.\n\n## Description\n\nThe static `Promise.reject` function returns a `Promise` that is rejected. For debugging purposes and selective error catching, it is useful to make `reason` an `instanceof` [`Error`](../../globals/Error/Error.mdx).\n\n`Promise.reject()` is generic and supports subclassing, which means it can be called on subclasses of `Promise`, and the result will be a promise of the subclass type. To do so, the subclass's constructor must implement the same signature as the [`Promise()`](../../globals/Promise/Promise.mdx) constructor — accepting a single `executor` function that can be called with the `resolve` and `reject` callbacks as parameters. `Promise.reject()` is essentially a shorthand for `new Promise((resolve, reject) => reject(reason))`.\n\nUnlike [`Promise.resolve()`](../../globals/Promise/resolve.mdx), `Promise.reject()` always wraps `reason` in a new `Promise` object, even when `reason` is already a `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Promise/resolve.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.resolve()\n\nThe **`Promise.resolve()`** method \"resolves\" a given value to a `Promise`. If the value is a promise, that promise is returned; if the value is a [thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables), `Promise.resolve()` will call the `then()` method with two callbacks it prepared; otherwise the returned promise will be fulfilled with the value.\n\nThis function flattens nested layers of promise-like objects (e.g. a promise that fulfills to a promise that fulfills to something) into a single layer — a promise that fulfills to a non-thenable value.\n\n## Syntax\n\n```js\nPromise.resolve(value)\n```\n\n### Parameters\n\n- `value`\n  - : Argument to be resolved by this `Promise`. Can also be a `Promise` or a thenable to resolve.\n\n### Return value\n\nA `Promise` that is resolved with the given value, or the promise passed as value, if the value was a promise object. A resolved promise can be in any of the states — fulfilled, rejected, or pending. For example, resolving a rejected promise will still result in a rejected promise.\n\n## Description\n\n`Promise.resolve()` _resolves_ a promise, which is not the same as fulfilling or rejecting the promise. See [Promise description](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#description) for definitions of the terminology. In brief, `Promise.resolve()` returns a promise whose eventual state depends on another promise, thenable object, or other value.\n\n`Promise.resolve()` is generic and supports subclassing, which means it can be called on subclasses of `Promise`, and the result will be a promise of the subclass type. To do so, the subclass's constructor must implement the same signature as the [`Promise()`](../../globals/Promise/Promise.mdx) constructor — accepting a single `executor` function that can be called with the `resolve` and `reject` callbacks as parameters.\n\n`Promise.resolve()` special-cases native `Promise` instances. If `value` belongs to `Promise` or a subclass, and `value.constructor === Promise`, then `value` is directly returned by `Promise.resolve()`, without creating a new `Promise` instance. Otherwise, `Promise.resolve()` is essentially a shorthand for `new Promise((resolve) => resolve(value))`.\n\nThe bulk of the resolving logic is actually implemented by the [resolver function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise/Promise#the_resolver_function) passed by the `Promise()` constructor. In summary:\n\n- If a non-[thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) value is passed, the returned promise is already fulfilled with that value.\n- If a thenable is passed, the returned promise will adopt the state of that thenable by calling the `then` method and passing a pair of resolving functions as arguments. (But because native promises directly pass through `Promise.resolve()` without creating a wrapper, the `then` method is not called on native promises.) If the resolver function receives another thenable object, it will be resolved agin, so that the eventual fulfillment value of the promise will never be thenable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Proxy/Proxy.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Proxy()\n\nThe **`Proxy()`** constructor is used to create `Proxy` objects.\n\n## Syntax\n\n```js\nnew Proxy(target, handler)\n```\n\n> **Note:** `Proxy()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `target`\n  - : A target object to wrap with `Proxy`. It can be any sort of object,\n    including a native array, a function, or even another proxy.\n- `handler`\n  - : An object whose properties are functions that define the behavior of the proxy when\n    an operation is performed on it.\n\n## Description\n\nUse the `Proxy()` constructor to create a new `Proxy` object.\nThis constructor takes two mandatory arguments:\n\n- `target` is the object for which you want to create the proxy\n- `handler` is the object that defines the custom behavior of the proxy.\n\nAn empty handler will create a proxy that behaves, in almost all respects, exactly like\nthe target. By defining any of a set group of functions on the `handler`\nobject, you can customize specific aspects of the proxy's behavior. For example, by\ndefining `get()` you can provide a customized version of the target's\n[property accessor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Property_Accessors).\n\n### Handler functions\n\nThis section lists all the handler functions you can define. Handler functions are\nsometimes called _traps_, because they trap calls to the underlying target\nobject.\n\n- [`handler.apply()`](../../globals/Proxy/proxy/apply.mdx)\n  - : A trap for a function call.\n- [`handler.construct()`](../../globals/Proxy/proxy/construct.mdx)\n  - : A trap for the `new` operator.\n- [`handler.defineProperty()`](../../globals/Proxy/proxy/defineProperty.mdx)\n  - : A trap for [`Object.defineProperty`](../../globals/Object/defineProperty.mdx).\n- [`handler.deleteProperty()`](../../globals/Proxy/proxy/deleteProperty.mdx)\n  - : A trap for the `delete` operator.\n- [`handler.get()`](../../globals/Proxy/proxy/get.mdx)\n  - : A trap for getting property values.\n- [`handler.getOwnPropertyDescriptor()`)}](../../globals/Proxy/proxy/getOwnPropertyDescriptor.mdx)\n  - : A trap for [`Object.getOwnPropertyDescriptor`](../../globals/Object/getOwnPropertyDescriptor.mdx).\n- [`handler.getPrototypeOf()`](../../globals/Proxy/proxy/getPrototypeOf.mdx)\n  - : A trap for [`Object.getPrototypeOf()`](../../globals/Object/getPrototypeOf.mdx).\n- [`handler.has()`](../../globals/Proxy/proxy/has.mdx)\n  - : A trap for the `in` operator.\n- [`handler.isExtensible()`](../../globals/Proxy/proxy/isExtensible.mdx)\n  - : A trap for [`Object.isExtensible()`](../../globals/Object/isExtensible.mdx).\n- [`handler.ownKeys()`](../../globals/Proxy/proxy/ownKeys.mdx)\n  - : A trap for [`Object.getOwnPropertyNames()`](../../globals/Object/getOwnPropertyNames.mdx) and\n    [`Object.getOwnPropertySymbols()`](../../globals/Object/getOwnPropertySymbols.mdx).\n- [`handler.preventExtensions()`)}](../../globals/Proxy/proxy/preventExtensions.mdx)\n  - : A trap for [`Object.preventExtensions()`](../../globals/Object/preventExtensions.mdx).\n- [`handler.set()`](../../globals/Proxy/proxy/set.mdx)\n  - : A trap for setting property values.\n- [`handler.setPrototypeOf()`](../../globals/Proxy/proxy/setPrototypeOf.mdx)\n  - : A trap for [`Object.setPrototypeOf()`](../../globals/Object/setPrototypeOf.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Proxy/proxy/apply.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.apply()\n\nThe **`handler.apply()`** method is a trap for a function call.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  apply(target, thisArg, argumentsList) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `apply()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target callable object.\n- `thisArg`\n  - : The `this` argument for the call.\n- `argumentsList`\n  - : The list of arguments for the call.\n\n### Return value\n\nThe `apply()` method can return any value.\n\n## Description\n\nThe **`handler.apply()`** method is a trap for a function call.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- Function call: `proxy(...args)`\n- [`Function.prototype.apply()`](../../../globals/Function/prototype/apply.mdx) and [`Function.prototype.call()`](../../../globals/Function/prototype/call.mdx)\n- [`Reflect.apply()`](../../../globals/Reflect/apply.mdx)\n\nOr any other operation that invokes the `[[Call]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The `target` must be a callable itself. That is, it must be a function object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Proxy/proxy/construct.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.construct()\n\nThe **`handler.construct()`** method is a trap for the `new` operator. In order for the new operation to be valid on the resulting Proxy object, the target used to initialize the proxy must itself have a `[[Construct]]` internal method (i.e. `new target` must be valid).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  construct(target, argumentsList, newTarget) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `construct()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `argumentsList`\n  - : The list of arguments for the constructor.\n- `newTarget`\n  - : The constructor that was originally called, `p` above.\n\n### Return value\n\nThe `construct` method must return an object.\n\n## Description\n\nThe **`handler.construct()`** method is a trap for the `new` operator.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- The `new` operator: `new myFunction(...args)`\n- [`Reflect.construct()`](../../../globals/Reflect/construct.mdx)\n\nOr any other operation that invokes the `[[Construct]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The result must be an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Proxy/proxy/defineProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.defineProperty()\n\nThe **`handler.defineProperty()`** method is a trap for\n[`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  defineProperty(target, property, descriptor) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `defineProperty()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property whose description is to be\n    retrieved.\n- `descriptor`\n  - : The descriptor for the property being defined or modified.\n\n### Return value\n\nThe `defineProperty()` method must return a `Boolean` indicating\nwhether or not the property has been successfully defined.\n\n## Description\n\nThe **`handler.defineProperty()`** method is a trap for\n[`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx), [`Object.defineProperties()`](../../../globals/Object/defineProperties.mdx)\n- [`Reflect.defineProperty()`](../../../globals/Reflect/defineProperty.mdx)\n\nOr any other operation that invokes the `[[DefineOwnProperty]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- A property cannot be added, if the target object is not extensible.\n- A property cannot be added as or modified to be non-configurable, if it does not\n  exists as a non-configurable own property of the target object.\n- A property may not be non-configurable, if a corresponding configurable property of\n  the target object exists.\n- If a property has a corresponding target object property then\n  `Object.defineProperty(target, prop, descriptor)`\n  will not throw an exception.\n- In strict mode, a `false` return value from the\n  `defineProperty()` handler will throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Proxy/proxy/deleteProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.deleteProperty()\n\nThe **`handler.deleteProperty()`** method is a trap for the `delete` operator.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  deleteProperty(target, property) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `deleteProperty()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property to delete.\n\n### Return value\n\nThe `deleteProperty()` method must return a `Boolean` indicating\nwhether or not the property has been successfully deleted.\n\n## Description\n\nThe **`handler.deleteProperty()`** method is a trap for the `delete` operator.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- The [`delete`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) operator: `delete proxy[foo]` and\n  `delete proxy.foo`\n- [`Reflect.deleteProperty()`](../../../globals/Reflect/deleteProperty.mdx)\n\nOr any other operation that invokes the `[[Delete]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- A property cannot be deleted, if it exists as a non-configurable own property of the\n  target object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Proxy/proxy/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.get()\n\nThe **`handler.get()`** method is a trap for getting a property\nvalue.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  get(target, property, receiver) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `get()` method. `this`\nis bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property to get.\n- `receiver`\n  - : Either the proxy or an object that inherits from the proxy.\n\n### Return value\n\nThe `get()` method can return any value.\n\n## Description\n\nThe **`handler.get()`** method is a trap for getting a property\nvalue.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- Property access: `proxy[foo]` and `proxy.bar`\n- [`Reflect.get()`](../../../globals/Reflect/get.mdx)\n\nOr any other operation that invokes the `[[Get]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The value reported for a property must be the same as the value of the corresponding\n  target object property if the target object property is a non-writable,\n  non-configurable own data property.\n- The value reported for a property must be undefined if the corresponding target\n  object property is a non-configurable own accessor property that has\n  `undefined` as its `[[Get]]` attribute.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Proxy/proxy/getOwnPropertyDescriptor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.getOwnPropertyDescriptor()\n\nThe **`handler.getOwnPropertyDescriptor()`** method is a trap for [`Object.getOwnPropertyDescriptor()`](../../../globals/Object/getOwnPropertyDescriptor.mdx).\n\n\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  getOwnPropertyDescriptor(target, prop) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `getOwnPropertyDescriptor()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `prop`\n  - : The name of the property whose description should be retrieved.\n\n### Return value\n\nThe `getOwnPropertyDescriptor()` method must return an object or `undefined`.\n\n## Description\n\nThe **`handler.getOwnPropertyDescriptor()`** method is a trap for [`Object.getOwnPropertyDescriptor()`](../../../globals/Object/getOwnPropertyDescriptor.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.getOwnPropertyDescriptor()`](../../../globals/Object/getOwnPropertyDescriptor.mdx)\n- [`Reflect.getOwnPropertyDescriptor()`](../../../globals/Reflect/getOwnPropertyDescriptor.mdx)\n\nOr any other operation that invokes the `[[GetOwnProperty]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `getOwnPropertyDescriptor()` must return an object or `undefined`.\n- A property cannot be reported as non-existent, if it exists as a non-configurable own property of the target object.\n- A property cannot be reported as non-existent, if it exists as an own property of the target object and the target object is not extensible.\n- A property cannot be reported as existent, if it does not exists as an own property of the target object and the target object is not extensible.\n- A property cannot be reported as non-configurable, if it does not exists as an own property of the target object or if it exists as a configurable own property of the target object.\n- The result of `Object.getOwnPropertyDescriptor(target)` can be applied to the target object using `Object.defineProperty()` and will not throw an exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Proxy/proxy/getPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.getPrototypeOf()\n\nThe **`handler.getPrototypeOf()`** method is a trap for the\n`[[GetPrototypeOf]]` internal method.\n\n## Syntax\n\n```js\nnew Proxy(obj, {\n  getPrototypeOf(target) {\n    // …\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `getPrototypeOf()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `getPrototypeOf()` method must return an object or `null`.\n\n## Description\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.getPrototypeOf()`](../../../globals/Object/getPrototypeOf.mdx)\n- [`Reflect.getPrototypeOf()`](../../../globals/Reflect/getPrototypeOf.mdx)\n- [`Object.prototype.isPrototypeOf()`](../../../globals/Object/prototype/isPrototypeOf.mdx)\n- `instanceof`\n\nOr any other operation that invokes the `[[GetPrototypeOf]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `getPrototypeOf()` method must return an object or `null`.\n- If `target` is not extensible,\n  `Object.getPrototypeOf(proxy)` method must return the same\n  value as `Object.getPrototypeOf(target)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Proxy/proxy/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.has()\n\nThe **`handler.has()`** method is a trap for the `in` operator.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  has(target, prop) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to `has()` method. `this` is\nbound to the handler.\n\n- `target`\n  - : The target object.\n- `prop`\n  - : The name or `Symbol` of the property to check for existence.\n\n### Return value\n\nThe `has()` method must return a boolean value.\n\n## Description\n\nThe **`handler.has()`** method is a trap for the `in` operator.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- The [`in`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/in) operator: `foo in proxy`\n- [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) check: `with(proxy) { (foo); }`\n- [`Reflect.has()`](../../../globals/Reflect/has.mdx)\n\nOr any other operation that invokes the `[[HasProperty]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- A property cannot be reported as non-existent, if it exists as a non-configurable\n  own property of the target object.\n- A property cannot be reported as non-existent, if it exists as an own property of\n  the target object and the target object is not extensible.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Proxy/proxy/isExtensible.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.isExtensible()\n\nThe **`handler.isExtensible()`** method is a trap for\n[`Object.isExtensible()`](../../../globals/Object/isExtensible.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  isExtensible(target) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `isExtensible()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `isExtensible()` method must return a boolean value.\n\n## Description\n\nThe **`handler.isExtensible()`** method is a trap for\n[`Object.isExtensible()`](../../../globals/Object/isExtensible.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.isExtensible()`](../../../globals/Object/isExtensible.mdx)\n- [`Reflect.isExtensible()`](../../../globals/Reflect/isExtensible.mdx)\n\nOr any other operation that invokes the `[[IsExtensible]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `Object.isExtensible(proxy)` must return the same value as\n  `Object.isExtensible(target)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Proxy/proxy/ownKeys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.ownKeys()\n\nThe **`handler.ownKeys()`** method is a trap for\n[`Reflect.ownKeys()`](../../../globals/Reflect/ownKeys.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  ownKeys(target) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `ownKeys()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `ownKeys()` method must return an enumerable object.\n\n## Description\n\nThe **`handler.ownKeys()`** method is a trap for\n[`Reflect.ownKeys()`](../../../globals/Reflect/ownKeys.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.getOwnPropertyNames()`](../../../globals/Object/getOwnPropertyNames.mdx)\n- [`Object.getOwnPropertySymbols()`](../../../globals/Object/getOwnPropertySymbols.mdx)\n- [`Object.keys()`](../../../globals/Object/keys.mdx)\n- [`Reflect.ownKeys()`](../../../globals/Reflect/ownKeys.mdx)\n\nOr any other operation that invokes the `[[OwnPropertyKeys]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The result of `ownKeys()` must be an array.\n- The type of each array element is either a `String` or a `Symbol`.\n- The result List must contain the keys of all non-configurable own properties of the\n  target object.\n- If the target object is not extensible, then the result List must contain all the\n  keys of the own properties of the target object and no other values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Proxy/proxy/preventExtensions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.preventExtensions()\n\nThe **`handler.preventExtensions()`** method is a trap for [`Object.preventExtensions()`](../../../globals/Object/preventExtensions.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  preventExtensions(target) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `preventExtensions()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `preventExtensions()` method must return a boolean value.\n\n## Description\n\nThe **`handler.preventExtensions()`** method is a trap for [`Object.preventExtensions()`](../../../globals/Object/preventExtensions.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.preventExtensions()`](../../../globals/Object/preventExtensions.mdx)\n- [`Reflect.preventExtensions()`](../../../globals/Reflect/preventExtensions.mdx)\n- [`Object.seal()`](../../../globals/Object/seal.mdx)\n- [`Object.freeze()`](../../../globals/Object/freeze.mdx)\n\nOr any other operation that invokes the `[[PreventExtensions]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `Object.preventExtensions(proxy)` only returns `true` if `Object.isExtensible(proxy)` is `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Proxy/proxy/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.set()\n\nThe **`handler.set()`** method is a trap for setting a property\nvalue.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  set(target, property, value, receiver) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `set()` method. `this`\nis bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property to set.\n- `value`\n  - : The new value of the property to set.\n- `receiver`\n\n  - : The object to which the assignment was originally directed. This is usually the\n    proxy itself. But a `set()` handler can also be called indirectly, via\n    the prototype chain or various other ways.\n\n    For example, suppose a script does\n    `obj.name = \"jen\"`, and `obj` is not a\n    proxy, and has no own property `.name`, but it has a proxy on its\n    prototype chain. That proxy's `set()` handler will be called, and\n    `obj` will be passed as the receiver.\n\n### Return value\n\nThe `set()` method should return a boolean value.\n\n- Return `true` to indicate that assignment succeeded.\n- If the `set()` method returns `false`, and the assignment\n  happened in strict-mode code, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) will be thrown.\n\n## Description\n\nThe **`handler.set()`** method is a trap for setting property\nvalue.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- Property assignment: `proxy[foo] = bar` and `proxy.foo = bar`\n- [`Reflect.set()`](../../../globals/Reflect/set.mdx)\n\nOr any other operation that invokes the `[[Set]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- Cannot change the value of a property to be different from the value of the\n  corresponding target object property if the corresponding target object property is a\n  non-writable, non-configurable data property.\n- Cannot set the value of a property if the corresponding target object property is a\n  non-configurable accessor property that has `undefined` as its\n  `[[Set]]` attribute.\n- In strict mode, a `false` return value from the `set()`\n  handler will throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Proxy/proxy/setPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.setPrototypeOf()\n\nThe **`handler.setPrototypeOf()`** method is a trap for\n[`Object.setPrototypeOf()`](../../../globals/Object/setPrototypeOf.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  setPrototypeOf(target, prototype) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `setPrototypeOf()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `prototype`\n  - : The object's new prototype or `null`.\n\n### Return value\n\nThe `setPrototypeOf()` method returns `true` if the\n`[[Prototype]]` was successfully changed, otherwise `false`.\n\n## Description\n\nThe **`handler.setPrototypeOf()`** method is a trap for\n[`Object.setPrototypeOf()`](../../../globals/Object/setPrototypeOf.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.setPrototypeOf()`](../../../globals/Object/setPrototypeOf.mdx)\n- [`Reflect.setPrototypeOf()`](../../../globals/Reflect/setPrototypeOf.mdx)\n\nOr any other operation that invokes the `[[SetPrototypeOf]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- If `target` is not extensible, the `prototype`\n  parameter must be the same value as\n  `Object.getPrototypeOf(target)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Proxy/revocable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Proxy.revocable()\n\nThe **`Proxy.revocable()`** static method creates a revocable `Proxy` object.\n\n## Syntax\n\n```js\nProxy.revocable(target, handler)\n```\n\n### Parameters\n\n- `target`\n  - : A target object to wrap with `Proxy`. It can be any sort of object, including a native array, a function, or even another proxy.\n- `handler`\n  - : An object whose properties are functions defining the behavior of `proxy` when an operation is performed on it.\n\n### Return value\n\nA plain object with the following two properties:\n\n- `proxy`\n  - : A Proxy object exactly the same as one created with a [`new Proxy(target, handler)`](../../globals/Proxy/Proxy.mdx) call.\n- `revoke`\n  - : A function with no parameters to revoke (switch off) the `proxy`.\n\n## Description\n\nThe `Proxy.revocable()` factory function is the same as the [`Proxy()`](../../globals/Proxy/Proxy.mdx) constructor, except that in addition to creating a proxy object, it also creates a `revoke` function that can be called to disable the proxy. The proxy object and the `revoke` function are wrapped in a plain object.\n\nThe `revoke` function does not take any parameters, nor does it rely on the `this` value. The created `proxy` object is attached to the `revoke` function as a [private property](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/Private_class_fields) that the `revoke` function accesses on itself when called (the existence of the private property is not observable from the outside, but it has implications on how garbage collection happens). The `proxy` object is _not_ captured within the [closure](https://developer.mozilla.org/docs/Web/JavaScript/Closures) of the `revoke` function (which will make garbage collection of `proxy` impossible if `revoke` is still alive).\n\nAfter the `revoke()` function gets called, the proxy becomes unusable: any trap to a handler throws a [`TypeError`](../../globals/TypeError/TypeError.mdx). Once a proxy is revoked, it remains revoked, and calling `revoke()` again has no effect — in fact, the call to `revoke()` detaches the `proxy` object from the `revoke` function, so the `revoke` function will not be able to access the proxy again at all. If the proxy is not referenced elsewhere, it will then be eligible for garbage collection. The `revoke` function also detaches `target` and `handler` from the `proxy`, so if `target` is not referenced elsewhere, it will also be eligible for garbage collection, even when its proxy is still alive, since there's no longer a way to meaningfully interact with the target object.\n\nLetting users interact with an object through a revocable proxy allows you to [control the lifetime](https://developer.mozilla.org/docs/Web/JavaScript/Memory_Management) of the object exposed to the user — you can make the object garbage-collectable even when the user is still holding a reference to its proxy.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/RangeError/RangeError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RangeError\n\nThe **`RangeError()`** constructor creates an error\nwhen a value is not in the set or range of allowed values.\n\n## Syntax\n\n```js\nnew RangeError()\nnew RangeError(message)\nnew RangeError(message, options)\nnew RangeError(message, fileName)\nnew RangeError(message, fileName, lineNumber)\n\nRangeError()\nRangeError(message)\nRangeError(message, options)\nRangeError(message, fileName)\nRangeError(message, fileName, lineNumber)\n```\n\n> **Note:** `RangeError()` can be called with or without `new`. Both create a new `RangeError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/ReadableByteStreamController/prototype/byobRequest.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# byobRequest\n\nThe **`byobRequest`** read-only property of the `ReadableByteStreamController` interface returns the current BYOB request, or `null` if there are no pending requests.\n\nAn underlying byte source should check this property, and use it to write data to the stream if it exists (rather than using `ReadableByteStreamController.enqueue()`).\nThis will result in an efficient zero-byte transfer of the data to the consumer.\n\n## Value\n\nA `ReadableStreamBYOBRequest` object instance, or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/ReadableByteStreamController/prototype/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# close()\n\nThe **`close()`** method of the `ReadableByteStreamController` interface closes the associated stream.\n\nThis might be called by the underlying source when its data source has been exhausted/completed.\n\n> **Note:** Readers will still be able to read any previously-enqueued chunks from the stream, but once those are read, the stream will become closed.\n> However if there is an outstanding and partially written `byobRequest` when `close()` is called, the stream will be errored.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableByteStreamController`, it is already closed, or the stream is not readable for some other reason.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/ReadableByteStreamController/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# desiredSize\n\nThe **`desiredSize`** read-only property of the`ReadableByteStreamController` interface returns the number of bytes required to fill the stream's internal queue to its \"desired size\".\n\nThe value is used by the stream to indicate a preferred flow rate to the underlying source.\nSources that support throttling or pausing their inflow of data (not all do!) should control the inflow such that `desiredSize` of the stream buffer is kept positive and as close to zero as possible.\n\nThe `desiredSize` is used to apply backpressure from downstream consumers.\n\n## Value\n\nAn integer. Note that this can be negative if the queue is over-full.\n\nThe value will be `null` if the stream has errored and `0` if it is closed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/ReadableByteStreamController/prototype/enqueue.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# enqueue()\n\nThe **`enqueue()`** method of the `ReadableByteStreamController` interface enqueues a given chunk on the associated readable byte stream (the chunk is copied into the stream's internal queues).\n\nThis should only be used to transfer data to the queue when `byobRequest` is `null`.\n\n## Syntax\n\n```js\nenqueue(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : The chunk to enqueue.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableByteStreamController`, or the stream cannot be read for some other reason, or the chunk is not an object, or the chunk's internal array buffer is non-existent, zero-length, or detached.\n    It is also thrown if the stream has been closed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/ReadableByteStreamController/prototype/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# error()\n\nThe **`error()`** method of the `ReadableByteStreamController` interface causes any future interactions with the associated stream to error with the specified reason.\n\nThis is commonly called by an underlying source to surface an error from the interface where it gets its data (such as a file-read or socket error).\nIt can also be called from elsewhere to trigger a stream error, for example if another part of the system that the stream relies on fails.\n\n## Syntax\n\n```js\nerror(errorObject)\n```\n\n### Parameters\n\n- `errorObject`\n  - : Any object that you want future interactions to fail with.\n\n### Return value\n\n`undefined`\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableByteStreamController`, or the stream is not readable for some other reason.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/ReadableStream/ReadableStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream()\n\nThe **`ReadableStream()`** constructor creates and returns a readable stream object from the given handlers.\n\n## Syntax\n\n```js\nnew ReadableStream()\nnew ReadableStream(underlyingSource)\nnew ReadableStream(underlyingSource, queuingStrategy)\n```\n\n### Parameters\n\n- `underlyingSource` _**optional**_\n\n  - : An object containing methods and properties that define how the constructed stream instance will behave.\n    `underlyingSource` can contain the following:\n\n    - `start` (controller) _**optional**_\n      - : This is a method, called immediately when the object is constructed. The\n        contents of this method are defined by the developer, and should aim to get access\n        to the stream source, and do anything else required to set up the stream\n        functionality. If this process is to be done asynchronously, it can return a\n        promise to signal success or failure. The `controller` parameter passed\n        to this method is a `ReadableStreamDefaultController` or a\n        `ReadableByteStreamController`, depending on the value of the\n        `type` property. This can be used by the developer to control the\n        stream during set up.\n    - `pull` (controller) _**optional**_\n      - : This method, also defined by the developer, will be called repeatedly when the\n        stream's internal queue of chunks is not full, up until it reaches its high water\n        mark. If `pull()` returns a promise, then it won't be called again\n        until that promise fulfills; if the promise rejects, the stream will become\n        errored. The `controller` parameter passed to this method is a\n        `ReadableStreamDefaultController` or a\n        `ReadableByteStreamController`, depending on the value of the\n        `type` property. This can be used by the developer to control the\n        stream as more chunks are fetched.\n    - `cancel` (reason) _**optional**_\n      - : This method, also defined by the developer, will be called if the app signals\n        that the stream is to be cancelled (e.g. if `ReadableStream.cancel()`\n        is called). The contents should do whatever is necessary to release access to the\n        stream source. If this process is asynchronous, it can return a promise to signal\n        success or failure. The `reason` parameter contains a\n        string describing why the stream was cancelled.\n    - `type` _**optional**_\n      - : This property controls what type of readable stream is being dealt with. If it\n        is included with a value set to `\"bytes\"`, the passed controller object\n        will be a `ReadableByteStreamController` capable of handling a BYOB\n        (bring your own buffer)/byte stream. If it is not included, the passed controller\n        will be a `ReadableStreamDefaultController`.\n    - `autoAllocateChunkSize` _**optional**_\n\n      - : For byte streams, the developer can set the `autoAllocateChunkSize` with a positive integer value to turn on the stream's auto-allocation feature.\n        With this is set, the stream implementation will automatically allocate a view buffer of the specified size in `ReadableByteStreamController.byobRequest` when required.\n\n        This must be set to enable zero-copy transfers to be used with a default `ReadableStreamDefaultReader`.\n        If not set, a default reader will still stream data, but `ReadableByteStreamController.byobRequest` will always be `null` and transfers to the consumer must be via the stream's internal queues.\n\n- `queuingStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer — this defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk` — this indicates the size to\n        use for each chunk, in bytes.\n\n    > **Note:** You could define your own custom\n    > `queuingStrategy`, or use an instance of\n    > `ByteLengthQueuingStrategy` or `CountQueuingStrategy`\n    > for this object value. If no `queuingStrategy` is supplied, the default\n    > used is the same as a `CountQueuingStrategy` with a high water mark of\n    > 1\\.\n\n### Return value\n\nAn instance of the `ReadableStream` object.\n\n### Exceptions\n\n- `RangeError`\n  - Thrown if the supplied type value is neither `\"bytes\"` nor `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/ReadableStream/prototype/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.cancel()\n\nThe **`cancel()`** method of the\n`ReadableStream` interface returns a `Promise` that\nresolves when the stream is canceled.\n\nCancel is used when you've completely finished with the stream and don't need any more\ndata from it, even if there are chunks enqueued waiting to be read. That data is lost\nafter cancel is called, and the stream is not readable any more. To read those chunks\nstill and not completely get rid of the stream, you'd use\n`ReadableStreamDefaultController.close()`.\n\n## Syntax\n\n```js\ncancel()\ncancel(reason)\n```\n\n### Parameters\n\n- `reason` _**optional**_\n  - : A human-readable reason for the cancellation. The underlying source may or may not use it.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason` parameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to cancel is not a `ReadableStream`, or it is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/ReadableStream/prototype/getReader.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.getReader()\n\nThe **`getReader()`** method of the `ReadableStream` interface creates a reader and locks the stream to it.\nWhile the stream is locked, no other reader can be acquired until this one is released.\n\n## Syntax\n\n```js\ngetReader()\ngetReader(options)\n```\n\n### Parameters\n\n- `options` _**optional**_\n\n  - : An object containing the following properties:\n\n    - `mode` _**optional**_\n\n      - : A property that specifies the type of reader to create.\n        Values can be:\n\n        - `\"byob\"`, which results in a `ReadableStreamBYOBReader` being created that can read readable byte streams (streams that support zero-copy transfer from an underlying byte source to the reader when internal stream buffers are empty).\n        - `undefined` (or not specified at all — this is the default), which results in a `ReadableStreamDefaultReader` being created that can read individual chunks from a stream.\n\n### Return value\n\nA `ReadableStreamDefaultReader` or `ReadableStreamBYOBReader` object instance, depending on the `mode` value.\n\n### Exceptions\n\n- `RangeError`\n  - : Thrown if the provided mode value is not `\"byob\"` or `undefined`.\n- `TypeError`\n  - : Thrown if the stream you are trying to create a reader for is already locked, or not a `ReadableStream`."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/ReadableStream/prototype/locked.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.locked\n\nThe **`locked`** read-only property of the `ReadableStream` interface returns whether or not the readable stream is locked to a reader.\n\nA readable stream can have at most one active reader at a time, and is locked to that reader until it is released.\nA reader might be obtained using `ReadableStream.getReader()` and released using the reader's `releaseLock()` method.\n\n## Value\n\nA `boolean` value indicating whether or not the readable stream is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/ReadableStream/prototype/pipeThrough.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.pipeThrough()\n\nThe **`pipeThrough()`** method of the `ReadableStream` interface provides a chainable way of piping the current stream through a transform stream or any other writable/readable pair.\n\nPiping a stream will generally lock it for the duration of the pipe, preventing other readers from locking it.\n\n## Syntax\n\n```js\npipeThrough(transformStream)\npipeThrough(transformStream, options)\n```\n\n### Parameters\n\n- `transformStream`\n\n  - : A `TransformStream` (or an object with the structure\n    `{writable, readable}`) consisting of a readable stream and a writable\n    stream working together to transform some data from one form to another. Data written\n    to the `writable` stream can be read in some transformed state by the\n    `readable` stream. For example, a `TextDecoder`, has bytes\n    written to it and strings read from it, while a video decoder has encoded bytes\n    written to it and uncompressed video frames read from it.\n\n- `options` _**optional**_\n\n  - : The options that should be used when piping to the `writable` stream.\n    Available options are:\n\n    - `preventClose`\n\n      - : If this is set to `true`, the source `ReadableStream` closing will no longer cause the destination `WritableStream` to be closed.\n        The method will return a fulfilled promise once this process completes, unless an error is encountered while closing the destination, in which case it will be rejected with that error.\n\n    - `preventAbort`\n\n      - : If this is set to `true`, errors in the source `ReadableStream` will no longer abort the destination `WritableStream`.\n        The method will return a promise rejected with the source's error, or with any error that occurs during aborting the destination.\n\n    - `preventCancel`\n\n      - : If this is set to `true`, errors in the destination `WritableStream` will no longer cancel the source `ReadableStream`.\n        In this case the method will return a promise rejected with the source's error, or with any error that occurs during canceling the source.\n        In addition, if the destination writable stream starts out closed or closing, the source readable stream will no longer be canceled.\n        In this case the method will return a promise rejected with an error indicating piping to a closed stream failed, or with any error that occurs during canceling the source.\n\n### Return value\n\nThe `readable` side of the `transformStream`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the `writable` and/or `readable` property of `transformStream` are undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/ReadableStream/prototype/pipeTo.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.pipeTo()\n\nThe **`pipeTo()`** method of the `ReadableStream` interface pipes the current `ReadableStream` to a given `WritableStream` and returns a `Promise` that fulfills when the piping process completes successfully, or rejects if any errors were encountered.\n\nPiping a stream will generally `lock` it for the duration of the pipe, preventing other readers from locking it.\n\n## Syntax\n\n```js\npipeTo(destination)\npipeTo(destination, options)\n```\n\n### Parameters\n\n- `destination`\n\n  - : A `WritableStream` that acts as the final destination for the `ReadableStream`.\n\n- `options` _**optional**_\n\n  - : The options that should be used when piping to the `writable` stream.\n    Available options are:\n\n    - `preventClose`\n      - : If this is set to `true`, the source `ReadableStream` closing will no longer cause the destination `WritableStream` to be closed.\n        The method will return a fulfilled promise once this process completes, unless an error is encountered while closing the destination in which case it will be rejected with that error.\n    - `preventAbort`\n      - : If this is set to `true`, errors in the source `ReadableStream` will no longer abort the destination `WritableStream`.\n        The method will return a promise rejected with the source's error, or with any error that occurs during aborting the destination.\n    - `preventCancel`\n      - : If this is set to `true`, errors in the destination `WritableStream` will no longer cancel the source `ReadableStream`.\n        In this case the method will return a promise rejected with the source's error, or with any error that occurs during canceling the source.\n        In addition, if the destination writable stream starts out closed or closing, the source readable stream will no longer be canceled.\n        In this case the method will return a promise rejected with an error indicating piping to a closed stream failed, or with any error that occurs during canceling the source.\n\n### Return value\n\nA `Promise` that resolves when the piping process has completed.\n\n### Exceptions\n\n- `TypeError`\n  - : The `writableStream` and/or `readableStream` objects are not a writable stream/readable stream, or one or both of the streams are locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/ReadableStream/prototype/tee.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.tee()\n\nThe **`tee()`** method of the\n`ReadableStream` interface [tees](https://streams.spec.whatwg.org/#tee-a-readable-stream) the current readable stream, returning a\ntwo-element array containing the two resulting branches as\nnew `ReadableStream` instances.\n\nThis is useful for allowing two readers to read a stream sequentially or simultaneously,\nperhaps at different speeds.\nFor example, you might do this in a ServiceWorker if you want to fetch\na response from the server and stream it to the browser, but also stream it to the\nServiceWorker cache. Since a response body cannot be consumed more than once, you'd need\ntwo copies to do this.\n\nA teed stream will partially signal backpressure at the rate of the _faster_ consumer\nof the two `ReadableStream` branches,\nand unread data is enqueued internally on the slower consumed `ReadableStream`\nwithout any limit or backpressure.\nThat is, when _both_ branches have an unread element in their internal queue,\nthen the original `ReadableStream`'s controller's internal queue will start to fill up,\nand once its `ReadableStreamDefaultController.desiredSize\", \"desiredSize` ≤ 0\nor byte stream controller `ReadableByteStreamController.desiredSize\", \"desiredSize` ≤ 0,\nthen the controller will stop calling `pull(controller)` on the\nunderlying source passed to `ReadableStream.ReadableStream\", \"new ReadableStream()`.\nIf only one branch is consumed, then the entire body will be enqueued in memory.\nTherefore, you should not use the built-in `tee()` to read very large streams\nin parallel at different speeds.\nInstead, search for an implementation that fully backpressures\nto the speed of the _slower_ consumed branch.\n\nTo cancel the stream you then need to cancel both resulting branches. Teeing a stream\nwill generally lock it for the duration, preventing other readers from locking it.\n\n## Syntax\n\n```js\ntee()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nAn `Array` containing two `ReadableStream` instances.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source stream is not a `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/ReadableStreamBYOBReader/ReadableStreamBYOBReader.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# ReadableStreamBYOBReader()\n\nThe **`ReadableStreamBYOBReader()`** constructor creates and returns a `ReadableStreamBYOBReader` object instance.\n\n> **Note:** You generally wouldn't use this constructor manually;\n> instead, you'd use the `ReadableStream.getReader()` method with the argument `\"byob\"`.\n\n## Syntax\n\n```js\nnew ReadableStreamBYOBReader(stream)\n```\n\n### Parameters\n\n- `stream`\n  - : The `ReadableStream` to be read.\n\n### Return value\n\nAn instance of the `ReadableStreamBYOBReader` object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the supplied `stream` parameter is not a `ReadableStream`, or it is already locked for reading by another reader, or its stream controller is not a `ReadableByteStreamController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/ReadableStreamBYOBReader/prototype/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# cancel()\n\nThe **`cancel()`** method of the `ReadableStreamBYOBReader` interface returns a `Promise` that resolves when the stream is canceled.\nCalling this method signals a loss of interest in the stream by a consumer.\n\n> **Note:** If the reader is active, the `cancel()` method behaves the same as that for the associated stream (`ReadableStream.cancel()`).\n\n## Syntax\n\n```js\ncancel()\ncancel(reason)\n```\n\n### Parameters\n\n- `reason` __optional__\n  - : A human-readable reason for the cancellation. The underlying source may or may not use it.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason` parameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamBYOBReader`, or the stream has no owner.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/ReadableStreamBYOBReader/prototype/closed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# closed\n\nThe **`closed`** read-only property of the `ReadableStreamBYOBReader` interface returns a `Promise` that fulfills when the stream closes, or rejects if the stream throws an error or the reader's lock is released.\n\nThis property enables you to write code that responds to an end to the streaming process.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/ReadableStreamBYOBReader/prototype/read.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# read()\n\nThe **`read()`** method of the `ReadableStreamBYOBReader` interface is used to read data into a view on a user-supplied buffer from an associated readable byte stream.\nA request for data will be satisfied from the stream's internal queues if there is any data present.\nIf the stream queues are empty, the request may be supplied as a zero-copy transfer from the underlying byte source.\n\nThe method takes as an argument a view on a buffer that supplied data is to be read into, and returns a `Promise`.\nThe promise fulfills with an object that has properties `value` and `done` when data comes available, or if the stream is cancelled.\nIf the stream is errored, the promise will be rejected with the relevant error object.\n\nIf a chunk of data is supplied, the `value` property will contain a new view.\nThis will be a view over the same buffer/backing memory (and of the same type) as the original `view` passed to the `read()` method, now populated with the new chunk of data.\nNote that once the promise fulfills, the original `view` passed to the method will be detached and no longer usable.\nThe promise will fulfill with a `value: undefined` if the stream has been cancelled.\nIn this case the backing memory region of `view` is discarded and not returned to the caller (all previously read data in the view's buffer is lost).\n\nThe `done` property indicates whether or not more data is expected.\nThe value is set `true` if the stream is closed or cancelled, and `false` otherwise.\n\n## Syntax\n\n```js\nread(view)\n```\n\n### Parameters\n\n- `view`\n  - : The view that data is to be read into.\n\n### Return value\n\nA `Promise`, which fulfills/rejects with a result depending on the state of the stream.\n\nThe following are possible:\n\n- If a chunk is available and the stream is still active, the promise fulfills with an object of the form:\n\n  ```\n  { value: theChunk, done: false }\n  ```\n\n  `theChunk` is a view containing the new data.\n  This is a view of the same type and over the same backing memory as the `view` passed to the `read()` method.\n  The original `view` will be detached and no longer usable.\n\n- If the stream is closed, the promise fulfills with an object of the form (where `theChunk` has the same properties as above):\n\n  ```\n  { value: theChunk, done: true }\n  ```\n\n- If the stream is cancelled, the promise fulfills with an object of the form:\n\n  ```\n  { value: undefined, done: true }\n  ```\n\n  In this case the backing memory is discarded.\n\n- If the stream throws an error, the promise rejects with the relevant error.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamBYOBReader`, the stream has no owner, the view is not an object or has become detached, the view's length is 0, or `ReadableStreamBYOBReader.releaseLock()` is called (when there's is a pending read request).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/ReadableStreamBYOBReader/prototype/releaseLock.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# releaseLock()\n\nThe **`releaseLock()`** method of the `ReadableStreamBYOBReader` interface releases the reader's lock on the stream.\nAfter the lock is released, the reader is no longer active.\n\nThe reader will appear errored if the associated stream is errored when the lock is released; otherwise, the reader will appear closed.\n\nIf the reader's lock is released while it still has pending read requests then the promises returned by the reader's `ReadableStreamBYOBReader.read()` method are immediately rejected with a `TypeError`.\nUnread chunks remain in the stream's internal queue and can be read later by acquiring a new reader.\n\n## Syntax\n\n```js\nreleaseLock()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamBYOBReader`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/ReadableStreamBYOBRequest/prototype/respond.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# respond()\n\nThe **`respond()`** method of the `ReadableStreamBYOBRequest` interface is used to signal to the associated readable byte stream that the specified number of bytes were written into the `ReadableStreamBYOBRequest.view`.\n\nAfter this method is called, the `view` will be transferred and no longer modifiable.\n\n## Syntax\n\n```js\nrespond(bytesWritten)\n```\n\n### Parameters\n\n- `bytesWritten`\n  - : The number of bytes written into `ReadableStreamBYOBRequest.view`.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : The request does not have an associated `ReadableByteStreamController` or the view buffer is not detached/cannot be transferred into.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/ReadableStreamBYOBRequest/prototype/respondWithNewView.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# respondWithNewView()\n\nThe **`respondWithNewView()`** method of the `ReadableStreamBYOBRequest` interface specifies a new view that the consumer of the associated readable byte stream should write to instead of `ReadableStreamBYOBRequest.view`.\n\nThe new view must be a `TypedArray` or a `DataView` that provides a view onto the same backing memory region as `ReadableStreamBYOBRequest.view`.\nAfter this method is called, the view that was passed into the method will be transferred and no longer modifiable.\n\nThe method is intended for use cases where an underlying byte source needs to transfer a `byobRequest.view` internally before finishing its response.\nFor example, the source may transfer the BYOB view to a separate worker thread, and wait for the worker to transfer it back once it has been filled.\n\n## Syntax\n\n```js\nrespondWithNewView(view)\n```\n\n### Parameters\n\n- `view`\n\n  - : A `TypedArray` or a `DataView` that the consumer of the associated readable byte stream should write to instead of `ReadableStreamBYOBRequest.view`.\n\n    This must be a view onto the same backing memory region as `ReadableStreamBYOBRequest.view` and occupy the same or less memory.\n    Specifically, it must be either the view's buffer or a transferred version, must have the same `byteOffset`, and a `byteLength` (number of bytes written) that is less than or equal to that of the view.\n\n### Return value\n\n`undefined`\n\n### Exceptions\n\n- `TypeError`\n\n  - : Thrown if the source object is not a `ReadableStreamBYOBRequest`, or there is no associated controller, or the associated internal array buffer is non-existent or detached.\n    It may also be thrown if the `view` is zero-length when there is an active reader, or non-zero when called on a closed stream.\n\n- `RangeError`\n  - : Thrown if the new `view` does not match the backing memory region of `ReadableStreamBYOBRequest.view`.\n    For example, it is not the same buffer (or a transferred version), has a different `byteOffset`, or is larger than the memory available to the backing view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/ReadableStreamBYOBRequest/prototype/view.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# view\n\nThe **`view`** getter property of the `ReadableStreamBYOBRequest` interface returns the current view.\n\n## Value\n\nA typed array representing the destination region to which the controller can write generated data.\n\n`null` if the request has already been responded to, by calling `ReadableStreamBYOBRequest.respond()` or `ReadableStreamBYOBRequest.respondWithNewView()`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/ReadableStreamDefaultController/prototype/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.close()\n\nThe **`close()`** method of the\n`ReadableStreamDefaultController` interface closes the associated stream.\n\nReaders will still be able to read any previously-enqueued chunks from the stream,\nbut once those are read, the stream will become closed. If you want to completely get\nrid of the stream and discard any enqueued chunks, you'd use\n`ReadableStream.cancel()` or\n`ReadableStreamDefaultReader.cancel()`.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/ReadableStreamDefaultController/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.desiredSize\n\nThe **`desiredSize`** read-only property of the\n`ReadableStreamDefaultController` interface returns the desired size\nrequired to fill the stream's internal queue.\n\n## Value\n\nAn integer. Note that this can be negative if the queue is over-full.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/ReadableStreamDefaultController/prototype/enqueue.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.enqueue()\n\nThe **`enqueue()`** method of the\n`ReadableStreamDefaultController` interface enqueues a given chunk in the\nassociated stream.\n\n## Syntax\n\n```js\nenqueue(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : The chunk to enqueue.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/ReadableStreamDefaultController/prototype/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.error()\n\nThe **`error()`** method of the\n`ReadableStreamDefaultController` interface causes any future interactions\nwith the associated stream to error.\n\n> **Note:** The `error()` method can be called\n> more than once, and can be called when the stream is not readable.\n\n## Syntax\n\n```js\nerror(e)\n```\n\n### Parameters\n\n- `e`\n  - : The error you want future interactions to fail with.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/ReadableStreamDefaultReader/ReadableStreamDefaultReader.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader()\n\nThe **`ReadableStreamDefaultReader()`**\nconstructor creates and returns a `ReadableStreamDefaultReader` object\ninstance.\n\n## Syntax\n\n```js\nnew ReadableStreamDefaultReader(stream)\n```\n\n### Parameters\n\n- `stream`\n  - : The `ReadableStream` to be read.\n\n### Return value\n\nAn instance of the `ReadableStreamDefaultReader` object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the supplied `stream` parameter is not a `ReadableStream`,\n    or it is already locked for reading by another reader.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/ReadableStreamDefaultReader/prototype/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n~ ReadableStreamDefaultReader.cancel()\n\nThe **`cancel()`** method of the\n`ReadableStreamDefaultReader` interface returns a `Promise` that resolves when the stream is canceled. Calling this method signals a loss of interest in the stream by a consumer.\n\nCancel is used when you've completely finished with the stream and don't need any more\ndata from it, even if there are chunks enqueued waiting to be read. That data is lost\nafter cancel is called, and the stream is not readable any more. To read those chunks\nstill and not completely get rid of the stream, you'd use\n`ReadableStreamDefaultController.close()`.\n\n> **Note:** If the reader is active, the\n> `cancel()` method behaves the same as that for the associated stream\n> (`ReadableStream.cancel()`).\n\n## Syntax\n\n```js\ncancel()\ncancel(reason)\n```\n\n### Parameters\n\n- `reason` _**optional**_\n  - : A human-readable reason for the cancellation. This value may or may not be used.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason`\nparameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamDefaultReader`, or the stream\n    has no owner.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/ReadableStreamDefaultReader/prototype/closed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader.closed\n\nThe **`closed`** read-only property of the\n`ReadableStreamDefaultReader` interface returns a\n`Promise` that fulfills when the stream closes, or rejects if the\nstream throws an error or the reader's lock is released. This property enables you\nto write code that responds to an end to the streaming process.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/ReadableStreamDefaultReader/prototype/read.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader.read()\n\nThe **`read()`** method of the `ReadableStreamDefaultReader` interface returns a `Promise` providing access to the next chunk in the stream's internal queue.\n\n## Syntax\n\n```js\nread()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise`, which fulfills/rejects with a result depending on the state of the stream.\nThe different possibilities are as follows:\n\n- If a chunk is available, the promise will be fulfilled with an object of the form `{ value: theChunk, done: false }`.\n- If the stream becomes closed, the promise will be fulfilled with an object of the form `{ value: undefined, done: true }`.\n- If the stream becomes errored, the promise will be rejected with the relevant error.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamDefaultReader`, the stream has no owner, or `ReadableStreamDefaultReader.releaseLock()` is called (when there's a pending read request).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/ReadableStreamDefaultReader/prototype/releaseLock.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader.releaseLock()\n\nThe **`releaseLock()`** method of the `ReadableStreamDefaultReader` interface releases the reader's lock on the stream.\n\nIf the associated stream is errored when the lock is released, the reader will appear errored in that same way subsequently; otherwise, the reader will appear closed.\n\nIf the reader's lock is released while it still has pending read requests then the promises returned by the reader's `ReadableStreamDefaultReader.read()` method are immediately rejected with a `TypeError`.\nUnread chunks remain in the stream's internal queue and can be read later by acquiring a new reader.\n\n## Syntax\n\n```js\nreleaseLock()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultReader`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/ReferenceError/ReferenceError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReferenceError\n\nThe **`ReferenceError`** object represents an error when a\nnon-existent variable is referenced.\n\n## Syntax\n\n```js\nnew ReferenceError()\nnew ReferenceError(message)\nnew ReferenceError(message, options)\nnew ReferenceError(message, fileName)\nnew ReferenceError(message, fileName, lineNumber)\n\nReferenceError()\nReferenceError(message)\nReferenceError(message, options)\nReferenceError(message, fileName)\nReferenceError(message, fileName, lineNumber)\n```\n\n> **Note:** `ReferenceError()` can be called with or without `new`. Both create a new `ReferenceError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Reflect/apply.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.apply()\n\nThe static **`Reflect.apply()`** method calls a target function\nwith arguments as specified.\n\n## Syntax\n\n```js\nReflect.apply(target, thisArgument, argumentsList)\n```\n\n### Parameters\n\n- `target`\n  - : The target function to call.\n- `thisArgument`\n  - : The value of `this` provided for the call to\n    `target`.\n- `argumentsList`\n  - : An array-like object specifying the arguments with which\n    `target` should be called.\n\n### Return value\n\nThe result of calling the given `target` function with the\nspecified `this` value and arguments.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if the `target` is not callable.\n\n## Description\n\nIn ES5, you typically use the [`Function.prototype.apply()`](../../globals/Function/prototype/apply.mdx) method to call a\nfunction with a given `this` value and `arguments` provided as an array\n(or an [array-like object](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects)).\n\n```js\nFunction.prototype.apply.call(Math.floor, undefined, [1.75]);\n```\n\nWith `Reflect.apply()` this becomes less verbose and easier to understand.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Reflect/construct.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.construct()\n\nThe static **`Reflect.construct()`** method acts like the\n`new` operator, but as a function. It is equivalent to\ncalling `new target(...args)`. It gives also the added option to specify a\ndifferent prototype.\n\n## Syntax\n\n```js\nReflect.construct(target, argumentsList)\nReflect.construct(target, argumentsList, newTarget)\n```\n\n### Parameters\n\n- `target`\n  - : The target function to call.\n- `argumentsList`\n  - : An array-like object specifying the arguments with which\n    `target` should be called.\n- `newTarget` _**optional**_\n  - : The constructor whose prototype should be used. See also the [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target)\n    operator. If `newTarget` is not present, its value defaults\n    to `target`.\n\n### Return value\n\nA new instance of `target` (or `newTarget`,\nif present), initialized by `target` as a constructor with the\ngiven `argumentsList`.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` or\n`newTarget` are not constructors.\n\n## Description\n\n`Reflect.construct()` allows you to invoke a constructor with a variable\nnumber of arguments. (This would also be possible by using the\n[spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) combined with the\n[`new` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new).)\n\n```js\nconst obj = new Foo(...args);\nconst obj = Reflect.construct(Foo, args);\n```\n\n### Reflect.construct() vs Object.create()\n\nPrior to the introduction of `Reflect`, objects could be constructed using\nan arbitrary combination of constructor and prototype by using\n[`Object.create()`](../../globals/Object/create.mdx).\n\n```js\nfunction OneClass() {\n  this.name = \"one\";\n}\n\nfunction OtherClass() {\n  this.name = \"other\";\n}\n\n// Calling this:\nconst obj1 = Reflect.construct(OneClass, args, OtherClass);\n\n// ...has the same result as this:\nconst obj2 = Object.create(OtherClass.prototype);\nOneClass.apply(obj2, args);\n\nconsole.log(obj1.name); // 'one'\nconsole.log(obj2.name); // 'one'\n\nconsole.log(obj1 instanceof OneClass); // false\nconsole.log(obj2 instanceof OneClass); // false\n\nconsole.log(obj1 instanceof OtherClass); // true\nconsole.log(obj2 instanceof OtherClass); // true\n\n// Another example to demonstrate below:\n\nfunction func1(a, b, c, d) {\n  console.log(arguments[3]);\n}\n\nfunction func2(d, e, f, g) {\n  console.log(arguments[3]);\n}\n\nconst obj1 = Reflect.construct(func1, [\"I\", \"Love\", \"my\", \"country\"]);\n```\n\nHowever, while the end result is the same, there is one important difference in the\nprocess. When using `Object.create()` and\n[`Function.prototype.apply()`](../../globals/Function/prototype/apply.mdx), the `new.target` operator will\npoint to `undefined` within the function used as the constructor, since the\n`new` keyword is not being used to create the object.\n\nWhen invoking `Reflect.construct()`, on the other hand, the\n`new.target` operator will point to the `newTarget`\nparameter if supplied, or `target` if not.\n\n```js\nfunction OneClass() {\n  console.log(\"OneClass\");\n  console.log(new.target);\n}\nfunction OtherClass() {\n  console.log(\"OtherClass\");\n  console.log(new.target);\n}\n\nconst obj1 = Reflect.construct(OneClass, args);\n// Logs:\n// OneClass\n// function OneClass { ... }\n\nconst obj2 = Reflect.construct(OneClass, args, OtherClass);\n// Logs:\n// OneClass\n// function OtherClass { ... }\n\nconst obj3 = Object.create(OtherClass.prototype);\nOneClass.apply(obj3, args);\n// Logs:\n// OneClass\n// undefined\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Reflect/defineProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.defineProperty()\n\nThe static **`Reflect.defineProperty()`** method is like\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx) but returns a `Boolean`.\n\n## Syntax\n\n```js\nReflect.defineProperty(target, propertyKey, attributes)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to define the property.\n- `propertyKey`\n  - : The name of the property to be defined or modified.\n- `attributes`\n  - : The attributes for the property being defined or modified.\n\n### Return value\n\nA `Boolean` indicating whether or not the property was successfully\ndefined.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.defineProperty` method allows precise addition to or\nmodification of a property on an object. For more details, see the\n[`Object.defineProperty`](../../globals/Object/defineProperty.mdx) which is similar.\n\n> **Note:** `Object.defineProperty` returns the\n> object or throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the property has not been successfully\n> defined. `Reflect.defineProperty`, however, returns a `Boolean`\n> indicating whether or not the property was successfully defined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Reflect/deleteProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.deleteProperty()\n\nThe static\n**`Reflect.deleteProperty()`**\nmethod allows to delete properties. It is like the\n[`delete` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete)\nas a function.\n\n## Syntax\n\n```js\nReflect.deleteProperty(target, propertyKey)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to delete the property.\n- `propertyKey`\n  - : The name of the property to be deleted.\n\n### Return value\n\nA `Boolean` indicating whether or not the property was successfully\ndeleted.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.deleteProperty` method allows you to delete a property on an\nobject. It returns a `Boolean` indicating whether or not the property was\nsuccessfully deleted. It is almost identical to the non-strict\n[`delete` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Reflect/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.get()\n\nThe static **`Reflect.get()`** method works like getting a\nproperty from an object (`target[propertyKey]`) as a function.\n\n## Syntax\n\n```js\nReflect.get(target, propertyKey)\nReflect.get(target, propertyKey, receiver)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to get the property.\n- `propertyKey`\n  - : The name of the property to get.\n- `receiver` _**optional**_\n  - : The value of `this` provided for the call to\n    `target` if a getter is encountered. When used with\n    `Proxy`, it can be an object that inherits from\n    `target`.\n\n### Return value\n\nThe value of the property.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.get` method allows you to get a property on an object. It is like the\n[property accessor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Property_Accessors) syntax as a function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Reflect/getOwnPropertyDescriptor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.getOwnPropertyDescriptor()\n\nThe static\n**`Reflect.getOwnPropertyDescriptor()`** method is similar to\n[`Object.getOwnPropertyDescriptor()`](../../globals/Object/getOwnPropertyDescriptor.mdx). It returns a property descriptor of\nthe given property if it exists on the object, `undefined`\notherwise.\n\n\n\n## Syntax\n\n```js\nReflect.getOwnPropertyDescriptor(target, propertyKey)\n```\n\n### Parameters\n\n- `target`\n  - : The target object in which to look for the property.\n- `propertyKey`\n  - : The name of the property to get an own property descriptor for.\n\n### Return value\n\nA property descriptor object if the property exists in `target`\nobject; otherwise, [`undefined`](../../globals/undefined.mdx).\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.getOwnPropertyDescriptor` method returns a property descriptor\nof the given property if it exists in the `target` object,\n[`undefined`](../../globals/undefined.mdx) otherwise. The only difference to\n[`Object.getOwnPropertyDescriptor()`](../../globals/Object/getOwnPropertyDescriptor.mdx) is how non-object targets are handled.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Reflect/getPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.getPrototypeOf()\n\nThe static **`Reflect.getPrototypeOf()`** method is almost the\nsame method as [`Object.getPrototypeOf()`](../../globals/Object/getPrototypeOf.mdx). It returns the prototype (i.e. the\nvalue of the internal `[[Prototype]]` property) of the specified object.\n\n\n\n## Syntax\n\n```js\nReflect.getPrototypeOf(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object of which to get the prototype.\n\n### Return value\n\nThe prototype of the given object. If there are no inherited properties,\n[`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) is returned.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.getPrototypeOf` method returns the prototype (i.e. the value of\nthe internal `[[Prototype]]` property) of the specified object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Reflect/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.has()\n\nThe static **`Reflect.has()`** method works like the [`in` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/in)\nas a function.\n\n## Syntax\n\n```js\nReflect.has(target, propertyKey)\n```\n\n### Parameters\n\n- `target`\n  - : The target object in which to look for the property.\n- `propertyKey`\n  - : The name of the property to check.\n\n### Return value\n\nA `Boolean` indicating whether or not the `target`\nhas the property.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.has` method allows you to check if a property is in an object.\nIt works like the [`in` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/in)\nas a function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Reflect/isExtensible.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.isExtensible()\n\nThe static **`Reflect.isExtensible()`** method determines if an object is extensible (whether it can have new properties added to it). It is similar to [`Object.isExtensible()`](../../globals/Object/isExtensible.mdx), but with [some differences](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/isExtensible#difference_with_object.isextensible).\n\n## Syntax\n\n```js\nReflect.isExtensible(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object which to check if it is extensible.\n\n### Return value\n\nA `Boolean` indicating whether or not the target is extensible.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Reflect/ownKeys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.ownKeys()\n\nThe static **`Reflect.ownKeys()`** method returns an array of\nthe `target` object's own property keys.\n\n## Syntax\n\n```js\nReflect.ownKeys(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object from which to get the own keys.\n\n### Return value\n\nAn `Array` of the `target` object's own property\nkeys.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.ownKeys` method returns an array of the\n`target` object's own property keys. Its return value is\nequivalent to `Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target))`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Reflect/preventExtensions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.preventExtensions()\n\nThe static **`Reflect.preventExtensions()`** method prevents new properties from ever being added to an object (i.e., prevents future extensions to the object). It is similar to [`Object.preventExtensions()`](../../globals/Object/preventExtensions.mdx), but with [some differences](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/preventExtensions#difference_with_object.preventextensions).\n\n## Syntax\n\n```js\nReflect.preventExtensions(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to prevent extensions.\n\n### Return value\n\nA `Boolean` indicating whether or not the target was successfully set to prevent extensions.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Reflect/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.set()\n\nThe static **`Reflect.set()`** method works like setting a\nproperty on an object.\n\n## Syntax\n\n```js\nReflect.set(target, propertyKey, value)\nReflect.set(target, propertyKey, value, receiver)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to set the property.\n- `propertyKey`\n  - : The name of the property to set.\n- `value`\n  - : The value to set.\n- `receiver` _**optional**_\n  - : The value of `this` provided for the call to the setter for `propertyKey` on `target`. If provided and `target` does not have a setter for `propertyKey`, the property will be set on `receiver` instead.\n\n### Return value\n\nA `Boolean` indicating whether or not setting the property was successful.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.set` method allows you to set a property on an object. It does\nproperty assignment and is like the\n[property accessor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Property_Accessors) syntax as a function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Reflect/setPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.setPrototypeOf()\n\nThe static\n**`Reflect.setPrototypeOf()`** method is the same method as\n[`Object.setPrototypeOf()`](../../globals/Object/setPrototypeOf.mdx), except for its return type. It sets the\nprototype (i.e., the internal `[[Prototype]]` property) of a specified\nobject to another object or to [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null), and returns `true` if\nthe operation was successful, or `false` otherwise.\n\n## Syntax\n\n```js\nReflect.setPrototypeOf(target, prototype)\n```\n\n### Parameters\n\n- `target`\n  - : The target object of which to set the prototype.\n- `prototype`\n  - : The object's new prototype (an object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null)).\n\n### Return value\n\nA `Boolean` indicating whether or not the prototype was successfully set.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object` or if `prototype` is neither an object nor\n[`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null).\n\n## Description\n\nThe `Reflect.setPrototypeOf` method changes the prototype (i.e. the value of\nthe internal `[[Prototype]]` property) of the specified object.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Request/Request.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request()\n\nThe **`Request()`** constructor creates a new\n`Request` object.\n\n## Syntax\n\n```js\nnew Request(input)\nnew Request(input, options)\n```\n\n### Parameters\n\n- `input`\n\n  - : Defines the resource that you wish to fetch. This can either be:\n\n    - A string containing the direct URL of the resource you want to\n      fetch.\n    - A `Request` object, effectively creating a copy.\n\n- `options` _**optional**_\n\n  - : An object containing any custom settings that you want to apply to the\n    request. The possible options are:\n\n    - `method`\n      - : The request method, e.g., `GET`, `POST`. The default is `GET`.\n    - `headers`\n      - : Any headers you want to add to your request, contained\n        within a `Headers` object or an object literal with `String` values.\n    - `body`\n      - : Any body that you want to add to your request: this can be an `ArrayBuffer`, a `TypedArray`, a `DataView`, a `URLSearchParams`, string object or literal, a `ReadableStream` object, a [`Blob`](../../globals/Blob/Blob.mdx) object, or a [`FormData`](../../globals/FormData/FormData.mdx) object.\n    - `backend` _**Fastly-specific**_\n    - `cacheOverride` _**Fastly-specific**_, see [`CacheOverride`](../../fastly:cache-override/CacheOverride/CacheOverride.mdx).\n    - `cacheKey` _**Fastly-specific**_\n    - `manualFramingHeaders`_: boolean_ _**optional**_ _**Fastly-specific**_\n      - : The default value is `false`, which means that the framing headers are automatically created based on the message body.\n        In \"automatic\" mode, a `Content-Length` is used when the size of the body can be determined before it is sent.\n        Requests sent in streaming mode, where headers are sent immediately but the content of the body is streamed later, will receive a `Transfer-Encoding: chunked` to accommodate the dynamic generation of the body.\n        In \"manual\" mode, any `Content-Length` or `Transfer-Encoding` headers will be honored.\n        You must ensure that those headers have correct values permitted by the [HTTP/1.1 specification](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).\n        If the provided headers are not permitted by the specification, the headers will revert to \"automatic\" mode and a diagnostic message will be logged about what was wrong.\n        If a `Content-Length` is permitted by the specification, but the value does not match the size of the actual body, the body will either be truncated (if it is too long), or the connection will be hung up early (if it is too short).\n    - `fastly` _**Fastly-specific**_\n      - `decompressGzip`_: boolean_ _**optional**_\n        - Whether to automatically gzip decompress the Response or not."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Request/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the `Request` interface\nreads the request body and returns it as a promise that resolves with an `ArrayBuffer`.\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an `ArrayBuffer`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Request/prototype/blob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.blob()\n\nThe **`blob()`** method of the `Request` interface reads the request body and returns it as a promise that resolves with a `Blob`.\n\n## Syntax\n\n```js\nblob()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a [`Blob`](../../../globals/Blob/Blob.mdx).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the request body has already been used or if the request's method is `GET` or `HEAD`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Request/prototype/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.body\n\nThe read-only **`body`** property of the `Request`\ninterface contains a `ReadableStream` with the body contents\nthat have been added to the request. Note that a request using the\n`GET` or `HEAD` method cannot have a body\nand `null` is returned in these cases.\n\n## Value\n\nA `ReadableStream` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Request/prototype/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.bodyUsed\n\nThe read-only **`bodyUsed`** property of the\n`Request` interface is a boolean value that indicates\nwhether the request body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Request/prototype/clone.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.clone()\n\nThe **`clone()`** method of the `Request` interface creates a copy of the current `Request` object.\n\nLike the underlying `ReadableStream.tee`` api, the `body` of a cloned `Response`\nwill signal backpressure at the rate of the _faster_ consumer of the two bodies,\nand unread data is enqueued internally on the slower consumed `body`\nwithout any limit or backpressure.\nBeware when you construct a `Request` from a stream and then `clone` it.\n\n`clone()` throws a `TypeError` if the request body has already been used. In fact, the main reason `clone()` exists is to allow multiple uses of body objects (when they are one-use only.)\n\nIf you intend to modify the request, you may prefer the `Request` constructor.\n\n## Syntax\n\n```js\nclone()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Request` object, which is an exact copy of the `Request` that `clone()` was called on.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Request/prototype/formData.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.formData()\n\nThe **`formData()`** method of the `Request` interface reads the request body and returns it as a promise that resolves with a `FormData` object.\n\n## Syntax\n\n```js\nformData()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a [`FormData`](../../../globals/FormData/FormData.mdx) object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the request body has already been used or if the request's method is `GET` or `HEAD`.\n- `SyntaxError`\n  - : Thrown if the request's content type is not `multipart/form-data` or `application/x-www-form-urlencoded`, or if the content cannot be parsed as form data.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Request/prototype/headers.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.headers\n\nThe **`headers`** read-only property of the\n`Request` interface contains the `Headers` object associated\nwith the request.\n\n## Value\n\nA `Headers` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Request/prototype/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.json()\n\nThe **`json()`** method of the `Request` interface\nreads the request body and returns it as a promise that resolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a JavaScript object. This object could be\nanything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Request/prototype/method.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.method\n\nThe **`method`** read-only property of the\n`Request` interface contains the request's method (`GET`, `POST`, etc.)\n\n## Value\n\nA `String` indicating the method of the request.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Request/prototype/setManualFramingHeaders.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.setManualFramingHeaders()\n\nThe **`setManualFramingHeaders()`** method of the `Request` interface controls how the framing headers should be determined.\n\nBy default the framing headers are set to \"automatic\" mode, which means they are created based on the body of the associated Request instance.\nIn \"automatic\" mode, a `Content-Length` is used when the size of the body can be determined before it is sent.\nRequests sent in streaming mode, where headers are sent immediately but the content of the body is streamed later, will receive a `Transfer-Encoding: chunked` to accommodate the dynamic generation of the body.\nIn \"manual\" mode, any `Content-Length` or `Transfer-Encoding` headers will be honored.\nYou must ensure that those headers have correct values permitted by the [HTTP/1.1 specification](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).\nIf the provided headers are not permitted by the specification, the headers will revert to \"automatic\" mode and a diagnostic message will be logged about what was wrong.\nIf a `Content-Length` is permitted by the specification, but the value does not match the size of the actual body, the body will either be truncated (if it is too long), or the connection will be hung up early (if it is too short).\n\n## Syntax\n\n## Syntax\n\n```js\nsetManualFramingHeaders(manual)\n```\n\n### Parameters\n\n- `manual` _: boolean_\n  - : Whether or not to use \"manual\" mode for the framing headers.\n\n### Return value\n\n`undefined`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Request/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.text()\n\nThe **`text()`** method of the `Request` interface\nreads the request body and returns it as a promise that resolves with a `String`.\nThe response is _always_ decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Promise that resolves with a `String`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Request/prototype/url.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.url\n\nThe **`url`** read-only property of the `Request` interface contains the URL of the request.\n\n## Value\n\nA string indicating the URL of the request.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Response/Response.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response()\n\nThe **`Response()`** constructor creates a new `Response` object.\n\n## Syntax\n\n```js\nnew Response()\nnew Response(body)\nnew Response(body, options)\n```\n\n### Parameters\n\n- `body` _**optional**_\n\n  - : An object defining a body for the response. This can be `null` (which is\n    the default value), or one of:\n\n    - [`ArrayBuffer`](../../globals/ArrayBuffer/ArrayBuffer.mdx)\n    - `TypedArray`\n    - [`DataView`](../../globals/DataView/DataView.mdx)\n    - [`ReadableStream`](../../globals/ReadableStream/ReadableStream.mdx)\n    - [`URLSearchParams`](../../globals/URLSearchParams/URLSearchParams.mdx)\n    - [`String`](../../globals/String/String.mdx)\n    - string literal\n    - [`Blob`](../../globals/Blob/Blob.mdx)\n    - [`FormData`](../../globals/FormData/FormData.mdx)\n\n- `options` _**optional**_\n\n  - : An options object containing any custom settings that you want to apply to the\n    response, or an empty object (which is the default value). The possible options are:\n\n    - `status`\n      - : The status code for the response, e.g., `200`.\n    - `statusText`\n      - : The status message associated with the status code,\n        e.g., `OK`.\n    - `headers`\n      - : Any headers you want to add to your response, contained\n        within a [`Headers`](../../globals/Headers/Headers.mdx) object or object literal of\n        [`String`](../../globals/String/String.mdx) key/value pairs.\n    - `manualFramingHeaders`_: boolean_ _**optional**_ _**Fastly-specific**_\n      - : The default value is `false`, which means that the framing headers are automatically created based on the message body.\n        In \"automatic\" mode, a `Content-Length` is used when the size of the body can be determined before it is sent.\n        Responses sent in streaming mode, where headers are sent immediately but the content of the body is streamed later, will receive a `Transfer-Encoding: chunked` to accommodate the dynamic generation of the body.\n        In \"manual\" mode, any `Content-Length` or `Transfer-Encoding` headers will be honored.\n        You must ensure that those headers have correct values permitted by the [HTTP/1.1 specification](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).\n        If the provided headers are not permitted by the specification, the headers will revert to \"automatic\" mode and a diagnostic message will be logged about what was wrong.\n        If a `Content-Length` is permitted by the specification, but the value does not match the size of the actual body, the body will either be truncated (if it is too long), or the connection will be hung up early (if it is too short).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Response/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface\ntakes a [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion. It returns a promise\nthat resolves with an [`ArrayBuffer`](../../../globals/ArrayBuffer/ArrayBuffer.mdx).\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an [`ArrayBuffer`](../../../globals/ArrayBuffer/ArrayBuffer.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Response/prototype/blob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.blob()\n\nThe **`blob()`** method of the [`Response`](../Response.mdx) interface takes a [`Response`](../Response.mdx) stream and reads it to completion. It returns a promise that resolves with a `Blob`.\n\n## Syntax\n\n```js\nblob()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a [`Blob`](../../../globals/Blob/Blob.mdx).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the response body has already been consumed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Response/prototype/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.body\n\nThe **`body`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface is a [`ReadableStream`](../../../globals/ReadableStream/ReadableStream.mdx) of the body contents.\n\n## Value\n\nA [`ReadableStream`](../../../globals/ReadableStream/ReadableStream.mdx), or else `null` for any `Response` object [constructed](../../../globals/Response/Response.mdx) with a null `body` property, or for any actual HTTP response that has no body.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Response/prototype/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.bodyUsed\n\nThe **`bodyUsed`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface is a boolean value that indicates whether the body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Response/prototype/formData.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.formData()\n\nThe **`formData()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface takes a [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion. It returns a promise that resolves with a `FormData` object.\n\n## Syntax\n\n```js\nformData()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a [`FormData`](../../../globals/FormData/FormData.mdx) object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the response body has already been consumed.\n- `SyntaxError`\n  - : Thrown if the response's content type is not `multipart/form-data` or `application/x-www-form-urlencoded`, or if the content cannot be parsed as form data.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Response/prototype/headers.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.headers\n\nThe **`headers`** read-only property of the\n[`Response`](../../../globals/Response/Response.mdx) interface contains the [`Headers`](../../../globals/Headers/Headers.mdx) object associated\nwith the response.\n\n## Value\n\nA [`Headers`](../../Headers/Headers.mdx) object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Response/prototype/ip.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.ip\n\nThe **`ip`** getter of the `Response` interface returns the IP address associated with the request, as either an IPv6 or IPv4 string.\n\nIn the case where no IP address is available (say the response is cached, or was manually created), `undefined` will be returned.\n\nTo ensure an origin request with an IP, pass a [`CacheOverride`](../../../fastly:cache-override/CacheOverride/CacheOverride.mdx) value.\n\n## Value\n\n`undefined` or `string`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Response/prototype/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.json()\n\nThe **`json()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface takes\na [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion. It returns a promise which\nresolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA [`Promise`](../../../globals/Promise/Promise.mdx) that resolves to a JavaScript object. This object could be\nanything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Response/prototype/ok.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.ok\n\nThe **`ok`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains a Boolean stating whether the response was successful (status in the range 200-299) or not.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Response/prototype/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.port\n\nThe **`port`** getter of the `Response` interface returns the port associated with the request, as a number.\n\nIn the case where no port is available (say the response is cached, or was manually created), `undefined` will be returned.\n\nTo ensure an origin request with a port, pass a [`CacheOverride`](../../../fastly:cache-override/CacheOverride/CacheOverride.mdx) value.\n\n## Value\n\n`undefined` or `number`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Response/prototype/setManualFramingHeaders.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.setManualFramingHeaders()\n\nThe **`setManualFramingHeaders()`** method of the `Response` interface controls how the framing headers should be determined.\n\nBy default the framing headers are set to \"automatic\" mode, which means they are created based on the body of the associated Response instance.\nIn \"automatic\" mode, a `Content-Length` is used when the size of the body can be determined before it is sent.\nResponses sent in streaming mode, where headers are sent immediately but the content of the body is streamed later, will receive a `Transfer-Encoding: chunked` to accommodate the dynamic generation of the body.\nIn \"manual\" mode, any `Content-Length` or `Transfer-Encoding` headers will be honored.\nYou must ensure that those headers have correct values permitted by the [HTTP/1.1 specification](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).\nIf the provided headers are not permitted by the specification, the headers will revert to \"automatic\" mode and a diagnostic message will be logged about what was wrong.\nIf a `Content-Length` is permitted by the specification, but the value does not match the size of the actual body, the body will either be truncated (if it is too long), or the connection will be hung up early (if it is too short).\n\n## Syntax\n\n```js\nsetManualFramingHeaders(manual)\n```\n\n### Parameters\n\n- `manual` _: boolean_\n  - : Whether or not to use \"manual\" mode for the framing headers.\n\n### Return value\n\n`undefined`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Response/prototype/status.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.status\n\nThe **`status`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains the HTTP status code of the response.\n\nFor example, `200` for success, `404` if the resource could not be found.\n\n## Value\n\nAn unsigned short number.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Response/prototype/statusText.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.statusText\n\nThe **`statusText`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains the status message corresponding to the HTTP status code in [`status`](../../../globals/Response/prototype/status.mdx).\n\nFor example, this would be `OK` for a status code `200`, `Continue` for `100`, `Not Found` for `404`.\n\n## Value\n\nA [`String`](../../../globals/String/String.mdx) containing the HTTP status message associated with the response.\nThe default value is \"\".\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Response/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.text()\n\nThe **`text()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface takes a [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion.\nIt returns a promise that resolves with a [`String`](../../../globals/String/String.mdx).\nThe response is _always_ decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Promise that resolves with a [`String`](../../../globals/String/String.mdx).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Response/prototype/url.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.url\n\nThe **`url`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains the URL of the response.\nThe value of the `url` property will be the final URL obtained after any redirects.\n\n## Value\n\nA string.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Response/redirect.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Response.redirect()\n\nThe **`redirect()`** static method of the `Response` interface returns a `Response` resulting in a redirect to the specified URL.\n\n## Syntax\n\n```js\nResponse.redirect(url)\nResponse.redirect(url, status)\n```\n\n### Parameters\n\n- `url`\n  - : The URL that the new response is to originate from.\n- `status` __optional__\n  - : An optional status code for the response (e.g., `302`.)\n\n### Return value\n\nA `Response` object.\n\n### Exceptions\n\n- `RangeError`\n  - : The specified status is not a redirect status.\n- `TypeError`\n  - : The specified URL is invalid.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/RsaHashedImportParams/RsaHashedImportParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RsaHashedImportParams\n\nThe **`RsaHashedImportParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.importKey()`, when importing any RSA-based key pair.\n\n## Instance properties\n\n- `name`\n  - : A string. This should be set to `RSASSA-PKCS1-v1_5`.\n\n- `hash`\n  - : A string representing the name of the digest function to use. This can be one of `SHA-256`, `SHA-384`, or `SHA-512`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Set/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get Set\\[Symbol.species]\n\nThe **`Set[Symbol.species]`** accessor property is an unused accessor property specifying how to copy `Set` objects.\n\n## Syntax\n\n```js\nSet[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct copied `Set` instances.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `Set` objects. Subclass constructors may override it to change the constructor assignment.\n\n> **Note:** This property is currently unused by all `Set` methods.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Set/Set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set()\n\nThe **`Set` constructor** lets you\ncreate `Set` objects that store unique values of any type, whether [primitive values](https://developer.mozilla.org/docs/Glossary/Primitive) or object\nreferences.\n\n## Syntax\n\n```js\nnew Set()\nnew Set(iterable)\n```\n\n> **Note:** `Set()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable` _**optional**_\n\n  - : If an [iterable object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) is passed, all of its elements will be added to the new\n    `Set`.\n\n    If you don't specify this parameter, or its value is `null`, the new\n    `Set` is empty.\n\n### Return value\n\nA new `Set` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Set/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype\\[Symbol.iterator]()\n\nThe **`[Symbol.iterator`** method of a `Set` object implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows sets to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the values of the set.\n\nThe initial value of this property is the same function object as the initial value of the [`Set.prototype.values`](../../../globals/Set/prototype/values.mdx) property.\n\n## Syntax\n\n```js\nset[Symbol.iterator]()\n```\n\n### Return value\n\nThe same return value as [`Set.prototype.values()`](../../../globals/Set/prototype/values.mdx): a new iterable iterator object that yields the values of the set.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Set/prototype/add.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.add()\n\nThe **`add()`** method inserts a new element with a specified value in to a `Set` object, if there isn't an element with the same value already in the `Set`.\n\n## Syntax\n\n```js\nadd(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value of the element to add to the `Set` object.\n\n### Return value\n\nThe `Set` object with added value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Set/prototype/clear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.clear()\n\nThe **`clear()`** method removes all elements from a\n`Set` object.\n\n## Syntax\n\n```js\nclear()\n```\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Set/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.delete()\n\nThe **`delete()`** method removes a specified value from a\n`Set` object, if it is in the set.\n\n## Syntax\n\n```js\ndelete(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to remove from `Set`.\n\n### Return value\n\nReturns `true` if `value` was already in\n`Set`; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Set/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.entries()\n\nThe **`entries()`** method returns a new [Iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators) object\nthat contains **an array of `[value, value]`** for each element\nin the `Set` object, in insertion order. For `Set` objects there\nis no `key` like in `Map` objects. However, to keep the API\nsimilar to the `Map` object, each _entry_ has the same value for its\n_key_ and _value_ here, so that an array `[value, value]` is\nreturned.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nA new iterator object that contains an array of `[value, value]` for each\nelement in the given `Set`, in insertion order.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Set/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.forEach()\n\nThe **`forEach()`** method executes a provided function once\nfor each value in the `Set` object, in insertion order.\n\n## Syntax\n\n```js\n// Arrow function\nforEach(() => { /* ... */ } )\nforEach((value) => { /* ... */ } )\nforEach((value, key) => { /* ... */ } )\nforEach((value, key, set) => { /* ... */ } )\n\n// Callback function\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n\n// Inline callback function\nforEach(function() { /* ... */ })\nforEach(function(value) { /* ... */ })\nforEach(function(value, key) { /* ... */ })\nforEach(function(value, key, set) { /* ... */ })\nforEach(function(value, key, set) { /* ... */ }, thisArg)\n```\n\n### Parameters\n\n- `callback`\n\n  - : Function to execute for each element, taking three arguments:\n\n    - `value`, `key`\n      - : The current element being processed in the `Set`. As there are no\n        keys in `Set`, the value is passed for both arguments.\n    - `set`\n      - : The `Set` object which `forEach()` was called upon.\n\n- `thisArg`\n  - : Value to use as `this` when executing `callbackFn`.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n## Description\n\nThe `forEach()` method executes the provided\n`callback` once for each value which actually exists in the\n`Set` object. It is not invoked for values which have been deleted. However,\nit is executed for values which are present but have the value `undefined`.\n\n`callback` is invoked with **three arguments**:\n\n- the **element value**\n- the **element key**\n- the **`Set` object being traversed**\n\nThere are no keys in `Set` objects, however, so the first two arguments are\nboth **values** contained in the [Set](../../../globals/Set/Set.mdx). This is to make it\nconsistent with other `forEach()` methods for [`Map.prototype.forEach()`](../../../globals/Map/prototype/forEach.mdx) and [`Array.prototype.forEach()`](../../../globals/Array/prototype/forEach.mdx).\n\nIf a `thisArg` parameter is provided to `forEach()`,\nit will be passed to `callback` when invoked, for use as its\n`this` value. Otherwise, the value `undefined` will be passed for\nuse as its `this` value. The `this` value ultimately observable by\n`callback` is determined according to\n[the usual rules for determining the `this` seen by a function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this).\n\nEach value is visited once, except in the case when it was deleted and re-added before\n`forEach()` has finished. `callback` is not invoked for\nvalues deleted before being visited. New values added before `forEach()` has\nfinished will be visited.\n\n`forEach()` executes the `callback` function once for\neach element in the `Set` object; it does not return a value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Set/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.has()\n\nThe **`has()`** method returns a boolean indicating whether an\nelement with the specified value exists in a `Set` object or not.\n\n## Syntax\n\n```js\nhas(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to test for presence in the `Set` object.\n\n### Return value\n\nReturns `true` if an element with the specified value exists in the `Set` object; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Set/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.keys()\n\nThe **`keys()`** method is an alias for the [`values()`](../../../globals/Set/prototype/values.mdx) method.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nA new iterator object containing the values for each element in the given\n`Set`, in insertion order.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Set/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.size\n\nThe **`size`** accessor property returns the number of (unique) elements in a [Set](../../../globals/Set/Set.mdx) object.\n\n## Description\n\nThe value of `size` is an integer representing how many entries the `Set` object has. A set accessor function for `size` is `undefined`; you cannot change this property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Set/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.values()\n\nThe **`values()`** method returns a new [Iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators) object that\ncontains the values for each element in the `Set` object in insertion order.\n\n> **Note:** The **`keys()`** method is an alias\n> for this method (for similarity with [Map](../../../globals/Map/Map.mdx) objects), hence the\n> `keys()` page redirecting here. It behaves exactly the same and returns\n> **values** of `Set` elements.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nA new iterator object containing the values for each element in the given\n`Set`, in insertion order.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/String/String.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String() constructor\n\nThe **`String`** constructor is used to create a new\n`String` object. When called instead as a function, it performs type\nconversion to a \"primitive string\" which is usually more\nuseful.\n\n## Syntax\n\n```js\nnew String(thing)\nString(thing)\n```\n\n> **Note:** `String()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\n- `thing`\n  - : Anything to be converted to a string.\n\n### Return value\n\nWhen `String` is called as a constructor (with `new`), it creates a `String` object, which is **not** a primitive.\n\nWhen `String` is called as a function, it coerces the parameter to a string primitive. `Symbol` values would be converted to `\"Symbol(description)\"`, where `description` is the [description](../../globals/Symbol/prototype/description.mdx) of the Symbol, instead of throwing.\n\n> **Warning:** You should rarely find yourself using `String` as a constructor.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/String/fromCharCode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.fromCharCode()\n\nThe static **`String.fromCharCode()`** method returns a string\ncreated from the specified sequence of UTF-16 code units.\n\n## Syntax\n\n```js\nString.fromCharCode(num1)\nString.fromCharCode(num1, num2)\nString.fromCharCode(num1, num2, /* …, */ numN)\n```\n\n### Parameters\n\n- `num1, ..., numN`\n  - : A sequence of numbers that are UTF-16 code units. The range is between\n    `0` and `65535` (`0xFFFF`). Numbers greater than\n    `0xFFFF` are truncated. No validity checks are performed.\n\n### Return value\n\nA string of length `N` consisting of the\n`N` specified UTF-16 code units.\n\n## Description\n\nThis method returns a string and not a `String` object.\n\nBecause `fromCharCode()` is a static method of `String`, you\nalways use it as `String.fromCharCode()`, rather than as a method of a\n`String` object you created.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/String/fromCodePoint.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.fromCodePoint()\n\nThe static **`String.fromCodePoint()`** method returns a string\ncreated by using the specified sequence of code points.\n\n## Syntax\n\n```js\nString.fromCodePoint(num1)\nString.fromCodePoint(num1, num2)\nString.fromCodePoint(num1, num2, /* …, */ numN)\n```\n\n### Parameters\n\n- `num1, ..., numN`\n  - : A sequence of code points.\n\n### Return value\n\nA string created by using the specified sequence of code points.\n\n### Exceptions\n\n- A `RangeError` is thrown if an invalid Unicode\n  code point is given (e.g. `\"RangeError: NaN is not a valid code point\"`).\n\n## Description\n\nThis method returns a string (and _not_ a `String` object).\n\nBecause `fromCodePoint()` is a static method of `String`, you\nmust call it as `String.fromCodePoint()`, rather than as a method of a\n`String` object you created.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/String/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype\\[Symbol.iterator]()\n\nThe **`Symbol.iterator`** method of a string implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows strings to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the Unicode code points of the string value as individual strings.\n\n## Syntax\n\n```js\nstring[Symbol.iterator]()\n```\n\n### Return value\n\nA new iterable iterator object that yields the Unicode code points of the string value as individual strings.\n\n## Description\n\nStrings are iterated by Unicode code points. This means grapheme clusters will be split, but surrogate pairs will be preserved.\n\n```js\n// \"Backhand Index Pointing Right: Dark Skin Tone\"\n[...\"👉🏿\"]; // ['👉', '🏿']\n// splits into the basic \"Backhand Index Pointing Right\" emoji and\n// the \"Dark skin tone\" emoji\n\n// \"Family: Man, Boy\"\n[...\"👨‍👦\"]; // [ '👨', '‍', '👦' ]\n// splits into the \"Man\" and \"Boy\" emoji, joined by a ZWJ\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/String/prototype/at.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.at()\n\nThe **`at()`** method takes an integer value and returns a `('String` consisting of the single UTF-16 code unit located at the specified offset. This method allows for positive and negative integers. Negative integers count back from the last string character.\n\n## Syntax\n\n```js\nat(index)\n```\n\n### Parameters\n\n- `index`\n  - : The index (position) of the string character to be returned. Supports relative indexing from the end of the string when passed a negative index; i.e. if a negative number is used, the character returned will be found by counting back from the end of the string.\n\n### Return value\n\n`('String` consisting of the single UTF-16 code unit located at the specified position. Returns [`undefined`](../../../globals/undefined.mdx) if the given index can not be found.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/String/prototype/charAt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.charAt()\n\nThe `String` object's\n**`charAt()`** method returns a new string consisting of the\nsingle UTF-16 code unit located at the specified offset into the string.\n\n## Syntax\n\n```js\ncharAt(index)\n```\n\n### Parameters\n\n- `index`\n  - : An integer between `0` and `str.length - 1`. If the\n    `index` cannot be converted to the integer or no\n    `index` is provided, the default is `0`, so the first\n    character of `str` is returned.\n\n### Return value\n\nA string representing the character (exactly one UTF-16 code unit) at the specified\n`index`. If `index` is out of range,\n`charAt()` returns an empty string.\n\n## Description\n\nCharacters in a string are indexed from left to right. The index of the first character\nis `0`, and the index of the last character—in a string called\n`stringName` is `stringName.length - 1`. If\nthe `index` you supply is out of this range, JavaScript returns an\nempty string.\n\nIf no `index` is provided to `charAt()`, the default\nis `0`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/String/prototype/charCodeAt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.charCodeAt()\n\nThe **`charCodeAt()`** method returns\nan integer between `0` and `65535` representing the UTF-16 code\nunit at the given index.\n\nThe UTF-16 code unit matches the Unicode code point for code points which can be\nrepresented in a single UTF-16 code unit. If the Unicode code point cannot be\nrepresented in a single UTF-16 code unit (because its value is greater than\n`0xFFFF`) then the code unit returned will be _the first part of a\nsurrogate pair_ for the code point. If you want the entire code point value, use\n[`codePointAt()`](../../../globals/String/prototype/codePointAt.mdx).\n\n## Syntax\n\n```js\ncharCodeAt(index)\n```\n\n### Parameters\n\n- `index`\n  - : An integer greater than or equal to `0` and less than the\n    `length` of the string. If `index` is not a number,\n    it defaults to `0`.\n\n### Return value\n\nA number representing the UTF-16 code unit value of the character at the given\n`index`. If `index` is out of range,\n`charCodeAt()` returns `NaN`.\n\n## Description\n\nUnicode code points range from `0` to `1114111`\n(`0x10FFFF`). The first 128 Unicode code points are a direct match of the\nASCII character encoding. (For information on Unicode, see [UTF-16 characters, Unicode codepoints, and grapheme clusters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters).)\n\n> **Note:** `charCodeAt()` will always return a value that is\n> less than `65536`. This is because the higher code points are represented\n> by _a pair_ of (lower valued) \"surrogate\" pseudo-characters which are used to\n> comprise the real character.\n>\n> Because of this, in order to examine (or reproduce) the full character for individual\n> character values of `65536` or greater, for such characters, it is\n> necessary to retrieve not only `charCodeAt(i)`, but also\n> `charCodeAt(i+1)` (as if manipulating a string with two\n> letters), or to use `codePointAt(i)` instead. See examples 2 and\n> 3 (below).\n\n`charCodeAt()` returns `NaN` if the given\nindex is less than `0`, or if it is equal to or greater than the\n`length` of the string.\n\nBackward compatibility: In historic versions (like JavaScript 1.2) the\n`charCodeAt()` method returns a number indicating the ISO-Latin-1 codeset\nvalue of the character at the given index. The ISO-Latin-1 codeset ranges from\n`0` to `255`. The first `0` to `127` are a\ndirect match of the ASCII character set.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/String/prototype/codePointAt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.codePointAt()\n\nThe **`codePointAt()`** method returns a non-negative integer\nthat is the Unicode code point value at the given position.\nNote that this function does not give the nth code point in a string,\nbut the code point starting at the specified string index.\n\n## Syntax\n\n```js\ncodePointAt(pos)\n```\n\n### Parameters\n\n- `pos`\n  - : Position of an element in `str` to return the code point value\n    from.\n\n### Return value\n\nA decimal number representing the code point value of the character at the given `pos`.\n\n- If there is no element at `pos`, returns [`undefined`](../../../globals/undefined.mdx).\n- If the element at `pos` is a UTF-16 high surrogate, returns the code point of the surrogate _pair_.\n- If the element at `pos` is a UTF-16 low surrogate, returns _only_ the low surrogate code point.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/String/prototype/concat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.concat()\n\nThe **`concat()`** method concatenates\nthe string arguments to the calling string and returns a new string.\n\n## Syntax\n\n```js\nconcat(str1)\nconcat(str1, str2)\nconcat(str1, str2, /* …, */ strN)\n```\n\n### Parameters\n\n- `strN`\n  - : One or more strings to concatenate to `str`.\n\n### Return value\n\nA new string containing the combined text of the strings provided.\n\n## Description\n\nThe `concat()` function concatenates the string arguments to the calling\nstring and returns a new string. Changes to the original string or the returned string\ndon't affect the other.\n\nIf the arguments are not of the type string, they are converted to string values before\nconcatenating.\n\nThe `concat()` method is very similar to the [addition/string concatenation operators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Addition) (`+`, `+=`), except that `concat()` [coerces its arguments directly to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion), while addition coerces its operands to primitives first. For more information, see the reference page for the [`+` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Addition).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/String/prototype/endsWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.endsWith()\n\nThe **`endsWith()`** method determines whether a string ends with the characters of a specified string, returning `true` or `false` as appropriate.\n\n## Syntax\n\n```js\nendsWith(searchString)\nendsWith(searchString, endPosition)\n```\n\n### Parameters\n\n- `searchString`\n  - : The characters to be searched for at the end of `str`. Cannot be a regex.\n- `endPosition` _**optional**_\n  - : The end position at which `searchString` is expected to be found (the index of `searchString`'s last character plus 1). Defaults to `str.length`.\n\n### Return value\n\n**`true`** if the given characters are found at the end of the string; otherwise, **`false`**.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If `searchString` is a regex.\n\n## Description\n\nThis method lets you determine whether or not a string ends with another string. This method is case-sensitive.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/String/prototype/includes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.includes()\n\nThe **`includes()`** method performs a case-sensitive search to determine whether one string may be found within another string, returning `true` or `false` as appropriate.\n\n## Syntax\n\n```js\nincludes(searchString)\nincludes(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n  - : A string to be searched for within `str`. Cannot be a regex.\n- `position` _**optional**_\n  - : The position within the string at which to begin searching for `searchString`. (Defaults to `0`.)\n\n### Return value\n\n**`true`** if the search string is found anywhere within the given string; otherwise, **`false`** if not.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If `searchString` is a regex.\n\n## Description\n\nThis method lets you determine whether or not a string includes another string.\n\n### Case-sensitivity\n\nThe `includes()` method is case sensitive. For example, the following expression returns `false`:\n\n```js\n\"Blue Whale\".includes(\"blue\"); // returns false\n```\n\nYou can work around this constraint by transforming both the original string and the search string to all lowercase:\n\n```js\n\"Blue Whale\".toLowerCase().includes(\"blue\"); // returns true\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/String/prototype/indexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.indexOf()\n\nThe **`indexOf()`** method, given one argument: a substring to search for, searches the entire calling string, and returns the index of the first occurrence of the specified substring. Given a second argument: a number, the method returns the first occurrence of the specified substring at an index greater than or equal to the specified number.\n\n## Syntax\n\n```js\nindexOf(searchString)\nindexOf(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n\n  - : Substring to search for, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion).\n\n    If the method is called with no arguments, `searchString` is coerced to `\"undefined\"`. Therefore,`\"undefined\".indexOf()` returns `0` — because the substring `\"undefined\"` is found at position `0` in the string `\"undefined\"`. But `\"undefine\".indexOf()`, returns `-1` — because the substring `\"undefined\"` is not found in the string `\"undefine\"`.\n\n- `position` _**optional**_\n\n  - : The method returns the index of the first occurrence of the specified substring at a position greater than or equal to `position`, which defaults to `0`. If `position` is greater than the length of the calling string, the method doesn't search the calling string at all. If `position` is less than zero, the method behaves as it would if `position` were `0`.\n\n    - `'hello world hello'.indexOf('o', -5)` returns `4` — because it causes the method to behave as if the second argument were `0`, and the first occurrence of `o` at a position greater or equal to `0` is at position `4`.\n\n    - `'hello world hello'.indexOf('world', 12)` returns `-1` — because, while it's true the substring `world` occurs at index `6`, that position is not greater than or equal to `12`.\n\n    - `'hello world hello'.indexOf('o', 99)` returns `-1` — because `99` is greater than the length of `hello world hello`, which causes the method to not search the string at all.\n\n### Return value\n\nThe index of the first occurrence of `searchString` found, or `-1` if not found.\n\n#### Return value when using an empty search string\n\nSearching for an empty search string produces strange results. With no second argument, or with a second argument whose value is less than the calling string's length, the return value is the same as the value of the second argument:\n\n```js\n\"hello world\".indexOf(\"\"); // returns 0\n\"hello world\".indexOf(\"\", 0); // returns 0\n\"hello world\".indexOf(\"\", 3); // returns 3\n\"hello world\".indexOf(\"\", 8); // returns 8\n```\n\nHowever, with a second argument whose value is greater than or equal to the string's length, the return value is the string's length:\n\n```js\n\"hello world\".indexOf(\"\", 11); // returns 11\n\"hello world\".indexOf(\"\", 13); // returns 11\n\"hello world\".indexOf(\"\", 22); // returns 11\n```\n\nIn the former instance, the method behaves as if it found an empty string just after the position specified in the second argument. In the latter instance, the method behaves as if it found an empty string at the end of the calling string.\n\n## Description\n\nStrings are zero-indexed: The index of a string's first character is `0`, and the index of a string's last character is the length of the string minus 1.\n\n```js\n\"Blue Whale\".indexOf(\"Blue\"); // returns  0\n\"Blue Whale\".indexOf(\"Blute\"); // returns -1\n\"Blue Whale\".indexOf(\"Whale\", 0); // returns  5\n\"Blue Whale\".indexOf(\"Whale\", 5); // returns  5\n\"Blue Whale\".indexOf(\"Whale\", 7); // returns -1\n\"Blue Whale\".indexOf(\"\"); // returns  0\n\"Blue Whale\".indexOf(\"\", 9); // returns  9\n\"Blue Whale\".indexOf(\"\", 10); // returns 10\n\"Blue Whale\".indexOf(\"\", 11); // returns 10\n```\n\nThe `indexOf()` method is case sensitive. For example, the following\nexpression returns `-1`:\n\n```js\n\"Blue Whale\".indexOf(\"blue\"); // returns -1\n```\n\n### Checking occurrences\n\nWhen checking if a specific substring occurs within a string, the correct way to check is test whether the return value is `-1`:\n\n```js\n\"Blue Whale\".indexOf(\"Blue\") !== -1; // true; found 'Blue' in 'Blue Whale'\n\"Blue Whale\".indexOf(\"Bloe\") !== -1; // false; no 'Bloe' in 'Blue Whale'\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/String/prototype/lastIndexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.lastIndexOf()\n\nThe **`lastIndexOf()`** method, given one argument: a substring to search for, searches the entire calling string, and returns the index of the last occurrence of the specified substring. Given a second argument: a number, the method returns the last occurrence of the specified substring at an index less than or equal to the specified number.\n\n## Syntax\n\n```js\nlastIndexOf(searchString)\nlastIndexOf(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n\n  - : Substring to search for, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion).\n\n    If the method is called with no arguments, `searchString` is coerced to `\"undefined\"`. Therefore,`\"undefined\".lastIndexOf()` returns `0` — because the substring `\"undefined\"` is found at position `0` in the string `\"undefined\"`. But `\"undefine\".lastIndexOf()`, returns `-1` — because the substring `\"undefined\"` is not found in the string `\"undefine\"`.\n\n- `position` _**optional**_\n\n  - : The method returns the index of the last occurrence of the specified substring at a position less than or equal to `position`, which defaults to `+Infinity`. If `position` is greater than the length of the calling string, the method searches the entire string. If `position` is less than `0`, the behavior is the same as for `0` — that is, the method looks for the specified substring only at index `0`.\n\n    - `'hello world hello'.lastIndexOf('world', 4)` returns `-1` — because, while the substring `world` does occurs at index `6`, that position is not less than or equal to `4`.\n\n    - `'hello world hello'.lastIndexOf('hello', 99)` returns `12` — because the last occurrence of `hello` at a position less than or equal to `99` is at position `12`.\n\n    - `'hello world hello'.lastIndexOf('hello', 0)` and `'hello world hello'.lastIndexOf('hello', -5)` both return `0` — because both cause the method to only look for `hello` at index `0`.\n\n### Return value\n\nThe index of the last occurrence of `searchString` found, or `-1` if not found.\n\n## Description\n\nStrings are zero-indexed: The index of a string's first character is `0`, and the index of a string's last character is the length of the string minus 1.\n\n```js\n\"canal\".lastIndexOf(\"a\"); // returns 3\n\"canal\".lastIndexOf(\"a\", 2); // returns 1\n\"canal\".lastIndexOf(\"a\", 0); // returns -1\n\"canal\".lastIndexOf(\"x\"); // returns -1\n\"canal\".lastIndexOf(\"c\", -5); // returns 0\n\"canal\".lastIndexOf(\"c\", 0); // returns 0\n\"canal\".lastIndexOf(\"\"); // returns 5\n\"canal\".lastIndexOf(\"\", 2); // returns 2\n```\n\n### Case-sensitivity\n\nThe `lastIndexOf()` method is case sensitive. For example, the following\nexpression returns `-1`:\n\n```js\n\"Blue Whale, Killer Whale\".lastIndexOf(\"blue\"); // returns -1\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/String/prototype/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.length\n\nThe **`length`** data property of a string contains the length of the string in UTF-16 code units.\n\n## Value\n\nA non-negative integer.\n\n## Description\n\nThis property returns the number of code units in the string. JavaScript uses [UTF-16](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters) encoding, where each Unicode character may be encoded as one or two code units, so it's possible for the value returned by `length` to not match the actual number of Unicode characters in the string. For common scripts like Latin, Cyrillic, wellknown CJK characters, etc., this should not be an issue, but if you are working with certain scripts, such as emojis, [mathematical symbols](https://en.wikipedia.org/wiki/Mathematical_Alphanumeric_Symbols), or obscure Chinese characters, you may need to account for the difference between code units and characters.\n\nThe language specification requires strings to have a maximum length of 2<sup>53</sup> - 1 elements, which is the upper limit for [precise integers](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER). However, a string with this length needs 16384TiB of storage, which cannot fit in any reasonable device's memory, so implementations tend to lower the threshold, which allows the string's length to be conveniently stored in a 32-bit integer.\n\n- In V8 (used by Chrome and Node), the maximum length is 2<sup>29</sup> - 24 (\\~1GiB). On 32-bit systems, the maximum length is 2<sup>28</sup> - 16 (\\~512MiB).\n- In Firefox, the maximum length is 2<sup>30</sup> - 2 (\\~2GiB). Before Firefox 65, the maximum length was 2<sup>28</sup> - 1 (\\~512MiB).\n- In Safari, the maximum length is 2<sup>31</sup> - 1 (\\~4GiB).\n\nFor an empty string, `length` is 0.\n\nThe static property `String.length` is unrelated to the length of strings. It's the [arity](../../../globals/Function/prototype/length.mdx) of the `String` function (loosely, the number of formal parameters it has), which is 1.\n\nSince `length` counts code units instead of characters, if you want to get the number of characters, you can first split the string with its [iterator](../../../globals/String/prototype/@@iterator.mdx), which iterates by characters:\n\n```js\nfunction getCharacterLength(str) {\n  // The string iterator that is used here iterates over characters,\n  // not mere code units\n  return [...str].length;\n}\n\nconsole.log(getCharacterLength(\"A\\uD87E\\uDC04Z\")); // 3\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/String/prototype/localeCompare.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.localeCompare()\n\nThe **`localeCompare()`** method returns a number indicating whether a reference string comes before, or after, or is the same as the given string in sort order. In implementations with [`Intl.Collator` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator) support, this method simply calls `Intl.Collator`.\n\n## Syntax\n\n```js\nlocaleCompare(compareString)\nlocaleCompare(compareString, locales)\nlocaleCompare(compareString, locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` parameters customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.Collator` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator), these parameters correspond exactly to the [`Intl.Collator()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator) constructor's parameters. Implementations without `Intl.Collator` support are asked to ignore both parameters, making the comparison result returned entirely implementation-dependent — it's only required to be _consistent_.\n\n- `compareString`\n  - : The string against which the `referenceStr` is compared.\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator#locales) parameter of the `Intl.Collator()` constructor.\n\n    In implementations without `Intl.Collator` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator#options) parameter of the `Intl.Collator()` constructor.\n\n    In implementations without `Intl.Collator` support, this parameter is ignored.\n\nSee the [`Intl.Collator()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator) for details on the `locales` and `options` parameters and how to use them.\n\n### Return value\n\nA **negative** number if `referenceStr` occurs before `compareString`; **positive** if the `referenceStr` occurs after `compareString`; `0` if they are equivalent.\n\nIn implementations with `Intl.Collator`, this is equivalent to `new Intl.Collator(locales, options).compare(referenceStr, compareString)`.\n\n## Description\n\nReturns an integer indicating whether the `referenceStr` comes\nbefore, after or is equivalent to the `compareString`.\n\n- Negative when the `referenceStr` occurs before\n  `compareString`\n- Positive when the `referenceStr` occurs after\n  `compareString`\n- Returns `0` if they are equivalent\n\n> **Warning:** Do not rely on exact return values of `-1` or `1`!\n>\n> Negative and positive integer results vary between browsers (as well as between\n> browser versions) because the W3C specification only mandates negative and positive\n> values. Some browsers may return `-2` or `2`, or even some other\n> negative or positive value.\n\n## Performance\n\nWhen comparing large numbers of strings, such as in sorting large arrays, it is better to create an [`Intl.Collator`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator) object and use the function provided by its [`compare()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/compare) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/String/prototype/match.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.match()\n\nThe **`match()`** method retrieves the result of matching a string against a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions).\n\n## Syntax\n\n```js\nmatch(regexp)\n```\n\n### Parameters\n\n- `regexp`\n\n  - : A regular expression object, or any object that has a [`Symbol.match`](../../../globals/Symbol/match.mdx) method.\n\n    If `regexp` is not a `RegExp` object and does not have a `Symbol.match` method, it is implicitly converted to a `RegExp` by using `new RegExp(regexp)`.\n\n    If you don't give any parameter and use the `match()` method directly, you will get an `Array` with an empty string: `[\"\"]`, because this is equivalent to `match(/(?:)/)`.\n\n### Return value\n\nAn `Array` whose contents depend on the presence or absence of the global (`g`) flag, or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) if no matches are found.\n\n- If the `g` flag is used, all results matching the complete regular expression will be returned, but capturing groups are not included.\n- If the `g` flag is not used, only the first complete match and its related capturing groups are returned. In this case, `match()` will return the same result as `RegExp.prototype.exec()` (an array with some extra properties).\n\n## Description\n\nThe implementation of `String.prototype.match` itself is very simple — it simply calls the `Symbol.match` method of the argument with the string as the first parameter. The actual implementation comes from [`RegExp.prototype[@@match]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@match).\n\n- If you need to know if a string matches a regular expression `RegExp`, use `RegExp.prototype.test()`.\n- If you only want the first match found, you might want to use `RegExp.prototype.exec()` instead.\n- If you want to obtain capture groups and the global flag is set, you need to use `RegExp.prototype.exec()` or [`String.prototype.matchAll()`](../../../globals/String/prototype/matchAll.mdx) instead.\n\nFor more information about the semantics of `match()` when a regex is passed, see [`RegExp.prototype[@@match]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@match).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/String/prototype/matchAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.matchAll()\n\nThe **`matchAll()`** method returns an iterator of all results matching a string against a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions), including [capturing groups](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions/Groups_and_Backreferences).\n\n## Syntax\n\n```js\nmatchAll(regexp)\n```\n\n### Parameters\n\n- `regexp`\n\n  - : A regular expression object, or any object that has a [`Symbol.matchAll`](../../../globals/Symbol/matchAll.mdx) method.\n\n    If `regexp` is not a `RegExp` object and does not have a `Symbol.matchAll` method, it is implicitly converted to a `RegExp` by using `new RegExp(regexp, 'g')`.\n\n    If `regexp` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes), then it must have the global (`g`) flag set, or a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Return value\n\nAn [iterable iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators) (which is not restartable) of matches. Each match is an array with the same shape as the return value of `RegExp.prototype.exec()`.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown if the `regexp` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes) that does not have the global (`g`) flag set (its [`flags`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/flags) property does not contain `\"g\"`).\n\n## Description\n\nThe implementation of `String.prototype.matchAll` itself is very simple — it simply calls the `Symbol.matchAll` method of the argument with the string as the first parameter (apart from the extra input validation that the regex is global). The actual implementation comes from [`RegExp.prototype[@@matchAll]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@matchAll).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/String/prototype/padEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.padEnd()\n\nThe **`padEnd()`** method pads the current string with a given\nstring (repeated, if needed) so that the resulting string reaches a given length. The\npadding is applied from the end of the current string.\n\n## Syntax\n\n```js\npadEnd(targetLength)\npadEnd(targetLength, padString)\n```\n\n### Parameters\n\n- `targetLength`\n  - : The length of the resulting string once the current `str` has\n    been padded. If the value is lower than `str.length`, the\n    current string will be returned as-is.\n- `padString` _**optional**_\n  - : The string to pad the current `str` with. If\n    `padString` is too long to stay within\n    `targetLength`, it will be truncated: for left-to-right\n    languages the left-most part and for right-to-left languages the right-most will be\n    applied. The default value for this parameter is \" \"\n    (`U+0020`).\n\n### Return value\n\nA `String` of the specified `targetLength` with the\n`padString` applied at the end of the current\n`str`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/String/prototype/padStart.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.padStart()\n\nThe **`padStart()`** method pads the\ncurrent string with another string (multiple times, if needed) until the resulting\nstring reaches the given length. The padding is applied from the start of the\ncurrent string.\n\n## Syntax\n\n```js\npadStart(targetLength)\npadStart(targetLength, padString)\n```\n\n### Parameters\n\n- `targetLength`\n  - : The length of the resulting string once the current `str` has\n    been padded. If the value is less than `str.length`, then\n    `str` is returned as-is.\n- `padString` _**optional**_\n  - : The string to pad the current `str` with. If\n    `padString` is too long to stay within the\n    `targetLength`, it will be truncated from the end.\n    The default value is the unicode \"space\" character (U+0020).\n\n### Return value\n\nA `String` of the specified `targetLength` with\n`padString` applied from the start.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/String/prototype/repeat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.repeat()\n\nThe **`repeat()`** method constructs and returns a new string\nwhich contains the specified number of copies of the string on which it was called,\nconcatenated together.\n\n## Syntax\n\n```js\nrepeat(count)\n```\n\n### Parameters\n\n- `count`\n  - : An integer between `0` and\n    [`+Infinity`](../../../globals/Number/POSITIVE_INFINITY.mdx), indicating the\n    number of times to repeat the string.\n\n### Return value\n\nA new string containing the specified number of copies of the given string.\n\n### Exceptions\n\n- Throws a `RangeError` if repeat count is negative.\n- Throws a `RangeError` if repeat count is infinity or overflows maximum string size.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/String/prototype/replace.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.replace()\n\nThe **`replace()`** method returns a new string with one, some, or all matches of a `pattern` replaced by a `replacement`. The `pattern` can be a string or a `RegExp`, and the `replacement` can be a string or a function called for each match. If `pattern` is a string, only the first occurrence will be replaced. The original string is left unchanged.\n\n## Syntax\n\n```js\nreplace(pattern, replacement)\n```\n\n### Parameters\n\n- `pattern`\n  - : Can be a string or an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method — the typical example being a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp). Any value that doesn't have the `Symbol.replace` method will be coerced to a string.\n- `replacement`\n  - : Can be a string or a function.\n    - If it's a string, it will replace the substring matched by `pattern`. A number of special replacement patterns are supported; see the [Specifying a string as the replacement](#specifying-a-string-as-the-replacement) section below.\n    - If it's a function, it will be invoked for every match and its return value is used as the replacement text. The arguments supplied to this function are described in the [Specifying a function as the replacement](#specifying-a-function-as-the-replacement) section below.\n\n### Return value\n\nA new string, with one, some, or all matches of the pattern replaced by the specified replacement.\n\n## Description\n\nThis method does not mutate the string value it's called on. It returns a new string.\n\nA string pattern will only be replaced once. To perform a global search and replace, use a regular expression with the `g` flag, or use [`replaceAll()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/replaceAll) instead.\n\nIf `pattern` is an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method (including `RegExp` objects), that method is called with the target string and `replacement` as arguments. Its return value becomes the return value of `replace()`. In this case the behavior of `replace()` is entirely encoded by the `@@replace` method — for example, any mention of \"capturing groups\" in the description below is actually functionality provided by [`RegExp.prototype[@@replace]`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@replace).\n\nIf the `pattern` is an empty string, the replacement is prepended to the start of the string.\n\n```js\n\"xxx\".replace(\"\", \"_\"); // \"_xxx\"\n```\n\nA regexp with the `g` flag is the only case where `replace()` replaces more than once. For more information about how regex properties (especially the [sticky](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky) flag) interact with `replace()`, see [`RegExp.prototype[@@replace]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@replace).\n\n### Specifying a string as the replacement\n\nThe replacement string can include the following special replacement patterns:\n\n| Pattern   | Inserts                                                                                        |\n| --------- | ---------------------------------------------------------------------------------------------- |\n| `$$`      | Inserts a `\"$\"`.                                                                               |\n| `$&`      | Inserts the matched substring.                                                                 |\n| `` $` ``  | Inserts the portion of the string that precedes the matched substring.                         |\n| `$'`      | Inserts the portion of the string that follows the matched substring.                          |\n| `$n`      | Inserts the `n`th (`1`-indexed) capturing group where `n` is a positive integer less than 100. |\n| `$<Name>` | Inserts the named capturing group where `Name` is the group name.                              |\n\n`$n` and `$<Name>` are only available if the `pattern` argument is a `RegExp` object. If the `pattern` is a string, or if the corresponding capturing group isn't present in the regex, then the pattern will be replaced as a literal. If the group is present but isn't matched (because it's part of a disjunction), it will be replaced with an empty string.\n\n```js\n\"foo\".replace(/(f)/, \"$2\");\n// \"$2oo\"; the regex doesn't have the second group\n\n\"foo\".replace(\"f\", \"$1\");\n// \"$1oo\"; the pattern is a string, so it doesn't have any groups\n\n\"foo\".replace(/(f)|(g)/, \"$2\");\n// \"oo\"; the second group exists but isn't matched\n```\n\n### Specifying a function as the replacement\n\nYou can specify a function as the second parameter. In this case, the function will be invoked after the match has been performed. The function's result (return value) will be used as the replacement string.\n\n> **Note:** The above-mentioned special replacement patterns do _not_ apply for strings returned from the replacer function.\n\nThe function has the following signature:\n\n```js\nfunction replacer(match, p1, p2, /* …, */ pN, offset, string, groups) {\n  return replacement;\n}\n```\n\nThe arguments to the function are as follows:\n\n- `match`\n  - : The matched substring. (Corresponds to `$&` above.)\n- `p1, p2, …, pN`\n  - : The `n`th string found by a capture group (including named capturing groups), provided the first argument to `replace()` is a `RegExp` object. (Corresponds to `$1`, `$2`, etc. above.) For example, if the `pattern` is `/(\\a+)(\\b+)/`, then `p1` is the match for `\\a+`, and `p2` is the match for `\\b+`. If the group is part of a disjunction (e.g. `\"abc\".replace(/(a)|(b)/, replacer)`), the unmatched alternative will be `undefined`.\n- `offset`\n  - : The offset of the matched substring within the whole string being examined. For example, if the whole string was `'abcd'`, and the matched substring was `'bc'`, then this argument will be `1`.\n- `string`\n  - : The whole string being examined.\n- `groups`\n  - : An object whose keys are the used group names, and whose values are the matched portions (`undefined` if not matched). Only present if the `pattern` contains at least one named capturing group.\n\nThe exact number of arguments depends on whether the first argument is a `RegExp` object — and, if so, how many capture groups it has.\n\nThe following example will set `newString` to `'abc - 12345 - #$*%'`:\n\n```js\nfunction replacer(match, p1, p2, p3, offset, string) {\n  // p1 is non-digits, p2 digits, and p3 non-alphanumerics\n  return [p1, p2, p3].join(\" - \");\n}\nconst newString = \"abc12345#$*%\".replace(/([^\\d]*)(\\d*)([^\\w]*)/, replacer);\nconsole.log(newString); // abc - 12345 - #$*%\n```\n\nThe function will be invoked multiple times for each full match to be replaced if the regular expression in the first parameter is global.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/String/prototype/replaceAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.replaceAll()\n\nThe **`replaceAll()`** method returns a new string with all matches of a `pattern` replaced by a `replacement`. The `pattern` can be a string or a `RegExp`, and the `replacement` can be a string or a function to be called for each match. The original string is left unchanged.\n\n## Syntax\n\n```js\nreplaceAll(pattern, replacement)\n```\n\n### Parameters\n\n- `pattern`\n\n  - : Can be a string or an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method — the typical example being a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp). Any value that doesn't have the `Symbol.replace` method will be coerced to a string.\n\n    If `pattern` is a regex, then it must have the global (`g`) flag set, or a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n- `replacement`\n  - : Can be a string or a function. The replacement has the same semantics as that of [`String.prototype.replace()`](../../../globals/String/prototype/replace.mdx).\n\n### Return value\n\nA new string, with all matches of a pattern replaced by a replacement.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown if the `pattern` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes) that does not have the global (`g`) flag set (its [`flags`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/flags) property does not contain `\"g\"`).\n\n## Description\n\nThis method does not mutate the string value it's called on. It returns a new string.\n\nUnlike [`String.prototype.replace()`](../../../globals/String/prototype/replace.mdx), this method would replace all occurrences of a string, not just the first one. This is especially useful if the string is not statically known, as calling the [`RegExp()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/RegExp) constructor without escaping special characters may unintentionally change its semantics.\n\n```js\nfunction unsafeRedactName(text, name) {\n  return text.replace(new RegExp(name, \"g\"), \"[REDACTED]\");\n}\nfunction safeRedactName(text, name) {\n  return text.replaceAll(name, \"[REDACTED]\");\n}\n\nconst report =\n  \"A hacker called ha.*er used special characters in their name to breach the system.\";\n\nconsole.log(unsafeRedactName(report, \"ha.*er\")); // \"A [REDACTED]s in their name to breach the system.\"\nconsole.log(safeRedactName(report, \"ha.*er\")); // \"A hacker called [REDACTED] used special characters in their name to breach the system.\"\n```\n\nIf `pattern` is an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method (including `RegExp` objects), that method is called with the target string and `replacement` as arguments. Its return value becomes the return value of `replaceAll()`. In this case the behavior of `replaceAll()` is entirely encoded by the `Symbol.replace` method, and therefore will have the same result as `replace()` (apart from the extra input validation that the regex is global).\n\nIf the `pattern` is an empty string, the replacement will be inserted in between every UTF-16 code unit, similar to [`String.prototype.split()`](../../../globals/String/prototype/split.mdx) behavior.\n\n```js\n\"xxx\".replaceAll(\"\", \"_\"); // \"_x_x_x_\"\n```\n\nFor more information about how regex properties (especially the [sticky](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky) flag) interact with `replaceAll()`, see [`RegExp.prototype[@@replace]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@replace).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/String/prototype/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.search()\n\nThe **`search()`** method executes a search for a match between a regular expression and this `String` object.\n\n## Syntax\n\n```js\nsearch(regexp)\n```\n\n### Parameters\n\n- `regexp`\n\n  - : A regular expression object, or any object that has a [`Symbol.search`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/search) method.\n\n    If `regexp` is not a `RegExp` object and does not have a `Symbol.search` method, it is implicitly converted to a `RegExp` by using `new RegExp(regexp)`.\n\n### Return value\n\nThe index of the first match between the regular expression and the given string, or `-1` if no match was found.\n\n## Description\n\nThe implementation of `String.prototype.search()` itself is very simple — it simply calls the `Symbol.search` method of the argument with the string as the first parameter. The actual implementation comes from [`RegExp.prototype[@@search]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@search).\n\nThe `g` flag of `regexp` has no effect on the `search()` result, and the search always happens as if the regex's `lastIndex` is 0. For more information on the behavior of `search()`, see [`RegExp.prototype[@@search]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@search).\n\nWhen you want to know whether a pattern is found, and _also_ know its index within a string, use `search()`.\n\n- If you only want to know if it exists, use the `RegExp.prototype.test()` method, which returns a boolean.\n- If you need the content of the matched text, use `String.prototype.match()` or `RegExp.prototype.exec()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/String/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.slice()\n\nThe **`slice()`** method extracts a section of a string and\nreturns it as a new string, without modifying the original string.\n\n## Syntax\n\n```js\nslice(indexStart)\nslice(indexStart, indexEnd)\n```\n\n### Parameters\n\n- `indexStart`\n  - : The index of the first character to include in the returned substring.\n- `indexEnd` _**optional**_\n  - : The index of the first character to exclude from the returned substring.\n\n### Return value\n\nA new string containing the extracted section of the string.\n\n## Description\n\n`slice()` extracts the text from one string and returns a new string. Changes to the text in one string do not affect the other string.\n\n`slice()` extracts up to but not including `indexEnd`. For example, `str.slice(1, 4)` extracts the second character through the fourth character (characters indexed `1`, `2`, and `3`).\n\n- If `indexStart >= str.length`, an empty string is returned.\n- If `indexStart < 0`, the index is counted from the end of the string. More formally, in this case, the substring starts at `max(indexStart + str.length, 0)`.\n- If `indexStart` is omitted, undefined, or cannot be converted to a number (using [`Number()`](../../../globals/Number/Number.mdx)), it's treated as `0`.\n- If `indexEnd` is omitted, undefined, or cannot be converted to a number (using [`Number()`](../../../globals/Number/Number.mdx)), or if `indexEnd >= str.length`, `slice()` extracts to the end of the string.\n- If `indexEnd < 0`, the index is counted from the end of the string. More formally, in this case, the substring ends at `max(indexEnd + str.length, 0)`.\n- If `indexEnd <= indexStart` after normalizing negative values (i.e. `indexEnd` represents a character that's before `indexStart`), an empty string is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/String/prototype/split.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.split()\n\nThe **`split()`** method takes a pattern and divides a `String` into an ordered list of substrings by searching for the pattern, puts these substrings into an array, and returns the array.\n\n## Syntax\n\n```js\nsplit()\nsplit(separator)\nsplit(separator, limit)\n```\n\n### Parameters\n\n- `separator` _**optional**_\n  - : The pattern describing where each split should occur. Can be a string or an object with a [`Symbol.split`](../../../globals/Symbol/split.mdx) method — the typical example being a regular expression. If undefined, the original target string is returned wrapped in an array.\n- `limit` _**optional**_\n  - : A non-negative integer specifying a limit on the number of substrings to be included in the array. If provided, splits the string at each occurrence of the specified `separator`, but stops when `limit` entries have been placed in the array. Any leftover text is not included in the array at all.\n    - The array may contain fewer entries than `limit` if the end of the string is reached before the limit is reached.\n    - If `limit` is `0`, `[]` is returned.\n\n### Return value\n\nAn `Array` of strings, split at each point where the `separator` occurs in the given string.\n\n## Description\n\nIf `separator` is a non-empty string, the target string is split by all matches of the `separator` without including `separator` in the results. For example, a string containing tab separated values (TSV) could be parsed by passing a tab character as the separator, like `myString.split(\"\\t\")`. If `separator` contains multiple characters, that entire character sequence must be found in order to split. If `separator` appears at the beginning (or end) of the string, it still has the effect of splitting, resulting in an empty (i.e. zero length) string appearing at the first (or last) position of the returned array. If `separator` does not occur in `str`, the returned array contains one element consisting of the entire string.\n\nIf `separator` is an empty string (`\"\"`), `str` is converted to an array of each of its UTF-16 \"characters\", without empty strings on either ends of the resulting string.\n\n> **Note:** `\"\".split(\"\")` is therefore the only way to produce an empty array when a string is passed as `separator`.\n\n> **Warning:** When the empty string (`\"\"`) is used as a separator, the string is **not** split by _user-perceived characters_ ([grapheme clusters](https://unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries)) or unicode characters (codepoints), but by UTF-16 codeunits. This destroys [surrogate pairs](https://unicode.org/faq/utf_bom.html#utf16-2). See [\"How do you get a string to a character array in JavaScript?\" on StackOverflow](https://stackoverflow.com/questions/4547609/how-to-get-character-array-from-a-string/34717402#34717402).\n\nIf `separator` is a regexp that matches empty strings, whether the match is split by UTF-16 code units or Unicode codepoints depends on if the [`u`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/unicode) flag is set.\n\n```js\n\"😄😄\".split(/(?:)/); // [ \"\\ud83d\", \"\\ude04\", \"\\ud83d\", \"\\ude04\" ]\n\"😄😄\".split(/(?:)/u); // [ \"😄\", \"😄\" ]\n```\n\nIf `separator` is a regular expression with capturing groups, then each time `separator` matches, the captured groups (including any `undefined` results) are spliced into the output array. This behavior is specified by the regexp's [`Symbol.split`](../../../globals/Symbol/split.mdx) method.\n\nIf `separator` is an object with a [`Symbol.split`](../../../globals/Symbol/split.mdx) method, that method is called with the target string and `limit` as arguments, and `this` set to the object. Its return value becomes the return value of `split`.\n\nAny other value will be coerced to a string before being used as separator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/String/prototype/startsWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.startsWith()\n\nThe **`startsWith()`** method determines whether a string begins with the characters of a specified string, returning `true` or `false` as appropriate.\n\n## Syntax\n\n```js\nstartsWith(searchString)\nstartsWith(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n  - : The characters to be searched for at the start of this string. Cannot be a regex.\n- `position` _**optional**_\n  - : The start position at which `searchString` is expected to be found (the index of `searchString`'s first character). Defaults to `0`.\n\n### Return value\n\n**`true`** if the given characters are found at the beginning of the string; otherwise, **`false`**.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If `searchString` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes).\n\n## Description\n\nThis method lets you determine whether or not a string begins with another string. This method is case-sensitive.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/String/prototype/substr.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.substr()\n\nThe **`substr()`** method returns a portion of the string, starting at the specified index and extending for a given number of characters afterwards.\n\n> **Note:** `substr()` is not part of the main ECMAScript specification — it's defined in [Annex B: Additional ECMAScript Features for Web Browsers](https://tc39.es/ecma262/#sec-additional-ecmascript-features-for-web-browsers), which is normative optional for non-browser runtimes. Therefore, people are advised to use the standard [`String.prototype.substring()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/substring) and [`String.prototype.slice()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/slice) methods instead to make their code maximally cross-platform friendly. The [`String.prototype.substring()` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/substring#the_difference_between_substring_and_substr) has some comparisons between the three methods.\n\n\n\n## Syntax\n\n```js\nsubstr(start)\nsubstr(start, length)\n```\n\n### Parameters\n\n- `start`\n  - : The index of the first character to include in the returned substring.\n- `length` _**optional**_\n  - : The number of characters to extract.\n\n### Return value\n\nA new string containing the specified part of the given string.\n\n## Description\n\nA string's `substr()` method extracts `length` characters from the string, counting from the `start` index.\n\n- If `start >= str.length`, an empty string is returned.\n- If `start < 0`, the index starts counting from the end of the string. More formally, in this case the substring starts at `max(start + str.length, 0)`.\n- If `start` is omitted or [`undefined`](../../../globals/undefined.mdx), it's treated as `0`.\n- If `length` is omitted or [`undefined`](../../../globals/undefined.mdx), or if `start + length >= str.length`, `substr()` extracts characters to the end of the string.\n- If `length < 0`, an empty string is returned.\n- For both `start` and `length`, [`NaN`](../../../globals/NaN.mdx) is treated as `0`.\n\nAlthough you are encouraged to avoid using `substr()`, there is no trivial way to migrate `substr()` to either `slice()` or `substring()` in legacy code without essentially writing a polyfill for `substr()`. For example, `str.substr(a, l)`, `str.slice(a, a + l)`, and `str.substring(a, a + l)` all have different results when `str = \"01234\", a = 1, l = -2` — `substr()` returns an empty string, `slice()` returns `\"123\"`, while `substring()` returns `\"0\"`. The actual refactoring path depends on the knowledge of the range of `a` and `l`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/String/prototype/substring.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.substring()\n\nThe **`substring()`** method returns the part of the `string` from the start index up to and excluding the end index, or to the end of the string if no end index is supplied.\n\n## Syntax\n\n```js\nsubstring(indexStart)\nsubstring(indexStart, indexEnd)\n```\n\n### Parameters\n\n- `indexStart`\n  - : The index of the first character to include in the returned substring.\n- `indexEnd` _**optional**_\n  - : The index of the first character to exclude from the returned substring.\n\n### Return value\n\nA new string containing the specified part of the given string.\n\n## Description\n\n`substring()` extracts characters from `indexStart` up to _but not including_ `indexEnd`. In particular:\n\n- If `indexEnd` is omitted, `substring()` extracts characters to the end of the string.\n- If `indexStart` is equal to `indexEnd`, `substring()` returns an empty string.\n- If `indexStart` is greater than `indexEnd`, then the effect of `substring()` is as if the two arguments were swapped; see example below.\n\nAny argument value that is less than `0` or greater than `str.length` is treated as if it were `0` and `str.length`, respectively.\n\nAny argument value that is [`NaN`](../../../globals/NaN.mdx) is treated as if it were `0`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/String/prototype/toLocaleLowerCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toLocaleLowerCase()\n\nThe **`toLocaleLowerCase()`** method returns the calling string\nvalue converted to lower case, according to any locale-specific case mappings.\n\n## Syntax\n\n```js\ntoLocaleLowerCase()\ntoLocaleLowerCase(locales)\n```\n\n### Parameters\n\n- `locales` _**optional**_\n  - : A string with a BCP 47 language tag, or an array of such strings. Indicates the locale to be used to convert to lower case according to any locale-specific case mappings. For the general form and interpretation of the `locales` argument, see [Locale identification and negotiation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation).\n\n### Return value\n\nA new string representing the calling string converted to lower case, according to any\nlocale-specific case mappings.\n\n### Exceptions\n\n- A [`RangeError`](../../../globals/RangeError/RangeError.mdx) (\"invalid language tag: xx_yy\") is thrown if a\n  `locale` argument isn't a valid language tag.\n- A [`TypeError`](../../../globals/TypeError/TypeError.mdx) (\"invalid element in locales argument\") is thrown if an\n  array element isn't of type string.\n\n## Description\n\nThe `toLocaleLowerCase()` method returns the value of the string converted\nto lower case according to any locale-specific case mappings.\n`toLocaleLowerCase()` does not affect the value of the string itself. In most\ncases, this will produce the same result as [`String.prototype.toLowerCase()`](../../../globals/String/prototype/toLowerCase.mdx), but for some locales, such as Turkish, whose case mappings do not\nfollow the default case mappings in Unicode, there may be a different result.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/String/prototype/toLocaleUpperCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toLocaleUpperCase()\n\nThe **`toLocaleUpperCase()`** method returns the calling string\nvalue converted to upper case, according to any locale-specific case mappings.\n\n## Syntax\n\n```js\ntoLocaleUpperCase()\ntoLocaleUpperCase(locales)\n```\n\n### Parameters\n\n- `locales` _**optional**_\n  - : A string with a BCP 47 language tag, or an array of such strings. Indicates the locale to be used to convert to upper case according to any locale-specific case mappings. For the general form and interpretation of the `locales` argument, see [Locale identification and negotiation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation).\n\n### Return value\n\nA new string representing the calling string converted to upper case, according to any\nlocale-specific case mappings.\n\n### Exceptions\n\n- A [`RangeError`](../../../globals/RangeError/RangeError.mdx) (\"invalid language tag: xx_yy\") is thrown if a\n  `locale` argument isn't a valid language tag.\n- A [`TypeError`](../../../globals/TypeError/TypeError.mdx) (\"invalid element in locales argument\") is thrown if an\n  array element isn't of type string.\n\n## Description\n\nThe `toLocaleUpperCase()` method returns the value of the string converted\nto upper case according to any locale-specific case mappings.\n`toLocaleUpperCase()` does not affect the value of the string itself. In most\ncases, this will produce the same result as [`String.prototype.toUpperCase()`](../../../globals/String/prototype/toUpperCase.mdx), but for some locales, such as Turkish, whose case mappings do not\nfollow the default case mappings in Unicode, there may be a different result.\n\nAlso notice that conversion is not necessarily a 1:1 character mapping, as some\ncharacters might result in two (or even more) characters when transformed to upper-case.\nTherefore the length of the result string can differ from the input length. This also\nimplies that the conversion is not stable, so i.E. the following can return\n`false`:\n`x.toLocaleLowerCase() === x.toLocaleUpperCase().toLocaleLowerCase()`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/String/prototype/toLowerCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toLowerCase()\n\nThe **`toLowerCase()`** method returns the calling string value\nconverted to lower case.\n\n## Syntax\n\n```js\ntoLowerCase()\n```\n\n### Return value\n\nA new string representing the calling string converted to lower case.\n\n## Description\n\nThe `toLowerCase()` method returns the value of the string converted to\nlower case. `toLowerCase()` does not affect the value of the string\n`str` itself.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/String/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified string value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified string value.\n\n## Description\n\nThe `String` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For `String` values, the `toString` method returns the string itself (if it's a primitive) or the string that the `String` object wraps. It has the exact same implementation as [`String.prototype.valueOf()`](../../../globals/String/prototype/valueOf.mdx).\n\nThe `toString()` method requires its `this` value to be a `String` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to string values.\n\nBecause `String` doesn't have a [`[Symbol.toPrimitive]()`](../../../globals/Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `String` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, String _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — since they are already strings, no conversion is performed.\n\n```js\nString.prototype.toString = () => \"Overridden\";\nconsole.log(`${\"foo\"}`); // \"foo\"\nconsole.log(`${new String(\"foo\")}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/String/prototype/toUpperCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toUpperCase()\n\nThe **`toUpperCase()`** method returns the calling string value\nconverted to uppercase (the value will be converted to a string if it isn't one).\n\n## Syntax\n\n```js\ntoUpperCase()\n```\n\n### Return value\n\nA new string representing the calling string converted to upper case.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : When called on [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../../globals/undefined.mdx), for example,\n    `String.prototype.toUpperCase.call(undefined)`.\n\n## Description\n\nThe `toUpperCase()` method returns the value of the string converted to\nuppercase. This method does not affect the value of the string itself since JavaScript\nstrings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/String/prototype/trim.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.trim()\n\nThe **`trim()`** method removes whitespace from both ends of a string and returns a new string, without modifying the original string.\n\nTo return a new string with whitespace trimmed from just one end, use [`String.prototype.trimStart()`](../../../globals/String/prototype/trimStart.mdx) or [`String.prototype.trimEnd()`](../../../globals/String/prototype/trimEnd.mdx).\n\n## Syntax\n\n```js\ntrim()\n```\n\n### Return value\n\nA new string representing `str` stripped of whitespace from both its beginning and end. Whitespace is defined as [white space](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#white_space) characters plus [line terminators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#line_terminators).\n\nIf neither the beginning or end of `str` has any whitespace, a new string is still returned (essentially a copy of `str`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/String/prototype/trimEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.trimEnd()\n\nThe **`trimEnd()`** method removes whitespace from the end of a string and returns a new string, without modifying the original string. `trimRight()` is an alias of this method.\n\n## Syntax\n\n```js\ntrimEnd()\n\ntrimRight()\n```\n\n### Return value\n\nA new string representing `str` stripped of whitespace from its end (right side). Whitespace is defined as [white space](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#white_space) characters plus [line terminators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#line_terminators).\n\nIf the end of `str` has no whitespace, a new string is still returned (essentially a copy of `str`).\n\n### Aliasing\n\nAfter [`String.prototype.trim()`](../../../globals/String/prototype/trim.mdx) was standardized, engines also implemented the non-standard method `trimRight`. However, for consistency with [`String.prototype.pedEnd()`](../../../globals/String/prototype/trim.mdx), when the method got standardized, its name was chosen as `trimEnd`. For web compatibility reasons, `trimRight` remains as an alias to `trimEnd`, and they refer to the exact same function object. In some engines this means:\n\n```js\nString.prototype.trimRight.name === \"trimEnd\";\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/String/prototype/trimStart.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.trimStart()\n\nThe **`trimStart()`** method removes whitespace from the beginning of a string and returns a new string, without modifying the original string. `trimLeft()` is an alias of this method.\n\n## Syntax\n\n```js\ntrimStart()\n\ntrimLeft()\n```\n\n### Return value\n\nA new string representing `str` stripped of whitespace from its beginning (left side). Whitespace is defined as [white space](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#white_space) characters plus [line terminators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#line_terminators).\n\nIf the beginning of `str` has no whitespace, a new string is still returned (essentially a copy of `str`).\n\n### Aliasing\n\nAfter [`String.prototype.trim()`](../../../globals/String/prototype/trim.mdx) was standardized, engines also implemented the non-standard method `trimLeft`. However, for consistency with [`String.prototype.padEnd()`](../../../globals/String/prototype/padEnd.mdx), when the method got standardized, its name was chosen as `trimStart`. For web compatibility reasons, `trimLeft` remains as an alias to `trimStart`, and they refer to the exact same function object. In some engines this means:\n\n```js\nString.prototype.trimLeft.name === \"trimStart\";\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/String/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a\n`String` object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nA string representing the primitive value of a given `String` object.\n\n## Description\n\nThe `valueOf()` method of `String` returns the primitive value\nof a `String` object as a string data type. This value is equivalent to\n[`String.prototype.toString()`](../../../globals/String/prototype/toString.mdx).\n\nThis method is usually called internally by JavaScript and not explicitly in code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/String/raw.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.raw()\n\nThe static **`String.raw()`** method is a tag function of [template literals](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). This is similar to the `r` prefix in Python, or the `@` prefix in C# for string literals. It's used to get the raw string form of template literals — that is, substitutions (e.g. `${foo}`) are processed, but escape sequences (e.g. `\\n`) are not.\n\n## Syntax\n\n```js\nString.raw(strings, ...substitutions)\n\nString.raw`templateString`\n```\n\n### Parameters\n\n- `strings`\n  - : Well-formed template literal array object, like `{ raw: ['foo', 'bar', 'baz'] }`. Should be an object with a `raw` property whose value is an array-like object of strings.\n- `...substitutions`\n  - : Contains substitution values.\n- `templateString`\n  - : A [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals), optionally with substitutions (`${...}`).\n\n### Return value\n\nThe raw string form of a given template literal.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if the first argument doesn't have a `raw` property, or the `raw` property is `undefined` or `null`.\n\n## Description\n\nIn most cases, `String.raw()` is used with template literals. The first syntax mentioned above is only rarely used, because the JavaScript engine will call this with proper arguments for you, (just like with other [tag functions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals#tagged_templates)).\n\n`String.raw()` is the only built-in template literal tag. It has close semantics to an untagged literal since it concatenates all arguments and returns a string. You can even re-implement it with normal JavaScript code.\n\n> **Warning:** You should not use `String.raw` directly as an \"identity\" tag. See [Building an identity tag](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/raw#building_an_identity_tag) for how to implement this.\n\nIf `String.raw()` is called with an object whose `raw` property doesn't have a `length` property or a non-positive `length`, it returns an empty string `\"\"`. If `substitutions.length < strings.raw.length - 1` (i.e. there are not enough substitutions to fill the placeholders — which can't happen in a well-formed tagged template literal), the rest of the placeholders are filled with empty strings.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/SubtleCrypto/SubtleCrypto.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SubtleCrypto\n\nThe **`SubtleCrypto`** interface provides a number of low-level cryptographic functions. Access to the features of `SubtleCrypto` is obtained through the [`crypto.subtle`](../crypto/subtle.mdx) property.\n\n> **Warning:** This API provides a number of low-level cryptographic primitives. It's very easy to misuse them, and the pitfalls involved can be very subtle.\n>\n> Even assuming you use the basic cryptographic functions correctly, secure key management and overall security system design are extremely hard to get right, and are generally the domain of specialist security experts.\n>\n> Errors in security system design and implementation can make the security of the system completely ineffective.\n>\n> Please learn and experiment, but don't guarantee or imply the security of your work before an individual knowledgeable in this subject matter thoroughly reviews it. The [Crypto 101 Course](https://www.crypto101.io/) can be a great place to start learning about the design and implementation of secure systems.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/SubtleCrypto/prototype/digest.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# digest()\n\nThe **`digest()`** method of the [`SubtleCrypto`](../SubtleCrypto.mdx)\ninterface generates a digest of the given data. A digest is a short\nfixed-length value derived from some variable-length input. Cryptographic digests should\nexhibit collision-resistance, meaning that it's hard to come up with two different\ninputs that have the same digest value.\n\nIt takes as its arguments an identifier for the digest algorithm to use and the data to\ndigest. It returns a [`Promise`](../../Promise/Promise.mdx) which will be fulfilled with the digest.\n\n## Syntax\n\n```js\ndigest(algorithm, data)\n```\n\n### Parameters\n\n- `algorithm`\n  - : This may be a string or an object with a single property `name` that is a string. The string names the hash function to use. Supported values are:\n    - `\"MD5\"` (but don't use this in cryptographic applications)\n    - `\"SHA-1\"` (but don't use this in cryptographic applications)\n    - `\"SHA-256\"`\n    - `\"SHA-384\"`\n    - `\"SHA-512\"`.\n- `data`\n  - : An `ArrayBuffer`, a `TypedArray` or a `DataView` object containing the data to be digested.\n\n### Return value\n\nA [`Promise`](../../Promise/Promise.mdx) that fulfills with an `ArrayBuffer` containing the digest.\n\n## Supported algorithms\n\nDigest algorithms, also known as cryptographic hash functions,\ntransform an arbitrarily large block of data into a fixed-size output,\nusually much shorter than the input. They have a variety of applications in\ncryptography.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/SubtleCrypto/prototype/importKey.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# importKey()\n\nThe **`importKey()`** method of the [`SubtleCrypto`](../SubtleCrypto.mdx)\ninterface imports a key: that is, it takes as input a key in an external, portable\nformat and gives you a [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) object that you can use.\n\nThe function accepts several import formats: see [Supported formats](#supported-formats) for details.\n\n## Syntax\n\n```js\nimportKey(format, keyData, algorithm, extractable, keyUsages)\n```\n\n### Parameters\n\n- `format`\n  - : A string describing the data format of the key to import. It can be one of the following:\n    - `raw`: [Raw](#raw) format.\n    - `jwk`: [JSON Web Key](#json-web-key) format.\n- `keyData`\n  - : An `ArrayBuffer`, a TypedArray, a `DataView`, or a `JSONWebKey` object containing the key in\n    the given format.\n- `algorithm`\n  - : An object defining the type of key to import and providing extra algorithm-specific parameters.\n    - For RSASSA-PKCS1-v1_5:\n      Pass an [`RsaHashedImportParams`](../../RsaHashedImportParams/RsaHashedImportParams.mdx) object.\n    - For HMAC:\n      Pass an [`HmacImportParams`](../../HmacImportParams/HmacImportParams.mdx) object.\n    - For ECDSA:\n      Pass an [`EcKeyImportParams`](../../EcKeyImportParams/EcKeyImportParams.mdx) object.\n- `extractable`\n  - : A boolean value indicating whether it will be possible to export the key.\n- `keyUsages`\n  - : An `Array` indicating what can be done with the key. Possible array values are:\n    - `encrypt`: The key may be used to encrypt messages.\n    - `decrypt`: The key may be used to decrypt messages.\n    - `sign`: The key may be used to sign messages.\n    - `verify`: The key may be used to verify signatures.\n    - `deriveKey`: The key may be used in deriving a new key.\n    - `deriveBits`: The key may be used in deriving bits.\n    - `wrapKey`: The key may be used to wrap a key.\n    - `unwrapKey`: The key may be used to unwrap a key.\n\n### Return value\n\nA [`Promise`](../../Promise/Promise.mdx)\nthat fulfills with the imported key as a [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) object.\n\n### Exceptions\n\nThe promise is rejected when one of the following exceptions is encountered:\n\n- `SyntaxError`\n  - : Raised when `keyUsages` is empty but the unwrapped key is of\n    type `secret` or `private`.\n- `TypeError`\n  - : Raised when trying to use an invalid format or if the `keyData`\n    is not suited for that format.\n\n## Supported formats\n\nThis API currently supports one key import/export format: JSON Web Key.\n\n### Raw\n\nYou can use this format to import or export AES or HMAC secret keys, or Elliptic Curve\npublic keys.\n\nIn this format the key is supplied as an `ArrayBuffer` containing the raw bytes for the key.\n\n\n### JSON Web Key\n\nYou can use JSON Web Key format to import or export RSA or Elliptic Curve public or\nprivate keys, as well as AES and HMAC secret keys.\n\nJSON Web Key format is defined in [RFC 7517](https://datatracker.ietf.org/doc/html/rfc7517).\nIt describes a way to represent public, private, and secret keys as JSON objects.\n\nA JSON Web Key looks something like this (this is an EC private key):\n\n```json\n{\n  \"crv\": \"P-384\",\n  \"d\": \"wouCtU7Nw4E8_7n5C1-xBjB4xqSb_liZhYMsy8MGgxUny6Q8NCoH9xSiviwLFfK_\",\n  \"ext\": true,\n  \"key_ops\": [\"sign\"],\n  \"kty\": \"EC\",\n  \"x\": \"SzrRXmyI8VWFJg1dPUNbFcc9jZvjZEfH7ulKI1UkXAltd7RGWrcfFxqyGPcwu6AQ\",\n  \"y\": \"hHUag3OvDzEr0uUQND4PXHQTXP5IDGdYhJhL-WLKjnGjQAw0rNGy5V29-aV-yseW\"\n};\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/SubtleCrypto/prototype/sign.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# sign()\n\nThe **`sign()`** method of the [`SubtleCrypto`](../SubtleCrypto.mdx) interface generates a digital signature.\n\nIt takes as its arguments a key to sign with, some algorithm-specific\nparameters, and the data to sign. It returns a `Promise` which will be\nfulfilled with the signature.\n\nYou can use the corresponding [`verify()`](./verify.mdx) method to verify the signature.\n\n## Syntax\n\n```js\nsign(algorithm, key, data)\n```\n\n### Parameters\n\n- `algorithm`\n  - : A string or object that specifies the signature algorithm to use and its parameters:\n    - To use [RSASSA-PKCS1-v1_5](#rsassa-pkcs1-v1_5), pass the string `\"RSASSA-PKCS1-v1_5\"` or an object of the form `{ \"name\": \"RSASSA-PKCS1-v1_5\" }`.\n    - To use [HMAC](#hmac), pass the string `\"HMAC\"` or an object of the form `{ \"name\": \"HMAC\" }`.\n- `key`\n  - : A [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) object containing the key to be used for signing.\n    If `algorithm` identifies a public-key cryptosystem, this is the private key.\n- `data`\n  - : An `ArrayBuffer`, a TypedArray or a `DataView` object containing the data to be signed.\n\n### Return value\n\nA `Promise` that fulfills with an `ArrayBuffer` containing the signature.\n\n### Exceptions\n\nThe promise is rejected when the following exception is encountered:\n\n- `InvalidAccessError`\n  - : Raised when the signing key is not a key for the request signing algorithm or when\n    trying to use an algorithm that is either unknown or isn't suitable for signing.\n\n## Supported algorithms\n\n### RSASSA-PKCS1-v1_5\n\nThe RSASSA-PKCS1-v1_5 algorithm is specified in [RFC 3447](https://datatracker.ietf.org/doc/html/rfc3447).\n\n### HMAC\n\nThe HMAC algorithm calculates and verifies hash-based message authentication codes according to the\n[FIPS 198-1 standard](https://csrc.nist.gov/csrc/media/publications/fips/198/1/final/documents/fips-198-1_final.pdf).\n\nThe digest algorithm to use is specified in the\n[`HmacImportParams`](../../HmacImportParams/HmacImportParams.mdx) object\nthat you pass into [`SubtleCrypto.importKey()`](./importKey.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/SubtleCrypto/prototype/verify.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# verify()\n\nThe **`verify()`** method verifies a digital signature.\n\nIt takes as its arguments a key to verify the signature with, some algorithm-specific parameters, the signature, and the original signed data.\nIt returns a `Promise` which will be fulfilled with a boolean value indicating whether the signature is valid.\n\n## Syntax\n\n```js\nverify(algorithm, key, signature, data)\n```\n\n### Parameters\n\n- `algorithm`\n  - : A string or object defining the algorithm to use, and for some algorithm choices, some extra parameters.\n    The values given for the extra parameters must match those passed into the corresponding [`sign()`](./sign.mdx) call.\n    - To use RSASSA-PKCS1-v1_5, pass the string `\"RSASSA-PKCS1-v1_5\"` or an object of the form `{ \"name\": \"RSASSA-PKCS1-v1_5\" }`.\n    - To use HMAC, pass the string `\"HMAC\"` or an object of the form `{ \"name\": \"HMAC\" }`.\n- `key`\n  - : A [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) containing the key that will be used to verify the signature.\n    It is the secret key for a symmetric algorithm and the public key for a public-key system.\n- `signature`\n  - : A `ArrayBuffer` containing the signature to verify.\n- `data`\n  - : A `ArrayBuffer` containing the data whose signature is to be verified.\n\n### Return value\n\nA `Promise` that fulfills with a\nboolean value: `true` if the signature is valid, `false`\notherwise.\n\n### Exceptions\n\nThe promise is rejected when the following exception is encountered:\n\n- `InvalidAccessError`\n  - : Raised when the encryption key is not a key for the requested verifying algorithm or\n    when trying to use an algorithm that is either unknown or isn't suitable for a verify\n    operation.\n\n## Supported algorithms\n\nThe `verify()` method supports the same algorithms as the [`sign()`](./sign.mdx) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Symbol/Symbol.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol()\n\nThe `Symbol()` constructor returns a value of type **symbol**,\nbut is incomplete as a constructor because it does not support the syntax\n\"`new Symbol()`\" and it is not intended to be subclassed. It may be used as\nthe value of an\n[`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends)\nclause of a `class` definition but a\n[`super`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/super)\ncall to it will cause an exception.\n\n## Syntax\n\n```js\nSymbol()\nSymbol(description)\n```\n\n> **Note:** `Symbol()` can only be called without `new`. Attempting to construct it with `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `description` _**optional**_\n  - : A string. A description of the symbol which can be used for debugging but not to\n    access the symbol itself.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Symbol/asyncIterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.asyncIterator\n\nThe **`Symbol.asyncIterator`** well-known symbol specifies the default [async iterator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_async_iterator_and_async_iterable_protocols) for an object. If this property is set on an object, it is an async iterable and can be used in a [`for await...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for-await...of) loop.\n\n## Value\n\nThe well-known symbol `Symbol.asyncIterator`.\n\n## Description\n\nThe `Symbol.asyncIterator` symbol is a builtin symbol that is used to access an object's `Symbol.asyncIterator` method. In order for an object to be async iterable, it must have a `Symbol.asyncIterator` key.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Symbol/for.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.for()\n\nThe **`Symbol.for(key)`** method searches for existing symbols\nin a runtime-wide symbol registry with the given key and returns it if found. Otherwise\na new symbol gets created in the global symbol registry with this key.\n\n## Syntax\n\n```js\nSymbol.for(key)\n```\n\n### Parameters\n\n- `key`\n  - : String, required. The key for the symbol (and also used for the description of the\n    symbol).\n\n### Return value\n\nAn existing symbol with the given key if found; otherwise, a new symbol is created and\nreturned.\n\n## Description\n\nIn contrast to `Symbol()`, the `Symbol.for()` function creates a\nsymbol available in a [global symbol registry](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol#shared_symbols_in_the_global_symbol_registry) list. `Symbol.for()` does also\nnot necessarily create a new symbol on every call, but checks first if a symbol with the\ngiven `key` is already present in the registry. In that case, that symbol is\nreturned. If no symbol with the given key is found, `Symbol.for()` will\ncreate a new global symbol.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Symbol/hasInstance.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.hasInstance\n\nThe **`Symbol.hasInstance`** well-known symbol is used to determine if a constructor object recognizes an object as its instance. The `instanceof` operator's behavior can be customized by this symbol.\n\n## Value\n\nThe well-known symbol `Symbol.hasInstance`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Symbol/isConcatSpreadable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.isConcatSpreadable\n\nThe **`Symbol.isConcatSpreadable`** well-known symbol is used to configure if an object should be flattened to its array elements when using the [`Array.prototype.concat()`](../../globals/Array/prototype/concat.mdx) method.\n\n## Value\n\nThe well-known symbol `Symbol.isConcatSpreadable`.\n\n## Description\n\nThe `Symbol.isConcatSpreadable` symbol (`Symbol.isConcatSpreadable`) can be defined as an own or inherited property and its value is a boolean. It can control behavior for arrays and array-like objects:\n\n- For array objects, the default behavior is to spread (flatten) elements. `Symbol.isConcatSpreadable` can avoid flattening in these cases.\n- For array-like objects, the default behavior is no spreading or flattening. `Symbol.isConcatSpreadable` can force flattening in these cases.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Symbol/iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.iterator\n\nThe well-known **`Symbol.iterator`** symbol specifies the default iterator for an object. Used by [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of).\n\n## Value\n\nThe well-known symbol `Symbol.iterator`.\n\n## Description\n\nWhenever an object needs to be iterated (such as at the beginning of a `for...of` loop), its `Symbol.iterator` method is called with no arguments, and the returned **iterator** is used to obtain the values to be iterated.\n\nSome built-in types have a default iteration behavior, while other types (such as `Object`) do not. The built-in types with a `Symbol.iterator` method are:\n\n- [`Array.prototype[Symbol.iterator]()`](../../globals/Array/prototype/@@iterator.mdx)\n- [`String.prototype[Symbol.iterator]()`](../../globals/String/prototype/@@iterator.mdx)\n- [`Map.prototype[Symbol.iterator]()`](../../globals/Map/prototype/@@iterator.mdx)\n- [`Set.prototype[Symbol.iterator]()`](../../globals/Set/prototype/@@iterator.mdx)\n\nSee also [Iteration protocols](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) for more information.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Symbol/keyFor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.keyFor()\n\nThe **`Symbol.keyFor(sym)`** method retrieves a shared symbol\nkey from the global symbol registry for the given symbol.\n\n## Syntax\n\n```js\nSymbol.keyFor(sym)\n```\n\n### Parameters\n\n- `sym`\n  - : Symbol, required. The symbol to find a key for.\n\n### Return value\n\nA string representing the key for the given symbol if one is found on the [global registry](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol#shared_symbols_in_the_global_symbol_registry); otherwise, [`undefined`](../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Symbol/match.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.match\n\nThe **`Symbol.match`** well-known symbol specifies the matching of a regular expression against a string. This function is called by the [`String.prototype.match()`](../../globals/String/prototype/match.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.match]()` and [`String.prototype.match()`](../../globals/String/prototype/match.mdx).\n\n## Value\n\nThe well-known symbol `Symbolmatch`.\n\n## Description\n\nThis function is also used to identify [if objects have the behavior of regular expressions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes). For example, the methods [`String.prototype.startsWith()`](../../globals/String/prototype/startsWith.mdx), [`String.prototype.endsWith()`](../../globals/String/prototype/endsWith.mdx) and [`String.prototype.includes()`](../../globals/String/prototype/includes.mdx), check if their first argument is a regular expression and will throw a [`TypeError`](../../globals/TypeError/TypeError.mdx) if they are. Now, if the `match` symbol is set to `false` (or a [Falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value except `undefined`), it indicates that the object is not intended to be used as a regular expression object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Symbol/matchAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.matchAll\n\nThe **`Symbol.matchAll`** well-known symbol specifies the method that returns an iterator, that yields matches of the regular expression against a string. This function is called by the [`String.prototype.matchAll()`](../../globals/String/prototype/matchAll.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.matchAll]()` and [`String.prototype.matchAll()`](../../globals/String/prototype/matchAll.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.matchAll`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Symbol/prototype/@@toPrimitive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype[Symbol.toPrimitive]\n\nThe **`[Symbol.toPrimitive]()`** method converts a Symbol object to\na primitive value.\n\n## Syntax\n\n```js\nSymbol()[Symbol.toPrimitive](hint)\n```\n\n### Return value\n\nThe primitive value of the specified `Symbol` object.\n\n## Description\n\nThe `[Symbol.toPrimitive]()` method of `Symbol` returns the primitive\nvalue of a Symbol object as a Symbol data type. The `hint`\nargument is not used.\n\nJavaScript calls the `[Symbol.toPrimitive]()` method to convert an object to a\nprimitive value. You rarely need to invoke the `[Symbol.toPrimitive]()` method\nyourself; JavaScript automatically invokes it when encountering an object where a\nprimitive value is expected.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Symbol/prototype/description.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype.description\n\nThe read-only **`description`** property is a string returning the optional description of `Symbol` objects.\n\n## Description\n\n`Symbol` objects can be created with an optional description which can be used for debugging but not to access the symbol itself. The `Symbol.prototype.description` property can be used to read that description. It is different to `Symbol.prototype.toString()` as it does not contain the enclosing `\"Symbol()\"` string. See the examples.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Symbol/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified symbol value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified symbol value.\n\n## Description\n\nThe `Symbol` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For `Symbol` values, the `toString` method returns a descriptive string in the form `\"Symbol(description)\"`, where `description` is the symbol's [`Symbol.prototype.description`](../../../globals/Symbol/prototype/description.mdx).\n\nThe `toString()` method requires its `this` value to be a `Symbol` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to symbol values.\n\nBecause `Symbol` has a [`[Symbol.toPrimitive]()`](../../../globals/Symbol/toPrimitive.mdx) method, that method always takes priority over `toString()` when a `Symbol` object is [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). However, because `Symbol.prototype[Symbol.toPrimitive]()` returns a symbol primitive, and symbol primitives throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when implicitly converted to a string, the `toString()` method is never implicitly called by the language. To stringify a symbol, you must explicitly call its `toString()` method or use the [`String()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/String#using_string_to_stringify_a_symbol) function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Symbol/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a Symbol object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nThe primitive value of the specified `Symbol` object.\n\n## Description\n\nThe `valueOf()` method of `Symbol` returns the primitive value of a Symbol object as a Symbol data type.\n\nJavaScript calls the `valueOf()` method to convert an object to a primitive value. You rarely need to invoke the `valueOf()` method yourself; JavaScript automatically invokes it when encountering an object where a primitive value is expected.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Symbol/replace.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.replace\n\nThe **`Symbol.replace`** well-known symbol specifies the method that replaces matched substrings of a string. This function is called by the [`String.prototype.replace()`](../../globals/String/prototype/replace.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.replace]()` and [`String.prototype.replace()`](../../globals/String/prototype/replace.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.replace`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Symbol/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.search\n\nThe **`Symbol.search`** well-known symbol specifies the method that returns the index within a string that matches the regular expression. This function is called by the [`String.prototype.search()`](../../globals/String/prototype/search.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.search]()` and [`String.prototype.search()`](../../globals/String/prototype/search.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.search`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Symbol/species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.species\n\nThe well-known symbol **`Symbol.species`** specifies a function-valued property that the constructor function uses to create derived objects.\n\n> **Warning:** The existence of `Symbol.species` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Value\n\nThe well-known symbol `Symbol.species`.\n\n## Description\n\nThe `Symbol.species` accessor property allows subclasses to override the default constructor for objects. This specifies a protocol about how instances should be copied. For example, when you use copying methods of arrays, such as [`Array.prototype.map()`](../../globals/Array/prototype/map.mdx). the `map()` method uses `instance.constructor[Symbol.species]` to get the constructor for constructing the new array.\n\nAll built-in implementations of `Symbol.species` return the `this` value, which is the current instance's constructor. This allows copying methods to create instances of derived classes rather than the base class — for example, `map()` will return an array of the same type as the original array.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Symbol/split.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.split\n\nThe **`Symbol.split`** well-known symbol specifies the method that splits a string at the indices that match a regular expression. This function is called by the [`String.prototype.split()`](../../globals/String/prototype/split.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.split]()` and [`String.prototype.split()`](../../globals/String/prototype/split.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.split`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Symbol/toPrimitive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.toPrimitive\n\nThe **`Symbol.toPrimitive`** well-known symbol specifies a method that accepts a preferred type and returns a primitive representation of an object. It is called in priority by all [type coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) algorithms.\n\n## Value\n\nThe well-known symbol `Symbol.toPrimitive`.\n\n## Description\n\nWith the help of the `Symbol.toPrimitive` property (used as a function value), an object can be converted to a primitive value. The function is called with a string argument `hint`, which specifies the preferred type of the result primitive value. The `hint` argument can be one of `\"number\"`, `\"string\"`, and `\"default\"`.\n\nThe `\"number\"` hint is used by [numeric coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#numeric_coercion) algorithms. The `\"string\"` hint is used by the [string coercion](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) algorithm. The `\"default\"` hint is used by the [primitive coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion) algorithm. The `hint` only acts as a weak signal of preference, and the implementation is free to ignore it (as [`Symbol.prototype[Symbol.toPrimitive]()`](../../globals/Symbol/prototype/@@toPrimitive.mdx) does). The language does not enforce alignment between the `hint` and the result type, although `[Symbol.toPrimitive]()` must return a primitive, or a [`TypeError`](../../globals/TypeError/TypeError.mdx) is thrown.\n\nObjects without the `Symbol.toPrimitive` property are converted to primitives by calling the `valueOf()` and `toString()` methods in different orders, which is explained in more detail in the [type coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) section. `Symbol.toPrimitive` allows full control over the primitive conversion process. For example, `Symbol.prototype.toString()` won't be called, and `Symbol` objects must always be explicitly converted to strings through [`String()`](../../globals/String/String.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Symbol/toStringTag.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.toStringTag\n\nThe **`Symbol.toStringTag`** well-known symbol is a string valued property that is used in the creation of the default string description of an object. It is accessed internally by the [`Object.prototype.toString()`](../../globals/Object/prototype/toString.mdx) method.\n\n## Value\n\nThe well-known symbol `Symbol.toStringTag`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Symbol/unscopables.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.unscopables\n\nThe **`Symbol.unscopables`** well-known symbol is used to specify an object value of whose own and inherited property names are excluded from the [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) environment bindings of the associated object.\n\n## Value\n\nThe well-known symbol `@@unscopables`.\n\n## Description\n\nThe `@@unscopables` symbol (accessed via `Symbol.unscopables`) can be defined on any object to exclude property names from being exposed as lexical variables in [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) environment bindings. Note that when using [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), `with` statements are not available, and this symbol is likely not needed.\n\nSetting a property of the `@@unscopables` object to `true` (or any [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value) will make the corresponding property of the `with` scope object _unscopable_ and therefore won't be introduced to the `with` body scope. Setting a property to `false` (or any [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value) will make it _scopable_ and thus appear as lexical scope variables.\n\nWhen deciding whether `x` is unscopable, the entire prototype chain of the `@@unscopables` property is looked up for a property called `x`. This means if you declared `@@unscopables` as a plain object, `Object.prototype` properties like [`toString`](../../globals/Object/prototype/toString.mdx) would become unscopable as well, which may cause backward incompatibility for legacy code assuming those properties are normally scoped (see [an example here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/unscopables#avoid_using_a_non-null-prototype_object_as_symbol.unscopables)). You are advised to make your custom `@@unscopables` property have `null` as its prototype, like [`Array.prototype[Symbol.unscopables]`](../../globals/Array/prototype/@@unscopables.mdx) does.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/SyntaxError/SyntaxError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SyntaxError\n\nThe **`SyntaxError`** constructor creates a new error object\nthat represents an error when trying to interpret syntactically invalid code.\n\n## Syntax\n\n```js\nnew SyntaxError()\nnew SyntaxError(message)\nnew SyntaxError(message, options)\nnew SyntaxError(message, fileName)\nnew SyntaxError(message, fileName, lineNumber)\n\nSyntaxError()\nSyntaxError(message)\nSyntaxError(message, options)\nSyntaxError(message, fileName)\nSyntaxError(message, fileName, lineNumber)\n```\n\n> **Note:** `SyntaxError()` can be called with or without `new`. Both create a new `SyntaxError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/TextDecoder/TextDecoder.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder()\n\nThe **`TextDecoder()`** constructor returns a newly created `TextDecoder` object for the encoding specified in parameter.\n\n## Syntax\n\n```js\nnew TextDecoder()\nnew TextDecoder(label)\nnew TextDecoder(label, options)\n```\n\n### Parameters\n\n- `label` _**optional**_\n  - : A string, defaulting to `\"utf-8\"`.\n- `options` _**optional**_\n\n  - : An object with the property:\n\n    - `fatal`\n      - : A boolean value indicating if the `TextDecoder.decode()` method must throw a `TypeError` when decoding invalid data.\n        It defaults to `false`, which means that the decoder will substitute malformed data with a replacement character.\n\n    - `ignoreBOM`\n      - : A boolean value indicating whether the [byte order mark](https://www.w3.org/International/questions/qa-byte-order-mark) is ignored.\n        It defaults to `false`.\n\n### Exceptions\n\n- `RangeError`\n  - : Thrown if the value of `label` is unknown, or is one of the values leading to a `'replacement'` decoding algorithm (`\"iso-2022-cn\"` or `\"iso-2022-cn-ext\"`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/TextDecoder/prototype/decode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.decode()\n\nThe **`TextDecoder.decode()`** method returns a string containing text decoded from the buffer passed as a parameter.\n\nThe decoding method is defined in the current `TextDecoder` object.\nThis includes the expected encoding of the data, and how decoding errors are handled.\n\n## Syntax\n\n```js\ndecode()\ndecode(buffer)\ndecode(buffer, options)\n```\n\n### Parameters\n\n- `buffer` _**optional**_\n  - : Is an `ArrayBuffer`, a `TypedArray` or a `DataView` object containing the encoded text to decode.\n- `options` _**optional**_\n\n  - : An object with the property:\n\n    - `stream`\n      - : A boolean flag indicating that additional data will follow in subsequent calls to `decode()`.\n        Set to `true` if processing the data in chunks, and `false` for the final chunk or if the data is not chunked.\n        It defaults to `false`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if there is a decoding error when the property `TextDecoder.fatal` is `true`.\n\n### Return value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/TextDecoder/prototype/encoding.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.encoding\n\nThe **`TextDecoder.encoding`** read-only property returns a string containing the name of the decoding algorithm used by the specific decoder object.\n\nThe encoding is set by the constructor `label` parameter, and defaults to `utf-8`.\n\n## Value\n\nA lower-cased ASCII string, which can be one of the following values:\n\n- The recommended encoding for the Web: `'utf-8'`.\n- The legacy single-byte encodings:\n  ['ibm866'](https://en.wikipedia.org/wiki/Code_page_866),\n  ['iso-8859-2'](https://en.wikipedia.org/wiki/ISO/IEC_8859-2),\n  ['iso-8859-3'](https://en.wikipedia.org/wiki/ISO/IEC_8859-3),\n  ['iso-8859-4'](https://en.wikipedia.org/wiki/ISO/IEC_8859-4),\n  ['iso-8859-5'](https://en.wikipedia.org/wiki/ISO/IEC_8859-5),\n  ['iso-8859-6'](https://en.wikipedia.org/wiki/ISO/IEC_8859-6),\n  ['iso-8859-7'](https://en.wikipedia.org/wiki/ISO/IEC_8859-7),\n  ['iso-8859-8'](https://en.wikipedia.org/wiki/ISO/IEC_8859-8)'`,\n  ['iso-8859-8i'](https://en.wikipedia.org/wiki/ISO-8859-8-I),\n  ['iso-8859-10'](https://en.wikipedia.org/wiki/ISO/IEC_8859-10),\n  ['iso-8859-13'](https://en.wikipedia.org/wiki/ISO/IEC_8859-13),\n  ['iso-8859-14'](https://en.wikipedia.org/wiki/ISO/IEC_8859-14),\n  ['iso-8859-15'](https://en.wikipedia.org/wiki/ISO/IEC_8859-15),\n  ['iso-8859-16'](https://en.wikipedia.org/wiki/ISO/IEC_8859-16),\n  ['koi8-r'](https://en.wikipedia.org/wiki/KOI8-R),\n  ['koi8-u'](https://en.wikipedia.org/wiki/KOI8-U),\n  ['macintosh'](https://en.wikipedia.org/wiki/Mac_OS_Roman),\n  ['windows-874'](https://en.wikipedia.org/wiki/Windows-874),\n  ['windows-1250'](https://en.wikipedia.org/wiki/Windows-1250),\n  ['windows-1251'](https://en.wikipedia.org/wiki/Windows-1251),\n  ['windows-1252'](https://en.wikipedia.org/wiki/Windows-1252),\n  ['windows-1253'](https://en.wikipedia.org/wiki/Windows-1253),\n  ['windows-1254'](https://en.wikipedia.org/wiki/Windows-1254),\n  ['windows-1255'](https://en.wikipedia.org/wiki/Windows-1255),\n  ['windows-1256'](https://en.wikipedia.org/wiki/Windows-1256),\n  ['windows-1257'](https://en.wikipedia.org/wiki/Windows-1257),\n  ['windows-1258'](https://en.wikipedia.org/wiki/Windows-1258), or\n  ['x-mac-cyrillic'](https://en.wikipedia.org/wiki/Macintosh_Cyrillic_encoding).\n- The legacy multi-byte Chinese (simplified) encodings:\n  ['gbk'](https://en.wikipedia.org/wiki/GBK),\n  ['gb18030'](https://en.wikipedia.org/wiki/GB_18030)\n- The legacy multi-byte Chinese (traditional) encoding:\n  ['big5'](https://en.wikipedia.org/wiki/Big5).\n- The legacy multi-byte Japanese encodings:\n  ['euc-jp'](https://en.wikipedia.org/wiki/Extended_Unix_Code#EUC-JP),\n  ['iso-2022-jp'](https://en.wikipedia.org/wiki/ISO/IEC_2022#ISO-2022-JP),\n  ['shift-jis'](https://en.wikipedia.org/wiki/Shift_JIS).\n- The legacy multi-byte Korean encodings:\n  ['euc-kr'](https://en.wikipedia.org/wiki/Extended_Unix_Code#EUC-KR)\n- The legacy miscellaneous encodings:\n  ['utf-16be'](https://en.wikipedia.org/wiki/UTF-16#Byte_order_encoding_schemes),\n  ['utf-16le'](https://en.wikipedia.org/wiki/UTF-16#Byte_order_encoding_schemes),\n  `'x-user-defined'`.\n- A special encoding, `'replacement'`.\n  This decodes empty input into empty output and any other arbitrary-length input into a single replacement character.\n  It is used to prevent attacks that mismatch encodings between the client and server.\n  The following encodings also map to the replacement encoding: `ISO-2022-CN`, `ISO-2022-CN-ext`, ['iso-2022-kr'](https://en.wikipedia.org/wiki/ISO/IEC_2022#ISO-2022-KR) and ['hz-gb-2312'](https://en.wikipedia.org/wiki/HZ_(character_encoding)).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/TextDecoder/prototype/fatal.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.fatal\n\nThe **`fatal`** read-only property of the `TextDecoder` interface is a `Boolean` indicating whether the error mode is fatal.\n\nIf the property is `true` then a decoder will throw a `TypeError` if it encounters malformed data while decoding.\nIf `false` the decoder will substitute the invalid data with the replacement character `U+FFFD` (�).\nThe value of the property is set in the `TextDecoder()` constructor.\n\n## Value\n\nA `boolean` which will return `true` if the error mode is set to `fatal`.\nOtherwise it returns `false`, indicating that the error mode is \"replacement\".\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/TextDecoder/prototype/ignoreBOM.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.ignoreBOM\n\nThe **`ignoreBOM`** read-only property of the `TextDecoder` interface is a `Boolean` indicating whether the [byte order mark](https://www.w3.org/International/questions/qa-byte-order-mark) is ignored.\n\n## Value\n\n`true` if the byte order mark is ignored; `false` otherwise.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/TextEncoder/TextEncoder.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextEncoder()\n\nThe **`TextEncoder()`** constructor returns a newly created `TextEncoder` object that will generate a byte stream with UTF-8 encoding.\n\n## Syntax\n\n```js\nnew TextEncoder()\n```\n\n### Parameters\n\nNone.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/TextEncoder/prototype/encode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextEncoder.encode()\n\nThe **`TextEncoder.encode()`** method takes a string as input, and returns a `Uint8Array` containing the text given in parameters encoded with the specific method for that `TextEncoder` object.\n\n## Syntax\n\n```js\nencode(string)\n```\n\n### Parameters\n\n- `string`\n  - : A string containing the text to encode.\n\n### Return value\n\nA `Uint8Array` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/TextEncoder/prototype/encoding.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextEncoder.encoding\n\nThe **`TextEncoder.encoding`** read-only property returns a string containing the name of the encoding algorithm used by the specific encoder.\n\nIt can only have the following value `utf-8`.\n\n## Value\n\nA string with the value `utf-8`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/TransformStream/TransformStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStream()\n\nThe **`TransformStream()`** constructor creates a new `TransformStream` object which represents a pair of streams: a `WritableStream` representing the writable side, and a `ReadableStream` representing the readable side.\n\n## Syntax\n\n```js\nnew TransformStream()\nnew TransformStream(transformer)\nnew TransformStream(transformer, writableStrategy)\nnew TransformStream(transformer, writableStrategy, readableStrategy)\n```\n\n### Parameters\n\n- `transformer` _**optional**_\n\n  - : An object representing the `transformer`. If not supplied the resulting stream will be an **identity transform stream** which forwards all chunks written to its writable side to its readable side, without any changes.\n\n    The transformer object can contain any of the following methods. In each method `controller` is an instance of `TransformStreamDefaultController`.\n\n    - `start(controller)`\n      - : Called when the `TransformStream` is constructed. It is typically used to enqueue chunks using `TransformStreamDefaultController.enqueue()`.\n    - `transform(chunk, controller)`\n      - : Called when a chunk written to the writable side is ready to be transformed, and performs the work of the transformation stream. If no `transform()` method is supplied, the identity transform is used, and the chunk will be enqueued with no changes.\n    - `flush(controller)`\n      - : Called after all chunks written to the writable side have been successfully transformed, and the writable side is about to be closed.\n\n- `writableStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer. This defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk`. This indicates the size to\n        use for each chunk, in bytes.\n\n- `readableStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer. This defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk`. This indicates the size to\n        use for each chunk, in bytes.\n\n> **Note:** You could define your own custom\n> `readableStrategy` or `writableStrategy`, or use an instance of\n> `ByteLengthQueuingStrategy` or `CountQueuingStrategy`\n> for the object values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/TransformStream/prototype/readable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStream.readable\n\nThe **`readable`** read-only property of the `TransformStream` interface returns the `ReadableStream` instance controlled by this `TransformStream`.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/TransformStream/prototype/writable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStream.writable\n\nThe **`writable`** read-only property of the `TransformStream` interface returns the `WritableStream` instance controlled by this `TransformStream`.\n\n## Value\n\nA `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/TransformStreamDefaultController/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.desiredSize\n\nThe **`desiredSize`** read-only property of the `TransformStreamDefaultController` interface returns the desired size to fill the queue of the associated [`ReadableStream`](../../../globals/ReadableStream/ReadableStream.mdx).\n\nThe internal queue of a `ReadableStream` contains chunks that have been enqueued, but not yet read.\n\nIf the `desiredSize` is `0` then the queue is full. Therefore you can use this information to manually apply backpressure to manage the queue.\n\n## Value\n\nThe desired size.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/TransformStreamDefaultController/prototype/enqueue.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.enqueue()\n\nThe **`enqueue()`** method of the `TransformStreamDefaultController` interface enqueues the given chunk in the readable side of the stream.\n\n## Syntax\n\n```js\nenqueue(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : The chunk being queued. A chunk is a single piece of data. It can be any type of data, and a stream can contain chunks of different types.\n\n### Return value\n\nNone `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream is not readable.\n    This might occur if the stream is errored via `controller.error()`, or when it is closed without its controller's `controller.close()` method ever being called.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/TransformStreamDefaultController/prototype/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.error()\n\nThe **`error()`** method of the `TransformStreamDefaultController` interface errors both sides of the stream. Any further interactions with it will fail with the given error message, and any chunks in the queue will be discarded.\n\n## Syntax\n\n```js\nerror(reason)\n```\n\n### Parameters\n\n- `reason`\n  - : A string containing the error message to be returned on any further interaction with the stream.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/TransformStreamDefaultController/prototype/terminate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.terminate()\n\nThe **`terminate()`** method of the `TransformStreamDefaultController` interface closes the readable side and errors the writable side of the stream.\n\n## Syntax\n\n```js\nterminate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone (`undefined`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/TypeError/TypeError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TypeError\n\nThe **`TypeError()`** constructor creates a new error when an\noperation could not be performed, typically (but not exclusively) when a value is not of\nthe expected type.\n\n## Syntax\n\n```js\nnew TypeError()\nnew TypeError(message)\nnew TypeError(message, options)\nnew TypeError(message, fileName)\nnew TypeError(message, fileName, lineNumber)\n\nTypeError()\nTypeError(message)\nTypeError(message, options)\nTypeError(message, fileName)\nTypeError(message, fileName, lineNumber)\n```\n\n> **Note:** `TypeError()` can be called with or without `new`. Both create a new `TypeError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/URIError/URIError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URIError\n\nThe **`URIError()`** constructor creates an error when a global\nURI handling function was used in a wrong way.\n\n## Syntax\n\n```js\nnew URIError()\nnew URIError(message)\nnew URIError(message, options)\nnew URIError(message, fileName)\nnew URIError(message, fileName, lineNumber)\n\nURIError()\nURIError(message)\nURIError(message, options)\nURIError(message, fileName)\nURIError(message, fileName, lineNumber)\n```\n\n> **Note:** `URIError()` can be called with or without `new`. Both create a new `URIError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/URL/URL.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL()\n\nThe **`URL()`** constructor returns a newly created\n`URL` object representing the URL defined by the parameters.\n\nIf the given base URL or the resulting URL are not valid URLs, the JavaScript\n`TypeError` exception is thrown.\n\n## Syntax\n\n```js\nnew URL(url)\nnew URL(url, base)\n```\n\n### Parameters\n\n- `url`\n  - : A string or any other object with a `toString()` method.\n    If `url` is a relative URL, `base` is\n    required, and will be used as the base URL. If `url` is an\n    absolute URL, a given `base` will be ignored.\n- `base` _**optional**_\n  - : A string representing the base URL to use in cases where\n    `url` is a relative URL. If not specified, it defaults to\n    `undefined`.\n\n> **Note:** The `url` and `base` arguments will\n> each be stringified from whatever value you pass, just like with other Web APIs\n> that accept a string. In particular, you can use an existing\n> `URL` object for either argument, and it will stringify to the\n> object's `URL.href\", \"href` property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/URL/prototype/hash.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.hash\n\nThe **`hash`** property of the\n`URL` interface is a string containing a\n`'#'` followed by the fragment identifier of the URL.\n\nThe fragment is not percent-decoded. If the URL does not\nhave a fragment identifier, this property contains an empty string — `\"\"`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/URL/prototype/host.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.host\n\nThe **`host`** property of the `URL` interface is\na string containing the host, that is the `URL.hostname`, and then, if the `port` of the URL is nonempty, a\n`':'`, followed by the `port` of the URL.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/URL/prototype/hostname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.hostname\n\nThe **`hostname`** property of the `URL` interface\nis a string containing the domain name of the URL.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/URL/prototype/href.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.href\n\nThe **`href`** property of the `URL` interface is\na string containing the whole URL.\n\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/URL/prototype/origin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.origin\n\nThe **`origin`** read-only property of\nthe `URL` interface returns a string containing the\nUnicode serialization of the origin of the represented URL.\n\nThe exact structure\nvaries depending on the type of URL:\n\n- For `http` or `https` URLs, the scheme followed by\n  `'://'`, followed by the domain, followed by `':'`, followed by\n  the port (the default port, `80` and `443` respectively, if\n  explicitly specified).\n- For `file:` URLs, the value is browser dependent.\n- for `blob:` URLs, the origin of the URL following `blob:` will\n  be used. For example, `\"blob:https://mozilla.org\"` will be returned as\n  `\"https://mozilla.org\".`\n\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/URL/prototype/password.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.password\n\nThe **`password`** property of the `URL` interface\nis a string containing the password specified before the domain name.\n\nIf it is set without first setting the `URL.username` property, it silently fails.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/URL/prototype/pathname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.pathname\n\nThe **`pathname`** property of the `URL` interface represents a location in a hierarchical structure. It is a string constructed from a list of path segments, each of which is prefixed by a `/` character. If the URL has no path segments, the value of its `pathname` property will be the empty string.\n\nURLs such as `https` and `http` URLs that have [hierarchical schemes](https://www.rfc-editor.org/rfc/rfc3986#section-1.2.3) (which the URL standard calls \"[special schemes](https://url.spec.whatwg.org/#special-scheme)\") always have at least one (invisible) path segment: the empty string. Thus the `pathname` value for such \"special scheme\" URLs can never be the empty string, but will instead always have a least one `/` character.\n\nFor example, the URL `https://developer.mozilla.org` has just one path segment: the empty string, so its `pathname` value is constructed by prefixing a `/` character to the empty string.\n\nSome systems define the term _slug_ to mean the final segment of a non-empty path if it identifies a page in human-readable keywords. For example, the URL `https://example.org/articles/this-that-other-outre-collection` has `this-that-other-outre-collection` as its slug.\n\nSome systems use the `;` and `=` characters to delimit parameters and parameter values applicable to a path segment. For example, with the URL `https://example.org/users;id=42/tasks;state=open?sort=modified`, a system might extract and use the path segment parameters `id=42` and `state=open` from the path segments `users;id=42` and `tasks;state=open`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/URL/prototype/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.port\n\nThe **`port`** property of the `URL` interface is\na string containing the port number of the URL.\n\n> **Note:** If an input string passed to the `URL()` constructor doesn't contain an explicit port number (e.g., `https://localhost`) or contains a port number that's the default port number corresponding to the protocol part of the input string (e.g., `https://localhost:443`), then in the `URL` object the constructor returns, the value of the port property will be the empty string: `''`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/URL/prototype/protocol.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.protocol\n\nThe **`protocol`** property of the `URL` interface\nis a string representing the protocol scheme of the URL, including the\nfinal `':'`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/URL/prototype/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.search\n\nThe **`search`** property of the `URL` interface\nis a search string, also called a _query string_, that is a\nstring containing a `'?'` followed by the parameters of the\nURL.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/URL/prototype/searchParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.searchParams\n\nThe **`searchParams`** readonly property of the\n`URL` interface returns a `URLSearchParams` object allowing\naccess to the `GET` decoded query arguments contained in the URL.\n\n## Value\n\nA `URLSearchParams` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/URL/prototype/toJSON.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.toJSON()\n\nThe **`toJSON()`** method of the `URL` interface\nreturns a string containing a serialized version of the URL,\nalthough in practice it seems to have the same effect as\n`URL.toString()`.\n\n## Syntax\n\n```js\ntoJSON()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/URL/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.toString()\n\nThe **`URL.toString()`** method returns a\nstring containing the whole URL. It is effectively a read-only version\nof `URL.prototype.href`.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/URL/prototype/username.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.username\n\nThe **`username`** property of the `URL` interface\nis a string containing the username specified before the domain name.\n\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/URLSearchParams/URLSearchParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams()\n\nThe **`URLSearchParams()`** constructor creates and returns a\nnew `URLSearchParams` object.\n\n\n\n## Syntax\n\n```js\nnew URLSearchParams()\nnew URLSearchParams(options)\n```\n\n### Parameters\n\n- `options` _**optional**_\n  - : One of:\n    - A string, which will be parsed from `application/x-www-form-urlencoded` format. A leading `'?'` character is ignored.\n    - A literal sequence of name-value string pairs, or any object with an iterator that produces a sequence of string pairs.\n    - A record of string keys and string values. Note that nesting is not supported.\n\n### Return value\n\nA `URLSearchParams` object instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/URLSearchParams/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.append()\n\nThe **`append()`** method of the `URLSearchParams`\ninterface appends a specified key/value pair as a new search parameter.\n\nAs shown in the example below, if the same key is appended multiple times it will\nappear in the parameter string multiple times for each value.\n\n## Syntax\n\n```js\nappend(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to append.\n- `value`\n  - : The value of the parameter to append.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/URLSearchParams/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.delete()\n\nThe **`delete()`** method of the `URLSearchParams`\ninterface deletes the given search parameter and all its associated values, from the\nlist of all search parameters.\n\n## Syntax\n\n```js\ndelete(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to be deleted.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/URLSearchParams/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.entries()\n\nThe **`entries()`** method of the\n`URLSearchParams` interface returns an\niterator allowing iteration through all key/value\npairs contained in this object. The iterator returns key/value pairs in the same order as they appear in the query string. The key and value of each pair are\nstring objects.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/URLSearchParams/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.forEach()\n\nThe **`forEach()`** method of the\n`URLSearchParams` interface allows iteration through all values contained\nin this object via a callback function.\n\n## Syntax\n\n```js\nforEach(callback)\nforEach(callback, thisArg)\n```\n\n### Parameters\n\n- `callback`\n\n  - : Function to execute on each element, which is passed the following arguments:\n\n    - `value`\n      - : The value of the current entry being processed in the `URLSearchParams` object.\n    - `key`\n      - : The key of the current entry being processed in the `URLSearchParams` object.\n    - `searchParams`\n      - : The `URLSearchParams` object the `forEach()` was called upon.\n\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `callback`.\n\n### Return value\n\nNone `undefined`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/URLSearchParams/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.get()\n\nThe **`get()`** method of the `URLSearchParams`\ninterface returns the first value associated to the given search parameter.\n\n## Syntax\n\n```js\nget(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to return.\n\n### Return value\n\nA string if the given search parameter is found; otherwise,\n**`null`**.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/URLSearchParams/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.has()\n\nThe **`has()`** method of the `URLSearchParams`\ninterface returns a boolean value that indicates whether a parameter with the\nspecified name exists.\n\n## Syntax\n\n```js\nhas(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to find.\n\n### Return value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/URLSearchParams/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.keys()\n\nThe **`keys()`** method of the `URLSearchParams`\ninterface returns an iterator allowing iteration\nthrough all keys contained in this object. The keys are string\nobjects.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/URLSearchParams/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.set()\n\nThe **`set()`** method of the `URLSearchParams`\ninterface sets the value associated with a given search parameter to the given value.\nIf there were several matching values, this method deletes the others. If the search\nparameter doesn't exist, this method creates it.\n\n## Syntax\n\n```js\nset(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to set.\n- `value`\n  - : The value of the parameter to set.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/URLSearchParams/prototype/sort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.sort()\n\nThe **`URLSearchParams.sort()`** method sorts all key/value\npairs contained in this object in place and returns `undefined`. The sort\norder is according to unicode code points of the keys. This method uses a stable sorting\nalgorithm (i.e. the relative order between key/value pairs with equal keys will be\npreserved).\n\n## Syntax\n\n```js\nsort()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/URLSearchParams/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.toString()\n\nThe **`toString()`** method of the\n`URLSearchParams` interface returns a query string suitable for use in a\nURL.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string, without the question mark. (Returns an empty string if no\nsearch parameters have been set.)\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/URLSearchParams/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.values()\n\nThe **`values()`** method of the `URLSearchParams`\ninterface returns an iterator allowing iteration\nthrough all values contained in this object. The values are string\nobjects.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Uint16Array/Uint16Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint16Array\n\nThe **`Uint16Array()`** typed array constructor creates an\narray of 16-bit unsigned integers in the platform byte order.\n\n## Syntax\n\n```js\nnew Uint16Array()\nnew Uint16Array(length)\nnew Uint16Array(typedArray)\nnew Uint16Array(object)\n\nnew Uint16Array(buffer)\nnew Uint16Array(buffer, byteOffset)\nnew Uint16Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint16Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Uint32Array/Uint32Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint32Array\n\nThe **`Uint32Array()`** typed array constructor creates an\narray of 32-bit unsigned integers in the platform byte order. If control over byte order\nis needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are initialized to\n`0`. Once established, you can reference elements in the array using the\nobject's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Uint32Array()\nnew Uint32Array(length)\nnew Uint32Array(typedArray)\nnew Uint32Array(object)\n\nnew Uint32Array(buffer)\nnew Uint32Array(buffer, byteOffset)\nnew Uint32Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint32Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Uint8Array/Uint8Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint8Array\n\nThe **`Uint8Array()`** constructor creates a typed array of\n8-bit unsigned integers. The contents are initialized to `0`. Once\nestablished, you can reference elements in the array using the object's methods, or\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew Uint8Array()\nnew Uint8Array(length)\nnew Uint8Array(typedArray)\nnew Uint8Array(object)\n\nnew Uint8Array(buffer)\nnew Uint8Array(buffer, byteOffset)\nnew Uint8Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint8Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/Uint8ClampedArray/Uint8ClampedArray.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint8ClampedArray\n\nThe **`Uint8ClampedArray()`** constructor creates a typed array\nof 8-bit unsigned integers clamped to 0-255; if you specified a value that is out of the\nrange of \\[0,255], 0 or 255 will be set instead; if you specify a non-integer, the\nnearest integer will be set. The contents are initialized to `0`. Once\nestablished, you can reference elements in the array using the object's methods, or\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew Uint8ClampedArray()\nnew Uint8ClampedArray(length)\nnew Uint8ClampedArray(typedArray)\nnew Uint8ClampedArray(object)\n\nnew Uint8ClampedArray(buffer)\nnew Uint8ClampedArray(buffer, byteOffset)\nnew Uint8ClampedArray(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint8ClampedArray()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/WeakMap/WeakMap.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap\n\nThe **`WeakMap()` constructor** creates a `WeakMap` object, optionally based on a provided `Array` or other iterable object.\n\n## Syntax\n\n```js\nnew WeakMap()\nnew WeakMap(iterable)\n```\n\n> **Note:** `WeakMap()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable`\n  - : An `Array` or other object that implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol)  that returns an iterator object that produces a two-element array-like object whose first element is a value that will be used as a `WeakMap` key and whose second element is the value to associate with that key. Each key-value pair will be added to the new `WeakMap`. null is treated as undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/WeakMap/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.delete()\n\nThe **`delete()`** method removes the specified element from a\n`WeakMap` object.\n\n## Syntax\n\n```js\ndelete(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to remove from the `WeakMap` object.\n\n### Return value\n\n`true` if an element in the `WeakMap` object has been removed\nsuccessfully. `false` if the key is not found in the `WeakMap` or\nif the key is not an object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/WeakMap/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.get()\n\nThe **`get()`** method returns a specified element from a\n`WeakMap` object.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key`\n  - : Required. The key of the element to return from the `WeakMap` object.\n\n### Return value\n\nThe element associated with the specified key in the `WeakMap` object. If\nthe key can't be found, [`undefined`](../../../globals/undefined.mdx) is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/WeakMap/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.has()\n\nThe **`has()`** method returns a boolean indicating whether an\nelement with the specified key exists in the `WeakMap` object or not.\n\n## Syntax\n\n```js\nhas(key)\n```\n\n### Parameters\n\n- `key`\n  - : Required. The key of the element to test for presence in the `WeakMap`\n    object.\n\n### Return value\n\n- Boolean\n  - : Returns `true` if an element with the specified key exists in the\n    `WeakMap` object; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/WeakMap/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.set\n\nThe **`set()`** method adds a new element with a specified key\nand value to a `WeakMap` object.\n\n## Syntax\n\n```js\nset(key, value)\n```\n\n### Parameters\n\n- `key`\n  - : Required. Must be `object`. The key of the element to add to the\n    `WeakMap` object.\n- `value`\n  - : Required. Any value. The value of the element to add to the `WeakMap`\n    object.\n\n### Return value\n\nThe `WeakMap` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/WeakRef/WeakRef.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakRef\n\nThe **`WeakRef`** constructor creates a `WeakRef`\nobject referring to a given target object.\n\n## Syntax\n\n```js\nnew WeakRef(targetObject)\n```\n\n> **Note:** `WeakRef()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `targetObject`\n  - : The target object the WeakRef should refer to (also called the _referent_).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/WeakRef/prototype/deref.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakRef.prototype.deref()\n\nThe `deref` method returns the `WeakRef` instance's target\nobject, or `undefined` if the target object has been garbage-collected.\n\n## Syntax\n\n```js\nderef()\n```\n\n### Return value\n\nThe target object of the WeakRef, or `undefined` if the object has been\ngarbage-collected.\n\n## Description\n\nSee the [Notes on WeakRefs](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WeakRef#notes_on_weakrefs) section of the `WeakRef` page for some important notes.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/WeakSet/WeakSet.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet\n\nThe **`WeakSet`** constructor lets you create\n`WeakSet` objects that store weakly held _objects_ in a collection.\n\n## Syntax\n\n```js\nnew WeakSet()\nnew WeakSet(iterable)\n```\n\n> **Note:** `WeakSet()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable` _**optional**_\n  - : If an [iterable object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) is passed, all of its elements will be added to the new\n    `WeakSet`. null is treated as undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/WeakSet/prototype/add.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet.prototype.add\n\nThe **`add()`** method appends a new object to the end of a\n`WeakSet` object.\n\n## Syntax\n\n```js\nadd(value)\n```\n\n### Parameters\n\n- value\n  - : Required. The object to add to the `WeakSet` collection.\n\n### Return value\n\nThe `WeakSet` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/WeakSet/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet.prototype.delete\n\nThe **`delete()`** method removes the specified element from a\n`WeakSet` object.\n\n## Syntax\n\n```js\ndelete(value)\n```\n\n### Parameters\n\n- `value`\n  - : Required. The object remove from the `WeakSet` object.\n\n### Return value\n\n`true` if an element in the `WeakSet` object has been removed\nsuccessfully. `false` if the `value` is not found in\nthe `WeakSet` or if the `value` is not an object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/WeakSet/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet.prototype.has\n\nThe **`has()`** method returns a boolean indicating whether an\nobject exists in a `WeakSet` or not.\n\n## Syntax\n\n```js\nhas(value)\n```\n\n### Parameters\n\n- `value`\n  - : Required. The object to test for presence in the `WeakSet`.\n\n### Return value\n\n- Boolean\n  - : Returns `true` if an element with the specified value exists in the\n    `WeakSet` object; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/WorkerLocation/WorkerLocation.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# WorkerLocation\n\nThe **`WorkerLocation`** interface defines the absolute location of the script executed by the Worker. Such an object is initialized for each worker and is available via the [`location`](../../globals/location.mdx) property obtained by calling `globalThis.location`.\n\n## Instance properties\n\n- [`WorkerLocation.href`](../../globals/WorkerLocation/href.mdx) _**read-only**_\n  - : Returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location.\n- [`WorkerLocation.protocol`](../../globals/WorkerLocation/protocol.mdx) _**read-only**_\n  - : Returns the [`protocol`](../../globals/URL/prototype/protocol.mdx) part of the worker's location.\n- [`WorkerLocation.host`](../../globals/WorkerLocation/host.mdx) _**read-only**_\n  - : Returns the [`host`](../../globals/URL/prototype/host.mdx) part of the worker's location.\n- [`WorkerLocation.hostname`](../../globals/WorkerLocation/hostname.mdx) _**read-only**_\n  - : Returns the [`hostname`](../../globals/URL/prototype/hostname.mdx) part of the worker's location.\n- [`WorkerLocation.origin`](../../globals/WorkerLocation/origin.mdx) _**read-only**_\n  - : Returns the worker's [`origin`](../../globals/URL/prototype/origin.mdx).\n- [`WorkerLocation.port`](../../globals/WorkerLocation/port.mdx) _**read-only**_\n  - : Returns the [`port`](../../globals/URL/prototype/port.mdx) part of the worker's location.\n- [`WorkerLocation.pathname`](../../globals/WorkerLocation/pathname.mdx) _**read-only**_\n  - : Returns the [`pathname`](../../globals/URL/prototype/pathname.mdx) part of the worker's location.\n- [`WorkerLocation.search`](../../globals/WorkerLocation/search.mdx) _**read-only**_\n  - : Returns the [`search`](../../globals/URL/prototype/search.mdx) part of the worker's location.\n- [`WorkerLocation.hash`](../../globals/WorkerLocation/hash.mdx) _**read-only**_\n  - : Returns the [`hash`](../../globals/URL/prototype/hash.mdx) part of the worker's location.\n\n## Instance methods\n\n- [`WorkerLocation.toString`](../../globals/WorkerLocation/toString.mdx)\n  - : Returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location. It is a synonym for [`WorkerLocation.href`](../../globals/WorkerLocation/href.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/WorkerLocation/hash.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.hash\n\nThe **`hash`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`hash`](../../globals/URL/prototype/hash.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/WorkerLocation/host.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.host\n\nThe **`host`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`host`](../../globals/URL/prototype/host.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/WorkerLocation/hostname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.hostname\n\nThe **`hostname`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`hostname`](../../globals/URL/prototype/hostname.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/WorkerLocation/href.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.href\n\nThe **`href`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/WorkerLocation/origin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.origin\n\nThe **`origin`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the worker's [`origin`](../../globals/URL/prototype/origin.mdx).\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/WorkerLocation/pathname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.pathname\n\nThe **`pathname`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`pathname`](../../globals/URL/prototype/pathname.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/WorkerLocation/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.port\n\nThe **`port`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`port`](../../globals/URL/prototype/port.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/WorkerLocation/protocol.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.protocol\n\nThe **`protocol`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`protocol`](../../globals/URL/prototype/protocol.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/WorkerLocation/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.search\n\nThe **`search`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`search`](../../globals/URL/prototype/search.mdx) part of the worker's location.\n\n## Value\n\nA string.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/WorkerLocation/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.toString()\n\nThe **`toString()`** method of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location. It is a synonym for [`WorkerLocation.href`](../../globals/WorkerLocation/href.mdx).\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone [`undefined`](../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/WritableStream/WritableStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream()\n\nThe **`WritableStream()`** constructor creates\na new `WritableStream` object instance.\n\n## Syntax\n\n```js\nnew WritableStream(underlyingSink)\nnew WritableStream(underlyingSink, queuingStrategy)\n```\n\n### Parameters\n\n- `underlyingSink` _**optional**_\n\n  - : An object containing methods and properties that define how the constructed stream\n    instance will behave. `underlyingSink` can contain the following:\n\n    - `start(controller)` _**optional**_\n      - : This is a method, called immediately when the object is constructed. The\n        contents of this method are defined by the developer, and should aim to get access\n        to the underlying sink. If this process is to be done asynchronously, it can\n        return a promise to signal success or failure. The `controller`\n        parameter passed to this method is a\n        `WritableStreamDefaultController`. This can be used by the developer\n        to control the stream during set up.\n    - `write(chunk, controller)` _**optional**_\n      - : This method, also defined by the developer, will be called when a new chunk of\n        data (specified in the `chunk` parameter) is ready to be written to the\n        underlying sink. It can return a promise to signal success or failure of the write\n        operation. The `controller` parameter passed to this method is a\n        `WritableStreamDefaultController` that can be used by the developer\n        to control the stream as more chunks are submitted for writing. This method will\n        be called only after previous writes have succeeded, and never after the stream is\n        closed or aborted (see below).\n    - `close(controller)` _**optional**_\n      - : This method, also defined by the developer, will be called if the app signals\n        that it has finished writing chunks to the stream. The contents should do whatever\n        is necessary to finalize writes to the underlying sink, and release access to it.\n        If this process is asynchronous, it can return a promise to signal success or\n        failure. This method will be called only after all queued-up writes have\n        succeeded. The `controller` parameter passed to this method is a\n        `WritableStreamDefaultController`, which can be used to control the\n        stream at the end of writing.\n    - `abort(reason)` _**optional**_\n      - : This method, also defined by the developer, will be called if the app signals\n        that it wishes to abruptly close the stream and put it in an errored state. It can\n        clean up any held resources, much like `close()`, but\n        `abort()` will be called even if writes are queued up — those chunks\n        will be thrown away. If this process is asynchronous, it can return a promise to\n        signal success or failure. The `reason` parameter contains a\n        string describing why the stream was aborted.\n\n- `queuingStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer — this defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk` — this indicates the size to use for each chunk, in bytes.\n\n    > **Note:** You could define your own custom\n    > `queuingStrategy`, or use an instance of\n    > `ByteLengthQueuingStrategy` or `CountQueuingStrategy`\n    > for this object value. If no `queuingStrategy` is supplied, the default\n    > used is the same as a `CountQueuingStrategy` with a high water mark of 1\\.\n\n### Return value\n\nAn instance of the `WritableStream` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/WritableStream/prototype/abort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream.abort()\n\nThe **`abort()`** method of the `WritableStream` interface aborts the stream, signaling that the producer can no longer successfully write to the stream and it is to be immediately moved to an error state, with any queued writes discarded.\n\n## Syntax\n\n```js\nabort(reason)\n```\n\n### Parameters\n\n- `reason`\n  - : A string providing a human-readable reason for the abort.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason` parameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to abort is not a `WritableStream`, or it is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/WritableStream/prototype/getWriter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream.getWriter()\n\nThe **`getWriter()`** method of the `WritableStream` interface returns a new instance of `WritableStreamDefaultWriter` and locks the stream to that instance.\nWhile the stream is locked, no other writer can be acquired until this one is released.\n\n## Syntax\n\n```js\ngetWriter()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `WritableStreamDefaultWriter` object instance.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to create a writer for is not a `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/WritableStream/prototype/locked.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream.locked\n\nThe **`locked`** read-only property of the `WritableStream` interface returns a boolean indicating whether the `WritableStream` is locked to a writer.\n\n## Value\n\nA boolean value indicating whether or not the writable stream is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/WritableStreamDefaultController/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultController.error()\n\nThe **`error()`** method of the\n`WritableStreamDefaultController` interface causes any future interactions\nwith the associated stream to error.\n\nThis method is rarely used, since usually it suffices to return a rejected promise from\none of the underlying sink's methods. However, it can be useful for suddenly shutting\ndown a stream in response to an event outside the normal lifecycle of interactions with\nthe underlying sink.\n\n## Syntax\n\n```js\nerror(message)\n```\n\n### Parameters\n\n- `message`\n  - : A string representing the error you want future interactions to\n    fail with.\n\n### Return value\n\nNone `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to error is not a `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/WritableStreamDefaultWriter/WritableStreamDefaultWriter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter()\n\nThe **`WritableStreamDefaultWriter()`**\nconstructor creates a new `WritableStreamDefaultWriter` object instance.\n\n## Syntax\n\n```js\nnew WritableStreamDefaultWriter(stream)\n```\n\n### Parameters\n\n- `stream`\n  - : The `WritableStream` to be written to.\n\n### Return value\n\nAn instance of the `WritableStreamDefaultWriter` object.\n\n### Exceptions\n\n- `TypeError`\n  - : The provided `stream` value is not a `WritableStream`, or it\n    is locked to another writer already.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/WritableStreamDefaultWriter/prototype/abort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.abort()\n\nThe **`abort()`** method of the\n`WritableStreamDefaultWriter` interface aborts the stream, signaling that\nthe producer can no longer successfully write to the stream and it is to be immediately\nmoved to an error state, with any queued writes discarded.\n\nIf the writer is active, the `abort()` method behaves the same as that for\nthe associated stream (`WritableStream.abort()`). If not, it returns a\nrejected promise.\n\n## Syntax\n\n```js\nabort()\nabort(reason)\n```\n\n### Parameters\n\n- `reason` _**optional**_\n  - : A string representing a human-readable reason for the abort.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason`\nparameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to abort is not a `WritableStream`, or it is\n    locked.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/WritableStreamDefaultWriter/prototype/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.close()\n\nThe **`close()`** method of the\n`WritableStreamDefaultWriter` interface closes the associated writable\nstream.\n\nThe underlying sink will finish processing any previously-written chunks, before\ninvoking the close behavior. During this time any further attempts to write will fail\n(without erroring the stream).\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise`, which fulfills with the `undefined` if all\nremaining chunks were successfully written before the close, or rejects with an error if\na problem was encountered during the process.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to close is not a `WritableStream`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/WritableStreamDefaultWriter/prototype/closed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.closed\n\nThe **`closed`** read-only property of the\n`WritableStreamDefaultWriter` interface returns a\n`Promise` that fulfills if the stream becomes closed, or rejects if\nthe stream errors or the writer's lock is released.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/WritableStreamDefaultWriter/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.desiredSize\n\nThe **`desiredSize`** read-only property of the\n`WritableStreamDefaultWriter` interface returns the desired size required\nto fill the stream's internal queue.\n\n## Value\n\nAn integer. Note that this can be negative if the queue is over-full.\n\nThe value will be `null` if the stream cannot be successfully written to\n(due to either being errored, or having an abort queued up), and zero if the stream is\nclosed.\n\n### Exceptions\n\n- `TypeError`\n  - : The writer's lock is released.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/WritableStreamDefaultWriter/prototype/ready.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.ready\n\nThe **`ready`** read-only property of the\n`WritableStreamDefaultWriter` interface returns a `Promise`\nthat resolves when the desired size of the stream's internal queue transitions from\nnon-positive to positive, signaling that it is no longer applying backpressure.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/WritableStreamDefaultWriter/prototype/releaseLock.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.releaseLock()\n\nThe **`releaseLock()`** method of the\n`WritableStreamDefaultWriter` interface releases the writer's lock on the\ncorresponding stream. After the lock is released, the writer is no longer active. If the\nassociated stream is errored when the lock is released, the writer will appear errored\nin the same way from now on; otherwise, the writer will appear closed.\n\n## Syntax\n\n```js\nreleaseLock()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone `undefined`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/WritableStreamDefaultWriter/prototype/write.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.write()\n\nThe **`write()`** method of the\n`WritableStreamDefaultWriter` interface writes a passed chunk of data to a\n`WritableStream` and its underlying sink, then returns a\n`Promise` that resolves to indicate the success or failure of the write\noperation.\n\nNote that what \"success\" means is up to the underlying sink; it might indicate that the\nchunk has been accepted, and not necessarily that it is safely saved to its ultimate\ndestination.\n\n## Syntax\n\n```js\nwrite(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : A block of binary data to pass to the `WritableStream`.\n\n### Return value\n\nA `Promise`, which fulfills with the `undefined` upon a\nsuccessful write, or rejects if the write fails or stream becomes errored before the\nwriting process is initiated.\n\n### Exceptions\n\n- `TypeError`\n  - : The target stream is not a writable stream, or it does not have an owner.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/atob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# atob()\n\nThe **`atob()`** function decodes a\nstring of data which has been encoded using Base64 encoding. You can use\nthe `btoa()` method to encode and transmit\ndata which may otherwise cause communication problems, then transmit it and use the\n`atob()` method to decode the data again. For example, you can encode,\ntransmit, and decode control characters such as ASCII values 0 through 31.\n\nFor use with Unicode or UTF-8 strings, see the note on \"Unicode strings\" in the page\nfor `btoa()`.\n\n## Syntax\n\n```js\natob(encodedData)\n```\n\n### Parameters\n\n- `encodedData`\n  - : A binary string (i.e., a string in which each character in the string is treated as a byte of binary data) containing base64-encoded data.\n\n### Return value\n\nAn ASCII string containing decoded data from `encodedData`.\n\n### Exceptions\n\n- `InvalidCharacterError`\n  - : Thrown if `encodedData` is not valid base64.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/btoa.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# btoa()\n\nThe **`btoa()`** method creates a\nBase64-encoded ASCII string from a _binary string_ (i.e., a\nstring in which each character in the string is treated as a byte\nof binary data).\n\nYou can use this method to encode data which may otherwise cause communication\nproblems, transmit it, then use the `atob()` method to decode the data again. For example, you can encode control\ncharacters such as ASCII values 0 through 31.\n\n## Syntax\n\n```js\nbtoa(stringToEncode)\n```\n\n### Parameters\n\n- `stringToEncode`\n  - : The _binary string_ to encode.\n\n### Return value\n\nAn ASCII string containing the Base64 representation of\n`stringToEncode`.\n\n### Exceptions\n\n- `InvalidCharacterError`\n  - : The string contained a character that did not fit in a single byte. See \"Unicode\n    strings\" below for more detail.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/clearInterval.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# clearInterval()\n\nThe global **`clearInterval()`** method cancels a timed, repeating action which\nwas previously established by a call to `setInterval()`.\nIf the parameter provided does not identify a previously established action,\nthis method does nothing.\n\n## Syntax\n\n```js\nclearInterval(intervalID)\n```\n\n### Parameters\n\n- `intervalID`\n  - : The identifier of the repeated action you want to cancel. This ID was returned by\n    the corresponding call to `setInterval()`.\n\nIt's worth noting that the pool of IDs used by\n`setInterval()` and\n`setTimeout()` are shared, which\nmeans you can technically use `clearInterval()` and\n`clearTimeout()` interchangeably.\nHowever, for clarity, you should avoid doing so.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/clearTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# clearTimeout()\n\nThe global **`clearTimeout()`** method cancels a timeout previously established\nby calling `setTimeout()`.\n\nIf the parameter provided does not identify a previously established action,\nthis method does nothing.\n\n## Syntax\n\n```js\nclearTimeout(timeoutID)\n```\n\n### Parameters\n\n- `timeoutID`\n  - : The identifier of the timeout you want to cancel. This ID was returned by the\n    corresponding call to `setTimeout()`.\n\nIt's worth noting that the pool of IDs used by\n`setTimeout()` and\n`setInterval()` are shared, which\nmeans you can technically use `clearTimeout()` and\n`clearInterval()`\ninterchangeably. However, for clarity, you should avoid doing so.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/console/assert.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.assert()\n\nThe **`console.assert()`** method writes an error message to\nthe console if the assertion is false. If the assertion is true, nothing happens.\n\n## Syntax\n\n```js\nassert(assertion, obj1)\nassert(assertion, obj1, obj2)\nassert(assertion, obj1, obj2, /* … ,*/ objN)\n\nassert(assertion, msg)\nassert(assertion, msg, subst1)\nassert(assertion, msg, subst1, /* … ,*/ substN)\n```\n\n### Parameters\n\n- `assertion`\n  - : Any boolean expression. If the assertion is false, the message is written to the\n    console.\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output.\n- `msg`\n  - : A JavaScript string containing zero or more substitution strings.\n- `subst1` … `substN`\n  - : JavaScript objects with which to replace substitution strings within\n    `msg`. This parameter gives you additional control over the format of the\n    output.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/console/clear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.clear()\n\nThe **`console.clear()`** method clears the console if the console allows it.\n\n## Syntax\n\n```js\nclear()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/console/count.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.count()\n\nThe **`console.count()`** method logs the number of times that\nthis particular call to `count()` has been called.\n\n\n## Syntax\n\n```js\ncount()\ncount(label)\n```\n\n### Parameters\n\n- `label` _optional_\n  - : A string. If supplied, `count()` outputs the number of\n    times it has been called with that label. If omitted, `count()` behaves as\n    though it was called with the \"default\" label.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/console/countReset.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.countReset()\n\nThe **`console.countReset()`** method resets counter used with `console.count()`.\n\n## Syntax\n\n```js\ncountReset()\ncountReset(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : A string. If supplied, `countReset()` resets the count for\n    that label to 0. If omitted, `countReset()` resets the default counter to\n    0.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/console/debug.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.debug()\n\nThe **`console.debug()`** method outputs a message to the console at the \"debug\" log level.\n\n## Syntax\n\n```js\ndebug(obj1)\ndebug(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output to the console.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/console/dir.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.dir()\n\nThe method **`console.dir()`** displays a list of the properties of\nthe specified JavaScript object.\n\n## Syntax\n\n```js\ndir(object)\n```\n\n### Parameters\n\n- `object`\n  - : A JavaScript object whose properties should be output.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/console/dirxml.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.dirxml()\n\nThe **`console.dirxml()`** method displays the supplied object in the console.\n\n## Syntax\n\n```js\ndirxml(object)\n```\n\n### Parameters\n\n- `object`\n  - : A JavaScript object whose properties should be output.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/console/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.error()\n\nThe **`console.error()`** method outputs an error message console.\n\n## Syntax\n\n```js\nerror(obj1)\nerror(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of\n    these objects are appended together in the order listed and output.\n\n### Return value\n\nNone `undefined`."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/console/group.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.group()\n\nThe **`console.group()`** method creates a new inline group in the console, until `console.groupEnd()` is called.\n\n## Syntax\n\n```js\ngroup()\ngroup(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : Label for the group.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/console/groupCollapsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.groupCollapsed()\n\nThe **`console.groupCollapsed()`** method creates a new inline group in the Web Console. Unlike `console.group()`,\nhowever, the new group is created collapsed. The user will need to use the disclosure\nbutton next to it to expand it, revealing the entries created in the group.\n\nCall `console.groupEnd()` to back out to the parent group.\n\n## Syntax\n\n```js\ngroupCollapsed()\ngroupCollapsed(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : Label for the group.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/console/groupEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.groupEnd()\n\nThe **`console.groupEnd()`** method exits the current inline group in the console.\n\n## Syntax\n\n```js\ngroupEnd()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/console/info.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.info()\n\nThe **`console.info()`** method outputs an informational message to the console.\n\n## Syntax\n\n```js\ninfo(obj1)\ninfo(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/console/log.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.log()\n\nThe **`console.log()`** method outputs a message to the console.\n\n## Syntax\n\n```js\nlog(obj1)\nlog(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output. Please be warned that if\n    you log objects in the latest versions of Chrome and Firefox what you get logged on\n    the console is a _reference to the object_, which is not necessarily the\n    'value' of the object at the moment in time you call `console.log()`, but\n    it is the value of the object at the moment you open the console.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/console/time.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.time()\n\nThe **`console.time()`** method starts a timer you can use to track\nhow long an operation takes. You give each timer a unique name. When you call `console.timeEnd()` with the same name, the\nbrowser will output the time, in milliseconds, that elapsed since the timer was started.\n\n## Syntax\n\n```js\ntime(label)\n```\n\n### Parameters\n\n- `label`\n  - : A `string` representing the name to give the new timer. This will identify the timer; use the same name when\n    calling `console.timeEnd()` to stop the timer and get the time output to\n    the console.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/console/timeEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.timeEnd()\n\nThe **`console.timeEnd()`** stops a timer that was previously started by calling `console.time()`.\n\n## Syntax\n\n```js\ntimeEnd(label)\n```\n\n### Parameters\n\n- `label`\n  - : A `string` representing the name of the timer to stop. Once stopped, the elapsed time is automatically\n    displayed in the console.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/console/timeLog.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.timeLog()\n\nThe **`console.timeLog()`** method logs the current value of a timer that was previously started by calling `console.time()`.\n\n## Syntax\n\n```js\ntimeLog()\ntimeLog(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : The name of the timer to log to the console. If this is omitted the label \"default\" is used.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/console/trace.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.trace()\n\nThe **`console.trace()`** method outputs a stack trace to the console.\n\n## Syntax\n\n```js\ntrace()\ntrace(object1, /* …, */ objectN)\n```\n\n### Parameters\n\n- `objects` __optional__\n  - : Zero or more objects to be output to console along with the trace. These are\n    assembled and formatted the same way they would be if passed to the `console.log()` method.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/console/warn.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.warn()\n\nThe **`console.warn()`** method outputs a warning message to the console.\n\n## Syntax\n\n```js\nwarn(obj1)\nwarn(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/crypto/getRandomValues.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Crypto.getRandomValues()\n\nThe **`Crypto.getRandomValues()`** method lets you get cryptographically strong random values.\nThe array given as the parameter is filled with random numbers (random in its cryptographic meaning).\n\n## Syntax\n\n```js\ngetRandomValues(typedArray)\n```\n\n### Parameters\n\n- `typedArray`\n  - : An integer-based `TypedArray`, that is one of: `Int8Array`, `Uint8Array`,\n    `Uint8ClampedArray`, `Int16Array`, `Uint16Array`,\n    `Int32Array`, `Uint32Array`, `BigInt64Array`,\n    `BigUint64Array` (but **not** `Float32Array` nor `Float64Array`).\n    All elements in the array will be overwritten with random numbers.\n\n### Return value\n\nThe same array passed as `typedArray` but with its contents replaced with the newly generated random numbers.\nNote that `typedArray` is modified in-place, and no copy is made.\n\n### Exceptions\n\n- `QuotaExceededError`\n  - : Thrown if the `byteLength` of `typedArray` exceeds 65,536.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/crypto/randomUUID.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Crypto.randomUUID()\n\nThe **`randomUUID()`** method is used to generate a v4 [UUID](https://developer.mozilla.org/en-US/docs/Glossary/UUID) using a cryptographically secure random number generator.\n\n## Syntax\n\n```js\nrandomUUID()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string containing a randomly generated, 36 character long v4 UUID."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/crypto/subtle.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Crypto.subtle\n\nThe **`Crypto.subtle`** read-only property returns a\n[`SubtleCrypto`](../SubtleCrypto/SubtleCrypto.mdx) which can then be used to perform low-level\ncryptographic operations.\n\n## Value\n\nA [`SubtleCrypto`](../SubtleCrypto/SubtleCrypto.mdx) object you can use to interact with the Web Crypto API's\nlow-level cryptography features.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/decodeURI.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# decodeURI\n\nThe **`decodeURI()`** function decodes a Uniform Resource Identifier (URI) previously created by [`encodeURI()`](../globals/encodeURI.mdx) or a similar routine.\n\n## Syntax\n\n```js\ndecodeURI(encodedURI)\n```\n\n### Parameters\n\n- `encodedURI`\n  - : A complete, encoded Uniform Resource Identifier.\n\n### Return value\n\nA new string representing the unencoded version of the given encoded Uniform Resource Identifier (URI).\n\n### Exceptions\n\n- [`URIError`](../globals/URIError/URIError.mdx)\n  - : Thrown if `encodedURI` contains a `%` not followed by two hexadecimal digits, or if the escape sequence does not encode a valid UTF-8 character.\n\n## Description\n\n`decodeURI()` is a function property of the global object.\n\nThe `decodeURI()` function decodes the URI by treating each escape sequence in the form `%XX` as one UTF-8 code unit (one byte). In UTF-8, the number of leading 1 bits in the first byte, which may be 0 (for 1-byte ASCII characters), 2, 3, or 4, indicates the number of bytes in the character. So by reading the first escape sequence, `decodeURI()` can determine how many more escape sequences to consume. If `decodeURI()` fails to find the expected number of sequences, or if the escape sequences don't encode a valid UTF-8 character, a [`URIError`](../globals/URIError/URIError.mdx) is thrown.\n\n`decodeURI()` decodes all escape sequences, but if the escape sequence encodes one of the following characters, the escape sequence is preserved in the output string (because they are part of the URI syntax):\n\n```\n; / ? : @ & = + $ , #\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/decodeURIComponent.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# decodeURIComponent\n\nThe **`decodeURIComponent()`** function decodes a Uniform Resource Identifier (URI) component previously created by [`encodeURIComponent()`](./encodeURIComponent.mdx) or by a similar routine.\n\n\n## Syntax\n\n```js\ndecodeURIComponent(encodedURI)\n```\n\n### Parameters\n\n- `encodedURI`\n  - : An encoded component of a Uniform Resource Identifier.\n\n### Return value\n\nA new string representing the decoded version of the given encoded Uniform Resource Identifier (URI) component.\n\n### Exceptions\n\n- [`URIError`](../globals/URIError/URIError.mdx)\n  - : Thrown if `encodedURI` contains a `%` not followed by two hexadecimal digits, or if the escape sequence does not encode a valid UTF-8 character.\n\n## Description\n\n`decodeURIComponent()` is a function property of the global object.\n\n`decodeURIComponent()` uses the same decoding algorithm as described in [`decodeURI()`](./decodeURI.mdx). It decodes _all_ escape sequences, including those that are not created by [`encodeURIComponent()`](./encodeURIComponent.mdx), like `-.!~*'()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/encodeURI.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# encodeURI()\n\nThe **`encodeURI()`** function encodes a URI by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character (will only be four escape sequences for characters composed of two surrogate characters). Compared to [`encodeURIComponent()`](./encodeURIComponent.mdx), this function encodes fewer characters, preserving those that are part of the URI syntax.\n\n## Syntax\n\n```js\nencodeURI(uri)\n```\n\n### Parameters\n\n- `uri`\n  - : A string to be encoded as a URI.\n\n### Return value\n\nA new string representing the provided string encoded as a URI.\n\n### Exceptions\n\n- [`URIError`](./URIError/URIError.mdx)\n  - : Thrown if `uri` contains a [lone surrogate](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters).\n\n## Description\n\n`encodeURI()` is a function property of the global object.\n\nThe `encodeURI()` function escapes characters by UTF-8 code units, with each octet encoded in the format `%XX`, left-padded with 0 if necessary. Because lone surrogates in UTF-16 do not encode any valid Unicode character, they cause `encodeURI()` to throw a [`URIError`](./URIError/URIError.mdx).\n\n`encodeURI()` escapes all characters **except**:\n\n```\nA–Z a–z 0–9 - _ . ! ~ * ' ( )\n\n; / ? : @ & = + $ , #\n```\n\nThe characters on the second line are characters that may be part of the URI syntax, and are only escaped by `encodeURIComponent()`. Both `encodeURI()` and `encodeURIComponent()` do not encode the characters `-.!~*'()`, known as \"unreserved marks\", which do not have a reserved purpose but are allowed in a URI \"as is\". (See [RFC2396](https://www.ietf.org/rfc/rfc2396.txt))\n\nThe `encodeURI()` function does not encode characters that have special meaning (reserved characters) for a URI. The following example shows all the parts that a URI can possibly contain. Note how certain characters are used to signify special meaning:\n\n```\nhttp://username:password@www.example.com:80/path/to/file.php?foo=316&bar=this+has+spaces#anchor\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/encodeURIComponent.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# encodeURIComponent\n\nThe **`encodeURIComponent()`** function encodes a URI by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character (will only be four escape sequences for characters composed of two surrogate characters). Compared to [`encodeURI()`](./encodeURI.mdx), this function encodes more characters, including those that are part of the URI syntax.\n\n## Syntax\n\n```js\nencodeURIComponent(uriComponent)\n```\n\n### Parameters\n\n- `uriComponent`\n  - : A string to be encoded as a URI component (a path, query string, fragment, etc.). Other values are [converted to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion).\n\n### Return value\n\nA new string representing the provided `uriComponent` encoded as a URI component.\n\n### Exceptions\n\n- [`URIError`](./URIError/URIError.mdx)\n  - : Thrown if `uriComponent` contains a [lone surrogate](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters).\n\n## Description\n\n`encodeURIComponent()` is a function property of the global object.\n\n`encodeURIComponent()` uses the same encoding algorithm as described in [`encodeURI()`](./encodeURI.mdx). It escapes all characters **except**:\n\n```text\nA–Z a–z 0–9 - _ . ! ~ * ' ( )\n```\n\nCompared to [`encodeURI()`](./encodeURI.mdx), `encodeURIComponent()` escapes a larger set of characters. Use `encodeURIComponent()` on user-entered fields from forms `POST`'d to the server — this will encode `&` symbols that may inadvertently be generated during data entry for special HTML entities or other characters that require encoding/decoding. For example, if a user writes `Jack & Jill`, without `encodeURIComponent()`, the ampersand could be interpreted on the server as the start of a new field and jeopardize the integrity of the data.\n\nFor [`application/x-www-form-urlencoded`](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#application/x-www-form-urlencoded-encoding-algorithm), spaces are to be replaced by `+`, so one may wish to follow a `encodeURIComponent()` replacement with an additional replacement of `%20` with `+`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/escape.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# escape()\n\n> **Note:** `escape()` is a non-standard function implemented by browsers and was only standardized for cross-engine compatibility. It is not required to be implemented by all JavaScript engines and may not work everywhere. Use [`encodeURIComponent()`](./encodeURIComponent.mdx) or [`encodeURI()`](./encodeURI.mdx) if possible.\n\nThe **`escape()`** function computes a new string in which certain characters have been replaced by hexadecimal escape sequences.\n\n## Syntax\n\n```js\nescape(str)\n```\n\n### Parameters\n\n- `str`\n  - : A string to be encoded.\n\n### Return value\n\nA new string in which certain characters have been escaped.\n\n## Description\n\n`escape()` is a function property of the global object.\n\nThe `escape()` function replaces all characters with escape sequences, with the exception of ASCII word characters (A–Z, a–z, 0–9, _) and `@*_+-./`. Characters are escaped by UTF-16 code units. If the code unit's value is less than 256, it is represented by a two-digit hexadecimal number in the format `%XX`, left-padded with 0 if necessary. Otherwise, it is represented by a four-digit hexadecimal number in the format `%uXXXX`, left-padded with 0 if necessary.\n\n> **Note:** This function was used mostly for URL encoding and is partly based on the escape format in rfc(1738). The escape format is _not_ an [escape sequence](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#escape_sequences) in string literals. You can replace `%XX` with `\\xXX` and `%uXXXX` with `\\uXXXX` to get a string containing actual string-literal escape sequences.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/eval.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# eval\n\n> **Warning:** Executing JavaScript from a string is an enormous security risk. It is far too easy for a bad actor to run arbitrary code when you use `eval()`. See [never use direct eval](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval#never_use_direct_eval!) for details.\n\nThe **`eval()`** function evaluates JavaScript code represented as a string and returns its completion value. The source is parsed as a script.\n\n## Syntax\n\n```js\neval(script)\n```\n\n### Parameters\n\n- `script`\n  - : A string representing a JavaScript expression, statement, or sequence of statements. The expression can include variables and properties of existing objects. It will be parsed as a script, so [`import`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/import) declarations (which can only exist in modules) are not allowed.\n\n### Return value\n\nThe completion value of evaluating the given code. If the completion value is empty, [`undefined`](./undefined.mdx) is returned. If `script` is not a string primitive, `eval()` returns the argument unchanged.\n\n### Exceptions\n\nThrows any exception that occurs during evaluation of the code, including[ `SyntaxError`](./SyntaxError/SyntaxError.mdx) if `script` fails to be parsed as a script.\n\n## Description\n\n`eval()` is a function property of the global object.\n\nThe argument of the `eval()` function is a string. It will evaluate the source string as a script body, which means both statements and expressions are allowed. It returns the completion value of the code. For expressions, it's the value the expression evaluates to. Many statements and declarations have completion values as well, but the result may be surprising (for example, the completion value of an assignment is the assigned value, but the completion value of [`let`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/let) is undefined), so it's recommended to not rely on statements' completion values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/fetch.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# fetch()\n\nThe global **`fetch()`** method starts the process of fetching a\nresource from the network, returning a promise which is fulfilled once the response is\navailable.\n\nThe promise resolves to the `Response` object\nrepresenting the response to your request.\n\nA `fetch()` promise only rejects when a\nnetwork error is encountered (which is usually when there's a permissions issue or\nsimilar). A `fetch()` promise _does\nnot_ reject on HTTP errors (`404`, etc.). Instead, a\n`then()` handler must check the `Response.ok` and/or\n`Response.status` properties.\n\n> **Note:** The `fetch()` method's parameters are identical to\n> those of the `Request()` constructor.\n\n## Explicit Backends\n\nInternally, Fastly uses named backends to handle fetch requests, which need to be explicitly defined to enable custom HTTP origins to be fetched by the service.\n\nThis `backend` option is then a special Fastly-specific fetch option that is provided to the `fetch()` call:\n\n```js\nfetch('https://origin.com/path', { backend: 'origin' });\n```\n\nBackends are configured using the Fastly service backend configuration, see the [Backend documentation](https://developer.fastly.com/reference/api/services/backend/) for more information.\n\n## Dynamic Backends\n\nDynamic backends are a compute feature that allow services to define backends for themselves.\n\nIf the `backend` option is not provided when making `fetch()` requests, a backend will be automatically created by extracting the protocol, host, and port from the provided URL.\n\nIn addition, custom backend configuration options can then also be provided through the [`Backend()`](../fastly:backend/Backend/Backend.mdx) constructor.\n\n## Syntax\n\n```js\nfetch(resource)\nfetch(resource, options)\n```\n\n### Parameters\n\n- `resource`\n\n  - : This defines the resource that you wish to fetch. This can either be:\n\n    - A string or any other object with a \"toString\" method.\n    - A `Request` object.\n\n- `options` _**optional**_\n\n  - : An object containing any custom settings that you want to apply to the request. The\n    possible options are:\n\n    - `method`\n      - : The request method, e.g., `GET`, `POST`.\n    - `headers`\n      - : Any headers you want to add to your request, contained within a\n        `Headers` object or an object literal with `String`\n        values.\n    - `body`\n      - : Any body that you want to add to your request: this can be an `ArrayBuffer`, a `TypedArray`, a `DataView`, a `URLSearchParams`, string object or literal, or a `ReadableStream` object.\n    - `backend` _**Fastly-specific**_\n      - *Fastly-specific*\n    - `cacheOverride` _**Fastly-specific**_\n    - `cacheKey` _**Fastly-specific**_\n    - `imageOptimizerOptions` _**Fastly-specific**_, see [`imageOptimizerOptions`](../fastly:image-optimizer/imageOptimizerOptions.mdx).\n    - `fastly` _**Fastly-specific**_\n      - `decompressGzip`_: boolean_ _**optional**_\n        - Whether to automatically gzip decompress the Response or not.\n\n### Return value\n\nA `Promise` that resolves to a `Response` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/globalThis.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# globalThis\n\nThe global **`globalThis`** property contains the [global `this`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this#global_context) value, which is usually akin to the [global object](https://developer.mozilla.org/docs/Glossary/Global_object).\n\n## Value\n\nThe global `this` object.\n\n> **Note:** The `globalThis` property is configurable and writable so that code authors can hide it when executing untrusted code and prevent exposing the global object.\n\n## Description\n\nThe `globalThis` property provides a standard way of accessing the global `this` value (and hence the global object itself) across environments.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/isFinite.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# isFinite\n\nThe global **`isFinite()`** function determines whether the\npassed value is a finite number. If needed, the parameter is first converted to a\nnumber.\n\n## Syntax\n\n```js\nisFinite(testValue)\n```\n\n### Parameters\n\n- `testValue`\n  - : The value to be tested for finiteness.\n\n### Return value\n\n**`false`** if the argument is (or will be coerced to) positive\nor negative [`Infinity`](./Infinity.mdx) or [`NaN`](./NaN.mdx) or [`undefined`](./undefined.mdx);\notherwise, **`true`**.\n\n## Description\n\n`isFinite` is a function property of the global object.\n\nYou can use this function to determine whether a number is a finite number. The\n`isFinite` function examines the number in its argument. If the argument is\n`NaN`, positive infinity, or negative infinity, this method returns\n`false`; otherwise, it returns `true`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/isNaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# isNaN()\n\nThe **`isNaN()`** function determines whether a value is [`NaN`](./NaN.mdx) when converted to a number. Because coercion inside the `isNaN()` function can be [surprising](#description), you may alternatively want to use [`Number.isNaN()`](./Number/isNaN.mdx).\n\n## Syntax\n\n```js\nisNaN(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested.\n\n### Return value\n\n`true` if the given value is [`NaN`](./NaN.mdx) after being [converted to a number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_coercion); otherwise, `false`.\n\n## Description\n\n`isNaN()` is a function property of the global object.\n\nFor number values, `isNaN()` tests if the number is the value [`NaN`](./NaN.mdx). When the argument to the `isNaN()` function is not of type [Number](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#number_type), the value is first coerced to a number, and the resulting value is then compared against [`NaN`](./NaN.mdx).\n\nThis behavior of `isNaN()` for non-numeric arguments can be confusing! For example, an empty string is coerced to 0, while a boolean is coerced to 0 or 1; both values are intuitively \"not numbers\", but they don't evaluate to `NaN`, so `isNaN()` returns `false`. Therefore, `isNaN()` answers neither the question \"is the input the floating point [`NaN`](./NaN.mdx) value\" nor the question \"is the input not a number\".\n\n[`Number.isNaN()`](./Number/isNaN.mdx) is a more reliable way to test whether a value is the number value `NaN` or not. Alternatively, the expression `x !== x` can be used, and neither of the solutions is subject to the false positives that make the global `isNaN()` unreliable. To test if a value is a number, use [`typeof x === \"number\"`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/typeof).\n\nThe `isNaN()` function answers the question \"is the input functionally equivalent to [`NaN`](./NaN.mdx) when used in a number context\". If `isNaN(x)` returns `false`, you can use `x` in an arithmetic expression as if it's a valid number that's not `NaN`. If `isNaN(x)` returns `true`, `x` will get coerced to `NaN` and make most arithmetic expressions return `NaN` (because `NaN` propagates). You can use this, for example, to test whether an argument to a function is arithmetically processable (usable \"like\" a number), and handle values that are not number-like by throwing an error, providing a default value, etc. This way, you can have a function that makes use of the full versatility JavaScript provides by implicitly converting values depending on context.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/location.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# location\n\nThe **`location`** read-only property returns a\n[`Location`](../globals/WorkerLocation/WorkerLocation.mdx) object with information about the current location of the\ndocument.\n\nSee [`Location`](../globals/WorkerLocation/WorkerLocation.mdx) for all available properties.\n\n## Value\n\nA [`Location`](../globals/WorkerLocation/WorkerLocation.mdx) object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/parseFloat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# parseFloat()\n\nThe **`parseFloat()`** function parses a string argument and returns a floating point number.\n\n## Syntax\n\n```js\nparseFloat(string)\n```\n\n### Parameters\n\n- `string`\n  - : The value to parse, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). Leading whitespace in this argument is ignored.\n\n### Return value\n\nA floating point number parsed from the given `string`, or [`NaN`](./NaN.mdx) when the first non-whitespace character cannot be converted to a number.\n\n> **Note:** JavaScript does not have the distinction of \"floating point numbers\" and \"integers\" on the language level. [`parseInt()`](./parseInt.mdx) and `parseFloat()` only differ in their parsing behavior, but not necessarily their return values. For example, `parseInt(\"42\")` and `parseFloat(\"42\")` would return the same value: a `Number` 42.\n\n## Description\n\nThe `parseFloat` function converts its first argument to a string, parses that string as a decimal number literal, then returns a number or `NaN`. The number syntax it accepts can be summarized as:\n\n- The characters accepted by `parseFloat()` are plus sign (`+`), minus sign (`-` U+002D HYPHEN-MINUS), decimal digits (`0` – `9`), decimal point (`.`), exponent indicator (`e` or `E`), and the `\"Infinity\"` literal.\n- The `+`/`-` signs can only appear strictly at the beginning of the string, or immediately following the `e`/`E` character. The decimal point can only appear once, and only before the `e`/`E` character. The `e`/`E` character can only appear once, and only if there is at least one digit before it.\n- Leading spaces in the argument are trimmed and ignored.\n- `parseFloat()` can also parse and return [`Infinity`](./Infinity.mdx) or `-Infinity` if the string starts with `\"Infinity\"` or `\"-Infinity\"` preceded by none or more white spaces.\n- `parseFloat()` picks the longest substring starting from the beginning that generates a valid number literal. If it encounters an invalid character, it returns the number represented up to that point, ignoring the invalid character and all characters following it.\n- If the argument's first character can't start a legal number literal per the syntax above, `parseFloat` returns [`NaN`](./NaN.mdx).\n\nSyntax-wise, `parseFloat()` parses a subset of the syntax that the [`Number()`](./Number/Number.mdx) function accepts. Namely, `parseFloat()` does not support non-decimal literals with `0x`, `0b`, or `0o` prefixes but supports everything else. However, `parseFloat()` is more lenient than `Number()` because it ignores trailing invalid characters, which would cause `Number()` to return `NaN`.\n\nSimilar to number literals and `Number()`, the number returned from `parseFloat()` may not be exactly equal to the number represented by the string, due to floating point range and inaccuracy. For numbers outside the `-1.7976931348623158e+308` – `1.7976931348623158e+308` range (see `Number.MAX_VALUE`), `-Infinity` or `Infinity` is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/parseInt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# parseInt\n\nThe **`parseInt()`** function parses a string argument and returns an integer of the specified [radix](https://en.wikipedia.org/wiki/Radix) (the base in mathematical numeral systems).\n\n\n\n## Syntax\n\n```js\nparseInt(string)\nparseInt(string, radix)\n```\n\n### Parameters\n\n- `string`\n  - : A string starting with an integer. Leading whitespace in this argument is ignored.\n- `radix` _**optional**_\n\n  - : An integer between `2` and `36` that represents the _radix_ (the base in mathematical numeral systems) of the `string`. It is converted to a [32-bit integer](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#fixed-width_number_conversion); if it's outside the range of \\[2, 36] after conversion, the function will always return `NaN`. If `0` or not provided, the radix will be inferred based on `string`'s value. Be careful — this does NOT always default to `10`! The [description below](#description) explains in more detail what happens when `radix` is not provided.\n\n### Return value\n\nAn integer parsed from the given `string`, or [`NaN`](./NaN.mdx) when\n\n- the `radix` as a 32-bit integer is smaller than `2` or bigger than `36`, or\n- the first non-whitespace character cannot be converted to a number.\n\n> **Note:** JavaScript does not have the distinction of \"floating point numbers\" and \"integers\" on the language level. `parseInt()` and [`parseFloat()`](./parseFloat.mdx) only differ in their parsing behavior, but not necessarily their return values. For example, `parseInt(\"42\")` and `parseFloat(\"42\")` would return the same value: a `Number` 42.\n\n## Description\n\nThe `parseInt` function converts its first argument to a string, parses that string, then returns an integer or `NaN`.\n\nIf not `NaN`, the return value will be the integer that is the first argument taken as a number in the specified `radix`. (For example, a `radix` of `10` converts from a decimal number, `8` converts from octal, `16` from hexadecimal, and so on.)\n\nThe `radix` argument is converted to a number. If it's unprovided, or if the value becomes 0, `NaN` or `Infinity` (`undefined` is coerced to `NaN`), JavaScript assumes the following:\n\n1. If the input `string`, with leading whitespace and possible `+`/`-` signs removed, begins with `0x` or `0X` (a zero, followed by lowercase or uppercase X), `radix` is assumed to be `16` and the rest of the string is parsed as a hexadecimal number.\n2. If the input `string` begins with any other value, the radix is `10` (decimal).\n\n> **Note:** Other prefixes like `0b`, which are valid in [number literals](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#binary), are treated as normal digits by `parseInt()`. `parseInt()` does _not_ treat strings beginning with a `0` character as octal values either. The only prefix that `parseInt()` recognizes is `0x` or `0X` for hexadecimal values — everything else is parsed as a decimal value if `radix` is missing.\n\nIf the radix is `16`, `parseInt()` allows the string to be optionally prefixed by `0x` or `0X` after the optional sign character (`+`/`-`).\n\nIf the radix value (coerced if necessary) is not in range \\[2, 36] (inclusive) `parseInt` returns `NaN`.\n\nFor radices above `10`, letters of the English alphabet indicate numerals greater than `9`. For example, for hexadecimal numbers (base `16`), `A` through `F` are used. The letters are case-insensitive.\n\n`parseInt` understands exactly two signs: `+` for positive, and `-` for negative. It is done as an initial step in the parsing after whitespace is removed. If no signs are found, the algorithm moves to the following step; otherwise, it removes the sign and runs the number-parsing on the rest of the string.\n\nIf `parseInt` encounters a character that is not a numeral in the specified `radix`, it ignores it and all succeeding characters and returns the integer value parsed up to that point. For example, although `1e3` technically encodes an integer (and will be correctly parsed to the integer `1000` by [`parseFloat()`](./parseFloat.mdx), `parseInt(\"1e3\", 10)` returns `1`, because `e` is not a valid numeral in base 10. Because `.` is not a numeral either, the return value will always be an integer.\n\nIf the first character cannot be converted to a number with the radix in use, `parseInt` returns `NaN`. Leading whitespace is allowed.\n\nFor arithmetic purposes, the `NaN` value is not a number in any radix. You can call the [`Number.isNaN`](./Number/isNaN.mdx) function to determine if the result of `parseInt` is `NaN`. If `NaN` is passed on to arithmetic operations, the operation result will also be `NaN`.\n\nBecause large numbers use the `e` character in their string representation (e.g. `6.022e23` for 6.022 × 10<sup>23</sup>), using `parseInt` to truncate numbers will produce unexpected results when used on very large or very small numbers. `parseInt` should _not_ be used as a substitute for [`Math.trunc()`](./Math/trunc.mdx).\n\nTo convert a number to its string literal in a particular radix, use [`thatNumber.toString(radix)`](./Number/prototype/toString.mdx).\n\nBecause `parseInt()` returns a number, it may suffer from loss of precision if the integer represented by the string is [outside the safe range](./Number/isSafeInteger.mdx). The [`BigInt`](./BigInt/BigInt.mdx) function supports parsing integers of arbitrary length accurately, by returning a `BigInt`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/performance/now.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# performance.now()\n\nThe **`performance.now()`** method returns a high resolution timestamp in milliseconds.\nIt represents the time elapsed since [`performance.timeOrigin`](./timeOrigin.mdx) (the time when the worker was instantiated).\n\n## Syntax\n\n```js\nnow()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns a number which represents the time since worker instantation measured in milliseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/performance/timeOrigin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# performance.timeOrigin\n\nThe **`timeOrigin`** read-only property of the Performance interface returns the high resolution timestamp that is used as the baseline for performance-related timestamps.\n\nThis value represents the time when the worker was instantiated.\n\n### Value\n\nReturns a number which represents the time when the worker was instantation."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/setInterval.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# setInterval()\n\nThe **`setInterval()`** method, repeatedly\ncalls a function or executes a code snippet, with a fixed time delay between each\ncall.\n\nThis method returns an interval ID which uniquely identifies the interval, so you\ncan remove it later by calling `clearInterval()`.\n\n## Syntax\n\n```js\nsetInterval(code)\nsetInterval(code, delay)\n\nsetInterval(func)\nsetInterval(func, delay)\nsetInterval(func, delay, arg0)\nsetInterval(func, delay, arg0, arg1)\nsetInterval(func, delay, arg0, arg1, /* … ,*/ argN)\n```\n\n### Parameters\n\n- `func`\n  - : A `function` to be executed every `delay` milliseconds. The first execution happens after `delay` milliseconds.\n- `code`\n  - : An optional syntax allows you to include a string instead of a function, which is\n    compiled and executed every `delay` milliseconds. This syntax is _not\n    recommended_ for the same reasons that make using `eval() a\n    security risk.\n- `delay` _**optional**_\n  - : The time, in milliseconds (thousandths of a second), the timer should delay in\n    between executions of the specified function or code. Defaults to 0 if not specified.\n    below for details on the permitted range of `delay` values.\n- `arg0, …, argN` _**optional**_\n  - : Additional arguments which are passed through to the function specified by\n    _func_ once the timer expires.\n\n### Return value\n\nThe returned `intervalID` is a numeric, non-zero value which identifies the\ntimer created by the call to `setInterval()`; this value can be passed to\n`clearInterval()` to cancel the interval.\n\nIt may be helpful to be aware that `setInterval()` and\n`setTimeout()` share the same pool\nof IDs, and that `clearInterval()` and\n`clearTimeout()` can technically\nbe used interchangeably. For clarity, however, you should try to always match them to\navoid confusion when maintaining your code.\n\n> **Note:** The `delay` argument is converted to a\n> signed 32-bit integer. This effectively limits `delay` to 2147483647 ms,\n> since it's specified as a signed integer in the IDL.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/setTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# setTimeout()\n\nThe global **`setTimeout()`** method sets a timer which executes a function or specified\npiece of code once the timer expires.\n\n## Syntax\n\n```js\nsetTimeout(code)\nsetTimeout(code, delay)\n\nsetTimeout(functionRef)\nsetTimeout(functionRef, delay)\nsetTimeout(functionRef, delay, param1)\nsetTimeout(functionRef, delay, param1, param2)\nsetTimeout(functionRef, delay, param1, param2, /* … ,*/ paramN)\n```\n\n### Parameters\n\n- `functionRef`\n  - : A `function` to be executed after the timer expires.\n- `code`\n  - : An alternative syntax that allows you to include a string instead of a function,\n    which is compiled and executed when the timer expires. This syntax is **not\n    recommended** for the same reasons that make using\n    `eval()` a security risk.\n- `delay` _**optional**_\n\n  - : The time, in milliseconds that the timer should wait before\n    the specified function or code is executed. If this parameter is omitted, a value of 0\n    is used, meaning execute \"immediately\", or more accurately, the next event cycle.\n\n- `param1`, …, `paramN` _**optional**_\n\n  - : Additional arguments which are passed through to the function specified by\n    `functionRef`.\n\n### Return value\n\nThe returned `timeoutID` is a positive integer value which\nidentifies the timer created by the call to `setTimeout()`. This value can be\npassed to `clearTimeout()` to\ncancel the timeout.\n\nIt is guaranteed that a `timeoutID` value will never be reused by a subsequent call to\n`setTimeout()` or `setInterval()` on the same object (a window or\na worker). However, different objects use separate pools of IDs.\n\n## Description\n\nTimeouts are cancelled using `clearTimeout()`.\n\nTo call a function repeatedly (e.g., every _N_ milliseconds), consider using\n`setInterval()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/structuredClone.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# structuredClone()\n\nThe global **`structuredClone()`** method creates a deep clone of a given value.\n\n## Syntax\n\n```js\nstructuredClone(value)\n```\n\n### Parameters\n\n- `value`\n  - : The object to be cloned.\n\n### Return value\n\nThe returned value is a deep copy of the original `value`.\n\n### Exceptions\n\n- `DataCloneError`\n  - : Thrown if any part of the input value is not serializable.\n\n## Description\n\nThis function can be used to deep copy JavaScript values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/undefined.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# undefined\n\nThe global **`undefined`** property represents the primitive\nvalue `undefined`. It is one of JavaScript's \"primitive types\".\n\n## Value\n\nThe primitive value `undefined`.\n\n## Description\n\n`undefined` is a property of the _global object_. That is, it is a variable in global scope.\n\n`undefined` is a non-configurable, non-writable property.\n\nA variable that has not been assigned a value is of type `undefined`. A\nmethod or statement also returns `undefined` if the variable that is being\nevaluated does not have an assigned value. A function returns `undefined` if\na value was not explicitly returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/globals/unescape.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# unescape()\n\n> **Note:** `unescape()` is a non-standard function implemented by browsers and was only standardized for cross-engine compatibility. It is not required to be implemented by all JavaScript engines and may not work everywhere. Use [`decodeURIComponent()`](./decodeURIComponent.mdx) or [`decodeURI()`](./decodeURI.mdx) if possible.\n\nThe **`unescape()`** function computes a new string in which hexadecimal escape sequences are replaced with the characters that they represent. The escape sequences might be introduced by a function like [`escape()`](./escape.mdx).\n\n## Syntax\n\n```js\nunescape(str)\n```\n\n### Parameters\n\n- `str`\n  - : A string to be decoded.\n\n### Return value\n\nA new string in which certain characters have been unescaped.\n\n## Description\n\n`unescape()` is a function property of the global object.\n\nThe `unescape()` function replaces any escape sequence with the character that it represents. Specifically, it replaces any escape sequence of the form `%XX` or `%uXXXX` (where `X` represents one hexadecimal digit) with the character that has the hexadecimal value `XX`/`XXXX`. If the escape sequence is not a valid escape sequence (for example, if `%` is followed by one or no hex digit), it is left as-is.\n\n> **Note:** This function was used mostly for URL encoding and is partly based on the escape format in rfc(1738). The `unescape()` function does _not_ evaluate [escape sequences](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#escape_sequences) in string literals. You can replace `\\xXX` with `%XX` and `\\uXXXX` with `%uXXXX` to get a string that can be handled by `unescape()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/html-rewriter/Element/prototype/after.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# after\n\nThe `after` method inserts content after the closing tag of the element.\n\n## Syntax\n\n```js\nelement.after(content);\nelement.after(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to insert after the element's closing tag.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.after(\"World\");\n// Result: <div>Hello</div>World\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/html-rewriter/Element/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# append\n\nThe `append` method inserts content at the end of the element's content.\n\n## Syntax\n\n```js\nelement.append(content);\nelement.append(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to insert at the end of the element's content.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.append(\", World\");\n// Result: <div>Hello, World</div>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/html-rewriter/Element/prototype/before.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# before\n\nThe `before` method inserts content before the opening tag of the element.\n\n## Syntax\n\n```js\nelement.before(content);\nelement.before(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to insert before the element's opening tag.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.before(\"Well\");\n// Result: Well<div>Hello</div>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/html-rewriter/Element/prototype/hasAttribute.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# hasAttribute\n\nThe `hasAttribute` method returns a `boolean` value indicating whether the specified attribute is present on the element.\n\n## Syntax\n\n```js\nelement.hasAttribute(attributeName);\n```\n\n### Parameters\n\n- `attributeName` _: string_\n  - The name of the attribute to check for.\n\n### Return value\n\nA boolean value indicating whether the attribute is present.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/html-rewriter/Element/prototype/prepend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# prepend\n\nThe `prepend` method inserts content at the beginning of the element's content.\n\n## Syntax\n\n```js\nelement.prepend(content);\nelement.prepend(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to insert at the beginning of the element's content.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.prepend(\"Well, \");\n// Result: <div>Well, Hello</div>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/html-rewriter/Element/prototype/removeAttribute.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# removeAttribute\n\nThe `removeAttribute` method removes the specified attribute from the element.\n\n## Syntax\n\n```js\nelement.removeAttribute(attributeName);\n```\n\n### Parameters\n\n- `attributeName` _: string_\n  - The name of the attribute to remove.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/html-rewriter/Element/prototype/replaceChildren.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# replaceChildren\n\nThe `replaceChildren` method replaces the element's children with new content.\n\n## Syntax\n\n```js\nelement.replaceChildren(content);\nelement.replaceChildren(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to replace the element's children with.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.replaceChildren(\"Greetings!\");\n// Result: <div>Greetings!</div>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/html-rewriter/Element/prototype/replaceWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# replaceWith\n\nThe `replaceWith` method replaces the element with new content.\n\n## Syntax\n\n```js\nelement.replaceWith(content);\nelement.replaceWith(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to replace the element with.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.replaceWith(\"<p>Greetings!</p>\");\n// Result: <p>Greetings!</p>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/html-rewriter/Element/prototype/selector.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# selector\n\nThe `selector` read-only property is a `string` representing the [CSS selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors) that matches the element.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/html-rewriter/Element/prototype/setAttribute.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# setAttribute\n\nThe `setAttribute` method sets the value of the specified attribute on the element. If the value already exists, it will be updated; otherwise, a new attribute with the specified name and value will be added to the element.\n\n## Syntax\n\n```js\nelement.setAttribute(attributeName, value);\n```\n\n### Parameters\n\n- `attributeName` _: string_\n  - The name of the attribute to set.\n- `value` _: string_\n  - The value to assign to the attribute.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/html-rewriter/Element/prototype/tag.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# tag\n\nThe `tag` read-only property is a `string` representing the tag name of the element.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/html-rewriter/HTMLRewritingStream/HTMLRewritingStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `HTMLRewritingStream()`\n\nThe **`HTMLRewritingStream`** lets you rewrite HTML by registering callbacks on CSS selectors. When an element matching the selector is encountered, the rewriter calls your callback. This callback can manipulate the attributes of the element, and add or remove content from the immediate context.\n\n## Syntax\n\n```js\nnew HTMLRewritingStream()\n```\n\n### Return value\n\nA new `HTMLRewritingStream` object.\n\n## Examples\n\nIn this example, we fetch an HTML page and use the HTML rewriter to add an attribute to all `div` tags and prepend the text `Header:` to all `h1` tags:\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { HTMLRewritingStream } from 'fastly:html-rewriter';\n\nasync function handleRequest(event) {\n  let transformer = new HTMLRewritingStream()\n    .onElement(\"h1\", e => e.prepend(\"Header: \"))\n    .onElement(\"div\", e => e.setAttribute(\"special-attribute\", \"top-secret\"));\n  let body = (await fetch(\"https://example.com/\")).body.pipeThrough(transformer);\n\n  return new Response(body, {\n    status: 200,\n    headers: new Headers({\n      \"content-type\": \"text/html; charset=utf-8\",\n    })\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/html-rewriter/HTMLRewritingStream/prototype/onElement.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# onElement\n\n▸ **onElement**`(selector: string, handler: (element: Element) => void): this`\n\nRegisters an element handler with the [`HTMLRewritingStream`] that will be called for each [`Element`] that matches the [CSS selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors) `selector`.\n\nElements added by handlers will not be processed by other handlers.\n\n## Syntax\n\n```js\n.onElement(selector, handler)\n```\n\n### Parameters\n\n- `selector` _: string_\n  - A CSS selector that determines the elements for which `handler` will be called\n  - The following types of CSS selector are supported:\n\nCurrently the rewriter supports the following CSS selectors:\n\n| Pattern              | Description                                                                |\n|----------------------|----------------------------------------------------------------------------|\n| `*`                  | Any element                                                                |\n| `E`                  | All elements of type `E`                                                   |\n| `E F`                | `F` elements inside `E` elements                                           |\n| `E > F`              | `F` elements directly inside `E` elements                                  |\n| `E:nth-child(n)`     | The n-th child of type `E`                                                 |\n| `E:first-child`      | First child of type `E`                                                    |\n| `E:nth-of-type(n)`   | The n-th sibling of type `E`                                               |\n| `E:first-of-type`    | First sibling of type `E`                                                  |\n| `E:not(s)`           | Type `E` elements not matching selector `s`                                |\n| `E.myclass`          | Type `E` elements with class `\"myclass\"`                                   |\n| `E#myid`             | Type `E` elements with ID `\"myid\"`                                         |\n| `E[attr]`            | Type `E` elements with attribute `attr`                                    |\n| `E[attr=\"val\"]`      | Type `E` elements where `attr` is `\"val\"`                                  |\n| `E[attr=\"val\" i]`    | Type `E` elements where `attr` is `\"val\"`, case-insensitive                |\n| `E[attr=\"val\" s]`    | Type `E` elements where `attr` is `\"val\"`, case-sensitive                  |\n| `E[attr~=\"val\"]`     | Type `E` elements where `attr` contains `\"val\"` in a space-separated list  |\n| `E[attr`&#124`;=\"val\"]`| Type `E` elements where `attr` is hyphen-separated and starts with `\"val\"` |\n| `E[attr^=\"val\"]`     | Type `E` elements where `attr` starts with `\"val\"`                         |\n| `E[attr$=\"val\"]`     | Type `E` elements where `attr` ends with `\"val\"`                           |\n| `E[attr*=\"val\"]`     | Type `E` elements where `attr` contains `\"val\"`                            |\n\n- `handler` _: (element: Element) => void_\n  - A callback function that will be called once for each element that matches `selector`\n\n### Return value\n\nThe `HTMLRewritingStream`, so multiple calls to `onElement` can be chained.\n\n### Exceptions\n\n- `Error`\n  - If the provided `selector` is not a valid CSS selector.\n  - If the provided `handler` is not a function.\n\n## Examples\n\n\nIn this example, we fetch an HTML page and use the HTML rewriter to add an attribute to all `div` tags and prepend the text `Header:` to all `h1` tags:\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { HTMLRewritingStream } from 'fastly:html-rewriter';\n\nasync function handleRequest(event) {\n  let transformer = new HTMLRewritingStream()\n    .onElement(\"h1\", e => e.prepend(\"Header: \"))\n    .onElement(\"div\", e => e.setAttribute(\"special-attribute\", \"top-secret\"));\n  let body = (await fetch(\"https://example.com/\")).body.pipeThrough(transformer);\n\n  return new Response(body, {\n    status: 200,\n    headers: new Headers({\n      \"content-type\": \"text/html; charset=utf-8\",\n    })\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/image-optimizer/Auto.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Auto`\n\nEnumerator options for [`imageOptimizerOptions.auto`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `AVIF` (`\"avif\"`) If the browser's Accept header indicates compatibility, deliver an AVIF image.\n- `WEBP` (`\"webp\"`)\tIf the browser's Accept header indicates compatibility, deliver a WebP image.\n\n## Examples\n\n```js\nimport { Auto, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      auto: Auto.AVIF\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/image-optimizer/BWAlgorithm.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `BWAlgorithm`\n\nEnumerator options for [`imageOptimizerOptions.bw`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Threshold` (`\"threshold\"`) Uses a luminance threshold to convert the image to black and white.\n- `Atkinson` (`\"atkinson\"`)\tUses [Atkinson dithering](https://en.wikipedia.org/wiki/Atkinson_dithering) to convert the image to black and white.\n\n\n## Examples\n\n```js\nimport { Region, BWAlgorithm } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      bw: BWAlgorithm.Threshold\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/image-optimizer/CropMode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `CropMode`\n\nEnumerator options for [`imageOptimizerOptions.crop.mode`](./imageOptimizerOptions.mdx) and `imageOptimizerOptions.precrop.mode`.\n\n## Constants\n\n- `Smart` (`\"smart\"`) Enables content-aware algorithms to attempt to crop the image to the desired aspect ratio while intelligently focusing on the most important visual content, including the detection of faces.\n- `Safe` (`\"safe\"`)\tAllow cropping out-of-bounds regions.\n\n## Examples\n\n```js\nimport { CropMode, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      crop: {\n        size: { ratio: { width: 4, height: 3 } },\n        mode: CropMode.Smart,\n      }\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/image-optimizer/Disable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Disable`\n\nEnumerator options for [`imageOptimizerOptions.disable`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Upscale` (`\"upscale\"`) Prevent images being resized such that the output image's dimensions are larger than the source image.\n\n## Examples\n\n```js\nimport { Disable, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      width: 2560,\n      disable: Disable.Upscale\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/image-optimizer/Enable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Enable`\n\nEnumerator options for [`imageOptimizerOptions.enable`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Upscale` (`\"upscale\"`) Allow images to be resized such that the output image's dimensions are larger than the source image.\n\n## Examples\n\n```js\nimport { Enable, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      width: 2560,\n      enable: Enable.Upscale\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/image-optimizer/Fit.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Fit`\n\nEnumerator options for [`imageOptimizerOptions.fit`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Bounds` (`\"bounds\"`) Resize the image to fit entirely within the specified region, making one dimension smaller if needed.\n- `Cover` (`\"cover\"`) Resize the image to entirely cover the specified region, making one dimension larger if needed.\n- `Crop` (`\"crop\"`) Resize and crop the image centrally to exactly fit the specified region.\n\n## Examples\n\n```js\nimport { Fit, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      width: 150,\n      height; 150,\n      fit: Fit.Bounds\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/image-optimizer/Format.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Format`\n\nEnumerator options for [`imageOptimizerOptions.format`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Auto` (`\"auto\"`) Automatically use the best format based on browser support and image/transform characteristics\n- `AVIF` (`\"avif\"`) AVIF\n- `BJPG` (`\"bjpg\"`) Baseline JPEG \n- `GIF` (`\"gif\"`) Graphics Interchange Format\n- `JPG` (`\"jpg\"`) JPEG \n- `JXL` (`\"jxl\"`) JPEGXL \n- `MP4` (`\"mp4\"`) MP4 (H.264)\n- `PJPG` (`\"pjpg\"`) Progressive JPEG \n- `PJXL` (`\"pjxl\"`) Progressive JPEGXL\n- `PNG` (`\"png\"`) Portable Network Graphics\n- `PNG8` (`\"png8\"`) Portable Network Graphics palette image with 256 colors and 8-bit transparency\n- `SVG` (`\"svg\"`) Scalable Vector Graphics\n- `WEBP` (`\"webp\"`) WebP\n- `WEBPLL` (`\"webpll\"`) WebP (Lossless)\n- `WEBPLY` (`\"webply\"`) WebP (Lossy)\n\n## Examples\n\n```js\nimport { Format, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      format: Format.PNG\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/image-optimizer/Metadata.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Metadata`\n\nEnumerator options for [`imageOptimizerOptions.metadata`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Copyright` (`\"copyright\"`) Preserve [copyright notice](https://www.iptc.org/std/photometadata/specification/IPTC-PhotoMetadata#copyright-notice), creator, credit line, licensor, and web statement of rights fields.\n- `C2PA` (`\"c2pa\"`) Preserve the [C2PA manifest](https://c2pa.org/) and add any transformations performed by Fastly Image Optimizer.\n- `CopyRightAndC2PA` (`\"copyright,c2pa\"`) Resize and crop the image centrally to exactly fit the specified region.\n\n## Examples\n\n```js\nimport { Metadata, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      metadata: Metadata.Copyright\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/image-optimizer/Optimize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Optimize`\n\nEnumerator options for [`imageOptimizerOptions.optimize`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Low` (`\"low\"`) Output image quality will be similar to the input image quality.\n- `Medium` (`\"medium\"`) More optimization is allowed. We attempt to preserve the visual quality of the input image.\n- `High` (`\"high\"`) Minor visual artifacts may be visible. This produces the smallest file.\n\n## Examples\n\n```js\nimport { Optimize, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      optimize: Optimize.High\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/image-optimizer/Orient.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Orient`\n\nEnumerator options for [`imageOptimizerOptions.orient`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Default` (`\"1\"`) \n- `FlipHorizontal` (`\"2\"`) \n- `FlipHorizontalAndVertical` (`\"3\"`) \n- `FlipVertical` (`\"4\"`) \n- `FlipHorizontalOrientLeft` (`\"5\"`) \n- `OrientRight` (`\"6\"`) \n- `FlipHorizontalOrientRight` (`\"7\"`) \n- `OrientLeft` (`\"8\"`) \n\n## Examples\n\n```js\nimport { Orient, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      orient: Orient.FlipHorizontal\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/image-optimizer/Profile.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Profile`\n\nEnumerator options for [`imageOptimizerOptions.profile`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Baseline` (`\"baseline\"`) The profile recommended for video conferencing and mobile applications. (Default)\n- `Main` (`\"main\"`) The profile recommended for standard-definition broadcasts.\n- `High` (`\"high\"`) The profile recommended for high-definition broadcasts.\n\n## Examples\n\n```js\nimport { Profile, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      profile: Profile.Main\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/image-optimizer/Region.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Region`\n\nEnumerator options for [`imageOptimizerOptions.region`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `UsEast` (`\"us_east\"`)\n- `UsCentral` (`\"us_central\"`)\n- `UsWest` (`\"us_west\"`)\n- `EuCentral` (`\"eu_central\"`)\n- `EuWest` (`\"eu_west\"`)\n- `Asia` (`\"asia\"`)\n- `Australia` (`\"australia\"`)\n\n\n## Examples\n\n```js\nimport { Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/image-optimizer/ResizeFilter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `ResizeFilter`\n\nEnumerator options for [`imageOptimizerOptions.resizeFilter`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Nearest` (`\"nearest\"`) Uses the value of nearby translated pixel values.\n- `Bilinear` (`\"bilinear\"`) Uses an average of a 2x2 environment of pixels.\n- `Linear` (`\"linear\"`) Same as `Bilenear`.\n- `Bicubic` (`\"bicubic\"`) Uses an average of a 4x4 environment of pixels, weighing the innermost pixels higher.\n- `Cubic` (`\"cubic\"`) Same as `Bicubic`.\n- `Lanczos2` (`\"lanczos2\"`) Uses the Lanczos filter to increase the ability to detect edges and linear features within an image and uses sinc resampling to provide the best possible reconstruction.\n- `Lanczos3` (`\"lanczos3\"`) Lanczos3 uses a better approximation of the sinc resampling function. (Default)\n- `Lanczos` (`\"lanczos\"`) Same as `Lanczos3`.\n\n## Examples\n\n```js\nimport { ResizeFilter, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      width: 2560,\n      resizeFilter: ResizeFilter.Linear\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/image-optimizer/imageOptimizerOptions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `imageOptimizerOptions` \n\nOptions specified in the [`Request`](../globals/Request/Request.mdx) constructor for running the [Fastly Image Optimizer](https://docs.fastly.com/products/image-optimizer). More detailed documentation on all Image Optimizer options is available in the [Image Optimizer reference docs](https://www.fastly.com/documentation/reference/io/).\n\n## Parameters\n\nAll parameters other than `region` are optional.\n\n- `region`: _[`Region`](./Region.mdx)_ Where image optimizations should occur.\n- `auto`: _[`Auto`](./Auto.mdx)_ Enable optimization features automatically.\n- `bgColor`: _[`Color`](#color)_ Set the background color of an image.\n- `blur`: _`number` (0.5-1000) or [`Percentage`](#percentage)_ Set the blurriness of the output image.\n- `brightness`: _`number` (-100-100)_ Set the brightness of the output image.\n- `bw`: _[`BWAlgorithm`](./BWAlgorithm.mdx)_ Convert an image to black and white.\n- `canvas`: _`Object`_ Increase the size of the canvas around an image.\n    - `size`: _[`Size`](#size)_\n    - `position` (optional): _[`Position`](#position)_\n- `contrast`: _`number` (-100-100)_ Set the contrast of the output image.\n- `crop`: _`Object`_ Remove pixels from an image.\n    - `size`: _[`Size`](#size)_\n    - `position` (optional): _[`Position`](#position)_\n    - `mode` (optional): _[`CropMode`](./CropMode.mdx)_\n- `disable`: _[`Disable`](./Disable.mdx)_ Disable functionality that is enabled by default.\n- `dpr`: `number` Ratio between physical pixels and logical pixels.\n- `enable`: _[`Enable`](./Enable.mdx)_ Enable functionality that is disabled by default.\n- `fit`: _[`Fit`](./Fit.mdx)_ Set how the image will fit within the size bounds provided.\n- `format`: _[`Format`](./Format.mdx)_ Specify the output format to convert the image to.\n- `frame`: _`number` (must have the value 1)_ Extract the first frame from an animated image sequence.\n- `height`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ Resize the height of the image.\n- `level`: _`String` containing one of the [allowed values](https://www.fastly.com/documentation/reference/io/level/#allowed-values)_ Specify the level constraints when converting to video.\n- `metadata`: _[`Metadata`](./Metadata.mdx)_ Control which metadata fields are preserved during transformation.\n- `optimize`: _[`Optimize`](./Optimize.mdx)_ Automatically apply optimal quality compression.\n- `orient`: _[`Orient`](./Orient.mdx)_ Change the cardinal orientation of the image.\n- `pad`: _[`Sides`](#sides)_ Add pixels to the edge of an image.\n- `precrop`: _`Object`_ Remove pixels from an image before any other transformations occur.\n    - `size`: _[`Size`](#size)_\n    - `position`: _[`Position`](#position)_\n    - `mode`: _[`CropMode`](./CropMode.mdx)_\n- `profile`: _[`Profile`](./Profile.mdx)_ Specify the profile class of application when converting to video.\n- `quality`: _`integer` (1-100)_ Optimize the image to the given compression level for lossy file formatted images.\n- `resizeFilter`: _[`ResizeFilter`](./ResizeFilter.mdx)_ Specify the resize filter used when resizing images.\n- `saturation`: _`number` (-100-100)_ Set the saturation of the output image.\n- `sharpen`: _`Object`_ Set the sharpness of the output image.\n    - `amount`: _`number` (0-10)_\n    - `radius`: _`number` (0.5-1000)_\n    - `threshold`: _`integer` (0-255)_\n- `trim`: _[`Sides`](#sides)_ Remove pixels from the edge of an image.\n- `viewbox`: _`number` (must have the value 1)_ Remove explicit width and height properties in SVG output.\n- `width`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ Resize the width of the image.\n\n## Types\n\n### Color\n\nEither:\n\n- a 3 or 6 character hexadecimal string\n- an `Object` containing:\n    - `r`: _`integer` (0-255)_ Red component\n    - `g`: _`integer` (0-255)_ Green component\n    - `b`: _`integer` (0-255)_ Blue component\n    - `a` (optional): _`number` (0.0-1.0)_ Alpha component \n\n### Percentage\n\nA `String` containing a number suffixed with a percent sign (%).\n\n### Position\n\nAn `Object` containing:\n\n- Exactly one of:\n    - `x`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ \n    - `offsetX`: _`number` (interpreted as a percentage)_\n- Exactly one of: \n    - `y`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ \n    - `offsetY`: _`number` (interpreted as a percentage)_\n\n### Sides\n\nAn `Object` containing `top`, `bottom`, `left`, and `right`, all of which are either an `integer` or [`Percentage`](#percentage).\n\n### Size\n\nAn `Object` containing either:\n\n- `absolute`: _`Object`_\n    - `width`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ \n    - `height`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ \n- `ratio`: _`Object`_\n    - `width`: _`number`_\n    - `height`: _`number`_\n\n## Examples\n\n```js\nimport { Format, Orient, CropMode, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      format: Format.PNG,\n      bgColor: {\n        'r': 100,\n        'g': 255,\n        'b': 9,\n        'a': 0.5\n      },\n      blur: '1%',\n      brightness: -20,\n      contrast: -20,\n      height: 600,\n      level: '4.0',\n      orient: Orient.FlipVertical,\n      saturation: 80,\n      sharpen: { 'amount': 5, 'radius': 6, 'threshold': 44 },\n      canvas: { 'size': { 'absolute': { 'width': 400, 'height': 400 } } },\n      crop: { size: { absolute: { width: 200, height: 200 }, mode: CropMode.Safe } },\n      trim: { top: 10, left: 10, right: 10, bottom: 10 },\n      pad: { top: 30, left: 30, right: \"1%\", bottom: 30 }\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/index.mdx",
    "content": "---\nsidebar_position: 1\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n\n# JavaScript for Fastly Compute\n\nThis site is the full SDK reference for [`@fastly/js-compute`](https://www.npmjs.com/package/%40fastly/js-compute), the module that provides the interface between your JavaScript code and the [Fastly Compute](https://www.fastly.com) platform.\n\nIf you haven't used Fastly Compute before, start by [setting up your first Fastly Compute program](https://developer.fastly.com/learning/compute/) over on **developer.fastly.com** so that you have a working development environment.\n\nTo learn more about the fundamentals of using JavaScript with Fastly Compute, see our [using JavaScript](https://developer.fastly.com/learning/compute/javascript/) guide.\n\n## Understanding the JavaScript SDK\n\nIncoming HTTP requests to [domains that are attached to your Fastly service](https://developer.fastly.com/learning/concepts/) will start an instance of your application and invoke a `fetch` event, which can be bound using the `addEventListener` function:\n\n```js\naddEventListener(\"fetch\", event => event.respondWith(handleRequest(event)) );\n\nasync function handleRequest(event) {\n  const req = event.request;\n\n  return fetch(req, {\n    backend: \"example_backend\"\n  });\n}\n```\n\nFastly specific features are available as named imports from `fastly:` prefixed modules, all of which are documented in this site.  For example, the [env](https://js-compute-reference-docs.edgecompute.app/docs/fastly:env/env) function provides access to [environment variables](https://developer.fastly.com/reference/compute/ecp-env/) and can be imported into your application like this:\n\n```js\nimport { env } from \"fastly:env\"\n```\n\nJavaScript code compiled for Fastly Compute has access to a global environment with most of the globals you would expect in an ECMAScript runtime, like [`Date`](https://js-compute-reference-docs.edgecompute.app/docs/globals/Date/) and [`console`](https://js-compute-reference-docs.edgecompute.app/docs/globals/console/log).\n\n## Trying things out\n\n[Fastly fiddle](https://fiddle.fastly.dev) is an online web-based playground where you can run Fastly code.  You'll see fiddles included in many pages of our [developer hub](https://developer.fastly.com) and this SDK reference. These interactive examples can be executed right on the page by clicking the **RUN** tab:\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nasync function app(event) {\n    const request = event.request;\n    return new Response(\"You made a request to \" + request.url)\n}\naddEventListener(\"fetch\", event => {\n  event.respondWith(app(event));\n});\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nasync function app(event) {\n    const request = event.request;\n    return new Response(`You made a request to ${request.url}`)\n}\n\naddEventListener(\"fetch\", event => {\n  event.respondWith(app(event));\n});\n\n```\n\n</Fiddle>\n\nCheck out [`fiddle.fastly.dev`](https://fiddle.fastly.dev) to create your own.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/kv-store/KVStore/KVStore.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `KVStore()`\n\nThe **`KVStore` constructor** lets you connect your Fastly Compute application to a Fastly KV store.\n\nA Fastly KV store is a persistent, globally consistent key-value store. See [Data stores for Fastly services](https://developer.fastly.com/learning/concepts/edge-state/data-stores#kv-stores) for initialization and usage details.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew KVStore(name)\n```\n\n> **Note:** `KVStore()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Define a KV store instance using the resource link name.\n  \n### Return value\n\nA new `KVStore` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no KV Store exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name does not start with an ascii alphabetical character \n  - Thrown if the provided name contains control characters `(\\u0000-\\u001F)`\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then read back the value and return it to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/kv-store/KVStore/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# KVStore.prototype.delete\n\nDeletes the value associated with the key `key` in the KV store.\n\n## Syntax\n\n```js\ndelete(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the KV-store.\n\n### Return value\n\nReturns `undefined`\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is any of the strings `\"\"`, `\".\"`, or `\"..\"`\n    - Starts with the string `\".well-known/acme-challenge/\"`\n    - Contains any of the characters `\"#;?^|\\n\\r\"`\n    - Is longer than 1024 characters\n    - Does not exist\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then delete the entry.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n  await files.delete('hello')\n\n  const entry = await files.get('hello')\n  if (entry) {\n    return new Response(await entry.text())\n  } else {\n    return new Response('no file named hello exists')\n  }\n\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/kv-store/KVStore/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# KVStore.prototype.get\n\n▸ **get**(): `string`\n\nGets the value associated with the key `key` in the KV store.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the KV-store.\n\n### Return value\n\nIf the key does not exist in the KV store, this returns a `Promise` which resolves with `null`.\n\nIf the key does exist in the KV store, this returns a `Promise` which resolves with an `KVStoreEntry`.\n\n## Description\n\nSend the given message, converted to a string, to this KVStore instance's endpoint.\n\nThe `get()` method requires its `this` value to be a [`KVStore`](../KVStore.mdx) object.\n\nIf the `this` value does not inherit from `KVStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is any of the strings `\"\"`, `\".\"`, or `\"..\"`\n    - Starts with the string `\".well-known/acme-challenge/\"`\n    - Contains any of the characters `\"#;?^|\\n\\r\"`\n    - Is longer than 1024 characters\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then read back the value and return it to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/kv-store/KVStore/prototype/list.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStore.prototype.list\n\nThe **`list()`** can be used to list the keys of a store.\n\n## Syntax\n\n```js\nlist(options?)\n```\n\n### Parameters\n\n- `options` _: object_ _**optional**_\n  - List options supporting properties:\n  - `cursor` _: string_ _**optional**_\n    - The cursor used to pick up from a previous iteration.\n  - `limit` _: number_ _**optional**_\n    - The maximum number of keys to return.\n  - `prefix` _: string_ _**optional**_\n    - List only those keys that start with the given string prefix.\n  - `noSync` _: boolean_ _**optional**_\n    - Do not sync the key list first, instead provide a possibly out-of-date listing. May be faster but inconsistent.\n\n### Return value\n\nReturns a `Promise` which resolves with `{ list: string[], cursor: string | undefined }`.\n\n## Example\n\nIn this example we list the keys of a KV Store named `'files'`, iterating 10 at a time, counting the total;\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from 'fastly:kv-store';\n\nasync function app(event) {\n  const files = new KVStore('files');\n\n  let cursor,\n    list,\n    total = 0;\n  do {\n    ({ cursor, list } = await files.list({ limit: 10, cursor }));\n    total += list?.length;\n  } while (list);\n\n  return new Response(`Iterated ${total} entries`);\n}\n\naddEventListener('fetch', (event) => event.respondWith(app(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/kv-store/KVStore/prototype/put.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# KVStore.prototype.put\n\nThe **`put()`** method stores a `value` into the KV store under a `key`.\n\n> **Note**: KV stores are eventually consistent, this means that the updated contents associated with the key `key` may not be available to read from all edge locations immediately and some edge locations may continue returning the previous contents associated with the key.\n\n## Syntax\n\n```js\nput(key, value, options?)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to store the supplied value under within the KV store.\n- `value` _:  ArrayBuffer | TypedArray | DataView| ReadableStream | URLSearchParams | String | string literal_\n  - The value to store within the KV store.\n- `options` _: object_ _**optional**_\n  - An insert options parameter, supporting:\n  - `metadata` _: ArrayBuffer | TypedArray | DataView_ _**optional**_\n    - Binary metadata associated with the entry, may be up to 1000 bytes.\n  - `ttl` _: number_ _**optional**_\n    - TTL for the entry\n  - `mode` _: 'overwrite' | 'add' | 'append' | 'prepend'_ _**optional**_\n    - Insert mode, defaults to 'overwrite'\n  - `gen` _: number_ _**optional**_\n    - 'generation' header specific to the version of an entry key\n\n### Return value\n\nReturns a `Promise` which resolves with `undefined` when the provided `value` has been written into the KV store.\n\n## Description\n\nStores the supplied `value` into the KV store under the supplied `key`.\n\nThe `put()` method requires its `this` value to be a [`KVStore`](../KVStore.mdx) object.\n\nIf the `this` value does not inherit from `KVStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is any of the strings `\"\"`, `\".\"`, or `\"..\"`\n    - Starts with the string `\".well-known/acme-challenge/\"`\n    - Contains any of the characters `\"#;?^|\\n\\r\"`\n    - Is longer than 1024 characters\n- `TypeError`\n  - If the provided `gen`:\n    - Is not an number\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then read back the value and return it to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/kv-store/KVStoreEntry/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.arrayBuffer()\n\nThe `arrayBuffer()` method of the `KVStoreEntry` interface takes a `KVStoreEntry` stream and reads it to completion. It returns a promise that resolves with an `ArrayBuffer`.\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an `ArrayBuffer`."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/kv-store/KVStoreEntry/prototype/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.body\n\nThe `body` read-only property of the `KVStoreEntry` interface is a `ReadableStream` of the body contents.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/kv-store/KVStoreEntry/prototype/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.bodyUsed\n\nThe `bodyUsed` read-only property of the `KVStoreEntry` interface is a `boolean` value that indicates whether the body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/kv-store/KVStoreEntry/prototype/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.json()\n\nThe `json()` method of the `KVStoreEntry` interface takes a `KVStoreEntry` stream and reads it to completion. It returns a promise which resolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a JavaScript object. This object could be anything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/kv-store/KVStoreEntry/prototype/metadata.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.metadata()\n\nThe `metadata()` method of the `KVStoreEntry` interface provides the binary metadata associated with the `KVStoreEntry`.\n\nThe metadata binary may be up to 1000 bytes, and is returned as a `Uint8Array` TypedArray buffer, if metadata is set, or null otherwise.\n\n## Syntax\n\n```js\nmetadata()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a `Uint8Array` buffer object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/kv-store/KVStoreEntry/prototype/metadataText.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.metadataText()\n\nThe `metadataText()` method of the `KVStoreEntry` interface provides a String interpretation of binary metadata associated with the `KVStoreEntry`.\n\nIf the binary data is not a valid string, an encoding error will be thrown.\n\n## Syntax\n\n```js\nmetadataText()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a String.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/kv-store/KVStoreEntry/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.text()\n\nThe `text()` method of the `KVStoreEntry` interface takes a `KVStoreEntry` stream and reads it to completion. It returns a promise that resolves with a `String`. The `KVStoreEntry `is always decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a `String`."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/logger/Logger/Logger.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Logger()`\n\nThe **`Logger` constructor** lets you connect your Fastly Compute application to a [Fastly Named Logger](https://developer.fastly.com/learning/integrations/logging/).\n\n## Syntax\n\n```js\nnew Logger(name)\n```\n\n> **Note:** `Logger()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - The Fastly Logger which should be associated with this Logger instance\n\n### Return value\n\nA new `Logger` object.\n\n## Examples\n\nIn this example we have a create a logger named `\"splunk\"` and logs the incoming request method and destination.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Logger Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^3\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nasync function app (event) {\n  let logger = new Logger(\"splunk\");\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nconst logger = new Logger(\"splunk\");\nasync function app (event) {\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/logger/Logger/prototype/log.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Logger.prototype.log\n\n▸ **log**(): `string`\n\nSends the given message, converted to a string, to this Logger instance's endpoint.\n\n**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nlog(message)\n```\n\n### Return value\n\n`undefined`.\n\n## Description\n\nSend the given message, converted to a string, to this Logger instance's endpoint.\n\nThe `log()` method requires its `this` value to be a [`Logger`](../Logger.mdx) object.\n\nIf the `this` value does not inherit from `Logger.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n## Examples\n\nIn this example we have a create a logger named `\"splunk\"` and logs the incoming request method and destination.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Logger.prototype.log Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^3\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nlet logger = new Logger(\"splunk\");\nasync function app (event) {\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nasync function app (event) {\n  let logger = new Logger(\"splunk\");\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/logger/configureConsole.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# configureConsole\n\nThe **`configureConsole()`** function allows configuring the behaviour of the `console` global JS logger.\n\n## Syntax\n\n```js\nconfigureConsole(loggingOptions)\n```\n\n### Parameters\n\n- `loggingOptions` _: object_\n  - \n  - The name has to be between 1 and 254 characters inclusive.\n  - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n\n## Examples\n\nIn this example, we disable prefixing for `console.log` and use `stderr` output for `console.error`:\n\n```js\nimport { configureConsole } from \"fastly:logger\";\n\nconfigureConsole({\n  prefixing: false,\n  stderr: true\n});\n\nasync function handleRequest(event) {\n  console.log(JSON.stringify(event.request.headers));\n  const url = new URL(event.request.url);\n  try {\n    validate(url);\n  } catch (e) {\n    console.error(`Validation error: ${e}`);\n    return new Response('Bad Request', { status: 400 });\n  }\n  return new Response('OK');\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/migration-guide/index.mdx",
    "content": "---\nsidebar_position: 1\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Migrating from v2 to v3`\n\n## SimpleCache.delete renamed to SimpleCache.purge and requires purge options to be supplied as the second parameter\n\nWe are renaming because \"purge\" is already a well-known and documented concept for removing content from Fastly's cache.\n\nThe new addition of a second argument allows the caller to decide what scope to purge the content from, currently they can choose to purge from all of Fastly (\"global\") or from the POP that contains the currently executing instance (\"pop\"). We do not provide a default option right now, in the future we may provide a default option, if we discover a common pattern is being used.\n\nHere is an example of migrating an application using `SimpleCache.delete` to `SimpleCache.purge` with the same purging behaviour:\n```diff\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const url = new URL(event.request);\n  const path = url.pathname;\n  if (url.searchParams.has('delete')) {\n-    SimpleCache.delete(path);\n+    SimpleCache.purge(path, { scope: \"global\" });\n    return new Response(page, { status: 204 });\n  }\n\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n\n```\n\n\n# `Migrating from v1 to v2`\n\n## ObjectStore renamed to KVStore\n\nWe have renamed the `ObjectStore` class to `KVStore`, and the module name from `fastly:object-store` to `fastly:kv-store`.\n\nYou will need to update your code to use the new class name and module name.\n\nBelow is the change that would need to be made for the imported module name:\n```diff\n- import { ObjectStore } from 'fastly:object-store';\n+ import { KVStore } from 'fastly:kv-store';\n```\n\nAnd this is the change that would need to be made for constructing an instance of the class:\n```diff\n- const store = new ObjectStore('my-store');\n+ const store = new KVStore('my-store');\n```\n\n\nHere is a full example of migrating an application from ObjectStore to KVStore:\n```diff\n/// <reference types=\"@fastly/js-compute\" />\n\n- import { ObjectStore } from 'fastly:object-store';\n+ import { KVStore } from 'fastly:kv-store';\n\nasync function app(event) {\n-   const files = new ObjectStore('files');\n+   const files = new KVStore('files');\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/secret-store/SecretStore/SecretStore.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `SecretStore()`\n\nThe **`SecretStore` constructor** lets you connect your Fastly Compute application to a Fastly Secret store.\n\nA secret store is a persistent, globally distributed store for secrets accessible to Fastly Compute services during request processing.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew SecretStore(name)\n```\n\n> **Note:** `SecretStore()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Define a Secret Store instance using the resource link name.\n  \n### Return value\n\nA new `SecretStore` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Secret Store exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name contains characters other than letters, numbers, dashes (-), underscores (_), and periods (.)\n\n## Examples\n\nIn this example we connect to a Secret Store named `'secrets'` and retrieve a secret named `'cat-api-key'` use the value in a Request header.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SecretStore } from \"fastly:secret-store\";\n\nasync function app(event) {\n  const secrets = new SecretStore('secrets')\n\n  const catApiKey = await secrets.get('cat-api-key')\n\n  return fetch('/api/cat', {\n    headers: {\n      'cat-api-key': catApiKey.plaintext()\n    }\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/secret-store/SecretStore/fromBytes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# fromBytes\n\nThe **`fromBytes()`** function is used to create an in-memory secret from an array buffer.\n\n>**Note**: This API should be avoided when possible, by instead using [SecretStore.prototype.get](./prototype/get.mdx) to obtain secure secrets.\n\n## Syntax\n\n```js\nfromBytes(new Uint8Array([1, 2, 3]))\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns a `SecretStoreEntry`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/secret-store/SecretStore/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SecretStore.prototype.get\n\n▸ **get**(): `string`\n\nGets the value associated with the key `key` in the Secret store.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the Secret Store.\n\n### Return value\n\nIf the key does not exist in the Secret Store, this returns a `Promise` which resolves with `null`.\n\nIf the key does exist in the Secret Store, this returns a `Promise` which resolves with an `SecretStoreEntry`.\n\n## Description\n\nSend the given message, converted to a string, to this SecretStore instance's endpoint.\n\nThe `get()` method requires its `this` value to be a [`SecretStore`](../SecretStore.mdx) object.\n\nIf the `this` value does not inherit from `SecretStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Is longer than 255 characters\n    - Contains characters other than letters, numbers, dashes (-), underscores (_), and periods (.)\n\n## Examples\n\nIn this example we connect to a Secret Store named `'secrets'` and retrieve a secret named `'cat-api-key'` use the value in a Request header.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SecretStore } from \"fastly:secret-store\";\n\nasync function app(event) {\n  const secrets = new SecretStore('secrets')\n\n  const catApiKey = await secrets.get('cat-api-key')\n\n  return fetch('/api/cat', {\n    headers: {\n      'cat-api-key': catApiKey.plaintext()\n    }\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/secret-store/SecretStoreEntry/prototype/plaintext.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SecretStoreEntry.prototype.plaintext\n\n▸ **plaintext**(): `string`\n\nReturns the plaintext contents of the SecretStoreEntry instance as String.\n\n## Syntax\n\n```js\nplaintext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA String\n\n### Exceptions\n\nThe `plaintext()` method requires its `this` value to be a `SecretStoreEntry` object.\nIf the `this` value does not inherit from `SecretStoreEntry.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n## Examples\n\nIn this example we connect to a Secret Store named `'secrets'` and retrieve a secret named `'cat-api-key'` use the value in a Request header.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SecretStore } from \"fastly:secret-store\";\n\nasync function app(event) {\n  const secrets = new SecretStore('secrets')\n\n  const catApiKey = await secrets.get('cat-api-key')\n\n  return fetch('/api/cat', {\n    headers: {\n      'cat-api-key': catApiKey.plaintext()\n    }\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/secret-store/SecretStoreEntry/prototype/rawBytes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SecretStoreEntry.prototype.rawBytes\n\n▸ **rawBytes**(): `Uint8Array`\n\nReturns the raw byte contents of the SecretStoreEntry instance as a Uint8Array.\n\n## Syntax\n\n```js\nrawBytes()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Uint8Array\n\n### Exceptions\n\nThe `rawBytes()` method requires its `this` value to be a `SecretStoreEntry` object.\nIf the `this` value does not inherit from `SecretStoreEntry.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/security/inspect.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# inspect\n\nThe **`inspect()`** function inspects a request using the [Fastly Next-Gen WAF](https://docs.fastly.com/en/ngwaf/).\n\n## Syntax\n\n```js\ninspect(request, config);\n```\n\n### Parameters\n\n- `request` _: Request_\n  - The Request to get a WAF determination for.\n- `config` _: object_\n  - `corp` _: string_\n    - Set a corp name for the configuration.\n    - This parameter is currently required.\n  - `workspace` _: string_\n    - Set a workspace name for the configuration.\n    - This parameter is currently required.\n  - `overrideClientIp` _: string_\n    - Specify an explicit client IP address to inspect.\n    - By default, `inspect` will use the IP address that made the request to the\n      running Compute service, but you may want to use a different IP when\n      service chaining or if requests are proxied from outside of Fastly’s\n      network.\n\n### Return value\n\nReturns an `Object` with the `inspect` response, with the following fields:\n\n- `waf_response` _: number_\n  - Security status code.\n  \n- `redirect_url` _: string | null_\n  - A redirect URL returned from Security.\n\n- `tags` _: string[]_\n  - Tags returned by Security.\n\n- `verdict` _: string_\n  - The outcome of inspecting a request with Security. It can be one of the following:\n    - `\"allow\"`\n      - Security indicated that this request is allowed.\n    - `\"block\"`\n      - Security indicated that this request should be blocked.\n    - `\"unauthorized\"`\n      - Security indicated that this service is not authorized to inspect a request.\n    - Other verdicts may be returned but not currently documented.\n\n- `decision_ms` _: number_\n  - How long Security spent determining its verdict, in milliseconds.\n  \n## Examples\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { inspect } from \"fastly:security\";\n\nasync function app(event) {\n  const res = inspect(event.request, {\n    corp: \"mycorp\",\n    workspace: \"myws\"\n  });\n  switch (res.verdict) {\n    case \"allow\":\n      return await fetch(event.request);\n    case \"block\":\n      return new Response(\"Request Blocked\", { status: 400 });\n    case \"unauthorized\":\n      return new Response(\"Unauthorized\", { status: 401 });\n    default:\n      return new Response(\"idk\", { status: 500 });\n  }\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/shielding/Shield/Shield.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `Shield()`\n\nLoad information about the given shield.\n\nReturns an object representing the shield if it is active, or throws an exception if the string is malformed or the shield doesn’t exist.\n\nShield names are defined on [this webpage](https://www.fastly.com/documentation/guides/concepts/shielding/#shield-locations), in the “shield code” column. For example, the string “pdx-or-us” will look up our Portland, OR, USA shield site, while “paris-fr” will look up our Paris site.\n\nIf you are using a major cloud provider for your primary origin site, consider looking at the “Recommended for” column, to find the Fastly POP most closely located to the given cloud provider.\n\n## Syntax\n\n```js\nnew Shield(name)\n```\n\n> **Note:** `Shield()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Shield exists with the provided name\n\n## Examples\n\nIn this example, we create a Shield instance for the Sydney, Australia shield POP. If the code is running on that shield POP, it fetches directly from origin. Otherwise, it routes the request through the shield using an encrypted connection.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n    \nimport { Shield } from \"fastly:shielding\";\n\nasync function app(event) {\n    const shield = new Shield('wsi-australia-au');\n    // If running on the shield POP, fetch from the origin directly\n    if (shield.runningOn()) {\n        return await fetch('https://http-me.fastly.com/anything', { backend: 'httpme' });\n    }\n    // Otherwise, route the request through the shield using an encrypted connection\n    return await fetch(event.request, { backend: shield.encryptedBackend() });\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/shielding/Shield/prototype/encryptedBackend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Shield.prototype.encryptedBackend\n\n▸ **encryptedBackend**(configuration?): `Backend`\n\nReturns a `Backend` representing an encrypted connection to the POP.\n\nFor reference, this is almost always the backend that you want to use. Only use [`Shield::unencryptedBackend`](./unencryptedBackend.mdx) in situations in which you are 100% sure that all the data you will send and receive over the backend is already encrypted.\n\n## Parameters\n\n- `configuration` _: object_ _**optional**_\n  - `firstByteTimeout` _: number_ _**optional**_\n    - An optional first byte timeout (in milliseconds) to set on the returned backend.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/shielding/Shield/prototype/runningOn.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Shield.prototype.runningOn\n\n▸ **runningOn**(): `boolean`\n\nReturns whether we are currently operating on the given shield.\n\nTechnically, this may also return true in very isolated incidents in which Fastly is routing traffic from the target shield POP to the POP that this code is running on, but in these situations the results should be approximately identical.\n\n(For example, it may be the case that you are asking to shield to ‘pdx-or-us’. But, for load balancing, performance, or other reasons, Fastly is temporarily shifting shielding traffic from Portland to Seattle. In that case, this function may return true for hosts running on ‘bfi-wa-us’, our Seattle site, because effectively the shield has moved to that location. This should give you a slightly faster experience than the alternative, in which this function would return false, you would try to forward your traffic to the Portland site, and then that traffic would be caught and redirected back to Seattle.)\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/shielding/Shield/prototype/unencryptedBackend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Shield.prototype.unencryptedBackend\n\n▸ **unencryptedBackend**(configuration?): `Backend`\n\nReturns a `Backend` representing an unencrypted connection to the POP.\n\nGenerally speaking, we encourage users to use [`Shield::encryptedBackend`](./encryptedBackend.mdx) instead of this function. Data sent over this backend – the unencrypted version – will be sent over the open internet, with no protections. In most cases, this is not what you want. However, in some cases – such as when you want to ship large data blobs that you know are already encrypted — using these backends can prevent a double-encryption performance penalty.\n\n## Parameters\n\n- `configuration` _: object_ _**optional**_\n  - `firstByteTimeout` _: number_ _**optional**_\n    - An optional first byte timeout (in milliseconds) to set on the returned backend."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.0/websocket/createWebsocketHandoff.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# createWebsocketHandoff\n\nThe **`createWebsocketHandoff()`** function creates a Response instance which informs Fastly to pass the original Request through Websocket, to the declared backend.\n\n## Syntax\n\n```js\ncreateWebsocketHandoff(request, backend)\n```\n\n### Parameters\n\n- `request` _: Request_\n  - The request to pass through Websocket.\n- `backend` _: string_\n  - The name of the backend that Websocket should send the request to.\n  - The name has to be between 1 and 254 characters inclusive.\n  - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n\n### Return value\n\nA Response instance is returned, which can then be used via `event.respondWith`.\n\n## Examples\n\nIn this example application requests to the path `/stream` and sent handled via Websocket.\n\n```js\nimport { createWebsocketHandoff } from \"fastly:websocket\";\n\nasync function handleRequest(event) {\n  try {\n    const url = new URL(event.request.url);\n    if (url.pathname === '/stream') {\n      return createWebsocketHandoff(event.request, 'websocket_backend');\n    } else {\n      return new Response('oopsie, make a request to /stream for some websocket goodies', { status: 404 });\n    }\n  } catch (error) {\n    console.error({error});\n    return new Response(error.message, {status:500})\n  }\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/acl/Acl/open.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Acl.open()\n\nOpens the ACL with the given name, returning a new `Acl` instance with the given name on success.\n\n## Syntax\n\n```js\nAcl.open(name)\n```\n\n### Return value\n\nAn `Acl` instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/acl/Acl/prototype/lookup.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Acl.prototype.lookup()\n\nThe **`lookup(ipAddress)`** method returns the name associated with the `Acl` instance.\n\n## Syntax\n\n```js\nacl.lookup(ipAddress)\n```\n\n### Parameters\n\n- `ipAddress` _: string_\n  - IPv4 or IPv6 address to lookup\n\n### Return value\n\nAn Object of the form `{ action: 'ALLOW' | 'BlOCK', prefix: string }`, where `prefix` is the IP\naddress prefix that was matched in the ACL.\n\n## Example\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Acl } from 'fastly:acl';\naddEventListener('fetch', async (evt) => {\n  const myAcl = Acl.open('myacl');\n  const match = await myAcl.lookup(evt.client.address);\n  evt.respondWith(new Response(match?.action === 'BLOCK' ? 'blocked' : 'allowed'));\n});\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/backend/Backend/Backend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Backend()`\n\nThe **`Backend` constructor** lets you dynamically create new [Fastly Backends](https://developer.fastly.com/reference/api/services/backend/) for your Fastly Compute service.\n\n>**Note**: Dynamic backends are by default disabled at the Fastly service level. Contact [Fastly Support](https://support.fastly.com/hc/en-us/requests/new?ticket_form_id=360000269711) to request dynamic backends on Fastly Services.\n\nTo disable the usage of dynamic backends, see [enforceExplicitBackends](../enforceExplicitBackends.mdx).\n\n## Syntax\n\n```js\nnew Backend(backendConfiguration)\n```\n\n> **Note:** `Backend()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `backendConfiguration`\n\n  - : An Object which contains all the configuration options to apply to the newly created Backend.\n\n    - `name` _: string_\n      - The name of the backend.\n      - The name has to be between 1 and 254 characters inclusive.\n      - The name can be whatever you would like, as long as it does not match the name of any of the static service backends nor match any other dynamic backends built during a single execution of the application.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n    - `target` _: string_\n      - A hostname, IPv4, or IPv6 address for the backend as well as an optional port.\n      - The target has to be at-least 1 character.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. Is null, undefined, an empty string, not a valid IP address or host, or is the string `::`\n    - `hostOverride` _: string_ _**optional**_\n      - If set, will force the HTTP Host header on connections to this backend to be the supplied value.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `connectTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for a connection to this backend to be established.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `firstByteTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `betweenBytesTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend.\n      - If exceeded, the response received so far will be considered complete and the fetch will end.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `useSSL` _: boolean_ _**optional**_\n      - Whether or not to require TLS for connections to this backend.\n    - `dontPool` _: boolean_ _**optional**_\n      - Determine whether or not connections to the same backend should be pooled across different sessions.\n      - Fastly considers two backends “the same” if they're registered with the same name and the exact same settings.\n      - In those cases, when pooling is enabled, if Session 1 opens a connection to this backend it will be left open, and can be re-used by Session 2.\n      - This can help improve backend latency, by removing the need for the initial network / TLS handshake(s).\n      - By default, pooling is enabled for dynamic backends.\n    - `tlsMinVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Minimum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `tlsMaxVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Maximum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `certificateHostname` _: string_ _**optional**_\n      - Define the hostname that the server certificate should declare.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `caCertificate` _: string_ _**optional**_\n      - The CA certificate to use when checking the validity of the backend.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `ciphers` _: string_ _**optional**_\n      - List of OpenSSL ciphers to support for connections to this origin.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - [List of ciphers supported by Fastly](https://developer.fastly.com/learning/concepts/routing-traffic-to-fastly/#use-a-tls-configuration).\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `sniHostname` _: string_ _**optional**_\n      - The SNI hostname to use on connections to this backend.\n      - Throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `clientCertificate` _: object_ _**optional**_\n      - The client certificate to provide for the TLS handshake\n      - `certificate` _: string_\n        - The PEM certificate string.\n      - `key` _: SecretStoreEntry_\n        - The `SecretStoreEntry` to use for the key, created via [`SecretStore.prototype.get`](../../fastly:secret-store/SecretStore/prototype/get.mdx) or alteratively via [`SecretStore.fromBytes`](../../fastly:secret-store/SecretStore/fromBytes.mdx).\n    - `httpKeepalive` _: number_ _**optional**_\n      - Enable HTTP keepalive, setting the timout in milliseconds.\n    - `tcpKeepalive` _: boolean | object_ _**optional**_\n      - Enable TCP keepalive. When an object, optionally setting the keepalive configuration options.\n      - `timeSecs` _: number_ _**optional**_\n        - Configure how long to wait after the last sent data over the TCP connection before starting to send TCP keepalive probes.\n      - `intervalSecs` _: number_ _**optional**_\n        - Configure how long to wait between each TCP keepalive probe sent to the backend to determine if it is still active.\n      - `probes` _: number_ _**optional**_\n        - Number of probes to send to the backend before it is considered dead.\n    - `grpc` _: boolean_ _**optional**_\n      - **_Experimental feature_**\n      - When enabled, sets that this backend is to be used for gRPC traffic. \n      - _Warning: When using this experimental feature, no guarantees are provided for behaviours for backends that do not provide gRPC traffic._\n\nAll optional generic options can have their defaults set via [`setDefaultDynamicBackendConfig()`](../setDefaultDynamicBackendConfig.mdx).\n\nThis includes all configuration options above except for `name`, `target`, `hostOverride`, `sniHostname` and `grpc`.\n\n### Return value\n\nA new `Backend` object.\n\n## Examples\n\nIn this example an explicit Dynamic Backend is created and supplied to the fetch request, the response is then returned to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Explicit Dynamic Backend Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\",\n    connectTimeout: 1000,\n    firstByteTimeout: 15000,\n    betweenBytesTimeout: 10000,\n    useSSL: true,\n    tlsMinVersion: 1.3,\n    tlsMaxVersion: 1.3,\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\",\n    connectTimeout: 1000,\n    firstByteTimeout: 15000,\n    betweenBytesTimeout: 10000,\n    useSSL: true,\n    tlsMinVersion: 1.3,\n    tlsMaxVersion: 1.3,\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/backend/Backend/exists.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.exists()\n\nThe **`Backend.exists()`** method returns a boolean indicating if a Backend with the given name exists or not.\n\n## Syntax\n\n```js\nexists(name)\n```\n\n### Return value\n\nA boolean indicating if a Backend with the given name exists or not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/backend/Backend/fromName.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.fromName()\n\nReturns the `Backend` instance with the given name, if one exists. If one does not exist, an error is thrown.\n\n## Syntax\n\n```js\nfromName(name)\n```\n\n### Return value\n\nA `Backend` instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/backend/Backend/health.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.health()\n\n:::info\n\nThis method is deprecated, use [`Backend.prototype.health`](./prototype/health.mdx) instead.\n\n:::\n\nThe **`Backend.health()`** method returns a string representing the health of the given Backend instance.\n\n## Syntax\n\n```js\nBackend.health(backend)\n```\n\n### Return value\n\nA string representing the health of the specified Backend value.\n\nPossible values are:\n- `\"healthy\"` - The backend's health check has succeeded, indicating the backend is working as expected and should receive requests.\n- `\"unhealthy\"` - The backend's health check has failed, indicating the backend is not working as expected and should not receive requests.\n- `\"unknown\"` - The backend does not have a health check configured.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/backend/Backend/prototype/betweenBytesTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.betweenBytesTimeout\n\nThe read-only **`betweenBytesTimeout`** property of a `Backend` instance is an integer number\nproviding the between bytes timeout for this backend in milliseconds.\n\nWhen not set or in environments that do not support this property (such as Viceroy), `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/backend/Backend/prototype/connectTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.connectTimeout\n\nThe read-only **`connectTimeout`** property of a `Backend` instance is an integer number\nproviding the connect timeout for this backend in milliseconds.\n\nWhen not set or in environments that do not support this property (such as Viceroy), `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/backend/Backend/prototype/firstByteTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.firstByteTimeout\n\nThe read-only **`firstByteTimeout`** property of a `Backend` instance is an integer number\nproviding the first byte timeout for this backend in milliseconds.\n\nWhen not set or in environments that do not support this property (such as Viceroy), `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/backend/Backend/prototype/health.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.prototype.health()\n\nThe **`Backend.prototype.health()`** method returns a string representing the health of the given Backend instance.\n\n## Syntax\n\n```js\nhealth()\n```\n\n### Return value\n\nA string representing the health of the specified Backend value.\n\nPossible values are:\n- `\"healthy\"` - The backend's health check has succeeded, indicating the backend is working as expected and should receive requests.\n- `\"unhealthy\"` - The backend's health check has failed, indicating the backend is not working as expected and should not receive requests.\n- `\"unknown\"` - The backend does not have a health check configured.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/backend/Backend/prototype/hostOverride.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.hostOverride\n\nThe read-only **`hostOverride`** property of a `Backend` instance is the host header\noverride string used when sending requests to this backend.\n\n## Value\n\nA `string`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/backend/Backend/prototype/httpKeepaliveTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.httpKeepaliveTime\n\nThe read-only **`httpKeepaliveTime`** property of a `Backend` instance is the HTTP keepalive\ntime for this backend in milliseconds, or 0 if no keepalive is set.\n\n## Value\n\nA `number`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/backend/Backend/prototype/isDynamic.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.isDynamic\n\nThe read-only **`isDynamic`** property of a `Backend` instance is a boolean\nindicating if the backend was dynamically created for this service.\n\n## Value\n\nA `boolean`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/backend/Backend/prototype/isSSL.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.isSSL\n\nThe read-only **`isSSL`** property of a `Backend` instance is a boolean\nindicating if the backend is using an SSL connection.\n\n## Value\n\nA `boolean`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/backend/Backend/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# name\n\nThe read-only **`name`** property of the backend returns the backend name string.\n\n## Value\n\nA `string`.\n\n## Description\n\nProvides the name of the backend.\n\n## Examples\n\n### Using name\n\nThe following example logs the string value of a [Backend](../Backend.mdx) object:\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Backend.prototype.name Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\\\"@fastly/js-compute\\\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.name); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.name); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/backend/Backend/prototype/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.port\n\nThe read-only **`port`** property of a `Backend` instance is the port number\nof this backend.\n\n## Value\n\nA `number`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/backend/Backend/prototype/target.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.target\n\nThe read-only **`target`** property of a `Backend` instance is the host string\nthis backend is configured to use.\n\n## Value\n\nA `string`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/backend/Backend/prototype/tcpKeepalive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.tcpKeepalive\n\nThe read-only **`tcpKeepalive`** property of a `Backend` instance returns an object providing\nthe TCP keepalive configuration, if any, otherwise returning `null` if TCP keepalive is not enabled.\n\nThis object has the following properties:\n- `timeSecs` _: number or null._\n  - Configure how long to wait after the last sent data over the TCP connection before starting to send TCP keepalive probes.\n- `intervalSecs` _: number or null._\n  - Configure how long to wait between each TCP keepalive probe sent to the backend to determine if it is still active.\n- `probes` _: number or null._\n  - Number of probes to send to the backend before it is considered dead.\n\n## Value\n\nA `Object` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/backend/Backend/prototype/tlsMaxVersion.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.tlsMaxVersion\n\nThe read-only **`tlsMaxVersion`** property of a `Backend` instance is the max TLS version\nit is configured to use, as a number, either `1.0`, `1.1`, `1.2`, or `1.3`.\n\nWhen not used, or for environments that do not support this feature, such as Viceroy, `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/backend/Backend/prototype/tlsMinVersion.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.tlsMinVersion\n\nThe read-only **`tlsMinVersion`** property of a `Backend` instance is the max TLS version\nit is configured to use, as a number, either `1.0`, `1.1`, `1.2`, or `1.3`.\n\nWhen not used, or for environments that do not support this feature, such as Viceroy, `null`\nmay be returned.\n\n## Value\n\nA `number` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/backend/Backend/prototype/toName.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Backend.prototype.toName()\n\n:::info\n\nThis method is deprecated, use [`Backend.prototype.name`](./name.mdx) instead.\n\n:::\n\nThe **`toName()`** method returns the name associated with the `Backend` instance.\n\n## Syntax\n\n```js\ntoName()\n```\n\n### Return value\n\nA string which contains the name of the Backend.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/backend/Backend/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# toString\n\n:::info\n\nThis method is deprecated, use [`Backend.prototype.name`](./name.mdx) instead.\n\n:::\n\nThe **`toString()`** method returns a string representing the specified Backend value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified Backend value.\n\n## Description\n\nThe [Backend](../Backend.mdx) object overrides the `toString()` method of [Object](../../../globals//Object/Object.mdx); it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For [Backend](../Backend.mdx) values, the `toString` method returns the name given to the [Backend](../Backend.mdx) object during construction.\n\nThe `toString()` method requires its `this` value to be a [Backend](../Backend.mdx) object.\n\nIf the `this` value does not inherit from `Backend.prototype`, a [TypeError](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n## Examples\n\n### Using toString()\n\nThe following example logs the string value of a [Backend](../Backend.mdx) object:\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Backend.prototype.toString Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\\\"@fastly/js-compute\\\" />\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.toString()); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\nimport { Backend } from \"fastly:backend\";\nasync function app() {\n  const backend = new Backend({\n    name: \"fastly\",\n    target: \"fastly.com\",\n  });\n  console.log(backend.toString()); // \"fastly\"\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/backend/allowDynamicBackends.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# allowDynamicBackends\n\n:::info\n\nThis method is deprecated, and dynamic backends are now always supported when enabled at the service level. See [`enforceExplicitBackends`](./enforceExplicitBackends.mdx) instead.\n\n:::\n\nThe **`allowDynamicBackends()`** function is used to control whether or not Dynamic Backends should be allowed within this Fastly Compute Service.\n\nBy default, Dynamic Backends are enabled, but can be a potential security concern since third-party JavaScript code may send arbitrary requests, potentially including sensitive/secret data, off to destinations that the JavaScript project was not intending.\n\nUsing `allowDynamicBackends(false)` this security property can be restored to only use explicit backend definitions.\n\n>**Note**: By default, while dynamic backends are allowed in the SDK, they are by default disabled at the Fastly service level.\n\n## Syntax\n\n```js\nallowDynamicBackends(enabledOrConfig)\n```\n\n### Parameters\n\n- `enabled` _: boolean_\n  - Whether or not to allow Dynamic Backends\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/backend/enforceExplicitBackends.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# enforceExplicitBackends\n\nCall this function to enforce the security property of explicitly-defined backends, even when dynamic backends are enabled at\nthe Fastly service level.\n\nBy default, if dynamic backends are supported for the Fastly service, they will be automatically used when creating a new\n`fetch()` request. This default behaviour for dynamic backends can be a potential security concern since third-party JavaScript\ncode may send arbitrary requests, including sensitive/secret data, off to destinations that the JavaScript project was not\nintending.\n\nWhen calling this function, an optional default backend name can be provided.\n\n>**Note**: This is a separate option to the service-level dynamic backend support for Fastly services, which is by deault disabled for Fastly services.\n\nThe **`enforceExplicitBackends()`** function is used to control whether or not Dynamic Backends should be allowed within this Fastly Compute Service.\n\nBy default, Dynamic Backends are enabled, but can be a potential security concern since third-party JavaScript code may send arbitrary requests, potentially including sensitive/secret data, off to destinations that the JavaScript project was not intending.\n\nUsing `allowDynamicBackends(false)` this security property can be restored to only use explicit backend definitions.\n\n>**Note**: Dynamic Backends are disabled by default for Fastly Services. Please contact [Fastly Support](https://support.fastly.com/hc/requests/new?ticket_form_id=360000269711) to request the feature be enabled or disabled on Fastly Services.\n\n## Syntax\n\n```js\nenforceExplicitBackends(defaultBackend?)\n```\n\n### Parameters\n\n- `defaultBackend` _: string_ _**optional**_\n  - An optional default backend string name to use in `fetch()` requests.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/backend/setDefaultDynamicBackendConfig.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# setDefaultDynamicBackendConfig()\n\nThe **`setDefaultDynamicBackendConfig()`** allows setting backend configuration defaults that should apply to any newly created dynamic backends via the `new Backend()` constructor.\n\n### Parameters\n\n- `defaultDynamicBackendConfig`\n\n  - : An Object which contains the generic configuration options to apply to newly created Backends.\n    - `connectTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for a connection to this backend to be established.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `firstByteTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent.\n      - If exceeded, the connection is aborted and a 503 response will be presented instead.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `betweenBytesTimeout` _: number_ _**optional**_\n      - Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend.\n      - If exceeded, the response received so far will be considered complete and the fetch will end.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n    - `useSSL` _: boolean_ _**optional**_\n      - Whether or not to require TLS for connections to this backend.\n    - `dontPool` _: boolean_ _**optional**_\n      - Determine whether or not connections to the same backend should be pooled across different sessions.\n      - Fastly considers two backends “the same” if they're registered with the same name and the exact same settings.\n      - In those cases, when pooling is enabled, if Session 1 opens a connection to this backend it will be left open, and can be re-used by Session 2.\n      - This can help improve backend latency, by removing the need for the initial network / TLS handshake(s).\n      - By default, pooling is enabled for dynamic backends.\n    - `tlsMinVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Minimum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `tlsMaxVersion` _: 1 | 1.1 | 1.2 | 1.3_ _**optional**_\n      - Maximum allowed TLS version on SSL connections to this backend.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is not 1, 1.1, 1.2, or 1.3\n    - `certificateHostname` _: string_ _**optional**_\n      - Define the hostname that the server certificate should declare.\n      - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `caCertificate` _: string_ _**optional**_\n      - The CA certificate to use when checking the validity of the backend.\n      - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `ciphers` _: string_ _**optional**_\n      - List of OpenSSL ciphers to support for connections to this origin.\n      - If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n      - [List of ciphers supported by Fastly](https://developer.fastly.com/learning/concepts/routing-traffic-to-fastly/#use-a-tls-configuration).\n      - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is an empty string.\n    - `clientCertificate` _: object_ _**optional**_\n      - The client certificate to provide for the TLS handshake\n      - `certificate` _: string_\n        - The PEM certificate string.\n      - `key` _: SecretStoreEntry_\n        - The `SecretStoreEntry` to use for the key, created via [`SecretStore.prototype.get`](../fastly:secret-store/SecretStore/prototype/get.mdx) or alteratively via [`SecretStore.fromBytes`](../fastly:secret-store/SecretStore/fromBytes.mdx).\n    - `httpKeepalive` _: number_ _**optional**_\n      - Enable HTTP keepalive, setting the timout in milliseconds.\n    - `tcpKeepalive` _: boolean | object_ _**optional**_\n      - Enable TCP keepalive. When an object, optionally setting the keepalive configuration options.\n      - `timeSecs` _: number_ _**optional**_\n        - Configure how long to wait after the last sent data over the TCP connection before starting to send TCP keepalive probes.\n      - `intervalSecs` _: number_ _**optional**_\n        - Configure how long to wait between each TCP keepalive probe sent to the backend to determine if it is still active.\n      - `probes` _: number_ _**optional**_\n        - Number of probes to send to the backend before it is considered dead.\n\n## Syntax\n\n```js\nsetDefaultDynamicBackendConfig(defaultConfig)\n```\n\n### Return value\n\nNone.\n\n## Examples\n\nIn this example an explicit Dynamic Backend is created and supplied to the fetch request, with timeouts and TLS options provided from the default backend configuration options.\n\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Explicit Dynamic Backend Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nimport { Backend, setDefaultDynamicBackendConfig } from \"fastly:backend\";\nallowDynamicBackends(true);\nsetDefaultDynamicBackendConfig({\n  connectTimeout: 1000,\n  firstByteTimeout: 15_000,\n  betweenBytesTimeout: 10_000,\n  useSSL: true,\n  sslMinVersion: 1.3,\n  sslMaxVersion: 1.3\n});\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  // Timeouts and TLS configuration still get set from the default backend configuration above.\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\"\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nimport { Backend } from \"fastly:backend\";\nallowDynamicBackends(true);\nsetDefaultDynamicBackendConfig({\n  connectTimeout: 1000,\n  firstByteTimeout: 15_000,\n  betweenBytesTimeout: 10_000,\n  useSSL: true,\n  sslMinVersion: 1.3,\n  sslMaxVersion: 1.3\n});\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  const backend = new Backend({\n    name: 'fastly',\n    target: 'fastly.com',\n    hostOverride: \"www.fastly.com\"\n  });\n  return fetch('https://www.fastly.com/', {\n    backend // Here we are configuring this request to use the backend from above.\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/cache/CacheEntry/age.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.age\n\nThe **`age`** method of the `CacheEntry` interface returns the current age in milliseconds of the cached item.\n\n## Syntax\n\n```js\nage()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the current age in milliseconds of the cached item."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/cache/CacheEntry/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.body\n\nThe **`body`** method of the `CacheEntry` interface retrieves the cached item contents as a `ReadableStream`.\n\nOnly one stream can be active at a time for a given `CacheEntry`. An error will be thrown if a stream is already active for this `CacheEntry`.\n\n## Syntax\n\n```js\nbody(options)\n```\n\n### Parameters\n\n- `options` _: object_ __optional__\n  - `start` _: number_\n    - The offset from which to start the range.\n  - `end` _: number_\n    - How long the range should be.\n\n### Return value\n\nA `ReadableStream` which contains the cached item contents."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/cache/CacheEntry/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.close\n\nThe **`close`** method of the `CacheEntry` interface closes the connection to the cache for this `CacheEntry`.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/cache/CacheEntry/hits.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.hits\n\nThe **`hits`** method of the `CacheEntry` interface returns the amount of cache hits for the cached item.\n\nNote: this hit count only reflects the view of the server that supplied the cached item. Due to clustering, this count may vary between potentially many servers within the data center where the item is cached. See the [clustering documentation](https://developer.fastly.com/learning/vcl/clustering/) for details, though note that the exact caching architecture of Compute is different from VCL services.\n\n## Syntax\n\n```js\nhits()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the number of cache hits to this cached item.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/cache/CacheEntry/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.length\n\nThe **`length`** method of the `CacheEntry` interface returns the size in bytes of the cached item, if known, otherwise returns `null` if the length is currently unknown.\n\nThe length of the cached item may be unknown if the item is currently being streamed into the cache without a fixed length.\n\n## Syntax\n\n```js\nlength()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` or `null` which represents the current length of the cached item.\n\n`null` is returned if the length is currently unknown."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/cache/CacheEntry/maxAge.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.maxAge\n\nThe **`maxAge`** method of the `CacheEntry` interface returns the time in milliseconds for which the cached item is considered fresh.\n\n## Syntax\n\n```js\nmaxAge()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the time in milliseconds for which the cached item is considered fresh."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/cache/CacheEntry/staleWhileRevalidate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.staleWhileRevalidate\n\nThe **`staleWhileRevalidate`** method of the `CacheEntry` interface returns the time in milliseconds for which a cached item can safely be used despite being considered stale.\n\n## Syntax\n\n```js\nstaleWhileRevalidate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the time in milliseconds for which a cached item can safely be used despite being considered stale."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/cache/CacheEntry/state.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.state\n\nThe **`state`** method of the `CacheEntry` interface returns a `CacheState` instance which reflects the current state of this `CacheEntry` instance.\n\n## Syntax\n\n```js\nstate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `CacheState` instance which reflects the current state of this `CacheEntry` instance."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/cache/CacheEntry/userMetadata.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheEntry.userMetadata\n\nThe **`userMetadata`** method of the `CacheEntry` interface returns the user-controlled metadata associated with the cached item.\n\n## Syntax\n\n```js\nuserMetadata()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nAn `ArrayBuffer` which contains the user-controlled metadata associated with the cached item."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/cache/CacheState/found.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheState.found\n\nThe **`found`** method of the `CacheState` interface returns `true` if a cached item was located.\n\nEven if an cached item is found, the cached item might be stale and require updating. Use `mustInsertOrUpdate()` to determine whether this transaction client is expected to update the cached item.\n\n## Syntax\n\n```js\nfound()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `boolean` which represents whether a cached item was located or not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/cache/CacheState/mustInsertOrUpdate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheState.mustInsertOrUpdate\n\nThe **`mustInsertOrUpdate`** method of the `CacheState` interface returns `true` if a fresh cache item was not found, and this transaction client is expected to insert a new item or update a stale item.\n\n\n## Syntax\n\n```js\nmustInsertOrUpdate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `boolean` which represents whether a fresh cached item was found not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/cache/CacheState/stale.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheState.stale\n\nThe **`stale`** method of the `CacheState` interface returns `true` if the cached item is stale.\n\nA cached item is stale if its age is greater than its `maxAge` period.\n\n## Syntax\n\n```js\nstale()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `boolean` which represents whether the cached item is stale or not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/cache/CacheState/usable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CacheState.usable\n\nThe **`usable`** method of the `CacheState` interface returns `true` if the cached item is usable.\n\nA cached item is usable if its age is less than the sum of the `maxAge` and `staleWhileRevalidate` periods.\n\n## Syntax\n\n```js\nusable()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `boolean` which represents whether a cached item is usable or not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/cache/CoreCache/insert.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CoreCache.insert\n\nPerforms a non-transactional insertion into the cache, returning a `FastlyBody` instance for providing the cached object itself.\nFor the insertion to complete successfully, the object must be written into the returned `FastlyBody` instance, and then `FastlyBody.protoype.close` must be called.\nIf `FastlyBody.prototype.close` does not get called, the insertion is considered incomplete, and any concurrent lookups that may be reading from the object as it is streamed into the cache may encounter a streaming error.\n\nNote: Like `CoreCache.lookup()`, `CoreCache.insert()` may race with concurrent lookups or insertions, and will unconditionally overwrite existing cached items rather than allowing for revalidation of an existing object.\nThe transactional equivalent of this function is `TransactionCacheEntry.insert()`, which may only be called following a `CoreCache.transactionLookup()` call and the returned `CacheEntry` when has a state where `CacheState.mustInsertOrUpdate()` returns true.\n\n## Syntax\n\n```js\ninsert(key, options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - A cache key which is a string with a length of up to 8,135 that identify a cached item.\n  - The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n- `options` _: object_\n  - `headers` _: HeadersInit_ __optional__\n    - The headers act as additional factors in object selection, and the choice of which headers to factor in is determined during insertion, via the `vary` property within `TransactionInsertOptions`.\n    - A lookup will succeed when there is at least one cached item that matches lookup’s `key`, and all of the lookup’s headers included in the cache items’ `vary` list match the corresponding headers in that cached item.\n    - A typical example is a cached HTTP response, where the request had an \"Accept-Encoding\" header. In that case, the origin server may or may not decide on a given encoding, and whether that same response is suitable for a request with a different (or missing) Accept-Encoding header is determined by whether Accept-Encoding is listed in Vary header in the origin’s response.\n    - Note: These headers are narrowly useful for implementing cache lookups incorporating the semantics of the HTTP Vary header.\n  - `maxAge` _: number_ __optional__\n    - Sets the “time to live” for the cache item in milliseconds: The time for which the item will be considered fresh.\n  - `vary` _: array_ __optional__\n    - Sets the list of headers that must match when looking up this cached item.\n  - `initialAge` _: number_ __optional__\n    - Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n    - The initial age is 0 by default.\n  - `staleWhileRevalidate` _: number_ __optional__\n    - Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n    - Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n    - The methods `CacheState.protoype.usable` and `CacheState.protoype.stale` can be used to determine the current state of an item.\n    - The stale-while-revalidate period is 0 by default.\n  - `surrogateKeys` _: array_ __optional__\n    - Sets the surrogate keys that can be used for purging this cached item.\n    - Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item’s TTL to elapse, or overwriting the item with insert().\n    - Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n    - [See the Fastly surrogate keys guide for details.](https://docs.fastly.com/en/guides/working-with-surrogate-keys)\n  - `length` _: number_ __optional__\n    - Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n    - It is preferable to provide a length, if possible.\n    - Clients that begin streaming the item’s contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n  - `userMetadata` _: ArrayBufferView | ArrayBuffer | URLSearchParams | string_ __optional__\n    - Sets the user-defined metadata to associate with the cached item.\n  - `sensitive` _: boolean_ __optional__\n    - Enable or disable PCI/HIPAA-compliant non-volatile caching.\n    - By default, this is false.\n    - [See the Fastly PCI-Compliant Caching and Delivery documentation for details.](https://docs.fastly.com/products/pci-compliant-caching-and-delivery)\n\n### Return value\n\nReturns a `FastlyBody`.\n\n### Exceptions\n\n- If the provided `key`:\n  - Cannot be coerced to a string\n  - Is an empty string\n  - Is longer than 8135 characters\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/cache/CoreCache/lookup.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# CoreCache.lookup\n\nPerform a non-transactional lookup into the cache, returning a CacheEntry if a usable cached item was found.\nA cached item is usable if its age is less than the sum of its TTL and its stale-while-revalidate period. Items beyond that age are unusably stale.\n\nNote: A non-transactional lookup will not attempt to coordinate with any concurrent cache lookups.\nIf two instances of the service perform a lookup at the same time for the same cache key, and the item is not yet cached, they will both return `null`.\nWithout further coordination, they may both end up performing the work needed to insert() the item (which usually involves origin requests and/or computation) and racing with each other to insert.\nTo resolve such races between concurrent lookups, use `CoreCache.transactionLookup()` instead.\n\n## Syntax\n\n```js\nlookup(key, options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - A cache key which is a string with a length of up to 8,135 that identify a cached item.\n  - The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n\n- `options` _: object_\n  - `headers` _: HeadersInit_ __optional__\n    - The headers act as additional factors in object selection, and the choice of which headers to factor in is determined during insertion, via the `vary` property within `TransactionInsertOptions`.\n    - A lookup will succeed when there is at least one cached item that matches lookup’s `key`, and all of the lookup’s headers included in the cache items’ `vary` list match the corresponding headers in that cached item.\n    - A typical example is a cached HTTP response, where the request had an \"Accept-Encoding\" header. In that case, the origin server may or may not decide on a given encoding, and whether that same response is suitable for a request with a different (or missing) Accept-Encoding header is determined by whether Accept-Encoding is listed in Vary header in the origin’s response.\n    - Note: These headers are narrowly useful for implementing cache lookups incorporating the semantics of the HTTP Vary header.\n\n### Return value\n\nReturns `CacheEntry` if a usable cached item was found, otherwise returns `null`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/cache/CoreCache/transactionLookup.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# CoreCache.transactionLookup\n\nPerform a transactional lookup into the cache, returning a `TransactionCacheEntry` instance.\n\nTransactions coordinate between concurrent actions on the same cache key, incorporating concepts of [request collapsing](https://developer.fastly.com/learning/concepts/request-collapsing/) and [revalidation](https://developer.fastly.com/learning/concepts/stale/), though at a lower level that does not automatically interpret HTTP semantics.\n\nRequest Collapsing:\nIf there are multiple concurrent calls to `CoreCache.transactionLookup()` for the same item and that item is not present,\njust one of the callers will be instructed to insert the item into the cache as part of the transaction.\nThe other callers will block until the metadata for the item has been inserted, and can then begin streaming its contents out of the cache at the same time that the inserting caller streams them into the cache.\n\nRevalidation:\nSimilarly, if an item is usable but stale, and multiple callers attempt a `CoreCache.transactionLookup()` concurrently, they will all be given access to the stale item, but only one will be designated to perform an asynchronous update (or insertion) to freshen the item in the cache.\n\n## Syntax\n\n```js\ntransactionLookup(key, options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - A cache key which is a string with a length of up to 8,135 that identify a cached item.\n  - The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n\n- `options` _: object_\n  - `headers` _: HeadersInit_ __optional__\n    - The headers act as additional factors in object selection, and the choice of which headers to factor in is determined during insertion, via the `vary` property within `TransactionInsertOptions`.\n    - A lookup will succeed when there is at least one cached item that matches lookup’s `key`, and all of the lookup’s headers included in the cache items’ `vary` list match the corresponding headers in that cached item.\n    - A typical example is a cached HTTP response, where the request had an \"Accept-Encoding\" header. In that case, the origin server may or may not decide on a given encoding, and whether that same response is suitable for a request with a different (or missing) Accept-Encoding header is determined by whether Accept-Encoding is listed in Vary header in the origin’s response.\n    - Note: These headers are narrowly useful for implementing cache lookups incorporating the semantics of the HTTP Vary header.\n\n### Return value\n\nReturns an instance of `TransactionCacheEntry`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/cache/SimpleCache/SimpleCache.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `SimpleCache`\n\nThe **`SimpleCache` class** provides a simplified interface to inserting and retrieving entries from Fastly's Cache.\n\nAll the methods on the class are static methods, there are no instance methods.\n\n\n## Examples\n\nIn this example we attempt to retrieve an entry from the Fastly Cache, if the entry does not exist, we create the content and insert it into the Fastly Cache before finally returning.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const path = new URL(event.request.url).pathname;\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/cache/SimpleCache/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCache.get\n\n▸ **get**(): `string`\n\nGets the entry associated with the key `key` from the cache.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the cache.\n\n### Return value\n\nIf the key does not exist in the cache, this returns `null`.\n\nIf the key does exist in the cache, this returns a `SimpleCacheEntry`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n## Examples\n\nIn this example we attempt to retrieve an entry from the Fastly Cache, and return a message stating whether the entry was in the Fastly Cache or not.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const path = new URL(event.request.url).pathname;\n  let page = SimpleCache.get(path);\n  return new Response(page ? `${path} is in the cache` : `${path} is not in the cache`, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/cache/SimpleCache/getOrSet.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCache.getOrSet\n\nThe **`getOrSet()`** method attempts to get an entry from the cache for the supplied `key`. If no entry is found (or has expired), the supplied `set` function is executed and its result is inserted into the cache under the supplied `key` and for the supplied `ttl` (Time-To-Live) duration, provided in seconds.\n\n## Syntax\n\n```js\ngetOrSet(key, set)\ngetOrSet(key, set, length)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to lookup and/or store the supplied entry under within the cache.\n- `set` _:  Function_\n  - The function to execute if and only if the cache does not have a usable entry for the supplied `key`.\n    The function should return a Promise which resolves with the following interface:\n    - `value` _:  ArrayBuffer | TypedArray | DataView | ReadableStream | URLSearchParams | String | string literal_\n      - The value to store within the cache.\n    - `ttl` _: number_\n      - The maximum number of seconds to store the supplied entry in the cache.\n    - `length` _: number_ __optional__\n      - The length of the value being stored within the cache. This is only used when the `value` is a `ReadableStream`.\n\n### Return value\n\nReturns a `SimpleCacheEntry`.\n\n### Exceptions\n\n- If the provided `key`:\n  - Cannot be coerced to a string\n  - Is an empty string\n  - Is longer than 8135 characters\n- If the provided `ttl`:\n  - Cannot be coerced to a number\n  - Is a negative number\n  - Is `NaN`\n  - Is Inifinity\n\n## Examples\n\nIn this example we attempt to retrieve an entry from the Fastly Cache. If the entry does not exist, we create the content and insert it into the Fastly Cache before finally returning.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const path = new URL(event.request.url).pathname;\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/cache/SimpleCache/purge.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# SimpleCache.purge\n\npurge the entry associated with the key `key` from the cache.\n\n## Syntax\n\n```js\npurge(key, options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to purge from within the cache.\n\n- `options` _: object_\n  - `scope` _: string_\n    - : Where to purge the content from.\n    - Possible values are:\n      - \"global\" - This will remove the content from all of Fastly.\n      - \"pop\" - This will remove the content from the POP that contains the currently executing instance.\n\n### Return value\n\nReturns `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Cannot be coerced to a string\n    - Is longer than 8135 characters\n\n## Examples\n\nIn this example, when a request contains a `purge` querystring parameter, we purge the an entry from the cache.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const url = new URL(event.request.url);\n  const path = url.pathname;\n  if (url.searchParams.has('purge')) {\n    SimpleCache.purge(path, { scope: \"global\" });\n    return new Response(page, { status: 204 });\n  }\n\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/cache/SimpleCacheEntry/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the `SimpleCacheEntry` interface\ntakes the instance's stream and reads it to completion. It returns a promise\nthat resolves with an `ArrayBuffer`.\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an `ArrayBuffer`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/cache/SimpleCacheEntry/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.body\n\nThe **`body`** read-only property of the `SimpleCacheEntry` interface is a `ReadableStream` of the instance's contents.\n\n## Value\n\nA `ReadableStream`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/cache/SimpleCacheEntry/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.bodyUsed\n\nThe **`bodyUsed`** read-only property of the `SimpleCacheEntry` interface is a boolean value that indicates whether the body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/cache/SimpleCacheEntry/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.json()\n\nThe **`json()`** method of the `SimpleCacheEntry` interface takes\na `SimpleCacheEntry` stream and reads it to completion. It returns a promise which\nresolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a JavaScript object. This object could be\nanything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/cache/SimpleCacheEntry/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SimpleCacheEntry.text()\n\nThe **`text()`** method of the `SimpleCacheEntry` interface takes the instance's stream and reads it to completion.\nIt returns a promise that resolves with a `String`.\nThe result is _always_ decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Promise that resolves with a `String`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/cache/TransactionCacheEntry/age.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.age\n\nThe **`age`** method of the `TransactionCacheEntry` interface returns the current age in milliseconds of the cached item.\n\n## Syntax\n\n```js\nage()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the current age in milliseconds of the cached item."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/cache/TransactionCacheEntry/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.body\n\nThe **`body`** method of the `TransactionCacheEntry` interface retrieves the cached item contents as a `ReadableStream`.\n\nOnly one stream can be active at a time for a given `TransactionCacheEntry`. An error will be thrown if a stream is already active for this `TransactionCacheEntry`.\n\n## Syntax\n\n```js\nbody(options)\n```\n\n### Parameters\n\n- `options` _: object_ __optional__\n  - `start` _: number_\n    - The offset from which to start the range.\n  - `end` _: number_\n    - How long the range should be.\n\n### Return value\n\nA `ReadableStream` which contains the cached item contents."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/cache/TransactionCacheEntry/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.cancel\n\nThe **`cancel`** method of the `TransactionCacheEntry` interface cancels an obligation to provide an object to the cache.\n\n\n## Syntax\n\n```js\ncancel()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/cache/TransactionCacheEntry/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.close\n\nThe **`close`** method of the `TransactionCacheEntry` interface closes the connection to the cache for this `TransactionCacheEntry`.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/cache/TransactionCacheEntry/hits.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.hits\n\nThe **`hits`** method of the `TransactionCacheEntry` interface returns the amount of cache hits for the cached item.\n\nNote: this hit count only reflects the view of the server that supplied the cached item. Due to clustering, this count may vary between potentially many servers within the data center where the item is cached. See the [clustering documentation](https://developer.fastly.com/learning/vcl/clustering/) for details, though note that the exact caching architecture of Compute is different from VCL services.\n\n## Syntax\n\n```js\nhits()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the number of cache hits to this cached item.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/cache/TransactionCacheEntry/insert.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.insert\n\nPerform a transactional cache insertion, returning a `FastlyBody` instance for providing the cached object itself.\n\nThis method should only be called when `TransactionCacheEntry.state().mustInsertOrUpdate()` is true; otherwise, an error will be thrown when attempting to perform the insertion.\n\n## Syntax\n\n```js\ninsert(options)\n```\n\n### Parameters\n\n- `options` _: object_\n  - `maxAge` _: number_ __optional__\n    - Sets the “time to live” for the cache item in milliseconds: The time for which the item will be considered fresh.\n  - `vary` _: array_ __optional__\n    - Sets the list of headers that must match when looking up this cached item.\n  - `initialAge` _: number_ __optional__\n    - Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n    - The initial age is 0 by default.\n  - `staleWhileRevalidate` _: number_ __optional__\n    - Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n    - Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n    - The methods `CacheState.protoype.usable` and `CacheState.protoype.stale` can be used to determine the current state of an item.\n    - The stale-while-revalidate period is 0 by default.\n  - `surrogateKeys` _: array_ __optional__\n    - Sets the surrogate keys that can be used for purging this cached item.\n    - Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item’s TTL to elapse, or overwriting the item with insert().\n    - Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n    - [See the Fastly surrogate keys guide for details.](https://docs.fastly.com/en/guides/working-with-surrogate-keys)\n  - `length` _: number_ __optional__\n    - Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n    - It is preferable to provide a length, if possible.\n    - Clients that begin streaming the item's contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n  - `userMetadata` _: ArrayBufferView | ArrayBuffer | URLSearchParams | string_ __optional__\n    - Sets the user-defined metadata to associate with the cached item.\n  - `sensitive` _: boolean_ __optional__\n    - Enable or disable PCI/HIPAA-compliant non-volatile caching.\n    - By default, this is false.\n    - [See the Fastly PCI-Compliant Caching and Delivery documentation for details.](https://docs.fastly.com/products/pci-compliant-caching-and-delivery)\n\n### Return value\n\nReturns a `FastlyBody`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/cache/TransactionCacheEntry/insertAndStreamBack.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.insertAndStreamBack\n\nPerform a transaction cache insertion, returning a `FastlyBody` instance for providing the cached object itself, and a `CacheEntry` instance which can be used to stream out the newly-inserted cache item.\n\nFor the insertion to complete successfully, the object must be written into the returned `FastlyBody` instance, and then `FastlyBody.protoype.close` must be called.\nIf `FastlyBody.prototype.close` does not get called, the insertion is considered incomplete, and any concurrent lookups that may be reading from the object as it is streamed into the cache may encounter a streaming error.\n\n## Syntax\n\n```js\ninsertAndStreamBack(options)\n```\n\n### Parameters\n\n- `options` _: object_\n  - `maxAge` _: number_ __optional__\n    - Sets the “time to live” for the cache item in milliseconds: The time for which the item will be considered fresh.\n  - `vary` _: array_ __optional__\n    - Sets the list of headers that must match when looking up this cached item.\n  - `initialAge` _: number_ __optional__\n    - Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n    - The initial age is 0 by default.\n  - `staleWhileRevalidate` _: number_ __optional__\n    - Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n    - Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n    - The methods `CacheState.protoype.usable` and `CacheState.protoype.stale` can be used to determine the current state of an item.\n    - The stale-while-revalidate period is 0 by default.\n  - `surrogateKeys` _: array_ __optional__\n    - Sets the surrogate keys that can be used for purging this cached item.\n    - Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item’s TTL to elapse, or overwriting the item with insert().\n    - Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n    - [See the Fastly surrogate keys guide for details.](https://docs.fastly.com/en/guides/working-with-surrogate-keys)\n  - `length` _: number_ __optional__\n    - Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n    - It is preferable to provide a length, if possible.\n    - Clients that begin streaming the item's contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n  - `userMetadata` _: ArrayBufferView | ArrayBuffer | URLSearchParams | string_ __optional__\n    - Sets the user-defined metadata to associate with the cached item.\n  - `sensitive` _: boolean_ __optional__\n    - Enable or disable PCI/HIPAA-compliant non-volatile caching.\n    - By default, this is false.\n    - [See the Fastly PCI-Compliant Caching and Delivery documentation for details.](https://docs.fastly.com/products/pci-compliant-caching-and-delivery)\n\n### Return value\n\nReturns an array where the first item is a `FastlyBody` instance and the second item is a `CacheEntry` instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/cache/TransactionCacheEntry/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.length\n\nThe **`length`** method of the `TransactionCacheEntry` interface returns the size in bytes of the cached item, if known, otherwise returns `null` if the length is currently unknown.\n\nThe length of the cached item may be unknown if the item is currently being streamed into the cache without a fixed length.\n\n## Syntax\n\n```js\nlength()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` or `null` which represents the current length of the cached item.\n\n`null` is returned if the length is currently unknown."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/cache/TransactionCacheEntry/maxAge.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.maxAge\n\nThe **`maxAge`** method of the `TransactionCacheEntry` interface returns the time in milliseconds for which the cached item is considered fresh.\n\n## Syntax\n\n```js\nmaxAge()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the time in milliseconds for which the cached item is considered fresh."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/cache/TransactionCacheEntry/staleWhileRevalidate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.staleWhileRevalidate\n\nThe **`staleWhileRevalidate`** method of the `TransactionCacheEntry` interface returns the time in milliseconds for which a cached item can safely be used despite being considered stale.\n\n## Syntax\n\n```js\nstaleWhileRevalidate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `number` which represents the time in milliseconds for which a cached item can safely be used despite being considered stale."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/cache/TransactionCacheEntry/state.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.state\n\nThe **`state`** method of the `TransactionCacheEntry` interface returns a `CacheState` instance which reflects the current state of this `TransactionCacheEntry` instance.\n\n## Syntax\n\n```js\nstate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `CacheState` instance which reflects the current state of this `TransactionCacheEntry` instance."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/cache/TransactionCacheEntry/update.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.update\n\nPerform an update of the cache item's metadata.\n\n## Syntax\n\n```js\nupdate(options)\n```\n\n### Parameters\n\n- `key` _: string_\n  - A cache key which is a string with a length of up to 8,135 that identify a cached item.\n  - The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n- `options` _: object_\n  - `maxAge` _: number_ __optional__\n    - Sets the “time to live” for the cache item in milliseconds: The time for which the item will be considered fresh.\n  - `vary` _: array_ __optional__\n    - Sets the list of headers that must match when looking up this cached item.\n  - `initialAge` _: number_ __optional__\n    - Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n    - The initial age is 0 by default.\n  - `staleWhileRevalidate` _: number_ __optional__\n    - Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n    - Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n    - The methods `CacheState.protoype.usable` and `CacheState.protoype.stale` can be used to determine the current state of an item.\n    - The stale-while-revalidate period is 0 by default.\n  - `surrogateKeys` _: array_ __optional__\n    - Sets the surrogate keys that can be used for purging this cached item.\n    - Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item’s TTL to elapse, or overwriting the item with insert().\n    - Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n    - [See the Fastly surrogate keys guide for details.](https://docs.fastly.com/en/guides/working-with-surrogate-keys)\n  - `length` _: number_ __optional__\n    - Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n    - It is preferable to provide a length, if possible.\n    - Clients that begin streaming the item's contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n  - `userMetadata` _: ArrayBufferView | ArrayBuffer | URLSearchParams | string_ __optional__\n    - Sets the user-defined metadata to associate with the cached item.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/cache/TransactionCacheEntry/userMetadata.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransactionCacheEntry.userMetadata\n\nThe **`userMetadata`** method of the `TransactionCacheEntry` interface returns the user-controlled metadata associated with the cached item.\n\n## Syntax\n\n```js\nuserMetadata()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nAn `ArrayBuffer` which contains the user-controlled metadata associated with the cached item."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/cache-override/CacheOverride/CacheOverride.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `CacheOverride()`\n\nThe **`CacheOverride` constructor** lets you configure the caching behavior of a `Response`.\n\nNormally, the HTTP Headers on a [`Response`](../../globals/Response/Response.mdx) would control how the [`Response`](../../globals/Response/Response.mdx) is cached,\nbut `CacheOverride` can be set on a [`Request`](../../globals/Request/Request.mdx), to define custom caching behavior.\n\n## Syntax\n\n```js\nnew CacheOverride(mode)\nnew CacheOverride(mode, init)\nnew CacheOverride(init)\n```\n\n> **Note:** `CacheOverride()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `mode` _: string_\n  - Sets the cache override mode for a request\n  - If set to:\n    - `\"none\"`: Do not override the behavior specified in the origin response’s cache control headers.\n    - `\"pass\"`: Do not cache the response to this request, regardless of the origin response’s headers.\n    - `\"override\"`: Override particular cache control settings using the `CacheOverride` object's settings.\n       This options is also the default when providing an init object directly as the first argument.\n\n- `init`\n\n  - : An Object which contains all the configuration options to apply to the newly created `CacheOverride`.\n\n    - `pci` _: boolean_ _**optional**_\n      - Override the caching behavior of this request to enable or disable PCI/HIPAA-compliant non-volatile caching.\n      - By default, this is `false`, which means the request may not be PCI/HIPAA-compliant. Set it to `true` to enable compliant caching.\n      - See the [Fastly PCI-Compliant Caching and Delivery documentation](https://docs.fastly.com/products/pci-compliant-caching-and-delivery) for details.\n\n    - `surrogateKey` _: string_ _**optional**_\n      - Override the caching behavior of this request to include the given surrogate key, provided as a header value.\n      - See the [Fastly surrogate keys guide](https://docs.fastly.com/en/guides/purging-api-cache-with-surrogate-keys) for details.\n    - `swr` _: number_ _**optional**_\n      - Override the caching behavior of this request to use the given `stale-while-revalidate` time, in seconds\n\n    - `ttl` _: number_ _**optional**_\n      - Override the caching behavior of this request to use the given Time to Live (TTL), in seconds.\n    \n    - `beforeSend` _:Function_ _**optional**_\n      - `(request: Request) => void | PromiseLike<void>`\n      - Callback to be invoked if a request is going all the way to a backend, allowing the request to be modified beforehand.\n      - See [Modifying a request as it is forwarded to a backend](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/#modifying-a-request-as-it-is-forwarded-to-a-backend) in the Fastly cache interfaces documentation for details.\n\n    - `afterSend` _: Function_ _**optional**_\n      - `(response: Response) => void | CacheOptions | PromiseLike<void | CacheOptions>`\n      - Callback to be invoked after a response has been sent, but before it is stored into the cache.\n      - Where `CacheOptions` contains:\n        - `cache` _: boolean | 'uncacheable'_ _**optional**_\n          - Whether to cache this response. By default, leaving this field empty, responses will be cached based on their cache header information.\n          - Setting this to true or false will override this default cache behaviour, setting in the cache or not setting in the cache, even if the default behaviour would have been otherwise.\n          - Setting to 'uncacheable' the response will not only not be cached, but the cache will record that the originating request led to an uncacheable response, so that future cache lookups will result in immediately going to the backend, rather than attempting to coordinate concurrent requests to reduce backend traffic.\n          - See the [Fastly request collapsing guide](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/request-collapsing/) for more details on the mechanism that `uncacheable` disables.\n        - `bodyTransformFn` _: Function_ _**optional**_\n          - `(body: Uint8Array) => Uint8Array | PromiseLike<Uint8Array>`\n          - Provide a function to be used for transforming the response body prior to caching.\n          - Body transformations are performed by specifying a transform, rather than by directly working with the body during the onAfterSend callback function, because not every response contains a fresh body: 304 Not Modified responses, which are used to revalidate a stale cached response, are valuable precisely because they do not retransmit the body.\n          - For any other response status, the backend response will contain a relevant body, and the `bodyTransformFn` will be applied to it. The original backend body is passed in to the transform function, and the function is expected to return the new body.\n      - See [Controlling cache behavior based on backend response](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/#controlling-cache-behavior-based-on-backend-response) in the Fastly cache interfaces documentation for details.\n\n### Return value\n\nA new `CacheOverride` object.\n\n## Examples\n\nIn this example we override the cache for all the requests prefixed /static/ to have a long TTL (Time To Live),  and the home page to have a short TTL and a long SWR (Stale While Revalidate).\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"CacheOverride Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { CacheOverride } from \"fastly:cache-override\";\n// In this example we override the cache for all the requests prefixed /static/ \n// to have a long TTL (Time To Live), and the home page to have a short TTL and \n// a long SWR (Stale While Revalidate).\nasync function app (event) {\n  const path = (new URL(event.request.url)).pathname;\n  let cacheOverride;\n  if (path == '/') {\n    cacheOverride = new CacheOverride('override', {ttl: 10, swr: 86_400});\n  } else if (path.startsWith('/static/')) {\n    cacheOverride = new CacheOverride('override', {ttl: 86_400});\n  } else {\n    cacheOverride = new CacheOverride('none')\n  }\n  return fetch(event.request.url, {\n    cacheOverride,\n    backend: 'origin_0'\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { CacheOverride } from \"fastly:cache-override\";\n// In this example we override the cache for all the requests prefixed /static/ \n// to have a long TTL (Time To Live), and the home page to have a short TTL and \n// a long SWR (Stale While Revalidate).\nasync function app (event) {\n  const path = (new URL(event.request.url)).pathname;\n  let cacheOverride;\n  if (path == '/') {\n    cacheOverride = new CacheOverride('override', {ttl: 10, swr: 86_400});\n  } else if (path.startsWith('/static/')) {\n    cacheOverride = new CacheOverride('override', {ttl: 86_400});\n  } else {\n    cacheOverride = new CacheOverride('none')\n  }\n  return fetch(event.request.url, {\n    cacheOverride,\n    backend: 'origin_0'\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/compute/purgeSurrogateKey.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# purgeSurrogateKey\n\nThe **`purgeSurrogateKey()`** function is used to purge the given surrogate key string from Fastly's cache.\n\nThere are two purge modes: soft purge and hard purge, with hard purge as the default which clears all items\nfrom the cache immediately. When using a soft purge, stale entries are maintained in the cache, reducing\norgin load, while also enabling stale revalidations.\n\nSee the [Fastly Purge Documentation](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/purging/#surrogate-key-purge) for more information on caching and purge operations.\n\n## Syntax\n\n```js\npurgeSurrogateKey(surrogateKey, soft?)\n```\n\n### Parameters\n\n- `surrogateKey` _: string_\n  - The surrogate key string\n- `soft?` _: boolean_\n  - Enables a soft purge, retaining stale entries in the cache. Default is a hard purge.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/compute/vCpuTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# vCpuTime\n\nThe **`vCpuTime()`** function provides the vCPU time used by the current request handler in milliseconds.\n\n## Syntax\n\n```js\nvCpuTime()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`number`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/config-store/ConfigStore/ConfigStore.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `ConfigStore()`\n\nThe **`ConfigStore` constructor** lets you access a specific [Fastly Config Store](https://www.fastly.com/documentation/reference/api/services/resources/config-store/).\n\n> **Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew ConfigStore(name);\n```\n\n> **Note:** `ConfigStore()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Defines a config store instance using the resource link name.\n\n### Return value\n\nA new `ConfigStore` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Config Store exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name does not start with an ascii alphabetical character \n  - Thrown if the provided name does not contain only ascii alphanumeric, underscore, and whitespace characters\n\n## Examples\n\nIn this example we have a resource link named \"animals\" (which is linked to a config store) and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"ConfigStore Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/config-store/ConfigStore/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# ConfigStore.prototype.get\n\nThe **`get()`** method returns the value associated with the provided key in the config-store. If the provided key does not exist in the ConfigStore then this returns `null`.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from the dictionary.\n\n### Return value\n\nA `string` representing the specified ConfigStore value or `null` if the key does not exist in the ConfigStore\n\n## Description\n\nGet a value for a key in the config-store. If the provided key does not exist in the ConfigStore then this returns `null`.\n\nThe `get()` method requires its `this` value to be a [`ConfigStore`](../../../fastly%3Aconfig-store/ConfigStore/ConfigStore.mdx) object.\n\nIf the `this` value does not inherit from `ConfigStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided key is longer than 255 in length\n  - Thrown if the provided key is an empty string\n\n## Examples\n\nIn this example we have an Edge Dictionary named \"animals\" and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"ConfigStore Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { ConfigStore } from \"fastly:config-store\";\nasync function app (event) {\n  const config = new ConfigStore('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/device/Device/lookup.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Device.lookup()\n\nLook up the data associated with a particular User-Agent string.\n\n\n## Syntax\n\n```js\nlookup(userAgent)\n```\n\n### Return value\n\nIf there is data associated with the User-Agent, a `Device` instance is returned.\nOtherwise, `null` is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/device/Device/prototype/brand.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.brand\n\nThe read-only **`brand`** property of the `Device` interface is\neither a string stating the brand of the device, which can be different from the manufacturer of that device.\nIf no brand is known, the value will be `null`.\n\n\n## Value\n\nEither a string value if a brand is known, otherwise `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/device/Device/prototype/hardwareType.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.hardwareType\n\nThe read-only **`hardwareType`** property of the `Device` interface is\neither a string stating the hardware type of the device, or `null` if the hardware type is not known.\n\nA string representation of the device's primary platform hardware. The most commonly used device types are also identified via boolean variables. Because a device may have multiple device types and this variable only has the primary type, we recommend using the boolean variables for logic and using this string representation for logging.\n\n\n\n## Value\n\nEither a string value if a hardware type is known, otherwise `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/device/Device/prototype/isBot.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isBot\n\nThe read-only **`isBot`** property of the `Device` interface is\neither a boolean stating if the device is a bot, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a bot, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/device/Device/prototype/isDesktop.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isDesktop\n\nThe read-only **`isDesktop`** property of the `Device` interface is\neither a boolean stating if the device is a desktop web browser, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a desktop web browser, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/device/Device/prototype/isGameConsole.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isGameConsole\n\nThe read-only **`isGameConsole`** property of the `Device` interface is\neither a boolean stating if the device is a video game console, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a video game console, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/device/Device/prototype/isMediaPlayer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isMediaPlayer\n\nThe read-only **`isMediaPlayer`** property of the `Device` interface is\neither a boolean stating if the device is a media player (like Blu-ray players, iPod devices, and smart speakers such as Amazon Echo), or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a media player (like Blu-ray players, iPod devices, and smart speakers such as Amazon Echo), or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/device/Device/prototype/isMobile.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isMobile\n\nThe read-only **`isMobile`** property of the `Device` interface is\neither a boolean stating if the device is a mobile phone, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a mobile phone, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/device/Device/prototype/isSmartTV.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isSmartTV\n\nThe read-only **`isSmartTV`** property of the `Device` interface is\neither a boolean stating if the device is a smart TV, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a smart TV, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/device/Device/prototype/isTablet.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isTablet\n\nThe read-only **`isTablet`** property of the `Device` interface is\neither a boolean stating if the device is a tablet (like an iPad), or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device is a tablet (like an iPad), or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/device/Device/prototype/isTouchscreen.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.isTouchscreen\n\nThe read-only **`isTouchscreen`** property of the `Device` interface is\neither a boolean stating if the device's screen is touch sensitive, or `null` if the this is not known.\n\n\n## Value\n\nEither a boolean stating if the device's screen is touch sensitive, or `null` if the this is not known.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/device/Device/prototype/model.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.model\n\nThe read-only **`model`** property of the `Device` interface is\neither a string stating the model of the device, or `null` if the model is not known.\n\n\n## Value\n\nEither a string value if a model is known, otherwise `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/device/Device/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Device.prototype.name\n\nThe read-only **`name`** property of the `Device` interface is\neither a string stating the name of the device, or `null` if the name is not known.\n\n\n## Value\n\nEither a string value if a name is known, otherwise `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/device/Device/prototype/toJSON.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# toJSON\n\nThe `toJSON()` method of the Device interface is a serializer;\nit returns a JSON representation of the Device object.\n\nTo get a JSON string, you can use `JSON.stringify(device)` directly; it will call `toJSON()` automatically.\n\n## Syntax\n\n```js\ntoJSON()\n```\n\n### Return value\n\nA JSON object that is the serialization of the Device object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/dictionary/Dictionary/Dictionary.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Dictionary()`\n\n:::info\n\nThis Class is deprecated\n\n:::\n\nThe **`Dictionary` constructor** lets you access a specific [Fastly Edge Dictionary](https://docs.fastly.com/en/guides/about-edge-dictionaries).\n\n**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew Dictionary(name);\n```\n\n> **Note:** `Dictionary()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - The name of the [Fastly Edge Dictionary](https://docs.fastly.com/en/guides/about-edge-dictionaries) that this `Dictionary` instance should provide access to.\n\n### Return value\n\nA new `Dictionary` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Dictionary exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name does not start with an ascii alphabetical character \n  - Thrown if the provided name does not contain only ascii alphanumeric, underscore, and whitespace characters\n\n## Examples\n\nIn this example we have an Edge Dictionary named \"animals\" and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Dictionary Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/dictionary/Dictionary/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Dictionary.prototype.get\n\n:::info\n\nThis Class is deprecated, it has been renamed to [`ConfigStore`](../../../fastly:config-store/ConfigStore/ConfigStore.mdx) and can be imported via `import { ConfigStore } from 'fastly:config-store'`\n\nThe `get()` method exists on the [`ConfigStore`](../../../fastly:config-store/ConfigStore/ConfigStore.mdx) Class.\n\n:::\n\nThe **`get()`** method returns the value associated with the provided key in the dictionary. If the provided key does not exist in the Dictionary then this returns `null`.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from the dictionary.\n\n### Return value\n\nA `string` representing the specified Dictionary value or `null` if the key does not exist in the Dictionary\n\n## Description\n\nGet a value for a key in the dictionary. If the provided key does not exist in the Dictionary then this returns `null`.\n\nThe `get()` method requires its `this` value to be a [`Dictionary`](../Dictionary.mdx) object.\n\nIf the `this` value does not inherit from `Dictionary.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided key is longer than 255 in length\n  - Thrown if the provided key is an empty string\n\n## Examples\n\nIn this example we have an Edge Dictionary named \"animals\" and we return the \"cat\" entry as the response body to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Dictionary Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Dictionary } from \"fastly:dictionary\";\nasync function app (event) {\n  const config = new Dictionary('animals');\n  return new Response(config.get('cat'));\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/edge-rate-limiter/EdgeRateLimiter/EdgeRateLimiter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `EdgeRateLimiter()`\n\nThe **`EdgeRateLimiter` constructor** lets you open an epen a [ERL](https://docs.fastly.com/products/edge-rate-limiting) with the given ratecounter and penaltybox.\n\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew EdgeRateLimiter(rateCounter, penaltyBox)\n```\n\n> **Note:** `EdgeRateLimiter()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `rateCounter` _: RateCounter_\n  - The RateCounter instance to associate with this EdgeRateLimiter instance\n- `penaltyBox` _: PenaltyBox_\n  - The PenaltyBox instance which should be associated with this EdgeRateLimiter instance\n\n### Return value\n\nA new `EdgeRateLimiter` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided rateCounter value is not an instance of RateCounter\n  - Thrown if the provided penaltyBox value is not an instance of PenaltyBox\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/edge-rate-limiter/EdgeRateLimiter/prototype/checkRate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# EdgeRateLimiter.prototype.checkRate\n\nIncrement an entry in the rate counter and check if the entry has exceeded some average number of requests per second (RPS) over the given window.\nIf the entry is over the RPS limit for the window, add to the penaltybox for the given `timeToLive`.\n\nValid `timeToLive` is 1 minute to 60 minutes and `timeToLive` value is truncated to the nearest minute.\n\n## Syntax\n```js\ncheckRate(entry, delta, window, limit, timeToLive)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to increment and check\n- `delta` _: number_\n  - The amount to increment the `entry` by\n- `window` _: number_\n  - The time period to check across, has to be either 1 second, 10 seconds, or 60 seconds\n- `limit` _: number_\n  - The requests-per-second limit\n- `timeToLive` _: number_\n  - In minutes, how long the entry should be added into the penalty-box\n  - Valid `timeToLive` is 1 minute to 60 minutes and `timeToLive` value is truncated to the nearest minute.\n\n\n### Return value\n\nReturns `true` if the entry has exceeded the average RPS for the window, otherwise returns `false`.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `name` value can not be coerced into a string\n  - Thrown if the provided `delta` value is not a positive finite number.\n  - Thrown if the provided `window` value is not either, 1, 10, or 60.\n  - Thrown if the provided `limit` value is not a positive finite number.\n  - Thrown if the provided `timeToLive` value is not either, a number between 1 and 60 inclusively.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/edge-rate-limiter/PenaltyBox/PenaltyBox.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `PenaltyBox()`\n\nThe **`PenaltyBox` constructor** can be used with a [Edge Rate Limiter](../EdgeRateLimiter/EdgeRateLimiter.mdx) or standalone for adding and checking if some entry is in the dataset.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew PenaltyBox(name)\n```\n\n> **Note:** `PenaltyBox()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Open a PenaltyBox with the given name\n\n\n### Return value\n\nA new `PenaltyBox` object instance.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `name` value can not be coerced into a string\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/edge-rate-limiter/PenaltyBox/prototype/add.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# PenaltyBox.prototype.add\n\nAdd an `entry` into the PenaltyBox for the duration of the given `timeToLive`.\n\n## Syntax\n```js\nadd(entry, timeToLive)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n- `timeToLive` _: number_\n  - In minutes, how long the entry should be added into the PenaltyBox\n  - Valid `timeToLive` is 1 minute to 60 minutes and `timeToLive` value is truncated to the nearest minute.\n\n\n### Return value\n\nReturns `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n  - Thrown if the provided `timeToLive` value is not either, a number between 1 and 60 inclusively.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/edge-rate-limiter/PenaltyBox/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# PenaltyBox.prototype.has\n\nCheck if the given entry is contained in in the PenaltyBox instance.\n\n## Syntax\n```js\nhas(entry)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n\n\n### Return value\n\nReturns `true` if the entry is contained in the PenaltyBox instance, otherwise returns `false`.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/edge-rate-limiter/RateCounter/RateCounter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `RateCounter()`\n\nThe **`RateCounter` constructor** can be used with a [Edge Rate Limiter](../EdgeRateLimiter/EdgeRateLimiter.mdx) or standalone for counting and rate calculations.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew RateCounter(name)\n```\n\n> **Note:** `RateCounter()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Open a RateCounter with the given name\n\n\n### Return value\n\nA new `RateCounter` object instance.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `name` value can not be coerced into a string\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/edge-rate-limiter/RateCounter/prototype/increment.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RateCounter.prototype.increment\n\nIncrement the given `entry` in the RateCounter instance with the given `delta` value.\n\n## Syntax\n```js\nincrement(entry, delta)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n- `delta` _: number_\n  - The amount to increment the entry by\n\n\n### Return value\n\nReturns `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n  - Thrown if the provided `delta` value is not a positive, finite number.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/edge-rate-limiter/RateCounter/prototype/lookupCount.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RateCounter.prototype.lookupCount\n\nLook up the current rate for the given `entry` and the given `duration`.\n\n## Syntax\n```js\nlookupCount(entry, duration)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n- `duration` _: number_\n  - The duration to lookup alongside the entry, has to be either, 10, 20, 30, 40, 50, or 60 seconds.\n\n\n### Return value\n\nReturns a number which is the count for the given `entry` and `duration` in this `RateCounter` instance.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n  - Thrown if the provided `duration` value is not either, 10, 20, 30, 40, 50 or 60.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/edge-rate-limiter/RateCounter/prototype/lookupRate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RateCounter.prototype.lookupRate\n\nLook up the current rate for the given `entry` and the given `window`.\n\n## Syntax\n```js\nlookupRate(entry, window)\n```\n\n### Parameters\n\n- `entry` _: string_\n  - The name of the entry to look up\n- `window` _: number_\n  - The window to look up alongside the entry, has to be either 1 second, 10 seconds, or 60 seconds\n\n\n### Return value\n\nReturns a number which is the rate for the given `entry` and `window` in this `RateCounter` instance.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if the provided `entry` value can not be coerced into a string\n  - Thrown if the provided `window` value is not either, 1, 10, or 60.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/env/env.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# env\n\nThe **`env()`** function returns the value for the provided environment variable name.\n\nFor a list of available environment variables, see the [Fastly Developer Hub for Compute Environment Variables](https://developer.fastly.com/reference/compute/ecp-env/)\n\n>**Note**: The environment variables can only be retrieved when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nenv(name)\n```\n\n### Parameters\n\n- `name` _: string_\n  - The name of the environment variable to retrieve\n\n### Return value\n\nThe value for the requested environment variable, if no such environment variable exists then an empty string is returned.\n\n## Examples\n\nIn this example we log to stdout the environment variables [`FASTLY_HOSTNAME`](https://developer.fastly.com/reference/compute/ecp-env/fastly-hostname/) and [`FASTLY_TRACE_ID`](https://developer.fastly.com/reference/compute/ecp-env/fastly-trace-id/).\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"env Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { env } from \"fastly:env\";\nfunction app(event) {\n  console.log(\"FASTLY_HOSTNAME:\", env(\"FASTLY_HOSTNAME\"));\n  console.log(\"FASTLY_TRACE_ID:\", env(\"FASTLY_TRACE_ID\"));\n  return new Response(\"\", {\n    status: 200\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { env } from \"fastly:env\";\nfunction app(event) {\n  console.log(\"FASTLY_HOSTNAME:\", env(\"FASTLY_HOSTNAME\"));\n  console.log(\"FASTLY_TRACE_ID:\", env(\"FASTLY_TRACE_ID\"));\n  return new Response(\"\", {\n    status: 200\n  });\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/experimental/allowDynamicBackends.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# allowDynamicBackends\n\nThe **`allowDynamicBackends()`** function is used to control whether or not Dynamic Backends should be allowed within this Fastly Compute Service.\n\nBy default, Dynamic Backends are disabled within a JavaScript application as it can be a potential avenue for third-party JavaScript code to send requests, potentially including sensitive/secret data,  off to destinations that the JavaScript project was not intending, which could be a security issue.\n\n>**Note**: This feature is in disabled by default for Fastly Services. Please contact [Fastly Support](https://support.fastly.com/hc/requests/new?ticket_form_id=360000269711) to request the feature be enabled on the Fastly Services which require Dynamic Backends.\n\n## Syntax\n\n```js\nallowDynamicBackends(enabledOrConfig)\n```\n\n### Parameters\n\n- `enabledOrConfig` _: boolean_\n  - Whether or not to allow Dynamic Backends\n\nor\n\n- `enabledOrConfig` _: object_\n  - `connectTimeout` _: number_ _**optional**_\n    - Maximum duration in milliseconds to wait for a connection to this backend to be established.\n    - If exceeded, the connection is aborted and a 503 response will be presented instead.\n    - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n  - `firstByteTimeout` _: number_ _**optional**_\n    - Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent.\n    - If exceeded, the connection is aborted and a 503 response will be presented instead.\n    - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n  - `betweenBytesTimeout` _: number_ _**optional**_\n    - Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend.\n    - If exceeded, the response received so far will be considered complete and the fetch will end.\n    - Throws a [`RangeError`](../globals/RangeError/RangeError.mdx) if the value is negative or greater than or equal to 2^32\n\n### Return value\n\n`undefined`.\n\n## Examples\n\nIn this example an implicit Dynamic Backend is created when making the fetch request to https://www.fastly.com/ and the response is then returned to the client.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Dynamic Backends Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nallowDynamicBackends(true);\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  return fetch('https://www.fastly.com/');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { allowDynamicBackends } from \"fastly:experimental\";\nallowDynamicBackends(true);\nasync function app() {\n  // For any request, return the fastly homepage -- without defining a backend!\n  return fetch('https://www.fastly.com/');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/experimental/includeBytes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# includeBytes\n\nThe **`includeBytes()`** function is used embed a file as a Uint8Array.\n\n>**Note**: Can only be used during build-time initialization, not when processing requests.\n\n## Syntax\n\n```js\nincludeBytes(path)\n```\n\n### Parameters\n\n- `path` _: string_\n  - The path to include, relative to the Fastly Compute application's top-level directory during build-time initialization.\n\n### Return value\n\nReturns a `Uint8Array`\n\n## Examples\n\nIn this example we include the README.md file as a Uint8Array and use it for the body in the response we return to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { includeBytes } from \"fastly:experimental\";\nconst readme = includeBytes('README.md');\nasync function app() {\n    return new Response(readme);\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/experimental/mapAndLogError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# mapAndLogError\n\nThe **`mapAndLogError()`** function calls `mapError` on an `Error` object and sends the output to standard error. This includes the error name, message, and a call stack.\n\nIf `--enable-stack-traces` is specified during the build, the call stack will be mapped using source maps.\n\nIf `--enable-stack-traces` is specified and `--exclude-sources` is not specified during the build, then this will also include a code dump of neighboring lines of user code.\n\n## Syntax\n\n```js\nmapAndLogError(error)\n```\n\n### Parameters\n\n- `error` _: Error _ or _string_\n  - The error to retrieve information about. If a `string` is provided, then it is first converted to an `Error`.\n\n### Return value\n\n`undefined`.\n\n## Examples\n\nIn this example, build the application using the `--enable-stack-traces` flag.\n\n```js\naddEventListener('fetch', e => e.respondWith(handler(e)));\nasync function handler(event) {\n  try {\n    throw new TypeError('foo');\n  } catch (err) {\n    mapAndLogError(mapError(err));\n  }\n  return new Response('ok');\n}\n```\n\nThe following is output to the error log.\n\n```\nTypeError: foo\n  at handler (src/index.ts:4:11)\n      1 | addEventListener('fetch', e => e.respondWith(handler(e)));\n      2 | async function handler(event) {\n      3 |   try {\n>     4 |     throw new TypeError('foo');\n                    ^\n      5 |   } catch (err) {\n      6 |     mapAndLogError(mapError(err));\n      7 |   }\n  at src/index.ts:1:45\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/experimental/mapError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# mapError\n\nThe **`mapError()`** function extracts information from an `Error` object as a human-readable array of strings. This includes the error name, message, and a call stack.\n\nIf `--enable-stack-traces` is specified during the build, the call stack will be mapped using source maps.\n\nIf `--enable-stack-traces` is specified and `--exclude-sources` is not specified during the build, then this will also include a code dump of neighboring lines of user code.\n\n## Syntax\n\n```js\nmapError(error)\n```\n\n### Parameters\n\n- `error` _: Error _ or _string_\n  - The error to retrieve information about. If a `string` is provided, then it is first converted to an `Error`.\n\n### Return value\n\nReturns an array of `string`s.\n\n## Examples\n\nIn this example, build the application using the `--enable-stack-traces` flag.\n\n```js\naddEventListener('fetch', e => e.respondWith(handler(e)));\nasync function handler(event) {\n  try {\n    throw new TypeError('foo');\n  } catch (err) {\n    console.error(mapError(err));\n  }\n  return new Response('ok');\n}\n```\n\nThe following is output to the error log.\n\n```\nTypeError: foo\n  at handler (src/index.ts:4:11)\n      1 | addEventListener('fetch', e => e.respondWith(handler(e)));\n      2 | async function handler(event) {\n      3 |   try {\n>     4 |     throw new TypeError('foo');\n                    ^\n      5 |   } catch (err) {\n      6 |     console.error(mapError(err));\n      7 |   }\n  at src/index.ts:1:45\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/experimental/sdkVersion.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# sdkVersion\n\nThe read-only **`sdkVersion`** property is a string whose indicates what JavaScript SDK version is being used.\n\n## Value\n\nA string value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/experimental/setReusableSandboxOptions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# setReusableSandboxOptions\n\nThe **`setReusableSandboxOptions()`** function configures the reuse of the same underlying sandbox for multiple requests, which can improve performance by avoiding the overhead of initializing a new sandbox for each request.\n\n>**Note**: Can only be used during build-time initialization, not when processing requests.\n\n## Syntax\n\n```js\nsetReusableSandboxOptions(options)\n```\n\n### Parameters\n\n- `options` _: Object_\n  - The configuration options for the reusable sandbox.\n    - `maxRequests` _: number_ (default: `1`, `0` means unlimited)\n      - The maximum number of requests that can be handled by a single sandbox before it is recycled.\n    - `betweenRequestTimeoutMs` _: number_ (default: not specified)\n      - The amount of time in milliseconds to wait between requests before recycling the sandbox.\n    - `maxMemoryMiB` _: number_ (default: no limit)\n      - The maximum amount of memory in MiB that the sandbox can use before it is recycled.\n    - `sandboxTimeoutMs` _: number_ (default: no timeout)\n      - The maximum amount of time in milliseconds that a sandbox can be active before it is recycled.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/fanout/createFanoutHandoff.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# createFanoutHandoff\n\nThe **`createFanoutHandoff()`** function creates a Response instance which informs Fastly to pass the original Request through Fanout, to the declared backend.\n\n## Syntax\n\n```js\ncreateFanoutHandoff(request, backend)\n```\n\n### Parameters\n\n- `request` _: Request_\n  - The request to pass through Fanout.\n- `backend` _: string_\n  - The name of the backend that Fanout should send the request to.\n  - The name has to be between 1 and 254 characters inclusive.\n  - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n\n### Return value\n\nA Response instance is returned, which can then be used via `event.respondWith`.\n\n## Examples\n\nIn this example application requests to the path `/stream` and sent handled via Fanout.\n\n```js\nimport { createFanoutHandoff } from \"fastly:fanout\";\n\nasync function handleRequest(event) {\n  try {\n    const url = new URL(event.request.url);\n    if (url.pathname === '/stream') {\n      return createFanoutHandoff(event.request, 'fanout');\n    } else {\n      return new Response('oopsie, make a request to /stream for some fanout goodies', { status: 404 });\n    }\n  } catch (error) {\n    console.error({error});\n    return new Response(error.message, {status:500})\n  }\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/geolocation/getGeolocationForIpAddress.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# getGeolocationForIpAddress\n\nThe **`getGeolocationForIpAddress()`** function is used to retrieve geolocation information about the given IP address.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\ngetGeolocationForIpAddress(address)\n```\n\n### Parameters\n\n- `address` _: string_\n  - The IPv4 or IPv6 address to query.\n\n### Return value\n\nReturns an `Object`, or `null` if no geolocation data was found.\n\nThe object contains information about the given IP address with the following properties:\n\n- `as_name`  _: string | null_\n  - The name of the organization associated with `as_number`.\n  - For example, fastly is the value given for IP addresses under AS-54113.\n\n- `as_number` _: number | null_\n  - [Autonomous system](https://en.wikipedia.org/wiki/Autonomous_system_(Internet)) (AS) number.\n\n- `area_code` _: number | null_\n  - The telephone area code associated with an IP address.\n  - These are only available for IP addresses in the United States, its territories, and Canada.\n\n- `city` _: string | null_\n  - City or town name.\n\n- `conn_speed` _: string | null_\n  - Connection speed.\n\n- `conn_type` _: string | null_\n  - Connection type.\n\n- `continent` _: string | null_\n  - Continent.\n\n- `country_code` _: string | null_\n  - A two-character [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) country code for the country associated with an IP address.\n  - The US country code is returned for IP addresses associated with overseas United States military bases.\n  - These values include subdivisions that are assigned their own country codes in ISO 3166-1. For example, subdivisions NO-21 and NO-22 are presented with the country code SJ for Svalbard and the Jan Mayen Islands.\n\n- `country_code3` _: string | null_\n  - A three-character [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) country code for the country associated with the IP address.\n  - The USA country code is returned for IP addresses associated with overseas United States military bases.\n\n- `country_name` _: string | null_\n  - Country name.\n  - This field is the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) English short name for a country.\n\n- `gmt_offset` _: string | null_\n  - Time zone offset from Greenwich Mean Time (GMT) for `city`.\n\n- `latitude` _: number | null_\n  - Latitude, in units of degrees from the equator.\n  - Values range from -90.0 to +90.0 inclusive, and are based on the [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System) coordinate reference system.\n\n- `longitude` _: number | null_\n  - Longitude, in units of degrees from the [IERS Reference Meridian](https://en.wikipedia.org/wiki/IERS_Reference_Meridian).\n  - Values range from -180.0 to +180.0 inclusive, and are based on the [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System) coordinate reference system.\n\n- `metro_code` _: number | null_\n  - Metro code, representing designated market areas (DMAs) in the United States.\n\n- `postal_code` _: string | null_\n  - The postal code associated with the IP address.\n  - These are available for some IP addresses in Australia, Canada, France, Germany, Italy, Spain, Switzerland, the United Kingdom, and the United States.\n  - For Canadian postal codes, this is the first 3 characters. For the United Kingdom, this is the first 2-4 characters (outward code). For countries with alphanumeric postal codes, this field is a lowercase transliteration.\n\n- `proxy_description` _: string | null_\n  - Client proxy description.\n\n- `proxy_type` _: string | null_\n  - Client proxy type.\n\n- `region` _: string | null_\n  - [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) country subdivision code.\n  - For countries with multiple levels of subdivision (for example, nations within the United Kingdom), this variable gives the more specific subdivision.\n  - This field can be None for countries that do not have ISO country subdivision codes. For example, None is given for IP addresses assigned to the Åland Islands (country code AX, illustrated below).\n\n- `utc_offset` _: number | null;_\n  - Time zone offset from coordinated universal time (UTC) for `city`.\n\n## Examples\n\nIn this example we return the geolocation details for the provided ip querystring parameter or for the incoming client request if the querystring parameter does not exist.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"getGeolocationForIpAddress Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { getGeolocationForIpAddress } from \"fastly:geolocation\"\nasync function app(event) {\n  try {\n    let ip = new URL(event.request.url).searchParams.get('ip') || event.client.address\n    let geo = getGeolocationForIpAddress(ip);\n    return new Response(JSON.stringify(geo), {\n      headers: {\n        \"Content-Type\": \"application/json\",\n      },\n    });\n  } catch (error) {\n    console.error(error);\n    return new Response(\"Internal Server Error\", {\n      status: 500\n    });\n  }\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"data\": {\n         \"dictionaries\": {\n           \"animals\": {\n             \"cat\": \"meow\"\n           }\n         }\n       },\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { getGeolocationForIpAddress } from \"fastly:geolocation\"\nasync function app(event) {\n  try {\n    let ip = new URL(event.request.url).searchParams.get('ip') || event.client.address\n    let geo = getGeolocationForIpAddress(ip);\n    return new Response(JSON.stringify(geo), {\n      headers: {\n        \"Content-Type\": \"application/json\",\n      },\n    });\n  } catch (error) {\n    console.error(error);\n    return new Response(\"Internal Server Error\", {\n      status: 500\n    });\n  }\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/AggregrateError/AggregrateError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# AggregateError()\n\nThe **`AggregateError()`** constructor creates an error for several errors that need to be wrapped in a single error.\n\n## Syntax\n\n```js\nnew AggregateError(errors)\nnew AggregateError(errors, message)\nnew AggregateError(errors, message, options)\n\nAggregateError(errors)\nAggregateError(errors, message)\nAggregateError(errors, message, options)\n```\n\n> **Note:** `AggregateError()` can be called with or without `new`. Both create a new `AggregateError` instance.\n\n### Parameters\n\n- `errors`\n  - : An iterable of errors, may not actually be [`TypeError`](../Error/Error.mdx) instances.\n- `message` _**optional**_\n  - : An optional human-readable description of the aggregate error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Array/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array\\[Symbol.species]\n\nThe **`Array[Symbol.species]`** accessor property returns the constructor used to construct return values from array methods.\n\n> **Warning:** The existence of `[Symbol.species]` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Syntax\n\n```js\nArray[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get [Symbol.species]` was called. The return value is used to construct return values from array methods that create new arrays.\n\n## Description\n\nThe `[Symbol.species]` accessor property returns the default constructor for `Array` objects. Subclass constructors may override it to change the constructor assignment. The default implementation is basically:\n\n```js\n// Hypothetical underlying implementation for illustration\nclass Array {\n  static get [Symbol.species]() {\n    return this;\n  }\n}\n```\n\nBecause of this polymorphic implementation, `[Symbol.species]` of derived subclasses would also return the constructor itself by default.\n\n```js\nclass SubArray extends Array {}\nSubArray[Symbol.species] === SubArray; // true\n```\n\nWhen calling array methods that do not mutate the existing array but return a new array instance (for example, `filter()` and `map()`), the array's `constructor[Symbol.species]` will be accessed. The returned constructor will be used to construct the return value of the array method. This makes it technically possible to make array methods return objects unrelated to arrays.\n\n```js\nclass NotAnArray {\n  constructor(length) {\n    this.length = length;\n  }\n}\n\nconst arr = [0, 1, 2];\narr.constructor = { [Symbol.species]: NotAnArray };\narr.map((i) => i); // NotAnArray { '0': 0, '1': 1, '2': 2, length: 3 }\narr.filter((i) => i); // NotAnArray { '0': 1, '1': 2, length: 0 }\narr.concat([1, 2]); // NotAnArray { '0': 0, '1': 1, '2': 2, '3': 1, '4': 2, length: 5 }\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Array/Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array()\n\nThe **`Array()`** constructor is used to create `Array` objects.\n\n## Syntax\n\n```js\nnew Array(element0, element1, /* … ,*/ elementN)\nnew Array(arrayLength)\n\nArray(element0, element1, /* … ,*/ elementN)\nArray(arrayLength)\n```\n\n> **Note:** `Array()` can be called with or without `new`. Both create a new `Array` instance.\n\n### Parameters\n\n- `elementN`\n  - : A JavaScript array is initialized with the given elements, except in the case where\n    a single argument is passed to the `Array` constructor and that argument is\n    a number (see the `arrayLength` parameter below). Note that this special case only\n    applies to JavaScript arrays created with the `Array` constructor, not\n    array literals created with the bracket syntax.\n- `arrayLength`\n  - : If the only argument passed to the `Array` constructor is an integer\n    between 0 and 2<sup>32</sup> - 1 (inclusive), this returns a new JavaScript array with\n    its `length` property set to that number (**Note:** this\n    implies an array of `arrayLength` empty slots, not slots with actual\n    `undefined` values).\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if there's only one argument (`arrayLength`) and its value is not between 0 and 2<sup>32</sup> - 1 (inclusive).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Array/from.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.from\n\nThe **`Array.from()`** static method creates a new, shallow-copied `Array` instance from an iterable or array-like object.\n\n## Syntax\n\n```js\nArray.from(arrayLike)\n\n// Arrow function\nArray.from(arrayLike, (element) => { /* … */ })\nArray.from(arrayLike, (element, index) => { /* … */ })\n\n// Mapping function\nArray.from(arrayLike, mapFn)\nArray.from(arrayLike, mapFn, thisArg)\n\n// Inline mapping function\nArray.from(arrayLike, function (element) { /* … */ })\nArray.from(arrayLike, function (element, index) { /* … */ })\nArray.from(arrayLike, function (element) { /* … */ }, thisArg)\nArray.from(arrayLike, function (element, index) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `arrayLike`\n  - : An iterable or array-like object to convert to an array.\n- `mapFn` _**optional**_\n\n  - : Map function to call on every element of the array. If provided, every value to be added to the array is first passed through this function, and `mapFn`'s return value is added to the array instead.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `mapFn`.\n\n### Return value\n\nA new `Array` instance.\n\n## Description\n\n`Array.from()` lets you create `Array`s from:\n\n- [iterable objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) (objects such as [`Map`](../Map/Map.mdx) and [`Set`](../Set/Set.mdx); or, if the object is not iterable,\n- array-like objects (objects with a `length` property and indexed elements).\n\n`Array.from()` never creates a sparse array. If the `arrayLike` object is missing some index properties, they become `undefined` in the new array.\n\n`Array.from()` has an optional parameter `mapFn`, which allows you to execute a function on each element of the array being created, similar to [`Array.prototype.map()`](./prototype/map.mdx). More clearly, `Array.from(obj, mapFn, thisArg)` has the same result as `Array.from(obj).map(mapFn, thisArg)`, except that it does not create an intermediate array, and `mapFn` only receives two arguments (`element`, `index`) without the whole array, because the array is still under construction.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Array/isArray.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.isArray()\n\nThe **`Array.isArray()`** static method determines whether the passed value is an `Array`.\n\n## Syntax\n\n```js\nArray.isArray(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be checked.\n\n### Return value\n\n`true` if `value` is an `Array`; otherwise, `false`. `false` is always returned if `value` is a `TypedArray` instance.\n\n## Description\n\n`Array.isArray()` checks if the passed value is an `Array`. It does not check the value's prototype chain, nor does it rely on the `Array` constructor it is attached to. It returns `true` for any value that was created using the array literal syntax or the `Array` constructor. This makes it safe to use with cross-realm objects, where the identity of the `Array` constructor is different and would therefore cause `instanceof Array` to fail.\n\nSee the article [\"Determining with absolute accuracy whether or not a JavaScript object is an array\"](https://web.mit.edu/jwalden/www/isArray.html) for more details.\n\n`Array.isArray()` also rejects objects with `Array.prototype` in its prototype chain but aren't actual arrays, which `instanceof Array` would accept.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Array/of.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.of()\nThe **`Array.of()`** method creates a new `Array`\ninstance from a variable number of arguments, regardless of number or type of the\narguments.\n\n## Syntax\n\n```js\nArray.of(element0)\nArray.of(element0, element1)\nArray.of(element0, element1, /* … ,*/ elementN)\n```\n\n### Parameters\n\n- `elementN`\n  - : Elements used to create the array.\n\n### Return value\n\nA new `Array` instance.\n\n## Description\n\nThe difference between `Array.of()` and the [`Array()`](./Array.mdx) constructor is in the handling of single arguments: `Array.of(7)` creates an array with a single element, `7`, whereas `Array(7)` creates an empty array with a `length` property of `7`. (That implies an array of 7 empty slots, not slots with actual [`undefined`](../undefined.mdx) values.)\n\n```js\nArray.of(7); // [7]\nArray(7); // array of 7 empty slots\n\nArray.of(1, 2, 3); // [1, 2, 3]\nArray(1, 2, 3); // [1, 2, 3]\n```\n\nThe `Array.of()` method is a generic factory method. For example, if a subclass of `Array` inherits the `of()` method, the inherited `of()` method will return new instances of the subclass instead of `Array` instances. In fact, the `this` value can be any constructor function that accepts a single argument representing the length of the new array, and the constructor will be called with the number of arguments passed to `of()`. The final `length` will be set again when all elements are assigned. If the `this` value is not a constructor function, the plain `Array` constructor is used instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Array/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype\\[Symbol.iterator]()\n\nThe **`Symbol.iterator`** method of an `Array` object implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows arrays to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the value of each index in the array.\n\nThe initial value of this property is the same function object as the initial value of the [`Array.prototype.values`](./values.mdx) property.\n\n## Syntax\n\n```js\narray[Symbol.iterator]()\n```\n\n### Return value\n\nThe same return value as [`Array.prototype.values()`](./values.mdx): a new iterable iterator object that yields the value of each index in the array.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Array/prototype/@@unscopables.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype[Symbol.unscopables]\n\nThe **`@@unscopables`** data property of `Array.prototype` is shared by all `Array` instances. It contains property names that were not included in the ECMAScript standard prior to the ES2015 version and that are ignored for [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) statement-binding purposes.\n\n## Value\n\nA [`null`-prototype object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects) with property names given below and their values set to `true`.\n\n## Description\n\nThe default `Array` properties that are ignored for `with` statement-binding purposes are:\n\n- [`at()`](./at.mdx)\n- [`copyWithin()`](./copyWithin.mdx)\n- [`entries()`](./entries.mdx)\n- [`fill()`](./fill.mdx)\n- [`find()`](./find.mdx)\n- [`findIndex()`](./findIndex.mdx)\n- [`flat()`](./flat.mdx)\n- [`flatMap()`](./flatMap.mdx)\n- [`includes()`](./includes.mdx)\n- [`keys()`](./keys.mdx)\n- [`values()`](./values.mdx)\n\n`Array.prototype[@@unscopables]` is an empty object only containing all the above property names with the value `true`. Its [prototype is `null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects), so `Object.prototype` properties like [`toString`](../../Object/prototype/toString.mdx) won't accidentally be made unscopable, and a `toString()` within the `with` statement will continue to be called on the array.\n\nSee [`Symbol.unscopables`](../../Symbol/unscopables.mdx) for how to set unscopable properties for your own objects.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Array/prototype/at.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.at\n\nThe **`at()`** method takes an integer value and returns the item at that index, allowing for positive and negative integers. Negative integers count back from the last item in the array.\n\n## Syntax\n\n```js\nat(index)\n```\n\n### Parameters\n\n- `index`\n  - : Zero-based index of the array element to be returned, converted to an integer. Negative index counts back from the end of the array — if `index < 0`, `index + array.length` is accessed.\n\n### Return value\n\nThe element in the array matching the given index. Always returns [`undefined`](../../../globals/undefined.mdx) if `index < -array.length` or `index >= array.length` without attempting to access the corresponding property.\n\n## Description\n\nThe `at()` method is equivalent to the bracket notation when `index` is non-negative. For example, `array[0]` and `array.at(0)` both return the first item. However, when counting elements from the end of the array, you cannot use `array[-1]` like you may in Python or R, because all values inside the square brackets are treated literally as string properties, so you will end up reading `array[\"-1\"]`, which is just a normal string property instead of an array index.\n\nThe usual practice is to access [`Array.prototype.length`](./length.mdx) and calculate the index from that — for example, `array[array.length - 1]`. The `at()` method allows relative indexing, so this can be shortened to `array.at(-1)`.\n\nThe `at()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Array/prototype/concat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.concat\n\nThe **`concat()`** method is used to merge two or more arrays.\nThis method does not change the existing arrays, but instead returns a new array.\n\n## Syntax\n\n```js\nconcat()\nconcat(value0)\nconcat(value0, value1)\nconcat(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `valueN` _**optional**_\n  - : Arrays and/or values to concatenate into a new array. If all\n    `valueN` parameters are omitted, `concat` returns a\n    [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of the existing array on which it is called. See the description below\n    for more details.\n\n### Return value\n\nA new `Array` instance.\n\n## Description\n\nThe `concat` method creates a new array. The array will first be populated by the elements in the object on which it is called. Then, for each argument, its value will be concatenated into the array — for normal objects or primitives, the argument itself will become an element of the final array; for arrays or array-like objects with the property [`Symbol.isConcatSpreadable`](../../Symbol/isConcatSpreadable.mdx) set to a truthy value, each element of the argument will be independently added to the final array. The `concat` method does not recurse into nested array arguments.\n\nThe `concat()` method is a copying. It does not alter `this` or any of the arrays provided as arguments but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains the same elements as the ones from the original arrays.\n\nThe `concat()` method preserves empty slots if any of the source arrays is sparse.\n\nThe `concat()` method is generic. The `this` value is treated in the same way as the other arguments (except it will be converted to an object first), which means plain objects will be directly prepended to the resulting array, while array-like objects with truthy `Symbol.isConcatSpreadable` will be spread into the resulting array.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Array/prototype/copyWithin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.copyWithin\n\nThe **`copyWithin()`** method shallow copies part of an array\nto another location in the same array and returns it without modifying its length.\n\n\n\n## Syntax\n\n```js\ncopyWithin(target)\ncopyWithin(target, start)\ncopyWithin(target, start, end)\n```\n\n### Parameters\n\n- `target`\n  - : Zero-based index at which to copy the sequence to, converted to an integer.\n    - Negative index counts back from the end of the array — if `target < 0`, `target + array.length` is used.\n    - If `target < -array.length`, `0` is used.\n    - If `target >= array.length`, nothing is copied.\n    - If `target` is positioned after `start` after normalization, copying only happens until the end of `array.length` (in other words, `copyWithin()` never extends the array).\n- `start` _**optional**_\n  - : Zero-based index at which to start copying elements from, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, nothing is copied.\n- `end` _**optional**_\n  - : Zero-based index at which to end copying elements from, converted to an integer. `copyWithin()` copies up to but not including `end`.\n    - Negative index counts back from the end of the array — if `end < 0`, `end + array.length` is used.\n    - If `end < -array.length`, `0` is used.\n    - If `end >= array.length` or `end` is omitted, `array.length` is used, causing all elements until the end to be copied.\n    - If `end` is positioned before or at `start` after normalization, nothing is copied.\n\n### Return value\n\nThe modified array.\n\n## Description\n\nThe `copyWithin()` method works like C and C++'s `memmove`, and is a high-performance method to shift the data of an `Array`. The sequence is copied and pasted as one operation; the pasted sequence will have the copied values even when the copy and paste region overlap.\n\nThe `copyWithin()` method is a mutating method. It does not alter the length of `this`, but it will change the content of `this` and create new properties or delete existing properties, if necessary.\n\nThe `copyWithin()` method preserves empty slots. If the region to be copied from is sparse, the empty slots' corresponding new indices are [deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) and also become empty slots.\n\nThe `copyWithin()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Array/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.entries\n\nThe **`entries()`** method returns a new **Array\nIterator** object that contains the key/value pairs for each index in the\narray.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nA new `Array` iterator object.\n\n## Description\n\nWhen used on sparse arrays, the `entries()` method iterates empty slots as if they have the value `undefined`.\n\nThe `entries()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Array/prototype/every.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.every\n\nThe **`every()`** method tests whether\nall elements in the array pass the test implemented by the provided function. It\nreturns a Boolean value.\n\n## Syntax\n\n```js\n// Arrow function\nevery((element) => { /* … */ })\nevery((element, index) => { /* … */ })\nevery((element, index, array) => { /* … */ })\n\n// Callback function\nevery(callbackFn)\nevery(callbackFn, thisArg)\n\n// Inline callback function\nevery(function (element) { /* … */ })\nevery(function (element, index) { /* … */ })\nevery(function (element, index, array) { /* … */ })\nevery(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value to indicate the element passes the test, and a falsy value otherwise.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `every()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\n`true` if `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value for every array element. Otherwise, `false`.\n\n## Description\n\nThe `every()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array, until the `callbackFn` returns a [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value. If such an element is found, `every()` immediately returns `false` and stops iterating through the array. Otherwise, if `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value for all elements, `every()` returns `true`.\n\n`every` acts like the \"for all\" quantifier in mathematics. In particular, for an empty array, it returns `true`. (It is [vacuously true](https://en.wikipedia.org/wiki/Vacuous_truth) that all elements of the [empty set](https://en.wikipedia.org/wiki/Empty_set#Properties) satisfy any given condition.)\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\n`every()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `every()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `every()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Array/prototype/fill.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.fill\n\nThe **`fill()`** method changes all elements in an array to a static value, from a start index (default `0`) to an end index (default `array.length`).\nIt returns the modified array.\n\n## Syntax\n\n```js\nfill(value)\nfill(value, start)\nfill(value, start, end)\n```\n\n### Parameters\n\n- `value`\n  - : Value to fill the array with. Note all elements in the array will be this exact value: if `value` is an object, each slot in the array will reference that object.\n- `start` _**optional**_\n  - : Zero-based index at which to start filling, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, no index is filled.\n- `end` _**optional**_\n  - : Zero-based index at which to end filling, converted to an integer. `fill()` fills up to but not including `end`.\n    - Negative index counts back from the end of the array — if `end < 0`, `end + array.length` is used.\n    - If `end < -array.length`, `0` is used.\n    - If `end >= array.length` or `end` is omitted, `array.length` is used, causing all indices until the end to be filled.\n    - If `end` is positioned before or at `start` after normalization, no index is filled.\n\n### Return value\n\nThe modified array, filled with `value`.\n\n## Description\n\nThe `fill()` method is a mutating method. It does not alter the length of `this`, but it will change the content of `this`.\n\nThe `fill()` method fills empty slots in sparse arrays with `value` as well.\n\nThe `fill()` method is generic. It only expects the `this` value to have a `length` property. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Array/prototype/filter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.filter\n\nThe **`filter()`** method creates a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of a portion of a given array, filtered down to just the elements from the given array that pass the test implemented by the provided function.\n\n## Syntax\n\n```js\n// Arrow function\nfilter((element) => { /* … */ })\nfilter((element, index) => { /* … */ })\nfilter((element, index, array) => { /* … */ })\n\n// Callback function\nfilter(callbackFn)\nfilter(callbackFn, thisArg)\n\n// Inline callback function\nfilter(function (element) { /* … */ })\nfilter(function (element, index) { /* … */ })\nfilter(function (element, index, array) { /* … */ })\nfilter(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) to keep the element in the resulting array, and a falsy value otherwise.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `filter()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\nA [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of a portion of the given array, filtered down to just the elements from the given array that pass the test implemented by the provided function. If no elements pass the test, an empty array will be returned.\n\n## Description\n\nThe `filter()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array, and constructs a new array of all the values for which `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. Array elements which do not pass the `callbackFn` test are not included in the new array.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nThe `filter()` method is a copying method. It does not alter `this` but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains the same elements as the ones from the original array (with some filtered out). However, the function provided as `callbackFn` can mutate the array. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `filter()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\nThe `filter()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Array/prototype/find.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.find()\n\nThe `find()` method returns the first element in the provided array that satisfies the provided testing function.\nIf no values satisfy the testing function, [`undefined`](../../../globals/undefined.mdx) is returned.\n\n- If you need the **index** of the found element in the array, use [`findIndex()`](./findIndex.mdx).\n- If you need to find the **index of a value**, use [`indexOf()`](./indexOf.mdx).\n  (It's similar to [`findIndex()`](./findIndex.mdx), but checks each element for equality with the value instead of using a testing function.)\n- If you need to find if a value **exists** in an array, use [`includes()`](./includes.mdx).\n  Again, it checks each element for equality with the value instead of using a testing function.\n- If you need to find if any element satisfies the provided testing function, use [`some()`](./some.mdx).\n\n## Syntax\n\n```js\n// Arrow function\nfind((element) => { /* … */ })\nfind((element, index) => { /* … */ })\nfind((element, index, array) => { /* … */ })\n\n// Callback function\nfind(callbackFn)\nfind(callbackFn, thisArg)\n\n// Inline callback function\nfind(function (element) { /* … */ })\nfind(function (element, index) { /* … */ })\nfind(function (element, index, array) { /* … */ })\nfind(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value to indicate a matching element has been found.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `find()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\nThe first element in the array that satisfies the provided testing function.\nOtherwise, [`undefined`](../../../globals/undefined.mdx) is returned.\n\n## Description\n\nThe `find()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array in ascending-index order, until `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. `find()` then returns that element and stops iterating through the array. If `callbackFn` never returns a truthy value, `find()` returns [`undefined`](../../../globals/undefined.mdx).\n\n`callbackFn` is invoked for _every_ index of the array, not just those with assigned values. Empty slots in sparse arrays behave the same as `undefined`.\n\n`find()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `find()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are visited as if they were `undefined`.\n\nThe `find()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Array/prototype/findIndex.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.findIndex\n\nThe **`findIndex()`** method returns the index of the first element in an array that satisfies the provided testing function.\nIf no elements satisfy the testing function, -1 is returned.\n\nSee also the [`find()`](./find.mdx) method, which returns the first element that satisfies the testing function (rather than its index).\n\n## Syntax\n\n```js\n// Arrow function\nfindIndex((element) => { /* … */ })\nfindIndex((element, index) => { /* … */ })\nfindIndex((element, index, array) => { /* … */ })\n\n// Callback function\nfindIndex(callbackFn)\nfindIndex(callbackFn, thisArg)\n\n// Inline callback function\nfindIndex(function (element) { /* … */ })\nfindIndex(function (element, index) { /* … */ })\nfindIndex(function (element, index, array) { /* … */ })\nfindIndex(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value to indicate a matching element has been found.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `findIndex()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\nThe index of the first element in the array that passes the test. Otherwise, `-1`.\n\n## Description\n\nThe `findIndex()` is an iterative method. It calls a provided `callbackFn` function once for each element in an array in ascending-index order, until `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. `findIndex()` then returns the index of that element and stops iterating through the array. If `callbackFn` never returns a truthy value, `findIndex()` returns `-1`.\n\n`callbackFn` is invoked for _every_ index of the array, not just those with assigned values. Empty slots in sparse arrays behave the same as `undefined`.\n\n`findIndex()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `findIndex()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are visited as if they were `undefined`.\n\nThe `findIndex()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Array/prototype/flat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.flat\n\nThe **`flat()`** method creates a new array with all sub-array\nelements concatenated into it recursively up to the specified depth.\n\n## Syntax\n\n```js\nflat()\nflat(depth)\n```\n\n### Parameters\n\n- `depth` _**optional**_\n  - : The depth level specifying how deep a nested array structure should be flattened.\n    Defaults to 1.\n\n### Return value\n\nA new array with the sub-array elements concatenated into it.\n\n## Description\n\nThe `flat()` method is a copying method. It does not alter `this` but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains the same elements as the ones from the original array.\n\nThe `flat()` method ignores empty slots if the array being flattened is sparse. For example, if `depth` is 1, both empty slots in the root array and in the first level of nested arrays are ignored, but empty slots in further nested arrays are preserved with the arrays themselves.\n\nThe `flat()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. However, its elements must be arrays if they are to be flattened.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Array/prototype/flatMap.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.flatMap()\n\nThe **`flatMap()`** method returns a new array formed by applying a given callback function to each element of the array, and then flattening the result by one level. It is identical to a [`Array.prototype.map()`](./map.mdx) followed by a [`Array.prototype.flat()`](./flat.mdx) of depth 1 (`arr.map(...args).flat()`), but slightly more efficient than calling those two methods separately.\n\n## Syntax\n\n```js\n// Arrow function\nflatMap((element) => { /* … */ })\nflatMap((element, index) => { /* … */ })\nflatMap((element, index, array) => { /* … */ })\n\n// Callback function\nflatMap(callbackFn)\nflatMap(callbackFn, thisArg)\n\n// Inline callback function\nflatMap(function (element) { /* … */ })\nflatMap(function (element, index) { /* … */ })\nflatMap(function (element, index, array) { /* … */ })\nflatMap(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return an array containing new elements of the new array, or a single non-array value to be added to the new array.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `flatMap()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\nA new array with each element being the result of the callback function and flattened\nby a depth of 1.\n\n## Description\n\nThe `flatMap()` method is an iterative method. See [`Array.prototype.map()`](./map.mdx) for a detailed description of the callback function. The `flatMap()` method is identical to [`map(callbackFn, thisArg)`](./map.mdx) followed by [`flat(1)`](./flat.mdx) — for each element, it produces an array of new elements, and concatenates the resulting arrays together to form a new array.\n\nThe `flatMap()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. However, the value returned from `callbackFn` must be an array if it is to be flattened.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Array/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.forEach()\n\nThe **`forEach()`** method executes a provided function once\nfor each array element.\n\n## Syntax\n\n```js\n// Arrow function\nforEach((element) => { /* … */ })\nforEach((element, index) => { /* … */ })\nforEach((element, index, array) => { /* … */ })\n\n// Callback function\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n\n// Inline callback function\nforEach(function (element) { /* … */ })\nforEach(function (element, index) { /* … */ })\nforEach(function (element, index, array) { /* … */ })\nforEach(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value is discarded.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `forEach()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\n`undefined`.\n\n## Description\n\nThe `forEach()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array in ascending-index order. Unlike [`Array.prototype.map()`](./map.mdx), `forEach()` always returns [`undefined`](../../../globals/undefined.mdx) and is not chainable. The typical use case is to execute side effects at the end of a chain.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\n`forEach()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `forEach()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\nThe `forEach()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n\nThere is no way to stop or break a `forEach()` loop other than by throwing an exception. If you need such behavior, the `forEach()` method is the wrong tool.\n\nEarly termination may be accomplished with looping statements like [`for`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for), [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of), and [`for...in`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...in). Array methods like [`Array.prototype.some()`](./some.mdx), [`Array.prototype.some()`](./some.mdx), [`Array.prototype.find()`](./find.mdx), and [`Array.prototype.findIndex()`](./findIndex.mdx) also stops iteration immediately when further iteration is not necessary.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Array/prototype/includes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.includes()\n\nThe **`includes()`** method determines whether an array\nincludes a certain value among its entries, returning `true` or\n`false` as appropriate.\n\n## Syntax\n\n```js\nincludes(searchElement)\nincludes(searchElement, fromIndex)\n```\n\n### Parameters\n\n- `searchElement`\n  - : The value to search for.\n- `fromIndex` _**optional**_\n  - : Zero-based index at which to start searching, converted to an integer.\n    - Negative index counts back from the end of the array — if `fromIndex < 0`, `fromIndex + array.length` is used. However, the array is still searched from front to back in this case.\n    - If `fromIndex < -array.length` or `fromIndex` is omitted, `0` is used, causing the entire array to be searched.\n    - If `fromIndex >= array.length`, the array is not searched and `false` is returned.\n\n### Return value\n\nA boolean value which is `true` if the value `searchElement` is found within the array (or the part of the array indicated by the index `fromIndex`, if specified).\n\n## Description\n\nThe `includes()` method compares `searchElement` to elements of the array using the [SameValueZero](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) algorithm. Values of zero are all considered to be equal, regardless of sign. (That is, `-0` is equal to `0`), but `false` is _not_ considered to be the same as `0`. [`NaN`](../../NaN.mdx) can be correctly searched for.\n\nWhen used on sparse arrays, the `includes()` method iterates empty slots as if they have the value `undefined`.\n\nThe `includes()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Array/prototype/indexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.indexOf()\n\nThe **`indexOf()`** method returns the first index at which a\ngiven element can be found in the array, or -1 if it is not present.\n\n## Syntax\n\n```js\nindexOf(searchElement)\nindexOf(searchElement, fromIndex)\n```\n\n### Parameters\n\n- `searchElement`\n  - : Element to locate in the array.\n- `fromIndex` _**optional**_\n  - : Zero-based index at which to start searching, converted to an integer.\n    - Negative index counts back from the end of the array — if `fromIndex < 0`, `fromIndex + array.length` is used. Note, the array is still searched from front to back in this case.\n    - If `fromIndex < -array.length` or `fromIndex` is omitted, `0` is used, causing the entire array to be searched.\n    - If `fromIndex >= array.length`, the array is not searched and `-1` is returned.\n\n### Return value\n\nThe first index of the element in the array; **-1** if not found.\n\n## Description\n\nThe `indexOf()` method compares `searchElement` to elements of the array using [strict equality](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) (the same algorithm used by the `===` operator).\n\nThe `indexOf()` method skips empty slots in sparse arrays.\n\nThe `indexOf()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Array/prototype/join.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.join()\n\nThe **`join()`** method creates and\nreturns a new string by concatenating all of the elements in an array\n(or an [array-like object](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects)),\nseparated by commas or a specified separator string. If the array has\nonly one item, then that item will be returned without using the separator.\n\n## Syntax\n\n```js\njoin()\njoin(separator)\n```\n\n### Parameters\n\n- `separator` _**optional**_\n  - : Specifies a string to separate each pair of adjacent elements of the array. The\n    separator is converted to a string if necessary. If omitted, the array elements are\n    separated with a comma (\",\"). If `separator` is an empty string, all\n    elements are joined without any characters in between them.\n\n### Return value\n\nA string with all array elements joined. If `arr.length` is\n`0`, the empty string is returned.\n\n## Description\n\nThe string conversions of all array elements are joined into one string. If an element is `undefined`, `null`, it is converted to an empty string instead of the string `\"null\"` or `\"undefined\"`.\n\nThe `join` method is accessed internally by [`Array.prototype.toString()`](./toString.mdx) with no arguments. Overriding `join` of an array instance will override its `toString` behavior as well.\n\nWhen used on sparse arrays, the `join()` method iterates empty slots as if they have the value `undefined`.\n\nThe `join()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Array/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.keys()\n\nThe **`keys()`** method returns a new **Array\nIterator** object that contains the keys for each index in the array.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nA new `Array` iterator object.\n\n## Description\n\nWhen used on sparse arrays, the `keys()` method iterates empty slots as if they have the value `undefined`.\n\nThe `keys()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Array/prototype/lastIndexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.lastIndexOf()\n\nThe **`lastIndexOf()`** method returns the last index at which\na given element can be found in the array, or -1 if it is not present. The array is\nsearched backwards, starting at `fromIndex`.\n\n## Syntax\n\n```js\nlastIndexOf(searchElement)\nlastIndexOf(searchElement, fromIndex)\n```\n\n### Parameters\n\n- `searchElement`\n  - : Element to locate in the array.\n- `fromIndex` _**optional**_\n  - : Zero-based index at which to start searching backwards, converted to an integer.\n    - Negative index counts back from the end of the array — if `fromIndex < 0`, `fromIndex + array.length` is used.\n    - If `fromIndex < -array.length`, the array is not searched and `-1` is returned. You can think of it conceptually as starting at a nonexistent position before the beginning of the array and going backwards from there. There are no array elements on the way, so `searchElement` is never found.\n    - If `fromIndex >= array.length` or `fromIndex` is omitted, `array.length - 1` is used, causing the entire array to be searched. You can think of it conceptually as starting at a nonexistent position beyond the end of the array and going backwards from there. It eventually reaches the real end position of the array, at which point it starts searching backwards through the actual array elements.\n\n### Return value\n\nThe last index of the element in the array; **-1** if not found.\n\n## Description\n\nThe `lastIndexOf()` method compares `searchElement` to elements of the array using [strict equality](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) (the same algorithm used by the `===` operator).\n\nThe `lastIndexOf()` method skips empty slots in sparse arrays.\n\nThe `lastIndexOf()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Array/prototype/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.length\n\nThe **`length`** data property of an `Array` instance represents the number of elements in that array. The value is an unsigned, 32-bit integer that is always numerically greater than the highest index in the array.\n\n## Value\n\nA non-negative integer less than 2<sup>32</sup>.\n\n## Description\n\nThe value of the `length` property is a non-negative integer with a value less than 2<sup>32</sup>.\n\n```js\nconst listA = [1, 2, 3];\nconst listB = new Array(6);\n\nconsole.log(listA.length);\n// 3\n\nconsole.log(listB.length);\n// 6\n\nlistB.length = 2 ** 32; // 4294967296\n// RangeError: Invalid array length\n\nconst listC = new Array(-100); // Negative numbers are not allowed\n// RangeError: Invalid array length\n```\n\nThe array object observes the `length` property, and automatically syncs the `length` value with the array's content. This means:\n\n- Setting `length` to a value smaller than the current length truncates the array — elements beyond the new `length` are deleted.\n- Setting any array index (a non-negative integer smaller than 2<sup>32</sup>) beyond the current `length` extends the array — the `length` property is increased to reflect the new highest index.\n- Setting `length` to an invalid value (e.g. a negative number or a non-integer) throws a `RangeError` exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Array/prototype/map.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.map()\n\nThe **`map()`** method **creates\na new array** populated with the results of calling a provided function on\nevery element in the calling array.\n\n## Syntax\n\n```js\n// Arrow function\nmap((element) => { /* … */ })\nmap((element, index) => { /* … */ })\nmap((element, index, array) => { /* … */ })\n\n// Callback function\nmap(callbackFn)\nmap(callbackFn, thisArg)\n\n// Inline callback function\nmap(function (element) { /* … */ })\nmap(function (element, index) { /* … */ })\nmap(function (element, index, array) { /* … */ })\nmap(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value is added as a single element in the new array.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `map()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\nA new array with each element being the result of the callback function.\n\n## Description\n\nThe `map()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array and constructs a new array from the results.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nThe `map()` method is a copying method. It does not alter `this`. However, the function provided as `callbackFn` can mutate the array. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `map()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `map()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n\nSince `map` builds a new array, calling it without using the returned\narray is an anti-pattern; use [`Array.prototype.forEach()`](./forEach.mdx) or\n`for...of` instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Array/prototype/pop.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.pop()\n\nThe **`pop()`** method removes the **last**\nelement from an array and returns that element. This method changes the length of the\narray.\n\n## Syntax\n\n```js\npop()\n```\n\n### Return value\n\nThe removed element from the array; [`undefined`](../../../globals/undefined.mdx) if the array is empty.\n\n## Description\n\nThe `pop()` method removes the last element from an array and returns that value to the caller. If you call `pop()` on an empty array, it returns [`undefined`](../../../globals/undefined.mdx).\n\n[`Array.prototype.shift()`](./shift.mdx) has similar behavior to `pop()`, but applied to the first element in an array.\n\nThe `pop()` method is a mutating method. It changes the length and the content of `this`. In case you want the value of `this` to be the same, but return a new array with the last element removed, you can use [`arr.slice(0, -1)`](./slice.mdx) instead.\n\nThe `pop()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Array/prototype/push.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.push()\n\nThe **`push()`** method adds one or more elements to the end of\nan array and returns the new length of the array.\n\n## Syntax\n\n```js\npush(element0)\npush(element0, element1)\npush(element0, element1, /* … ,*/ elementN)\n```\n\n### Parameters\n\n- `elementN`\n  - : The element(s) to add to the end of the array.\n\n### Return value\n\nThe new [`Array.prototype.length`](./length.mdx) property of the object upon which the method was called.\n\n## Description\n\nThe `push()` method appends values to an array.\n\n[`Array.prototype.unshift()`](./unshift.mdx)has similar behavior to `push()`, but applied to the start of an array.\n\nThe `push()` method is a mutating method. It changes the length and the content of `this`. In case you want the value of `this` to be the same, but return a new array with elements appended to the end, you can use [`arr.concat([element0, element1, /* ... ,*/ elementN])`](./concat.mdx) instead. Notice that the elements are wrapped in an extra array — otherwise, if the element is an array itself, it would be spread instead of pushed as a single element due to the behavior of `concat()`.\n\nThe `push()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Array/prototype/reduce.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.reduce()\n\nThe **`reduce()`** method executes a user-supplied \"reducer\" callback function on each element of the array, in order, passing in the return value from the calculation on the preceding element.\nThe final result of running the reducer across all elements of the array is a single value.\n\nThe first time that the callback is run there is no \"return value of the previous calculation\".\nIf supplied, an initial value may be used in its place.\nOtherwise the array element at index 0 is used as the initial value and iteration starts from the next element (index 1 instead of index 0).\n\nPerhaps the easiest-to-understand case for `reduce()` is to return the sum of all the elements in an array:\n\nThe reducer walks through the array element-by-element, at each step adding the current array value to the result from the previous step (this result is the running sum of all the previous steps) — until there are no more elements to add.\n\n## Syntax\n\n```js\n// Arrow function\nreduce((accumulator, currentValue) => { /* … */ })\nreduce((accumulator, currentValue, currentIndex) => { /* … */ })\nreduce((accumulator, currentValue, currentIndex, array) => { /* … */ })\n\nreduce((accumulator, currentValue) => { /* … */ }, initialValue)\nreduce((accumulator, currentValue, currentIndex) => { /* … */ }, initialValue)\nreduce((accumulator, currentValue, currentIndex, array) => { /* … */ }, initialValue)\n\n// Callback function\nreduce(callbackFn)\nreduce(callbackFn, initialValue)\n\n// Inline callback function\nreduce(function (accumulator, currentValue) { /* … */ })\nreduce(function (accumulator, currentValue, currentIndex) { /* … */ })\nreduce(function (accumulator, currentValue, currentIndex, array) { /* … */ })\n\nreduce(function (accumulator, currentValue) { /* … */ }, initialValue)\nreduce(function (accumulator, currentValue, currentIndex) { /* … */ }, initialValue)\nreduce(function (accumulator, currentValue, currentIndex, array) { /* … */ }, initialValue)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value becomes the value of the `accumulator` parameter on the next invocation of `callbackFn`. For the last invocation, the return value becomes the return value of `reduce()`.\n\n    The function is called with the following arguments:\n\n    - `accumulator`\n      - : The value resulting from the previous call to `callbackFn`. On first call, `initialValue` if specified, otherwise the value of `array[0]`.\n    - `currentValue`\n      - : The value of the current element. On first call, the value of `array[0]` if an `initialValue` was specified, otherwise the value of `array[1]`.\n    - `currentIndex`\n      - : The index position of `currentValue` in the array. On first call, `0` if `initialValue` was specified, otherwise `1`.\n    - `array`\n      - : The array `reduce()` was called upon.\n\n- `initialValue` _**optional**_\n  - : A value to which `accumulator` is initialized the first time the callback is called.\n    If `initialValue` is specified, `callbackFn` starts executing with the first value in the array as `currentValue`.\n    If `initialValue` is _not_ specified, `accumulator` is initialized to the first value in the array, and `callbackFn` starts executing with the second value in the array as `currentValue`. In this case, if the array is empty (so that there's no first value to return as `accumulator`), an error is thrown.\n\n### Return value\n\nThe value that results from running the \"reducer\" callback function to completion over the entire array.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n\n  - : The array contains no elements and `initialValue` is not provided.\n\n## Description\n\nThe `reduce()` method is an iterative method. It runs a \"reducer\" callback function over all elements in the array, in ascending-index order, and accumulates them into a single value. Every time, the return value of `callbackFn` is passed into `callbackFn` again on next invocation as `accumulator`. The final value of `accumulator` (which is the value returned from `callbackFn` on the final iteration of the array) becomes the return value of `reduce()`.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nUnlike other [iterative methods](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array#iterative_methods), `reduce()` does not accept a `thisArg` argument. `callbackFn` is always called with `undefined` as `this`, which gets substituted with `globalThis` if `callbackFn` is non-strict.\n\n`reduce()` is a central concept in [functional programming](https://en.wikipedia.org/wiki/Functional_programming), where it's not possible to mutate any value, so in order to accumulate all values in an array, one must return a new accumulator value on every iteration. This convention propagates to JavaScript's `reduce()`: you should use [spreading](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) or other copying methods where possible to create new arrays and objects as the accumulator, rather than mutating the existing one. If you decided to mutate the accumulator instead of copying it, remember to still return the modified object in the callback, or the next iteration will receive undefined.\n\n`reduce()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `reduce()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `reduce()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n\n### When to not use reduce()\n\nRecursive functions like `reduce()` can be powerful but sometimes difficult to understand, especially for less-experienced JavaScript developers. If code becomes clearer when using other array methods, developers must weigh the readability tradeoff against the other benefits of using `reduce()`. In cases where `reduce()` is the best choice, documentation and semantic variable naming can help mitigate readability drawbacks.\n\n### Edge cases\n\nIf the array only has one element (regardless of position) and no `initialValue` is provided, or if `initialValue` is provided but the array is empty, the solo value will be returned _without_ calling `callbackFn`.\n\nIf `initialValue` is provided and the array is not empty, then the reduce method will always invoke the callback function starting at index 0.\n\nIf `initialValue` is not provided then the reduce method will act differently for arrays with length larger than 1, equal to 1 and 0, as shown in the following example:\n\n```js\nconst getMax = (a, b) => Math.max(a, b);\n\n// callback is invoked for each element in the array starting at index 0\n[1, 100].reduce(getMax, 50); // 100\n[50].reduce(getMax, 10); // 50\n\n// callback is invoked once for element at index 1\n[1, 100].reduce(getMax); // 100\n\n// callback is not invoked\n[50].reduce(getMax); // 50\n[].reduce(getMax, 1); // 1\n\n[].reduce(getMax); // TypeError\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Array/prototype/reduceRight.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.reduceRight()\n\nThe **`reduceRight()`** method applies a function against an\naccumulator and each value of the array (from right-to-left) to reduce it to a single\nvalue.\n\nSee also [`Array.prototype.reduce()`](./reduce.mdx) for left-to-right.\n\n## Syntax\n\n```js\n// Arrow function\nreduceRight((accumulator, currentValue) => { /* … */ })\nreduceRight((accumulator, currentValue, index) => { /* … */ })\nreduceRight((accumulator, currentValue, index, array) => { /* … */ })\nreduceRight((accumulator, currentValue, index, array) => { /* … */ }, initialValue)\n\n// Callback function\nreduceRight(callbackFn)\nreduceRight(callbackFn, initialValue)\n\n// Callback reducer function\nreduceRight(function (accumulator, currentValue) { /* … */ })\nreduceRight(function (accumulator, currentValue, index) { /* … */ })\nreduceRight(function (accumulator, currentValue, index, array) { /* … */ })\nreduceRight(function (accumulator, currentValue, index, array) { /* … */ }, initialValue)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. Its return value becomes the value of the `accumulator` parameter on the next invocation of `callbackFn`. For the last invocation, the return value becomes the return value of `reduce()`.\n\n    The function is called with the following arguments:\n\n    - `accumulator`\n      - : The value previously returned in the last invocation of the callback, or\n        `initialValue`, if supplied. (See below.)\n    - `currentValue`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `reduceRight()` was called upon.\n\n- `initialValue` _**optional**_\n  - : Value to use as accumulator to the first call of the\n    `callbackFn`. If no initial value is supplied, the last element in\n    the array will be used and skipped. Calling reduce or reduceRight on an empty array\n    without an initial value creates a `TypeError`.\n\n### Return value\n\nThe value that results from the reduction.\n\n## Description\n\nThe `reduceRight()` method is an iterative method. It runs a \"reducer\" callback function over all elements in the array, in descending-index order, and accumulates them into a single value.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\nUnlike other [iterative methods](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array#iterative_methods), `reduce()` does not accept a `thisArg` argument. `callbackFn` is always called with `undefined` as `this`, which gets substituted with `globalThis` if `callbackFn` is non-strict.\n\n`reduceRight()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `reduceRight()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\n\n\nThe `reduceRight()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Array/prototype/reverse.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.reverse()\n\nThe **`reverse()`** method reverses an array _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_ and returns the reference to the same array, the first array element now becoming the last, and the last array element becoming the first. In other words, elements order in the array will be turned towards the direction opposite to that previously stated.\n\n## Syntax\n\n```js\nreverse()\n```\n\n### Return value\n\nThe reference to the original array, now reversed. Note that the array is reversed _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_, and no copy is made.\n\n## Description\n\nThe `reverse()` method transposes the elements of the calling array object in\nplace, mutating the array, and returning a reference to the array.\n\nThe `reverse()` method preserves empty slots. If the source array is sparse, the empty slots' corresponding new indices are [deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) and also become empty slots.\n\nThe `reverse()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Array/prototype/shift.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.shift()\n\nThe **`shift()`** method removes the **first**\nelement from an array and returns that removed element. This method changes the length\nof the array.\n\n## Syntax\n\n```js\nshift()\n```\n\n### Return value\n\nThe removed element from the array; [`undefined`](../../../globals/undefined.mdx) if the array is empty.\n\n## Description\n\nThe `shift()` method removes the element at the zeroth index and shifts the\nvalues at consecutive indexes down, then returns the removed value. If the\n[`Array.prototype.length`](./length.mdx) property is 0, [`undefined`](../../../globals/undefined.mdx) is returned.\n\nThe [`Array.prototype.pop()`](./pop.mdx) method has similar behavior to `shift()`, but applied to the last element in an array.\n\nThe `shift()` method is a mutating method. It changes the length and the content of `this`. In case you want the value of `this` to be the same, but return a new array with the first element removed, you can use [`arr.slice(1)`](./slice.mdx) instead.\n\nThe `shift()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Array/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.slice()\n\nThe **`slice()`** method returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) of a portion of\nan array into a new array object selected from `start` to `end`\n(`end` not included) where `start` and `end` represent\nthe index of items in that array. The original array will not be modified.\n\n## Syntax\n\n```js\nslice()\nslice(start)\nslice(start, end)\n```\n\n### Parameters\n\n- `start` _**optional**_\n  - : Zero-based index at which to start extraction, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, nothing is extracted.\n- `end` _**optional**_\n  - : Zero-based index at which to end extraction, converted to an integer. `slice()` extracts up to but not including `end`.\n    - Negative index counts back from the end of the array — if `end < 0`, `end + array.length` is used.\n    - If `end < -array.length`, `0` is used.\n    - If `end >= array.length` or `end` is omitted, `array.length` is used, causing all elements until the end to be extracted.\n    - If `end` is positioned before or at `start` after normalization, nothing is extracted.\n\n### Return value\n\nA new array containing the extracted elements.\n\n## Description\n\nThe `slice()` method is a copying method. It does not alter `this` but instead returns a [shallow copy](https://developer.mozilla.org/docs/Glossary/Shallow_copy) that contains some of the same elements as the ones from the original array.\n\nThe `slice()` method preserves empty slots. If the sliced portion is sparse, the returned array is sparse as well.\n\nThe `slice()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Array/prototype/some.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.some()\n\nThe **`some()`** method tests whether\nat least one element in the array passes the test implemented by the provided\nfunction. It returns true if, in the array, it finds an element for which the provided function returns true; otherwise it returns false. It doesn't modify the array.\n\n## Syntax\n\n```js\n// Arrow function\nsome((element) => { /* … */ })\nsome((element, index) => { /* … */ })\nsome((element, index, array) => { /* … */ })\n\n// Callback function\nsome(callbackFn)\nsome(callbackFn, thisArg)\n\n// Inline callback function\nsome(function (element) { /* … */ })\nsome(function (element, index) { /* … */ })\nsome(function (element, index, array) { /* … */ })\nsome(function (element, index, array) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n\n  - : A function to execute for each element in the array. It should return a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) to indicate the element passes the test, and a falsy value otherwise.\n\n    The function is called with the following arguments:\n\n    - `element`\n      - : The current element being processed in the array.\n    - `index`\n      - : The index of the current element being processed in the array.\n    - `array`\n      - : The array `some()` was called upon.\n\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`. \n\n### Return value\n\n`true` if the callback function returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value for at least one element in the array. Otherwise, `false`.\n\n## Description\n\nThe `some()` method is an iterative method. It calls a provided `callbackFn` function once for each element in an array, until the `callbackFn` returns a [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value. If such an element is found, `some()` immediately returns `true` and stops iterating through the array. Otherwise, if `callbackFn` returns a [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value for all elements, `some()` returns `false`.\n\n`some()` acts like the \"there exists\" quantifier in mathematics. In particular, for an empty array, it returns `false` for any condition.\n\n`callbackFn` is invoked only for array indexes which have assigned values. It is not invoked for empty slots in sparse arrays.\n\n`some()` does not mutate the array on which it is called, but the function provided as `callbackFn` can. Note, however, that the length of the array is saved _before_ the first invocation of `callbackFn`. Therefore:\n\n- `callbackFn` will not visit any elements added beyond the array's initial length when the call to `some()` began.\n- Changes to already-visited indexes do not cause `callbackFn` to be invoked on them again.\n- If an existing, yet-unvisited element of the array is changed by `callbackFn`, its value passed to the `callbackFn` will be the value at the time that element gets visited. [Deleted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) elements are not visited.\n\nThe `some()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Array/prototype/sort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.sort()\n\nThe **`sort()`** method sorts the elements of an array _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_ and returns the reference to the same array, now sorted. The default sort order is ascending, built upon converting the elements into strings, then comparing their sequences of UTF-16 code units values.\n\nThe time and space complexity of the sort cannot be guaranteed as it depends on the\nimplementation.\n\n## Syntax\n\n```js\n// Functionless\nsort()\n\n// Arrow function\nsort((a, b) => { /* … */ } )\n\n// Compare function\nsort(compareFn)\n\n// Inline compare function\nsort(function compareFn(a, b) { /* … */ })\n```\n\n### Parameters\n\n- `compareFn` _**optional**_\n\n  - : Specifies a function that defines the sort order. If omitted, the array elements are converted to strings, then sorted according to each character's Unicode code point value.\n\n    - `a`\n      - : The first element for comparison.\n    - `b`\n      - : The second element for comparison.\n\n### Return value\n\nThe reference to the original array, now sorted. Note that the array is sorted _[in place](https://en.wikipedia.org/wiki/In-place_algorithm)_, and no copy is made.\n\n## Description\n\nIf `compareFn` is not supplied, all non-`undefined` array\nelements are sorted by converting them to strings and comparing strings in UTF-16 code\nunits order. For example, \"banana\" comes before \"cherry\". In a numeric sort, 9 comes\nbefore 80, but because numbers are converted to strings, \"80\" comes before \"9\" in the\nUnicode order. All `undefined` elements are sorted to the end of the array.\n\nThe `sort()` method preserves empty slots. If the source array is sparse, the empty slots are moved to the end of the array, and always come after all the `undefined`.\n\n> **Note:** In UTF-16, Unicode characters above `\\uFFFF` are\n> encoded as two surrogate code units, of the range\n> `\\uD800` - `\\uDFFF`. The value of each code unit is taken\n> separately into account for the comparison. Thus the character formed by the surrogate\n> pair `\\uD855\\uDE51` will be sorted before the character\n> `\\uFF3A`.\n\nIf `compareFn` is supplied, all non-`undefined` array\nelements are sorted according to the return value of the compare function (all\n`undefined` elements are sorted to the end of the array, with no call to\n`compareFn`).\n\n| `compareFn(a, b)` return value | sort order                         |\n| ------------------------------ | ---------------------------------- |\n| > 0                            | sort `a` after `b`                 |\n| < 0                            | sort `a` before `b`                |\n| === 0                          | keep original order of `a` and `b` |\n\nSo, the compare function has the following form:\n\n```js\nfunction compareFn(a, b) {\n  if (a is less than b by some ordering criterion) {\n    return -1;\n  }\n  if (a is greater than b by the ordering criterion) {\n    return 1;\n  }\n  // a must be equal to b\n  return 0;\n}\n```\n\nMore formally, the comparator is expected to have the following properties, in order to ensure proper sort behavior:\n\n- _Pure_: The comparator does not mutate the objects being compared or any external state. (This is important because there's no guarantee _when_ and _how_ the comparator will be called, so any particular call should not produce visible effects to the outside.)\n- _Stable_: The comparator returns the same result with the same pair of input.\n- _Reflexive_: `compareFn(a, a) === 0`.\n- _Anti-symmetric_: `compareFn(a, b)` and `compareFn(b, a)` must both be `0` or have opposite signs.\n- _Transitive_: If `compareFn(a, b)` and `compareFn(b, c)` are both positive, zero, or negative, then `compareFn(a, c)` has the same positivity as the previous two.\n\nA comparator conforming to the constraints above will always be able to return all of `1`, `0`, and `-1`, or consistently return `0`. For example, if a comparator only returns `1` and `0`, or only returns `0` and `-1`, it will not be able to sort reliably because _anti-symmetry_ is broken. A comparator that always returns `0` will cause the array to not be changed at all, but is reliable nonetheless.\n\nThe default lexicographic comparator satisfies all constraints above.\n\nTo compare numbers instead of strings, the compare function can subtract `b`\nfrom `a`. The following function will sort the array in ascending order (if\nit doesn't contain `Infinity` and `NaN`):\n\n```js\nfunction compareNumbers(a, b) {\n  return a - b;\n}\n```\n\nThe `sort()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Array/prototype/splice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.splice()\n\nThe **`splice()`** method changes the contents of an array by\nremoving or replacing existing elements and/or adding new elements [in place](https://en.wikipedia.org/wiki/In-place_algorithm). To access part of an array without modifying it, see [`Array.prototype.slice()`](./slice.mdx).\n\n## Syntax\n\n```js\nsplice(start)\nsplice(start, deleteCount)\nsplice(start, deleteCount, item1)\nsplice(start, deleteCount, item1, item2, itemN)\n```\n\n### Parameters\n\n- `start`\n\n  - : Zero-based index at which to start changing the array, converted to an integer.\n    - Negative index counts back from the end of the array — if `start < 0`, `start + array.length` is used.\n    - If `start < -array.length` or `start` is omitted, `0` is used.\n    - If `start >= array.length`, no element will be deleted, but the method will behave as an adding function, adding as many elements as provided.\n\n- `deleteCount` _**optional**_\n\n  - : An integer indicating the number of elements in the array to remove from `start`.\n\n    If `deleteCount` is omitted, or if its value is greater than or equal to the number of elements after the position specified by `start`, then all the elements from `start` to the end of the array will be deleted. However, if you wish to pass any `itemN` parameter, you should pass `Infinity` as `deleteCount` to delete all elements after `start`, because an explicit `undefined` gets [converted](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#integer_conversion) to `0`.\n\n    If `deleteCount` is `0` or negative, no elements are removed.\n    In this case, you should specify at least one new element (see below).\n\n- `item1`, …, `itemN` _**optional**_\n\n  - : The elements to add to the array, beginning from `start`.\n\n    If you do not specify any elements, `splice()` will only remove elements from the array.\n\n### Return value\n\nAn array containing the deleted elements.\n\nIf only one element is removed, an array of one element is returned.\n\nIf no elements are removed, an empty array is returned.\n\n## Description\n\nThe `splice()` method is a mutating method. It may change the content of `this`. If the specified number of elements to insert differs from the number of elements being removed, the array's `length` will be changed as well. At the same time, it uses [`@@species`](../@@species.mdx) to create a new array instance to be returned.\n\nIf the deleted portion is sparse, the array returned by `splice()` is sparse as well, with those corresponding indices being empty slots.\n\nThe `splice()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Array/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string representing\nthe elements of the array. The elements are converted to Strings using their\n`toLocaleString` methods and these Strings are separated by a locale-specific\nString (such as a comma \",\").\n\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\n- `locales` _**optional**_\n  - : A string with a BCP 47 language tag, or an array of such strings. For the general form and interpretation of the `locales` argument, see [Locale identification and negotiation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation).\n- `options` _**optional**_\n  - : An object with configuration properties. For numbers, see [`Number.prototype.toLocaleString()`](../../../globals/Number/prototype/toLocaleString.mdx); for dates, see [`Date.prototype.toLocaleString()`](../../../globals/Date/prototype/toLocaleString.mdx).\n\n### Return value\n\nA string representing the elements of the array.\n\n## Description\n\nThe `Array.prototype.toLocaleString` method traverses its content, calling the `toLocaleString` method of every element with the `locales` and `options` parameters provided, and concatenates them with an implementation-defined separator (such as a comma \",\"). Note that the method itself does not consume the two parameters — it only passes them to the `toLocaleString()` of each element. The choice of the separator string depends on the host's current locale, not the `locales` parameter.\n\nIf an element is `undefined`, `null`, it is converted to an empty string instead of the string `\"null\"` or `\"undefined\"`.\n\nWhen used on sparse arrays, the `toLocaleString()` method iterates empty slots as if they have the value `undefined`.\n\nThe `toLocaleString()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Array/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.toString()\n\nThe **`toString()`** method returns a string representing the\nspecified array and its elements.\n\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the elements of the array.\n\n## Description\n\nThe `Array` object overrides the `toString` method of `Object`. The `toString` method of arrays calls [`join()`](../../../globals/Array/prototype/join.mdx) internally, which joins the array and returns one string containing each array element separated by commas. If the `join` method is unavailable or is not a function, [`Object.prototype.toString`](../../../globals/Object/prototype/toString.mdx) is used instead, returning `[object Array]`.\n\n```js\nconst arr = [];\narr.join = 1; // re-assign `join` with a non-function\nconsole.log(arr.toString()); // [object Array]\n\nconsole.log(Array.prototype.toString.call({ join: () => 1 })); // 1\n```\n\nJavaScript calls the `toString` method automatically when an array is to be represented as a text value or when an array is referred to in a string concatenation.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Array/prototype/unshift.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.unshift()\n\nThe **`unshift()`** method adds one or more elements to the\nbeginning of an array and returns the new length of the array.\n\n## Syntax\n\n```js\nunshift(element0)\nunshift(element0, element1)\nunshift(element0, element1, /* … ,*/ elementN)\n```\n\n### Parameters\n\n- `elementN`\n  - : The elements to add to the front of the `arr`.\n\n### Return value\n\nThe new [`Array.prototype.length`](./length.mdx) property of the object upon which the\nmethod was called.\n\n## Description\n\nThe `unshift()` method inserts the given values to the beginning of an\narray-like object.\n\n[`Array.prototype.push()`](./push.mdx) has similar behavior to `unshift()`, but applied to the end of an array.\n\nPlease note that, if multiple elements are passed as parameters, they're inserted in\nchunk at the beginning of the object, in the exact same order they were passed as\nparameters. Hence, calling `unshift()` with `n`\narguments **once**, or calling it `n` times with\n**1** argument (with a loop, for example), don't yield the same results.\n\nSee example:\n\n```js\nlet arr = [4, 5, 6];\n\narr.unshift(1, 2, 3);\nconsole.log(arr);\n// [1, 2, 3, 4, 5, 6]\n\narr = [4, 5, 6]; // resetting the array\n\narr.unshift(1);\narr.unshift(2);\narr.unshift(3);\n\nconsole.log(arr);\n// [3, 2, 1, 4, 5, 6]\n```\n\nThe `unshift()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties. Although strings are also array-like, this method is not suitable to be applied on them, as strings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Array/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Array.prototype.values()\n\nThe **`values()`** method returns a new _array [iterator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterator_protocol)_ object that iterates the value of each index in the array.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nA new iterable iterator object.\n\n## Description\n\n`Array.prototype.values()` is the default implementation of [`Array.prototype[@@iterator]()`](./@@iterator.mdx).\n\n```js\nArray.prototype.values === Array.prototype[Symbol.iterator]; // true\n```\n\nWhen used on sparse arrays, the `values()` method iterates empty slots as if they have the value `undefined`.\n\nThe `values()` method is generic. It only expects the `this` value to have a `length` property and integer-keyed properties.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/ArrayBuffer/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get ArrayBuffer\\[Symbol.species]\n\nThe **`ArrayBuffer[Symbol.species]`** accessor property returns the constructor used to construct return values from array buffer methods.\n\n> **Warning:** The existence of `Symbol.species` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Syntax\n\n```js\nArrayBuffer[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct return values from array buffer methods that create new array buffers.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `ArrayBuffer` objects. Subclass constructors may override it to change the constructor assignment. The default implementation is basically:\n\n```js\n// Hypothetical underlying implementation for illustration\nclass ArrayBuffer {\n  static get [Symbol.species]() {\n    return this;\n  }\n}\n```\n\nBecause of this polymorphic implementation, `Symbol.species` of derived subclasses would also return the constructor itself by default.\n\n```js\nclass SubArrayBuffer extends ArrayBuffer {}\nSubArrayBuffer[Symbol.species] === SubArrayBuffer; // true\n```\n\nWhen calling array buffer methods that do not mutate the existing object but return a new array buffer instance (for example, [`slice()`](./prototype/slice.mdx)), the object's `constructor[Symbol.species]` will be accessed. The returned constructor will be used to construct the return value of the array buffer method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/ArrayBuffer/ArrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer()\n\nThe **`ArrayBuffer()`** constructor is used to create \"ArrayBuffer\" objects.\n\n## Syntax\n\n```js\nnew ArrayBuffer(length)\n```\n\n> **Note:** `ArrayBuffer()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `length`\n  - : The size, in bytes, of the array buffer to create.\n\n### Return value\n\nA new `ArrayBuffer` object of the specified size. Its contents are\ninitialized to 0.\n\n### Exceptions\n\n- [`RangeError`](../RangeError/RangeError.mdx)\n  - : Thrown if the `length` is larger than `Number_MAX_SAFE_INTEGER` (≥ 2<sup>53</sup>) or negative.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/ArrayBuffer/isView.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer.isView\n\nThe **`ArrayBuffer.isView()`** method determines whether the\npassed value is one of the `ArrayBuffer` views,\nsuch as [typed array objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray)\nor a [`DataView`](../DataView/DataView.mdx).\n\n## Syntax\n\n```js\nArrayBuffer.isView(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be checked.\n\n### Return value\n\n`true` if the given argument is one of the `ArrayBuffer` views;\notherwise, `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/ArrayBuffer/prototype/byteLength.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer.prototype.byteLength\n\nThe **`byteLength`** accessor property represents the length of an `ArrayBuffer` in bytes.\n\n## Description\n\nThe `byteLength` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when the array is constructed and cannot be changed. This property returns 0 if this `ArrayBuffer` has been detached.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/ArrayBuffer/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ArrayBuffer.prototype.slice()\n\nThe **`slice()`** method returns a new `ArrayBuffer`\nwhose contents are a copy of this `ArrayBuffer`'s bytes from\n`begin`, inclusive, up to `end`, exclusive.\n\n## Syntax\n\n```js\nslice(begin)\nslice(begin, end)\n```\n\n### Parameters\n\n- `begin`\n  - : Zero-based byte index at which to begin slicing.\n- `end` _**optional**_\n  - : Byte index before which to end slicing. If end is unspecified, the new\n    `ArrayBuffer` contains all bytes from begin to the end of this\n    `ArrayBuffer`. If negative, it will make the Byte index begin from the last\n    Byte.\n\n### Return value\n\nA new `ArrayBuffer` object.\n\n## Description\n\nThe `slice()` method copies up to, but not including, the byte indicated by\nthe `end` parameter. If either `begin` or `end` is\nnegative, it refers to an index from the end of the array, as opposed to from the\nbeginning.\n\nThe range specified by the `begin` and `end` parameters is\nclamped to the valid index range for the current array. If the computed length of the\nnew `ArrayBuffer` would be negative, it is clamped to zero.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/BigInt/BigInt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt()\n\nThe **`BigInt()`** function returns a value of type **bigint**.\n\n## Syntax\n\n```js\nBigInt(value)\n```\n\n> **Note:** `BigInt()` can only be called without `new`. Attempting to construct it with `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `value`\n  - : The numeric value of the object being created. It may be a string, an integer, a boolean, or another `BigInt`.\n\n### Return value\n\nA `BigInt` value. Number values must be integers and are converted to BigInts. The boolean value `true` becomes `1n`, and `false` becomes `0n`. Strings are parsed as if they are source text for integer literals, which means they can have leading and trailing whitespaces and can be prefixed with `0b`, `0o`, or `0x`.\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if the parameter is a non-integral number.\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if at least one of these conditions is met:\n    - The parameter cannot be converted to a primitive.\n    - After conversion to a primitive, the result is [`undefined`](../undefined.mdx), `null`, `Symbol`.\n- [`SyntaxError`](../SyntaxError/SyntaxError.mdx)\n  - : Thrown if the parameter is a string that cannot be parsed as a `BigInt`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/BigInt/asIntN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.asIntN()\n\nThe **`BigInt.asIntN`** static method clamps a `BigInt` value to the given number of bits, and returns that value as a signed integer.\n\n## Syntax\n\n```js\nBigInt.asIntN(bits, bigint)\n```\n\n### Parameters\n\n- `bits`\n  - : The amount of bits available for the returned BigInt. Should be an integer between 0 and 2<sup>53</sup> - 1, inclusive.\n- `bigint`\n  - : The BigInt value to clamp to fit into the supplied bits.\n\n### Return value\n\nThe value of `bigint` modulo 2^`bits`, as a signed integer.\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `bits` is negative or greater than 2<sup>53</sup> - 1.\n\n## Description\n\nThe `BigInt.asIntN` method clamps a `BigInt` value to the given number of bits, and interprets the result as a signed integer. For example, for `BigInt.asIntN(3, 25n)`, the value `25n` is clamped to `1n`:\n\n```plain\n25n = 00011001 (base 2)\n          ^=== Clamp to three remaining bits\n===>       001 (base 2) = 1n\n```\n\nIf the leading bit of the remaining number is `1`, the result is negative. For example, `BigInt.asIntN(4, 25n)` yields `-7n`, because `1001` is the encoding of `-7` under two's complement:\n\n```plain\n25n = 00011001 (base 2)\n         ^==== Clamp to four remaining bits\n===>      1001 (base 2) = -7n\n```\n\n> **Note:** `BigInt` values are always encoded as two's complement in binary.\n\nUnlike similar language APIs such as [`Number.prototype.toExponential()`](../Number/prototype/toExponential.mdx), `asIntN` is a static property of `BigInt`, so you always use it as `BigInt.asIntN()`, rather than as a method of a BigInt value. Exposing `asIntN()` as a \"standard library function\" allows [interop with asm.js](https://github.com/tc39/proposal-bigint/blob/master/ADVANCED.md#dont-break-asmjs).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/BigInt/asUintN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.asUintN()\n\nThe **`BigInt.asUintN`** static method clamps a `BigInt` value to the given number of bits, and returns that value as an unsigned integer.\n\n## Syntax\n\n```js\nBigInt.asUintN(bits, bigint)\n```\n\n### Parameters\n\n- `bits`\n  - : The amount of bits available for the returned BigInt. Should be an integer between 0 and 2<sup>53</sup> - 1, inclusive.\n- `bigint`\n  - : The BigInt value to clamp to fit into the supplied bits.\n\n### Return value\n\nThe value of `bigint` modulo 2^`bits`, as an unsigned integer.\n\n### Exceptions\n\n- [`RangeError`](../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `bits` is negative or greater than 2<sup>53</sup> - 1.\n\n## Description\n\nThe `BigInt.asUintN` method clamps a `BigInt` value to the given number of bits, and interprets the result as an unsigned integer. Unsigned integers have no sign bits and are always non-negative. For example, for `BigInt.asUintN(4, 25n)`, the value `25n` is clamped to `9n`:\n\n```plain\n25n = 00011001 (base 2)\n         ^==== Clamp to four remaining bits\n===>      1001 (base 2) = 9n\n```\n\n> **Note:** `BigInt` values are always encoded as two's complement in binary.\n\nUnlike similar language APIs such as [`Number.prototype.toExponential()`](../Number/prototype/toExponential.mdx), `asUintN` is a static property of `BigInt`, so you always use it as `BigInt.asUintN()`, rather than as a method of a BigInt value. Exposing `asUintN()` as a \"standard library function\" allows [interop with asm.js](https://github.com/tc39/proposal-bigint/blob/master/ADVANCED.md#dont-break-asmjs).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/BigInt/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string with a language-sensitive representation of this BigInt. In implementations with [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) support, this method simply calls `Intl.NumberFormat`.\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` parameters customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat), these parameters correspond exactly to the [`Intl.NumberFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) constructor's parameters. Implementations without `Intl.NumberFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#locales) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored.\n\nSee the [`Intl.NumberFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string with a language-sensitive representation of the given BigInt.\n\nIn implementations with `Intl.NumberFormat`, this is equivalent to `new Intl.NumberFormat(locales, options).format(number)`.\n\n## Performance\n\nWhen formatting large numbers of numbers, it is better to create a\n`Intl.NumberFormat` object and use the function provided by its\n`format()` method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/BigInt/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified `BigInt` value. The trailing \"n\" is not part of the string.\n\n## Syntax\n\n```js\ntoString()\ntoString(radix)\n```\n\n### Parameters\n\n- `radix` _**optional**_\n  - : An integer in the range 2 through 36 specifying the base to use for representing the BigInt value. Defaults to 10.\n\n### Return value\n\nA string representing the specified `BigInt` value.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `radix` is less than 2 or greater than 36.\n\n## Description\n\nThe `BigInt` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../Object/prototype/toString.mdx). For `BigInt` values, the `toString()` method returns a string representation of the value in the specified radix.\n\nFor radixes above 10, the letters of the alphabet indicate digits greater than 9. For example, for hexadecimal numbers (base 16) `a` through `f` are used.\n\nIf the specified BigInt value is negative, the sign is preserved. This is the case even if the radix is 2; the string returned is the positive binary representation of the BigInt value preceded by a `-` sign, **not** the two's complement of the BigInt value.\n\nThe `toString()` method requires its `this` value to be a `BigInt` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to BigInt values.\n\nBecause `BigInt` doesn't have a [`[Symbol.toPrimitive]()`](../../Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `BigInt` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, BigInt _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — rather, they are directly converted using the same algorithm as the initial `toString()` implementation.\n\n```js\nBigInt.prototype.toString = () => \"Overridden\";\nconsole.log(`${1n}`); // \"1\"\nconsole.log(`${Object(1n)}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/BigInt/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt.prototype.valueOf()\n\nThe **`valueOf()`** method returns the wrapped primitive value\nof a `BigInt` object.\n\n## Syntax\n\n```js\nbigIntObj.valueOf()\n```\n\n### Return value\n\nA BigInt representing the primitive value of the specified `BigInt` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/BigInt64Array/BigInt64Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigInt64Array()\n\nThe **`BigInt64Array()`** typed array constructor creates a\nnew `BigInt64Array` object, which is, an array of 64-bit signed integers\nin the platform byte order. If control over byte order is needed, use\n[`DataView`](../DataView/DataView.mdx) instead. The contents are initialized to `0n`. Once\nestablished, you can reference elements in the array using the object's methods, or by\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew BigInt64Array()\nnew BigInt64Array(length)\nnew BigInt64Array(typedArray)\nnew BigInt64Array(object)\n\nnew BigInt64Array(buffer)\nnew BigInt64Array(buffer, byteOffset)\nnew BigInt64Array(buffer, byteOffset, length)\n```\n\n> **Note:** `BigInt64Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/BigUint64Array/BigUint64Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# BigUint64Array()\n\nThe **`BigUint64Array()`** typed array constructor creates a\nnew `BigUint64Array` object, which is, an array of 64-bit unsigned integers\nin the platform byte order. If control over byte order is needed, use\n[`DataView`](../DataView/DataView.mdx) instead. The contents are initialized to `0n`. Once\nestablished, you can reference elements in the array using the object's methods, or by\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew BigUint64Array()\nnew BigUint64Array(length)\nnew BigUint64Array(typedArray)\nnew BigUint64Array(object)\n\nnew BigUint64Array(buffer)\nnew BigUint64Array(buffer, byteOffset)\nnew BigUint64Array(buffer, byteOffset, length)\n```\n\n> **Note:** `BigUint64Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](..//TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Blob/Blob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob()\n\nThe **`Blob()`** constructor creates a `Blob` object, which represents a file-like object of immutable, raw data.\n\n## Syntax\n\n```js\nnew Blob()\nnew Blob(array)\nnew Blob(array, options)\n```\n\n> **Note:** `Blob()` can only be constructed with `new`. Attempting to call it without `new` throws a `TypeError`.\n\n### Parameters\n\n- `array` _**optional**_\n\n  - : An array of values to include in the `Blob`. These can be [`ArrayBuffer`](../../globals/ArrayBuffer/ArrayBuffer.mdx), [`Blob`](../../globals/Blob/Blob.mdx), or strings. If any of these elements is a [`Blob`](../../globals/Blob/Blob.mdx), its content (and not the object itself) is copied into the Blob being constructed.\n\n- `options` _**optional**_\n\n  - : An object containing optional attributes for the `Blob`.\n    - `type`\n      - : A string indicating the MIME type of the data. The default value is the empty string `\"\"`.\n    - `endings`\n      - : A string indicating how to handle line endings in the data. This can be either `\"transparent\"` (default) to keep line endings unchanged, or `\"native\"` to convert line endings to the platform's native line endings (e.g., `\\r\\n` on Windows).\n\n### Return value\n\nA new `Blob` object containing the specified data.\n\n## Description\n\n`Blob` objects represent data that isn't necessarily in a JavaScript-native format. The `File` interface is based on `Blob`, inheriting its functionality and expanding it to support files on the user's system.\n\nTo construct a `Blob` from other non-blob objects and data, use the `Blob()` constructor. To create a blob that contains a subset of another blob's data, use the [`slice()`](../../globals/Blob/prototype/slice.mdx) method.\n\nThe `type` property of a `Blob` object will match the MIME type specified in the constructor's `options` parameter, defaulting to an empty string if not specified.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Blob/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the `Blob` interface returns a `Promise` that resolves with an `ArrayBuffer` containing the entire contents of the `Blob` as binary data.\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with an `ArrayBuffer` containing the blob's data.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Blob/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.size\n\nThe **`size`** read-only property of the `Blob` interface returns the size of the `Blob` in bytes.\n\n## Value\n\nA number representing the size of the `Blob` in bytes.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Blob/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.slice()\n\nThe **`slice()`** method of the `Blob` interface creates and returns a new `Blob` object which contains data from a subset of the blob on which it's called.\n\n## Syntax\n\n```js\nslice()\nslice(start)\nslice(start, end)\nslice(start, end, contentType)\n```\n\n### Parameters\n\n- `start` _**optional**_\n  - : The 0-based index of the first byte to include in the new `Blob`. If negative, it refers to an index from the end of the `Blob`. The default value is 0.\n- `end` _**optional**_\n  - : The 0-based index of the first byte that will not be included in the new `Blob`. If negative, it refers to an index from the end of the `Blob`. The default value is `size`.\n- `contentType` _**optional**_\n  - : A string indicating the content type to assign to the new `Blob`. The default value is an empty string.\n\n### Return value\n\nA new `Blob` object containing the specified subset of data.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Blob/prototype/stream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.stream()\n\nThe **`stream()`** method of the `Blob` interface returns a `ReadableStream` that can be used to read the contents of the `Blob`.\n\n## Syntax\n\n```js\nstream()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `ReadableStream` that provides the data contained within the `Blob`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Blob/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.text()\n\nThe **`text()`** method of the `Blob` interface returns a `Promise` that resolves with a string containing the contents of the blob, interpreted as UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a string containing the blob's data as a text string. The data is always interpreted as UTF-8.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Blob/prototype/type.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Blob.type\n\nThe **`type`** read-only property of the `Blob` interface returns the MIME type of the `Blob`.\n\n## Value\n\nA string indicating the MIME type of the `Blob`. If the type cannot be determined, this returns an empty string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Boolean/Boolean.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Boolean()\n\nThe **`Boolean()`** constructor can create `Boolean` objects or return primitive values of type boolean.\n\n## Syntax\n\n```js\nnew Boolean(value)\nBoolean(value)\n```\n\n> **Note:** `Boolean()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\n- `value`\n  - : The initial value of the `Boolean` object.\n\n### Return value\n\nWhen `Boolean()` is called as a constructor (with `new`), it creates a `Boolean` object, which is **not** a primitive.\n\nWhen `Boolean()` is called as a function (without `new`), it coerces the parameter to a boolean primitive.\n\n> **Warning:** You should rarely find yourself using `Boolean` as a constructor.\n\n## Description\n\nThe value passed as the first parameter is [converted to a boolean value](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean#boolean_coercion). If the value is omitted or is `0`, `-0`, `0n`, [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null), `false`, [`NaN`](../NaN.mdx), [`undefined`](../undefined.mdx), or the empty string (`\"\"`), then the object has an initial value of `false`. All other values, including any object, an empty array (`[]`), or the string `\"false\"`, create an object with an initial value of `true`.\n\n> **Note:** When the non-standard property [`document.all`](https://developer.mozilla.org/docs/Web/API/Document/all) is used as an argument for this constructor, the result is a `Boolean` object with the value `false`. This property is legacy and non-standard and should not be used.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Boolean/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Boolean.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified boolean value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified boolean value.\n\n## Description\n\nThe `Boolean` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../Object/prototype/toString.mdx). For `Boolean` values, the `toString` method returns a string representation of the boolean value, which is either `\"true\"` or `\"false\"`.\n\nThe `toString()` method requires its `this` value to be a `Boolean` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to boolean values.\n\nBecause `Boolean` doesn't have a [`[Symbol.toPrimitive]()`](../../Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `Boolean` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, boolean _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — rather, they are directly converted using the same algorithm as the initial `toString()` implementation.\n\n```js\nBoolean.prototype.toString = () => \"Overridden\";\nconsole.log(`${true}`); // \"true\"\nconsole.log(`${new Boolean(true)}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Boolean/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Boolean.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a\n`Boolean` object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nThe primitive value of the given `Boolean` object.\n\n## Description\n\nThe `valueOf()` method of `Boolean` returns the primitive value\nof a `Boolean` object or literal `Boolean` as a Boolean data type.\n\nThis method is usually called internally by JavaScript and not explicitly in code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/ByteLengthQueuingStrategy/ByteLengthQueuingStrategy.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ByteLengthQueuingStrategy()\n\nThe **`ByteLengthQueuingStrategy()`**\nconstructor creates and returns a `ByteLengthQueuingStrategy` object\ninstance.\n\n## Syntax\n\n```js\nnew ByteLengthQueuingStrategy(highWaterMark)\n```\n\n### Parameters\n\nAn object with the following property:\n\n- `highWaterMark`\n\n  - : The total number of bytes that can be contained in the internal queue before backpressure is applied.\n\n    Unlike `CountQueuingStrategy()` where the `highWaterMark` parameter specifies a simple count of the number of chunks, with `ByteLengthQueuingStrategy()`, the `highWaterMark` parameter specifies a number of _bytes_ — specifically, given a stream of chunks, how many bytes worth of those chunks (rather than a count of how many of those chunks) can be contained in the internal queue before backpressure is applied.\n\n### Return value\n\nAn instance of the `ByteLengthQueuingStrategy` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/ByteLengthQueuingStrategy/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ByteLengthQueuingStrategy.size()\n\nThe **`size()`** method of the\n`ByteLengthQueuingStrategy` interface returns the given chunk's\n`byteLength` property.\n\n## Syntax\n\n```js\nsize(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : A chunk of data being passed through the stream.\n\n### Return value\n\nAn integer representing the byte length of the given chunk.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/CompressionStream/CompressionStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CompressionStream()\n\nThe **`CompressionStream()`** constructor creates a new `CompressionStream` object which compresses a stream of data.\n\n## Syntax\n\n```js\nnew CompressionStream(format)\n```\n\n### Parameters\n\n- `format`\n\n  - : One of the following allowed compression formats:\n\n    - `\"gzip\"`\n    - `\"deflate\"`\n    - `\"deflate-raw\"`\n\n## Exceptions\n\n- `TypeError`\n  - : Thrown if the format passed to the constructor is not supported.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/CompressionStream/prototype/readable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CompressionStream.readable\n\nThe **`readable`** read-only property of the `CompressionStream` interface returns a `ReadableStream`.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/CompressionStream/prototype/writable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CompressionStream.writable\n\nThe **`writable`** read-only property of the `CompressionStream` interface returns a `WritableStream`.\n\n## Value\n\nA `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/CryptoKey/CryptoKey.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# CryptoKey\n\nThe **`CryptoKey`** interface represents a cryptographic key obtained from one of the [`SubtleCrypto`](../SubtleCrypto/SubtleCrypto.mdx) method [`importKey()`](../SubtleCrypto/prototype/importKey.mdx).\n\n## Instance properties\n\n- [`type`](./prototype/type.mdx) _**readonly**_\n  - : The type of key the object represents. It may take one of the following values: `\"secret\"`, `\"private\"` or `\"public\"`.\n\n- [`extractable`](./prototype/extractable.mdx) _**readonly**_\n  - : A boolean value indicating whether or not the key may be extracted.\n\n- [`algorithm`](./prototype/algorithm.mdx) _**readonly**_\n  - : An object describing the algorithm for which this key can be used and any associated extra parameters.\n\n- [`usages`](./prototype/usages.mdx) _**readonly**_\n  - : An `Array` of strings, indicating what can be done with the key. Possible values for array elements are `\"encrypt\"`, `\"decrypt\"`, `\"sign\"`, `\"verify\"`, `\"deriveKey\"`, `\"deriveBits\"`, `\"wrapKey\"`, and `\"unwrapKey\"`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/CryptoKey/prototype/algorithm.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# algorithm\n\nThe read-only **`algorithm`** property of the [`CryptoKey`](../CryptoKey.mdx) interface returns an object describing the algorithm for which this key can be used, and any associated extra parameters.\n\nThe object returned depends of the algorithm used to generate the key.\n\n## Value\n\nAn object matching:\n\n- [`RsaHashedImportParams`](../../RsaHashedImportParams/RsaHashedImportParams.mdx) if the algorithm is any of the RSA variants.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/CryptoKey/prototype/extractable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# extractable\n\nThe read-only **`extractable`** property indicates whether or not the key may be extracted.\n\nIf the key cannot be exported, an exception will be thrown if an attempt to extract the key is made.\n\n## Value\n\nA boolean value that is `true` if the key can be exported and `false` if not.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/CryptoKey/prototype/type.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# type\n\nThe read-only **`type`** property indicates which kind of key is represented by the object. It can have the following values:\n\n- `\"secret\"`: This key is a secret key for use with a symmetric algorithm.\n- `\"private\"`: This key is the private half of an asymmetric algorithm's key pair.\n- `\"public\"`: This key is the public half of an asymmetric algorithm's key pair.\n\n## Value\n\nOne of the following strings: `\"secret\"`, `\"private\"`, or `\"public\"`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/CryptoKey/prototype/usages.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# usages\n\nThe read-only **`usages`** property indicates what can be done with the key.\n\n## Value\n\nAn `Array` of strings from the following list:\n\n- `\"encrypt\"`: The key may be used to encrypt messages.\n- `\"decrypt\"`: The key may be used to decrypt messages.\n- `\"sign\"`: The key may be used to sign messages.\n- `\"verify\"`: The key may be used to verify signatures.\n- `\"deriveKey\"`: The key may be used in deriving a new key.\n- `\"deriveBits\"`: The key may be used in deriving bits.\n- `\"wrapKey\"`: The key may be used to wrap a key.\n- `\"unwrapKey\"`: The key may be used to unwrap a key.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/DOMException/DOMException.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException()\n\nThe **`DOMException()`** constructor returns a `DOMException` object with a specified message and name.\n\n## Syntax\n\n```js\nnew DOMException()\nnew DOMException(message)\nnew DOMException(message, name)\n```\n\n### Parameters\n\n- `message` _optional_\n  - : A description of the exception. If not present, the empty string `''` is\n    used.\n- `name` _optional_\n  - : A string. If the specified name is a [standard error name](#error-names), then getting the [`code`](./code.mdx) property of the `DOMException` object will return the code number corresponding to the specified name.\n\n### Return value\n\nA newly created `DOMException` object.\n\n## Error names\n\nCommon error names are listed here. Some APIs define their own sets of names, so this is not necessarily a complete list.\n\nNote that the following deprecated historical errors don't have an error name but instead have only a legacy constant code value and a legacy constant name:\n\n- Legacy code value: `2`, legacy constant name: `DOMSTRING_SIZE_ERR`\n- Legacy code value: `6`, legacy constant name: `NO_DATA_ALLOWED_ERR`\n- Legacy code value: `16`, legacy constant name: `VALIDATION_ERR`\n\n> **Note:** Because historically the errors were identified by a numeric value that corresponded with a named variable defined to have that value, some of the entries below indicate the legacy code value and constant name that were used in the past.\n\n- `IndexSizeError`\n  - : The index is not in the allowed range. (Legacy code value: `1` and legacy constant name: `INDEX_SIZE_ERR`)\n- `HierarchyRequestError`\n  - : The node tree hierarchy is not correct. (Legacy code value: `3` and legacy constant name: `HIERARCHY_REQUEST_ERR`)\n- `WrongDocumentError`\n  - : The object is in the wrong `Document`. (Legacy code value: `4` and legacy constant name: `WRONG_DOCUMENT_ERR`)\n- `InvalidCharacterError`\n  - : The string contains invalid characters. (Legacy code value: `5` and legacy constant name: `INVALID_CHARACTER_ERR`)\n- `NoModificationAllowedError`\n  - : The object cannot be modified. (Legacy code value: `7` and legacy constant name: `NO_MODIFICATION_ALLOWED_ERR`)\n- `NotFoundError`\n  - : The object cannot be found here. (Legacy code value: `8` and legacy constant name: `NOT_FOUND_ERR`)\n- `NotSupportedError`\n  - : The operation is not supported. (Legacy code value: `9` and legacy constant name: `NOT_SUPPORTED_ERR`)\n- `InvalidStateError`\n  - : The object is in an invalid state. (Legacy code value: `11` and legacy constant name: `INVALID_STATE_ERR`)\n- `InUseAttributeError`\n  - : The attribute is in use. (Legacy code value: `10` and legacy constant name: `INUSE_ATTRIBUTE_ERR`)\n- `SyntaxError`\n  - : The string did not match the expected pattern. (Legacy code value: `12` and legacy constant name: `SYNTAX_ERR`)\n- `InvalidModificationError`\n  - : The object cannot be modified in this way. (Legacy code value: `13` and legacy constant name: `INVALID_MODIFICATION_ERR`)\n- `NamespaceError`\n  - : The operation is not allowed by Namespaces in XML. (Legacy code value: `14` and legacy constant name: `NAMESPACE_ERR`)\n- `InvalidAccessError`\n  - : The object does not support the operation or argument. (Legacy code value: `15` and legacy constant name: `INVALID_ACCESS_ERR`)\n- `TypeMismatchError` *deprecated*\n  - : The type of the object does not match the expected type. (Legacy code value: `17` and legacy constant name: `TYPE_MISMATCH_ERR`) This value is deprecated; the JavaScript `TypeError` exception is now raised instead of a `DOMException` with this value.\n- `SecurityError`\n  - : The operation is insecure. (Legacy code value: `18` and legacy constant name: `SECURITY_ERR`)\n- `NetworkError`\n  - : A network error occurred. (Legacy code value: `19` and legacy constant name: `NETWORK_ERR`)\n- `AbortError`\n  - : The operation was aborted. (Legacy code value: `20` and legacy constant name: `ABORT_ERR`)\n- `URLMismatchError`\n  - : The given URL does not match another URL. (Legacy code value: `21` and legacy constant name: `URL_MISMATCH_ERR`)\n- `QuotaExceededError`\n  - : The quota has been exceeded. (Legacy code value: `22` and legacy constant name: `QUOTA_EXCEEDED_ERR`)\n- `TimeoutError`\n  - : The operation timed out. (Legacy code value: `23` and legacy constant name: `TIMEOUT_ERR`)\n- `InvalidNodeTypeError`\n  - : The node is incorrect or has an incorrect ancestor for this operation. (Legacy code value: `24` and legacy constant name: `INVALID_NODE_TYPE_ERR`)\n- `DataCloneError`\n  - : The object can not be cloned. (Legacy code value: `25` and legacy constant name: `DATA_CLONE_ERR`)\n- `EncodingError`\n  - : The encoding or decoding operation failed (No legacy code value and constant name).\n- `NotReadableError`\n  - : The input/output read operation failed (No legacy code value and constant name).\n- `UnknownError`\n  - : The operation failed for an unknown transient reason (e.g. out of memory) (No legacy code value and constant name).\n- `ConstraintError`\n  - : A mutation operation in a transaction failed because a constraint was not satisfied (No legacy code value and constant name).\n- `DataError`\n  - : Provided data is inadequate (No legacy code value and constant name).\n- `TransactionInactiveError`\n  - : A request was placed against a transaction that is currently not active or is finished (No legacy code value and constant name).\n- `ReadOnlyError`\n  - : The mutating operation was attempted in a \"readonly\" transaction (No legacy code value and constant name).\n- `VersionError`\n  - : An attempt was made to open a database using a lower version than the existing version (No legacy code value and constant name).\n- `OperationError`\n  - : The operation failed for an operation-specific reason (No legacy code value and constant name).\n- `NotAllowedError`\n  - : The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission (No legacy code value and constant name)."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/DOMException/code.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException.prototype.code\n\nThe **`code`** read-only property of the `DOMException` interface returns one of the legacy [error code constants](./DOMException.mdx#error-names), or `0` if none match.\n\nThis field is used for historical reasons. New DOM exceptions don't use this anymore: they put this info in the [`name`](./name.mdx) attribute.\n\n## Value\n\nOne of the [error code constants](./DOMException.mdx#error-names), or `0` if none match.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/DOMException/message.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException.prototype.message\n\nThe **`message`** read-only property of the `DOMException` interface returns a string representing a message or description associated with the given [error name](./DOMException.mdx#error-names).\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/DOMException/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# DOMException.prototype.name\n\nThe **`name`** read-only property of the `DOMException` interface returns a string that contains one of the strings associated with an [error name](./DOMException.mdx#error-names).\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/DataView/DataView.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView()\n\nThe **`DataView()`** constructor is used to create `DataView` objects.\n\n## Syntax\n\n```js\nnew DataView(buffer)\nnew DataView(buffer, byteOffset)\nnew DataView(buffer, byteOffset, byteLength)\n```\n\n> **Note:** `DataView()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `buffer`\n  - : An existing `ArrayBuffer` to use as\n    the storage backing the new `DataView` object.\n- `byteOffset` _**optional**_\n  - : The offset, in bytes, to the first byte in the above buffer for the new view to\n    reference. If unspecified, the buffer view starts with the first byte.\n- `byteLength` _**optional**_\n  - : The number of elements in the byte array. If unspecified, the view's length will\n    match the buffer's length.\n\n### Return value\n\nA new `DataView` object representing the specified data buffer.\n\n### Exceptions\n\n- [`RangeError`](../RangeError/RangeError.mdx)\n\n  - : Thrown if the `byteOffset` or `byteLength` parameter values\n    result in the view extending past the end of the buffer.\n\n    For example, if the buffer is 16 bytes long, the `byteOffset` is 8, and\n    the `byteLength` is 10, this error is thrown because the resulting view\n    tries to extend 2 bytes past the total length of the buffer.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/DataView/prototype/buffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.buffer\n\nThe **`buffer`** accessor property represents the `ArrayBuffer` referenced by the `DataView` at construction time.\n\n## Description\n\nThe `buffer` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when the `DataView` is constructed and cannot be changed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/DataView/prototype/byteLength.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.byteLength\n\nThe **`byteLength`** accessor property represents the length (in bytes) of the dataview.\n\n## Description\n\nThe `byteLength` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when an `DataView` is constructed and cannot be changed. If the `DataView` is not specifying an offset or a `byteLength`, the `byteLength` of the referenced `ArrayBuffer` or `SharedArrayBuffer` will be returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/DataView/prototype/byteOffset.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.byteOffset\n\nThe **`byteOffset`** accessor property represents the offset (in bytes) of this view from the start of its `ArrayBuffer`.\n\n## Description\n\nThe `byteOffset` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when an `DataView` is constructed and cannot be changed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/DataView/prototype/getBigInt64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getBigInt64()\n\nThe **`getBigInt64()`** method gets a signed 64-bit integer\n(long long) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetBigInt64(byteOffset)\ngetBigInt64(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to read the data from.\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is read.\n\n### Return value\n\nA `BigInt`.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would read beyond the end\n    of the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/DataView/prototype/getBigUint64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getBigUint64()\n\nThe **`getBigUint64()`** method gets an unsigned 64-bit integer\n(unsigned long long) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetBigUint64(byteOffset)\ngetBigUint64(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to read the data from.\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is read.\n\n### Return value\n\nA `BigInt`.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would read beyond the end\n    of the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/DataView/prototype/getFloat32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getFloat32()\n\nThe **`getFloat32()`** method gets a signed 32-bit float\n(float) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetFloat32(byteOffset)\ngetFloat32(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 32-bit float number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/DataView/prototype/getFloat64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getFloat64()\n\nThe **`getFloat64()`** method gets a signed 64-bit float\n(double) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetFloat64(byteOffset)\ngetFloat64(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 64-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 64-bit float number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/DataView/prototype/getInt16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getInt16()\n\nThe **`getInt16()`** method gets a signed 16-bit integer\n(short) at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetInt16(byteOffset)\ngetInt16(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 16-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/DataView/prototype/getInt32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getInt32()\n\nThe **`getInt32()`** method gets a signed 32-bit integer (long)\nat the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetInt32(byteOffset)\ngetInt32(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in bytes, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nA signed 32-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/DataView/prototype/getInt8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getInt8()\n\nThe **`getInt8()`** method gets a signed 8-bit integer (byte)\nat the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetInt8(byteOffset)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n\n### Return value\n\nA signed 8-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/DataView/prototype/getUint16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getUint16()\n\nThe **`getUint16()`** method gets an unsigned 16-bit integer\n(unsigned short) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n\n\n## Syntax\n\n```js\ngetUint16(byteOffset)\ngetUint16(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nAn unsigned 16-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/DataView/prototype/getUint32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getUint32()\n\nThe **`getUint32()`** method gets an unsigned 32-bit integer\n(unsigned long) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n\n\n## Syntax\n\n```js\ngetUint32(byteOffset)\ngetUint32(byteOffset, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is read.\n\n### Return value\n\nAn unsigned 32-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/DataView/prototype/getUint8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.getUint8()\n\nThe **`getUint8()`** method gets an unsigned 8-bit integer\n(unsigned byte) at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\ngetUint8(byteOffset)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to read the data.\n\n### Return value\n\nAn unsigned 8-bit integer number.\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would read beyond the end of\n    the view.\n\n## Description\n\nThere is no alignment constraint; multi-byte values may be fetched from any offset.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/DataView/prototype/setBigInt64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setBigInt64()\n\nThe **`setBigInt64()`** method stores a signed 64-bit integer\n(long long) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetBigInt64(byteOffset, value)\nsetBigInt64(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to store the data from.\n- value\n  - : The value to set as a `BigInt`. The highest possible value that fits in\n    a signed 64-bit integer is\n    `2n ** (64n -1n) - 1n` (`9223372036854775807n`). Upon\n    overflow, it will be negative (`-9223372036854775808n`).\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/DataView/prototype/setBigUint64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setBigUint64()\n\nThe **`setBigUint64()`** method stores an unsigned 64-bit\ninteger (unsigned long long) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetBigUint64(byteOffset, value)\nsetBigUint64(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- byteOffset\n  - : The offset, in bytes, from the start of the view to store the data from.\n- value\n  - : The value to set as a `BigInt`. The highest possible value that fits in\n    an unsigned 64-bit integer is\n    `2n ** 64n - 1n`\n    (`18446744073709551615n`). Upon overflow, it will be zero\n    (`0n`).\n- littleEndian\n  - : _**optional**_ Indicates whether the 64-bit int is stored in [little- or big-endian](https://developer.mozilla.org/docs/Glossary/Endianness) format. If\n    `false` or `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such that it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/DataView/prototype/setFloat32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setFloat32()\n\nThe **`setFloat32()`** method stores a signed 32-bit float\n(float) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetFloat32(byteOffset, value)\nsetFloat32(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/DataView/prototype/setFloat64.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setFloat64()\n\nThe **`setFloat64()`** method stores a signed 64-bit float\n(double) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetFloat64(byteOffset, value)\nsetFloat64(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 64-bit float is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/DataView/prototype/setInt16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setInt16()\n\nThe **`setInt16()`** method stores a signed 16-bit integer\n(short) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetInt16(byteOffset, value)\nsetInt16(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/DataView/prototype/setInt32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setInt32()\n\nThe **`setInt32()`** method stores a signed 32-bit integer\n(long) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetInt32(byteOffset, value)\nsetInt32(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/DataView/prototype/setInt8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setInt8()\n\nThe **`setInt8()`** method stores a signed 8-bit integer (byte)\nvalue at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetInt8(byteOffset, value)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/DataView/prototype/setUint16.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setUint16()\n\nThe **`setUint16()`** method stores an unsigned 16-bit integer\n(unsigned short) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetUint16(byteOffset, value)\nsetUint16(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 16-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/DataView/prototype/setUint32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setUint32()\n\nThe **`setUint32()`** method stores an unsigned 32-bit integer\n(unsigned long) value at the specified byte offset from the start of the\n[`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetUint32(byteOffset, value)\nsetUint32(byteOffset, value, littleEndian)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n- `littleEndian`\n  - : _**optional**_ Indicates whether the 32-bit int is stored in\n    little- or big-endian format. If `false` or\n    `undefined`, a big-endian value is written.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/DataView/prototype/setUint8.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DataView.prototype.setUint8()\n\nThe **`setUint8()`** method stores an unsigned 8-bit integer\n(byte) value at the specified byte offset from the start of the [`DataView`](../../../globals/DataView/DataView.mdx).\n\n## Syntax\n\n```js\nsetUint8(byteOffset, value)\n```\n\n### Parameters\n\n- `byteOffset`\n  - : The offset, in byte, from the start of the view where to store the data.\n- `value`\n  - : The value to set.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n### Errors thrown\n\n- [`RangeError`](../../RangeError/RangeError.mdx)\n  - : Thrown if the `byteOffset` is set such as it would store beyond the end\n    of the view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/Date.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date()\n\nThe **`Date()`** constructor can create a `Date` instance or return a string representing the current time.\n\n## Syntax\n\n```js\nnew Date()\nnew Date(value)\nnew Date(dateString)\nnew Date(dateObject)\n\nnew Date(year, monthIndex)\nnew Date(year, monthIndex, day)\nnew Date(year, monthIndex, day, hours)\nnew Date(year, monthIndex, day, hours, minutes)\nnew Date(year, monthIndex, day, hours, minutes, seconds)\nnew Date(year, monthIndex, day, hours, minutes, seconds, milliseconds)\n\nDate()\n```\n\n> **Note:** `Date()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\nThere are five basic forms for the `Date()` constructor:\n\n#### No parameters\n\nWhen no parameters are provided, the newly-created `Date` object represents the current date and time as of the time of instantiation.\n\n#### Time value or timestamp number\n\n- `value`\n  - : An integer value representing the number of milliseconds since January 1, 1970, 00:00:00 UTC (the ECMAScript epoch, equivalent to the UNIX epoch), with leap seconds ignored. Keep in mind that most [UNIX Timestamp](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_16) functions are only accurate to the nearest second.\n\n#### Date string\n\n- `dateString`\n\n  - : A string value representing a date, in a format recognized by the [`Date.parse()`](./parse.mdx) method. (The ECMA262 spec specifies a [simplified version of ISO 8601](https://tc39.es/ecma262/#sec-date-time-string-format), but other formats can be implementation-defined, which commonly include [IETF-compliant RFC 2822 timestamps](https://datatracker.ietf.org/doc/html/rfc2822#page-14).)\n\n    > **Note:** When parsing date strings with the `Date` constructor (and `Date.parse`, they are equivalent), always make sure that the input conforms to the ISO 8601 format (`YYYY-MM-DDTHH:mm:ss.sssZ`) — the parsing behavior with other formats is implementation-defined and may not work across all browsers. Support for [RFC 2822](https://datatracker.ietf.org/doc/html/rfc2822) format strings is by convention only. A library can help if many different formats are to be accommodated.\n    >\n    > Date-only strings (e.g. `\"1970-01-01\"`) are treated as UTC, while date-time strings (e.g. `\"1970-01-01T12:00\"`) are treated as local. You are therefore also advised to make sure the input format is consistent between the two types.\n\n#### Date object\n\n- `dateObject`\n  - : An existing `Date` object. This effectively makes a copy of the existing `Date` object with the same date and time. This is equivalent to `new Date(dateObject.valueOf())`, except the `valueOf()` method is not called.\n\nWhen one parameter is passed to the `Date()` constructor, `Date` instances are specially treated. All other values are [converted to primitives](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion). If the result is a string, it will be parsed as a date string. Otherwise, the resulting primitive is further coerced to a number and treated as a timestamp.\n\n#### Individual date and time component values\n\nGiven at least a year and month, this form of `Date()` returns a `Date` object whose component values (year, month, day, hour, minute, second, and millisecond) all come from the following parameters. Any missing fields are given the lowest possible value (`1` for `day` and `0` for every other component). The parameter values are all evaluated against the local time zone, rather than UTC.\n\nIf any parameter overflows its defined bounds, it \"carries over\". For example, if a `monthIndex` greater than `11` is passed in, those months will cause the year to increment; if a `minutes` greater than `59` is passed in, `hours` will increment accordingly, etc. Therefore, `new Date(1990, 12, 1)` will return January 1st, 1991; `new Date(2020, 5, 19, 25, 65)` will return 2:05 A.M. June 20th, 2020.\n\nSimilarly, if any parameter underflows, it \"borrows\" from the higher positions. For example, `new Date(2020, 5, 0)` will return May 31st, 2020.\n\n- `year`\n  - : Integer value representing the year. Values from `0` to `99` map to the years `1900` to `1999`. All other values are the actual year. See the [example](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years).\n- `monthIndex`\n  - : Integer value representing the month, beginning with `0` for January to `11` for December.\n- `day` _**optional**_\n  - : Integer value representing the day of the month. The default is `1`.\n- `hours` _**optional**_\n  - : Integer value between `0` and `23` representing the hour of the day. Defaults to `0`.\n- `minutes` _**optional**_\n  - : Integer value representing the minute segment of a time. The default is `0` minutes past the hour.\n- `seconds` _**optional**_\n  - : Integer value representing the second segment of a time. The default is `0` seconds past the minute.\n- `milliseconds` _**optional**_\n  - : Integer value representing the millisecond segment of a time. The default is `0` milliseconds past the second.\n\n### Return value\n\nCalling `new Date()` (the `Date()` constructor) returns a [`Date`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date) object. If called with an invalid date string, or if the date to be constructed will have a UNIX timestamp less than `-8,640,000,000,000,000` or greater than `8,640,000,000,000,000` milliseconds, it returns a `Date` object whose [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toString) method returns the literal string `Invalid Date`.\n\nCalling the `Date()` function (without the `new` keyword) returns a string representation of the current date and time, exactly as `new Date().toString()` does. Any arguments given in a `Date()` function call (without the `new` keyword) are ignored; regardless of whether it's called with an invalid date string — or even called with any arbitrary object or other primitive as an argument — it always returns a string representation of the current date and time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/UTC.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.UTC()\n\nThe **`Date.UTC()`** method accepts parameters similar to the\n`Date` constructor, but treats them as UTC. It returns the number of\nmilliseconds since January 1, 1970, 00:00:00 UTC.\n\n\n\n## Syntax\n\n```js\nDate.UTC(year)\nDate.UTC(year, monthIndex)\nDate.UTC(year, monthIndex, day)\nDate.UTC(year, monthIndex, day, hour)\nDate.UTC(year, monthIndex, day, hour, minute)\nDate.UTC(year, monthIndex, day, hour, minute, second)\nDate.UTC(year, monthIndex, day, hour, minute, second, millisecond)\n```\n\n- `year`\n\n  - : Integer value representing the year.\n\n    Values from `0` to `99` map to the years\n    `1900` to `1999`. All other values are the actual year.\n    See the [example](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#interpretation_of_two-digit_years).\n\n- `monthIndex` _**optional**_\n  - : An integer between `0` (January) and `11` (December)\n    representing the month. Since ECMAScript 2017 it defaults to `0` if\n    omitted. _(Up until ECMAScript 2016, `monthIndex` was a required\n    parameter. As of ES2017, it no longer is.)_\n- `day` _**optional**_\n  - : An integer between `1` and `31` representing the day of the\n    month. If omitted, defaults to `1`.\n- `hour` _**optional**_\n  - : An integer between `0` and `23` representing the hours. If\n    omitted, defaults to `0`.\n- `minute` _**optional**_\n  - : An integer between `0` and `59` representing the minutes. If\n    omitted, defaults to `0`.\n- `second` _**optional**_\n  - : An integer between `0` and `59` representing the seconds. If\n    omitted, defaults to `0`.\n- `millisecond` _**optional**_\n  - : An integer between `0` and `999` representing the\n    milliseconds. If omitted, defaults to `0`.\n\n### Return value\n\nA number representing the number of milliseconds for the given date since January 1,\n1970, 00:00:00, UTC.\n\n## Description\n\n`UTC()` takes comma-delimited date and time parameters and returns the\nnumber of milliseconds between January 1, 1970, 00:00:00, universal time and the\nspecified date and time.\n\nYears between `0` and `99` are converted to a year in the\n20th century `(1900 + year)`. For example, `95` is\nconverted to the year `1995`.\n\nThe `UTC()` method differs from the `Date` constructor in two\nways:\n\n1. `Date.UTC()` uses universal time instead of the local time.\n2. `Date.UTC()` returns a time value as a number instead of creating a\n   `Date` object.\n\nIf a parameter is outside of the expected range, the `UTC()` method updates\nthe other parameters to accommodate the value. For example, if `15` is used\nfor `monthIndex`, the year will be incremented by 1\n`(year + 1)` and `3` will be used for the month.\n\n`UTC()` is a static method of `Date`, so it's called as\n`Date.UTC()` rather than as a method of a `Date` instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/now.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.now()\n\nThe static **`Date.now()`** method returns the number of milliseconds elapsed since the [epoch](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps), which is defined as the midnight at the beginning of January 1, 1970, UTC.\n\n## Syntax\n\n```js\nDate.now()\n```\n\n### Return value\n\nA number representing the number of milliseconds elapsed since the [epoch](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps), which is defined as the midnight at the beginning of January 1, 1970, UTC.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/parse.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.parse()\n\nThe **`Date.parse()`** method parses a string representation of\na date, and returns the number of milliseconds since January 1, 1970, 00:00:00 UTC or\n`NaN` if the string is unrecognized or, in some cases, contains illegal date\nvalues (e.g. 2015-02-31).\n\nOnly the [ISO 8601 format](https://tc39.es/ecma262/#sec-date-time-string-format) (`YYYY-MM-DDTHH:mm:ss.sssZ`) is explicitly specified to be supported. Other formats are implementation-defined and may not work across all browsers. A library can help if many different formats are to be accommodated.\n\n## Syntax\n\n```js\nDate.parse(dateString)\n```\n\n### Parameters\n\n- `dateString`\n  - : A string representing [a simplification of the ISO 8601 calendar date extended format](#date-time-string-format).\n    (Other formats may be used, but results are implementation-dependent.)\n\n### Return value\n\nA number representing the milliseconds elapsed since January 1, 1970, 00:00:00 UTC and\nthe date obtained by parsing the given string representation of a date. If the argument\ndoesn't represent a valid date, [`NaN`](../NaN.mdx) is returned.\n\n## Description\n\nThe `parse()` method takes a date string (such as\n`\"2011-10-10T14:48:00\"`) and returns the number of milliseconds since January\n1, 1970, 00:00:00 UTC.\n\nThis function is useful for setting date values based on string values, for example in\nconjunction with the [`setTime()`](./prototype/setTime.mdx) method and the\n`Date` object.\n\n### Date Time String Format\n\nThe standard string representation of a date time string is a simplification of the ISO\n8601 calendar date extended format.\n(See the section [Date Time String Format](https://tc39.es/ecma262/#sec-date-time-string-format)\nin the ECMAScript specification for more details.)\n\nFor example, `\"2011-10-10\"` (_date-only_ form),\n`\"2011-10-10T14:48:00\"` (_date-time_ form), or\n`\"2011-10-10T14:48:00.000+09:00\"` (_date-time_ form with milliseconds\nand time zone) can be passed and will be parsed. When the time zone offset is absent,\ndate-only forms are interpreted as a UTC time and date-time forms are interpreted as\nlocal time.\n\nWhile time zone specifiers are used during date string parsing to interpret the\nargument, the value returned is always the number of milliseconds between January 1,\n1970 00:00:00 UTC and the point in time represented by the argument or `NaN`.\n\nBecause `parse()` is a static method of `Date`, it is called as\n`Date.parse()` rather than as a method of a `Date` instance.\n\n### Fall-back to implementation-specific date formats\n\n> **Note:** This section contains implementation-specific behavior that can be inconsistent\n> across implementations.\n\nThe ECMAScript specification states: If the String does not conform to the standard\nformat the function may fall back to any implementation–specific heuristics or\nimplementation–specific parsing algorithm. Unrecognizable strings or dates containing\nillegal element values in ISO formatted strings shall cause `Date.parse()` to\nreturn [`NaN`](../NaN.mdx).\n\nHowever, invalid values in date strings not recognized as simplified ISO format as\ndefined by ECMA-262 may or may not result in [`NaN`](../NaN.mdx), depending on the browser\nand values provided, e.g.:\n\n```js\n// Non-ISO string with invalid date values\nnew Date(\"23/25/2014\");\n```\n\nwill be treated as a local date of 25 November, 2015 in Firefox 30 and an invalid date\nin Safari 7.\n\nHowever, if the string is recognized as an ISO format string and it contains invalid\nvalues, it will return [`NaN`](../NaN.mdx):\n\n```js\n// ISO string with invalid values\nnew Date(\"2014-25-23\").toISOString();\n// throws \"RangeError: invalid date\"\n```\n\nSpiderMonkey's implementation-specific heuristic can be found in [`jsdate.cpp`](https://searchfox.org/mozilla-central/source/js/src/jsdate.cpp?rev=64553c483cd1#889).\nThe string `\"10 06 2014\"` is an example of a non-conforming ISO format and\nthus falls back to a custom routine. See also this [rough outline](https://bugzilla.mozilla.org/show_bug.cgi?id=1023155#c6) on\nhow the parsing works.\n\n```js\nnew Date(\"10 06 2014\");\n```\n\nwill be treated as a local date of 6 October, 2014, and not 10 June, 2014.\n\nOther examples:\n\n```js\nnew Date(\"foo-bar 2014\").toString();\n// returns: \"Invalid Date\"\n\nDate.parse(\"foo-bar 2014\");\n// returns: NaN\n```\n\n### Differences in assumed time zone\n\n> **Note:** This section contains implementation-specific behavior that can be inconsistent\n> across implementations.\n\nGiven a non-standard date string of `\"March 7, 2014\"`, `parse()` assumes a local time zone, but given a simplification of the ISO 8601 calendar date extended format such as `\"2014-03-07\"`, it will assume a time zone of UTC. Therefore `Date` objects produced using those strings may represent different moments in time depending on the version of ECMAScript supported unless the system is set with a local time zone of UTC. This means that two date strings that appear equivalent may result in two different values depending on the format of the string that is being converted.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/@@toPrimitive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype\\[Symbol.toPrimitive]\n\nThe **`[Symbol.toPrimitive]()`** method converts a `Date`\nobject to a primitive value.\n\n## Syntax\n\n```js\nDate()[Symbol.toPrimitive](hint)\n```\n\n### Return value\n\nThe primitive value of the given `Date` object. Depending on the argument,\nthe method can return either a string or a number.\n\n## Description\n\nThe `[Symbol.toPrimitive]()` method of the `Date` object returns a\nprimitive value, that is either of type number or of type string.\n\nIf `hint` is `string` or `default`,\n`[Symbol.toPrimitive]()` tries to call the [`toString`](../../Object/prototype/toString.mdx) method. If the `toString` property does not exist, it tries to\ncall the [`valueOf`](../../Object/prototype/valueOf.mdx) method and if the\n`valueOf` does not exist either, `[Symbol.toPrimitive]()` throws a\n[`TypeError`](../../../globals/TypeError/TypeError.mdx).\n\nIf `hint` is `number`, `[Symbol.toPrimitive]()` first tries\nto call `valueOf`, and if that fails, it calls `toString`.\n\nJavaScript calls the `[Symbol.toPrimitive]()` method to convert an object to a\nprimitive value. You rarely need to invoke the `[Symbol.toPrimitive]()` method\nyourself; JavaScript automatically invokes it when encountering an object where a\nprimitive value is expected.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/getDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getDate()\n\nThe **`getDate()`** method returns the day of the month for the\nspecified date according to local time.\n\n## Syntax\n\n```js\ngetDate()\n```\n\n### Return value\n\nAn integer number, between 1 and 31, representing the day of the month for the given\ndate according to local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/getDay.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getDay()\n\nThe **`getDay()`** method returns the\nday of the week for the specified date according to local time, where 0 represents\nSunday. For the day of the month, see [`Date.prototype.getDate()`](./getDate.mdx).\n\n## Syntax\n\n```js\ngetDay()\n```\n\n### Return value\n\nAn integer number, between 0 and 6, corresponding to the day of the week for the given\ndate, according to local time: 0 for Sunday, 1 for Monday, 2 for Tuesday, and so on.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/getFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getFullYear()\n\nThe **`getFullYear()`** method returns the year of the\nspecified date according to local time.\n\nUse this method instead of the [`Date.prototype.getYear()`](./getYear.mdx) method.\n\n## Syntax\n\n```js\ngetFullYear()\n```\n\n### Return value\n\nA number corresponding to the year of the given date, according to local time.\n\n## Description\n\nThe value returned by `getFullYear()` is an absolute number. For dates\nbetween the years 1000 and 9999, `getFullYear()` returns a four-digit number,\nfor example, 1995. Use this function to make sure a year is compliant with years after\n2000\\.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/getHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getHours()\n\nThe **`getHours()`** method returns the hour for the specified\ndate, according to local time.\n\n## Syntax\n\n```js\ngetHours()\n```\n\n### Return value\n\nAn integer number, between 0 and 23, representing the hour for the given date according\nto local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/getMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getMilliseconds()\n\nThe **`getMilliseconds()`** method returns the milliseconds in\nthe specified date according to local time.\n\n## Syntax\n\n```js\ngetMilliseconds()\n```\n\n### Return value\n\nA number, between 0 and 999, representing the milliseconds for the given date according\nto local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/getMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getMinutes()\n\nThe **`getMinutes()`** method returns the minutes in the\nspecified date according to local time.\n\n## Syntax\n\n```js\ngetMinutes()\n```\n\n### Return value\n\nAn integer number, between 0 and 59, representing the minutes in the given date\naccording to local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/getMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getMonth()\n\nThe **`getMonth()`** method returns the month in the specified\ndate according to local time, as a zero-based value (where zero indicates the first\nmonth of the year).\n\n## Syntax\n\n```js\ngetMonth()\n```\n\n### Return value\n\nAn integer number, between 0 and 11, representing the month in the given date according\nto local time. 0 corresponds to January, 1 to February, and so on.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/getSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getSeconds()\n\nThe **`getSeconds()`** method returns the seconds in the\nspecified date according to local time.\n\n## Syntax\n\n```js\ngetSeconds()\n```\n\n### Return value\n\nAn integer number, between 0 and 59, representing the seconds in the given date\naccording to local time.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/getTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getTime()\n\nThe **`getTime()`** method returns the number of milliseconds since the [epoch](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps), which is defined as the midnight at the beginning of January 1, 1970, UTC.\n\nYou can use this method to help assign a date and time to another `Date`\nobject. This method is functionally equivalent to the [`Date.prototype.valueOf()`](./valueOf.mdx) method.\n\n## Syntax\n\n```js\ngetTime()\n```\n\n### Return value\n\nA number representing the milliseconds elapsed between 1 January 1970 00:00:00 UTC and\nthe given date.\n\n## Description\n\nTo offer protection against timing attacks and fingerprinting, the precision of\n`new Date().getTime()` might get rounded depending on browser settings.\n\n```js\n// reduced time precision (2ms) in Firefox 60\nnew Date().getTime();\n// 1519211809934\n// 1519211810362\n// 1519211811670\n// …\n\n// reduced time precision with `privacy.resistFingerprinting` enabled\nnew Date().getTime();\n// 1519129853500\n// 1519129858900\n// 1519129864400\n// …\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/getTimezoneOffset.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getTimezoneOffset()\n\nThe **`getTimezoneOffset()`** method returns the difference, in minutes, between a date as evaluated in the UTC time zone, and the same date as evaluated in the local time zone.\n\n## Syntax\n\n```js\ngetTimezoneOffset()\n```\n\n### Return value\n\nThe difference, in minutes, between the date as evaluated in the UTC time zone and as evaluated in the local time zone. The actual local time algorithm is implementation-defined, and the return value is allowed to be zero in runtimes without appropriate data.\n\n## Description\n\n`date.getTimezoneOffset()` returns the difference, in minutes, between `date` as evaluated in the UTC time zone and as evaluated in the local time zone — that is, the time zone of the host system in which the browser is being used (if the code is run from the Web in a browser), or otherwise the host system of whatever JavaScript runtime (for example, a Node.js environment) the code is executed in.\n\n### Negative values and positive values\n\nThe number of minutes returned by `getTimezoneOffset()` is positive if the local time zone is behind UTC, and negative if the local time zone is ahead of UTC. For example, for UTC+10, `-600` will be returned.\n\n| Current time zone | Return value |\n| ----------------- | ------------ |\n| UTC-8             | 480          |\n| UTC               | 0            |\n| UTC+3             | -180         |\n\n### Varied results in Daylight Saving Time (DST) regions\n\nIn a region that annually shifts in and out of Daylight Saving Time (DST), as `date` varies, the number of minutes returned by calling `getTimezoneOffset()` can be non-uniform.\n\n> **Note:** `getTimezoneOffset()`'s behavior will never differ based on the time when the code is run — its behavior is always consistent when running in the same region. Only the value of `date` affects the result.\n\nIn most implementations, the [IANA time zone database](https://en.wikipedia.org/wiki/Daylight_saving_time#IANA_time_zone_database) (tzdata) is used to precisely determine the offset of the local timezone at the moment of the `date`. However, if such information is unavailable, an implementation may return zero.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/getUTCDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCDate()\n\nThe **`getUTCDate()`** method returns the day of the month (from\n1 to 31) in the specified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCDate()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer number ranging from 1 to 31\nrepresenting day of month for the given date, according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/getUTCDay.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCDay()\n\nThe **`getUTCDay()`** method returns the day of the week in the\nspecified date according to universal time, where 0 represents Sunday.\n\n## Syntax\n\n```js\ngetUTCDay()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer number corresponding to the day\nof the week for the given date, according to universal time: 0 for Sunday, 1 for Monday,\n2 for Tuesday, and so on.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/getUTCFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCFullYear()\n\nThe **`getUTCFullYear()`** method returns the year in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCFullYear()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer representing the year in the given date\naccording to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n\n## Description\n\nThe value returned by `getUTCFullYear()` is an absolute number that is\ncompliant with year-2000, for example, 1995.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/getUTCHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCHours()\n\nThe **`getUTCHours()`** method returns the hours in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCHours()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 23, representing the hours in the given date according\nto Coordinated Universal Time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/getUTCMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCMilliseconds()\n\nThe **`getUTCMilliseconds()`** method returns the milliseconds\nportion of the time object's value according to universal time.\n\n## Syntax\n\n```js\ngetUTCMilliseconds()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 999, representing\nthe milliseconds portion of the given `Date` object according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n\nNot to be confused with Unix epoch time. To get the total milliseconds since 1970/01/01,\nuse the [`getTime()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/getTime) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/getUTCMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCMinutes()\n\nThe **`getUTCMinutes()`** method returns the minutes in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCMinutes()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 59,\nrepresenting the minutes in the given date according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/getUTCMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCMonth()\n\nThe **`getUTCMonth()`** returns the month of the specified date\naccording to universal time, as a zero-based value (where zero indicates the first month\nof the year).\n\n## Syntax\n\n```js\ngetUTCMonth()\n```\n\n### Return value\n\nA number. If the `Date` object represents a valid date, an integer number, between 0 and 11,\ncorresponding to the month of the given date according to universal time. 0 for January,\n1 for February, 2 for March, and so on. Otherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/getUTCSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getUTCSeconds()\n\nThe **`getUTCSeconds()`** method returns the seconds in the\nspecified date according to universal time.\n\n## Syntax\n\n```js\ngetUTCSeconds()\n```\n\n### Return value\n\nA number.\nIf the `Date` object represents a valid date, an integer between 0 and 59, representing\nthe seconds in the given date according to universal time.\nOtherwise, [`NaN`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/NaN)\nif the `Date` object doesn't represent a valid date.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/getYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.getYear()\n\nThe **`getYear()`** method returns the year in the specified\ndate according to local time. Because `getYear()` does not return full years\n(\"year 2000 problem\"), it is no longer used and has been replaced by the\n[`Date.prototype.getFullYear()`](./getFullYear.mdx) method.\n\n## Syntax\n\n```js\ngetYear()\n```\n\n### Return value\n\nA number representing the year of the given date, according to local time, minus 1900.\n\n## Description\n\n- For years greater than or equal to 2000, the value returned by\n  `getYear()` is 100 or greater. For example, if the year is 2026,\n  `getYear()` returns 126.\n- For years between and including 1900 and 1999, the value returned by\n  `getYear()` is between 0 and 99. For example, if the year is 1976,\n  `getYear()` returns 76.\n- For years less than 1900, the value returned by `getYear()` is less than 0. For example, if the year is 1800, `getYear()` returns -100.\n\nTo take into account years before and after 2000, you should use\n[`Date.prototype.getFullYear()`](./getFullYear.mdx) instead of\n`getYear()` so that the year is specified in full.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/setDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setDate()\n\nThe **`setDate()`** method changes the day of the month of a given `Date` instance, based on local time.\n\nTo instead change the day of the month for a given `Date` instance based on UTC time, use the [`Date.prototype.setUTCDate()`](./setUTCDate.mdx) method.\n\n## Syntax\n\n```js\nsetDate(dayValue)\n```\n\n### Parameters\n\n- `dayValue`\n  - : An integer representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the given date (the\n`Date` object is also changed in place).\n\n## Description\n\nIf the `dayValue` is outside of the range of date values for the month, `setDate()` will update the `Date` object accordingly.\n\nFor example, if 0 is provided for `dayValue`, the date will be set to the last day of the previous month. If you use 40 for `dayValue`, and the month stored in the `Date` object is June, the day will be changed to 10 and the month will be incremented to July.\n\nIf a negative number is provided for `dayValue`, the date will be set counting backwards from the last day of the previous month. -1 would result in the date being set to 1 day before the last day of the previous month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/setFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setFullYear()\n\nThe **`setFullYear()`** method sets the full year for a\nspecified date according to local time. Returns new timestamp.\n\n## Syntax\n\n```js\nsetFullYear(yearValue)\nsetFullYear(yearValue, monthValue)\nsetFullYear(yearValue, monthValue, dateValue)\n```\n\n### Parameters\n\n- `yearValue`\n  - : An integer specifying the numeric value of the year, for example, 1995.\n- `monthValue`\n  - : Optional. An integer between 0 and 11 representing the months January through\n    December.\n- `dateValue`\n  - : Optional. An integer between 1 and 31 representing the day of the month. If you\n    specify the `dateValue` parameter, you must also specify the\n    `monthValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `monthValue` and\n`dateValue` parameters, the values returned from the\n[`Date.prototype.getMonth()`](./getMonth.mdx) and\n[`Date.prototype.getDate()`](./getDate.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range, `setFullYear()`\nattempts to update the other parameters and the date information in the\n`Date` object accordingly. For example, if you specify 15 for\n`monthValue`, the year is incremented by 1\n(`yearValue + 1`), and 3 is used for the month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/setHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setHours()\n\nThe **`setHours()`** method sets the hours for a specified date\naccording to local time, and returns the number of milliseconds since January 1, 1970\n00:00:00 UTC until the time represented by the updated `Date` instance.\n\n## Syntax\n\n```js\nsetHours(hoursValue)\nsetHours(hoursValue, minutesValue)\nsetHours(hoursValue, minutesValue, secondsValue)\nsetHours(hoursValue, minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `hoursValue`\n  - : Ideally, an integer between 0 and 23, representing the hour. If a value greater than\n    23 is provided, the datetime will be incremented by the extra hours.\n- `minutesValue`\n  - : Optional. Ideally, an integer between 0 and 59, representing the minutes. If a value\n    greater than 59 is provided, the datetime will be incremented by the extra minutes.\n- `secondsValue`\n  - : Optional. Ideally, an integer between 0 and 59, representing the seconds. If a value\n    greater than 59 is provided, the datetime will be incremented by the extra seconds. If\n    you specify the `secondsValue` parameter, you must also specify\n    the `minutesValue`.\n- `msValue`\n  - : Optional. Ideally, a number between 0 and 999, representing the milliseconds. If a\n    value greater than 999 is provided, the datetime will be incremented by the extra\n    milliseconds. If you specify the `msValue` parameter, you must\n    also specify the `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between January 1, 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `minutesValue`,\n`secondsValue`, and `msValue` parameters,\nthe values returned from the [`Date.prototype.getMinutes()`](./getMinutes.mdx),\n[`Date.prototype.getSeconds()`](./getSeconds.mdx), and\n[`Date.prototype.getMilliseconds()`](./getMilliseconds.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range, `setHours()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes will\nbe incremented by 1 (`minutesValue + 1`), and 40 will be used for\nseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/setMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setMilliseconds()\n\nThe **`setMilliseconds()`** method sets the milliseconds for a\nspecified date according to local time.\n\n## Syntax\n\n```js\nsetMilliseconds(millisecondsValue)\n```\n\n### Parameters\n\n- `millisecondsValue`\n  - : A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you specify a number outside the expected range, the date information in the\n`Date` object is updated accordingly. For example, if you specify 1005, the\nnumber of seconds is incremented by 1, and 5 is used for the milliseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/setMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setMinutes()\n\nThe **`setMinutes()`** method sets the minutes for a specified\ndate according to local time.\n\n## Syntax\n\n```js\nsetMinutes(minutesValue)\nsetMinutes(minutesValue, secondsValue)\nsetMinutes(minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `minutesValue`\n  - : An integer between 0 and 59, representing the minutes.\n- `secondsValue`\n  - : Optional. An integer between 0 and 59, representing the seconds. If you specify the\n    `secondsValue` parameter, you must also specify the\n    `minutesValue`.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds. If you specify\n    the `msValue` parameter, you must also specify the\n    `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `secondsValue` and\n`msValue` parameters, the values returned from\n[`Date.prototype.getSeconds()`](./getSeconds.mdx) and\n[`Date.prototype.getMilliseconds()`](./getMilliseconds.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range, `setMinutes()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes will\nbe incremented by 1 (`minutesValue + 1`), and 40 will be used for\nseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/setMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setMonth()\n\nThe **`setMonth()`** method sets the month for a specified date according to the currently set year.\n\n## Syntax\n\n```js\nsetMonth(monthValue)\nsetMonth(monthValue, dayValue)\n```\n\n### Parameters\n\n- `monthValue`\n  - : A zero-based integer representing the month of the year offset from the start of the\n    year. So, 0 represents January, 11 represents December, -1 represents December of the\n    previous year, and 12 represents January of the following year.\n- `dayValue`\n  - : Optional. An integer from 1 to 31, representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `dayValue` parameter, the value\nreturned from the [`Date.prototype.getDate()`](./getDate.mdx) method is used.\n\nIf a parameter you specify is outside of the expected range, `setMonth()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 15 for `monthValue`, the year will be\nincremented by 1, and 3 will be used for month.\n\nThe current day of month will have an impact on the behavior of this method.\nConceptually it will add the number of days given by the current day of the month to the\n1st day of the new month specified as the parameter, to return the new date.\nFor example, if the current value is 31st January 2016, calling setMonth with a value of 1 will return 2nd March 2016.\nThis is because in 2016 February had 29 days.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/setSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setSeconds()\n\nThe **`setSeconds()`** method sets the seconds for a specified\ndate according to local time.\n\n## Syntax\n\n```js\nsetSeconds(secondsValue)\nsetSeconds(secondsValue, msValue)\n```\n\n### Parameters\n\n- `secondsValue`\n  - : An integer between 0 and 59, representing the seconds.\n- `msValue` _**optional**_\n  - : Optional. A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `msValue` parameter, the value returned\nfrom the [`Date.prototype.getMilliseconds()`](./getMilliseconds.mdx) method is\nused.\n\nIf a parameter you specify is outside of the expected range, `setSeconds()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes stored\nin the `Date` object will be incremented by 1, and 40 will be used for\nseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/setTime.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setTime()\n\nThe **`setTime()`** method sets the `Date` object\nto the time represented by a number of milliseconds since January 1, 1970, 00:00:00 UTC.\n\n## Syntax\n\n```js\nsetTime(timeValue)\n```\n\n### Parameters\n\n- `timeValue`\n  - : An integer representing the number of milliseconds since 1 January 1970, 00:00:00\n    UTC.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date\n(effectively, the value of the argument).\n\n## Description\n\nUse the `setTime()` method to help assign a date and time to another\n`Date` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/setUTCDate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCDate()\n\nThe **`setUTCDate()`** method changes the day of the month of a given `Date` instance, based on UTC time.\n\nTo instead change the day of the month for a given `Date` instance based on local time, use the [`Date.prototype.setDate()`](././setDate.mdx) method.\n\n## Syntax\n\n```js\nsetUTCDate(dayValue)\n```\n\n### Parameters\n\n- `dayValue`\n  - : An integer from 1 to 31, representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf the `dayValue` is outside of the range of date values for the month, `setDate()` will update the `Date` object accordingly.\n\nFor example, if 0 is provided for `dayValue`, the date will be set to the last day of the previous month. If you use 40 for `dayValue`, and the month stored in the `Date` object is June, the day will be changed to 10 and the month will be incremented to July.\n\nIf a negative number is provided for `dayValue`, the date will be set counting backwards from the last day of the previous month. -1 would result in the date being set to 1 day before the last day of the previous month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/setUTCFullYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCFullYear()\n\nThe **`setUTCFullYear()`** method sets the full year for a\nspecified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCFullYear(yearValue)\nsetUTCFullYear(yearValue, monthValue)\nsetUTCFullYear(yearValue, monthValue, dayValue)\n```\n\n### Parameters\n\n- `yearValue`\n  - : An integer specifying the numeric value of the year, for example, 1995.\n- `monthValue`\n  - : Optional. An integer between 0 and 11 representing the months January through\n    December.\n- `dayValue`\n  - : Optional. An integer between 1 and 31 representing the day of the month. If you\n    specify the `dayValue` parameter, you must also specify the\n    `monthValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `monthValue` and\n`dayValue` parameters, the values returned from the\n[`Date.prototype.getUTCMonth()`](./getUTCMonth.mdx) and\n[`Date.prototype.getUTCDate()`](./getUTCDate.mdx) methods are used.\n\nIf a parameter you specify is outside of the expected range,\n`setUTCFullYear()` attempts to update the other parameters and the date\ninformation in the `Date` object accordingly. For example, if you specify 15\nfor `monthValue`, the year is incremented by 1\n(`yearValue + 1`), and 3 is used for the month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/setUTCHours.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCHours()\n\nThe **`setUTCHours()`** method sets the hour for a specified\ndate according to universal time, and returns the number of milliseconds since January\n1, 1970 00:00:00 UTC until the time represented by the updated `Date`\ninstance.\n\n## Syntax\n\n```js\nsetUTCHours(hoursValue)\nsetUTCHours(hoursValue, minutesValue)\nsetUTCHours(hoursValue, minutesValue, secondsValue)\nsetUTCHours(hoursValue, minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `hoursValue`\n  - : An integer between 0 and 23, representing the hour.\n- `minutesValue`\n  - : Optional. An integer between 0 and 59, representing the minutes.\n- `secondsValue`\n  - : Optional. An integer between 0 and 59, representing the seconds. If you specify the\n    `secondsValue` parameter, you must also specify the\n    `minutesValue`.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds. If you specify\n    the `msValue` parameter, you must also specify the\n    `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between January 1, 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `minutesValue`,\n`secondsValue`, and `msValue` parameters,\nthe values returned from the [`Date.prototype.getUTCMinutes()`](./getUTCMinutes.mdx), [`Date.prototype.getUTCSeconds()`](./getUTCSeconds.mdx),\nand [`Date.prototype.getUTCMilliseconds()`](./getUTCMilliseconds.mdx) methods\nare used.\n\nIf a parameter you specify is outside of the expected range, `setUTCHours()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 100 for `secondsValue`, the minutes will\nbe incremented by 1 (`minutesValue + 1`), and 40 will be used for seconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/setUTCMilliseconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCMilliseconds()\n\nThe **`setUTCMilliseconds()`** method sets the milliseconds for\na specified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCMilliseconds(millisecondsValue)\n```\n\n### Parameters\n\n- `millisecondsValue`\n  - : A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf a parameter you specify is outside of the expected range,\n`setUTCMilliseconds()` attempts to update the date information in the\n`Date` object accordingly. For example, if you use 1100 for\n`millisecondsValue`, the seconds stored in the `Date`\nobject will be incremented by 1, and 100 will be used for milliseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/setUTCMinutes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCMinutes()\n\nThe **`setUTCMinutes()`** method sets the minutes for a\nspecified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCMinutes(minutesValue)\nsetUTCMinutes(minutesValue, secondsValue)\nsetUTCMinutes(minutesValue, secondsValue, msValue)\n```\n\n### Parameters\n\n- `minutesValue`\n  - : An integer between 0 and 59, representing the minutes.\n- `secondsValue`\n  - : Optional. An integer between 0 and 59, representing the seconds. If you specify the\n    `secondsValue` parameter, you must also specify the\n    `minutesValue`.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds. If you specify\n    the `msValue` parameter, you must also specify the\n    `minutesValue` and `secondsValue`.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `secondsValue` and\n`msValue` parameters, the values returned from\n[`Date.prototype.getUTCSeconds()`](./getUTCSeconds.mdx) and\n[`Date.prototype.getUTCMilliseconds()`](./getUTCMilliseconds.mdx) methods are\nused.\n\nIf a parameter you specify is outside of the expected range,\n`setUTCMinutes()` attempts to update the date information in the\n`Date` object accordingly. For example, if you use 100 for\n`secondsValue`, the minutes will be incremented by 1\n(`minutesValue + 1`), and 40 will be used for seconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/setUTCMonth.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCMonth()\n\nThe **`setUTCMonth()`** method sets the month for a specified\ndate according to universal time.\n\n## Syntax\n\n```js\nsetUTCMonth(monthValue)\nsetUTCMonth(monthValue, dayValue)\n```\n\n### Parameters\n\n- `monthValue`\n  - : An integer between 0 and 11, representing the months January through December.\n- `dayValue`\n  - : Optional. An integer from 1 to 31, representing the day of the month.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `dayValue` parameter, the value returned from the\n[`Date.prototype.getUTCDate()`](./getUTCDate.mdx) method is used.\n\nIf a parameter you specify is outside of the expected range, `setUTCMonth()`\nattempts to update the date information in the `Date` object accordingly.\nFor example, if you use 15 for `monthValue`, the year will be incremented by\n1, and 3 will be used for month.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/setUTCSeconds.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setUTCSeconds()\n\nThe **`setUTCSeconds()`** method sets the seconds for a\nspecified date according to universal time.\n\n## Syntax\n\n```js\nsetUTCSeconds(secondsValue)\nsetUTCSeconds(secondsValue, msValue)\n```\n\n### Parameters\n\n- `secondsValue`\n  - : An integer between 0 and 59, representing the seconds.\n- `msValue`\n  - : Optional. A number between 0 and 999, representing the milliseconds.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf you do not specify the `msValue` parameter, the value returned from the\n[`Date.prototype.getUTCMilliseconds()`](./getUTCMilliseconds.mdx) method is\nused.\n\nIf a parameter you specify is outside of the expected range,\n`setUTCSeconds()` attempts to update the date information in the\n`Date` object accordingly. For example, if you use 100 for\n`secondsValue`, the minutes stored in the `Date` object will be\nincremented by 1, and 40 will be used for seconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/setYear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.setYear()\n\nThe legacy **`setYear()`** method sets the year for a specified date according to local time.\n\nHowever, the way the legacy `setYear()` method sets year values is different from how the preferred [`Date.prototype.setFullYear()`](./setFullYear.mdx) method sets year values — and in some cases, also different from how `new Date()` and [`Date.parse()`](../parse.mdx) set year values. Specifically, given two-digit numbers, such as `22` and `61`:\n\n- `setYear()` interprets any two-digit number as an offset to `1900`; so `date.setYear(22)` results in the year value being set to `1922`, and `date.setYear(61)` results in the year value being set to `1961`. (In contrast, while `new Date(61, 1)` also results in the year value being set to `1961`, `new Date(\"2/1/22\")` results in the year value being set to `2022`; and similarly for [`Date.parse()`](../parse.mdx)).\n\n- [`Date.prototype.setFullYear()`](./setFullYear.mdx) does no special interpretation but instead uses the literal two-digit value as-is to set the year; so `date.setFullYear(61)` results in the year value being set to `0061`, and `date.setFullYear(22)` results in the year value being set to `0022`.\n\nBecause of those differences in behavior, you should no longer use the legacy `setYear()` method, but should instead use the preferred [`Date.prototype.setFullYear()`](./setFullYear.mdx) method.\n\n## Syntax\n\n```js\nsetYear(yearValue)\n```\n\n### Parameters\n\n- `yearValue`\n  - : An integer.\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date.\n\n## Description\n\nIf `yearValue` is a number between 0 and 99 (inclusive), then the year for\n`dateObj` is set to `1900 + yearValue`. Otherwise, the year for\n`dateObj` is set to `yearValue`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/toDateString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toDateString()\n\nThe **`toDateString()`** method returns the date portion of a `Date` object interpreted in the local timezone in English.\n\n## Syntax\n\n```js\ntoDateString()\n```\n\n### Return value\n\nA string representing the date portion of the given `Date` object in human readable form in English.\n\n## Description\n\n`Date` instances refer to a specific point in time. `toDateString()` interprets the date in the local timezone and formats the _date_ part in English. It always uses the following format, separated by spaces:\n\n1. First three letters of the week day name\n2. First three letters of the month name\n3. Two-digit day of the month, padded on the left a zero if necessary\n4. Four-digit year (at least), padded on the left with zeros if necessary. May have a negative sign\n\nFor example: \"Thu Jan 01 1970\".\n\n- If you want to get the _time_ part, use [`toTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString).\n- If you want to get both the date and time, use [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toString).\n- If you want to make the date interpreted as UTC instead of local timezone, use [`toUTCString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString).\n- If you want to format the date in a more user-friendly format (e.g. localization), use [`toLocaleDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/toISOString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toISOString()\n\nThe **`toISOString()`** method returns a string in _simplified_ extended ISO format ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)), which is always 24 or 27 characters long (`YYYY-MM-DDTHH:mm:ss.sssZ` or `±YYYYYY-MM-DDTHH:mm:ss.sssZ`, respectively). The timezone is always zero UTC offset, as denoted by the suffix `Z`.\n\n## Syntax\n\n```js\ntoISOString()\n```\n\n### Return value\n\nA string representing the given date in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format according to universal time. It's the same format as the one required to be recognized by [`Date.parse()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/parse#date-time-string-format).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/toJSON.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toJSON()\n\nThe **`toJSON()`** method returns a string representation of\nthe `Date` object.\n\n## Syntax\n\n```js\ntoJSON()\n```\n\n### Return value\n\nA string representation of the given date.\n\n## Description\n\n`Date` instances refer to a specific point in time. `toJSON()` calls the object's [`Date.prototype.toISOString()`](./toISOString.mdx) method, which returns a string representing the `Date` object's value. This method is generally intended to, by default, usefully serialize `Date` objects during [JSON](https://developer.mozilla.org/docs/Glossary/JSON) serialization, which can then be deserialized using the [`Date()` constructor](../Date.mdx) or [`Date.parse()`](../parse.mdx) as the reviver of [`JSON.parse()`](../../JSON/parse.mdx).\n\nThe method first attempts to convert its `this` value [to a primitive](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion) by calling its [`[Symbol.toPrimitive]()`](../../Symbol/toPrimitive.mdx) (with `\"number\"` as hint), [`valueOf()`](../../Object/prototype/valueOf.mdx), and [`toString()`](../../Object/prototype/toString.mdx) methods, in that order. If the result is a [non-finite](../../Number/isFinite.mdx) number, `null` is returned. (This generally corresponds to an invalid date, whose [`valueOf()`](./valueOf.mdx) returns [`NaN`](../../NaN.mdx).) Otherwise, if the converted primitive is not a number or is a finite number, the return value of `this.toISOString()` is returned.\n\nNote that the method does not check whether the `this` value is a valid `Date` object. However, calling `Date.prototype.toJSON()` on non-`Date` objects does not have well-defined semantics.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/toLocaleDateString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toLocaleDateString()\n\nThe **`toLocaleDateString()`** method returns a string with a language-sensitive representation of the date portion of the specified date in the user agent's timezone. In implementations with [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) support, this method simply calls `Intl.DateTimeFormat`.\n\n## Syntax\n\n```js\ntoLocaleDateString()\ntoLocaleDateString(locales)\ntoLocaleDateString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat), these parameters correspond exactly to the [`Intl.DateTimeFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) constructor's parameters. Implementations without `Intl.DateTimeFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales) parameter of the `Intl.DateTimeFormat()` constructor.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options) parameter of the `Intl.DateTimeFormat()` constructor. The `timeStyle` option must be undefined, or a [`TypeError`](../../../globals/TypeError/TypeError.mdx) would be thrown. If `weekday`, `year`, `month`, and `day` are all undefined, then `year`, `month`, and `day` will be set to `\"numeric\"`.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored.\n\nSee the [`Intl.DateTimeFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string representing the date portion of the given `Date` instance according to language-specific conventions.\n\nIn implementations with `Intl.DateTimeFormat`, this is equivalent to `new Intl.DateTimeFormat(locales, options).format(date)`, where `options` has been normalized as described above.\n\n## Performance\n\nWhen formatting large numbers of dates, it is better to create an [`Intl.DateTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) object and use its [`format()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/format) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string with a language-sensitive representation of this date. In implementations with [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) support, this method simply calls `Intl.DateTimeFormat`.\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat), these parameters correspond exactly to the [`Intl.DateTimeFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) constructor's parameters. Implementations without `Intl.DateTimeFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales) parameter of the `Intl.DateTimeFormat()` constructor.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options) parameter of the `Intl.DateTimeFormat()` constructor. If `weekday`, `year`, `month`, `day`, `dayPeriod`, `hour`, `minute`, `second`, and `fractionalSecondDigits` are all undefined, then `year`, `month`, `day`, `hour`, `minute`, `second` will be set to `\"numeric\"`.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored.\n\nSee the [`Intl.DateTimeFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string representing the given date according to language-specific conventions.\n\nIn implementations with `Intl.DateTimeFormat`, this is equivalent to `new Intl.DateTimeFormat(locales, options).format(date)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/toLocaleTimeString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toLocaleTimeString()\n\nThe **`toLocaleTimeString()`** method returns a string with a language-sensitive representation of the time portion of the date. In implementations with [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) support, this method simply calls `Intl.DateTimeFormat`.\n\n## Syntax\n\n```js\ntoLocaleTimeString()\ntoLocaleTimeString(locales)\ntoLocaleTimeString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` arguments customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.DateTimeFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat), these parameters correspond exactly to the [`Intl.DateTimeFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) constructor's parameters. Implementations without `Intl.DateTimeFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#locales) parameter of the `Intl.DateTimeFormat()` constructor.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options) parameter of the `Intl.DateTimeFormat()` constructor. If `dayPeriod`, `hour`, `minute`, `second`, and `fractionalSecondDigits` are all undefined, then `hour`, `minute`, `second` will be set to `\"numeric\"`.\n\n    In implementations without `Intl.DateTimeFormat` support, this parameter is ignored.\n\nSee the [`Intl.DateTimeFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string representing the time portion of the given `Date` instance according to language-specific conventions.\n\nIn implementations with `Intl.DateTimeFormat`, this is equivalent to `new Intl.DateTimeFormat(locales, options).format(date)`, where `options` has been normalized as described above.\n\n## Performance\n\nWhen formatting large numbers of dates, it is better to create an [`Intl.DateTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) object and use its [`format()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/format) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified `Date` object interpreted in the local timezone.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the given date.\n\n## Description\n\nThe `Date` object overrides the `toString()` method of `Object`. `Date.prototype.toString()` returns a string representation of the Date as interpreted in the local timezone, containing both the date and the time — it joins the string representation specified in [`toDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString) and [`toTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString) together, adding a space in between.\n\nFor example: \"Thu Jan 01 1970 04:42:04 GMT+0000 (Coordinated Universal Time)\"\n\nThe `toString()` method is automatically called when a date is coerced to a string, such as `const today = 'Today is ' + new Date()`.\n\n`Date.prototype.toString()` must be called on `Date` instances. If the `this` value does not inherit from `Date.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n- If you only want to get the _date_ part, use [`toDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString).\n- If you only want to get the _time_ part, use [`toTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toTimeString).\n- If you want to make the date interpreted as UTC instead of local timezone, use [`toUTCString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString).\n- If you want to format the date in a more user-friendly format (e.g. localization), use [`toLocaleString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/toTimeString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toTimeString()\n\nThe **`toTimeString()`** method returns the time portion of a `Date` object interpreted in the local timezone in English.\n\n## Syntax\n\n```js\ntoTimeString()\n```\n\n### Return value\n\nA string representing the time portion of the given date in human readable form in English.\n\n## Description\n\n`Date` instances refer to a specific point in time. `toTimeString()` interprets the date in the local timezone and formats the _time_ part in English. It always uses the format of `hh:mm:ss GMT±xxxx (TZ)`, where:\n\n| Format String | Description                                                                                           |\n| ------------- | ----------------------------------------------------------------------------------------------------- |\n| `hh`          | Hour, as two digits with leading zero if required                                                     |\n| `mm`          | Minute, as two digits with leading zero if required                                                   |\n| `ss`          | Seconds, as two digits with leading zero if required                                                  |\n| `±xxxx`       | The local timezone's offset — two digits for hours and two digits for minutes (e.g. `-0500`, `+0800`) |\n| `TZ`          | The timezone's name (e.g. `PDT`, `PST`)                                                               |\n\nFor example: \"04:42:04 GMT+0000 (Coordinated Universal Time)\".\n\n- If you want to get the _date_ part, use [`toDateString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toDateString).\n- If you want to get both the date and time, use [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toString).\n- If you want to make the date interpreted as UTC instead of local timezone, use [`toUTCString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString).\n- If you want to format the date in a more user-friendly format (e.g. localization), use [`toLocaleTimeString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleTimeString).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/toUTCString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.toUTCString()\n\nThe **`toUTCString()`** method converts a date to a string, interpreting it in the UTC time zone. `toGMTString()` is an alias of this method.\n\nBased on [rfc7231](https://datatracker.ietf.org/doc/html/rfc7231#section-7.1.1.1) and modified according to [ECMA-262 toUTCString](https://tc39.es/ecma262/#sec-date.prototype.toutcstring), it can have negative values.\n\n## Syntax\n\n```js\ntoUTCString()\n```\n\n### Return value\n\nA string representing the given date using the UTC time zone.\n\n## Description\n\nThe value returned by `toUTCString()` is a string in the form `Www, dd Mmm yyyy hh:mm:ss GMT`, where:\n\n| Format String | Description                                                  |\n| ------------- | ------------------------------------------------------------ |\n| `Www`         | Day of week, as three letters (e.g. `Sun`, `Mon`)            |\n| `dd`          | Day of month, as two digits with leading zero if required    |\n| `Mmm`         | Month, as three letters (e.g. `Jan`, `Feb`)                  |\n| `yyyy`        | Year, as four or more digits with leading zeroes if required |\n| `hh`          | Hour, as two digits with leading zero if required            |\n| `mm`          | Minute, as two digits with leading zero if required          |\n| `ss`          | Seconds, as two digits with leading zero if required         |\n\n### Aliasing\n\nJavaScript's `Date` API was inspired by Java's `java.util.Date` library (while the latter had become de facto legacy since Java 1.1 in 1997). In particular, the Java `Date` class had a method called `toGMTString` — which was poorly named, because the [Greenwich Mean Time](https://en.wikipedia.org/wiki/Greenwich_Mean_Time) is not equivalent to the [Coordinated Universal Time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time), while JavaScript dates always operate by UTC time. For web compatibility reasons, `toGMTString` remains as an alias to `toUTCString`, and they refer to the exact same function object. This means:\n\n```js\nDate.prototype.toGMTString.name === \"toUTCString\";\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Date/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Date.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a\n`Date` object.\n\n\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nThe number of milliseconds between 1 January 1970 00:00:00 UTC and the given date, or [`NaN`](../../NaN.mdx) in case of an invalid date.\n\n## Description\n\nThe `valueOf()` method returns the primitive value of a `Date`\nobject as a number data type, the number of milliseconds since midnight 01 January, 1970\nUTC.\n\nThis method is functionally equivalent to the [`Date.prototype.getTime()`](./getTime.mdx)\nmethod.\n\nThis method is usually called internally by JavaScript and not explicitly in code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/DecompressionStream/DecompressionStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DecompressionStream()\n\nThe **`DecompressionStream()`** constructor creates a new `DecompressionStream` object which decompresses a stream of data.\n\n## Syntax\n\n```js\nnew DecompressionStream(format)\n```\n\n### Parameters\n\n- `format`\n\n  - : One of the following compression formats:\n\n    - `\"gzip\"`\n    - `\"deflate\"`\n    - `\"deflate-raw\"`\n\n## Exceptions\n\n- `TypeError`\n  - : Thrown if the format passed to the constructor is not supported.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/DecompressionStream/prototype/readable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DecompressionStream.readable\n\nThe **`readable`** read-only property of the `DecompressionStream` interface returns a `ReadableStream`.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/DecompressionStream/prototype/writable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# DecompressionStream.writable\n\nThe **`writable`** read-only property of the `DecompressionStream` interface returns a `WritableStream`.\n\n## Value\n\nA `WritableStream`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/EcKeyImportParams/EcKeyImportParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# EcKeyImportParams\n\nThe **`EcKeyImportParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.importKey()`, when generating any elliptic-curve-based key pair: that is, when the algorithm is identified as ECDSA.\n\n## Instance properties\n\n- `name`\n  - : A string. This should be set to `ECDSA`.\n- `namedCurve`\n\n  - : A string representing the name of the elliptic curve to use. This may be any of the following names for [NIST](https://www.nist.gov/)-approved curves:\n\n    - `P-256`\n    - `P-384`\n    - `P-521`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/EcdsaParams/EcdsaParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# EcdsaParams\n\nThe **`EcdsaParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.sign()` or `SubtleCrypto.verify()` when using the ECDSA algorithm.\n\n## Instance properties\n\n- `name`\n    - : A string. This should be set to `ECDSA`.\n- `hash`\n\n    - : A string. An identifier for the digest algorithm to use. This should be one of the following:\n\n        - `SHA-256`: selects the SHA-256 algorithm.\n        - `SHA-384`: selects the SHA-384 algorithm.\n        - `SHA-512`: selects the SHA-512 algorithm.\n\n        > **Warning:** `SHA-1` is also supported here but the SHA-1 algorithm is considered vulnerable and should no longer be used.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Error/Error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error\n\nThe **`Error()`** constructor creates an error object.\n\n## Syntax\n\n```js\nnew Error()\nnew Error(message)\nnew Error(message, options)\nnew Error(message, fileName)\nnew Error(message, fileName, lineNumber)\n\nError()\nError(message)\nError(message, options)\nError(message, fileName)\nError(message, fileName, lineNumber)\n```\n\n> **Note:** `Error()` can be called with or without `new`. Both create a new `Error` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : A human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A value indicating the specific cause of the error, reflected in the [`Error.prototype.cause`](./prototype/cause.mdx) property. When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Error/prototype/cause.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.cause\n\nThe **`cause`** data property of an [`Error`](../../../globals/Error/Error.mdx) instance indicates the specific original cause of the error.\n\nIt is used when catching and re-throwing an error with a more-specific or useful error message in order to still have access to the original error.\n\n## Value\n\nThe value that was passed to the [`Error`](../Error.mdx) constructor in the `options.cause` argument. It may not be present.\n\n## Description\n\nThe value of `cause` can be of any type. You should not make assumptions that the error you caught has an `Error` as its `cause`, in the same way that you cannot be sure the variable bound in the `catch` statement is an `Error` either. The \"Providing structured data as the error cause\" example below shows a case where a non-error is deliberately provided as the cause.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Error/prototype/message.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.message\n\nThe **`message`** data property of an [`Error`](../Error.mdx) instance is a human-readable description of the error.\n\n## Value\n\nA string corresponding to the value passed to the [`Error`](../Error.mdx) constructor as the first argument.\n\n## Description\n\nThis property contains a brief description of the error if one is available or has been set. The `message` property combined with the [`name`](./name.mdx) property is used by the [`Error.prototype.toString()`](./toString.mdx) method to create a string representation of the Error.\n\nBy default, the `message` property is an empty string, but this behavior can be overridden for an instance by specifying a message as the first argument to the [`Error`](../Error.mdx) constructor.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Error/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.name\n\nThe **`name`** data property of `Error.prototype` is shared by all [`Error`](../Error.mdx) instances. It represents the name for the type of error. For `Error.prototype.name`, the initial value is `\"Error\"`. Subclasses like [`TypeError`](../../../globals/TypeError/TypeError.mdx) and [`SyntaxError`](../../SyntaxError/SyntaxError.mdx) provide their own `name` properties.\n\n## Value\n\nA string. For `Error.prototype.name`, the initial value is `\"Error\"`.\n\n## Description\n\nBy default, [`Error`](../Error.mdx) instances are given the name \"Error\". The `name` property, in addition to the [`message`](./message.mdx) property, is used by the [`Error.prototype.toString()`](./toString.mdx) method to create a string representation of the error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Error/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Error.prototype.toString()\n\nThe **`toString()`** method returns a string representing the\nspecified [`Error`](../Error.mdx) object.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified [`Error`](../Error.mdx) object.\n\n## Description\n\nThe [`Error`](../Error.mdx) object overrides the [`Object.prototype.toString()`](../../Object/prototype/toString.mdx)\nmethod inherited by all objects. \n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/EvalError/EvalError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# EvalError\n\nThe **`EvalError()`** constructor creates a new `EvalError` instance.\n\n## Syntax\n\n```js\nnew EvalError()\nnew EvalError(message)\nnew EvalError(message, options)\nnew EvalError(message, fileName)\nnew EvalError(message, fileName, lineNumber)\n\nEvalError()\nEvalError(message)\nEvalError(message, options)\nEvalError(message, fileName)\nEvalError(message, fileName, lineNumber)\n```\n\n> **Note:** `EvalError()` can be called with or without `new`. Both create a new `EvalError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/FetchEvent/FetchEvent.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent\n\nThis is the event type for `fetch` events. It contains information about the fetch, including the request and how the receiver will treat the response. \nIt provides the [`event.respondWith()`](./prototype/respondWith.mdx) method, which allows us to provide a response to this fetch.\n\n## Instance properties\n\n- `FetchEvent.request` _**readonly**_\n    - : The `Request` that was received by the application.\n- `FetchEvent.client` _**readonly**_\n    - : Information about the downstream client that made the request.\n        While these fields are always defined on Compute, they may be *null* when not available in testing environments\n        such as Viceroy.\n    - `FetchEvent.client.requestId` _**readonly**_\n        - : A UUID generated by Compute for each request.\n    - `FetchEvent.client.address` _**readonly**_\n        - : A string representation of the IPv4 or IPv6 address of the downstream client.\n    - `FetchEvent.client.geo` _**readonly**_\n        - : Either `null`, or a [geolocation dictionary](../../fastly:geolocation/getGeolocationForIpAddress.mdx) corresponding to the IP address of the downstream client.\n    - `FetchEvent.client.tlsJA3MD5` _**readonly**_\n        - : Either `null` or a string representation of the JA3 hash of the TLS ClientHello message.\n    - `FetchEvent.client.tlsCipherOpensslName` _**readonly**_\n        - : Either `null` or a string representation of the cipher suite used to secure the client TLS connection.\n    - `FetchEvent.client.tlsProtocol` _**readonly**_\n        - : Either `null` or a string representation of the TLS protocol version used to secure the client TLS connection.\n    - `FetchEvent.client.tlsClientCertificate` _**readonly**_\n        - : Either `null` or an ArrayBuffer containing the raw client certificate in the mutual TLS handshake message. It is in PEM format. Returns an empty ArrayBuffer if this is not mTLS or available.\n    - `FetchEvent.client.tlsClientHello` _**readonly**_\n        - : Either `null` or an ArrayBuffer containing the raw bytes sent by the client in the TLS ClientHello message.\n    - `FetchEvent.client.tlsJA4` _**readonly**_\n        - : Either `null` or a string representation of the JA4 fingerprint of the TLS ClientHello message.\n    - `FetchEvent.client.h2Fingerprint` _**readonly**_\n        - : Either `null` or a string representation of the HTTP/2 fingerprint for HTTP/2 connections. Returns `null` for HTTP/1.1 connections.\n    - `FetchEvent.client.ohFingerprint` _**readonly**_\n        - : Either `null` or a string representation of the Original Header fingerprint based on the order and presence of request headers.\n- `FetchEvent.server` _**readonly**_\n    - : Information about the server receiving the request for the Fastly Compute service.\n    - `FetchEvent.server.address` _**readonly**_\n        - : A string representation of the IPv4 or IPv6 address of the server which received the request.\n\n## Instance methods\n\n- [`FetchEvent.respondWith()`](./prototype/respondWith.mdx)\n    - : Provide (a promise for) a response for this request.\n- [`FetchEvent.sendEarlyHints()`](./prototype/sendEarlyHints.mdx)\n    - : Send a [103 Early Hints](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/103) response for this request.\n- [`FetchEvent.waitUntil()`](./prototype/waitUntil.mdx)\n    - : Extends the lifetime of the event. Used to notify the host environment of tasks that extend beyond the returning of a response, such as streaming and caching.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/FetchEvent/prototype/respondWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent.respondWith()\n\nThe **`respondWith()`** method allows you to provide a promise for a [`Response`](../../Response/Response.mdx) to send back to the client which made the incoming request to your application.\n\n## Syntax\n\n```js\nrespondWith(response)\n```\n\n### Parameters\n\n- `response`\n  - : A [`Response`](../../Response/Response.mdx) or a [`Promise`](../../Promise/Promise.mdx) that resolves to a\n    [`Response`](../../Response/Response.mdx). Otherwise, a network error is returned to Fetch.\n\n### Return value\n\nAlways returns `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/FetchEvent/prototype/sendEarlyHints.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent.sendEarlyHints()\n\nThe **`sendEarlyHints()`** method allows you to send a [103 Early Hints](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/103) response back to the client which made the incoming request to your application.\n\n## Syntax\n\n```js\nsendEarlyHints(headers)\n```\n\n### Parameters\n\n- `headers`\n  - : Any headers you want to add to your response, contained\n        within a [`Headers`](../../Headers/Headers.mdx) object or object literal of\n        [`String`](../../String/String.mdx) key/value pairs.\n\n### Return value\n\nAlways returns `undefined`.\n\n### Examples\n\n```js\nevent.sendEarlyHints({ link: '</style.css>; rel=preload; as=style' });\n\nevent.sendEarlyHints([\n        ['link', '</style.css>; rel=preload; as=style'],\n        ['link', '</style2.css>; rel=preload; as=style']\n    ]);\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/FetchEvent/prototype/waitUntil.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FetchEvent.waitUntil()\n\n\nThe **`waitUntil()`** method tells the host environment that work is ongoing until the promise settles, and it shouldn't terminate\nthe application if it wants that work to complete.\n\nThe `waitUntil()` method must be initially called synchronously within the event callback,\nbut after that it can be called multiple times, and will hold the process open until all the promises passed to it\nsettle.\n\n## Syntax\n\n```js\nwaitUntil(promise)\n```\n\n### Parameters\n\nA [`Promise`](../../Promise/Promise.mdx).\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/FinalizationRegistry/FinalizationRegistry.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FinalizationRegistry()\n\nThe **`FinalizationRegistry`** constructor creates a `FinalizationRegistry` object that uses the given callback.\n\n## Syntax\n\n```js\n// Arrow callback function\nnew FinalizationRegistry((heldValue) => { /* … */ })\n\n// Callback function\nnew FinalizationRegistry(callbackFn)\n\n// Inline callback function\nnew FinalizationRegistry(function(heldValue) { /* … */ })\n```\n\n> **Note:** `FinalizationRegistry()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `callback`\n  - : The callback function this registry should use.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/FinalizationRegistry/prototype/register.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FinalizationRegistry.prototype.register()\n\nThe `register()` method registers an object with a\n`FinalizationRegistry` instance so that if the object is garbage-collected,\nthe registry's callback may get called.\n\n## Syntax\n\n```js\nregister(target, heldValue)\nregister(target, heldValue, unregisterToken)\n```\n\n### Parameters\n\n- `target`\n  - : The target object to register.\n- `heldValue`\n  - : The value to pass to the finalizer for this object. This cannot be the `target` object but can be anything else, including functions and primitives.\n- `unregisterToken` _**optional**_\n  - : A token that may be used with the `unregister` method later to unregister\n    the target object. If provided (and not `undefined`), this must be an\n    object. If not provided, the target cannot be unregistered.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown when one of the following condition is met:\n    - `target` is not an object (object as opposed to primitives; functions are objects as well)\n    - `target` is the same as `heldvalue` (`target === heldValue`)\n    - `unregisterToken` is not an object\n\n## Description\n\nSee the [Avoid where possible](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry#avoid_where_possible)\nand [Notes on cleanup callbacks](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry#notes_on_cleanup_callbacks)\nsections of the `FinalizationRegistry` page for important caveats.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/FinalizationRegistry/prototype/unregister.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FinalizationRegistry.prototype.unregister()\n\nThe `unregister()` method unregisters a target object from a\n`FinalizationRegistry` instance.\n\n## Syntax\n\n```js\nunregister(unregisterToken)\n```\n\n### Parameters\n\n- `unregisterToken`\n  - : The token used with the [`FinalizationRegistry.prototype.register`](./register.mdx) method when registering the target object. Multiple cells registered with the same `unregisterToken` will be unregistered together.\n\n### Return value\n\nA boolean value that is `true` if at least one cell was unregistered and `false` if no cell was unregistered.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown when `unregisterToken` is not an object.\n\n## Description\n\nWhen a target object has been reclaimed, it is no longer registered in the registry.\nThere is no need to call `unregister` in your cleanup callback. Only call\n`unregister` if you haven't received a cleanup callback and no longer need\nto receive one.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Float32Array/Float32Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Float32Array()\n\nThe **`Float32Array()`** typed array constructor creates a new\n`Float32Array` object, which is, an array of 32-bit floating point numbers\n(corresponding to the C `float` data type) in the platform byte order. If\ncontrol over byte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are\ninitialized to `0`. Once established, you can reference elements in the array\nusing the object's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Float32Array()\nnew Float32Array(length)\nnew Float32Array(typedArray)\nnew Float32Array(object)\n\nnew Float32Array(buffer)\nnew Float32Array(buffer, byteOffset)\nnew Float32Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Float32Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Float64Array/Float64Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Float64Array()\n\nThe **`Float64Array()`** typed array constructor creates a new\n`Float64Array` object, which is, an array of 64-bit floating point numbers\n(corresponding to the C `double` data type) in the platform byte order. If\ncontrol over byte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are\ninitialized to `0`. Once established, you can reference elements in the array\nusing the object's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Float64Array()\nnew Float64Array(length)\nnew Float64Array(typedArray)\nnew Float64Array(object)\n\nnew Float64Array(buffer)\nnew Float64Array(buffer, byteOffset)\nnew Float64Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Float64Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/FormData/FormData.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData()\n\nThe **`FormData()`** constructor creates a new `FormData` object.\n\n## Syntax\n\n```js\nnew FormData()\nnew FormData(form)\n```\n\n> **Note:** `FormData()` can only be constructed with `new`. Attempting to call it without `new` throws a `TypeError`.\n\n### Parameters\n\n- `form` _**optional**_\n  - : An HTML `<form>` element — when specified, the `FormData` object will be populated with the form's current key/value pairs using the name property of each element for the keys and their submitted value for the values. File input elements are handled specially: their values are taken from the files selected by the user in the upload control.\n\n### Return value\n\nA new `FormData` object, pre-populated with form data if the optional `form` parameter was provided.\n\n## Description\n\nThe `FormData` interface provides a way to construct a set of key/value pairs representing form fields and their values, which can be sent using methods such as `fetch()`. It uses the same format a form would use if the encoding type were set to `\"multipart/form-data\"`.\n\nYou can also append additional data to the `FormData` object after it's created using its various methods.\n\nA `FormData` object can be used in a number of ways with other APIs:\n\n1. It can be sent with the `fetch()` API\n2. It works seamlessly with the `Request` and `Response` objects - it can be used directly as the body of a `Request` object\n3. It can be obtained from a `Response` object using the `formData()` method\n4. It can be passed directly to the `URLSearchParams` constructor\n\nThe transmitted data is in the same format that the form's `submit()` method would use to send the data if the form's encoding type were set to `\"multipart/form-data\"`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/FormData/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.append()\n\nThe **`append()`** method of the `FormData` interface appends a new value onto an existing key inside a `FormData` object, or adds the key if it does not already exist.\n\n## Syntax\n\n```js\nappend(name, value)\nappend(name, value, filename)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the field whose data is contained in `value`.\n- `value`\n  - : The value of the field. This can be a string or a `Blob` (including subclasses such as `File`). If none of these, the value is converted to a string.\n- `filename` _**optional**_\n  - : The filename reported to the server when a `Blob` or `File` is passed as the second parameter. The default filename for `Blob` objects is \"blob\". The default filename for `File` objects is the file's filename.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/FormData/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.delete()\n\nThe **`delete()`** method of the `FormData` interface removes all key/value pairs with the given name from the `FormData` object.\n\n## Syntax\n\n```js\ndelete(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the key you want to delete.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/FormData/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.entries()\n\nThe **`entries()`** method of the `FormData` interface returns an iterator allowing iteration through all key/value pairs contained in this object. The iterator yields a new array for each key/value pair, with the first element being the key and the second element being the value.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nAn `iterator`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/FormData/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.forEach()\n\nThe **`forEach()`** method of the `FormData` interface executes the provided callback function once for each key/value pair in the `FormData` object.\n\n## Syntax\n\n```js\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n  - : A function to execute for each entry in the object. The function will be passed the following arguments:\n    - `value`\n      - : The value of the current entry.\n    - `key`\n      - : The key of the current entry.\n    - `formData`\n      - : The `FormData` object being traversed.\n- `thisArg` _**optional**_\n  - : A value to use as `this` when executing `callbackFn`.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/FormData/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.get()\n\nThe **`get()`** method of the `FormData` interface returns the first value associated with a given key from within a `FormData` object. If you expect multiple values and want all of them, use the [`getAll()`](../../../globals/FormData/prototype/getAll.mdx) method instead.\n\n## Syntax\n\n```js\nget(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the key you want to retrieve.\n\n### Return value\n\nA `FormDataEntryValue` containing the value. If the key does not exist, it returns `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/FormData/prototype/getAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.getAll()\n\nThe **`getAll()`** method of the `FormData` interface returns all the values associated with a given key from within a `FormData` object.\n\n## Syntax\n\n```js\ngetAll(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the key you want to retrieve.\n\n### Return value\n\nAn array of `FormDataEntryValue` items containing all values with the given key. If the key doesn't exist, an empty array is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/FormData/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.has()\n\nThe **`has()`** method of the `FormData` interface returns a boolean indicating whether a `FormData` object contains a key/value pair with the given name.\n\n## Syntax\n\n```js\nhas(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the key you want to test for existence.\n\n### Return value\n\n`true` if a key/value pair with the specified name exists; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/FormData/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.keys()\n\nThe **`keys()`** method of the `FormData` interface returns an iterator allowing iteration through all keys contained in this object. The iterator yields the key for each value.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nAn `iterator`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/FormData/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.set()\n\nThe **`set()`** method of the `FormData` interface sets a new value for an existing key inside a `FormData` object, or adds the key/value if it does not already exist.\n\nThe difference between `set()` and [`append()`](../../../globals/FormData/prototype/append.mdx) is that if the specified key already exists, `set()` overwrites all existing values with the new one, whereas `append()` appends the new value onto the end of the existing values.\n\n## Syntax\n\n```js\nset(name, value)\nset(name, value, filename)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the field whose data is contained in `value`.\n- `value`\n  - : The value of the field. This can be a string or a `Blob` (including subclasses such as `File`). If none of these, the value is converted to a string.\n- `filename` _**optional**_\n  - : The filename reported to the server when a `Blob` or `File` is passed as the second parameter. The default filename for `Blob` objects is \"blob\". The default filename for `File` objects is the file's filename.\n\n### Return value\n\n`undefined`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/FormData/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# FormData.values()\n\nThe **`values()`** method of the `FormData` interface returns an iterator allowing iteration through all values contained in this object. The iterator yields the value for each key/value pair.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nAn `iterator`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Function/Function.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function()\n\nThe **`Function()`** constructor creates a new [`Function`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function) object. Calling the constructor directly can create functions dynamically, but suffers from security and similar (but far less significant) performance issues as `eval()`. However, unlike `eval` (which may have access to the local scope), the `Function` constructor creates functions which execute in the global scope only.\n\n\n\n## Syntax\n\n```js\nnew Function(functionBody)\nnew Function(arg0, functionBody)\nnew Function(arg0, arg1, functionBody)\nnew Function(arg0, arg1, /* … ,*/ argN, functionBody)\n\nFunction(functionBody)\nFunction(arg0, functionBody)\nFunction(arg0, arg1, functionBody)\nFunction(arg0, arg1, /* … ,*/ argN, functionBody)\n```\n\n> **Note:** `Function()` can be called with or without `new`. Both create a new `Function` instance.\n\n### Parameters\n\n- `argN` _**optional**_\n\n  - : Names to be used by the function as formal argument names. Each must be a string that corresponds to a valid JavaScript parameter (any of plain [identifier](https://developer.mozilla.org/docs/Glossary/Identifier), [rest parameter](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/rest_parameters), or [destructured](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment) parameter, optionally with a [default](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/Default_parameters)), or a list of such strings separated with commas.\n\n    As the parameters are parsed in the same way as function expressions, whitespace and comments are accepted. For example: `\"x\", \"theValue = 42\", \"[a, b] /* numbers */\"` — or `\"x, theValue = 42, [a, b] /* numbers */\"`. (`\"x, theValue = 42\", \"[a, b]\"` is also correct, though very confusing to read.)\n\n- `functionBody`\n  - : A string containing the JavaScript statements comprising the function definition.\n\n## Description\n\n`Function` objects created with the `Function` constructor are parsed when the function is created. This is less efficient than creating a function with a [function expression](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/function) or [function declaration](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function) and calling it within your code, because such functions are parsed with the rest of the code.\n\nAll arguments passed to the function, except the last, are treated as the names of the identifiers of the parameters in the function to be created, in the order in which they are passed. The function will be dynamically compiled as a function expression, with the source assembled in the following fashion:\n\n```js\n`function anonymous(${args.join(\",\")}\n) {\n${functionBody}\n}`\n```\n\nThis is observable by calling the function's [`toString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/toString) method.\n\nHowever, unlike normal [function expressions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/function), the name `anonymous` is not added to the `functionBody`'s scope, since `functionBody` only has access the global scope. If `functionBody` is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode) (the body itself needs to have the `\"use strict\"` directive since it doesn't inherit the strictness from the context), you may use [`arguments.callee`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/arguments/callee) to refer to the function itself. Alternatively, you can define the recursive part as an inner function:\n\n```js\nconst recursiveFn = new Function(\"count\", `\n(function recursiveFn(count) {\n  if (count < 0) {\n    return;\n  }\n  console.log(count);\n  recursiveFn(count - 1);\n})(count);\n`);\n```\n\nNote that the two dynamic parts of the assembled source — the parameters list `args.join(\",\")` and `functionBody` — will first be parsed separately to ensure they are each syntactically valid. This prevents injection-like attempts.\n\n```js\nnew Function(\"/*\", \"*/) {\");\n// SyntaxError: Unexpected end of arg string\n// Doesn't become \"function anonymous(/*) {*/) {}\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Function/prototype/apply.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.apply()\n\nThe **`apply()`** method calls the specified function with a given `this` value, and `arguments` provided as an array (or an [array-like object](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects)).\n\n\n\n## Syntax\n\n```js\napply(thisArg)\napply(thisArg, argsArray)\n```\n\n### Parameters\n\n- `thisArg`\n  - : The value of `this` provided for the call to `func`. If the function is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) will be replaced with the global object, and primitive values will be converted to objects.\n- `argsArray` _**optional**_\n  - : An array-like object, specifying the arguments with which `func` should be called, or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../../globals/undefined.mdx) if no arguments should be provided to the function.\n\n### Return value\n\nThe result of calling the function with the specified `this` value and arguments.\n\n## Description\n\n> **Note:** This function is almost identical to [`Function.prototype.call()`](../../../globals/Function/prototype/call.mdx), except that `call()` accepts an **argument list**, while `apply()` accepts a **single array of arguments** — for example, `func.apply(this, ['eat', 'bananas'])` vs. `func.call(this, 'eat', 'bananas')`.\n\nNormally, when calling a function, the value of [`this`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this) inside the function is the object that the function was accessed on. With `apply()`, you can assign an arbitrary value as `this` when calling an existing function, without first attaching the function to the object as a property. This allows you to use methods of one object as generic utility functions.\n\n> **Warning:** Do not use `apply()` to chain constructors (for example, to implement inheritance). This invokes the constructor function as a plain function, which means [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target) is `undefined`, and classes throw an error because they can't be called without `new`. Use [`Reflect.construct()`](../../../globals/Reflect/construct.mdx) or [`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Function/prototype/bind.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.bind()\n\nThe **`bind()`** method creates a new function that, when called, has its `this` keyword set to the provided value, with a given sequence of arguments preceding any provided when the new function is called.\n\n\n\n## Syntax\n\n```js\nbind(thisArg)\nbind(thisArg, arg1)\nbind(thisArg, arg1, arg2)\nbind(thisArg, arg1, arg2, /* …, */ argN)\n```\n\n### Parameters\n\n- `thisArg`\n  - : The value to be passed as the `this` parameter to the target function `func` when the bound function is called. If the function is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) will be replaced with the global object, and primitive values will be converted to objects. The value is ignored if the bound function is constructed using the `new` operator.\n- `arg1, …, argN` _**optional**_\n  - : Arguments to prepend to arguments provided to the bound function when invoking `func`.\n\n### Return value\n\nA copy of the given function with the specified `this` value, and initial arguments (if provided).\n\n## Description\n\nThe `bind()` function creates a new _bound function_. Calling the bound function generally results in the execution of the function it wraps, which is also called the _target function_. The bound function will store the parameters passed — which include the value of `this` and the first few arguments — as its internal state. These values are stored in advance, instead of being passed at call time. You can generally see `const boundFn = fn.bind(thisArg, arg1, arg2)` as being equivalent to `const boundFn = (...restArgs) => fn.call(thisArg, arg1, arg2, ...restArgs)` for the effect when it's called (but not when `boundFn` is constructed).\n\nA bound function can be further bound by calling `boundFn.bind(thisArg, /* more args */)`, which creates another bound function `boundFn2`. The newly bound `thisArg` value is ignored, because the target function of `boundFn2`, which is `boundFn`, already has a bound `this`. When `boundFn2` is called, it would call `boundFn`, which in turn calls `fn`. The arguments that `fn` ultimately receives are, in order: the arguments bound by `boundFn`, arguments bound by `boundFn2`, and the arguments received by `boundFn2`.\n\n```js\n\"use strict\"; // prevent `this` from being boxed into the wrapper object\n\nfunction log(...args) {\n  console.log(this, ...args);\n}\nconst boundLog = log.bind(\"this value\", 1, 2);\nconst boundLog2 = boundLog.bind(\"new this value\", 3, 4);\nboundLog2(5, 6); // \"this value\", 1, 2, 3, 4, 5, 6\n```\n\nA bound function may also be constructed using the `new` operator if its target function is constructable. Doing so acts as though the target function had instead been constructed. The prepended arguments are provided to the target function as usual, while the provided `this` value is ignored (because construction prepares its own `this`, as seen by the parameters of [`Reflect.construct`](../../../globals/Reflect/construct.mdx)). If the bound function is directly constructed, [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target) will be the target function instead. (That is, the bound function is transparent to `new.target`.)\n\n```js\nclass Base {\n  constructor(...args) {\n    console.log(new.target === Base);\n    console.log(args);\n  }\n}\n\nconst BoundBase = Base.bind(null, 1, 2);\n\nnew BoundBase(3, 4); // true, [1, 2, 3, 4]\n```\n\nHowever, because a bound function does not have the [`prototype`](../../../globals/Function/prototype/) property, it cannot be used as a base class for [`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends).\n\n```js example-bad\nclass Derived extends class {}.bind(null) {}\n// TypeError: Class extends value does not have valid prototype property undefined\n```\n\nWhen using a bound function as the right-hand side of [`instanceof`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/instanceof), `instanceof` would reach for the target function (which is stored internally in the bound function) and read its `prototype` instead.\n\n```js\nclass Base {}\nconst BoundBase = Base.bind(null, 1, 2);\nconsole.log(new Base() instanceof BoundBase); // true\n```\n\nThe bound function has the following properties:\n\n- [`length`](../../../globals/Function/prototype/length.mdx)\n  - : The `length` of the target function minus the number of arguments being bound (not counting the `thisArg` parameter), with 0 being the minimum value.\n- [`name`](../../../globals/Function/prototype/name.mdx)\n  - : The `name` of the target function plus a `\"bound \"` prefix.\n\nThe bound function also inherits the [prototype chain](https://developer.mozilla.org/docs/Web/JavaScript/Inheritance_and_the_prototype_chain) of the target function. However, it doesn't have other own properties of the target function (such as [static properties](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/static) if the target function is a class).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Function/prototype/call.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.call()\n\nThe **`call()`** method calls the function with a given `this` value and arguments provided individually.\n\n## Syntax\n\n```js\ncall(thisArg)\ncall(thisArg, arg1)\ncall(thisArg, arg1, /* …, */ argN)\n```\n\n### Parameters\n\n- `thisArg`\n  - : The value to use as `this` when calling `func`. If the function is not in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) will be replaced with the global object, and primitive values will be converted to objects.\n- `arg1, …, argN` _**optional**_\n  - : Arguments for the function.\n\n### Return value\n\nThe result of calling the function with the specified `this` value and arguments.\n\n## Description\n\n> **Note:** This function is almost identical to [`Function.prototype.apply()`](../../../globals/Function/prototype/apply.mdx), except that `call()` accepts an **argument list**, while `apply()` accepts a **single array of arguments** — for example, `func.apply(this, ['eat', 'bananas'])` vs. `func.call(this, 'eat', 'bananas')`.\n\nNormally, when calling a function, the value of [`this`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this) inside the function is the object that the function was accessed on. With `call()`, you can assign an arbitrary value as `this` when calling an existing function, without first attaching the function to the object as a property. This allows you to use methods of one object as generic utility functions.\n\n> **Warning:** Do not use `call()` to chain constructors (for example, to implement inheritance). This invokes the constructor function as a plain function, which means [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target) is `undefined`, and classes throw an error because they can't be called without `new`. Use [`Reflect.construct()`](../../../globals/Reflect/construct.mdx) or [`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Function/prototype/index.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.prototype\n\nThe **`prototype`** data property of a `Function` instance is used when the function is used as a constructor with the `new` operator. It will become the new object's prototype.\n\n> **Note:** Not all `Function` objects have the `prototype` property — see [description](#description).\n\n## Value\n\nAn object.\n\n> **Note:** The `prototype` property of [classes](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes) is not writable.\n\n## Description\n\nWhen a function is called with `new`, the constructor's `prototype` property will become the resulting object's prototype.\n\n```js\nfunction Ctor() {}\nconst inst = new Ctor();\nconsole.log(Object.getPrototypeOf(inst) === Ctor.prototype); // true\n```\n\nYou can read [Inheritance and the prototype chain](https://developer.mozilla.org/docs/Web/JavaScript/Inheritance_and_the_prototype_chain#constructors) for more information about the interactions between a constructor function's `prototype` property and the resulting object's prototype.\n\nA function having a `prototype` property is not sufficient for it to be eligible as a constructor. [Generator functions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function*) have a `prototype` property, but cannot be called with `new`:\n\n```js\nasync function* asyncGeneratorFunction() {}\nfunction* generatorFunction() {}\n```\n\nInstead, generator functions' `prototype` property is used when they are called _without_ `new`. The `prototype` property will become the returned [`Generator`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Generator) object's prototype.\n\nIn addition, some functions may have a `prototype` but throw unconditionally when called with `new`. For example, the [`Symbol()`](../../../globals/Symbol/Symbol.mdx) and [`BigInt`](../../../globals/BigInt/BigInt.mdx) functions throw when called with `new`, because `Symbol.prototype` and `BigInt.prototype` are only intended to provide methods for the primitive values, but the wrapper objects should not be directly constructed.\n\nThe following functions do not have `prototype`, and are therefore ineligible as constructors, even if a `prototype` property is later manually assigned:\n\n```js\nconst method = { foo() {} }.foo;\nconst arrowFunction = () => {};\nasync function asyncFunction() {}\n```\n\nThe following are valid constructors that have `prototype`:\n\n```js\nclass Class {}\nfunction fn() {}\n```\n\nA [bound function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/bind) does not have a `prototype` property, but may be constructable. When it's constructed, the target function is constructed instead, and if the target function is constructable, it would return a normal instance.\n\n```js\nconst boundFunction = function () {}.bind(null);\n```\n\nA function's `prototype` property, by default, is a plain object with one property: (`constructor`)[../../../globals/Object/prototype/constructor.mdx), which is a reference to the function itself. The `constructor` property is writable, non-enumerable, and configurable.\n\nIf the `prototype` of a function is reassigned with something other than an `Object`, when the function is called with `new`, the returned object's prototype would be `Object.prototype` instead. (In other words, `new` ignores the `prototype` property and constructs a plain object.)\n\n```js\nfunction Ctor() {}\nCtor.prototype = 3;\nconsole.log(Object.getPrototypeOf(new Ctor()) === Object.prototype); // true\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Function/prototype/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.length\n\nThe **`length`** data property of a `Function` instance indicates the number of parameters expected by the function.\n\n## Value\n\nA number.\n\n## Description\n\nA `Function` object's `length` property indicates how many arguments the function expects, i.e. the number of formal parameters. \n\nThe `Function` constructor is itself a `Function` object. Its `length` data property has a value of `1`.\n\nDue to historical reasons, `Function.prototype` is a callable itself. The `length` property of `Function.prototype` has a value of `0`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Function/prototype/name.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.name\n\nThe **`name`** property of a `Function` instance indicates the function's name as specified when it was created, or it may be either `anonymous` or `''` (an empty string) for functions created anonymously.\n\n## Value\n\nA string.\n\n> **Note:** In non-standard, pre-ES2015 implementations the `configurable` attribute was `false` as well.\n\n## Description\n\nThe function's `name` property can be used to identify the function in debugging tools or error messages. It has no semantic significance to the language itself.\n\nThe `name` property is read-only and cannot be changed by the assignment operator:\n\n```js\nfunction someFunction() {}\n\nsomeFunction.name = 'otherFunction';\nconsole.log(someFunction.name); // someFunction\n```\n\nTo change it, use [`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx).\n\nThe `name` property is typically inferred from how the function is defined. In the following sections, we will describe the various ways in which it can be inferred.\n\n### Function declaration\n\nThe `name` property returns the name of a function declaration.\n\n```js\nfunction doSomething() {}\ndoSomething.name; // \"doSomething\"\n```\n\n### Default-exported function declaration\n\nAn [`export default`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/export) declaration exports the function as a declaration instead of an expression. If the declaration is anonymous, the name is `\"default\"`.\n\n```js\n// -- someModule.js --\nexport default function () {};\n\n// -- main.js --\nimport someModule from \"./someModule.js\";\n\nsomeModule.name; // \"default\"\n```\n\n### Function constructor\n\nFunctions created with the [`Function()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/Function) constructor have name \"anonymous\".\n\n```js\nnew Function().name; // \"anonymous\"\n```\n\n### Function expression\n\nIf the function expression is named, that name is used as the `name` property.\n\n```js\nconst someFunction = function someFunctionName() {};\nsomeFunction.name; // \"someFunctionName\"\n```\n\nAnonymous function expressions created using the keyword `function` or arrow functions would have `\"\"` (an empty string) as their name.\n\n```js\n(function () {}).name; // \"\"\n(() => {}).name; // \"\"\n```\n\nHowever, such cases are rare — usually, in order to refer to the expression elsewhere, the function expression is attached to an identifier when it's created (such as in a variable declaration). In such cases, the name can be inferred, as the following few subsections demonstrate.\n\nOne practical case where the name cannot be inferred is a function returned from another function:\n\n```js\nfunction getFoo() {\n  return () => {};\n}\ngetFoo().name; // \"\"\n```\n\n### Variable declaration and method\n\nVariables and methods can infer the name of an anonymous function from its syntactic position.\n\n```js\nconst f = function () {};\nconst object = {\n  someMethod: function () {}\n};\n\nconsole.log(f.name); // \"f\"\nconsole.log(object.someMethod.name); // \"someMethod\"\n```\n\nThe same applies to assignment:\n\n```js\nlet f;\nf = () => {};\nf.name; // \"f\"\n```\n\n### Initializer and default value\n\nFunctions in initializers (default values) of [destructuring](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#default_value), [default parameters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/Default_parameters), [class fields](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/Public_class_fields), etc., will inherit the name of the bound identifier as their `name`.\n\n```js\nconst [f = () => {}] = [];\nf.name; // \"f\"\n\nconst { someMethod: m = () => {} } = {};\nm.name; // \"m\"\n\nfunction foo(f = () => {}) {\n  console.log(f.name);\n}\nfoo(); // \"f\"\n\nclass Foo {\n  static someMethod = () => {};\n}\nFoo.someMethod.name; // someMethod\n```\n\n### Shorthand method\n\n```js\nconst o = {\n  foo() {},\n};\no.foo.name; // \"foo\";\n```\n\n### Bound function\n\n[`Function.prototype.bind()`](../../../globals/Function/prototype/bind.mdx) produces a function whose name is \"bound \" plus the function name.\n\n```js\nfunction foo() {};\nfoo.bind({}).name; // \"bound foo\"\n```\n\n### Getter and setter\n\nWhen using [`get`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/get) and [`set`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/set) accessor properties, \"get\" or \"set\" will appear in the function name.\n\n```js\nconst o = {\n  get foo() {},\n  set foo(x) {},\n};\n\nconst descriptor = Object.getOwnPropertyDescriptor(o, \"foo\");\ndescriptor.get.name; // \"get foo\"\ndescriptor.set.name; // \"set foo\";\n```\n\n### Class\n\nA class's name follows the same algorithm as function declarations and expressions.\n\n```js\nclass Foo {}\nFoo.name; // \"Foo\"\n```\n\n> **Warning:** JavaScript will set the function's `name` property only if a function does not have an own property called `name`. However, classes' [static members](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/static) will be set as own properties of the class constructor function, and thus prevent the built-in `name` from being applied. See [telling the constructor name of an object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name#telling_the_constructor_name_of_an_object) for more details.\n\n### Symbol as function name\n\nIf a `Symbol` is used a function name and the symbol has a description, the method's name is the description in square brackets.\n\n```js\nconst sym1 = Symbol(\"foo\");\nconst sym2 = Symbol();\n\nconst o = {\n  [sym1]() {},\n  [sym2]() {},\n};\n\no[sym1].name; // \"[foo]\"\no[sym2].name; // \"[]\"\n```\n\n### Private property\n\nPrivate fields and private methods have the hash (`#`) as part of their names.\n\n```js\nclass Foo {\n  #field = () => {};\n  #method() {}\n  getNames() {\n    console.log(this.#field.name);\n    console.log(this.#method.name);\n  }\n}\n\nnew Foo().getNames();\n// \"#field\"\n// \"#method\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Function/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Function.prototype.toString()\n\nThe **`toString()`** method returns a string representing the source code of the specified `Function`.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the source code of the function.\n\n## Description\n\nThe `Function` object overrides the `toString()` method\ninherited from `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For user-defined `Function`\nobjects, the `toString` method returns a string containing the source text\nsegment which was used to define the function.\n\nJavaScript calls the `toString` method automatically when a\n`Function` is to be represented as a text value, e.g. when a function is\nconcatenated with a string.\n\nThe `toString()` method will throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) exception\n(\"Function.prototype.toString called on incompatible object\"), if its\n`this` value object is not a `Function` object.\n\n```js example-bad\nFunction.prototype.toString.call('foo'); // throws TypeError\n```\n\nIf the `toString()` method is called on built-in function objects, a\nfunction created by [`Function.prototype.bind()`](../../../globals/Function/prototype/bind.mdx), or\nother non-JavaScript functions, then `toString()` returns a\n_native function string_ which looks like\n\n```js\n\"function someName() { [native code] }\"\n```\n\nFor intrinsic object methods and functions, `someName` is the initial name of the function; otherwise its content may be implementation-defined, but will always be in property name syntax, like `[1 + 1]`, `someName`, or `1`.\n\n> **Note:** This means using [`eval()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/eval) on native function strings is a guaranteed syntax error.\n\nIf the `toString()` method is called on a function created by the `Function` constructor, `toString()` returns the source code of a synthesized function declaration named \"anonymous\" using the provided parameters and function body. For example, `Function(\"a\", \"b\", \"return a + b\").toString()` will return:\n\n```js\n\"function anonymous(a,b\\n) {\\nreturn a + b\\n}\"\n```\n\nSince ES2018, the spec requires the return value of `toString()` to be the exact same source code as it was declared, including any whitespace and/or comments — or, if the host doesn't have the source code available for some reason, requires returning a native function string. Support for this revised behavior can be found in the [browser compatibility table](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/toString#browser_compatibility).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Headers/Headers.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers()\n\nThe **`Headers()`** constructor creates a new `Headers` object.\n\n## Syntax\n\n```js\nnew Headers()\nnew Headers(init)\n```\n\n### Parameters\n\n- `init` _**optional**_\n  - : An object containing any HTTP headers that you want to pre-populate your `Headers` object with. This can be a\n    simple object literal with `String` values, an array of name-value pairs, where each pair is a 2-element string array; or an existing\n    `Headers` object. In the last case, the new `Headers` object\n    copies its data from the existing `Headers` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Headers/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.append()\n\nThe **`append()`** method of the `Headers`\ninterface appends a new value onto an existing header inside a `Headers`\nobject, or adds the header if it does not already exist.\n\nThe difference between `Headers.prototype.set()` and `append()` is\nthat if the specified header already exists and accepts multiple values,\n`set()` will overwrite the existing value with the new one, whereas\n`append()` will append the new value onto the end of the set of values.\n\n## Syntax\n\n```js\nappend(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to add to the `Headers` object.\n- `value`\n  - : The value of the HTTP header you want to add.\n\n### Return value\n\nNone (`undefined`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Headers/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.delete()\n\nThe **`delete()`** method of the `Headers`\ninterface deletes a header from the current `Headers` object.\n\nThis method throws a `TypeError` for the following reasons:\n\n- The value of the name parameter is not the name of an HTTP header.\n\n## Syntax\n\n```js\ndelete(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to delete from the `Headers` object.\n\n### Return value\n\nNone (`undefined`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Headers/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.entries()\n\nThe **`Headers.entries()`** method returns an iterator allowing to go through all key/value pairs\ncontained in this object. The both the key and value of each pairs are `String` objects.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Headers/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.forEach()\n\nThe **`Headers.forEach()`** method executes a callback function once per each key/value pair in the `Headers` object.\n\n## Syntax\n\n```js\n// Arrow function\nforEach((value, key) => { /* … */ })\nforEach((value, key, object) => { /* … */ })\n\n// Inline callback function\nforEach(function (value, key) { /* … */ })\nforEach(function (value, key, object) { /* … */ })\nforEach(function (value, key) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n  - : Function to execute for each entry in the map. It takes the following arguments:\n    - `value`\n      - : Value of the currently visited header entry.\n    - `key`\n      - : Name of the currently visited header entry.\n    - `object`\n      - : The Headers object being iterated.\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `callback`.\n\n### Return value\n\n`undefined`.\n\n## Description\n\nThe `Headers.forEach()` method executes the provided callback once for each key of the Headers which actually exist. It is not invoked for keys which have been deleted. However, it is executed for keys which are present but have the value undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Headers/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.get()\n\nThe **`get()`** method of the [`Headers`](../../../globals/Headers/Headers.mdx) interface\nreturns a byte string of all the values of a header within a `Headers` object\nwith a given name. If the requested header doesn't exist in the `Headers`\nobject, it returns `null`.\n\n## Syntax\n\n```js\nget(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header whose values you want to retrieve from the\n    `Headers` object. If the given name doesn't match the\n    [field-name](https://httpwg.org/specs/rfc9110.html#fields.names) production\n    in the HTTP specification, this method throws a\n    [`TypeError`](../../../globals/TypeError/TypeError.mdx). The name is case-insensitive.\n\n### Return value\n\nA [`String`](../../../globals/String/String.mdx) sequence representing the values of the retrieved header or\n`null` if this header is not set.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Headers/prototype/getSetCookie.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.getSetCookie()\n\nThe **`getSetCookie()`** method of the [`Headers`](../../../globals/Headers/Headers.mdx) interface\nreturns an array of all the values of the `Set-Cookie` headers, returning\nan empty list if none are present.\n\n## Syntax\n\n```js\ngetSetCookie()\n```\n\n### Return value\n\n`String[]` representing the list of `Set-Cookie` headers.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Headers/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.has()\n\nThe **`has()`** method of the `Headers` interface\nreturns a boolean stating whether a `Headers` object contains a certain\nheader.\n\n## Syntax\n\n```js\nhas(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to test for. If the given name is not a valid\n    HTTP header name, this method throws a `TypeError`.\n\n### Return value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Headers/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.keys()\n\nThe **`Headers.keys()`** method returns an iterator allowing to go through all keys contained\nin this object. The keys are `String` objects.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Headers/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.set()\n\nThe **`set()`** method of the `Headers` interface\nsets a new value for an existing header inside a `Headers` object, or adds\nthe header if it does not already exist.\n\nThe difference between `set()` and `Headers.append` is that if\nthe specified header already exists and accepts multiple values, `set()`\noverwrites the existing value with the new one, whereas `Headers.append`\nappends the new value to the end of the set of values.\n\n## Syntax\n\n```js\nset(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the HTTP header you want to set to a new value. If the given name is not\n    the name of an HTTP header, this method throws a `TypeError`.\n- `value`\n  - : The new value you want to set.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Headers/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Headers.values()\n\nThe **`Headers.values()`** method returns an iterator allowing to go through all values contained\nin this object. The values are `String` objects.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/HmacImportParams/HmacImportParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# HmacImportParams\n\nThe **`HmacImportParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.importKey`, when generating a key for the `HMAC` algorithm.\n\n## Instance properties\n\n- `name`\n  - : A string. This should be set to `HMAC`.\n- `hash`\n\n  - : A string representing the name of the digest function to use. The can take a value of `SHA-1`, `SHA-256`, `SHA-384`, or `SHA-512`.\n\n- `length` _optional_\n  - : A `Number` representing the length in bits of the key. If this is omitted the length of the key is equal to the length of the digest generated by the digest function you have chosen. Unless you have a good reason to use a different length, omit this property and use the default.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Infinity.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Infinity\n\nThe global property **`Infinity`** is a numeric value representing infinity.\n\n## Value\n\nThe same number value as `Number.POSITIVE_INFINITY`.\n\n## Description\n\n`Infinity` is a property of the _global object_. In other words, it is a variable in global scope.\n\nThe value `Infinity` (positive infinity) is greater than any other number.\n\nThis value behaves slightly differently than mathematical infinity; see `Number.POSITIVE_INFINITY` for details.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Int16Array/Int16Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Int16Array()\n\nThe **`Int16Array()`** typed array constructor creates an array\nof twos-complement 16-bit signed integers in the platform byte order. If control over\nbyte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are initialized\nto `0`. Once established, you can reference elements in the array using the\nobject's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Int16Array()\nnew Int16Array(length)\nnew Int16Array(typedArray)\nnew Int16Array(object)\n\nnew Int16Array(buffer)\nnew Int16Array(buffer, byteOffset)\nnew Int16Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Int16Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Int32Array/Int32Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Int32Array()\n\nThe **`Int32Array()`** typed array constructor creates an array\nof twos-complement 32-bit signed integers in the platform byte order. If control over\nbyte order is needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are initialized\nto `0`. Once established, you can reference elements in the array using the\nobject's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Int32Array()\nnew Int32Array(length)\nnew Int32Array(typedArray)\nnew Int32Array(object)\n\nnew Int32Array(buffer)\nnew Int32Array(buffer, byteOffset)\nnew Int32Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Int32Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Int8Array/Int8Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Int8Array()\n\nThe **`Int8Array()`** constructor creates a typed array of\ntwos-complement 8-bit signed integers. The contents are initialized to `0`.\nOnce established, you can reference elements in the array using the object's methods, or\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew Int8Array()\nnew Int8Array(length)\nnew Int8Array(typedArray)\nnew Int8Array(object)\n\nnew Int8Array(buffer)\nnew Int8Array(buffer, byteOffset)\nnew Int8Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Int8Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/JSON/parse.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# JSON.parse()\n\nThe **`JSON.parse()`** method parses a JSON string, constructing the JavaScript value or object described by the string. An optional _reviver_ function can be provided to perform a transformation on the resulting object before it is returned.\n\n## Syntax\n\n```js\nJSON.parse(text)\nJSON.parse(text, reviver)\n```\n\n### Parameters\n\n- `text`\n  - : The string to parse as JSON.\n- `reviver` _**optional**_\n  - : If a function, this prescribes how each value originally produced by parsing is transformed before being returned. Non-callable values are ignored. The function is called with the following arguments:\n    - `key`\n      - : The key associated with the value.\n    - `value`\n      - : The value produced by parsing.\n\n### Return value\n\nThe `Object`, `Array`, string, number, boolean, or `null` value corresponding to the given JSON `text`.\n\n### Exceptions\n\n- [`SyntaxError`](../../globals/SyntaxError/SyntaxError.mdx)\n  - : Thrown if the string to parse is not valid JSON.\n\n## Description\n\n`JSON.parse()` parses a JSON string according to the [JSON grammar](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/JSON#full_json_grammar), then evaluates the string as if it's a JavaScript expression. The only instance where a piece of JSON text represents a different value from the same JavaScript expression is when dealing with the `\"__proto__\"` key — see [Object literal syntax vs. JSON](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Object_initializer#object_literal_syntax_vs._json).\n\n### The reviver parameter\n\nIf a `reviver` is specified, the value computed by parsing is _transformed_ before being returned. Specifically, the computed value and all its properties (in a [depth-first](https://en.wikipedia.org/wiki/Depth-first_search) fashion, beginning with the most nested properties and proceeding to the original value itself) are individually run through the `reviver`.\n\nThe `reviver` is called with the object containing the property being processed as `this`, and two arguments: `key` and `value`, representing the property name as a string (even for arrays) and the property value. If the `reviver` function returns [`undefined`](../../globals/undefined.mdx) (or returns no value — for example, if execution falls off the end of the function), the property is deleted from the object. Otherwise, the property is redefined to be the return value. If the `reviver` only transforms some values and not others, be certain to return all untransformed values as-is — otherwise, they will be deleted from the resulting object.\n\nSimilar to the `replacer` parameter of [`JSON.stringify()`](../../globals/JSON/stringify.mdx), `reviver` will be last called on the root object with an empty string as the `key` and the root object as the `value`. For JSON text parsing to primitive values, `reviver` will be called once.\n\nNote that `reviver` is run after the value is parsed. So, for example, numbers in JSON text will have already been converted to JavaScript numbers, and may lose precision in the process. To transfer large numbers without loss of precision, serialize them as strings, and revive them to [BigInts](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/BigInt), or other appropriate arbitrary precision formats.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/JSON/stringify.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# JSON.stringify()\n\nThe **`JSON.stringify()`** method converts a JavaScript value to a JSON string, optionally replacing values if a replacer function is specified or optionally including only the specified properties if a replacer array is specified.\n\n## Syntax\n\n```js\nJSON.stringify(value)\nJSON.stringify(value, replacer)\nJSON.stringify(value, replacer, space)\n```\n\n### Parameters\n\n- `value`\n  - : The value to convert to a JSON string.\n- `replacer` _**optional**_\n  - : A function that alters the behavior of the stringification process, or an array of strings or numbers naming properties of `value` that should be included in the output. If `replacer` is an array, all elements that are not strings or numbers (can be either primitives or wrapper objects), including `Symbol` values, are completely ignored. If `replacer` is anything other than a function or an array (e.g. [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or not provided), all properties of the object are included in the resulting JSON string.\n- `space` _**optional**_\n\n  - : A string or number that's used to insert white space (including indentation, line break characters, etc.) into the output JSON string for readability purposes.\n\n    If this is a number, it indicates the number of space characters to be used as indentation, clamped to 10 (that is, any number greater than `10` is treated as if it were `10`). Values less than 1 indicate that no space should be used.\n\n    If this is a string, the string (or the first 10 characters of the string, if it's longer than that) is inserted before every nested object or array.\n\n    If `space` is anything other than a string or number (can be either a primitive or a wrapper object) — for example, is [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or not provided — no white space is used.\n\n### Return value\n\nA JSON string representing the given value, or undefined.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if one of the following is true:\n    - `value` contains a circular reference.\n    - A `BigInt` value is encountered.\n\n## Description\n\n`JSON.stringify()` converts a value to JSON notation representing it:\n\n- `Boolean`, `Number`, `String`, and `BigInt` (obtainable via [`Object()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/Object)) objects are converted to the corresponding primitive values during stringification, in accordance with the traditional conversion semantics. `Symbol` objects (obtainable via [`Object()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/Object)) are treated as plain objects.\n- Attempting to serialize `BigInt` values will throw. However, if the BigInt has a `toJSON()` method (through monkeypatching: `BigInt.prototype.toJSON = ...`), that method can provide the serialization result. This constraint ensures that a proper serialization (and, very likely, its accompanying deserialization) behavior is always explicitly provided by the user.\n- [`undefined`](../../globals/undefined.mdx), `Function`, and `Symbol` values are not valid JSON values. If any such values are encountered during conversion, they are either omitted (when found in an object) or changed to [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) (when found in an array). `JSON.stringify()` can return `undefined` when passing in \"pure\" values like `JSON.stringify(() => {})` or `JSON.stringify(undefined)`.\n- The numbers [`Infinity`](../../globals/Infinity.mdx) and [`NaN`](../../globals/NaN.mdx), as well as the value [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null), are all considered `null`. (But unlike the values in the previous point, they would never be omitted.)\n- Arrays are serialized as arrays (enclosed by square brackets). Only array indices between 0 and `length - 1` (inclusive) are serialized; other properties are ignored.\n- For other objects:\n\n  - All `Symbol`-keyed properties will be completely ignored, even when using the [`replacer`](#the-replacer-parameter) parameter.\n\n  - If the value has a `toJSON()` method, it's responsible to define what data will be serialized. Instead of the object being serialized, the value returned by the `toJSON()` method when called will be serialized. `JSON.stringify()` calls `toJSON` with one parameter, the `key`, which has the same semantic as the `key` parameter of the [`replacer`](#the-replacer-parameter) function:\n\n    - if this object is a property value, the property name\n    - if it is in an array, the index in the array, as a string\n    - if `JSON.stringify()` was directly called on this object, an empty string\n\n    `Date` objects implement the [`toJSON()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toJSON) method which returns a string (the same as [`date.toISOString()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)). Thus, they will be stringified as strings.\n\n  - Only [enumerable own properties](https://developer.mozilla.org/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) are visited. This means [Map](../../globals/Map/Map.mdx), [Set](../../globals/Set/Set.mdx), etc. will become `\"{}\"`. You can use the [`replacer`](#the-replacer-parameter) parameter to serialize them to something more useful.\n\n    Properties are visited using the same algorithm as [`Object.keys()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/keys), which has a well-defined order and is stable across implementations. For example, `JSON.stringify` on the same object will always produce the same string, and `JSON.parse(JSON.stringify(obj))` would produce an object with the same key ordering as the original (assuming the object is completely JSON-serializable).\n\n### The replacer parameter\n\nThe `replacer` parameter can be either a function or an array.\n\nAs an array, its elements indicate the names of the properties in the object that should be included in the resulting JSON string. Only string and number values are taken into account; symbol keys are ignored.\n\nAs a function, it takes two parameters: the `key` and the `value` being stringified. The object in which the key was found is provided as the `replacer`'s `this` context.\n\nThe `replacer` function is called for the initial object being stringified as well, in which case the `key` is an empty string (`\"\"`). It is then called for each property on the object or array being stringified. Array indices will be provided in its string form as `key`. The current property value will be replaced with the `replacer`'s return value for stringification. This means:\n\n- If you return a number, string, boolean, or `null`, that value is directly serialized and used as the property's value. (Returning a BigInt will throw as well.)\n- If you return a `Function`, `Symbol`, or [`undefined`](../../globals/undefined.mdx), the property is not included in the output.\n- If you return any other object, the object is recursively stringified, calling the `replacer` function on each property.\n\n> **Note:** When parsing JSON generated with `replacer` functions, you would likely want to use the [`reviver`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#using_the_reviver_parameter) parameter to perform the reverse operation.\n\nTypically, array elements' index would never shift (even when the element is an invalid value like a function, it will become `null` instead of omitted). Using the `replacer` function allows you to control the order of the array elements by returning a different array.\n\n### The space parameter\n\nThe `space` parameter may be used to control spacing in the final string.\n\n- If it is a number, successive levels in the stringification will each be indented by this many space characters.\n- If it is a string, successive levels will be indented by this string.\n\nEach level of indentation will never be longer than 10. Number values of `space` are clamped to 10, and string values are truncated to 10 characters.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Map/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get Map\\[Symbol.species]\n\nThe **`Map[Symbol.species]`** accessor property is an unused accessor property specifying how to copy `Map` objects.\n\n## Syntax\n\n```js\nMap[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct copied `Map` instances.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `Map` objects. Subclass constructors may override it to change the constructor assignment.\n\n> **Note:** This property is currently unused by all `Map` methods.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Map/Map.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map()\n\nThe **`Map()` constructor** creates [Map](../../globals/Map/Map.mdx) objects.\n\n## Syntax\n\n```js\nnew Map()\nnew Map(iterable)\n```\n\n> **Note:** `Map()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable` _**optional**_\n  - : An `Array` or other\n    [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) object\n    whose elements are key-value pairs. (For example, arrays with two elements,\n    such as `[[ 1, 'one' ],[ 2, 'two' ]]`.) Each key-value pair is added to the\n    new `Map`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Map/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype\\[Symbol.iterator]()\n\nThe **`Symbol.iterator`** method of a `Map` object implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows maps to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the key-value pairs of the map.\n\nThe initial value of this property is the same function object as the initial value of the [`Map.prototype.entries`](../../../globals/Map/prototype/entries.mdx) property.\n\n## Syntax\n\n```js\nmap[Symbol.iterator]()\n```\n\n### Return value\n\nThe same return value as [`Map.prototype.entries()`](../../../globals/Map/prototype/entries.mdx): a new iterable iterator object that yields the key-value pairs of the map.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Map/prototype/clear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.clear()\n\nThe **`clear()`** method removes all elements from a `Map` object.\n\n## Syntax\n\n```js\nclear()\n```\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Map/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.delete()\n\nThe **`delete()`** method removes the specified element from a `Map` object by\nkey.\n\n## Syntax\n\n```js\ndelete(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to remove from the `Map` object.\n\n### Return value\n\n`true` if an element in the `Map` object existed and has been removed, or\n`false` if the element does not exist.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Map/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.entries()\n\nThe **`entries()`** method returns a new\n_[iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators)_ object\nthat contains the `[key, value]` pairs for each element in the `Map` object in\ninsertion order. In this particular case, this iterator object is also an\niterable, so the for-of loop can be used. When the protocol `[Symbol.iterator]`\nis used, it returns a function that, when invoked, returns this iterator itself.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nA new [Map](../../../globals/Map/Map.mdx) iterator object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Map/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.forEach()\n\nThe **`forEach()`** method executes a provided function once per each key/value\npair in the `Map` object, in insertion order.\n\n## Syntax\n\n```js\n// Arrow function\nforEach(() => { /* … */ } )\nforEach((value) => { /* … */ } )\nforEach((value, key) => { /* … */ } )\nforEach((value, key, map) => { /* … */ } )\n\n// Callback function\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n\n// Inline callback function\nforEach(function() { /* … */ })\nforEach(function(value) { /* … */ })\nforEach(function(value, key) { /* … */ })\nforEach(function(value, key, map) { /* … */ })\nforEach(function(value, key, map) { /* … */ }, thisArg)\n```\n\n### Parameters\n\n- `callbackFn`\n  - : Function to execute for each entry in the map. It takes the following\n    arguments:\n    - `value` _**optional**_\n      - : Value of each iteration.\n    - `key` _**optional**_\n      - : Key of each iteration.\n    - `map` _**optional**_\n      - : The map being iterated.\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `callback`.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n## Description\n\nThe `forEach` method executes the provided `callback` once for each key of the\nmap which actually exist. It is not invoked for keys which have been deleted.\nHowever, it is executed for values which are present but have the value\n`undefined`.\n\n`callback` is invoked with **three arguments**:\n\n- the entry's `value`\n- the entry's `key`\n- the **`Map` object** being traversed\n\nIf a `thisArg` parameter is provided to `forEach`, it will be passed to\n`callback` when invoked, for use as its `this` value. Otherwise, the value\n`undefined` will be passed for use as its `this` value. The `this` value\nultimately observable by `callback` is determined according to\n[the usual rules for determining the `this` seen by a function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this).\n\nEach value is visited once, except in the case when it was deleted and re-added\nbefore `forEach` has finished. `callback` is not invoked for values deleted\nbefore being visited. New values added before `forEach` has finished will be\nvisited.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Map/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.get()\n\nThe **`get()`** method returns a specified element from a `Map` object. If the\nvalue that is associated to the provided key is an object, then you will get a\nreference to that object and any change made to that object will effectively\nmodify it inside the `Map` object.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to return from the `Map` object.\n\n### Return value\n\nThe element associated with the specified key, or\n[`undefined`](../../../globals/undefined.mdx) if the key can't be found in the `Map` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Map/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.has()\n\nThe **`has()`** method returns a boolean indicating whether an element with the\nspecified key exists or not.\n\n## Syntax\n\n```js\nhas(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to test for presence in the `Map` object.\n\n### Return value\n\n`true` if an element with the specified key exists in the `Map` object;\notherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Map/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.keys()\n\nThe **`keys()`** method returns a new\n_[iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators)_ object\nthat contains the keys for each element in the `Map` object in insertion order. In this particular case, this iterator object is also an iterable, so a [for...of](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loop can be used.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nA new [Map](../../../globals/Map/Map.mdx) iterator object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Map/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.set()\n\nThe **`set()`** method adds or updates an entry in a `Map` object with a specified key and a value.\n\n## Syntax\n\n```js\nset(key, value)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to add to the `Map` object. The key may be any [JavaScript type](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures) (any [primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_values) or any type of [JavaScript object](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#objects)).\n- `value`\n  - : The value of the element to add to the `Map` object. The value may be any [JavaScript type](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures) (any [primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_values) or any type of [JavaScript object](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#objects)).\n\n### Return value\n\nThe `Map` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Map/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.size\n\nThe **`size`** accessor property returns the number of elements in a\n[Map](../../../globals/Map/Map.mdx) object.\n\n## Description\n\nThe value of `size` is an integer representing how many entries the `Map` object\nhas. A set accessor function for `size` is `undefined`; you can not change this\nproperty.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Map/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Map.prototype.values()\n\nThe **`values()`** method returns a new\n_[iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators)_ object\nthat contains the values for each element in the `Map` object in insertion\norder.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nA new [Map](../../../globals/Map/Map.mdx) iterator object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/E.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.E\n\nThe **`Math.E`** property represents Euler's number, the base of natural logarithms, e, which is approximately 2.718.\n\n## Value\n\n`2.718281828459045`\n\n## Description\n\nBecause `E` is a static property of `Math`, you always use it as `Math.E`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/LN10.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LN10\n\nThe **`Math.LN10`** property represents the natural logarithm of 10, approximately 2.302.\n\n## Value\n\n`2.302585092994046`\n\n## Description\n\nBecause `LN10` is a static property of `Math`, you always use it as `Math.LN10`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/LN2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LN2\n\nThe **`Math.LN2`** property represents the natural logarithm of 2, approximately 0.693:\n\n## Value\n\n`0.6931471805599453`\n\n## Description\n\nBecause `LN2` is a static property of `Math`, you always use it as `Math.LN2`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/LOG10e.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LOG10E\n\nThe **`Math.LOG10E`** property represents the base 10 logarithm of [E](./E.mdx), approximately 0.434.\n\n## Value\n\n`0.4342944819032518`\n\n## Description\n\nBecause `LOG10E` is a static property of `Math`, you always use it as `Math.LOG10E`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/LOG2e.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.LOG2E\n\nThe **`Math.LOG2E`** property represents the base 2 logarithm of [E](./E.mdx), approximately 1.442.\n\n## Value\n\n`1.4426950408889634`\n\n## Description\n\nBecause `LOG2E` is a static property of `Math`, you always use it as `Math.LOG2E`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/PI.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.PI\n\nThe **`Math.PI`** property represents the ratio of the circumference of a circle to its diameter, approximately 3.14159.\n\n## Value\n\n`3.141592653589793`\n\n## Description\n\nBecause `PI` is a static property of `Math`, you always use it as `Math.PI`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/SQRT1_2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.SQRT1_2\n\nThe **`Math.SQRT1_2`** property represents the square root of 1/2, which is approximately 0.707.\n\n## Value\n\n`0.7071067811865476`\n\n## Description\n\n`Math.SQRT1_2` is a constant and a more performant equivalent to [`Math.sqrt(0.5)`](./sqrt.mdx).\n\nBecause `SQRT1_2` is a static property of `Math`, you always use it as `Math.SQRT1_2`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/SQRT2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.SQRT2\n\nThe **`Math.SQRT2`** property represents the square root of 2, approximately 1.414.\n\n## Value\n\n`0.7071067811865476`\n\n## Description\n\n`Math.SQRT2` is a constant and a more performant equivalent to [`Math.sqrt(2)`](./sqrt.mdx).\n\nBecause `SQRT2` is a static property of `Math`, you always use it as `Math.SQRT2`, rather than as a property of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/abs.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.abs()\n\nThe **`Math.abs()`** function returns the absolute value of a number.\n\n\n## Syntax\n\n```js\nMath.abs(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe absolute value of `x`. If `x` is negative (including `-0`), returns `-x`. Otherwise, returns `x`. The result is therefore always a positive number or `0`.\n\n## Description\n\nBecause `abs()` is a static method of `Math`, you always use it as `Math.abs()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/acos.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.acos()\n\nThe **`Math.acos()`** function returns the inverse cosine (in radians) of a number.\n\n## Syntax\n\n```js\nMath.acos(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number between -1 and 1, inclusive, representing the angle's cosine value.\n\n### Return value\n\nThe inverse cosine (angle in radians between 0 and π, inclusive) of `x`. If `x` is less than -1 or greater than 1, returns `NaN`.\n\n## Description\n\nBecause `acos()` is a static method of `Math`, you always use it as `Math.acos()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/acosh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.acosh()\n\nThe **`Math.acosh()`** function returns the inverse hyperbolic cosine of a number.\n\n## Syntax\n\n```js\nMath.acosh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 1.\n\n### Return value\n\nThe inverse hyperbolic cosine of `x`. If `x` is less than 1, returns `NaN`.\n\n## Description\n\nBecause `acosh()` is a static method of `Math`, you always use it as `Math.acosh()`, rather than as a method of a `Math` object you created (`Math` is no constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/asin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.asin()\n\nThe **`Math.asin()`** function returns the inverse sine (in radians) of a number.\n\n## Syntax\n\n```js\nMath.asin(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number between -1 and 1, inclusive, representing the angle's sine value.\n\n### Return value\n\nThe inverse sine (angle in radians between <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math>, inclusive) of `x`. If `x` is less than -1 or greater than 1, returns `NaN`.\n\n## Description\n\nBecause `asin()` is a static method of `Math`, you always use it as `Math.asin()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/asinh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.asinh()\n\nThe **`Math.asinh()`** function returns the inverse hyperbolic sine of a number. \n\n## Syntax\n\n```js\nMath.asinh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe inverse hyperbolic sine of `x`.\n\n## Description\n\nBecause `asinh()` is a static method of `Math`, you always use it as `Math.asinh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/atan.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.atan()\n\nThe **`Math.atan()`** function returns the inverse tangent (in radians) of a number.\n\n## Syntax\n\n```js\nMath.atan(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe inverse tangent (angle in radians between <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math> and <math><semantics><mfrac><mi>π</mi><mn>2</mn></mfrac></semantics></math>, inclusive) of `x`. If `x` is `Infinity`, it returns <math><semantics><mfrac><mi>π</mi><mn>2</mn></mfrac></semantics></math>. If `x` is `-Infinity`, it returns <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math>.\n\n## Description\n\nBecause `atan()` is a static method of `Math`, you always use it as `Math.atan()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/atan2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.atan2()\n\nThe **`Math.atan2()`** function returns the angle in the plane (in radians) between the positive x-axis and the ray from (0, 0) to the point (x, y), for `Math.atan2(y, x)`.\n\n## Syntax\n\n```js\nMath.atan2(y, x)\n```\n\n### Parameters\n\n- `y`\n  - : The y coordinate of the point.\n- `x`\n  - : The x coordinate of the point.\n\n### Return value\n\nThe angle in radians (between -π and π, inclusive) between the positive x-axis and the ray from (0, 0) to the point (x, y).\n\n## Description\n\nThe `Math.atan2()` method measures the counterclockwise angle θ, in radians, between the positive x-axis and the point `(x, y)`. Note that the arguments to this function pass the y-coordinate first and the x-coordinate second.\n\n`Math.atan2()` is passed separate `x` and `y` arguments, while [`Math.atan()`](./atan.mdx) is passed the ratio of those two arguments. `Math.atan2(y, x)` differs from `Math.atan(y / x)` in the following cases:\n\n| `x`                  | `y`         | `Math.atan2(y, x)` | `Math.atan(y / x)` |\n| -------------------- | ----------- | ------------------ | ------------------ |\n| `Infinity`           | `Infinity`  | π / 4              | `NaN`              |\n| `Infinity`           | `-Infinity` | -π / 4             | `NaN`              |\n| `-Infinity`          | `Infinity`  | 3π / 4             | `NaN`              |\n| `-Infinity`          | `-Infinity` | -3π / 4            | `NaN`              |\n| 0                    | 0           | 0                  | `NaN`              |\n| 0                    | -0          | -0                 | `NaN`              |\n| < 0 (including `-0`) | 0           | π                  | 0                  |\n| < 0 (including `-0`) | -0          | -π                 | 0                  |\n| `-Infinity`          | > 0         | π                  | -0                 |\n| -0                   | > 0         | π / 2              | -π / 2             |\n| `-Infinity`          | < 0         | -π                 | 0                  |\n| -0                   | < 0         | -π / 2             | π / 2              |\n\nIn addition, for points in the second and third quadrants (`x < 0`), `Math.atan2()` would output an angle less than <math><semantics><mrow><mo>-</mo><mfrac><mi>π</mi><mn>2</mn></mfrac></mrow></semantics></math> or greater than <math><semantics><mfrac><mi>π</mi><mn>2</mn></mfrac></semantics></math>.\n\nBecause `atan2()` is a static method of `Math`, you always use it as `Math.atan2()`, rather than as a method of a `Math` object you created (`Math` is not a constructor)."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/atanh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.atanh()\n\nThe **`Math.atanh()`** function returns the inverse hyperbolic tangent of a number. \n\n## Syntax\n\n```js\nMath.atanh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number between -1 and 1, inclusive.\n\n### Return value\n\nThe inverse hyperbolic tangent of `x`. If `x` is 1, returns `Infinity`. If `x` is -1, returns `-Infinity`. If `x` is less than -1 or greater than 1, returns `NaN`.\n\n## Description\n\nBecause `atanh()` is a static method of `Math`, you always use it as `Math.atanh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/cbrt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.cbrt()\n\nThe **`Math.cbrt()`** function returns the cube root of a number.\n\n## Syntax\n\n```js\nMath.cbrt(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe cube root of `x`.\n\n## Description\n\nBecause `cbrt()` is a static method of `Math`, you always use it as `Math.cbrt()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/ceil.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.ceil()\n\nThe **`Math.ceil()`** function always rounds up and returns the smaller integer greater than or equal to a given number.\n\n## Syntax\n\n```js\nMath.ceil(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe smallest integer greater than or equal to `x`. It's the same value as [`-Math.floor(-x)`](./floor.mdx).\n\n## Description\n\nBecause `ceil()` is a static method of `Math`, you always use it as `Math.ceil()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/clz32.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.clz32()\n\nThe **`Math.clz32()`** function returns the number of leading zero bits in the 32-bit binary representation of a number.\n\n## Syntax\n\n```js\nMath.clz32(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe number of leading zero bits in the 32-bit binary representation of `x`.\n\n## Description\n\n`clz32` is short for **C**ount**L**eading**Z**eros**32**.\n\nIf `x` is not a number, it will be converted to a number first, then converted to a 32-bit unsigned integer.\n\nIf the converted 32-bit unsigned integer is `0`, `32` is returned, because all bits are `0`. If the most significant bit is `1` (i.e. the number is greater than or equal to 2<sup>31</sup>), `0` is returned.\n\nThis function is particularly useful for systems that compile to JS, like [Emscripten](https://emscripten.org).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/cos.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.cos()\n\nThe **`Math.cos()`** function returns the cosine of a number in radians.\n\n## Syntax\n\n```js\nMath.cos(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number representing an angle in radians.\n\n### Return value\n\nThe cosine of `x`, between -1 and 1, inclusive. If `x` is `Infinity`, `-Infinity`, or `NaN`, returns `NaN`.\n\n## Description\n\nBecause `cos()` is a static method of `Math`, you always use it as `Math.cos()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/cosh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.cosh()\n\nThe **`Math.cosh()`** function returns the hyperbolic cosine of a number. \n\n## Syntax\n\n```js\nMath.cosh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe hyperbolic cosine of `x`.\n\n## Description\n\nBecause `cosh()` is a static method of `Math`, you always use it as `Math.cosh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor)."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/exp.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.exp()\n\nThe **`Math.exp()`** function returns [E](./E.mdx) raised to the power of a number.\n\n## Syntax\n\n```js\nMath.exp(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nA nonnegative number representing e<sup>x</sup>, where e is [the base of the natural logarithm](./E.mdx).\n\n## Description\n\nBecause `exp()` is a static method of `Math`, you always use it as `Math.exp()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nBeware that `e` to the power of a number very close to 0 will be very close to 1 and suffer from loss of precision. In this case, you may want to use `Math.expm1` instead, and obtain a much higher-precision fractional part of the answer.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/expm1.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.expm1()\n\nThe **`Math.expm1()`** function returns [E](./E.mdx) raised to the power of a number, subtracted by 1.\n\n## Syntax\n\n```js\nMath.expm1(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nA number representing e<sup>x</sup> - 1, where e is [the base of the natural logarithm](./E.mdx).\n\n## Description\n\nFor very small values of _x_, adding 1 can reduce or eliminate precision. The double floats used in JS give you about 15 digits of precision. 1 + 1e-15 \\= 1.000000000000001, but 1 + 1e-16 = 1.000000000000000 and therefore exactly 1.0 in that arithmetic, because digits past 15 are rounded off.\n\nWhen you calculate <math display=\"inline\"><semantics><msup><mi mathvariant=\"normal\">e</mi><mi>x</mi></msup></semantics></math> where x is a number very close to 0, you should get an answer very close to 1 + x, because <math display=\"inline\"><semantics><mrow><munder><mo lspace=\"0em\" rspace=\"0em\">lim</mo><mrow><mi>x</mi><mo stretchy=\"false\">→</mo><mn>0</mn></mrow></munder><mfrac><mrow><msup><mi mathvariant=\"normal\">e</mi><mi>x</mi></msup><mo>−</mo><mn>1</mn></mrow><mi>x</mi></mfrac><mo>=</mo><mn>1</mn></mrow></semantics></math>. If you calculate `Math.exp(1.1111111111e-15) - 1`, you should get an answer close to `1.1111111111e-15`. Instead, due to the highest significant figure in the result of `Math.exp` being the units digit `1`, the final value ends up being `1.1102230246251565e-15`, with only 3 correct digits. If, instead, you calculate `Math.exp1m(1.1111111111e-15)`, you will get a much more accurate answer `1.1111111111000007e-15`, with 11 correct digits of precision.\n\nBecause `expm1()` is a static method of `Math`, you always use it as `Math.expm1()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/floor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.floor()\n\nThe **`Math.floor()`** function always rounds down and returns the largest integer less than or equal to a given number.\n\n## Syntax\n\n```js\nMath.floor(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe largest integer smaller than or equal to `x`. It's the same value as [`-Math.ceil(-x)`](./ceil.mdx).\n\n## Description\n\nBecause `floor()` is a static method of `Math`, you always use it as `Math.floor()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/fround.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.fround()\n\nThe **`Math.fround()`** function returns the nearest [32-bit single precision](https://en.wikipedia.org/wiki/Single-precision_floating-point_format) float representation of a number.\n\n## Syntax\n\n```js\nMath.fround(doubleFloat)\n```\n\n### Parameters\n\n- `doubleFloat`\n  - : A number.\n\n### Return value\n\nThe nearest [32-bit single precision](https://en.wikipedia.org/wiki/Single-precision_floating-point_format) float representation of `x`.\n\n## Description\n\nJavaScript uses 64-bit double floating-point numbers internally, which offer a very high precision. However, sometimes you may be working with 32-bit floating-point numbers, for example if you are reading values from a `Float32Array`. This can create confusion: checking a 64-bit float and a 32-bit float for equality may fail even though the numbers are seemingly identical.\n\nTo solve this, `Math.fround()` can be used to cast the 64-bit float to a 32-bit float. Internally, JavaScript continues to treat the number as a 64-bit float, it just performs a \"round to even\" on the 23rd bit of the mantissa, and sets all following mantissa bits to `0`. If the number is outside the range of a 32-bit float, `Infinity` or `-Infinity` is returned.\n\nBecause `fround()` is a static method of `Math`, you always use it as `Math.fround()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/hypot.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.hypot()\n\nThe **`Math.hypot()`** function returns the square root of the sum of squares of its arguments. \n\n## Syntax\n\n```js\nMath.hypot()\nMath.hypot(value0)\nMath.hypot(value0, value1)\nMath.hypot(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `value1`, …, `valueN`\n  - : Numbers.\n\n### Return value\n\nThe square root of the sum of squares of the given arguments. Returns Infinity if any of the arguments is ±Infinity. Otherwise, if at least one of the arguments is or is converted to NaN, returns NaN. Returns `0` if no arguments are given or all arguments are ±0.\n\n## Description\n\nCalculating the hypotenuse of a right triangle, or the magnitude of a complex number, uses the formula `Math.sqrt(v1*v1 + v2*v2)`, where v1 and v2 are the lengths of the triangle's legs, or the complex number's real and complex components. The corresponding distance in 2 or more dimensions can be calculated by adding more squares under the square root: `Math.sqrt(v1*v1 + v2*v2 + v3*v3 + v4*v4)`.\n\nThis function makes this calculation easier and faster; you call `Math.hypot(v1, v2)`, or `Math.hypot(v1, /* … ,*/, vN)`.\n\n`Math.hypot` also avoids overflow/underflow problems if the magnitude of your numbers is very large. The largest number you can represent in JS is [`Number.MAX_VALUE`](../Number/MAX_VALUE.mdx), which is around 10<sup>308</sup>. If your numbers are larger than about 10<sup>154</sup>, taking the square of them will result in Infinity. For example, `Math.sqrt(1e200*1e200 + 1e200*1e200) = Infinity`. If you use `hypot()` instead, you get a better answer: `Math.hypot(1e200, 1e200) = 1.4142...e+200` . This is also true with very small numbers. `Math.sqrt(1e-200*1e-200 + 1e-200*1e-200) = 0`, but `Math.hypot(1e-200, 1e-200) = 1.4142...e-200`.\n\nWith one argument, `Math.hypot()` is equivalent to [`Math.abs()`](./abs.mdx). [`Math.hypot.length`](../Function/prototype/length.mdx) is 2, which weakly signals that it's designed to handle at least two parameters.\n\nBecause `hypot()` is a static method of `Math`, you always use it as `Math.hypot()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/imul.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.imul()\n\nThe **`Math.imul()`** function returns the result of the C-like 32-bit multiplication of the two parameters.\n\n\n## Syntax\n\n```js\nMath.imul(a, b)\n```\n\n### Parameters\n\n- `a`\n  - : First number.\n- `b`\n  - : Second number.\n\n### Return value\n\nThe result of the C-like 32-bit multiplication of the given arguments.\n\n## Description\n\n`Math.imul()` allows for 32-bit integer multiplication with C-like semantics. This feature is useful for projects like [Emscripten](https://en.wikipedia.org/wiki/Emscripten).\n\nBecause `imul()` is a static method of `Math`, you always use it as `Math.imul()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nIf you use normal JavaScript floating point numbers in `imul()`, you will experience a degrade in performance. This is because of the costly conversion from a floating point to an integer for multiplication, and then converting the multiplied integer back into a floating point.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/log.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log()\n\nThe **`Math.log()`** function returns the natural logarithm (base [E](./E.mdx)) of a number.\n\n## Syntax\n\n```js\nMath.log(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe natural logarithm (base [E](./E.mdx)) of `x`. If `x` is ±0, returns [`-Infinity`](../Number/NEGATIVE_INFINITY.mdx). If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `log()` is a static method of `Math`, you always use it as `Math.log()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nIf you need the natural log of 2 or 10, use the constants `Math.LN2` or `Math.LN10`. If you need a logarithm to base 2 or 10, use `Math.log2()` or `Math.log10()`. If you need a logarithm to other bases, use `Math.log(x) / Math.log(otherBase)` as in the example below; you might want to precalculate `1 / Math.log(otherBase)` since multiplication in `Math.log(x) * constant` is much faster.\n\nBeware that positive numbers very close to 1 can suffer from loss of precision and make its natural logarithm less accurate. In this case, you may want to use `Math.log1p` instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/log10.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log10()\n\nThe **`Math.log10()`** function returns the base 10 logarithm of a number. \n\n## Syntax\n\n```js\nMath.log10(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe base 10 logarithm of `x`. If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `log10()` is a static method of `Math`, you always use it as `Math.log10()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nThis function is the equivalent of `Math.log(x) / Math.log(10)`. For `log10(e)`, use the constant `Math.LOG10E`, which is 1 / `Math.LN10`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/log1p.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log1p()\n\nThe **`Math.log1p()`** function returns the natural logarithm (base [E](./E.mdx)) of `1 + x`, where `x` is the argument.\n\n## Syntax\n\n```js\nMath.log1p(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to -1.\n\n### Return value\n\nThe natural logarithm (base [E](./E.mdx)) of `x + 1`. If `x` is -1, returns [`-Infinity`](../Number/NEGATIVE_INFINITY.mdx). If `x < -1`, returns `NaN`.\n\n## Description\n\nFor very small values of _x_, adding 1 can reduce or eliminate precision. The double floats used in JS give you about 15 digits of precision. 1 + 1e-15 \\= 1.000000000000001, but 1 + 1e-16 = 1.000000000000000 and therefore exactly 1.0 in that arithmetic, because digits past 15 are rounded off.\n\nWhen you calculate log(1 + _x_) where _x_ is a small positive number, you should get an answer very close to _x_, because <math display=\"inline\"><semantics><mrow><munder><mo movablelimits=\"true\" form=\"prefix\">lim</mo><mrow ><mi>x</mi><mo stretchy=\"false\">→</mo><mn>0</mn></mrow></munder><mfrac><mrow><mi>log</mi><mo>⁡</mo><mo stretchy=\"false\">(</mo><mn>1</mn><mo>+</mo><mi>x</mi><mo stretchy=\"false\">)</mo></mrow><mi>x</mi></mfrac><mo>=</mo><mn>1</mn></mrow></semantics></math>. If you calculate `Math.log(1 + 1.1111111111e-15)`, you should get an answer close to `1.1111111111e-15`. Instead, you will end up taking the logarithm of `1.00000000000000111022` (the roundoff is in binary, so sometimes it gets ugly), and get the answer 1.11022…e-15, with only 3 correct digits. If, instead, you calculate `Math.log1p(1.1111111111e-15)`, you will get a much more accurate answer `1.1111111110999995e-15`, with 15 correct digits of precision (actually 16 in this case).\n\nIf the value of `x` is less than -1, the return value is always `NaN`.\n\nBecause `log1p()` is a static method of `Math`, you always use it as `Math.log1p()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/log2.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.log2()\n\nThe **`Math.log2()`** function returns the base 2 logarithm of a number.\n\n## Syntax\n\n```js\nMath.log2(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe base 2 logarithm of `x`. If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `log2()` is a static method of `Math`, you always use it as `Math.log2()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\nThis function is the equivalent of `Math.log(x) / Math.log(2)`. For `log2(e)`, use the constant `Math.LOG2E`, which is 1 / `Math.LN2`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/max.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.max()\n\nThe **`Math.max()`** function returns the largest of the numbers given as input parameters, or `-Infinity` if there are no parameters.\n\n## Syntax\n\n```js\nMath.max()\nMath.max(value0)\nMath.max(value0, value1)\nMath.max(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `value1`, `value2`, … , `valueN`\n  - : Zero or more numbers among which the largest value will be selected and returned.\n\n### Return value\n\nThe largest of the given numbers. Returns `NaN` if any of the parameters is or is converted into `NaN`. Returns `-Infinity` if no parameters are provided.\n\n## Description\n\nBecause `max()` is a static method of `Math`, you always use it as `Math.max()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n[`Math.max.length`](../Function/prototype/length.mdx) is 2, which weakly signals that it's designed to handle at least two parameters.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/min.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.min()\n\nThe **`Math.min()`** function returns the smallest of the numbers given as input parameters, or `Infinity` if there are no parameters.\n\n## Syntax\n\n```js\nMath.min()\nMath.min(value0)\nMath.min(value0, value1)\nMath.min(value0, value1, /* … ,*/ valueN)\n```\n\n### Parameters\n\n- `value1`, …, `valueN`\n  - : Zero or more numbers among which the lowest value will be selected and returned.\n\n### Return value\n\nThe smallest of the given numbers. Returns `NaN` if any of the parameters is or is converted into `NaN`. Returns `Infinity` if no parameters are provided.\n\n## Description\n\nBecause `min()` is a static method of `Math`, you always use it as `Math.min()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n[`Math.min.length`](../Function/prototype/length.mdx) is 2, which weakly signals that it's designed to handle at least two parameters.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/pow.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.pow()\n\nThe **`Math.pow()`** method returns the value of a base raised to a power.\n\n## Syntax\n\n```js\nMath.pow(base, exponent)\n```\n\n### Parameters\n\n- `base`\n  - : The base number.\n- `exponent`\n  - : The exponent number.\n\n### Return value\n\nA number representing `base` taken to the power of `exponent`. Returns `NaN` in one of the following cases:\n\n- `exponent` is `NaN`.\n- `base` is `NaN` and `exponent` is not `0`.\n- `base` is ±1 and `exponent` is ±`Infinity`.\n- `base < 0` and `exponent` is not an integer.\n\n## Description\n\n`Math.pow()` is equivalent to the `**` operator, except `Math.pow()` only accepts numbers.\n\n`Math.pow(NaN, 0)` (and the equivalent `NaN ** 0`) is the only case where `NaN` doesn't propagate through mathematical operations — it returns `1` despite the operand being `NaN`. In addition, the behavior where `base` is 1 and `exponent` is non-finite (±Infinity or `NaN`) is different from IEEE 754, which specifies that the result should be 1, whereas JavaScript returns `NaN` to preserve backward compatibility with its original behavior.\n\nBecause `pow()` is a static method of `Math`, use it as `Math.pow()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/random.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.random()\n\nThe **`Math.random()`** function returns a floating-point, pseudo-random number that's greater than or equal to 0 and less than 1, with approximately uniform distribution over that range — which you can then scale to your desired range. The implementation selects the initial seed to the random number generation algorithm; it cannot be chosen or reset by the user.\n\n> **Note:** `Math.random()` _does not_ provide cryptographically secure random numbers. Do not use them for anything related to security. Use the Web Crypto API instead, and more precisely the `crypto.getRandomValues()` method.\n\n## Syntax\n\n```js\nMath.random()\n```\n\n### Return value\n\nA floating-point, pseudo-random number between 0 (inclusive) and 1 (exclusive).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/round.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.round()\n\nThe **`Math.round()`** function returns the value of a number rounded to the nearest integer.\n\n## Syntax\n\n```js\nMath.round(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe value of `x` rounded to the nearest integer.\n\n## Description\n\nIf the fractional portion of the argument is greater than 0.5, the argument is rounded to the integer with the next higher absolute value. If it is less than 0.5, the argument is rounded to the integer with the lower absolute value. If the fractional portion is exactly 0.5, the argument is rounded to the next integer in the direction of +∞.\n\n> **Note:** This differs from many languages' `round()` functions, which often round half-increments _away from zero_, giving a different result in the case of negative numbers with a fractional part of exactly 0.5.\n\n`Math.round(x)` is not exactly the same as [`Math.floor(x + 0.5)`](./floor.mdx). When `x` is -0, or -0.5 ≤ x < 0, `Math.round(x)` returns -0, while `Math.floor(x + 0.5)` returns 0. However, neglecting that difference and potential precision errors, `Math.round(x)` and `Math.floor(x + 0.5)` are generally equivalent.\n\nBecause `round()` is a static method of `Math`, you always use it as `Math.round()`, rather than as a method of a `Math` object you created (`Math` has no constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/sign.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sign()\n\nThe **`Math.sign()`** function returns 1 or -1, indicating the sign of the number passed as argument. If the input is 0 or -0, it will be returned as-is.\n\n## Syntax\n\n```js\nMath.sign(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nA number representing the sign of `x`:\n\n- If `x` is positive, returns `1`.\n- If `x` is negative, returns `-1`.\n- If `x` is positive zero, returns `0`.\n- If `x` is negative zero, returns `-0`.\n- Otherwise, returns `NaN`.\n\n## Description\n\nBecause `sign()` is a static method of `Math`, you always use it as `Math.sign()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/sin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sin()\n\nThe **`Math.sin()`** function returns the sine of a number in radians.\n\n## Syntax\n\n```js\nMath.sin(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number representing an angle in radians.\n\n### Return value\n\nThe sine of `x`, between -1 and 1, inclusive. If `x` is `Infinity`, `-Infinity`, or `NaN`, returns `NaN`.\n\n## Description\n\nBecause `sin()` is a static method of `Math`, you always use it as `Math.sin()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/sinh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sinh()\n\nThe **`Math.sinh()`** function returns the hyperbolic sine of a number. \n\n## Syntax\n\n```js\nMath.sinh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe hyperbolic sine of `x`.\n\n## Description\n\nBecause `sinh()` is a static method of `Math`, you always use it as `Math.sinh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/sqrt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.sqrt()\n\nThe **`Math.sqrt()`** function returns the square root of a number.\n\n## Syntax\n\n```js\nMath.sqrt(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number greater than or equal to 0.\n\n### Return value\n\nThe square root of `x`, a nonnegative number. If `x < 0`, returns `NaN`.\n\n## Description\n\nBecause `sqrt()` is a static method of `Math`, you always use it as `Math.sqrt()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/tan.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.tan()\n\nThe **`Math.tan()`** function returns the tangent of a number in radians.\n\n\n## Syntax\n\n```js\nMath.tan(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number representing an angle in radians.\n\n### Return value\n\nThe tangent of `x`. If `x` is `Infinity`, `-Infinity`, or `NaN`, returns `NaN`.\n\n> **Note:** Due to floating point precision, it's not possible to obtain the exact value π/2, so the result is always finite if not `NaN`.\n\n## Description\n\nBecause `tan()` is a static method of `Math`, you always use it as `Math.tan()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/tanh.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.tanh()\n\nThe **`Math.tanh()`** function returns the hyperbolic tangent of a number. \n\n## Syntax\n\n```js\nMath.tanh(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe hyperbolic tangent of `x`.\n\n## Description\n\nBecause `tanh()` is a static method of `Math`, you always use it as `Math.tanh()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Math/trunc.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Math.trunc()\n\nThe **`Math.trunc()`** function returns the integer part of a number by removing any fractional digits.\n\n## Syntax\n\n```js\nMath.trunc(x)\n```\n\n### Parameters\n\n- `x`\n  - : A number.\n\n### Return value\n\nThe integer part of `x`.\n\n## Description\n\nUnlike the other three `Math` methods: `Math.floor()`, `Math.ceil()` and `Math.round()`, the way `Math.trunc()` works is very simple. It _truncates_ (cuts off) the dot and the digits to the right of it, no matter whether the argument is a positive or negative number.\n\nBecause `trunc()` is a static method of `Math`, you always use it as `Math.trunc()`, rather than as a method of a `Math` object you created (`Math` is not a constructor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/NaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# NaN\n\nThe global **`NaN`** property is a value representing Not-A-Number.\n\n## Value\n\nThe same number value as [`Number.NaN`](./Number/NaN.mdx).\n\n## Description\n\n`NaN` is a property of the _global object_. In other words, it is a variable in global scope.\n\nIn modern browsers, `NaN` is a non-configurable, non-writable property. Even when this is not the case, avoid overriding it.\n\nThere are five different types of operations that return `NaN`:\n\n- Failed number conversion (e.g. explicit ones like `parseInt(\"blabla\")`, `Number(undefined)`, or implicit ones like `Math.abs(undefined)`)\n- Math operation where the result is not a real number (e.g. `Math.sqrt(-1)`)\n- Indeterminate form (e.g. `0 * Infinity`, `1 ** Infinity`, `Infinity / Infinity`, `Infinity - Infinity`)\n- A method or expression whose operand is or gets coerced to `NaN` (e.g. `7 ** NaN`, `7 * \"blabla\"`) — this means `NaN` is contagious\n- Other cases where an invalid value is to be represented as a number (e.g. an invalid `new Date(\"blabla\").getTime()`, `\"\".charCodeAt(1)`)\n\n`NaN` and its behaviors are not invented by JavaScript. Its semantics in floating point arithmetic (including that `NaN !== NaN`) are specified by [IEEE 754](https://en.wikipedia.org/wiki/Double_precision_floating-point_format). `NaN`'s behaviors include:\n\n- If `NaN` is involved in a mathematical operation (but not [bitwise operations](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators#bitwise_shift_operators)), the result is usually also `NaN`. (See see [silently escaping NaN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN#silently_escaping_nan) for a counter-example.)\n- When `NaN` is one of the operands of any relational comparison (`>`, `<`, `>=`, `<=`), the result is always `false`.\n- `NaN` compares unequal (via [`==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Equality), [`!=`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Inequality), [`===`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality), and [`!==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_inequality)) to any other value — including to another `NaN` value.\n\n`NaN` is also one of the [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) values in JavaScript.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Number/MAX_SAFE_INTEGER.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MAX_SAFE_INTEGER\n\nThe **`Number.MAX_SAFE_INTEGER`** constant represents the maximum safe integer in JavaScript (2<sup>53</sup> – 1).\n\nFor larger integers, consider using `BigInt`.\n\n## Value\n\n`9007199254740991` (9,007,199,254,740,991, or \\~9 quadrillion).\n\n## Description\n\n[Double precision floating point format](https://en.wikipedia.org/wiki/Double_precision_floating-point_format) only has 52 bits to represent the [mantissa](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_encoding), so it can only safely represent integers between -(2<sup>53</sup> – 1) and 2<sup>53</sup> – 1. \"Safe\" in this context refers to the ability to represent integers exactly and to compare them correctly. For example, `Number.MAX_SAFE_INTEGER + 1 === Number.MAX_SAFE_INTEGER + 2` will evaluate to true, which is mathematically incorrect. See `Number.isSafeInteger()` for more information.\n\nBecause `MAX_SAFE_INTEGER` is a static property of `Number`, you always use it as `Number.MAX_SAFE_INTEGER`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Number/MAX_VALUE.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MAX_VALUE\n\nThe **`Number.MAX_VALUE`** property represents the maximum numeric value representable in JavaScript.\n\n## Value\n\n2<sup>1024</sup> - 1, or approximately `1.7976931348623157E+308`.\n\n## Description\n\nValues larger than `MAX_VALUE` are represented as [`Infinity`](../../globals/Infinity.mdx) and will lose their actual value.\n\nBecause `MAX_VALUE` is a static property of `Number`, you always use it as `Number.MAX_VALUE`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Number/MIN_SAFE_INTEGER.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MIN_SAFE_INTEGER\n\nThe **`Number.MIN_SAFE_INTEGER`** constant represents the minimum safe integer in JavaScript, or -(2<sup>53</sup> - 1).\n\nTo represent integers smaller than this, consider using `BigInt`.\n\n## Value\n\n`-9007199254740991` (-9,007,199,254,740,991, or about -9 quadrillion).\n\n## Description\n\n[Double precision floating point format](https://en.wikipedia.org/wiki/Double_precision_floating-point_format) only has 52 bits to represent the [mantissa](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_encoding), so it can only safely represent integers between -(2<sup>53</sup> – 1) and 2<sup>53</sup> – 1. Safe in this context refers to the ability to represent integers exactly and to correctly compare them. For example, `Number.MIN_SAFE_INTEGER - 1 === Number.MIN_SAFE_INTEGER - 2` will evaluate to true, which is mathematically incorrect. See `Number.isSafeInteger()` for more information.\n\nBecause `MIN_SAFE_INTEGER` is a static property of `Number`, you always use it as `Number.MIN_SAFE_INTEGER`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Number/MIN_VALUE.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.MIN_VALUE\n\nThe **`Number.MIN_VALUE`** property represents the smallest positive numeric value representable in JavaScript.\n\n## Value\n\n2<sup>-1074</sup>, or `5E-324`.\n\n## Description\n\n`Number.MIN_VALUE` is the smallest positive number (not the most negative number) that can be represented within float precision — in other words, the number closest to 0. The ECMAScript spec doesn't define a precise value that implementations are required to support — instead the spec says, _\"must be the smallest non-zero positive value that can actually be represented by the implementation\"_. This is because small IEEE-754 floating point numbers are [denormalized](https://en.wikipedia.org/wiki/Subnormal_number), but implementations are not required to support this representation, in which case `Number.MIN_VALUE` may be larger.\n\nIn practice, its precise value in mainstream engines like V8 (used by Chrome, Edge, Node.js), SpiderMonkey (used by Firefox), and JavaScriptCore (used by Safari) is 2<sup>-1074</sup>, or `5E-324`.\n\nBecause `MIN_VALUE` is a static property of `Number`, you always use it as `Number.MIN_VALUE`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Number/NEGATIVE_INFINITY.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.NEGATIVE_INFINITY\n\nThe **`Number.NEGATIVE_INFINITY`** property represents the negative Infinity value.\n\n## Value\n\nThe same as the negative value of the global [`Infinity`](../../globals/Infinity.mdx) property.\n\n## Description\n\nThe `Number.NEGATIVE_INFINITY` value behaves slightly differently than mathematical infinity:\n\n- Any positive value, including `Number.POSITIVE_INFINITY`, multiplied by `Number.NEGATIVE_INFINITY` is `Number.NEGATIVE_INFINITY`.\n- Any negative value, including `Number.NEGATIVE_INFINITY`, multiplied by `Number.NEGATIVE_INFINITY` is `Number.POSITIVE_INFINITY`.\n- Any positive value divided by `Number.NEGATIVE_INFINITY` is [negative zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754)).\n- Any negative value divided by `Number.NEGATIVE_INFINITY` is [positive zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754)).\n- Zero multiplied by `Number.NEGATIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- [`NaN`](../../globals/NaN.mdx) multiplied by `Number.NEGATIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- `Number.NEGATIVE_INFINITY`, divided by any negative value except `Number.NEGATIVE_INFINITY`, is `Number.POSITIVE_INFINITY`.\n- `Number.NEGATIVE_INFINITY`, divided by any positive value except `Number.POSITIVE_INFINITY`, is `Number.NEGATIVE_INFINITY`.\n- `Number.NEGATIVE_INFINITY`, divided by either `Number.NEGATIVE_INFINITY` or `Number.POSITIVE_INFINITY`, is [`NaN`](../../globals/NaN.mdx).\n- `x > Number.NEGATIVE_INFINITY` is true for any number _x_ that isn't `Number.NEGATIVE_INFINITY`.\n\nYou might use the `Number.NEGATIVE_INFINITY` property to indicate an error condition that returns a finite number in case of success. Note, however, that [`NaN`](../../globals/NaN.mdx) would be more appropriate in such a case.\n\nBecause `Number.NEGATIVE_INFINITY` is a static property of `Number`, you always use it as `Number.NEGATIVE_INFINITY`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Number/NaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.NaN\n\nThe **`Number.NaN`** property represents Not-A-Number, which is equivalent to [description for the global property](../../globals/NaN.mdx). For more information about the behaviors of `NaN`, see the [`NaN`](../../globals/NaN.mdx).\n\n## Value\n\nThe number value [`NaN`](../../globals/NaN.mdx).\n\n## Description\n\nBecause `NaN` is a static property of `Number`, you always use it as `Number.NaN`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Number/Number.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number() constructor\n\nThe **`Number()` constructor** creates a `Number` object. When called instead as a function, it performs type conversion to a primitive number, which is usually more useful.\n\n## Syntax\n\n```js\nnew Number(value)\nNumber(value)\n```\n\n> **Note:** `Number()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\n- `value`\n  - : The numeric value of the object being created.\n\n### Return value\n\nWhen `Number` is called as a constructor (with `new`), it creates a `Number` object, which is **not** a primitive.\n\nWhen `Number` is called as a function, it [coerces the parameter to a number primitive](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_coercion). [BigInts](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/BigInt) are converted to numbers. If the value can't be converted, it returns [`NaN`](../../globals/NaN.mdx).\n\n> **Warning:** You should rarely find yourself using `Number` as a constructor.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Number/POSITIVE_INFINITY.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.POSITIVE_INFINITY\n\nThe **`Number.POSITIVE_INFINITY`** property represents the positive Infinity value.\n\n## Value\n\nThe same as the value of the global [`Infinity`](../../globals/Infinity.mdx) property.\n\n## Description\n\nThe `Number.POSITIVE_INFINITY` value behaves slightly differently than mathematical infinity:\n\n- Any positive value, including `Number.POSITIVE_INFINITY`, multiplied by `Number.POSITIVE_INFINITY` is `Number.POSITIVE_INFINITY`.\n- Any negative value, including `Number.NEGATIVE_INFINITY`, multiplied by `Number.POSITIVE_INFINITY` is `Number.NEGATIVE_INFINITY`.\n- Any positive number divided by `Number.POSITIVE_INFINITY` is [positive zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754)).\n- Any negative number divided by `Number.POSITIVE_INFINITY` is [negative zero](https://en.wikipedia.org/wiki/Signed_zero) (as defined in [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754).\n- Zero multiplied by `Number.POSITIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- `NaN` multiplied by `Number.POSITIVE_INFINITY` is [`NaN`](../../globals/NaN.mdx).\n- `Number.POSITIVE_INFINITY`, divided by any negative value except `Number.NEGATIVE_INFINITY`, is `Number.NEGATIVE_INFINITY`.\n- `Number.POSITIVE_INFINITY`, divided by any positive value except `Number.POSITIVE_INFINITY`, is `Number.POSITIVE_INFINITY`.\n- `Number.POSITIVE_INFINITY`, divided by either `Number.NEGATIVE_INFINITY` or `Number.POSITIVE_INFINITY`, is [`NaN`](../../globals/NaN.mdx).\n- `Number.POSITIVE_INFINITY > x` is true for any number _x_ that isn't `Number.POSITIVE_INFINITY`.\n\nYou might use the `Number.POSITIVE_INFINITY` property to indicate an error condition that returns a finite number in case of success. Note, however, that [`NaN`](../../globals/NaN.mdx) would be more appropriate in such a case.\n\nBecause `Number.POSITIVE_INFINITY` is a static property of `Number`, you always use it as `Number.POSITIVE_INFINITY`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Number/epsilon.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.EPSILON\n\nThe **`Number.EPSILON`** property represents the difference between 1 and the smallest floating point number greater than 1.\n\n## Value\n\n2<sup>-52</sup>, or approximately `2.2204460492503130808472633361816E-16`.\n\n## Description\n\n`Number.EPSILON` is the difference between 1 and the next greater number representable in the Number format, because [double precision floating point format](https://en.wikipedia.org/wiki/Double_precision_floating-point_format) only has 52 bits to represent the [mantissa](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_encoding), and the lowest bit has a significance of 2<sup>-52</sup>.\n\nNote that the absolute accuracy of floating numbers decreases as the number gets larger, because the exponent grows while the mantissa's accuracy stays the same. `Number.MIN_VALUE` is the smallest representable positive number, which is much smaller than `Number.EPSILON`.\n\nBecause `EPSILON` is a static property of `Number`, you always use it as `Number.EPSILON`, rather than as a property of a number value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Number/isFinite.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isFinite()\n\nThe **`Number.isFinite()`** method determines whether the passed value is a finite number — that is, it checks that a given value is a number, and the number is neither positive [`Infinity`](../../globals/Infinity.mdx), negative `Infinity`, nor [`NaN`](../../globals/NaN.mdx).\n\n## Syntax\n\n```js\nNumber.isFinite(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested for finiteness.\n\n### Return value\n\nThe boolean value `true` if the given value is a finite number. Otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Number/isInteger.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isInteger()\n\nThe **`Number.isInteger()`** method determines whether the passed value is an integer.\n\n## Syntax\n\n```js\nNumber.isInteger(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested for being an integer.\n\n### Return value\n\nThe boolean value `true` if the given value is an integer. Otherwise `false`.\n\n## Description\n\nIf the target value is an integer, return `true`, otherwise return `false`. If the value is [`NaN`](../../globals/NaN.mdx) or [`Infinity`](../../globals/Infinity.mdx), return `false`. The method will also return `true` for floating point numbers that can be represented as integer. It will always return `false` if the value is not a number.\n\nNote that some number literals, while looking like non-integers, actually represent integers — due to the precision limit of ECMAScript floating-point number encoding (IEEE-754). For example, `5.0000000000000001` only differs from `5` by `1e-16`, which is too small to be represented. (For reference, [`Number.EPSILON`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/EPSILON) stores the distance between 1 and the next representable floating-point number greater than 1, and that is about `2.22e-16`.) Therefore, `5.0000000000000001` will be represented with the same encoding as `5`, thus making `Number.isInteger(5.0000000000000001)` return `true`.\n\nIn a similar sense, numbers around the magnitude of [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER) will suffer from loss of precision and make `Number.isInteger` return `true` even when it's not an integer. (The actual threshold varies based on how many bits are needed to represent the decimal — for example, `Number.isInteger(4500000000000000.1)` is `true`, but `Number.isInteger(4500000000000000.5)` is `false`.)\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Number/isNaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isNaN()\n\nThe **`Number.isNaN()`** method determines whether the passed value is the number value [`NaN`](../../globals/NaN.mdx), and returns `false` if the input is not of the Number type. It is a more robust version of the original, global `isNaN()` function.\n\n## Syntax\n\n```js\nNumber.isNaN(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested for [`NaN`](../../globals/NaN.mdx).\n\n### Return value\n\nThe boolean value `true` if the given value is a number with value [`NaN`](../../globals/NaN.mdx). Otherwise, `false`.\n\n## Description\n\nThe function `Number.isNaN()` provides a convenient way to check for equality with `NaN`. Note that you cannot test for equality with `NaN` using either the [`==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Equality) or [`===`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) operators, because unlike all other value comparisons in JavaScript, these evaluate to `false` whenever one operand is [`NaN`](../../globals/NaN.mdx), even if the other operand is also [`NaN`](../../globals/NaN.mdx).\n\nSince `x !== x` is only true for `NaN` among all possible JavaScript values, `Number.isNaN(x)` can also be replaced with a test for `x !== x`, despite the latter being less readable.\n\nAs opposed to the global `isNaN()` function, the `Number.isNaN()` method doesn't force-convert the parameter to a number. This makes it safe to pass values that would normally convert to [`NaN`](../../globals/NaN.mdx) but aren't actually the same value as [`NaN`](../../globals/NaN.mdx). This also means that only values of the Number type that are also [`NaN`](../../globals/NaN.mdx) return `true`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Number/isSafeInteger.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.isSafeInteger()\n\nThe **`Number.isSafeInteger()`** method determines whether the provided value is a number that is a _safe integer_.\n\n## Syntax\n\n```js\nNumber.isSafeInteger(testValue)\n```\n\n### Parameters\n\n- `testValue`\n  - : The value to be tested for being a safe integer.\n\n### Return value\n\nThe boolean value `true` if the given value is a number that is a safe integer. Otherwise `false`.\n\n## Description\n\nThe safe integers consist of all integers from -(2<sup>53</sup> - 1) to 2<sup>53</sup> - 1, inclusive (±9,007,199,254,740,991). A safe integer is an integer that:\n\n- can be exactly represented as an IEEE-754 double precision number, and\n- whose IEEE-754 representation cannot be the result of rounding any other integer to fit the IEEE-754 representation.\n\nFor example, 2<sup>53</sup> - 1 is a safe integer: it can be exactly represented, and no other integer rounds to it under any IEEE-754 rounding mode. In contrast, 2<sup>53</sup> is _not_ a safe integer: it can be exactly represented in IEEE-754, but the integer 2<sup>53</sup> + 1 can't be directly represented in IEEE-754 but instead rounds to 2<sup>53</sup> under round-to-nearest and round-to-zero rounding.\n\nHandling values larger or smaller than \\~9 quadrillion with full precision requires using an [arbitrary precision arithmetic library](https://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic). See [What Every Programmer Needs to Know about Floating Point Arithmetic](https://floating-point-gui.de/) for more information on floating point representations of numbers.\n\nFor larger integers, consider using the `BigInt` type.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Number/parseFloat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.parseFloat()\n\nThe **`Number.parseFloat()`** method parses an argument and returns a floating point number. If a number cannot be parsed from the argument, it returns [`NaN`](../../globals/NaN.mdx).\n\n## Syntax\n\n```js\nNumber.parseFloat(string)\n```\n\n### Parameters\n\n- `string`\n  - : The value to parse, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). Leading whitespace in this argument is ignored.\n\n### Return value\n\nA floating point number parsed from the given `string`.\n\nOr [`NaN`](../../globals/NaN.mdx) when the first non-whitespace character cannot be converted to a number.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Number/parseInt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.parseInt()\n\nThe **`Number.parseInt()`** method parses a string argument and\nreturns an integer of the specified radix or base.\n\n## Syntax\n\n```js\nNumber.parseInt(string)\nNumber.parseInt(string, radix)\n```\n\n### Parameters\n\n- `string`\n  - : The value to parse, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). Leading whitespace in this argument is ignored.\n- `radix` _**optional**_\n\n  - : An integer between `2` and `36` that represents the\n    _radix_ (the base in mathematical numeral systems) of the\n    `string`.\n\n    If `radix` is undefined or `0`, it is assumed to be `10` except when the number begins with the code unit pairs `0x` or `0X`, in which case a radix of `16` is assumed.\n\n### Return value\n\nAn integer parsed from the given `string`.\n\nIf the `radix` is smaller than `2` or bigger than\n`36`, or the first non-whitespace character cannot be converted to a number,\n[`NaN`](../../globals/NaN.mdx) is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Number/prototype/toExponential.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toExponential()\n\nThe **`toExponential()`** method returns a string representing\nthe `Number` object in exponential notation.\n\n## Syntax\n\n```js\ntoExponential()\ntoExponential(fractionDigits)\n```\n\n### Parameters\n\n- `fractionDigits` _**optional**_\n  - : Optional. An integer specifying the number of digits after the decimal point.\n    Defaults to as many digits as necessary to specify the number.\n\n### Return value\n\nA string representing the given `Number` object in exponential notation\nwith one digit before the decimal point, rounded to\n`fractionDigits` digits after the decimal point.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : If `fractionDigits` is too small or too large. Values between\n    `0` and `100`, inclusive, will not cause a\n    [`RangeError`](../../../globals/RangeError/RangeError.mdx).\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If this method is invoked on an object that is not a `Number`.\n\n## Description\n\nIf the `fractionDigits` argument is omitted, the number of digits\nafter the decimal point defaults to the number of digits necessary to represent the\nvalue uniquely.\n\nIf you use the `toExponential()` method for a numeric literal and the\nnumeric literal has no exponent and no decimal point, leave whitespace(s) before the dot\nthat precedes the method call to prevent the dot from being interpreted as a decimal\npoint.\n\nIf a number has more digits than requested by the\n`fractionDigits` parameter, the number is rounded to the nearest\nnumber represented by `fractionDigits` digits. See the discussion\nof rounding in the description of the [`Number.prototype.toFixed()`](../../../globals/Number/prototype/toFixed.mdx) method, which also applies to `toExponential()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Number/prototype/toFixed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toFixed()\n\nThe **`toFixed()`** method formats a number using fixed-point notation.\n\n## Syntax\n\n```js\ntoFixed()\ntoFixed(digits)\n```\n\n### Parameters\n\n- `digits` _**optional**_\n  - : The number of digits to appear after the decimal point; should be a value between `0` and `100`, inclusive. If this argument is omitted, it is treated as `0`.\n\n### Return value\n\nA string representing the given number using fixed-point notation.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : If `digits` is smaller than `0`, larger than `100`, or is `NaN`.\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If this method is invoked on an object that is not a `Number`.\n\n## Description\n\nThe `toFixed()` method returns a string representation of `numObj` that does not use exponential notation and has exactly `digits` digits after the decimal place. The number is rounded if necessary, and the fractional part is padded with zeros if necessary so that it has the specified length.\n\nIf the absolute value of `numObj` is greater or equal to 10<sup>21</sup>, this method uses the same algorithm as [`Number.prototype.toString()`](../../../globals/Number/prototype/toString.mdx) and returns a string in exponential notation. `toFixed()` returns `\"Infinity\"`, `\"NaN\"`, or `\"-Infinity\"` if the value of `numObj` is non-finite.\n\nThe output of `toFixed()` may be more precise than [`toString()`](../../../globals/Number/prototype/toString.mdx) for some values, because `toString()` only prints enough significant digits to distinguish the number from adjacent number values. For example:\n\n```js\n(1000000000000000128).toString(); // '1000000000000000100'\n(1000000000000000128).toFixed(0); // '1000000000000000128'\n```\n\nHowever, choosing a `digits` precision that's too high can return unexpected results, because decimal fractional numbers cannot be represented precisely in floating point. For example:\n\n```js\n0.3.toFixed(50); // '0.29999999999999998889776975374843459576368331909180'\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Number/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string with a language-sensitive representation of this number. In implementations with [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) support, this method simply calls `Intl.NumberFormat`.\n\n## Syntax\n\n```js\ntoLocaleString()\ntoLocaleString(locales)\ntoLocaleString(locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` parameters customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.NumberFormat` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat), these parameters correspond exactly to the [`Intl.NumberFormat()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) constructor's parameters. Implementations without `Intl.NumberFormat` support are asked to ignore both parameters, making the locale used and the form of the string returned entirely implementation-dependent.\n\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#locales) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options) parameter of the `Intl.NumberFormat()` constructor.\n\n    In implementations without `Intl.NumberFormat` support, this parameter is ignored.\n\nSee the [`Intl.NumberFormat()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) for details on these parameters and how to use them.\n\n### Return value\n\nA string with a language-sensitive representation of the given number.\n\nIn implementations with `Intl.NumberFormat`, this is equivalent to `new Intl.NumberFormat(locales, options).format(number)`.\n\n## Performance\n\nWhen formatting large numbers of numbers, it is better to create a\n`Intl.NumberFormat` object and use the function provided by its\n`format` property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Number/prototype/toPrecision.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toPrecision()\n\nThe **`toPrecision()`** method returns a string representing\nthe `Number` object to the specified precision.\n\n## Syntax\n\n```js\ntoPrecision()\ntoPrecision(precision)\n```\n\n### Parameters\n\n- `precision` _**optional**_\n  - : An integer specifying the number of significant digits.\n\n### Return value\n\nA string representing a `Number` object in fixed-point or exponential\nnotation rounded to `precision` significant digits. See the discussion of\nrounding in the description of the [`Number.prototype.toFixed()`](../../../globals/Number/prototype/toFixed.mdx) method,\nwhich also applies to `toPrecision()`.\n\nIf the `precision` argument is omitted, behaves as\n[`Number.prototype.toString()`](../../../globals/Number/prototype/toString.mdx). If the `precision` argument is a\nnon-integer value, it is rounded to the nearest integer.\n\n### Exceptions\n\n- `RangeError`\n  - : If `precision` is not between `1` and `100`\n    (inclusive), a [`RangeError`](../../../globals/RangeError/RangeError.mdx) is thrown. Implementations are allowed to\n    support larger and smaller values as well. ECMA-262 only requires a precision of up to\n    21 significant digits.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Number/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified number value.\n\n## Syntax\n\n```js\ntoString()\ntoString(radix)\n```\n\n### Parameters\n\n- `radix` _**optional**_\n  - : An integer in the range `2` through `36` specifying the base to use for representing the number value. Defaults to 10.\n\n### Return value\n\nA string representing the specified number value.\n\n### Exceptions\n\n- [`RangeError`](../../../globals/RangeError/RangeError.mdx)\n  - : Thrown if `radix` is less than 2 or greater than 36.\n\n## Description\n\nThe `Number` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For `Number` values, the `toString` method returns a string representation of the value in the specified radix.\n\nFor radixes above 10, the letters of the alphabet indicate digits greater than 9. For example, for hexadecimal numbers (base 16) `a` through `f` are used.\n\nIf the specified number value is negative, the sign is preserved. This is the case even if the radix is 2; the string returned is the positive binary representation of the number value preceded by a `-` sign, **not** the two's complement of the number value.\n\nBoth `0` and `-0` have `\"0\"` as their string representation. [`Infinity`](../../../globals/Infinity.mdx) returns `\"Infinity\"` and [`NaN`](../../../globals/NaN.mdx) returns `\"NaN\"`.\n\nIf the number is not a whole number, the decimal point `.` is used to separate the decimal places. [Scientific notation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#exponential) is used if the radix is 10 and the number's magnitude (ignoring sign) is greater than or equal to 10<sup>21</sup> or less than 10<sup>-6</sup>. In this case, the returned string always explicitly specifies the sign of the exponent.\n\n```js\nconsole.log((10 ** 21.5).toString()); // \"3.1622776601683794e+21\"\nconsole.log((10 ** 21.5).toString(8)); // \"526665530627250154000000\"\n```\n\nThe `toString()` method requires its `this` value to be a `Number` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to number values.\n\nBecause `Number` doesn't have a [`[Symbol.toPrimitive]()`](../../../globals/Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `Number` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, Number _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — rather, they are directly converted using the same algorithm as the initial `toString()` implementation.\n\n```js\nNumber.prototype.toString = () => \"Overridden\";\nconsole.log(`${1}`); // \"1\"\nconsole.log(`${new Number(1)}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Number/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Number.prototype.valueOf()\n\nThe **`valueOf()`** method returns the wrapped primitive value\nof a `Number` object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nA number representing the primitive value of the specified `Number` object.\n\n## Description\n\nThis method is usually called internally by JavaScript and not explicitly in web code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Object/Object.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object()\n\nThe **`Object` constructor** turns the input into an object. Its behavior depends on the input's type.\n\n- If the value is [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../globals/undefined.mdx), it creates and returns an empty object.\n- Otherwise, it returns an object of a Type that corresponds to the given value.\n- If the value is an object already, it returns the value.\n\n## Syntax\n\n```js\nnew Object(value)\nObject(value)\n```\n\n> **Note:** `Object()` can be called with or without `new`. Both create a new object.\n\n### Parameters\n\n- `value`\n  - : Any value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Object/assign.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.assign()\n\nThe **`Object.assign()`** method\ncopies all [enumerable](../../globals/Object/prototype/propertyIsEnumerable.mdx)\n[own properties](../../globals/Object/hasOwn.mdx) from one or more\n_source objects_ to a _target object_. It returns the modified target\nobject.\n\n## Syntax\n\n```js\nObject.assign(target, ...sources)\n```\n\n### Parameters\n\n- `target`\n  - : The target object — what to apply the sources' properties to, which is returned\n    after it is modified.\n- `sources`\n  - : The source object(s) — objects containing the properties you want to apply.\n\n### Return value\n\nThe target object.\n\n## Description\n\nProperties in the target object are overwritten by properties in the sources if they\nhave the same \"key\". Later sources' properties overwrite earlier ones.\n\nThe `Object.assign()` method only copies _enumerable_ and\n_own_ properties from a source object to a target object. It uses\n`[[Get]]` on the source and `[[Set]]` on the target, so it will\ninvoke [getters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/get) and [setters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/set). Therefore it\n_assigns_ properties, versus copying or defining new properties. This may make it\nunsuitable for merging new properties into a prototype if the merge sources contain\ngetters.\n\nFor copying property definitions (including their enumerability) into prototypes, use\n[`Object.getOwnPropertyDescriptor()`](../../globals/Object/getOwnPropertyDescriptor.mdx) and\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx) instead.\n\nBoth `String` and `Symbol` properties are copied.\n\nIn case of an error, for example if a property is non-writable, a\n[`TypeError`](../../globals/TypeError/TypeError.mdx) is raised, and the `target` object is\nchanged if any properties are added before the error is raised.\n\n> **Note:** `Object.assign()` does not throw on\n> [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../globals/undefined.mdx) sources.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Object/create.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.create()\n\nThe **`Object.create()`** method creates a new object, using an existing object as the prototype of the newly created object.\n\n## Syntax\n\n```js\nObject.create(proto)\nObject.create(proto, propertiesObject)\n```\n\n### Parameters\n\n- `proto`\n  - : The object which should be the prototype of the newly-created object.\n- `propertiesObject` _**optional**_\n  - : If specified and not [`undefined`](../../globals/undefined.mdx), an object whose [enumerable own properties](https://developer.mozilla.org/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) specify property descriptors to be added to the newly-created object, with the corresponding property names. These properties correspond to the second argument of [`Object.defineProperties()`](../../globals/Object/defineProperties.mdx).\n\n### Return value\n\nA new object with the specified prototype object and properties.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if `proto` is neither [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) nor an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Object/defineProperties.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.defineProperties()\n\nThe **`Object.defineProperties()`** method defines new or\nmodifies existing properties directly on an object, returning the object.\n\n## Syntax\n\n```js\nObject.defineProperties(obj, props)\n```\n\n### Parameters\n\n- `obj`\n  - : The object on which to define or modify properties.\n- `props`\n\n  - : An object whose keys represent the names of properties to be defined or modified and\n    whose values are objects describing those properties. Each value in `props`\n    must be either a data descriptor or an accessor descriptor; it cannot be both (see\n    [`Object.defineProperty()`](../../globals/Object/defineProperty.mdx) for more details).\n\n    Data descriptors and accessor descriptors may optionally contain the following keys:\n\n    - `configurable`\n      - : `true` if and only if the type of this property descriptor may be\n        changed and if the property may be deleted from the corresponding object.\n        **Defaults to `false`.**\n    - `enumerable`\n      - : `true` if and only if this property shows up during enumeration of\n        the properties on the corresponding object.\n        **Defaults to `false`.**\n\n    A data descriptor also has the following optional keys:\n\n    - `value`\n      - : The value associated with the property. Can be any valid JavaScript value\n        (number, object, function, etc.).\n        **Defaults to [`undefined`](../../globals/undefined.mdx).**\n    - `writable`\n      - : `true` if and only if the value associated with the property may be\n        changed with an assignment operator.\n        **Defaults to `false`.**\n\n    An accessor descriptor also has the following optional keys:\n\n    - `get`\n      - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx)\n        if there is no getter. The function's return value will be used as the value of\n        the property.\n        **Defaults to [`undefined`](../../globals/undefined.mdx).**\n    - `set`\n      - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx)\n        if there is no setter. The function will receive as its only argument the new\n        value being assigned to the property.\n        **Defaults to [`undefined`](../../globals/undefined.mdx).**\n\n    If a descriptor has neither of `value`, `writable`,\n    `get` and `set` keys, it is treated as a data descriptor. If a\n    descriptor has both `value` or `writable` and `get`\n    or `set` keys, an exception is thrown.\n\n### Return value\n\nThe object that was passed to the function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Object/defineProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.defineProperty()\n\nThe static method **`Object.defineProperty()`** defines a new\nproperty directly on an object, or modifies an existing property on an object, and\nreturns the object.\n\n## Syntax\n\n```js\nObject.defineProperty(obj, prop, descriptor)\n```\n\n### Parameters\n\n- `obj`\n  - : The object on which to define the property.\n- `prop`\n  - : The name or `Symbol` of the property to be defined or modified.\n- `descriptor`\n  - : The descriptor for the property being defined or modified.\n\n### Return value\n\nThe object that was passed to the function.\n\n## Description\n\nThis method allows a precise addition to or modification of a property on an object.\nNormal property addition through assignment creates properties which show up during\nproperty enumeration (`for...in` loop or\n[`Object.keys`](../../globals/Object/keys.mdx) method), whose values may be changed, and which may be\ndeleted. This method allows these extra details\nto be changed from their defaults. By default, properties added using\n`Object.defineProperty()` are not writable, not enumerable, and not configurable.\n\nProperty descriptors present in objects come in two main flavors: data descriptors and\naccessor descriptors. A **data descriptor** is a property that has a\nvalue, which may or may not be writable. An **accessor descriptor** is a\nproperty described by a getter-setter pair of functions. A descriptor must be one of\nthese two flavors; it cannot be both.\n\nBoth data and accessor descriptors are objects. They share the following optional keys\n(please note: the **defaults** mentioned here are in the case of defining\nproperties using `Object.defineProperty()`):\n\n- `configurable`\n\n  - : when this is set to `false`,\n\n    - the type of this property cannot be changed between data property and accessor property, and\n    - the property may not be deleted, and\n    - other attributes of its descriptor cannot be changed (however, if it's a data descriptor with `writable: true`, the `value` can be changed, and `writable` can be changed to `false`).\n\n    **Defaults to `false`.**\n\n- `enumerable`\n  - : `true` if and only if this property shows up during enumeration of the\n    properties on the corresponding object.\n    **Defaults to `false`.**\n\nA **data descriptor** also has the following optional keys:\n\n- `value`\n  - : The value associated with the property. Can be any valid JavaScript value (number,\n    object, function, etc.).\n    **Defaults to [`undefined`](../../globals/undefined.mdx).**\n- `writable`\n  - : `true` if the value associated with the property may be changed with an\n    assignment operator.\n    **Defaults to `false`.**\n\nAn **accessor descriptor** also has the following optional keys:\n\n- `get`\n  - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no getter. When the property is accessed, this function is called without\n    arguments and with `this` set to the object through which the property is\n    accessed (this may not be the object on which the property is defined due to\n    inheritance). The return value will be used as the value of the property.\n    **Defaults to [`undefined`](../../globals/undefined.mdx).**\n- `set`\n  - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no setter. When the property is assigned, this function is called with one\n    argument (the value being assigned to the property) and with `this` set to\n    the object through which the property is assigned.\n    **Defaults to [`undefined`](../../globals/undefined.mdx).**\n\nIf a descriptor has neither of `value`, `writable`,\n`get` and `set` keys, it is treated as a data descriptor. If a\ndescriptor has both \\[`value` or `writable`] and \\[`get` or `set`] keys, an exception is thrown.\n\nBear in mind that these attributes are not necessarily the descriptor's own properties.\nInherited properties will be considered as well. In order to ensure these defaults are\npreserved, you might freeze existing objects in the descriptor object's prototype chain upfront, specify all\noptions explicitly, or point to [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) with [`Object.create(null)`](../../globals/Object/create.mdx).\n\n```js\nconst obj = {};\n// 1. Using a null prototype: no inherited properties\nconst descriptor = Object.create(null);\ndescriptor.value = 'static';\n\n// not enumerable, not configurable, not writable as defaults\nObject.defineProperty(obj, 'key', descriptor);\n\n// 2. Being explicit by using a throw-away object literal with all attributes present\nObject.defineProperty(obj, 'key2', {\n  enumerable: false,\n  configurable: false,\n  writable: false,\n  value: 'static'\n});\n\n// 3. Recycling same object\nfunction withValue(value) {\n  const d = withValue.d || (\n    withValue.d = {\n      enumerable: false,\n      writable: false,\n      configurable: false,\n      value,\n    }\n  );\n\n  // avoiding duplicate operation for assigning value\n  if (d.value !== value) d.value = value;\n\n  return d;\n}\n// and\nObject.defineProperty(obj, 'key', withValue('static'));\n\n// if freeze is available, prevents adding or\n// removing the object prototype properties\n// (value, get, set, enumerable, writable, configurable)\n(Object.freeze || Object)(Object.prototype);\n```\n\nWhen the property already exists, `Object.defineProperty()` attempts to modify the property according to the values in the descriptor and the property's current configuration.\n\nIf the old descriptor had its `configurable` attribute set to `false`, the property is said to be _non-configurable_. It is not possible to change any attribute of a non-configurable accessor property, and it is not possible to switch between data and accessor property types. For data properties with `writable: true`, it is possible to modify the value and change the `writable` attribute from `true` to `false`. A [`TypeError`](../../globals/TypeError/TypeError.mdx) is thrown when attempts are made to change non-configurable property attributes (except `value` and `writable`, if permitted), except when defining a value same as the original value on a data property.\n\nWhen the current property is configurable, defining an attribute to `undefined` effectively deletes it. For example, if `o.k` is an accessor property, `Object.defineProperty(o, \"k\", { set: undefined })` will remove the setter, making `k` only have a getter and become readonly. If an attribute is absent from the new descriptor, the old descriptor attribute's value is kept (it won't be implicitly re-defined to `undefined`). It is possible to toggle between data and accessor property by giving a descriptor of a different \"flavor\". For example, if the new descriptor is a data descriptor (with `value` or `writable`), the original descriptor's `get` and `set` attributes will both be dropped.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Object/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.entries()\n\nThe **`Object.entries()`** method returns an array of a given object's own enumerable string-keyed property key-value pairs.\n\n## Syntax\n\n```js\nObject.entries(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : An object.\n\n### Return value\n\nAn array of the given object's own enumerable string-keyed property key-value pairs. Each key-value pair is an array with two elements: the first element is the property key (which is always a string), and the second element is the property value.\n\n## Description\n\n`Object.entries()` returns an array whose elements are arrays corresponding to the enumerable string-keyed property key-value pairs found directly upon `object`. This is the same as iterating with a `for...in` loop, except that a `for...in` loop enumerates properties in the prototype chain as well. The order of the array returned by `Object.entries()` is the same as that provided by a `for...in` loop.\n\nIf you only need the property keys, use [`Object.keys()`](../../globals/Object/keys.mdx) instead. If you only need the property values, use [`Object.values()`](../../globals/Object/values.mdx) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Object/freeze.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.freeze()\n\nThe **`Object.freeze()`** method _freezes_ an object. Freezing an object [prevents extensions](../../globals/Object/preventExtensions.mdx) and makes existing properties non-writable and non-configurable. A frozen object can no longer be changed: new properties cannot be added, existing properties cannot be removed, their enumerability, configurability, writability, or value cannot be changed, and the object's prototype cannot be re-assigned. `freeze()` returns the same object that was passed in.\n\nFreezing an object is the highest integrity level that JavaScript provides.\n\n## Syntax\n\n```js\nObject.freeze(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object to freeze.\n\n### Return value\n\nThe object that was passed to the function.\n\n## Description\n\nFreezing an object is equivalent to [preventing extensions](../../globals/Object/preventExtensions.mdx) and then changing all existing [properties' descriptors'](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty#description) `configurable` to `false` — and for data properties, `writable` to `false` as well. Nothing can be added to or removed from the properties set of a frozen object. Any attempt to do so will fail, either silently or by throwing a [`TypeError`](../../globals/TypeError/TypeError.mdx) exception (most commonly, but not exclusively, when in \"strict mode\").\n\nFor data properties of a frozen object, their values cannot be changed since the writable and\nconfigurable attributes are set to false. Accessor properties (getters and setters) work the same — the property value returned by the getter may still change, and the setter can still be called without throwing errors when setting the property. Note that values\nthat are objects can still be modified, unless they are also frozen. As an object, an\narray can be frozen; after doing so, its elements cannot be altered and no elements can\nbe added to or removed from the array.\n\n`freeze()` returns the same object that was passed into the function. It\n_does not_ create a frozen copy.\n\nA `TypedArray` or a [`DataView`](../../globals/DataView/DataView.mdx) with elements will cause a [`TypeError`](../../globals/TypeError/TypeError.mdx),\nas they are views over memory and will definitely cause other possible issues:\n\n```js\nObject.freeze(new Uint8Array(0)) // No elements\n// Uint8Array []\n\nObject.freeze(new Uint8Array(1)) // Has elements\n// TypeError: Cannot freeze array buffer views with elements\n\nObject.freeze(new DataView(new ArrayBuffer(32))) // No elements\n// DataView {}\n\nObject.freeze(new Float64Array(new ArrayBuffer(64), 63, 0)) // No elements\n// Float64Array []\n\nObject.freeze(new Float64Array(new ArrayBuffer(64), 32, 2)) // Has elements\n// TypeError: Cannot freeze array buffer views with elements\n```\n\nNote that as the standard three properties (`buf.byteLength`,\n`buf.byteOffset` and `buf.buffer`) are read-only (as are those of\nan `ArrayBuffer`, there is no reason for\nattempting to freeze these properties.\n\nUnlike [`Object.seal()`](../../globals/Object/seal.mdx), existing properties in objects frozen with `Object.freeze()` are made immutable and data properties cannot be re-assigned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Object/fromEntries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.fromEntries()\n\nThe **`Object.fromEntries()`** method transforms a list of key-value pairs into an object.\n\n## Syntax\n\n```js\nObject.fromEntries(iterable)\n```\n\n### Parameters\n\n- `iterable`\n\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol), such as an `Array` or [Map](../../globals/Map/Map.mdx), containing a list of objects. Each object should have two properties:\n\n    - `0`\n      - : A string or `Symbol` representing the property key.\n    - `1`\n      - : The property value.\n\n    Typically, this object is implemented as a two-element array, with the first element being the property key and the second element being the property value.\n\n### Return value\n\nA new object whose properties are given by the entries of the iterable.\n\n## Description\n\nThe `Object.fromEntries()` method takes a list of key-value pairs and returns a new object whose properties are given by those entries. The `iterable` argument is expected to be an object that implements an `@@iterator` method. The method returns an iterator object that produces two-element array-like objects. The first element is a value that will be used as a property key, and the second element is the value to associate with that property key.\n\n`Object.fromEntries()` performs the reverse of [`Object.entries()`](../../globals/Object/entries.mdx), except that `Object.entries()` only returns string-keyed properties, while `Object.fromEntries()` can also create symbol-keyed properties.\n\n> **Note:** Unlike [`Array.from()`](../../globals/Array/from.mdx), `Object.fromEntries()` does not use the value of `this`, so calling it on another constructor does not create objects of that type.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Object/getOwnPropertyDescriptor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertyDescriptor()\n\nThe **`Object.getOwnPropertyDescriptor()`** method returns an\nobject describing the configuration of a specific property on a given object (that is,\none directly present on an object and not in the object's prototype chain). The object\nreturned is mutable but mutating it has no effect on the original property's\nconfiguration.\n\n## Syntax\n\n```js\nObject.getOwnPropertyDescriptor(obj, prop)\n```\n\n### Parameters\n\n- `obj`\n  - : The object in which to look for the property.\n- `prop`\n  - : The name or `Symbol` of the property whose description is to be\n    retrieved.\n\n### Return value\n\nA property descriptor of the given property if it exists on the object,\n[`undefined`](../../globals/undefined.mdx) otherwise.\n\n## Description\n\nThis method permits examination of the precise description of a property. A\n_property_ in JavaScript consists of either a string-valued name or a\n`Symbol` and a property descriptor. Further information about property\ndescriptor types and their attributes can be found in\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx).\n\nA _property descriptor_ is a record with some of the following attributes:\n\n- `value`\n  - : The value associated with the property (data descriptors only).\n- `writable`\n  - : `true` if and only if the value associated with the property may be\n    changed (data descriptors only).\n- `get`\n  - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no getter (accessor descriptors only).\n- `set`\n  - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no setter (accessor descriptors only).\n- `configurable`\n  - : `true` if and only if the type of this property descriptor may be changed\n    and if the property may be deleted from the corresponding object.\n- `enumerable`\n  - : `true` if and only if this property shows up during enumeration of the\n    properties on the corresponding object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Object/getOwnPropertyDescriptors.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertyDescriptors()\n\nThe **`Object.getOwnPropertyDescriptors()`** method returns all\nown property descriptors of a given object.\n\n## Syntax\n\n```js\nObject.getOwnPropertyDescriptors(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object for which to get all own property descriptors.\n\n### Return value\n\nAn object containing all own property descriptors of an object. Might be an empty\nobject, if there are no properties.\n\n## Description\n\nThis method permits examination of the precise description of all own properties of an\nobject. A _property_ in JavaScript consists of either a string-valued name or a\n`Symbol` and a property descriptor. Further information about property\ndescriptor types and their attributes can be found in\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx).\n\nA _property descriptor_ is a record with some of the following attributes:\n\n- `value`\n  - : The value associated with the property (data descriptors only).\n- `writable`\n  - : `true` if and only if the value associated with the property may be\n    changed (data descriptors only).\n- `get`\n  - : A function which serves as a getter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no getter (accessor descriptors only).\n- `set`\n  - : A function which serves as a setter for the property, or [`undefined`](../../globals/undefined.mdx) if\n    there is no setter (accessor descriptors only).\n- `configurable`\n  - : `true` if and only if the type of this property descriptor may be changed\n    and if the property may be deleted from the corresponding object.\n- `enumerable`\n  - : `true` if and only if this property shows up during enumeration of the\n    properties on the corresponding object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Object/getOwnPropertyNames.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertyNames()\n\nThe **`Object.getOwnPropertyNames()`** method returns an array of all properties (including non-enumerable properties except for those which use Symbol) found directly in a given object.\n\n## Syntax\n\n```js\nObject.getOwnPropertyNames(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object whose enumerable and non-enumerable properties are to be returned.\n\n### Return value\n\nAn array of strings that corresponds to the properties found directly in the given object.\n\n## Description\n\n`Object.getOwnPropertyNames()` returns an array whose elements are strings corresponding to the enumerable and non-enumerable properties found directly in a given object `obj`. The ordering of the enumerable properties in the array is consistent with the ordering exposed by a `for...in` loop (or by [`Object.keys()`](../../globals/Object/keys.mdx)) over the properties of the object. The non-negative integer keys of the object (both enumerable and non-enumerable) are added in ascending order to the array first, followed by the string keys in the order of insertion.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Object/getOwnPropertySymbols.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getOwnPropertySymbols()\n\nThe **`Object.getOwnPropertySymbols()`** method returns an array of all symbol properties found directly upon a given object.\n\n## Syntax\n\n```js\nObject.getOwnPropertySymbols(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object whose symbol properties are to be returned.\n\n### Return value\n\nAn array of all symbol properties found directly upon the given object.\n\n## Description\n\nSimilar to [`Object.getOwnPropertyNames()`](../../globals/Object/getOwnPropertyNames.mdx), you can get all symbol properties of a given object as an array of symbols. Note that [`Object.getOwnPropertyNames()`](../../globals/Object/getOwnPropertyNames.mdx) itself does not contain the symbol properties of an object and only the string properties.\n\nAs all objects have no own symbol properties initially, `Object.getOwnPropertySymbols()` returns an empty array unless you have set symbol properties on your object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Object/getPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.getPrototypeOf()\n\nThe **`Object.getPrototypeOf()`** method returns the prototype\n(i.e. the value of the internal `[[Prototype]]` property) of the specified\nobject.\n\n## Syntax\n\n```js\nObject.getPrototypeOf(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object whose prototype is to be returned.\n\n### Return value\n\nThe prototype of the given object, which may be `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Object/hasOwn.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.hasOwn()\n\nThe **`Object.hasOwn()`** static method returns `true` if the specified object has the indicated property as its _own_ property.\nIf the property is inherited, or does not exist, the method returns `false`.\n\n> **Note:** `Object.hasOwn()` is intended as a replacement for [`Object.prototype.hasOwnProperty()`](../../globals/Object/prototype/hasOwnProperty.mdx).\n\n\n\n## Syntax\n\n```js\nhasOwn(instance, prop)\n```\n\n### Parameters\n\n- `instance`\n  - : The JavaScript object instance to test.\n- `prop`\n  - : The `String` name or [Symbol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol) of the property to test.\n\n### Return value\n\n`true` if the specified object has directly defined the specified property.\nOtherwise `false`\n\n## Description\n\nThe **`Object.hasOwn()`** method returns `true` if the specified property is a\ndirect property of the object — even if the property value is `null` or `undefined`.\nThe method returns `false` if the property is inherited, or has not been declared at all.\nUnlike the `in` operator, this\nmethod does not check for the specified property in the object's prototype chain.\n\nIt is recommended over [`Object.prototype.hasOwnProperty()`](../../globals/Object/prototype/hasOwnProperty.mdx) because\nit works for objects created using `Object.create(null)` and with objects that\nhave overridden the inherited `hasOwnProperty()` method. While it is possible to\nworkaround these problems by calling `Object.prototype.hasOwnProperty()` on an\nexternal object, `Object.hasOwn()` is more intuitive.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Object/is.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.is()\n\nThe **`Object.is()`** method determines whether two values are [the same value](https://developer.mozilla.org/docs/Web/JavaScript/Equality_comparisons_and_sameness#same-value_equality_using_object.is).\n\n## Syntax\n\n```js\nObject.is(value1, value2)\n```\n\n### Parameters\n\n- `value1`\n  - : The first value to compare.\n- `value2`\n  - : The second value to compare.\n\n### Return value\n\nA boolean indicating whether or not the two arguments are the same value.\n\n## Description\n\n`Object.is()` determines whether two values are [the same value](https://developer.mozilla.org/docs/Web/JavaScript/Equality_comparisons_and_sameness#same-value_equality_using_object.is). Two values are the same if one of the following holds:\n\n- both [`undefined`](../../globals/undefined.mdx)\n- both `null`\n- both `true` or both `false`\n- both strings of the same length with the same characters in the same order\n- both the same object (meaning both values reference the same object in memory)\n- both `BigInts` with the same numeric value\n- both `Symbols` that reference the same symbol value\n- both numbers and\n\n  - both `+0`\n  - both `-0`\n  - both [`NaN`](../../globals/NaN.mdx)\n  - or both non-zero, not [`NaN`](../../globals/NaN.mdx), and have the same value\n\n`Object.is()` is not equivalent to the [`==`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Equality) operator. The `==` operator applies various coercions to both sides (if they are not the same type) before testing for equality (resulting in such behavior as `\"\" == false` being `true`), but `Object.is()` doesn't coerce either value.\n\n`Object.is()` is also _not_ equivalent to the [`===`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Strict_equality) operator. The only difference between `Object.is()` and `===` is in their treatment of signed zeros and `NaN` values. The `===` operator (and the `==` operator) treats the number values `-0` and `+0` as equal, but treats [`NaN`](../../globals/NaN.mdx) as not equal to each other.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Object/isExtensible.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.isExtensible()\n\nThe **`Object.isExtensible()`** method determines if an object\nis extensible (whether it can have new properties added to it).\n\n## Syntax\n\n```js\nObject.isExtensible(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be checked.\n\n### Return value\n\nA `Boolean` indicating whether or not the given object is extensible.\n\n## Description\n\nObjects are extensible by default: they can have new properties added to them, and their `[[Prototype]]` can be re-assigned. An object can be marked as non-extensible using one of [`Object.preventExtensions()`](../../globals/Object/preventExtensions.mdx), [`Object.seal()`](../../globals/Object/seal.mdx), [`Object.freeze()`](../../globals/Object/freeze.mdx), or [`Reflect.preventExtensions()`](../../globals/Reflect/preventExtensions.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Object/isFrozen.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.isFrozen()\n\nThe **`Object.isFrozen()`** determines if an object is\n[frozen](../../globals/Object/freeze.mdx).\n\n## Syntax\n\n```js\nObject.isFrozen(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be checked.\n\n### Return value\n\nA `Boolean` indicating whether or not the given object is frozen.\n\n## Description\n\nAn object is frozen if and only if it is not [extensible](../../globals/Object/isExtensible.mdx), all its properties are non-configurable, and all its data\nproperties (that is, properties which are not accessor properties with getter or setter\ncomponents) are non-writable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Object/isSealed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.isSealed()\n\nThe **`Object.isSealed()`** method determines if an object is\nsealed.\n\n## Syntax\n\n```js\nObject.isSealed(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be checked.\n\n### Return value\n\nA `Boolean` indicating whether or not the given object is sealed.\n\n## Description\n\nReturns `true` if the object is sealed, otherwise `false`. An\nobject is sealed if it is not [extensible](../../globals/Object/isExtensible.mdx) and\nif all its properties are non-configurable and therefore not removable (but not\nnecessarily non-writable).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Object/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.keys()\n\nThe **`Object.keys()`** method returns an array of a given object's own enumerable string-keyed property names.\n\n## Syntax\n\n```js\nObject.keys(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : An object.\n\n### Return value\n\nAn array of strings representing the given object's own enumerable string-keyed property keys.\n\n## Description\n\n`Object.keys()` returns an array whose elements are strings corresponding to the enumerable string-keyed property names found directly upon `object`. This is the same as iterating with a `for...in` loop, except that a `for...in` loop enumerates properties in the prototype chain as well. The order of the array returned by `Object.keys()` is the same as that provided by a `for...in` loop.\n\nIf you need the property values, use [`Object.values()`](../../globals/Object/values.mdx) instead. If you need both the property keys and values, use [`Object.entries()`](../../globals/Object/entries.mdx) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Object/preventExtensions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.preventExtensions()\n\nThe **`Object.preventExtensions()`** method prevents new\nproperties from ever being added to an object (i.e. prevents future extensions to the\nobject). It also prevents the object's prototype from being re-assigned.\n\n## Syntax\n\n```js\nObject.preventExtensions(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be made non-extensible.\n\n### Return value\n\nThe object being made non-extensible.\n\n## Description\n\nAn object is extensible if new properties can be added to it.\n`Object.preventExtensions()` marks an object as no longer extensible, so that\nit will never have properties beyond the ones it had at the time it was marked as\nnon-extensible. Note that the properties of a non-extensible object, in general, may\nstill be _deleted_. Attempting to add new properties to a non-extensible object\nwill fail, either silently or, in [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), throwing a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\nUnlike [`Object.seal()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/seal) and [`Object.freeze()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/freeze), `Object.preventExtensions()` invokes an intrinsic JavaScript behavior and cannot be replaced with a composition of several other operations. It also has its `Reflect` counterpart (which only exists for intrinsic operations), [`Reflect.preventExtensions()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Reflect/preventExtensions).\n\n`Object.preventExtensions()` only prevents addition of own properties. Properties can still be added to the object prototype.\n\nThis method makes the `[[Prototype]]` of the target immutable; any `[[Prototype]]` re-assignment will throw a `TypeError`. This behavior is specific to the internal `[[Prototype]]` property; other properties of the target object will remain mutable.\n\nThere is no way to make an object extensible again once it has been made non-extensible.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Object/prototype/constructor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.constructor\n\nThe **`constructor`** data property of an `Object` instance returns a reference to the constructor function that created the instance object. Note that the value of this property is a reference to _the function itself_, not a string containing the function's name.\n\n> **Note:** This is a property of JavaScript objects. For the `constructor` method in classes, see [its own reference page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/constructor).\n\n## Value\n\nA reference to the constructor function that created the instance object.\n\n> **Note:** This property is created by default on the [`prototype`](../../../globals/Function/prototype/) property of every constructor function and is inherited by all objects created by that constructor.\n\n## Description\n\nAny object (with the exception of [`null` prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) will have a `constructor` property on its `[[Prototype]]`. Objects created with literals will also have a `constructor` property that points to the constructor type for that object — for example, array literals create `Array` objects, and [object literals](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Object_initializer) create plain objects.\n\n```js\nconst o1 = {};\no1.constructor === Object; // true\n\nconst o2 = new Object();\no2.constructor === Object; // true\n\nconst a1 = [];\na1.constructor === Array; // true\n\nconst a2 = new Array();\na2.constructor === Array; // true\n\nconst n = 3;\nn.constructor === Number; // true\n```\n\nNote that `constructor` usually comes from the constructor's [`prototype`](../../../globals/Function/prototype/) property. If you have a longer prototype chain, you can usually expect every object in the chain to have a `constructor` property.\n\n```js\nconst o = new TypeError(); // Inheritance: TypeError -> Error -> Object\nconst proto = Object.getPrototypeOf;\nproto(o).constructor === TypeError; // true\nproto(proto(o)).constructor === Error; // true\nproto(proto(proto(o))).constructor === Object; // true\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Object/prototype/hasOwnProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.hasOwnProperty()\n\nThe **`hasOwnProperty()`** method returns a boolean indicating whether the\nobject has the specified property as its own property (as opposed to inheriting\nit).\n\n> **Note:** [`Object.hasOwn()`](../../../globals/Object/hasOwn.mdx) is recommended over\n> `hasOwnProperty()`, in browsers where it is supported.\n\n## Syntax\n\n```js\nhasOwnProperty(prop)\n```\n\n### Parameters\n\n- `prop`\n  - : The `String` name or `Symbol` of the property to test.\n\n### Return value\n\nReturns `true` if the object has the specified property as own property; `false`\notherwise.\n\n## Description\n\nThe **`hasOwnProperty()`** method returns `true` if the specified property is a\ndirect property of the object — even if the value is `null` or `undefined`. The\nmethod returns `false` if the property is inherited, or has not been declared at\nall. Unlike the `in` operator, this\nmethod does not check for the specified property in the object's prototype\nchain.\n\nThe method can be called on _most_ JavaScript objects, because most objects\ndescend from `Object`, and hence inherit its methods. For\nexample `Array` is an `Object`, so you can\nuse `hasOwnProperty()` method to check whether an index exists:\n\n```js\nconst fruits = ['Apple', 'Banana','Watermelon', 'Orange'];\nfruits.hasOwnProperty(3);   // true ('Orange')\nfruits.hasOwnProperty(4);   // false - not defined\n```\n\nThe method will not be available in objects where it is reimplemented, or on\nobjects created using `Object.create(null)` (as these don't inherit from\n`Object.prototype`). Examples for these cases are given below.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Object/prototype/isPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.isPrototypeOf()\n\nThe **`isPrototypeOf()`** method checks if an object exists in another object's prototype chain.\n\n> **Note:** `isPrototypeOf()` differs from the [`instanceof`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/instanceof) operator. In the expression `object instanceof AFunction`, `object`'s prototype chain is checked against `AFunction.prototype`, not against `AFunction` itself.\n\n## Syntax\n\n```js\nisPrototypeOf(object)\n```\n\n### Parameters\n\n- `object`\n  - : The object whose prototype chain will be searched.\n\n### Return value\n\nA boolean indicating whether the calling object (`this`) lies in the prototype chain of `object`. Directly returns `false` when `object` is not an object (i.e. a primitive).\n\n### Errors thrown\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown if `this` is `null` or `undefined` (because it can't be [converted to an object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#object_coercion)).\n\n## Description\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `isPrototypeOf()` method. This method allows you to check whether or not the object exists within another object's prototype chain. If the `object` passed as the parameter is not an object (i.e. a primitive), the method directly returns `false`. Otherwise, the `this` value is [converted to an object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#object_coercion), and the prototype chain of `object` is searched for the `this` value, until the end of the chain is reached or the `this` value is found.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Object/prototype/propertyIsEnumerable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.propertyIsEnumerable()\n\nThe **`propertyIsEnumerable()`** method returns a boolean indicating whether the specified property is the object's [enumerable own](https://developer.mozilla.org/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) property.\n\n## Syntax\n\n```js\npropertyIsEnumerable(prop)\n```\n\n### Parameters\n\n- `prop`\n  - : The name of the property to test. Can be a string or a `Symbol`.\n\n### Return value\n\nA boolean value indicating whether the specified property is enumerable and is the object's own property.\n\n## Description\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `propertyIsEnumerable()` method. This method determines if the specified property, string or symbol, is an enumerable own property of the object. If the object does not have the specified property, this method returns `false`.\n\nThis method is equivalent to [`Object.getOwnPropertyDescriptor(obj, prop)?.enumerable ?? false`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptor).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Object/prototype/toLocaleString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.toLocaleString()\n\nThe **`toLocaleString()`** method returns a string representing the object. This method is meant to be overridden by derived objects for locale-specific purposes.\n\n## Syntax\n\n```js\ntoLocaleString()\n```\n\n### Parameters\n\nNone. However, all objects that override this method are expected to accept at most two parameters, corresponding to `locales` and `options`, such as [`Date.prototype.toLocaleString()`](../../../globals/Date/prototype/toLocaleString.mdx). The parameter positions should not be used for any other purpose.\n\n### Return value\n\nThe return value of calling `this.toString()`.\n\n## Description\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `toLocaleString()` method. `Object`'s `toLocaleString` returns the result of calling [`this.toString()`](../../../globals/Object/prototype/toString.mdx).\n\nThis function is provided to give objects a generic `toLocaleString` method, even though not all may use it. In the core language, these built-in objects override `toLocaleString` to provide locale-specific formatting:\n\n- `Array`: [`Array.prototype.toLocaleString()`](../../../globals/Array/prototype/toLocaleString.mdx)\n- `Number`: [`Number.prototype.toLocaleString()`](../../../globals/Number/prototype/toLocaleString.mdx)\n- `Date`: [`Date.prototype.toLocaleString()`](../../../globals/Date/prototype/toLocaleString.mdx)\n- `BigInt`: [`BigInt.prototype.toLocaleString()`](../../../globals/BigInt/prototype/toLocaleString.mdx)\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Object/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.toString()\n\nThe **`toString()`** method returns a string representing the object. This method is meant to be overridden by derived objects for custom [type conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) logic.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nBy default `toString()` takes no parameters. However, objects that inherit from `Object` may override it with their own implementations that do take parameters. For example, the [`Number.prototype.toString()`](../../../globals/Number/prototype/toString.mdx) and [`BigInt.prototype.toString()`](../../../globals/BigInt/prototype/toString.mdx) methods take an optional `radix` parameter.\n\n### Return value\n\nA string representing the object.\n\n## Description\n\nJavaScript calls the `toString` method to [convert an object to a primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion). You rarely need to invoke the `toString` method yourself; JavaScript automatically invokes it when encountering an object where a primitive value is expected.\n\nThis method is called in priority by [string conversion](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion), but [numeric conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#numeric_coercion) and [primitive conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion) call `valueOf()` in priority. However, because the base [`valueOf()`](../../../globals/Object/prototype/valueOf.mdx) method returns an object, the `toString()` method is usually called in the end, unless the object overrides `valueOf()`. For example, `+[1]` returns `1`, because its [`toString`](../../../globals/Array/prototype/toString.mdx) method returns `\"1\"`, which is then converted to a number.\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `toString()` method. When you create a custom object, you can override `toString()` to call a custom method, so that your custom object can be converted to a string value. Alternatively, you can add a [`Symbol.toPrimitive`](../../../globals/Symbol/toPrimitive.mdx) method, which allows even more control over the conversion process, and will always be preferred over `valueOf` or `toString` for any type conversion.\n\nTo use the base `Object.prototype.toString()` with an object that has it overridden (or to invoke it on `null` or `undefined`), you need to call [`Function.prototype.call()`](../../../globals/Function/prototype/call.mdx) or [`Function.prototype.apply()`](../../../globals/Function/prototype/apply.mdx) on it, passing the object you want to inspect as the first parameter (called `thisArg`).\n\n```js\nconst arr = [1, 2, 3];\n\narr.toString(); // \"1,2,3\"\nObject.prototype.toString.call(arr); // \"[object Array]\"\n```\n\n`Object.prototype.toString()` returns `\"[object Type]\"`, where `Type` is the object type. If the object has a [`Symbol.toStringTag`](../../../globals/Symbol/toStringTag.mdx) property whose value is a string, that value will be used as the `Type`. Many built-in objects, including [`Map`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map) and [`Symbol`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol), have a `Symbol.toStringTag`. Some objects predating ES6 do not have `Symbol.toStringTag`, but have a special tag nonetheless. They include (the tag is the same as the type name given below):\n\n- [`Array`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\n- [`Function`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions) (anything whose [`typeof`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/typeof) returns `\"function\"`)\n- [`Error`](../../../globals/Error/Error.mdx)\n- [`Boolean`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)\n- [`Number`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)\n- [`String`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\n- [`Date`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date)\n- [`RegExp`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp)\n\nThe [`arguments`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Functions/arguments) object returns `\"[object Arguments]\"`. Everything else, including user-defined classes, unless with a custom `Symbol.toStringTag`, will return `\"[object Object]\"`.\n\n`Object.prototype.toString()` invoked on [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) and [`undefined`](../../../globals/undefined.mdx) returns `[object Null]` and `[object Undefined]`, respectively.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Object/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.prototype.valueOf()\n\nThe **`valueOf()`** method of `Object` converts the `this` value [to an object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#object_coercion). This method is meant to be overridden by derived objects for custom [type conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) logic.\n\n\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nThe `this` value, converted to an object.\n\n> **Note:** In order for `valueOf` to be useful during type conversion, it must return a primitive. Because all primitive types have their own `valueOf()` methods, calling `aPrimitiveValue.valueOf()` generally does not invoke `Object.prototype.valueOf()`.\n\n## Description\n\nJavaScript calls the `valueOf` method to [convert an object to a primitive value](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion). You rarely need to invoke the `valueOf` method yourself; JavaScript automatically invokes it when encountering an object where a primitive value is expected.\n\nThis method is called in priority by [numeric conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#numeric_coercion) and [primitive conversion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion), but [string conversion](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) calls `toString()` in priority, and `toString()` is very likely to return a string value (even for the [`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx) base implementation), so `valueOf()` is usually not called in this case.\n\nAll objects that inherit from `Object.prototype` (that is, all except [`null`-prototype objects](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects)) inherit the `toString()` method. The `Object.prototype.valueOf()` base implementation is deliberately useless: by returning an object, its return value will never be used by any [primitive conversion algorithm](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion). Many built-in objects override this method to return an appropriate primitive value. When you create a custom object, you can override `valueOf()` to call a custom method, so that your custom object can be converted to a primitive value. Generally, `valueOf()` is used to return a value that is most meaningful for the object — unlike `toString()`, it does not need to be a string. Alternatively, you can add a [`Symbol.toPrimitive`](../../../globals/Symbol/toPrimitive.mdx) method, which allows even more control over the conversion process, and will always be preferred over `valueOf` or `toString` for any type conversion.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Object/seal.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.seal()\n\nThe **`Object.seal()`** method _seals_ an object. Sealing an object [prevents extensions](../../globals/Object/preventExtensions.mdx) and makes existing properties non-configurable. A sealed object has a fixed set of properties: new properties cannot be added, existing properties cannot be removed, their enumerability and configurability cannot be changed, and its prototype cannot be re-assigned. Values of existing properties can still be changed as long as they are writable. `seal()` returns the same object that was passed in.\n\n## Syntax\n\n```js\nObject.seal(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which should be sealed.\n\n### Return value\n\nThe object being sealed.\n\n## Description\n\nSealing an object is equivalent to [preventing extensions](../../globals/Object/preventExtensions.mdx) and then changing all existing properties' descriptors to `configurable: false`. This has the effect of making the set of properties on the object fixed. Making all properties non-configurable\nalso prevents them from being converted from data properties to accessor properties and\nvice versa, but it does not prevent the values of data properties from being changed.\nAttempting to delete or add properties to a sealed object, or to convert a data property\nto accessor or vice versa, will fail, either silently or by throwing a\n[`TypeError`](../../globals/TypeError/TypeError.mdx) (most commonly, although not exclusively, when in \"strict mode\" code).\n\nThe prototype chain remains untouched. However, due to the effect of [preventing extensions](../../globals/Object/preventExtensions.mdx), the `[[Prototype]]` cannot be reassigned.\n\nUnlike [`Object.freeze()`](../../globals/Object/freeze.mdx), objects sealed with `Object.seal()` may have their existing\nproperties changed, as long as they are writable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Object/setPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.setPrototypeOf()\n\nThe **`Object.setPrototypeOf()`** method sets the prototype (i.e., the internal `[[Prototype]]` property) of a specified object to another object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null).\n\n> **Warning:** Changing the `[[Prototype]]` of an object is, by the nature of how modern JavaScript engines optimize property accesses, currently a very slow operation in every browser and JavaScript engine. In addition, the effects of altering inheritance are subtle and far-flung, and are not limited to the time spent in the `Object.setPrototypeOf(...)` statement, but may extend to **_any_** code that has access to any object whose `[[Prototype]]` has been altered. You can read more in [JavaScript engine fundamentals: optimizing prototypes](https://mathiasbynens.be/notes/prototypes).\n>\n> Because this feature is a part of the language, it is still the burden on engine developers to implement that feature performantly (ideally). Until engine developers address this issue, if you are concerned about performance, you should avoid setting the `[[Prototype]]` of an object. Instead, create a new object with the desired `[[Prototype]]` using [`Object.create()`](../../globals/Object/create.mdx).\n\n## Syntax\n\n```js\nObject.setPrototypeOf(obj, prototype)\n```\n\n### Parameters\n\n- `obj`\n  - : The object which is to have its prototype set.\n- `prototype`\n  - : The object's new prototype (an object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null)).\n\n### Return value\n\nThe specified object.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if one of the following conditions is met:\n    - The `obj` parameter is [non-extensible](../../globals/Object/isExtensible.mdx), or it's an [immutable prototype exotic object](https://tc39.es/ecma262/#sec-immutable-prototype-exotic-objects), such as `Object.prototype`.\n    - The `prototype` parameter is not an object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null).\n\n## Description\n\n`Object.setPrototypeOf()` is generally considered the proper way to set the prototype of an object.\n\nIf the `obj` parameter is not an object (e.g. number, string, etc.), this method does nothing.\n\nFor security concerns, there are certain built-in objects that are designed to have an _immutable prototype_. This prevents prototype pollution attacks, especially [proxy-related ones](https://github.com/tc39/ecma262/issues/272). The core language only specifies `Object.prototype` as an immutable prototype exotic object, whose prototype is always `null`.\n\n```js\nObject.isExtensible(Object.prototype); // true; you can add more properties\nObject.setPrototypeOf(Object.prototype, {}); // TypeError: Immutable prototype object '#<Object>' cannot have their prototype set\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Object/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Object.values()\n\nThe **`Object.values()`** method returns an array of a given object's own enumerable string-keyed property values.\n\n## Syntax\n\n```js\nObject.values(obj)\n```\n\n### Parameters\n\n- `obj`\n  - : An object.\n\n### Return value\n\nAn array containing the given object's own enumerable string-keyed property values.\n\n## Description\n\n`Object.values()` returns an array whose elements are strings corresponding to the enumerable string-keyed property values found directly upon `object`. This is the same as iterating with a `for...in` loop, except that a `for...in` loop enumerates properties in the prototype chain as well. The order of the array returned by `Object.values()` is the same as that provided by a `for...in` loop.\n\nIf you need the property keys, use [`Object.keys()`](../../globals/Object/keys.mdx) instead. If you need both the property keys and values, use [`Object.entries()`](../../globals/Object/entries.mdx) instead.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Promise/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get Promise[Symbol.species]\n\nThe **`Promise[Symbol.species]`** accessor property returns the constructor used to construct return values from promise methods.\n\n> **Warning:** The existence of `Symbol.species` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Syntax\n\n```js\nPromise[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct return values from promise chaining methods that create new promises.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `Promise` objects. Subclass constructors may override it to change the constructor assignment. The default implementation is basically:\n\n```js\n// Hypothetical underlying implementation for illustration\nclass Promise {\n  static get [Symbol.species]() {\n    return this;\n  }\n}\n```\n\nBecause of this polymorphic implementation, `Symbol.species` of derived subclasses would also return the constructor itself by default.\n\n```js\nclass SubPromise extends Promise {}\nSubPromise[Symbol.species] === Promise; // true\n```\n\nPromise chaining methods — [`then()`](../../globals/Promise/prototype/then.mdx), [`finally()`](../../globals/Promise/prototype/finally.mdx) — return new promise objects. They get the constructor to construct the new promise through `this.constructor[Symbol.species]`. If `this.constructor` is `undefined`, or if `this.constructor[Symbol.species]` is `undefined` or `null`, the default [`Promise()`](../../globals/Promise/Promise.mdx) constructor is used. Otherwise, the constructor returned by `this.constructor[Symbol.species]` is used to construct the new promise object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Promise/Promise.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise()\n\nThe **`Promise()`** constructor is primarily used to wrap functions that do not already support promises.\n\n## Syntax\n\n```js\nnew Promise(executor)\n```\n\n> **Note:** `Promise()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `executor`\n  - : A `function` to be executed by the constructor. It receives two functions as parameters: `resolveFunc` and `rejectFunc`. Any errors thrown in the `executor` will cause the promise to be rejected, and the return value will be neglected. The semantics of `executor` are detailed below.\n\n### Return value\n\nWhen called via `new`, the `Promise` constructor returns a promise object. The promise object will become _resolved_ when either of the functions `resolveFunc` or `rejectFunc` are invoked. Note that if you call `resolveFunc` or `rejectFunc` and pass another `Promise` object as an argument, it can be said to be \"resolved\", but still not \"settled\". See the [Promise description](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#description) for more explanation.\n\n## Description\n\nTraditionally (before promises), asynchronous tasks were designed as callbacks.\n\n```js\nreadFile(\"./data.txt\", (error, result) => {\n  // This callback will be called when the task is done, with the\n  // final `error` or `result`. Any operation dependent on the\n  // result must be defined within this callback.\n});\n// Code here is immediately executed after the `readFile` request\n// is fired. It does not wait for the callback to be called, hence\n// making `readFile` \"asynchronous\".\n```\n\nTo take advantage of the readability improvement and language features offered by promises, the `Promise()` constructor allows one to transform the callback-based API to a promise-based one.\n\n> **Note:** If your task is already promise-based, you likely do not need the `Promise()` constructor.\n\nThe `executor` is custom code that ties an outcome in a callback to a promise. You, the programmer, write the `executor`. Its signature is expected to be:\n\n```js\nfunction executor(resolveFunc, rejectFunc) {\n  // Typically, some asynchronous operation that accepts a callback,\n  // like the `readFile` function above\n}\n```\n\n`resolveFunc` and `rejectFunc` are also functions, and you can give them whatever actual names you want. Their signatures are simple: they accept a single parameter of any type.\n\n```js\nresolveFunc(value); // call on resolved\nrejectFunc(reason); // call on rejected\n```\n\nThe `value` parameter passed to `resolveFunc` can be another promise object, in which case the newly constructed promise's state will be \"locked in\" to the promise passed (as part of the [resolution](#resolver-function) promise). The `rejectFunc` has semantics close to the [`throw`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/throw) statement, so `reason` is typically an [`Error`](../../globals/Error/Error.mdx) instance. If either `value` or `reason` is omitted, the promise is fulfilled/rejected with `undefined`.\n\nThe `executor`'s completion state has limited effect on the promise's state:\n\n- The `executor` return value is ignored. `return` statements within the `executor` merely impact control flow and alter whether a part of the function is executed, but do not have any impact on the promise's fulfillment value. If `executor` exits and it's impossible for `resolveFunc` or `rejectFunc` to be called in the future (for example, there are no async tasks scheduled), then the promise remains pending forever.\n- If an error is thrown in the `executor`, the promise is rejected, unless `resolveFunc` or `rejectFunc` has already been called.\n\n> **Note:** The existence of pending promises does not prevent the program from exiting. If the event loop is empty, the program exits despite any pending promises (because those are necessarily forever-pending).\n\nHere's a summary of the typical flow:\n\n1. At the time when the constructor generates the new `Promise` object, it also generates a corresponding pair of functions for `resolveFunc` and `rejectFunc`; these are \"tethered\" to the `Promise` object.\n2. `executor` typically wraps some asynchronous operation which provides a callback-based API. The callback (the one passed to the original callback-based API) is defined within the `executor` code, so it has access to the `resolveFunc` and `rejectFunc`.\n3. The `executor` is called synchronously (as soon as the `Promise` is constructed) with the `resolveFunc` and `rejectFunc` functions as arguments.\n4. The code within the `executor` has the opportunity to perform some operation. The eventual completion of the asynchronous task is communicated with the promise instance via the side effect caused by `resolveFunc` or `rejectFunc`. The side effect is that the `Promise` object becomes \"resolved\".\n   - If `resolveFunc` is called first, the value passed will be [resolved](#resolver-function). The promise may stay pending (in case another [thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) is passed), become fulfilled (in most cases where a non-thenable value is passed), or become rejected (in case of an invalid resolution value).\n   - If `rejectFunc` is called first, the promise instantly becomes rejected.\n   - Once one of the resolving functions (`resolveFunc` or `rejectFunc`) is called, the promise stays resolved. Only the first call to `resolveFunc` or `rejectFunc` affects the promise's eventual state, and subsequent calls to either function can neither change the fulfillment value/rejection reason nor toggle its eventual state from \"fulfilled\" to \"rejected\" or opposite.\n   - If `executor` exits by throwing an error, then the promise is rejected. However, the error is ignored if one of the resolving functions has already been called (so that the promise is already resolved).\n   - Resolving the promise does not necessarily cause the promise to become fulfilled or rejected (i.e. settled). The promise may still be pending because it's resolved with another thenable, but its eventual state will match that of the resolved thenable.\n5. Once the promise settles, it (asynchronously) invokes any further handlers associated through [`Promise.prototype.then`](../../globals/Promise/prototype/then.mdx), [`Promise.prototype.catch`](../../globals/Promise/prototype/catch.mdx), or [`Promise.prototype.finally`](../../globals/Promise/prototype/finally.mdx). The eventual fulfillment value or rejection reason is passed to the invocation of fulfillment and rejection handlers as an input parameter (see [Chained Promises](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#chained_promises)).\n\nFor example, the callback-based `readFile` API above can be transformed into a promise-based one.\n\n```js\nconst readFilePromise = (path) =>\n  new Promise((resolve, reject) => {\n    readFile(path, (error, result) => {\n      if (error) {\n        reject(error);\n      } else {\n        resolve(result);\n      }\n    });\n  });\n\nreadFilePromise(\"./data.txt\")\n  .then((result) => console.log(result))\n  .catch((error) => console.error(\"Failed to read data\"));\n```\n\n### Resolver function\n\nThe resolver function `resolveFunc` has the following behaviors:\n\n- If it's called with the same value as the newly created promise (the promise it's \"tethered to\"), the promise is rejected with a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n- If it's called with a non-[thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) value (a primitive, or an object whose `then` property is not callable, including when the property is not present), the promise is immediately fulfilled with that value.\n- If it's called with a thenable value (including another `Promise` instance), then the thenable's `then` method is saved and called in the future (it's always called asynchronously). The `then` method will be called with two callbacks, which are two new functions with the exact same behaviors as the `resolveFunc` and `rejectFunc` passed to the `executor` function. If calling the `then` method throws, then the current promise is rejected with the thrown error.\n\nIn the last case, it means code like:\n\n```js\nnew Promise((resolve, reject) => {\n  resolve(thenable);\n});\n```\n\nIs roughly equivalent to:\n\n```js\nnew Promise((resolve, reject) => {\n  try {\n    thenable.then(\n      (value) => resolve(value),\n      (reason) => reject(reason),\n    );\n  } catch (e) {\n    reject(e);\n  }\n});\n```\n\nExcept that in the `resolve(thenable)` case:\n\n1. `resolve` is called synchronously, so that calling `resolve` or `reject` again has no effect, even when the handlers attached through `anotherPromise.then()` are not called yet.\n2. The `then` method is called asynchronously, so that the promise will never be instantly resolved if a thenable is passed.\n\nBecause `resolve` is called again with whatever `thenable.then()` passes to it as `value`, the resolver function is able to flatten nested thenables, where a thenable calls its `onFulfilled` handler with another thenable. The effect is that the fulfillment handler of a real promise will never receive a thenable as its fulfillment value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Promise/all.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.all()\n\nThe **`Promise.all()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise fulfills when all of the input's promises fulfill (including when an empty iterable is passed), with an array of the fulfillment values. It rejects when any of the input's promises rejects, with this first rejection reason.\n\n## Syntax\n\n```js\nPromise.all(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array` of promises.\n\n### Return value\n\nA `Promise` that is:\n\n- **Already fulfilled**, if the `iterable` passed is empty.\n- **Asynchronously fulfilled**, when all the promises in the given `iterable` fulfill. The fulfillment value is an array of fulfillment values, in the order of the promises passed, regardless of completion order. If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) fulfilled.\n- **Asynchronously rejected**, when any of the promises in the given `iterable` rejects. The rejection reason is the rejection reason of the first promise that was rejected.\n\n## Description\n\nThe `Promise.all()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. It can be useful for aggregating the results of multiple promises. It is typically used when there are multiple related asynchronous tasks that the overall code relies on to work successfully — all of whom we want to fulfill before the code execution continues.\n\n`Promise.all()` will reject immediately upon **any** of the input promises rejecting. In comparison, the promise returned by [`Promise.allSettled()`](../../globals/Promise/allSettled.mdx) will wait for all input promises to complete, regardless of whether or not one rejects. Use `allSettled()` if you need the final result of every promise in the input iterable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Promise/allSettled.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.allSettled()\n\nThe **`Promise.allSettled()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise fulfills when all of the input's promises settle (including when an empty iterable is passed), with an array of objects that describe the outcome of each promise.\n\n## Syntax\n\n```js\nPromise.allSettled(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array` of promises.\n\n### Return value\n\nA `Promise` that is:\n\n- **Already fulfilled**, if the `iterable` passed is empty.\n- **Asynchronously fulfilled**, when all promise in the given `iterable` have settled (either fulfilled or rejected). The fulfillment value is an array of objects, each describing the outcome of one promise in the `iterable`, in the order of the promises passed, regardless of completion order. Each outcome object has the following properties:\n\n  - `status`\n    - : A string, either `\"fulfilled\"` or `\"rejected\"`, indicating the eventual state of the promise.\n  - `value`\n    - : Only present if `status` is `\"fulfilled\"`. The value that the promise was fulfilled with.\n  - `reason`\n    - : Only present if `status` is `\"rejected\"`. The reason that the promise was rejected with.\n\n  If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) fulfilled.\n\n## Description\n\nThe `Promise.allSettled()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. `Promise.allSettled()` is typically used when you have multiple asynchronous tasks that are not dependent on one another to complete successfully, or you'd always like to know the result of each promise.\n\nIn comparison, the Promise returned by [`Promise.all()`](../../globals/Promise/all.mdx) may be more appropriate if the tasks are dependent on each other, or if you'd like to immediately reject upon any of them rejecting.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Promise/any.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.any()\n\nThe **`Promise.any()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise fulfills when any of the input's promises fulfills, with this first fulfillment value. It rejects when all of the input's promises reject (including when an empty iterable is passed), with an `AggregateError` containing an array of rejection reasons.\n\n## Syntax\n\n```js\nPromise.any(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array` of promises.\n\n### Return value\n\nA `Promise` that is:\n\n- **Already rejected**, if the `iterable` passed is empty.\n- **Asynchronously fulfilled**, when any of the promises in the given `iterable` fulfills. The fulfillment value is the fulfillment value of the first promise that was fulfilled.\n- **Asynchronously rejected**, when all of the promises in the given `iterable` reject. The rejection reason is an `AggregateError` containing an array of rejection reasons in its `errors` property. The errors are in the order of the promises passed, regardless of completion order. If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) rejected.\n\n## Description\n\nThe `Promise.any()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. This method is useful for returning the first promise that fulfills. It short-circuits after a promise fulfills, so it does not wait for the other promises to complete once it finds one.\n\nUnlike [`Promise.all()`](../../globals/Promise/all.mdx), which returns an _array_ of fulfillment values, we only get one fulfillment value (assuming at least one promise fulfills). This can be beneficial if we need only one promise to fulfill but we do not care which one does. Note another difference: this method rejects upon receiving an _empty iterable_, since, truthfully, the iterable contains no items that fulfill. You may compare `Promise.any()` and `Promise.all()` with [`Array.prototype.some()`](../../globals/Array/prototype/some.mdx) and [`Array.prototype.every()`](../../globals/Array/prototype/every.mdx).\n\nAlso, unlike [`Promise.race()`](../../globals/Promise/race.mdx), which returns the first _settled_ value (either fulfillment or rejection), this method returns the first _fulfilled_ value. This method ignores all rejected promises up until the first promise that fulfills.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Promise/prototype/catch.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.prototype.catch()\n\nThe **`catch()`** method of a `Promise` object schedules a function to be called when the promise is rejected. It immediately returns an equivalent `Promise` object, allowing you to [chain](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining) calls to other promise methods. It is a shortcut for [`Promise.prototype.then(undefined, onRejected)`](../../../globals/Promise/prototype/then.mdx).\n\n## Syntax\n\n```js\ncatch(onRejected)\n\ncatch((reason) => {\n  // rejection handler\n})\n```\n\n### Parameters\n\n- `onRejected`\n  - : A `Function` called when the `Promise` is rejected. This function has one parameter: the _rejection reason_.\n\n### Return value\n\nReturns a new `Promise`. This new promise is always pending when returned, regardless of the current promise's status. It's eventually rejected if `onRejected` throws an error or returns a Promise which is itself rejected; otherwise, it's eventually fulfilled.\n\n## Description\n\nThe `catch` method is used for error handling in promise composition. Since it returns a `Promise`, it [can be chained](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining_after_a_catch) in the same way as its sister method, [`Promise.prototype.then()`](../../../globals/Promise/prototype/then.mdx).\n\nIf a promise becomes rejected, and there are no rejection handlers to call (a handler can be attached through any of [`Promise.prototype.then`](../../../globals/Promise/prototype/then.mdx), [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx), or [`Promise.prototype.finally`](../../../globals/Promise/prototype/finally.mdx)), then the rejection event is surfaced by the host. In the browser, this results in an [`unhandledrejection`](https://developer.mozilla.org/docs/Web/API/Window/unhandledrejection_event) event. If a handler is attached to a rejected promise whose rejection has already caused an unhandled rejection event, then another [`rejectionhandled`](https://developer.mozilla.org/docs/Web/API/Window/rejectionhandled_event) event is fired.\n\n`catch()` internally calls `then()` on the object upon which it was called, passing `undefined` and `onRejected` as arguments. The value of that call is directly returned. This is observable if you wrap the methods.\n\n```js\n// overriding original Promise.prototype.then/catch just to add some logs\n((Promise) => {\n  const originalThen = Promise.prototype.then;\n  const originalCatch = Promise.prototype.catch;\n\n  Promise.prototype.then = function (...args) {\n    console.log(\"Called .then on %o with arguments: %o\", this, args);\n    return originalThen.apply(this, args);\n  };\n  Promise.prototype.catch = function (...args) {\n    console.error(\"Called .catch on %o with arguments: %o\", this, args);\n    return originalCatch.apply(this, args);\n  };\n})(Promise);\n\n// calling catch on an already resolved promise\nPromise.resolve().catch(function XXX() {});\n\n// Logs:\n// Called .catch on Promise{} with arguments: Arguments{1} [0: function XXX()]\n// Called .then on Promise{} with arguments: Arguments{2} [0: undefined, 1: function XXX()]\n```\n\nThis means that passing `undefined` still causes the returned promise to be rejected, and you have to pass a function to prevent the final promise from being rejected.\n\nBecause `catch()` just calls `then()`, it supports subclassing.\n\n> **Note:** The examples below are throwing instances of [`Error`](../../../globals/Error/Error.mdx). As with synchronous [`throw`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/throw) statements, this is considered a good practice; otherwise, the part doing the catching would have to perform checks to see if the argument was a string or an error, and you might lose valuable information such as stack traces.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Promise/prototype/finally.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.prototype.finally()\n\nThe **`finally()`** method of a `Promise` object schedules a function to be called when the promise is settled (either fulfilled or rejected). It immediately returns an equivalent `Promise` object, allowing you to [chain](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining) calls to other promise methods.\n\nThis lets you avoid duplicating code in both the promise's [`Promise.prototype.then`](../../../globals/Promise/prototype/then.mdx) and [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx) handlers.\n\n## Syntax\n\n```js\nfinally(onFinally)\n\nfinally(() => {\n  // Code that will run after promise is settled (fulfilled or rejected)\n})\n```\n\n### Parameters\n\n- `onFinally`\n  - : A `Function` called when the `Promise` is settled. This handler receives no parameters.\n\n### Return value\n\nReturns an equivalent `Promise`. If the handler throws an error or returns a rejected promise, the promise returned by `finally()` will be rejected with that value instead. Otherwise, the return value of the handler does not affect the state of the original promise.\n\n## Description\n\nThe `finally()` method can be useful if you want to do some processing or cleanup once the promise is settled, regardless of its outcome.\n\nThe `finally()` method is very similar to calling [`then(onFinally, onFinally)`](../../../globals/Promise/prototype/then.mdx). However, there are a couple of differences:\n\n- When creating a function inline, you can pass it once, instead of being forced to either declare it twice, or create a variable for it.\n- The `onFinally` callback does not receive any argument. This use case is for precisely when you _do not care_ about the rejection reason or the fulfillment value, and so there's no need to provide it.\n- A `finally()` call is usually transparent and does not change the eventual state of the original promise. So for example:\n  - Unlike `Promise.resolve(2).then(() => 77, () => {})`, which returns a promise eventually fulfilled with the value `77`, `Promise.resolve(2).finally(() => 77)` returns a promise eventually fulfilled with the value `2`.\n  - Similarly, unlike `Promise.reject(3).then(() => {}, () => 88)`, which returns a promise eventually fulfilled with the value `88`, `Promise.reject(3).finally(() => 88)` returns a promise eventually rejected with the reason `3`.\n\n> **Note:** A `throw` (or returning a rejected promise) in the `finally` callback still rejects the returned promise. For example, both `Promise.reject(3).finally(() => { throw 99; })` and `Promise.reject(3).finally(() => Promise.reject(99))` reject the returned promise with the reason `99`.\n\nLike [`Promise.prototype.catch()`](../../../globals/Promise/prototype/catch.mdx), `finally()` internally calls the `then` method on the object upon which it was called. If `onFinally` is not a function, `then()` is called with `onFinally` as both arguments — which, for [`Promise.prototype.then()`](../../../globals/Promise/prototype/then.mdx), means that no useful handler is attached. Otherwise, `then()` is called with two internally created functions, which behave like the following:\n\n> **Warning:** This is only for demonstration purposes and is not a polyfill.\n\n```js\npromise.then(\n  (value) => Promise.resolve(onFinally()).then(() => value),\n  (reason) =>\n    Promise.resolve(onFinally()).then(() => {\n      throw reason;\n    }),\n);\n```\n\nBecause `finally()` calls `then()`, it supports subclassing. Moreover, notice the [`Promise.resolve()`](../../../globals/Promise/resolve.mdx) call above — in reality, `onFinally()`'s return value is resolved using the same algorithm as `Promise.resolve()`, but the actual constructor used to construct the resolved promise will be the subclass. `finally()` gets this constructor through [`promise.constructor[Symbol.species]`](../../../globals/Promise/@@species.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Promise/prototype/then.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.prototype.then()\n\nThe **`then()`** method of a `Promise` object takes up to two arguments: callback functions for the fulfilled and rejected cases of the `Promise`. It immediately returns an equivalent `Promise` object, allowing you to [chain](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises#chaining) calls to other promise methods.\n\n## Syntax\n\n```js\nthen(onFulfilled)\nthen(onFulfilled, onRejected)\n\nthen(\n  (value) => { /* fulfillment handler */ },\n  (reason) => { /* rejection handler */ },\n)\n```\n\n### Parameters\n\n- `onFulfilled` _**optional**_\n  - : A `Function` asynchronously called if the `Promise` is fulfilled. This function has one parameter, the _fulfillment value_. If it is not a function, it is internally replaced with an _identity_ function (`(x) => x`) which simply passes the fulfillment value forward.\n- `onRejected` _**optional**_\n  - : A `Function` asynchronously called if the `Promise` is rejected. This function has one parameter, the _rejection reason_. If it is not a function, it is internally replaced with a _thrower_ function (`(x) => { throw x; }`) which throws the rejection reason it received.\n\n### Return value\n\nReturns a new `Promise` immediately. This new promise is always pending when returned, regardless of the current promise's status.\n\nOne of the `onFulfilled` and `onRejected` handlers will be executed to handle the current promise's fulfillment or rejection. The call always happens asynchronously, even when the current promise is already settled. The behavior of the returned promise (call it `p`) depends on the handler's execution result, following a specific set of rules. If the handler function:\n\n- returns a value: `p` gets fulfilled with the returned value as its value.\n- doesn't return anything: `p` gets fulfilled with `undefined`.\n- throws an error: `p` gets rejected with the thrown error as its value.\n- returns an already fulfilled promise: `p` gets fulfilled with that promise's value as its value.\n- returns an already rejected promise: `p` gets rejected with that promise's value as its value.\n- returns another pending promise: the fulfillment/rejection of the promise returned by `then` will be subsequent to the resolution/rejection of the promise returned by the handler. Also, the resolved value of the promise returned by `then` will be the same as the resolved value of the promise returned by the handler.\n\n## Description\n\nThe `then()` method schedules callback functions for the eventual completion of a Promise — either fulfillment or rejection. It is the primitive method of promises: the [thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) protocol expects all promise-like objects to expose a `then()` method, and the [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx) and [`Promise.prototype.finally`](../../../globals/Promise/prototype/finally.mdx) methods both work by invoking the object's `then()` method.\n\nFor more information about the `onRejected` handler, see the [`Promise.prototype.catch`](../../../globals/Promise/prototype/catch.mdx) reference.\n\n`then()` returns a new promise object. If you call the `then()` method twice on the same promise object (instead of chaining), then this promise object will have two pairs of settlement handlers. All handlers attached to the same promise object are always called in the order they were added. Moreover, the two promises returned by each call of `then()` start separate chains and do not wait for each other's settlement.\n\n[Thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) objects that arise along the `then()` chain are always [resolved](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise/Promise#the_resolver_function) — the `onFulfilled` handler never receives a thenable object, and any thenable returned by either handler are always resolved before being passed to the next handler. This is because when constructing the new promise, the `resolve` and `reject` functions passed by the `executor` are saved, and when the current promise settles, the respective function will be called with the fulfillment value or rejection reason. The resolving logic comes from the resolver function passed by the [`Promise()`](../../../globals/Promise/Promise.mdx) constructor.\n\n`then()` supports subclassing, which means it can be called on instances of subclasses of `Promise`, and the result will be a promise of the subclass type. You can customize the type of the return value through the [`[Symbol.species]`](../../../globals/Promise/@@species.mdx) property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Promise/race.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.race()\n\nThe **`Promise.race()`** method takes an iterable of promises as input and returns a single `Promise`. This returned promise settles with the eventual state of the first promise that settles.\n\n## Syntax\n\n```js\nPromise.race(iterable)\n```\n\n### Parameters\n\n- `iterable`\n  - : An [iterable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol) (such as an `Array`) of promises.\n\n### Return value\n\nA `Promise` that **asynchronously settles** with the eventual state of the first promise in the `iterable` to settle. In other words, it fulfills if the first promise to settle is fulfilled, and rejects if the first promise to settle is rejected. The returned promise remains pending forever if the `iterable` passed is empty. If the `iterable` passed is non-empty but contains no pending promises, the returned promise is still asynchronously (instead of synchronously) settled.\n\n## Description\n\nThe `Promise.race()` method is one of the [promise concurrency](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#promise_concurrency) methods. It's useful when you want the first async task to complete, but do not care about its eventual state (i.e. it can either succeed or fail).\n\nIf the iterable contains one or more non-promise values and/or an already settled promise, then `Promise.race()` will settle to the first of these values found in the iterable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Promise/reject.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.reject()\n\nThe **`Promise.reject()`** method returns a `Promise` object that is rejected with a given reason.\n\n## Syntax\n\n```js\nPromise.reject(reason)\n```\n\n### Parameters\n\n- `reason`\n  - : Reason why this `Promise` rejected.\n\n### Return value\n\nA `Promise` that is rejected with the given reason.\n\n## Description\n\nThe static `Promise.reject` function returns a `Promise` that is rejected. For debugging purposes and selective error catching, it is useful to make `reason` an `instanceof` [`Error`](../../globals/Error/Error.mdx).\n\n`Promise.reject()` is generic and supports subclassing, which means it can be called on subclasses of `Promise`, and the result will be a promise of the subclass type. To do so, the subclass's constructor must implement the same signature as the [`Promise()`](../../globals/Promise/Promise.mdx) constructor — accepting a single `executor` function that can be called with the `resolve` and `reject` callbacks as parameters. `Promise.reject()` is essentially a shorthand for `new Promise((resolve, reject) => reject(reason))`.\n\nUnlike [`Promise.resolve()`](../../globals/Promise/resolve.mdx), `Promise.reject()` always wraps `reason` in a new `Promise` object, even when `reason` is already a `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Promise/resolve.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Promise.resolve()\n\nThe **`Promise.resolve()`** method \"resolves\" a given value to a `Promise`. If the value is a promise, that promise is returned; if the value is a [thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables), `Promise.resolve()` will call the `then()` method with two callbacks it prepared; otherwise the returned promise will be fulfilled with the value.\n\nThis function flattens nested layers of promise-like objects (e.g. a promise that fulfills to a promise that fulfills to something) into a single layer — a promise that fulfills to a non-thenable value.\n\n## Syntax\n\n```js\nPromise.resolve(value)\n```\n\n### Parameters\n\n- `value`\n  - : Argument to be resolved by this `Promise`. Can also be a `Promise` or a thenable to resolve.\n\n### Return value\n\nA `Promise` that is resolved with the given value, or the promise passed as value, if the value was a promise object. A resolved promise can be in any of the states — fulfilled, rejected, or pending. For example, resolving a rejected promise will still result in a rejected promise.\n\n## Description\n\n`Promise.resolve()` _resolves_ a promise, which is not the same as fulfilling or rejecting the promise. See [Promise description](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#description) for definitions of the terminology. In brief, `Promise.resolve()` returns a promise whose eventual state depends on another promise, thenable object, or other value.\n\n`Promise.resolve()` is generic and supports subclassing, which means it can be called on subclasses of `Promise`, and the result will be a promise of the subclass type. To do so, the subclass's constructor must implement the same signature as the [`Promise()`](../../globals/Promise/Promise.mdx) constructor — accepting a single `executor` function that can be called with the `resolve` and `reject` callbacks as parameters.\n\n`Promise.resolve()` special-cases native `Promise` instances. If `value` belongs to `Promise` or a subclass, and `value.constructor === Promise`, then `value` is directly returned by `Promise.resolve()`, without creating a new `Promise` instance. Otherwise, `Promise.resolve()` is essentially a shorthand for `new Promise((resolve) => resolve(value))`.\n\nThe bulk of the resolving logic is actually implemented by the [resolver function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise/Promise#the_resolver_function) passed by the `Promise()` constructor. In summary:\n\n- If a non-[thenable](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise#thenables) value is passed, the returned promise is already fulfilled with that value.\n- If a thenable is passed, the returned promise will adopt the state of that thenable by calling the `then` method and passing a pair of resolving functions as arguments. (But because native promises directly pass through `Promise.resolve()` without creating a wrapper, the `then` method is not called on native promises.) If the resolver function receives another thenable object, it will be resolved agin, so that the eventual fulfillment value of the promise will never be thenable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Proxy/Proxy.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Proxy()\n\nThe **`Proxy()`** constructor is used to create `Proxy` objects.\n\n## Syntax\n\n```js\nnew Proxy(target, handler)\n```\n\n> **Note:** `Proxy()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `target`\n  - : A target object to wrap with `Proxy`. It can be any sort of object,\n    including a native array, a function, or even another proxy.\n- `handler`\n  - : An object whose properties are functions that define the behavior of the proxy when\n    an operation is performed on it.\n\n## Description\n\nUse the `Proxy()` constructor to create a new `Proxy` object.\nThis constructor takes two mandatory arguments:\n\n- `target` is the object for which you want to create the proxy\n- `handler` is the object that defines the custom behavior of the proxy.\n\nAn empty handler will create a proxy that behaves, in almost all respects, exactly like\nthe target. By defining any of a set group of functions on the `handler`\nobject, you can customize specific aspects of the proxy's behavior. For example, by\ndefining `get()` you can provide a customized version of the target's\n[property accessor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Property_Accessors).\n\n### Handler functions\n\nThis section lists all the handler functions you can define. Handler functions are\nsometimes called _traps_, because they trap calls to the underlying target\nobject.\n\n- [`handler.apply()`](../../globals/Proxy/proxy/apply.mdx)\n  - : A trap for a function call.\n- [`handler.construct()`](../../globals/Proxy/proxy/construct.mdx)\n  - : A trap for the `new` operator.\n- [`handler.defineProperty()`](../../globals/Proxy/proxy/defineProperty.mdx)\n  - : A trap for [`Object.defineProperty`](../../globals/Object/defineProperty.mdx).\n- [`handler.deleteProperty()`](../../globals/Proxy/proxy/deleteProperty.mdx)\n  - : A trap for the `delete` operator.\n- [`handler.get()`](../../globals/Proxy/proxy/get.mdx)\n  - : A trap for getting property values.\n- [`handler.getOwnPropertyDescriptor()`)}](../../globals/Proxy/proxy/getOwnPropertyDescriptor.mdx)\n  - : A trap for [`Object.getOwnPropertyDescriptor`](../../globals/Object/getOwnPropertyDescriptor.mdx).\n- [`handler.getPrototypeOf()`](../../globals/Proxy/proxy/getPrototypeOf.mdx)\n  - : A trap for [`Object.getPrototypeOf()`](../../globals/Object/getPrototypeOf.mdx).\n- [`handler.has()`](../../globals/Proxy/proxy/has.mdx)\n  - : A trap for the `in` operator.\n- [`handler.isExtensible()`](../../globals/Proxy/proxy/isExtensible.mdx)\n  - : A trap for [`Object.isExtensible()`](../../globals/Object/isExtensible.mdx).\n- [`handler.ownKeys()`](../../globals/Proxy/proxy/ownKeys.mdx)\n  - : A trap for [`Object.getOwnPropertyNames()`](../../globals/Object/getOwnPropertyNames.mdx) and\n    [`Object.getOwnPropertySymbols()`](../../globals/Object/getOwnPropertySymbols.mdx).\n- [`handler.preventExtensions()`)}](../../globals/Proxy/proxy/preventExtensions.mdx)\n  - : A trap for [`Object.preventExtensions()`](../../globals/Object/preventExtensions.mdx).\n- [`handler.set()`](../../globals/Proxy/proxy/set.mdx)\n  - : A trap for setting property values.\n- [`handler.setPrototypeOf()`](../../globals/Proxy/proxy/setPrototypeOf.mdx)\n  - : A trap for [`Object.setPrototypeOf()`](../../globals/Object/setPrototypeOf.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Proxy/proxy/apply.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.apply()\n\nThe **`handler.apply()`** method is a trap for a function call.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  apply(target, thisArg, argumentsList) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `apply()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target callable object.\n- `thisArg`\n  - : The `this` argument for the call.\n- `argumentsList`\n  - : The list of arguments for the call.\n\n### Return value\n\nThe `apply()` method can return any value.\n\n## Description\n\nThe **`handler.apply()`** method is a trap for a function call.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- Function call: `proxy(...args)`\n- [`Function.prototype.apply()`](../../../globals/Function/prototype/apply.mdx) and [`Function.prototype.call()`](../../../globals/Function/prototype/call.mdx)\n- [`Reflect.apply()`](../../../globals/Reflect/apply.mdx)\n\nOr any other operation that invokes the `[[Call]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The `target` must be a callable itself. That is, it must be a function object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Proxy/proxy/construct.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.construct()\n\nThe **`handler.construct()`** method is a trap for the `new` operator. In order for the new operation to be valid on the resulting Proxy object, the target used to initialize the proxy must itself have a `[[Construct]]` internal method (i.e. `new target` must be valid).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  construct(target, argumentsList, newTarget) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `construct()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `argumentsList`\n  - : The list of arguments for the constructor.\n- `newTarget`\n  - : The constructor that was originally called, `p` above.\n\n### Return value\n\nThe `construct` method must return an object.\n\n## Description\n\nThe **`handler.construct()`** method is a trap for the `new` operator.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- The `new` operator: `new myFunction(...args)`\n- [`Reflect.construct()`](../../../globals/Reflect/construct.mdx)\n\nOr any other operation that invokes the `[[Construct]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The result must be an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Proxy/proxy/defineProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.defineProperty()\n\nThe **`handler.defineProperty()`** method is a trap for\n[`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  defineProperty(target, property, descriptor) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `defineProperty()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property whose description is to be\n    retrieved.\n- `descriptor`\n  - : The descriptor for the property being defined or modified.\n\n### Return value\n\nThe `defineProperty()` method must return a `Boolean` indicating\nwhether or not the property has been successfully defined.\n\n## Description\n\nThe **`handler.defineProperty()`** method is a trap for\n[`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.defineProperty()`](../../../globals/Object/defineProperty.mdx), [`Object.defineProperties()`](../../../globals/Object/defineProperties.mdx)\n- [`Reflect.defineProperty()`](../../../globals/Reflect/defineProperty.mdx)\n\nOr any other operation that invokes the `[[DefineOwnProperty]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- A property cannot be added, if the target object is not extensible.\n- A property cannot be added as or modified to be non-configurable, if it does not\n  exists as a non-configurable own property of the target object.\n- A property may not be non-configurable, if a corresponding configurable property of\n  the target object exists.\n- If a property has a corresponding target object property then\n  `Object.defineProperty(target, prop, descriptor)`\n  will not throw an exception.\n- In strict mode, a `false` return value from the\n  `defineProperty()` handler will throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Proxy/proxy/deleteProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.deleteProperty()\n\nThe **`handler.deleteProperty()`** method is a trap for the `delete` operator.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  deleteProperty(target, property) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `deleteProperty()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property to delete.\n\n### Return value\n\nThe `deleteProperty()` method must return a `Boolean` indicating\nwhether or not the property has been successfully deleted.\n\n## Description\n\nThe **`handler.deleteProperty()`** method is a trap for the `delete` operator.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- The [`delete`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete) operator: `delete proxy[foo]` and\n  `delete proxy.foo`\n- [`Reflect.deleteProperty()`](../../../globals/Reflect/deleteProperty.mdx)\n\nOr any other operation that invokes the `[[Delete]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- A property cannot be deleted, if it exists as a non-configurable own property of the\n  target object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Proxy/proxy/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.get()\n\nThe **`handler.get()`** method is a trap for getting a property\nvalue.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  get(target, property, receiver) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `get()` method. `this`\nis bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property to get.\n- `receiver`\n  - : Either the proxy or an object that inherits from the proxy.\n\n### Return value\n\nThe `get()` method can return any value.\n\n## Description\n\nThe **`handler.get()`** method is a trap for getting a property\nvalue.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- Property access: `proxy[foo]` and `proxy.bar`\n- [`Reflect.get()`](../../../globals/Reflect/get.mdx)\n\nOr any other operation that invokes the `[[Get]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The value reported for a property must be the same as the value of the corresponding\n  target object property if the target object property is a non-writable,\n  non-configurable own data property.\n- The value reported for a property must be undefined if the corresponding target\n  object property is a non-configurable own accessor property that has\n  `undefined` as its `[[Get]]` attribute.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Proxy/proxy/getOwnPropertyDescriptor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.getOwnPropertyDescriptor()\n\nThe **`handler.getOwnPropertyDescriptor()`** method is a trap for [`Object.getOwnPropertyDescriptor()`](../../../globals/Object/getOwnPropertyDescriptor.mdx).\n\n\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  getOwnPropertyDescriptor(target, prop) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `getOwnPropertyDescriptor()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `prop`\n  - : The name of the property whose description should be retrieved.\n\n### Return value\n\nThe `getOwnPropertyDescriptor()` method must return an object or `undefined`.\n\n## Description\n\nThe **`handler.getOwnPropertyDescriptor()`** method is a trap for [`Object.getOwnPropertyDescriptor()`](../../../globals/Object/getOwnPropertyDescriptor.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.getOwnPropertyDescriptor()`](../../../globals/Object/getOwnPropertyDescriptor.mdx)\n- [`Reflect.getOwnPropertyDescriptor()`](../../../globals/Reflect/getOwnPropertyDescriptor.mdx)\n\nOr any other operation that invokes the `[[GetOwnProperty]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `getOwnPropertyDescriptor()` must return an object or `undefined`.\n- A property cannot be reported as non-existent, if it exists as a non-configurable own property of the target object.\n- A property cannot be reported as non-existent, if it exists as an own property of the target object and the target object is not extensible.\n- A property cannot be reported as existent, if it does not exists as an own property of the target object and the target object is not extensible.\n- A property cannot be reported as non-configurable, if it does not exists as an own property of the target object or if it exists as a configurable own property of the target object.\n- The result of `Object.getOwnPropertyDescriptor(target)` can be applied to the target object using `Object.defineProperty()` and will not throw an exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Proxy/proxy/getPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.getPrototypeOf()\n\nThe **`handler.getPrototypeOf()`** method is a trap for the\n`[[GetPrototypeOf]]` internal method.\n\n## Syntax\n\n```js\nnew Proxy(obj, {\n  getPrototypeOf(target) {\n    // …\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `getPrototypeOf()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `getPrototypeOf()` method must return an object or `null`.\n\n## Description\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.getPrototypeOf()`](../../../globals/Object/getPrototypeOf.mdx)\n- [`Reflect.getPrototypeOf()`](../../../globals/Reflect/getPrototypeOf.mdx)\n- [`Object.prototype.isPrototypeOf()`](../../../globals/Object/prototype/isPrototypeOf.mdx)\n- `instanceof`\n\nOr any other operation that invokes the `[[GetPrototypeOf]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `getPrototypeOf()` method must return an object or `null`.\n- If `target` is not extensible,\n  `Object.getPrototypeOf(proxy)` method must return the same\n  value as `Object.getPrototypeOf(target)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Proxy/proxy/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.has()\n\nThe **`handler.has()`** method is a trap for the `in` operator.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  has(target, prop) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to `has()` method. `this` is\nbound to the handler.\n\n- `target`\n  - : The target object.\n- `prop`\n  - : The name or `Symbol` of the property to check for existence.\n\n### Return value\n\nThe `has()` method must return a boolean value.\n\n## Description\n\nThe **`handler.has()`** method is a trap for the `in` operator.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- The [`in`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/in) operator: `foo in proxy`\n- [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) check: `with(proxy) { (foo); }`\n- [`Reflect.has()`](../../../globals/Reflect/has.mdx)\n\nOr any other operation that invokes the `[[HasProperty]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- A property cannot be reported as non-existent, if it exists as a non-configurable\n  own property of the target object.\n- A property cannot be reported as non-existent, if it exists as an own property of\n  the target object and the target object is not extensible.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Proxy/proxy/isExtensible.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.isExtensible()\n\nThe **`handler.isExtensible()`** method is a trap for\n[`Object.isExtensible()`](../../../globals/Object/isExtensible.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  isExtensible(target) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `isExtensible()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `isExtensible()` method must return a boolean value.\n\n## Description\n\nThe **`handler.isExtensible()`** method is a trap for\n[`Object.isExtensible()`](../../../globals/Object/isExtensible.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.isExtensible()`](../../../globals/Object/isExtensible.mdx)\n- [`Reflect.isExtensible()`](../../../globals/Reflect/isExtensible.mdx)\n\nOr any other operation that invokes the `[[IsExtensible]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `Object.isExtensible(proxy)` must return the same value as\n  `Object.isExtensible(target)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Proxy/proxy/ownKeys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.ownKeys()\n\nThe **`handler.ownKeys()`** method is a trap for\n[`Reflect.ownKeys()`](../../../globals/Reflect/ownKeys.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  ownKeys(target) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `ownKeys()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `ownKeys()` method must return an enumerable object.\n\n## Description\n\nThe **`handler.ownKeys()`** method is a trap for\n[`Reflect.ownKeys()`](../../../globals/Reflect/ownKeys.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.getOwnPropertyNames()`](../../../globals/Object/getOwnPropertyNames.mdx)\n- [`Object.getOwnPropertySymbols()`](../../../globals/Object/getOwnPropertySymbols.mdx)\n- [`Object.keys()`](../../../globals/Object/keys.mdx)\n- [`Reflect.ownKeys()`](../../../globals/Reflect/ownKeys.mdx)\n\nOr any other operation that invokes the `[[OwnPropertyKeys]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- The result of `ownKeys()` must be an array.\n- The type of each array element is either a `String` or a `Symbol`.\n- The result List must contain the keys of all non-configurable own properties of the\n  target object.\n- If the target object is not extensible, then the result List must contain all the\n  keys of the own properties of the target object and no other values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Proxy/proxy/preventExtensions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.preventExtensions()\n\nThe **`handler.preventExtensions()`** method is a trap for [`Object.preventExtensions()`](../../../globals/Object/preventExtensions.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  preventExtensions(target) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameter is passed to the `preventExtensions()` method. `this` is bound to the handler.\n\n- `target`\n  - : The target object.\n\n### Return value\n\nThe `preventExtensions()` method must return a boolean value.\n\n## Description\n\nThe **`handler.preventExtensions()`** method is a trap for [`Object.preventExtensions()`](../../../globals/Object/preventExtensions.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.preventExtensions()`](../../../globals/Object/preventExtensions.mdx)\n- [`Reflect.preventExtensions()`](../../../globals/Reflect/preventExtensions.mdx)\n- [`Object.seal()`](../../../globals/Object/seal.mdx)\n- [`Object.freeze()`](../../../globals/Object/freeze.mdx)\n\nOr any other operation that invokes the `[[PreventExtensions]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- `Object.preventExtensions(proxy)` only returns `true` if `Object.isExtensible(proxy)` is `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Proxy/proxy/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.set()\n\nThe **`handler.set()`** method is a trap for setting a property\nvalue.\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  set(target, property, value, receiver) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `set()` method. `this`\nis bound to the handler.\n\n- `target`\n  - : The target object.\n- `property`\n  - : The name or `Symbol` of the property to set.\n- `value`\n  - : The new value of the property to set.\n- `receiver`\n\n  - : The object to which the assignment was originally directed. This is usually the\n    proxy itself. But a `set()` handler can also be called indirectly, via\n    the prototype chain or various other ways.\n\n    For example, suppose a script does\n    `obj.name = \"jen\"`, and `obj` is not a\n    proxy, and has no own property `.name`, but it has a proxy on its\n    prototype chain. That proxy's `set()` handler will be called, and\n    `obj` will be passed as the receiver.\n\n### Return value\n\nThe `set()` method should return a boolean value.\n\n- Return `true` to indicate that assignment succeeded.\n- If the `set()` method returns `false`, and the assignment\n  happened in strict-mode code, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) will be thrown.\n\n## Description\n\nThe **`handler.set()`** method is a trap for setting property\nvalue.\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- Property assignment: `proxy[foo] = bar` and `proxy.foo = bar`\n- [`Reflect.set()`](../../../globals/Reflect/set.mdx)\n\nOr any other operation that invokes the `[[Set]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- Cannot change the value of a property to be different from the value of the\n  corresponding target object property if the corresponding target object property is a\n  non-writable, non-configurable data property.\n- Cannot set the value of a property if the corresponding target object property is a\n  non-configurable accessor property that has `undefined` as its\n  `[[Set]]` attribute.\n- In strict mode, a `false` return value from the `set()`\n  handler will throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) exception.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Proxy/proxy/setPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# handler.setPrototypeOf()\n\nThe **`handler.setPrototypeOf()`** method is a trap for\n[`Object.setPrototypeOf()`](../../../globals/Object/setPrototypeOf.mdx).\n\n## Syntax\n\n```js\nnew Proxy(target, {\n  setPrototypeOf(target, prototype) {\n  }\n});\n```\n\n### Parameters\n\nThe following parameters are passed to the `setPrototypeOf()` method.\n`this` is bound to the handler.\n\n- `target`\n  - : The target object.\n- `prototype`\n  - : The object's new prototype or `null`.\n\n### Return value\n\nThe `setPrototypeOf()` method returns `true` if the\n`[[Prototype]]` was successfully changed, otherwise `false`.\n\n## Description\n\nThe **`handler.setPrototypeOf()`** method is a trap for\n[`Object.setPrototypeOf()`](../../../globals/Object/setPrototypeOf.mdx).\n\n### Interceptions\n\nThis trap can intercept these operations:\n\n- [`Object.setPrototypeOf()`](../../../globals/Object/setPrototypeOf.mdx)\n- [`Reflect.setPrototypeOf()`](../../../globals/Reflect/setPrototypeOf.mdx)\n\nOr any other operation that invokes the `[[SetPrototypeOf]]` [internal method](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy#object_internal_methods).\n\n### Invariants\n\nIf the following invariants are violated, the trap throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when invoked.\n\n- If `target` is not extensible, the `prototype`\n  parameter must be the same value as\n  `Object.getPrototypeOf(target)`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Proxy/revocable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Proxy.revocable()\n\nThe **`Proxy.revocable()`** static method creates a revocable `Proxy` object.\n\n## Syntax\n\n```js\nProxy.revocable(target, handler)\n```\n\n### Parameters\n\n- `target`\n  - : A target object to wrap with `Proxy`. It can be any sort of object, including a native array, a function, or even another proxy.\n- `handler`\n  - : An object whose properties are functions defining the behavior of `proxy` when an operation is performed on it.\n\n### Return value\n\nA plain object with the following two properties:\n\n- `proxy`\n  - : A Proxy object exactly the same as one created with a [`new Proxy(target, handler)`](../../globals/Proxy/Proxy.mdx) call.\n- `revoke`\n  - : A function with no parameters to revoke (switch off) the `proxy`.\n\n## Description\n\nThe `Proxy.revocable()` factory function is the same as the [`Proxy()`](../../globals/Proxy/Proxy.mdx) constructor, except that in addition to creating a proxy object, it also creates a `revoke` function that can be called to disable the proxy. The proxy object and the `revoke` function are wrapped in a plain object.\n\nThe `revoke` function does not take any parameters, nor does it rely on the `this` value. The created `proxy` object is attached to the `revoke` function as a [private property](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/Private_class_fields) that the `revoke` function accesses on itself when called (the existence of the private property is not observable from the outside, but it has implications on how garbage collection happens). The `proxy` object is _not_ captured within the [closure](https://developer.mozilla.org/docs/Web/JavaScript/Closures) of the `revoke` function (which will make garbage collection of `proxy` impossible if `revoke` is still alive).\n\nAfter the `revoke()` function gets called, the proxy becomes unusable: any trap to a handler throws a [`TypeError`](../../globals/TypeError/TypeError.mdx). Once a proxy is revoked, it remains revoked, and calling `revoke()` again has no effect — in fact, the call to `revoke()` detaches the `proxy` object from the `revoke` function, so the `revoke` function will not be able to access the proxy again at all. If the proxy is not referenced elsewhere, it will then be eligible for garbage collection. The `revoke` function also detaches `target` and `handler` from the `proxy`, so if `target` is not referenced elsewhere, it will also be eligible for garbage collection, even when its proxy is still alive, since there's no longer a way to meaningfully interact with the target object.\n\nLetting users interact with an object through a revocable proxy allows you to [control the lifetime](https://developer.mozilla.org/docs/Web/JavaScript/Memory_Management) of the object exposed to the user — you can make the object garbage-collectable even when the user is still holding a reference to its proxy.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/RangeError/RangeError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RangeError\n\nThe **`RangeError()`** constructor creates an error\nwhen a value is not in the set or range of allowed values.\n\n## Syntax\n\n```js\nnew RangeError()\nnew RangeError(message)\nnew RangeError(message, options)\nnew RangeError(message, fileName)\nnew RangeError(message, fileName, lineNumber)\n\nRangeError()\nRangeError(message)\nRangeError(message, options)\nRangeError(message, fileName)\nRangeError(message, fileName, lineNumber)\n```\n\n> **Note:** `RangeError()` can be called with or without `new`. Both create a new `RangeError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/ReadableByteStreamController/prototype/byobRequest.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# byobRequest\n\nThe **`byobRequest`** read-only property of the `ReadableByteStreamController` interface returns the current BYOB request, or `null` if there are no pending requests.\n\nAn underlying byte source should check this property, and use it to write data to the stream if it exists (rather than using `ReadableByteStreamController.enqueue()`).\nThis will result in an efficient zero-byte transfer of the data to the consumer.\n\n## Value\n\nA `ReadableStreamBYOBRequest` object instance, or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/ReadableByteStreamController/prototype/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# close()\n\nThe **`close()`** method of the `ReadableByteStreamController` interface closes the associated stream.\n\nThis might be called by the underlying source when its data source has been exhausted/completed.\n\n> **Note:** Readers will still be able to read any previously-enqueued chunks from the stream, but once those are read, the stream will become closed.\n> However if there is an outstanding and partially written `byobRequest` when `close()` is called, the stream will be errored.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableByteStreamController`, it is already closed, or the stream is not readable for some other reason.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/ReadableByteStreamController/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# desiredSize\n\nThe **`desiredSize`** read-only property of the`ReadableByteStreamController` interface returns the number of bytes required to fill the stream's internal queue to its \"desired size\".\n\nThe value is used by the stream to indicate a preferred flow rate to the underlying source.\nSources that support throttling or pausing their inflow of data (not all do!) should control the inflow such that `desiredSize` of the stream buffer is kept positive and as close to zero as possible.\n\nThe `desiredSize` is used to apply backpressure from downstream consumers.\n\n## Value\n\nAn integer. Note that this can be negative if the queue is over-full.\n\nThe value will be `null` if the stream has errored and `0` if it is closed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/ReadableByteStreamController/prototype/enqueue.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# enqueue()\n\nThe **`enqueue()`** method of the `ReadableByteStreamController` interface enqueues a given chunk on the associated readable byte stream (the chunk is copied into the stream's internal queues).\n\nThis should only be used to transfer data to the queue when `byobRequest` is `null`.\n\n## Syntax\n\n```js\nenqueue(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : The chunk to enqueue.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableByteStreamController`, or the stream cannot be read for some other reason, or the chunk is not an object, or the chunk's internal array buffer is non-existent, zero-length, or detached.\n    It is also thrown if the stream has been closed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/ReadableByteStreamController/prototype/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# error()\n\nThe **`error()`** method of the `ReadableByteStreamController` interface causes any future interactions with the associated stream to error with the specified reason.\n\nThis is commonly called by an underlying source to surface an error from the interface where it gets its data (such as a file-read or socket error).\nIt can also be called from elsewhere to trigger a stream error, for example if another part of the system that the stream relies on fails.\n\n## Syntax\n\n```js\nerror(errorObject)\n```\n\n### Parameters\n\n- `errorObject`\n  - : Any object that you want future interactions to fail with.\n\n### Return value\n\n`undefined`\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableByteStreamController`, or the stream is not readable for some other reason.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/ReadableStream/ReadableStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream()\n\nThe **`ReadableStream()`** constructor creates and returns a readable stream object from the given handlers.\n\n## Syntax\n\n```js\nnew ReadableStream()\nnew ReadableStream(underlyingSource)\nnew ReadableStream(underlyingSource, queuingStrategy)\n```\n\n### Parameters\n\n- `underlyingSource` _**optional**_\n\n  - : An object containing methods and properties that define how the constructed stream instance will behave.\n    `underlyingSource` can contain the following:\n\n    - `start` (controller) _**optional**_\n      - : This is a method, called immediately when the object is constructed. The\n        contents of this method are defined by the developer, and should aim to get access\n        to the stream source, and do anything else required to set up the stream\n        functionality. If this process is to be done asynchronously, it can return a\n        promise to signal success or failure. The `controller` parameter passed\n        to this method is a `ReadableStreamDefaultController` or a\n        `ReadableByteStreamController`, depending on the value of the\n        `type` property. This can be used by the developer to control the\n        stream during set up.\n    - `pull` (controller) _**optional**_\n      - : This method, also defined by the developer, will be called repeatedly when the\n        stream's internal queue of chunks is not full, up until it reaches its high water\n        mark. If `pull()` returns a promise, then it won't be called again\n        until that promise fulfills; if the promise rejects, the stream will become\n        errored. The `controller` parameter passed to this method is a\n        `ReadableStreamDefaultController` or a\n        `ReadableByteStreamController`, depending on the value of the\n        `type` property. This can be used by the developer to control the\n        stream as more chunks are fetched.\n    - `cancel` (reason) _**optional**_\n      - : This method, also defined by the developer, will be called if the app signals\n        that the stream is to be cancelled (e.g. if `ReadableStream.cancel()`\n        is called). The contents should do whatever is necessary to release access to the\n        stream source. If this process is asynchronous, it can return a promise to signal\n        success or failure. The `reason` parameter contains a\n        string describing why the stream was cancelled.\n    - `type` _**optional**_\n      - : This property controls what type of readable stream is being dealt with. If it\n        is included with a value set to `\"bytes\"`, the passed controller object\n        will be a `ReadableByteStreamController` capable of handling a BYOB\n        (bring your own buffer)/byte stream. If it is not included, the passed controller\n        will be a `ReadableStreamDefaultController`.\n    - `autoAllocateChunkSize` _**optional**_\n\n      - : For byte streams, the developer can set the `autoAllocateChunkSize` with a positive integer value to turn on the stream's auto-allocation feature.\n        With this is set, the stream implementation will automatically allocate a view buffer of the specified size in `ReadableByteStreamController.byobRequest` when required.\n\n        This must be set to enable zero-copy transfers to be used with a default `ReadableStreamDefaultReader`.\n        If not set, a default reader will still stream data, but `ReadableByteStreamController.byobRequest` will always be `null` and transfers to the consumer must be via the stream's internal queues.\n\n- `queuingStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer — this defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk` — this indicates the size to\n        use for each chunk, in bytes.\n\n    > **Note:** You could define your own custom\n    > `queuingStrategy`, or use an instance of\n    > `ByteLengthQueuingStrategy` or `CountQueuingStrategy`\n    > for this object value. If no `queuingStrategy` is supplied, the default\n    > used is the same as a `CountQueuingStrategy` with a high water mark of\n    > 1\\.\n\n### Return value\n\nAn instance of the `ReadableStream` object.\n\n### Exceptions\n\n- `RangeError`\n  - Thrown if the supplied type value is neither `\"bytes\"` nor `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/ReadableStream/prototype/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.cancel()\n\nThe **`cancel()`** method of the\n`ReadableStream` interface returns a `Promise` that\nresolves when the stream is canceled.\n\nCancel is used when you've completely finished with the stream and don't need any more\ndata from it, even if there are chunks enqueued waiting to be read. That data is lost\nafter cancel is called, and the stream is not readable any more. To read those chunks\nstill and not completely get rid of the stream, you'd use\n`ReadableStreamDefaultController.close()`.\n\n## Syntax\n\n```js\ncancel()\ncancel(reason)\n```\n\n### Parameters\n\n- `reason` _**optional**_\n  - : A human-readable reason for the cancellation. The underlying source may or may not use it.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason` parameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to cancel is not a `ReadableStream`, or it is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/ReadableStream/prototype/getReader.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.getReader()\n\nThe **`getReader()`** method of the `ReadableStream` interface creates a reader and locks the stream to it.\nWhile the stream is locked, no other reader can be acquired until this one is released.\n\n## Syntax\n\n```js\ngetReader()\ngetReader(options)\n```\n\n### Parameters\n\n- `options` _**optional**_\n\n  - : An object containing the following properties:\n\n    - `mode` _**optional**_\n\n      - : A property that specifies the type of reader to create.\n        Values can be:\n\n        - `\"byob\"`, which results in a `ReadableStreamBYOBReader` being created that can read readable byte streams (streams that support zero-copy transfer from an underlying byte source to the reader when internal stream buffers are empty).\n        - `undefined` (or not specified at all — this is the default), which results in a `ReadableStreamDefaultReader` being created that can read individual chunks from a stream.\n\n### Return value\n\nA `ReadableStreamDefaultReader` or `ReadableStreamBYOBReader` object instance, depending on the `mode` value.\n\n### Exceptions\n\n- `RangeError`\n  - : Thrown if the provided mode value is not `\"byob\"` or `undefined`.\n- `TypeError`\n  - : Thrown if the stream you are trying to create a reader for is already locked, or not a `ReadableStream`."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/ReadableStream/prototype/locked.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.locked\n\nThe **`locked`** read-only property of the `ReadableStream` interface returns whether or not the readable stream is locked to a reader.\n\nA readable stream can have at most one active reader at a time, and is locked to that reader until it is released.\nA reader might be obtained using `ReadableStream.getReader()` and released using the reader's `releaseLock()` method.\n\n## Value\n\nA `boolean` value indicating whether or not the readable stream is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/ReadableStream/prototype/pipeThrough.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.pipeThrough()\n\nThe **`pipeThrough()`** method of the `ReadableStream` interface provides a chainable way of piping the current stream through a transform stream or any other writable/readable pair.\n\nPiping a stream will generally lock it for the duration of the pipe, preventing other readers from locking it.\n\n## Syntax\n\n```js\npipeThrough(transformStream)\npipeThrough(transformStream, options)\n```\n\n### Parameters\n\n- `transformStream`\n\n  - : A `TransformStream` (or an object with the structure\n    `{writable, readable}`) consisting of a readable stream and a writable\n    stream working together to transform some data from one form to another. Data written\n    to the `writable` stream can be read in some transformed state by the\n    `readable` stream. For example, a `TextDecoder`, has bytes\n    written to it and strings read from it, while a video decoder has encoded bytes\n    written to it and uncompressed video frames read from it.\n\n- `options` _**optional**_\n\n  - : The options that should be used when piping to the `writable` stream.\n    Available options are:\n\n    - `preventClose`\n\n      - : If this is set to `true`, the source `ReadableStream` closing will no longer cause the destination `WritableStream` to be closed.\n        The method will return a fulfilled promise once this process completes, unless an error is encountered while closing the destination, in which case it will be rejected with that error.\n\n    - `preventAbort`\n\n      - : If this is set to `true`, errors in the source `ReadableStream` will no longer abort the destination `WritableStream`.\n        The method will return a promise rejected with the source's error, or with any error that occurs during aborting the destination.\n\n    - `preventCancel`\n\n      - : If this is set to `true`, errors in the destination `WritableStream` will no longer cancel the source `ReadableStream`.\n        In this case the method will return a promise rejected with the source's error, or with any error that occurs during canceling the source.\n        In addition, if the destination writable stream starts out closed or closing, the source readable stream will no longer be canceled.\n        In this case the method will return a promise rejected with an error indicating piping to a closed stream failed, or with any error that occurs during canceling the source.\n\n### Return value\n\nThe `readable` side of the `transformStream`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the `writable` and/or `readable` property of `transformStream` are undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/ReadableStream/prototype/pipeTo.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.pipeTo()\n\nThe **`pipeTo()`** method of the `ReadableStream` interface pipes the current `ReadableStream` to a given `WritableStream` and returns a `Promise` that fulfills when the piping process completes successfully, or rejects if any errors were encountered.\n\nPiping a stream will generally `lock` it for the duration of the pipe, preventing other readers from locking it.\n\n## Syntax\n\n```js\npipeTo(destination)\npipeTo(destination, options)\n```\n\n### Parameters\n\n- `destination`\n\n  - : A `WritableStream` that acts as the final destination for the `ReadableStream`.\n\n- `options` _**optional**_\n\n  - : The options that should be used when piping to the `writable` stream.\n    Available options are:\n\n    - `preventClose`\n      - : If this is set to `true`, the source `ReadableStream` closing will no longer cause the destination `WritableStream` to be closed.\n        The method will return a fulfilled promise once this process completes, unless an error is encountered while closing the destination in which case it will be rejected with that error.\n    - `preventAbort`\n      - : If this is set to `true`, errors in the source `ReadableStream` will no longer abort the destination `WritableStream`.\n        The method will return a promise rejected with the source's error, or with any error that occurs during aborting the destination.\n    - `preventCancel`\n      - : If this is set to `true`, errors in the destination `WritableStream` will no longer cancel the source `ReadableStream`.\n        In this case the method will return a promise rejected with the source's error, or with any error that occurs during canceling the source.\n        In addition, if the destination writable stream starts out closed or closing, the source readable stream will no longer be canceled.\n        In this case the method will return a promise rejected with an error indicating piping to a closed stream failed, or with any error that occurs during canceling the source.\n\n### Return value\n\nA `Promise` that resolves when the piping process has completed.\n\n### Exceptions\n\n- `TypeError`\n  - : The `writableStream` and/or `readableStream` objects are not a writable stream/readable stream, or one or both of the streams are locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/ReadableStream/prototype/tee.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStream.tee()\n\nThe **`tee()`** method of the\n`ReadableStream` interface [tees](https://streams.spec.whatwg.org/#tee-a-readable-stream) the current readable stream, returning a\ntwo-element array containing the two resulting branches as\nnew `ReadableStream` instances.\n\nThis is useful for allowing two readers to read a stream sequentially or simultaneously,\nperhaps at different speeds.\nFor example, you might do this in a ServiceWorker if you want to fetch\na response from the server and stream it to the browser, but also stream it to the\nServiceWorker cache. Since a response body cannot be consumed more than once, you'd need\ntwo copies to do this.\n\nA teed stream will partially signal backpressure at the rate of the _faster_ consumer\nof the two `ReadableStream` branches,\nand unread data is enqueued internally on the slower consumed `ReadableStream`\nwithout any limit or backpressure.\nThat is, when _both_ branches have an unread element in their internal queue,\nthen the original `ReadableStream`'s controller's internal queue will start to fill up,\nand once its `ReadableStreamDefaultController.desiredSize\", \"desiredSize` ≤ 0\nor byte stream controller `ReadableByteStreamController.desiredSize\", \"desiredSize` ≤ 0,\nthen the controller will stop calling `pull(controller)` on the\nunderlying source passed to `ReadableStream.ReadableStream\", \"new ReadableStream()`.\nIf only one branch is consumed, then the entire body will be enqueued in memory.\nTherefore, you should not use the built-in `tee()` to read very large streams\nin parallel at different speeds.\nInstead, search for an implementation that fully backpressures\nto the speed of the _slower_ consumed branch.\n\nTo cancel the stream you then need to cancel both resulting branches. Teeing a stream\nwill generally lock it for the duration, preventing other readers from locking it.\n\n## Syntax\n\n```js\ntee()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nAn `Array` containing two `ReadableStream` instances.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source stream is not a `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/ReadableStreamBYOBReader/ReadableStreamBYOBReader.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# ReadableStreamBYOBReader()\n\nThe **`ReadableStreamBYOBReader()`** constructor creates and returns a `ReadableStreamBYOBReader` object instance.\n\n> **Note:** You generally wouldn't use this constructor manually;\n> instead, you'd use the `ReadableStream.getReader()` method with the argument `\"byob\"`.\n\n## Syntax\n\n```js\nnew ReadableStreamBYOBReader(stream)\n```\n\n### Parameters\n\n- `stream`\n  - : The `ReadableStream` to be read.\n\n### Return value\n\nAn instance of the `ReadableStreamBYOBReader` object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the supplied `stream` parameter is not a `ReadableStream`, or it is already locked for reading by another reader, or its stream controller is not a `ReadableByteStreamController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/ReadableStreamBYOBReader/prototype/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# cancel()\n\nThe **`cancel()`** method of the `ReadableStreamBYOBReader` interface returns a `Promise` that resolves when the stream is canceled.\nCalling this method signals a loss of interest in the stream by a consumer.\n\n> **Note:** If the reader is active, the `cancel()` method behaves the same as that for the associated stream (`ReadableStream.cancel()`).\n\n## Syntax\n\n```js\ncancel()\ncancel(reason)\n```\n\n### Parameters\n\n- `reason` __optional__\n  - : A human-readable reason for the cancellation. The underlying source may or may not use it.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason` parameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamBYOBReader`, or the stream has no owner.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/ReadableStreamBYOBReader/prototype/closed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# closed\n\nThe **`closed`** read-only property of the `ReadableStreamBYOBReader` interface returns a `Promise` that fulfills when the stream closes, or rejects if the stream throws an error or the reader's lock is released.\n\nThis property enables you to write code that responds to an end to the streaming process.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/ReadableStreamBYOBReader/prototype/read.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# read()\n\nThe **`read()`** method of the `ReadableStreamBYOBReader` interface is used to read data into a view on a user-supplied buffer from an associated readable byte stream.\nA request for data will be satisfied from the stream's internal queues if there is any data present.\nIf the stream queues are empty, the request may be supplied as a zero-copy transfer from the underlying byte source.\n\nThe method takes as an argument a view on a buffer that supplied data is to be read into, and returns a `Promise`.\nThe promise fulfills with an object that has properties `value` and `done` when data comes available, or if the stream is cancelled.\nIf the stream is errored, the promise will be rejected with the relevant error object.\n\nIf a chunk of data is supplied, the `value` property will contain a new view.\nThis will be a view over the same buffer/backing memory (and of the same type) as the original `view` passed to the `read()` method, now populated with the new chunk of data.\nNote that once the promise fulfills, the original `view` passed to the method will be detached and no longer usable.\nThe promise will fulfill with a `value: undefined` if the stream has been cancelled.\nIn this case the backing memory region of `view` is discarded and not returned to the caller (all previously read data in the view's buffer is lost).\n\nThe `done` property indicates whether or not more data is expected.\nThe value is set `true` if the stream is closed or cancelled, and `false` otherwise.\n\n## Syntax\n\n```js\nread(view)\n```\n\n### Parameters\n\n- `view`\n  - : The view that data is to be read into.\n\n### Return value\n\nA `Promise`, which fulfills/rejects with a result depending on the state of the stream.\n\nThe following are possible:\n\n- If a chunk is available and the stream is still active, the promise fulfills with an object of the form:\n\n  ```\n  { value: theChunk, done: false }\n  ```\n\n  `theChunk` is a view containing the new data.\n  This is a view of the same type and over the same backing memory as the `view` passed to the `read()` method.\n  The original `view` will be detached and no longer usable.\n\n- If the stream is closed, the promise fulfills with an object of the form (where `theChunk` has the same properties as above):\n\n  ```\n  { value: theChunk, done: true }\n  ```\n\n- If the stream is cancelled, the promise fulfills with an object of the form:\n\n  ```\n  { value: undefined, done: true }\n  ```\n\n  In this case the backing memory is discarded.\n\n- If the stream throws an error, the promise rejects with the relevant error.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamBYOBReader`, the stream has no owner, the view is not an object or has become detached, the view's length is 0, or `ReadableStreamBYOBReader.releaseLock()` is called (when there's is a pending read request).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/ReadableStreamBYOBReader/prototype/releaseLock.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# releaseLock()\n\nThe **`releaseLock()`** method of the `ReadableStreamBYOBReader` interface releases the reader's lock on the stream.\nAfter the lock is released, the reader is no longer active.\n\nThe reader will appear errored if the associated stream is errored when the lock is released; otherwise, the reader will appear closed.\n\nIf the reader's lock is released while it still has pending read requests then the promises returned by the reader's `ReadableStreamBYOBReader.read()` method are immediately rejected with a `TypeError`.\nUnread chunks remain in the stream's internal queue and can be read later by acquiring a new reader.\n\n## Syntax\n\n```js\nreleaseLock()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamBYOBReader`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/ReadableStreamBYOBRequest/prototype/respond.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# respond()\n\nThe **`respond()`** method of the `ReadableStreamBYOBRequest` interface is used to signal to the associated readable byte stream that the specified number of bytes were written into the `ReadableStreamBYOBRequest.view`.\n\nAfter this method is called, the `view` will be transferred and no longer modifiable.\n\n## Syntax\n\n```js\nrespond(bytesWritten)\n```\n\n### Parameters\n\n- `bytesWritten`\n  - : The number of bytes written into `ReadableStreamBYOBRequest.view`.\n\n### Return value\n\n`undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : The request does not have an associated `ReadableByteStreamController` or the view buffer is not detached/cannot be transferred into.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/ReadableStreamBYOBRequest/prototype/respondWithNewView.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# respondWithNewView()\n\nThe **`respondWithNewView()`** method of the `ReadableStreamBYOBRequest` interface specifies a new view that the consumer of the associated readable byte stream should write to instead of `ReadableStreamBYOBRequest.view`.\n\nThe new view must be a `TypedArray` or a `DataView` that provides a view onto the same backing memory region as `ReadableStreamBYOBRequest.view`.\nAfter this method is called, the view that was passed into the method will be transferred and no longer modifiable.\n\nThe method is intended for use cases where an underlying byte source needs to transfer a `byobRequest.view` internally before finishing its response.\nFor example, the source may transfer the BYOB view to a separate worker thread, and wait for the worker to transfer it back once it has been filled.\n\n## Syntax\n\n```js\nrespondWithNewView(view)\n```\n\n### Parameters\n\n- `view`\n\n  - : A `TypedArray` or a `DataView` that the consumer of the associated readable byte stream should write to instead of `ReadableStreamBYOBRequest.view`.\n\n    This must be a view onto the same backing memory region as `ReadableStreamBYOBRequest.view` and occupy the same or less memory.\n    Specifically, it must be either the view's buffer or a transferred version, must have the same `byteOffset`, and a `byteLength` (number of bytes written) that is less than or equal to that of the view.\n\n### Return value\n\n`undefined`\n\n### Exceptions\n\n- `TypeError`\n\n  - : Thrown if the source object is not a `ReadableStreamBYOBRequest`, or there is no associated controller, or the associated internal array buffer is non-existent or detached.\n    It may also be thrown if the `view` is zero-length when there is an active reader, or non-zero when called on a closed stream.\n\n- `RangeError`\n  - : Thrown if the new `view` does not match the backing memory region of `ReadableStreamBYOBRequest.view`.\n    For example, it is not the same buffer (or a transferred version), has a different `byteOffset`, or is larger than the memory available to the backing view.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/ReadableStreamBYOBRequest/prototype/view.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# view\n\nThe **`view`** getter property of the `ReadableStreamBYOBRequest` interface returns the current view.\n\n## Value\n\nA typed array representing the destination region to which the controller can write generated data.\n\n`null` if the request has already been responded to, by calling `ReadableStreamBYOBRequest.respond()` or `ReadableStreamBYOBRequest.respondWithNewView()`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/ReadableStreamDefaultController/prototype/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.close()\n\nThe **`close()`** method of the\n`ReadableStreamDefaultController` interface closes the associated stream.\n\nReaders will still be able to read any previously-enqueued chunks from the stream,\nbut once those are read, the stream will become closed. If you want to completely get\nrid of the stream and discard any enqueued chunks, you'd use\n`ReadableStream.cancel()` or\n`ReadableStreamDefaultReader.cancel()`.\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/ReadableStreamDefaultController/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.desiredSize\n\nThe **`desiredSize`** read-only property of the\n`ReadableStreamDefaultController` interface returns the desired size\nrequired to fill the stream's internal queue.\n\n## Value\n\nAn integer. Note that this can be negative if the queue is over-full.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/ReadableStreamDefaultController/prototype/enqueue.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.enqueue()\n\nThe **`enqueue()`** method of the\n`ReadableStreamDefaultController` interface enqueues a given chunk in the\nassociated stream.\n\n## Syntax\n\n```js\nenqueue(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : The chunk to enqueue.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/ReadableStreamDefaultController/prototype/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultController.error()\n\nThe **`error()`** method of the\n`ReadableStreamDefaultController` interface causes any future interactions\nwith the associated stream to error.\n\n> **Note:** The `error()` method can be called\n> more than once, and can be called when the stream is not readable.\n\n## Syntax\n\n```js\nerror(e)\n```\n\n### Parameters\n\n- `e`\n  - : The error you want future interactions to fail with.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultController`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/ReadableStreamDefaultReader/ReadableStreamDefaultReader.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader()\n\nThe **`ReadableStreamDefaultReader()`**\nconstructor creates and returns a `ReadableStreamDefaultReader` object\ninstance.\n\n## Syntax\n\n```js\nnew ReadableStreamDefaultReader(stream)\n```\n\n### Parameters\n\n- `stream`\n  - : The `ReadableStream` to be read.\n\n### Return value\n\nAn instance of the `ReadableStreamDefaultReader` object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the supplied `stream` parameter is not a `ReadableStream`,\n    or it is already locked for reading by another reader.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/ReadableStreamDefaultReader/prototype/cancel.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n~ ReadableStreamDefaultReader.cancel()\n\nThe **`cancel()`** method of the\n`ReadableStreamDefaultReader` interface returns a `Promise` that resolves when the stream is canceled. Calling this method signals a loss of interest in the stream by a consumer.\n\nCancel is used when you've completely finished with the stream and don't need any more\ndata from it, even if there are chunks enqueued waiting to be read. That data is lost\nafter cancel is called, and the stream is not readable any more. To read those chunks\nstill and not completely get rid of the stream, you'd use\n`ReadableStreamDefaultController.close()`.\n\n> **Note:** If the reader is active, the\n> `cancel()` method behaves the same as that for the associated stream\n> (`ReadableStream.cancel()`).\n\n## Syntax\n\n```js\ncancel()\ncancel(reason)\n```\n\n### Parameters\n\n- `reason` _**optional**_\n  - : A human-readable reason for the cancellation. This value may or may not be used.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason`\nparameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamDefaultReader`, or the stream\n    has no owner.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/ReadableStreamDefaultReader/prototype/closed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader.closed\n\nThe **`closed`** read-only property of the\n`ReadableStreamDefaultReader` interface returns a\n`Promise` that fulfills when the stream closes, or rejects if the\nstream throws an error or the reader's lock is released. This property enables you\nto write code that responds to an end to the streaming process.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/ReadableStreamDefaultReader/prototype/read.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader.read()\n\nThe **`read()`** method of the `ReadableStreamDefaultReader` interface returns a `Promise` providing access to the next chunk in the stream's internal queue.\n\n## Syntax\n\n```js\nread()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise`, which fulfills/rejects with a result depending on the state of the stream.\nThe different possibilities are as follows:\n\n- If a chunk is available, the promise will be fulfilled with an object of the form `{ value: theChunk, done: false }`.\n- If the stream becomes closed, the promise will be fulfilled with an object of the form `{ value: undefined, done: true }`.\n- If the stream becomes errored, the promise will be rejected with the relevant error.\n\n### Exceptions\n\n- `TypeError`\n  - : The source object is not a `ReadableStreamDefaultReader`, the stream has no owner, or `ReadableStreamDefaultReader.releaseLock()` is called (when there's a pending read request).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/ReadableStreamDefaultReader/prototype/releaseLock.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReadableStreamDefaultReader.releaseLock()\n\nThe **`releaseLock()`** method of the `ReadableStreamDefaultReader` interface releases the reader's lock on the stream.\n\nIf the associated stream is errored when the lock is released, the reader will appear errored in that same way subsequently; otherwise, the reader will appear closed.\n\nIf the reader's lock is released while it still has pending read requests then the promises returned by the reader's `ReadableStreamDefaultReader.read()` method are immediately rejected with a `TypeError`.\nUnread chunks remain in the stream's internal queue and can be read later by acquiring a new reader.\n\n## Syntax\n\n```js\nreleaseLock()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone (`undefined`).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the source object is not a `ReadableStreamDefaultReader`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/ReferenceError/ReferenceError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# ReferenceError\n\nThe **`ReferenceError`** object represents an error when a\nnon-existent variable is referenced.\n\n## Syntax\n\n```js\nnew ReferenceError()\nnew ReferenceError(message)\nnew ReferenceError(message, options)\nnew ReferenceError(message, fileName)\nnew ReferenceError(message, fileName, lineNumber)\n\nReferenceError()\nReferenceError(message)\nReferenceError(message, options)\nReferenceError(message, fileName)\nReferenceError(message, fileName, lineNumber)\n```\n\n> **Note:** `ReferenceError()` can be called with or without `new`. Both create a new `ReferenceError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Reflect/apply.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.apply()\n\nThe static **`Reflect.apply()`** method calls a target function\nwith arguments as specified.\n\n## Syntax\n\n```js\nReflect.apply(target, thisArgument, argumentsList)\n```\n\n### Parameters\n\n- `target`\n  - : The target function to call.\n- `thisArgument`\n  - : The value of `this` provided for the call to\n    `target`.\n- `argumentsList`\n  - : An array-like object specifying the arguments with which\n    `target` should be called.\n\n### Return value\n\nThe result of calling the given `target` function with the\nspecified `this` value and arguments.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if the `target` is not callable.\n\n## Description\n\nIn ES5, you typically use the [`Function.prototype.apply()`](../../globals/Function/prototype/apply.mdx) method to call a\nfunction with a given `this` value and `arguments` provided as an array\n(or an [array-like object](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Indexed_collections#working_with_array-like_objects)).\n\n```js\nFunction.prototype.apply.call(Math.floor, undefined, [1.75]);\n```\n\nWith `Reflect.apply()` this becomes less verbose and easier to understand.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Reflect/construct.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.construct()\n\nThe static **`Reflect.construct()`** method acts like the\n`new` operator, but as a function. It is equivalent to\ncalling `new target(...args)`. It gives also the added option to specify a\ndifferent prototype.\n\n## Syntax\n\n```js\nReflect.construct(target, argumentsList)\nReflect.construct(target, argumentsList, newTarget)\n```\n\n### Parameters\n\n- `target`\n  - : The target function to call.\n- `argumentsList`\n  - : An array-like object specifying the arguments with which\n    `target` should be called.\n- `newTarget` _**optional**_\n  - : The constructor whose prototype should be used. See also the [`new.target`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new.target)\n    operator. If `newTarget` is not present, its value defaults\n    to `target`.\n\n### Return value\n\nA new instance of `target` (or `newTarget`,\nif present), initialized by `target` as a constructor with the\ngiven `argumentsList`.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` or\n`newTarget` are not constructors.\n\n## Description\n\n`Reflect.construct()` allows you to invoke a constructor with a variable\nnumber of arguments. (This would also be possible by using the\n[spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) combined with the\n[`new` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/new).)\n\n```js\nconst obj = new Foo(...args);\nconst obj = Reflect.construct(Foo, args);\n```\n\n### Reflect.construct() vs Object.create()\n\nPrior to the introduction of `Reflect`, objects could be constructed using\nan arbitrary combination of constructor and prototype by using\n[`Object.create()`](../../globals/Object/create.mdx).\n\n```js\nfunction OneClass() {\n  this.name = \"one\";\n}\n\nfunction OtherClass() {\n  this.name = \"other\";\n}\n\n// Calling this:\nconst obj1 = Reflect.construct(OneClass, args, OtherClass);\n\n// ...has the same result as this:\nconst obj2 = Object.create(OtherClass.prototype);\nOneClass.apply(obj2, args);\n\nconsole.log(obj1.name); // 'one'\nconsole.log(obj2.name); // 'one'\n\nconsole.log(obj1 instanceof OneClass); // false\nconsole.log(obj2 instanceof OneClass); // false\n\nconsole.log(obj1 instanceof OtherClass); // true\nconsole.log(obj2 instanceof OtherClass); // true\n\n// Another example to demonstrate below:\n\nfunction func1(a, b, c, d) {\n  console.log(arguments[3]);\n}\n\nfunction func2(d, e, f, g) {\n  console.log(arguments[3]);\n}\n\nconst obj1 = Reflect.construct(func1, [\"I\", \"Love\", \"my\", \"country\"]);\n```\n\nHowever, while the end result is the same, there is one important difference in the\nprocess. When using `Object.create()` and\n[`Function.prototype.apply()`](../../globals/Function/prototype/apply.mdx), the `new.target` operator will\npoint to `undefined` within the function used as the constructor, since the\n`new` keyword is not being used to create the object.\n\nWhen invoking `Reflect.construct()`, on the other hand, the\n`new.target` operator will point to the `newTarget`\nparameter if supplied, or `target` if not.\n\n```js\nfunction OneClass() {\n  console.log(\"OneClass\");\n  console.log(new.target);\n}\nfunction OtherClass() {\n  console.log(\"OtherClass\");\n  console.log(new.target);\n}\n\nconst obj1 = Reflect.construct(OneClass, args);\n// Logs:\n// OneClass\n// function OneClass { ... }\n\nconst obj2 = Reflect.construct(OneClass, args, OtherClass);\n// Logs:\n// OneClass\n// function OtherClass { ... }\n\nconst obj3 = Object.create(OtherClass.prototype);\nOneClass.apply(obj3, args);\n// Logs:\n// OneClass\n// undefined\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Reflect/defineProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.defineProperty()\n\nThe static **`Reflect.defineProperty()`** method is like\n[`Object.defineProperty()`](../../globals/Object/defineProperty.mdx) but returns a `Boolean`.\n\n## Syntax\n\n```js\nReflect.defineProperty(target, propertyKey, attributes)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to define the property.\n- `propertyKey`\n  - : The name of the property to be defined or modified.\n- `attributes`\n  - : The attributes for the property being defined or modified.\n\n### Return value\n\nA `Boolean` indicating whether or not the property was successfully\ndefined.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.defineProperty` method allows precise addition to or\nmodification of a property on an object. For more details, see the\n[`Object.defineProperty`](../../globals/Object/defineProperty.mdx) which is similar.\n\n> **Note:** `Object.defineProperty` returns the\n> object or throws a [`TypeError`](../../globals/TypeError/TypeError.mdx) if the property has not been successfully\n> defined. `Reflect.defineProperty`, however, returns a `Boolean`\n> indicating whether or not the property was successfully defined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Reflect/deleteProperty.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.deleteProperty()\n\nThe static\n**`Reflect.deleteProperty()`**\nmethod allows to delete properties. It is like the\n[`delete` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete)\nas a function.\n\n## Syntax\n\n```js\nReflect.deleteProperty(target, propertyKey)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to delete the property.\n- `propertyKey`\n  - : The name of the property to be deleted.\n\n### Return value\n\nA `Boolean` indicating whether or not the property was successfully\ndeleted.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.deleteProperty` method allows you to delete a property on an\nobject. It returns a `Boolean` indicating whether or not the property was\nsuccessfully deleted. It is almost identical to the non-strict\n[`delete` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/delete).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Reflect/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.get()\n\nThe static **`Reflect.get()`** method works like getting a\nproperty from an object (`target[propertyKey]`) as a function.\n\n## Syntax\n\n```js\nReflect.get(target, propertyKey)\nReflect.get(target, propertyKey, receiver)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to get the property.\n- `propertyKey`\n  - : The name of the property to get.\n- `receiver` _**optional**_\n  - : The value of `this` provided for the call to\n    `target` if a getter is encountered. When used with\n    `Proxy`, it can be an object that inherits from\n    `target`.\n\n### Return value\n\nThe value of the property.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.get` method allows you to get a property on an object. It is like the\n[property accessor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Property_Accessors) syntax as a function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Reflect/getOwnPropertyDescriptor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.getOwnPropertyDescriptor()\n\nThe static\n**`Reflect.getOwnPropertyDescriptor()`** method is similar to\n[`Object.getOwnPropertyDescriptor()`](../../globals/Object/getOwnPropertyDescriptor.mdx). It returns a property descriptor of\nthe given property if it exists on the object, `undefined`\notherwise.\n\n\n\n## Syntax\n\n```js\nReflect.getOwnPropertyDescriptor(target, propertyKey)\n```\n\n### Parameters\n\n- `target`\n  - : The target object in which to look for the property.\n- `propertyKey`\n  - : The name of the property to get an own property descriptor for.\n\n### Return value\n\nA property descriptor object if the property exists in `target`\nobject; otherwise, [`undefined`](../../globals/undefined.mdx).\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.getOwnPropertyDescriptor` method returns a property descriptor\nof the given property if it exists in the `target` object,\n[`undefined`](../../globals/undefined.mdx) otherwise. The only difference to\n[`Object.getOwnPropertyDescriptor()`](../../globals/Object/getOwnPropertyDescriptor.mdx) is how non-object targets are handled.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Reflect/getPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.getPrototypeOf()\n\nThe static **`Reflect.getPrototypeOf()`** method is almost the\nsame method as [`Object.getPrototypeOf()`](../../globals/Object/getPrototypeOf.mdx). It returns the prototype (i.e. the\nvalue of the internal `[[Prototype]]` property) of the specified object.\n\n\n\n## Syntax\n\n```js\nReflect.getPrototypeOf(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object of which to get the prototype.\n\n### Return value\n\nThe prototype of the given object. If there are no inherited properties,\n[`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) is returned.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.getPrototypeOf` method returns the prototype (i.e. the value of\nthe internal `[[Prototype]]` property) of the specified object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Reflect/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.has()\n\nThe static **`Reflect.has()`** method works like the [`in` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/in)\nas a function.\n\n## Syntax\n\n```js\nReflect.has(target, propertyKey)\n```\n\n### Parameters\n\n- `target`\n  - : The target object in which to look for the property.\n- `propertyKey`\n  - : The name of the property to check.\n\n### Return value\n\nA `Boolean` indicating whether or not the `target`\nhas the property.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.has` method allows you to check if a property is in an object.\nIt works like the [`in` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/in)\nas a function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Reflect/isExtensible.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.isExtensible()\n\nThe static **`Reflect.isExtensible()`** method determines if an object is extensible (whether it can have new properties added to it). It is similar to [`Object.isExtensible()`](../../globals/Object/isExtensible.mdx), but with [some differences](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/isExtensible#difference_with_object.isextensible).\n\n## Syntax\n\n```js\nReflect.isExtensible(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object which to check if it is extensible.\n\n### Return value\n\nA `Boolean` indicating whether or not the target is extensible.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Reflect/ownKeys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.ownKeys()\n\nThe static **`Reflect.ownKeys()`** method returns an array of\nthe `target` object's own property keys.\n\n## Syntax\n\n```js\nReflect.ownKeys(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object from which to get the own keys.\n\n### Return value\n\nAn `Array` of the `target` object's own property\nkeys.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.ownKeys` method returns an array of the\n`target` object's own property keys. Its return value is\nequivalent to `Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target))`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Reflect/preventExtensions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.preventExtensions()\n\nThe static **`Reflect.preventExtensions()`** method prevents new properties from ever being added to an object (i.e., prevents future extensions to the object). It is similar to [`Object.preventExtensions()`](../../globals/Object/preventExtensions.mdx), but with [some differences](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect/preventExtensions#difference_with_object.preventextensions).\n\n## Syntax\n\n```js\nReflect.preventExtensions(target)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to prevent extensions.\n\n### Return value\n\nA `Boolean` indicating whether or not the target was successfully set to prevent extensions.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an `Object`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Reflect/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.set()\n\nThe static **`Reflect.set()`** method works like setting a\nproperty on an object.\n\n## Syntax\n\n```js\nReflect.set(target, propertyKey, value)\nReflect.set(target, propertyKey, value, receiver)\n```\n\n### Parameters\n\n- `target`\n  - : The target object on which to set the property.\n- `propertyKey`\n  - : The name of the property to set.\n- `value`\n  - : The value to set.\n- `receiver` _**optional**_\n  - : The value of `this` provided for the call to the setter for `propertyKey` on `target`. If provided and `target` does not have a setter for `propertyKey`, the property will be set on `receiver` instead.\n\n### Return value\n\nA `Boolean` indicating whether or not setting the property was successful.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object`.\n\n## Description\n\nThe `Reflect.set` method allows you to set a property on an object. It does\nproperty assignment and is like the\n[property accessor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Property_Accessors) syntax as a function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Reflect/setPrototypeOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Reflect.setPrototypeOf()\n\nThe static\n**`Reflect.setPrototypeOf()`** method is the same method as\n[`Object.setPrototypeOf()`](../../globals/Object/setPrototypeOf.mdx), except for its return type. It sets the\nprototype (i.e., the internal `[[Prototype]]` property) of a specified\nobject to another object or to [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null), and returns `true` if\nthe operation was successful, or `false` otherwise.\n\n## Syntax\n\n```js\nReflect.setPrototypeOf(target, prototype)\n```\n\n### Parameters\n\n- `target`\n  - : The target object of which to set the prototype.\n- `prototype`\n  - : The object's new prototype (an object or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null)).\n\n### Return value\n\nA `Boolean` indicating whether or not the prototype was successfully set.\n\n### Exceptions\n\nA [`TypeError`](../../globals/TypeError/TypeError.mdx), if `target` is not an\n`Object` or if `prototype` is neither an object nor\n[`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null).\n\n## Description\n\nThe `Reflect.setPrototypeOf` method changes the prototype (i.e. the value of\nthe internal `[[Prototype]]` property) of the specified object.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Request/Request.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request()\n\nThe **`Request()`** constructor creates a new\n`Request` object.\n\n## Syntax\n\n```js\nnew Request(input)\nnew Request(input, options)\n```\n\n### Parameters\n\n- `input`\n\n  - : Defines the resource that you wish to fetch. This can either be:\n\n    - A string containing the direct URL of the resource you want to\n      fetch.\n    - A `Request` object, effectively creating a copy.\n\n- `options` _**optional**_\n\n  - : An object containing any custom settings that you want to apply to the\n    request. The possible options are:\n\n    - `method`\n      - : The request method, e.g., `GET`, `POST`. The default is `GET`.\n    - `headers`\n      - : Any headers you want to add to your request, contained\n        within a `Headers` object or an object literal with `String` values.\n    - `body`\n      - : Any body that you want to add to your request: this can be an `ArrayBuffer`, a `TypedArray`, a `DataView`, a `URLSearchParams`, string object or literal, a `ReadableStream` object, a [`Blob`](../../globals/Blob/Blob.mdx) object, or a [`FormData`](../../globals/FormData/FormData.mdx) object.\n    - `backend` _**Fastly-specific**_\n    - `cacheOverride` _**Fastly-specific**_, see [`CacheOverride`](../../fastly:cache-override/CacheOverride/CacheOverride.mdx).\n    - `cacheKey` _**Fastly-specific**_\n    - `manualFramingHeaders`_: boolean_ _**optional**_ _**Fastly-specific**_\n      - : The default value is `false`, which means that the framing headers are automatically created based on the message body.\n        In \"automatic\" mode, a `Content-Length` is used when the size of the body can be determined before it is sent.\n        Requests sent in streaming mode, where headers are sent immediately but the content of the body is streamed later, will receive a `Transfer-Encoding: chunked` to accommodate the dynamic generation of the body.\n        In \"manual\" mode, any `Content-Length` or `Transfer-Encoding` headers will be honored.\n        You must ensure that those headers have correct values permitted by the [HTTP/1.1 specification](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).\n        If the provided headers are not permitted by the specification, the headers will revert to \"automatic\" mode and a diagnostic message will be logged about what was wrong.\n        If a `Content-Length` is permitted by the specification, but the value does not match the size of the actual body, the body will either be truncated (if it is too long), or the connection will be hung up early (if it is too short).\n    - `fastly` _**Fastly-specific**_\n      - `decompressGzip`_: boolean_ _**optional**_\n        - Whether to automatically gzip decompress the Response or not."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Request/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the `Request` interface\nreads the request body and returns it as a promise that resolves with an `ArrayBuffer`.\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an `ArrayBuffer`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Request/prototype/blob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.blob()\n\nThe **`blob()`** method of the `Request` interface reads the request body and returns it as a promise that resolves with a `Blob`.\n\n## Syntax\n\n```js\nblob()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a [`Blob`](../../../globals/Blob/Blob.mdx).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the request body has already been used or if the request's method is `GET` or `HEAD`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Request/prototype/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.body\n\nThe read-only **`body`** property of the `Request`\ninterface contains a `ReadableStream` with the body contents\nthat have been added to the request. Note that a request using the\n`GET` or `HEAD` method cannot have a body\nand `null` is returned in these cases.\n\n## Value\n\nA `ReadableStream` or `null`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Request/prototype/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.bodyUsed\n\nThe read-only **`bodyUsed`** property of the\n`Request` interface is a boolean value that indicates\nwhether the request body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Request/prototype/clone.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.clone()\n\nThe **`clone()`** method of the `Request` interface creates a copy of the current `Request` object.\n\nLike the underlying `ReadableStream.tee`` api, the `body` of a cloned `Response`\nwill signal backpressure at the rate of the _faster_ consumer of the two bodies,\nand unread data is enqueued internally on the slower consumed `body`\nwithout any limit or backpressure.\nBeware when you construct a `Request` from a stream and then `clone` it.\n\n`clone()` throws a `TypeError` if the request body has already been used. In fact, the main reason `clone()` exists is to allow multiple uses of body objects (when they are one-use only.)\n\nIf you intend to modify the request, you may prefer the `Request` constructor.\n\n## Syntax\n\n```js\nclone()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Request` object, which is an exact copy of the `Request` that `clone()` was called on.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Request/prototype/formData.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.formData()\n\nThe **`formData()`** method of the `Request` interface reads the request body and returns it as a promise that resolves with a `FormData` object.\n\n## Syntax\n\n```js\nformData()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a [`FormData`](../../../globals/FormData/FormData.mdx) object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the request body has already been used or if the request's method is `GET` or `HEAD`.\n- `SyntaxError`\n  - : Thrown if the request's content type is not `multipart/form-data` or `application/x-www-form-urlencoded`, or if the content cannot be parsed as form data.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Request/prototype/headers.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.headers\n\nThe **`headers`** read-only property of the\n`Request` interface contains the `Headers` object associated\nwith the request.\n\n## Value\n\nA `Headers` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Request/prototype/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.json()\n\nThe **`json()`** method of the `Request` interface\nreads the request body and returns it as a promise that resolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a JavaScript object. This object could be\nanything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Request/prototype/method.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.method\n\nThe **`method`** read-only property of the\n`Request` interface contains the request's method (`GET`, `POST`, etc.)\n\n## Value\n\nA `String` indicating the method of the request.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Request/prototype/setManualFramingHeaders.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.setManualFramingHeaders()\n\nThe **`setManualFramingHeaders()`** method of the `Request` interface controls how the framing headers should be determined.\n\nBy default the framing headers are set to \"automatic\" mode, which means they are created based on the body of the associated Request instance.\nIn \"automatic\" mode, a `Content-Length` is used when the size of the body can be determined before it is sent.\nRequests sent in streaming mode, where headers are sent immediately but the content of the body is streamed later, will receive a `Transfer-Encoding: chunked` to accommodate the dynamic generation of the body.\nIn \"manual\" mode, any `Content-Length` or `Transfer-Encoding` headers will be honored.\nYou must ensure that those headers have correct values permitted by the [HTTP/1.1 specification](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).\nIf the provided headers are not permitted by the specification, the headers will revert to \"automatic\" mode and a diagnostic message will be logged about what was wrong.\nIf a `Content-Length` is permitted by the specification, but the value does not match the size of the actual body, the body will either be truncated (if it is too long), or the connection will be hung up early (if it is too short).\n\n## Syntax\n\n## Syntax\n\n```js\nsetManualFramingHeaders(manual)\n```\n\n### Parameters\n\n- `manual` _: boolean_\n  - : Whether or not to use \"manual\" mode for the framing headers.\n\n### Return value\n\n`undefined`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Request/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.text()\n\nThe **`text()`** method of the `Request` interface\nreads the request body and returns it as a promise that resolves with a `String`.\nThe response is _always_ decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Promise that resolves with a `String`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Request/prototype/url.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Request.url\n\nThe **`url`** read-only property of the `Request` interface contains the URL of the request.\n\n## Value\n\nA string indicating the URL of the request.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Response/Response.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response()\n\nThe **`Response()`** constructor creates a new `Response` object.\n\n## Syntax\n\n```js\nnew Response()\nnew Response(body)\nnew Response(body, options)\n```\n\n### Parameters\n\n- `body` _**optional**_\n\n  - : An object defining a body for the response. This can be `null` (which is\n    the default value), or one of:\n\n    - [`ArrayBuffer`](../../globals/ArrayBuffer/ArrayBuffer.mdx)\n    - `TypedArray`\n    - [`DataView`](../../globals/DataView/DataView.mdx)\n    - [`ReadableStream`](../../globals/ReadableStream/ReadableStream.mdx)\n    - [`URLSearchParams`](../../globals/URLSearchParams/URLSearchParams.mdx)\n    - [`String`](../../globals/String/String.mdx)\n    - string literal\n    - [`Blob`](../../globals/Blob/Blob.mdx)\n    - [`FormData`](../../globals/FormData/FormData.mdx)\n\n- `options` _**optional**_\n\n  - : An options object containing any custom settings that you want to apply to the\n    response, or an empty object (which is the default value). The possible options are:\n\n    - `status`\n      - : The status code for the response, e.g., `200`.\n    - `statusText`\n      - : The status message associated with the status code,\n        e.g., `OK`.\n    - `headers`\n      - : Any headers you want to add to your response, contained\n        within a [`Headers`](../../globals/Headers/Headers.mdx) object or object literal of\n        [`String`](../../globals/String/String.mdx) key/value pairs.\n    - `manualFramingHeaders`_: boolean_ _**optional**_ _**Fastly-specific**_\n      - : The default value is `false`, which means that the framing headers are automatically created based on the message body.\n        In \"automatic\" mode, a `Content-Length` is used when the size of the body can be determined before it is sent.\n        Responses sent in streaming mode, where headers are sent immediately but the content of the body is streamed later, will receive a `Transfer-Encoding: chunked` to accommodate the dynamic generation of the body.\n        In \"manual\" mode, any `Content-Length` or `Transfer-Encoding` headers will be honored.\n        You must ensure that those headers have correct values permitted by the [HTTP/1.1 specification](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).\n        If the provided headers are not permitted by the specification, the headers will revert to \"automatic\" mode and a diagnostic message will be logged about what was wrong.\n        If a `Content-Length` is permitted by the specification, but the value does not match the size of the actual body, the body will either be truncated (if it is too long), or the connection will be hung up early (if it is too short).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Response/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.arrayBuffer()\n\nThe **`arrayBuffer()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface\ntakes a [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion. It returns a promise\nthat resolves with an [`ArrayBuffer`](../../../globals/ArrayBuffer/ArrayBuffer.mdx).\n\n## Syntax\n\n```js\narrayBuffer()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an [`ArrayBuffer`](../../../globals/ArrayBuffer/ArrayBuffer.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Response/prototype/blob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.blob()\n\nThe **`blob()`** method of the [`Response`](../Response.mdx) interface takes a [`Response`](../Response.mdx) stream and reads it to completion. It returns a promise that resolves with a `Blob`.\n\n## Syntax\n\n```js\nblob()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a [`Blob`](../../../globals/Blob/Blob.mdx).\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the response body has already been consumed.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Response/prototype/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.body\n\nThe **`body`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface is a [`ReadableStream`](../../../globals/ReadableStream/ReadableStream.mdx) of the body contents.\n\n## Value\n\nA [`ReadableStream`](../../../globals/ReadableStream/ReadableStream.mdx), or else `null` for any `Response` object [constructed](../../../globals/Response/Response.mdx) with a null `body` property, or for any actual HTTP response that has no body.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Response/prototype/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.bodyUsed\n\nThe **`bodyUsed`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface is a boolean value that indicates whether the body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Response/prototype/formData.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.formData()\n\nThe **`formData()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface takes a [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion. It returns a promise that resolves with a `FormData` object.\n\n## Syntax\n\n```js\nformData()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a [`FormData`](../../../globals/FormData/FormData.mdx) object.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if the response body has already been consumed.\n- `SyntaxError`\n  - : Thrown if the response's content type is not `multipart/form-data` or `application/x-www-form-urlencoded`, or if the content cannot be parsed as form data.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Response/prototype/headers.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.headers\n\nThe **`headers`** read-only property of the\n[`Response`](../../../globals/Response/Response.mdx) interface contains the [`Headers`](../../../globals/Headers/Headers.mdx) object associated\nwith the response.\n\n## Value\n\nA [`Headers`](../../Headers/Headers.mdx) object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Response/prototype/ip.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.ip\n\nThe **`ip`** getter of the `Response` interface returns the IP address associated with the request, as either an IPv6 or IPv4 string.\n\nIn the case where no IP address is available (say the response is cached, or was manually created), `undefined` will be returned.\n\nTo ensure an origin request with an IP, pass a [`CacheOverride`](../../../fastly:cache-override/CacheOverride/CacheOverride.mdx) value.\n\n## Value\n\n`undefined` or `string`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Response/prototype/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.json()\n\nThe **`json()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface takes\na [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion. It returns a promise which\nresolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA [`Promise`](../../../globals/Promise/Promise.mdx) that resolves to a JavaScript object. This object could be\nanything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Response/prototype/ok.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.ok\n\nThe **`ok`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains a Boolean stating whether the response was successful (status in the range 200-299) or not.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Response/prototype/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.port\n\nThe **`port`** getter of the `Response` interface returns the port associated with the request, as a number.\n\nIn the case where no port is available (say the response is cached, or was manually created), `undefined` will be returned.\n\nTo ensure an origin request with a port, pass a [`CacheOverride`](../../../fastly:cache-override/CacheOverride/CacheOverride.mdx) value.\n\n## Value\n\n`undefined` or `number`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Response/prototype/setManualFramingHeaders.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.setManualFramingHeaders()\n\nThe **`setManualFramingHeaders()`** method of the `Response` interface controls how the framing headers should be determined.\n\nBy default the framing headers are set to \"automatic\" mode, which means they are created based on the body of the associated Response instance.\nIn \"automatic\" mode, a `Content-Length` is used when the size of the body can be determined before it is sent.\nResponses sent in streaming mode, where headers are sent immediately but the content of the body is streamed later, will receive a `Transfer-Encoding: chunked` to accommodate the dynamic generation of the body.\nIn \"manual\" mode, any `Content-Length` or `Transfer-Encoding` headers will be honored.\nYou must ensure that those headers have correct values permitted by the [HTTP/1.1 specification](https://datatracker.ietf.org/doc/html/rfc7230#section-3.3.1).\nIf the provided headers are not permitted by the specification, the headers will revert to \"automatic\" mode and a diagnostic message will be logged about what was wrong.\nIf a `Content-Length` is permitted by the specification, but the value does not match the size of the actual body, the body will either be truncated (if it is too long), or the connection will be hung up early (if it is too short).\n\n## Syntax\n\n```js\nsetManualFramingHeaders(manual)\n```\n\n### Parameters\n\n- `manual` _: boolean_\n  - : Whether or not to use \"manual\" mode for the framing headers.\n\n### Return value\n\n`undefined`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Response/prototype/status.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.status\n\nThe **`status`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains the HTTP status code of the response.\n\nFor example, `200` for success, `404` if the resource could not be found.\n\n## Value\n\nAn unsigned short number.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Response/prototype/statusText.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.statusText\n\nThe **`statusText`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains the status message corresponding to the HTTP status code in [`status`](../../../globals/Response/prototype/status.mdx).\n\nFor example, this would be `OK` for a status code `200`, `Continue` for `100`, `Not Found` for `404`.\n\n## Value\n\nA [`String`](../../../globals/String/String.mdx) containing the HTTP status message associated with the response.\nThe default value is \"\".\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Response/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.text()\n\nThe **`text()`** method of the [`Response`](../../../globals/Response/Response.mdx) interface takes a [`Response`](../../../globals/Response/Response.mdx) stream and reads it to completion.\nIt returns a promise that resolves with a [`String`](../../../globals/String/String.mdx).\nThe response is _always_ decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Promise that resolves with a [`String`](../../../globals/String/String.mdx).\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Response/prototype/url.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Response.url\n\nThe **`url`** read-only property of the [`Response`](../../../globals/Response/Response.mdx) interface contains the URL of the response.\nThe value of the `url` property will be the final URL obtained after any redirects.\n\n## Value\n\nA string.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Response/redirect.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Response.redirect()\n\nThe **`redirect()`** static method of the `Response` interface returns a `Response` resulting in a redirect to the specified URL.\n\n## Syntax\n\n```js\nResponse.redirect(url)\nResponse.redirect(url, status)\n```\n\n### Parameters\n\n- `url`\n  - : The URL that the new response is to originate from.\n- `status` __optional__\n  - : An optional status code for the response (e.g., `302`.)\n\n### Return value\n\nA `Response` object.\n\n### Exceptions\n\n- `RangeError`\n  - : The specified status is not a redirect status.\n- `TypeError`\n  - : The specified URL is invalid.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/RsaHashedImportParams/RsaHashedImportParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# RsaHashedImportParams\n\nThe **`RsaHashedImportParams`** dictionary represents the object that should be passed as the `algorithm` parameter into `SubtleCrypto.importKey()`, when importing any RSA-based key pair.\n\n## Instance properties\n\n- `name`\n  - : A string. This should be set to `RSASSA-PKCS1-v1_5`.\n\n- `hash`\n  - : A string representing the name of the digest function to use. This can be one of `SHA-256`, `SHA-384`, or `SHA-512`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Set/@@species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# get Set\\[Symbol.species]\n\nThe **`Set[Symbol.species]`** accessor property is an unused accessor property specifying how to copy `Set` objects.\n\n## Syntax\n\n```js\nSet[Symbol.species]\n```\n\n### Return value\n\nThe value of the constructor (`this`) on which `get Symbol.species` was called. The return value is used to construct copied `Set` instances.\n\n## Description\n\nThe `Symbol.species` accessor property returns the default constructor for `Set` objects. Subclass constructors may override it to change the constructor assignment.\n\n> **Note:** This property is currently unused by all `Set` methods.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Set/Set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set()\n\nThe **`Set` constructor** lets you\ncreate `Set` objects that store unique values of any type, whether [primitive values](https://developer.mozilla.org/docs/Glossary/Primitive) or object\nreferences.\n\n## Syntax\n\n```js\nnew Set()\nnew Set(iterable)\n```\n\n> **Note:** `Set()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable` _**optional**_\n\n  - : If an [iterable object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) is passed, all of its elements will be added to the new\n    `Set`.\n\n    If you don't specify this parameter, or its value is `null`, the new\n    `Set` is empty.\n\n### Return value\n\nA new `Set` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Set/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype\\[Symbol.iterator]()\n\nThe **`[Symbol.iterator`** method of a `Set` object implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows sets to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the values of the set.\n\nThe initial value of this property is the same function object as the initial value of the [`Set.prototype.values`](../../../globals/Set/prototype/values.mdx) property.\n\n## Syntax\n\n```js\nset[Symbol.iterator]()\n```\n\n### Return value\n\nThe same return value as [`Set.prototype.values()`](../../../globals/Set/prototype/values.mdx): a new iterable iterator object that yields the values of the set.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Set/prototype/add.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.add()\n\nThe **`add()`** method inserts a new element with a specified value in to a `Set` object, if there isn't an element with the same value already in the `Set`.\n\n## Syntax\n\n```js\nadd(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value of the element to add to the `Set` object.\n\n### Return value\n\nThe `Set` object with added value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Set/prototype/clear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.clear()\n\nThe **`clear()`** method removes all elements from a\n`Set` object.\n\n## Syntax\n\n```js\nclear()\n```\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Set/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.delete()\n\nThe **`delete()`** method removes a specified value from a\n`Set` object, if it is in the set.\n\n## Syntax\n\n```js\ndelete(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to remove from `Set`.\n\n### Return value\n\nReturns `true` if `value` was already in\n`Set`; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Set/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.entries()\n\nThe **`entries()`** method returns a new [Iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators) object\nthat contains **an array of `[value, value]`** for each element\nin the `Set` object, in insertion order. For `Set` objects there\nis no `key` like in `Map` objects. However, to keep the API\nsimilar to the `Map` object, each _entry_ has the same value for its\n_key_ and _value_ here, so that an array `[value, value]` is\nreturned.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Return value\n\nA new iterator object that contains an array of `[value, value]` for each\nelement in the given `Set`, in insertion order.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Set/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.forEach()\n\nThe **`forEach()`** method executes a provided function once\nfor each value in the `Set` object, in insertion order.\n\n## Syntax\n\n```js\n// Arrow function\nforEach(() => { /* ... */ } )\nforEach((value) => { /* ... */ } )\nforEach((value, key) => { /* ... */ } )\nforEach((value, key, set) => { /* ... */ } )\n\n// Callback function\nforEach(callbackFn)\nforEach(callbackFn, thisArg)\n\n// Inline callback function\nforEach(function() { /* ... */ })\nforEach(function(value) { /* ... */ })\nforEach(function(value, key) { /* ... */ })\nforEach(function(value, key, set) { /* ... */ })\nforEach(function(value, key, set) { /* ... */ }, thisArg)\n```\n\n### Parameters\n\n- `callback`\n\n  - : Function to execute for each element, taking three arguments:\n\n    - `value`, `key`\n      - : The current element being processed in the `Set`. As there are no\n        keys in `Set`, the value is passed for both arguments.\n    - `set`\n      - : The `Set` object which `forEach()` was called upon.\n\n- `thisArg`\n  - : Value to use as `this` when executing `callbackFn`.\n\n### Return value\n\n[`undefined`](../../../globals/undefined.mdx).\n\n## Description\n\nThe `forEach()` method executes the provided\n`callback` once for each value which actually exists in the\n`Set` object. It is not invoked for values which have been deleted. However,\nit is executed for values which are present but have the value `undefined`.\n\n`callback` is invoked with **three arguments**:\n\n- the **element value**\n- the **element key**\n- the **`Set` object being traversed**\n\nThere are no keys in `Set` objects, however, so the first two arguments are\nboth **values** contained in the [Set](../../../globals/Set/Set.mdx). This is to make it\nconsistent with other `forEach()` methods for [`Map.prototype.forEach()`](../../../globals/Map/prototype/forEach.mdx) and [`Array.prototype.forEach()`](../../../globals/Array/prototype/forEach.mdx).\n\nIf a `thisArg` parameter is provided to `forEach()`,\nit will be passed to `callback` when invoked, for use as its\n`this` value. Otherwise, the value `undefined` will be passed for\nuse as its `this` value. The `this` value ultimately observable by\n`callback` is determined according to\n[the usual rules for determining the `this` seen by a function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this).\n\nEach value is visited once, except in the case when it was deleted and re-added before\n`forEach()` has finished. `callback` is not invoked for\nvalues deleted before being visited. New values added before `forEach()` has\nfinished will be visited.\n\n`forEach()` executes the `callback` function once for\neach element in the `Set` object; it does not return a value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Set/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.has()\n\nThe **`has()`** method returns a boolean indicating whether an\nelement with the specified value exists in a `Set` object or not.\n\n## Syntax\n\n```js\nhas(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to test for presence in the `Set` object.\n\n### Return value\n\nReturns `true` if an element with the specified value exists in the `Set` object; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Set/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.keys()\n\nThe **`keys()`** method is an alias for the [`values()`](../../../globals/Set/prototype/values.mdx) method.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Return value\n\nA new iterator object containing the values for each element in the given\n`Set`, in insertion order.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Set/prototype/size.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.size\n\nThe **`size`** accessor property returns the number of (unique) elements in a [Set](../../../globals/Set/Set.mdx) object.\n\n## Description\n\nThe value of `size` is an integer representing how many entries the `Set` object has. A set accessor function for `size` is `undefined`; you cannot change this property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Set/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Set.prototype.values()\n\nThe **`values()`** method returns a new [Iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators) object that\ncontains the values for each element in the `Set` object in insertion order.\n\n> **Note:** The **`keys()`** method is an alias\n> for this method (for similarity with [Map](../../../globals/Map/Map.mdx) objects), hence the\n> `keys()` page redirecting here. It behaves exactly the same and returns\n> **values** of `Set` elements.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Return value\n\nA new iterator object containing the values for each element in the given\n`Set`, in insertion order.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/String/String.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String() constructor\n\nThe **`String`** constructor is used to create a new\n`String` object. When called instead as a function, it performs type\nconversion to a \"primitive string\" which is usually more\nuseful.\n\n## Syntax\n\n```js\nnew String(thing)\nString(thing)\n```\n\n> **Note:** `String()` can be called with or without `new`, but with different effects. See [Return value](#return-value).\n\n### Parameters\n\n- `thing`\n  - : Anything to be converted to a string.\n\n### Return value\n\nWhen `String` is called as a constructor (with `new`), it creates a `String` object, which is **not** a primitive.\n\nWhen `String` is called as a function, it coerces the parameter to a string primitive. `Symbol` values would be converted to `\"Symbol(description)\"`, where `description` is the [description](../../globals/Symbol/prototype/description.mdx) of the Symbol, instead of throwing.\n\n> **Warning:** You should rarely find yourself using `String` as a constructor.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/String/fromCharCode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.fromCharCode()\n\nThe static **`String.fromCharCode()`** method returns a string\ncreated from the specified sequence of UTF-16 code units.\n\n## Syntax\n\n```js\nString.fromCharCode(num1)\nString.fromCharCode(num1, num2)\nString.fromCharCode(num1, num2, /* …, */ numN)\n```\n\n### Parameters\n\n- `num1, ..., numN`\n  - : A sequence of numbers that are UTF-16 code units. The range is between\n    `0` and `65535` (`0xFFFF`). Numbers greater than\n    `0xFFFF` are truncated. No validity checks are performed.\n\n### Return value\n\nA string of length `N` consisting of the\n`N` specified UTF-16 code units.\n\n## Description\n\nThis method returns a string and not a `String` object.\n\nBecause `fromCharCode()` is a static method of `String`, you\nalways use it as `String.fromCharCode()`, rather than as a method of a\n`String` object you created.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/String/fromCodePoint.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.fromCodePoint()\n\nThe static **`String.fromCodePoint()`** method returns a string\ncreated by using the specified sequence of code points.\n\n## Syntax\n\n```js\nString.fromCodePoint(num1)\nString.fromCodePoint(num1, num2)\nString.fromCodePoint(num1, num2, /* …, */ numN)\n```\n\n### Parameters\n\n- `num1, ..., numN`\n  - : A sequence of code points.\n\n### Return value\n\nA string created by using the specified sequence of code points.\n\n### Exceptions\n\n- A `RangeError` is thrown if an invalid Unicode\n  code point is given (e.g. `\"RangeError: NaN is not a valid code point\"`).\n\n## Description\n\nThis method returns a string (and _not_ a `String` object).\n\nBecause `fromCodePoint()` is a static method of `String`, you\nmust call it as `String.fromCodePoint()`, rather than as a method of a\n`String` object you created.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/String/prototype/@@iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype\\[Symbol.iterator]()\n\nThe **`Symbol.iterator`** method of a string implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) and allows strings to be consumed by most syntaxes expecting iterables, such as the [spread syntax](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Spread_syntax) and [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) loops. It returns an iterator that yields the Unicode code points of the string value as individual strings.\n\n## Syntax\n\n```js\nstring[Symbol.iterator]()\n```\n\n### Return value\n\nA new iterable iterator object that yields the Unicode code points of the string value as individual strings.\n\n## Description\n\nStrings are iterated by Unicode code points. This means grapheme clusters will be split, but surrogate pairs will be preserved.\n\n```js\n// \"Backhand Index Pointing Right: Dark Skin Tone\"\n[...\"👉🏿\"]; // ['👉', '🏿']\n// splits into the basic \"Backhand Index Pointing Right\" emoji and\n// the \"Dark skin tone\" emoji\n\n// \"Family: Man, Boy\"\n[...\"👨‍👦\"]; // [ '👨', '‍', '👦' ]\n// splits into the \"Man\" and \"Boy\" emoji, joined by a ZWJ\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/String/prototype/at.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.at()\n\nThe **`at()`** method takes an integer value and returns a `('String` consisting of the single UTF-16 code unit located at the specified offset. This method allows for positive and negative integers. Negative integers count back from the last string character.\n\n## Syntax\n\n```js\nat(index)\n```\n\n### Parameters\n\n- `index`\n  - : The index (position) of the string character to be returned. Supports relative indexing from the end of the string when passed a negative index; i.e. if a negative number is used, the character returned will be found by counting back from the end of the string.\n\n### Return value\n\n`('String` consisting of the single UTF-16 code unit located at the specified position. Returns [`undefined`](../../../globals/undefined.mdx) if the given index can not be found.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/String/prototype/charAt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.charAt()\n\nThe `String` object's\n**`charAt()`** method returns a new string consisting of the\nsingle UTF-16 code unit located at the specified offset into the string.\n\n## Syntax\n\n```js\ncharAt(index)\n```\n\n### Parameters\n\n- `index`\n  - : An integer between `0` and `str.length - 1`. If the\n    `index` cannot be converted to the integer or no\n    `index` is provided, the default is `0`, so the first\n    character of `str` is returned.\n\n### Return value\n\nA string representing the character (exactly one UTF-16 code unit) at the specified\n`index`. If `index` is out of range,\n`charAt()` returns an empty string.\n\n## Description\n\nCharacters in a string are indexed from left to right. The index of the first character\nis `0`, and the index of the last character—in a string called\n`stringName` is `stringName.length - 1`. If\nthe `index` you supply is out of this range, JavaScript returns an\nempty string.\n\nIf no `index` is provided to `charAt()`, the default\nis `0`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/String/prototype/charCodeAt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.charCodeAt()\n\nThe **`charCodeAt()`** method returns\nan integer between `0` and `65535` representing the UTF-16 code\nunit at the given index.\n\nThe UTF-16 code unit matches the Unicode code point for code points which can be\nrepresented in a single UTF-16 code unit. If the Unicode code point cannot be\nrepresented in a single UTF-16 code unit (because its value is greater than\n`0xFFFF`) then the code unit returned will be _the first part of a\nsurrogate pair_ for the code point. If you want the entire code point value, use\n[`codePointAt()`](../../../globals/String/prototype/codePointAt.mdx).\n\n## Syntax\n\n```js\ncharCodeAt(index)\n```\n\n### Parameters\n\n- `index`\n  - : An integer greater than or equal to `0` and less than the\n    `length` of the string. If `index` is not a number,\n    it defaults to `0`.\n\n### Return value\n\nA number representing the UTF-16 code unit value of the character at the given\n`index`. If `index` is out of range,\n`charCodeAt()` returns `NaN`.\n\n## Description\n\nUnicode code points range from `0` to `1114111`\n(`0x10FFFF`). The first 128 Unicode code points are a direct match of the\nASCII character encoding. (For information on Unicode, see [UTF-16 characters, Unicode codepoints, and grapheme clusters](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters).)\n\n> **Note:** `charCodeAt()` will always return a value that is\n> less than `65536`. This is because the higher code points are represented\n> by _a pair_ of (lower valued) \"surrogate\" pseudo-characters which are used to\n> comprise the real character.\n>\n> Because of this, in order to examine (or reproduce) the full character for individual\n> character values of `65536` or greater, for such characters, it is\n> necessary to retrieve not only `charCodeAt(i)`, but also\n> `charCodeAt(i+1)` (as if manipulating a string with two\n> letters), or to use `codePointAt(i)` instead. See examples 2 and\n> 3 (below).\n\n`charCodeAt()` returns `NaN` if the given\nindex is less than `0`, or if it is equal to or greater than the\n`length` of the string.\n\nBackward compatibility: In historic versions (like JavaScript 1.2) the\n`charCodeAt()` method returns a number indicating the ISO-Latin-1 codeset\nvalue of the character at the given index. The ISO-Latin-1 codeset ranges from\n`0` to `255`. The first `0` to `127` are a\ndirect match of the ASCII character set.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/String/prototype/codePointAt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.codePointAt()\n\nThe **`codePointAt()`** method returns a non-negative integer\nthat is the Unicode code point value at the given position.\nNote that this function does not give the nth code point in a string,\nbut the code point starting at the specified string index.\n\n## Syntax\n\n```js\ncodePointAt(pos)\n```\n\n### Parameters\n\n- `pos`\n  - : Position of an element in `str` to return the code point value\n    from.\n\n### Return value\n\nA decimal number representing the code point value of the character at the given `pos`.\n\n- If there is no element at `pos`, returns [`undefined`](../../../globals/undefined.mdx).\n- If the element at `pos` is a UTF-16 high surrogate, returns the code point of the surrogate _pair_.\n- If the element at `pos` is a UTF-16 low surrogate, returns _only_ the low surrogate code point.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/String/prototype/concat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.concat()\n\nThe **`concat()`** method concatenates\nthe string arguments to the calling string and returns a new string.\n\n## Syntax\n\n```js\nconcat(str1)\nconcat(str1, str2)\nconcat(str1, str2, /* …, */ strN)\n```\n\n### Parameters\n\n- `strN`\n  - : One or more strings to concatenate to `str`.\n\n### Return value\n\nA new string containing the combined text of the strings provided.\n\n## Description\n\nThe `concat()` function concatenates the string arguments to the calling\nstring and returns a new string. Changes to the original string or the returned string\ndon't affect the other.\n\nIf the arguments are not of the type string, they are converted to string values before\nconcatenating.\n\nThe `concat()` method is very similar to the [addition/string concatenation operators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Addition) (`+`, `+=`), except that `concat()` [coerces its arguments directly to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion), while addition coerces its operands to primitives first. For more information, see the reference page for the [`+` operator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Addition).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/String/prototype/endsWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.endsWith()\n\nThe **`endsWith()`** method determines whether a string ends with the characters of a specified string, returning `true` or `false` as appropriate.\n\n## Syntax\n\n```js\nendsWith(searchString)\nendsWith(searchString, endPosition)\n```\n\n### Parameters\n\n- `searchString`\n  - : The characters to be searched for at the end of `str`. Cannot be a regex.\n- `endPosition` _**optional**_\n  - : The end position at which `searchString` is expected to be found (the index of `searchString`'s last character plus 1). Defaults to `str.length`.\n\n### Return value\n\n**`true`** if the given characters are found at the end of the string; otherwise, **`false`**.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If `searchString` is a regex.\n\n## Description\n\nThis method lets you determine whether or not a string ends with another string. This method is case-sensitive.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/String/prototype/includes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.includes()\n\nThe **`includes()`** method performs a case-sensitive search to determine whether one string may be found within another string, returning `true` or `false` as appropriate.\n\n## Syntax\n\n```js\nincludes(searchString)\nincludes(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n  - : A string to be searched for within `str`. Cannot be a regex.\n- `position` _**optional**_\n  - : The position within the string at which to begin searching for `searchString`. (Defaults to `0`.)\n\n### Return value\n\n**`true`** if the search string is found anywhere within the given string; otherwise, **`false`** if not.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If `searchString` is a regex.\n\n## Description\n\nThis method lets you determine whether or not a string includes another string.\n\n### Case-sensitivity\n\nThe `includes()` method is case sensitive. For example, the following expression returns `false`:\n\n```js\n\"Blue Whale\".includes(\"blue\"); // returns false\n```\n\nYou can work around this constraint by transforming both the original string and the search string to all lowercase:\n\n```js\n\"Blue Whale\".toLowerCase().includes(\"blue\"); // returns true\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/String/prototype/indexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.indexOf()\n\nThe **`indexOf()`** method, given one argument: a substring to search for, searches the entire calling string, and returns the index of the first occurrence of the specified substring. Given a second argument: a number, the method returns the first occurrence of the specified substring at an index greater than or equal to the specified number.\n\n## Syntax\n\n```js\nindexOf(searchString)\nindexOf(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n\n  - : Substring to search for, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion).\n\n    If the method is called with no arguments, `searchString` is coerced to `\"undefined\"`. Therefore,`\"undefined\".indexOf()` returns `0` — because the substring `\"undefined\"` is found at position `0` in the string `\"undefined\"`. But `\"undefine\".indexOf()`, returns `-1` — because the substring `\"undefined\"` is not found in the string `\"undefine\"`.\n\n- `position` _**optional**_\n\n  - : The method returns the index of the first occurrence of the specified substring at a position greater than or equal to `position`, which defaults to `0`. If `position` is greater than the length of the calling string, the method doesn't search the calling string at all. If `position` is less than zero, the method behaves as it would if `position` were `0`.\n\n    - `'hello world hello'.indexOf('o', -5)` returns `4` — because it causes the method to behave as if the second argument were `0`, and the first occurrence of `o` at a position greater or equal to `0` is at position `4`.\n\n    - `'hello world hello'.indexOf('world', 12)` returns `-1` — because, while it's true the substring `world` occurs at index `6`, that position is not greater than or equal to `12`.\n\n    - `'hello world hello'.indexOf('o', 99)` returns `-1` — because `99` is greater than the length of `hello world hello`, which causes the method to not search the string at all.\n\n### Return value\n\nThe index of the first occurrence of `searchString` found, or `-1` if not found.\n\n#### Return value when using an empty search string\n\nSearching for an empty search string produces strange results. With no second argument, or with a second argument whose value is less than the calling string's length, the return value is the same as the value of the second argument:\n\n```js\n\"hello world\".indexOf(\"\"); // returns 0\n\"hello world\".indexOf(\"\", 0); // returns 0\n\"hello world\".indexOf(\"\", 3); // returns 3\n\"hello world\".indexOf(\"\", 8); // returns 8\n```\n\nHowever, with a second argument whose value is greater than or equal to the string's length, the return value is the string's length:\n\n```js\n\"hello world\".indexOf(\"\", 11); // returns 11\n\"hello world\".indexOf(\"\", 13); // returns 11\n\"hello world\".indexOf(\"\", 22); // returns 11\n```\n\nIn the former instance, the method behaves as if it found an empty string just after the position specified in the second argument. In the latter instance, the method behaves as if it found an empty string at the end of the calling string.\n\n## Description\n\nStrings are zero-indexed: The index of a string's first character is `0`, and the index of a string's last character is the length of the string minus 1.\n\n```js\n\"Blue Whale\".indexOf(\"Blue\"); // returns  0\n\"Blue Whale\".indexOf(\"Blute\"); // returns -1\n\"Blue Whale\".indexOf(\"Whale\", 0); // returns  5\n\"Blue Whale\".indexOf(\"Whale\", 5); // returns  5\n\"Blue Whale\".indexOf(\"Whale\", 7); // returns -1\n\"Blue Whale\".indexOf(\"\"); // returns  0\n\"Blue Whale\".indexOf(\"\", 9); // returns  9\n\"Blue Whale\".indexOf(\"\", 10); // returns 10\n\"Blue Whale\".indexOf(\"\", 11); // returns 10\n```\n\nThe `indexOf()` method is case sensitive. For example, the following\nexpression returns `-1`:\n\n```js\n\"Blue Whale\".indexOf(\"blue\"); // returns -1\n```\n\n### Checking occurrences\n\nWhen checking if a specific substring occurs within a string, the correct way to check is test whether the return value is `-1`:\n\n```js\n\"Blue Whale\".indexOf(\"Blue\") !== -1; // true; found 'Blue' in 'Blue Whale'\n\"Blue Whale\".indexOf(\"Bloe\") !== -1; // false; no 'Bloe' in 'Blue Whale'\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/String/prototype/lastIndexOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.lastIndexOf()\n\nThe **`lastIndexOf()`** method, given one argument: a substring to search for, searches the entire calling string, and returns the index of the last occurrence of the specified substring. Given a second argument: a number, the method returns the last occurrence of the specified substring at an index less than or equal to the specified number.\n\n## Syntax\n\n```js\nlastIndexOf(searchString)\nlastIndexOf(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n\n  - : Substring to search for, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion).\n\n    If the method is called with no arguments, `searchString` is coerced to `\"undefined\"`. Therefore,`\"undefined\".lastIndexOf()` returns `0` — because the substring `\"undefined\"` is found at position `0` in the string `\"undefined\"`. But `\"undefine\".lastIndexOf()`, returns `-1` — because the substring `\"undefined\"` is not found in the string `\"undefine\"`.\n\n- `position` _**optional**_\n\n  - : The method returns the index of the last occurrence of the specified substring at a position less than or equal to `position`, which defaults to `+Infinity`. If `position` is greater than the length of the calling string, the method searches the entire string. If `position` is less than `0`, the behavior is the same as for `0` — that is, the method looks for the specified substring only at index `0`.\n\n    - `'hello world hello'.lastIndexOf('world', 4)` returns `-1` — because, while the substring `world` does occurs at index `6`, that position is not less than or equal to `4`.\n\n    - `'hello world hello'.lastIndexOf('hello', 99)` returns `12` — because the last occurrence of `hello` at a position less than or equal to `99` is at position `12`.\n\n    - `'hello world hello'.lastIndexOf('hello', 0)` and `'hello world hello'.lastIndexOf('hello', -5)` both return `0` — because both cause the method to only look for `hello` at index `0`.\n\n### Return value\n\nThe index of the last occurrence of `searchString` found, or `-1` if not found.\n\n## Description\n\nStrings are zero-indexed: The index of a string's first character is `0`, and the index of a string's last character is the length of the string minus 1.\n\n```js\n\"canal\".lastIndexOf(\"a\"); // returns 3\n\"canal\".lastIndexOf(\"a\", 2); // returns 1\n\"canal\".lastIndexOf(\"a\", 0); // returns -1\n\"canal\".lastIndexOf(\"x\"); // returns -1\n\"canal\".lastIndexOf(\"c\", -5); // returns 0\n\"canal\".lastIndexOf(\"c\", 0); // returns 0\n\"canal\".lastIndexOf(\"\"); // returns 5\n\"canal\".lastIndexOf(\"\", 2); // returns 2\n```\n\n### Case-sensitivity\n\nThe `lastIndexOf()` method is case sensitive. For example, the following\nexpression returns `-1`:\n\n```js\n\"Blue Whale, Killer Whale\".lastIndexOf(\"blue\"); // returns -1\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/String/prototype/length.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.length\n\nThe **`length`** data property of a string contains the length of the string in UTF-16 code units.\n\n## Value\n\nA non-negative integer.\n\n## Description\n\nThis property returns the number of code units in the string. JavaScript uses [UTF-16](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters) encoding, where each Unicode character may be encoded as one or two code units, so it's possible for the value returned by `length` to not match the actual number of Unicode characters in the string. For common scripts like Latin, Cyrillic, wellknown CJK characters, etc., this should not be an issue, but if you are working with certain scripts, such as emojis, [mathematical symbols](https://en.wikipedia.org/wiki/Mathematical_Alphanumeric_Symbols), or obscure Chinese characters, you may need to account for the difference between code units and characters.\n\nThe language specification requires strings to have a maximum length of 2<sup>53</sup> - 1 elements, which is the upper limit for [precise integers](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER). However, a string with this length needs 16384TiB of storage, which cannot fit in any reasonable device's memory, so implementations tend to lower the threshold, which allows the string's length to be conveniently stored in a 32-bit integer.\n\n- In V8 (used by Chrome and Node), the maximum length is 2<sup>29</sup> - 24 (\\~1GiB). On 32-bit systems, the maximum length is 2<sup>28</sup> - 16 (\\~512MiB).\n- In Firefox, the maximum length is 2<sup>30</sup> - 2 (\\~2GiB). Before Firefox 65, the maximum length was 2<sup>28</sup> - 1 (\\~512MiB).\n- In Safari, the maximum length is 2<sup>31</sup> - 1 (\\~4GiB).\n\nFor an empty string, `length` is 0.\n\nThe static property `String.length` is unrelated to the length of strings. It's the [arity](../../../globals/Function/prototype/length.mdx) of the `String` function (loosely, the number of formal parameters it has), which is 1.\n\nSince `length` counts code units instead of characters, if you want to get the number of characters, you can first split the string with its [iterator](../../../globals/String/prototype/@@iterator.mdx), which iterates by characters:\n\n```js\nfunction getCharacterLength(str) {\n  // The string iterator that is used here iterates over characters,\n  // not mere code units\n  return [...str].length;\n}\n\nconsole.log(getCharacterLength(\"A\\uD87E\\uDC04Z\")); // 3\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/String/prototype/localeCompare.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.localeCompare()\n\nThe **`localeCompare()`** method returns a number indicating whether a reference string comes before, or after, or is the same as the given string in sort order. In implementations with [`Intl.Collator` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator) support, this method simply calls `Intl.Collator`.\n\n## Syntax\n\n```js\nlocaleCompare(compareString)\nlocaleCompare(compareString, locales)\nlocaleCompare(compareString, locales, options)\n```\n\n### Parameters\n\nThe `locales` and `options` parameters customize the behavior of the function and let applications specify the language whose formatting conventions should be used.\n\nIn implementations that support the [`Intl.Collator` API](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator), these parameters correspond exactly to the [`Intl.Collator()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator) constructor's parameters. Implementations without `Intl.Collator` support are asked to ignore both parameters, making the comparison result returned entirely implementation-dependent — it's only required to be _consistent_.\n\n- `compareString`\n  - : The string against which the `referenceStr` is compared.\n- `locales` _**optional**_\n\n  - : A string with a BCP 47 language tag, or an array of such strings. Corresponds to the [`locales`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator#locales) parameter of the `Intl.Collator()` constructor.\n\n    In implementations without `Intl.Collator` support, this parameter is ignored and the host's locale is usually used.\n\n- `options` _**optional**_\n\n  - : An object adjusting the output format. Corresponds to the [`options`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator#options) parameter of the `Intl.Collator()` constructor.\n\n    In implementations without `Intl.Collator` support, this parameter is ignored.\n\nSee the [`Intl.Collator()` constructor](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator) for details on the `locales` and `options` parameters and how to use them.\n\n### Return value\n\nA **negative** number if `referenceStr` occurs before `compareString`; **positive** if the `referenceStr` occurs after `compareString`; `0` if they are equivalent.\n\nIn implementations with `Intl.Collator`, this is equivalent to `new Intl.Collator(locales, options).compare(referenceStr, compareString)`.\n\n## Description\n\nReturns an integer indicating whether the `referenceStr` comes\nbefore, after or is equivalent to the `compareString`.\n\n- Negative when the `referenceStr` occurs before\n  `compareString`\n- Positive when the `referenceStr` occurs after\n  `compareString`\n- Returns `0` if they are equivalent\n\n> **Warning:** Do not rely on exact return values of `-1` or `1`!\n>\n> Negative and positive integer results vary between browsers (as well as between\n> browser versions) because the W3C specification only mandates negative and positive\n> values. Some browsers may return `-2` or `2`, or even some other\n> negative or positive value.\n\n## Performance\n\nWhen comparing large numbers of strings, such as in sorting large arrays, it is better to create an [`Intl.Collator`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator) object and use the function provided by its [`compare()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/compare) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/String/prototype/match.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.match()\n\nThe **`match()`** method retrieves the result of matching a string against a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions).\n\n## Syntax\n\n```js\nmatch(regexp)\n```\n\n### Parameters\n\n- `regexp`\n\n  - : A regular expression object, or any object that has a [`Symbol.match`](../../../globals/Symbol/match.mdx) method.\n\n    If `regexp` is not a `RegExp` object and does not have a `Symbol.match` method, it is implicitly converted to a `RegExp` by using `new RegExp(regexp)`.\n\n    If you don't give any parameter and use the `match()` method directly, you will get an `Array` with an empty string: `[\"\"]`, because this is equivalent to `match(/(?:)/)`.\n\n### Return value\n\nAn `Array` whose contents depend on the presence or absence of the global (`g`) flag, or [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) if no matches are found.\n\n- If the `g` flag is used, all results matching the complete regular expression will be returned, but capturing groups are not included.\n- If the `g` flag is not used, only the first complete match and its related capturing groups are returned. In this case, `match()` will return the same result as `RegExp.prototype.exec()` (an array with some extra properties).\n\n## Description\n\nThe implementation of `String.prototype.match` itself is very simple — it simply calls the `Symbol.match` method of the argument with the string as the first parameter. The actual implementation comes from [`RegExp.prototype[@@match]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@match).\n\n- If you need to know if a string matches a regular expression `RegExp`, use `RegExp.prototype.test()`.\n- If you only want the first match found, you might want to use `RegExp.prototype.exec()` instead.\n- If you want to obtain capture groups and the global flag is set, you need to use `RegExp.prototype.exec()` or [`String.prototype.matchAll()`](../../../globals/String/prototype/matchAll.mdx) instead.\n\nFor more information about the semantics of `match()` when a regex is passed, see [`RegExp.prototype[@@match]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@match).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/String/prototype/matchAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.matchAll()\n\nThe **`matchAll()`** method returns an iterator of all results matching a string against a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions), including [capturing groups](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Regular_Expressions/Groups_and_Backreferences).\n\n## Syntax\n\n```js\nmatchAll(regexp)\n```\n\n### Parameters\n\n- `regexp`\n\n  - : A regular expression object, or any object that has a [`Symbol.matchAll`](../../../globals/Symbol/matchAll.mdx) method.\n\n    If `regexp` is not a `RegExp` object and does not have a `Symbol.matchAll` method, it is implicitly converted to a `RegExp` by using `new RegExp(regexp, 'g')`.\n\n    If `regexp` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes), then it must have the global (`g`) flag set, or a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Return value\n\nAn [iterable iterator](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Iterators_and_Generators) (which is not restartable) of matches. Each match is an array with the same shape as the return value of `RegExp.prototype.exec()`.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown if the `regexp` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes) that does not have the global (`g`) flag set (its [`flags`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/flags) property does not contain `\"g\"`).\n\n## Description\n\nThe implementation of `String.prototype.matchAll` itself is very simple — it simply calls the `Symbol.matchAll` method of the argument with the string as the first parameter (apart from the extra input validation that the regex is global). The actual implementation comes from [`RegExp.prototype[@@matchAll]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@matchAll).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/String/prototype/padEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.padEnd()\n\nThe **`padEnd()`** method pads the current string with a given\nstring (repeated, if needed) so that the resulting string reaches a given length. The\npadding is applied from the end of the current string.\n\n## Syntax\n\n```js\npadEnd(targetLength)\npadEnd(targetLength, padString)\n```\n\n### Parameters\n\n- `targetLength`\n  - : The length of the resulting string once the current `str` has\n    been padded. If the value is lower than `str.length`, the\n    current string will be returned as-is.\n- `padString` _**optional**_\n  - : The string to pad the current `str` with. If\n    `padString` is too long to stay within\n    `targetLength`, it will be truncated: for left-to-right\n    languages the left-most part and for right-to-left languages the right-most will be\n    applied. The default value for this parameter is \" \"\n    (`U+0020`).\n\n### Return value\n\nA `String` of the specified `targetLength` with the\n`padString` applied at the end of the current\n`str`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/String/prototype/padStart.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.padStart()\n\nThe **`padStart()`** method pads the\ncurrent string with another string (multiple times, if needed) until the resulting\nstring reaches the given length. The padding is applied from the start of the\ncurrent string.\n\n## Syntax\n\n```js\npadStart(targetLength)\npadStart(targetLength, padString)\n```\n\n### Parameters\n\n- `targetLength`\n  - : The length of the resulting string once the current `str` has\n    been padded. If the value is less than `str.length`, then\n    `str` is returned as-is.\n- `padString` _**optional**_\n  - : The string to pad the current `str` with. If\n    `padString` is too long to stay within the\n    `targetLength`, it will be truncated from the end.\n    The default value is the unicode \"space\" character (U+0020).\n\n### Return value\n\nA `String` of the specified `targetLength` with\n`padString` applied from the start.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/String/prototype/repeat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.repeat()\n\nThe **`repeat()`** method constructs and returns a new string\nwhich contains the specified number of copies of the string on which it was called,\nconcatenated together.\n\n## Syntax\n\n```js\nrepeat(count)\n```\n\n### Parameters\n\n- `count`\n  - : An integer between `0` and\n    [`+Infinity`](../../../globals/Number/POSITIVE_INFINITY.mdx), indicating the\n    number of times to repeat the string.\n\n### Return value\n\nA new string containing the specified number of copies of the given string.\n\n### Exceptions\n\n- Throws a `RangeError` if repeat count is negative.\n- Throws a `RangeError` if repeat count is infinity or overflows maximum string size.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/String/prototype/replace.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.replace()\n\nThe **`replace()`** method returns a new string with one, some, or all matches of a `pattern` replaced by a `replacement`. The `pattern` can be a string or a `RegExp`, and the `replacement` can be a string or a function called for each match. If `pattern` is a string, only the first occurrence will be replaced. The original string is left unchanged.\n\n## Syntax\n\n```js\nreplace(pattern, replacement)\n```\n\n### Parameters\n\n- `pattern`\n  - : Can be a string or an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method — the typical example being a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp). Any value that doesn't have the `Symbol.replace` method will be coerced to a string.\n- `replacement`\n  - : Can be a string or a function.\n    - If it's a string, it will replace the substring matched by `pattern`. A number of special replacement patterns are supported; see the [Specifying a string as the replacement](#specifying-a-string-as-the-replacement) section below.\n    - If it's a function, it will be invoked for every match and its return value is used as the replacement text. The arguments supplied to this function are described in the [Specifying a function as the replacement](#specifying-a-function-as-the-replacement) section below.\n\n### Return value\n\nA new string, with one, some, or all matches of the pattern replaced by the specified replacement.\n\n## Description\n\nThis method does not mutate the string value it's called on. It returns a new string.\n\nA string pattern will only be replaced once. To perform a global search and replace, use a regular expression with the `g` flag, or use [`replaceAll()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/replaceAll) instead.\n\nIf `pattern` is an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method (including `RegExp` objects), that method is called with the target string and `replacement` as arguments. Its return value becomes the return value of `replace()`. In this case the behavior of `replace()` is entirely encoded by the `@@replace` method — for example, any mention of \"capturing groups\" in the description below is actually functionality provided by [`RegExp.prototype[@@replace]`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@replace).\n\nIf the `pattern` is an empty string, the replacement is prepended to the start of the string.\n\n```js\n\"xxx\".replace(\"\", \"_\"); // \"_xxx\"\n```\n\nA regexp with the `g` flag is the only case where `replace()` replaces more than once. For more information about how regex properties (especially the [sticky](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky) flag) interact with `replace()`, see [`RegExp.prototype[@@replace]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@replace).\n\n### Specifying a string as the replacement\n\nThe replacement string can include the following special replacement patterns:\n\n| Pattern   | Inserts                                                                                        |\n| --------- | ---------------------------------------------------------------------------------------------- |\n| `$$`      | Inserts a `\"$\"`.                                                                               |\n| `$&`      | Inserts the matched substring.                                                                 |\n| `` $` ``  | Inserts the portion of the string that precedes the matched substring.                         |\n| `$'`      | Inserts the portion of the string that follows the matched substring.                          |\n| `$n`      | Inserts the `n`th (`1`-indexed) capturing group where `n` is a positive integer less than 100. |\n| `$<Name>` | Inserts the named capturing group where `Name` is the group name.                              |\n\n`$n` and `$<Name>` are only available if the `pattern` argument is a `RegExp` object. If the `pattern` is a string, or if the corresponding capturing group isn't present in the regex, then the pattern will be replaced as a literal. If the group is present but isn't matched (because it's part of a disjunction), it will be replaced with an empty string.\n\n```js\n\"foo\".replace(/(f)/, \"$2\");\n// \"$2oo\"; the regex doesn't have the second group\n\n\"foo\".replace(\"f\", \"$1\");\n// \"$1oo\"; the pattern is a string, so it doesn't have any groups\n\n\"foo\".replace(/(f)|(g)/, \"$2\");\n// \"oo\"; the second group exists but isn't matched\n```\n\n### Specifying a function as the replacement\n\nYou can specify a function as the second parameter. In this case, the function will be invoked after the match has been performed. The function's result (return value) will be used as the replacement string.\n\n> **Note:** The above-mentioned special replacement patterns do _not_ apply for strings returned from the replacer function.\n\nThe function has the following signature:\n\n```js\nfunction replacer(match, p1, p2, /* …, */ pN, offset, string, groups) {\n  return replacement;\n}\n```\n\nThe arguments to the function are as follows:\n\n- `match`\n  - : The matched substring. (Corresponds to `$&` above.)\n- `p1, p2, …, pN`\n  - : The `n`th string found by a capture group (including named capturing groups), provided the first argument to `replace()` is a `RegExp` object. (Corresponds to `$1`, `$2`, etc. above.) For example, if the `pattern` is `/(\\a+)(\\b+)/`, then `p1` is the match for `\\a+`, and `p2` is the match for `\\b+`. If the group is part of a disjunction (e.g. `\"abc\".replace(/(a)|(b)/, replacer)`), the unmatched alternative will be `undefined`.\n- `offset`\n  - : The offset of the matched substring within the whole string being examined. For example, if the whole string was `'abcd'`, and the matched substring was `'bc'`, then this argument will be `1`.\n- `string`\n  - : The whole string being examined.\n- `groups`\n  - : An object whose keys are the used group names, and whose values are the matched portions (`undefined` if not matched). Only present if the `pattern` contains at least one named capturing group.\n\nThe exact number of arguments depends on whether the first argument is a `RegExp` object — and, if so, how many capture groups it has.\n\nThe following example will set `newString` to `'abc - 12345 - #$*%'`:\n\n```js\nfunction replacer(match, p1, p2, p3, offset, string) {\n  // p1 is non-digits, p2 digits, and p3 non-alphanumerics\n  return [p1, p2, p3].join(\" - \");\n}\nconst newString = \"abc12345#$*%\".replace(/([^\\d]*)(\\d*)([^\\w]*)/, replacer);\nconsole.log(newString); // abc - 12345 - #$*%\n```\n\nThe function will be invoked multiple times for each full match to be replaced if the regular expression in the first parameter is global.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/String/prototype/replaceAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.replaceAll()\n\nThe **`replaceAll()`** method returns a new string with all matches of a `pattern` replaced by a `replacement`. The `pattern` can be a string or a `RegExp`, and the `replacement` can be a string or a function to be called for each match. The original string is left unchanged.\n\n## Syntax\n\n```js\nreplaceAll(pattern, replacement)\n```\n\n### Parameters\n\n- `pattern`\n\n  - : Can be a string or an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method — the typical example being a [regular expression](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp). Any value that doesn't have the `Symbol.replace` method will be coerced to a string.\n\n    If `pattern` is a regex, then it must have the global (`g`) flag set, or a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n- `replacement`\n  - : Can be a string or a function. The replacement has the same semantics as that of [`String.prototype.replace()`](../../../globals/String/prototype/replace.mdx).\n\n### Return value\n\nA new string, with all matches of a pattern replaced by a replacement.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : Thrown if the `pattern` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes) that does not have the global (`g`) flag set (its [`flags`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/flags) property does not contain `\"g\"`).\n\n## Description\n\nThis method does not mutate the string value it's called on. It returns a new string.\n\nUnlike [`String.prototype.replace()`](../../../globals/String/prototype/replace.mdx), this method would replace all occurrences of a string, not just the first one. This is especially useful if the string is not statically known, as calling the [`RegExp()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/RegExp) constructor without escaping special characters may unintentionally change its semantics.\n\n```js\nfunction unsafeRedactName(text, name) {\n  return text.replace(new RegExp(name, \"g\"), \"[REDACTED]\");\n}\nfunction safeRedactName(text, name) {\n  return text.replaceAll(name, \"[REDACTED]\");\n}\n\nconst report =\n  \"A hacker called ha.*er used special characters in their name to breach the system.\";\n\nconsole.log(unsafeRedactName(report, \"ha.*er\")); // \"A [REDACTED]s in their name to breach the system.\"\nconsole.log(safeRedactName(report, \"ha.*er\")); // \"A hacker called [REDACTED] used special characters in their name to breach the system.\"\n```\n\nIf `pattern` is an object with a [`Symbol.replace`](../../../globals/Symbol/replace.mdx) method (including `RegExp` objects), that method is called with the target string and `replacement` as arguments. Its return value becomes the return value of `replaceAll()`. In this case the behavior of `replaceAll()` is entirely encoded by the `Symbol.replace` method, and therefore will have the same result as `replace()` (apart from the extra input validation that the regex is global).\n\nIf the `pattern` is an empty string, the replacement will be inserted in between every UTF-16 code unit, similar to [`String.prototype.split()`](../../../globals/String/prototype/split.mdx) behavior.\n\n```js\n\"xxx\".replaceAll(\"\", \"_\"); // \"_x_x_x_\"\n```\n\nFor more information about how regex properties (especially the [sticky](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky) flag) interact with `replaceAll()`, see [`RegExp.prototype[@@replace]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@replace).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/String/prototype/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.search()\n\nThe **`search()`** method executes a search for a match between a regular expression and this `String` object.\n\n## Syntax\n\n```js\nsearch(regexp)\n```\n\n### Parameters\n\n- `regexp`\n\n  - : A regular expression object, or any object that has a [`Symbol.search`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol/search) method.\n\n    If `regexp` is not a `RegExp` object and does not have a `Symbol.search` method, it is implicitly converted to a `RegExp` by using `new RegExp(regexp)`.\n\n### Return value\n\nThe index of the first match between the regular expression and the given string, or `-1` if no match was found.\n\n## Description\n\nThe implementation of `String.prototype.search()` itself is very simple — it simply calls the `Symbol.search` method of the argument with the string as the first parameter. The actual implementation comes from [`RegExp.prototype[@@search]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@search).\n\nThe `g` flag of `regexp` has no effect on the `search()` result, and the search always happens as if the regex's `lastIndex` is 0. For more information on the behavior of `search()`, see [`RegExp.prototype[@@search]()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@search).\n\nWhen you want to know whether a pattern is found, and _also_ know its index within a string, use `search()`.\n\n- If you only want to know if it exists, use the `RegExp.prototype.test()` method, which returns a boolean.\n- If you need the content of the matched text, use `String.prototype.match()` or `RegExp.prototype.exec()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/String/prototype/slice.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.slice()\n\nThe **`slice()`** method extracts a section of a string and\nreturns it as a new string, without modifying the original string.\n\n## Syntax\n\n```js\nslice(indexStart)\nslice(indexStart, indexEnd)\n```\n\n### Parameters\n\n- `indexStart`\n  - : The index of the first character to include in the returned substring.\n- `indexEnd` _**optional**_\n  - : The index of the first character to exclude from the returned substring.\n\n### Return value\n\nA new string containing the extracted section of the string.\n\n## Description\n\n`slice()` extracts the text from one string and returns a new string. Changes to the text in one string do not affect the other string.\n\n`slice()` extracts up to but not including `indexEnd`. For example, `str.slice(1, 4)` extracts the second character through the fourth character (characters indexed `1`, `2`, and `3`).\n\n- If `indexStart >= str.length`, an empty string is returned.\n- If `indexStart < 0`, the index is counted from the end of the string. More formally, in this case, the substring starts at `max(indexStart + str.length, 0)`.\n- If `indexStart` is omitted, undefined, or cannot be converted to a number (using [`Number()`](../../../globals/Number/Number.mdx)), it's treated as `0`.\n- If `indexEnd` is omitted, undefined, or cannot be converted to a number (using [`Number()`](../../../globals/Number/Number.mdx)), or if `indexEnd >= str.length`, `slice()` extracts to the end of the string.\n- If `indexEnd < 0`, the index is counted from the end of the string. More formally, in this case, the substring ends at `max(indexEnd + str.length, 0)`.\n- If `indexEnd <= indexStart` after normalizing negative values (i.e. `indexEnd` represents a character that's before `indexStart`), an empty string is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/String/prototype/split.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.split()\n\nThe **`split()`** method takes a pattern and divides a `String` into an ordered list of substrings by searching for the pattern, puts these substrings into an array, and returns the array.\n\n## Syntax\n\n```js\nsplit()\nsplit(separator)\nsplit(separator, limit)\n```\n\n### Parameters\n\n- `separator` _**optional**_\n  - : The pattern describing where each split should occur. Can be a string or an object with a [`Symbol.split`](../../../globals/Symbol/split.mdx) method — the typical example being a regular expression. If undefined, the original target string is returned wrapped in an array.\n- `limit` _**optional**_\n  - : A non-negative integer specifying a limit on the number of substrings to be included in the array. If provided, splits the string at each occurrence of the specified `separator`, but stops when `limit` entries have been placed in the array. Any leftover text is not included in the array at all.\n    - The array may contain fewer entries than `limit` if the end of the string is reached before the limit is reached.\n    - If `limit` is `0`, `[]` is returned.\n\n### Return value\n\nAn `Array` of strings, split at each point where the `separator` occurs in the given string.\n\n## Description\n\nIf `separator` is a non-empty string, the target string is split by all matches of the `separator` without including `separator` in the results. For example, a string containing tab separated values (TSV) could be parsed by passing a tab character as the separator, like `myString.split(\"\\t\")`. If `separator` contains multiple characters, that entire character sequence must be found in order to split. If `separator` appears at the beginning (or end) of the string, it still has the effect of splitting, resulting in an empty (i.e. zero length) string appearing at the first (or last) position of the returned array. If `separator` does not occur in `str`, the returned array contains one element consisting of the entire string.\n\nIf `separator` is an empty string (`\"\"`), `str` is converted to an array of each of its UTF-16 \"characters\", without empty strings on either ends of the resulting string.\n\n> **Note:** `\"\".split(\"\")` is therefore the only way to produce an empty array when a string is passed as `separator`.\n\n> **Warning:** When the empty string (`\"\"`) is used as a separator, the string is **not** split by _user-perceived characters_ ([grapheme clusters](https://unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries)) or unicode characters (codepoints), but by UTF-16 codeunits. This destroys [surrogate pairs](https://unicode.org/faq/utf_bom.html#utf16-2). See [\"How do you get a string to a character array in JavaScript?\" on StackOverflow](https://stackoverflow.com/questions/4547609/how-to-get-character-array-from-a-string/34717402#34717402).\n\nIf `separator` is a regexp that matches empty strings, whether the match is split by UTF-16 code units or Unicode codepoints depends on if the [`u`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp/unicode) flag is set.\n\n```js\n\"😄😄\".split(/(?:)/); // [ \"\\ud83d\", \"\\ude04\", \"\\ud83d\", \"\\ude04\" ]\n\"😄😄\".split(/(?:)/u); // [ \"😄\", \"😄\" ]\n```\n\nIf `separator` is a regular expression with capturing groups, then each time `separator` matches, the captured groups (including any `undefined` results) are spliced into the output array. This behavior is specified by the regexp's [`Symbol.split`](../../../globals/Symbol/split.mdx) method.\n\nIf `separator` is an object with a [`Symbol.split`](../../../globals/Symbol/split.mdx) method, that method is called with the target string and `limit` as arguments, and `this` set to the object. Its return value becomes the return value of `split`.\n\nAny other value will be coerced to a string before being used as separator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/String/prototype/startsWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.startsWith()\n\nThe **`startsWith()`** method determines whether a string begins with the characters of a specified string, returning `true` or `false` as appropriate.\n\n## Syntax\n\n```js\nstartsWith(searchString)\nstartsWith(searchString, position)\n```\n\n### Parameters\n\n- `searchString`\n  - : The characters to be searched for at the start of this string. Cannot be a regex.\n- `position` _**optional**_\n  - : The start position at which `searchString` is expected to be found (the index of `searchString`'s first character). Defaults to `0`.\n\n### Return value\n\n**`true`** if the given characters are found at the beginning of the string; otherwise, **`false`**.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : If `searchString` [is a regex](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes).\n\n## Description\n\nThis method lets you determine whether or not a string begins with another string. This method is case-sensitive.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/String/prototype/substr.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.substr()\n\nThe **`substr()`** method returns a portion of the string, starting at the specified index and extending for a given number of characters afterwards.\n\n> **Note:** `substr()` is not part of the main ECMAScript specification — it's defined in [Annex B: Additional ECMAScript Features for Web Browsers](https://tc39.es/ecma262/#sec-additional-ecmascript-features-for-web-browsers), which is normative optional for non-browser runtimes. Therefore, people are advised to use the standard [`String.prototype.substring()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/substring) and [`String.prototype.slice()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/slice) methods instead to make their code maximally cross-platform friendly. The [`String.prototype.substring()` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/substring#the_difference_between_substring_and_substr) has some comparisons between the three methods.\n\n\n\n## Syntax\n\n```js\nsubstr(start)\nsubstr(start, length)\n```\n\n### Parameters\n\n- `start`\n  - : The index of the first character to include in the returned substring.\n- `length` _**optional**_\n  - : The number of characters to extract.\n\n### Return value\n\nA new string containing the specified part of the given string.\n\n## Description\n\nA string's `substr()` method extracts `length` characters from the string, counting from the `start` index.\n\n- If `start >= str.length`, an empty string is returned.\n- If `start < 0`, the index starts counting from the end of the string. More formally, in this case the substring starts at `max(start + str.length, 0)`.\n- If `start` is omitted or [`undefined`](../../../globals/undefined.mdx), it's treated as `0`.\n- If `length` is omitted or [`undefined`](../../../globals/undefined.mdx), or if `start + length >= str.length`, `substr()` extracts characters to the end of the string.\n- If `length < 0`, an empty string is returned.\n- For both `start` and `length`, [`NaN`](../../../globals/NaN.mdx) is treated as `0`.\n\nAlthough you are encouraged to avoid using `substr()`, there is no trivial way to migrate `substr()` to either `slice()` or `substring()` in legacy code without essentially writing a polyfill for `substr()`. For example, `str.substr(a, l)`, `str.slice(a, a + l)`, and `str.substring(a, a + l)` all have different results when `str = \"01234\", a = 1, l = -2` — `substr()` returns an empty string, `slice()` returns `\"123\"`, while `substring()` returns `\"0\"`. The actual refactoring path depends on the knowledge of the range of `a` and `l`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/String/prototype/substring.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.substring()\n\nThe **`substring()`** method returns the part of the `string` from the start index up to and excluding the end index, or to the end of the string if no end index is supplied.\n\n## Syntax\n\n```js\nsubstring(indexStart)\nsubstring(indexStart, indexEnd)\n```\n\n### Parameters\n\n- `indexStart`\n  - : The index of the first character to include in the returned substring.\n- `indexEnd` _**optional**_\n  - : The index of the first character to exclude from the returned substring.\n\n### Return value\n\nA new string containing the specified part of the given string.\n\n## Description\n\n`substring()` extracts characters from `indexStart` up to _but not including_ `indexEnd`. In particular:\n\n- If `indexEnd` is omitted, `substring()` extracts characters to the end of the string.\n- If `indexStart` is equal to `indexEnd`, `substring()` returns an empty string.\n- If `indexStart` is greater than `indexEnd`, then the effect of `substring()` is as if the two arguments were swapped; see example below.\n\nAny argument value that is less than `0` or greater than `str.length` is treated as if it were `0` and `str.length`, respectively.\n\nAny argument value that is [`NaN`](../../../globals/NaN.mdx) is treated as if it were `0`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/String/prototype/toLocaleLowerCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toLocaleLowerCase()\n\nThe **`toLocaleLowerCase()`** method returns the calling string\nvalue converted to lower case, according to any locale-specific case mappings.\n\n## Syntax\n\n```js\ntoLocaleLowerCase()\ntoLocaleLowerCase(locales)\n```\n\n### Parameters\n\n- `locales` _**optional**_\n  - : A string with a BCP 47 language tag, or an array of such strings. Indicates the locale to be used to convert to lower case according to any locale-specific case mappings. For the general form and interpretation of the `locales` argument, see [Locale identification and negotiation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation).\n\n### Return value\n\nA new string representing the calling string converted to lower case, according to any\nlocale-specific case mappings.\n\n### Exceptions\n\n- A [`RangeError`](../../../globals/RangeError/RangeError.mdx) (\"invalid language tag: xx_yy\") is thrown if a\n  `locale` argument isn't a valid language tag.\n- A [`TypeError`](../../../globals/TypeError/TypeError.mdx) (\"invalid element in locales argument\") is thrown if an\n  array element isn't of type string.\n\n## Description\n\nThe `toLocaleLowerCase()` method returns the value of the string converted\nto lower case according to any locale-specific case mappings.\n`toLocaleLowerCase()` does not affect the value of the string itself. In most\ncases, this will produce the same result as [`String.prototype.toLowerCase()`](../../../globals/String/prototype/toLowerCase.mdx), but for some locales, such as Turkish, whose case mappings do not\nfollow the default case mappings in Unicode, there may be a different result.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/String/prototype/toLocaleUpperCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toLocaleUpperCase()\n\nThe **`toLocaleUpperCase()`** method returns the calling string\nvalue converted to upper case, according to any locale-specific case mappings.\n\n## Syntax\n\n```js\ntoLocaleUpperCase()\ntoLocaleUpperCase(locales)\n```\n\n### Parameters\n\n- `locales` _**optional**_\n  - : A string with a BCP 47 language tag, or an array of such strings. Indicates the locale to be used to convert to upper case according to any locale-specific case mappings. For the general form and interpretation of the `locales` argument, see [Locale identification and negotiation](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation).\n\n### Return value\n\nA new string representing the calling string converted to upper case, according to any\nlocale-specific case mappings.\n\n### Exceptions\n\n- A [`RangeError`](../../../globals/RangeError/RangeError.mdx) (\"invalid language tag: xx_yy\") is thrown if a\n  `locale` argument isn't a valid language tag.\n- A [`TypeError`](../../../globals/TypeError/TypeError.mdx) (\"invalid element in locales argument\") is thrown if an\n  array element isn't of type string.\n\n## Description\n\nThe `toLocaleUpperCase()` method returns the value of the string converted\nto upper case according to any locale-specific case mappings.\n`toLocaleUpperCase()` does not affect the value of the string itself. In most\ncases, this will produce the same result as [`String.prototype.toUpperCase()`](../../../globals/String/prototype/toUpperCase.mdx), but for some locales, such as Turkish, whose case mappings do not\nfollow the default case mappings in Unicode, there may be a different result.\n\nAlso notice that conversion is not necessarily a 1:1 character mapping, as some\ncharacters might result in two (or even more) characters when transformed to upper-case.\nTherefore the length of the result string can differ from the input length. This also\nimplies that the conversion is not stable, so i.E. the following can return\n`false`:\n`x.toLocaleLowerCase() === x.toLocaleUpperCase().toLocaleLowerCase()`\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/String/prototype/toLowerCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toLowerCase()\n\nThe **`toLowerCase()`** method returns the calling string value\nconverted to lower case.\n\n## Syntax\n\n```js\ntoLowerCase()\n```\n\n### Return value\n\nA new string representing the calling string converted to lower case.\n\n## Description\n\nThe `toLowerCase()` method returns the value of the string converted to\nlower case. `toLowerCase()` does not affect the value of the string\n`str` itself.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/String/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified string value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified string value.\n\n## Description\n\nThe `String` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For `String` values, the `toString` method returns the string itself (if it's a primitive) or the string that the `String` object wraps. It has the exact same implementation as [`String.prototype.valueOf()`](../../../globals/String/prototype/valueOf.mdx).\n\nThe `toString()` method requires its `this` value to be a `String` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to string values.\n\nBecause `String` doesn't have a [`[Symbol.toPrimitive]()`](../../../globals/Symbol/toPrimitive.mdx) method, JavaScript calls the `toString()` method automatically when a `String` _object_ is used in a context expecting a string, such as in a [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). However, String _primitive_ values do not consult the `toString()` method to be [coerced to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) — since they are already strings, no conversion is performed.\n\n```js\nString.prototype.toString = () => \"Overridden\";\nconsole.log(`${\"foo\"}`); // \"foo\"\nconsole.log(`${new String(\"foo\")}`); // \"Overridden\"\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/String/prototype/toUpperCase.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.toUpperCase()\n\nThe **`toUpperCase()`** method returns the calling string value\nconverted to uppercase (the value will be converted to a string if it isn't one).\n\n## Syntax\n\n```js\ntoUpperCase()\n```\n\n### Return value\n\nA new string representing the calling string converted to upper case.\n\n### Exceptions\n\n- [`TypeError`](../../../globals/TypeError/TypeError.mdx)\n  - : When called on [`null`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/null) or [`undefined`](../../../globals/undefined.mdx), for example,\n    `String.prototype.toUpperCase.call(undefined)`.\n\n## Description\n\nThe `toUpperCase()` method returns the value of the string converted to\nuppercase. This method does not affect the value of the string itself since JavaScript\nstrings are immutable.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/String/prototype/trim.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.trim()\n\nThe **`trim()`** method removes whitespace from both ends of a string and returns a new string, without modifying the original string.\n\nTo return a new string with whitespace trimmed from just one end, use [`String.prototype.trimStart()`](../../../globals/String/prototype/trimStart.mdx) or [`String.prototype.trimEnd()`](../../../globals/String/prototype/trimEnd.mdx).\n\n## Syntax\n\n```js\ntrim()\n```\n\n### Return value\n\nA new string representing `str` stripped of whitespace from both its beginning and end. Whitespace is defined as [white space](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#white_space) characters plus [line terminators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#line_terminators).\n\nIf neither the beginning or end of `str` has any whitespace, a new string is still returned (essentially a copy of `str`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/String/prototype/trimEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.trimEnd()\n\nThe **`trimEnd()`** method removes whitespace from the end of a string and returns a new string, without modifying the original string. `trimRight()` is an alias of this method.\n\n## Syntax\n\n```js\ntrimEnd()\n\ntrimRight()\n```\n\n### Return value\n\nA new string representing `str` stripped of whitespace from its end (right side). Whitespace is defined as [white space](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#white_space) characters plus [line terminators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#line_terminators).\n\nIf the end of `str` has no whitespace, a new string is still returned (essentially a copy of `str`).\n\n### Aliasing\n\nAfter [`String.prototype.trim()`](../../../globals/String/prototype/trim.mdx) was standardized, engines also implemented the non-standard method `trimRight`. However, for consistency with [`String.prototype.pedEnd()`](../../../globals/String/prototype/trim.mdx), when the method got standardized, its name was chosen as `trimEnd`. For web compatibility reasons, `trimRight` remains as an alias to `trimEnd`, and they refer to the exact same function object. In some engines this means:\n\n```js\nString.prototype.trimRight.name === \"trimEnd\";\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/String/prototype/trimStart.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.trimStart()\n\nThe **`trimStart()`** method removes whitespace from the beginning of a string and returns a new string, without modifying the original string. `trimLeft()` is an alias of this method.\n\n## Syntax\n\n```js\ntrimStart()\n\ntrimLeft()\n```\n\n### Return value\n\nA new string representing `str` stripped of whitespace from its beginning (left side). Whitespace is defined as [white space](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#white_space) characters plus [line terminators](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#line_terminators).\n\nIf the beginning of `str` has no whitespace, a new string is still returned (essentially a copy of `str`).\n\n### Aliasing\n\nAfter [`String.prototype.trim()`](../../../globals/String/prototype/trim.mdx) was standardized, engines also implemented the non-standard method `trimLeft`. However, for consistency with [`String.prototype.padEnd()`](../../../globals/String/prototype/padEnd.mdx), when the method got standardized, its name was chosen as `trimStart`. For web compatibility reasons, `trimLeft` remains as an alias to `trimStart`, and they refer to the exact same function object. In some engines this means:\n\n```js\nString.prototype.trimLeft.name === \"trimStart\";\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/String/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a\n`String` object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nA string representing the primitive value of a given `String` object.\n\n## Description\n\nThe `valueOf()` method of `String` returns the primitive value\nof a `String` object as a string data type. This value is equivalent to\n[`String.prototype.toString()`](../../../globals/String/prototype/toString.mdx).\n\nThis method is usually called internally by JavaScript and not explicitly in code.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/String/raw.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# String.raw()\n\nThe static **`String.raw()`** method is a tag function of [template literals](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals). This is similar to the `r` prefix in Python, or the `@` prefix in C# for string literals. It's used to get the raw string form of template literals — that is, substitutions (e.g. `${foo}`) are processed, but escape sequences (e.g. `\\n`) are not.\n\n## Syntax\n\n```js\nString.raw(strings, ...substitutions)\n\nString.raw`templateString`\n```\n\n### Parameters\n\n- `strings`\n  - : Well-formed template literal array object, like `{ raw: ['foo', 'bar', 'baz'] }`. Should be an object with a `raw` property whose value is an array-like object of strings.\n- `...substitutions`\n  - : Contains substitution values.\n- `templateString`\n  - : A [template literal](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals), optionally with substitutions (`${...}`).\n\n### Return value\n\nThe raw string form of a given template literal.\n\n### Exceptions\n\n- [`TypeError`](../../globals/TypeError/TypeError.mdx)\n  - : Thrown if the first argument doesn't have a `raw` property, or the `raw` property is `undefined` or `null`.\n\n## Description\n\nIn most cases, `String.raw()` is used with template literals. The first syntax mentioned above is only rarely used, because the JavaScript engine will call this with proper arguments for you, (just like with other [tag functions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Template_literals#tagged_templates)).\n\n`String.raw()` is the only built-in template literal tag. It has close semantics to an untagged literal since it concatenates all arguments and returns a string. You can even re-implement it with normal JavaScript code.\n\n> **Warning:** You should not use `String.raw` directly as an \"identity\" tag. See [Building an identity tag](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/raw#building_an_identity_tag) for how to implement this.\n\nIf `String.raw()` is called with an object whose `raw` property doesn't have a `length` property or a non-positive `length`, it returns an empty string `\"\"`. If `substitutions.length < strings.raw.length - 1` (i.e. there are not enough substitutions to fill the placeholders — which can't happen in a well-formed tagged template literal), the rest of the placeholders are filled with empty strings.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/SubtleCrypto/SubtleCrypto.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SubtleCrypto\n\nThe **`SubtleCrypto`** interface provides a number of low-level cryptographic functions. Access to the features of `SubtleCrypto` is obtained through the [`crypto.subtle`](../crypto/subtle.mdx) property.\n\n> **Warning:** This API provides a number of low-level cryptographic primitives. It's very easy to misuse them, and the pitfalls involved can be very subtle.\n>\n> Even assuming you use the basic cryptographic functions correctly, secure key management and overall security system design are extremely hard to get right, and are generally the domain of specialist security experts.\n>\n> Errors in security system design and implementation can make the security of the system completely ineffective.\n>\n> Please learn and experiment, but don't guarantee or imply the security of your work before an individual knowledgeable in this subject matter thoroughly reviews it. The [Crypto 101 Course](https://www.crypto101.io/) can be a great place to start learning about the design and implementation of secure systems.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/SubtleCrypto/prototype/digest.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# digest()\n\nThe **`digest()`** method of the [`SubtleCrypto`](../SubtleCrypto.mdx)\ninterface generates a digest of the given data. A digest is a short\nfixed-length value derived from some variable-length input. Cryptographic digests should\nexhibit collision-resistance, meaning that it's hard to come up with two different\ninputs that have the same digest value.\n\nIt takes as its arguments an identifier for the digest algorithm to use and the data to\ndigest. It returns a [`Promise`](../../Promise/Promise.mdx) which will be fulfilled with the digest.\n\n## Syntax\n\n```js\ndigest(algorithm, data)\n```\n\n### Parameters\n\n- `algorithm`\n  - : This may be a string or an object with a single property `name` that is a string. The string names the hash function to use. Supported values are:\n    - `\"MD5\"` (but don't use this in cryptographic applications)\n    - `\"SHA-1\"` (but don't use this in cryptographic applications)\n    - `\"SHA-256\"`\n    - `\"SHA-384\"`\n    - `\"SHA-512\"`.\n- `data`\n  - : An `ArrayBuffer`, a `TypedArray` or a `DataView` object containing the data to be digested.\n\n### Return value\n\nA [`Promise`](../../Promise/Promise.mdx) that fulfills with an `ArrayBuffer` containing the digest.\n\n## Supported algorithms\n\nDigest algorithms, also known as cryptographic hash functions,\ntransform an arbitrarily large block of data into a fixed-size output,\nusually much shorter than the input. They have a variety of applications in\ncryptography.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/SubtleCrypto/prototype/importKey.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# importKey()\n\nThe **`importKey()`** method of the [`SubtleCrypto`](../SubtleCrypto.mdx)\ninterface imports a key: that is, it takes as input a key in an external, portable\nformat and gives you a [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) object that you can use.\n\nThe function accepts several import formats: see [Supported formats](#supported-formats) for details.\n\n## Syntax\n\n```js\nimportKey(format, keyData, algorithm, extractable, keyUsages)\n```\n\n### Parameters\n\n- `format`\n  - : A string describing the data format of the key to import. It can be one of the following:\n    - `raw`: [Raw](#raw) format.\n    - `jwk`: [JSON Web Key](#json-web-key) format.\n- `keyData`\n  - : An `ArrayBuffer`, a TypedArray, a `DataView`, or a `JSONWebKey` object containing the key in\n    the given format.\n- `algorithm`\n  - : An object defining the type of key to import and providing extra algorithm-specific parameters.\n    - For RSASSA-PKCS1-v1_5:\n      Pass an [`RsaHashedImportParams`](../../RsaHashedImportParams/RsaHashedImportParams.mdx) object.\n    - For HMAC:\n      Pass an [`HmacImportParams`](../../HmacImportParams/HmacImportParams.mdx) object.\n    - For ECDSA:\n      Pass an [`EcKeyImportParams`](../../EcKeyImportParams/EcKeyImportParams.mdx) object.\n- `extractable`\n  - : A boolean value indicating whether it will be possible to export the key.\n- `keyUsages`\n  - : An `Array` indicating what can be done with the key. Possible array values are:\n    - `encrypt`: The key may be used to encrypt messages.\n    - `decrypt`: The key may be used to decrypt messages.\n    - `sign`: The key may be used to sign messages.\n    - `verify`: The key may be used to verify signatures.\n    - `deriveKey`: The key may be used in deriving a new key.\n    - `deriveBits`: The key may be used in deriving bits.\n    - `wrapKey`: The key may be used to wrap a key.\n    - `unwrapKey`: The key may be used to unwrap a key.\n\n### Return value\n\nA [`Promise`](../../Promise/Promise.mdx)\nthat fulfills with the imported key as a [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) object.\n\n### Exceptions\n\nThe promise is rejected when one of the following exceptions is encountered:\n\n- `SyntaxError`\n  - : Raised when `keyUsages` is empty but the unwrapped key is of\n    type `secret` or `private`.\n- `TypeError`\n  - : Raised when trying to use an invalid format or if the `keyData`\n    is not suited for that format.\n\n## Supported formats\n\nThis API currently supports one key import/export format: JSON Web Key.\n\n### Raw\n\nYou can use this format to import or export AES or HMAC secret keys, or Elliptic Curve\npublic keys.\n\nIn this format the key is supplied as an `ArrayBuffer` containing the raw bytes for the key.\n\n\n### JSON Web Key\n\nYou can use JSON Web Key format to import or export RSA or Elliptic Curve public or\nprivate keys, as well as AES and HMAC secret keys.\n\nJSON Web Key format is defined in [RFC 7517](https://datatracker.ietf.org/doc/html/rfc7517).\nIt describes a way to represent public, private, and secret keys as JSON objects.\n\nA JSON Web Key looks something like this (this is an EC private key):\n\n```json\n{\n  \"crv\": \"P-384\",\n  \"d\": \"wouCtU7Nw4E8_7n5C1-xBjB4xqSb_liZhYMsy8MGgxUny6Q8NCoH9xSiviwLFfK_\",\n  \"ext\": true,\n  \"key_ops\": [\"sign\"],\n  \"kty\": \"EC\",\n  \"x\": \"SzrRXmyI8VWFJg1dPUNbFcc9jZvjZEfH7ulKI1UkXAltd7RGWrcfFxqyGPcwu6AQ\",\n  \"y\": \"hHUag3OvDzEr0uUQND4PXHQTXP5IDGdYhJhL-WLKjnGjQAw0rNGy5V29-aV-yseW\"\n};\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/SubtleCrypto/prototype/sign.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# sign()\n\nThe **`sign()`** method of the [`SubtleCrypto`](../SubtleCrypto.mdx) interface generates a digital signature.\n\nIt takes as its arguments a key to sign with, some algorithm-specific\nparameters, and the data to sign. It returns a `Promise` which will be\nfulfilled with the signature.\n\nYou can use the corresponding [`verify()`](./verify.mdx) method to verify the signature.\n\n## Syntax\n\n```js\nsign(algorithm, key, data)\n```\n\n### Parameters\n\n- `algorithm`\n  - : A string or object that specifies the signature algorithm to use and its parameters:\n    - To use [RSASSA-PKCS1-v1_5](#rsassa-pkcs1-v1_5), pass the string `\"RSASSA-PKCS1-v1_5\"` or an object of the form `{ \"name\": \"RSASSA-PKCS1-v1_5\" }`.\n    - To use [HMAC](#hmac), pass the string `\"HMAC\"` or an object of the form `{ \"name\": \"HMAC\" }`.\n- `key`\n  - : A [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) object containing the key to be used for signing.\n    If `algorithm` identifies a public-key cryptosystem, this is the private key.\n- `data`\n  - : An `ArrayBuffer`, a TypedArray or a `DataView` object containing the data to be signed.\n\n### Return value\n\nA `Promise` that fulfills with an `ArrayBuffer` containing the signature.\n\n### Exceptions\n\nThe promise is rejected when the following exception is encountered:\n\n- `InvalidAccessError`\n  - : Raised when the signing key is not a key for the request signing algorithm or when\n    trying to use an algorithm that is either unknown or isn't suitable for signing.\n\n## Supported algorithms\n\n### RSASSA-PKCS1-v1_5\n\nThe RSASSA-PKCS1-v1_5 algorithm is specified in [RFC 3447](https://datatracker.ietf.org/doc/html/rfc3447).\n\n### HMAC\n\nThe HMAC algorithm calculates and verifies hash-based message authentication codes according to the\n[FIPS 198-1 standard](https://csrc.nist.gov/csrc/media/publications/fips/198/1/final/documents/fips-198-1_final.pdf).\n\nThe digest algorithm to use is specified in the\n[`HmacImportParams`](../../HmacImportParams/HmacImportParams.mdx) object\nthat you pass into [`SubtleCrypto.importKey()`](./importKey.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/SubtleCrypto/prototype/verify.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# verify()\n\nThe **`verify()`** method verifies a digital signature.\n\nIt takes as its arguments a key to verify the signature with, some algorithm-specific parameters, the signature, and the original signed data.\nIt returns a `Promise` which will be fulfilled with a boolean value indicating whether the signature is valid.\n\n## Syntax\n\n```js\nverify(algorithm, key, signature, data)\n```\n\n### Parameters\n\n- `algorithm`\n  - : A string or object defining the algorithm to use, and for some algorithm choices, some extra parameters.\n    The values given for the extra parameters must match those passed into the corresponding [`sign()`](./sign.mdx) call.\n    - To use RSASSA-PKCS1-v1_5, pass the string `\"RSASSA-PKCS1-v1_5\"` or an object of the form `{ \"name\": \"RSASSA-PKCS1-v1_5\" }`.\n    - To use HMAC, pass the string `\"HMAC\"` or an object of the form `{ \"name\": \"HMAC\" }`.\n- `key`\n  - : A [`CryptoKey`](../../CryptoKey/CryptoKey.mdx) containing the key that will be used to verify the signature.\n    It is the secret key for a symmetric algorithm and the public key for a public-key system.\n- `signature`\n  - : A `ArrayBuffer` containing the signature to verify.\n- `data`\n  - : A `ArrayBuffer` containing the data whose signature is to be verified.\n\n### Return value\n\nA `Promise` that fulfills with a\nboolean value: `true` if the signature is valid, `false`\notherwise.\n\n### Exceptions\n\nThe promise is rejected when the following exception is encountered:\n\n- `InvalidAccessError`\n  - : Raised when the encryption key is not a key for the requested verifying algorithm or\n    when trying to use an algorithm that is either unknown or isn't suitable for a verify\n    operation.\n\n## Supported algorithms\n\nThe `verify()` method supports the same algorithms as the [`sign()`](./sign.mdx) method.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Symbol/Symbol.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol()\n\nThe `Symbol()` constructor returns a value of type **symbol**,\nbut is incomplete as a constructor because it does not support the syntax\n\"`new Symbol()`\" and it is not intended to be subclassed. It may be used as\nthe value of an\n[`extends`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes/extends)\nclause of a `class` definition but a\n[`super`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/super)\ncall to it will cause an exception.\n\n## Syntax\n\n```js\nSymbol()\nSymbol(description)\n```\n\n> **Note:** `Symbol()` can only be called without `new`. Attempting to construct it with `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `description` _**optional**_\n  - : A string. A description of the symbol which can be used for debugging but not to\n    access the symbol itself.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Symbol/asyncIterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.asyncIterator\n\nThe **`Symbol.asyncIterator`** well-known symbol specifies the default [async iterator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_async_iterator_and_async_iterable_protocols) for an object. If this property is set on an object, it is an async iterable and can be used in a [`for await...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for-await...of) loop.\n\n## Value\n\nThe well-known symbol `Symbol.asyncIterator`.\n\n## Description\n\nThe `Symbol.asyncIterator` symbol is a builtin symbol that is used to access an object's `Symbol.asyncIterator` method. In order for an object to be async iterable, it must have a `Symbol.asyncIterator` key.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Symbol/for.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.for()\n\nThe **`Symbol.for(key)`** method searches for existing symbols\nin a runtime-wide symbol registry with the given key and returns it if found. Otherwise\na new symbol gets created in the global symbol registry with this key.\n\n## Syntax\n\n```js\nSymbol.for(key)\n```\n\n### Parameters\n\n- `key`\n  - : String, required. The key for the symbol (and also used for the description of the\n    symbol).\n\n### Return value\n\nAn existing symbol with the given key if found; otherwise, a new symbol is created and\nreturned.\n\n## Description\n\nIn contrast to `Symbol()`, the `Symbol.for()` function creates a\nsymbol available in a [global symbol registry](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol#shared_symbols_in_the_global_symbol_registry) list. `Symbol.for()` does also\nnot necessarily create a new symbol on every call, but checks first if a symbol with the\ngiven `key` is already present in the registry. In that case, that symbol is\nreturned. If no symbol with the given key is found, `Symbol.for()` will\ncreate a new global symbol.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Symbol/hasInstance.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.hasInstance\n\nThe **`Symbol.hasInstance`** well-known symbol is used to determine if a constructor object recognizes an object as its instance. The `instanceof` operator's behavior can be customized by this symbol.\n\n## Value\n\nThe well-known symbol `Symbol.hasInstance`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Symbol/isConcatSpreadable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.isConcatSpreadable\n\nThe **`Symbol.isConcatSpreadable`** well-known symbol is used to configure if an object should be flattened to its array elements when using the [`Array.prototype.concat()`](../../globals/Array/prototype/concat.mdx) method.\n\n## Value\n\nThe well-known symbol `Symbol.isConcatSpreadable`.\n\n## Description\n\nThe `Symbol.isConcatSpreadable` symbol (`Symbol.isConcatSpreadable`) can be defined as an own or inherited property and its value is a boolean. It can control behavior for arrays and array-like objects:\n\n- For array objects, the default behavior is to spread (flatten) elements. `Symbol.isConcatSpreadable` can avoid flattening in these cases.\n- For array-like objects, the default behavior is no spreading or flattening. `Symbol.isConcatSpreadable` can force flattening in these cases.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Symbol/iterator.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.iterator\n\nThe well-known **`Symbol.iterator`** symbol specifies the default iterator for an object. Used by [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of).\n\n## Value\n\nThe well-known symbol `Symbol.iterator`.\n\n## Description\n\nWhenever an object needs to be iterated (such as at the beginning of a `for...of` loop), its `Symbol.iterator` method is called with no arguments, and the returned **iterator** is used to obtain the values to be iterated.\n\nSome built-in types have a default iteration behavior, while other types (such as `Object`) do not. The built-in types with a `Symbol.iterator` method are:\n\n- [`Array.prototype[Symbol.iterator]()`](../../globals/Array/prototype/@@iterator.mdx)\n- [`String.prototype[Symbol.iterator]()`](../../globals/String/prototype/@@iterator.mdx)\n- [`Map.prototype[Symbol.iterator]()`](../../globals/Map/prototype/@@iterator.mdx)\n- [`Set.prototype[Symbol.iterator]()`](../../globals/Set/prototype/@@iterator.mdx)\n\nSee also [Iteration protocols](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols) for more information.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Symbol/keyFor.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.keyFor()\n\nThe **`Symbol.keyFor(sym)`** method retrieves a shared symbol\nkey from the global symbol registry for the given symbol.\n\n## Syntax\n\n```js\nSymbol.keyFor(sym)\n```\n\n### Parameters\n\n- `sym`\n  - : Symbol, required. The symbol to find a key for.\n\n### Return value\n\nA string representing the key for the given symbol if one is found on the [global registry](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Symbol#shared_symbols_in_the_global_symbol_registry); otherwise, [`undefined`](../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Symbol/match.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.match\n\nThe **`Symbol.match`** well-known symbol specifies the matching of a regular expression against a string. This function is called by the [`String.prototype.match()`](../../globals/String/prototype/match.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.match]()` and [`String.prototype.match()`](../../globals/String/prototype/match.mdx).\n\n## Value\n\nThe well-known symbol `Symbolmatch`.\n\n## Description\n\nThis function is also used to identify [if objects have the behavior of regular expressions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp#special_handling_for_regexes). For example, the methods [`String.prototype.startsWith()`](../../globals/String/prototype/startsWith.mdx), [`String.prototype.endsWith()`](../../globals/String/prototype/endsWith.mdx) and [`String.prototype.includes()`](../../globals/String/prototype/includes.mdx), check if their first argument is a regular expression and will throw a [`TypeError`](../../globals/TypeError/TypeError.mdx) if they are. Now, if the `match` symbol is set to `false` (or a [Falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value except `undefined`), it indicates that the object is not intended to be used as a regular expression object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Symbol/matchAll.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.matchAll\n\nThe **`Symbol.matchAll`** well-known symbol specifies the method that returns an iterator, that yields matches of the regular expression against a string. This function is called by the [`String.prototype.matchAll()`](../../globals/String/prototype/matchAll.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.matchAll]()` and [`String.prototype.matchAll()`](../../globals/String/prototype/matchAll.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.matchAll`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Symbol/prototype/@@toPrimitive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype[Symbol.toPrimitive]\n\nThe **`[Symbol.toPrimitive]()`** method converts a Symbol object to\na primitive value.\n\n## Syntax\n\n```js\nSymbol()[Symbol.toPrimitive](hint)\n```\n\n### Return value\n\nThe primitive value of the specified `Symbol` object.\n\n## Description\n\nThe `[Symbol.toPrimitive]()` method of `Symbol` returns the primitive\nvalue of a Symbol object as a Symbol data type. The `hint`\nargument is not used.\n\nJavaScript calls the `[Symbol.toPrimitive]()` method to convert an object to a\nprimitive value. You rarely need to invoke the `[Symbol.toPrimitive]()` method\nyourself; JavaScript automatically invokes it when encountering an object where a\nprimitive value is expected.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Symbol/prototype/description.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype.description\n\nThe read-only **`description`** property is a string returning the optional description of `Symbol` objects.\n\n## Description\n\n`Symbol` objects can be created with an optional description which can be used for debugging but not to access the symbol itself. The `Symbol.prototype.description` property can be used to read that description. It is different to `Symbol.prototype.toString()` as it does not contain the enclosing `\"Symbol()\"` string. See the examples.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Symbol/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype.toString()\n\nThe **`toString()`** method returns a string representing the specified symbol value.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Return value\n\nA string representing the specified symbol value.\n\n## Description\n\nThe `Symbol` object overrides the `toString` method of `Object`; it does not inherit\n[`Object.prototype.toString()`](../../../globals/Object/prototype/toString.mdx). For `Symbol` values, the `toString` method returns a descriptive string in the form `\"Symbol(description)\"`, where `description` is the symbol's [`Symbol.prototype.description`](../../../globals/Symbol/prototype/description.mdx).\n\nThe `toString()` method requires its `this` value to be a `Symbol` primitive or wrapper object. It throws a [`TypeError`](../../../globals/TypeError/TypeError.mdx) for other `this` values without attempting to coerce them to symbol values.\n\nBecause `Symbol` has a [`[Symbol.toPrimitive]()`](../../../globals/Symbol/toPrimitive.mdx) method, that method always takes priority over `toString()` when a `Symbol` object is [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). However, because `Symbol.prototype[Symbol.toPrimitive]()` returns a symbol primitive, and symbol primitives throw a [`TypeError`](../../../globals/TypeError/TypeError.mdx) when implicitly converted to a string, the `toString()` method is never implicitly called by the language. To stringify a symbol, you must explicitly call its `toString()` method or use the [`String()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/String#using_string_to_stringify_a_symbol) function.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Symbol/prototype/valueOf.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.prototype.valueOf()\n\nThe **`valueOf()`** method returns the primitive value of a Symbol object.\n\n## Syntax\n\n```js\nvalueOf()\n```\n\n### Return value\n\nThe primitive value of the specified `Symbol` object.\n\n## Description\n\nThe `valueOf()` method of `Symbol` returns the primitive value of a Symbol object as a Symbol data type.\n\nJavaScript calls the `valueOf()` method to convert an object to a primitive value. You rarely need to invoke the `valueOf()` method yourself; JavaScript automatically invokes it when encountering an object where a primitive value is expected.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Symbol/replace.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.replace\n\nThe **`Symbol.replace`** well-known symbol specifies the method that replaces matched substrings of a string. This function is called by the [`String.prototype.replace()`](../../globals/String/prototype/replace.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.replace]()` and [`String.prototype.replace()`](../../globals/String/prototype/replace.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.replace`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Symbol/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.search\n\nThe **`Symbol.search`** well-known symbol specifies the method that returns the index within a string that matches the regular expression. This function is called by the [`String.prototype.search()`](../../globals/String/prototype/search.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.search]()` and [`String.prototype.search()`](../../globals/String/prototype/search.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.search`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Symbol/species.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.species\n\nThe well-known symbol **`Symbol.species`** specifies a function-valued property that the constructor function uses to create derived objects.\n\n> **Warning:** The existence of `Symbol.species` allows execution of arbitrary code and may create security vulnerabilities. It also makes certain optimizations much harder. Engine implementers are [investigating whether to remove this feature](https://github.com/tc39/proposal-rm-builtin-subclassing). Avoid relying on it if possible.\n\n## Value\n\nThe well-known symbol `Symbol.species`.\n\n## Description\n\nThe `Symbol.species` accessor property allows subclasses to override the default constructor for objects. This specifies a protocol about how instances should be copied. For example, when you use copying methods of arrays, such as [`Array.prototype.map()`](../../globals/Array/prototype/map.mdx). the `map()` method uses `instance.constructor[Symbol.species]` to get the constructor for constructing the new array.\n\nAll built-in implementations of `Symbol.species` return the `this` value, which is the current instance's constructor. This allows copying methods to create instances of derived classes rather than the base class — for example, `map()` will return an array of the same type as the original array.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Symbol/split.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.split\n\nThe **`Symbol.split`** well-known symbol specifies the method that splits a string at the indices that match a regular expression. This function is called by the [`String.prototype.split()`](../../globals/String/prototype/split.mdx) method.\n\nFor more information, see `RegExp.prototype[Symbol.split]()` and [`String.prototype.split()`](../../globals/String/prototype/split.mdx).\n\n## Value\n\nThe well-known symbol `Symbol.split`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Symbol/toPrimitive.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.toPrimitive\n\nThe **`Symbol.toPrimitive`** well-known symbol specifies a method that accepts a preferred type and returns a primitive representation of an object. It is called in priority by all [type coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) algorithms.\n\n## Value\n\nThe well-known symbol `Symbol.toPrimitive`.\n\n## Description\n\nWith the help of the `Symbol.toPrimitive` property (used as a function value), an object can be converted to a primitive value. The function is called with a string argument `hint`, which specifies the preferred type of the result primitive value. The `hint` argument can be one of `\"number\"`, `\"string\"`, and `\"default\"`.\n\nThe `\"number\"` hint is used by [numeric coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#numeric_coercion) algorithms. The `\"string\"` hint is used by the [string coercion](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) algorithm. The `\"default\"` hint is used by the [primitive coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#primitive_coercion) algorithm. The `hint` only acts as a weak signal of preference, and the implementation is free to ignore it (as [`Symbol.prototype[Symbol.toPrimitive]()`](../../globals/Symbol/prototype/@@toPrimitive.mdx) does). The language does not enforce alignment between the `hint` and the result type, although `[Symbol.toPrimitive]()` must return a primitive, or a [`TypeError`](../../globals/TypeError/TypeError.mdx) is thrown.\n\nObjects without the `Symbol.toPrimitive` property are converted to primitives by calling the `valueOf()` and `toString()` methods in different orders, which is explained in more detail in the [type coercion](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#type_coercion) section. `Symbol.toPrimitive` allows full control over the primitive conversion process. For example, `Symbol.prototype.toString()` won't be called, and `Symbol` objects must always be explicitly converted to strings through [`String()`](../../globals/String/String.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Symbol/toStringTag.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.toStringTag\n\nThe **`Symbol.toStringTag`** well-known symbol is a string valued property that is used in the creation of the default string description of an object. It is accessed internally by the [`Object.prototype.toString()`](../../globals/Object/prototype/toString.mdx) method.\n\n## Value\n\nThe well-known symbol `Symbol.toStringTag`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Symbol/unscopables.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Symbol.unscopables\n\nThe **`Symbol.unscopables`** well-known symbol is used to specify an object value of whose own and inherited property names are excluded from the [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) environment bindings of the associated object.\n\n## Value\n\nThe well-known symbol `@@unscopables`.\n\n## Description\n\nThe `@@unscopables` symbol (accessed via `Symbol.unscopables`) can be defined on any object to exclude property names from being exposed as lexical variables in [`with`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/with) environment bindings. Note that when using [strict mode](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode), `with` statements are not available, and this symbol is likely not needed.\n\nSetting a property of the `@@unscopables` object to `true` (or any [truthy](https://developer.mozilla.org/docs/Glossary/Truthy) value) will make the corresponding property of the `with` scope object _unscopable_ and therefore won't be introduced to the `with` body scope. Setting a property to `false` (or any [falsy](https://developer.mozilla.org/docs/Glossary/Falsy) value) will make it _scopable_ and thus appear as lexical scope variables.\n\nWhen deciding whether `x` is unscopable, the entire prototype chain of the `@@unscopables` property is looked up for a property called `x`. This means if you declared `@@unscopables` as a plain object, `Object.prototype` properties like [`toString`](../../globals/Object/prototype/toString.mdx) would become unscopable as well, which may cause backward incompatibility for legacy code assuming those properties are normally scoped (see [an example here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/unscopables#avoid_using_a_non-null-prototype_object_as_symbol.unscopables)). You are advised to make your custom `@@unscopables` property have `null` as its prototype, like [`Array.prototype[Symbol.unscopables]`](../../globals/Array/prototype/@@unscopables.mdx) does.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/SyntaxError/SyntaxError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SyntaxError\n\nThe **`SyntaxError`** constructor creates a new error object\nthat represents an error when trying to interpret syntactically invalid code.\n\n## Syntax\n\n```js\nnew SyntaxError()\nnew SyntaxError(message)\nnew SyntaxError(message, options)\nnew SyntaxError(message, fileName)\nnew SyntaxError(message, fileName, lineNumber)\n\nSyntaxError()\nSyntaxError(message)\nSyntaxError(message, options)\nSyntaxError(message, fileName)\nSyntaxError(message, fileName, lineNumber)\n```\n\n> **Note:** `SyntaxError()` can be called with or without `new`. Both create a new `SyntaxError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/TextDecoder/TextDecoder.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder()\n\nThe **`TextDecoder()`** constructor returns a newly created `TextDecoder` object for the encoding specified in parameter.\n\n## Syntax\n\n```js\nnew TextDecoder()\nnew TextDecoder(label)\nnew TextDecoder(label, options)\n```\n\n### Parameters\n\n- `label` _**optional**_\n  - : A string, defaulting to `\"utf-8\"`.\n- `options` _**optional**_\n\n  - : An object with the property:\n\n    - `fatal`\n      - : A boolean value indicating if the `TextDecoder.decode()` method must throw a `TypeError` when decoding invalid data.\n        It defaults to `false`, which means that the decoder will substitute malformed data with a replacement character.\n\n    - `ignoreBOM`\n      - : A boolean value indicating whether the [byte order mark](https://www.w3.org/International/questions/qa-byte-order-mark) is ignored.\n        It defaults to `false`.\n\n### Exceptions\n\n- `RangeError`\n  - : Thrown if the value of `label` is unknown, or is one of the values leading to a `'replacement'` decoding algorithm (`\"iso-2022-cn\"` or `\"iso-2022-cn-ext\"`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/TextDecoder/prototype/decode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.decode()\n\nThe **`TextDecoder.decode()`** method returns a string containing text decoded from the buffer passed as a parameter.\n\nThe decoding method is defined in the current `TextDecoder` object.\nThis includes the expected encoding of the data, and how decoding errors are handled.\n\n## Syntax\n\n```js\ndecode()\ndecode(buffer)\ndecode(buffer, options)\n```\n\n### Parameters\n\n- `buffer` _**optional**_\n  - : Is an `ArrayBuffer`, a `TypedArray` or a `DataView` object containing the encoded text to decode.\n- `options` _**optional**_\n\n  - : An object with the property:\n\n    - `stream`\n      - : A boolean flag indicating that additional data will follow in subsequent calls to `decode()`.\n        Set to `true` if processing the data in chunks, and `false` for the final chunk or if the data is not chunked.\n        It defaults to `false`.\n\n### Exceptions\n\n- `TypeError`\n  - : Thrown if there is a decoding error when the property `TextDecoder.fatal` is `true`.\n\n### Return value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/TextDecoder/prototype/encoding.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.encoding\n\nThe **`TextDecoder.encoding`** read-only property returns a string containing the name of the decoding algorithm used by the specific decoder object.\n\nThe encoding is set by the constructor `label` parameter, and defaults to `utf-8`.\n\n## Value\n\nA lower-cased ASCII string, which can be one of the following values:\n\n- The recommended encoding for the Web: `'utf-8'`.\n- The legacy single-byte encodings:\n  ['ibm866'](https://en.wikipedia.org/wiki/Code_page_866),\n  ['iso-8859-2'](https://en.wikipedia.org/wiki/ISO/IEC_8859-2),\n  ['iso-8859-3'](https://en.wikipedia.org/wiki/ISO/IEC_8859-3),\n  ['iso-8859-4'](https://en.wikipedia.org/wiki/ISO/IEC_8859-4),\n  ['iso-8859-5'](https://en.wikipedia.org/wiki/ISO/IEC_8859-5),\n  ['iso-8859-6'](https://en.wikipedia.org/wiki/ISO/IEC_8859-6),\n  ['iso-8859-7'](https://en.wikipedia.org/wiki/ISO/IEC_8859-7),\n  ['iso-8859-8'](https://en.wikipedia.org/wiki/ISO/IEC_8859-8)'`,\n  ['iso-8859-8i'](https://en.wikipedia.org/wiki/ISO-8859-8-I),\n  ['iso-8859-10'](https://en.wikipedia.org/wiki/ISO/IEC_8859-10),\n  ['iso-8859-13'](https://en.wikipedia.org/wiki/ISO/IEC_8859-13),\n  ['iso-8859-14'](https://en.wikipedia.org/wiki/ISO/IEC_8859-14),\n  ['iso-8859-15'](https://en.wikipedia.org/wiki/ISO/IEC_8859-15),\n  ['iso-8859-16'](https://en.wikipedia.org/wiki/ISO/IEC_8859-16),\n  ['koi8-r'](https://en.wikipedia.org/wiki/KOI8-R),\n  ['koi8-u'](https://en.wikipedia.org/wiki/KOI8-U),\n  ['macintosh'](https://en.wikipedia.org/wiki/Mac_OS_Roman),\n  ['windows-874'](https://en.wikipedia.org/wiki/Windows-874),\n  ['windows-1250'](https://en.wikipedia.org/wiki/Windows-1250),\n  ['windows-1251'](https://en.wikipedia.org/wiki/Windows-1251),\n  ['windows-1252'](https://en.wikipedia.org/wiki/Windows-1252),\n  ['windows-1253'](https://en.wikipedia.org/wiki/Windows-1253),\n  ['windows-1254'](https://en.wikipedia.org/wiki/Windows-1254),\n  ['windows-1255'](https://en.wikipedia.org/wiki/Windows-1255),\n  ['windows-1256'](https://en.wikipedia.org/wiki/Windows-1256),\n  ['windows-1257'](https://en.wikipedia.org/wiki/Windows-1257),\n  ['windows-1258'](https://en.wikipedia.org/wiki/Windows-1258), or\n  ['x-mac-cyrillic'](https://en.wikipedia.org/wiki/Macintosh_Cyrillic_encoding).\n- The legacy multi-byte Chinese (simplified) encodings:\n  ['gbk'](https://en.wikipedia.org/wiki/GBK),\n  ['gb18030'](https://en.wikipedia.org/wiki/GB_18030)\n- The legacy multi-byte Chinese (traditional) encoding:\n  ['big5'](https://en.wikipedia.org/wiki/Big5).\n- The legacy multi-byte Japanese encodings:\n  ['euc-jp'](https://en.wikipedia.org/wiki/Extended_Unix_Code#EUC-JP),\n  ['iso-2022-jp'](https://en.wikipedia.org/wiki/ISO/IEC_2022#ISO-2022-JP),\n  ['shift-jis'](https://en.wikipedia.org/wiki/Shift_JIS).\n- The legacy multi-byte Korean encodings:\n  ['euc-kr'](https://en.wikipedia.org/wiki/Extended_Unix_Code#EUC-KR)\n- The legacy miscellaneous encodings:\n  ['utf-16be'](https://en.wikipedia.org/wiki/UTF-16#Byte_order_encoding_schemes),\n  ['utf-16le'](https://en.wikipedia.org/wiki/UTF-16#Byte_order_encoding_schemes),\n  `'x-user-defined'`.\n- A special encoding, `'replacement'`.\n  This decodes empty input into empty output and any other arbitrary-length input into a single replacement character.\n  It is used to prevent attacks that mismatch encodings between the client and server.\n  The following encodings also map to the replacement encoding: `ISO-2022-CN`, `ISO-2022-CN-ext`, ['iso-2022-kr'](https://en.wikipedia.org/wiki/ISO/IEC_2022#ISO-2022-KR) and ['hz-gb-2312'](https://en.wikipedia.org/wiki/HZ_(character_encoding)).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/TextDecoder/prototype/fatal.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.fatal\n\nThe **`fatal`** read-only property of the `TextDecoder` interface is a `Boolean` indicating whether the error mode is fatal.\n\nIf the property is `true` then a decoder will throw a `TypeError` if it encounters malformed data while decoding.\nIf `false` the decoder will substitute the invalid data with the replacement character `U+FFFD` (�).\nThe value of the property is set in the `TextDecoder()` constructor.\n\n## Value\n\nA `boolean` which will return `true` if the error mode is set to `fatal`.\nOtherwise it returns `false`, indicating that the error mode is \"replacement\".\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/TextDecoder/prototype/ignoreBOM.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextDecoder.ignoreBOM\n\nThe **`ignoreBOM`** read-only property of the `TextDecoder` interface is a `Boolean` indicating whether the [byte order mark](https://www.w3.org/International/questions/qa-byte-order-mark) is ignored.\n\n## Value\n\n`true` if the byte order mark is ignored; `false` otherwise.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/TextEncoder/TextEncoder.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextEncoder()\n\nThe **`TextEncoder()`** constructor returns a newly created `TextEncoder` object that will generate a byte stream with UTF-8 encoding.\n\n## Syntax\n\n```js\nnew TextEncoder()\n```\n\n### Parameters\n\nNone.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/TextEncoder/prototype/encode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextEncoder.encode()\n\nThe **`TextEncoder.encode()`** method takes a string as input, and returns a `Uint8Array` containing the text given in parameters encoded with the specific method for that `TextEncoder` object.\n\n## Syntax\n\n```js\nencode(string)\n```\n\n### Parameters\n\n- `string`\n  - : A string containing the text to encode.\n\n### Return value\n\nA `Uint8Array` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/TextEncoder/prototype/encoding.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TextEncoder.encoding\n\nThe **`TextEncoder.encoding`** read-only property returns a string containing the name of the encoding algorithm used by the specific encoder.\n\nIt can only have the following value `utf-8`.\n\n## Value\n\nA string with the value `utf-8`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/TransformStream/TransformStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStream()\n\nThe **`TransformStream()`** constructor creates a new `TransformStream` object which represents a pair of streams: a `WritableStream` representing the writable side, and a `ReadableStream` representing the readable side.\n\n## Syntax\n\n```js\nnew TransformStream()\nnew TransformStream(transformer)\nnew TransformStream(transformer, writableStrategy)\nnew TransformStream(transformer, writableStrategy, readableStrategy)\n```\n\n### Parameters\n\n- `transformer` _**optional**_\n\n  - : An object representing the `transformer`. If not supplied the resulting stream will be an **identity transform stream** which forwards all chunks written to its writable side to its readable side, without any changes.\n\n    The transformer object can contain any of the following methods. In each method `controller` is an instance of `TransformStreamDefaultController`.\n\n    - `start(controller)`\n      - : Called when the `TransformStream` is constructed. It is typically used to enqueue chunks using `TransformStreamDefaultController.enqueue()`.\n    - `transform(chunk, controller)`\n      - : Called when a chunk written to the writable side is ready to be transformed, and performs the work of the transformation stream. If no `transform()` method is supplied, the identity transform is used, and the chunk will be enqueued with no changes.\n    - `flush(controller)`\n      - : Called after all chunks written to the writable side have been successfully transformed, and the writable side is about to be closed.\n\n- `writableStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer. This defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk`. This indicates the size to\n        use for each chunk, in bytes.\n\n- `readableStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer. This defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk`. This indicates the size to\n        use for each chunk, in bytes.\n\n> **Note:** You could define your own custom\n> `readableStrategy` or `writableStrategy`, or use an instance of\n> `ByteLengthQueuingStrategy` or `CountQueuingStrategy`\n> for the object values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/TransformStream/prototype/readable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStream.readable\n\nThe **`readable`** read-only property of the `TransformStream` interface returns the `ReadableStream` instance controlled by this `TransformStream`.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/TransformStream/prototype/writable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStream.writable\n\nThe **`writable`** read-only property of the `TransformStream` interface returns the `WritableStream` instance controlled by this `TransformStream`.\n\n## Value\n\nA `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/TransformStreamDefaultController/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.desiredSize\n\nThe **`desiredSize`** read-only property of the `TransformStreamDefaultController` interface returns the desired size to fill the queue of the associated [`ReadableStream`](../../../globals/ReadableStream/ReadableStream.mdx).\n\nThe internal queue of a `ReadableStream` contains chunks that have been enqueued, but not yet read.\n\nIf the `desiredSize` is `0` then the queue is full. Therefore you can use this information to manually apply backpressure to manage the queue.\n\n## Value\n\nThe desired size.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/TransformStreamDefaultController/prototype/enqueue.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.enqueue()\n\nThe **`enqueue()`** method of the `TransformStreamDefaultController` interface enqueues the given chunk in the readable side of the stream.\n\n## Syntax\n\n```js\nenqueue(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : The chunk being queued. A chunk is a single piece of data. It can be any type of data, and a stream can contain chunks of different types.\n\n### Return value\n\nNone `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream is not readable.\n    This might occur if the stream is errored via `controller.error()`, or when it is closed without its controller's `controller.close()` method ever being called.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/TransformStreamDefaultController/prototype/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.error()\n\nThe **`error()`** method of the `TransformStreamDefaultController` interface errors both sides of the stream. Any further interactions with it will fail with the given error message, and any chunks in the queue will be discarded.\n\n## Syntax\n\n```js\nerror(reason)\n```\n\n### Parameters\n\n- `reason`\n  - : A string containing the error message to be returned on any further interaction with the stream.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/TransformStreamDefaultController/prototype/terminate.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TransformStreamDefaultController.terminate()\n\nThe **`terminate()`** method of the `TransformStreamDefaultController` interface closes the readable side and errors the writable side of the stream.\n\n## Syntax\n\n```js\nterminate()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone (`undefined`).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/TypeError/TypeError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# TypeError\n\nThe **`TypeError()`** constructor creates a new error when an\noperation could not be performed, typically (but not exclusively) when a value is not of\nthe expected type.\n\n## Syntax\n\n```js\nnew TypeError()\nnew TypeError(message)\nnew TypeError(message, options)\nnew TypeError(message, fileName)\nnew TypeError(message, fileName, lineNumber)\n\nTypeError()\nTypeError(message)\nTypeError(message, options)\nTypeError(message, fileName)\nTypeError(message, fileName, lineNumber)\n```\n\n> **Note:** `TypeError()` can be called with or without `new`. Both create a new `TypeError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/URIError/URIError.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URIError\n\nThe **`URIError()`** constructor creates an error when a global\nURI handling function was used in a wrong way.\n\n## Syntax\n\n```js\nnew URIError()\nnew URIError(message)\nnew URIError(message, options)\nnew URIError(message, fileName)\nnew URIError(message, fileName, lineNumber)\n\nURIError()\nURIError(message)\nURIError(message, options)\nURIError(message, fileName)\nURIError(message, fileName, lineNumber)\n```\n\n> **Note:** `URIError()` can be called with or without `new`. Both create a new `URIError` instance.\n\n### Parameters\n\n- `message` _**optional**_\n  - : Human-readable description of the error.\n- `options` _**optional**_\n  - : An object that has the following properties:\n    - `cause` _**optional**_\n      - : A property indicating the specific cause of the error.\n        When catching and re-throwing an error with a more-specific or useful error message, this property can be used to pass the original error.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/URL/URL.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL()\n\nThe **`URL()`** constructor returns a newly created\n`URL` object representing the URL defined by the parameters.\n\nIf the given base URL or the resulting URL are not valid URLs, the JavaScript\n`TypeError` exception is thrown.\n\n## Syntax\n\n```js\nnew URL(url)\nnew URL(url, base)\n```\n\n### Parameters\n\n- `url`\n  - : A string or any other object with a `toString()` method.\n    If `url` is a relative URL, `base` is\n    required, and will be used as the base URL. If `url` is an\n    absolute URL, a given `base` will be ignored.\n- `base` _**optional**_\n  - : A string representing the base URL to use in cases where\n    `url` is a relative URL. If not specified, it defaults to\n    `undefined`.\n\n> **Note:** The `url` and `base` arguments will\n> each be stringified from whatever value you pass, just like with other Web APIs\n> that accept a string. In particular, you can use an existing\n> `URL` object for either argument, and it will stringify to the\n> object's `URL.href\", \"href` property.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/URL/prototype/hash.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.hash\n\nThe **`hash`** property of the\n`URL` interface is a string containing a\n`'#'` followed by the fragment identifier of the URL.\n\nThe fragment is not percent-decoded. If the URL does not\nhave a fragment identifier, this property contains an empty string — `\"\"`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/URL/prototype/host.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.host\n\nThe **`host`** property of the `URL` interface is\na string containing the host, that is the `URL.hostname`, and then, if the `port` of the URL is nonempty, a\n`':'`, followed by the `port` of the URL.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/URL/prototype/hostname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.hostname\n\nThe **`hostname`** property of the `URL` interface\nis a string containing the domain name of the URL.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/URL/prototype/href.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.href\n\nThe **`href`** property of the `URL` interface is\na string containing the whole URL.\n\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/URL/prototype/origin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.origin\n\nThe **`origin`** read-only property of\nthe `URL` interface returns a string containing the\nUnicode serialization of the origin of the represented URL.\n\nThe exact structure\nvaries depending on the type of URL:\n\n- For `http` or `https` URLs, the scheme followed by\n  `'://'`, followed by the domain, followed by `':'`, followed by\n  the port (the default port, `80` and `443` respectively, if\n  explicitly specified).\n- For `file:` URLs, the value is browser dependent.\n- for `blob:` URLs, the origin of the URL following `blob:` will\n  be used. For example, `\"blob:https://mozilla.org\"` will be returned as\n  `\"https://mozilla.org\".`\n\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/URL/prototype/password.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.password\n\nThe **`password`** property of the `URL` interface\nis a string containing the password specified before the domain name.\n\nIf it is set without first setting the `URL.username` property, it silently fails.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/URL/prototype/pathname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.pathname\n\nThe **`pathname`** property of the `URL` interface represents a location in a hierarchical structure. It is a string constructed from a list of path segments, each of which is prefixed by a `/` character. If the URL has no path segments, the value of its `pathname` property will be the empty string.\n\nURLs such as `https` and `http` URLs that have [hierarchical schemes](https://www.rfc-editor.org/rfc/rfc3986#section-1.2.3) (which the URL standard calls \"[special schemes](https://url.spec.whatwg.org/#special-scheme)\") always have at least one (invisible) path segment: the empty string. Thus the `pathname` value for such \"special scheme\" URLs can never be the empty string, but will instead always have a least one `/` character.\n\nFor example, the URL `https://developer.mozilla.org` has just one path segment: the empty string, so its `pathname` value is constructed by prefixing a `/` character to the empty string.\n\nSome systems define the term _slug_ to mean the final segment of a non-empty path if it identifies a page in human-readable keywords. For example, the URL `https://example.org/articles/this-that-other-outre-collection` has `this-that-other-outre-collection` as its slug.\n\nSome systems use the `;` and `=` characters to delimit parameters and parameter values applicable to a path segment. For example, with the URL `https://example.org/users;id=42/tasks;state=open?sort=modified`, a system might extract and use the path segment parameters `id=42` and `state=open` from the path segments `users;id=42` and `tasks;state=open`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/URL/prototype/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.port\n\nThe **`port`** property of the `URL` interface is\na string containing the port number of the URL.\n\n> **Note:** If an input string passed to the `URL()` constructor doesn't contain an explicit port number (e.g., `https://localhost`) or contains a port number that's the default port number corresponding to the protocol part of the input string (e.g., `https://localhost:443`), then in the `URL` object the constructor returns, the value of the port property will be the empty string: `''`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/URL/prototype/protocol.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.protocol\n\nThe **`protocol`** property of the `URL` interface\nis a string representing the protocol scheme of the URL, including the\nfinal `':'`.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/URL/prototype/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.search\n\nThe **`search`** property of the `URL` interface\nis a search string, also called a _query string_, that is a\nstring containing a `'?'` followed by the parameters of the\nURL.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/URL/prototype/searchParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.searchParams\n\nThe **`searchParams`** readonly property of the\n`URL` interface returns a `URLSearchParams` object allowing\naccess to the `GET` decoded query arguments contained in the URL.\n\n## Value\n\nA `URLSearchParams` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/URL/prototype/toJSON.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.toJSON()\n\nThe **`toJSON()`** method of the `URL` interface\nreturns a string containing a serialized version of the URL,\nalthough in practice it seems to have the same effect as\n`URL.toString()`.\n\n## Syntax\n\n```js\ntoJSON()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/URL/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.toString()\n\nThe **`URL.toString()`** method returns a\nstring containing the whole URL. It is effectively a read-only version\nof `URL.prototype.href`.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/URL/prototype/username.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URL.username\n\nThe **`username`** property of the `URL` interface\nis a string containing the username specified before the domain name.\n\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/URLSearchParams/URLSearchParams.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams()\n\nThe **`URLSearchParams()`** constructor creates and returns a\nnew `URLSearchParams` object.\n\n\n\n## Syntax\n\n```js\nnew URLSearchParams()\nnew URLSearchParams(options)\n```\n\n### Parameters\n\n- `options` _**optional**_\n  - : One of:\n    - A string, which will be parsed from `application/x-www-form-urlencoded` format. A leading `'?'` character is ignored.\n    - A literal sequence of name-value string pairs, or any object with an iterator that produces a sequence of string pairs.\n    - A record of string keys and string values. Note that nesting is not supported.\n\n### Return value\n\nA `URLSearchParams` object instance.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/URLSearchParams/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.append()\n\nThe **`append()`** method of the `URLSearchParams`\ninterface appends a specified key/value pair as a new search parameter.\n\nAs shown in the example below, if the same key is appended multiple times it will\nappear in the parameter string multiple times for each value.\n\n## Syntax\n\n```js\nappend(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to append.\n- `value`\n  - : The value of the parameter to append.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/URLSearchParams/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.delete()\n\nThe **`delete()`** method of the `URLSearchParams`\ninterface deletes the given search parameter and all its associated values, from the\nlist of all search parameters.\n\n## Syntax\n\n```js\ndelete(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to be deleted.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/URLSearchParams/prototype/entries.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.entries()\n\nThe **`entries()`** method of the\n`URLSearchParams` interface returns an\niterator allowing iteration through all key/value\npairs contained in this object. The iterator returns key/value pairs in the same order as they appear in the query string. The key and value of each pair are\nstring objects.\n\n## Syntax\n\n```js\nentries()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/URLSearchParams/prototype/forEach.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.forEach()\n\nThe **`forEach()`** method of the\n`URLSearchParams` interface allows iteration through all values contained\nin this object via a callback function.\n\n## Syntax\n\n```js\nforEach(callback)\nforEach(callback, thisArg)\n```\n\n### Parameters\n\n- `callback`\n\n  - : Function to execute on each element, which is passed the following arguments:\n\n    - `value`\n      - : The value of the current entry being processed in the `URLSearchParams` object.\n    - `key`\n      - : The key of the current entry being processed in the `URLSearchParams` object.\n    - `searchParams`\n      - : The `URLSearchParams` object the `forEach()` was called upon.\n\n- `thisArg` _**optional**_\n  - : Value to use as `this` when executing `callback`.\n\n### Return value\n\nNone `undefined`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/URLSearchParams/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.get()\n\nThe **`get()`** method of the `URLSearchParams`\ninterface returns the first value associated to the given search parameter.\n\n## Syntax\n\n```js\nget(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to return.\n\n### Return value\n\nA string if the given search parameter is found; otherwise,\n**`null`**.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/URLSearchParams/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.has()\n\nThe **`has()`** method of the `URLSearchParams`\ninterface returns a boolean value that indicates whether a parameter with the\nspecified name exists.\n\n## Syntax\n\n```js\nhas(name)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to find.\n\n### Return value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/URLSearchParams/prototype/keys.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.keys()\n\nThe **`keys()`** method of the `URLSearchParams`\ninterface returns an iterator allowing iteration\nthrough all keys contained in this object. The keys are string\nobjects.\n\n## Syntax\n\n```js\nkeys()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/URLSearchParams/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.set()\n\nThe **`set()`** method of the `URLSearchParams`\ninterface sets the value associated with a given search parameter to the given value.\nIf there were several matching values, this method deletes the others. If the search\nparameter doesn't exist, this method creates it.\n\n## Syntax\n\n```js\nset(name, value)\n```\n\n### Parameters\n\n- `name`\n  - : The name of the parameter to set.\n- `value`\n  - : The value of the parameter to set.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/URLSearchParams/prototype/sort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.sort()\n\nThe **`URLSearchParams.sort()`** method sorts all key/value\npairs contained in this object in place and returns `undefined`. The sort\norder is according to unicode code points of the keys. This method uses a stable sorting\nalgorithm (i.e. the relative order between key/value pairs with equal keys will be\npreserved).\n\n## Syntax\n\n```js\nsort()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/URLSearchParams/prototype/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.toString()\n\nThe **`toString()`** method of the\n`URLSearchParams` interface returns a query string suitable for use in a\nURL.\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string, without the question mark. (Returns an empty string if no\nsearch parameters have been set.)\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/URLSearchParams/prototype/values.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# URLSearchParams.values()\n\nThe **`values()`** method of the `URLSearchParams`\ninterface returns an iterator allowing iteration\nthrough all values contained in this object. The values are string\nobjects.\n\n## Syntax\n\n```js\nvalues()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns an iterator.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Uint16Array/Uint16Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint16Array\n\nThe **`Uint16Array()`** typed array constructor creates an\narray of 16-bit unsigned integers in the platform byte order.\n\n## Syntax\n\n```js\nnew Uint16Array()\nnew Uint16Array(length)\nnew Uint16Array(typedArray)\nnew Uint16Array(object)\n\nnew Uint16Array(buffer)\nnew Uint16Array(buffer, byteOffset)\nnew Uint16Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint16Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Uint32Array/Uint32Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint32Array\n\nThe **`Uint32Array()`** typed array constructor creates an\narray of 32-bit unsigned integers in the platform byte order. If control over byte order\nis needed, use [`DataView`](../../globals/DataView/DataView.mdx) instead. The contents are initialized to\n`0`. Once established, you can reference elements in the array using the\nobject's methods, or using standard array index syntax (that is, using bracket\nnotation).\n\n## Syntax\n\n```js\nnew Uint32Array()\nnew Uint32Array(length)\nnew Uint32Array(typedArray)\nnew Uint32Array(object)\n\nnew Uint32Array(buffer)\nnew Uint32Array(buffer, byteOffset)\nnew Uint32Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint32Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Uint8Array/Uint8Array.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint8Array\n\nThe **`Uint8Array()`** constructor creates a typed array of\n8-bit unsigned integers. The contents are initialized to `0`. Once\nestablished, you can reference elements in the array using the object's methods, or\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew Uint8Array()\nnew Uint8Array(length)\nnew Uint8Array(typedArray)\nnew Uint8Array(object)\n\nnew Uint8Array(buffer)\nnew Uint8Array(buffer, byteOffset)\nnew Uint8Array(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint8Array()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/Uint8ClampedArray/Uint8ClampedArray.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Uint8ClampedArray\n\nThe **`Uint8ClampedArray()`** constructor creates a typed array\nof 8-bit unsigned integers clamped to 0-255; if you specified a value that is out of the\nrange of \\[0,255], 0 or 255 will be set instead; if you specify a non-integer, the\nnearest integer will be set. The contents are initialized to `0`. Once\nestablished, you can reference elements in the array using the object's methods, or\nusing standard array index syntax (that is, using bracket notation).\n\n## Syntax\n\n```js\nnew Uint8ClampedArray()\nnew Uint8ClampedArray(length)\nnew Uint8ClampedArray(typedArray)\nnew Uint8ClampedArray(object)\n\nnew Uint8ClampedArray(buffer)\nnew Uint8ClampedArray(buffer, byteOffset)\nnew Uint8ClampedArray(buffer, byteOffset, length)\n```\n\n> **Note:** `Uint8ClampedArray()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#parameters).\n\n### Exceptions\n\nSee [`TypedArray`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#exceptions).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/WeakMap/WeakMap.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap\n\nThe **`WeakMap()` constructor** creates a `WeakMap` object, optionally based on a provided `Array` or other iterable object.\n\n## Syntax\n\n```js\nnew WeakMap()\nnew WeakMap(iterable)\n```\n\n> **Note:** `WeakMap()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable`\n  - : An `Array` or other object that implements the [iterable protocol](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol)  that returns an iterator object that produces a two-element array-like object whose first element is a value that will be used as a `WeakMap` key and whose second element is the value to associate with that key. Each key-value pair will be added to the new `WeakMap`. null is treated as undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/WeakMap/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.delete()\n\nThe **`delete()`** method removes the specified element from a\n`WeakMap` object.\n\n## Syntax\n\n```js\ndelete(key)\n```\n\n### Parameters\n\n- `key`\n  - : The key of the element to remove from the `WeakMap` object.\n\n### Return value\n\n`true` if an element in the `WeakMap` object has been removed\nsuccessfully. `false` if the key is not found in the `WeakMap` or\nif the key is not an object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/WeakMap/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.get()\n\nThe **`get()`** method returns a specified element from a\n`WeakMap` object.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key`\n  - : Required. The key of the element to return from the `WeakMap` object.\n\n### Return value\n\nThe element associated with the specified key in the `WeakMap` object. If\nthe key can't be found, [`undefined`](../../../globals/undefined.mdx) is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/WeakMap/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.has()\n\nThe **`has()`** method returns a boolean indicating whether an\nelement with the specified key exists in the `WeakMap` object or not.\n\n## Syntax\n\n```js\nhas(key)\n```\n\n### Parameters\n\n- `key`\n  - : Required. The key of the element to test for presence in the `WeakMap`\n    object.\n\n### Return value\n\n- Boolean\n  - : Returns `true` if an element with the specified key exists in the\n    `WeakMap` object; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/WeakMap/prototype/set.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakMap.prototype.set\n\nThe **`set()`** method adds a new element with a specified key\nand value to a `WeakMap` object.\n\n## Syntax\n\n```js\nset(key, value)\n```\n\n### Parameters\n\n- `key`\n  - : Required. Must be `object`. The key of the element to add to the\n    `WeakMap` object.\n- `value`\n  - : Required. Any value. The value of the element to add to the `WeakMap`\n    object.\n\n### Return value\n\nThe `WeakMap` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/WeakRef/WeakRef.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakRef\n\nThe **`WeakRef`** constructor creates a `WeakRef`\nobject referring to a given target object.\n\n## Syntax\n\n```js\nnew WeakRef(targetObject)\n```\n\n> **Note:** `WeakRef()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `targetObject`\n  - : The target object the WeakRef should refer to (also called the _referent_).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/WeakRef/prototype/deref.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakRef.prototype.deref()\n\nThe `deref` method returns the `WeakRef` instance's target\nobject, or `undefined` if the target object has been garbage-collected.\n\n## Syntax\n\n```js\nderef()\n```\n\n### Return value\n\nThe target object of the WeakRef, or `undefined` if the object has been\ngarbage-collected.\n\n## Description\n\nSee the [Notes on WeakRefs](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/WeakRef#notes_on_weakrefs) section of the `WeakRef` page for some important notes.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/WeakSet/WeakSet.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet\n\nThe **`WeakSet`** constructor lets you create\n`WeakSet` objects that store weakly held _objects_ in a collection.\n\n## Syntax\n\n```js\nnew WeakSet()\nnew WeakSet(iterable)\n```\n\n> **Note:** `WeakSet()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `iterable` _**optional**_\n  - : If an [iterable object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of) is passed, all of its elements will be added to the new\n    `WeakSet`. null is treated as undefined.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/WeakSet/prototype/add.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet.prototype.add\n\nThe **`add()`** method appends a new object to the end of a\n`WeakSet` object.\n\n## Syntax\n\n```js\nadd(value)\n```\n\n### Parameters\n\n- value\n  - : Required. The object to add to the `WeakSet` collection.\n\n### Return value\n\nThe `WeakSet` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/WeakSet/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet.prototype.delete\n\nThe **`delete()`** method removes the specified element from a\n`WeakSet` object.\n\n## Syntax\n\n```js\ndelete(value)\n```\n\n### Parameters\n\n- `value`\n  - : Required. The object remove from the `WeakSet` object.\n\n### Return value\n\n`true` if an element in the `WeakSet` object has been removed\nsuccessfully. `false` if the `value` is not found in\nthe `WeakSet` or if the `value` is not an object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/WeakSet/prototype/has.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WeakSet.prototype.has\n\nThe **`has()`** method returns a boolean indicating whether an\nobject exists in a `WeakSet` or not.\n\n## Syntax\n\n```js\nhas(value)\n```\n\n### Parameters\n\n- `value`\n  - : Required. The object to test for presence in the `WeakSet`.\n\n### Return value\n\n- Boolean\n  - : Returns `true` if an element with the specified value exists in the\n    `WeakSet` object; otherwise `false`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/WorkerLocation/WorkerLocation.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# WorkerLocation\n\nThe **`WorkerLocation`** interface defines the absolute location of the script executed by the Worker. Such an object is initialized for each worker and is available via the [`location`](../../globals/location.mdx) property obtained by calling `globalThis.location`.\n\n## Instance properties\n\n- [`WorkerLocation.href`](../../globals/WorkerLocation/href.mdx) _**read-only**_\n  - : Returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location.\n- [`WorkerLocation.protocol`](../../globals/WorkerLocation/protocol.mdx) _**read-only**_\n  - : Returns the [`protocol`](../../globals/URL/prototype/protocol.mdx) part of the worker's location.\n- [`WorkerLocation.host`](../../globals/WorkerLocation/host.mdx) _**read-only**_\n  - : Returns the [`host`](../../globals/URL/prototype/host.mdx) part of the worker's location.\n- [`WorkerLocation.hostname`](../../globals/WorkerLocation/hostname.mdx) _**read-only**_\n  - : Returns the [`hostname`](../../globals/URL/prototype/hostname.mdx) part of the worker's location.\n- [`WorkerLocation.origin`](../../globals/WorkerLocation/origin.mdx) _**read-only**_\n  - : Returns the worker's [`origin`](../../globals/URL/prototype/origin.mdx).\n- [`WorkerLocation.port`](../../globals/WorkerLocation/port.mdx) _**read-only**_\n  - : Returns the [`port`](../../globals/URL/prototype/port.mdx) part of the worker's location.\n- [`WorkerLocation.pathname`](../../globals/WorkerLocation/pathname.mdx) _**read-only**_\n  - : Returns the [`pathname`](../../globals/URL/prototype/pathname.mdx) part of the worker's location.\n- [`WorkerLocation.search`](../../globals/WorkerLocation/search.mdx) _**read-only**_\n  - : Returns the [`search`](../../globals/URL/prototype/search.mdx) part of the worker's location.\n- [`WorkerLocation.hash`](../../globals/WorkerLocation/hash.mdx) _**read-only**_\n  - : Returns the [`hash`](../../globals/URL/prototype/hash.mdx) part of the worker's location.\n\n## Instance methods\n\n- [`WorkerLocation.toString`](../../globals/WorkerLocation/toString.mdx)\n  - : Returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location. It is a synonym for [`WorkerLocation.href`](../../globals/WorkerLocation/href.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/WorkerLocation/hash.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.hash\n\nThe **`hash`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`hash`](../../globals/URL/prototype/hash.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/WorkerLocation/host.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.host\n\nThe **`host`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`host`](../../globals/URL/prototype/host.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/WorkerLocation/hostname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.hostname\n\nThe **`hostname`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`hostname`](../../globals/URL/prototype/hostname.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/WorkerLocation/href.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.href\n\nThe **`href`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/WorkerLocation/origin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.origin\n\nThe **`origin`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the worker's [`origin`](../../globals/URL/prototype/origin.mdx).\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/WorkerLocation/pathname.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.pathname\n\nThe **`pathname`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`pathname`](../../globals/URL/prototype/pathname.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/WorkerLocation/port.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.port\n\nThe **`port`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`port`](../../globals/URL/prototype/port.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/WorkerLocation/protocol.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.protocol\n\nThe **`protocol`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`protocol`](../../globals/URL/prototype/protocol.mdx) part of the worker's location.\n\n## Value\n\nA string.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/WorkerLocation/search.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.search\n\nThe **`search`** property of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns the [`search`](../../globals/URL/prototype/search.mdx) part of the worker's location.\n\n## Value\n\nA string.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/WorkerLocation/toString.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WorkerLocation.toString()\n\nThe **`toString()`** method of a [`WorkerLocation`](../../globals/WorkerLocation/WorkerLocation.mdx) object returns a string containing the serialized [`URL`](../../globals/URL/URL.mdx) for the worker's location. It is a synonym for [`WorkerLocation.href`](../../globals/WorkerLocation/href.mdx).\n\n## Syntax\n\n```js\ntoString()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone [`undefined`](../../globals/undefined.mdx).\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/WritableStream/WritableStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream()\n\nThe **`WritableStream()`** constructor creates\na new `WritableStream` object instance.\n\n## Syntax\n\n```js\nnew WritableStream(underlyingSink)\nnew WritableStream(underlyingSink, queuingStrategy)\n```\n\n### Parameters\n\n- `underlyingSink` _**optional**_\n\n  - : An object containing methods and properties that define how the constructed stream\n    instance will behave. `underlyingSink` can contain the following:\n\n    - `start(controller)` _**optional**_\n      - : This is a method, called immediately when the object is constructed. The\n        contents of this method are defined by the developer, and should aim to get access\n        to the underlying sink. If this process is to be done asynchronously, it can\n        return a promise to signal success or failure. The `controller`\n        parameter passed to this method is a\n        `WritableStreamDefaultController`. This can be used by the developer\n        to control the stream during set up.\n    - `write(chunk, controller)` _**optional**_\n      - : This method, also defined by the developer, will be called when a new chunk of\n        data (specified in the `chunk` parameter) is ready to be written to the\n        underlying sink. It can return a promise to signal success or failure of the write\n        operation. The `controller` parameter passed to this method is a\n        `WritableStreamDefaultController` that can be used by the developer\n        to control the stream as more chunks are submitted for writing. This method will\n        be called only after previous writes have succeeded, and never after the stream is\n        closed or aborted (see below).\n    - `close(controller)` _**optional**_\n      - : This method, also defined by the developer, will be called if the app signals\n        that it has finished writing chunks to the stream. The contents should do whatever\n        is necessary to finalize writes to the underlying sink, and release access to it.\n        If this process is asynchronous, it can return a promise to signal success or\n        failure. This method will be called only after all queued-up writes have\n        succeeded. The `controller` parameter passed to this method is a\n        `WritableStreamDefaultController`, which can be used to control the\n        stream at the end of writing.\n    - `abort(reason)` _**optional**_\n      - : This method, also defined by the developer, will be called if the app signals\n        that it wishes to abruptly close the stream and put it in an errored state. It can\n        clean up any held resources, much like `close()`, but\n        `abort()` will be called even if writes are queued up — those chunks\n        will be thrown away. If this process is asynchronous, it can return a promise to\n        signal success or failure. The `reason` parameter contains a\n        string describing why the stream was aborted.\n\n- `queuingStrategy` _**optional**_\n\n  - : An object that optionally defines a queuing strategy for the stream. This takes two\n    parameters:\n\n    - `highWaterMark`\n      - : A non-negative integer — this defines the total number of chunks that can be\n        contained in the internal queue before backpressure is applied.\n    - `size(chunk)`\n      - : A method containing a parameter `chunk` — this indicates the size to use for each chunk, in bytes.\n\n    > **Note:** You could define your own custom\n    > `queuingStrategy`, or use an instance of\n    > `ByteLengthQueuingStrategy` or `CountQueuingStrategy`\n    > for this object value. If no `queuingStrategy` is supplied, the default\n    > used is the same as a `CountQueuingStrategy` with a high water mark of 1\\.\n\n### Return value\n\nAn instance of the `WritableStream` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/WritableStream/prototype/abort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream.abort()\n\nThe **`abort()`** method of the `WritableStream` interface aborts the stream, signaling that the producer can no longer successfully write to the stream and it is to be immediately moved to an error state, with any queued writes discarded.\n\n## Syntax\n\n```js\nabort(reason)\n```\n\n### Parameters\n\n- `reason`\n  - : A string providing a human-readable reason for the abort.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason` parameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to abort is not a `WritableStream`, or it is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/WritableStream/prototype/getWriter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream.getWriter()\n\nThe **`getWriter()`** method of the `WritableStream` interface returns a new instance of `WritableStreamDefaultWriter` and locks the stream to that instance.\nWhile the stream is locked, no other writer can be acquired until this one is released.\n\n## Syntax\n\n```js\ngetWriter()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `WritableStreamDefaultWriter` object instance.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to create a writer for is not a `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/WritableStream/prototype/locked.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStream.locked\n\nThe **`locked`** read-only property of the `WritableStream` interface returns a boolean indicating whether the `WritableStream` is locked to a writer.\n\n## Value\n\nA boolean value indicating whether or not the writable stream is locked.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/WritableStreamDefaultController/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultController.error()\n\nThe **`error()`** method of the\n`WritableStreamDefaultController` interface causes any future interactions\nwith the associated stream to error.\n\nThis method is rarely used, since usually it suffices to return a rejected promise from\none of the underlying sink's methods. However, it can be useful for suddenly shutting\ndown a stream in response to an event outside the normal lifecycle of interactions with\nthe underlying sink.\n\n## Syntax\n\n```js\nerror(message)\n```\n\n### Parameters\n\n- `message`\n  - : A string representing the error you want future interactions to\n    fail with.\n\n### Return value\n\nNone `undefined`.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to error is not a `WritableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/WritableStreamDefaultWriter/WritableStreamDefaultWriter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter()\n\nThe **`WritableStreamDefaultWriter()`**\nconstructor creates a new `WritableStreamDefaultWriter` object instance.\n\n## Syntax\n\n```js\nnew WritableStreamDefaultWriter(stream)\n```\n\n### Parameters\n\n- `stream`\n  - : The `WritableStream` to be written to.\n\n### Return value\n\nAn instance of the `WritableStreamDefaultWriter` object.\n\n### Exceptions\n\n- `TypeError`\n  - : The provided `stream` value is not a `WritableStream`, or it\n    is locked to another writer already.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/WritableStreamDefaultWriter/prototype/abort.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.abort()\n\nThe **`abort()`** method of the\n`WritableStreamDefaultWriter` interface aborts the stream, signaling that\nthe producer can no longer successfully write to the stream and it is to be immediately\nmoved to an error state, with any queued writes discarded.\n\nIf the writer is active, the `abort()` method behaves the same as that for\nthe associated stream (`WritableStream.abort()`). If not, it returns a\nrejected promise.\n\n## Syntax\n\n```js\nabort()\nabort(reason)\n```\n\n### Parameters\n\n- `reason` _**optional**_\n  - : A string representing a human-readable reason for the abort.\n\n### Return value\n\nA `Promise`, which fulfills with the value given in the `reason`\nparameter.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to abort is not a `WritableStream`, or it is\n    locked.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/WritableStreamDefaultWriter/prototype/close.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.close()\n\nThe **`close()`** method of the\n`WritableStreamDefaultWriter` interface closes the associated writable\nstream.\n\nThe underlying sink will finish processing any previously-written chunks, before\ninvoking the close behavior. During this time any further attempts to write will fail\n(without erroring the stream).\n\n## Syntax\n\n```js\nclose()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise`, which fulfills with the `undefined` if all\nremaining chunks were successfully written before the close, or rejects with an error if\na problem was encountered during the process.\n\n### Exceptions\n\n- `TypeError`\n  - : The stream you are trying to close is not a `WritableStream`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/WritableStreamDefaultWriter/prototype/closed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.closed\n\nThe **`closed`** read-only property of the\n`WritableStreamDefaultWriter` interface returns a\n`Promise` that fulfills if the stream becomes closed, or rejects if\nthe stream errors or the writer's lock is released.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/WritableStreamDefaultWriter/prototype/desiredSize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.desiredSize\n\nThe **`desiredSize`** read-only property of the\n`WritableStreamDefaultWriter` interface returns the desired size required\nto fill the stream's internal queue.\n\n## Value\n\nAn integer. Note that this can be negative if the queue is over-full.\n\nThe value will be `null` if the stream cannot be successfully written to\n(due to either being errored, or having an abort queued up), and zero if the stream is\nclosed.\n\n### Exceptions\n\n- `TypeError`\n  - : The writer's lock is released.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/WritableStreamDefaultWriter/prototype/ready.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.ready\n\nThe **`ready`** read-only property of the\n`WritableStreamDefaultWriter` interface returns a `Promise`\nthat resolves when the desired size of the stream's internal queue transitions from\nnon-positive to positive, signaling that it is no longer applying backpressure.\n\n## Value\n\nA `Promise`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/WritableStreamDefaultWriter/prototype/releaseLock.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.releaseLock()\n\nThe **`releaseLock()`** method of the\n`WritableStreamDefaultWriter` interface releases the writer's lock on the\ncorresponding stream. After the lock is released, the writer is no longer active. If the\nassociated stream is errored when the lock is released, the writer will appear errored\nin the same way from now on; otherwise, the writer will appear closed.\n\n## Syntax\n\n```js\nreleaseLock()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nNone `undefined`.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/WritableStreamDefaultWriter/prototype/write.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# WritableStreamDefaultWriter.write()\n\nThe **`write()`** method of the\n`WritableStreamDefaultWriter` interface writes a passed chunk of data to a\n`WritableStream` and its underlying sink, then returns a\n`Promise` that resolves to indicate the success or failure of the write\noperation.\n\nNote that what \"success\" means is up to the underlying sink; it might indicate that the\nchunk has been accepted, and not necessarily that it is safely saved to its ultimate\ndestination.\n\n## Syntax\n\n```js\nwrite(chunk)\n```\n\n### Parameters\n\n- `chunk`\n  - : A block of binary data to pass to the `WritableStream`.\n\n### Return value\n\nA `Promise`, which fulfills with the `undefined` upon a\nsuccessful write, or rejects if the write fails or stream becomes errored before the\nwriting process is initiated.\n\n### Exceptions\n\n- `TypeError`\n  - : The target stream is not a writable stream, or it does not have an owner.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/atob.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# atob()\n\nThe **`atob()`** function decodes a\nstring of data which has been encoded using Base64 encoding. You can use\nthe `btoa()` method to encode and transmit\ndata which may otherwise cause communication problems, then transmit it and use the\n`atob()` method to decode the data again. For example, you can encode,\ntransmit, and decode control characters such as ASCII values 0 through 31.\n\nFor use with Unicode or UTF-8 strings, see the note on \"Unicode strings\" in the page\nfor `btoa()`.\n\n## Syntax\n\n```js\natob(encodedData)\n```\n\n### Parameters\n\n- `encodedData`\n  - : A binary string (i.e., a string in which each character in the string is treated as a byte of binary data) containing base64-encoded data.\n\n### Return value\n\nAn ASCII string containing decoded data from `encodedData`.\n\n### Exceptions\n\n- `InvalidCharacterError`\n  - : Thrown if `encodedData` is not valid base64.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/btoa.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# btoa()\n\nThe **`btoa()`** method creates a\nBase64-encoded ASCII string from a _binary string_ (i.e., a\nstring in which each character in the string is treated as a byte\nof binary data).\n\nYou can use this method to encode data which may otherwise cause communication\nproblems, transmit it, then use the `atob()` method to decode the data again. For example, you can encode control\ncharacters such as ASCII values 0 through 31.\n\n## Syntax\n\n```js\nbtoa(stringToEncode)\n```\n\n### Parameters\n\n- `stringToEncode`\n  - : The _binary string_ to encode.\n\n### Return value\n\nAn ASCII string containing the Base64 representation of\n`stringToEncode`.\n\n### Exceptions\n\n- `InvalidCharacterError`\n  - : The string contained a character that did not fit in a single byte. See \"Unicode\n    strings\" below for more detail.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/clearInterval.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# clearInterval()\n\nThe global **`clearInterval()`** method cancels a timed, repeating action which\nwas previously established by a call to `setInterval()`.\nIf the parameter provided does not identify a previously established action,\nthis method does nothing.\n\n## Syntax\n\n```js\nclearInterval(intervalID)\n```\n\n### Parameters\n\n- `intervalID`\n  - : The identifier of the repeated action you want to cancel. This ID was returned by\n    the corresponding call to `setInterval()`.\n\nIt's worth noting that the pool of IDs used by\n`setInterval()` and\n`setTimeout()` are shared, which\nmeans you can technically use `clearInterval()` and\n`clearTimeout()` interchangeably.\nHowever, for clarity, you should avoid doing so.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/clearTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# clearTimeout()\n\nThe global **`clearTimeout()`** method cancels a timeout previously established\nby calling `setTimeout()`.\n\nIf the parameter provided does not identify a previously established action,\nthis method does nothing.\n\n## Syntax\n\n```js\nclearTimeout(timeoutID)\n```\n\n### Parameters\n\n- `timeoutID`\n  - : The identifier of the timeout you want to cancel. This ID was returned by the\n    corresponding call to `setTimeout()`.\n\nIt's worth noting that the pool of IDs used by\n`setTimeout()` and\n`setInterval()` are shared, which\nmeans you can technically use `clearTimeout()` and\n`clearInterval()`\ninterchangeably. However, for clarity, you should avoid doing so.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/console/assert.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.assert()\n\nThe **`console.assert()`** method writes an error message to\nthe console if the assertion is false. If the assertion is true, nothing happens.\n\n## Syntax\n\n```js\nassert(assertion, obj1)\nassert(assertion, obj1, obj2)\nassert(assertion, obj1, obj2, /* … ,*/ objN)\n\nassert(assertion, msg)\nassert(assertion, msg, subst1)\nassert(assertion, msg, subst1, /* … ,*/ substN)\n```\n\n### Parameters\n\n- `assertion`\n  - : Any boolean expression. If the assertion is false, the message is written to the\n    console.\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output.\n- `msg`\n  - : A JavaScript string containing zero or more substitution strings.\n- `subst1` … `substN`\n  - : JavaScript objects with which to replace substitution strings within\n    `msg`. This parameter gives you additional control over the format of the\n    output.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/console/clear.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.clear()\n\nThe **`console.clear()`** method clears the console if the console allows it.\n\n## Syntax\n\n```js\nclear()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/console/count.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.count()\n\nThe **`console.count()`** method logs the number of times that\nthis particular call to `count()` has been called.\n\n\n## Syntax\n\n```js\ncount()\ncount(label)\n```\n\n### Parameters\n\n- `label` _optional_\n  - : A string. If supplied, `count()` outputs the number of\n    times it has been called with that label. If omitted, `count()` behaves as\n    though it was called with the \"default\" label.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/console/countReset.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.countReset()\n\nThe **`console.countReset()`** method resets counter used with `console.count()`.\n\n## Syntax\n\n```js\ncountReset()\ncountReset(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : A string. If supplied, `countReset()` resets the count for\n    that label to 0. If omitted, `countReset()` resets the default counter to\n    0.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/console/debug.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.debug()\n\nThe **`console.debug()`** method outputs a message to the console at the \"debug\" log level.\n\n## Syntax\n\n```js\ndebug(obj1)\ndebug(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output to the console.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/console/dir.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.dir()\n\nThe method **`console.dir()`** displays a list of the properties of\nthe specified JavaScript object.\n\n## Syntax\n\n```js\ndir(object)\n```\n\n### Parameters\n\n- `object`\n  - : A JavaScript object whose properties should be output.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/console/dirxml.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.dirxml()\n\nThe **`console.dirxml()`** method displays the supplied object in the console.\n\n## Syntax\n\n```js\ndirxml(object)\n```\n\n### Parameters\n\n- `object`\n  - : A JavaScript object whose properties should be output.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/console/error.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.error()\n\nThe **`console.error()`** method outputs an error message console.\n\n## Syntax\n\n```js\nerror(obj1)\nerror(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of\n    these objects are appended together in the order listed and output.\n\n### Return value\n\nNone `undefined`."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/console/group.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.group()\n\nThe **`console.group()`** method creates a new inline group in the console, until `console.groupEnd()` is called.\n\n## Syntax\n\n```js\ngroup()\ngroup(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : Label for the group.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/console/groupCollapsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.groupCollapsed()\n\nThe **`console.groupCollapsed()`** method creates a new inline group in the Web Console. Unlike `console.group()`,\nhowever, the new group is created collapsed. The user will need to use the disclosure\nbutton next to it to expand it, revealing the entries created in the group.\n\nCall `console.groupEnd()` to back out to the parent group.\n\n## Syntax\n\n```js\ngroupCollapsed()\ngroupCollapsed(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : Label for the group.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/console/groupEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.groupEnd()\n\nThe **`console.groupEnd()`** method exits the current inline group in the console.\n\n## Syntax\n\n```js\ngroupEnd()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/console/info.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.info()\n\nThe **`console.info()`** method outputs an informational message to the console.\n\n## Syntax\n\n```js\ninfo(obj1)\ninfo(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/console/log.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.log()\n\nThe **`console.log()`** method outputs a message to the console.\n\n## Syntax\n\n```js\nlog(obj1)\nlog(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output. Please be warned that if\n    you log objects in the latest versions of Chrome and Firefox what you get logged on\n    the console is a _reference to the object_, which is not necessarily the\n    'value' of the object at the moment in time you call `console.log()`, but\n    it is the value of the object at the moment you open the console.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/console/time.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.time()\n\nThe **`console.time()`** method starts a timer you can use to track\nhow long an operation takes. You give each timer a unique name. When you call `console.timeEnd()` with the same name, the\nbrowser will output the time, in milliseconds, that elapsed since the timer was started.\n\n## Syntax\n\n```js\ntime(label)\n```\n\n### Parameters\n\n- `label`\n  - : A `string` representing the name to give the new timer. This will identify the timer; use the same name when\n    calling `console.timeEnd()` to stop the timer and get the time output to\n    the console.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/console/timeEnd.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.timeEnd()\n\nThe **`console.timeEnd()`** stops a timer that was previously started by calling `console.time()`.\n\n## Syntax\n\n```js\ntimeEnd(label)\n```\n\n### Parameters\n\n- `label`\n  - : A `string` representing the name of the timer to stop. Once stopped, the elapsed time is automatically\n    displayed in the console.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/console/timeLog.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.timeLog()\n\nThe **`console.timeLog()`** method logs the current value of a timer that was previously started by calling `console.time()`.\n\n## Syntax\n\n```js\ntimeLog()\ntimeLog(label)\n```\n\n### Parameters\n\n- `label` __optional__\n  - : The name of the timer to log to the console. If this is omitted the label \"default\" is used.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/console/trace.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# console.trace()\n\nThe **`console.trace()`** method outputs a stack trace to the console.\n\n## Syntax\n\n```js\ntrace()\ntrace(object1, /* …, */ objectN)\n```\n\n### Parameters\n\n- `objects` __optional__\n  - : Zero or more objects to be output to console along with the trace. These are\n    assembled and formatted the same way they would be if passed to the `console.log()` method.\n\n### Return value\n\n`undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/console/warn.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# console.warn()\n\nThe **`console.warn()`** method outputs a warning message to the console.\n\n## Syntax\n\n```js\nwarn(obj1)\nwarn(obj1, /* …, */ objN)\n```\n\n### Parameters\n\n- `obj1` … `objN`\n  - : A list of JavaScript objects to output. The string representations of each of these\n    objects are appended together in the order listed and output.\n\n### Return value\n\nNone `undefined`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/crypto/getRandomValues.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Crypto.getRandomValues()\n\nThe **`Crypto.getRandomValues()`** method lets you get cryptographically strong random values.\nThe array given as the parameter is filled with random numbers (random in its cryptographic meaning).\n\n## Syntax\n\n```js\ngetRandomValues(typedArray)\n```\n\n### Parameters\n\n- `typedArray`\n  - : An integer-based `TypedArray`, that is one of: `Int8Array`, `Uint8Array`,\n    `Uint8ClampedArray`, `Int16Array`, `Uint16Array`,\n    `Int32Array`, `Uint32Array`, `BigInt64Array`,\n    `BigUint64Array` (but **not** `Float32Array` nor `Float64Array`).\n    All elements in the array will be overwritten with random numbers.\n\n### Return value\n\nThe same array passed as `typedArray` but with its contents replaced with the newly generated random numbers.\nNote that `typedArray` is modified in-place, and no copy is made.\n\n### Exceptions\n\n- `QuotaExceededError`\n  - : Thrown if the `byteLength` of `typedArray` exceeds 65,536.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/crypto/randomUUID.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Crypto.randomUUID()\n\nThe **`randomUUID()`** method is used to generate a v4 [UUID](https://developer.mozilla.org/en-US/docs/Glossary/UUID) using a cryptographically secure random number generator.\n\n## Syntax\n\n```js\nrandomUUID()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA string containing a randomly generated, 36 character long v4 UUID."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/crypto/subtle.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Crypto.subtle\n\nThe **`Crypto.subtle`** read-only property returns a\n[`SubtleCrypto`](../SubtleCrypto/SubtleCrypto.mdx) which can then be used to perform low-level\ncryptographic operations.\n\n## Value\n\nA [`SubtleCrypto`](../SubtleCrypto/SubtleCrypto.mdx) object you can use to interact with the Web Crypto API's\nlow-level cryptography features.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/decodeURI.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# decodeURI\n\nThe **`decodeURI()`** function decodes a Uniform Resource Identifier (URI) previously created by [`encodeURI()`](../globals/encodeURI.mdx) or a similar routine.\n\n## Syntax\n\n```js\ndecodeURI(encodedURI)\n```\n\n### Parameters\n\n- `encodedURI`\n  - : A complete, encoded Uniform Resource Identifier.\n\n### Return value\n\nA new string representing the unencoded version of the given encoded Uniform Resource Identifier (URI).\n\n### Exceptions\n\n- [`URIError`](../globals/URIError/URIError.mdx)\n  - : Thrown if `encodedURI` contains a `%` not followed by two hexadecimal digits, or if the escape sequence does not encode a valid UTF-8 character.\n\n## Description\n\n`decodeURI()` is a function property of the global object.\n\nThe `decodeURI()` function decodes the URI by treating each escape sequence in the form `%XX` as one UTF-8 code unit (one byte). In UTF-8, the number of leading 1 bits in the first byte, which may be 0 (for 1-byte ASCII characters), 2, 3, or 4, indicates the number of bytes in the character. So by reading the first escape sequence, `decodeURI()` can determine how many more escape sequences to consume. If `decodeURI()` fails to find the expected number of sequences, or if the escape sequences don't encode a valid UTF-8 character, a [`URIError`](../globals/URIError/URIError.mdx) is thrown.\n\n`decodeURI()` decodes all escape sequences, but if the escape sequence encodes one of the following characters, the escape sequence is preserved in the output string (because they are part of the URI syntax):\n\n```\n; / ? : @ & = + $ , #\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/decodeURIComponent.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# decodeURIComponent\n\nThe **`decodeURIComponent()`** function decodes a Uniform Resource Identifier (URI) component previously created by [`encodeURIComponent()`](./encodeURIComponent.mdx) or by a similar routine.\n\n\n## Syntax\n\n```js\ndecodeURIComponent(encodedURI)\n```\n\n### Parameters\n\n- `encodedURI`\n  - : An encoded component of a Uniform Resource Identifier.\n\n### Return value\n\nA new string representing the decoded version of the given encoded Uniform Resource Identifier (URI) component.\n\n### Exceptions\n\n- [`URIError`](../globals/URIError/URIError.mdx)\n  - : Thrown if `encodedURI` contains a `%` not followed by two hexadecimal digits, or if the escape sequence does not encode a valid UTF-8 character.\n\n## Description\n\n`decodeURIComponent()` is a function property of the global object.\n\n`decodeURIComponent()` uses the same decoding algorithm as described in [`decodeURI()`](./decodeURI.mdx). It decodes _all_ escape sequences, including those that are not created by [`encodeURIComponent()`](./encodeURIComponent.mdx), like `-.!~*'()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/encodeURI.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# encodeURI()\n\nThe **`encodeURI()`** function encodes a URI by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character (will only be four escape sequences for characters composed of two surrogate characters). Compared to [`encodeURIComponent()`](./encodeURIComponent.mdx), this function encodes fewer characters, preserving those that are part of the URI syntax.\n\n## Syntax\n\n```js\nencodeURI(uri)\n```\n\n### Parameters\n\n- `uri`\n  - : A string to be encoded as a URI.\n\n### Return value\n\nA new string representing the provided string encoded as a URI.\n\n### Exceptions\n\n- [`URIError`](./URIError/URIError.mdx)\n  - : Thrown if `uri` contains a [lone surrogate](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters).\n\n## Description\n\n`encodeURI()` is a function property of the global object.\n\nThe `encodeURI()` function escapes characters by UTF-8 code units, with each octet encoded in the format `%XX`, left-padded with 0 if necessary. Because lone surrogates in UTF-16 do not encode any valid Unicode character, they cause `encodeURI()` to throw a [`URIError`](./URIError/URIError.mdx).\n\n`encodeURI()` escapes all characters **except**:\n\n```\nA–Z a–z 0–9 - _ . ! ~ * ' ( )\n\n; / ? : @ & = + $ , #\n```\n\nThe characters on the second line are characters that may be part of the URI syntax, and are only escaped by `encodeURIComponent()`. Both `encodeURI()` and `encodeURIComponent()` do not encode the characters `-.!~*'()`, known as \"unreserved marks\", which do not have a reserved purpose but are allowed in a URI \"as is\". (See [RFC2396](https://www.ietf.org/rfc/rfc2396.txt))\n\nThe `encodeURI()` function does not encode characters that have special meaning (reserved characters) for a URI. The following example shows all the parts that a URI can possibly contain. Note how certain characters are used to signify special meaning:\n\n```\nhttp://username:password@www.example.com:80/path/to/file.php?foo=316&bar=this+has+spaces#anchor\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/encodeURIComponent.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# encodeURIComponent\n\nThe **`encodeURIComponent()`** function encodes a URI by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character (will only be four escape sequences for characters composed of two surrogate characters). Compared to [`encodeURI()`](./encodeURI.mdx), this function encodes more characters, including those that are part of the URI syntax.\n\n## Syntax\n\n```js\nencodeURIComponent(uriComponent)\n```\n\n### Parameters\n\n- `uriComponent`\n  - : A string to be encoded as a URI component (a path, query string, fragment, etc.). Other values are [converted to strings](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion).\n\n### Return value\n\nA new string representing the provided `uriComponent` encoded as a URI component.\n\n### Exceptions\n\n- [`URIError`](./URIError/URIError.mdx)\n  - : Thrown if `uriComponent` contains a [lone surrogate](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_codepoints_and_grapheme_clusters).\n\n## Description\n\n`encodeURIComponent()` is a function property of the global object.\n\n`encodeURIComponent()` uses the same encoding algorithm as described in [`encodeURI()`](./encodeURI.mdx). It escapes all characters **except**:\n\n```text\nA–Z a–z 0–9 - _ . ! ~ * ' ( )\n```\n\nCompared to [`encodeURI()`](./encodeURI.mdx), `encodeURIComponent()` escapes a larger set of characters. Use `encodeURIComponent()` on user-entered fields from forms `POST`'d to the server — this will encode `&` symbols that may inadvertently be generated during data entry for special HTML entities or other characters that require encoding/decoding. For example, if a user writes `Jack & Jill`, without `encodeURIComponent()`, the ampersand could be interpreted on the server as the start of a new field and jeopardize the integrity of the data.\n\nFor [`application/x-www-form-urlencoded`](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#application/x-www-form-urlencoded-encoding-algorithm), spaces are to be replaced by `+`, so one may wish to follow a `encodeURIComponent()` replacement with an additional replacement of `%20` with `+`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/escape.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# escape()\n\n> **Note:** `escape()` is a non-standard function implemented by browsers and was only standardized for cross-engine compatibility. It is not required to be implemented by all JavaScript engines and may not work everywhere. Use [`encodeURIComponent()`](./encodeURIComponent.mdx) or [`encodeURI()`](./encodeURI.mdx) if possible.\n\nThe **`escape()`** function computes a new string in which certain characters have been replaced by hexadecimal escape sequences.\n\n## Syntax\n\n```js\nescape(str)\n```\n\n### Parameters\n\n- `str`\n  - : A string to be encoded.\n\n### Return value\n\nA new string in which certain characters have been escaped.\n\n## Description\n\n`escape()` is a function property of the global object.\n\nThe `escape()` function replaces all characters with escape sequences, with the exception of ASCII word characters (A–Z, a–z, 0–9, _) and `@*_+-./`. Characters are escaped by UTF-16 code units. If the code unit's value is less than 256, it is represented by a two-digit hexadecimal number in the format `%XX`, left-padded with 0 if necessary. Otherwise, it is represented by a four-digit hexadecimal number in the format `%uXXXX`, left-padded with 0 if necessary.\n\n> **Note:** This function was used mostly for URL encoding and is partly based on the escape format in rfc(1738). The escape format is _not_ an [escape sequence](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#escape_sequences) in string literals. You can replace `%XX` with `\\xXX` and `%uXXXX` with `\\uXXXX` to get a string containing actual string-literal escape sequences.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/eval.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# eval\n\n> **Warning:** Executing JavaScript from a string is an enormous security risk. It is far too easy for a bad actor to run arbitrary code when you use `eval()`. See [never use direct eval](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval#never_use_direct_eval!) for details.\n\nThe **`eval()`** function evaluates JavaScript code represented as a string and returns its completion value. The source is parsed as a script.\n\n## Syntax\n\n```js\neval(script)\n```\n\n### Parameters\n\n- `script`\n  - : A string representing a JavaScript expression, statement, or sequence of statements. The expression can include variables and properties of existing objects. It will be parsed as a script, so [`import`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/import) declarations (which can only exist in modules) are not allowed.\n\n### Return value\n\nThe completion value of evaluating the given code. If the completion value is empty, [`undefined`](./undefined.mdx) is returned. If `script` is not a string primitive, `eval()` returns the argument unchanged.\n\n### Exceptions\n\nThrows any exception that occurs during evaluation of the code, including[ `SyntaxError`](./SyntaxError/SyntaxError.mdx) if `script` fails to be parsed as a script.\n\n## Description\n\n`eval()` is a function property of the global object.\n\nThe argument of the `eval()` function is a string. It will evaluate the source string as a script body, which means both statements and expressions are allowed. It returns the completion value of the code. For expressions, it's the value the expression evaluates to. Many statements and declarations have completion values as well, but the result may be surprising (for example, the completion value of an assignment is the assigned value, but the completion value of [`let`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/let) is undefined), so it's recommended to not rely on statements' completion values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/fetch.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# fetch()\n\nThe global **`fetch()`** method starts the process of fetching a\nresource from the network, returning a promise which is fulfilled once the response is\navailable.\n\nThe promise resolves to the `Response` object\nrepresenting the response to your request.\n\nA `fetch()` promise only rejects when a\nnetwork error is encountered (which is usually when there's a permissions issue or\nsimilar). A `fetch()` promise _does\nnot_ reject on HTTP errors (`404`, etc.). Instead, a\n`then()` handler must check the `Response.ok` and/or\n`Response.status` properties.\n\n> **Note:** The `fetch()` method's parameters are identical to\n> those of the `Request()` constructor.\n\n## Explicit Backends\n\nInternally, Fastly uses named backends to handle fetch requests, which need to be explicitly defined to enable custom HTTP origins to be fetched by the service.\n\nThis `backend` option is then a special Fastly-specific fetch option that is provided to the `fetch()` call:\n\n```js\nfetch('https://origin.com/path', { backend: 'origin' });\n```\n\nBackends are configured using the Fastly service backend configuration, see the [Backend documentation](https://developer.fastly.com/reference/api/services/backend/) for more information.\n\n## Dynamic Backends\n\nDynamic backends are a compute feature that allow services to define backends for themselves.\n\nIf the `backend` option is not provided when making `fetch()` requests, a backend will be automatically created by extracting the protocol, host, and port from the provided URL.\n\nIn addition, custom backend configuration options can then also be provided through the [`Backend()`](../fastly:backend/Backend/Backend.mdx) constructor.\n\n## Syntax\n\n```js\nfetch(resource)\nfetch(resource, options)\n```\n\n### Parameters\n\n- `resource`\n\n  - : This defines the resource that you wish to fetch. This can either be:\n\n    - A string or any other object with a \"toString\" method.\n    - A `Request` object.\n\n- `options` _**optional**_\n\n  - : An object containing any custom settings that you want to apply to the request. The\n    possible options are:\n\n    - `method`\n      - : The request method, e.g., `GET`, `POST`.\n    - `headers`\n      - : Any headers you want to add to your request, contained within a\n        `Headers` object or an object literal with `String`\n        values.\n    - `body`\n      - : Any body that you want to add to your request: this can be an `ArrayBuffer`, a `TypedArray`, a `DataView`, a `URLSearchParams`, string object or literal, or a `ReadableStream` object.\n    - `backend` _**Fastly-specific**_\n      - *Fastly-specific*\n    - `cacheOverride` _**Fastly-specific**_\n    - `cacheKey` _**Fastly-specific**_\n    - `imageOptimizerOptions` _**Fastly-specific**_, see [`imageOptimizerOptions`](../fastly:image-optimizer/imageOptimizerOptions.mdx).\n    - `fastly` _**Fastly-specific**_\n      - `decompressGzip`_: boolean_ _**optional**_\n        - Whether to automatically gzip decompress the Response or not.\n\n### Return value\n\nA `Promise` that resolves to a `Response` object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/globalThis.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# globalThis\n\nThe global **`globalThis`** property contains the [global `this`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/this#global_context) value, which is usually akin to the [global object](https://developer.mozilla.org/docs/Glossary/Global_object).\n\n## Value\n\nThe global `this` object.\n\n> **Note:** The `globalThis` property is configurable and writable so that code authors can hide it when executing untrusted code and prevent exposing the global object.\n\n## Description\n\nThe `globalThis` property provides a standard way of accessing the global `this` value (and hence the global object itself) across environments.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/isFinite.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# isFinite\n\nThe global **`isFinite()`** function determines whether the\npassed value is a finite number. If needed, the parameter is first converted to a\nnumber.\n\n## Syntax\n\n```js\nisFinite(testValue)\n```\n\n### Parameters\n\n- `testValue`\n  - : The value to be tested for finiteness.\n\n### Return value\n\n**`false`** if the argument is (or will be coerced to) positive\nor negative [`Infinity`](./Infinity.mdx) or [`NaN`](./NaN.mdx) or [`undefined`](./undefined.mdx);\notherwise, **`true`**.\n\n## Description\n\n`isFinite` is a function property of the global object.\n\nYou can use this function to determine whether a number is a finite number. The\n`isFinite` function examines the number in its argument. If the argument is\n`NaN`, positive infinity, or negative infinity, this method returns\n`false`; otherwise, it returns `true`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/isNaN.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# isNaN()\n\nThe **`isNaN()`** function determines whether a value is [`NaN`](./NaN.mdx) when converted to a number. Because coercion inside the `isNaN()` function can be [surprising](#description), you may alternatively want to use [`Number.isNaN()`](./Number/isNaN.mdx).\n\n## Syntax\n\n```js\nisNaN(value)\n```\n\n### Parameters\n\n- `value`\n  - : The value to be tested.\n\n### Return value\n\n`true` if the given value is [`NaN`](./NaN.mdx) after being [converted to a number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#number_coercion); otherwise, `false`.\n\n## Description\n\n`isNaN()` is a function property of the global object.\n\nFor number values, `isNaN()` tests if the number is the value [`NaN`](./NaN.mdx). When the argument to the `isNaN()` function is not of type [Number](https://developer.mozilla.org/docs/Web/JavaScript/Data_structures#number_type), the value is first coerced to a number, and the resulting value is then compared against [`NaN`](./NaN.mdx).\n\nThis behavior of `isNaN()` for non-numeric arguments can be confusing! For example, an empty string is coerced to 0, while a boolean is coerced to 0 or 1; both values are intuitively \"not numbers\", but they don't evaluate to `NaN`, so `isNaN()` returns `false`. Therefore, `isNaN()` answers neither the question \"is the input the floating point [`NaN`](./NaN.mdx) value\" nor the question \"is the input not a number\".\n\n[`Number.isNaN()`](./Number/isNaN.mdx) is a more reliable way to test whether a value is the number value `NaN` or not. Alternatively, the expression `x !== x` can be used, and neither of the solutions is subject to the false positives that make the global `isNaN()` unreliable. To test if a value is a number, use [`typeof x === \"number\"`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/typeof).\n\nThe `isNaN()` function answers the question \"is the input functionally equivalent to [`NaN`](./NaN.mdx) when used in a number context\". If `isNaN(x)` returns `false`, you can use `x` in an arithmetic expression as if it's a valid number that's not `NaN`. If `isNaN(x)` returns `true`, `x` will get coerced to `NaN` and make most arithmetic expressions return `NaN` (because `NaN` propagates). You can use this, for example, to test whether an argument to a function is arithmetically processable (usable \"like\" a number), and handle values that are not number-like by throwing an error, providing a default value, etc. This way, you can have a function that makes use of the full versatility JavaScript provides by implicitly converting values depending on context.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/location.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# location\n\nThe **`location`** read-only property returns a\n[`Location`](../globals/WorkerLocation/WorkerLocation.mdx) object with information about the current location of the\ndocument.\n\nSee [`Location`](../globals/WorkerLocation/WorkerLocation.mdx) for all available properties.\n\n## Value\n\nA [`Location`](../globals/WorkerLocation/WorkerLocation.mdx) object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/parseFloat.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# parseFloat()\n\nThe **`parseFloat()`** function parses a string argument and returns a floating point number.\n\n## Syntax\n\n```js\nparseFloat(string)\n```\n\n### Parameters\n\n- `string`\n  - : The value to parse, [coerced to a string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion). Leading whitespace in this argument is ignored.\n\n### Return value\n\nA floating point number parsed from the given `string`, or [`NaN`](./NaN.mdx) when the first non-whitespace character cannot be converted to a number.\n\n> **Note:** JavaScript does not have the distinction of \"floating point numbers\" and \"integers\" on the language level. [`parseInt()`](./parseInt.mdx) and `parseFloat()` only differ in their parsing behavior, but not necessarily their return values. For example, `parseInt(\"42\")` and `parseFloat(\"42\")` would return the same value: a `Number` 42.\n\n## Description\n\nThe `parseFloat` function converts its first argument to a string, parses that string as a decimal number literal, then returns a number or `NaN`. The number syntax it accepts can be summarized as:\n\n- The characters accepted by `parseFloat()` are plus sign (`+`), minus sign (`-` U+002D HYPHEN-MINUS), decimal digits (`0` – `9`), decimal point (`.`), exponent indicator (`e` or `E`), and the `\"Infinity\"` literal.\n- The `+`/`-` signs can only appear strictly at the beginning of the string, or immediately following the `e`/`E` character. The decimal point can only appear once, and only before the `e`/`E` character. The `e`/`E` character can only appear once, and only if there is at least one digit before it.\n- Leading spaces in the argument are trimmed and ignored.\n- `parseFloat()` can also parse and return [`Infinity`](./Infinity.mdx) or `-Infinity` if the string starts with `\"Infinity\"` or `\"-Infinity\"` preceded by none or more white spaces.\n- `parseFloat()` picks the longest substring starting from the beginning that generates a valid number literal. If it encounters an invalid character, it returns the number represented up to that point, ignoring the invalid character and all characters following it.\n- If the argument's first character can't start a legal number literal per the syntax above, `parseFloat` returns [`NaN`](./NaN.mdx).\n\nSyntax-wise, `parseFloat()` parses a subset of the syntax that the [`Number()`](./Number/Number.mdx) function accepts. Namely, `parseFloat()` does not support non-decimal literals with `0x`, `0b`, or `0o` prefixes but supports everything else. However, `parseFloat()` is more lenient than `Number()` because it ignores trailing invalid characters, which would cause `Number()` to return `NaN`.\n\nSimilar to number literals and `Number()`, the number returned from `parseFloat()` may not be exactly equal to the number represented by the string, due to floating point range and inaccuracy. For numbers outside the `-1.7976931348623158e+308` – `1.7976931348623158e+308` range (see `Number.MAX_VALUE`), `-Infinity` or `Infinity` is returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/parseInt.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# parseInt\n\nThe **`parseInt()`** function parses a string argument and returns an integer of the specified [radix](https://en.wikipedia.org/wiki/Radix) (the base in mathematical numeral systems).\n\n\n\n## Syntax\n\n```js\nparseInt(string)\nparseInt(string, radix)\n```\n\n### Parameters\n\n- `string`\n  - : A string starting with an integer. Leading whitespace in this argument is ignored.\n- `radix` _**optional**_\n\n  - : An integer between `2` and `36` that represents the _radix_ (the base in mathematical numeral systems) of the `string`. It is converted to a [32-bit integer](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number#fixed-width_number_conversion); if it's outside the range of \\[2, 36] after conversion, the function will always return `NaN`. If `0` or not provided, the radix will be inferred based on `string`'s value. Be careful — this does NOT always default to `10`! The [description below](#description) explains in more detail what happens when `radix` is not provided.\n\n### Return value\n\nAn integer parsed from the given `string`, or [`NaN`](./NaN.mdx) when\n\n- the `radix` as a 32-bit integer is smaller than `2` or bigger than `36`, or\n- the first non-whitespace character cannot be converted to a number.\n\n> **Note:** JavaScript does not have the distinction of \"floating point numbers\" and \"integers\" on the language level. `parseInt()` and [`parseFloat()`](./parseFloat.mdx) only differ in their parsing behavior, but not necessarily their return values. For example, `parseInt(\"42\")` and `parseFloat(\"42\")` would return the same value: a `Number` 42.\n\n## Description\n\nThe `parseInt` function converts its first argument to a string, parses that string, then returns an integer or `NaN`.\n\nIf not `NaN`, the return value will be the integer that is the first argument taken as a number in the specified `radix`. (For example, a `radix` of `10` converts from a decimal number, `8` converts from octal, `16` from hexadecimal, and so on.)\n\nThe `radix` argument is converted to a number. If it's unprovided, or if the value becomes 0, `NaN` or `Infinity` (`undefined` is coerced to `NaN`), JavaScript assumes the following:\n\n1. If the input `string`, with leading whitespace and possible `+`/`-` signs removed, begins with `0x` or `0X` (a zero, followed by lowercase or uppercase X), `radix` is assumed to be `16` and the rest of the string is parsed as a hexadecimal number.\n2. If the input `string` begins with any other value, the radix is `10` (decimal).\n\n> **Note:** Other prefixes like `0b`, which are valid in [number literals](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#binary), are treated as normal digits by `parseInt()`. `parseInt()` does _not_ treat strings beginning with a `0` character as octal values either. The only prefix that `parseInt()` recognizes is `0x` or `0X` for hexadecimal values — everything else is parsed as a decimal value if `radix` is missing.\n\nIf the radix is `16`, `parseInt()` allows the string to be optionally prefixed by `0x` or `0X` after the optional sign character (`+`/`-`).\n\nIf the radix value (coerced if necessary) is not in range \\[2, 36] (inclusive) `parseInt` returns `NaN`.\n\nFor radices above `10`, letters of the English alphabet indicate numerals greater than `9`. For example, for hexadecimal numbers (base `16`), `A` through `F` are used. The letters are case-insensitive.\n\n`parseInt` understands exactly two signs: `+` for positive, and `-` for negative. It is done as an initial step in the parsing after whitespace is removed. If no signs are found, the algorithm moves to the following step; otherwise, it removes the sign and runs the number-parsing on the rest of the string.\n\nIf `parseInt` encounters a character that is not a numeral in the specified `radix`, it ignores it and all succeeding characters and returns the integer value parsed up to that point. For example, although `1e3` technically encodes an integer (and will be correctly parsed to the integer `1000` by [`parseFloat()`](./parseFloat.mdx), `parseInt(\"1e3\", 10)` returns `1`, because `e` is not a valid numeral in base 10. Because `.` is not a numeral either, the return value will always be an integer.\n\nIf the first character cannot be converted to a number with the radix in use, `parseInt` returns `NaN`. Leading whitespace is allowed.\n\nFor arithmetic purposes, the `NaN` value is not a number in any radix. You can call the [`Number.isNaN`](./Number/isNaN.mdx) function to determine if the result of `parseInt` is `NaN`. If `NaN` is passed on to arithmetic operations, the operation result will also be `NaN`.\n\nBecause large numbers use the `e` character in their string representation (e.g. `6.022e23` for 6.022 × 10<sup>23</sup>), using `parseInt` to truncate numbers will produce unexpected results when used on very large or very small numbers. `parseInt` should _not_ be used as a substitute for [`Math.trunc()`](./Math/trunc.mdx).\n\nTo convert a number to its string literal in a particular radix, use [`thatNumber.toString(radix)`](./Number/prototype/toString.mdx).\n\nBecause `parseInt()` returns a number, it may suffer from loss of precision if the integer represented by the string is [outside the safe range](./Number/isSafeInteger.mdx). The [`BigInt`](./BigInt/BigInt.mdx) function supports parsing integers of arbitrary length accurately, by returning a `BigInt`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/performance/now.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# performance.now()\n\nThe **`performance.now()`** method returns a high resolution timestamp in milliseconds.\nIt represents the time elapsed since [`performance.timeOrigin`](./timeOrigin.mdx) (the time when the worker was instantiated).\n\n## Syntax\n\n```js\nnow()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns a number which represents the time since worker instantation measured in milliseconds.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/performance/timeOrigin.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# performance.timeOrigin\n\nThe **`timeOrigin`** read-only property of the Performance interface returns the high resolution timestamp that is used as the baseline for performance-related timestamps.\n\nThis value represents the time when the worker was instantiated.\n\n### Value\n\nReturns a number which represents the time when the worker was instantation."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/setInterval.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# setInterval()\n\nThe **`setInterval()`** method, repeatedly\ncalls a function or executes a code snippet, with a fixed time delay between each\ncall.\n\nThis method returns an interval ID which uniquely identifies the interval, so you\ncan remove it later by calling `clearInterval()`.\n\n## Syntax\n\n```js\nsetInterval(code)\nsetInterval(code, delay)\n\nsetInterval(func)\nsetInterval(func, delay)\nsetInterval(func, delay, arg0)\nsetInterval(func, delay, arg0, arg1)\nsetInterval(func, delay, arg0, arg1, /* … ,*/ argN)\n```\n\n### Parameters\n\n- `func`\n  - : A `function` to be executed every `delay` milliseconds. The first execution happens after `delay` milliseconds.\n- `code`\n  - : An optional syntax allows you to include a string instead of a function, which is\n    compiled and executed every `delay` milliseconds. This syntax is _not\n    recommended_ for the same reasons that make using `eval() a\n    security risk.\n- `delay` _**optional**_\n  - : The time, in milliseconds (thousandths of a second), the timer should delay in\n    between executions of the specified function or code. Defaults to 0 if not specified.\n    below for details on the permitted range of `delay` values.\n- `arg0, …, argN` _**optional**_\n  - : Additional arguments which are passed through to the function specified by\n    _func_ once the timer expires.\n\n### Return value\n\nThe returned `intervalID` is a numeric, non-zero value which identifies the\ntimer created by the call to `setInterval()`; this value can be passed to\n`clearInterval()` to cancel the interval.\n\nIt may be helpful to be aware that `setInterval()` and\n`setTimeout()` share the same pool\nof IDs, and that `clearInterval()` and\n`clearTimeout()` can technically\nbe used interchangeably. For clarity, however, you should try to always match them to\navoid confusion when maintaining your code.\n\n> **Note:** The `delay` argument is converted to a\n> signed 32-bit integer. This effectively limits `delay` to 2147483647 ms,\n> since it's specified as a signed integer in the IDL.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/setTimeout.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# setTimeout()\n\nThe global **`setTimeout()`** method sets a timer which executes a function or specified\npiece of code once the timer expires.\n\n## Syntax\n\n```js\nsetTimeout(code)\nsetTimeout(code, delay)\n\nsetTimeout(functionRef)\nsetTimeout(functionRef, delay)\nsetTimeout(functionRef, delay, param1)\nsetTimeout(functionRef, delay, param1, param2)\nsetTimeout(functionRef, delay, param1, param2, /* … ,*/ paramN)\n```\n\n### Parameters\n\n- `functionRef`\n  - : A `function` to be executed after the timer expires.\n- `code`\n  - : An alternative syntax that allows you to include a string instead of a function,\n    which is compiled and executed when the timer expires. This syntax is **not\n    recommended** for the same reasons that make using\n    `eval()` a security risk.\n- `delay` _**optional**_\n\n  - : The time, in milliseconds that the timer should wait before\n    the specified function or code is executed. If this parameter is omitted, a value of 0\n    is used, meaning execute \"immediately\", or more accurately, the next event cycle.\n\n- `param1`, …, `paramN` _**optional**_\n\n  - : Additional arguments which are passed through to the function specified by\n    `functionRef`.\n\n### Return value\n\nThe returned `timeoutID` is a positive integer value which\nidentifies the timer created by the call to `setTimeout()`. This value can be\npassed to `clearTimeout()` to\ncancel the timeout.\n\nIt is guaranteed that a `timeoutID` value will never be reused by a subsequent call to\n`setTimeout()` or `setInterval()` on the same object (a window or\na worker). However, different objects use separate pools of IDs.\n\n## Description\n\nTimeouts are cancelled using `clearTimeout()`.\n\nTo call a function repeatedly (e.g., every _N_ milliseconds), consider using\n`setInterval()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/structuredClone.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# structuredClone()\n\nThe global **`structuredClone()`** method creates a deep clone of a given value.\n\n## Syntax\n\n```js\nstructuredClone(value)\n```\n\n### Parameters\n\n- `value`\n  - : The object to be cloned.\n\n### Return value\n\nThe returned value is a deep copy of the original `value`.\n\n### Exceptions\n\n- `DataCloneError`\n  - : Thrown if any part of the input value is not serializable.\n\n## Description\n\nThis function can be used to deep copy JavaScript values.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/undefined.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# undefined\n\nThe global **`undefined`** property represents the primitive\nvalue `undefined`. It is one of JavaScript's \"primitive types\".\n\n## Value\n\nThe primitive value `undefined`.\n\n## Description\n\n`undefined` is a property of the _global object_. That is, it is a variable in global scope.\n\n`undefined` is a non-configurable, non-writable property.\n\nA variable that has not been assigned a value is of type `undefined`. A\nmethod or statement also returns `undefined` if the variable that is being\nevaluated does not have an assigned value. A function returns `undefined` if\na value was not explicitly returned.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/globals/unescape.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# unescape()\n\n> **Note:** `unescape()` is a non-standard function implemented by browsers and was only standardized for cross-engine compatibility. It is not required to be implemented by all JavaScript engines and may not work everywhere. Use [`decodeURIComponent()`](./decodeURIComponent.mdx) or [`decodeURI()`](./decodeURI.mdx) if possible.\n\nThe **`unescape()`** function computes a new string in which hexadecimal escape sequences are replaced with the characters that they represent. The escape sequences might be introduced by a function like [`escape()`](./escape.mdx).\n\n## Syntax\n\n```js\nunescape(str)\n```\n\n### Parameters\n\n- `str`\n  - : A string to be decoded.\n\n### Return value\n\nA new string in which certain characters have been unescaped.\n\n## Description\n\n`unescape()` is a function property of the global object.\n\nThe `unescape()` function replaces any escape sequence with the character that it represents. Specifically, it replaces any escape sequence of the form `%XX` or `%uXXXX` (where `X` represents one hexadecimal digit) with the character that has the hexadecimal value `XX`/`XXXX`. If the escape sequence is not a valid escape sequence (for example, if `%` is followed by one or no hex digit), it is left as-is.\n\n> **Note:** This function was used mostly for URL encoding and is partly based on the escape format in rfc(1738). The `unescape()` function does _not_ evaluate [escape sequences](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String#escape_sequences) in string literals. You can replace `\\xXX` with `%XX` and `\\uXXXX` with `%uXXXX` to get a string that can be handled by `unescape()`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/html-rewriter/Element/prototype/after.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# after\n\nThe `after` method inserts content after the closing tag of the element.\n\n## Syntax\n\n```js\nelement.after(content);\nelement.after(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to insert after the element's closing tag.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.after(\"World\");\n// Result: <div>Hello</div>World\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/html-rewriter/Element/prototype/append.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# append\n\nThe `append` method inserts content at the end of the element's content.\n\n## Syntax\n\n```js\nelement.append(content);\nelement.append(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to insert at the end of the element's content.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.append(\", World\");\n// Result: <div>Hello, World</div>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/html-rewriter/Element/prototype/before.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# before\n\nThe `before` method inserts content before the opening tag of the element.\n\n## Syntax\n\n```js\nelement.before(content);\nelement.before(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to insert before the element's opening tag.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.before(\"Well\");\n// Result: Well<div>Hello</div>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/html-rewriter/Element/prototype/hasAttribute.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# hasAttribute\n\nThe `hasAttribute` method returns a `boolean` value indicating whether the specified attribute is present on the element.\n\n## Syntax\n\n```js\nelement.hasAttribute(attributeName);\n```\n\n### Parameters\n\n- `attributeName` _: string_\n  - The name of the attribute to check for.\n\n### Return value\n\nA boolean value indicating whether the attribute is present.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/html-rewriter/Element/prototype/prepend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# prepend\n\nThe `prepend` method inserts content at the beginning of the element's content.\n\n## Syntax\n\n```js\nelement.prepend(content);\nelement.prepend(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to insert at the beginning of the element's content.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.prepend(\"Well, \");\n// Result: <div>Well, Hello</div>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/html-rewriter/Element/prototype/removeAttribute.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# removeAttribute\n\nThe `removeAttribute` method removes the specified attribute from the element.\n\n## Syntax\n\n```js\nelement.removeAttribute(attributeName);\n```\n\n### Parameters\n\n- `attributeName` _: string_\n  - The name of the attribute to remove.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/html-rewriter/Element/prototype/replaceChildren.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# replaceChildren\n\nThe `replaceChildren` method replaces the element's children with new content.\n\n## Syntax\n\n```js\nelement.replaceChildren(content);\nelement.replaceChildren(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to replace the element's children with.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.replaceChildren(\"Greetings!\");\n// Result: <div>Greetings!</div>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/html-rewriter/Element/prototype/replaceWith.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# replaceWith\n\nThe `replaceWith` method replaces the element with new content.\n\n## Syntax\n\n```js\nelement.replaceWith(content);\nelement.replaceWith(content, options);\n```\n\n### Parameters\n\n- `content` _: string_\n  - The content to replace the element with.\n\n- `options` _: ElementRewriterOptions_\n  - An optional object that can have the following properties:\n    - `escapeHTML` _: boolean_\n      - If `true`, any HTML markup in `content` will be escaped so it is safe to insert as text.\n\n### Examples\n\n```js\n// Assuming `e` is an Element representing <div>Hello</div>\ne.replaceWith(\"<p>Greetings!</p>\");\n// Result: <p>Greetings!</p>\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/html-rewriter/Element/prototype/selector.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# selector\n\nThe `selector` read-only property is a `string` representing the [CSS selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors) that matches the element.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/html-rewriter/Element/prototype/setAttribute.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# setAttribute\n\nThe `setAttribute` method sets the value of the specified attribute on the element. If the value already exists, it will be updated; otherwise, a new attribute with the specified name and value will be added to the element.\n\n## Syntax\n\n```js\nelement.setAttribute(attributeName, value);\n```\n\n### Parameters\n\n- `attributeName` _: string_\n  - The name of the attribute to set.\n- `value` _: string_\n  - The value to assign to the attribute.\n\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/html-rewriter/Element/prototype/tag.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# tag\n\nThe `tag` read-only property is a `string` representing the tag name of the element.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/html-rewriter/HTMLRewritingStream/HTMLRewritingStream.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `HTMLRewritingStream()`\n\nThe **`HTMLRewritingStream`** lets you rewrite HTML by registering callbacks on CSS selectors. When an element matching the selector is encountered, the rewriter calls your callback. This callback can manipulate the attributes of the element, and add or remove content from the immediate context.\n\n## Syntax\n\n```js\nnew HTMLRewritingStream()\n```\n\n### Return value\n\nA new `HTMLRewritingStream` object.\n\n## Examples\n\nIn this example, we fetch an HTML page and use the HTML rewriter to add an attribute to all `div` tags and prepend the text `Header:` to all `h1` tags:\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { HTMLRewritingStream } from 'fastly:html-rewriter';\n\nasync function handleRequest(event) {\n  let transformer = new HTMLRewritingStream()\n    .onElement(\"h1\", e => e.prepend(\"Header: \"))\n    .onElement(\"div\", e => e.setAttribute(\"special-attribute\", \"top-secret\"));\n  let body = (await fetch(\"https://example.com/\")).body.pipeThrough(transformer);\n\n  return new Response(body, {\n    status: 200,\n    headers: new Headers({\n      \"content-type\": \"text/html; charset=utf-8\",\n    })\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/html-rewriter/HTMLRewritingStream/prototype/onElement.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# onElement\n\n▸ **onElement**`(selector: string, handler: (element: Element) => void): this`\n\nRegisters an element handler with the [`HTMLRewritingStream`] that will be called for each [`Element`] that matches the [CSS selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors) `selector`.\n\nElements added by handlers will not be processed by other handlers.\n\n## Syntax\n\n```js\n.onElement(selector, handler)\n```\n\n### Parameters\n\n- `selector` _: string_\n  - A CSS selector that determines the elements for which `handler` will be called\n  - The following types of CSS selector are supported:\n\nCurrently the rewriter supports the following CSS selectors:\n\n| Pattern              | Description                                                                |\n|----------------------|----------------------------------------------------------------------------|\n| `*`                  | Any element                                                                |\n| `E`                  | All elements of type `E`                                                   |\n| `E F`                | `F` elements inside `E` elements                                           |\n| `E > F`              | `F` elements directly inside `E` elements                                  |\n| `E:nth-child(n)`     | The n-th child of type `E`                                                 |\n| `E:first-child`      | First child of type `E`                                                    |\n| `E:nth-of-type(n)`   | The n-th sibling of type `E`                                               |\n| `E:first-of-type`    | First sibling of type `E`                                                  |\n| `E:not(s)`           | Type `E` elements not matching selector `s`                                |\n| `E.myclass`          | Type `E` elements with class `\"myclass\"`                                   |\n| `E#myid`             | Type `E` elements with ID `\"myid\"`                                         |\n| `E[attr]`            | Type `E` elements with attribute `attr`                                    |\n| `E[attr=\"val\"]`      | Type `E` elements where `attr` is `\"val\"`                                  |\n| `E[attr=\"val\" i]`    | Type `E` elements where `attr` is `\"val\"`, case-insensitive                |\n| `E[attr=\"val\" s]`    | Type `E` elements where `attr` is `\"val\"`, case-sensitive                  |\n| `E[attr~=\"val\"]`     | Type `E` elements where `attr` contains `\"val\"` in a space-separated list  |\n| `E[attr`&#124`;=\"val\"]`| Type `E` elements where `attr` is hyphen-separated and starts with `\"val\"` |\n| `E[attr^=\"val\"]`     | Type `E` elements where `attr` starts with `\"val\"`                         |\n| `E[attr$=\"val\"]`     | Type `E` elements where `attr` ends with `\"val\"`                           |\n| `E[attr*=\"val\"]`     | Type `E` elements where `attr` contains `\"val\"`                            |\n\n- `handler` _: (element: Element) => void_\n  - A callback function that will be called once for each element that matches `selector`\n\n### Return value\n\nThe `HTMLRewritingStream`, so multiple calls to `onElement` can be chained.\n\n### Exceptions\n\n- `Error`\n  - If the provided `selector` is not a valid CSS selector.\n  - If the provided `handler` is not a function.\n\n## Examples\n\n\nIn this example, we fetch an HTML page and use the HTML rewriter to add an attribute to all `div` tags and prepend the text `Header:` to all `h1` tags:\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { HTMLRewritingStream } from 'fastly:html-rewriter';\n\nasync function handleRequest(event) {\n  let transformer = new HTMLRewritingStream()\n    .onElement(\"h1\", e => e.prepend(\"Header: \"))\n    .onElement(\"div\", e => e.setAttribute(\"special-attribute\", \"top-secret\"));\n  let body = (await fetch(\"https://example.com/\")).body.pipeThrough(transformer);\n\n  return new Response(body, {\n    status: 200,\n    headers: new Headers({\n      \"content-type\": \"text/html; charset=utf-8\",\n    })\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/image-optimizer/Auto.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Auto`\n\nEnumerator options for [`imageOptimizerOptions.auto`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `AVIF` (`\"avif\"`) If the browser's Accept header indicates compatibility, deliver an AVIF image.\n- `WEBP` (`\"webp\"`)\tIf the browser's Accept header indicates compatibility, deliver a WebP image.\n\n## Examples\n\n```js\nimport { Auto, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      auto: Auto.AVIF\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/image-optimizer/BWAlgorithm.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `BWAlgorithm`\n\nEnumerator options for [`imageOptimizerOptions.bw`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Threshold` (`\"threshold\"`) Uses a luminance threshold to convert the image to black and white.\n- `Atkinson` (`\"atkinson\"`)\tUses [Atkinson dithering](https://en.wikipedia.org/wiki/Atkinson_dithering) to convert the image to black and white.\n\n\n## Examples\n\n```js\nimport { Region, BWAlgorithm } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      bw: BWAlgorithm.Threshold\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/image-optimizer/CropMode.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `CropMode`\n\nEnumerator options for [`imageOptimizerOptions.crop.mode`](./imageOptimizerOptions.mdx) and `imageOptimizerOptions.precrop.mode`.\n\n## Constants\n\n- `Smart` (`\"smart\"`) Enables content-aware algorithms to attempt to crop the image to the desired aspect ratio while intelligently focusing on the most important visual content, including the detection of faces.\n- `Safe` (`\"safe\"`)\tAllow cropping out-of-bounds regions.\n\n## Examples\n\n```js\nimport { CropMode, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      crop: {\n        size: { ratio: { width: 4, height: 3 } },\n        mode: CropMode.Smart,\n      }\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/image-optimizer/Disable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Disable`\n\nEnumerator options for [`imageOptimizerOptions.disable`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Upscale` (`\"upscale\"`) Prevent images being resized such that the output image's dimensions are larger than the source image.\n\n## Examples\n\n```js\nimport { Disable, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      width: 2560,\n      disable: Disable.Upscale\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/image-optimizer/Enable.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Enable`\n\nEnumerator options for [`imageOptimizerOptions.enable`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Upscale` (`\"upscale\"`) Allow images to be resized such that the output image's dimensions are larger than the source image.\n\n## Examples\n\n```js\nimport { Enable, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      width: 2560,\n      enable: Enable.Upscale\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/image-optimizer/Fit.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Fit`\n\nEnumerator options for [`imageOptimizerOptions.fit`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Bounds` (`\"bounds\"`) Resize the image to fit entirely within the specified region, making one dimension smaller if needed.\n- `Cover` (`\"cover\"`) Resize the image to entirely cover the specified region, making one dimension larger if needed.\n- `Crop` (`\"crop\"`) Resize and crop the image centrally to exactly fit the specified region.\n\n## Examples\n\n```js\nimport { Fit, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      width: 150,\n      height; 150,\n      fit: Fit.Bounds\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/image-optimizer/Format.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Format`\n\nEnumerator options for [`imageOptimizerOptions.format`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Auto` (`\"auto\"`) Automatically use the best format based on browser support and image/transform characteristics\n- `AVIF` (`\"avif\"`) AVIF\n- `BJPG` (`\"bjpg\"`) Baseline JPEG \n- `GIF` (`\"gif\"`) Graphics Interchange Format\n- `JPG` (`\"jpg\"`) JPEG \n- `JXL` (`\"jxl\"`) JPEGXL \n- `MP4` (`\"mp4\"`) MP4 (H.264)\n- `PJPG` (`\"pjpg\"`) Progressive JPEG \n- `PJXL` (`\"pjxl\"`) Progressive JPEGXL\n- `PNG` (`\"png\"`) Portable Network Graphics\n- `PNG8` (`\"png8\"`) Portable Network Graphics palette image with 256 colors and 8-bit transparency\n- `SVG` (`\"svg\"`) Scalable Vector Graphics\n- `WEBP` (`\"webp\"`) WebP\n- `WEBPLL` (`\"webpll\"`) WebP (Lossless)\n- `WEBPLY` (`\"webply\"`) WebP (Lossy)\n\n## Examples\n\n```js\nimport { Format, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      format: Format.PNG\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/image-optimizer/Metadata.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Metadata`\n\nEnumerator options for [`imageOptimizerOptions.metadata`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Copyright` (`\"copyright\"`) Preserve [copyright notice](https://www.iptc.org/std/photometadata/specification/IPTC-PhotoMetadata#copyright-notice), creator, credit line, licensor, and web statement of rights fields.\n- `C2PA` (`\"c2pa\"`) Preserve the [C2PA manifest](https://c2pa.org/) and add any transformations performed by Fastly Image Optimizer.\n- `CopyRightAndC2PA` (`\"copyright,c2pa\"`) Resize and crop the image centrally to exactly fit the specified region.\n\n## Examples\n\n```js\nimport { Metadata, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      metadata: Metadata.Copyright\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/image-optimizer/Optimize.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Optimize`\n\nEnumerator options for [`imageOptimizerOptions.optimize`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Low` (`\"low\"`) Output image quality will be similar to the input image quality.\n- `Medium` (`\"medium\"`) More optimization is allowed. We attempt to preserve the visual quality of the input image.\n- `High` (`\"high\"`) Minor visual artifacts may be visible. This produces the smallest file.\n\n## Examples\n\n```js\nimport { Optimize, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      optimize: Optimize.High\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/image-optimizer/Orient.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Orient`\n\nEnumerator options for [`imageOptimizerOptions.orient`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Default` (`\"1\"`) \n- `FlipHorizontal` (`\"2\"`) \n- `FlipHorizontalAndVertical` (`\"3\"`) \n- `FlipVertical` (`\"4\"`) \n- `FlipHorizontalOrientLeft` (`\"5\"`) \n- `OrientRight` (`\"6\"`) \n- `FlipHorizontalOrientRight` (`\"7\"`) \n- `OrientLeft` (`\"8\"`) \n\n## Examples\n\n```js\nimport { Orient, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      orient: Orient.FlipHorizontal\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/image-optimizer/Profile.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Profile`\n\nEnumerator options for [`imageOptimizerOptions.profile`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Baseline` (`\"baseline\"`) The profile recommended for video conferencing and mobile applications. (Default)\n- `Main` (`\"main\"`) The profile recommended for standard-definition broadcasts.\n- `High` (`\"high\"`) The profile recommended for high-definition broadcasts.\n\n## Examples\n\n```js\nimport { Profile, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      profile: Profile.Main\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/image-optimizer/Region.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Region`\n\nEnumerator options for [`imageOptimizerOptions.region`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `UsEast` (`\"us_east\"`)\n- `UsCentral` (`\"us_central\"`)\n- `UsWest` (`\"us_west\"`)\n- `EuCentral` (`\"eu_central\"`)\n- `EuWest` (`\"eu_west\"`)\n- `Asia` (`\"asia\"`)\n- `Australia` (`\"australia\"`)\n\n\n## Examples\n\n```js\nimport { Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/image-optimizer/ResizeFilter.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `ResizeFilter`\n\nEnumerator options for [`imageOptimizerOptions.resizeFilter`](./imageOptimizerOptions.mdx).\n\n## Constants\n\n- `Nearest` (`\"nearest\"`) Uses the value of nearby translated pixel values.\n- `Bilinear` (`\"bilinear\"`) Uses an average of a 2x2 environment of pixels.\n- `Linear` (`\"linear\"`) Same as `Bilenear`.\n- `Bicubic` (`\"bicubic\"`) Uses an average of a 4x4 environment of pixels, weighing the innermost pixels higher.\n- `Cubic` (`\"cubic\"`) Same as `Bicubic`.\n- `Lanczos2` (`\"lanczos2\"`) Uses the Lanczos filter to increase the ability to detect edges and linear features within an image and uses sinc resampling to provide the best possible reconstruction.\n- `Lanczos3` (`\"lanczos3\"`) Lanczos3 uses a better approximation of the sinc resampling function. (Default)\n- `Lanczos` (`\"lanczos\"`) Same as `Lanczos3`.\n\n## Examples\n\n```js\nimport { ResizeFilter, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      width: 2560,\n      resizeFilter: ResizeFilter.Linear\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/image-optimizer/imageOptimizerOptions.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `imageOptimizerOptions` \n\nOptions specified in the [`Request`](../globals/Request/Request.mdx) constructor for running the [Fastly Image Optimizer](https://docs.fastly.com/products/image-optimizer). More detailed documentation on all Image Optimizer options is available in the [Image Optimizer reference docs](https://www.fastly.com/documentation/reference/io/).\n\n## Parameters\n\nAll parameters other than `region` are optional.\n\n- `region`: _[`Region`](./Region.mdx)_ Where image optimizations should occur.\n- `auto`: _[`Auto`](./Auto.mdx)_ Enable optimization features automatically.\n- `bgColor`: _[`Color`](#color)_ Set the background color of an image.\n- `blur`: _`number` (0.5-1000) or [`Percentage`](#percentage)_ Set the blurriness of the output image.\n- `brightness`: _`number` (-100-100)_ Set the brightness of the output image.\n- `bw`: _[`BWAlgorithm`](./BWAlgorithm.mdx)_ Convert an image to black and white.\n- `canvas`: _`Object`_ Increase the size of the canvas around an image.\n    - `size`: _[`Size`](#size)_\n    - `position` (optional): _[`Position`](#position)_\n- `contrast`: _`number` (-100-100)_ Set the contrast of the output image.\n- `crop`: _`Object`_ Remove pixels from an image.\n    - `size`: _[`Size`](#size)_\n    - `position` (optional): _[`Position`](#position)_\n    - `mode` (optional): _[`CropMode`](./CropMode.mdx)_\n- `disable`: _[`Disable`](./Disable.mdx)_ Disable functionality that is enabled by default.\n- `dpr`: `number` Ratio between physical pixels and logical pixels.\n- `enable`: _[`Enable`](./Enable.mdx)_ Enable functionality that is disabled by default.\n- `fit`: _[`Fit`](./Fit.mdx)_ Set how the image will fit within the size bounds provided.\n- `format`: _[`Format`](./Format.mdx)_ Specify the output format to convert the image to.\n- `frame`: _`number` (must have the value 1)_ Extract the first frame from an animated image sequence.\n- `height`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ Resize the height of the image.\n- `level`: _`String` containing one of the [allowed values](https://www.fastly.com/documentation/reference/io/level/#allowed-values)_ Specify the level constraints when converting to video.\n- `metadata`: _[`Metadata`](./Metadata.mdx)_ Control which metadata fields are preserved during transformation.\n- `optimize`: _[`Optimize`](./Optimize.mdx)_ Automatically apply optimal quality compression.\n- `orient`: _[`Orient`](./Orient.mdx)_ Change the cardinal orientation of the image.\n- `pad`: _[`Sides`](#sides)_ Add pixels to the edge of an image.\n- `precrop`: _`Object`_ Remove pixels from an image before any other transformations occur.\n    - `size`: _[`Size`](#size)_\n    - `position`: _[`Position`](#position)_\n    - `mode`: _[`CropMode`](./CropMode.mdx)_\n- `profile`: _[`Profile`](./Profile.mdx)_ Specify the profile class of application when converting to video.\n- `quality`: _`integer` (1-100)_ Optimize the image to the given compression level for lossy file formatted images.\n- `resizeFilter`: _[`ResizeFilter`](./ResizeFilter.mdx)_ Specify the resize filter used when resizing images.\n- `saturation`: _`number` (-100-100)_ Set the saturation of the output image.\n- `sharpen`: _`Object`_ Set the sharpness of the output image.\n    - `amount`: _`number` (0-10)_\n    - `radius`: _`number` (0.5-1000)_\n    - `threshold`: _`integer` (0-255)_\n- `trim`: _[`Sides`](#sides)_ Remove pixels from the edge of an image.\n- `viewbox`: _`number` (must have the value 1)_ Remove explicit width and height properties in SVG output.\n- `width`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ Resize the width of the image.\n\n## Types\n\n### Color\n\nEither:\n\n- a 3 or 6 character hexadecimal string\n- an `Object` containing:\n    - `r`: _`integer` (0-255)_ Red component\n    - `g`: _`integer` (0-255)_ Green component\n    - `b`: _`integer` (0-255)_ Blue component\n    - `a` (optional): _`number` (0.0-1.0)_ Alpha component \n\n### Percentage\n\nA `String` containing a number suffixed with a percent sign (%).\n\n### Position\n\nAn `Object` containing:\n\n- Exactly one of:\n    - `x`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ \n    - `offsetX`: _`number` (interpreted as a percentage)_\n- Exactly one of: \n    - `y`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ \n    - `offsetY`: _`number` (interpreted as a percentage)_\n\n### Sides\n\nAn `Object` containing `top`, `bottom`, `left`, and `right`, all of which are either an `integer` or [`Percentage`](#percentage).\n\n### Size\n\nAn `Object` containing either:\n\n- `absolute`: _`Object`_\n    - `width`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ \n    - `height`: _`integer` (number of pixels) or [`Percentage`](#percentage)_ \n- `ratio`: _`Object`_\n    - `width`: _`number`_\n    - `height`: _`number`_\n\n## Examples\n\n```js\nimport { Format, Orient, CropMode, Region } from 'fastly:image-optimizer';\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n\nasync function handleRequest(event) {\n  return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n    imageOptimizerOptions: {\n      region: Region.UsEast,\n      format: Format.PNG,\n      bgColor: {\n        'r': 100,\n        'g': 255,\n        'b': 9,\n        'a': 0.5\n      },\n      blur: '1%',\n      brightness: -20,\n      contrast: -20,\n      height: 600,\n      level: '4.0',\n      orient: Orient.FlipVertical,\n      saturation: 80,\n      sharpen: { 'amount': 5, 'radius': 6, 'threshold': 44 },\n      canvas: { 'size': { 'absolute': { 'width': 400, 'height': 400 } } },\n      crop: { size: { absolute: { width: 200, height: 200 }, mode: CropMode.Safe } },\n      trim: { top: 10, left: 10, right: 10, bottom: 10 },\n      pad: { top: 30, left: 30, right: \"1%\", bottom: 30 }\n    },\n    backend: 'w3'\n  });\n}\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/index.mdx",
    "content": "---\nsidebar_position: 1\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n\n# JavaScript for Fastly Compute\n\nThis site is the full SDK reference for [`@fastly/js-compute`](https://www.npmjs.com/package/%40fastly/js-compute), the module that provides the interface between your JavaScript code and the [Fastly Compute](https://www.fastly.com) platform.\n\nIf you haven't used Fastly Compute before, start by [setting up your first Fastly Compute program](https://developer.fastly.com/learning/compute/) over on **developer.fastly.com** so that you have a working development environment.\n\nTo learn more about the fundamentals of using JavaScript with Fastly Compute, see our [using JavaScript](https://developer.fastly.com/learning/compute/javascript/) guide.\n\n## Understanding the JavaScript SDK\n\nIncoming HTTP requests to [domains that are attached to your Fastly service](https://developer.fastly.com/learning/concepts/) will start an instance of your application and invoke a `fetch` event, which can be bound using the `addEventListener` function:\n\n```js\naddEventListener(\"fetch\", event => event.respondWith(handleRequest(event)) );\n\nasync function handleRequest(event) {\n  const req = event.request;\n\n  return fetch(req, {\n    backend: \"example_backend\"\n  });\n}\n```\n\nFastly specific features are available as named imports from `fastly:` prefixed modules, all of which are documented in this site.  For example, the [env](https://js-compute-reference-docs.edgecompute.app/docs/fastly:env/env) function provides access to [environment variables](https://developer.fastly.com/reference/compute/ecp-env/) and can be imported into your application like this:\n\n```js\nimport { env } from \"fastly:env\"\n```\n\nJavaScript code compiled for Fastly Compute has access to a global environment with most of the globals you would expect in an ECMAScript runtime, like [`Date`](https://js-compute-reference-docs.edgecompute.app/docs/globals/Date/) and [`console`](https://js-compute-reference-docs.edgecompute.app/docs/globals/console/log).\n\n## Trying things out\n\n[Fastly fiddle](https://fiddle.fastly.dev) is an online web-based playground where you can run Fastly code.  You'll see fiddles included in many pages of our [developer hub](https://developer.fastly.com) and this SDK reference. These interactive examples can be executed right on the page by clicking the **RUN** tab:\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^1.0.1\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nasync function app(event) {\n    const request = event.request;\n    return new Response(\"You made a request to \" + request.url)\n}\naddEventListener(\"fetch\", event => {\n  event.respondWith(app(event));\n});\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nasync function app(event) {\n    const request = event.request;\n    return new Response(`You made a request to ${request.url}`)\n}\n\naddEventListener(\"fetch\", event => {\n  event.respondWith(app(event));\n});\n\n```\n\n</Fiddle>\n\nCheck out [`fiddle.fastly.dev`](https://fiddle.fastly.dev) to create your own.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/kv-store/KVStore/KVStore.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `KVStore()`\n\nThe **`KVStore` constructor** lets you connect your Fastly Compute application to a Fastly KV store.\n\nA Fastly KV store is a persistent, globally consistent key-value store. See [Data stores for Fastly services](https://developer.fastly.com/learning/concepts/edge-state/data-stores#kv-stores) for initialization and usage details.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew KVStore(name)\n```\n\n> **Note:** `KVStore()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Define a KV store instance using the resource link name.\n  \n### Return value\n\nA new `KVStore` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no KV Store exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name does not start with an ascii alphabetical character \n  - Thrown if the provided name contains control characters `(\\u0000-\\u001F)`\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then read back the value and return it to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/kv-store/KVStore/prototype/delete.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# KVStore.prototype.delete\n\nDeletes the value associated with the key `key` in the KV store.\n\n## Syntax\n\n```js\ndelete(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the KV-store.\n\n### Return value\n\nReturns `undefined`\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is any of the strings `\"\"`, `\".\"`, or `\"..\"`\n    - Starts with the string `\".well-known/acme-challenge/\"`\n    - Contains any of the characters `\"#;?^|\\n\\r\"`\n    - Is longer than 1024 characters\n    - Does not exist\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then delete the entry.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n  await files.delete('hello')\n\n  const entry = await files.get('hello')\n  if (entry) {\n    return new Response(await entry.text())\n  } else {\n    return new Response('no file named hello exists')\n  }\n\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/kv-store/KVStore/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# KVStore.prototype.get\n\n▸ **get**(): `string`\n\nGets the value associated with the key `key` in the KV store.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the KV-store.\n\n### Return value\n\nIf the key does not exist in the KV store, this returns a `Promise` which resolves with `null`.\n\nIf the key does exist in the KV store, this returns a `Promise` which resolves with an `KVStoreEntry`.\n\n## Description\n\nSend the given message, converted to a string, to this KVStore instance's endpoint.\n\nThe `get()` method requires its `this` value to be a [`KVStore`](../KVStore.mdx) object.\n\nIf the `this` value does not inherit from `KVStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is any of the strings `\"\"`, `\".\"`, or `\"..\"`\n    - Starts with the string `\".well-known/acme-challenge/\"`\n    - Contains any of the characters `\"#;?^|\\n\\r\"`\n    - Is longer than 1024 characters\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then read back the value and return it to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/kv-store/KVStore/prototype/list.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStore.prototype.list\n\nThe **`list()`** can be used to list the keys of a store.\n\n## Syntax\n\n```js\nlist(options?)\n```\n\n### Parameters\n\n- `options` _: object_ _**optional**_\n  - List options supporting properties:\n  - `cursor` _: string_ _**optional**_\n    - The cursor used to pick up from a previous iteration.\n  - `limit` _: number_ _**optional**_\n    - The maximum number of keys to return.\n  - `prefix` _: string_ _**optional**_\n    - List only those keys that start with the given string prefix.\n  - `noSync` _: boolean_ _**optional**_\n    - Do not sync the key list first, instead provide a possibly out-of-date listing. May be faster but inconsistent.\n\n### Return value\n\nReturns a `Promise` which resolves with `{ list: string[], cursor: string | undefined }`.\n\n## Example\n\nIn this example we list the keys of a KV Store named `'files'`, iterating 10 at a time, counting the total;\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from 'fastly:kv-store';\n\nasync function app(event) {\n  const files = new KVStore('files');\n\n  let cursor,\n    list,\n    total = 0;\n  do {\n    ({ cursor, list } = await files.list({ limit: 10, cursor }));\n    total += list?.length;\n  } while (list);\n\n  return new Response(`Iterated ${total} entries`);\n}\n\naddEventListener('fetch', (event) => event.respondWith(app(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/kv-store/KVStore/prototype/put.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# KVStore.prototype.put\n\nThe **`put()`** method stores a `value` into the KV store under a `key`.\n\n> **Note**: KV stores are eventually consistent, this means that the updated contents associated with the key `key` may not be available to read from all edge locations immediately and some edge locations may continue returning the previous contents associated with the key.\n\n## Syntax\n\n```js\nput(key, value, options?)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to store the supplied value under within the KV store.\n- `value` _:  ArrayBuffer | TypedArray | DataView| ReadableStream | URLSearchParams | String | string literal_\n  - The value to store within the KV store.\n- `options` _: object_ _**optional**_\n  - An insert options parameter, supporting:\n  - `metadata` _: ArrayBuffer | TypedArray | DataView_ _**optional**_\n    - Binary metadata associated with the entry, may be up to 1000 bytes.\n  - `ttl` _: number_ _**optional**_\n    - TTL for the entry\n  - `mode` _: 'overwrite' | 'add' | 'append' | 'prepend'_ _**optional**_\n    - Insert mode, defaults to 'overwrite'\n  - `gen` _: number_ _**optional**_\n    - 'generation' header specific to the version of an entry key\n\n### Return value\n\nReturns a `Promise` which resolves with `undefined` when the provided `value` has been written into the KV store.\n\n## Description\n\nStores the supplied `value` into the KV store under the supplied `key`.\n\nThe `put()` method requires its `this` value to be a [`KVStore`](../KVStore.mdx) object.\n\nIf the `this` value does not inherit from `KVStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is any of the strings `\"\"`, `\".\"`, or `\"..\"`\n    - Starts with the string `\".well-known/acme-challenge/\"`\n    - Contains any of the characters `\"#;?^|\\n\\r\"`\n    - Is longer than 1024 characters\n- `TypeError`\n  - If the provided `gen`:\n    - Is not an number\n\n## Examples\n\nIn this example we connect to an KV Store named `'files'` and save an entry to the store under the key `'hello'` and then read back the value and return it to the client.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { KVStore } from \"fastly:kv-store\";\n\nasync function app(event) {\n  const files = new KVStore('files')\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/kv-store/KVStoreEntry/prototype/arrayBuffer.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.arrayBuffer()\n\nThe `arrayBuffer()` method of the `KVStoreEntry` interface takes a `KVStoreEntry` stream and reads it to completion. It returns a promise that resolves with an `ArrayBuffer`.\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA promise that resolves with an `ArrayBuffer`."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/kv-store/KVStoreEntry/prototype/body.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.body\n\nThe `body` read-only property of the `KVStoreEntry` interface is a `ReadableStream` of the body contents.\n\n## Value\n\nA `ReadableStream`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/kv-store/KVStoreEntry/prototype/bodyUsed.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.bodyUsed\n\nThe `bodyUsed` read-only property of the `KVStoreEntry` interface is a `boolean` value that indicates whether the body has been read yet.\n\n## Value\n\nA boolean value.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/kv-store/KVStoreEntry/prototype/json.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.json()\n\nThe `json()` method of the `KVStoreEntry` interface takes a `KVStoreEntry` stream and reads it to completion. It returns a promise which resolves with the result of parsing the body text as JSON.\n\nNote that despite the method being named `json()`, the result is not JSON but is instead the result of taking JSON as input and parsing it to produce a JavaScript object.\n\n## Syntax\n\n```js\njson()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a JavaScript object. This object could be anything that can be represented by JSON — an object, an array, a string, a number…\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/kv-store/KVStoreEntry/prototype/metadata.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.metadata()\n\nThe `metadata()` method of the `KVStoreEntry` interface provides the binary metadata associated with the `KVStoreEntry`.\n\nThe metadata binary may be up to 1000 bytes, and is returned as a `Uint8Array` TypedArray buffer, if metadata is set, or null otherwise.\n\n## Syntax\n\n```js\nmetadata()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a `Uint8Array` buffer object.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/kv-store/KVStoreEntry/prototype/metadataText.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.metadataText()\n\nThe `metadataText()` method of the `KVStoreEntry` interface provides a String interpretation of binary metadata associated with the `KVStoreEntry`.\n\nIf the binary data is not a valid string, an encoding error will be thrown.\n\n## Syntax\n\n```js\nmetadataText()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves to a String.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/kv-store/KVStoreEntry/prototype/text.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# KVStoreEntry.text()\n\nThe `text()` method of the `KVStoreEntry` interface takes a `KVStoreEntry` stream and reads it to completion. It returns a promise that resolves with a `String`. The `KVStoreEntry `is always decoded using UTF-8.\n\n## Syntax\n\n```js\ntext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA `Promise` that resolves with a `String`."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/logger/Logger/Logger.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Logger()`\n\nThe **`Logger` constructor** lets you connect your Fastly Compute application to a [Fastly Named Logger](https://developer.fastly.com/learning/integrations/logging/).\n\n## Syntax\n\n```js\nnew Logger(name)\n```\n\n> **Note:** `Logger()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - The Fastly Logger which should be associated with this Logger instance\n\n### Return value\n\nA new `Logger` object.\n\n## Examples\n\nIn this example we have a create a logger named `\"splunk\"` and logs the incoming request method and destination.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Logger Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^3\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nasync function app (event) {\n  let logger = new Logger(\"splunk\");\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nconst logger = new Logger(\"splunk\");\nasync function app (event) {\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/logger/Logger/prototype/log.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# Logger.prototype.log\n\n▸ **log**(): `string`\n\nSends the given message, converted to a string, to this Logger instance's endpoint.\n\n**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nlog(message)\n```\n\n### Return value\n\n`undefined`.\n\n## Description\n\nSend the given message, converted to a string, to this Logger instance's endpoint.\n\nThe `log()` method requires its `this` value to be a [`Logger`](../Logger.mdx) object.\n\nIf the `this` value does not inherit from `Logger.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n## Examples\n\nIn this example we have a create a logger named `\"splunk\"` and logs the incoming request method and destination.\n\n<Fiddle config={{\n  \"type\": \"javascript\",\n  \"title\": \"Logger.prototype.log Example\",\n  \"origins\": [\n    \"https://http-me.fastly.dev\"\n  ],\n  \"src\": {\n    \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^3\\\"\\n}\",\n    \"main\": `\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nlet logger = new Logger(\"splunk\");\nasync function app (event) {\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n`\n  },\n  \"requests\": [\n    {\n      \"enableCluster\": true,\n      \"enableShield\": false,\n      \"enableWAF\": false,\n      \"method\": \"GET\",\n      \"path\": \"/status=200\",\n      \"useFreshCache\": false,\n      \"followRedirects\": false,\n      \"tests\": \"\",\n      \"delay\": 0\n    }\n  ],\n  \"srcVersion\": 1\n}}>\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\nimport { Logger } from \"fastly:logger\";\nasync function app (event) {\n  let logger = new Logger(\"splunk\");\n  logger.log(JSON.stringify({\n    method: event.request.method,\n    url: event.request.url\n  }));\n  return new Response('OK');\n}\naddEventListener(\"fetch\", event => event.respondWith(app(event)));\n```\n\n</Fiddle>"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/logger/configureConsole.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# configureConsole\n\nThe **`configureConsole()`** function allows configuring the behaviour of the `console` global JS logger.\n\n## Syntax\n\n```js\nconfigureConsole(loggingOptions)\n```\n\n### Parameters\n\n- `loggingOptions` _: object_\n  - \n  - The name has to be between 1 and 254 characters inclusive.\n  - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n\n## Examples\n\nIn this example, we disable prefixing for `console.log` and use `stderr` output for `console.error`:\n\n```js\nimport { configureConsole } from \"fastly:logger\";\n\nconfigureConsole({\n  prefixing: false,\n  stderr: true\n});\n\nasync function handleRequest(event) {\n  console.log(JSON.stringify(event.request.headers));\n  const url = new URL(event.request.url);\n  try {\n    validate(url);\n  } catch (e) {\n    console.error(`Validation error: ${e}`);\n    return new Response('Bad Request', { status: 400 });\n  }\n  return new Response('OK');\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/migration-guide/index.mdx",
    "content": "---\nsidebar_position: 1\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# `Migrating from v2 to v3`\n\n## SimpleCache.delete renamed to SimpleCache.purge and requires purge options to be supplied as the second parameter\n\nWe are renaming because \"purge\" is already a well-known and documented concept for removing content from Fastly's cache.\n\nThe new addition of a second argument allows the caller to decide what scope to purge the content from, currently they can choose to purge from all of Fastly (\"global\") or from the POP that contains the currently executing instance (\"pop\"). We do not provide a default option right now, in the future we may provide a default option, if we discover a common pattern is being used.\n\nHere is an example of migrating an application using `SimpleCache.delete` to `SimpleCache.purge` with the same purging behaviour:\n```diff\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SimpleCache } from 'fastly:cache';\n\naddEventListener('fetch', event => event.respondWith(app(event)));\n\nasync function app(event) {\n  const url = new URL(event.request);\n  const path = url.pathname;\n  if (url.searchParams.has('delete')) {\n-    SimpleCache.delete(path);\n+    SimpleCache.purge(path, { scope: \"global\" });\n    return new Response(page, { status: 204 });\n  }\n\n  let page = SimpleCache.getOrSet(path, async () => {\n    return {\n      value: await render(path),\n      // Store the page in the cache for 1 minute.\n      ttl: 60\n    }\n  });\n  return new Response(page, {\n    headers: {\n      'content-type': 'text/plain;charset=UTF-8'\n    }\n  });\n}\n\nasync function render(path) {\n  // expensive/slow function which constructs and returns the contents for a given path\n  await new Promise(resolve => setTimeout(resolve, 10_000));\n  return path;\n}\n\n\n```\n\n\n# `Migrating from v1 to v2`\n\n## ObjectStore renamed to KVStore\n\nWe have renamed the `ObjectStore` class to `KVStore`, and the module name from `fastly:object-store` to `fastly:kv-store`.\n\nYou will need to update your code to use the new class name and module name.\n\nBelow is the change that would need to be made for the imported module name:\n```diff\n- import { ObjectStore } from 'fastly:object-store';\n+ import { KVStore } from 'fastly:kv-store';\n```\n\nAnd this is the change that would need to be made for constructing an instance of the class:\n```diff\n- const store = new ObjectStore('my-store');\n+ const store = new KVStore('my-store');\n```\n\n\nHere is a full example of migrating an application from ObjectStore to KVStore:\n```diff\n/// <reference types=\"@fastly/js-compute\" />\n\n- import { ObjectStore } from 'fastly:object-store';\n+ import { KVStore } from 'fastly:kv-store';\n\nasync function app(event) {\n-   const files = new ObjectStore('files');\n+   const files = new KVStore('files');\n\n  await files.put('hello', 'world')\n\n  const entry = await files.get('hello')\n\n  return new Response(await entry.text())\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n```"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/secret-store/SecretStore/SecretStore.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `SecretStore()`\n\nThe **`SecretStore` constructor** lets you connect your Fastly Compute application to a Fastly Secret store.\n\nA secret store is a persistent, globally distributed store for secrets accessible to Fastly Compute services during request processing.\n\n>**Note**: Can only be used when processing requests, not during build-time initialization.\n\n## Syntax\n\n```js\nnew SecretStore(name)\n```\n\n> **Note:** `SecretStore()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Parameters\n\n- `name` _: string_\n  - Define a Secret Store instance using the resource link name.\n  \n### Return value\n\nA new `SecretStore` object.\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Secret Store exists with the provided name\n  - Thrown if the provided name is longer than 255 in length\n  - Thrown if the provided name is an empty string\n  - Thrown if the provided name contains characters other than letters, numbers, dashes (-), underscores (_), and periods (.)\n\n## Examples\n\nIn this example we connect to a Secret Store named `'secrets'` and retrieve a secret named `'cat-api-key'` use the value in a Request header.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SecretStore } from \"fastly:secret-store\";\n\nasync function app(event) {\n  const secrets = new SecretStore('secrets')\n\n  const catApiKey = await secrets.get('cat-api-key')\n\n  return fetch('/api/cat', {\n    headers: {\n      'cat-api-key': catApiKey.plaintext()\n    }\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/secret-store/SecretStore/fromBytes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# fromBytes\n\nThe **`fromBytes()`** function is used to create an in-memory secret from an array buffer.\n\n>**Note**: This API should be avoided when possible, by instead using [SecretStore.prototype.get](./prototype/get.mdx) to obtain secure secrets.\n\n## Syntax\n\n```js\nfromBytes(new Uint8Array([1, 2, 3]))\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nReturns a `SecretStoreEntry`.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/secret-store/SecretStore/prototype/get.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SecretStore.prototype.get\n\n▸ **get**(): `string`\n\nGets the value associated with the key `key` in the Secret store.\n\n## Syntax\n\n```js\nget(key)\n```\n\n### Parameters\n\n- `key` _: string_\n  - The key to retrieve from within the Secret Store.\n\n### Return value\n\nIf the key does not exist in the Secret Store, this returns a `Promise` which resolves with `null`.\n\nIf the key does exist in the Secret Store, this returns a `Promise` which resolves with an `SecretStoreEntry`.\n\n## Description\n\nSend the given message, converted to a string, to this SecretStore instance's endpoint.\n\nThe `get()` method requires its `this` value to be a [`SecretStore`](../SecretStore.mdx) object.\n\nIf the `this` value does not inherit from `SecretStore.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n### Exceptions\n\n- `TypeError`\n  - If the provided `key`:\n    - Is an empty string\n    - Is longer than 255 characters\n    - Contains characters other than letters, numbers, dashes (-), underscores (_), and periods (.)\n\n## Examples\n\nIn this example we connect to a Secret Store named `'secrets'` and retrieve a secret named `'cat-api-key'` use the value in a Request header.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SecretStore } from \"fastly:secret-store\";\n\nasync function app(event) {\n  const secrets = new SecretStore('secrets')\n\n  const catApiKey = await secrets.get('cat-api-key')\n\n  return fetch('/api/cat', {\n    headers: {\n      'cat-api-key': catApiKey.plaintext()\n    }\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/secret-store/SecretStoreEntry/prototype/plaintext.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SecretStoreEntry.prototype.plaintext\n\n▸ **plaintext**(): `string`\n\nReturns the plaintext contents of the SecretStoreEntry instance as String.\n\n## Syntax\n\n```js\nplaintext()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA String\n\n### Exceptions\n\nThe `plaintext()` method requires its `this` value to be a `SecretStoreEntry` object.\nIf the `this` value does not inherit from `SecretStoreEntry.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n\n## Examples\n\nIn this example we connect to a Secret Store named `'secrets'` and retrieve a secret named `'cat-api-key'` use the value in a Request header.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { SecretStore } from \"fastly:secret-store\";\n\nasync function app(event) {\n  const secrets = new SecretStore('secrets')\n\n  const catApiKey = await secrets.get('cat-api-key')\n\n  return fetch('/api/cat', {\n    headers: {\n      'cat-api-key': catApiKey.plaintext()\n    }\n  })\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/secret-store/SecretStoreEntry/prototype/rawBytes.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# SecretStoreEntry.prototype.rawBytes\n\n▸ **rawBytes**(): `Uint8Array`\n\nReturns the raw byte contents of the SecretStoreEntry instance as a Uint8Array.\n\n## Syntax\n\n```js\nrawBytes()\n```\n\n### Parameters\n\nNone.\n\n### Return value\n\nA Uint8Array\n\n### Exceptions\n\nThe `rawBytes()` method requires its `this` value to be a `SecretStoreEntry` object.\nIf the `this` value does not inherit from `SecretStoreEntry.prototype`, a [`TypeError`](../../../globals/TypeError/TypeError.mdx) is thrown.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/security/inspect.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# inspect\n\nThe **`inspect()`** function inspects a request using the [Fastly Next-Gen WAF](https://docs.fastly.com/en/ngwaf/).\n\n## Syntax\n\n```js\ninspect(request, config);\n```\n\n### Parameters\n\n- `request` _: Request_\n  - The Request to get a WAF determination for.\n- `config` _: object_\n  - `corp` _: string_\n    - Set a corp name for the configuration.\n    - This parameter is currently required.\n  - `workspace` _: string_\n    - Set a workspace name for the configuration.\n    - This parameter is currently required.\n  - `overrideClientIp` _: string_\n    - Specify an explicit client IP address to inspect.\n    - By default, `inspect` will use the IP address that made the request to the\n      running Compute service, but you may want to use a different IP when\n      service chaining or if requests are proxied from outside of Fastly’s\n      network.\n\n### Return value\n\nReturns an `Object` with the `inspect` response, with the following fields:\n\n- `waf_response` _: number_\n  - Security status code.\n  \n- `redirect_url` _: string | null_\n  - A redirect URL returned from Security.\n\n- `tags` _: string[]_\n  - Tags returned by Security.\n\n- `verdict` _: string_\n  - The outcome of inspecting a request with Security. It can be one of the following:\n    - `\"allow\"`\n      - Security indicated that this request is allowed.\n    - `\"block\"`\n      - Security indicated that this request should be blocked.\n    - `\"unauthorized\"`\n      - Security indicated that this service is not authorized to inspect a request.\n    - Other verdicts may be returned but not currently documented.\n\n- `decision_ms` _: number_\n  - How long Security spent determining its verdict, in milliseconds.\n  \n## Examples\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n\nimport { inspect } from \"fastly:security\";\n\nasync function app(event) {\n  const res = inspect(event.request, {\n    corp: \"mycorp\",\n    workspace: \"myws\"\n  });\n  switch (res.verdict) {\n    case \"allow\":\n      return await fetch(event.request);\n    case \"block\":\n      return new Response(\"Request Blocked\", { status: 400 });\n    case \"unauthorized\":\n      return new Response(\"Unauthorized\", { status: 401 });\n    default:\n      return new Response(\"idk\", { status: 500 });\n  }\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/shielding/Shield/Shield.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# `Shield()`\n\nLoad information about the given shield.\n\nReturns an object representing the shield if it is active, or throws an exception if the string is malformed or the shield doesn’t exist.\n\nShield names are defined on [this webpage](https://www.fastly.com/documentation/guides/concepts/shielding/#shield-locations), in the “shield code” column. For example, the string “pdx-or-us” will look up our Portland, OR, USA shield site, while “paris-fr” will look up our Paris site.\n\nIf you are using a major cloud provider for your primary origin site, consider looking at the “Recommended for” column, to find the Fastly POP most closely located to the given cloud provider.\n\n## Syntax\n\n```js\nnew Shield(name)\n```\n\n> **Note:** `Shield()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).\n\n### Exceptions\n\n- `TypeError`\n  - Thrown if no Shield exists with the provided name\n\n## Examples\n\nIn this example, we create a Shield instance for the Sydney, Australia shield POP. If the code is running on that shield POP, it fetches directly from origin. Otherwise, it routes the request through the shield using an encrypted connection.\n\n```js\n/// <reference types=\"@fastly/js-compute\" />\n    \nimport { Shield } from \"fastly:shielding\";\n\nasync function app(event) {\n    const shield = new Shield('wsi-australia-au');\n    // If running on the shield POP, fetch from the origin directly\n    if (shield.runningOn()) {\n        return await fetch('https://http-me.fastly.com/anything', { backend: 'httpme' });\n    }\n    // Otherwise, route the request through the shield using an encrypted connection\n    return await fetch(event.request, { backend: shield.encryptedBackend() });\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n```\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/shielding/Shield/prototype/encryptedBackend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Shield.prototype.encryptedBackend\n\n▸ **encryptedBackend**(configuration?): `Backend`\n\nReturns a `Backend` representing an encrypted connection to the POP.\n\nFor reference, this is almost always the backend that you want to use. Only use [`Shield::unencryptedBackend`](./unencryptedBackend.mdx) in situations in which you are 100% sure that all the data you will send and receive over the backend is already encrypted.\n\n## Parameters\n\n- `configuration` _: object_ _**optional**_\n  - `firstByteTimeout` _: number_ _**optional**_\n    - An optional first byte timeout (in milliseconds) to set on the returned backend.\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/shielding/Shield/prototype/runningOn.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Shield.prototype.runningOn\n\n▸ **runningOn**(): `boolean`\n\nReturns whether we are currently operating on the given shield.\n\nTechnically, this may also return true in very isolated incidents in which Fastly is routing traffic from the target shield POP to the POP that this code is running on, but in these situations the results should be approximately identical.\n\n(For example, it may be the case that you are asking to shield to ‘pdx-or-us’. But, for load balancing, performance, or other reasons, Fastly is temporarily shifting shielding traffic from Portland to Seattle. In that case, this function may return true for hosts running on ‘bfi-wa-us’, our Seattle site, because effectively the shield has moved to that location. This should give you a slightly faster experience than the alternative, in which this function would return false, you would try to forward your traffic to the Portland site, and then that traffic would be caught and redirected back to Seattle.)\n"
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/shielding/Shield/prototype/unencryptedBackend.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n# Shield.prototype.unencryptedBackend\n\n▸ **unencryptedBackend**(configuration?): `Backend`\n\nReturns a `Backend` representing an unencrypted connection to the POP.\n\nGenerally speaking, we encourage users to use [`Shield::encryptedBackend`](./encryptedBackend.mdx) instead of this function. Data sent over this backend – the unencrypted version – will be sent over the open internet, with no protections. In most cases, this is not what you want. However, in some cases – such as when you want to ship large data blobs that you know are already encrypted — using these backends can prevent a double-encryption performance penalty.\n\n## Parameters\n\n- `configuration` _: object_ _**optional**_\n  - `firstByteTimeout` _: number_ _**optional**_\n    - An optional first byte timeout (in milliseconds) to set on the returned backend."
  },
  {
    "path": "documentation/versioned_docs/version-3.41.2/websocket/createWebsocketHandoff.mdx",
    "content": "---\nhide_title: false\nhide_table_of_contents: false\npagination_next: null\npagination_prev: null\n---\n\n# createWebsocketHandoff\n\nThe **`createWebsocketHandoff()`** function creates a Response instance which informs Fastly to pass the original Request through Websocket, to the declared backend.\n\n## Syntax\n\n```js\ncreateWebsocketHandoff(request, backend)\n```\n\n### Parameters\n\n- `request` _: Request_\n  - The request to pass through Websocket.\n- `backend` _: string_\n  - The name of the backend that Websocket should send the request to.\n  - The name has to be between 1 and 254 characters inclusive.\n  - Throws a [`TypeError`](../globals/TypeError/TypeError.mdx) if the value is not valid. I.E. The value is null, undefined, an empty string or a string with more than 254 characters.\n\n### Return value\n\nA Response instance is returned, which can then be used via `event.respondWith`.\n\n## Examples\n\nIn this example application requests to the path `/stream` and sent handled via Websocket.\n\n```js\nimport { createWebsocketHandoff } from \"fastly:websocket\";\n\nasync function handleRequest(event) {\n  try {\n    const url = new URL(event.request.url);\n    if (url.pathname === '/stream') {\n      return createWebsocketHandoff(event.request, 'websocket_backend');\n    } else {\n      return new Response('oopsie, make a request to /stream for some websocket goodies', { status: 404 });\n    }\n  } catch (error) {\n    console.error({error});\n    return new Response(error.message, {status:500})\n  }\n}\n\naddEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n```\n"
  },
  {
    "path": "documentation/versioned_sidebars/version-1.13.0-sidebars.json",
    "content": "{\n  \"defaultSidebar\": [\n    {\n      \"type\": \"autogenerated\",\n      \"dirName\": \".\"\n    }\n  ]\n}\n"
  },
  {
    "path": "documentation/versioned_sidebars/version-2.5.0-sidebars.json",
    "content": "{\n  \"defaultSidebar\": [\n    {\n      \"type\": \"autogenerated\",\n      \"dirName\": \".\"\n    }\n  ]\n}\n"
  },
  {
    "path": "documentation/versioned_sidebars/version-3.38.4-sidebars.json",
    "content": "{\n  \"defaultSidebar\": [\n    {\n      \"type\": \"autogenerated\",\n      \"dirName\": \".\"\n    }\n  ]\n}\n"
  },
  {
    "path": "documentation/versioned_sidebars/version-3.39.0-sidebars.json",
    "content": "{\n  \"defaultSidebar\": [\n    {\n      \"type\": \"autogenerated\",\n      \"dirName\": \".\"\n    }\n  ]\n}\n"
  },
  {
    "path": "documentation/versioned_sidebars/version-3.39.1-sidebars.json",
    "content": "{\n  \"defaultSidebar\": [\n    {\n      \"type\": \"autogenerated\",\n      \"dirName\": \".\"\n    }\n  ]\n}\n"
  },
  {
    "path": "documentation/versioned_sidebars/version-3.39.2-sidebars.json",
    "content": "{\n  \"defaultSidebar\": [\n    {\n      \"type\": \"autogenerated\",\n      \"dirName\": \".\"\n    }\n  ]\n}\n"
  },
  {
    "path": "documentation/versioned_sidebars/version-3.39.3-sidebars.json",
    "content": "{\n  \"defaultSidebar\": [\n    {\n      \"type\": \"autogenerated\",\n      \"dirName\": \".\"\n    }\n  ]\n}\n"
  },
  {
    "path": "documentation/versioned_sidebars/version-3.40.0-sidebars.json",
    "content": "{\n  \"defaultSidebar\": [\n    {\n      \"type\": \"autogenerated\",\n      \"dirName\": \".\"\n    }\n  ]\n}\n"
  },
  {
    "path": "documentation/versioned_sidebars/version-3.40.1-sidebars.json",
    "content": "{\n  \"defaultSidebar\": [\n    {\n      \"type\": \"autogenerated\",\n      \"dirName\": \".\"\n    }\n  ]\n}\n"
  },
  {
    "path": "documentation/versioned_sidebars/version-3.41.0-sidebars.json",
    "content": "{\n  \"defaultSidebar\": [\n    {\n      \"type\": \"autogenerated\",\n      \"dirName\": \".\"\n    }\n  ]\n}\n"
  },
  {
    "path": "documentation/versioned_sidebars/version-3.41.2-sidebars.json",
    "content": "{\n  \"defaultSidebar\": [\n    {\n      \"type\": \"autogenerated\",\n      \"dirName\": \".\"\n    }\n  ]\n}\n"
  },
  {
    "path": "documentation/versions.json",
    "content": "[\n  \"3.41.2\",\n  \"3.41.0\",\n  \"3.40.1\",\n  \"3.40.0\",\n  \"3.39.3\",\n  \"3.39.2\",\n  \"3.39.1\",\n  \"3.39.0\",\n  \"3.38.4\",\n  \"2.5.0\",\n  \"1.13.0\"\n]\n"
  },
  {
    "path": "eslint.config.mjs",
    "content": "// @ts-check\n\nimport eslint from '@eslint/js';\nimport { defineConfig } from 'eslint/config';\nimport tseslint from 'typescript-eslint';\n\nexport default defineConfig([\n  {\n    files: ['src/**/*.{ts,tsx,js}'],\n    languageOptions: {\n      parserOptions: {\n        projectService: true,\n      },\n    },\n    extends: [\n      eslint.configs.recommended,\n      ...tseslint.configs.recommendedTypeChecked,\n      ...tseslint.configs.stylisticTypeChecked,\n    ],\n    rules: {\n      'no-fallthrough': 'off',\n      '@typescript-eslint/require-await': 'off',\n      '@typescript-eslint/consistent-type-definitions': 'off',\n    },\n  },\n  {\n    ignores: [\n      'ci/*',\n      'dist/*',\n      'documentation/*',\n      'integration-tests/*',\n      'runtime/*',\n      'tests/*',\n      'test-d/*',\n    ]\n  },\n]);\n"
  },
  {
    "path": "integration-tests/cli/build-config.test.js",
    "content": "import test from 'brittle';\nimport { getBinPath } from 'get-bin-path';\nimport { prepareEnvironment } from '@jakechampion/cli-testing-library';\n\nconst cli = await getBinPath({ name: 'js-compute' });\n\ntest('should build the fastly condition', async function (t) {\n  const { execute, cleanup, writeFile, exists, path } =\n    await prepareEnvironment();\n  t.teardown(async function () {\n    await cleanup();\n  });\n\n  await writeFile('./index.js', `import '#test';`);\n  await writeFile('./test.js', `addEventListener('fetch', function(){})`);\n  await writeFile(\n    './package.json',\n    `{ \"type\": \"module\", \"imports\": { \"#test\": { \"fastly\": \"./test.js\" } } }`,\n  );\n\n  t.is(await exists('./app.wasm'), false);\n\n  const { code, stdout, stderr } = await execute(\n    process.execPath,\n    `${cli} ${path}/index.js ${path}/app.wasm`,\n  );\n\n  t.is(await exists('./app.wasm'), true);\n  t.alike(stdout, []);\n  t.alike(stderr, []);\n  t.is(code, 0);\n});\n"
  },
  {
    "path": "integration-tests/cli/custom-input-path.test.js",
    "content": "import test from 'brittle';\nimport { getBinPath } from 'get-bin-path';\nimport { prepareEnvironment } from '@jakechampion/cli-testing-library';\n\nconst cli = await getBinPath({ name: 'js-compute' });\n\ntest('should create wasm file and return zero exit code', async function (t) {\n  const { execute, cleanup, writeFile, exists, path } =\n    await prepareEnvironment();\n  t.teardown(async function () {\n    await cleanup();\n  });\n\n  await writeFile('./index.js', `addEventListener('fetch', function(){})`);\n\n  t.is(await exists('./bin/main.wasm'), false);\n\n  const { code, stdout, stderr } = await execute(\n    process.execPath,\n    `${cli} ${path}/index.js`,\n  );\n\n  t.is(await exists('./bin/main.wasm'), true);\n  t.alike(stdout, []);\n  t.alike(stderr, []);\n  t.is(code, 0);\n});\n"
  },
  {
    "path": "integration-tests/cli/custom-output-path.test.js",
    "content": "import test from 'brittle';\nimport { getBinPath } from 'get-bin-path';\nimport { prepareEnvironment } from '@jakechampion/cli-testing-library';\n\nconst cli = await getBinPath({ name: 'js-compute' });\n\ntest('should create output directory, wasm file and return zero exit code', async function (t) {\n  const { execute, cleanup, writeFile, exists, path } =\n    await prepareEnvironment();\n  t.teardown(async function () {\n    await cleanup();\n  });\n\n  await writeFile('./index.js', `addEventListener('fetch', function(){})`);\n\n  t.is(await exists('./my/cool/app.wasm'), false);\n\n  const { code, stdout, stderr } = await execute(\n    process.execPath,\n    `${cli} ${path}/index.js ${path}/my/cool/app.wasm`,\n  );\n\n  t.is(await exists('./my/cool/app.wasm'), true);\n  t.alike(stdout, []);\n  t.alike(stderr, []);\n  t.is(code, 0);\n});\n"
  },
  {
    "path": "integration-tests/cli/engine-wasm-path-is-not-a-file.test.js",
    "content": "import test from 'brittle';\nimport { getBinPath } from 'get-bin-path';\nimport { prepareEnvironment } from '@jakechampion/cli-testing-library';\nimport { ok } from 'node:assert';\n\nconst cli = await getBinPath({ name: 'js-compute' });\n\ntest('should return non-zero exit code', async function (t) {\n  const { execute, cleanup, makeDir, writeFile, path } =\n    await prepareEnvironment();\n  t.teardown(async function () {\n    await cleanup();\n  });\n  await makeDir('./engine.wasm');\n  await writeFile('./bin/index.js', `addEventListener('fetch', function(){})`);\n  const { code, stdout, stderr } = await execute(\n    process.execPath,\n    `${cli} --engine-wasm ${path}/engine.wasm`,\n  );\n\n  t.alike(stdout, []);\n  ok(\n    stderr\n      .toString()\n      .startsWith('Error: The `wasmEngine` path does not point to a file:'),\n  );\n  ok(stderr.toString().endsWith('engine.wasm'));\n  t.is(code, 1);\n});\n"
  },
  {
    "path": "integration-tests/cli/env.test.js",
    "content": "import test from 'brittle';\nimport { EnvParser } from '../../dist/env.js';\n\ntest('EnvParser should parse single key-value pair', function (t) {\n  const parser = new EnvParser();\n  parser.parse('NODE_ENV=production');\n\n  t.alike(parser.getEnv(), {\n    NODE_ENV: 'production',\n  });\n});\n\ntest('EnvParser should parse multiple comma-separated values', function (t) {\n  const parser = new EnvParser();\n  parser.parse('NODE_ENV=production,DEBUG=true,PORT=3000');\n\n  t.alike(parser.getEnv(), {\n    NODE_ENV: 'production',\n    DEBUG: 'true',\n    PORT: '3000',\n  });\n});\n\ntest('EnvParser should merge multiple parse calls', function (t) {\n  const parser = new EnvParser();\n  parser.parse('NODE_ENV=production');\n  parser.parse('DEBUG=true');\n\n  t.alike(parser.getEnv(), {\n    NODE_ENV: 'production',\n    DEBUG: 'true',\n  });\n});\n\ntest('EnvParser should inherit existing environment variables', function (t) {\n  const parser = new EnvParser();\n\n  // Set up some test environment variables\n  process.env.TEST_VAR1 = 'value1';\n  process.env.TEST_VAR2 = 'value2';\n\n  parser.parse('TEST_VAR1,TEST_VAR2');\n\n  t.alike(parser.getEnv(), {\n    TEST_VAR1: 'value1',\n    TEST_VAR2: 'value2',\n  });\n\n  // Cleanup\n  delete process.env.TEST_VAR1;\n  delete process.env.TEST_VAR2;\n});\n\ntest('EnvParser should handle mixed inheritance and setting', function (t) {\n  const parser = new EnvParser();\n\n  process.env.TEST_VAR = 'inherited';\n\n  parser.parse('TEST_VAR,NEW_VAR=set');\n\n  t.alike(parser.getEnv(), {\n    TEST_VAR: 'inherited',\n    NEW_VAR: 'set',\n  });\n\n  // Cleanup\n  delete process.env.TEST_VAR;\n});\n\ntest('EnvParser should handle values with spaces', function (t) {\n  const parser = new EnvParser();\n  parser.parse('MESSAGE=Hello World');\n\n  t.alike(parser.getEnv(), {\n    MESSAGE: 'Hello World',\n  });\n});\n\ntest('EnvParser should handle values with equals signs', function (t) {\n  const parser = new EnvParser();\n  parser.parse('DATABASE_URL=postgres://user:pass@localhost:5432/db');\n\n  t.alike(parser.getEnv(), {\n    DATABASE_URL: 'postgres://user:pass@localhost:5432/db',\n  });\n});\n\ntest('EnvParser should handle empty values', function (t) {\n  const parser = new EnvParser();\n  parser.parse('EMPTY=');\n\n  t.alike(parser.getEnv(), {\n    EMPTY: '',\n  });\n});\n\ntest('EnvParser should handle whitespace', function (t) {\n  const parser = new EnvParser();\n  parser.parse(' KEY = value with spaces ');\n\n  t.alike(parser.getEnv(), {\n    KEY: ' value with spaces', // Leading whitespace preserved, trailing removed\n  });\n\n  // Test multiple values with whitespace\n  parser.parse(' KEY2 = value2 , KEY3 = value3 ');\n\n  t.alike(parser.getEnv(), {\n    KEY: ' value with spaces',\n    KEY2: ' value2',\n    KEY3: ' value3',\n  });\n});\n\ntest('EnvParser should merge and override values', function (t) {\n  const parser = new EnvParser();\n  parser.parse('KEY=first');\n  parser.parse('KEY=second');\n\n  t.alike(parser.getEnv(), {\n    KEY: 'second',\n  });\n});\n\ntest('EnvParser should throw on empty key', function (t) {\n  const parser = new EnvParser();\n\n  t.exception(\n    () => parser.parse('=value'),\n    'Invalid environment variable format: =value\\nMust be in format KEY=VALUE',\n  );\n});\n\ntest('EnvParser should handle empty constructor', function (t) {\n  const parser = new EnvParser();\n\n  t.alike(parser.getEnv(), {});\n});\n\ntest('EnvParser should handle multiple commas and whitespace', function (t) {\n  const parser = new EnvParser();\n  parser.parse('KEY1=value1,  KEY2=value2,,,KEY3=value3');\n\n  t.alike(parser.getEnv(), {\n    KEY1: 'value1',\n    KEY2: 'value2',\n    KEY3: 'value3',\n  });\n});\n\ntest('EnvParser should handle values containing escaped characters', function (t) {\n  const parser = new EnvParser();\n\n  // This is how Node.js argv will receive it after shell processing\n  parser.parse('A=VERBATIM CONTENTS\\\\, GO HERE'); // Users will type: --env 'A=VERBATIM CONTENTS\\, GO HERE'\n\n  t.alike(parser.getEnv(), {\n    A: 'VERBATIM CONTENTS, GO HERE', // Comma should be unescaped in final value\n  });\n});\n"
  },
  {
    "path": "integration-tests/cli/input-path-is-not-a-file.test.js",
    "content": "import test from 'brittle';\nimport { getBinPath } from 'get-bin-path';\nimport { prepareEnvironment } from '@jakechampion/cli-testing-library';\nimport { ok } from 'node:assert';\n\nconst cli = await getBinPath({ name: 'js-compute' });\n\ntest('should return non-zero exit code', async function (t) {\n  const { execute, cleanup, makeDir } = await prepareEnvironment();\n  t.teardown(async function () {\n    await cleanup();\n  });\n  await makeDir('./bin/index.js');\n  const { code, stdout, stderr } = await execute(process.execPath, cli);\n\n  t.alike(stdout, []);\n  ok(\n    stderr\n      .toString()\n      .startsWith('Error: The `input` path does not point to a file:'),\n  );\n  ok(stderr.toString().endsWith('index.js'));\n  t.is(code, 1);\n});\n"
  },
  {
    "path": "integration-tests/cli/invalid.test.js",
    "content": "import test from 'brittle';\nimport { getBinPath } from 'get-bin-path';\nimport { prepareEnvironment } from '@jakechampion/cli-testing-library';\nimport { strictEqual } from 'node:assert';\n\nconst cli = await getBinPath({ name: 'js-compute' });\n\ntest('should return non-zero exit code on syntax errors', async function (t) {\n  const { execute, cleanup, writeFile } = await prepareEnvironment();\n  t.teardown(async function () {\n    await cleanup();\n  });\n  await writeFile('./bin/index.js', '\\n\\n\\n\"hello\";@');\n  const { code, stdout, stderr } = await execute(process.execPath, cli);\n  t.alike(stdout, []);\n\n  // TODO: do not even try to fix the mess below if something breaks with it again. Just remove\n  // cli-testing-library dependency entirely and check stderr directly.\n  try {\n    strictEqual(\n      stderr.join('').toString().replace(/\\r?\\n/g, '').slice(1),\n      ` [ERROR] Expected identifier but found end of file\nbin/index.js:4:9:\n4 │ \"hello\";@\n╵          ^\nError: Build failed with 1 error:\nbin/index.js:4:9: ERROR: Expected identifier but found end of file`.replace(\n        /\\r?\\n/g,\n        '',\n      ),\n    );\n  } catch {\n    strictEqual(\n      stderr.join('').toString().replace(/\\r?\\n/g, '').slice(1),\n      ` [ERROR] Expected identifier but found end of file\nbin/index.js:4:9:\n4 │ \"hello\";@\n╵^\nError: Build failed with 1 error:\nbin/index.js:4:9: ERROR: Expected identifier but found end of file`.replace(\n        /\\r?\\n/g,\n        '',\n      ),\n    );\n  }\n\n  t.is(code, 1);\n});\n"
  },
  {
    "path": "integration-tests/cli/non-existent-engine-wasm-path.test.js",
    "content": "import test from 'brittle';\nimport { getBinPath } from 'get-bin-path';\nimport { prepareEnvironment } from '@jakechampion/cli-testing-library';\nimport { ok } from 'node:assert';\n\nconst cli = await getBinPath({ name: 'js-compute' });\n\ntest('should return non-zero exit code', async function (t) {\n  const { execute, cleanup, writeFile, path } = await prepareEnvironment();\n  t.teardown(async function () {\n    await cleanup();\n  });\n\n  await writeFile('./bin/index.js', `addEventListener('fetch', function(){})`);\n  const { code, stdout, stderr } = await execute(\n    process.execPath,\n    `${cli} --engine-wasm ${path}/engine.wasm`,\n  );\n\n  t.alike(stdout, []);\n  ok(\n    stderr\n      .toString()\n      .startsWith(\n        'Error: The `wasmEngine` path points to a non-existent file:',\n      ),\n  );\n  ok(stderr.toString().endsWith('engine.wasm'));\n  t.is(code, 1);\n});\n"
  },
  {
    "path": "integration-tests/cli/non-existent-input-path.test.js",
    "content": "import test from 'brittle';\nimport { getBinPath } from 'get-bin-path';\nimport { prepareEnvironment } from '@jakechampion/cli-testing-library';\nimport { ok } from 'node:assert';\n\nconst cli = await getBinPath({ name: 'js-compute' });\n\ntest('should return non-zero exit code', async function (t) {\n  const { execute, cleanup } = await prepareEnvironment();\n  t.teardown(async function () {\n    await cleanup();\n  });\n\n  const { code, stdout, stderr } = await execute(process.execPath, cli);\n\n  t.alike(stdout, []);\n  ok(\n    stderr\n      .toString()\n      .startsWith('Error: The `input` path points to a non-existent file:'),\n  );\n  ok(stderr.toString().endsWith('index.js'));\n  t.is(code, 1);\n});\n"
  },
  {
    "path": "integration-tests/cli/output-path-is-not-a-file.test.js",
    "content": "import test from 'brittle';\nimport { getBinPath } from 'get-bin-path';\nimport { prepareEnvironment } from '@jakechampion/cli-testing-library';\nimport { ok } from 'node:assert';\n\nconst cli = await getBinPath({ name: 'js-compute' });\n\ntest('should return non-zero exit code', async function (t) {\n  const { execute, cleanup, makeDir, writeFile } = await prepareEnvironment();\n  t.teardown(async function () {\n    await cleanup();\n  });\n  await makeDir('./bin/main.wasm');\n  await writeFile('./bin/index.js', `addEventListener('fetch', function(){})`);\n  const { code, stdout, stderr } = await execute(process.execPath, cli);\n\n  t.alike(stdout, []);\n  ok(\n    stderr\n      .toString()\n      .startsWith('Error: The `output` path points to a directory:'),\n  );\n  ok(stderr.toString().endsWith('main.wasm'));\n  t.is(code, 1);\n});\n"
  },
  {
    "path": "integration-tests/cli/valid.test.js",
    "content": "import test from 'brittle';\nimport { getBinPath } from 'get-bin-path';\nimport { prepareEnvironment } from '@jakechampion/cli-testing-library';\n\nconst cli = await getBinPath({ name: 'js-compute' });\n\ntest('should create wasm file and return zero exit code', async function (t) {\n  const { execute, cleanup, writeFile, exists } = await prepareEnvironment();\n  t.teardown(async function () {\n    await cleanup();\n  });\n\n  await writeFile('./bin/index.js', `addEventListener('fetch', function(){})`);\n\n  t.is(await exists('./bin/main.wasm'), false);\n\n  const { code, stdout, stderr } = await execute(process.execPath, cli);\n\n  t.is(await exists('./bin/main.wasm'), true);\n  t.alike(stdout, []);\n  t.alike(stderr, []);\n  t.is(code, 0);\n});\n"
  },
  {
    "path": "integration-tests/cli/version.test.js",
    "content": "import test from 'brittle';\nimport { getBinPath } from 'get-bin-path';\nimport { prepareEnvironment } from '@jakechampion/cli-testing-library';\nimport { readFileSync } from 'node:fs';\nimport { fileURLToPath } from 'node:url';\nimport { dirname, join } from 'node:path';\nconst __dirname = dirname(fileURLToPath(import.meta.url));\n\nconst packageJson = readFileSync(join(__dirname, '../../package.json'), {\n  encoding: 'utf-8',\n});\nconst version = JSON.parse(packageJson).version;\n\nconst cli = await getBinPath({ name: 'js-compute' });\n\ntest('--version should return version number on stdout and zero exit code', async function (t) {\n  const { execute, cleanup } = await prepareEnvironment();\n  t.teardown(async function () {\n    await cleanup();\n  });\n  const { code, stdout, stderr } = await execute(\n    process.execPath,\n    `${cli} --version`,\n  );\n\n  t.is(code, 0);\n  t.alike(stdout, [`js-compute-runtime-cli.js ${version}`]);\n  t.alike(stderr, []);\n});\n\ntest('-V should return version number on stdout and zero exit code', async function (t) {\n  const { execute, cleanup } = await prepareEnvironment();\n  t.teardown(async function () {\n    await cleanup();\n  });\n  const { code, stdout, stderr } = await execute(process.execPath, `${cli} -V`);\n\n  t.is(code, 0);\n  t.alike(stdout, [`js-compute-runtime-cli.js ${version}`]);\n  t.alike(stderr, []);\n});\n"
  },
  {
    "path": "integration-tests/cli/weval-bin.test.js",
    "content": "import test from 'brittle';\nimport { getBinPath } from 'get-bin-path';\nimport { prepareEnvironment } from '@jakechampion/cli-testing-library';\nimport { chmodSync } from 'node:fs';\n\nconst cli = await getBinPath({ name: 'js-compute' });\nconst isWindows = process.platform === 'win32';\n\ntest('should use --weval-bin when set and AOT is enabled', async function (t) {\n  const { execute, cleanup, writeFile, exists, path } =\n    await prepareEnvironment();\n  t.teardown(async function () {\n    await cleanup();\n  });\n\n  await writeFile('./index.js', `addEventListener('fetch', function(){})`);\n  await writeFile('./dummy.wasm', '');\n\n  const markerPath = `${path}/weval-bin-invoked`;\n  const wrapperFileName = isWindows ? 'weval-wrapper.bat' : 'weval-wrapper.sh';\n  const wrapperPath = `${path}/${wrapperFileName}`;\n\n  if (isWindows) {\n    await writeFile(\n      `./${wrapperFileName}`,\n      `@echo off\necho invoked > \"${markerPath}\"\nexit /b 1\n`,\n    );\n  } else {\n    await writeFile(\n      `./${wrapperFileName}`,\n      `#!/bin/sh\necho \"invoked\" > \"${markerPath}\"\nexit 1\n`,\n    );\n    chmodSync(wrapperPath, 0o755);\n  }\n\n  const { code } = await execute(\n    process.execPath,\n    `${cli} ${path}/index.js ${path}/out.wasm --enable-aot --engine-wasm=${path}/dummy.wasm --weval-bin=${wrapperPath}`,\n  );\n\n  t.is(await exists('./weval-bin-invoked'), true);\n  t.is(code, 1);\n});\n"
  },
  {
    "path": "integration-tests/js-compute/build-one.sh",
    "content": "#!/usr/bin/env bash\n\nset -euo pipefail\n\nif [ \"$#\" -lt 1 ]; then\n  echo \"Usage: $0 <test>\"\n  exit 1\nfi\n\ntest=\"$1\"\n\n# NOTE: we run `js-compute-runtime` in the test directory, as there are some\n# assumptions about project path that are derived from the cwd of the executable\n# instead of the location of the js source.\n(\n  cd \"$(dirname \"${BASH_SOURCE[0]}\")/fixtures/$test\"\n  npm i\n  fastly compute build -i\n)\n"
  },
  {
    "path": "integration-tests/js-compute/cleanupAll.js",
    "content": "#!/usr/bin/env node\n\n// Clean up any stale resources and services left behind by the integration tests\n\nimport { $ as zx } from 'zx';\nimport { getPrefixes } from './env.js';\n\nconst {\n  SERVICE_PREFIX,\n  ACL_PREFIX,\n  DICTIONARY_PREFIX,\n  CONFIG_STORE_PREFIX,\n  KV_STORE_PREFIX,\n  SECRET_STORE_PREFIX,\n} = getPrefixes();\n\nfunction existingList(stores, prefix) {\n  return stores.filter(\n    (store) => store.name?.startsWith(prefix) || store.Name?.startsWith(prefix),\n  );\n}\n\nconst startTime = Date.now();\n\nif (process.env.FASTLY_API_TOKEN === undefined) {\n  try {\n    process.env.FASTLY_API_TOKEN = String(\n      await zx`fastly profile token --quiet`,\n    ).trim();\n  } catch {\n    console.error(\n      'No environment variable named FASTLY_API_TOKEN has been set and no default fastly profile exists.',\n    );\n    console.error(\n      'In order to run the tests, either create a fastly profile using `fastly profile create` or export a fastly token under the name FASTLY_API_TOKEN',\n    );\n    process.exit(1);\n  }\n}\nconst FASTLY_API_TOKEN = process.env.FASTLY_API_TOKEN;\n\nasync function removeConfigStores(links, services) {\n  console.log('Removing config stores...');\n  const stores = JSON.parse(\n    await zx`fastly config-store list --quiet --json --token $FASTLY_API_TOKEN`,\n  );\n\n  let dictionaries = existingList(stores, DICTIONARY_PREFIX);\n  for (const dictionary of dictionaries) {\n    console.log(`\\tDeleting dictionary ${dictionary.name}`);\n    try {\n      await zx`fastly config-store delete --store-id=${dictionary.id}  --token $FASTLY_API_TOKEN`;\n    } catch {}\n  }\n  console.log('All dictionaries removed');\n\n  let configStores = existingList(stores, CONFIG_STORE_PREFIX);\n  for (const store of configStores) {\n    console.log(`\\tDeleting config store ${store.name}`);\n    try {\n      await zx`fastly config-store delete --store-id=${store.id}  --token $FASTLY_API_TOKEN`;\n    } catch {}\n  }\n  console.log('All config stores removed');\n}\n\nasync function removeKVStores() {\n  console.log('Removing KV stores...');\n  const stores = JSON.parse(\n    await zx`fastly kv-store list --quiet --json --token $FASTLY_API_TOKEN`,\n  ).Data;\n\n  let kvStores = existingList(stores, KV_STORE_PREFIX);\n  for (const store of kvStores) {\n    console.log(`\\tDeleting KV store ${store.Name}`);\n    try {\n      await zx`fastly kv-store delete --store-id=${store.StoreID} --quiet --all -y --token $FASTLY_API_TOKEN`;\n    } catch {}\n  }\n  console.log('All KV stores removed');\n}\n\nasync function removeSecretStores(services) {\n  console.log('Removing secret stores...');\n  const stores = JSON.parse(\n    await zx`fastly secret-store list --quiet --json --token $FASTLY_API_TOKEN`,\n  );\n  if (!stores) {\n    return;\n  }\n  const secretStores = existingList(stores, SECRET_STORE_PREFIX);\n  for (const store of secretStores) {\n    console.log(`\\tDeleting secret store ${store.name}`);\n    try {\n      await zx`fastly secret-store delete --store-id=${store.id}  --token $FASTLY_API_TOKEN`;\n    } catch {}\n  }\n  console.log('All secret stores removed');\n}\n\nasync function removeAcls(services) {\n  console.log('Removing ACLs...');\n  const acls = existingList(\n    JSON.parse(\n      await zx`fastly compute acl list-acls --quiet --json --token $FASTLY_API_TOKEN`,\n    ).data,\n    ACL_PREFIX,\n  );\n\n  for (const acl of acls) {\n    console.log(`\\tDeleting acl ${acl.name}`);\n    try {\n      await zx`fastly compute acl delete --acl-id=${acl.id}  --token $FASTLY_API_TOKEN`;\n    } catch {}\n  }\n  console.log('All ACLs removed');\n}\n\nasync function getServices() {\n  console.log('Getting services...');\n  let services = JSON.parse(\n    await zx`fastly service list --token $FASTLY_API_TOKEN --json`,\n  );\n  services = services.filter(({ Name }) => Name.startsWith(SERVICE_PREFIX));\n  console.log('Services to delete:');\n  for (const service of services) {\n    console.log('\\t', service.Name);\n  }\n  return services;\n}\n\nasync function removeServices(services) {\n  console.log('Removing services...');\n  for (const service of services) {\n    console.log(`\\tDeleting service ${service.Name}`);\n    await zx`fastly service delete --force --service-id=${service.ServiceID}`;\n  }\n  console.log('ALl services removed');\n}\n\nasync function removeLinks(services) {\n  console.log('Removing links...');\n  for (const service of services) {\n    const links = JSON.parse(\n      await zx`fastly resource-link list --service-id=${service.ServiceID} --quiet --json --version latest --token $FASTLY_API_TOKEN`,\n    );\n    for (const link of links) {\n      console.log(\n        `\\tDeleting link between service ${service.Name} and resource ${link.name}`,\n      );\n      await zx`fastly resource-link delete --version latest --autoclone --id=${link.id} --service-id=${link.service_id}  --token $FASTLY_API_TOKEN`;\n      await zx`fastly service-version activate --version latest --service-id=${link.service_id} --token $FASTLY_API_TOKEN`;\n    }\n  }\n  console.log('All links removed');\n}\n\nconst services = await getServices();\nawait removeLinks(services);\nawait removeConfigStores(services);\nawait removeKVStores();\nawait removeSecretStores(services);\nawait removeAcls(services);\nawait removeServices(services);\n\nconsole.log(\n  `Cleanup has finished! Took ${(Date.now() - startTime) / 1000} seconds to complete`,\n);\n"
  },
  {
    "path": "integration-tests/js-compute/compare-downstream-response.js",
    "content": "import compareHeaders from './compare-headers.js';\n\n/**\n * Function to compare a response from a server (Viceroy, Fastly Compute, etc...)\n * With a JSON Response Object in our config\n * @param {{\n      \"status\": number,\n      \"headers\": [\n        [string, string]\n      ],\n      \"body\": string\n    }} configResponse\n * @param {import('undici').Dispatcher.ResponseData} actualResponse\n */\n\nfunction maybeUint8Array(body) {\n  if (Array.isArray(body) && typeof body[0] === 'number')\n    return new Uint8Array(body);\n  if (typeof body === 'string') return new TextEncoder().encode(body);\n  return body;\n}\n\n/**\n * @param {Uint8Array[]} buffers\n * @returns\n */\nfunction concat(buffers) {\n  const out = new Uint8Array(buffers.reduce((len, buf) => len + buf.length, 0));\n  let curPos = 0;\n  for (const buf of buffers) {\n    if (!(buf instanceof Uint8Array)) throw new Error('not a uint8 array');\n    out.set(buf, curPos);\n    curPos += buf.length;\n  }\n  return out;\n}\n\nfunction bufferToString(actualBodyChunks) {\n  try {\n    return new TextDecoder().decode(concat(actualBodyChunks));\n  } catch {\n    return concat(actualBodyChunks);\n  }\n}\n\nfunction bufferEq(a, b) {\n  for (let i = 0; i < a.byteLength; i++) {\n    if (a[i] !== b[i]) return false;\n  }\n  return true;\n}\n\nexport async function compareDownstreamResponse(\n  configResponse,\n  actualResponse,\n  actualBodyChunks,\n) {\n  // Status\n  if (\n    configResponse.status !== undefined &&\n    configResponse.status != actualResponse.statusCode\n  ) {\n    throw new Error(\n      `[DownstreamResponse: Status mismatch] Expected: ${configResponse.status} - Got: ${actualResponse.statusCode}\\n${actualBodyChunks.length ? `\\n\"${bufferToString(actualBodyChunks)}\"` : ''}`,\n    );\n  }\n\n  // Headers\n  if (configResponse.headers) {\n    compareHeaders(\n      configResponse.headers,\n      actualResponse.headers,\n      configResponse.headersExhaustive,\n    );\n  }\n\n  // Body\n  if (\n    configResponse.body ||\n    configResponse.body_prefix ||\n    configResponse.body_suffix\n  ) {\n    if (configResponse.body_prefix) {\n      const body_prefix = maybeUint8Array(configResponse.body_prefix);\n      const actual_prefix = concat(actualBodyChunks).slice(\n        0,\n        body_prefix.byteLength,\n      );\n      if (body_prefix.byteLength !== actual_prefix.byteLength) {\n        throw new Error(\n          `[DownstreamResponse: Body Prefix length mismatch] Expected: ${body_prefix.byteLength} - Got ${actual_prefix.byteLength}: \\n\"${bufferToString(actualBodyChunks)}\"`,\n        );\n      }\n      if (!bufferEq(actual_prefix, body_prefix)) {\n        throw new Error(\n          `[DownstreamResponse: Body Prefix mismatch] Expected: ${body_prefix} - Got ${actual_prefix}:\\n\"${bufferToString(actualBodyChunks)}\"`,\n        );\n      }\n    }\n    if (configResponse.body_suffix) {\n      const body_suffix = maybeUint8Array(configResponse.body_suffix);\n      const actual_suffix = concat(actualBodyChunks).slice(\n        0,\n        body_suffix.byteLength,\n      );\n      if (body_suffix.byteLength !== actual_suffix.byteLength) {\n        throw new Error(\n          `[DownstreamResponse: Body Suffix length mismatch] Expected: ${body_suffix.byteLength} - Got: ${actual_suffix.byteLength}: \\n\"${bufferToString(actualBodyChunks)}\"`,\n        );\n      }\n      if (!bufferEq(actual_suffix, body_suffix)) {\n        throw new Error(\n          `[DownstreamResponse: Body Suffix mismatch] Expected: ${body_suffix} - Got ${actual_suffix}:\\n\"${bufferToString(actualBodyChunks)}\"`,\n        );\n      }\n    }\n    // Check if we need to stream the response and check the chunks, or the whole body\n    configResponse.body = maybeUint8Array(configResponse.body);\n    if (configResponse.body instanceof Array) {\n      // Stream down the response\n      let chunkNumber = 0;\n      for (const chunk of actualBodyChunks) {\n        const chunkString = chunk.toString('utf8');\n\n        // Check if the chunk is equal to what we expected\n        if (configResponse.body[chunkNumber].includes(chunk.toString('utf8'))) {\n          // Yay! We got a matching Chunk, let's see if this is the end of one of our expected chunks. If so, we need to increment our chunk number :)\n          if (\n            configResponse.body[chunkNumber].endsWith(chunk.toString('utf8'))\n          ) {\n            chunkNumber++;\n          }\n        } else {\n          throw new Error(\n            `[DownstreamResponse: Body Chunk mismatch] Expected: ${configResponse.body[chunkNumber]} - Got: ${chunkString}`,\n          );\n        }\n      }\n\n      if (chunkNumber !== configResponse.body.length) {\n        throw new Error(\n          `[DownstreamResponse: Body Chunk mismatch] Expected: ${configResponse.body} - Got: (Incomplete stream, Number of chunks returned: ${chunkNumber})`,\n        );\n      }\n    } else if (configResponse.body !== undefined) {\n      // Get the text, and check if it matches the test\n      const downstreamBodyText = new TextDecoder().decode(\n        concat(actualBodyChunks),\n      );\n      const eq =\n        typeof configResponse.body === 'string'\n          ? downstreamBodyText === configResponse.body\n          : bufferEq(configResponse.body, concat(actualBodyChunks));\n      if (!eq) {\n        throw new Error(\n          `[DownstreamResponse: Body mismatch] Expected: ${configResponse.body} - Got: ${downstreamBodyText}`,\n        );\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "integration-tests/js-compute/compare-headers.js",
    "content": "/**\n *\n * @param {[\n *   [string, string | string[]]\n * ] | Record<string, string | string[]>} configHeaders\n * @param {Headers | {\n *   [string]: string\n * }} wasmModuleHeaders\n * @returns\n */\n\nconst compareHeaders = (configHeaders, wasmModuleHeaders, exhaustive) => {\n  if (!configHeaders) {\n    return;\n  }\n\n  // convert an array of entries into an object of arrays for easier asserting\n  if (Array.isArray(configHeaders)) {\n    const combinedHeaders = Object.create(null);\n    for (const [key, val] of configHeaders) {\n      if (!Object.hasOwnProperty.call(combinedHeaders, key)) {\n        combinedHeaders[key] = val;\n      } else {\n        if (Array.isArray(combinedHeaders[key])) {\n          if (Array.isArray(val)) {\n            combinedHeaders[key] = combinedHeaders[key].concat(val);\n          } else {\n            combinedHeaders[key].push(val);\n          }\n        } else {\n          combinedHeaders[key] = [\n            combinedHeaders[key],\n            ...(Array.isArray(val) ? val : [val]),\n          ];\n        }\n      }\n    }\n    configHeaders = combinedHeaders;\n  }\n\n  if (exhaustive) {\n    const configHeaderNames = Object.keys(configHeaders);\n    const wasmHeaderNames = Object.keys(wasmModuleHeaders);\n    if (configHeaderNames.length !== wasmHeaderNames.length) {\n      throw new Error(\n        `[Header names exhaustive check failed]: Expected ${configHeaderNames.length} header names ${configHeaderNames.join(', ')}, got ${wasmHeaderNames.length} header names ${wasmHeaderNames.join(', ')}`,\n      );\n    }\n  }\n\n  for (let [configHeaderKey, configHeaderValue] of Object.entries(\n    configHeaders,\n  )) {\n    let wasmModuleHeaderValue =\n      wasmModuleHeaders[configHeaderKey.toLowerCase()];\n    if (Array.isArray(configHeaderValue) && configHeaderValue.length === 1) {\n      configHeaderValue = configHeaderValue[0];\n    }\n    if (Array.isArray(configHeaderValue)) {\n      if (!Array.isArray(wasmModuleHeaderValue)) {\n        throw new Error(\n          `[Header Value mismatch] Expected multiple headers for '${configHeaderKey}', but ony got one.`,\n        );\n      }\n      if (configHeaderValue.length !== wasmModuleHeaderValue.length) {\n        throw new Error(\n          `[Header Value mismatch] Expected ${configHeaderValue.length} headers for '${configHeaderKey}', but got ${wasmModuleHeaderValue.length}.`,\n        );\n      }\n      for (const [idx, configValue] of configHeaderValue.entries()) {\n        if (wasmModuleHeaderValue[idx] !== configValue) {\n          throw new Error(\n            `[Header Value mismatch] Expected '${configValue}' for header item ${idx} of '${configHeaderKey}', but got '${wasmModuleHeaderValue[idx]}'.`,\n          );\n        }\n      }\n    } else if (\n      configHeaderValue !== true &&\n      wasmModuleHeaderValue !== configHeaderValue\n    ) {\n      throw new Error(\n        `[Header Value mismatch] Expected: '${configHeaderKey}: ${configHeaderValue}' (${configHeaderValue.length}), got '${configHeaderKey}: ${wasmModuleHeaderValue}' (${wasmModuleHeaderValue?.length})`,\n      );\n    }\n  }\n};\n\nexport default compareHeaders;\n"
  },
  {
    "path": "integration-tests/js-compute/env.js",
    "content": "export const GLOBAL_PREFIX = 'js_integration_test_';\n\nfunction applyGlobalPrefix(map) {\n  for (const key in map) {\n    map[key] = GLOBAL_PREFIX + map[key];\n  }\n  return map;\n}\n\nexport function getEnv(serviceName) {\n  return applyGlobalPrefix({\n    DICTIONARY_NAME: `aZ2__2${serviceName ? '__' + serviceName.replace(/-/g, '_') : ''}`,\n    CONFIG_STORE_NAME: `config${serviceName ? '__' + serviceName.replace(/-/g, '_') : ''}`,\n    KV_STORE_NAME: `kv-store${serviceName ? '--' + serviceName : ''}`,\n    SECRET_STORE_NAME: `secret-store${serviceName ? '--' + serviceName : ''}`,\n    ACL_NAME: `acl${serviceName ? '__' + serviceName.replace(/-/g, '_') : ''}`,\n  });\n}\n\nexport function getPrefixes() {\n  return applyGlobalPrefix({\n    SERVICE_PREFIX: `app-`,\n    DICTIONARY_PREFIX: `aZ2__2`,\n    CONFIG_STORE_PREFIX: `config`,\n    KV_STORE_PREFIX: `kv-store`,\n    SECRET_STORE_PREFIX: `secret-store`,\n    ACL_PREFIX: `acl`,\n  });\n}\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/.eslintrc.cjs",
    "content": "module.exports = {\n  env: {\n    es2021: true,\n  },\n  extends: 'eslint:recommended',\n  overrides: [],\n  parserOptions: {\n    ecmaVersion: 'latest',\n    sourceType: 'module',\n  },\n  rules: {},\n};\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/fastly.toml.in",
    "content": "# This file describes a Fastly Compute package. To learn more visit:\n# https://developer.fastly.com/reference/fastly-toml/\n\nauthors = [\"jchampion@fastly.com\"]\ndescription = \"\"\nlanguage = \"other\"\nmanifest_version = 2\nname = \"js-test-app\"\nservice_id = \"\"\n\n[scripts]\n  build = \"node ../../../../dist/cli/js-compute-runtime-cli.js --env FASTLY_DEBUG_LOGGING,ACL_NAME,CONFIG_STORE_NAME,DICTIONARY_NAME,KV_STORE_NAME,SECRET_STORE_NAME,LOCAL_TEST,TEST=\\\"foo\\\" --enable-experimental-high-resolution-time-methods src/index.js\"\n\n[local_server]\n\n  [local_server.backends]\n\n    [local_server.backends.TheOrigin]\n      url = \"https://compute-sdk-test-backend.edgecompute.app\"\n      override_host = \"compute-sdk-test-backend.edgecompute.app\"\n\n    [local_server.backends.TheOrigin2]\n      url = \"https://compute-sdk-test-backend.edgecompute.app\"\n      override_host = \"compute-sdk-test-backend.edgecompute.app\"\n\n    [local_server.backends.httpme]\n      url = \"https://http-me.fastly.dev\"\n      override_host = \"http-me.fastly.dev\"\n\n  [local_server.config_stores]\n    [local_server.config_stores.CONFIG_STORE_NAME]\n      format = \"inline-toml\"\n    [local_server.config_stores.CONFIG_STORE_NAME.contents]\n      \"twitter\" = \"https://twitter.com/fastly\"\n\n    [local_server.config_stores.\"DICTIONARY_NAME\"]\n      format = \"inline-toml\"\n    [local_server.config_stores.\"DICTIONARY_NAME\".contents]\n      \"twitter\" = \"https://twitter.com/fastly\"\n\n  [local_server.geolocation]\n  format = \"inline-toml\"\n\n  [local_server.geolocation.addresses]\n    [local_server.geolocation.addresses.\"2.216.196.179\"]\n      as_name = \"sky uk limited\"\n      as_number = 5607\n      area_code = 0\n      city = \"bircotes\"\n      conn_speed = \"broadband\"\n      conn_type = \"wifi\"\n      continent = \"EU\"\n      country_code = \"GB\"\n      country_code3 = \"GBR\"\n      country_name = \"united kingdom\"\n      gmt_offset = 0\n      latitude = 53.42\n      longitude = -1.05\n      metro_code = 826039\n      postal_code = \"dn11 8af\"\n      proxy_description = \"?\"\n      proxy_type = \"?\"\n      region = \"NTT\"\n      utc_offset = 0\n    [local_server.geolocation.addresses.\"2607:f0d0:1002:51::4\"]\n      as_name = \"softlayer technologies inc.\"\n      as_number = 36351\n      area_code = 214\n      city = \"dallas\"\n      conn_speed = \"broadband\"\n      conn_type = \"wired\"\n      continent = \"NA\"\n      country_code = \"US\"\n      country_code3 = \"USA\"\n      country_name = \"united states\"\n      gmt_offset = -600\n      latitude = 32.94\n      longitude = -96.84\n      metro_code = 623\n      postal_code = \"75244\"\n      proxy_description = \"?\"\n      proxy_type = \"hosting\"\n      region = \"TX\"\n      utc_offset = -600\n\n  [local_server.kv_stores]\n\n    [[local_server.kv_stores.KV_STORE_NAME]]\n      key = \"placeholder\"\n      data = 'placholder'\n\n  [local_server.secret_stores]\n    [[local_server.secret_stores.SECRET_STORE_NAME]]\n      key = \"first\"\n      data = \"This is also some secret data\"\n    [[local_server.secret_stores.SECRET_STORE_NAME]]\n      key = \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"\n      data = \"This is some secret data\"\n\n  [local_server.device_detection]\n    format = \"inline-toml\"\n\n    [local_server.device_detection.user_agents]\n    [local_server.device_detection.user_agents.\"Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20100101 Firefox/10.0 FBAN/FBIOS;FBAV/8.0.0.28.18;FBBV/1665515;FBDV/iPhone4,1;FBMD/iPhone;FBSN/iPhone OS;FBSV/7.0.4;FBSS/2; FBCR/Telekom.de;FBID/phone;FBLC/de_DE;FBOP/5\"]\n    user_agent = {}\n    os = {}\n    device = {name = \"iPhone\", brand = \"Apple\", model = \"iPhone4,1\", hwtype = \"Mobile Phone\", is_ereader = false, is_gameconsole = false, is_mediaplayer = false, is_mobile = true, is_smarttv = false, is_tablet = false, is_tvplayer = false, is_desktop = false, is_touchscreen = true }\n\n    [local_server.device_detection.user_agents.\"ghosts-app/1.0.2.1 (ASUSTeK COMPUTER INC.; X550CC; Windows 8 (X86); en)\"]\n    user_agent = {}\n    os = {}\n    device = {name = \"Asus TeK\", brand = \"Asus\", model = \"TeK\", is_desktop = false }\n    [local_server.device_detection.user_agents.\"Googlebot/2.1 (+http://www.google.com/bot.html)\"]\n    user_agent = {}\n    os = {}\n    device = {name = \"Googlebot\", brand = \"Google\", model = \"bot\", is_desktop = false, is_bot = true }\n\n[setup]\n  [setup.backends]\n    [setup.backends.httpme]\n      address = \"http-me.fastly.dev\"\n      port = 443\n\n    [setup.backends.TheOrigin]\n      address = \"compute-sdk-test-backend.edgecompute.app\"\n      port = 443\n    [setup.backends.TheOrigin2]\n      address = \"compute-sdk-test-backend.edgecompute.app\"\n      port = 443"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/message.txt",
    "content": "hello includeBytes\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/assertions.js",
    "content": "// Testing/Assertion functions //\n\nexport async function sleep(milliseconds) {\n  return new Promise((resolve) => {\n    setTimeout(resolve, milliseconds);\n  });\n}\n\n// TODO: Implement ReadableStream getIterator() and [@@asyncIterator]() methods\nexport async function streamToString(stream) {\n  const decoder = new TextDecoder();\n  let string = '';\n  let reader = stream.getReader();\n  // eslint-disable-next-line no-constant-condition\n  while (true) {\n    const { done, value } = await reader.read();\n    if (done) {\n      return string;\n    }\n    string += decoder.decode(value);\n  }\n}\n\nexport function iteratableToStream(iterable) {\n  return new ReadableStream({\n    async pull(controller) {\n      for await (const value of iterable) {\n        controller.enqueue(value);\n      }\n      controller.close();\n    },\n  });\n}\n\nexport function pass(message = '') {\n  return new Response(message);\n}\n\nfunction prettyPrintSymbol(a) {\n  if (typeof a === 'symbol') {\n    return String(a);\n  }\n  return a;\n}\nexport function assert(actual, expected, code) {\n  if (!deepEqual(actual, expected)) {\n    throw new Error(\n      `Expected \\`${code}\\` to equal \\`${JSON.stringify(prettyPrintSymbol(expected))}\\` - Found \\`${JSON.stringify(prettyPrintSymbol(actual))}\\``,\n    );\n  }\n}\n\nexport { assert as strictEqual };\n\nexport function ok(truthy, code) {\n  if (!truthy) {\n    throw new Error(\n      `Expected ${code ? code + ' ' : ''}to be truthy - Found \\`${JSON.stringify(prettyPrintSymbol(truthy))}\\``,\n    );\n  }\n}\n\nexport async function assertResolves(func) {\n  try {\n    await func();\n  } catch (error) {\n    throw new Error(\n      `Expected \\`${func.toString()}\\` to resolve - Found it rejected: ${error.name}: ${error.message}`,\n    );\n  }\n}\n\nexport async function assertRejects(func, errorClass, errorMessage) {\n  try {\n    await func();\n  } catch (error) {\n    if (errorClass) {\n      if (error instanceof errorClass === false) {\n        throw new Error(\n          `Expected \\`${func.toString()}\\` to reject instance of \\`${errorClass.name}\\` - Found instance of \\`${error.name}\\``,\n        );\n      }\n    }\n\n    if (errorMessage) {\n      if (error.message !== errorMessage) {\n        throw new Error(\n          `Expected \\`${func.toString()}\\` to reject error message of \\`${errorMessage}\\` - Found \\`${error.message}\\``,\n        );\n      }\n    }\n\n    return;\n  }\n  throw new Error(\n    `Expected \\`${func.toString()}\\` to reject - Found it did not reject`,\n  );\n}\n\nexport function assertThrows(func, errorClass, errorMessage) {\n  try {\n    func();\n  } catch (error) {\n    if (errorClass) {\n      if (error instanceof errorClass === false) {\n        throw new Error(\n          `Expected \\`${func.toString()}\\` to throw instance of \\`${errorClass.name}\\` - Found instance of \\`${error.name}\\`: ${error.message}\\n${error.stack}`,\n        );\n      }\n    }\n\n    if (errorMessage) {\n      if (error.message !== errorMessage) {\n        throw new Error(\n          `Expected \\`${func.toString()}\\` to throw error message of \\`${errorMessage}\\` - Found \\`${error.message}\\``,\n        );\n      }\n    }\n\n    return;\n  }\n  throw new Error(\n    `Expected \\`${func.toString()}\\` to throw - Found it did not throw`,\n  );\n}\n\nexport function assertDoesNotThrow(func) {\n  try {\n    func();\n  } catch (error) {\n    throw new Error(\n      `Expected \\`${func.toString()}\\` to not throw - Found it did throw: ${error.name}: ${error.message}`,\n    );\n  }\n}\n\nexport function deepStrictEqual(a, b) {\n  if (!deepEqual(a, b)) {\n    throw new Error(`Expected ${a} to equal ${b}`);\n  }\n}\n\nexport function deepEqual(a, b) {\n  var aKeys;\n  var bKeys;\n  var typeA;\n  var typeB;\n  var key;\n  var i;\n\n  typeA = typeof a;\n  typeB = typeof b;\n  if (a === null || typeA !== 'object') {\n    if (b === null || typeB !== 'object') {\n      return a === b;\n    }\n    return false;\n  }\n\n  // Case: `a` is of type 'object'\n  if (b === null || typeB !== 'object') {\n    return false;\n  }\n  if (Array.isArray(a) && Array.isArray(b)) {\n    if (a.length !== b.length) return false;\n    for (let i = 0; i < a.length; i++) {\n      if (!deepEqual(a[i], b[i])) {\n        return false;\n      }\n    }\n    return true;\n  }\n  if (Object.getPrototypeOf(a) !== Object.getPrototypeOf(b)) {\n    return false;\n  }\n  if (a instanceof Date) {\n    return a.getTime() === b.getTime();\n  }\n  if (a instanceof RegExp) {\n    return a.source === b.source && a.flags === b.flags;\n  }\n  if (a instanceof Error) {\n    if (a.message !== b.message || a.name !== b.name) {\n      return false;\n    }\n  }\n\n  aKeys = Object.keys(a);\n  bKeys = Object.keys(b);\n  if (aKeys.length !== bKeys.length) {\n    return false;\n  }\n  aKeys.sort();\n  bKeys.sort();\n\n  // Cheap key test:\n  for (i = 0; i < aKeys.length; i++) {\n    if (aKeys[i] !== bKeys[i]) {\n      return false;\n    }\n  }\n  // Possibly expensive deep equality test for each corresponding key:\n  for (i = 0; i < aKeys.length; i++) {\n    key = aKeys[i];\n    if (!deepEqual(a[key], b[key])) {\n      return false;\n    }\n  }\n  return typeA === typeB;\n}\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/async-select.js",
    "content": "import { routes } from './routes';\n\nroutes.set('/async-select/hello', () => {\n  let requestsData = [\n    {\n      url: 'https://compute-sdk-test-backend.edgecompute.app/async_select_1',\n      backend: 'TheOrigin',\n      header: 'fooname',\n    },\n    {\n      url: 'https://compute-sdk-test-backend.edgecompute.app/async_select_2',\n      backend: 'TheOrigin2',\n      header: 'barname',\n    },\n  ];\n\n  let pending = requestsData.map((data) => {\n    let request = new Request(data.url);\n    return fetch(request, { backend: data.backend });\n  });\n\n  return processUpstreamRequests(pending, requestsData);\n});\n\nasync function processUpstreamRequests(requests, requestsData) {\n  // Create our response headers we will be sending downstream\n  let responseHeaders = new Headers();\n\n  // Loop through our requests\n  for await (let response of select(requests)) {\n    // Check which response we got, so we know which header to\n    // copy over to our response headers\n    let { header } = requestsData.find((data) => data.url == response.url);\n\n    // Set the appropriate header on our response\n    let headerValue = response.headers.get(header);\n    if (headerValue == null) {\n      throw new Error(\n        'No header value on the response from the request with url ' +\n          response.url +\n          ' and with the header name: ' +\n          header,\n      );\n    }\n    responseHeaders.set(header, headerValue);\n  }\n\n  // Send our response downstream\n  return new Response('pong', {\n    headers: responseHeaders,\n  });\n}\n\nasync function* select(promises) {\n  promises = promises.map((promise) => {\n    promise.finally(() => {\n      promises.splice(promises.indexOf(promise), 1);\n    });\n    return promise;\n  });\n\n  while (promises.length) {\n    yield await Promise.any(promises);\n  }\n}\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/btoa.js",
    "content": "import { assert, assertThrows } from './assertions.js';\nimport { routes } from './routes';\n\nroutes.set('/btoa', () => {\n  // btoa\n  {\n    var everything = '';\n    for (var i = 0; i < 256; i++) {\n      everything += String.fromCharCode(i);\n    }\n    assert(\n      btoa(everything),\n      'AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/w==',\n    );\n\n    assert(btoa(42), btoa('42'));\n    assert(btoa(null), btoa('null'));\n    assert(btoa({ x: 1 }), btoa('[object Object]'));\n\n    assertThrows(() => btoa(), TypeError);\n    assertThrows(() => btoa('🐱'));\n\n    assert(btoa(''), '', `btoa(\"\")`);\n    assert(btoa('ab'), 'YWI=', `btoa(\"ab\")`);\n    assert(btoa('abc'), 'YWJj', `btoa(\"abc\")`);\n    assert(btoa('abcd'), 'YWJjZA==', `btoa(\"abcd\")`);\n    assert(btoa('abcde'), 'YWJjZGU=', `btoa(\"abcde\")`);\n    assert(btoa('ÿÿÀ'), '///A', `btoa(\"ÿÿÀ\")`);\n    assert(btoa('\\0a'), 'AGE=', `btoa(\"\\\\0a\")`);\n    assert(btoa('a\\0b'), 'YQBi', `btoa(\"a\\\\0b\")`);\n    assert(btoa(undefined), 'dW5kZWZpbmVk', `btoa(undefined)`);\n    assert(btoa(null), 'bnVsbA==', `btoa(null)`);\n    assert(btoa(7), 'Nw==', `btoa(7)`);\n    assert(btoa(12), 'MTI=', `btoa(12)`);\n    assert(btoa(1.5), 'MS41', `btoa(1.5)`);\n    assert(btoa(true), 'dHJ1ZQ==', `btoa(true)`);\n    assert(btoa(false), 'ZmFsc2U=', `btoa(false)`);\n    assert(btoa(NaN), 'TmFO', `btoa(NaN)`);\n    assert(btoa(Infinity), 'SW5maW5pdHk=', `btoa(Infinity)`);\n    assert(btoa(-Infinity), 'LUluZmluaXR5', `btoa(-Infinity)`);\n    assert(btoa(0), 'MA==', `btoa(0)`);\n    assert(btoa(-0), 'MA==', `btoa(-0)`);\n    assert(btoa('\\0'), 'AA==', `btoa(\"\\\\0\")`);\n    assert(btoa('\\x01'), 'AQ==', `btoa(\"\\\\x01\")`);\n    assert(btoa('\\x02'), 'Ag==', `btoa(\"\\\\x02\")`);\n    assert(btoa('\\x03'), 'Aw==', `btoa(\"\\\\x03\")`);\n    assert(btoa('\\x04'), 'BA==', `btoa(\"\\\\x04\")`);\n    assert(btoa('\\x05'), 'BQ==', `btoa(\"\\\\x05\")`);\n    assert(btoa('\\x06'), 'Bg==', `btoa(\"\\\\x06\")`);\n    assert(btoa('\\x07'), 'Bw==', `btoa(\"\\\\x07\")`);\n    assert(btoa('\\b'), 'CA==', `btoa(\"\\\\b\")`);\n    assert(btoa('\\t'), 'CQ==', `btoa(\"\\\\t\")`);\n    assert(btoa('\\n'), 'Cg==', `btoa(\"\\\\n\")`);\n    assert(btoa('\\v'), 'Cw==', `btoa(\"\\\\v\")`);\n    assert(btoa('\\f'), 'DA==', `btoa(\"\\\\f\")`);\n    assert(btoa('\\r'), 'DQ==', `btoa(\"\\\\r\")`);\n    assert(btoa('\\x0e'), 'Dg==', `btoa(\"\\\\x0e\")`);\n    assert(btoa('\\x0f'), 'Dw==', `btoa(\"\\\\x0f\")`);\n    assert(btoa('\\x10'), 'EA==', `btoa(\"\\\\x10\")`);\n    assert(btoa('\\x11'), 'EQ==', `btoa(\"\\\\x11\")`);\n    assert(btoa('\\x12'), 'Eg==', `btoa(\"\\\\x12\")`);\n    assert(btoa('\\x13'), 'Ew==', `btoa(\"\\\\x13\")`);\n    assert(btoa('\\x14'), 'FA==', `btoa(\"\\\\x14\")`);\n    assert(btoa('\\x15'), 'FQ==', `btoa(\"\\\\x15\")`);\n    assert(btoa('\\x16'), 'Fg==', `btoa(\"\\\\x16\")`);\n    assert(btoa('\\x17'), 'Fw==', `btoa(\"\\\\x17\")`);\n    assert(btoa('\\x18'), 'GA==', `btoa(\"\\\\x18\")`);\n    assert(btoa('\\x19'), 'GQ==', `btoa(\"\\\\x19\")`);\n    assert(btoa('\\x1a'), 'Gg==', `btoa(\"\\\\x1a\")`);\n    assert(btoa('\\x1b'), 'Gw==', `btoa(\"\\\\x1b\")`);\n    assert(btoa('\\x1c'), 'HA==', `btoa(\"\\\\x1c\")`);\n    assert(btoa('\\x1d'), 'HQ==', `btoa(\"\\\\x1d\")`);\n    assert(btoa('\\x1e'), 'Hg==', `btoa(\"\\\\x1e\")`);\n    assert(btoa('\\x1f'), 'Hw==', `btoa(\"\\\\x1f\")`);\n    assert(btoa(' '), 'IA==', `btoa(\" \")`);\n    assert(btoa('!'), 'IQ==', `btoa(\"!\")`);\n    assert(btoa('#'), 'Iw==', `btoa(\"#\")`);\n    assert(btoa('$'), 'JA==', `btoa(\"$\")`);\n    assert(btoa('%'), 'JQ==', `btoa(\"%\")`);\n    assert(btoa('&'), 'Jg==', `btoa(\"&\")`);\n    assert(btoa(\"'\"), 'Jw==', `btoa(\"'\")`);\n    assert(btoa('('), 'KA==', `btoa(\"(\")`);\n    assert(btoa(')'), 'KQ==', `btoa(\")\")`);\n    assert(btoa('*'), 'Kg==', `btoa(\"*\")`);\n    assert(btoa('+'), 'Kw==', `btoa(\"+\")`);\n    assert(btoa(','), 'LA==', `btoa(\",\")`);\n    assert(btoa('-'), 'LQ==', `btoa(\"-\")`);\n    assert(btoa('.'), 'Lg==', `btoa(\".\")`);\n    assert(btoa('/'), 'Lw==', `btoa(\"/\")`);\n    assert(btoa('0'), 'MA==', `btoa(\"0\")`);\n    assert(btoa('1'), 'MQ==', `btoa(\"1\")`);\n    assert(btoa('2'), 'Mg==', `btoa(\"2\")`);\n    assert(btoa('3'), 'Mw==', `btoa(\"3\")`);\n    assert(btoa('4'), 'NA==', `btoa(\"4\")`);\n    assert(btoa('5'), 'NQ==', `btoa(\"5\")`);\n    assert(btoa('6'), 'Ng==', `btoa(\"6\")`);\n    assert(btoa('7'), 'Nw==', `btoa(\"7\")`);\n    assert(btoa('8'), 'OA==', `btoa(\"8\")`);\n    assert(btoa('9'), 'OQ==', `btoa(\"9\")`);\n    assert(btoa(':'), 'Og==', `btoa(\":\")`);\n    assert(btoa(';'), 'Ow==', `btoa(\";\")`);\n    assert(btoa('<'), 'PA==', `btoa(\"<\")`);\n    assert(btoa('='), 'PQ==', `btoa(\"=\")`);\n    assert(btoa('>'), 'Pg==', `btoa(\">\")`);\n    assert(btoa('?'), 'Pw==', `btoa(\"?\")`);\n    assert(btoa('@'), 'QA==', `btoa(\"@\")`);\n    assert(btoa('A'), 'QQ==', `btoa(\"A\")`);\n    assert(btoa('B'), 'Qg==', `btoa(\"B\")`);\n    assert(btoa('C'), 'Qw==', `btoa(\"C\")`);\n    assert(btoa('D'), 'RA==', `btoa(\"D\")`);\n    assert(btoa('E'), 'RQ==', `btoa(\"E\")`);\n    assert(btoa('F'), 'Rg==', `btoa(\"F\")`);\n    assert(btoa('G'), 'Rw==', `btoa(\"G\")`);\n    assert(btoa('H'), 'SA==', `btoa(\"H\")`);\n    assert(btoa('I'), 'SQ==', `btoa(\"I\")`);\n    assert(btoa('J'), 'Sg==', `btoa(\"J\")`);\n    assert(btoa('K'), 'Sw==', `btoa(\"K\")`);\n    assert(btoa('L'), 'TA==', `btoa(\"L\")`);\n    assert(btoa('M'), 'TQ==', `btoa(\"M\")`);\n    assert(btoa('N'), 'Tg==', `btoa(\"N\")`);\n    assert(btoa('O'), 'Tw==', `btoa(\"O\")`);\n    assert(btoa('P'), 'UA==', `btoa(\"P\")`);\n    assert(btoa('Q'), 'UQ==', `btoa(\"Q\")`);\n    assert(btoa('R'), 'Ug==', `btoa(\"R\")`);\n    assert(btoa('S'), 'Uw==', `btoa(\"S\")`);\n    assert(btoa('T'), 'VA==', `btoa(\"T\")`);\n    assert(btoa('U'), 'VQ==', `btoa(\"U\")`);\n    assert(btoa('V'), 'Vg==', `btoa(\"V\")`);\n    assert(btoa('W'), 'Vw==', `btoa(\"W\")`);\n    assert(btoa('X'), 'WA==', `btoa(\"X\")`);\n    assert(btoa('Y'), 'WQ==', `btoa(\"Y\")`);\n    assert(btoa('Z'), 'Wg==', `btoa(\"Z\")`);\n    assert(btoa('['), 'Ww==', `btoa(\"[\")`);\n    assert(btoa('\\\\'), 'XA==', `btoa(\"\\\\\\\\\")`);\n    assert(btoa(']'), 'XQ==', `btoa(\"]\")`);\n    assert(btoa('^'), 'Xg==', `btoa(\"^\")`);\n    assert(btoa('_'), 'Xw==', `btoa(\"_\")`);\n    assert(btoa('a'), 'YQ==', `btoa(\"a\")`);\n    assert(btoa('b'), 'Yg==', `btoa(\"b\")`);\n    assert(btoa('c'), 'Yw==', `btoa(\"c\")`);\n    assert(btoa('d'), 'ZA==', `btoa(\"d\")`);\n    assert(btoa('e'), 'ZQ==', `btoa(\"e\")`);\n    assert(btoa('f'), 'Zg==', `btoa(\"f\")`);\n    assert(btoa('g'), 'Zw==', `btoa(\"g\")`);\n    assert(btoa('h'), 'aA==', `btoa(\"h\")`);\n    assert(btoa('i'), 'aQ==', `btoa(\"i\")`);\n    assert(btoa('j'), 'ag==', `btoa(\"j\")`);\n    assert(btoa('k'), 'aw==', `btoa(\"k\")`);\n    assert(btoa('l'), 'bA==', `btoa(\"l\")`);\n    assert(btoa('m'), 'bQ==', `btoa(\"m\")`);\n    assert(btoa('n'), 'bg==', `btoa(\"n\")`);\n    assert(btoa('o'), 'bw==', `btoa(\"o\")`);\n    assert(btoa('p'), 'cA==', `btoa(\"p\")`);\n    assert(btoa('q'), 'cQ==', `btoa(\"q\")`);\n    assert(btoa('r'), 'cg==', `btoa(\"r\")`);\n    assert(btoa('s'), 'cw==', `btoa(\"s\")`);\n    assert(btoa('t'), 'dA==', `btoa(\"t\")`);\n    assert(btoa('u'), 'dQ==', `btoa(\"u\")`);\n    assert(btoa('v'), 'dg==', `btoa(\"v\")`);\n    assert(btoa('w'), 'dw==', `btoa(\"w\")`);\n    assert(btoa('x'), 'eA==', `btoa(\"x\")`);\n    assert(btoa('y'), 'eQ==', `btoa(\"y\")`);\n    assert(btoa('z'), 'eg==', `btoa(\"z\")`);\n    assert(btoa('{'), 'ew==', `btoa(\"{\")`);\n    assert(btoa('|'), 'fA==', `btoa(\"|\")`);\n    assert(btoa('}'), 'fQ==', `btoa(\"}\")`);\n    assert(btoa('~'), 'fg==', `btoa(\"~\")`);\n    assert(btoa(''), 'fw==', `btoa(\"\")`);\n    assert(btoa(''), 'gA==', `btoa(\"\")`);\n    assert(btoa(''), 'gQ==', `btoa(\"\")`);\n    assert(btoa(''), 'gg==', `btoa(\"\")`);\n    assert(btoa(''), 'gw==', `btoa(\"\")`);\n    assert(btoa(''), 'hA==', `btoa(\"\")`);\n    // eslint-disable-next-line no-irregular-whitespace\n    assert(btoa(''), 'hQ==', `btoa(\"\")`);\n    assert(btoa(''), 'hg==', `btoa(\"\")`);\n    assert(btoa(''), 'hw==', `btoa(\"\")`);\n    assert(btoa(''), 'iA==', `btoa(\"\")`);\n    assert(btoa(''), 'iQ==', `btoa(\"\")`);\n    assert(btoa(''), 'ig==', `btoa(\"\")`);\n    assert(btoa(''), 'iw==', `btoa(\"\")`);\n    assert(btoa(''), 'jA==', `btoa(\"\")`);\n    assert(btoa(''), 'jQ==', `btoa(\"\")`);\n    assert(btoa(''), 'jg==', `btoa(\"\")`);\n    assert(btoa(''), 'jw==', `btoa(\"\")`);\n    assert(btoa(''), 'kA==', `btoa(\"\")`);\n    assert(btoa(''), 'kQ==', `btoa(\"\")`);\n    assert(btoa(''), 'kg==', `btoa(\"\")`);\n    assert(btoa(''), 'kw==', `btoa(\"\")`);\n    assert(btoa(''), 'lA==', `btoa(\"\")`);\n    assert(btoa(''), 'lQ==', `btoa(\"\")`);\n    assert(btoa(''), 'lg==', `btoa(\"\")`);\n    assert(btoa(''), 'lw==', `btoa(\"\")`);\n    assert(btoa(''), 'mA==', `btoa(\"\")`);\n    assert(btoa(''), 'mQ==', `btoa(\"\")`);\n    assert(btoa(''), 'mg==', `btoa(\"\")`);\n    assert(btoa(''), 'mw==', `btoa(\"\")`);\n    assert(btoa(''), 'nA==', `btoa(\"\")`);\n    assert(btoa(''), 'nQ==', `btoa(\"\")`);\n    assert(btoa(''), 'ng==', `btoa(\"\")`);\n    assert(btoa(''), 'nw==', `btoa(\"\")`);\n    // eslint-disable-next-line no-irregular-whitespace\n    assert(btoa(' '), 'oA==', `btoa(\" \")`);\n    assert(btoa('¡'), 'oQ==', `btoa(\"¡\")`);\n    assert(btoa('¢'), 'og==', `btoa(\"¢\")`);\n    assert(btoa('£'), 'ow==', `btoa(\"£\")`);\n    assert(btoa('¤'), 'pA==', `btoa(\"¤\")`);\n    assert(btoa('¥'), 'pQ==', `btoa(\"¥\")`);\n    assert(btoa('¦'), 'pg==', `btoa(\"¦\")`);\n    assert(btoa('§'), 'pw==', `btoa(\"§\")`);\n    assert(btoa('¨'), 'qA==', `btoa(\"¨\")`);\n    assert(btoa('©'), 'qQ==', `btoa(\"©\")`);\n    assert(btoa('ª'), 'qg==', `btoa(\"ª\")`);\n    assert(btoa('«'), 'qw==', `btoa(\"«\")`);\n    assert(btoa('¬'), 'rA==', `btoa(\"¬\")`);\n    assert(btoa('­'), 'rQ==', `btoa(\"­\")`);\n    assert(btoa('®'), 'rg==', `btoa(\"®\")`);\n    assert(btoa('¯'), 'rw==', `btoa(\"¯\")`);\n    assert(btoa('°'), 'sA==', `btoa(\"°\")`);\n    assert(btoa('±'), 'sQ==', `btoa(\"±\")`);\n    assert(btoa('²'), 'sg==', `btoa(\"²\")`);\n    assert(btoa('³'), 'sw==', `btoa(\"³\")`);\n    assert(btoa('´'), 'tA==', `btoa(\"´\")`);\n    assert(btoa('µ'), 'tQ==', `btoa(\"µ\")`);\n    assert(btoa('¶'), 'tg==', `btoa(\"¶\")`);\n    assert(btoa('·'), 'tw==', `btoa(\"·\")`);\n    assert(btoa('¸'), 'uA==', `btoa(\"¸\")`);\n    assert(btoa('¹'), 'uQ==', `btoa(\"¹\")`);\n    assert(btoa('º'), 'ug==', `btoa(\"º\")`);\n    assert(btoa('»'), 'uw==', `btoa(\"»\")`);\n    assert(btoa('¼'), 'vA==', `btoa(\"¼\")`);\n    assert(btoa('½'), 'vQ==', `btoa(\"½\")`);\n    assert(btoa('¾'), 'vg==', `btoa(\"¾\")`);\n    assert(btoa('¿'), 'vw==', `btoa(\"¿\")`);\n    assert(btoa('À'), 'wA==', `btoa(\"À\")`);\n    assert(btoa('Á'), 'wQ==', `btoa(\"Á\")`);\n    assert(btoa('Â'), 'wg==', `btoa(\"Â\")`);\n    assert(btoa('Ã'), 'ww==', `btoa(\"Ã\")`);\n    assert(btoa('Ä'), 'xA==', `btoa(\"Ä\")`);\n    assert(btoa('Å'), 'xQ==', `btoa(\"Å\")`);\n    assert(btoa('Æ'), 'xg==', `btoa(\"Æ\")`);\n    assert(btoa('Ç'), 'xw==', `btoa(\"Ç\")`);\n    assert(btoa('È'), 'yA==', `btoa(\"È\")`);\n    assert(btoa('É'), 'yQ==', `btoa(\"É\")`);\n    assert(btoa('Ê'), 'yg==', `btoa(\"Ê\")`);\n    assert(btoa('Ë'), 'yw==', `btoa(\"Ë\")`);\n    assert(btoa('Ì'), 'zA==', `btoa(\"Ì\")`);\n    assert(btoa('Í'), 'zQ==', `btoa(\"Í\")`);\n    assert(btoa('Î'), 'zg==', `btoa(\"Î\")`);\n    assert(btoa('Ï'), 'zw==', `btoa(\"Ï\")`);\n    assert(btoa('Ð'), '0A==', `btoa(\"Ð\")`);\n    assert(btoa('Ñ'), '0Q==', `btoa(\"Ñ\")`);\n    assert(btoa('Ò'), '0g==', `btoa(\"Ò\")`);\n    assert(btoa('Ó'), '0w==', `btoa(\"Ó\")`);\n    assert(btoa('Ô'), '1A==', `btoa(\"Ô\")`);\n    assert(btoa('Õ'), '1Q==', `btoa(\"Õ\")`);\n    assert(btoa('Ö'), '1g==', `btoa(\"Ö\")`);\n    assert(btoa('×'), '1w==', `btoa(\"×\")`);\n    assert(btoa('Ø'), '2A==', `btoa(\"Ø\")`);\n    assert(btoa('Ù'), '2Q==', `btoa(\"Ù\")`);\n    assert(btoa('Ú'), '2g==', `btoa(\"Ú\")`);\n    assert(btoa('Û'), '2w==', `btoa(\"Û\")`);\n    assert(btoa('Ü'), '3A==', `btoa(\"Ü\")`);\n    assert(btoa('Ý'), '3Q==', `btoa(\"Ý\")`);\n    assert(btoa('Þ'), '3g==', `btoa(\"Þ\")`);\n    assert(btoa('ß'), '3w==', `btoa(\"ß\")`);\n    assert(btoa('à'), '4A==', `btoa(\"à\")`);\n    assert(btoa('á'), '4Q==', `btoa(\"á\")`);\n    assert(btoa('â'), '4g==', `btoa(\"â\")`);\n    assert(btoa('ã'), '4w==', `btoa(\"ã\")`);\n    assert(btoa('ä'), '5A==', `btoa(\"ä\")`);\n    assert(btoa('å'), '5Q==', `btoa(\"å\")`);\n    assert(btoa('æ'), '5g==', `btoa(\"æ\")`);\n    assert(btoa('ç'), '5w==', `btoa(\"ç\")`);\n    assert(btoa('è'), '6A==', `btoa(\"è\")`);\n    assert(btoa('é'), '6Q==', `btoa(\"é\")`);\n    assert(btoa('ê'), '6g==', `btoa(\"ê\")`);\n    assert(btoa('ë'), '6w==', `btoa(\"ë\")`);\n    assert(btoa('ì'), '7A==', `btoa(\"ì\")`);\n    assert(btoa('í'), '7Q==', `btoa(\"í\")`);\n    assert(btoa('î'), '7g==', `btoa(\"î\")`);\n    assert(btoa('ï'), '7w==', `btoa(\"ï\")`);\n    assert(btoa('ð'), '8A==', `btoa(\"ð\")`);\n    assert(btoa('ñ'), '8Q==', `btoa(\"ñ\")`);\n    assert(btoa('ò'), '8g==', `btoa(\"ò\")`);\n    assert(btoa('ó'), '8w==', `btoa(\"ó\")`);\n    assert(btoa('ô'), '9A==', `btoa(\"ô\")`);\n    assert(btoa('õ'), '9Q==', `btoa(\"õ\")`);\n    assert(btoa('ö'), '9g==', `btoa(\"ö\")`);\n    assert(btoa('÷'), '9w==', `btoa(\"÷\")`);\n    assert(btoa('ø'), '+A==', `btoa(\"ø\")`);\n    assert(btoa('ù'), '+Q==', `btoa(\"ù\")`);\n    assert(btoa('ú'), '+g==', `btoa(\"ú\")`);\n    assert(btoa('û'), '+w==', `btoa(\"û\")`);\n    assert(btoa('ü'), '/A==', `btoa(\"ü\")`);\n    assert(btoa('ý'), '/Q==', `btoa(\"ý\")`);\n    assert(btoa('þ'), '/g==', `btoa(\"þ\")`);\n    assert(btoa('ÿ'), '/w==', `btoa(\"ÿ\")`);\n  }\n\n  // atob\n  {\n    assert(atob(''), '', `atob(\"\")`);\n    assert(atob('abcd'), 'i·\\x1D');\n    assert(atob(' abcd'), 'i·\\x1D');\n    assert(atob('abcd '), 'i·\\x1D');\n    assertThrows(() => atob(' abcd==='));\n    assertThrows(() => atob('abcd=== '));\n    assertThrows(() => atob('abcd ==='));\n    assertThrows(() => atob('a'));\n    assert(atob('ab'), 'i');\n    assert(atob('abc'), 'i·');\n    assertThrows(() => atob('abcde'));\n    assertThrows(() => atob('𐀀'));\n    assertThrows(() => atob('='));\n    assertThrows(() => atob('=='));\n    assertThrows(() => atob('==='));\n    assertThrows(() => atob('===='));\n    assertThrows(() => atob('====='));\n    assertThrows(() => atob('a='));\n    assertThrows(() => atob('a=='));\n    assertThrows(() => atob('a==='));\n    assertThrows(() => atob('a===='));\n    assertThrows(() => atob('a====='));\n    assertThrows(() => atob('ab='));\n    assert(atob('ab=='), 'i');\n    assertThrows(() => atob('ab==='));\n    assertThrows(() => atob('ab===='));\n    assertThrows(() => atob('ab====='));\n    assert(atob('abc='), 'i·');\n    assertThrows(() => atob('abc=='));\n    assertThrows(() => atob('abc==='));\n    assertThrows(() => atob('abc===='));\n    assertThrows(() => atob('abc====='));\n    assertThrows(() => atob('abcd='));\n    assertThrows(() => atob('abcd=='));\n    assertThrows(() => atob('abcd==='));\n    assertThrows(() => atob('abcd===='));\n    assertThrows(() => atob('abcd====='));\n    assertThrows(() => atob('abcde='));\n    assertThrows(() => atob('abcde=='));\n    assertThrows(() => atob('abcde==='));\n    assertThrows(() => atob('abcde===='));\n    assertThrows(() => atob('abcde====='));\n    assertThrows(() => atob('=a'));\n    assertThrows(() => atob('=a='));\n    assertThrows(() => atob('a=b'));\n    assertThrows(() => atob('a=b='));\n    assertThrows(() => atob('ab=c'));\n    assertThrows(() => atob('ab=c='));\n    assertThrows(() => atob('abc=d'));\n    assertThrows(() => atob('abc=d='));\n    assertThrows(() => atob('ab\\u000Bcd'));\n    assertThrows(() => atob('ab\\u3000cd'));\n    assertThrows(() => atob('ab\\u3001cd'));\n    assert(atob('ab\\tcd'), 'i·\\x1D');\n    assert(atob('ab\\ncd'), 'i·\\x1D');\n    assert(atob('ab\\fcd'), 'i·\\x1D');\n    assert(atob('ab\\rcd'), 'i·\\x1D');\n    assert(atob('ab cd'), 'i·\\x1D');\n    assertThrows(() => atob('ab\\u00a0cd'));\n    assert(atob('ab\\t\\n\\f\\r cd'), 'i·\\x1D');\n    assert(atob(' \\t\\n\\f\\r ab\\t\\n\\f\\r cd\\t\\n\\f\\r '), 'i·\\x1D');\n    assert(atob('ab\\t\\n\\f\\r =\\t\\n\\f\\r =\\t\\n\\f\\r '), 'i');\n    assertThrows(() => atob('A'));\n    assert(atob('/A'), 'ü');\n    assert(atob('//A'), 'ÿð');\n    assert(atob('///A'), 'ÿÿÀ');\n    assertThrows(() => atob('////A'));\n    assertThrows(() => atob('/'));\n    assert(atob('A/'), '\\x03');\n    assert(atob('AA/'), '\\x00\\x0F');\n    assertThrows(() => atob('AAAA/'));\n    assert(atob('AAA/'), '\\x00\\x00?');\n    assertThrows(() => atob('\\u0000nonsense'));\n    assertThrows(() => atob('abcd\\u0000nonsense'));\n    assert(atob('YQ'), 'a');\n    assert(atob('YR'), 'a');\n    assertThrows(() => atob('~~'));\n    assertThrows(() => atob('..'));\n    assertThrows(() => atob('--'));\n    assertThrows(() => atob('__'));\n  }\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/byob.js",
    "content": "import { routes } from './routes';\nroutes.set('/byob', () => {\n  // eslint-disable-next-line no-undef\n  const stream = new ReadableStream({\n    type: 'bytes',\n    autoAllocateChunkSize: 1024,\n    async pull(controller) {\n      const view = controller.byobRequest.view;\n      view[0] = 104;\n      view[1] = 101;\n      view[2] = 121;\n      view[3] = 51;\n      controller.byobRequest.respond(4);\n      controller.close();\n    },\n  });\n  return new Response(stream);\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/byte-repeater.js",
    "content": "/* eslint-env serviceworker */\n\nimport { CacheOverride } from 'fastly:cache-override';\nimport { routes } from './routes';\n\nroutes.set('/byte-repeater', () => {\n  let headers = new Headers();\n  headers.set('AssemblyScriptHeader', 'AssemblyScriptValue');\n\n  let streamController;\n  let stream = new ReadableStream({\n    start: (controller) => {\n      streamController = controller;\n    },\n  });\n  let response = new Response(stream, {\n    headers,\n  });\n\n  // Make a request upstream\n  let upstreamRequest = new Request(\n    'https://compute-sdk-test-backend.edgecompute.app/byte_repeater',\n  );\n  upstreamRequest.setCacheOverride(new CacheOverride('pass'));\n  fetch(upstreamRequest, {\n    backend: 'TheOrigin',\n  }).then(async (upstreamResponse) => {\n    let body = upstreamResponse.body;\n    let streamReader = body.getReader();\n\n    // eslint-disable-next-line no-constant-condition\n    while (true) {\n      let chunk = await streamReader.read();\n\n      // Check if we are done\n      if (chunk.done) {\n        break;\n      }\n\n      if (chunk.value.byteLength == 0) {\n        continue;\n      }\n\n      // Otherwise get the byte and repeat them\n      let upstreamBytes = chunk.value;\n      let downstreamBytes = new Uint8Array(upstreamBytes.length * 2);\n      for (let i = 0; i < upstreamBytes.length; i++) {\n        let downstreamIndex = i * 2;\n        downstreamBytes[downstreamIndex] = upstreamBytes[i];\n        downstreamBytes[downstreamIndex + 1] = upstreamBytes[i];\n      }\n\n      streamController.enqueue(downstreamBytes);\n    }\n    streamController.close();\n  });\n\n  // Send downstream (back to the client)\n  return response;\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/cache-core.js",
    "content": "/// <reference path=\"../../../../../types/index.d.ts\" />\n/* eslint-env serviceworker */\n\nimport {\n  assert,\n  assertDoesNotThrow,\n  assertThrows,\n  sleep,\n  streamToString,\n  assertResolves,\n} from './assertions.js';\nimport { routes } from './routes.js';\nimport {\n  CoreCache,\n  CacheEntry,\n  CacheState,\n  TransactionCacheEntry,\n} from 'fastly:cache';\nimport { FastlyBody } from 'fastly:body';\n\nfunction iteratableToStream(iterable) {\n  return new ReadableStream({\n    async pull(controller) {\n      for await (const value of iterable) {\n        controller.enqueue(value);\n      }\n      controller.close();\n    },\n  });\n}\n\nlet createdLion = false;\nfunction ensureLion() {\n  if (createdLion) return;\n  const writer = CoreCache.insert('lion', {\n    maxAge: 600_000,\n  });\n  writer.append('raar');\n  writer.close();\n  createdLion = true;\n}\n\n// FastlyBody\n{\n  routes.set('/FastlyBody/interface', () => {\n    let actual = Reflect.ownKeys(FastlyBody);\n    let expected = ['prototype', 'length', 'name'];\n    assert(actual, expected, `Reflect.ownKeys(FastlyBody)`);\n\n    // Check the prototype descriptors are correct\n    {\n      actual = Reflect.getOwnPropertyDescriptor(FastlyBody, 'prototype');\n      expected = {\n        value: FastlyBody.prototype,\n        writable: false,\n        enumerable: false,\n        configurable: false,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(FastlyBody, 'prototype')`,\n      );\n    }\n\n    // Check the constructor function's defined parameter length is correct\n    {\n      actual = Reflect.getOwnPropertyDescriptor(FastlyBody, 'length');\n      expected = {\n        value: 0,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(FastlyBody, 'length')`,\n      );\n    }\n\n    // Check the constructor function's name is correct\n    {\n      actual = Reflect.getOwnPropertyDescriptor(FastlyBody, 'name');\n      expected = {\n        value: 'FastlyBody',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(FastlyBody, 'name')`,\n      );\n    }\n\n    // Check the prototype has the correct keys\n    {\n      actual = Reflect.ownKeys(FastlyBody.prototype);\n      expected = [\n        'constructor',\n        'concat',\n        'read',\n        'append',\n        'prepend',\n        'close',\n        'abandon',\n        Symbol.toStringTag,\n      ];\n      assert(actual, expected, `Reflect.ownKeys(FastlyBody.prototype)`);\n    }\n\n    // Check the constructor on the prototype is correct\n    {\n      actual = Reflect.getOwnPropertyDescriptor(\n        FastlyBody.prototype,\n        'constructor',\n      );\n      expected = {\n        writable: true,\n        enumerable: false,\n        configurable: true,\n        value: FastlyBody.prototype.constructor,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(FastlyBody.prototype, 'constructor')`,\n      );\n\n      assert(\n        typeof FastlyBody.prototype.constructor,\n        'function',\n        `typeof FastlyBody.prototype.constructor`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        FastlyBody.prototype.constructor,\n        'length',\n      );\n      expected = {\n        value: 0,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(FastlyBody.prototype.constructor, 'length')`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        FastlyBody.prototype.constructor,\n        'name',\n      );\n      expected = {\n        value: 'FastlyBody',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(FastlyBody.prototype.constructor, 'name')`,\n      );\n    }\n\n    // Check the Symbol.toStringTag on the prototype is correct\n    {\n      actual = Reflect.getOwnPropertyDescriptor(\n        FastlyBody.prototype,\n        Symbol.toStringTag,\n      );\n      expected = {\n        writable: false,\n        enumerable: false,\n        configurable: true,\n        value: 'FastlyBody',\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(FastlyBody.prototype, [Symbol.toStringTag])`,\n      );\n\n      assert(\n        typeof FastlyBody.prototype[Symbol.toStringTag],\n        'string',\n        `typeof FastlyBody.prototype[Symbol.toStringTag]`,\n      );\n    }\n\n    // Check the concat method has correct descriptors, length and name\n    {\n      actual = Reflect.getOwnPropertyDescriptor(FastlyBody.prototype, 'concat');\n      expected = {\n        writable: true,\n        enumerable: true,\n        configurable: true,\n        value: FastlyBody.prototype.concat,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(FastlyBody.prototype, 'concat')`,\n      );\n\n      assert(\n        typeof FastlyBody.prototype.concat,\n        'function',\n        `typeof FastlyBody.prototype.concat`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        FastlyBody.prototype.concat,\n        'length',\n      );\n      expected = {\n        value: 1,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(FastlyBody.prototype.concat, 'length')`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        FastlyBody.prototype.concat,\n        'name',\n      );\n      expected = {\n        value: 'concat',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(FastlyBody.prototype.concat, 'name')`,\n      );\n    }\n\n    // Check the read method has correct descriptors, length and name\n    {\n      actual = Reflect.getOwnPropertyDescriptor(FastlyBody.prototype, 'read');\n      expected = {\n        writable: true,\n        enumerable: true,\n        configurable: true,\n        value: FastlyBody.prototype.read,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(FastlyBody.prototype, 'read')`,\n      );\n\n      assert(\n        typeof FastlyBody.prototype.read,\n        'function',\n        `typeof FastlyBody.prototype.read`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        FastlyBody.prototype.read,\n        'length',\n      );\n      expected = {\n        value: 1,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(FastlyBody.prototype.read, 'length')`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        FastlyBody.prototype.read,\n        'name',\n      );\n      expected = {\n        value: 'read',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(FastlyBody.prototype.read, 'name')`,\n      );\n    }\n\n    // Check the append method has correct descriptors, length and name\n    {\n      actual = Reflect.getOwnPropertyDescriptor(FastlyBody.prototype, 'append');\n      expected = {\n        writable: true,\n        enumerable: true,\n        configurable: true,\n        value: FastlyBody.prototype.append,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(FastlyBody.prototype, 'append')`,\n      );\n\n      assert(\n        typeof FastlyBody.prototype.append,\n        'function',\n        `typeof FastlyBody.prototype.append`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        FastlyBody.prototype.append,\n        'length',\n      );\n      expected = {\n        value: 1,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(FastlyBody.prototype.append, 'length')`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        FastlyBody.prototype.append,\n        'name',\n      );\n      expected = {\n        value: 'append',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(FastlyBody.prototype.append, 'name')`,\n      );\n    }\n\n    // Check the prepend method has correct descriptors, length and name\n    {\n      actual = Reflect.getOwnPropertyDescriptor(\n        FastlyBody.prototype,\n        'prepend',\n      );\n      expected = {\n        writable: true,\n        enumerable: true,\n        configurable: true,\n        value: FastlyBody.prototype.prepend,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(FastlyBody.prototype, 'prepend')`,\n      );\n\n      assert(\n        typeof FastlyBody.prototype.prepend,\n        'function',\n        `typeof FastlyBody.prototype.prepend`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        FastlyBody.prototype.prepend,\n        'length',\n      );\n      expected = {\n        value: 1,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(FastlyBody.prototype.prepend, 'length')`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        FastlyBody.prototype.prepend,\n        'name',\n      );\n      expected = {\n        value: 'prepend',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(FastlyBody.prototype.prepend, 'name')`,\n      );\n    }\n\n    // Check the close method has correct descriptors, length and name\n    {\n      actual = Reflect.getOwnPropertyDescriptor(FastlyBody.prototype, 'close');\n      expected = {\n        writable: true,\n        enumerable: true,\n        configurable: true,\n        value: FastlyBody.prototype.close,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(FastlyBody.prototype, 'close')`,\n      );\n\n      assert(\n        typeof FastlyBody.prototype.close,\n        'function',\n        `typeof FastlyBody.prototype.close`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        FastlyBody.prototype.close,\n        'length',\n      );\n      expected = {\n        value: 0,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(FastlyBody.prototype.close, 'length')`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        FastlyBody.prototype.close,\n        'name',\n      );\n      expected = {\n        value: 'close',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(FastlyBody.prototype.close, 'name')`,\n      );\n    }\n  });\n\n  // constructor\n  {\n    routes.set('/FastlyBody/constructor/called-as-regular-function', () => {\n      assertThrows(() => {\n        FastlyBody();\n      }, TypeError);\n    });\n    routes.set('/FastlyBody/constructor/called-as-constructor', () => {\n      assertDoesNotThrow(() => new FastlyBody());\n    });\n  }\n  // append(data: BodyInit): void;\n  {\n    routes.set('/FastlyBody/append/called-as-constructor', () => {\n      assertThrows(() => {\n        new FastlyBody.append('1');\n      }, TypeError);\n    });\n    routes.set('/FastlyBody/append/data-parameter-not-supplied', () => {\n      assertThrows(\n        () => {\n          const body = new FastlyBody();\n          body.append();\n        },\n        TypeError,\n        `append: At least 1 argument required, but only 0 passed`,\n      );\n    });\n    routes.set('/FastlyBody/append/data-parameter-wrong-type', () => {\n      assertThrows(() => {\n        const body = new FastlyBody();\n        body.append(Symbol());\n      });\n    });\n    // - ReadableStream\n    routes.set(\n      '/FastlyBody/append/data-parameter-readablestream-guest-backed',\n      () => {\n        // TODO: update this when streams are supported\n        assertThrows(\n          () => {\n            const stream = iteratableToStream([]);\n            const body = new FastlyBody();\n            body.append(stream);\n          },\n          TypeError,\n          `Content-provided streams are not yet supported for appending onto a FastlyBody`,\n        );\n      },\n    );\n    routes.set(\n      '/FastlyBody/append/data-parameter-readablestream-host-backed',\n      async () => {\n        const res = await fetch(\n          'https://compute-sdk-test-backend.edgecompute.app/',\n          {\n            backend: 'TheOrigin',\n          },\n        );\n        const body = new FastlyBody();\n        let result = body.append(res.body);\n        assert(result, undefined, `body.append(res.body)`);\n      },\n    );\n    // - URLSearchParams\n    routes.set('/FastlyBody/append/data-parameter-URLSearchParams', () => {\n      const items = [\n        new URLSearchParams(),\n        new URLSearchParams({ a: 'b', c: 'd' }),\n      ];\n      const body = new FastlyBody();\n      for (const searchParams of items) {\n        let result = body.append(searchParams);\n        assert(result, undefined, `await body.append(searchParams)`);\n      }\n    });\n    // - USV strings\n    routes.set('/FastlyBody/append/data-parameter-strings', () => {\n      const strings = [\n        // empty\n        '',\n        // lone surrogate\n        '\\uD800',\n        // surrogate pair\n        '𠈓',\n        String('carrot'),\n      ];\n      const body = new FastlyBody();\n      for (const string of strings) {\n        let result = body.append(string);\n        assert(result, undefined, `body.append(string)`);\n      }\n    });\n    // https://tc39.es/ecma262/#sec-tostring\n    routes.set(\n      '/FastlyBody/append/data-parameter-calls-7.1.17-ToString',\n      () => {\n        let sentinel;\n        const test = () => {\n          sentinel = Symbol();\n          const value = {\n            toString() {\n              throw sentinel;\n            },\n          };\n          const body = new FastlyBody();\n          body.append(value);\n        };\n        assertThrows(test);\n        try {\n          test();\n        } catch (thrownError) {\n          assert(thrownError, sentinel, 'thrownError === sentinel');\n        }\n        assertThrows(\n          () => {\n            const body = new FastlyBody();\n            body.append(Symbol());\n          },\n          TypeError,\n          `can't convert symbol to string`,\n        );\n      },\n    );\n\n    // - buffer source\n    routes.set('/FastlyBody/append/data-parameter-buffer', () => {\n      const typedArrayConstructors = [\n        Int8Array,\n        Int16Array,\n        Int32Array,\n        Float32Array,\n        Float64Array,\n        BigInt64Array,\n        Uint8Array,\n        Uint8ClampedArray,\n        Uint16Array,\n        Uint32Array,\n        BigUint64Array,\n      ];\n      const body = new FastlyBody();\n      for (const constructor of typedArrayConstructors) {\n        const typedArray = new constructor(8);\n        let result = body.append(typedArray.buffer);\n        assert(result, undefined, `body.append(typedArray.buffer)`);\n      }\n    });\n    routes.set('/FastlyBody/append/data-parameter-arraybuffer', () => {\n      const typedArrayConstructors = [\n        Int8Array,\n        Int16Array,\n        Int32Array,\n        Float32Array,\n        Float64Array,\n        BigInt64Array,\n        Uint8Array,\n        Uint8ClampedArray,\n        Uint16Array,\n        Uint32Array,\n        BigUint64Array,\n      ];\n      const body = new FastlyBody();\n      for (const constructor of typedArrayConstructors) {\n        const typedArray = new constructor(8);\n        let result = body.append(typedArray.buffer);\n        assert(result, undefined, `body.append(typedArray.buffer)`);\n      }\n    });\n    routes.set('/FastlyBody/append/data-parameter-typed-arrays', () => {\n      const typedArrayConstructors = [\n        Int8Array,\n        Int16Array,\n        Int32Array,\n        Float32Array,\n        Float64Array,\n        BigInt64Array,\n        Uint8Array,\n        Uint8ClampedArray,\n        Uint16Array,\n        Uint32Array,\n        BigUint64Array,\n      ];\n      const body = new FastlyBody();\n      for (const constructor of typedArrayConstructors) {\n        const typedArray = new constructor(8);\n        let result = body.append(typedArray);\n        assert(result, undefined, `body.append(typedArray)`);\n      }\n    });\n    routes.set('/FastlyBody/append/data-parameter-dataview', () => {\n      const typedArrayConstructors = [\n        Int8Array,\n        Uint8Array,\n        Uint8ClampedArray,\n        Int16Array,\n        Uint16Array,\n        Int32Array,\n        Uint32Array,\n        Float32Array,\n        Float64Array,\n        BigInt64Array,\n        BigUint64Array,\n      ];\n      const body = new FastlyBody();\n      for (const constructor of typedArrayConstructors) {\n        const typedArray = new constructor(8);\n        const view = new DataView(typedArray.buffer);\n        let result = body.append(view);\n        assert(result, undefined, `body.append(typedArray)`);\n      }\n    });\n  }\n  // prepend(data: BodyInit): void;\n  {\n    routes.set('/FastlyBody/prepend/called-as-constructor', () => {\n      assertThrows(() => {\n        new FastlyBody.prepend('1');\n      }, TypeError);\n    });\n    routes.set('/FastlyBody/prepend/data-parameter-not-supplied', () => {\n      assertThrows(\n        () => {\n          const body = new FastlyBody();\n          body.prepend();\n        },\n        TypeError,\n        `prepend: At least 1 argument required, but only 0 passed`,\n      );\n    });\n    routes.set('/FastlyBody/prepend/data-parameter-wrong-type', () => {\n      assertThrows(() => {\n        const body = new FastlyBody();\n        body.prepend(Symbol());\n      });\n    });\n    // - ReadableStream\n    routes.set(\n      '/FastlyBody/prepend/data-parameter-readablestream-guest-backed',\n      () => {\n        // TODO: update this when streams are supported\n        assertThrows(\n          () => {\n            const stream = iteratableToStream([]);\n            const body = new FastlyBody();\n            body.prepend(stream);\n          },\n          TypeError,\n          `Content-provided streams are not yet supported for prepending onto a FastlyBody`,\n        );\n      },\n    );\n    routes.set(\n      '/FastlyBody/prepend/data-parameter-readablestream-host-backed',\n      async () => {\n        const res = await fetch(\n          'https://compute-sdk-test-backend.edgecompute.app/',\n          {\n            backend: 'TheOrigin',\n          },\n        );\n        const body = new FastlyBody();\n        let result = body.prepend(res.body);\n        assert(result, undefined, `body.prepend(res.body)`);\n      },\n    );\n    routes.set(\n      '/FastlyBody/prepend/data-parameter-readablestream-locked',\n      () => {\n        const stream = iteratableToStream([]);\n        // getReader() causes the stream to become locked\n        stream.getReader();\n        const body = new FastlyBody();\n        assertThrows(\n          () => {\n            body.prepend(stream);\n          },\n          TypeError,\n          `Can't use a ReadableStream that's locked or has ever been read from or canceled`,\n        );\n      },\n    );\n\n    // - URLSearchParams\n    routes.set('/FastlyBody/prepend/data-parameter-URLSearchParams', () => {\n      const items = [\n        new URLSearchParams(),\n        new URLSearchParams({ a: 'b', c: 'd' }),\n      ];\n      const body = new FastlyBody();\n      for (const searchParams of items) {\n        let result = body.prepend(searchParams);\n        assert(result, undefined, `await body.prepend(searchParams)`);\n      }\n    });\n    // - USV strings\n    routes.set('/FastlyBody/prepend/data-parameter-strings', () => {\n      const strings = [\n        // empty\n        '',\n        // lone surrogate\n        '\\uD800',\n        // surrogate pair\n        '𠈓',\n        String('carrot'),\n      ];\n      const body = new FastlyBody();\n      for (const string of strings) {\n        let result = body.prepend(string);\n        assert(result, undefined, `body.prepend(string)`);\n      }\n    });\n    // https://tc39.es/ecma262/#sec-tostring\n    routes.set(\n      '/FastlyBody/prepend/data-parameter-calls-7.1.17-ToString',\n      () => {\n        let sentinel;\n        const test = () => {\n          sentinel = Symbol();\n          const value = {\n            toString() {\n              throw sentinel;\n            },\n          };\n          const body = new FastlyBody();\n          body.prepend(value);\n        };\n        assertThrows(test);\n        try {\n          test();\n        } catch (thrownError) {\n          assert(thrownError, sentinel, 'thrownError === sentinel');\n        }\n        assertThrows(\n          () => {\n            const body = new FastlyBody();\n            body.prepend(Symbol());\n          },\n          TypeError,\n          `can't convert symbol to string`,\n        );\n      },\n    );\n\n    // - buffer source\n    routes.set('/FastlyBody/prepend/data-parameter-buffer', () => {\n      const typedArrayConstructors = [\n        Int8Array,\n        Int16Array,\n        Int32Array,\n        Float32Array,\n        Float64Array,\n        BigInt64Array,\n        Uint8Array,\n        Uint8ClampedArray,\n        Uint16Array,\n        Uint32Array,\n        BigUint64Array,\n      ];\n      const body = new FastlyBody();\n      for (const constructor of typedArrayConstructors) {\n        const typedArray = new constructor(8);\n        let result = body.prepend(typedArray.buffer);\n        assert(result, undefined, `body.prepend(typedArray.buffer)`);\n      }\n    });\n    routes.set('/FastlyBody/prepend/data-parameter-arraybuffer', () => {\n      const typedArrayConstructors = [\n        Int8Array,\n        Int16Array,\n        Int32Array,\n        Float32Array,\n        Float64Array,\n        BigInt64Array,\n        Uint8Array,\n        Uint8ClampedArray,\n        Uint16Array,\n        Uint32Array,\n        BigUint64Array,\n      ];\n      const body = new FastlyBody();\n      for (const constructor of typedArrayConstructors) {\n        const typedArray = new constructor(8);\n        let result = body.prepend(typedArray.buffer);\n        assert(result, undefined, `body.prepend(typedArray.buffer)`);\n      }\n    });\n    routes.set('/FastlyBody/prepend/data-parameter-typed-arrays', () => {\n      const typedArrayConstructors = [\n        Int8Array,\n        Int16Array,\n        Int32Array,\n        Float32Array,\n        Float64Array,\n        BigInt64Array,\n        Uint8Array,\n        Uint8ClampedArray,\n        Uint16Array,\n        Uint32Array,\n        BigUint64Array,\n      ];\n      const body = new FastlyBody();\n      for (const constructor of typedArrayConstructors) {\n        const typedArray = new constructor(8);\n        let result = body.prepend(typedArray);\n        assert(result, undefined, `body.prepend(typedArray)`);\n      }\n    });\n    routes.set('/FastlyBody/prepend/data-parameter-dataview', () => {\n      const typedArrayConstructors = [\n        Int8Array,\n        Uint8Array,\n        Uint8ClampedArray,\n        Int16Array,\n        Uint16Array,\n        Int32Array,\n        Uint32Array,\n        Float32Array,\n        Float64Array,\n        BigInt64Array,\n        BigUint64Array,\n      ];\n      const body = new FastlyBody();\n      for (const constructor of typedArrayConstructors) {\n        const typedArray = new constructor(8);\n        const view = new DataView(typedArray.buffer);\n        let result = body.prepend(view);\n        assert(result, undefined, `body.prepend(typedArray)`);\n      }\n    });\n  }\n  // concat(dest: FastlyBody): void;\n  {\n    routes.set('/FastlyBody/concat/called-as-constructor', () => {\n      assertThrows(() => {\n        new FastlyBody.concat(new FastlyBody());\n      }, TypeError);\n    });\n    routes.set('/FastlyBody/concat/dest-parameter-not-supplied', () => {\n      assertThrows(\n        () => {\n          const body = new FastlyBody();\n          body.concat();\n        },\n        TypeError,\n        `concat: At least 1 argument required, but only 0 passed`,\n      );\n    });\n    routes.set('/FastlyBody/concat/dest-parameter-wrong-type', () => {\n      assertThrows(() => {\n        const body = new FastlyBody();\n        body.concat('hello');\n      });\n    });\n    routes.set('/FastlyBody/concat/concat-same-fastlybody-twice', () => {\n      assertThrows(() => {\n        const body = new FastlyBody();\n        const body2 = new FastlyBody();\n        body.concat(body2);\n        body.concat(body2);\n      });\n    });\n    routes.set('/FastlyBody/concat/happy-path', () => {\n      assertDoesNotThrow(() => {\n        const body = new FastlyBody();\n        body.concat(new FastlyBody());\n      });\n    });\n  }\n  // read(chunkSize: number): ArrayBuffer;\n  {\n    routes.set('/FastlyBody/read/called-as-constructor', () => {\n      assertThrows(() => {\n        new FastlyBody.read(1);\n      }, TypeError);\n    });\n    routes.set('/FastlyBody/read/chunkSize-parameter-not-supplied', () => {\n      assertThrows(\n        () => {\n          const body = new FastlyBody();\n          body.read();\n        },\n        TypeError,\n        `read: At least 1 argument required, but only 0 passed`,\n      );\n    });\n    routes.set('/FastlyBody/read/chunkSize-parameter-wrong-type', () => {\n      assertThrows(() => {\n        const body = new FastlyBody();\n        body.read(Symbol());\n      });\n    });\n    // negative\n    routes.set('/FastlyBody/read/chunkSize-parameter-negative', () => {\n      assertThrows(() => {\n        const body = new FastlyBody();\n        body.append('hello world');\n        body.read(-1);\n      });\n    });\n    // infinity\n    routes.set('/FastlyBody/read/chunkSize-parameter-infinity', () => {\n      assertThrows(() => {\n        const body = new FastlyBody();\n        body.append('hello world');\n        body.read(Infinity);\n      });\n    });\n    // NaN\n    routes.set('/FastlyBody/read/chunkSize-parameter-NaN', () => {\n      assertThrows(() => {\n        const body = new FastlyBody();\n        body.append('hello world');\n        body.read(NaN);\n      });\n    });\n    routes.set('/FastlyBody/read/happy-path', () => {\n      const body = new FastlyBody();\n      body.append('world');\n      body.prepend('hello ');\n      const body2 = new FastlyBody();\n      body2.append('!');\n      body.concat(body2);\n      const decoder = new TextDecoder();\n      let result = decoder.decode(body.read(1));\n      assert(result, 'h', `body.read(1)`);\n      result = decoder.decode(body.read(1));\n      assert(result, 'e', `body.read(1)`);\n    });\n  }\n  // close(): void;\n  {\n    routes.set('/FastlyBody/close/called-as-constructor', () => {\n      assertThrows(() => {\n        new CoreCache.lookup('1');\n      }, TypeError);\n    });\n    routes.set('/FastlyBody/close/called-once', () => {\n      assertThrows(\n        () => {\n          CoreCache.lookup();\n        },\n        TypeError,\n        `CoreCache.lookup: At least 1 argument required, but only 0 passed`,\n      );\n    });\n    routes.set('/FastlyBody/close/called-twice', () => {\n      assertThrows(() => {\n        CoreCache.lookup('cat', { headers: '' });\n      });\n    });\n  }\n}\n\n// CoreCache\n{\n  routes.set('/core-cache/interface', () => {\n    let actual = Reflect.ownKeys(CoreCache);\n    let expected = [\n      'prototype',\n      'lookup',\n      'insert',\n      'transactionLookup',\n      'length',\n      'name',\n    ];\n    assert(actual, expected, `Reflect.ownKeys(CoreCache)`);\n\n    // Check the prototype descriptors are correct\n    {\n      actual = Reflect.getOwnPropertyDescriptor(CoreCache, 'prototype');\n      expected = {\n        value: CoreCache.prototype,\n        writable: false,\n        enumerable: false,\n        configurable: false,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CoreCache, 'prototype')`,\n      );\n    }\n\n    // Check the constructor function's defined parameter length is correct\n    {\n      actual = Reflect.getOwnPropertyDescriptor(CoreCache, 'length');\n      expected = {\n        value: 0,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CoreCache, 'length')`,\n      );\n    }\n\n    // Check the constructor function's name is correct\n    {\n      actual = Reflect.getOwnPropertyDescriptor(CoreCache, 'name');\n      expected = {\n        value: 'CoreCache',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CoreCache, 'name')`,\n      );\n    }\n\n    // Check the prototype has the correct keys\n    {\n      actual = Reflect.ownKeys(CoreCache.prototype);\n      expected = ['constructor', Symbol.toStringTag];\n      assert(actual, expected, `Reflect.ownKeys(CoreCache.prototype)`);\n    }\n\n    // Check the constructor on the prototype is correct\n    {\n      actual = Reflect.getOwnPropertyDescriptor(\n        CoreCache.prototype,\n        'constructor',\n      );\n      expected = {\n        writable: true,\n        enumerable: false,\n        configurable: true,\n        value: CoreCache.prototype.constructor,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CoreCache.prototype, 'constructor')`,\n      );\n\n      assert(\n        typeof CoreCache.prototype.constructor,\n        'function',\n        `typeof CoreCache.prototype.constructor`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        CoreCache.prototype.constructor,\n        'length',\n      );\n      expected = {\n        value: 0,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CoreCache.prototype.constructor, 'length')`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        CoreCache.prototype.constructor,\n        'name',\n      );\n      expected = {\n        value: 'CoreCache',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CoreCache.prototype.constructor, 'name')`,\n      );\n    }\n\n    // Check the Symbol.toStringTag on the prototype is correct\n    {\n      actual = Reflect.getOwnPropertyDescriptor(\n        CoreCache.prototype,\n        Symbol.toStringTag,\n      );\n      expected = {\n        writable: false,\n        enumerable: false,\n        configurable: true,\n        value: 'CoreCache',\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CoreCache.prototype, [Symbol.toStringTag])`,\n      );\n\n      assert(\n        typeof CoreCache.prototype[Symbol.toStringTag],\n        'string',\n        `typeof CoreCache.prototype[Symbol.toStringTag]`,\n      );\n    }\n\n    // Check the lookup static method has correct descriptors, length and name\n    {\n      actual = Reflect.getOwnPropertyDescriptor(CoreCache, 'lookup');\n      expected = {\n        writable: true,\n        enumerable: true,\n        configurable: true,\n        value: CoreCache.lookup,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CoreCache, 'lookup')`,\n      );\n\n      assert(typeof CoreCache.lookup, 'function', `typeof CoreCache.lookup`);\n\n      actual = Reflect.getOwnPropertyDescriptor(CoreCache.lookup, 'length');\n      expected = {\n        value: 1,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CoreCache.lookup, 'length')`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(CoreCache.lookup, 'name');\n      expected = {\n        value: 'lookup',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CoreCache.lookup, 'name')`,\n      );\n    }\n\n    // Check the insert static method has correct descriptors, length and name\n    {\n      actual = Reflect.getOwnPropertyDescriptor(CoreCache, 'insert');\n      expected = {\n        writable: true,\n        enumerable: true,\n        configurable: true,\n        value: CoreCache.insert,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CoreCache, 'insert')`,\n      );\n\n      assert(typeof CoreCache.insert, 'function', `typeof CoreCache.insert`);\n\n      actual = Reflect.getOwnPropertyDescriptor(CoreCache.insert, 'length');\n      expected = {\n        value: 2,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CoreCache.insert, 'length')`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(CoreCache.insert, 'name');\n      expected = {\n        value: 'insert',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CoreCache.insert, 'name')`,\n      );\n    }\n\n    // Check the transactionLookup static method has correct descriptors, length and name\n    {\n      actual = Reflect.getOwnPropertyDescriptor(CoreCache, 'transactionLookup');\n      expected = {\n        writable: true,\n        enumerable: true,\n        configurable: true,\n        value: CoreCache.transactionLookup,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CoreCache, 'transactionLookup')`,\n      );\n\n      assert(\n        typeof CoreCache.transactionLookup,\n        'function',\n        `typeof CoreCache.transactionLookup`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        CoreCache.transactionLookup,\n        'length',\n      );\n      expected = {\n        value: 1,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CoreCache.transactionLookup, 'length')`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        CoreCache.transactionLookup,\n        'name',\n      );\n      expected = {\n        value: 'transactionLookup',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CoreCache.transactionLookup, 'name')`,\n      );\n    }\n  });\n\n  // CoreCache constructor\n  {\n    routes.set('/core-cache/constructor/called-as-regular-function', () => {\n      assertThrows(() => {\n        CoreCache();\n      }, TypeError);\n    });\n    routes.set('/core-cache/constructor/throws', () => {\n      assertThrows(() => new CoreCache(), TypeError);\n    });\n  }\n\n  // CoreCache lookup static method\n  // static lookup(key: string): CoreCacheEntry | null;\n  {\n    routes.set('/core-cache/lookup/called-as-constructor', () => {\n      assertThrows(() => {\n        new CoreCache.lookup('1');\n      }, TypeError);\n    });\n    // https://tc39.es/ecma262/#sec-tostring\n    routes.set('/core-cache/lookup/key-parameter-calls-7.1.17-ToString', () => {\n      let sentinel;\n      const test = () => {\n        sentinel = Symbol('sentinel');\n        const key = {\n          toString() {\n            throw sentinel;\n          },\n        };\n        CoreCache.lookup(key);\n      };\n      assertThrows(test);\n      try {\n        test();\n      } catch (thrownError) {\n        assert(thrownError, sentinel, 'thrownError === sentinel');\n      }\n      assertThrows(\n        () => {\n          CoreCache.lookup(Symbol());\n        },\n        TypeError,\n        `can't convert symbol to string`,\n      );\n    });\n    routes.set('/core-cache/lookup/key-parameter-not-supplied', () => {\n      assertThrows(\n        () => {\n          CoreCache.lookup();\n        },\n        TypeError,\n        `CoreCache.lookup: At least 1 argument required, but only 0 passed`,\n      );\n    });\n    routes.set('/core-cache/lookup/key-parameter-empty-string', () => {\n      assertThrows(\n        () => {\n          CoreCache.lookup('');\n        },\n        Error,\n        `CoreCache.lookup: key can not be an empty string`,\n      );\n    });\n    routes.set('/core-cache/lookup/key-parameter-8135-character-string', () => {\n      assertDoesNotThrow(() => {\n        const key = 'a'.repeat(8135);\n        CoreCache.lookup(key);\n      });\n    });\n    routes.set('/core-cache/lookup/key-parameter-8136-character-string', () => {\n      assertThrows(\n        () => {\n          const key = 'a'.repeat(8136);\n          CoreCache.lookup(key);\n        },\n        Error,\n        `CoreCache.lookup: key is too long, the maximum allowed length is 8135.`,\n      );\n    });\n    routes.set('/core-cache/lookup/key-does-not-exist-returns-null', () => {\n      let result = CoreCache.lookup(Math.random());\n      assert(result, null, `CoreCache.lookup(Math.random()) === null`);\n    });\n    routes.set('/core-cache/lookup/key-exists', () => {\n      let key = 'c'.repeat(8135);\n      let writer = CoreCache.insert(key, {\n        maxAge: 1000,\n      });\n      writer.append('meow');\n      writer.close();\n      let result = CoreCache.lookup(key);\n      assert(\n        result instanceof CacheEntry,\n        true,\n        `CoreCache.lookup('cat') instanceof CacheEntry`,\n      );\n    });\n\n    routes.set('/core-cache/lookup/options-parameter-none', () => {\n      ensureLion();\n      let entry;\n      assertDoesNotThrow(() => {\n        entry = CoreCache.lookup('lion');\n      });\n      assert(\n        entry instanceof CacheEntry,\n        true,\n        `CoreCache.lookup('lion', {headers:...}) instanceof CacheEntry`,\n      );\n    });\n    routes.set('/core-cache/lookup/options-parameter-wrong-type', () => {\n      ensureLion();\n      assertThrows(() => {\n        CoreCache.lookup('lion', '');\n      });\n    });\n    routes.set(\n      '/core-cache/lookup/options-parameter-headers-field-wrong-type',\n      () => {\n        ensureLion();\n        assertThrows(() => {\n          CoreCache.lookup('lion', { headers: '' });\n        });\n      },\n    );\n    routes.set(\n      '/core-cache/lookup/options-parameter-headers-field-undefined',\n      () => {\n        ensureLion();\n        let entry;\n        assertDoesNotThrow(() => {\n          entry = CoreCache.lookup('lion', { headers: undefined });\n        });\n        assert(\n          entry instanceof CacheEntry,\n          true,\n          `CoreCache.lookup('lion', {headers:...}) instanceof CacheEntry`,\n        );\n      },\n    );\n    routes.set(\n      '/core-cache/lookup/options-parameter-headers-field-valid-sequence',\n      () => {\n        ensureLion();\n        let entry;\n        assertDoesNotThrow(() => {\n          entry = CoreCache.lookup('lion', {\n            headers: [\n              ['user-agent', 'Aki 1.0'],\n              ['Accept-Encoding', 'br'],\n            ],\n          });\n        });\n        assert(\n          entry instanceof CacheEntry,\n          true,\n          `CoreCache.lookup('lion', {headers:...}) instanceof CacheEntry`,\n        );\n      },\n    );\n    routes.set(\n      '/core-cache/lookup/options-parameter-headers-field-valid-record',\n      () => {\n        ensureLion();\n        let entry;\n        assertDoesNotThrow(() => {\n          entry = CoreCache.lookup('lion', {\n            headers: {\n              'user-agent': 'Aki 1.0',\n              'Accept-Encoding': 'br',\n            },\n          });\n        });\n        assert(\n          entry instanceof CacheEntry,\n          true,\n          `CoreCache.lookup('lion', {headers:...}) instanceof CacheEntry`,\n        );\n      },\n    );\n    routes.set(\n      '/core-cache/lookup/options-parameter-headers-field-valid-Headers-instance',\n      () => {\n        ensureLion();\n        let entry;\n        assertDoesNotThrow(() => {\n          entry = CoreCache.lookup('lion', {\n            headers: new Headers({\n              'user-agent': 'Aki 1.0',\n              'Accept-Encoding': 'br',\n            }),\n          });\n        });\n        assert(\n          entry instanceof CacheEntry,\n          true,\n          `CoreCache.lookup('lion', {headers:...}) instanceof CacheEntry`,\n        );\n      },\n    );\n  }\n\n  // static insert(key: string, options: InsertOptions): FastlyBody;\n  {\n    routes.set('/core-cache/insert/called-as-constructor', () => {\n      assertThrows(() => {\n        new CoreCache.insert('1', { maxAge: 1 });\n      }, TypeError);\n    });\n    // https://tc39.es/ecma262/#sec-tostring\n    routes.set('/core-cache/insert/key-parameter-calls-7.1.17-ToString', () => {\n      let sentinel;\n      const test = () => {\n        sentinel = Symbol('sentinel');\n        const key = {\n          toString() {\n            throw sentinel;\n          },\n        };\n        CoreCache.insert(key, { maxAge: 1 });\n      };\n      assertThrows(test);\n      try {\n        test();\n      } catch (thrownError) {\n        assert(thrownError, sentinel, 'thrownError === sentinel');\n      }\n      assertThrows(\n        () => {\n          CoreCache.insert(Symbol(), { maxAge: 1 });\n        },\n        TypeError,\n        `can't convert symbol to string`,\n      );\n    });\n    routes.set('/core-cache/insert/key-parameter-not-supplied', () => {\n      assertThrows(\n        () => {\n          CoreCache.insert();\n        },\n        TypeError,\n        `CoreCache.insert: At least 2 arguments required, but only 0 passed`,\n      );\n    });\n    routes.set('/core-cache/insert/key-parameter-empty-string', () => {\n      assertThrows(\n        () => {\n          CoreCache.insert('', { maxAge: 1 });\n        },\n        Error,\n        `CoreCache.insert: key can not be an empty string`,\n      );\n    });\n    routes.set('/core-cache/insert/key-parameter-8135-character-string', () => {\n      assertDoesNotThrow(() => {\n        const key = 'a'.repeat(8135);\n        CoreCache.insert(key, { maxAge: 1 });\n      });\n    });\n    routes.set('/core-cache/insert/key-parameter-8136-character-string', () => {\n      assertThrows(\n        () => {\n          const key = 'a'.repeat(8136);\n          CoreCache.insert(key, { maxAge: 1 });\n        },\n        Error,\n        `CoreCache.insert: key is too long, the maximum allowed length is 8135.`,\n      );\n    });\n    routes.set('/core-cache/insert/options-parameter-wrong-type', () => {\n      assertThrows(() => {\n        CoreCache.insert('cat', '');\n      });\n    });\n    routes.set(\n      '/core-cache/insert/options-parameter-headers-field-wrong-type',\n      () => {\n        assertThrows(() => {\n          CoreCache.insert('cat', { headers: '', maxAge: 1 });\n        });\n      },\n    );\n    routes.set(\n      '/core-cache/insert/options-parameter-headers-field-undefined',\n      () => {\n        let body;\n        assertDoesNotThrow(() => {\n          body = CoreCache.insert('cat', { headers: undefined, maxAge: 1 });\n        });\n        assert(\n          body instanceof FastlyBody,\n          true,\n          `CoreCache.insert('cat', {headers:undefined}) instanceof FastlyBody`,\n        );\n      },\n    );\n    routes.set(\n      '/core-cache/insert/options-parameter-headers-field-valid-sequence',\n      () => {\n        let body;\n        assertDoesNotThrow(() => {\n          body = CoreCache.insert('cat', {\n            headers: [\n              ['user-agent', 'Aki 1.0'],\n              ['Accept-Encoding', 'br'],\n            ],\n            maxAge: 1,\n          });\n        });\n        assert(\n          body instanceof FastlyBody,\n          true,\n          `CoreCache.insert('cat', {headers:undefined}) instanceof FastlyBody`,\n        );\n      },\n    );\n    routes.set(\n      '/core-cache/insert/options-parameter-headers-field-valid-record',\n      () => {\n        let body;\n        assertDoesNotThrow(() => {\n          body = CoreCache.insert('cat', {\n            headers: {\n              'user-agent': 'Aki 1.0',\n              'Accept-Encoding': 'br',\n            },\n            maxAge: 1,\n          });\n        });\n        assert(\n          body instanceof FastlyBody,\n          true,\n          `CoreCache.insert('cat', {headers:undefined}) instanceof FastlyBody`,\n        );\n      },\n    );\n    routes.set(\n      '/core-cache/insert/options-parameter-headers-field-valid-Headers-instance',\n      () => {\n        let body;\n        assertDoesNotThrow(() => {\n          body = CoreCache.insert('cat', {\n            headers: new Headers({\n              'user-agent': 'Aki 1.0',\n              'Accept-Encoding': 'br',\n            }),\n            maxAge: 1,\n          });\n        });\n        assert(\n          body instanceof FastlyBody,\n          true,\n          `CoreCache.insert('cat', {headers:undefined}) instanceof FastlyBody`,\n        );\n      },\n    );\n    routes.set(\n      '/core-cache/insert/options-parameter-maxAge-field-valid-record',\n      () => {\n        let body;\n        assertDoesNotThrow(() => {\n          body = CoreCache.insert('cat', { maxAge: 1 });\n        });\n        assert(\n          body instanceof FastlyBody,\n          true,\n          `CoreCache.insert('cat', {maxAge: 1}) instanceof FastlyBody`,\n        );\n      },\n    );\n    routes.set('/core-cache/insert/options-parameter-maxAge-field-NaN', () => {\n      assertThrows(() => {\n        CoreCache.insert('cat', {\n          maxAge: NaN,\n        });\n      });\n    });\n    routes.set(\n      '/core-cache/insert/options-parameter-maxAge-field-postitive-infinity',\n      () => {\n        assertThrows(() => {\n          CoreCache.insert('cat', {\n            maxAge: Number.POSITIVE_INFINITY,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/core-cache/insert/options-parameter-maxAge-field-negative-infinity',\n      () => {\n        assertThrows(() => {\n          CoreCache.insert('cat', {\n            maxAge: Number.NEGATIVE_INFINITY,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/core-cache/insert/options-parameter-maxAge-field-negative-number',\n      () => {\n        assertThrows(() => {\n          CoreCache.insert('cat', {\n            maxAge: -1,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/core-cache/insert/options-parameter-maxAge-field-too-large',\n      () => {\n        assertThrows(() => {\n          CoreCache.insert('cat', {\n            maxAge: 2e13,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/core-cache/insert/options-parameter-initialAge-field-valid-record',\n      () => {\n        let body;\n        assertDoesNotThrow(() => {\n          body = CoreCache.insert('cat', { maxAge: 1, initialAge: 1 });\n        });\n        assert(\n          body instanceof FastlyBody,\n          true,\n          `CoreCache.insert('cat', {maxAge: 1,initialAge: 1}) instanceof FastlyBody`,\n        );\n      },\n    );\n    routes.set(\n      '/core-cache/insert/options-parameter-initialAge-field-NaN',\n      () => {\n        assertThrows(() => {\n          CoreCache.insert('cat', {\n            maxAge: 1,\n            initialAge: NaN,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/core-cache/insert/options-parameter-initialAge-field-postitive-infinity',\n      () => {\n        assertThrows(() => {\n          CoreCache.insert('cat', {\n            maxAge: 1,\n            initialAge: Number.POSITIVE_INFINITY,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/core-cache/insert/options-parameter-initialAge-field-negative-infinity',\n      () => {\n        assertThrows(() => {\n          CoreCache.insert('cat', {\n            maxAge: 1,\n            initialAge: Number.NEGATIVE_INFINITY,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/core-cache/insert/options-parameter-initialAge-field-negative-number',\n      () => {\n        assertThrows(() => {\n          CoreCache.insert('cat', {\n            maxAge: 1,\n            initialAge: -1,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/core-cache/insert/options-parameter-initialAge-field-too-large',\n      () => {\n        assertThrows(() => {\n          CoreCache.insert('cat', {\n            maxAge: 1,\n            initialAge: 2e13,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/core-cache/insert/options-parameter-staleWhileRevalidate-field-valid-record',\n      () => {\n        let body;\n        assertDoesNotThrow(() => {\n          body = CoreCache.insert('cat', {\n            maxAge: 1,\n            staleWhileRevalidate: 1,\n          });\n        });\n        assert(\n          body instanceof FastlyBody,\n          true,\n          `CoreCache.insert('cat', {maxAge: 1,staleWhileRevalidate: 1}) instanceof FastlyBody`,\n        );\n      },\n    );\n    routes.set(\n      '/core-cache/insert/options-parameter-staleWhileRevalidate-field-NaN',\n      () => {\n        assertThrows(() => {\n          CoreCache.insert('cat', {\n            maxAge: 1,\n            staleWhileRevalidate: NaN,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/core-cache/insert/options-parameter-staleWhileRevalidate-field-postitive-infinity',\n      () => {\n        assertThrows(() => {\n          CoreCache.insert('cat', {\n            maxAge: 1,\n            staleWhileRevalidate: Number.POSITIVE_INFINITY,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/core-cache/insert/options-parameter-staleWhileRevalidate-field-negative-infinity',\n      () => {\n        assertThrows(() => {\n          CoreCache.insert('cat', {\n            maxAge: 1,\n            staleWhileRevalidate: Number.NEGATIVE_INFINITY,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/core-cache/insert/options-parameter-staleWhileRevalidate-field-negative-number',\n      () => {\n        assertThrows(() => {\n          CoreCache.insert('cat', {\n            maxAge: 1,\n            staleWhileRevalidate: -1,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/core-cache/insert/options-parameter-staleWhileRevalidate-field-too-large',\n      () => {\n        assertThrows(() => {\n          CoreCache.insert('cat', {\n            maxAge: 1,\n            staleWhileRevalidate: 2e13,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/core-cache/insert/options-parameter-length-field-valid-record',\n      () => {\n        let body;\n        assertDoesNotThrow(() => {\n          body = CoreCache.insert('cat', { maxAge: 1, length: 1 });\n        });\n        assert(\n          body instanceof FastlyBody,\n          true,\n          `CoreCache.insert('cat', {maxAge: 1,length: 1}) instanceof FastlyBody`,\n        );\n      },\n    );\n    routes.set('/core-cache/insert/options-parameter-length-field-NaN', () => {\n      assertThrows(() => {\n        CoreCache.insert('cat', {\n          maxAge: 1,\n          length: NaN,\n        });\n      });\n    });\n    routes.set(\n      '/core-cache/insert/options-parameter-length-field-postitive-infinity',\n      () => {\n        assertThrows(() => {\n          CoreCache.insert('cat', {\n            maxAge: 1,\n            length: Number.POSITIVE_INFINITY,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/core-cache/insert/options-parameter-length-field-negative-infinity',\n      () => {\n        assertThrows(() => {\n          CoreCache.insert('cat', {\n            maxAge: 1,\n            length: Number.NEGATIVE_INFINITY,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/core-cache/insert/options-parameter-length-field-negative-number',\n      () => {\n        assertThrows(() => {\n          CoreCache.insert('cat', {\n            maxAge: 1,\n            length: -1,\n          });\n        });\n      },\n    );\n    routes.set('/core-cache/insert/options-parameter-sensitive-field', () => {\n      assertDoesNotThrow(() => {\n        CoreCache.insert('cat', {\n          maxAge: 1,\n          sensitive: true,\n        });\n      });\n    });\n    routes.set('/core-cache/insert/options-parameter-vary-field', () => {\n      assertDoesNotThrow(() => {\n        CoreCache.insert('cat', {\n          maxAge: 1,\n          vary: ['animal', 'mineral', 'vegetable'],\n        });\n      });\n    });\n    routes.set(\n      '/core-cache/insert/options-parameter-userMetadata-field/arraybuffer/empty',\n      async () => {\n        await assertResolves(async () => {\n          let key =\n            '/core-cache/insert/options-parameter-userMetadata-field/arraybuffer/empty' +\n            Math.random();\n          let writer = CoreCache.insert(key, {\n            maxAge: 60 * 1000,\n            userMetadata: new ArrayBuffer(0),\n          });\n          writer.append('hello');\n          writer.close();\n        });\n      },\n    );\n    routes.set(\n      '/core-cache/insert/options-parameter-userMetadata-field/arraybuffer/not-empty',\n      async () => {\n        await assertResolves(async () => {\n          let key =\n            '/core-cache/insert/options-parameter-userMetadata-field/arraybuffer/not-empty' +\n            Math.random();\n          let writer = CoreCache.insert(key, {\n            maxAge: 60 * 1000,\n            userMetadata: Uint8Array.from([104, 101, 108, 108, 111]).buffer,\n          });\n          writer.append('hello');\n          writer.close();\n        });\n      },\n    );\n    routes.set(\n      '/core-cache/insert/options-parameter-userMetadata-field/URLSearchParams',\n      async () => {\n        await assertResolves(async () => {\n          let key =\n            '/core-cache/insert/options-parameter-userMetadata-field/URLSearchParams' +\n            Math.random();\n          let userMetadata = new URLSearchParams();\n          userMetadata.set('hello', 'world');\n          let writer = CoreCache.insert(key, {\n            maxAge: 60 * 1000,\n            userMetadata,\n          });\n          writer.append('hello');\n          writer.close();\n        });\n      },\n    );\n    routes.set(\n      '/core-cache/insert/options-parameter-userMetadata-field/string',\n      async () => {\n        await assertResolves(async () => {\n          let key =\n            '/core-cache/insert/options-parameter-userMetadata-field/string' +\n            Math.random();\n          let writer = CoreCache.insert(key, {\n            maxAge: 60 * 1000,\n            userMetadata: 'hello',\n          });\n          writer.append('hello');\n          writer.close();\n        });\n      },\n    );\n    // surrogateKeys?: Array<string>,-- empty string? -- toString which throws -- wrong types?\n  }\n\n  //static transactionLookup(key: string, options?: LookupOptions): CacheEntry | null;\n  {\n    routes.set('/core-cache/transactionLookup/called-as-constructor', () => {\n      assertThrows(() => {\n        new CoreCache.transactionLookup('1');\n      }, TypeError);\n    });\n    // https://tc39.es/ecma262/#sec-tostring\n    routes.set(\n      '/core-cache/transactionLookup/key-parameter-calls-7.1.17-ToString',\n      () => {\n        let sentinel;\n        const test = () => {\n          sentinel = Symbol('sentinel');\n          const key = {\n            toString() {\n              throw sentinel;\n            },\n          };\n          CoreCache.transactionLookup(key);\n        };\n        assertThrows(test);\n        try {\n          test();\n        } catch (thrownError) {\n          assert(thrownError, sentinel, 'thrownError === sentinel');\n        }\n        assertThrows(\n          () => {\n            CoreCache.transactionLookup(Symbol());\n          },\n          TypeError,\n          `can't convert symbol to string`,\n        );\n      },\n    );\n    routes.set(\n      '/core-cache/transactionLookup/key-parameter-not-supplied',\n      () => {\n        assertThrows(\n          () => {\n            CoreCache.transactionLookup();\n          },\n          TypeError,\n          `CoreCache.transactionLookup: At least 1 argument required, but only 0 passed`,\n        );\n      },\n    );\n    routes.set(\n      '/core-cache/transactionLookup/key-parameter-empty-string',\n      () => {\n        assertThrows(\n          () => {\n            CoreCache.transactionLookup('');\n          },\n          Error,\n          `CoreCache.transactionLookup: key can not be an empty string`,\n        );\n      },\n    );\n    routes.set(\n      '/core-cache/transactionLookup/key-parameter-8135-character-string',\n      () => {\n        assertDoesNotThrow(() => {\n          const key = 'a'.repeat(8135);\n          CoreCache.transactionLookup(key);\n        });\n      },\n    );\n    routes.set(\n      '/core-cache/transactionLookup/key-parameter-8136-character-string',\n      () => {\n        assertThrows(\n          () => {\n            const key = 'a'.repeat(8136);\n            CoreCache.transactionLookup(key);\n          },\n          Error,\n          `CoreCache.transactionLookup: key is too long, the maximum allowed length is 8135.`,\n        );\n      },\n    );\n    routes.set('/core-cache/transactionLookup/key-does-not-exist', () => {\n      let result = CoreCache.transactionLookup(Math.random());\n      assert(\n        result instanceof CacheEntry,\n        true,\n        `CoreCache.transactionLookup(Math.random()) instanceof CacheEntry`,\n      );\n    });\n    routes.set('/core-cache/transactionLookup/key-exists', () => {\n      let writer = CoreCache.insert('cat', {\n        maxAge: 10_000,\n      });\n      writer.append('meow');\n      writer.close();\n      let result = CoreCache.transactionLookup('cat');\n      assert(\n        result instanceof CacheEntry,\n        true,\n        `CoreCache.transactionLookup('cat') instanceof CacheEntry`,\n      );\n    });\n\n    routes.set(\n      '/core-cache/transactionLookup/options-parameter-wrong-type',\n      () => {\n        assertThrows(() => {\n          CoreCache.transactionLookup('cat', '');\n        });\n      },\n    );\n    routes.set(\n      '/core-cache/transactionLookup/options-parameter-headers-field-wrong-type',\n      () => {\n        assertThrows(() => {\n          CoreCache.transactionLookup('cat', { headers: '' });\n        });\n      },\n    );\n    routes.set(\n      '/core-cache/transactionLookup/options-parameter-headers-field-undefined',\n      () => {\n        let entry;\n        assertDoesNotThrow(() => {\n          entry = CoreCache.transactionLookup('cat', { headers: undefined });\n        });\n        assert(\n          entry instanceof CacheEntry,\n          true,\n          `CoreCache.transactionLookup('cat', {headers:...}) instanceof CacheEntry`,\n        );\n      },\n    );\n    routes.set(\n      '/core-cache/transactionLookup/options-parameter-headers-field-valid-sequence',\n      () => {\n        let entry;\n        assertDoesNotThrow(() => {\n          entry = CoreCache.transactionLookup('cat', {\n            headers: [\n              ['user-agent', 'Aki 1.0'],\n              ['Accept-Encoding', 'br'],\n            ],\n          });\n        });\n        assert(\n          entry instanceof CacheEntry,\n          true,\n          `CoreCache.transactionLookup('cat', {headers:...}) instanceof CacheEntry`,\n        );\n      },\n    );\n    routes.set(\n      '/core-cache/transactionLookup/options-parameter-headers-field-valid-record',\n      () => {\n        let entry;\n        assertDoesNotThrow(() => {\n          entry = CoreCache.transactionLookup('cat', {\n            headers: {\n              'user-agent': 'Aki 1.0',\n              'Accept-Encoding': 'br',\n            },\n          });\n        });\n        assert(\n          entry instanceof CacheEntry,\n          true,\n          `CoreCache.transactionLookup('cat', {headers:...}) instanceof CacheEntry`,\n        );\n      },\n    );\n    routes.set(\n      '/core-cache/transactionLookup/options-parameter-headers-field-valid-Headers-instance',\n      () => {\n        let entry;\n        assertDoesNotThrow(() => {\n          entry = CoreCache.transactionLookup('cat', {\n            headers: new Headers({\n              'user-agent': 'Aki 1.0',\n              'Accept-Encoding': 'br',\n            }),\n          });\n        });\n        assert(\n          entry instanceof CacheEntry,\n          true,\n          `CoreCache.transactionLookup('cat', {headers:...}) instanceof CacheEntry`,\n        );\n      },\n    );\n  }\n}\n\n// CacheEntry\n{\n  routes.set('/cache-entry/interface', () => {\n    let actual = Reflect.ownKeys(CacheEntry);\n    let expected = ['prototype', 'length', 'name'];\n    assert(actual, expected, `Reflect.ownKeys(CacheEntry)`);\n\n    // Check the prototype descriptors are correct\n    {\n      actual = Reflect.getOwnPropertyDescriptor(CacheEntry, 'prototype');\n      expected = {\n        value: CacheEntry.prototype,\n        writable: false,\n        enumerable: false,\n        configurable: false,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CacheEntry, 'prototype')`,\n      );\n    }\n\n    // Check the constructor function's defined parameter length is correct\n    {\n      actual = Reflect.getOwnPropertyDescriptor(CacheEntry, 'length');\n      expected = {\n        value: 0,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CacheEntry, 'length')`,\n      );\n    }\n\n    // Check the constructor function's name is correct\n    {\n      actual = Reflect.getOwnPropertyDescriptor(CacheEntry, 'name');\n      expected = {\n        value: 'CacheEntry',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CacheEntry, 'name')`,\n      );\n    }\n\n    // Check the prototype has the correct keys\n    {\n      actual = Reflect.ownKeys(CacheEntry.prototype);\n      expected = [\n        'constructor',\n        'close',\n        'state',\n        'userMetadata',\n        'body',\n        'length',\n        'maxAge',\n        'staleWhileRevalidate',\n        'age',\n        'hits',\n        Symbol.toStringTag,\n      ];\n      assert(actual, expected, `Reflect.ownKeys(CacheEntry.prototype)`);\n    }\n\n    // Check the constructor on the prototype is correct\n    {\n      actual = Reflect.getOwnPropertyDescriptor(\n        CacheEntry.prototype,\n        'constructor',\n      );\n      expected = {\n        writable: true,\n        enumerable: false,\n        configurable: true,\n        value: CacheEntry.prototype.constructor,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CacheEntry.prototype, 'constructor')`,\n      );\n\n      assert(\n        typeof CacheEntry.prototype.constructor,\n        'function',\n        `typeof CacheEntry.prototype.constructor`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        CacheEntry.prototype.constructor,\n        'length',\n      );\n      expected = {\n        value: 0,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CacheEntry.prototype.constructor, 'length')`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        CacheEntry.prototype.constructor,\n        'name',\n      );\n      expected = {\n        value: 'CacheEntry',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CacheEntry.prototype.constructor, 'name')`,\n      );\n    }\n\n    // Check the Symbol.toStringTag on the prototype is correct\n    {\n      actual = Reflect.getOwnPropertyDescriptor(\n        CacheEntry.prototype,\n        Symbol.toStringTag,\n      );\n      expected = {\n        writable: false,\n        enumerable: false,\n        configurable: true,\n        value: 'CacheEntry',\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CacheEntry.prototype, [Symbol.toStringTag])`,\n      );\n\n      assert(\n        typeof CacheEntry.prototype[Symbol.toStringTag],\n        'string',\n        `typeof CacheEntry.prototype[Symbol.toStringTag]`,\n      );\n    }\n\n    // Check the close method has correct descriptors, length and name\n    {\n      actual = Reflect.getOwnPropertyDescriptor(CacheEntry.prototype, 'close');\n      expected = {\n        writable: true,\n        enumerable: true,\n        configurable: true,\n        value: CacheEntry.prototype.close,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CacheEntry.prototype, 'close')`,\n      );\n\n      assert(\n        typeof CacheEntry.prototype.close,\n        'function',\n        `typeof CacheEntry.prototype.close`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        CacheEntry.prototype.close,\n        'length',\n      );\n      expected = {\n        value: 0,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CacheEntry.prototype.close, 'length')`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        CacheEntry.prototype.close,\n        'name',\n      );\n      expected = {\n        value: 'close',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CacheEntry.prototype.close, 'name')`,\n      );\n    }\n\n    // Check the state method has correct descriptors, length and name\n    {\n      actual = Reflect.getOwnPropertyDescriptor(CacheEntry.prototype, 'state');\n      expected = {\n        writable: true,\n        enumerable: true,\n        configurable: true,\n        value: CacheEntry.prototype.state,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CacheEntry.prototype, 'state')`,\n      );\n\n      assert(\n        typeof CacheEntry.prototype.state,\n        'function',\n        `typeof CacheEntry.prototype.state`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        CacheEntry.prototype.state,\n        'length',\n      );\n      expected = {\n        value: 0,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CacheEntry.prototype.state, 'length')`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        CacheEntry.prototype.state,\n        'name',\n      );\n      expected = {\n        value: 'state',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CacheEntry.prototype.state, 'name')`,\n      );\n    }\n\n    // Check the userMetadata method has correct descriptors, length and name\n    {\n      actual = Reflect.getOwnPropertyDescriptor(\n        CacheEntry.prototype,\n        'userMetadata',\n      );\n      expected = {\n        writable: true,\n        enumerable: true,\n        configurable: true,\n        value: CacheEntry.prototype.userMetadata,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CacheEntry.prototype, 'userMetadata')`,\n      );\n\n      assert(\n        typeof CacheEntry.prototype.userMetadata,\n        'function',\n        `typeof CacheEntry.prototype.userMetadata`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        CacheEntry.prototype.userMetadata,\n        'length',\n      );\n      expected = {\n        value: 0,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CacheEntry.prototype.userMetadata, 'length')`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        CacheEntry.prototype.userMetadata,\n        'name',\n      );\n      expected = {\n        value: 'userMetadata',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CacheEntry.prototype.userMetadata, 'name')`,\n      );\n    }\n\n    // Check the body method has correct descriptors, length and name\n    {\n      actual = Reflect.getOwnPropertyDescriptor(CacheEntry.prototype, 'body');\n      expected = {\n        writable: true,\n        enumerable: true,\n        configurable: true,\n        value: CacheEntry.prototype.body,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CacheEntry.prototype, 'body')`,\n      );\n\n      assert(\n        typeof CacheEntry.prototype.body,\n        'function',\n        `typeof CacheEntry.prototype.body`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        CacheEntry.prototype.body,\n        'length',\n      );\n      expected = {\n        value: 0,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CacheEntry.prototype.body, 'length')`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        CacheEntry.prototype.body,\n        'name',\n      );\n      expected = {\n        value: 'body',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CacheEntry.prototype.body, 'name')`,\n      );\n    }\n\n    // Check the length method has correct descriptors, length and name\n    {\n      actual = Reflect.getOwnPropertyDescriptor(CacheEntry.prototype, 'length');\n      expected = {\n        writable: true,\n        enumerable: true,\n        configurable: true,\n        value: CacheEntry.prototype.length,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CacheEntry.prototype, 'length')`,\n      );\n\n      assert(\n        typeof CacheEntry.prototype.length,\n        'function',\n        `typeof CacheEntry.prototype.length`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        CacheEntry.prototype.length,\n        'length',\n      );\n      expected = {\n        value: 0,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CacheEntry.prototype.length, 'length')`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        CacheEntry.prototype.length,\n        'name',\n      );\n      expected = {\n        value: 'length',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CacheEntry.prototype.length, 'name')`,\n      );\n    }\n\n    // Check the maxAge method has correct descriptors, length and name\n    {\n      actual = Reflect.getOwnPropertyDescriptor(CacheEntry.prototype, 'maxAge');\n      expected = {\n        writable: true,\n        enumerable: true,\n        configurable: true,\n        value: CacheEntry.prototype.maxAge,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CacheEntry.prototype, 'maxAge')`,\n      );\n\n      assert(\n        typeof CacheEntry.prototype.maxAge,\n        'function',\n        `typeof CacheEntry.prototype.maxAge`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        CacheEntry.prototype.maxAge,\n        'length',\n      );\n      expected = {\n        value: 0,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CacheEntry.prototype.maxAge, 'length')`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        CacheEntry.prototype.maxAge,\n        'name',\n      );\n      expected = {\n        value: 'maxAge',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CacheEntry.prototype.maxAge, 'name')`,\n      );\n    }\n\n    // Check the staleWhileRevalidate method has correct descriptors, length and name\n    {\n      actual = Reflect.getOwnPropertyDescriptor(\n        CacheEntry.prototype,\n        'staleWhileRevalidate',\n      );\n      expected = {\n        writable: true,\n        enumerable: true,\n        configurable: true,\n        value: CacheEntry.prototype.staleWhileRevalidate,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CacheEntry.prototype, 'staleWhileRevalidate')`,\n      );\n\n      assert(\n        typeof CacheEntry.prototype.staleWhileRevalidate,\n        'function',\n        `typeof CacheEntry.prototype.staleWhileRevalidate`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        CacheEntry.prototype.staleWhileRevalidate,\n        'length',\n      );\n      expected = {\n        value: 0,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CacheEntry.prototype.staleWhileRevalidate, 'length')`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        CacheEntry.prototype.staleWhileRevalidate,\n        'name',\n      );\n      expected = {\n        value: 'staleWhileRevalidate',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CacheEntry.prototype.staleWhileRevalidate, 'name')`,\n      );\n    }\n\n    // Check the age method has correct descriptors, length and name\n    {\n      actual = Reflect.getOwnPropertyDescriptor(CacheEntry.prototype, 'age');\n      expected = {\n        writable: true,\n        enumerable: true,\n        configurable: true,\n        value: CacheEntry.prototype.age,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CacheEntry.prototype, 'age')`,\n      );\n\n      assert(\n        typeof CacheEntry.prototype.age,\n        'function',\n        `typeof CacheEntry.prototype.age`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        CacheEntry.prototype.age,\n        'length',\n      );\n      expected = {\n        value: 0,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CacheEntry.prototype.age, 'length')`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        CacheEntry.prototype.age,\n        'name',\n      );\n      expected = {\n        value: 'age',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CacheEntry.prototype.age, 'name')`,\n      );\n    }\n\n    // Check the hits method has correct descriptors, length and name\n    {\n      actual = Reflect.getOwnPropertyDescriptor(CacheEntry.prototype, 'hits');\n      expected = {\n        writable: true,\n        enumerable: true,\n        configurable: true,\n        value: CacheEntry.prototype.hits,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CacheEntry.prototype, 'hits')`,\n      );\n\n      assert(\n        typeof CacheEntry.prototype.hits,\n        'function',\n        `typeof CacheEntry.prototype.hits`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        CacheEntry.prototype.hits,\n        'length',\n      );\n      expected = {\n        value: 0,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CacheEntry.prototype.hits, 'length')`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        CacheEntry.prototype.hits,\n        'name',\n      );\n      expected = {\n        value: 'hits',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(CacheEntry.prototype.hits, 'name')`,\n      );\n    }\n  });\n\n  // CacheEntry constructor\n  {\n    routes.set('/cache-entry/constructor/called-as-regular-function', () => {\n      assertThrows(() => {\n        CacheEntry();\n      }, TypeError);\n    });\n    routes.set('/cache-entry/constructor/throws', () => {\n      assertThrows(() => new CacheEntry(), TypeError);\n    });\n  }\n\n  // close(): void;\n  {\n    routes.set('/cache-entry/close/called-as-constructor', () => {\n      assertThrows(() => {\n        new CacheEntry.prototype.close();\n      }, TypeError);\n    });\n    routes.set('/cache-entry/close/called-unbound', () => {\n      assertThrows(() => {\n        CacheEntry.prototype.close.call(undefined);\n      }, Error);\n    });\n    routes.set('/cache-entry/close/called-on-instance', () => {\n      let key = '/cache-entry/close/called-on-instance' + Math.random();\n      let writer = CoreCache.insert(key, {\n        maxAge: 60 * 1000,\n      });\n      writer.append('hello');\n      writer.close();\n      let result = CoreCache.lookup(key).close();\n      assert(result, undefined, `CoreCache.lookup(key).close()`);\n    });\n  }\n\n  // state(): CacheState;\n  {\n    routes.set('/cache-entry/state/called-as-constructor', () => {\n      assertThrows(() => {\n        new CacheEntry.prototype.state();\n      }, TypeError);\n    });\n    routes.set('/cache-entry/state/called-unbound', () => {\n      assertThrows(() => {\n        CacheEntry.prototype.state.call(undefined);\n      }, Error);\n    });\n\n    routes.set('/cache-entry/state/called-on-instance', () => {\n      let key = '/cache-entry/state/called-on-instance' + Math.random();\n      let writer = CoreCache.insert(key, {\n        maxAge: 60 * 1000,\n      });\n      writer.append('hello');\n      writer.close();\n      let entry = CoreCache.lookup(key);\n      let result = entry.state();\n      assert(\n        result instanceof CacheState,\n        true,\n        `CoreCache.lookup(key).state() instanceof CacheState`,\n      );\n    });\n  }\n\n  // userMetadata(): ArrayBuffer;\n  {\n    routes.set('/cache-entry/userMetadata/called-as-constructor', () => {\n      assertThrows(() => {\n        new CacheEntry.prototype.userMetadata();\n      }, TypeError);\n    });\n    routes.set('/cache-entry/userMetadata/called-unbound', () => {\n      assertThrows(() => {\n        CacheEntry.prototype.userMetadata.call(undefined);\n      }, Error);\n    });\n    routes.set('/cache-entry/userMetadata/called-on-instance', () => {\n      let key = '/cache-entry/userMetadata/called-on-instance' + Math.random();\n      let writer = CoreCache.insert(key, {\n        maxAge: 60 * 1000,\n      });\n      writer.append('hello');\n      writer.close();\n      let result = CoreCache.lookup(key).userMetadata();\n      assert(\n        result instanceof ArrayBuffer,\n        true,\n        `CoreCache.lookup(key).userMetadata() instanceof ArrayBuffer`,\n      );\n      assert(\n        result.byteLength,\n        0,\n        `CoreCache.lookup(key).userMetadata().byteLength`,\n      );\n    });\n    routes.set('/cache-entry/userMetadata/basic', () => {\n      let key = '/cache-entry/userMetadata/basic' + Math.random();\n      let writer = CoreCache.insert(key, {\n        maxAge: 60 * 1000,\n        userMetadata: 'hello world',\n      });\n      writer.append('hello');\n      writer.close();\n      let entry = CoreCache.lookup(key);\n      assert(\n        entry instanceof CacheEntry,\n        true,\n        'CoreCache.lookup(key) instanceof CacheEntry',\n      );\n      let metadata = entry.userMetadata();\n      assert(\n        metadata instanceof ArrayBuffer,\n        true,\n        `CoreCache.lookup(key).userMetadata() instanceof ArrayBuffer`,\n      );\n      assert(\n        metadata.byteLength,\n        11,\n        `CoreCache.lookup(key).userMetadata().byteLength`,\n      );\n      let result = new TextDecoder().decode(metadata);\n      assert(\n        result,\n        'hello world',\n        `new TextDecoder().decode(CoreCache.lookup(key).userMetadata()) === 'hello world'`,\n      );\n    });\n  }\n\n  // body(options?: CacheBodyOptions): ReadableStream;\n  {\n    routes.set('/cache-entry/body/called-as-constructor', () => {\n      assertThrows(() => {\n        new CacheEntry.prototype.body();\n      }, TypeError);\n    });\n    routes.set('/cache-entry/body/called-unbound', () => {\n      assertThrows(() => {\n        CacheEntry.prototype.body.call(undefined);\n      }, Error);\n    });\n    routes.set('/cache-entry/body/called-on-instance', async () => {\n      let key = '/cache-entry/body/called-on-instance' + Math.random();\n      let writer = CoreCache.insert(key, {\n        maxAge: 60 * 1000,\n      });\n      writer.append('hello');\n      writer.close();\n      let result = CoreCache.lookup(key).body();\n      assert(\n        result instanceof ReadableStream,\n        true,\n        `CoreCache.lookup(key).body() instanceof ReadableStream`,\n      );\n\n      result = await streamToString(result);\n      assert(\n        result,\n        'hello',\n        `await streamToString(CoreCache.lookup(key).body())`,\n      );\n    });\n    routes.set('/cache-entry/body/options-start-negative', async () => {\n      let key = '/cache-entry/body/options-start-negative' + Math.random();\n      let writer = CoreCache.insert(key, {\n        maxAge: 60 * 1000,\n      });\n      writer.append('hello');\n      writer.close();\n      assertThrows(() => {\n        CoreCache.lookup(key).body({ start: -1 });\n      });\n    });\n    routes.set('/cache-entry/body/options-start-NaN', async () => {\n      let key = '/cache-entry/body/options-start-NaN' + Math.random();\n      let writer = CoreCache.insert(key, {\n        maxAge: 60 * 1000,\n      });\n      writer.append('hello');\n      writer.close();\n      assertThrows(() => {\n        CoreCache.lookup(key).body({ start: NaN });\n      });\n    });\n    routes.set('/cache-entry/body/options-start-Infinity', async () => {\n      let key = '/cache-entry/body/options-start-Infinity' + Math.random();\n      let writer = CoreCache.insert(key, {\n        maxAge: 60 * 1000,\n      });\n      writer.append('hello');\n      writer.close();\n      assertThrows(() => {\n        CoreCache.lookup(key).body({ start: Infinity });\n      });\n    });\n    routes.set('/cache-entry/body/options-start-valid', async () => {\n      let key = '/cache-entry/body/options-start-valid' + Math.random();\n      let writer = CoreCache.insert(key, {\n        maxAge: 60 * 1000,\n      });\n      writer.append('hello');\n      writer.close();\n      let result = CoreCache.lookup(key).body({ start: 1 });\n      assert(\n        result instanceof ReadableStream,\n        true,\n        `CoreCache.lookup(key).body() instanceof ReadableStream`,\n      );\n\n      result = await streamToString(result);\n      assert(\n        result,\n        'ello',\n        `await streamToString(CoreCache.lookup(key).body())`,\n      );\n    });\n    routes.set('/cache-entry/body/options-start-longer-than-body', async () => {\n      let key =\n        '/cache-entry/body/options-start-longer-than-body' + Math.random();\n      let writer = CoreCache.insert(key, {\n        maxAge: 60 * 1000,\n      });\n      writer.append('hello');\n      writer.close();\n      let result = CoreCache.lookup(key).body({ start: 1000 });\n      assert(\n        result instanceof ReadableStream,\n        true,\n        `CoreCache.lookup(key).body() instanceof ReadableStream`,\n      );\n\n      result = await streamToString(result);\n      assert(\n        result,\n        'hello',\n        `await streamToString(CoreCache.lookup(key).body())`,\n      );\n    });\n    routes.set('/cache-entry/body/options-end-negative', async () => {\n      let key = '/cache-entry/body/options-end-negative' + Math.random();\n      let writer = CoreCache.insert(key, {\n        maxAge: 60 * 1000,\n      });\n      writer.append('hello');\n      writer.close();\n      assertThrows(() => {\n        CoreCache.lookup(key).body({ end: -1 });\n      });\n    });\n    routes.set('/cache-entry/body/options-end-NaN', async () => {\n      let key = '/cache-entry/body/options-end-NaN' + Math.random();\n      let writer = CoreCache.insert(key, {\n        maxAge: 60 * 1000,\n      });\n      writer.append('hello');\n      writer.close();\n      assertThrows(() => {\n        CoreCache.lookup(key).body({ end: NaN });\n      });\n    });\n    routes.set('/cache-entry/body/options-end-Infinity', async () => {\n      let key = '/cache-entry/body/options-end-Infinity' + Math.random();\n      let writer = CoreCache.insert(key, {\n        maxAge: 60 * 1000,\n      });\n      writer.append('hello');\n      writer.close();\n      assertThrows(() => {\n        CoreCache.lookup(key).body({ end: Infinity });\n      });\n    });\n    routes.set('/cache-entry/body/options-end-valid', async () => {\n      let key = '/cache-entry/body/options-end-valid' + Math.random();\n      let writer = CoreCache.insert(key, {\n        maxAge: 60 * 1000,\n      });\n      writer.append('hello');\n      writer.close();\n      let result = CoreCache.lookup(key).body({ start: 1, end: 1 });\n      assert(\n        result instanceof ReadableStream,\n        true,\n        `CoreCache.lookup(key).body() instanceof ReadableStream`,\n      );\n\n      result = await streamToString(result);\n      console.log({ result });\n      assert(result, 'e', `await streamToString(CoreCache.lookup(key).body())`);\n    });\n    routes.set('/cache-entry/body/options-end-zero', async () => {\n      let key = '/cache-entry/body/options-end-zero' + Math.random();\n      let writer = CoreCache.insert(key, {\n        maxAge: 60 * 1000,\n      });\n      writer.append('hello');\n      writer.close();\n      let result = CoreCache.lookup(key).body({ start: 1, end: 0 });\n      assert(\n        result instanceof ReadableStream,\n        true,\n        `CoreCache.lookup(key).body() instanceof ReadableStream`,\n      );\n\n      result = await streamToString(result);\n      console.log({ result });\n      assert(\n        result,\n        'hello',\n        `await streamToString(CoreCache.lookup(key).body())`,\n      );\n    });\n  }\n\n  // length(): number;\n  {\n    routes.set('/cache-entry/length/called-as-constructor', () => {\n      assertThrows(() => {\n        new CacheEntry.prototype.length();\n      }, TypeError);\n    });\n    routes.set('/cache-entry/length/called-unbound', () => {\n      assertThrows(() => {\n        CacheEntry.prototype.length.call(undefined);\n      }, Error);\n    });\n    routes.set('/cache-entry/length/called-on-instance', () => {\n      let key = '/cache-entry/length/called-on-instance' + Math.random();\n      let writer = CoreCache.insert(key, {\n        maxAge: 60 * 1000,\n      });\n      writer.append('hello');\n      writer.close();\n      let result = CoreCache.lookup(key).length();\n      assert(result, 5, `CoreCache.lookup(key).length()`);\n    });\n    // TODO pass in an entry with unknown length and then call length and check it is null?\n    /// The size in bytes of the cached item, if known.\n    ///\n    /// The length of the cached item may be unknown if the item is currently being streamed into\n    /// the cache without a fixed length.\n  }\n\n  // maxAge(): number;\n  {\n    routes.set('/cache-entry/maxAge/called-as-constructor', () => {\n      assertThrows(() => {\n        new CacheEntry.prototype.maxAge();\n      }, TypeError);\n    });\n    routes.set('/cache-entry/maxAge/called-unbound', () => {\n      assertThrows(() => {\n        CacheEntry.prototype.maxAge.call(undefined);\n      }, Error);\n    });\n    routes.set('/cache-entry/maxAge/called-on-instance', async () => {\n      let key = '/cache-entry/maxAge/called-on-instance' + Math.random();\n      let writer = CoreCache.insert(key, {\n        maxAge: 60 * 1000,\n      });\n      writer.append('hello');\n      writer.close();\n      let result = CoreCache.lookup(key).maxAge();\n      assert(result, 60_000, `CoreCache.lookup(key).maxAge()`);\n    });\n  }\n\n  // staleWhileRevalidate(): number;\n  {\n    routes.set(\n      '/cache-entry/staleWhileRevalidate/called-as-constructor',\n      () => {\n        assertThrows(() => {\n          new CacheEntry.prototype.staleWhileRevalidate();\n        }, TypeError);\n      },\n    );\n    routes.set('/cache-entry/staleWhileRevalidate/called-unbound', () => {\n      assertThrows(() => {\n        CacheEntry.prototype.staleWhileRevalidate.call(undefined);\n      }, Error);\n    });\n    routes.set(\n      '/cache-entry/staleWhileRevalidate/called-on-instance',\n      async () => {\n        let key =\n          '/cache-entry/staleWhileRevalidate/called-on-instance' +\n          Math.random();\n        let writer = CoreCache.insert(key, {\n          maxAge: 60 * 1000,\n        });\n        writer.append('hello');\n        writer.close();\n        let result = CoreCache.lookup(key).staleWhileRevalidate();\n        assert(\n          typeof result,\n          'number',\n          `typeof CoreCache.lookup(key).staleWhileRevalidate()`,\n        );\n        assert(\n          result >= 0,\n          true,\n          `CoreCache.lookup(key).staleWhileRevalidate() >= 0`,\n        );\n      },\n    );\n  }\n\n  // age(): number;\n  {\n    routes.set('/cache-entry/age/called-as-constructor', () => {\n      assertThrows(() => {\n        new CacheEntry.prototype.age();\n      }, TypeError);\n    });\n    routes.set('/cache-entry/age/called-unbound', () => {\n      assertThrows(() => {\n        CacheEntry.prototype.age.call(undefined);\n      }, Error);\n    });\n    routes.set('/cache-entry/age/called-on-instance', async () => {\n      let key = '/cache-entry/age/called-on-instance' + Math.random();\n      let writer = CoreCache.insert(key, {\n        maxAge: 60 * 1000,\n      });\n      writer.append('hello');\n      writer.close();\n      let result = CoreCache.lookup(key).age();\n      assert(typeof result, 'number', `typeof CoreCache.lookup(key).age()`);\n      assert(result >= 0, true, `CoreCache.lookup(key).age() >= 0`);\n      await sleep(1000);\n      result = CoreCache.lookup(key).age();\n      assert(\n        result >= 1_000,\n        true,\n        `CoreCache.lookup(key).age() >= 1_000 (${result})`,\n      );\n    });\n  }\n\n  // hits(): number;\n  {\n    routes.set('/cache-entry/hits/called-as-constructor', () => {\n      assertThrows(() => {\n        new CacheEntry.prototype.hits();\n      }, TypeError);\n    });\n    routes.set('/cache-entry/hits/called-unbound', () => {\n      assertThrows(() => {\n        CacheEntry.prototype.hits.call(undefined);\n      }, Error);\n    });\n    routes.set('/cache-entry/hits/called-on-instance', () => {\n      let key = '/cache-entry/hits/called-on-instance' + Math.random();\n      let writer = CoreCache.insert(key, {\n        maxAge: 60 * 1000,\n      });\n      writer.append('hello');\n      writer.close();\n      let result = CoreCache.lookup(key).hits();\n      assert(result, 1, `CoreCache.lookup(key).hits()`);\n      result = CoreCache.lookup(key).hits();\n      assert(result, 2, `CoreCache.lookup(key).hits()`);\n    });\n  }\n}\n\n// TransactionCacheEntry\n{\n  routes.set('/transaction-cache-entry/interface', () => {\n    let actual = Reflect.ownKeys(TransactionCacheEntry);\n    let expected = ['prototype', 'length', 'name'];\n    assert(actual, expected, `Reflect.ownKeys(TransactionCacheEntry)`);\n\n    // Check the prototype descriptors are correct\n    {\n      actual = Reflect.getOwnPropertyDescriptor(\n        TransactionCacheEntry,\n        'prototype',\n      );\n      expected = {\n        value: TransactionCacheEntry.prototype,\n        writable: false,\n        enumerable: false,\n        configurable: false,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(TransactionCacheEntry, 'prototype')`,\n      );\n    }\n\n    // Check the constructor function's defined parameter length is correct\n    {\n      actual = Reflect.getOwnPropertyDescriptor(\n        TransactionCacheEntry,\n        'length',\n      );\n      expected = {\n        value: 0,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(TransactionCacheEntry, 'length')`,\n      );\n    }\n\n    // Check the constructor function's name is correct\n    {\n      actual = Reflect.getOwnPropertyDescriptor(TransactionCacheEntry, 'name');\n      expected = {\n        value: 'TransactionCacheEntry',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(TransactionCacheEntry, 'name')`,\n      );\n    }\n\n    // Check the prototype has the correct keys\n    {\n      actual = Reflect.ownKeys(TransactionCacheEntry.prototype);\n      expected = [\n        'constructor',\n        'insert',\n        'insertAndStreamBack',\n        'update',\n        'cancel',\n        Symbol.toStringTag,\n      ];\n      assert(\n        actual,\n        expected,\n        `Reflect.ownKeys(TransactionCacheEntry.prototype)`,\n      );\n    }\n\n    // Check the constructor on the prototype is correct\n    {\n      actual = Reflect.getOwnPropertyDescriptor(\n        TransactionCacheEntry.prototype,\n        'constructor',\n      );\n      expected = {\n        writable: true,\n        enumerable: false,\n        configurable: true,\n        value: TransactionCacheEntry.prototype.constructor,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(TransactionCacheEntry.prototype, 'constructor')`,\n      );\n\n      assert(\n        typeof TransactionCacheEntry.prototype.constructor,\n        'function',\n        `typeof TransactionCacheEntry.prototype.constructor`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        TransactionCacheEntry.prototype.constructor,\n        'length',\n      );\n      expected = {\n        value: 0,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(TransactionCacheEntry.prototype.constructor, 'length')`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        TransactionCacheEntry.prototype.constructor,\n        'name',\n      );\n      expected = {\n        value: 'TransactionCacheEntry',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(TransactionCacheEntry.prototype.constructor, 'name')`,\n      );\n    }\n\n    // Check the Symbol.toStringTag on the prototype is correct\n    {\n      actual = Reflect.getOwnPropertyDescriptor(\n        TransactionCacheEntry.prototype,\n        Symbol.toStringTag,\n      );\n      expected = {\n        writable: false,\n        enumerable: false,\n        configurable: true,\n        value: 'TransactionCacheEntry',\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(TransactionCacheEntry.prototype, [Symbol.toStringTag])`,\n      );\n\n      assert(\n        typeof TransactionCacheEntry.prototype[Symbol.toStringTag],\n        'string',\n        `typeof TransactionCacheEntry.prototype[Symbol.toStringTag]`,\n      );\n    }\n\n    // Check the insert method has correct descriptors, length and name\n    {\n      actual = Reflect.getOwnPropertyDescriptor(\n        TransactionCacheEntry.prototype,\n        'insert',\n      );\n      expected = {\n        writable: true,\n        enumerable: true,\n        configurable: true,\n        value: TransactionCacheEntry.prototype.insert,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(TransactionCacheEntry.prototype, 'insert')`,\n      );\n\n      assert(\n        typeof TransactionCacheEntry.prototype.insert,\n        'function',\n        `typeof TransactionCacheEntry.prototype.insert`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        TransactionCacheEntry.prototype.insert,\n        'length',\n      );\n      expected = {\n        value: 1,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(TransactionCacheEntry.prototype.insert, 'length')`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        TransactionCacheEntry.prototype.insert,\n        'name',\n      );\n      expected = {\n        value: 'insert',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(TransactionCacheEntry.prototype.insert, 'name')`,\n      );\n    }\n\n    // Check the insertAndStreamBack method has correct descriptors, length and name\n    {\n      actual = Reflect.getOwnPropertyDescriptor(\n        TransactionCacheEntry.prototype,\n        'insertAndStreamBack',\n      );\n      expected = {\n        writable: true,\n        enumerable: true,\n        configurable: true,\n        value: TransactionCacheEntry.prototype.insertAndStreamBack,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(TransactionCacheEntry.prototype, 'insertAndStreamBack')`,\n      );\n\n      assert(\n        typeof TransactionCacheEntry.prototype.insertAndStreamBack,\n        'function',\n        `typeof TransactionCacheEntry.prototype.insertAndStreamBack`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        TransactionCacheEntry.prototype.insertAndStreamBack,\n        'length',\n      );\n      expected = {\n        value: 1,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(TransactionCacheEntry.prototype.insertAndStreamBack, 'length')`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        TransactionCacheEntry.prototype.insertAndStreamBack,\n        'name',\n      );\n      expected = {\n        value: 'insertAndStreamBack',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(TransactionCacheEntry.prototype.insertAndStreamBack, 'name')`,\n      );\n    }\n\n    // Check the update method has correct descriptors, length and name\n    {\n      actual = Reflect.getOwnPropertyDescriptor(\n        TransactionCacheEntry.prototype,\n        'update',\n      );\n      expected = {\n        writable: true,\n        enumerable: true,\n        configurable: true,\n        value: TransactionCacheEntry.prototype.update,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(TransactionCacheEntry.prototype, 'update')`,\n      );\n\n      assert(\n        typeof TransactionCacheEntry.prototype.update,\n        'function',\n        `typeof TransactionCacheEntry.prototype.update`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        TransactionCacheEntry.prototype.update,\n        'length',\n      );\n      expected = {\n        value: 1,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(TransactionCacheEntry.prototype.update, 'length')`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        TransactionCacheEntry.prototype.update,\n        'name',\n      );\n      expected = {\n        value: 'update',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(TransactionCacheEntry.prototype.update, 'name')`,\n      );\n    }\n\n    // Check the cancel method has correct descriptors, length and name\n    {\n      actual = Reflect.getOwnPropertyDescriptor(\n        TransactionCacheEntry.prototype,\n        'cancel',\n      );\n      expected = {\n        writable: true,\n        enumerable: true,\n        configurable: true,\n        value: TransactionCacheEntry.prototype.cancel,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(TransactionCacheEntry.prototype, 'cancel')`,\n      );\n\n      assert(\n        typeof TransactionCacheEntry.prototype.cancel,\n        'function',\n        `typeof TransactionCacheEntry.prototype.cancel`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        TransactionCacheEntry.prototype.cancel,\n        'length',\n      );\n      expected = {\n        value: 0,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(TransactionCacheEntry.prototype.cancel, 'length')`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        TransactionCacheEntry.prototype.cancel,\n        'name',\n      );\n      expected = {\n        value: 'cancel',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(TransactionCacheEntry.prototype.cancel, 'name')`,\n      );\n    }\n  });\n\n  // insert(options: TransactionInsertOptions): FastlyBody;\n  {\n    routes.set('/transaction-cache-entry/insert/called-as-constructor', () => {\n      assertThrows(() => {\n        let entry = CoreCache.transactionLookup('1');\n        new entry.insert({ maxAge: 1 });\n      }, TypeError);\n    });\n    routes.set(\n      '/transaction-cache-entry/insert/entry-parameter-not-supplied',\n      () => {\n        let entry = CoreCache.transactionLookup('1');\n        assert(\n          entry instanceof TransactionCacheEntry,\n          true,\n          'entry instanceof TransactionCacheEntry',\n        );\n        assertThrows(\n          () => {\n            entry.insert();\n          },\n          TypeError,\n          `insert: At least 1 argument required, but only 0 passed`,\n        );\n      },\n    );\n\n    routes.set(\n      '/transaction-cache-entry/insert/options-parameter-maxAge-field-valid-record',\n      () => {\n        let body;\n        assertDoesNotThrow(() => {\n          let entry = CoreCache.transactionLookup('1');\n          body = entry.insert({ maxAge: 1 });\n        });\n        assert(\n          body instanceof FastlyBody,\n          true,\n          `entry.insert({maxAge: 1}) instanceof FastlyBody`,\n        );\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insert/options-parameter-maxAge-field-NaN',\n      () => {\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup('1');\n          entry.insert({\n            maxAge: NaN,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insert/options-parameter-maxAge-field-postitive-infinity',\n      () => {\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup('1');\n          entry.insert({\n            maxAge: Number.POSITIVE_INFINITY,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insert/options-parameter-maxAge-field-negative-infinity',\n      () => {\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup('1');\n          entry.insert({\n            maxAge: Number.NEGATIVE_INFINITY,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insert/options-parameter-maxAge-field-negative-number',\n      () => {\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup('1');\n          entry.insert({\n            maxAge: -1,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insert/options-parameter-maxAge-field-too-large',\n      () => {\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup('1');\n          entry.insert({\n            maxAge: 2e13,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insert/options-parameter-initialAge-field-valid-record',\n      () => {\n        let body;\n        assertDoesNotThrow(() => {\n          let entry = CoreCache.transactionLookup('1');\n          body = entry.insert({ maxAge: 1, initialAge: 1 });\n        });\n        assert(\n          body instanceof FastlyBody,\n          true,\n          `entry.insert({maxAge: 1,initialAge: 1}) instanceof FastlyBody`,\n        );\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insert/options-parameter-initialAge-field-NaN',\n      () => {\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup('1');\n          entry.insert({\n            maxAge: 1,\n            initialAge: NaN,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insert/options-parameter-initialAge-field-postitive-infinity',\n      () => {\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup('1');\n          entry.insert({\n            maxAge: 1,\n            initialAge: Number.POSITIVE_INFINITY,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insert/options-parameter-initialAge-field-negative-infinity',\n      () => {\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup('1');\n          entry.insert({\n            maxAge: 1,\n            initialAge: Number.NEGATIVE_INFINITY,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insert/options-parameter-initialAge-field-negative-number',\n      () => {\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup('1');\n          entry.insert({\n            maxAge: 1,\n            initialAge: -1,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insert/options-parameter-initialAge-field-too-large',\n      () => {\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup('1');\n          entry.insert({\n            maxAge: 1,\n            initialAge: 2e13,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insert/options-parameter-staleWhileRevalidate-field-valid-record',\n      () => {\n        let body;\n        assertDoesNotThrow(() => {\n          let entry = CoreCache.transactionLookup('1');\n          body = entry.insert({ maxAge: 1, staleWhileRevalidate: 1 });\n        });\n        assert(\n          body instanceof FastlyBody,\n          true,\n          `entry.insert({maxAge: 1,staleWhileRevalidate: 1}) instanceof FastlyBody`,\n        );\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insert/options-parameter-staleWhileRevalidate-field-NaN',\n      () => {\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup('1');\n          entry.insert({\n            maxAge: 1,\n            staleWhileRevalidate: NaN,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insert/options-parameter-staleWhileRevalidate-field-postitive-infinity',\n      () => {\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup('1');\n          entry.insert({\n            maxAge: 1,\n            staleWhileRevalidate: Number.POSITIVE_INFINITY,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insert/options-parameter-staleWhileRevalidate-field-negative-infinity',\n      () => {\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup('1');\n          entry.insert({\n            maxAge: 1,\n            staleWhileRevalidate: Number.NEGATIVE_INFINITY,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insert/options-parameter-staleWhileRevalidate-field-negative-number',\n      () => {\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup('1');\n          entry.insert({\n            maxAge: 1,\n            staleWhileRevalidate: -1,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insert/options-parameter-staleWhileRevalidate-field-too-large',\n      () => {\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup('1');\n          entry.insert({\n            maxAge: 1,\n            staleWhileRevalidate: 2e13,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insert/options-parameter-length-field-valid-record',\n      () => {\n        let body;\n        assertDoesNotThrow(() => {\n          let entry = CoreCache.transactionLookup('1');\n          body = entry.insert({ maxAge: 1, length: 1 });\n        });\n        assert(\n          body instanceof FastlyBody,\n          true,\n          `entry.insert({maxAge: 1,length: 1}) instanceof FastlyBody`,\n        );\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insert/options-parameter-length-field-NaN',\n      () => {\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup('1');\n          entry.insert({\n            maxAge: 1,\n            length: NaN,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insert/options-parameter-length-field-postitive-infinity',\n      () => {\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup('1');\n          entry.insert({\n            maxAge: 1,\n            length: Number.POSITIVE_INFINITY,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insert/options-parameter-length-field-negative-infinity',\n      () => {\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup('1');\n          entry.insert({\n            maxAge: 1,\n            length: Number.NEGATIVE_INFINITY,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insert/options-parameter-length-field-negative-number',\n      () => {\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup('1');\n          entry.insert({\n            maxAge: 1,\n            length: -1,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insert/options-parameter-sensitive-field',\n      () => {\n        assertDoesNotThrow(() => {\n          let entry = CoreCache.transactionLookup('1');\n          entry.insert({\n            maxAge: 1,\n            sensitive: true,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insert/options-parameter-vary-field',\n      () => {\n        assertDoesNotThrow(() => {\n          let entry = CoreCache.transactionLookup('1');\n          entry.insert({\n            maxAge: 1,\n            vary: ['animal', 'mineral', 'vegetable'],\n          });\n        });\n      },\n    );\n  }\n\n  // insertAndStreamBack(options: TransactionInsertOptions): [FastlyBody, CacheEntry];\n  {\n    routes.set(\n      '/transaction-cache-entry/insertAndStreamBack/called-as-constructor',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          new entry.insertAndStreamBack({ maxAge: 1 });\n        }, TypeError);\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insertAndStreamBack/entry-parameter-not-supplied',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(\n          () => {\n            let entry = CoreCache.transactionLookup(path);\n            entry.insertAndStreamBack();\n          },\n          TypeError,\n          `insertAndStreamBack: At least 1 argument required, but only 0 passed`,\n        );\n      },\n    );\n\n    routes.set(\n      '/transaction-cache-entry/insertAndStreamBack/options-parameter-maxAge-field-valid-record',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        let writer;\n        let reader;\n        assertDoesNotThrow(() => {\n          let entry = CoreCache.transactionLookup(path);\n          [writer, reader] = entry.insertAndStreamBack({ maxAge: 1 });\n        });\n        assert(\n          writer instanceof FastlyBody,\n          true,\n          `writer instanceof FastlyBody`,\n        );\n        assert(\n          reader instanceof CacheEntry,\n          true,\n          `writer instanceof CacheEntry`,\n        );\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insertAndStreamBack/options-parameter-maxAge-field-NaN',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          entry.insertAndStreamBack({\n            maxAge: NaN,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insertAndStreamBack/options-parameter-maxAge-field-postitive-infinity',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          entry.insertAndStreamBack({\n            maxAge: Number.POSITIVE_INFINITY,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insertAndStreamBack/options-parameter-maxAge-field-negative-infinity',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          entry.insertAndStreamBack({\n            maxAge: Number.NEGATIVE_INFINITY,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insertAndStreamBack/options-parameter-maxAge-field-negative-number',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          entry.insertAndStreamBack({\n            maxAge: -1,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insertAndStreamBack/options-parameter-maxAge-field-too-large',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          entry.insertAndStreamBack({\n            maxAge: 2e13,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insertAndStreamBack/options-parameter-initialAge-field-valid-record',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        let writer;\n        let reader;\n        assertDoesNotThrow(() => {\n          let entry = CoreCache.transactionLookup(path);\n          [writer, reader] = entry.insertAndStreamBack({\n            maxAge: 1,\n            initialAge: 1,\n          });\n        });\n        assert(\n          writer instanceof FastlyBody,\n          true,\n          `writer instanceof FastlyBody`,\n        );\n        assert(\n          reader instanceof CacheEntry,\n          true,\n          `writer instanceof CacheEntry`,\n        );\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insertAndStreamBack/options-parameter-initialAge-field-NaN',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          entry.insertAndStreamBack({\n            maxAge: 1,\n            initialAge: NaN,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insertAndStreamBack/options-parameter-initialAge-field-postitive-infinity',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          entry.insertAndStreamBack({\n            maxAge: 1,\n            initialAge: Number.POSITIVE_INFINITY,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insertAndStreamBack/options-parameter-initialAge-field-negative-infinity',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          entry.insertAndStreamBack({\n            maxAge: 1,\n            initialAge: Number.NEGATIVE_INFINITY,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insertAndStreamBack/options-parameter-initialAge-field-negative-number',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          entry.insertAndStreamBack({\n            maxAge: 1,\n            initialAge: -1,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insertAndStreamBack/options-parameter-initialAge-field-too-large',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          entry.insertAndStreamBack({\n            maxAge: 1,\n            initialAge: 2e13,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insertAndStreamBack/options-parameter-staleWhileRevalidate-field-valid-record',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        let writer, reader;\n        assertDoesNotThrow(() => {\n          let entry = CoreCache.transactionLookup(path);\n          [writer, reader] = entry.insertAndStreamBack({\n            maxAge: 1,\n            staleWhileRevalidate: 1,\n          });\n        });\n        assert(\n          writer instanceof FastlyBody,\n          true,\n          `writer instanceof FastlyBody`,\n        );\n        assert(\n          reader instanceof CacheEntry,\n          true,\n          `writer instanceof CacheEntry`,\n        );\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insertAndStreamBack/options-parameter-staleWhileRevalidate-field-NaN',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          entry.insertAndStreamBack({\n            maxAge: 1,\n            staleWhileRevalidate: NaN,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insertAndStreamBack/options-parameter-staleWhileRevalidate-field-postitive-infinity',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          entry.insertAndStreamBack({\n            maxAge: 1,\n            staleWhileRevalidate: Number.POSITIVE_INFINITY,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insertAndStreamBack/options-parameter-staleWhileRevalidate-field-negative-infinity',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          entry.insertAndStreamBack({\n            maxAge: 1,\n            staleWhileRevalidate: Number.NEGATIVE_INFINITY,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insertAndStreamBack/options-parameter-staleWhileRevalidate-field-negative-number',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          entry.insertAndStreamBack({\n            maxAge: 1,\n            staleWhileRevalidate: -1,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insertAndStreamBack/options-parameter-staleWhileRevalidate-field-too-large',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          entry.insertAndStreamBack({\n            maxAge: 1,\n            staleWhileRevalidate: 2e13,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insertAndStreamBack/options-parameter-length-field-valid-record',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        let writer, reader;\n        assertDoesNotThrow(() => {\n          let entry = CoreCache.transactionLookup(path);\n          [writer, reader] = entry.insertAndStreamBack({\n            maxAge: 1,\n            length: 1,\n          });\n        });\n        assert(\n          writer instanceof FastlyBody,\n          true,\n          `writer instanceof FastlyBody`,\n        );\n        assert(\n          reader instanceof CacheEntry,\n          true,\n          `writer instanceof CacheEntry`,\n        );\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insertAndStreamBack/options-parameter-length-field-NaN',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          entry.insertAndStreamBack({\n            maxAge: 1,\n            length: NaN,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insertAndStreamBack/options-parameter-length-field-postitive-infinity',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          entry.insertAndStreamBack({\n            maxAge: 1,\n            length: Number.POSITIVE_INFINITY,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insertAndStreamBack/options-parameter-length-field-negative-infinity',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          entry.insertAndStreamBack({\n            maxAge: 1,\n            length: Number.NEGATIVE_INFINITY,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insertAndStreamBack/options-parameter-length-field-negative-number',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          entry.insertAndStreamBack({\n            maxAge: 1,\n            length: -1,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insertAndStreamBack/options-parameter-sensitive-field',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertDoesNotThrow(() => {\n          let entry = CoreCache.transactionLookup(path);\n          entry.insertAndStreamBack({\n            maxAge: 1,\n            sensitive: true,\n          });\n        });\n      },\n    );\n\n    routes.set(\n      '/transaction-cache-entry/insertAndStreamBack/write-to-writer-and-read-from-reader',\n      async (event) => {\n        const path = new URL(event.request.url).pathname;\n        let entry = CoreCache.transactionLookup(path);\n        let [writer, reader] = entry.insertAndStreamBack({\n          maxAge: 60 * 1000,\n          sensitive: true,\n        });\n        writer.append('hello');\n        writer.close();\n        const actual = await new Response(reader.body()).text();\n        assert(actual, 'hello', `actual === \"hello\"`);\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/insertAndStreamBack/options-parameter-vary-field',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertDoesNotThrow(() => {\n          let entry = CoreCache.transactionLookup(path);\n          entry.insertAndStreamBack({\n            maxAge: 1,\n            vary: ['animal', 'mineral', 'vegetable'],\n          });\n        });\n      },\n    );\n  }\n\n  // update(options: TransactionInsertOptions): void;\n  {\n    routes.set(\n      '/transaction-cache-entry/update/called-as-constructor',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          new entry.update({ maxAge: 1 });\n        }, TypeError);\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/update/entry-parameter-not-supplied',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(\n          () => {\n            let entry = CoreCache.transactionLookup(path);\n            entry.update();\n          },\n          TypeError,\n          `update: At least 1 argument required, but only 0 passed`,\n        );\n      },\n    );\n\n    routes.set(\n      '/transaction-cache-entry/update/options-parameter-maxAge-field-valid-record',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertDoesNotThrow(() => {\n          let writer = CoreCache.insert(path, {\n            maxAge: 0,\n            staleWhileRevalidate: 60 * 1000,\n          });\n          writer.append('meow');\n          writer.close();\n          let entry = CoreCache.transactionLookup(path);\n          entry.update({ maxAge: 1 });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/update/options-parameter-maxAge-field-NaN',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          entry.update({\n            maxAge: NaN,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/update/options-parameter-maxAge-field-postitive-infinity',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          entry.update({\n            maxAge: Number.POSITIVE_INFINITY,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/update/options-parameter-maxAge-field-negative-infinity',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          entry.update({\n            maxAge: Number.NEGATIVE_INFINITY,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/update/options-parameter-maxAge-field-negative-number',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          entry.update({\n            maxAge: -1,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/update/options-parameter-maxAge-field-too-large',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          entry.update({\n            maxAge: 2e13,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/update/options-parameter-initialAge-field-valid-record',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertDoesNotThrow(() => {\n          let writer = CoreCache.insert(path, {\n            maxAge: 0,\n            staleWhileRevalidate: 60 * 1000,\n          });\n          writer.append('meow');\n          writer.close();\n          let entry = CoreCache.transactionLookup(path);\n          entry.update({ maxAge: 1, initialAge: 1 });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/update/options-parameter-initialAge-field-NaN',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          entry.update({\n            maxAge: 1,\n            initialAge: NaN,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/update/options-parameter-initialAge-field-postitive-infinity',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          entry.update({\n            maxAge: 1,\n            initialAge: Number.POSITIVE_INFINITY,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/update/options-parameter-initialAge-field-negative-infinity',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          entry.update({\n            maxAge: 1,\n            initialAge: Number.NEGATIVE_INFINITY,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/update/options-parameter-initialAge-field-negative-number',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          entry.update({\n            maxAge: 1,\n            initialAge: -1,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/update/options-parameter-initialAge-field-too-large',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          entry.update({\n            maxAge: 1,\n            initialAge: 2e13,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/update/options-parameter-staleWhileRevalidate-field-valid-record',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertDoesNotThrow(() => {\n          let writer = CoreCache.insert(path, {\n            maxAge: 0,\n            staleWhileRevalidate: 60 * 1000,\n          });\n          writer.append('meow');\n          writer.close();\n          let entry = CoreCache.transactionLookup(path);\n          entry.update({ maxAge: 1, staleWhileRevalidate: 1 });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/update/options-parameter-staleWhileRevalidate-field-NaN',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          entry.update({\n            maxAge: 1,\n            staleWhileRevalidate: NaN,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/update/options-parameter-staleWhileRevalidate-field-postitive-infinity',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          entry.update({\n            maxAge: 1,\n            staleWhileRevalidate: Number.POSITIVE_INFINITY,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/update/options-parameter-staleWhileRevalidate-field-negative-infinity',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          entry.update({\n            maxAge: 1,\n            staleWhileRevalidate: Number.NEGATIVE_INFINITY,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/update/options-parameter-staleWhileRevalidate-field-negative-number',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          entry.update({\n            maxAge: 1,\n            staleWhileRevalidate: -1,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/update/options-parameter-staleWhileRevalidate-field-too-large',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          entry.update({\n            maxAge: 1,\n            staleWhileRevalidate: 2e13,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/update/options-parameter-length-field-valid-record',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertDoesNotThrow(() => {\n          let writer = CoreCache.insert(path, {\n            maxAge: 0,\n            staleWhileRevalidate: 60 * 1000,\n          });\n          writer.append('meow');\n          writer.close();\n          let entry = CoreCache.transactionLookup(path);\n          entry.update({ maxAge: 1, length: 1 });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/update/options-parameter-length-field-NaN',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          entry.update({\n            maxAge: 1,\n            length: NaN,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/update/options-parameter-length-field-postitive-infinity',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          entry.update({\n            maxAge: 1,\n            length: Number.POSITIVE_INFINITY,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/update/options-parameter-length-field-negative-infinity',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          entry.update({\n            maxAge: 1,\n            length: Number.NEGATIVE_INFINITY,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/update/options-parameter-length-field-negative-number',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          entry.update({\n            maxAge: 1,\n            length: -1,\n          });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/update/write-to-writer-and-read-from-reader',\n      async (event) => {\n        const path = new URL(event.request.url).pathname;\n        let entry = CoreCache.transactionLookup(path);\n        let writer = entry.insert({\n          maxAge: 1,\n          staleWhileRevalidate: 60 * 1000,\n        });\n        writer.append('meow');\n        writer.close();\n        entry = CoreCache.transactionLookup(path);\n        entry.update({\n          maxAge: 60 * 1000,\n        });\n        await sleep(1000);\n        entry = CoreCache.transactionLookup(path);\n        assert(entry.maxAge(), 60 * 1000, `entry2.maxAge() === 60 * 1000`);\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/update/options-parameter-vary-field',\n      async (event) => {\n        const path = new URL(event.request.url).pathname;\n        let entry = CoreCache.transactionLookup(path);\n        let writer = entry.insert({\n          maxAge: 1,\n          staleWhileRevalidate: 60 * 1000,\n          vary: ['animal', 'mineral', 'vegetable'],\n        });\n        writer.append('meow');\n        writer.close();\n        await sleep(1000);\n        entry = CoreCache.transactionLookup(path);\n        entry.update({\n          maxAge: 1000,\n          vary: ['animal'],\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/update/options-parameter-userMetadata-field',\n      async (event) => {\n        const path = new URL(event.request.url).pathname;\n        let entry = CoreCache.transactionLookup(path);\n        let writer = entry.insert({\n          maxAge: 1,\n          staleWhileRevalidate: 60 * 1000,\n        });\n        writer.append('meow');\n        writer.close();\n        await sleep(1000);\n        entry = CoreCache.transactionLookup(path);\n        entry.update({\n          maxAge: 1000,\n          userMetadata: 'hello',\n        });\n      },\n    );\n    // TODO: tests for options parameter fields\n    // surrogateKeys?: Array<string>,-- empty string? -- toString which throws -- wrong types?\n  }\n\n  // cancel(): void;\n  {\n    routes.set(\n      '/transaction-cache-entry/cancel/called-as-constructor',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        assertThrows(() => {\n          let entry = CoreCache.transactionLookup(path);\n          new entry.cancel();\n        }, TypeError);\n      },\n    );\n    routes.set('/transaction-cache-entry/cancel/called-once', (event) => {\n      const path = new URL(event.request.url).pathname;\n      assertDoesNotThrow(() => {\n        let entry = CoreCache.transactionLookup(path);\n        entry.cancel();\n      });\n    });\n    routes.set(\n      '/transaction-cache-entry/cancel/makes-entry-cancelled',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        let entry;\n        assertDoesNotThrow(() => {\n          entry = CoreCache.transactionLookup(path);\n          entry.cancel();\n        });\n        assertThrows(() => {\n          entry.insert({ maxAge: 1 });\n        });\n      },\n    );\n    routes.set(\n      '/transaction-cache-entry/cancel/called-twice-throws',\n      (event) => {\n        const path = new URL(event.request.url).pathname;\n        let entry;\n        assertDoesNotThrow(() => {\n          entry = CoreCache.transactionLookup(path);\n          entry.cancel();\n        });\n        assertThrows(() => {\n          entry.cancel();\n        });\n      },\n    );\n  }\n}\n\n{\n  routes.set(\n    '/core-cache/transaction-lookup-transaction-insert-vary-works',\n    async () => {\n      const key = `/core-cache/vary-works-${Date.now()}`;\n      const animal = 'animal';\n      let entry = CoreCache.transactionLookup(key, {\n        headers: {\n          [animal]: 'cat',\n        },\n      });\n      assert(entry.state().found(), false, `entry.state().found() === false`);\n      let writer = entry.insert({\n        maxAge: 60_000 * 60,\n        vary: [animal],\n        headers: {\n          [animal]: 'cat',\n        },\n      });\n\n      writer.append('cat');\n      writer.close();\n      entry.close();\n      await sleep(1_000);\n\n      entry = CoreCache.transactionLookup(key, {\n        headers: {\n          [animal]: 'cat',\n        },\n      });\n      assert(entry.state().found(), true, `entry.state().found() === true`);\n\n      assert(\n        await streamToString(entry.body()),\n        'cat',\n        `await streamToString(CoreCache.lookup(key).body())`,\n      );\n      entry.close();\n\n      entry = CoreCache.transactionLookup(key, {\n        headers: {\n          [animal]: 'dog',\n        },\n      });\n      assert(entry.state().found(), false, `entry.state().found() == false`);\n\n      writer = entry.insert({\n        maxAge: 60_000 * 60,\n        vary: [animal],\n        headers: {\n          [animal]: 'dog',\n        },\n      });\n\n      writer.append('dog');\n      writer.close();\n      entry.close();\n      await sleep(1_000);\n\n      entry = CoreCache.transactionLookup(key, {\n        headers: {\n          [animal]: 'dog',\n        },\n      });\n      assert(entry.state().found(), true, `entry.state().found() === true`);\n\n      assert(\n        await streamToString(entry.body()),\n        'dog',\n        `await streamToString(CoreCache.lookup(key).body())`,\n      );\n      entry.close();\n    },\n  );\n\n  routes.set('/core-cache/lookup-insert-vary-works', async () => {\n    const key = `/core-cache/vary-works-${Date.now()}`;\n    const animal = 'animal';\n    let entry = CoreCache.lookup(key, {\n      headers: {\n        [animal]: 'cat',\n      },\n    });\n    assert(entry, null, `entry == null`);\n    let writer = CoreCache.insert(key, {\n      maxAge: 60_000 * 60,\n      vary: [animal],\n      headers: {\n        [animal]: 'cat',\n      },\n    });\n\n    writer.append('cat');\n    writer.close();\n    await sleep(1_000);\n\n    entry = CoreCache.lookup(key, {\n      headers: {\n        [animal]: 'cat',\n      },\n    });\n    assert(entry.state().found(), true, `entry.state().found() === true`);\n\n    assert(\n      await streamToString(entry.body()),\n      'cat',\n      `await streamToString(CoreCache.lookup(key).body())`,\n    );\n    entry.close();\n\n    entry = CoreCache.lookup(key, {\n      headers: {\n        [animal]: 'dog',\n      },\n    });\n    assert(entry, null, `entry == null`);\n\n    writer = CoreCache.insert(key, {\n      maxAge: 60_000 * 60,\n      vary: [animal],\n      headers: {\n        [animal]: 'dog',\n      },\n    });\n\n    writer.append('dog');\n    writer.close();\n    await sleep(1_000);\n\n    entry = CoreCache.lookup(key, {\n      headers: {\n        [animal]: 'dog',\n      },\n    });\n    assert(entry.state().found(), true, `entry.state().found() === true`);\n\n    assert(\n      await streamToString(entry.body()),\n      'dog',\n      `await streamToString(CoreCache.lookup(key).body())`,\n    );\n  });\n}\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/cache-override.js",
    "content": "import { CacheOverride } from 'fastly:cache-override';\nimport { assert, assertThrows, assertDoesNotThrow } from './assertions.js';\nimport { isRunningLocally, routes } from './routes.js';\n\n// CacheOverride constructor\n{\n  routes.set(\n    '/cache-override/constructor/called-as-regular-function',\n    async () => {\n      assertThrows(\n        () => {\n          CacheOverride();\n        },\n        TypeError,\n        `calling a builtin CacheOverride constructor without new is forbidden`,\n      );\n    },\n  );\n  routes.set('/cache-override/constructor/empty-parameter', async () => {\n    assertThrows(\n      () => {\n        new CacheOverride();\n      },\n      TypeError,\n      `CacheOverride constructor: At least 1 argument required, but only 0 passed`,\n    );\n  });\n  routes.set('/cache-override/constructor/invalid-mode', async () => {\n    // empty string not allowed\n    assertThrows(\n      () => {\n        new CacheOverride('');\n      },\n      TypeError,\n      `CacheOverride constructor: 'mode' has to be \"none\", \"pass\", or \"override\", but got \"\"`,\n    );\n\n    assertThrows(\n      () => {\n        new CacheOverride('be nice to the cache');\n      },\n      TypeError,\n      `CacheOverride constructor: 'mode' has to be \"none\", \"pass\", or \"override\", but got \"be nice to the cache\"`,\n    );\n  });\n  routes.set('/cache-override/constructor/valid-mode', async () => {\n    assertDoesNotThrow(() => {\n      new CacheOverride('none');\n    });\n    assertDoesNotThrow(() => {\n      new CacheOverride('pass');\n    });\n    assertDoesNotThrow(() => {\n      new CacheOverride('override', {});\n    });\n    assertDoesNotThrow(() => {\n      new CacheOverride({});\n    });\n  });\n}\n// Using CacheOverride\n{\n  routes.set('/cache-override/fetch/mode-none', async () => {\n    if (isRunningLocally()) return;\n    {\n      const response = await fetch(\n        'https://http-me.fastly.dev/now?status=200',\n        {\n          backend: 'httpme',\n          cacheOverride: new CacheOverride('none'),\n        },\n      );\n      assert(\n        response.headers.has('x-cache'),\n        true,\n        `CacheOveride('none'); response.headers.has('x-cache') === true`,\n      );\n    }\n\n    {\n      const response = await fetch(\n        'https://http-me.fastly.dev/now?status=200',\n        {\n          backend: 'httpme',\n          cacheOverride: 'none',\n        },\n      );\n      assert(\n        response.headers.has('x-cache'),\n        true,\n        `CacheOveride('none'); response.headers.has('x-cache') === true`,\n      );\n    }\n  });\n  routes.set('/cache-override/fetch/mode-pass', async () => {\n    if (isRunningLocally()) return;\n\n    {\n      const response = await fetch(\n        'https://http-me.fastly.dev/now?status=200',\n        {\n          backend: 'httpme',\n          cacheOverride: new CacheOverride('pass'),\n        },\n      );\n      assert(\n        response.headers.has('x-cache'),\n        false,\n        `CacheOveride('pass'); response.headers.has('x-cache') === false`,\n      );\n    }\n\n    {\n      const response = await fetch(\n        'https://http-me.fastly.dev/now?status=200',\n        {\n          backend: 'httpme',\n          cacheOverride: 'pass',\n        },\n      );\n      assert(\n        response.headers.has('x-cache'),\n        false,\n        `CacheOveride('pass'); response.headers.has('x-cache') === false`,\n      );\n    }\n  });\n  routes.set('/cache-override/fetch/null-304-body', async (event) => {\n    const resp = await fetch(\n      new Request('https://http-me.fastly.dev/body=foo?status=304', {\n        method: 'POST',\n        backend: 'httpme',\n        cacheOverride: new CacheOverride({\n          async afterSend(resp) {\n            resp.ttl = 1000000000;\n          },\n        }),\n      }),\n    );\n    assert(\n      resp.body,\n      null,\n      '304s should never have bodies even when processed through the caching code',\n    );\n  });\n}\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/cache-simple.js",
    "content": "/// <reference path=\"../../../../../types/index.d.ts\" />\n/* eslint-env serviceworker */\n\nimport {\n  assert,\n  assertDoesNotThrow,\n  assertThrows,\n  assertRejects,\n  iteratableToStream,\n  streamToString,\n  assertResolves,\n} from './assertions.js';\nimport { SimpleCache, SimpleCacheEntry } from 'fastly:cache';\nimport { routes, isRunningLocally } from './routes.js';\n\nroutes.set('/simple-cache/interface', () => {\n  let actual = Reflect.ownKeys(SimpleCache);\n  let expected = [\n    'prototype',\n    'purge',\n    'get',\n    'getOrSet',\n    'set',\n    'length',\n    'name',\n  ];\n  assert(actual, expected, `Reflect.ownKeys(SimpleCache)`);\n\n  // Check the prototype descriptors are correct\n  {\n    actual = Reflect.getOwnPropertyDescriptor(SimpleCache, 'prototype');\n    expected = {\n      value: SimpleCache.prototype,\n      writable: false,\n      enumerable: false,\n      configurable: false,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(SimpleCache, 'prototype')`,\n    );\n  }\n\n  // Check the constructor function's defined parameter length is correct\n  {\n    actual = Reflect.getOwnPropertyDescriptor(SimpleCache, 'length');\n    expected = {\n      value: 0,\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(SimpleCache, 'length')`,\n    );\n  }\n\n  // Check the constructor function's name is correct\n  {\n    actual = Reflect.getOwnPropertyDescriptor(SimpleCache, 'name');\n    expected = {\n      value: 'SimpleCache',\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(SimpleCache, 'name')`,\n    );\n  }\n\n  // Check the prototype has the correct keys\n  {\n    actual = Reflect.ownKeys(SimpleCache.prototype);\n    expected = ['constructor', Symbol.toStringTag];\n    assert(actual, expected, `Reflect.ownKeys(SimpleCache.prototype)`);\n  }\n\n  // Check the constructor on the prototype is correct\n  {\n    actual = Reflect.getOwnPropertyDescriptor(\n      SimpleCache.prototype,\n      'constructor',\n    );\n    expected = {\n      writable: true,\n      enumerable: false,\n      configurable: true,\n      value: SimpleCache.prototype.constructor,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(SimpleCache.prototype, 'constructor')`,\n    );\n\n    assert(\n      typeof SimpleCache.prototype.constructor,\n      'function',\n      `typeof SimpleCache.prototype.constructor`,\n    );\n\n    actual = Reflect.getOwnPropertyDescriptor(\n      SimpleCache.prototype.constructor,\n      'length',\n    );\n    expected = {\n      value: 0,\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(SimpleCache.prototype.constructor, 'length')`,\n    );\n\n    actual = Reflect.getOwnPropertyDescriptor(\n      SimpleCache.prototype.constructor,\n      'name',\n    );\n    expected = {\n      value: 'SimpleCache',\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(SimpleCache.prototype.constructor, 'name')`,\n    );\n  }\n\n  // Check the Symbol.toStringTag on the prototype is correct\n  {\n    actual = Reflect.getOwnPropertyDescriptor(\n      SimpleCache.prototype,\n      Symbol.toStringTag,\n    );\n    expected = {\n      writable: false,\n      enumerable: false,\n      configurable: true,\n      value: 'SimpleCache',\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(SimpleCache.prototype, [Symbol.toStringTag])`,\n    );\n\n    assert(\n      typeof SimpleCache.prototype[Symbol.toStringTag],\n      'string',\n      `typeof SimpleCache.prototype[Symbol.toStringTag]`,\n    );\n  }\n\n  // Check the get static method has correct descriptors, length and name\n  {\n    actual = Reflect.getOwnPropertyDescriptor(SimpleCache, 'get');\n    expected = {\n      writable: true,\n      enumerable: true,\n      configurable: true,\n      value: SimpleCache.get,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(SimpleCache, 'get')`,\n    );\n\n    assert(typeof SimpleCache.get, 'function', `typeof SimpleCache.get`);\n\n    actual = Reflect.getOwnPropertyDescriptor(SimpleCache.get, 'length');\n    expected = {\n      value: 1,\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(SimpleCache.get, 'length')`,\n    );\n\n    actual = Reflect.getOwnPropertyDescriptor(SimpleCache.get, 'name');\n    expected = {\n      value: 'get',\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(SimpleCache.get, 'name')`,\n    );\n  }\n\n  // Check the set static method has correct descriptors, length and name\n  {\n    actual = Reflect.getOwnPropertyDescriptor(SimpleCache, 'set');\n    expected = {\n      writable: true,\n      enumerable: true,\n      configurable: true,\n      value: SimpleCache.set,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(SimpleCache, 'set')`,\n    );\n\n    assert(typeof SimpleCache.set, 'function', `typeof SimpleCache.set`);\n\n    actual = Reflect.getOwnPropertyDescriptor(SimpleCache.set, 'length');\n    expected = {\n      value: 3,\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(SimpleCache.set, 'length')`,\n    );\n\n    actual = Reflect.getOwnPropertyDescriptor(SimpleCache.set, 'name');\n    expected = {\n      value: 'set',\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(SimpleCache.set, 'name')`,\n    );\n  }\n\n  // Check the purge static method has correct descriptors, length and name\n  {\n    actual = Reflect.getOwnPropertyDescriptor(SimpleCache, 'purge');\n    expected = {\n      writable: true,\n      enumerable: true,\n      configurable: true,\n      value: SimpleCache.purge,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(SimpleCache, 'purge')`,\n    );\n\n    assert(typeof SimpleCache.purge, 'function', `typeof SimpleCache.purge`);\n\n    actual = Reflect.getOwnPropertyDescriptor(SimpleCache.purge, 'length');\n    expected = {\n      value: 2,\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(SimpleCache.purge, 'length')`,\n    );\n\n    actual = Reflect.getOwnPropertyDescriptor(SimpleCache.purge, 'name');\n    expected = {\n      value: 'purge',\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(SimpleCache.purge, 'name')`,\n    );\n  }\n\n  // Check the getOrSet static method has correct descriptors, length and name\n  {\n    actual = Reflect.getOwnPropertyDescriptor(SimpleCache, 'getOrSet');\n    expected = {\n      writable: true,\n      enumerable: true,\n      configurable: true,\n      value: SimpleCache.getOrSet,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(SimpleCache, 'getOrSet')`,\n    );\n\n    assert(\n      typeof SimpleCache.getOrSet,\n      'function',\n      `typeof SimpleCache.getOrSet`,\n    );\n\n    actual = Reflect.getOwnPropertyDescriptor(SimpleCache.getOrSet, 'length');\n    expected = {\n      value: 2,\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(SimpleCache.getOrSet, 'length')`,\n    );\n\n    actual = Reflect.getOwnPropertyDescriptor(SimpleCache.getOrSet, 'name');\n    expected = {\n      value: 'getOrSet',\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(SimpleCache.getOrSet, 'name')`,\n    );\n  }\n});\n\n// SimpleCache constructor\n{\n  routes.set('/simple-store/constructor/called-as-regular-function', () => {\n    assertThrows(() => {\n      SimpleCache();\n    }, TypeError);\n  });\n  routes.set('/simple-cache/constructor/throws', () => {\n    assertThrows(() => new SimpleCache(), TypeError);\n  });\n}\n\n// SimpleCache purge static method\n// static purge(key: string, options: PurgeOptions): undefined;\n{\n  routes.set('/simple-cache/purge/called-as-constructor', () => {\n    if (!isRunningLocally()) {\n      assertThrows(() => {\n        new SimpleCache.purge('1', { scope: 'global' });\n      }, TypeError);\n    }\n  });\n  // Ensure we correctly coerce the parameter to a string as according to\n  // https://tc39.es/ecma262/#sec-tostring\n  routes.set('/simple-cache/purge/key-parameter-calls-7.1.17-ToString', () => {\n    if (!isRunningLocally()) {\n      let sentinel;\n      const test = () => {\n        sentinel = Symbol('sentinel');\n        const key = {\n          toString() {\n            throw sentinel;\n          },\n        };\n        SimpleCache.purge(key, { scope: 'global' });\n      };\n      assertThrows(test);\n      try {\n        test();\n      } catch (thrownError) {\n        assert(thrownError, sentinel, 'thrownError === sentinel');\n      }\n      assertThrows(\n        () => {\n          SimpleCache.purge(Symbol(), { scope: 'global' });\n        },\n        TypeError,\n        `can't convert symbol to string`,\n      );\n    }\n  });\n  routes.set('/simple-cache/purge/key-parameter-not-supplied', () => {\n    if (!isRunningLocally()) {\n      assertThrows(\n        () => {\n          SimpleCache.purge();\n        },\n        TypeError,\n        `SimpleCache.purge: At least 2 arguments required, but only 0 passed`,\n      );\n    }\n  });\n  routes.set('/simple-cache/purge/key-parameter-empty-string', () => {\n    if (!isRunningLocally()) {\n      assertThrows(\n        () => {\n          SimpleCache.purge('', { scope: 'global' });\n        },\n        Error,\n        `SimpleCache.purge: key can not be an empty string`,\n      );\n    }\n  });\n  routes.set('/simple-cache/purge/key-parameter-8135-character-string', () => {\n    if (!isRunningLocally()) {\n      assertDoesNotThrow(() => {\n        const key = 'a'.repeat(8135);\n        SimpleCache.purge(key, { scope: 'global' });\n      });\n    }\n  });\n  routes.set('/simple-cache/purge/key-parameter-8136-character-string', () => {\n    if (!isRunningLocally()) {\n      assertThrows(\n        () => {\n          const key = 'a'.repeat(8136);\n          SimpleCache.purge(key, { scope: 'global' });\n        },\n        Error,\n        `SimpleCache.purge: key is too long, the maximum allowed length is 8135.`,\n      );\n    }\n  });\n  routes.set('/simple-cache/purge/options-parameter', () => {\n    if (!isRunningLocally()) {\n      assertThrows(\n        () => {\n          const key = 'a';\n          SimpleCache.purge(key, 'hello');\n        },\n        Error,\n        `SimpleCache.purge: options parameter is not an object.`,\n      );\n      assertThrows(\n        () => {\n          const key = 'a';\n          SimpleCache.purge(key, { scope: Symbol() });\n        },\n        Error,\n        `can't convert symbol to string`,\n      );\n      assertThrows(\n        () => {\n          const key = 'a';\n          SimpleCache.purge(key, { scope: '' });\n        },\n        Error,\n        `SimpleCache.purge: scope field of options parameter must be either 'pop', or 'global'.`,\n      );\n      assertDoesNotThrow(() => {\n        const key = 'a';\n        SimpleCache.purge(key, { scope: 'pop' });\n      });\n      assertDoesNotThrow(() => {\n        const key = 'a';\n        SimpleCache.purge(key, { scope: 'global' });\n      });\n    }\n  });\n  routes.set('/simple-cache/purge/returns-undefined', () => {\n    if (!isRunningLocally()) {\n      assert(\n        SimpleCache.purge('meow', { scope: 'global' }),\n        undefined,\n        \"SimpleCache.purge('meow', {scope'global'})\",\n      );\n    }\n  });\n}\n\n// SimpleCache set static method\n// static set(key: string, value: BodyInit, ttl: number): undefined;\n{\n  routes.set('/simple-cache/set/called-as-constructor', () => {\n    if (!isRunningLocally()) {\n      assertThrows(() => {\n        new SimpleCache.set('1', 'meow', 1);\n      }, TypeError);\n    }\n  });\n  // Ensure we correctly coerce the key parameter to a string as according to\n  // https://tc39.es/ecma262/#sec-tostring\n  routes.set('/simple-cache/set/key-parameter-calls-7.1.17-ToString', () => {\n    if (!isRunningLocally()) {\n      let sentinel;\n      const test = () => {\n        sentinel = Symbol('sentinel');\n        const key = {\n          toString() {\n            throw sentinel;\n          },\n        };\n        SimpleCache.set(key, 'meow', 1);\n      };\n      assertThrows(test);\n      try {\n        test();\n      } catch (thrownError) {\n        assert(thrownError, sentinel, 'thrownError === sentinel');\n      }\n      assertThrows(\n        () => {\n          SimpleCache.set(Symbol(), 'meow', 1);\n        },\n        TypeError,\n        `can't convert symbol to string`,\n      );\n    }\n  });\n  // Ensure we correctly coerce the tll parameter to a number as according to\n  // https://tc39.es/ecma262/#sec-tonumber\n  routes.set('/simple-cache/set/tll-parameter-7.1.4-ToNumber', () => {\n    if (!isRunningLocally()) {\n      let sentinel;\n      let requestedType;\n      const test = () => {\n        sentinel = Symbol('sentinel');\n        const ttl = {\n          [Symbol.toPrimitive](type) {\n            requestedType = type;\n            throw sentinel;\n          },\n        };\n        SimpleCache.set('1', 'meow', ttl);\n      };\n      assertThrows(test);\n      try {\n        test();\n      } catch (thrownError) {\n        assert(thrownError, sentinel, 'thrownError === sentinel');\n        assert(requestedType, 'number', 'requestedType === \"number\"');\n      }\n      assertThrows(\n        () => SimpleCache.set('1', 'meow', Symbol()),\n        TypeError,\n        `can't convert symbol to number`,\n      );\n    }\n  });\n  routes.set('/simple-cache/set/no-parameters-supplied', () => {\n    if (!isRunningLocally()) {\n      assertThrows(\n        () => {\n          SimpleCache.set();\n        },\n        TypeError,\n        `SimpleCache.set: At least 3 arguments required, but only 0 passed`,\n      );\n    }\n  });\n  routes.set('/simple-cache/set/key-parameter-empty-string', () => {\n    if (!isRunningLocally()) {\n      assertThrows(\n        () => {\n          SimpleCache.set('', 'meow', 1);\n        },\n        Error,\n        `SimpleCache.set: key can not be an empty string`,\n      );\n    }\n  });\n  routes.set('/simple-cache/set/key-parameter-8135-character-string', () => {\n    if (!isRunningLocally()) {\n      assertDoesNotThrow(() => {\n        const key = 'a'.repeat(8135);\n        SimpleCache.set(key, 'meow', 1);\n      });\n    }\n  });\n  routes.set('/simple-cache/set/key-parameter-8136-character-string', () => {\n    if (!isRunningLocally()) {\n      assertThrows(\n        () => {\n          const key = 'a'.repeat(8136);\n          SimpleCache.set(key, 'meow', 1);\n        },\n        Error,\n        `SimpleCache.set: key is too long, the maximum allowed length is 8135.`,\n      );\n    }\n  });\n  routes.set('/simple-cache/set/ttl-parameter-negative-number', () => {\n    if (!isRunningLocally()) {\n      assertThrows(\n        () => {\n          SimpleCache.set('cat', 'meow', -1);\n        },\n        Error,\n        `SimpleCache.set: TTL parameter is an invalid value, only positive numbers can be used for TTL values.`,\n      );\n    }\n  });\n  routes.set('/simple-cache/set/ttl-parameter-NaN', () => {\n    if (!isRunningLocally()) {\n      assertThrows(\n        () => {\n          SimpleCache.set('cat', 'meow', NaN);\n        },\n        Error,\n        `SimpleCache.set: TTL parameter is an invalid value, only positive numbers can be used for TTL values.`,\n      );\n    }\n  });\n  routes.set('/simple-cache/set/ttl-parameter-Infinity', () => {\n    if (!isRunningLocally()) {\n      assertThrows(\n        () => {\n          SimpleCache.set('cat', 'meow', Number.POSITIVE_INFINITY);\n        },\n        Error,\n        `SimpleCache.set: TTL parameter is an invalid value, only positive numbers can be used for TTL values.`,\n      );\n      assertThrows(\n        () => {\n          SimpleCache.set('cat', 'meow', Number.NEGATIVE_INFINITY);\n        },\n        Error,\n        `SimpleCache.set: TTL parameter is an invalid value, only positive numbers can be used for TTL values.`,\n      );\n    }\n  });\n  routes.set('/simple-cache/set/value-parameter-as-undefined', () => {\n    if (!isRunningLocally()) {\n      assert(\n        SimpleCache.set('meow', undefined, 1),\n        undefined,\n        'SimpleCache.set(\"meow\", undefined, 1) === undefined',\n      );\n    }\n  });\n  // - ReadableStream\n  routes.set(\n    '/simple-cache/set/value-parameter-readablestream-missing-length-parameter',\n    () => {\n      if (!isRunningLocally()) {\n        // TODO: remove this when streams are supported\n        assertThrows(\n          () => {\n            const stream = iteratableToStream([]);\n            SimpleCache.set('meow', stream, 1);\n          },\n          TypeError,\n          `Content-provided streams are not yet supported for streaming into SimpleCache`,\n        );\n      }\n    },\n  );\n  routes.set(\n    '/simple-cache/set/value-parameter-readablestream-negative-length-parameter',\n    () => {\n      if (!isRunningLocally()) {\n        // TODO: remove this when streams are supported\n        assertThrows(\n          () => {\n            const stream = iteratableToStream([]);\n            SimpleCache.set('meow', stream, 1, -1);\n          },\n          TypeError,\n          `Content-provided streams are not yet supported for streaming into SimpleCache`,\n        );\n      }\n    },\n  );\n  routes.set(\n    '/simple-cache/set/value-parameter-readablestream-nan-length-parameter',\n    () => {\n      if (!isRunningLocally()) {\n        // TODO: remove this when streams are supported\n        assertThrows(\n          () => {\n            const stream = iteratableToStream([]);\n            SimpleCache.set('meow', stream, 1, NaN);\n          },\n          TypeError,\n          `Content-provided streams are not yet supported for streaming into SimpleCache`,\n        );\n      }\n    },\n  );\n  routes.set(\n    '/simple-cache/set/value-parameter-readablestream-negative-infinity-length-parameter',\n    () => {\n      if (!isRunningLocally()) {\n        // TODO: remove this when streams are supported\n        assertThrows(\n          () => {\n            const stream = iteratableToStream([]);\n            SimpleCache.set('meow', stream, 1, Number.NEGATIVE_INFINITY);\n          },\n          TypeError,\n          `Content-provided streams are not yet supported for streaming into SimpleCache`,\n        );\n      }\n    },\n  );\n  routes.set(\n    '/simple-cache/set/value-parameter-readablestream-positive-infinity-length-parameter',\n    () => {\n      if (!isRunningLocally()) {\n        // TODO: remove this when streams are supported\n        assertThrows(\n          () => {\n            const stream = iteratableToStream([]);\n            SimpleCache.set('meow', stream, 1, Number.POSITIVE_INFINITY);\n          },\n          TypeError,\n          `Content-provided streams are not yet supported for streaming into SimpleCache`,\n        );\n      }\n    },\n  );\n  // Ensure we correctly coerce the tll parameter to a number as according to\n  // https://tc39.es/ecma262/#sec-tonumber\n  routes.set('/simple-cache/set/length-parameter-7.1.4-ToNumber', async () => {\n    if (!isRunningLocally()) {\n      const res = await fetch(\n        'https://compute-sdk-test-backend.edgecompute.app/',\n        {\n          backend: 'TheOrigin',\n        },\n      );\n      let sentinel;\n      let requestedType;\n      const test = () => {\n        sentinel = Symbol('sentinel');\n        const length = {\n          [Symbol.toPrimitive](type) {\n            requestedType = type;\n            throw sentinel;\n          },\n        };\n        SimpleCache.set('1', res.body, 1, length);\n      };\n      assertThrows(test);\n      try {\n        test();\n      } catch (thrownError) {\n        assert(thrownError, sentinel, 'thrownError === sentinel');\n        assert(requestedType, 'number', 'requestedType === \"number\"');\n      }\n      assertThrows(\n        () => SimpleCache.set('1', res.body, 1, Symbol()),\n        TypeError,\n        `can't convert symbol to number`,\n      );\n    }\n  });\n  routes.set('/simple-cache/set/value-parameter-readablestream-empty', () => {\n    if (!isRunningLocally()) {\n      // TODO: remove this when streams are supported\n      assertThrows(\n        () => {\n          const stream = iteratableToStream([]);\n          SimpleCache.set('meow', stream, 1, 0);\n        },\n        TypeError,\n        `Content-provided streams are not yet supported for streaming into SimpleCache`,\n      );\n    }\n  });\n  routes.set('/simple-cache/set/value-parameter-readablestream-locked', () => {\n    if (!isRunningLocally()) {\n      const stream = iteratableToStream([]);\n      // getReader() causes the stream to become locked\n      stream.getReader();\n      assertThrows(\n        () => {\n          SimpleCache.set('meow', stream, 1, 0);\n        },\n        TypeError,\n        `Can't use a ReadableStream that's locked or has ever been read from or canceled`,\n      );\n    }\n  });\n  routes.set('/simple-cache/set/value-parameter-readablestream', async () => {\n    if (!isRunningLocally()) {\n      const res = await fetch(\n        'https://compute-sdk-test-backend.edgecompute.app/',\n        {\n          backend: 'TheOrigin',\n        },\n      );\n      let result = SimpleCache.set(\n        'readablestream',\n        res.body,\n        100,\n        res.headers.get('content-length'),\n      );\n      assert(\n        result,\n        undefined,\n        `SimpleCache.set('readablestream', res.body, 100)`,\n      );\n    }\n  });\n\n  // - URLSearchParams\n  routes.set('/simple-cache/set/value-parameter-URLSearchParams', () => {\n    if (!isRunningLocally()) {\n      const items = [\n        new URLSearchParams(),\n        new URLSearchParams({ a: 'b', c: 'd' }),\n      ];\n      for (const searchParams of items) {\n        let result = SimpleCache.set('meow', searchParams, 1);\n        assert(\n          result,\n          undefined,\n          `SimpleCache.set(\"meow\", searchParams, 1) === undefiend`,\n        );\n      }\n    }\n  });\n  // - USV strings\n  routes.set('/simple-cache/set/value-parameter-strings', () => {\n    if (!isRunningLocally()) {\n      const strings = [\n        // empty\n        '',\n        // lone surrogate\n        '\\uD800',\n        // surrogate pair\n        '𠈓',\n        String('carrot'),\n      ];\n      for (const string of strings) {\n        let result = SimpleCache.set('meow', string, 1);\n        assert(\n          result,\n          undefined,\n          `SimpleCache.set(\"meow\", string, 1) === undefined`,\n        );\n      }\n    }\n  });\n\n  // https://tc39.es/ecma262/#sec-tostring\n  routes.set('/simple-cache/set/value-parameter-calls-7.1.17-ToString', () => {\n    if (!isRunningLocally()) {\n      let sentinel;\n      const test = () => {\n        sentinel = Symbol('sentinel');\n        const value = {\n          toString() {\n            throw sentinel;\n          },\n        };\n        SimpleCache.set('meow', value, 1);\n      };\n      assertThrows(test);\n      try {\n        test();\n      } catch (thrownError) {\n        assert(thrownError, sentinel, 'thrownError === sentinel');\n      }\n      assertThrows(\n        () => {\n          SimpleCache.set('meow', Symbol(), 1);\n        },\n        TypeError,\n        `can't convert symbol to string`,\n      );\n    }\n  });\n\n  // - buffer source\n  routes.set('/simple-cache/set/value-parameter-buffer', () => {\n    if (!isRunningLocally()) {\n      const typedArrayConstructors = [\n        Int8Array,\n        Int16Array,\n        Int32Array,\n        Float32Array,\n        Float64Array,\n        BigInt64Array,\n        Uint8Array,\n        Uint8ClampedArray,\n        Uint16Array,\n        Uint32Array,\n        BigUint64Array,\n      ];\n      for (const constructor of typedArrayConstructors) {\n        const typedArray = new constructor(8);\n        let result = SimpleCache.set('meow', typedArray.buffer, 1);\n        assert(\n          result,\n          undefined,\n          `SimpleCache.set(\"meow\", typedArray.buffer, 1) === undefined`,\n        );\n      }\n    }\n  });\n  routes.set('/simple-cache/set/value-parameter-arraybuffer', () => {\n    if (!isRunningLocally()) {\n      const typedArrayConstructors = [\n        Int8Array,\n        Int16Array,\n        Int32Array,\n        Float32Array,\n        Float64Array,\n        BigInt64Array,\n        Uint8Array,\n        Uint8ClampedArray,\n        Uint16Array,\n        Uint32Array,\n        BigUint64Array,\n      ];\n      for (const constructor of typedArrayConstructors) {\n        const typedArray = new constructor(8);\n        let result = SimpleCache.set('meow', typedArray.buffer, 1);\n        assert(\n          result,\n          undefined,\n          `SimpleCache.set(\"meow\", typedArray.buffer, 1) === undefined`,\n        );\n      }\n    }\n  });\n  routes.set('/simple-cache/set/value-parameter-typed-arrays', () => {\n    if (!isRunningLocally()) {\n      const typedArrayConstructors = [\n        Int8Array,\n        Int16Array,\n        Int32Array,\n        Float32Array,\n        Float64Array,\n        BigInt64Array,\n        Uint8Array,\n        Uint8ClampedArray,\n        Uint16Array,\n        Uint32Array,\n        BigUint64Array,\n      ];\n      for (const constructor of typedArrayConstructors) {\n        const typedArray = new constructor(8);\n        let result = SimpleCache.set('meow', typedArray, 1);\n        assert(\n          result,\n          undefined,\n          `SimpleCache.set(\"meow\", typedArray, 1) === undefined`,\n        );\n      }\n    }\n  });\n  routes.set('/simple-cache/set/value-parameter-dataview', () => {\n    if (!isRunningLocally()) {\n      const typedArrayConstructors = [\n        Int8Array,\n        Uint8Array,\n        Uint8ClampedArray,\n        Int16Array,\n        Uint16Array,\n        Int32Array,\n        Uint32Array,\n        Float32Array,\n        Float64Array,\n        BigInt64Array,\n        BigUint64Array,\n      ];\n      for (const constructor of typedArrayConstructors) {\n        const typedArray = new constructor(8);\n        const view = new DataView(typedArray.buffer);\n        let result = SimpleCache.set('meow', view, 1);\n        assert(\n          result,\n          undefined,\n          `SimpleCache.set(\"meow\", view, 1) === undefined`,\n        );\n      }\n    }\n  });\n  routes.set('/simple-cache/set/returns-undefined', () => {\n    if (!isRunningLocally()) {\n      assert(\n        SimpleCache.set('1', 'meow', 1),\n        undefined,\n        \"SimpleCache.set('1', 'meow', 1) === undefined\",\n      );\n    }\n  });\n}\n\n// SimpleCache get static method\n// static get(key: string): SimpleCacheEntry | null;\n{\n  routes.set('/simple-cache/get/called-as-constructor', () => {\n    if (!isRunningLocally()) {\n      assertThrows(() => {\n        new SimpleCache.get('1');\n      }, TypeError);\n    }\n  });\n  // https://tc39.es/ecma262/#sec-tostring\n  routes.set('/simple-cache/get/key-parameter-calls-7.1.17-ToString', () => {\n    if (!isRunningLocally()) {\n      let sentinel;\n      const test = () => {\n        sentinel = Symbol('sentinel');\n        const key = {\n          toString() {\n            throw sentinel;\n          },\n        };\n        SimpleCache.get(key);\n      };\n      assertThrows(test);\n      try {\n        test();\n      } catch (thrownError) {\n        assert(thrownError, sentinel, 'thrownError === sentinel');\n      }\n      assertThrows(\n        () => {\n          SimpleCache.get(Symbol());\n        },\n        TypeError,\n        `can't convert symbol to string`,\n      );\n    }\n  });\n  routes.set('/simple-cache/get/key-parameter-not-supplied', () => {\n    if (!isRunningLocally()) {\n      assertThrows(\n        () => {\n          SimpleCache.get();\n        },\n        TypeError,\n        `SimpleCache.get: At least 1 argument required, but only 0 passed`,\n      );\n    }\n  });\n  routes.set('/simple-cache/get/key-parameter-empty-string', () => {\n    if (!isRunningLocally()) {\n      assertThrows(\n        () => {\n          SimpleCache.get('');\n        },\n        Error,\n        `SimpleCache.get: key can not be an empty string`,\n      );\n    }\n  });\n  routes.set('/simple-cache/get/key-parameter-8135-character-string', () => {\n    if (!isRunningLocally()) {\n      assertDoesNotThrow(() => {\n        const key = 'a'.repeat(8135);\n        SimpleCache.get(key);\n      });\n    }\n  });\n  routes.set('/simple-cache/get/key-parameter-8136-character-string', () => {\n    if (!isRunningLocally()) {\n      assertThrows(\n        () => {\n          const key = 'a'.repeat(8136);\n          SimpleCache.get(key);\n        },\n        Error,\n        `SimpleCache.get: key is too long, the maximum allowed length is 8135.`,\n      );\n    }\n  });\n  routes.set('/simple-cache/get/key-does-not-exist-returns-null', () => {\n    if (!isRunningLocally()) {\n      let result = SimpleCache.get(Math.random());\n      assert(result, null, `SimpleCache.get(Math.random()) === null`);\n    }\n  });\n  routes.set('/simple-cache/get/key-exists', () => {\n    if (!isRunningLocally()) {\n      SimpleCache.set('cat', 'meow', 100);\n      let result = SimpleCache.get('cat');\n      assert(\n        result instanceof SimpleCacheEntry,\n        true,\n        `SimpleCache.get('cat') instanceof SimpleCacheEntry`,\n      );\n    }\n  });\n}\n\n// SimpleCacheEntry\n{\n  routes.set('/simple-cache-entry/interface', async () => {\n    return simpleCacheEntryInterfaceTests();\n  });\n  routes.set('/simple-cache-entry/text/valid', async () => {\n    if (!isRunningLocally()) {\n      let key = `entry-text-valid`;\n      SimpleCache.set(key, 'hello', 100);\n      let entry = SimpleCache.get(key);\n      let result = entry.text();\n      assert(\n        result instanceof Promise,\n        true,\n        `entry.text() instanceof Promise`,\n      );\n      result = await result;\n      assert(result, 'hello', `await entry.text()`);\n    }\n  });\n  routes.set('/simple-cache-entry/json/valid', async () => {\n    if (!isRunningLocally()) {\n      let key = `entry-json-valid`;\n      const obj = { a: 1, b: 2, c: 3 };\n      SimpleCache.set(key, JSON.stringify(obj), 100);\n      let entry = SimpleCache.get(key);\n      let result = entry.json();\n      assert(\n        result instanceof Promise,\n        true,\n        `entry.json() instanceof Promise`,\n      );\n      result = await result;\n      assert(result, obj, `await entry.json()`);\n    }\n  });\n  routes.set('/simple-cache-entry/json/invalid', async () => {\n    if (!isRunningLocally()) {\n      let key = `entry-json-invalid`;\n      SimpleCache.set(key, \"132abc;['-=9\", 100);\n      let entry = SimpleCache.get(key);\n      await assertRejects(\n        () => entry.json(),\n        SyntaxError,\n        `JSON.parse: unexpected non-whitespace character after JSON data at line 1 column 4 of the JSON data`,\n      );\n    }\n  });\n  routes.set('/simple-cache-entry/arrayBuffer/valid', async () => {\n    if (!isRunningLocally()) {\n      let key = `entry-arraybuffer-valid`;\n      SimpleCache.set(key, new Int8Array([0, 1, 2, 3]), 100);\n      let entry = SimpleCache.get(key);\n      let result = entry.arrayBuffer();\n      assert(\n        result instanceof Promise,\n        true,\n        `entry.arrayBuffer() instanceof Promise`,\n      );\n      result = await result;\n      assert(\n        result instanceof ArrayBuffer,\n        true,\n        `(await entry.arrayBuffer()) instanceof ArrayBuffer`,\n      );\n    }\n  });\n  routes.set('/simple-cache-entry/body', async () => {\n    if (!isRunningLocally()) {\n      let key = `entry-body`;\n      SimpleCache.set(key, 'body body body', 100);\n      let entry = SimpleCache.get(key);\n      let result = entry.body;\n      assert(\n        result instanceof ReadableStream,\n        true,\n        `entry.body instanceof ReadableStream`,\n      );\n      let text = await streamToString(result);\n      assert(text, 'body body body', `entry.body contents as string`);\n    }\n  });\n  routes.set('/simple-cache-entry/bodyUsed', async () => {\n    if (!isRunningLocally()) {\n      let key = `entry-bodyUsed`;\n      SimpleCache.set(key, 'body body body', 100);\n      let entry = SimpleCache.get(key);\n      assert(entry.bodyUsed, false, `entry.bodyUsed`);\n      await entry.text();\n      assert(entry.bodyUsed, true, `entry.bodyUsed`);\n    }\n  });\n  routes.set('/simple-cache-entry/readablestream', async () => {\n    if (!isRunningLocally()) {\n      const res = await fetch(\n        'https://compute-sdk-test-backend.edgecompute.app/',\n        {\n          backend: 'TheOrigin',\n        },\n      );\n      let key = `readablestream`;\n      SimpleCache.set(key, res.body, 100, res.headers.get('content-length'));\n      let entry = SimpleCache.get(key);\n      assert(\n        await entry.text(),\n        'Compute SDK Test Backend',\n        `await entry.text()`,\n      );\n    }\n  });\n}\nasync function simpleCacheEntryInterfaceTests() {\n  let actual = Reflect.ownKeys(SimpleCacheEntry);\n  let expected = ['prototype', 'length', 'name'];\n  assert(actual, expected, `Reflect.ownKeys(SimpleCacheEntry)`);\n\n  actual = Reflect.getOwnPropertyDescriptor(SimpleCacheEntry, 'prototype');\n  expected = {\n    value: SimpleCacheEntry.prototype,\n    writable: false,\n    enumerable: false,\n    configurable: false,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(SimpleCacheEntry, 'prototype')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(SimpleCacheEntry, 'length');\n  expected = {\n    value: 0,\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(SimpleCacheEntry, 'length')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(SimpleCacheEntry, 'name');\n  expected = {\n    value: 'SimpleCacheEntry',\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(SimpleCacheEntry, 'name')`,\n  );\n\n  actual = Reflect.ownKeys(SimpleCacheEntry.prototype);\n  expected = [\n    'constructor',\n    'body',\n    'bodyUsed',\n    'arrayBuffer',\n    'json',\n    'text',\n    Symbol.toStringTag,\n  ];\n  assert(actual, expected, `Reflect.ownKeys(SimpleCacheEntry.prototype)`);\n\n  actual = Reflect.getOwnPropertyDescriptor(\n    SimpleCacheEntry.prototype,\n    'constructor',\n  );\n  expected = {\n    writable: true,\n    enumerable: false,\n    configurable: true,\n    value: SimpleCacheEntry.prototype.constructor,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(SimpleCacheEntry.prototype, 'constructor')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(SimpleCacheEntry.prototype, 'text');\n  expected = {\n    writable: true,\n    enumerable: true,\n    configurable: true,\n    value: SimpleCacheEntry.prototype.text,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(SimpleCacheEntry.prototype, 'text')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(SimpleCacheEntry.prototype, 'json');\n  expected = {\n    writable: true,\n    enumerable: true,\n    configurable: true,\n    value: SimpleCacheEntry.prototype.json,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(SimpleCacheEntry.prototype, 'json')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(\n    SimpleCacheEntry.prototype,\n    'arrayBuffer',\n  );\n  expected = {\n    writable: true,\n    enumerable: true,\n    configurable: true,\n    value: SimpleCacheEntry.prototype.arrayBuffer,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(SimpleCacheEntry.prototype, 'arrayBuffer')`,\n  );\n  actual = Reflect.getOwnPropertyDescriptor(SimpleCacheEntry.prototype, 'body');\n  assert(\n    actual.enumerable,\n    true,\n    `Reflect.getOwnPropertyDescriptor(SimpleCacheEntry.prototype, 'body').enumerable`,\n  );\n  assert(\n    actual.configurable,\n    true,\n    `Reflect.getOwnPropertyDescriptor(SimpleCacheEntry.prototype, 'body').configurable`,\n  );\n  assert(\n    'set' in actual,\n    true,\n    `'set' in Reflect.getOwnPropertyDescriptor(SimpleCacheEntry.prototype, 'body')`,\n  );\n  assert(\n    actual.set,\n    undefined,\n    `Reflect.getOwnPropertyDescriptor(SimpleCacheEntry.prototype, 'body').set`,\n  );\n  assert(\n    typeof actual.get,\n    'function',\n    `typeof Reflect.getOwnPropertyDescriptor(SimpleCacheEntry.prototype, 'body').get`,\n  );\n  actual = Reflect.getOwnPropertyDescriptor(\n    SimpleCacheEntry.prototype,\n    'bodyUsed',\n  );\n  assert(\n    actual.enumerable,\n    true,\n    `Reflect.getOwnPropertyDescriptor(SimpleCacheEntry.prototype, 'bodyUsed').enumerable`,\n  );\n  assert(\n    actual.configurable,\n    true,\n    `Reflect.getOwnPropertyDescriptor(SimpleCacheEntry.prototype, 'bodyUsed').configurable`,\n  );\n  assert(\n    'set' in actual,\n    true,\n    `'set' in Reflect.getOwnPropertyDescriptor(SimpleCacheEntry.prototype, 'bodyUsed')`,\n  );\n  assert(\n    actual.set,\n    undefined,\n    `Reflect.getOwnPropertyDescriptor(SimpleCacheEntry.prototype, 'bodyUsed').set`,\n  );\n  assert(\n    typeof actual.get,\n    'function',\n    `typeof Reflect.getOwnPropertyDescriptor(SimpleCacheEntry.prototype, 'bodyUsed').get`,\n  );\n\n  assert(\n    typeof SimpleCacheEntry.prototype.constructor,\n    'function',\n    `typeof SimpleCacheEntry.prototype.constructor`,\n  );\n  assert(\n    typeof SimpleCacheEntry.prototype.text,\n    'function',\n    `typeof SimpleCacheEntry.prototype.text`,\n  );\n  assert(\n    typeof SimpleCacheEntry.prototype.json,\n    'function',\n    `typeof SimpleCacheEntry.prototype.json`,\n  );\n  assert(\n    typeof SimpleCacheEntry.prototype.arrayBuffer,\n    'function',\n    `typeof SimpleCacheEntry.prototype.arrayBuffer`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(\n    SimpleCacheEntry.prototype.constructor,\n    'length',\n  );\n  expected = {\n    value: 0,\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(SimpleCacheEntry.prototype.constructor, 'length')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(\n    SimpleCacheEntry.prototype.constructor,\n    'name',\n  );\n  expected = {\n    value: 'SimpleCacheEntry',\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(SimpleCacheEntry.prototype.constructor, 'name')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(\n    SimpleCacheEntry.prototype.text,\n    'length',\n  );\n  expected = {\n    value: 0,\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(SimpleCacheEntry.prototype.text, 'length')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(\n    SimpleCacheEntry.prototype.text,\n    'name',\n  );\n  expected = {\n    value: 'text',\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(SimpleCacheEntry.prototype.text, 'name')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(\n    SimpleCacheEntry.prototype.json,\n    'length',\n  );\n  expected = {\n    value: 0,\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(SimpleCacheEntry.prototype.json, 'length')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(\n    SimpleCacheEntry.prototype.json,\n    'name',\n  );\n  expected = {\n    value: 'json',\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(SimpleCacheEntry.prototype.json, 'name')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(\n    SimpleCacheEntry.prototype.arrayBuffer,\n    'length',\n  );\n  expected = {\n    value: 0,\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(SimpleCacheEntry.prototype.arrayBuffer, 'length')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(\n    SimpleCacheEntry.prototype.arrayBuffer,\n    'name',\n  );\n  expected = {\n    value: 'arrayBuffer',\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(SimpleCacheEntry.prototype.arrayBuffer, 'name')`,\n  );\n}\n\n// SimpleCache getOrSet static method\n// static getOrSet(key: string, set: () => Promise<{value: BodyInit,  ttl: number}>): Promise<SimpleCacheEntry>;\n// static getOrSet(key: string, set: () => Promise<{value: ReadableStream, ttl: number, length: number}>): Promise<SimpleCacheEntry>;\n{\n  routes.set('/simple-cache/getOrSet/rejection-rejects-outer', async () => {\n    if (!isRunningLocally()) {\n      let key = String(Math.random());\n      SimpleCache.get(key);\n      assertRejects(\n        () =>\n          SimpleCache.getOrSet(key, async () => {\n            throw RangeError('inner rejection');\n          }),\n        RangeError,\n        'inner rejection',\n      );\n    }\n  });\n\n  routes.set('/simple-cache/getOrSet/called-as-constructor', () => {\n    if (!isRunningLocally()) {\n      let key = '/simple-cache/getOrSet/called-as-constructor';\n      assertThrows(() => {\n        new SimpleCache.getOrSet(key, async () => {\n          return {\n            value: 'meow',\n            ttl: 10,\n          };\n        });\n      }, TypeError);\n    }\n  });\n  routes.set('/simple-cache/getOrSet/no-parameters-supplied', async () => {\n    if (!isRunningLocally()) {\n      await assertRejects(\n        async () => {\n          await SimpleCache.getOrSet();\n        },\n        TypeError,\n        `SimpleCache.getOrSet: At least 2 arguments required, but only 0 passed`,\n      );\n    }\n  });\n  // Ensure we correctly coerce the key parameter to a string as according to\n  // https://tc39.es/ecma262/#sec-tostring\n  routes.set(\n    '/simple-cache/getOrSet/key-parameter-calls-7.1.17-ToString',\n    async () => {\n      if (!isRunningLocally()) {\n        let sentinel = { sentinel: 'sentinel' };\n        const test = async () => {\n          const key = {\n            toString() {\n              throw sentinel;\n            },\n          };\n          await SimpleCache.getOrSet(key, async () => {\n            return {\n              value: 'meow',\n              ttl: 10,\n            };\n          });\n        };\n        await assertRejects(test);\n        try {\n          await test();\n        } catch (thrownError) {\n          assert(thrownError, sentinel, 'thrownError === sentinel');\n        }\n        await assertRejects(\n          async () => {\n            await SimpleCache.getOrSet(Symbol(), async () => {\n              return {\n                value: 'meow',\n                ttl: 10,\n              };\n            });\n          },\n          TypeError,\n          `can't convert symbol to string`,\n        );\n      }\n    },\n  );\n\n  // TODO: second parameter not a function\n\n  routes.set('/simple-cache/getOrSet/key-parameter-empty-string', async () => {\n    if (!isRunningLocally()) {\n      await assertRejects(\n        async () => {\n          await SimpleCache.getOrSet('', async () => {\n            return {\n              value: 'meow',\n              ttl: 10,\n            };\n          });\n        },\n        Error,\n        `SimpleCache.getOrSet: key can not be an empty string`,\n      );\n    }\n  });\n  routes.set(\n    '/simple-cache/getOrSet/key-parameter-8135-character-string',\n    async () => {\n      if (!isRunningLocally()) {\n        await assertDoesNotThrow(async () => {\n          const key = 'a'.repeat(8135);\n          await SimpleCache.getOrSet(key, async () => {\n            return {\n              value: 'meow',\n              ttl: 10,\n            };\n          });\n        });\n      }\n    },\n  );\n  routes.set(\n    '/simple-cache/getOrSet/key-parameter-8136-character-string',\n    async () => {\n      if (!isRunningLocally()) {\n        await assertRejects(\n          async () => {\n            const key = 'a'.repeat(8136);\n            await SimpleCache.getOrSet(key, async () => {\n              return {\n                value: 'meow',\n                ttl: 10,\n              };\n            });\n          },\n          Error,\n          `SimpleCache.getOrSet: key is too long, the maximum allowed length is 8135.`,\n        );\n      }\n    },\n  );\n  // Ensure we correctly coerce the ttl field to a number as according to\n  // https://tc39.es/ecma262/#sec-tonumber\n  routes.set('/simple-cache/getOrSet/ttl-field-7.1.4-ToNumber', async () => {\n    if (!isRunningLocally()) {\n      let key = '/simple-cache/getOrSet/ttl-field-7.1.4-ToNumber';\n      let sentinel = { sentinel: 'sentinel' };\n      let requestedType;\n      const test = async () => {\n        const ttl = {\n          [Symbol.toPrimitive](type) {\n            requestedType = type;\n            throw sentinel;\n          },\n        };\n        await SimpleCache.getOrSet(key, async () => {\n          return {\n            value: 'meow',\n            ttl,\n          };\n        });\n      };\n      await assertRejects(test);\n      try {\n        await test();\n      } catch (thrownError) {\n        assert(thrownError, sentinel, 'thrownError === sentinel');\n        assert(requestedType, 'number', 'requestedType === \"number\"');\n      }\n      await assertRejects(\n        () =>\n          SimpleCache.getOrSet(key, async () => {\n            return {\n              value: 'meow',\n              ttl: Symbol(),\n            };\n          }),\n        TypeError,\n        `can't convert symbol to number`,\n      );\n    }\n  });\n  routes.set('/simple-cache/getOrSet/ttl-field-negative-number', async () => {\n    if (!isRunningLocally()) {\n      let key = '/simple-cache/getOrSet/ttl-field-negative-number';\n      await assertRejects(\n        async () => {\n          await SimpleCache.getOrSet(key, async () => {\n            return {\n              value: 'meow',\n              ttl: -1,\n            };\n          });\n        },\n        Error,\n        `SimpleCache.getOrSet: TTL field is an invalid value, only positive numbers can be used for TTL values.`,\n      );\n    }\n  });\n  routes.set('/simple-cache/getOrSet/ttl-field-NaN', async () => {\n    if (!isRunningLocally()) {\n      let key = '/simple-cache/getOrSet/ttl-field-NaN';\n      await assertRejects(\n        async () => {\n          await SimpleCache.getOrSet(key, async () => {\n            return {\n              value: 'meow',\n              ttl: NaN,\n            };\n          });\n        },\n        Error,\n        `SimpleCache.getOrSet: TTL field is an invalid value, only positive numbers can be used for TTL values.`,\n      );\n    }\n  });\n  routes.set('/simple-cache/getOrSet/ttl-field-Infinity', async () => {\n    if (!isRunningLocally()) {\n      let key = '/simple-cache/getOrSet/ttl-field-Infinity';\n      await assertRejects(\n        async () => {\n          await SimpleCache.getOrSet(key, async () => {\n            return {\n              value: 'meow',\n              ttl: Number.POSITIVE_INFINITY,\n            };\n          });\n        },\n        Error,\n        `SimpleCache.getOrSet: TTL field is an invalid value, only positive numbers can be used for TTL values.`,\n      );\n      await assertRejects(\n        async () => {\n          await SimpleCache.getOrSet(key, async () => {\n            return {\n              value: 'meow',\n              ttl: Number.NEGATIVE_INFINITY,\n            };\n          });\n        },\n        Error,\n        `SimpleCache.getOrSet: TTL field is an invalid value, only positive numbers can be used for TTL values.`,\n      );\n    }\n  });\n  routes.set('/simple-cache/getOrSet/value-field-as-undefined', async () => {\n    if (!isRunningLocally()) {\n      let key = '/simple-cache/getOrSet/value-field-as-undefined';\n      await assertResolves(async () => {\n        await SimpleCache.getOrSet(key, async () => {\n          return { value: undefined, ttl: 1 };\n        });\n      });\n    }\n  });\n  // - ReadableStream\n  routes.set(\n    '/simple-cache/getOrSet/value-field-readablestream-missing-length-field',\n    async () => {\n      if (!isRunningLocally()) {\n        let key =\n          '/simple-cache/getOrSet/value-field-readablestream-missing-length-field';\n        // TODO: remove this when streams are supported\n        await assertRejects(\n          async () => {\n            const stream = iteratableToStream([]);\n            await SimpleCache.getOrSet(key, async () => {\n              return { value: stream, ttl: 1 };\n            });\n          },\n          TypeError,\n          `Content-provided streams are not yet supported for streaming into SimpleCache`,\n        );\n      }\n    },\n  );\n  routes.set(\n    '/simple-cache/getOrSet/value-field-readablestream-negative-length-field',\n    async () => {\n      if (!isRunningLocally()) {\n        let key =\n          '/simple-cache/getOrSet/value-field-readablestream-negative-length-field';\n        // TODO: remove this when streams are supported\n        await assertRejects(\n          async () => {\n            const stream = iteratableToStream([]);\n            await SimpleCache.getOrSet(key, async () => {\n              return { value: stream, ttl: 1, length: -1 };\n            });\n          },\n          TypeError,\n          `Content-provided streams are not yet supported for streaming into SimpleCache`,\n        );\n      }\n    },\n  );\n  routes.set(\n    '/simple-cache/getOrSet/value-field-readablestream-nan-length-field',\n    async () => {\n      if (!isRunningLocally()) {\n        let key =\n          '/simple-cache/getOrSet/value-field-readablestream-nan-length-field';\n        // TODO: remove this when streams are supported\n        await assertRejects(\n          async () => {\n            const stream = iteratableToStream([]);\n            await SimpleCache.getOrSet(key, async () => {\n              return { value: stream, ttl: 1, length: NaN };\n            });\n          },\n          TypeError,\n          `Content-provided streams are not yet supported for streaming into SimpleCache`,\n        );\n      }\n    },\n  );\n  routes.set(\n    '/simple-cache/getOrSet/value-field-readablestream-negative-infinity-length-field',\n    async () => {\n      if (!isRunningLocally()) {\n        let key =\n          '/simple-cache/getOrSet/value-field-readablestream-negative-infinity-length-field';\n        // TODO: remove this when streams are supported\n        await assertRejects(\n          async () => {\n            const stream = iteratableToStream([]);\n            await SimpleCache.getOrSet(key, async () => {\n              return {\n                value: stream,\n                ttl: 1,\n                length: Number.NEGATIVE_INFINITY,\n              };\n            });\n          },\n          TypeError,\n          `Content-provided streams are not yet supported for streaming into SimpleCache`,\n        );\n      }\n    },\n  );\n  routes.set(\n    '/simple-cache/getOrSet/value-field-readablestream-positive-infinity-length-field',\n    async () => {\n      if (!isRunningLocally()) {\n        let key =\n          '/simple-cache/getOrSet/value-field-readablestream-positive-infinity-length-field';\n        // TODO: remove this when streams are supported\n        await assertRejects(\n          async () => {\n            const stream = iteratableToStream([]);\n            await SimpleCache.getOrSet(key, async () => {\n              return {\n                value: stream,\n                ttl: 1,\n                length: Number.POSITIVE_INFINITY,\n              };\n            });\n          },\n          TypeError,\n          `Content-provided streams are not yet supported for streaming into SimpleCache`,\n        );\n      }\n    },\n  );\n  // Ensure we correctly coerce the length field to a number as according to\n  // https://tc39.es/ecma262/#sec-tonumber\n  routes.set('/simple-cache/getOrSet/length-field-7.1.4-ToNumber', async () => {\n    if (!isRunningLocally()) {\n      let key = '/simple-cache/getOrSet/length-field-7.1.4-ToNumber';\n      const res = await fetch(\n        'https://compute-sdk-test-backend.edgecompute.app/',\n        {\n          backend: 'TheOrigin',\n        },\n      );\n      let sentinel = { sentinel: 'sentinel' };\n      let requestedType;\n      const test = async () => {\n        const length = {\n          [Symbol.toPrimitive](type) {\n            requestedType = type;\n            throw sentinel;\n          },\n        };\n        await SimpleCache.getOrSet(key, async () => {\n          return { value: res.body, ttl: 1, length };\n        });\n      };\n      await assertRejects(test);\n      try {\n        await test();\n      } catch (thrownError) {\n        assert(thrownError, sentinel, 'thrownError === sentinel');\n        assert(requestedType, 'number', 'requestedType === \"number\"');\n      }\n      await assertRejects(\n        async () =>\n          await SimpleCache.getOrSet(key, async () => {\n            return { value: res.body, ttl: 1, length: Symbol() };\n          }),\n        TypeError,\n        `can't convert symbol to number`,\n      );\n    }\n  });\n  routes.set(\n    '/simple-cache/getOrSet/value-field-readablestream-empty',\n    async () => {\n      if (!isRunningLocally()) {\n        let key = '/simple-cache/getOrSet/value-field-readablestream-empty';\n        // TODO: remove this when streams are supported\n        await assertRejects(\n          async () => {\n            const stream = iteratableToStream([]);\n            await SimpleCache.getOrSet(key, async () => {\n              return { value: stream, ttl: 1, length: 0 };\n            });\n          },\n          TypeError,\n          `Content-provided streams are not yet supported for streaming into SimpleCache`,\n        );\n      }\n    },\n  );\n  routes.set(\n    '/simple-cache/getOrSet/value-field-readablestream-locked',\n    async () => {\n      if (!isRunningLocally()) {\n        let key = '/simple-cache/getOrSet/value-field-readablestream-locked';\n        const stream = iteratableToStream([]);\n        // getReader() causes the stream to become locked\n        stream.getReader();\n        await assertRejects(\n          async () => {\n            await SimpleCache.getOrSet(key, async () => {\n              return { value: stream, ttl: 1, length: 0 };\n            });\n          },\n          TypeError,\n          `Can't use a ReadableStream that's locked or has ever been read from or canceled`,\n        );\n      }\n    },\n  );\n  routes.set('/simple-cache/getOrSet/value-field-readablestream', async () => {\n    if (!isRunningLocally()) {\n      let key = '/simple-cache/getOrSet/value-field-readablestream';\n      const res = await fetch(\n        'https://compute-sdk-test-backend.edgecompute.app/',\n        {\n          backend: 'TheOrigin',\n        },\n      );\n      await assertResolves(async () => {\n        await SimpleCache.getOrSet(key, async () => {\n          return {\n            value: res.body,\n            ttl: 100,\n            length: res.headers.get('content-length'),\n          };\n        });\n      });\n    }\n  });\n\n  // - URLSearchParams\n  routes.set('/simple-cache/getOrSet/value-field-URLSearchParams', async () => {\n    if (!isRunningLocally()) {\n      let key = '/simple-cache/getOrSet/value-field-URLSearchParams';\n      const items = [\n        new URLSearchParams(),\n        new URLSearchParams({ a: 'b', c: 'd' }),\n      ];\n      for (const searchParams of items) {\n        await assertResolves(async () => {\n          await SimpleCache.getOrSet(key, async () => {\n            return { value: searchParams, ttl: 1 };\n          });\n        });\n      }\n    }\n  });\n  // - USV strings\n  routes.set('/simple-cache/getOrSet/value-field-strings', async () => {\n    if (!isRunningLocally()) {\n      let key = '/simple-cache/getOrSet/value-field-strings';\n      const strings = [\n        // empty\n        '',\n        // lone surrogate\n        '\\uD800',\n        // surrogate pair\n        '𠈓',\n        String('carrot'),\n      ];\n      for (const string of strings) {\n        await assertResolves(async () => {\n          await SimpleCache.getOrSet(key, async () => {\n            return { value: string, ttl: 1 };\n          });\n        });\n      }\n    }\n  });\n\n  // https://tc39.es/ecma262/#sec-tostring\n  routes.set(\n    '/simple-cache/getOrSet/value-field-calls-7.1.17-ToString',\n    async () => {\n      if (!isRunningLocally()) {\n        let key = '/simple-cache/getOrSet/value-field-calls-7.1.17-ToString';\n        let sentinel = { sentinel: 'sentinel' };\n        const test = async () => {\n          const value = {\n            toString() {\n              throw sentinel;\n            },\n          };\n          await SimpleCache.getOrSet(key, async () => {\n            return { value, ttl: 1 };\n          });\n        };\n        await assertRejects(test);\n        try {\n          await test();\n        } catch (thrownError) {\n          assert(thrownError, sentinel, 'thrownError === sentinel');\n        }\n        await assertRejects(\n          async () => {\n            await SimpleCache.getOrSet(key, async () => {\n              return { value: Symbol(), ttl: 1 };\n            });\n          },\n          TypeError,\n          `can't convert symbol to string`,\n        );\n      }\n    },\n  );\n\n  // - buffer source\n  routes.set('/simple-cache/getOrSet/value-field-buffer', async () => {\n    if (!isRunningLocally()) {\n      let key = '/simple-cache/getOrSet/value-field-buffer';\n      const typedArrayConstructors = [\n        Int8Array,\n        Int16Array,\n        Int32Array,\n        Float32Array,\n        Float64Array,\n        BigInt64Array,\n        Uint8Array,\n        Uint8ClampedArray,\n        Uint16Array,\n        Uint32Array,\n        BigUint64Array,\n      ];\n      for (const constructor of typedArrayConstructors) {\n        const typedArray = new constructor(8);\n        await assertResolves(async () => {\n          await SimpleCache.getOrSet(key + constructor.name, async () => {\n            return { value: typedArray.buffer, ttl: 1 };\n          });\n        });\n      }\n    }\n  });\n\n  routes.set('/simple-cache/getOrSet/value-field-typed-arrays', async () => {\n    if (!isRunningLocally()) {\n      let key = '/simple-cache/getOrSet/value-field-typed-arrays';\n      const typedArrayConstructors = [\n        Int8Array,\n        Int16Array,\n        Int32Array,\n        Float32Array,\n        Float64Array,\n        BigInt64Array,\n        Uint8Array,\n        Uint8ClampedArray,\n        Uint16Array,\n        Uint32Array,\n        BigUint64Array,\n      ];\n      for (const constructor of typedArrayConstructors) {\n        const typedArray = new constructor(8);\n        await assertResolves(async () => {\n          await SimpleCache.getOrSet(key + constructor.name, async () => {\n            return { value: typedArray, ttl: 1 };\n          });\n        });\n      }\n    }\n  });\n  routes.set('/simple-cache/getOrSet/value-field-dataview', async () => {\n    if (!isRunningLocally()) {\n      let key = '/simple-cache/getOrSet/value-field-dataview';\n      const typedArrayConstructors = [\n        Int8Array,\n        Uint8Array,\n        Uint8ClampedArray,\n        Int16Array,\n        Uint16Array,\n        Int32Array,\n        Uint32Array,\n        Float32Array,\n        Float64Array,\n        BigInt64Array,\n        BigUint64Array,\n      ];\n      for (const constructor of typedArrayConstructors) {\n        const typedArray = new constructor(8);\n        const view = new DataView(typedArray.buffer);\n        await assertResolves(async () => {\n          await SimpleCache.getOrSet(key + constructor.name, async () => {\n            return { value: view, ttl: 1 };\n          });\n        });\n      }\n    }\n  });\n  routes.set('/simple-cache/getOrSet/returns-SimpleCacheEntry', async () => {\n    if (!isRunningLocally()) {\n      let key = '/simple-cache/getOrSet/returns-SimpleCacheEntry';\n      let result = await SimpleCache.getOrSet(key, async () => {\n        return {\n          value: 'meow',\n          ttl: 10,\n        };\n      });\n      assert(\n        result instanceof SimpleCacheEntry,\n        true,\n        'result instanceof SimpleCacheEntry',\n      );\n    }\n  });\n  routes.set(\n    '/simple-cache/getOrSet/executes-the-set-method-when-key-not-in-cache',\n    async () => {\n      if (!isRunningLocally()) {\n        let called = false;\n        await SimpleCache.getOrSet(Math.random(), async () => {\n          called = true;\n          return {\n            value: 'meow',\n            ttl: 10,\n          };\n        });\n        assert(called, true, 'called === true');\n      }\n    },\n  );\n  routes.set(\n    '/simple-cache/getOrSet/does-not-execute-the-set-method-when-key-is-in-cache',\n    async () => {\n      if (!isRunningLocally()) {\n        let key = Math.random();\n        SimpleCache.set(key, 'meow', 100);\n        let called = false;\n        await SimpleCache.getOrSet(key, async () => {\n          called = true;\n          return {\n            value: 'meow',\n            ttl: 10,\n          };\n        });\n        assert(called, false, 'called === false');\n      }\n    },\n  );\n  routes.set(\n    '/simple-cache/getOrSet/does-not-freeze-when-called-after-a-get',\n    async () => {\n      if (!isRunningLocally()) {\n        let key = String(Math.random());\n        SimpleCache.get(key);\n        await SimpleCache.getOrSet(key, async () => {\n          return {\n            value: key,\n            ttl: 10,\n          };\n        });\n      }\n    },\n  );\n}\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/client.js",
    "content": "import { strictEqual } from './assertions.js';\nimport { routes, isRunningLocally } from './routes.js';\n\nroutes.set('/client/requestId', (event) => {\n  strictEqual(\n    typeof event.client.requestId,\n    'string',\n    'typeof event.client.requestId',\n  );\n  strictEqual(\n    event.client.requestId.length,\n    32,\n    'event.client.requestId.length',\n  );\n});\nroutes.set('/client/tlsJA3MD5', (event) => {\n  if (isRunningLocally()) {\n    strictEqual(event.client.tlsJA3MD5, null);\n  } else {\n    strictEqual(\n      typeof event.client.tlsJA3MD5,\n      'string',\n      'typeof event.client.tlsJA3MD5',\n    );\n    strictEqual(\n      event.client.tlsJA3MD5.length,\n      32,\n      'event.client.tlsJA3MD5.length',\n    );\n  }\n});\nroutes.set('/client/tlsClientHello', (event) => {\n  if (isRunningLocally()) {\n    strictEqual(event.client.tlsClientHello, null);\n  } else {\n    strictEqual(\n      event.client.tlsClientHello instanceof ArrayBuffer,\n      true,\n      'event.client.tlsClientHello instanceof ArrayBuffer',\n    );\n    strictEqual(\n      typeof event.client.tlsClientHello.byteLength,\n      'number',\n      'typeof event.client.tlsClientHello.byteLength',\n    );\n  }\n});\n\nroutes.set('/client/tlsClientCertificate', (event) => {\n  if (isRunningLocally()) {\n    strictEqual(event.client.tlsClientCertificate, null);\n  } else {\n    strictEqual(\n      event.client.tlsClientCertificate instanceof ArrayBuffer,\n      true,\n      'event.client.tlsClientCertificate instanceof ArrayBuffer',\n    );\n    strictEqual(\n      event.client.tlsClientCertificate.byteLength,\n      0,\n      'event.client.tlsClientCertificate.byteLength',\n    );\n  }\n});\n\nroutes.set('/client/tlsCipherOpensslName', (event) => {\n  if (isRunningLocally()) {\n    strictEqual(event.client.tlsCipherOpensslName, null);\n  } else {\n    strictEqual(\n      typeof event.client.tlsCipherOpensslName,\n      'string',\n      'typeof event.client.tlsCipherOpensslName',\n    );\n  }\n});\n\nroutes.set('/client/tlsProtocol', (event) => {\n  if (isRunningLocally()) {\n    strictEqual(event.client.tlsProtocol, null);\n  } else {\n    strictEqual(\n      typeof event.client.tlsProtocol,\n      'string',\n      'typeof event.client.tlsProtocol',\n    );\n  }\n});\n\nroutes.set('/client/tlsJA4', (event) => {\n  if (isRunningLocally()) {\n    strictEqual(event.client.tlsJA4, null);\n  } else {\n    strictEqual(\n      typeof event.client.tlsJA4,\n      'string',\n      'typeof event.client.tlsJA4',\n    );\n  }\n});\n\nroutes.set('/client/h2Fingerprint', (event) => {\n  if (isRunningLocally()) {\n    strictEqual(event.client.h2Fingerprint, null);\n  } else {\n    // h2Fingerprint may be null for HTTP/1.1 connections\n    const fp = event.client.h2Fingerprint;\n    strictEqual(\n      fp === null || typeof fp === 'string',\n      true,\n      'event.client.h2Fingerprint is null or string',\n    );\n  }\n});\n\nroutes.set('/client/ohFingerprint', (event) => {\n  if (isRunningLocally()) {\n    strictEqual(event.client.ohFingerprint, null);\n  } else {\n    strictEqual(\n      typeof event.client.ohFingerprint,\n      'string',\n      'typeof event.client.ohFingerprint',\n    );\n  }\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/compute.js",
    "content": "import { pass, ok, strictEqual, assertThrows } from './assertions.js';\nimport { routes } from './routes.js';\nimport { purgeSurrogateKey, vCpuTime } from 'fastly:compute';\n\nroutes.set('/compute/get-vcpu-ms', () => {\n  const cpuTime = vCpuTime();\n  strictEqual(typeof cpuTime, 'number');\n  // We can't assert > 0; this only claims millisecond resolution,\n  // and we hopefully spent less than 500us starting.\n  ok(cpuTime >= 0, 'cpuTime >= 0');\n  ok(cpuTime < 3000, 'cputime < 3000');\n  const arr = new Array(100_000).fill(1);\n  for (let j = 1; j < 100; j++) {\n    for (let i = 1; i < 100_000; i++) {\n      arr[i] = (arr[i] + arr[i - 1] + i) / 3;\n    }\n  }\n  const cpuTime2 = vCpuTime();\n  ok(cpuTime2 > cpuTime, 'cpuTime2 > cpuTime');\n  ok(cpuTime2 - cpuTime > 1, 'cpuTime2 - cpuTime > 1');\n  return pass('ok');\n});\n\nroutes.set('/compute/purge-surrogate-key-invalid', () => {\n  assertThrows(\n    () => {\n      purgeSurrogateKey();\n    },\n    TypeError,\n    'purgeSurrogateKey: At least 1 argument required, but only 0 passed',\n  );\n  return pass('ok');\n});\n\nroutes.set('/compute/purge-surrogate-key-hard', () => {\n  purgeSurrogateKey('test');\n  return pass('ok');\n});\n\nroutes.set('/compute/purge-surrogate-key-soft', () => {\n  purgeSurrogateKey('test', true);\n  return pass('ok');\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/config-store.js",
    "content": "/// <reference path=\"../../../../../types/index.d.ts\" />\n\n/* eslint-env serviceworker */\nimport { assert } from './assertions.js';\nimport { ConfigStore } from 'fastly:config-store';\nimport { routes } from './routes.js';\nimport { env } from 'fastly:env';\n\nconst CONFIG_STORE_NAME = env('CONFIG_STORE_NAME');\n\nroutes.set('/config-store', () => {\n  let config = new ConfigStore(CONFIG_STORE_NAME);\n  let twitterValue = config.get('twitter');\n  assert(\n    twitterValue,\n    'https://twitter.com/fastly',\n    `config.get(\"twitter\") === \"https://twitter.com/fastly\"`,\n  );\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/crypto.js",
    "content": "/// <reference path=\"../../../../../types/index.d.ts\" />\n/* eslint-env serviceworker, shared-node-browser, browser */\n\nimport {\n  assert,\n  assertThrows,\n  assertRejects,\n  assertResolves,\n} from './assertions.js';\nimport { routes } from './routes.js';\n\n// From https://www.rfc-editor.org/rfc/rfc7517#appendix-A.1\nconst publicRsaJsonWebKeyData = {\n  alg: 'RS256',\n  e: 'AQAB',\n  ext: true,\n  key_ops: ['verify'],\n  kty: 'RSA',\n  n: '0vx7agoebGcQSuuPiLJXZptN9nndrQmbXEps2aiAFbWhM78LhWx4cbbfAAtVT86zwu1RK7aPFFxuhDR1L6tSoc_BJECPebWKRXjBZCiFV4n3oknjhMstn64tZ_2W-5JsGY4Hc5n9yBXArwl93lqt7_RN5w6Cf0h4QyQ5v-65YGjQR0_FDW2QvzqY368QQMicAtaSqzs8KJZgnYb9c7d0zgdAZHzu6qMQvRL5hajrn1n91CbOpbISD08qNLyrdkt-bFTWhAI4vMQFh6WeZu0fM4lFd2NcRwr3XPksINHaQ-G_xBniIqbw0Ls1jF44-csFCur-kEgU8awapJzKnqDKgw',\n};\n\n// From https://www.rfc-editor.org/rfc/rfc7517#appendix-A.1\nconst publicEcdsaJsonWebKeyData = {\n  kty: 'EC',\n  crv: 'P-256',\n  x: 'MKBCTNIcKUSDii11ySs3526iDZ8AiTo7Tu6KPAqv7D4',\n  y: '4Etl6SRW2YiLUrN5vfvVHuhp7x8PxltmWWlbbM4IFyM',\n  kid: '1',\n  ext: true,\n  key_ops: ['verify'],\n};\n\n// From https://www.rfc-editor.org/rfc/rfc7517#appendix-A.2\nconst privateEcdsaJsonWebKeyData = {\n  kty: 'EC',\n  crv: 'P-256',\n  x: 'MKBCTNIcKUSDii11ySs3526iDZ8AiTo7Tu6KPAqv7D4',\n  y: '4Etl6SRW2YiLUrN5vfvVHuhp7x8PxltmWWlbbM4IFyM',\n  d: '870MB6gfuTJ4HtUnUvYMyJpr5eUZNP4Bk43bVdj3eAE',\n  use: 'sig',\n  kid: '1',\n  ext: true,\n  key_ops: ['sign'],\n};\n\n// From https://www.rfc-editor.org/rfc/rfc7517#appendix-A.2\nconst privateRsaJsonWebKeyData = {\n  alg: 'RS256',\n  d: 'X4cTteJY_gn4FYPsXB8rdXix5vwsg1FLN5E3EaG6RJoVH-HLLKD9M7dx5oo7GURknchnrRweUkC7hT5fJLM0WbFAKNLWY2vv7B6NqXSzUvxT0_YSfqijwp3RTzlBaCxWp4doFk5N2o8Gy_nHNKroADIkJ46pRUohsXywbReAdYaMwFs9tv8d_cPVY3i07a3t8MN6TNwm0dSawm9v47UiCl3Sk5ZiG7xojPLu4sbg1U2jx4IBTNBznbJSzFHK66jT8bgkuqsk0GjskDJk19Z4qwjwbsnn4j2WBii3RL-Us2lGVkY8fkFzme1z0HbIkfz0Y6mqnOYtqc0X4jfcKoAC8Q',\n  dp: 'G4sPXkc6Ya9y8oJW9_ILj4xuppu0lzi_H7VTkS8xj5SdX3coE0oimYwxIi2emTAue0UOa5dpgFGyBJ4c8tQ2VF402XRugKDTP8akYhFo5tAA77Qe_NmtuYZc3C3m3I24G2GvR5sSDxUyAN2zq8Lfn9EUms6rY3Ob8YeiKkTiBj0',\n  dq: 's9lAH9fggBsoFR8Oac2R_E2gw282rT2kGOAhvIllETE1efrA6huUUvMfBcMpn8lqeW6vzznYY5SSQF7pMdC_agI3nG8Ibp1BUb0JUiraRNqUfLhcQb_d9GF4Dh7e74WbRsobRonujTYN1xCaP6TO61jvWrX-L18txXw494Q_cgk',\n  e: 'AQAB',\n  ext: true,\n  key_ops: ['sign'],\n  kty: 'RSA',\n  n: '0vx7agoebGcQSuuPiLJXZptN9nndrQmbXEps2aiAFbWhM78LhWx4cbbfAAtVT86zwu1RK7aPFFxuhDR1L6tSoc_BJECPebWKRXjBZCiFV4n3oknjhMstn64tZ_2W-5JsGY4Hc5n9yBXArwl93lqt7_RN5w6Cf0h4QyQ5v-65YGjQR0_FDW2QvzqY368QQMicAtaSqzs8KJZgnYb9c7d0zgdAZHzu6qMQvRL5hajrn1n91CbOpbISD08qNLyrdkt-bFTWhAI4vMQFh6WeZu0fM4lFd2NcRwr3XPksINHaQ-G_xBniIqbw0Ls1jF44-csFCur-kEgU8awapJzKnqDKgw',\n  p: '83i-7IvMGXoMXCskv73TKr8637FiO7Z27zv8oj6pbWUQyLPQBQxtPVnwD20R-60eTDmD2ujnMt5PoqMrm8RfmNhVWDtjjMmCMjOpSXicFHj7XOuVIYQyqVWlWEh6dN36GVZYk93N8Bc9vY41xy8B9RzzOGVQzXvNEvn7O0nVbfs',\n  q: '3dfOR9cuYq-0S-mkFLzgItgMEfFzB2q3hWehMuG0oCuqnb3vobLyumqjVZQO1dIrdwgTnCdpYzBcOfW5r370AFXjiWft_NGEiovonizhKpo9VVS78TzFgxkIdrecRezsZ-1kYd_s1qDbxtkDEgfAITAG9LUnADun4vIcb6yelxk',\n  qi: 'GyM_p6JrXySiz1toFgKbWV-JdI3jQ4ypu9rbMWx3rQJBfmt0FoYzgUIZEVFEcOqwemRN81zoDAaa-Bk0KWNGDjJHZDdDmFhW3AN7lI-puxk_mHZGJ11rxyR8O55XLSe3SPmRfKwZI6yU24ZxvQKFYItdldUKGzO6Ia6zTKhAVRU',\n};\n\n// Helper functions to create fresh copies of test data for tests that mutate them\nfunction freshPublicRsaKey() {\n  return structuredClone(publicRsaJsonWebKeyData);\n}\nfunction freshPublicEcdsaKey() {\n  return structuredClone(publicEcdsaJsonWebKeyData);\n}\nfunction freshPrivateEcdsaKey() {\n  return structuredClone(privateEcdsaJsonWebKeyData);\n}\nfunction freshPrivateRsaKey() {\n  return structuredClone(privateRsaJsonWebKeyData);\n}\n\nconst rsaJsonWebKeyAlgorithm = {\n  name: 'RSASSA-PKCS1-v1_5',\n  hash: { name: 'SHA-256' },\n};\n\nconst ecdsaJsonWebKeyAlgorithm = {\n  name: 'ECDSA',\n  namedCurve: 'P-256',\n  hash: { name: 'SHA-256' },\n};\n\nroutes.set('/crypto', async () => {\n  assert(typeof crypto, 'object', `typeof crypto`);\n  assert(crypto instanceof Crypto, true, `crypto instanceof Crypto`);\n});\n\nroutes.set('/crypto.subtle', async () => {\n  assert(typeof crypto.subtle, 'object', `typeof crypto.subtle`);\n  assert(\n    crypto.subtle instanceof SubtleCrypto,\n    true,\n    `crypto.subtle instanceof SubtleCrypto`,\n  );\n});\n\n// importKey\n{\n  routes.set('/crypto.subtle.importKey', async () => {\n    assert(\n      typeof crypto.subtle.importKey,\n      'function',\n      `typeof crypto.subtle.importKey`,\n    );\n    assert(\n      crypto.subtle.importKey,\n      SubtleCrypto.prototype.importKey,\n      `crypto.subtle.importKey === SubtleCrypto.prototype.importKey`,\n    );\n  });\n  routes.set('/crypto.subtle.importKey/length', async () => {\n    assert(\n      crypto.subtle.importKey.length,\n      5,\n      `crypto.subtle.importKey.length === 5`,\n    );\n  });\n  routes.set('/crypto.subtle.importKey/called-as-constructor', async () => {\n    assertThrows(\n      () => {\n        new crypto.subtle.importKey();\n      },\n      TypeError,\n      'crypto.subtle.importKey is not a constructor',\n    );\n  });\n  routes.set('/crypto.subtle.importKey/called-with-wrong-this', async () => {\n    await assertRejects(async () => {\n      await crypto.subtle.importKey.call(\n        undefined,\n        'jwk',\n        publicRsaJsonWebKeyData,\n        rsaJsonWebKeyAlgorithm,\n        publicRsaJsonWebKeyData.ext,\n        publicRsaJsonWebKeyData.key_ops,\n      );\n    }, TypeError);\n  });\n  routes.set('/crypto.subtle.importKey/called-with-no-arguments', async () => {\n    await assertRejects(\n      async () => {\n        await crypto.subtle.importKey();\n      },\n      TypeError,\n      'SubtleCrypto.importKey: At least 5 arguments required, but only 0 passed',\n    );\n  });\n\n  // first-parameter\n  {\n    routes.set(\n      '/crypto.subtle.importKey/first-parameter-calls-7.1.17-ToString',\n      async () => {\n        const sentinel = Symbol('sentinel');\n        const test = async () => {\n          const format = {\n            toString() {\n              throw sentinel;\n            },\n          };\n          await crypto.subtle.importKey(\n            format,\n            publicRsaJsonWebKeyData,\n            rsaJsonWebKeyAlgorithm,\n            publicRsaJsonWebKeyData.ext,\n            publicRsaJsonWebKeyData.key_ops,\n          );\n        };\n        await assertRejects(test);\n        try {\n          await test();\n        } catch (thrownError) {\n          assert(thrownError, sentinel, 'thrownError === sentinel');\n        }\n      },\n    );\n    routes.set(\n      '/crypto.subtle.importKey/first-parameter-non-existant-format',\n      async () => {\n        await assertRejects(async () => {\n          await crypto.subtle.importKey(\n            'jake',\n            publicRsaJsonWebKeyData,\n            rsaJsonWebKeyAlgorithm,\n            publicRsaJsonWebKeyData.ext,\n            publicRsaJsonWebKeyData.key_ops,\n          );\n        }, Error);\n      },\n    );\n  }\n\n  // second-parameter\n  {\n    routes.set(\n      '/crypto.subtle.importKey/second-parameter-invalid-format',\n      async () => {\n        await assertRejects(async () => {\n          await crypto.subtle.importKey(\n            'jwk',\n            Symbol(),\n            rsaJsonWebKeyAlgorithm,\n            publicRsaJsonWebKeyData.ext,\n            publicRsaJsonWebKeyData.key_ops,\n          );\n        }, Error);\n      },\n    );\n    // jwk public key\n    {\n      routes.set(\n        '/crypto.subtle.importKey/rsa-jwk-public/second-parameter-missing-e-field',\n        async () => {\n          await assertRejects(async () => {\n            const testData = structuredClone(publicRsaJsonWebKeyData);\n            delete testData.e;\n            await crypto.subtle.importKey(\n              'jwk',\n              testData,\n              rsaJsonWebKeyAlgorithm,\n              testData.ext,\n              testData.key_ops,\n            );\n          }, DOMException);\n        },\n      );\n      routes.set(\n        '/crypto.subtle.importKey/rsa-jwk-public/second-parameter-e-field-calls-7.1.17-ToString',\n        async () => {\n          let sentinel = Symbol('sentinel');\n          const test = async () => {\n            sentinel = Symbol();\n            let webKeyData = structuredClone(publicRsaJsonWebKeyData);\n            webKeyData.e = {\n              toString() {\n                throw sentinel;\n              },\n            };\n            await crypto.subtle.importKey(\n              'jwk',\n              webKeyData,\n              rsaJsonWebKeyAlgorithm,\n              webKeyData.ext,\n              webKeyData.key_ops,\n            );\n          };\n          await assertRejects(test);\n          try {\n            await test();\n          } catch (thrownError) {\n            assert(thrownError, sentinel, 'thrownError === sentinel');\n          }\n        },\n      );\n      routes.set(\n        '/crypto.subtle.importKey/rsa-jwk-public/second-parameter-invalid-e-field',\n        async () => {\n          await assertRejects(\n            async () => {\n              let webKeyData = structuredClone(publicRsaJsonWebKeyData);\n              webKeyData.e = '`~!@#@#$Q%^%&^*';\n              await crypto.subtle.importKey(\n                'jwk',\n                webKeyData,\n                rsaJsonWebKeyAlgorithm,\n                webKeyData.ext,\n                webKeyData.key_ops,\n              );\n            },\n            Error,\n            \"The JWK member 'e' could not be base64url decoded or contained padding\",\n          );\n        },\n      );\n      routes.set(\n        '/crypto.subtle.importKey/rsa-jwk-public/second-parameter-missing-kty-field',\n        async () => {\n          await assertRejects(async () => {\n            let webKeyData = structuredClone(publicRsaJsonWebKeyData);\n            delete webKeyData.kty;\n            await crypto.subtle.importKey(\n              'jwk',\n              webKeyData,\n              rsaJsonWebKeyAlgorithm,\n              webKeyData.ext,\n              webKeyData.key_ops,\n            );\n          }, Error);\n        },\n      );\n      routes.set(\n        '/crypto.subtle.importKey/rsa-jwk-public/second-parameter-invalid-kty-field',\n        async () => {\n          await assertRejects(async () => {\n            let webKeyData = structuredClone(publicRsaJsonWebKeyData);\n            webKeyData.kty = 'jake';\n            await crypto.subtle.importKey(\n              'jwk',\n              webKeyData,\n              rsaJsonWebKeyAlgorithm,\n              webKeyData.ext,\n              webKeyData.key_ops,\n            );\n          }, Error);\n        },\n      );\n      routes.set(\n        '/crypto.subtle.importKey/rsa-jwk-public/second-parameter-missing-key_ops-field',\n        async () => {\n          await assertResolves(async () => {\n            let webKeyData = structuredClone(publicRsaJsonWebKeyData);\n            const key_ops = Array.from(webKeyData.key_ops);\n            delete webKeyData.key_ops;\n            await crypto.subtle.importKey(\n              'jwk',\n              webKeyData,\n              rsaJsonWebKeyAlgorithm,\n              webKeyData.ext,\n              key_ops,\n            );\n          });\n        },\n      );\n      routes.set(\n        '/crypto.subtle.importKey/rsa-jwk-public/second-parameter-non-sequence-key_ops-field',\n        async () => {\n          await assertRejects(async () => {\n            let webKeyData = structuredClone(publicRsaJsonWebKeyData);\n            const key_ops = Array.from(webKeyData.key_ops);\n            webKeyData.key_ops = 'jake';\n            await crypto.subtle.importKey(\n              'jwk',\n              webKeyData,\n              rsaJsonWebKeyAlgorithm,\n              webKeyData.ext,\n              key_ops,\n            );\n          }, Error);\n        },\n      );\n\n      routes.set(\n        '/crypto.subtle.importKey/rsa-jwk-public/second-parameter-empty-key_ops-field',\n        async () => {\n          await assertResolves(async () => {\n            let webKeyData = structuredClone(publicRsaJsonWebKeyData);\n            const key_ops = Array.from(webKeyData.key_ops);\n            webKeyData.key_ops = [];\n            await crypto.subtle.importKey(\n              'jwk',\n              webKeyData,\n              rsaJsonWebKeyAlgorithm,\n              webKeyData.ext,\n              key_ops,\n            );\n          });\n        },\n      );\n      routes.set(\n        '/crypto.subtle.importKey/rsa-jwk-public/second-parameter-duplicated-key_ops-field',\n        async () => {\n          await assertRejects(async () => {\n            let webKeyData = structuredClone(publicRsaJsonWebKeyData);\n            const key_ops = Array.from(webKeyData.key_ops);\n            webKeyData.key_ops = ['sign', 'sign'];\n            await crypto.subtle.importKey(\n              'jwk',\n              webKeyData,\n              rsaJsonWebKeyAlgorithm,\n              webKeyData.ext,\n              key_ops,\n            );\n          }, Error);\n        },\n      );\n      routes.set(\n        '/crypto.subtle.importKey/rsa-jwk-public/second-parameter-invalid-key_ops-field',\n        async () => {\n          await assertRejects(async () => {\n            let webKeyData = structuredClone(publicRsaJsonWebKeyData);\n            const key_ops = Array.from(webKeyData.key_ops);\n            webKeyData.key_ops = ['sign', 'jake'];\n            await crypto.subtle.importKey(\n              'jwk',\n              webKeyData,\n              rsaJsonWebKeyAlgorithm,\n              webKeyData.ext,\n              key_ops,\n            );\n          }, Error);\n        },\n      );\n\n      routes.set(\n        '/crypto.subtle.importKey/rsa-jwk-public/second-parameter-key_ops-field-calls-7.1.17-ToString',\n        async () => {\n          let sentinel = Symbol('sentinel');\n          const key_ops = Array.from(publicRsaJsonWebKeyData.key_ops);\n          const test = async () => {\n            sentinel = Symbol();\n            const op = {\n              toString() {\n                throw sentinel;\n              },\n            };\n            let webKeyData = structuredClone(publicRsaJsonWebKeyData);\n            const key_ops = Array.from(webKeyData.key_ops);\n            webKeyData.key_ops = ['sign', op];\n            await crypto.subtle.importKey(\n              'jwk',\n              webKeyData,\n              rsaJsonWebKeyAlgorithm,\n              webKeyData.ext,\n              key_ops,\n            );\n          };\n          await assertRejects(test);\n          try {\n            await test();\n          } catch (thrownError) {\n            assert(thrownError, sentinel, 'thrownError === sentinel');\n          }\n        },\n      );\n\n      routes.set(\n        '/crypto.subtle.importKey/rsa-jwk-public/second-parameter-missing-n-field',\n        async () => {\n          await assertRejects(\n            async () => {\n              const testData = structuredClone(publicRsaJsonWebKeyData);\n              delete testData.n;\n              await crypto.subtle.importKey(\n                'jwk',\n                testData,\n                rsaJsonWebKeyAlgorithm,\n                testData.ext,\n                testData.key_ops,\n              );\n            },\n            Error,\n            'Data provided to an operation does not meet requirements',\n          );\n        },\n      );\n      routes.set(\n        '/crypto.subtle.importKey/rsa-jwk-public/second-parameter-n-field-calls-7.1.17-ToString',\n        async () => {\n          let sentinel = Symbol('sentinel');\n          const test = async () => {\n            sentinel = Symbol();\n            let webKeyData = structuredClone(publicRsaJsonWebKeyData);\n            webKeyData.n = {\n              toString() {\n                throw sentinel;\n              },\n            };\n            await crypto.subtle.importKey(\n              'jwk',\n              webKeyData,\n              rsaJsonWebKeyAlgorithm,\n              webKeyData.ext,\n              webKeyData.key_ops,\n            );\n          };\n          await assertRejects(test);\n          try {\n            await test();\n          } catch (thrownError) {\n            assert(thrownError, sentinel, 'thrownError === sentinel');\n          }\n        },\n      );\n      routes.set(\n        '/crypto.subtle.importKey/rsa-jwk-public/second-parameter-invalid-n-field',\n        async () => {\n          await assertRejects(\n            async () => {\n              let webKeyData = structuredClone(publicRsaJsonWebKeyData);\n              webKeyData.n = '`~!@#@#$Q%^%&^*';\n              await crypto.subtle.importKey(\n                'jwk',\n                webKeyData,\n                rsaJsonWebKeyAlgorithm,\n                webKeyData.ext,\n                webKeyData.key_ops,\n              );\n            },\n            Error,\n            \"The JWK member 'n' could not be base64url decoded or contained padding\",\n          );\n        },\n      );\n    }\n    // jwk private key\n    // TODO\n    // raw HMAC secret keys\n    // TODO\n    // raw Elliptic Curve public keys\n    {\n      routes.set(\n        '/crypto.subtle.importKey/ecdsa-jwk-public/second-parameter-missing-x-field',\n        async () => {\n          await assertRejects(\n            async () => {\n              let webKeyData = structuredClone(publicEcdsaJsonWebKeyData);\n              delete webKeyData.x;\n              await crypto.subtle.importKey(\n                'jwk',\n                webKeyData,\n                ecdsaJsonWebKeyAlgorithm,\n                webKeyData.ext,\n                webKeyData.key_ops,\n              );\n            },\n            DOMException,\n            'Data provided to an operation does not meet requirements',\n          );\n        },\n      );\n      routes.set(\n        '/crypto.subtle.importKey/ecdsa-jwk-public/second-parameter-x-field-calls-7.1.17-ToString',\n        async () => {\n          let sentinel = Symbol('sentinel');\n          const test = async () => {\n            sentinel = Symbol();\n            let webKeyData = structuredClone(publicEcdsaJsonWebKeyData);\n            webKeyData.x = {\n              toString() {\n                throw sentinel;\n              },\n            };\n            await crypto.subtle.importKey(\n              'jwk',\n              webKeyData,\n              ecdsaJsonWebKeyAlgorithm,\n              webKeyData.ext,\n              webKeyData.key_ops,\n            );\n          };\n          await assertRejects(test);\n          try {\n            await test();\n          } catch (thrownError) {\n            assert(thrownError, sentinel, 'thrownError === sentinel');\n          }\n        },\n      );\n      routes.set(\n        '/crypto.subtle.importKey/ecdsa-jwk-public/second-parameter-invalid-x-field',\n        async () => {\n          await assertRejects(\n            async () => {\n              let webKeyData = structuredClone(publicEcdsaJsonWebKeyData);\n              webKeyData.x = '`~!@#@#$Q%^%&^*';\n              await crypto.subtle.importKey(\n                'jwk',\n                webKeyData,\n                ecdsaJsonWebKeyAlgorithm,\n                webKeyData.ext,\n                webKeyData.key_ops,\n              );\n            },\n            Error,\n            \"The JWK member 'x' could not be base64url decoded or contained padding\",\n          );\n        },\n      );\n      routes.set(\n        '/crypto.subtle.importKey/ecdsa-jwk-public/second-parameter-missing-y-field',\n        async () => {\n          await assertRejects(\n            async () => {\n              let webKeyData = structuredClone(publicEcdsaJsonWebKeyData);\n              delete webKeyData.y;\n              await crypto.subtle.importKey(\n                'jwk',\n                webKeyData,\n                ecdsaJsonWebKeyAlgorithm,\n                webKeyData.ext,\n                webKeyData.key_ops,\n              );\n            },\n            DOMException,\n            'Data provided to an operation does not meet requirements',\n          );\n        },\n      );\n      routes.set(\n        '/crypto.subtle.importKey/ecdsa-jwk-public/second-parameter-y-field-calls-7.1.17-ToString',\n        async () => {\n          let sentinel = Symbol('sentinel');\n          const test = async () => {\n            sentinel = Symbol();\n            let webKeyData = structuredClone(publicEcdsaJsonWebKeyData);\n            webKeyData.y = {\n              toString() {\n                throw sentinel;\n              },\n            };\n            await crypto.subtle.importKey(\n              'jwk',\n              webKeyData,\n              ecdsaJsonWebKeyAlgorithm,\n              webKeyData.ext,\n              webKeyData.key_ops,\n            );\n          };\n          await assertRejects(test);\n          try {\n            await test();\n          } catch (thrownError) {\n            assert(thrownError, sentinel, 'thrownError === sentinel');\n          }\n        },\n      );\n      routes.set(\n        '/crypto.subtle.importKey/ecdsa-jwk-public/second-parameter-invalid-y-field',\n        async () => {\n          await assertRejects(\n            async () => {\n              let webKeyData = structuredClone(publicEcdsaJsonWebKeyData);\n              webKeyData.y = '`~!@#@#$Q%^%&^*';\n              await crypto.subtle.importKey(\n                'jwk',\n                webKeyData,\n                ecdsaJsonWebKeyAlgorithm,\n                webKeyData.ext,\n                webKeyData.key_ops,\n              );\n            },\n            Error,\n            \"The JWK member 'y' could not be base64url decoded or contained padding\",\n          );\n        },\n      );\n      routes.set(\n        '/crypto.subtle.importKey/ecdsa-jwk-public/second-parameter-missing-kty-field',\n        async () => {\n          await assertRejects(async () => {\n            let webKeyData = structuredClone(publicEcdsaJsonWebKeyData);\n            delete webKeyData.kty;\n            await crypto.subtle.importKey(\n              'jwk',\n              webKeyData,\n              ecdsaJsonWebKeyAlgorithm,\n              webKeyData.ext,\n              webKeyData.key_ops,\n            );\n          }, Error);\n        },\n      );\n      routes.set(\n        '/crypto.subtle.importKey/ecdsa-jwk-public/second-parameter-invalid-kty-field',\n        async () => {\n          await assertRejects(async () => {\n            let webKeyData = structuredClone(publicEcdsaJsonWebKeyData);\n            webKeyData.kty = 'jake';\n            await crypto.subtle.importKey(\n              'jwk',\n              webKeyData,\n              ecdsaJsonWebKeyAlgorithm,\n              webKeyData.ext,\n              webKeyData.key_ops,\n            );\n          }, Error);\n        },\n      );\n      routes.set(\n        '/crypto.subtle.importKey/ecdsa-jwk-public/second-parameter-missing-key_ops-field',\n        async () => {\n          await assertResolves(async () => {\n            let webKeyData = structuredClone(publicEcdsaJsonWebKeyData);\n            const key_ops = Array.from(webKeyData.key_ops);\n            delete webKeyData.key_ops;\n            await crypto.subtle.importKey(\n              'jwk',\n              webKeyData,\n              ecdsaJsonWebKeyAlgorithm,\n              webKeyData.ext,\n              key_ops,\n            );\n          });\n        },\n      );\n      routes.set(\n        '/crypto.subtle.importKey/ecdsa-jwk-public/second-parameter-non-sequence-key_ops-field',\n        async () => {\n          await assertRejects(async () => {\n            let webKeyData = structuredClone(publicEcdsaJsonWebKeyData);\n            const key_ops = Array.from(webKeyData.key_ops);\n            webKeyData.key_ops = 'jake';\n            await crypto.subtle.importKey(\n              'jwk',\n              webKeyData,\n              ecdsaJsonWebKeyAlgorithm,\n              webKeyData.ext,\n              key_ops,\n            );\n          }, Error);\n        },\n      );\n\n      routes.set(\n        '/crypto.subtle.importKey/ecdsa-jwk-public/second-parameter-empty-key_ops-field',\n        async () => {\n          await assertResolves(async () => {\n            let webKeyData = structuredClone(publicEcdsaJsonWebKeyData);\n            const key_ops = Array.from(webKeyData.key_ops);\n            webKeyData.key_ops = [];\n            await crypto.subtle.importKey(\n              'jwk',\n              webKeyData,\n              ecdsaJsonWebKeyAlgorithm,\n              webKeyData.ext,\n              key_ops,\n            );\n          });\n        },\n      );\n      routes.set(\n        '/crypto.subtle.importKey/ecdsa-jwk-public/second-parameter-duplicated-key_ops-field',\n        async () => {\n          await assertRejects(async () => {\n            const testData = structuredClone(publicEcdsaJsonWebKeyData);\n            const key_ops = Array.from(testData.key_ops);\n            testData.key_ops = ['sign', 'sign'];\n            await crypto.subtle.importKey(\n              'jwk',\n              testData,\n              ecdsaJsonWebKeyAlgorithm,\n              testData.ext,\n              key_ops,\n            );\n          }, Error);\n        },\n      );\n      routes.set(\n        '/crypto.subtle.importKey/ecdsa-jwk-public/second-parameter-invalid-key_ops-field',\n        async () => {\n          await assertRejects(async () => {\n            const testData = structuredClone(publicEcdsaJsonWebKeyData);\n            const key_ops = Array.from(testData.key_ops);\n            testData.key_ops = ['sign', 'jake'];\n            await crypto.subtle.importKey(\n              'jwk',\n              testData,\n              ecdsaJsonWebKeyAlgorithm,\n              testData.ext,\n              key_ops,\n            );\n          }, Error);\n        },\n      );\n\n      routes.set(\n        '/crypto.subtle.importKey/ecdsa-jwk-public/second-parameter-key_ops-field-calls-7.1.17-ToString',\n        async () => {\n          let sentinel = Symbol('sentinel');\n          const test = async () => {\n            sentinel = Symbol();\n            const testData = structuredClone(publicEcdsaJsonWebKeyData);\n            const key_ops = Array.from(testData.key_ops);\n            const op = {\n              toString() {\n                throw sentinel;\n              },\n            };\n            testData.key_ops = ['sign', op];\n            await crypto.subtle.importKey(\n              'jwk',\n              testData,\n              ecdsaJsonWebKeyAlgorithm,\n              testData.ext,\n              key_ops,\n            );\n          };\n          await assertRejects(test);\n          try {\n            await test();\n          } catch (thrownError) {\n            assert(thrownError, sentinel, 'thrownError === sentinel');\n          }\n        },\n      );\n\n      routes.set(\n        '/crypto.subtle.importKey/ecdsa-jwk-private/second-parameter-d-field-calls-7.1.17-ToString',\n        async () => {\n          let sentinel = Symbol('sentinel');\n          const test = async () => {\n            sentinel = Symbol();\n            const testData = structuredClone(privateEcdsaJsonWebKeyData);\n            testData.d = {\n              toString() {\n                throw sentinel;\n              },\n            };\n            await crypto.subtle.importKey(\n              'jwk',\n              testData,\n              ecdsaJsonWebKeyAlgorithm,\n              testData.ext,\n              testData.key_ops,\n            );\n          };\n          await assertRejects(test);\n          try {\n            await test();\n          } catch (thrownError) {\n            console.log(\n              thrownError,\n              typeof thrownError,\n              Object.keys(thrownError),\n            );\n            assert(thrownError, sentinel, 'thrownError === sentinel');\n          }\n        },\n      );\n      routes.set(\n        '/crypto.subtle.importKey/ecdsa-jwk-private/second-parameter-invalid-d-field',\n        async () => {\n          await assertRejects(\n            async () => {\n              const testData = structuredClone(privateEcdsaJsonWebKeyData);\n              testData.d = '`~!@#@#$Q%^%&^*';\n              await crypto.subtle.importKey(\n                'jwk',\n                testData,\n                ecdsaJsonWebKeyAlgorithm,\n                testData.ext,\n                testData.key_ops,\n              );\n            },\n            Error,\n            \"The JWK member 'd' could not be base64url decoded or contained padding\",\n          );\n        },\n      );\n    }\n    // pkcs8 Elliptic Curve private keys\n    // TODO\n    // pkcs8 RSA private keys\n    // raw AES\n  }\n  // third-parameter\n  {\n    routes.set(\n      '/crypto.subtle.importKey/third-parameter-undefined',\n      async () => {\n        await assertRejects(\n          async () => {\n            await crypto.subtle.importKey(\n              'jwk',\n              publicRsaJsonWebKeyData,\n              undefined,\n              publicRsaJsonWebKeyData.ext,\n              publicRsaJsonWebKeyData.key_ops,\n            );\n          },\n          Error,\n          'Algorithm: Unrecognized name',\n        );\n      },\n    );\n    routes.set(\n      '/crypto.subtle.importKey/third-parameter-name-field-calls-7.1.17-ToString',\n      async () => {\n        const sentinel = Symbol('sentinel');\n        const test = async () => {\n          let algorithm = structuredClone(rsaJsonWebKeyAlgorithm);\n          algorithm.name = {\n            toString() {\n              throw sentinel;\n            },\n          };\n          await crypto.subtle.importKey(\n            'jwk',\n            publicRsaJsonWebKeyData,\n            algorithm,\n            publicRsaJsonWebKeyData.ext,\n            publicRsaJsonWebKeyData.key_ops,\n          );\n        };\n        await assertRejects(test);\n        try {\n          await test();\n        } catch (thrownError) {\n          assert(thrownError, sentinel, 'thrownError === sentinel');\n        }\n      },\n    );\n    routes.set(\n      '/crypto.subtle.importKey/third-parameter-invalid-name-field',\n      async () => {\n        await assertRejects(async () => {\n          let algorithm = structuredClone(rsaJsonWebKeyAlgorithm);\n          algorithm.name = '`~!@#@#$Q%^%&^*';\n          await crypto.subtle.importKey(\n            'jwk',\n            publicRsaJsonWebKeyData,\n            algorithm,\n            publicRsaJsonWebKeyData.ext,\n            publicRsaJsonWebKeyData.key_ops,\n          );\n        }, Error);\n      },\n    );\n    routes.set(\n      '/crypto.subtle.importKey/third-parameter-hash-name-field-calls-7.1.17-ToString',\n      async () => {\n        const sentinel = Symbol('sentinel');\n        const test = async () => {\n          let algorithm = structuredClone(rsaJsonWebKeyAlgorithm);\n          algorithm.hash.name = {\n            toString() {\n              throw sentinel;\n            },\n          };\n          await crypto.subtle.importKey(\n            'jwk',\n            publicRsaJsonWebKeyData,\n            algorithm,\n            publicRsaJsonWebKeyData.ext,\n            publicRsaJsonWebKeyData.key_ops,\n          );\n        };\n        await assertRejects(test);\n        try {\n          await test();\n        } catch (thrownError) {\n          assert(thrownError, sentinel, 'thrownError === sentinel');\n        }\n      },\n    );\n    routes.set(\n      '/crypto.subtle.importKey/third-parameter-hash-algorithm-does-not-match-json-web-key-hash-algorithm',\n      async () => {\n        await assertRejects(\n          async () => {\n            let algorithm = structuredClone(rsaJsonWebKeyAlgorithm);\n            algorithm.hash.name = 'SHA-1';\n            await crypto.subtle.importKey(\n              'jwk',\n              publicRsaJsonWebKeyData,\n              algorithm,\n              publicRsaJsonWebKeyData.ext,\n              publicRsaJsonWebKeyData.key_ops,\n            );\n          },\n          Error,\n          \"The JWK 'alg' member was inconsistent with that specified by the Web Crypto call\",\n        );\n      },\n    );\n  }\n\n  // fifth-parameter\n  {\n    routes.set(\n      '/crypto.subtle.importKey/fifth-parameter-undefined',\n      async () => {\n        await assertRejects(async () => {\n          await crypto.subtle.importKey(\n            'jwk',\n            publicRsaJsonWebKeyData,\n            rsaJsonWebKeyAlgorithm,\n            publicRsaJsonWebKeyData.ext,\n            undefined,\n          );\n        }, Error);\n      },\n    );\n    routes.set('/crypto.subtle.importKey/fifth-parameter-invalid', async () => {\n      await assertRejects(async () => {\n        await crypto.subtle.importKey(\n          'jwk',\n          publicRsaJsonWebKeyData,\n          rsaJsonWebKeyAlgorithm,\n          publicRsaJsonWebKeyData.ext,\n          ['jake'],\n        );\n      }, Error);\n    });\n    routes.set(\n      '/crypto.subtle.importKey/fifth-parameter-duplicate-operations',\n      async () => {\n        await assertResolves(async () => {\n          const key_ops = publicRsaJsonWebKeyData.key_ops.concat(\n            publicRsaJsonWebKeyData.key_ops,\n          );\n          await crypto.subtle.importKey(\n            'jwk',\n            publicRsaJsonWebKeyData,\n            rsaJsonWebKeyAlgorithm,\n            publicRsaJsonWebKeyData.ext,\n            key_ops,\n          );\n        });\n      },\n    );\n\n    routes.set(\n      '/crypto.subtle.importKey/fifth-parameter-operations-do-not-match-json-web-key-operations',\n      async () => {\n        await assertRejects(\n          async () => {\n            await crypto.subtle.importKey(\n              'jwk',\n              publicRsaJsonWebKeyData,\n              rsaJsonWebKeyAlgorithm,\n              publicRsaJsonWebKeyData.ext,\n              ['sign'],\n            );\n          },\n          Error,\n          \"The JWK 'key_ops' member was inconsistent with that specified by the Web Crypto call. The JWK usage must be a superset of those requested\",\n        );\n      },\n    );\n\n    routes.set(\n      '/crypto.subtle.importKey/fifth-parameter-operation-fields-calls-7.1.17-ToString',\n      async () => {\n        let sentinel = Symbol('sentinel');\n        const test = async () => {\n          sentinel = Symbol();\n          const op = {\n            toString() {\n              throw sentinel;\n            },\n          };\n          await crypto.subtle.importKey(\n            'jwk',\n            publicRsaJsonWebKeyData,\n            rsaJsonWebKeyAlgorithm,\n            publicRsaJsonWebKeyData.ext,\n            ['sign', op],\n          );\n        };\n        await assertRejects(test);\n        try {\n          await test();\n        } catch (thrownError) {\n          assert(thrownError, sentinel, 'thrownError === sentinel');\n        }\n      },\n    );\n  }\n\n  // happy paths\n  {\n    routes.set('/crypto.subtle.importKey/JWK-RS256-Public', async () => {\n      const key = await crypto.subtle.importKey(\n        'jwk',\n        publicRsaJsonWebKeyData,\n        rsaJsonWebKeyAlgorithm,\n        publicRsaJsonWebKeyData.ext,\n        publicRsaJsonWebKeyData.key_ops,\n      );\n      await assert(key instanceof CryptoKey, true, `key instanceof CryptoKey`);\n      await assert(\n        key.algorithm,\n        {\n          name: 'RSASSA-PKCS1-v1_5',\n          hash: {\n            name: 'SHA-256',\n          },\n          modulusLength: 2048,\n          publicExponent: new Uint8Array([1, 0, 1]),\n        },\n        `key.algorithm`,\n      );\n      await assert(key.extractable, true, `key.extractable === true`);\n      await assert(key.type, 'public', `key.type === \"public\"`);\n      await assert(key.usages, ['verify'], `key.usages deep equals [\"verify\"]`);\n    });\n\n    routes.set('/crypto.subtle.importKey/JWK-EC256-Public', async () => {\n      const key = await crypto.subtle.importKey(\n        'jwk',\n        publicEcdsaJsonWebKeyData,\n        ecdsaJsonWebKeyAlgorithm,\n        publicEcdsaJsonWebKeyData.ext,\n        publicEcdsaJsonWebKeyData.key_ops,\n      );\n      await assert(key instanceof CryptoKey, true, `key instanceof CryptoKey`);\n      await assert(\n        key.algorithm,\n        {\n          name: 'ECDSA',\n          namedCurve: 'P-256',\n        },\n        `key.algorithm`,\n      );\n      await assert(key.extractable, true, `key.extractable === true`);\n      await assert(key.type, 'public', `key.type === \"public\"`);\n      await assert(key.usages, ['verify'], `key.usages deep equals [\"verify\"]`);\n    });\n\n    routes.set('/crypto.subtle.importKey/HMAC', async () => {\n      const keyUint8Array = new Uint8Array([1, 0, 1]);\n\n      for (const algorithm of ['SHA-1', 'SHA-256', 'SHA-384', 'SHA-512']) {\n        const key = await globalThis.crypto.subtle.importKey(\n          'raw',\n          keyUint8Array,\n          { name: 'HMAC', hash: algorithm },\n          false,\n          ['sign', 'verify'],\n        );\n        await assert(\n          key instanceof CryptoKey,\n          true,\n          `key instanceof CryptoKey`,\n        );\n        await assert(\n          key.algorithm,\n          {\n            name: 'HMAC',\n            hash: { name: algorithm },\n            length: 24,\n          },\n          `key.algorithm`,\n        );\n        await assert(key.extractable, false, `key.extractable`);\n        await assert(key.type, 'secret', `key.type`);\n        await assert(key.usages, ['sign', 'verify'], `key.usages`);\n      }\n    });\n    routes.set('/crypto.subtle.importKey/JWK-HS256-Public', async () => {\n      const key = await crypto.subtle.importKey(\n        'jwk',\n        {\n          kty: 'oct',\n          k: 'Y0zt37HgOx-BY7SQjYVmrqhPkO44Ii2Jcb9yydUDPfE',\n          alg: 'HS256',\n          ext: true,\n        },\n        {\n          name: 'HMAC',\n          hash: { name: 'SHA-256' },\n        },\n        false,\n        ['sign', 'verify'],\n      );\n      await assert(key instanceof CryptoKey, true, `key instanceof CryptoKey`);\n      await assert(\n        key.algorithm,\n        {\n          name: 'HMAC',\n          hash: { name: 'SHA-256' },\n          length: 256,\n        },\n        `key.algorithm`,\n      );\n      await assert(key.extractable, false, `key.extractable`);\n      await assert(key.type, 'secret', `key.type`);\n      await assert(key.usages, ['sign', 'verify'], `key.usages`);\n    });\n  }\n}\n\n// digest\n{\n  const enc = new TextEncoder();\n  const data = enc.encode('hello world');\n  routes.set('/crypto.subtle.digest', async () => {\n    assert(\n      typeof crypto.subtle.digest,\n      'function',\n      `typeof crypto.subtle.digest`,\n    );\n    assert(\n      crypto.subtle.digest,\n      SubtleCrypto.prototype.digest,\n      `crypto.subtle.digest === SubtleCrypto.prototype.digest`,\n    );\n  });\n  routes.set('/crypto.subtle.digest/length', async () => {\n    assert(crypto.subtle.digest.length, 2, `crypto.subtle.digest.length === 2`);\n  });\n  routes.set('/crypto.subtle.digest/called-as-constructor', async () => {\n    assertThrows(\n      () => {\n        new crypto.subtle.digest();\n      },\n      TypeError,\n      'crypto.subtle.digest is not a constructor',\n    );\n  });\n  routes.set('/crypto.subtle.digest/called-with-wrong-this', async () => {\n    await assertRejects(async () => {\n      await crypto.subtle.digest.call(undefined);\n    }, TypeError);\n  });\n  routes.set('/crypto.subtle.digest/called-with-no-arguments', async () => {\n    await assertRejects(\n      async () => {\n        await crypto.subtle.digest();\n      },\n      TypeError,\n      'SubtleCrypto.digest: At least 2 arguments required, but only 0 passed',\n    );\n  });\n\n  // first-parameter\n  {\n    routes.set(\n      '/crypto.subtle.digest/first-parameter-calls-7.1.17-ToString',\n      async () => {\n        const sentinel = Symbol('sentinel');\n        const test = async () => {\n          await crypto.subtle.digest(\n            {\n              name: {\n                toString() {\n                  throw sentinel;\n                },\n              },\n            },\n            data,\n          );\n        };\n        await assertRejects(test);\n        try {\n          await test();\n        } catch (thrownError) {\n          assert(thrownError, sentinel, 'thrownError === sentinel');\n        }\n      },\n    );\n    routes.set(\n      '/crypto.subtle.digest/first-parameter-non-existant-format',\n      async () => {\n        await assertRejects(\n          async () => {\n            await crypto.subtle.digest('jake', data);\n          },\n          Error,\n          'Algorithm: Unrecognized name',\n        );\n      },\n    );\n  }\n  // second-parameter\n  {\n    routes.set('/crypto.subtle.digest/second-parameter-undefined', async () => {\n      await assertRejects(async () => {\n        await crypto.subtle.digest('sha-1', undefined);\n      }, Error);\n    });\n  }\n  // happy paths\n  {\n    // \"MD5\"\n    routes.set('/crypto.subtle.digest/md5', async () => {\n      const result = new Uint8Array(\n        await crypto.subtle.digest('md5', new Uint8Array()),\n      );\n      const expected = new Uint8Array([\n        212, 29, 140, 217, 143, 0, 178, 4, 233, 128, 9, 152, 236, 248, 66, 126,\n      ]);\n      assert(result, expected, 'result deep equals expected');\n    });\n    // \"SHA-1\"\n    routes.set('/crypto.subtle.digest/sha-1', async () => {\n      const result = new Uint8Array(\n        await crypto.subtle.digest('sha-1', new Uint8Array()),\n      );\n      const expected = new Uint8Array([\n        218, 57, 163, 238, 94, 107, 75, 13, 50, 85, 191, 239, 149, 96, 24, 144,\n        175, 216, 7, 9,\n      ]);\n      assert(result, expected, 'result deep equals expected');\n    });\n    // \"SHA-256\"\n    routes.set('/crypto.subtle.digest/sha-256', async () => {\n      const result = new Uint8Array(\n        await crypto.subtle.digest('sha-256', new Uint8Array()),\n      );\n      const expected = new Uint8Array([\n        227, 176, 196, 66, 152, 252, 28, 20, 154, 251, 244, 200, 153, 111, 185,\n        36, 39, 174, 65, 228, 100, 155, 147, 76, 164, 149, 153, 27, 120, 82,\n        184, 85,\n      ]);\n      assert(result, expected, 'result deep equals expected');\n    });\n    // \"SHA-384\"\n    routes.set('/crypto.subtle.digest/sha-384', async () => {\n      const result = new Uint8Array(\n        await crypto.subtle.digest('sha-384', new Uint8Array()),\n      );\n      const expected = new Uint8Array([\n        56, 176, 96, 167, 81, 172, 150, 56, 76, 217, 50, 126, 177, 177, 227,\n        106, 33, 253, 183, 17, 20, 190, 7, 67, 76, 12, 199, 191, 99, 246, 225,\n        218, 39, 78, 222, 191, 231, 111, 101, 251, 213, 26, 210, 241, 72, 152,\n        185, 91,\n      ]);\n      assert(result, expected, 'result deep equals expected');\n    });\n    // \"SHA-512\"\n    routes.set('/crypto.subtle.digest/sha-512', async () => {\n      const result = new Uint8Array(\n        await crypto.subtle.digest('sha-512', new Uint8Array()),\n      );\n      const expected = new Uint8Array([\n        207, 131, 225, 53, 126, 239, 184, 189, 241, 84, 40, 80, 214, 109, 128,\n        7, 214, 32, 228, 5, 11, 87, 21, 220, 131, 244, 169, 33, 211, 108, 233,\n        206, 71, 208, 209, 60, 93, 133, 242, 176, 255, 131, 24, 210, 135, 126,\n        236, 47, 99, 185, 49, 189, 71, 65, 122, 129, 165, 56, 50, 122, 249, 39,\n        218, 62,\n      ]);\n      assert(result, expected, 'result deep equals expected');\n    });\n  }\n}\n\n// sign\n{\n  const enc = new TextEncoder();\n  const data = enc.encode('hello world');\n  routes.set('/crypto.subtle.sign', async () => {\n    assert(typeof crypto.subtle.sign, 'function', `typeof crypto.subtle.sign`);\n    assert(\n      crypto.subtle.sign,\n      SubtleCrypto.prototype.sign,\n      `crypto.subtle.sign === SubtleCrypto.prototype.sign`,\n    );\n  });\n  routes.set('/crypto.subtle.sign/length', async () => {\n    assert(crypto.subtle.sign.length, 3, `crypto.subtle.sign.length === 3`);\n  });\n  routes.set('/crypto.subtle.sign/called-as-constructor', async () => {\n    assertThrows(\n      () => {\n        new crypto.subtle.sign();\n      },\n      TypeError,\n      'crypto.subtle.sign is not a constructor',\n    );\n  });\n  routes.set('/crypto.subtle.sign/called-with-wrong-this', async () => {\n    await assertRejects(async () => {\n      await crypto.subtle.sign.call(\n        undefined,\n        rsaJsonWebKeyAlgorithm,\n        publicRsaJsonWebKeyData,\n        data,\n      );\n    }, TypeError);\n  });\n  routes.set('/crypto.subtle.sign/called-with-no-arguments', async () => {\n    await assertRejects(\n      async () => {\n        await crypto.subtle.sign();\n      },\n      TypeError,\n      'SubtleCrypto.sign: At least 3 arguments required, but only 0 passed',\n    );\n  });\n  // first-parameter\n  {\n    routes.set(\n      '/crypto.subtle.sign/first-parameter-calls-7.1.17-ToString',\n      async () => {\n        const sentinel = Symbol('sentinel');\n        const key = await crypto.subtle.importKey(\n          'jwk',\n          privateRsaJsonWebKeyData,\n          rsaJsonWebKeyAlgorithm,\n          privateRsaJsonWebKeyData.ext,\n          privateRsaJsonWebKeyData.key_ops,\n        );\n        const test = async () => {\n          await crypto.subtle.sign(\n            {\n              name: {\n                toString() {\n                  throw sentinel;\n                },\n              },\n            },\n            key,\n            data,\n          );\n        };\n        await assertRejects(test);\n        try {\n          await test();\n        } catch (thrownError) {\n          assert(thrownError, sentinel, 'thrownError === sentinel');\n        }\n      },\n    );\n    routes.set(\n      '/crypto.subtle.sign/first-parameter-non-existant-algorithm',\n      async () => {\n        await assertRejects(\n          async () => {\n            const key = await crypto.subtle.importKey(\n              'jwk',\n              privateRsaJsonWebKeyData,\n              rsaJsonWebKeyAlgorithm,\n              privateRsaJsonWebKeyData.ext,\n              privateRsaJsonWebKeyData.key_ops,\n            );\n            await crypto.subtle.sign('jake', key, data);\n          },\n          Error,\n          'Algorithm: Unrecognized name',\n        );\n      },\n    );\n  }\n  // second-parameter\n  {\n    routes.set(\n      '/crypto.subtle.sign/second-parameter-invalid-format',\n      async () => {\n        await assertRejects(async () => {\n          await crypto.subtle.sign(rsaJsonWebKeyAlgorithm, 'jake', data);\n        }, Error);\n      },\n    );\n    routes.set(\n      '/crypto.subtle.sign/second-parameter-invalid-usages',\n      async () => {\n        await assertRejects(\n          async () => {\n            const key = await crypto.subtle.importKey(\n              'jwk',\n              publicRsaJsonWebKeyData,\n              rsaJsonWebKeyAlgorithm,\n              publicRsaJsonWebKeyData.ext,\n              publicRsaJsonWebKeyData.key_ops,\n            );\n            await crypto.subtle.sign(rsaJsonWebKeyAlgorithm, key, data);\n          },\n          Error,\n          \"CryptoKey doesn't support signing\",\n        );\n      },\n    );\n  }\n  // third-parameter\n  {\n    routes.set(\n      '/crypto.subtle.sign/third-parameter-invalid-format',\n      async () => {\n        await assertRejects(async () => {\n          const key = await crypto.subtle.importKey(\n            'jwk',\n            publicRsaJsonWebKeyData,\n            rsaJsonWebKeyAlgorithm,\n            publicRsaJsonWebKeyData.ext,\n            publicRsaJsonWebKeyData.key_ops,\n          );\n          await crypto.subtle.sign(rsaJsonWebKeyAlgorithm, key, undefined);\n        }, Error);\n      },\n    );\n  }\n  // happy-path\n  {\n    routes.set('/crypto.subtle.sign/happy-path-jwk', async () => {\n      const key = await crypto.subtle.importKey(\n        'jwk',\n        privateRsaJsonWebKeyData,\n        rsaJsonWebKeyAlgorithm,\n        privateRsaJsonWebKeyData.ext,\n        privateRsaJsonWebKeyData.key_ops,\n      );\n      const signature = new Uint8Array(\n        await crypto.subtle.sign(rsaJsonWebKeyAlgorithm, key, data),\n      );\n      const expected = new Uint8Array([\n        70, 96, 33, 185, 93, 42, 67, 49, 243, 70, 88, 68, 194, 148, 53, 249,\n        255, 192, 232, 132, 161, 194, 41, 244, 174, 211, 218, 203, 7, 238, 71,\n        182, 101, 49, 139, 222, 165, 70, 222, 105, 82, 156, 184, 44, 100, 108,\n        121, 237, 250, 119, 66, 228, 156, 243, 71, 105, 62, 246, 22, 2, 160,\n        116, 71, 147, 202, 168, 24, 92, 224, 41, 148, 161, 124, 80, 212, 169,\n        212, 64, 29, 189, 2, 171, 174, 188, 159, 89, 93, 122, 219, 166, 105, 92,\n        107, 173, 103, 238, 145, 226, 94, 139, 71, 124, 17, 233, 49, 138, 89,\n        246, 3, 82, 238, 154, 169, 188, 66, 198, 32, 23, 230, 90, 164, 140, 51,\n        47, 221, 149, 161, 14, 254, 169, 224, 223, 119, 94, 27, 63, 199, 93, 65,\n        53, 24, 151, 146, 242, 239, 41, 108, 136, 31, 99, 42, 213, 128, 244,\n        140, 238, 157, 107, 117, 241, 219, 137, 97, 39, 109, 185, 176, 97, 193,\n        60, 117, 244, 106, 62, 193, 188, 87, 199, 37, 70, 137, 37, 231, 110,\n        228, 228, 139, 53, 240, 56, 92, 102, 220, 176, 127, 248, 24, 217, 208,\n        29, 209, 216, 29, 251, 100, 252, 243, 183, 195, 96, 126, 102, 136, 48,\n        39, 186, 45, 202, 10, 187, 22, 52, 183, 190, 149, 153, 32, 12, 90, 66,\n        49, 122, 190, 154, 167, 9, 12, 32, 77, 177, 222, 54, 211, 233, 219, 205,\n        133, 0, 113, 77, 158, 1, 125, 5, 15, 195,\n      ]);\n      assert(signature, expected, 'signature deep equals expected');\n    });\n    routes.set('/crypto.subtle.sign/happy-path-hmac', async () => {\n      const encoder = new TextEncoder();\n      const messageUint8Array = encoder.encode('aki');\n      const keyUint8Array = new Uint8Array([1, 0, 1]);\n      const results = {\n        'SHA-1': new Uint8Array([\n          222, 61, 81, 133, 232, 89, 130, 225, 248, 25, 220, 34, 245, 103, 89,\n          127, 136, 77, 146, 166,\n        ]),\n        'SHA-256': new Uint8Array([\n          92, 237, 16, 210, 91, 89, 194, 36, 95, 98, 27, 175, 64, 25, 15, 160,\n          152, 178, 145, 235, 62, 92, 23, 202, 125, 228, 8, 25, 148, 26, 215,\n          242,\n        ]),\n        'SHA-384': new Uint8Array([\n          238, 20, 74, 173, 238, 236, 161, 229, 250, 167, 72, 210, 188, 239,\n          233, 39, 233, 166, 114, 241, 140, 229, 201, 129, 243, 173, 74, 198,\n          223, 145, 228, 96, 253, 91, 166, 111, 244, 23, 141, 62, 112, 156, 90,\n          166, 214, 69, 185, 48,\n        ]),\n        'SHA-512': new Uint8Array([\n          211, 127, 139, 149, 23, 225, 84, 230, 82, 249, 109, 254, 168, 236,\n          217, 112, 174, 52, 231, 62, 167, 197, 33, 11, 181, 21, 162, 236, 214,\n          132, 43, 161, 92, 112, 230, 182, 140, 69, 169, 229, 87, 98, 57, 81,\n          140, 134, 219, 253, 139, 169, 85, 181, 195, 195, 166, 241, 219, 33, 9,\n          56, 67, 213, 51, 224,\n        ]),\n      };\n\n      for (const algorithm of ['SHA-1', 'SHA-256', 'SHA-384', 'SHA-512']) {\n        const key = await globalThis.crypto.subtle.importKey(\n          'raw',\n          keyUint8Array,\n          { name: 'HMAC', hash: algorithm },\n          false,\n          ['sign', 'verify'],\n        );\n        // Sign the message with HMAC and the CryptoKey\n        const signature = new Uint8Array(\n          await globalThis.crypto.subtle.sign('HMAC', key, messageUint8Array),\n        );\n        const expected = results[algorithm];\n        assert(\n          signature,\n          expected,\n          `${algorithm} signature deep equals expected`,\n        );\n      }\n    });\n  }\n}\n\n// verify\n{\n  routes.set('/crypto.subtle.verify', async () => {\n    assert(\n      typeof crypto.subtle.verify,\n      'function',\n      `typeof crypto.subtle.verify`,\n    );\n    assert(\n      crypto.subtle.verify,\n      SubtleCrypto.prototype.verify,\n      `crypto.subtle.verify === SubtleCrypto.prototype.verify`,\n    );\n  });\n  routes.set('/crypto.subtle.verify/length', async () => {\n    assert(crypto.subtle.verify.length, 4, `crypto.subtle.verify.length === 4`);\n  });\n  routes.set('/crypto.subtle.verify/called-as-constructor', async () => {\n    assertThrows(\n      () => {\n        new crypto.subtle.verify();\n      },\n      TypeError,\n      'crypto.subtle.verify is not a constructor',\n    );\n  });\n  routes.set('/crypto.subtle.verify/called-with-wrong-this', async () => {\n    await assertRejects(async () => {\n      const key = await crypto.subtle.importKey(\n        'jwk',\n        publicRsaJsonWebKeyData,\n        rsaJsonWebKeyAlgorithm,\n        publicRsaJsonWebKeyData.ext,\n        publicRsaJsonWebKeyData.key_ops,\n      );\n      await crypto.subtle.verify.call(\n        undefined,\n        rsaJsonWebKeyAlgorithm,\n        key,\n        new Uint8Array(),\n        new Uint8Array(),\n      );\n    }, TypeError);\n  });\n  routes.set('/crypto.subtle.verify/called-with-no-arguments', async () => {\n    await assertRejects(\n      async () => {\n        await crypto.subtle.verify();\n      },\n      TypeError,\n      'SubtleCrypto.verify: At least 4 arguments required, but only 0 passed',\n    );\n  });\n  // first-parameter\n  {\n    routes.set(\n      '/crypto.subtle.verify/first-parameter-calls-7.1.17-ToString',\n      async () => {\n        const sentinel = Symbol('sentinel');\n        const test = async () => {\n          const key = await crypto.subtle.importKey(\n            'jwk',\n            publicRsaJsonWebKeyData,\n            rsaJsonWebKeyAlgorithm,\n            publicRsaJsonWebKeyData.ext,\n            publicRsaJsonWebKeyData.key_ops,\n          );\n          await crypto.subtle.verify(\n            {\n              name: {\n                toString() {\n                  throw sentinel;\n                },\n              },\n            },\n            key,\n            new Uint8Array(),\n            new Uint8Array(),\n          );\n        };\n        await assertRejects(test);\n        try {\n          await test();\n        } catch (thrownError) {\n          assert(thrownError, sentinel, 'thrownError === sentinel');\n        }\n      },\n    );\n    routes.set(\n      '/crypto.subtle.verify/first-parameter-non-existant-algorithm',\n      async () => {\n        await assertRejects(\n          async () => {\n            const key = await crypto.subtle.importKey(\n              'jwk',\n              publicRsaJsonWebKeyData,\n              rsaJsonWebKeyAlgorithm,\n              publicRsaJsonWebKeyData.ext,\n              publicRsaJsonWebKeyData.key_ops,\n            );\n            await crypto.subtle.verify(\n              'jake',\n              key,\n              new Uint8Array(),\n              new Uint8Array(),\n            );\n          },\n          Error,\n          'Algorithm: Unrecognized name',\n        );\n      },\n    );\n  }\n  // second-parameter\n  {\n    routes.set(\n      '/crypto.subtle.verify/second-parameter-invalid-format',\n      async () => {\n        await assertRejects(async () => {\n          await crypto.subtle.verify(\n            rsaJsonWebKeyAlgorithm,\n            'jake',\n            new Uint8Array(),\n            new Uint8Array(),\n          );\n        }, Error);\n      },\n    );\n    routes.set(\n      '/crypto.subtle.verify/second-parameter-invalid-usages',\n      async () => {\n        await assertRejects(\n          async () => {\n            const key = await crypto.subtle.importKey(\n              'jwk',\n              privateRsaJsonWebKeyData,\n              rsaJsonWebKeyAlgorithm,\n              privateRsaJsonWebKeyData.ext,\n              privateRsaJsonWebKeyData.key_ops,\n            );\n            await crypto.subtle.verify(\n              rsaJsonWebKeyAlgorithm,\n              key,\n              new Uint8Array(),\n              new Uint8Array(),\n            );\n          },\n          Error,\n          \"CryptoKey doesn't support verification\",\n        );\n      },\n    );\n  }\n  // third-parameter\n  {\n    routes.set(\n      '/crypto.subtle.verify/third-parameter-invalid-format',\n      async () => {\n        await assertRejects(async () => {\n          const key = await crypto.subtle.importKey(\n            'jwk',\n            publicRsaJsonWebKeyData,\n            rsaJsonWebKeyAlgorithm,\n            publicRsaJsonWebKeyData.ext,\n            publicRsaJsonWebKeyData.key_ops,\n          );\n          await crypto.subtle.verify(\n            rsaJsonWebKeyAlgorithm,\n            key,\n            undefined,\n            new Uint8Array(),\n          );\n        }, Error);\n      },\n    );\n  }\n  // fourth-parameter\n  {\n    routes.set(\n      '/crypto.subtle.verify/fourth-parameter-invalid-format',\n      async () => {\n        await assertRejects(async () => {\n          const key = await crypto.subtle.importKey(\n            'jwk',\n            publicRsaJsonWebKeyData,\n            rsaJsonWebKeyAlgorithm,\n            publicRsaJsonWebKeyData.ext,\n            publicRsaJsonWebKeyData.key_ops,\n          );\n          await crypto.subtle.verify(\n            rsaJsonWebKeyAlgorithm,\n            key,\n            new Uint8Array(),\n            undefined,\n          );\n        }, Error);\n      },\n    );\n  }\n  // incorrect-signature\n  {\n    routes.set('/crypto.subtle.verify/incorrect-signature-jwk', async () => {\n      const key = await crypto.subtle.importKey(\n        'jwk',\n        publicRsaJsonWebKeyData,\n        rsaJsonWebKeyAlgorithm,\n        publicRsaJsonWebKeyData.ext,\n        publicRsaJsonWebKeyData.key_ops,\n      );\n      const signature = new Uint8Array();\n      const enc = new TextEncoder();\n      const data = enc.encode('hello world');\n      const result = await crypto.subtle.verify(\n        rsaJsonWebKeyAlgorithm,\n        key,\n        signature,\n        data,\n      );\n      assert(result, false, 'result === false');\n    });\n    routes.set('/crypto.subtle.verify/incorrect-signature-hmac', async () => {\n      const keyUint8Array = new Uint8Array([1, 0, 1]);\n      const signature = new Uint8Array();\n      const enc = new TextEncoder();\n      const data = enc.encode('hello world');\n\n      for (const algorithm of ['SHA-1', 'SHA-256', 'SHA-384', 'SHA-512']) {\n        const key = await globalThis.crypto.subtle.importKey(\n          'raw',\n          keyUint8Array,\n          { name: 'HMAC', hash: algorithm },\n          false,\n          ['sign', 'verify'],\n        );\n        const result = await crypto.subtle.verify('HMAC', key, signature, data);\n        assert(result, false, 'result');\n      }\n    });\n  }\n  // correct-signature\n  {\n    routes.set('/crypto.subtle.verify/correct-signature-jwk-rsa', async () => {\n      const pkey = await crypto.subtle.importKey(\n        'jwk',\n        privateRsaJsonWebKeyData,\n        rsaJsonWebKeyAlgorithm,\n        privateRsaJsonWebKeyData.ext,\n        privateRsaJsonWebKeyData.key_ops,\n      );\n      const key = await crypto.subtle.importKey(\n        'jwk',\n        publicRsaJsonWebKeyData,\n        rsaJsonWebKeyAlgorithm,\n        publicRsaJsonWebKeyData.ext,\n        publicRsaJsonWebKeyData.key_ops,\n      );\n      const enc = new TextEncoder();\n      const data = enc.encode('hello world');\n      const signature = await crypto.subtle.sign(\n        rsaJsonWebKeyAlgorithm,\n        pkey,\n        data,\n      );\n      const result = await crypto.subtle.verify(\n        rsaJsonWebKeyAlgorithm,\n        key,\n        signature,\n        data,\n      );\n      assert(result, true, 'result === true');\n    });\n    routes.set(\n      '/crypto.subtle.verify/correct-signature-jwk-ecdsa',\n      async () => {\n        const pkey = await crypto.subtle.importKey(\n          'jwk',\n          privateEcdsaJsonWebKeyData,\n          ecdsaJsonWebKeyAlgorithm,\n          privateEcdsaJsonWebKeyData.ext,\n          privateEcdsaJsonWebKeyData.key_ops,\n        );\n        const key = await crypto.subtle.importKey(\n          'jwk',\n          publicEcdsaJsonWebKeyData,\n          ecdsaJsonWebKeyAlgorithm,\n          publicEcdsaJsonWebKeyData.ext,\n          publicEcdsaJsonWebKeyData.key_ops,\n        );\n        const enc = new TextEncoder();\n        const data = enc.encode('hello world');\n        const signature = await crypto.subtle.sign(\n          ecdsaJsonWebKeyAlgorithm,\n          pkey,\n          data,\n        );\n        const result = await crypto.subtle.verify(\n          ecdsaJsonWebKeyAlgorithm,\n          key,\n          signature,\n          data,\n        );\n        assert(result, true, 'result === true');\n      },\n    );\n    routes.set('/crypto.subtle.verify/correct-signature-hmac', async () => {\n      const results = {\n        'SHA-1': new Uint8Array([\n          222, 61, 81, 133, 232, 89, 130, 225, 248, 25, 220, 34, 245, 103, 89,\n          127, 136, 77, 146, 166,\n        ]),\n        'SHA-256': new Uint8Array([\n          92, 237, 16, 210, 91, 89, 194, 36, 95, 98, 27, 175, 64, 25, 15, 160,\n          152, 178, 145, 235, 62, 92, 23, 202, 125, 228, 8, 25, 148, 26, 215,\n          242,\n        ]),\n        'SHA-384': new Uint8Array([\n          238, 20, 74, 173, 238, 236, 161, 229, 250, 167, 72, 210, 188, 239,\n          233, 39, 233, 166, 114, 241, 140, 229, 201, 129, 243, 173, 74, 198,\n          223, 145, 228, 96, 253, 91, 166, 111, 244, 23, 141, 62, 112, 156, 90,\n          166, 214, 69, 185, 48,\n        ]),\n        'SHA-512': new Uint8Array([\n          211, 127, 139, 149, 23, 225, 84, 230, 82, 249, 109, 254, 168, 236,\n          217, 112, 174, 52, 231, 62, 167, 197, 33, 11, 181, 21, 162, 236, 214,\n          132, 43, 161, 92, 112, 230, 182, 140, 69, 169, 229, 87, 98, 57, 81,\n          140, 134, 219, 253, 139, 169, 85, 181, 195, 195, 166, 241, 219, 33, 9,\n          56, 67, 213, 51, 224,\n        ]),\n      };\n      const encoder = new TextEncoder();\n      const messageUint8Array = encoder.encode('aki');\n      const keyUint8Array = new Uint8Array([1, 0, 1]);\n\n      for (const algorithm of ['SHA-1', 'SHA-256', 'SHA-384', 'SHA-512']) {\n        const key = await globalThis.crypto.subtle.importKey(\n          'raw',\n          keyUint8Array,\n          { name: 'HMAC', hash: algorithm },\n          false,\n          ['sign', 'verify'],\n        );\n        // Sign the message with HMAC and the CryptoKey\n        // const signature = new Uint8Array(await globalThis.crypto.subtle.sign(\"HMAC\", key, messageUint8Array));\n        const signature = results[algorithm];\n        const result = await crypto.subtle.verify(\n          'HMAC',\n          key,\n          signature,\n          messageUint8Array,\n        );\n        assert(result, true, 'result');\n      }\n    });\n  }\n}\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/device.js",
    "content": "/// <reference path=\"../../../../../types/index.d.ts\" />\n/* eslint-env serviceworker */\n\nimport { assert, assertThrows } from './assertions.js';\nimport { Device } from 'fastly:device';\nimport { routes } from './routes.js';\n\nroutes.set('/device/interface', () => {\n  let actual = Reflect.ownKeys(Device);\n  let expected = ['prototype', 'lookup', 'length', 'name'];\n  assert(actual, expected, `Reflect.ownKeys(Device)`);\n\n  // Check the prototype descriptors are correct\n  {\n    actual = Reflect.getOwnPropertyDescriptor(Device, 'prototype');\n    expected = {\n      value: Device.prototype,\n      writable: false,\n      enumerable: false,\n      configurable: false,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(Device, 'prototype')`,\n    );\n  }\n\n  // Check the constructor function's defined parameter length is correct\n  {\n    actual = Reflect.getOwnPropertyDescriptor(Device, 'length');\n    expected = {\n      value: 0,\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(Device, 'length')`,\n    );\n  }\n\n  // Check the constructor function's name is correct\n  {\n    actual = Reflect.getOwnPropertyDescriptor(Device, 'name');\n    expected = {\n      value: 'Device',\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(Device, 'name')`,\n    );\n  }\n\n  // Check the prototype has the correct keys\n  {\n    actual = Reflect.ownKeys(Device.prototype);\n    expected = [\n      'constructor',\n      'name',\n      'brand',\n      'model',\n      'hardwareType',\n      'isDesktop',\n      'isGameConsole',\n      'isMediaPlayer',\n      'isMobile',\n      'isSmartTV',\n      'isTablet',\n      'isTouchscreen',\n      'isBot',\n      'toJSON',\n      Symbol.toStringTag,\n    ];\n    assert(actual, expected, `Reflect.ownKeys(Device.prototype)`);\n  }\n\n  // Check the constructor on the prototype is correct\n  {\n    actual = Reflect.getOwnPropertyDescriptor(Device.prototype, 'constructor');\n    expected = {\n      writable: true,\n      enumerable: false,\n      configurable: true,\n      value: Device.prototype.constructor,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(Device.prototype, 'constructor')`,\n    );\n\n    assert(\n      typeof Device.prototype.constructor,\n      'function',\n      `typeof Device.prototype.constructor`,\n    );\n\n    actual = Reflect.getOwnPropertyDescriptor(\n      Device.prototype.constructor,\n      'length',\n    );\n    expected = {\n      value: 0,\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(Device.prototype.constructor, 'length')`,\n    );\n\n    actual = Reflect.getOwnPropertyDescriptor(\n      Device.prototype.constructor,\n      'name',\n    );\n    expected = {\n      value: 'Device',\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(Device.prototype.constructor, 'name')`,\n    );\n  }\n\n  // Check the Symbol.toStringTag on the prototype is correct\n  {\n    actual = Reflect.getOwnPropertyDescriptor(\n      Device.prototype,\n      Symbol.toStringTag,\n    );\n    expected = {\n      writable: false,\n      enumerable: false,\n      configurable: true,\n      value: 'Device',\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(Device.prototype, [Symbol.toStringTag])`,\n    );\n\n    assert(\n      typeof Device.prototype[Symbol.toStringTag],\n      'string',\n      `typeof Device.prototype[Symbol.toStringTag]`,\n    );\n  }\n\n  // Check the lookup static method has correct descriptors, length and name\n  {\n    actual = Reflect.getOwnPropertyDescriptor(Device, 'lookup');\n    expected = {\n      writable: true,\n      enumerable: true,\n      configurable: true,\n      value: Device.lookup,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(Device, 'lookup')`,\n    );\n\n    assert(typeof Device.lookup, 'function', `typeof Device.lookup`);\n\n    actual = Reflect.getOwnPropertyDescriptor(Device.lookup, 'length');\n    expected = {\n      value: 1,\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(Device.lookup, 'length')`,\n    );\n\n    actual = Reflect.getOwnPropertyDescriptor(Device.lookup, 'name');\n    expected = {\n      value: 'lookup',\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(Device.lookup, 'name')`,\n    );\n  }\n\n  for (let property of [\n    'name',\n    'brand',\n    'model',\n    'hardwareType',\n    'isDesktop',\n    'isGameConsole',\n    'isMediaPlayer',\n    'isMobile',\n    'isSmartTV',\n    'isTablet',\n    'isTouchscreen',\n    'isBot',\n  ]) {\n    const descriptors = Reflect.getOwnPropertyDescriptor(\n      Device.prototype,\n      property,\n    );\n    expected = { enumerable: true, configurable: true };\n    assert(\n      descriptors.enumerable,\n      true,\n      `Reflect.getOwnPropertyDescriptor(Device, '${property}').enumerable`,\n    );\n    assert(\n      descriptors.configurable,\n      true,\n      `Reflect.getOwnPropertyDescriptor(Device, '${property}').configurable`,\n    );\n    assert(\n      descriptors.value,\n      undefined,\n      `Reflect.getOwnPropertyDescriptor(Device, '${property}').value`,\n    );\n    assert(\n      descriptors.set,\n      undefined,\n      `Reflect.getOwnPropertyDescriptor(Device, '${property}').set`,\n    );\n    assert(\n      typeof descriptors.get,\n      'function',\n      `typeof Reflect.getOwnPropertyDescriptor(Device, '${property}').get`,\n    );\n  }\n});\n\n// Device constructor\n{\n  routes.set('/device/constructor/called-as-regular-function', () => {\n    assertThrows(() => {\n      Device();\n    }, TypeError);\n  });\n  routes.set('/device/constructor/throws', () => {\n    assertThrows(() => new Device(), TypeError);\n  });\n}\n\n// Device lookup static method\n// static lookup(useragent: string): DeviceEntry | null;\n{\n  routes.set('/device/lookup/called-as-constructor', () => {\n    assertThrows(() => {\n      new Device.lookup('1');\n    }, TypeError);\n  });\n  // https://tc39.es/ecma262/#sec-tostring\n  routes.set('/device/lookup/useragent-parameter-calls-7.1.17-ToString', () => {\n    let sentinel;\n    const test = () => {\n      sentinel = Symbol('sentinel');\n      const useragent = {\n        toString() {\n          throw sentinel;\n        },\n      };\n      Device.lookup(useragent);\n    };\n    assertThrows(test);\n    try {\n      test();\n    } catch (thrownError) {\n      assert(thrownError, sentinel, 'thrownError === sentinel');\n    }\n    assertThrows(\n      () => {\n        Device.lookup(Symbol());\n      },\n      TypeError,\n      `can't convert symbol to string`,\n    );\n  });\n  routes.set('/device/lookup/useragent-parameter-not-supplied', () => {\n    assertThrows(\n      () => {\n        Device.lookup();\n      },\n      TypeError,\n      `Device.lookup: At least 1 argument required, but only 0 passed`,\n    );\n  });\n  routes.set('/device/lookup/useragent-parameter-empty-string', () => {\n    assertThrows(\n      () => {\n        Device.lookup('');\n      },\n      Error,\n      `Device.lookup: useragent parameter can not be an empty string`,\n    );\n  });\n  routes.set('/device/lookup/useragent-does-not-exist-returns-null', () => {\n    let result = Device.lookup(Math.random());\n    assert(result, null, `Device.lookup(Math.random()) === null`);\n  });\n  routes.set('/device/lookup/useragent-exists-all-fields-identified', () => {\n    let useragent =\n      'Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20100101 Firefox/10.0 FBAN/FBIOS;FBAV/8.0.0.28.18;FBBV/1665515;FBDV/iPhone4,1;FBMD/iPhone;FBSN/iPhone OS;FBSV/7.0.4;FBSS/2; FBCR/Telekom.de;FBID/phone;FBLC/de_DE;FBOP/5';\n    let device = Device.lookup(useragent);\n\n    assert(\n      device instanceof Device,\n      true,\n      `Device.lookup(useragent) instanceof DeviceEntry`,\n    );\n\n    assert(device.name, 'iPhone', `device.name`);\n    assert(device.brand, 'Apple', `device.brand`);\n    assert(device.model, 'iPhone4,1', `device.model`);\n    assert(device.hardwareType, 'Mobile Phone', `device.hardwareType`);\n    assert(device.isDesktop, false, `device.isDesktop`);\n    assert(device.isGameConsole, false, `device.isGameConsole`);\n    assert(device.isMediaPlayer, false, `device.isMediaPlayer`);\n    assert(device.isMobile, true, `device.isMobile`);\n    assert(device.isSmartTV, false, `device.isSmartTV`);\n    assert(device.isTablet, false, `device.isTablet`);\n    assert(device.isTouchscreen, true, `device.isTouchscreen`);\n    assert(device.isBot, null, `device.isBot`);\n  });\n  routes.set(\n    '/device/lookup/useragent-exists-all-fields-identified-tojson',\n    () => {\n      let useragent =\n        'Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20100101 Firefox/10.0 FBAN/FBIOS;FBAV/8.0.0.28.18;FBBV/1665515;FBDV/iPhone4,1;FBMD/iPhone;FBSN/iPhone OS;FBSV/7.0.4;FBSS/2; FBCR/Telekom.de;FBID/phone;FBLC/de_DE;FBOP/5';\n      let device = Device.lookup(useragent);\n      device = device.toJSON();\n\n      assert(device.brand, 'Apple', `device.brand`);\n      assert(device.model, 'iPhone4,1', `device.model`);\n      assert(device.hardwareType, 'Mobile Phone', `device.hardwareType`);\n      assert(device.isDesktop, false, `device.isDesktop`);\n      assert(device.isGameConsole, false, `device.isGameConsole`);\n      assert(device.isMediaPlayer, false, `device.isMediaPlayer`);\n      assert(device.isMobile, true, `device.isMobile`);\n      assert(device.isSmartTV, false, `device.isSmartTV`);\n      assert(device.isTablet, false, `device.isTablet`);\n      assert(device.isTouchscreen, true, `device.isTouchscreen`);\n      assert(device.isBot, null, `device.isBot`);\n    },\n  );\n  routes.set('/device/lookup/useragent-exists-some-fields-identified', () => {\n    let useragent =\n      'ghosts-app/1.0.2.1 (ASUSTeK COMPUTER INC.; X550CC; Windows 8 (X86); en)';\n    let device = Device.lookup(useragent);\n\n    assert(\n      device instanceof Device,\n      true,\n      `Device.lookup(useragent) instanceof DeviceEntry`,\n    );\n    assert(device.name, 'Asus TeK', `device.name`);\n    assert(device.brand, 'Asus', `device.brand`);\n    assert(device.model, 'TeK', `device.model`);\n    assert(device.hardwareType, null, `device.hardwareType`);\n    assert(device.isDesktop, false, `device.isDesktop`);\n    assert(device.isGameConsole, null, `device.isGameConsole`);\n    assert(device.isMediaPlayer, null, `device.isMediaPlayer`);\n    assert(device.isMobile, null, `device.isMobile`);\n    assert(device.isSmartTV, null, `device.isSmartTV`);\n    assert(device.isTablet, null, `device.isTablet`);\n    assert(device.isTouchscreen, null, `device.isTouchscreen`);\n    assert(device.isBot, null, `device.isBot`);\n    assert(\n      JSON.stringify(device),\n      '{\"name\":\"Asus TeK\",\"brand\":\"Asus\",\"model\":\"TeK\",\"hardwareType\":null,\"isDesktop\":false,\"isGameConsole\":null,\"isMediaPlayer\":null,\"isMobile\":null,\"isSmartTV\":null,\"isTablet\":null,\"isTouchscreen\":null,\"isBot\":null}',\n      `JSON.stringify(device)`,\n    );\n  });\n}\nroutes.set('/device/lookup/bot-detection', () => {\n  let useragent = 'Googlebot/2.1 (+http://www.google.com/bot.html)';\n  let device = Device.lookup(useragent);\n\n  assert(\n    device instanceof Device,\n    true,\n    `Device.lookup(useragent) instanceof DeviceEntry`,\n  );\n\n  assert(device.name, 'Googlebot', `device.name`);\n  assert(device.brand, 'Google', `device.brand`);\n  assert(device.isBot, true, `device.isBot`);\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/dictionary.js",
    "content": "/* eslint-env serviceworker */\n\nimport { Dictionary } from 'fastly:dictionary';\nimport { routes } from './routes.js';\nimport { assertThrows, assert, assertResolves } from './assertions.js';\nimport { env } from 'fastly:env';\n\nconst DICTIONARY_NAME = env('DICTIONARY_NAME');\n\n// Dictionary\n{\n  routes.set('/dictionary/exposed-as-global', () => {\n    assert(typeof Dictionary, 'function', `typeof Dictionary`);\n  });\n  routes.set('/dictionary/interface', dictionaryInterfaceTests);\n  // Dictionary constructor\n  {\n    routes.set('/dictionary/constructor/called-as-regular-function', () => {\n      assertThrows(\n        () => {\n          Dictionary();\n        },\n        TypeError,\n        `calling a builtin Dictionary constructor without new is forbidden`,\n      );\n    });\n    // https://tc39.es/ecma262/#sec-tostring\n    routes.set(\n      '/dictionary/constructor/parameter-calls-7.1.17-ToString',\n      () => {\n        let sentinel = Symbol();\n        const test = () => {\n          const name = {\n            toString() {\n              throw sentinel;\n            },\n          };\n          new Dictionary(name);\n        };\n        assertThrows(test);\n        try {\n          test();\n        } catch (thrownError) {\n          assert(thrownError, sentinel, 'thrownError === sentinel');\n        }\n        assertThrows(\n          () => new Dictionary(Symbol()),\n          TypeError,\n          `can't convert symbol to string`,\n        );\n      },\n    );\n    routes.set('/dictionary/constructor/empty-parameter', () => {\n      assertThrows(\n        () => {\n          new Dictionary();\n        },\n        TypeError,\n        `Dictionary constructor: At least 1 argument required, but only 0 passed`,\n      );\n    });\n    routes.set('/dictionary/constructor/found', () => {\n      const store = createValidDictionary();\n      assert(store instanceof Dictionary, true, `store instanceof Dictionary`);\n    });\n    routes.set('/dictionary/constructor/invalid-name', () => {\n      // control Characters (\\\\u0000-\\\\u001F) are not allowed\n      const invalidNames = ['1', '-', ' ', 'Ä'];\n      for (const name of invalidNames) {\n        assertThrows(\n          () => {\n            new Dictionary(name);\n          },\n          TypeError,\n          `Dictionary constructor: name must start with an ascii alpabetical character`,\n        );\n      }\n      assertThrows(\n        () => {\n          new Dictionary('aÄ');\n        },\n        TypeError,\n        `Dictionary constructor: name can contain only ascii alphanumeric characters, underscores, and ascii whitespace`,\n      );\n\n      // must be less than 256 characters\n      assertThrows(\n        () => {\n          new Dictionary('a'.repeat(256));\n        },\n        TypeError,\n        `Dictionary constructor: name can not be more than 255 characters`,\n      );\n\n      // empty string not allowed\n      assertThrows(\n        () => {\n          new Dictionary('');\n        },\n        TypeError,\n        `Dictionary constructor: name can not be an empty string`,\n      );\n    });\n  }\n\n  // Dictionary get method\n  {\n    routes.set('/dictionary/get/called-as-constructor', () => {\n      assertThrows(() => {\n        new Dictionary.prototype.get('1');\n      }, TypeError);\n    });\n    routes.set('/dictionary/get/called-unbound', () => {\n      assertThrows(() => {\n        Dictionary.prototype.get.call(undefined, '1');\n      }, TypeError);\n    });\n    // https://tc39.es/ecma262/#sec-tostring\n    routes.set('/dictionary/get/key-parameter-calls-7.1.17-ToString', () => {\n      let sentinel = Symbol();\n      const test = () => {\n        const key = {\n          toString() {\n            throw sentinel;\n          },\n        };\n        const store = createValidDictionary();\n        store.get(key);\n      };\n      assertThrows(test);\n      try {\n        test();\n      } catch (thrownError) {\n        assert(thrownError, sentinel, 'thrownError === sentinel');\n      }\n      assertThrows(\n        () => {\n          const store = createValidDictionary();\n          store.get(Symbol());\n        },\n        TypeError,\n        `can't convert symbol to string`,\n      );\n    });\n    routes.set('/dictionary/get/key-parameter-not-supplied', () => {\n      assertThrows(\n        () => {\n          const store = createValidDictionary();\n          store.get();\n        },\n        TypeError,\n        `get: At least 1 argument required, but only 0 passed`,\n      );\n    });\n    routes.set('/dictionary/get/key-parameter-empty-string', () => {\n      assertThrows(\n        () => {\n          const store = createValidDictionary();\n          store.get('');\n        },\n        TypeError,\n        `Dictionary key can not be an empty string`,\n      );\n    });\n    routes.set('/dictionary/get/key-parameter-255-character-string', () => {\n      assertResolves(() => {\n        const store = createValidDictionary();\n        const key = 'a'.repeat(255);\n        store.get(key);\n      });\n    });\n    routes.set('/dictionary/get/key-parameter-256-character-string', () => {\n      assertThrows(\n        () => {\n          const store = createValidDictionary();\n          const key = 'a'.repeat(256);\n          store.get(key);\n        },\n        TypeError,\n        `Dictionary key can not be more than 255 characters`,\n      );\n    });\n    routes.set('/dictionary/get/key-does-not-exist-returns-null', () => {\n      let store = createValidDictionary();\n      let result = store.get(Math.random());\n      assert(result, null, `store.get(Math.random())`);\n    });\n    routes.set('/dictionary/get/key-exists', () => {\n      let store = createValidDictionary();\n      let result = store.get('twitter');\n      assert(\n        result,\n        'https://twitter.com/fastly',\n        `store.get('twitter') === \"https://twitter.com/fastly\"`,\n      );\n    });\n  }\n}\n\nfunction dictionaryInterfaceTests() {\n  let actual = Reflect.ownKeys(Dictionary);\n  let expected = ['prototype', 'length', 'name'];\n  assert(actual, expected, `Reflect.ownKeys(Dictionary)`);\n\n  actual = Reflect.getOwnPropertyDescriptor(Dictionary, 'prototype');\n  expected = {\n    value: Dictionary.prototype,\n    writable: false,\n    enumerable: false,\n    configurable: false,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(Dictionary, 'prototype')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(Dictionary, 'length');\n  expected = {\n    value: 1,\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(Dictionary, 'length')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(Dictionary, 'name');\n  expected = {\n    value: 'Dictionary',\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(Dictionary, 'name')`,\n  );\n\n  actual = Reflect.ownKeys(Dictionary.prototype);\n  expected = ['constructor', 'get'];\n  assert(actual, expected, `Reflect.ownKeys(Dictionary.prototype)`);\n\n  actual = Reflect.getOwnPropertyDescriptor(\n    Dictionary.prototype,\n    'constructor',\n  );\n  expected = {\n    writable: true,\n    enumerable: false,\n    configurable: true,\n    value: Dictionary.prototype.constructor,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(Dictionary.prototype, 'constructor')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(Dictionary.prototype, 'get');\n  expected = {\n    writable: true,\n    enumerable: true,\n    configurable: true,\n    value: Dictionary.prototype.get,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(Dictionary.prototype, 'get')`,\n  );\n\n  assert(\n    typeof Dictionary.prototype.constructor,\n    'function',\n    `typeof Dictionary.prototype.constructor`,\n  );\n  assert(\n    typeof Dictionary.prototype.get,\n    'function',\n    `typeof Dictionary.prototype.get`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(\n    Dictionary.prototype.constructor,\n    'length',\n  );\n  expected = {\n    value: 1,\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(Dictionary.prototype.constructor, 'length')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(\n    Dictionary.prototype.constructor,\n    'name',\n  );\n  expected = {\n    value: 'Dictionary',\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(Dictionary.prototype.constructor, 'name')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(Dictionary.prototype.get, 'length');\n  expected = {\n    value: 1,\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(Dictionary.prototype.get, 'length')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(Dictionary.prototype.get, 'name');\n  expected = {\n    value: 'get',\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(Dictionary.prototype.get, 'name')`,\n  );\n}\n\nfunction createValidDictionary() {\n  return new Dictionary(DICTIONARY_NAME);\n}\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/early-hints.js",
    "content": "import { pass, ok, strictEqual, assertThrows } from './assertions.js';\nimport { routes } from './routes.js';\n\nroutes.set('/early-hints/manual-response', (event) => {\n  event.respondWith(\n    new Response(null, {\n      status: 103,\n      headers: { link: '</style.css>; rel=preload; as=style' },\n    }),\n  );\n  event.respondWith(new Response('ok'));\n});\n\nroutes.set('/early-hints/manual-response-late', (event) => {\n  event.respondWith(new Response('ok'));\n  assertThrows(() => {\n    event.respondWith(\n      new Response(null, {\n        status: 103,\n        headers: { link: '</style.css>; rel=preload; as=style' },\n      }),\n    );\n  });\n});\n\nroutes.set('/early-hints/manual-response-async', async (event) => {\n  await (async () => {\n    event.respondWith(\n      new Response(null, {\n        status: 103,\n        headers: { link: '</style.css>; rel=preload; as=style' },\n      }),\n    );\n    event.respondWith(new Response('ok'));\n  })();\n});\n\nroutes.set('/early-hints/manual-response-late-async', async (event) => {\n  await (async () => {\n    event.respondWith(new Response('ok'));\n    assertThrows(() => {\n      event.respondWith(\n        new Response(null, {\n          status: 103,\n          headers: { link: '</style.css>; rel=preload; as=style' },\n        }),\n      );\n    });\n  })();\n});\n\nroutes.set('/early-hints/send-early-hints', (event) => {\n  event.sendEarlyHints({ link: '</style.css>; rel=preload; as=style' });\n  event.respondWith(new Response('ok'));\n});\n\nroutes.set('/early-hints/send-early-hints-late', (event) => {\n  event.respondWith(new Response('ok'));\n  assertThrows(() => {\n    event.sendEarlyHints({ link: '</style.css>; rel=preload; as=style' });\n  });\n});\n\nroutes.set('/early-hints/send-early-hints-multiple-headers', (event) => {\n  event.sendEarlyHints([\n    ['link', '</style.css>; rel=preload; as=style'],\n    ['link', '</style2.css>; rel=preload; as=style'],\n  ]);\n  event.respondWith(new Response('ok'));\n});\n\nroutes.set('/early-hints/send-early-hints-async', async (event) => {\n  await (async () => {\n    event.sendEarlyHints({ link: '</style.css>; rel=preload; as=style' });\n    event.respondWith(new Response('ok'));\n  })();\n});\n\nroutes.set('/early-hints/send-early-hints-late-async', async (event) => {\n  await (async () => {\n    event.respondWith(new Response('ok'));\n    assertThrows(() => {\n      event.sendEarlyHints({ link: '</style.css>; rel=preload; as=style' });\n    });\n  })();\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/edge-rate-limiter.js",
    "content": "/// <reference path=\"../../../../../types/index.d.ts\" />\n/* eslint-env serviceworker */\n\nimport { assert, assertThrows } from './assertions.js';\nimport {\n  RateCounter,\n  PenaltyBox,\n  EdgeRateLimiter,\n} from 'fastly:edge-rate-limiter';\nimport { routes, isRunningLocally } from './routes.js';\nimport { env } from 'fastly:env';\n\nconst FASTLY_SERVICE_NAME = env('FASTLY_SERVICE_NAME');\nconst PENALTY_BOX_NAME = `pb${FASTLY_SERVICE_NAME}`;\nconst RATE_COUNTER_NAME = `rc${FASTLY_SERVICE_NAME}`;\n\n// RateCounter\n{\n  routes.set('/rate-counter/interface', () => {\n    let actual = Reflect.ownKeys(RateCounter);\n    let expected = ['prototype', 'length', 'name'];\n    assert(actual, expected, `Reflect.ownKeys(RateCounter)`);\n\n    // Check the prototype descriptors are correct\n    {\n      actual = Reflect.getOwnPropertyDescriptor(RateCounter, 'prototype');\n      expected = {\n        value: RateCounter.prototype,\n        writable: false,\n        enumerable: false,\n        configurable: false,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(RateCounter, 'prototype')`,\n      );\n    }\n\n    // Check the constructor function's defined parameter length is correct\n    {\n      actual = Reflect.getOwnPropertyDescriptor(RateCounter, 'length');\n      expected = {\n        value: 0,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(RateCounter, 'length')`,\n      );\n    }\n\n    // Check the constructor function's name is correct\n    {\n      actual = Reflect.getOwnPropertyDescriptor(RateCounter, 'name');\n      expected = {\n        value: 'RateCounter',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(RateCounter, 'name')`,\n      );\n    }\n\n    // Check the prototype has the correct keys\n    {\n      actual = Reflect.ownKeys(RateCounter.prototype);\n      expected = [\n        'constructor',\n        'increment',\n        'lookupRate',\n        'lookupCount',\n        Symbol.toStringTag,\n      ];\n      assert(actual, expected, `Reflect.ownKeys(RateCounter.prototype)`);\n    }\n\n    // Check the constructor on the prototype is correct\n    {\n      actual = Reflect.getOwnPropertyDescriptor(\n        RateCounter.prototype,\n        'constructor',\n      );\n      expected = {\n        writable: true,\n        enumerable: false,\n        configurable: true,\n        value: RateCounter.prototype.constructor,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(RateCounter.prototype, 'constructor')`,\n      );\n\n      assert(\n        typeof RateCounter.prototype.constructor,\n        'function',\n        `typeof RateCounter.prototype.constructor`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        RateCounter.prototype.constructor,\n        'length',\n      );\n      expected = {\n        value: 0,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(RateCounter.prototype.constructor, 'length')`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        RateCounter.prototype.constructor,\n        'name',\n      );\n      expected = {\n        value: 'RateCounter',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(RateCounter.prototype.constructor, 'name')`,\n      );\n    }\n\n    // Check the Symbol.toStringTag on the prototype is correct\n    {\n      actual = Reflect.getOwnPropertyDescriptor(\n        RateCounter.prototype,\n        Symbol.toStringTag,\n      );\n      expected = {\n        writable: false,\n        enumerable: false,\n        configurable: true,\n        value: 'RateCounter',\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(RateCounter.prototype, [Symbol.toStringTag])`,\n      );\n\n      assert(\n        typeof RateCounter.prototype[Symbol.toStringTag],\n        'string',\n        `typeof RateCounter.prototype[Symbol.toStringTag]`,\n      );\n    }\n\n    // Check the increment method has correct descriptors, length and name\n    {\n      actual = Reflect.getOwnPropertyDescriptor(\n        RateCounter.prototype,\n        'increment',\n      );\n      expected = {\n        writable: true,\n        enumerable: true,\n        configurable: true,\n        value: RateCounter.prototype.increment,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(RateCounter.prototype, 'increment')`,\n      );\n\n      assert(\n        typeof RateCounter.prototype.increment,\n        'function',\n        `typeof RateCounter.prototype.increment`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        RateCounter.prototype.increment,\n        'length',\n      );\n      expected = {\n        value: 2,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(RateCounter.prototype.increment, 'length')`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        RateCounter.prototype.increment,\n        'name',\n      );\n      expected = {\n        value: 'increment',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(RateCounter.prototype.increment, 'name')`,\n      );\n    }\n\n    // Check the lookupRate method has correct descriptors, length and name\n    {\n      actual = Reflect.getOwnPropertyDescriptor(\n        RateCounter.prototype,\n        'lookupRate',\n      );\n      expected = {\n        writable: true,\n        enumerable: true,\n        configurable: true,\n        value: RateCounter.prototype.lookupRate,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(RateCounter.prototype, 'lookupRate')`,\n      );\n\n      assert(\n        typeof RateCounter.prototype.lookupRate,\n        'function',\n        `typeof RateCounter.prototype.lookupRate`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        RateCounter.prototype.lookupRate,\n        'length',\n      );\n      expected = {\n        value: 2,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(RateCounter.prototype.lookupRate, 'length')`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        RateCounter.prototype.lookupRate,\n        'name',\n      );\n      expected = {\n        value: 'lookupRate',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(RateCounter.prototype.lookupRate, 'name')`,\n      );\n    }\n\n    // Check the lookupCount method has correct descriptors, length and name\n    {\n      actual = Reflect.getOwnPropertyDescriptor(\n        RateCounter.prototype,\n        'lookupCount',\n      );\n      expected = {\n        writable: true,\n        enumerable: true,\n        configurable: true,\n        value: RateCounter.prototype.lookupCount,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(RateCounter.prototype, 'lookupCount')`,\n      );\n\n      assert(\n        typeof RateCounter.prototype.lookupCount,\n        'function',\n        `typeof RateCounter.prototype.lookupCount`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        RateCounter.prototype.lookupCount,\n        'length',\n      );\n      expected = {\n        value: 2,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(RateCounter.prototype.lookupCount, 'length')`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        RateCounter.prototype.lookupCount,\n        'name',\n      );\n      expected = {\n        value: 'lookupCount',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(RateCounter.prototype.lookupCount, 'name')`,\n      );\n    }\n  });\n\n  // RateCounter constructor\n  {\n    routes.set('/rate-counter/constructor/called-as-regular-function', () => {\n      assertThrows(\n        () => {\n          RateCounter();\n        },\n        Error,\n        `calling a builtin RateCounter constructor without new is forbidden`,\n      );\n    });\n    routes.set(\n      '/rate-counter/constructor/called-as-constructor-no-arguments',\n      () => {\n        assertThrows(\n          () => new RateCounter(),\n          Error,\n          `RateCounter constructor: At least 1 argument required, but only 0 passed`,\n        );\n      },\n    );\n    // Ensure we correctly coerce the parameter to a string as according to\n    // https://tc39.es/ecma262/#sec-tostring\n    routes.set(\n      '/rate-counter/constructor/name-parameter-calls-7.1.17-ToString',\n      () => {\n        if (!isRunningLocally()) {\n          let sentinel;\n          const test = () => {\n            sentinel = Symbol('sentinel');\n            const name = {\n              toString() {\n                throw sentinel;\n              },\n            };\n            new RateCounter(name);\n          };\n          assertThrows(test);\n          try {\n            test();\n          } catch (thrownError) {\n            assert(thrownError, sentinel, 'thrownError === sentinel');\n          }\n          assertThrows(\n            () => {\n              new RateCounter(Symbol());\n            },\n            Error,\n            `can't convert symbol to string`,\n          );\n        }\n      },\n    );\n    routes.set('/rate-counter/constructor/happy-path', () => {\n      assert(\n        new RateCounter(RATE_COUNTER_NAME) instanceof RateCounter,\n        true,\n        `new RateCounter(\"rc\") instanceof RateCounter`,\n      );\n    });\n  }\n\n  // RateCounter increment method\n  // increment(entry: string, delta: number): void;\n  {\n    routes.set('/rate-counter/increment/called-as-constructor', () => {\n      assertThrows(() => {\n        new RateCounter.prototype.increment('entry', 1);\n      }, Error);\n    });\n    // Ensure we correctly coerce the parameter to a string as according to\n    // https://tc39.es/ecma262/#sec-tostring\n    routes.set(\n      '/rate-counter/increment/entry-parameter-calls-7.1.17-ToString',\n      () => {\n        let sentinel;\n        const test = () => {\n          sentinel = Symbol('sentinel');\n          const entry = {\n            toString() {\n              throw sentinel;\n            },\n          };\n          let rc = new RateCounter(RATE_COUNTER_NAME);\n          rc.increment(entry, 1);\n        };\n        assertThrows(test);\n        try {\n          test();\n        } catch (thrownError) {\n          console.log({ thrownError });\n          assert(thrownError, sentinel, 'thrownError === sentinel');\n        }\n        assertThrows(\n          () => {\n            let rc = new RateCounter(RATE_COUNTER_NAME);\n            rc.increment(Symbol(), 1);\n          },\n          Error,\n          `can't convert symbol to string`,\n        );\n      },\n    );\n    routes.set('/rate-counter/increment/entry-parameter-not-supplied', () => {\n      assertThrows(\n        () => {\n          let rc = new RateCounter(RATE_COUNTER_NAME);\n          rc.increment();\n        },\n        Error,\n        `increment: At least 2 arguments required, but only 0 passed`,\n      );\n    });\n    routes.set('/rate-counter/increment/delta-parameter-not-supplied', () => {\n      assertThrows(\n        () => {\n          let rc = new RateCounter(RATE_COUNTER_NAME);\n          rc.increment('entry');\n        },\n        Error,\n        `increment: At least 2 arguments required, but only 1 passed`,\n      );\n    });\n    routes.set('/rate-counter/increment/delta-parameter-negative', () => {\n      assertThrows(\n        () => {\n          let rc = new RateCounter(RATE_COUNTER_NAME);\n          rc.increment('entry', -1);\n        },\n        Error,\n        `increment: delta parameter is an invalid value, only positive numbers can be used for delta values.`,\n      );\n    });\n    routes.set('/rate-counter/increment/delta-parameter-infinity', () => {\n      assertThrows(\n        () => {\n          let rc = new RateCounter(RATE_COUNTER_NAME);\n          rc.increment('entry', Infinity);\n        },\n        Error,\n        `increment: delta parameter is an invalid value, only positive numbers can be used for delta values.`,\n      );\n    });\n    routes.set('/rate-counter/increment/delta-parameter-NaN', () => {\n      assertThrows(\n        () => {\n          let rc = new RateCounter(RATE_COUNTER_NAME);\n          rc.increment('entry', NaN);\n        },\n        Error,\n        `increment: delta parameter is an invalid value, only positive numbers can be used for delta values.`,\n      );\n    });\n    routes.set('/rate-counter/increment/returns-undefined', () => {\n      let rc = new RateCounter(RATE_COUNTER_NAME);\n      assert(rc.increment('meow', 1), undefined, \"rc.increment('meow', 1)\");\n    });\n  }\n\n  // RateCounter lookupRate method\n  // lookupRate(entry: string, window: [1, 10, 60]): number;\n  {\n    routes.set('/rate-counter/lookupRate/called-as-constructor', () => {\n      assertThrows(() => {\n        new RateCounter.prototype.lookupRate('entry', 1);\n      }, Error);\n    });\n    // Ensure we correctly coerce the parameter to a string as according to\n    // https://tc39.es/ecma262/#sec-tostring\n    routes.set(\n      '/rate-counter/lookupRate/entry-parameter-calls-7.1.17-ToString',\n      () => {\n        let sentinel;\n        const test = () => {\n          sentinel = Symbol('sentinel');\n          const entry = {\n            toString() {\n              throw sentinel;\n            },\n          };\n          let rc = new RateCounter(RATE_COUNTER_NAME);\n          rc.lookupRate(entry, 1);\n        };\n        assertThrows(test);\n        try {\n          test();\n        } catch (thrownError) {\n          console.log({ thrownError });\n          assert(thrownError, sentinel, 'thrownError === sentinel');\n        }\n        assertThrows(\n          () => {\n            let rc = new RateCounter(RATE_COUNTER_NAME);\n            rc.lookupRate(Symbol(), 1);\n          },\n          Error,\n          `can't convert symbol to string`,\n        );\n      },\n    );\n    routes.set('/rate-counter/lookupRate/entry-parameter-not-supplied', () => {\n      assertThrows(\n        () => {\n          let rc = new RateCounter(RATE_COUNTER_NAME);\n          rc.lookupRate();\n        },\n        Error,\n        `lookupRate: At least 2 arguments required, but only 0 passed`,\n      );\n    });\n    routes.set('/rate-counter/lookupRate/window-parameter-not-supplied', () => {\n      assertThrows(\n        () => {\n          let rc = new RateCounter(RATE_COUNTER_NAME);\n          rc.lookupRate('entry');\n        },\n        Error,\n        `lookupRate: At least 2 arguments required, but only 1 passed`,\n      );\n    });\n    routes.set('/rate-counter/lookupRate/window-parameter-negative', () => {\n      if (!isRunningLocally()) {\n        assertThrows(\n          () => {\n            let rc = new RateCounter(RATE_COUNTER_NAME);\n            rc.lookupRate('entry', -1);\n          },\n          Error,\n          `lookupRate: window parameter must be either: 1, 10, or 60`,\n        );\n      }\n    });\n    routes.set('/rate-counter/lookupRate/window-parameter-infinity', () => {\n      if (!isRunningLocally()) {\n        assertThrows(\n          () => {\n            let rc = new RateCounter(RATE_COUNTER_NAME);\n            rc.lookupRate('entry', Infinity);\n          },\n          Error,\n          `lookupRate: window parameter must be either: 1, 10, or 60`,\n        );\n      }\n    });\n    routes.set('/rate-counter/lookupRate/window-parameter-NaN', () => {\n      if (!isRunningLocally()) {\n        assertThrows(\n          () => {\n            let rc = new RateCounter(RATE_COUNTER_NAME);\n            rc.lookupRate('entry', NaN);\n          },\n          Error,\n          `lookupRate: window parameter must be either: 1, 10, or 60`,\n        );\n      }\n    });\n    routes.set('/rate-counter/lookupRate/returns-number', () => {\n      let rc = new RateCounter(RATE_COUNTER_NAME);\n      assert(\n        typeof rc.lookupRate('meow', 1),\n        'number',\n        `typeof rc.lookupRate('meow', 1)`,\n      );\n    });\n  }\n\n  // RateCounter lookupCount method\n  // lookupCount(entry: string, duration: [10, 20, 30, 40, 50, 60]): number;\n  {\n    routes.set('/rate-counter/lookupCount/called-as-constructor', () => {\n      assertThrows(() => {\n        new RateCounter.prototype.lookupCount('entry', 1);\n      }, Error);\n    });\n    // Ensure we correctly coerce the parameter to a string as according to\n    // https://tc39.es/ecma262/#sec-tostring\n    routes.set(\n      '/rate-counter/lookupCount/entry-parameter-calls-7.1.17-ToString',\n      () => {\n        let sentinel;\n        const test = () => {\n          sentinel = Symbol('sentinel');\n          const entry = {\n            toString() {\n              throw sentinel;\n            },\n          };\n          let rc = new RateCounter(RATE_COUNTER_NAME);\n          rc.lookupCount(entry, 1);\n        };\n        assertThrows(test);\n        try {\n          test();\n        } catch (thrownError) {\n          console.log({ thrownError });\n          assert(thrownError, sentinel, 'thrownError === sentinel');\n        }\n        assertThrows(\n          () => {\n            let rc = new RateCounter(RATE_COUNTER_NAME);\n            rc.lookupCount(Symbol(), 1);\n          },\n          Error,\n          `can't convert symbol to string`,\n        );\n      },\n    );\n    routes.set('/rate-counter/lookupCount/entry-parameter-not-supplied', () => {\n      if (!isRunningLocally()) {\n        assertThrows(\n          () => {\n            let rc = new RateCounter(RATE_COUNTER_NAME);\n            rc.lookupCount();\n          },\n          Error,\n          `lookupCount: At least 2 arguments required, but only 0 passed`,\n        );\n      }\n    });\n    routes.set(\n      '/rate-counter/lookupCount/duration-parameter-not-supplied',\n      () => {\n        if (!isRunningLocally()) {\n          assertThrows(\n            () => {\n              let rc = new RateCounter(RATE_COUNTER_NAME);\n              rc.lookupCount('entry');\n            },\n            Error,\n            `lookupCount: At least 2 arguments required, but only 1 passed`,\n          );\n        }\n      },\n    );\n    routes.set('/rate-counter/lookupCount/duration-parameter-negative', () => {\n      if (!isRunningLocally()) {\n        assertThrows(\n          () => {\n            let rc = new RateCounter(RATE_COUNTER_NAME);\n            rc.lookupCount('entry', -1);\n          },\n          Error,\n          `lookupCount: duration parameter must be either: 10, 20, 30, 40, 50, or 60`,\n        );\n      }\n    });\n    routes.set('/rate-counter/lookupCount/duration-parameter-infinity', () => {\n      if (!isRunningLocally()) {\n        assertThrows(\n          () => {\n            let rc = new RateCounter(RATE_COUNTER_NAME);\n            rc.lookupCount('entry', Infinity);\n          },\n          Error,\n          `lookupCount: duration parameter must be either: 10, 20, 30, 40, 50, or 60`,\n        );\n      }\n    });\n    routes.set('/rate-counter/lookupCount/duration-parameter-NaN', () => {\n      if (!isRunningLocally()) {\n        assertThrows(\n          () => {\n            let rc = new RateCounter(RATE_COUNTER_NAME);\n            rc.lookupCount('entry', NaN);\n          },\n          Error,\n          `lookupCount: duration parameter must be either: 10, 20, 30, 40, 50, or 60`,\n        );\n      }\n    });\n    routes.set('/rate-counter/lookupCount/returns-number', () => {\n      let rc = new RateCounter(RATE_COUNTER_NAME);\n      assert(\n        typeof rc.lookupCount('meow', 10),\n        'number',\n        `typeof rc.lookupCount('meow', 1)`,\n      );\n    });\n  }\n}\n\n// PenaltyBox\n{\n  routes.set('/penalty-box/interface', () => {\n    let actual = Reflect.ownKeys(PenaltyBox);\n    let expected = ['prototype', 'length', 'name'];\n    assert(actual, expected, `Reflect.ownKeys(PenaltyBox)`);\n\n    // Check the prototype descriptors are correct\n    {\n      actual = Reflect.getOwnPropertyDescriptor(PenaltyBox, 'prototype');\n      expected = {\n        value: PenaltyBox.prototype,\n        writable: false,\n        enumerable: false,\n        configurable: false,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(PenaltyBox, 'prototype')`,\n      );\n    }\n\n    // Check the constructor function's defined parameter length is correct\n    {\n      actual = Reflect.getOwnPropertyDescriptor(PenaltyBox, 'length');\n      expected = {\n        value: 0,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(PenaltyBox, 'length')`,\n      );\n    }\n\n    // Check the constructor function's name is correct\n    {\n      actual = Reflect.getOwnPropertyDescriptor(PenaltyBox, 'name');\n      expected = {\n        value: 'PenaltyBox',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(PenaltyBox, 'name')`,\n      );\n    }\n\n    // Check the prototype has the correct keys\n    {\n      actual = Reflect.ownKeys(PenaltyBox.prototype);\n      expected = ['constructor', 'add', 'has', Symbol.toStringTag];\n      assert(actual, expected, `Reflect.ownKeys(PenaltyBox.prototype)`);\n    }\n\n    // Check the constructor on the prototype is correct\n    {\n      actual = Reflect.getOwnPropertyDescriptor(\n        PenaltyBox.prototype,\n        'constructor',\n      );\n      expected = {\n        writable: true,\n        enumerable: false,\n        configurable: true,\n        value: PenaltyBox.prototype.constructor,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(PenaltyBox.prototype, 'constructor')`,\n      );\n\n      assert(\n        typeof PenaltyBox.prototype.constructor,\n        'function',\n        `typeof PenaltyBox.prototype.constructor`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        PenaltyBox.prototype.constructor,\n        'length',\n      );\n      expected = {\n        value: 0,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(PenaltyBox.prototype.constructor, 'length')`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        PenaltyBox.prototype.constructor,\n        'name',\n      );\n      expected = {\n        value: 'PenaltyBox',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(PenaltyBox.prototype.constructor, 'name')`,\n      );\n    }\n\n    // Check the Symbol.toStringTag on the prototype is correct\n    {\n      actual = Reflect.getOwnPropertyDescriptor(\n        PenaltyBox.prototype,\n        Symbol.toStringTag,\n      );\n      expected = {\n        writable: false,\n        enumerable: false,\n        configurable: true,\n        value: 'PenaltyBox',\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(PenaltyBox.prototype, [Symbol.toStringTag])`,\n      );\n\n      assert(\n        typeof PenaltyBox.prototype[Symbol.toStringTag],\n        'string',\n        `typeof PenaltyBox.prototype[Symbol.toStringTag]`,\n      );\n    }\n\n    // Check the add method has correct descriptors, length and name\n    {\n      actual = Reflect.getOwnPropertyDescriptor(PenaltyBox.prototype, 'add');\n      expected = {\n        writable: true,\n        enumerable: true,\n        configurable: true,\n        value: PenaltyBox.prototype.add,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(PenaltyBox.prototype, 'add')`,\n      );\n\n      assert(\n        typeof PenaltyBox.prototype.add,\n        'function',\n        `typeof PenaltyBox.prototype.add`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        PenaltyBox.prototype.add,\n        'length',\n      );\n      expected = {\n        value: 2,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(PenaltyBox.prototype.add, 'length')`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        PenaltyBox.prototype.add,\n        'name',\n      );\n      expected = {\n        value: 'add',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(PenaltyBox.prototype.add, 'name')`,\n      );\n    }\n\n    // Check the has method has correct descriptors, length and name\n    {\n      actual = Reflect.getOwnPropertyDescriptor(PenaltyBox.prototype, 'has');\n      expected = {\n        writable: true,\n        enumerable: true,\n        configurable: true,\n        value: PenaltyBox.prototype.has,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(PenaltyBox.prototype, 'has')`,\n      );\n\n      assert(\n        typeof PenaltyBox.prototype.has,\n        'function',\n        `typeof PenaltyBox.prototype.has`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        PenaltyBox.prototype.has,\n        'length',\n      );\n      expected = {\n        value: 1,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(PenaltyBox.prototype.has, 'length')`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        PenaltyBox.prototype.has,\n        'name',\n      );\n      expected = {\n        value: 'has',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(PenaltyBox.prototype.has, 'name')`,\n      );\n    }\n  });\n\n  // PenaltyBox constructor\n  {\n    routes.set('/penalty-box/constructor/called-as-regular-function', () => {\n      assertThrows(\n        () => {\n          PenaltyBox();\n        },\n        Error,\n        `calling a builtin PenaltyBox constructor without new is forbidden`,\n      );\n    });\n    routes.set(\n      '/penalty-box/constructor/called-as-constructor-no-arguments',\n      () => {\n        assertThrows(\n          () => new PenaltyBox(),\n          Error,\n          `PenaltyBox constructor: At least 1 argument required, but only 0 passed`,\n        );\n      },\n    );\n    // Ensure we correctly coerce the parameter to a string as according to\n    // https://tc39.es/ecma262/#sec-tostring\n    routes.set(\n      '/penalty-box/constructor/name-parameter-calls-7.1.17-ToString',\n      () => {\n        if (!isRunningLocally()) {\n          let sentinel;\n          const test = () => {\n            sentinel = Symbol('sentinel');\n            const name = {\n              toString() {\n                throw sentinel;\n              },\n            };\n            new PenaltyBox(name);\n          };\n          assertThrows(test);\n          try {\n            test();\n          } catch (thrownError) {\n            assert(thrownError, sentinel, 'thrownError === sentinel');\n          }\n          assertThrows(\n            () => {\n              new PenaltyBox(Symbol());\n            },\n            Error,\n            `can't convert symbol to string`,\n          );\n        }\n      },\n    );\n    routes.set('/penalty-box/constructor/happy-path', () => {\n      assert(\n        new PenaltyBox(RATE_COUNTER_NAME) instanceof PenaltyBox,\n        true,\n        `new PenaltyBox(\"rc\") instanceof PenaltyBox`,\n      );\n    });\n  }\n\n  // PenaltyBox has method\n  // has(entry: string): boolean;\n  {\n    routes.set('/penalty-box/has/called-as-constructor', () => {\n      assertThrows(() => {\n        new PenaltyBox.prototype.has('entry');\n      }, Error);\n    });\n    // Ensure we correctly coerce the parameter to a string as according to\n    // https://tc39.es/ecma262/#sec-tostring\n    routes.set('/penalty-box/has/entry-parameter-calls-7.1.17-ToString', () => {\n      let sentinel;\n      const test = () => {\n        sentinel = Symbol('sentinel');\n        const entry = {\n          toString() {\n            throw sentinel;\n          },\n        };\n        let pb = new PenaltyBox(PENALTY_BOX_NAME);\n        pb.has(entry);\n      };\n      assertThrows(test);\n      try {\n        test();\n      } catch (thrownError) {\n        console.log({ thrownError });\n        assert(thrownError, sentinel, 'thrownError === sentinel');\n      }\n      assertThrows(\n        () => {\n          let pb = new PenaltyBox(PENALTY_BOX_NAME);\n          pb.has(Symbol());\n        },\n        Error,\n        `can't convert symbol to string`,\n      );\n    });\n    routes.set('/penalty-box/has/entry-parameter-not-supplied', () => {\n      assertThrows(\n        () => {\n          let pb = new PenaltyBox(PENALTY_BOX_NAME);\n          pb.has();\n        },\n        Error,\n        `has: At least 1 argument required, but only 0 passed`,\n      );\n    });\n    routes.set('/penalty-box/has/returns-boolean', () => {\n      let pb = new PenaltyBox(`pb-`);\n      assert(pb.has('meow'), false, \"pb.has('meow')\");\n    });\n  }\n\n  // PenaltyBox add method\n  // add(entry: string, timeToLive: number): void;\n  {\n    routes.set('/penalty-box/add/called-as-constructor', () => {\n      assertThrows(() => {\n        new PenaltyBox.prototype.add('entry', 1);\n      }, Error);\n    });\n    // Ensure we correctly coepbe the parameter to a string as according to\n    // https://tc39.es/ecma262/#sec-tostring\n    routes.set('/penalty-box/add/entry-parameter-calls-7.1.17-ToString', () => {\n      let sentinel;\n      const test = () => {\n        sentinel = Symbol('sentinel');\n        const entry = {\n          toString() {\n            throw sentinel;\n          },\n        };\n        let pb = new PenaltyBox(PENALTY_BOX_NAME);\n        pb.add(entry, 1);\n      };\n      assertThrows(test);\n      try {\n        test();\n      } catch (thrownError) {\n        console.log({ thrownError });\n        assert(thrownError, sentinel, 'thrownError === sentinel');\n      }\n      assertThrows(\n        () => {\n          let pb = new PenaltyBox(PENALTY_BOX_NAME);\n          pb.add(Symbol(), 1);\n        },\n        Error,\n        `can't convert symbol to string`,\n      );\n    });\n    routes.set('/penalty-box/add/entry-parameter-not-supplied', () => {\n      assertThrows(\n        () => {\n          let pb = new PenaltyBox(PENALTY_BOX_NAME);\n          pb.add();\n        },\n        Error,\n        `add: At least 2 arguments required, but only 0 passed`,\n      );\n    });\n    routes.set('/penalty-box/add/timeToLive-parameter-not-supplied', () => {\n      assertThrows(\n        () => {\n          let pb = new PenaltyBox(PENALTY_BOX_NAME);\n          pb.add('entry');\n        },\n        Error,\n        `add: At least 2 arguments required, but only 1 passed`,\n      );\n    });\n    routes.set('/penalty-box/add/timeToLive-parameter-negative', () => {\n      assertThrows(\n        () => {\n          let pb = new PenaltyBox(PENALTY_BOX_NAME);\n          pb.add('entry', -1);\n        },\n        Error,\n        `add: timeToLive parameter is an invalid value, only numbers from 1 to 60 can be used for timeToLive values.`,\n      );\n    });\n    routes.set('/penalty-box/add/timeToLive-parameter-infinity', () => {\n      assertThrows(\n        () => {\n          let pb = new PenaltyBox(PENALTY_BOX_NAME);\n          pb.add('entry', Infinity);\n        },\n        Error,\n        `add: timeToLive parameter is an invalid value, only numbers from 1 to 60 can be used for timeToLive values.`,\n      );\n    });\n    routes.set('/penalty-box/add/timeToLive-parameter-NaN', () => {\n      assertThrows(\n        () => {\n          let pb = new PenaltyBox(PENALTY_BOX_NAME);\n          pb.add('entry', NaN);\n        },\n        Error,\n        `add: timeToLive parameter is an invalid value, only numbers from 1 to 60 can be used for timeToLive values.`,\n      );\n    });\n    routes.set('/penalty-box/add/returns-undefined', () => {\n      let pb = new PenaltyBox(PENALTY_BOX_NAME);\n      assert(pb.add('meow', 1), undefined, `pb.add('meow', 1)`);\n    });\n  }\n}\n\n// EdgeRateLimiter\n{\n  routes.set('/edge-rate-limiter/interface', () => {\n    let actual = Reflect.ownKeys(EdgeRateLimiter);\n    let expected = ['prototype', 'length', 'name'];\n    assert(actual, expected, `Reflect.ownKeys(EdgeRateLimiter)`);\n\n    // Check the prototype descriptors are correct\n    {\n      actual = Reflect.getOwnPropertyDescriptor(EdgeRateLimiter, 'prototype');\n      expected = {\n        value: EdgeRateLimiter.prototype,\n        writable: false,\n        enumerable: false,\n        configurable: false,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(EdgeRateLimiter, 'prototype')`,\n      );\n    }\n\n    // Check the constructor function's defined parameter length is correct\n    {\n      actual = Reflect.getOwnPropertyDescriptor(EdgeRateLimiter, 'length');\n      expected = {\n        value: 0,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(EdgeRateLimiter, 'length')`,\n      );\n    }\n\n    // Check the constructor function's name is correct\n    {\n      actual = Reflect.getOwnPropertyDescriptor(EdgeRateLimiter, 'name');\n      expected = {\n        value: 'EdgeRateLimiter',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(EdgeRateLimiter, 'name')`,\n      );\n    }\n\n    // Check the prototype has the correct keys\n    {\n      actual = Reflect.ownKeys(EdgeRateLimiter.prototype);\n      expected = ['constructor', 'checkRate', Symbol.toStringTag];\n      assert(actual, expected, `Reflect.ownKeys(EdgeRateLimiter.prototype)`);\n    }\n\n    // Check the constructor on the prototype is correct\n    {\n      actual = Reflect.getOwnPropertyDescriptor(\n        EdgeRateLimiter.prototype,\n        'constructor',\n      );\n      expected = {\n        writable: true,\n        enumerable: false,\n        configurable: true,\n        value: EdgeRateLimiter.prototype.constructor,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(EdgeRateLimiter.prototype, 'constructor')`,\n      );\n\n      assert(\n        typeof EdgeRateLimiter.prototype.constructor,\n        'function',\n        `typeof EdgeRateLimiter.prototype.constructor`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        EdgeRateLimiter.prototype.constructor,\n        'length',\n      );\n      expected = {\n        value: 0,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(EdgeRateLimiter.prototype.constructor, 'length')`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        EdgeRateLimiter.prototype.constructor,\n        'name',\n      );\n      expected = {\n        value: 'EdgeRateLimiter',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(EdgeRateLimiter.prototype.constructor, 'name')`,\n      );\n    }\n\n    // Check the Symbol.toStringTag on the prototype is correct\n    {\n      actual = Reflect.getOwnPropertyDescriptor(\n        EdgeRateLimiter.prototype,\n        Symbol.toStringTag,\n      );\n      expected = {\n        writable: false,\n        enumerable: false,\n        configurable: true,\n        value: 'EdgeRateLimiter',\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(EdgeRateLimiter.prototype, [Symbol.toStringTag])`,\n      );\n\n      assert(\n        typeof EdgeRateLimiter.prototype[Symbol.toStringTag],\n        'string',\n        `typeof EdgeRateLimiter.prototype[Symbol.toStringTag]`,\n      );\n    }\n\n    // Check the checkRate method has correct descriptors, length and name\n    {\n      actual = Reflect.getOwnPropertyDescriptor(\n        EdgeRateLimiter.prototype,\n        'checkRate',\n      );\n      expected = {\n        writable: true,\n        enumerable: true,\n        configurable: true,\n        value: EdgeRateLimiter.prototype.checkRate,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(EdgeRateLimiter.prototype, 'checkRate')`,\n      );\n\n      assert(\n        typeof EdgeRateLimiter.prototype.checkRate,\n        'function',\n        `typeof EdgeRateLimiter.prototype.checkRate`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        EdgeRateLimiter.prototype.checkRate,\n        'length',\n      );\n      expected = {\n        value: 5,\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(EdgeRateLimiter.prototype.checkRate, 'length')`,\n      );\n\n      actual = Reflect.getOwnPropertyDescriptor(\n        EdgeRateLimiter.prototype.checkRate,\n        'name',\n      );\n      expected = {\n        value: 'checkRate',\n        writable: false,\n        enumerable: false,\n        configurable: true,\n      };\n      assert(\n        actual,\n        expected,\n        `Reflect.getOwnPropertyDescriptor(EdgeRateLimiter.prototype.checkRate, 'name')`,\n      );\n    }\n  });\n\n  // EdgeRateLimiter constructor\n  {\n    routes.set(\n      '/edge-rate-limiter/constructor/called-as-regular-function',\n      () => {\n        assertThrows(\n          () => {\n            EdgeRateLimiter();\n          },\n          Error,\n          `calling a builtin EdgeRateLimiter constructor without new is forbidden`,\n        );\n      },\n    );\n    routes.set(\n      '/edge-rate-limiter/constructor/called-as-constructor-no-arguments',\n      () => {\n        assertThrows(\n          () => new EdgeRateLimiter(),\n          Error,\n          `EdgeRateLimiter constructor: At least 2 arguments required, but only 0 passed`,\n        );\n      },\n    );\n    // Ensure we correctly coerce the parameter to a string as according to\n    // https://tc39.es/ecma262/#sec-tostring\n    routes.set(\n      '/edge-rate-limiter/constructor/rate-counter-not-instance-of-rateCounter',\n      () => {\n        assertThrows(\n          () => {\n            new EdgeRateLimiter(true, true);\n          },\n          Error,\n          `EdgeRateLimiter constructor: rateCounter parameter must be an instance of RateCounter`,\n        );\n      },\n    );\n    routes.set(\n      '/edge-rate-limiter/constructor/penalty-box-not-instance-of-penaltyBox',\n      () => {\n        assertThrows(\n          () => {\n            new EdgeRateLimiter(new RateCounter(RATE_COUNTER_NAME), true);\n          },\n          Error,\n          `EdgeRateLimiter constructor: penaltyBox parameter must be an instance of PenaltyBox`,\n        );\n      },\n    );\n    routes.set('/edge-rate-limiter/constructor/happy-path', () => {\n      assert(\n        new EdgeRateLimiter(\n          new RateCounter(RATE_COUNTER_NAME),\n          new PenaltyBox(PENALTY_BOX_NAME),\n        ) instanceof EdgeRateLimiter,\n        true,\n        `new EdgeRateLimiter(new RateCounter(\"rc\"), new PenaltyBox(PENALTY_BOX_NAME)) instanceof EdgeRateLimiter`,\n      );\n    });\n  }\n\n  // EdgeRateLimiter checkRate method\n  // checkRate(entry: string, delta: number, window: [1, 10, 60], limit: number, timeToLive: number): boolean;\n  {\n    routes.set('/edge-rate-limiter/checkRate/called-as-constructor', () => {\n      assertThrows(() => {\n        new EdgeRateLimiter.prototype.checkRate('entry');\n      }, Error);\n    });\n    // Ensure we correctly coerce the parameter to a string as according to\n    // https://tc39.es/ecma262/#sec-tostring\n    routes.set(\n      '/edge-rate-limiter/checkRate/entry-parameter-calls-7.1.17-ToString',\n      () => {\n        let sentinel;\n        const test = () => {\n          sentinel = Symbol('sentinel');\n          const entry = {\n            toString() {\n              throw sentinel;\n            },\n          };\n          let rc = new RateCounter(RATE_COUNTER_NAME);\n          let pb = new PenaltyBox(PENALTY_BOX_NAME);\n          let erl = new EdgeRateLimiter(rc, pb);\n          erl.checkRate(entry, 1, 1, 1, 1);\n        };\n        assertThrows(test);\n        try {\n          test();\n        } catch (thrownError) {\n          console.log({ thrownError });\n          assert(thrownError, sentinel, 'thrownError === sentinel');\n        }\n        assertThrows(\n          () => {\n            let rc = new RateCounter(RATE_COUNTER_NAME);\n            let pb = new PenaltyBox(PENALTY_BOX_NAME);\n            let erl = new EdgeRateLimiter(rc, pb);\n            erl.checkRate(Symbol(), 1, 1, 1, 1);\n          },\n          Error,\n          `can't convert symbol to string`,\n        );\n      },\n    );\n    routes.set(\n      '/edge-rate-limiter/checkRate/entry-parameter-not-supplied',\n      () => {\n        assertThrows(\n          () => {\n            let rc = new RateCounter(RATE_COUNTER_NAME);\n            let pb = new PenaltyBox(PENALTY_BOX_NAME);\n            let erl = new EdgeRateLimiter(rc, pb);\n            erl.checkRate();\n          },\n          Error,\n          `checkRate: At least 5 arguments required, but only 0 passed`,\n        );\n      },\n    );\n    routes.set('/edge-rate-limiter/checkRate/delta-parameter-negative', () => {\n      assertThrows(\n        () => {\n          let rc = new RateCounter(RATE_COUNTER_NAME);\n          let pb = new PenaltyBox(PENALTY_BOX_NAME);\n          let erl = new EdgeRateLimiter(rc, pb);\n          erl.checkRate('entry', -1, 1, 1, 1);\n        },\n        Error,\n        `checkRate: delta parameter is an invalid value, only positive numbers can be used for delta values.`,\n      );\n    });\n    routes.set('/edge-rate-limiter/checkRate/delta-parameter-infinity', () => {\n      assertThrows(\n        () => {\n          let rc = new RateCounter(RATE_COUNTER_NAME);\n          let pb = new PenaltyBox(PENALTY_BOX_NAME);\n          let erl = new EdgeRateLimiter(rc, pb);\n          erl.checkRate('entry', Infinity, 1, 1, 1);\n        },\n        Error,\n        `checkRate: delta parameter is an invalid value, only positive numbers can be used for delta values.`,\n      );\n    });\n    routes.set('/edge-rate-limiter/checkRate/delta-parameter-NaN', () => {\n      assertThrows(\n        () => {\n          let rc = new RateCounter(RATE_COUNTER_NAME);\n          let pb = new PenaltyBox(PENALTY_BOX_NAME);\n          let erl = new EdgeRateLimiter(rc, pb);\n          erl.checkRate('entry', NaN, 1, 1, 1);\n        },\n        Error,\n        `checkRate: delta parameter is an invalid value, only positive numbers can be used for delta values.`,\n      );\n    });\n    routes.set('/edge-rate-limiter/checkRate/window-parameter-negative', () => {\n      assertThrows(\n        () => {\n          let rc = new RateCounter(RATE_COUNTER_NAME);\n          let pb = new PenaltyBox(PENALTY_BOX_NAME);\n          let erl = new EdgeRateLimiter(rc, pb);\n          erl.checkRate('entry', 1, -1, 1, 1);\n        },\n        Error,\n        `checkRate: window parameter must be either: 1, 10, or 60`,\n      );\n    });\n    routes.set('/edge-rate-limiter/checkRate/window-parameter-infinity', () => {\n      assertThrows(\n        () => {\n          let rc = new RateCounter(RATE_COUNTER_NAME);\n          let pb = new PenaltyBox(PENALTY_BOX_NAME);\n          let erl = new EdgeRateLimiter(rc, pb);\n          erl.checkRate('entry', 1, Infinity, 1, 1);\n        },\n        Error,\n        `checkRate: window parameter must be either: 1, 10, or 60`,\n      );\n    });\n    routes.set('/edge-rate-limiter/checkRate/window-parameter-NaN', () => {\n      assertThrows(\n        () => {\n          let rc = new RateCounter(RATE_COUNTER_NAME);\n          let pb = new PenaltyBox(PENALTY_BOX_NAME);\n          let erl = new EdgeRateLimiter(rc, pb);\n          erl.checkRate('entry', 1, NaN, 1, 1);\n        },\n        Error,\n        `checkRate: window parameter must be either: 1, 10, or 60`,\n      );\n    });\n    routes.set('/edge-rate-limiter/checkRate/limit-parameter-negative', () => {\n      assertThrows(\n        () => {\n          let rc = new RateCounter(RATE_COUNTER_NAME);\n          let pb = new PenaltyBox(PENALTY_BOX_NAME);\n          let erl = new EdgeRateLimiter(rc, pb);\n          erl.checkRate('entry', 1, 1, -1, 1);\n        },\n        Error,\n        `checkRate: limit parameter is an invalid value, only positive numbers can be used for limit values.`,\n      );\n    });\n    routes.set('/edge-rate-limiter/checkRate/limit-parameter-infinity', () => {\n      assertThrows(\n        () => {\n          let rc = new RateCounter(RATE_COUNTER_NAME);\n          let pb = new PenaltyBox(PENALTY_BOX_NAME);\n          let erl = new EdgeRateLimiter(rc, pb);\n          erl.checkRate('entry', 1, 1, Infinity, 1);\n        },\n        Error,\n        `checkRate: limit parameter is an invalid value, only positive numbers can be used for limit values.`,\n      );\n    });\n    routes.set('/edge-rate-limiter/checkRate/limit-parameter-NaN', () => {\n      assertThrows(\n        () => {\n          let rc = new RateCounter(RATE_COUNTER_NAME);\n          let pb = new PenaltyBox(PENALTY_BOX_NAME);\n          let erl = new EdgeRateLimiter(rc, pb);\n          erl.checkRate('entry', 1, 1, NaN, 1);\n        },\n        Error,\n        `checkRate: limit parameter is an invalid value, only positive numbers can be used for limit values.`,\n      );\n    });\n    routes.set(\n      '/edge-rate-limiter/checkRate/timeToLive-parameter-negative',\n      () => {\n        assertThrows(\n          () => {\n            let rc = new RateCounter(RATE_COUNTER_NAME);\n            let pb = new PenaltyBox(PENALTY_BOX_NAME);\n            let erl = new EdgeRateLimiter(rc, pb);\n            erl.checkRate('entry', 1, 1, 1, -1);\n          },\n          Error,\n          `checkRate: timeToLive parameter is an invalid value, only numbers from 1 to 60 can be used for timeToLive values.`,\n        );\n      },\n    );\n    routes.set(\n      '/edge-rate-limiter/checkRate/timeToLive-parameter-infinity',\n      () => {\n        assertThrows(\n          () => {\n            let rc = new RateCounter(RATE_COUNTER_NAME);\n            let pb = new PenaltyBox(PENALTY_BOX_NAME);\n            let erl = new EdgeRateLimiter(rc, pb);\n            erl.checkRate('entry', 1, 1, 1, Infinity);\n          },\n          Error,\n          `checkRate: timeToLive parameter is an invalid value, only numbers from 1 to 60 can be used for timeToLive values.`,\n        );\n      },\n    );\n    routes.set('/edge-rate-limiter/checkRate/timeToLive-parameter-NaN', () => {\n      assertThrows(\n        () => {\n          let rc = new RateCounter(RATE_COUNTER_NAME);\n          let pb = new PenaltyBox(PENALTY_BOX_NAME);\n          let erl = new EdgeRateLimiter(rc, pb);\n          erl.checkRate('entry', 1, 1, 1, NaN);\n        },\n        Error,\n        `checkRate: timeToLive parameter is an invalid value, only numbers from 1 to 60 can be used for timeToLive values.`,\n      );\n    });\n    routes.set('/edge-rate-limiter/checkRate/returns-boolean', () => {\n      let rc = new RateCounter(RATE_COUNTER_NAME);\n      let pb = new PenaltyBox(PENALTY_BOX_NAME);\n      let erl = new EdgeRateLimiter(rc, pb);\n      assert(\n        erl.checkRate('woof', 1, 10, 100, 5),\n        false,\n        \"erl.checkRate('meow', 1, 10, 100, 5)\",\n      );\n    });\n  }\n}\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/env.js",
    "content": "/* eslint-env serviceworker */\nimport { env } from 'fastly:env';\nimport { routes, isRunningLocally } from './routes.js';\nimport { strictEqual } from './assertions.js';\n\n// hostname didn't exist at initialization, so can still be captured at runtime\nconst wizerHostname = env('FASTLY_HOSTNAME');\nconst wizerLocal = env('LOCAL_TEST');\n\nroutes.set('/env', () => {\n  strictEqual(wizerHostname, undefined);\n\n  if (isRunningLocally()) {\n    strictEqual(\n      env('FASTLY_HOSTNAME'),\n      'localhost',\n      `env(\"FASTLY_HOSTNAME\") === \"localhost\"`,\n    );\n  } else {\n    strictEqual(env('FASTLY_HOSTNAME'), undefined);\n  }\n\n  strictEqual(wizerLocal, 'local val');\n\n  // at runtime these remain captured from Wizer time, even if we didn't call env\n  strictEqual(env('LOCAL_TEST'), 'local val');\n  strictEqual(env('TEST'), 'foo');\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/error.js",
    "content": "import { routes } from './routes.js';\nroutes.set('/error', async () => {\n  throw new Error('uh oh');\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/fanout.js",
    "content": "import { assert, assertDoesNotThrow, assertThrows } from './assertions.js';\nimport { routes } from './routes.js';\nimport { createFanoutHandoff } from 'fastly:fanout';\n\nroutes.set('/createFanoutHandoff', () => {\n  assert(typeof createFanoutHandoff, 'function', 'typeof createFanoutHandoff');\n\n  assert(\n    createFanoutHandoff.name,\n    'createFanoutHandoff',\n    'createFanoutHandoff.name',\n  );\n\n  assert(createFanoutHandoff.length, 2, 'createFanoutHandoff.length');\n\n  assertDoesNotThrow(() => createFanoutHandoff(new Request('.'), 'hello'));\n\n  assertThrows(() => createFanoutHandoff());\n\n  assertThrows(() => createFanoutHandoff(1, ''));\n\n  let result = createFanoutHandoff(new Request('.'), 'hello');\n  assert(result instanceof Response, true, 'result instanceof Response');\n\n  assertThrows(\n    () => new createFanoutHandoff(new Request('.'), 'hello'),\n    TypeError,\n  );\n\n  assertDoesNotThrow(() => {\n    createFanoutHandoff.call(undefined, new Request('.'), '1');\n  });\n\n  // https://tc39.es/ecma262/#sec-tostring\n  let sentinel;\n  const test = () => {\n    sentinel = Symbol();\n    const key = {\n      toString() {\n        throw sentinel;\n      },\n    };\n    createFanoutHandoff(new Request('.'), key);\n  };\n  assertThrows(test);\n  try {\n    test();\n  } catch (thrownError) {\n    assert(thrownError, sentinel, 'thrownError === sentinel');\n  }\n  assertThrows(\n    () => {\n      createFanoutHandoff(new Request('.'), Symbol());\n    },\n    TypeError,\n    `can't convert symbol to string`,\n  );\n\n  assertThrows(\n    () => createFanoutHandoff(new Request('.')),\n    TypeError,\n    `createFanoutHandoff: At least 2 arguments required, but only 1 passed`,\n  );\n\n  assertThrows(\n    () => createFanoutHandoff(new Request('.'), ''),\n    Error,\n    `createFanoutHandoff: Backend parameter can not be an empty string`,\n  );\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/fast-check.js",
    "content": "var __defProp = Object.defineProperty;\nvar __export = (target, all) => {\n  for (var name in all)\n    __defProp(target, name, { get: all[name], enumerable: true });\n};\n\n// ../../../node_modules/fast-check/lib/esm/fast-check-default.js\nvar fast_check_default_exports = {};\n__export(fast_check_default_exports, {\n  Arbitrary: () => Arbitrary,\n  ExecutionStatus: () => ExecutionStatus,\n  PreconditionFailure: () => PreconditionFailure,\n  Random: () => Random,\n  Stream: () => Stream,\n  Value: () => Value,\n  VerbosityLevel: () => VerbosityLevel,\n  __commitHash: () => __commitHash2,\n  __type: () => __type2,\n  __version: () => __version2,\n  anything: () => anything,\n  array: () => array,\n  ascii: () => ascii,\n  asciiString: () => asciiString,\n  assert: () => assert,\n  asyncDefaultReportMessage: () => asyncDefaultReportMessage,\n  asyncModelRun: () => asyncModelRun,\n  asyncProperty: () => asyncProperty,\n  asyncStringify: () => asyncStringify,\n  asyncToStringMethod: () => asyncToStringMethod,\n  base64: () => base64,\n  base64String: () => base64String,\n  bigInt: () => bigInt,\n  bigInt64Array: () => bigInt64Array,\n  bigIntN: () => bigIntN,\n  bigUint: () => bigUint,\n  bigUint64Array: () => bigUint64Array,\n  bigUintN: () => bigUintN,\n  boolean: () => boolean,\n  char: () => char,\n  char16bits: () => char16bits,\n  check: () => check,\n  clone: () => clone,\n  cloneIfNeeded: () => cloneIfNeeded,\n  cloneMethod: () => cloneMethod,\n  commands: () => commands,\n  compareBooleanFunc: () => compareBooleanFunc,\n  compareFunc: () => compareFunc,\n  configureGlobal: () => configureGlobal,\n  constant: () => constant,\n  constantFrom: () => constantFrom,\n  context: () => context,\n  createDepthIdentifier: () => createDepthIdentifier,\n  date: () => date,\n  defaultReportMessage: () => defaultReportMessage,\n  dictionary: () => dictionary,\n  domain: () => domain,\n  double: () => double,\n  emailAddress: () => emailAddress,\n  falsy: () => falsy,\n  float: () => float,\n  float32Array: () => float32Array,\n  float64Array: () => float64Array,\n  fullUnicode: () => fullUnicode,\n  fullUnicodeString: () => fullUnicodeString,\n  func: () => func,\n  gen: () => gen,\n  getDepthContextFor: () => getDepthContextFor,\n  hasAsyncToStringMethod: () => hasAsyncToStringMethod,\n  hasCloneMethod: () => hasCloneMethod,\n  hasToStringMethod: () => hasToStringMethod,\n  hash: () => hash,\n  hexa: () => hexa,\n  hexaString: () => hexaString,\n  infiniteStream: () => infiniteStream,\n  int16Array: () => int16Array,\n  int32Array: () => int32Array,\n  int8Array: () => int8Array,\n  integer: () => integer,\n  ipV4: () => ipV4,\n  ipV4Extended: () => ipV4Extended,\n  ipV6: () => ipV6,\n  json: () => json,\n  jsonValue: () => jsonValue,\n  letrec: () => letrec,\n  lorem: () => lorem,\n  mapToConstant: () => mapToConstant,\n  maxSafeInteger: () => maxSafeInteger,\n  maxSafeNat: () => maxSafeNat,\n  memo: () => memo,\n  mixedCase: () => mixedCase,\n  modelRun: () => modelRun,\n  nat: () => nat,\n  object: () => object,\n  oneof: () => oneof,\n  option: () => option,\n  pre: () => pre,\n  property: () => property,\n  readConfigureGlobal: () => readConfigureGlobal,\n  record: () => record,\n  resetConfigureGlobal: () => resetConfigureGlobal,\n  sample: () => sample,\n  scheduledModelRun: () => scheduledModelRun,\n  scheduler: () => scheduler,\n  schedulerFor: () => schedulerFor,\n  shuffledSubarray: () => shuffledSubarray,\n  sparseArray: () => sparseArray,\n  statistics: () => statistics,\n  stream: () => stream,\n  string: () => string,\n  string16bits: () => string16bits,\n  stringMatching: () => stringMatching,\n  stringOf: () => stringOf,\n  stringify: () => stringify,\n  subarray: () => subarray,\n  toStringMethod: () => toStringMethod,\n  tuple: () => tuple,\n  uint16Array: () => uint16Array,\n  uint32Array: () => uint32Array,\n  uint8Array: () => uint8Array,\n  uint8ClampedArray: () => uint8ClampedArray,\n  ulid: () => ulid,\n  unicode: () => unicode,\n  unicodeJson: () => unicodeJson,\n  unicodeJsonValue: () => unicodeJsonValue,\n  unicodeString: () => unicodeString,\n  uniqueArray: () => uniqueArray,\n  uuid: () => uuid,\n  uuidV: () => uuidV,\n  webAuthority: () => webAuthority,\n  webFragments: () => webFragments,\n  webPath: () => webPath,\n  webQueryParameters: () => webQueryParameters,\n  webSegment: () => webSegment,\n  webUrl: () => webUrl,\n});\n\n// ../../../node_modules/fast-check/lib/esm/check/precondition/PreconditionFailure.js\nvar PreconditionFailure = class _PreconditionFailure extends Error {\n  constructor(interruptExecution = false) {\n    super();\n    this.interruptExecution = interruptExecution;\n    this.footprint = _PreconditionFailure.SharedFootPrint;\n  }\n  static isFailure(err) {\n    return (\n      err != null && err.footprint === _PreconditionFailure.SharedFootPrint\n    );\n  }\n};\nPreconditionFailure.SharedFootPrint = Symbol('fast-check/PreconditionFailure');\n\n// ../../../node_modules/fast-check/lib/esm/check/precondition/Pre.js\nfunction pre(expectTruthy) {\n  if (!expectTruthy) {\n    throw new PreconditionFailure();\n  }\n}\n\n// ../../../node_modules/fast-check/lib/esm/stream/StreamHelpers.js\nvar Nil = class {\n  [Symbol.iterator]() {\n    return this;\n  }\n  next(value) {\n    return { value, done: true };\n  }\n};\nNil.nil = new Nil();\nfunction nilHelper() {\n  return Nil.nil;\n}\nfunction* mapHelper(g, f) {\n  for (const v of g) {\n    yield f(v);\n  }\n}\nfunction* flatMapHelper(g, f) {\n  for (const v of g) {\n    yield* f(v);\n  }\n}\nfunction* filterHelper(g, f) {\n  for (const v of g) {\n    if (f(v)) {\n      yield v;\n    }\n  }\n}\nfunction* takeNHelper(g, n) {\n  for (let i = 0; i < n; ++i) {\n    const cur = g.next();\n    if (cur.done) {\n      break;\n    }\n    yield cur.value;\n  }\n}\nfunction* takeWhileHelper(g, f) {\n  let cur = g.next();\n  while (!cur.done && f(cur.value)) {\n    yield cur.value;\n    cur = g.next();\n  }\n}\nfunction* joinHelper(g, others) {\n  for (let cur = g.next(); !cur.done; cur = g.next()) {\n    yield cur.value;\n  }\n  for (const s of others) {\n    for (let cur = s.next(); !cur.done; cur = s.next()) {\n      yield cur.value;\n    }\n  }\n}\n\n// ../../../node_modules/fast-check/lib/esm/stream/Stream.js\nvar safeSymbolIterator = Symbol.iterator;\nvar Stream = class _Stream {\n  static nil() {\n    return new _Stream(nilHelper());\n  }\n  static of(...elements) {\n    return new _Stream(elements[safeSymbolIterator]());\n  }\n  constructor(g) {\n    this.g = g;\n  }\n  next() {\n    return this.g.next();\n  }\n  [safeSymbolIterator]() {\n    return this.g;\n  }\n  map(f) {\n    return new _Stream(mapHelper(this.g, f));\n  }\n  flatMap(f) {\n    return new _Stream(flatMapHelper(this.g, f));\n  }\n  dropWhile(f) {\n    let foundEligible = false;\n    function* helper(v) {\n      if (foundEligible || !f(v)) {\n        foundEligible = true;\n        yield v;\n      }\n    }\n    return this.flatMap(helper);\n  }\n  drop(n) {\n    if (n <= 0) {\n      return this;\n    }\n    let idx = 0;\n    function helper() {\n      return idx++ < n;\n    }\n    return this.dropWhile(helper);\n  }\n  takeWhile(f) {\n    return new _Stream(takeWhileHelper(this.g, f));\n  }\n  take(n) {\n    return new _Stream(takeNHelper(this.g, n));\n  }\n  filter(f) {\n    return new _Stream(filterHelper(this.g, f));\n  }\n  every(f) {\n    for (const v of this.g) {\n      if (!f(v)) {\n        return false;\n      }\n    }\n    return true;\n  }\n  has(f) {\n    for (const v of this.g) {\n      if (f(v)) {\n        return [true, v];\n      }\n    }\n    return [false, null];\n  }\n  join(...others) {\n    return new _Stream(joinHelper(this.g, others));\n  }\n  getNthOrLast(nth) {\n    let remaining = nth;\n    let last = null;\n    for (const v of this.g) {\n      if (remaining-- === 0) return v;\n      last = v;\n    }\n    return last;\n  }\n};\nfunction stream(g) {\n  return new Stream(g);\n}\n\n// ../../../node_modules/fast-check/lib/esm/check/symbols.js\nvar cloneMethod = Symbol('fast-check/cloneMethod');\nfunction hasCloneMethod(instance) {\n  return (\n    instance !== null &&\n    (typeof instance === 'object' || typeof instance === 'function') &&\n    cloneMethod in instance &&\n    typeof instance[cloneMethod] === 'function'\n  );\n}\nfunction cloneIfNeeded(instance) {\n  return hasCloneMethod(instance) ? instance[cloneMethod]() : instance;\n}\n\n// ../../../node_modules/fast-check/lib/esm/check/arbitrary/definition/Value.js\nvar safeObjectDefineProperty = Object.defineProperty;\nvar Value = class {\n  constructor(value_, context2, customGetValue = void 0) {\n    this.value_ = value_;\n    this.context = context2;\n    this.hasToBeCloned = customGetValue !== void 0 || hasCloneMethod(value_);\n    this.readOnce = false;\n    if (this.hasToBeCloned) {\n      safeObjectDefineProperty(this, 'value', {\n        get: customGetValue !== void 0 ? customGetValue : this.getValue,\n      });\n    } else {\n      this.value = value_;\n    }\n  }\n  getValue() {\n    if (this.hasToBeCloned) {\n      if (!this.readOnce) {\n        this.readOnce = true;\n        return this.value_;\n      }\n      return this.value_[cloneMethod]();\n    }\n    return this.value_;\n  }\n};\n\n// ../../../node_modules/fast-check/lib/esm/check/arbitrary/definition/Arbitrary.js\nvar safeObjectAssign = Object.assign;\nvar Arbitrary = class {\n  filter(refinement) {\n    return new FilterArbitrary(this, refinement);\n  }\n  map(mapper, unmapper) {\n    return new MapArbitrary(this, mapper, unmapper);\n  }\n  chain(chainer) {\n    return new ChainArbitrary(this, chainer);\n  }\n  noShrink() {\n    return new NoShrinkArbitrary(this);\n  }\n  noBias() {\n    return new NoBiasArbitrary(this);\n  }\n};\nvar ChainArbitrary = class extends Arbitrary {\n  constructor(arb, chainer) {\n    super();\n    this.arb = arb;\n    this.chainer = chainer;\n  }\n  generate(mrng, biasFactor) {\n    const clonedMrng = mrng.clone();\n    const src = this.arb.generate(mrng, biasFactor);\n    return this.valueChainer(src, mrng, clonedMrng, biasFactor);\n  }\n  canShrinkWithoutContext(value) {\n    return false;\n  }\n  shrink(value, context2) {\n    if (this.isSafeContext(context2)) {\n      return (\n        !context2.stoppedForOriginal\n          ? this.arb\n              .shrink(context2.originalValue, context2.originalContext)\n              .map((v) =>\n                this.valueChainer(\n                  v,\n                  context2.clonedMrng.clone(),\n                  context2.clonedMrng,\n                  context2.originalBias,\n                ),\n              )\n          : Stream.nil()\n      ).join(\n        context2.chainedArbitrary\n          .shrink(value, context2.chainedContext)\n          .map((dst) => {\n            const newContext = safeObjectAssign(\n              safeObjectAssign({}, context2),\n              {\n                chainedContext: dst.context,\n                stoppedForOriginal: true,\n              },\n            );\n            return new Value(dst.value_, newContext);\n          }),\n      );\n    }\n    return Stream.nil();\n  }\n  valueChainer(v, generateMrng, clonedMrng, biasFactor) {\n    const chainedArbitrary = this.chainer(v.value_);\n    const dst = chainedArbitrary.generate(generateMrng, biasFactor);\n    const context2 = {\n      originalBias: biasFactor,\n      originalValue: v.value_,\n      originalContext: v.context,\n      stoppedForOriginal: false,\n      chainedArbitrary,\n      chainedContext: dst.context,\n      clonedMrng,\n    };\n    return new Value(dst.value_, context2);\n  }\n  isSafeContext(context2) {\n    return (\n      context2 != null &&\n      typeof context2 === 'object' &&\n      'originalBias' in context2 &&\n      'originalValue' in context2 &&\n      'originalContext' in context2 &&\n      'stoppedForOriginal' in context2 &&\n      'chainedArbitrary' in context2 &&\n      'chainedContext' in context2 &&\n      'clonedMrng' in context2\n    );\n  }\n};\nvar MapArbitrary = class extends Arbitrary {\n  constructor(arb, mapper, unmapper) {\n    super();\n    this.arb = arb;\n    this.mapper = mapper;\n    this.unmapper = unmapper;\n    this.bindValueMapper = (v) => this.valueMapper(v);\n  }\n  generate(mrng, biasFactor) {\n    const g = this.arb.generate(mrng, biasFactor);\n    return this.valueMapper(g);\n  }\n  canShrinkWithoutContext(value) {\n    if (this.unmapper !== void 0) {\n      try {\n        const unmapped = this.unmapper(value);\n        return this.arb.canShrinkWithoutContext(unmapped);\n      } catch (_err) {\n        return false;\n      }\n    }\n    return false;\n  }\n  shrink(value, context2) {\n    if (this.isSafeContext(context2)) {\n      return this.arb\n        .shrink(context2.originalValue, context2.originalContext)\n        .map(this.bindValueMapper);\n    }\n    if (this.unmapper !== void 0) {\n      const unmapped = this.unmapper(value);\n      return this.arb.shrink(unmapped, void 0).map(this.bindValueMapper);\n    }\n    return Stream.nil();\n  }\n  mapperWithCloneIfNeeded(v) {\n    const sourceValue = v.value;\n    const mappedValue = this.mapper(sourceValue);\n    if (\n      v.hasToBeCloned &&\n      ((typeof mappedValue === 'object' && mappedValue !== null) ||\n        typeof mappedValue === 'function') &&\n      Object.isExtensible(mappedValue) &&\n      !hasCloneMethod(mappedValue)\n    ) {\n      Object.defineProperty(mappedValue, cloneMethod, {\n        get: () => () => this.mapperWithCloneIfNeeded(v)[0],\n      });\n    }\n    return [mappedValue, sourceValue];\n  }\n  valueMapper(v) {\n    const [mappedValue, sourceValue] = this.mapperWithCloneIfNeeded(v);\n    const context2 = { originalValue: sourceValue, originalContext: v.context };\n    return new Value(mappedValue, context2);\n  }\n  isSafeContext(context2) {\n    return (\n      context2 != null &&\n      typeof context2 === 'object' &&\n      'originalValue' in context2 &&\n      'originalContext' in context2\n    );\n  }\n};\nvar FilterArbitrary = class extends Arbitrary {\n  constructor(arb, refinement) {\n    super();\n    this.arb = arb;\n    this.refinement = refinement;\n    this.bindRefinementOnValue = (v) => this.refinementOnValue(v);\n  }\n  generate(mrng, biasFactor) {\n    while (true) {\n      const g = this.arb.generate(mrng, biasFactor);\n      if (this.refinementOnValue(g)) {\n        return g;\n      }\n    }\n  }\n  canShrinkWithoutContext(value) {\n    return this.arb.canShrinkWithoutContext(value) && this.refinement(value);\n  }\n  shrink(value, context2) {\n    return this.arb.shrink(value, context2).filter(this.bindRefinementOnValue);\n  }\n  refinementOnValue(v) {\n    return this.refinement(v.value);\n  }\n};\nvar NoShrinkArbitrary = class extends Arbitrary {\n  constructor(arb) {\n    super();\n    this.arb = arb;\n  }\n  generate(mrng, biasFactor) {\n    return this.arb.generate(mrng, biasFactor);\n  }\n  canShrinkWithoutContext(value) {\n    return this.arb.canShrinkWithoutContext(value);\n  }\n  shrink(_value, _context) {\n    return Stream.nil();\n  }\n  noShrink() {\n    return this;\n  }\n};\nvar NoBiasArbitrary = class extends Arbitrary {\n  constructor(arb) {\n    super();\n    this.arb = arb;\n  }\n  generate(mrng, _biasFactor) {\n    return this.arb.generate(mrng, void 0);\n  }\n  canShrinkWithoutContext(value) {\n    return this.arb.canShrinkWithoutContext(value);\n  }\n  shrink(value, context2) {\n    return this.arb.shrink(value, context2);\n  }\n  noBias() {\n    return this;\n  }\n};\nfunction isArbitrary(instance) {\n  return (\n    typeof instance === 'object' &&\n    instance !== null &&\n    'generate' in instance &&\n    'shrink' in instance &&\n    'canShrinkWithoutContext' in instance\n  );\n}\nfunction assertIsArbitrary(instance) {\n  if (!isArbitrary(instance)) {\n    throw new Error('Unexpected value received: not an instance of Arbitrary');\n  }\n}\n\n// ../../../node_modules/fast-check/lib/esm/utils/apply.js\nvar untouchedApply = Function.prototype.apply;\nvar ApplySymbol = Symbol('apply');\nfunction safeExtractApply(f) {\n  try {\n    return f.apply;\n  } catch (err) {\n    return void 0;\n  }\n}\nfunction safeApplyHacky(f, instance, args) {\n  const ff = f;\n  ff[ApplySymbol] = untouchedApply;\n  const out = ff[ApplySymbol](instance, args);\n  delete ff[ApplySymbol];\n  return out;\n}\nfunction safeApply(f, instance, args) {\n  if (safeExtractApply(f) === untouchedApply) {\n    return f.apply(instance, args);\n  }\n  return safeApplyHacky(f, instance, args);\n}\n\n// ../../../node_modules/fast-check/lib/esm/utils/globals.js\nvar SArray = typeof Array !== 'undefined' ? Array : void 0;\nvar SBigInt = typeof BigInt !== 'undefined' ? BigInt : void 0;\nvar SBigInt64Array =\n  typeof BigInt64Array !== 'undefined' ? BigInt64Array : void 0;\nvar SBigUint64Array =\n  typeof BigUint64Array !== 'undefined' ? BigUint64Array : void 0;\nvar SBoolean = typeof Boolean !== 'undefined' ? Boolean : void 0;\nvar SDate = typeof Date !== 'undefined' ? Date : void 0;\nvar SError = typeof Error !== 'undefined' ? Error : void 0;\nvar SFloat32Array = typeof Float32Array !== 'undefined' ? Float32Array : void 0;\nvar SFloat64Array = typeof Float64Array !== 'undefined' ? Float64Array : void 0;\nvar SInt8Array = typeof Int8Array !== 'undefined' ? Int8Array : void 0;\nvar SInt16Array = typeof Int16Array !== 'undefined' ? Int16Array : void 0;\nvar SInt32Array = typeof Int32Array !== 'undefined' ? Int32Array : void 0;\nvar SNumber = typeof Number !== 'undefined' ? Number : void 0;\nvar SString = typeof String !== 'undefined' ? String : void 0;\nvar SSet = typeof Set !== 'undefined' ? Set : void 0;\nvar SUint8Array = typeof Uint8Array !== 'undefined' ? Uint8Array : void 0;\nvar SUint8ClampedArray =\n  typeof Uint8ClampedArray !== 'undefined' ? Uint8ClampedArray : void 0;\nvar SUint16Array = typeof Uint16Array !== 'undefined' ? Uint16Array : void 0;\nvar SUint32Array = typeof Uint32Array !== 'undefined' ? Uint32Array : void 0;\nvar SencodeURIComponent =\n  typeof encodeURIComponent !== 'undefined' ? encodeURIComponent : void 0;\nvar untouchedForEach = Array.prototype.forEach;\nvar untouchedIndexOf = Array.prototype.indexOf;\nvar untouchedJoin = Array.prototype.join;\nvar untouchedMap = Array.prototype.map;\nvar untouchedFilter = Array.prototype.filter;\nvar untouchedPush = Array.prototype.push;\nvar untouchedPop = Array.prototype.pop;\nvar untouchedSplice = Array.prototype.splice;\nvar untouchedSlice = Array.prototype.slice;\nvar untouchedSort = Array.prototype.sort;\nvar untouchedEvery = Array.prototype.every;\nfunction extractForEach(instance) {\n  try {\n    return instance.forEach;\n  } catch (err) {\n    return void 0;\n  }\n}\nfunction extractIndexOf(instance) {\n  try {\n    return instance.indexOf;\n  } catch (err) {\n    return void 0;\n  }\n}\nfunction extractJoin(instance) {\n  try {\n    return instance.join;\n  } catch (err) {\n    return void 0;\n  }\n}\nfunction extractMap(instance) {\n  try {\n    return instance.map;\n  } catch (err) {\n    return void 0;\n  }\n}\nfunction extractFilter(instance) {\n  try {\n    return instance.filter;\n  } catch (err) {\n    return void 0;\n  }\n}\nfunction extractPush(instance) {\n  try {\n    return instance.push;\n  } catch (err) {\n    return void 0;\n  }\n}\nfunction extractPop(instance) {\n  try {\n    return instance.pop;\n  } catch (err) {\n    return void 0;\n  }\n}\nfunction extractSplice(instance) {\n  try {\n    return instance.splice;\n  } catch (err) {\n    return void 0;\n  }\n}\nfunction extractSlice(instance) {\n  try {\n    return instance.slice;\n  } catch (err) {\n    return void 0;\n  }\n}\nfunction extractSort(instance) {\n  try {\n    return instance.sort;\n  } catch (err) {\n    return void 0;\n  }\n}\nfunction extractEvery(instance) {\n  try {\n    return instance.every;\n  } catch (err) {\n    return void 0;\n  }\n}\nfunction safeForEach(instance, fn) {\n  if (extractForEach(instance) === untouchedForEach) {\n    return instance.forEach(fn);\n  }\n  return safeApply(untouchedForEach, instance, [fn]);\n}\nfunction safeIndexOf(instance, ...args) {\n  if (extractIndexOf(instance) === untouchedIndexOf) {\n    return instance.indexOf(...args);\n  }\n  return safeApply(untouchedIndexOf, instance, args);\n}\nfunction safeJoin(instance, ...args) {\n  if (extractJoin(instance) === untouchedJoin) {\n    return instance.join(...args);\n  }\n  return safeApply(untouchedJoin, instance, args);\n}\nfunction safeMap(instance, fn) {\n  if (extractMap(instance) === untouchedMap) {\n    return instance.map(fn);\n  }\n  return safeApply(untouchedMap, instance, [fn]);\n}\nfunction safeFilter(instance, predicate) {\n  if (extractFilter(instance) === untouchedFilter) {\n    return instance.filter(predicate);\n  }\n  return safeApply(untouchedFilter, instance, [predicate]);\n}\nfunction safePush(instance, ...args) {\n  if (extractPush(instance) === untouchedPush) {\n    return instance.push(...args);\n  }\n  return safeApply(untouchedPush, instance, args);\n}\nfunction safePop(instance) {\n  if (extractPop(instance) === untouchedPop) {\n    return instance.pop();\n  }\n  return safeApply(untouchedPop, instance, []);\n}\nfunction safeSplice(instance, ...args) {\n  if (extractSplice(instance) === untouchedSplice) {\n    return instance.splice(...args);\n  }\n  return safeApply(untouchedSplice, instance, args);\n}\nfunction safeSlice(instance, ...args) {\n  if (extractSlice(instance) === untouchedSlice) {\n    return instance.slice(...args);\n  }\n  return safeApply(untouchedSlice, instance, args);\n}\nfunction safeSort(instance, ...args) {\n  if (extractSort(instance) === untouchedSort) {\n    return instance.sort(...args);\n  }\n  return safeApply(untouchedSort, instance, args);\n}\nfunction safeEvery(instance, ...args) {\n  if (extractEvery(instance) === untouchedEvery) {\n    return instance.every(...args);\n  }\n  return safeApply(untouchedEvery, instance, args);\n}\nvar untouchedGetTime = Date.prototype.getTime;\nvar untouchedToISOString = Date.prototype.toISOString;\nfunction extractGetTime(instance) {\n  try {\n    return instance.getTime;\n  } catch (err) {\n    return void 0;\n  }\n}\nfunction extractToISOString(instance) {\n  try {\n    return instance.toISOString;\n  } catch (err) {\n    return void 0;\n  }\n}\nfunction safeGetTime(instance) {\n  if (extractGetTime(instance) === untouchedGetTime) {\n    return instance.getTime();\n  }\n  return safeApply(untouchedGetTime, instance, []);\n}\nfunction safeToISOString(instance) {\n  if (extractToISOString(instance) === untouchedToISOString) {\n    return instance.toISOString();\n  }\n  return safeApply(untouchedToISOString, instance, []);\n}\nvar untouchedAdd = Set.prototype.add;\nfunction extractAdd(instance) {\n  try {\n    return instance.add;\n  } catch (err) {\n    return void 0;\n  }\n}\nfunction safeAdd(instance, value) {\n  if (extractAdd(instance) === untouchedAdd) {\n    return instance.add(value);\n  }\n  return safeApply(untouchedAdd, instance, [value]);\n}\nvar untouchedSplit = String.prototype.split;\nvar untouchedStartsWith = String.prototype.startsWith;\nvar untouchedEndsWith = String.prototype.endsWith;\nvar untouchedSubstring = String.prototype.substring;\nvar untouchedToLowerCase = String.prototype.toLowerCase;\nvar untouchedToUpperCase = String.prototype.toUpperCase;\nvar untouchedPadStart = String.prototype.padStart;\nvar untouchedCharCodeAt = String.prototype.charCodeAt;\nvar untouchedReplace = String.prototype.replace;\nfunction extractSplit(instance) {\n  try {\n    return instance.split;\n  } catch (err) {\n    return void 0;\n  }\n}\nfunction extractStartsWith(instance) {\n  try {\n    return instance.startsWith;\n  } catch (err) {\n    return void 0;\n  }\n}\nfunction extractEndsWith(instance) {\n  try {\n    return instance.endsWith;\n  } catch (err) {\n    return void 0;\n  }\n}\nfunction extractSubstring(instance) {\n  try {\n    return instance.substring;\n  } catch (err) {\n    return void 0;\n  }\n}\nfunction extractToLowerCase(instance) {\n  try {\n    return instance.toLowerCase;\n  } catch (err) {\n    return void 0;\n  }\n}\nfunction extractToUpperCase(instance) {\n  try {\n    return instance.toUpperCase;\n  } catch (err) {\n    return void 0;\n  }\n}\nfunction extractPadStart(instance) {\n  try {\n    return instance.padStart;\n  } catch (err) {\n    return void 0;\n  }\n}\nfunction extractCharCodeAt(instance) {\n  try {\n    return instance.charCodeAt;\n  } catch (err) {\n    return void 0;\n  }\n}\nfunction extractReplace(instance) {\n  try {\n    return instance.replace;\n  } catch (err) {\n    return void 0;\n  }\n}\nfunction safeSplit(instance, ...args) {\n  if (extractSplit(instance) === untouchedSplit) {\n    return instance.split(...args);\n  }\n  return safeApply(untouchedSplit, instance, args);\n}\nfunction safeStartsWith(instance, ...args) {\n  if (extractStartsWith(instance) === untouchedStartsWith) {\n    return instance.startsWith(...args);\n  }\n  return safeApply(untouchedStartsWith, instance, args);\n}\nfunction safeEndsWith(instance, ...args) {\n  if (extractEndsWith(instance) === untouchedEndsWith) {\n    return instance.endsWith(...args);\n  }\n  return safeApply(untouchedEndsWith, instance, args);\n}\nfunction safeSubstring(instance, ...args) {\n  if (extractSubstring(instance) === untouchedSubstring) {\n    return instance.substring(...args);\n  }\n  return safeApply(untouchedSubstring, instance, args);\n}\nfunction safeToLowerCase(instance) {\n  if (extractToLowerCase(instance) === untouchedToLowerCase) {\n    return instance.toLowerCase();\n  }\n  return safeApply(untouchedToLowerCase, instance, []);\n}\nfunction safeToUpperCase(instance) {\n  if (extractToUpperCase(instance) === untouchedToUpperCase) {\n    return instance.toUpperCase();\n  }\n  return safeApply(untouchedToUpperCase, instance, []);\n}\nfunction safePadStart(instance, ...args) {\n  if (extractPadStart(instance) === untouchedPadStart) {\n    return instance.padStart(...args);\n  }\n  return safeApply(untouchedPadStart, instance, args);\n}\nfunction safeCharCodeAt(instance, index) {\n  if (extractCharCodeAt(instance) === untouchedCharCodeAt) {\n    return instance.charCodeAt(index);\n  }\n  return safeApply(untouchedCharCodeAt, instance, [index]);\n}\nfunction safeReplace(instance, pattern, replacement) {\n  if (extractReplace(instance) === untouchedReplace) {\n    return instance.replace(pattern, replacement);\n  }\n  return safeApply(untouchedReplace, instance, [pattern, replacement]);\n}\nvar untouchedNumberToString = Number.prototype.toString;\nfunction extractNumberToString(instance) {\n  try {\n    return instance.toString;\n  } catch (err) {\n    return void 0;\n  }\n}\nfunction safeNumberToString(instance, ...args) {\n  if (extractNumberToString(instance) === untouchedNumberToString) {\n    return instance.toString(...args);\n  }\n  return safeApply(untouchedNumberToString, instance, args);\n}\nvar untouchedHasOwnProperty = Object.prototype.hasOwnProperty;\nvar untouchedToString = Object.prototype.toString;\nfunction safeHasOwnProperty(instance, v) {\n  return safeApply(untouchedHasOwnProperty, instance, [v]);\n}\nfunction safeToString(instance) {\n  return safeApply(untouchedToString, instance, []);\n}\n\n// ../../../node_modules/fast-check/lib/esm/stream/LazyIterableIterator.js\nvar LazyIterableIterator = class {\n  constructor(producer) {\n    this.producer = producer;\n  }\n  [Symbol.iterator]() {\n    if (this.it === void 0) {\n      this.it = this.producer();\n    }\n    return this.it;\n  }\n  next() {\n    if (this.it === void 0) {\n      this.it = this.producer();\n    }\n    return this.it.next();\n  }\n};\nfunction makeLazy(producer) {\n  return new LazyIterableIterator(producer);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/TupleArbitrary.js\nvar safeArrayIsArray = Array.isArray;\nvar safeObjectDefineProperty2 = Object.defineProperty;\nfunction tupleMakeItCloneable(vs, values) {\n  return safeObjectDefineProperty2(vs, cloneMethod, {\n    value: () => {\n      const cloned = [];\n      for (let idx = 0; idx !== values.length; ++idx) {\n        safePush(cloned, values[idx].value);\n      }\n      tupleMakeItCloneable(cloned, values);\n      return cloned;\n    },\n  });\n}\nfunction tupleWrapper(values) {\n  let cloneable = false;\n  const vs = [];\n  const ctxs = [];\n  for (let idx = 0; idx !== values.length; ++idx) {\n    const v = values[idx];\n    cloneable = cloneable || v.hasToBeCloned;\n    safePush(vs, v.value);\n    safePush(ctxs, v.context);\n  }\n  if (cloneable) {\n    tupleMakeItCloneable(vs, values);\n  }\n  return new Value(vs, ctxs);\n}\nfunction tupleShrink(arbs, value, context2) {\n  const shrinks = [];\n  const safeContext = safeArrayIsArray(context2) ? context2 : [];\n  for (let idx = 0; idx !== arbs.length; ++idx) {\n    safePush(\n      shrinks,\n      makeLazy(() =>\n        arbs[idx]\n          .shrink(value[idx], safeContext[idx])\n          .map((v) => {\n            const nextValues = safeMap(\n              value,\n              (v2, idx2) => new Value(cloneIfNeeded(v2), safeContext[idx2]),\n            );\n            return [\n              ...safeSlice(nextValues, 0, idx),\n              v,\n              ...safeSlice(nextValues, idx + 1),\n            ];\n          })\n          .map(tupleWrapper),\n      ),\n    );\n  }\n  return Stream.nil().join(...shrinks);\n}\nvar TupleArbitrary = class extends Arbitrary {\n  constructor(arbs) {\n    super();\n    this.arbs = arbs;\n    for (let idx = 0; idx !== arbs.length; ++idx) {\n      const arb = arbs[idx];\n      if (arb == null || arb.generate == null)\n        throw new Error(\n          `Invalid parameter encountered at index ${idx}: expecting an Arbitrary`,\n        );\n    }\n  }\n  generate(mrng, biasFactor) {\n    const mapped = [];\n    for (let idx = 0; idx !== this.arbs.length; ++idx) {\n      safePush(mapped, this.arbs[idx].generate(mrng, biasFactor));\n    }\n    return tupleWrapper(mapped);\n  }\n  canShrinkWithoutContext(value) {\n    if (!safeArrayIsArray(value) || value.length !== this.arbs.length) {\n      return false;\n    }\n    for (let index = 0; index !== this.arbs.length; ++index) {\n      if (!this.arbs[index].canShrinkWithoutContext(value[index])) {\n        return false;\n      }\n    }\n    return true;\n  }\n  shrink(value, context2) {\n    return tupleShrink(this.arbs, value, context2);\n  }\n};\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/tuple.js\nfunction tuple(...arbs) {\n  return new TupleArbitrary(arbs);\n}\n\n// ../../../node_modules/fast-check/lib/esm/check/property/IRawProperty.js\nvar safeMathLog = Math.log;\nfunction runIdToFrequency(runId) {\n  return 2 + ~~(safeMathLog(runId + 1) * 0.4342944819032518);\n}\n\n// ../../../node_modules/fast-check/lib/esm/check/runner/configuration/GlobalParameters.js\nvar globalParameters = {};\nfunction configureGlobal(parameters) {\n  globalParameters = parameters;\n}\nfunction readConfigureGlobal() {\n  return globalParameters;\n}\nfunction resetConfigureGlobal() {\n  globalParameters = {};\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/NoUndefinedAsContext.js\nvar UndefinedContextPlaceholder = Symbol('UndefinedContextPlaceholder');\nfunction noUndefinedAsContext(value) {\n  if (value.context !== void 0) {\n    return value;\n  }\n  if (value.hasToBeCloned) {\n    return new Value(\n      value.value_,\n      UndefinedContextPlaceholder,\n      () => value.value,\n    );\n  }\n  return new Value(value.value_, UndefinedContextPlaceholder);\n}\n\n// ../../../node_modules/fast-check/lib/esm/check/property/AsyncProperty.generic.js\nvar AsyncProperty = class _AsyncProperty {\n  constructor(arb, predicate) {\n    this.arb = arb;\n    this.predicate = predicate;\n    const { asyncBeforeEach, asyncAfterEach, beforeEach, afterEach } =\n      readConfigureGlobal() || {};\n    if (asyncBeforeEach !== void 0 && beforeEach !== void 0) {\n      throw SError(\n        `Global \"asyncBeforeEach\" and \"beforeEach\" parameters can't be set at the same time when running async properties`,\n      );\n    }\n    if (asyncAfterEach !== void 0 && afterEach !== void 0) {\n      throw SError(\n        `Global \"asyncAfterEach\" and \"afterEach\" parameters can't be set at the same time when running async properties`,\n      );\n    }\n    this.beforeEachHook =\n      asyncBeforeEach || beforeEach || _AsyncProperty.dummyHook;\n    this.afterEachHook =\n      asyncAfterEach || afterEach || _AsyncProperty.dummyHook;\n  }\n  isAsync() {\n    return true;\n  }\n  generate(mrng, runId) {\n    const value = this.arb.generate(\n      mrng,\n      runId != null ? runIdToFrequency(runId) : void 0,\n    );\n    return noUndefinedAsContext(value);\n  }\n  shrink(value) {\n    if (\n      value.context === void 0 &&\n      !this.arb.canShrinkWithoutContext(value.value_)\n    ) {\n      return Stream.nil();\n    }\n    const safeContext =\n      value.context !== UndefinedContextPlaceholder ? value.context : void 0;\n    return this.arb.shrink(value.value_, safeContext).map(noUndefinedAsContext);\n  }\n  async runBeforeEach() {\n    await this.beforeEachHook();\n  }\n  async runAfterEach() {\n    await this.afterEachHook();\n  }\n  async run(v, dontRunHook) {\n    if (!dontRunHook) {\n      await this.beforeEachHook();\n    }\n    try {\n      const output = await this.predicate(v);\n      return output == null || output === true\n        ? null\n        : {\n            error: new SError('Property failed by returning false'),\n            errorMessage: 'Error: Property failed by returning false',\n          };\n    } catch (err) {\n      if (PreconditionFailure.isFailure(err)) return err;\n      if (err instanceof SError && err.stack) {\n        return { error: err, errorMessage: err.stack };\n      }\n      return { error: err, errorMessage: SString(err) };\n    } finally {\n      if (!dontRunHook) {\n        await this.afterEachHook();\n      }\n    }\n  }\n  beforeEach(hookFunction) {\n    const previousBeforeEachHook = this.beforeEachHook;\n    this.beforeEachHook = () => hookFunction(previousBeforeEachHook);\n    return this;\n  }\n  afterEach(hookFunction) {\n    const previousAfterEachHook = this.afterEachHook;\n    this.afterEachHook = () => hookFunction(previousAfterEachHook);\n    return this;\n  }\n};\nAsyncProperty.dummyHook = () => {};\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/AlwaysShrinkableArbitrary.js\nvar AlwaysShrinkableArbitrary = class extends Arbitrary {\n  constructor(arb) {\n    super();\n    this.arb = arb;\n  }\n  generate(mrng, biasFactor) {\n    const value = this.arb.generate(mrng, biasFactor);\n    return noUndefinedAsContext(value);\n  }\n  canShrinkWithoutContext(value) {\n    return true;\n  }\n  shrink(value, context2) {\n    if (context2 === void 0 && !this.arb.canShrinkWithoutContext(value)) {\n      return Stream.nil();\n    }\n    const safeContext =\n      context2 !== UndefinedContextPlaceholder ? context2 : void 0;\n    return this.arb.shrink(value, safeContext).map(noUndefinedAsContext);\n  }\n};\n\n// ../../../node_modules/fast-check/lib/esm/check/property/AsyncProperty.js\nfunction asyncProperty(...args) {\n  if (args.length < 2) {\n    throw new Error('asyncProperty expects at least two parameters');\n  }\n  const arbs = safeSlice(args, 0, args.length - 1);\n  const p = args[args.length - 1];\n  safeForEach(arbs, assertIsArbitrary);\n  const mappedArbs = safeMap(arbs, (arb) => new AlwaysShrinkableArbitrary(arb));\n  return new AsyncProperty(tuple(...mappedArbs), (t) => p(...t));\n}\n\n// ../../../node_modules/fast-check/lib/esm/check/property/Property.generic.js\nvar Property = class _Property {\n  constructor(arb, predicate) {\n    this.arb = arb;\n    this.predicate = predicate;\n    const {\n      beforeEach = _Property.dummyHook,\n      afterEach = _Property.dummyHook,\n      asyncBeforeEach,\n      asyncAfterEach,\n    } = readConfigureGlobal() || {};\n    if (asyncBeforeEach !== void 0) {\n      throw SError(\n        `\"asyncBeforeEach\" can't be set when running synchronous properties`,\n      );\n    }\n    if (asyncAfterEach !== void 0) {\n      throw SError(\n        `\"asyncAfterEach\" can't be set when running synchronous properties`,\n      );\n    }\n    this.beforeEachHook = beforeEach;\n    this.afterEachHook = afterEach;\n  }\n  isAsync() {\n    return false;\n  }\n  generate(mrng, runId) {\n    const value = this.arb.generate(\n      mrng,\n      runId != null ? runIdToFrequency(runId) : void 0,\n    );\n    return noUndefinedAsContext(value);\n  }\n  shrink(value) {\n    if (\n      value.context === void 0 &&\n      !this.arb.canShrinkWithoutContext(value.value_)\n    ) {\n      return Stream.nil();\n    }\n    const safeContext =\n      value.context !== UndefinedContextPlaceholder ? value.context : void 0;\n    return this.arb.shrink(value.value_, safeContext).map(noUndefinedAsContext);\n  }\n  runBeforeEach() {\n    this.beforeEachHook();\n  }\n  runAfterEach() {\n    this.afterEachHook();\n  }\n  run(v, dontRunHook) {\n    if (!dontRunHook) {\n      this.beforeEachHook();\n    }\n    try {\n      const output = this.predicate(v);\n      return output == null || output === true\n        ? null\n        : {\n            error: new SError('Property failed by returning false'),\n            errorMessage: 'Error: Property failed by returning false',\n          };\n    } catch (err) {\n      if (PreconditionFailure.isFailure(err)) return err;\n      if (err instanceof SError && err.stack) {\n        return { error: err, errorMessage: err.stack };\n      }\n      return { error: err, errorMessage: SString(err) };\n    } finally {\n      if (!dontRunHook) {\n        this.afterEachHook();\n      }\n    }\n  }\n  beforeEach(hookFunction) {\n    const previousBeforeEachHook = this.beforeEachHook;\n    this.beforeEachHook = () => hookFunction(previousBeforeEachHook);\n    return this;\n  }\n  afterEach(hookFunction) {\n    const previousAfterEachHook = this.afterEachHook;\n    this.afterEachHook = () => hookFunction(previousAfterEachHook);\n    return this;\n  }\n};\nProperty.dummyHook = () => {};\n\n// ../../../node_modules/fast-check/lib/esm/check/property/Property.js\nfunction property(...args) {\n  if (args.length < 2) {\n    throw new Error('property expects at least two parameters');\n  }\n  const arbs = safeSlice(args, 0, args.length - 1);\n  const p = args[args.length - 1];\n  safeForEach(arbs, assertIsArbitrary);\n  const mappedArbs = safeMap(arbs, (arb) => new AlwaysShrinkableArbitrary(arb));\n  return new Property(tuple(...mappedArbs), (t) => p(...t));\n}\n\n// ../../../node_modules/pure-rand/lib/esm/pure-rand-default.js\nvar pure_rand_default_exports = {};\n__export(pure_rand_default_exports, {\n  __commitHash: () => __commitHash,\n  __type: () => __type,\n  __version: () => __version,\n  congruential32: () => congruential32,\n  generateN: () => generateN,\n  mersenne: () => MersenneTwister_default,\n  skipN: () => skipN,\n  uniformArrayIntDistribution: () => uniformArrayIntDistribution,\n  uniformBigIntDistribution: () => uniformBigIntDistribution,\n  uniformIntDistribution: () => uniformIntDistribution,\n  unsafeGenerateN: () => unsafeGenerateN,\n  unsafeSkipN: () => unsafeSkipN,\n  unsafeUniformArrayIntDistribution: () => unsafeUniformArrayIntDistribution,\n  unsafeUniformBigIntDistribution: () => unsafeUniformBigIntDistribution,\n  unsafeUniformIntDistribution: () => unsafeUniformIntDistribution,\n  xoroshiro128plus: () => xoroshiro128plus,\n  xorshift128plus: () => xorshift128plus,\n});\n\n// ../../../node_modules/pure-rand/lib/esm/generator/RandomGenerator.js\nfunction unsafeGenerateN(rng, num) {\n  var out = [];\n  for (var idx = 0; idx != num; ++idx) {\n    out.push(rng.unsafeNext());\n  }\n  return out;\n}\nfunction generateN(rng, num) {\n  var nextRng = rng.clone();\n  var out = unsafeGenerateN(nextRng, num);\n  return [out, nextRng];\n}\nfunction unsafeSkipN(rng, num) {\n  for (var idx = 0; idx != num; ++idx) {\n    rng.unsafeNext();\n  }\n}\nfunction skipN(rng, num) {\n  var nextRng = rng.clone();\n  unsafeSkipN(nextRng, num);\n  return nextRng;\n}\n\n// ../../../node_modules/pure-rand/lib/esm/generator/LinearCongruential.js\nvar MULTIPLIER = 214013;\nvar INCREMENT = 2531011;\nvar MASK = 4294967295;\nvar MASK_2 = (1 << 31) - 1;\nvar computeNextSeed = function (seed) {\n  return (seed * MULTIPLIER + INCREMENT) & MASK;\n};\nvar computeValueFromNextSeed = function (nextseed) {\n  return (nextseed & MASK_2) >> 16;\n};\nvar LinearCongruential32 = (function () {\n  function LinearCongruential322(seed) {\n    this.seed = seed;\n  }\n  LinearCongruential322.prototype.clone = function () {\n    return new LinearCongruential322(this.seed);\n  };\n  LinearCongruential322.prototype.next = function () {\n    var nextRng = new LinearCongruential322(this.seed);\n    var out = nextRng.unsafeNext();\n    return [out, nextRng];\n  };\n  LinearCongruential322.prototype.unsafeNext = function () {\n    var s1 = computeNextSeed(this.seed);\n    var v1 = computeValueFromNextSeed(s1);\n    var s2 = computeNextSeed(s1);\n    var v2 = computeValueFromNextSeed(s2);\n    this.seed = computeNextSeed(s2);\n    var v3 = computeValueFromNextSeed(this.seed);\n    var vnext = v3 + ((v2 + (v1 << 15)) << 15);\n    return vnext | 0;\n  };\n  LinearCongruential322.prototype.getState = function () {\n    return [this.seed];\n  };\n  return LinearCongruential322;\n})();\nfunction fromState(state) {\n  var valid = state.length === 1;\n  if (!valid) {\n    throw new Error(\n      'The state must have been produced by a congruential32 RandomGenerator',\n    );\n  }\n  return new LinearCongruential32(state[0]);\n}\nvar congruential32 = Object.assign(\n  function (seed) {\n    return new LinearCongruential32(seed);\n  },\n  { fromState },\n);\n\n// ../../../node_modules/pure-rand/lib/esm/generator/MersenneTwister.js\nvar __read = function (o, n) {\n  var m = typeof Symbol === 'function' && o[Symbol.iterator];\n  if (!m) return o;\n  var i = m.call(o),\n    r,\n    ar = [],\n    e;\n  try {\n    while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n  } catch (error) {\n    e = { error };\n  } finally {\n    try {\n      if (r && !r.done && (m = i['return'])) m.call(i);\n    } finally {\n      if (e) throw e.error;\n    }\n  }\n  return ar;\n};\nvar __spreadArray = function (to, from, pack) {\n  if (pack || arguments.length === 2)\n    for (var i = 0, l = from.length, ar; i < l; i++) {\n      if (ar || !(i in from)) {\n        if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n        ar[i] = from[i];\n      }\n    }\n  return to.concat(ar || Array.prototype.slice.call(from));\n};\nvar MersenneTwister = (function () {\n  function MersenneTwister2(states, index) {\n    this.states = states;\n    this.index = index;\n  }\n  MersenneTwister2.twist = function (prev) {\n    var mt = prev.slice();\n    for (var idx = 0; idx !== MersenneTwister2.N - MersenneTwister2.M; ++idx) {\n      var y_1 =\n        (mt[idx] & MersenneTwister2.MASK_UPPER) +\n        (mt[idx + 1] & MersenneTwister2.MASK_LOWER);\n      mt[idx] =\n        mt[idx + MersenneTwister2.M] ^\n        (y_1 >>> 1) ^\n        (-(y_1 & 1) & MersenneTwister2.A);\n    }\n    for (\n      var idx = MersenneTwister2.N - MersenneTwister2.M;\n      idx !== MersenneTwister2.N - 1;\n      ++idx\n    ) {\n      var y_2 =\n        (mt[idx] & MersenneTwister2.MASK_UPPER) +\n        (mt[idx + 1] & MersenneTwister2.MASK_LOWER);\n      mt[idx] =\n        mt[idx + MersenneTwister2.M - MersenneTwister2.N] ^\n        (y_2 >>> 1) ^\n        (-(y_2 & 1) & MersenneTwister2.A);\n    }\n    var y =\n      (mt[MersenneTwister2.N - 1] & MersenneTwister2.MASK_UPPER) +\n      (mt[0] & MersenneTwister2.MASK_LOWER);\n    mt[MersenneTwister2.N - 1] =\n      mt[MersenneTwister2.M - 1] ^ (y >>> 1) ^ (-(y & 1) & MersenneTwister2.A);\n    return mt;\n  };\n  MersenneTwister2.seeded = function (seed) {\n    var out = Array(MersenneTwister2.N);\n    out[0] = seed;\n    for (var idx = 1; idx !== MersenneTwister2.N; ++idx) {\n      var xored = out[idx - 1] ^ (out[idx - 1] >>> 30);\n      out[idx] = (Math.imul(MersenneTwister2.F, xored) + idx) | 0;\n    }\n    return out;\n  };\n  MersenneTwister2.from = function (seed) {\n    return new MersenneTwister2(\n      MersenneTwister2.twist(MersenneTwister2.seeded(seed)),\n      0,\n    );\n  };\n  MersenneTwister2.prototype.clone = function () {\n    return new MersenneTwister2(this.states, this.index);\n  };\n  MersenneTwister2.prototype.next = function () {\n    var nextRng = new MersenneTwister2(this.states, this.index);\n    var out = nextRng.unsafeNext();\n    return [out, nextRng];\n  };\n  MersenneTwister2.prototype.unsafeNext = function () {\n    var y = this.states[this.index];\n    y ^= this.states[this.index] >>> MersenneTwister2.U;\n    y ^= (y << MersenneTwister2.S) & MersenneTwister2.B;\n    y ^= (y << MersenneTwister2.T) & MersenneTwister2.C;\n    y ^= y >>> MersenneTwister2.L;\n    if (++this.index >= MersenneTwister2.N) {\n      this.states = MersenneTwister2.twist(this.states);\n      this.index = 0;\n    }\n    return y;\n  };\n  MersenneTwister2.prototype.getState = function () {\n    return __spreadArray([this.index], __read(this.states), false);\n  };\n  MersenneTwister2.fromState = function (state) {\n    var valid =\n      state.length === MersenneTwister2.N + 1 &&\n      state[0] >= 0 &&\n      state[0] < MersenneTwister2.N;\n    if (!valid) {\n      throw new Error(\n        'The state must have been produced by a mersenne RandomGenerator',\n      );\n    }\n    return new MersenneTwister2(state.slice(1), state[0]);\n  };\n  MersenneTwister2.N = 624;\n  MersenneTwister2.M = 397;\n  MersenneTwister2.R = 31;\n  MersenneTwister2.A = 2567483615;\n  MersenneTwister2.F = 1812433253;\n  MersenneTwister2.U = 11;\n  MersenneTwister2.S = 7;\n  MersenneTwister2.B = 2636928640;\n  MersenneTwister2.T = 15;\n  MersenneTwister2.C = 4022730752;\n  MersenneTwister2.L = 18;\n  MersenneTwister2.MASK_LOWER = Math.pow(2, MersenneTwister2.R) - 1;\n  MersenneTwister2.MASK_UPPER = Math.pow(2, MersenneTwister2.R);\n  return MersenneTwister2;\n})();\nfunction fromState2(state) {\n  return MersenneTwister.fromState(state);\n}\nvar MersenneTwister_default = Object.assign(\n  function (seed) {\n    return MersenneTwister.from(seed);\n  },\n  { fromState: fromState2 },\n);\n\n// ../../../node_modules/pure-rand/lib/esm/generator/XorShift.js\nvar XorShift128Plus = (function () {\n  function XorShift128Plus2(s01, s00, s11, s10) {\n    this.s01 = s01;\n    this.s00 = s00;\n    this.s11 = s11;\n    this.s10 = s10;\n  }\n  XorShift128Plus2.prototype.clone = function () {\n    return new XorShift128Plus2(this.s01, this.s00, this.s11, this.s10);\n  };\n  XorShift128Plus2.prototype.next = function () {\n    var nextRng = new XorShift128Plus2(this.s01, this.s00, this.s11, this.s10);\n    var out = nextRng.unsafeNext();\n    return [out, nextRng];\n  };\n  XorShift128Plus2.prototype.unsafeNext = function () {\n    var a0 = this.s00 ^ (this.s00 << 23);\n    var a1 = this.s01 ^ ((this.s01 << 23) | (this.s00 >>> 9));\n    var b0 =\n      a0 ^\n      this.s10 ^\n      ((a0 >>> 18) | (a1 << 14)) ^\n      ((this.s10 >>> 5) | (this.s11 << 27));\n    var b1 = a1 ^ this.s11 ^ (a1 >>> 18) ^ (this.s11 >>> 5);\n    var out = (this.s00 + this.s10) | 0;\n    this.s01 = this.s11;\n    this.s00 = this.s10;\n    this.s11 = b1;\n    this.s10 = b0;\n    return out;\n  };\n  XorShift128Plus2.prototype.jump = function () {\n    var nextRng = new XorShift128Plus2(this.s01, this.s00, this.s11, this.s10);\n    nextRng.unsafeJump();\n    return nextRng;\n  };\n  XorShift128Plus2.prototype.unsafeJump = function () {\n    var ns01 = 0;\n    var ns00 = 0;\n    var ns11 = 0;\n    var ns10 = 0;\n    var jump = [1667051007, 2321340297, 1548169110, 304075285];\n    for (var i = 0; i !== 4; ++i) {\n      for (var mask = 1; mask; mask <<= 1) {\n        if (jump[i] & mask) {\n          ns01 ^= this.s01;\n          ns00 ^= this.s00;\n          ns11 ^= this.s11;\n          ns10 ^= this.s10;\n        }\n        this.unsafeNext();\n      }\n    }\n    this.s01 = ns01;\n    this.s00 = ns00;\n    this.s11 = ns11;\n    this.s10 = ns10;\n  };\n  XorShift128Plus2.prototype.getState = function () {\n    return [this.s01, this.s00, this.s11, this.s10];\n  };\n  return XorShift128Plus2;\n})();\nfunction fromState3(state) {\n  var valid = state.length === 4;\n  if (!valid) {\n    throw new Error(\n      'The state must have been produced by a xorshift128plus RandomGenerator',\n    );\n  }\n  return new XorShift128Plus(state[0], state[1], state[2], state[3]);\n}\nvar xorshift128plus = Object.assign(\n  function (seed) {\n    return new XorShift128Plus(-1, ~seed, seed | 0, 0);\n  },\n  { fromState: fromState3 },\n);\n\n// ../../../node_modules/pure-rand/lib/esm/generator/XoroShiro.js\nvar XoroShiro128Plus = (function () {\n  function XoroShiro128Plus2(s01, s00, s11, s10) {\n    this.s01 = s01;\n    this.s00 = s00;\n    this.s11 = s11;\n    this.s10 = s10;\n  }\n  XoroShiro128Plus2.prototype.clone = function () {\n    return new XoroShiro128Plus2(this.s01, this.s00, this.s11, this.s10);\n  };\n  XoroShiro128Plus2.prototype.next = function () {\n    var nextRng = new XoroShiro128Plus2(this.s01, this.s00, this.s11, this.s10);\n    var out = nextRng.unsafeNext();\n    return [out, nextRng];\n  };\n  XoroShiro128Plus2.prototype.unsafeNext = function () {\n    var out = (this.s00 + this.s10) | 0;\n    var a0 = this.s10 ^ this.s00;\n    var a1 = this.s11 ^ this.s01;\n    var s00 = this.s00;\n    var s01 = this.s01;\n    this.s00 = (s00 << 24) ^ (s01 >>> 8) ^ a0 ^ (a0 << 16);\n    this.s01 = (s01 << 24) ^ (s00 >>> 8) ^ a1 ^ ((a1 << 16) | (a0 >>> 16));\n    this.s10 = (a1 << 5) ^ (a0 >>> 27);\n    this.s11 = (a0 << 5) ^ (a1 >>> 27);\n    return out;\n  };\n  XoroShiro128Plus2.prototype.jump = function () {\n    var nextRng = new XoroShiro128Plus2(this.s01, this.s00, this.s11, this.s10);\n    nextRng.unsafeJump();\n    return nextRng;\n  };\n  XoroShiro128Plus2.prototype.unsafeJump = function () {\n    var ns01 = 0;\n    var ns00 = 0;\n    var ns11 = 0;\n    var ns10 = 0;\n    var jump = [3639956645, 3750757012, 1261568508, 386426335];\n    for (var i = 0; i !== 4; ++i) {\n      for (var mask = 1; mask; mask <<= 1) {\n        if (jump[i] & mask) {\n          ns01 ^= this.s01;\n          ns00 ^= this.s00;\n          ns11 ^= this.s11;\n          ns10 ^= this.s10;\n        }\n        this.unsafeNext();\n      }\n    }\n    this.s01 = ns01;\n    this.s00 = ns00;\n    this.s11 = ns11;\n    this.s10 = ns10;\n  };\n  XoroShiro128Plus2.prototype.getState = function () {\n    return [this.s01, this.s00, this.s11, this.s10];\n  };\n  return XoroShiro128Plus2;\n})();\nfunction fromState4(state) {\n  var valid = state.length === 4;\n  if (!valid) {\n    throw new Error(\n      'The state must have been produced by a xoroshiro128plus RandomGenerator',\n    );\n  }\n  return new XoroShiro128Plus(state[0], state[1], state[2], state[3]);\n}\nvar xoroshiro128plus = Object.assign(\n  function (seed) {\n    return new XoroShiro128Plus(-1, ~seed, seed | 0, 0);\n  },\n  { fromState: fromState4 },\n);\n\n// ../../../node_modules/pure-rand/lib/esm/distribution/internals/ArrayInt.js\nfunction addArrayIntToNew(arrayIntA, arrayIntB) {\n  if (arrayIntA.sign !== arrayIntB.sign) {\n    return substractArrayIntToNew(arrayIntA, {\n      sign: -arrayIntB.sign,\n      data: arrayIntB.data,\n    });\n  }\n  var data = [];\n  var reminder = 0;\n  var dataA = arrayIntA.data;\n  var dataB = arrayIntB.data;\n  for (\n    var indexA = dataA.length - 1, indexB = dataB.length - 1;\n    indexA >= 0 || indexB >= 0;\n    --indexA, --indexB\n  ) {\n    var vA = indexA >= 0 ? dataA[indexA] : 0;\n    var vB = indexB >= 0 ? dataB[indexB] : 0;\n    var current = vA + vB + reminder;\n    data.push(current >>> 0);\n    reminder = ~~(current / 4294967296);\n  }\n  if (reminder !== 0) {\n    data.push(reminder);\n  }\n  return { sign: arrayIntA.sign, data: data.reverse() };\n}\nfunction addOneToPositiveArrayInt(arrayInt) {\n  arrayInt.sign = 1;\n  var data = arrayInt.data;\n  for (var index = data.length - 1; index >= 0; --index) {\n    if (data[index] === 4294967295) {\n      data[index] = 0;\n    } else {\n      data[index] += 1;\n      return arrayInt;\n    }\n  }\n  data.unshift(1);\n  return arrayInt;\n}\nfunction isStrictlySmaller(dataA, dataB) {\n  var maxLength = Math.max(dataA.length, dataB.length);\n  for (var index = 0; index < maxLength; ++index) {\n    var indexA = index + dataA.length - maxLength;\n    var indexB = index + dataB.length - maxLength;\n    var vA = indexA >= 0 ? dataA[indexA] : 0;\n    var vB = indexB >= 0 ? dataB[indexB] : 0;\n    if (vA < vB) return true;\n    if (vA > vB) return false;\n  }\n  return false;\n}\nfunction substractArrayIntToNew(arrayIntA, arrayIntB) {\n  if (arrayIntA.sign !== arrayIntB.sign) {\n    return addArrayIntToNew(arrayIntA, {\n      sign: -arrayIntB.sign,\n      data: arrayIntB.data,\n    });\n  }\n  var dataA = arrayIntA.data;\n  var dataB = arrayIntB.data;\n  if (isStrictlySmaller(dataA, dataB)) {\n    var out = substractArrayIntToNew(arrayIntB, arrayIntA);\n    out.sign = -out.sign;\n    return out;\n  }\n  var data = [];\n  var reminder = 0;\n  for (\n    var indexA = dataA.length - 1, indexB = dataB.length - 1;\n    indexA >= 0 || indexB >= 0;\n    --indexA, --indexB\n  ) {\n    var vA = indexA >= 0 ? dataA[indexA] : 0;\n    var vB = indexB >= 0 ? dataB[indexB] : 0;\n    var current = vA - vB - reminder;\n    data.push(current >>> 0);\n    reminder = current < 0 ? 1 : 0;\n  }\n  return { sign: arrayIntA.sign, data: data.reverse() };\n}\nfunction trimArrayIntInplace(arrayInt) {\n  var data = arrayInt.data;\n  var firstNonZero = 0;\n  for (\n    ;\n    firstNonZero !== data.length && data[firstNonZero] === 0;\n    ++firstNonZero\n  ) {}\n  if (firstNonZero === data.length) {\n    arrayInt.sign = 1;\n    arrayInt.data = [0];\n    return arrayInt;\n  }\n  data.splice(0, firstNonZero);\n  return arrayInt;\n}\nfunction fromNumberToArrayInt64(out, n) {\n  if (n < 0) {\n    var posN = -n;\n    out.sign = -1;\n    out.data[0] = ~~(posN / 4294967296);\n    out.data[1] = posN >>> 0;\n  } else {\n    out.sign = 1;\n    out.data[0] = ~~(n / 4294967296);\n    out.data[1] = n >>> 0;\n  }\n  return out;\n}\nfunction substractArrayInt64(out, arrayIntA, arrayIntB) {\n  var lowA = arrayIntA.data[1];\n  var highA = arrayIntA.data[0];\n  var signA = arrayIntA.sign;\n  var lowB = arrayIntB.data[1];\n  var highB = arrayIntB.data[0];\n  var signB = arrayIntB.sign;\n  out.sign = 1;\n  if (signA === 1 && signB === -1) {\n    var low_1 = lowA + lowB;\n    var high = highA + highB + (low_1 > 4294967295 ? 1 : 0);\n    out.data[0] = high >>> 0;\n    out.data[1] = low_1 >>> 0;\n    return out;\n  }\n  var lowFirst = lowA;\n  var highFirst = highA;\n  var lowSecond = lowB;\n  var highSecond = highB;\n  if (signA === -1) {\n    lowFirst = lowB;\n    highFirst = highB;\n    lowSecond = lowA;\n    highSecond = highA;\n  }\n  var reminderLow = 0;\n  var low = lowFirst - lowSecond;\n  if (low < 0) {\n    reminderLow = 1;\n    low = low >>> 0;\n  }\n  out.data[0] = highFirst - highSecond - reminderLow;\n  out.data[1] = low;\n  return out;\n}\n\n// ../../../node_modules/pure-rand/lib/esm/distribution/internals/UnsafeUniformIntDistributionInternal.js\nfunction unsafeUniformIntDistributionInternal(rangeSize, rng) {\n  var MaxAllowed =\n    rangeSize > 2 ? ~~(4294967296 / rangeSize) * rangeSize : 4294967296;\n  var deltaV = rng.unsafeNext() + 2147483648;\n  while (deltaV >= MaxAllowed) {\n    deltaV = rng.unsafeNext() + 2147483648;\n  }\n  return deltaV % rangeSize;\n}\n\n// ../../../node_modules/pure-rand/lib/esm/distribution/internals/UnsafeUniformArrayIntDistributionInternal.js\nfunction unsafeUniformArrayIntDistributionInternal(out, rangeSize, rng) {\n  var rangeLength = rangeSize.length;\n  while (true) {\n    for (var index = 0; index !== rangeLength; ++index) {\n      var indexRangeSize = index === 0 ? rangeSize[0] + 1 : 4294967296;\n      var g = unsafeUniformIntDistributionInternal(indexRangeSize, rng);\n      out[index] = g;\n    }\n    for (var index = 0; index !== rangeLength; ++index) {\n      var current = out[index];\n      var currentInRange = rangeSize[index];\n      if (current < currentInRange) {\n        return out;\n      } else if (current > currentInRange) {\n        break;\n      }\n    }\n  }\n}\n\n// ../../../node_modules/pure-rand/lib/esm/distribution/UnsafeUniformArrayIntDistribution.js\nfunction unsafeUniformArrayIntDistribution(from, to, rng) {\n  var rangeSize = trimArrayIntInplace(\n    addOneToPositiveArrayInt(substractArrayIntToNew(to, from)),\n  );\n  var emptyArrayIntData = rangeSize.data.slice(0);\n  var g = unsafeUniformArrayIntDistributionInternal(\n    emptyArrayIntData,\n    rangeSize.data,\n    rng,\n  );\n  return trimArrayIntInplace(addArrayIntToNew({ sign: 1, data: g }, from));\n}\n\n// ../../../node_modules/pure-rand/lib/esm/distribution/UniformArrayIntDistribution.js\nfunction uniformArrayIntDistribution(from, to, rng) {\n  if (rng != null) {\n    var nextRng = rng.clone();\n    return [unsafeUniformArrayIntDistribution(from, to, nextRng), nextRng];\n  }\n  return function (rng2) {\n    var nextRng2 = rng2.clone();\n    return [unsafeUniformArrayIntDistribution(from, to, nextRng2), nextRng2];\n  };\n}\n\n// ../../../node_modules/pure-rand/lib/esm/distribution/UnsafeUniformBigIntDistribution.js\nvar SBigInt2 = typeof BigInt !== 'undefined' ? BigInt : void 0;\nfunction unsafeUniformBigIntDistribution(from, to, rng) {\n  var diff = to - from + SBigInt2(1);\n  var MinRng = SBigInt2(-2147483648);\n  var NumValues = SBigInt2(4294967296);\n  var FinalNumValues = NumValues;\n  var NumIterations = 1;\n  while (FinalNumValues < diff) {\n    FinalNumValues *= NumValues;\n    ++NumIterations;\n  }\n  var MaxAcceptedRandom = FinalNumValues - (FinalNumValues % diff);\n  while (true) {\n    var value = SBigInt2(0);\n    for (var num = 0; num !== NumIterations; ++num) {\n      var out = rng.unsafeNext();\n      value = NumValues * value + (SBigInt2(out) - MinRng);\n    }\n    if (value < MaxAcceptedRandom) {\n      var inDiff = value % diff;\n      return inDiff + from;\n    }\n  }\n}\n\n// ../../../node_modules/pure-rand/lib/esm/distribution/UniformBigIntDistribution.js\nfunction uniformBigIntDistribution(from, to, rng) {\n  if (rng != null) {\n    var nextRng = rng.clone();\n    return [unsafeUniformBigIntDistribution(from, to, nextRng), nextRng];\n  }\n  return function (rng2) {\n    var nextRng2 = rng2.clone();\n    return [unsafeUniformBigIntDistribution(from, to, nextRng2), nextRng2];\n  };\n}\n\n// ../../../node_modules/pure-rand/lib/esm/distribution/UnsafeUniformIntDistribution.js\nvar safeNumberMaxSafeInteger = Number.MAX_SAFE_INTEGER;\nvar sharedA = { sign: 1, data: [0, 0] };\nvar sharedB = { sign: 1, data: [0, 0] };\nvar sharedC = { sign: 1, data: [0, 0] };\nvar sharedData = [0, 0];\nfunction uniformLargeIntInternal(from, to, rangeSize, rng) {\n  var rangeSizeArrayIntValue =\n    rangeSize <= safeNumberMaxSafeInteger\n      ? fromNumberToArrayInt64(sharedC, rangeSize)\n      : substractArrayInt64(\n          sharedC,\n          fromNumberToArrayInt64(sharedA, to),\n          fromNumberToArrayInt64(sharedB, from),\n        );\n  if (rangeSizeArrayIntValue.data[1] === 4294967295) {\n    rangeSizeArrayIntValue.data[0] += 1;\n    rangeSizeArrayIntValue.data[1] = 0;\n  } else {\n    rangeSizeArrayIntValue.data[1] += 1;\n  }\n  unsafeUniformArrayIntDistributionInternal(\n    sharedData,\n    rangeSizeArrayIntValue.data,\n    rng,\n  );\n  return sharedData[0] * 4294967296 + sharedData[1] + from;\n}\nfunction unsafeUniformIntDistribution(from, to, rng) {\n  var rangeSize = to - from;\n  if (rangeSize <= 4294967295) {\n    var g = unsafeUniformIntDistributionInternal(rangeSize + 1, rng);\n    return g + from;\n  }\n  return uniformLargeIntInternal(from, to, rangeSize, rng);\n}\n\n// ../../../node_modules/pure-rand/lib/esm/distribution/UniformIntDistribution.js\nfunction uniformIntDistribution(from, to, rng) {\n  if (rng != null) {\n    var nextRng = rng.clone();\n    return [unsafeUniformIntDistribution(from, to, nextRng), nextRng];\n  }\n  return function (rng2) {\n    var nextRng2 = rng2.clone();\n    return [unsafeUniformIntDistribution(from, to, nextRng2), nextRng2];\n  };\n}\n\n// ../../../node_modules/pure-rand/lib/esm/pure-rand-default.js\nvar __type = 'module';\nvar __version = '6.1.0';\nvar __commitHash = 'a413dd2b721516be2ef29adffb515c5ae67bfbad';\n\n// ../../../node_modules/pure-rand/lib/esm/pure-rand.js\nvar pure_rand_default = pure_rand_default_exports;\n\n// ../../../node_modules/fast-check/lib/esm/check/runner/configuration/VerbosityLevel.js\nvar VerbosityLevel;\n(function (VerbosityLevel2) {\n  VerbosityLevel2[(VerbosityLevel2['None'] = 0)] = 'None';\n  VerbosityLevel2[(VerbosityLevel2['Verbose'] = 1)] = 'Verbose';\n  VerbosityLevel2[(VerbosityLevel2['VeryVerbose'] = 2)] = 'VeryVerbose';\n})(VerbosityLevel || (VerbosityLevel = {}));\n\n// ../../../node_modules/fast-check/lib/esm/check/runner/configuration/QualifiedParameters.js\nvar safeDateNow = Date.now;\nvar safeMathMin = Math.min;\nvar safeMathRandom = Math.random;\nvar QualifiedParameters = class _QualifiedParameters {\n  constructor(op) {\n    const p = op || {};\n    this.seed = _QualifiedParameters.readSeed(p);\n    this.randomType = _QualifiedParameters.readRandomType(p);\n    this.numRuns = _QualifiedParameters.readNumRuns(p);\n    this.verbose = _QualifiedParameters.readVerbose(p);\n    this.maxSkipsPerRun = _QualifiedParameters.readOrDefault(\n      p,\n      'maxSkipsPerRun',\n      100,\n    );\n    this.timeout = _QualifiedParameters.safeTimeout(\n      _QualifiedParameters.readOrDefault(p, 'timeout', null),\n    );\n    this.skipAllAfterTimeLimit = _QualifiedParameters.safeTimeout(\n      _QualifiedParameters.readOrDefault(p, 'skipAllAfterTimeLimit', null),\n    );\n    this.interruptAfterTimeLimit = _QualifiedParameters.safeTimeout(\n      _QualifiedParameters.readOrDefault(p, 'interruptAfterTimeLimit', null),\n    );\n    this.markInterruptAsFailure = _QualifiedParameters.readBoolean(\n      p,\n      'markInterruptAsFailure',\n    );\n    this.skipEqualValues = _QualifiedParameters.readBoolean(\n      p,\n      'skipEqualValues',\n    );\n    this.ignoreEqualValues = _QualifiedParameters.readBoolean(\n      p,\n      'ignoreEqualValues',\n    );\n    this.logger = _QualifiedParameters.readOrDefault(p, 'logger', (v) => {\n      console.log(v);\n    });\n    this.path = _QualifiedParameters.readOrDefault(p, 'path', '');\n    this.unbiased = _QualifiedParameters.readBoolean(p, 'unbiased');\n    this.examples = _QualifiedParameters.readOrDefault(p, 'examples', []);\n    this.endOnFailure = _QualifiedParameters.readBoolean(p, 'endOnFailure');\n    this.reporter = _QualifiedParameters.readOrDefault(p, 'reporter', null);\n    this.asyncReporter = _QualifiedParameters.readOrDefault(\n      p,\n      'asyncReporter',\n      null,\n    );\n    this.errorWithCause = _QualifiedParameters.readBoolean(p, 'errorWithCause');\n  }\n  toParameters() {\n    const orUndefined = (value) => (value !== null ? value : void 0);\n    const parameters = {\n      seed: this.seed,\n      randomType: this.randomType,\n      numRuns: this.numRuns,\n      maxSkipsPerRun: this.maxSkipsPerRun,\n      timeout: orUndefined(this.timeout),\n      skipAllAfterTimeLimit: orUndefined(this.skipAllAfterTimeLimit),\n      interruptAfterTimeLimit: orUndefined(this.interruptAfterTimeLimit),\n      markInterruptAsFailure: this.markInterruptAsFailure,\n      skipEqualValues: this.skipEqualValues,\n      ignoreEqualValues: this.ignoreEqualValues,\n      path: this.path,\n      logger: this.logger,\n      unbiased: this.unbiased,\n      verbose: this.verbose,\n      examples: this.examples,\n      endOnFailure: this.endOnFailure,\n      reporter: orUndefined(this.reporter),\n      asyncReporter: orUndefined(this.asyncReporter),\n      errorWithCause: this.errorWithCause,\n    };\n    return parameters;\n  }\n  static read(op) {\n    return new _QualifiedParameters(op);\n  }\n};\nQualifiedParameters.createQualifiedRandomGenerator = (random) => {\n  return (seed) => {\n    const rng = random(seed);\n    if (rng.unsafeJump === void 0) {\n      rng.unsafeJump = () => unsafeSkipN(rng, 42);\n    }\n    return rng;\n  };\n};\nQualifiedParameters.readSeed = (p) => {\n  if (p.seed == null) return safeDateNow() ^ (safeMathRandom() * 4294967296);\n  const seed32 = p.seed | 0;\n  if (p.seed === seed32) return seed32;\n  const gap = p.seed - seed32;\n  return seed32 ^ (gap * 4294967296);\n};\nQualifiedParameters.readRandomType = (p) => {\n  if (p.randomType == null) return pure_rand_default.xorshift128plus;\n  if (typeof p.randomType === 'string') {\n    switch (p.randomType) {\n      case 'mersenne':\n        return QualifiedParameters.createQualifiedRandomGenerator(\n          pure_rand_default.mersenne,\n        );\n      case 'congruential':\n      case 'congruential32':\n        return QualifiedParameters.createQualifiedRandomGenerator(\n          pure_rand_default.congruential32,\n        );\n      case 'xorshift128plus':\n        return pure_rand_default.xorshift128plus;\n      case 'xoroshiro128plus':\n        return pure_rand_default.xoroshiro128plus;\n      default:\n        throw new Error(`Invalid random specified: '${p.randomType}'`);\n    }\n  }\n  const mrng = p.randomType(0);\n  if ('min' in mrng && mrng.min !== -2147483648) {\n    throw new Error(\n      `Invalid random number generator: min must equal -0x80000000, got ${String(mrng.min)}`,\n    );\n  }\n  if ('max' in mrng && mrng.max !== 2147483647) {\n    throw new Error(\n      `Invalid random number generator: max must equal 0x7fffffff, got ${String(mrng.max)}`,\n    );\n  }\n  if ('unsafeJump' in mrng) {\n    return p.randomType;\n  }\n  return QualifiedParameters.createQualifiedRandomGenerator(p.randomType);\n};\nQualifiedParameters.readNumRuns = (p) => {\n  const defaultValue = 100;\n  if (p.numRuns != null) return p.numRuns;\n  if (p.num_runs != null) return p.num_runs;\n  return defaultValue;\n};\nQualifiedParameters.readVerbose = (p) => {\n  if (p.verbose == null) return VerbosityLevel.None;\n  if (typeof p.verbose === 'boolean') {\n    return p.verbose === true ? VerbosityLevel.Verbose : VerbosityLevel.None;\n  }\n  if (p.verbose <= VerbosityLevel.None) {\n    return VerbosityLevel.None;\n  }\n  if (p.verbose >= VerbosityLevel.VeryVerbose) {\n    return VerbosityLevel.VeryVerbose;\n  }\n  return p.verbose | 0;\n};\nQualifiedParameters.readBoolean = (p, key) => p[key] === true;\nQualifiedParameters.readOrDefault = (p, key, defaultValue) => {\n  const value = p[key];\n  return value != null ? value : defaultValue;\n};\nQualifiedParameters.safeTimeout = (value) => {\n  if (value === null) {\n    return null;\n  }\n  return safeMathMin(value, 2147483647);\n};\n\n// ../../../node_modules/fast-check/lib/esm/check/property/SkipAfterProperty.js\nfunction interruptAfter(timeMs, setTimeoutSafe, clearTimeoutSafe) {\n  let timeoutHandle = null;\n  const promise = new Promise((resolve) => {\n    timeoutHandle = setTimeoutSafe(() => {\n      const preconditionFailure = new PreconditionFailure(true);\n      resolve(preconditionFailure);\n    }, timeMs);\n  });\n  return {\n    clear: () => clearTimeoutSafe(timeoutHandle),\n    promise,\n  };\n}\nvar SkipAfterProperty = class {\n  constructor(\n    property2,\n    getTime,\n    timeLimit,\n    interruptExecution,\n    setTimeoutSafe,\n    clearTimeoutSafe,\n  ) {\n    this.property = property2;\n    this.getTime = getTime;\n    this.interruptExecution = interruptExecution;\n    this.setTimeoutSafe = setTimeoutSafe;\n    this.clearTimeoutSafe = clearTimeoutSafe;\n    this.skipAfterTime = this.getTime() + timeLimit;\n    if (\n      this.property.runBeforeEach !== void 0 &&\n      this.property.runAfterEach !== void 0\n    ) {\n      this.runBeforeEach = () => this.property.runBeforeEach();\n      this.runAfterEach = () => this.property.runAfterEach();\n    }\n  }\n  isAsync() {\n    return this.property.isAsync();\n  }\n  generate(mrng, runId) {\n    return this.property.generate(mrng, runId);\n  }\n  shrink(value) {\n    return this.property.shrink(value);\n  }\n  run(v, dontRunHook) {\n    const remainingTime = this.skipAfterTime - this.getTime();\n    if (remainingTime <= 0) {\n      const preconditionFailure = new PreconditionFailure(\n        this.interruptExecution,\n      );\n      if (this.isAsync()) {\n        return Promise.resolve(preconditionFailure);\n      } else {\n        return preconditionFailure;\n      }\n    }\n    if (this.interruptExecution && this.isAsync()) {\n      const t = interruptAfter(\n        remainingTime,\n        this.setTimeoutSafe,\n        this.clearTimeoutSafe,\n      );\n      const propRun = Promise.race([\n        this.property.run(v, dontRunHook),\n        t.promise,\n      ]);\n      propRun.then(t.clear, t.clear);\n      return propRun;\n    }\n    return this.property.run(v, dontRunHook);\n  }\n};\n\n// ../../../node_modules/fast-check/lib/esm/check/property/TimeoutProperty.js\nvar timeoutAfter = (timeMs, setTimeoutSafe, clearTimeoutSafe) => {\n  let timeoutHandle = null;\n  const promise = new Promise((resolve) => {\n    timeoutHandle = setTimeoutSafe(() => {\n      resolve({\n        error: new SError(\n          `Property timeout: exceeded limit of ${timeMs} milliseconds`,\n        ),\n        errorMessage: `Property timeout: exceeded limit of ${timeMs} milliseconds`,\n      });\n    }, timeMs);\n  });\n  return {\n    clear: () => clearTimeoutSafe(timeoutHandle),\n    promise,\n  };\n};\nvar TimeoutProperty = class {\n  constructor(property2, timeMs, setTimeoutSafe, clearTimeoutSafe) {\n    this.property = property2;\n    this.timeMs = timeMs;\n    this.setTimeoutSafe = setTimeoutSafe;\n    this.clearTimeoutSafe = clearTimeoutSafe;\n    if (\n      this.property.runBeforeEach !== void 0 &&\n      this.property.runAfterEach !== void 0\n    ) {\n      this.runBeforeEach = () => Promise.resolve(this.property.runBeforeEach());\n      this.runAfterEach = () => Promise.resolve(this.property.runAfterEach());\n    }\n  }\n  isAsync() {\n    return true;\n  }\n  generate(mrng, runId) {\n    return this.property.generate(mrng, runId);\n  }\n  shrink(value) {\n    return this.property.shrink(value);\n  }\n  async run(v, dontRunHook) {\n    const t = timeoutAfter(\n      this.timeMs,\n      this.setTimeoutSafe,\n      this.clearTimeoutSafe,\n    );\n    const propRun = Promise.race([\n      this.property.run(v, dontRunHook),\n      t.promise,\n    ]);\n    propRun.then(t.clear, t.clear);\n    return propRun;\n  }\n};\n\n// ../../../node_modules/fast-check/lib/esm/check/property/UnbiasedProperty.js\nvar UnbiasedProperty = class {\n  constructor(property2) {\n    this.property = property2;\n    if (\n      this.property.runBeforeEach !== void 0 &&\n      this.property.runAfterEach !== void 0\n    ) {\n      this.runBeforeEach = () => this.property.runBeforeEach();\n      this.runAfterEach = () => this.property.runAfterEach();\n    }\n  }\n  isAsync() {\n    return this.property.isAsync();\n  }\n  generate(mrng, _runId) {\n    return this.property.generate(mrng, void 0);\n  }\n  shrink(value) {\n    return this.property.shrink(value);\n  }\n  run(v, dontRunHook) {\n    return this.property.run(v, dontRunHook);\n  }\n};\n\n// ../../../node_modules/fast-check/lib/esm/utils/stringify.js\nvar safeArrayFrom = Array.from;\nvar safeBufferIsBuffer =\n  typeof Buffer !== 'undefined' ? Buffer.isBuffer : void 0;\nvar safeJsonStringify = JSON.stringify;\nvar safeNumberIsNaN = Number.isNaN;\nvar safeObjectKeys = Object.keys;\nvar safeObjectGetOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar safeObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar safeObjectGetPrototypeOf = Object.getPrototypeOf;\nvar safeNegativeInfinity = Number.NEGATIVE_INFINITY;\nvar safePositiveInfinity = Number.POSITIVE_INFINITY;\nvar toStringMethod = Symbol('fast-check/toStringMethod');\nfunction hasToStringMethod(instance) {\n  return (\n    instance !== null &&\n    (typeof instance === 'object' || typeof instance === 'function') &&\n    toStringMethod in instance &&\n    typeof instance[toStringMethod] === 'function'\n  );\n}\nvar asyncToStringMethod = Symbol('fast-check/asyncToStringMethod');\nfunction hasAsyncToStringMethod(instance) {\n  return (\n    instance !== null &&\n    (typeof instance === 'object' || typeof instance === 'function') &&\n    asyncToStringMethod in instance &&\n    typeof instance[asyncToStringMethod] === 'function'\n  );\n}\nvar findSymbolNameRegex = /^Symbol\\((.*)\\)$/;\nfunction getSymbolDescription(s) {\n  if (s.description !== void 0) return s.description;\n  const m = findSymbolNameRegex.exec(SString(s));\n  return m && m[1].length ? m[1] : null;\n}\nfunction stringifyNumber(numValue) {\n  switch (numValue) {\n    case 0:\n      return 1 / numValue === safeNegativeInfinity ? '-0' : '0';\n    case safeNegativeInfinity:\n      return 'Number.NEGATIVE_INFINITY';\n    case safePositiveInfinity:\n      return 'Number.POSITIVE_INFINITY';\n    default:\n      return numValue === numValue ? SString(numValue) : 'Number.NaN';\n  }\n}\nfunction isSparseArray(arr) {\n  let previousNumberedIndex = -1;\n  for (const index in arr) {\n    const numberedIndex = Number(index);\n    if (numberedIndex !== previousNumberedIndex + 1) return true;\n    previousNumberedIndex = numberedIndex;\n  }\n  return previousNumberedIndex + 1 !== arr.length;\n}\nfunction stringifyInternal(value, previousValues, getAsyncContent) {\n  const currentValues = [...previousValues, value];\n  if (typeof value === 'object') {\n    if (safeIndexOf(previousValues, value) !== -1) {\n      return '[cyclic]';\n    }\n  }\n  if (hasAsyncToStringMethod(value)) {\n    const content = getAsyncContent(value);\n    if (content.state === 'fulfilled') {\n      return content.value;\n    }\n  }\n  if (hasToStringMethod(value)) {\n    try {\n      return value[toStringMethod]();\n    } catch (err) {}\n  }\n  switch (safeToString(value)) {\n    case '[object Array]': {\n      const arr = value;\n      if (arr.length >= 50 && isSparseArray(arr)) {\n        const assignments = [];\n        for (const index in arr) {\n          if (!safeNumberIsNaN(Number(index)))\n            safePush(\n              assignments,\n              `${index}:${stringifyInternal(arr[index], currentValues, getAsyncContent)}`,\n            );\n        }\n        return assignments.length !== 0\n          ? `Object.assign(Array(${arr.length}),{${safeJoin(assignments, ',')}})`\n          : `Array(${arr.length})`;\n      }\n      const stringifiedArray = safeJoin(\n        safeMap(arr, (v) =>\n          stringifyInternal(v, currentValues, getAsyncContent),\n        ),\n        ',',\n      );\n      return arr.length === 0 || arr.length - 1 in arr\n        ? `[${stringifiedArray}]`\n        : `[${stringifiedArray},]`;\n    }\n    case '[object BigInt]':\n      return `${value}n`;\n    case '[object Boolean]': {\n      const unboxedToString = value == true ? 'true' : 'false';\n      return typeof value === 'boolean'\n        ? unboxedToString\n        : `new Boolean(${unboxedToString})`;\n    }\n    case '[object Date]': {\n      const d = value;\n      return safeNumberIsNaN(safeGetTime(d))\n        ? `new Date(NaN)`\n        : `new Date(${safeJsonStringify(safeToISOString(d))})`;\n    }\n    case '[object Map]':\n      return `new Map(${stringifyInternal(Array.from(value), currentValues, getAsyncContent)})`;\n    case '[object Null]':\n      return `null`;\n    case '[object Number]':\n      return typeof value === 'number'\n        ? stringifyNumber(value)\n        : `new Number(${stringifyNumber(Number(value))})`;\n    case '[object Object]': {\n      try {\n        const toStringAccessor = value.toString;\n        if (\n          typeof toStringAccessor === 'function' &&\n          toStringAccessor !== Object.prototype.toString\n        ) {\n          return value.toString();\n        }\n      } catch (err) {\n        return '[object Object]';\n      }\n      const mapper = (k) =>\n        `${k === '__proto__' ? '[\"__proto__\"]' : typeof k === 'symbol' ? `[${stringifyInternal(k, currentValues, getAsyncContent)}]` : safeJsonStringify(k)}:${stringifyInternal(value[k], currentValues, getAsyncContent)}`;\n      const stringifiedProperties = [\n        ...safeMap(safeObjectKeys(value), mapper),\n        ...safeMap(\n          safeFilter(safeObjectGetOwnPropertySymbols(value), (s) => {\n            const descriptor = safeObjectGetOwnPropertyDescriptor(value, s);\n            return descriptor && descriptor.enumerable;\n          }),\n          mapper,\n        ),\n      ];\n      const rawRepr = '{' + safeJoin(stringifiedProperties, ',') + '}';\n      if (safeObjectGetPrototypeOf(value) === null) {\n        return rawRepr === '{}'\n          ? 'Object.create(null)'\n          : `Object.assign(Object.create(null),${rawRepr})`;\n      }\n      return rawRepr;\n    }\n    case '[object Set]':\n      return `new Set(${stringifyInternal(Array.from(value), currentValues, getAsyncContent)})`;\n    case '[object String]':\n      return typeof value === 'string'\n        ? safeJsonStringify(value)\n        : `new String(${safeJsonStringify(value)})`;\n    case '[object Symbol]': {\n      const s = value;\n      if (Symbol.keyFor(s) !== void 0) {\n        return `Symbol.for(${safeJsonStringify(Symbol.keyFor(s))})`;\n      }\n      const desc = getSymbolDescription(s);\n      if (desc === null) {\n        return 'Symbol()';\n      }\n      const knownSymbol =\n        desc.startsWith('Symbol.') && Symbol[desc.substring(7)];\n      return s === knownSymbol ? desc : `Symbol(${safeJsonStringify(desc)})`;\n    }\n    case '[object Promise]': {\n      const promiseContent = getAsyncContent(value);\n      switch (promiseContent.state) {\n        case 'fulfilled':\n          return `Promise.resolve(${stringifyInternal(promiseContent.value, currentValues, getAsyncContent)})`;\n        case 'rejected':\n          return `Promise.reject(${stringifyInternal(promiseContent.value, currentValues, getAsyncContent)})`;\n        case 'pending':\n          return `new Promise(() => {/*pending*/})`;\n        case 'unknown':\n        default:\n          return `new Promise(() => {/*unknown*/})`;\n      }\n    }\n    case '[object Error]':\n      if (value instanceof Error) {\n        return `new Error(${stringifyInternal(value.message, currentValues, getAsyncContent)})`;\n      }\n      break;\n    case '[object Undefined]':\n      return `undefined`;\n    case '[object Int8Array]':\n    case '[object Uint8Array]':\n    case '[object Uint8ClampedArray]':\n    case '[object Int16Array]':\n    case '[object Uint16Array]':\n    case '[object Int32Array]':\n    case '[object Uint32Array]':\n    case '[object Float32Array]':\n    case '[object Float64Array]':\n    case '[object BigInt64Array]':\n    case '[object BigUint64Array]': {\n      if (\n        typeof safeBufferIsBuffer === 'function' &&\n        safeBufferIsBuffer(value)\n      ) {\n        return `Buffer.from(${stringifyInternal(safeArrayFrom(value.values()), currentValues, getAsyncContent)})`;\n      }\n      const valuePrototype = safeObjectGetPrototypeOf(value);\n      const className =\n        valuePrototype &&\n        valuePrototype.constructor &&\n        valuePrototype.constructor.name;\n      if (typeof className === 'string') {\n        const typedArray2 = value;\n        const valuesFromTypedArr = typedArray2.values();\n        return `${className}.from(${stringifyInternal(safeArrayFrom(valuesFromTypedArr), currentValues, getAsyncContent)})`;\n      }\n      break;\n    }\n  }\n  try {\n    return value.toString();\n  } catch (_a) {\n    return safeToString(value);\n  }\n}\nfunction stringify(value) {\n  return stringifyInternal(value, [], () => ({\n    state: 'unknown',\n    value: void 0,\n  }));\n}\nfunction possiblyAsyncStringify(value) {\n  const stillPendingMarker = Symbol();\n  const pendingPromisesForCache = [];\n  const cache = /* @__PURE__ */ new Map();\n  function createDelay0() {\n    let handleId = null;\n    const cancel = () => {\n      if (handleId !== null) {\n        clearTimeout(handleId);\n      }\n    };\n    const delay = new Promise((resolve) => {\n      handleId = setTimeout(() => {\n        handleId = null;\n        resolve(stillPendingMarker);\n      }, 0);\n    });\n    return { delay, cancel };\n  }\n  const unknownState = { state: 'unknown', value: void 0 };\n  const getAsyncContent = function getAsyncContent2(data) {\n    const cacheKey = data;\n    if (cache.has(cacheKey)) {\n      return cache.get(cacheKey);\n    }\n    const delay0 = createDelay0();\n    const p =\n      asyncToStringMethod in data\n        ? Promise.resolve().then(() => data[asyncToStringMethod]())\n        : data;\n    p.catch(() => {});\n    pendingPromisesForCache.push(\n      Promise.race([p, delay0.delay]).then(\n        (successValue) => {\n          if (successValue === stillPendingMarker)\n            cache.set(cacheKey, { state: 'pending', value: void 0 });\n          else cache.set(cacheKey, { state: 'fulfilled', value: successValue });\n          delay0.cancel();\n        },\n        (errorValue) => {\n          cache.set(cacheKey, { state: 'rejected', value: errorValue });\n          delay0.cancel();\n        },\n      ),\n    );\n    cache.set(cacheKey, unknownState);\n    return unknownState;\n  };\n  function loop() {\n    const stringifiedValue = stringifyInternal(value, [], getAsyncContent);\n    if (pendingPromisesForCache.length === 0) {\n      return stringifiedValue;\n    }\n    return Promise.all(pendingPromisesForCache.splice(0)).then(loop);\n  }\n  return loop();\n}\nasync function asyncStringify(value) {\n  return Promise.resolve(possiblyAsyncStringify(value));\n}\n\n// ../../../node_modules/fast-check/lib/esm/check/property/IgnoreEqualValuesProperty.js\nfunction fromSyncCached(cachedValue) {\n  return cachedValue === null ? new PreconditionFailure() : cachedValue;\n}\nfunction fromCached(...data) {\n  if (data[1]) return data[0].then(fromSyncCached);\n  return fromSyncCached(data[0]);\n}\nfunction fromCachedUnsafe(cachedValue, isAsync) {\n  return fromCached(cachedValue, isAsync);\n}\nvar IgnoreEqualValuesProperty = class {\n  constructor(property2, skipRuns) {\n    this.property = property2;\n    this.skipRuns = skipRuns;\n    this.coveredCases = /* @__PURE__ */ new Map();\n    if (\n      this.property.runBeforeEach !== void 0 &&\n      this.property.runAfterEach !== void 0\n    ) {\n      this.runBeforeEach = () => this.property.runBeforeEach();\n      this.runAfterEach = () => this.property.runAfterEach();\n    }\n  }\n  isAsync() {\n    return this.property.isAsync();\n  }\n  generate(mrng, runId) {\n    return this.property.generate(mrng, runId);\n  }\n  shrink(value) {\n    return this.property.shrink(value);\n  }\n  run(v, dontRunHook) {\n    const stringifiedValue = stringify(v);\n    if (this.coveredCases.has(stringifiedValue)) {\n      const lastOutput = this.coveredCases.get(stringifiedValue);\n      if (!this.skipRuns) {\n        return lastOutput;\n      }\n      return fromCachedUnsafe(lastOutput, this.property.isAsync());\n    }\n    const out = this.property.run(v, dontRunHook);\n    this.coveredCases.set(stringifiedValue, out);\n    return out;\n  }\n};\n\n// ../../../node_modules/fast-check/lib/esm/check/runner/DecorateProperty.js\nvar safeDateNow2 = Date.now;\nvar safeSetTimeout = setTimeout;\nvar safeClearTimeout = clearTimeout;\nfunction decorateProperty(rawProperty, qParams) {\n  let prop = rawProperty;\n  if (rawProperty.isAsync() && qParams.timeout != null) {\n    prop = new TimeoutProperty(\n      prop,\n      qParams.timeout,\n      safeSetTimeout,\n      safeClearTimeout,\n    );\n  }\n  if (qParams.unbiased) {\n    prop = new UnbiasedProperty(prop);\n  }\n  if (qParams.skipAllAfterTimeLimit != null) {\n    prop = new SkipAfterProperty(\n      prop,\n      safeDateNow2,\n      qParams.skipAllAfterTimeLimit,\n      false,\n      safeSetTimeout,\n      safeClearTimeout,\n    );\n  }\n  if (qParams.interruptAfterTimeLimit != null) {\n    prop = new SkipAfterProperty(\n      prop,\n      safeDateNow2,\n      qParams.interruptAfterTimeLimit,\n      true,\n      safeSetTimeout,\n      safeClearTimeout,\n    );\n  }\n  if (qParams.skipEqualValues) {\n    prop = new IgnoreEqualValuesProperty(prop, true);\n  }\n  if (qParams.ignoreEqualValues) {\n    prop = new IgnoreEqualValuesProperty(prop, false);\n  }\n  return prop;\n}\n\n// ../../../node_modules/fast-check/lib/esm/check/runner/reporter/ExecutionStatus.js\nvar ExecutionStatus;\n(function (ExecutionStatus2) {\n  ExecutionStatus2[(ExecutionStatus2['Success'] = 0)] = 'Success';\n  ExecutionStatus2[(ExecutionStatus2['Skipped'] = -1)] = 'Skipped';\n  ExecutionStatus2[(ExecutionStatus2['Failure'] = 1)] = 'Failure';\n})(ExecutionStatus || (ExecutionStatus = {}));\n\n// ../../../node_modules/fast-check/lib/esm/check/runner/reporter/RunExecution.js\nvar RunExecution = class _RunExecution {\n  constructor(verbosity, interruptedAsFailure) {\n    this.verbosity = verbosity;\n    this.interruptedAsFailure = interruptedAsFailure;\n    this.isSuccess = () => this.pathToFailure == null;\n    this.firstFailure = () =>\n      this.pathToFailure ? +safeSplit(this.pathToFailure, ':')[0] : -1;\n    this.numShrinks = () =>\n      this.pathToFailure ? safeSplit(this.pathToFailure, ':').length - 1 : 0;\n    this.rootExecutionTrees = [];\n    this.currentLevelExecutionTrees = this.rootExecutionTrees;\n    this.failure = null;\n    this.numSkips = 0;\n    this.numSuccesses = 0;\n    this.interrupted = false;\n  }\n  appendExecutionTree(status, value) {\n    const currentTree = { status, value, children: [] };\n    this.currentLevelExecutionTrees.push(currentTree);\n    return currentTree;\n  }\n  fail(value, id, failure) {\n    if (this.verbosity >= VerbosityLevel.Verbose) {\n      const currentTree = this.appendExecutionTree(\n        ExecutionStatus.Failure,\n        value,\n      );\n      this.currentLevelExecutionTrees = currentTree.children;\n    }\n    if (this.pathToFailure == null) this.pathToFailure = `${id}`;\n    else this.pathToFailure += `:${id}`;\n    this.value = value;\n    this.failure = failure;\n  }\n  skip(value) {\n    if (this.verbosity >= VerbosityLevel.VeryVerbose) {\n      this.appendExecutionTree(ExecutionStatus.Skipped, value);\n    }\n    if (this.pathToFailure == null) {\n      ++this.numSkips;\n    }\n  }\n  success(value) {\n    if (this.verbosity >= VerbosityLevel.VeryVerbose) {\n      this.appendExecutionTree(ExecutionStatus.Success, value);\n    }\n    if (this.pathToFailure == null) {\n      ++this.numSuccesses;\n    }\n  }\n  interrupt() {\n    this.interrupted = true;\n  }\n  extractFailures() {\n    if (this.isSuccess()) {\n      return [];\n    }\n    const failures = [];\n    let cursor = this.rootExecutionTrees;\n    while (\n      cursor.length > 0 &&\n      cursor[cursor.length - 1].status === ExecutionStatus.Failure\n    ) {\n      const failureTree = cursor[cursor.length - 1];\n      failures.push(failureTree.value);\n      cursor = failureTree.children;\n    }\n    return failures;\n  }\n  toRunDetails(seed, basePath, maxSkips, qParams) {\n    if (!this.isSuccess()) {\n      return {\n        failed: true,\n        interrupted: this.interrupted,\n        numRuns: this.firstFailure() + 1 - this.numSkips,\n        numSkips: this.numSkips,\n        numShrinks: this.numShrinks(),\n        seed,\n        counterexample: this.value,\n        counterexamplePath: _RunExecution.mergePaths(\n          basePath,\n          this.pathToFailure,\n        ),\n        error: this.failure.errorMessage,\n        errorInstance: this.failure.error,\n        failures: this.extractFailures(),\n        executionSummary: this.rootExecutionTrees,\n        verbose: this.verbosity,\n        runConfiguration: qParams.toParameters(),\n      };\n    }\n    const considerInterruptedAsFailure =\n      this.interruptedAsFailure || this.numSuccesses === 0;\n    const failed =\n      this.numSkips > maxSkips ||\n      (this.interrupted && considerInterruptedAsFailure);\n    const out = {\n      failed,\n      interrupted: this.interrupted,\n      numRuns: this.numSuccesses,\n      numSkips: this.numSkips,\n      numShrinks: 0,\n      seed,\n      counterexample: null,\n      counterexamplePath: null,\n      error: null,\n      errorInstance: null,\n      failures: [],\n      executionSummary: this.rootExecutionTrees,\n      verbose: this.verbosity,\n      runConfiguration: qParams.toParameters(),\n    };\n    return out;\n  }\n};\nRunExecution.mergePaths = (offsetPath, path) => {\n  if (offsetPath.length === 0) return path;\n  const offsetItems = offsetPath.split(':');\n  const remainingItems = path.split(':');\n  const middle = +offsetItems[offsetItems.length - 1] + +remainingItems[0];\n  return [\n    ...offsetItems.slice(0, offsetItems.length - 1),\n    `${middle}`,\n    ...remainingItems.slice(1),\n  ].join(':');\n};\n\n// ../../../node_modules/fast-check/lib/esm/check/runner/RunnerIterator.js\nvar RunnerIterator = class {\n  constructor(sourceValues, shrink, verbose, interruptedAsFailure) {\n    this.sourceValues = sourceValues;\n    this.shrink = shrink;\n    this.runExecution = new RunExecution(verbose, interruptedAsFailure);\n    this.currentIdx = -1;\n    this.nextValues = sourceValues;\n  }\n  [Symbol.iterator]() {\n    return this;\n  }\n  next() {\n    const nextValue = this.nextValues.next();\n    if (nextValue.done || this.runExecution.interrupted) {\n      return { done: true, value: void 0 };\n    }\n    this.currentValue = nextValue.value;\n    ++this.currentIdx;\n    return { done: false, value: nextValue.value.value_ };\n  }\n  handleResult(result) {\n    if (\n      result != null &&\n      typeof result === 'object' &&\n      !PreconditionFailure.isFailure(result)\n    ) {\n      this.runExecution.fail(this.currentValue.value_, this.currentIdx, result);\n      this.currentIdx = -1;\n      this.nextValues = this.shrink(this.currentValue);\n    } else if (result != null) {\n      if (!result.interruptExecution) {\n        this.runExecution.skip(this.currentValue.value_);\n        this.sourceValues.skippedOne();\n      } else {\n        this.runExecution.interrupt();\n      }\n    } else {\n      this.runExecution.success(this.currentValue.value_);\n    }\n  }\n};\n\n// ../../../node_modules/fast-check/lib/esm/check/runner/SourceValuesIterator.js\nvar SourceValuesIterator = class {\n  constructor(initialValues, maxInitialIterations, remainingSkips) {\n    this.initialValues = initialValues;\n    this.maxInitialIterations = maxInitialIterations;\n    this.remainingSkips = remainingSkips;\n  }\n  [Symbol.iterator]() {\n    return this;\n  }\n  next() {\n    if (--this.maxInitialIterations !== -1 && this.remainingSkips >= 0) {\n      const n = this.initialValues.next();\n      if (!n.done) return { value: n.value, done: false };\n    }\n    return { value: void 0, done: true };\n  }\n  skippedOne() {\n    --this.remainingSkips;\n    ++this.maxInitialIterations;\n  }\n};\n\n// ../../../node_modules/fast-check/lib/esm/random/generator/Random.js\nvar Random = class _Random {\n  constructor(sourceRng) {\n    this.internalRng = sourceRng.clone();\n  }\n  clone() {\n    return new _Random(this.internalRng);\n  }\n  next(bits) {\n    return unsafeUniformIntDistribution(0, (1 << bits) - 1, this.internalRng);\n  }\n  nextBoolean() {\n    return unsafeUniformIntDistribution(0, 1, this.internalRng) == 1;\n  }\n  nextInt(min, max) {\n    return unsafeUniformIntDistribution(\n      min == null ? _Random.MIN_INT : min,\n      max == null ? _Random.MAX_INT : max,\n      this.internalRng,\n    );\n  }\n  nextBigInt(min, max) {\n    return unsafeUniformBigIntDistribution(min, max, this.internalRng);\n  }\n  nextArrayInt(min, max) {\n    return unsafeUniformArrayIntDistribution(min, max, this.internalRng);\n  }\n  nextDouble() {\n    const a = this.next(26);\n    const b = this.next(27);\n    return (a * _Random.DBL_FACTOR + b) * _Random.DBL_DIVISOR;\n  }\n  getState() {\n    if (\n      'getState' in this.internalRng &&\n      typeof this.internalRng.getState === 'function'\n    ) {\n      return this.internalRng.getState();\n    }\n    return void 0;\n  }\n};\nRandom.MIN_INT = 2147483648 | 0;\nRandom.MAX_INT = 2147483647 | 0;\nRandom.DBL_FACTOR = Math.pow(2, 27);\nRandom.DBL_DIVISOR = Math.pow(2, -53);\n\n// ../../../node_modules/fast-check/lib/esm/check/runner/Tosser.js\nfunction tossNext(generator, rng, index) {\n  rng.unsafeJump();\n  return generator.generate(new Random(rng), index);\n}\nfunction* toss(generator, seed, random, examples) {\n  for (let idx = 0; idx !== examples.length; ++idx) {\n    yield new Value(examples[idx], void 0);\n  }\n  for (let idx = 0, rng = random(seed); ; ++idx) {\n    yield tossNext(generator, rng, idx);\n  }\n}\nfunction lazyGenerate(generator, rng, idx) {\n  return () => generator.generate(new Random(rng), idx);\n}\nfunction* lazyToss(generator, seed, random, examples) {\n  yield* safeMap(examples, (e) => () => new Value(e, void 0));\n  let idx = 0;\n  let rng = random(seed);\n  for (;;) {\n    rng = rng.jump ? rng.jump() : skipN(rng, 42);\n    yield lazyGenerate(generator, rng, idx++);\n  }\n}\n\n// ../../../node_modules/fast-check/lib/esm/check/runner/utils/PathWalker.js\nfunction produce(producer) {\n  return producer();\n}\nfunction pathWalk(path, initialProducers, shrink) {\n  const producers = initialProducers;\n  const segments = path.split(':').map((text) => +text);\n  if (segments.length === 0) {\n    return producers.map(produce);\n  }\n  if (!segments.every((v) => !Number.isNaN(v))) {\n    throw new Error(`Unable to replay, got invalid path=${path}`);\n  }\n  let values = producers.drop(segments[0]).map(produce);\n  for (const s of segments.slice(1)) {\n    const valueToShrink = values.getNthOrLast(0);\n    if (valueToShrink === null) {\n      throw new Error(`Unable to replay, got wrong path=${path}`);\n    }\n    values = shrink(valueToShrink).drop(s);\n  }\n  return values;\n}\n\n// ../../../node_modules/fast-check/lib/esm/check/runner/utils/RunDetailsFormatter.js\nvar safeObjectAssign2 = Object.assign;\nfunction formatHints(hints) {\n  if (hints.length === 1) {\n    return `Hint: ${hints[0]}`;\n  }\n  return hints.map((h2, idx) => `Hint (${idx + 1}): ${h2}`).join('\\n');\n}\nfunction formatFailures(failures, stringifyOne) {\n  return `Encountered failures were:\n- ${failures.map(stringifyOne).join('\\n- ')}`;\n}\nfunction formatExecutionSummary(executionTrees, stringifyOne) {\n  const summaryLines = [];\n  const remainingTreesAndDepth = [];\n  for (const tree of executionTrees.slice().reverse()) {\n    remainingTreesAndDepth.push({ depth: 1, tree });\n  }\n  while (remainingTreesAndDepth.length !== 0) {\n    const currentTreeAndDepth = remainingTreesAndDepth.pop();\n    const currentTree = currentTreeAndDepth.tree;\n    const currentDepth = currentTreeAndDepth.depth;\n    const statusIcon =\n      currentTree.status === ExecutionStatus.Success\n        ? '\\x1B[32m\\u221A\\x1B[0m'\n        : currentTree.status === ExecutionStatus.Failure\n          ? '\\x1B[31m\\xD7\\x1B[0m'\n          : '\\x1B[33m!\\x1B[0m';\n    const leftPadding = Array(currentDepth).join('. ');\n    summaryLines.push(\n      `${leftPadding}${statusIcon} ${stringifyOne(currentTree.value)}`,\n    );\n    for (const tree of currentTree.children.slice().reverse()) {\n      remainingTreesAndDepth.push({ depth: currentDepth + 1, tree });\n    }\n  }\n  return `Execution summary:\n${summaryLines.join('\\n')}`;\n}\nfunction preFormatTooManySkipped(out, stringifyOne) {\n  const message = `Failed to run property, too many pre-condition failures encountered\n{ seed: ${out.seed} }\n\nRan ${out.numRuns} time(s)\nSkipped ${out.numSkips} time(s)`;\n  let details = null;\n  const hints = [\n    'Try to reduce the number of rejected values by combining map, flatMap and built-in arbitraries',\n    'Increase failure tolerance by setting maxSkipsPerRun to an higher value',\n  ];\n  if (out.verbose >= VerbosityLevel.VeryVerbose) {\n    details = formatExecutionSummary(out.executionSummary, stringifyOne);\n  } else {\n    safePush(\n      hints,\n      'Enable verbose mode at level VeryVerbose in order to check all generated values and their associated status',\n    );\n  }\n  return { message, details, hints };\n}\nfunction preFormatFailure(out, stringifyOne) {\n  const noErrorInMessage = out.runConfiguration.errorWithCause;\n  const messageErrorPart = noErrorInMessage\n    ? ''\n    : `\nGot ${safeReplace(out.error, /^Error: /, 'error: ')}`;\n  const message = `Property failed after ${out.numRuns} tests\n{ seed: ${out.seed}, path: \"${out.counterexamplePath}\", endOnFailure: true }\nCounterexample: ${stringifyOne(out.counterexample)}\nShrunk ${out.numShrinks} time(s)${messageErrorPart}`;\n  let details = null;\n  const hints = [];\n  if (out.verbose >= VerbosityLevel.VeryVerbose) {\n    details = formatExecutionSummary(out.executionSummary, stringifyOne);\n  } else if (out.verbose === VerbosityLevel.Verbose) {\n    details = formatFailures(out.failures, stringifyOne);\n  } else {\n    safePush(\n      hints,\n      'Enable verbose mode in order to have the list of all failing values encountered during the run',\n    );\n  }\n  return { message, details, hints };\n}\nfunction preFormatEarlyInterrupted(out, stringifyOne) {\n  const message = `Property interrupted after ${out.numRuns} tests\n{ seed: ${out.seed} }`;\n  let details = null;\n  const hints = [];\n  if (out.verbose >= VerbosityLevel.VeryVerbose) {\n    details = formatExecutionSummary(out.executionSummary, stringifyOne);\n  } else {\n    safePush(\n      hints,\n      'Enable verbose mode at level VeryVerbose in order to check all generated values and their associated status',\n    );\n  }\n  return { message, details, hints };\n}\nfunction defaultReportMessageInternal(out, stringifyOne) {\n  if (!out.failed) return;\n  const { message, details, hints } =\n    out.counterexamplePath === null\n      ? out.interrupted\n        ? preFormatEarlyInterrupted(out, stringifyOne)\n        : preFormatTooManySkipped(out, stringifyOne)\n      : preFormatFailure(out, stringifyOne);\n  let errorMessage = message;\n  if (details != null)\n    errorMessage += `\n\n${details}`;\n  if (hints.length > 0)\n    errorMessage += `\n\n${formatHints(hints)}`;\n  return errorMessage;\n}\nfunction defaultReportMessage(out) {\n  return defaultReportMessageInternal(out, stringify);\n}\nasync function asyncDefaultReportMessage(out) {\n  const pendingStringifieds = [];\n  function stringifyOne(value) {\n    const stringified = possiblyAsyncStringify(value);\n    if (typeof stringified === 'string') {\n      return stringified;\n    }\n    pendingStringifieds.push(Promise.all([value, stringified]));\n    return '\\u2026';\n  }\n  const firstTryMessage = defaultReportMessageInternal(out, stringifyOne);\n  if (pendingStringifieds.length === 0) {\n    return firstTryMessage;\n  }\n  const registeredValues = new Map(await Promise.all(pendingStringifieds));\n  function stringifySecond(value) {\n    const asyncStringifiedIfRegistered = registeredValues.get(value);\n    if (asyncStringifiedIfRegistered !== void 0) {\n      return asyncStringifiedIfRegistered;\n    }\n    return stringify(value);\n  }\n  return defaultReportMessageInternal(out, stringifySecond);\n}\nfunction buildError(errorMessage, out) {\n  if (!out.runConfiguration.errorWithCause) {\n    throw new SError(errorMessage);\n  }\n  const ErrorWithCause = SError;\n  const error = new ErrorWithCause(errorMessage, { cause: out.errorInstance });\n  if (!('cause' in error)) {\n    safeObjectAssign2(error, { cause: out.errorInstance });\n  }\n  return error;\n}\nfunction throwIfFailed(out) {\n  if (!out.failed) return;\n  throw buildError(defaultReportMessage(out), out);\n}\nasync function asyncThrowIfFailed(out) {\n  if (!out.failed) return;\n  throw buildError(await asyncDefaultReportMessage(out), out);\n}\nfunction reportRunDetails(out) {\n  if (out.runConfiguration.asyncReporter)\n    return out.runConfiguration.asyncReporter(out);\n  else if (out.runConfiguration.reporter)\n    return out.runConfiguration.reporter(out);\n  else return throwIfFailed(out);\n}\nasync function asyncReportRunDetails(out) {\n  if (out.runConfiguration.asyncReporter)\n    return out.runConfiguration.asyncReporter(out);\n  else if (out.runConfiguration.reporter)\n    return out.runConfiguration.reporter(out);\n  else return asyncThrowIfFailed(out);\n}\n\n// ../../../node_modules/fast-check/lib/esm/check/runner/Runner.js\nvar safeObjectAssign3 = Object.assign;\nfunction runIt(property2, shrink, sourceValues, verbose, interruptedAsFailure) {\n  const isModernProperty =\n    property2.runBeforeEach !== void 0 && property2.runAfterEach !== void 0;\n  const runner = new RunnerIterator(\n    sourceValues,\n    shrink,\n    verbose,\n    interruptedAsFailure,\n  );\n  for (const v of runner) {\n    if (isModernProperty) {\n      property2.runBeforeEach();\n    }\n    const out = property2.run(v, isModernProperty);\n    if (isModernProperty) {\n      property2.runAfterEach();\n    }\n    runner.handleResult(out);\n  }\n  return runner.runExecution;\n}\nasync function asyncRunIt(\n  property2,\n  shrink,\n  sourceValues,\n  verbose,\n  interruptedAsFailure,\n) {\n  const isModernProperty =\n    property2.runBeforeEach !== void 0 && property2.runAfterEach !== void 0;\n  const runner = new RunnerIterator(\n    sourceValues,\n    shrink,\n    verbose,\n    interruptedAsFailure,\n  );\n  for (const v of runner) {\n    if (isModernProperty) {\n      await property2.runBeforeEach();\n    }\n    const out = await property2.run(v, isModernProperty);\n    if (isModernProperty) {\n      await property2.runAfterEach();\n    }\n    runner.handleResult(out);\n  }\n  return runner.runExecution;\n}\nfunction check(rawProperty, params) {\n  if (rawProperty == null || rawProperty.generate == null)\n    throw new Error(\n      'Invalid property encountered, please use a valid property',\n    );\n  if (rawProperty.run == null)\n    throw new Error(\n      'Invalid property encountered, please use a valid property not an arbitrary',\n    );\n  const qParams = QualifiedParameters.read(\n    safeObjectAssign3(safeObjectAssign3({}, readConfigureGlobal()), params),\n  );\n  if (qParams.reporter !== null && qParams.asyncReporter !== null)\n    throw new Error(\n      'Invalid parameters encountered, reporter and asyncReporter cannot be specified together',\n    );\n  if (qParams.asyncReporter !== null && !rawProperty.isAsync())\n    throw new Error(\n      'Invalid parameters encountered, only asyncProperty can be used when asyncReporter specified',\n    );\n  const property2 = decorateProperty(rawProperty, qParams);\n  const maxInitialIterations =\n    qParams.path.length === 0 || qParams.path.indexOf(':') === -1\n      ? qParams.numRuns\n      : -1;\n  const maxSkips = qParams.numRuns * qParams.maxSkipsPerRun;\n  const shrink = (...args) => property2.shrink(...args);\n  const initialValues =\n    qParams.path.length === 0\n      ? toss(property2, qParams.seed, qParams.randomType, qParams.examples)\n      : pathWalk(\n          qParams.path,\n          stream(\n            lazyToss(\n              property2,\n              qParams.seed,\n              qParams.randomType,\n              qParams.examples,\n            ),\n          ),\n          shrink,\n        );\n  const sourceValues = new SourceValuesIterator(\n    initialValues,\n    maxInitialIterations,\n    maxSkips,\n  );\n  const finalShrink = !qParams.endOnFailure ? shrink : Stream.nil;\n  return property2.isAsync()\n    ? asyncRunIt(\n        property2,\n        finalShrink,\n        sourceValues,\n        qParams.verbose,\n        qParams.markInterruptAsFailure,\n      ).then((e) =>\n        e.toRunDetails(qParams.seed, qParams.path, maxSkips, qParams),\n      )\n    : runIt(\n        property2,\n        finalShrink,\n        sourceValues,\n        qParams.verbose,\n        qParams.markInterruptAsFailure,\n      ).toRunDetails(qParams.seed, qParams.path, maxSkips, qParams);\n}\nfunction assert(property2, params) {\n  const out = check(property2, params);\n  if (property2.isAsync()) return out.then(asyncReportRunDetails);\n  else reportRunDetails(out);\n}\n\n// ../../../node_modules/fast-check/lib/esm/check/runner/Sampler.js\nfunction toProperty(generator, qParams) {\n  const prop = !Object.prototype.hasOwnProperty.call(generator, 'isAsync')\n    ? new Property(generator, () => true)\n    : generator;\n  return qParams.unbiased === true ? new UnbiasedProperty(prop) : prop;\n}\nfunction streamSample(generator, params) {\n  const extendedParams =\n    typeof params === 'number'\n      ? Object.assign(Object.assign({}, readConfigureGlobal()), {\n          numRuns: params,\n        })\n      : Object.assign(Object.assign({}, readConfigureGlobal()), params);\n  const qParams = QualifiedParameters.read(extendedParams);\n  const nextProperty = toProperty(generator, qParams);\n  const shrink = nextProperty.shrink.bind(nextProperty);\n  const tossedValues =\n    qParams.path.length === 0\n      ? stream(\n          toss(\n            nextProperty,\n            qParams.seed,\n            qParams.randomType,\n            qParams.examples,\n          ),\n        )\n      : pathWalk(\n          qParams.path,\n          stream(\n            lazyToss(\n              nextProperty,\n              qParams.seed,\n              qParams.randomType,\n              qParams.examples,\n            ),\n          ),\n          shrink,\n        );\n  return tossedValues.take(qParams.numRuns).map((s) => s.value_);\n}\nfunction sample(generator, params) {\n  return [...streamSample(generator, params)];\n}\nfunction round2(n) {\n  return (Math.round(n * 100) / 100).toFixed(2);\n}\nfunction statistics(generator, classify, params) {\n  const extendedParams =\n    typeof params === 'number'\n      ? Object.assign(Object.assign({}, readConfigureGlobal()), {\n          numRuns: params,\n        })\n      : Object.assign(Object.assign({}, readConfigureGlobal()), params);\n  const qParams = QualifiedParameters.read(extendedParams);\n  const recorded = {};\n  for (const g of streamSample(generator, params)) {\n    const out = classify(g);\n    const categories = Array.isArray(out) ? out : [out];\n    for (const c of categories) {\n      recorded[c] = (recorded[c] || 0) + 1;\n    }\n  }\n  const data = Object.entries(recorded)\n    .sort((a, b) => b[1] - a[1])\n    .map((i) => [i[0], `${round2((i[1] * 100) / qParams.numRuns)}%`]);\n  const longestName = data\n    .map((i) => i[0].length)\n    .reduce((p, c) => Math.max(p, c), 0);\n  const longestPercent = data\n    .map((i) => i[1].length)\n    .reduce((p, c) => Math.max(p, c), 0);\n  for (const item of data) {\n    qParams.logger(\n      `${item[0].padEnd(longestName, '.')}..${item[1].padStart(longestPercent, '.')}`,\n    );\n  }\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/builders/GeneratorValueBuilder.js\nfunction buildGeneratorValue(\n  mrng,\n  biasFactor,\n  computePreBuiltValues,\n  arbitraryCache,\n) {\n  const preBuiltValues = computePreBuiltValues();\n  let localMrng = mrng.clone();\n  const context2 = { mrng: mrng.clone(), biasFactor, history: [] };\n  const valueFunction = (arb) => {\n    const preBuiltValue = preBuiltValues[context2.history.length];\n    if (preBuiltValue !== void 0 && preBuiltValue.arb === arb) {\n      const value2 = preBuiltValue.value;\n      context2.history.push({\n        arb,\n        value: value2,\n        context: preBuiltValue.context,\n        mrng: preBuiltValue.mrng,\n      });\n      localMrng = preBuiltValue.mrng.clone();\n      return value2;\n    }\n    const g = arb.generate(localMrng, biasFactor);\n    context2.history.push({\n      arb,\n      value: g.value_,\n      context: g.context,\n      mrng: localMrng.clone(),\n    });\n    return g.value;\n  };\n  const memoedValueFunction = (arb, ...args) => {\n    return valueFunction(arbitraryCache(arb, args));\n  };\n  const valueMethods = {\n    values() {\n      return context2.history.map((c) => c.value);\n    },\n    [cloneMethod]() {\n      return buildGeneratorValue(\n        mrng,\n        biasFactor,\n        computePreBuiltValues,\n        arbitraryCache,\n      ).value;\n    },\n    [toStringMethod]() {\n      return stringify(context2.history.map((c) => c.value));\n    },\n  };\n  const value = Object.assign(memoedValueFunction, valueMethods);\n  return new Value(value, context2);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/builders/StableArbitraryGeneratorCache.js\nfunction buildStableArbitraryGeneratorCache(isEqual) {\n  const previousCallsPerBuilder = /* @__PURE__ */ new Map();\n  return function stableArbitraryGeneratorCache(builder, args) {\n    const entriesForBuilder = previousCallsPerBuilder.get(builder);\n    if (entriesForBuilder === void 0) {\n      const newValue2 = builder(...args);\n      previousCallsPerBuilder.set(builder, [{ args, value: newValue2 }]);\n      return newValue2;\n    }\n    const safeEntriesForBuilder = entriesForBuilder;\n    for (const entry of safeEntriesForBuilder) {\n      if (isEqual(args, entry.args)) {\n        return entry.value;\n      }\n    }\n    const newValue = builder(...args);\n    safeEntriesForBuilder.push({ args, value: newValue });\n    return newValue;\n  };\n}\nfunction naiveIsEqual(v1, v2) {\n  if (\n    v1 !== null &&\n    typeof v1 === 'object' &&\n    v2 !== null &&\n    typeof v2 === 'object'\n  ) {\n    if (Array.isArray(v1)) {\n      if (!Array.isArray(v2)) return false;\n      if (v1.length !== v2.length) return false;\n    } else if (Array.isArray(v2)) {\n      return false;\n    }\n    if (Object.keys(v1).length !== Object.keys(v2).length) {\n      return false;\n    }\n    for (const index in v1) {\n      if (!(index in v2)) {\n        return false;\n      }\n      if (!naiveIsEqual(v1[index], v2[index])) {\n        return false;\n      }\n    }\n    return true;\n  } else {\n    return Object.is(v1, v2);\n  }\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/GeneratorArbitrary.js\nvar GeneratorArbitrary = class extends Arbitrary {\n  constructor() {\n    super(...arguments);\n    this.arbitraryCache = buildStableArbitraryGeneratorCache(naiveIsEqual);\n  }\n  generate(mrng, biasFactor) {\n    return buildGeneratorValue(mrng, biasFactor, () => [], this.arbitraryCache);\n  }\n  canShrinkWithoutContext(value) {\n    return false;\n  }\n  shrink(_value, context2) {\n    if (context2 === void 0) {\n      return Stream.nil();\n    }\n    const safeContext = context2;\n    const mrng = safeContext.mrng;\n    const biasFactor = safeContext.biasFactor;\n    const history = safeContext.history;\n    return tupleShrink(\n      history.map((c) => c.arb),\n      history.map((c) => c.value),\n      history.map((c) => c.context),\n    ).map((shrink) => {\n      function computePreBuiltValues() {\n        const subValues = shrink.value;\n        const subContexts = shrink.context;\n        return history.map((entry, index) => ({\n          arb: entry.arb,\n          value: subValues[index],\n          context: subContexts[index],\n          mrng: entry.mrng,\n        }));\n      }\n      return buildGeneratorValue(\n        mrng,\n        biasFactor,\n        computePreBuiltValues,\n        this.arbitraryCache,\n      );\n    });\n  }\n};\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/gen.js\nfunction gen() {\n  return new GeneratorArbitrary();\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/BiasNumericRange.js\nvar safeMathFloor = Math.floor;\nvar safeMathLog2 = Math.log;\nfunction integerLogLike(v) {\n  return safeMathFloor(safeMathLog2(v) / safeMathLog2(2));\n}\nfunction bigIntLogLike(v) {\n  if (v === SBigInt(0)) return SBigInt(0);\n  return SBigInt(SString(v).length);\n}\nfunction biasNumericRange(min, max, logLike) {\n  if (min === max) {\n    return [{ min, max }];\n  }\n  if (min < 0 && max > 0) {\n    const logMin = logLike(-min);\n    const logMax = logLike(max);\n    return [\n      { min: -logMin, max: logMax },\n      { min: max - logMax, max },\n      { min, max: min + logMin },\n    ];\n  }\n  const logGap = logLike(max - min);\n  const arbCloseToMin = { min, max: min + logGap };\n  const arbCloseToMax = { min: max - logGap, max };\n  return min < 0\n    ? [arbCloseToMax, arbCloseToMin]\n    : [arbCloseToMin, arbCloseToMax];\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/ShrinkInteger.js\nvar safeMathCeil = Math.ceil;\nvar safeMathFloor2 = Math.floor;\nfunction halvePosInteger(n) {\n  return safeMathFloor2(n / 2);\n}\nfunction halveNegInteger(n) {\n  return safeMathCeil(n / 2);\n}\nfunction shrinkInteger(current, target, tryTargetAsap) {\n  const realGap = current - target;\n  function* shrinkDecr() {\n    let previous = tryTargetAsap ? void 0 : target;\n    const gap = tryTargetAsap ? realGap : halvePosInteger(realGap);\n    for (\n      let toremove = gap;\n      toremove > 0;\n      toremove = halvePosInteger(toremove)\n    ) {\n      const next = toremove === realGap ? target : current - toremove;\n      yield new Value(next, previous);\n      previous = next;\n    }\n  }\n  function* shrinkIncr() {\n    let previous = tryTargetAsap ? void 0 : target;\n    const gap = tryTargetAsap ? realGap : halveNegInteger(realGap);\n    for (\n      let toremove = gap;\n      toremove < 0;\n      toremove = halveNegInteger(toremove)\n    ) {\n      const next = toremove === realGap ? target : current - toremove;\n      yield new Value(next, previous);\n      previous = next;\n    }\n  }\n  return realGap > 0 ? stream(shrinkDecr()) : stream(shrinkIncr());\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/IntegerArbitrary.js\nvar safeMathSign = Math.sign;\nvar safeNumberIsInteger = Number.isInteger;\nvar safeObjectIs = Object.is;\nvar IntegerArbitrary = class _IntegerArbitrary extends Arbitrary {\n  constructor(min, max) {\n    super();\n    this.min = min;\n    this.max = max;\n  }\n  generate(mrng, biasFactor) {\n    const range = this.computeGenerateRange(mrng, biasFactor);\n    return new Value(mrng.nextInt(range.min, range.max), void 0);\n  }\n  canShrinkWithoutContext(value) {\n    return (\n      typeof value === 'number' &&\n      safeNumberIsInteger(value) &&\n      !safeObjectIs(value, -0) &&\n      this.min <= value &&\n      value <= this.max\n    );\n  }\n  shrink(current, context2) {\n    if (!_IntegerArbitrary.isValidContext(current, context2)) {\n      const target = this.defaultTarget();\n      return shrinkInteger(current, target, true);\n    }\n    if (this.isLastChanceTry(current, context2)) {\n      return Stream.of(new Value(context2, void 0));\n    }\n    return shrinkInteger(current, context2, false);\n  }\n  defaultTarget() {\n    if (this.min <= 0 && this.max >= 0) {\n      return 0;\n    }\n    return this.min < 0 ? this.max : this.min;\n  }\n  computeGenerateRange(mrng, biasFactor) {\n    if (biasFactor === void 0 || mrng.nextInt(1, biasFactor) !== 1) {\n      return { min: this.min, max: this.max };\n    }\n    const ranges = biasNumericRange(this.min, this.max, integerLogLike);\n    if (ranges.length === 1) {\n      return ranges[0];\n    }\n    const id = mrng.nextInt(-2 * (ranges.length - 1), ranges.length - 2);\n    return id < 0 ? ranges[0] : ranges[id + 1];\n  }\n  isLastChanceTry(current, context2) {\n    if (current > 0) return current === context2 + 1 && current > this.min;\n    if (current < 0) return current === context2 - 1 && current < this.max;\n    return false;\n  }\n  static isValidContext(current, context2) {\n    if (context2 === void 0) {\n      return false;\n    }\n    if (typeof context2 !== 'number') {\n      throw new Error(`Invalid context type passed to IntegerArbitrary (#1)`);\n    }\n    if (context2 !== 0 && safeMathSign(current) !== safeMathSign(context2)) {\n      throw new Error(`Invalid context value passed to IntegerArbitrary (#2)`);\n    }\n    return true;\n  }\n};\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/integer.js\nvar safeNumberIsInteger2 = Number.isInteger;\nfunction buildCompleteIntegerConstraints(constraints) {\n  const min = constraints.min !== void 0 ? constraints.min : -2147483648;\n  const max = constraints.max !== void 0 ? constraints.max : 2147483647;\n  return { min, max };\n}\nfunction integer(constraints = {}) {\n  const fullConstraints = buildCompleteIntegerConstraints(constraints);\n  if (fullConstraints.min > fullConstraints.max) {\n    throw new Error(\n      'fc.integer maximum value should be equal or greater than the minimum one',\n    );\n  }\n  if (!safeNumberIsInteger2(fullConstraints.min)) {\n    throw new Error('fc.integer minimum value should be an integer');\n  }\n  if (!safeNumberIsInteger2(fullConstraints.max)) {\n    throw new Error('fc.integer maximum value should be an integer');\n  }\n  return new IntegerArbitrary(fullConstraints.min, fullConstraints.max);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/DepthContext.js\nvar depthContextCache = /* @__PURE__ */ new Map();\nfunction getDepthContextFor(contextMeta) {\n  if (contextMeta === void 0) {\n    return { depth: 0 };\n  }\n  if (typeof contextMeta !== 'string') {\n    return contextMeta;\n  }\n  const cachedContext = depthContextCache.get(contextMeta);\n  if (cachedContext !== void 0) {\n    return cachedContext;\n  }\n  const context2 = { depth: 0 };\n  depthContextCache.set(contextMeta, context2);\n  return context2;\n}\nfunction createDepthIdentifier() {\n  const identifier = { depth: 0 };\n  return identifier;\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/implementations/NoopSlicedGenerator.js\nvar NoopSlicedGenerator = class {\n  constructor(arb, mrng, biasFactor) {\n    this.arb = arb;\n    this.mrng = mrng;\n    this.biasFactor = biasFactor;\n  }\n  attemptExact() {\n    return;\n  }\n  next() {\n    return this.arb.generate(this.mrng, this.biasFactor);\n  }\n};\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/implementations/SlicedBasedGenerator.js\nvar safeMathMin2 = Math.min;\nvar safeMathMax = Math.max;\nvar SlicedBasedGenerator = class {\n  constructor(arb, mrng, slices, biasFactor) {\n    this.arb = arb;\n    this.mrng = mrng;\n    this.slices = slices;\n    this.biasFactor = biasFactor;\n    this.activeSliceIndex = 0;\n    this.nextIndexInSlice = 0;\n    this.lastIndexInSlice = -1;\n  }\n  attemptExact(targetLength) {\n    if (targetLength !== 0 && this.mrng.nextInt(1, this.biasFactor) === 1) {\n      const eligibleIndices = [];\n      for (let index = 0; index !== this.slices.length; ++index) {\n        const slice = this.slices[index];\n        if (slice.length === targetLength) {\n          safePush(eligibleIndices, index);\n        }\n      }\n      if (eligibleIndices.length === 0) {\n        return;\n      }\n      this.activeSliceIndex =\n        eligibleIndices[this.mrng.nextInt(0, eligibleIndices.length - 1)];\n      this.nextIndexInSlice = 0;\n      this.lastIndexInSlice = targetLength - 1;\n    }\n  }\n  next() {\n    if (this.nextIndexInSlice <= this.lastIndexInSlice) {\n      return new Value(\n        this.slices[this.activeSliceIndex][this.nextIndexInSlice++],\n        void 0,\n      );\n    }\n    if (this.mrng.nextInt(1, this.biasFactor) !== 1) {\n      return this.arb.generate(this.mrng, this.biasFactor);\n    }\n    this.activeSliceIndex = this.mrng.nextInt(0, this.slices.length - 1);\n    const slice = this.slices[this.activeSliceIndex];\n    if (this.mrng.nextInt(1, this.biasFactor) !== 1) {\n      this.nextIndexInSlice = 1;\n      this.lastIndexInSlice = slice.length - 1;\n      return new Value(slice[0], void 0);\n    }\n    const rangeBoundaryA = this.mrng.nextInt(0, slice.length - 1);\n    const rangeBoundaryB = this.mrng.nextInt(0, slice.length - 1);\n    this.nextIndexInSlice = safeMathMin2(rangeBoundaryA, rangeBoundaryB);\n    this.lastIndexInSlice = safeMathMax(rangeBoundaryA, rangeBoundaryB);\n    return new Value(slice[this.nextIndexInSlice++], void 0);\n  }\n};\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/BuildSlicedGenerator.js\nfunction buildSlicedGenerator(arb, mrng, slices, biasFactor) {\n  if (\n    biasFactor === void 0 ||\n    slices.length === 0 ||\n    mrng.nextInt(1, biasFactor) !== 1\n  ) {\n    return new NoopSlicedGenerator(arb, mrng, biasFactor);\n  }\n  return new SlicedBasedGenerator(arb, mrng, slices, biasFactor);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/ArrayArbitrary.js\nvar safeMathFloor3 = Math.floor;\nvar safeMathLog3 = Math.log;\nvar safeMathMax2 = Math.max;\nvar safeArrayIsArray2 = Array.isArray;\nfunction biasedMaxLength(minLength, maxLength) {\n  if (minLength === maxLength) {\n    return minLength;\n  }\n  return (\n    minLength +\n    safeMathFloor3(safeMathLog3(maxLength - minLength) / safeMathLog3(2))\n  );\n}\nvar ArrayArbitrary = class _ArrayArbitrary extends Arbitrary {\n  constructor(\n    arb,\n    minLength,\n    maxGeneratedLength,\n    maxLength,\n    depthIdentifier,\n    setBuilder,\n    customSlices,\n  ) {\n    super();\n    this.arb = arb;\n    this.minLength = minLength;\n    this.maxGeneratedLength = maxGeneratedLength;\n    this.maxLength = maxLength;\n    this.setBuilder = setBuilder;\n    this.customSlices = customSlices;\n    this.lengthArb = integer({ min: minLength, max: maxGeneratedLength });\n    this.depthContext = getDepthContextFor(depthIdentifier);\n  }\n  preFilter(tab) {\n    if (this.setBuilder === void 0) {\n      return tab;\n    }\n    const s = this.setBuilder();\n    for (let index = 0; index !== tab.length; ++index) {\n      s.tryAdd(tab[index]);\n    }\n    return s.getData();\n  }\n  static makeItCloneable(vs, shrinkables) {\n    vs[cloneMethod] = () => {\n      const cloned = [];\n      for (let idx = 0; idx !== shrinkables.length; ++idx) {\n        safePush(cloned, shrinkables[idx].value);\n      }\n      this.makeItCloneable(cloned, shrinkables);\n      return cloned;\n    };\n    return vs;\n  }\n  generateNItemsNoDuplicates(setBuilder, N, mrng, biasFactorItems) {\n    let numSkippedInRow = 0;\n    const s = setBuilder();\n    const slicedGenerator = buildSlicedGenerator(\n      this.arb,\n      mrng,\n      this.customSlices,\n      biasFactorItems,\n    );\n    while (s.size() < N && numSkippedInRow < this.maxGeneratedLength) {\n      const current = slicedGenerator.next();\n      if (s.tryAdd(current)) {\n        numSkippedInRow = 0;\n      } else {\n        numSkippedInRow += 1;\n      }\n    }\n    return s.getData();\n  }\n  safeGenerateNItemsNoDuplicates(setBuilder, N, mrng, biasFactorItems) {\n    const depthImpact = safeMathMax2(\n      0,\n      N - biasedMaxLength(this.minLength, this.maxGeneratedLength),\n    );\n    this.depthContext.depth += depthImpact;\n    try {\n      return this.generateNItemsNoDuplicates(\n        setBuilder,\n        N,\n        mrng,\n        biasFactorItems,\n      );\n    } finally {\n      this.depthContext.depth -= depthImpact;\n    }\n  }\n  generateNItems(N, mrng, biasFactorItems) {\n    const items = [];\n    const slicedGenerator = buildSlicedGenerator(\n      this.arb,\n      mrng,\n      this.customSlices,\n      biasFactorItems,\n    );\n    slicedGenerator.attemptExact(N);\n    for (let index = 0; index !== N; ++index) {\n      const current = slicedGenerator.next();\n      safePush(items, current);\n    }\n    return items;\n  }\n  safeGenerateNItems(N, mrng, biasFactorItems) {\n    const depthImpact = safeMathMax2(\n      0,\n      N - biasedMaxLength(this.minLength, this.maxGeneratedLength),\n    );\n    this.depthContext.depth += depthImpact;\n    try {\n      return this.generateNItems(N, mrng, biasFactorItems);\n    } finally {\n      this.depthContext.depth -= depthImpact;\n    }\n  }\n  wrapper(itemsRaw, shrunkOnce, itemsRawLengthContext, startIndex) {\n    const items = shrunkOnce ? this.preFilter(itemsRaw) : itemsRaw;\n    let cloneable = false;\n    const vs = [];\n    const itemsContexts = [];\n    for (let idx = 0; idx !== items.length; ++idx) {\n      const s = items[idx];\n      cloneable = cloneable || s.hasToBeCloned;\n      safePush(vs, s.value);\n      safePush(itemsContexts, s.context);\n    }\n    if (cloneable) {\n      _ArrayArbitrary.makeItCloneable(vs, items);\n    }\n    const context2 = {\n      shrunkOnce,\n      lengthContext:\n        itemsRaw.length === items.length && itemsRawLengthContext !== void 0\n          ? itemsRawLengthContext\n          : void 0,\n      itemsContexts,\n      startIndex,\n    };\n    return new Value(vs, context2);\n  }\n  generate(mrng, biasFactor) {\n    const biasMeta = this.applyBias(mrng, biasFactor);\n    const targetSize = biasMeta.size;\n    const items =\n      this.setBuilder !== void 0\n        ? this.safeGenerateNItemsNoDuplicates(\n            this.setBuilder,\n            targetSize,\n            mrng,\n            biasMeta.biasFactorItems,\n          )\n        : this.safeGenerateNItems(targetSize, mrng, biasMeta.biasFactorItems);\n    return this.wrapper(items, false, void 0, 0);\n  }\n  applyBias(mrng, biasFactor) {\n    if (biasFactor === void 0) {\n      return { size: this.lengthArb.generate(mrng, void 0).value };\n    }\n    if (this.minLength === this.maxGeneratedLength) {\n      return {\n        size: this.lengthArb.generate(mrng, void 0).value,\n        biasFactorItems: biasFactor,\n      };\n    }\n    if (mrng.nextInt(1, biasFactor) !== 1) {\n      return { size: this.lengthArb.generate(mrng, void 0).value };\n    }\n    if (\n      mrng.nextInt(1, biasFactor) !== 1 ||\n      this.minLength === this.maxGeneratedLength\n    ) {\n      return {\n        size: this.lengthArb.generate(mrng, void 0).value,\n        biasFactorItems: biasFactor,\n      };\n    }\n    const maxBiasedLength = biasedMaxLength(\n      this.minLength,\n      this.maxGeneratedLength,\n    );\n    const targetSizeValue = integer({\n      min: this.minLength,\n      max: maxBiasedLength,\n    }).generate(mrng, void 0);\n    return { size: targetSizeValue.value, biasFactorItems: biasFactor };\n  }\n  canShrinkWithoutContext(value) {\n    if (\n      !safeArrayIsArray2(value) ||\n      this.minLength > value.length ||\n      value.length > this.maxLength\n    ) {\n      return false;\n    }\n    for (let index = 0; index !== value.length; ++index) {\n      if (!(index in value)) {\n        return false;\n      }\n      if (!this.arb.canShrinkWithoutContext(value[index])) {\n        return false;\n      }\n    }\n    const filtered = this.preFilter(\n      safeMap(value, (item) => new Value(item, void 0)),\n    );\n    return filtered.length === value.length;\n  }\n  shrinkItemByItem(value, safeContext, endIndex) {\n    const shrinks = [];\n    for (let index = safeContext.startIndex; index < endIndex; ++index) {\n      safePush(\n        shrinks,\n        makeLazy(() =>\n          this.arb\n            .shrink(value[index], safeContext.itemsContexts[index])\n            .map((v) => {\n              const beforeCurrent = safeMap(\n                safeSlice(value, 0, index),\n                (v2, i) =>\n                  new Value(cloneIfNeeded(v2), safeContext.itemsContexts[i]),\n              );\n              const afterCurrent = safeMap(\n                safeSlice(value, index + 1),\n                (v2, i) =>\n                  new Value(\n                    cloneIfNeeded(v2),\n                    safeContext.itemsContexts[i + index + 1],\n                  ),\n              );\n              return [[...beforeCurrent, v, ...afterCurrent], void 0, index];\n            }),\n        ),\n      );\n    }\n    return Stream.nil().join(...shrinks);\n  }\n  shrinkImpl(value, context2) {\n    if (value.length === 0) {\n      return Stream.nil();\n    }\n    const safeContext =\n      context2 !== void 0\n        ? context2\n        : {\n            shrunkOnce: false,\n            lengthContext: void 0,\n            itemsContexts: [],\n            startIndex: 0,\n          };\n    return this.lengthArb\n      .shrink(value.length, safeContext.lengthContext)\n      .drop(\n        safeContext.shrunkOnce &&\n          safeContext.lengthContext === void 0 &&\n          value.length > this.minLength + 1\n          ? 1\n          : 0,\n      )\n      .map((lengthValue) => {\n        const sliceStart = value.length - lengthValue.value;\n        return [\n          safeMap(\n            safeSlice(value, sliceStart),\n            (v, index) =>\n              new Value(\n                cloneIfNeeded(v),\n                safeContext.itemsContexts[index + sliceStart],\n              ),\n          ),\n          lengthValue.context,\n          0,\n        ];\n      })\n      .join(\n        makeLazy(() =>\n          value.length > this.minLength\n            ? this.shrinkItemByItem(value, safeContext, 1)\n            : this.shrinkItemByItem(value, safeContext, value.length),\n        ),\n      )\n      .join(\n        value.length > this.minLength\n          ? makeLazy(() => {\n              const subContext = {\n                shrunkOnce: false,\n                lengthContext: void 0,\n                itemsContexts: safeSlice(safeContext.itemsContexts, 1),\n                startIndex: 0,\n              };\n              return this.shrinkImpl(safeSlice(value, 1), subContext)\n                .filter((v) => this.minLength <= v[0].length + 1)\n                .map((v) => {\n                  return [\n                    [\n                      new Value(\n                        cloneIfNeeded(value[0]),\n                        safeContext.itemsContexts[0],\n                      ),\n                      ...v[0],\n                    ],\n                    void 0,\n                    0,\n                  ];\n                });\n            })\n          : Stream.nil(),\n      );\n  }\n  shrink(value, context2) {\n    return this.shrinkImpl(value, context2).map((contextualValue) =>\n      this.wrapper(\n        contextualValue[0],\n        true,\n        contextualValue[1],\n        contextualValue[2],\n      ),\n    );\n  }\n};\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/MaxLengthFromMinLength.js\nvar safeMathFloor4 = Math.floor;\nvar safeMathMin3 = Math.min;\nvar MaxLengthUpperBound = 2147483647;\nvar orderedSize = ['xsmall', 'small', 'medium', 'large', 'xlarge'];\nvar orderedRelativeSize = ['-4', '-3', '-2', '-1', '=', '+1', '+2', '+3', '+4'];\nvar DefaultSize = 'small';\nfunction maxLengthFromMinLength(minLength, size) {\n  switch (size) {\n    case 'xsmall':\n      return safeMathFloor4(1.1 * minLength) + 1;\n    case 'small':\n      return 2 * minLength + 10;\n    case 'medium':\n      return 11 * minLength + 100;\n    case 'large':\n      return 101 * minLength + 1e3;\n    case 'xlarge':\n      return 1001 * minLength + 1e4;\n    default:\n      throw new Error(\n        `Unable to compute lengths based on received size: ${size}`,\n      );\n  }\n}\nfunction relativeSizeToSize(size, defaultSize) {\n  const sizeInRelative = safeIndexOf(orderedRelativeSize, size);\n  if (sizeInRelative === -1) {\n    return size;\n  }\n  const defaultSizeInSize = safeIndexOf(orderedSize, defaultSize);\n  if (defaultSizeInSize === -1) {\n    throw new Error(\n      `Unable to offset size based on the unknown defaulted one: ${defaultSize}`,\n    );\n  }\n  const resultingSizeInSize = defaultSizeInSize + sizeInRelative - 4;\n  return resultingSizeInSize < 0\n    ? orderedSize[0]\n    : resultingSizeInSize >= orderedSize.length\n      ? orderedSize[orderedSize.length - 1]\n      : orderedSize[resultingSizeInSize];\n}\nfunction maxGeneratedLengthFromSizeForArbitrary(\n  size,\n  minLength,\n  maxLength,\n  specifiedMaxLength,\n) {\n  const {\n    baseSize: defaultSize = DefaultSize,\n    defaultSizeToMaxWhenMaxSpecified,\n  } = readConfigureGlobal() || {};\n  const definedSize =\n    size !== void 0\n      ? size\n      : specifiedMaxLength && defaultSizeToMaxWhenMaxSpecified\n        ? 'max'\n        : defaultSize;\n  if (definedSize === 'max') {\n    return maxLength;\n  }\n  const finalSize = relativeSizeToSize(definedSize, defaultSize);\n  return safeMathMin3(maxLengthFromMinLength(minLength, finalSize), maxLength);\n}\nfunction depthBiasFromSizeForArbitrary(depthSizeOrSize, specifiedMaxDepth) {\n  if (typeof depthSizeOrSize === 'number') {\n    return 1 / depthSizeOrSize;\n  }\n  const {\n    baseSize: defaultSize = DefaultSize,\n    defaultSizeToMaxWhenMaxSpecified,\n  } = readConfigureGlobal() || {};\n  const definedSize =\n    depthSizeOrSize !== void 0\n      ? depthSizeOrSize\n      : specifiedMaxDepth && defaultSizeToMaxWhenMaxSpecified\n        ? 'max'\n        : defaultSize;\n  if (definedSize === 'max') {\n    return 0;\n  }\n  const finalSize = relativeSizeToSize(definedSize, defaultSize);\n  switch (finalSize) {\n    case 'xsmall':\n      return 1;\n    case 'small':\n      return 0.5;\n    case 'medium':\n      return 0.25;\n    case 'large':\n      return 0.125;\n    case 'xlarge':\n      return 0.0625;\n  }\n}\nfunction resolveSize(size) {\n  const { baseSize: defaultSize = DefaultSize } = readConfigureGlobal() || {};\n  if (size === void 0) {\n    return defaultSize;\n  }\n  return relativeSizeToSize(size, defaultSize);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/array.js\nfunction array(arb, constraints = {}) {\n  const size = constraints.size;\n  const minLength = constraints.minLength || 0;\n  const maxLengthOrUnset = constraints.maxLength;\n  const depthIdentifier = constraints.depthIdentifier;\n  const maxLength =\n    maxLengthOrUnset !== void 0 ? maxLengthOrUnset : MaxLengthUpperBound;\n  const specifiedMaxLength = maxLengthOrUnset !== void 0;\n  const maxGeneratedLength = maxGeneratedLengthFromSizeForArbitrary(\n    size,\n    minLength,\n    maxLength,\n    specifiedMaxLength,\n  );\n  const customSlices = constraints.experimentalCustomSlices || [];\n  return new ArrayArbitrary(\n    arb,\n    minLength,\n    maxGeneratedLength,\n    maxLength,\n    depthIdentifier,\n    void 0,\n    customSlices,\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/ShrinkBigInt.js\nfunction halveBigInt(n) {\n  return n / SBigInt(2);\n}\nfunction shrinkBigInt(current, target, tryTargetAsap) {\n  const realGap = current - target;\n  function* shrinkDecr() {\n    let previous = tryTargetAsap ? void 0 : target;\n    const gap = tryTargetAsap ? realGap : halveBigInt(realGap);\n    for (let toremove = gap; toremove > 0; toremove = halveBigInt(toremove)) {\n      const next = current - toremove;\n      yield new Value(next, previous);\n      previous = next;\n    }\n  }\n  function* shrinkIncr() {\n    let previous = tryTargetAsap ? void 0 : target;\n    const gap = tryTargetAsap ? realGap : halveBigInt(realGap);\n    for (let toremove = gap; toremove < 0; toremove = halveBigInt(toremove)) {\n      const next = current - toremove;\n      yield new Value(next, previous);\n      previous = next;\n    }\n  }\n  return realGap > 0 ? stream(shrinkDecr()) : stream(shrinkIncr());\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/BigIntArbitrary.js\nvar BigIntArbitrary = class _BigIntArbitrary extends Arbitrary {\n  constructor(min, max) {\n    super();\n    this.min = min;\n    this.max = max;\n  }\n  generate(mrng, biasFactor) {\n    const range = this.computeGenerateRange(mrng, biasFactor);\n    return new Value(mrng.nextBigInt(range.min, range.max), void 0);\n  }\n  computeGenerateRange(mrng, biasFactor) {\n    if (biasFactor === void 0 || mrng.nextInt(1, biasFactor) !== 1) {\n      return { min: this.min, max: this.max };\n    }\n    const ranges = biasNumericRange(this.min, this.max, bigIntLogLike);\n    if (ranges.length === 1) {\n      return ranges[0];\n    }\n    const id = mrng.nextInt(-2 * (ranges.length - 1), ranges.length - 2);\n    return id < 0 ? ranges[0] : ranges[id + 1];\n  }\n  canShrinkWithoutContext(value) {\n    return typeof value === 'bigint' && this.min <= value && value <= this.max;\n  }\n  shrink(current, context2) {\n    if (!_BigIntArbitrary.isValidContext(current, context2)) {\n      const target = this.defaultTarget();\n      return shrinkBigInt(current, target, true);\n    }\n    if (this.isLastChanceTry(current, context2)) {\n      return Stream.of(new Value(context2, void 0));\n    }\n    return shrinkBigInt(current, context2, false);\n  }\n  defaultTarget() {\n    if (this.min <= 0 && this.max >= 0) {\n      return SBigInt(0);\n    }\n    return this.min < 0 ? this.max : this.min;\n  }\n  isLastChanceTry(current, context2) {\n    if (current > 0)\n      return current === context2 + SBigInt(1) && current > this.min;\n    if (current < 0)\n      return current === context2 - SBigInt(1) && current < this.max;\n    return false;\n  }\n  static isValidContext(current, context2) {\n    if (context2 === void 0) {\n      return false;\n    }\n    if (typeof context2 !== 'bigint') {\n      throw new Error(`Invalid context type passed to BigIntArbitrary (#1)`);\n    }\n    const differentSigns =\n      (current > 0 && context2 < 0) || (current < 0 && context2 > 0);\n    if (context2 !== SBigInt(0) && differentSigns) {\n      throw new Error(`Invalid context value passed to BigIntArbitrary (#2)`);\n    }\n    return true;\n  }\n};\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/bigInt.js\nfunction buildCompleteBigIntConstraints(constraints) {\n  const DefaultPow = 256;\n  const DefaultMin = SBigInt(-1) << SBigInt(DefaultPow - 1);\n  const DefaultMax = (SBigInt(1) << SBigInt(DefaultPow - 1)) - SBigInt(1);\n  const min = constraints.min;\n  const max = constraints.max;\n  return {\n    min:\n      min !== void 0\n        ? min\n        : DefaultMin -\n          (max !== void 0 && max < SBigInt(0) ? max * max : SBigInt(0)),\n    max:\n      max !== void 0\n        ? max\n        : DefaultMax +\n          (min !== void 0 && min > SBigInt(0) ? min * min : SBigInt(0)),\n  };\n}\nfunction extractBigIntConstraints(args) {\n  if (args[0] === void 0) {\n    return {};\n  }\n  if (args[1] === void 0) {\n    const constraints = args[0];\n    return constraints;\n  }\n  return { min: args[0], max: args[1] };\n}\nfunction bigInt(...args) {\n  const constraints = buildCompleteBigIntConstraints(\n    extractBigIntConstraints(args),\n  );\n  if (constraints.min > constraints.max) {\n    throw new Error('fc.bigInt expects max to be greater than or equal to min');\n  }\n  return new BigIntArbitrary(constraints.min, constraints.max);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/bigIntN.js\nfunction bigIntN(n) {\n  if (n < 1) {\n    throw new Error(\n      'fc.bigIntN expects requested number of bits to be superior or equal to 1',\n    );\n  }\n  const min = SBigInt(-1) << SBigInt(n - 1);\n  const max = (SBigInt(1) << SBigInt(n - 1)) - SBigInt(1);\n  return new BigIntArbitrary(min, max);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/bigUint.js\nfunction computeDefaultMax() {\n  return (SBigInt(1) << SBigInt(256)) - SBigInt(1);\n}\nfunction bigUint(constraints) {\n  const requestedMax =\n    typeof constraints === 'object' ? constraints.max : constraints;\n  const max = requestedMax !== void 0 ? requestedMax : computeDefaultMax();\n  if (max < 0) {\n    throw new Error(\n      'fc.bigUint expects max to be greater than or equal to zero',\n    );\n  }\n  return new BigIntArbitrary(SBigInt(0), max);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/bigUintN.js\nfunction bigUintN(n) {\n  if (n < 0) {\n    throw new Error(\n      'fc.bigUintN expects requested number of bits to be superior or equal to 0',\n    );\n  }\n  const min = SBigInt(0);\n  const max = (SBigInt(1) << SBigInt(n)) - SBigInt(1);\n  return new BigIntArbitrary(min, max);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/boolean.js\nfunction booleanMapper(v) {\n  return v === 1;\n}\nfunction booleanUnmapper(v) {\n  if (typeof v !== 'boolean') throw new Error('Unsupported input type');\n  return v === true ? 1 : 0;\n}\nfunction boolean() {\n  return integer({ min: 0, max: 1 })\n    .map(booleanMapper, booleanUnmapper)\n    .noBias();\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/ConstantArbitrary.js\nvar safeObjectIs2 = Object.is;\nvar ConstantArbitrary = class extends Arbitrary {\n  constructor(values) {\n    super();\n    this.values = values;\n  }\n  generate(mrng, _biasFactor) {\n    const idx =\n      this.values.length === 1 ? 0 : mrng.nextInt(0, this.values.length - 1);\n    const value = this.values[idx];\n    if (!hasCloneMethod(value)) {\n      return new Value(value, idx);\n    }\n    return new Value(value, idx, () => value[cloneMethod]());\n  }\n  canShrinkWithoutContext(value) {\n    for (let idx = 0; idx !== this.values.length; ++idx) {\n      if (safeObjectIs2(this.values[idx], value)) {\n        return true;\n      }\n    }\n    return false;\n  }\n  shrink(value, context2) {\n    if (context2 === 0 || safeObjectIs2(value, this.values[0])) {\n      return Stream.nil();\n    }\n    return Stream.of(new Value(this.values[0], 0));\n  }\n};\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/constantFrom.js\nfunction constantFrom(...values) {\n  if (values.length === 0) {\n    throw new Error('fc.constantFrom expects at least one parameter');\n  }\n  return new ConstantArbitrary(values);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/falsy.js\nfunction falsy(constraints) {\n  if (!constraints || !constraints.withBigInt) {\n    return constantFrom(false, null, void 0, 0, '', NaN);\n  }\n  return constantFrom(false, null, void 0, 0, '', NaN, SBigInt(0));\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/IndexToCharString.js\nvar indexToCharStringMapper = String.fromCodePoint;\nfunction indexToCharStringUnmapper(c) {\n  if (typeof c !== 'string') {\n    throw new Error('Cannot unmap non-string');\n  }\n  if (c.length === 0 || c.length > 2) {\n    throw new Error('Cannot unmap string with more or less than one character');\n  }\n  const c1 = safeCharCodeAt(c, 0);\n  if (c.length === 1) {\n    return c1;\n  }\n  const c2 = safeCharCodeAt(c, 1);\n  if (c1 < 55296 || c1 > 56319 || c2 < 56320 || c2 > 57343) {\n    throw new Error('Cannot unmap invalid surrogate pairs');\n  }\n  return c.codePointAt(0);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/builders/CharacterArbitraryBuilder.js\nfunction buildCharacterArbitrary(min, max, mapToCode, unmapFromCode) {\n  return integer({ min, max }).map(\n    (n) => indexToCharStringMapper(mapToCode(n)),\n    (c) => unmapFromCode(indexToCharStringUnmapper(c)),\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/IndexToPrintableIndex.js\nfunction indexToPrintableIndexMapper(v) {\n  if (v < 95) return v + 32;\n  if (v <= 126) return v - 95;\n  return v;\n}\nfunction indexToPrintableIndexUnmapper(v) {\n  if (v >= 32 && v <= 126) return v - 32;\n  if (v >= 0 && v <= 31) return v + 95;\n  return v;\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/ascii.js\nfunction ascii() {\n  return buildCharacterArbitrary(\n    0,\n    127,\n    indexToPrintableIndexMapper,\n    indexToPrintableIndexUnmapper,\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/base64.js\nfunction base64Mapper(v) {\n  if (v < 26) return v + 65;\n  if (v < 52) return v + 97 - 26;\n  if (v < 62) return v + 48 - 52;\n  return v === 62 ? 43 : 47;\n}\nfunction base64Unmapper(v) {\n  if (v >= 65 && v <= 90) return v - 65;\n  if (v >= 97 && v <= 122) return v - 97 + 26;\n  if (v >= 48 && v <= 57) return v - 48 + 52;\n  return v === 43 ? 62 : v === 47 ? 63 : -1;\n}\nfunction base64() {\n  return buildCharacterArbitrary(0, 63, base64Mapper, base64Unmapper);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/char.js\nfunction identity(v) {\n  return v;\n}\nfunction char() {\n  return buildCharacterArbitrary(32, 126, identity, identity);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/char16bits.js\nfunction char16bits() {\n  return buildCharacterArbitrary(\n    0,\n    65535,\n    indexToPrintableIndexMapper,\n    indexToPrintableIndexUnmapper,\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/fullUnicode.js\nvar gapSize = 57343 + 1 - 55296;\nfunction unicodeMapper(v) {\n  if (v < 55296) return indexToPrintableIndexMapper(v);\n  return v + gapSize;\n}\nfunction unicodeUnmapper(v) {\n  if (v < 55296) return indexToPrintableIndexUnmapper(v);\n  if (v <= 57343) return -1;\n  return v - gapSize;\n}\nfunction fullUnicode() {\n  return buildCharacterArbitrary(\n    0,\n    1114111 - gapSize,\n    unicodeMapper,\n    unicodeUnmapper,\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/hexa.js\nfunction hexaMapper(v) {\n  return v < 10 ? v + 48 : v + 97 - 10;\n}\nfunction hexaUnmapper(v) {\n  return v < 58 ? v - 48 : v >= 97 && v < 103 ? v - 97 + 10 : -1;\n}\nfunction hexa() {\n  return buildCharacterArbitrary(0, 15, hexaMapper, hexaUnmapper);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/unicode.js\nvar gapSize2 = 57343 + 1 - 55296;\nfunction unicodeMapper2(v) {\n  if (v < 55296) return indexToPrintableIndexMapper(v);\n  return v + gapSize2;\n}\nfunction unicodeUnmapper2(v) {\n  if (v < 55296) return indexToPrintableIndexUnmapper(v);\n  if (v <= 57343) return -1;\n  return v - gapSize2;\n}\nfunction unicode() {\n  return buildCharacterArbitrary(\n    0,\n    65535 - gapSize2,\n    unicodeMapper2,\n    unicodeUnmapper2,\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/constant.js\nfunction constant(value) {\n  return new ConstantArbitrary([value]);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/context.js\nvar ContextImplem = class _ContextImplem {\n  constructor() {\n    this.receivedLogs = [];\n  }\n  log(data) {\n    this.receivedLogs.push(data);\n  }\n  size() {\n    return this.receivedLogs.length;\n  }\n  toString() {\n    return JSON.stringify({ logs: this.receivedLogs });\n  }\n  [cloneMethod]() {\n    return new _ContextImplem();\n  }\n};\nfunction context() {\n  return constant(new ContextImplem());\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/TimeToDate.js\nvar safeNaN = Number.NaN;\nvar safeNumberIsNaN2 = Number.isNaN;\nfunction timeToDateMapper(time) {\n  return new SDate(time);\n}\nfunction timeToDateUnmapper(value) {\n  if (!(value instanceof SDate) || value.constructor !== SDate) {\n    throw new SError('Not a valid value for date unmapper');\n  }\n  return safeGetTime(value);\n}\nfunction timeToDateMapperWithNaN(valueForNaN) {\n  return (time) => {\n    return time === valueForNaN ? new SDate(safeNaN) : timeToDateMapper(time);\n  };\n}\nfunction timeToDateUnmapperWithNaN(valueForNaN) {\n  return (value) => {\n    const time = timeToDateUnmapper(value);\n    return safeNumberIsNaN2(time) ? valueForNaN : time;\n  };\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/date.js\nvar safeNumberIsNaN3 = Number.isNaN;\nfunction date(constraints = {}) {\n  const intMin =\n    constraints.min !== void 0 ? safeGetTime(constraints.min) : -864e13;\n  const intMax =\n    constraints.max !== void 0 ? safeGetTime(constraints.max) : 864e13;\n  const noInvalidDate =\n    constraints.noInvalidDate === void 0 || constraints.noInvalidDate;\n  if (safeNumberIsNaN3(intMin))\n    throw new Error('fc.date min must be valid instance of Date');\n  if (safeNumberIsNaN3(intMax))\n    throw new Error('fc.date max must be valid instance of Date');\n  if (intMin > intMax)\n    throw new Error('fc.date max must be greater or equal to min');\n  if (noInvalidDate) {\n    return integer({ min: intMin, max: intMax }).map(\n      timeToDateMapper,\n      timeToDateUnmapper,\n    );\n  }\n  const valueForNaN = intMax + 1;\n  return integer({ min: intMin, max: intMax + 1 }).map(\n    timeToDateMapperWithNaN(valueForNaN),\n    timeToDateUnmapperWithNaN(valueForNaN),\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/CloneArbitrary.js\nvar safeSymbolIterator2 = Symbol.iterator;\nvar safeIsArray = Array.isArray;\nvar safeObjectIs3 = Object.is;\nvar CloneArbitrary = class _CloneArbitrary extends Arbitrary {\n  constructor(arb, numValues) {\n    super();\n    this.arb = arb;\n    this.numValues = numValues;\n  }\n  generate(mrng, biasFactor) {\n    const items = [];\n    if (this.numValues <= 0) {\n      return this.wrapper(items);\n    }\n    for (let idx = 0; idx !== this.numValues - 1; ++idx) {\n      safePush(items, this.arb.generate(mrng.clone(), biasFactor));\n    }\n    safePush(items, this.arb.generate(mrng, biasFactor));\n    return this.wrapper(items);\n  }\n  canShrinkWithoutContext(value) {\n    if (!safeIsArray(value) || value.length !== this.numValues) {\n      return false;\n    }\n    if (value.length === 0) {\n      return true;\n    }\n    for (let index = 1; index < value.length; ++index) {\n      if (!safeObjectIs3(value[0], value[index])) {\n        return false;\n      }\n    }\n    return this.arb.canShrinkWithoutContext(value[0]);\n  }\n  shrink(value, context2) {\n    if (value.length === 0) {\n      return Stream.nil();\n    }\n    return new Stream(\n      this.shrinkImpl(value, context2 !== void 0 ? context2 : []),\n    ).map((v) => this.wrapper(v));\n  }\n  *shrinkImpl(value, contexts) {\n    const its = safeMap(value, (v, idx) =>\n      this.arb.shrink(v, contexts[idx])[safeSymbolIterator2](),\n    );\n    let cur = safeMap(its, (it) => it.next());\n    while (!cur[0].done) {\n      yield safeMap(cur, (c) => c.value);\n      cur = safeMap(its, (it) => it.next());\n    }\n  }\n  static makeItCloneable(vs, shrinkables) {\n    vs[cloneMethod] = () => {\n      const cloned = [];\n      for (let idx = 0; idx !== shrinkables.length; ++idx) {\n        safePush(cloned, shrinkables[idx].value);\n      }\n      this.makeItCloneable(cloned, shrinkables);\n      return cloned;\n    };\n    return vs;\n  }\n  wrapper(items) {\n    let cloneable = false;\n    const vs = [];\n    const contexts = [];\n    for (let idx = 0; idx !== items.length; ++idx) {\n      const s = items[idx];\n      cloneable = cloneable || s.hasToBeCloned;\n      safePush(vs, s.value);\n      safePush(contexts, s.context);\n    }\n    if (cloneable) {\n      _CloneArbitrary.makeItCloneable(vs, items);\n    }\n    return new Value(vs, contexts);\n  }\n};\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/clone.js\nfunction clone(arb, numValues) {\n  return new CloneArbitrary(arb, numValues);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/CustomEqualSet.js\nvar CustomEqualSet = class {\n  constructor(isEqual) {\n    this.isEqual = isEqual;\n    this.data = [];\n  }\n  tryAdd(value) {\n    for (let idx = 0; idx !== this.data.length; ++idx) {\n      if (this.isEqual(this.data[idx], value)) {\n        return false;\n      }\n    }\n    safePush(this.data, value);\n    return true;\n  }\n  size() {\n    return this.data.length;\n  }\n  getData() {\n    return this.data;\n  }\n};\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/StrictlyEqualSet.js\nvar safeNumberIsNaN4 = Number.isNaN;\nvar StrictlyEqualSet = class {\n  constructor(selector) {\n    this.selector = selector;\n    this.selectedItemsExceptNaN = new SSet();\n    this.data = [];\n  }\n  tryAdd(value) {\n    const selected = this.selector(value);\n    if (safeNumberIsNaN4(selected)) {\n      safePush(this.data, value);\n      return true;\n    }\n    const sizeBefore = this.selectedItemsExceptNaN.size;\n    safeAdd(this.selectedItemsExceptNaN, selected);\n    if (sizeBefore !== this.selectedItemsExceptNaN.size) {\n      safePush(this.data, value);\n      return true;\n    }\n    return false;\n  }\n  size() {\n    return this.data.length;\n  }\n  getData() {\n    return this.data;\n  }\n};\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/SameValueSet.js\nvar safeObjectIs4 = Object.is;\nvar SameValueSet = class {\n  constructor(selector) {\n    this.selector = selector;\n    this.selectedItemsExceptMinusZero = new SSet();\n    this.data = [];\n    this.hasMinusZero = false;\n  }\n  tryAdd(value) {\n    const selected = this.selector(value);\n    if (safeObjectIs4(selected, -0)) {\n      if (this.hasMinusZero) {\n        return false;\n      }\n      safePush(this.data, value);\n      this.hasMinusZero = true;\n      return true;\n    }\n    const sizeBefore = this.selectedItemsExceptMinusZero.size;\n    safeAdd(this.selectedItemsExceptMinusZero, selected);\n    if (sizeBefore !== this.selectedItemsExceptMinusZero.size) {\n      safePush(this.data, value);\n      return true;\n    }\n    return false;\n  }\n  size() {\n    return this.data.length;\n  }\n  getData() {\n    return this.data;\n  }\n};\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/SameValueZeroSet.js\nvar SameValueZeroSet = class {\n  constructor(selector) {\n    this.selector = selector;\n    this.selectedItems = new SSet();\n    this.data = [];\n  }\n  tryAdd(value) {\n    const selected = this.selector(value);\n    const sizeBefore = this.selectedItems.size;\n    safeAdd(this.selectedItems, selected);\n    if (sizeBefore !== this.selectedItems.size) {\n      safePush(this.data, value);\n      return true;\n    }\n    return false;\n  }\n  size() {\n    return this.data.length;\n  }\n  getData() {\n    return this.data;\n  }\n};\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/uniqueArray.js\nfunction buildUniqueArraySetBuilder(constraints) {\n  if (typeof constraints.comparator === 'function') {\n    if (constraints.selector === void 0) {\n      const comparator2 = constraints.comparator;\n      const isEqualForBuilder2 = (nextA, nextB) =>\n        comparator2(nextA.value_, nextB.value_);\n      return () => new CustomEqualSet(isEqualForBuilder2);\n    }\n    const comparator = constraints.comparator;\n    const selector2 = constraints.selector;\n    const refinedSelector2 = (next) => selector2(next.value_);\n    const isEqualForBuilder = (nextA, nextB) =>\n      comparator(refinedSelector2(nextA), refinedSelector2(nextB));\n    return () => new CustomEqualSet(isEqualForBuilder);\n  }\n  const selector = constraints.selector || ((v) => v);\n  const refinedSelector = (next) => selector(next.value_);\n  switch (constraints.comparator) {\n    case 'IsStrictlyEqual':\n      return () => new StrictlyEqualSet(refinedSelector);\n    case 'SameValueZero':\n      return () => new SameValueZeroSet(refinedSelector);\n    case 'SameValue':\n    case void 0:\n      return () => new SameValueSet(refinedSelector);\n  }\n}\nfunction uniqueArray(arb, constraints = {}) {\n  const minLength =\n    constraints.minLength !== void 0 ? constraints.minLength : 0;\n  const maxLength =\n    constraints.maxLength !== void 0\n      ? constraints.maxLength\n      : MaxLengthUpperBound;\n  const maxGeneratedLength = maxGeneratedLengthFromSizeForArbitrary(\n    constraints.size,\n    minLength,\n    maxLength,\n    constraints.maxLength !== void 0,\n  );\n  const depthIdentifier = constraints.depthIdentifier;\n  const setBuilder = buildUniqueArraySetBuilder(constraints);\n  const arrayArb = new ArrayArbitrary(\n    arb,\n    minLength,\n    maxGeneratedLength,\n    maxLength,\n    depthIdentifier,\n    setBuilder,\n    [],\n  );\n  if (minLength === 0) return arrayArb;\n  return arrayArb.filter((tab) => tab.length >= minLength);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/KeyValuePairsToObject.js\nvar safeObjectCreate = Object.create;\nvar safeObjectDefineProperty3 = Object.defineProperty;\nvar safeObjectGetOwnPropertyDescriptor2 = Object.getOwnPropertyDescriptor;\nvar safeObjectGetPrototypeOf2 = Object.getPrototypeOf;\nvar safeObjectGetOwnPropertySymbols2 = Object.getOwnPropertySymbols;\nvar safeObjectGetOwnPropertyNames = Object.getOwnPropertyNames;\nvar safeObjectEntries = Object.entries;\nfunction keyValuePairsToObjectMapper(definition) {\n  const obj = definition[1] ? safeObjectCreate(null) : {};\n  for (const keyValue of definition[0]) {\n    safeObjectDefineProperty3(obj, keyValue[0], {\n      enumerable: true,\n      configurable: true,\n      writable: true,\n      value: keyValue[1],\n    });\n  }\n  return obj;\n}\nfunction buildIsValidPropertyNameFilter(obj) {\n  return function isValidPropertyNameFilter(key) {\n    const descriptor = safeObjectGetOwnPropertyDescriptor2(obj, key);\n    return (\n      descriptor !== void 0 &&\n      !!descriptor.configurable &&\n      !!descriptor.enumerable &&\n      !!descriptor.writable &&\n      descriptor.get === void 0 &&\n      descriptor.set === void 0\n    );\n  };\n}\nfunction keyValuePairsToObjectUnmapper(value) {\n  if (typeof value !== 'object' || value === null) {\n    throw new SError(\n      'Incompatible instance received: should be a non-null object',\n    );\n  }\n  const hasNullPrototype = safeObjectGetPrototypeOf2(value) === null;\n  const hasObjectPrototype =\n    'constructor' in value && value.constructor === Object;\n  if (!hasNullPrototype && !hasObjectPrototype) {\n    throw new SError(\n      'Incompatible instance received: should be of exact type Object',\n    );\n  }\n  if (safeObjectGetOwnPropertySymbols2(value).length > 0) {\n    throw new SError('Incompatible instance received: should contain symbols');\n  }\n  if (\n    !safeEvery(\n      safeObjectGetOwnPropertyNames(value),\n      buildIsValidPropertyNameFilter(value),\n    )\n  ) {\n    throw new SError(\n      'Incompatible instance received: should contain only c/e/w properties without get/set',\n    );\n  }\n  return [safeObjectEntries(value), hasNullPrototype];\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/dictionary.js\nfunction dictionaryKeyExtractor(entry) {\n  return entry[0];\n}\nfunction dictionary(keyArb, valueArb, constraints = {}) {\n  const noNullPrototype = constraints.noNullPrototype !== false;\n  return tuple(\n    uniqueArray(tuple(keyArb, valueArb), {\n      minLength: constraints.minKeys,\n      maxLength: constraints.maxKeys,\n      size: constraints.size,\n      selector: dictionaryKeyExtractor,\n      depthIdentifier: constraints.depthIdentifier,\n    }),\n    noNullPrototype ? constant(false) : boolean(),\n  ).map(keyValuePairsToObjectMapper, keyValuePairsToObjectUnmapper);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/FrequencyArbitrary.js\nvar safePositiveInfinity2 = Number.POSITIVE_INFINITY;\nvar safeMaxSafeInteger = Number.MAX_SAFE_INTEGER;\nvar safeNumberIsInteger3 = Number.isInteger;\nvar safeMathFloor5 = Math.floor;\nvar safeMathPow = Math.pow;\nvar safeMathMin4 = Math.min;\nvar FrequencyArbitrary = class _FrequencyArbitrary extends Arbitrary {\n  static from(warbs, constraints, label) {\n    if (warbs.length === 0) {\n      throw new Error(`${label} expects at least one weighted arbitrary`);\n    }\n    let totalWeight = 0;\n    for (let idx = 0; idx !== warbs.length; ++idx) {\n      const currentArbitrary = warbs[idx].arbitrary;\n      if (currentArbitrary === void 0) {\n        throw new Error(`${label} expects arbitraries to be specified`);\n      }\n      const currentWeight = warbs[idx].weight;\n      totalWeight += currentWeight;\n      if (!safeNumberIsInteger3(currentWeight)) {\n        throw new Error(`${label} expects weights to be integer values`);\n      }\n      if (currentWeight < 0) {\n        throw new Error(\n          `${label} expects weights to be superior or equal to 0`,\n        );\n      }\n    }\n    if (totalWeight <= 0) {\n      throw new Error(\n        `${label} expects the sum of weights to be strictly superior to 0`,\n      );\n    }\n    const sanitizedConstraints = {\n      depthBias: depthBiasFromSizeForArbitrary(\n        constraints.depthSize,\n        constraints.maxDepth !== void 0,\n      ),\n      maxDepth:\n        constraints.maxDepth != void 0\n          ? constraints.maxDepth\n          : safePositiveInfinity2,\n      withCrossShrink: !!constraints.withCrossShrink,\n    };\n    return new _FrequencyArbitrary(\n      warbs,\n      sanitizedConstraints,\n      getDepthContextFor(constraints.depthIdentifier),\n    );\n  }\n  constructor(warbs, constraints, context2) {\n    super();\n    this.warbs = warbs;\n    this.constraints = constraints;\n    this.context = context2;\n    let currentWeight = 0;\n    this.cumulatedWeights = [];\n    for (let idx = 0; idx !== warbs.length; ++idx) {\n      currentWeight += warbs[idx].weight;\n      safePush(this.cumulatedWeights, currentWeight);\n    }\n    this.totalWeight = currentWeight;\n  }\n  generate(mrng, biasFactor) {\n    if (this.mustGenerateFirst()) {\n      return this.safeGenerateForIndex(mrng, 0, biasFactor);\n    }\n    const selected = mrng.nextInt(\n      this.computeNegDepthBenefit(),\n      this.totalWeight - 1,\n    );\n    for (let idx = 0; idx !== this.cumulatedWeights.length; ++idx) {\n      if (selected < this.cumulatedWeights[idx]) {\n        return this.safeGenerateForIndex(mrng, idx, biasFactor);\n      }\n    }\n    throw new Error(`Unable to generate from fc.frequency`);\n  }\n  canShrinkWithoutContext(value) {\n    return this.canShrinkWithoutContextIndex(value) !== -1;\n  }\n  shrink(value, context2) {\n    if (context2 !== void 0) {\n      const safeContext = context2;\n      const selectedIndex = safeContext.selectedIndex;\n      const originalBias = safeContext.originalBias;\n      const originalArbitrary = this.warbs[selectedIndex].arbitrary;\n      const originalShrinks = originalArbitrary\n        .shrink(value, safeContext.originalContext)\n        .map((v) => this.mapIntoValue(selectedIndex, v, null, originalBias));\n      if (safeContext.clonedMrngForFallbackFirst !== null) {\n        if (safeContext.cachedGeneratedForFirst === void 0) {\n          safeContext.cachedGeneratedForFirst = this.safeGenerateForIndex(\n            safeContext.clonedMrngForFallbackFirst,\n            0,\n            originalBias,\n          );\n        }\n        const valueFromFirst = safeContext.cachedGeneratedForFirst;\n        return Stream.of(valueFromFirst).join(originalShrinks);\n      }\n      return originalShrinks;\n    }\n    const potentialSelectedIndex = this.canShrinkWithoutContextIndex(value);\n    if (potentialSelectedIndex === -1) {\n      return Stream.nil();\n    }\n    return this.defaultShrinkForFirst(potentialSelectedIndex).join(\n      this.warbs[potentialSelectedIndex].arbitrary\n        .shrink(value, void 0)\n        .map((v) => this.mapIntoValue(potentialSelectedIndex, v, null, void 0)),\n    );\n  }\n  defaultShrinkForFirst(selectedIndex) {\n    ++this.context.depth;\n    try {\n      if (\n        !this.mustFallbackToFirstInShrink(selectedIndex) ||\n        this.warbs[0].fallbackValue === void 0\n      ) {\n        return Stream.nil();\n      }\n    } finally {\n      --this.context.depth;\n    }\n    const rawShrinkValue = new Value(\n      this.warbs[0].fallbackValue.default,\n      void 0,\n    );\n    return Stream.of(this.mapIntoValue(0, rawShrinkValue, null, void 0));\n  }\n  canShrinkWithoutContextIndex(value) {\n    if (this.mustGenerateFirst()) {\n      return this.warbs[0].arbitrary.canShrinkWithoutContext(value) ? 0 : -1;\n    }\n    try {\n      ++this.context.depth;\n      for (let idx = 0; idx !== this.warbs.length; ++idx) {\n        const warb = this.warbs[idx];\n        if (\n          warb.weight !== 0 &&\n          warb.arbitrary.canShrinkWithoutContext(value)\n        ) {\n          return idx;\n        }\n      }\n      return -1;\n    } finally {\n      --this.context.depth;\n    }\n  }\n  mapIntoValue(idx, value, clonedMrngForFallbackFirst, biasFactor) {\n    const context2 = {\n      selectedIndex: idx,\n      originalBias: biasFactor,\n      originalContext: value.context,\n      clonedMrngForFallbackFirst,\n    };\n    return new Value(value.value, context2);\n  }\n  safeGenerateForIndex(mrng, idx, biasFactor) {\n    ++this.context.depth;\n    try {\n      const value = this.warbs[idx].arbitrary.generate(mrng, biasFactor);\n      const clonedMrngForFallbackFirst = this.mustFallbackToFirstInShrink(idx)\n        ? mrng.clone()\n        : null;\n      return this.mapIntoValue(\n        idx,\n        value,\n        clonedMrngForFallbackFirst,\n        biasFactor,\n      );\n    } finally {\n      --this.context.depth;\n    }\n  }\n  mustGenerateFirst() {\n    return this.constraints.maxDepth <= this.context.depth;\n  }\n  mustFallbackToFirstInShrink(idx) {\n    return (\n      idx !== 0 &&\n      this.constraints.withCrossShrink &&\n      this.warbs[0].weight !== 0\n    );\n  }\n  computeNegDepthBenefit() {\n    const depthBias = this.constraints.depthBias;\n    if (depthBias <= 0 || this.warbs[0].weight === 0) {\n      return 0;\n    }\n    const depthBenefit =\n      safeMathFloor5(safeMathPow(1 + depthBias, this.context.depth)) - 1;\n    return (\n      -safeMathMin4(this.totalWeight * depthBenefit, safeMaxSafeInteger) || 0\n    );\n  }\n};\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/oneof.js\nfunction isOneOfContraints(param) {\n  return (\n    param != null &&\n    typeof param === 'object' &&\n    !('generate' in param) &&\n    !('arbitrary' in param) &&\n    !('weight' in param)\n  );\n}\nfunction toWeightedArbitrary(maybeWeightedArbitrary) {\n  if (isArbitrary(maybeWeightedArbitrary)) {\n    return { arbitrary: maybeWeightedArbitrary, weight: 1 };\n  }\n  return maybeWeightedArbitrary;\n}\nfunction oneof(...args) {\n  const constraints = args[0];\n  if (isOneOfContraints(constraints)) {\n    const weightedArbs2 = safeMap(safeSlice(args, 1), toWeightedArbitrary);\n    return FrequencyArbitrary.from(weightedArbs2, constraints, 'fc.oneof');\n  }\n  const weightedArbs = safeMap(args, toWeightedArbitrary);\n  return FrequencyArbitrary.from(weightedArbs, {}, 'fc.oneof');\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/nat.js\nvar safeNumberIsInteger4 = Number.isInteger;\nfunction nat(arg) {\n  const max =\n    typeof arg === 'number'\n      ? arg\n      : arg && arg.max !== void 0\n        ? arg.max\n        : 2147483647;\n  if (max < 0) {\n    throw new Error('fc.nat value should be greater than or equal to 0');\n  }\n  if (!safeNumberIsInteger4(max)) {\n    throw new Error('fc.nat maximum value should be an integer');\n  }\n  return new IntegerArbitrary(0, max);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/IndexToMappedConstant.js\nfunction indexToMappedConstantMapperFor(entries) {\n  return function indexToMappedConstantMapper(choiceIndex) {\n    let idx = -1;\n    let numSkips = 0;\n    while (choiceIndex >= numSkips) {\n      numSkips += entries[++idx].num;\n    }\n    return entries[idx].build(choiceIndex - numSkips + entries[idx].num);\n  };\n}\nfunction buildReverseMapping(entries) {\n  const reverseMapping = {\n    mapping: /* @__PURE__ */ new Map(),\n    negativeZeroIndex: void 0,\n  };\n  let choiceIndex = 0;\n  for (let entryIdx = 0; entryIdx !== entries.length; ++entryIdx) {\n    const entry = entries[entryIdx];\n    for (let idxInEntry = 0; idxInEntry !== entry.num; ++idxInEntry) {\n      const value = entry.build(idxInEntry);\n      if (value === 0 && 1 / value === Number.NEGATIVE_INFINITY) {\n        reverseMapping.negativeZeroIndex = choiceIndex;\n      } else {\n        reverseMapping.mapping.set(value, choiceIndex);\n      }\n      ++choiceIndex;\n    }\n  }\n  return reverseMapping;\n}\nfunction indexToMappedConstantUnmapperFor(entries) {\n  let reverseMapping = null;\n  return function indexToMappedConstantUnmapper(value) {\n    if (reverseMapping === null) {\n      reverseMapping = buildReverseMapping(entries);\n    }\n    const choiceIndex = Object.is(value, -0)\n      ? reverseMapping.negativeZeroIndex\n      : reverseMapping.mapping.get(value);\n    if (choiceIndex === void 0) {\n      throw new Error(\n        'Unknown value encountered cannot be built using this mapToConstant',\n      );\n    }\n    return choiceIndex;\n  };\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/mapToConstant.js\nfunction computeNumChoices(options) {\n  if (options.length === 0)\n    throw new Error(`fc.mapToConstant expects at least one option`);\n  let numChoices = 0;\n  for (let idx = 0; idx !== options.length; ++idx) {\n    if (options[idx].num < 0)\n      throw new Error(\n        `fc.mapToConstant expects all options to have a number of entries greater or equal to zero`,\n      );\n    numChoices += options[idx].num;\n  }\n  if (numChoices === 0)\n    throw new Error(\n      `fc.mapToConstant expects at least one choice among options`,\n    );\n  return numChoices;\n}\nfunction mapToConstant(...entries) {\n  const numChoices = computeNumChoices(entries);\n  return nat({ max: numChoices - 1 }).map(\n    indexToMappedConstantMapperFor(entries),\n    indexToMappedConstantUnmapperFor(entries),\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/builders/CharacterRangeArbitraryBuilder.js\nvar safeStringFromCharCode = String.fromCharCode;\nvar lowerCaseMapper = { num: 26, build: (v) => safeStringFromCharCode(v + 97) };\nvar upperCaseMapper = { num: 26, build: (v) => safeStringFromCharCode(v + 65) };\nvar numericMapper = { num: 10, build: (v) => safeStringFromCharCode(v + 48) };\nfunction percentCharArbMapper(c) {\n  const encoded = SencodeURIComponent(c);\n  return c !== encoded\n    ? encoded\n    : `%${safeNumberToString(safeCharCodeAt(c, 0), 16)}`;\n}\nfunction percentCharArbUnmapper(value) {\n  if (typeof value !== 'string') {\n    throw new Error('Unsupported');\n  }\n  const decoded = decodeURIComponent(value);\n  return decoded;\n}\nvar percentCharArb = fullUnicode().map(\n  percentCharArbMapper,\n  percentCharArbUnmapper,\n);\nvar buildLowerAlphaArbitrary = (others) =>\n  mapToConstant(lowerCaseMapper, {\n    num: others.length,\n    build: (v) => others[v],\n  });\nvar buildLowerAlphaNumericArbitrary = (others) =>\n  mapToConstant(lowerCaseMapper, numericMapper, {\n    num: others.length,\n    build: (v) => others[v],\n  });\nvar buildAlphaNumericArbitrary = (others) =>\n  mapToConstant(lowerCaseMapper, upperCaseMapper, numericMapper, {\n    num: others.length,\n    build: (v) => others[v],\n  });\nvar buildAlphaNumericPercentArbitrary = (others) =>\n  oneof(\n    { weight: 10, arbitrary: buildAlphaNumericArbitrary(others) },\n    { weight: 1, arbitrary: percentCharArb },\n  );\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/option.js\nfunction option(arb, constraints = {}) {\n  const freq = constraints.freq == null ? 5 : constraints.freq;\n  const nilValue = safeHasOwnProperty(constraints, 'nil')\n    ? constraints.nil\n    : null;\n  const nilArb = constant(nilValue);\n  const weightedArbs = [\n    { arbitrary: nilArb, weight: 1, fallbackValue: { default: nilValue } },\n    { arbitrary: arb, weight: freq },\n  ];\n  const frequencyConstraints = {\n    withCrossShrink: true,\n    depthSize: constraints.depthSize,\n    maxDepth: constraints.maxDepth,\n    depthIdentifier: constraints.depthIdentifier,\n  };\n  return FrequencyArbitrary.from(\n    weightedArbs,\n    frequencyConstraints,\n    'fc.option',\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/PatternsToString.js\nfunction patternsToStringMapper(tab) {\n  return safeJoin(tab, '');\n}\nfunction patternsToStringUnmapperFor(patternsArb, constraints) {\n  return function patternsToStringUnmapper(value) {\n    if (typeof value !== 'string') {\n      throw new Error('Unsupported value');\n    }\n    const minLength =\n      constraints.minLength !== void 0 ? constraints.minLength : 0;\n    const maxLength =\n      constraints.maxLength !== void 0\n        ? constraints.maxLength\n        : MaxLengthUpperBound;\n    if (value.length === 0) {\n      if (minLength > 0) {\n        throw new Error('Unable to unmap received string');\n      }\n      return [];\n    }\n    const stack = [{ endIndexChunks: 0, nextStartIndex: 1, chunks: [] }];\n    while (stack.length > 0) {\n      const last = safePop(stack);\n      for (let index = last.nextStartIndex; index <= value.length; ++index) {\n        const chunk = safeSubstring(value, last.endIndexChunks, index);\n        if (patternsArb.canShrinkWithoutContext(chunk)) {\n          const newChunks = [...last.chunks, chunk];\n          if (index === value.length) {\n            if (newChunks.length < minLength || newChunks.length > maxLength) {\n              break;\n            }\n            return newChunks;\n          }\n          safePush(stack, {\n            endIndexChunks: last.endIndexChunks,\n            nextStartIndex: index + 1,\n            chunks: last.chunks,\n          });\n          safePush(stack, {\n            endIndexChunks: index,\n            nextStartIndex: index + 1,\n            chunks: newChunks,\n          });\n          break;\n        }\n      }\n    }\n    throw new Error('Unable to unmap received string');\n  };\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/SlicesForStringBuilder.js\nvar dangerousStrings = [\n  '__defineGetter__',\n  '__defineSetter__',\n  '__lookupGetter__',\n  '__lookupSetter__',\n  '__proto__',\n  'constructor',\n  'hasOwnProperty',\n  'isPrototypeOf',\n  'propertyIsEnumerable',\n  'toLocaleString',\n  'toString',\n  'valueOf',\n  'apply',\n  'arguments',\n  'bind',\n  'call',\n  'caller',\n  'length',\n  'name',\n  'prototype',\n  'key',\n  'ref',\n];\nfunction computeCandidateString(dangerous, charArbitrary, stringSplitter) {\n  let candidate;\n  try {\n    candidate = stringSplitter(dangerous);\n  } catch (err) {\n    return void 0;\n  }\n  for (const entry of candidate) {\n    if (!charArbitrary.canShrinkWithoutContext(entry)) {\n      return void 0;\n    }\n  }\n  return candidate;\n}\nfunction createSlicesForString(charArbitrary, stringSplitter) {\n  const slicesForString = [];\n  for (const dangerous of dangerousStrings) {\n    const candidate = computeCandidateString(\n      dangerous,\n      charArbitrary,\n      stringSplitter,\n    );\n    if (candidate !== void 0) {\n      safePush(slicesForString, candidate);\n    }\n  }\n  return slicesForString;\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/stringOf.js\nvar safeObjectAssign4 = Object.assign;\nfunction stringOf(charArb, constraints = {}) {\n  const unmapper = patternsToStringUnmapperFor(charArb, constraints);\n  const experimentalCustomSlices = createSlicesForString(charArb, unmapper);\n  const enrichedConstraints = safeObjectAssign4(\n    safeObjectAssign4({}, constraints),\n    {\n      experimentalCustomSlices,\n    },\n  );\n  return array(charArb, enrichedConstraints).map(\n    patternsToStringMapper,\n    unmapper,\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/InvalidSubdomainLabelFiIter.js\nfunction filterInvalidSubdomainLabel(subdomainLabel2) {\n  if (subdomainLabel2.length > 63) {\n    return false;\n  }\n  return (\n    subdomainLabel2.length < 4 ||\n    subdomainLabel2[0] !== 'x' ||\n    subdomainLabel2[1] !== 'n' ||\n    subdomainLabel2[2] !== '-' ||\n    subdomainLabel2[3] !== '-'\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/AdapterArbitrary.js\nvar AdaptedValue = Symbol('adapted-value');\nfunction toAdapterValue(rawValue, adapter2) {\n  const adapted = adapter2(rawValue.value_);\n  if (!adapted.adapted) {\n    return rawValue;\n  }\n  return new Value(adapted.value, AdaptedValue);\n}\nvar AdapterArbitrary = class extends Arbitrary {\n  constructor(sourceArb, adapter2) {\n    super();\n    this.sourceArb = sourceArb;\n    this.adapter = adapter2;\n    this.adaptValue = (rawValue) => toAdapterValue(rawValue, adapter2);\n  }\n  generate(mrng, biasFactor) {\n    const rawValue = this.sourceArb.generate(mrng, biasFactor);\n    return this.adaptValue(rawValue);\n  }\n  canShrinkWithoutContext(value) {\n    return (\n      this.sourceArb.canShrinkWithoutContext(value) &&\n      !this.adapter(value).adapted\n    );\n  }\n  shrink(value, context2) {\n    if (context2 === AdaptedValue) {\n      if (!this.sourceArb.canShrinkWithoutContext(value)) {\n        return Stream.nil();\n      }\n      return this.sourceArb.shrink(value, void 0).map(this.adaptValue);\n    }\n    return this.sourceArb.shrink(value, context2).map(this.adaptValue);\n  }\n};\nfunction adapter(sourceArb, adapter2) {\n  return new AdapterArbitrary(sourceArb, adapter2);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/domain.js\nfunction toSubdomainLabelMapper([f, d]) {\n  return d === null ? f : `${f}${d[0]}${d[1]}`;\n}\nfunction toSubdomainLabelUnmapper(value) {\n  if (typeof value !== 'string' || value.length === 0) {\n    throw new Error('Unsupported');\n  }\n  if (value.length === 1) {\n    return [value[0], null];\n  }\n  return [\n    value[0],\n    [safeSubstring(value, 1, value.length - 1), value[value.length - 1]],\n  ];\n}\nfunction subdomainLabel(size) {\n  const alphaNumericArb = buildLowerAlphaNumericArbitrary([]);\n  const alphaNumericHyphenArb = buildLowerAlphaNumericArbitrary(['-']);\n  return tuple(\n    alphaNumericArb,\n    option(\n      tuple(\n        stringOf(alphaNumericHyphenArb, { size, maxLength: 61 }),\n        alphaNumericArb,\n      ),\n    ),\n  )\n    .map(toSubdomainLabelMapper, toSubdomainLabelUnmapper)\n    .filter(filterInvalidSubdomainLabel);\n}\nfunction labelsMapper(elements) {\n  return `${safeJoin(elements[0], '.')}.${elements[1]}`;\n}\nfunction labelsUnmapper(value) {\n  if (typeof value !== 'string') {\n    throw new Error('Unsupported type');\n  }\n  const lastDotIndex = value.lastIndexOf('.');\n  return [\n    safeSplit(safeSubstring(value, 0, lastDotIndex), '.'),\n    safeSubstring(value, lastDotIndex + 1),\n  ];\n}\nfunction labelsAdapter(labels) {\n  const [subDomains, suffix] = labels;\n  let lengthNotIncludingIndex = suffix.length;\n  for (let index = 0; index !== subDomains.length; ++index) {\n    lengthNotIncludingIndex += 1 + subDomains[index].length;\n    if (lengthNotIncludingIndex > 255) {\n      return {\n        adapted: true,\n        value: [safeSlice(subDomains, 0, index), suffix],\n      };\n    }\n  }\n  return { adapted: false, value: labels };\n}\nfunction domain(constraints = {}) {\n  const resolvedSize = resolveSize(constraints.size);\n  const resolvedSizeMinusOne = relativeSizeToSize('-1', resolvedSize);\n  const alphaNumericArb = buildLowerAlphaArbitrary([]);\n  const publicSuffixArb = stringOf(alphaNumericArb, {\n    minLength: 2,\n    maxLength: 63,\n    size: resolvedSizeMinusOne,\n  });\n  return adapter(\n    tuple(\n      array(subdomainLabel(resolvedSize), {\n        size: resolvedSizeMinusOne,\n        minLength: 1,\n        maxLength: 127,\n      }),\n      publicSuffixArb,\n    ),\n    labelsAdapter,\n  ).map(labelsMapper, labelsUnmapper);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/emailAddress.js\nfunction dotAdapter(a) {\n  let currentLength = a[0].length;\n  for (let index = 1; index !== a.length; ++index) {\n    currentLength += 1 + a[index].length;\n    if (currentLength > 64) {\n      return { adapted: true, value: safeSlice(a, 0, index) };\n    }\n  }\n  return { adapted: false, value: a };\n}\nfunction dotMapper(a) {\n  return safeJoin(a, '.');\n}\nfunction dotUnmapper(value) {\n  if (typeof value !== 'string') {\n    throw new Error('Unsupported');\n  }\n  return safeSplit(value, '.');\n}\nfunction atMapper(data) {\n  return `${data[0]}@${data[1]}`;\n}\nfunction atUnmapper(value) {\n  if (typeof value !== 'string') {\n    throw new Error('Unsupported');\n  }\n  return safeSplit(value, '@', 2);\n}\nfunction emailAddress(constraints = {}) {\n  const others = [\n    '!',\n    '#',\n    '$',\n    '%',\n    '&',\n    \"'\",\n    '*',\n    '+',\n    '-',\n    '/',\n    '=',\n    '?',\n    '^',\n    '_',\n    '`',\n    '{',\n    '|',\n    '}',\n    '~',\n  ];\n  const atextArb = buildLowerAlphaNumericArbitrary(others);\n  const localPartArb = adapter(\n    array(\n      stringOf(atextArb, {\n        minLength: 1,\n        maxLength: 64,\n        size: constraints.size,\n      }),\n      { minLength: 1, maxLength: 32, size: constraints.size },\n    ),\n    dotAdapter,\n  ).map(dotMapper, dotUnmapper);\n  return tuple(localPartArb, domain({ size: constraints.size })).map(\n    atMapper,\n    atUnmapper,\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/ArrayInt64.js\nvar Zero64 = { sign: 1, data: [0, 0] };\nvar Unit64 = { sign: 1, data: [0, 1] };\nfunction isZero64(a) {\n  return a.data[0] === 0 && a.data[1] === 0;\n}\nfunction isStrictlyNegative64(a) {\n  return a.sign === -1 && !isZero64(a);\n}\nfunction isStrictlyPositive64(a) {\n  return a.sign === 1 && !isZero64(a);\n}\nfunction isEqual64(a, b) {\n  if (a.data[0] === b.data[0] && a.data[1] === b.data[1]) {\n    return a.sign === b.sign || (a.data[0] === 0 && a.data[1] === 0);\n  }\n  return false;\n}\nfunction isStrictlySmaller64Internal(a, b) {\n  return a[0] < b[0] || (a[0] === b[0] && a[1] < b[1]);\n}\nfunction isStrictlySmaller64(a, b) {\n  if (a.sign === b.sign) {\n    return a.sign === 1\n      ? isStrictlySmaller64Internal(a.data, b.data)\n      : isStrictlySmaller64Internal(b.data, a.data);\n  }\n  return a.sign === -1 && (!isZero64(a) || !isZero64(b));\n}\nfunction clone64(a) {\n  return { sign: a.sign, data: [a.data[0], a.data[1]] };\n}\nfunction substract64DataInternal(a, b) {\n  let reminderLow = 0;\n  let low = a[1] - b[1];\n  if (low < 0) {\n    reminderLow = 1;\n    low = low >>> 0;\n  }\n  return [a[0] - b[0] - reminderLow, low];\n}\nfunction substract64Internal(a, b) {\n  if (a.sign === 1 && b.sign === -1) {\n    const low = a.data[1] + b.data[1];\n    const high = a.data[0] + b.data[0] + (low > 4294967295 ? 1 : 0);\n    return { sign: 1, data: [high >>> 0, low >>> 0] };\n  }\n  return {\n    sign: 1,\n    data:\n      a.sign === 1\n        ? substract64DataInternal(a.data, b.data)\n        : substract64DataInternal(b.data, a.data),\n  };\n}\nfunction substract64(arrayIntA, arrayIntB) {\n  if (isStrictlySmaller64(arrayIntA, arrayIntB)) {\n    const out = substract64Internal(arrayIntB, arrayIntA);\n    out.sign = -1;\n    return out;\n  }\n  return substract64Internal(arrayIntA, arrayIntB);\n}\nfunction negative64(arrayIntA) {\n  return {\n    sign: -arrayIntA.sign,\n    data: [arrayIntA.data[0], arrayIntA.data[1]],\n  };\n}\nfunction add64(arrayIntA, arrayIntB) {\n  if (isZero64(arrayIntB)) {\n    if (isZero64(arrayIntA)) {\n      return clone64(Zero64);\n    }\n    return clone64(arrayIntA);\n  }\n  return substract64(arrayIntA, negative64(arrayIntB));\n}\nfunction halve64(a) {\n  return {\n    sign: a.sign,\n    data: [\n      Math.floor(a.data[0] / 2),\n      (a.data[0] % 2 === 1 ? 2147483648 : 0) + Math.floor(a.data[1] / 2),\n    ],\n  };\n}\nfunction logLike64(a) {\n  return {\n    sign: a.sign,\n    data: [\n      0,\n      Math.floor(Math.log(a.data[0] * 4294967296 + a.data[1]) / Math.log(2)),\n    ],\n  };\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/ArrayInt64Arbitrary.js\nvar ArrayInt64Arbitrary = class _ArrayInt64Arbitrary extends Arbitrary {\n  constructor(min, max) {\n    super();\n    this.min = min;\n    this.max = max;\n    this.biasedRanges = null;\n  }\n  generate(mrng, biasFactor) {\n    const range = this.computeGenerateRange(mrng, biasFactor);\n    const uncheckedValue = mrng.nextArrayInt(range.min, range.max);\n    if (uncheckedValue.data.length === 1) {\n      uncheckedValue.data.unshift(0);\n    }\n    return new Value(uncheckedValue, void 0);\n  }\n  computeGenerateRange(mrng, biasFactor) {\n    if (biasFactor === void 0 || mrng.nextInt(1, biasFactor) !== 1) {\n      return { min: this.min, max: this.max };\n    }\n    const ranges = this.retrieveBiasedRanges();\n    if (ranges.length === 1) {\n      return ranges[0];\n    }\n    const id = mrng.nextInt(-2 * (ranges.length - 1), ranges.length - 2);\n    return id < 0 ? ranges[0] : ranges[id + 1];\n  }\n  canShrinkWithoutContext(value) {\n    const unsafeValue = value;\n    return (\n      typeof value === 'object' &&\n      value !== null &&\n      (unsafeValue.sign === -1 || unsafeValue.sign === 1) &&\n      Array.isArray(unsafeValue.data) &&\n      unsafeValue.data.length === 2 &&\n      ((isStrictlySmaller64(this.min, unsafeValue) &&\n        isStrictlySmaller64(unsafeValue, this.max)) ||\n        isEqual64(this.min, unsafeValue) ||\n        isEqual64(this.max, unsafeValue))\n    );\n  }\n  shrinkArrayInt64(value, target, tryTargetAsap) {\n    const realGap = substract64(value, target);\n    function* shrinkGen() {\n      let previous = tryTargetAsap ? void 0 : target;\n      const gap = tryTargetAsap ? realGap : halve64(realGap);\n      for (\n        let toremove = gap;\n        !isZero64(toremove);\n        toremove = halve64(toremove)\n      ) {\n        const next = substract64(value, toremove);\n        yield new Value(next, previous);\n        previous = next;\n      }\n    }\n    return stream(shrinkGen());\n  }\n  shrink(current, context2) {\n    if (!_ArrayInt64Arbitrary.isValidContext(current, context2)) {\n      const target = this.defaultTarget();\n      return this.shrinkArrayInt64(current, target, true);\n    }\n    if (this.isLastChanceTry(current, context2)) {\n      return Stream.of(new Value(context2, void 0));\n    }\n    return this.shrinkArrayInt64(current, context2, false);\n  }\n  defaultTarget() {\n    if (!isStrictlyPositive64(this.min) && !isStrictlyNegative64(this.max)) {\n      return Zero64;\n    }\n    return isStrictlyNegative64(this.min) ? this.max : this.min;\n  }\n  isLastChanceTry(current, context2) {\n    if (isZero64(current)) {\n      return false;\n    }\n    if (current.sign === 1) {\n      return (\n        isEqual64(current, add64(context2, Unit64)) &&\n        isStrictlyPositive64(substract64(current, this.min))\n      );\n    } else {\n      return (\n        isEqual64(current, substract64(context2, Unit64)) &&\n        isStrictlyNegative64(substract64(current, this.max))\n      );\n    }\n  }\n  static isValidContext(_current, context2) {\n    if (context2 === void 0) {\n      return false;\n    }\n    if (\n      typeof context2 !== 'object' ||\n      context2 === null ||\n      !('sign' in context2) ||\n      !('data' in context2)\n    ) {\n      throw new Error(\n        `Invalid context type passed to ArrayInt64Arbitrary (#1)`,\n      );\n    }\n    return true;\n  }\n  retrieveBiasedRanges() {\n    if (this.biasedRanges != null) {\n      return this.biasedRanges;\n    }\n    if (isEqual64(this.min, this.max)) {\n      this.biasedRanges = [{ min: this.min, max: this.max }];\n      return this.biasedRanges;\n    }\n    const minStrictlySmallerZero = isStrictlyNegative64(this.min);\n    const maxStrictlyGreaterZero = isStrictlyPositive64(this.max);\n    if (minStrictlySmallerZero && maxStrictlyGreaterZero) {\n      const logMin = logLike64(this.min);\n      const logMax = logLike64(this.max);\n      this.biasedRanges = [\n        { min: logMin, max: logMax },\n        { min: substract64(this.max, logMax), max: this.max },\n        { min: this.min, max: substract64(this.min, logMin) },\n      ];\n    } else {\n      const logGap = logLike64(substract64(this.max, this.min));\n      const arbCloseToMin = { min: this.min, max: add64(this.min, logGap) };\n      const arbCloseToMax = {\n        min: substract64(this.max, logGap),\n        max: this.max,\n      };\n      this.biasedRanges = minStrictlySmallerZero\n        ? [arbCloseToMax, arbCloseToMin]\n        : [arbCloseToMin, arbCloseToMax];\n    }\n    return this.biasedRanges;\n  }\n};\nfunction arrayInt64(min, max) {\n  const arb = new ArrayInt64Arbitrary(min, max);\n  return arb;\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/DoubleHelpers.js\nvar safeNegativeInfinity2 = Number.NEGATIVE_INFINITY;\nvar safePositiveInfinity3 = Number.POSITIVE_INFINITY;\nvar safeEpsilon = Number.EPSILON;\nvar INDEX_POSITIVE_INFINITY = { sign: 1, data: [2146435072, 0] };\nvar INDEX_NEGATIVE_INFINITY = { sign: -1, data: [2146435072, 1] };\nvar f64 = new Float64Array(1);\nvar u32 = new Uint32Array(f64.buffer, f64.byteOffset);\nfunction bitCastDoubleToUInt64(f) {\n  f64[0] = f;\n  return [u32[1], u32[0]];\n}\nfunction decomposeDouble(d) {\n  const { 0: hi, 1: lo } = bitCastDoubleToUInt64(d);\n  const signBit = hi >>> 31;\n  const exponentBits = (hi >>> 20) & 2047;\n  const significandBits = (hi & 1048575) * 4294967296 + lo;\n  const exponent = exponentBits === 0 ? -1022 : exponentBits - 1023;\n  let significand = exponentBits === 0 ? 0 : 1;\n  significand += significandBits / 2 ** 52;\n  significand *= signBit === 0 ? 1 : -1;\n  return { exponent, significand };\n}\nfunction positiveNumberToInt64(n) {\n  return [~~(n / 4294967296), n >>> 0];\n}\nfunction indexInDoubleFromDecomp(exponent, significand) {\n  if (exponent === -1022) {\n    const rescaledSignificand2 = significand * 2 ** 52;\n    return positiveNumberToInt64(rescaledSignificand2);\n  }\n  const rescaledSignificand = (significand - 1) * 2 ** 52;\n  const exponentOnlyHigh = (exponent + 1023) * 2 ** 20;\n  const index = positiveNumberToInt64(rescaledSignificand);\n  index[0] += exponentOnlyHigh;\n  return index;\n}\nfunction doubleToIndex(d) {\n  if (d === safePositiveInfinity3) {\n    return clone64(INDEX_POSITIVE_INFINITY);\n  }\n  if (d === safeNegativeInfinity2) {\n    return clone64(INDEX_NEGATIVE_INFINITY);\n  }\n  const decomp = decomposeDouble(d);\n  const exponent = decomp.exponent;\n  const significand = decomp.significand;\n  if (d > 0 || (d === 0 && 1 / d === safePositiveInfinity3)) {\n    return { sign: 1, data: indexInDoubleFromDecomp(exponent, significand) };\n  } else {\n    const indexOpposite = indexInDoubleFromDecomp(exponent, -significand);\n    if (indexOpposite[1] === 4294967295) {\n      indexOpposite[0] += 1;\n      indexOpposite[1] = 0;\n    } else {\n      indexOpposite[1] += 1;\n    }\n    return { sign: -1, data: indexOpposite };\n  }\n}\nfunction indexToDouble(index) {\n  if (index.sign === -1) {\n    const indexOpposite = { sign: 1, data: [index.data[0], index.data[1]] };\n    if (indexOpposite.data[1] === 0) {\n      indexOpposite.data[0] -= 1;\n      indexOpposite.data[1] = 4294967295;\n    } else {\n      indexOpposite.data[1] -= 1;\n    }\n    return -indexToDouble(indexOpposite);\n  }\n  if (isEqual64(index, INDEX_POSITIVE_INFINITY)) {\n    return safePositiveInfinity3;\n  }\n  if (index.data[0] < 2097152) {\n    return (index.data[0] * 4294967296 + index.data[1]) * 2 ** -1074;\n  }\n  const postIndexHigh = index.data[0] - 2097152;\n  const exponent = -1021 + (postIndexHigh >> 20);\n  const significand =\n    1 + ((postIndexHigh & 1048575) * 2 ** 32 + index.data[1]) * safeEpsilon;\n  return significand * 2 ** exponent;\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/double.js\nvar safeNumberIsNaN5 = Number.isNaN;\nvar safeNegativeInfinity3 = Number.NEGATIVE_INFINITY;\nvar safePositiveInfinity4 = Number.POSITIVE_INFINITY;\nvar safeMaxValue = Number.MAX_VALUE;\nvar safeNaN2 = Number.NaN;\nfunction safeDoubleToIndex(d, constraintsLabel) {\n  if (safeNumberIsNaN5(d)) {\n    throw new Error(\n      'fc.double constraints.' + constraintsLabel + ' must be a 64-bit float',\n    );\n  }\n  return doubleToIndex(d);\n}\nfunction unmapperDoubleToIndex(value) {\n  if (typeof value !== 'number') throw new Error('Unsupported type');\n  return doubleToIndex(value);\n}\nfunction double(constraints = {}) {\n  const {\n    noDefaultInfinity = false,\n    noNaN = false,\n    minExcluded = false,\n    maxExcluded = false,\n    min = noDefaultInfinity ? -safeMaxValue : safeNegativeInfinity3,\n    max = noDefaultInfinity ? safeMaxValue : safePositiveInfinity4,\n  } = constraints;\n  const minIndexRaw = safeDoubleToIndex(min, 'min');\n  const minIndex = minExcluded ? add64(minIndexRaw, Unit64) : minIndexRaw;\n  const maxIndexRaw = safeDoubleToIndex(max, 'max');\n  const maxIndex = maxExcluded ? substract64(maxIndexRaw, Unit64) : maxIndexRaw;\n  if (isStrictlySmaller64(maxIndex, minIndex)) {\n    throw new Error(\n      'fc.double constraints.min must be smaller or equal to constraints.max',\n    );\n  }\n  if (noNaN) {\n    return arrayInt64(minIndex, maxIndex).map(\n      indexToDouble,\n      unmapperDoubleToIndex,\n    );\n  }\n  const positiveMaxIdx = isStrictlyPositive64(maxIndex);\n  const minIndexWithNaN = positiveMaxIdx\n    ? minIndex\n    : substract64(minIndex, Unit64);\n  const maxIndexWithNaN = positiveMaxIdx ? add64(maxIndex, Unit64) : maxIndex;\n  return arrayInt64(minIndexWithNaN, maxIndexWithNaN).map(\n    (index) => {\n      if (\n        isStrictlySmaller64(maxIndex, index) ||\n        isStrictlySmaller64(index, minIndex)\n      )\n        return safeNaN2;\n      else return indexToDouble(index);\n    },\n    (value) => {\n      if (typeof value !== 'number') throw new Error('Unsupported type');\n      if (safeNumberIsNaN5(value))\n        return !isEqual64(maxIndex, maxIndexWithNaN)\n          ? maxIndexWithNaN\n          : minIndexWithNaN;\n      return doubleToIndex(value);\n    },\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/FloatHelpers.js\nvar safeNegativeInfinity4 = Number.NEGATIVE_INFINITY;\nvar safePositiveInfinity5 = Number.POSITIVE_INFINITY;\nvar MIN_VALUE_32 = 2 ** -126 * 2 ** -23;\nvar MAX_VALUE_32 = 2 ** 127 * (1 + (2 ** 23 - 1) / 2 ** 23);\nvar EPSILON_32 = 2 ** -23;\nvar INDEX_POSITIVE_INFINITY2 = 2139095040;\nvar INDEX_NEGATIVE_INFINITY2 = -2139095041;\nvar f32 = new Float32Array(1);\nvar u322 = new Uint32Array(f32.buffer, f32.byteOffset);\nfunction bitCastFloatToUInt32(f) {\n  f32[0] = f;\n  return u322[0];\n}\nfunction decomposeFloat(f) {\n  const bits = bitCastFloatToUInt32(f);\n  const signBit = bits >>> 31;\n  const exponentBits = (bits >>> 23) & 255;\n  const significandBits = bits & 8388607;\n  const exponent = exponentBits === 0 ? -126 : exponentBits - 127;\n  let significand = exponentBits === 0 ? 0 : 1;\n  significand += significandBits / 2 ** 23;\n  significand *= signBit === 0 ? 1 : -1;\n  return { exponent, significand };\n}\nfunction indexInFloatFromDecomp(exponent, significand) {\n  if (exponent === -126) {\n    return significand * 8388608;\n  }\n  return (exponent + 127) * 8388608 + (significand - 1) * 8388608;\n}\nfunction floatToIndex(f) {\n  if (f === safePositiveInfinity5) {\n    return INDEX_POSITIVE_INFINITY2;\n  }\n  if (f === safeNegativeInfinity4) {\n    return INDEX_NEGATIVE_INFINITY2;\n  }\n  const decomp = decomposeFloat(f);\n  const exponent = decomp.exponent;\n  const significand = decomp.significand;\n  if (f > 0 || (f === 0 && 1 / f === safePositiveInfinity5)) {\n    return indexInFloatFromDecomp(exponent, significand);\n  } else {\n    return -indexInFloatFromDecomp(exponent, -significand) - 1;\n  }\n}\nfunction indexToFloat(index) {\n  if (index < 0) {\n    return -indexToFloat(-index - 1);\n  }\n  if (index === INDEX_POSITIVE_INFINITY2) {\n    return safePositiveInfinity5;\n  }\n  if (index < 16777216) {\n    return index * 2 ** -149;\n  }\n  const postIndex = index - 16777216;\n  const exponent = -125 + (postIndex >> 23);\n  const significand = 1 + (postIndex & 8388607) / 8388608;\n  return significand * 2 ** exponent;\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/float.js\nvar safeNumberIsNaN6 = Number.isNaN;\nvar safeMathFround = Math.fround;\nvar safeNegativeInfinity5 = Number.NEGATIVE_INFINITY;\nvar safePositiveInfinity6 = Number.POSITIVE_INFINITY;\nvar safeNaN3 = Number.NaN;\nfunction safeFloatToIndex(f, constraintsLabel) {\n  const conversionTrick =\n    'you can convert any double to a 32-bit float by using `Math.fround(myDouble)`';\n  const errorMessage =\n    'fc.float constraints.' +\n    constraintsLabel +\n    ' must be a 32-bit float - ' +\n    conversionTrick;\n  if (safeNumberIsNaN6(f) || safeMathFround(f) !== f) {\n    throw new Error(errorMessage);\n  }\n  return floatToIndex(f);\n}\nfunction unmapperFloatToIndex(value) {\n  if (typeof value !== 'number') throw new Error('Unsupported type');\n  return floatToIndex(value);\n}\nfunction float(constraints = {}) {\n  const {\n    noDefaultInfinity = false,\n    noNaN = false,\n    minExcluded = false,\n    maxExcluded = false,\n    min = noDefaultInfinity ? -MAX_VALUE_32 : safeNegativeInfinity5,\n    max = noDefaultInfinity ? MAX_VALUE_32 : safePositiveInfinity6,\n  } = constraints;\n  const minIndexRaw = safeFloatToIndex(min, 'min');\n  const minIndex = minExcluded ? minIndexRaw + 1 : minIndexRaw;\n  const maxIndexRaw = safeFloatToIndex(max, 'max');\n  const maxIndex = maxExcluded ? maxIndexRaw - 1 : maxIndexRaw;\n  if (minIndex > maxIndex) {\n    throw new Error(\n      'fc.float constraints.min must be smaller or equal to constraints.max',\n    );\n  }\n  if (noNaN) {\n    return integer({ min: minIndex, max: maxIndex }).map(\n      indexToFloat,\n      unmapperFloatToIndex,\n    );\n  }\n  const minIndexWithNaN = maxIndex > 0 ? minIndex : minIndex - 1;\n  const maxIndexWithNaN = maxIndex > 0 ? maxIndex + 1 : maxIndex;\n  return integer({ min: minIndexWithNaN, max: maxIndexWithNaN }).map(\n    (index) => {\n      if (index > maxIndex || index < minIndex) return safeNaN3;\n      else return indexToFloat(index);\n    },\n    (value) => {\n      if (typeof value !== 'number') throw new Error('Unsupported type');\n      if (safeNumberIsNaN6(value))\n        return maxIndex !== maxIndexWithNaN ? maxIndexWithNaN : minIndexWithNaN;\n      return floatToIndex(value);\n    },\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/TextEscaper.js\nfunction escapeForTemplateString(originalText) {\n  return originalText.replace(/([$`\\\\])/g, '\\\\$1').replace(/\\r/g, '\\\\r');\n}\nfunction escapeForMultilineComments(originalText) {\n  return originalText.replace(/\\*\\//g, '*\\\\/');\n}\n\n// ../../../node_modules/fast-check/lib/esm/utils/hash.js\nvar crc32Table = [\n  0, 1996959894, 3993919788, 2567524794, 124634137, 1886057615, 3915621685,\n  2657392035, 249268274, 2044508324, 3772115230, 2547177864, 162941995,\n  2125561021, 3887607047, 2428444049, 498536548, 1789927666, 4089016648,\n  2227061214, 450548861, 1843258603, 4107580753, 2211677639, 325883990,\n  1684777152, 4251122042, 2321926636, 335633487, 1661365465, 4195302755,\n  2366115317, 997073096, 1281953886, 3579855332, 2724688242, 1006888145,\n  1258607687, 3524101629, 2768942443, 901097722, 1119000684, 3686517206,\n  2898065728, 853044451, 1172266101, 3705015759, 2882616665, 651767980,\n  1373503546, 3369554304, 3218104598, 565507253, 1454621731, 3485111705,\n  3099436303, 671266974, 1594198024, 3322730930, 2970347812, 795835527,\n  1483230225, 3244367275, 3060149565, 1994146192, 31158534, 2563907772,\n  4023717930, 1907459465, 112637215, 2680153253, 3904427059, 2013776290,\n  251722036, 2517215374, 3775830040, 2137656763, 141376813, 2439277719,\n  3865271297, 1802195444, 476864866, 2238001368, 4066508878, 1812370925,\n  453092731, 2181625025, 4111451223, 1706088902, 314042704, 2344532202,\n  4240017532, 1658658271, 366619977, 2362670323, 4224994405, 1303535960,\n  984961486, 2747007092, 3569037538, 1256170817, 1037604311, 2765210733,\n  3554079995, 1131014506, 879679996, 2909243462, 3663771856, 1141124467,\n  855842277, 2852801631, 3708648649, 1342533948, 654459306, 3188396048,\n  3373015174, 1466479909, 544179635, 3110523913, 3462522015, 1591671054,\n  702138776, 2966460450, 3352799412, 1504918807, 783551873, 3082640443,\n  3233442989, 3988292384, 2596254646, 62317068, 1957810842, 3939845945,\n  2647816111, 81470997, 1943803523, 3814918930, 2489596804, 225274430,\n  2053790376, 3826175755, 2466906013, 167816743, 2097651377, 4027552580,\n  2265490386, 503444072, 1762050814, 4150417245, 2154129355, 426522225,\n  1852507879, 4275313526, 2312317920, 282753626, 1742555852, 4189708143,\n  2394877945, 397917763, 1622183637, 3604390888, 2714866558, 953729732,\n  1340076626, 3518719985, 2797360999, 1068828381, 1219638859, 3624741850,\n  2936675148, 906185462, 1090812512, 3747672003, 2825379669, 829329135,\n  1181335161, 3412177804, 3160834842, 628085408, 1382605366, 3423369109,\n  3138078467, 570562233, 1426400815, 3317316542, 2998733608, 733239954,\n  1555261956, 3268935591, 3050360625, 752459403, 1541320221, 2607071920,\n  3965973030, 1969922972, 40735498, 2617837225, 3943577151, 1913087877,\n  83908371, 2512341634, 3803740692, 2075208622, 213261112, 2463272603,\n  3855990285, 2094854071, 198958881, 2262029012, 4057260610, 1759359992,\n  534414190, 2176718541, 4139329115, 1873836001, 414664567, 2282248934,\n  4279200368, 1711684554, 285281116, 2405801727, 4167216745, 1634467795,\n  376229701, 2685067896, 3608007406, 1308918612, 956543938, 2808555105,\n  3495958263, 1231636301, 1047427035, 2932959818, 3654703836, 1088359270,\n  936918e3, 2847714899, 3736837829, 1202900863, 817233897, 3183342108,\n  3401237130, 1404277552, 615818150, 3134207493, 3453421203, 1423857449,\n  601450431, 3009837614, 3294710456, 1567103746, 711928724, 3020668471,\n  3272380065, 1510334235, 755167117,\n];\nfunction hash(repr) {\n  let crc = 4294967295;\n  for (let idx = 0; idx < repr.length; ++idx) {\n    const c = safeCharCodeAt(repr, idx);\n    if (c < 128) {\n      crc = crc32Table[(crc & 255) ^ c] ^ (crc >> 8);\n    } else if (c < 2048) {\n      crc = crc32Table[(crc & 255) ^ (192 | ((c >> 6) & 31))] ^ (crc >> 8);\n      crc = crc32Table[(crc & 255) ^ (128 | (c & 63))] ^ (crc >> 8);\n    } else if (c >= 55296 && c < 57344) {\n      const cNext = safeCharCodeAt(repr, ++idx);\n      if (c >= 56320 || cNext < 56320 || cNext > 57343 || Number.isNaN(cNext)) {\n        idx -= 1;\n        crc = crc32Table[(crc & 255) ^ 239] ^ (crc >> 8);\n        crc = crc32Table[(crc & 255) ^ 191] ^ (crc >> 8);\n        crc = crc32Table[(crc & 255) ^ 189] ^ (crc >> 8);\n      } else {\n        const c1 = (c & 1023) + 64;\n        const c2 = cNext & 1023;\n        crc = crc32Table[(crc & 255) ^ (240 | ((c1 >> 8) & 7))] ^ (crc >> 8);\n        crc = crc32Table[(crc & 255) ^ (128 | ((c1 >> 2) & 63))] ^ (crc >> 8);\n        crc =\n          crc32Table[(crc & 255) ^ (128 | ((c2 >> 6) & 15) | ((c1 & 3) << 4))] ^\n          (crc >> 8);\n        crc = crc32Table[(crc & 255) ^ (128 | (c2 & 63))] ^ (crc >> 8);\n      }\n    } else {\n      crc = crc32Table[(crc & 255) ^ (224 | ((c >> 12) & 15))] ^ (crc >> 8);\n      crc = crc32Table[(crc & 255) ^ (128 | ((c >> 6) & 63))] ^ (crc >> 8);\n      crc = crc32Table[(crc & 255) ^ (128 | (c & 63))] ^ (crc >> 8);\n    }\n  }\n  return (crc | 0) + 2147483648;\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/builders/CompareFunctionArbitraryBuilder.js\nvar safeObjectAssign5 = Object.assign;\nvar safeObjectKeys2 = Object.keys;\nfunction buildCompareFunctionArbitrary(cmp) {\n  return tuple(\n    integer().noShrink(),\n    integer({ min: 1, max: 4294967295 }).noShrink(),\n  ).map(([seed, hashEnvSize]) => {\n    const producer = () => {\n      const recorded = {};\n      const f = (a, b) => {\n        const reprA = stringify(a);\n        const reprB = stringify(b);\n        const hA = hash(`${seed}${reprA}`) % hashEnvSize;\n        const hB = hash(`${seed}${reprB}`) % hashEnvSize;\n        const val = cmp(hA, hB);\n        recorded[`[${reprA},${reprB}]`] = val;\n        return val;\n      };\n      return safeObjectAssign5(f, {\n        toString: () => {\n          const seenValues = safeObjectKeys2(recorded)\n            .sort()\n            .map((k) => `${k} => ${stringify(recorded[k])}`)\n            .map((line) => `/* ${escapeForMultilineComments(line)} */`);\n          return `function(a, b) {\n  // With hash and stringify coming from fast-check${\n    seenValues.length !== 0\n      ? `\n  ${safeJoin(seenValues, '\\n  ')}`\n      : ''\n  }\n  const cmp = ${cmp};\n  const hA = hash('${seed}' + stringify(a)) % ${hashEnvSize};\n  const hB = hash('${seed}' + stringify(b)) % ${hashEnvSize};\n  return cmp(hA, hB);\n}`;\n        },\n        [cloneMethod]: producer,\n      });\n    };\n    return producer();\n  });\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/compareBooleanFunc.js\nvar safeObjectAssign6 = Object.assign;\nfunction compareBooleanFunc() {\n  return buildCompareFunctionArbitrary(\n    safeObjectAssign6((hA, hB) => hA < hB, {\n      toString() {\n        return '(hA, hB) => hA < hB';\n      },\n    }),\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/compareFunc.js\nvar safeObjectAssign7 = Object.assign;\nfunction compareFunc() {\n  return buildCompareFunctionArbitrary(\n    safeObjectAssign7((hA, hB) => hA - hB, {\n      toString() {\n        return '(hA, hB) => hA - hB';\n      },\n    }),\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/func.js\nvar safeObjectDefineProperties = Object.defineProperties;\nvar safeObjectKeys3 = Object.keys;\nfunction func(arb) {\n  return tuple(array(arb, { minLength: 1 }), integer().noShrink()).map(\n    ([outs, seed]) => {\n      const producer = () => {\n        const recorded = {};\n        const f = (...args) => {\n          const repr = stringify(args);\n          const val = outs[hash(`${seed}${repr}`) % outs.length];\n          recorded[repr] = val;\n          return hasCloneMethod(val) ? val[cloneMethod]() : val;\n        };\n        function prettyPrint2(stringifiedOuts) {\n          const seenValues = safeMap(\n            safeMap(\n              safeSort(safeObjectKeys3(recorded)),\n              (k) => `${k} => ${stringify(recorded[k])}`,\n            ),\n            (line) => `/* ${escapeForMultilineComments(line)} */`,\n          );\n          return `function(...args) {\n  // With hash and stringify coming from fast-check${\n    seenValues.length !== 0\n      ? `\n  ${seenValues.join('\\n  ')}`\n      : ''\n  }\n  const outs = ${stringifiedOuts};\n  return outs[hash('${seed}' + stringify(args)) % outs.length];\n}`;\n        }\n        return safeObjectDefineProperties(f, {\n          toString: { value: () => prettyPrint2(stringify(outs)) },\n          [toStringMethod]: { value: () => prettyPrint2(stringify(outs)) },\n          [asyncToStringMethod]: {\n            value: async () => prettyPrint2(await asyncStringify(outs)),\n          },\n          [cloneMethod]: { value: producer, configurable: true },\n        });\n      };\n      return producer();\n    },\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/maxSafeInteger.js\nvar safeMinSafeInteger = Number.MIN_SAFE_INTEGER;\nvar safeMaxSafeInteger2 = Number.MAX_SAFE_INTEGER;\nfunction maxSafeInteger() {\n  return new IntegerArbitrary(safeMinSafeInteger, safeMaxSafeInteger2);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/maxSafeNat.js\nvar safeMaxSafeInteger3 = Number.MAX_SAFE_INTEGER;\nfunction maxSafeNat() {\n  return new IntegerArbitrary(0, safeMaxSafeInteger3);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/NatToStringifiedNat.js\nvar safeNumberParseInt = Number.parseInt;\nfunction natToStringifiedNatMapper(options) {\n  const [style, v] = options;\n  switch (style) {\n    case 'oct':\n      return `0${safeNumberToString(v, 8)}`;\n    case 'hex':\n      return `0x${safeNumberToString(v, 16)}`;\n    case 'dec':\n    default:\n      return `${v}`;\n  }\n}\nfunction tryParseStringifiedNat(stringValue, radix) {\n  const parsedNat = safeNumberParseInt(stringValue, radix);\n  if (safeNumberToString(parsedNat, radix) !== stringValue) {\n    throw new Error('Invalid value');\n  }\n  return parsedNat;\n}\nfunction natToStringifiedNatUnmapper(value) {\n  if (typeof value !== 'string') {\n    throw new Error('Invalid type');\n  }\n  if (value.length >= 2 && value[0] === '0') {\n    if (value[1] === 'x') {\n      return ['hex', tryParseStringifiedNat(safeSubstring(value, 2), 16)];\n    }\n    return ['oct', tryParseStringifiedNat(safeSubstring(value, 1), 8)];\n  }\n  return ['dec', tryParseStringifiedNat(value, 10)];\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/ipV4.js\nfunction dotJoinerMapper(data) {\n  return safeJoin(data, '.');\n}\nfunction dotJoinerUnmapper(value) {\n  if (typeof value !== 'string') {\n    throw new Error('Invalid type');\n  }\n  return safeMap(safeSplit(value, '.'), (v) => tryParseStringifiedNat(v, 10));\n}\nfunction ipV4() {\n  return tuple(nat(255), nat(255), nat(255), nat(255)).map(\n    dotJoinerMapper,\n    dotJoinerUnmapper,\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/builders/StringifiedNatArbitraryBuilder.js\nfunction buildStringifiedNatArbitrary(maxValue) {\n  return tuple(constantFrom('dec', 'oct', 'hex'), nat(maxValue)).map(\n    natToStringifiedNatMapper,\n    natToStringifiedNatUnmapper,\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/ipV4Extended.js\nfunction dotJoinerMapper2(data) {\n  return safeJoin(data, '.');\n}\nfunction dotJoinerUnmapper2(value) {\n  if (typeof value !== 'string') {\n    throw new Error('Invalid type');\n  }\n  return safeSplit(value, '.');\n}\nfunction ipV4Extended() {\n  return oneof(\n    tuple(\n      buildStringifiedNatArbitrary(255),\n      buildStringifiedNatArbitrary(255),\n      buildStringifiedNatArbitrary(255),\n      buildStringifiedNatArbitrary(255),\n    ).map(dotJoinerMapper2, dotJoinerUnmapper2),\n    tuple(\n      buildStringifiedNatArbitrary(255),\n      buildStringifiedNatArbitrary(255),\n      buildStringifiedNatArbitrary(65535),\n    ).map(dotJoinerMapper2, dotJoinerUnmapper2),\n    tuple(\n      buildStringifiedNatArbitrary(255),\n      buildStringifiedNatArbitrary(16777215),\n    ).map(dotJoinerMapper2, dotJoinerUnmapper2),\n    buildStringifiedNatArbitrary(4294967295),\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/CodePointsToString.js\nfunction codePointsToStringMapper(tab) {\n  return safeJoin(tab, '');\n}\nfunction codePointsToStringUnmapper(value) {\n  if (typeof value !== 'string') {\n    throw new Error('Cannot unmap the passed value');\n  }\n  return [...value];\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/hexaString.js\nvar safeObjectAssign8 = Object.assign;\nfunction hexaString(constraints = {}) {\n  const charArbitrary = hexa();\n  const experimentalCustomSlices = createSlicesForString(\n    charArbitrary,\n    codePointsToStringUnmapper,\n  );\n  const enrichedConstraints = safeObjectAssign8(\n    safeObjectAssign8({}, constraints),\n    {\n      experimentalCustomSlices,\n    },\n  );\n  return array(charArbitrary, enrichedConstraints).map(\n    codePointsToStringMapper,\n    codePointsToStringUnmapper,\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/EntitiesToIPv6.js\nfunction readBh(value) {\n  if (value.length === 0) return [];\n  else return safeSplit(value, ':');\n}\nfunction extractEhAndL(value) {\n  const valueSplits = safeSplit(value, ':');\n  if (\n    valueSplits.length >= 2 &&\n    valueSplits[valueSplits.length - 1].length <= 4\n  ) {\n    return [\n      safeSlice(valueSplits, 0, valueSplits.length - 2),\n      `${valueSplits[valueSplits.length - 2]}:${valueSplits[valueSplits.length - 1]}`,\n    ];\n  }\n  return [\n    safeSlice(valueSplits, 0, valueSplits.length - 1),\n    valueSplits[valueSplits.length - 1],\n  ];\n}\nfunction fullySpecifiedMapper(data) {\n  return `${safeJoin(data[0], ':')}:${data[1]}`;\n}\nfunction fullySpecifiedUnmapper(value) {\n  if (typeof value !== 'string') throw new Error('Invalid type');\n  return extractEhAndL(value);\n}\nfunction onlyTrailingMapper(data) {\n  return `::${safeJoin(data[0], ':')}:${data[1]}`;\n}\nfunction onlyTrailingUnmapper(value) {\n  if (typeof value !== 'string') throw new Error('Invalid type');\n  if (!safeStartsWith(value, '::')) throw new Error('Invalid value');\n  return extractEhAndL(safeSubstring(value, 2));\n}\nfunction multiTrailingMapper(data) {\n  return `${safeJoin(data[0], ':')}::${safeJoin(data[1], ':')}:${data[2]}`;\n}\nfunction multiTrailingUnmapper(value) {\n  if (typeof value !== 'string') throw new Error('Invalid type');\n  const [bhString, trailingString] = safeSplit(value, '::', 2);\n  const [eh, l] = extractEhAndL(trailingString);\n  return [readBh(bhString), eh, l];\n}\nfunction multiTrailingMapperOne(data) {\n  return multiTrailingMapper([data[0], [data[1]], data[2]]);\n}\nfunction multiTrailingUnmapperOne(value) {\n  const out = multiTrailingUnmapper(value);\n  return [out[0], safeJoin(out[1], ':'), out[2]];\n}\nfunction singleTrailingMapper(data) {\n  return `${safeJoin(data[0], ':')}::${data[1]}`;\n}\nfunction singleTrailingUnmapper(value) {\n  if (typeof value !== 'string') throw new Error('Invalid type');\n  const [bhString, trailing] = safeSplit(value, '::', 2);\n  return [readBh(bhString), trailing];\n}\nfunction noTrailingMapper(data) {\n  return `${safeJoin(data[0], ':')}::`;\n}\nfunction noTrailingUnmapper(value) {\n  if (typeof value !== 'string') throw new Error('Invalid type');\n  if (!safeEndsWith(value, '::')) throw new Error('Invalid value');\n  return [readBh(safeSubstring(value, 0, value.length - 2))];\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/ipV6.js\nfunction h16sTol32Mapper([a, b]) {\n  return `${a}:${b}`;\n}\nfunction h16sTol32Unmapper(value) {\n  if (typeof value !== 'string') throw new Error('Invalid type');\n  if (!value.includes(':')) throw new Error('Invalid value');\n  return value.split(':', 2);\n}\nfunction ipV6() {\n  const h16Arb = hexaString({ minLength: 1, maxLength: 4, size: 'max' });\n  const ls32Arb = oneof(\n    tuple(h16Arb, h16Arb).map(h16sTol32Mapper, h16sTol32Unmapper),\n    ipV4(),\n  );\n  return oneof(\n    tuple(\n      array(h16Arb, { minLength: 6, maxLength: 6, size: 'max' }),\n      ls32Arb,\n    ).map(fullySpecifiedMapper, fullySpecifiedUnmapper),\n    tuple(\n      array(h16Arb, { minLength: 5, maxLength: 5, size: 'max' }),\n      ls32Arb,\n    ).map(onlyTrailingMapper, onlyTrailingUnmapper),\n    tuple(\n      array(h16Arb, { minLength: 0, maxLength: 1, size: 'max' }),\n      array(h16Arb, { minLength: 4, maxLength: 4, size: 'max' }),\n      ls32Arb,\n    ).map(multiTrailingMapper, multiTrailingUnmapper),\n    tuple(\n      array(h16Arb, { minLength: 0, maxLength: 2, size: 'max' }),\n      array(h16Arb, { minLength: 3, maxLength: 3, size: 'max' }),\n      ls32Arb,\n    ).map(multiTrailingMapper, multiTrailingUnmapper),\n    tuple(\n      array(h16Arb, { minLength: 0, maxLength: 3, size: 'max' }),\n      array(h16Arb, { minLength: 2, maxLength: 2, size: 'max' }),\n      ls32Arb,\n    ).map(multiTrailingMapper, multiTrailingUnmapper),\n    tuple(\n      array(h16Arb, { minLength: 0, maxLength: 4, size: 'max' }),\n      h16Arb,\n      ls32Arb,\n    ).map(multiTrailingMapperOne, multiTrailingUnmapperOne),\n    tuple(\n      array(h16Arb, { minLength: 0, maxLength: 5, size: 'max' }),\n      ls32Arb,\n    ).map(singleTrailingMapper, singleTrailingUnmapper),\n    tuple(\n      array(h16Arb, { minLength: 0, maxLength: 6, size: 'max' }),\n      h16Arb,\n    ).map(singleTrailingMapper, singleTrailingUnmapper),\n    tuple(array(h16Arb, { minLength: 0, maxLength: 7, size: 'max' })).map(\n      noTrailingMapper,\n      noTrailingUnmapper,\n    ),\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/LazyArbitrary.js\nvar LazyArbitrary = class extends Arbitrary {\n  constructor(name) {\n    super();\n    this.name = name;\n    this.underlying = null;\n  }\n  generate(mrng, biasFactor) {\n    if (!this.underlying) {\n      throw new Error(\n        `Lazy arbitrary ${JSON.stringify(this.name)} not correctly initialized`,\n      );\n    }\n    return this.underlying.generate(mrng, biasFactor);\n  }\n  canShrinkWithoutContext(value) {\n    if (!this.underlying) {\n      throw new Error(\n        `Lazy arbitrary ${JSON.stringify(this.name)} not correctly initialized`,\n      );\n    }\n    return this.underlying.canShrinkWithoutContext(value);\n  }\n  shrink(value, context2) {\n    if (!this.underlying) {\n      throw new Error(\n        `Lazy arbitrary ${JSON.stringify(this.name)} not correctly initialized`,\n      );\n    }\n    return this.underlying.shrink(value, context2);\n  }\n};\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/letrec.js\nvar safeObjectCreate2 = Object.create;\nfunction letrec(builder) {\n  const lazyArbs = safeObjectCreate2(null);\n  const tie = (key) => {\n    if (!safeHasOwnProperty(lazyArbs, key)) {\n      lazyArbs[key] = new LazyArbitrary(String(key));\n    }\n    return lazyArbs[key];\n  };\n  const strictArbs = builder(tie);\n  for (const key in strictArbs) {\n    if (!safeHasOwnProperty(strictArbs, key)) {\n      continue;\n    }\n    const lazyAtKey = lazyArbs[key];\n    const lazyArb = lazyAtKey !== void 0 ? lazyAtKey : new LazyArbitrary(key);\n    lazyArb.underlying = strictArbs[key];\n    lazyArbs[key] = lazyArb;\n  }\n  return strictArbs;\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/WordsToLorem.js\nfunction wordsToJoinedStringMapper(words) {\n  return safeJoin(\n    safeMap(words, (w) =>\n      w[w.length - 1] === ',' ? safeSubstring(w, 0, w.length - 1) : w,\n    ),\n    ' ',\n  );\n}\nfunction wordsToJoinedStringUnmapperFor(wordsArbitrary) {\n  return function wordsToJoinedStringUnmapper(value) {\n    if (typeof value !== 'string') {\n      throw new Error('Unsupported type');\n    }\n    const words = [];\n    for (const candidate of safeSplit(value, ' ')) {\n      if (wordsArbitrary.canShrinkWithoutContext(candidate))\n        safePush(words, candidate);\n      else if (wordsArbitrary.canShrinkWithoutContext(candidate + ','))\n        safePush(words, candidate + ',');\n      else throw new Error('Unsupported word');\n    }\n    return words;\n  };\n}\nfunction wordsToSentenceMapper(words) {\n  let sentence = safeJoin(words, ' ');\n  if (sentence[sentence.length - 1] === ',') {\n    sentence = safeSubstring(sentence, 0, sentence.length - 1);\n  }\n  return safeToUpperCase(sentence[0]) + safeSubstring(sentence, 1) + '.';\n}\nfunction wordsToSentenceUnmapperFor(wordsArbitrary) {\n  return function wordsToSentenceUnmapper(value) {\n    if (typeof value !== 'string') {\n      throw new Error('Unsupported type');\n    }\n    if (\n      value.length < 2 ||\n      value[value.length - 1] !== '.' ||\n      value[value.length - 2] === ',' ||\n      safeToUpperCase(safeToLowerCase(value[0])) !== value[0]\n    ) {\n      throw new Error('Unsupported value');\n    }\n    const adaptedValue =\n      safeToLowerCase(value[0]) + safeSubstring(value, 1, value.length - 1);\n    const words = [];\n    const candidates = safeSplit(adaptedValue, ' ');\n    for (let idx = 0; idx !== candidates.length; ++idx) {\n      const candidate = candidates[idx];\n      if (wordsArbitrary.canShrinkWithoutContext(candidate))\n        safePush(words, candidate);\n      else if (\n        idx === candidates.length - 1 &&\n        wordsArbitrary.canShrinkWithoutContext(candidate + ',')\n      )\n        safePush(words, candidate + ',');\n      else throw new Error('Unsupported word');\n    }\n    return words;\n  };\n}\nfunction sentencesToParagraphMapper(sentences) {\n  return safeJoin(sentences, ' ');\n}\nfunction sentencesToParagraphUnmapper(value) {\n  if (typeof value !== 'string') {\n    throw new Error('Unsupported type');\n  }\n  const sentences = safeSplit(value, '. ');\n  for (let idx = 0; idx < sentences.length - 1; ++idx) {\n    sentences[idx] += '.';\n  }\n  return sentences;\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/lorem.js\nvar h = (v, w) => {\n  return { arbitrary: constant(v), weight: w };\n};\nfunction loremWord() {\n  return oneof(\n    h('non', 6),\n    h('adipiscing', 5),\n    h('ligula', 5),\n    h('enim', 5),\n    h('pellentesque', 5),\n    h('in', 5),\n    h('augue', 5),\n    h('et', 5),\n    h('nulla', 5),\n    h('lorem', 4),\n    h('sit', 4),\n    h('sed', 4),\n    h('diam', 4),\n    h('fermentum', 4),\n    h('ut', 4),\n    h('eu', 4),\n    h('aliquam', 4),\n    h('mauris', 4),\n    h('vitae', 4),\n    h('felis', 4),\n    h('ipsum', 3),\n    h('dolor', 3),\n    h('amet,', 3),\n    h('elit', 3),\n    h('euismod', 3),\n    h('mi', 3),\n    h('orci', 3),\n    h('erat', 3),\n    h('praesent', 3),\n    h('egestas', 3),\n    h('leo', 3),\n    h('vel', 3),\n    h('sapien', 3),\n    h('integer', 3),\n    h('curabitur', 3),\n    h('convallis', 3),\n    h('purus', 3),\n    h('risus', 2),\n    h('suspendisse', 2),\n    h('lectus', 2),\n    h('nec,', 2),\n    h('ultricies', 2),\n    h('sed,', 2),\n    h('cras', 2),\n    h('elementum', 2),\n    h('ultrices', 2),\n    h('maecenas', 2),\n    h('massa,', 2),\n    h('varius', 2),\n    h('a,', 2),\n    h('semper', 2),\n    h('proin', 2),\n    h('nec', 2),\n    h('nisl', 2),\n    h('amet', 2),\n    h('duis', 2),\n    h('congue', 2),\n    h('libero', 2),\n    h('vestibulum', 2),\n    h('pede', 2),\n    h('blandit', 2),\n    h('sodales', 2),\n    h('ante', 2),\n    h('nibh', 2),\n    h('ac', 2),\n    h('aenean', 2),\n    h('massa', 2),\n    h('suscipit', 2),\n    h('sollicitudin', 2),\n    h('fusce', 2),\n    h('tempus', 2),\n    h('aliquam,', 2),\n    h('nunc', 2),\n    h('ullamcorper', 2),\n    h('rhoncus', 2),\n    h('metus', 2),\n    h('faucibus,', 2),\n    h('justo', 2),\n    h('magna', 2),\n    h('at', 2),\n    h('tincidunt', 2),\n    h('consectetur', 1),\n    h('tortor,', 1),\n    h('dignissim', 1),\n    h('congue,', 1),\n    h('non,', 1),\n    h('porttitor,', 1),\n    h('nonummy', 1),\n    h('molestie,', 1),\n    h('est', 1),\n    h('eleifend', 1),\n    h('mi,', 1),\n    h('arcu', 1),\n    h('scelerisque', 1),\n    h('vitae,', 1),\n    h('consequat', 1),\n    h('in,', 1),\n    h('pretium', 1),\n    h('volutpat', 1),\n    h('pharetra', 1),\n    h('tempor', 1),\n    h('bibendum', 1),\n    h('odio', 1),\n    h('dui', 1),\n    h('primis', 1),\n    h('faucibus', 1),\n    h('luctus', 1),\n    h('posuere', 1),\n    h('cubilia', 1),\n    h('curae,', 1),\n    h('hendrerit', 1),\n    h('velit', 1),\n    h('mauris,', 1),\n    h('gravida', 1),\n    h('ornare', 1),\n    h('ut,', 1),\n    h('pulvinar', 1),\n    h('varius,', 1),\n    h('turpis', 1),\n    h('nibh,', 1),\n    h('eros', 1),\n    h('id', 1),\n    h('aliquet', 1),\n    h('quis', 1),\n    h('lobortis', 1),\n    h('consectetuer', 1),\n    h('morbi', 1),\n    h('vehicula', 1),\n    h('tortor', 1),\n    h('tellus,', 1),\n    h('id,', 1),\n    h('eu,', 1),\n    h('quam', 1),\n    h('feugiat,', 1),\n    h('posuere,', 1),\n    h('iaculis', 1),\n    h('lectus,', 1),\n    h('tristique', 1),\n    h('mollis,', 1),\n    h('nisl,', 1),\n    h('vulputate', 1),\n    h('sem', 1),\n    h('vivamus', 1),\n    h('placerat', 1),\n    h('imperdiet', 1),\n    h('cursus', 1),\n    h('rutrum', 1),\n    h('iaculis,', 1),\n    h('augue,', 1),\n    h('lacus', 1),\n  );\n}\nfunction lorem(constraints = {}) {\n  const { maxCount, mode = 'words', size } = constraints;\n  if (maxCount !== void 0 && maxCount < 1) {\n    throw new Error(`lorem has to produce at least one word/sentence`);\n  }\n  const wordArbitrary = loremWord();\n  if (mode === 'sentences') {\n    const sentence = array(wordArbitrary, { minLength: 1, size: 'small' }).map(\n      wordsToSentenceMapper,\n      wordsToSentenceUnmapperFor(wordArbitrary),\n    );\n    return array(sentence, { minLength: 1, maxLength: maxCount, size }).map(\n      sentencesToParagraphMapper,\n      sentencesToParagraphUnmapper,\n    );\n  } else {\n    return array(wordArbitrary, {\n      minLength: 1,\n      maxLength: maxCount,\n      size,\n    }).map(\n      wordsToJoinedStringMapper,\n      wordsToJoinedStringUnmapperFor(wordArbitrary),\n    );\n  }\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/memo.js\nvar contextRemainingDepth = 10;\nfunction memo(builder) {\n  const previous = {};\n  return (maxDepth) => {\n    const n = maxDepth !== void 0 ? maxDepth : contextRemainingDepth;\n    if (!safeHasOwnProperty(previous, n)) {\n      const prev = contextRemainingDepth;\n      contextRemainingDepth = n - 1;\n      previous[n] = builder(n);\n      contextRemainingDepth = prev;\n    }\n    return previous[n];\n  };\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/ToggleFlags.js\nfunction countToggledBits(n) {\n  let count = 0;\n  while (n > SBigInt(0)) {\n    if (n & SBigInt(1)) ++count;\n    n >>= SBigInt(1);\n  }\n  return count;\n}\nfunction computeNextFlags(flags, nextSize) {\n  const allowedMask = (SBigInt(1) << SBigInt(nextSize)) - SBigInt(1);\n  const preservedFlags = flags & allowedMask;\n  let numMissingFlags = countToggledBits(flags - preservedFlags);\n  let nFlags = preservedFlags;\n  for (\n    let mask = SBigInt(1);\n    mask <= allowedMask && numMissingFlags !== 0;\n    mask <<= SBigInt(1)\n  ) {\n    if (!(nFlags & mask)) {\n      nFlags |= mask;\n      --numMissingFlags;\n    }\n  }\n  return nFlags;\n}\nfunction computeTogglePositions(chars, toggleCase) {\n  const positions = [];\n  for (let idx = chars.length - 1; idx !== -1; --idx) {\n    if (toggleCase(chars[idx]) !== chars[idx]) safePush(positions, idx);\n  }\n  return positions;\n}\nfunction computeFlagsFromChars(untoggledChars, toggledChars, togglePositions) {\n  let flags = SBigInt(0);\n  for (\n    let idx = 0, mask = SBigInt(1);\n    idx !== togglePositions.length;\n    ++idx, mask <<= SBigInt(1)\n  ) {\n    if (\n      untoggledChars[togglePositions[idx]] !==\n      toggledChars[togglePositions[idx]]\n    ) {\n      flags |= mask;\n    }\n  }\n  return flags;\n}\nfunction applyFlagsOnChars(chars, flags, togglePositions, toggleCase) {\n  for (\n    let idx = 0, mask = SBigInt(1);\n    idx !== togglePositions.length;\n    ++idx, mask <<= SBigInt(1)\n  ) {\n    if (flags & mask)\n      chars[togglePositions[idx]] = toggleCase(chars[togglePositions[idx]]);\n  }\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/MixedCaseArbitrary.js\nvar MixedCaseArbitrary = class extends Arbitrary {\n  constructor(stringArb, toggleCase, untoggleAll) {\n    super();\n    this.stringArb = stringArb;\n    this.toggleCase = toggleCase;\n    this.untoggleAll = untoggleAll;\n  }\n  buildContextFor(rawStringValue, flagsValue) {\n    return {\n      rawString: rawStringValue.value,\n      rawStringContext: rawStringValue.context,\n      flags: flagsValue.value,\n      flagsContext: flagsValue.context,\n    };\n  }\n  generate(mrng, biasFactor) {\n    const rawStringValue = this.stringArb.generate(mrng, biasFactor);\n    const chars = [...rawStringValue.value];\n    const togglePositions = computeTogglePositions(chars, this.toggleCase);\n    const flagsArb = bigUintN(togglePositions.length);\n    const flagsValue = flagsArb.generate(mrng, void 0);\n    applyFlagsOnChars(\n      chars,\n      flagsValue.value,\n      togglePositions,\n      this.toggleCase,\n    );\n    return new Value(\n      safeJoin(chars, ''),\n      this.buildContextFor(rawStringValue, flagsValue),\n    );\n  }\n  canShrinkWithoutContext(value) {\n    if (typeof value !== 'string') {\n      return false;\n    }\n    return this.untoggleAll !== void 0\n      ? this.stringArb.canShrinkWithoutContext(this.untoggleAll(value))\n      : this.stringArb.canShrinkWithoutContext(value);\n  }\n  shrink(value, context2) {\n    let contextSafe;\n    if (context2 !== void 0) {\n      contextSafe = context2;\n    } else {\n      if (this.untoggleAll !== void 0) {\n        const untoggledValue = this.untoggleAll(value);\n        const valueChars = [...value];\n        const untoggledValueChars = [...untoggledValue];\n        const togglePositions = computeTogglePositions(\n          untoggledValueChars,\n          this.toggleCase,\n        );\n        contextSafe = {\n          rawString: untoggledValue,\n          rawStringContext: void 0,\n          flags: computeFlagsFromChars(\n            untoggledValueChars,\n            valueChars,\n            togglePositions,\n          ),\n          flagsContext: void 0,\n        };\n      } else {\n        contextSafe = {\n          rawString: value,\n          rawStringContext: void 0,\n          flags: SBigInt(0),\n          flagsContext: void 0,\n        };\n      }\n    }\n    const rawString = contextSafe.rawString;\n    const flags = contextSafe.flags;\n    return this.stringArb\n      .shrink(rawString, contextSafe.rawStringContext)\n      .map((nRawStringValue) => {\n        const nChars = [...nRawStringValue.value];\n        const nTogglePositions = computeTogglePositions(\n          nChars,\n          this.toggleCase,\n        );\n        const nFlags = computeNextFlags(flags, nTogglePositions.length);\n        applyFlagsOnChars(nChars, nFlags, nTogglePositions, this.toggleCase);\n        return new Value(\n          safeJoin(nChars, ''),\n          this.buildContextFor(nRawStringValue, new Value(nFlags, void 0)),\n        );\n      })\n      .join(\n        makeLazy(() => {\n          const chars = [...rawString];\n          const togglePositions = computeTogglePositions(\n            chars,\n            this.toggleCase,\n          );\n          return bigUintN(togglePositions.length)\n            .shrink(flags, contextSafe.flagsContext)\n            .map((nFlagsValue) => {\n              const nChars = safeSlice(chars);\n              applyFlagsOnChars(\n                nChars,\n                nFlagsValue.value,\n                togglePositions,\n                this.toggleCase,\n              );\n              return new Value(\n                safeJoin(nChars, ''),\n                this.buildContextFor(\n                  new Value(rawString, contextSafe.rawStringContext),\n                  nFlagsValue,\n                ),\n              );\n            });\n        }),\n      );\n  }\n};\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/mixedCase.js\nfunction defaultToggleCase(rawChar) {\n  const upper = safeToUpperCase(rawChar);\n  if (upper !== rawChar) return upper;\n  return safeToLowerCase(rawChar);\n}\nfunction mixedCase(stringArb, constraints) {\n  if (typeof SBigInt === 'undefined') {\n    throw new SError(`mixedCase requires BigInt support`);\n  }\n  const toggleCase =\n    (constraints && constraints.toggleCase) || defaultToggleCase;\n  const untoggleAll = constraints && constraints.untoggleAll;\n  return new MixedCaseArbitrary(stringArb, toggleCase, untoggleAll);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/float32Array.js\nfunction toTypedMapper(data) {\n  return SFloat32Array.from(data);\n}\nfunction fromTypedUnmapper(value) {\n  if (!(value instanceof SFloat32Array)) throw new Error('Unexpected type');\n  return [...value];\n}\nfunction float32Array(constraints = {}) {\n  return array(float(constraints), constraints).map(\n    toTypedMapper,\n    fromTypedUnmapper,\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/float64Array.js\nfunction toTypedMapper2(data) {\n  return SFloat64Array.from(data);\n}\nfunction fromTypedUnmapper2(value) {\n  if (!(value instanceof SFloat64Array)) throw new Error('Unexpected type');\n  return [...value];\n}\nfunction float64Array(constraints = {}) {\n  return array(double(constraints), constraints).map(\n    toTypedMapper2,\n    fromTypedUnmapper2,\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/builders/TypedIntArrayArbitraryBuilder.js\nvar __rest = function (s, e) {\n  var t = {};\n  for (var p in s)\n    if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n      t[p] = s[p];\n  if (s != null && typeof Object.getOwnPropertySymbols === 'function')\n    for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n      if (\n        e.indexOf(p[i]) < 0 &&\n        Object.prototype.propertyIsEnumerable.call(s, p[i])\n      )\n        t[p[i]] = s[p[i]];\n    }\n  return t;\n};\nfunction typedIntArrayArbitraryArbitraryBuilder(\n  constraints,\n  defaultMin,\n  defaultMax,\n  TypedArrayClass,\n  arbitraryBuilder,\n) {\n  const generatorName = TypedArrayClass.name;\n  const { min = defaultMin, max = defaultMax } = constraints,\n    arrayConstraints = __rest(constraints, ['min', 'max']);\n  if (min > max) {\n    throw new Error(\n      `Invalid range passed to ${generatorName}: min must be lower than or equal to max`,\n    );\n  }\n  if (min < defaultMin) {\n    throw new Error(\n      `Invalid min value passed to ${generatorName}: min must be greater than or equal to ${defaultMin}`,\n    );\n  }\n  if (max > defaultMax) {\n    throw new Error(\n      `Invalid max value passed to ${generatorName}: max must be lower than or equal to ${defaultMax}`,\n    );\n  }\n  return array(arbitraryBuilder({ min, max }), arrayConstraints).map(\n    (data) => TypedArrayClass.from(data),\n    (value) => {\n      if (!(value instanceof TypedArrayClass)) throw new Error('Invalid type');\n      return [...value];\n    },\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/int16Array.js\nfunction int16Array(constraints = {}) {\n  return typedIntArrayArbitraryArbitraryBuilder(\n    constraints,\n    -32768,\n    32767,\n    SInt16Array,\n    integer,\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/int32Array.js\nfunction int32Array(constraints = {}) {\n  return typedIntArrayArbitraryArbitraryBuilder(\n    constraints,\n    -2147483648,\n    2147483647,\n    SInt32Array,\n    integer,\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/int8Array.js\nfunction int8Array(constraints = {}) {\n  return typedIntArrayArbitraryArbitraryBuilder(\n    constraints,\n    -128,\n    127,\n    SInt8Array,\n    integer,\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/uint16Array.js\nfunction uint16Array(constraints = {}) {\n  return typedIntArrayArbitraryArbitraryBuilder(\n    constraints,\n    0,\n    65535,\n    SUint16Array,\n    integer,\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/uint32Array.js\nfunction uint32Array(constraints = {}) {\n  return typedIntArrayArbitraryArbitraryBuilder(\n    constraints,\n    0,\n    4294967295,\n    SUint32Array,\n    integer,\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/uint8Array.js\nfunction uint8Array(constraints = {}) {\n  return typedIntArrayArbitraryArbitraryBuilder(\n    constraints,\n    0,\n    255,\n    SUint8Array,\n    integer,\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/uint8ClampedArray.js\nfunction uint8ClampedArray(constraints = {}) {\n  return typedIntArrayArbitraryArbitraryBuilder(\n    constraints,\n    0,\n    255,\n    SUint8ClampedArray,\n    integer,\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/WithShrinkFromOtherArbitrary.js\nfunction isSafeContext(context2) {\n  return context2 !== void 0;\n}\nfunction toGeneratorValue(value) {\n  if (value.hasToBeCloned) {\n    return new Value(\n      value.value_,\n      { generatorContext: value.context },\n      () => value.value,\n    );\n  }\n  return new Value(value.value_, { generatorContext: value.context });\n}\nfunction toShrinkerValue(value) {\n  if (value.hasToBeCloned) {\n    return new Value(\n      value.value_,\n      { shrinkerContext: value.context },\n      () => value.value,\n    );\n  }\n  return new Value(value.value_, { shrinkerContext: value.context });\n}\nvar WithShrinkFromOtherArbitrary = class extends Arbitrary {\n  constructor(generatorArbitrary, shrinkerArbitrary) {\n    super();\n    this.generatorArbitrary = generatorArbitrary;\n    this.shrinkerArbitrary = shrinkerArbitrary;\n  }\n  generate(mrng, biasFactor) {\n    return toGeneratorValue(this.generatorArbitrary.generate(mrng, biasFactor));\n  }\n  canShrinkWithoutContext(value) {\n    return this.shrinkerArbitrary.canShrinkWithoutContext(value);\n  }\n  shrink(value, context2) {\n    if (!isSafeContext(context2)) {\n      return this.shrinkerArbitrary.shrink(value, void 0).map(toShrinkerValue);\n    }\n    if ('generatorContext' in context2) {\n      return this.generatorArbitrary\n        .shrink(value, context2.generatorContext)\n        .map(toGeneratorValue);\n    }\n    return this.shrinkerArbitrary\n      .shrink(value, context2.shrinkerContext)\n      .map(toShrinkerValue);\n  }\n};\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/builders/RestrictedIntegerArbitraryBuilder.js\nfunction restrictedIntegerArbitraryBuilder(min, maxGenerated, max) {\n  const generatorArbitrary = integer({ min, max: maxGenerated });\n  if (maxGenerated === max) {\n    return generatorArbitrary;\n  }\n  const shrinkerArbitrary = integer({ min, max });\n  return new WithShrinkFromOtherArbitrary(\n    generatorArbitrary,\n    shrinkerArbitrary,\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/sparseArray.js\nvar safeMathMin5 = Math.min;\nvar safeMathMax3 = Math.max;\nvar safeArrayIsArray3 = SArray.isArray;\nvar safeObjectEntries2 = Object.entries;\nfunction extractMaxIndex(indexesAndValues) {\n  let maxIndex = -1;\n  for (let index = 0; index !== indexesAndValues.length; ++index) {\n    maxIndex = safeMathMax3(maxIndex, indexesAndValues[index][0]);\n  }\n  return maxIndex;\n}\nfunction arrayFromItems(length, indexesAndValues) {\n  const array2 = SArray(length);\n  for (let index = 0; index !== indexesAndValues.length; ++index) {\n    const it = indexesAndValues[index];\n    if (it[0] < length) array2[it[0]] = it[1];\n  }\n  return array2;\n}\nfunction sparseArray(arb, constraints = {}) {\n  const {\n    size,\n    minNumElements = 0,\n    maxLength = MaxLengthUpperBound,\n    maxNumElements = maxLength,\n    noTrailingHole,\n    depthIdentifier,\n  } = constraints;\n  const maxGeneratedNumElements = maxGeneratedLengthFromSizeForArbitrary(\n    size,\n    minNumElements,\n    maxNumElements,\n    constraints.maxNumElements !== void 0,\n  );\n  const maxGeneratedLength = maxGeneratedLengthFromSizeForArbitrary(\n    size,\n    maxGeneratedNumElements,\n    maxLength,\n    constraints.maxLength !== void 0,\n  );\n  if (minNumElements > maxLength) {\n    throw new Error(\n      `The minimal number of non-hole elements cannot be higher than the maximal length of the array`,\n    );\n  }\n  if (minNumElements > maxNumElements) {\n    throw new Error(\n      `The minimal number of non-hole elements cannot be higher than the maximal number of non-holes`,\n    );\n  }\n  const resultedMaxNumElements = safeMathMin5(maxNumElements, maxLength);\n  const resultedSizeMaxNumElements =\n    constraints.maxNumElements !== void 0 || size !== void 0 ? size : '=';\n  const maxGeneratedIndexAuthorized = safeMathMax3(maxGeneratedLength - 1, 0);\n  const maxIndexAuthorized = safeMathMax3(maxLength - 1, 0);\n  const sparseArrayNoTrailingHole = uniqueArray(\n    tuple(\n      restrictedIntegerArbitraryBuilder(\n        0,\n        maxGeneratedIndexAuthorized,\n        maxIndexAuthorized,\n      ),\n      arb,\n    ),\n    {\n      size: resultedSizeMaxNumElements,\n      minLength: minNumElements,\n      maxLength: resultedMaxNumElements,\n      selector: (item) => item[0],\n      depthIdentifier,\n    },\n  ).map(\n    (items) => {\n      const lastIndex = extractMaxIndex(items);\n      return arrayFromItems(lastIndex + 1, items);\n    },\n    (value) => {\n      if (!safeArrayIsArray3(value)) {\n        throw new Error('Not supported entry type');\n      }\n      if (\n        noTrailingHole &&\n        value.length !== 0 &&\n        !(value.length - 1 in value)\n      ) {\n        throw new Error('No trailing hole');\n      }\n      return safeMap(safeObjectEntries2(value), (entry) => [\n        Number(entry[0]),\n        entry[1],\n      ]);\n    },\n  );\n  if (noTrailingHole || maxLength === minNumElements) {\n    return sparseArrayNoTrailingHole;\n  }\n  return tuple(\n    sparseArrayNoTrailingHole,\n    restrictedIntegerArbitraryBuilder(\n      minNumElements,\n      maxGeneratedLength,\n      maxLength,\n    ),\n  ).map(\n    (data) => {\n      const sparse = data[0];\n      const targetLength = data[1];\n      if (sparse.length >= targetLength) {\n        return sparse;\n      }\n      const longerSparse = safeSlice(sparse);\n      longerSparse.length = targetLength;\n      return longerSparse;\n    },\n    (value) => {\n      if (!safeArrayIsArray3(value)) {\n        throw new Error('Not supported entry type');\n      }\n      return [value, value.length];\n    },\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/ArrayToMap.js\nfunction arrayToMapMapper(data) {\n  return new Map(data);\n}\nfunction arrayToMapUnmapper(value) {\n  if (typeof value !== 'object' || value === null) {\n    throw new Error(\n      'Incompatible instance received: should be a non-null object',\n    );\n  }\n  if (!('constructor' in value) || value.constructor !== Map) {\n    throw new Error(\n      'Incompatible instance received: should be of exact type Map',\n    );\n  }\n  return Array.from(value);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/ArrayToSet.js\nfunction arrayToSetMapper(data) {\n  return new Set(data);\n}\nfunction arrayToSetUnmapper(value) {\n  if (typeof value !== 'object' || value === null) {\n    throw new Error(\n      'Incompatible instance received: should be a non-null object',\n    );\n  }\n  if (!('constructor' in value) || value.constructor !== Set) {\n    throw new Error(\n      'Incompatible instance received: should be of exact type Set',\n    );\n  }\n  return Array.from(value);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/builders/AnyArbitraryBuilder.js\nfunction mapOf(ka, va, maxKeys, size, depthIdentifier) {\n  return uniqueArray(tuple(ka, va), {\n    maxLength: maxKeys,\n    size,\n    comparator: 'SameValueZero',\n    selector: (t) => t[0],\n    depthIdentifier,\n  }).map(arrayToMapMapper, arrayToMapUnmapper);\n}\nfunction dictOf(ka, va, maxKeys, size, depthIdentifier, withNullPrototype) {\n  return dictionary(ka, va, {\n    maxKeys,\n    noNullPrototype: !withNullPrototype,\n    size,\n    depthIdentifier,\n  });\n}\nfunction setOf(va, maxKeys, size, depthIdentifier) {\n  return uniqueArray(va, {\n    maxLength: maxKeys,\n    size,\n    comparator: 'SameValueZero',\n    depthIdentifier,\n  }).map(arrayToSetMapper, arrayToSetUnmapper);\n}\nfunction typedArray(constraints) {\n  return oneof(\n    int8Array(constraints),\n    uint8Array(constraints),\n    uint8ClampedArray(constraints),\n    int16Array(constraints),\n    uint16Array(constraints),\n    int32Array(constraints),\n    uint32Array(constraints),\n    float32Array(constraints),\n    float64Array(constraints),\n  );\n}\nfunction anyArbitraryBuilder(constraints) {\n  const arbitrariesForBase = constraints.values;\n  const depthSize = constraints.depthSize;\n  const depthIdentifier = createDepthIdentifier();\n  const maxDepth = constraints.maxDepth;\n  const maxKeys = constraints.maxKeys;\n  const size = constraints.size;\n  const baseArb = oneof(\n    ...arbitrariesForBase,\n    ...(constraints.withBigInt ? [bigInt()] : []),\n    ...(constraints.withDate ? [date()] : []),\n  );\n  return letrec((tie) => ({\n    anything: oneof(\n      { maxDepth, depthSize, depthIdentifier },\n      baseArb,\n      tie('array'),\n      tie('object'),\n      ...(constraints.withMap ? [tie('map')] : []),\n      ...(constraints.withSet ? [tie('set')] : []),\n      ...(constraints.withObjectString\n        ? [tie('anything').map((o) => stringify(o))]\n        : []),\n      ...(constraints.withTypedArray\n        ? [typedArray({ maxLength: maxKeys, size })]\n        : []),\n      ...(constraints.withSparseArray\n        ? [\n            sparseArray(tie('anything'), {\n              maxNumElements: maxKeys,\n              size,\n              depthIdentifier,\n            }),\n          ]\n        : []),\n    ),\n    keys: constraints.withObjectString\n      ? oneof(\n          { arbitrary: constraints.key, weight: 10 },\n          { arbitrary: tie('anything').map((o) => stringify(o)), weight: 1 },\n        )\n      : constraints.key,\n    array: array(tie('anything'), {\n      maxLength: maxKeys,\n      size,\n      depthIdentifier,\n    }),\n    set: setOf(tie('anything'), maxKeys, size, depthIdentifier),\n    map: oneof(\n      mapOf(tie('keys'), tie('anything'), maxKeys, size, depthIdentifier),\n      mapOf(tie('anything'), tie('anything'), maxKeys, size, depthIdentifier),\n    ),\n    object: dictOf(\n      tie('keys'),\n      tie('anything'),\n      maxKeys,\n      size,\n      depthIdentifier,\n      constraints.withNullPrototype,\n    ),\n  })).anything;\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/string.js\nvar safeObjectAssign9 = Object.assign;\nfunction string(constraints = {}) {\n  const charArbitrary = char();\n  const experimentalCustomSlices = createSlicesForString(\n    charArbitrary,\n    codePointsToStringUnmapper,\n  );\n  const enrichedConstraints = safeObjectAssign9(\n    safeObjectAssign9({}, constraints),\n    {\n      experimentalCustomSlices,\n    },\n  );\n  return array(charArbitrary, enrichedConstraints).map(\n    codePointsToStringMapper,\n    codePointsToStringUnmapper,\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/UnboxedToBoxed.js\nfunction unboxedToBoxedMapper(value) {\n  switch (typeof value) {\n    case 'boolean':\n      return new SBoolean(value);\n    case 'number':\n      return new SNumber(value);\n    case 'string':\n      return new SString(value);\n    default:\n      return value;\n  }\n}\nfunction unboxedToBoxedUnmapper(value) {\n  if (\n    typeof value !== 'object' ||\n    value === null ||\n    !('constructor' in value)\n  ) {\n    return value;\n  }\n  return value.constructor === SBoolean ||\n    value.constructor === SNumber ||\n    value.constructor === SString\n    ? value.valueOf()\n    : value;\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/builders/BoxedArbitraryBuilder.js\nfunction boxedArbitraryBuilder(arb) {\n  return arb.map(unboxedToBoxedMapper, unboxedToBoxedUnmapper);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/QualifiedObjectConstraints.js\nfunction defaultValues(constraints) {\n  return [\n    boolean(),\n    maxSafeInteger(),\n    double(),\n    string(constraints),\n    oneof(string(constraints), constant(null), constant(void 0)),\n  ];\n}\nfunction boxArbitraries(arbs) {\n  return arbs.map((arb) => boxedArbitraryBuilder(arb));\n}\nfunction boxArbitrariesIfNeeded(arbs, boxEnabled) {\n  return boxEnabled ? boxArbitraries(arbs).concat(arbs) : arbs;\n}\nfunction toQualifiedObjectConstraints(settings = {}) {\n  function orDefault(optionalValue, defaultValue) {\n    return optionalValue !== void 0 ? optionalValue : defaultValue;\n  }\n  const valueConstraints = { size: settings.size };\n  return {\n    key: orDefault(settings.key, string(valueConstraints)),\n    values: boxArbitrariesIfNeeded(\n      orDefault(settings.values, defaultValues(valueConstraints)),\n      orDefault(settings.withBoxedValues, false),\n    ),\n    depthSize: settings.depthSize,\n    maxDepth: settings.maxDepth,\n    maxKeys: settings.maxKeys,\n    size: settings.size,\n    withSet: orDefault(settings.withSet, false),\n    withMap: orDefault(settings.withMap, false),\n    withObjectString: orDefault(settings.withObjectString, false),\n    withNullPrototype: orDefault(settings.withNullPrototype, false),\n    withBigInt: orDefault(settings.withBigInt, false),\n    withDate: orDefault(settings.withDate, false),\n    withTypedArray: orDefault(settings.withTypedArray, false),\n    withSparseArray: orDefault(settings.withSparseArray, false),\n  };\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/object.js\nfunction objectInternal(constraints) {\n  return dictionary(constraints.key, anyArbitraryBuilder(constraints), {\n    maxKeys: constraints.maxKeys,\n    noNullPrototype: !constraints.withNullPrototype,\n    size: constraints.size,\n  });\n}\nfunction object(constraints) {\n  return objectInternal(toQualifiedObjectConstraints(constraints));\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/JsonConstraintsBuilder.js\nfunction jsonConstraintsBuilder(stringArbitrary, constraints) {\n  const { depthSize, maxDepth } = constraints;\n  const key = stringArbitrary;\n  const values = [\n    boolean(),\n    double({ noDefaultInfinity: true, noNaN: true }),\n    stringArbitrary,\n    constant(null),\n  ];\n  return { key, values, depthSize, maxDepth };\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/anything.js\nfunction anything(constraints) {\n  return anyArbitraryBuilder(toQualifiedObjectConstraints(constraints));\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/jsonValue.js\nfunction jsonValue(constraints = {}) {\n  return anything(jsonConstraintsBuilder(string(), constraints));\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/json.js\nfunction json(constraints = {}) {\n  const arb = jsonValue(constraints);\n  return arb.map(JSON.stringify);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/unicodeString.js\nvar safeObjectAssign10 = Object.assign;\nfunction unicodeString(constraints = {}) {\n  const charArbitrary = unicode();\n  const experimentalCustomSlices = createSlicesForString(\n    charArbitrary,\n    codePointsToStringUnmapper,\n  );\n  const enrichedConstraints = safeObjectAssign10(\n    safeObjectAssign10({}, constraints),\n    {\n      experimentalCustomSlices,\n    },\n  );\n  return array(charArbitrary, enrichedConstraints).map(\n    codePointsToStringMapper,\n    codePointsToStringUnmapper,\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/unicodeJsonValue.js\nfunction unicodeJsonValue(constraints = {}) {\n  return anything(jsonConstraintsBuilder(unicodeString(), constraints));\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/unicodeJson.js\nfunction unicodeJson(constraints = {}) {\n  const arb = unicodeJsonValue(constraints);\n  return arb.map(JSON.stringify);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/EnumerableKeysExtractor.js\nvar safeObjectKeys4 = Object.keys;\nvar safeObjectGetOwnPropertySymbols3 = Object.getOwnPropertySymbols;\nvar safeObjectGetOwnPropertyDescriptor3 = Object.getOwnPropertyDescriptor;\nfunction extractEnumerableKeys(instance) {\n  const keys = safeObjectKeys4(instance);\n  const symbols = safeObjectGetOwnPropertySymbols3(instance);\n  for (let index = 0; index !== symbols.length; ++index) {\n    const symbol = symbols[index];\n    const descriptor = safeObjectGetOwnPropertyDescriptor3(instance, symbol);\n    if (descriptor && descriptor.enumerable) {\n      keys.push(symbol);\n    }\n  }\n  return keys;\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/ValuesAndSeparateKeysToObject.js\nvar safeObjectCreate3 = Object.create;\nvar safeObjectDefineProperty4 = Object.defineProperty;\nvar safeObjectGetOwnPropertyDescriptor4 = Object.getOwnPropertyDescriptor;\nvar safeObjectGetOwnPropertyNames2 = Object.getOwnPropertyNames;\nvar safeObjectGetOwnPropertySymbols4 = Object.getOwnPropertySymbols;\nfunction buildValuesAndSeparateKeysToObjectMapper(keys, noKeyValue2) {\n  return function valuesAndSeparateKeysToObjectMapper(definition) {\n    const obj = definition[1] ? safeObjectCreate3(null) : {};\n    for (let idx = 0; idx !== keys.length; ++idx) {\n      const valueWrapper = definition[0][idx];\n      if (valueWrapper !== noKeyValue2) {\n        safeObjectDefineProperty4(obj, keys[idx], {\n          value: valueWrapper,\n          configurable: true,\n          enumerable: true,\n          writable: true,\n        });\n      }\n    }\n    return obj;\n  };\n}\nfunction buildValuesAndSeparateKeysToObjectUnmapper(keys, noKeyValue2) {\n  return function valuesAndSeparateKeysToObjectUnmapper(value) {\n    if (typeof value !== 'object' || value === null) {\n      throw new Error(\n        'Incompatible instance received: should be a non-null object',\n      );\n    }\n    const hasNullPrototype = Object.getPrototypeOf(value) === null;\n    const hasObjectPrototype =\n      'constructor' in value && value.constructor === Object;\n    if (!hasNullPrototype && !hasObjectPrototype) {\n      throw new Error(\n        'Incompatible instance received: should be of exact type Object',\n      );\n    }\n    let extractedPropertiesCount = 0;\n    const extractedValues = [];\n    for (let idx = 0; idx !== keys.length; ++idx) {\n      const descriptor = safeObjectGetOwnPropertyDescriptor4(value, keys[idx]);\n      if (descriptor !== void 0) {\n        if (\n          !descriptor.configurable ||\n          !descriptor.enumerable ||\n          !descriptor.writable\n        ) {\n          throw new Error(\n            'Incompatible instance received: should contain only c/e/w properties',\n          );\n        }\n        if (descriptor.get !== void 0 || descriptor.set !== void 0) {\n          throw new Error(\n            'Incompatible instance received: should contain only no get/set properties',\n          );\n        }\n        ++extractedPropertiesCount;\n        safePush(extractedValues, descriptor.value);\n      } else {\n        safePush(extractedValues, noKeyValue2);\n      }\n    }\n    const namePropertiesCount = safeObjectGetOwnPropertyNames2(value).length;\n    const symbolPropertiesCount =\n      safeObjectGetOwnPropertySymbols4(value).length;\n    if (\n      extractedPropertiesCount !==\n      namePropertiesCount + symbolPropertiesCount\n    ) {\n      throw new Error(\n        'Incompatible instance received: should not contain extra properties',\n      );\n    }\n    return [extractedValues, hasNullPrototype];\n  };\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/builders/PartialRecordArbitraryBuilder.js\nvar noKeyValue = Symbol('no-key');\nfunction buildPartialRecordArbitrary(\n  recordModel,\n  requiredKeys,\n  noNullPrototype,\n) {\n  const keys = extractEnumerableKeys(recordModel);\n  const arbs = [];\n  for (let index = 0; index !== keys.length; ++index) {\n    const k = keys[index];\n    const requiredArbitrary = recordModel[k];\n    if (requiredKeys === void 0 || safeIndexOf(requiredKeys, k) !== -1) {\n      safePush(arbs, requiredArbitrary);\n    } else {\n      safePush(arbs, option(requiredArbitrary, { nil: noKeyValue }));\n    }\n  }\n  return tuple(\n    tuple(...arbs),\n    noNullPrototype ? constant(false) : boolean(),\n  ).map(\n    buildValuesAndSeparateKeysToObjectMapper(keys, noKeyValue),\n    buildValuesAndSeparateKeysToObjectUnmapper(keys, noKeyValue),\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/record.js\nfunction record(recordModel, constraints) {\n  const noNullPrototype =\n    constraints === void 0 ||\n    constraints.noNullPrototype === void 0 ||\n    constraints.noNullPrototype;\n  if (constraints == null) {\n    return buildPartialRecordArbitrary(recordModel, void 0, noNullPrototype);\n  }\n  if ('withDeletedKeys' in constraints && 'requiredKeys' in constraints) {\n    throw new Error(\n      `requiredKeys and withDeletedKeys cannot be used together in fc.record`,\n    );\n  }\n  const requireDeletedKeys =\n    ('requiredKeys' in constraints && constraints.requiredKeys !== void 0) ||\n    ('withDeletedKeys' in constraints && !!constraints.withDeletedKeys);\n  if (!requireDeletedKeys) {\n    return buildPartialRecordArbitrary(recordModel, void 0, noNullPrototype);\n  }\n  const requiredKeys =\n    ('requiredKeys' in constraints ? constraints.requiredKeys : void 0) || [];\n  for (let idx = 0; idx !== requiredKeys.length; ++idx) {\n    const descriptor = Object.getOwnPropertyDescriptor(\n      recordModel,\n      requiredKeys[idx],\n    );\n    if (descriptor === void 0) {\n      throw new Error(\n        `requiredKeys cannot reference keys that have not been defined in recordModel`,\n      );\n    }\n    if (!descriptor.enumerable) {\n      throw new Error(\n        `requiredKeys cannot reference keys that have are enumerable in recordModel`,\n      );\n    }\n  }\n  return buildPartialRecordArbitrary(\n    recordModel,\n    requiredKeys,\n    noNullPrototype,\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/StreamArbitrary.js\nvar safeObjectDefineProperties2 = Object.defineProperties;\nfunction prettyPrint(seenValuesStrings) {\n  return `Stream(${safeJoin(seenValuesStrings, ',')}\\u2026)`;\n}\nvar StreamArbitrary = class extends Arbitrary {\n  constructor(arb) {\n    super();\n    this.arb = arb;\n  }\n  generate(mrng, biasFactor) {\n    const appliedBiasFactor =\n      biasFactor !== void 0 && mrng.nextInt(1, biasFactor) === 1\n        ? biasFactor\n        : void 0;\n    const enrichedProducer = () => {\n      const seenValues = [];\n      const g = function* (arb, clonedMrng) {\n        while (true) {\n          const value = arb.generate(clonedMrng, appliedBiasFactor).value;\n          safePush(seenValues, value);\n          yield value;\n        }\n      };\n      const s = new Stream(g(this.arb, mrng.clone()));\n      return safeObjectDefineProperties2(s, {\n        toString: { value: () => prettyPrint(seenValues.map(stringify)) },\n        [toStringMethod]: {\n          value: () => prettyPrint(seenValues.map(stringify)),\n        },\n        [asyncToStringMethod]: {\n          value: async () =>\n            prettyPrint(await Promise.all(seenValues.map(asyncStringify))),\n        },\n        [cloneMethod]: { value: enrichedProducer, enumerable: true },\n      });\n    };\n    return new Value(enrichedProducer(), void 0);\n  }\n  canShrinkWithoutContext(value) {\n    return false;\n  }\n  shrink(_value, _context) {\n    return Stream.nil();\n  }\n};\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/infiniteStream.js\nfunction infiniteStream(arb) {\n  return new StreamArbitrary(arb);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/asciiString.js\nvar safeObjectAssign11 = Object.assign;\nfunction asciiString(constraints = {}) {\n  const charArbitrary = ascii();\n  const experimentalCustomSlices = createSlicesForString(\n    charArbitrary,\n    codePointsToStringUnmapper,\n  );\n  const enrichedConstraints = safeObjectAssign11(\n    safeObjectAssign11({}, constraints),\n    {\n      experimentalCustomSlices,\n    },\n  );\n  return array(charArbitrary, enrichedConstraints).map(\n    codePointsToStringMapper,\n    codePointsToStringUnmapper,\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/StringToBase64.js\nfunction stringToBase64Mapper(s) {\n  switch (s.length % 4) {\n    case 0:\n      return s;\n    case 3:\n      return `${s}=`;\n    case 2:\n      return `${s}==`;\n    default:\n      return safeSubstring(s, 1);\n  }\n}\nfunction stringToBase64Unmapper(value) {\n  if (typeof value !== 'string' || value.length % 4 !== 0) {\n    throw new Error('Invalid string received');\n  }\n  const lastTrailingIndex = value.indexOf('=');\n  if (lastTrailingIndex === -1) {\n    return value;\n  }\n  const numTrailings = value.length - lastTrailingIndex;\n  if (numTrailings > 2) {\n    throw new Error('Cannot unmap the passed value');\n  }\n  return safeSubstring(value, 0, lastTrailingIndex);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/base64String.js\nfunction base64String(constraints = {}) {\n  const {\n    minLength: unscaledMinLength = 0,\n    maxLength: unscaledMaxLength = MaxLengthUpperBound,\n    size,\n  } = constraints;\n  const minLength = unscaledMinLength + 3 - ((unscaledMinLength + 3) % 4);\n  const maxLength = unscaledMaxLength - (unscaledMaxLength % 4);\n  const requestedSize =\n    constraints.maxLength === void 0 && size === void 0 ? '=' : size;\n  if (minLength > maxLength)\n    throw new Error(\n      'Minimal length should be inferior or equal to maximal length',\n    );\n  if (minLength % 4 !== 0)\n    throw new Error('Minimal length of base64 strings must be a multiple of 4');\n  if (maxLength % 4 !== 0)\n    throw new Error('Maximal length of base64 strings must be a multiple of 4');\n  const charArbitrary = base64();\n  const experimentalCustomSlices = createSlicesForString(\n    charArbitrary,\n    codePointsToStringUnmapper,\n  );\n  const enrichedConstraints = {\n    minLength,\n    maxLength,\n    size: requestedSize,\n    experimentalCustomSlices,\n  };\n  return array(charArbitrary, enrichedConstraints)\n    .map(codePointsToStringMapper, codePointsToStringUnmapper)\n    .map(stringToBase64Mapper, stringToBase64Unmapper);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/fullUnicodeString.js\nvar safeObjectAssign12 = Object.assign;\nfunction fullUnicodeString(constraints = {}) {\n  const charArbitrary = fullUnicode();\n  const experimentalCustomSlices = createSlicesForString(\n    charArbitrary,\n    codePointsToStringUnmapper,\n  );\n  const enrichedConstraints = safeObjectAssign12(\n    safeObjectAssign12({}, constraints),\n    {\n      experimentalCustomSlices,\n    },\n  );\n  return array(charArbitrary, enrichedConstraints).map(\n    codePointsToStringMapper,\n    codePointsToStringUnmapper,\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/CharsToString.js\nfunction charsToStringMapper(tab) {\n  return safeJoin(tab, '');\n}\nfunction charsToStringUnmapper(value) {\n  if (typeof value !== 'string') {\n    throw new Error('Cannot unmap the passed value');\n  }\n  return safeSplit(value, '');\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/string16bits.js\nvar safeObjectAssign13 = Object.assign;\nfunction string16bits(constraints = {}) {\n  const charArbitrary = char16bits();\n  const experimentalCustomSlices = createSlicesForString(\n    charArbitrary,\n    charsToStringUnmapper,\n  );\n  const enrichedConstraints = safeObjectAssign13(\n    safeObjectAssign13({}, constraints),\n    {\n      experimentalCustomSlices,\n    },\n  );\n  return array(charArbitrary, enrichedConstraints).map(\n    charsToStringMapper,\n    charsToStringUnmapper,\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/IsSubarrayOf.js\nfunction isSubarrayOf(source, small) {\n  const countMap = /* @__PURE__ */ new Map();\n  let countMinusZero = 0;\n  for (const sourceEntry of source) {\n    if (Object.is(sourceEntry, -0)) {\n      ++countMinusZero;\n    } else {\n      const oldCount = countMap.get(sourceEntry) || 0;\n      countMap.set(sourceEntry, oldCount + 1);\n    }\n  }\n  for (let index = 0; index !== small.length; ++index) {\n    if (!(index in small)) {\n      return false;\n    }\n    const smallEntry = small[index];\n    if (Object.is(smallEntry, -0)) {\n      if (countMinusZero === 0) return false;\n      --countMinusZero;\n    } else {\n      const oldCount = countMap.get(smallEntry) || 0;\n      if (oldCount === 0) return false;\n      countMap.set(smallEntry, oldCount - 1);\n    }\n  }\n  return true;\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/SubarrayArbitrary.js\nvar safeMathFloor6 = Math.floor;\nvar safeMathLog4 = Math.log;\nvar safeArrayIsArray4 = Array.isArray;\nvar SubarrayArbitrary = class extends Arbitrary {\n  constructor(originalArray, isOrdered, minLength, maxLength) {\n    super();\n    this.originalArray = originalArray;\n    this.isOrdered = isOrdered;\n    this.minLength = minLength;\n    this.maxLength = maxLength;\n    if (minLength < 0 || minLength > originalArray.length)\n      throw new Error(\n        'fc.*{s|S}ubarrayOf expects the minimal length to be between 0 and the size of the original array',\n      );\n    if (maxLength < 0 || maxLength > originalArray.length)\n      throw new Error(\n        'fc.*{s|S}ubarrayOf expects the maximal length to be between 0 and the size of the original array',\n      );\n    if (minLength > maxLength)\n      throw new Error(\n        'fc.*{s|S}ubarrayOf expects the minimal length to be inferior or equal to the maximal length',\n      );\n    this.lengthArb = new IntegerArbitrary(minLength, maxLength);\n    this.biasedLengthArb =\n      minLength !== maxLength\n        ? new IntegerArbitrary(\n            minLength,\n            minLength +\n              safeMathFloor6(\n                safeMathLog4(maxLength - minLength) / safeMathLog4(2),\n              ),\n          )\n        : this.lengthArb;\n  }\n  generate(mrng, biasFactor) {\n    const lengthArb =\n      biasFactor !== void 0 && mrng.nextInt(1, biasFactor) === 1\n        ? this.biasedLengthArb\n        : this.lengthArb;\n    const size = lengthArb.generate(mrng, void 0);\n    const sizeValue = size.value;\n    const remainingElements = safeMap(this.originalArray, (_v, idx) => idx);\n    const ids = [];\n    for (let index = 0; index !== sizeValue; ++index) {\n      const selectedIdIndex = mrng.nextInt(0, remainingElements.length - 1);\n      safePush(ids, remainingElements[selectedIdIndex]);\n      safeSplice(remainingElements, selectedIdIndex, 1);\n    }\n    if (this.isOrdered) {\n      safeSort(ids, (a, b) => a - b);\n    }\n    return new Value(\n      safeMap(ids, (i) => this.originalArray[i]),\n      size.context,\n    );\n  }\n  canShrinkWithoutContext(value) {\n    if (!safeArrayIsArray4(value)) {\n      return false;\n    }\n    if (!this.lengthArb.canShrinkWithoutContext(value.length)) {\n      return false;\n    }\n    return isSubarrayOf(this.originalArray, value);\n  }\n  shrink(value, context2) {\n    if (value.length === 0) {\n      return Stream.nil();\n    }\n    return this.lengthArb\n      .shrink(value.length, context2)\n      .map((newSize) => {\n        return new Value(\n          safeSlice(value, value.length - newSize.value),\n          newSize.context,\n        );\n      })\n      .join(\n        value.length > this.minLength\n          ? makeLazy(() =>\n              this.shrink(safeSlice(value, 1), void 0)\n                .filter(\n                  (newValue) => this.minLength <= newValue.value.length + 1,\n                )\n                .map(\n                  (newValue) =>\n                    new Value([value[0], ...newValue.value], void 0),\n                ),\n            )\n          : Stream.nil(),\n      );\n  }\n};\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/subarray.js\nfunction subarray(originalArray, constraints = {}) {\n  const { minLength = 0, maxLength = originalArray.length } = constraints;\n  return new SubarrayArbitrary(originalArray, true, minLength, maxLength);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/shuffledSubarray.js\nfunction shuffledSubarray(originalArray, constraints = {}) {\n  const { minLength = 0, maxLength = originalArray.length } = constraints;\n  return new SubarrayArbitrary(originalArray, false, minLength, maxLength);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/UintToBase32String.js\nvar encodeSymbolLookupTable = {\n  10: 'A',\n  11: 'B',\n  12: 'C',\n  13: 'D',\n  14: 'E',\n  15: 'F',\n  16: 'G',\n  17: 'H',\n  18: 'J',\n  19: 'K',\n  20: 'M',\n  21: 'N',\n  22: 'P',\n  23: 'Q',\n  24: 'R',\n  25: 'S',\n  26: 'T',\n  27: 'V',\n  28: 'W',\n  29: 'X',\n  30: 'Y',\n  31: 'Z',\n};\nvar decodeSymbolLookupTable = {\n  0: 0,\n  1: 1,\n  2: 2,\n  3: 3,\n  4: 4,\n  5: 5,\n  6: 6,\n  7: 7,\n  8: 8,\n  9: 9,\n  A: 10,\n  B: 11,\n  C: 12,\n  D: 13,\n  E: 14,\n  F: 15,\n  G: 16,\n  H: 17,\n  J: 18,\n  K: 19,\n  M: 20,\n  N: 21,\n  P: 22,\n  Q: 23,\n  R: 24,\n  S: 25,\n  T: 26,\n  V: 27,\n  W: 28,\n  X: 29,\n  Y: 30,\n  Z: 31,\n};\nfunction encodeSymbol(symbol) {\n  return symbol < 10 ? SString(symbol) : encodeSymbolLookupTable[symbol];\n}\nfunction pad(value, paddingLength) {\n  let extraPadding = '';\n  while (value.length + extraPadding.length < paddingLength) {\n    extraPadding += '0';\n  }\n  return extraPadding + value;\n}\nfunction smallUintToBase32StringMapper(num) {\n  let base32Str = '';\n  for (let remaining = num; remaining !== 0; ) {\n    const next = remaining >> 5;\n    const current = remaining - (next << 5);\n    base32Str = encodeSymbol(current) + base32Str;\n    remaining = next;\n  }\n  return base32Str;\n}\nfunction uintToBase32StringMapper(num, paddingLength) {\n  const head = ~~(num / 1073741824);\n  const tail = num & 1073741823;\n  return (\n    pad(smallUintToBase32StringMapper(head), paddingLength - 6) +\n    pad(smallUintToBase32StringMapper(tail), 6)\n  );\n}\nfunction paddedUintToBase32StringMapper(paddingLength) {\n  return function padded(num) {\n    return uintToBase32StringMapper(num, paddingLength);\n  };\n}\nfunction uintToBase32StringUnmapper(value) {\n  if (typeof value !== 'string') {\n    throw new SError('Unsupported type');\n  }\n  let accumulated = 0;\n  let power = 1;\n  for (let index = value.length - 1; index >= 0; --index) {\n    const char2 = value[index];\n    const numericForChar = decodeSymbolLookupTable[char2];\n    if (numericForChar === void 0) {\n      throw new SError('Unsupported type');\n    }\n    accumulated += numericForChar * power;\n    power *= 32;\n  }\n  return accumulated;\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/ulid.js\nvar padded10Mapper = paddedUintToBase32StringMapper(10);\nvar padded8Mapper = paddedUintToBase32StringMapper(8);\nfunction ulidMapper(parts) {\n  return (\n    padded10Mapper(parts[0]) + padded8Mapper(parts[1]) + padded8Mapper(parts[2])\n  );\n}\nfunction ulidUnmapper(value) {\n  if (typeof value !== 'string' || value.length !== 26) {\n    throw new Error('Unsupported type');\n  }\n  return [\n    uintToBase32StringUnmapper(value.slice(0, 10)),\n    uintToBase32StringUnmapper(value.slice(10, 18)),\n    uintToBase32StringUnmapper(value.slice(18)),\n  ];\n}\nfunction ulid() {\n  const timestampPartArbitrary = integer({ min: 0, max: 281474976710655 });\n  const randomnessPartOneArbitrary = integer({ min: 0, max: 1099511627775 });\n  const randomnessPartTwoArbitrary = integer({ min: 0, max: 1099511627775 });\n  return tuple(\n    timestampPartArbitrary,\n    randomnessPartOneArbitrary,\n    randomnessPartTwoArbitrary,\n  ).map(ulidMapper, ulidUnmapper);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/NumberToPaddedEight.js\nfunction numberToPaddedEightMapper(n) {\n  return safePadStart(safeNumberToString(n, 16), 8, '0');\n}\nfunction numberToPaddedEightUnmapper(value) {\n  if (typeof value !== 'string') {\n    throw new Error('Unsupported type');\n  }\n  if (value.length !== 8) {\n    throw new Error('Unsupported value: invalid length');\n  }\n  const n = parseInt(value, 16);\n  if (value !== numberToPaddedEightMapper(n)) {\n    throw new Error('Unsupported value: invalid content');\n  }\n  return n;\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/builders/PaddedNumberArbitraryBuilder.js\nfunction buildPaddedNumberArbitrary(min, max) {\n  return integer({ min, max }).map(\n    numberToPaddedEightMapper,\n    numberToPaddedEightUnmapper,\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/PaddedEightsToUuid.js\nfunction paddedEightsToUuidMapper(t) {\n  return `${t[0]}-${safeSubstring(t[1], 4)}-${safeSubstring(t[1], 0, 4)}-${safeSubstring(t[2], 0, 4)}-${safeSubstring(t[2], 4)}${t[3]}`;\n}\nvar UuidRegex =\n  /^([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/;\nfunction paddedEightsToUuidUnmapper(value) {\n  if (typeof value !== 'string') {\n    throw new Error('Unsupported type');\n  }\n  const m = UuidRegex.exec(value);\n  if (m === null) {\n    throw new Error('Unsupported type');\n  }\n  return [\n    m[1],\n    m[3] + m[2],\n    m[4] + safeSubstring(m[5], 0, 4),\n    safeSubstring(m[5], 4),\n  ];\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/uuid.js\nfunction uuid() {\n  const padded = buildPaddedNumberArbitrary(0, 4294967295);\n  const secondPadded = buildPaddedNumberArbitrary(268435456, 1610612735);\n  const thirdPadded = buildPaddedNumberArbitrary(2147483648, 3221225471);\n  return tuple(padded, secondPadded, thirdPadded, padded).map(\n    paddedEightsToUuidMapper,\n    paddedEightsToUuidUnmapper,\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/uuidV.js\nfunction uuidV(versionNumber) {\n  const padded = buildPaddedNumberArbitrary(0, 4294967295);\n  const offsetSecond = versionNumber * 268435456;\n  const secondPadded = buildPaddedNumberArbitrary(\n    offsetSecond,\n    offsetSecond + 268435455,\n  );\n  const thirdPadded = buildPaddedNumberArbitrary(2147483648, 3221225471);\n  return tuple(padded, secondPadded, thirdPadded, padded).map(\n    paddedEightsToUuidMapper,\n    paddedEightsToUuidUnmapper,\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/webAuthority.js\nfunction hostUserInfo(size) {\n  const others = [\n    '-',\n    '.',\n    '_',\n    '~',\n    '!',\n    '$',\n    '&',\n    \"'\",\n    '(',\n    ')',\n    '*',\n    '+',\n    ',',\n    ';',\n    '=',\n    ':',\n  ];\n  return stringOf(buildAlphaNumericPercentArbitrary(others), { size });\n}\nfunction userHostPortMapper([u, h2, p]) {\n  return (u === null ? '' : `${u}@`) + h2 + (p === null ? '' : `:${p}`);\n}\nfunction userHostPortUnmapper(value) {\n  if (typeof value !== 'string') {\n    throw new Error('Unsupported');\n  }\n  const atPosition = value.indexOf('@');\n  const user = atPosition !== -1 ? value.substring(0, atPosition) : null;\n  const portRegex = /:(\\d+)$/;\n  const m = portRegex.exec(value);\n  const port = m !== null ? Number(m[1]) : null;\n  const host =\n    m !== null\n      ? value.substring(atPosition + 1, value.length - m[1].length - 1)\n      : value.substring(atPosition + 1);\n  return [user, host, port];\n}\nfunction bracketedMapper(s) {\n  return `[${s}]`;\n}\nfunction bracketedUnmapper(value) {\n  if (\n    typeof value !== 'string' ||\n    value[0] !== '[' ||\n    value[value.length - 1] !== ']'\n  ) {\n    throw new Error('Unsupported');\n  }\n  return value.substring(1, value.length - 1);\n}\nfunction webAuthority(constraints) {\n  const c = constraints || {};\n  const size = c.size;\n  const hostnameArbs = [\n    domain({ size }),\n    ...(c.withIPv4 === true ? [ipV4()] : []),\n    ...(c.withIPv6 === true\n      ? [ipV6().map(bracketedMapper, bracketedUnmapper)]\n      : []),\n    ...(c.withIPv4Extended === true ? [ipV4Extended()] : []),\n  ];\n  return tuple(\n    c.withUserInfo === true ? option(hostUserInfo(size)) : constant(null),\n    oneof(...hostnameArbs),\n    c.withPort === true ? option(nat(65535)) : constant(null),\n  ).map(userHostPortMapper, userHostPortUnmapper);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/builders/UriQueryOrFragmentArbitraryBuilder.js\nfunction buildUriQueryOrFragmentArbitrary(size) {\n  const others = [\n    '-',\n    '.',\n    '_',\n    '~',\n    '!',\n    '$',\n    '&',\n    \"'\",\n    '(',\n    ')',\n    '*',\n    '+',\n    ',',\n    ';',\n    '=',\n    ':',\n    '@',\n    '/',\n    '?',\n  ];\n  return stringOf(buildAlphaNumericPercentArbitrary(others), { size });\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/webFragments.js\nfunction webFragments(constraints = {}) {\n  return buildUriQueryOrFragmentArbitrary(constraints.size);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/webSegment.js\nfunction webSegment(constraints = {}) {\n  const others = [\n    '-',\n    '.',\n    '_',\n    '~',\n    '!',\n    '$',\n    '&',\n    \"'\",\n    '(',\n    ')',\n    '*',\n    '+',\n    ',',\n    ';',\n    '=',\n    ':',\n    '@',\n  ];\n  return stringOf(buildAlphaNumericPercentArbitrary(others), {\n    size: constraints.size,\n  });\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/SegmentsToPath.js\nfunction segmentsToPathMapper(segments) {\n  return safeJoin(\n    safeMap(segments, (v) => `/${v}`),\n    '',\n  );\n}\nfunction segmentsToPathUnmapper(value) {\n  if (typeof value !== 'string') {\n    throw new Error('Incompatible value received: type');\n  }\n  if (value.length !== 0 && value[0] !== '/') {\n    throw new Error('Incompatible value received: start');\n  }\n  return safeSplice(safeSplit(value, '/'), 1);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/builders/UriPathArbitraryBuilder.js\nfunction sqrtSize(size) {\n  switch (size) {\n    case 'xsmall':\n      return ['xsmall', 'xsmall'];\n    case 'small':\n      return ['small', 'xsmall'];\n    case 'medium':\n      return ['small', 'small'];\n    case 'large':\n      return ['medium', 'small'];\n    case 'xlarge':\n      return ['medium', 'medium'];\n  }\n}\nfunction buildUriPathArbitrary(resolvedSize) {\n  const [segmentSize, numSegmentSize] = sqrtSize(resolvedSize);\n  return array(webSegment({ size: segmentSize }), { size: numSegmentSize }).map(\n    segmentsToPathMapper,\n    segmentsToPathUnmapper,\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/webPath.js\nfunction webPath(constraints) {\n  const c = constraints || {};\n  const resolvedSize = resolveSize(c.size);\n  return buildUriPathArbitrary(resolvedSize);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/webQueryParameters.js\nfunction webQueryParameters(constraints = {}) {\n  return buildUriQueryOrFragmentArbitrary(constraints.size);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/PartsToUrl.js\nfunction partsToUrlMapper(data) {\n  const [scheme, authority, path] = data;\n  const query = data[3] === null ? '' : `?${data[3]}`;\n  const fragments = data[4] === null ? '' : `#${data[4]}`;\n  return `${scheme}://${authority}${path}${query}${fragments}`;\n}\nvar UrlSplitRegex =\n  /^([[A-Za-z][A-Za-z0-9+.-]*):\\/\\/([^/?#]*)([^?#]*)(\\?[A-Za-z0-9\\-._~!$&'()*+,;=:@/?%]*)?(#[A-Za-z0-9\\-._~!$&'()*+,;=:@/?%]*)?$/;\nfunction partsToUrlUnmapper(value) {\n  if (typeof value !== 'string') {\n    throw new Error('Incompatible value received: type');\n  }\n  const m = UrlSplitRegex.exec(value);\n  if (m === null) {\n    throw new Error('Incompatible value received');\n  }\n  const scheme = m[1];\n  const authority = m[2];\n  const path = m[3];\n  const query = m[4];\n  const fragments = m[5];\n  return [\n    scheme,\n    authority,\n    path,\n    query !== void 0 ? query.substring(1) : null,\n    fragments !== void 0 ? fragments.substring(1) : null,\n  ];\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/webUrl.js\nvar safeObjectAssign14 = Object.assign;\nfunction webUrl(constraints) {\n  const c = constraints || {};\n  const resolvedSize = resolveSize(c.size);\n  const resolvedAuthoritySettingsSize =\n    c.authoritySettings !== void 0 && c.authoritySettings.size !== void 0\n      ? relativeSizeToSize(c.authoritySettings.size, resolvedSize)\n      : resolvedSize;\n  const resolvedAuthoritySettings = safeObjectAssign14(\n    safeObjectAssign14({}, c.authoritySettings),\n    {\n      size: resolvedAuthoritySettingsSize,\n    },\n  );\n  const validSchemes = c.validSchemes || ['http', 'https'];\n  const schemeArb = constantFrom(...validSchemes);\n  const authorityArb = webAuthority(resolvedAuthoritySettings);\n  return tuple(\n    schemeArb,\n    authorityArb,\n    webPath({ size: resolvedSize }),\n    c.withQueryParameters === true\n      ? option(webQueryParameters({ size: resolvedSize }))\n      : constant(null),\n    c.withFragments === true\n      ? option(webFragments({ size: resolvedSize }))\n      : constant(null),\n  ).map(partsToUrlMapper, partsToUrlUnmapper);\n}\n\n// ../../../node_modules/fast-check/lib/esm/check/model/commands/CommandsIterable.js\nvar CommandsIterable = class _CommandsIterable {\n  constructor(commands2, metadataForReplay) {\n    this.commands = commands2;\n    this.metadataForReplay = metadataForReplay;\n  }\n  [Symbol.iterator]() {\n    return this.commands[Symbol.iterator]();\n  }\n  [cloneMethod]() {\n    return new _CommandsIterable(\n      this.commands.map((c) => c.clone()),\n      this.metadataForReplay,\n    );\n  }\n  toString() {\n    const serializedCommands = this.commands\n      .filter((c) => c.hasRan)\n      .map((c) => c.toString())\n      .join(',');\n    const metadata = this.metadataForReplay();\n    return metadata.length !== 0\n      ? `${serializedCommands} /*${metadata}*/`\n      : serializedCommands;\n  }\n};\n\n// ../../../node_modules/fast-check/lib/esm/check/model/commands/CommandWrapper.js\nvar CommandWrapper = class _CommandWrapper {\n  constructor(cmd) {\n    this.cmd = cmd;\n    this.hasRan = false;\n    if (hasToStringMethod(cmd)) {\n      const method = cmd[toStringMethod];\n      this[toStringMethod] = function toStringMethod2() {\n        return method.call(cmd);\n      };\n    }\n    if (hasAsyncToStringMethod(cmd)) {\n      const method = cmd[asyncToStringMethod];\n      this[asyncToStringMethod] = function asyncToStringMethod2() {\n        return method.call(cmd);\n      };\n    }\n  }\n  check(m) {\n    return this.cmd.check(m);\n  }\n  run(m, r) {\n    this.hasRan = true;\n    return this.cmd.run(m, r);\n  }\n  clone() {\n    if (hasCloneMethod(this.cmd))\n      return new _CommandWrapper(this.cmd[cloneMethod]());\n    return new _CommandWrapper(this.cmd);\n  }\n  toString() {\n    return this.cmd.toString();\n  }\n};\n\n// ../../../node_modules/fast-check/lib/esm/check/model/ReplayPath.js\nvar ReplayPath = class {\n  static parse(replayPathStr) {\n    const [serializedCount, serializedChanges] = replayPathStr.split(':');\n    const counts = this.parseCounts(serializedCount);\n    const changes = this.parseChanges(serializedChanges);\n    return this.parseOccurences(counts, changes);\n  }\n  static stringify(replayPath) {\n    const occurences = this.countOccurences(replayPath);\n    const serializedCount = this.stringifyCounts(occurences);\n    const serializedChanges = this.stringifyChanges(occurences);\n    return `${serializedCount}:${serializedChanges}`;\n  }\n  static intToB64(n) {\n    if (n < 26) return String.fromCharCode(n + 65);\n    if (n < 52) return String.fromCharCode(n + 97 - 26);\n    if (n < 62) return String.fromCharCode(n + 48 - 52);\n    return String.fromCharCode(n === 62 ? 43 : 47);\n  }\n  static b64ToInt(c) {\n    if (c >= 'a') return c.charCodeAt(0) - 97 + 26;\n    if (c >= 'A') return c.charCodeAt(0) - 65;\n    if (c >= '0') return c.charCodeAt(0) - 48 + 52;\n    return c === '+' ? 62 : 63;\n  }\n  static countOccurences(replayPath) {\n    return replayPath.reduce((counts, cur) => {\n      if (\n        counts.length === 0 ||\n        counts[counts.length - 1].count === 64 ||\n        counts[counts.length - 1].value !== cur\n      )\n        counts.push({ value: cur, count: 1 });\n      else counts[counts.length - 1].count += 1;\n      return counts;\n    }, []);\n  }\n  static parseOccurences(counts, changes) {\n    const replayPath = [];\n    for (let idx = 0; idx !== counts.length; ++idx) {\n      const count = counts[idx];\n      const value = changes[idx];\n      for (let num = 0; num !== count; ++num) replayPath.push(value);\n    }\n    return replayPath;\n  }\n  static stringifyChanges(occurences) {\n    let serializedChanges = '';\n    for (let idx = 0; idx < occurences.length; idx += 6) {\n      const changesInt = occurences\n        .slice(idx, idx + 6)\n        .reduceRight((prev, cur) => prev * 2 + (cur.value ? 1 : 0), 0);\n      serializedChanges += this.intToB64(changesInt);\n    }\n    return serializedChanges;\n  }\n  static parseChanges(serializedChanges) {\n    const changesInt = serializedChanges.split('').map((c) => this.b64ToInt(c));\n    const changes = [];\n    for (let idx = 0; idx !== changesInt.length; ++idx) {\n      let current = changesInt[idx];\n      for (let n = 0; n !== 6; ++n, current >>= 1) {\n        changes.push(current % 2 === 1);\n      }\n    }\n    return changes;\n  }\n  static stringifyCounts(occurences) {\n    return occurences.map(({ count }) => this.intToB64(count - 1)).join('');\n  }\n  static parseCounts(serializedCount) {\n    return serializedCount.split('').map((c) => this.b64ToInt(c) + 1);\n  }\n};\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/CommandsArbitrary.js\nvar CommandsArbitrary = class extends Arbitrary {\n  constructor(\n    commandArbs,\n    maxGeneratedCommands,\n    maxCommands,\n    sourceReplayPath,\n    disableReplayLog,\n  ) {\n    super();\n    this.sourceReplayPath = sourceReplayPath;\n    this.disableReplayLog = disableReplayLog;\n    this.oneCommandArb = oneof(...commandArbs).map(\n      (c) => new CommandWrapper(c),\n    );\n    this.lengthArb = restrictedIntegerArbitraryBuilder(\n      0,\n      maxGeneratedCommands,\n      maxCommands,\n    );\n    this.replayPath = [];\n    this.replayPathPosition = 0;\n  }\n  metadataForReplay() {\n    return this.disableReplayLog\n      ? ''\n      : `replayPath=${JSON.stringify(ReplayPath.stringify(this.replayPath))}`;\n  }\n  buildValueFor(items, shrunkOnce) {\n    const commands2 = items.map((item) => item.value_);\n    const context2 = { shrunkOnce, items };\n    return new Value(\n      new CommandsIterable(commands2, () => this.metadataForReplay()),\n      context2,\n    );\n  }\n  generate(mrng) {\n    const size = this.lengthArb.generate(mrng, void 0);\n    const sizeValue = size.value;\n    const items = Array(sizeValue);\n    for (let idx = 0; idx !== sizeValue; ++idx) {\n      const item = this.oneCommandArb.generate(mrng, void 0);\n      items[idx] = item;\n    }\n    this.replayPathPosition = 0;\n    return this.buildValueFor(items, false);\n  }\n  canShrinkWithoutContext(value) {\n    return false;\n  }\n  filterOnExecution(itemsRaw) {\n    const items = [];\n    for (const c of itemsRaw) {\n      if (c.value_.hasRan) {\n        this.replayPath.push(true);\n        items.push(c);\n      } else this.replayPath.push(false);\n    }\n    return items;\n  }\n  filterOnReplay(itemsRaw) {\n    return itemsRaw.filter((c, idx) => {\n      const state = this.replayPath[this.replayPathPosition + idx];\n      if (state === void 0) throw new Error(`Too short replayPath`);\n      if (!state && c.value_.hasRan)\n        throw new Error(`Mismatch between replayPath and real execution`);\n      return state;\n    });\n  }\n  filterForShrinkImpl(itemsRaw) {\n    if (this.replayPathPosition === 0) {\n      this.replayPath =\n        this.sourceReplayPath !== null\n          ? ReplayPath.parse(this.sourceReplayPath)\n          : [];\n    }\n    const items =\n      this.replayPathPosition < this.replayPath.length\n        ? this.filterOnReplay(itemsRaw)\n        : this.filterOnExecution(itemsRaw);\n    this.replayPathPosition += itemsRaw.length;\n    return items;\n  }\n  shrink(_value, context2) {\n    if (context2 === void 0) {\n      return Stream.nil();\n    }\n    const safeContext = context2;\n    const shrunkOnce = safeContext.shrunkOnce;\n    const itemsRaw = safeContext.items;\n    const items = this.filterForShrinkImpl(itemsRaw);\n    if (items.length === 0) {\n      return Stream.nil();\n    }\n    const rootShrink = shrunkOnce\n      ? Stream.nil()\n      : new Stream([[]][Symbol.iterator]());\n    const nextShrinks = [];\n    for (let numToKeep = 0; numToKeep !== items.length; ++numToKeep) {\n      nextShrinks.push(\n        makeLazy(() => {\n          const fixedStart = items.slice(0, numToKeep);\n          return this.lengthArb\n            .shrink(items.length - 1 - numToKeep, void 0)\n            .map((l) =>\n              fixedStart.concat(items.slice(items.length - (l.value + 1))),\n            );\n        }),\n      );\n    }\n    for (let itemAt = 0; itemAt !== items.length; ++itemAt) {\n      nextShrinks.push(\n        makeLazy(() =>\n          this.oneCommandArb\n            .shrink(items[itemAt].value_, items[itemAt].context)\n            .map((v) =>\n              items.slice(0, itemAt).concat([v], items.slice(itemAt + 1)),\n            ),\n        ),\n      );\n    }\n    return rootShrink.join(...nextShrinks).map((shrinkables) => {\n      return this.buildValueFor(\n        shrinkables.map((c) => new Value(c.value_.clone(), c.context)),\n        true,\n      );\n    });\n  }\n};\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/commands.js\nfunction commands(commandArbs, constraints = {}) {\n  const {\n    size,\n    maxCommands = MaxLengthUpperBound,\n    disableReplayLog = false,\n    replayPath = null,\n  } = constraints;\n  const specifiedMaxCommands = constraints.maxCommands !== void 0;\n  const maxGeneratedCommands = maxGeneratedLengthFromSizeForArbitrary(\n    size,\n    0,\n    maxCommands,\n    specifiedMaxCommands,\n  );\n  return new CommandsArbitrary(\n    commandArbs,\n    maxGeneratedCommands,\n    maxCommands,\n    replayPath,\n    disableReplayLog,\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/check/model/commands/ScheduledCommand.js\nvar ScheduledCommand = class {\n  constructor(s, cmd) {\n    this.s = s;\n    this.cmd = cmd;\n  }\n  async check(m) {\n    let error = null;\n    let checkPassed = false;\n    const status = await this.s.scheduleSequence([\n      {\n        label: `check@${this.cmd.toString()}`,\n        builder: async () => {\n          try {\n            checkPassed = await Promise.resolve(this.cmd.check(m));\n          } catch (err) {\n            error = err;\n            throw err;\n          }\n        },\n      },\n    ]).task;\n    if (status.faulty) {\n      throw error;\n    }\n    return checkPassed;\n  }\n  async run(m, r) {\n    let error = null;\n    const status = await this.s.scheduleSequence([\n      {\n        label: `run@${this.cmd.toString()}`,\n        builder: async () => {\n          try {\n            await this.cmd.run(m, r);\n          } catch (err) {\n            error = err;\n            throw err;\n          }\n        },\n      },\n    ]).task;\n    if (status.faulty) {\n      throw error;\n    }\n  }\n};\nvar scheduleCommands = function* (s, cmds) {\n  for (const cmd of cmds) {\n    yield new ScheduledCommand(s, cmd);\n  }\n};\n\n// ../../../node_modules/fast-check/lib/esm/check/model/ModelRunner.js\nvar genericModelRun = (s, cmds, initialValue, runCmd, then) => {\n  return s.then((o) => {\n    const { model, real } = o;\n    let state = initialValue;\n    for (const c of cmds) {\n      state = then(state, () => {\n        return runCmd(c, model, real);\n      });\n    }\n    return state;\n  });\n};\nvar internalModelRun = (s, cmds) => {\n  const then = (_p, c) => c();\n  const setupProducer = {\n    then: (fun) => {\n      fun(s());\n      return void 0;\n    },\n  };\n  const runSync = (cmd, m, r) => {\n    if (cmd.check(m)) cmd.run(m, r);\n    return void 0;\n  };\n  return genericModelRun(setupProducer, cmds, void 0, runSync, then);\n};\nvar isAsyncSetup = (s) => {\n  return typeof s.then === 'function';\n};\nvar internalAsyncModelRun = async (\n  s,\n  cmds,\n  defaultPromise = Promise.resolve(),\n) => {\n  const then = (p, c) => p.then(c);\n  const setupProducer = {\n    then: (fun) => {\n      const out = s();\n      if (isAsyncSetup(out)) return out.then(fun);\n      else return fun(out);\n    },\n  };\n  const runAsync = async (cmd, m, r) => {\n    if (await cmd.check(m)) await cmd.run(m, r);\n  };\n  return await genericModelRun(\n    setupProducer,\n    cmds,\n    defaultPromise,\n    runAsync,\n    then,\n  );\n};\nfunction modelRun(s, cmds) {\n  internalModelRun(s, cmds);\n}\nasync function asyncModelRun(s, cmds) {\n  await internalAsyncModelRun(s, cmds);\n}\nasync function scheduledModelRun(scheduler2, s, cmds) {\n  const scheduledCommands = scheduleCommands(scheduler2, cmds);\n  const out = internalAsyncModelRun(\n    s,\n    scheduledCommands,\n    scheduler2.schedule(Promise.resolve(), 'startModel'),\n  );\n  await scheduler2.waitFor(out);\n  await scheduler2.waitAll();\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/implementations/SchedulerImplem.js\nvar defaultSchedulerAct = (f) => f();\nvar SchedulerImplem = class _SchedulerImplem {\n  constructor(act, taskSelector) {\n    this.act = act;\n    this.taskSelector = taskSelector;\n    this.lastTaskId = 0;\n    this.sourceTaskSelector = taskSelector.clone();\n    this.scheduledTasks = [];\n    this.triggeredTasks = [];\n    this.scheduledWatchers = [];\n  }\n  static buildLog(reportItem) {\n    return `[task\\${${reportItem.taskId}}] ${reportItem.label.length !== 0 ? `${reportItem.schedulingType}::${reportItem.label}` : reportItem.schedulingType} ${reportItem.status}${reportItem.outputValue !== void 0 ? ` with value ${escapeForTemplateString(reportItem.outputValue)}` : ''}`;\n  }\n  log(schedulingType, taskId, label, metadata, status, data) {\n    this.triggeredTasks.push({\n      status,\n      schedulingType,\n      taskId,\n      label,\n      metadata,\n      outputValue: data !== void 0 ? stringify(data) : void 0,\n    });\n  }\n  scheduleInternal(\n    schedulingType,\n    label,\n    task,\n    metadata,\n    customAct,\n    thenTaskToBeAwaited,\n  ) {\n    let trigger = null;\n    const taskId = ++this.lastTaskId;\n    const scheduledPromise = new Promise((resolve, reject) => {\n      trigger = () => {\n        (thenTaskToBeAwaited\n          ? task.then(() => thenTaskToBeAwaited())\n          : task\n        ).then(\n          (data) => {\n            this.log(schedulingType, taskId, label, metadata, 'resolved', data);\n            return resolve(data);\n          },\n          (err) => {\n            this.log(schedulingType, taskId, label, metadata, 'rejected', err);\n            return reject(err);\n          },\n        );\n      };\n    });\n    this.scheduledTasks.push({\n      original: task,\n      scheduled: scheduledPromise,\n      trigger,\n      schedulingType,\n      taskId,\n      label,\n      metadata,\n      customAct,\n    });\n    if (this.scheduledWatchers.length !== 0) {\n      this.scheduledWatchers[0]();\n    }\n    return scheduledPromise;\n  }\n  schedule(task, label, metadata, customAct) {\n    return this.scheduleInternal(\n      'promise',\n      label || '',\n      task,\n      metadata,\n      customAct || defaultSchedulerAct,\n    );\n  }\n  scheduleFunction(asyncFunction, customAct) {\n    return (...args) =>\n      this.scheduleInternal(\n        'function',\n        `${asyncFunction.name}(${args.map(stringify).join(',')})`,\n        asyncFunction(...args),\n        void 0,\n        customAct || defaultSchedulerAct,\n      );\n  }\n  scheduleSequence(sequenceBuilders, customAct) {\n    const status = { done: false, faulty: false };\n    const dummyResolvedPromise = { then: (f) => f() };\n    let resolveSequenceTask = () => {};\n    const sequenceTask = new Promise(\n      (resolve) => (resolveSequenceTask = resolve),\n    );\n    sequenceBuilders\n      .reduce((previouslyScheduled, item) => {\n        const [builder, label, metadata] =\n          typeof item === 'function'\n            ? [item, item.name, void 0]\n            : [item.builder, item.label, item.metadata];\n        return previouslyScheduled.then(() => {\n          const scheduled = this.scheduleInternal(\n            'sequence',\n            label,\n            dummyResolvedPromise,\n            metadata,\n            customAct || defaultSchedulerAct,\n            () => builder(),\n          );\n          scheduled.catch(() => {\n            status.faulty = true;\n            resolveSequenceTask();\n          });\n          return scheduled;\n        });\n      }, dummyResolvedPromise)\n      .then(\n        () => {\n          status.done = true;\n          resolveSequenceTask();\n        },\n        () => {},\n      );\n    return Object.assign(status, {\n      task: Promise.resolve(sequenceTask).then(() => {\n        return { done: status.done, faulty: status.faulty };\n      }),\n    });\n  }\n  count() {\n    return this.scheduledTasks.length;\n  }\n  internalWaitOne() {\n    if (this.scheduledTasks.length === 0) {\n      throw new Error('No task scheduled');\n    }\n    const taskIndex = this.taskSelector.nextTaskIndex(this.scheduledTasks);\n    const [scheduledTask] = this.scheduledTasks.splice(taskIndex, 1);\n    return scheduledTask.customAct(async () => {\n      scheduledTask.trigger();\n      try {\n        await scheduledTask.scheduled;\n      } catch (_err) {}\n    });\n  }\n  async waitOne(customAct) {\n    const waitAct = customAct || defaultSchedulerAct;\n    await this.act(() => waitAct(async () => await this.internalWaitOne()));\n  }\n  async waitAll(customAct) {\n    while (this.scheduledTasks.length > 0) {\n      await this.waitOne(customAct);\n    }\n  }\n  async waitFor(unscheduledTask, customAct) {\n    let taskResolved = false;\n    let awaiterPromise = null;\n    const awaiter = async () => {\n      while (!taskResolved && this.scheduledTasks.length > 0) {\n        await this.waitOne(customAct);\n      }\n      awaiterPromise = null;\n    };\n    const handleNotified = () => {\n      if (awaiterPromise !== null) {\n        return;\n      }\n      awaiterPromise = Promise.resolve().then(awaiter);\n    };\n    const clearAndReplaceWatcher = () => {\n      const handleNotifiedIndex =\n        this.scheduledWatchers.indexOf(handleNotified);\n      if (handleNotifiedIndex !== -1) {\n        this.scheduledWatchers.splice(handleNotifiedIndex, 1);\n      }\n      if (handleNotifiedIndex === 0 && this.scheduledWatchers.length !== 0) {\n        this.scheduledWatchers[0]();\n      }\n    };\n    const rewrappedTask = unscheduledTask.then(\n      (ret) => {\n        taskResolved = true;\n        if (awaiterPromise === null) {\n          clearAndReplaceWatcher();\n          return ret;\n        }\n        return awaiterPromise.then(() => {\n          clearAndReplaceWatcher();\n          return ret;\n        });\n      },\n      (err) => {\n        taskResolved = true;\n        if (awaiterPromise === null) {\n          clearAndReplaceWatcher();\n          throw err;\n        }\n        return awaiterPromise.then(() => {\n          clearAndReplaceWatcher();\n          throw err;\n        });\n      },\n    );\n    if (this.scheduledTasks.length > 0 && this.scheduledWatchers.length === 0) {\n      handleNotified();\n    }\n    this.scheduledWatchers.push(handleNotified);\n    return rewrappedTask;\n  }\n  report() {\n    return [\n      ...this.triggeredTasks,\n      ...this.scheduledTasks.map((t) => ({\n        status: 'pending',\n        schedulingType: t.schedulingType,\n        taskId: t.taskId,\n        label: t.label,\n        metadata: t.metadata,\n      })),\n    ];\n  }\n  toString() {\n    return (\n      'schedulerFor()`\\n' +\n      this.report()\n        .map(_SchedulerImplem.buildLog)\n        .map((log) => `-> ${log}`)\n        .join('\\n') +\n      '`'\n    );\n  }\n  [cloneMethod]() {\n    return new _SchedulerImplem(this.act, this.sourceTaskSelector);\n  }\n};\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/BuildSchedulerFor.js\nfunction buildNextTaskIndex(ordering) {\n  let numTasks = 0;\n  return {\n    clone: () => buildNextTaskIndex(ordering),\n    nextTaskIndex: (scheduledTasks) => {\n      if (ordering.length <= numTasks) {\n        throw new Error(\n          `Invalid schedulerFor defined: too many tasks have been scheduled`,\n        );\n      }\n      const taskIndex = scheduledTasks.findIndex(\n        (t) => t.taskId === ordering[numTasks],\n      );\n      if (taskIndex === -1) {\n        throw new Error(\n          `Invalid schedulerFor defined: unable to find next task`,\n        );\n      }\n      ++numTasks;\n      return taskIndex;\n    },\n  };\n}\nfunction buildSchedulerFor(act, ordering) {\n  return new SchedulerImplem(act, buildNextTaskIndex(ordering));\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/SchedulerArbitrary.js\nfunction buildNextTaskIndex2(mrng) {\n  const clonedMrng = mrng.clone();\n  return {\n    clone: () => buildNextTaskIndex2(clonedMrng),\n    nextTaskIndex: (scheduledTasks) => {\n      return mrng.nextInt(0, scheduledTasks.length - 1);\n    },\n  };\n}\nvar SchedulerArbitrary = class extends Arbitrary {\n  constructor(act) {\n    super();\n    this.act = act;\n  }\n  generate(mrng, _biasFactor) {\n    return new Value(\n      new SchedulerImplem(this.act, buildNextTaskIndex2(mrng.clone())),\n      void 0,\n    );\n  }\n  canShrinkWithoutContext(value) {\n    return false;\n  }\n  shrink(_value, _context) {\n    return Stream.nil();\n  }\n};\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/scheduler.js\nfunction scheduler(constraints) {\n  const { act = (f) => f() } = constraints || {};\n  return new SchedulerArbitrary(act);\n}\nfunction schedulerFor(customOrderingOrConstraints, constraintsOrUndefined) {\n  const { act = (f) => f() } = Array.isArray(customOrderingOrConstraints)\n    ? constraintsOrUndefined || {}\n    : customOrderingOrConstraints || {};\n  if (Array.isArray(customOrderingOrConstraints)) {\n    return buildSchedulerFor(act, customOrderingOrConstraints);\n  }\n  return function (_strs, ...ordering) {\n    return buildSchedulerFor(act, ordering);\n  };\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/bigInt64Array.js\nfunction bigInt64Array(constraints = {}) {\n  return typedIntArrayArbitraryArbitraryBuilder(\n    constraints,\n    SBigInt('-9223372036854775808'),\n    SBigInt('9223372036854775807'),\n    SBigInt64Array,\n    bigInt,\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/bigUint64Array.js\nfunction bigUint64Array(constraints = {}) {\n  return typedIntArrayArbitraryArbitraryBuilder(\n    constraints,\n    SBigInt(0),\n    SBigInt('18446744073709551615'),\n    SBigUint64Array,\n    bigInt,\n  );\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/SanitizeRegexAst.js\nfunction raiseUnsupportedASTNode(astNode) {\n  return new Error(`Unsupported AST node! Received: ${stringify(astNode)}`);\n}\nfunction addMissingDotStarTraversalAddMissing(astNode, isFirst, isLast) {\n  if (!isFirst && !isLast) {\n    return astNode;\n  }\n  const traversalResults = { hasStart: false, hasEnd: false };\n  const revampedNode = addMissingDotStarTraversal(\n    astNode,\n    isFirst,\n    isLast,\n    traversalResults,\n  );\n  const missingStart = isFirst && !traversalResults.hasStart;\n  const missingEnd = isLast && !traversalResults.hasEnd;\n  if (!missingStart && !missingEnd) {\n    return revampedNode;\n  }\n  const expressions = [];\n  if (missingStart) {\n    expressions.push({ type: 'Assertion', kind: '^' });\n    expressions.push({\n      type: 'Repetition',\n      quantifier: { type: 'Quantifier', kind: '*', greedy: true },\n      expression: {\n        type: 'Char',\n        kind: 'meta',\n        symbol: '.',\n        value: '.',\n        codePoint: Number.NaN,\n      },\n    });\n  }\n  expressions.push(revampedNode);\n  if (missingEnd) {\n    expressions.push({\n      type: 'Repetition',\n      quantifier: { type: 'Quantifier', kind: '*', greedy: true },\n      expression: {\n        type: 'Char',\n        kind: 'meta',\n        symbol: '.',\n        value: '.',\n        codePoint: Number.NaN,\n      },\n    });\n    expressions.push({ type: 'Assertion', kind: '$' });\n  }\n  return {\n    type: 'Group',\n    capturing: false,\n    expression: { type: 'Alternative', expressions },\n  };\n}\nfunction addMissingDotStarTraversal(\n  astNode,\n  isFirst,\n  isLast,\n  traversalResults,\n) {\n  switch (astNode.type) {\n    case 'Char':\n      return astNode;\n    case 'Repetition':\n      return astNode;\n    case 'Quantifier':\n      throw new Error(\n        `Wrongly defined AST tree, Quantifier nodes not supposed to be scanned!`,\n      );\n    case 'Alternative':\n      traversalResults.hasStart = true;\n      traversalResults.hasEnd = true;\n      return Object.assign(Object.assign({}, astNode), {\n        expressions: astNode.expressions.map((node, index) =>\n          addMissingDotStarTraversalAddMissing(\n            node,\n            isFirst && index === 0,\n            isLast && index === astNode.expressions.length - 1,\n          ),\n        ),\n      });\n    case 'CharacterClass':\n      return astNode;\n    case 'ClassRange':\n      return astNode;\n    case 'Group': {\n      return Object.assign(Object.assign({}, astNode), {\n        expression: addMissingDotStarTraversal(\n          astNode.expression,\n          isFirst,\n          isLast,\n          traversalResults,\n        ),\n      });\n    }\n    case 'Disjunction': {\n      traversalResults.hasStart = true;\n      traversalResults.hasEnd = true;\n      return Object.assign(Object.assign({}, astNode), {\n        left:\n          astNode.left !== null\n            ? addMissingDotStarTraversalAddMissing(\n                astNode.left,\n                isFirst,\n                isLast,\n              )\n            : null,\n        right:\n          astNode.right !== null\n            ? addMissingDotStarTraversalAddMissing(\n                astNode.right,\n                isFirst,\n                isLast,\n              )\n            : null,\n      });\n    }\n    case 'Assertion': {\n      if (astNode.kind === '^' || astNode.kind === 'Lookahead') {\n        traversalResults.hasStart = true;\n        return astNode;\n      } else if (astNode.kind === '$' || astNode.kind === 'Lookbehind') {\n        traversalResults.hasEnd = true;\n        return astNode;\n      } else {\n        throw new Error(\n          `Assertions of kind ${astNode.kind} not implemented yet!`,\n        );\n      }\n    }\n    case 'Backreference':\n      return astNode;\n    default:\n      throw raiseUnsupportedASTNode(astNode);\n  }\n}\nfunction addMissingDotStar(astNode) {\n  return addMissingDotStarTraversalAddMissing(astNode, true, true);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/ReadRegex.js\nfunction charSizeAt(text, pos) {\n  return text[pos] >= '\\uD800' &&\n    text[pos] <= '\\uDBFF' &&\n    text[pos + 1] >= '\\uDC00' &&\n    text[pos + 1] <= '\\uDFFF'\n    ? 2\n    : 1;\n}\nfunction isHexaDigit(char2) {\n  return (\n    (char2 >= '0' && char2 <= '9') ||\n    (char2 >= 'a' && char2 <= 'f') ||\n    (char2 >= 'A' && char2 <= 'F')\n  );\n}\nfunction isDigit(char2) {\n  return char2 >= '0' && char2 <= '9';\n}\nfunction squaredBracketBlockContentEndFrom(text, from) {\n  for (let index = from; index !== text.length; ++index) {\n    const char2 = text[index];\n    if (char2 === '\\\\') {\n      index += 1;\n    } else if (char2 === ']') {\n      return index;\n    }\n  }\n  throw new Error(`Missing closing ']'`);\n}\nfunction parenthesisBlockContentEndFrom(text, from) {\n  let numExtraOpened = 0;\n  for (let index = from; index !== text.length; ++index) {\n    const char2 = text[index];\n    if (char2 === '\\\\') {\n      index += 1;\n    } else if (char2 === ')') {\n      if (numExtraOpened === 0) {\n        return index;\n      }\n      numExtraOpened -= 1;\n    } else if (char2 === '[') {\n      index = squaredBracketBlockContentEndFrom(text, index);\n    } else if (char2 === '(') {\n      numExtraOpened += 1;\n    }\n  }\n  throw new Error(`Missing closing ')'`);\n}\nfunction curlyBracketBlockContentEndFrom(text, from) {\n  let foundComma = false;\n  for (let index = from; index !== text.length; ++index) {\n    const char2 = text[index];\n    if (isDigit(char2)) {\n    } else if (from === index) {\n      return -1;\n    } else if (char2 === ',') {\n      if (foundComma) {\n        return -1;\n      }\n      foundComma = true;\n    } else if (char2 === '}') {\n      return index;\n    } else {\n      return -1;\n    }\n  }\n  return -1;\n}\nvar TokenizerBlockMode;\n(function (TokenizerBlockMode2) {\n  TokenizerBlockMode2[(TokenizerBlockMode2['Full'] = 0)] = 'Full';\n  TokenizerBlockMode2[(TokenizerBlockMode2['Character'] = 1)] = 'Character';\n})(TokenizerBlockMode || (TokenizerBlockMode = {}));\nfunction blockEndFrom(text, from, unicodeMode, mode) {\n  switch (text[from]) {\n    case '[': {\n      if (mode === TokenizerBlockMode.Character) {\n        return from + 1;\n      }\n      return squaredBracketBlockContentEndFrom(text, from + 1) + 1;\n    }\n    case '{': {\n      if (mode === TokenizerBlockMode.Character) {\n        return from + 1;\n      }\n      const foundEnd = curlyBracketBlockContentEndFrom(text, from + 1);\n      if (foundEnd === -1) {\n        return from + 1;\n      }\n      return foundEnd + 1;\n    }\n    case '(': {\n      if (mode === TokenizerBlockMode.Character) {\n        return from + 1;\n      }\n      return parenthesisBlockContentEndFrom(text, from + 1) + 1;\n    }\n    case ']':\n    case '}':\n    case ')':\n      return from + 1;\n    case '\\\\': {\n      const next1 = text[from + 1];\n      switch (next1) {\n        case 'x':\n          if (isHexaDigit(text[from + 2]) && isHexaDigit(text[from + 3])) {\n            return from + 4;\n          }\n          throw new Error(\n            `Unexpected token '${text.substring(from, from + 4)}' found`,\n          );\n        case 'u':\n          if (text[from + 2] === '{') {\n            if (!unicodeMode) {\n              return from + 2;\n            }\n            if (text[from + 4] === '}') {\n              if (isHexaDigit(text[from + 3])) {\n                return from + 5;\n              }\n              throw new Error(\n                `Unexpected token '${text.substring(from, from + 5)}' found`,\n              );\n            }\n            if (text[from + 5] === '}') {\n              if (isHexaDigit(text[from + 3]) && isHexaDigit(text[from + 4])) {\n                return from + 6;\n              }\n              throw new Error(\n                `Unexpected token '${text.substring(from, from + 6)}' found`,\n              );\n            }\n            if (text[from + 6] === '}') {\n              if (\n                isHexaDigit(text[from + 3]) &&\n                isHexaDigit(text[from + 4]) &&\n                isHexaDigit(text[from + 5])\n              ) {\n                return from + 7;\n              }\n              throw new Error(\n                `Unexpected token '${text.substring(from, from + 7)}' found`,\n              );\n            }\n            if (text[from + 7] === '}') {\n              if (\n                isHexaDigit(text[from + 3]) &&\n                isHexaDigit(text[from + 4]) &&\n                isHexaDigit(text[from + 5]) &&\n                isHexaDigit(text[from + 6])\n              ) {\n                return from + 8;\n              }\n              throw new Error(\n                `Unexpected token '${text.substring(from, from + 8)}' found`,\n              );\n            }\n            if (\n              text[from + 8] === '}' &&\n              isHexaDigit(text[from + 3]) &&\n              isHexaDigit(text[from + 4]) &&\n              isHexaDigit(text[from + 5]) &&\n              isHexaDigit(text[from + 6]) &&\n              isHexaDigit(text[from + 7])\n            ) {\n              return from + 9;\n            }\n            throw new Error(\n              `Unexpected token '${text.substring(from, from + 9)}' found`,\n            );\n          }\n          if (\n            isHexaDigit(text[from + 2]) &&\n            isHexaDigit(text[from + 3]) &&\n            isHexaDigit(text[from + 4]) &&\n            isHexaDigit(text[from + 5])\n          ) {\n            return from + 6;\n          }\n          throw new Error(\n            `Unexpected token '${text.substring(from, from + 6)}' found`,\n          );\n        case 'p':\n        case 'P': {\n          if (!unicodeMode) {\n            return from + 2;\n          }\n          let subIndex = from + 2;\n          for (\n            ;\n            subIndex < text.length && text[subIndex] !== '}';\n            subIndex += text[subIndex] === '\\\\' ? 2 : 1\n          ) {}\n          if (text[subIndex] !== '}') {\n            throw new Error(`Invalid \\\\P definition`);\n          }\n          return subIndex + 1;\n        }\n        case 'k': {\n          let subIndex = from + 2;\n          for (\n            ;\n            subIndex < text.length && text[subIndex] !== '>';\n            ++subIndex\n          ) {}\n          if (text[subIndex] !== '>') {\n            if (!unicodeMode) {\n              return from + 2;\n            }\n            throw new Error(`Invalid \\\\k definition`);\n          }\n          return subIndex + 1;\n        }\n        default: {\n          if (isDigit(next1)) {\n            const maxIndex = unicodeMode\n              ? text.length\n              : Math.min(from + 4, text.length);\n            let subIndex = from + 2;\n            for (\n              ;\n              subIndex < maxIndex && isDigit(text[subIndex]);\n              ++subIndex\n            ) {}\n            return subIndex;\n          }\n          const charSize = unicodeMode ? charSizeAt(text, from + 1) : 1;\n          return from + charSize + 1;\n        }\n      }\n    }\n    default: {\n      const charSize = unicodeMode ? charSizeAt(text, from) : 1;\n      return from + charSize;\n    }\n  }\n}\nfunction readFrom(text, from, unicodeMode, mode) {\n  const to = blockEndFrom(text, from, unicodeMode, mode);\n  return text.substring(from, to);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/TokenizeRegex.js\nvar safeStringFromCodePoint = String.fromCodePoint;\nfunction safePop2(tokens) {\n  const previous = tokens.pop();\n  if (previous === void 0) {\n    throw new Error(\n      'Unable to extract token preceeding the currently parsed one',\n    );\n  }\n  return previous;\n}\nfunction isDigit2(char2) {\n  return char2 >= '0' && char2 <= '9';\n}\nfunction simpleChar(char2, escaped) {\n  return {\n    type: 'Char',\n    kind: 'simple',\n    symbol: char2,\n    value: char2,\n    codePoint: char2.codePointAt(0) || -1,\n    escaped,\n  };\n}\nfunction metaEscapedChar(block, symbol) {\n  return {\n    type: 'Char',\n    kind: 'meta',\n    symbol,\n    value: block,\n    codePoint: symbol.codePointAt(0) || -1,\n  };\n}\nfunction toSingleToken(tokens, allowEmpty) {\n  if (tokens.length > 1) {\n    return {\n      type: 'Alternative',\n      expressions: tokens,\n    };\n  }\n  if (!allowEmpty && tokens.length === 0) {\n    throw new Error(`Unsupported no token`);\n  }\n  return tokens[0];\n}\nfunction blockToCharToken(block) {\n  if (block[0] === '\\\\') {\n    const next = block[1];\n    switch (next) {\n      case 'x': {\n        const allDigits = block.substring(2);\n        const codePoint = Number.parseInt(allDigits, 16);\n        const symbol = safeStringFromCodePoint(codePoint);\n        return { type: 'Char', kind: 'hex', symbol, value: block, codePoint };\n      }\n      case 'u': {\n        if (block === '\\\\u') {\n          return simpleChar('u', true);\n        }\n        const allDigits =\n          block[2] === '{'\n            ? block.substring(3, block.length - 1)\n            : block.substring(2);\n        const codePoint = Number.parseInt(allDigits, 16);\n        const symbol = safeStringFromCodePoint(codePoint);\n        return {\n          type: 'Char',\n          kind: 'unicode',\n          symbol,\n          value: block,\n          codePoint,\n        };\n      }\n      case '0': {\n        return metaEscapedChar(block, '\\0');\n      }\n      case 'n': {\n        return metaEscapedChar(block, '\\n');\n      }\n      case 'f': {\n        return metaEscapedChar(block, '\\f');\n      }\n      case 'r': {\n        return metaEscapedChar(block, '\\r');\n      }\n      case 't': {\n        return metaEscapedChar(block, '\t');\n      }\n      case 'v': {\n        return metaEscapedChar(block, '\\v');\n      }\n      case 'w':\n      case 'W':\n      case 'd':\n      case 'D':\n      case 's':\n      case 'S':\n      case 'b':\n      case 'B': {\n        return {\n          type: 'Char',\n          kind: 'meta',\n          symbol: void 0,\n          value: block,\n          codePoint: Number.NaN,\n        };\n      }\n      default: {\n        if (isDigit2(next)) {\n          const allDigits = block.substring(1);\n          const codePoint = Number(allDigits);\n          const symbol = safeStringFromCodePoint(codePoint);\n          return {\n            type: 'Char',\n            kind: 'decimal',\n            symbol,\n            value: block,\n            codePoint,\n          };\n        }\n        if (block.length > 2 && (next === 'p' || next === 'P')) {\n          throw new Error(`UnicodeProperty not implemented yet!`);\n        }\n        const char2 = block.substring(1);\n        return simpleChar(char2, true);\n      }\n    }\n  }\n  return simpleChar(block);\n}\nfunction pushTokens(tokens, regexSource, unicodeMode, groups) {\n  let disjunctions = null;\n  for (\n    let index = 0,\n      block = readFrom(\n        regexSource,\n        index,\n        unicodeMode,\n        TokenizerBlockMode.Full,\n      );\n    index !== regexSource.length;\n    index += block.length,\n      block = readFrom(regexSource, index, unicodeMode, TokenizerBlockMode.Full)\n  ) {\n    const firstInBlock = block[0];\n    switch (firstInBlock) {\n      case '|': {\n        if (disjunctions === null) {\n          disjunctions = [];\n        }\n        disjunctions.push(toSingleToken(tokens.splice(0), true) || null);\n        break;\n      }\n      case '.': {\n        tokens.push({\n          type: 'Char',\n          kind: 'meta',\n          symbol: block,\n          value: block,\n          codePoint: Number.NaN,\n        });\n        break;\n      }\n      case '*':\n      case '+': {\n        const previous = safePop2(tokens);\n        tokens.push({\n          type: 'Repetition',\n          expression: previous,\n          quantifier: { type: 'Quantifier', kind: firstInBlock, greedy: true },\n        });\n        break;\n      }\n      case '?': {\n        const previous = safePop2(tokens);\n        if (previous.type === 'Repetition') {\n          previous.quantifier.greedy = false;\n          tokens.push(previous);\n        } else {\n          tokens.push({\n            type: 'Repetition',\n            expression: previous,\n            quantifier: {\n              type: 'Quantifier',\n              kind: firstInBlock,\n              greedy: true,\n            },\n          });\n        }\n        break;\n      }\n      case '{': {\n        if (block === '{') {\n          tokens.push(simpleChar(block));\n          break;\n        }\n        const previous = safePop2(tokens);\n        const quantifierText = block.substring(1, block.length - 1);\n        const quantifierTokens = quantifierText.split(',');\n        const from = Number(quantifierTokens[0]);\n        const to =\n          quantifierTokens.length === 1\n            ? from\n            : quantifierTokens[1].length !== 0\n              ? Number(quantifierTokens[1])\n              : void 0;\n        tokens.push({\n          type: 'Repetition',\n          expression: previous,\n          quantifier: {\n            type: 'Quantifier',\n            kind: 'Range',\n            greedy: true,\n            from,\n            to,\n          },\n        });\n        break;\n      }\n      case '[': {\n        const blockContent = block.substring(1, block.length - 1);\n        const subTokens = [];\n        let negative = void 0;\n        let previousWasSimpleDash = false;\n        for (\n          let subIndex = 0,\n            subBlock = readFrom(\n              blockContent,\n              subIndex,\n              unicodeMode,\n              TokenizerBlockMode.Character,\n            );\n          subIndex !== blockContent.length;\n          subIndex += subBlock.length,\n            subBlock = readFrom(\n              blockContent,\n              subIndex,\n              unicodeMode,\n              TokenizerBlockMode.Character,\n            )\n        ) {\n          if (subIndex === 0 && subBlock === '^') {\n            negative = true;\n            continue;\n          }\n          const newToken = blockToCharToken(subBlock);\n          if (subBlock === '-') {\n            subTokens.push(newToken);\n            previousWasSimpleDash = true;\n          } else {\n            const operand1Token =\n              subTokens.length >= 2 ? subTokens[subTokens.length - 2] : void 0;\n            if (\n              previousWasSimpleDash &&\n              operand1Token !== void 0 &&\n              operand1Token.type === 'Char'\n            ) {\n              subTokens.pop();\n              subTokens.pop();\n              subTokens.push({\n                type: 'ClassRange',\n                from: operand1Token,\n                to: newToken,\n              });\n            } else {\n              subTokens.push(newToken);\n            }\n            previousWasSimpleDash = false;\n          }\n        }\n        tokens.push({\n          type: 'CharacterClass',\n          expressions: subTokens,\n          negative,\n        });\n        break;\n      }\n      case '(': {\n        const blockContent = block.substring(1, block.length - 1);\n        const subTokens = [];\n        if (blockContent[0] === '?') {\n          if (blockContent[1] === ':') {\n            pushTokens(\n              subTokens,\n              blockContent.substring(2),\n              unicodeMode,\n              groups,\n            );\n            tokens.push({\n              type: 'Group',\n              capturing: false,\n              expression: toSingleToken(subTokens),\n            });\n          } else if (blockContent[1] === '=' || blockContent[1] === '!') {\n            pushTokens(\n              subTokens,\n              blockContent.substring(2),\n              unicodeMode,\n              groups,\n            );\n            tokens.push({\n              type: 'Assertion',\n              kind: 'Lookahead',\n              negative: blockContent[1] === '!' ? true : void 0,\n              assertion: toSingleToken(subTokens),\n            });\n          } else if (\n            blockContent[1] === '<' &&\n            (blockContent[2] === '=' || blockContent[2] === '!')\n          ) {\n            pushTokens(\n              subTokens,\n              blockContent.substring(3),\n              unicodeMode,\n              groups,\n            );\n            tokens.push({\n              type: 'Assertion',\n              kind: 'Lookbehind',\n              negative: blockContent[2] === '!' ? true : void 0,\n              assertion: toSingleToken(subTokens),\n            });\n          } else {\n            const chunks = blockContent.split('>');\n            if (chunks.length < 2 || chunks[0][1] !== '<') {\n              throw new Error(\n                `Unsupported regex content found at ${JSON.stringify(block)}`,\n              );\n            }\n            const groupIndex = ++groups.lastIndex;\n            const nameRaw = chunks[0].substring(2);\n            groups.named.set(nameRaw, groupIndex);\n            pushTokens(\n              subTokens,\n              chunks.slice(1).join('>'),\n              unicodeMode,\n              groups,\n            );\n            tokens.push({\n              type: 'Group',\n              capturing: true,\n              nameRaw,\n              name: nameRaw,\n              number: groupIndex,\n              expression: toSingleToken(subTokens),\n            });\n          }\n        } else {\n          const groupIndex = ++groups.lastIndex;\n          pushTokens(subTokens, blockContent, unicodeMode, groups);\n          tokens.push({\n            type: 'Group',\n            capturing: true,\n            number: groupIndex,\n            expression: toSingleToken(subTokens),\n          });\n        }\n        break;\n      }\n      default: {\n        if (block === '^') {\n          tokens.push({ type: 'Assertion', kind: block });\n        } else if (block === '$') {\n          tokens.push({ type: 'Assertion', kind: block });\n        } else if (block[0] === '\\\\' && isDigit2(block[1])) {\n          const reference = Number(block.substring(1));\n          if (unicodeMode || reference <= groups.lastIndex) {\n            tokens.push({\n              type: 'Backreference',\n              kind: 'number',\n              number: reference,\n              reference,\n            });\n          } else {\n            tokens.push(blockToCharToken(block));\n          }\n        } else if (\n          block[0] === '\\\\' &&\n          block[1] === 'k' &&\n          block.length !== 2\n        ) {\n          const referenceRaw = block.substring(3, block.length - 1);\n          tokens.push({\n            type: 'Backreference',\n            kind: 'name',\n            number: groups.named.get(referenceRaw) || 0,\n            referenceRaw,\n            reference: referenceRaw,\n          });\n        } else {\n          tokens.push(blockToCharToken(block));\n        }\n        break;\n      }\n    }\n  }\n  if (disjunctions !== null) {\n    disjunctions.push(toSingleToken(tokens.splice(0), true) || null);\n    let currentDisjunction = {\n      type: 'Disjunction',\n      left: disjunctions[0],\n      right: disjunctions[1],\n    };\n    for (let index = 2; index < disjunctions.length; ++index) {\n      currentDisjunction = {\n        type: 'Disjunction',\n        left: currentDisjunction,\n        right: disjunctions[index],\n      };\n    }\n    tokens.push(currentDisjunction);\n  }\n}\nfunction tokenizeRegex(regex) {\n  const unicodeMode = safeIndexOf([...regex.flags], 'u') !== -1;\n  const regexSource = regex.source;\n  const tokens = [];\n  pushTokens(tokens, regexSource, unicodeMode, {\n    lastIndex: 0,\n    named: /* @__PURE__ */ new Map(),\n  });\n  return toSingleToken(tokens);\n}\n\n// ../../../node_modules/fast-check/lib/esm/arbitrary/stringMatching.js\nvar safeStringFromCodePoint2 = String.fromCodePoint;\nvar wordChars = [\n  ...'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_',\n];\nvar digitChars = [...'0123456789'];\nvar spaceChars = [...' \t\\r\\n\\v\\f'];\nvar newLineChars = [...'\\r\\n'];\nvar terminatorChars = [...'\u001e\u0015'];\nvar newLineAndTerminatorChars = [...newLineChars, ...terminatorChars];\nvar defaultChar = char();\nfunction raiseUnsupportedASTNode2(astNode) {\n  return new SError(`Unsupported AST node! Received: ${stringify(astNode)}`);\n}\nfunction toMatchingArbitrary(astNode, constraints, flags) {\n  switch (astNode.type) {\n    case 'Char': {\n      if (astNode.kind === 'meta') {\n        switch (astNode.value) {\n          case '\\\\w': {\n            return constantFrom(...wordChars);\n          }\n          case '\\\\W': {\n            return defaultChar.filter((c) => safeIndexOf(wordChars, c) === -1);\n          }\n          case '\\\\d': {\n            return constantFrom(...digitChars);\n          }\n          case '\\\\D': {\n            return defaultChar.filter((c) => safeIndexOf(digitChars, c) === -1);\n          }\n          case '\\\\s': {\n            return constantFrom(...spaceChars);\n          }\n          case '\\\\S': {\n            return defaultChar.filter((c) => safeIndexOf(spaceChars, c) === -1);\n          }\n          case '\\\\b':\n          case '\\\\B': {\n            throw new SError(\n              `Meta character ${astNode.value} not implemented yet!`,\n            );\n          }\n          case '.': {\n            const forbiddenChars = flags.dotAll\n              ? terminatorChars\n              : newLineAndTerminatorChars;\n            return defaultChar.filter(\n              (c) => safeIndexOf(forbiddenChars, c) === -1,\n            );\n          }\n        }\n      }\n      if (astNode.symbol === void 0) {\n        throw new SError(\n          `Unexpected undefined symbol received for non-meta Char! Received: ${stringify(astNode)}`,\n        );\n      }\n      return constant(astNode.symbol);\n    }\n    case 'Repetition': {\n      const node = toMatchingArbitrary(astNode.expression, constraints, flags);\n      switch (astNode.quantifier.kind) {\n        case '*': {\n          return stringOf(node, constraints);\n        }\n        case '+': {\n          return stringOf(\n            node,\n            Object.assign(Object.assign({}, constraints), { minLength: 1 }),\n          );\n        }\n        case '?': {\n          return stringOf(\n            node,\n            Object.assign(Object.assign({}, constraints), {\n              minLength: 0,\n              maxLength: 1,\n            }),\n          );\n        }\n        case 'Range': {\n          return stringOf(\n            node,\n            Object.assign(Object.assign({}, constraints), {\n              minLength: astNode.quantifier.from,\n              maxLength: astNode.quantifier.to,\n            }),\n          );\n        }\n        default: {\n          throw raiseUnsupportedASTNode2(astNode.quantifier);\n        }\n      }\n    }\n    case 'Quantifier': {\n      throw new SError(\n        `Wrongly defined AST tree, Quantifier nodes not supposed to be scanned!`,\n      );\n    }\n    case 'Alternative': {\n      return tuple(\n        ...safeMap(astNode.expressions, (n) =>\n          toMatchingArbitrary(n, constraints, flags),\n        ),\n      ).map((vs) => safeJoin(vs, ''));\n    }\n    case 'CharacterClass':\n      if (astNode.negative) {\n        const childrenArbitraries = safeMap(astNode.expressions, (n) =>\n          toMatchingArbitrary(n, constraints, flags),\n        );\n        return defaultChar.filter((c) =>\n          safeEvery(\n            childrenArbitraries,\n            (arb) => !arb.canShrinkWithoutContext(c),\n          ),\n        );\n      }\n      return oneof(\n        ...safeMap(astNode.expressions, (n) =>\n          toMatchingArbitrary(n, constraints, flags),\n        ),\n      );\n    case 'ClassRange': {\n      const min = astNode.from.codePoint;\n      const max = astNode.to.codePoint;\n      return integer({ min, max }).map(\n        (n) => safeStringFromCodePoint2(n),\n        (c) => {\n          if (typeof c !== 'string') throw new SError('Invalid type');\n          if ([...c].length !== 1) throw new SError('Invalid length');\n          return c.codePointAt(0);\n        },\n      );\n    }\n    case 'Group': {\n      return toMatchingArbitrary(astNode.expression, constraints, flags);\n    }\n    case 'Disjunction': {\n      const left =\n        astNode.left !== null\n          ? toMatchingArbitrary(astNode.left, constraints, flags)\n          : constant('');\n      const right =\n        astNode.right !== null\n          ? toMatchingArbitrary(astNode.right, constraints, flags)\n          : constant('');\n      return oneof(left, right);\n    }\n    case 'Assertion': {\n      if (astNode.kind === '^' || astNode.kind === '$') {\n        if (flags.multiline) {\n          if (astNode.kind === '^') {\n            return oneof(\n              constant(''),\n              tuple(stringOf(defaultChar), constantFrom(...newLineChars)).map(\n                (t) => `${t[0]}${t[1]}`,\n                (value) => {\n                  if (typeof value !== 'string' || value.length === 0)\n                    throw new SError('Invalid type');\n                  return [\n                    value.substring(0, value.length - 1),\n                    value[value.length - 1],\n                  ];\n                },\n              ),\n            );\n          } else {\n            return oneof(\n              constant(''),\n              tuple(constantFrom(...newLineChars), stringOf(defaultChar)).map(\n                (t) => `${t[0]}${t[1]}`,\n                (value) => {\n                  if (typeof value !== 'string' || value.length === 0)\n                    throw new SError('Invalid type');\n                  return [value[0], value.substring(1)];\n                },\n              ),\n            );\n          }\n        }\n        return constant('');\n      }\n      throw new SError(\n        `Assertions of kind ${astNode.kind} not implemented yet!`,\n      );\n    }\n    case 'Backreference': {\n      throw new SError(`Backreference nodes not implemented yet!`);\n    }\n    default: {\n      throw raiseUnsupportedASTNode2(astNode);\n    }\n  }\n}\nfunction stringMatching(regex, constraints = {}) {\n  for (const flag of regex.flags) {\n    if (\n      flag !== 'd' &&\n      flag !== 'g' &&\n      flag !== 'm' &&\n      flag !== 's' &&\n      flag !== 'u'\n    ) {\n      throw new SError(\n        `Unable to use \"stringMatching\" against a regex using the flag ${flag}`,\n      );\n    }\n  }\n  const sanitizedConstraints = { size: constraints.size };\n  const flags = { multiline: regex.multiline, dotAll: regex.dotAll };\n  const regexRootToken = addMissingDotStar(tokenizeRegex(regex));\n  return toMatchingArbitrary(regexRootToken, sanitizedConstraints, flags);\n}\n\n// ../../../node_modules/fast-check/lib/esm/fast-check-default.js\nvar __type2 = 'module';\nvar __version2 = '3.17.2';\nvar __commitHash2 = 'a377b81e6e8362ad7324cf65b75bc5e93d12af64';\n\n// ../../../node_modules/fast-check/lib/esm/fast-check.js\nvar fast_check_default = fast_check_default_exports;\nexport {\n  Arbitrary,\n  ExecutionStatus,\n  PreconditionFailure,\n  Random,\n  Stream,\n  Value,\n  VerbosityLevel,\n  __commitHash2 as __commitHash,\n  __type2 as __type,\n  __version2 as __version,\n  anything,\n  array,\n  ascii,\n  asciiString,\n  assert,\n  asyncDefaultReportMessage,\n  asyncModelRun,\n  asyncProperty,\n  asyncStringify,\n  asyncToStringMethod,\n  base64,\n  base64String,\n  bigInt,\n  bigInt64Array,\n  bigIntN,\n  bigUint,\n  bigUint64Array,\n  bigUintN,\n  boolean,\n  char,\n  char16bits,\n  check,\n  clone,\n  cloneIfNeeded,\n  cloneMethod,\n  commands,\n  compareBooleanFunc,\n  compareFunc,\n  configureGlobal,\n  constant,\n  constantFrom,\n  context,\n  createDepthIdentifier,\n  date,\n  fast_check_default as default,\n  defaultReportMessage,\n  dictionary,\n  domain,\n  double,\n  emailAddress,\n  falsy,\n  float,\n  float32Array,\n  float64Array,\n  fullUnicode,\n  fullUnicodeString,\n  func,\n  gen,\n  getDepthContextFor,\n  hasAsyncToStringMethod,\n  hasCloneMethod,\n  hasToStringMethod,\n  hash,\n  hexa,\n  hexaString,\n  infiniteStream,\n  int16Array,\n  int32Array,\n  int8Array,\n  integer,\n  ipV4,\n  ipV4Extended,\n  ipV6,\n  json,\n  jsonValue,\n  letrec,\n  lorem,\n  mapToConstant,\n  maxSafeInteger,\n  maxSafeNat,\n  memo,\n  mixedCase,\n  modelRun,\n  nat,\n  object,\n  oneof,\n  option,\n  pre,\n  property,\n  readConfigureGlobal,\n  record,\n  resetConfigureGlobal,\n  sample,\n  scheduledModelRun,\n  scheduler,\n  schedulerFor,\n  shuffledSubarray,\n  sparseArray,\n  statistics,\n  stream,\n  string,\n  string16bits,\n  stringMatching,\n  stringOf,\n  stringify,\n  subarray,\n  toStringMethod,\n  tuple,\n  uint16Array,\n  uint32Array,\n  uint8Array,\n  uint8ClampedArray,\n  ulid,\n  unicode,\n  unicodeJson,\n  unicodeJsonValue,\n  unicodeString,\n  uniqueArray,\n  uuid,\n  uuidV,\n  webAuthority,\n  webFragments,\n  webPath,\n  webQueryParameters,\n  webSegment,\n  webUrl,\n};\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/fastly-global.js",
    "content": "/// <reference path=\"../../../../../types/index.d.ts\" />\n/* eslint-env serviceworker */\n\nimport { assert } from './assertions.js';\nimport { routes } from './routes.js';\nimport { sdkVersion } from 'fastly:experimental';\n\nroutes.set('/fastly/now', function () {\n  assert(typeof fastly.now, 'function', 'typeof fastly.now');\n\n  assert(fastly.now.name, 'now', 'fastly.now.name');\n\n  assert(fastly.now.length, 0, 'fastly.now.length');\n\n  assert(typeof fastly.now(), 'number', `typeof fastly.now()`);\n\n  assert(fastly.now() > Date.now(), true, `fastly.now() > Date.now()`);\n});\n\nroutes.set('/fastly/version', function () {\n  assert(typeof fastly.sdkVersion, 'string', 'typeof fastly.sdkVersion');\n\n  assert(\n    fastly.sdkVersion,\n    sdkVersion,\n    'fastly.sdkVersion matches fastly:experimental#sdkVersion',\n  );\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/fetch-errors.js",
    "content": "/// <reference path=\"../../../../../types/index.d.ts\" />\nimport { assertRejects } from './assertions.js';\nimport { routes } from './routes.js';\nimport { Backend } from 'fastly:backend';\nimport { allowDynamicBackends } from 'fastly:experimental';\n\nroutes.set('/fetch-errors', async () => {\n  allowDynamicBackends(true);\n  await assertRejects(\n    async () => {\n      await fetch('http://127.0.0.1');\n    },\n    DOMException,\n    'Connection refused',\n  );\n\n  await assertRejects(\n    async () => {\n      await fetch('https://fastly.com/', {\n        backend: new Backend({\n          name: 'b1',\n          target: 'fastly.com:8080',\n        }),\n      });\n    },\n    DOMException,\n    'Connection refused',\n  );\n\n  await assertRejects(\n    async () => {\n      await fetch('https://fastly.com', {\n        backend: new Backend({\n          name: 'b3',\n          target: 'fastly.com',\n          useSSL: true,\n          certificateHostname: 'google.com',\n        }),\n      });\n    },\n    DOMException,\n    'TLS certificate error',\n  );\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/geoip.js",
    "content": "/* eslint-env serviceworker */\n/* global fastly */\nimport { assert, assertThrows, strictEqual } from './assertions.js';\nimport { getGeolocationForIpAddress } from 'fastly:geolocation';\nimport { isRunningLocally, routes } from './routes.js';\n\nroutes.set('/fastly/getgeolocationforipaddress/interface', async function () {\n  let actual = Reflect.getOwnPropertyDescriptor(\n    fastly,\n    'getGeolocationForIpAddress',\n  );\n  let expected = {\n    writable: true,\n    enumerable: true,\n    configurable: true,\n    value: fastly.getGeolocationForIpAddress,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(fastly, 'getGeolocationForIpAddress)`,\n  );\n\n  assert(\n    typeof fastly.getGeolocationForIpAddress,\n    'function',\n    `typeof fastly.getGeolocationForIpAddress`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(\n    fastly.getGeolocationForIpAddress,\n    'length',\n  );\n  expected = {\n    value: 1,\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(fastly.getGeolocationForIpAddress, 'length')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(\n    fastly.getGeolocationForIpAddress,\n    'name',\n  );\n  expected = {\n    value: 'getGeolocationForIpAddress',\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(fastly.getGeolocationForIpAddress, 'name')`,\n  );\n});\n\nroutes.set(\n  '/fastly/getgeolocationforipaddress/called-as-constructor',\n  async () => {\n    assertThrows(\n      () => {\n        new fastly.getGeolocationForIpAddress('1.2.3.4');\n      },\n      TypeError,\n      `fastly.getGeolocationForIpAddress is not a constructor`,\n    );\n  },\n);\n// https://tc39.es/ecma262/#sec-tostring\nroutes.set(\n  '/fastly/getgeolocationforipaddress/parameter-calls-7.1.17-ToString',\n  async () => {\n    let sentinel;\n    const test = () => {\n      sentinel = Symbol();\n      const key = {\n        toString() {\n          throw sentinel;\n        },\n      };\n      fastly.getGeolocationForIpAddress(key);\n    };\n    assertThrows(test);\n    try {\n      test();\n    } catch (thrownError) {\n      assert(thrownError, sentinel, 'thrownError === sentinel');\n    }\n    assertThrows(\n      () => {\n        fastly.getGeolocationForIpAddress(Symbol());\n      },\n      Error,\n      `can't convert symbol to string`,\n    );\n  },\n);\nroutes.set(\n  '/fastly/getgeolocationforipaddress/parameter-not-supplied',\n  async () => {\n    assertThrows(\n      () => {\n        fastly.getGeolocationForIpAddress();\n      },\n      TypeError,\n      `fastly.getGeolocationForIpAddress: At least 1 argument required, but only 0 passed`,\n    );\n  },\n);\nroutes.set(\n  '/fastly/getgeolocationforipaddress/parameter-empty-string',\n  async () => {\n    assertThrows(\n      () => {\n        fastly.getGeolocationForIpAddress('');\n      },\n      Error,\n      `Invalid address passed to fastly.getGeolocationForIpAddress`,\n    );\n  },\n);\n\nlet geoFields = [\n  'as_name',\n  'as_number',\n  'area_code',\n  'city',\n  'conn_speed',\n  'conn_type',\n  'continent',\n  'country_code',\n  'country_code3',\n  'country_name',\n  'gmt_offset',\n  'latitude',\n  'longitude',\n  'metro_code',\n  'postal_code',\n  'proxy_description',\n  'proxy_type',\n  'region',\n  'utc_offset',\n];\n\nroutes.set('/fastly/getgeolocationforipaddress/bad-ip', async () => {\n  let geo = fastly.getGeolocationForIpAddress('0.0.0.0');\n  if (isRunningLocally()) {\n    strictEqual(\n      geo,\n      null,\n      `fastly.getGeolocationForIpAddress('0.0.0.0') == null`,\n    );\n  } else {\n    strictEqual(geo.as_name, '?');\n  }\n  assertThrows(() => {\n    fastly.getGeolocationForIpAddress('999.999.999.999');\n  }, Error);\n});\n\nroutes.set(\n  '/fastly/getgeolocationforipaddress/parameter-ipv4-string',\n  async () => {\n    let geo = fastly.getGeolocationForIpAddress('151.101.1.1');\n    if (isRunningLocally()) {\n      strictEqual(geo, null);\n    } else {\n      assert(\n        Object.keys(geo),\n        geoFields,\n        `Object.keys(fastly.getGeolocationForIpAddress('151.101.1.1')) == geoFields`,\n      );\n    }\n  },\n);\n\nroutes.set(\n  '/fastly/getgeolocationforipaddress/parameter-compressed-ipv6-string',\n  async () => {\n    if (isRunningLocally()) {\n      let geo = fastly.getGeolocationForIpAddress('2607:f0d0:1002:51::4');\n      assert(\n        Object.keys(geo),\n        geoFields,\n        `Object.keys(fastly.getGeolocationForIpAddress('2607:f0d0:1002:51::4')) == geoFields`,\n      );\n    }\n  },\n);\nroutes.set(\n  '/fastly/getgeolocationforipaddress/parameter-shortened-ipv6-string',\n  async () => {\n    if (isRunningLocally()) {\n      let geo = fastly.getGeolocationForIpAddress(\n        '2607:f0d0:1002:0051:0:0:0:0004',\n      );\n      assert(\n        Object.keys(geo),\n        geoFields,\n        `Object.keys(fastly.getGeolocationForIpAddress('2607:f0d0:1002:0051:0:0:0:0004')) == geoFields`,\n      );\n    }\n  },\n);\nroutes.set(\n  '/fastly/getgeolocationforipaddress/parameter-expanded-ipv6-string',\n  async () => {\n    if (isRunningLocally()) {\n      let geo = fastly.getGeolocationForIpAddress(\n        '2607:f0d0:1002:0051:0000:0000:0000:0004',\n      );\n      assert(\n        Object.keys(geo),\n        geoFields,\n        `Object.keys(fastly.getGeolocationForIpAddress('2607:f0d0:1002:0051:0000:0000:0000:0004')) == geoFields`,\n      );\n    }\n  },\n);\n\nroutes.set('/fastly/getgeolocationforipaddress/called-unbound', async () => {\n  if (isRunningLocally()) {\n    let geo = fastly.getGeolocationForIpAddress.call(\n      undefined,\n      '2607:f0d0:1002:0051:0000:0000:0000:0004',\n    );\n    assert(\n      Object.keys(geo),\n      geoFields,\n      `Object.keys(fastly.getGeolocationForIpAddress('2607:f0d0:1002:0051:0000:0000:0000:0004')) == geoFields`,\n    );\n  }\n});\n\nroutes.set('/fastly:geolocation', async () => {\n  assert(\n    getGeolocationForIpAddress,\n    fastly.getGeolocationForIpAddress,\n    'getGeolocationForIpAddress === fastly.getGeolocationForIpAddress',\n  );\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/headers.js",
    "content": "/* eslint-env serviceworker */\n\nimport { routes } from './routes.js';\nimport { assert } from './assertions.js';\nimport { CacheOverride } from 'fastly:cache-override';\n\nroutes.set('/headers/construct', async () => {\n  const headers = new Headers();\n  headers.set('foo', 'bar');\n  return new Response('check headers', { headers });\n});\n\nroutes.set('/headers/getsetcookie', async () => {\n  let response = await fetch(\n    'https://http-me.fastly.dev/meow?header=Set-Cookie:name1=value1',\n    {\n      backend: 'httpme',\n    },\n  );\n  response.headers.append('Set-Cookie', 'name2=value2');\n  console.log(\n    'response.headers.getSetCookie()',\n    response.headers.getSetCookie(),\n  );\n});\n\nroutes.set('/headers/from-response/set', async () => {\n  const response = await fetch('https://http-me.fastly.dev/anything', {\n    backend: 'httpme',\n    cacheOverride: new CacheOverride('pass'),\n  });\n  response.headers.set('cuStom', 'test');\n  return response;\n});\n\nroutes.set('/headers/from-response/delete-invalid', async () => {\n  const response = await fetch('https://http-me.fastly.dev/anything', {\n    backend: 'httpme',\n    cacheOverride: new CacheOverride('pass'),\n  });\n  response.headers.delete('none');\n  return response;\n});\n\nroutes.set('/headers/from-response/set-delete', async () => {\n  const response = await fetch('https://http-me.fastly.dev/anything', {\n    backend: 'httpme',\n    cacheOverride: new CacheOverride('pass'),\n  });\n  response.headers.set('custom', 'test');\n  response.headers.delete('access-control-allow-origin');\n  return response;\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/html-rewriter.js",
    "content": "/* eslint-env serviceworker */\n\nimport { routes } from './routes.js';\nimport { HTMLRewritingStream } from 'fastly:html-rewriter';\nimport {\n  assert,\n  assertThrows,\n  assertRejects,\n  strictEqual,\n} from './assertions.js';\n\nroutes.set('/html-rewriter/set-attribute', async () => {\n  const toRewrite =\n    '<!DOCTYPE html><html><head><title>Test</title></head><body><h1 class=\"a-class\" id=\"an-id\">Hello, World!</h1></body></html>';\n  const expected =\n    '<!DOCTYPE html><html><head><title>Test</title></head><body><h1 class=\"a-rewritten-class\" id=\"a-rewritten-id\" custom-attr=\"custom-value\">Hello, World!</h1></body></html>';\n  let body = new Response(toRewrite, {\n    headers: { 'Content-Type': 'text/html' },\n  }).body.pipeThrough(\n    new HTMLRewritingStream().onElement('h1', (e) => {\n      e.setAttribute('class', 'a-rewritten-class');\n      e.setAttribute('id', 'a-rewritten-id');\n      e.setAttribute('custom-attr', 'custom-value');\n    }),\n  );\n  let text = await new Response(body, {\n    headers: { 'Content-Type': 'text/html' },\n  }).text();\n  strictEqual(text, expected);\n});\n\nroutes.set('/html-rewriter/get-attribute', async () => {\n  const toRewrite =\n    '<!DOCTYPE html><html><head><title>Test</title></head><body><h1 class=\"a-class\" id=\"an-id\">Hello, World!</h1></body></html>';\n  let classAttr, idAttr;\n  let body = new Response(toRewrite, {\n    headers: { 'Content-Type': 'text/html' },\n  }).body.pipeThrough(\n    new HTMLRewritingStream().onElement('h1', (e) => {\n      classAttr = e.getAttribute('class');\n      idAttr = e.getAttribute('id');\n    }),\n  );\n  await new Response(body, { headers: { 'Content-Type': 'text/html' } }).text();\n  strictEqual(classAttr, 'a-class');\n  strictEqual(idAttr, 'an-id');\n});\n\nroutes.set('/html-rewriter/remove-attribute', async () => {\n  const toRewrite =\n    '<!DOCTYPE html><html><head><title>Test</title></head><body><h1 class=\"a-class\" id=\"an-id\" custom-attr=\"custom-value\">Hello, World!</h1></body></html>';\n  const expected =\n    '<!DOCTYPE html><html><head><title>Test</title></head><body><h1>Hello, World!</h1></body></html>';\n  let body = new Response(toRewrite, {\n    headers: { 'Content-Type': 'text/html' },\n  }).body.pipeThrough(\n    new HTMLRewritingStream().onElement('h1', (e) => {\n      e.removeAttribute('class');\n      e.removeAttribute('id');\n      e.removeAttribute('custom-attr');\n    }),\n  );\n  let text = await new Response(body, {\n    headers: { 'Content-Type': 'text/html' },\n  }).text();\n  strictEqual(text, expected);\n});\n\nroutes.set('/html-rewriter/replace-with', async () => {\n  const toRewrite =\n    '<!DOCTYPE html><html><head><title>Test</title></head><body><h1>Hello, World!</h1></body></html>';\n  const expected =\n    '<!DOCTYPE html><html><head><title>Test</title></head><body><h2>Goodbye, World!</h2></body></html>';\n  let body = new Response(toRewrite, {\n    headers: { 'Content-Type': 'text/html' },\n  }).body.pipeThrough(\n    new HTMLRewritingStream().onElement('h1', (e) => {\n      e.replaceWith('<h2>Goodbye, World!</h2>');\n    }),\n  );\n  let text = await new Response(body, {\n    headers: { 'Content-Type': 'text/html' },\n  }).text();\n  strictEqual(text, expected);\n});\n\nroutes.set('/html-rewriter/replace-children', async () => {\n  const toRewrite =\n    '<!DOCTYPE html><html><head><title>Test</title></head><body><h1>Hello, World!</h1></body></html>';\n  const expected =\n    '<!DOCTYPE html><html><head><title>Test</title></head><body><h1>Goodbye, World!</h1></body></html>';\n  let body = new Response(toRewrite, {\n    headers: { 'Content-Type': 'text/html' },\n  }).body.pipeThrough(\n    new HTMLRewritingStream().onElement('h1', (e) => {\n      e.replaceChildren('Goodbye, World!');\n    }),\n  );\n  let text = await new Response(body, {\n    headers: { 'Content-Type': 'text/html' },\n  }).text();\n  strictEqual(text, expected);\n});\n\nroutes.set('/html-rewriter/insert', async () => {\n  const toRewrite =\n    '<!DOCTYPE html><html><head><title>Test</title></head><body><h1>Hello, World!</h1></body></html>';\n  const expected =\n    '<!DOCTYPE html><html><head><title>Test</title></head><body>Before - <h1>Prefix - Hello, World! - Suffix</h1> - After</body></html>';\n  let body = new Response(toRewrite, {\n    headers: { 'Content-Type': 'text/html' },\n  }).body.pipeThrough(\n    new HTMLRewritingStream().onElement('h1', (e) => {\n      e.before('Before - ');\n      e.prepend('Prefix - ');\n      e.append(' - Suffix');\n      e.after(' - After');\n    }),\n  );\n  let text = await new Response(body, {\n    headers: { 'Content-Type': 'text/html' },\n  }).text();\n  strictEqual(text, expected);\n});\n\nroutes.set('/html-rewriter/complex-selector', async () => {\n  const toRewrite =\n    \"<!DOCTYPE html><html><head><title>Test</title></head><body><div class='a-class'><h1 id='an-id'>Hello, World!</h1></div><div class='a-class'><h1 id='another-id'>Hello again, World!</h1></div></body></html>\";\n  const expected =\n    \"<!DOCTYPE html><html><head><title>Test</title></head><body><div class='a-class'><h1 id='an-id' custom-attr=\\\"custom-value\\\">Hello, World!</h1></div><div class='a-class'><h1 id='another-id' custom-attr=\\\"custom-value\\\">Hello again, World!</h1></div></body></html>\";\n  let body = new Response(toRewrite, {\n    headers: { 'Content-Type': 'text/html' },\n  }).body.pipeThrough(\n    new HTMLRewritingStream().onElement('div.a-class > h1[id^=\"an\"]', (e) => {\n      e.setAttribute('custom-attr', 'custom-value');\n    }),\n  );\n  let text = await new Response(body, {\n    headers: { 'Content-Type': 'text/html' },\n  }).text();\n  strictEqual(text, expected);\n});\n\nroutes.set('/html-rewriter/no-match-rewritten-content', async () => {\n  const toRewrite =\n    '<!DOCTYPE html><html><head><title>Test</title></head><body><div></div></body></html>';\n  const expected =\n    '<!DOCTYPE html><html><head><title>Test</title></head><body><div class=\"a-class\"><h1>Hello, World!</h1></div></body></html>';\n  let body = new Response(toRewrite, {\n    headers: { 'Content-Type': 'text/html' },\n  }).body.pipeThrough(\n    new HTMLRewritingStream()\n      .onElement('div', (e) => {\n        e.setAttribute('class', 'a-class');\n        e.append('<h1>Hello, World!</h1>');\n      })\n      .onElement('h1', (e) => {\n        // should not be called, as h1 does not exist in original content\n        e.setAttribute('custom-attr', 'custom-value');\n      }),\n  );\n  let text = await new Response(body, {\n    headers: { 'Content-Type': 'text/html' },\n  }).text();\n  strictEqual(text, expected);\n});\n\nroutes.set('/html-rewriter/multiple-handlers', async () => {\n  const toRewrite =\n    \"<!DOCTYPE html><html><head><title>Test</title></head><body><div class='a-class'><h1 id='an-id'>Hello, World!</h1></div><div class='a-class'><h1 id='another-id'>Hello again, World!</h1></div></body></html>\";\n  const expected =\n    '<!DOCTYPE html><html><head><title>Test</title></head><body><div class=\\'a-class\\' custom-attr=\"custom-value\"><h1 id=\\'an-id\\' another-attr=\"another-value\">Hello, World!</h1></div><div class=\\'a-class\\' custom-attr=\"custom-value\"><h1 id=\\'another-id\\' another-attr=\"another-value\">Hello again, World!</h1></div></body></html>';\n  let body = new Response(toRewrite, {\n    headers: { 'Content-Type': 'text/html' },\n  }).body.pipeThrough(\n    new HTMLRewritingStream()\n      .onElement('div.a-class', (e) => {\n        e.setAttribute('custom-attr', 'custom-value');\n      })\n      .onElement('h1', (e) => {\n        e.setAttribute('another-attr', 'another-value');\n      }),\n  );\n  let text = await new Response(body, {\n    headers: { 'Content-Type': 'text/html' },\n  }).text();\n  strictEqual(text, expected);\n});\n\nroutes.set('/html-rewriter/invalid-selector', async () => {\n  assertThrows(() => {\n    new HTMLRewritingStream().onElement('div..a-class', (e) => {\n      e.setAttribute('custom-attr', 'custom-value');\n    });\n  }, Error);\n});\n\nroutes.set('/html-rewriter/invalid-handler', async () => {\n  assertThrows(() => {\n    new HTMLRewritingStream().onElement(\n      'div.a-class',\n      'this is not a function',\n    );\n  }, Error);\n});\n\nroutes.set('/html-rewriter/throw-in-handler', async () => {\n  const toRewrite =\n    \"<!DOCTYPE html><html><head><title>Test</title></head><body><div class='a-class'><h1 id='an-id'>Hello, World!</h1></div></body></html>\";\n  let body = new Response(toRewrite, {\n    headers: { 'Content-Type': 'text/html' },\n  }).body.pipeThrough(\n    new HTMLRewritingStream().onElement('div.a-class', (e) => {\n      throw new Error('This is an error from the handler');\n    }),\n  );\n  assertRejects(async () => {\n    await new Response(body, {\n      headers: { 'Content-Type': 'text/html' },\n    }).text();\n  }, Error);\n});\n\nroutes.set('/html-rewriter/invalid-html', async () => {\n  const toRewrite = 'This is not HTML content';\n  let body = new Response(toRewrite, {\n    headers: { 'Content-Type': 'text/html' },\n  }).body.pipeThrough(\n    new HTMLRewritingStream().onElement('div.a-class', (e) => {\n      e.setAttribute('custom-attr', 'custom-value');\n    }),\n  );\n  assertRejects(async () => {\n    await new Response(body, {\n      headers: { 'Content-Type': 'text/plain' },\n    }).text();\n  }, Error);\n});\n\nroutes.set('/html-rewriter/insertion-order', async () => {\n  const toRewrite =\n    '<!DOCTYPE html><html><head><title>Test</title></head><body><h1>Hello, World!</h1></body></html>';\n  const expected =\n    '<!DOCTYPE html><html><head><title>Test</title></head><body>First - Before - <h1>Prefix - Other Prefix - Hello, World! - Suffix - Other Suffix</h1> - After - Last</body></html>';\n  let body = new Response(toRewrite, {\n    headers: { 'Content-Type': 'text/html' },\n  }).body.pipeThrough(\n    new HTMLRewritingStream().onElement('h1', (e) => {\n      e.before('First - ');\n      e.before('Before - ');\n      // The insertion position is maintained, so prepends are inserted in reverse order\n      e.prepend('Other Prefix - ');\n      e.prepend('Prefix - ');\n      e.append(' - Suffix');\n      e.append(' - Other Suffix');\n      // The insertion position is maintained, so appends are inserted in reverse order\n      e.after(' - Last');\n      e.after(' - After');\n    }),\n  );\n  let text = await new Response(body, {\n    headers: { 'Content-Type': 'text/html' },\n  }).text();\n  strictEqual(text, expected);\n});\n\nroutes.set('/html-rewriter/escape-html', async () => {\n  const toRewrite =\n    '<!DOCTYPE html><html><head><title>Test</title></head><body><h1>Hello, <em>World!</em></h1></body></html>';\n  const expectedNoEscape =\n    '<!DOCTYPE html><html><head><title>Test</title></head><body><h1>Hello, <strong>Beautiful</strong> <em>World!</em></h1></body></html>';\n  const expectedEscape =\n    '<!DOCTYPE html><html><head><title>Test</title></head><body><h1>Hello, &lt;strong&gt;Beautiful&lt;/strong&gt; <em>World!</em></h1></body></html>';\n  let bodyNoEscape = new Response(toRewrite, {\n    headers: { 'Content-Type': 'text/html' },\n  }).body.pipeThrough(\n    new HTMLRewritingStream().onElement('em', (e) => {\n      e.before('<strong>Beautiful</strong> ', { escapeHTML: false });\n    }),\n  );\n  let textNoEscape = await new Response(bodyNoEscape, {\n    headers: { 'Content-Type': 'text/html' },\n  }).text();\n  strictEqual(textNoEscape, expectedNoEscape);\n\n  let bodyEscape = new Response(toRewrite, {\n    headers: { 'Content-Type': 'text/html' },\n  }).body.pipeThrough(\n    new HTMLRewritingStream().onElement('em', (e) => {\n      e.before('<strong>Beautiful</strong> ', { escapeHTML: true });\n    }),\n  );\n  let textEscape = await new Response(bodyEscape, {\n    headers: { 'Content-Type': 'text/html' },\n  }).text();\n  strictEqual(textEscape, expectedEscape);\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/image-optimizer.js",
    "content": "/* eslint-env serviceworker */\n\nimport { routes } from './routes.js';\nimport {\n  Region,\n  Auto,\n  BWAlgorithm,\n  CropMode,\n  Disable,\n  Enable,\n  Fit,\n  Metadata,\n  Optimize,\n  Orient,\n  Profile,\n  ResizeFilter,\n  optionsToQueryString,\n} from 'fastly:image-optimizer';\nimport { assert, assertThrows } from './assertions.js';\n\n// Enums\nroutes.set('/image-optimizer/options/region', () => {\n  assert(optionsToQueryString({ region: Region.UsEast }), 'region=us_east');\n  assert(optionsToQueryString({ region: Region.Asia }), 'region=asia');\n  assertThrows(() => optionsToQueryString({ region: 'invalid' }), TypeError);\n  assertThrows(() => optionsToQueryString({}), TypeError);\n});\nroutes.set('/image-optimizer/options/auto', () => {\n  assert(\n    optionsToQueryString({ region: Region.Asia, auto: Auto.AVIF }),\n    'region=asia&auto=avif',\n  );\n  assert(\n    optionsToQueryString({ region: Region.Asia, auto: Auto.WEBP }),\n    'region=asia&auto=webp',\n  );\n  assertThrows(\n    () => optionsToQueryString({ region: Region.Asia, auto: 'invalid' }),\n    TypeError,\n  );\n});\nroutes.set('/image-optimizer/options/bw', () => {\n  assert(\n    optionsToQueryString({\n      region: Region.EuCentral,\n      bw: BWAlgorithm.Threshold,\n    }),\n    'region=eu_central&bw=threshold',\n  );\n  assert(\n    optionsToQueryString({\n      region: Region.EuCentral,\n      bw: BWAlgorithm.Atkinson,\n    }),\n    'region=eu_central&bw=atkinson',\n  );\n  assertThrows(\n    () => optionsToQueryString({ region: Region.EuCentral, bw: 'invalid' }),\n    TypeError,\n  );\n});\nroutes.set('/image-optimizer/options/crop-mode', () => {\n  const qs = optionsToQueryString({\n    region: Region.UsWest,\n    crop: {\n      size: { absolute: { width: 100, height: 100 } },\n      mode: CropMode.Smart,\n    },\n  });\n  assert(qs.includes('smart'), true);\n  assertThrows(\n    () =>\n      optionsToQueryString({\n        region: Region.UsWest,\n        crop: { size: { absolute: { width: 100, height: 100 } }, mode: 'bad' },\n      }),\n    TypeError,\n  );\n});\nroutes.set('/image-optimizer/options/disable', () => {\n  assert(\n    optionsToQueryString({\n      region: Region.Australia,\n      disable: Disable.Upscale,\n    }),\n    'region=australia&disable=upscale',\n  );\n  assertThrows(() =>\n    optionsToQueryString({ region: Region.Australia, disable: 'invalid' }),\n  );\n});\nroutes.set('/image-optimizer/options/enable', () => {\n  assert(\n    optionsToQueryString({ region: Region.Australia, enable: Enable.Upscale }),\n    'region=australia&enable=upscale',\n  );\n  assertThrows(() =>\n    optionsToQueryString({ region: Region.Australia, enable: 'invalid' }),\n  );\n});\nroutes.set('/image-optimizer/options/fit', () => {\n  assert(\n    optionsToQueryString({ region: Region.Australia, fit: Fit.Crop }),\n    'region=australia&fit=crop',\n  );\n  assert(\n    optionsToQueryString({ region: Region.Australia, fit: Fit.Cover }),\n    'region=australia&fit=cover',\n  );\n  assertThrows(() =>\n    optionsToQueryString({ region: Region.Australia, fit: 'invalid' }),\n  );\n});\nroutes.set('/image-optimizer/options/metadata', () => {\n  assert(\n    optionsToQueryString({ region: Region.Australia, metadata: Metadata.C2PA }),\n    'region=australia&metadata=c2pa',\n  );\n  assert(\n    optionsToQueryString({\n      region: Region.Australia,\n      metadata: Metadata.CopyrightAndC2PA,\n    }),\n    'region=australia&metadata=copyright,c2pa',\n  );\n  assertThrows(() =>\n    optionsToQueryString({ region: Region.Australia, metadata: 'invalid' }),\n  );\n});\nroutes.set('/image-optimizer/options/optimize', () => {\n  assert(\n    optionsToQueryString({ region: Region.Australia, optimize: Optimize.Low }),\n    'region=australia&optimize=low',\n  );\n  assert(\n    optionsToQueryString({ region: Region.Australia, optimize: Optimize.High }),\n    'region=australia&optimize=high',\n  );\n  assertThrows(() =>\n    optionsToQueryString({ region: Region.Australia, optimize: 'invalid' }),\n  );\n});\nroutes.set('/image-optimizer/options/orient', () => {\n  assert(\n    optionsToQueryString({ region: Region.Australia, orient: Orient.Default }),\n    'region=australia&orient=1',\n  );\n  assert(\n    optionsToQueryString({\n      region: Region.Australia,\n      orient: Orient.FlipHorizontalOrientRight,\n    }),\n    'region=australia&orient=7',\n  );\n  assertThrows(() =>\n    optionsToQueryString({ region: Region.Australia, orient: 'invalid' }),\n  );\n});\nroutes.set('/image-optimizer/options/profile', () => {\n  assert(\n    optionsToQueryString({\n      region: Region.Australia,\n      profile: Profile.Baseline,\n    }),\n    'region=australia&profile=baseline',\n  );\n  assert(\n    optionsToQueryString({ region: Region.Australia, profile: Profile.Main }),\n    'region=australia&profile=main',\n  );\n  assertThrows(() =>\n    optionsToQueryString({ region: Region.Australia, profile: 'invalid' }),\n  );\n});\nroutes.set('/image-optimizer/options/resizeFilter', () => {\n  assert(\n    optionsToQueryString({\n      region: Region.Australia,\n      resizeFilter: ResizeFilter.Bicubic,\n    }),\n    'region=australia&resize-filter=bicubic',\n  );\n  assert(\n    optionsToQueryString({\n      region: Region.Australia,\n      resizeFilter: ResizeFilter.Lanczos2,\n    }),\n    'region=australia&resize-filter=lanczos2',\n  );\n  assertThrows(() =>\n    optionsToQueryString({ region: Region.Australia, resizeFilter: 'invalid' }),\n  );\n});\n\n// Other options\nroutes.set('/image-optimizer/options/bgColor', () => {\n  // Hex strings\n  assert(\n    optionsToQueryString({\n      region: Region.Asia,\n      bgColor: '123456',\n    }),\n    'region=asia&bg-color=123456',\n  );\n  assert(\n    optionsToQueryString({\n      region: Region.Asia,\n      bgColor: 'a2345e',\n    }),\n    'region=asia&bg-color=a2345e',\n  );\n  assert(\n    optionsToQueryString({\n      region: Region.Asia,\n      bgColor: '123',\n    }),\n    'region=asia&bg-color=123',\n  );\n  assert(\n    optionsToQueryString({\n      region: Region.Asia,\n      bgColor: 'a2e',\n    }),\n    'region=asia&bg-color=a2e',\n  );\n  assertThrows(\n    () =>\n      optionsToQueryString({\n        region: Region.Asia,\n        bgColor: '12',\n      }),\n    TypeError,\n  );\n  assertThrows(\n    () =>\n      optionsToQueryString({\n        region: Region.Asia,\n        bgColor: '12j',\n      }),\n    TypeError,\n  );\n\n  // RGB(A)\n  assert(\n    optionsToQueryString({\n      region: Region.Asia,\n      bgColor: {\n        r: 255,\n        g: 0,\n        b: 128,\n      },\n    }),\n    'region=asia&bg-color=255,0,128',\n  );\n  assert(\n    optionsToQueryString({\n      region: Region.Asia,\n      bgColor: {\n        r: 255,\n        g: 0,\n        b: 128,\n        a: 0.5,\n      },\n    }),\n    'region=asia&bg-color=255,0,128,0.500000',\n  );\n  assertThrows(\n    () =>\n      optionsToQueryString({\n        region: Region.Asia,\n        bgColor: {\n          r: 12,\n          b: 12,\n        },\n      }),\n    TypeError,\n  );\n  assertThrows(\n    () =>\n      optionsToQueryString({\n        region: Region.Asia,\n        bgColor: {\n          r: 12,\n          b: 1212,\n          g: 12,\n        },\n      }),\n    TypeError,\n  );\n\n  assertThrows(\n    () =>\n      optionsToQueryString({\n        region: Region.Asia,\n        bgColor: 123123,\n      }),\n    TypeError,\n  );\n});\n\nroutes.set('/image-optimizer/options/blur', () => {\n  assert(\n    optionsToQueryString({ region: Region.Asia, blur: 0.5 }),\n    'region=asia&blur=0.500000',\n  );\n  assert(\n    optionsToQueryString({ region: Region.Asia, blur: 1000 }),\n    'region=asia&blur=1000.000000',\n  );\n  assertThrows(\n    () => optionsToQueryString({ region: Region.Asia, blur: 1001 }),\n    TypeError,\n  );\n  assertThrows(\n    () => optionsToQueryString({ region: Region.Asia, blur: 0.4 }),\n    TypeError,\n  );\n\n  assert(\n    optionsToQueryString({ region: Region.Asia, blur: '10%' }),\n    'region=asia&blur=10.000000p',\n  );\n  assert(\n    optionsToQueryString({ region: Region.Asia, blur: '0.5%' }),\n    'region=asia&blur=0.500000p',\n  );\n});\nroutes.set('/image-optimizer/options/brightness', () => {\n  assert(\n    optionsToQueryString({ region: Region.Asia, brightness: 0.5 }),\n    'region=asia&brightness=0.500000',\n  );\n  assert(\n    optionsToQueryString({ region: Region.Asia, brightness: 100 }),\n    'region=asia&brightness=100.000000',\n  );\n  assert(\n    optionsToQueryString({ region: Region.Asia, brightness: -100 }),\n    'region=asia&brightness=-100.000000',\n  );\n  assertThrows(\n    () => optionsToQueryString({ region: Region.Asia, brightness: 1001 }),\n    TypeError,\n  );\n  assertThrows(\n    () => optionsToQueryString({ region: Region.Asia, brightness: -101 }),\n    TypeError,\n  );\n});\nroutes.set('/image-optimizer/options/canvas', () => {\n  assert(\n    optionsToQueryString({\n      region: Region.Asia,\n      canvas: {\n        size: {\n          absolute: {\n            width: 100,\n            height: '10%',\n          },\n        },\n      },\n    }),\n    'region=asia&canvas=100,10.000000p',\n  );\n  assert(\n    optionsToQueryString({\n      region: Region.Asia,\n      canvas: {\n        size: {\n          ratio: {\n            width: 4,\n            height: 3,\n          },\n        },\n      },\n    }),\n    'region=asia&canvas=4.000000:3.000000',\n  );\n  assert(\n    optionsToQueryString({\n      region: Region.Asia,\n      canvas: {\n        size: {\n          absolute: {\n            width: 100,\n            height: '10%',\n          },\n        },\n        position: {\n          x: 10,\n          offsetY: 10,\n        },\n      },\n    }),\n    'region=asia&canvas=100,10.000000p,x10,offset-y10.000000',\n  );\n  assert(\n    optionsToQueryString({\n      region: Region.Asia,\n      canvas: {\n        size: {\n          ratio: {\n            width: 4,\n            height: 3,\n          },\n        },\n        position: {\n          offsetX: 10,\n          y: '10%',\n        },\n      },\n    }),\n    'region=asia&canvas=4.000000:3.000000,offset-x10.000000,y10.000000p',\n  );\n  assertThrows(\n    () =>\n      optionsToQueryString({\n        region: Region.Asia,\n        canvas: {\n          position: {\n            offsetX: 10,\n            y: '10%',\n          },\n        },\n      }),\n    TypeError,\n  );\n  assertThrows(\n    () =>\n      optionsToQueryString({\n        region: Region.Asia,\n        canvas: {\n          size: {\n            ratio: {\n              width: '4%',\n              height: 3,\n            },\n          },\n          position: {\n            offsetX: 10,\n            y: '10%',\n          },\n        },\n      }),\n    TypeError,\n  );\n  assertThrows(\n    () =>\n      optionsToQueryString({\n        region: Region.Asia,\n        canvas: {\n          size: {\n            ratio: {\n              width: '4%',\n              height: 3,\n            },\n          },\n          position: {\n            offsetX: 10,\n            x: 100,\n            y: '10%',\n          },\n        },\n      }),\n    TypeError,\n  );\n  assertThrows(\n    () =>\n      optionsToQueryString({\n        region: Region.Asia,\n        canvas: {\n          size: {\n            ratio: {\n              width: '4%',\n              height: 3,\n            },\n          },\n          position: {\n            y: '10%',\n          },\n        },\n      }),\n    TypeError,\n  );\n});\nroutes.set('/image-optimizer/options/crop', () => {\n  assert(\n    optionsToQueryString({\n      region: Region.Asia,\n      crop: {\n        size: {\n          absolute: {\n            width: 100,\n            height: '10%',\n          },\n        },\n      },\n    }),\n    'region=asia&crop=100,10.000000p',\n  );\n  assert(\n    optionsToQueryString({\n      region: Region.Asia,\n      crop: {\n        size: {\n          ratio: {\n            width: 4,\n            height: 3,\n          },\n        },\n      },\n    }),\n    'region=asia&crop=4.000000:3.000000',\n  );\n  assert(\n    optionsToQueryString({\n      region: Region.Asia,\n      crop: {\n        size: {\n          absolute: {\n            width: 100,\n            height: '10%',\n          },\n        },\n        position: {\n          x: 10,\n          offsetY: 10,\n        },\n      },\n    }),\n    'region=asia&crop=100,10.000000p,x10,offset-y10.000000',\n  );\n  assert(\n    optionsToQueryString({\n      region: Region.Asia,\n      crop: {\n        size: {\n          ratio: {\n            width: 4,\n            height: 3,\n          },\n        },\n        position: {\n          offsetX: 10,\n          y: '10%',\n        },\n      },\n    }),\n    'region=asia&crop=4.000000:3.000000,offset-x10.000000,y10.000000p',\n  );\n  assert(\n    optionsToQueryString({\n      region: Region.Asia,\n      crop: {\n        size: {\n          ratio: {\n            width: 4,\n            height: 3,\n          },\n        },\n        position: {\n          offsetX: 10,\n          y: '10%',\n        },\n        mode: CropMode.Safe,\n      },\n    }),\n    'region=asia&crop=4.000000:3.000000,offset-x10.000000,y10.000000p,safe',\n  );\n  assertThrows(\n    () =>\n      optionsToQueryString({\n        region: Region.Asia,\n        crop: {\n          position: {\n            offsetX: 10,\n            y: '10%',\n          },\n        },\n      }),\n    TypeError,\n  );\n  assertThrows(\n    () =>\n      optionsToQueryString({\n        region: Region.Asia,\n        crop: {\n          size: {\n            ratio: {\n              width: '4%',\n              height: 3,\n            },\n          },\n          position: {\n            offsetX: 10,\n            y: '10%',\n          },\n        },\n      }),\n    TypeError,\n  );\n  assertThrows(\n    () =>\n      optionsToQueryString({\n        region: Region.Asia,\n        crop: {\n          size: {\n            ratio: {\n              width: '4%',\n              height: 3,\n            },\n          },\n          position: {\n            offsetX: 10,\n            x: 100,\n            y: '10%',\n          },\n        },\n      }),\n    TypeError,\n  );\n  assertThrows(\n    () =>\n      optionsToQueryString({\n        region: Region.Asia,\n        crop: {\n          size: {\n            ratio: {\n              width: '4%',\n              height: 3,\n            },\n          },\n          position: {\n            y: '10%',\n          },\n        },\n      }),\n    TypeError,\n  );\n  assertThrows(\n    () =>\n      optionsToQueryString({\n        region: Region.Asia,\n        crop: {\n          size: {\n            ratio: {\n              width: 4,\n              height: 3,\n            },\n          },\n          position: {\n            offsetX: 10,\n            y: '10%',\n          },\n          mode: 'invalid',\n        },\n      }),\n    TypeError,\n  );\n});\nroutes.set('/image-optimizer/options/precrop', () => {\n  assert(\n    optionsToQueryString({\n      region: Region.Asia,\n      precrop: {\n        size: {\n          absolute: {\n            width: 100,\n            height: '10%',\n          },\n        },\n      },\n    }),\n    'region=asia&precrop=100,10.000000p',\n  );\n  assert(\n    optionsToQueryString({\n      region: Region.Asia,\n      precrop: {\n        size: {\n          ratio: {\n            width: 4,\n            height: 3,\n          },\n        },\n      },\n    }),\n    'region=asia&precrop=4.000000:3.000000',\n  );\n  assert(\n    optionsToQueryString({\n      region: Region.Asia,\n      precrop: {\n        size: {\n          absolute: {\n            width: 100,\n            height: '10%',\n          },\n        },\n        position: {\n          x: 10,\n          offsetY: 10,\n        },\n      },\n    }),\n    'region=asia&precrop=100,10.000000p,x10,offset-y10.000000',\n  );\n  assert(\n    optionsToQueryString({\n      region: Region.Asia,\n      precrop: {\n        size: {\n          ratio: {\n            width: 4,\n            height: 3,\n          },\n        },\n        position: {\n          offsetX: 10,\n          y: '10%',\n        },\n      },\n    }),\n    'region=asia&precrop=4.000000:3.000000,offset-x10.000000,y10.000000p',\n  );\n  assert(\n    optionsToQueryString({\n      region: Region.Asia,\n      precrop: {\n        size: {\n          ratio: {\n            width: 4,\n            height: 3,\n          },\n        },\n        position: {\n          offsetX: 10,\n          y: '10%',\n        },\n        mode: CropMode.Safe,\n      },\n    }),\n    'region=asia&precrop=4.000000:3.000000,offset-x10.000000,y10.000000p,safe',\n  );\n  assertThrows(\n    () =>\n      optionsToQueryString({\n        region: Region.Asia,\n        precrop: {\n          position: {\n            offsetX: 10,\n            y: '10%',\n          },\n        },\n      }),\n    TypeError,\n  );\n  assertThrows(\n    () =>\n      optionsToQueryString({\n        region: Region.Asia,\n        precrop: {\n          size: {\n            ratio: {\n              width: '4%',\n              height: 3,\n            },\n          },\n          position: {\n            offsetX: 10,\n            y: '10%',\n          },\n        },\n      }),\n    TypeError,\n  );\n  assertThrows(\n    () =>\n      optionsToQueryString({\n        region: Region.Asia,\n        precrop: {\n          size: {\n            ratio: {\n              width: '4%',\n              height: 3,\n            },\n          },\n          position: {\n            offsetX: 10,\n            x: 100,\n            y: '10%',\n          },\n        },\n      }),\n    TypeError,\n  );\n  assertThrows(\n    () =>\n      optionsToQueryString({\n        region: Region.Asia,\n        precrop: {\n          size: {\n            ratio: {\n              width: '4%',\n              height: 3,\n            },\n          },\n          position: {\n            y: '10%',\n          },\n        },\n      }),\n    TypeError,\n  );\n  assertThrows(\n    () =>\n      optionsToQueryString({\n        region: Region.Asia,\n        precrop: {\n          size: {\n            ratio: {\n              width: 4,\n              height: 3,\n            },\n          },\n          position: {\n            offsetX: 10,\n            y: '10%',\n          },\n          mode: 'invalid',\n        },\n      }),\n    TypeError,\n  );\n});\nroutes.set('/image-optimizer/options/dpr', () => {\n  assert(\n    optionsToQueryString({ region: Region.Asia, dpr: 1.5 }),\n    'region=asia&dpr=1.500000',\n  );\n  assert(\n    optionsToQueryString({ region: Region.Asia, dpr: 10 }),\n    'region=asia&dpr=10.000000',\n  );\n  assertThrows(\n    () => optionsToQueryString({ region: Region.Asia, dpr: '1001' }),\n    TypeError,\n  );\n  assertThrows(\n    () => optionsToQueryString({ region: Region.Asia, dpr: 1001 }),\n    TypeError,\n  );\n  assertThrows(\n    () => optionsToQueryString({ region: Region.Asia, dpr: 0.5 }),\n    TypeError,\n  );\n});\nroutes.set('/image-optimizer/options/frame', () => {\n  assert(\n    optionsToQueryString({ region: Region.Asia, frame: 1 }),\n    'region=asia&frame=1',\n  );\n  assertThrows(\n    () => optionsToQueryString({ region: Region.Asia, frame: 2 }),\n    TypeError,\n  );\n});\nroutes.set('/image-optimizer/options/height', () => {\n  assert(\n    optionsToQueryString({ region: Region.Asia, height: 1000 }),\n    'region=asia&height=1000',\n  );\n  assert(\n    optionsToQueryString({ region: Region.Asia, height: '10%' }),\n    'region=asia&height=10.000000p',\n  );\n  assertThrows(\n    () => optionsToQueryString({ region: Region.Asia, height: '1001' }),\n    TypeError,\n  );\n  assertThrows(\n    () => optionsToQueryString({ region: Region.Asia, height: 100.5 }),\n    TypeError,\n  );\n});\nroutes.set('/image-optimizer/options/level', () => {\n  assert(\n    optionsToQueryString({ region: Region.Asia, level: '1.1' }),\n    'region=asia&level=1.1',\n  );\n  assert(\n    optionsToQueryString({ region: Region.Asia, level: '5.1' }),\n    'region=asia&level=5.1',\n  );\n  assertThrows(\n    () => optionsToQueryString({ region: Region.Asia, level: 5.1 }),\n    TypeError,\n  );\n  assertThrows(\n    () => optionsToQueryString({ region: Region.Asia, level: '7.1' }),\n    TypeError,\n  );\n});\nroutes.set('/image-optimizer/options/pad', () => {\n  assert(\n    optionsToQueryString({\n      region: Region.Asia,\n      pad: {\n        top: 10,\n        bottom: 20,\n        left: '10%',\n        right: '20%',\n      },\n    }),\n    'region=asia&pad=10,20.000000p,20,10.000000p',\n  );\n  assertThrows(\n    () =>\n      optionsToQueryString({\n        region: Region.Asia,\n        pad: {\n          top: 10,\n          bottom: 20,\n          left: '10',\n          right: '20%',\n        },\n      }),\n    TypeError,\n  );\n  assertThrows(\n    () =>\n      optionsToQueryString({\n        region: Region.Asia,\n        pad: {\n          top: 10,\n          left: '10',\n          right: '20%',\n        },\n      }),\n    TypeError,\n  );\n});\nroutes.set('/image-optimizer/options/quality', () => {\n  assert(\n    optionsToQueryString({ region: Region.Asia, quality: 1 }),\n    'region=asia&quality=1',\n  );\n  assert(\n    optionsToQueryString({ region: Region.Asia, quality: 100 }),\n    'region=asia&quality=100',\n  );\n  assertThrows(\n    () => optionsToQueryString({ region: Region.Asia, quality: 1001 }),\n    TypeError,\n  );\n  assertThrows(\n    () => optionsToQueryString({ region: Region.Asia, quality: 1.5 }),\n    TypeError,\n  );\n  assertThrows(\n    () => optionsToQueryString({ region: Region.Asia, quality: 0.4 }),\n    TypeError,\n  );\n});\nroutes.set('/image-optimizer/options/saturation', () => {\n  assert(\n    optionsToQueryString({ region: Region.Asia, saturation: 1 }),\n    'region=asia&saturation=1.000000',\n  );\n  assert(\n    optionsToQueryString({ region: Region.Asia, saturation: 100 }),\n    'region=asia&saturation=100.000000',\n  );\n  assert(\n    optionsToQueryString({ region: Region.Asia, saturation: -100 }),\n    'region=asia&saturation=-100.000000',\n  );\n  assertThrows(\n    () => optionsToQueryString({ region: Region.Asia, saturation: 1001 }),\n    TypeError,\n  );\n  assertThrows(\n    () => optionsToQueryString({ region: Region.Asia, saturation: -101 }),\n    TypeError,\n  );\n});\nroutes.set('/image-optimizer/options/sharpen', () => {\n  assert(\n    optionsToQueryString({\n      region: Region.Asia,\n      sharpen: {\n        amount: 10,\n        radius: 10,\n        threshold: 1,\n      },\n    }),\n    'region=asia&sharpen=a10.000000,r10.000000,t1',\n  );\n  assert(\n    optionsToQueryString({\n      region: Region.Asia,\n      sharpen: {\n        amount: 0.1,\n        radius: 0.5,\n        threshold: 255,\n      },\n    }),\n    'region=asia&sharpen=a0.100000,r0.500000,t255',\n  );\n  assertThrows(() => {\n    optionsToQueryString({\n      region: Region.Asia,\n      sharpen: {\n        amount: 0.1,\n        radius: 0.5,\n        threshold: 256,\n      },\n    });\n  }, TypeError);\n  assertThrows(() => {\n    optionsToQueryString({\n      region: Region.Asia,\n      sharpen: {\n        amount: 0.1,\n        radius: 0.4,\n        threshold: 255,\n      },\n    });\n  }, TypeError);\n  assertThrows(() => {\n    optionsToQueryString({\n      region: Region.Asia,\n      sharpen: {\n        amount: -1,\n        radius: 0.5,\n        threshold: 255,\n      },\n    });\n  }, TypeError);\n  assertThrows(() => {\n    optionsToQueryString({\n      region: Region.Asia,\n      sharpen: {\n        amount: 1,\n        radius: 1,\n      },\n    });\n  }, TypeError);\n});\nroutes.set('/image-optimizer/options/trim', () => {\n  assert(\n    optionsToQueryString({\n      region: Region.Asia,\n      trim: {\n        top: 10,\n        bottom: 20,\n        left: '10%',\n        right: '20%',\n      },\n    }),\n    'region=asia&trim=10,20.000000p,20,10.000000p',\n  );\n  assertThrows(\n    () =>\n      optionsToQueryString({\n        region: Region.Asia,\n        trim: {\n          top: 10,\n          bottom: 20,\n          left: '10',\n          right: '20%',\n        },\n      }),\n    TypeError,\n  );\n  assertThrows(\n    () =>\n      optionsToQueryString({\n        region: Region.Asia,\n        trim: {\n          top: 10,\n          left: '10',\n          right: '20%',\n        },\n      }),\n    TypeError,\n  );\n});\nroutes.set('/image-optimizer/options/viewbox', () => {\n  assert(\n    optionsToQueryString({ region: Region.Asia, viewbox: 1 }),\n    'region=asia&viewbox=1',\n  );\n  assertThrows(\n    () => optionsToQueryString({ region: Region.Asia, viewbox: 2 }),\n    TypeError,\n  );\n});\nroutes.set('/image-optimizer/options/width', () => {\n  assert(\n    optionsToQueryString({ region: Region.Asia, width: 1000 }),\n    'region=asia&width=1000',\n  );\n  assert(\n    optionsToQueryString({ region: Region.Asia, width: '10%' }),\n    'region=asia&width=10.000000p',\n  );\n  assertThrows(\n    () => optionsToQueryString({ region: Region.Asia, width: '1001' }),\n    TypeError,\n  );\n  assertThrows(\n    () => optionsToQueryString({ region: Region.Asia, width: 100.5 }),\n    TypeError,\n  );\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/include-bytes.js",
    "content": "import { routes } from './routes.js';\nimport { assert } from './assertions.js';\nimport { includeBytes } from 'fastly:experimental';\n\nlet message;\ntry {\n  message = includeBytes('message.txt');\n} catch {}\n\nconst expected = [\n  104, 101, 108, 108, 111, 32, 105, 110, 99, 108, 117, 100, 101, 66, 121, 116,\n  101, 115, 10,\n];\n\nroutes.set('/includeBytes', () => {\n  assert(Array.from(message), expected, `message === expected`);\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/index.js",
    "content": "/// <reference path=\"../../../../../types/index.d.ts\" />\n/* eslint-env serviceworker */\n\nimport { routes } from './routes.js';\nimport { env } from 'fastly:env';\nimport { enableDebugLogging } from 'fastly:experimental';\n\nimport './async-select.js';\nimport './btoa.js';\nimport './byob.js';\nimport './byte-repeater.js';\nimport './cache-override.js';\nimport './cache-core.js';\nimport './cache-simple.js';\nimport './client.js';\nimport './compute.js';\nimport './config-store.js';\nimport './crypto.js';\nimport './device.js';\nimport './dictionary.js';\nimport './early-hints.js';\nimport './edge-rate-limiter.js';\nimport './env.js';\nimport './fanout.js';\nimport './websocket.js';\nimport './fastly-global.js';\nimport './fetch-errors.js';\nimport './geoip.js';\nimport './headers.js';\nimport './html-rewriter.js';\nimport './include-bytes.js';\nimport './image-optimizer.js';\nimport './logger.js';\nimport './manual-framing-headers.js';\nimport './missing-backend.js';\nimport './multiple-set-cookie.js';\nimport './performance.js';\nimport './proxy-transform-stream.js';\nimport './random.js';\nimport './react-byob.js';\nimport './request-auto-decompress.js';\nimport './request-body-async-simple.js';\nimport './request-cache-key.js';\nimport './request-clone.js';\nimport './request-headers.js';\nimport './request-method.js';\nimport './response-json.js';\nimport './response-redirect.js';\nimport './response.js';\nimport './secret-store.js';\nimport './security.js';\nimport './server.js';\nimport './shielding.js';\nimport './tee.js';\nimport './timers.js';\nimport './urlsearchparams.js';\n\naddEventListener('fetch', (event) => {\n  event.respondWith(app(event));\n});\n\nif (env('FASTLY_DEBUG_LOGGING') === '1') {\n  if (fastly.debugMessages) {\n    const { debug: consoleDebug } = console;\n    console.debug = function debug(...args) {\n      fastly.debugLog(...args);\n      consoleDebug(...args);\n    };\n  }\n  enableDebugLogging(true);\n}\n\n/**\n * @param {FetchEvent} event\n * @returns {Response}\n */\nasync function app(event) {\n  const FASTLY_SERVICE_VERSION = env('FASTLY_SERVICE_VERSION') || 'local';\n  console.log(`FASTLY_SERVICE_VERSION: ${FASTLY_SERVICE_VERSION}`);\n  const path = new URL(event.request.url).pathname;\n  console.log(`path: ${path}`);\n  let res;\n  try {\n    const routeHandler = routes.get(path);\n    if (routeHandler) {\n      res = (await routeHandler(event)) || new Response('ok');\n    } else {\n      try {\n        return (res = new Response(`${path} endpoint does not exist`, {\n          status: 500,\n        }));\n      } catch (errRes) {\n        res = errRes;\n      }\n    }\n  } catch (error) {\n    if (error instanceof Response) {\n      res = error;\n    } else {\n      try {\n        return (res = new Response(\n          `The routeHandler for ${path} threw a [${error.constructor?.name ?? error.name}] error: ${error.message || error}` +\n            '\\n' +\n            error.stack +\n            (fastly.debugMessages\n              ? '\\n[DEBUG BUILD MESSAGES]:\\n\\n  - ' +\n                fastly.debugMessages.join('\\n  - ')\n              : ''),\n          { status: 500 },\n        ));\n      } catch (errRes) {\n        res = errRes;\n      }\n    }\n  } finally {\n    res.headers.set('fastly_service_version', FASTLY_SERVICE_VERSION);\n  }\n\n  return res;\n}\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/logger.js",
    "content": "import { Logger, configureConsole } from 'fastly:logger';\nimport { routes, isRunningLocally } from './routes';\n\nconfigureConsole({ prefixing: false, stderr: true });\n\nconst earlyLogger = new Logger('AnotherLog');\n\nroutes.set('/logger', () => {\n  if (isRunningLocally()) {\n    let logger = new Logger('ComputeLog');\n    logger.log('Hello!');\n    earlyLogger.log('World!');\n  }\n\n  console.log('LOG');\n  console.error('ERROR');\n\n  return new Response();\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/manual-framing-headers.js",
    "content": "/// <reference path=\"../../../../../types/index.d.ts\" />\n/* eslint-env serviceworker */\n\nimport { CacheOverride } from 'fastly:cache-override';\nimport { assert, assertRejects } from './assertions.js';\nimport { routes, isRunningLocally } from './routes.js';\n\nasync function requestInitObjectLiteral(manualFramingHeaders) {\n  let request = new Request('https://http-me.fastly.dev/anything', {\n    backend: 'httpme',\n    method: 'POST',\n    body: 'meow',\n    manualFramingHeaders,\n    headers: {\n      'content-length': '1',\n    },\n  });\n  let response = await fetch(request);\n  let body = await response.json();\n  return body?.headers?.['content-length'];\n}\n\nasync function requestMethod(manualFramingHeaders) {\n  let request = new Request('https://http-me.fastly.dev/anything', {\n    backend: 'httpme',\n    method: 'POST',\n    body: 'meow',\n    headers: {\n      'content-length': '1',\n    },\n  });\n  request.setManualFramingHeaders(manualFramingHeaders);\n  let response = await fetch(request);\n  let body = await response.json();\n  return body?.headers?.['content-length'];\n}\n\nasync function requestClone(manualFramingHeaders) {\n  let request = new Request('https://http-me.fastly.dev/anything', {\n    backend: 'httpme',\n    method: 'POST',\n    body: 'meow',\n    manualFramingHeaders,\n    headers: {\n      'content-length': '1',\n    },\n  });\n  let response = await fetch(request.clone());\n  let body = await response.json();\n  return body?.headers?.['content-length'];\n}\n\nasync function fetchInitObjectLiteral(manualFramingHeaders) {\n  let response = await fetch('https://http-me.fastly.dev/anything', {\n    backend: 'httpme',\n    method: 'POST',\n    body: 'meow',\n    manualFramingHeaders,\n    headers: {\n      'content-length': '1',\n    },\n  });\n  let body = await response.json();\n  return body?.headers?.['content-length'];\n}\n\nroutes.set(\n  '/override-content-length/request/init/object-literal/true',\n  async () => {\n    if (isRunningLocally()) {\n      await assertRejects(() => requestInitObjectLiteral(true));\n    } else {\n      let actual = await requestInitObjectLiteral(true);\n      let expected = '1';\n      assert(actual, expected, `await requestInitObjectLiteral(true)`);\n    }\n  },\n);\n\nroutes.set(\n  '/override-content-length/request/init/object-literal/false',\n  async () => {\n    let actual = await requestInitObjectLiteral(false);\n    let expected = '4';\n    assert(actual, expected, `await requestInitObjectLiteral(false)`);\n  },\n);\n\nroutes.set(\n  '/override-content-length/request/method/object-literal/true',\n  async () => {\n    if (isRunningLocally()) {\n      await assertRejects(() => requestMethod(true));\n    } else {\n      let actual = await requestMethod(true);\n      let expected = '1';\n      assert(actual, expected, `await requestMethod(true)`);\n    }\n  },\n);\n\nroutes.set(\n  '/override-content-length/request/method/object-literal/false',\n  async () => {\n    let actual = await requestMethod(false);\n    let expected = '4';\n    assert(actual, expected, `await requestMethod(false)`);\n  },\n);\n\nroutes.set('/override-content-length/request/clone/true', async () => {\n  if (isRunningLocally()) {\n    await assertRejects(() => requestClone(true));\n  } else {\n    let actual = await requestClone(true);\n    let expected = '1';\n    assert(actual, expected, `await requestClone(true)`);\n  }\n});\n\nroutes.set('/override-content-length/request/clone/false', async () => {\n  let actual = await requestClone(false);\n  let expected = '4';\n  assert(actual, expected, `await requestClone(false)`);\n});\n\nroutes.set(\n  '/override-content-length/fetch/init/object-literal/true',\n  async () => {\n    if (isRunningLocally()) {\n      await assertRejects(() => fetchInitObjectLiteral(true));\n    } else {\n      let actual = await fetchInitObjectLiteral(true);\n      let expected = '1';\n      assert(actual, expected, `await fetchInitObjectLiteral(true)`);\n    }\n  },\n);\n\nroutes.set(\n  '/override-content-length/fetch/init/object-literal/false',\n  async () => {\n    let actual = await fetchInitObjectLiteral(false);\n    let expected = '4';\n    assert(actual, expected, `await fetchInitObjectLiteral(false)`);\n  },\n);\n\nasync function responseInitObjectLiteral(manualFramingHeaders) {\n  let response = new Response(\n    new ReadableStream({\n      start(controller) {\n        controller.enqueue(new TextEncoder().encode('meow'));\n        controller.close();\n      },\n    }),\n    {\n      manualFramingHeaders,\n      headers: {\n        'content-length': '4',\n      },\n    },\n  );\n  return response;\n}\n\nasync function responseInitresponseInstance(manualFramingHeaders) {\n  let response = new Response(\n    new ReadableStream({\n      start(controller) {\n        controller.enqueue(new TextEncoder().encode('meow'));\n        controller.close();\n      },\n    }),\n    {\n      manualFramingHeaders,\n      headers: {\n        'content-length': '4',\n      },\n    },\n  );\n  response = new Response(\n    new ReadableStream({\n      start(controller) {\n        controller.enqueue(new TextEncoder().encode('meow'));\n        controller.close();\n      },\n    }),\n    response,\n  );\n  return response;\n}\n\nroutes.set(\n  '/override-content-length/response/init/object-literal/true',\n  async () => {\n    return responseInitObjectLiteral(true);\n  },\n);\n\nroutes.set(\n  '/override-content-length/response/init/object-literal/false',\n  async () => {\n    return responseInitObjectLiteral(false);\n  },\n);\n\nroutes.set(\n  '/override-content-length/response/init/response-instance/true',\n  async () => {\n    return responseInitresponseInstance(true);\n  },\n);\n\nroutes.set(\n  '/override-content-length/response/init/response-instance/false',\n  async () => {\n    return responseInitresponseInstance(false);\n  },\n);\n\nasync function responseMethod(setManualFramingHeaders) {\n  const response = await fetch('https://http-me.fastly.dev/drip=11', {\n    backend: 'httpme',\n    cacheOverride: new CacheOverride('pass'),\n  });\n  response.setManualFramingHeaders(setManualFramingHeaders);\n  response.headers.set('content-length', '11');\n  response.headers.delete('transfer-encoding');\n  return response;\n}\n\nroutes.set('/override-content-length/response/method/false', async () => {\n  return responseMethod(false);\n});\n\nroutes.set('/override-content-length/response/method/true', async () => {\n  return responseMethod(true);\n});\n\nasync function responseClone(setManualFramingHeaders) {\n  let response = new Response('meow', {\n    backend: 'httpme',\n    method: 'POST',\n    body: 'meow',\n    setManualFramingHeaders,\n    headers: {\n      'transfer-encoding': 'chunked',\n    },\n  });\n  response = response.clone();\n  return response;\n}\n\n// TODO: implement Response.clone\nroutes.set('/override-content-length/response/clone/true', async () => {\n  return responseClone(true);\n});\n\n// TODO: implement Response.clone\nroutes.set('/override-content-length/response/clone/false', async () => {\n  return responseClone(false);\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/missing-backend.js",
    "content": "import { assertRejects } from './assertions.js';\nimport { routes } from './routes.js';\n\nroutes.set('/missing-backend', async () => {\n  await assertRejects(\n    async () => fetch('https://example.com', { backend: 'missing' }),\n    TypeError,\n    `Requested backend named 'missing' does not exist`,\n  );\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/multiple-set-cookie.js",
    "content": "import { routes } from './routes.js';\n\nroutes.set('/multiple-set-cookie/response-init', async () => {\n  let h = new Headers();\n\n  h.append(\n    'Set-Cookie',\n    'test=1; expires=Tue, 06-Dec-2022 12:34:56 GMT; Max-Age=60; Path=/; HttpOnly; Secure, test_id=1; Max-Age=60; Path=/; expires=Tue, 06-Dec-2022 12:34:56 GMT, test_id=1; Max-Age=60; Path=/; expires=Tue, 06-Dec-2022 12:34:56 GMT',\n  );\n  h.append('Set-Cookie', 'test2=2');\n  h.append('Set-Cookie', 'test3=3');\n  h.append('Set-Cookie', 'test4=4');\n  h.append('Set-Cookie', 'test5=5');\n  h.append('Set-Cookie', 'test6=6');\n  h.append('Set-Cookie', 'test7=7');\n  h.append('Set-Cookie', 'test8=8');\n  h.append('Set-Cookie', 'test9=9');\n  h.append('Set-Cookie', 'test10=10');\n  h.append('Set-Cookie', 'test11=11');\n  let r = new Response('Hello', {\n    headers: h,\n  });\n  return r;\n});\nroutes.set('/multiple-set-cookie/response-direct', async () => {\n  let r = new Response('Hello');\n\n  r.headers.append(\n    'Set-Cookie',\n    'test=1; expires=Tue, 06-Dec-2022 12:34:56 GMT; Max-Age=60; Path=/; HttpOnly; Secure, test_id=1; Max-Age=60; Path=/; expires=Tue, 06-Dec-2022 12:34:56 GMT, test_id=1; Max-Age=60; Path=/; expires=Tue, 06-Dec-2022 12:34:56 GMT',\n  );\n  r.headers.append('Set-Cookie', 'test2=2');\n  r.headers.append('Set-Cookie', 'test3=3');\n  r.headers.append('Set-Cookie', 'test4=4');\n  r.headers.append('Set-Cookie', 'test5=5');\n  r.headers.append('Set-Cookie', 'test6=6');\n  r.headers.append('Set-Cookie', 'test7=7');\n  r.headers.append('Set-Cookie', 'test8=8');\n  r.headers.append('Set-Cookie', 'test9=9');\n  r.headers.append('Set-Cookie', 'test10=10');\n  r.headers.append('Set-Cookie', 'test11=11');\n  return r;\n});\nroutes.set('/multiple-set-cookie/downstream', async () => {\n  let response = await fetch(\n    'https://http-me.fastly.dev/append-header=Set-Cookie:test1=1/append-header=Set-Cookie:test2=2/append-header=Set-Cookie:test3=3/anything',\n    {\n      backend: 'httpme',\n    },\n  );\n\n  return new Response('', response);\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/performance.js",
    "content": "/* eslint-env serviceworker */\nimport { routes } from './routes.js';\nimport { assert, assertThrows } from './assertions.js';\n\nroutes.set('/Performance/interface', () => {\n  let actual = Reflect.ownKeys(Performance);\n  let expected = ['prototype', 'length', 'name'];\n  assert(actual, expected, `Reflect.ownKeys(Performance)`);\n\n  // Check the prototype descriptors are correct\n  {\n    actual = Reflect.getOwnPropertyDescriptor(Performance, 'prototype');\n    expected = {\n      value: Performance.prototype,\n      writable: false,\n      enumerable: false,\n      configurable: false,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(Performance, 'prototype')`,\n    );\n  }\n\n  // Check the constructor function's defined parameter length is correct\n  {\n    actual = Reflect.getOwnPropertyDescriptor(Performance, 'length');\n    expected = {\n      value: 0,\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(Performance, 'length')`,\n    );\n  }\n\n  // Check the constructor function's name is correct\n  {\n    actual = Reflect.getOwnPropertyDescriptor(Performance, 'name');\n    expected = {\n      value: 'Performance',\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(Performance, 'name')`,\n    );\n  }\n\n  // Check the prototype has the correct keys\n  {\n    actual = Reflect.ownKeys(Performance.prototype);\n    expected = ['constructor', 'timeOrigin', 'now', Symbol.toStringTag];\n    assert(actual, expected, `Reflect.ownKeys(Performance.prototype)`);\n  }\n\n  // Check the constructor on the prototype is correct\n  {\n    actual = Reflect.getOwnPropertyDescriptor(\n      Performance.prototype,\n      'constructor',\n    );\n    expected = {\n      writable: true,\n      enumerable: false,\n      configurable: true,\n      value: Performance.prototype.constructor,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(Performance.prototype, 'constructor')`,\n    );\n\n    assert(\n      typeof Performance.prototype.constructor,\n      'function',\n      `typeof Performance.prototype.constructor`,\n    );\n\n    actual = Reflect.getOwnPropertyDescriptor(\n      Performance.prototype.constructor,\n      'length',\n    );\n    expected = {\n      value: 0,\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(Performance.prototype.constructor, 'length')`,\n    );\n\n    actual = Reflect.getOwnPropertyDescriptor(\n      Performance.prototype.constructor,\n      'name',\n    );\n    expected = {\n      value: 'Performance',\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(Performance.prototype.constructor, 'name')`,\n    );\n  }\n\n  // Check the Symbol.toStringTag on the prototype is correct\n  {\n    actual = Reflect.getOwnPropertyDescriptor(\n      Performance.prototype,\n      Symbol.toStringTag,\n    );\n    expected = {\n      value: 'performance',\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(Performance.prototype, [Symbol.toStringTag])`,\n    );\n\n    assert(\n      typeof Performance.prototype[Symbol.toStringTag],\n      'string',\n      `typeof Performance.prototype[Symbol.toStringTag]`,\n    );\n  }\n\n  // Check the timeOrigin property is correct\n  {\n    const descriptors = Reflect.getOwnPropertyDescriptor(\n      Performance.prototype,\n      'timeOrigin',\n    );\n    expected = { enumerable: true, configurable: true };\n    assert(\n      descriptors.enumerable,\n      true,\n      `Reflect.getOwnPropertyDescriptor(Performance, 'timeOrigin').enumerable`,\n    );\n    assert(\n      descriptors.configurable,\n      true,\n      `Reflect.getOwnPropertyDescriptor(Performance, 'timeOrigin').configurable`,\n    );\n    assert(\n      descriptors.value,\n      undefined,\n      `Reflect.getOwnPropertyDescriptor(Performance, 'timeOrigin').value`,\n    );\n    assert(\n      descriptors.set,\n      undefined,\n      `Reflect.getOwnPropertyDescriptor(Performance, 'timeOrigin').set`,\n    );\n    assert(\n      typeof descriptors.get,\n      'function',\n      `typeof Reflect.getOwnPropertyDescriptor(Performance, 'timeOrigin').get`,\n    );\n\n    assert(\n      typeof Performance.prototype.timeOrigin,\n      'number',\n      `typeof Performance.prototype.timeOrigin`,\n    );\n  }\n\n  // Check the now property is correct\n  {\n    actual = Reflect.getOwnPropertyDescriptor(Performance.prototype, 'now');\n    expected = {\n      writable: true,\n      enumerable: true,\n      configurable: true,\n      value: Performance.prototype.now,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(Performance, 'now')`,\n    );\n\n    assert(\n      typeof Performance.prototype.now,\n      'function',\n      `typeof Performance.prototype.now`,\n    );\n\n    actual = Reflect.getOwnPropertyDescriptor(\n      Performance.prototype.now,\n      'length',\n    );\n    expected = {\n      value: 0,\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(Performance.prototype.now, 'length')`,\n    );\n\n    actual = Reflect.getOwnPropertyDescriptor(\n      Performance.prototype.now,\n      'name',\n    );\n    expected = {\n      value: 'now',\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(Performance.prototype.now, 'name')`,\n    );\n  }\n});\n\nroutes.set('/globalThis.performance', () => {\n  assert(\n    globalThis.performance instanceof Performance,\n    true,\n    `globalThis.performance instanceof Performance`,\n  );\n});\n\nroutes.set('/globalThis.performance/now', () => {\n  assertThrows(() => new performance.now());\n\n  assert(typeof performance.now(), 'number');\n\n  assert(performance.now() > 0, true);\n\n  assert(Number.isNaN(performance.now()), false);\n\n  assert(Number.isFinite(performance.now()), true);\n\n  assert(performance.now() < Date.now(), true);\n});\n\nroutes.set('/globalThis.performance/timeOrigin', () => {\n  assert(typeof performance.timeOrigin, 'number');\n\n  assert(performance.timeOrigin > 0, true);\n\n  assert(Number.isNaN(performance.timeOrigin), false);\n\n  assert(Number.isFinite(performance.timeOrigin), true);\n\n  assert(performance.timeOrigin < Date.now(), true);\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/proxy-transform-stream.js",
    "content": "/* eslint-env serviceworker */\n\n// These are tests for the dreaded proxy transform stream optimization: https://github.com/fastly/js-compute-runtime/issues/1260\n\nimport { assert, assertThrows } from './assertions.js';\nimport { routes } from './routes.js';\n\nroutes.set('/proxy-transform-stream/content-length', async (event) => {\n  let request = new Request(\n    'https://http-me.fastly.dev/anything',\n    event.request,\n  );\n  let proxy = new Request(request);\n  const response = await fetch(proxy);\n  assert(response.status, 200, 'status == 200');\n  assert(\n    (await response.json()).headers['content-length'],\n    '11',\n    'headers[\"content-length\"] == 11',\n  );\n  return new Response('ok');\n});\n\nroutes.set(\n  '/proxy-transform-stream/simple-response-body-chain',\n  async (event) => {\n    const res = new Response('body');\n    return new Response(res.body, res);\n  },\n);\n\nroutes.set(\n  '/proxy-transform-stream/multi-response-body-chain',\n  async (event) => {\n    let res = new Response('body');\n    res = new Response(res.body, res);\n    res = new Response(res.body, res);\n    return res;\n  },\n);\n\nroutes.set('/proxy-transform-stream/response-body-into-js', async (event) => {\n  let res = new Response('body');\n  const body = await res.text();\n  return new Response(body, res);\n});\n\nroutes.set('/proxy-transform-stream/framing', async (event) => {\n  const newUrl = new URL('https://http-me.fastly.dev/anything');\n  let req = new Request(newUrl, {\n    headers: event.request.headers,\n    body: event.request.body,\n    method: event.request.method,\n  });\n  req = new Request(req.url, {\n    headers: req.headers,\n    body: req.body,\n    method: req.method,\n  });\n  req = new Request(req.url, {\n    headers: req.headers,\n    body: req.body,\n    method: req.method,\n  });\n  const cacheOverride = new CacheOverride('pass');\n  const res = await fetch(req, {\n    backend: 'httpme',\n    cacheOverride,\n  });\n  let json = await res.json();\n  assert(res.status, 200, 'Status should be 200');\n  assert(\n    json['headers']['content-length'],\n    '11',\n    'Content-Length header should be 11',\n  );\n  return new Response('ok');\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/random.js",
    "content": "/* eslint-env serviceworker */\nimport { routes } from './routes.js';\nimport { assert } from './assertions.js';\n\nfunction random3Decimals() {\n  return String(Math.random()).slice(0, 5);\n}\n\nlet a = random3Decimals();\nlet b = random3Decimals();\n\n// This tests can fail sporadically as it is testing randomness.\n// If it fails, rerun the tests and it should pass, if it does not\n// then we may have another bug with how we are seeding the random\n// number generator in SpiderMonkey.\nroutes.set('/random', () => {\n  assert(\n    a !== b,\n    true,\n    'The first 4 digits were repeated in sequential calls to Math.random() during wizening\\n\\n' +\n      JSON.stringify({ a, b }, undefined, 4),\n  );\n\n  let c = random3Decimals();\n  let d = random3Decimals();\n  assert(\n    c !== d,\n    true,\n    'The first 4 digits were repeated in sequential calls to Math.random() during request handling\\n\\n' +\n      JSON.stringify({ c, d }, undefined, 4),\n  );\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/react-byob.js",
    "content": "/* eslint-env serviceworker */\nimport { routes } from './routes.js';\n// React\nvar React = {};\n{\n  /**\n   * @license React\n   * react.production.min.js\n   *\n   * Copyright (c) Facebook, Inc. and its affiliates.\n   *\n   * This source code is licensed under the MIT license found in the\n   * LICENSE file in the root directory of this source tree.\n   */\n  let exports = React;\n  let l = Symbol.for('react.element'),\n    n = Symbol.for('react.portal'),\n    p = Symbol.for('react.fragment'),\n    q = Symbol.for('react.strict_mode'),\n    r = Symbol.for('react.profiler'),\n    t = Symbol.for('react.provider'),\n    u = Symbol.for('react.context'),\n    v = Symbol.for('react.forward_ref'),\n    w = Symbol.for('react.suspense'),\n    x = Symbol.for('react.memo'),\n    y = Symbol.for('react.lazy'),\n    z = Symbol.iterator;\n  function A(a) {\n    if (null === a || 'object' !== typeof a) return null;\n    a = (z && a[z]) || a['@@iterator'];\n    return 'function' === typeof a ? a : null;\n  }\n  let B = {\n      isMounted: function () {\n        return !1;\n      },\n      enqueueForceUpdate: function () {},\n      enqueueReplaceState: function () {},\n      enqueueSetState: function () {},\n    },\n    C = Object.assign,\n    D = {};\n  function E(a, b, e) {\n    this.props = a;\n    this.context = b;\n    this.refs = D;\n    this.updater = e || B;\n  }\n  E.prototype.isReactComponent = {};\n  E.prototype.setState = function (a, b) {\n    if ('object' !== typeof a && 'function' !== typeof a && null != a)\n      throw Error(\n        'setState(...): takes an object of state variables to update or a function which returns an object of state variables.',\n      );\n    this.updater.enqueueSetState(this, a, b, 'setState');\n  };\n  E.prototype.forceUpdate = function (a) {\n    this.updater.enqueueForceUpdate(this, a, 'forceUpdate');\n  };\n  function F() {}\n  F.prototype = E.prototype;\n  function G(a, b, e) {\n    this.props = a;\n    this.context = b;\n    this.refs = D;\n    this.updater = e || B;\n  }\n  var H = (G.prototype = new F());\n  H.constructor = G;\n  C(H, E.prototype);\n  H.isPureReactComponent = !0;\n  var I = Array.isArray,\n    J = Object.prototype.hasOwnProperty,\n    K = { current: null },\n    L = { key: !0, ref: !0, __self: !0, __source: !0 };\n  function M(a, b, e) {\n    var d,\n      c = {},\n      k = null,\n      h = null;\n    if (null != b)\n      for (d in (void 0 !== b.ref && (h = b.ref),\n      void 0 !== b.key && (k = '' + b.key),\n      b))\n        J.call(b, d) && !L.hasOwnProperty(d) && (c[d] = b[d]);\n    var g = arguments.length - 2;\n    if (1 === g) c.children = e;\n    else if (1 < g) {\n      for (var f = Array(g), m = 0; m < g; m++) f[m] = arguments[m + 2];\n      c.children = f;\n    }\n    if (a && a.defaultProps)\n      for (d in ((g = a.defaultProps), g)) void 0 === c[d] && (c[d] = g[d]);\n    return {\n      $$typeof: l,\n      type: a,\n      key: k,\n      ref: h,\n      props: c,\n      _owner: K.current,\n    };\n  }\n  function N(a, b) {\n    return {\n      $$typeof: l,\n      type: a.type,\n      key: b,\n      ref: a.ref,\n      props: a.props,\n      _owner: a._owner,\n    };\n  }\n  function O(a) {\n    return 'object' === typeof a && null !== a && a.$$typeof === l;\n  }\n  function escape(a) {\n    var b = { '=': '=0', ':': '=2' };\n    return (\n      '$' +\n      a.replace(/[=:]/g, function (a) {\n        return b[a];\n      })\n    );\n  }\n  var P = /\\/+/g;\n  function Q(a, b) {\n    return 'object' === typeof a && null !== a && null != a.key\n      ? escape('' + a.key)\n      : b.toString(36);\n  }\n  function R(a, b, e, d, c) {\n    var k = typeof a;\n    if ('undefined' === k || 'boolean' === k) a = null;\n    var h = !1;\n    if (null === a) h = !0;\n    else\n      switch (k) {\n        case 'string':\n        case 'number':\n          h = !0;\n          break;\n        case 'object':\n          switch (a.$$typeof) {\n            case l:\n            case n:\n              h = !0;\n          }\n      }\n    if (h)\n      return (\n        (h = a),\n        (c = c(h)),\n        (a = '' === d ? '.' + Q(h, 0) : d),\n        I(c)\n          ? ((e = ''),\n            null != a && (e = a.replace(P, '$&/') + '/'),\n            R(c, b, e, '', function (a) {\n              return a;\n            }))\n          : null != c &&\n            (O(c) &&\n              (c = N(\n                c,\n                e +\n                  (!c.key || (h && h.key === c.key)\n                    ? ''\n                    : ('' + c.key).replace(P, '$&/') + '/') +\n                  a,\n              )),\n            b.push(c)),\n        1\n      );\n    h = 0;\n    d = '' === d ? '.' : d + ':';\n    if (I(a))\n      for (var g = 0; g < a.length; g++) {\n        k = a[g];\n        var f = d + Q(k, g);\n        h += R(k, b, e, f, c);\n      }\n    else if (((f = A(a)), 'function' === typeof f))\n      for (a = f.call(a), g = 0; !(k = a.next()).done; )\n        (k = k.value), (f = d + Q(k, g++)), (h += R(k, b, e, f, c));\n    else if ('object' === k)\n      throw (\n        ((b = String(a)),\n        Error(\n          'Objects are not valid as a React child (found: ' +\n            ('[object Object]' === b\n              ? 'object with keys {' + Object.keys(a).join(', ') + '}'\n              : b) +\n            '). If you meant to render a collection of children, use an array instead.',\n        ))\n      );\n    return h;\n  }\n  function S(a, b, e) {\n    if (null == a) return a;\n    var d = [],\n      c = 0;\n    R(a, d, '', '', function (a) {\n      return b.call(e, a, c++);\n    });\n    return d;\n  }\n  function T(a) {\n    if (-1 === a._status) {\n      var b = a._result;\n      b = b();\n      b.then(\n        function (b) {\n          if (0 === a._status || -1 === a._status)\n            (a._status = 1), (a._result = b);\n        },\n        function (b) {\n          if (0 === a._status || -1 === a._status)\n            (a._status = 2), (a._result = b);\n        },\n      );\n      -1 === a._status && ((a._status = 0), (a._result = b));\n    }\n    if (1 === a._status) return a._result.default;\n    throw a._result;\n  }\n  var U = { current: null },\n    V = { transition: null },\n    W = {\n      ReactCurrentDispatcher: U,\n      ReactCurrentBatchConfig: V,\n      ReactCurrentOwner: K,\n    };\n  exports.Children = {\n    map: S,\n    forEach: function (a, b, e) {\n      S(\n        a,\n        function () {\n          b.apply(this, arguments);\n        },\n        e,\n      );\n    },\n    count: function (a) {\n      var b = 0;\n      S(a, function () {\n        b++;\n      });\n      return b;\n    },\n    toArray: function (a) {\n      return (\n        S(a, function (a) {\n          return a;\n        }) || []\n      );\n    },\n    only: function (a) {\n      if (!O(a))\n        throw Error(\n          'React.Children.only expected to receive a single React element child.',\n        );\n      return a;\n    },\n  };\n  exports.Component = E;\n  exports.Fragment = p;\n  exports.Profiler = r;\n  exports.PureComponent = G;\n  exports.StrictMode = q;\n  exports.Suspense = w;\n  exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = W;\n  exports.cloneElement = function (a, b, e) {\n    if (null === a || void 0 === a)\n      throw Error(\n        'React.cloneElement(...): The argument must be a React element, but you passed ' +\n          a +\n          '.',\n      );\n    var d = C({}, a.props),\n      c = a.key,\n      k = a.ref,\n      h = a._owner;\n    if (null != b) {\n      void 0 !== b.ref && ((k = b.ref), (h = K.current));\n      void 0 !== b.key && (c = '' + b.key);\n      if (a.type && a.type.defaultProps) var g = a.type.defaultProps;\n      for (f in b)\n        J.call(b, f) &&\n          !L.hasOwnProperty(f) &&\n          (d[f] = void 0 === b[f] && void 0 !== g ? g[f] : b[f]);\n    }\n    var f = arguments.length - 2;\n    if (1 === f) d.children = e;\n    else if (1 < f) {\n      g = Array(f);\n      for (var m = 0; m < f; m++) g[m] = arguments[m + 2];\n      d.children = g;\n    }\n    return { $$typeof: l, type: a.type, key: c, ref: k, props: d, _owner: h };\n  };\n  exports.createContext = function (a) {\n    a = {\n      $$typeof: u,\n      _currentValue: a,\n      _currentValue2: a,\n      _threadCount: 0,\n      Provider: null,\n      Consumer: null,\n      _defaultValue: null,\n      _globalName: null,\n    };\n    a.Provider = { $$typeof: t, _context: a };\n    return (a.Consumer = a);\n  };\n  exports.createElement = M;\n  exports.createFactory = function (a) {\n    var b = M.bind(null, a);\n    b.type = a;\n    return b;\n  };\n  exports.createRef = function () {\n    return { current: null };\n  };\n  exports.forwardRef = function (a) {\n    return { $$typeof: v, render: a };\n  };\n  exports.isValidElement = O;\n  exports.lazy = function (a) {\n    return { $$typeof: y, _payload: { _status: -1, _result: a }, _init: T };\n  };\n  exports.memo = function (a, b) {\n    return { $$typeof: x, type: a, compare: void 0 === b ? null : b };\n  };\n  exports.startTransition = function (a) {\n    var b = V.transition;\n    V.transition = {};\n    try {\n      a();\n    } finally {\n      V.transition = b;\n    }\n  };\n  exports.unstable_act = function () {\n    throw Error('act(...) is not supported in production builds of React.');\n  };\n  exports.useCallback = function (a, b) {\n    return U.current.useCallback(a, b);\n  };\n  exports.useContext = function (a) {\n    return U.current.useContext(a);\n  };\n  exports.useDebugValue = function () {};\n  exports.useDeferredValue = function (a) {\n    return U.current.useDeferredValue(a);\n  };\n  exports.useEffect = function (a, b) {\n    return U.current.useEffect(a, b);\n  };\n  exports.useId = function () {\n    return U.current.useId();\n  };\n  exports.useImperativeHandle = function (a, b, e) {\n    return U.current.useImperativeHandle(a, b, e);\n  };\n  exports.useInsertionEffect = function (a, b) {\n    return U.current.useInsertionEffect(a, b);\n  };\n  exports.useLayoutEffect = function (a, b) {\n    return U.current.useLayoutEffect(a, b);\n  };\n  exports.useMemo = function (a, b) {\n    return U.current.useMemo(a, b);\n  };\n  exports.useReducer = function (a, b, e) {\n    return U.current.useReducer(a, b, e);\n  };\n  exports.useRef = function (a) {\n    return U.current.useRef(a);\n  };\n  exports.useState = function (a) {\n    return U.current.useState(a);\n  };\n  exports.useSyncExternalStore = function (a, b, e) {\n    return U.current.useSyncExternalStore(a, b, e);\n  };\n  exports.useTransition = function () {\n    return U.current.useTransition();\n  };\n  exports.version = '18.2.0';\n}\n\n// react/jsx-runtime\nlet jsx, jsxs;\n{\n  /**\n   * @license React\n   * react-jsx-runtime.production.min.js\n   *\n   * Copyright (c) Facebook, Inc. and its affiliates.\n   *\n   * This source code is licensed under the MIT license found in the\n   * LICENSE file in the root directory of this source tree.\n   */\n  let k = Symbol.for('react.element'),\n    m = Object.prototype.hasOwnProperty,\n    n =\n      React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED\n        .ReactCurrentOwner,\n    p = { key: !0, ref: !0, __self: !0, __source: !0 };\n  function q(c, a, g) {\n    var b,\n      d = {},\n      e = null,\n      h = null;\n    void 0 !== g && (e = '' + g);\n    void 0 !== a.key && (e = '' + a.key);\n    void 0 !== a.ref && (h = a.ref);\n    for (b in a) m.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]);\n    if (c && c.defaultProps)\n      for (b in ((a = c.defaultProps), a)) void 0 === d[b] && (d[b] = a[b]);\n    return {\n      $$typeof: k,\n      type: c,\n      key: e,\n      ref: h,\n      props: d,\n      _owner: n.current,\n    };\n  }\n  jsx = jsxs = q;\n}\n\n// react-dom/server\nlet renderToReadableStream;\n{\n  /**\n   * @license React\n   * react-dom-server.browser.production.min.js\n   *\n   * Copyright (c) Facebook, Inc. and its affiliates.\n   *\n   * This source code is licensed under the MIT license found in the\n   * LICENSE file in the root directory of this source tree.\n   */\n  var aa = React;\n  function k(a) {\n    for (\n      var b = 'https://reactjs.org/docs/error-decoder.html?invariant=' + a,\n        c = 1;\n      c < arguments.length;\n      c++\n    )\n      b += '&args[]=' + encodeURIComponent(arguments[c]);\n    return (\n      'Minified React error #' +\n      a +\n      '; visit ' +\n      b +\n      ' for the full message or use the non-minified dev environment for full errors and additional helpful warnings.'\n    );\n  }\n  var l = null,\n    n = 0;\n  function p(a, b) {\n    if (0 !== b.length)\n      if (512 < b.length)\n        0 < n &&\n          (a.enqueue(new Uint8Array(l.buffer, 0, n)),\n          (l = new Uint8Array(512)),\n          (n = 0)),\n          a.enqueue(b);\n      else {\n        var c = l.length - n;\n        c < b.length &&\n          (0 === c\n            ? a.enqueue(l)\n            : (l.set(b.subarray(0, c), n), a.enqueue(l), (b = b.subarray(c))),\n          (l = new Uint8Array(512)),\n          (n = 0));\n        l.set(b, n);\n        n += b.length;\n      }\n  }\n  function t(a, b) {\n    p(a, b);\n    return !0;\n  }\n  function ba(a) {\n    l &&\n      0 < n &&\n      (a.enqueue(new Uint8Array(l.buffer, 0, n)), (l = null), (n = 0));\n  }\n  var ca = new TextEncoder();\n  function u(a) {\n    return ca.encode(a);\n  }\n  function w(a) {\n    return ca.encode(a);\n  }\n  function da(a, b) {\n    'function' === typeof a.error ? a.error(b) : a.close();\n  }\n  var x = Object.prototype.hasOwnProperty,\n    ea =\n      /^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$/,\n    fa = {},\n    ha = {};\n  function ia(a) {\n    if (x.call(ha, a)) return !0;\n    if (x.call(fa, a)) return !1;\n    if (ea.test(a)) return (ha[a] = !0);\n    fa[a] = !0;\n    return !1;\n  }\n  function y(a, b, c, d, f, e, g) {\n    this.acceptsBooleans = 2 === b || 3 === b || 4 === b;\n    this.attributeName = d;\n    this.attributeNamespace = f;\n    this.mustUseProperty = c;\n    this.propertyName = a;\n    this.type = b;\n    this.sanitizeURL = e;\n    this.removeEmptyString = g;\n  }\n  var z = {};\n  'children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style'\n    .split(' ')\n    .forEach(function (a) {\n      z[a] = new y(a, 0, !1, a, null, !1, !1);\n    });\n  [\n    ['acceptCharset', 'accept-charset'],\n    ['className', 'class'],\n    ['htmlFor', 'for'],\n    ['httpEquiv', 'http-equiv'],\n  ].forEach(function (a) {\n    var b = a[0];\n    z[b] = new y(b, 1, !1, a[1], null, !1, !1);\n  });\n  ['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (a) {\n    z[a] = new y(a, 2, !1, a.toLowerCase(), null, !1, !1);\n  });\n  [\n    'autoReverse',\n    'externalResourcesRequired',\n    'focusable',\n    'preserveAlpha',\n  ].forEach(function (a) {\n    z[a] = new y(a, 2, !1, a, null, !1, !1);\n  });\n  'allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope'\n    .split(' ')\n    .forEach(function (a) {\n      z[a] = new y(a, 3, !1, a.toLowerCase(), null, !1, !1);\n    });\n  ['checked', 'multiple', 'muted', 'selected'].forEach(function (a) {\n    z[a] = new y(a, 3, !0, a, null, !1, !1);\n  });\n  ['capture', 'download'].forEach(function (a) {\n    z[a] = new y(a, 4, !1, a, null, !1, !1);\n  });\n  ['cols', 'rows', 'size', 'span'].forEach(function (a) {\n    z[a] = new y(a, 6, !1, a, null, !1, !1);\n  });\n  ['rowSpan', 'start'].forEach(function (a) {\n    z[a] = new y(a, 5, !1, a.toLowerCase(), null, !1, !1);\n  });\n  var ja = /[\\-:]([a-z])/g;\n  function ka(a) {\n    return a[1].toUpperCase();\n  }\n  'accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height'\n    .split(' ')\n    .forEach(function (a) {\n      var b = a.replace(ja, ka);\n      z[b] = new y(b, 1, !1, a, null, !1, !1);\n    });\n  'xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type'\n    .split(' ')\n    .forEach(function (a) {\n      var b = a.replace(ja, ka);\n      z[b] = new y(b, 1, !1, a, 'http://www.w3.org/1999/xlink', !1, !1);\n    });\n  ['xml:base', 'xml:lang', 'xml:space'].forEach(function (a) {\n    var b = a.replace(ja, ka);\n    z[b] = new y(b, 1, !1, a, 'http://www.w3.org/XML/1998/namespace', !1, !1);\n  });\n  ['tabIndex', 'crossOrigin'].forEach(function (a) {\n    z[a] = new y(a, 1, !1, a.toLowerCase(), null, !1, !1);\n  });\n  z.xlinkHref = new y(\n    'xlinkHref',\n    1,\n    !1,\n    'xlink:href',\n    'http://www.w3.org/1999/xlink',\n    !0,\n    !1,\n  );\n  ['src', 'href', 'action', 'formAction'].forEach(function (a) {\n    z[a] = new y(a, 1, !1, a.toLowerCase(), null, !0, !0);\n  });\n  var B = {\n      animationIterationCount: !0,\n      aspectRatio: !0,\n      borderImageOutset: !0,\n      borderImageSlice: !0,\n      borderImageWidth: !0,\n      boxFlex: !0,\n      boxFlexGroup: !0,\n      boxOrdinalGroup: !0,\n      columnCount: !0,\n      columns: !0,\n      flex: !0,\n      flexGrow: !0,\n      flexPositive: !0,\n      flexShrink: !0,\n      flexNegative: !0,\n      flexOrder: !0,\n      gridArea: !0,\n      gridRow: !0,\n      gridRowEnd: !0,\n      gridRowSpan: !0,\n      gridRowStart: !0,\n      gridColumn: !0,\n      gridColumnEnd: !0,\n      gridColumnSpan: !0,\n      gridColumnStart: !0,\n      fontWeight: !0,\n      lineClamp: !0,\n      lineHeight: !0,\n      opacity: !0,\n      order: !0,\n      orphans: !0,\n      tabSize: !0,\n      widows: !0,\n      zIndex: !0,\n      zoom: !0,\n      fillOpacity: !0,\n      floodOpacity: !0,\n      stopOpacity: !0,\n      strokeDasharray: !0,\n      strokeDashoffset: !0,\n      strokeMiterlimit: !0,\n      strokeOpacity: !0,\n      strokeWidth: !0,\n    },\n    la = ['Webkit', 'ms', 'Moz', 'O'];\n  Object.keys(B).forEach(function (a) {\n    la.forEach(function (b) {\n      b = b + a.charAt(0).toUpperCase() + a.substring(1);\n      B[b] = B[a];\n    });\n  });\n  var oa = /[\"'&<>]/;\n  function C(a) {\n    if ('boolean' === typeof a || 'number' === typeof a) return '' + a;\n    a = '' + a;\n    var b = oa.exec(a);\n    if (b) {\n      var c = '',\n        d,\n        f = 0;\n      for (d = b.index; d < a.length; d++) {\n        switch (a.charCodeAt(d)) {\n          case 34:\n            b = '&quot;';\n            break;\n          case 38:\n            b = '&amp;';\n            break;\n          case 39:\n            b = '&#x27;';\n            break;\n          case 60:\n            b = '&lt;';\n            break;\n          case 62:\n            b = '&gt;';\n            break;\n          default:\n            continue;\n        }\n        f !== d && (c += a.substring(f, d));\n        f = d + 1;\n        c += b;\n      }\n      a = f !== d ? c + a.substring(f, d) : c;\n    }\n    return a;\n  }\n  var pa = /([A-Z])/g,\n    qa = /^ms-/,\n    ra = Array.isArray,\n    sa = w('<script>'),\n    ta = w('\\x3c/script>'),\n    ua = w('<script src=\"'),\n    va = w('<script type=\"module\" src=\"'),\n    wa = w('\" async=\"\">\\x3c/script>'),\n    xa = /(<\\/|<)(s)(cript)/gi;\n  function ya(a, b, c, d) {\n    return '' + b + ('s' === c ? '\\\\u0073' : '\\\\u0053') + d;\n  }\n  function za(a, b, c, d, f) {\n    a = void 0 === a ? '' : a;\n    b = void 0 === b ? sa : w('<script nonce=\"' + C(b) + '\">');\n    var e = [];\n    void 0 !== c && e.push(b, u(('' + c).replace(xa, ya)), ta);\n    if (void 0 !== d) for (c = 0; c < d.length; c++) e.push(ua, u(C(d[c])), wa);\n    if (void 0 !== f) for (d = 0; d < f.length; d++) e.push(va, u(C(f[d])), wa);\n    return {\n      bootstrapChunks: e,\n      startInlineScript: b,\n      placeholderPrefix: w(a + 'P:'),\n      segmentPrefix: w(a + 'S:'),\n      boundaryPrefix: a + 'B:',\n      idPrefix: a,\n      nextSuspenseID: 0,\n      sentCompleteSegmentFunction: !1,\n      sentCompleteBoundaryFunction: !1,\n      sentClientRenderFunction: !1,\n    };\n  }\n  function D(a, b) {\n    return { insertionMode: a, selectedValue: b };\n  }\n  function Aa(a) {\n    return D(\n      'http://www.w3.org/2000/svg' === a\n        ? 2\n        : 'http://www.w3.org/1998/Math/MathML' === a\n          ? 3\n          : 0,\n      null,\n    );\n  }\n  function Ba(a, b, c) {\n    switch (b) {\n      case 'select':\n        return D(1, null != c.value ? c.value : c.defaultValue);\n      case 'svg':\n        return D(2, null);\n      case 'math':\n        return D(3, null);\n      case 'foreignObject':\n        return D(1, null);\n      case 'table':\n        return D(4, null);\n      case 'thead':\n      case 'tbody':\n      case 'tfoot':\n        return D(5, null);\n      case 'colgroup':\n        return D(7, null);\n      case 'tr':\n        return D(6, null);\n    }\n    return 4 <= a.insertionMode || 0 === a.insertionMode ? D(1, null) : a;\n  }\n  var Ca = w('\\x3c!-- --\\x3e');\n  function Da(a, b, c, d) {\n    if ('' === b) return d;\n    d && a.push(Ca);\n    a.push(u(C(b)));\n    return !0;\n  }\n  var Ea = new Map(),\n    Fa = w(' style=\"'),\n    Ga = w(':'),\n    Ha = w(';');\n  function Ia(a, b, c) {\n    if ('object' !== typeof c) throw Error(k(62));\n    b = !0;\n    for (var d in c)\n      if (x.call(c, d)) {\n        var f = c[d];\n        if (null != f && 'boolean' !== typeof f && '' !== f) {\n          if (0 === d.indexOf('--')) {\n            var e = u(C(d));\n            f = u(C(('' + f).trim()));\n          } else {\n            e = d;\n            var g = Ea.get(e);\n            void 0 !== g\n              ? (e = g)\n              : ((g = w(\n                  C(e.replace(pa, '-$1').toLowerCase().replace(qa, '-ms-')),\n                )),\n                Ea.set(e, g),\n                (e = g));\n            f =\n              'number' === typeof f\n                ? 0 === f || x.call(B, d)\n                  ? u('' + f)\n                  : u(f + 'px')\n                : u(C(('' + f).trim()));\n          }\n          b ? ((b = !1), a.push(Fa, e, Ga, f)) : a.push(Ha, e, Ga, f);\n        }\n      }\n    b || a.push(E);\n  }\n  var H = w(' '),\n    I = w('=\"'),\n    E = w('\"'),\n    Ja = w('=\"\"');\n  function J(a, b, c, d) {\n    switch (c) {\n      case 'style':\n        Ia(a, b, d);\n        return;\n      case 'defaultValue':\n      case 'defaultChecked':\n      case 'innerHTML':\n      case 'suppressContentEditableWarning':\n      case 'suppressHydrationWarning':\n        return;\n    }\n    if (\n      !(2 < c.length) ||\n      ('o' !== c[0] && 'O' !== c[0]) ||\n      ('n' !== c[1] && 'N' !== c[1])\n    )\n      if (((b = z.hasOwnProperty(c) ? z[c] : null), null !== b)) {\n        switch (typeof d) {\n          case 'function':\n          case 'symbol':\n            return;\n          case 'boolean':\n            if (!b.acceptsBooleans) return;\n        }\n        c = u(b.attributeName);\n        switch (b.type) {\n          case 3:\n            d && a.push(H, c, Ja);\n            break;\n          case 4:\n            !0 === d\n              ? a.push(H, c, Ja)\n              : !1 !== d && a.push(H, c, I, u(C(d)), E);\n            break;\n          case 5:\n            isNaN(d) || a.push(H, c, I, u(C(d)), E);\n            break;\n          case 6:\n            !isNaN(d) && 1 <= d && a.push(H, c, I, u(C(d)), E);\n            break;\n          default:\n            b.sanitizeURL && (d = '' + d), a.push(H, c, I, u(C(d)), E);\n        }\n      } else if (ia(c)) {\n        switch (typeof d) {\n          case 'function':\n          case 'symbol':\n            return;\n          case 'boolean':\n            if (\n              ((b = c.toLowerCase().slice(0, 5)),\n              'data-' !== b && 'aria-' !== b)\n            )\n              return;\n        }\n        a.push(H, u(c), I, u(C(d)), E);\n      }\n  }\n  var K = w('>'),\n    Ka = w('/>');\n  function L(a, b, c) {\n    if (null != b) {\n      if (null != c) throw Error(k(60));\n      if ('object' !== typeof b || !('__html' in b)) throw Error(k(61));\n      b = b.__html;\n      null !== b && void 0 !== b && a.push(u('' + b));\n    }\n  }\n  function La(a) {\n    var b = '';\n    aa.Children.forEach(a, function (a) {\n      null != a && (b += a);\n    });\n    return b;\n  }\n  var Ma = w(' selected=\"\"');\n  function Na(a, b, c, d) {\n    a.push(M(c));\n    var f = (c = null),\n      e;\n    for (e in b)\n      if (x.call(b, e)) {\n        var g = b[e];\n        if (null != g)\n          switch (e) {\n            case 'children':\n              c = g;\n              break;\n            case 'dangerouslySetInnerHTML':\n              f = g;\n              break;\n            default:\n              J(a, d, e, g);\n          }\n      }\n    a.push(K);\n    L(a, f, c);\n    return 'string' === typeof c ? (a.push(u(C(c))), null) : c;\n  }\n  var Oa = w('\\n'),\n    Pa = /^[a-zA-Z][a-zA-Z:_\\.\\-\\d]*$/,\n    Qa = new Map();\n  function M(a) {\n    var b = Qa.get(a);\n    if (void 0 === b) {\n      if (!Pa.test(a)) throw Error(k(65, a));\n      b = w('<' + a);\n      Qa.set(a, b);\n    }\n    return b;\n  }\n  var Ra = w('<!DOCTYPE html>');\n  function Sa(a, b, c, d, f) {\n    switch (b) {\n      case 'select':\n        a.push(M('select'));\n        var e = null,\n          g = null;\n        for (r in c)\n          if (x.call(c, r)) {\n            var h = c[r];\n            if (null != h)\n              switch (r) {\n                case 'children':\n                  e = h;\n                  break;\n                case 'dangerouslySetInnerHTML':\n                  g = h;\n                  break;\n                case 'defaultValue':\n                case 'value':\n                  break;\n                default:\n                  J(a, d, r, h);\n              }\n          }\n        a.push(K);\n        L(a, g, e);\n        return e;\n      case 'option':\n        g = f.selectedValue;\n        a.push(M('option'));\n        var m = (h = null),\n          q = null;\n        var r = null;\n        for (e in c)\n          if (x.call(c, e)) {\n            var v = c[e];\n            if (null != v)\n              switch (e) {\n                case 'children':\n                  h = v;\n                  break;\n                case 'selected':\n                  q = v;\n                  break;\n                case 'dangerouslySetInnerHTML':\n                  r = v;\n                  break;\n                case 'value':\n                  m = v;\n                default:\n                  J(a, d, e, v);\n              }\n          }\n        if (null != g)\n          if (((c = null !== m ? '' + m : La(h)), ra(g)))\n            for (d = 0; d < g.length; d++) {\n              if ('' + g[d] === c) {\n                a.push(Ma);\n                break;\n              }\n            }\n          else '' + g === c && a.push(Ma);\n        else q && a.push(Ma);\n        a.push(K);\n        L(a, r, h);\n        return h;\n      case 'textarea':\n        a.push(M('textarea'));\n        r = g = e = null;\n        for (h in c)\n          if (x.call(c, h) && ((m = c[h]), null != m))\n            switch (h) {\n              case 'children':\n                r = m;\n                break;\n              case 'value':\n                e = m;\n                break;\n              case 'defaultValue':\n                g = m;\n                break;\n              case 'dangerouslySetInnerHTML':\n                throw Error(k(91));\n              default:\n                J(a, d, h, m);\n            }\n        null === e && null !== g && (e = g);\n        a.push(K);\n        if (null != r) {\n          if (null != e) throw Error(k(92));\n          if (ra(r) && 1 < r.length) throw Error(k(93));\n          e = '' + r;\n        }\n        'string' === typeof e && '\\n' === e[0] && a.push(Oa);\n        null !== e && a.push(u(C('' + e)));\n        return null;\n      case 'input':\n        a.push(M('input'));\n        m = r = h = e = null;\n        for (g in c)\n          if (x.call(c, g) && ((q = c[g]), null != q))\n            switch (g) {\n              case 'children':\n              case 'dangerouslySetInnerHTML':\n                throw Error(k(399, 'input'));\n              case 'defaultChecked':\n                m = q;\n                break;\n              case 'defaultValue':\n                h = q;\n                break;\n              case 'checked':\n                r = q;\n                break;\n              case 'value':\n                e = q;\n                break;\n              default:\n                J(a, d, g, q);\n            }\n        null !== r\n          ? J(a, d, 'checked', r)\n          : null !== m && J(a, d, 'checked', m);\n        null !== e ? J(a, d, 'value', e) : null !== h && J(a, d, 'value', h);\n        a.push(Ka);\n        return null;\n      case 'menuitem':\n        a.push(M('menuitem'));\n        for (var A in c)\n          if (x.call(c, A) && ((e = c[A]), null != e))\n            switch (A) {\n              case 'children':\n              case 'dangerouslySetInnerHTML':\n                throw Error(k(400));\n              default:\n                J(a, d, A, e);\n            }\n        a.push(K);\n        return null;\n      case 'title':\n        a.push(M('title'));\n        e = null;\n        for (v in c)\n          if (x.call(c, v) && ((g = c[v]), null != g))\n            switch (v) {\n              case 'children':\n                e = g;\n                break;\n              case 'dangerouslySetInnerHTML':\n                throw Error(k(434));\n              default:\n                J(a, d, v, g);\n            }\n        a.push(K);\n        return e;\n      case 'listing':\n      case 'pre':\n        a.push(M(b));\n        g = e = null;\n        for (m in c)\n          if (x.call(c, m) && ((h = c[m]), null != h))\n            switch (m) {\n              case 'children':\n                e = h;\n                break;\n              case 'dangerouslySetInnerHTML':\n                g = h;\n                break;\n              default:\n                J(a, d, m, h);\n            }\n        a.push(K);\n        if (null != g) {\n          if (null != e) throw Error(k(60));\n          if ('object' !== typeof g || !('__html' in g)) throw Error(k(61));\n          c = g.__html;\n          null !== c &&\n            void 0 !== c &&\n            ('string' === typeof c && 0 < c.length && '\\n' === c[0]\n              ? a.push(Oa, u(c))\n              : a.push(u('' + c)));\n        }\n        'string' === typeof e && '\\n' === e[0] && a.push(Oa);\n        return e;\n      case 'area':\n      case 'base':\n      case 'br':\n      case 'col':\n      case 'embed':\n      case 'hr':\n      case 'img':\n      case 'keygen':\n      case 'link':\n      case 'meta':\n      case 'param':\n      case 'source':\n      case 'track':\n      case 'wbr':\n        a.push(M(b));\n        for (var F in c)\n          if (x.call(c, F) && ((e = c[F]), null != e))\n            switch (F) {\n              case 'children':\n              case 'dangerouslySetInnerHTML':\n                throw Error(k(399, b));\n              default:\n                J(a, d, F, e);\n            }\n        a.push(Ka);\n        return null;\n      case 'annotation-xml':\n      case 'color-profile':\n      case 'font-face':\n      case 'font-face-src':\n      case 'font-face-uri':\n      case 'font-face-format':\n      case 'font-face-name':\n      case 'missing-glyph':\n        return Na(a, c, b, d);\n      case 'html':\n        return 0 === f.insertionMode && a.push(Ra), Na(a, c, b, d);\n      default:\n        if (-1 === b.indexOf('-') && 'string' !== typeof c.is)\n          return Na(a, c, b, d);\n        a.push(M(b));\n        g = e = null;\n        for (q in c)\n          if (x.call(c, q) && ((h = c[q]), null != h))\n            switch (q) {\n              case 'children':\n                e = h;\n                break;\n              case 'dangerouslySetInnerHTML':\n                g = h;\n                break;\n              case 'style':\n                Ia(a, d, h);\n                break;\n              case 'suppressContentEditableWarning':\n              case 'suppressHydrationWarning':\n                break;\n              default:\n                ia(q) &&\n                  'function' !== typeof h &&\n                  'symbol' !== typeof h &&\n                  a.push(H, u(q), I, u(C(h)), E);\n            }\n        a.push(K);\n        L(a, g, e);\n        return e;\n    }\n  }\n  var Ta = w('</'),\n    Ua = w('>'),\n    Va = w('<template id=\"'),\n    Wa = w('\"></template>'),\n    Xa = w('\\x3c!--$--\\x3e'),\n    Ya = w('\\x3c!--$?--\\x3e<template id=\"'),\n    Za = w('\"></template>'),\n    $a = w('\\x3c!--$!--\\x3e'),\n    ab = w('\\x3c!--/$--\\x3e'),\n    bb = w('<template'),\n    cb = w('\"'),\n    db = w(' data-dgst=\"');\n  w(' data-msg=\"');\n  w(' data-stck=\"');\n  var eb = w('></template>');\n  function fb(a, b, c) {\n    p(a, Ya);\n    if (null === c) throw Error(k(395));\n    p(a, c);\n    return t(a, Za);\n  }\n  var gb = w('<div hidden id=\"'),\n    hb = w('\">'),\n    ib = w('</div>'),\n    jb = w('<svg aria-hidden=\"true\" style=\"display:none\" id=\"'),\n    kb = w('\">'),\n    lb = w('</svg>'),\n    mb = w('<math aria-hidden=\"true\" style=\"display:none\" id=\"'),\n    nb = w('\">'),\n    ob = w('</math>'),\n    pb = w('<table hidden id=\"'),\n    qb = w('\">'),\n    rb = w('</table>'),\n    sb = w('<table hidden><tbody id=\"'),\n    tb = w('\">'),\n    ub = w('</tbody></table>'),\n    vb = w('<table hidden><tr id=\"'),\n    wb = w('\">'),\n    xb = w('</tr></table>'),\n    yb = w('<table hidden><colgroup id=\"'),\n    zb = w('\">'),\n    Ab = w('</colgroup></table>');\n  function Bb(a, b, c, d) {\n    switch (c.insertionMode) {\n      case 0:\n      case 1:\n        return (\n          p(a, gb), p(a, b.segmentPrefix), p(a, u(d.toString(16))), t(a, hb)\n        );\n      case 2:\n        return (\n          p(a, jb), p(a, b.segmentPrefix), p(a, u(d.toString(16))), t(a, kb)\n        );\n      case 3:\n        return (\n          p(a, mb), p(a, b.segmentPrefix), p(a, u(d.toString(16))), t(a, nb)\n        );\n      case 4:\n        return (\n          p(a, pb), p(a, b.segmentPrefix), p(a, u(d.toString(16))), t(a, qb)\n        );\n      case 5:\n        return (\n          p(a, sb), p(a, b.segmentPrefix), p(a, u(d.toString(16))), t(a, tb)\n        );\n      case 6:\n        return (\n          p(a, vb), p(a, b.segmentPrefix), p(a, u(d.toString(16))), t(a, wb)\n        );\n      case 7:\n        return (\n          p(a, yb), p(a, b.segmentPrefix), p(a, u(d.toString(16))), t(a, zb)\n        );\n      default:\n        throw Error(k(397));\n    }\n  }\n  function Cb(a, b) {\n    switch (b.insertionMode) {\n      case 0:\n      case 1:\n        return t(a, ib);\n      case 2:\n        return t(a, lb);\n      case 3:\n        return t(a, ob);\n      case 4:\n        return t(a, rb);\n      case 5:\n        return t(a, ub);\n      case 6:\n        return t(a, xb);\n      case 7:\n        return t(a, Ab);\n      default:\n        throw Error(k(397));\n    }\n  }\n  var Db = w(\n      'function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS(\"',\n    ),\n    Eb = w('$RS(\"'),\n    Gb = w('\",\"'),\n    Hb = w('\")\\x3c/script>'),\n    Ib = w(\n      'function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if(\"/$\"===d)if(0===e)break;else e--;else\"$\"!==d&&\"$?\"!==d&&\"$!\"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data=\"$\";a._reactRetry&&a._reactRetry()}};$RC(\"',\n    ),\n    Jb = w('$RC(\"'),\n    Kb = w('\",\"'),\n    Lb = w('\")\\x3c/script>'),\n    Mb = w(\n      'function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data=\"$!\",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX(\"',\n    ),\n    Nb = w('$RX(\"'),\n    Ob = w('\"'),\n    Pb = w(')\\x3c/script>'),\n    Qb = w(','),\n    Rb = /[<\\u2028\\u2029]/g;\n  function Sb(a) {\n    return JSON.stringify(a).replace(Rb, function (a) {\n      switch (a) {\n        case '<':\n          return '\\\\u003c';\n        case '\\u2028':\n          return '\\\\u2028';\n        case '\\u2029':\n          return '\\\\u2029';\n        default:\n          throw Error(\n            'escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React',\n          );\n      }\n    });\n  }\n  var N = Object.assign,\n    Tb = Symbol.for('react.element'),\n    Ub = Symbol.for('react.portal'),\n    Vb = Symbol.for('react.fragment'),\n    Wb = Symbol.for('react.strict_mode'),\n    Xb = Symbol.for('react.profiler'),\n    Yb = Symbol.for('react.provider'),\n    Zb = Symbol.for('react.context'),\n    $b = Symbol.for('react.forward_ref'),\n    ac = Symbol.for('react.suspense'),\n    bc = Symbol.for('react.suspense_list'),\n    cc = Symbol.for('react.memo'),\n    dc = Symbol.for('react.lazy'),\n    ec = Symbol.for('react.scope'),\n    fc = Symbol.for('react.debug_trace_mode'),\n    gc = Symbol.for('react.legacy_hidden'),\n    hc = Symbol.for('react.default_value'),\n    ic = Symbol.iterator;\n  function jc(a) {\n    if (null == a) return null;\n    if ('function' === typeof a) return a.displayName || a.name || null;\n    if ('string' === typeof a) return a;\n    switch (a) {\n      case Vb:\n        return 'Fragment';\n      case Ub:\n        return 'Portal';\n      case Xb:\n        return 'Profiler';\n      case Wb:\n        return 'StrictMode';\n      case ac:\n        return 'Suspense';\n      case bc:\n        return 'SuspenseList';\n    }\n    if ('object' === typeof a)\n      switch (a.$$typeof) {\n        case Zb:\n          return (a.displayName || 'Context') + '.Consumer';\n        case Yb:\n          return (a._context.displayName || 'Context') + '.Provider';\n        case $b:\n          var b = a.render;\n          a = a.displayName;\n          a ||\n            ((a = b.displayName || b.name || ''),\n            (a = '' !== a ? 'ForwardRef(' + a + ')' : 'ForwardRef'));\n          return a;\n        case cc:\n          return (\n            (b = a.displayName || null), null !== b ? b : jc(a.type) || 'Memo'\n          );\n        case dc:\n          b = a._payload;\n          a = a._init;\n          try {\n            return jc(a(b));\n          } catch (c) {}\n      }\n    return null;\n  }\n  var kc = {};\n  function lc(a, b) {\n    a = a.contextTypes;\n    if (!a) return kc;\n    var c = {},\n      d;\n    for (d in a) c[d] = b[d];\n    return c;\n  }\n  var O = null;\n  function P(a, b) {\n    if (a !== b) {\n      a.context._currentValue = a.parentValue;\n      a = a.parent;\n      var c = b.parent;\n      if (null === a) {\n        if (null !== c) throw Error(k(401));\n      } else {\n        if (null === c) throw Error(k(401));\n        P(a, c);\n      }\n      b.context._currentValue = b.value;\n    }\n  }\n  function mc(a) {\n    a.context._currentValue = a.parentValue;\n    a = a.parent;\n    null !== a && mc(a);\n  }\n  function nc(a) {\n    var b = a.parent;\n    null !== b && nc(b);\n    a.context._currentValue = a.value;\n  }\n  function oc(a, b) {\n    a.context._currentValue = a.parentValue;\n    a = a.parent;\n    if (null === a) throw Error(k(402));\n    a.depth === b.depth ? P(a, b) : oc(a, b);\n  }\n  function pc(a, b) {\n    var c = b.parent;\n    if (null === c) throw Error(k(402));\n    a.depth === c.depth ? P(a, c) : pc(a, c);\n    b.context._currentValue = b.value;\n  }\n  function Q(a) {\n    var b = O;\n    b !== a &&\n      (null === b\n        ? nc(a)\n        : null === a\n          ? mc(b)\n          : b.depth === a.depth\n            ? P(b, a)\n            : b.depth > a.depth\n              ? oc(b, a)\n              : pc(b, a),\n      (O = a));\n  }\n  var qc = {\n    isMounted: function () {\n      return !1;\n    },\n    enqueueSetState: function (a, b) {\n      a = a._reactInternals;\n      null !== a.queue && a.queue.push(b);\n    },\n    enqueueReplaceState: function (a, b) {\n      a = a._reactInternals;\n      a.replace = !0;\n      a.queue = [b];\n    },\n    enqueueForceUpdate: function () {},\n  };\n  function rc(a, b, c, d) {\n    var f = void 0 !== a.state ? a.state : null;\n    a.updater = qc;\n    a.props = c;\n    a.state = f;\n    var e = { queue: [], replace: !1 };\n    a._reactInternals = e;\n    var g = b.contextType;\n    a.context = 'object' === typeof g && null !== g ? g._currentValue : d;\n    g = b.getDerivedStateFromProps;\n    'function' === typeof g &&\n      ((g = g(c, f)),\n      (f = null === g || void 0 === g ? f : N({}, f, g)),\n      (a.state = f));\n    if (\n      'function' !== typeof b.getDerivedStateFromProps &&\n      'function' !== typeof a.getSnapshotBeforeUpdate &&\n      ('function' === typeof a.UNSAFE_componentWillMount ||\n        'function' === typeof a.componentWillMount)\n    )\n      if (\n        ((b = a.state),\n        'function' === typeof a.componentWillMount && a.componentWillMount(),\n        'function' === typeof a.UNSAFE_componentWillMount &&\n          a.UNSAFE_componentWillMount(),\n        b !== a.state && qc.enqueueReplaceState(a, a.state, null),\n        null !== e.queue && 0 < e.queue.length)\n      )\n        if (\n          ((b = e.queue),\n          (g = e.replace),\n          (e.queue = null),\n          (e.replace = !1),\n          g && 1 === b.length)\n        )\n          a.state = b[0];\n        else {\n          e = g ? b[0] : a.state;\n          f = !0;\n          for (g = g ? 1 : 0; g < b.length; g++) {\n            var h = b[g];\n            h = 'function' === typeof h ? h.call(a, e, c, d) : h;\n            null != h && (f ? ((f = !1), (e = N({}, e, h))) : N(e, h));\n          }\n          a.state = e;\n        }\n      else e.queue = null;\n  }\n  var sc = { id: 1, overflow: '' };\n  function tc(a, b, c) {\n    var d = a.id;\n    a = a.overflow;\n    var f = 32 - uc(d) - 1;\n    d &= ~(1 << f);\n    c += 1;\n    var e = 32 - uc(b) + f;\n    if (30 < e) {\n      var g = f - (f % 5);\n      e = (d & ((1 << g) - 1)).toString(32);\n      d >>= g;\n      f -= g;\n      return { id: (1 << (32 - uc(b) + f)) | (c << f) | d, overflow: e + a };\n    }\n    return { id: (1 << e) | (c << f) | d, overflow: a };\n  }\n  var uc = Math.clz32 ? Math.clz32 : vc,\n    wc = Math.log,\n    xc = Math.LN2;\n  function vc(a) {\n    a >>>= 0;\n    return 0 === a ? 32 : (31 - ((wc(a) / xc) | 0)) | 0;\n  }\n  function yc(a, b) {\n    return (a === b && (0 !== a || 1 / a === 1 / b)) || (a !== a && b !== b);\n  }\n  var zc = 'function' === typeof Object.is ? Object.is : yc,\n    R = null,\n    Ac = null,\n    Bc = null,\n    S = null,\n    T = !1,\n    Cc = !1,\n    U = 0,\n    V = null,\n    Dc = 0;\n  function W() {\n    if (null === R) throw Error(k(321));\n    return R;\n  }\n  function Ec() {\n    if (0 < Dc) throw Error(k(312));\n    return { memoizedState: null, queue: null, next: null };\n  }\n  function Fc() {\n    null === S\n      ? null === Bc\n        ? ((T = !1), (Bc = S = Ec()))\n        : ((T = !0), (S = Bc))\n      : null === S.next\n        ? ((T = !1), (S = S.next = Ec()))\n        : ((T = !0), (S = S.next));\n    return S;\n  }\n  function Gc() {\n    Ac = R = null;\n    Cc = !1;\n    Bc = null;\n    Dc = 0;\n    S = V = null;\n  }\n  function Hc(a, b) {\n    return 'function' === typeof b ? b(a) : b;\n  }\n  function Ic(a, b, c) {\n    R = W();\n    S = Fc();\n    if (T) {\n      var d = S.queue;\n      b = d.dispatch;\n      if (null !== V && ((c = V.get(d)), void 0 !== c)) {\n        V.delete(d);\n        d = S.memoizedState;\n        do (d = a(d, c.action)), (c = c.next);\n        while (null !== c);\n        S.memoizedState = d;\n        return [d, b];\n      }\n      return [S.memoizedState, b];\n    }\n    a =\n      a === Hc ? ('function' === typeof b ? b() : b) : void 0 !== c ? c(b) : b;\n    S.memoizedState = a;\n    a = S.queue = { last: null, dispatch: null };\n    a = a.dispatch = Jc.bind(null, R, a);\n    return [S.memoizedState, a];\n  }\n  function Kc(a, b) {\n    R = W();\n    S = Fc();\n    b = void 0 === b ? null : b;\n    if (null !== S) {\n      var c = S.memoizedState;\n      if (null !== c && null !== b) {\n        var d = c[1];\n        a: if (null === d) d = !1;\n        else {\n          for (var f = 0; f < d.length && f < b.length; f++)\n            if (!zc(b[f], d[f])) {\n              d = !1;\n              break a;\n            }\n          d = !0;\n        }\n        if (d) return c[0];\n      }\n    }\n    a = a();\n    S.memoizedState = [a, b];\n    return a;\n  }\n  function Jc(a, b, c) {\n    if (25 <= Dc) throw Error(k(301));\n    if (a === R)\n      if (\n        ((Cc = !0),\n        (a = { action: c, next: null }),\n        null === V && (V = new Map()),\n        (c = V.get(b)),\n        void 0 === c)\n      )\n        V.set(b, a);\n      else {\n        for (b = c; null !== b.next; ) b = b.next;\n        b.next = a;\n      }\n  }\n  function Lc() {\n    throw Error(k(394));\n  }\n  function Mc() {}\n  var Oc = {\n      readContext: function (a) {\n        return a._currentValue;\n      },\n      useContext: function (a) {\n        W();\n        return a._currentValue;\n      },\n      useMemo: Kc,\n      useReducer: Ic,\n      useRef: function (a) {\n        R = W();\n        S = Fc();\n        var b = S.memoizedState;\n        return null === b ? ((a = { current: a }), (S.memoizedState = a)) : b;\n      },\n      useState: function (a) {\n        return Ic(Hc, a);\n      },\n      useInsertionEffect: Mc,\n      useLayoutEffect: function () {},\n      useCallback: function (a, b) {\n        return Kc(function () {\n          return a;\n        }, b);\n      },\n      useImperativeHandle: Mc,\n      useEffect: Mc,\n      useDebugValue: Mc,\n      useDeferredValue: function (a) {\n        W();\n        return a;\n      },\n      useTransition: function () {\n        W();\n        return [!1, Lc];\n      },\n      useId: function () {\n        var a = Ac.treeContext;\n        var b = a.overflow;\n        a = a.id;\n        a = (a & ~(1 << (32 - uc(a) - 1))).toString(32) + b;\n        var c = Nc;\n        if (null === c) throw Error(k(404));\n        b = U++;\n        a = ':' + c.idPrefix + 'R' + a;\n        0 < b && (a += 'H' + b.toString(32));\n        return a + ':';\n      },\n      useMutableSource: function (a, b) {\n        W();\n        return b(a._source);\n      },\n      useSyncExternalStore: function (a, b, c) {\n        if (void 0 === c) throw Error(k(407));\n        return c();\n      },\n    },\n    Nc = null,\n    Pc =\n      aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED\n        .ReactCurrentDispatcher;\n  function Qc(a) {\n    console.error(a);\n    return null;\n  }\n  function X() {}\n  function Rc(a, b, c, d, f, e, g, h, m) {\n    var q = [],\n      r = new Set();\n    b = {\n      destination: null,\n      responseState: b,\n      progressiveChunkSize: void 0 === d ? 12800 : d,\n      status: 0,\n      fatalError: null,\n      nextSegmentId: 0,\n      allPendingTasks: 0,\n      pendingRootTasks: 0,\n      completedRootSegment: null,\n      abortableTasks: r,\n      pingedTasks: q,\n      clientRenderedBoundaries: [],\n      completedBoundaries: [],\n      partialBoundaries: [],\n      onError: void 0 === f ? Qc : f,\n      onAllReady: void 0 === e ? X : e,\n      onShellReady: void 0 === g ? X : g,\n      onShellError: void 0 === h ? X : h,\n      onFatalError: void 0 === m ? X : m,\n    };\n    c = Sc(b, 0, null, c, !1, !1);\n    c.parentFlushed = !0;\n    a = Tc(b, a, null, c, r, kc, null, sc);\n    q.push(a);\n    return b;\n  }\n  function Tc(a, b, c, d, f, e, g, h) {\n    a.allPendingTasks++;\n    null === c ? a.pendingRootTasks++ : c.pendingTasks++;\n    var m = {\n      node: b,\n      ping: function () {\n        var b = a.pingedTasks;\n        b.push(m);\n        1 === b.length && Uc(a);\n      },\n      blockedBoundary: c,\n      blockedSegment: d,\n      abortSet: f,\n      legacyContext: e,\n      context: g,\n      treeContext: h,\n    };\n    f.add(m);\n    return m;\n  }\n  function Sc(a, b, c, d, f, e) {\n    return {\n      status: 0,\n      id: -1,\n      index: b,\n      parentFlushed: !1,\n      chunks: [],\n      children: [],\n      formatContext: d,\n      boundary: c,\n      lastPushedText: f,\n      textEmbedded: e,\n    };\n  }\n  function Y(a, b) {\n    a = a.onError(b);\n    if (null != a && 'string' !== typeof a)\n      throw Error(\n        'onError returned something with a type other than \"string\". onError should return a string and may return null or undefined but must not return anything else. It received something of type \"' +\n          typeof a +\n          '\" instead',\n      );\n    return a;\n  }\n  function Vc(a, b) {\n    var c = a.onShellError;\n    c(b);\n    c = a.onFatalError;\n    c(b);\n    null !== a.destination\n      ? ((a.status = 2), da(a.destination, b))\n      : ((a.status = 1), (a.fatalError = b));\n  }\n  function Wc(a, b, c, d, f) {\n    R = {};\n    Ac = b;\n    U = 0;\n    for (a = c(d, f); Cc; )\n      (Cc = !1), (U = 0), (Dc += 1), (S = null), (a = c(d, f));\n    Gc();\n    return a;\n  }\n  function Xc(a, b, c, d) {\n    var f = c.render(),\n      e = d.childContextTypes;\n    if (null !== e && void 0 !== e) {\n      var g = b.legacyContext;\n      if ('function' !== typeof c.getChildContext) d = g;\n      else {\n        c = c.getChildContext();\n        for (var h in c)\n          if (!(h in e)) throw Error(k(108, jc(d) || 'Unknown', h));\n        d = N({}, g, c);\n      }\n      b.legacyContext = d;\n      Z(a, b, f);\n      b.legacyContext = g;\n    } else Z(a, b, f);\n  }\n  function Yc(a, b) {\n    if (a && a.defaultProps) {\n      b = N({}, b);\n      a = a.defaultProps;\n      for (var c in a) void 0 === b[c] && (b[c] = a[c]);\n      return b;\n    }\n    return b;\n  }\n  function Zc(a, b, c, d, f) {\n    if ('function' === typeof c)\n      if (c.prototype && c.prototype.isReactComponent) {\n        f = lc(c, b.legacyContext);\n        var e = c.contextType;\n        e = new c(d, 'object' === typeof e && null !== e ? e._currentValue : f);\n        rc(e, c, d, f);\n        Xc(a, b, e, c);\n      } else {\n        e = lc(c, b.legacyContext);\n        f = Wc(a, b, c, d, e);\n        var g = 0 !== U;\n        if (\n          'object' === typeof f &&\n          null !== f &&\n          'function' === typeof f.render &&\n          void 0 === f.$$typeof\n        )\n          rc(f, c, d, e), Xc(a, b, f, c);\n        else if (g) {\n          d = b.treeContext;\n          b.treeContext = tc(d, 1, 0);\n          try {\n            Z(a, b, f);\n          } finally {\n            b.treeContext = d;\n          }\n        } else Z(a, b, f);\n      }\n    else if ('string' === typeof c) {\n      f = b.blockedSegment;\n      e = Sa(f.chunks, c, d, a.responseState, f.formatContext);\n      f.lastPushedText = !1;\n      g = f.formatContext;\n      f.formatContext = Ba(g, c, d);\n      $c(a, b, e);\n      f.formatContext = g;\n      switch (c) {\n        case 'area':\n        case 'base':\n        case 'br':\n        case 'col':\n        case 'embed':\n        case 'hr':\n        case 'img':\n        case 'input':\n        case 'keygen':\n        case 'link':\n        case 'meta':\n        case 'param':\n        case 'source':\n        case 'track':\n        case 'wbr':\n          break;\n        default:\n          f.chunks.push(Ta, u(c), Ua);\n      }\n      f.lastPushedText = !1;\n    } else {\n      switch (c) {\n        case gc:\n        case fc:\n        case Wb:\n        case Xb:\n        case Vb:\n          Z(a, b, d.children);\n          return;\n        case bc:\n          Z(a, b, d.children);\n          return;\n        case ec:\n          throw Error(k(343));\n        case ac:\n          a: {\n            c = b.blockedBoundary;\n            f = b.blockedSegment;\n            e = d.fallback;\n            d = d.children;\n            g = new Set();\n            var h = {\n                id: null,\n                rootSegmentID: -1,\n                parentFlushed: !1,\n                pendingTasks: 0,\n                forceClientRender: !1,\n                completedSegments: [],\n                byteSize: 0,\n                fallbackAbortableTasks: g,\n                errorDigest: null,\n              },\n              m = Sc(a, f.chunks.length, h, f.formatContext, !1, !1);\n            f.children.push(m);\n            f.lastPushedText = !1;\n            var q = Sc(a, 0, null, f.formatContext, !1, !1);\n            q.parentFlushed = !0;\n            b.blockedBoundary = h;\n            b.blockedSegment = q;\n            try {\n              if (\n                ($c(a, b, d),\n                q.lastPushedText && q.textEmbedded && q.chunks.push(Ca),\n                (q.status = 1),\n                ad(h, q),\n                0 === h.pendingTasks)\n              )\n                break a;\n            } catch (r) {\n              (q.status = 4),\n                (h.forceClientRender = !0),\n                (h.errorDigest = Y(a, r));\n            } finally {\n              (b.blockedBoundary = c), (b.blockedSegment = f);\n            }\n            b = Tc(a, e, c, m, g, b.legacyContext, b.context, b.treeContext);\n            a.pingedTasks.push(b);\n          }\n          return;\n      }\n      if ('object' === typeof c && null !== c)\n        switch (c.$$typeof) {\n          case $b:\n            d = Wc(a, b, c.render, d, f);\n            if (0 !== U) {\n              c = b.treeContext;\n              b.treeContext = tc(c, 1, 0);\n              try {\n                Z(a, b, d);\n              } finally {\n                b.treeContext = c;\n              }\n            } else Z(a, b, d);\n            return;\n          case cc:\n            c = c.type;\n            d = Yc(c, d);\n            Zc(a, b, c, d, f);\n            return;\n          case Yb:\n            f = d.children;\n            c = c._context;\n            d = d.value;\n            e = c._currentValue;\n            c._currentValue = d;\n            g = O;\n            O = d = {\n              parent: g,\n              depth: null === g ? 0 : g.depth + 1,\n              context: c,\n              parentValue: e,\n              value: d,\n            };\n            b.context = d;\n            Z(a, b, f);\n            a = O;\n            if (null === a) throw Error(k(403));\n            d = a.parentValue;\n            a.context._currentValue = d === hc ? a.context._defaultValue : d;\n            a = O = a.parent;\n            b.context = a;\n            return;\n          case Zb:\n            d = d.children;\n            d = d(c._currentValue);\n            Z(a, b, d);\n            return;\n          case dc:\n            f = c._init;\n            c = f(c._payload);\n            d = Yc(c, d);\n            Zc(a, b, c, d, void 0);\n            return;\n        }\n      throw Error(k(130, null == c ? c : typeof c, ''));\n    }\n  }\n  function Z(a, b, c) {\n    b.node = c;\n    if ('object' === typeof c && null !== c) {\n      switch (c.$$typeof) {\n        case Tb:\n          Zc(a, b, c.type, c.props, c.ref);\n          return;\n        case Ub:\n          throw Error(k(257));\n        case dc:\n          var d = c._init;\n          c = d(c._payload);\n          Z(a, b, c);\n          return;\n      }\n      if (ra(c)) {\n        bd(a, b, c);\n        return;\n      }\n      null === c || 'object' !== typeof c\n        ? (d = null)\n        : ((d = (ic && c[ic]) || c['@@iterator']),\n          (d = 'function' === typeof d ? d : null));\n      if (d && (d = d.call(c))) {\n        c = d.next();\n        if (!c.done) {\n          var f = [];\n          do f.push(c.value), (c = d.next());\n          while (!c.done);\n          bd(a, b, f);\n        }\n        return;\n      }\n      a = Object.prototype.toString.call(c);\n      throw Error(\n        k(\n          31,\n          '[object Object]' === a\n            ? 'object with keys {' + Object.keys(c).join(', ') + '}'\n            : a,\n        ),\n      );\n    }\n    'string' === typeof c\n      ? ((d = b.blockedSegment),\n        (d.lastPushedText = Da(\n          b.blockedSegment.chunks,\n          c,\n          a.responseState,\n          d.lastPushedText,\n        )))\n      : 'number' === typeof c &&\n        ((d = b.blockedSegment),\n        (d.lastPushedText = Da(\n          b.blockedSegment.chunks,\n          '' + c,\n          a.responseState,\n          d.lastPushedText,\n        )));\n  }\n  function bd(a, b, c) {\n    for (var d = c.length, f = 0; f < d; f++) {\n      var e = b.treeContext;\n      b.treeContext = tc(e, d, f);\n      try {\n        $c(a, b, c[f]);\n      } finally {\n        b.treeContext = e;\n      }\n    }\n  }\n  function $c(a, b, c) {\n    var d = b.blockedSegment.formatContext,\n      f = b.legacyContext,\n      e = b.context;\n    try {\n      return Z(a, b, c);\n    } catch (m) {\n      if (\n        (Gc(),\n        'object' === typeof m && null !== m && 'function' === typeof m.then)\n      ) {\n        c = m;\n        var g = b.blockedSegment,\n          h = Sc(\n            a,\n            g.chunks.length,\n            null,\n            g.formatContext,\n            g.lastPushedText,\n            !0,\n          );\n        g.children.push(h);\n        g.lastPushedText = !1;\n        a = Tc(\n          a,\n          b.node,\n          b.blockedBoundary,\n          h,\n          b.abortSet,\n          b.legacyContext,\n          b.context,\n          b.treeContext,\n        ).ping;\n        c.then(a, a);\n        b.blockedSegment.formatContext = d;\n        b.legacyContext = f;\n        b.context = e;\n        Q(e);\n      } else\n        throw (\n          ((b.blockedSegment.formatContext = d),\n          (b.legacyContext = f),\n          (b.context = e),\n          Q(e),\n          m)\n        );\n    }\n  }\n  function cd(a) {\n    var b = a.blockedBoundary;\n    a = a.blockedSegment;\n    a.status = 3;\n    dd(this, b, a);\n  }\n  function ed(a, b, c) {\n    var d = a.blockedBoundary;\n    a.blockedSegment.status = 3;\n    null === d\n      ? (b.allPendingTasks--,\n        2 !== b.status &&\n          ((b.status = 2), null !== b.destination && b.destination.close()))\n      : (d.pendingTasks--,\n        d.forceClientRender ||\n          ((d.forceClientRender = !0),\n          (a = void 0 === c ? Error(k(432)) : c),\n          (d.errorDigest = b.onError(a)),\n          d.parentFlushed && b.clientRenderedBoundaries.push(d)),\n        d.fallbackAbortableTasks.forEach(function (a) {\n          return ed(a, b, c);\n        }),\n        d.fallbackAbortableTasks.clear(),\n        b.allPendingTasks--,\n        0 === b.allPendingTasks && ((d = b.onAllReady), d()));\n  }\n  function ad(a, b) {\n    if (\n      0 === b.chunks.length &&\n      1 === b.children.length &&\n      null === b.children[0].boundary\n    ) {\n      var c = b.children[0];\n      c.id = b.id;\n      c.parentFlushed = !0;\n      1 === c.status && ad(a, c);\n    } else a.completedSegments.push(b);\n  }\n  function dd(a, b, c) {\n    if (null === b) {\n      if (c.parentFlushed) {\n        if (null !== a.completedRootSegment) throw Error(k(389));\n        a.completedRootSegment = c;\n      }\n      a.pendingRootTasks--;\n      0 === a.pendingRootTasks &&\n        ((a.onShellError = X), (b = a.onShellReady), b());\n    } else\n      b.pendingTasks--,\n        b.forceClientRender ||\n          (0 === b.pendingTasks\n            ? (c.parentFlushed && 1 === c.status && ad(b, c),\n              b.parentFlushed && a.completedBoundaries.push(b),\n              b.fallbackAbortableTasks.forEach(cd, a),\n              b.fallbackAbortableTasks.clear())\n            : c.parentFlushed &&\n              1 === c.status &&\n              (ad(b, c),\n              1 === b.completedSegments.length &&\n                b.parentFlushed &&\n                a.partialBoundaries.push(b)));\n    a.allPendingTasks--;\n    0 === a.allPendingTasks && ((a = a.onAllReady), a());\n  }\n  function Uc(a) {\n    if (2 !== a.status) {\n      var b = O,\n        c = Pc.current;\n      Pc.current = Oc;\n      var d = Nc;\n      Nc = a.responseState;\n      try {\n        var f = a.pingedTasks,\n          e;\n        for (e = 0; e < f.length; e++) {\n          var g = f[e];\n          var h = a,\n            m = g.blockedSegment;\n          if (0 === m.status) {\n            Q(g.context);\n            try {\n              Z(h, g, g.node),\n                m.lastPushedText && m.textEmbedded && m.chunks.push(Ca),\n                g.abortSet.delete(g),\n                (m.status = 1),\n                dd(h, g.blockedBoundary, m);\n            } catch (G) {\n              if (\n                (Gc(),\n                'object' === typeof G &&\n                  null !== G &&\n                  'function' === typeof G.then)\n              ) {\n                var q = g.ping;\n                G.then(q, q);\n              } else {\n                g.abortSet.delete(g);\n                m.status = 4;\n                var r = g.blockedBoundary,\n                  v = G,\n                  A = Y(h, v);\n                null === r\n                  ? Vc(h, v)\n                  : (r.pendingTasks--,\n                    r.forceClientRender ||\n                      ((r.forceClientRender = !0),\n                      (r.errorDigest = A),\n                      r.parentFlushed && h.clientRenderedBoundaries.push(r)));\n                h.allPendingTasks--;\n                if (0 === h.allPendingTasks) {\n                  var F = h.onAllReady;\n                  F();\n                }\n              }\n            } finally {\n            }\n          }\n        }\n        f.splice(0, e);\n        null !== a.destination && fd(a, a.destination);\n      } catch (G) {\n        Y(a, G), Vc(a, G);\n      } finally {\n        (Nc = d), (Pc.current = c), c === Oc && Q(b);\n      }\n    }\n  }\n  function gd(a, b, c) {\n    c.parentFlushed = !0;\n    switch (c.status) {\n      case 0:\n        var d = (c.id = a.nextSegmentId++);\n        c.lastPushedText = !1;\n        c.textEmbedded = !1;\n        a = a.responseState;\n        p(b, Va);\n        p(b, a.placeholderPrefix);\n        a = u(d.toString(16));\n        p(b, a);\n        return t(b, Wa);\n      case 1:\n        c.status = 2;\n        var f = !0;\n        d = c.chunks;\n        var e = 0;\n        c = c.children;\n        for (var g = 0; g < c.length; g++) {\n          for (f = c[g]; e < f.index; e++) p(b, d[e]);\n          f = hd(a, b, f);\n        }\n        for (; e < d.length - 1; e++) p(b, d[e]);\n        e < d.length && (f = t(b, d[e]));\n        return f;\n      default:\n        throw Error(k(390));\n    }\n  }\n  function hd(a, b, c) {\n    var d = c.boundary;\n    if (null === d) return gd(a, b, c);\n    d.parentFlushed = !0;\n    if (d.forceClientRender)\n      (d = d.errorDigest),\n        t(b, $a),\n        p(b, bb),\n        d && (p(b, db), p(b, u(C(d))), p(b, cb)),\n        t(b, eb),\n        gd(a, b, c);\n    else if (0 < d.pendingTasks) {\n      d.rootSegmentID = a.nextSegmentId++;\n      0 < d.completedSegments.length && a.partialBoundaries.push(d);\n      var f = a.responseState;\n      var e = f.nextSuspenseID++;\n      f = w(f.boundaryPrefix + e.toString(16));\n      d = d.id = f;\n      fb(b, a.responseState, d);\n      gd(a, b, c);\n    } else if (d.byteSize > a.progressiveChunkSize)\n      (d.rootSegmentID = a.nextSegmentId++),\n        a.completedBoundaries.push(d),\n        fb(b, a.responseState, d.id),\n        gd(a, b, c);\n    else {\n      t(b, Xa);\n      c = d.completedSegments;\n      if (1 !== c.length) throw Error(k(391));\n      hd(a, b, c[0]);\n    }\n    return t(b, ab);\n  }\n  function id(a, b, c) {\n    Bb(b, a.responseState, c.formatContext, c.id);\n    hd(a, b, c);\n    return Cb(b, c.formatContext);\n  }\n  function jd(a, b, c) {\n    for (var d = c.completedSegments, f = 0; f < d.length; f++)\n      kd(a, b, c, d[f]);\n    d.length = 0;\n    a = a.responseState;\n    d = c.id;\n    c = c.rootSegmentID;\n    p(b, a.startInlineScript);\n    a.sentCompleteBoundaryFunction\n      ? p(b, Jb)\n      : ((a.sentCompleteBoundaryFunction = !0), p(b, Ib));\n    if (null === d) throw Error(k(395));\n    c = u(c.toString(16));\n    p(b, d);\n    p(b, Kb);\n    p(b, a.segmentPrefix);\n    p(b, c);\n    return t(b, Lb);\n  }\n  function kd(a, b, c, d) {\n    if (2 === d.status) return !0;\n    var f = d.id;\n    if (-1 === f) {\n      if (-1 === (d.id = c.rootSegmentID)) throw Error(k(392));\n      return id(a, b, d);\n    }\n    id(a, b, d);\n    a = a.responseState;\n    p(b, a.startInlineScript);\n    a.sentCompleteSegmentFunction\n      ? p(b, Eb)\n      : ((a.sentCompleteSegmentFunction = !0), p(b, Db));\n    p(b, a.segmentPrefix);\n    f = u(f.toString(16));\n    p(b, f);\n    p(b, Gb);\n    p(b, a.placeholderPrefix);\n    p(b, f);\n    return t(b, Hb);\n  }\n  function fd(a, b) {\n    l = new Uint8Array(512);\n    n = 0;\n    try {\n      var c = a.completedRootSegment;\n      if (null !== c && 0 === a.pendingRootTasks) {\n        hd(a, b, c);\n        a.completedRootSegment = null;\n        var d = a.responseState.bootstrapChunks;\n        for (c = 0; c < d.length - 1; c++) p(b, d[c]);\n        c < d.length && t(b, d[c]);\n      }\n      var f = a.clientRenderedBoundaries,\n        e;\n      for (e = 0; e < f.length; e++) {\n        var g = f[e];\n        d = b;\n        var h = a.responseState,\n          m = g.id,\n          q = g.errorDigest,\n          r = g.errorMessage,\n          v = g.errorComponentStack;\n        p(d, h.startInlineScript);\n        h.sentClientRenderFunction\n          ? p(d, Nb)\n          : ((h.sentClientRenderFunction = !0), p(d, Mb));\n        if (null === m) throw Error(k(395));\n        p(d, m);\n        p(d, Ob);\n        if (q || r || v) p(d, Qb), p(d, u(Sb(q || '')));\n        if (r || v) p(d, Qb), p(d, u(Sb(r || '')));\n        v && (p(d, Qb), p(d, u(Sb(v))));\n        if (!t(d, Pb)) {\n          a.destination = null;\n          e++;\n          f.splice(0, e);\n          return;\n        }\n      }\n      f.splice(0, e);\n      var A = a.completedBoundaries;\n      for (e = 0; e < A.length; e++)\n        if (!jd(a, b, A[e])) {\n          a.destination = null;\n          e++;\n          A.splice(0, e);\n          return;\n        }\n      A.splice(0, e);\n      ba(b);\n      l = new Uint8Array(512);\n      n = 0;\n      var F = a.partialBoundaries;\n      for (e = 0; e < F.length; e++) {\n        var G = F[e];\n        a: {\n          f = a;\n          g = b;\n          var ma = G.completedSegments;\n          for (h = 0; h < ma.length; h++)\n            if (!kd(f, g, G, ma[h])) {\n              h++;\n              ma.splice(0, h);\n              var Fb = !1;\n              break a;\n            }\n          ma.splice(0, h);\n          Fb = !0;\n        }\n        if (!Fb) {\n          a.destination = null;\n          e++;\n          F.splice(0, e);\n          return;\n        }\n      }\n      F.splice(0, e);\n      var na = a.completedBoundaries;\n      for (e = 0; e < na.length; e++)\n        if (!jd(a, b, na[e])) {\n          a.destination = null;\n          e++;\n          na.splice(0, e);\n          return;\n        }\n      na.splice(0, e);\n    } finally {\n      ba(b),\n        0 === a.allPendingTasks &&\n          0 === a.pingedTasks.length &&\n          0 === a.clientRenderedBoundaries.length &&\n          0 === a.completedBoundaries.length &&\n          b.close();\n    }\n  }\n  function ld(a, b) {\n    try {\n      var c = a.abortableTasks;\n      c.forEach(function (c) {\n        return ed(c, a, b);\n      });\n      c.clear();\n      null !== a.destination && fd(a, a.destination);\n    } catch (d) {\n      Y(a, d), Vc(a, d);\n    }\n  }\n  renderToReadableStream = function (a, b) {\n    return new Promise(function (c, d) {\n      var f,\n        e,\n        g = new Promise(function (a, b) {\n          e = a;\n          f = b;\n        }),\n        h = Rc(\n          a,\n          za(\n            b ? b.identifierPrefix : void 0,\n            b ? b.nonce : void 0,\n            b ? b.bootstrapScriptContent : void 0,\n            b ? b.bootstrapScripts : void 0,\n            b ? b.bootstrapModules : void 0,\n          ),\n          Aa(b ? b.namespaceURI : void 0),\n          b ? b.progressiveChunkSize : void 0,\n          b ? b.onError : void 0,\n          e,\n          function () {\n            var a = new ReadableStream(\n              {\n                type: 'bytes',\n                pull: function (a) {\n                  if (1 === h.status) (h.status = 2), da(a, h.fatalError);\n                  else if (2 !== h.status && null === h.destination) {\n                    h.destination = a;\n                    try {\n                      fd(h, a);\n                    } catch (A) {\n                      Y(h, A), Vc(h, A);\n                    }\n                  }\n                },\n                cancel: function () {\n                  ld(h);\n                },\n              },\n              { highWaterMark: 0 },\n            );\n            a.allReady = g;\n            c(a);\n          },\n          function (a) {\n            g.catch(function () {});\n            d(a);\n          },\n          f,\n        );\n      if (b && b.signal) {\n        var m = b.signal,\n          q = function () {\n            ld(h, m.reason);\n            m.removeEventListener('abort', q);\n          };\n        m.addEventListener('abort', q);\n      }\n      Uc(h);\n    });\n  };\n}\n\nroutes.set('/react-byob', async () => {\n  const stream = await renderToReadableStream(jsx(App, {}), {\n    bootstrapScripts: ['/main.js'],\n  });\n  return new Response(stream, {\n    headers: {\n      'content-type': 'text/html',\n    },\n  });\n\n  function App() {\n    const qq = typeof jsx !== 'undefined' ? jsx : q;\n    return qq('html', {\n      children: [\n        qq('title', {\n          children: 'My app',\n        }),\n        qq('body', {\n          children: qq('h1', {\n            children: 'App',\n          }),\n        }),\n      ],\n    });\n  }\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/request-auto-decompress.js",
    "content": "/* eslint-env serviceworker */\nimport { assert, assertRejects } from './assertions.js';\nimport { routes } from './routes.js';\n\n// Request.fastly.decompressGzip option -- automatic gzip decompression of responses\nroutes.set('/request/constructor/fastly/decompressGzip/true', async () => {\n  const request = new Request('https://http-me.fastly.dev/gzip', {\n    headers: {\n      accept: 'application/json',\n    },\n    backend: 'httpme',\n    fastly: {\n      decompressGzip: true,\n    },\n  });\n  const response = await fetch(request);\n  // This should work because the response will be decompressed and valid json.\n  const body = await response.json();\n  assert(body.gzipped, true, `body.gzipped`);\n});\n\nroutes.set('/request/constructor/fastly/decompressGzip/false', async () => {\n  const request = new Request('https://http-me.fastly.dev/gzip', {\n    headers: {\n      accept: 'application/json',\n    },\n    backend: 'httpme',\n    cacheOverride: 'pass',\n    fastly: {\n      decompressGzip: false,\n    },\n  });\n  const response = await fetch(request);\n  await assertRejects(async function () {\n    // This should throw because the response will be gzipped compressed, which we can not parse as json.\n    await response.json();\n  });\n});\n\nroutes.set('/fetch/requestinit/fastly/decompressGzip/true', async () => {\n  const response = await fetch('https://http-me.fastly.dev/gzip', {\n    headers: {\n      accept: 'application/json',\n    },\n    backend: 'httpme',\n    fastly: {\n      decompressGzip: true,\n    },\n  });\n  // This should work because the response will be decompressed and valid json.\n  const body = await response.json();\n  assert(body.gzipped, true, `body.gzipped`);\n});\n\nroutes.set('/fetch/requestinit/fastly/decompressGzip/false', async () => {\n  const response = await fetch('https://http-me.fastly.dev/gzip', {\n    headers: {\n      accept: 'application/json',\n    },\n    backend: 'httpme',\n    cacheOverride: 'pass',\n    fastly: {\n      decompressGzip: false,\n    },\n  });\n  await assertRejects(async function () {\n    // This should throw because the response will be gzipped compressed, which we can not parse as json.\n    await response.json();\n  });\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/request-body-async-simple.js",
    "content": "/* eslint-env serviceworker */\n\n/**\n * Simplified test for body loss across async boundary\n * Based on Canva's bug report: https://github.com/paulina-canva/body-bug-repro\n */\n\nimport { assert } from './assertions.js';\nimport { routes } from './routes.js';\n\n// Test: Body lost across async boundary (BUG)\nroutes.set('/request/body-async-simple/no-workaround', async (event) => {\n  const req = event.request;\n  const originalLength = parseInt(req.headers.get('content-length') || '0', 10);\n\n  console.log(`Original content-length: ${originalLength}`);\n\n  // Create new request with body stream\n  const forwardRequest = new Request('http://example.com/dummy', {\n    method: 'POST',\n    headers: req.headers,\n    body: req.body, // Pass the ReadableStream\n  });\n\n  // Async operations (this is where the bug happens)\n  await Promise.resolve();\n  await Promise.resolve();\n\n  // Now try to read the body\n  const bodyText = await forwardRequest.text();\n  const receivedLength = bodyText.length;\n\n  console.log(\n    `Body after async: ${receivedLength} bytes (expected ${originalLength})`,\n  );\n\n  if (receivedLength === 0 && originalLength > 0) {\n    console.log(`Body was lost! Expected ${originalLength} bytes, got 0`);\n    return new Response(\n      JSON.stringify({\n        bug: true,\n        expected: originalLength,\n        received: receivedLength,\n        message: 'Body lost across async boundary',\n      }),\n      {\n        status: 500,\n        headers: { 'Content-Type': 'application/json' },\n      },\n    );\n  }\n\n  assert(receivedLength, originalLength, 'Body should not be lost');\n  return new Response('ok');\n});\n\n// Test: Body preserved with workaround\nroutes.set('/request/body-async-simple/with-workaround', async (event) => {\n  const req = event.request;\n  const originalLength = parseInt(req.headers.get('content-length') || '0', 10);\n\n  console.log(`Original content-length (workaround): ${originalLength}`);\n\n  // WORKAROUND: Call clone to force buffering\n  const _dummy = await req.clone();\n\n  const forwardRequest = new Request('http://example.com/dummy', {\n    method: 'POST',\n    headers: req.headers,\n    body: req.body,\n  });\n\n  // Same async operations\n  await Promise.resolve();\n  await Promise.resolve();\n\n  const bodyText = await forwardRequest.text();\n  const receivedLength = bodyText.length;\n\n  console.log(`Body with workaround: ${receivedLength} bytes`);\n\n  assert(receivedLength, originalLength, 'Body preserved with workaround');\n  return new Response('ok');\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/request-cache-key.js",
    "content": "/* eslint-env serviceworker */\nimport { assert, assertThrows } from './assertions.js';\nimport { routes } from './routes.js';\n\n// Request setCacheKey method\n{\n  routes.set('/request/setCacheKey/called-as-constructor', () => {\n    assertThrows(\n      () => {\n        new Request.prototype.setCacheKey('1', '1');\n      },\n      TypeError,\n      `Request.prototype.setCacheKey is not a constructor`,\n    );\n  });\n  routes.set('/request/setCacheKey/called-unbound', () => {\n    assertThrows(() => {\n      Request.prototype.setCacheKey.call(undefined, '1', '2');\n    }, TypeError);\n  });\n  // https://tc39.es/ecma262/#sec-tostring\n  routes.set('/request/setCacheKey/key-parameter-calls-7.1.17-ToString', () => {\n    let sentinel;\n    const test = () => {\n      sentinel = Symbol();\n      const key = {\n        toString() {\n          throw sentinel;\n        },\n      };\n      const request = new Request('https://www.fastly.com');\n      request.setCacheKey(key);\n    };\n    assertThrows(test);\n    try {\n      test();\n    } catch (thrownError) {\n      assert(thrownError, sentinel, 'thrownError === sentinel');\n    }\n    assertThrows(\n      () => {\n        const request = new Request('https://www.fastly.com');\n        request.setCacheKey(Symbol());\n      },\n      Error,\n      `can't convert symbol to string`,\n    );\n  });\n  routes.set('/request/setCacheKey/key-parameter-not-supplied', () => {\n    assertThrows(\n      () => {\n        const request = new Request('https://www.fastly.com');\n        request.setCacheKey();\n      },\n      TypeError,\n      `setCacheKey: At least 1 argument required, but only 0 passed`,\n    );\n  });\n  routes.set('/request/setCacheKey/key-valid', () => {\n    const request = new Request('https://www.fastly.com');\n    request.setCacheKey('meow');\n    assert(\n      request.headers.get('fastly-xqd-cache-key'),\n      '404CDD7BC109C432F8CC2443B45BCFE95980F5107215C645236E577929AC3E52',\n      `request.headers.get('fastly-xqd-cache-key'`,\n    );\n  });\n  routes.set('/request/constructor/cacheKey', () => {\n    const request = new Request('https://www.fastly.com', { cacheKey: 'meow' });\n    assert(\n      request.headers.get('fastly-xqd-cache-key'),\n      '404CDD7BC109C432F8CC2443B45BCFE95980F5107215C645236E577929AC3E52',\n      `request.headers.get('fastly-xqd-cache-key'`,\n    );\n  });\n}\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/request-clone.js",
    "content": "/* eslint-env serviceworker */\n\nimport { assert, assertThrows } from './assertions.js';\nimport { routes } from './routes.js';\n\nroutes.set('/request/clone/called-as-constructor', () => {\n  assertThrows(\n    () => {\n      new Request.prototype.clone();\n    },\n    TypeError,\n    `Request.prototype.clone is not a constructor`,\n  );\n});\nroutes.set('/request/clone/called-unbound', () => {\n  assertThrows(() => {\n    Request.prototype.clone.call(undefined);\n  }, TypeError);\n});\nroutes.set('/request/clone/valid', async () => {\n  let request = new Request('https://www.fastly.com', {\n    headers: {\n      hello: 'world',\n    },\n    body: 'te',\n    method: 'post',\n  });\n  let newRequest = request.clone();\n  assert(newRequest instanceof Request, true, 'newRequest instanceof Request');\n  assert(newRequest.method, request.method, 'newRequest.method');\n  assert(newRequest.url, request.url, 'newRequest.url');\n  assert(newRequest.headers, request.headers, 'newRequest.headers');\n  assert(request.bodyUsed, false, 'request.bodyUsed');\n  assert(newRequest.bodyUsed, false, 'newRequest.bodyUsed');\n  assert(\n    newRequest.body instanceof ReadableStream,\n    true,\n    'newRequest.body instanceof ReadableStream',\n  );\n\n  request = new Request('https://www.fastly.com', {\n    method: 'get',\n  });\n  newRequest = request.clone();\n\n  assert(newRequest.bodyUsed, false, 'newRequest.bodyUsed');\n  assert(newRequest.body, null, 'newRequest.body');\n});\nroutes.set('/request/clone/invalid', async () => {\n  const request = new Request('https://www.fastly.com', {\n    headers: {\n      hello: 'world',\n    },\n    body: 'te',\n    method: 'post',\n  });\n  await request.text();\n  assertThrows(() => request.clone());\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/request-headers.js",
    "content": "/* eslint-env serviceworker */\nimport { routes } from './routes.js';\n\n{\n  routes.set('/request-upstream', async (event) => {\n    /**\n     * @type {Request} request\n     **/\n    const request = event.request;\n    const headers = {};\n    for (const [name, value] of request.headers.entries()) {\n      if (!headers[name]) {\n        headers[name] = [];\n      }\n      headers[name].push(value);\n    }\n    delete headers['user-agent'];\n    return new Response(JSON.stringify(headers), { headers: request.headers });\n  });\n  routes.set('/request-init', async () => {\n    const requestHeaders = new Headers();\n    requestHeaders.append('cats', 'aki');\n    requestHeaders.append('cats', 'yuki');\n    requestHeaders.append('dogs', 'buster');\n    requestHeaders.append('numbers', '1');\n    requestHeaders.append('numbers', '2');\n    requestHeaders.append('numbers', '3');\n    requestHeaders.append('numbers', '4');\n    requestHeaders.append('numbers', '5');\n    requestHeaders.append('numbers', '6');\n    requestHeaders.append('numbers', '7');\n    requestHeaders.append('numbers', '8');\n    requestHeaders.append('numbers', '9');\n    let request = new Request('https://www.exmaple.com', {\n      headers: requestHeaders,\n    });\n\n    const headers = {};\n    for (const [name, value] of request.headers.entries()) {\n      if (!headers[name]) {\n        headers[name] = [];\n      }\n      headers[name].push(value);\n    }\n    delete headers['user-agent'];\n    return new Response(JSON.stringify(headers), { headers: request.headers });\n  });\n  routes.set('/request-direct', async () => {\n    let request = new Request('https://www.exmaple.com');\n\n    request.headers.append('cats', 'aki');\n    request.headers.append('cats', 'yuki');\n    request.headers.append('dogs', 'buster');\n    request.headers.append('numbers', '1');\n    request.headers.append('numbers', '2');\n    request.headers.append('numbers', '3');\n    request.headers.append('numbers', '4');\n    request.headers.append('numbers', '5');\n    request.headers.append('numbers', '6');\n    request.headers.append('numbers', '7');\n    request.headers.append('numbers', '8');\n    request.headers.append('numbers', '9');\n    const headers = {};\n    for (const [name, value] of request.headers.entries()) {\n      if (!headers[name]) {\n        headers[name] = [];\n      }\n      headers[name].push(value);\n    }\n    delete headers['user-agent'];\n    return new Response(JSON.stringify(headers), { headers: request.headers });\n  });\n}\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/request-method.js",
    "content": "/* eslint-env serviceworker */\n\nimport { assert } from './assertions.js';\nimport { routes } from './routes.js';\n\nroutes.set('/request/method/host', (event) => {\n  return new Response('', {\n    headers: {\n      result: event.request.method,\n    },\n  });\n});\n\nroutes.set('/request/method/guest', () => {\n  const methods = [\n    ['get', 'GET'],\n    ['GET', 'GET'],\n    ['GeT', 'GET'],\n    ['head', 'HEAD'],\n    ['HEAD', 'HEAD'],\n    ['HeaD', 'HEAD'],\n    ['options', 'OPTIONS'],\n    ['OPTIONS', 'OPTIONS'],\n    ['OPtIOnS', 'OPTIONS'],\n    ['post', 'POST'],\n    ['POST', 'POST'],\n    ['pOSt', 'POST'],\n    ['put', 'PUT'],\n    ['PUT', 'PUT'],\n    ['Put', 'PUT'],\n    ['delete', 'DELETE'],\n    ['DELETE', 'DELETE'],\n    ['DELete', 'DELETE'],\n    ['hello', 'hello'],\n    ['HELLO', 'HELLO'],\n    ['HEllO', 'HEllO'],\n    // TODO: Add # $ % & when the platform supports them\n    [\n      '!*+-.^_`|~1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',\n      '!*+-.^_`|~1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',\n    ],\n  ];\n  for (const [method, expected] of methods) {\n    const result = new Request('http://a.a', { method: method }).method;\n    assert(\n      result,\n      expected,\n      `new Request('http://a.a', {method: \"${method}\"}).method`,\n    );\n  }\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/response-json.js",
    "content": "/* eslint-env serviceworker */\nimport { assert, assertThrows } from './assertions.js';\nimport { routes } from './routes.js';\n\nroutes.set('/response/json', async () => {\n  const APPLICATION_JSON = 'application/json';\n  const FOO_BAR = 'foo/bar';\n\n  const INIT_TESTS = [\n    [undefined, 200, '', APPLICATION_JSON, {}],\n    [{ status: 400 }, 400, '', APPLICATION_JSON, {}],\n    [{ statusText: 'foo' }, 200, 'foo', APPLICATION_JSON, {}],\n    [{ headers: {} }, 200, '', APPLICATION_JSON, {}],\n    [{ headers: { 'content-type': FOO_BAR } }, 200, '', FOO_BAR, {}],\n    [\n      { headers: { 'x-foo': 'bar' } },\n      200,\n      '',\n      APPLICATION_JSON,\n      { 'x-foo': 'bar' },\n    ],\n  ];\n\n  for (const [\n    init,\n    expectedStatus,\n    expectedStatusText,\n    expectedContentType,\n    expectedHeaders,\n  ] of INIT_TESTS) {\n    const response = Response.json('hello world', init);\n    assert(response.type, 'default', 'response.type');\n    assert(response.status, expectedStatus, 'response.status');\n    assert(response.statusText, expectedStatusText, 'response.statusText');\n    assert(\n      response.headers.get('content-type'),\n      expectedContentType,\n      'response.headers.get(\"content-type\")',\n    );\n    for (const key in expectedHeaders) {\n      assert(\n        response.headers.get(key),\n        expectedHeaders[key],\n        'response.headers.get(key)',\n      );\n    }\n    const data = await response.json();\n    assert(data, 'hello world', 'data');\n  }\n\n  const nullBodyStatus = [204, 205, 304];\n  for (const status of nullBodyStatus) {\n    assertThrows(function () {\n      Response.json('hello world', { status: status });\n    }, TypeError);\n  }\n\n  const response = Response.json({ foo: 'bar' });\n  const data = await response.json();\n  assert(typeof data, 'object', 'typeof data');\n  assert(data.foo, 'bar', 'data.foo');\n\n  assertThrows(function () {\n    Response.json(Symbol('foo'));\n  }, TypeError);\n\n  const a = { b: 1 };\n  a.a = a;\n  assertThrows(function () {\n    Response.json(a);\n  }, TypeError);\n\n  class CustomError extends Error {\n    name = 'CustomError';\n  }\n  assertThrows(function () {\n    Response.json({\n      get foo() {\n        throw new CustomError('bar');\n      },\n    });\n  }, CustomError);\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/response-redirect.js",
    "content": "/* eslint-env serviceworker */\nimport { assert, assertThrows } from './assertions.js';\nimport { routes } from './routes.js';\n\nroutes.set('/response/redirect', async () => {\n  const url = 'http://test.url:1234/';\n  const redirectResponse = Response.redirect(url);\n  assert(redirectResponse.type, 'default');\n  assert(redirectResponse.redirected, false);\n  assert(redirectResponse.ok, false);\n  assert(redirectResponse.status, 302, 'Default redirect status is 302');\n  assert(redirectResponse.headers.get('Location'), url);\n  assert(redirectResponse.statusText, '');\n\n  for (const status of [301, 302, 303, 307, 308]) {\n    const redirectResponse = Response.redirect(url, status);\n    assert(redirectResponse.type, 'default');\n    assert(redirectResponse.redirected, false);\n    assert(redirectResponse.ok, false);\n    assert(redirectResponse.status, status, 'Redirect status is ' + status);\n    assert(redirectResponse.headers.get('Location'), url);\n    assert(redirectResponse.statusText, '');\n  }\n  const invalidUrl = 'http://:This is not an url';\n  assertThrows(function () {\n    Response.redirect(invalidUrl);\n  }, TypeError);\n  for (const invalidStatus of [200, 309, 400, 500]) {\n    assertThrows(function () {\n      Response.redirect(url, invalidStatus);\n    }, RangeError);\n  }\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/response.js",
    "content": "/* eslint-env serviceworker */\n\nimport { routes } from './routes.js';\nimport { assert, streamToString } from './assertions.js';\nimport { allowDynamicBackends } from 'fastly:experimental';\n\nroutes.set('/response/stall', async (event) => {\n  // keep connection open 10 seconds\n  event.waitUntil(new Promise((resolve) => setTimeout(resolve, 10_000)));\n  return new Response(\n    new ReadableStream({\n      start(controller) {\n        // stall\n      },\n    }),\n  );\n});\n\nroutes.set('/response/text/guest-backed-stream', async () => {\n  let contents = new Array(10).fill(new Uint8Array(500).fill(65));\n  contents.push(new Uint8Array([0, 66]));\n  contents.push(new Uint8Array([1, 1, 2, 65]));\n  let res = new Response(iteratableToStream(contents));\n  let text = await res.text();\n\n  assert(\n    text,\n    'A'.repeat(5000) + '\\x00B\\x01\\x01\\x02A',\n    `await res.text() === \"a\".repeat(5000)`,\n  );\n});\n\nroutes.set('/response/json/guest-backed-stream', async () => {\n  let obj = { a: 1, b: 2, c: { d: 3 } };\n  let encoder = new TextEncoder();\n  let contents = encoder.encode(JSON.stringify(obj));\n  let res = new Response(iteratableToStream([contents]));\n  let json = await res.json();\n\n  assert(json, obj, `await res.json() === obj`);\n});\n\nroutes.set('/response/arrayBuffer/guest-backed-stream', async () => {\n  let obj = { a: 1, b: 2, c: { d: 3 } };\n  let encoder = new TextEncoder();\n  let contents = encoder.encode(JSON.stringify(obj));\n  let res = new Response(iteratableToStream([contents]));\n  let json = await res.arrayBuffer();\n\n  assert(json, contents.buffer, `await res.json() === contents.buffer`);\n});\n\nroutes.set('/response/ip-port-undefined', async () => {\n  let res = new Response();\n  assert(res.ip, undefined);\n  assert(res.port, undefined);\n});\n\nroutes.set('/response/request-body-init', async () => {\n  allowDynamicBackends(true);\n  const downloadResp = await fetch('https://http-me.fastly.dev/json');\n  const postResp = await fetch(\n    new Request('https://http-me.fastly.dev/anything', {\n      method: 'POST',\n      body: downloadResp.body,\n    }),\n  );\n  let body = await postResp.json();\n  assert(JSON.parse(body['body'])['data']['name'] === 'Test Product', true);\n});\n\nroutes.set('/response/blob', async () => {\n  const blob = new Blob(['<h1>blob</h1>'], { type: 'text/html' });\n  return new Response(blob);\n});\n\nfunction iteratableToStream(iterable) {\n  return new ReadableStream({\n    async pull(controller) {\n      for await (const value of iterable) {\n        controller.enqueue(value);\n      }\n      controller.close();\n    },\n  });\n}\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/routes.js",
    "content": "import { env } from 'fastly:env';\n\n/**\n * @type {Map<string, (FetchEvent) => Promise<Response>>}\n */\nexport const routes = new Map();\nroutes.set('/', () => {\n  routes.delete('/');\n  let test_routes = Array.from(routes.keys());\n  return new Response(JSON.stringify(test_routes), {\n    headers: { 'content-type': 'application/json' },\n  });\n});\n\nexport function isRunningLocally() {\n  return (\n    env('FASTLY_SERVICE_VERSION') === '' ||\n    env('FASTLY_SERVICE_VERSION') === '0'\n  );\n}\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/secret-store.js",
    "content": "/* eslint-env serviceworker */\nimport { SecretStore, SecretStoreEntry } from 'fastly:secret-store';\nimport { assert, assertThrows, assertRejects } from './assertions.js';\nimport { routes } from './routes.js';\nimport fc from './fast-check.js';\nimport { env } from 'fastly:env';\n\nconst SECRET_STORE_NAME = env('SECRET_STORE_NAME');\n\n// SecretStore\n{\n  routes.set('/secret-store/exposed-as-global', () => {\n    assert(typeof SecretStore, 'function', `typeof SecretStore`);\n  });\n  routes.set('/secret-store/interface', SecretStoreInterfaceTests);\n  // SecretStore constructor\n  {\n    routes.set('/secret-store/constructor/called-as-regular-function', () => {\n      assertThrows(\n        () => {\n          SecretStore();\n        },\n        TypeError,\n        `calling a builtin SecretStore constructor without new is forbidden`,\n      );\n    });\n    // https://tc39.es/ecma262/#sec-tostring\n    routes.set(\n      '/secret-store/constructor/parameter-calls-7.1.17-ToString',\n      () => {\n        let sentinel;\n        const test = () => {\n          sentinel = Symbol();\n          const name = {\n            toString() {\n              throw sentinel;\n            },\n          };\n          new SecretStore(name);\n        };\n        assertThrows(test);\n        try {\n          test();\n        } catch (thrownError) {\n          assert(thrownError, sentinel, 'thrownError === sentinel');\n        }\n        assertThrows(\n          () => new SecretStore(Symbol()),\n          TypeError,\n          `can't convert symbol to string`,\n        );\n      },\n    );\n    routes.set('/secret-store/constructor/empty-parameter', () => {\n      assertThrows(\n        () => {\n          new SecretStore();\n        },\n        TypeError,\n        `SecretStore constructor: At least 1 argument required, but only 0 passed`,\n      );\n    });\n    routes.set('/secret-store/constructor/found-store', () => {\n      const store = createValidStore();\n      assert(\n        store instanceof SecretStore,\n        true,\n        `store instanceof SecretStore`,\n      );\n    });\n    routes.set('/secret-store/constructor/missing-store', () => {\n      assertThrows(\n        () => {\n          new SecretStore('missing');\n        },\n        Error,\n        `SecretStore constructor: No SecretStore named 'missing' exists`,\n      );\n    });\n    routes.set('/secret-store/constructor/invalid-name', () => {\n      // control Characters (\\\\u0000-\\\\u001F) are not allowed\n      fc.configureGlobal({ verbose: true });\n      const charactersOtherThanLettersNumbersDashesUnderscoresAndPeriods = fc\n        .fullUnicode()\n        .filter((c) => {\n          if (c == '-' || c == '_' || c == '.') {\n            return false;\n          }\n          const code = c.charCodeAt(0);\n          // number ascii\n          if (code >= 48 && code <= 57) {\n            return false;\n          }\n          // upper ascii\n          if (code >= 65 && code <= 90) {\n            return false;\n          }\n          // lower ascii\n          if (code >= 97 && code <= 122) {\n            return false;\n          }\n          return true;\n        });\n      fc.assert(\n        fc.property(\n          charactersOtherThanLettersNumbersDashesUnderscoresAndPeriods,\n          (character) => {\n            assertThrows(\n              () => {\n                new SecretStore(character);\n              },\n              TypeError,\n              `SecretStore constructor: name can contain only ascii alphanumeric characters, underscores, dashes, and ascii whitespace`,\n            );\n          },\n        ),\n      );\n\n      // must be less than 256 characters\n      assertThrows(\n        () => {\n          new SecretStore('a'.repeat(256));\n        },\n        TypeError,\n        `SecretStore constructor: name can not be more than 255 characters`,\n      );\n\n      // empty string not allowed\n      assertThrows(\n        () => {\n          new SecretStore('');\n        },\n        TypeError,\n        `SecretStore constructor: name can not be an empty string`,\n      );\n    });\n  }\n\n  // SecretStore get method\n  {\n    routes.set('/secret-store/get/called-as-constructor', () => {\n      assertThrows(() => {\n        new SecretStore.prototype.get('1');\n      }, TypeError);\n    });\n    routes.set('/secret-store/get/called-unbound', () => {\n      assertThrows(() => {\n        SecretStore.prototype.get.call(undefined, '1');\n      }, TypeError);\n    });\n    // https://tc39.es/ecma262/#sec-tostring\n    routes.set(\n      '/secret-store/get/key-parameter-calls-7.1.17-ToString',\n      async () => {\n        let sentinel;\n        const test = () => {\n          sentinel = Symbol();\n          const key = {\n            toString() {\n              throw sentinel;\n            },\n          };\n          const store = createValidStore();\n          return store.get(key);\n        };\n        assertThrows(test);\n        try {\n          test();\n        } catch (thrownError) {\n          assert(thrownError, sentinel, 'thrownError === sentinel');\n        }\n        assertThrows(\n          () => {\n            const store = createValidStore();\n            return store.get(Symbol());\n          },\n          TypeError,\n          `can't convert symbol to string`,\n        );\n      },\n    );\n    routes.set('/secret-store/get/key-parameter-not-supplied', () => {\n      assertThrows(\n        () => {\n          const store = createValidStore();\n          return store.get();\n        },\n        TypeError,\n        `get: At least 1 argument required, but only 0 passed`,\n      );\n    });\n    routes.set('/secret-store/get/key-parameter-empty-string', async () => {\n      await assertRejects(\n        async () => {\n          const store = createValidStore();\n          return await store.get('');\n        },\n        TypeError,\n        `SecretStore key can not be an empty string`,\n      );\n    });\n    routes.set(\n      '/secret-store/get/key-parameter-255-character-string',\n      async () => {\n        const store = createValidStore();\n        const key = 'a'.repeat(255);\n        let result = store.get(key);\n        assert(\n          result instanceof Promise,\n          true,\n          `store.get(key) instanceof Promise`,\n        );\n        result = await result;\n        assert(\n          result instanceof SecretStoreEntry,\n          true,\n          `(await store.get(key)) instanceof SecretStoreEntry`,\n        );\n      },\n    );\n    routes.set(\n      '/secret-store/get/key-parameter-256-character-string',\n      async () => {\n        await assertRejects(\n          async () => {\n            const store = createValidStore();\n            const key = 'a'.repeat(256);\n            return store.get(key);\n          },\n          TypeError,\n          `SecretStore key can not be more than 255 characters`,\n        );\n      },\n    );\n    routes.set('/secret-store/get/key-parameter-invalid-string', async () => {\n      const charactersOtherThanLettersNumbersDashesUnderscoresAndPeriods = fc\n        .fullUnicode()\n        .filter((c) => {\n          if (c == '-' || c == '_' || c == '.') {\n            return false;\n          }\n          const code = c.charCodeAt(0);\n          // number ascii\n          if (code >= 48 && code <= 57) {\n            return false;\n          }\n          // upper ascii\n          if (code >= 65 && code <= 90) {\n            return false;\n          }\n          // lower ascii\n          if (code >= 97 && code <= 122) {\n            return false;\n          }\n          return true;\n        });\n\n      fc.assert(\n        fc.asyncProperty(\n          charactersOtherThanLettersNumbersDashesUnderscoresAndPeriods,\n          async (character) => {\n            await assertRejects(\n              async () => {\n                const store = createValidStore();\n                return store.get(character);\n              },\n              TypeError,\n              `SecretStore key can contain only ascii alphanumeric characters, underscores, dashes, and ascii whitespace`,\n            );\n          },\n        ),\n      );\n    });\n    routes.set(\n      '/secret-store/get/key-does-not-exist-returns-null',\n      async () => {\n        let store = createValidStore();\n        let result = await store.get(Math.random());\n        assert(result, null, `store.get(Math.random())`);\n      },\n    );\n    routes.set('/secret-store/get/key-exists', async () => {\n      let store = createValidStore();\n      let result = await store.get('first');\n      assert(\n        result instanceof SecretStoreEntry,\n        true,\n        `(store.get(key) instanceof SecretStoreEntry)`,\n      );\n    });\n  }\n\n  // SecretStore.fromBytes static method\n  {\n    routes.set('/secret-store/from-bytes/invalid', async () => {\n      assertThrows(\n        () => {\n          SecretStore.fromBytes('blah');\n        },\n        TypeError,\n        `SecretStore.fromBytes: bytes must be an ArrayBuffer or ArrayBufferView object`,\n      );\n    });\n    routes.set('/secret-store/from-bytes/valid', async () => {\n      let result;\n      result = SecretStore.fromBytes(new Uint8Array([1, 2, 3]));\n      assert(\n        result instanceof SecretStoreEntry,\n        true,\n        `(SecretStore.fromBytes(Uint8Array) instanceof SecretStoreEntry)`,\n      );\n      assert(\n        result.rawBytes(),\n        new Uint8Array([1, 2, 3]),\n        `(SecretStore.fromBytes(Uint8Array).rawBytes() === Uint8Array)`,\n      );\n      result = SecretStore.fromBytes(new Uint16Array([4, 5, 6]));\n      assert(\n        result instanceof SecretStoreEntry,\n        true,\n        `(SecretStore.fromBytes(Uint16Array) instanceof SecretStoreEntry)`,\n      );\n      // (can rely on Wasm being little endian)\n      assert(\n        result.rawBytes(),\n        new Uint8Array([4, 0, 5, 0, 6, 0]),\n        `(SecretStore.fromBytes(Uint16Array).rawBytes() === Uint8Array)`,\n      );\n      result = SecretStore.fromBytes(new Uint16Array([7, 8, 9]).buffer);\n      assert(\n        result instanceof SecretStoreEntry,\n        true,\n        `(SecretStore.fromBytes(ArrayBuffer) instanceof SecretStoreEntry)`,\n      );\n      assert(\n        result.rawBytes(),\n        new Uint8Array([7, 0, 8, 0, 9, 0]),\n        `(SecretStore.fromBytes(ArrayBuffer).rawBytes() === Uint8Array)`,\n      );\n    });\n  }\n}\n// SecretStoreEntry\n{\n  routes.set('/secret-store-entry/interface', () => {\n    return SecretStoreEntryInterfaceTests();\n  });\n  routes.set('/secret-store-entry/plaintext', async () => {\n    let store = createValidStore();\n    let secret = await store.get('first');\n    let result = secret.plaintext();\n    assert(\n      result,\n      'This is also some secret data',\n      `(await store.get('first')).plaintext()`,\n    );\n  });\n}\nfunction SecretStoreEntryInterfaceTests() {\n  let actual = Reflect.ownKeys(SecretStoreEntry);\n  let expected = ['prototype', 'length', 'name'];\n  assert(actual, expected, `Reflect.ownKeys(SecretStoreEntry)`);\n\n  actual = Reflect.getOwnPropertyDescriptor(SecretStoreEntry, 'prototype');\n  expected = {\n    value: SecretStoreEntry.prototype,\n    writable: false,\n    enumerable: false,\n    configurable: false,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(SecretStoreEntry, 'prototype')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(SecretStoreEntry, 'length');\n  expected = {\n    value: 0,\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(SecretStoreEntry, 'length')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(SecretStoreEntry, 'name');\n  expected = {\n    value: 'SecretStoreEntry',\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(SecretStoreEntry, 'name')`,\n  );\n\n  actual = Reflect.ownKeys(SecretStoreEntry.prototype);\n  expected = ['constructor', 'plaintext', 'rawBytes'];\n  assert(actual, expected, `Reflect.ownKeys(SecretStoreEntry.prototype)`);\n\n  actual = Reflect.getOwnPropertyDescriptor(\n    SecretStoreEntry.prototype,\n    'constructor',\n  );\n  expected = {\n    writable: true,\n    enumerable: false,\n    configurable: true,\n    value: SecretStoreEntry.prototype.constructor,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(SecretStoreEntry.prototype, 'constructor')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(\n    SecretStoreEntry.prototype,\n    'plaintext',\n  );\n  expected = {\n    writable: true,\n    enumerable: true,\n    configurable: true,\n    value: SecretStoreEntry.prototype.plaintext,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(SecretStoreEntry.prototype, 'plaintext')`,\n  );\n\n  assert(\n    typeof SecretStoreEntry.prototype.constructor,\n    'function',\n    `typeof SecretStoreEntry.prototype.constructor`,\n  );\n  assert(\n    typeof SecretStoreEntry.prototype.plaintext,\n    'function',\n    `typeof SecretStoreEntry.prototype.plaintext`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(\n    SecretStoreEntry.prototype.constructor,\n    'length',\n  );\n  expected = {\n    value: 0,\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(SecretStoreEntry.prototype.constructor, 'length')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(\n    SecretStoreEntry.prototype.constructor,\n    'name',\n  );\n  expected = {\n    value: 'SecretStoreEntry',\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(SecretStoreEntry.prototype.constructor, 'name')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(\n    SecretStoreEntry.prototype.plaintext,\n    'length',\n  );\n  expected = {\n    value: 0,\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(SecretStoreEntry.prototype.plaintext, 'length')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(\n    SecretStoreEntry.prototype.plaintext,\n    'name',\n  );\n  expected = {\n    value: 'plaintext',\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(SecretStoreEntry.prototype.plaintext, 'name')`,\n  );\n}\n\nfunction SecretStoreInterfaceTests() {\n  let actual = Reflect.ownKeys(SecretStore);\n  let expected = ['prototype', 'fromBytes', 'length', 'name'];\n  assert(actual, expected, `Reflect.ownKeys(SecretStore)`);\n\n  actual = Reflect.getOwnPropertyDescriptor(SecretStore, 'prototype');\n  expected = {\n    value: SecretStore.prototype,\n    writable: false,\n    enumerable: false,\n    configurable: false,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(SecretStore, 'prototype')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(SecretStore, 'length');\n  expected = {\n    value: 1,\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(SecretStore, 'length')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(SecretStore, 'name');\n  expected = {\n    value: 'SecretStore',\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(SecretStore, 'name')`,\n  );\n\n  actual = Reflect.ownKeys(SecretStore.prototype);\n  expected = ['constructor', 'get'];\n  assert(actual, expected, `Reflect.ownKeys(SecretStore.prototype)`);\n\n  actual = Reflect.getOwnPropertyDescriptor(\n    SecretStore.prototype,\n    'constructor',\n  );\n  expected = {\n    writable: true,\n    enumerable: false,\n    configurable: true,\n    value: SecretStore.prototype.constructor,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(SecretStore.prototype, 'constructor')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(SecretStore.prototype, 'get');\n  expected = {\n    writable: true,\n    enumerable: true,\n    configurable: true,\n    value: SecretStore.prototype.get,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(SecretStore.prototype, 'get')`,\n  );\n\n  assert(\n    typeof SecretStore.prototype.constructor,\n    'function',\n    `typeof SecretStore.prototype.constructor`,\n  );\n  assert(\n    typeof SecretStore.prototype.get,\n    'function',\n    `typeof SecretStore.prototype.get`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(\n    SecretStore.prototype.constructor,\n    'length',\n  );\n  expected = {\n    value: 1,\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(SecretStore.prototype.constructor, 'length')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(\n    SecretStore.prototype.constructor,\n    'name',\n  );\n  expected = {\n    value: 'SecretStore',\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(SecretStore.prototype.constructor, 'name')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(\n    SecretStore.prototype.get,\n    'length',\n  );\n  expected = {\n    value: 1,\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(SecretStore.prototype.get, 'length')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(SecretStore.prototype.get, 'name');\n  expected = {\n    value: 'get',\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  assert(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(SecretStore.prototype.get, 'name')`,\n  );\n}\n\nfunction createValidStore() {\n  return new SecretStore(SECRET_STORE_NAME);\n}\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/security.js",
    "content": "/* eslint-env serviceworker */\nimport { assert, assertThrows, strictEqual } from './assertions.js';\nimport { inspect } from 'fastly:security';\nimport { routes } from './routes.js';\n\nroutes.set('/fastly/security/inspect/invalid-config', () => {\n  const req = new Request('https://example.com');\n  assertThrows(() => {\n    inspect(req);\n  });\n  assertThrows(() => {\n    inspect(req, {\n      corp: 'test',\n    });\n  });\n  assertThrows(() => {\n    inspect(req, {\n      workspace: 'test',\n    });\n  });\n});\n\nroutes.set('/fastly/security/inspect/basic', () => {\n  const req = new Request('https://example.com');\n  const config = {\n    corp: 'test',\n    workspace: 'test',\n    overrideClientIp: '10.10.10.10',\n  };\n  const result = inspect(req, config);\n  strictEqual(result.verdict, 'allow');\n  strictEqual(result.waf_response, 200);\n  strictEqual(Array.isArray(result.tags), true);\n  strictEqual(typeof result.decision_ms, 'number');\n  assert(result.decision_ms >= 0, true);\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/server.js",
    "content": "import { assert } from './assertions.js';\nimport { routes, isRunningLocally } from './routes.js';\n\nroutes.set('/server/address', (event) => {\n  assert(typeof event.server.address, 'string', 'typeof event.server.address');\n\n  if (isRunningLocally()) {\n    assert(event.server.address, '127.0.0.1', 'event.server.address');\n  }\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/shielding.js",
    "content": "import { assert, assertThrows } from './assertions.js';\nimport { routes } from './routes.js';\nimport { Shield } from 'fastly:shielding';\n\nroutes.set('/shielding/invalid-shield', () => {\n  assertThrows(() => new Shield('i-am-not-a-real-shield'));\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/tee.js",
    "content": "/* eslint-env serviceworker */\nimport { routes } from './routes.js';\nimport { assert } from './assertions.js';\n\nroutes.set('/tee', async function (event) {\n  const req = event.request;\n  // eslint-disable-next-line no-unused-vars\n  let [body1, _body2] = req.body.tee();\n\n  // Regression test for making requests whose bodies are streams that result\n  // from a `tee`. The bug this is guarding against is where we were eagerly\n  // placing the request into the pending queue, even though its body stream had\n  // not been closed yet. This resulted in deadlock when we called\n  // `pending_req_select`, as we were waiting on an http request whose body had\n  // not been closed.\n  let res = await fetch(\n    new Request('/anything', {\n      body: body1,\n      headers: req.headers,\n      method: req.method,\n      backend: 'httpme',\n    }),\n  );\n  let body = await res.json();\n  assert(body['body'], 'hello world!');\n});\n\nroutes.set('/tee/error', async function (event) {\n  const req = event.request;\n  let res = fetch('/anything', {\n    method: 'POST',\n    body: new ReadableStream({\n      start: (controller) => {\n        controller.enqueue('Test');\n        controller.close();\n      },\n    }),\n    backend: 'httpme',\n  });\n\n  return res\n    .then(() => new Response(\"Error wasn't raised\"))\n    .catch((err) => {\n      return new Response(err.toString());\n    });\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/timers.js",
    "content": "/* eslint-env serviceworker */\nimport { assert, assertDoesNotThrow, assertThrows } from './assertions.js';\nimport { routes } from './routes.js';\nimport { CacheOverride } from 'fastly:cache-override';\n\n// setInterval\n{\n  routes.set('/setInterval/exposed-as-global', async () => {\n    assert(typeof setInterval, 'function', `typeof setInterval`);\n  });\n  routes.set('/setInterval/interface', async () => {\n    let actual = Reflect.getOwnPropertyDescriptor(globalThis, 'setInterval');\n    let expected = {\n      writable: true,\n      enumerable: true,\n      configurable: true,\n      value: globalThis.setInterval,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(globalThis, 'setInterval)`,\n    );\n\n    assert(\n      typeof globalThis.setInterval,\n      'function',\n      `typeof globalThis.setInterval`,\n    );\n\n    actual = Reflect.getOwnPropertyDescriptor(globalThis.setInterval, 'length');\n    expected = {\n      value: 1,\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(globalThis.setInterval, 'length')`,\n    );\n\n    actual = Reflect.getOwnPropertyDescriptor(globalThis.setInterval, 'name');\n    expected = {\n      value: 'setInterval',\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(globalThis.setInterval, 'name')`,\n    );\n  });\n  routes.set('/setInterval/called-as-constructor-function', async () => {\n    assertThrows(\n      () => {\n        new setInterval();\n      },\n      TypeError,\n      `setInterval is not a constructor`,\n    );\n  });\n  routes.set('/setInterval/empty-parameter', async () => {\n    assertThrows(\n      () => {\n        setInterval();\n      },\n      TypeError,\n      `setInterval: At least 1 argument required, but only 0 passed`,\n    );\n  });\n  routes.set('/setInterval/handler-parameter-not-supplied', async () => {\n    assertThrows(\n      () => {\n        setInterval();\n      },\n      TypeError,\n      `setInterval: At least 1 argument required, but only 0 passed`,\n    );\n  });\n  routes.set('/setInterval/handler-parameter-not-callable', async () => {\n    let non_callable_types = [\n      // Primitive types\n      null,\n      undefined,\n      true,\n      1,\n      1n,\n      'hello',\n      Symbol(),\n      // After primitive types, the only remaining types are Objects and Functions\n      {},\n    ];\n    for (const type of non_callable_types) {\n      assertThrows(() => {\n        setInterval(type);\n      }, Error);\n    }\n  });\n  routes.set('/setInterval/timeout-parameter-not-supplied', async () => {\n    assertDoesNotThrow(() => {\n      setInterval(function () {});\n    });\n  });\n  // https://tc39.es/ecma262/#sec-tonumber\n  routes.set(\n    '/setInterval/timeout-parameter-calls-7.1.4-ToNumber',\n    async () => {\n      let sentinel;\n      let requestedType;\n      const test = () => {\n        sentinel = Symbol();\n        const timeout = {\n          [Symbol.toPrimitive](type) {\n            requestedType = type;\n            throw sentinel;\n          },\n        };\n        setInterval(function () {}, timeout);\n      };\n      assertThrows(test);\n      try {\n        test();\n      } catch (thrownError) {\n        assert(thrownError, sentinel, 'thrownError === sentinel');\n        assert(requestedType, 'number', 'requestedType === \"number\"');\n      }\n      assertThrows(\n        () => setInterval(function () {}, Symbol()),\n        TypeError,\n        `can't convert symbol to number`,\n      );\n    },\n  );\n\n  routes.set('/setInterval/timeout-parameter-negative', async () => {\n    assertDoesNotThrow(() => setInterval(() => {}, -1));\n    assertDoesNotThrow(() => setInterval(() => {}, -1.1));\n    assertDoesNotThrow(() => setInterval(() => {}, Number.MIN_SAFE_INTEGER));\n    assertDoesNotThrow(() => setInterval(() => {}, Number.MIN_VALUE));\n    assertDoesNotThrow(() => setInterval(() => {}, -Infinity));\n  });\n  routes.set('/setInterval/timeout-parameter-positive', async () => {\n    assertDoesNotThrow(() => setInterval(() => {}, 1));\n    assertDoesNotThrow(() => setInterval(() => {}, 1.1));\n    assertDoesNotThrow(() => setInterval(() => {}, Number.MAX_SAFE_INTEGER));\n    assertDoesNotThrow(() => setInterval(() => {}, Number.MAX_VALUE));\n    assertDoesNotThrow(() => setInterval(() => {}, Infinity));\n  });\n  routes.set('/setInterval/returns-integer', async () => {\n    let id = setInterval(() => {}, 1);\n    assert(typeof id, 'number', `typeof id === \"number\"`);\n  });\n  routes.set('/setInterval/called-unbound', async () => {\n    assertDoesNotThrow(() => {\n      setInterval.call(undefined, () => {}, 1);\n    });\n  });\n}\n\n// setTimeout\n{\n  routes.set('/setTimeout/exposed-as-global', async () => {\n    assert(typeof setTimeout, 'function', `typeof setTimeout`);\n  });\n  routes.set('/setTimeout/interface', async () => {\n    let actual = Reflect.getOwnPropertyDescriptor(globalThis, 'setTimeout');\n    let expected = {\n      writable: true,\n      enumerable: true,\n      configurable: true,\n      value: globalThis.setTimeout,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(globalThis, 'setTimeout)`,\n    );\n\n    assert(\n      typeof globalThis.setTimeout,\n      'function',\n      `typeof globalThis.setTimeout`,\n    );\n\n    actual = Reflect.getOwnPropertyDescriptor(globalThis.setTimeout, 'length');\n    expected = {\n      value: 1,\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(globalThis.setTimeout, 'length')`,\n    );\n\n    actual = Reflect.getOwnPropertyDescriptor(globalThis.setTimeout, 'name');\n    expected = {\n      value: 'setTimeout',\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(globalThis.setTimeout, 'name')`,\n    );\n  });\n  routes.set('/setTimeout/called-as-constructor-function', async () => {\n    assertThrows(\n      () => {\n        new setTimeout();\n      },\n      TypeError,\n      `setTimeout is not a constructor`,\n    );\n  });\n  routes.set('/setTimeout/empty-parameter', async () => {\n    assertThrows(\n      () => {\n        setTimeout();\n      },\n      TypeError,\n      `setTimeout: At least 1 argument required, but only 0 passed`,\n    );\n  });\n  routes.set('/setTimeout/handler-parameter-not-supplied', async () => {\n    assertThrows(\n      () => {\n        setTimeout();\n      },\n      TypeError,\n      `setTimeout: At least 1 argument required, but only 0 passed`,\n    );\n  });\n  routes.set('/setTimeout/handler-parameter-not-callable', async () => {\n    let non_callable_types = [\n      // Primitive types\n      null,\n      undefined,\n      true,\n      1,\n      1n,\n      'hello',\n      Symbol(),\n      // After primitive types, the only remaining types are Objects and Functions\n      {},\n    ];\n    for (const type of non_callable_types) {\n      assertThrows(() => {\n        setTimeout(type);\n      }, Error);\n    }\n  });\n  routes.set('/setTimeout/timeout-parameter-not-supplied', async () => {\n    assertDoesNotThrow(() => {\n      setTimeout(function () {});\n    });\n  });\n  // https://tc39.es/ecma262/#sec-tonumber\n  routes.set('/setTimeout/timeout-parameter-calls-7.1.4-ToNumber', async () => {\n    let sentinel;\n    let requestedType;\n    const test = () => {\n      sentinel = Symbol();\n      const timeout = {\n        [Symbol.toPrimitive](type) {\n          requestedType = type;\n          throw sentinel;\n        },\n      };\n      setTimeout(function () {}, timeout);\n    };\n    assertThrows(test);\n    try {\n      test();\n    } catch (thrownError) {\n      assert(thrownError, sentinel, 'thrownError === sentinel');\n      assert(requestedType, 'number', 'requestedType === \"number\"');\n    }\n    assertThrows(\n      () => setTimeout(function () {}, Symbol()),\n      TypeError,\n      `can't convert symbol to number`,\n    );\n  });\n\n  routes.set('/setTimeout/timeout-parameter-negative', async () => {\n    assertDoesNotThrow(() => setTimeout(() => {}, -1));\n    assertDoesNotThrow(() => setTimeout(() => {}, -1.1));\n    assertDoesNotThrow(() => setTimeout(() => {}, Number.MIN_SAFE_INTEGER));\n    assertDoesNotThrow(() => setTimeout(() => {}, Number.MIN_VALUE));\n    assertDoesNotThrow(() => setTimeout(() => {}, -Infinity));\n  });\n  routes.set('/setTimeout/timeout-parameter-positive', async () => {\n    assertDoesNotThrow(() => setTimeout(() => {}, 1));\n    assertDoesNotThrow(() => setTimeout(() => {}, 1.1));\n    assertDoesNotThrow(() => setTimeout(() => {}, Number.MAX_SAFE_INTEGER));\n    assertDoesNotThrow(() => setTimeout(() => {}, Number.MAX_VALUE));\n    assertDoesNotThrow(() => setTimeout(() => {}, Infinity));\n  });\n  routes.set('/setTimeout/returns-integer', async () => {\n    let id = setTimeout(() => {}, 1);\n    assert(typeof id, 'number', `typeof id === \"number\"`);\n  });\n  routes.set('/setTimeout/called-unbound', async () => {\n    assertDoesNotThrow(() => {\n      setTimeout.call(undefined, () => {}, 1);\n    });\n  });\n  routes.set('/setTimeout/200-ms', async () => {\n    let controller;\n    const start = Date.now();\n    setTimeout(() => {\n      const end = Date.now();\n      controller.enqueue(new TextEncoder().encode(`END\\n`));\n      if (end - start < 190) {\n        controller.enqueue(\n          new TextEncoder().encode(\n            `ERROR: Timer took ${end - start} instead of 200ms`,\n          ),\n        );\n      }\n      controller.close();\n    }, 200);\n    return new Response(\n      new ReadableStream({\n        start(_controller) {\n          controller = _controller;\n          controller.enqueue(new TextEncoder().encode(`START\\n`));\n        },\n      }),\n    );\n  });\n  routes.set('/setTimeout/fetch-timeout', async () => {\n    let timedOut = false;\n    const first = fetch('https://http-me.fastly.dev/wait=200', {\n      backend: 'httpme',\n      cacheOverride: new CacheOverride('pass'),\n    });\n    const second = Promise.race([\n      fetch('https://http-me.fastly.dev/wait=200', {\n        backend: 'httpme',\n        cacheOverride: new CacheOverride('pass'),\n      }),\n      new Promise((resolve) => setTimeout(resolve, 5)).then(() => {\n        timedOut = true;\n        return { status: 504, errors: 'timeout' };\n      }),\n    ]);\n    const firstValue = await first;\n    assert(timedOut, true, 'should have timed out');\n    assert(firstValue.status, 200, 'should get first value');\n    const secondValue = await second;\n    assert(secondValue.status, 504, 'should get second value timeout');\n  });\n}\n\n// clearInterval\n{\n  routes.set('/clearInterval/exposed-as-global', async () => {\n    assert(typeof clearInterval, 'function', `typeof clearInterval`);\n  });\n  routes.set('/clearInterval/interface', async () => {\n    let actual = Reflect.getOwnPropertyDescriptor(globalThis, 'clearInterval');\n    let expected = {\n      writable: true,\n      enumerable: true,\n      configurable: true,\n      value: globalThis.clearInterval,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(globalThis, 'clearInterval)`,\n    );\n\n    assert(\n      typeof globalThis.clearInterval,\n      'function',\n      `typeof globalThis.clearInterval`,\n    );\n\n    actual = Reflect.getOwnPropertyDescriptor(\n      globalThis.clearInterval,\n      'length',\n    );\n    expected = {\n      value: 1,\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(globalThis.clearInterval, 'length')`,\n    );\n\n    actual = Reflect.getOwnPropertyDescriptor(globalThis.clearInterval, 'name');\n    expected = {\n      value: 'clearInterval',\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(globalThis.clearInterval, 'name')`,\n    );\n  });\n  routes.set('/clearInterval/called-as-constructor-function', async () => {\n    assertThrows(\n      () => {\n        new clearInterval();\n      },\n      TypeError,\n      `clearInterval is not a constructor`,\n    );\n  });\n  routes.set('/clearInterval/id-parameter-not-supplied', async () => {\n    assertThrows(\n      () => {\n        clearInterval();\n      },\n      TypeError,\n      `clearInterval: At least 1 argument required, but only 0 passed`,\n    );\n  });\n  // https://tc39.es/ecma262/#sec-tonumber\n  routes.set('/clearInterval/id-parameter-calls-7.1.4-ToNumber', async () => {\n    let sentinel;\n    let requestedType;\n    const test = () => {\n      sentinel = Symbol();\n      const timeout = {\n        [Symbol.toPrimitive](type) {\n          requestedType = type;\n          throw sentinel;\n        },\n      };\n      clearInterval(timeout);\n    };\n    assertThrows(test);\n    try {\n      test();\n    } catch (thrownError) {\n      assert(thrownError, sentinel, 'thrownError === sentinel');\n      assert(requestedType, 'number', 'requestedType === \"number\"');\n    }\n    assertThrows(\n      () => clearInterval(Symbol()),\n      TypeError,\n      `can't convert symbol to number`,\n    );\n  });\n\n  routes.set('/clearInterval/id-parameter-negative', async () => {\n    assertDoesNotThrow(() => clearInterval(-1));\n    assertDoesNotThrow(() => clearInterval(-1.1));\n    assertDoesNotThrow(() => clearInterval(Number.MIN_SAFE_INTEGER));\n    assertDoesNotThrow(() => clearInterval(Number.MIN_VALUE));\n    assertDoesNotThrow(() => clearInterval(-Infinity));\n  });\n  routes.set('/clearInterval/id-parameter-positive', async () => {\n    assertDoesNotThrow(() => clearInterval(1));\n    assertDoesNotThrow(() => clearInterval(1.1));\n    assertDoesNotThrow(() => clearInterval(Number.MAX_SAFE_INTEGER));\n    assertDoesNotThrow(() => clearInterval(Number.MAX_VALUE));\n    assertDoesNotThrow(() => clearInterval(Infinity));\n  });\n  routes.set('/clearInterval/returns-undefined', async () => {\n    let result = clearInterval(1);\n    assert(typeof result, 'undefined', `typeof result === \"undefined\"`);\n  });\n  routes.set('/clearInterval/called-unbound', async () => {\n    assertDoesNotThrow(() => {\n      clearInterval.call(undefined, 1);\n    });\n  });\n}\n\n// clearTimeout\n{\n  routes.set('/clearTimeout/exposed-as-global', async () => {\n    assert(typeof clearTimeout, 'function', `typeof clearTimeout`);\n  });\n  routes.set('/clearTimeout/interface', async () => {\n    let actual = Reflect.getOwnPropertyDescriptor(globalThis, 'clearTimeout');\n    let expected = {\n      writable: true,\n      enumerable: true,\n      configurable: true,\n      value: globalThis.clearTimeout,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(globalThis, 'clearTimeout)`,\n    );\n\n    assert(\n      typeof globalThis.clearTimeout,\n      'function',\n      `typeof globalThis.clearTimeout`,\n    );\n\n    actual = Reflect.getOwnPropertyDescriptor(\n      globalThis.clearTimeout,\n      'length',\n    );\n    expected = {\n      value: 1,\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(globalThis.clearTimeout, 'length')`,\n    );\n\n    actual = Reflect.getOwnPropertyDescriptor(globalThis.clearTimeout, 'name');\n    expected = {\n      value: 'clearTimeout',\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(globalThis.clearTimeout, 'name')`,\n    );\n  });\n  routes.set('/clearTimeout/called-as-constructor-function', async () => {\n    assertThrows(\n      () => {\n        new clearTimeout();\n      },\n      TypeError,\n      `clearTimeout is not a constructor`,\n    );\n  });\n  routes.set('/clearTimeout/id-parameter-not-supplied', async () => {\n    assertThrows(\n      () => {\n        clearTimeout();\n      },\n      TypeError,\n      `clearTimeout: At least 1 argument required, but only 0 passed`,\n    );\n  });\n  // https://tc39.es/ecma262/#sec-tonumber\n  routes.set('/clearTimeout/id-parameter-calls-7.1.4-ToNumber', async () => {\n    let sentinel;\n    let requestedType;\n    const test = () => {\n      sentinel = Symbol();\n      const timeout = {\n        [Symbol.toPrimitive](type) {\n          requestedType = type;\n          throw sentinel;\n        },\n      };\n      clearTimeout(timeout);\n    };\n    assertThrows(test);\n    try {\n      test();\n    } catch (thrownError) {\n      assert(thrownError, sentinel, 'thrownError === sentinel');\n      assert(requestedType, 'number', 'requestedType === \"number\"');\n    }\n    assertThrows(\n      () => clearTimeout(Symbol()),\n      TypeError,\n      `can't convert symbol to number`,\n    );\n  });\n\n  routes.set('/clearTimeout/id-parameter-negative', async () => {\n    assertDoesNotThrow(() => clearTimeout(-1));\n    assertDoesNotThrow(() => clearTimeout(-1.1));\n    assertDoesNotThrow(() => clearTimeout(Number.MIN_SAFE_INTEGER));\n    assertDoesNotThrow(() => clearTimeout(Number.MIN_VALUE));\n    assertDoesNotThrow(() => clearTimeout(-Infinity));\n  });\n  routes.set('/clearTimeout/id-parameter-positive', async () => {\n    assertDoesNotThrow(() => clearTimeout(1));\n    assertDoesNotThrow(() => clearTimeout(1.1));\n    assertDoesNotThrow(() => clearTimeout(Number.MAX_SAFE_INTEGER));\n    assertDoesNotThrow(() => clearTimeout(Number.MAX_VALUE));\n    assertDoesNotThrow(() => clearTimeout(Infinity));\n  });\n  routes.set('/clearTimeout/returns-undefined', async () => {\n    let result = clearTimeout(1);\n    assert(typeof result, 'undefined', `typeof result === \"undefined\"`);\n  });\n  routes.set('/clearTimeout/called-unbound', async () => {\n    assertDoesNotThrow(() => {\n      clearTimeout.call(undefined, 1);\n    });\n  });\n}\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/urlsearchparams.js",
    "content": "/* eslint-env serviceworker */\nimport { assert } from './assertions.js';\nimport { routes } from './routes.js';\n\nroutes.set('/urlsearchparams/sort', async () => {\n  const urlObj = new URL('http://www.example.com');\n  urlObj.searchParams.sort();\n  assert(urlObj.toString(), 'http://www.example.com/', `urlObj.toString()`);\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/src/websocket.js",
    "content": "import { assert, assertDoesNotThrow, assertThrows } from './assertions.js';\nimport { routes } from './routes.js';\nimport { createWebsocketHandoff } from 'fastly:websocket';\n\nroutes.set('/createWebsocketHandoff', () => {\n  assert(\n    typeof createWebsocketHandoff,\n    'function',\n    'typeof createWebsocketHandoff',\n  );\n\n  assert(\n    createWebsocketHandoff.name,\n    'createWebsocketHandoff',\n    'createWebsocketHandoff.name',\n  );\n\n  assert(createWebsocketHandoff.length, 2, 'createWebsocketHandoff.length');\n\n  assertDoesNotThrow(() => createWebsocketHandoff(new Request('.'), 'hello'));\n\n  assertThrows(() => createWebsocketHandoff());\n\n  assertThrows(() => createWebsocketHandoff(1, ''));\n\n  let result = createWebsocketHandoff(new Request('.'), 'hello');\n  assert(result instanceof Response, true, 'result instanceof Response');\n\n  assertThrows(\n    () => new createWebsocketHandoff(new Request('.'), 'hello'),\n    TypeError,\n  );\n\n  assertDoesNotThrow(() => {\n    createWebsocketHandoff.call(undefined, new Request('.'), '1');\n  });\n\n  // https://tc39.es/ecma262/#sec-tostring\n  let sentinel;\n  const test = () => {\n    sentinel = Symbol();\n    const key = {\n      toString() {\n        throw sentinel;\n      },\n    };\n    createWebsocketHandoff(new Request('.'), key);\n  };\n  assertThrows(test);\n  try {\n    test();\n  } catch (thrownError) {\n    assert(thrownError, sentinel, 'thrownError === sentinel');\n  }\n  assertThrows(\n    () => {\n      createWebsocketHandoff(new Request('.'), Symbol());\n    },\n    TypeError,\n    `can't convert symbol to string`,\n  );\n\n  assertThrows(\n    () => createWebsocketHandoff(new Request('.')),\n    TypeError,\n    `createWebsocketHandoff: At least 2 arguments required, but only 1 passed`,\n  );\n\n  assertThrows(\n    () => createWebsocketHandoff(new Request('.'), ''),\n    Error,\n    `createWebsocketHandoff: Backend parameter can not be an empty string`,\n  );\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/app/tests.json",
    "content": "{\n  \"GET /async-select/hello\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"headers\": [\n        [\"FooName\", \"FooValue\"],\n        [\"BarName\", \"BarValue\"]\n      ],\n      \"body\": \"pong\"\n    }\n  },\n  \"GET /btoa\": {\n    \"environments\": [\"viceroy\"],\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /byob\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": [\"hey3\"]\n    }\n  },\n  \"GET /byte-repeater\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": [\"11223344\", \"5566778899001122\\n\\n\"]\n    }\n  },\n  \"GET /cache-override/constructor/called-as-regular-function\": {},\n  \"GET /cache-override/constructor/empty-parameter\": {\n    \"flake\": true\n  },\n  \"GET /cache-override/constructor/invalid-mode\": {\n    \"flake\": true\n  },\n  \"GET /cache-override/constructor/valid-mode\": {},\n  \"GET /cache-override/fetch/mode-none\": {},\n  \"GET /cache-override/fetch/mode-pass\": {\n    \"flake\": true\n  },\n  \"GET /cache-override/fetch/null-304-body\": {\n    \"environments\": [\"compute\"],\n    \"features\": [\"http-cache\"]\n  },\n  \"GET /secret-store/exposed-as-global\": {\n    \"flake\": true\n  },\n  \"GET /secret-store/interface\": {\n    \"flake\": true\n  },\n  \"GET /secret-store/constructor/called-as-regular-function\": {\n    \"flake\": true\n  },\n  \"GET /secret-store/constructor/parameter-calls-7.1.17-ToString\": {\n    \"flake\": true\n  },\n  \"GET /secret-store/constructor/empty-parameter\": {\n    \"flake\": true\n  },\n  \"GET /secret-store/constructor/found-store\": {\n    \"flake\": true\n  },\n  \"GET /secret-store/constructor/missing-store\": {\n    \"flake\": true\n  },\n  \"GET /secret-store/constructor/invalid-name\": {\n    \"flake\": true\n  },\n  \"GET /secret-store/get/called-as-constructor\": {\n    \"flake\": true\n  },\n  \"GET /secret-store/get/called-unbound\": {\n    \"flake\": true\n  },\n  \"GET /secret-store/get/key-parameter-calls-7.1.17-ToString\": {\n    \"flake\": true\n  },\n  \"GET /secret-store/get/key-parameter-not-supplied\": {\n    \"flake\": true\n  },\n  \"GET /secret-store/get/key-parameter-empty-string\": {\n    \"flake\": true\n  },\n  \"GET /secret-store/get/key-parameter-255-character-string\": {\n    \"flake\": true\n  },\n  \"GET /secret-store/get/key-parameter-256-character-string\": {\n    \"flake\": true\n  },\n  \"GET /secret-store/get/key-parameter-invalid-string\": {\n    \"flake\": true\n  },\n  \"GET /secret-store/get/key-does-not-exist-returns-null\": {\n    \"flake\": true\n  },\n  \"GET /secret-store/get/key-exists\": {\n    \"flake\": true\n  },\n  \"GET /secret-store/from-bytes/invalid\": {\n    \"flake\": true\n  },\n  \"GET /secret-store/from-bytes/valid\": {\n    \"flake\": true\n  },\n  \"GET /secret-store-entry/interface\": {\n    \"flake\": true\n  },\n  \"GET /secret-store-entry/plaintext\": {\n    \"flake\": true\n  },\n  \"GET /simple-cache/interface\": {},\n  \"GET /simple-store/constructor/called-as-regular-function\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/constructor/throws\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/purge/called-as-constructor\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/purge/key-parameter-calls-7.1.17-ToString\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/purge/key-parameter-not-supplied\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/purge/key-parameter-empty-string\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/purge/key-parameter-8135-character-string\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/purge/key-parameter-8136-character-string\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/purge/options-parameter\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/purge/returns-undefined\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/set/called-as-constructor\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/set/key-parameter-calls-7.1.17-ToString\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/set/tll-parameter-7.1.4-ToNumber\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/set/no-parameters-supplied\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/set/key-parameter-empty-string\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/set/key-parameter-8135-character-string\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/set/key-parameter-8136-character-string\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/set/ttl-parameter-negative-number\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/set/ttl-parameter-NaN\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/set/ttl-parameter-Infinity\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/set/value-parameter-as-undefined\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/set/value-parameter-readablestream-missing-length-parameter\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/set/value-parameter-readablestream-negative-length-parameter\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/set/value-parameter-readablestream-nan-length-parameter\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/set/value-parameter-readablestream-negative-infinity-length-parameter\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/set/value-parameter-readablestream-positive-infinity-length-parameter\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/set/length-parameter-7.1.4-ToNumber\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/set/value-parameter-readablestream-empty\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/set/value-parameter-readablestream-locked\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/set/value-parameter-readablestream\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/set/value-parameter-URLSearchParams\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/set/value-parameter-strings\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/set/value-parameter-calls-7.1.17-ToString\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/set/value-parameter-buffer\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/set/value-parameter-arraybuffer\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/set/value-parameter-typed-arrays\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/set/value-parameter-dataview\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/set/returns-undefined\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/get/called-as-constructor\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/get/key-parameter-calls-7.1.17-ToString\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/get/key-parameter-not-supplied\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/get/key-parameter-empty-string\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/get/key-parameter-8135-character-string\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/get/key-parameter-8136-character-string\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/get/key-does-not-exist-returns-null\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/get/key-exists\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache-entry/interface\": {},\n  \"GET /simple-cache-entry/text/valid\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache-entry/json/valid\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache-entry/json/invalid\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache-entry/arrayBuffer/valid\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache-entry/body\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache-entry/bodyUsed\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache-entry/readablestream\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/getOrSet/rejection-rejects-outer\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/getOrSet/called-as-constructor\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/getOrSet/no-parameters-supplied\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/getOrSet/key-parameter-calls-7.1.17-ToString\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/getOrSet/key-parameter-empty-string\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/getOrSet/key-parameter-8135-character-string\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/getOrSet/key-parameter-8136-character-string\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/getOrSet/ttl-field-7.1.4-ToNumber\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/getOrSet/ttl-field-negative-number\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/getOrSet/ttl-field-NaN\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/getOrSet/ttl-field-Infinity\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/getOrSet/value-field-as-undefined\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/getOrSet/value-field-readablestream-missing-length-field\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/getOrSet/value-field-readablestream-negative-length-field\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/getOrSet/value-field-readablestream-nan-length-field\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/getOrSet/value-field-readablestream-negative-infinity-length-field\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/getOrSet/value-field-readablestream-positive-infinity-length-field\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/getOrSet/length-field-7.1.4-ToNumber\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/getOrSet/value-field-readablestream-empty\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/getOrSet/value-field-readablestream-locked\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/getOrSet/value-field-readablestream\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/getOrSet/value-field-URLSearchParams\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/getOrSet/value-field-strings\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/getOrSet/value-field-calls-7.1.17-ToString\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/getOrSet/value-field-buffer\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/getOrSet/value-field-typed-arrays\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/getOrSet/value-field-dataview\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/getOrSet/returns-SimpleCacheEntry\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/getOrSet/executes-the-set-method-when-key-not-in-cache\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/getOrSet/does-not-execute-the-set-method-when-key-is-in-cache\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /simple-cache/getOrSet/does-not-freeze-when-called-after-a-get\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /client/requestId\": {},\n  \"GET /client/tlsJA3MD5\": {},\n  \"GET /client/tlsClientHello\": {},\n  \"GET /client/tlsClientCertificate\": {},\n  \"GET /client/tlsCipherOpensslName\": {},\n  \"GET /client/tlsProtocol\": {},\n  \"GET /client/tlsJA4\": {},\n  \"GET /client/h2Fingerprint\": {},\n  \"GET /client/ohFingerprint\": {},\n  \"GET /config-store\": {\n    \"flake\": true\n  },\n  \"GET /crypto\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/length\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/called-as-constructor\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/called-with-wrong-this\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/called-with-no-arguments\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/first-parameter-calls-7.1.17-ToString\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/first-parameter-non-existant-format\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/second-parameter-invalid-format\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/rsa-jwk-public/second-parameter-missing-e-field\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/rsa-jwk-public/second-parameter-e-field-calls-7.1.17-ToString\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/rsa-jwk-public/second-parameter-invalid-e-field\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/rsa-jwk-public/second-parameter-missing-kty-field\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/rsa-jwk-public/second-parameter-invalid-kty-field\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/rsa-jwk-public/second-parameter-missing-key_ops-field\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/rsa-jwk-public/second-parameter-non-sequence-key_ops-field\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/rsa-jwk-public/second-parameter-empty-key_ops-field\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/rsa-jwk-public/second-parameter-duplicated-key_ops-field\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/rsa-jwk-public/second-parameter-invalid-key_ops-field\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/rsa-jwk-public/second-parameter-key_ops-field-calls-7.1.17-ToString\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/rsa-jwk-public/second-parameter-missing-n-field\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/rsa-jwk-public/second-parameter-n-field-calls-7.1.17-ToString\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/rsa-jwk-public/second-parameter-invalid-n-field\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/ecdsa-jwk-public/second-parameter-missing-x-field\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/ecdsa-jwk-public/second-parameter-x-field-calls-7.1.17-ToString\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/ecdsa-jwk-public/second-parameter-invalid-x-field\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/ecdsa-jwk-public/second-parameter-missing-y-field\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/ecdsa-jwk-public/second-parameter-y-field-calls-7.1.17-ToString\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/ecdsa-jwk-public/second-parameter-invalid-y-field\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/ecdsa-jwk-public/second-parameter-missing-kty-field\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/ecdsa-jwk-public/second-parameter-invalid-kty-field\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/ecdsa-jwk-public/second-parameter-missing-key_ops-field\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/ecdsa-jwk-public/second-parameter-non-sequence-key_ops-field\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/ecdsa-jwk-public/second-parameter-empty-key_ops-field\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/ecdsa-jwk-public/second-parameter-duplicated-key_ops-field\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/ecdsa-jwk-public/second-parameter-invalid-key_ops-field\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/ecdsa-jwk-public/second-parameter-key_ops-field-calls-7.1.17-ToString\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/ecdsa-jwk-private/second-parameter-d-field-calls-7.1.17-ToString\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/ecdsa-jwk-private/second-parameter-invalid-d-field\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/third-parameter-undefined\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/third-parameter-name-field-calls-7.1.17-ToString\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/third-parameter-invalid-name-field\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/third-parameter-hash-name-field-calls-7.1.17-ToString\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/third-parameter-hash-algorithm-does-not-match-json-web-key-hash-algorithm\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/fifth-parameter-undefined\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/fifth-parameter-invalid\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/fifth-parameter-duplicate-operations\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/fifth-parameter-operations-do-not-match-json-web-key-operations\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/fifth-parameter-operation-fields-calls-7.1.17-ToString\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/JWK-RS256-Public\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/JWK-EC256-Public\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/HMAC\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.importKey/JWK-HS256-Public\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.digest\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.digest/length\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.digest/called-as-constructor\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.digest/called-with-wrong-this\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.digest/called-with-no-arguments\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.digest/first-parameter-calls-7.1.17-ToString\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.digest/first-parameter-non-existant-format\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.digest/second-parameter-undefined\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.digest/md5\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.digest/sha-1\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.digest/sha-256\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.digest/sha-384\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.digest/sha-512\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.sign\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.sign/length\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.sign/called-as-constructor\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.sign/called-with-wrong-this\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.sign/called-with-no-arguments\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.sign/first-parameter-calls-7.1.17-ToString\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.sign/first-parameter-non-existant-algorithm\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.sign/second-parameter-invalid-format\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.sign/second-parameter-invalid-usages\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.sign/third-parameter-invalid-format\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.sign/happy-path-jwk\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.sign/happy-path-hmac\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.verify\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.verify/length\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.verify/called-as-constructor\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.verify/called-with-wrong-this\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.verify/called-with-no-arguments\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.verify/first-parameter-calls-7.1.17-ToString\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.verify/first-parameter-non-existant-algorithm\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.verify/second-parameter-invalid-format\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.verify/second-parameter-invalid-usages\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.verify/third-parameter-invalid-format\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.verify/fourth-parameter-invalid-format\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.verify/incorrect-signature-jwk\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.verify/incorrect-signature-hmac\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.verify/correct-signature-jwk-rsa\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.verify/correct-signature-jwk-ecdsa\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /crypto.subtle.verify/correct-signature-hmac\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /dictionary/exposed-as-global\": {\n    \"flake\": true\n  },\n  \"GET /dictionary/interface\": {\n    \"flake\": true\n  },\n  \"GET /dictionary/constructor/called-as-regular-function\": {\n    \"flake\": true\n  },\n  \"GET /dictionary/constructor/parameter-calls-7.1.17-ToString\": {\n    \"flake\": true\n  },\n  \"GET /dictionary/constructor/empty-parameter\": {\n    \"flake\": true\n  },\n  \"GET /dictionary/constructor/found\": {\n    \"flake\": true\n  },\n  \"GET /dictionary/constructor/invalid-name\": {\n    \"flake\": true\n  },\n  \"GET /dictionary/get/called-as-constructor\": {\n    \"flake\": true\n  },\n  \"GET /dictionary/get/called-unbound\": {\n    \"flake\": true\n  },\n  \"GET /dictionary/get/key-parameter-calls-7.1.17-ToString\": {\n    \"flake\": true\n  },\n  \"GET /dictionary/get/key-parameter-not-supplied\": {\n    \"flake\": true\n  },\n  \"GET /dictionary/get/key-parameter-empty-string\": {\n    \"flake\": true\n  },\n  \"GET /dictionary/get/key-parameter-255-character-string\": {\n    \"flake\": true\n  },\n  \"GET /dictionary/get/key-parameter-256-character-string\": {\n    \"flake\": true\n  },\n  \"GET /dictionary/get/key-does-not-exist-returns-null\": {\n    \"flake\": true\n  },\n  \"GET /dictionary/get/key-exists\": {\n    \"flake\": true\n  },\n  \"GET /env\": {\n    \"environments\": [\"viceroy\"]\n  },\n  \"GET /createFanoutHandoff\": {},\n  \"GET /createWebsocketHandoff\": {},\n  \"GET /fastly/now\": {},\n  \"GET /fastly/version\": {},\n  \"GET /fastly/getgeolocationforipaddress/interface\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /fastly/getgeolocationforipaddress/called-as-constructor\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /fastly/getgeolocationforipaddress/parameter-calls-7.1.17-ToString\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /fastly/getgeolocationforipaddress/parameter-not-supplied\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /fastly/getgeolocationforipaddress/parameter-empty-string\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /fastly/getgeolocationforipaddress/bad-ip\": {},\n  \"GET /fastly/getgeolocationforipaddress/parameter-ipv4-string\": {},\n  \"GET /fastly/getgeolocationforipaddress/parameter-compressed-ipv6-string\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /fastly/getgeolocationforipaddress/parameter-shortened-ipv6-string\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /fastly/getgeolocationforipaddress/parameter-expanded-ipv6-string\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /fastly/getgeolocationforipaddress/called-unbound\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /fastly:geolocation\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /includeBytes\": {},\n  \"GET /logger\": {\n    \"environments\": [\"viceroy\"],\n    \"logs\": [\"ComputeLog :: Hello!\"]\n  },\n  \"GET /missing-backend\": {},\n  \"GET /multiple-set-cookie/response-init\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"headers\": [\n        [\n          \"Set-Cookie\",\n          \"test=1; expires=Tue, 06-Dec-2022 12:34:56 GMT; Max-Age=60; Path=/; HttpOnly; Secure, test_id=1; Max-Age=60; Path=/; expires=Tue, 06-Dec-2022 12:34:56 GMT, test_id=1; Max-Age=60; Path=/; expires=Tue, 06-Dec-2022 12:34:56 GMT\"\n        ],\n        [\"Set-Cookie\", \"test2=2\"],\n        [\"Set-Cookie\", \"test3=3\"],\n        [\"Set-Cookie\", \"test4=4\"],\n        [\"Set-Cookie\", \"test5=5\"],\n        [\"Set-Cookie\", \"test6=6\"],\n        [\"Set-Cookie\", \"test7=7\"],\n        [\"Set-Cookie\", \"test8=8\"],\n        [\"Set-Cookie\", \"test9=9\"],\n        [\"Set-Cookie\", \"test10=10\"],\n        [\"Set-Cookie\", \"test11=11\"]\n      ]\n    }\n  },\n  \"GET /multiple-set-cookie/response-direct\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"headers\": [\n        [\n          \"Set-Cookie\",\n          \"test=1; expires=Tue, 06-Dec-2022 12:34:56 GMT; Max-Age=60; Path=/; HttpOnly; Secure, test_id=1; Max-Age=60; Path=/; expires=Tue, 06-Dec-2022 12:34:56 GMT, test_id=1; Max-Age=60; Path=/; expires=Tue, 06-Dec-2022 12:34:56 GMT\"\n        ],\n        [\"Set-Cookie\", \"test2=2\"],\n        [\"Set-Cookie\", \"test3=3\"],\n        [\"Set-Cookie\", \"test4=4\"],\n        [\"Set-Cookie\", \"test5=5\"],\n        [\"Set-Cookie\", \"test6=6\"],\n        [\"Set-Cookie\", \"test7=7\"],\n        [\"Set-Cookie\", \"test8=8\"],\n        [\"Set-Cookie\", \"test9=9\"],\n        [\"Set-Cookie\", \"test10=10\"],\n        [\"Set-Cookie\", \"test11=11\"]\n      ]\n    }\n  },\n  \"GET /multiple-set-cookie/downstream\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"headers\": [\n        [\"Set-Cookie\", \"test1=1\"],\n        [\"Set-Cookie\", \"test2=2\"],\n        [\"Set-Cookie\", \"test3=3\"]\n      ]\n    }\n  },\n  \"GET /Performance/interface\": {\n    \"environments\": [\"viceroy\"],\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /globalThis.performance\": {\n    \"environments\": [\"viceroy\"],\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /globalThis.performance/now\": {\n    \"environments\": [\"viceroy\"],\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /globalThis.performance/timeOrigin\": {\n    \"environments\": [\"viceroy\"],\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /request/constructor/fastly/decompressGzip/true\": {},\n  \"GET /request/constructor/fastly/decompressGzip/false\": {},\n  \"GET /fetch/requestinit/fastly/decompressGzip/true\": {},\n  \"GET /fetch/requestinit/fastly/decompressGzip/false\": {},\n  \"GET /request/setCacheKey/called-as-constructor\": {},\n  \"GET /request/setCacheKey/called-unbound\": {},\n  \"GET /request/setCacheKey/key-parameter-calls-7.1.17-ToString\": {},\n  \"GET /request/setCacheKey/key-parameter-not-supplied\": {},\n  \"GET /request/setCacheKey/key-valid\": {},\n  \"GET /request/clone/called-as-constructor\": {},\n  \"GET /request/clone/called-unbound\": {},\n  \"GET /request/clone/valid\": {},\n  \"GET /request/clone/invalid\": {},\n  \"POST /request/body-async-simple/no-workaround\": {\n    \"environments\": [\"viceroy\", \"compute\"],\n    \"downstream_request\": {\n      \"method\": \"POST\",\n      \"pathname\": \"/request/body-async-simple/no-workaround\",\n      \"body\": \"test body that should not disappear\"\n    },\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"POST /request/body-async-simple/with-workaround\": {\n    \"environments\": [\"viceroy\", \"compute\"],\n    \"downstream_request\": {\n      \"method\": \"POST\",\n      \"pathname\": \"/request/body-async-simple/with-workaround\",\n      \"body\": \"test body with clone workaround\"\n    },\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /response/blob\": {\n    \"flake\": true,\n    \"downstream_response\": {\n      \"status\": 200,\n      \"headers\": {\n        \"content-type\": \"text/html\"\n      },\n      \"body\": [\"<h1>blob</h1>\"]\n    }\n  },\n  \"GET /response/stall\": {\n    \"body_streaming\": \"none\"\n  },\n  \"GET /response/text/guest-backed-stream\": {},\n  \"GET /response/json/guest-backed-stream\": {},\n  \"GET /response/arrayBuffer/guest-backed-stream\": {},\n  \"GET /response/json\": {},\n  \"GET /response/redirect\": {},\n  \"GET /response/request-body-init\": {},\n  \"GET /response/ip-port-undefined\": {},\n  \"GET /setInterval/exposed-as-global\": {},\n  \"GET /setInterval/interface\": {},\n  \"GET /setInterval/called-as-constructor-function\": {},\n  \"GET /setInterval/empty-parameter\": {},\n  \"GET /setInterval/handler-parameter-not-supplied\": {},\n  \"GET /setInterval/handler-parameter-not-callable\": {},\n  \"GET /setInterval/timeout-parameter-not-supplied\": {},\n  \"GET /setInterval/timeout-parameter-calls-7.1.4-ToNumber\": {},\n  \"GET /setInterval/timeout-parameter-negative\": {},\n  \"GET /setInterval/timeout-parameter-positive\": {},\n  \"GET /setInterval/returns-integer\": {},\n  \"GET /setInterval/called-unbound\": {},\n  \"GET /setTimeout/exposed-as-global\": {},\n  \"GET /setTimeout/interface\": {},\n  \"GET /setTimeout/called-as-constructor-function\": {},\n  \"GET /setTimeout/empty-parameter\": {},\n  \"GET /setTimeout/handler-parameter-not-supplied\": {},\n  \"GET /setTimeout/handler-parameter-not-callable\": {},\n  \"GET /setTimeout/timeout-parameter-not-supplied\": {},\n  \"GET /setTimeout/timeout-parameter-calls-7.1.4-ToNumber\": {},\n  \"GET /setTimeout/timeout-parameter-negative\": {},\n  \"GET /setTimeout/timeout-parameter-positive\": {},\n  \"GET /setTimeout/returns-integer\": {},\n  \"GET /setTimeout/called-unbound\": {},\n  \"GET /setTimeout/200-ms\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": [\"START\\nEND\\n\"]\n    }\n  },\n  \"GET /setTimeout/fetch-timeout\": {\n    \"flake\": true\n  },\n  \"GET /clearInterval/exposed-as-global\": {},\n  \"GET /clearInterval/interface\": {},\n  \"GET /clearInterval/called-as-constructor-function\": {},\n  \"GET /clearInterval/id-parameter-not-supplied\": {},\n  \"GET /clearInterval/id-parameter-calls-7.1.4-ToNumber\": {},\n  \"GET /clearInterval/id-parameter-negative\": {},\n  \"GET /clearInterval/id-parameter-positive\": {},\n  \"GET /clearInterval/returns-undefined\": {},\n  \"GET /clearInterval/called-unbound\": {},\n  \"GET /clearTimeout/exposed-as-global\": {},\n  \"GET /clearTimeout/interface\": {},\n  \"GET /clearTimeout/called-as-constructor-function\": {},\n  \"GET /clearTimeout/id-parameter-not-supplied\": {},\n  \"GET /clearTimeout/id-parameter-calls-7.1.4-ToNumber\": {},\n  \"GET /clearTimeout/id-parameter-negative\": {},\n  \"GET /clearTimeout/id-parameter-positive\": {},\n  \"GET /clearTimeout/returns-undefined\": {},\n  \"GET /clearTimeout/called-unbound\": {},\n  \"GET /urlsearchparams/sort\": {},\n  \"GET /random\": {},\n  \"GET /error\": {\n    \"downstream_response\": {\n      \"status\": 500\n    }\n  },\n  \"GET /react-byob\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": [\n        \"<!DOCTYPE html><html><title>My app</title><body><h1>App</h1></body></html><script src=\\\"/main.js\\\" async=\\\"\\\"></script>\"\n      ]\n    }\n  },\n  \"POST /tee\": {\n    \"downstream_request\": {\n      \"method\": \"POST\",\n      \"pathname\": \"/tee\",\n      \"headers\": [\"Content-Type\", \"application/json\"],\n      \"body\": \"hello world!\"\n    }\n  },\n  \"GET /tee/error\": {\n    \"downstream_request\": {\n      \"method\": \"GET\",\n      \"pathname\": \"/tee/error\",\n      \"headers\": [\"Content-Type\", \"application/json\"]\n    },\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"Error: TypeError\"\n    }\n  },\n  \"GET /override-content-length/request/init/object-literal/true\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /override-content-length/request/init/object-literal/false\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /override-content-length/request/clone/true\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /override-content-length/request/clone/false\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /override-content-length/fetch/init/object-literal/true\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /override-content-length/fetch/init/object-literal/false\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"/override-content-length/response/clone/true\": {\n    \"skip\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"/override-content-length/response/clone/false\": {\n    \"skip\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /override-content-length/response/init/object-literal/true\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"meow\",\n      \"headers\": {\n        \"content-length\": \"4\"\n      }\n    }\n  },\n  \"GET /override-content-length/response/init/object-literal/false\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"meow\"\n    }\n  },\n  \"GET /override-content-length/response/init/response-instance/true\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"meow\",\n      \"headers\": {\n        \"content-length\": \"4\"\n      }\n    }\n  },\n  \"GET /override-content-length/response/init/response-instance/false\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"meow\"\n    }\n  },\n  \"GET /override-content-length/response/method/false\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /override-content-length/response/method/true\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"status\": 200,\n      \"headers\": {\n        \"content-length\": \"11\"\n      }\n    }\n  },\n  \"GET /headers/getsetcookie\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"headers\": [[\"name1=value1\"], [\"name2=value2\"]]\n    }\n  },\n  \"GET /headers/construct\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"headers\": {\n        \"foo\": \"bar\"\n      }\n    }\n  },\n  \"GET /headers/from-response/set\": {\n    \"flake\": true,\n    \"downstream_response\": {\n      \"status\": 200,\n      \"headers\": [[\"cuStom\", \"test\"]]\n    }\n  },\n  \"GET /headers/from-response/delete-invalid\": {\n    \"flake\": true\n  },\n  \"GET /headers/from-response/set-delete\": {\n    \"flake\": true,\n    \"downstream_response\": {\n      \"status\": 200,\n      \"headers\": [[\"cuStom\", \"test\"]]\n    }\n  },\n  \"GET /FastlyBody/interface\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/constructor/called-as-regular-function\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/constructor/called-as-constructor\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/append/called-as-constructor\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/append/data-parameter-not-supplied\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/append/data-parameter-wrong-type\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/append/data-parameter-readablestream-guest-backed\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/append/data-parameter-readablestream-host-backed\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/append/data-parameter-URLSearchParams\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/append/data-parameter-strings\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/append/data-parameter-calls-7.1.17-ToString\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/append/data-parameter-buffer\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/append/data-parameter-arraybuffer\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/append/data-parameter-typed-arrays\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/append/data-parameter-dataview\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/prepend/called-as-constructor\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/prepend/data-parameter-not-supplied\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/prepend/data-parameter-wrong-type\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/prepend/data-parameter-readablestream-guest-backed\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/prepend/data-parameter-readablestream-host-backed\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/prepend/data-parameter-readablestream-locked\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/prepend/data-parameter-URLSearchParams\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/prepend/data-parameter-strings\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/prepend/data-parameter-calls-7.1.17-ToString\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/prepend/data-parameter-buffer\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/prepend/data-parameter-arraybuffer\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/prepend/data-parameter-typed-arrays\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/prepend/data-parameter-dataview\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/concat/called-as-constructor\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/concat/dest-parameter-not-supplied\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/concat/dest-parameter-wrong-type\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/concat/concat-same-fastlybody-twice\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/concat/happy-path\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/read/called-as-constructor\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/read/chunkSize-parameter-not-supplied\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/read/chunkSize-parameter-wrong-type\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/read/chunkSize-parameter-negative\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/read/chunkSize-parameter-infinity\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/read/chunkSize-parameter-NaN\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/read/happy-path\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/close/called-as-constructor\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/close/called-once\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /FastlyBody/close/called-twice\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /core-cache/interface\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /core-cache/constructor/called-as-regular-function\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /core-cache/constructor/throws\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /core-cache/lookup/called-as-constructor\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /core-cache/lookup/key-parameter-calls-7.1.17-ToString\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /core-cache/lookup/key-parameter-not-supplied\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /core-cache/lookup/key-parameter-empty-string\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /core-cache/lookup/key-parameter-8135-character-string\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /core-cache/lookup/key-parameter-8136-character-string\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /core-cache/lookup/key-does-not-exist-returns-null\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /core-cache/lookup/key-exists\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /core-cache/lookup/options-parameter-wrong-type\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /core-cache/lookup/options-parameter-none\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/lookup/options-parameter-headers-field-wrong-type\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/lookup/options-parameter-headers-field-undefined\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/lookup/options-parameter-headers-field-valid-sequence\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/lookup/options-parameter-headers-field-valid-record\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/lookup/options-parameter-headers-field-valid-Headers-instance\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/called-as-constructor\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/key-parameter-calls-7.1.17-ToString\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/key-parameter-not-supplied\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/key-parameter-empty-string\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/key-parameter-8135-character-string\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/key-parameter-8136-character-string\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/options-parameter-wrong-type\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/options-parameter-headers-field-wrong-type\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/options-parameter-headers-field-undefined\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/options-parameter-headers-field-valid-sequence\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/options-parameter-headers-field-valid-record\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/options-parameter-headers-field-valid-Headers-instance\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/options-parameter-maxAge-field-valid-record\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/options-parameter-maxAge-field-NaN\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/options-parameter-maxAge-field-postitive-infinity\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/options-parameter-maxAge-field-negative-infinity\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/options-parameter-maxAge-field-negative-number\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/options-parameter-maxAge-field-too-large\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/options-parameter-initialAge-field-valid-record\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/options-parameter-initialAge-field-NaN\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/options-parameter-initialAge-field-postitive-infinity\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/options-parameter-initialAge-field-negative-infinity\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/options-parameter-initialAge-field-negative-number\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/options-parameter-initialAge-field-too-large\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/options-parameter-staleWhileRevalidate-field-valid-record\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/options-parameter-staleWhileRevalidate-field-NaN\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/options-parameter-staleWhileRevalidate-field-postitive-infinity\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/options-parameter-staleWhileRevalidate-field-negative-infinity\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/options-parameter-staleWhileRevalidate-field-negative-number\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/options-parameter-staleWhileRevalidate-field-too-large\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/options-parameter-length-field-valid-record\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/options-parameter-length-field-NaN\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/options-parameter-length-field-postitive-infinity\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/options-parameter-length-field-negative-infinity\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/options-parameter-length-field-negative-number\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/options-parameter-sensitive-field\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/options-parameter-vary-field\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/options-parameter-userMetadata-field/arraybuffer/empty\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/options-parameter-userMetadata-field/arraybuffer/not-empty\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/options-parameter-userMetadata-field/URLSearchParams\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/insert/options-parameter-userMetadata-field/string\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/transactionLookup/called-as-constructor\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/transactionLookup/key-parameter-calls-7.1.17-ToString\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/transactionLookup/key-parameter-not-supplied\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/transactionLookup/key-parameter-empty-string\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/transactionLookup/key-parameter-8135-character-string\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/transactionLookup/key-parameter-8136-character-string\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/transactionLookup/key-does-not-exist\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/transactionLookup/key-exists\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/transactionLookup/options-parameter-wrong-type\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/transactionLookup/options-parameter-headers-field-wrong-type\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/transactionLookup/options-parameter-headers-field-undefined\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/transactionLookup/options-parameter-headers-field-valid-sequence\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/transactionLookup/options-parameter-headers-field-valid-record\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /core-cache/transactionLookup/options-parameter-headers-field-valid-Headers-instance\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/interface\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/constructor/called-as-regular-function\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/constructor/throws\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/close/called-as-constructor\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/close/called-unbound\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/close/called-on-instance\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/state/called-as-constructor\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/state/called-unbound\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/state/called-on-instance\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/userMetadata/called-as-constructor\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/userMetadata/called-unbound\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/userMetadata/called-on-instance\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/userMetadata/basic\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/body/called-as-constructor\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/body/called-unbound\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/body/called-on-instance\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/body/options-start-negative\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/body/options-start-NaN\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/body/options-start-Infinity\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/body/options-start-valid\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/body/options-start-longer-than-body\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/body/options-end-negative\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/body/options-end-NaN\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/body/options-end-Infinity\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/body/options-end-valid\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/body/options-end-zero\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/length/called-as-constructor\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/length/called-unbound\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/length/called-on-instance\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/maxAge/called-as-constructor\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/maxAge/called-unbound\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/maxAge/called-on-instance\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/staleWhileRevalidate/called-as-constructor\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/staleWhileRevalidate/called-unbound\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/staleWhileRevalidate/called-on-instance\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/age/called-as-constructor\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/age/called-unbound\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/age/called-on-instance\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/hits/called-as-constructor\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/hits/called-unbound\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /cache-entry/hits/called-on-instance\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/interface\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insert/called-as-constructor\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insert/entry-parameter-not-supplied\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insert/options-parameter-maxAge-field-valid-record\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insert/options-parameter-maxAge-field-NaN\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insert/options-parameter-maxAge-field-postitive-infinity\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insert/options-parameter-maxAge-field-negative-infinity\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insert/options-parameter-maxAge-field-negative-number\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insert/options-parameter-maxAge-field-too-large\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insert/options-parameter-initialAge-field-valid-record\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insert/options-parameter-initialAge-field-NaN\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insert/options-parameter-initialAge-field-postitive-infinity\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insert/options-parameter-initialAge-field-negative-infinity\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insert/options-parameter-initialAge-field-negative-number\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insert/options-parameter-initialAge-field-too-large\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insert/options-parameter-staleWhileRevalidate-field-valid-record\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insert/options-parameter-staleWhileRevalidate-field-NaN\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insert/options-parameter-staleWhileRevalidate-field-postitive-infinity\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insert/options-parameter-staleWhileRevalidate-field-negative-infinity\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insert/options-parameter-staleWhileRevalidate-field-negative-number\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insert/options-parameter-staleWhileRevalidate-field-too-large\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insert/options-parameter-length-field-valid-record\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insert/options-parameter-length-field-NaN\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insert/options-parameter-length-field-postitive-infinity\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insert/options-parameter-length-field-negative-infinity\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insert/options-parameter-length-field-negative-number\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insert/options-parameter-sensitive-field\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insert/options-parameter-vary-field\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insertAndStreamBack/called-as-constructor\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insertAndStreamBack/entry-parameter-not-supplied\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insertAndStreamBack/options-parameter-maxAge-field-valid-record\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insertAndStreamBack/options-parameter-maxAge-field-NaN\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insertAndStreamBack/options-parameter-maxAge-field-postitive-infinity\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insertAndStreamBack/options-parameter-maxAge-field-negative-infinity\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insertAndStreamBack/options-parameter-maxAge-field-negative-number\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insertAndStreamBack/options-parameter-maxAge-field-too-large\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insertAndStreamBack/options-parameter-initialAge-field-valid-record\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insertAndStreamBack/options-parameter-initialAge-field-NaN\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insertAndStreamBack/options-parameter-initialAge-field-postitive-infinity\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insertAndStreamBack/options-parameter-initialAge-field-negative-infinity\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insertAndStreamBack/options-parameter-initialAge-field-negative-number\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insertAndStreamBack/options-parameter-initialAge-field-too-large\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insertAndStreamBack/options-parameter-staleWhileRevalidate-field-valid-record\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insertAndStreamBack/options-parameter-staleWhileRevalidate-field-NaN\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insertAndStreamBack/options-parameter-staleWhileRevalidate-field-postitive-infinity\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insertAndStreamBack/options-parameter-staleWhileRevalidate-field-negative-infinity\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insertAndStreamBack/options-parameter-staleWhileRevalidate-field-negative-number\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insertAndStreamBack/options-parameter-staleWhileRevalidate-field-too-large\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insertAndStreamBack/options-parameter-length-field-valid-record\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insertAndStreamBack/options-parameter-length-field-NaN\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insertAndStreamBack/options-parameter-length-field-postitive-infinity\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insertAndStreamBack/options-parameter-length-field-negative-infinity\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insertAndStreamBack/options-parameter-length-field-negative-number\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insertAndStreamBack/options-parameter-sensitive-field\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insertAndStreamBack/write-to-writer-and-read-from-reader\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/insertAndStreamBack/options-parameter-vary-field\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/update/called-as-constructor\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/update/entry-parameter-not-supplied\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/update/options-parameter-maxAge-field-valid-record\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/update/options-parameter-maxAge-field-NaN\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/update/options-parameter-maxAge-field-postitive-infinity\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/update/options-parameter-maxAge-field-negative-infinity\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/update/options-parameter-maxAge-field-negative-number\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/update/options-parameter-maxAge-field-too-large\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/update/options-parameter-initialAge-field-valid-record\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/update/options-parameter-initialAge-field-NaN\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/update/options-parameter-initialAge-field-postitive-infinity\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/update/options-parameter-initialAge-field-negative-infinity\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/update/options-parameter-initialAge-field-negative-number\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/update/options-parameter-initialAge-field-too-large\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/update/options-parameter-staleWhileRevalidate-field-valid-record\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/update/options-parameter-staleWhileRevalidate-field-NaN\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/update/options-parameter-staleWhileRevalidate-field-postitive-infinity\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/update/options-parameter-staleWhileRevalidate-field-negative-infinity\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/update/options-parameter-staleWhileRevalidate-field-negative-number\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/update/options-parameter-staleWhileRevalidate-field-too-large\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/update/options-parameter-length-field-valid-record\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/update/options-parameter-length-field-NaN\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/update/options-parameter-length-field-postitive-infinity\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/update/options-parameter-length-field-negative-infinity\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/update/options-parameter-length-field-negative-number\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/update/write-to-writer-and-read-from-reader\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/update/options-parameter-vary-field\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/update/options-parameter-userMetadata-field\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/cancel/called-as-constructor\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/cancel/called-once\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/cancel/makes-entry-cancelled\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /transaction-cache-entry/cancel/called-twice-throws\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /rate-counter/interface\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /rate-counter/constructor/called-as-regular-function\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /rate-counter/constructor/called-as-constructor-no-arguments\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /rate-counter/constructor/name-parameter-calls-7.1.17-ToString\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /rate-counter/constructor/happy-path\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /rate-counter/increment/called-as-constructor\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /rate-counter/increment/entry-parameter-calls-7.1.17-ToString\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /rate-counter/increment/entry-parameter-not-supplied\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /rate-counter/increment/delta-parameter-not-supplied\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /rate-counter/increment/delta-parameter-negative\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /rate-counter/increment/delta-parameter-infinity\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /rate-counter/increment/delta-parameter-NaN\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /rate-counter/increment/returns-undefined\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /rate-counter/lookupRate/called-as-constructor\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /rate-counter/lookupRate/entry-parameter-calls-7.1.17-ToString\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /rate-counter/lookupRate/entry-parameter-not-supplied\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /rate-counter/lookupRate/window-parameter-not-supplied\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /rate-counter/lookupRate/window-parameter-negative\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /rate-counter/lookupRate/window-parameter-infinity\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /rate-counter/lookupRate/window-parameter-NaN\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /rate-counter/lookupRate/returns-number\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /rate-counter/lookupCount/called-as-constructor\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /rate-counter/lookupCount/entry-parameter-calls-7.1.17-ToString\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /rate-counter/lookupCount/entry-parameter-not-supplied\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /rate-counter/lookupCount/duration-parameter-not-supplied\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /rate-counter/lookupCount/duration-parameter-negative\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /rate-counter/lookupCount/duration-parameter-infinity\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /rate-counter/lookupCount/duration-parameter-NaN\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /rate-counter/lookupCount/returns-number\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /penalty-box/interface\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /penalty-box/constructor/called-as-regular-function\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /penalty-box/constructor/called-as-constructor-no-arguments\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /penalty-box/constructor/name-parameter-calls-7.1.17-ToString\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /penalty-box/constructor/happy-path\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /penalty-box/has/called-as-constructor\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /penalty-box/has/entry-parameter-calls-7.1.17-ToString\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /penalty-box/has/entry-parameter-not-supplied\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /penalty-box/has/returns-boolean\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /penalty-box/add/called-as-constructor\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /penalty-box/add/entry-parameter-calls-7.1.17-ToString\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /penalty-box/add/entry-parameter-not-supplied\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /penalty-box/add/timeToLive-parameter-not-supplied\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /penalty-box/add/timeToLive-parameter-negative\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /penalty-box/add/timeToLive-parameter-infinity\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /penalty-box/add/timeToLive-parameter-NaN\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /penalty-box/add/returns-undefined\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /edge-rate-limiter/interface\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /edge-rate-limiter/constructor/called-as-regular-function\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /edge-rate-limiter/constructor/called-as-constructor-no-arguments\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /edge-rate-limiter/constructor/rate-counter-not-instance-of-rateCounter\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /edge-rate-limiter/constructor/penalty-box-not-instance-of-penaltyBox\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /edge-rate-limiter/constructor/happy-path\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /edge-rate-limiter/checkRate/called-as-constructor\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /edge-rate-limiter/checkRate/entry-parameter-calls-7.1.17-ToString\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /edge-rate-limiter/checkRate/entry-parameter-not-supplied\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /edge-rate-limiter/checkRate/delta-parameter-negative\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /edge-rate-limiter/checkRate/delta-parameter-infinity\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /edge-rate-limiter/checkRate/delta-parameter-NaN\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /edge-rate-limiter/checkRate/window-parameter-negative\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /edge-rate-limiter/checkRate/window-parameter-infinity\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /edge-rate-limiter/checkRate/window-parameter-NaN\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /edge-rate-limiter/checkRate/limit-parameter-negative\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /edge-rate-limiter/checkRate/limit-parameter-infinity\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /edge-rate-limiter/checkRate/limit-parameter-NaN\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /edge-rate-limiter/checkRate/timeToLive-parameter-negative\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /edge-rate-limiter/checkRate/timeToLive-parameter-infinity\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /edge-rate-limiter/checkRate/timeToLive-parameter-NaN\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /edge-rate-limiter/checkRate/returns-boolean\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /device/interface\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /device/constructor/called-as-regular-function\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /device/constructor/throws\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /device/lookup/called-as-constructor\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /device/lookup/useragent-parameter-calls-7.1.17-ToString\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /device/lookup/useragent-parameter-not-supplied\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /device/lookup/useragent-parameter-empty-string\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /device/lookup/useragent-does-not-exist-returns-null\": {\n    \"environments\": [\"viceroy\"],\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /device/lookup/useragent-exists-all-fields-identified\": {\n    \"environments\": [\"viceroy\"],\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /device/lookup/useragent-exists-all-fields-identified-tojson\": {\n    \"environments\": [\"viceroy\"],\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /device/lookup/useragent-exists-some-fields-identified\": {\n    \"environments\": [\"viceroy\"],\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /device/lookup/bot-detection\": {\n    \"environments\": [\"viceroy\"],\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /server/address\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /core-cache/transaction-lookup-transaction-insert-vary-works\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /core-cache/lookup-insert-vary-works\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /request/method/host\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"\",\n      \"headers\": [[\"result\", \"GET\"]]\n    }\n  },\n  \"get /request/method/host\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"\",\n      \"headers\": [[\"result\", \"GET\"]]\n    }\n  },\n  \"GeT /request/method/host\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"\",\n      \"headers\": [[\"result\", \"GET\"]]\n    }\n  },\n  \"HEAD /request/method/host\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"\",\n      \"headers\": [[\"result\", \"HEAD\"]]\n    }\n  },\n  \"head /request/method/host\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"\",\n      \"headers\": [[\"result\", \"HEAD\"]]\n    }\n  },\n  \"HeAd /request/method/host\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"\",\n      \"headers\": [[\"result\", \"HEAD\"]]\n    }\n  },\n  \"OPTIONS /request/method/host\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"\",\n      \"headers\": [[\"result\", \"OPTIONS\"]]\n    }\n  },\n  \"OPTioNS /request/method/host\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"\",\n      \"headers\": [[\"result\", \"OPTIONS\"]]\n    }\n  },\n  \"options /request/method/host\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"\",\n      \"headers\": [[\"result\", \"OPTIONS\"]]\n    }\n  },\n  \"POST /request/method/host\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"\",\n      \"headers\": [[\"result\", \"POST\"]]\n    }\n  },\n  \"post /request/method/host\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"\",\n      \"headers\": [[\"result\", \"POST\"]]\n    }\n  },\n  \"PosT /request/method/host\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"\",\n      \"headers\": [[\"result\", \"POST\"]]\n    }\n  },\n  \"PUT /request/method/host\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"\",\n      \"headers\": [[\"result\", \"PUT\"]]\n    }\n  },\n  \"put /request/method/host\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"\",\n      \"headers\": [[\"result\", \"PUT\"]]\n    }\n  },\n  \"Put /request/method/host\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"\",\n      \"headers\": [[\"result\", \"PUT\"]]\n    }\n  },\n  \"DELETE /request/method/host\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"\",\n      \"headers\": [[\"result\", \"DELETE\"]]\n    }\n  },\n  \"DeLeTe /request/method/host\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"\",\n      \"headers\": [[\"result\", \"DELETE\"]]\n    }\n  },\n  \"delete /request/method/host\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"\",\n      \"headers\": [[\"result\", \"DELETE\"]]\n    }\n  },\n  \"HELLO /request/method/host\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"\",\n      \"headers\": [[\"result\", \"HELLO\"]]\n    }\n  },\n  \"hello /request/method/host\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"\",\n      \"headers\": [[\"result\", \"hello\"]]\n    }\n  },\n  \"heLLo /request/method/host\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"\",\n      \"headers\": [[\"result\", \"heLLo\"]]\n    }\n  },\n  \"!*+-.^_`|~1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ /request/method/host\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"\",\n      \"headers\": [\n        [\n          \"result\",\n          \"!*+-.^_`|~1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n        ]\n      ]\n    }\n  },\n  \"GET /request/method/guest\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /compute/get-vcpu-ms\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /compute/purge-surrogate-key-invalid\": {},\n  \"GET /compute/purge-surrogate-key-hard\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /compute/purge-surrogate-key-soft\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /html-rewriter/set-attribute\": {},\n  \"GET /html-rewriter/get-attribute\": {},\n  \"GET /html-rewriter/remove-attribute\": {},\n  \"GET /html-rewriter/replace-with\": {},\n  \"GET /html-rewriter/replace-children\": {},\n  \"GET /html-rewriter/insert\": {},\n  \"GET /html-rewriter/complex-selector\": {},\n  \"GET /html-rewriter/no-match-rewritten-content\": {},\n  \"GET /html-rewriter/multiple-handlers\": {},\n  \"GET /html-rewriter/invalid-selector\": {},\n  \"GET /html-rewriter/invalid-handler\": {},\n  \"GET /html-rewriter/throw-in-handler\": {},\n  \"GET /html-rewriter/invalid-html\": {},\n  \"GET /html-rewriter/insertion-order\": {},\n  \"GET /html-rewriter/escape-html\": {},\n  \"GET /image-optimizer/options/region\": {},\n  \"GET /image-optimizer/options/auto\": {},\n  \"GET /image-optimizer/options/bw\": {},\n  \"GET /image-optimizer/options/crop-mode\": {},\n  \"GET /image-optimizer/options/disable\": {},\n  \"GET /image-optimizer/options/enable\": {},\n  \"GET /image-optimizer/options/fit\": {},\n  \"GET /image-optimizer/options/metadata\": {},\n  \"GET /image-optimizer/options/optimize\": {},\n  \"GET /image-optimizer/options/orient\": {},\n  \"GET /image-optimizer/options/profile\": {},\n  \"GET /image-optimizer/options/resizeFilter\": {},\n  \"GET /image-optimizer/options/bgColor\": {},\n  \"GET /image-optimizer/options/blur\": {},\n  \"GET /image-optimizer/options/brightness\": {},\n  \"GET /image-optimizer/options/canvas\": {},\n  \"GET /image-optimizer/options/crop\": {},\n  \"GET /image-optimizer/options/precrop\": {},\n  \"GET /image-optimizer/options/dpr\": {},\n  \"GET /image-optimizer/options/frame\": {},\n  \"GET /image-optimizer/options/height\": {},\n  \"GET /image-optimizer/options/level\": {},\n  \"GET /image-optimizer/options/pad\": {},\n  \"GET /image-optimizer/options/quality\": {},\n  \"GET /image-optimizer/options/saturation\": {},\n  \"GET /image-optimizer/options/sharpen\": {},\n  \"GET /image-optimizer/options/trim\": {},\n  \"GET /image-optimizer/options/viewbox\": {},\n  \"GET /early-hints/manual-response\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    },\n    \"downstream_info\": {\n      \"status\": 103,\n      \"headers\": {\n        \"link\": \"</style.css>; rel=preload; as=style\"\n      }\n    }\n  },\n  \"GET /early-hints/manual-response-late\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /early-hints/manual-response-async\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    },\n    \"downstream_info\": {\n      \"status\": 103,\n      \"headers\": {\n        \"link\": \"</style.css>; rel=preload; as=style\"\n      }\n    }\n  },\n  \"GET /early-hints/manual-response-late-async\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /early-hints/send-early-hints\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    },\n    \"downstream_info\": {\n      \"status\": 103,\n      \"headers\": {\n        \"link\": \"</style.css>; rel=preload; as=style\"\n      }\n    }\n  },\n  \"GET /early-hints/send-early-hints-late\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /early-hints/send-early-hints-multiple-headers\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    },\n    \"downstream_info\": {\n      \"status\": 103,\n      \"headers\": [\n        [\"link\", \"</style.css>; rel=preload; as=style\"],\n        [\"link\", \"</style2.css>; rel=preload; as=style\"]\n      ]\n    }\n  },\n  \"GET /early-hints/send-early-hints-async\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    },\n    \"downstream_info\": {\n      \"status\": 103,\n      \"headers\": {\n        \"link\": \"</style.css>; rel=preload; as=style\"\n      }\n    }\n  },\n  \"GET /early-hints/send-early-hints-late-async\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"body\": \"ok\",\n      \"status\": 200\n    }\n  },\n  \"GET /shielding/invalid-shield\": {\n    \"environments\": [\"compute\"]\n  },\n  \"GET /fastly/security/inspect/invalid-config\": {\n    \"environments\": [\"viceroy\"]\n  },\n  \"GET /fastly/security/inspect/basic\": {\n    \"environments\": [\"viceroy\"]\n  },\n  \"POST /proxy-transform-stream/content-length\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    },\n    \"downstream_request\": {\n      \"method\": \"POST\",\n      \"pathname\": \"/proxy-transform-stream/content-length\",\n      \"body\": \"hello world\"\n    }\n  },\n  \"POST /proxy-transform-stream/simple-response-body-chain\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"body\",\n      \"headers\": [[\"content-length\", \"4\"]]\n    },\n    \"downstream_request\": {\n      \"method\": \"POST\",\n      \"pathname\": \"/proxy-transform-stream/simple-response-body-chain\",\n      \"body\": \"body\"\n    }\n  },\n  \"POST /proxy-transform-stream/multi-response-body-chain\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"body\",\n      \"headers\": [[\"content-length\", \"4\"]]\n    },\n    \"downstream_request\": {\n      \"method\": \"POST\",\n      \"pathname\": \"/proxy-transform-stream/multi-response-body-chain\",\n      \"body\": \"body\"\n    }\n  },\n  \"POST /proxy-transform-stream/response-body-into-js\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"body\",\n      \"headers\": [[\"content-length\", \"4\"]]\n    },\n    \"downstream_request\": {\n      \"method\": \"POST\",\n      \"pathname\": \"/proxy-transform-stream/response-body-into-js\",\n      \"body\": \"body\"\n    }\n  },\n  \"POST /proxy-transform-stream/framing\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    },\n    \"downstream_request\": {\n      \"method\": \"POST\",\n      \"pathname\": \"/proxy-transform-stream/framing\",\n      \"body\": \"hello world\"\n    }\n  }\n}\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/module-mode/.eslintrc.cjs",
    "content": "module.exports = {\n  env: {\n    es2021: true,\n  },\n  extends: 'eslint:recommended',\n  overrides: [],\n  parserOptions: {\n    ecmaVersion: 'latest',\n    sourceType: 'module',\n  },\n  rules: {},\n};\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/module-mode/fastly.toml.in",
    "content": "# This file describes a Fastly Compute package. To learn more visit:\n# https://developer.fastly.com/reference/fastly-toml/\n\nauthors = [\"jchampion@fastly.com\"]\ndescription = \"\"\nlanguage = \"other\"\nmanifest_version = 2\nname = \"js-test-app\"\nservice_id = \"\"\n\n[scripts]\n  build = \"node ../../../../dist/cli/js-compute-runtime-cli.js --env FASTLY_DEBUG_LOGGING,ACL_NAME,CONFIG_STORE_NAME,DICTIONARY_NAME,KV_STORE_NAME,SECRET_STORE_NAME,LOCAL_TEST,TEST=\\\"foo\\\" --enable-experimental-high-resolution-time-methods --module-mode src/index.js\"\n\n[local_server]\n\n  [local_server.backends]\n\n    [local_server.backends.TheOrigin]\n      url = \"https://compute-sdk-test-backend.edgecompute.app\"\n      override_host = \"compute-sdk-test-backend.edgecompute.app\"\n\n    [local_server.backends.TheOrigin2]\n      url = \"https://compute-sdk-test-backend.edgecompute.app\"\n      override_host = \"compute-sdk-test-backend.edgecompute.app\"\n\n    [local_server.backends.httpme]\n      url = \"https://http-me.fastly.dev\"\n      override_host = \"http-me.fastly.dev\"\n\n  [local_server.config_stores]\n    [local_server.config_stores.CONFIG_STORE_NAME]\n      format = \"inline-toml\"\n    [local_server.config_stores.CONFIG_STORE_NAME.contents]\n      \"twitter\" = \"https://twitter.com/fastly\"\n\n    [local_server.config_stores.\"DICTIONARY_NAME\"]\n      format = \"inline-toml\"\n    [local_server.config_stores.\"DICTIONARY_NAME\".contents]\n      \"twitter\" = \"https://twitter.com/fastly\"\n\n  [local_server.geolocation]\n  format = \"inline-toml\"\n\n  [local_server.geolocation.addresses]\n    [local_server.geolocation.addresses.\"2.216.196.179\"]\n      as_name = \"sky uk limited\"\n      as_number = 5607\n      area_code = 0\n      city = \"bircotes\"\n      conn_speed = \"broadband\"\n      conn_type = \"wifi\"\n      continent = \"EU\"\n      country_code = \"GB\"\n      country_code3 = \"GBR\"\n      country_name = \"united kingdom\"\n      gmt_offset = 0\n      latitude = 53.42\n      longitude = -1.05\n      metro_code = 826039\n      postal_code = \"dn11 8af\"\n      proxy_description = \"?\"\n      proxy_type = \"?\"\n      region = \"NTT\"\n      utc_offset = 0\n    [local_server.geolocation.addresses.\"2607:f0d0:1002:51::4\"]\n      as_name = \"softlayer technologies inc.\"\n      as_number = 36351\n      area_code = 214\n      city = \"dallas\"\n      conn_speed = \"broadband\"\n      conn_type = \"wired\"\n      continent = \"NA\"\n      country_code = \"US\"\n      country_code3 = \"USA\"\n      country_name = \"united states\"\n      gmt_offset = -600\n      latitude = 32.94\n      longitude = -96.84\n      metro_code = 623\n      postal_code = \"75244\"\n      proxy_description = \"?\"\n      proxy_type = \"hosting\"\n      region = \"TX\"\n      utc_offset = -600\n\n  [local_server.kv_stores]\n\n    [[local_server.kv_stores.KV_STORE_NAME]]\n      key = \"placeholder\"\n      data = 'placholder'\n\n  [local_server.secret_stores]\n    [[local_server.secret_stores.SECRET_STORE_NAME]]\n      key = \"first\"\n      data = \"This is also some secret data\"\n    [[local_server.secret_stores.SECRET_STORE_NAME]]\n      key = \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"\n      data = \"This is some secret data\"\n\n  [local_server.device_detection]\n    format = \"inline-toml\"\n\n    [local_server.device_detection.user_agents]\n    [local_server.device_detection.user_agents.\"Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20100101 Firefox/10.0 FBAN/FBIOS;FBAV/8.0.0.28.18;FBBV/1665515;FBDV/iPhone4,1;FBMD/iPhone;FBSN/iPhone OS;FBSV/7.0.4;FBSS/2; FBCR/Telekom.de;FBID/phone;FBLC/de_DE;FBOP/5\"]\n    user_agent = {}\n    os = {}\n    device = {name = \"iPhone\", brand = \"Apple\", model = \"iPhone4,1\", hwtype = \"Mobile Phone\", is_ereader = false, is_gameconsole = false, is_mediaplayer = false, is_mobile = true, is_smarttv = false, is_tablet = false, is_tvplayer = false, is_desktop = false, is_touchscreen = true }\n\n    [local_server.device_detection.user_agents.\"ghosts-app/1.0.2.1 (ASUSTeK COMPUTER INC.; X550CC; Windows 8 (X86); en)\"]\n    user_agent = {}\n    os = {}\n    device = {name = \"Asus TeK\", brand = \"Asus\", model = \"TeK\", is_desktop = false }\n\n\n[setup]\n  [setup.backends]\n    [setup.backends.httpme]\n      address = \"http-me.fastly.dev\"\n      port = 443\n\n    [setup.backends.TheOrigin]\n      address = \"compute-sdk-test-backend.edgecompute.app\"\n      port = 443\n    [setup.backends.TheOrigin2]\n      address = \"compute-sdk-test-backend.edgecompute.app\"\n      port = 443"
  },
  {
    "path": "integration-tests/js-compute/fixtures/module-mode/src/acl.js",
    "content": "/// <reference path=\"../../../../../types/index.d.ts\" />\nimport {\n  strictEqual,\n  assertThrows,\n  assertRejects,\n  deepStrictEqual,\n} from './assertions.js';\nimport { routes } from './routes.js';\nimport { env } from 'fastly:env';\nimport { Acl } from 'fastly:acl';\n\nconst ACL_NAME = env('ACL_NAME');\n\nroutes.set('/acl', async () => {\n  assertThrows(\n    () => Acl(),\n    TypeError,\n    \"Acl builtin can't be instantiated directly\",\n  );\n  assertThrows(\n    () => new Acl(),\n    TypeError,\n    \"Acl builtin can't be instantiated directly\",\n  );\n  assertThrows(\n    () => Acl.open(),\n    TypeError,\n    'Acl open: At least 1 argument required, but only 0 passed',\n  );\n  assertThrows(() => Acl.open(4), TypeError, 'Acl open: name must be a string');\n  assertThrows(\n    () => Acl.open(''),\n    TypeError,\n    'Acl open: name can not be an empty string',\n  );\n  assertThrows(\n    () => Acl.open('foo'),\n    TypeError,\n    'Acl open: \"foo\" acl not found',\n  );\n\n  const acl = Acl.open(ACL_NAME);\n\n  await assertRejects(\n    () => acl.lookup(),\n    TypeError,\n    'lookup: At least 1 argument required, but only 0 passed',\n  );\n  await assertRejects(\n    () => acl.lookup(5),\n    Error,\n    'Invalid address passed to acl.lookup',\n  );\n  await assertRejects(\n    () => acl.lookup('not ip'),\n    Error,\n    'Invalid address passed to acl.lookup',\n  );\n  await assertRejects(\n    () => acl.lookup('999.999.999.999'),\n    Error,\n    'Invalid address passed to acl.lookup',\n  );\n  await assertRejects(\n    () => acl.lookup('123.123.123'),\n    Error,\n    'Invalid address passed to acl.lookup',\n  );\n  await assertRejects(\n    () => acl.lookup('123.123.123.123.123'),\n    Error,\n    'Invalid address passed to acl.lookup',\n  );\n  await assertRejects(\n    () => acl.lookup('100.100.0.0/16'),\n    Error,\n    'Invalid address passed to acl.lookup',\n  );\n\n  strictEqual(await acl.lookup('123.123.123.123'), null);\n  strictEqual(await acl.lookup('100.99.100.100'), null);\n  strictEqual(\n    await acl.lookup('2a04:4b80:1234:5678:9abc:def0:1234:5678'),\n    null,\n  );\n\n  deepStrictEqual(await acl.lookup('100.100.100.100'), {\n    action: 'BLOCK',\n    prefix: '100.100.0.0/16',\n  });\n  deepStrictEqual(await acl.lookup('2a03:4b80::1'), {\n    action: 'ALLOW',\n    prefix: '2a03:4b80:0000:0000:0000:0000:0000:0000/32',\n  });\n  deepStrictEqual(await acl.lookup('2a03:4b80:5c1d:e8f7:92a3:b45c:61d8:7e9f'), {\n    action: 'ALLOW',\n    prefix: '2a03:4b80:0000:0000:0000:0000:0000:0000/32',\n  });\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/module-mode/src/assertions.js",
    "content": "export function strictEqual(actual, expected, message) {\n  if (actual !== expected) {\n    throw new Error(\n      `Expected \\`${JSON.stringify(actual)}\\` to equal \\`${JSON.stringify(expected)}\\`${message ? '\\n' + message : ''}`,\n    );\n  }\n}\n\nexport function assert(truthy, maybeMessage) {\n  if (!truthy) {\n    throw new Error(`Assertion failed: ${maybeMessage}`);\n  }\n}\n\nexport { assert as ok };\n\nexport async function assertResolves(func) {\n  try {\n    await func();\n  } catch (error) {\n    throw new Error(\n      `Expected \\`${func.toString()}\\` to resolve - Found it rejected: ${error.name}: ${error.message}`,\n    );\n  }\n}\n\nexport async function assertRejects(func, errorClass, errorMessage) {\n  try {\n    await func();\n  } catch (error) {\n    if (errorClass) {\n      if (error instanceof errorClass === false) {\n        throw new Error(\n          `Expected \\`${func.toString()}\\` to reject instance of \\`${errorClass.name}\\` - Found instance of \\`${error.name}\\``,\n        );\n      }\n    }\n\n    if (errorMessage) {\n      if (error.message !== errorMessage) {\n        throw new Error(\n          `Expected \\`${func.toString()}\\` to reject error message of \\`${errorMessage}\\` - Found \\`${error.message}\\``,\n        );\n      }\n    }\n\n    return;\n  }\n  throw new Error(\n    `Expected \\`${func.toString()}\\` to reject - Found it did not reject`,\n  );\n}\n\nexport function assertThrows(func, errorClass, errorMessage) {\n  try {\n    func();\n  } catch (error) {\n    if (errorClass) {\n      if (error instanceof errorClass === false) {\n        throw new Error(\n          `Expected \\`${func.toString()}\\` to throw instance of \\`${errorClass.name}\\` - Found instance of \\`${error.name}\\`: ${error.message}\\n${error.stack}`,\n        );\n      }\n    }\n\n    if (errorMessage) {\n      if (error.message !== errorMessage) {\n        throw new Error(\n          `Expected \\`${func.toString()}\\` to throw error message of \\`${errorMessage}\\` - Found \\`${error.message}\\``,\n        );\n      }\n    }\n\n    return;\n  }\n  throw new Error(\n    `Expected \\`${func.toString()}\\` to throw - Found it did not throw`,\n  );\n}\n\nexport function assertDoesNotThrow(func) {\n  try {\n    func();\n  } catch (error) {\n    throw new Error(\n      `Expected \\`${func.toString()}\\` to not throw - Found it did throw: ${error.name}: ${error.message}`,\n    );\n  }\n}\n\nexport function deepStrictEqual(a, b) {\n  if (!deepEqual(a, b)) {\n    throw new Error(\n      `Expected ${a} to equal ${b}, got ${JSON.stringify(a, null, 2)}`,\n    );\n  }\n}\n\nexport function deepEqual(a, b) {\n  var aKeys;\n  var bKeys;\n  var typeA;\n  var typeB;\n  var key;\n  var i;\n\n  typeA = typeof a;\n  typeB = typeof b;\n  if (a === null || typeA !== 'object') {\n    if (b === null || typeB !== 'object') {\n      return a === b;\n    }\n    return false;\n  }\n\n  // Case: `a` is of type 'object'\n  if (b === null || typeB !== 'object') {\n    return false;\n  }\n  if (Array.isArray(a) && Array.isArray(b)) {\n    if (a.length !== b.length) return false;\n    for (let i = 0; i < a.length; i++) {\n      if (!deepEqual(a[i], b[i])) {\n        return false;\n      }\n    }\n    return true;\n  }\n  if (Object.getPrototypeOf(a) !== Object.getPrototypeOf(b)) {\n    return false;\n  }\n  if (a instanceof Date) {\n    return a.getTime() === b.getTime();\n  }\n  if (a instanceof RegExp) {\n    return a.source === b.source && a.flags === b.flags;\n  }\n  if (a instanceof Error) {\n    if (a.message !== b.message || a.name !== b.name) {\n      return false;\n    }\n  }\n\n  aKeys = Object.keys(a);\n  bKeys = Object.keys(b);\n  if (aKeys.length !== bKeys.length) {\n    return false;\n  }\n  aKeys.sort();\n  bKeys.sort();\n\n  // Cheap key test:\n  for (i = 0; i < aKeys.length; i++) {\n    if (aKeys[i] !== bKeys[i]) {\n      return false;\n    }\n  }\n  // Possibly expensive deep equality test for each corresponding key:\n  for (i = 0; i < aKeys.length; i++) {\n    key = aKeys[i];\n    if (!deepEqual(a[key], b[key])) {\n      return false;\n    }\n  }\n  return typeA === typeB;\n}\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/module-mode/src/console.js",
    "content": "/* eslint-env serviceworker */\n/// <reference path=\"../../../../../types/index.d.ts\" />\n\nimport { routes } from './routes.js';\n\nroutes.set('/console', () => {\n  console.log('Happy', 'birthday', 'Aki', 'and', 'Yuki!');\n  let arg;\n  arg = new Map();\n  arg.set({ a: 1, b: { c: 2 } }, 2);\n  arg.set(function foo() {}, {});\n  console.log('Map:', arg);\n  arg = new Set([{ a: 1, b: { c: 2 } }, 2, 3]);\n  console.log('Set:', arg);\n  arg = [1, 2, 3, [], 5];\n  console.log('Array:', arg);\n  arg = {\n    a: 1,\n    b: 2,\n    c: 3,\n    d() {},\n    get f() {\n      return 1;\n    },\n    g: function bar() {},\n    h: Array.from,\n  };\n  console.log('Object:', arg);\n  arg = function () {};\n  console.log('function:', arg);\n  arg = true;\n  console.log('boolean:', arg);\n  arg = undefined;\n  console.log('undefined:', arg);\n  arg = null;\n  console.log('null:', arg);\n  arg = new Proxy({ a: 21 }, {});\n  console.log('proxy:', arg);\n  arg = Infinity;\n  console.log('Infinity:', arg);\n  arg = NaN;\n  console.log('NaN:', arg);\n  arg = Symbol('wow');\n  console.log('Symbol:', arg);\n  arg = new Error('uh oh');\n  console.log('Error:', arg);\n  arg = 1;\n  console.log('Number:', arg);\n  arg = 1.111;\n  console.log('Number:', arg);\n  arg = 10n;\n  console.log('BigInt:', arg);\n  arg = new Date('2022-08-18T09:57:47.120Z');\n  console.log('Date:', arg);\n  arg = 'cake';\n  console.log('string:', arg);\n  arg = /magic/;\n  console.log('RegExp:', arg);\n  arg = Int8Array.from([1, 3, 4, 2, 5, 6, 99999]);\n  console.log('Int8Array:', arg);\n  arg = Uint8Array.from([1, 3, 4, 2, 5, 6, 99999]);\n  console.log('Uint8Array:', arg);\n  arg = Uint8ClampedArray.from([1, 3, 4, 2, 5, 6, 99999]);\n  console.log('Uint8ClampedArray:', arg);\n  arg = Int16Array.from([1, 3, 4, 2, 5, 6, 99999]);\n  console.log('Int16Array:', arg);\n  arg = Uint16Array.from([1, 3, 4, 2, 5, 6, 99999]);\n  console.log('Uint16Array:', arg);\n  arg = Int32Array.from([1, 3, 4, 2, 5, 6, 99999]);\n  console.log('Int32Array:', arg);\n  arg = Uint32Array.from([1, 3, 4, 2, 5, 6, 99999]);\n  console.log('Uint32Array:', arg);\n  arg = Float32Array.from([1, 3, 4, 2, 5, 6, 99999]);\n  console.log('Float32Array:', arg);\n  arg = Float64Array.from([1, 3, 4, 2, 5, 6, 99999]);\n  console.log('Float64Array:', arg);\n  arg = BigInt64Array.from([1n, 3n, 4n, 2n, 5n, 6n, 99999n]);\n  console.log('BigInt64Array:', arg);\n  arg = BigUint64Array.from([1n, 3n, 4n, 2n, 5n, 6n, 99999n]);\n  console.log('BigUint64Array:', arg);\n  arg = new WeakMap();\n  console.log('WeakMap:', arg);\n  arg = new WeakSet();\n  console.log('WeakSet:', arg);\n  arg = new Promise(() => {});\n  console.log('Promise:', arg);\n  arg = Promise.resolve(9);\n  console.log('resolved promise:', arg);\n  arg = Promise.reject(new Error('oops'));\n  console.log('rejected promise:', arg);\n  arg.catch(() => {});\n  arg = new Response('Me? I am the response');\n  console.log('Response:', arg);\n  arg = new Request('https://www.fastly.com', {\n    body: 'I am the body',\n    method: 'POST',\n  });\n  console.log('Request:', arg);\n  arg = new ReadableStream();\n  console.log('ReadableStream:', arg);\n  arg = new TransformStream();\n  console.log('TransformStream:', arg);\n  arg = new WritableStream();\n  console.log('WritableStream:', arg);\n  arg = new URL('https://www.test.com:123/asdf?some&params=val');\n  console.log('URL:', arg);\n  return new Response('ok');\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/module-mode/src/dynamic-backend.js",
    "content": "/// <reference path=\"../../../../../types/index.d.ts\" />\nimport {\n  Backend,\n  setDefaultDynamicBackendConfig,\n  enforceExplicitBackends,\n} from 'fastly:backend';\nimport { allowDynamicBackends } from 'fastly:experimental';\nimport { CacheOverride } from 'fastly:cache-override';\nimport {\n  assert,\n  assertDoesNotThrow,\n  assertRejects,\n  assertResolves,\n  assertThrows,\n  deepStrictEqual,\n  ok,\n  strictEqual,\n} from './assertions.js';\nimport { isRunningLocally, routes } from './routes.js';\n\nroutes.set('/backend/timeout', async () => {\n  if (isRunningLocally()) {\n    return;\n  }\n  allowDynamicBackends(true);\n  let backend = new Backend({\n    name: 'httpme1',\n    target: 'http-me.fastly.dev',\n    hostOverride: 'http-me.fastly.dev',\n    useSSL: true,\n    dontPool: true,\n    betweenBytesTimeout: 1_000,\n    connectTimeout: 1_000,\n    firstByteTimeout: 1_000,\n  });\n  console.time(`fetch('https://http-me.fastly.dev/test?wait=5000'`);\n  await assertRejects(\n    () =>\n      fetch('https://http-me.fastly.dev/test?wait=5000', {\n        backend,\n        cacheOverride: new CacheOverride('pass'),\n      }),\n    DOMException,\n    'HTTP response timeout',\n  );\n  console.timeEnd(`fetch('https://http-me.fastly.dev/test?wait=5000'`);\n});\n\n// implicit dynamic backend\n{\n  routes.set(\n    '/implicit-dynamic-backend/dynamic-backends-disabled',\n    async () => {\n      allowDynamicBackends(false);\n      await assertRejects(() =>\n        fetch('https://http-me.fastly.dev/headers', {\n          cacheOverride: 'pass',\n        }),\n      );\n    },\n  );\n  routes.set(\n    '/implicit-dynamic-backend/dynamic-backends-enabled',\n    async (evt) => {\n      allowDynamicBackends(true);\n      strictEqual(evt.request.backend, undefined);\n      strictEqual(new Response('test').backend, undefined);\n      await assertResolves(async () => {\n        const res = await fetch('https://http-me.fastly.dev/headers', {\n          cacheOverride: 'pass',\n        });\n        strictEqual(res.backend.name, 'http-me.fastly.dev');\n        strictEqual(res.backend.isSSL, true);\n      });\n      await assertResolves(() => fetch('https://www.fastly.com'));\n      enforceExplicitBackends();\n      await assertRejects(() => fetch('https://www.fastly.com'));\n      enforceExplicitBackends('TheOrigin');\n      await assertResolves(() => fetch('https://www.fastly.com'));\n    },\n  );\n  routes.set(\n    '/implicit-dynamic-backend/dynamic-backends-enabled-called-twice',\n    async () => {\n      allowDynamicBackends(true);\n      await assertResolves(() => fetch('https://http-me.fastly.dev/headers'));\n      await assertResolves(() => fetch('https://http-me.fastly.dev/headers'));\n    },\n  );\n  routes.set('/implicit-dynamic-backend/default-timeouts', async () => {\n    if (isRunningLocally()) {\n      return;\n    }\n    allowDynamicBackends(true);\n    allowDynamicBackends({\n      betweenBytesTimeout: 3_000,\n      connectTimeout: 3_000,\n      firstByteTimeout: 3_000,\n    });\n    await assertResolves(() =>\n      fetch('https://http-me.fastly.dev/test?wait=2000'),\n    );\n    await assertRejects(\n      () => fetch('https://http-me.fastly.dev/test?wait=5000'),\n      DOMException,\n      'HTTP response timeout',\n    );\n  });\n}\n\n// explicit dynamic backend\n{\n  routes.set(\n    '/explicit-dynamic-backend/dynamic-backends-enabled-all-fields',\n    async () => {\n      allowDynamicBackends(true);\n      let backend = createValidHttpMeBackend();\n      await assertResolves(() =>\n        fetch('https://http-me.fastly.dev/headers', {\n          backend,\n          cacheOverride: new CacheOverride('pass'),\n        }),\n      );\n    },\n  );\n  routes.set(\n    '/explicit-dynamic-backend/dynamic-backends-enabled-minimal-fields',\n    async () => {\n      allowDynamicBackends(true);\n      let backend = createValidFastlyBackend();\n      await assertResolves(() =>\n        fetch('https://www.fastly.com', {\n          backend,\n          cacheOverride: new CacheOverride('pass'),\n        }),\n      );\n    },\n  );\n}\n\n// Backend\n{\n  routes.set('/backend/interface', async () => {\n    let actual = Reflect.ownKeys(Backend);\n    let expected = [\n      'prototype',\n      'exists',\n      'fromName',\n      'health',\n      'length',\n      'name',\n    ];\n    assert(actual, expected, `Reflect.ownKeys(Backend)`);\n\n    actual = Reflect.getOwnPropertyDescriptor(Backend, 'prototype');\n    expected = {\n      value: Backend.prototype,\n      writable: false,\n      enumerable: false,\n      configurable: false,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(Backend, 'prototype')`,\n    );\n\n    actual = Reflect.getOwnPropertyDescriptor(Backend, 'exists');\n    expected = {\n      value: Backend.exists,\n      writable: true,\n      enumerable: true,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(Backend, 'exists')`,\n    );\n\n    assert(typeof Backend.exists, 'function', `typeof Backend.exists`);\n\n    assert(Backend.exists.length, 1, `Backend.exists.length`);\n    assert(Backend.exists.name, 'exists', `Backend.exists.name`);\n\n    actual = Reflect.getOwnPropertyDescriptor(Backend, 'fromName');\n    expected = {\n      value: Backend.fromName,\n      writable: true,\n      enumerable: true,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(Backend, 'fromName')`,\n    );\n\n    assert(typeof Backend.fromName, 'function', `typeof Backend.fromName`);\n\n    assert(Backend.fromName.length, 1, `Backend.fromName.length`);\n    assert(Backend.fromName.name, 'fromName', `Backend.fromName.name`);\n\n    actual = Reflect.getOwnPropertyDescriptor(Backend, 'health');\n    expected = {\n      value: Backend.health,\n      writable: true,\n      enumerable: true,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(Backend, 'health')`,\n    );\n\n    assert(typeof Backend.health, 'function', `typeof Backend.health`);\n\n    assert(Backend.health.length, 1, `Backend.health.length`);\n    assert(Backend.health.name, 'health', `Backend.health.name`);\n\n    actual = Reflect.getOwnPropertyDescriptor(Backend, 'length');\n    expected = {\n      value: 1,\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(Backend, 'length')`,\n    );\n\n    actual = Reflect.getOwnPropertyDescriptor(Backend, 'name');\n    expected = {\n      value: 'Backend',\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(Backend, 'name')`,\n    );\n\n    actual = Reflect.ownKeys(Backend.prototype);\n    expected = [\n      'constructor',\n      'name',\n      'isDynamic',\n      'target',\n      'hostOverride',\n      'port',\n      'connectTimeout',\n      'firstByteTimeout',\n      'betweenBytesTimeout',\n      'httpKeepaliveTime',\n      'tcpKeepalive',\n      'isSSL',\n      'tlsMinVersion',\n      'tlsMaxVersion',\n      'toString',\n      'toName',\n    ];\n    assert(actual, expected, `Reflect.ownKeys(Backend.prototype)`);\n\n    actual = Reflect.getOwnPropertyDescriptor(Backend.prototype, 'constructor');\n    expected = {\n      writable: true,\n      enumerable: false,\n      configurable: true,\n      value: Backend.prototype.constructor,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(Backend.prototype, 'constructor')`,\n    );\n\n    actual = Reflect.getOwnPropertyDescriptor(Backend.prototype, 'toString');\n    expected = {\n      writable: true,\n      enumerable: true,\n      configurable: true,\n      value: Backend.prototype.toString,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(Backend.prototype, 'toString')`,\n    );\n\n    assert(\n      typeof Backend.prototype.constructor,\n      'function',\n      `typeof Backend.prototype.constructor`,\n    );\n    assert(\n      typeof Backend.prototype.toString,\n      'function',\n      `typeof Backend.prototype.toString`,\n    );\n    assert(\n      typeof Backend.prototype.toName,\n      'function',\n      `typeof Backend.prototype.toName`,\n    );\n\n    actual = Reflect.getOwnPropertyDescriptor(\n      Backend.prototype.constructor,\n      'length',\n    );\n    expected = {\n      value: 1,\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(Backend.prototype.constructor, 'length')`,\n    );\n\n    actual = Reflect.getOwnPropertyDescriptor(\n      Backend.prototype.constructor,\n      'name',\n    );\n    expected = {\n      value: 'Backend',\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(Backend.prototype.constructor, 'name')`,\n    );\n\n    actual = Reflect.getOwnPropertyDescriptor(\n      Backend.prototype.toString,\n      'length',\n    );\n    expected = {\n      value: 0,\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(Backend.prototype.toString, 'length')`,\n    );\n\n    actual = Reflect.getOwnPropertyDescriptor(\n      Backend.prototype.toString,\n      'name',\n    );\n    expected = {\n      value: 'toString',\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(Backend.prototype.toString, 'name')`,\n    );\n\n    actual = Reflect.getOwnPropertyDescriptor(\n      Backend.prototype.toName,\n      'length',\n    );\n    expected = {\n      value: 0,\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(Backend.prototype.toName, 'length')`,\n    );\n\n    actual = Reflect.getOwnPropertyDescriptor(Backend.prototype.toName, 'name');\n    expected = {\n      value: 'toName',\n      writable: false,\n      enumerable: false,\n      configurable: true,\n    };\n    assert(\n      actual,\n      expected,\n      `Reflect.getOwnPropertyDescriptor(Backend.prototype.toName, 'name')`,\n    );\n  });\n\n  // constructor\n  {\n    routes.set('/backend/constructor/called-as-regular-function', async () => {\n      assertThrows(\n        () => {\n          Backend();\n        },\n        TypeError,\n        `calling a builtin Backend constructor without new is forbidden`,\n      );\n    });\n    routes.set('/backend/constructor/empty-parameter', async () => {\n      assertThrows(\n        () => {\n          new Backend();\n        },\n        TypeError,\n        `Backend constructor: At least 1 argument required, but only 0 passed`,\n      );\n    });\n    routes.set('/backend/constructor/parameter-not-an-object', async () => {\n      const constructorArguments = [\n        true,\n        false,\n        1,\n        1n,\n        'hello',\n        null,\n        undefined,\n        Symbol(),\n        NaN,\n      ];\n      for (const argument of constructorArguments) {\n        assertThrows(\n          () => {\n            new Backend(argument);\n          },\n          TypeError,\n          `Backend constructor: configuration parameter must be an Object`,\n        );\n      }\n    });\n    // name property\n    {\n      routes.set(\n        '/backend/constructor/parameter-name-property-null',\n        async () => {\n          assertThrows(\n            () => {\n              new Backend({ name: null });\n            },\n            TypeError,\n            `Backend constructor: name can not be null or undefined`,\n          );\n        },\n      );\n      routes.set(\n        '/backend/constructor/parameter-name-property-undefined',\n        async () => {\n          assertThrows(\n            () => {\n              new Backend({ name: undefined });\n            },\n            TypeError,\n            `Backend constructor: name can not be null or undefined`,\n          );\n        },\n      );\n      routes.set(\n        '/backend/constructor/parameter-name-property-too-long',\n        async () => {\n          assertThrows(\n            () => {\n              new Backend({ name: 'a'.repeat(255) });\n            },\n            TypeError,\n            `Backend constructor: name can not be more than 254 characters`,\n          );\n        },\n      );\n      routes.set(\n        '/backend/constructor/parameter-name-property-empty-string',\n        async () => {\n          assertThrows(\n            () => {\n              new Backend({ name: '' });\n            },\n            TypeError,\n            `Backend constructor: name can not be an empty string`,\n          );\n        },\n      );\n      // https://tc39.es/ecma262/#sec-tostring\n      routes.set(\n        '/backend/constructor/parameter-name-property-calls-7.1.17-ToString',\n        async () => {\n          let sentinel;\n          const test = () => {\n            sentinel = Symbol();\n            const name = {\n              toString() {\n                throw sentinel;\n              },\n            };\n            new Backend({ name });\n          };\n          assertThrows(test);\n          try {\n            test();\n          } catch (thrownError) {\n            assert(thrownError, sentinel, 'thrownError === sentinel');\n          }\n          assertThrows(\n            () => new Backend({ name: Symbol() }),\n            TypeError,\n            `can't convert symbol to string`,\n          );\n        },\n      );\n    }\n\n    // target property\n    {\n      routes.set(\n        '/backend/constructor/parameter-target-property-null',\n        async () => {\n          assertThrows(\n            () => {\n              new Backend({ name: 'a', target: null });\n            },\n            TypeError,\n            `Backend constructor: target can not be null or undefined`,\n          );\n        },\n      );\n      routes.set(\n        '/backend/constructor/parameter-target-property-undefined',\n        async () => {\n          assertThrows(\n            () => {\n              new Backend({ name: 'a', target: undefined });\n            },\n            TypeError,\n            `Backend constructor: target can not be null or undefined`,\n          );\n        },\n      );\n      routes.set(\n        '/backend/constructor/parameter-target-property-empty-string',\n        async () => {\n          assertThrows(\n            () => {\n              new Backend({ name: 'a', target: '' });\n            },\n            TypeError,\n            `Backend constructor: target can not be an empty string`,\n          );\n        },\n      );\n      // https://tc39.es/ecma262/#sec-tostring\n      routes.set(\n        '/backend/constructor/parameter-target-property-calls-7.1.17-ToString',\n        async () => {\n          let sentinel;\n          const test = () => {\n            sentinel = Symbol();\n            const target = {\n              toString() {\n                throw sentinel;\n              },\n            };\n            new Backend({ name: 'a', target });\n          };\n          assertThrows(test);\n          try {\n            test();\n          } catch (thrownError) {\n            assert(thrownError, sentinel, 'thrownError === sentinel');\n          }\n          assertThrows(\n            () => new Backend({ name: 'a', target: Symbol() }),\n            TypeError,\n            `can't convert symbol to string`,\n          );\n        },\n      );\n\n      routes.set(\n        '/backend/constructor/parameter-target-property-valid-host',\n        async () => {\n          const targets = [\n            'www.fastly.com',\n            'w-w-w.f-a-s-t-l-y.c-o-m',\n            'a'.repeat(63) + '.com',\n            `${'a'.repeat(63)}.${'a'.repeat(63)}.${'a'.repeat(63)}.${'a'.repeat(57)}.com`,\n            'ai',\n            'w.a:1',\n            'fastly.com:1',\n            'fastly.com:80',\n            'fastly.com:443',\n            'fastly.com:65535',\n            // Basic zero IPv4 address.\n            '0.0.0.0',\n            // Basic non-zero IPv4 address.\n            '192.168.140.255',\n\n            // TODO: These are commented out as the hostcall currently yields an error of \"invalid authority\" when given an ipv6 address\n            // Localhost IPv6.\n            // \"::1\",\n            // Fully expanded IPv6 address.\n            // \"fd7a:115c:a1e0:ab12:4843:cd96:626b:430b\",\n            // IPv6 with elided fields in the middle.\n            // \"fd7a:115c::626b:430b\",\n            // IPv6 with elided fields at the end.\n            // \"fd7a:115c:a1e0:ab12:4843:cd96::\",\n            // IPv6 with single elided field at the end.\n            // \"fd7a:115c:a1e0:ab12:4843:cd96:626b::\",\n            // IPv6 with single elided field in the middle.\n            // \"fd7a:115c:a1e0::4843:cd96:626b:430b\",\n            // IPv6 with the trailing 32 bits written as IPv4 dotted decimal. (4in6)\n            // \"::ffff:192.168.140.255\",\n            // IPv6 with capital letters.\n            // \"FD9E:1A04:F01D::1\",\n          ];\n          let i = 0;\n          for (const target of targets) {\n            assertDoesNotThrow(() => {\n              new Backend({ name: 'target-property-valid-host-' + i, target });\n            });\n            i++;\n          }\n        },\n      );\n\n      routes.set(\n        '/backend/constructor/parameter-target-property-invalid-host',\n        async () => {\n          const targets = [\n            '-www.fastly.com',\n            'www.fastly.com-',\n            'a'.repeat(64) + '.com',\n            `${'a'.repeat(63)}.${'a'.repeat(63)}.${'a'.repeat(63)}.${'a'.repeat(58)}.com`,\n            'w$.com',\n            'w.a:a',\n            'fastly.com:-1',\n            'fastly.com:0',\n            'fastly.com:65536',\n            // IPv4 address in windows-style \"print all the digits\" form.\n            // \"010.000.015.001\",\n            // IPv4 address with a silly amount of leading zeros.\n            // \"000001.00000002.00000003.000000004\",\n            // 4-in-6 with octet with leading zero\n            // \"::ffff:1.2.03.4\",\n            // Basic zero IPv6 address.\n            '::',\n            // IPv6 with not enough fields\n            '1:2:3:4:5:6:7',\n            // IPv6 with too many fields\n            '1:2:3:4:5:6:7:8:9',\n            // IPv6 with 8 fields and a :: expander\n            '1:2:3:4::5:6:7:8',\n            // IPv6 with a field bigger than 2b\n            'fe801::1',\n            // IPv6 with non-hex values in field\n            'fe80:tail:scal:e::',\n            // IPv6 with a zone delimiter but no zone.\n            'fe80::1%',\n            // IPv6 (without ellipsis) with too many fields for trailing embedded IPv4.\n            'ffff:ffff:ffff:ffff:ffff:ffff:ffff:192.168.140.255',\n            // IPv6 (with ellipsis) with too many fields for trailing embedded IPv4.\n            'ffff::ffff:ffff:ffff:ffff:ffff:ffff:192.168.140.255',\n            // IPv6 with invalid embedded IPv4.\n            '::ffff:192.168.140.bad',\n            // IPv6 with multiple ellipsis ::.\n            'fe80::1::1',\n            // IPv6 with invalid non hex/colon character.\n            'fe80:1?:1',\n            // IPv6 with truncated bytes after single colon.\n            'fe80:',\n            ':::1',\n            ':0:1',\n            ':',\n          ];\n          let i = 0;\n          for (const target of targets) {\n            assertThrows(\n              () => {\n                new Backend({\n                  name: 'target-property-invalid-host-' + i,\n                  target,\n                });\n              },\n              TypeError,\n              `Backend constructor: target does not contain a valid IPv4, IPv6, or hostname address`,\n            );\n            i++;\n          }\n        },\n      );\n    }\n\n    // ciphers property\n    {\n      routes.set(\n        '/backend/constructor/parameter-ciphers-property-empty-string',\n        async () => {\n          assertThrows(\n            () => {\n              new Backend({ name: 'a', target: 'a', ciphers: '' });\n            },\n            TypeError,\n            `Backend constructor: ciphers can not be an empty string`,\n          );\n        },\n      );\n      routes.set(\n        '/backend/constructor/parameter-ciphers-property-invalid-cipherlist-string',\n        async () => {\n          assertThrows(\n            () => {\n              new Backend({ name: 'a', target: 'a', ciphers: \",;'^%$#^\" });\n            },\n            TypeError,\n            `Backend constructor: none of the provided ciphers are supported by Fastly. The list of supported ciphers is available on https://developer.fastly.com/learning/concepts/routing-traffic-to-fastly/#use-a-tls-configuration`,\n          );\n        },\n      );\n      const validCiphers = [\n        'ALL',\n        'DEFAULT',\n        'COMPLEMENTOFDEFAULT',\n        'aRSA',\n        'RSA',\n        'kEECDH',\n        'kECDHE',\n        'ECDH',\n        'ECDHE',\n        'EECDH',\n        'TLSv1.2',\n        'TLSv1.0',\n        'SSLv3',\n        'AES128',\n        'AES256',\n        'AES',\n        'AESGCM',\n        'CHACHA20',\n        '3DES',\n        'SHA1',\n        'SHA',\n        'SHA256',\n        'SHA384',\n\n        'DES-CBC3-SHA',\n        'AES128-SHA',\n        'AES256-SHA',\n        'ECDHE-RSA-AES128-SHA',\n        'ECDHE-RSA-AES256-SHA',\n        'AES128-GCM-SHA256',\n        'ECDHE-RSA-AES128-SHA256',\n        'ECDHE-RSA-AES256-SHA384',\n        'ECDHE-RSA-AES128-GCM-SHA256',\n        'ECDHE-RSA-AES256-GCM-SHA384',\n        'ECDHE-RSA-CHACHA20-POLY1305',\n      ];\n\n      const invalidCiphers = [\n        'COMPLEMENTOFALL',\n        'eNULL',\n        'NULL',\n        'aNULL',\n        'kDHr',\n        'kDHd',\n        'kDH',\n        'kDHE',\n        'kEDH',\n        'DH',\n        'DHE',\n        'EDH',\n        'ADH',\n        'AECDH',\n        'aDSS',\n        'DSS',\n        'aDH',\n        'aECDSA',\n        'ECDSA',\n        'AESCCM',\n        'AESCCM8',\n        'ARIA128',\n        'ARIA256',\n        'ARIA',\n        'CAMELLIA128',\n        'CAMELLIA256',\n        'CAMELLIA',\n        'DES',\n        'RC4',\n        'RC2',\n        'IDEA',\n        'SEED',\n        'MD5',\n        'aGOST',\n        'aGOST01',\n        'kGOST',\n        'GOST94',\n        'GOST89MAC',\n        'PSK',\n        'kPSK',\n        'kECDHEPSK',\n        'kDHEPSK',\n        'kRSAPSK',\n        'aPSK',\n        'SUITEB128',\n        'SUITEB128ONLY',\n        'SUITEB192',\n        'CBC',\n\n        'NULL-MD5',\n        'NULL-SHA',\n        'RC4-MD5',\n        'RC4-SHA',\n        'IDEA-CBC-SHA',\n        'DH-DSS-DES-CBC3-SHA',\n        'DH-RSA-DES-CBC3-SHA',\n        'DHE-DSS-DES-CBC3-SHA',\n        'DHE-RSA-DES-CBC3-SHA',\n        'ADH-RC4-MD5',\n        'ADH-DES-CBC3-SHA',\n        'NULL-MD5',\n        'NULL-SHA',\n        'RC4-MD5',\n        'RC4-SHA',\n        'IDEA-CBC-SHA',\n        'DHE-DSS-DES-CBC3-SHA',\n        'DHE-RSA-DES-CBC3-SHA',\n        'ADH-RC4-MD5',\n        'ADH-DES-CBC3-SHA',\n\n        'DH-DSS-AES128-SHA',\n        'DH-DSS-AES256-SHA',\n        'DH-RSA-AES128-SHA',\n        'DH-RSA-AES256-SHA',\n        'DHE-DSS-AES128-SHA',\n        'DHE-DSS-AES256-SHA',\n        'DHE-RSA-AES128-SHA',\n        'DHE-RSA-AES256-SHA',\n        'ADH-AES128-SHA',\n        'ADH-AES256-SHA',\n        'CAMELLIA128-SHA',\n        'CAMELLIA256-SHA',\n        'DH-DSS-CAMELLIA128-SHA',\n        'DH-DSS-CAMELLIA256-SHA',\n        'DH-RSA-CAMELLIA128-SHA',\n        'DH-RSA-CAMELLIA256-SHA',\n        'DHE-DSS-CAMELLIA128-SHA',\n        'DHE-DSS-CAMELLIA256-SHA',\n        'DHE-RSA-CAMELLIA128-SHA',\n        'DHE-RSA-CAMELLIA256-SHA',\n        'ADH-CAMELLIA128-SHA',\n        'ADH-CAMELLIA256-SHA',\n        'SEED-SHA',\n        'DH-DSS-SEED-SHA',\n        'DH-RSA-SEED-SHA',\n        'DHE-DSS-SEED-SHA',\n        'DHE-RSA-SEED-SHA',\n        'ADH-SEED-SHA',\n        'GOST94-GOST89-GOST89',\n        'GOST2001-GOST89-GOST89',\n        'GOST94-NULL-GOST94',\n        'GOST2001-NULL-GOST94',\n        'GOST2012-GOST8912-GOST8912',\n        'GOST2012-NULL-GOST12',\n        'DHE-DSS-RC4-SHA',\n        'ECDHE-RSA-NULL-SHA',\n        'ECDHE-RSA-RC4-SHA',\n        'ECDHE-RSA-DES-CBC3-SHA',\n        'ECDHE-ECDSA-NULL-SHA',\n        'ECDHE-ECDSA-RC4-SHA',\n        'ECDHE-ECDSA-DES-CBC3-SHA',\n        'ECDHE-ECDSA-AES128-SHA',\n        'ECDHE-ECDSA-AES256-SHA',\n        'AECDH-NULL-SHA',\n        'AECDH-RC4-SHA',\n        'AECDH-DES-CBC3-SHA',\n        'AECDH-AES128-SHA',\n        'AECDH-AES256-SHA',\n        'NULL-SHA256',\n        'AES128-SHA256',\n        'AES256-SHA256',\n        'AES256-GCM-SHA384',\n        'DH-RSA-AES128-SHA256',\n        'DH-RSA-AES256-SHA256',\n        'DH-RSA-AES128-GCM-SHA256',\n        'DH-RSA-AES256-GCM-SHA384',\n        'DH-DSS-AES128-SHA256',\n        'DH-DSS-AES256-SHA256',\n        'DH-DSS-AES128-GCM-SHA256',\n        'DH-DSS-AES256-GCM-SHA384',\n        'DHE-RSA-AES128-SHA256',\n        'DHE-RSA-AES256-SHA256',\n        'DHE-RSA-AES128-GCM-SHA256',\n        'DHE-RSA-AES256-GCM-SHA384',\n        'DHE-DSS-AES128-SHA256',\n        'DHE-DSS-AES256-SHA256',\n        'DHE-DSS-AES128-GCM-SHA256',\n        'DHE-DSS-AES256-GCM-SHA384',\n        'ECDHE-ECDSA-AES128-SHA256',\n        'ECDHE-ECDSA-AES256-SHA384',\n        'ECDHE-ECDSA-AES128-GCM-SHA256',\n        'ECDHE-ECDSA-AES256-GCM-SHA384',\n        'ADH-AES128-SHA256',\n        'ADH-AES256-SHA256',\n        'ADH-AES128-GCM-SHA256',\n        'ADH-AES256-GCM-SHA384',\n        'AES128-CCM',\n        'AES256-CCM',\n        'DHE-RSA-AES128-CCM',\n        'DHE-RSA-AES256-CCM',\n        'AES128-CCM8',\n        'AES256-CCM8',\n        'DHE-RSA-AES128-CCM8',\n        'DHE-RSA-AES256-CCM8',\n        'ECDHE-ECDSA-AES128-CCM',\n        'ECDHE-ECDSA-AES256-CCM',\n        'ECDHE-ECDSA-AES128-CCM8',\n        'ECDHE-ECDSA-AES256-CCM8',\n        'ARIA128-GCM-SHA256',\n        'ARIA256-GCM-SHA384',\n        'DHE-RSA-ARIA128-GCM-SHA256',\n        'DHE-RSA-ARIA256-GCM-SHA384',\n        'DHE-DSS-ARIA128-GCM-SHA256',\n        'DHE-DSS-ARIA256-GCM-SHA384',\n        'ECDHE-ECDSA-ARIA128-GCM-SHA256',\n        'ECDHE-ECDSA-ARIA256-GCM-SHA384',\n        'ECDHE-ARIA128-GCM-SHA256',\n        'ECDHE-ARIA256-GCM-SHA384',\n        'PSK-ARIA128-GCM-SHA256',\n        'PSK-ARIA256-GCM-SHA384',\n        'DHE-PSK-ARIA128-GCM-SHA256',\n        'DHE-PSK-ARIA256-GCM-SHA384',\n        'RSA-PSK-ARIA128-GCM-SHA256',\n        'RSA-PSK-ARIA256-GCM-SHA384',\n        'ECDHE-ECDSA-CAMELLIA128-SHA256',\n        'ECDHE-ECDSA-CAMELLIA256-SHA384',\n        'ECDHE-RSA-CAMELLIA128-SHA256',\n        'ECDHE-RSA-CAMELLIA256-SHA384',\n        'PSK-NULL-SHA',\n        'DHE-PSK-NULL-SHA',\n        'RSA-PSK-NULL-SHA',\n        'PSK-RC4-SHA',\n        'PSK-3DES-EDE-CBC-SHA',\n        'PSK-AES128-CBC-SHA',\n        'PSK-AES256-CBC-SHA',\n        'DHE-PSK-RC4-SHA',\n        'DHE-PSK-3DES-EDE-CBC-SHA',\n        'DHE-PSK-AES128-CBC-SHA',\n        'DHE-PSK-AES256-CBC-SHA',\n        'RSA-PSK-RC4-SHA',\n        'RSA-PSK-3DES-EDE-CBC-SHA',\n        'RSA-PSK-AES128-CBC-SHA',\n        'RSA-PSK-AES256-CBC-SHA',\n        'PSK-AES128-GCM-SHA256',\n        'PSK-AES256-GCM-SHA384',\n        'DHE-PSK-AES128-GCM-SHA256',\n        'DHE-PSK-AES256-GCM-SHA384',\n        'RSA-PSK-AES128-GCM-SHA256',\n        'RSA-PSK-AES256-GCM-SHA384',\n        'PSK-AES128-CBC-SHA256',\n        'PSK-AES256-CBC-SHA384',\n        'PSK-NULL-SHA256',\n        'PSK-NULL-SHA384',\n        'DHE-PSK-AES128-CBC-SHA256',\n        'DHE-PSK-AES256-CBC-SHA384',\n        'DHE-PSK-NULL-SHA256',\n        'DHE-PSK-NULL-SHA384',\n        'RSA-PSK-AES128-CBC-SHA256',\n        'RSA-PSK-AES256-CBC-SHA384',\n        'RSA-PSK-NULL-SHA256',\n        'RSA-PSK-NULL-SHA384',\n        'PSK-AES128-GCM-SHA256',\n        'PSK-AES256-GCM-SHA384',\n        'ECDHE-PSK-RC4-SHA',\n        'ECDHE-PSK-3DES-EDE-CBC-SHA',\n        'ECDHE-PSK-AES128-CBC-SHA',\n        'ECDHE-PSK-AES256-CBC-SHA',\n        'ECDHE-PSK-AES128-CBC-SHA256',\n        'ECDHE-PSK-AES256-CBC-SHA384',\n        'ECDHE-PSK-NULL-SHA',\n        'ECDHE-PSK-NULL-SHA256',\n        'ECDHE-PSK-NULL-SHA384',\n        'PSK-CAMELLIA128-SHA256',\n        'PSK-CAMELLIA256-SHA384',\n        'DHE-PSK-CAMELLIA128-SHA256',\n        'DHE-PSK-CAMELLIA256-SHA384',\n        'RSA-PSK-CAMELLIA128-SHA256',\n        'RSA-PSK-CAMELLIA256-SHA384',\n        'ECDHE-PSK-CAMELLIA128-SHA256',\n        'ECDHE-PSK-CAMELLIA256-SHA384',\n        'PSK-AES128-CCM',\n        'PSK-AES256-CCM',\n        'DHE-PSK-AES128-CCM',\n        'DHE-PSK-AES256-CCM',\n        'PSK-AES128-CCM8',\n        'PSK-AES256-CCM8',\n        'DHE-PSK-AES128-CCM8',\n        'DHE-PSK-AES256-CCM8',\n        'ECDHE-ECDSA-CHACHA20-POLY1305',\n        'DHE-RSA-CHACHA20-POLY1305',\n        'PSK-CHACHA20-POLY1305',\n        'ECDHE-PSK-CHACHA20-POLY1305',\n        'DHE-PSK-CHACHA20-POLY1305',\n        'RSA-PSK-CHACHA20-POLY1305',\n      ];\n      routes.set(\n        '/backend/constructor/parameter-ciphers-property-valid-cipherlist-strings-supported-by-fastly',\n        async () => {\n          const ciphers = [...validCiphers];\n          for (const cipher of ciphers) {\n            assertDoesNotThrow(() => {\n              new Backend({ name: cipher, target: 'a', ciphers: cipher });\n            });\n          }\n\n          assertDoesNotThrow(() => {\n            new Backend({\n              name: 'all-valid-ciphers',\n              target: 'a',\n              ciphers: validCiphers.join(':'),\n            });\n            new Backend({\n              name: 'all-ciphers-invalid-marked-as-exclude',\n              target: 'a',\n              ciphers: validCiphers\n                .concat(invalidCiphers.map((c) => '!' + c))\n                .join(':'),\n            });\n          });\n        },\n      );\n      routes.set(\n        '/backend/constructor/parameter-ciphers-property-valid-cipherlist-strings-but-not-supported-by-fastly',\n        async () => {\n          const ciphers = [...invalidCiphers];\n          for (const cipher of ciphers) {\n            assertThrows(\n              () => {\n                new Backend({ name: cipher, target: 'a', ciphers: cipher });\n              },\n              TypeError,\n              `Backend constructor: none of the provided ciphers are supported by Fastly. The list of supported ciphers is available on https://developer.fastly.com/learning/concepts/routing-traffic-to-fastly/#use-a-tls-configuration`,\n            );\n          }\n          assertThrows(\n            () => {\n              new Backend({\n                name: 'all-invalid-ciphers',\n                target: 'a',\n                ciphers: invalidCiphers.join(':'),\n              });\n            },\n            TypeError,\n            `Backend constructor: none of the provided ciphers are supported by Fastly. The list of supported ciphers is available on https://developer.fastly.com/learning/concepts/routing-traffic-to-fastly/#use-a-tls-configuration`,\n          );\n          assertThrows(\n            () => {\n              new Backend({\n                name: 'all-ciphers-valid-marked-as-exclude',\n                target: 'a',\n                ciphers: invalidCiphers\n                  .concat(validCiphers.map((c) => '!' + c))\n                  .join(':'),\n              });\n            },\n            TypeError,\n            `Backend constructor: none of the provided ciphers are supported by Fastly. The list of supported ciphers is available on https://developer.fastly.com/learning/concepts/routing-traffic-to-fastly/#use-a-tls-configuration`,\n          );\n        },\n      );\n      // https://tc39.es/ecma262/#sec-tostring\n      routes.set(\n        '/backend/constructor/parameter-ciphers-property-calls-7.1.17-ToString',\n        async () => {\n          let sentinel;\n          const test = () => {\n            sentinel = Symbol();\n            const ciphers = {\n              toString() {\n                throw sentinel;\n              },\n            };\n            new Backend({ name: 'a', target: 'a', ciphers });\n          };\n          assertThrows(test);\n          try {\n            test();\n          } catch (thrownError) {\n            assert(thrownError, sentinel, 'thrownError === sentinel');\n          }\n          assertThrows(\n            () => new Backend({ name: 'a', target: 'a', ciphers: Symbol() }),\n            TypeError,\n            `can't convert symbol to string`,\n          );\n        },\n      );\n      // AND (+) operator: intersection of two cipher groups\n      routes.set(\n        '/backend/constructor/parameter-ciphers-property-and-operator',\n        async () => {\n          assertDoesNotThrow(() => {\n            new Backend({\n              name: 'and-sha1-aes128',\n              target: 'a',\n              ciphers: 'SHA1+AES128',\n            });\n          });\n          assertDoesNotThrow(() => {\n            new Backend({\n              name: 'and-sha1-aes256',\n              target: 'a',\n              ciphers: 'SHA1+AES256',\n            });\n          });\n          assertDoesNotThrow(() => {\n            new Backend({\n              name: 'and-sha1-ecdhe',\n              target: 'a',\n              ciphers: 'SHA1+ECDHE',\n            });\n          });\n          assertThrows(\n            () => {\n              new Backend({\n                name: 'and-sha1-aesgcm',\n                target: 'a',\n                ciphers: 'SHA1+AESGCM',\n              });\n            },\n            TypeError,\n            `Backend constructor: none of the provided ciphers are supported by Fastly. The list of supported ciphers is available on https://developer.fastly.com/learning/concepts/routing-traffic-to-fastly/#use-a-tls-configuration`,\n          );\n          assertThrows(\n            () => {\n              new Backend({\n                name: 'and-sha1-chacha20',\n                target: 'a',\n                ciphers: 'SHA1+CHACHA20',\n              });\n            },\n            TypeError,\n            `Backend constructor: none of the provided ciphers are supported by Fastly. The list of supported ciphers is available on https://developer.fastly.com/learning/concepts/routing-traffic-to-fastly/#use-a-tls-configuration`,\n          );\n        },\n      );\n    }\n\n    // hostOverride property\n    {\n      routes.set(\n        '/backend/constructor/parameter-hostOverride-property-empty-string',\n        async () => {\n          assertThrows(\n            () => {\n              new Backend({\n                name: 'hostOverride-property-empty-string',\n                target: 'a',\n                hostOverride: '',\n              });\n            },\n            TypeError,\n            `Backend constructor: hostOverride can not be an empty string`,\n          );\n        },\n      );\n      // https://tc39.es/ecma262/#sec-tostring\n      routes.set(\n        '/backend/constructor/parameter-hostOverride-property-calls-7.1.17-ToString',\n        async () => {\n          let sentinel;\n          const test = () => {\n            sentinel = Symbol();\n            const hostOverride = {\n              toString() {\n                throw sentinel;\n              },\n            };\n            new Backend({\n              name: 'hostOverride-property-calls-ToString',\n              target: 'a',\n              hostOverride,\n            });\n          };\n          assertThrows(test);\n          try {\n            test();\n          } catch (thrownError) {\n            assert(thrownError, sentinel, 'thrownError === sentinel');\n          }\n          assertThrows(\n            () =>\n              new Backend({\n                name: 'hostOverride-property-calls-ToString',\n                target: 'a',\n                hostOverride: Symbol(),\n              }),\n            TypeError,\n            `can't convert symbol to string`,\n          );\n        },\n      );\n\n      routes.set(\n        '/backend/constructor/parameter-hostOverride-property-valid-string',\n        async () => {\n          assertDoesNotThrow(() => {\n            new Backend({\n              name: 'hostOverride-property-valid-string',\n              target: 'a',\n              hostOverride: 'www.fastly.com',\n            });\n          });\n        },\n      );\n    }\n\n    // connectTimeout property\n    {\n      routes.set(\n        '/backend/constructor/parameter-connectTimeout-property-negative-number',\n        async () => {\n          assertThrows(\n            () => {\n              new Backend({\n                name: 'connectTimeout-property-negative-number',\n                target: 'a',\n                connectTimeout: -1,\n              });\n            },\n            RangeError,\n            `Backend constructor: connectTimeout can not be a negative number`,\n          );\n        },\n      );\n      routes.set(\n        '/backend/constructor/parameter-connectTimeout-property-too-big',\n        async () => {\n          assertThrows(\n            () => {\n              new Backend({\n                name: 'connectTimeout-property-too-big',\n                target: 'a',\n                connectTimeout: Math.pow(2, 32),\n              });\n            },\n            RangeError,\n            `Backend constructor: connectTimeout is above the maximum of 4294967296`,\n          );\n        },\n      );\n      // https://tc39.es/ecma262/#sec-tonumber\n      routes.set(\n        '/backend/constructor/parameter-connectTimeout-property-calls-7.1.4-ToNumber',\n        async () => {\n          let sentinel;\n          let requestedType;\n          const test = () => {\n            sentinel = Symbol();\n            const connectTimeout = {\n              [Symbol.toPrimitive](type) {\n                requestedType = type;\n                throw sentinel;\n              },\n            };\n            new Backend({\n              name: 'connectTimeout-property-calls-ToNumber',\n              target: 'a',\n              connectTimeout,\n            });\n          };\n          assertThrows(test);\n          try {\n            test();\n          } catch (thrownError) {\n            assert(thrownError, sentinel, 'thrownError === sentinel');\n            assert(requestedType, 'number', 'requestedType === \"number\"');\n          }\n          assertThrows(\n            () =>\n              new Backend({\n                name: 'connectTimeout-property-calls-ToNumber',\n                target: 'a',\n                connectTimeout: Symbol(),\n              }),\n            TypeError,\n            `can't convert symbol to number`,\n          );\n        },\n      );\n\n      routes.set(\n        '/backend/constructor/parameter-connectTimeout-property-valid-number',\n        async () => {\n          assertDoesNotThrow(() => {\n            new Backend({\n              name: 'connectTimeout-property-valid-number',\n              target: 'a',\n              connectTimeout: 1,\n            });\n          });\n        },\n      );\n    }\n\n    // firstByteTimeout property\n    {\n      routes.set(\n        '/backend/constructor/parameter-firstByteTimeout-property-negative-number',\n        async () => {\n          assertThrows(\n            () => {\n              new Backend({\n                name: 'firstByteTimeout-property-negative-number',\n                target: 'a',\n                firstByteTimeout: -1,\n              });\n            },\n            RangeError,\n            `Backend constructor: firstByteTimeout can not be a negative number`,\n          );\n        },\n      );\n      routes.set(\n        '/backend/constructor/parameter-firstByteTimeout-property-too-big',\n        async () => {\n          assertThrows(\n            () => {\n              new Backend({\n                name: 'firstByteTimeout-property-too-big',\n                target: 'a',\n                firstByteTimeout: Math.pow(2, 32),\n              });\n            },\n            RangeError,\n            `Backend constructor: firstByteTimeout is above the maximum of 4294967296`,\n          );\n        },\n      );\n      // https://tc39.es/ecma262/#sec-tonumber\n      routes.set(\n        '/backend/constructor/parameter-firstByteTimeout-property-calls-7.1.4-ToNumber',\n        async () => {\n          let sentinel;\n          let requestedType;\n          const test = () => {\n            sentinel = Symbol();\n            const firstByteTimeout = {\n              [Symbol.toPrimitive](type) {\n                requestedType = type;\n                throw sentinel;\n              },\n            };\n            new Backend({\n              name: 'firstByteTimeout-property-calls-ToNumber',\n              target: 'a',\n              firstByteTimeout,\n            });\n          };\n          assertThrows(test);\n          try {\n            test();\n          } catch (thrownError) {\n            assert(thrownError, sentinel, 'thrownError === sentinel');\n            assert(requestedType, 'number', 'requestedType === \"number\"');\n          }\n          assertThrows(\n            () =>\n              new Backend({\n                name: 'firstByteTimeout-property-calls-ToNumber',\n                target: 'a',\n                firstByteTimeout: Symbol(),\n              }),\n            TypeError,\n            `can't convert symbol to number`,\n          );\n        },\n      );\n\n      routes.set(\n        '/backend/constructor/parameter-firstByteTimeout-property-valid-number',\n        async () => {\n          assertDoesNotThrow(() => {\n            new Backend({\n              name: 'firstByteTimeout-property-valid-number',\n              target: 'a',\n              firstByteTimeout: 1,\n            });\n          });\n        },\n      );\n\n      routes.set(\n        '/backend/constructor/parameter-firstByteTimeout-property-invalid-number',\n        async () => {\n          assertThrows(() => {\n            new Backend({\n              name: 'firstByteTimeout-property-valid-number',\n              target: 'a',\n              firstByteTimeout: 'zzz',\n            });\n          }, RangeError);\n        },\n      );\n    }\n\n    // betweenBytesTimeout property\n    {\n      routes.set(\n        '/backend/constructor/parameter-betweenBytesTimeout-property-negative-number',\n        async () => {\n          assertThrows(\n            () => {\n              new Backend({\n                name: 'betweenBytesTimeout-property-negative-number',\n                target: 'a',\n                betweenBytesTimeout: -1,\n              });\n            },\n            RangeError,\n            `Backend constructor: betweenBytesTimeout can not be a negative number`,\n          );\n        },\n      );\n      routes.set(\n        '/backend/constructor/parameter-betweenBytesTimeout-property-too-big',\n        async () => {\n          assertThrows(\n            () => {\n              new Backend({\n                name: 'betweenBytesTimeout-property-too-big',\n                target: 'a',\n                betweenBytesTimeout: Math.pow(2, 32),\n              });\n            },\n            RangeError,\n            `Backend constructor: betweenBytesTimeout is above the maximum of 4294967296`,\n          );\n        },\n      );\n      // https://tc39.es/ecma262/#sec-tonumber\n      routes.set(\n        '/backend/constructor/parameter-betweenBytesTimeout-property-calls-7.1.4-ToNumber',\n        async () => {\n          let sentinel;\n          let requestedType;\n          const test = () => {\n            sentinel = Symbol();\n            const betweenBytesTimeout = {\n              [Symbol.toPrimitive](type) {\n                requestedType = type;\n                throw sentinel;\n              },\n            };\n            new Backend({\n              name: 'betweenBytesTimeout-property-calls-ToNumber',\n              target: 'a',\n              betweenBytesTimeout,\n            });\n          };\n          assertThrows(test);\n          try {\n            test();\n          } catch (thrownError) {\n            assert(thrownError, sentinel, 'thrownError === sentinel');\n            assert(requestedType, 'number', 'requestedType === \"number\"');\n          }\n          assertThrows(\n            () =>\n              new Backend({\n                name: 'betweenBytesTimeout-property-calls-ToNumber',\n                target: 'a',\n                betweenBytesTimeout: Symbol(),\n              }),\n            TypeError,\n            `can't convert symbol to number`,\n          );\n        },\n      );\n\n      routes.set(\n        '/backend/constructor/parameter-betweenBytesTimeout-property-valid-number',\n        async () => {\n          assertDoesNotThrow(() => {\n            new Backend({\n              name: 'betweenBytesTimeout-property-valid-number',\n              target: 'a',\n              betweenBytesTimeout: 1,\n            });\n          });\n        },\n      );\n    }\n\n    // useSSL property\n    {\n      routes.set(\n        '/backend/constructor/parameter-useSSL-property-valid-boolean',\n        async () => {\n          const types = [{}, [], Symbol(), 1, '2'];\n          for (const type of types) {\n            assertDoesNotThrow(() => {\n              new Backend({\n                name: 'useSSL-property-valid-boolean' + String(type),\n                target: 'a',\n                useSSL: type,\n              });\n            });\n          }\n          assertDoesNotThrow(() => {\n            new Backend({\n              name: 'useSSL-property-valid-boolean-true',\n              target: 'a',\n              useSSL: true,\n            });\n          });\n          assertDoesNotThrow(() => {\n            new Backend({\n              name: 'useSSL-property-valid-boolean-false',\n              target: 'a',\n              useSSL: false,\n            });\n          });\n        },\n      );\n    }\n\n    // dontPool property\n    {\n      routes.set(\n        '/backend/constructor/parameter-dontPool-property-valid-boolean',\n        async () => {\n          const types = [{}, [], Symbol(), 1, '2'];\n          for (const type of types) {\n            assertDoesNotThrow(() => {\n              new Backend({\n                name: 'dontPool-property-valid-boolean' + String(type),\n                target: 'a',\n                dontPool: type,\n              });\n            });\n          }\n          assertDoesNotThrow(() => {\n            new Backend({\n              name: 'dontPool-property-valid-boolean-true',\n              target: 'a',\n              dontPool: true,\n            });\n          });\n          assertDoesNotThrow(() => {\n            new Backend({\n              name: 'dontPool-property-valid-boolean-false',\n              target: 'a',\n              dontPool: false,\n            });\n          });\n        },\n      );\n    }\n\n    // tlsMinVersion property\n    {\n      routes.set(\n        '/backend/constructor/parameter-tlsMinVersion-property-nan',\n        async () => {\n          assertThrows(\n            () => {\n              new Backend({\n                name: 'tlsMinVersion-property-nan',\n                target: 'a',\n                tlsMinVersion: NaN,\n              });\n            },\n            RangeError,\n            `Backend constructor: tlsMinVersion must be either 1, 1.1, 1.2, or 1.3`,\n          );\n        },\n      );\n      routes.set(\n        '/backend/constructor/parameter-tlsMinVersion-property-invalid-number',\n        async () => {\n          assertThrows(\n            () => {\n              new Backend({\n                name: 'tlsMinVersion-property-invalid-number',\n                target: 'a',\n                tlsMinVersion: 1.4,\n              });\n            },\n            RangeError,\n            `Backend constructor: tlsMinVersion must be either 1, 1.1, 1.2, or 1.3`,\n          );\n        },\n      );\n      // https://tc39.es/ecma262/#sec-tonumber\n      routes.set(\n        '/backend/constructor/parameter-tlsMinVersion-property-calls-7.1.4-ToNumber',\n        async () => {\n          let sentinel;\n          let requestedType;\n          const test = () => {\n            sentinel = Symbol();\n            const tlsMinVersion = {\n              [Symbol.toPrimitive](type) {\n                requestedType = type;\n                throw sentinel;\n              },\n            };\n            new Backend({\n              name: 'tlsMinVersion-property-calls-ToNumber',\n              target: 'a',\n              tlsMinVersion,\n            });\n          };\n          assertThrows(test);\n          try {\n            test();\n          } catch (thrownError) {\n            assert(thrownError, sentinel, 'thrownError === sentinel');\n            assert(requestedType, 'number', 'requestedType === \"number\"');\n          }\n          assertThrows(\n            () =>\n              new Backend({\n                name: 'tlsMinVersion-property-calls-ToNumber',\n                target: 'a',\n                tlsMinVersion: Symbol(),\n              }),\n            TypeError,\n            `can't convert symbol to number`,\n          );\n        },\n      );\n\n      routes.set(\n        '/backend/constructor/parameter-tlsMinVersion-property-valid-number',\n        async () => {\n          assertDoesNotThrow(() => {\n            new Backend({\n              name: 'tlsMinVersion-property-valid-number-1',\n              target: 'a',\n              tlsMinVersion: 1,\n            });\n          });\n          assertDoesNotThrow(() => {\n            new Backend({\n              name: 'tlsMinVersion-property-valid-number-1.0',\n              target: 'a',\n              tlsMinVersion: 1.0,\n            });\n          });\n          assertDoesNotThrow(() => {\n            new Backend({\n              name: 'tlsMinVersion-property-valid-number-1.1',\n              target: 'a',\n              tlsMinVersion: 1.1,\n            });\n          });\n          assertDoesNotThrow(() => {\n            new Backend({\n              name: 'tlsMinVersion-property-valid-number-1.2',\n              target: 'a',\n              tlsMinVersion: 1.2,\n            });\n          });\n          assertDoesNotThrow(() => {\n            new Backend({\n              name: 'tlsMinVersion-property-valid-number-1.3',\n              target: 'a',\n              tlsMinVersion: 1.3,\n            });\n          });\n        },\n      );\n\n      routes.set(\n        '/backend/constructor/parameter-tlsMinVersion-greater-than-tlsMaxVersion',\n        async () => {\n          assertThrows(\n            () => {\n              new Backend({\n                name: 'tlsMinVersion-property-valid-number',\n                target: 'a',\n                tlsMinVersion: 1.3,\n                tlsMaxVersion: 1.2,\n              });\n            },\n            RangeError,\n            `Backend constructor: tlsMinVersion must be less than or equal to tlsMaxVersion`,\n          );\n        },\n      );\n    }\n\n    // tlsMaxVersion property\n    {\n      routes.set(\n        '/backend/constructor/parameter-tlsMaxVersion-property-nan',\n        async () => {\n          assertThrows(\n            () => {\n              new Backend({\n                name: 'tlsMaxVersion-property-nan',\n                target: 'a',\n                tlsMaxVersion: NaN,\n              });\n            },\n            RangeError,\n            `Backend constructor: tlsMaxVersion must be either 1, 1.1, 1.2, or 1.3`,\n          );\n        },\n      );\n      routes.set(\n        '/backend/constructor/parameter-tlsMaxVersion-property-invalid-number',\n        async () => {\n          assertThrows(\n            () => {\n              new Backend({\n                name: 'tlsMaxVersion-property-invalid-number',\n                target: 'a',\n                tlsMaxVersion: 1.4,\n              });\n            },\n            RangeError,\n            `Backend constructor: tlsMaxVersion must be either 1, 1.1, 1.2, or 1.3`,\n          );\n        },\n      );\n      // https://tc39.es/ecma262/#sec-tonumber\n      routes.set(\n        '/backend/constructor/parameter-tlsMaxVersion-property-calls-7.1.4-ToNumber',\n        async () => {\n          let sentinel;\n          let requestedType;\n          const test = () => {\n            sentinel = Symbol();\n            const tlsMaxVersion = {\n              [Symbol.toPrimitive](type) {\n                requestedType = type;\n                throw sentinel;\n              },\n            };\n            new Backend({\n              name: 'tlsMaxVersion-property-calls-ToNumber',\n              target: 'a',\n              tlsMaxVersion,\n            });\n          };\n          assertThrows(test);\n          try {\n            test();\n          } catch (thrownError) {\n            assert(thrownError, sentinel, 'thrownError === sentinel');\n            assert(requestedType, 'number', 'requestedType === \"number\"');\n          }\n          assertThrows(\n            () =>\n              new Backend({\n                name: 'tlsMaxVersion-property-calls-ToNumber',\n                target: 'a',\n                tlsMaxVersion: Symbol(),\n              }),\n            TypeError,\n            `can't convert symbol to number`,\n          );\n        },\n      );\n\n      routes.set(\n        '/backend/constructor/parameter-tlsMaxVersion-property-valid-number',\n        async () => {\n          assertDoesNotThrow(() => {\n            new Backend({\n              name: 'tlsMaxVersion-property-valid-number-1',\n              target: 'a',\n              tlsMaxVersion: 1,\n            });\n            new Backend({\n              name: 'tlsMaxVersion-property-valid-number-1.0',\n              target: 'a',\n              tlsMaxVersion: 1.0,\n            });\n            new Backend({\n              name: 'tlsMaxVersion-property-valid-number-1.1',\n              target: 'a',\n              tlsMaxVersion: 1.1,\n            });\n            new Backend({\n              name: 'tlsMaxVersion-property-valid-number-1.2',\n              target: 'a',\n              tlsMaxVersion: 1.2,\n            });\n            new Backend({\n              name: 'tlsMaxVersion-property-valid-number-1.3',\n              target: 'a',\n              tlsMaxVersion: 1.3,\n            });\n          });\n        },\n      );\n    }\n\n    // certificateHostname property\n    {\n      routes.set(\n        '/backend/constructor/parameter-certificateHostname-property-empty-string',\n        async () => {\n          assertThrows(\n            () => {\n              new Backend({\n                name: 'certificateHostname-property-empty-string',\n                target: 'a',\n                certificateHostname: '',\n              });\n            },\n            TypeError,\n            `Backend constructor: certificateHostname can not be an empty string`,\n          );\n        },\n      );\n      // https://tc39.es/ecma262/#sec-tostring\n      routes.set(\n        '/backend/constructor/parameter-certificateHostname-property-calls-7.1.17-ToString',\n        async () => {\n          let sentinel;\n          const test = () => {\n            sentinel = Symbol();\n            const certificateHostname = {\n              toString() {\n                throw sentinel;\n              },\n            };\n            new Backend({\n              name: 'certificateHostname-property-calls-ToString',\n              target: 'a',\n              certificateHostname,\n            });\n          };\n          assertThrows(test);\n          try {\n            test();\n          } catch (thrownError) {\n            assert(thrownError, sentinel, 'thrownError === sentinel');\n          }\n          assertThrows(\n            () =>\n              new Backend({\n                name: 'certificateHostname-property-calls-ToString',\n                target: 'a',\n                certificateHostname: Symbol(),\n              }),\n            TypeError,\n            `can't convert symbol to string`,\n          );\n        },\n      );\n\n      routes.set(\n        '/backend/constructor/parameter-certificateHostname-property-valid-string',\n        async () => {\n          assertDoesNotThrow(() => {\n            new Backend({\n              name: 'certificateHostname-property-valid-string',\n              target: 'a',\n              certificateHostname: 'www.fastly.com',\n            });\n          });\n        },\n      );\n    }\n\n    // caCertificate property\n    {\n      routes.set(\n        '/backend/constructor/parameter-caCertificate-property-empty-string',\n        async () => {\n          assertThrows(\n            () => {\n              new Backend({\n                name: 'caCertificate-property-empty-string',\n                target: 'a',\n                caCertificate: '',\n              });\n            },\n            TypeError,\n            `Backend constructor: caCertificate can not be an empty string`,\n          );\n        },\n      );\n      // https://tc39.es/ecma262/#sec-tostring\n      routes.set(\n        '/backend/constructor/parameter-caCertificate-property-calls-7.1.17-ToString',\n        async () => {\n          let sentinel;\n          const test = () => {\n            sentinel = Symbol();\n            const caCertificate = {\n              toString() {\n                throw sentinel;\n              },\n            };\n            new Backend({\n              name: 'caCertificate-property-calls-ToString',\n              target: 'a',\n              caCertificate,\n            });\n          };\n          assertThrows(test);\n          try {\n            test();\n          } catch (thrownError) {\n            assert(thrownError, sentinel, 'thrownError === sentinel');\n          }\n          assertThrows(\n            () =>\n              new Backend({\n                name: 'caCertificate-property-calls-ToString',\n                target: 'a',\n                caCertificate: Symbol(),\n              }),\n            TypeError,\n            `can't convert symbol to string`,\n          );\n        },\n      );\n\n      routes.set(\n        '/backend/constructor/parameter-caCertificate-property-valid-string',\n        async () => {\n          assertDoesNotThrow(() => {\n            new Backend({\n              name: 'caCertificate-property-valid-string',\n              target: 'a',\n              caCertificate: 'www.fastly.com',\n            });\n          });\n        },\n      );\n    }\n\n    // sniHostname property\n    {\n      routes.set(\n        '/backend/constructor/parameter-sniHostname-property-empty-string',\n        async () => {\n          assertThrows(\n            () => {\n              new Backend({\n                name: 'sniHostname-property-empty-string',\n                target: 'a',\n                sniHostname: '',\n              });\n            },\n            TypeError,\n            `Backend constructor: sniHostname can not be an empty string`,\n          );\n        },\n      );\n      // https://tc39.es/ecma262/#sec-tostring\n      routes.set(\n        '/backend/constructor/parameter-sniHostname-property-calls-7.1.17-ToString',\n        async () => {\n          let sentinel;\n          const test = () => {\n            sentinel = Symbol();\n            const sniHostname = {\n              toString() {\n                throw sentinel;\n              },\n            };\n            new Backend({\n              name: 'sniHostname-property-calls-ToString',\n              target: 'a',\n              sniHostname,\n            });\n          };\n          assertThrows(test);\n          try {\n            test();\n          } catch (thrownError) {\n            assert(thrownError, sentinel, 'thrownError === sentinel');\n          }\n          assertThrows(\n            () =>\n              new Backend({\n                name: 'sniHostname-property-calls-ToString',\n                target: 'a',\n                sniHostname: Symbol(),\n              }),\n            TypeError,\n            `can't convert symbol to string`,\n          );\n        },\n      );\n\n      routes.set(\n        '/backend/constructor/parameter-sniHostname-property-valid-string',\n        async () => {\n          assertDoesNotThrow(() => {\n            new Backend({\n              name: 'sniHostname-property-valid-string',\n              target: 'a',\n              sniHostname: 'www.fastly.com',\n            });\n          });\n        },\n      );\n    }\n\n    // clientCertificate property\n    {\n      routes.set(\n        '/backend/constructor/parameter-clientCertificate-property-invalid',\n        async () => {\n          assertThrows(\n            () => {\n              new Backend({\n                name: 'clientCertificate-clientCertificate-property-invalid',\n                target: 'a',\n                clientCertificate: '',\n              });\n            },\n            TypeError,\n            `Backend constructor: clientCertificate must be an object containing 'certificate' and 'key' properties`,\n          );\n        },\n      );\n      routes.set(\n        '/backend/constructor/parameter-clientCertificate-certificate-property-missing',\n        async () => {\n          assertThrows(\n            () => {\n              new Backend({\n                name: 'clientCertificate-clientCertificate-certificate-property-missing',\n                target: 'a',\n                clientCertificate: {},\n              });\n            },\n            TypeError,\n            `Backend constructor: clientCertificate 'certificate' must be a certificate string`,\n          );\n        },\n      );\n      routes.set(\n        '/backend/constructor/parameter-clientCertificate-certificate-property-invalid',\n        async () => {\n          assertThrows(\n            () => {\n              new Backend({\n                name: 'clientCertificate-clientCertificate-certificate-property-invalid',\n                target: 'a',\n                clientCertificate: { certificate: '' },\n              });\n            },\n            TypeError,\n            `Backend constructor: clientCertificate 'certificate' can not be an empty string`,\n          );\n        },\n      );\n      routes.set(\n        '/backend/constructor/parameter-clientCertificate-key-property-missing',\n        async () => {\n          assertThrows(\n            () => {\n              new Backend({\n                name: 'clientCertificate-clientCertificate-key-property-missing',\n                target: 'a',\n                clientCertificate: { certificate: 'a' },\n              });\n            },\n            TypeError,\n            `Backend constructor: clientCertificate 'key' must be a SecretStoreEntry instance`,\n          );\n        },\n      );\n      routes.set(\n        '/backend/constructor/parameter-clientCertificate-key-property-invalid',\n        async () => {\n          assertThrows(\n            () => {\n              new Backend({\n                name: 'clientCertificate-clientCertificate-key-property-invalid',\n                target: 'a',\n                clientCertificate: { certificate: 'a', key: '' },\n              });\n            },\n            TypeError,\n            `Backend constructor: clientCertificate 'key' must be a SecretStoreEntry instance`,\n          );\n        },\n      );\n      routes.set(\n        '/backend/constructor/parameter-clientCertificate-key-property-fake',\n        async () => {\n          assertThrows(\n            () => {\n              new Backend({\n                name: 'clientCertificate-clientCertificate-key-property-fake',\n                target: 'a',\n                clientCertificate: {\n                  certificate: 'a',\n                  key: Object.create(SecretStoreEntry.prototype),\n                },\n              });\n            },\n            TypeError,\n            `Backend constructor: clientCertificate 'key' must be a SecretStoreEntry instance`,\n          );\n        },\n      );\n      routes.set(\n        '/backend/constructor/parameter-clientCertificate-valid',\n        async () => {\n          if (isRunningLocally()) {\n            return;\n          }\n          let backend = new Backend({\n            name: 'clientCertificate-clientCertificate-valid',\n            target: 'http-me.fastly.dev',\n            clientCertificate: {\n              certificate: 'a',\n              key: SecretStore.fromBytes(new Uint8Array([1, 2, 3])),\n            },\n          });\n          await fetch('https://http-me.fastly.dev/headers', {\n            backend,\n            cacheOverride: new CacheOverride('pass'),\n          });\n        },\n      );\n    }\n\n    // grpc property\n    {\n      routes.set(\n        '/backend/constructor/parameter-grpc-property-falsy',\n        async () => {\n          if (isRunningLocally()) {\n            return;\n          }\n          let backend = new Backend({\n            name: 'grpc-grpc-invalid',\n            target: 'http-me.fastly.dev',\n            grpc: 0,\n          });\n          await fetch('https://http-me.fastly.dev/anything', {\n            backend,\n            cacheOverride: new CacheOverride('pass'),\n          });\n        },\n      );\n      routes.set('/backend/constructor/parameter-grpc-enabled', async () => {\n        if (isRunningLocally()) {\n          return;\n        }\n        let backend = new Backend({\n          name: 'grpc-grpc-valid',\n          target: 'http-me.fastly.dev',\n          grpc: true,\n        });\n        await assertRejects(\n          () =>\n            fetch('https://http-me.fastly.dev/anything', {\n              backend,\n              cacheOverride: new CacheOverride('pass'),\n            }),\n          DOMException,\n        );\n      });\n    }\n\n    // httpKeepalive\n    {\n      routes.set('/backend/constructor/http-keepalive-invalid', async () => {\n        await assertRejects(async () => {\n          await fetch('https://http-me.fastly.dev/anything', {\n            backend: new Backend({\n              name: 'grpc-grpc-invalid',\n              target: 'http-me.fastly.dev',\n              httpKeepalive: NaN,\n            }),\n            cacheOverride: new CacheOverride('pass'),\n          });\n        }, RangeError);\n      });\n      routes.set('/backend/constructor/http-keepalive', async () => {\n        await fetch('https://http-me.fastly.dev/anything', {\n          backend: new Backend({\n            name: 'grpc-grpc-invalid',\n            target: 'http-me.fastly.dev',\n            httpKeepalive: 500,\n          }),\n          cacheOverride: new CacheOverride('pass'),\n        });\n      });\n    }\n\n    // tcpKeepalive\n    {\n      routes.set('/backend/constructor/tcp-keepalive-invalid', async () => {\n        await assertRejects(async () => {\n          await fetch('https://http-me.fastly.dev/anything', {\n            backend: new Backend({\n              name: 'grpc-grpc-invalid',\n              target: 'http-me.fastly.dev',\n              tcpKeepalive: 'blah',\n            }),\n            cacheOverride: new CacheOverride('pass'),\n          });\n        }, TypeError);\n        await assertRejects(async () => {\n          await fetch('https://http-me.fastly.dev/anything', {\n            backend: new Backend({\n              name: 'grpc-grpc-invalid',\n              target: 'http-me.fastly.dev',\n              tcpKeepalive: {\n                intervalSecs: 'boo',\n              },\n            }),\n            cacheOverride: new CacheOverride('pass'),\n          });\n        }, RangeError);\n      });\n      routes.set('/backend/constructor/tcp-keepalive', async () => {\n        await fetch('https://http-me.fastly.dev/anything', {\n          backend: new Backend({\n            name: 'grpc-grpc-invalid',\n            target: 'http-me.fastly.dev',\n            tcpKeepalive: {\n              intervalSecs: 1000,\n              probes: 4,\n            },\n          }),\n          cacheOverride: new CacheOverride('pass'),\n        });\n      });\n    }\n  }\n\n  // setDefaultDynamicBackendConfig\n  {\n    routes.set('/backend/set-default-backend-configuration', async () => {\n      if (isRunningLocally()) {\n        return;\n      }\n      setDefaultDynamicBackendConfig({\n        firstByteTimeout: 1_000,\n        useSSL: true,\n      });\n      const backend = new Backend({\n        name: 'new-default',\n        target: 'http-me.fastly.dev',\n      });\n      console.time(`fetch('https://http-me.fastly.dev/test?wait=2000'`);\n      await assertRejects(\n        () =>\n          fetch('https://http-me.fastly.dev/test?wait=2000', {\n            backend,\n            cacheOverride: new CacheOverride('pass'),\n          }),\n        DOMException,\n        'HTTP response timeout',\n      );\n      console.timeEnd(`fetch('https://http-me.fastly.dev/test?wait=2000'`);\n    });\n  }\n\n  // exists\n  {\n    routes.set('/backend/exists/called-as-constructor-function', async () => {\n      assertThrows(\n        () => {\n          new Backend.exists();\n        },\n        TypeError,\n        `Backend.exists is not a constructor`,\n      );\n    });\n    routes.set('/backend/exists/empty-parameter', async () => {\n      assertThrows(\n        () => {\n          Backend.exists();\n        },\n        TypeError,\n        `Backend.exists: At least 1 argument required, but only 0 passed`,\n      );\n    });\n    // https://tc39.es/ecma262/#sec-tostring\n    routes.set('/backend/exists/parameter-calls-7.1.17-ToString', async () => {\n      let sentinel;\n      const test = () => {\n        sentinel = Symbol();\n        const name = {\n          toString() {\n            throw sentinel;\n          },\n        };\n        Backend.exists(name);\n      };\n      assertThrows(test);\n      try {\n        test();\n      } catch (thrownError) {\n        assert(thrownError, sentinel, 'thrownError === sentinel');\n      }\n      assertThrows(\n        () => Backend.exists(Symbol()),\n        TypeError,\n        `can't convert symbol to string`,\n      );\n    });\n\n    routes.set('/backend/exists/parameter-invalid', async () => {\n      // null\n      assertThrows(() => Backend.exists(null), TypeError);\n      // undefined\n      assertThrows(() => Backend.exists(undefined), TypeError);\n      // .length > 254\n      assertThrows(() => Backend.exists('a'.repeat(255)), TypeError);\n      // .length == 0\n      assertThrows(() => Backend.exists(''), TypeError);\n    });\n    routes.set('/backend/exists/happy-path-backend-exists', async () => {\n      assert(Backend.exists('TheOrigin'), true, `Backend.exists('TheOrigin')`);\n    });\n    routes.set(\n      '/backend/exists/happy-path-backend-does-not-exist',\n      async () => {\n        assert(Backend.exists('meow'), false, `Backend.exists('meow')`);\n      },\n    );\n  }\n\n  // fromName\n  {\n    routes.set('/backend/fromName/called-as-constructor-function', async () => {\n      assertThrows(\n        () => {\n          new Backend.fromName();\n        },\n        TypeError,\n        `Backend.fromName is not a constructor`,\n      );\n    });\n    routes.set('/backend/fromName/empty-parameter', async () => {\n      assertThrows(\n        () => {\n          Backend.fromName();\n        },\n        TypeError,\n        `Backend.fromName: At least 1 argument required, but only 0 passed`,\n      );\n    });\n    // https://tc39.es/ecma262/#sec-tostring\n    routes.set(\n      '/backend/fromName/parameter-calls-7.1.17-ToString',\n      async () => {\n        let sentinel;\n        const test = () => {\n          sentinel = Symbol();\n          const name = {\n            toString() {\n              throw sentinel;\n            },\n          };\n          Backend.fromName(name);\n        };\n        assertThrows(test);\n        try {\n          test();\n        } catch (thrownError) {\n          assert(thrownError, sentinel, 'thrownError === sentinel');\n        }\n        assertThrows(\n          () => Backend.fromName(Symbol()),\n          TypeError,\n          `can't convert symbol to string`,\n        );\n      },\n    );\n\n    routes.set('/backend/fromName/parameter-invalid', async () => {\n      // null\n      assertThrows(() => Backend.fromName(null), TypeError);\n      // undefined\n      assertThrows(() => Backend.fromName(undefined), TypeError);\n      // .length > 254\n      assertThrows(() => Backend.fromName('a'.repeat(255)), TypeError);\n      // .length == 0\n      assertThrows(() => Backend.fromName(''), TypeError);\n    });\n    routes.set('/backend/fromName/happy-path-backend-exists', async () => {\n      allowDynamicBackends(false);\n      assert(\n        Backend.fromName('TheOrigin') instanceof Backend,\n        true,\n        `Backend.fromName('TheOrigin') instanceof Backend`,\n      );\n\n      await assertResolves(() =>\n        fetch('https://http-me.fastly.dev/headers', {\n          backend: Backend.fromName('TheOrigin'),\n        }),\n      );\n    });\n    routes.set(\n      '/backend/fromName/happy-path-backend-does-not-exist',\n      async () => {\n        assertThrows(\n          () => Backend.fromName('meow'),\n          Error,\n          \"Backend.fromName: backend named 'meow' does not exist\",\n        );\n      },\n    );\n  }\n\n  // health\n  {\n    routes.set('/backend/health/called-as-constructor-function', async () => {\n      assertThrows(() => {\n        new Backend.health();\n      }, TypeError);\n    });\n    routes.set('/backend/health/empty-parameter', async () => {\n      assertThrows(\n        () => {\n          Backend.health();\n        },\n        TypeError,\n        `Backend.health: At least 1 argument required, but only 0 passed`,\n      );\n    });\n    // https://tc39.es/ecma262/#sec-tostring\n    routes.set('/backend/health/parameter-calls-7.1.17-ToString', async () => {\n      let sentinel;\n      const test = () => {\n        sentinel = Symbol();\n        const name = {\n          toString() {\n            throw sentinel;\n          },\n        };\n        Backend.health(name);\n      };\n      assertThrows(test);\n      try {\n        test();\n      } catch (thrownError) {\n        assert(thrownError, sentinel, 'thrownError === sentinel');\n      }\n      assertThrows(\n        () => Backend.health(Symbol()),\n        TypeError,\n        `can't convert symbol to string`,\n      );\n    });\n\n    routes.set('/backend/health/parameter-invalid', async () => {\n      // null\n      assertThrows(() => Backend.health(null), TypeError);\n      // undefined\n      assertThrows(() => Backend.health(undefined), TypeError);\n      // .length > 254\n      assertThrows(() => Backend.health('a'.repeat(255)), TypeError);\n      // .length == 0\n      assertThrows(() => Backend.health(''), TypeError);\n    });\n    routes.set('/backend/health/happy-path-backend-exists', async () => {\n      assert(\n        typeof Backend.health('TheOrigin'),\n        'string',\n        \"typeof Backend.health('TheOrigin')\",\n      );\n      assert(\n        Backend.health('TheOrigin'),\n        'unknown',\n        \"Backend.health('TheOrigin')\",\n      );\n    });\n    routes.set(\n      '/backend/health/happy-path-backend-does-not-exist',\n      async () => {\n        assertThrows(\n          () => Backend.health('meow'),\n          Error,\n          \"Backend.health: backend named 'meow' does not exist\",\n        );\n      },\n    );\n  }\n\n  // backend props\n  routes.set('/backend/props', async () => {\n    allowDynamicBackends(true);\n    {\n      const backend = createValidFastlyBackend() ?? validFastlyBackend;\n      strictEqual(backend.isDynamic, true, 'isDymamic');\n      strictEqual(backend.name, 'fastly');\n      strictEqual(backend.toString(), 'fastly');\n      strictEqual(backend.toName(), 'fastly');\n      strictEqual(backend.health(), 'unknown');\n      strictEqual(backend.target, 'www.fastly.com', 'target');\n      strictEqual(backend.hostOverride, 'www.fastly.com', 'override');\n      strictEqual(backend.port, 443, 'port');\n      if (isRunningLocally()) {\n        strictEqual(backend.connectTimeout, null, 'connectTimeout');\n        strictEqual(backend.firstByteTimeout, null, 'firstByteTimeout');\n        strictEqual(backend.betweenBytesTimeout, null, 'betweenBytesTimeout');\n        strictEqual(backend.httpKeepaliveTime, 0, 'httpKeepaliveTime');\n        strictEqual(backend.tcpKeepalive, null, 'tcpKeepalive');\n        strictEqual(backend.isSSL, true, 'isSSL');\n        strictEqual(backend.tlsMinVersion, null, 'tlsMinVersion');\n        strictEqual(backend.tlsMaxVersion, null, 'tlsMaxVersion');\n      } else {\n        strictEqual(backend.connectTimeout, 1000, 'connectTimeout');\n        strictEqual(backend.firstByteTimeout, 15000, 'firstByteTimeout');\n        strictEqual(backend.betweenBytesTimeout, 10000, 'betweenBytesTimeout');\n        strictEqual(backend.httpKeepaliveTime, 600000, 'httpKeepaliveTime');\n        deepStrictEqual(\n          backend.tcpKeepalive,\n          {\n            timeSecs: 1,\n            probes: 1,\n            intervalSecs: 10,\n          },\n          'tcpKeepalive',\n        );\n        strictEqual(backend.isSSL, true, 'isSSL');\n        strictEqual(backend.tlsMinVersion, null, 'tlsMinVersion');\n        strictEqual(backend.tlsMaxVersion, null, 'tlsMaxVersion');\n      }\n    }\n    {\n      const backend = createValidHttpMeBackend() ?? validHttpMeBackend;\n      strictEqual(backend.isDynamic, true, 'isDynamic');\n      strictEqual(backend.name, 'http-me');\n      strictEqual(backend.toString(), 'http-me');\n      strictEqual(backend.toName(), 'http-me');\n      strictEqual(backend.health(), 'unknown');\n      strictEqual(backend.target, 'http-me.fastly.dev', 'target');\n      strictEqual(backend.hostOverride, 'http-me.fastly.dev', 'hostOverride');\n      strictEqual(backend.port, 443, 'port');\n      if (isRunningLocally()) {\n        strictEqual(backend.connectTimeout, null, 'connectTimeout');\n        strictEqual(backend.firstByteTimeout, null, 'firstByteTimeout');\n        strictEqual(backend.betweenBytesTimeout, null, 'betweenBytesTimeout');\n        strictEqual(backend.httpKeepaliveTime, 0, 'httpKeepaliveTime');\n        strictEqual(backend.tcpKeepalive, null, 'tcpKeepalive');\n        strictEqual(backend.isSSL, true, 'isSSL');\n        strictEqual(backend.tlsMinVersion, null, 'tlsMinVersion');\n        strictEqual(backend.tlsMaxVersion, null, 'tlsMaxVersion');\n      } else {\n        strictEqual(backend.connectTimeout, 1000, 'connectTimeout');\n        strictEqual(backend.firstByteTimeout, 180000, 'firstByteTimeout');\n        strictEqual(backend.betweenBytesTimeout, 9000, 'betweenBytesTimeout');\n        strictEqual(backend.httpKeepaliveTime, 600000, 'httpKeepaliveTime');\n        deepStrictEqual(\n          backend.tcpKeepalive,\n          {\n            intervalSecs: 10,\n            timeSecs: 300,\n            probes: 3,\n          },\n          'tcpKeepalive',\n        );\n        strictEqual(backend.isSSL, true, 'isSSL');\n        strictEqual(backend.tlsMinVersion, 1.2, 'tlsMinVersion');\n        strictEqual(backend.tlsMaxVersion, 1.2, 'tlsMaxVersion');\n      }\n    }\n  });\n\n  // ip & port\n  routes.set('/backend/port-ip-defined', async () => {\n    allowDynamicBackends(true);\n    const res = await fetch('https://http-me.fastly.dev/headers', {\n      cacheOverride: new CacheOverride('pass'),\n    });\n    ok(res.port > 0);\n    ok(res.ip.split('.').length > 1 || res.ip.split(':').length > 1);\n  });\n  routes.set('/backend/port-ip-cached', async () => {\n    allowDynamicBackends(true);\n    const res = await fetch('https://http-me.fastly.dev/headers');\n    strictEqual(res.port, undefined);\n    strictEqual(res.ip, undefined);\n  });\n}\n\nlet validHttpMeBackend;\nfunction createValidHttpMeBackend() {\n  if (validHttpMeBackend) return;\n  // We are defining all the possible fields here but any number of fields can be defined - the ones which are not defined will use their default value instead.\n  return (validHttpMeBackend = new Backend({\n    name: 'http-me',\n    target: 'http-me.fastly.dev',\n    hostOverride: 'http-me.fastly.dev',\n    connectTimeout: 1000,\n    firstByteTimeout: 180000,\n    betweenBytesTimeout: 9000,\n    useSSL: true,\n    dontPool: false,\n    tlsMinVersion: 1.2,\n    tlsMaxVersion: 1.2,\n    certificateHostname: 'http-me.fastly.dev',\n    // Colon-delimited list of permitted SSL Ciphers\n    ciphers: 'ECDHE-RSA-AES128-GCM-SHA256:!RC4',\n    sniHostname: 'http-me.fastly.dev',\n  }));\n}\n\nlet validFastlyBackend;\nfunction createValidFastlyBackend() {\n  if (validFastlyBackend) return;\n  return (validFastlyBackend = new Backend({\n    name: 'fastly',\n    target: 'www.fastly.com',\n    hostOverride: 'www.fastly.com',\n    useSSL: true,\n    dontPool: true,\n    tcpKeepalive: {\n      timeSecs: 1,\n      probes: 1,\n    },\n  }));\n}\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/module-mode/src/hello-world.js",
    "content": "import { routes } from './routes';\n\nroutes.set('/hello-world', (evt) => {\n  console.log(evt.request);\n  const res = new Response('hello world');\n  return res;\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/module-mode/src/hono.js",
    "content": "import { routes } from './routes.js';\nimport { allowDynamicBackends } from 'fastly:experimental';\n\nroutes.set('/hono', async (evt) => {\n  const app = new Hono2();\n  const REALIP = '1.2.3.4';\n  const HONO_TAG = 'hono';\n  const REAL_HDR = 'real-hdr';\n  const xdeviceid = 'device-id';\n  allowDynamicBackends(true);\n  app.get('/hono', async (c) => {\n    const newRequest = new Request(\n      'https://http-me.fastly.dev/anything',\n      c.req.raw,\n    );\n    newRequest.headers.set('X-Connecting-IP', `${REALIP}`);\n    newRequest.headers.set(`${REAL_HDR}`, `${REALIP}`);\n    let cacheOverride = new CacheOverride('pass');\n    newRequest.headers.set('Cache-Control', 'no-cache');\n    newRequest.headers.set('Surrogate-Control', 'maxage=0');\n    if (xdeviceid === true) {\n      newRequest.headers.set('X-KnownDevice', '1');\n    } else {\n      newRequest.headers.set('X-KnownDevice', '0');\n    }\n    console.log('a', newRequest.backend);\n    const res = await fetch(newRequest, { cacheOverride });\n    const newResponse = new Response(res.body, res);\n    if (c.req.header('Fastly-Debug') === 'bw-fastly-debug') {\n      newResponse.headers.set('X-Connecting-IP', `${REALIP}`);\n      newResponse.headers.set('X-Custom-Router', `${HONO_TAG}`);\n      newResponse.headers.set('X-Service-Version', fastly.sdkVersion);\n      newResponse.headers.set('X-KnownDevice', `${xdeviceid}`);\n    }\n    return newResponse;\n  });\n  return app.dispatch(evt.request, evt, void 0, evt.request.method);\n});\n\n// node_modules/hono/dist/utils/body.js\nvar parseBody = async (\n  request,\n  options = /* @__PURE__ */ Object.create(null),\n) => {\n  const { all = false, dot = false } = options;\n  const headers =\n    request instanceof HonoRequest ? request.raw.headers : request.headers;\n  const contentType = headers.get('Content-Type');\n  if (\n    (contentType !== null && contentType.startsWith('multipart/form-data')) ||\n    (contentType !== null &&\n      contentType.startsWith('application/x-www-form-urlencoded'))\n  ) {\n    return parseFormData(request, { all, dot });\n  }\n  return {};\n};\nasync function parseFormData(request, options) {\n  const formData = await request.formData();\n  if (formData) {\n    return convertFormDataToBodyData(formData, options);\n  }\n  return {};\n}\nfunction convertFormDataToBodyData(formData, options) {\n  const form = /* @__PURE__ */ Object.create(null);\n  formData.forEach((value, key) => {\n    const shouldParseAllValues = options.all || key.endsWith('[]');\n    if (!shouldParseAllValues) {\n      form[key] = value;\n    } else {\n      handleParsingAllValues(form, key, value);\n    }\n  });\n  if (options.dot) {\n    Object.entries(form).forEach(([key, value]) => {\n      const shouldParseDotValues = key.includes('.');\n      if (shouldParseDotValues) {\n        handleParsingNestedValues(form, key, value);\n        delete form[key];\n      }\n    });\n  }\n  return form;\n}\nvar handleParsingAllValues = (form, key, value) => {\n  if (form[key] !== void 0) {\n    if (Array.isArray(form[key])) {\n      form[key].push(value);\n    } else {\n      form[key] = [form[key], value];\n    }\n  } else {\n    form[key] = value;\n  }\n};\nvar handleParsingNestedValues = (form, key, value) => {\n  let nestedForm = form;\n  const keys = key.split('.');\n  keys.forEach((key2, index) => {\n    if (index === keys.length - 1) {\n      nestedForm[key2] = value;\n    } else {\n      if (\n        !nestedForm[key2] ||\n        typeof nestedForm[key2] !== 'object' ||\n        Array.isArray(nestedForm[key2]) ||\n        nestedForm[key2] instanceof File\n      ) {\n        nestedForm[key2] = /* @__PURE__ */ Object.create(null);\n      }\n      nestedForm = nestedForm[key2];\n    }\n  });\n};\n\n// node_modules/hono/dist/utils/url.js\nvar splitPath = (path) => {\n  const paths = path.split('/');\n  if (paths[0] === '') {\n    paths.shift();\n  }\n  return paths;\n};\nvar splitRoutingPath = (routePath) => {\n  const { groups, path } = extractGroupsFromPath(routePath);\n  const paths = splitPath(path);\n  return replaceGroupMarks(paths, groups);\n};\nvar extractGroupsFromPath = (path) => {\n  const groups = [];\n  path = path.replace(/\\{[^}]+\\}/g, (match, index) => {\n    const mark = `@${index}`;\n    groups.push([mark, match]);\n    return mark;\n  });\n  return { groups, path };\n};\nvar replaceGroupMarks = (paths, groups) => {\n  for (let i = groups.length - 1; i >= 0; i--) {\n    const [mark] = groups[i];\n    for (let j = paths.length - 1; j >= 0; j--) {\n      if (paths[j].includes(mark)) {\n        paths[j] = paths[j].replace(mark, groups[i][1]);\n        break;\n      }\n    }\n  }\n  return paths;\n};\nvar patternCache = {};\nvar getPattern = (label) => {\n  if (label === '*') {\n    return '*';\n  }\n  const match = label.match(/^\\:([^\\{\\}]+)(?:\\{(.+)\\})?$/);\n  if (match) {\n    if (!patternCache[label]) {\n      if (match[2]) {\n        patternCache[label] = [\n          label,\n          match[1],\n          new RegExp('^' + match[2] + '$'),\n        ];\n      } else {\n        patternCache[label] = [label, match[1], true];\n      }\n    }\n    return patternCache[label];\n  }\n  return null;\n};\nvar tryDecodeURI = (str) => {\n  try {\n    return decodeURI(str);\n  } catch {\n    return str.replace(/(?:%[0-9A-Fa-f]{2})+/g, (match) => {\n      try {\n        return decodeURI(match);\n      } catch {\n        return match;\n      }\n    });\n  }\n};\nvar getPath = (request) => {\n  const url = request.url;\n  const start = url.indexOf('/', 8);\n  let i = start;\n  for (; i < url.length; i++) {\n    const charCode = url.charCodeAt(i);\n    if (charCode === 37) {\n      const queryIndex = url.indexOf('?', i);\n      const path = url.slice(start, queryIndex === -1 ? void 0 : queryIndex);\n      return tryDecodeURI(\n        path.includes('%25') ? path.replace(/%25/g, '%2525') : path,\n      );\n    } else if (charCode === 63) {\n      break;\n    }\n  }\n  return url.slice(start, i);\n};\nvar getPathNoStrict = (request) => {\n  const result = getPath(request);\n  return result.length > 1 && result[result.length - 1] === '/'\n    ? result.slice(0, -1)\n    : result;\n};\nvar mergePath = (...paths) => {\n  let p = '';\n  let endsWithSlash = false;\n  for (let path of paths) {\n    if (p[p.length - 1] === '/') {\n      p = p.slice(0, -1);\n      endsWithSlash = true;\n    }\n    if (path[0] !== '/') {\n      path = `/${path}`;\n    }\n    if (path === '/' && endsWithSlash) {\n      p = `${p}/`;\n    } else if (path !== '/') {\n      p = `${p}${path}`;\n    }\n    if (path === '/' && p === '') {\n      p = '/';\n    }\n  }\n  return p;\n};\nvar checkOptionalParameter = (path) => {\n  if (!path.match(/\\:.+\\?$/)) {\n    return null;\n  }\n  const segments = path.split('/');\n  const results = [];\n  let basePath = '';\n  segments.forEach((segment) => {\n    if (segment !== '' && !/\\:/.test(segment)) {\n      basePath += '/' + segment;\n    } else if (/\\:/.test(segment)) {\n      if (/\\?/.test(segment)) {\n        if (results.length === 0 && basePath === '') {\n          results.push('/');\n        } else {\n          results.push(basePath);\n        }\n        const optionalSegment = segment.replace('?', '');\n        basePath += '/' + optionalSegment;\n        results.push(basePath);\n      } else {\n        basePath += '/' + segment;\n      }\n    }\n  });\n  return results.filter((v, i, a) => a.indexOf(v) === i);\n};\nvar _decodeURI = (value) => {\n  if (!/[%+]/.test(value)) {\n    return value;\n  }\n  if (value.indexOf('+') !== -1) {\n    value = value.replace(/\\+/g, ' ');\n  }\n  return /%/.test(value) ? decodeURIComponent_(value) : value;\n};\nvar _getQueryParam = (url, key, multiple) => {\n  let encoded;\n  if (!multiple && key && !/[%+]/.test(key)) {\n    let keyIndex2 = url.indexOf(`?${key}`, 8);\n    if (keyIndex2 === -1) {\n      keyIndex2 = url.indexOf(`&${key}`, 8);\n    }\n    while (keyIndex2 !== -1) {\n      const trailingKeyCode = url.charCodeAt(keyIndex2 + key.length + 1);\n      if (trailingKeyCode === 61) {\n        const valueIndex = keyIndex2 + key.length + 2;\n        const endIndex = url.indexOf('&', valueIndex);\n        return _decodeURI(\n          url.slice(valueIndex, endIndex === -1 ? void 0 : endIndex),\n        );\n      } else if (trailingKeyCode == 38 || isNaN(trailingKeyCode)) {\n        return '';\n      }\n      keyIndex2 = url.indexOf(`&${key}`, keyIndex2 + 1);\n    }\n    encoded = /[%+]/.test(url);\n    if (!encoded) {\n      return void 0;\n    }\n  }\n  const results = {};\n  encoded ??= /[%+]/.test(url);\n  let keyIndex = url.indexOf('?', 8);\n  while (keyIndex !== -1) {\n    const nextKeyIndex = url.indexOf('&', keyIndex + 1);\n    let valueIndex = url.indexOf('=', keyIndex);\n    if (valueIndex > nextKeyIndex && nextKeyIndex !== -1) {\n      valueIndex = -1;\n    }\n    let name = url.slice(\n      keyIndex + 1,\n      valueIndex === -1\n        ? nextKeyIndex === -1\n          ? void 0\n          : nextKeyIndex\n        : valueIndex,\n    );\n    if (encoded) {\n      name = _decodeURI(name);\n    }\n    keyIndex = nextKeyIndex;\n    if (name === '') {\n      continue;\n    }\n    let value;\n    if (valueIndex === -1) {\n      value = '';\n    } else {\n      value = url.slice(\n        valueIndex + 1,\n        nextKeyIndex === -1 ? void 0 : nextKeyIndex,\n      );\n      if (encoded) {\n        value = _decodeURI(value);\n      }\n    }\n    if (multiple) {\n      if (!(results[name] && Array.isArray(results[name]))) {\n        results[name] = [];\n      }\n      results[name].push(value);\n    } else {\n      results[name] ??= value;\n    }\n  }\n  return key ? results[key] : results;\n};\nvar getQueryParam = _getQueryParam;\nvar getQueryParams = (url, key) => {\n  return _getQueryParam(url, key, true);\n};\nvar decodeURIComponent_ = decodeURIComponent;\n\n// node_modules/hono/dist/request.js\nvar HonoRequest = class {\n  raw;\n  #validatedData;\n  #matchResult;\n  routeIndex = 0;\n  path;\n  bodyCache = {};\n  constructor(request, path = '/', matchResult = [[]]) {\n    this.raw = request;\n    this.path = path;\n    this.#matchResult = matchResult;\n    this.#validatedData = {};\n  }\n  param(key) {\n    return key ? this.getDecodedParam(key) : this.getAllDecodedParams();\n  }\n  getDecodedParam(key) {\n    const paramKey = this.#matchResult[0][this.routeIndex][1][key];\n    const param = this.getParamValue(paramKey);\n    return param\n      ? /\\%/.test(param)\n        ? decodeURIComponent_(param)\n        : param\n      : void 0;\n  }\n  getAllDecodedParams() {\n    const decoded = {};\n    const keys = Object.keys(this.#matchResult[0][this.routeIndex][1]);\n    for (const key of keys) {\n      const value = this.getParamValue(\n        this.#matchResult[0][this.routeIndex][1][key],\n      );\n      if (value && typeof value === 'string') {\n        decoded[key] = /\\%/.test(value) ? decodeURIComponent_(value) : value;\n      }\n    }\n    return decoded;\n  }\n  getParamValue(paramKey) {\n    return this.#matchResult[1] ? this.#matchResult[1][paramKey] : paramKey;\n  }\n  query(key) {\n    return getQueryParam(this.url, key);\n  }\n  queries(key) {\n    return getQueryParams(this.url, key);\n  }\n  header(name) {\n    if (name) {\n      return this.raw.headers.get(name.toLowerCase()) ?? void 0;\n    }\n    const headerData = {};\n    this.raw.headers.forEach((value, key) => {\n      headerData[key] = value;\n    });\n    return headerData;\n  }\n  async parseBody(options) {\n    return (this.bodyCache.parsedBody ??= await parseBody(this, options));\n  }\n  cachedBody = (key) => {\n    const { bodyCache, raw: raw2 } = this;\n    const cachedBody = bodyCache[key];\n    if (cachedBody) {\n      return cachedBody;\n    }\n    const anyCachedKey = Object.keys(bodyCache)[0];\n    if (anyCachedKey) {\n      return bodyCache[anyCachedKey].then((body) => {\n        if (anyCachedKey === 'json') {\n          body = JSON.stringify(body);\n        }\n        return new Response(body)[key]();\n      });\n    }\n    return (bodyCache[key] = raw2[key]());\n  };\n  json() {\n    return this.cachedBody('json');\n  }\n  text() {\n    return this.cachedBody('text');\n  }\n  arrayBuffer() {\n    return this.cachedBody('arrayBuffer');\n  }\n  blob() {\n    return this.cachedBody('blob');\n  }\n  formData() {\n    return this.cachedBody('formData');\n  }\n  addValidatedData(target, data) {\n    this.#validatedData[target] = data;\n  }\n  valid(target) {\n    return this.#validatedData[target];\n  }\n  get url() {\n    return this.raw.url;\n  }\n  get method() {\n    return this.raw.method;\n  }\n  get matchedRoutes() {\n    return this.#matchResult[0].map(([[, route]]) => route);\n  }\n  get routePath() {\n    return this.#matchResult[0].map(([[, route]]) => route)[this.routeIndex]\n      .path;\n  }\n};\n\n// node_modules/hono/dist/utils/html.js\nvar HtmlEscapedCallbackPhase = {\n  Stringify: 1,\n  BeforeStream: 2,\n  Stream: 3,\n};\nvar raw = (value, callbacks) => {\n  const escapedString = new String(value);\n  escapedString.isEscaped = true;\n  escapedString.callbacks = callbacks;\n  return escapedString;\n};\nvar resolveCallback = async (\n  str,\n  phase,\n  preserveCallbacks,\n  context,\n  buffer,\n) => {\n  const callbacks = str.callbacks;\n  if (!callbacks?.length) {\n    return Promise.resolve(str);\n  }\n  if (buffer) {\n    buffer[0] += str;\n  } else {\n    buffer = [str];\n  }\n  const resStr = Promise.all(\n    callbacks.map((c) => c({ phase, buffer, context })),\n  ).then((res) =>\n    Promise.all(\n      res\n        .filter(Boolean)\n        .map((str2) => resolveCallback(str2, phase, false, context, buffer)),\n    ).then(() => buffer[0]),\n  );\n  if (preserveCallbacks) {\n    return raw(await resStr, callbacks);\n  } else {\n    return resStr;\n  }\n};\n\n// node_modules/hono/dist/context.js\nvar TEXT_PLAIN = 'text/plain; charset=UTF-8';\nvar setHeaders = (headers, map = {}) => {\n  Object.entries(map).forEach(([key, value]) => headers.set(key, value));\n  return headers;\n};\nvar Context = class {\n  #rawRequest;\n  #req;\n  env = {};\n  #var;\n  finalized = false;\n  error;\n  #status = 200;\n  #executionCtx;\n  #headers;\n  #preparedHeaders;\n  #res;\n  #isFresh = true;\n  #layout;\n  #renderer;\n  #notFoundHandler;\n  #matchResult;\n  #path;\n  constructor(req, options) {\n    this.#rawRequest = req;\n    if (options) {\n      this.#executionCtx = options.executionCtx;\n      this.env = options.env;\n      this.#notFoundHandler = options.notFoundHandler;\n      this.#path = options.path;\n      this.#matchResult = options.matchResult;\n    }\n  }\n  get req() {\n    this.#req ??= new HonoRequest(\n      this.#rawRequest,\n      this.#path,\n      this.#matchResult,\n    );\n    return this.#req;\n  }\n  get event() {\n    if (this.#executionCtx && 'respondWith' in this.#executionCtx) {\n      return this.#executionCtx;\n    } else {\n      throw Error('This context has no FetchEvent');\n    }\n  }\n  get executionCtx() {\n    if (this.#executionCtx) {\n      return this.#executionCtx;\n    } else {\n      throw Error('This context has no ExecutionContext');\n    }\n  }\n  get res() {\n    this.#isFresh = false;\n    return (this.#res ||= new Response('404 Not Found', { status: 404 }));\n  }\n  set res(_res) {\n    this.#isFresh = false;\n    if (this.#res && _res) {\n      this.#res.headers.delete('content-type');\n      for (const [k, v] of this.#res.headers.entries()) {\n        if (k === 'set-cookie') {\n          const cookies = this.#res.headers.getSetCookie();\n          _res.headers.delete('set-cookie');\n          for (const cookie of cookies) {\n            _res.headers.append('set-cookie', cookie);\n          }\n        } else {\n          _res.headers.set(k, v);\n        }\n      }\n    }\n    this.#res = _res;\n    this.finalized = true;\n  }\n  render = (...args) => {\n    this.#renderer ??= (content) => this.html(content);\n    return this.#renderer(...args);\n  };\n  setLayout = (layout) => (this.#layout = layout);\n  getLayout = () => this.#layout;\n  setRenderer = (renderer) => {\n    this.#renderer = renderer;\n  };\n  header = (name, value, options) => {\n    if (value === void 0) {\n      if (this.#headers) {\n        this.#headers.delete(name);\n      } else if (this.#preparedHeaders) {\n        delete this.#preparedHeaders[name.toLocaleLowerCase()];\n      }\n      if (this.finalized) {\n        this.res.headers.delete(name);\n      }\n      return;\n    }\n    if (options?.append) {\n      if (!this.#headers) {\n        this.#isFresh = false;\n        this.#headers = new Headers(this.#preparedHeaders);\n        this.#preparedHeaders = {};\n      }\n      this.#headers.append(name, value);\n    } else {\n      if (this.#headers) {\n        this.#headers.set(name, value);\n      } else {\n        this.#preparedHeaders ??= {};\n        this.#preparedHeaders[name.toLowerCase()] = value;\n      }\n    }\n    if (this.finalized) {\n      if (options?.append) {\n        this.res.headers.append(name, value);\n      } else {\n        this.res.headers.set(name, value);\n      }\n    }\n  };\n  status = (status) => {\n    this.#isFresh = false;\n    this.#status = status;\n  };\n  set = (key, value) => {\n    this.#var ??= /* @__PURE__ */ new Map();\n    this.#var.set(key, value);\n  };\n  get = (key) => {\n    return this.#var ? this.#var.get(key) : void 0;\n  };\n  get var() {\n    if (!this.#var) {\n      return {};\n    }\n    return Object.fromEntries(this.#var);\n  }\n  newResponse = (data, arg, headers) => {\n    if (this.#isFresh && !headers && !arg && this.#status === 200) {\n      return new Response(data, {\n        headers: this.#preparedHeaders,\n      });\n    }\n    if (arg && typeof arg !== 'number') {\n      const header = new Headers(arg.headers);\n      if (this.#headers) {\n        this.#headers.forEach((v, k) => {\n          if (k === 'set-cookie') {\n            header.append(k, v);\n          } else {\n            header.set(k, v);\n          }\n        });\n      }\n      const headers2 = setHeaders(header, this.#preparedHeaders);\n      return new Response(data, {\n        headers: headers2,\n        status: arg.status ?? this.#status,\n      });\n    }\n    const status = typeof arg === 'number' ? arg : this.#status;\n    this.#preparedHeaders ??= {};\n    this.#headers ??= new Headers();\n    setHeaders(this.#headers, this.#preparedHeaders);\n    if (this.#res) {\n      this.#res.headers.forEach((v, k) => {\n        if (k === 'set-cookie') {\n          this.#headers?.append(k, v);\n        } else {\n          this.#headers?.set(k, v);\n        }\n      });\n      setHeaders(this.#headers, this.#preparedHeaders);\n    }\n    headers ??= {};\n    for (const [k, v] of Object.entries(headers)) {\n      if (typeof v === 'string') {\n        this.#headers.set(k, v);\n      } else {\n        this.#headers.delete(k);\n        for (const v2 of v) {\n          this.#headers.append(k, v2);\n        }\n      }\n    }\n    return new Response(data, {\n      status,\n      headers: this.#headers,\n    });\n  };\n  body = (data, arg, headers) => {\n    return typeof arg === 'number'\n      ? this.newResponse(data, arg, headers)\n      : this.newResponse(data, arg);\n  };\n  text = (text, arg, headers) => {\n    if (!this.#preparedHeaders) {\n      if (this.#isFresh && !headers && !arg) {\n        return new Response(text);\n      }\n      this.#preparedHeaders = {};\n    }\n    this.#preparedHeaders['content-type'] = TEXT_PLAIN;\n    return typeof arg === 'number'\n      ? this.newResponse(text, arg, headers)\n      : this.newResponse(text, arg);\n  };\n  json = (object, arg, headers) => {\n    const body = JSON.stringify(object);\n    this.#preparedHeaders ??= {};\n    this.#preparedHeaders['content-type'] = 'application/json; charset=UTF-8';\n    return typeof arg === 'number'\n      ? this.newResponse(body, arg, headers)\n      : this.newResponse(body, arg);\n  };\n  html = (html, arg, headers) => {\n    this.#preparedHeaders ??= {};\n    this.#preparedHeaders['content-type'] = 'text/html; charset=UTF-8';\n    if (typeof html === 'object') {\n      if (!(html instanceof Promise)) {\n        html = html.toString();\n      }\n      if (html instanceof Promise) {\n        return html\n          .then((html2) =>\n            resolveCallback(\n              html2,\n              HtmlEscapedCallbackPhase.Stringify,\n              false,\n              {},\n            ),\n          )\n          .then((html2) => {\n            return typeof arg === 'number'\n              ? this.newResponse(html2, arg, headers)\n              : this.newResponse(html2, arg);\n          });\n      }\n    }\n    return typeof arg === 'number'\n      ? this.newResponse(html, arg, headers)\n      : this.newResponse(html, arg);\n  };\n  redirect = (location, status) => {\n    this.#headers ??= new Headers();\n    this.#headers.set('Location', location);\n    return this.newResponse(null, status ?? 302);\n  };\n  notFound = () => {\n    this.#notFoundHandler ??= () => new Response();\n    return this.#notFoundHandler(this);\n  };\n};\n\n// node_modules/hono/dist/compose.js\nvar compose = (middleware, onError, onNotFound) => {\n  return (context, next) => {\n    let index = -1;\n    return dispatch(0);\n    async function dispatch(i) {\n      if (i <= index) {\n        throw new Error('next() called multiple times');\n      }\n      index = i;\n      let res;\n      let isError = false;\n      let handler;\n      if (middleware[i]) {\n        handler = middleware[i][0][0];\n        if (context instanceof Context) {\n          context.req.routeIndex = i;\n        }\n      } else {\n        handler = (i === middleware.length && next) || void 0;\n      }\n      if (!handler) {\n        if (\n          context instanceof Context &&\n          context.finalized === false &&\n          onNotFound\n        ) {\n          res = await onNotFound(context);\n        }\n      } else {\n        try {\n          res = await handler(context, () => {\n            return dispatch(i + 1);\n          });\n        } catch (err) {\n          if (err instanceof Error && context instanceof Context && onError) {\n            context.error = err;\n            res = await onError(err, context);\n            isError = true;\n          } else {\n            throw err;\n          }\n        }\n      }\n      if (res && (context.finalized === false || isError)) {\n        context.res = res;\n      }\n      return context;\n    }\n  };\n};\n\n// node_modules/hono/dist/router.js\nvar METHOD_NAME_ALL = 'ALL';\nvar METHOD_NAME_ALL_LOWERCASE = 'all';\nvar METHODS = ['get', 'post', 'put', 'delete', 'options', 'patch'];\nvar MESSAGE_MATCHER_IS_ALREADY_BUILT =\n  'Can not add a route since the matcher is already built.';\nvar UnsupportedPathError = class extends Error {};\n\n// node_modules/hono/dist/hono-base.js\nvar COMPOSED_HANDLER = Symbol('composedHandler');\nvar notFoundHandler = (c) => {\n  return c.text('404 Not Found', 404);\n};\nvar errorHandler = (err, c) => {\n  if ('getResponse' in err) {\n    return err.getResponse();\n  }\n  console.error(err);\n  return c.text('Internal Server Error', 500);\n};\nvar Hono = class {\n  get;\n  post;\n  put;\n  delete;\n  options;\n  patch;\n  all;\n  on;\n  use;\n  router;\n  getPath;\n  _basePath = '/';\n  #path = '/';\n  routes = [];\n  constructor(options = {}) {\n    const allMethods = [...METHODS, METHOD_NAME_ALL_LOWERCASE];\n    allMethods.forEach((method) => {\n      this[method] = (args1, ...args) => {\n        if (typeof args1 === 'string') {\n          this.#path = args1;\n        } else {\n          this.addRoute(method, this.#path, args1);\n        }\n        args.forEach((handler) => {\n          if (typeof handler !== 'string') {\n            this.addRoute(method, this.#path, handler);\n          }\n        });\n        return this;\n      };\n    });\n    this.on = (method, path, ...handlers) => {\n      for (const p of [path].flat()) {\n        this.#path = p;\n        for (const m of [method].flat()) {\n          handlers.map((handler) => {\n            this.addRoute(m.toUpperCase(), this.#path, handler);\n          });\n        }\n      }\n      return this;\n    };\n    this.use = (arg1, ...handlers) => {\n      if (typeof arg1 === 'string') {\n        this.#path = arg1;\n      } else {\n        this.#path = '*';\n        handlers.unshift(arg1);\n      }\n      handlers.forEach((handler) => {\n        this.addRoute(METHOD_NAME_ALL, this.#path, handler);\n      });\n      return this;\n    };\n    const strict = options.strict ?? true;\n    delete options.strict;\n    Object.assign(this, options);\n    this.getPath = strict ? (options.getPath ?? getPath) : getPathNoStrict;\n  }\n  clone() {\n    const clone = new Hono({\n      router: this.router,\n      getPath: this.getPath,\n    });\n    clone.routes = this.routes;\n    return clone;\n  }\n  notFoundHandler = notFoundHandler;\n  errorHandler = errorHandler;\n  route(path, app) {\n    const subApp = this.basePath(path);\n    app.routes.map((r) => {\n      let handler;\n      if (app.errorHandler === errorHandler) {\n        handler = r.handler;\n      } else {\n        handler = async (c, next) =>\n          (await compose([], app.errorHandler)(c, () => r.handler(c, next)))\n            .res;\n        handler[COMPOSED_HANDLER] = r.handler;\n      }\n      subApp.addRoute(r.method, r.path, handler);\n    });\n    return this;\n  }\n  basePath(path) {\n    const subApp = this.clone();\n    subApp._basePath = mergePath(this._basePath, path);\n    return subApp;\n  }\n  onError = (handler) => {\n    this.errorHandler = handler;\n    return this;\n  };\n  notFound = (handler) => {\n    this.notFoundHandler = handler;\n    return this;\n  };\n  mount(path, applicationHandler, options) {\n    let replaceRequest;\n    let optionHandler;\n    if (options) {\n      if (typeof options === 'function') {\n        optionHandler = options;\n      } else {\n        optionHandler = options.optionHandler;\n        replaceRequest = options.replaceRequest;\n      }\n    }\n    const getOptions = optionHandler\n      ? (c) => {\n          const options2 = optionHandler(c);\n          return Array.isArray(options2) ? options2 : [options2];\n        }\n      : (c) => {\n          let executionContext = void 0;\n          try {\n            executionContext = c.executionCtx;\n          } catch {}\n          return [c.env, executionContext];\n        };\n    replaceRequest ||= (() => {\n      const mergedPath = mergePath(this._basePath, path);\n      const pathPrefixLength = mergedPath === '/' ? 0 : mergedPath.length;\n      return (request) => {\n        const url = new URL(request.url);\n        url.pathname = url.pathname.slice(pathPrefixLength) || '/';\n        return new Request(url, request);\n      };\n    })();\n    const handler = async (c, next) => {\n      const res = await applicationHandler(\n        replaceRequest(c.req.raw),\n        ...getOptions(c),\n      );\n      if (res) {\n        return res;\n      }\n      await next();\n    };\n    this.addRoute(METHOD_NAME_ALL, mergePath(path, '*'), handler);\n    return this;\n  }\n  addRoute(method, path, handler) {\n    method = method.toUpperCase();\n    path = mergePath(this._basePath, path);\n    const r = { path, method, handler };\n    this.router.add(method, path, [handler, r]);\n    this.routes.push(r);\n  }\n  matchRoute(method, path) {\n    return this.router.match(method, path);\n  }\n  handleError(err, c) {\n    if (err instanceof Error) {\n      return this.errorHandler(err, c);\n    }\n    throw err;\n  }\n  dispatch(request, executionCtx, env, method) {\n    if (method === 'HEAD') {\n      return (async () =>\n        new Response(\n          null,\n          await this.dispatch(request, executionCtx, env, 'GET'),\n        ))();\n    }\n    const path = this.getPath(request, { env });\n    const matchResult = this.matchRoute(method, path);\n    const c = new Context(request, {\n      path,\n      matchResult,\n      env,\n      executionCtx,\n      notFoundHandler: this.notFoundHandler,\n    });\n    if (matchResult[0].length === 1) {\n      let res;\n      try {\n        res = matchResult[0][0][0][0](c, async () => {\n          c.res = await this.notFoundHandler(c);\n        });\n      } catch (err) {\n        return this.handleError(err, c);\n      }\n      return res instanceof Promise\n        ? res\n            .then(\n              (resolved) =>\n                resolved || (c.finalized ? c.res : this.notFoundHandler(c)),\n            )\n            .catch((err) => this.handleError(err, c))\n        : (res ?? this.notFoundHandler(c));\n    }\n    const composed = compose(\n      matchResult[0],\n      this.errorHandler,\n      this.notFoundHandler,\n    );\n    return (async () => {\n      try {\n        const context = await composed(c);\n        if (!context.finalized) {\n          throw new Error(\n            'Context is not finalized. Did you forget to return a Response object or `await next()`?',\n          );\n        }\n        return context.res;\n      } catch (err) {\n        return this.handleError(err, c);\n      }\n    })();\n  }\n  fetch = (request, ...rest) => {\n    return this.dispatch(request, rest[1], rest[0], request.method);\n  };\n  request = (input, requestInit, Env, executionCtx) => {\n    if (input instanceof Request) {\n      if (requestInit !== void 0) {\n        input = new Request(input, requestInit);\n      }\n      return this.fetch(input, Env, executionCtx);\n    }\n    input = input.toString();\n    const path = /^https?:\\/\\//.test(input)\n      ? input\n      : `http://localhost${mergePath('/', input)}`;\n    const req = new Request(path, requestInit);\n    return this.fetch(req, Env, executionCtx);\n  };\n  fire = () => {\n    addEventListener('fetch', (event) => {\n      event.respondWith(\n        this.dispatch(event.request, event, void 0, event.request.method),\n      );\n    });\n  };\n};\n\n// node_modules/hono/dist/router/reg-exp-router/node.js\nvar LABEL_REG_EXP_STR = '[^/]+';\nvar ONLY_WILDCARD_REG_EXP_STR = '.*';\nvar TAIL_WILDCARD_REG_EXP_STR = '(?:|/.*)';\nvar PATH_ERROR = Symbol();\nvar regExpMetaChars = new Set('.\\\\+*[^]$()');\nfunction compareKey(a, b) {\n  if (a.length === 1) {\n    return b.length === 1 ? (a < b ? -1 : 1) : -1;\n  }\n  if (b.length === 1) {\n    return 1;\n  }\n  if (a === ONLY_WILDCARD_REG_EXP_STR || a === TAIL_WILDCARD_REG_EXP_STR) {\n    return 1;\n  } else if (\n    b === ONLY_WILDCARD_REG_EXP_STR ||\n    b === TAIL_WILDCARD_REG_EXP_STR\n  ) {\n    return -1;\n  }\n  if (a === LABEL_REG_EXP_STR) {\n    return 1;\n  } else if (b === LABEL_REG_EXP_STR) {\n    return -1;\n  }\n  return a.length === b.length ? (a < b ? -1 : 1) : b.length - a.length;\n}\nvar Node = class {\n  index;\n  varIndex;\n  children = /* @__PURE__ */ Object.create(null);\n  insert(tokens, index, paramMap, context, pathErrorCheckOnly) {\n    if (tokens.length === 0) {\n      if (this.index !== void 0) {\n        throw PATH_ERROR;\n      }\n      if (pathErrorCheckOnly) {\n        return;\n      }\n      this.index = index;\n      return;\n    }\n    const [token, ...restTokens] = tokens;\n    const pattern =\n      token === '*'\n        ? restTokens.length === 0\n          ? ['', '', ONLY_WILDCARD_REG_EXP_STR]\n          : ['', '', LABEL_REG_EXP_STR]\n        : token === '/*'\n          ? ['', '', TAIL_WILDCARD_REG_EXP_STR]\n          : token.match(/^\\:([^\\{\\}]+)(?:\\{(.+)\\})?$/);\n    let node;\n    if (pattern) {\n      const name = pattern[1];\n      let regexpStr = pattern[2] || LABEL_REG_EXP_STR;\n      if (name && pattern[2]) {\n        regexpStr = regexpStr.replace(/^\\((?!\\?:)(?=[^)]+\\)$)/, '(?:');\n        if (/\\((?!\\?:)/.test(regexpStr)) {\n          throw PATH_ERROR;\n        }\n      }\n      node = this.children[regexpStr];\n      if (!node) {\n        if (\n          Object.keys(this.children).some(\n            (k) =>\n              k !== ONLY_WILDCARD_REG_EXP_STR &&\n              k !== TAIL_WILDCARD_REG_EXP_STR,\n          )\n        ) {\n          throw PATH_ERROR;\n        }\n        if (pathErrorCheckOnly) {\n          return;\n        }\n        node = this.children[regexpStr] = new Node();\n        if (name !== '') {\n          node.varIndex = context.varIndex++;\n        }\n      }\n      if (!pathErrorCheckOnly && name !== '') {\n        paramMap.push([name, node.varIndex]);\n      }\n    } else {\n      node = this.children[token];\n      if (!node) {\n        if (\n          Object.keys(this.children).some(\n            (k) =>\n              k.length > 1 &&\n              k !== ONLY_WILDCARD_REG_EXP_STR &&\n              k !== TAIL_WILDCARD_REG_EXP_STR,\n          )\n        ) {\n          throw PATH_ERROR;\n        }\n        if (pathErrorCheckOnly) {\n          return;\n        }\n        node = this.children[token] = new Node();\n      }\n    }\n    node.insert(restTokens, index, paramMap, context, pathErrorCheckOnly);\n  }\n  buildRegExpStr() {\n    const childKeys = Object.keys(this.children).sort(compareKey);\n    const strList = childKeys.map((k) => {\n      const c = this.children[k];\n      return (\n        (typeof c.varIndex === 'number'\n          ? `(${k})@${c.varIndex}`\n          : regExpMetaChars.has(k)\n            ? `\\\\${k}`\n            : k) + c.buildRegExpStr()\n      );\n    });\n    if (typeof this.index === 'number') {\n      strList.unshift(`#${this.index}`);\n    }\n    if (strList.length === 0) {\n      return '';\n    }\n    if (strList.length === 1) {\n      return strList[0];\n    }\n    return '(?:' + strList.join('|') + ')';\n  }\n};\n\n// node_modules/hono/dist/router/reg-exp-router/trie.js\nvar Trie = class {\n  context = { varIndex: 0 };\n  root = new Node();\n  insert(path, index, pathErrorCheckOnly) {\n    const paramAssoc = [];\n    const groups = [];\n    for (let i = 0; ; ) {\n      let replaced = false;\n      path = path.replace(/\\{[^}]+\\}/g, (m) => {\n        const mark = `@\\\\${i}`;\n        groups[i] = [mark, m];\n        i++;\n        replaced = true;\n        return mark;\n      });\n      if (!replaced) {\n        break;\n      }\n    }\n    const tokens = path.match(/(?::[^\\/]+)|(?:\\/\\*$)|./g) || [];\n    for (let i = groups.length - 1; i >= 0; i--) {\n      const [mark] = groups[i];\n      for (let j = tokens.length - 1; j >= 0; j--) {\n        if (tokens[j].indexOf(mark) !== -1) {\n          tokens[j] = tokens[j].replace(mark, groups[i][1]);\n          break;\n        }\n      }\n    }\n    this.root.insert(\n      tokens,\n      index,\n      paramAssoc,\n      this.context,\n      pathErrorCheckOnly,\n    );\n    return paramAssoc;\n  }\n  buildRegExp() {\n    let regexp = this.root.buildRegExpStr();\n    if (regexp === '') {\n      return [/^$/, [], []];\n    }\n    let captureIndex = 0;\n    const indexReplacementMap = [];\n    const paramReplacementMap = [];\n    regexp = regexp.replace(\n      /#(\\d+)|@(\\d+)|\\.\\*\\$/g,\n      (_, handlerIndex, paramIndex) => {\n        if (typeof handlerIndex !== 'undefined') {\n          indexReplacementMap[++captureIndex] = Number(handlerIndex);\n          return '$()';\n        }\n        if (typeof paramIndex !== 'undefined') {\n          paramReplacementMap[Number(paramIndex)] = ++captureIndex;\n          return '';\n        }\n        return '';\n      },\n    );\n    return [new RegExp(`^${regexp}`), indexReplacementMap, paramReplacementMap];\n  }\n};\n\n// node_modules/hono/dist/router/reg-exp-router/router.js\nvar emptyParam = [];\nvar nullMatcher = [/^$/, [], /* @__PURE__ */ Object.create(null)];\nvar wildcardRegExpCache = /* @__PURE__ */ Object.create(null);\nfunction buildWildcardRegExp(path) {\n  return (wildcardRegExpCache[path] ??= new RegExp(\n    path === '*'\n      ? ''\n      : `^${path.replace(/\\/\\*$|([.\\\\+*[^\\]$()])/g, (_, metaChar) =>\n          metaChar ? `\\\\${metaChar}` : '(?:|/.*)',\n        )}$`,\n  ));\n}\nfunction clearWildcardRegExpCache() {\n  wildcardRegExpCache = /* @__PURE__ */ Object.create(null);\n}\nfunction buildMatcherFromPreprocessedRoutes(routes) {\n  const trie = new Trie();\n  const handlerData = [];\n  if (routes.length === 0) {\n    return nullMatcher;\n  }\n  const routesWithStaticPathFlag = routes\n    .map((route) => [!/\\*|\\/:/.test(route[0]), ...route])\n    .sort(([isStaticA, pathA], [isStaticB, pathB]) =>\n      isStaticA ? 1 : isStaticB ? -1 : pathA.length - pathB.length,\n    );\n  const staticMap = /* @__PURE__ */ Object.create(null);\n  for (let i = 0, j = -1, len = routesWithStaticPathFlag.length; i < len; i++) {\n    const [pathErrorCheckOnly, path, handlers] = routesWithStaticPathFlag[i];\n    if (pathErrorCheckOnly) {\n      staticMap[path] = [\n        handlers.map(([h]) => [h, /* @__PURE__ */ Object.create(null)]),\n        emptyParam,\n      ];\n    } else {\n      j++;\n    }\n    let paramAssoc;\n    try {\n      paramAssoc = trie.insert(path, j, pathErrorCheckOnly);\n    } catch (e) {\n      throw e === PATH_ERROR ? new UnsupportedPathError(path) : e;\n    }\n    if (pathErrorCheckOnly) {\n      continue;\n    }\n    handlerData[j] = handlers.map(([h, paramCount]) => {\n      const paramIndexMap = /* @__PURE__ */ Object.create(null);\n      paramCount -= 1;\n      for (; paramCount >= 0; paramCount--) {\n        const [key, value] = paramAssoc[paramCount];\n        paramIndexMap[key] = value;\n      }\n      return [h, paramIndexMap];\n    });\n  }\n  const [regexp, indexReplacementMap, paramReplacementMap] = trie.buildRegExp();\n  for (let i = 0, len = handlerData.length; i < len; i++) {\n    for (let j = 0, len2 = handlerData[i].length; j < len2; j++) {\n      const map = handlerData[i][j]?.[1];\n      if (!map) {\n        continue;\n      }\n      const keys = Object.keys(map);\n      for (let k = 0, len3 = keys.length; k < len3; k++) {\n        map[keys[k]] = paramReplacementMap[map[keys[k]]];\n      }\n    }\n  }\n  const handlerMap = [];\n  for (const i in indexReplacementMap) {\n    handlerMap[i] = handlerData[indexReplacementMap[i]];\n  }\n  return [regexp, handlerMap, staticMap];\n}\nfunction findMiddleware(middleware, path) {\n  if (!middleware) {\n    return void 0;\n  }\n  for (const k of Object.keys(middleware).sort((a, b) => b.length - a.length)) {\n    if (buildWildcardRegExp(k).test(path)) {\n      return [...middleware[k]];\n    }\n  }\n  return void 0;\n}\nvar RegExpRouter = class {\n  name = 'RegExpRouter';\n  middleware;\n  routes;\n  constructor() {\n    this.middleware = {\n      [METHOD_NAME_ALL]: /* @__PURE__ */ Object.create(null),\n    };\n    this.routes = { [METHOD_NAME_ALL]: /* @__PURE__ */ Object.create(null) };\n  }\n  add(method, path, handler) {\n    const { middleware, routes } = this;\n    if (!middleware || !routes) {\n      throw new Error(MESSAGE_MATCHER_IS_ALREADY_BUILT);\n    }\n    if (!middleware[method]) {\n      [middleware, routes].forEach((handlerMap) => {\n        handlerMap[method] = /* @__PURE__ */ Object.create(null);\n        Object.keys(handlerMap[METHOD_NAME_ALL]).forEach((p) => {\n          handlerMap[method][p] = [...handlerMap[METHOD_NAME_ALL][p]];\n        });\n      });\n    }\n    if (path === '/*') {\n      path = '*';\n    }\n    const paramCount = (path.match(/\\/:/g) || []).length;\n    if (/\\*$/.test(path)) {\n      const re = buildWildcardRegExp(path);\n      if (method === METHOD_NAME_ALL) {\n        Object.keys(middleware).forEach((m) => {\n          middleware[m][path] ||=\n            findMiddleware(middleware[m], path) ||\n            findMiddleware(middleware[METHOD_NAME_ALL], path) ||\n            [];\n        });\n      } else {\n        middleware[method][path] ||=\n          findMiddleware(middleware[method], path) ||\n          findMiddleware(middleware[METHOD_NAME_ALL], path) ||\n          [];\n      }\n      Object.keys(middleware).forEach((m) => {\n        if (method === METHOD_NAME_ALL || method === m) {\n          Object.keys(middleware[m]).forEach((p) => {\n            re.test(p) && middleware[m][p].push([handler, paramCount]);\n          });\n        }\n      });\n      Object.keys(routes).forEach((m) => {\n        if (method === METHOD_NAME_ALL || method === m) {\n          Object.keys(routes[m]).forEach(\n            (p) => re.test(p) && routes[m][p].push([handler, paramCount]),\n          );\n        }\n      });\n      return;\n    }\n    const paths = checkOptionalParameter(path) || [path];\n    for (let i = 0, len = paths.length; i < len; i++) {\n      const path2 = paths[i];\n      Object.keys(routes).forEach((m) => {\n        if (method === METHOD_NAME_ALL || method === m) {\n          routes[m][path2] ||= [\n            ...(findMiddleware(middleware[m], path2) ||\n              findMiddleware(middleware[METHOD_NAME_ALL], path2) ||\n              []),\n          ];\n          routes[m][path2].push([handler, paramCount - len + i + 1]);\n        }\n      });\n    }\n  }\n  match(method, path) {\n    clearWildcardRegExpCache();\n    const matchers = this.buildAllMatchers();\n    this.match = (method2, path2) => {\n      const matcher = matchers[method2] || matchers[METHOD_NAME_ALL];\n      const staticMatch = matcher[2][path2];\n      if (staticMatch) {\n        return staticMatch;\n      }\n      const match = path2.match(matcher[0]);\n      if (!match) {\n        return [[], emptyParam];\n      }\n      const index = match.indexOf('', 1);\n      return [matcher[1][index], match];\n    };\n    return this.match(method, path);\n  }\n  buildAllMatchers() {\n    const matchers = /* @__PURE__ */ Object.create(null);\n    [...Object.keys(this.routes), ...Object.keys(this.middleware)].forEach(\n      (method) => {\n        matchers[method] ||= this.buildMatcher(method);\n      },\n    );\n    this.middleware = this.routes = void 0;\n    return matchers;\n  }\n  buildMatcher(method) {\n    const routes = [];\n    let hasOwnRoute = method === METHOD_NAME_ALL;\n    [this.middleware, this.routes].forEach((r) => {\n      const ownRoute = r[method]\n        ? Object.keys(r[method]).map((path) => [path, r[method][path]])\n        : [];\n      if (ownRoute.length !== 0) {\n        hasOwnRoute ||= true;\n        routes.push(...ownRoute);\n      } else if (method !== METHOD_NAME_ALL) {\n        routes.push(\n          ...Object.keys(r[METHOD_NAME_ALL]).map((path) => [\n            path,\n            r[METHOD_NAME_ALL][path],\n          ]),\n        );\n      }\n    });\n    if (!hasOwnRoute) {\n      return null;\n    } else {\n      return buildMatcherFromPreprocessedRoutes(routes);\n    }\n  }\n};\n\n// node_modules/hono/dist/router/smart-router/router.js\nvar SmartRouter = class {\n  name = 'SmartRouter';\n  routers = [];\n  routes = [];\n  constructor(init) {\n    Object.assign(this, init);\n  }\n  add(method, path, handler) {\n    if (!this.routes) {\n      throw new Error(MESSAGE_MATCHER_IS_ALREADY_BUILT);\n    }\n    this.routes.push([method, path, handler]);\n  }\n  match(method, path) {\n    if (!this.routes) {\n      throw new Error('Fatal error');\n    }\n    const { routers, routes } = this;\n    const len = routers.length;\n    let i = 0;\n    let res;\n    for (; i < len; i++) {\n      const router = routers[i];\n      try {\n        routes.forEach((args) => {\n          router.add(...args);\n        });\n        res = router.match(method, path);\n      } catch (e) {\n        if (e instanceof UnsupportedPathError) {\n          continue;\n        }\n        throw e;\n      }\n      this.match = router.match.bind(router);\n      this.routers = [router];\n      this.routes = void 0;\n      break;\n    }\n    if (i === len) {\n      throw new Error('Fatal error');\n    }\n    this.name = `SmartRouter + ${this.activeRouter.name}`;\n    return res;\n  }\n  get activeRouter() {\n    if (this.routes || this.routers.length !== 1) {\n      throw new Error('No active router has been determined yet.');\n    }\n    return this.routers[0];\n  }\n};\n\n// node_modules/hono/dist/router/trie-router/node.js\nvar Node2 = class {\n  methods;\n  children;\n  patterns;\n  order = 0;\n  name;\n  params = /* @__PURE__ */ Object.create(null);\n  constructor(method, handler, children) {\n    this.children = children || /* @__PURE__ */ Object.create(null);\n    this.methods = [];\n    this.name = '';\n    if (method && handler) {\n      const m = /* @__PURE__ */ Object.create(null);\n      m[method] = { handler, possibleKeys: [], score: 0, name: this.name };\n      this.methods = [m];\n    }\n    this.patterns = [];\n  }\n  insert(method, path, handler) {\n    this.name = `${method} ${path}`;\n    this.order = ++this.order;\n    let curNode = this;\n    const parts = splitRoutingPath(path);\n    const possibleKeys = [];\n    for (let i = 0, len = parts.length; i < len; i++) {\n      const p = parts[i];\n      if (Object.keys(curNode.children).includes(p)) {\n        curNode = curNode.children[p];\n        const pattern2 = getPattern(p);\n        if (pattern2) {\n          possibleKeys.push(pattern2[1]);\n        }\n        continue;\n      }\n      curNode.children[p] = new Node2();\n      const pattern = getPattern(p);\n      if (pattern) {\n        curNode.patterns.push(pattern);\n        possibleKeys.push(pattern[1]);\n      }\n      curNode = curNode.children[p];\n    }\n    if (!curNode.methods.length) {\n      curNode.methods = [];\n    }\n    const m = /* @__PURE__ */ Object.create(null);\n    const handlerSet = {\n      handler,\n      possibleKeys: possibleKeys.filter((v, i, a) => a.indexOf(v) === i),\n      name: this.name,\n      score: this.order,\n    };\n    m[method] = handlerSet;\n    curNode.methods.push(m);\n    return curNode;\n  }\n  gHSets(node, method, nodeParams, params) {\n    const handlerSets = [];\n    for (let i = 0, len = node.methods.length; i < len; i++) {\n      const m = node.methods[i];\n      const handlerSet = m[method] || m[METHOD_NAME_ALL];\n      const processedSet = /* @__PURE__ */ Object.create(null);\n      if (handlerSet !== void 0) {\n        handlerSet.params = /* @__PURE__ */ Object.create(null);\n        handlerSet.possibleKeys.forEach((key) => {\n          const processed = processedSet[handlerSet.name];\n          handlerSet.params[key] =\n            params[key] && !processed\n              ? params[key]\n              : (nodeParams[key] ?? params[key]);\n          processedSet[handlerSet.name] = true;\n        });\n        handlerSets.push(handlerSet);\n      }\n    }\n    return handlerSets;\n  }\n  search(method, path) {\n    const handlerSets = [];\n    this.params = /* @__PURE__ */ Object.create(null);\n    const curNode = this;\n    let curNodes = [curNode];\n    const parts = splitPath(path);\n    for (let i = 0, len = parts.length; i < len; i++) {\n      const part = parts[i];\n      const isLast = i === len - 1;\n      const tempNodes = [];\n      for (let j = 0, len2 = curNodes.length; j < len2; j++) {\n        const node = curNodes[j];\n        const nextNode = node.children[part];\n        if (nextNode) {\n          nextNode.params = node.params;\n          if (isLast === true) {\n            if (nextNode.children['*']) {\n              handlerSets.push(\n                ...this.gHSets(\n                  nextNode.children['*'],\n                  method,\n                  node.params,\n                  /* @__PURE__ */ Object.create(null),\n                ),\n              );\n            }\n            handlerSets.push(\n              ...this.gHSets(\n                nextNode,\n                method,\n                node.params,\n                /* @__PURE__ */ Object.create(null),\n              ),\n            );\n          } else {\n            tempNodes.push(nextNode);\n          }\n        }\n        for (let k = 0, len3 = node.patterns.length; k < len3; k++) {\n          const pattern = node.patterns[k];\n          const params = { ...node.params };\n          if (pattern === '*') {\n            const astNode = node.children['*'];\n            if (astNode) {\n              handlerSets.push(\n                ...this.gHSets(\n                  astNode,\n                  method,\n                  node.params,\n                  /* @__PURE__ */ Object.create(null),\n                ),\n              );\n              tempNodes.push(astNode);\n            }\n            continue;\n          }\n          if (part === '') {\n            continue;\n          }\n          const [key, name, matcher] = pattern;\n          const child = node.children[key];\n          const restPathString = parts.slice(i).join('/');\n          if (matcher instanceof RegExp && matcher.test(restPathString)) {\n            params[name] = restPathString;\n            handlerSets.push(\n              ...this.gHSets(child, method, node.params, params),\n            );\n            continue;\n          }\n          if (\n            matcher === true ||\n            (matcher instanceof RegExp && matcher.test(part))\n          ) {\n            if (typeof key === 'string') {\n              params[name] = part;\n              if (isLast === true) {\n                handlerSets.push(\n                  ...this.gHSets(child, method, params, node.params),\n                );\n                if (child.children['*']) {\n                  handlerSets.push(\n                    ...this.gHSets(\n                      child.children['*'],\n                      method,\n                      params,\n                      node.params,\n                    ),\n                  );\n                }\n              } else {\n                child.params = params;\n                tempNodes.push(child);\n              }\n            }\n          }\n        }\n      }\n      curNodes = tempNodes;\n    }\n    const results = handlerSets.sort((a, b) => {\n      return a.score - b.score;\n    });\n    return [results.map(({ handler, params }) => [handler, params])];\n  }\n};\n\n// node_modules/hono/dist/router/trie-router/router.js\nvar TrieRouter = class {\n  name = 'TrieRouter';\n  node;\n  constructor() {\n    this.node = new Node2();\n  }\n  add(method, path, handler) {\n    const results = checkOptionalParameter(path);\n    if (results) {\n      for (const p of results) {\n        this.node.insert(method, p, handler);\n      }\n      return;\n    }\n    this.node.insert(method, path, handler);\n  }\n  match(method, path) {\n    return this.node.search(method, path);\n  }\n};\n\n// node_modules/hono/dist/hono.js\nvar Hono2 = class extends Hono {\n  constructor(options = {}) {\n    super(options);\n    this.router =\n      options.router ??\n      new SmartRouter({\n        routers: [new RegExpRouter(), new TrieRouter()],\n      });\n  }\n};\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/module-mode/src/http-cache.js",
    "content": "/// <reference path=\"../../../../../types/index.d.ts\" />\n/* eslint-env serviceworker */\nimport {\n  assert,\n  strictEqual,\n  deepStrictEqual,\n  assertRejects,\n} from './assertions.js';\nimport { routes } from './routes.js';\nimport { CacheOverride } from 'fastly:cache-override';\n\n// generate a unique URL everytime so that we never work on a populated cache\nconst getTestUrl = (path = `/${Math.random().toString().slice(2)}`) =>\n  'https://http-me.fastly.dev/anything' + path;\n\n// afterSend error handling\n{\n  routes.set('/http-cache/hook-errors', async () => {\n    const url = getTestUrl();\n    await assertRejects(\n      () =>\n        fetch(url, {\n          cacheOverride: new CacheOverride({\n            beforeSend() {\n              throw new Error('before send error');\n            },\n          }),\n        }),\n      Error,\n      'before send error',\n    );\n\n    await assertRejects(\n      () =>\n        fetch(url, {\n          cacheOverride: new CacheOverride({\n            afterSend() {\n              throw new Error('after send error');\n            },\n          }),\n        }),\n      Error,\n      'after send error',\n    );\n  });\n\n  // Test invalid property assignments\n  routes.set('/http-cache/invalid-properties', async () => {\n    const url = getTestUrl();\n\n    await assertRejects(\n      () =>\n        fetch(url, {\n          cacheOverride: new CacheOverride({\n            afterSend(res) {\n              res.status = 'invalid'; // Should throw type error\n            },\n          }),\n        }),\n      RangeError,\n    );\n\n    await assertRejects(\n      () =>\n        fetch(url, {\n          cacheOverride: new CacheOverride({\n            afterSend(res) {\n              res.ttl = 'invalid'; // Should throw type error\n            },\n          }),\n        }),\n      TypeError,\n    );\n  });\n\n  // Test invalid property assignments\n  routes.set('/http-cache/property-errors', async () => {\n    const url = getTestUrl();\n\n    // Test invalid swr assignment\n    await assertRejects(\n      () =>\n        fetch(url, {\n          cacheOverride: new CacheOverride({\n            afterSend(res) {\n              res.swr = 'invalid';\n            },\n          }),\n        }),\n      TypeError,\n    );\n\n    // Test invalid vary assignment\n    await assertRejects(\n      () =>\n        fetch(url, {\n          cacheOverride: new CacheOverride({\n            afterSend(res) {\n              res.vary = new Set(['not-an-array']);\n            },\n          }),\n        }),\n      TypeError,\n    );\n\n    // Test invalid surrogateKeys assignment\n    await assertRejects(\n      () =>\n        fetch(url, {\n          cacheOverride: new CacheOverride({\n            afterSend(res) {\n              res.surrogateKeys = new Set(['not-an-array']);\n            },\n          }),\n        }),\n      TypeError,\n    );\n\n    // Test invalid pci assignment\n    await assertRejects(\n      () =>\n        fetch(url, {\n          cacheOverride: new CacheOverride({\n            afterSend(res) {\n              res.pci = 'invalid';\n            },\n          }),\n        }),\n      TypeError,\n    );\n\n    // Test invalid Set contents for vary\n    await assertRejects(\n      () =>\n        fetch(url, {\n          cacheOverride: new CacheOverride({\n            afterSend(res) {\n              res.vary = [1, 2, 3]; // Should only accept strings\n            },\n          }),\n        }),\n      TypeError,\n    );\n\n    // Test invalid Set contents for surrogateKeys\n    await assertRejects(\n      () =>\n        fetch(url, {\n          cacheOverride: new CacheOverride({\n            afterSend(res) {\n              res.surrogateKeys = [1, 2, 3]; // Should only accept strings\n            },\n          }),\n        }),\n      TypeError,\n    );\n  });\n\n  routes.set('/http-cache/candidate-response-properties-uncached', async () => {\n    const url = getTestUrl();\n\n    // Test accessing cache properties on non-cached candidate response\n    // (before and after hooks lifecycle) & response\n    let candidateRes;\n    const cacheOverride = new CacheOverride({\n      afterSend(res) {\n        candidateRes = res;\n        strictEqual(candidateRes.cached, false);\n        strictEqual(candidateRes.stale, false);\n        strictEqual(candidateRes.ttl, 3600);\n        strictEqual(candidateRes.age, 0);\n        deepStrictEqual(candidateRes.vary, []);\n        strictEqual(candidateRes.surrogateKeys.length, 1);\n        strictEqual(typeof candidateRes.surrogateKeys[0], 'string');\n        strictEqual(candidateRes.surrogateKeys[0].length > 10, true);\n        return { cache: false };\n      },\n    });\n\n    const res = await fetch(url, { cacheOverride });\n\n    strictEqual(res.cached, false);\n    strictEqual(res.stale, false);\n    strictEqual(res.ttl, 3600);\n    strictEqual(res.age, 0);\n    deepStrictEqual(res.vary, []);\n    strictEqual(res.surrogateKeys.length, 1);\n    strictEqual(typeof res.surrogateKeys[0], 'string');\n    strictEqual(res.surrogateKeys[0].length > 10, true);\n\n    // in the do not store / no cache cases, the candidate response is directly\n    // promoted into the response. We could possibly consider reinstancing in future, but\n    // semantically this is what is defined by the caching APIs.\n    assert(res === candidateRes);\n  });\n\n  routes.set('/http-cache/candidate-response-properties-cached', async () => {\n    const url = getTestUrl();\n\n    let candidateRes;\n    const cacheOverride = new CacheOverride({\n      afterSend(res) {\n        candidateRes = res;\n        return { cache: true };\n      },\n    });\n\n    const res = await fetch(url, { cacheOverride });\n\n    // in the cache case, a new response is read back from the cache for the origin request\n    strictEqual(res !== candidateRes, true);\n\n    // the response info is then taken out of the candidate response, and moved into the response\n    strictEqual(candidateRes.cached, false);\n    strictEqual(candidateRes.stale, false);\n    strictEqual(candidateRes.ttl, undefined);\n    strictEqual(candidateRes.age, undefined);\n    strictEqual(candidateRes.vary, undefined);\n    strictEqual(candidateRes.surrogateKeys, undefined);\n\n    strictEqual(res.cached, false);\n    strictEqual(res.stale, false);\n    strictEqual(res.ttl, 3600);\n    strictEqual(res.age, 0);\n    deepStrictEqual(res.vary, []);\n    strictEqual(res.surrogateKeys.length, 1);\n    strictEqual(typeof res.surrogateKeys[0], 'string');\n    strictEqual(res.surrogateKeys[0].length > 10, true);\n  });\n\n  // Test readonly properties\n  routes.set('/http-cache/readonly-properties', async () => {\n    const url = getTestUrl();\n\n    const cacheOverride = new CacheOverride({\n      afterSend(res) {\n        res.ttl = 3600;\n        return { cache: true };\n      },\n    });\n\n    // Initial request\n    const res1 = await fetch(url, { cacheOverride });\n    strictEqual(res1.age, 0);\n\n    // Wait a bit and verify age increased\n    await new Promise((resolve) => setTimeout(resolve, 1000));\n    const res2 = await fetch(url, { cacheOverride });\n    strictEqual(res2.cached, true);\n    strictEqual(res2.stale, false);\n    strictEqual(res2.age > 0, true);\n\n    // Verify readonly properties cannot be modified\n    assertRejects(() => {\n      res2.cached = false;\n    }, TypeError);\n    assertRejects(() => {\n      res2.stale = true;\n    }, TypeError);\n    assertRejects(() => {\n      res2.age = 0;\n    }, TypeError);\n  });\n}\n\n// beforeSend\n{\n  routes.set('/http-cache/before-send-errors', async () => {\n    {\n      const url = getTestUrl();\n      try {\n        await fetch(url, {\n          cacheOverride: {\n            beforeSend(_req) {\n              throw new Error('before send error');\n            },\n          },\n        });\n        assert(false, 'expected an error');\n      } catch (e) {\n        strictEqual(e.message, 'before send error');\n      }\n    }\n\n    {\n      const url = getTestUrl();\n      try {\n        await fetch(url, {\n          cacheOverride: {\n            beforeSend(_req) {\n              return Promise.reject(new Error('before send reject'));\n            },\n          },\n        });\n        assert(false, 'expected an error');\n      } catch (e) {\n        strictEqual(e.message, 'before send reject');\n      }\n    }\n  });\n\n  // Test basic request mutation via beforeSend\n  routes.set('/http-cache/before-send', async () => {\n    const url = getTestUrl();\n    let calledBeforeSend = false;\n    const res = await fetch(url, {\n      cacheOverride: {\n        beforeSend(req) {\n          calledBeforeSend = true;\n          req.headers.set('X-Test', 'modified value');\n        },\n      },\n    });\n    strictEqual(calledBeforeSend, true);\n    const body = await res.text();\n    strictEqual(body.includes('modified value'), true);\n  });\n}\n\n// afterSend cases\n{\n  routes.set('/http-cache/after-send-no-cache', async () => {\n    const url = getTestUrl();\n    let calledAfterSend = false;\n    const cacheOverride = new CacheOverride({\n      afterSend(res) {\n        calledAfterSend = true;\n        res.headers.set('Cache-Control', 'private, no-store');\n        res.ttl = 3600 - res.age;\n        return { cache: false };\n      },\n    });\n    let res = await fetch(url, { cacheOverride });\n    strictEqual(calledAfterSend, true);\n    strictEqual(res.headers.get('Cache-Control'), 'private, no-store');\n    calledAfterSend = false;\n    res = await fetch(url, { cacheOverride });\n    strictEqual(calledAfterSend, true);\n    strictEqual(res.headers.get('Cache-Control'), 'private, no-store');\n    strictEqual(res.headers.get('x-cache'), 'MISS');\n  });\n\n  routes.set('/http-cache/after-send-header-remove', async () => {\n    const url = getTestUrl();\n    const res = await fetch(url, {\n      cacheOverride: {\n        afterSend(res) {\n          res.headers.set('Custom', 'custom-header');\n          res.headers.delete('access-control-allow-origin');\n          res.headers.delete('access-control-allow-credentials');\n          return { cache: 'uncacheable' };\n        },\n      },\n    });\n    strictEqual(res.headers.get('Custom'), 'custom-header');\n    strictEqual(res.headers.get('access-control-allow-origin'), null);\n    return res;\n  });\n\n  routes.set('/http-cache/after-send-cache', async () => {\n    const url = getTestUrl();\n    let calledAfterSend = false;\n    const cacheOverride = new CacheOverride({\n      afterSend(res) {\n        calledAfterSend = true;\n        res.headers.set('Cache-Control', 'private, no-store');\n        res.ttl = 3600 - res.age;\n        return { cache: true };\n      },\n    });\n    let res = await fetch(url, { cacheOverride });\n    strictEqual(calledAfterSend, true);\n    strictEqual(res.headers.get('Cache-Control'), 'private, no-store');\n    calledAfterSend = false;\n    res = await fetch(url, { cacheOverride });\n    // afterSend not called as response is cached\n    strictEqual(res.cached, true);\n    strictEqual(res.headers.get('x-cache'), 'HIT');\n    strictEqual(calledAfterSend, false);\n    strictEqual(res.headers.get('Cache-Control'), 'private, no-store');\n  });\n\n  routes.set('/http-cache/after-send-cache-expire', async () => {\n    const url = getTestUrl();\n    let calledAfterSend = false;\n    let res = await fetch(url, {\n      cacheOverride: {\n        afterSend(res) {\n          calledAfterSend = true;\n          res.headers.set('Cache-Control', 'max-age=2');\n          return { cache: true };\n        },\n      },\n    });\n    strictEqual(calledAfterSend, true);\n    strictEqual(res.cached, false);\n    strictEqual(res.headers.get('x-cache'), 'MISS');\n    strictEqual(res.headers.get('Cache-Control'), 'max-age=2');\n\n    await new Promise((resolve) => setTimeout(resolve, 500));\n    calledAfterSend = false;\n    res = await fetch(url, {\n      cacheOverride: {\n        afterSend(res) {\n          calledAfterSend = true;\n        },\n      },\n    });\n\n    // should still be cached\n    strictEqual(calledAfterSend, false);\n    strictEqual(res.age > 0, true);\n    strictEqual(res.age < 2, true);\n    strictEqual(res.cached, true);\n    strictEqual(res.headers.get('x-cache'), 'HIT');\n    strictEqual(res.headers.get('Cache-Control'), 'max-age=2');\n\n    // should then expire\n    await new Promise((resolve) => setTimeout(resolve, 2000));\n\n    res = await fetch(url, {\n      cacheOverride: {\n        afterSend(res) {\n          calledAfterSend = true;\n        },\n      },\n    });\n    strictEqual(calledAfterSend, true);\n    strictEqual(res.cached, false);\n    strictEqual(res.age, 0);\n  });\n\n  routes.set('/http-cache/after-send-pass', async () => {\n    const url = getTestUrl();\n\n    let res = await fetch(url, {\n      cacheOverride: {\n        afterSend(res) {\n          res.headers.set('x-hooked', '');\n        },\n      },\n    });\n\n    res = await fetch(url);\n    strictEqual(res.headers.has('x-hooked'), true);\n\n    res = await fetch(url, { cacheOverride: 'pass' });\n    strictEqual(res.headers.has('x-hooked'), false);\n  });\n\n  routes.set('/http-cache/after-send-res-no-body', async () => {\n    const url = getTestUrl();\n\n    let calledAfterSend = false;\n    const res = await fetch(url, {\n      cacheOverride: {\n        async afterSend(res) {\n          calledAfterSend = true;\n          strictEqual(res.body, null);\n          // empty text gets given for opaque body\n          strictEqual(await res.text(), '');\n          // not cached -> this candidate response is promoted into the final resposne\n          return { cache: false };\n        },\n      },\n    });\n    strictEqual(calledAfterSend, true);\n    // verify we get a proper response (url included in response)\n    strictEqual('https://http-me.fastly.dev' + (await res.json()).url, url);\n  });\n\n  // Test response property mutations\n  routes.set('/http-cache/response-mutations', async () => {\n    const url = getTestUrl();\n    let afterSendCalled = false;\n\n    const res = await fetch(url, {\n      cacheOverride: {\n        afterSend(res) {\n          afterSendCalled = true;\n\n          // Test mutating various response properties\n          res.status = 201;\n\n          // can change headers\n          res.headers.set('X-Custom', 'test');\n\n          // can change cache options\n          res.ttl = 4000;\n          res.swr = 400;\n          res.pci = true;\n          res.surrogateKeys = ['key1', 'key2'];\n          res.vary = ['Accept', 'User-Agent'];\n        },\n      },\n    });\n    strictEqual(afterSendCalled, true);\n    strictEqual(res.status, 201);\n    strictEqual(res.headers.get('X-Custom'), 'test');\n    strictEqual(res.ttl, 4000);\n    strictEqual(res.swr, 400);\n    strictEqual(res.pci, true);\n    strictEqual(res.surrogateKeys.sort().join(','), 'key1,key2');\n    strictEqual(res.vary.sort().join(','), 'Accept,User-Agent');\n  });\n\n  // Test stale response handling\n  routes.set('/http-cache/stale-responses', async () => {\n    const url = getTestUrl();\n\n    // Initial fetch\n    const res1 = await fetch(url, {\n      cacheOverride: {\n        afterSend(res) {\n          res.ttl = 1; // Very short TTL\n          res.swr = 2; // Long stale-while-revalidate\n        },\n      },\n    });\n    strictEqual(res1.cached, false);\n    strictEqual(res1.stale, false);\n    await res1.arrayBuffer();\n\n    // Wait for response to become stale\n    await new Promise((resolve) => setTimeout(resolve, 1500));\n\n    // Fetch stale response\n    let calledAfterSendStale = false;\n    const res2 = await fetch(url, {\n      cacheOverride: {\n        // aftersend will be performed for background revalidation\n        afterSend(res) {\n          calledAfterSendStale = true;\n        },\n      },\n    });\n    // stale response is returned while background revalidation happens\n    strictEqual(calledAfterSendStale, false);\n    strictEqual(res2.cached, true);\n    strictEqual(res2.stale, true);\n    await res2.arrayBuffer();\n\n    // Wait for stale response to be invalidated too\n    await new Promise((resolve) => setTimeout(resolve, 1500));\n\n    // // Now we should get back the background revalidation we just performed\n    let calledAfterSend = false;\n    const res3 = await fetch(url, {\n      cacheOverride: {\n        afterSend(res) {\n          calledAfterSend = true;\n        },\n      },\n    });\n\n    strictEqual(res3.cached, true);\n    strictEqual(res3.stale, false);\n    strictEqual(calledAfterSend, false);\n    strictEqual(calledAfterSendStale, true);\n  });\n}\n\n// Test suite: Body transform\n{\n  // Test invalid transform stream\n  routes.set('/http-cache/invalid-transform', async () => {\n    const url = getTestUrl();\n\n    await assertRejects(\n      () =>\n        fetch(url, {\n          cacheOverride: new CacheOverride({\n            afterSend() {\n              return {\n                bodyTransformFn: 'not a transform function',\n              };\n            },\n          }),\n        }),\n      TypeError,\n    );\n  });\n\n  routes.set('/http-cache/body-transform', async () => {\n    const url = getTestUrl();\n\n    const cacheOverride = new CacheOverride({\n      afterSend(res) {\n        return {\n          bodyTransformFn: (buffer) => {\n            const text = new TextDecoder().decode(buffer);\n            const upperText = text.toUpperCase();\n            return new TextEncoder().encode(upperText);\n          },\n          cache: true,\n        };\n      },\n    });\n\n    const res = await fetch(url, { cacheOverride });\n    const text = await res.text();\n    strictEqual(text.length > 200, true);\n    strictEqual(text, text.toUpperCase());\n  });\n\n  routes.set('/http-cache/body-transform-delay', async () => {\n    const url = getTestUrl();\n\n    const cacheOverride = new CacheOverride({\n      afterSend(res) {\n        return {\n          async bodyTransformFn(buffer) {\n            // wait one second before returning the result\n            await new Promise((resolve) => setTimeout(resolve, 1000));\n            const text = new TextDecoder().decode(buffer);\n            const upperText = text.toUpperCase();\n            return new TextEncoder().encode(upperText);\n          },\n          cache: true,\n        };\n      },\n    });\n\n    const res = await fetch(url, { cacheOverride });\n    const text = await res.text();\n    strictEqual(text.length > 200, true);\n    strictEqual(text, text.toUpperCase());\n  });\n\n  // Test transform that throws an error\n  routes.set('/http-cache/body-transform-error', async () => {\n    const url = getTestUrl();\n\n    const cacheOverride = new CacheOverride({\n      afterSend() {\n        return {\n          bodyTransformFn() {\n            throw new Error('Transform failed');\n          },\n        };\n      },\n    });\n\n    // Should reject due to transform error\n    await assertRejects(\n      () => fetch(url, { cacheOverride }).then((res) => res.text()),\n      Error,\n      'Transform failed',\n    );\n  });\n\n  // Test transform that throws an error\n  routes.set('/http-cache/body-transform-error-delay', async () => {\n    const url = getTestUrl();\n\n    const cacheOverride = new CacheOverride({\n      afterSend() {\n        return {\n          async bodyTransformFn() {\n            await new Promise((resolve) => setTimeout(resolve, 1000));\n            throw new Error('Transform failed');\n          },\n        };\n      },\n    });\n\n    // Should reject due to transform error\n    await assertRejects(\n      () => fetch(url, { cacheOverride }).then((res) => res.text()),\n      Error,\n      'Transform failed',\n    );\n  });\n\n  // Test transform with invalid chunk type\n  routes.set('/http-cache/body-transform-invalid-chunk', async () => {\n    const url = getTestUrl();\n\n    const cacheOverride = new CacheOverride({\n      afterSend() {\n        return {\n          bodyTransformFn() {\n            return 'string instead of uint8array';\n          },\n        };\n      },\n    });\n\n    // Should reject due to invalid chunk type\n    await assertRejects(\n      () => fetch(url, { cacheOverride }).then((res) => res.text()),\n      Error,\n    );\n  });\n\n  // Concurrent body transforms\n  routes.set('/http-cache/concurrent-transforms', async () => {\n    const url1 = getTestUrl();\n    const url2 = getTestUrl();\n\n    const cacheOverride1 = new CacheOverride({\n      afterSend() {\n        return {\n          bodyTransformFn(buffer) {\n            const text = new TextDecoder().decode(buffer);\n            return new TextEncoder().encode(text.toUpperCase());\n          },\n          cache: true,\n        };\n      },\n    });\n\n    const cacheOverride2 = new CacheOverride({\n      afterSend() {\n        return {\n          bodyTransformFn(buffer) {\n            const text = new TextDecoder().decode(buffer);\n            return new TextEncoder().encode(text.toLowerCase());\n          },\n          cache: true,\n        };\n      },\n    });\n\n    // Make concurrent requests with different transforms\n    const [res1, res2] = await Promise.all([\n      fetch(url1, { cacheOverride: cacheOverride1 }),\n      fetch(url2, { cacheOverride: cacheOverride2 }),\n    ]);\n\n    // Check that transforms were applied correctly\n    const text1 = await res1.text();\n    const text2 = await res2.text();\n    strictEqual(text1.length > 200, true);\n    strictEqual(text1, text1.toUpperCase());\n    strictEqual(text2.length > 200, true);\n    strictEqual(text2, text2.toLowerCase());\n  });\n}\n\n// Test suite: Concurrent / Request Collapsing Behaviors\n{\n  // Test request mutation order with multiple concurrent requests\n  routes.set('/http-cache/sequential', async () => {\n    const url = getTestUrl();\n\n    let beforeSendCount = 0;\n\n    const cacheOverride = new CacheOverride({\n      beforeSend(req) {\n        beforeSendCount++;\n        req.headers.set('X-Count', 'COUNT ' + beforeSendCount.toString());\n      },\n    });\n\n    const res1 = await fetch(url, { cacheOverride });\n    const res2 = await fetch(url, { cacheOverride });\n\n    // Only one beforeSend should execute due to request collapsing\n    strictEqual(beforeSendCount, 1);\n    strictEqual(res1.cached || res2.cached, true);\n    strictEqual(res1.cached && res2.cached, false);\n\n    strictEqual((await res1.text()).includes('COUNT 1'), true);\n    strictEqual((await res2.text()).includes('COUNT 1'), true);\n  });\n\n  // Test request collapsing with different cache options\n  routes.set('/http-cache/sequential-three', async () => {\n    const url = getTestUrl();\n    let backendCalls = 0;\n\n    const cacheOverride = new CacheOverride({\n      beforeSend() {\n        backendCalls++;\n      },\n      afterSend(res) {\n        // Simulate slow backend\n        return new Promise((resolve) =>\n          setTimeout(() => {\n            resolve({ cache: true });\n          }, 100),\n        );\n      },\n    });\n\n    const res1 = await fetch(url, { cacheOverride });\n    const res2 = await fetch(url, { cacheOverride });\n    const res3 = await fetch(url, { cacheOverride });\n\n    // Only one backend call should occur due to request collapsing\n    strictEqual(backendCalls, 1);\n    strictEqual(res1.cached, false);\n    strictEqual(res2.cached, true);\n    strictEqual(res3.cached, true);\n  });\n\n  // Test request collapsing with uncacheable responses\n  routes.set(\n    '/http-cache/sequential-request-collapsing-uncacheable',\n    async () => {\n      const url = getTestUrl();\n      let backendCalls = 0;\n\n      const cacheOverride = new CacheOverride({\n        beforeSend() {\n          backendCalls++;\n        },\n        afterSend() {\n          return { cache: 'uncacheable' };\n        },\n      });\n\n      // First batch of concurrent requests\n      const res1 = await fetch(url, { cacheOverride });\n      const res2 = await fetch(url, { cacheOverride });\n      const res3 = await fetch(url, { cacheOverride });\n\n      // Should have collapsed to one backend call\n      strictEqual(backendCalls, 3);\n      strictEqual(res1.cached, false);\n      strictEqual(res2.cached, false);\n      strictEqual(res3.cached, false);\n\n      // Second request after small delay\n      await new Promise((resolve) => setTimeout(resolve, 50));\n      const res4 = await fetch(url, { cacheOverride });\n\n      // Should trigger new backend call since previous response was marked uncacheable\n      strictEqual(backendCalls, 4);\n      strictEqual(res4.cached, false);\n    },\n  );\n\n  // TODO (skipped, due to host behaviours not seeming as expected)\n  // Test request collapsing with varying headers\n  routes.set('/http-cache/sequential-request-collapsing-vary', async () => {\n    const url = getTestUrl();\n    let backendCalls = 0;\n\n    const cacheOverride = new CacheOverride({\n      beforeSend() {\n        backendCalls++;\n      },\n      afterSend(res) {\n        res.vary = ['User-Agent'];\n        return { cache: true };\n      },\n    });\n\n    // Concurrent requests with same User-Agent\n    const headers1 = { 'User-Agent': 'bot1' };\n    const res1 = await fetch(url, { cacheOverride, headers: headers1 });\n    const res2 = await fetch(url, { cacheOverride, headers: headers1 });\n\n    strictEqual(backendCalls, 1); // Should collapse\n    strictEqual(res1.cached, false);\n    strictEqual(res2.cached, true);\n\n    // Concurrent requests with different User-Agent\n    const headers2 = { 'User-Agent': 'bot2' };\n    const res3 = await fetch(url, { cacheOverride, headers: headers2 });\n    const res4 = await fetch(url, { cacheOverride, headers: headers2 });\n\n    strictEqual(backendCalls, 2); // Should trigger new backend call\n    strictEqual(res3.cached, false);\n    strictEqual(res4.cached, true);\n  });\n\n  // TODO (skipped, due to unknown blocking from host)\n  routes.set('/http-cache/parallel', async () => {\n    const url = getTestUrl();\n\n    let beforeSendCount = 0;\n\n    const cacheOverride = new CacheOverride({\n      beforeSend(req) {\n        beforeSendCount++;\n        req.headers.set('X-Count', 'COUNT ' + beforeSendCount.toString());\n      },\n    });\n\n    const [res1, res2] = await Promise.all([\n      fetch(url, { cacheOverride }),\n      fetch(url, { cacheOverride }),\n    ]);\n\n    // Only one beforeSend should execute due to request collapsing\n    strictEqual(beforeSendCount, 1);\n    strictEqual(res1.cached || res2.cached, true);\n    strictEqual(res1.cached && res2.cached, false);\n\n    strictEqual((await res1.text()).includes('COUNT 1'), true);\n    strictEqual((await res2.text()).includes('COUNT 1'), true);\n  });\n\n  // TODO (skipped, due to unknown blocking from host)\n  routes.set('/http-cache/parallel-three', async () => {\n    const url = getTestUrl();\n    let backendCalls = 0;\n\n    const cacheOverride = new CacheOverride({\n      beforeSend() {\n        backendCalls++;\n      },\n      afterSend(res) {\n        // Simulate slow backend\n        return new Promise((resolve) =>\n          setTimeout(() => {\n            resolve({ cache: true });\n          }, 100),\n        );\n      },\n    });\n\n    // Make multiple concurrent requests\n    const results = await Promise.all([\n      fetch(url, { cacheOverride }),\n      fetch(url, { cacheOverride }),\n      fetch(url, { cacheOverride }),\n    ]);\n\n    // Only one backend call should occur due to request collapsing\n    strictEqual(backendCalls, 1);\n    strictEqual(results[0].cached, false);\n    strictEqual(results[1].cached, true);\n    strictEqual(results[2].cached, true);\n  });\n\n  // TODO (skipped, due to unknown blocking from host)\n  routes.set(\n    '/http-cache/parallel-request-collapsing-uncacheable',\n    async () => {\n      const url = getTestUrl();\n      let backendCalls = 0;\n\n      const cacheOverride = new CacheOverride({\n        beforeSend() {\n          backendCalls++;\n        },\n        afterSend() {\n          return { cache: 'uncacheable' };\n        },\n      });\n\n      // First batch of concurrent requests\n      const results1 = await Promise.all([\n        fetch(url, { cacheOverride }),\n        fetch(url, { cacheOverride }),\n        fetch(url, { cacheOverride }),\n      ]);\n\n      // Should have collapsed to one backend call\n      strictEqual(backendCalls, 3);\n      results1.forEach((res) => strictEqual(res.cached, false));\n\n      // Second request after small delay\n      await new Promise((resolve) => setTimeout(resolve, 50));\n      const res = await fetch(url, { cacheOverride });\n\n      // Should trigger new backend call since previous response was marked uncacheable\n      strictEqual(backendCalls, 4);\n      strictEqual(res.cached, false);\n    },\n  );\n\n  // TODO (skipped, due to unknown blocking from host)\n  routes.set('/http-cache/parallel-request-collapsing-vary', async () => {\n    const url = getTestUrl();\n    let backendCalls = 0;\n\n    const cacheOverride = new CacheOverride({\n      beforeSend() {\n        backendCalls++;\n      },\n      afterSend(res) {\n        res.vary = ['User-Agent'];\n        return { cache: true };\n      },\n    });\n\n    // Concurrent requests with same User-Agent\n    const headers1 = { 'User-Agent': 'bot1' };\n    const results1 = await Promise.all([\n      fetch(url, { cacheOverride, headers: headers1 }),\n      fetch(url, { cacheOverride, headers: headers1 }),\n    ]);\n\n    strictEqual(backendCalls, 1); // Should collapse\n    strictEqual(results1[0].cached, false);\n    strictEqual(results1[1].cached, true);\n\n    // Concurrent requests with different User-Agent\n    const headers2 = { 'User-Agent': 'bot2' };\n    const results2 = await Promise.all([\n      fetch(url, { cacheOverride, headers: headers2 }),\n      fetch(url, { cacheOverride, headers: headers2 }),\n    ]);\n\n    strictEqual(backendCalls, 2); // Should trigger new backend call\n    strictEqual(results2[0].cached, false);\n    strictEqual(results2[1].cached, true);\n  });\n}\n\nroutes.set('/http-cache/cache-key-on-request', async () => {\n  const url = getTestUrl();\n  let backendCalls = 0;\n\n  const cacheOverride = new CacheOverride({\n    beforeSend(req) {\n      backendCalls++;\n    },\n  });\n\n  const key = `custom-cache-key-${Math.random().toString().slice(2)}`;\n\n  let req1 = new Request(url + '?req=1');\n  req1.setCacheKey(key);\n  const res1 = await fetch(req1, { cacheOverride });\n  strictEqual(backendCalls, 1);\n  strictEqual(res1.cached, false);\n\n  let req2 = new Request(url + '?req=2');\n  req2.setCacheKey(key);\n  const res2 = await fetch(req2, { cacheOverride });\n  strictEqual(backendCalls, 1);\n  strictEqual(res2.cached, true);\n\n  strictEqual(await res1.text(), await res2.text());\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/module-mode/src/index.js",
    "content": "/// <reference path=\"../../../../../types/index.d.ts\" />\n/* eslint-env serviceworker */\n\nimport { routes } from './routes.js';\nimport { env } from 'fastly:env';\nimport { enableDebugLogging } from 'fastly:experimental';\n\nimport './acl.js';\nimport './console.js';\nimport './dynamic-backend.js';\nimport './hello-world.js';\nimport './hono.js';\nimport './http-cache.js';\nimport './kv-store.js';\nimport './transform-stream.js';\n\naddEventListener('fetch', (event) => {\n  const responsePromise = app(event);\n  if (responsePromise) event.respondWith(responsePromise);\n});\n\nif (env('FASTLY_DEBUG_LOGGING') === '1') {\n  if (fastly.debugMessages) {\n    const { debug: consoleDebug } = console;\n    console.debug = function debug(...args) {\n      fastly.debugLog(...args);\n      consoleDebug(...args);\n    };\n  }\n  enableDebugLogging(true);\n}\n\n/**\n * @param {FetchEvent} event\n * @returns {Response}\n */\nasync function app(event) {\n  const FASTLY_SERVICE_VERSION = env('FASTLY_SERVICE_VERSION') || 'local';\n  console.log(`FASTLY_SERVICE_VERSION: ${FASTLY_SERVICE_VERSION}`);\n  const path = new URL(event.request.url).pathname;\n  console.log(`path: ${path}`);\n  let res;\n  try {\n    const routeHandler = routes.get(path);\n    if (routeHandler) {\n      res = await routeHandler(event);\n      if (res !== null) {\n        res = res || new Response('ok');\n      }\n    } else {\n      return (res = new Response(`${path} endpoint does not exist`, {\n        status: 500,\n      }));\n    }\n  } catch (error) {\n    if (error instanceof Response) {\n      res = error;\n    } else {\n      try {\n        return (res = new Response(\n          `The routeHandler for ${path} threw a [${error.constructor?.name ?? error.name}] error: ${error.message || error}` +\n            '\\n' +\n            error.stack +\n            (fastly.debugMessages\n              ? '\\n[DEBUG BUILD MESSAGES]:\\n\\n  - ' +\n                fastly.debugMessages.join('\\n  - ')\n              : ''),\n          { status: 500 },\n        ));\n      } catch (errRes) {\n        res = errRes;\n      }\n    }\n  } finally {\n    res.headers.set('fastly_service_version', FASTLY_SERVICE_VERSION);\n  }\n\n  return res;\n}\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/module-mode/src/kv-store.js",
    "content": "/// <reference path=\"../../../../../types/index.d.ts\" />\nimport {\n  strictEqual,\n  assertThrows,\n  assertRejects,\n  assertResolves,\n  deepStrictEqual,\n} from './assertions.js';\nimport { KVStore } from 'fastly:kv-store';\nimport { routes, isRunningLocally } from './routes.js';\nimport { sdkVersion } from 'fastly:experimental';\nimport { env } from 'fastly:env';\n\nconst KV_STORE_NAME = env('KV_STORE_NAME');\n\nconst debug = sdkVersion.endsWith('-debug');\n\n// kvstore e2e tests\n{\n  routes.set('/kv-store/debug-error', async () => {\n    if (!debug) return;\n\n    // special debug function to create a kv entry with an invalid handle\n    const entry = fastly.dump(null, 'invalidkv');\n\n    // we can then test the invalid handle error\n    try {\n      await entry.text();\n    } catch (e) {\n      strictEqual(e.message.includes('Invalid handle'), true);\n    }\n  });\n\n  routes.set('/kv-store-e2e/list', async () => {\n    const store = new KVStore(KV_STORE_NAME);\n    try {\n      await store.delete('c');\n    } catch {}\n    // bad metadata\n    await store.put('a', 'b');\n    const aEntry = await store.get('a');\n    strictEqual(aEntry.metadata(), null);\n\n    for (let i = 0; i < 100; i++) {\n      await store.put('c' + i, 'd', {\n        mode: 'overwrite',\n        metadata: i % 2 === 0 ? '42' : new Uint8Array([42]),\n      });\n    }\n    const cEntry = await store.get('c1');\n    strictEqual(await cEntry.text(), 'd');\n\n    const metadata = await cEntry.metadata();\n    strictEqual(metadata.byteLength, 1);\n    strictEqual(metadata[0], 42);\n\n    const cEntry2 = await store.get('c2');\n    strictEqual(await cEntry2.metadataText(), '42');\n\n    const metadataText = await cEntry.metadataText();\n    strictEqual(metadataText, '*');\n\n    await store.put('c5', 'cba', {\n      mode: 'prepend',\n      metadata: 'cbad',\n    });\n    const c5Entry = await store.get('c5');\n    strictEqual(await c5Entry.text(), 'cbad');\n    assertRejects(async () => await c5Entry.metadataText(), TypeError);\n\n    // TTL only supported on compute not viceroy\n    if (!isRunningLocally()) {\n      await store.put('t', 't', { ttl: 2 });\n      const tEntry = await store.get('t');\n      strictEqual(await tEntry.text(), 't');\n      const metadata = await tEntry.metadata();\n      strictEqual(metadata, null);\n      await new Promise((resolve) => setTimeout(resolve, 2000));\n      strictEqual(await store.get('t'), null);\n    }\n\n    // bad cursor gives a \"bad request\" error\n    assertRejects(async () => {\n      await store.list({ cursor: 'boooo' });\n    }, TypeError);\n\n    assertThrows(() => {\n      store.list({ limit: 'booooo' });\n    }, TypeError);\n\n    assertThrows(() => {\n      store.list({ limit: 5.5 });\n    }, TypeError);\n\n    strictEqual(await store.get('noone'), null);\n\n    let { list, cursor } = await store.list({ limit: 10, prefix: 'c' });\n\n    deepStrictEqual(list, [\n      'c0',\n      'c1',\n      'c10',\n      'c11',\n      'c12',\n      'c13',\n      'c14',\n      'c15',\n      'c16',\n      'c17',\n    ]);\n\n    ({ list, cursor } = await store.list({ limit: 10, prefix: 'c', cursor }));\n    deepStrictEqual(list, [\n      'c18',\n      'c19',\n      'c2',\n      'c20',\n      'c21',\n      'c22',\n      'c23',\n      'c24',\n      'c25',\n      'c26',\n    ]);\n\n    ({ list, cursor } = await store.list({ limit: 70, prefix: 'c', cursor }));\n    deepStrictEqual(list, [\n      'c27',\n      'c28',\n      'c29',\n      'c3',\n      'c30',\n      'c31',\n      'c32',\n      'c33',\n      'c34',\n      'c35',\n      'c36',\n      'c37',\n      'c38',\n      'c39',\n      'c4',\n      'c40',\n      'c41',\n      'c42',\n      'c43',\n      'c44',\n      'c45',\n      'c46',\n      'c47',\n      'c48',\n      'c49',\n      'c5',\n      'c50',\n      'c51',\n      'c52',\n      'c53',\n      'c54',\n      'c55',\n      'c56',\n      'c57',\n      'c58',\n      'c59',\n      'c6',\n      'c60',\n      'c61',\n      'c62',\n      'c63',\n      'c64',\n      'c65',\n      'c66',\n      'c67',\n      'c68',\n      'c69',\n      'c7',\n      'c70',\n      'c71',\n      'c72',\n      'c73',\n      'c74',\n      'c75',\n      'c76',\n      'c77',\n      'c78',\n      'c79',\n      'c8',\n      'c80',\n      'c81',\n      'c82',\n      'c83',\n      'c84',\n      'c85',\n      'c86',\n      'c87',\n      'c88',\n      'c89',\n      'c9',\n    ]);\n\n    ({ list, cursor } = await store.list({ limit: 15, prefix: 'c', cursor }));\n    deepStrictEqual(list, [\n      'c90',\n      'c91',\n      'c92',\n      'c93',\n      'c94',\n      'c95',\n      'c96',\n      'c97',\n      'c98',\n      'c99',\n    ]);\n    strictEqual(cursor, undefined);\n  });\n}\n\n// KVStore\n{\n  routes.set('/kv-store/exposed-as-global', async () => {\n    strictEqual(typeof KVStore, 'function', `typeof KVStore`);\n  });\n  routes.set('/kv-store/interface', kvStoreInterfaceTests);\n  // KVStore constructor\n  {\n    routes.set('/kv-store/constructor/called-as-regular-function', async () => {\n      assertThrows(\n        () => {\n          KVStore();\n        },\n        TypeError,\n        `calling a builtin KVStore constructor without new is forbidden`,\n      );\n    });\n    // https://tc39.es/ecma262/#sec-tostring\n    routes.set(\n      '/kv-store/constructor/parameter-calls-7.1.17-ToString',\n      async () => {\n        let sentinel;\n        const test = () => {\n          sentinel = Symbol();\n          const name = {\n            toString() {\n              throw sentinel;\n            },\n          };\n          new KVStore(name);\n        };\n        assertThrows(test);\n        try {\n          test();\n        } catch (thrownError) {\n          strictEqual(thrownError, sentinel, 'thrownError === sentinel');\n        }\n        assertThrows(\n          () => new KVStore(Symbol()),\n          TypeError,\n          `can't convert symbol to string`,\n        );\n      },\n    );\n    routes.set('/kv-store/constructor/empty-parameter', async () => {\n      assertThrows(\n        () => {\n          new KVStore();\n        },\n        TypeError,\n        `KVStore constructor: At least 1 argument required, but only 0 passed`,\n      );\n    });\n    routes.set('/kv-store/constructor/found-store', async () => {\n      const store = new KVStore(KV_STORE_NAME);\n      strictEqual(store instanceof KVStore, true, `store instanceof KVStore`);\n    });\n    routes.set('/kv-store/constructor/missing-store', async () => {\n      assertThrows(\n        () => {\n          new KVStore('missing');\n        },\n        Error,\n        `KVStore constructor: No KVStore named 'missing' exists`,\n      );\n    });\n    routes.set('/kv-store/constructor/invalid-name', async () => {\n      // control Characters (\\\\u0000-\\\\u001F) are not allowed\n      const controlCharacters = [\n        '\\u0000',\n        '\\u0001',\n        '\\u0002',\n        '\\u0003',\n        '\\u0004',\n        '\\u0005',\n        '\\u0006',\n        '\\u0007',\n        '\\u0008',\n        '\\u0009',\n        '\\u000A',\n        '\\u000B',\n        '\\u000C',\n        '\\u000D',\n        '\\u000E',\n        '\\u0010',\n        '\\u0011',\n        '\\u0012',\n        '\\u0013',\n        '\\u0014',\n        '\\u0015',\n        '\\u0016',\n        '\\u0017',\n        '\\u0018',\n        '\\u0019',\n        '\\u001A',\n        '\\u001B',\n        '\\u001C',\n        '\\u001D',\n        '\\u001E',\n        '\\u001F',\n      ];\n      for (const character of controlCharacters) {\n        assertThrows(\n          () => {\n            new KVStore(character);\n          },\n          TypeError,\n          `KVStore constructor: name can not contain control characters (\\\\u0000-\\\\u001F)`,\n        );\n      }\n\n      // must be less than 256 characters\n      assertThrows(\n        () => {\n          new KVStore('1'.repeat(256));\n        },\n        TypeError,\n        `KVStore constructor: name can not be more than 255 characters`,\n      );\n\n      // empty string not allowed\n      assertThrows(\n        () => {\n          new KVStore('');\n        },\n        TypeError,\n        `KVStore constructor: name can not be an empty string`,\n      );\n    });\n  }\n\n  // KVStore put method\n  {\n    routes.set('/kv-store/put/called-as-constructor', async () => {\n      assertThrows(() => {\n        new KVStore.prototype.put('1', '1');\n      }, TypeError);\n    });\n    routes.set('/kv-store/put/called-unbound', async () => {\n      assertThrows(() => {\n        KVStore.prototype.put.call(undefined, '1', '2');\n      }, TypeError);\n    });\n    // https://tc39.es/ecma262/#sec-tostring\n    routes.set(\n      '/kv-store/put/key-parameter-calls-7.1.17-ToString',\n      async () => {\n        let sentinel;\n        const test = async () => {\n          sentinel = Symbol();\n          const key = {\n            toString() {\n              throw sentinel;\n            },\n          };\n          const store = new KVStore(KV_STORE_NAME);\n          await store.put(key, '');\n        };\n        await assertRejects(test);\n        try {\n          await test();\n        } catch (thrownError) {\n          strictEqual(thrownError, sentinel, 'thrownError === sentinel');\n        }\n        await assertRejects(\n          async () => {\n            const store = new KVStore(KV_STORE_NAME);\n            await store.put(Symbol(), '');\n          },\n          Error,\n          `can't convert symbol to string`,\n        );\n      },\n    );\n    routes.set('/kv-store/put/key-parameter-not-supplied', async () => {\n      await assertRejects(\n        async () => {\n          const store = new KVStore(KV_STORE_NAME);\n          await store.put();\n        },\n        TypeError,\n        `put: At least 2 arguments required, but only 0 passed`,\n      );\n    });\n    routes.set('/kv-store/put/key-parameter-empty-string', async () => {\n      await assertRejects(\n        async () => {\n          const store = new KVStore(KV_STORE_NAME);\n          await store.put('', '');\n        },\n        TypeError,\n        `KVStore key can not be an empty string`,\n      );\n    });\n    routes.set(\n      '/kv-store/put/key-parameter-1024-character-string',\n      async () => {\n        await assertResolves(async () => {\n          const store = new KVStore(KV_STORE_NAME);\n          const key = 'a'.repeat(1024);\n          await store.put(key, '');\n        });\n      },\n    );\n    routes.set(\n      '/kv-store/put/key-parameter-1025-character-string',\n      async () => {\n        await assertRejects(\n          async () => {\n            const store = new KVStore(KV_STORE_NAME);\n            const key = 'a'.repeat(1025);\n            await store.put(key, '');\n          },\n          TypeError,\n          `KVStore key can not be more than 1024 characters`,\n        );\n      },\n    );\n    routes.set('/kv-store/put/key-parameter-containing-newline', async () => {\n      await assertRejects(\n        async () => {\n          let store = new KVStore(KV_STORE_NAME);\n          await store.put('\\n', '');\n        },\n        TypeError,\n        `KVStore key can not contain newline character`,\n      );\n    });\n    routes.set(\n      '/kv-store/put/key-parameter-containing-carriage-return',\n      async () => {\n        await assertRejects(\n          async () => {\n            let store = new KVStore(KV_STORE_NAME);\n            await store.put('\\r', '');\n          },\n          TypeError,\n          `KVStore key can not contain carriage return character`,\n        );\n      },\n    );\n    routes.set(\n      '/kv-store/put/key-parameter-starting-with-well-known-acme-challenge',\n      async () => {\n        await assertRejects(\n          async () => {\n            let store = new KVStore(KV_STORE_NAME);\n            await store.put('.well-known/acme-challenge/', '');\n          },\n          TypeError,\n          `KVStore key can not start with .well-known/acme-challenge/`,\n        );\n      },\n    );\n    routes.set('/kv-store/put/key-parameter-single-dot', async () => {\n      await assertRejects(\n        async () => {\n          let store = new KVStore(KV_STORE_NAME);\n          await store.put('.', '');\n        },\n        TypeError,\n        `KVStore key can not be '.' or '..'`,\n      );\n    });\n    routes.set('/kv-store/put/key-parameter-double-dot', async () => {\n      await assertRejects(\n        async () => {\n          let store = new KVStore(KV_STORE_NAME);\n          await store.put('..', '');\n        },\n        TypeError,\n        `KVStore key can not be '.' or '..'`,\n      );\n    });\n    routes.set(\n      '/kv-store/put/key-parameter-containing-special-characters',\n      async () => {\n        const specialCharacters = [';', '^', '|', '#', '?'];\n        for (const character of specialCharacters) {\n          await assertRejects(\n            async () => {\n              let store = new KVStore(KV_STORE_NAME);\n              await store.put(character, '');\n            },\n            TypeError,\n            `KVStore key can not contain ${character} character`,\n          );\n        }\n      },\n    );\n    routes.set('/kv-store/put/value-parameter-as-undefined', async () => {\n      const store = new KVStore(KV_STORE_NAME);\n      let result = store.put('undefined', undefined);\n      strictEqual(\n        result instanceof Promise,\n        true,\n        'store.put(\"undefined\", undefined) instanceof Promise',\n      );\n      strictEqual(\n        await result,\n        undefined,\n        'await store.put(\"undefined\", undefined)',\n      );\n    });\n    routes.set('/kv-store/put/value-parameter-not-supplied', async () => {\n      await assertRejects(\n        async () => {\n          const store = new KVStore(KV_STORE_NAME);\n          await store.put('test');\n        },\n        TypeError,\n        `put: At least 2 arguments required, but only 1 passed`,\n      );\n    });\n    // - ReadableStream\n    routes.set(\n      '/kv-store/put/value-parameter-readablestream-empty',\n      async () => {\n        // TODO: remove this when streams are supported\n        await assertRejects(\n          async () => {\n            const stream = iteratableToStream([]);\n            const store = new KVStore(KV_STORE_NAME);\n            await store.put('readablestream-empty', stream);\n          },\n          TypeError,\n          `Content-provided streams are not yet supported for streaming into KVStore`,\n        );\n        // TODO: uncomment this when conte-provided (guest) streams are supported\n        // const stream = iteratableToStream([])\n        // const store = new KVStore(KV_STORE_NAME)\n        // let result = store.put('readablestream-empty', stream)\n        // strictEqual(result instanceof Promise, true, `store.put('readablestream-empty', stream) instanceof Promise`)\n        // strictEqual(await result, undefined, `await store.put('readablestream-empty', stream)`)\n      },\n    );\n    routes.set(\n      '/kv-store/put/value-parameter-readablestream-under-30mb',\n      async () => {\n        const res = await fetch(\n          'https://compute-sdk-test-backend.edgecompute.app/',\n          {\n            backend: 'TheOrigin',\n          },\n        );\n        const store = new KVStore(KV_STORE_NAME);\n        let result = store.put('readablestream-under-30mb', res.body);\n        strictEqual(\n          result instanceof Promise,\n          true,\n          `store.put('readablestream-under-30mb', stream) instanceof Promise`,\n        );\n        strictEqual(\n          await result,\n          undefined,\n          `await store.put('readablestream-under-30mb', stream)`,\n        );\n      },\n    );\n    routes.set('/kv-store/put/request-body', async ({ request }) => {\n      const store = new KVStore(KV_STORE_NAME);\n      let result = store.put('readablestream-req', request.body);\n      strictEqual(\n        result instanceof Promise,\n        true,\n        `store.put('readablestream-req', request.body) instanceof Promise`,\n      );\n      strictEqual(\n        await result,\n        undefined,\n        `await store.put('readablestream-req', request.body)`,\n      );\n    });\n    routes.set(\n      '/kv-store/put/value-parameter-readablestream-over-30mb',\n      async () => {\n        // TODO: remove this when streams are supported\n        await assertRejects(\n          async () => {\n            const stream = iteratableToStream([\n              'x'.repeat(30 * 1024 * 1024) + 'x',\n            ]);\n            const store = new KVStore(KV_STORE_NAME);\n            await store.put('readablestream-over-30mb', stream);\n          },\n          Error,\n          `Content-provided streams are not yet supported for streaming into KVStore`,\n        );\n        // TODO: uncomment this when conte-provided (guest) streams are supported\n        // const stream = iteratableToStream(['x'.repeat(30*1024*1024) + 'x'])\n        // const store = new KVStore(KV_STORE_NAME)\n        // let result = store.put('readablestream-over-30mb', stream)\n        // strictEqual(result instanceof Promise, true, `store.put('readablestream-over-30mb', stream) instanceof Promise`)\n        // strictEqual(await result, undefined, `await store.put('readablestream-over-30mb', stream)`)\n      },\n    );\n    routes.set(\n      '/kv-store/put/value-parameter-readablestream-locked',\n      async () => {\n        const stream = iteratableToStream([]);\n        // getReader() causes the stream to become locked\n        stream.getReader();\n        const store = new KVStore(KV_STORE_NAME);\n        await assertRejects(\n          async () => {\n            await store.put('readablestream-locked', stream);\n            // await store.put(\"test\", stream)\n          },\n          TypeError,\n          `Can't use a ReadableStream that's locked or has ever been read from or canceled`,\n        );\n      },\n    );\n\n    // - URLSearchParams\n    routes.set('/kv-store/put/value-parameter-URLSearchParams', async () => {\n      const items = [\n        new URLSearchParams(),\n        new URLSearchParams({ a: 'b', c: 'd' }),\n      ];\n      const store = new KVStore(KV_STORE_NAME);\n      for (const searchParams of items) {\n        let result = store.put('URLSearchParams', searchParams);\n        strictEqual(\n          result instanceof Promise,\n          true,\n          `store.put('URLSearchParams', searchParams) instanceof Promise`,\n        );\n        strictEqual(\n          await result,\n          undefined,\n          `await store.put('URLSearchParams', searchParams)`,\n        );\n      }\n    });\n    // - USV strings\n    routes.set('/kv-store/put/value-parameter-strings', async () => {\n      const strings = [\n        // empty\n        '',\n        // lone surrogate\n        '\\uD800',\n        // surrogate pair\n        '𠈓',\n        String('carrot'),\n      ];\n      const store = new KVStore(KV_STORE_NAME);\n      for (const string of strings) {\n        let result = store.put('string', string);\n        strictEqual(\n          result instanceof Promise,\n          true,\n          `store.put('string', string) instanceof Promise`,\n        );\n        strictEqual(\n          await result,\n          undefined,\n          `await store.put('string', string)`,\n        );\n      }\n    });\n\n    routes.set('/kv-store/put/value-parameter-string-over-30mb', async () => {\n      const string = 'x'.repeat(35 * 1024 * 1024) + 'x';\n      const store = new KVStore(KV_STORE_NAME);\n      await assertRejects(\n        () => store.put('string-over-30mb', string),\n        TypeError,\n        `KVStore value can not be more than 30 Megabytes in size`,\n      );\n    });\n\n    // https://tc39.es/ecma262/#sec-tostring\n    routes.set(\n      '/kv-store/put/value-parameter-calls-7.1.17-ToString',\n      async () => {\n        let sentinel;\n        const test = async () => {\n          sentinel = Symbol();\n          const value = {\n            toString() {\n              throw sentinel;\n            },\n          };\n          const store = new KVStore(KV_STORE_NAME);\n          await store.put('toString', value);\n        };\n        await assertRejects(test);\n        try {\n          await test();\n        } catch (thrownError) {\n          strictEqual(thrownError, sentinel, 'thrownError === sentinel');\n        }\n        await assertRejects(\n          async () => {\n            const store = new KVStore(KV_STORE_NAME);\n            await store.put('Symbol()', Symbol());\n          },\n          TypeError,\n          `can't convert symbol to string`,\n        );\n      },\n    );\n\n    // - buffer source\n    routes.set('/kv-store/put/value-parameter-buffer', async () => {\n      const typedArrayConstructors = [\n        Int8Array,\n        Int16Array,\n        Int32Array,\n        Float32Array,\n        Float64Array,\n        BigInt64Array,\n        Uint8Array,\n        Uint8ClampedArray,\n        Uint16Array,\n        Uint32Array,\n        BigUint64Array,\n      ];\n      const store = new KVStore(KV_STORE_NAME);\n      for (const constructor of typedArrayConstructors) {\n        const typedArray = new constructor(8);\n        let result = store.put(constructor.name, typedArray.buffer);\n        strictEqual(\n          result instanceof Promise,\n          true,\n          `store.put(${constructor.name}, typedArray.buffer) instanceof Promise`,\n        );\n        strictEqual(\n          await result,\n          undefined,\n          `await store.put(${constructor.name}, typedArray.buffer)`,\n        );\n      }\n    });\n    routes.set('/kv-store/put/value-parameter-arraybuffer', async () => {\n      const typedArrayConstructors = [\n        Int8Array,\n        Int16Array,\n        Int32Array,\n        Float32Array,\n        Float64Array,\n        BigInt64Array,\n        Uint8Array,\n        Uint8ClampedArray,\n        Uint16Array,\n        Uint32Array,\n        BigUint64Array,\n      ];\n      const store = new KVStore(KV_STORE_NAME);\n      for (const constructor of typedArrayConstructors) {\n        const typedArray = new constructor(8);\n        let result = store.put(constructor.name, typedArray.buffer);\n        strictEqual(\n          result instanceof Promise,\n          true,\n          `store.put(${constructor.name}, typedArray.buffer) instanceof Promise`,\n        );\n        strictEqual(\n          await result,\n          undefined,\n          `await store.put(${constructor.name}, typedArray.buffer)`,\n        );\n      }\n    });\n    routes.set('/kv-store/put/value-parameter-typed-arrays', async () => {\n      const typedArrayConstructors = [\n        Int8Array,\n        Int16Array,\n        Int32Array,\n        Float32Array,\n        Float64Array,\n        BigInt64Array,\n        Uint8Array,\n        Uint8ClampedArray,\n        Uint16Array,\n        Uint32Array,\n        BigUint64Array,\n      ];\n      const store = new KVStore(KV_STORE_NAME);\n      for (const constructor of typedArrayConstructors) {\n        const typedArray = new constructor(8);\n        let result = store.put(constructor.name, typedArray);\n        strictEqual(\n          result instanceof Promise,\n          true,\n          `store.put(${constructor.name}, typedArray) instanceof Promise`,\n        );\n        strictEqual(\n          await result,\n          undefined,\n          `await store.put(${constructor.name}, typedArray)`,\n        );\n      }\n    });\n    routes.set('/kv-store/put/value-parameter-dataview', async () => {\n      const typedArrayConstructors = [\n        Int8Array,\n        Uint8Array,\n        Uint8ClampedArray,\n        Int16Array,\n        Uint16Array,\n        Int32Array,\n        Uint32Array,\n        Float32Array,\n        Float64Array,\n        BigInt64Array,\n        BigUint64Array,\n      ];\n      const store = new KVStore(KV_STORE_NAME);\n      for (const constructor of typedArrayConstructors) {\n        const typedArray = new constructor(8);\n        const view = new DataView(typedArray.buffer);\n        let result = store.put(`new DataView(${constructor.name})`, view);\n        strictEqual(\n          result instanceof Promise,\n          true,\n          `store.put(new DataView(${constructor.name}), typedArray) instanceof Promise`,\n        );\n        strictEqual(\n          await result,\n          undefined,\n          `await store.put(new DataView(${constructor.name}), typedArray)`,\n        );\n      }\n    });\n  }\n\n  // KVStore delete method\n  {\n    routes.set('/kv-store/delete/called-as-constructor', async () => {\n      assertThrows(() => {\n        new KVStore.prototype.delete('1');\n      }, TypeError);\n    });\n    routes.set('/kv-store/delete/called-unbound', async () => {\n      await assertRejects(async () => {\n        await KVStore.prototype.delete.call(undefined, '1');\n      }, TypeError);\n    });\n    // https://tc39.es/ecma262/#sec-tostring\n    routes.set(\n      '/kv-store/delete/key-parameter-calls-7.1.17-ToString',\n      async () => {\n        let sentinel;\n        const test = async () => {\n          sentinel = Symbol();\n          const key = {\n            toString() {\n              throw sentinel;\n            },\n          };\n          const store = new KVStore(KV_STORE_NAME);\n          await store.delete(key);\n        };\n        await assertRejects(test);\n        try {\n          await test();\n        } catch (thrownError) {\n          strictEqual(thrownError, sentinel, 'thrownError === sentinel');\n        }\n        await assertRejects(\n          async () => {\n            const store = new KVStore(KV_STORE_NAME);\n            await store.delete(Symbol());\n          },\n          TypeError,\n          `can't convert symbol to string`,\n        );\n      },\n    );\n    routes.set('/kv-store/delete/key-parameter-not-supplied', async () => {\n      await assertRejects(\n        async () => {\n          const store = new KVStore(KV_STORE_NAME);\n          await store.delete();\n        },\n        TypeError,\n        `delete: At least 1 argument required, but only 0 passed`,\n      );\n    });\n    routes.set('/kv-store/delete/key-parameter-empty-string', async () => {\n      await assertRejects(\n        async () => {\n          const store = new KVStore(KV_STORE_NAME);\n          await store.delete('');\n        },\n        TypeError,\n        `KVStore key can not be an empty string`,\n      );\n    });\n    routes.set(\n      '/kv-store/delete/key-parameter-1024-character-string',\n      async () => {\n        await assertResolves(async () => {\n          const store = new KVStore(KV_STORE_NAME);\n          const key = 'a'.repeat(1024);\n          await store.put(key, '');\n          await store.delete(key);\n        });\n      },\n    );\n    routes.set(\n      '/kv-store/delete/key-parameter-1025-character-string',\n      async () => {\n        await assertRejects(\n          async () => {\n            const store = new KVStore(KV_STORE_NAME);\n            const key = 'a'.repeat(1025);\n            await store.delete(key);\n          },\n          TypeError,\n          `KVStore key can not be more than 1024 characters`,\n        );\n      },\n    );\n    routes.set(\n      '/kv-store/delete/key-parameter-containing-newline',\n      async () => {\n        await assertRejects(\n          async () => {\n            let store = new KVStore(KV_STORE_NAME);\n            await store.delete('\\n');\n          },\n          TypeError,\n          `KVStore key can not contain newline character`,\n        );\n      },\n    );\n    routes.set(\n      '/kv-store/delete/key-parameter-containing-carriage-return',\n      async () => {\n        await assertRejects(\n          async () => {\n            let store = new KVStore(KV_STORE_NAME);\n            await store.delete('\\r');\n          },\n          TypeError,\n          `KVStore key can not contain carriage return character`,\n        );\n      },\n    );\n    routes.set(\n      '/kv-store/delete/key-parameter-starting-with-well-known-acme-challenge',\n      async () => {\n        await assertRejects(\n          async () => {\n            let store = new KVStore(KV_STORE_NAME);\n            await store.delete('.well-known/acme-challenge/');\n          },\n          TypeError,\n          `KVStore key can not start with .well-known/acme-challenge/`,\n        );\n      },\n    );\n    routes.set('/kv-store/delete/key-parameter-single-dot', async () => {\n      await assertRejects(\n        async () => {\n          let store = new KVStore(KV_STORE_NAME);\n          await store.delete('.');\n        },\n        TypeError,\n        `KVStore key can not be '.' or '..'`,\n      );\n    });\n    routes.set('/kv-store/delete/key-parameter-double-dot', async () => {\n      await assertRejects(\n        async () => {\n          let store = new KVStore(KV_STORE_NAME);\n          await store.delete('..');\n        },\n        TypeError,\n        `KVStore key can not be '.' or '..'`,\n      );\n    });\n    routes.set(\n      '/kv-store/delete/key-parameter-containing-special-characters',\n      async () => {\n        const specialCharacters = [';', '^', '|', '#', '?'];\n        for (const character of specialCharacters) {\n          await assertRejects(\n            async () => {\n              let store = new KVStore(KV_STORE_NAME);\n              await store.delete(character);\n            },\n            TypeError,\n            `KVStore key can not contain ${character} character`,\n          );\n        }\n      },\n    );\n    routes.set(\n      '/kv-store/delete/key-does-not-exist-returns-undefined',\n      async () => {\n        if (isRunningLocally()) {\n          return;\n        }\n        let store = new KVStore(KV_STORE_NAME);\n        await assertRejects(\n          () => store.delete(Math.random()),\n          TypeError,\n          'KVStore delete: Not found.',\n        );\n      },\n    );\n    routes.set('/kv-store/delete/key-exists', async () => {\n      let store = new KVStore(KV_STORE_NAME);\n      let key = `key-exists-${Math.random()}`;\n      await store.put(key, 'hello');\n      let result = store.delete(key);\n      strictEqual(\n        result instanceof Promise,\n        true,\n        `store.delete(key) instanceof Promise`,\n      );\n      result = await result;\n      strictEqual(result, undefined, `(await store.delete(key) === undefined)`);\n    });\n    routes.set('/kv-store/delete/delete-key-twice', async () => {\n      if (isRunningLocally()) {\n        return;\n      }\n      let store = new KVStore(KV_STORE_NAME);\n      let key = `key-exists-${Math.random()}`;\n      await store.put(key, 'hello');\n      let result = store.delete(key);\n      strictEqual(\n        result instanceof Promise,\n        true,\n        `store.delete(key) instanceof Promise`,\n      );\n      result = await result;\n      strictEqual(result, undefined, `(await store.delete(key) === undefined)`);\n      await assertRejects(\n        () => store.delete(key),\n        TypeError,\n        'KVStore delete: Not found.',\n      );\n    });\n    routes.set('/kv-store/delete/multiple-deletes-at-once', async () => {\n      let store = new KVStore(KV_STORE_NAME);\n      let key1 = `key-exists-${Math.random()}`;\n      await store.put(key1, '1hello1');\n      let key2 = `key-exists-${Math.random()}`;\n      await store.put(key2, '2hello2');\n      let key3 = `key-exists-${Math.random()}`;\n      await store.put(key3, '3hello3');\n      let key4 = `key-exists-${Math.random()}`;\n      await store.put(key4, '4hello4');\n      let key5 = `key-exists-${Math.random()}`;\n      await store.put(key5, '5hello5');\n      await assertResolves(() => {\n        return Promise.all([\n          store.delete(key1),\n          store.delete(key2),\n          store.delete(key3),\n          store.delete(key4),\n          store.delete(key5),\n        ]);\n      });\n    });\n  }\n\n  // KVStore get method\n  {\n    routes.set('/kv-store/get/called-as-constructor', async () => {\n      assertThrows(() => {\n        new KVStore.prototype.get('1');\n      }, TypeError);\n    });\n    routes.set('/kv-store/get/called-unbound', async () => {\n      await assertRejects(async () => {\n        await KVStore.prototype.get.call(undefined, '1');\n      }, TypeError);\n    });\n    // https://tc39.es/ecma262/#sec-tostring\n    routes.set(\n      '/kv-store/get/key-parameter-calls-7.1.17-ToString',\n      async () => {\n        let sentinel;\n        const test = async () => {\n          sentinel = Symbol();\n          const key = {\n            toString() {\n              throw sentinel;\n            },\n          };\n          const store = new KVStore(KV_STORE_NAME);\n          await store.get(key);\n        };\n        await assertRejects(test);\n        try {\n          await test();\n        } catch (thrownError) {\n          strictEqual(thrownError, sentinel, 'thrownError === sentinel');\n        }\n        await assertRejects(\n          async () => {\n            const store = new KVStore(KV_STORE_NAME);\n            await store.get(Symbol());\n          },\n          TypeError,\n          `can't convert symbol to string`,\n        );\n      },\n    );\n    routes.set('/kv-store/get/key-parameter-not-supplied', async () => {\n      await assertRejects(\n        async () => {\n          const store = new KVStore(KV_STORE_NAME);\n          await store.get();\n        },\n        TypeError,\n        `get: At least 1 argument required, but only 0 passed`,\n      );\n    });\n    routes.set('/kv-store/get/key-parameter-empty-string', async () => {\n      await assertRejects(\n        async () => {\n          const store = new KVStore(KV_STORE_NAME);\n          await store.get('');\n        },\n        TypeError,\n        `KVStore key can not be an empty string`,\n      );\n    });\n    routes.set(\n      '/kv-store/get/key-parameter-1024-character-string',\n      async () => {\n        await assertResolves(async () => {\n          const store = new KVStore(KV_STORE_NAME);\n          const key = 'a'.repeat(1024);\n          await store.get(key);\n        });\n      },\n    );\n    routes.set(\n      '/kv-store/get/key-parameter-1025-character-string',\n      async () => {\n        await assertRejects(\n          async () => {\n            const store = new KVStore(KV_STORE_NAME);\n            const key = 'a'.repeat(1025);\n            await store.get(key);\n          },\n          TypeError,\n          `KVStore key can not be more than 1024 characters`,\n        );\n      },\n    );\n    routes.set('/kv-store/get/key-parameter-containing-newline', async () => {\n      await assertRejects(\n        async () => {\n          let store = new KVStore(KV_STORE_NAME);\n          await store.get('\\n');\n        },\n        TypeError,\n        `KVStore key can not contain newline character`,\n      );\n    });\n    routes.set(\n      '/kv-store/get/key-parameter-containing-carriage-return',\n      async () => {\n        await assertRejects(\n          async () => {\n            let store = new KVStore(KV_STORE_NAME);\n            await store.get('\\r');\n          },\n          TypeError,\n          `KVStore key can not contain carriage return character`,\n        );\n      },\n    );\n    routes.set(\n      '/kv-store/get/key-parameter-starting-with-well-known-acme-challenge',\n      async () => {\n        await assertRejects(\n          async () => {\n            let store = new KVStore(KV_STORE_NAME);\n            await store.get('.well-known/acme-challenge/');\n          },\n          TypeError,\n          `KVStore key can not start with .well-known/acme-challenge/`,\n        );\n      },\n    );\n    routes.set('/kv-store/get/key-parameter-single-dot', async () => {\n      await assertRejects(\n        async () => {\n          let store = new KVStore(KV_STORE_NAME);\n          await store.get('.');\n        },\n        TypeError,\n        `KVStore key can not be '.' or '..'`,\n      );\n    });\n    routes.set('/kv-store/get/key-parameter-double-dot', async () => {\n      await assertRejects(\n        async () => {\n          let store = new KVStore(KV_STORE_NAME);\n          await store.get('..');\n        },\n        TypeError,\n        `KVStore key can not be '.' or '..'`,\n      );\n    });\n    routes.set(\n      '/kv-store/get/key-parameter-containing-special-characters',\n      async () => {\n        const specialCharacters = [';', '^', '|', '#', '?'];\n        for (const character of specialCharacters) {\n          await assertRejects(\n            async () => {\n              let store = new KVStore(KV_STORE_NAME);\n              await store.get(character);\n            },\n            TypeError,\n            `KVStore key can not contain ${character} character`,\n          );\n        }\n      },\n    );\n    routes.set('/kv-store/get/key-does-not-exist-returns-null', async () => {\n      let store = new KVStore(KV_STORE_NAME);\n      let result = store.get(Math.random());\n      strictEqual(\n        result instanceof Promise,\n        true,\n        `store.get(Math.random()) instanceof Promise`,\n      );\n      strictEqual(await result, null, `await store.get(Math.random())`);\n    });\n    routes.set('/kv-store/get/key-does-not-exist-returns-null', async () => {\n      let store = new KVStore(KV_STORE_NAME);\n      let result = store.get(Math.random());\n      strictEqual(\n        result instanceof Promise,\n        true,\n        `store.get(Math.random()) instanceof Promise`,\n      );\n      strictEqual(await result, null, `await store.get(Math.random())`);\n    });\n    routes.set('/kv-store/get/key-exists', async () => {\n      let store = new KVStore(KV_STORE_NAME);\n      let key = `key-exists-${Math.random()}`;\n      await store.put(key, 'hello');\n      let result = store.get(key);\n      strictEqual(\n        result instanceof Promise,\n        true,\n        `store.get(key) instanceof Promise`,\n      );\n      result = await result;\n      strictEqual(\n        result instanceof KVStoreEntry,\n        true,\n        `(await store.get(key) instanceof KVStoreEntry)`,\n      );\n    });\n\n    routes.set('/kv-store/get/multiple-lookups-at-once', async () => {\n      let store = new KVStore(KV_STORE_NAME);\n      let key1 = `key-exists-${Math.random()}`;\n      await store.put(key1, '1hello1');\n      let key2 = `key-exists-${Math.random()}`;\n      await store.put(key2, '2hello2');\n      let key3 = `key-exists-${Math.random()}`;\n      await store.put(key3, '3hello3');\n      let key4 = `key-exists-${Math.random()}`;\n      await store.put(key4, '4hello4');\n      let key5 = `key-exists-${Math.random()}`;\n      await store.put(key5, '5hello5');\n      let results = await Promise.all([\n        store.get(key1),\n        store.get(key2),\n        store.get(key3),\n        store.get(key4),\n        store.get(key5),\n      ]);\n      strictEqual(\n        await results[0].text(),\n        '1hello1',\n        `await results[0].text()`,\n      );\n      strictEqual(\n        await results[1].text(),\n        '2hello2',\n        `await results[1].text()`,\n      );\n      strictEqual(\n        await results[2].text(),\n        '3hello3',\n        `await results[2].text()`,\n      );\n      strictEqual(\n        await results[3].text(),\n        '4hello4',\n        `await results[3].text()`,\n      );\n      strictEqual(\n        await results[4].text(),\n        '5hello5',\n        `await results[4].text()`,\n      );\n    });\n  }\n}\n\n// KVStoreEntry\n{\n  routes.set('/kv-store-entry/interface', async () => {\n    return kvStoreEntryInterfaceTests();\n  });\n  routes.set('/kv-store-entry/text/valid', async () => {\n    let store = new KVStore(KV_STORE_NAME);\n    let key = `entry-text-valid`;\n    await store.put(key, 'hello');\n    let entry = await store.get(key);\n    let result = entry.text();\n    strictEqual(\n      result instanceof Promise,\n      true,\n      `entry.text() instanceof Promise`,\n    );\n    result = await result;\n    strictEqual(result, 'hello', `await entry.text())`);\n  });\n  routes.set('/kv-store-entry/json/valid', async () => {\n    let store = new KVStore(KV_STORE_NAME);\n    let key = `entry-json-valid`;\n    const obj = { a: 1, b: 2, c: 3 };\n    await store.put(key, JSON.stringify(obj));\n    let entry = await store.get(key);\n    let result = entry.json();\n    strictEqual(\n      result instanceof Promise,\n      true,\n      `entry.json() instanceof Promise`,\n    );\n    result = await result;\n    deepStrictEqual(result, obj, `await entry.json())`);\n  });\n  routes.set('/kv-store-entry/json/invalid', async () => {\n    let store = new KVStore(KV_STORE_NAME);\n    let key = `entry-json-invalid`;\n    await store.put(key, \"132abc;['-=9\");\n    let entry = await store.get(key);\n    await assertRejects(\n      () => entry.json(),\n      SyntaxError,\n      `JSON.parse: unexpected non-whitespace character after JSON data at line 1 column 4 of the JSON data`,\n    );\n  });\n  routes.set('/kv-store-entry/arrayBuffer/valid', async () => {\n    let store = new KVStore(KV_STORE_NAME);\n    let key = `entry-arraybuffer-valid`;\n    await store.put(key, new Int8Array([0, 1, 2, 3]));\n    let entry = await store.get(key);\n    let result = entry.arrayBuffer();\n    strictEqual(\n      result instanceof Promise,\n      true,\n      `entry.arrayBuffer() instanceof Promise`,\n    );\n    result = await result;\n    strictEqual(\n      result instanceof ArrayBuffer,\n      true,\n      `(await entry.arrayBuffer()) instanceof ArrayBuffer`,\n    );\n  });\n  routes.set('/kv-store-options/gen', async () => {\n    let store = new KVStore(KV_STORE_NAME);\n    let key = `entry-options`;\n    await store.put(key, 'body op', {\n      gen: 2,\n    });\n    let entry = await store.get(key);\n    let result = entry.body;\n    strictEqual(\n      result instanceof ReadableStream,\n      true,\n      `entry.options instanceof ReadableStream`,\n    );\n    let text = await streamToString(result);\n    strictEqual(text, 'body op', `entry.body contents as string`);\n  });\n  routes.set('/kv-store-options/gen-invalid', async () => {\n    await assertRejects(\n      async () => {\n        const store = new KVStore(KV_STORE_NAME);\n        let key = `entry-options-gen-invalid`;\n        await store.put(key, 'body Nan', { gen: '2' });\n      },\n      TypeError,\n      `KVStore.insert: gen must be an integer`,\n    );\n  });\n  routes.set('/kv-store-entry/body', async () => {\n    let store = new KVStore(KV_STORE_NAME);\n    let key = `entry-body`;\n    await store.put(key, 'body body body');\n    let entry = await store.get(key);\n    let result = entry.body;\n    strictEqual(\n      result instanceof ReadableStream,\n      true,\n      `entry.body instanceof ReadableStream`,\n    );\n    let text = await streamToString(result);\n    strictEqual(text, 'body body body', `entry.body contents as string`);\n  });\n  routes.set('/kv-store-entry/bodyUsed', async () => {\n    let store = new KVStore(KV_STORE_NAME);\n    let key = `entry-bodyUsed`;\n    await store.put(key, 'body body body');\n    let entry = await store.get(key);\n    strictEqual(entry.bodyUsed, false, `entry.bodyUsed`);\n    await entry.text();\n    strictEqual(entry.bodyUsed, true, `entry.bodyUsed`);\n  });\n}\nasync function kvStoreEntryInterfaceTests() {\n  let actual = Reflect.ownKeys(KVStoreEntry);\n  let expected = ['prototype', 'length', 'name'];\n  deepStrictEqual(actual, expected, `Reflect.ownKeys(KVStoreEntry)`);\n\n  actual = Reflect.getOwnPropertyDescriptor(KVStoreEntry, 'prototype');\n  expected = {\n    value: KVStoreEntry.prototype,\n    writable: false,\n    enumerable: false,\n    configurable: false,\n  };\n  deepStrictEqual(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(KVStoreEntry, 'prototype')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(KVStoreEntry, 'length');\n  expected = {\n    value: 0,\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  deepStrictEqual(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(KVStoreEntry, 'length')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(KVStoreEntry, 'name');\n  expected = {\n    value: 'KVStoreEntry',\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  deepStrictEqual(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(KVStoreEntry, 'name')`,\n  );\n\n  actual = Reflect.ownKeys(KVStoreEntry.prototype);\n  expected = [\n    'constructor',\n    'body',\n    'bodyUsed',\n    'arrayBuffer',\n    'json',\n    'text',\n    'metadata',\n    'metadataText',\n  ];\n  deepStrictEqual(actual, expected, `Reflect.ownKeys(KVStoreEntry.prototype)`);\n\n  actual = Reflect.getOwnPropertyDescriptor(\n    KVStoreEntry.prototype,\n    'constructor',\n  );\n  expected = {\n    writable: true,\n    enumerable: false,\n    configurable: true,\n    value: KVStoreEntry.prototype.constructor,\n  };\n  deepStrictEqual(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(KVStoreEntry.prototype, 'constructor')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(KVStoreEntry.prototype, 'text');\n  expected = {\n    writable: true,\n    enumerable: true,\n    configurable: true,\n    value: KVStoreEntry.prototype.text,\n  };\n  deepStrictEqual(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(KVStoreEntry.prototype, 'text')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(KVStoreEntry.prototype, 'json');\n  expected = {\n    writable: true,\n    enumerable: true,\n    configurable: true,\n    value: KVStoreEntry.prototype.json,\n  };\n  deepStrictEqual(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(KVStoreEntry.prototype, 'json')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(\n    KVStoreEntry.prototype,\n    'arrayBuffer',\n  );\n  expected = {\n    writable: true,\n    enumerable: true,\n    configurable: true,\n    value: KVStoreEntry.prototype.arrayBuffer,\n  };\n  deepStrictEqual(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(KVStoreEntry.prototype, 'arrayBuffer')`,\n  );\n  actual = Reflect.getOwnPropertyDescriptor(KVStoreEntry.prototype, 'body');\n  strictEqual(\n    actual.enumerable,\n    true,\n    `Reflect.getOwnPropertyDescriptor(KVStoreEntry.prototype, 'body').enumerable`,\n  );\n  strictEqual(\n    actual.configurable,\n    true,\n    `Reflect.getOwnPropertyDescriptor(KVStoreEntry.prototype, 'body').configurable`,\n  );\n  strictEqual(\n    'set' in actual,\n    true,\n    `'set' in Reflect.getOwnPropertyDescriptor(KVStoreEntry.prototype, 'body')`,\n  );\n  strictEqual(\n    actual.set,\n    undefined,\n    `Reflect.getOwnPropertyDescriptor(KVStoreEntry.prototype, 'body').set`,\n  );\n  strictEqual(\n    typeof actual.get,\n    'function',\n    `typeof Reflect.getOwnPropertyDescriptor(KVStoreEntry.prototype, 'body').get`,\n  );\n  actual = Reflect.getOwnPropertyDescriptor(KVStoreEntry.prototype, 'bodyUsed');\n  strictEqual(\n    actual.enumerable,\n    true,\n    `Reflect.getOwnPropertyDescriptor(KVStoreEntry.prototype, 'bodyUsed').enumerable`,\n  );\n  strictEqual(\n    actual.configurable,\n    true,\n    `Reflect.getOwnPropertyDescriptor(KVStoreEntry.prototype, 'bodyUsed').configurable`,\n  );\n  strictEqual(\n    'set' in actual,\n    true,\n    `'set' in Reflect.getOwnPropertyDescriptor(KVStoreEntry.prototype, 'bodyUsed')`,\n  );\n  strictEqual(\n    actual.set,\n    undefined,\n    `Reflect.getOwnPropertyDescriptor(KVStoreEntry.prototype, 'bodyUsed').set`,\n  );\n  strictEqual(\n    typeof actual.get,\n    'function',\n    `typeof Reflect.getOwnPropertyDescriptor(KVStoreEntry.prototype, 'bodyUsed').get`,\n  );\n\n  strictEqual(\n    typeof KVStoreEntry.prototype.constructor,\n    'function',\n    `typeof KVStoreEntry.prototype.constructor`,\n  );\n  strictEqual(\n    typeof KVStoreEntry.prototype.text,\n    'function',\n    `typeof KVStoreEntry.prototype.text`,\n  );\n  strictEqual(\n    typeof KVStoreEntry.prototype.json,\n    'function',\n    `typeof KVStoreEntry.prototype.json`,\n  );\n  strictEqual(\n    typeof KVStoreEntry.prototype.arrayBuffer,\n    'function',\n    `typeof KVStoreEntry.prototype.arrayBuffer`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(\n    KVStoreEntry.prototype.constructor,\n    'length',\n  );\n  expected = {\n    value: 0,\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  deepStrictEqual(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(KVStoreEntry.prototype.constructor, 'length')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(\n    KVStoreEntry.prototype.constructor,\n    'name',\n  );\n  expected = {\n    value: 'KVStoreEntry',\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  deepStrictEqual(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(KVStoreEntry.prototype.constructor, 'name')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(\n    KVStoreEntry.prototype.text,\n    'length',\n  );\n  expected = {\n    value: 0,\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  deepStrictEqual(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(KVStoreEntry.prototype.text, 'length')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(\n    KVStoreEntry.prototype.text,\n    'name',\n  );\n  expected = {\n    value: 'text',\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  deepStrictEqual(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(KVStoreEntry.prototype.text, 'name')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(\n    KVStoreEntry.prototype.json,\n    'length',\n  );\n  expected = {\n    value: 0,\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  deepStrictEqual(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(KVStoreEntry.prototype.json, 'length')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(\n    KVStoreEntry.prototype.json,\n    'name',\n  );\n  expected = {\n    value: 'json',\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  deepStrictEqual(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(KVStoreEntry.prototype.json, 'name')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(\n    KVStoreEntry.prototype.arrayBuffer,\n    'length',\n  );\n  expected = {\n    value: 0,\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  deepStrictEqual(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(KVStoreEntry.prototype.arrayBuffer, 'length')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(\n    KVStoreEntry.prototype.arrayBuffer,\n    'name',\n  );\n  expected = {\n    value: 'arrayBuffer',\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  deepStrictEqual(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(KVStoreEntry.prototype.arrayBuffer, 'name')`,\n  );\n}\n\nasync function kvStoreInterfaceTests() {\n  let actual = Reflect.ownKeys(KVStore);\n  let expected = ['prototype', 'length', 'name'];\n  deepStrictEqual(actual, expected, `Reflect.ownKeys(KVStore)`);\n\n  actual = Reflect.getOwnPropertyDescriptor(KVStore, 'prototype');\n  expected = {\n    value: KVStore.prototype,\n    writable: false,\n    enumerable: false,\n    configurable: false,\n  };\n  deepStrictEqual(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(KVStore, 'prototype')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(KVStore, 'length');\n  expected = {\n    value: 1,\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  deepStrictEqual(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(KVStore, 'length')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(KVStore, 'name');\n  expected = {\n    value: 'KVStore',\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  deepStrictEqual(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(KVStore, 'name')`,\n  );\n\n  actual = Reflect.ownKeys(KVStore.prototype);\n  expected = ['constructor', 'delete', 'get', 'put', 'list'];\n  deepStrictEqual(actual, expected, `Reflect.ownKeys(KVStore.prototype)`);\n\n  actual = Reflect.getOwnPropertyDescriptor(KVStore.prototype, 'constructor');\n  expected = {\n    writable: true,\n    enumerable: false,\n    configurable: true,\n    value: KVStore.prototype.constructor,\n  };\n  deepStrictEqual(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(KVStore.prototype, 'constructor')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(KVStore.prototype, 'delete');\n  expected = {\n    writable: true,\n    enumerable: true,\n    configurable: true,\n    value: KVStore.prototype.delete,\n  };\n  deepStrictEqual(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(KVStore.prototype, 'delete')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(KVStore.prototype, 'get');\n  expected = {\n    writable: true,\n    enumerable: true,\n    configurable: true,\n    value: KVStore.prototype.get,\n  };\n  deepStrictEqual(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(KVStore.prototype, 'get')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(KVStore.prototype, 'put');\n  expected = {\n    writable: true,\n    enumerable: true,\n    configurable: true,\n    value: KVStore.prototype.put,\n  };\n  deepStrictEqual(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(KVStore.prototype, 'put')`,\n  );\n\n  strictEqual(\n    typeof KVStore.prototype.constructor,\n    'function',\n    `typeof KVStore.prototype.constructor`,\n  );\n  strictEqual(\n    typeof KVStore.prototype.delete,\n    'function',\n    `typeof KVStore.prototype.delete`,\n  );\n  strictEqual(\n    typeof KVStore.prototype.get,\n    'function',\n    `typeof KVStore.prototype.get`,\n  );\n  strictEqual(\n    typeof KVStore.prototype.put,\n    'function',\n    `typeof KVStore.prototype.put`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(\n    KVStore.prototype.constructor,\n    'length',\n  );\n  expected = {\n    value: 1,\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  deepStrictEqual(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(KVStore.prototype.constructor, 'length')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(\n    KVStore.prototype.constructor,\n    'name',\n  );\n  expected = {\n    value: 'KVStore',\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  deepStrictEqual(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(KVStore.prototype.constructor, 'name')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(KVStore.prototype.delete, 'length');\n  expected = {\n    value: 1,\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  deepStrictEqual(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(KVStore.prototype.delete, 'length')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(KVStore.prototype.delete, 'name');\n  expected = {\n    value: 'delete',\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  deepStrictEqual(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(KVStore.prototype.delete, 'name')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(KVStore.prototype.get, 'length');\n  expected = {\n    value: 1,\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  deepStrictEqual(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(KVStore.prototype.get, 'length')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(KVStore.prototype.get, 'name');\n  expected = {\n    value: 'get',\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  deepStrictEqual(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(KVStore.prototype.get, 'name')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(KVStore.prototype.put, 'length');\n  expected = {\n    value: 1,\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  deepStrictEqual(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(KVStore.prototype.put, 'length')`,\n  );\n\n  actual = Reflect.getOwnPropertyDescriptor(KVStore.prototype.put, 'name');\n  expected = {\n    value: 'put',\n    writable: false,\n    enumerable: false,\n    configurable: true,\n  };\n  deepStrictEqual(\n    actual,\n    expected,\n    `Reflect.getOwnPropertyDescriptor(KVStore.prototype.put, 'name')`,\n  );\n}\n\n// Test that HttpBody::read_all() correctly handles large list responses\n// (i.e. that it uses a growable buffer and doesn't overflow).\n// We populate the store with enough 1024-char keys that the list response JSON\n// would have exceeded the old 500000-byte fixed buffer.\nroutes.set('/kv-store/list/large-response', async () => {\n  const store = new KVStore(KV_STORE_NAME);\n  // 490 keys × ~1024-char names ≈ 507 KB of JSON\n  const prefix = 'large-list-' + 'a'.repeat(1009);\n  await Promise.all(\n    Array.from({ length: 490 }, (_, i) =>\n      store.put(prefix + String(i).padStart(4, '0'), 'x'),\n    ),\n  );\n  const result = await store.list({});\n  strictEqual(typeof result, 'object', 'list result is an object');\n  return new Response('ok');\n});\n\nfunction iteratableToStream(iterable) {\n  return new ReadableStream({\n    async pull(controller) {\n      for await (const value of iterable) {\n        controller.enqueue(value);\n      }\n      controller.close();\n    },\n  });\n}\n\n// TODO: Implement ReadableStream getIterator() and [@@asyncIterator]() methods\nasync function streamToString(stream) {\n  const decoder = new TextDecoder();\n  let string = '';\n  let reader = stream.getReader();\n  // eslint-disable-next-line no-constant-condition\n  while (true) {\n    const { done, value } = await reader.read();\n    if (done) {\n      return string;\n    }\n    string += decoder.decode(value);\n  }\n}\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/module-mode/src/routes.js",
    "content": "import { env } from 'fastly:env';\n\n/**\n * @type {Map<string, (FetchEvent) => Promise<Response>>}\n */\nexport const routes = new Map();\nroutes.set('/', () => {\n  routes.delete('/');\n  let test_routes = Array.from(routes.keys());\n  return new Response(JSON.stringify(test_routes), {\n    headers: { 'content-type': 'application/json' },\n  });\n});\n\nexport function isRunningLocally() {\n  return (\n    env('FASTLY_SERVICE_VERSION') === '' ||\n    env('FASTLY_SERVICE_VERSION') === '0'\n  );\n}\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/module-mode/src/transform-stream.js",
    "content": "import { routes } from './routes.js';\n\nfunction upperCase() {\n  const decoder = new TextDecoder();\n  const encoder = new TextEncoder();\n  return new TransformStream({\n    transform(chunk, controller) {\n      controller.enqueue(encoder.encode(decoder.decode(chunk).toUpperCase()));\n    },\n  });\n}\n\nroutes.set('/transform-stream/identity', () => {\n  return fetch('https://http-me.fastly.dev/test?body=hello').then(\n    (response) => {\n      return new Response(response.body.pipeThrough(new TransformStream()));\n    },\n  );\n});\n\nroutes.set('/transform-stream/uppercase', () => {\n  return fetch('https://http-me.fastly.dev/test?body=hello').then(\n    (response) => {\n      return new Response(response.body.pipeThrough(upperCase()));\n    },\n  );\n});\n\nroutes.set('/transform-stream/parallel-uppercase', () => {\n  return fetch('https://http-me.fastly.dev/test?body=hello').then(\n    (response) => {\n      return new Response(response.body.pipeThrough(upperCase()));\n    },\n  );\n});\n\n// This is not a test, but the nested stream we loop back to in testing\nroutes.set(\n  '/transform-stream/multi-stream-forwarding/nested',\n  async (event) => {\n    let encoder = new TextEncoder();\n    let body = new TransformStream({\n      start(controller) {},\n      transform(chunk, controller) {\n        controller.enqueue(encoder.encode(chunk));\n      },\n      flush(controller) {},\n    });\n    let writer = body.writable.getWriter();\n    event.respondWith(new Response(body.readable));\n    let word = new URL(event.request.url).searchParams.get('word');\n    console.log(`streaming word: ${word}`);\n    for (let letter of word) {\n      console.log(`Writing letter ${letter}`);\n      await writer.write(letter);\n    }\n    if (word.endsWith('.')) {\n      await writer.write('\\n');\n    }\n    await writer.close();\n\n    // tell the route handler not to call respondWith as we already did\n    return false;\n  },\n);\n\nroutes.set('/transform-stream/multi-stream-forwarding', async (event) => {\n  let fullBody = 'This sentence will be streamed in chunks.';\n  let responses = [];\n  for (let word of fullBody.split(' ').join('+ ').split(' ')) {\n    responses.push(\n      (await fetch(`${event.request.url}/nested?word=${word}`)).body,\n    );\n  }\n  return new Response(concatStreams(responses));\n});\n\nfunction concatStreams(streams) {\n  let { readable, writable } = new TransformStream();\n  async function iter() {\n    for (let stream of streams) {\n      try {\n        await stream.pipeTo(writable, { preventClose: true });\n      } catch (e) {\n        console.error(`error during pipeline execution: ${e}`);\n      }\n    }\n    console.log('closing writable');\n    await writable.close();\n  }\n  iter();\n  return readable;\n}\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/module-mode/tests.json",
    "content": "{\n  \"GET /acl\": { \"environments\": [\"compute\"] },\n  \"GET /backend/timeout\": {\n    \"environments\": [\"compute\"],\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"ok\"\n    }\n  },\n  \"GET /implicit-dynamic-backend/dynamic-backends-disabled\": {},\n  \"GET /implicit-dynamic-backend/dynamic-backends-enabled\": {},\n  \"GET /implicit-dynamic-backend/dynamic-backends-enabled-called-twice\": {},\n  \"GET /explicit-dynamic-backend/dynamic-backends-enabled-all-fields\": {},\n  \"GET /explicit-dynamic-backend/dynamic-backends-enabled-minimal-fields\": {},\n  \"GET /backend/interface\": {},\n  \"GET /backend/constructor/called-as-regular-function\": {},\n  \"GET /backend/constructor/empty-parameter\": {},\n  \"GET /backend/constructor/parameter-not-an-object\": {},\n  \"GET /backend/constructor/parameter-name-property-null\": {},\n  \"GET /backend/constructor/parameter-name-property-undefined\": {},\n  \"GET /backend/constructor/parameter-name-property-too-long\": {},\n  \"GET /backend/constructor/parameter-name-property-empty-string\": {},\n  \"GET /backend/constructor/parameter-name-property-calls-7.1.17-ToString\": {},\n  \"GET /backend/constructor/parameter-target-property-null\": {},\n  \"GET /backend/constructor/parameter-target-property-undefined\": {},\n  \"GET /backend/constructor/parameter-target-property-empty-string\": {},\n  \"GET /backend/constructor/parameter-target-property-calls-7.1.17-ToString\": {},\n  \"GET /backend/constructor/parameter-target-property-valid-host\": {},\n  \"GET /backend/constructor/parameter-target-property-invalid-host\": {},\n  \"GET /backend/constructor/parameter-ciphers-property-empty-string\": {},\n  \"GET /backend/constructor/parameter-ciphers-property-invalid-cipherlist-string\": {},\n  \"GET /backend/constructor/parameter-ciphers-property-valid-cipherlist-strings-supported-by-fastly\": {},\n  \"GET /backend/constructor/parameter-ciphers-property-valid-cipherlist-strings-but-not-supported-by-fastly\": {},\n  \"GET /backend/constructor/parameter-ciphers-property-calls-7.1.17-ToString\": {},\n  \"GET /backend/constructor/parameter-ciphers-property-and-operator\": {},\n  \"GET /backend/constructor/parameter-hostOverride-property-empty-string\": {},\n  \"GET /backend/constructor/parameter-hostOverride-property-calls-7.1.17-ToString\": {},\n  \"GET /backend/constructor/parameter-hostOverride-property-valid-string\": {},\n  \"GET /backend/constructor/parameter-connectTimeout-property-negative-number\": {},\n  \"GET /backend/constructor/parameter-connectTimeout-property-too-big\": {},\n  \"GET /backend/constructor/parameter-connectTimeout-property-calls-7.1.4-ToNumber\": {},\n  \"GET /backend/constructor/parameter-connectTimeout-property-valid-number\": {},\n  \"GET /backend/constructor/parameter-firstByteTimeout-property-negative-number\": {},\n  \"GET /backend/constructor/parameter-firstByteTimeout-property-too-big\": {},\n  \"GET /backend/constructor/parameter-firstByteTimeout-property-calls-7.1.4-ToNumber\": {},\n  \"GET /backend/constructor/parameter-firstByteTimeout-property-valid-number\": {},\n  \"GET /backend/constructor/parameter-firstByteTimeout-property-invalid-number\": {},\n  \"GET /backend/constructor/parameter-betweenBytesTimeout-property-negative-number\": {},\n  \"GET /backend/constructor/parameter-betweenBytesTimeout-property-too-big\": {},\n  \"GET /backend/constructor/parameter-betweenBytesTimeout-property-calls-7.1.4-ToNumber\": {},\n  \"GET /backend/constructor/parameter-betweenBytesTimeout-property-valid-number\": {},\n  \"GET /backend/constructor/parameter-useSSL-property-valid-boolean\": {},\n  \"GET /backend/constructor/parameter-dontPool-property-valid-boolean\": {},\n  \"GET /backend/constructor/parameter-tlsMinVersion-property-nan\": {},\n  \"GET /backend/constructor/parameter-tlsMinVersion-property-invalid-number\": {},\n  \"GET /backend/constructor/parameter-tlsMinVersion-property-calls-7.1.4-ToNumber\": {},\n  \"GET /backend/constructor/parameter-tlsMinVersion-property-valid-number\": {},\n  \"GET /backend/constructor/parameter-tlsMinVersion-greater-than-tlsMaxVersion\": {},\n  \"GET /backend/constructor/parameter-tlsMaxVersion-property-nan\": {},\n  \"GET /backend/constructor/parameter-tlsMaxVersion-property-invalid-number\": {},\n  \"GET /backend/constructor/parameter-tlsMaxVersion-property-calls-7.1.4-ToNumber\": {},\n  \"GET /backend/constructor/parameter-tlsMaxVersion-property-valid-number\": {},\n  \"GET /backend/constructor/parameter-certificateHostname-property-empty-string\": {},\n  \"GET /backend/constructor/parameter-certificateHostname-property-calls-7.1.17-ToString\": {},\n  \"GET /backend/constructor/parameter-certificateHostname-property-valid-string\": {},\n  \"GET /backend/constructor/parameter-caCertificate-property-empty-string\": {},\n  \"GET /backend/constructor/parameter-caCertificate-property-calls-7.1.17-ToString\": {},\n  \"GET /backend/constructor/parameter-caCertificate-property-valid-string\": {},\n  \"GET /backend/constructor/parameter-sniHostname-property-empty-string\": {},\n  \"GET /backend/constructor/parameter-sniHostname-property-calls-7.1.17-ToString\": {},\n  \"GET /backend/constructor/parameter-sniHostname-property-valid-string\": {},\n  \"GET /backend/constructor/parameter-clientCertificate-property-invalid\": {},\n  \"GET /backend/constructor/parameter-clientCertificate-certificate-property-missing\": {},\n  \"GET /backend/constructor/parameter-clientCertificate-certificate-property-invalid\": {},\n  \"GET /backend/constructor/parameter-clientCertificate-key-property-missing\": {},\n  \"GET /backend/constructor/parameter-clientCertificate-key-property-invalid\": {},\n  \"GET /backend/constructor/parameter-clientCertificate-key-property-fake\": {},\n  \"GET /backend/constructor/parameter-clientCertificate-valid\": {},\n  \"GET /backend/constructor/parameter-grpc-property-falsy\": {},\n  \"GET /backend/constructor/parameter-grpc-enabled\": {},\n  \"GET /backend/constructor/http-keepalive-invalid\": {},\n  \"GET /backend/constructor/http-keepalive\": {},\n  \"GET /backend/constructor/tcp-keepalive-invalid\": {},\n  \"GET /backend/constructor/tcp-keepalive\": {},\n  \"GET /backend/set-default-backend-configuration\": {},\n  \"GET /backend/health/called-as-constructor-function\": {},\n  \"GET /backend/health/empty-parameter\": {},\n  \"GET /backend/health/parameter-calls-7.1.17-ToString\": {},\n  \"GET /backend/health/parameter-invalid\": {},\n  \"GET /backend/health/happy-path-backend-exists\": {},\n  \"GET /backend/health/happy-path-backend-does-not-exist\": {},\n  \"GET /backend/port-ip-defined\": {},\n  \"GET /backend/port-ip-cached\": {},\n  \"GET /backend/props\": {},\n  \"GET /console\": {\n    \"environments\": [\"viceroy\"],\n    \"logs\": [\n      \"stdout :: Log: Happy birthday Aki and Yuki!\",\n      \"stdout :: Log: Map: Map(2) { { a: 1, b: { c: 2 } } => 2, [ function foo() {\\n    }] => {} }\",\n      \"stdout :: Log: Set: Set(3) { { a: 1, b: { c: 2 } }, 2, 3 }\",\n      \"stdout :: Log: Array: [1, 2, 3, [], 5]\",\n      \"stdout :: Log: Object: { a: 1, b: 2, c: 3, d: [ d() {\\n    }], f: [Getter], g: [ function bar() {\\n}], h: [ function from() {\\n[native code]\\n}] }\",\n      \"stdout :: Log: function: [ function() {\\n    }]\",\n      \"stdout :: Log: boolean: true\",\n      \"stdout :: Log: undefined: undefined\",\n      \"stdout :: Log: null: null\",\n      \"stdout :: Log: proxy: { a: 21 }\",\n      \"stdout :: Log: Infinity: Infinity\",\n      \"stdout :: Log: NaN: NaN\",\n      \"stdout :: Log: Symbol: Symbol(\\\"wow\\\")\",\n      \"stdout :: Log: Error: (new Error(\\\"uh oh\\\", \\\"<stdin>\\\", 7644))\",\n      \"stdout :: Log: Number: 1\",\n      \"stdout :: Log: Number: 1.111\",\n      \"stdout :: Log: BigInt: 10n\",\n      \"stdout :: Log: Date: new Date(1660816667120)\",\n      \"stdout :: Log: string: cake\",\n      \"stdout :: Log: RegExp: /magic/\",\n      \"stdout :: Log: Int8Array: Int8Array [1, 3, 4, 2, 5, 6, -97]\",\n      \"stdout :: Log: Uint8Array: Uint8Array [1, 3, 4, 2, 5, 6, 159]\",\n      \"stdout :: Log: Uint8ClampedArray: Uint8ClampedArray [1, 3, 4, 2, 5, 6, 255]\",\n      \"stdout :: Log: Int16Array: Int16Array [1, 3, 4, 2, 5, 6, -31073]\",\n      \"stdout :: Log: Uint16Array: Uint16Array [1, 3, 4, 2, 5, 6, 34463]\",\n      \"stdout :: Log: Int32Array: Int32Array [1, 3, 4, 2, 5, 6, 99999]\",\n      \"stdout :: Log: Uint32Array: Uint32Array [1, 3, 4, 2, 5, 6, 99999]\",\n      \"stdout :: Log: Float32Array: Float32Array [1, 3, 4, 2, 5, 6, 99999]\",\n      \"stdout :: Log: Float64Array: Float64Array [1, 3, 4, 2, 5, 6, 99999]\",\n      \"stdout :: Log: BigInt64Array: BigInt64Array [1n, 3n, 4n, 2n, 5n, 6n, 99999n]\",\n      \"stdout :: Log: BigUint64Array: BigUint64Array [1n, 3n, 4n, 2n, 5n, 6n, 99999n]\",\n      \"stdout :: Log: WeakMap: WeakMap { <items unknown> }\",\n      \"stdout :: Log: WeakSet: WeakSet { <items unknown> }\",\n      \"stdout :: Log: Promise: Promise { <pending> }\",\n      \"stdout :: Log: resolved promise: Promise { 9 }\",\n      \"stdout :: Log: rejected promise: Promise { <rejected> (new Error(\\\"oops\\\", \\\"<stdin>\\\", 7689)) }\",\n      \"stdout :: Log: Response: Response { redirected: false, type: \\\"default\\\", url: \\\"\\\", status: 200, ok: true, statusText: \\\"\\\", version: 2, headers: Headers {}, body: ReadableStream { locked: false }, bodyUsed: false }\",\n      \"stdout :: Log: Request: Request { method: \\\"POST\\\", url: \\\"https://www.fastly.com/\\\", version: 2, headers: Headers {}, backend: undefined, body: null, bodyUsed: false }\",\n      \"stdout :: Log: ReadableStream: ReadableStream { locked: false }\",\n      \"stdout :: Log: TransformStream: TransformStream { readable: ReadableStream { locked: false }, writable: WritableStream {} }\",\n      \"stdout :: Log: WritableStream: WritableStream {}\",\n      \"stdout :: Log: URL: URL { hash: \\\"\\\", host: \\\"www.test.com:123\\\", hostname: \\\"www.test.com\\\", href: \\\"https://www.test.com:123/asdf?some&params=val\\\", origin: \\\"https://www.test.com:123\\\", password: \\\"\\\", pathname: \\\"/asdf\\\", port: \\\"123\\\", protocol: \\\"https:\\\", search: \\\"?some&params=val\\\", searchParams: URLSearchParams {}, username: \\\"\\\" }\"\n    ]\n  },\n  \"GET /hello-world\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body\": \"hello world\"\n    }\n  },\n  \"GET /hono\": {\n    \"downstream_response\": {\n      \"status\": 200,\n      \"body_prefix\": \"{\\n  \\\"args\\\": \\\"\\\",\"\n    }\n  },\n  \"GET /http-cache/hook-errors\": {\n    \"environments\": [\"compute\"],\n    \"features\": [\"http-cache\"]\n  },\n  \"GET /http-cache/invalid-properties\": {\n    \"environments\": [\"compute\"],\n    \"features\": [\"http-cache\"]\n  },\n  \"GET /http-cache/readonly-properties\": {\n    \"environments\": [\"compute\"],\n    \"features\": [\"http-cache\"]\n  },\n  \"GET /http-cache/property-errors\": {\n    \"environments\": [\"compute\"],\n    \"features\": [\"http-cache\"]\n  },\n  \"GET /http-cache/candidate-response-properties-cached\": {\n    \"environments\": [\"compute\"],\n    \"features\": [\"http-cache\"]\n  },\n  \"GET /http-cache/candidate-response-properties-uncached\": {\n    \"environments\": [\"compute\"],\n    \"features\": [\"http-cache\"]\n  },\n  \"GET /http-cache/before-send-errors\": {\n    \"environments\": [\"compute\"],\n    \"features\": [\"http-cache\"]\n  },\n  \"GET /http-cache/before-send\": {\n    \"environments\": [\"compute\"],\n    \"features\": [\"http-cache\"]\n  },\n  \"GET /http-cache/after-send-no-cache\": {\n    \"environments\": [\"compute\"],\n    \"features\": [\"http-cache\"]\n  },\n  \"GET /http-cache/after-send-header-remove\": {\n    \"environments\": [\"compute\"],\n    \"features\": [\"http-cache\"],\n    \"downstream_response\": {\n      \"headers\": {\n        \"content-length\": true,\n        \"date\": true,\n        \"content-type\": true,\n        \"fastly_service_version\": true,\n        \"custom\": \"custom-header\",\n        \"x-cache\": true,\n        \"x-cache-hits\": true,\n        \"x-served-by\": true\n      },\n      \"headersExhaustive\": true\n    }\n  },\n  \"GET /http-cache/after-send-cache\": {\n    \"environments\": [\"compute\"],\n    \"features\": [\"http-cache\"]\n  },\n  \"GET /http-cache/after-send-cache-expire\": {\n    \"environments\": [\"compute\"],\n    \"features\": [\"http-cache\"]\n  },\n  \"GET /http-cache/after-send-pass\": {\n    \"environments\": [\"compute\"],\n    \"features\": [\"http-cache\"]\n  },\n  \"GET /http-cache/after-send-res-no-body\": {\n    \"environments\": [\"compute\"],\n    \"features\": [\"http-cache\"]\n  },\n  \"GET /http-cache/response-mutations\": {\n    \"environments\": [\"compute\"],\n    \"features\": [\"http-cache\"]\n  },\n  \"GET /http-cache/stale-responses\": {\n    \"environments\": [\"compute\"],\n    \"features\": [\"http-cache\"]\n  },\n  \"GET /http-cache/invalid-transform\": {\n    \"environments\": [\"compute\"],\n    \"features\": [\"http-cache\"]\n  },\n  \"GET /http-cache/body-transform\": {\n    \"environments\": [\"compute\"],\n    \"features\": [\"http-cache\"]\n  },\n  \"GET /http-cache/body-transform-delay\": {\n    \"environments\": [\"compute\"],\n    \"features\": [\"http-cache\"]\n  },\n  \"GET /http-cache/body-transform-error\": {\n    \"environments\": [\"compute\"],\n    \"features\": [\"http-cache\"]\n  },\n  \"GET /http-cache/body-transform-error-delay\": {\n    \"environments\": [\"compute\"],\n    \"features\": [\"http-cache\"]\n  },\n  \"GET /http-cache/body-transform-invalid-chunk\": {\n    \"environments\": [\"compute\"],\n    \"features\": [\"http-cache\"]\n  },\n  \"GET /http-cache/concurrent-transforms\": {\n    \"environments\": [\"compute\"],\n    \"features\": [\"http-cache\"]\n  },\n  \"GET /http-cache/sequential\": {\n    \"environments\": [\"compute\"],\n    \"features\": [\"http-cache\"]\n  },\n  \"GET /http-cache/sequential-three\": {\n    \"environments\": [\"compute\"],\n    \"features\": [\"http-cache\"]\n  },\n  \"GET /http-cache/sequential-request-collapsing-uncacheable\": {\n    \"environments\": [\"compute\"],\n    \"features\": [\"http-cache\"]\n  },\n  \"GET /http-cache/sequential-request-collapsing-vary\": {\n    \"skip\": true,\n    \"environments\": [\"compute\"],\n    \"features\": [\"http-cache\"]\n  },\n  \"GET /http-cache/parallel\": {\n    \"skip\": true,\n    \"environments\": [\"compute\"],\n    \"features\": [\"http-cache\"]\n  },\n  \"GET /http-cache/parallel-three\": {\n    \"skip\": true,\n    \"environments\": [\"compute\"],\n    \"features\": [\"http-cache\"]\n  },\n  \"GET /http-cache/parallel-request-collapsing-uncacheable\": {\n    \"skip\": true,\n    \"environments\": [\"compute\"],\n    \"features\": [\"http-cache\"]\n  },\n  \"GET /http-cache/parallel-request-collapsing-vary\": {\n    \"skip\": true,\n    \"environments\": [\"compute\"],\n    \"features\": [\"http-cache\"]\n  },\n  \"GET /http-cache/cache-key-on-request\": {\n    \"environments\": [\"compute\"],\n    \"features\": [\"http-cache\"]\n  },\n  \"GET /kv-store-e2e/list\": { \"flake\": true },\n  \"GET /kv-store/exposed-as-global\": {},\n  \"GET /kv-store/interface\": { \"flake\": true },\n  \"GET /kv-store/constructor/called-as-regular-function\": {},\n  \"GET /kv-store/constructor/parameter-calls-7.1.17-ToString\": {},\n  \"GET /kv-store/constructor/empty-parameter\": {},\n  \"GET /kv-store/constructor/found-store\": { \"flake\": true },\n  \"GET /kv-store/constructor/missing-store\": {},\n  \"GET /kv-store/constructor/invalid-name\": {},\n  \"GET /kv-store/put/called-as-constructor\": {},\n  \"GET /kv-store/put/called-unbound\": {},\n  \"GET /kv-store/put/key-parameter-calls-7.1.17-ToString\": { \"flake\": true },\n  \"GET /kv-store/put/key-parameter-not-supplied\": { \"flake\": true },\n  \"GET /kv-store/put/key-parameter-empty-string\": { \"flake\": true },\n  \"GET /kv-store/put/key-parameter-1024-character-string\": { \"flake\": true },\n  \"GET /kv-store/put/key-parameter-1025-character-string\": { \"flake\": true },\n  \"GET /kv-store/put/key-parameter-containing-newline\": { \"flake\": true },\n  \"GET /kv-store/put/key-parameter-containing-carriage-return\": {\n    \"flake\": true\n  },\n  \"GET /kv-store/put/key-parameter-starting-with-well-known-acme-challenge\": {\n    \"flake\": true\n  },\n  \"GET /kv-store/put/key-parameter-single-dot\": { \"flake\": true },\n  \"GET /kv-store/put/key-parameter-double-dot\": { \"flake\": true },\n  \"GET /kv-store/put/key-parameter-containing-special-characters\": {\n    \"flake\": true\n  },\n  \"GET /kv-store/put/value-parameter-as-undefined\": { \"flake\": true },\n  \"GET /kv-store/put/value-parameter-not-supplied\": { \"flake\": true },\n  \"GET /kv-store/put/value-parameter-readablestream-empty\": { \"flake\": true },\n  \"GET /kv-store/put/value-parameter-readablestream-under-30mb\": {\n    \"flake\": true\n  },\n  \"GET /kv-store/put/value-parameter-readablestream-over-30mb\": {\n    \"flake\": true\n  },\n  \"GET /kv-store/put/value-parameter-readablestream-locked\": { \"flake\": true },\n  \"GET /kv-store/put/value-parameter-URLSearchParams\": { \"flake\": true },\n  \"GET /kv-store/put/value-parameter-strings\": { \"flake\": true },\n  \"GET /kv-store/put/value-parameter-string-over-30mb\": { \"flake\": true },\n  \"GET /kv-store/put/value-parameter-calls-7.1.17-ToString\": { \"flake\": true },\n  \"GET /kv-store/put/value-parameter-buffer\": { \"flake\": true },\n  \"GET /kv-store/put/value-parameter-arraybuffer\": { \"flake\": true },\n  \"GET /kv-store/put/value-parameter-typed-arrays\": { \"flake\": true },\n  \"GET /kv-store/put/value-parameter-dataview\": { \"flake\": true },\n  \"POST /kv-store/put/request-body\": {\n    \"flake\": true,\n    \"environments\": [\"compute\"],\n    \"downstream_request\": {\n      \"method\": \"POST\",\n      \"pathname\": \"/kv-store/put/request-body\",\n      \"headers\": [\"Content-Type\", \"application/json\"],\n      \"body\": \"hello world!\"\n    }\n  },\n  \"GET /kv-store/debug-error\": { \"flake\": true },\n  \"GET /kv-store/delete/called-as-constructor\": { \"flake\": true },\n  \"GET /kv-store/delete/called-unbound\": { \"flake\": true },\n  \"GET /kv-store/delete/key-parameter-calls-7.1.17-ToString\": { \"flake\": true },\n  \"GET /kv-store/delete/key-parameter-not-supplied\": { \"flake\": true },\n  \"GET /kv-store/delete/key-parameter-empty-string\": { \"flake\": true },\n  \"GET /kv-store/delete/key-parameter-1024-character-string\": { \"flake\": true },\n  \"GET /kv-store/delete/key-parameter-1025-character-string\": { \"flake\": true },\n  \"GET /kv-store/delete/key-parameter-containing-newline\": { \"flake\": true },\n  \"GET /kv-store/delete/key-parameter-containing-carriage-return\": {\n    \"flake\": true\n  },\n  \"GET /kv-store/delete/key-parameter-starting-with-well-known-acme-challenge\": {\n    \"flake\": true\n  },\n  \"GET /kv-store/delete/key-parameter-single-dot\": { \"flake\": true },\n  \"GET /kv-store/delete/key-parameter-double-dot\": { \"flake\": true },\n  \"GET /kv-store/delete/key-parameter-containing-special-characters\": {\n    \"flake\": true\n  },\n  \"GET /kv-store/delete/key-does-not-exist-returns-undefined\": {\n    \"flake\": true\n  },\n  \"GET /kv-store/delete/key-exists\": { \"flake\": true },\n  \"GET /kv-store/delete/delete-key-twice\": { \"flake\": true },\n  \"GET /kv-store/delete/multiple-deletes-at-once\": { \"flake\": true },\n  \"GET /kv-store/get/called-as-constructor\": { \"flake\": true },\n  \"GET /kv-store/get/called-unbound\": { \"flake\": true },\n  \"GET /kv-store/get/key-parameter-calls-7.1.17-ToString\": { \"flake\": true },\n  \"GET /kv-store/get/key-parameter-not-supplied\": { \"flake\": true },\n  \"GET /kv-store/get/key-parameter-empty-string\": { \"flake\": true },\n  \"GET /kv-store/get/key-parameter-1024-character-string\": { \"flake\": true },\n  \"GET /kv-store/get/key-parameter-1025-character-string\": { \"flake\": true },\n  \"GET /kv-store/get/key-parameter-containing-newline\": { \"flake\": true },\n  \"GET /kv-store/get/key-parameter-containing-carriage-return\": {\n    \"flake\": true\n  },\n  \"GET /kv-store/get/key-parameter-starting-with-well-known-acme-challenge\": {\n    \"flake\": true\n  },\n  \"GET /kv-store/get/key-parameter-single-dot\": { \"flake\": true },\n  \"GET /kv-store/get/key-parameter-double-dot\": { \"flake\": true },\n  \"GET /kv-store/get/key-parameter-containing-special-characters\": {\n    \"flake\": true\n  },\n  \"GET /kv-store/get/key-does-not-exist-returns-null\": { \"flake\": true },\n  \"GET /kv-store/get/key-exists\": { \"flake\": true },\n  \"GET /kv-store/get/multiple-lookups-at-once\": { \"flake\": true },\n  \"GET /kv-store-entry/interface\": { \"flake\": true },\n  \"GET /kv-store-entry/text/valid\": { \"flake\": true },\n  \"GET /kv-store-entry/json/valid\": { \"flake\": true },\n  \"GET /kv-store-entry/json/invalid\": { \"flake\": true },\n  \"GET /kv-store-entry/arrayBuffer/valid\": { \"flake\": true },\n  \"GET /kv-store-options/gen\": {\n    \"skip\": true,\n    \"flake\": true\n  },\n  \"GET /kv-store-options/gen-invalid\": { \"flake\": true },\n  \"GET /kv-store-entry/body\": { \"flake\": true },\n  \"GET /kv-store-entry/bodyUsed\": { \"flake\": true },\n  \"GET /kv-store/list/large-response\": { \"flake\": true },\n  \"GET /transform-stream/identity\": {\n    \"downstream_response\": { \"body\": \"hello\" }\n  },\n  \"GET /transform-stream/uppercase\": {\n    \"downstream_response\": { \"body\": \"HELLO\" }\n  },\n  \"GET /transform-stream/multi-stream-forwarding\": {\n    \"environments\": [\"viceroy\"],\n    \"downstream_response\": {\n      \"body\": \"This sentence will be streamed in chunks.\"\n    }\n  }\n}\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/reusable-sandboxes/fastly.toml.in",
    "content": "# This file describes a Fastly Compute package. To learn more visit:\n# https://developer.fastly.com/reference/fastly-toml/\n\nauthors = [\"ulyssa.mello@fastly.com\"]\ndescription = \"\"\nlanguage = \"other\"\nmanifest_version = 2\nname = \"js-test-reusable-sandboxes\"\nservice_id = \"\"\n\n[scripts]\n  build = \"node ../../../../dist/cli/js-compute-runtime-cli.js --env FASTLY_DEBUG_LOGGING,ACL_NAME,CONFIG_STORE_NAME,DICTIONARY_NAME,KV_STORE_NAME,SECRET_STORE_NAME,LOCAL_TEST,TEST=\\\"foo\\\" --enable-experimental-high-resolution-time-methods src/index.js\"\n\n[local_server]\n\n  [local_server.backends]\n\n    [local_server.backends.TheOrigin]\n      url = \"https://compute-sdk-test-backend.edgecompute.app\"\n      override_host = \"compute-sdk-test-backend.edgecompute.app\"\n\n    [local_server.backends.TheOrigin2]\n      url = \"https://compute-sdk-test-backend.edgecompute.app\"\n      override_host = \"compute-sdk-test-backend.edgecompute.app\"\n\n    [local_server.backends.httpme]\n      url = \"https://http-me.fastly.dev\"\n      override_host = \"http-me.fastly.dev\"\n\n  [local_server.config_stores]\n    [local_server.config_stores.CONFIG_STORE_NAME]\n      format = \"inline-toml\"\n    [local_server.config_stores.CONFIG_STORE_NAME.contents]\n      \"twitter\" = \"https://twitter.com/fastly\"\n\n    [local_server.config_stores.\"DICTIONARY_NAME\"]\n      format = \"inline-toml\"\n    [local_server.config_stores.\"DICTIONARY_NAME\".contents]\n      \"twitter\" = \"https://twitter.com/fastly\"\n\n  [local_server.geolocation]\n  format = \"inline-toml\"\n\n  [local_server.geolocation.addresses]\n    [local_server.geolocation.addresses.\"2.216.196.179\"]\n      as_name = \"sky uk limited\"\n      as_number = 5607\n      area_code = 0\n      city = \"bircotes\"\n      conn_speed = \"broadband\"\n      conn_type = \"wifi\"\n      continent = \"EU\"\n      country_code = \"GB\"\n      country_code3 = \"GBR\"\n      country_name = \"united kingdom\"\n      gmt_offset = 0\n      latitude = 53.42\n      longitude = -1.05\n      metro_code = 826039\n      postal_code = \"dn11 8af\"\n      proxy_description = \"?\"\n      proxy_type = \"?\"\n      region = \"NTT\"\n      utc_offset = 0\n    [local_server.geolocation.addresses.\"2607:f0d0:1002:51::4\"]\n      as_name = \"softlayer technologies inc.\"\n      as_number = 36351\n      area_code = 214\n      city = \"dallas\"\n      conn_speed = \"broadband\"\n      conn_type = \"wired\"\n      continent = \"NA\"\n      country_code = \"US\"\n      country_code3 = \"USA\"\n      country_name = \"united states\"\n      gmt_offset = -600\n      latitude = 32.94\n      longitude = -96.84\n      metro_code = 623\n      postal_code = \"75244\"\n      proxy_description = \"?\"\n      proxy_type = \"hosting\"\n      region = \"TX\"\n      utc_offset = -600\n\n[setup]\n  [setup.backends]\n    [setup.backends.httpme]\n      address = \"http-me.fastly.dev\"\n      port = 443\n\n    [setup.backends.TheOrigin]\n      address = \"compute-sdk-test-backend.edgecompute.app\"\n      port = 443\n    [setup.backends.TheOrigin2]\n      address = \"compute-sdk-test-backend.edgecompute.app\"\n      port = 443\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/reusable-sandboxes/src/assertions.js",
    "content": "export function strictEqual(actual, expected, message) {\n  if (actual !== expected) {\n    throw new Error(\n      `Expected \\`${JSON.stringify(actual)}\\` to equal \\`${JSON.stringify(expected)}\\`${message ? '\\n' + message : ''}`,\n    );\n  }\n}\n\nexport function assert(truthy, maybeMessage) {\n  if (!truthy) {\n    throw new Error(`Assertion failed: ${maybeMessage}`);\n  }\n}\n\nexport { assert as ok };\n\nexport async function assertResolves(func) {\n  try {\n    await func();\n  } catch (error) {\n    throw new Error(\n      `Expected \\`${func.toString()}\\` to resolve - Found it rejected: ${error.name}: ${error.message}`,\n    );\n  }\n}\n\nexport async function assertRejects(func, errorClass, errorMessage) {\n  try {\n    await func();\n  } catch (error) {\n    if (errorClass) {\n      if (error instanceof errorClass === false) {\n        throw new Error(\n          `Expected \\`${func.toString()}\\` to reject instance of \\`${errorClass.name}\\` - Found instance of \\`${error.name}\\``,\n        );\n      }\n    }\n\n    if (errorMessage) {\n      if (error.message !== errorMessage) {\n        throw new Error(\n          `Expected \\`${func.toString()}\\` to reject error message of \\`${errorMessage}\\` - Found \\`${error.message}\\``,\n        );\n      }\n    }\n\n    return;\n  }\n  throw new Error(\n    `Expected \\`${func.toString()}\\` to reject - Found it did not reject`,\n  );\n}\n\nexport function assertThrows(func, errorClass, errorMessage) {\n  try {\n    func();\n  } catch (error) {\n    if (errorClass) {\n      if (error instanceof errorClass === false) {\n        throw new Error(\n          `Expected \\`${func.toString()}\\` to throw instance of \\`${errorClass.name}\\` - Found instance of \\`${error.name}\\`: ${error.message}\\n${error.stack}`,\n        );\n      }\n    }\n\n    if (errorMessage) {\n      if (error.message !== errorMessage) {\n        throw new Error(\n          `Expected \\`${func.toString()}\\` to throw error message of \\`${errorMessage}\\` - Found \\`${error.message}\\``,\n        );\n      }\n    }\n\n    return;\n  }\n  throw new Error(\n    `Expected \\`${func.toString()}\\` to throw - Found it did not throw`,\n  );\n}\n\nexport function assertDoesNotThrow(func) {\n  try {\n    func();\n  } catch (error) {\n    throw new Error(\n      `Expected \\`${func.toString()}\\` to not throw - Found it did throw: ${error.name}: ${error.message}`,\n    );\n  }\n}\n\nexport function deepStrictEqual(a, b) {\n  if (!deepEqual(a, b)) {\n    throw new Error(\n      `Expected ${a} to equal ${b}, got ${JSON.stringify(a, null, 2)}`,\n    );\n  }\n}\n\nexport function deepEqual(a, b) {\n  var aKeys;\n  var bKeys;\n  var typeA;\n  var typeB;\n  var key;\n  var i;\n\n  typeA = typeof a;\n  typeB = typeof b;\n  if (a === null || typeA !== 'object') {\n    if (b === null || typeB !== 'object') {\n      return a === b;\n    }\n    return false;\n  }\n\n  // Case: `a` is of type 'object'\n  if (b === null || typeB !== 'object') {\n    return false;\n  }\n  if (Array.isArray(a) && Array.isArray(b)) {\n    if (a.length !== b.length) return false;\n    for (let i = 0; i < a.length; i++) {\n      if (!deepEqual(a[i], b[i])) {\n        return false;\n      }\n    }\n    return true;\n  }\n  if (Object.getPrototypeOf(a) !== Object.getPrototypeOf(b)) {\n    return false;\n  }\n  if (a instanceof Date) {\n    return a.getTime() === b.getTime();\n  }\n  if (a instanceof RegExp) {\n    return a.source === b.source && a.flags === b.flags;\n  }\n  if (a instanceof Error) {\n    if (a.message !== b.message || a.name !== b.name) {\n      return false;\n    }\n  }\n\n  aKeys = Object.keys(a);\n  bKeys = Object.keys(b);\n  if (aKeys.length !== bKeys.length) {\n    return false;\n  }\n  aKeys.sort();\n  bKeys.sort();\n\n  // Cheap key test:\n  for (i = 0; i < aKeys.length; i++) {\n    if (aKeys[i] !== bKeys[i]) {\n      return false;\n    }\n  }\n  // Possibly expensive deep equality test for each corresponding key:\n  for (i = 0; i < aKeys.length; i++) {\n    key = aKeys[i];\n    if (!deepEqual(a[key], b[key])) {\n      return false;\n    }\n  }\n  return typeA === typeB;\n}\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/reusable-sandboxes/src/index.js",
    "content": "/// <reference path=\"../../../../../types/index.d.ts\" />\n/* eslint-env serviceworker */\n\nimport { assert, assertThrows, strictEqual } from './assertions.js';\nimport { isRunningLocally, routes } from './routes.js';\nimport { env } from 'fastly:env';\nimport { enableDebugLogging } from 'fastly:experimental';\nimport { setReusableSandboxOptions } from 'fastly:experimental';\n\nsetReusableSandboxOptions({ maxRequests: 9001 });\n\nimport './interleave.js';\n\naddEventListener('fetch', (event) => {\n  // Ensure these reusable sandboxes tests are running locally so that\n  // we don't flake due to requests landing on different cache nodes:\n  assert(isRunningLocally());\n\n  const responsePromise = app(event);\n  if (responsePromise) event.respondWith(responsePromise);\n});\n\nif (env('FASTLY_DEBUG_LOGGING') === '1') {\n  if (fastly.debugMessages) {\n    const { debug: consoleDebug } = console;\n    console.debug = function debug(...args) {\n      fastly.debugLog(...args);\n      consoleDebug(...args);\n    };\n  }\n  enableDebugLogging(true);\n}\n\n/**\n * @param {FetchEvent} event\n * @returns {Response}\n */\nasync function app(event) {\n  const FASTLY_SERVICE_VERSION = env('FASTLY_SERVICE_VERSION') || 'local';\n  const FASTLY_TRACE_ID = env('FASTLY_TRACE_ID');\n  console.log(`FASTLY_SERVICE_VERSION: ${FASTLY_SERVICE_VERSION}`);\n  const path = new URL(event.request.url).pathname;\n  console.log(`path: ${path}`);\n  let res;\n  try {\n    const routeHandler = routes.get(path);\n    if (routeHandler) {\n      res = await routeHandler(event);\n      if (res !== null) {\n        res = res || new Response('ok');\n      }\n    } else {\n      return (res = new Response(`${path} endpoint does not exist`, {\n        status: 500,\n      }));\n    }\n  } catch (error) {\n    if (error instanceof Response) {\n      res = error;\n    } else {\n      try {\n        return (res = new Response(\n          `The routeHandler for ${path} threw a [${error.constructor?.name ?? error.name}] error: ${error.message || error}` +\n            '\\n' +\n            error.stack +\n            (fastly.debugMessages\n              ? '\\n[DEBUG BUILD MESSAGES]:\\n\\n  - ' +\n                fastly.debugMessages.join('\\n  - ')\n              : ''),\n          { status: 500 },\n        ));\n      } catch (errRes) {\n        res = errRes;\n      }\n    }\n  } finally {\n    res.headers.set('fastly_service_version', FASTLY_SERVICE_VERSION);\n    res.headers.set('sandbox-id', FASTLY_TRACE_ID);\n  }\n\n  return res;\n}\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/reusable-sandboxes/src/interleave.js",
    "content": "/* eslint-env serviceworker */\n/* global fastly */\n\n// This module contains routes that allow us to verify the behaviour\n// of interleaving different types of downstream responses, such as\n// WebSocket redirects mixed with normal HTTP responses, mixed with\n// streaming responses to backend requests.\n\nimport { assert } from './assertions.js';\nimport { CacheOverride } from 'fastly:cache-override';\nimport { getGeolocationForIpAddress } from 'fastly:geolocation';\nimport { createFanoutHandoff } from 'fastly:fanout';\nimport { routes } from './routes.js';\n\nfunction timeout(ms) {\n  return new Promise((resolve) => setTimeout(resolve, ms));\n}\n\n// Handler for generating the websocket redirect hostcall:\nroutes.set('/createFanoutHandoff', (event) => {\n  return createFanoutHandoff(event.request, 'TheOrigin');\n});\n\n// Handler for generating  a backend request to http-me.fastly.dev:\nroutes.set('/httpMeRequest', async (event) => {\n  const req = new Request(\n    'https://http-me.fastly.dev/status=200&header=FooName:FooValue',\n    {\n      method: 'GET',\n      headers: event.request.headers,\n    },\n  );\n\n  const resp = await fetch(req, {\n    backend: 'httpme',\n    cacheOverride: new CacheOverride('pass'),\n  });\n\n  return resp;\n});\n\nroutes.set('/getGeolocationForIpAddress', async (event) => {\n  let ip = event.request.headers.get('x-forwarded-for');\n  assert(ip !== undefined, 'request has x-forwarded-for header');\n\n  // Sleep to ensure other items on the event loop get a chance to run:\n  await timeout(1000);\n\n  let geo = getGeolocationForIpAddress(ip);\n  assert(geo !== null, `resolved ${ip} to geo information`);\n\n  return new Response('found', {\n    status: 200,\n    headers: new Headers({\n      'geo-as-name': geo.as_name,\n      'geo-as-number': geo.as_number,\n      'geo-city': geo.city,\n    }),\n  });\n});\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/reusable-sandboxes/src/routes.js",
    "content": "import { env } from 'fastly:env';\n\n/**\n * @type {Map<string, (FetchEvent) => Promise<Response>>}\n */\nexport const routes = new Map();\nroutes.set('/', () => {\n  routes.delete('/');\n  let test_routes = Array.from(routes.keys());\n  return new Response(JSON.stringify(test_routes), {\n    headers: { 'content-type': 'application/json' },\n  });\n});\n\nexport function isRunningLocally() {\n  return (\n    env('FASTLY_SERVICE_VERSION') === '' ||\n    env('FASTLY_SERVICE_VERSION') === '0'\n  );\n}\n"
  },
  {
    "path": "integration-tests/js-compute/fixtures/reusable-sandboxes/tests.json",
    "content": "{\n  \"session #1, request #1: GET /getGeolocationForIpAddress\": {\n    \"environments\": [\"viceroy\"],\n    \"downstream_request\": {\n      \"method\": \"GET\",\n      \"pathname\": \"/getGeolocationForIpAddress\",\n      \"headers\": [\"x-forwarded-for\", \"2.216.196.179\"]\n    },\n    \"downstream_response\": {\n      \"status\": 200,\n      \"headers\": {\n        \"sandbox-id\": \"00000000000000000000000000000000\",\n        \"geo-as-name\": \"sky uk limited\",\n        \"geo-as-number\": \"5607\",\n        \"geo-city\": \"bircotes\"\n      },\n      \"body\": \"found\"\n    }\n  },\n  \"session #1, request #2: GET /createFanoutHandoff\": {\n    \"environments\": [\"viceroy\"],\n    \"downstream_request\": {\n      \"method\": \"GET\",\n      \"pathname\": \"/createFanoutHandoff\"\n    },\n    \"downstream_response\": {\n      \"status\": 500,\n      \"body\": \"Error: Could not connect to Pushpin\"\n    }\n  },\n  \"session #1, request #3: GET /getGeolocationForIpAddress\": {\n    \"environments\": [\"viceroy\"],\n    \"downstream_request\": {\n      \"method\": \"GET\",\n      \"pathname\": \"/getGeolocationForIpAddress\",\n      \"headers\": [\"x-forwarded-for\", \"2607:f0d0:1002:51::4\"]\n    },\n    \"downstream_response\": {\n      \"status\": 200,\n      \"headers\": {\n        \"sandbox-id\": \"00000000000000000000000000000000\",\n        \"geo-as-name\": \"softlayer technologies inc.\",\n        \"geo-as-number\": \"36351\",\n        \"geo-city\": \"dallas\"\n      },\n      \"body\": \"found\"\n    }\n  },\n  \"session #1, request #4: GET /httpMeRequest\": {\n    \"environments\": [\"viceroy\"],\n    \"downstream_request\": {\n      \"method\": \"GET\",\n      \"pathname\": \"/httpMeRequest\",\n      \"headers\": {\n        \"HM-Status\": \"200\",\n        \"HM-Header\": \"FooName:FooValue\",\n        \"HM-Append-Header\": \"BarName:BarValue\",\n        \"HM-Wait\": \"1000\"\n      }\n    },\n    \"downstream_response\": {\n      \"status\": 200,\n      \"headers\": {\n        \"sandbox-id\": \"00000000000000000000000000000000\",\n        \"FooName\": \"FooValue\",\n        \"BarName\": \"BarValue\"\n      }\n    }\n  },\n  \"session #1, request #5: GET /createFanoutHandoff\": {\n    \"environments\": [\"viceroy\"],\n    \"downstream_request\": {\n      \"method\": \"GET\",\n      \"pathname\": \"/createFanoutHandoff\"\n    },\n    \"downstream_response\": {\n      \"status\": 500,\n      \"body\": \"Error: Could not connect to Pushpin\"\n    }\n  },\n\n  \"session #2, request #1: GET /httpMeRequest\": {\n    \"environments\": [\"viceroy\"],\n    \"downstream_request\": {\n      \"method\": \"GET\",\n      \"pathname\": \"/httpMeRequest\",\n      \"headers\": {\n        \"HM-Status\": \"200\",\n        \"HM-Header\": \"BazName:BazValue\",\n        \"HM-Append-Header\": \"QuuxName:QuuxValue\",\n        \"HM-Wait\": \"1000\"\n      }\n    },\n    \"downstream_response\": {\n      \"status\": 200,\n      \"headers\": {\n        \"sandbox-id\": \"00000000000000000000000000000006\",\n        \"BazName\": \"BazValue\",\n        \"QuuxName\": \"QuuxValue\"\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "integration-tests/js-compute/package.json",
    "content": "{\n  \"scripts\": {\n    \"install:ci\": \"npm ci\",\n    \"lint\": \"npx prettier --write ./fixtures/**/*.js\"\n  },\n  \"devDependencies\": {\n    \"eslint\": \"^10\",\n    \"prettier\": \"^3\"\n  },\n  \"dependencies\": {\n    \"@actions/core\": \"^3\",\n    \"@iarna/toml\": \"^2\",\n    \"fast-check\": \"^4\",\n    \"undici\": \"^8\",\n    \"zx\": \"^8\"\n  },\n  \"type\": \"module\"\n}\n"
  },
  {
    "path": "integration-tests/js-compute/readme.md",
    "content": "# Writing Integration Tests for JS-Compute-Runtime\n\n- Create a folder within [fixtures](./fixtures) which will contain the test Fastly Compute application\n- Create a javascript or typescript file within the folder with the same name as the folder, this file should contain the test Fastly Compute application.\n- Create a fastly.toml.in file which contains any backends that the application requires. This file should adhere to the format defined at <https://developer.fastly.com/reference/fastly-toml/>\n- Create a tests.json file which following the format defined below.\n\n## Fields in tests.json\n\ntests.json is a file containing a JSON Object which contains all the test requests and assertions for the Fastly Compute application being tested.\n\nThe keys in the root object are used as the name of the tests.\n\n### environments\n\nAn array of strings which states in what environments the test should run.\nValid strings which can be in the array are:\n\n- 'viceroy' - This states that the test should run in the Viceroy environment.\n- 'compute' - This states that the test should run in the Fastly Compute environment.\n\n### downstream_request\n\nAn Object which determines how the request to the test application should be configured.\nThe Object can contain the four properties:\n\n- method\n- pathname\n- body\n- headers\n\n#### method\n\nA string which is the name of the method that the request should use.\nE.G. `\"GET\"` will make the request be a GET request.\n\n#### pathname\n\nA string which is the path and querystring that the request should use.\nE.G. `\"/\"` will make the request go to `\"/\"` and `\"/?colour=blue\"` will make the request go to `\"/?colour=blue\"`.\n\n#### body\n\nA string which would be used as the request's body.\n\n#### headers\n\nAn object which contains string keys and values that would each be used as a request header.\nE.G. `{\"a\": \"1\", \"b\": \"2\" }` will set two headers on the request, a header named `a` with the value `1` and a header named `b` with the value `2`.\n\n### local_upstream_requests\n\nAn Array of Objects which are used to assert against requests that the test application may have made during it's execution.\nThe Objects can contain the five properties:\n\n- method\n- pathname\n- body\n- headers\n- timing\n\n#### method\n\nA string which is the name of the method to assert that the test application request has used during it's execution.\nE.G. `\"GET\"` will assert that the upstream request was a GET request.\n\n#### pathname\n\nA string which is the path and querystring to assert that the test application request has used during it's execution.\nE.G. `\"/?colour=blue\"` will assert that the upstream request was made to `\"/?colour=blue\"`.\n\n#### body\n\nA string which is the body to assert that the upstream request has used during it's execution.\n\n#### headers\n\nAn object which contains string keys and values that would each be used as an assertion that the test application request has each header set during it's execution.\nE.G. `{\"a\": \"1\", \"b\": \"2\" }` will assert that the upstream Request only has the headers named `a` with the value `1` and a header named `b` with the value `2`.\n\n#### timing\n\nA string set to `\"afterDownstreamrequest\"` to assert that the test application request happened after the downstream request.\nIf ommited, then no asserton will be made on when the upstream request happened.\n\n### downstream_response\n\nAn Object which is used to assert against the response that the test application responded with.\nThe Object can contain the three properties:\n\n- status\n- body\n- headers\n\n#### status\n\nA number which is the status to assert that the test application response has used.\nE.G. `204` will assert that the response had a status set to 204.\n\n#### body\n\nA string or array which is the body to assert that the upstream request has used during it's execution.\nIf a string then the assertion is done on the entire response body.\nIf an array then assertions are done on each individual chunk received from response as a stream.\n\n#### headers\n\nAn array which contains arrays, where each array contains two strings, the first is the header name and the second is the header value.\nE.G. `{\"a\": \"1\", \"b\": \"2\" }` will assert that the response only has the headers named `a` with the value `1` and a header named `b` with the value `2`.\n\n### logs\n\nAn array which contains strings used to assert against any logs emitted by the test application during it's execution.\nE.G. `[\"ComputeLog :: Hello!\"]` will assert that the application emitted a log-line containing only the string `\"ComputeLog :: Hello!\"`.\n\n## Example tests.json file\n\n```json\n{\n  \"test for GET /example\": {\n    \"environments\": [\"viceroy\", \"compute\"],\n    \"downstream_request\": {\n      \"method\": \"GET\",\n      \"pathname\": \"/example\",\n      \"headers\": [\"food\", \"carrot\"]\n    },\n    \"downstream_response\": {\n      \"status\": 200,\n      \"headers\": [\n        [\"carrot\", \"yes\"],\n        [\"potato\", \"no\"]\n      ],\n      \"body\": \"response from /example\"\n    },\n    \"local_upstream_requests\": [\n      {\n        \"method\": \"POST\",\n        \"pathname\": \"/upstream-after-downstream\",\n        \"headers\": [[\"test-header\", \"test-header-value\"]],\n        \"body\": \"pow wow\",\n        \"timing\": \"afterDownstreamrequest\"\n      },\n      {\n        \"method\": \"GET\",\n        \"pathname\": \"/upstream\"\n      }\n    ]\n  }\n}\n```\n"
  },
  {
    "path": "integration-tests/js-compute/replace-host.sh",
    "content": "#!/usr/bin/env bash\n\nset -euo pipefail\n\nif [ \"$#\" -lt 2 ]; then\n  cat <<EOF\nUsage: $0 <test-fixture> <override_host_and_protocol>\n\nReplace the host and protocol part of each backend's url with another one. This\nwill only replace instances of \"JS_COMPUTE_TEST_BACKEND\", as other urls might be\nmeaningful for an individual test.\nEOF\n  exit 1\nfi\n\nfixtures_dir=\"$(dirname \"${BASH_SOURCE[0]}\")/fixtures\"\n\nfastly_toml=\"$fixtures_dir/$1/fastly.toml\"\nfastly_toml_in=\"$fixtures_dir/$1/fastly.toml.in\"\noverride_host=\"$2\"\n\nsed -e \"s|JS_COMPUTE_TEST_BACKEND|$override_host|\" \"$fastly_toml_in\" > \"$fastly_toml\"\n"
  },
  {
    "path": "integration-tests/js-compute/setup.js",
    "content": "#!/usr/bin/env node\n\nimport { $ as zx } from 'zx';\nimport { argv } from 'node:process';\nimport { getEnv } from './env.js';\n\nimport { $ } from './util.js';\n\nconst serviceId = argv[2];\nconst serviceName = argv[3];\n\nconst env = getEnv(serviceName);\nObject.assign(process.env, env);\n\nconst {\n  DICTIONARY_NAME,\n  CONFIG_STORE_NAME,\n  KV_STORE_NAME,\n  SECRET_STORE_NAME,\n  ACL_NAME,\n} = env;\n\nfunction existingListId(stores, existingName) {\n  const existing = stores.find(\n    ({ Name, name }) => name === existingName || Name === existingName,\n  );\n  return existing?.id || existing?.StoreID;\n}\n\nif (process.env.FASTLY_API_TOKEN === undefined) {\n  zx.verbose = false;\n  try {\n    process.env.FASTLY_API_TOKEN = String(\n      await $`fastly profile token --quiet`,\n    ).trim();\n  } catch {\n    console.error(\n      'No environment variable named FASTLY_API_TOKEN has been set and no default fastly profile exists.',\n    );\n    console.error(\n      'In order to run the tests, either create a fastly profile using `fastly profile create` or export a fastly token under the name FASTLY_API_TOKEN',\n    );\n    process.exit(1);\n  }\n  zx.verbose = true;\n}\n\nasync function setupConfigStores() {\n  const stores = JSON.parse(\n    await $`fastly config-store list --quiet --json --token $FASTLY_API_TOKEN`,\n  );\n\n  let STORE_ID = existingListId(stores, DICTIONARY_NAME);\n  if (!STORE_ID) {\n    console.log(`Creating new config store ${DICTIONARY_NAME}`);\n    STORE_ID = JSON.parse(\n      await $`fastly config-store create --quiet --name=\"$DICTIONARY_NAME\" --json --token $FASTLY_API_TOKEN`,\n    ).id;\n  } else {\n    console.log(`Using existing config store ${DICTIONARY_NAME}`);\n  }\n  await $`echo -n 'https://twitter.com/fastly' | fastly config-store-entry update --upsert --key twitter --store-id=${STORE_ID} --stdin --token $FASTLY_API_TOKEN`;\n  try {\n    await $`fastly service resource-link create --service-id ${serviceId} --version latest --resource-id ${STORE_ID} --token $FASTLY_API_TOKEN --autoclone`;\n  } catch (e) {\n    if (!e.message.includes('Duplicate record')) throw e;\n  }\n\n  STORE_ID = existingListId(stores, CONFIG_STORE_NAME);\n  if (!STORE_ID) {\n    console.log(`Creating new config store ${CONFIG_STORE_NAME}`);\n    STORE_ID = JSON.parse(\n      await $`fastly config-store create --quiet --name=\"$CONFIG_STORE_NAME\" --json --token $FASTLY_API_TOKEN`,\n    ).id;\n  } else {\n    console.log(`Using existing config store ${CONFIG_STORE_NAME}`);\n  }\n  await $`echo -n 'https://twitter.com/fastly' | fastly config-store-entry update --upsert --key twitter --store-id=${STORE_ID} --stdin --token $FASTLY_API_TOKEN`;\n  try {\n    await $`fastly service resource-link create --service-id ${serviceId} --version latest --resource-id ${STORE_ID} --token $FASTLY_API_TOKEN --autoclone`;\n  } catch (e) {\n    if (!e.message.includes('Duplicate record')) throw e;\n  }\n}\n\nasync function setupKVStore() {\n  let stores = JSON.parse(\n    await $`fastly kv-store list --quiet --json --token $FASTLY_API_TOKEN`,\n  ).Data;\n\n  let STORE_ID = existingListId(stores, KV_STORE_NAME);\n  if (!STORE_ID) {\n    console.log(`Creating new KV store ${KV_STORE_NAME}`);\n    STORE_ID = JSON.parse(\n      await $`fastly kv-store create --quiet --name=\"$KV_STORE_NAME\" --json --token $FASTLY_API_TOKEN`,\n    ).StoreID;\n  } else {\n    console.log(`Using existing KV store ${KV_STORE_NAME}`);\n  }\n  try {\n    await $`fastly service resource-link create --service-id ${serviceId} --version latest --resource-id ${STORE_ID} --token $FASTLY_API_TOKEN --autoclone`;\n  } catch (e) {\n    if (!e.message.includes('Duplicate record')) throw e;\n  }\n}\n\nasync function setupSecretStore() {\n  const stores = JSON.parse(\n    await $`fastly secret-store list --quiet --json --token $FASTLY_API_TOKEN`,\n  );\n  let STORE_ID = stores && existingListId(stores, SECRET_STORE_NAME);\n  if (!STORE_ID) {\n    console.log(`Creating new secret store ${SECRET_STORE_NAME}`);\n    STORE_ID = JSON.parse(\n      await $`fastly secret-store create --quiet --name=\"$SECRET_STORE_NAME\" --json --token $FASTLY_API_TOKEN`,\n    ).id;\n  } else {\n    console.log(`Using existing secret store ${SECRET_STORE_NAME}`);\n  }\n  await $`echo -n 'This is also some secret data' | fastly secret-store-entry create --recreate-allow --name first --store-id=${STORE_ID} --stdin --token $FASTLY_API_TOKEN`;\n  let key =\n    'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa';\n  await $`echo -n 'This is some secret data' | fastly secret-store-entry create --recreate-allow --name ${key} --store-id=${STORE_ID} --stdin --token $FASTLY_API_TOKEN`;\n  try {\n    await $`fastly service resource-link create --service-id ${serviceId} --version latest --resource-id ${STORE_ID} --token $FASTLY_API_TOKEN --autoclone`;\n  } catch (e) {\n    if (!e.message.includes('Duplicate record')) throw e;\n  }\n}\n\nasync function setupAcl() {\n  let ACL_ID = existingListId(\n    JSON.parse(\n      await $`fastly compute acl list-acls --quiet --json --token $FASTLY_API_TOKEN`,\n    ).data,\n    ACL_NAME,\n  );\n  if (!ACL_ID) {\n    console.log(`Creating ACL ${ACL_NAME}`);\n    ACL_ID = JSON.parse(\n      await $`fastly compute acl create --name=\"$ACL_NAME\" --token $FASTLY_API_TOKEN --json`,\n    ).id;\n    await $`fastly compute acl update --acl-id=${ACL_ID} --operation=create --prefix=100.100.0.0/16 --action=BLOCK --token $FASTLY_API_TOKEN`;\n    await $`fastly compute acl update --acl-id=${ACL_ID} --operation=create --prefix=2a03:4b80::/32 --action=ALLOW --token $FASTLY_API_TOKEN`;\n  } else {\n    console.log(`Using existing ACL ${ACL_NAME}`);\n  }\n  try {\n    await $`fastly service resource-link create --service-id ${serviceId} --version latest --resource-id ${ACL_ID} --token $FASTLY_API_TOKEN --autoclone`;\n  } catch (e) {\n    if (!e.message.includes('Duplicate record')) throw e;\n  }\n}\n\nzx.verbose = true;\nawait setupConfigStores();\nawait setupKVStore();\nawait setupSecretStore();\nawait setupAcl();\nzx.verbose = false;\n\nawait $`fastly service-version activate --service-id ${serviceId} --version latest --token $FASTLY_API_TOKEN`;\n"
  },
  {
    "path": "integration-tests/js-compute/teardown.js",
    "content": "#!/usr/bin/env node\n\nimport { argv } from 'node:process';\nimport { getEnv } from './env.js';\n\nimport { $ } from './util.js';\n\nconst serviceId = argv[2];\nconst serviceName = argv[3];\n\nconst {\n  ACL_NAME,\n  DICTIONARY_NAME,\n  CONFIG_STORE_NAME,\n  KV_STORE_NAME,\n  SECRET_STORE_NAME,\n} = getEnv(serviceName);\n\nfunction existingListId(stores, existingName) {\n  const existing = stores.find(({ name }) => name === existingName);\n  return existing?.id || existing?.StoreID;\n}\n\nconst startTime = Date.now();\n\nif (process.env.FASTLY_API_TOKEN === undefined) {\n  try {\n    process.env.FASTLY_API_TOKEN = String(\n      await $`fastly profile token --quiet`,\n    ).trim();\n  } catch {\n    console.error(\n      'No environment variable named FASTLY_API_TOKEN has been set and no default fastly profile exists.',\n    );\n    console.error(\n      'In order to run the tests, either create a fastly profile using `fastly profile create` or export a fastly token under the name FASTLY_API_TOKEN',\n    );\n    process.exit(1);\n  }\n}\nconst FASTLY_API_TOKEN = process.env.FASTLY_API_TOKEN;\n\nasync function removeConfigStores() {\n  const stores = JSON.parse(\n    await $`fastly config-store list --quiet --json --token $FASTLY_API_TOKEN`,\n  );\n  const links = JSON.parse(\n    await $`fastly service resource-link list --service-id=${serviceId} --quiet --json --version latest --token $FASTLY_API_TOKEN`,\n  );\n\n  let STORE_ID = existingListId(stores, DICTIONARY_NAME);\n  if (STORE_ID) {\n    const LINK_ID = links.find(\n      ({ resource_id }) => resource_id == STORE_ID,\n    )?.id;\n    if (LINK_ID) {\n      await $`fastly service resource-link delete --version latest --autoclone --id=${LINK_ID}  --token $FASTLY_API_TOKEN`;\n      await $`fastly service-version activate --version latest --token $FASTLY_API_TOKEN`;\n    }\n    await $`fastly config-store delete --store-id=${STORE_ID}  --token $FASTLY_API_TOKEN`;\n  }\n\n  STORE_ID = existingListId(stores, CONFIG_STORE_NAME);\n  if (STORE_ID) {\n    const LINK_ID = links.find(\n      ({ resource_id }) => resource_id == STORE_ID,\n    )?.id;\n    if (LINK_ID) {\n      await $`fastly service resource-link delete --version latest --autoclone --id=${LINK_ID}  --token $FASTLY_API_TOKEN`;\n      await $`fastly service-version activate --version latest --token $FASTLY_API_TOKEN`;\n    }\n    try {\n      await $`fastly config-store delete --store-id=${STORE_ID}  --token $FASTLY_API_TOKEN`;\n    } catch {}\n  }\n}\n\nasync function removeKVStore() {\n  const stores = JSON.parse(\n    await $`fastly kv-store list --quiet --json --token $FASTLY_API_TOKEN`,\n  ).Data;\n\n  let STORE_ID = existingListId(stores, KV_STORE_NAME);\n  if (STORE_ID) {\n    await $`fastly kv-store delete --store-id=${STORE_ID} --quiet --all -y --token $FASTLY_API_TOKEN`;\n  } else {\n    console.error(`Unable to find KV Store ${KV_STORE_NAME} to delete`);\n  }\n}\n\nasync function removeSecretStore() {\n  const stores = JSON.parse(\n    await $`fastly secret-store list --quiet --json --token $FASTLY_API_TOKEN`,\n  );\n  const links = JSON.parse(\n    await $`fastly service resource-link list --service-id=${serviceId} --quiet --json --version latest --token $FASTLY_API_TOKEN`,\n  );\n\n  const STORE_ID = existingListId(stores, SECRET_STORE_NAME);\n  if (STORE_ID) {\n    const LINK_ID = links.find(\n      ({ resource_id }) => resource_id == STORE_ID,\n    )?.id;\n    if (LINK_ID) {\n      await $`fastly service resource-link delete --version latest --autoclone --id=${LINK_ID}  --token $FASTLY_API_TOKEN`;\n      await $`fastly service-version activate --version latest --token $FASTLY_API_TOKEN`;\n    }\n    try {\n      await $`fastly secret-store delete --store-id=${STORE_ID}  --token $FASTLY_API_TOKEN`;\n    } catch {}\n  }\n}\n\nasync function removeAcl() {\n  const ACL_ID = existingListId(\n    JSON.parse(\n      await $`fastly compute acl list-acls --quiet --json --token $FASTLY_API_TOKEN`,\n    ).data,\n    ACL_NAME,\n  );\n\n  const links = JSON.parse(\n    await $`fastly service resource-link list --service-id=${serviceId} --quiet --json --version latest --token $FASTLY_API_TOKEN`,\n  );\n  const LINK_ID = links.find(({ resource_id }) => resource_id == ACL_ID)?.id;\n  if (LINK_ID) {\n    await $`fastly service resource-link delete --version latest --autoclone --id=${LINK_ID}  --token $FASTLY_API_TOKEN`;\n    await $`fastly service-version activate --version latest --token $FASTLY_API_TOKEN`;\n  }\n\n  if (ACL_ID) {\n    await $`fastly compute acl delete --acl-id=${ACL_ID}  --token $FASTLY_API_TOKEN`;\n  }\n}\n\ntry {\n  await removeConfigStores();\n} catch (e) {\n  console.error(e.message);\n}\ntry {\n  await removeKVStore();\n} catch (e) {\n  console.error(e.message);\n}\ntry {\n  await removeSecretStore();\n} catch (e) {\n  console.error(e.message);\n}\ntry {\n  await removeAcl();\n} catch (e) {\n  console.error(e.message);\n}\n\nconsole.log(\n  `Tear down has finished! Took ${(Date.now() - startTime) / 1000} seconds to complete`,\n);\n"
  },
  {
    "path": "integration-tests/js-compute/test.js",
    "content": "#!/usr/bin/env node\n\nimport { fileURLToPath } from 'node:url';\nimport { dirname, join } from 'node:path';\nimport { cd, $ as zx, retry, expBackoff } from 'zx';\nimport { request } from 'undici';\nimport { compareDownstreamResponse } from './compare-downstream-response.js';\nimport { argv } from 'node:process';\nimport { existsSync } from 'node:fs';\nimport { copyFile, readFile, writeFile } from 'node:fs/promises';\nimport * as core from '@actions/core';\nimport TOML from '@iarna/toml';\nimport { getEnv, GLOBAL_PREFIX } from './env.js';\nimport { $ } from './util.js';\n\n// test environment variable handling\nprocess.env.LOCAL_TEST = 'local val';\n\nasync function killPortProcess(port) {\n  zx.verbose = false;\n  const pids = (await zx`lsof -ti:${port}`).stdout;\n  if (pids) {\n    for (const pid of pids.split('\\n').reverse()) {\n      if (pid && pid != process.pid) {\n        await zx`kill -15 ${pid}`;\n      }\n    }\n  }\n}\n\nconst startTime = Date.now();\nconst __dirname = dirname(fileURLToPath(import.meta.url));\n\nasync function sleep(seconds) {\n  return new Promise((resolve) => {\n    setTimeout(resolve, 1_000 * seconds);\n  });\n}\n\nlet args = argv.slice(2);\n\nconst local = args.includes('--local');\nconst verbose = args.includes('--verbose');\nconst serial = args.includes('--serial');\nconst fixtureArg = args.find((arg) => arg.startsWith('--fixture='));\nconst httpCache = args.includes('--http-cache');\nconst aot = args.includes('--aot');\nconst debugBuild = args.includes('--debug-build');\nconst debugLog = args.includes('--debug-log');\nconst skipSetup = args.includes('--skip-setup');\nconst skipTeardown = args.includes('--skip-teardown');\nconst filter = args.filter((arg) => !arg.startsWith('--'));\nconst bail = args.includes('--bail');\nconst ci = args.includes('--ci');\n\nif (!local && process.env.FASTLY_API_TOKEN === undefined) {\n  try {\n    zx.verbose = false;\n    process.env.FASTLY_API_TOKEN = String(\n      await $`fastly auth show --reveal | grep 'Token:' | cut -d ' ' -f2-`,\n    ).trim();\n  } catch {\n    console.error(\n      'No environment variable named FASTLY_API_TOKEN has been set and no default fastly profile exists.',\n    );\n    console.error(\n      'In order to run the tests, either create a fastly profile using `fastly profile create` or export a fastly token under the name FASTLY_API_TOKEN',\n    );\n    process.exit(1);\n  }\n}\n\nconst FASTLY_API_TOKEN = process.env.FASTLY_API_TOKEN;\nzx.verbose = true;\nconst branchName = (await zx`git branch --show-current`).stdout\n  .trim()\n  .replace(/[^a-zA-Z0-9_-]/g, '_');\n\nvar fixture = 'app';\n\nif (fixtureArg !== undefined) {\n  fixture = fixtureArg.split('=')[1];\n}\n\n// Service names are carefully unique to support parallel runs\nconst serviceName = `${GLOBAL_PREFIX}app-${branchName}${aot ? '--aot' : ''}${httpCache ? '--http' : ''}${process.env.SUFFIX_STRING ? '--' + process.env.SUFFIX_STRING : ''}`;\nlet domain, serviceId;\nconst fixturePath = join(__dirname, 'fixtures', fixture);\nlet localServer;\n\nconst env = getEnv(ci && !local ? serviceName : null);\nObject.assign(process.env, env);\nif (debugLog) {\n  process.env.FASTLY_DEBUG_LOGGING = '1';\n}\n\nawait cd(fixturePath);\nawait copyFile(\n  join(fixturePath, 'fastly.toml.in'),\n  join(fixturePath, 'fastly.toml'),\n);\nconst envSeen = new Set();\nconst config = TOML.parse(\n  (await readFile(join(fixturePath, 'fastly.toml'), 'utf-8')).replace(\n    /DICTIONARY_NAME|CONFIG_STORE_NAME|KV_STORE_NAME|SECRET_STORE_NAME|ACL_NAME/g,\n    (match) => {\n      // we only replace the second instance, because the first is the --env flag itself\n      if (!envSeen.has(match)) {\n        envSeen.add(match);\n        return match;\n      }\n      return env[match] || match;\n    },\n  ),\n);\nconfig.name = serviceName;\nif (aot) {\n  const buildArgs = config.scripts.build.split(' ');\n  buildArgs.splice(-1, null, '--enable-aot');\n  config.scripts.build = buildArgs.join(' ');\n}\nif (debugBuild) {\n  const buildArgs = config.scripts.build.split(' ');\n  buildArgs.splice(-1, null, '--debug-build');\n  config.scripts.build = buildArgs.join(' ');\n}\nif (httpCache) {\n  const buildArgs = config.scripts.build.split(' ');\n  buildArgs.splice(-1, null, '--enable-http-cache');\n  config.scripts.build = buildArgs.join(' ');\n}\nawait writeFile(\n  join(fixturePath, 'fastly.toml'),\n  TOML.stringify(config),\n  'utf-8',\n);\ntry {\n  if (!local) {\n    core.startGroup('Delete service if already exists');\n    try {\n      await zx`fastly service delete --quiet --service-name \"${serviceName}\" --force --token $FASTLY_API_TOKEN`;\n    } catch {}\n    core.endGroup();\n    await new Promise((resolve) => setTimeout(resolve, 5000));\n    core.startGroup('Build and deploy service');\n    await zx`npm i`;\n    await $`fastly compute publish -i ${verbose ? '--verbose' : '--quiet'} --token $FASTLY_API_TOKEN --status-check-off`;\n    core.endGroup();\n\n    // It can take time for the new domain to show up on the list.\n    await Promise.all([\n      (async () => {\n        await retry(27, expBackoff('60s', '10s'), async () => {\n          // get the public domain of the deployed application\n          const domainListing = JSON.parse(\n            await $`fastly service domain list --quiet --version latest --json`,\n          )[0];\n          domain = `https://${domainListing.Name}`;\n          serviceId = domainListing.ServiceID;\n          core.notice(`Service is running on ${domain}`);\n        });\n      })(),\n      new Promise((resolve) => setTimeout(resolve, 60_000)),\n    ]);\n  } else {\n    const pushpin = '--local-pushpin-proxy-port=0';\n    const args = verbose ? '-vv ' + pushpin : pushpin;\n    localServer = zx`fastly compute serve --verbose --viceroy-args=\"${args}\"`;\n    domain = 'http://127.0.0.1:7676';\n  }\n\n  core.startGroup(`Setting up service ${domain}`);\n\n  if (!local && !skipSetup) {\n    const setupPath = join(__dirname, 'setup.js');\n    if (existsSync(setupPath)) {\n      await zx`node ${setupPath} ${serviceId} ${ci ? serviceName : ''}`;\n    }\n  }\n\n  await Promise.all([\n    (async () => {\n      await retry(\n        27,\n        local\n          ? [\n              // we expect it to take ~10 seconds to deploy, so focus on that time\n              6000,\n              3000, 1500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500,\n              500, 500, 500, 500, 500, 500, 500, 500,\n              // after more than 20 seconds, means we have an unusually slow build, start backoff before timeout\n              1500,\n              3000, 6000, 12000, 24000,\n            ].values()\n          : expBackoff('60s', '10s'),\n        async () => {\n          const response = await request(domain);\n          if (response.statusCode !== 200) {\n            throw new Error(\n              `Application \"${fixture}\" :: Not yet available on domain: ${domain}`,\n            );\n          }\n        },\n      );\n    })(),\n    // we need to wait for the service resource links to all activate,\n    // and we don't currently have a reliable way to poll on that\n    // (perhaps we could poll on the highest version as seen from setup.js resource-link return output\n    // being fully activated?)\n    local ? null : new Promise((resolve) => setTimeout(resolve, 60_000)),\n  ]);\n\n  core.endGroup();\n\n  core.startGroup('Running tests');\n\n  const { default: tests } = await import(join(fixturePath, 'tests.json'), {\n    with: { type: 'json' },\n  });\n\n  function chunks(arr, size) {\n    const output = [];\n    for (let i = 0; i < arr.length; i += size) {\n      output.push(arr.slice(i, i + size));\n    }\n    return output;\n  }\n\n  let results = [];\n  let chunkSize = serial ? 1 : 100;\n\n  for (const chunk of chunks(Object.entries(tests), chunkSize)) {\n    results.push(\n      ...(await (\n        bail ? Promise.all.bind(Promise) : Promise.allSettled.bind(Promise)\n      )(\n        chunk.map(async ([title, test]) => {\n          // test defaults\n          if (!test.downstream_request) {\n            const [method, pathname, extra] = title.split(' ');\n            if (typeof extra === 'string')\n              throw new Error('Cannot infer downstream_request from title');\n            test.downstream_request = { method, pathname };\n          }\n          if (!test.downstream_response) {\n            test.downstream_response = {\n              status: 200,\n            };\n          }\n          if (!test.environments) {\n            test.environments = ['viceroy', 'compute'];\n          }\n\n          // basic test filtering\n          if (\n            test.skip ||\n            (filter.length > 0 && filter.every((f) => !title.includes(f)))\n          ) {\n            return {\n              title,\n              test,\n              skipped: true,\n              skipReason: test.skip\n                ? 'MARKED AS SKIPPED (pending further work)'\n                : null, // dont mention filtered tests\n            };\n          }\n          // feature based test filtering\n          if (\n            (!httpCache &&\n              test.features &&\n              test.features.includes('http-cache')) ||\n            (httpCache &&\n              test.features &&\n              test.features.includes('skip-http-cache'))\n          ) {\n            return {\n              title,\n              test,\n              skipped: true,\n              skipReason: `feature \"http-cache\" ${httpCache ? '' : 'not '}\"enabled`,\n            };\n          }\n          async function getBodyChunks(response) {\n            const bodyChunks = [];\n            let downstreamTimeout;\n            await Promise.race([\n              (async () => {\n                // This body_streaming property allows us to test different cases\n                // of consumer streamining behaviours.\n                switch (test.body_streaming) {\n                  case 'first-chunk-only':\n                    for await (const chunk of response.body) {\n                      bodyChunks.push(chunk);\n                      response.body.on('error', () => {});\n                      break;\n                    }\n                    break;\n                  case 'none':\n                    response.body.on('error', () => {});\n                    break;\n                  case 'full':\n                  default:\n                    for await (const chunk of response.body) {\n                      bodyChunks.push(chunk);\n                    }\n                }\n              })(),\n              new Promise((_, reject) => {\n                downstreamTimeout = setTimeout(() => {\n                  reject(\n                    new Error(`Test downstream response body chunk timeout`),\n                  );\n                }, 30_000);\n              }),\n            ]);\n            clearTimeout(downstreamTimeout);\n            return bodyChunks;\n          }\n          let onInfoHandler = test.downstream_info\n            ? async (status, headers) => {\n                if (\n                  test.downstream_info.status !== undefined &&\n                  test.downstream_info.status != status\n                ) {\n                  throw new Error(\n                    `[DownstreamInfo: Status mismatch] Expected: ${configResponse.status} - Got: ${status}}`,\n                  );\n                }\n                if (headers) {\n                  compareHeaders(\n                    configResponse.headers,\n                    headers,\n                    configResponse.headersExhaustive,\n                  );\n                }\n              }\n            : undefined;\n\n          if (local) {\n            if (test.environments.includes('viceroy')) {\n              return (bail || !test.flake ? (_, __, fn) => fn() : retry)(\n                5,\n                expBackoff('10s', '1s'),\n                async () => {\n                  let path = test.downstream_request.pathname;\n                  let url = `${domain}${path}`;\n                  try {\n                    const response = await request(url, {\n                      method: test.downstream_request.method || 'GET',\n                      headers: test.downstream_request.headers || undefined,\n                      body: test.downstream_request.body || undefined,\n                    });\n                    const bodyChunks = await getBodyChunks(response);\n                    await compareDownstreamResponse(\n                      test.downstream_response,\n                      response,\n                      bodyChunks,\n                    );\n                    return {\n                      title,\n                      test,\n                      skipped: false,\n                    };\n                  } catch (error) {\n                    console.error('\\n' + test.downstream_request.pathname);\n                    throw new Error(`${title} ${error.message}`, {\n                      cause: error,\n                    });\n                  }\n                },\n              );\n            } else {\n              return {\n                title,\n                test,\n                skipped: true,\n                skipReason: 'no environments',\n              };\n            }\n          } else {\n            if (test.environments.includes('compute')) {\n              return retry(\n                test.flake ? 15 : bail ? 1 : 4,\n                expBackoff(\n                  test.flake ? '60s' : '30s',\n                  test.flake ? '30s' : '1s',\n                ),\n                async () => {\n                  let path = test.downstream_request.pathname;\n                  let url = `${domain}${path}`;\n                  try {\n                    const response = await request(url, {\n                      method: test.downstream_request.method || 'GET',\n                      headers: test.downstream_request.headers || undefined,\n                      body: test.downstream_request.body || undefined,\n                      onInfo: onInfoHandler,\n                    });\n                    const bodyChunks = await getBodyChunks(response);\n                    await compareDownstreamResponse(\n                      test.downstream_response,\n                      response,\n                      bodyChunks,\n                    );\n                    return {\n                      title,\n                      test,\n                      skipped: false,\n                    };\n                  } catch (error) {\n                    console.error('\\n' + test.downstream_request.pathname);\n                    throw new Error(`${title} ${error.message}`);\n                  }\n                },\n              );\n            } else {\n              return {\n                title,\n                test,\n                skipped: true,\n                skipReason: 'no environments',\n              };\n            }\n          }\n        }),\n      )),\n    );\n  }\n\n  core.endGroup();\n\n  console.log('Test results');\n  core.startGroup('Test results');\n  let passed = 0;\n  const failed = [];\n  const green = '\\u001b[32m';\n  const red = '\\u001b[31m';\n  const reset = '\\u001b[0m';\n  const white = '\\u001b[39m';\n  const info = '\\u2139';\n  const tick = '\\u2714';\n  const cross = '\\u2716';\n  for (const result of results) {\n    if (result.status === 'fulfilled' || bail) {\n      const value = bail ? result : result.value;\n      if (value.skipped) {\n        if (value.skipReason)\n          console.log(\n            white,\n            info,\n            `Skipped ${value.title} due to ${value.skipReason}`,\n            reset,\n          );\n      } else {\n        passed += 1;\n        console.log(green, tick, value.title, reset);\n      }\n    } else {\n      console.log(red, cross, result.reason, reset);\n      failed.push(result.reason);\n    }\n  }\n  core.endGroup();\n\n  if (failed.length) {\n    process.exitCode = 1;\n    core.startGroup('Failed tests');\n\n    for (const result of failed) {\n      console.log(red, cross, result, reset);\n    }\n\n    core.endGroup();\n  }\n  if (!local && failed.length) {\n    core.notice(`Tests failed.`);\n  }\n} finally {\n  if (!local && !skipTeardown) {\n    const teardownPath = join(__dirname, 'teardown.js');\n    if (existsSync(teardownPath)) {\n      core.startGroup('Tear down the extra set-up for the service');\n      await zx`${teardownPath} ${serviceId} ${ci ? serviceName : ''}`;\n      core.endGroup();\n    }\n\n    core.startGroup('Delete service');\n    // Delete the service now the tests have finished\n    try {\n      await $`fastly service delete --quiet --service-name \"${serviceName}\" --force --token $FASTLY_API_TOKEN`;\n    } catch (e) {\n      console.log('Failed to delete service:', e.message);\n    }\n    core.endGroup();\n  }\n  if (process.exitCode == undefined || process.exitCode == 0) {\n    console.log(\n      `All tests passed! Took ${(Date.now() - startTime) / 1000} seconds to complete`,\n    );\n  } else {\n    console.log(`Tests failed!`);\n  }\n  if (localServer) {\n    await killPortProcess(7676);\n  }\n  process.exit();\n}\n"
  },
  {
    "path": "integration-tests/js-compute/util.js",
    "content": "import { cd, $ as zx, retry, expBackoff } from 'zx';\n\nexport async function $(...args) {\n  await new Promise((resolve) => setTimeout(resolve, 3000));\n  return await retry(10, expBackoff('60s', '10s'), async () => zx(...args));\n}\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"@fastly/js-compute\",\n  \"version\": \"3.41.2\",\n  \"license\": \"Apache-2.0\",\n  \"main\": \"types/index.js\",\n  \"types\": \"types/index.d.ts\",\n  \"type\": \"module\",\n  \"exports\": {\n    \".\": {\n      \"fastly\": {\n        \"types\": \"./types/index.d.ts\",\n        \"default\": \"./types/index.js\"\n      },\n      \"default\": {\n        \"types\": \"./types/index.d.ts\",\n        \"default\": \"./dist/index.js\"\n      }\n    }\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/fastly/js-compute-runtime\"\n  },\n  \"bin\": {\n    \"js-compute\": \"dist/cli/js-compute-runtime-cli.js\",\n    \"js-compute-runtime\": \"dist/cli/js-compute-runtime-cli.js\"\n  },\n  \"files\": [\n    \"types\",\n    \"fastly.wasm\",\n    \"fastly.debug.wasm\",\n    \"fastly-weval.wasm\",\n    \"fastly-ics.wevalcache\",\n    \"dist\",\n    \"rsrc\",\n    \"package.json\",\n    \"README.md\",\n    \"CHANGELOG.md\"\n  ],\n  \"scripts\": {\n    \"test\": \"npm run test:types && npm run test:cli\",\n    \"test:cli\": \"brittle --bail integration-tests/cli/**.test.js\",\n    \"test:integration\": \"node ./integration-tests/js-compute/test.js\",\n    \"test:wpt\": \"tests/wpt-harness/build-wpt-runtime.sh && node ./tests/wpt-harness/run-wpt.mjs -vv\",\n    \"test:wpt:debug\": \"tests/wpt-harness/build-wpt-runtime.sh --debug-build && node ./tests/wpt-harness/run-wpt.mjs -vv\",\n    \"test:types\": \"tsd\",\n    \"clean\": \"rm -rf dist/ starling.wasm fastly.wasm fastly.debug.wasm fastly-weval.wasm fastly-ics.wevalcache fastly-js-compute-*.tgz\",\n    \"build\": \"npm run clean && npm run build:cli && npm run build:debug && npm run build:release && npm run build:weval\",\n    \"build:cli\": \"tsc\",\n    \"build:release\": \"./runtime/fastly/build-release.sh\",\n    \"build:debug\": \"./runtime/fastly/build-debug.sh\",\n    \"build:weval\": \"./runtime/fastly/build-release-weval.sh\",\n    \"build:debug:info\": \"./runtime/fastly/build-debug.sh --keep-debug-info\",\n    \"format-changelog\": \"node ci/format-changelog.js CHANGELOG.md\",\n    \"format\": \"prettier --write 'src/**/*.ts' integration-tests types test-d\",\n    \"format:check\": \"prettier --check 'src/**/*.ts' integration-tests\"\n  },\n  \"dependencies\": {\n    \"@bytecodealliance/jco\": \"^1.7.0\",\n    \"@bytecodealliance/weval\": \"^0.3.2\",\n    \"@bytecodealliance/wizer\": \"^7.0.5\",\n    \"@jridgewell/remapping\": \"^2.3.5\",\n    \"@jridgewell/trace-mapping\": \"^0.3.31\",\n    \"acorn\": \"^8.13.0\",\n    \"acorn-walk\": \"^8.3.4\",\n    \"cosmiconfig\": \"^9.0.1\",\n    \"esbuild\": \"^0.25.0\",\n    \"magic-string\": \"^0.30.12\",\n    \"picomatch\": \"^4.0.4\",\n    \"regexpu-core\": \"^6.4.0\"\n  },\n  \"devDependencies\": {\n    \"@eslint/js\": \"^9.39.1\",\n    \"@jakechampion/cli-testing-library\": \"^1.0.0\",\n    \"@types/node\": \"^24.10.1\",\n    \"@types/picomatch\": \"^4.0.2\",\n    \"brittle\": \"^3.5.2\",\n    \"eslint\": \"^9.39.1\",\n    \"get-bin-path\": \"^11.0.0\",\n    \"prettier\": \"^3.3.3\",\n    \"remark-parse\": \"^11.0.0\",\n    \"remark-stringify\": \"^11.0.0\",\n    \"tsd\": \"^0.33.0\",\n    \"typescript\": \"^5.9.3\",\n    \"typescript-eslint\": \"^8.48.1\",\n    \"unified\": \"^11.0.5\"\n  },\n  \"peerDependencies\": {\n    \"typescript\": \">=5.9\"\n  },\n  \"peerDependenciesMeta\": {\n    \"typescript\": {\n      \"optional\": true\n    }\n  },\n  \"tsd\": {\n    \"compilerOptions\": {\n      \"types\": []\n    }\n  }\n}\n"
  },
  {
    "path": "patches/typedoc-plugin-versions+0.2.2.patch",
    "content": "diff --git a/node_modules/typedoc-plugin-versions/src/etc/utils.js b/node_modules/typedoc-plugin-versions/src/etc/utils.js\nindex db6b2cb..e92c4e8 100644\n--- a/node_modules/typedoc-plugin-versions/src/etc/utils.js\n+++ b/node_modules/typedoc-plugin-versions/src/etc/utils.js\n@@ -235,9 +235,7 @@ function makeJsKeys(metadata) {\n     const alias = metadata.stable ? 'stable' : 'dev';\r\n     const keys = [\r\n         alias,\r\n-        ...metadata.versions // add the major.minor versions\r\n-            .map((v) => getMinorVersion(v))\r\n-            .filter((v, i, s) => s.indexOf(v) === i),\r\n+        ...metadata.versions,\r\n     ];\r\n     if (alias !== 'dev' && metadata.dev) {\r\n         keys.push('dev');\r\n"
  },
  {
    "path": "rsrc/trace-mapping.inject.js",
    "content": "import { TraceMap, originalPositionFor } from \"@jridgewell/trace-mapping\";\n\nlet _traceMap;\nfunction getTraceMap() {\n  if (!_traceMap) {\n    _traceMap = new TraceMap(globalThis.__FASTLY_SOURCE_MAP);\n  }\n  return _traceMap;\n}\n\nfunction buildErrorHeading(e) {\n  const name = e?.name || 'Error';\n  // Prefer e.cause.message if message is missing and cause is informative\n  const msg =\n    (typeof e?.message === 'string' && e.message) ||\n    (e?.cause && typeof e.cause?.message === 'string' && e.cause.message) ||\n    '';\n  return msg ? `${name}: ${msg}` : name;\n}\n\nfunction getSourceContext(source, line, col, { radius = 3 } = {}) {\n  const tm = getTraceMap();\n  if (!tm) return null;\n\n  const idx = tm.sources.indexOf(source);\n  if (idx < 0) return null;\n\n  const content = tm.sourcesContent?.[idx];\n  if (!content) return null; // gracefully skip\n\n  const lines = content.split('\\n');\n\n  const start = Math.max(0, line - 1 - radius);\n  const end   = Math.min(lines.length - 1, line - 1 + radius);\n\n  const result = [];\n\n  for (let i = start; i <= end; i++) {\n    const prefix = i === (line - 1) ? '>' : ' ';\n    const num = String(i + 1).padStart(5);\n    result.push(`${prefix} ${num} | ${lines[i]}`);\n    if (i === line - 1) {\n      result.push(`          ${''.padStart(col)}^`);\n    }\n  }\n\n  return result;\n}\n\nfunction parseStarlingMonkeyFrame(line) {\n  line = String(line).trim().replace(/\\)?$/, \"\"); // strip trailing ')'\n  const m = line.match(/:(\\d+):(\\d+)\\s*$/);\n  if (!m) return null;\n\n  const col = +m[2];\n  const lineNo = +m[1];\n  const head = line.slice(0, m.index);\n  if (head.startsWith('@')) { // no function name\n    return { fn: null, file: head.slice(1), line: lineNo, col, };\n  }\n  const at = head.lastIndexOf(\"@\");\n  if (at > 0) { // fn@file\n    return { fn: head.slice(0, at), file: head.slice(at + 1), line: lineNo, col, };\n  }\n  // file only\n  return { fn: null, file: head, line: lineNo, col, };\n}\n\nfunction mapStack(raw) {\n  const tm = getTraceMap();\n  const out = [];\n  const lines = String(raw).split(/\\r?\\n/);\n\n  for (const line of lines) {\n    if (line.startsWith('node_modules/@fastly/js-compute/rsrc/trace-mapping.inject.js')) {\n      // If the line comes from this file, skip it\n      continue;\n    }\n    if (line === '') { out.push({l: line}); continue; }\n\n    const m = parseStarlingMonkeyFrame(line);\n    if (!m) { out.push({e:'(frame not parsed)', l:line}); continue; }\n\n    const { fn, file, line: l, col: c } = m;\n\n    const genLine = Number(l);\n    const genCol  = Number(c);\n\n    // Only map frames that come from the generated bundle\n    if (file !== globalThis.__FASTLY_GEN_FILE) { out.push({e:'(frame not mapped)', l:line}); continue; }\n\n    const pos = originalPositionFor(tm, { line: genLine, column: Math.max(0, genCol - 1) });\n    if (!pos?.source) {\n      continue;\n    }\n\n    out.push({m:{pos,fn}, l: line});\n  }\n\n  return out;\n}\n\nfunction mapError(e) {\n  const lines = [];\n\n  const raw = e?.stack ?? String(e);\n\n  lines.push(buildErrorHeading(e));\n  try {\n    const stack = mapStack(raw);\n    let contextOutputted = false;\n    for (const line of stack) {\n      const { e, m, l } = line;\n      if (l === '') {\n        lines.push('');\n        continue;\n      }\n      if (e != null) {\n        lines.push(`${e} ${l}`);\n        continue;\n      }\n\n      let formatted;\n      let ctx;\n      if (m == null) {\n        formatted = l;\n      } else {\n        const {pos, fn} = m;\n\n        let name = pos.name;\n        if (fn == null || fn === '') {\n          name = null;\n        } else if (fn[fn.length-1] === '<') {\n          name = '(anonymous function)';\n        } else {\n          name = fn;\n        }\n\n        const filePos = `${pos.source}:${pos.line}:${pos.column != null ? pos.column + 1 : 0}`;\n        formatted = name ? `${name} (${filePos})` : filePos;\n        if (!contextOutputted) {\n          ctx = getSourceContext(pos.source, pos.line, pos.column);\n          contextOutputted = true;\n        }\n      }\n      lines.push(`  at ${formatted}`);\n      if (ctx) {\n        lines.push(...ctx);\n      }\n    }\n  } catch {\n    lines.push('(Raw error)');\n    lines.push(raw);\n  }\n  return lines;\n}\n\n// Monkey patch addEventListener('fetch')\nconst _orig_addEventListener = globalThis.addEventListener;\nglobalThis.addEventListener = function (type, listener) {\n  if (type !== 'fetch') {\n    return _orig_addEventListener.call(this, type, listener);\n  }\n\n  const _orig_listener = listener;\n  return _orig_addEventListener.call(this, type, (event) => {\n\n    // Patch respondWith on this event instance\n    const _orig_respondWith = event.respondWith.bind(event);\n    event.respondWith = (value) => {\n      const wrappedValue = Promise\n        .resolve(value)\n        .catch((err) => {\n          console.error('Unhandled error while running request handler');\n          try { globalThis.__fastlyMapAndLogError(err); } catch { /* swallow */ }\n          console.error('Raw error below:');\n          throw err;\n        });\n      try {\n        return _orig_respondWith(wrappedValue);\n      } catch (err) {\n        console.error('Unhandled error sending response');\n        try { globalThis.__fastlyMapAndLogError(err); } catch { /* swallow */ }\n        console.error('Raw error below:');\n        throw err;\n      }\n    };\n\n    try {\n      return _orig_listener.call(this, event);\n    } catch (err) {\n      console.error('Unhandled error running event listener');\n      try { globalThis.__fastlyMapAndLogError(err); } catch { /* swallow */ }\n      console.error('Raw error below:');\n      throw err;\n    }\n  });\n};\n\nglobalThis.__fastlyMapError = mapError\n"
  },
  {
    "path": "runtime/fastly/CMakeLists.txt",
    "content": "cmake_minimum_required(VERSION 3.27)\n\n#FIXME(1243)\nfile(COPY \"${CMAKE_CURRENT_SOURCE_DIR}/../rust-toolchain.toml\" DESTINATION \"${CMAKE_CURRENT_SOURCE_DIR}/../StarlingMonkey\")\n\n# Apply any local patches to StarlingMonkey before it is included as a subproject\nfile(GLOB SM_PATCHES \"${CMAKE_CURRENT_SOURCE_DIR}/patches/starlingmonkey-*.patch\")\nforeach(patch IN LISTS SM_PATCHES)\n  execute_process(\n    COMMAND git apply --check \"${patch}\"\n    WORKING_DIRECTORY \"${CMAKE_CURRENT_SOURCE_DIR}/../StarlingMonkey\"\n    RESULT_VARIABLE patch_check_result\n    OUTPUT_QUIET ERROR_QUIET\n  )\n  if(patch_check_result EQUAL 0)\n    execute_process(\n      COMMAND git apply \"${patch}\"\n      WORKING_DIRECTORY \"${CMAKE_CURRENT_SOURCE_DIR}/../StarlingMonkey\"\n      RESULT_VARIABLE patch_result\n    )\n    if(NOT patch_result EQUAL 0)\n      message(FATAL_ERROR \"Failed to apply StarlingMonkey patch: ${patch}\")\n    endif()\n  endif()\nendforeach()\n\ninclude(\"../StarlingMonkey/cmake/add_as_subproject.cmake\")\n\nadd_builtin(\n  fastly::runtime\n  SRC\n    handler.cpp\n    common/ip_octets_to_js_string.cpp\n    common/normalize_http_method.cpp\n    common/validations.cpp)\n\nadd_builtin(fastly::cache_simple\n  SRC\n    builtins/cache-simple.cpp\n  DEPENDENCIES\n    OpenSSL)\n\nadd_builtin(fastly::fastly SRC builtins/fastly.cpp)\nadd_builtin(fastly::acl SRC builtins/acl.cpp)\nadd_builtin(fastly::backend SRC builtins/backend.cpp)\nadd_builtin(fastly::body SRC builtins/body.cpp)\nadd_builtin(fastly::cache_core SRC builtins/cache-core.cpp)\nadd_builtin(fastly::kv_store SRC builtins/kv-store.cpp)\nadd_builtin(fastly::logger SRC builtins/logger.cpp)\nadd_builtin(fastly::device SRC builtins/device.cpp)\nadd_builtin(fastly::dictionary SRC builtins/dictionary.cpp)\nadd_builtin(fastly::edge_rate_limiter SRC builtins/edge-rate-limiter.cpp)\nadd_builtin(fastly::config_store SRC builtins/config-store.cpp)\nadd_builtin(fastly::secret_store SRC builtins/secret-store.cpp)\nadd_builtin(fastly::image_optimizer SRC builtins/image-optimizer.cpp)\nadd_builtin(fastly::shielding SRC builtins/shielding.cpp)\n\nadd_builtin(fastly::fetch\n  SRC\n    builtins/fetch/fetch.cpp\n    builtins/fetch/request-response.cpp\n    builtins/fetch/request-response.cpp\n    ../StarlingMonkey/builtins/web/fetch/headers.cpp\n    ../StarlingMonkey/builtins/web/fetch/fetch-utils.cpp\n  DEPENDENCIES\n    fmt)\n\nadd_builtin(fastly::cache_override SRC builtins/cache-override.cpp)\n\nadd_builtin(fastly::fetch_event\n  SRC\n    builtins/fetch-event.cpp\n  DEPENDENCIES\n    OpenSSL)\n\nadd_rust_lib(lol_html_c_api \"${CMAKE_CURRENT_SOURCE_DIR}/crates/rust-lol-html\" \"\\\"capi\\\"\")\n\nadd_builtin(fastly::html_rewriter\n  SRC\n    builtins/html-rewriter.cpp\n  INCLUDE_DIRS\n    ${CMAKE_CURRENT_SOURCE_DIR}/crates/rust-lol-html/include\n)\n\nadd_compile_definitions(PUBLIC RUNTIME_VERSION=${RUNTIME_VERSION})\n\nif(DEFINED FASTLY_GC_FREQUENCY)\n  add_compile_definitions(PUBLIC FASTLY_GC_FREQUENCY=${FASTLY_GC_FREQUENCY})\nendif()\n\nproject(FastlyJS)\n"
  },
  {
    "path": "runtime/fastly/build-debug.sh",
    "content": "#!/usr/bin/env bash\n\nset -euo pipefail\nset -x\n\ncd \"$(dirname \"$0\")\" || exit 1\n\n# Parse command line arguments\nKEEP_DEBUG_INFO=0\nGC_FREQUENCY=\"\"\n\nwhile [[ $# -gt 0 ]]; do\n  case $1 in\n    --keep-debug-info)\n      KEEP_DEBUG_INFO=1\n      shift\n      ;;\n    --gc-frequency)\n      if [[ -n \"${2:-}\" ]]; then\n        GC_FREQUENCY=\"-DFASTLY_GC_FREQUENCY=$2\"\n        shift 2\n      else\n        echo \"Error: --gc-frequency requires a value\"\n        exit 1\n      fi\n      ;;\n    *)\n      echo \"Unknown option: $1\"\n      exit 1\n      ;;\n  esac\ndone\n\nRUNTIME_VERSION=$(npm pkg get version --json --prefix=../../ | jq -r)\nHOST_API=$(realpath host-api) cmake -B build-debug -DCMAKE_BUILD_TYPE=Debug -DENABLE_BUILTIN_WEB_FETCH=0 -DENABLE_BUILTIN_WEB_FETCH_FETCH_EVENT=0 -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DRUNTIME_VERSION=\"\\\"$RUNTIME_VERSION-debug\\\"\" -DENABLE_JS_DEBUGGER=OFF \"$GC_FREQUENCY\"\ncmake --build build-debug --parallel 10\nif [ \"$KEEP_DEBUG_INFO\" -eq 0 ]; then\n  wasm-tools strip build-debug/starling-raw.wasm/starling-raw.wasm -d \".debug_(info|loc|ranges|abbrev|line|str)\" -o ../../fastly.debug.wasm\nelse\n  cp build-debug/starling-raw.wasm/starling-raw.wasm ../../fastly.debug.wasm\nfi\n"
  },
  {
    "path": "runtime/fastly/build-release-weval.sh",
    "content": "#!/usr/bin/env bash\ncd \"$(dirname \"$0\")\" || exit 1\nRUNTIME_VERSION=$(npm pkg get version --json --prefix=../../ | jq -r)\nHOST_API=$(realpath host-api) cmake -B build-release-weval -DCMAKE_BUILD_TYPE=Release -DENABLE_BUILTIN_WEB_FETCH=0 -DENABLE_BUILTIN_WEB_FETCH_FETCH_EVENT=0 -DRUNTIME_VERSION=\"\\\"$RUNTIME_VERSION\\\"\" -DWEVAL=ON -DENABLE_JS_DEBUGGER=OFF\ncmake --build build-release-weval --parallel 8\nmv build-release-weval/starling-raw.wasm/starling-raw.wasm ../../fastly-weval.wasm\nmv build-release-weval/starling-raw.wasm/starling-ics.wevalcache ../../fastly-ics.wevalcache\n"
  },
  {
    "path": "runtime/fastly/build-release.sh",
    "content": "#!/usr/bin/env bash\ncd \"$(dirname \"$0\")\" || exit 1\nRUNTIME_VERSION=$(npm pkg get version --json --prefix=../../ | jq -r)\nHOST_API=$(realpath host-api) cmake -B build-release -DCMAKE_BUILD_TYPE=Release -DENABLE_BUILTIN_WEB_FETCH=0 -DENABLE_BUILTIN_WEB_FETCH_FETCH_EVENT=0 -DRUNTIME_VERSION=\"\\\"$RUNTIME_VERSION\\\"\" -DENABLE_JS_DEBUGGER=OFF\ncmake --build build-release\nmv build-release/starling-raw.wasm/starling-raw.wasm ../../fastly.wasm\n"
  },
  {
    "path": "runtime/fastly/builtins/acl.cpp",
    "content": "#include \"acl.h\"\n#include \"../common/validations.h\"\n#include \"../host-api/host_api_fastly.h\"\n#include \"builtin.h\"\n#include \"encode.h\"\n#include \"fastly.h\"\n#include \"js/JSON.h\"\n#include <arpa/inet.h>\n\nusing builtins::BuiltinNoConstructor;\nusing fastly::FastlyGetErrorMessage;\n\nnamespace fastly::acl {\n\nnamespace {\nhost_api::HostString parse_and_validate_name(JSContext *cx, JS::HandleValue name_val) {\n  if (!name_val.isString()) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_ACL_NAME_NOT_STRING);\n    return nullptr;\n  }\n  JS::RootedString name(cx, name_val.toString());\n  if (!name) {\n    return nullptr;\n  }\n  auto length = JS::GetStringLength(name);\n  if (length > 254) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_ACL_NAME_TOO_LONG);\n    return nullptr;\n  }\n  if (length == 0) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_ACL_NAME_EMPTY);\n    return nullptr;\n  }\n  return core::encode(cx, name);\n}\n} // namespace\n\nbool Acl::open(JSContext *cx, unsigned argc, JS::Value *vp) {\n  CallArgs args = CallArgsFromVp(argc, vp);\n  if (!args.requireAtLeast(cx, \"Acl open\", 1))\n    return false;\n\n  auto name = parse_and_validate_name(cx, args.get(0));\n  if (!name) {\n    return false;\n  }\n\n  auto open_res = host_api::Acl::open(name);\n  if (auto *err = open_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  auto found = open_res.unwrap();\n  if (!found.has_value()) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_ACL_NOT_FOUND,\n                              name.begin());\n    return false;\n  }\n\n  RootedObject acl_instance(cx, JS_NewObjectWithGivenProto(cx, &Acl::class_, Acl::proto_obj));\n  if (!acl_instance) {\n    return false;\n  }\n\n  JS::SetReservedSlot(acl_instance, static_cast<uint32_t>(Slots::HostAcl),\n                      JS::Int32Value(found.value().handle));\n\n  args.rval().setObject(*acl_instance);\n  return true;\n}\n\nbool Acl::lookup(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(1)\n\n  JS::RootedString address_str(cx, JS::ToString(cx, args[0]));\n  if (!address_str)\n    return false;\n\n  auto address = core::encode(cx, address_str);\n  if (!address) {\n    return false;\n  }\n\n  int format = AF_INET;\n  size_t octets_len = 4;\n  if (std::find(address.begin(), address.end(), ':') != address.end()) {\n    format = AF_INET6;\n    octets_len = 16;\n  }\n\n  uint8_t octets[sizeof(struct in6_addr)];\n  if (inet_pton(format, address.begin(), octets) != 1) {\n    JS_ReportErrorLatin1(cx, \"Invalid address passed to acl.lookup\");\n    return false;\n  }\n\n  host_api::Acl acl{static_cast<host_api::Acl::Handle>(\n      JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::HostAcl)).toInt32())};\n  auto lookup_res = acl.lookup(std::span<uint8_t>{octets, octets_len});\n  if (auto *err = lookup_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  auto [body, error] = lookup_res.unwrap();\n\n  switch (error) {\n  case host_api::Acl::LookupError::Ok:\n    break;\n  case host_api::Acl::LookupError::NoContent:\n    args.rval().setNull();\n    return true;\n  case host_api::Acl::LookupError::TooManyRequests:\n    JS_ReportErrorLatin1(cx, \"Acl.lookup: Too many requests, please try again later\");\n    return false;\n  case host_api::Acl::LookupError::Uninitialized:\n    JS_ReportErrorLatin1(cx, \"Acl.lookup: Uninitialized acl passed to lookup\");\n    return false;\n  }\n\n  auto buf_res = body.value().read_all();\n  if (auto *err = buf_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  JS::RootedString str(\n      cx,\n      JS_NewStringCopyUTF8N(cx, JS::UTF8Chars(reinterpret_cast<char *>(buf_res.unwrap().ptr.get()),\n                                              buf_res.unwrap().len)));\n  if (!str) {\n    return false;\n  }\n\n  JS::RootedValue json(cx);\n  if (!JS_ParseJSON(cx, str, &json)) {\n    return false;\n  }\n\n  args.rval().set(json);\n  return true;\n}\n\nconst JSFunctionSpec Acl::static_methods[] = {\n    JS_FN(\"open\", Acl::open, 1, JSPROP_ENUMERATE),\n};\nconst JSPropertySpec Acl::static_properties[] = {JS_PS_END};\nconst JSFunctionSpec Acl::methods[] = {JS_FN(\"lookup\", Acl::lookup, 1, JSPROP_ENUMERATE),\n                                       JS_FS_END};\nconst JSPropertySpec Acl::properties[] = {JS_PS_END};\n\nbool install(api::Engine *engine) {\n  if (!Acl::init_class_impl(engine->cx(), engine->global())) {\n    return false;\n  }\n\n  RootedObject acl_obj(engine->cx(),\n                       JS_GetConstructor(engine->cx(), BuiltinNoConstructor<Acl>::proto_obj));\n  RootedValue acl_val(engine->cx(), ObjectValue(*acl_obj));\n  RootedObject acl_ns(engine->cx(), JS_NewObject(engine->cx(), nullptr));\n  if (!JS_SetProperty(engine->cx(), acl_ns, \"Acl\", acl_val)) {\n    return false;\n  }\n\n  RootedValue acl_ns_val(engine->cx(), JS::ObjectValue(*acl_ns));\n  if (!engine->define_builtin_module(\"fastly:acl\", acl_ns_val)) {\n    return false;\n  }\n  return true;\n}\n\n} // namespace fastly::acl\n"
  },
  {
    "path": "runtime/fastly/builtins/acl.h",
    "content": "#ifndef FASTLY_ACL_H\n#define FASTLY_ACL_H\n\n#include \"builtin.h\"\n#include \"extension-api.h\"\n\nnamespace fastly::acl {\n\nclass Acl : public builtins::BuiltinNoConstructor<Acl> {\nprivate:\npublic:\n  static constexpr const char *class_name = \"Acl\";\n  static const int ctor_length = 1;\n  enum Slots { HostAcl, Count };\n\n  static const JSFunctionSpec static_methods[];\n  static const JSPropertySpec static_properties[];\n\n  static const JSFunctionSpec methods[];\n  static const JSPropertySpec properties[];\n\n  static bool open(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool lookup(JSContext *cx, unsigned argc, JS::Value *vp);\n};\n\n} // namespace fastly::acl\n\n#endif\n"
  },
  {
    "path": "runtime/fastly/builtins/backend.cpp",
    "content": "#include <algorithm>\n#include <arpa/inet.h>\n#include <cctype>\n#include <charconv>\n#include <iostream>\n#include <optional>\n#include <ranges>\n#include <set>\n#include <string>\n#include <string_view>\n#include <unordered_map>\n#include <vector>\n\n// TODO: remove these once the warnings are fixed\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Winvalid-offsetof\"\n#pragma clang diagnostic ignored \"-Wdeprecated-enum-enum-conversion\"\n#include \"js/experimental/TypedData.h\"\n#pragma clang diagnostic pop\n\n#include \"../common/validations.h\"\n#include \"../host-api/host_api_fastly.h\"\n#include \"./fetch/request-response.h\"\n#include \"./secret-store.h\"\n#include \"backend.h\"\n#include \"builtin.h\"\n#include \"decode.h\"\n#include \"encode.h\"\n#include \"fastly.h\"\n\nusing builtins::BuiltinImpl;\nusing fastly::FastlyGetErrorMessage;\nusing fastly::common::parse_and_validate_timeout;\nusing fastly::fastly::Fastly;\nusing fastly::fetch::RequestOrResponse;\nusing fastly::secret_store::SecretStoreEntry;\n\nnamespace fastly::backend {\n\nnamespace {\n\nenum class Authentication : uint8_t {\n  RSA,\n};\n\nenum class KeyExchange : uint8_t {\n  EECDH,\n  RSA,\n};\n\nenum class Encryption : uint8_t {\n  AES128,\n  AES128GCM,\n  AES256,\n  AES256GCM,\n  CHACHA20POLY1305,\n  TRIPLE_DES,\n};\n\nenum class EncryptionLevel : uint8_t {\n  MEDIUM,\n  HIGH,\n};\n\nenum class MessageDigest : uint8_t {\n  SHA1,\n  SHA256,\n  SHA384,\n  AEAD,\n};\n\nenum class Protocol : uint8_t {\n  SSLv3,\n  TLSv1,\n  TLSv1_2,\n};\n\nclass Cipher {\npublic:\n  std::string_view open_ssl_alias;\n  KeyExchange kx;\n  Authentication au;\n  Encryption enc;\n  MessageDigest mac;\n  Protocol protocol;\n  EncryptionLevel level;\n  uint16_t strength_bits;\n\n  constexpr Cipher(std::string_view open_ssl_alias, KeyExchange kx, Authentication au,\n                   Encryption enc, MessageDigest mac, Protocol protocol, EncryptionLevel level,\n                   int strength_bits)\n      : open_ssl_alias(open_ssl_alias), kx(kx), au(au), enc(enc), mac(mac), protocol(protocol),\n        level(level), strength_bits(strength_bits) {}\n\n  // Overload the == operator\n  const bool operator==(const Cipher &obj) const {\n    return open_ssl_alias == obj.open_ssl_alias && kx == obj.kx && au == obj.au && enc == obj.enc &&\n           mac == obj.mac && protocol == obj.protocol && level == obj.level &&\n           strength_bits == obj.strength_bits;\n  }\n};\n\n/**\n * Class in charge with parsing openSSL expressions to define a list of ciphers.\n */\nclass OpenSSLCipherConfigurationParser {\nprivate:\n  using AliasMap = std::unordered_map<std::string_view, std::vector<Cipher>>;\n  AliasMap aliases;\n  // This array should stay aligned with the canonical list located at:\n  // https://developer.fastly.com/learning/concepts/routing-traffic-to-fastly/#use-a-tls-configuration\n  // The mapping is from OpenSSL cipher names as strings to a the cipher represented as a Cipher\n  // object\n  static constexpr std::array<std::pair<std::string_view, Cipher>, 11> CIPHER{\n      std::pair<std::string_view, Cipher>{\n          \"DES-CBC3-SHA\", Cipher(std::string_view(\"DES-CBC3-SHA\"), KeyExchange::RSA,\n                                 Authentication::RSA, Encryption::TRIPLE_DES, MessageDigest::SHA1,\n                                 Protocol::SSLv3, EncryptionLevel::MEDIUM, 112)},\n      {\"AES128-SHA\", Cipher(std::string_view(\"AES128-SHA\"), KeyExchange::RSA, Authentication::RSA,\n                            Encryption::AES128, MessageDigest::SHA1, Protocol::SSLv3,\n                            EncryptionLevel::HIGH, 128)},\n      {\"AES256-SHA\", Cipher(std::string_view(\"AES256-SHA\"), KeyExchange::RSA, Authentication::RSA,\n                            Encryption::AES256, MessageDigest::SHA1, Protocol::SSLv3,\n                            EncryptionLevel::HIGH, 256)},\n      {\"AES128-GCM-SHA256\", Cipher(std::string_view(\"AES128-GCM-SHA256\"), KeyExchange::RSA,\n                                   Authentication::RSA, Encryption::AES128GCM, MessageDigest::AEAD,\n                                   Protocol::TLSv1_2, EncryptionLevel::HIGH, 128)},\n      {\"ECDHE-RSA-AES128-SHA\", Cipher(std::string_view(\"ECDHE-RSA-AES128-SHA\"), KeyExchange::EECDH,\n                                      Authentication::RSA, Encryption::AES128, MessageDigest::SHA1,\n                                      Protocol::TLSv1, EncryptionLevel::HIGH, 128)},\n      {\"ECDHE-RSA-AES256-SHA\", Cipher(std::string_view(\"ECDHE-RSA-AES256-SHA\"), KeyExchange::EECDH,\n                                      Authentication::RSA, Encryption::AES256, MessageDigest::SHA1,\n                                      Protocol::TLSv1, EncryptionLevel::HIGH, 256)},\n      {\"ECDHE-RSA-AES128-SHA256\",\n       Cipher(std::string_view(\"ECDHE-RSA-AES128-SHA256\"), KeyExchange::EECDH, Authentication::RSA,\n              Encryption::AES128, MessageDigest::SHA256, Protocol::TLSv1_2, EncryptionLevel::HIGH,\n              128)},\n      {\"ECDHE-RSA-AES256-SHA384\",\n       Cipher(std::string_view(\"ECDHE-RSA-AES256-SHA384\"), KeyExchange::EECDH, Authentication::RSA,\n              Encryption::AES256, MessageDigest::SHA384, Protocol::TLSv1_2, EncryptionLevel::HIGH,\n              256)},\n      {\"ECDHE-RSA-AES128-GCM-SHA256\",\n       Cipher(std::string_view(\"ECDHE-RSA-AES128-GCM-SHA256\"), KeyExchange::EECDH,\n              Authentication::RSA, Encryption::AES128GCM, MessageDigest::AEAD, Protocol::TLSv1_2,\n              EncryptionLevel::HIGH, 128)},\n      {\"ECDHE-RSA-AES256-GCM-SHA384\",\n       Cipher(std::string_view(\"ECDHE-RSA-AES256-GCM-SHA384\"), KeyExchange::EECDH,\n              Authentication::RSA, Encryption::AES256GCM, MessageDigest::AEAD, Protocol::TLSv1_2,\n              EncryptionLevel::HIGH, 256)},\n      {\"ECDHE-RSA-CHACHA20-POLY1305\",\n       Cipher(std::string_view(\"ECDHE-RSA-CHACHA20-POLY1305\"), KeyExchange::EECDH,\n              Authentication::RSA, Encryption::CHACHA20POLY1305, MessageDigest::AEAD,\n              Protocol::TLSv1_2, EncryptionLevel::HIGH, 256)},\n  };\n\n  static constexpr auto SSL_PROTO_TLSv1_2 = \"TLSv1.2\";\n  static constexpr auto SSL_PROTO_TLSv1_0 = \"TLSv1.0\";\n  static constexpr auto SSL_PROTO_SSLv3 = \"SSLv3\";\n  static constexpr auto SSL_PROTO_TLSv1 = \"TLSv1\";\n\n  // static constexpr auto SEPARATOR = \":, \";\n  /**\n   * If ! is used then the ciphers are permanently deleted from the list. The ciphers deleted can\n   * never reappear in the list even if they are explicitly stated.\n   */\n  static constexpr char EXCLUDE = '!';\n  /**\n   * If - is used then the ciphers are deleted from the list, but some or all of the ciphers can be\n   * added again by later options.\n   */\n  static constexpr char DELETE = '-';\n  /**\n   * If + is used then the ciphers are moved to the end of the list. This option doesn't add any new\n   * ciphers it just moves matching existing ones.\n   */\n  static constexpr char TO_END = '+';\n  /**\n   * Lists of cipher suites can be combined in a single cipher string using the + character.\n   * This is used as a logical and operation.\n   * For example SHA1+DES represents all cipher suites containing the SHA1 and the DES algorithms.\n   */\n  static constexpr char AND = '+';\n  /**\n   * 'high' encryption cipher suites. This currently means those with key lengths larger than 128\n   * bits, and some cipher suites with 128-bit keys.\n   */\n  static constexpr auto HIGH = \"HIGH\";\n  /**\n   * 'medium' encryption cipher suites, currently some of those using 128 bit encryption::\n   */\n  static constexpr auto MEDIUM = \"MEDIUM\";\n  /**\n   * Cipher suites using RSA key exchange.\n   */\n  static constexpr auto kRSA = \"kRSA\";\n  /**\n   * Cipher suites using RSA authentication.\n   */\n  static constexpr auto aRSA = \"aRSA\";\n  /**\n   * Cipher suites using RSA for key exchange\n   * Despite what the docs say, RSA is equivalent to kRSA.\n   */\n  static constexpr auto RSA = \"RSA\";\n  /**\n   * Cipher suites using ephemeral ECDH key agreement, including anonymous cipher suites.\n   */\n  static constexpr auto kEECDH = \"kEECDH\";\n  /**\n   * Cipher suites using ephemeral ECDH key agreement, excluding anonymous cipher suites.\n   * Same as \"kEECDH:-AECDH\"\n   */\n  static constexpr auto EECDH = \"EECDH\";\n  /**\n   * Cipher suitesusing ECDH key exchange, including anonymous, ephemeral and fixed ECDH.\n   */\n  static constexpr auto ECDH = \"ECDH\";\n  /**\n   * Cipher suites using ephemeral ECDH key agreement, including anonymous cipher suites.\n   */\n  static constexpr auto kECDHE = \"kECDHE\";\n  /**\n   * Cipher suites using authenticated ephemeral ECDH key agreement\n   */\n  static constexpr auto ECDHE = \"ECDHE\";\n  /**\n   * Cipher suites using 128 bit AES.\n   */\n  static constexpr auto AES128 = \"AES128\";\n  /**\n   * Cipher suites using 256 bit AES.\n   */\n  static constexpr auto AES256 = \"AES256\";\n  /**\n   * Cipher suites using either 128 or 256 bit AES.\n   */\n  static constexpr auto AES = \"AES\";\n  /**\n   * AES in Galois Counter Mode (GCM): these cipher suites are only supported in TLS v1.2.\n   */\n  static constexpr auto AESGCM = \"AESGCM\";\n  /**\n   * Cipher suites using CHACHA20.\n   */\n  static constexpr auto CHACHA20 = \"CHACHA20\";\n  /**\n   * Cipher suites using triple DES.\n   */\n  static constexpr auto TRIPLE_DES = \"3DES\";\n  /**\n   * Cipher suites using SHA1.\n   */\n  static constexpr auto SHA1 = \"SHA1\";\n  /**\n   * Cipher suites using SHA1.\n   */\n  static constexpr auto SHA = \"SHA\";\n  /**\n   * Cipher suites using SHA256.\n   */\n  static constexpr auto SHA256 = \"SHA256\";\n  /**\n   * Cipher suites using SHA384.\n   */\n  static constexpr auto SHA384 = \"SHA384\";\n  // The content of the default list is determined at compile time and normally corresponds to\n  // ALL:!COMPLEMENTOFDEFAULT:!eNULL.\n  static constexpr auto DEFAULT = \"DEFAULT\";\n  // The ciphers included in ALL, but not enabled by default.\n  static constexpr auto COMPLEMENTOFDEFAULT = \"COMPLEMENTOFDEFAULT\";\n  static constexpr auto ALL = \"ALL\";\n\n  void move_to_end(const AliasMap &aliases, std::vector<Cipher> &ciphers,\n                   std::string_view cipher) const {\n    this->move_to_end(ciphers, aliases.at(cipher));\n  }\n\n  void move_to_end(std::vector<Cipher> &ciphers,\n                   const std::vector<Cipher> &ciphers_to_move_to_end) const {\n    std::stable_partition(ciphers.begin(), ciphers.end(), [&ciphers_to_move_to_end](auto &cipher) {\n      return std::find(ciphers_to_move_to_end.begin(), ciphers_to_move_to_end.end(), cipher) ==\n             ciphers_to_move_to_end.end();\n    });\n  }\n\n  void add(const AliasMap &aliases, std::vector<Cipher> &ciphers, std::string_view alias) const {\n    auto to_add = aliases.at(alias);\n    ciphers.insert(ciphers.end(), to_add.begin(), to_add.end());\n  }\n\n  void remove(const AliasMap &aliases, std::vector<Cipher> &ciphers, std::string_view alias) const {\n    auto &to_remove = aliases.at(alias);\n    ciphers.erase(std::remove_if(ciphers.begin(), ciphers.end(),\n                                 [&](auto &x) {\n                                   return std::find(to_remove.begin(), to_remove.end(), x) !=\n                                          to_remove.end();\n                                 }),\n                  ciphers.end());\n  }\n\n  void strength_sort(std::vector<Cipher> &ciphers) const {\n    /*\n     * This routine sorts the ciphers with descending strength. The sorting\n     * must keep the pre-sorted sequence.\n     */\n    std::stable_sort(ciphers.begin(), ciphers.end(),\n                     [](auto &l, auto &r) { return l.strength_bits > r.strength_bits; });\n  }\n\n  /*\n   * See\n   * https://github.com/openssl/openssl/blob/709651c9022e7be7e69cf8a2f6edf2c8722a6a1e/ssl/ssl_ciph.c#L1455\n   */\n  void default_sort(std::vector<Cipher> &ciphers) const {\n    auto by_strength = [](auto &l, auto &r) { return l.strength_bits > r.strength_bits; };\n    // order all ciphers by strength first\n    std::sort(ciphers.begin(), ciphers.end(), by_strength);\n\n    auto it = std::stable_partition(ciphers.begin(), ciphers.end(),\n                                    this->by_key_exchange(KeyExchange::EECDH));\n\n    /* AES is our preferred symmetric cipher */\n    auto aes = {Encryption::AES128, Encryption::AES128GCM, Encryption::AES256,\n                Encryption::AES256GCM};\n\n    /* Now arrange all ciphers by preference: */\n    it = std::stable_partition(it, ciphers.end(), this->by_encryption(aes));\n\n    /* Move ciphers without forward secrecy to the end */;\n    std::stable_partition(\n        it, ciphers.end(),\n        [compare = this->by_key_exchange(KeyExchange::RSA)](auto &c) { return !compare(c); });\n  }\n\n  std::function<bool(const Cipher &)> by_protocol(Protocol val) const {\n    return [val](auto &c) { return c.protocol == val; };\n  }\n\n  std::function<bool(const Cipher &)> by_key_exchange(KeyExchange val) const {\n    return [val](auto &c) { return c.kx == val; };\n  }\n\n  std::function<bool(const Cipher &)> by_authentication(Authentication val) const {\n    return [val](auto &c) { return c.au == val; };\n  }\n\n  std::function<bool(const Cipher &)> by_encryption(std::set<Encryption> vals) const {\n    return [vals](auto &c) { return vals.find(c.enc) != vals.end(); };\n  }\n\n  std::function<bool(const Cipher &)> by_encryption(Encryption val) const {\n    return [val](auto &c) { return c.enc == val; };\n  }\n\n  std::function<bool(const Cipher &)> by_encryption_level(EncryptionLevel val) const {\n    return [val](auto &c) { return c.level == val; };\n  }\n\n  std::function<bool(const Cipher &)> by_message_digest(MessageDigest val) const {\n    return [val](auto &c) { return c.mac == val; };\n  }\n\n  std::pair<std::string_view, std::string_view> split_on(std::string_view str, char c) const {\n    auto ix = str.find(c);\n    if (ix == str.npos) {\n      return {str, \"\"};\n    }\n\n    auto left = str.substr(0, ix);\n    ix++;\n    if (ix >= str.size()) {\n      return {left, \"\"};\n    }\n\n    return {left, str.substr(ix)};\n  }\n\n  std::vector<std::string_view> split_cipher_suite_string(std::string_view string) const {\n    std::vector<std::string_view> result;\n\n    while (!string.empty()) {\n      auto [line, rest] = this->split_on(string, ':');\n      string = rest;\n\n      while (!line.empty()) {\n        auto [part, rest] = this->split_on(line, ',');\n        line = rest;\n        result.push_back(part);\n      }\n    }\n\n    return result;\n  }\n\n  std::vector<Cipher> all;\n\npublic:\n  OpenSSLCipherConfigurationParser() {\n    this->all.reserve(CIPHER.size());\n    for (const auto &any : CIPHER) {\n      auto &cipher = any.second;\n      this->all.push_back(cipher);\n      auto cipher_alias = cipher.open_ssl_alias;\n      auto alias = aliases.find(cipher_alias);\n      if (alias != aliases.end()) {\n        alias->second.push_back(cipher);\n      } else {\n        std::vector<Cipher> list;\n        list.push_back(cipher);\n        aliases.insert({cipher_alias, list});\n      }\n      aliases.insert({cipher.open_ssl_alias, std::vector<Cipher>{cipher}});\n    }\n\n    // Note: the descriptions of the aliases within the comments are from\n    // https://www.openssl.org/docs/manmaster/man1/openssl-ciphers.html\n\n    // All cipher suites except the eNULL ciphers (which must be explicitly enabled if needed).\n    // As of OpenSSL 1.0.0, the ALL cipher suites are sensibly ordered by default.\n    this->default_sort(this->all);\n    aliases.insert({ALL, this->all});\n    // \"High\" encryption cipher suites. This currently means those with key lengths larger than 128\n    // bits, and some cipher suites with 128-bit keys.\n    std::vector<Cipher> high;\n    std::copy_if(this->all.begin(), this->all.end(), std::back_inserter(high),\n                 this->by_encryption_level(EncryptionLevel::HIGH));\n    aliases.insert({HIGH, high});\n    // \"Medium\" encryption cipher suites, currently some of those using 128 bit encryption.\n    std::vector<Cipher> medium;\n    std::copy_if(this->all.begin(), this->all.end(), std::back_inserter(medium),\n                 this->by_encryption_level(EncryptionLevel::MEDIUM));\n    aliases.insert({MEDIUM, medium});\n\n    // Cipher suites using RSA key exchange or authentication. RSA is an alias for kRSA.\n    std::vector<Cipher> krsa;\n    std::copy_if(this->all.begin(), this->all.end(), std::back_inserter(krsa),\n                 this->by_key_exchange(KeyExchange::RSA));\n    aliases.insert({kRSA, krsa});\n    std::vector<Cipher> arsa;\n    std::copy_if(this->all.begin(), this->all.end(), std::back_inserter(arsa),\n                 this->by_authentication(Authentication::RSA));\n    aliases.insert({aRSA, arsa});\n    aliases.insert({RSA, krsa});\n\n    // Cipher suites using ephemeral ECDH key agreement, including anonymous cipher suites.\n    std::vector<Cipher> ecdh;\n    std::copy_if(this->all.begin(), this->all.end(), std::back_inserter(ecdh),\n                 this->by_key_exchange(KeyExchange::EECDH));\n    aliases.insert({kEECDH, ecdh});\n    aliases.insert({kECDHE, ecdh});\n    aliases.insert({ECDH, ecdh});\n    // Cipher suites using authenticated ephemeral ECDH key agreement.\n    aliases.insert({EECDH, ecdh});\n    aliases.insert({ECDHE, ecdh});\n\n    // Lists cipher suites which are only supported in at least TLS v1.2, TLS v1.0 or SSL v3.0\n    // respectively. Note: there are no cipher suites specific to TLS v1.1. Since this is only the\n    // minimum version, if, for example, TLSv1.0 is negotiated then both TLSv1.0 and SSLv3.0 cipher\n    // suites are available. Note: these cipher strings do not change the negotiated version of SSL\n    // or TLS, they only affect the list of available cipher suites.\n    std::vector<Cipher> tlsv2;\n    std::copy_if(this->all.begin(), this->all.end(), std::back_inserter(tlsv2),\n                 this->by_protocol(Protocol::TLSv1_2));\n    aliases.insert({SSL_PROTO_TLSv1_2, tlsv2});\n    std::vector<Cipher> tlsv1;\n    std::copy_if(this->all.begin(), this->all.end(), std::back_inserter(tlsv1),\n                 this->by_protocol(Protocol::TLSv1));\n    aliases.insert({SSL_PROTO_TLSv1_0, tlsv1});\n    aliases.insert({SSL_PROTO_TLSv1, tlsv1});\n    std::vector<Cipher> sslv3;\n    std::copy_if(this->all.begin(), this->all.end(), std::back_inserter(sslv3),\n                 this->by_protocol(Protocol::SSLv3));\n    aliases.insert({SSL_PROTO_SSLv3, sslv3});\n\n    // cipher suites using 128 bit AES.\n    std::vector<Cipher> aes128;\n    std::copy_if(this->all.begin(), this->all.end(), std::back_inserter(aes128),\n                 this->by_encryption({Encryption::AES128, Encryption::AES128GCM}));\n    aliases.insert({AES128, aes128});\n    // cipher suites using 256 bit AES.\n    std::vector<Cipher> aes256;\n    std::copy_if(this->all.begin(), this->all.end(), std::back_inserter(aes256),\n                 this->by_encryption({Encryption::AES256, Encryption::AES256GCM}));\n    aliases.insert({AES256, aes256});\n    // cipher suites using either 128 or 256 bit AES.\n    auto aes(aes128);\n    aes.insert(aes.end(), aes256.begin(), aes256.end());\n    aliases.insert({AES, aes});\n\n    // AES in Galois Counter Mode (GCM).\n    std::vector<Cipher> aesgcm;\n    std::copy_if(this->all.begin(), this->all.end(), std::back_inserter(aesgcm),\n                 this->by_encryption({Encryption::AES128GCM, Encryption::AES256GCM}));\n    aliases.insert({AESGCM, aesgcm});\n\n    // Cipher suites using ChaCha20.\n    std::vector<Cipher> chacha20;\n    std::copy_if(this->all.begin(), this->all.end(), std::back_inserter(chacha20),\n                 this->by_encryption(Encryption::CHACHA20POLY1305));\n    aliases.insert({CHACHA20, chacha20});\n\n    // Cipher suites using triple DES.\n    std::vector<Cipher> triple_des;\n    std::copy_if(this->all.begin(), this->all.end(), std::back_inserter(triple_des),\n                 this->by_encryption(Encryption::TRIPLE_DES));\n    aliases.insert({TRIPLE_DES, triple_des});\n\n    // Cipher suites using SHA1.\n    std::vector<Cipher> sha1;\n    std::copy_if(this->all.begin(), this->all.end(), std::back_inserter(sha1),\n                 this->by_message_digest(MessageDigest::SHA1));\n    aliases.insert({SHA1, sha1});\n    aliases.insert({SHA, sha1});\n    // Cipher suites using SHA256.\n    std::vector<Cipher> sha256;\n    std::copy_if(this->all.begin(), this->all.end(), std::back_inserter(sha256),\n                 this->by_message_digest(MessageDigest::SHA256));\n    aliases.insert({SHA256, sha256});\n    // Cipher suites using SHA384.\n    std::vector<Cipher> sha384;\n    std::copy_if(this->all.begin(), this->all.end(), std::back_inserter(sha384),\n                 this->by_message_digest(MessageDigest::SHA384));\n    aliases.insert({SHA384, sha384});\n\n    // COMPLEMENTOFDEFAULT:\n    // The ciphers included in ALL, but not enabled by default. Currently this includes all RC4 and\n    // anonymous ciphers. Note that this rule does not cover eNULL, which is not included by ALL\n    // (use COMPLEMENTOFALL if necessary). Note that RC4 based cipher suites are not supported by\n    // Fastly and the only supported anonymous ciphers are `ecdh` and `triple_des`.\n    auto complement_of_default(ecdh);\n    complement_of_default.insert(complement_of_default.end(), triple_des.begin(), triple_des.end());\n    aliases.insert({COMPLEMENTOFDEFAULT, complement_of_default});\n\n    // The content of the default list is determined at compile time and normally corresponds to\n    // ALL:!COMPLEMENTOFDEFAULT:!eNULL.\n    aliases.insert({DEFAULT, this->parse(\"ALL:!COMPLEMENTOFDEFAULT:!eNULL\")});\n  }\n\n  std::vector<Cipher> parse(std::string_view expression) const {\n    /**\n     * All ciphers by their openssl alias name.\n     */\n    auto elements = this->split_cipher_suite_string(expression);\n    std::vector<Cipher> ciphers;\n    std::vector<Cipher> removed_ciphers;\n    for (auto &element : elements) {\n\n      if (element.rfind(DELETE, 0) == 0) {\n        auto alias = element.substr(1);\n        if (aliases.find(alias) != aliases.end()) {\n          this->remove(aliases, ciphers, alias);\n        }\n      } else if (element.rfind(EXCLUDE, 0) == 0) {\n        auto alias = element.substr(1);\n        auto found = aliases.find(alias);\n        if (found != aliases.end()) {\n\n          auto to_add = found.operator->()->second;\n          removed_ciphers.insert(removed_ciphers.end(), to_add.begin(), to_add.end());\n        }\n      } else if (element.rfind(TO_END, 0) == 0) {\n        auto alias = element.substr(1);\n        if (aliases.find(alias) != aliases.end()) {\n          this->move_to_end(aliases, ciphers, alias);\n        }\n      } else if (\"@STRENGTH\" == element) {\n        this->strength_sort(ciphers);\n        break;\n      } else if (aliases.find(element) != aliases.end()) {\n        this->add(aliases, ciphers, element);\n      } else if (element.find(AND) != std::string::npos) {\n        std::vector<std::string_view> intersections;\n        for (auto r : element | std::views::split(AND))\n          intersections.emplace_back(r.begin(), r.end());\n        if (intersections.size() > 0) {\n          auto found = aliases.find(intersections[0]);\n          if (found != aliases.end()) {\n            auto result{found.operator->()->second};\n            for (int i = 1; i < intersections.size(); i++) {\n              auto alias = aliases.find(intersections[i]);\n              if (alias != aliases.end()) {\n                // make `result` only contain the ciphers also present in `alias`\n                result.erase(std::remove_if(result.begin(), result.end(),\n                                            [&](auto x) {\n                                              return std::find(alias->second.begin(),\n                                                               alias->second.end(),\n                                                               x) == alias->second.end();\n                                            }),\n                             result.end());\n              }\n            }\n            // Add all of `result` onto `ciphers`\n            ciphers.insert(ciphers.end(), result.begin(), result.end());\n          }\n        }\n      }\n    }\n    // Remove all ciphers from `ciphers` which are contained in `removed_ciphers`\n    ciphers.erase(std::remove_if(ciphers.begin(), ciphers.end(),\n                                 [&removed_ciphers](auto &c) {\n                                   return std::find(removed_ciphers.begin(), removed_ciphers.end(),\n                                                    c) != removed_ciphers.end();\n                                 }),\n                  ciphers.end());\n    return ciphers;\n  }\n};\n\nbool is_valid_ip(std::string_view ip) {\n  int format = AF_INET;\n  if (ip.find(':') != std::string::npos) {\n    format = AF_INET6;\n  }\n\n  char octets[sizeof(struct in6_addr)];\n  if (inet_pton(format, ip.data(), octets) != 1) {\n    return false;\n  }\n  return true;\n}\n\n// A \"host\" is a \"hostname\" and an optional \"port\" in the format hostname:port\n// A \"hostname\" is between 1 and 255 octets -- https://www.rfc-editor.org/rfc/rfc1123#page-13\n// A \"hostname\" must start with a letter or digit -- https://www.rfc-editor.org/rfc/rfc1123#page-13\n// A \"hostname\" is made up of \"labels\" delimited by a dot `.`\n// A \"label\" is between 1 and 63 octets\nbool is_valid_host(std::string_view host) {\n  if (host.length() < 1) {\n    return false;\n  }\n  auto first_character = host.front();\n  // check first character is in the regex [a-zA-Z0-9]\n  if (!std::isalnum(first_character)) {\n    return false;\n  }\n  // split the hostname from the port\n  int pos = host.find_first_of(':');\n  std::string_view hostname = host.substr(0, pos);\n\n  // hostnames can not be longer than 253 characters\n  // This is because a hostname is represented as a series of labels, and is terminated by a label\n  // of length zero. A label consists of a length octet followed by that number of octets\n  // representing the name itself. https://www.rfc-editor.org/rfc/rfc1035#section-3.3\n  // https://www.rfc-editor.org/rfc/rfc2181#section-11\n  if (hostname.length() > 253) {\n    return false;\n  }\n\n  auto last_character = hostname.back();\n  // check last character is in the regex [a-zA-Z0-9]\n  if (!std::isalnum(last_character)) {\n    return false;\n  }\n\n  for (auto r : hostname | std::views::split('.')) {\n    auto label = std::string_view(r.begin(), r.end());\n    // Each label in a hostname can not be longer than 63 characters\n    // https://www.rfc-editor.org/rfc/rfc2181#section-11\n    if (label.length() > 63) {\n      return false;\n    }\n\n    // Each label can only contain the characters in the regex [a-zA-Z0-9\\-]\n    auto it = std::find_if_not(label.begin(), label.end(), [](auto character) {\n      return std::isalnum(character) || character == '-';\n    });\n    if (it != label.end()) {\n\n      return false;\n    }\n  }\n\n  // if there is a port - confirm it is all digits and is between 0 and 65536\n  // https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml\n  if (pos != std::string::npos) {\n    std::string_view port = host.substr(pos + 1);\n    if (!std::all_of(port.begin(), port.end(), [](auto c) { return std::isdigit(c); })) {\n      return false;\n    }\n    int value;\n    const std::from_chars_result result =\n        std::from_chars(port.data(), port.data() + port.size(), value);\n    if (result.ec == std::errc::invalid_argument || result.ec == std::errc::result_out_of_range) {\n      return false;\n    }\n    if (value == 0 || value >= 65536) {\n      return false;\n    }\n  }\n  return true;\n}\n\nOpenSSLCipherConfigurationParser cipher_parser;\n\nbool is_cipher_suite_supported_by_fastly(std::string_view cipher_spec) {\n  auto ciphers = cipher_parser.parse(cipher_spec);\n  return ciphers.size() > 0;\n}\n\nhost_api::HostString parse_and_validate_name(JSContext *cx, JS::HandleValue name_val) {\n  if (name_val.isNullOrUndefined()) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_BACKEND_NAME_NOT_SET);\n    return nullptr;\n  }\n  JS::RootedString name(cx, JS::ToString(cx, name_val));\n  if (!name) {\n    return nullptr;\n  }\n  auto length = JS::GetStringLength(name);\n  if (length > 254) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_BACKEND_NAME_TOO_LONG);\n    return nullptr;\n  }\n  if (length == 0) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_BACKEND_NAME_EMPTY);\n    return nullptr;\n  }\n  return core::encode(cx, name);\n}\n\nconst host_api::Backend *set_backend(JSContext *cx, JSObject *backend, JS::HandleValue name_val) {\n  MOZ_ASSERT(Backend::is_instance(backend));\n  auto name = parse_and_validate_name(cx, name_val);\n  if (!name) {\n    return nullptr;\n  }\n\n  auto host_backend = new host_api::Backend(std::move(name));\n  JS::SetReservedSlot(backend, Backend::Slots::HostBackend, JS::PrivateValue(host_backend));\n  return host_backend;\n}\n\nconst host_api::Backend *get_backend(JSContext *cx, JSObject *backend) {\n  if (!Backend::is_instance(backend)) {\n    return nullptr;\n  }\n  auto backend_slot = JS::GetReservedSlot(backend, Backend::Slots::HostBackend);\n  if (!backend_slot.isDouble()) {\n    return nullptr;\n  }\n  return static_cast<const host_api::Backend *>(backend_slot.toPrivate());\n}\n\nbool set_host_override(JSContext *cx, host_api::BackendConfig &backend_config,\n                       JS::HandleValue host_override_val) {\n  auto host_override = JS::RootedString(cx, JS::ToString(cx, host_override_val));\n  if (!host_override) {\n    return false;\n  }\n\n  if (JS_GetStringLength(host_override) == 0) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                              JSMSG_BACKEND_HOST_OVERRIDE_EMPTY);\n    return false;\n  }\n  backend_config.host_override = core::encode(cx, host_override);\n  return true;\n}\n\nbool set_sni_hostname(JSContext *cx, host_api::BackendConfig &backend,\n                      JS::HandleValue sni_hostname_val) {\n  auto sni_hostname = RootedString(cx, JS::ToString(cx, sni_hostname_val));\n  if (!sni_hostname) {\n    return false;\n  }\n\n  if (JS_GetStringLength(sni_hostname) == 0) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_BACKEND_SNI_HOSTNAME_EMPTY);\n    return false;\n  }\n  backend.sni_hostname = core::encode(cx, sni_hostname);\n  return true;\n}\n\nbool validate_target(JSContext *cx, std::string_view target_string) {\n  auto length = target_string.length();\n  if (length == 0) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_BACKEND_TARGET_EMPTY);\n    return false;\n  }\n\n  if (target_string == \"::\") {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_BACKEND_TARGET_INVALID);\n    return false;\n  }\n  if (!is_valid_host(target_string) && !is_valid_ip(target_string)) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_BACKEND_TARGET_INVALID);\n    return false;\n  }\n\n  return true;\n}\n\nhost_api::BackendConfig default_backend_config{};\n\nconst uint64_t MAX_BACKEND_TIMEOUT = 0x100000000;\n\nbool apply_backend_config(JSContext *cx, host_api::BackendConfig &backend,\n                          HandleObject configuration) {\n  bool found;\n  JS::RootedValue host_override_val(cx);\n  if (!JS_HasProperty(cx, configuration, \"hostOverride\", &found)) {\n    return false;\n  }\n  if (found) {\n    if (!JS_GetProperty(cx, configuration, \"hostOverride\", &host_override_val)) {\n      return false;\n    }\n    if (!set_host_override(cx, backend, host_override_val)) {\n      return false;\n    }\n  }\n\n  JS::RootedValue connect_timeout_val(cx);\n  if (!JS_HasProperty(cx, configuration, \"connectTimeout\", &found)) {\n    return false;\n  }\n  if (found) {\n    if (!JS_GetProperty(cx, configuration, \"connectTimeout\", &connect_timeout_val)) {\n      return false;\n    }\n    auto parsed = parse_and_validate_timeout(cx, connect_timeout_val, \"Backend constructor\",\n                                             \"connectTimeout\", MAX_BACKEND_TIMEOUT);\n    if (!parsed) {\n      return false;\n    }\n    backend.connect_timeout = parsed;\n  }\n\n  // Timeouts for backends must be less than 2^32 milliseconds, or\n  // about a month and a half.\n  JS::RootedValue first_byte_timeout_val(cx);\n  if (!JS_HasProperty(cx, configuration, \"firstByteTimeout\", &found)) {\n    return false;\n  }\n  if (found) {\n    if (!JS_GetProperty(cx, configuration, \"firstByteTimeout\", &first_byte_timeout_val)) {\n      return false;\n    }\n    auto parsed = parse_and_validate_timeout(cx, first_byte_timeout_val, \"Backend constructor\",\n                                             \"firstByteTimeout\", MAX_BACKEND_TIMEOUT);\n    if (!parsed) {\n      return false;\n    }\n    backend.first_byte_timeout = parsed;\n  }\n\n  // Timeouts for backends must be less than 2^32 milliseconds, or\n  // about a month and a half.\n  JS::RootedValue between_bytes_timeout_val(cx);\n  if (!JS_HasProperty(cx, configuration, \"betweenBytesTimeout\", &found)) {\n    return false;\n  }\n  if (found) {\n    if (!JS_GetProperty(cx, configuration, \"betweenBytesTimeout\", &between_bytes_timeout_val)) {\n      return false;\n    }\n    auto parsed = parse_and_validate_timeout(cx, between_bytes_timeout_val, \"Backend constructor\",\n                                             \"betweenBytesTimeout\", MAX_BACKEND_TIMEOUT);\n    if (!parsed) {\n      return false;\n    }\n    backend.between_bytes_timeout = parsed;\n  }\n\n  // Has to be either: 1; 1.1; 1.2; 1.3;\n  JS::RootedValue tls_min_version_val(cx);\n  if (!JS_HasProperty(cx, configuration, \"tlsMinVersion\", &found)) {\n    return false;\n  }\n  if (found) {\n    if (!JS_GetProperty(cx, configuration, \"tlsMinVersion\", &tls_min_version_val)) {\n      return false;\n    }\n    double version;\n    if (!JS::ToNumber(cx, tls_min_version_val, &version)) {\n      return false;\n    }\n\n    if (std::isnan(version)) {\n      JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_BACKEND_TLS_MIN_INVALID);\n      return false;\n    }\n\n    if (version == 1.3) {\n      backend.ssl_min_version = host_api::TlsVersion::version_1_3();\n    } else if (version == 1.2) {\n      backend.ssl_min_version = host_api::TlsVersion::version_1_2();\n    } else if (version == 1.1) {\n      backend.ssl_min_version = host_api::TlsVersion::version_1_1();\n    } else if (version == 1) {\n      backend.ssl_min_version = host_api::TlsVersion::version_1();\n    } else {\n      JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_BACKEND_TLS_MIN_INVALID);\n      return false;\n    }\n  }\n\n  // Has to be either: 1; 1.1; 1.2; 1.3;\n  JS::RootedValue tls_max_version_val(cx);\n  if (!JS_HasProperty(cx, configuration, \"tlsMaxVersion\", &found)) {\n    return false;\n  }\n  if (found) {\n    if (!JS_GetProperty(cx, configuration, \"tlsMaxVersion\", &tls_max_version_val)) {\n      return false;\n    }\n    double version;\n    if (!JS::ToNumber(cx, tls_max_version_val, &version)) {\n      return false;\n    }\n\n    if (std::isnan(version)) {\n      JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_BACKEND_TLS_MAX_INVALID);\n      return false;\n    }\n\n    if (version == 1.3) {\n      backend.ssl_max_version = host_api::TlsVersion::version_1_3();\n    } else if (version == 1.2) {\n      backend.ssl_max_version = host_api::TlsVersion::version_1_2();\n    } else if (version == 1.1) {\n      backend.ssl_max_version = host_api::TlsVersion::version_1_1();\n    } else if (version == 1) {\n      backend.ssl_max_version = host_api::TlsVersion::version_1();\n    } else {\n      JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_BACKEND_TLS_MAX_INVALID);\n      return false;\n    }\n  }\n\n  if (backend.ssl_min_version.has_value() && backend.ssl_max_version.has_value()) {\n    if (backend.ssl_min_version->value > backend.ssl_max_version->value) {\n      JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                                JSMSG_BACKEND_TLS_MIN_GREATER_THAN_TLS_MAX);\n      return false;\n    }\n  }\n\n  JS::RootedValue certificate_hostname_val(cx);\n  if (!JS_HasProperty(cx, configuration, \"certificateHostname\", &found)) {\n    return false;\n  }\n  if (found) {\n    if (!JS_GetProperty(cx, configuration, \"certificateHostname\", &certificate_hostname_val)) {\n      return false;\n    }\n    auto certificate_hostname = JS::RootedString(cx, JS::ToString(cx, certificate_hostname_val));\n    if (!certificate_hostname) {\n      return false;\n    }\n\n    if (JS_GetStringLength(certificate_hostname) == 0) {\n      JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                                JSMSG_BACKEND_CERTIFICATE_HOSTNAME_EMPTY);\n      return false;\n    }\n    backend.cert_hostname = core::encode(cx, certificate_hostname);\n  }\n\n  JS::RootedValue use_ssl_val(cx);\n  if (!JS_HasProperty(cx, configuration, \"useSSL\", &found)) {\n    return false;\n  }\n  if (found) {\n    if (!JS_GetProperty(cx, configuration, \"useSSL\", &use_ssl_val)) {\n      return false;\n    }\n    backend.use_ssl = JS::ToBoolean(use_ssl_val);\n  }\n\n  JS::RootedValue dont_pool_val(cx);\n  if (!JS_HasProperty(cx, configuration, \"dontPool\", &found)) {\n    return false;\n  }\n  if (found) {\n    if (!JS_GetProperty(cx, configuration, \"dontPool\", &dont_pool_val)) {\n      return false;\n    }\n    backend.dont_pool = JS::ToBoolean(dont_pool_val);\n  }\n\n  JS::RootedValue ca_certificate_val(cx);\n  if (!JS_HasProperty(cx, configuration, \"caCertificate\", &found)) {\n    return false;\n  }\n  if (found) {\n    if (!JS_GetProperty(cx, configuration, \"caCertificate\", &ca_certificate_val)) {\n      return false;\n    }\n    auto ca_certificate = JS::RootedString(cx, JS::ToString(cx, ca_certificate_val));\n    if (!ca_certificate) {\n      return false;\n    }\n    if (JS_GetStringLength(ca_certificate) == 0) {\n      JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                                JSMSG_BACKEND_CA_CERTIFICATE_EMPTY);\n      return false;\n    }\n    backend.ca_cert = core::encode(cx, ca_certificate);\n  }\n\n  // Cipher list consisting of one or more cipher strings separated by colons.\n  // Commas or spaces are also acceptable separators but colons are normally used.\n  JS::RootedValue ciphers_val(cx);\n  if (!JS_HasProperty(cx, configuration, \"ciphers\", &found)) {\n    return false;\n  }\n  if (found) {\n    if (!JS_GetProperty(cx, configuration, \"ciphers\", &ciphers_val)) {\n      return false;\n    }\n    auto ciphers_chars = core::encode(cx, ciphers_val);\n    if (!ciphers_chars) {\n      return false;\n    }\n    if (ciphers_chars.size() == 0) {\n      JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_BACKEND_CIPHERS_EMPTY);\n      return false;\n    }\n    std::string cipher_spec(ciphers_chars.begin(), ciphers_chars.len);\n    if (!is_cipher_suite_supported_by_fastly(cipher_spec)) {\n      JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                                JSMSG_BACKEND_CIPHERS_NOT_AVALIABLE);\n      return false;\n    }\n    backend.ciphers.emplace(std::move(ciphers_chars));\n  }\n\n  JS::RootedValue sni_hostname_val(cx);\n  if (!JS_HasProperty(cx, configuration, \"sniHostname\", &found)) {\n    return false;\n  }\n  if (found) {\n    if (!JS_GetProperty(cx, configuration, \"sniHostname\", &sni_hostname_val)) {\n      return false;\n    }\n    if (!set_sni_hostname(cx, backend, sni_hostname_val)) {\n      return false;\n    }\n  }\n\n  JS::RootedValue client_cert_val(cx);\n  if (!JS_HasProperty(cx, configuration, \"clientCertificate\", &found)) {\n    return false;\n  }\n  if (found) {\n    if (!JS_GetProperty(cx, configuration, \"clientCertificate\", &client_cert_val)) {\n      return false;\n    }\n    if (!client_cert_val.isObject()) {\n      JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                                JSMSG_BACKEND_CLIENT_CERTIFICATE_NOT_OBJECT);\n      return false;\n    }\n    JS::RootedObject client_cert_obj(cx, &client_cert_val.toObject());\n\n    JS::RootedValue client_cert_cert_val(cx);\n    if (!JS_HasProperty(cx, client_cert_obj, \"certificate\", &found)) {\n      return false;\n    }\n    if (!found) {\n      JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                                JSMSG_BACKEND_CLIENT_CERTIFICATE_NO_CERTIFICATE);\n      return false;\n    }\n    if (!JS_GetProperty(cx, client_cert_obj, \"certificate\", &client_cert_cert_val)) {\n      return false;\n    }\n    RootedString client_cert(cx, JS::ToString(cx, client_cert_cert_val));\n    if (!client_cert) {\n      return false;\n    }\n\n    if (JS_GetStringLength(client_cert) == 0) {\n      JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                                JSMSG_BACKEND_CLIENT_CERTIFICATE_CERTIFICATE_EMPTY);\n      return false;\n    }\n    JS::RootedValue client_cert_key_val(cx);\n    if (!JS_HasProperty(cx, client_cert_obj, \"key\", &found)) {\n      return false;\n    }\n    if (!found) {\n      JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                                JSMSG_BACKEND_CLIENT_CERTIFICATE_KEY_INVALID);\n      return false;\n    }\n    if (!JS_GetProperty(cx, client_cert_obj, \"key\", &client_cert_key_val)) {\n      return false;\n    }\n\n    if (!SecretStoreEntry::is_instance(client_cert_key_val)) {\n      JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                                JSMSG_BACKEND_CLIENT_CERTIFICATE_KEY_INVALID);\n      return false;\n    }\n    JS::RootedObject client_cert_key_obj(cx, &client_cert_key_val.toObject());\n\n    backend.client_cert =\n        host_api::ClientCert{.cert = core::encode(cx, client_cert),\n                             .key = SecretStoreEntry::secret_handle(client_cert_key_obj).handle};\n  }\n\n  JS::RootedValue grpc_val(cx);\n  if (!JS_HasProperty(cx, configuration, \"grpc\", &found)) {\n    return false;\n  }\n  if (found) {\n    if (!JS_GetProperty(cx, configuration, \"grpc\", &grpc_val)) {\n      return false;\n    }\n    backend.grpc = JS::ToBoolean(grpc_val);\n  }\n\n  JS::RootedValue http_keepalive_time_ms_val(cx);\n  if (!JS_HasProperty(cx, configuration, \"httpKeepalive\", &found)) {\n    return false;\n  }\n  if (found) {\n    if (!JS_GetProperty(cx, configuration, \"httpKeepalive\", &http_keepalive_time_ms_val)) {\n      return false;\n    }\n    auto parsed = parse_and_validate_timeout(cx, http_keepalive_time_ms_val, \"httpKeepalive\",\n                                             \"Backend constructor\", MAX_BACKEND_TIMEOUT);\n    if (!parsed) {\n      return false;\n    }\n    backend.http_keepalive_time_ms = parsed;\n  }\n\n  JS::RootedValue tcp_keepalive_val(cx);\n  if (!JS_HasProperty(cx, configuration, \"tcpKeepalive\", &found)) {\n    return false;\n  }\n  if (found) {\n    if (!JS_GetProperty(cx, configuration, \"tcpKeepalive\", &tcp_keepalive_val)) {\n      return false;\n    }\n    if (tcp_keepalive_val.isBoolean()) {\n      if (tcp_keepalive_val.toBoolean()) {\n        backend.tcp_keepalive = host_api::TcpKeepalive{};\n      }\n    } else if (!tcp_keepalive_val.isObject()) {\n      JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                                JSMSG_BACKEND_TCP_KEEPALIVE_NOT_OBJECT_OR_BOOL);\n      return false;\n    }\n    if (tcp_keepalive_val.isObject()) {\n      host_api::TcpKeepalive tcp_keepalive{};\n      JS::RootedObject tcp_keepalive_obj(cx, &tcp_keepalive_val.toObject());\n\n      JS::RootedValue tcp_keepalive_time_secs_val(cx);\n      if (!JS_HasProperty(cx, tcp_keepalive_obj, \"timeSecs\", &found)) {\n        return false;\n      }\n      if (found) {\n        if (!JS_GetProperty(cx, tcp_keepalive_obj, \"timeSecs\", &tcp_keepalive_time_secs_val)) {\n          return false;\n        }\n        auto parsed = parse_and_validate_timeout(cx, tcp_keepalive_time_secs_val, \"timeSecs\",\n                                                 \"Backend constructor\", MAX_BACKEND_TIMEOUT);\n        if (!parsed) {\n          return false;\n        }\n        tcp_keepalive.time_secs = parsed;\n      }\n\n      JS::RootedValue tcp_keepalive_interval_secs_val(cx);\n      if (!JS_HasProperty(cx, tcp_keepalive_obj, \"intervalSecs\", &found)) {\n        return false;\n      }\n      if (found) {\n        if (!JS_GetProperty(cx, tcp_keepalive_obj, \"intervalSecs\",\n                            &tcp_keepalive_interval_secs_val)) {\n          return false;\n        }\n        auto parsed =\n            parse_and_validate_timeout(cx, tcp_keepalive_interval_secs_val, \"intervalSecs\",\n                                       \"Backend constructor\", MAX_BACKEND_TIMEOUT);\n        if (!parsed) {\n          return false;\n        }\n        tcp_keepalive.interval_secs = parsed;\n      }\n\n      JS::RootedValue tcp_keepalive_probes_val(cx);\n      if (!JS_HasProperty(cx, tcp_keepalive_obj, \"probes\", &found)) {\n        return false;\n      }\n      if (found) {\n        if (!JS_GetProperty(cx, tcp_keepalive_obj, \"probes\", &tcp_keepalive_probes_val)) {\n          return false;\n        }\n        double native_value;\n        if (!JS::ToNumber(cx, tcp_keepalive_probes_val, &native_value)) {\n          return false;\n        }\n        if (std::isnan(native_value) || native_value <= 0 || native_value >= 0x100000000) {\n          JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                                    JSMSG_BACKEND_TCP_KEEPALIVE_INVALID_PROBES);\n          return false;\n        }\n        tcp_keepalive.probes = std::round(native_value);\n      }\n      backend.tcp_keepalive = tcp_keepalive;\n    }\n  }\n  return true;\n}\n\n} // namespace\n\nJSString *Backend::name(JSContext *cx, JSObject *self) {\n  auto backend = static_cast<host_api::Backend *>(\n      JS::GetReservedSlot(self, Backend::Slots::HostBackend).toPrivate());\n  return JS_NewStringCopyN(cx, backend->name().begin(), backend->name().size());\n}\n\nbool Backend::name_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0);\n\n  auto backend = get_backend(cx, self);\n  if (!backend) {\n    args.rval().setUndefined();\n    return true;\n  }\n  auto &name = backend->name();\n  auto name_str = JS_NewStringCopyN(cx, name.begin(), name.size());\n  if (!name_str) {\n    return false;\n  }\n  args.rval().setString(name_str);\n  return true;\n}\n\nbool Backend::exists(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = JS::CallArgsFromVp(argc, vp);\n  if (!args.requireAtLeast(cx, \"Backend.exists\", 1)) {\n    return false;\n  }\n\n  auto name = parse_and_validate_name(cx, args.get(0));\n  if (!name) {\n    return false;\n  }\n  auto res = host_api::Backend::exists(name);\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  auto exists = res.unwrap();\n  args.rval().setBoolean(exists);\n  return true;\n}\n\nbool Backend::get_from_valid_name(JSContext *cx, host_api::HostString name,\n                                  JS::MutableHandleValue out) {\n  auto backend_instance = JS_NewObjectWithGivenProto(cx, &Backend::class_, Backend::proto_obj);\n  if (!backend_instance) {\n    return false;\n  }\n  JS::RootedValue backend_val(cx, JS::ObjectValue(*backend_instance));\n  JS::RootedObject backend(cx, backend_instance);\n  if (!backend) {\n    return false;\n  }\n\n  auto host_backend = new host_api::Backend(std::move(name));\n  JS::SetReservedSlot(backend, Backend::Slots::HostBackend, JS::PrivateValue(host_backend));\n\n  out.setObject(*backend);\n  return true;\n}\n\nbool Backend::from_name(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = JS::CallArgsFromVp(argc, vp);\n  if (!args.requireAtLeast(cx, \"Backend.fromName\", 1)) {\n    return false;\n  }\n\n  auto name = parse_and_validate_name(cx, args.get(0));\n  if (!name) {\n    return false;\n  }\n  auto res = host_api::Backend::exists(name);\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  auto exists = res.unwrap();\n\n  if (!exists) {\n    JS_ReportErrorNumberUTF8(cx, FastlyGetErrorMessage, nullptr,\n                             JSMSG_BACKEND_FROMNAME_BACKEND_DOES_NOT_EXIST, name.begin());\n    return false;\n  }\n\n  get_from_valid_name(cx, std::move(name), args.rval());\n  return true;\n}\n\nbool Backend::health_for_name(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = JS::CallArgsFromVp(argc, vp);\n  if (!args.requireAtLeast(cx, \"Backend.health\", 1)) {\n    return false;\n  }\n\n  auto name = parse_and_validate_name(cx, args.get(0));\n  if (!name) {\n    return false;\n  }\n  auto exists = host_api::Backend::exists(name);\n  if (auto *err = exists.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  if (!exists.unwrap()) {\n    JS_ReportErrorNumberUTF8(cx, FastlyGetErrorMessage, nullptr,\n                             JSMSG_BACKEND_IS_HEALTHY_BACKEND_DOES_NOT_EXIST, name.begin());\n    return false;\n  }\n\n  auto backend = new host_api::Backend(std::move(name));\n  auto res = backend->health();\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  auto health = res.unwrap();\n  if (health.is_healthy()) {\n    args.rval().setString(JS_NewStringCopyZ(cx, \"healthy\"));\n  } else if (health.is_unhealthy()) {\n    args.rval().setString(JS_NewStringCopyZ(cx, \"unhealthy\"));\n  } else {\n    args.rval().setString(JS_NewStringCopyZ(cx, \"unknown\"));\n  }\n\n  return true;\n}\n\nbool Backend::health(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0);\n\n  auto backend = get_backend(cx, self);\n  if (!backend) {\n    return true;\n  }\n  auto res = backend->health();\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  auto health = res.unwrap();\n  if (health.is_healthy()) {\n    args.rval().setString(JS_NewStringCopyZ(cx, \"healthy\"));\n  } else if (health.is_unhealthy()) {\n    args.rval().setString(JS_NewStringCopyZ(cx, \"unhealthy\"));\n  } else {\n    args.rval().setString(JS_NewStringCopyZ(cx, \"unknown\"));\n  }\n\n  return true;\n}\n\nbool Backend::is_dynamic_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0);\n  auto backend = get_backend(cx, self);\n  if (!backend) {\n    return true;\n  }\n  auto res = backend->is_dynamic();\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  args.rval().setBoolean(res.unwrap());\n  return true;\n}\n\nbool Backend::target_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0);\n  auto backend = get_backend(cx, self);\n  if (!backend) {\n    return true;\n  }\n  auto res = backend->get_host();\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  auto str = core::decode(cx, res.unwrap());\n  if (!str) {\n    return false;\n  }\n  args.rval().setString(str);\n  return true;\n}\n\nbool Backend::host_override_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0);\n  auto backend = get_backend(cx, self);\n  if (!backend) {\n    return true;\n  }\n  auto res = backend->get_override_host();\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  auto str = core::decode(cx, res.unwrap());\n  if (!str) {\n    return false;\n  }\n  args.rval().setString(str);\n  return true;\n}\n\nbool Backend::port_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0);\n  auto backend = get_backend(cx, self);\n  if (!backend) {\n    return true;\n  }\n  auto res = backend->get_port();\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  args.rval().setNumber(res.unwrap());\n  return true;\n}\n\nbool Backend::connect_timeout_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0);\n  auto backend = get_backend(cx, self);\n  if (!backend) {\n    return true;\n  }\n  auto res = backend->get_connect_timeout_ms();\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  if (!res.unwrap().has_value()) {\n    args.rval().setNull();\n  } else {\n    args.rval().setNumber(res.unwrap().value());\n  }\n  return true;\n}\n\nbool Backend::first_byte_timeout_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0);\n  auto backend = get_backend(cx, self);\n  if (!backend) {\n    return true;\n  }\n  auto res = backend->get_first_byte_timeout_ms();\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  if (!res.unwrap().has_value()) {\n    args.rval().setNull();\n  } else {\n    args.rval().setNumber(res.unwrap().value());\n  }\n  return true;\n}\n\nbool Backend::between_bytes_timeout_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0);\n  auto backend = get_backend(cx, self);\n  if (!backend) {\n    return true;\n  }\n  auto res = backend->get_between_bytes_timeout_ms();\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  if (!res.unwrap().has_value()) {\n    args.rval().setNull();\n  } else {\n    args.rval().setNumber(res.unwrap().value());\n  }\n  return true;\n}\n\nbool Backend::http_keepalive_time_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0);\n  auto backend = get_backend(cx, self);\n  if (!backend) {\n    return true;\n  }\n  auto res = backend->get_http_keepalive_time();\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  args.rval().setNumber(res.unwrap());\n  return true;\n}\n\nbool Backend::tcp_keepalive_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0);\n\n  auto backend = get_backend(cx, self);\n  if (!backend) {\n    return true;\n  }\n\n  auto res = backend->get_tcp_keepalive_enable();\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  if (!res.unwrap()) {\n    args.rval().setNull();\n    return true;\n  } else {\n    JS::RootedObject tcp_keepalive_obj(cx, JS_NewPlainObject(cx));\n    {\n      auto res = backend->get_tcp_keepalive_interval();\n      if (auto *err = res.to_err()) {\n        HANDLE_ERROR(cx, *err);\n        return false;\n      }\n      JS::RootedValue val(cx, JS_NumberValue(res.unwrap()));\n      if (!JS_SetProperty(cx, tcp_keepalive_obj, \"intervalSecs\", val)) {\n        return false;\n      }\n    }\n    {\n      auto res = backend->get_tcp_keepalive_time();\n      if (auto *err = res.to_err()) {\n        HANDLE_ERROR(cx, *err);\n        return false;\n      }\n      JS::RootedValue val(cx, JS_NumberValue(res.unwrap()));\n      if (!JS_SetProperty(cx, tcp_keepalive_obj, \"timeSecs\", val)) {\n        return false;\n      }\n    }\n    {\n      auto res = backend->get_tcp_keepalive_probes();\n      if (auto *err = res.to_err()) {\n        HANDLE_ERROR(cx, *err);\n        return false;\n      }\n      JS::RootedValue val(cx, JS_NumberValue(res.unwrap()));\n      if (!JS_SetProperty(cx, tcp_keepalive_obj, \"probes\", val)) {\n        return false;\n      }\n    }\n    args.rval().setObject(*tcp_keepalive_obj);\n  }\n\n  return true;\n}\n\nbool Backend::is_ssl_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0);\n  auto backend = get_backend(cx, self);\n  if (!backend) {\n    return true;\n  }\n  auto res = backend->is_ssl();\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  args.rval().setBoolean(res.unwrap());\n  return true;\n}\n\nbool Backend::tls_min_version_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0);\n  auto backend = get_backend(cx, self);\n  if (!backend) {\n    return true;\n  }\n  auto res = backend->ssl_min_version();\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  if (!res.unwrap().has_value()) {\n    args.rval().setNull();\n  } else {\n    args.rval().setNumber(res.unwrap().value().get_version_number());\n  }\n  return true;\n}\n\nbool Backend::tls_max_version_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0);\n  auto backend = get_backend(cx, self);\n  if (!backend) {\n    return true;\n  }\n  auto res = backend->ssl_max_version();\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  if (!res.unwrap().has_value()) {\n    args.rval().setNull();\n  } else {\n    args.rval().setNumber(res.unwrap().value().get_version_number());\n  }\n  return true;\n}\n\nconst JSFunctionSpec Backend::static_methods[] = {\n    JS_FN(\"exists\", exists, 1, JSPROP_ENUMERATE), JS_FN(\"fromName\", from_name, 1, JSPROP_ENUMERATE),\n    JS_FN(\"health\", health_for_name, 1, JSPROP_ENUMERATE), JS_FS_END};\nconst JSPropertySpec Backend::static_properties[] = {JS_PS_END};\nconst JSFunctionSpec Backend::methods[] = {\n    JS_FN(\"health\", health, 0, JSPROP_ENUMERATE), JS_FN(\"toString\", name_get, 0, JSPROP_ENUMERATE),\n    JS_FN(\"toName\", name_get, 0, JSPROP_ENUMERATE), JS_FS_END};\nconst JSPropertySpec Backend::properties[] = {\n    JS_PSG(\"name\", name_get, JSPROP_ENUMERATE),\n    JS_PSG(\"isDynamic\", is_dynamic_get, JSPROP_ENUMERATE),\n    JS_PSG(\"target\", target_get, JSPROP_ENUMERATE),\n    JS_PSG(\"hostOverride\", host_override_get, JSPROP_ENUMERATE),\n    JS_PSG(\"port\", port_get, JSPROP_ENUMERATE),\n    JS_PSG(\"connectTimeout\", connect_timeout_get, JSPROP_ENUMERATE),\n    JS_PSG(\"firstByteTimeout\", first_byte_timeout_get, JSPROP_ENUMERATE),\n    JS_PSG(\"betweenBytesTimeout\", between_bytes_timeout_get, JSPROP_ENUMERATE),\n    JS_PSG(\"httpKeepaliveTime\", http_keepalive_time_get, JSPROP_ENUMERATE),\n    JS_PSG(\"tcpKeepalive\", tcp_keepalive_get, JSPROP_ENUMERATE),\n    JS_PSG(\"isSSL\", is_ssl_get, JSPROP_ENUMERATE),\n    JS_PSG(\"tlsMinVersion\", tls_min_version_get, JSPROP_ENUMERATE),\n    JS_PSG(\"tlsMaxVersion\", tls_max_version_get, JSPROP_ENUMERATE),\n    JS_PS_END};\n\nJSObject *Backend::create(JSContext *cx, JS::HandleObject request) {\n  JS::RootedValue request_url(cx, RequestOrResponse::url(request));\n  auto url_string = core::encode_spec_string(cx, request_url);\n  if (!url_string.data) {\n    return nullptr;\n  }\n\n  auto url = jsurl::new_jsurl(&url_string);\n  if (!url) {\n    JS_ReportErrorUTF8(cx, \"URL constructor: %s is not a valid URL.\", (char *)url_string.data);\n    return nullptr;\n  }\n  const jsurl::SpecSlice slice = jsurl::host(url);\n  auto name_js_str = JS_NewStringCopyN(cx, (char *)slice.data, slice.len);\n  if (!name_js_str) {\n    return nullptr;\n  }\n  std::string name_str((char *)slice.data, slice.len);\n\n  JS::RootedValue name(cx, JS::StringValue(name_js_str));\n  JS::SetReservedSlot(request, static_cast<uint32_t>(Request::Slots::Backend), name);\n\n  // Check if we already constructed an implicit dynamic backend for this host.\n  bool found;\n  JS::RootedValue already_built_backend(cx);\n  if (!JS_HasProperty(cx, Backend::backends, name_str.c_str(), &found)) {\n    return nullptr;\n  }\n  if (found) {\n    if (!JS_GetProperty(cx, Backend::backends, name_str.c_str(), &already_built_backend)) {\n      return nullptr;\n    }\n    JS::RootedObject backend(cx, &already_built_backend.toObject());\n\n    return backend;\n  }\n\n  auto backend_instance = JS_NewObjectWithGivenProto(cx, &Backend::class_, Backend::proto_obj);\n  if (!backend_instance) {\n    return nullptr;\n  }\n  JS::RootedValue backend_val(cx, JS::ObjectValue(*backend_instance));\n  JS::RootedObject backend(cx, backend_instance);\n  if (!backend) {\n    return nullptr;\n  }\n\n  host_api::BackendConfig backend_config = default_backend_config.clone();\n\n  auto host_backend = set_backend(cx, backend, name);\n  if (!host_backend) {\n    return nullptr;\n  }\n  if (!set_host_override(cx, backend_config, name)) {\n    return nullptr;\n  }\n  auto target_string_slice = core::encode_spec_string(cx, name);\n  if (!target_string_slice.data) {\n    return nullptr;\n  }\n  std::string_view target_string(reinterpret_cast<char *>(target_string_slice.data),\n                                 target_string_slice.len);\n  if (!validate_target(cx, target_string)) {\n    return nullptr;\n  }\n  const jsurl::SpecString origin_specstring = jsurl::origin(url);\n  std::string_view origin((char *)origin_specstring.data, origin_specstring.len);\n\n  auto use_ssl = origin.rfind(\"https://\", 0) == 0;\n  if (use_ssl) {\n    backend_config.use_ssl = true;\n    if (!set_sni_hostname(cx, backend_config, name)) {\n      return nullptr;\n    }\n  }\n\n  auto res = host_api::HttpReq::register_dynamic_backend(host_backend->name(), target_string,\n                                                         backend_config);\n  if (auto *err = res.to_err()) {\n    if (host_api::error_is_unsupported(*err)) {\n      JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                                JSMSG_DYNAMIC_BACKENDS_UNSUPPORTED_IMPLICIT, target_string.data(),\n                                url_string.data);\n      return nullptr;\n    }\n    HANDLE_ERROR(cx, *err);\n    return nullptr;\n  }\n  if (!JS_SetProperty(cx, Backend::backends, name_str.c_str(), backend_val)) {\n    return nullptr;\n  }\n  return backend;\n}\n\nbool Backend::constructor(JSContext *cx, unsigned argc, JS::Value *vp) {\n  REQUEST_HANDLER_ONLY(\"The Backend builtin\");\n  CTOR_HEADER(\"Backend\", 1);\n\n  auto configuration_parameter = args.get(0);\n\n  if (!configuration_parameter.isObject()) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                              JSMSG_BACKEND_PARAMETER_NOT_OBJECT);\n    return false;\n  }\n\n  auto configuration = RootedObject(cx, &configuration_parameter.toObject());\n\n  JS::RootedObject backend(cx, JS_NewObjectForConstructor(cx, &class_, args));\n  if (!backend) {\n    return false;\n  }\n\n  JS::RootedValue name_val(cx);\n  if (!JS_GetProperty(cx, configuration, \"name\", &name_val)) {\n    return false;\n  }\n  auto host_backend = set_backend(cx, backend, name_val);\n  if (!host_backend) {\n    return false;\n  }\n\n  JS::RootedValue target_val(cx);\n  if (!JS_GetProperty(cx, configuration, \"target\", &target_val)) {\n    return false;\n  }\n  if (target_val.isNullOrUndefined()) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_BACKEND_TARGET_NOT_SET);\n    return false;\n  }\n  auto target_string_slice = core::encode_spec_string(cx, target_val);\n  if (!target_string_slice.data) {\n    return false;\n  }\n  std::string_view target_string(reinterpret_cast<char *>(target_string_slice.data),\n                                 target_string_slice.len);\n  if (!validate_target(cx, target_string)) {\n    return false;\n  }\n\n  host_api::BackendConfig backend_config = default_backend_config.clone();\n  if (!apply_backend_config(cx, backend_config, configuration)) {\n    return false;\n  }\n\n  auto res = host_api::HttpReq::register_dynamic_backend(host_backend->name(), target_string,\n                                                         backend_config);\n  if (auto *err = res.to_err()) {\n    if (host_api::error_is_unsupported(*err)) {\n      JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                                JSMSG_DYNAMIC_BACKENDS_UNSUPPORTED_EXPLICIT,\n                                target_string_slice.data);\n      return false;\n    }\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  args.rval().setObject(*backend);\n  return true;\n}\n\nvoid Backend::finalize(JS::GCContext *gcx, JSObject *obj) {\n  auto backend = static_cast<host_api::Backend *>(\n      JS::GetReservedSlot(obj, Backend::Slots::HostBackend).toPrivate());\n  free(backend);\n}\n\nbool set_default_backend_config(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = JS::CallArgsFromVp(argc, vp);\n  if (!args.requireAtLeast(cx, \"setDefaultDynamicBackendConfiguration\", 1)) {\n    return false;\n  }\n  auto backend_config_val = args.get(0);\n  if (!backend_config_val.isObject()) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                              JSMSG_BACKEND_PARAMETER_NOT_OBJECT);\n    return false;\n  }\n  RootedObject backend_config_obj(cx, &backend_config_val.toObject());\n  if (!apply_backend_config(cx, default_backend_config, backend_config_obj)) {\n    return false;\n  }\n  return true;\n}\n\n// TODO: in next major, when global and fastly experimental are deprecated,\n//       make it so that calling twice always throws an already enforced error.\n//       and possibly also don't allow changing the default again.\nbool enforce_explicit_backends(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = JS::CallArgsFromVp(argc, vp);\n  auto default_backend_val = args.get(0);\n  if (!default_backend_val.isNullOrUndefined()) {\n    if (!default_backend_val.isString()) {\n      api::throw_error(cx, api::Errors::TypeError, \"enforceExplicitBackends\", \"defaultBackend\",\n                       \"be undefined or a string\");\n      return false;\n    }\n    JS::RootedString backend(cx, JS::ToString(cx, default_backend_val));\n    if (!backend) {\n      return false;\n    }\n    Fastly::defaultBackend = backend;\n  }\n  Fastly::allowDynamicBackends = false;\n  args.rval().setUndefined();\n  return true;\n}\n\nbool install(api::Engine *engine) {\n  JS::RootedObject backends(engine->cx(), JS_NewPlainObject(engine->cx()));\n  if (!backends) {\n    return false;\n  }\n  Backend::backends.init(engine->cx(), backends);\n  if (!Backend::init_class_impl(engine->cx(), engine->global())) {\n    return false;\n  }\n\n  RootedObject backend_obj(engine->cx(),\n                           JS_GetConstructor(engine->cx(), BuiltinImpl<Backend>::proto_obj));\n  RootedValue backend_val(engine->cx(), ObjectValue(*backend_obj));\n  RootedObject backend_ns(engine->cx(), JS_NewObject(engine->cx(), nullptr));\n  if (!JS_SetProperty(engine->cx(), backend_ns, \"Backend\", backend_val)) {\n    return false;\n  }\n  auto set_default_backend_config_fn = JS_NewFunction(engine->cx(), &set_default_backend_config, 1,\n                                                      0, \"setDefaultDynamicBackendConfig\");\n  RootedObject set_default_backend_config_obj(engine->cx(),\n                                              JS_GetFunctionObject(set_default_backend_config_fn));\n  RootedValue set_default_backend_config_val(engine->cx(),\n                                             JS::ObjectValue(*set_default_backend_config_obj));\n  if (!JS_SetProperty(engine->cx(), backend_ns, \"setDefaultDynamicBackendConfig\",\n                      set_default_backend_config_val)) {\n    return false;\n  }\n\n  auto enforce_explicit_backends_fn =\n      JS_NewFunction(engine->cx(), &enforce_explicit_backends, 1, 0, \"enforceExplicitBackends\");\n  RootedObject enforce_explicit_backends_obj(engine->cx(),\n                                             JS_GetFunctionObject(enforce_explicit_backends_fn));\n  RootedValue enforce_explicit_backends_val(engine->cx(),\n                                            JS::ObjectValue(*enforce_explicit_backends_obj));\n  if (!JS_SetProperty(engine->cx(), backend_ns, \"enforceExplicitBackends\",\n                      enforce_explicit_backends_val)) {\n    return false;\n  }\n\n  RootedValue backend_ns_val(engine->cx(), JS::ObjectValue(*backend_ns));\n  if (!engine->define_builtin_module(\"fastly:backend\", backend_ns_val)) {\n    return false;\n  }\n  return true;\n}\n\n} // namespace fastly::backend\n"
  },
  {
    "path": "runtime/fastly/builtins/backend.h",
    "content": "#ifndef FASTLY_BACKEND_H\n#define FASTLY_BACKEND_H\n\n#include \"builtin.h\"\n#include \"extension-api.h\"\n\nnamespace fastly::backend {\n\nclass Backend : public builtins::FinalizableBuiltinImpl<Backend> {\nprivate:\npublic:\n  static constexpr const char *class_name = \"Backend\";\n  static const int ctor_length = 1;\n  enum Slots { HostBackend, Count };\n\n  static const JSFunctionSpec static_methods[];\n  static const JSPropertySpec static_properties[];\n\n  static const JSFunctionSpec methods[];\n  static const JSPropertySpec properties[];\n\n  inline static JS::PersistentRootedObject backends;\n\n  static JSString *name(JSContext *cx, JSObject *self);\n  static JSObject *create(JSContext *cx, JS::HandleObject request);\n\n  // static methods\n  static bool exists(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool from_name(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  static bool health_for_name(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  // prototype methods\n  static bool health(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  // getters\n  static bool name_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool is_dynamic_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool target_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool host_override_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool port_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool connect_timeout_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool first_byte_timeout_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool between_bytes_timeout_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool http_keepalive_time_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool tcp_keepalive_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool is_ssl_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool tls_min_version_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool tls_max_version_get(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  static bool constructor(JSContext *cx, unsigned argc, JS::Value *vp);\n  static void finalize(JS::GCContext *gcx, JSObject *obj);\n\n  static bool get_from_valid_name(JSContext *cx, host_api::HostString name,\n                                  JS::MutableHandleValue out);\n};\n\nbool set_default_backend_config(JSContext *cx, unsigned argc, JS::Value *vp);\n\n} // namespace fastly::backend\n\n#endif\n"
  },
  {
    "path": "runtime/fastly/builtins/body.cpp",
    "content": "#include <algorithm>\n#include <cstring>\n#include <iostream>\n#include <optional>\n#include <string>\n\n#include \"../../../StarlingMonkey/builtins/web/fetch/fetch-errors.h\"\n#include \"../../../StarlingMonkey/builtins/web/streams/native-stream-source.h\"\n#include \"../../../StarlingMonkey/builtins/web/url.h\"\n#include \"../../../StarlingMonkey/runtime/encode.h\"\n#include \"../host-api/host_api_fastly.h\"\n#include \"./fetch/request-response.h\"\n#include \"body.h\"\n#include \"fastly.h\"\n#include \"js/Stream.h\"\n\nusing builtins::web::streams::NativeStreamSource;\nusing fastly::FastlyGetErrorMessage;\nusing fastly::fastly::convertBodyInit;\nusing fastly::fetch::RequestOrResponse;\n\nnamespace fastly::body {\n\nhost_api::HttpBody host_body(JSObject *obj) {\n  JS::Value val = JS::GetReservedSlot(obj, static_cast<uint32_t>(FastlyBody::Slots::Body));\n  return host_api::HttpBody(static_cast<uint32_t>(val.toInt32()));\n}\n\n// concat(dest: FastlyBody): void;\nbool FastlyBody::concat(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(1);\n  auto destination_val = args.get(0);\n  if (!FastlyBody::is_instance(destination_val)) {\n    JS_ReportErrorUTF8(\n        cx, \"FastlyBody.concat: The `destination` argument is not an instance of FastlyBody.\");\n    return false;\n  }\n  JS::RootedObject destination(cx, &destination_val.toObject());\n\n  auto body = host_body(self);\n  auto result = body.append(host_body(destination));\n  if (auto *err = result.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  args.rval().setUndefined();\n  return true;\n}\n\n// read(chunkSize: number): ArrayBuffer;\nbool FastlyBody::read(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(1);\n  double chunkSize_val;\n  if (!JS::ToNumber(cx, args.get(0), &chunkSize_val)) {\n    return false;\n  }\n  if (chunkSize_val < 0) {\n    JS_ReportErrorUTF8(cx,\n                       \"FastlyBody.read: The `chunkSize` argument has to be a positive integer.\");\n    return false;\n  }\n  if (chunkSize_val < 0 || std::isnan(chunkSize_val) || std::isinf(chunkSize_val)) {\n    JS_ReportErrorASCII(cx, \"chunkSize parameter is an invalid value, only positive numbers can be \"\n                            \"used for chunkSize.\");\n    return false;\n  }\n  uint32_t chunkSize = std::round(chunkSize_val);\n\n  auto body = host_body(self);\n  auto result = body.read(chunkSize);\n  if (auto *err = result.to_err()) {\n    if (chunkSize < 0) {\n      JS_ReportErrorUTF8(cx,\n                         \"FastlyBody.read: The `chunkSize` argument has to be a positive integer.\");\n      return false;\n    }\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  auto &chunk = result.unwrap();\n  JS::UniqueChars buffer = std::move(chunk.ptr);\n  JS::RootedObject array_buffer(cx);\n  array_buffer.set(JS::NewArrayBufferWithContents(\n      cx, chunk.len, buffer.get(), JS::NewArrayBufferOutOfMemory::CallerMustFreeMemory));\n  if (!array_buffer) {\n    JS_ReportOutOfMemory(cx);\n    return false;\n  }\n\n  // `array_buffer` now owns `buf`\n  static_cast<void>(buffer.release());\n\n  args.rval().setObject(*array_buffer);\n  return true;\n}\n\n// append(data: BodyInit): void;\nbool FastlyBody::append(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(1);\n\n  auto body = host_body(self);\n  if (!body.valid()) {\n    return false;\n  }\n\n  auto data_val = args.get(0);\n  host_api::HttpBody source_body;\n  JS::UniqueChars data;\n  JS::RootedObject data_obj(cx, data_val.isObject() ? &data_val.toObject() : nullptr);\n  // If the data parameter is a Host-backed ReadableStream we optimise our implementation\n  // by using the ReadableStream's handle directly.\n  if (data_obj && JS::IsReadableStream(data_obj)) {\n    if (RequestOrResponse::body_unusable(cx, data_obj)) {\n      api::throw_error(cx, FetchErrors::BodyStreamUnusable);\n    }\n\n    // If the stream is backed by a C@E body handle, we can use that handle directly.\n    if (NativeStreamSource::stream_is_body(cx, data_obj)) {\n      JS::RootedObject stream_source(cx, NativeStreamSource::get_stream_source(cx, data_obj));\n      JS::RootedObject source_owner(cx, NativeStreamSource::owner(stream_source));\n\n      source_body = RequestOrResponse::body_handle(source_owner);\n      if (!source_body.valid()) {\n        return false;\n      }\n      auto res = body.append(source_body);\n      if (auto *err = res.to_err()) {\n        HANDLE_ERROR(cx, *err);\n        return false;\n      }\n      args.rval().setUndefined();\n      return true;\n    } else {\n      JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                                JSMSG_BODY_APPEND_CONTENT_STREAM);\n      return false;\n    }\n  } else {\n    auto result = convertBodyInit(cx, data_val);\n    if (result.isErr()) {\n      return false;\n    }\n    size_t length;\n    std::tie(data, length) = result.unwrap();\n    auto write_res = body.write_all_back(reinterpret_cast<uint8_t *>(data.get()), length);\n    if (auto *err = write_res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return false;\n    }\n    args.rval().setUndefined();\n    return true;\n  }\n}\n\n// prepend(data: BodyInit): void;\nbool FastlyBody::prepend(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(1);\n\n  auto body = host_body(self);\n  if (!body.valid()) {\n    return false;\n  }\n\n  auto data_val = args.get(0);\n  host_api::HttpBody source_body;\n  JS::RootedObject data_obj(cx, data_val.isObject() ? &data_val.toObject() : nullptr);\n  // If the data parameter is a Host-backed ReadableStream we optimise our implementation\n  // by using the ReadableStream's handle directly.\n  if (data_obj && JS::IsReadableStream(data_obj)) {\n    if (RequestOrResponse::body_unusable(cx, data_obj)) {\n      return api::throw_error(cx, FetchErrors::BodyStreamUnusable);\n    }\n\n    // If the stream is backed by a C@E body handle, we can use that handle directly.\n    if (NativeStreamSource::stream_is_body(cx, data_obj)) {\n      JS::RootedObject stream_source(cx, NativeStreamSource::get_stream_source(cx, data_obj));\n      JS::RootedObject source_owner(cx, NativeStreamSource::owner(stream_source));\n\n      source_body = RequestOrResponse::body_handle(source_owner);\n      if (!source_body.valid()) {\n        return false;\n      }\n\n      auto make_res = host_api::HttpBody::make();\n      if (auto *err = make_res.to_err()) {\n        HANDLE_ERROR(cx, *err);\n        return false;\n      }\n\n      auto new_body = make_res.unwrap();\n      if (!new_body.valid()) {\n        return false;\n      }\n\n      auto res = new_body.append(source_body);\n      if (auto *err = res.to_err()) {\n        HANDLE_ERROR(cx, *err);\n        return false;\n      }\n      res = new_body.append(body);\n      if (auto *err = res.to_err()) {\n        HANDLE_ERROR(cx, *err);\n        return false;\n      }\n\n      JS::SetReservedSlot(self, static_cast<uint32_t>(Slots::Body),\n                          JS::Int32Value(new_body.handle));\n\n      args.rval().setUndefined();\n      return true;\n    } else {\n      JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                                JSMSG_BODY_PREPEND_CONTENT_STREAM);\n      return false;\n    }\n  } else {\n    auto result = convertBodyInit(cx, data_val);\n    if (result.isErr()) {\n      return false;\n    }\n    size_t length;\n    JS::UniqueChars data;\n    std::tie(data, length) = result.unwrap();\n    auto write_res = body.write_all_front(reinterpret_cast<uint8_t *>(data.get()), length);\n    if (auto *err = write_res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return false;\n    }\n    args.rval().setUndefined();\n    return true;\n  }\n}\n\n// close(): void;\nbool FastlyBody::close(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0);\n  auto body = host_body(self);\n  auto result = body.close();\n\n  if (auto *err = result.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  args.rval().setUndefined();\n  return true;\n}\n\nbool FastlyBody::abandon(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0);\n  auto body = host_body(self);\n  auto result = body.abandon();\n\n  if (auto *err = result.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  args.rval().setUndefined();\n  return true;\n}\n\nconst JSFunctionSpec FastlyBody::static_methods[] = {\n    JS_FS_END,\n};\n\nconst JSPropertySpec FastlyBody::static_properties[] = {\n    JS_PS_END,\n};\n\nconst JSFunctionSpec FastlyBody::methods[] = {\n    JS_FN(\"concat\", concat, 1, JSPROP_ENUMERATE),\n    JS_FN(\"read\", read, 1, JSPROP_ENUMERATE),\n    JS_FN(\"append\", append, 1, JSPROP_ENUMERATE),\n    JS_FN(\"prepend\", prepend, 1, JSPROP_ENUMERATE),\n    JS_FN(\"close\", close, 0, JSPROP_ENUMERATE),\n    JS_FN(\"abandon\", abandon, 0, JSPROP_ENUMERATE),\n    JS_FS_END,\n};\n\nconst JSPropertySpec FastlyBody::properties[] = {\n    JS_STRING_SYM_PS(toStringTag, \"FastlyBody\", JSPROP_READONLY),\n    JS_PS_END,\n};\n\nbool FastlyBody::constructor(JSContext *cx, unsigned argc, JS::Value *vp) {\n  REQUEST_HANDLER_ONLY(\"The FastlyBody builtin\");\n  CTOR_HEADER(\"FastlyBody\", 0);\n\n  auto make_res = host_api::HttpBody::make();\n  if (auto *err = make_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  auto body = make_res.unwrap();\n  if (!body.valid()) {\n    return false;\n  }\n\n  JS::RootedObject instance(cx, JS_NewObjectForConstructor(cx, &class_, args));\n  if (!instance) {\n    return false;\n  }\n  JS::SetReservedSlot(instance, static_cast<uint32_t>(Slots::Body), JS::Int32Value(body.handle));\n\n  args.rval().setObject(*instance);\n  return true;\n}\n\nJSObject *FastlyBody::create(JSContext *cx, uint32_t handle) {\n  host_api::HttpBody body{handle};\n\n  JS::RootedObject instance(\n      cx, JS_NewObjectWithGivenProto(cx, &FastlyBody::class_, FastlyBody::proto_obj));\n  if (!instance) {\n    return nullptr;\n  }\n  JS::SetReservedSlot(instance, static_cast<uint32_t>(Slots::Body), JS::Int32Value(handle));\n  return instance;\n}\n\nbool install(api::Engine *engine) {\n  if (!FastlyBody::init_class_impl(engine->cx(), engine->global())) {\n    return false;\n  }\n  RootedObject body_obj(engine->cx(), JS_GetConstructor(engine->cx(), FastlyBody::proto_obj));\n  RootedValue body_val(engine->cx(), ObjectValue(*body_obj));\n  RootedObject body_ns(engine->cx(), JS_NewObject(engine->cx(), nullptr));\n  if (!JS_SetProperty(engine->cx(), body_ns, \"FastlyBody\", body_val)) {\n    return false;\n  }\n  RootedValue body_ns_val(engine->cx(), JS::ObjectValue(*body_ns));\n  if (!engine->define_builtin_module(\"fastly:body\", body_ns_val)) {\n    return false;\n  }\n  return true;\n}\n\n} // namespace fastly::body\n"
  },
  {
    "path": "runtime/fastly/builtins/body.h",
    "content": "#ifndef JS_COMPUTE_RUNTIME_BODY_H\n#define JS_COMPUTE_RUNTIME_BODY_H\n\n#include \"builtin.h\"\n#include \"extension-api.h\"\n\nnamespace fastly::body {\n\nclass FastlyBody final : public builtins::BuiltinImpl<FastlyBody> {\npublic:\n  static bool concat(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool read(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool append(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool prepend(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool close(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool abandon(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  static constexpr const char *class_name = \"FastlyBody\";\n  enum class Slots {\n    Body,\n    Count,\n  };\n  static const JSFunctionSpec static_methods[];\n  static const JSPropertySpec static_properties[];\n  static const JSFunctionSpec methods[];\n  static const JSPropertySpec properties[];\n\n  static const unsigned ctor_length = 0;\n\n  static JSObject *create(JSContext *cx, uint32_t handle);\n  static bool constructor(JSContext *cx, unsigned argc, JS::Value *vp);\n};\n\n} // namespace fastly::body\n\n#endif\n"
  },
  {
    "path": "runtime/fastly/builtins/cache-core.cpp",
    "content": "#include \"cache-core.h\"\n#include \"../../../StarlingMonkey/builtins/web/fetch/headers.h\"\n#include \"../../../StarlingMonkey/builtins/web/streams/native-stream-source.h\"\n#include \"../../../StarlingMonkey/runtime/encode.h\"\n#include \"../host-api/host_api_fastly.h\"\n#include \"body.h\"\n#include \"builtin.h\"\n#include \"fastly.h\"\n#include \"host_api.h\"\n#include \"js/Stream.h\"\n#include <iostream>\n\nusing builtins::web::fetch::Headers;\nusing builtins::web::streams::NativeStreamSource;\nusing fastly::body::FastlyBody;\nusing fastly::fastly::convertBodyInit;\nusing fastly::fetch::Request;\nusing fastly::fetch::RequestOrResponse;\n\nusing builtins::web::fetch::Headers;\n\nnamespace fastly::cache_core {\n\nnamespace {\n\napi::Engine *ENGINE;\n// The JavaScript LookupOptions parameter we are parsing should have the below interface:\n// interface LookupOptions {\n//   headers?: HeadersInit;\n// }\nJS::Result<host_api::CacheLookupOptions> parseLookupOptions(JSContext *cx,\n                                                            JS::HandleValue options_val) {\n  host_api::CacheLookupOptions options;\n  // options parameter is optional\n  // options is meant to be an object with an optional headers field,\n  // the headers field can be:\n  // Headers | string[][] | Record<string, string>;\n  if (!options_val.isUndefined()) {\n    if (!options_val.isObject()) {\n      JS_ReportErrorASCII(cx, \"options argument must be an object\");\n      return JS::Result<host_api::CacheLookupOptions>(JS::Error());\n    }\n    JS::RootedObject options_obj(cx, &options_val.toObject());\n    JS::RootedValue headers_val(cx);\n    if (!JS_GetProperty(cx, options_obj, \"headers\", &headers_val)) {\n      return JS::Result<host_api::CacheLookupOptions>(JS::Error());\n    }\n    // headers property is optional\n    if (!headers_val.isUndefined()) {\n      if (!headers_val.isObject()) {\n        JS_ReportErrorASCII(\n            cx, \"Failed to construct Headers object. If defined, the first argument must be either \"\n                \"a [ ['name', 'value'], ... ] sequence, or a { 'name' : 'value', ... } record.\");\n        return JS::Result<host_api::CacheLookupOptions>(JS::Error());\n      }\n\n      auto request_handle_res = host_api::HttpReq::make();\n      if (auto *err = request_handle_res.to_err()) {\n        HANDLE_ERROR(cx, *err);\n        return JS::Result<host_api::CacheLookupOptions>(JS::Error());\n      }\n      auto request_handle = request_handle_res.unwrap();\n\n      JS::RootedObject headers(cx,\n                               Headers::create(cx, headers_val, Headers::HeadersGuard::Request));\n      if (!headers) {\n        return JS::Result<host_api::CacheLookupOptions>(JS::Error());\n      }\n      if (Headers::mode(headers) == Headers::Mode::Uninitialized) {\n        return options;\n      }\n      MOZ_ASSERT(Headers::mode(headers) == Headers::Mode::ContentOnly);\n      Headers::HeadersList *headers_list = Headers::get_list(cx, headers);\n      MOZ_ASSERT(headers_list);\n      auto res = host_api::write_headers(request_handle.headers_writable(), *headers_list);\n      if (auto *err = res.to_err()) {\n        return JS::Result<host_api::CacheLookupOptions>(JS::Error());\n      }\n      options.request_headers = host_api::HttpReq(request_handle);\n    }\n  }\n  return options;\n}\n\n// The JavaScript TransactionUpdateOptions parameter we are parsing should have the below interface:\n// interface TransactionUpdateOptions {\n//   maxAge: number,\n//   vary?: Array<string>,\n//   initialAge?: number,\n//   staleWhileRevalidate?: number,\n//   surrogateKeys?: Array<string>,\n//   length?: number,\n//   userMetadata?: ArrayBufferView | ArrayBuffer | URLSearchParams | string,\n// }\nJS::Result<host_api::CacheWriteOptions> parseTransactionUpdateOptions(JSContext *cx,\n                                                                      JS::HandleValue options_val) {\n  host_api::CacheWriteOptions options;\n  if (!options_val.isObject()) {\n    JS_ReportErrorASCII(cx, \"options argument must be an object\");\n    return JS::Result<host_api::CacheWriteOptions>(JS::Error());\n  }\n  JS::RootedObject options_obj(cx, &options_val.toObject());\n\n  JS::RootedValue maxAge_val(cx);\n  if (!JS_GetProperty(cx, options_obj, \"maxAge\", &maxAge_val) || maxAge_val.isUndefined()) {\n    JS_ReportErrorASCII(cx, \"maxAge is required\");\n    return JS::Result<host_api::CacheWriteOptions>(JS::Error());\n  }\n\n  // Convert maxAge field into a number and check the value adheres to our\n  // validation rules.\n  double maxAge;\n  if (!JS::ToNumber(cx, maxAge_val, &maxAge)) {\n    return JS::Result<host_api::CacheWriteOptions>(JS::Error());\n  }\n  if (maxAge < 0 || std::isnan(maxAge) || std::isinf(maxAge)) {\n    JS_ReportErrorASCII(\n        cx,\n        \"maxAge field is an invalid value, only positive numbers can be used for maxAge values.\");\n    return JS::Result<host_api::CacheWriteOptions>(JS::Error());\n  }\n  // turn millisecond representation into nanosecond representation\n  constexpr double max_time_ms =\n      static_cast<double>(std::numeric_limits<uint64_t>::max()) / 1'000'000;\n  if (maxAge > max_time_ms) {\n    JS_ReportErrorASCII(cx, \"maxAge can not be greater than 2^63.\");\n    return JS::Result<host_api::CacheWriteOptions>(JS::Error());\n  }\n  options.max_age_ns = JS::ToUint64(maxAge) * 1'000'000;\n\n  JS::RootedValue initialAge_val(cx);\n  if (!JS_GetProperty(cx, options_obj, \"initialAge\", &initialAge_val)) {\n    return JS::Result<host_api::CacheWriteOptions>(JS::Error());\n  }\n  if (!initialAge_val.isUndefined()) {\n    // Convert initialAge field into a number and check the value adheres to our\n    // validation rules.\n    double initialAge;\n    if (!JS::ToNumber(cx, initialAge_val, &initialAge)) {\n      return JS::Result<host_api::CacheWriteOptions>(JS::Error());\n    }\n    if (initialAge < 0 || std::isnan(initialAge) || std::isinf(initialAge)) {\n      JS_ReportErrorASCII(cx, \"initialAge field is an invalid value, only positive numbers can be \"\n                              \"used for initialAge values.\");\n      return JS::Result<host_api::CacheWriteOptions>(JS::Error());\n    }\n    // turn millisecond representation into nanosecond representation\n    if (initialAge > max_time_ms) {\n      JS_ReportErrorASCII(cx, \"initialAge can not be greater than 2^63.\");\n      return JS::Result<host_api::CacheWriteOptions>(JS::Error());\n    }\n    options.initial_age_ns = JS::ToUint64(initialAge) * 1'000'000;\n  }\n\n  JS::RootedValue staleWhileRevalidate_val(cx);\n  if (!JS_GetProperty(cx, options_obj, \"staleWhileRevalidate\", &staleWhileRevalidate_val)) {\n    return JS::Result<host_api::CacheWriteOptions>(JS::Error());\n  }\n  if (!staleWhileRevalidate_val.isUndefined()) {\n    // Convert staleWhileRevalidate field into a number and check the value adheres to our\n    // validation rules.\n    double staleWhileRevalidate;\n    if (!JS::ToNumber(cx, staleWhileRevalidate_val, &staleWhileRevalidate)) {\n      return JS::Result<host_api::CacheWriteOptions>(JS::Error());\n    }\n    if (staleWhileRevalidate < 0 || std::isnan(staleWhileRevalidate) ||\n        std::isinf(staleWhileRevalidate)) {\n      JS_ReportErrorASCII(cx, \"staleWhileRevalidate field is an invalid value, only positive \"\n                              \"numbers can be used for staleWhileRevalidate values.\");\n      return JS::Result<host_api::CacheWriteOptions>(JS::Error());\n    }\n    // turn millisecond representation into nanosecond representation\n    if (staleWhileRevalidate > max_time_ms) {\n      JS_ReportErrorASCII(cx, \"staleWhileRevalidate can not be greater than 2^63.\");\n      return JS::Result<host_api::CacheWriteOptions>(JS::Error());\n    }\n    options.stale_while_revalidate_ns = JS::ToUint64(staleWhileRevalidate) * 1'000'000;\n  }\n\n  JS::RootedValue length_val(cx);\n  if (!JS_GetProperty(cx, options_obj, \"length\", &length_val)) {\n    return JS::Result<host_api::CacheWriteOptions>(JS::Error());\n  }\n  if (!length_val.isUndefined()) {\n    // Convert length field into a number and check the value adheres to our\n    // validation rules.\n    double length;\n    if (!JS::ToNumber(cx, length_val, &length)) {\n      return JS::Result<host_api::CacheWriteOptions>(JS::Error());\n    }\n    if (length < 0 || std::isnan(length) || std::isinf(length)) {\n      JS_ReportErrorASCII(\n          cx,\n          \"length field is an invalid value, only positive numbers can be used for length values.\");\n      return JS::Result<host_api::CacheWriteOptions>(JS::Error());\n    }\n    options.length = JS::ToUint64(length);\n  }\n\n  JS::RootedValue vary_val(cx);\n  if (!JS_GetProperty(cx, options_obj, \"vary\", &vary_val)) {\n    return JS::Result<host_api::CacheWriteOptions>(JS::Error());\n  }\n  if (!vary_val.isUndefined()) {\n    JS::ForOfIterator it(cx);\n    if (!it.init(vary_val)) {\n      return JS::Result<host_api::CacheWriteOptions>(JS::Error());\n    }\n\n    JS::RootedValue entry_val(cx);\n    std::string varies;\n    bool first = true;\n    while (true) {\n      bool done;\n      if (!it.next(&entry_val, &done)) {\n        return JS::Result<host_api::CacheWriteOptions>(JS::Error());\n      }\n\n      if (done) {\n        break;\n      }\n      auto vary = core::encode(cx, entry_val);\n      if (!vary) {\n        return JS::Result<host_api::CacheWriteOptions>(JS::Error());\n      }\n      if (first) {\n        first = false;\n      } else {\n        varies += \" \";\n      }\n      varies += vary;\n    }\n\n    options.vary_rule = varies;\n  }\n\n  JS::RootedValue surrogateKeys_val(cx);\n  if (!JS_GetProperty(cx, options_obj, \"surrogateKeys\", &surrogateKeys_val)) {\n    return JS::Result<host_api::CacheWriteOptions>(JS::Error());\n  }\n  if (!surrogateKeys_val.isUndefined()) {\n    JS::ForOfIterator it(cx);\n    if (!it.init(surrogateKeys_val)) {\n      return JS::Result<host_api::CacheWriteOptions>(JS::Error());\n    }\n\n    JS::RootedValue entry_val(cx);\n    std::string surrogateKeys;\n    bool first = true;\n    while (true) {\n      bool done;\n      if (!it.next(&entry_val, &done)) {\n        return JS::Result<host_api::CacheWriteOptions>(JS::Error());\n      }\n\n      if (done) {\n        break;\n      }\n      auto skey = core::encode(cx, entry_val);\n      if (!skey) {\n        return JS::Result<host_api::CacheWriteOptions>(JS::Error());\n      }\n      if (first) {\n        first = false;\n      } else {\n        surrogateKeys += \" \";\n      }\n      surrogateKeys += skey;\n    }\n\n    options.surrogate_keys = surrogateKeys;\n  }\n\n  JS::RootedValue userMetadata_val(cx);\n  if (!JS_GetProperty(cx, options_obj, \"userMetadata\", &userMetadata_val)) {\n    return JS::Result<host_api::CacheWriteOptions>(JS::Error());\n  }\n  if (!userMetadata_val.isUndefined()) {\n    auto result = convertBodyInit(cx, userMetadata_val);\n    if (result.isErr()) {\n      return JS::Result<host_api::CacheWriteOptions>(JS::Error());\n    }\n    size_t length;\n    JS::UniqueChars data;\n    std::tie(data, length) = result.unwrap();\n    options.metadata = host_api::HostBytes(\n        std::unique_ptr<uint8_t[]>(reinterpret_cast<uint8_t *>(std::move(data).release())), length);\n  }\n\n  return options;\n}\n\n// The JavaScript TransactionInsertOptions parameter we are parsing should have the below interface:\n// interface TransactionInsertOptions {\n//   maxAge: number,\n//   vary?: Array<string>,\n//   initialAge?: number,\n//   staleWhileRevalidate?: number,\n//   surrogateKeys?: Array<string>,\n//   length?: number,\n//   userMetadata?: ArrayBufferView | ArrayBuffer | URLSearchParams | string,\n//   sensitive?: boolean,\n// }\nJS::Result<host_api::CacheWriteOptions> parseTransactionInsertOptions(JSContext *cx,\n                                                                      JS::HandleValue options_val) {\n  auto options_res = parseTransactionUpdateOptions(cx, options_val);\n  if (options_res.isErr()) {\n    return JS::Result<host_api::CacheWriteOptions>(JS::Error());\n  }\n  auto options = options_res.unwrap();\n  JS::RootedObject options_obj(cx, &options_val.toObject());\n\n  JS::RootedValue sensitive_val(cx);\n  if (!JS_GetProperty(cx, options_obj, \"sensitive\", &sensitive_val)) {\n    return JS::Result<host_api::CacheWriteOptions>(JS::Error());\n  }\n  options.sensitive = JS::ToBoolean(sensitive_val);\n\n  return options;\n}\n\n// The JavaScript TransactionInsertOptions parameter we are parsing should have the below interface:\n// interface InsertOptions extends TransactionInsertOptions {\n//   headers?: HeadersInit,\n// }\nJS::Result<host_api::CacheWriteOptions> parseInsertOptions(JSContext *cx,\n                                                           JS::HandleValue options_val) {\n  auto options_res = parseTransactionInsertOptions(cx, options_val);\n  if (options_res.isErr()) {\n    return JS::Result<host_api::CacheWriteOptions>(JS::Error());\n  }\n  auto options = options_res.unwrap();\n  JS::RootedObject options_obj(cx, &options_val.toObject());\n  JS::RootedValue headers_val(cx);\n  if (!JS_GetProperty(cx, options_obj, \"headers\", &headers_val)) {\n    return JS::Result<host_api::CacheWriteOptions>(JS::Error());\n  }\n  // headers property is optional\n  if (!headers_val.isUndefined()) {\n    if (!headers_val.isObject()) {\n      JS_ReportErrorASCII(\n          cx, \"Failed to construct Headers object. If defined, the first argument must be either \"\n              \"a [ ['name', 'value'], ... ] sequence, or a { 'name' : 'value', ... } record.\");\n      return JS::Result<host_api::CacheWriteOptions>(JS::Error());\n    }\n\n    auto request_handle_res = host_api::HttpReq::make();\n    if (auto *err = request_handle_res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return JS::Result<host_api::CacheWriteOptions>(JS::Error());\n    }\n    auto request_handle = request_handle_res.unwrap();\n\n    JS::RootedObject headers(cx, Headers::create(cx, headers_val, Headers::HeadersGuard::Request));\n    if (!headers) {\n      return JS::Result<host_api::CacheWriteOptions>(JS::Error());\n    }\n    if (Headers::mode(headers) == Headers::Mode::Uninitialized) {\n      return options;\n    }\n    MOZ_ASSERT(Headers::mode(headers) == Headers::Mode::ContentOnly);\n    Headers::HeadersList *headers_list = Headers::get_list(cx, headers);\n    MOZ_ASSERT(headers_list);\n    auto res = host_api::write_headers(request_handle.headers_writable(), *headers_list);\n    if (auto *err = res.to_err()) {\n      return JS::Result<host_api::CacheWriteOptions>(JS::Error());\n    }\n    options.request_headers = host_api::HttpReq(request_handle);\n  }\n  return options;\n}\n} // namespace\n\n// Below is the implementation of the JavaScript CacheState Class which has this definition:\n// class CacheState {\n//   found(): boolean;\n//   usable(): boolean;\n//   stale(): boolean;\n//   mustInsertOrUpdate(): boolean;\n// }\n\n// found(): boolean;\nbool CacheState::found(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0);\n  auto state = static_cast<uint32_t>(\n      JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::State)).toInt32());\n\n  args.rval().setBoolean(state & CacheState::found_flag);\n  return true;\n}\n\n//   usable(): boolean;\nbool CacheState::usable(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0);\n  auto state = static_cast<uint32_t>(\n      JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::State)).toInt32());\n\n  args.rval().setBoolean(state & CacheState::usable_flag);\n  return true;\n}\n\n//   stale(): boolean;\nbool CacheState::stale(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0);\n  auto state = static_cast<uint32_t>(\n      JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::State)).toInt32());\n\n  args.rval().setBoolean(state & CacheState::stale_flag);\n  return true;\n}\n\n//   mustInsertOrUpdate(): boolean;\nbool CacheState::mustInsertOrUpdate(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0);\n  auto state = static_cast<uint32_t>(\n      JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::State)).toInt32());\n\n  args.rval().setBoolean(state & CacheState::must_insert_or_update_flag);\n  return true;\n}\n\nconst JSFunctionSpec CacheState::static_methods[] = {JS_FS_END};\n\nconst JSPropertySpec CacheState::static_properties[] = {JS_PS_END};\n\nconst JSFunctionSpec CacheState::methods[] = {\n    JS_FN(\"found\", found, 0, JSPROP_ENUMERATE),\n    JS_FN(\"usable\", usable, 0, JSPROP_ENUMERATE),\n    JS_FN(\"stale\", stale, 0, JSPROP_ENUMERATE),\n    JS_FN(\"mustInsertOrUpdate\", mustInsertOrUpdate, 0, JSPROP_ENUMERATE),\n    JS_FS_END,\n};\n\nconst JSPropertySpec CacheState::properties[] = {\n    JS_STRING_SYM_PS(toStringTag, \"CacheState\", JSPROP_READONLY), JS_PS_END};\n\nJSObject *CacheState::create(JSContext *cx, uint32_t state) {\n  JS::RootedObject instance(cx, JS_NewObjectWithGivenProto(cx, &class_, proto_obj));\n  if (!instance) {\n    return nullptr;\n  }\n  JS::SetReservedSlot(instance, static_cast<uint32_t>(Slots::State), JS::Int32Value(state));\n  return instance;\n}\n\n// Below is the implementation of the JavaScript CacheEntry Class which has this definition:\n// class CacheEntry {\n//   close(): void;\n//   state(): CacheState;\n//   userMetadata(): ArrayBuffer;\n//   body(options?: CacheBodyOptions): ReadableStream;\n//   length(): number | null;\n//   maxAge(): number;\n//   staleWhileRevalidate(): number;\n//   age(): number;\n//   hits(): number;\n// }\n\nbool CacheEntry::is_instance(JSObject *obj) {\n  return BuiltinImpl::is_instance(obj) || TransactionCacheEntry::is_instance(obj);\n}\n\nbool CacheEntry::is_instance(JS::Value val) {\n  return val.isObject() && is_instance(&val.toObject());\n}\n\nhost_api::CacheHandle CacheEntry::get_cache_handle(JSObject *self) {\n  MOZ_ASSERT(CacheEntry::is_instance(self));\n  host_api::CacheHandle handle{static_cast<uint32_t>(\n      JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::Handle)).toInt32())};\n  return handle;\n}\n\n// close(): void;\nbool CacheEntry::close(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = JS::CallArgsFromVp(argc, vp);\n  if (!check_receiver(cx, args.thisv(), \"close\")) {\n    return false;\n  }\n  JS::RootedObject self(cx, &args.thisv().toObject());\n  if (!args.requireAtLeast(cx, \"close\", 0)) {\n    return false;\n  }\n  auto handle = CacheEntry::get_cache_handle(self);\n  auto res = handle.close();\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  args.rval().setUndefined();\n  return true;\n}\n\n// state(): CacheState;\nbool CacheEntry::state(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = JS::CallArgsFromVp(argc, vp);\n  if (!check_receiver(cx, args.thisv(), \"state\")) {\n    return false;\n  }\n  JS::RootedObject self(cx, &args.thisv().toObject());\n  if (!args.requireAtLeast(cx, \"state\", 0)) {\n    return false;\n  }\n  auto handle = CacheEntry::get_cache_handle(self);\n  auto res = handle.get_state();\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  JS::RootedObject state(cx, CacheState::create(cx, res.unwrap().state));\n\n  args.rval().setObjectOrNull(state);\n  return true;\n}\n\n// userMetadata(): ArrayBuffer;\nbool CacheEntry::userMetadata(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = JS::CallArgsFromVp(argc, vp);\n  if (!check_receiver(cx, args.thisv(), \"userMetadata\")) {\n    return false;\n  }\n  JS::RootedObject self(cx, &args.thisv().toObject());\n  if (!args.requireAtLeast(cx, \"userMetadata\", 0)) {\n    return false;\n  }\n  auto handle = CacheEntry::get_cache_handle(self);\n  auto res = handle.get_user_metadata();\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  auto metadata = std::move(res.unwrap());\n  JS::RootedObject array_buffer(cx);\n  array_buffer.set(JS::NewArrayBufferWithContents(\n      cx, metadata.len, metadata.ptr.get(), JS::NewArrayBufferOutOfMemory::CallerMustFreeMemory));\n  if (!array_buffer) {\n    JS_ReportOutOfMemory(cx);\n    return false;\n  }\n\n  // `array_buffer` now owns `metadata`\n  static_cast<void>(metadata.ptr.release());\n\n  args.rval().setObject(*array_buffer);\n  return true;\n}\n\n// body(options?: CacheBodyOptions): ReadableStream;\nbool CacheEntry::body(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = JS::CallArgsFromVp(argc, vp);\n  if (!check_receiver(cx, args.thisv(), \"body\")) {\n    return false;\n  }\n  JS::RootedObject self(cx, &args.thisv().toObject());\n  if (!args.requireAtLeast(cx, \"body\", 0)) {\n    return false;\n  }\n  auto handle = CacheEntry::get_cache_handle(self);\n\n  host_api::CacheGetBodyOptions options;\n  auto options_val = args.get(0);\n  // options parameter is optional\n  // options is meant to be an object with an optional `start` and `end` fields, both which can be\n  // Numbers.\n  if (!options_val.isUndefined()) {\n    if (!options_val.isObject()) {\n      JS_ReportErrorASCII(cx, \"options argument must be an object\");\n      return false;\n    }\n    JS::RootedObject options_obj(cx, &options_val.toObject());\n\n    JS::RootedValue start_val(cx);\n    if (!JS_GetProperty(cx, options_obj, \"start\", &start_val)) {\n      return false;\n    }\n    // start property is optional\n    if (!start_val.isUndefined()) {\n      // Convert start field into a number and check the value adheres to our\n      // validation rules.\n      double start;\n      if (!JS::ToNumber(cx, start_val, &start)) {\n        return false;\n      }\n      if (start < 0 || std::isnan(start) || std::isinf(start)) {\n        JS_ReportErrorASCII(\n            cx,\n            \"start field is an invalid value, only positive numbers can be used for start values.\");\n        return false;\n      }\n      options.start = JS::ToUint64(start);\n    }\n\n    JS::RootedValue end_val(cx);\n    if (!JS_GetProperty(cx, options_obj, \"end\", &end_val)) {\n      return false;\n    }\n    // end property is optional\n    if (!end_val.isUndefined()) {\n      // Convert start field into a number and check the value adheres to our\n      // validation rules.\n      double end;\n      if (!JS::ToNumber(cx, end_val, &end)) {\n        return false;\n      }\n      if (end < 0 || std::isnan(end) || std::isinf(end)) {\n        JS_ReportErrorASCII(\n            cx, \"end field is an invalid value, only positive numbers can be used for end values.\");\n        return false;\n      }\n      options.end = JS::ToUint64(end);\n    }\n\n    // Reject cases where the start is greater than the end.\n    // Ideally this would be a host-side check... but we didn't do it there to begin with,\n    // so we couple it to an SDK/runtime upgrade.\n    if (!start_val.isUndefined() && !end_val.isUndefined() && options.end > options.start) {\n      JS_ReportErrorASCII(cx, \"end field is before the start field\");\n      return false;\n    }\n  }\n\n  auto res = handle.get_body(options);\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  auto body = res.unwrap();\n  JS::SetReservedSlot(self, static_cast<uint32_t>(Slots::Body), JS::Int32Value(body.handle));\n  JS::SetReservedSlot(self, static_cast<uint32_t>(Slots::BodyStream), JS::NullValue());\n  JS::SetReservedSlot(self, static_cast<uint32_t>(Slots::HasBody), JS::BooleanValue(true));\n  JS::SetReservedSlot(self, static_cast<uint32_t>(Slots::BodyUsed), JS::FalseValue());\n\n  JS::RootedObject source(\n      cx, NativeStreamSource::create(cx, self, JS::UndefinedHandleValue,\n                                     RequestOrResponse::body_source_pull_algorithm,\n                                     RequestOrResponse::body_source_cancel_algorithm));\n  if (!source) {\n    return false;\n  }\n\n  // Create a readable stream with a highwater mark of 0.0 to prevent an eager\n  // pull. With the default HWM of 1.0, the streams implementation causes a\n  // pull, which means we enqueue a read from the host handle, which we quite\n  // often have no interest in at all.\n  JS::RootedObject body_stream(cx, NativeStreamSource::stream(source));\n  if (!body_stream) {\n    return false;\n  }\n\n  args.rval().setObject(*body_stream);\n\n  return true;\n}\n\n// length(): number | null;\nbool CacheEntry::length(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = JS::CallArgsFromVp(argc, vp);\n  if (!check_receiver(cx, args.thisv(), \"length\")) {\n    return false;\n  }\n  JS::RootedObject self(cx, &args.thisv().toObject());\n  if (!args.requireAtLeast(cx, \"length\", 0)) {\n    return false;\n  }\n  auto handle = CacheEntry::get_cache_handle(self);\n  auto res = handle.get_length();\n  if (auto *err = res.to_err()) {\n    if (host_api::error_is_optional_none(*err)) {\n      args.rval().setNull();\n      return true;\n    }\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  auto length = res.unwrap();\n  JS::RootedValue result(cx, JS::NumberValue(length));\n  args.rval().set(result);\n  return true;\n}\n\n// maxAge(): number;\nbool CacheEntry::maxAge(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = JS::CallArgsFromVp(argc, vp);\n  if (!check_receiver(cx, args.thisv(), \"maxAge\")) {\n    return false;\n  }\n  JS::RootedObject self(cx, &args.thisv().toObject());\n  if (!args.requireAtLeast(cx, \"maxAge\", 0)) {\n    return false;\n  }\n  auto handle = CacheEntry::get_cache_handle(self);\n  auto res = handle.get_max_age_ns();\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  auto age = res.unwrap();\n  JS::RootedValue result(cx, JS::NumberValue(age / 1'000'000));\n  args.rval().set(result);\n  return true;\n}\n\n// staleWhileRevalidate(): number;\nbool CacheEntry::staleWhileRevalidate(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = JS::CallArgsFromVp(argc, vp);\n  if (!check_receiver(cx, args.thisv(), \"staleWhileRevalidate\")) {\n    return false;\n  }\n  JS::RootedObject self(cx, &args.thisv().toObject());\n  if (!args.requireAtLeast(cx, \"staleWhileRevalidate\", 0)) {\n    return false;\n  }\n  auto handle = CacheEntry::get_cache_handle(self);\n  auto res = handle.get_stale_while_revalidate_ns();\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  auto staleWhileRevalidateNs = res.unwrap();\n  JS::RootedValue result(cx, JS::NumberValue(staleWhileRevalidateNs / 1'000'000));\n  args.rval().set(result);\n  return true;\n}\n\n// age(): number;\nbool CacheEntry::age(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = JS::CallArgsFromVp(argc, vp);\n  if (!check_receiver(cx, args.thisv(), \"age\")) {\n    return false;\n  }\n  JS::RootedObject self(cx, &args.thisv().toObject());\n  if (!args.requireAtLeast(cx, \"age\", 0)) {\n    return false;\n  }\n  auto handle = CacheEntry::get_cache_handle(self);\n  auto res = handle.get_age_ns();\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  auto age = res.unwrap();\n  JS::RootedValue result(cx, JS::NumberValue(age / 1'000'000));\n  args.rval().set(result);\n  return true;\n}\n\n// hits(): number;\nbool CacheEntry::hits(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = JS::CallArgsFromVp(argc, vp);\n  if (!check_receiver(cx, args.thisv(), \"hits\")) {\n    return false;\n  }\n  JS::RootedObject self(cx, &args.thisv().toObject());\n  if (!args.requireAtLeast(cx, \"hits\", 0)) {\n    return false;\n  }\n  auto handle = CacheEntry::get_cache_handle(self);\n  auto res = handle.get_hits();\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  auto hits = res.unwrap();\n  JS::RootedValue result(cx, JS::NumberValue(hits));\n  args.rval().set(result);\n  return true;\n}\n\nconst JSFunctionSpec CacheEntry::static_methods[] = {JS_FS_END};\n\nconst JSPropertySpec CacheEntry::static_properties[] = {JS_PS_END};\n\nconst JSFunctionSpec CacheEntry::methods[] = {\n    JS_FN(\"close\", close, 0, JSPROP_ENUMERATE),\n    JS_FN(\"state\", state, 0, JSPROP_ENUMERATE),\n    JS_FN(\"userMetadata\", userMetadata, 0, JSPROP_ENUMERATE),\n    JS_FN(\"body\", body, 0, JSPROP_ENUMERATE),\n    JS_FN(\"length\", length, 0, JSPROP_ENUMERATE),\n    JS_FN(\"maxAge\", maxAge, 0, JSPROP_ENUMERATE),\n    JS_FN(\"staleWhileRevalidate\", staleWhileRevalidate, 0, JSPROP_ENUMERATE),\n    JS_FN(\"age\", age, 0, JSPROP_ENUMERATE),\n    JS_FN(\"hits\", hits, 0, JSPROP_ENUMERATE),\n    JS_FS_END,\n};\n\nconst JSPropertySpec CacheEntry::properties[] = {\n    JS_STRING_SYM_PS(toStringTag, \"CacheEntry\", JSPROP_READONLY), JS_PS_END};\n\nJSObject *CacheEntry::create(JSContext *cx, uint32_t handle) {\n  JS::RootedObject instance(cx, JS_NewObjectWithGivenProto(cx, &class_, proto_obj));\n  if (!instance) {\n    return nullptr;\n  }\n  JS::SetReservedSlot(instance, static_cast<uint32_t>(Slots::Handle), JS::Int32Value(handle));\n  return instance;\n}\n\n// Below is the implementation of the JavaScript TransactionCacheEntry Class which has this\n// definition: class TransactionCacheEntry extends CacheEntry {\n//   insert(options: TransactionInsertOptions): import(\"fastly:body\").FastlyBody;\n//   insertAndStreamBack(options: TransactionInsertOptions): [import(\"fastly:body\").FastlyBody,\n//   CacheEntry]; update(options: TransactionUpdateOptions): void; cancel(): void;\n// }\n\n// insert(options: TransactionInsertOptions): FastlyBody;\nbool TransactionCacheEntry::insert(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(1);\n\n  auto handle = CacheEntry::get_cache_handle(self);\n  auto options_res = parseTransactionInsertOptions(cx, args.get(0));\n  if (options_res.isErr()) {\n    return false;\n  }\n  auto options = options_res.unwrap();\n  auto res = handle.transaction_insert(options);\n\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  auto body = res.unwrap();\n\n  auto instance = FastlyBody::create(cx, body.handle);\n  if (!instance) {\n    return false;\n  }\n\n  args.rval().setObjectOrNull(instance);\n  return true;\n}\n\n// insertAndStreamBack(options: TransactionInsertOptions): [FastlyBody, CacheEntry];\nbool TransactionCacheEntry::insertAndStreamBack(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(1);\n\n  auto options_res = parseTransactionInsertOptions(cx, args.get(0));\n  if (options_res.isErr()) {\n    return false;\n  }\n  auto options = options_res.unwrap();\n\n  auto handle = CacheEntry::get_cache_handle(self);\n  auto res = handle.transaction_insert_and_stream_back(options);\n\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  host_api::HttpBody body;\n  host_api::CacheHandle cache_handle;\n  std::tie(body, cache_handle) = res.unwrap();\n\n  JS::RootedValue writer(cx, JS::ObjectOrNullValue(FastlyBody::create(cx, body.handle)));\n\n  JS::RootedValue reader(cx, JS::ObjectOrNullValue(CacheEntry::create(cx, cache_handle.handle)));\n\n  JS::RootedValueVector result(cx);\n  if (!result.append(writer)) {\n    js::ReportOutOfMemory(cx);\n    return false;\n  }\n  if (!result.append(reader)) {\n    js::ReportOutOfMemory(cx);\n    return false;\n  }\n\n  JS::Rooted<JSObject *> writer_and_reader(cx, JS::NewArrayObject(cx, result));\n  if (!writer_and_reader) {\n    return false;\n  }\n\n  args.rval().setObjectOrNull(writer_and_reader);\n  return true;\n}\n\n// update(options: TransactionUpdateOptions): void;\nbool TransactionCacheEntry::update(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(1);\n\n  auto options_res = parseTransactionUpdateOptions(cx, args.get(0));\n  if (options_res.isErr()) {\n    return false;\n  }\n  auto options = options_res.unwrap();\n\n  auto handle = CacheEntry::get_cache_handle(self);\n\n  auto state_res = handle.get_state();\n  if (auto *err = state_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  auto state = state_res.unwrap();\n  if (!state.is_found() || !state.must_insert_or_update()) {\n    JS_ReportErrorASCII(cx,\n                        \"TransactionCacheEntry.update: entry does not exist or is not updatable\");\n    return false;\n  }\n  auto res = handle.transaction_update(options);\n\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  args.rval().setUndefined();\n  return true;\n}\n\n// cancel(): void;\nbool TransactionCacheEntry::cancel(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0);\n\n  auto handle = CacheEntry::get_cache_handle(self);\n  auto res = handle.transaction_cancel();\n\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  args.rval().setUndefined();\n  return true;\n}\n\nconst JSFunctionSpec TransactionCacheEntry::static_methods[] = {JS_FS_END};\n\nconst JSPropertySpec TransactionCacheEntry::static_properties[] = {JS_PS_END};\n\nconst JSFunctionSpec TransactionCacheEntry::methods[] = {\n    JS_FN(\"insert\", insert, 1, JSPROP_ENUMERATE),\n    JS_FN(\"insertAndStreamBack\", insertAndStreamBack, 1, JSPROP_ENUMERATE),\n    JS_FN(\"update\", update, 1, JSPROP_ENUMERATE),\n    JS_FN(\"cancel\", cancel, 0, JSPROP_ENUMERATE),\n    JS_FS_END,\n};\n\nconst JSPropertySpec TransactionCacheEntry::properties[] = {\n    JS_STRING_SYM_PS(toStringTag, \"TransactionCacheEntry\", JSPROP_READONLY), JS_PS_END};\n\nJSObject *TransactionCacheEntry::create(JSContext *cx, uint32_t handle) {\n  JS::RootedObject instance(cx, JS_NewObjectWithGivenProto(cx, &class_, proto_obj));\n  if (!instance) {\n    return nullptr;\n  }\n  JS::SetReservedSlot(instance, static_cast<uint32_t>(Slots::Handle), JS::Int32Value(handle));\n  return instance;\n}\n\n// Below is the implementation of the JavaScript CoreCache Class which has this definition:\n// class CoreCache {\n//   static lookup(key: string, options?: LookupOptions): CacheEntry | null;\n//   static insert(key: string, options: InsertOptions): import(\"fastly:body\").FastlyBody;\n//   static transactionLookup(key: string, options?: LookupOptions): TransactionCacheEntry;\n// }\n\n// static lookup(key: string, options?: LookupOptions): CacheEntry | null;\nbool CoreCache::lookup(JSContext *cx, unsigned argc, JS::Value *vp) {\n  REQUEST_HANDLER_ONLY(\"The CoreCache builtin\");\n  JS::CallArgs args = JS::CallArgsFromVp(argc, vp);\n  if (!args.requireAtLeast(cx, \"CoreCache.lookup\", 1)) {\n    return false;\n  }\n\n  // Convert key parameter into a string and check the value adheres to our validation rules.\n  auto key = core::encode(cx, args.get(0));\n  if (!key) {\n    return false;\n  }\n\n  if (key.len == 0) {\n    JS_ReportErrorASCII(cx, \"CoreCache.lookup: key can not be an empty string\");\n    return false;\n  }\n  if (key.len > 8135) {\n    JS_ReportErrorASCII(cx,\n                        \"CoreCache.lookup: key is too long, the maximum allowed length is 8135.\");\n    return false;\n  }\n\n  auto options_result = parseLookupOptions(cx, args.get(1));\n  if (options_result.isErr()) {\n    return false;\n  }\n  auto options = options_result.unwrap();\n\n  auto res = host_api::CacheHandle::lookup(key, options);\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  auto cache_handle = res.unwrap();\n\n  auto cache_state_res = cache_handle.get_state();\n  if (auto *err = cache_state_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  auto cache_state = cache_state_res.unwrap();\n\n  if (cache_state.is_found()) {\n    JS::RootedObject entry(cx, CacheEntry::create(cx, cache_handle.handle));\n    args.rval().setObject(*entry);\n  } else {\n    args.rval().setNull();\n  }\n  return true;\n}\n\n// static insert(key: string, options: InsertOptions): FastlyBody;\nbool CoreCache::insert(JSContext *cx, unsigned argc, JS::Value *vp) {\n  REQUEST_HANDLER_ONLY(\"The CoreCache builtin\");\n  JS::CallArgs args = JS::CallArgsFromVp(argc, vp);\n  if (!args.requireAtLeast(cx, \"CoreCache.insert\", 2)) {\n    return false;\n  }\n\n  // Convert key parameter into a string and check the value adheres to our validation rules.\n  auto key = core::encode(cx, args.get(0));\n  if (!key) {\n    return false;\n  }\n\n  if (key.len == 0) {\n    JS_ReportErrorASCII(cx, \"CoreCache.insert: key can not be an empty string\");\n    return false;\n  }\n  if (key.len > 8135) {\n    JS_ReportErrorASCII(cx,\n                        \"CoreCache.insert: key is too long, the maximum allowed length is 8135.\");\n    return false;\n  }\n\n  auto options_res = parseInsertOptions(cx, args.get(1));\n  if (options_res.isErr()) {\n    return false;\n  }\n  auto options = options_res.unwrap();\n\n  auto res = host_api::CacheHandle::insert(key, options);\n\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  auto body = res.unwrap();\n\n  JS::RootedObject instance(cx, FastlyBody::create(cx, body.handle));\n  if (!instance) {\n    return false;\n  }\n\n  args.rval().setObjectOrNull(instance);\n  return true;\n}\n\n// static transactionLookup(key: string, options?: LookupOptions): TransactionCacheEntry;\nbool CoreCache::transactionLookup(JSContext *cx, unsigned argc, JS::Value *vp) {\n  REQUEST_HANDLER_ONLY(\"The CoreCache builtin\");\n  JS::CallArgs args = JS::CallArgsFromVp(argc, vp);\n  if (!args.requireAtLeast(cx, \"CoreCache.transactionLookup\", 1)) {\n    return false;\n  }\n\n  // Convert key parameter into a string and check the value adheres to our validation rules.\n  auto key = core::encode(cx, args.get(0));\n  if (!key) {\n    return false;\n  }\n\n  if (key.len == 0) {\n    JS_ReportErrorASCII(cx, \"CoreCache.transactionLookup: key can not be an empty string\");\n    return false;\n  }\n  if (key.len > 8135) {\n    JS_ReportErrorASCII(\n        cx, \"CoreCache.transactionLookup: key is too long, the maximum allowed length is 8135.\");\n    return false;\n  }\n\n  auto options_result = parseLookupOptions(cx, args.get(1));\n  if (options_result.isErr()) {\n    return false;\n  }\n  auto options = options_result.unwrap();\n\n  auto res = host_api::CacheHandle::transaction_lookup(key, options);\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  auto cache_handle = res.unwrap();\n\n  JS::RootedObject entry(cx, TransactionCacheEntry::create(cx, cache_handle.handle));\n  args.rval().setObject(*entry);\n  return true;\n}\n\nconst JSFunctionSpec CoreCache::static_methods[] = {\n    JS_FN(\"lookup\", lookup, 1, JSPROP_ENUMERATE),\n    JS_FN(\"insert\", insert, 2, JSPROP_ENUMERATE),\n    JS_FN(\"transactionLookup\", transactionLookup, 1, JSPROP_ENUMERATE),\n    JS_FS_END,\n};\n\nconst JSPropertySpec CoreCache::static_properties[] = {JS_PS_END};\n\nconst JSFunctionSpec CoreCache::methods[] = {JS_FS_END};\n\nconst JSPropertySpec CoreCache::properties[] = {\n    JS_STRING_SYM_PS(toStringTag, \"CoreCache\", JSPROP_READONLY), JS_PS_END};\n\nbool install(api::Engine *engine) {\n  ENGINE = engine;\n  if (!CoreCache::init_class_impl(engine->cx(), engine->global())) {\n    return false;\n  }\n  if (!CacheEntry::init_class_impl(engine->cx(), engine->global())) {\n    return false;\n  }\n  JS::RootedObject proto(engine->cx(), CacheEntry::proto_obj);\n  if (!proto) {\n    return false;\n  }\n  if (!TransactionCacheEntry::init_class_impl(engine->cx(), engine->global(), proto)) {\n    return false;\n  }\n  if (!CacheState::init_class_impl(engine->cx(), engine->global())) {\n    return false;\n  }\n\n  // fastly:cache\n  RootedObject cache(engine->cx(), JS_NewObject(engine->cx(), nullptr));\n  RootedValue cache_val(engine->cx(), JS::ObjectValue(*cache));\n  RootedObject core_cache_obj(engine->cx(), JS_GetConstructor(engine->cx(), CoreCache::proto_obj));\n  RootedValue core_cache_val(engine->cx(), ObjectValue(*core_cache_obj));\n  if (!JS_SetProperty(engine->cx(), cache, \"CoreCache\", core_cache_val)) {\n    return false;\n  }\n  RootedObject cache_entry_obj(engine->cx(),\n                               JS_GetConstructor(engine->cx(), CacheEntry::proto_obj));\n  RootedValue cache_entry_val(engine->cx(), ObjectValue(*cache_entry_obj));\n  if (!JS_SetProperty(engine->cx(), cache, \"CacheEntry\", cache_entry_val)) {\n    return false;\n  }\n  RootedObject cache_state_obj(engine->cx(),\n                               JS_GetConstructor(engine->cx(), CacheState::proto_obj));\n  RootedValue cache_state_val(engine->cx(), ObjectValue(*cache_state_obj));\n  if (!JS_SetProperty(engine->cx(), cache, \"CacheState\", cache_state_val)) {\n    return false;\n  }\n  RootedObject transaction_cache_entry_obj(\n      engine->cx(), JS_GetConstructor(engine->cx(), TransactionCacheEntry::proto_obj));\n  RootedValue transaction_cache_entry_val(engine->cx(), ObjectValue(*transaction_cache_entry_obj));\n  if (!JS_SetProperty(engine->cx(), cache, \"TransactionCacheEntry\", transaction_cache_entry_val)) {\n    return false;\n  }\n  RootedValue simple_cache_val(engine->cx());\n  if (!JS_GetProperty(engine->cx(), engine->global(), \"SimpleCache\", &simple_cache_val)) {\n    return false;\n  }\n  if (!JS_SetProperty(engine->cx(), cache, \"SimpleCache\", simple_cache_val)) {\n    return false;\n  }\n  RootedValue simple_cache_entry_val(engine->cx());\n  if (!JS_GetProperty(engine->cx(), engine->global(), \"SimpleCacheEntry\",\n                      &simple_cache_entry_val)) {\n    return false;\n  }\n  if (!JS_SetProperty(engine->cx(), cache, \"SimpleCacheEntry\", simple_cache_entry_val)) {\n    return false;\n  }\n  if (!engine->define_builtin_module(\"fastly:cache\", cache_val)) {\n    return false;\n  }\n  return true;\n}\n\n} // namespace fastly::cache_core\n"
  },
  {
    "path": "runtime/fastly/builtins/cache-core.h",
    "content": "#ifndef FASTLY_CACHE_CORE_H\n#define FASTLY_CACHE_CORE_H\n\n#include \"./fetch/request-response.h\"\n#include \"builtin.h\"\n#include \"extension-api.h\"\n\nnamespace fastly::cache_core {\n\n// export class CacheState {\n//   found(): boolean;\n//   usable(): boolean;\n//   stale(): boolean;\n//   mustInsertOrUpdate(): boolean;\n// }\nclass CacheState : public builtins::BuiltinNoConstructor<CacheState> {\n  static constexpr const uint8_t found_flag = 1 << 0;\n  static constexpr const uint8_t usable_flag = 1 << 1;\n  static constexpr const uint8_t stale_flag = 1 << 2;\n  static constexpr const uint8_t must_insert_or_update_flag = 1 << 3;\n\n  // found(): boolean;\n  static bool found(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  // usable(): boolean;\n  static bool usable(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  // stale(): boolean;\n  static bool stale(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  // mustInsertOrUpdate(): boolean;\n  static bool mustInsertOrUpdate(JSContext *cx, unsigned argc, JS::Value *vp);\n\npublic:\n  static constexpr const char *class_name = \"CacheState\";\n  static const int ctor_length = 0;\n  enum Slots { State, Count };\n\n  static const JSFunctionSpec static_methods[];\n  static const JSPropertySpec static_properties[];\n  static const JSFunctionSpec methods[];\n  static const JSPropertySpec properties[];\n\n  static JSObject *create(JSContext *cx, uint32_t handle);\n};\n\nclass CacheEntry : public builtins::BuiltinNoConstructor<CacheEntry> {\n  // cache-close: func(handle: cache-handle) -> result<_, error>\n  // close(): void;\n  static bool close(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  // cache-get-state: func(handle: cache-handle) -> result<cache-lookup-state, error>\n  // state(): CacheState;\n  static bool state(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  /// cache-get-user-metadata: func(handle: cache-handle) -> result<list<u8>, error>\n  // userMetadata(): ArrayBuffer;\n  static bool userMetadata(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  // cache-get-body: func(handle: cache-handle, options: cache-get-body-options) ->\n  // result<body-handle, error> body(options?: CacheBodyOptions): ReadableStream;\n  static bool body(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  // cache-get-length: func(handle: cache-handle) -> result<u64, error>\n  // length(): number;\n  static bool length(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  // cache-get-max-age-ns: func(handle: cache-handle) -> result<u64, error>\n  // maxAge(): number;\n  static bool maxAge(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  // cache-get-stale-while-revalidate-ns: func(handle: cache-handle) -> result<u64, error>\n  // staleWhileRevalidate(): number;\n  static bool staleWhileRevalidate(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  // cache-get-age-ns: func(handle: cache-handle) -> result<u64, error>\n  // age(): number;\n  static bool age(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  // cache-get-hits: func(handle: cache-handle) -> result<u64, error>\n  // hits(): number;\n  static bool hits(JSContext *cx, unsigned argc, JS::Value *vp);\n\npublic:\n  static constexpr const char *class_name = \"CacheEntry\";\n  static const int ctor_length = 0;\n  enum Slots {\n    Body = static_cast<int>(fetch::RequestOrResponse::Slots::Body),\n    BodyStream = static_cast<int>(fetch::RequestOrResponse::Slots::BodyStream),\n    HasBody = static_cast<int>(fetch::RequestOrResponse::Slots::HasBody),\n    BodyUsed = static_cast<int>(fetch::RequestOrResponse::Slots::BodyUsed),\n    Handle = static_cast<int>(fetch::RequestOrResponse::Slots::Count),\n    Count\n  };\n\n  static const JSFunctionSpec static_methods[];\n  static const JSPropertySpec static_properties[];\n  static const JSFunctionSpec methods[];\n  static const JSPropertySpec properties[];\n\n  static bool is_instance(JSObject *obj);\n  static bool is_instance(JS::Value val);\n  static host_api::CacheHandle get_cache_handle(JSObject *self);\n\n  static JSObject *create(JSContext *cx, uint32_t handle);\n};\n\nclass TransactionCacheEntry : public builtins::BuiltinNoConstructor<TransactionCacheEntry> {\n\n  static bool insert(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool insertAndStreamBack(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool update(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool cancel(JSContext *cx, unsigned argc, JS::Value *vp);\n\npublic:\n  static constexpr const char *class_name = \"TransactionCacheEntry\";\n  static const int ctor_length = 0;\n  enum Slots {\n    Body = static_cast<int>(CacheEntry::Slots::Body),\n    BodyStream = static_cast<int>(CacheEntry::Slots::BodyStream),\n    HasBody = static_cast<int>(CacheEntry::Slots::HasBody),\n    BodyUsed = static_cast<int>(CacheEntry::Slots::BodyUsed),\n    Handle = static_cast<int>(CacheEntry::Slots::Handle),\n    Count\n  };\n\n  static const JSFunctionSpec static_methods[];\n  static const JSPropertySpec static_properties[];\n  static const JSFunctionSpec methods[];\n  static const JSPropertySpec properties[];\n\n  static JSObject *create(JSContext *cx, uint32_t handle);\n};\n\nclass CoreCache : public builtins::BuiltinNoConstructor<CoreCache> {\n  // cache-lookup: func(cache-key: string, options: cache-lookup-options) -> result<cache-handle,\n  // error> static lookup(key: string, options?: LookupOptions): CacheEntry | null;\n  static bool lookup(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  // cache-insert: func(cache-key: string, options: cache-write-options) -> result<body-handle,\n  // error> static insert(key: string, options: InsertOptions): FastlyBody;\n  static bool insert(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  // transaction-lookup: func(cache-key: string, options: cache-lookup-options) ->\n  // result<cache-handle, error> static transactionLookup(key: string, optoptions?: LookupOptions):\n  // CacheEntry | null;\n  static bool transactionLookup(JSContext *cx, unsigned argc, JS::Value *vp);\n\npublic:\n  static constexpr const char *class_name = \"CoreCache\";\n  static const int ctor_length = 0;\n  enum Slots { Count };\n\n  static const JSFunctionSpec static_methods[];\n  static const JSPropertySpec static_properties[];\n  static const JSFunctionSpec methods[];\n  static const JSPropertySpec properties[];\n};\n\n} // namespace fastly::cache_core\n\n#endif\n"
  },
  {
    "path": "runtime/fastly/builtins/cache-override.cpp",
    "content": "// TODO: remove these once the warnings are fixed\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Winvalid-offsetof\"\n#pragma clang diagnostic ignored \"-Wdeprecated-enum-enum-conversion\"\n#include \"js/experimental/TypedData.h\" // used in \"js/Conversions.h\"\n#pragma clang diagnostic pop\n\n#include \"js/Conversions.h\"\n\n#include \"../../../StarlingMonkey/runtime/encode.h\"\n#include \"cache-override.h\"\n#include \"fastly.h\"\n#include \"host_api.h\"\n\nusing builtins::BuiltinImpl;\nusing fastly::FastlyGetErrorMessage;\n\nnamespace fastly::cache_override {\n\nnamespace {\n\nbool parse_mode(JSContext *cx, JS::HandleValue mode, CacheOverride::CacheOverrideMode *mode_out) {\n  auto mode_chars = core::encode(cx, mode);\n  if (!mode_chars) {\n    return false;\n  }\n\n  if (!strcmp(mode_chars.begin(), \"none\")) {\n    *mode_out = CacheOverride::CacheOverrideMode::None;\n  } else if (!strcmp(mode_chars.begin(), \"pass\")) {\n    *mode_out = CacheOverride::CacheOverrideMode::Pass;\n  } else if (!strcmp(mode_chars.begin(), \"override\")) {\n    *mode_out = CacheOverride::CacheOverrideMode::Override;\n  } else {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_CACHE_OVERRIDE_MODE_INVALID,\n                              mode_chars.begin());\n    return false;\n  }\n\n  return true;\n}\n\n} // namespace\n\nCacheOverride::CacheOverrideMode CacheOverride::mode(JSObject *self) {\n  return (CacheOverride::CacheOverrideMode)JS::GetReservedSlot(self, Slots::Mode).toInt32();\n}\n\nvoid CacheOverride::set_mode(JSObject *self, CacheOverride::CacheOverrideMode mode) {\n  MOZ_ASSERT(is_instance(self));\n  JS::SetReservedSlot(self, CacheOverride::Slots::Mode, JS::Int32Value((int32_t)mode));\n}\n\nJS::Value CacheOverride::ttl(JSObject *self) {\n  MOZ_ASSERT(is_instance(self));\n  if (CacheOverride::mode(self) != CacheOverride::CacheOverrideMode::Override) {\n    return JS::UndefinedValue();\n  }\n  return JS::GetReservedSlot(self, Slots::TTL);\n}\n\nvoid CacheOverride::set_ttl(JSObject *self, uint32_t ttl) {\n  MOZ_ASSERT(is_instance(self));\n  MOZ_ASSERT(mode(self) == CacheOverride::CacheOverrideMode::Override);\n  JS::SetReservedSlot(self, CacheOverride::Slots::TTL, JS::Int32Value((int32_t)ttl));\n}\n\nJS::Value CacheOverride::swr(JSObject *self) {\n  MOZ_ASSERT(is_instance(self));\n  if (CacheOverride::mode(self) != CacheOverride::CacheOverrideMode::Override)\n    return JS::UndefinedValue();\n  return JS::GetReservedSlot(self, Slots::SWR);\n}\n\nvoid CacheOverride::set_swr(JSObject *self, uint32_t swr) {\n  MOZ_ASSERT(is_instance(self));\n  MOZ_ASSERT(CacheOverride::mode(self) == CacheOverride::CacheOverrideMode::Override);\n  JS::SetReservedSlot(self, CacheOverride::Slots::SWR, JS::Int32Value((int32_t)swr));\n}\n\nJS::Value CacheOverride::surrogate_key(JSObject *self) {\n  MOZ_ASSERT(is_instance(self));\n  if (CacheOverride::mode(self) != CacheOverride::CacheOverrideMode::Override)\n    return JS::UndefinedValue();\n  return JS::GetReservedSlot(self, Slots::SurrogateKey);\n}\n\nvoid CacheOverride::set_surrogate_key(JSObject *self, JSString *key) {\n  MOZ_ASSERT(is_instance(self));\n  MOZ_ASSERT(CacheOverride::mode(self) == CacheOverride::CacheOverrideMode::Override);\n  JS::SetReservedSlot(self, CacheOverride::Slots::SurrogateKey, JS::StringValue(key));\n}\n\nJS::Value CacheOverride::pci(JSObject *self) {\n  MOZ_ASSERT(is_instance(self));\n  if (CacheOverride::mode(self) != CacheOverride::CacheOverrideMode::Override)\n    return JS::UndefinedValue();\n  return JS::GetReservedSlot(self, Slots::PCI);\n}\n\nvoid CacheOverride::set_pci(JSObject *self, bool pci) {\n  MOZ_ASSERT(is_instance(self));\n  MOZ_ASSERT(CacheOverride::mode(self) == CacheOverride::CacheOverrideMode::Override);\n  JS::SetReservedSlot(self, CacheOverride::Slots::PCI, JS::BooleanValue(pci));\n}\n\nJSObject *CacheOverride::beforeSend(JSObject *self) {\n  MOZ_ASSERT(is_instance(self));\n  auto before_send = JS::GetReservedSlot(self, Slots::BeforeSend);\n  if (before_send.isUndefined()) {\n    return nullptr;\n  }\n  return before_send.toObjectOrNull();\n}\n\nvoid CacheOverride::set_beforeSend(JSObject *self, JSObject *fn) {\n  MOZ_ASSERT(is_instance(self));\n  JS::SetReservedSlot(self, Slots::BeforeSend, JS::ObjectValue(*fn));\n}\n\nJSObject *CacheOverride::afterSend(JSObject *self) {\n  MOZ_ASSERT(is_instance(self));\n  auto after_send = JS::GetReservedSlot(self, Slots::AfterSend);\n  if (after_send.isUndefined()) {\n    return nullptr;\n  }\n  return after_send.toObjectOrNull();\n}\n\nvoid CacheOverride::set_afterSend(JSObject *self, JSObject *fn) {\n  MOZ_ASSERT(is_instance(self));\n  JS::SetReservedSlot(self, Slots::AfterSend, JS::ObjectValue(*fn));\n}\n\nhost_api::CacheOverrideTag CacheOverride::abi_tag(JSObject *self) {\n  host_api::CacheOverrideTag tag;\n\n  MOZ_ASSERT(is_instance(self));\n  switch (CacheOverride::mode(self)) {\n  case CacheOverride::CacheOverrideMode::None:\n    return tag;\n  case CacheOverride::CacheOverrideMode::Pass:\n    tag.set_pass();\n    return tag;\n  default:;\n  }\n\n  if (!ttl(self).isUndefined()) {\n    tag.set_ttl();\n  }\n\n  if (!swr(self).isUndefined()) {\n    tag.set_stale_while_revalidate();\n  }\n\n  if (!pci(self).isUndefined() && pci(self).toBoolean()) {\n    tag.set_pci();\n  }\n\n  return tag;\n}\n\nbool CacheOverride::mode_get(JSContext *cx, JS::HandleObject self, JS::MutableHandleValue rval) {\n  if (self == proto_obj) {\n    return api::throw_error(cx, api::Errors::WrongReceiver, \"mode get\", \"CacheOverride\");\n  }\n  const char *mode_chars;\n  switch (mode(self)) {\n  case CacheOverrideMode::None:\n    mode_chars = \"none\";\n    break;\n  case CacheOverrideMode::Pass:\n    mode_chars = \"pass\";\n    break;\n  case CacheOverrideMode::Override:\n    mode_chars = \"override\";\n    break;\n  }\n\n  JS::RootedString mode_str(cx, JS_NewStringCopyZ(cx, mode_chars));\n  if (!mode_str)\n    return false;\n\n  rval.setString(mode_str);\n  return true;\n}\n\nbool CacheOverride::ensure_override(JSContext *cx, JS::HandleObject self, const char *field) {\n  if (mode(self) == CacheOverrideMode::Override)\n    return true;\n\n  JS_ReportErrorUTF8(cx,\n                     \"Can't set %s on CacheOverride object whose mode \"\n                     \"isn't \\\"override\\\"\",\n                     field);\n  return false;\n}\n\nbool CacheOverride::mode_set(JSContext *cx, JS::HandleObject self, JS::HandleValue val,\n                             JS::MutableHandleValue ret) {\n  if (self == proto_obj) {\n    return api::throw_error(cx, api::Errors::WrongReceiver, \"mode get\", \"CacheOverride\");\n  }\n\n  CacheOverrideMode mode;\n  if (!parse_mode(cx, val, &mode)) {\n    return false;\n  }\n\n  set_mode(self, mode);\n  return true;\n}\n\nbool CacheOverride::ttl_get(JSContext *cx, JS::HandleObject self, JS::MutableHandleValue rval) {\n  if (self == proto_obj) {\n    return api::throw_error(cx, api::Errors::WrongReceiver, \"ttl get\", \"CacheOverride\");\n  }\n  rval.set(ttl(self));\n  return true;\n}\n\nbool CacheOverride::ttl_set(JSContext *cx, JS::HandleObject self, JS::HandleValue val,\n                            JS::MutableHandleValue rval) {\n  if (self == proto_obj) {\n    return api::throw_error(cx, api::Errors::WrongReceiver, \"ttl set\", \"CacheOverride\");\n  }\n  if (!ensure_override(cx, self, \"a TTL\"))\n    return false;\n\n  if (val.isUndefined()) {\n    JS::SetReservedSlot(self, Slots::TTL, val);\n  } else {\n    int32_t ttl;\n    if (!JS::ToInt32(cx, val, &ttl))\n      return false;\n\n    set_ttl(self, ttl);\n  }\n  rval.set(ttl(self));\n  return true;\n}\n\nbool CacheOverride::swr_get(JSContext *cx, JS::HandleObject self, JS::MutableHandleValue rval) {\n  if (self == proto_obj) {\n    return api::throw_error(cx, api::Errors::WrongReceiver, \"swr get\", \"CacheOverride\");\n  }\n  rval.set(swr(self));\n  return true;\n}\n\nbool CacheOverride::swr_set(JSContext *cx, JS::HandleObject self, JS::HandleValue val,\n                            JS::MutableHandleValue rval) {\n  if (self == proto_obj) {\n    return api::throw_error(cx, api::Errors::WrongReceiver, \"swr set\", \"CacheOverride\");\n  }\n  if (!ensure_override(cx, self, \"SWR\"))\n    return false;\n\n  if (val.isUndefined()) {\n    JS::SetReservedSlot(self, Slots::SWR, val);\n  } else {\n    int32_t swr;\n    if (!JS::ToInt32(cx, val, &swr))\n      return false;\n\n    set_swr(self, swr);\n  }\n  rval.set(swr(self));\n  return true;\n}\n\nbool CacheOverride::surrogate_key_get(JSContext *cx, JS::HandleObject self,\n                                      JS::MutableHandleValue rval) {\n  if (self == proto_obj) {\n    return api::throw_error(cx, api::Errors::WrongReceiver, \"surrogate_key get\", \"CacheOverride\");\n  }\n  rval.set(surrogate_key(self));\n  return true;\n}\n\nbool CacheOverride::surrogate_key_set(JSContext *cx, JS::HandleObject self, JS::HandleValue val,\n                                      JS::MutableHandleValue rval) {\n  if (self == proto_obj) {\n    return api::throw_error(cx, api::Errors::WrongReceiver, \"surrogate_key set\", \"CacheOverride\");\n  }\n  if (!ensure_override(cx, self, \"a surrogate key\"))\n    return false;\n\n  if (val.isUndefined()) {\n    JS::SetReservedSlot(self, Slots::SurrogateKey, val);\n  } else {\n    JS::RootedString surrogate_key(cx, JS::ToString(cx, val));\n    if (!surrogate_key)\n      return false;\n\n    set_surrogate_key(self, surrogate_key);\n  }\n  rval.set(surrogate_key(self));\n  return true;\n}\n\nbool CacheOverride::pci_get(JSContext *cx, JS::HandleObject self, JS::MutableHandleValue rval) {\n  if (self == proto_obj) {\n    return api::throw_error(cx, api::Errors::WrongReceiver, \"pci get\", \"CacheOverride\");\n  }\n  rval.set(pci(self));\n  return true;\n}\n\nbool CacheOverride::pci_set(JSContext *cx, JS::HandleObject self, JS::HandleValue val,\n                            JS::MutableHandleValue rval) {\n  if (self == proto_obj) {\n    return api::throw_error(cx, api::Errors::WrongReceiver, \"pci set\", \"CacheOverride\");\n  }\n  if (!ensure_override(cx, self, \"PCI\"))\n    return false;\n\n  if (val.isUndefined()) {\n    JS::SetReservedSlot(self, Slots::PCI, val);\n  } else {\n    bool pci = JS::ToBoolean(val);\n    set_pci(self, pci);\n  }\n  rval.set(pci(self));\n  return true;\n}\n\nbool CacheOverride::before_send_get(JSContext *cx, JS::HandleObject self,\n                                    JS::MutableHandleValue rval) {\n  if (self == proto_obj) {\n    return api::throw_error(cx, api::Errors::WrongReceiver, \"beforeSend get\", \"CacheOverride\");\n  }\n  JSObject *beforeSend(self);\n  if (!beforeSend) {\n    rval.setUndefined();\n    return true;\n  }\n  rval.setObject(*beforeSend);\n  return true;\n}\n\nbool CacheOverride::before_send_set(JSContext *cx, JS::HandleObject self, JS::HandleValue val,\n                                    JS::MutableHandleValue rval) {\n  if (self == proto_obj) {\n    return api::throw_error(cx, api::Errors::WrongReceiver, \"beforeSend set\", \"CacheOverride\");\n  }\n  if (!ensure_override(cx, self, \"beforeSend\"))\n    return false;\n  if (val.isUndefined()) {\n    JS::SetReservedSlot(self, Slots::BeforeSend, JS::UndefinedValue());\n    rval.setUndefined();\n    return true;\n  } else if (!val.isObject() || !JS::IsCallable(&val.toObject())) {\n    JS_ReportErrorUTF8(cx, \"CacheOverride: beforeSend must be a function\");\n    return false;\n  } else {\n    set_beforeSend(self, &val.toObject());\n  }\n\n  rval.setObject(*beforeSend(self));\n  return true;\n}\n\nbool CacheOverride::after_send_get(JSContext *cx, JS::HandleObject self,\n                                   JS::MutableHandleValue rval) {\n  if (self == proto_obj) {\n    return api::throw_error(cx, api::Errors::WrongReceiver, \"afterSend get\", \"CacheOverride\");\n  }\n  JSObject *afterSend(self);\n  if (!afterSend) {\n    rval.setUndefined();\n    return true;\n  }\n  rval.setObject(*afterSend);\n  return true;\n}\n\nbool CacheOverride::after_send_set(JSContext *cx, JS::HandleObject self, JS::HandleValue val,\n                                   JS::MutableHandleValue rval) {\n  if (self == proto_obj) {\n    return api::throw_error(cx, api::Errors::WrongReceiver, \"afterSend set\", \"CacheOverride\");\n  }\n  if (!ensure_override(cx, self, \"afterSend\"))\n    return false;\n  if (val.isUndefined()) {\n    JS::SetReservedSlot(self, Slots::AfterSend, JS::UndefinedValue());\n    rval.setUndefined();\n    return true;\n  } else if (!val.isObject() || !JS::IsCallable(&val.toObject())) {\n    JS_ReportErrorUTF8(cx, \"CacheOverride: afterSend must be a function\");\n    return false;\n  } else {\n    set_afterSend(self, &val.toObject());\n  }\n\n  rval.setObject(*afterSend(self));\n  return true;\n}\n\ntemplate <auto accessor_fn>\nbool CacheOverride::accessor_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n  return accessor_fn(cx, self, args.rval());\n}\n\ntemplate <auto accessor_fn>\nbool CacheOverride::accessor_set(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(1)\n  return accessor_fn(cx, self, args[0], args.rval());\n}\n\nconst JSFunctionSpec CacheOverride::static_methods[] = {JS_FS_END};\nconst JSPropertySpec CacheOverride::static_properties[] = {JS_PS_END};\nconst JSFunctionSpec CacheOverride::methods[] = {JS_FS_END};\n\nconst JSPropertySpec CacheOverride::properties[] = {\n    JS_PSGS(\"mode\", accessor_get<mode_get>, accessor_set<mode_set>, JSPROP_ENUMERATE),\n    JS_PSGS(\"ttl\", accessor_get<ttl_get>, accessor_set<ttl_set>, JSPROP_ENUMERATE),\n    JS_PSGS(\"swr\", accessor_get<swr_get>, accessor_set<swr_set>, JSPROP_ENUMERATE),\n    JS_PSGS(\"surrogateKey\", accessor_get<surrogate_key_get>, accessor_set<surrogate_key_set>,\n            JSPROP_ENUMERATE),\n    JS_PSGS(\"pci\", accessor_get<pci_get>, accessor_set<pci_set>, JSPROP_ENUMERATE),\n    JS_PSGS(\"beforeSend\", accessor_get<before_send_get>, accessor_set<before_send_set>,\n            JSPROP_ENUMERATE),\n    JS_PSGS(\"afterSend\", accessor_get<after_send_get>, accessor_set<after_send_set>,\n            JSPROP_ENUMERATE),\n    JS_STRING_SYM_PS(toStringTag, \"CacheOverride\", JSPROP_READONLY),\n    JS_PS_END};\n\nJSObject *CacheOverride::create(JSContext *cx, JS::HandleValue override) {\n  JS::RootedObject self(cx, JS_NewObjectWithGivenProto(cx, &class_, proto_obj));\n  JS::RootedValue val(cx);\n\n  if (override.isString()) {\n    CacheOverrideMode mode;\n    if (!parse_mode(cx, override, &mode)) {\n      return nullptr;\n    }\n    set_mode(self, mode);\n    return self;\n  } else if (!override.isObject()) {\n    JS_ReportErrorUTF8(cx, \"CacheOverride must be created from a string mode or override object\");\n    return nullptr;\n  }\n\n  JS::RootedObject override_obj(cx, &override.toObject());\n\n  set_mode(self, CacheOverrideMode::Override);\n\n  if (!JS_GetProperty(cx, override_obj, \"ttl\", &val) || !ttl_set(cx, self, val, &val)) {\n    return nullptr;\n  }\n\n  if (!JS_GetProperty(cx, override_obj, \"swr\", &val) || !swr_set(cx, self, val, &val)) {\n    return nullptr;\n  }\n\n  if (!JS_GetProperty(cx, override_obj, \"surrogateKey\", &val) ||\n      !surrogate_key_set(cx, self, val, &val)) {\n    return nullptr;\n  }\n\n  if (!JS_GetProperty(cx, override_obj, \"pci\", &val) || !pci_set(cx, self, val, &val)) {\n    return nullptr;\n  }\n\n  if (!JS_GetProperty(cx, override_obj, \"beforeSend\", &val) ||\n      !before_send_set(cx, self, val, &val)) {\n    return nullptr;\n  }\n\n  if (!JS_GetProperty(cx, override_obj, \"afterSend\", &val) ||\n      !after_send_set(cx, self, val, &val)) {\n    return nullptr;\n  }\n\n  return self;\n}\n\nbool CacheOverride::constructor(JSContext *cx, unsigned argc, JS::Value *vp) {\n  CTOR_HEADER(\"CacheOverride\", 1);\n\n  JS::RootedValue init(cx);\n  CacheOverrideMode mode;\n  if (args[0].isObject()) {\n    init.setObject(args[0].toObject());\n    mode = CacheOverrideMode::Override;\n  } else {\n    if (!parse_mode(cx, args[0], &mode)) {\n      return false;\n    }\n    if (args.length() > 1) {\n      init.set(args[1]);\n    }\n  }\n\n  if (mode == CacheOverride::CacheOverrideMode::Override) {\n    if (!init.isObject()) {\n      JS_ReportErrorUTF8(cx, \"Creating a CacheOverride object with mode \\\"override\\\" requires \"\n                             \"an init object for the override parameters as the second argument\");\n      return false;\n    }\n\n    JSObject *cache_override = create(cx, init);\n    if (!cache_override) {\n      return false;\n    }\n    args.rval().setObject(*cache_override);\n    return true;\n  }\n\n  JS::RootedObject cache_override(cx, JS_NewObjectWithGivenProto(cx, &class_, proto_obj));\n  if (!cache_override) {\n    return false;\n  }\n  set_mode(cache_override, mode);\n  args.rval().setObject(*cache_override);\n  return true;\n}\n\n/**\n * Clone a CacheOverride instance by copying all its reserved slots.\n *\n * This works because CacheOverride slots only contain primitive values.\n */\nJSObject *CacheOverride::clone(JSContext *cx, JS::HandleObject self) {\n  MOZ_ASSERT(is_instance(self));\n  JS::RootedObject result(cx, JS_NewObjectWithGivenProto(cx, &class_, proto_obj));\n  if (!result) {\n    return nullptr;\n  }\n\n  for (size_t i = 0; i < Slots::Count; i++) {\n    JS::Value val = JS::GetReservedSlot(self, i);\n    JS::SetReservedSlot(result, i, val);\n  }\n\n  return result;\n}\n\nbool install(api::Engine *engine) {\n  if (!CacheOverride::init_class_impl(engine->cx(), engine->global())) {\n    return false;\n  }\n  RootedObject cache_override(engine->cx(), JS_NewObject(engine->cx(), nullptr));\n  RootedValue cache_override_class(engine->cx());\n  if (!JS_GetProperty(engine->cx(), engine->global(), \"CacheOverride\", &cache_override_class)) {\n    return false;\n  }\n  if (!JS_SetProperty(engine->cx(), cache_override, \"CacheOverride\", cache_override_class)) {\n    return false;\n  }\n  RootedValue cache_override_val(engine->cx(), JS::ObjectValue(*cache_override));\n  if (!engine->define_builtin_module(\"fastly:cache-override\", cache_override_val)) {\n    return false;\n  }\n  return true;\n}\n\n} // namespace fastly::cache_override\n"
  },
  {
    "path": "runtime/fastly/builtins/cache-override.h",
    "content": "#ifndef FASTLY_CACHE_OVERRIDE_H\n#define FASTLY_CACHE_OVERRIDE_H\n\n#include \"../host-api/host_api_fastly.h\"\n#include \"builtin.h\"\n\nnamespace fastly::cache_override {\n\nclass CacheOverride : public builtins::BuiltinImpl<CacheOverride> {\nprivate:\npublic:\n  static constexpr const char *class_name = \"CacheOverride\";\n  static const int ctor_length = 1;\n\n  // The values stored in these slots are ultimately passed to the host\n  // via the fastly_req_cache_override_v2_set hostcall.\n  //\n  // If `Mode` is not `Override`, all other values are ignored.\n  //\n  // If `Mode` is `Override`, the values are interpreted in the following way:\n  //\n  // If `TTL`, `SWR`, or `SurrogateKey` are `undefined`, they're ignored.\n  // For each of them, if the value isn't `undefined`, a flag gets set in the\n  // hostcall's `tag` parameter, and the value itself is encoded as a uint32\n  // parameter.\n  //\n  // `PCI` is interpreted as a boolean, and a flag gets set in the hostcall's\n  // `tag` parameter if `PCI` is true.\n  //\n  // `BeforeSend` and `AfterSend` are function callbacks that can be set\n  // to execute before and after sending the request.\n  enum Slots { Mode, TTL, SWR, SurrogateKey, PCI, BeforeSend, AfterSend, Count };\n\n  enum class CacheOverrideMode { None, Pass, Override };\n\n  static const JSFunctionSpec static_methods[];\n  static const JSPropertySpec static_properties[];\n  static const JSFunctionSpec methods[];\n  static const JSPropertySpec properties[];\n  static host_api::CacheOverrideTag abi_tag(JSObject *self);\n  static JS::Value ttl(JSObject *self);\n  static void set_ttl(JSObject *self, uint32_t ttl);\n  static JS::Value swr(JSObject *self);\n  static void set_swr(JSObject *self, uint32_t swr);\n  static JS::Value surrogate_key(JSObject *self);\n  static void set_surrogate_key(JSObject *self, JSString *key);\n  static JSObject *clone(JSContext *cx, JS::HandleObject self);\n  static JS::Value pci(JSObject *self);\n  static void set_pci(JSObject *self, bool pci);\n  static JSObject *beforeSend(JSObject *self);\n  static void set_beforeSend(JSObject *self, JSObject *fn);\n  static JSObject *afterSend(JSObject *self);\n  static void set_afterSend(JSObject *self, JSObject *fn);\n  static CacheOverrideMode mode(JSObject *self);\n  static void set_mode(JSObject *self, CacheOverride::CacheOverrideMode mode);\n  static bool mode_get(JSContext *cx, JS::HandleObject self, JS::MutableHandleValue rval);\n  static bool mode_set(JSContext *cx, JS::HandleObject self, JS::HandleValue val,\n                       JS::MutableHandleValue rval);\n  static bool ttl_get(JSContext *cx, JS::HandleObject self, JS::MutableHandleValue rval);\n  static bool ttl_set(JSContext *cx, JS::HandleObject self, JS::HandleValue val,\n                      JS::MutableHandleValue rval);\n  static bool swr_get(JSContext *cx, JS::HandleObject self, JS::MutableHandleValue rval);\n  static bool swr_set(JSContext *cx, JS::HandleObject self, JS::HandleValue val,\n                      JS::MutableHandleValue rval);\n  static bool surrogate_key_get(JSContext *cx, JS::HandleObject self, JS::MutableHandleValue rval);\n  static bool surrogate_key_set(JSContext *cx, JS::HandleObject self, JS::HandleValue val,\n                                JS::MutableHandleValue rval);\n  static bool pci_get(JSContext *cx, JS::HandleObject self, JS::MutableHandleValue rval);\n  static bool pci_set(JSContext *cx, JS::HandleObject self, JS::HandleValue val,\n                      JS::MutableHandleValue rval);\n  static bool before_send_get(JSContext *cx, JS::HandleObject self, JS::MutableHandleValue rval);\n  static bool before_send_set(JSContext *cx, JS::HandleObject self, JS::HandleValue val,\n                              JS::MutableHandleValue rval);\n  static bool after_send_get(JSContext *cx, JS::HandleObject self, JS::MutableHandleValue rval);\n  static bool after_send_set(JSContext *cx, JS::HandleObject self, JS::HandleValue val,\n                             JS::MutableHandleValue rval);\n  template <auto accessor_fn> static bool accessor_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  template <auto accessor_fn> static bool accessor_set(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  static bool ensure_override(JSContext *cx, JS::HandleObject self, const char *field);\n\n  static JSObject *create(JSContext *cx, JS::HandleValue override);\n  static bool constructor(JSContext *cx, unsigned argc, JS::Value *vp);\n};\n\n} // namespace fastly::cache_override\n\n#endif\n"
  },
  {
    "path": "runtime/fastly/builtins/cache-simple.cpp",
    "content": "#include \"cache-simple.h\"\n#include \"../../StarlingMonkey/builtins/web/streams/native-stream-source.h\"\n#include \"../../StarlingMonkey/builtins/web/url.h\"\n#include \"../../StarlingMonkey/runtime/encode.h\"\n#include \"../host-api/host_api_fastly.h\"\n#include \"builtin.h\"\n#include \"fastly.h\"\n#include \"js/ArrayBuffer.h\"\n#include \"js/Result.h\"\n#include \"js/Stream.h\"\n#include \"openssl/evp.h\"\n#include <tuple>\n\nusing builtins::BuiltinNoConstructor;\nusing builtins::web::streams::NativeStreamSource;\nusing fastly::FastlyGetErrorMessage;\nusing fastly::fastly::convertBodyInit;\nusing fastly::fetch::RequestOrResponse;\n\nnamespace {\napi::Engine *GLOBAL_ENGINE;\n}\n\nnamespace fastly::cache_simple {\n\ntemplate <RequestOrResponse::BodyReadResult result_type>\nbool SimpleCacheEntry::bodyAll(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0);\n  return RequestOrResponse::bodyAll<result_type, false>(cx, args, self);\n}\n\nbool SimpleCacheEntry::body_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0);\n  if (!JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::HasBody)).isBoolean()) {\n    JS::SetReservedSlot(self, static_cast<uint32_t>(Slots::HasBody), JS::BooleanValue(false));\n  }\n  return RequestOrResponse::body_get(cx, args, self, true);\n}\n\nbool SimpleCacheEntry::bodyUsed_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0);\n  if (!JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::BodyUsed)).isBoolean()) {\n    JS::SetReservedSlot(self, static_cast<uint32_t>(Slots::BodyUsed), JS::BooleanValue(false));\n  }\n  args.rval().setBoolean(RequestOrResponse::body_used(self));\n  return true;\n}\n\nconst JSFunctionSpec SimpleCacheEntry::static_methods[] = {\n    JS_FS_END,\n};\n\nconst JSPropertySpec SimpleCacheEntry::static_properties[] = {\n    JS_PS_END,\n};\n\nconst JSFunctionSpec SimpleCacheEntry::methods[] = {\n    JS_FN(\"arrayBuffer\", bodyAll<RequestOrResponse::BodyReadResult::ArrayBuffer>, 0,\n          JSPROP_ENUMERATE),\n    JS_FN(\"json\", bodyAll<RequestOrResponse::BodyReadResult::JSON>, 0, JSPROP_ENUMERATE),\n    JS_FN(\"text\", bodyAll<RequestOrResponse::BodyReadResult::Text>, 0, JSPROP_ENUMERATE),\n    JS_FS_END,\n};\n\nconst JSPropertySpec SimpleCacheEntry::properties[] = {\n    JS_PSG(\"body\", body_get, JSPROP_ENUMERATE),\n    JS_PSG(\"bodyUsed\", bodyUsed_get, JSPROP_ENUMERATE),\n    JS_STRING_SYM_PS(toStringTag, \"SimpleCacheEntry\", JSPROP_READONLY),\n    JS_PS_END,\n};\n\nJSObject *SimpleCacheEntry::create(JSContext *cx, host_api::HttpBody body_handle) {\n  JS::RootedObject SimpleCacheEntry(cx, JS_NewObjectWithGivenProto(cx, &class_, proto_obj));\n  if (!SimpleCacheEntry)\n    return nullptr;\n\n  JS::SetReservedSlot(SimpleCacheEntry, static_cast<uint32_t>(Slots::Body),\n                      JS::Int32Value(body_handle.handle));\n  JS::SetReservedSlot(SimpleCacheEntry, static_cast<uint32_t>(Slots::BodyStream), JS::NullValue());\n  JS::SetReservedSlot(SimpleCacheEntry, static_cast<uint32_t>(Slots::HasBody),\n                      JS::BooleanValue(true));\n  JS::SetReservedSlot(SimpleCacheEntry, static_cast<uint32_t>(Slots::BodyUsed), JS::FalseValue());\n\n  return SimpleCacheEntry;\n}\n\nnamespace {\n// Purging/Deleting a cache item within the Compute SDKs via a hostcall is only\n// possible via surrogate-keys. We add a surrogate key to all the cache entries,\n// which is the sha-256 digest of the cache entries cache-key, converted to\n// uppercase hexadecimal.\n// Note: We should keep this consistent across the Compute SDKs, this would allow\n// a Compute Service to move from one SDK to another, and have consistent purging\n// behavior between the Compute Service Versions which were using a different SDK.\nJS::Result<std::string> createGlobalSurrogateKeyFromCacheKey(JSContext *cx,\n                                                             std::string_view cache_key) {\n  const EVP_MD *algorithm = EVP_sha256();\n  unsigned int size = EVP_MD_size(algorithm);\n  std::vector<unsigned char> md(size);\n\n  if (!EVP_Digest(cache_key.data(), cache_key.size(), md.data(), &size, algorithm, nullptr)) {\n    return JS::Result<std::string>(JS::Error());\n  }\n  JS::UniqueChars data{OPENSSL_buf2hexstr(md.data(), size)};\n  std::string surrogate_key{data.get(), std::remove(data.get(), data.get() + size, ':')};\n\n  return JS::Result<std::string>(surrogate_key);\n}\n\n// Purging/Deleting a cache item within the Compute SDKs via a hostcall is only\n// possible via surrogate-keys. We add a surrogate key to all the cache entries,\n// which is the sha-256 digest of the cache entries cache-key and the FASTLY_POP\n// environment variable, converted to uppercase hexadecimal.\n// Note: We should keep this consistent across the Compute SDKs, this would allow\n// a Compute Service to move from one SDK to another, and have consistent purging\n// behavior between the Compute Service Versions which were using a different SDK.\nJS::Result<std::string> createPopSurrogateKeyFromCacheKey(JSContext *cx,\n                                                          std::string_view cache_key) {\n  const EVP_MD *algorithm = EVP_sha256();\n  unsigned int size = EVP_MD_size(algorithm);\n  std::vector<unsigned char> md(size);\n\n  std::string key{cache_key};\n  auto pop = getenv(\"FASTLY_POP\");\n  if (pop) {\n    key += pop;\n  }\n\n  // TODO: use the incremental Digest api instead of allocating a string\n  if (!EVP_Digest(key.c_str(), key.length(), md.data(), &size, algorithm, nullptr)) {\n    return JS::Result<std::string>(JS::Error());\n  }\n  JS::UniqueChars data{OPENSSL_buf2hexstr(md.data(), size)};\n  std::string surrogate_key{data.get(), std::remove(data.get(), data.get() + size, ':')};\n\n  return JS::Result<std::string>(surrogate_key);\n}\n\n// Create all the surrogate keys for the cache key\nJS::Result<std::string> createSurrogateKeysFromCacheKey(JSContext *cx, std::string_view cache_key) {\n  const EVP_MD *algorithm = EVP_sha256();\n  unsigned int size = EVP_MD_size(algorithm);\n  std::vector<unsigned char> md(size);\n\n  if (!EVP_Digest(cache_key.data(), cache_key.size(), md.data(), &size, algorithm, nullptr)) {\n    return JS::Result<std::string>(JS::Error());\n  }\n  JS::UniqueChars data{OPENSSL_buf2hexstr(md.data(), size)};\n  std::string surrogate_keys{data.get(), std::remove(data.get(), data.get() + size, ':')};\n\n  if (auto *pop = getenv(\"FASTLY_POP\")) {\n    // TODO: use the incremental Digest api instead of allocating a string\n    std::string key{cache_key};\n    key += pop;\n    if (!EVP_Digest(key.c_str(), key.length(), md.data(), &size, algorithm, nullptr)) {\n      return JS::Result<std::string>(JS::Error());\n    }\n    JS::UniqueChars data{OPENSSL_buf2hexstr(md.data(), size)};\n    surrogate_keys.push_back(' ');\n    surrogate_keys.append(data.get(), std::remove(data.get(), data.get() + size, ':'));\n  }\n\n  return JS::Result<std::string>(surrogate_keys);\n}\n\n#define BEGIN_TRANSACTION(t, cx, promise, handle)                                                  \\\n  CacheTransaction t{cx, promise, handle, __func__, __LINE__};\n\nclass CacheTransaction final {\n  JSContext *cx;\n  JS::RootedObject promise;\n  host_api::CacheHandle handle;\n\n  const char *func;\n  int line;\n\npublic:\n  CacheTransaction(JSContext *cx, JS::HandleObject promise, host_api::CacheHandle handle,\n                   const char *func, const int line)\n      : cx{cx}, promise{this->cx, promise}, handle{handle}, func{func}, line{line} {};\n\n  ~CacheTransaction() {\n    // An invalid handle indicates that this transaction has been committed.\n    if (!this->handle.is_valid()) {\n      return;\n    }\n\n    auto res = this->handle.transaction_cancel();\n    if (auto *err = res.to_err()) {\n      host_api::handle_api_error(this->cx, *err, this->line, this->func);\n    }\n\n    // We always reject the promise if the transaction hasn't committed.\n    RejectPromiseWithPendingError(this->cx, this->promise);\n  }\n\n  /// Commit this transaction.\n  void commit() {\n    // Invalidate the handle to indicate that the transaction has been committed.\n    MOZ_ASSERT(this->handle.is_valid());\n    this->handle = host_api::CacheHandle{};\n    MOZ_ASSERT(!this->handle.is_valid());\n  }\n};\n\nbool get_or_set_then_handler(JSContext *cx, JS::HandleObject lookup_state, JS::HandleValue extra,\n                             JS::CallArgs args) {\n  JS::RootedValue handle_val(cx);\n  JS::RootedValue promise_val(cx);\n  if (!JS_GetProperty(cx, lookup_state, \"promise\", &promise_val)) {\n    return false;\n  }\n  MOZ_ASSERT(promise_val.isObject());\n  JS::RootedObject promise(cx, &promise_val.toObject());\n  if (!promise) {\n    return ReturnPromiseRejectedWithPendingError(cx, args);\n  }\n\n  if (!JS_GetProperty(cx, lookup_state, \"handle\", &handle_val)) {\n    return RejectPromiseWithPendingError(cx, promise);\n  }\n  MOZ_ASSERT(handle_val.isInt32());\n\n  host_api::CacheHandle handle(handle_val.toInt32());\n\n  BEGIN_TRANSACTION(transaction, cx, promise, handle);\n\n  JS::RootedValue keyVal(cx);\n  if (!JS_GetProperty(cx, lookup_state, \"key\", &keyVal)) {\n    return false;\n  }\n\n  auto arg0 = args.get(0);\n  if (!arg0.isObject()) {\n    JS_ReportErrorASCII(cx, \"SimpleCache.getOrSet: does not adhere to interface {value: BodyInit,  \"\n                            \"ttl: number, length?:number}\");\n    return false;\n  }\n  JS::RootedObject insertionObject(cx, &arg0.toObject());\n\n  JS::RootedValue ttl_val(cx);\n  if (!JS_GetProperty(cx, insertionObject, \"ttl\", &ttl_val)) {\n    return false;\n  }\n  // Convert ttl (time-to-live) field into a number and check the value adheres to our\n  // validation rules.\n  double ttl;\n  if (!JS::ToNumber(cx, ttl_val, &ttl)) {\n    return false;\n  }\n  if (ttl < 0 || std::isnan(ttl) || std::isinf(ttl)) {\n    JS_ReportErrorASCII(\n        cx, \"SimpleCache.getOrSet: TTL field is an invalid value, only positive numbers can \"\n            \"be used for TTL values.\");\n    return false;\n  }\n  host_api::CacheWriteOptions options;\n  // turn second representation into nanosecond representation\n  options.max_age_ns = JS::ToUint64(ttl) * 1'000'000'000;\n\n  JS::RootedValue body_val(cx);\n  if (!JS_GetProperty(cx, insertionObject, \"value\", &body_val)) {\n    return false;\n  }\n\n  host_api::HttpBody source_body;\n  JS::UniqueChars buf;\n  JS::RootedObject body_obj(cx, body_val.isObject() ? &body_val.toObject() : nullptr);\n  // If the body is a Host-backed ReadableStream we optimise our implementation\n  // by using the ReadableStream's handle directly.\n  if (body_obj && JS::IsReadableStream(body_obj)) {\n    if (RequestOrResponse::body_unusable(cx, body_obj)) {\n      JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                                JSMSG_READABLE_STREAM_LOCKED_OR_DISTRUBED);\n      return false;\n    }\n\n    // If the stream is backed by a Fastly Compute body handle, we can use that handle directly.\n    if (NativeStreamSource::stream_is_body(cx, body_obj)) {\n      JS::RootedObject stream_source(cx, NativeStreamSource::get_stream_source(cx, body_obj));\n      JS::RootedObject source_owner(cx, NativeStreamSource::owner(stream_source));\n      source_body = RequestOrResponse::body_handle(source_owner);\n    } else {\n      JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                                JSMSG_SIMPLE_CACHE_SET_CONTENT_STREAM);\n      return false;\n    }\n\n    // The cache APIs require the length to be known upfront, we don't know the length of a\n    // stream upfront, which means the caller will need to supply the information explicitly for us.\n    bool found;\n    if (!JS_HasProperty(cx, insertionObject, \"length\", &found)) {\n      return false;\n    }\n    if (found) {\n\n      JS::RootedValue length_val(cx);\n      if (!JS_GetProperty(cx, insertionObject, \"length\", &length_val)) {\n        return false;\n      }\n      double number;\n      if (!JS::ToNumber(cx, length_val, &number)) {\n        return false;\n      }\n      if (number < 0 || std::isnan(number) || std::isinf(number)) {\n        JS_ReportErrorASCII(\n            cx,\n            \"SimpleCache.getOrSet: length property is an invalid value, only positive numbers can \"\n            \"be used for length values.\");\n        return false;\n      }\n      options.length = JS::ToInteger(number);\n    }\n  } else {\n    auto result = convertBodyInit(cx, body_val);\n    if (result.isErr()) {\n      return false;\n    }\n    std::tie(buf, options.length) = result.unwrap();\n  }\n\n  // We create a surrogate-key from the cache-key, as this allows the cached contents to be purgable\n  // from within the JavaScript application\n  // This is because the cache API currently only supports purging via surrogate-key\n  auto key_chars = core::encode(cx, keyVal);\n  if (!key_chars) {\n    return false;\n  }\n  auto key_result = createSurrogateKeysFromCacheKey(cx, key_chars);\n  if (key_result.isErr()) {\n    return false;\n  }\n  options.surrogate_keys = key_result.inspect();\n\n  auto inserted_res = handle.transaction_insert_and_stream_back(options);\n  if (auto *err = inserted_res.to_err()) {\n    return false;\n  }\n\n  auto [body, inserted_handle] = inserted_res.unwrap();\n  if (!body.valid()) {\n    return false;\n  }\n  // source_body will only be valid when the body is a Host-backed ReadableStream\n  if (source_body.valid()) {\n    auto res = body.append(source_body);\n    if (auto *error = res.to_err()) {\n      return false;\n    }\n  } else {\n    auto write_res = body.write_all_back(reinterpret_cast<uint8_t *>(buf.get()), options.length);\n    if (auto *error = write_res.to_err()) {\n      return false;\n    }\n    auto close_res = body.close();\n    if (auto *error = close_res.to_err()) {\n      return false;\n    }\n  }\n\n  auto res = inserted_handle.get_body(host_api::CacheGetBodyOptions{});\n  if (auto *err = res.to_err()) {\n    return false;\n  }\n\n  JS::RootedObject entry(cx, SimpleCacheEntry::create(cx, res.unwrap()));\n  if (!entry) {\n    return false;\n  }\n\n  transaction.commit();\n\n  JS::RootedValue result(cx);\n  result.setObject(*entry);\n  JS::ResolvePromise(cx, promise, result);\n  return true;\n}\n\nbool get_or_set_catch_handler(JSContext *cx, JS::HandleObject lookup_state,\n                              JS::HandleValue inner_promise_val, JS::CallArgs args) {\n  JS::RootedValue promise_val(cx);\n  if (!JS_GetProperty(cx, lookup_state, \"promise\", &promise_val)) {\n    return false;\n  }\n  MOZ_ASSERT(promise_val.isObject());\n  JS::RootedObject promise(cx, &promise_val.toObject());\n  if (!promise) {\n    return ReturnPromiseRejectedWithPendingError(cx, args);\n  }\n\n  JS::RootedObject inner_promise(cx, &inner_promise_val.toObject());\n  if (!inner_promise) {\n    return ReturnPromiseRejectedWithPendingError(cx, args);\n  }\n  MOZ_ASSERT(JS::GetPromiseState(inner_promise) == JS::PromiseState::Rejected);\n  JS::RootedValue promise_rejection_err(cx, JS::GetPromiseResult(inner_promise));\n  JS::RejectPromise(cx, promise, promise_rejection_err);\n  return true;\n}\n\nbool process_pending_cache_lookup(JSContext *cx, host_api::CacheHandle::Handle handle,\n                                  JS::HandleObject context_obj, JS::HandleValue) {\n  host_api::CacheHandle pending_lookup(handle);\n  JS::RootedValue key_val(cx);\n  if (!JS_GetProperty(cx, context_obj, \"key\", &key_val)) {\n    return false;\n  }\n  auto key_chars = core::encode(cx, key_val);\n  JS::RootedValue set_function_val(cx);\n  if (!JS_GetProperty(cx, context_obj, \"set_function\", &set_function_val)) {\n    return false;\n  }\n  JS::RootedValue promise_val(cx);\n  if (!JS_GetProperty(cx, context_obj, \"promise\", &promise_val)) {\n    return false;\n  }\n  JS::RootedObject promise_obj(cx, &promise_val.toObject());\n\n  BEGIN_TRANSACTION(transaction, cx, promise_obj, pending_lookup);\n\n  // Check if a fresh cache item was found, if that's the case, then we will resolve\n  // with a SimpleCacheEntry containing the value. Else, call the content-provided\n  // function in the `set` parameter and insert it's returned value property into the\n  // cache under the provided `key`, and then we will resolve with a SimpleCacheEntry\n  // containing the value.\n  auto state_res = pending_lookup.get_state();\n  if (auto *err = state_res.to_err()) {\n    return false;\n  }\n\n  auto state = state_res.unwrap();\n  if (state.is_usable()) {\n    auto body_res = pending_lookup.get_body(host_api::CacheGetBodyOptions{});\n    if (auto *err = body_res.to_err()) {\n      return false;\n    }\n\n    JS::RootedObject entry(cx, SimpleCacheEntry::create(cx, body_res.unwrap()));\n    if (!entry) {\n      return false;\n    }\n\n    JS::RootedValue result(cx);\n    result.setObject(*entry);\n    JS::ResolvePromise(cx, promise_obj, result);\n    return true;\n  } else {\n    if (!set_function_val.isObject() || !JS::IsCallable(&set_function_val.toObject())) {\n      JS_ReportErrorLatin1(cx, \"SimpleCache.getOrSet: set argument is not a function\");\n      return false;\n    }\n    JS::RootedValueArray<0> fnargs(cx);\n    JS::RootedObject fn(cx, &set_function_val.toObject());\n    JS::RootedValue result(cx);\n    if (!JS::Call(cx, JS::NullHandleValue, fn, fnargs, &result)) {\n      return false;\n    }\n    // Coercion of `result` to a Promise<typeof result>\n    JS::RootedObject result_promise(cx, JS::CallOriginalPromiseResolve(cx, result));\n    if (!result_promise) {\n      return false;\n    }\n\n    // JS::RootedObject owner(cx, JS_NewPlainObject(cx));\n    JS::RootedObject lookup_state(cx, JS_NewPlainObject(cx));\n    JS::RootedValue handle_val(cx, JS::NumberValue(handle));\n    if (!JS_SetProperty(cx, lookup_state, \"handle\", handle_val)) {\n      return false;\n    }\n    JS::RootedString key_str(cx, JS_NewStringCopyN(cx, key_chars.begin(), key_chars.len));\n    JS::RootedValue keyVal(cx, JS::StringValue(key_str));\n    if (!JS_SetProperty(cx, lookup_state, \"key\", keyVal)) {\n      return false;\n    }\n    JS::RootedValue promise_val(cx, JS::ObjectValue(*promise_obj));\n    if (!JS_SetProperty(cx, lookup_state, \"promise\", promise_val)) {\n      return false;\n    }\n\n    JS::RootedObject global(cx, JS::CurrentGlobalOrNull(cx));\n    JS::RootedObject then_handler(\n        cx, create_internal_method<get_or_set_then_handler>(cx, lookup_state));\n    if (!then_handler) {\n      return false;\n    }\n    JS::RootedValue result_promise_val(cx, JS::ObjectValue(*result_promise));\n    JS::RootedObject catch_handler(\n        cx, create_internal_method<get_or_set_catch_handler>(cx, lookup_state, result_promise_val));\n    if (!then_handler) {\n      return false;\n    }\n    if (!JS::AddPromiseReactions(cx, result_promise, then_handler, catch_handler)) {\n      return false;\n    }\n    transaction.commit();\n    return true;\n  }\n}\n\n} // namespace\n\n// static getOrSet(key: string, set: () => Promise<{value: BodyInit,  ttl: number}>):\n// SimpleCacheEntry | null; static getOrSet(key: string, set: () => Promise<{value: ReadableStream,\n// ttl: number, length: number}>): SimpleCacheEntry | null;\nbool SimpleCache::getOrSet(JSContext *cx, unsigned argc, JS::Value *vp) {\n  REQUEST_HANDLER_ONLY(\"The SimpleCache builtin\");\n  JS::CallArgs args = JS::CallArgsFromVp(argc, vp);\n  if (!args.requireAtLeast(cx, \"SimpleCache.getOrSet\", 2)) {\n    return false;\n  }\n\n  // Convert key parameter into a string and check the value adheres to our validation rules.\n  auto key_chars = core::encode(cx, args.get(0));\n  if (!key_chars) {\n    return false;\n  }\n\n  if (key_chars.len == 0) {\n    JS_ReportErrorASCII(cx, \"SimpleCache.getOrSet: key can not be an empty string\");\n    return false;\n  }\n  if (key_chars.len > 8135) {\n    JS_ReportErrorASCII(\n        cx, \"SimpleCache.getOrSet: key is too long, the maximum allowed length is 8135.\");\n    return false;\n  }\n\n  JS::RootedObject promise(cx, JS::NewPromiseObject(cx, nullptr));\n  if (!promise) {\n    return ReturnPromiseRejectedWithPendingError(cx, args);\n  }\n\n  auto res = host_api::CacheHandle::transaction_lookup(key_chars, host_api::CacheLookupOptions{});\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  // The async task requires some extra state: the key, the `set` function, and the promise.\n  // We wrap this all up into one object, so `process_pending_cache_lookup` can retrieve everything.\n  // This could be avoided with some changes to `FastlyAsyncTask`, see\n  // (https://github.com/fastly/js-compute-runtime/issues/1245)\n  JS::RootedObject context_obj(cx, JS_NewPlainObject(cx));\n  if (!context_obj) {\n    return false;\n  }\n  JS::RootedValue key_val(cx, args.get(0));\n  if (!JS_SetProperty(cx, context_obj, \"key\", key_val)) {\n    return false;\n  }\n  JS::RootedValue set_func_val(cx, args.get(1));\n  if (!JS_SetProperty(cx, context_obj, \"set_function\", set_func_val)) {\n    return false;\n  }\n  JS::RootedValue promise_val(cx, JS::ObjectValue(*promise));\n  if (!JS_SetProperty(cx, context_obj, \"promise\", promise_val)) {\n    return false;\n  }\n  auto handle = res.unwrap();\n  GLOBAL_ENGINE->queue_async_task(new FastlyAsyncTask(\n      handle.handle, context_obj, JS::UndefinedHandleValue, process_pending_cache_lookup));\n\n  args.rval().setObject(*promise);\n  return true;\n}\n\n// static set(key: string, value: BodyInit, ttl: number): undefined;\n// static set(key: string, value: ReadableStream, ttl: number, length: number): undefined;\nbool SimpleCache::set(JSContext *cx, unsigned argc, JS::Value *vp) {\n  REQUEST_HANDLER_ONLY(\"The SimpleCache builtin\");\n  JS::CallArgs args = JS::CallArgsFromVp(argc, vp);\n  if (!args.requireAtLeast(cx, \"SimpleCache.set\", 3)) {\n    return false;\n  }\n\n  // Convert key parameter into a string and check the value adheres to our validation rules.\n  auto key = core::encode(cx, args.get(0));\n  if (!key) {\n    return false;\n  }\n\n  if (key.len == 0) {\n    JS_ReportErrorASCII(cx, \"SimpleCache.set: key can not be an empty string\");\n    return false;\n  }\n  if (key.len > 8135) {\n    JS_ReportErrorASCII(cx,\n                        \"SimpleCache.set: key is too long, the maximum allowed length is 8135.\");\n    return false;\n  }\n\n  host_api::CacheWriteOptions options;\n  // Convert ttl (time-to-live) parameter into a number and check the value adheres to our\n  // validation rules.\n  JS::HandleValue ttl_val = args.get(2);\n  double ttl;\n  if (!JS::ToNumber(cx, ttl_val, &ttl)) {\n    return false;\n  }\n  if (ttl < 0 || std::isnan(ttl) || std::isinf(ttl)) {\n    JS_ReportErrorASCII(\n        cx, \"SimpleCache.set: TTL parameter is an invalid value, only positive numbers can \"\n            \"be used for TTL values.\");\n    return false;\n  }\n  options.max_age_ns = JS::ToUint64(ttl) *\n                       1'000'000'000; // turn second representation into nanosecond representation\n\n  JS::HandleValue body_val = args.get(1);\n  host_api::HttpBody source_body;\n  JS::UniqueChars buf;\n  JS::RootedObject body_obj(cx, body_val.isObject() ? &body_val.toObject() : nullptr);\n  // If the body parameter is a Host-backed ReadableStream we optimise our implementation\n  // by using the ReadableStream's handle directly.\n  if (body_obj && JS::IsReadableStream(body_obj)) {\n    if (RequestOrResponse::body_unusable(cx, body_obj)) {\n      JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                                JSMSG_READABLE_STREAM_LOCKED_OR_DISTRUBED);\n      return false;\n    }\n\n    // If the stream is backed by a Fastly Compute body handle, we can use that handle directly.\n    if (NativeStreamSource::stream_is_body(cx, body_obj)) {\n      JS::RootedObject stream_source(cx, NativeStreamSource::get_stream_source(cx, body_obj));\n      JS::RootedObject source_owner(cx, NativeStreamSource::owner(stream_source));\n      source_body = RequestOrResponse::body_handle(source_owner);\n    } else {\n      JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                                JSMSG_SIMPLE_CACHE_SET_CONTENT_STREAM);\n      return false;\n    }\n\n    if (args.hasDefined(3)) {\n      JS::HandleValue length_val = args.get(3);\n      double number;\n      if (!JS::ToNumber(cx, length_val, &number)) {\n        return false;\n      }\n      if (number < 0 || std::isnan(number) || std::isinf(number)) {\n        JS_ReportErrorASCII(\n            cx, \"SimpleCache.set: length parameter is an invalid value, only positive numbers can \"\n                \"be used for length values.\");\n        return false;\n      }\n      options.length = JS::ToInteger(number);\n    }\n  } else {\n    auto result = convertBodyInit(cx, body_val);\n    if (result.isErr()) {\n      return false;\n    }\n    std::tie(buf, options.length) = result.unwrap();\n  }\n\n  // We create a surrogate-key from the cache-key, as this allows the cached contents to be purgable\n  // from within the JavaScript application\n  // This is because the cache API currently only supports purging via surrogate-key\n  auto key_result = createSurrogateKeysFromCacheKey(cx, key);\n  if (key_result.isErr()) {\n    return false;\n  }\n  options.surrogate_keys = key_result.inspect();\n\n  auto insert_res = host_api::CacheHandle::insert(key, options);\n  if (auto *err = insert_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  auto body = insert_res.unwrap();\n  if (!body.valid()) {\n    return false;\n  }\n  // source_body will only be valid when the body parameter is a Host-backed ReadableStream\n  if (source_body.valid()) {\n    auto res = body.append(source_body);\n    if (auto *err = res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return false;\n    }\n    args.rval().setUndefined();\n    return true;\n  } else {\n    auto write_res = body.write_all_back(reinterpret_cast<uint8_t *>(buf.get()), options.length);\n    if (auto *err = write_res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return false;\n    }\n  }\n  auto close_res = body.close();\n  if (auto *err = close_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  args.rval().setUndefined();\n  return true;\n}\n\n// static get(key: string): SimpleCacheEntry | null;\nbool SimpleCache::get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  REQUEST_HANDLER_ONLY(\"The SimpleCache builtin\");\n  JS::CallArgs args = JS::CallArgsFromVp(argc, vp);\n  if (!args.requireAtLeast(cx, \"SimpleCache.get\", 1)) {\n    return false;\n  }\n\n  // Convert key parameter into a string and check the value adheres to our validation rules.\n  auto key = core::encode(cx, args[0]);\n  if (!key) {\n    return false;\n  }\n\n  if (key.len == 0) {\n    JS_ReportErrorASCII(cx, \"SimpleCache.get: key can not be an empty string\");\n    return false;\n  }\n  if (key.len > 8135) {\n    JS_ReportErrorASCII(cx,\n                        \"SimpleCache.get: key is too long, the maximum allowed length is 8135.\");\n    return false;\n  }\n\n  auto lookup_res = host_api::CacheHandle::lookup(key, host_api::CacheLookupOptions{});\n  if (auto *err = lookup_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  auto handle = lookup_res.unwrap();\n\n  auto body_res = handle.get_body(host_api::CacheGetBodyOptions{});\n  if (auto *err = body_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  auto body = body_res.unwrap();\n\n  if (!body.valid()) {\n    args.rval().setNull();\n  } else {\n    JS::RootedObject entry(cx, SimpleCacheEntry::create(cx, body));\n    if (!entry) {\n      return false;\n    }\n    args.rval().setObject(*entry);\n  }\n\n  return true;\n}\n\n// static purge(key: string, options: PurgeOptions): undefined;\nbool SimpleCache::purge(JSContext *cx, unsigned argc, JS::Value *vp) {\n  REQUEST_HANDLER_ONLY(\"The SimpleCache builtin\");\n  JS::CallArgs args = JS::CallArgsFromVp(argc, vp);\n  if (!args.requireAtLeast(cx, \"SimpleCache.purge\", 2)) {\n    return false;\n  }\n\n  // Convert key parameter into a string and check the value adheres to our validation rules.\n  auto key_chars = core::encode(cx, args.get(0));\n  if (!key_chars) {\n    return false;\n  }\n\n  if (key_chars.len == 0) {\n    JS_ReportErrorASCII(cx, \"SimpleCache.purge: key can not be an empty string\");\n    return false;\n  }\n  if (key_chars.len > 8135) {\n    JS_ReportErrorASCII(cx,\n                        \"SimpleCache.purge: key is too long, the maximum allowed length is 8135.\");\n    return false;\n  }\n\n  auto secondArgument = args.get(1);\n  if (!secondArgument.isObject()) {\n    JS_ReportErrorASCII(cx, \"SimpleCache.purge: options parameter is not an object.\");\n    return false;\n  }\n\n  JS::RootedObject options(cx, &secondArgument.toObject());\n  JS::RootedValue scope_val(cx);\n  if (!JS_GetProperty(cx, options, \"scope\", &scope_val)) {\n    return false;\n  }\n  auto scope_chars = core::encode(cx, scope_val);\n  if (!scope_chars) {\n    return false;\n  }\n\n  std::string_view scope = scope_chars;\n  std::string surrogate_key;\n  if (scope == \"pop\") {\n    auto surrogate_key_result = createPopSurrogateKeyFromCacheKey(cx, key_chars);\n    if (surrogate_key_result.isErr()) {\n      return false;\n    }\n    surrogate_key = surrogate_key_result.unwrap();\n  } else if (scope == \"global\") {\n    auto surrogate_key_result = createGlobalSurrogateKeyFromCacheKey(cx, key_chars);\n    if (surrogate_key_result.isErr()) {\n      return false;\n    }\n    surrogate_key = surrogate_key_result.unwrap();\n  } else {\n    JS_ReportErrorASCII(\n        cx,\n        \"SimpleCache.purge: scope field of options parameter must be either 'pop', or 'global'.\");\n    return false;\n  }\n\n  auto purge_res = host_api::Compute::purge_surrogate_key(surrogate_key, false);\n  if (auto *err = purge_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  MOZ_ASSERT(!purge_res.unwrap().has_value());\n\n  args.rval().setUndefined();\n  return true;\n}\n\nconst JSFunctionSpec SimpleCache::static_methods[] = {\n    JS_FN(\"purge\", purge, 2, JSPROP_ENUMERATE),\n    JS_FN(\"get\", get, 1, JSPROP_ENUMERATE),\n    JS_FN(\"getOrSet\", getOrSet, 2, JSPROP_ENUMERATE),\n    JS_FN(\"set\", set, 3, JSPROP_ENUMERATE),\n    JS_FS_END,\n};\n\nconst JSPropertySpec SimpleCache::static_properties[] = {\n    JS_PS_END,\n};\n\nconst JSFunctionSpec SimpleCache::methods[] = {JS_FS_END};\n\nconst JSPropertySpec SimpleCache::properties[] = {\n    JS_STRING_SYM_PS(toStringTag, \"SimpleCache\", JSPROP_READONLY), JS_PS_END};\n\nbool install(api::Engine *engine) {\n  GLOBAL_ENGINE = engine;\n\n  if (!SimpleCacheEntry::init_class_impl(engine->cx(), engine->global())) {\n    return false;\n  }\n  if (!SimpleCache::init_class_impl(engine->cx(), engine->global())) {\n    return false;\n  }\n  return true;\n}\n\n} // namespace fastly::cache_simple\n"
  },
  {
    "path": "runtime/fastly/builtins/cache-simple.h",
    "content": "#ifndef FASTLY_CACHE_SIMPLE_H\n#define FASTLY_CACHE_SIMPLE_H\n\n#include \"../host-api/host_api_fastly.h\"\n#include \"./fetch/request-response.h\"\n#include \"builtin.h\"\n\nnamespace fastly::cache_simple {\n\nclass SimpleCacheEntry final : public builtins::BuiltinNoConstructor<SimpleCacheEntry> {\n  template <fetch::RequestOrResponse::BodyReadResult result_type>\n  static bool bodyAll(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool body_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool bodyUsed_get(JSContext *cx, unsigned argc, JS::Value *vp);\n\npublic:\n  static constexpr const char *class_name = \"SimpleCacheEntry\";\n\n  using Slots = fetch::RequestOrResponse::Slots;\n  static const JSFunctionSpec static_methods[];\n  static const JSPropertySpec static_properties[];\n  static const JSFunctionSpec methods[];\n  static const JSPropertySpec properties[];\n\n  static const unsigned ctor_length = 0;\n\n  static JSObject *create(JSContext *cx, host_api::HttpBody body_handle);\n};\n\nclass SimpleCache : public builtins::BuiltinNoConstructor<SimpleCache> {\nprivate:\npublic:\n  static constexpr const char *class_name = \"SimpleCache\";\n  static const int ctor_length = 0;\n  enum Slots { Count };\n\n  static const JSFunctionSpec static_methods[];\n  static const JSPropertySpec static_properties[];\n  static const JSFunctionSpec methods[];\n  static const JSPropertySpec properties[];\n\n  static bool delete_(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool purge(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool set(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool getOrSet(JSContext *cx, unsigned argc, JS::Value *vp);\n};\n\n} // namespace fastly::cache_simple\n\n#endif\n"
  },
  {
    "path": "runtime/fastly/builtins/config-store.cpp",
    "content": "#include \"config-store.h\"\n#include \"../../../StarlingMonkey/runtime/encode.h\"\n#include \"../host-api/host_api_fastly.h\"\n#include \"fastly.h\"\n\nusing builtins::BuiltinImpl;\nusing fastly::FastlyGetErrorMessage;\n\nnamespace fastly::config_store {\n\nhost_api::ConfigStore ConfigStore::config_store_handle(JSObject *obj) {\n  JS::Value val = JS::GetReservedSlot(obj, ConfigStore::Slots::Handle);\n  return host_api::ConfigStore(val.toInt32());\n}\n\nbool ConfigStore::get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(1)\n\n  auto key = core::encode(cx, args[0]);\n  // If the converted string has a length of 0 then we throw an Error\n  // because config-store keys have to be at-least 1 character.\n  if (!key || key.len == 0) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_CONFIG_STORE_KEY_EMPTY);\n    return false;\n  }\n\n  // key has to be less than 256\n  if (key.len > 255) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_CONFIG_STORE_KEY_TOO_LONG);\n    return false;\n  }\n\n  std::string_view key_str = key;\n  // Ensure that we throw an exception for all unexpected host errors.\n  auto get_res = ConfigStore::config_store_handle(self).get(key_str);\n  if (auto *err = get_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  // None indicates the key wasn't found, so we return null.\n  auto ret = std::move(get_res.unwrap());\n  if (!ret.has_value()) {\n    args.rval().setNull();\n    return true;\n  }\n\n  JS::RootedString text(cx, JS_NewStringCopyUTF8N(cx, JS::UTF8Chars(ret->begin(), ret->size())));\n  if (!text) {\n    return false;\n  }\n\n  args.rval().setString(text);\n  return true;\n}\n\nconst JSFunctionSpec ConfigStore::static_methods[] = {\n    JS_FS_END,\n};\n\nconst JSPropertySpec ConfigStore::static_properties[] = {\n    JS_PS_END,\n};\n\nconst JSFunctionSpec ConfigStore::methods[] = {JS_FN(\"get\", get, 1, JSPROP_ENUMERATE), JS_FS_END};\n\nconst JSPropertySpec ConfigStore::properties[] = {JS_PS_END};\n\nbool ConfigStore::constructor(JSContext *cx, unsigned argc, JS::Value *vp) {\n  REQUEST_HANDLER_ONLY(\"The ConfigStore builtin\");\n  CTOR_HEADER(\"ConfigStore\", 1);\n\n  auto name = core::encode(cx, args[0]);\n\n  // If the converted string has a length of 0 then we throw an Error\n  // because config-store names have to be at-least 1 character.\n  if (!name) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_CONFIG_STORE_NAME_EMPTY);\n    return false;\n  }\n\n  // If the converted string has a length of more than 255 then we throw an Error\n  // because config-store names have to be less than 255 characters.\n  if (name.size() > 255) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_CONFIG_STORE_NAME_TOO_LONG);\n    return false;\n  }\n\n  // Name must start with ascii alphabetical and contain only ascii alphanumeric, underscore, and\n  // whitespace\n  if (!std::isalpha(*name.begin())) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                              JSMSG_CONFIG_STORE_NAME_START_WITH_ASCII_ALPHA);\n    return false;\n  }\n\n  auto is_valid_name = std::all_of(std::next(name.begin(), 1), name.end(), [&](auto character) {\n    return std::isalnum(character) || character == '_' || character == ' ';\n  });\n\n  if (!is_valid_name) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                              JSMSG_CONFIG_STORE_NAME_CONTAINS_INVALID_CHARACTER);\n    return false;\n  }\n\n  JS::RootedObject config_store(cx, JS_NewObjectForConstructor(cx, &class_, args));\n  auto open_res = host_api::ConfigStore::open(name);\n  if (auto *err = open_res.to_err()) {\n    if (host_api::error_is_bad_handle(*err)) {\n      JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                                JSMSG_CONFIG_STORE_DOES_NOT_EXIST, name.begin());\n      return false;\n    } else {\n      HANDLE_ERROR(cx, *err);\n      return false;\n    }\n  }\n\n  JS::SetReservedSlot(config_store, ConfigStore::Slots::Handle,\n                      JS::Int32Value(open_res.unwrap().handle));\n  if (!config_store)\n    return false;\n  args.rval().setObject(*config_store);\n  return true;\n}\n\nbool install(api::Engine *engine) {\n  if (!ConfigStore::init_class_impl(engine->cx(), engine->global())) {\n    return false;\n  }\n\n  RootedObject config_store_ns_obj(engine->cx(), JS_NewObject(engine->cx(), nullptr));\n  RootedValue config_store_ns_val(engine->cx(), JS::ObjectValue(*config_store_ns_obj));\n  RootedObject config_store_obj(engine->cx(),\n                                JS_GetConstructor(engine->cx(), ConfigStore::proto_obj));\n  RootedValue config_store_val(engine->cx(), ObjectValue(*config_store_obj));\n  if (!JS_SetProperty(engine->cx(), config_store_ns_obj, \"ConfigStore\", config_store_val)) {\n    return false;\n  }\n  if (!engine->define_builtin_module(\"fastly:config-store\", config_store_ns_val)) {\n    return false;\n  }\n\n  return true;\n}\n\n} // namespace fastly::config_store\n"
  },
  {
    "path": "runtime/fastly/builtins/config-store.h",
    "content": "#ifndef FASTLY_CONFIG_STORE_H\n#define FASTLY_CONFIG_STORE_H\n\n#include \"../host-api/host_api_fastly.h\"\n#include \"builtin.h\"\n#include \"extension-api.h\"\n\nnamespace fastly::config_store {\n\nclass ConfigStore : public builtins::BuiltinImpl<ConfigStore> {\nprivate:\npublic:\n  static constexpr const char *class_name = \"ConfigStore\";\n  static const int ctor_length = 1;\n  enum Slots { Handle, Count };\n\n  static const JSFunctionSpec static_methods[];\n  static const JSPropertySpec static_properties[];\n  static const JSFunctionSpec methods[];\n  static const JSPropertySpec properties[];\n\n  static bool get(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  static host_api::ConfigStore config_store_handle(JSObject *obj);\n  static bool constructor(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  static bool init_class(JSContext *cx, JS::HandleObject global);\n};\n\n} // namespace fastly::config_store\n\n#endif\n"
  },
  {
    "path": "runtime/fastly/builtins/device.cpp",
    "content": "#include \"device.h\"\n#include \"../../../StarlingMonkey/runtime/encode.h\"\n#include \"../host-api/host_api_fastly.h\"\n#include \"builtin.h\"\n#include \"js/JSON.h\"\n\nusing builtins::BuiltinNoConstructor;\n\nnamespace fastly::device {\n\nnamespace {\nbool callbackCalled;\nbool write_json_to_buf(const char16_t *str, uint32_t strlen, void *out) {\n  callbackCalled = true;\n  auto outstr = static_cast<std::u16string *>(out);\n  outstr->append(str, strlen);\n\n  return true;\n}\nJSObject *deviceToJSON(JSContext *cx, JS::HandleObject self) {\n  MOZ_ASSERT(Device::is_instance(self));\n\n  JS::RootedValue device_info(\n      cx, JS::GetReservedSlot(self, static_cast<uint32_t>(Device::Slots::DeviceInfo)));\n  JS::RootedValue value(cx);\n  if (!device_info.isObject()) {\n    return nullptr;\n  }\n\n  JS::RootedObject device_info_obj(cx, device_info.toObjectOrNull());\n\n  JS::RootedObject result(cx, JS_NewPlainObject(cx));\n\n  if (!JS_GetProperty(cx, device_info_obj, \"name\", &value)) {\n    return nullptr;\n  }\n  MOZ_ASSERT(value.isString() || value.isNullOrUndefined());\n  if (value.isUndefined()) {\n    value.setNull();\n  }\n  if (!JS_SetProperty(cx, result, \"name\", value)) {\n    return nullptr;\n  }\n\n  if (!JS_GetProperty(cx, device_info_obj, \"brand\", &value)) {\n    return nullptr;\n  }\n  MOZ_ASSERT(value.isString() || value.isNullOrUndefined());\n  if (value.isUndefined()) {\n    value.setNull();\n  }\n  if (!JS_SetProperty(cx, result, \"brand\", value)) {\n    return nullptr;\n  }\n\n  if (!JS_GetProperty(cx, device_info_obj, \"model\", &value)) {\n    return nullptr;\n  }\n  MOZ_ASSERT(value.isString() || value.isNullOrUndefined());\n  if (value.isUndefined()) {\n    value.setNull();\n  }\n  if (!JS_SetProperty(cx, result, \"model\", value)) {\n    return nullptr;\n  }\n\n  if (!JS_GetProperty(cx, device_info_obj, \"hwtype\", &value)) {\n    return nullptr;\n  }\n  MOZ_ASSERT(value.isString() || value.isNullOrUndefined());\n  if (value.isUndefined()) {\n    value.setNull();\n  }\n  if (!JS_SetProperty(cx, result, \"hardwareType\", value)) {\n    return nullptr;\n  }\n\n  if (!JS_GetProperty(cx, device_info_obj, \"is_desktop\", &value)) {\n    return nullptr;\n  }\n  MOZ_ASSERT(value.isBoolean() || value.isNullOrUndefined());\n  if (value.isUndefined()) {\n    value.setNull();\n  }\n  if (!JS_SetProperty(cx, result, \"isDesktop\", value)) {\n    return nullptr;\n  }\n\n  if (!JS_GetProperty(cx, device_info_obj, \"is_gameconsole\", &value)) {\n    return nullptr;\n  }\n  MOZ_ASSERT(value.isBoolean() || value.isNullOrUndefined());\n  if (value.isUndefined()) {\n    value.setNull();\n  }\n  if (!JS_SetProperty(cx, result, \"isGameConsole\", value)) {\n    return nullptr;\n  }\n\n  if (!JS_GetProperty(cx, device_info_obj, \"is_mediaplayer\", &value)) {\n    return nullptr;\n  }\n  MOZ_ASSERT(value.isBoolean() || value.isNullOrUndefined());\n  if (value.isUndefined()) {\n    value.setNull();\n  }\n  if (!JS_SetProperty(cx, result, \"isMediaPlayer\", value)) {\n    return nullptr;\n  }\n\n  if (!JS_GetProperty(cx, device_info_obj, \"is_mobile\", &value)) {\n    return nullptr;\n  }\n  MOZ_ASSERT(value.isBoolean() || value.isNullOrUndefined());\n  if (value.isUndefined()) {\n    value.setNull();\n  }\n  if (!JS_SetProperty(cx, result, \"isMobile\", value)) {\n    return nullptr;\n  }\n\n  if (!JS_GetProperty(cx, device_info_obj, \"is_smarttv\", &value)) {\n    return nullptr;\n  }\n  MOZ_ASSERT(value.isBoolean() || value.isNullOrUndefined());\n  if (value.isUndefined()) {\n    value.setNull();\n  }\n  if (!JS_SetProperty(cx, result, \"isSmartTV\", value)) {\n    return nullptr;\n  }\n\n  if (!JS_GetProperty(cx, device_info_obj, \"is_tablet\", &value)) {\n    return nullptr;\n  }\n  MOZ_ASSERT(value.isBoolean() || value.isNullOrUndefined());\n  if (value.isUndefined()) {\n    value.setNull();\n  }\n  if (!JS_SetProperty(cx, result, \"isTablet\", value)) {\n    return nullptr;\n  }\n\n  if (!JS_GetProperty(cx, device_info_obj, \"is_touchscreen\", &value)) {\n    return nullptr;\n  }\n  MOZ_ASSERT(value.isBoolean() || value.isNullOrUndefined());\n  if (value.isUndefined()) {\n    value.setNull();\n  }\n  if (!JS_SetProperty(cx, result, \"isTouchscreen\", value)) {\n    return nullptr;\n  }\n\n  if (!JS_GetProperty(cx, device_info_obj, \"is_bot\", &value)) {\n    return nullptr;\n  }\n  MOZ_ASSERT(value.isBoolean() || value.isNullOrUndefined());\n  if (value.isUndefined()) {\n    value.setNull();\n  }\n  if (!JS_SetProperty(cx, result, \"isBot\", value)) {\n    return nullptr;\n  }\n\n  return result;\n}\n\n} // namespace\n\n/*\n * This is used by our `Console` implementation and logs all the approproiate properties for a\n * Device instance\n */\nJSString *Device::ToSource(JSContext *cx, JS::HandleObject self) {\n  MOZ_ASSERT(Device::is_instance(self));\n  JS::RootedValue data(cx);\n  data.setObjectOrNull(deviceToJSON(cx, self));\n  JS::RootedObject replacer(cx);\n  JS::RootedValue space(cx);\n\n  std::u16string out;\n  // 1. Let bytes the result of running serialize a JavaScript value to JSON bytes on data.\n  callbackCalled = false;\n  if (!JS::ToJSON(cx, data, replacer, space, &write_json_to_buf, &out)) {\n    return nullptr;\n  }\n  if (!callbackCalled) {\n    JS_ReportErrorASCII(cx, \"The data is not JSON serializable\");\n    return nullptr;\n  }\n\n  return JS_NewUCStringCopyN(cx, out.c_str(), out.length());\n}\n\nbool Device::toJSON(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  args.rval().setObjectOrNull(deviceToJSON(cx, self));\n\n  return true;\n}\n\n// get name(): string | null;\nbool Device::device_name_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  JS::RootedValue device_info(cx,\n                              JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::DeviceInfo)));\n  if (!device_info.isObject()) {\n    args.rval().setNull();\n    return true;\n  }\n  JS::RootedObject device_info_obj(cx, device_info.toObjectOrNull());\n\n  JS::RootedValue device_name(cx);\n  if (!JS_GetProperty(cx, device_info_obj, \"name\", &device_name)) {\n    return false;\n  }\n  MOZ_ASSERT(device_name.isString() || device_name.isNullOrUndefined());\n  if (device_name.isUndefined()) {\n    args.rval().setNull();\n  } else {\n    args.rval().set(device_name);\n  }\n  return true;\n}\n\n// get brand(): string | null;\nbool Device::brand_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  JS::RootedValue device_info(cx,\n                              JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::DeviceInfo)));\n  if (!device_info.isObject()) {\n    args.rval().setNull();\n    return true;\n  }\n  JS::RootedObject device_info_obj(cx, device_info.toObjectOrNull());\n\n  JS::RootedValue device_brand(cx);\n  if (!JS_GetProperty(cx, device_info_obj, \"brand\", &device_brand)) {\n    return false;\n  }\n  MOZ_ASSERT(device_brand.isString() || device_brand.isNullOrUndefined());\n  if (device_brand.isUndefined()) {\n    args.rval().setNull();\n  } else {\n    args.rval().set(device_brand);\n  }\n  return true;\n}\n\n// get model(): string | null;\nbool Device::model_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  JS::RootedValue device_info(cx,\n                              JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::DeviceInfo)));\n  if (!device_info.isObject()) {\n    args.rval().setNull();\n    return true;\n  }\n  JS::RootedObject device_info_obj(cx, device_info.toObjectOrNull());\n\n  JS::RootedValue device_model(cx);\n  if (!JS_GetProperty(cx, device_info_obj, \"model\", &device_model)) {\n    return false;\n  }\n  MOZ_ASSERT(device_model.isString() || device_model.isNullOrUndefined());\n  if (device_model.isUndefined()) {\n    args.rval().setNull();\n  } else {\n    args.rval().set(device_model);\n  }\n  return true;\n}\n\n// get hardwareType(): string | null;\nbool Device::hardware_type_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  JS::RootedValue device_info(cx,\n                              JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::DeviceInfo)));\n  if (!device_info.isObject()) {\n    args.rval().setNull();\n    return true;\n  }\n  JS::RootedObject device_info_obj(cx, device_info.toObjectOrNull());\n\n  JS::RootedValue device_hwtype(cx);\n  if (!JS_GetProperty(cx, device_info_obj, \"hwtype\", &device_hwtype)) {\n    return false;\n  }\n  MOZ_ASSERT(device_hwtype.isString() || device_hwtype.isNullOrUndefined());\n  if (device_hwtype.isUndefined()) {\n    args.rval().setNull();\n  } else {\n    args.rval().set(device_hwtype);\n  }\n  return true;\n}\n\n// get isDesktop(): boolean | null;\nbool Device::is_desktop_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  JS::RootedValue device_info(cx,\n                              JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::DeviceInfo)));\n  if (!device_info.isObject()) {\n    args.rval().setBoolean(false);\n    return true;\n  }\n  JS::RootedObject device_info_obj(cx, device_info.toObjectOrNull());\n\n  JS::RootedValue device_is_desktop(cx);\n  if (!JS_GetProperty(cx, device_info_obj, \"is_desktop\", &device_is_desktop)) {\n    return false;\n  }\n  MOZ_ASSERT(device_is_desktop.isBoolean() || device_is_desktop.isNullOrUndefined());\n  if (device_is_desktop.isUndefined()) {\n    args.rval().setNull();\n  } else {\n    args.rval().set(device_is_desktop);\n  }\n  return true;\n}\n\n// get isGameConsole(): boolean | null;\nbool Device::is_gameconsole_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  JS::RootedValue device_info(cx,\n                              JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::DeviceInfo)));\n  if (!device_info.isObject()) {\n    args.rval().setBoolean(false);\n    return true;\n  }\n  JS::RootedObject device_info_obj(cx, device_info.toObjectOrNull());\n\n  JS::RootedValue device_is_gameconsole(cx);\n  if (!JS_GetProperty(cx, device_info_obj, \"is_gameconsole\", &device_is_gameconsole)) {\n    return false;\n  }\n  MOZ_ASSERT(device_is_gameconsole.isBoolean() || device_is_gameconsole.isNullOrUndefined());\n  if (device_is_gameconsole.isUndefined()) {\n    args.rval().setNull();\n  } else {\n    args.rval().set(device_is_gameconsole);\n  }\n  return true;\n}\n\n// get isMediaPlayer(): boolean | null;\nbool Device::is_mediaplayer_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  JS::RootedValue device_info(cx,\n                              JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::DeviceInfo)));\n  if (!device_info.isObject()) {\n    args.rval().setBoolean(false);\n    return true;\n  }\n  JS::RootedObject device_info_obj(cx, device_info.toObjectOrNull());\n\n  JS::RootedValue device_is_mediaplayer(cx);\n  if (!JS_GetProperty(cx, device_info_obj, \"is_mediaplayer\", &device_is_mediaplayer)) {\n    return false;\n  }\n  MOZ_ASSERT(device_is_mediaplayer.isBoolean() || device_is_mediaplayer.isNullOrUndefined());\n  if (device_is_mediaplayer.isUndefined()) {\n    args.rval().setNull();\n  } else {\n    args.rval().set(device_is_mediaplayer);\n  }\n  return true;\n}\n\n// get isMobile(): boolean | null;\nbool Device::is_mobile_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  JS::RootedValue device_info(cx,\n                              JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::DeviceInfo)));\n  if (!device_info.isObject()) {\n    args.rval().setBoolean(false);\n    return true;\n  }\n  JS::RootedObject device_info_obj(cx, device_info.toObjectOrNull());\n\n  JS::RootedValue device_is_mobile(cx);\n  if (!JS_GetProperty(cx, device_info_obj, \"is_mobile\", &device_is_mobile)) {\n    return false;\n  }\n  MOZ_ASSERT(device_is_mobile.isBoolean() || device_is_mobile.isNullOrUndefined());\n  if (device_is_mobile.isUndefined()) {\n    args.rval().setNull();\n  } else {\n    args.rval().set(device_is_mobile);\n  }\n  return true;\n}\n\n// get isSmartTV(): boolean | null;\nbool Device::is_smarttv_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  JS::RootedValue device_info(cx,\n                              JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::DeviceInfo)));\n  if (!device_info.isObject()) {\n    args.rval().setBoolean(false);\n    return true;\n  }\n  JS::RootedObject device_info_obj(cx, device_info.toObjectOrNull());\n\n  JS::RootedValue device_is_smarttv(cx);\n  if (!JS_GetProperty(cx, device_info_obj, \"is_smarttv\", &device_is_smarttv)) {\n    return false;\n  }\n  MOZ_ASSERT(device_is_smarttv.isBoolean() || device_is_smarttv.isNullOrUndefined());\n  if (device_is_smarttv.isUndefined()) {\n    args.rval().setNull();\n  } else {\n    args.rval().set(device_is_smarttv);\n  }\n  return true;\n}\n\n// get isTablet(): boolean | null;\nbool Device::is_tablet_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  JS::RootedValue device_info(cx,\n                              JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::DeviceInfo)));\n  if (!device_info.isObject()) {\n    args.rval().setBoolean(false);\n    return true;\n  }\n  JS::RootedObject device_info_obj(cx, device_info.toObjectOrNull());\n\n  JS::RootedValue device_is_tablet(cx);\n  if (!JS_GetProperty(cx, device_info_obj, \"is_tablet\", &device_is_tablet)) {\n    return false;\n  }\n  MOZ_ASSERT(device_is_tablet.isBoolean() || device_is_tablet.isNullOrUndefined());\n  if (device_is_tablet.isUndefined()) {\n    args.rval().setNull();\n  } else {\n    args.rval().set(device_is_tablet);\n  }\n  return true;\n}\n\n// get isTouchscreen(): boolean | null;\nbool Device::is_touchscreen_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  JS::RootedValue device_info(cx,\n                              JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::DeviceInfo)));\n  if (!device_info.isObject()) {\n    args.rval().setBoolean(false);\n    return true;\n  }\n  JS::RootedObject device_info_obj(cx, device_info.toObjectOrNull());\n\n  JS::RootedValue device_is_touchscreen(cx);\n  if (!JS_GetProperty(cx, device_info_obj, \"is_touchscreen\", &device_is_touchscreen)) {\n    return false;\n  }\n  MOZ_ASSERT(device_is_touchscreen.isBoolean() || device_is_touchscreen.isNullOrUndefined());\n  if (device_is_touchscreen.isUndefined()) {\n    args.rval().setNull();\n  } else {\n    args.rval().set(device_is_touchscreen);\n  }\n  return true;\n}\n\n// get isBot(): boolean | null;\nbool Device::is_bot_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  JS::RootedValue device_info(cx,\n                              JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::DeviceInfo)));\n  if (!device_info.isObject()) {\n    args.rval().setBoolean(false);\n    return true;\n  }\n  JS::RootedObject device_info_obj(cx, device_info.toObjectOrNull());\n\n  JS::RootedValue device_is_bot(cx);\n  if (!JS_GetProperty(cx, device_info_obj, \"is_bot\", &device_is_bot)) {\n    return false;\n  }\n  MOZ_ASSERT(device_is_bot.isBoolean() || device_is_bot.isNullOrUndefined());\n  if (device_is_bot.isUndefined()) {\n    args.rval().setNull();\n  } else {\n    args.rval().set(device_is_bot);\n  }\n  return true;\n}\n\n// static lookup(useragent: string): Device;\nbool Device::lookup(JSContext *cx, unsigned argc, JS::Value *vp) {\n  REQUEST_HANDLER_ONLY(\"The Device builtin\");\n  JS::CallArgs args = JS::CallArgsFromVp(argc, vp);\n  if (!args.requireAtLeast(cx, \"Device.lookup\", 1)) {\n    return false;\n  }\n\n  // Convert key parameter into a string and check the value adheres to our validation rules.\n  auto key = core::encode(cx, args[0]);\n  if (!key) {\n    return false;\n  }\n\n  if (key.len == 0) {\n    JS_ReportErrorASCII(cx, \"Device.lookup: useragent parameter can not be an empty string\");\n    return false;\n  }\n\n  auto lookup_res = host_api::DeviceDetection::lookup(key);\n  if (auto *err = lookup_res.to_err()) {\n    if (host_api::error_is_optional_none(*err)) {\n      args.rval().setNull();\n      return true;\n    }\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  auto result = std::move(lookup_res.unwrap());\n\n  JS::RootedString device_info_str(cx, JS_NewStringCopyN(cx, result.ptr.release(), result.len));\n  if (!device_info_str) {\n    return false;\n  }\n\n  JS::RootedValue device_info(cx);\n\n  if (!JS_ParseJSON(cx, device_info_str, &device_info)) {\n    return false;\n  }\n\n  MOZ_ASSERT(device_info.isObject());\n\n  JS::RootedObject device_info_obj(cx, device_info.toObjectOrNull());\n\n  args.rval().setObjectOrNull(Device::create(cx, device_info_obj));\n\n  return true;\n}\n\nconst JSFunctionSpec Device::static_methods[] = {\n    JS_FN(\"lookup\", lookup, 1, JSPROP_ENUMERATE),\n    JS_FS_END,\n};\n\nconst JSPropertySpec Device::static_properties[] = {\n    JS_PS_END,\n};\n\nconst JSFunctionSpec Device::methods[] = {JS_FN(\"toJSON\", toJSON, 0, JSPROP_ENUMERATE), JS_FS_END};\n\nconst JSPropertySpec Device::properties[] = {\n    JS_PSG(\"name\", Device::device_name_get, JSPROP_ENUMERATE),\n    JS_PSG(\"brand\", Device::brand_get, JSPROP_ENUMERATE),\n    JS_PSG(\"model\", Device::model_get, JSPROP_ENUMERATE),\n    JS_PSG(\"hardwareType\", Device::hardware_type_get, JSPROP_ENUMERATE),\n    JS_PSG(\"isDesktop\", Device::is_desktop_get, JSPROP_ENUMERATE),\n    JS_PSG(\"isGameConsole\", Device::is_gameconsole_get, JSPROP_ENUMERATE),\n    JS_PSG(\"isMediaPlayer\", Device::is_mediaplayer_get, JSPROP_ENUMERATE),\n    JS_PSG(\"isMobile\", Device::is_mobile_get, JSPROP_ENUMERATE),\n    JS_PSG(\"isSmartTV\", Device::is_smarttv_get, JSPROP_ENUMERATE),\n    JS_PSG(\"isTablet\", Device::is_tablet_get, JSPROP_ENUMERATE),\n    JS_PSG(\"isTouchscreen\", Device::is_touchscreen_get, JSPROP_ENUMERATE),\n    JS_PSG(\"isBot\", Device::is_bot_get, JSPROP_ENUMERATE),\n    JS_STRING_SYM_PS(toStringTag, \"Device\", JSPROP_READONLY),\n    JS_PS_END};\n\nJSObject *Device::create(JSContext *cx, JS::HandleObject device_info) {\n  JS::RootedObject instance(cx, JS_NewObjectWithGivenProto(cx, &Device::class_, Device::proto_obj));\n\n  JS::RootedValue device(cx);\n  if (!JS_GetProperty(cx, device_info, \"device\", &device)) {\n    return nullptr;\n  }\n  MOZ_ASSERT(device.isObject());\n\n  JS::SetReservedSlot(instance, static_cast<uint32_t>(Slots::DeviceInfo), device);\n\n  return instance;\n}\n\nbool install(api::Engine *engine) {\n  if (!Device::init_class_impl(engine->cx(), engine->global())) {\n    return false;\n  }\n\n  RootedObject device_ns_obj(engine->cx(), JS_NewObject(engine->cx(), nullptr));\n  RootedValue device_ns_val(engine->cx(), JS::ObjectValue(*device_ns_obj));\n  RootedObject device_obj(engine->cx(), JS_GetConstructor(engine->cx(), Device::proto_obj));\n  RootedValue device_val(engine->cx(), ObjectValue(*device_obj));\n  if (!JS_SetProperty(engine->cx(), device_ns_obj, \"Device\", device_val)) {\n    return false;\n  }\n  if (!engine->define_builtin_module(\"fastly:device\", device_ns_val)) {\n    return false;\n  }\n\n  return true;\n}\n\n} // namespace fastly::device\n"
  },
  {
    "path": "runtime/fastly/builtins/device.h",
    "content": "#ifndef FASTLY_DEVICE_H\n#define FASTLY_DEVICE_H\n\n#include \"builtin.h\"\n#include \"extension-api.h\"\n\nnamespace fastly::device {\n\nclass Device : public builtins::BuiltinNoConstructor<Device> {\nprivate:\npublic:\n  static constexpr const char *class_name = \"Device\";\n  static const int ctor_length = 0;\n  //   {\n  //     \"brand\": null,\n  //     \"hwtype\": null,\n  //     \"is_desktop\": false,\n  //     \"is_ereader\": false,\n  //     \"is_gameconsole\": false,\n  //     \"is_mediaplayer\": false,\n  //     \"is_mobile\": false,\n  //     \"is_smarttv\": false,\n  //     \"is_tablet\": false,\n  //     \"is_touchscreen\": false,\n  //     \"is_tvplayer\": false,\n  //     \"model\": null,\n  //     \"name\": null\n  // }\n  enum Slots { DeviceInfo, Count };\n\n  static const JSFunctionSpec static_methods[];\n  static const JSPropertySpec static_properties[];\n  static const JSFunctionSpec methods[];\n  static const JSPropertySpec properties[];\n\n  static bool device_name_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool brand_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool model_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool hardware_type_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool is_gameconsole_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool is_mediaplayer_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool is_mobile_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool is_smarttv_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool is_tablet_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool is_desktop_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool is_touchscreen_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool is_bot_get(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  static bool toJSON(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  static bool lookup(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  static JSObject *create(JSContext *cx, JS::HandleObject deviceInfo);\n\n  static JSString *ToSource(JSContext *cx, JS::HandleObject self);\n};\n\n} // namespace fastly::device\n\n#endif\n"
  },
  {
    "path": "runtime/fastly/builtins/dictionary.cpp",
    "content": "#include \"dictionary.h\"\n#include \"../../../StarlingMonkey/runtime/encode.h\"\n#include \"../host-api/host_api_fastly.h\"\n#include \"fastly.h\"\n\nusing fastly::FastlyGetErrorMessage;\n\nnamespace fastly::dictionary {\n\nhost_api::Dict Dictionary::dictionary_handle(JSObject *obj) {\n  JS::Value val = JS::GetReservedSlot(obj, Dictionary::Slots::Handle);\n  return host_api::Dict(val.toInt32());\n}\n\nbool Dictionary::get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(1)\n\n  JS::HandleValue name_arg = args.get(0);\n\n  // Convert into a String following https://tc39.es/ecma262/#sec-tostring\n  auto name = core::encode(cx, name_arg);\n  if (!name) {\n    return false;\n  }\n\n  // If the converted string has a length of 0 then we throw an Error\n  // because Dictionary keys have to be at-least 1 character.\n  if (name.len == 0) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_DICTIONARY_KEY_EMPTY);\n    return false;\n  }\n  // key has to be less than 256\n  if (name.len > 255) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_DICTIONARY_KEY_TOO_LONG);\n    return false;\n  }\n\n  // Ensure that we throw an exception for all unexpected host errors.\n  auto res = Dictionary::dictionary_handle(self).get(name);\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  auto ret = std::move(res.unwrap());\n  if (!ret.has_value()) {\n    args.rval().setNull();\n    return true;\n  }\n\n  JS::RootedString text(cx, JS_NewStringCopyUTF8N(cx, JS::UTF8Chars(ret->ptr.get(), ret->len)));\n  if (!text)\n    return false;\n\n  args.rval().setString(text);\n  return true;\n}\n\nconst JSFunctionSpec Dictionary::static_methods[] = {\n    JS_FS_END,\n};\n\nconst JSPropertySpec Dictionary::static_properties[] = {\n    JS_PS_END,\n};\n\nconst JSFunctionSpec Dictionary::methods[] = {JS_FN(\"get\", get, 1, JSPROP_ENUMERATE), JS_FS_END};\n\nconst JSPropertySpec Dictionary::properties[] = {JS_PS_END};\n\nbool Dictionary::constructor(JSContext *cx, unsigned argc, JS::Value *vp) {\n  REQUEST_HANDLER_ONLY(\"The Dictionary builtin\");\n  CTOR_HEADER(\"Dictionary\", 1);\n\n  JS::HandleValue name_arg = args.get(0);\n\n  // Convert into a String following https://tc39.es/ecma262/#sec-tostring\n  auto name = core::encode(cx, name_arg);\n  if (!name) {\n    return false;\n  }\n\n  // If the converted string has a length of 0 then we throw an Error\n  // because Dictionary names have to be at-least 1 character.\n  if (name.len == 0) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_DICTIONARY_NAME_EMPTY);\n    return false;\n  }\n\n  // If the converted string has a length of more than 255 then we throw an Error\n  // because Dictionary names have to be less than 255 characters.\n  if (name.len > 255) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_DICTIONARY_NAME_TOO_LONG);\n    return false;\n  }\n\n  // Name must start with ascii alphabetical and contain only ascii alphanumeric, underscore, and\n  // whitespace\n  std::string_view name_view = name;\n  if (!std::isalpha(name_view.front())) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                              JSMSG_DICTIONARY_NAME_START_WITH_ASCII_ALPHA);\n    return false;\n  }\n\n  auto is_valid_name =\n      std::all_of(std::next(name_view.begin(), 1), name_view.end(), [&](auto character) {\n        return std::isalnum(character) || character == '_' || character == ' ';\n      });\n\n  if (!is_valid_name) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                              JSMSG_DICTIONARY_NAME_CONTAINS_INVALID_CHARACTER);\n    return false;\n  }\n\n  JS::RootedObject dictionary(cx, JS_NewObjectForConstructor(cx, &class_, args));\n\n  auto res = host_api::Dict::open(name_view);\n  if (auto *err = res.to_err()) {\n    if (host_api::error_is_bad_handle(*err)) {\n      JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_DICTIONARY_DOES_NOT_EXIST,\n                                name_view.data());\n      return false;\n    } else {\n      HANDLE_ERROR(cx, *err);\n      return false;\n    }\n  }\n\n  auto dict = res.unwrap();\n  JS::SetReservedSlot(dictionary, Dictionary::Slots::Handle, JS::Int32Value(dict.handle));\n  if (!dictionary) {\n    return false;\n  }\n\n  args.rval().setObject(*dictionary);\n  return true;\n}\n\nbool install(api::Engine *engine) {\n  if (!Dictionary::init_class_impl(engine->cx(), engine->global())) {\n    return false;\n  }\n\n  RootedObject dictionary_ns_obj(engine->cx(), JS_NewObject(engine->cx(), nullptr));\n  RootedValue dictionary_ns_val(engine->cx(), JS::ObjectValue(*dictionary_ns_obj));\n  RootedObject dictionary_obj(engine->cx(), JS_GetConstructor(engine->cx(), Dictionary::proto_obj));\n  RootedValue dictionary_val(engine->cx(), ObjectValue(*dictionary_obj));\n  if (!JS_SetProperty(engine->cx(), dictionary_ns_obj, \"Dictionary\", dictionary_val)) {\n    return false;\n  }\n  if (!engine->define_builtin_module(\"fastly:dictionary\", dictionary_ns_val)) {\n    return false;\n  }\n\n  return true;\n}\n\n} // namespace fastly::dictionary\n"
  },
  {
    "path": "runtime/fastly/builtins/dictionary.h",
    "content": "#ifndef FASTLYE_DICTIONARY_H\n#define FASTLYE_DICTIONARY_H\n\n#include \"../host-api/host_api_fastly.h\"\n#include \"builtin.h\"\n#include \"extension-api.h\"\n\nnamespace fastly::dictionary {\n\nclass Dictionary : public builtins::BuiltinImpl<Dictionary> {\nprivate:\npublic:\n  static constexpr const char *class_name = \"Dictionary\";\n  static const int ctor_length = 1;\n  enum Slots { Handle, Count };\n  static const JSFunctionSpec static_methods[];\n  static const JSPropertySpec static_properties[];\n  static const JSFunctionSpec methods[];\n  static const JSPropertySpec properties[];\n\n  static bool get(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  static host_api::Dict dictionary_handle(JSObject *obj);\n  static bool constructor(JSContext *cx, unsigned argc, JS::Value *vp);\n};\n\n} // namespace fastly::dictionary\n\n#endif\n"
  },
  {
    "path": "runtime/fastly/builtins/edge-rate-limiter.cpp",
    "content": "#include \"edge-rate-limiter.h\"\n#include \"../../../StarlingMonkey/runtime/encode.h\"\n#include \"../host-api/host_api_fastly.h\"\n#include \"builtin.h\"\n#include \"js/Result.h\"\n#include <tuple>\n\nnamespace fastly::edge_rate_limiter {\n\nJSString *PenaltyBox::get_name(JSObject *self) {\n  MOZ_ASSERT(is_instance(self));\n  MOZ_ASSERT(JS::GetReservedSlot(self, Slots::Name).isString());\n\n  return JS::GetReservedSlot(self, Slots::Name).toString();\n}\n\n// add(entry: string, timeToLive: number): void;\nbool PenaltyBox::add(JSContext *cx, unsigned argc, JS::Value *vp) {\n  REQUEST_HANDLER_ONLY(\"The PenaltyBox builtin\");\n  METHOD_HEADER(2);\n\n  // Convert entry parameter into a string\n  auto entry = core::encode(cx, args.get(0));\n  if (!entry) {\n    return false;\n  }\n\n  // Convert timeToLive parameter into a number\n  double timeToLive;\n  if (!JS::ToNumber(cx, args.get(1), &timeToLive)) {\n    return false;\n  }\n\n  // This needs to happen on the happy-path as these all end up being valid uint32_t values that the\n  // host-call accepts\n  if (std::isnan(timeToLive) || std::isinf(timeToLive) || timeToLive < 1 || timeToLive > 60) {\n    JS_ReportErrorASCII(cx, \"add: timeToLive parameter is an invalid value, only numbers from 1 to \"\n                            \"60 can be used for timeToLive values.\");\n    return false;\n  }\n\n  // We expose it in minutes as the value gets truncated to minutes however the host expects it in\n  // seconds\n  timeToLive = timeToLive * 60;\n\n  MOZ_ASSERT(JS::GetReservedSlot(self, Slots::Name).isString());\n  JS::RootedString name_val(cx, JS::GetReservedSlot(self, Slots::Name).toString());\n  auto name = core::encode(cx, name_val);\n  if (!name) {\n    return false;\n  }\n\n  auto res = host_api::PenaltyBox::add(name, entry, timeToLive);\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  args.rval().setUndefined();\n  return true;\n}\n\n// has(entry: string): boolean;\nbool PenaltyBox::has(JSContext *cx, unsigned argc, JS::Value *vp) {\n  REQUEST_HANDLER_ONLY(\"The PenaltyBox builtin\");\n  METHOD_HEADER(1);\n\n  // Convert entry parameter into a string\n  auto entry = core::encode(cx, args.get(0));\n  if (!entry) {\n    return false;\n  }\n\n  MOZ_ASSERT(JS::GetReservedSlot(self, Slots::Name).isString());\n  JS::RootedString name_val(cx, JS::GetReservedSlot(self, Slots::Name).toString());\n  auto name = core::encode(cx, name_val);\n  if (!name) {\n    return false;\n  }\n\n  auto res = host_api::PenaltyBox::has(name, entry);\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  args.rval().setBoolean(res.unwrap());\n  return true;\n}\n\nconst JSFunctionSpec PenaltyBox::static_methods[] = {\n    JS_FS_END,\n};\n\nconst JSPropertySpec PenaltyBox::static_properties[] = {\n    JS_PS_END,\n};\n\nconst JSFunctionSpec PenaltyBox::methods[] = {\n    JS_FN(\"add\", add, 2, JSPROP_ENUMERATE),\n    JS_FN(\"has\", has, 1, JSPROP_ENUMERATE),\n    JS_FS_END,\n};\n\nconst JSPropertySpec PenaltyBox::properties[] = {\n    JS_STRING_SYM_PS(toStringTag, \"PenaltyBox\", JSPROP_READONLY), JS_PS_END};\n\n// Open a penalty-box identified by the given name\n// constructor(name: string);\nbool PenaltyBox::constructor(JSContext *cx, unsigned argc, JS::Value *vp) {\n  REQUEST_HANDLER_ONLY(\"The PenaltyBox builtin\");\n  CTOR_HEADER(\"PenaltyBox\", 1);\n  auto name = core::encode(cx, args.get(0));\n  if (!name) {\n    return false;\n  }\n\n  if (name.len == 0) {\n    JS_ReportErrorASCII(cx, \"PenaltyBox constructor: name parameter can not be an empty string.\");\n    return false;\n  }\n\n  JS::RootedObject instance(cx, JS_NewObjectForConstructor(cx, &class_, args));\n  if (!instance) {\n    return false;\n  }\n  JS::RootedString name_str(cx, JS_NewStringCopyN(cx, name.begin(), name.len));\n  if (!name_str) {\n    return false;\n  }\n  JS::SetReservedSlot(instance, static_cast<uint32_t>(Slots::Name), JS::StringValue(name_str));\n  args.rval().setObject(*instance);\n  return true;\n}\n\nJSString *RateCounter::get_name(JSObject *self) {\n  MOZ_ASSERT(is_instance(self));\n  MOZ_ASSERT(JS::GetReservedSlot(self, Slots::Name).isString());\n\n  return JS::GetReservedSlot(self, Slots::Name).toString();\n}\n\n// increment(entry: string, delta: number): void;\nbool RateCounter::increment(JSContext *cx, unsigned argc, JS::Value *vp) {\n  REQUEST_HANDLER_ONLY(\"The RateCounter builtin\");\n  METHOD_HEADER(2);\n\n  // Convert entry parameter into a string\n  auto entry = core::encode(cx, args.get(0));\n  if (!entry) {\n    return false;\n  }\n\n  // Convert delta parameter into a number\n  double delta;\n  if (!JS::ToNumber(cx, args.get(1), &delta)) {\n    return false;\n  }\n\n  // This needs to happen on the happy-path as these all end up being valid uint32_t values that the\n  // host-call accepts\n  if (delta < 0 || std::isnan(delta) || std::isinf(delta)) {\n    JS_ReportErrorASCII(cx,\n                        \"increment: delta parameter is an invalid value, only positive numbers can \"\n                        \"be used for delta values.\");\n    return false;\n  }\n\n  MOZ_ASSERT(JS::GetReservedSlot(self, Slots::Name).isString());\n  JS::RootedString name_val(cx, JS::GetReservedSlot(self, Slots::Name).toString());\n  auto name = core::encode(cx, name_val);\n  if (!name) {\n    return false;\n  }\n\n  auto res = host_api::RateCounter::increment(name, entry, delta);\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  args.rval().setUndefined();\n  return true;\n}\n\n// lookupRate(entry: string, window: [1, 10, 60]): number;\nbool RateCounter::lookupRate(JSContext *cx, unsigned argc, JS::Value *vp) {\n  REQUEST_HANDLER_ONLY(\"The RateCounter builtin\");\n  METHOD_HEADER(2);\n\n  // Convert entry parameter into a string\n  auto entry = core::encode(cx, args.get(0));\n  if (!entry) {\n    return false;\n  }\n\n  // Convert window parameter into a number\n  double window;\n  if (!JS::ToNumber(cx, args.get(1), &window)) {\n    return false;\n  }\n\n  MOZ_ASSERT(JS::GetReservedSlot(self, Slots::Name).isString());\n  JS::RootedString name_val(cx, JS::GetReservedSlot(self, Slots::Name).toString());\n  auto name = core::encode(cx, name_val);\n  if (!name) {\n    return false;\n  }\n\n  auto res = host_api::RateCounter::lookup_rate(name, entry, window);\n  if (auto *err = res.to_err()) {\n    if (host_api::error_is_generic(*err) || host_api::error_is_invalid_argument(*err)) {\n      if (window != 1 && window != 10 && window != 60) {\n        JS_ReportErrorASCII(cx, \"lookupRate: window parameter must be either: 1, 10, or 60\");\n        return false;\n      }\n    }\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  JS::RootedValue rate(cx, JS::NumberValue(res.unwrap()));\n  args.rval().set(rate);\n  return true;\n}\n\n// lookupCount(entry: string, duration: [10, 20, 30, 40, 50, 60]): number;\nbool RateCounter::lookupCount(JSContext *cx, unsigned argc, JS::Value *vp) {\n  REQUEST_HANDLER_ONLY(\"The RateCounter builtin\");\n  METHOD_HEADER(2);\n\n  // Convert entry parameter into a string\n  auto entry = core::encode(cx, args.get(0));\n  if (!entry) {\n    return false;\n  }\n\n  // Convert duration parameter into a number\n  double duration;\n  if (!JS::ToNumber(cx, args.get(1), &duration)) {\n    return false;\n  }\n\n  MOZ_ASSERT(JS::GetReservedSlot(self, Slots::Name).isString());\n  JS::RootedString name_val(cx, JS::GetReservedSlot(self, Slots::Name).toString());\n  auto name = core::encode(cx, name_val);\n  if (!name) {\n    return false;\n  }\n\n  auto res = host_api::RateCounter::lookup_count(name, entry, duration);\n  if (auto *err = res.to_err()) {\n    if (host_api::error_is_generic(*err) || host_api::error_is_invalid_argument(*err)) {\n      if (duration != 10 && duration != 20 && duration != 30 && duration != 40 && duration != 50 &&\n          duration != 60) {\n        JS_ReportErrorASCII(\n            cx, \"lookupCount: duration parameter must be either: 10, 20, 30, 40, 50, or 60\");\n        return false;\n      }\n    }\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  JS::RootedValue rate(cx, JS::NumberValue(res.unwrap()));\n  args.rval().set(rate);\n  return true;\n}\n\nconst JSFunctionSpec RateCounter::static_methods[] = {\n    JS_FS_END,\n};\n\nconst JSPropertySpec RateCounter::static_properties[] = {\n    JS_PS_END,\n};\n\nconst JSFunctionSpec RateCounter::methods[] = {\n    JS_FN(\"increment\", increment, 2, JSPROP_ENUMERATE),\n    JS_FN(\"lookupRate\", lookupRate, 2, JSPROP_ENUMERATE),\n    JS_FN(\"lookupCount\", lookupCount, 2, JSPROP_ENUMERATE), JS_FS_END};\n\nconst JSPropertySpec RateCounter::properties[] = {\n    JS_STRING_SYM_PS(toStringTag, \"RateCounter\", JSPROP_READONLY), JS_PS_END};\n\n// Open a RateCounter instance with the given name\n// constructor(name: string);\nbool RateCounter::constructor(JSContext *cx, unsigned argc, JS::Value *vp) {\n  REQUEST_HANDLER_ONLY(\"The RateCounter builtin\");\n  CTOR_HEADER(\"RateCounter\", 1);\n  auto name = core::encode(cx, args.get(0));\n  if (!name) {\n    return false;\n  }\n\n  if (name.len == 0) {\n    JS_ReportErrorASCII(cx, \"RateCounter constructor: name parameter can not be an empty string.\");\n    return false;\n  }\n\n  JS::RootedObject instance(cx, JS_NewObjectForConstructor(cx, &class_, args));\n  if (!instance) {\n    return false;\n  }\n  JS::RootedString name_str(cx, JS_NewStringCopyN(cx, name.begin(), name.len));\n  JS::SetReservedSlot(instance, static_cast<uint32_t>(Slots::Name), JS::StringValue(name_str));\n  args.rval().setObject(*instance);\n  return true;\n}\n\n// checkRate(entry: string, delta: number, window: [1, 10, 60], limit: number, timeToLive: number):\n// boolean;\nbool EdgeRateLimiter::checkRate(JSContext *cx, unsigned argc, JS::Value *vp) {\n  REQUEST_HANDLER_ONLY(\"The EdgeRateLimiter builtin\");\n  METHOD_HEADER(5);\n\n  // Convert entry parameter into a string\n  auto entry = core::encode(cx, args.get(0));\n  if (!entry) {\n    return false;\n  }\n\n  // Convert delta parameter into a number\n  double delta;\n  if (!JS::ToNumber(cx, args.get(1), &delta)) {\n    return false;\n  }\n\n  if (delta < 0 || std::isnan(delta) || std::isinf(delta)) {\n    JS_ReportErrorASCII(cx,\n                        \"checkRate: delta parameter is an invalid value, only positive numbers can \"\n                        \"be used for delta values.\");\n    return false;\n  }\n\n  // Convert window parameter into a number\n  double window;\n  if (!JS::ToNumber(cx, args.get(2), &window)) {\n    return false;\n  }\n\n  if (window != 1 && window != 10 && window != 60) {\n    JS_ReportErrorASCII(cx, \"checkRate: window parameter must be either: 1, 10, or 60\");\n    return false;\n  }\n\n  // Convert limit parameter into a number\n  double limit;\n  if (!JS::ToNumber(cx, args.get(3), &limit)) {\n    return false;\n  }\n\n  // This needs to happen on the happy-path as these all end up being valid uint32_t values that the\n  // host-call accepts\n  if (limit < 0 || std::isnan(limit) || std::isinf(limit)) {\n    JS_ReportErrorASCII(cx,\n                        \"checkRate: limit parameter is an invalid value, only positive numbers can \"\n                        \"be used for limit values.\");\n    return false;\n  }\n\n  // Convert timeToLive parameter into a number\n  double timeToLive;\n  if (!JS::ToNumber(cx, args.get(4), &timeToLive)) {\n    return false;\n  }\n\n  // This needs to happen on the happy-path as these all end up being valid uint32_t values that the\n  // host-call accepts\n  if (std::isnan(timeToLive) || std::isinf(timeToLive) || timeToLive < 1 || timeToLive > 60) {\n    JS_ReportErrorASCII(\n        cx, \"checkRate: timeToLive parameter is an invalid value, only numbers from 1 to \"\n            \"60 can be used for timeToLive values.\");\n    return false;\n  }\n\n  // We expose it in minutes as the value gets truncated to minutes however the host expects it in\n  // seconds\n  timeToLive = timeToLive * 60;\n\n  MOZ_ASSERT(JS::GetReservedSlot(self, Slots::RateCounterName).isString());\n  JS::RootedString rc_name_val(cx, JS::GetReservedSlot(self, Slots::RateCounterName).toString());\n  auto rc_name = core::encode(cx, rc_name_val);\n  if (!rc_name) {\n    return false;\n  }\n  MOZ_ASSERT(JS::GetReservedSlot(self, Slots::PenaltyBoxName).isString());\n  JS::RootedString pb_name_val(cx, JS::GetReservedSlot(self, Slots::PenaltyBoxName).toString());\n  auto pb_name = core::encode(cx, pb_name_val);\n  if (!pb_name) {\n    return false;\n  }\n\n  auto res = host_api::EdgeRateLimiter::check_rate(rc_name, entry, delta, window, limit, pb_name,\n                                                   timeToLive);\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  args.rval().setBoolean(res.unwrap());\n  return true;\n}\n\nconst JSFunctionSpec EdgeRateLimiter::static_methods[] = {\n    JS_FS_END,\n};\n\nconst JSPropertySpec EdgeRateLimiter::static_properties[] = {\n    JS_PS_END,\n};\n\nconst JSFunctionSpec EdgeRateLimiter::methods[] = {\n    JS_FN(\"checkRate\", checkRate, 5, JSPROP_ENUMERATE), JS_FS_END};\n\nconst JSPropertySpec EdgeRateLimiter::properties[] = {\n    JS_STRING_SYM_PS(toStringTag, \"EdgeRateLimiter\", JSPROP_READONLY), JS_PS_END};\n\n// Open a penalty-box identified by the given name\n// constructor(name: string);\nbool EdgeRateLimiter::constructor(JSContext *cx, unsigned argc, JS::Value *vp) {\n  REQUEST_HANDLER_ONLY(\"The EdgeRateLimiter builtin\");\n  CTOR_HEADER(\"EdgeRateLimiter\", 2);\n\n  auto rc = args.get(0);\n  if (!RateCounter::is_instance(rc)) {\n    JS_ReportErrorASCII(\n        cx,\n        \"EdgeRateLimiter constructor: rateCounter parameter must be an instance of RateCounter\");\n    return false;\n  }\n\n  JS::RootedString rc_name(cx, RateCounter::get_name(rc.toObjectOrNull()));\n  if (!rc_name) {\n    return false;\n  }\n\n  auto pb = args.get(1);\n  if (!PenaltyBox::is_instance(pb)) {\n    JS_ReportErrorASCII(\n        cx, \"EdgeRateLimiter constructor: penaltyBox parameter must be an instance of PenaltyBox\");\n    return false;\n  }\n\n  JS::RootedString pb_name(cx, PenaltyBox::get_name(pb.toObjectOrNull()));\n  if (!pb_name) {\n    return false;\n  }\n\n  JS::RootedObject instance(cx, JS_NewObjectForConstructor(cx, &class_, args));\n  if (!instance) {\n    return false;\n  }\n  JS::SetReservedSlot(instance, static_cast<uint32_t>(Slots::RateCounterName),\n                      JS::StringValue(rc_name));\n\n  JS::SetReservedSlot(instance, static_cast<uint32_t>(Slots::PenaltyBoxName),\n                      JS::StringValue(pb_name));\n  args.rval().setObject(*instance);\n  return true;\n}\n\nbool install(api::Engine *engine) {\n  if (!PenaltyBox::init_class_impl(engine->cx(), engine->global())) {\n    return false;\n  }\n  if (!EdgeRateLimiter::init_class_impl(engine->cx(), engine->global())) {\n    return false;\n  }\n  if (!RateCounter::init_class_impl(engine->cx(), engine->global())) {\n    return false;\n  }\n\n  RootedObject edge_rate_limiter_ns_obj(engine->cx(), JS_NewObject(engine->cx(), nullptr));\n  RootedValue edge_rate_limiter_ns_val(engine->cx(), JS::ObjectValue(*edge_rate_limiter_ns_obj));\n  RootedObject edge_rate_limiter_obj(engine->cx(),\n                                     JS_GetConstructor(engine->cx(), EdgeRateLimiter::proto_obj));\n  RootedValue edge_rate_limiter_val(engine->cx(), ObjectValue(*edge_rate_limiter_obj));\n  if (!JS_SetProperty(engine->cx(), edge_rate_limiter_ns_obj, \"EdgeRateLimiter\",\n                      edge_rate_limiter_val)) {\n    return false;\n  }\n  RootedObject penalty_box_obj(engine->cx(),\n                               JS_GetConstructor(engine->cx(), PenaltyBox::proto_obj));\n  RootedValue penalty_box_val(engine->cx(), ObjectValue(*penalty_box_obj));\n  if (!JS_SetProperty(engine->cx(), edge_rate_limiter_ns_obj, \"PenaltyBox\", penalty_box_val)) {\n    return false;\n  }\n  RootedObject rate_counter_obj(engine->cx(),\n                                JS_GetConstructor(engine->cx(), RateCounter::proto_obj));\n  RootedValue rate_counter_val(engine->cx(), ObjectValue(*rate_counter_obj));\n  if (!JS_SetProperty(engine->cx(), edge_rate_limiter_ns_obj, \"RateCounter\", rate_counter_val)) {\n    return false;\n  }\n  if (!engine->define_builtin_module(\"fastly:edge-rate-limiter\", edge_rate_limiter_ns_val)) {\n    return false;\n  }\n\n  return true;\n}\n\n} // namespace fastly::edge_rate_limiter\n"
  },
  {
    "path": "runtime/fastly/builtins/edge-rate-limiter.h",
    "content": "#ifndef FASTLY_EDGE_RATE_LIMITER_H\n#define FASTLY_EDGE_RATE_LIMITER_H\n\n#include \"builtin.h\"\n#include \"extension-api.h\"\n\nnamespace fastly::edge_rate_limiter {\n\nclass PenaltyBox final : public builtins::BuiltinImpl<PenaltyBox> {\n  static bool add(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool has(JSContext *cx, unsigned argc, JS::Value *vp);\n\npublic:\n  static constexpr const char *class_name = \"PenaltyBox\";\n  enum Slots { Name, Count };\n  static const JSFunctionSpec static_methods[];\n  static const JSPropertySpec static_properties[];\n  static const JSFunctionSpec methods[];\n  static const JSPropertySpec properties[];\n\n  static const unsigned ctor_length = 0;\n\n  static bool constructor(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  static JSString *get_name(JSObject *self);\n};\n\nclass RateCounter final : public builtins::BuiltinImpl<RateCounter> {\n  static bool increment(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool lookupRate(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool lookupCount(JSContext *cx, unsigned argc, JS::Value *vp);\n\npublic:\n  static constexpr const char *class_name = \"RateCounter\";\n  enum Slots { Name, Count };\n  static const JSFunctionSpec static_methods[];\n  static const JSPropertySpec static_properties[];\n  static const JSFunctionSpec methods[];\n  static const JSPropertySpec properties[];\n\n  static const unsigned ctor_length = 0;\n\n  static bool constructor(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  static JSString *get_name(JSObject *self);\n};\n\nclass EdgeRateLimiter final : public builtins::BuiltinImpl<EdgeRateLimiter> {\n  static bool checkRate(JSContext *cx, unsigned argc, JS::Value *vp);\n\npublic:\n  static constexpr const char *class_name = \"EdgeRateLimiter\";\n  enum Slots { RateCounterName, PenaltyBoxName, Count };\n  static const JSFunctionSpec static_methods[];\n  static const JSPropertySpec static_properties[];\n  static const JSFunctionSpec methods[];\n  static const JSPropertySpec properties[];\n\n  static const unsigned ctor_length = 0;\n\n  static bool constructor(JSContext *cx, unsigned argc, JS::Value *vp);\n};\n\n} // namespace fastly::edge_rate_limiter\n\n#endif\n"
  },
  {
    "path": "runtime/fastly/builtins/fastly.cpp",
    "content": "// TODO: remove these once the warnings are fixed\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Winvalid-offsetof\"\n#pragma clang diagnostic ignored \"-Wdeprecated-enum-enum-conversion\"\n#include \"js/experimental/TypedData.h\" // used in \"js/Conversions.h\"\n#pragma clang diagnostic pop\n#include \"../../StarlingMonkey/builtins/web/url.h\"\n#include \"./fetch/request-response.h\"\n#include \"backend.h\"\n#include \"encode.h\"\n#include \"fastly.h\"\n#include \"js/Conversions.h\"\n#include \"js/JSON.h\"\n#include \"kv-store.h\"\n#include \"logger.h\"\n#include <arpa/inet.h>\n\nusing builtins::web::url::URL;\nusing builtins::web::url::URLSearchParams;\nusing fastly::fastly::Fastly;\nusing fastly::fetch::RequestOrResponse;\nusing fastly::fetch::Response;\nusing fastly::logger::Logger;\n\nextern char **environ;\n\nnamespace {\n\napi::Engine *ENGINE;\n\n// Global storage for Wizer-time environment\nstd::unordered_map<std::string, std::string> initialized_env;\n\nstatic void oom_callback(JSContext *cx, void *data) {\n  fprintf(stderr, \"Critical Error: out of memory\\n\");\n  fflush(stderr);\n}\n\n#ifdef DEBUG\nstatic std::vector<std::string> debug_messages;\n#endif\n\n} // namespace\n\nbool debug_logging_enabled() { return fastly::fastly::DEBUG_LOGGING_ENABLED; }\n\nnamespace fastly::fastly {\n\nbool DEBUG_LOGGING_ENABLED = false;\n\nJS::PersistentRooted<JSObject *> Fastly::env;\nJS::PersistentRooted<JSObject *> Fastly::baseURL;\nJS::PersistentRooted<JSString *> Fastly::defaultBackend;\nbool allowDynamicBackendsCalled = false;\nbool Fastly::allowDynamicBackends = true;\nbool ENABLE_EXPERIMENTAL_HTTP_CACHE = false;\nReusableSandboxOptions Fastly::reusableSandboxOptions{};\n\nbool Fastly::dump(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = CallArgsFromVp(argc, vp);\n  if (!args.requireAtLeast(cx, __func__, 1))\n    return false;\n\n// special debug mode operations\n#ifndef NDEBUG\n  if (args.get(0).isNull() && args.get(1).isString()) {\n    JS::RootedString str(cx, args.get(1).toString());\n    auto str_chars = core::encode(cx, str);\n    if (!str_chars) {\n      return false;\n    }\n    if (!strcmp(str_chars.ptr.get(), \"invalidkv\")) {\n      host_api::HttpBody body(-1);\n      host_api::HostBytes metadata{};\n      // uint32_t gen = std::get<2>(res.unwrap());\n      JS::RootedObject entry(\n          cx, ::fastly::kv_store::KVStoreEntry::create(cx, body, std::move(metadata)));\n      args.rval().setObject(*entry);\n      return true;\n    }\n  }\n#endif\n\n  ENGINE->dump_value(args[0], stdout);\n\n  args.rval().setUndefined();\n  return true;\n}\n\nbool Fastly::enableDebugLogging(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = CallArgsFromVp(argc, vp);\n  if (!args.requireAtLeast(cx, __func__, 1))\n    return false;\n  DEBUG_LOGGING_ENABLED = JS::ToBoolean(args[0]);\n  args.rval().setUndefined();\n  return true;\n}\n\nbool debugLog(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = CallArgsFromVp(argc, vp);\n  if (!args.requireAtLeast(cx, __func__, 1))\n    return false;\n  JS::RootedString msg_str(cx, JS::ToString(cx, args[0]));\n  if (!msg_str) {\n    return false;\n  }\n  auto msg_host_str = core::encode(cx, msg_str);\n  if (!msg_host_str) {\n    return false;\n  }\n#ifdef DEBUG\n  debug_messages.push_back(std::string(msg_host_str));\n#endif\n  args.rval().setUndefined();\n  return true;\n}\n\nbool Fastly::getGeolocationForIpAddress(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = CallArgsFromVp(argc, vp);\n  REQUEST_HANDLER_ONLY(\"fastly.getGeolocationForIpAddress\");\n  if (!args.requireAtLeast(cx, \"fastly.getGeolocationForIpAddress\", 1))\n    return false;\n\n  JS::RootedString address_str(cx, JS::ToString(cx, args[0]));\n  if (!address_str)\n    return false;\n\n  auto address = core::encode(cx, address_str);\n  if (!address) {\n    return false;\n  }\n\n  // TODO: Remove all of this and rely on the host for validation as the hostcall only takes one\n  // user-supplied parameter\n  int format = AF_INET;\n  size_t octets_len = 4;\n  if (std::find(address.begin(), address.end(), ':') != address.end()) {\n    format = AF_INET6;\n    octets_len = 16;\n  }\n\n  uint8_t octets[sizeof(struct in6_addr)];\n  if (inet_pton(format, address.begin(), octets) != 1) {\n    // While get_geo_info can be invoked through FetchEvent#client.geo, too,\n    // that path can't result in an invalid address here, so we can be more\n    // specific in the error message.\n    // TODO: Make a TypeError\n    JS_ReportErrorLatin1(cx, \"Invalid address passed to fastly.getGeolocationForIpAddress\");\n    return false;\n  }\n\n  auto res = host_api::GeoIp::lookup(std::span<uint8_t>{octets, octets_len});\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  if (!res.unwrap().has_value()) {\n    args.rval().setNull();\n    return true;\n  }\n\n  auto ret = std::move(res.unwrap().value());\n\n  JS::RootedString geo_info_str(\n      cx, JS_NewStringCopyUTF8N(cx, JS::UTF8Chars(ret.ptr.release(), ret.len)));\n  if (!geo_info_str)\n    return false;\n\n  return JS_ParseJSON(cx, geo_info_str, args.rval());\n}\n\nbool Fastly::inspect(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = CallArgsFromVp(argc, vp);\n  REQUEST_HANDLER_ONLY(\"fastly.inspect\");\n  if (!args.requireAtLeast(cx, \"fastly.inspect\", 1)) {\n    return false;\n  }\n\n  auto request_value = args.get(0);\n  if (!Request::is_instance(request_value)) {\n    JS_ReportErrorUTF8(cx, \"inspect: request parameter must be an instance of Request\");\n    return false;\n  }\n  JS::RootedObject request(cx, &request_value.toObject());\n  auto req{Request::request_handle(request)};\n  auto bod{RequestOrResponse::body_handle(request)};\n\n  auto options_value = args.get(1);\n  JS::RootedObject options_obj(cx, options_value.isObject() ? &options_value.toObject() : nullptr);\n\n  host_api::InspectOptions inspect_options(req.handle, bod.handle);\n\n  host_api::HostString corp_str;\n  JS::RootedValue corp_val(cx);\n\n  host_api::HostString workspace_str;\n  JS::RootedValue workspace_val(cx);\n\n  host_api::HostString override_client_ip_str;\n  JS::RootedValue override_client_ip_val(cx);\n  alignas(struct in6_addr) uint8_t octets[sizeof(struct in6_addr)];\n\n  if (options_obj != nullptr) {\n    if (JS_GetProperty(cx, options_obj, \"corp\", &corp_val)) {\n      if (!corp_val.isNullOrUndefined()) {\n        if (!corp_val.isString()) {\n          api::throw_error(cx, api::Errors::TypeError, \"fastly.inspect\", \"corp\", \"be a string\");\n          return false;\n        }\n        corp_str = core::encode(cx, corp_val);\n        if (!corp_str) {\n          return false;\n        }\n        inspect_options.corp_len = corp_str.size();\n        inspect_options.corp = std::move(corp_str.begin());\n      }\n    }\n\n    if (JS_GetProperty(cx, options_obj, \"workspace\", &workspace_val)) {\n      if (!workspace_val.isNullOrUndefined()) {\n        if (!workspace_val.isString()) {\n          api::throw_error(cx, api::Errors::TypeError, \"fastly.inspect\", \"workspace\",\n                           \"be a string\");\n          return false;\n        }\n        workspace_str = core::encode(cx, workspace_val);\n        if (!workspace_str) {\n          return false;\n        }\n        inspect_options.workspace_len = workspace_str.size();\n        inspect_options.workspace = std::move(workspace_str.begin());\n      }\n    }\n\n    if (JS_GetProperty(cx, options_obj, \"overrideClientIp\", &override_client_ip_val)) {\n      if (!override_client_ip_val.isNullOrUndefined()) {\n        if (!override_client_ip_val.isString()) {\n          api::throw_error(cx, api::Errors::TypeError, \"fastly.inspect\", \"overrideClientIp\",\n                           \"be a string\");\n          return false;\n        }\n        override_client_ip_str = core::encode(cx, override_client_ip_val);\n        if (!override_client_ip_str) {\n          return false;\n        }\n\n        // TODO: Remove all of this and rely on the host for validation as the hostcall only takes\n        // one user-supplied parameter\n        int format = AF_INET;\n        size_t octets_len = 4;\n        if (std::find(override_client_ip_str.begin(), override_client_ip_str.end(), ':') !=\n            override_client_ip_str.end()) {\n          format = AF_INET6;\n          octets_len = 16;\n        }\n\n        if (inet_pton(format, override_client_ip_str.begin(), &octets) != 1) {\n          api::throw_error(cx, api::Errors::TypeError, \"fastly.inspect\", \"overrideClientIp\",\n                           \"be a valid IP address\");\n          return false;\n        }\n        inspect_options.override_client_ip_len = octets_len;\n        inspect_options.override_client_ip_ptr = reinterpret_cast<const char *>(&octets);\n      }\n    }\n  }\n\n  host_api::Request host_request{req, bod};\n  auto res = host_request.inspect(&inspect_options);\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  auto ret{std::move(res.unwrap())};\n\n  JS::RootedString js_str(cx, JS_NewStringCopyUTF8N(cx, JS::UTF8Chars(ret.ptr.release(), ret.len)));\n  return JS_ParseJSON(cx, js_str, args.rval());\n}\n\n// TODO(performance): consider allowing logger creation during initialization, but then throw\n// when trying to log.\n// https://github.com/fastly/js-compute-runtime/issues/225\nbool Fastly::getLogger(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = CallArgsFromVp(argc, vp);\n  REQUEST_HANDLER_ONLY(\"fastly.getLogger\");\n  JS::RootedObject self(cx, &args.thisv().toObject());\n  if (!args.requireAtLeast(cx, \"fastly.getLogger\", 1))\n    return false;\n\n  JS::RootedObject logger(cx, Logger::create(cx, args[0]));\n  if (!logger) {\n    return false;\n  }\n\n  args.rval().setObject(*logger);\n  return true;\n}\n\nbool Fastly::includeBytes(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = CallArgsFromVp(argc, vp);\n  INIT_ONLY(\"fastly.includeBytes\");\n  if (!args.requireAtLeast(cx, \"fastly.includeBytes\", 1))\n    return false;\n\n  auto path = core::encode(cx, args[0]);\n  if (!path) {\n    return false;\n  }\n\n  FILE *fp = fopen(path.begin(), \"r\");\n  if (!fp) {\n    JS_ReportErrorUTF8(cx, \"Error opening file %s\", path.begin());\n    return false;\n  }\n\n  fseek(fp, 0L, SEEK_END);\n  size_t size = ftell(fp);\n  rewind(fp);\n  JS::RootedObject typed_array(cx, JS_NewUint8Array(cx, size));\n  if (!typed_array)\n    return false;\n\n  size_t read_bytes;\n  {\n    JS::AutoCheckCannotGC noGC(cx);\n    bool is_shared;\n    void *buffer = JS_GetArrayBufferViewData(typed_array, &is_shared, noGC);\n    read_bytes = fread(buffer, 1, size, fp);\n  }\n\n  if (read_bytes != size) {\n    JS_ReportErrorUTF8(cx, \"Failed to read contents of file %s\", path.begin());\n    return false;\n  }\n\n  args.rval().setObject(*typed_array);\n  return true;\n}\n\nbool Fastly::createFanoutHandoff(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = CallArgsFromVp(argc, vp);\n  REQUEST_HANDLER_ONLY(\"createFanoutHandoff\");\n  if (!args.requireAtLeast(cx, \"createFanoutHandoff\", 2)) {\n    return false;\n  }\n\n  auto request_value = args.get(0);\n  if (!Request::is_instance(request_value)) {\n    JS_ReportErrorUTF8(cx, \"createFanoutHandoff: request parameter must be an instance of Request\");\n    return false;\n  }\n  JS::RootedObject grip_upgrade_request(cx, &request_value.toObject());\n\n  RootedObject request(cx, grip_upgrade_request);\n  if (!RequestOrResponse::commit_headers(cx, request)) {\n    return false;\n  }\n\n  auto response_handle = host_api::HttpResp::make();\n  if (auto *err = response_handle.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  auto body_handle = host_api::HttpBody::make();\n  if (auto *err = body_handle.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  JS::RootedObject response_instance(\n      cx, JS_NewObjectWithGivenProto(cx, &Response::class_, Response::proto_obj));\n  if (!response_instance) {\n    return false;\n  }\n\n  auto backend_value = args.get(1);\n  JS::RootedString backend_str(cx, JS::ToString(cx, backend_value));\n  if (!backend_str) {\n    return false;\n  }\n  auto backend_chars = core::encode(cx, backend_str);\n  if (!backend_chars) {\n    return false;\n  }\n  if (backend_chars.len == 0) {\n    JS_ReportErrorUTF8(cx, \"createFanoutHandoff: Backend parameter can not be an empty string\");\n    return false;\n  }\n\n  if (backend_chars.len > 254) {\n    JS_ReportErrorUTF8(cx, \"createFanoutHandoff: name can not be more than 254 characters\");\n    return false;\n  }\n\n  bool is_upstream = true;\n\n  JS::RootedObject response(cx, Response::create(cx, response_instance, response_handle.unwrap(),\n                                                 body_handle.unwrap(), is_upstream,\n                                                 grip_upgrade_request, nullptr, backend_str));\n  if (!response) {\n    return false;\n  }\n\n  RequestOrResponse::set_url(response, RequestOrResponse::url(&request_value.toObject()));\n  args.rval().setObject(*response);\n\n  return true;\n}\n\nbool Fastly::createWebsocketHandoff(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = CallArgsFromVp(argc, vp);\n  REQUEST_HANDLER_ONLY(\"createWebsocketHandoff\");\n  if (!args.requireAtLeast(cx, \"createWebsocketHandoff\", 2)) {\n    return false;\n  }\n\n  auto request_value = args.get(0);\n  if (!Request::is_instance(request_value)) {\n    JS_ReportErrorUTF8(cx,\n                       \"createWebsocketHandoff: request parameter must be an instance of Request\");\n    return false;\n  }\n  JS::RootedObject websocket_upgrade_request(cx, &request_value.toObject());\n\n  RootedObject request(cx, websocket_upgrade_request);\n  if (!RequestOrResponse::commit_headers(cx, request)) {\n    return false;\n  }\n\n  auto response_handle = host_api::HttpResp::make();\n  if (auto *err = response_handle.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  auto body_handle = host_api::HttpBody::make();\n  if (auto *err = body_handle.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  JS::RootedObject response_instance(\n      cx, JS_NewObjectWithGivenProto(cx, &Response::class_, Response::proto_obj));\n  if (!response_instance) {\n    return false;\n  }\n\n  auto backend_value = args.get(1);\n  JS::RootedString backend_str(cx, JS::ToString(cx, backend_value));\n  if (!backend_str) {\n    return false;\n  }\n  auto backend_chars = core::encode(cx, backend_str);\n  if (!backend_chars) {\n    return false;\n  }\n  if (backend_chars.len == 0) {\n    JS_ReportErrorUTF8(cx, \"createWebsocketHandoff: Backend parameter can not be an empty string\");\n    return false;\n  }\n\n  if (backend_chars.len > 254) {\n    JS_ReportErrorUTF8(cx, \"createWebsocketHandoff: name can not be more than 254 characters\");\n    return false;\n  }\n\n  bool is_upstream = true;\n\n  JS::RootedObject response(cx, Response::create(cx, response_instance, response_handle.unwrap(),\n                                                 body_handle.unwrap(), is_upstream, nullptr,\n                                                 websocket_upgrade_request, backend_str));\n  if (!response) {\n    return false;\n  }\n\n  RequestOrResponse::set_url(response, RequestOrResponse::url(&request_value.toObject()));\n  args.rval().setObject(*response);\n\n  return true;\n}\n\nbool Fastly::now(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = CallArgsFromVp(argc, vp);\n  args.rval().setNumber(JS_Now());\n  return true;\n}\n\nbool Fastly::env_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = CallArgsFromVp(argc, vp);\n  args.rval().setObject(*env);\n  return true;\n}\n\nbool compute_get_vcpu_time(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = CallArgsFromVp(argc, vp);\n  auto res = host_api::Compute::get_vcpu_ms();\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  args.rval().setNumber(res.unwrap());\n  return true;\n}\n\nbool compute_purge_surrogate_key(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = CallArgsFromVp(argc, vp);\n  if (!args.requireAtLeast(cx, \"purgeSurrogateKey\", 1)) {\n    return false;\n  }\n  JS::RootedString surrogate_key(cx, JS::ToString(cx, args.get(0)));\n  if (!surrogate_key) {\n    return false;\n  }\n  auto surrogate_key_chars = core::encode(cx, surrogate_key);\n  bool soft = false;\n  auto soft_val = args.get(1);\n  if (soft_val.isBoolean()) {\n    soft = soft_val.toBoolean();\n  }\n  auto purge_res = host_api::Compute::purge_surrogate_key(surrogate_key_chars, soft);\n  if (auto *err = purge_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  MOZ_ASSERT(!purge_res.unwrap().has_value());\n\n  args.rval().setUndefined();\n  return true;\n}\n\nbool Env::env_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = CallArgsFromVp(argc, vp);\n  if (!args.requireAtLeast(cx, \"fastly.env.get\", 1))\n    return false;\n\n  JS::RootedString str(cx, JS::ToString(cx, args[0]));\n  if (!str) {\n    return false;\n  }\n\n  JS::UniqueChars ptr = JS_EncodeStringToUTF8(cx, str);\n  if (!ptr) {\n    return false;\n  }\n\n  // This shouldn't fail, since the encode operation ensured `str` is linear.\n  JSLinearString *linear = JS_EnsureLinearString(cx, str);\n  uint32_t len = JS::GetDeflatedUTF8StringLength(linear);\n\n  std::string key_str(ptr.get(), len);\n\n  // First check initialized environment\n  if (auto it = initialized_env.find(key_str); it != initialized_env.end()) {\n    JS::RootedString env_var(cx, JS_NewStringCopyN(cx, it->second.data(), it->second.size()));\n    if (!env_var)\n      return false;\n    args.rval().setString(env_var);\n    return true;\n  }\n\n  // Fallback to getenv with caching\n  if (const char *value = std::getenv(key_str.c_str())) {\n    auto [it, _] = initialized_env.emplace(key_str, value);\n    JS::RootedString env_var(cx, JS_NewStringCopyN(cx, it->second.data(), it->second.size()));\n    if (!env_var)\n      return false;\n    args.rval().setString(env_var);\n    return true;\n  }\n\n  args.rval().setUndefined();\n  return true;\n}\n\nconst JSFunctionSpec Env::static_methods[] = {\n    JS_FS_END,\n};\n\nconst JSPropertySpec Env::static_properties[] = {\n    JS_PS_END,\n};\n\nconst JSFunctionSpec Env::methods[] = {JS_FN(\"get\", env_get, 1, JSPROP_ENUMERATE), JS_FS_END};\n\nconst JSPropertySpec Env::properties[] = {JS_PS_END};\n\nJSObject *Env::create(JSContext *cx) {\n  JS::RootedObject env(cx, JS_NewPlainObject(cx));\n  if (!env || !JS_DefineFunctions(cx, env, methods))\n    return nullptr;\n  return env;\n}\n\nbool Fastly::version_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = CallArgsFromVp(argc, vp);\n  JS::RootedString version_str(cx, JS_NewStringCopyN(cx, RUNTIME_VERSION, strlen(RUNTIME_VERSION)));\n  args.rval().setString(version_str);\n  return true;\n}\n\nbool Fastly::baseURL_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = CallArgsFromVp(argc, vp);\n  args.rval().setObjectOrNull(baseURL);\n  return true;\n}\n\nbool Fastly::baseURL_set(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = CallArgsFromVp(argc, vp);\n  if (args.get(0).isNullOrUndefined()) {\n    baseURL.set(nullptr);\n  } else if (!URL::is_instance(args.get(0))) {\n    JS_ReportErrorUTF8(cx, \"Invalid value assigned to fastly.baseURL, must be an instance of \"\n                           \"URL, null, or undefined\");\n    return false;\n  }\n\n  baseURL.set(&args.get(0).toObject());\n\n  args.rval().setObjectOrNull(baseURL);\n  return true;\n}\n\nbool Fastly::defaultBackend_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = CallArgsFromVp(argc, vp);\n  args.rval().setString(defaultBackend);\n  return true;\n}\n\nbool Fastly::defaultBackend_set(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = CallArgsFromVp(argc, vp);\n  JS::RootedString backend(cx, JS::ToString(cx, args.get(0)));\n  if (!backend)\n    return false;\n\n  defaultBackend = backend;\n  if (!allowDynamicBackendsCalled) {\n    allowDynamicBackends = false;\n  }\n  args.rval().setUndefined();\n  return true;\n}\n\n#ifdef DEBUG\nbool debugMessages_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = CallArgsFromVp(argc, vp);\n  JS::RootedObject debugMessages(cx, JS::NewArrayObject(cx, 0));\n  for (const auto &msg : debug_messages) {\n    JS::RootedString str(cx, JS_NewStringCopyUTF8N(cx, JS::UTF8Chars(msg.data(), msg.length())));\n    MOZ_ASSERT(str);\n    bool res;\n    uint32_t len;\n    res = JS::GetArrayLength(cx, debugMessages, &len);\n    MOZ_ASSERT(res);\n    res = JS_SetElement(cx, debugMessages, len, str);\n    MOZ_ASSERT(res);\n  }\n  args.rval().setObject(*debugMessages);\n  return true;\n}\n#endif\n\nbool Fastly::allowDynamicBackends_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = CallArgsFromVp(argc, vp);\n  args.rval().setBoolean(allowDynamicBackends);\n  return true;\n}\n\nbool Fastly::allowDynamicBackends_set(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = CallArgsFromVp(argc, vp);\n  JS::HandleValue set_value = args.get(0);\n  if (set_value.isObject()) {\n    RootedObject options_value(cx, &set_value.toObject());\n    if (!backend::set_default_backend_config(cx, argc, vp)) {\n      return false;\n    }\n    allowDynamicBackends = true;\n  } else {\n    allowDynamicBackends = JS::ToBoolean(set_value);\n  }\n  allowDynamicBackendsCalled = true;\n  args.rval().setUndefined();\n  return true;\n}\n\nbool Fastly::setReusableSandboxOptions(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = CallArgsFromVp(argc, vp);\n  if (Fastly::reusableSandboxOptions.frozen()) {\n    JS_ReportErrorUTF8(cx, \"Reusable sandbox options can only be set at initialization time\");\n    return false;\n  }\n  if (!args.requireAtLeast(cx, \"fastly.setReusableSandboxOptions\", 1)) {\n    return false;\n  }\n  JS::HandleValue options_value = args.get(0);\n  if (!options_value.isObject()) {\n    JS_ReportErrorUTF8(cx, \"Options parameter must be an object\");\n    return false;\n  }\n  RootedObject options_obj(cx, &options_value.toObject());\n\n  auto get_non_negative_int = [cx, &options_obj](const char *prop_name, bool *defined,\n                                                 int32_t *out_value) -> bool {\n    RootedValue val(cx);\n    if (!JS_GetProperty(cx, options_obj, prop_name, &val)) {\n      return false;\n    }\n    if (val.isUndefined()) {\n      *defined = false;\n      return true;\n    }\n    *defined = true;\n    if (!val.isInt32()) {\n      JS_ReportErrorUTF8(cx, \"%s option must be an integer\", prop_name);\n      return false;\n    }\n    int32_t int_val = val.toInt32();\n    if (int_val < 0) {\n      JS_ReportErrorUTF8(cx, \"%s option must be a non-negative integer\", prop_name);\n      return false;\n    }\n    *out_value = int_val;\n    return true;\n  };\n\n  bool defined = false;\n  int32_t max_requests;\n  if (get_non_negative_int(\"maxRequests\", &defined, &max_requests)) {\n    if (defined) {\n      Fastly::reusableSandboxOptions.set_max_requests(max_requests);\n    }\n  } else {\n    return false;\n  }\n\n  int32_t between_request_timeout_ms;\n  if (get_non_negative_int(\"betweenRequestTimeoutMs\", &defined, &between_request_timeout_ms)) {\n    if (defined) {\n      Fastly::reusableSandboxOptions.set_between_request_timeout(\n          std::chrono::milliseconds(between_request_timeout_ms));\n    }\n  } else {\n    return false;\n  }\n\n  int32_t max_memory_mib;\n  if (get_non_negative_int(\"maxMemoryMiB\", &defined, &max_memory_mib)) {\n    if (defined) {\n      Fastly::reusableSandboxOptions.set_max_memory_mib(max_memory_mib);\n    }\n  } else {\n    return false;\n  }\n\n  int32_t sandbox_timeout_ms;\n  if (get_non_negative_int(\"sandboxTimeoutMs\", &defined, &sandbox_timeout_ms)) {\n    if (defined) {\n      Fastly::reusableSandboxOptions.set_sandbox_timeout(\n          std::chrono::milliseconds(sandbox_timeout_ms));\n    }\n  } else {\n    return false;\n  }\n\n  args.rval().setUndefined();\n  return true;\n}\n\nconst JSPropertySpec Fastly::properties[] = {\n    JS_PSG(\"env\", env_get, JSPROP_ENUMERATE),\n    JS_PSGS(\"baseURL\", baseURL_get, baseURL_set, JSPROP_ENUMERATE),\n    JS_PSGS(\"defaultBackend\", defaultBackend_get, defaultBackend_set, JSPROP_ENUMERATE),\n    JS_PSGS(\"allowDynamicBackends\", allowDynamicBackends_get, allowDynamicBackends_set,\n            JSPROP_ENUMERATE),\n    JS_PSG(\"sdkVersion\", version_get, JSPROP_ENUMERATE),\n#ifdef DEBUG\n    JS_PSG(\"debugMessages\", debugMessages_get, JSPROP_ENUMERATE),\n#endif\n    JS_PS_END};\n\nbool install(api::Engine *engine) {\n  ENGINE = engine;\n\n  bool ENABLE_EXPERIMENTAL_HIGH_RESOLUTION_TIME_METHODS =\n      std::string(std::getenv(\"ENABLE_EXPERIMENTAL_HIGH_RESOLUTION_TIME_METHODS\")) == \"1\";\n  ENABLE_EXPERIMENTAL_HTTP_CACHE =\n      std::string(std::getenv(\"ENABLE_EXPERIMENTAL_HTTP_CACHE\")) == \"1\";\n\n  JS::SetOutOfMemoryCallback(engine->cx(), oom_callback, nullptr);\n\n  JS::RootedObject fastly(engine->cx());\n  get_fastly_object(engine, &fastly);\n  if (!fastly) {\n    return false;\n  }\n\n  Fastly::env.init(engine->cx(), Env::create(engine->cx()));\n  if (!Fastly::env) {\n    return false;\n  }\n\n  Fastly::baseURL.init(engine->cx());\n  Fastly::defaultBackend.init(engine->cx());\n\n  JSFunctionSpec nowfn = JS_FN(\"now\", Fastly::now, 0, JSPROP_ENUMERATE);\n  JSFunctionSpec end = JS_FS_END;\n\n  const JSFunctionSpec methods[] = {\n      JS_FN(\"dump\", Fastly::dump, 1, 0),\n      JS_FN(\"enableDebugLogging\", Fastly::enableDebugLogging, 1, JSPROP_ENUMERATE),\n      JS_FN(\"debugLog\", debugLog, 1, JSPROP_ENUMERATE),\n      JS_FN(\"getGeolocationForIpAddress\", Fastly::getGeolocationForIpAddress, 1, JSPROP_ENUMERATE),\n      JS_FN(\"inspect\", Fastly::inspect, 1, JSPROP_ENUMERATE),\n      JS_FN(\"getLogger\", Fastly::getLogger, 1, JSPROP_ENUMERATE),\n      JS_FN(\"includeBytes\", Fastly::includeBytes, 1, JSPROP_ENUMERATE),\n      JS_FN(\"createFanoutHandoff\", Fastly::createFanoutHandoff, 2, JSPROP_ENUMERATE),\n      JS_FN(\"createWebsocketHandoff\", Fastly::createWebsocketHandoff, 2, JSPROP_ENUMERATE),\n      JS_FN(\"setReusableSandboxOptions\", Fastly::setReusableSandboxOptions, 1, JSPROP_ENUMERATE),\n      ENABLE_EXPERIMENTAL_HIGH_RESOLUTION_TIME_METHODS ? nowfn : end,\n      end};\n\n  if (!JS_DefineFunctions(engine->cx(), fastly, methods) ||\n      !JS_DefineProperties(engine->cx(), fastly, Fastly::properties)) {\n    return false;\n  }\n\n  // fastly:env\n  // first, store the initialized environment vars from Wizer\n  initialized_env.clear();\n\n  for (char **env = environ; *env; env++) {\n    const char *entry = *env;\n    const char *eq = entry;\n    while (*eq && *eq != '=')\n      eq++;\n\n    if (*eq == '=') {\n      initialized_env.emplace(std::string(entry, eq - entry), std::string(eq + 1));\n    }\n  }\n  RootedValue env_get(engine->cx());\n  if (!JS_GetProperty(engine->cx(), Fastly::env, \"get\", &env_get)) {\n    return false;\n  }\n  RootedObject env_builtin(engine->cx(), JS_NewObject(engine->cx(), nullptr));\n  if (!JS_SetProperty(engine->cx(), env_builtin, \"env\", env_get)) {\n    return false;\n  }\n  RootedValue env_builtin_val(engine->cx(), JS::ObjectValue(*env_builtin));\n  if (!engine->define_builtin_module(\"fastly:env\", env_builtin_val)) {\n    return false;\n  }\n\n  // fastly:compute\n  RootedObject compute_builtin(engine->cx(), JS_NewObject(engine->cx(), nullptr));\n  auto compute_purge_surrogate_key_fn =\n      JS_NewFunction(engine->cx(), &compute_purge_surrogate_key, 1, 0, \"purgeSurrogateKey\");\n  RootedObject compute_purge_surrogate_key_obj(\n      engine->cx(), JS_GetFunctionObject(compute_purge_surrogate_key_fn));\n  RootedValue compute_purge_surrogate_key_val(engine->cx(),\n                                              ObjectValue(*compute_purge_surrogate_key_obj));\n\n  if (!JS_SetProperty(engine->cx(), compute_builtin, \"purgeSurrogateKey\",\n                      compute_purge_surrogate_key_val)) {\n    return false;\n  }\n  if (!JS_SetProperty(engine->cx(), fastly, \"purgeSurrogateKey\", compute_purge_surrogate_key_val)) {\n    return false;\n  }\n  auto compute_vcpu_time_get =\n      JS_NewFunction(engine->cx(), &compute_get_vcpu_time, 0, 0, \"vCpuTime\");\n  RootedObject compute_vcpu_time_get_obj(engine->cx(), JS_GetFunctionObject(compute_vcpu_time_get));\n  RootedValue compute_vcpu_time_get_val(engine->cx(), ObjectValue(*compute_vcpu_time_get_obj));\n  if (!JS_SetProperty(engine->cx(), compute_builtin, \"vCpuTime\", compute_vcpu_time_get_val)) {\n    return false;\n  }\n  if (!JS_SetProperty(engine->cx(), fastly, \"vCpuTime\", compute_vcpu_time_get_val)) {\n    return false;\n  }\n  RootedValue compute_builtin_val(engine->cx(), JS::ObjectValue(*compute_builtin));\n  if (!engine->define_builtin_module(\"fastly:compute\", compute_builtin_val)) {\n    return false;\n  }\n\n  // fastly:experimental\n  RootedObject experimental(engine->cx(), JS_NewObject(engine->cx(), nullptr));\n  RootedValue experimental_val(engine->cx(), JS::ObjectValue(*experimental));\n  RootedValue include_bytes_val(engine->cx());\n  if (!JS_GetProperty(engine->cx(), fastly, \"includeBytes\", &include_bytes_val)) {\n    return false;\n  }\n  if (!JS_SetProperty(engine->cx(), experimental, \"includeBytes\", include_bytes_val)) {\n    return false;\n  }\n  auto set_default_backend =\n      JS_NewFunction(engine->cx(), &Fastly::defaultBackend_set, 1, 0, \"setDefaultBackend\");\n  RootedObject set_default_backend_obj(engine->cx(), JS_GetFunctionObject(set_default_backend));\n  RootedValue set_default_backend_val(engine->cx(), ObjectValue(*set_default_backend_obj));\n  if (!JS_SetProperty(engine->cx(), experimental, \"setDefaultBackend\", set_default_backend_val)) {\n    return false;\n  }\n  auto enable_debug_logging =\n      JS_NewFunction(engine->cx(), &Fastly::enableDebugLogging, 1, 0, \"enableDebugLogging\");\n  RootedObject enable_debug_logging_obj(engine->cx(), JS_GetFunctionObject(enable_debug_logging));\n  RootedValue enable_debug_logging_val(engine->cx(), ObjectValue(*enable_debug_logging_obj));\n  if (!JS_SetProperty(engine->cx(), experimental, \"enableDebugLogging\", enable_debug_logging_val)) {\n    return false;\n  }\n  auto allow_dynamic_backends =\n      JS_NewFunction(engine->cx(), &Fastly::allowDynamicBackends_set, 1, 0, \"allowDynamicBackends\");\n  RootedObject allow_dynamic_backends_obj(engine->cx(),\n                                          JS_GetFunctionObject(allow_dynamic_backends));\n  RootedValue allow_dynamic_backends_val(engine->cx(), ObjectValue(*allow_dynamic_backends_obj));\n  if (!JS_SetProperty(engine->cx(), experimental, \"allowDynamicBackends\",\n                      allow_dynamic_backends_val)) {\n    return false;\n  }\n  auto set_reusable_sandbox_options = JS_NewFunction(\n      engine->cx(), &Fastly::setReusableSandboxOptions, 1, 0, \"setReusableSandboxOptions\");\n  RootedObject set_reusable_sandbox_options_obj(engine->cx(),\n                                                JS_GetFunctionObject(set_reusable_sandbox_options));\n  RootedValue set_reusable_sandbox_options_val(engine->cx(),\n                                               ObjectValue(*set_reusable_sandbox_options_obj));\n  if (!JS_SetProperty(engine->cx(), experimental, \"setReusableSandboxOptions\",\n                      set_reusable_sandbox_options_val)) {\n    return false;\n  }\n  RootedString version_str(\n      engine->cx(), JS_NewStringCopyN(engine->cx(), RUNTIME_VERSION, strlen(RUNTIME_VERSION)));\n  RootedValue version_str_val(engine->cx(), StringValue(version_str));\n  if (!JS_SetProperty(engine->cx(), experimental, \"sdkVersion\", version_str_val)) {\n    return false;\n  }\n  if (!engine->define_builtin_module(\"fastly:experimental\", experimental_val)) {\n    return false;\n  }\n\n  // fastly:geo\n  RootedValue get_geolocation_for_ip_address_val(engine->cx());\n  if (!JS_GetProperty(engine->cx(), fastly, \"getGeolocationForIpAddress\",\n                      &get_geolocation_for_ip_address_val)) {\n    return false;\n  }\n  RootedObject geo_builtin(engine->cx(), JS_NewObject(engine->cx(), nullptr));\n  RootedValue geo_builtin_val(engine->cx(), JS::ObjectValue(*geo_builtin));\n  if (!JS_SetProperty(engine->cx(), geo_builtin, \"getGeolocationForIpAddress\",\n                      get_geolocation_for_ip_address_val)) {\n    return false;\n  }\n  if (!engine->define_builtin_module(\"fastly:geolocation\", geo_builtin_val)) {\n    return false;\n  }\n  // fastly:fanout\n  RootedObject fanout(engine->cx(), JS_NewObject(engine->cx(), nullptr));\n  RootedValue fanout_val(engine->cx(), JS::ObjectValue(*fanout));\n  RootedValue create_fanout_handoff_val(engine->cx());\n  if (!JS_GetProperty(engine->cx(), fastly, \"createFanoutHandoff\", &create_fanout_handoff_val)) {\n    return false;\n  }\n  if (!JS_SetProperty(engine->cx(), fanout, \"createFanoutHandoff\", create_fanout_handoff_val)) {\n    return false;\n  }\n  if (!engine->define_builtin_module(\"fastly:fanout\", fanout_val)) {\n    return false;\n  }\n\n  // fastly:security\n  RootedValue inspect_val(engine->cx());\n  if (!JS_GetProperty(engine->cx(), fastly, \"inspect\", &inspect_val)) {\n    return false;\n  }\n  RootedObject security_builtin(engine->cx(), JS_NewObject(engine->cx(), nullptr));\n  RootedValue security_builtin_val(engine->cx(), JS::ObjectValue(*security_builtin));\n  if (!JS_SetProperty(engine->cx(), security_builtin, \"inspect\", inspect_val)) {\n    return false;\n  }\n  if (!engine->define_builtin_module(\"fastly:security\", security_builtin_val)) {\n    return false;\n  }\n\n  // fastly:websocket\n  RootedObject websocket(engine->cx(), JS_NewObject(engine->cx(), nullptr));\n  RootedValue websocket_val(engine->cx(), JS::ObjectValue(*websocket));\n  RootedValue create_websocket_handoff_val(engine->cx());\n  if (!JS_GetProperty(engine->cx(), fastly, \"createWebsocketHandoff\",\n                      &create_websocket_handoff_val)) {\n    return false;\n  }\n  if (!JS_SetProperty(engine->cx(), websocket, \"createWebsocketHandoff\",\n                      create_websocket_handoff_val)) {\n    return false;\n  }\n  if (!engine->define_builtin_module(\"fastly:websocket\", websocket_val)) {\n    return false;\n  }\n\n  // debugMessages for debug-only builds\n#ifdef DEBUG\n  debug_messages.clear();\n#endif\n\n  return true;\n}\n\n// We currently support five types of body inputs:\n// - byte sequence\n// - buffer source\n// - USV strings\n// - URLSearchParams\n// After the other other options are checked explicitly, all other inputs are\n// encoded to a UTF8 string to be treated as a USV string.\n// TODO: Support the other possible inputs to Body.\nJS::Result<std::tuple<JS::UniqueChars, size_t>> convertBodyInit(JSContext *cx,\n                                                                JS::HandleValue bodyInit) {\n  JS::RootedObject bodyObj(cx, bodyInit.isObject() ? &bodyInit.toObject() : nullptr);\n  JS::UniqueChars buf;\n  size_t length;\n\n  if (bodyObj && JS_IsArrayBufferViewObject(bodyObj)) {\n    length = JS_GetArrayBufferViewByteLength(bodyObj);\n    buf.reset(reinterpret_cast<char *>(JS_malloc(cx, length)));\n    // `maybeNoGC` needs to be populated for the lifetime of `buf` because\n    // short typed arrays have inline data which can move on GC, so assert\n    // that no GC happens. (Which it doesn't, because we're not allocating\n    // before `buf` goes out of scope.)\n    JS::AutoCheckCannotGC noGC;\n    bool is_shared;\n    auto *data = JS_GetArrayBufferViewData(bodyObj, &is_shared, noGC);\n    std::memcpy(buf.get(), data, length);\n    MOZ_ASSERT(!is_shared);\n    return JS::Result<std::tuple<JS::UniqueChars, size_t>>(std::make_tuple(std::move(buf), length));\n  } else if (bodyObj && JS::IsArrayBufferObject(bodyObj)) {\n    bool is_shared;\n    uint8_t *bytes;\n    JS::GetArrayBufferLengthAndData(bodyObj, &length, &is_shared, &bytes);\n    MOZ_ASSERT(!is_shared);\n    buf.reset(reinterpret_cast<char *>(JS_malloc(cx, length)));\n    std::memcpy(buf.get(), bytes, length);\n    return JS::Result<std::tuple<JS::UniqueChars, size_t>>(std::make_tuple(std::move(buf), length));\n  } else if (bodyObj && URLSearchParams::is_instance(bodyObj)) {\n    jsurl::SpecSlice slice = URLSearchParams::serialize(cx, bodyObj);\n    buf.reset(reinterpret_cast<char *>(JS_malloc(cx, slice.len)));\n    std::memcpy(buf.get(), slice.data, slice.len);\n    length = slice.len;\n    return JS::Result<std::tuple<JS::UniqueChars, size_t>>(std::make_tuple(std::move(buf), length));\n  } else {\n    // Convert into a String following https://tc39.es/ecma262/#sec-tostring\n    auto str = core::encode(cx, bodyInit);\n    buf = std::move(str.ptr);\n    length = str.len;\n    if (!buf) {\n      return JS::Result<std::tuple<JS::UniqueChars, size_t>>(JS::Error());\n    }\n    return JS::Result<std::tuple<JS::UniqueChars, size_t>>(std::make_tuple(std::move(buf), length));\n  }\n  abort();\n}\n\n} // namespace fastly::fastly\n\nvoid fastly_push_debug_message(std::string msg) {\n#ifdef DEBUG\n  if (fastly::fastly::DEBUG_LOGGING_ENABLED) {\n    // Log to both stderr and debug message log\n    fprintf(stderr, \"%.*s\\n\", static_cast<int>(msg.size()), msg.data());\n    fflush(stderr);\n    debug_messages.push_back(msg);\n  }\n#endif\n}\n"
  },
  {
    "path": "runtime/fastly/builtins/fastly.h",
    "content": "#ifndef FASTLY_FASTLY_H\n#define FASTLY_FASTLY_H\n\n#include \"../../StarlingMonkey/builtins/web/url.h\"\n#include \"../host-api/host_api_fastly.h\"\n#include \"./fetch/request-response.h\"\n#include \"builtin.h\"\n#include \"extension-api.h\"\n#include \"fastly.h\"\n#include \"host_api.h\"\n\nnamespace fastly::fastly {\n\nextern bool DEBUG_LOGGING_ENABLED;\nextern bool ENABLE_EXPERIMENTAL_HTTP_CACHE;\n\nclass Env : public builtins::BuiltinNoConstructor<Env> {\nprivate:\n  static bool env_get(JSContext *cx, unsigned argc, JS::Value *vp);\n\npublic:\n  static constexpr const char *class_name = \"Env\";\n\n  static const JSFunctionSpec static_methods[];\n  static const JSPropertySpec static_properties[];\n  static const JSFunctionSpec methods[];\n  static const JSPropertySpec properties[];\n\n  static JSObject *create(JSContext *cx);\n};\n\nclass ReusableSandboxOptions {\npublic:\n  ReusableSandboxOptions() = default;\n  ReusableSandboxOptions(const ReusableSandboxOptions &) = delete;\n  ReusableSandboxOptions &operator=(const ReusableSandboxOptions &) = delete;\n\n  std::optional<uint32_t> max_requests() const { return max_requests_; }\n  bool set_max_requests(uint32_t max_requests) {\n    if (frozen_) {\n      return false;\n    }\n    max_requests_ = max_requests;\n    return true;\n  }\n  std::optional<std::chrono::milliseconds> between_request_timeout() const {\n    return between_request_timeout_;\n  }\n  bool set_between_request_timeout(std::chrono::milliseconds timeout) {\n    if (frozen_) {\n      return false;\n    }\n    between_request_timeout_ = timeout;\n    return true;\n  }\n  std::optional<uint32_t> max_memory_mib() const { return max_memory_mib_; }\n  bool set_max_memory_mib(uint32_t max_memory_mib) {\n    if (frozen_) {\n      return false;\n    }\n    max_memory_mib_ = max_memory_mib;\n    return true;\n  }\n  std::optional<std::chrono::milliseconds> sandbox_timeout() const { return sandbox_timeout_; }\n  bool set_sandbox_timeout(std::chrono::milliseconds timeout) {\n    if (frozen_) {\n      return false;\n    }\n    sandbox_timeout_ = timeout;\n    return true;\n  }\n  bool frozen() const { return frozen_; }\n  void freeze() { frozen_ = true; }\n\nprivate:\n  bool frozen_ = false;\n  std::optional<uint32_t> max_requests_;\n  std::optional<std::chrono::milliseconds> between_request_timeout_;\n  std::optional<uint32_t> max_memory_mib_;\n  std::optional<std::chrono::milliseconds> sandbox_timeout_;\n};\n\nclass Fastly : public builtins::BuiltinNoConstructor<Fastly> {\nprivate:\n  static bool log(JSContext *cx, unsigned argc, JS::Value *vp);\n\npublic:\n  static constexpr const char *class_name = \"Fastly\";\n\n  static JS::PersistentRooted<JSObject *> env;\n  static JS::PersistentRooted<JSObject *> baseURL;\n  static JS::PersistentRooted<JSString *> defaultBackend;\n  static bool allowDynamicBackends;\n  static host_api::BackendConfig defaultDynamicBackendConfig;\n  static ReusableSandboxOptions reusableSandboxOptions;\n\n  static const JSPropertySpec properties[];\n\n  static bool createFanoutHandoff(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool createWebsocketHandoff(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool now(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool dump(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool enableDebugLogging(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool getGeolocationForIpAddress(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool getLogger(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool includeBytes(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool version_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool env_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool baseURL_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool baseURL_set(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool defaultBackend_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool defaultBackend_set(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool allowDynamicBackends_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool allowDynamicBackends_set(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool inspect(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool setReusableSandboxOptions(JSContext *cx, unsigned argc, JS::Value *vp);\n};\n\nJS::Result<std::tuple<JS::UniqueChars, size_t>> convertBodyInit(JSContext *cx,\n                                                                JS::HandleValue bodyInit);\n\ninline bool get_fastly_object(api::Engine *engine, JS::MutableHandleObject out) {\n  JS::RootedValue fastly_val(engine->cx());\n  if (!JS_GetProperty(engine->cx(), engine->global(), \"fastly\", &fastly_val)) {\n    return false;\n  }\n  if (fastly_val.isObject()) {\n    out.set(&fastly_val.toObject());\n    return true;\n  }\n  JS::RootedObject fastly_obj(engine->cx(), JS_NewPlainObject(engine->cx()));\n  if (!fastly_obj) {\n    return false;\n  }\n  if (!JS_DefineProperty(engine->cx(), engine->global(), \"fastly\", fastly_obj, 0)) {\n    return false;\n  }\n  out.set(fastly_obj);\n  return true;\n}\n\n/**\n * Debug only logging system, adding messages to `fastly.debugMessages`\n *\n * This is useful for debugging compute, allowing messages to be inlined into the response in test\n * case debugging, where other logging systems may introduce greater latency than this.\n */\n\n} // namespace fastly::fastly\n\nvoid fastly_push_debug_message(std::string msg);\n\n#endif\n"
  },
  {
    "path": "runtime/fastly/builtins/fetch/fetch.cpp",
    "content": "#include \"fetch.h\"\n#include \"../../../StarlingMonkey/builtins/web/fetch/headers.h\"\n#include \"../../../StarlingMonkey/builtins/web/streams/native-stream-sink.h\"\n#include \"../../../StarlingMonkey/builtins/web/streams/native-stream-source.h\"\n#include \"../backend.h\"\n#include \"../body.h\"\n#include \"../cache-override.h\"\n#include \"../fastly.h\"\n#include \"../fetch-event.h\"\n#include \"../image-optimizer.h\"\n#include \"./request-response.h\"\n#include \"builtin.h\"\n#include \"encode.h\"\n#include \"extension-api.h\"\n#include \"picosha2.h\"\n\nusing builtins::web::streams::NativeStreamSink;\nusing builtins::web::streams::NativeStreamSource;\nusing fastly::FastlyGetErrorMessage;\nusing fastly::backend::Backend;\nusing fastly::body::FastlyBody;\nusing fastly::cache_override::CacheOverride;\nusing fastly::fastly::Fastly;\nusing fastly::fetch::ENGINE;\nusing fastly::fetch::Request;\nusing fastly::fetch::RequestOrResponse;\nusing fastly::fetch::Response;\nusing fastly::fetch_event::FetchEvent;\n\nnamespace {\n\nclass FetchTask final : public api::AsyncTask {\n  Heap<JSObject *> request_;\n  Heap<JSObject *> promise_;\n\npublic:\n  explicit FetchTask(host_api::HttpPendingReq::Handle handle, JS::HandleObject request,\n                     JS::HandleObject promise)\n      : request_(request), promise_(promise) {\n    if (static_cast<int32_t>(handle) < 0)\n      abort();\n    handle_ = static_cast<int32_t>(handle);\n  }\n\n  [[nodiscard]] bool run(api::Engine *engine) override {\n    JSContext *cx = engine->cx();\n\n    const RootedObject request(cx, request_);\n    const RootedValue promise(cx, JS::ObjectValue(*promise_));\n\n    return RequestOrResponse::process_pending_request(cx, handle_, request, promise);\n  }\n\n  [[nodiscard]] bool cancel(api::Engine *engine) override { return false; }\n\n  void trace(JSTracer *trc) override {\n    TraceEdge(trc, &request_, \"Fetch request\");\n    TraceEdge(trc, &promise_, \"Fetch promise\");\n  }\n};\n\ntemplate <InternalMethod then_handler, InternalMethod catch_handler>\nJSObject *internal_method_then(JSContext *cx, JS::HandleObject promise, JS::HandleObject receiver,\n                               const JS::HandleValue extra = UndefinedHandleValue) {\n  JS::RootedObject then_handler_obj(cx, create_internal_method<then_handler>(cx, receiver, extra));\n  if (!then_handler_obj) {\n    return nullptr;\n  }\n  JS::RootedObject catch_handler_obj(cx,\n                                     create_internal_method<catch_handler>(cx, receiver, extra));\n  if (!catch_handler_obj) {\n    return nullptr;\n  }\n  JS::RootedObject return_promise(\n      cx, JS::CallOriginalPromiseThen(cx, promise, then_handler_obj, catch_handler_obj));\n  if (!return_promise) {\n    return nullptr;\n  }\n  return return_promise;\n}\n\nJSString *get_backend(JSContext *cx, JS::HandleObject request) {\n  RootedString backend(cx, RequestOrResponse::backend(request));\n  if (!backend) {\n    if (Fastly::allowDynamicBackends) {\n      JS::RootedObject dynamicBackend(cx, Backend::create(cx, request));\n      if (!dynamicBackend) {\n        return nullptr;\n      }\n      backend.set(Backend::name(cx, dynamicBackend));\n    } else {\n      backend = Fastly::defaultBackend;\n      if (!backend) {\n        auto handle = Request::request_handle(request);\n\n        auto res = handle.get_uri();\n        if (auto *err = res.to_err()) {\n          HANDLE_ERROR(cx, *err);\n        } else {\n          JS_ReportErrorLatin1(cx,\n                               \"No backend specified for request with url %s. \"\n                               \"Must provide a `backend` property on the `init` object \"\n                               \"passed to either `new Request()` or `fetch`\",\n                               res.unwrap().begin());\n        }\n        return nullptr;\n      }\n    }\n  }\n  return backend;\n}\n\nbool must_use_guest_caching(JSContext *cx, HandleObject request) {\n  JS::RootedObject cache_override(\n      cx, JS::GetReservedSlot(request, static_cast<uint32_t>(Request::Slots::CacheOverride))\n              .toObjectOrNull());\n  if (cache_override) {\n    return CacheOverride::beforeSend(cache_override) || CacheOverride::afterSend(cache_override);\n  }\n  return false;\n}\n\nbool http_caching_unsupported = false;\nenum CachingMode { Guest, Host, ImageOptimizer };\nbool get_caching_mode(JSContext *cx, HandleObject request, CachingMode *caching_mode) {\n  *caching_mode = CachingMode::Guest;\n\n  // Check for pass cache override\n  MOZ_ASSERT(Request::is_instance(request));\n  JS::RootedObject cache_override(\n      cx, JS::GetReservedSlot(request, static_cast<uint32_t>(Request::Slots::CacheOverride))\n              .toObjectOrNull());\n  if (cache_override) {\n    if (CacheOverride::mode(cache_override) == CacheOverride::CacheOverrideMode::Pass) {\n      // Pass requests have to go through the host for now\n      *caching_mode = CachingMode::Host;\n      return true;\n    }\n  }\n\n  // Check for PURGE method\n  RootedString method_str(cx, Request::method(cx, request));\n  bool is_purge = false;\n  if (method_str && !JS_StringEqualsLiteral(cx, method_str, \"PURGE\", &is_purge)) {\n    return false;\n  }\n  if (is_purge) {\n    // We don't yet implement guest-side URL purges\n    *caching_mode = CachingMode::Host;\n    return true;\n  }\n\n  // Requests meant for Image Optimizer should not be cached at this point,\n  // as the caching behavior is determined by the origin image, which is\n  // fetched after the request reaches the Image Optimizer WASM service.\n  // The WASM service uses cache_on_behalf to insert the result into\n  // the service's cache.\n  auto image_optimizer_opts =\n      JS::GetReservedSlot(request, static_cast<uint32_t>(Request::Slots::ImageOptimizerOptions));\n  if (!image_optimizer_opts.isNullOrUndefined()) {\n    *caching_mode = CachingMode::ImageOptimizer;\n    return true;\n  }\n\n  // If we previously found guest caching unsupported then remember that\n  if (http_caching_unsupported || !fastly::fastly::ENABLE_EXPERIMENTAL_HTTP_CACHE) {\n    if (must_use_guest_caching(cx, request)) {\n      if (!fastly::fastly::ENABLE_EXPERIMENTAL_HTTP_CACHE) {\n        JS_ReportErrorASCII(cx, \"HTTP caching API is not enabled for JavaScript; enable it with \"\n                                \"the --enable-http-cache flag \"\n                                \"to the js-compute build command, or contact support for help\");\n      } else {\n        JS_ReportErrorASCII(\n            cx,\n            \"HTTP caching API is not enabled for this service; please contact support for help\");\n      }\n      return false;\n    }\n    *caching_mode = CachingMode::Host;\n    return true;\n  }\n\n  // Check if we must use host caching by checking if guest caching is unsupported\n  auto request_handle = Request::request_handle(request);\n  auto res = request_handle.is_cacheable();\n  if (auto *err = res.to_err()) {\n    if (host_api::error_is_unsupported(*err)) {\n      http_caching_unsupported = true;\n      // Guest-side caching is unsupported, so we must use host caching.\n      // If we have hooks we must fail since they require guest caching.\n      if (must_use_guest_caching(cx, request)) {\n        JS_ReportErrorASCII(cx, \"HTTP caching API is not enabled; please contact support for help\");\n        return false;\n      }\n      *caching_mode = CachingMode::Host;\n      return true;\n    }\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  return true;\n}\n\n// Sends the request body, resolving the response promise with the response\ntemplate <CachingMode caching_mode>\nbool fetch_send_body(JSContext *cx, HandleObject request, JS::MutableHandleValue ret) {\n  RootedString backend(cx, get_backend(cx, request));\n  if (!backend) {\n    JSObject *promise = PromiseRejectedWithPendingError(cx);\n    if (!promise) {\n      return false;\n    }\n    ret.setObject(*promise);\n    return true;\n  }\n  host_api::HostString backend_chars = core::encode(cx, backend);\n  if (!backend_chars.ptr) {\n    JSObject *promise = PromiseRejectedWithPendingError(cx);\n    if (!promise) {\n      return false;\n    }\n    ret.setObject(*promise);\n    return true;\n  }\n\n  // commit the headers into the headers handle\n  if (!RequestOrResponse::commit_headers(cx, request)) {\n    return false;\n  }\n\n  // cache override only applies to requests with caching\n  if (caching_mode == CachingMode::Host) {\n    if (!Request::apply_cache_override(cx, request)) {\n      return false;\n    }\n  } else {\n    // track requests without caching via CacheEntry false convention\n    // this is used to track that we later must set Fastly headers in this case\n    JS::SetReservedSlot(request, static_cast<uint32_t>(RequestOrResponse::Slots::CacheEntry),\n                        JS::BooleanValue(false));\n  }\n\n  if (!Request::apply_auto_decompress_gzip(cx, request)) {\n    return false;\n  }\n\n  RootedObject response_promise(cx, JS::NewPromiseObject(cx, nullptr));\n  if (!response_promise) {\n    return false;\n  }\n\n  // The image optimizer does not support streaming, so never stream in this case\n  bool streaming = false;\n  if (caching_mode != CachingMode::ImageOptimizer &&\n      !RequestOrResponse::maybe_stream_body(cx, request, &streaming)) {\n    return false;\n  }\n\n  host_api::HttpPendingReq pending_handle;\n  {\n    auto request_handle = Request::request_handle(request);\n    auto body = RequestOrResponse::body_handle(request);\n    host_api::Result<host_api::HttpPendingReq> res;\n    switch (caching_mode) {\n    case CachingMode::Host: {\n      if (streaming) {\n        res = request_handle.send_async_streaming(body, backend_chars);\n      } else {\n        res = request_handle.send_async(body, backend_chars);\n      }\n      break;\n    }\n    case CachingMode::Guest:\n      res = request_handle.send_async_without_caching(body, backend_chars, streaming);\n      break;\n    case CachingMode::ImageOptimizer: {\n      auto config = reinterpret_cast<fastly::image_optimizer::ImageOptimizerOptions *>(\n          JS::GetReservedSlot(request, static_cast<uint32_t>(Request::Slots::ImageOptimizerOptions))\n              .toPrivate());\n      auto config_str = config->to_string();\n      auto res = request_handle.send_image_optimizer(body, backend_chars, config_str);\n      if (auto *err = res.to_err()) {\n        HANDLE_IMAGE_OPTIMIZER_ERROR(cx, *err);\n        ret.setObject(*PromiseRejectedWithPendingError(cx));\n        return true;\n      }\n\n      JS::RootedObject response(cx, Response::create(cx, request, res.unwrap()));\n      JS::RootedValue response_val(cx, JS::ObjectValue(*response));\n      if (!JS::ResolvePromise(cx, response_promise, response_val)) {\n        return false;\n      }\n      ret.setObject(*response_promise);\n      return true;\n    }\n    }\n\n    if (auto *err = res.to_err()) {\n      if (host_api::error_is_generic(*err) || host_api::error_is_invalid_argument(*err)) {\n        JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                                  fastly::JSMSG_REQUEST_BACKEND_DOES_NOT_EXIST,\n                                  backend_chars.ptr.get());\n      } else {\n        HANDLE_ERROR(cx, *err);\n      }\n      ret.setObject(*PromiseRejectedWithPendingError(cx));\n      return true;\n    }\n\n    pending_handle = res.unwrap();\n  }\n\n  // If the request body is streamed, we need to wait for streaming to complete before marking the\n  // request as pending.\n  if (!streaming) {\n    ENGINE->queue_async_task(new FetchTask(pending_handle.handle, request, response_promise));\n  }\n\n  JS::SetReservedSlot(request, static_cast<uint32_t>(Request::Slots::PendingRequest),\n                      JS::Int32Value(pending_handle.handle));\n  JS::SetReservedSlot(request, static_cast<uint32_t>(Request::Slots::ResponsePromise),\n                      JS::ObjectValue(*response_promise));\n  ret.setObject(*response_promise);\n  return true;\n}\n\nbool fetch_process_cache_hooks_origin_request(JSContext *cx, JS::HandleObject request,\n                                              JS::HandleValue ret_promise, JS::CallArgs args) {\n  JS::RootedObject ret_promise_obj(cx, &ret_promise.toObject());\n\n  JS::SetReservedSlot(request, static_cast<uint32_t>(RequestOrResponse::Slots::BodyUsed),\n                      JS::BooleanValue(false));\n\n  RootedString backend(cx, get_backend(cx, request));\n  if (!backend) {\n    RejectPromiseWithPendingError(cx, ret_promise_obj);\n    return true;\n  }\n  host_api::HostString backend_chars = core::encode(cx, backend);\n  if (!backend_chars.ptr) {\n    RejectPromiseWithPendingError(cx, ret_promise_obj);\n    return true;\n  }\n\n  if (!RequestOrResponse::commit_headers(cx, request)) {\n    return false;\n  }\n\n  if (!Request::apply_auto_decompress_gzip(cx, request)) {\n    return false;\n  }\n\n  bool streaming = false;\n  if (!RequestOrResponse::maybe_stream_body(cx, request, &streaming)) {\n    RequestOrResponse::close_if_cache_entry(cx, request);\n    return false;\n  }\n\n  host_api::HttpPendingReq pending_handle;\n  {\n    auto request_handle = Request::request_handle(request);\n    auto body = RequestOrResponse::body_handle(request);\n    auto res = request_handle.send_async_without_caching(body, backend_chars, streaming);\n\n    if (auto *err = res.to_err()) {\n      if (!RequestOrResponse::close_if_cache_entry(cx, request)) {\n        return false;\n      }\n      if (host_api::error_is_generic(*err) || host_api::error_is_invalid_argument(*err)) {\n        JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                                  fastly::JSMSG_REQUEST_BACKEND_DOES_NOT_EXIST,\n                                  backend_chars.ptr.get());\n      } else {\n        HANDLE_ERROR(cx, *err);\n      }\n      RejectPromiseWithPendingError(cx, ret_promise_obj);\n      return true;\n    }\n\n    pending_handle = res.unwrap();\n  }\n\n  // If the request body is streamed, we need to wait for streaming to complete before marking\n  // the request as pending.\n  if (!streaming) {\n    ENGINE->queue_async_task(new FetchTask(pending_handle.handle, request, ret_promise_obj));\n  }\n\n  JS::SetReservedSlot(request, static_cast<uint32_t>(Request::Slots::PendingRequest),\n                      JS::Int32Value(pending_handle.handle));\n  return true;\n}\n\nbool fetch_process_cache_hooks_before_send_reject(JSContext *cx, JS::HandleObject request,\n                                                  JS::HandleValue ret_promise, JS::CallArgs args) {\n  if (!RequestOrResponse::close_if_cache_entry(cx, request)) {\n    return false;\n  }\n  JS::RootedObject ret_promise_obj(cx, &ret_promise.toObject());\n  JS::RejectPromise(cx, ret_promise_obj, args.get(0));\n  return true;\n}\n\n// Sends the request body, applying the beforeSend and afterSend HTTP caching hook lifecycle\nbool fetch_send_body_with_cache_hooks(JSContext *cx, HandleObject request,\n                                      host_api::HttpCacheEntry &cache_entry,\n                                      JS::MutableHandleValue ret_promise) {\n  auto suggested_backend_request_res = cache_entry.get_suggested_backend_request();\n  if (auto *err = suggested_backend_request_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    ret_promise.setObject(*PromiseRejectedWithPendingError(cx));\n    return true;\n  }\n  auto backend_request_handle = suggested_backend_request_res.unwrap();\n\n  // We carefully patch just the request handle on the original request to refer to the new request\n  // handle. This retains the normal fetch logic that the body will stream then wait for the request\n  // and use the request response, even though the other request details will be different under the\n  // hood, but it is the simplest approach to ensure the original body runs through the correct\n  // request logic. Setting the cache handle on the request indicates this is the situation for a\n  // cache origin request.\n  JS::SetReservedSlot(request, static_cast<uint32_t>(Request::Slots::Request),\n                      JS::Int32Value(backend_request_handle.handle));\n  JS::SetReservedSlot(request, static_cast<uint32_t>(RequestOrResponse::Slots::CacheEntry),\n                      JS::Int32Value(cache_entry.handle));\n\n  // Next, if we have a beforeSend hook, we invoke this hook prior to sending to the backend, with\n  // a newly created request object to match this request. This ensures it gets its headers freshly\n  // linked to the new host request correctly without the previous header cache state from the\n  // original request. We lock the body on this request as it is still owned by the initiating\n  // request object. If there is no beforeSend hook, we don't need to create this request.\n  RootedObject cache_override(\n      cx, JS::GetReservedSlot(request, static_cast<uint32_t>(Request::Slots::CacheOverride))\n              .toObjectOrNull());\n  RootedObject before_send(cx);\n  if (cache_override) {\n    before_send.set(CacheOverride::beforeSend(cache_override));\n  }\n\n  JS::RootedObject before_send_promise(cx);\n  if (before_send) {\n    JS::RootedValue ret_val(cx);\n    JS::RootedValueArray<1> args(cx);\n    args[0].set(JS::ObjectValue(*request));\n\n    // lock the body temporarily (throwing if already used here, earlier than usual, instead)\n    if (RequestOrResponse::body_used(request)) {\n      JS_ReportErrorASCII(cx, \"Body has already been consumed\");\n      ret_promise.setObject(*PromiseRejectedWithPendingError(cx));\n    }\n    JS::SetReservedSlot(request, static_cast<uint32_t>(RequestOrResponse::Slots::BodyUsed),\n                        JS::BooleanValue(true));\n\n    // now call before_send with the candidate_request, allowing any async work\n    if (!JS::Call(cx, JS::NullHandleValue, before_send, args, &ret_val)) {\n      ret_promise.setObject(*PromiseRejectedWithPendingError(cx));\n      return true;\n    }\n    before_send_promise.set(JS::CallOriginalPromiseResolve(cx, ret_val));\n    if (!before_send_promise) {\n      return false;\n    }\n  } else {\n    before_send_promise.set(JS::NewPromiseObject(cx, nullptr));\n    if (!before_send_promise) {\n      return false;\n    }\n    if (!JS::ResolvePromise(cx, before_send_promise, JS::UndefinedHandleValue)) {\n      return false;\n    }\n  }\n  // when we resume, we pick up in fetch_send_body_with_cache_hooks_origin_request\n  ret_promise.setObject(*JS::NewPromiseObject(cx, nullptr));\n  JS::RootedObject then_handler_obj(\n      cx,\n      create_internal_method<fetch_process_cache_hooks_origin_request>(cx, request, ret_promise));\n  if (!then_handler_obj) {\n    return false;\n  }\n  JS::RootedObject catch_handler_obj(\n      cx, create_internal_method<fetch_process_cache_hooks_before_send_reject>(cx, request,\n                                                                               ret_promise));\n  if (!catch_handler_obj) {\n    return false;\n  }\n  return JS::AddPromiseReactions(cx, before_send_promise, then_handler_obj, catch_handler_obj);\n}\n\nbool apply_body_transform_transform_then(JSContext *cx, JS::HandleObject fastly_body,\n                                         JS::HandleValue response, JS::CallArgs args) {\n  JS::RootedValue transformed_array_buffer(cx, args.get(0));\n  JS::RootedObject transformed_array_buffer_obj(cx);\n  bool valid = false;\n  if (transformed_array_buffer.isObject()) {\n    transformed_array_buffer_obj.set(&transformed_array_buffer.toObject());\n    if (JS_IsArrayBufferViewObject(transformed_array_buffer_obj) ||\n        JS_IsTypedArrayObject(transformed_array_buffer_obj)) {\n      valid = true;\n    }\n  }\n  if (!valid) {\n    JS::RootedObject response_obj(cx, &response.toObject());\n    JS::RootedValue result_promise_val(\n        cx, JS::GetReservedSlot(response_obj,\n                                static_cast<uint32_t>(RequestOrResponse::Slots::BodyAllPromise)));\n    JS_ReportErrorASCII(\n        cx, \"transformBodyFn did not return a valid array buffer or promise for an array buffer\");\n    return false;\n  }\n\n  JS::RootedValueArray<1> append_args(cx);\n  append_args[0].setObject(*transformed_array_buffer_obj);\n  JS::RootedValue rval(cx);\n  if (!JS::Call(cx, fastly_body, \"append\", append_args, &rval)) {\n    return false;\n  }\n  if (!JS::Call(cx, fastly_body, \"close\", JS::HandleValueArray::empty(), &rval)) {\n    return false;\n  }\n  return true;\n}\n\n// These are constructed as thens that can return promises to extend the outer promise\nbool apply_body_transform_response_array_buffer_then(JSContext *cx, JS::HandleObject fastly_body,\n                                                     JS::HandleValue response, JS::CallArgs args) {\n  JS::RootedObject response_obj(cx, &response.toObject());\n  JS::RootedObject response_transform(\n      cx,\n      &JS::GetReservedSlot(response_obj, static_cast<uint32_t>(Response::Slots::CacheBodyTransform))\n           .toObject());\n  MOZ_ASSERT(response_transform);\n\n  JS::RootedObject array_buffer(cx, &args.get(0).toObject());\n  JS::RootedObject transform_fn_obj(\n      cx,\n      &JS::GetReservedSlot(response_obj, static_cast<uint32_t>(Response::Slots::CacheBodyTransform))\n           .toObject());\n\n  JS::RootedValueArray<1> transform_args(cx);\n  transform_args[0].setObject(*array_buffer);\n  JS::RootedValue transform_ret(cx);\n  if (!JS::Call(cx, JS::NullHandleValue, transform_fn_obj, transform_args, &transform_ret)) {\n    return false;\n  }\n  JS::RootedObject transform_ret_promise(cx, JS::CallOriginalPromiseResolve(cx, transform_ret));\n  if (!transform_ret_promise) {\n    return false;\n  }\n\n  JS::RootedObject transform_then(\n      cx, create_internal_method<apply_body_transform_transform_then>(cx, fastly_body, response));\n  if (!transform_then) {\n    return false;\n  }\n\n  JS::RootedObject ret_promise(\n      cx, JS::CallOriginalPromiseThen(cx, transform_ret_promise, transform_then, nullptr));\n  args.rval().setObject(*ret_promise);\n  return true;\n}\n\nbool apply_body_transform_catch_handler(JSContext *cx, JS::HandleObject fastly_body,\n                                        JS::HandleValue response, JS::CallArgs args) {\n  JS::RootedValue rval(cx);\n  if (!JS::Call(cx, fastly_body, \"abandon\", JS::HandleValueArray::empty(), &rval)) {\n    return false;\n  }\n  // \"rethrow\" the error\n  JS_SetPendingException(cx, args.get(0), JS::ExceptionStackBehavior::DoNotCapture);\n  return false;\n}\n\nbool apply_body_transform(JSContext *cx, JS::HandleValue response, host_api::HttpBody into_body,\n                          JS::MutableHandleObject ret_promise) {\n  JS::RootedObject response_obj(cx, &response.toObject());\n  // Get the entire body from the response (asynchronously)\n\n  JS::Value array_buffer_ret;\n  JS::CallArgs args = JS::CallArgsFromVp(0, &array_buffer_ret);\n  if (!RequestOrResponse::bodyAll<RequestOrResponse::BodyReadResult::ArrayBuffer, false>(\n          cx, args, response_obj)) {\n    return false;\n  }\n  JS::RootedValue array_buffer(cx, array_buffer_ret);\n  JS::RootedObject array_buffer_promise(cx, JS::CallOriginalPromiseResolve(cx, array_buffer));\n  if (!array_buffer_promise) {\n    return false;\n  }\n\n  JS::RootedObject fastly_body(\n      cx, FastlyBody::create(cx, reinterpret_cast<uint32_t>(into_body.handle)));\n  if (!fastly_body) {\n    return false;\n  }\n\n  JS::RootedObject response_array_buffer_then_obj(\n      cx, create_internal_method<apply_body_transform_response_array_buffer_then>(cx, fastly_body,\n                                                                                  response));\n  if (!response_array_buffer_then_obj) {\n    return false;\n  }\n  JS::RootedObject catch_handler_obj(\n      cx, create_internal_method<apply_body_transform_catch_handler>(cx, fastly_body, response));\n  if (!catch_handler_obj) {\n    return false;\n  }\n\n  JS::RootedObject body_transform_promise(\n      cx, JS::CallOriginalPromiseThen(cx, array_buffer_promise, response_array_buffer_then_obj,\n                                      nullptr));\n  if (!body_transform_promise) {\n    return false;\n  }\n\n  JS::RootedObject body_transform_promise_with_exception_handling(\n      cx, JS::CallOriginalPromiseThen(cx, body_transform_promise, nullptr, catch_handler_obj));\n  if (!body_transform_promise_with_exception_handling) {\n    return false;\n  }\n\n  ret_promise.set(body_transform_promise_with_exception_handling);\n\n  return true;\n\n  // Ideally we would support transform streams here in future...\n  // // Create the stream source from the response body\n  // JS::RootedObject body_stream_in(cx, RequestOrResponse::create_body_stream(cx, response));\n  // if (!body_stream_in) {\n  //   return false;\n  // }\n\n  // // Create the transform stream, and extract its readable and writable end objects\n  // JS::RootedValue transform_stream(\n  //     cx,\n  //     JS::GetReservedSlot(response,\n  //     static_cast<uint32_t>(Response::Slots::CacheBodyTransform)));\n  // JS::RootedObject transform_stream_obj(cx, &transform_stream.toObject());\n  // JS::RootedValue transform_readable(cx);\n  // if (!JS_GetProperty(cx, transform_stream_obj, \"readable\", &transform_readable)) {\n  //   return false;\n  // }\n\n  // JS::RootedValue transform_writable(cx);\n  // if (!JS_GetProperty(cx, transform_stream_obj, \"writable\", &transform_writable)) {\n  //   return false;\n  // }\n\n  // // Pipe the incoming body stream into the writable end of the transform stream\n  // JS::RootedValueArray<1> args(cx);\n  // args[0].set(transform_writable);\n  // JS::RootedValue pipe_ret(cx);\n  // if (!JS::Call(cx, body_stream_in, \"pipeTo\", args, &pipe_ret)) {\n  //   return false;\n  // }\n\n  // // Pipe the readable end of the transform stream into the into_body, with the completion\n  // handler\n  // // on error or success\n\n  // JS::RootedObject fastly_body(\n  //     cx, FastlyBody::create(cx, reinterpret_cast<uint32_t>(into_body.handle)));\n  // if (!fastly_body) {\n  //   return false;\n  // }\n  // JS::RootedObject into_response(\n  //     cx, JS_NewObjectWithGivenProto(cx, &Response::class_, Response::proto_obj));\n  // if (!into_response) {\n  //   return false;\n  // }\n  // if (!Response::create(\n  //         cx, into_response, Response::response_handle(response), into_body, true, nullptr,\n  //         JS::GetReservedSlot(response, static_cast<uint32_t>(Slots::Backend)).toString())) {\n  //   return false;\n  // }\n  // JS::RootedObject body_stream(cx, RequestOrResponse::body_stream(self));\n  // if (!body_stream) {\n  //   body_stream = RequestOrResponse::create_body_stream(cx, self);\n  //   if (!body_stream)\n  //     return false;\n  // }\n  // // JS::RootedObject sink(cx, NativeStreamSink::create(cx, fastly_body,\n  // JS::UndefinedHandleValue,\n  // //                                                    body_sink_write_algorithm,\n  // //                                                    body_sink_close_algorithm,\n  // //                                                    body_sink_abort_algorithm));\n  // // if (!sink) {\n  // //   return false;\n  // // }\n  // JS::RootedObject transform_readable_obj(cx, &transform_readable.toObject());\n  // JS::RootedValueArray<1> pipeToArgs(cx);\n  // // pipeToArgs[0].setObject(*sink);\n  // pipeToArgs[0].setObject(*insert_response);\n  // JS::RootedValue pipe_promise(cx);\n  // if (!JS::Call(cx, transform_readable_obj, \"pipeTo\", pipeToArgs, &pipe_promise)) {\n  //   return false;\n  // }\n  // JS::RootedObject pipe_promise_obj(cx, &pipe_promise.toObject());\n\n  // if (then_or_catch_handler != nullptr) {\n  //   JS::RootedObject then_or_catch_handler_obj(\n  //       cx, create_internal_method<then_or_catch_handler>(cx, response));\n  //   if (!then_or_catch_handler_obj) {\n  //     return false;\n  //   }\n  //   if (!JS::AddPromiseReactions(cx, pipe_promise_obj, then_or_catch_handler_obj,\n  //                                then_or_catch_handler_obj)) {\n  //     return false;\n  //   }\n  // }\n  // return true;\n}\n\nbool background_cleanup_handler(JSContext *cx, JS::HandleObject request,\n                                JS::HandleValue promise_val, JS::CallArgs args) {\n  // we follow the Rust implementation calling \"close\" instead of \"transaction_abandon\" here\n  // this could be reconsidered in future if alternative semantics are required\n  RequestOrResponse::close_if_cache_entry(cx, request);\n  ENGINE->decr_event_loop_interest();\n  return true;\n}\n\nbool background_revalidation_then_handler(JSContext *cx, JS::HandleObject request,\n                                          JS::HandleValue extra, JS::CallArgs args) {\n  auto response = args.get(0);\n  RootedObject response_obj(cx, &response.toObject());\n  auto cache_entry = RequestOrResponse::take_cache_entry(response_obj, std::nullopt).value();\n  auto storage_action = Response::storage_action(response_obj).value();\n  auto cache_write_options = Response::override_cache_options(response_obj);\n  MOZ_ASSERT(cache_write_options);\n  // Mark interest as complete for this phase. We will create new event interest for the body\n  // streaming promise shortly if needed to simplify return and error paths in this function.\n  ENGINE->decr_event_loop_interest();\n  switch (storage_action) {\n  case host_api::HttpStorageAction::Insert: {\n    auto body_res = cache_entry.transaction_insert(Response::response_handle(response_obj),\n                                                   cache_write_options);\n    if (auto *err = body_res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return false;\n    }\n\n    auto body = body_res.unwrap();\n\n    if (!Response::has_body_transform(response_obj)) {\n      auto append_res = body.append(RequestOrResponse::body_handle(response_obj));\n\n      if (auto *err = append_res.to_err()) {\n        HANDLE_ERROR(cx, *err);\n        JSObject *promise = PromiseRejectedWithPendingError(cx);\n        if (!promise) {\n          return false;\n        }\n        args.rval().setObject(*promise);\n        return true;\n      }\n\n      auto close_res = body.close();\n      if (auto *err = close_res.to_err()) {\n        HANDLE_ERROR(cx, *err);\n        JSObject *promise = PromiseRejectedWithPendingError(cx);\n        if (!promise) {\n          return false;\n        }\n        args.rval().setObject(*promise);\n        return true;\n      }\n\n      return true;\n    }\n\n    JS::RootedObject ret_promise(cx);\n    if (!apply_body_transform(cx, response, body, &ret_promise)) {\n      return false;\n    }\n\n    JS::RootedObject then_or_catch_handler_obj(\n        cx, create_internal_method<background_cleanup_handler>(cx, response_obj));\n    if (!then_or_catch_handler_obj) {\n      return false;\n    }\n    if (!JS::AddPromiseReactions(cx, ret_promise, then_or_catch_handler_obj,\n                                 then_or_catch_handler_obj)) {\n      return false;\n    }\n\n    break;\n  }\n  case host_api::HttpStorageAction::Update: {\n    auto res = cache_entry.transaction_update(Response::response_handle(response_obj),\n                                              cache_write_options);\n    if (auto *err = res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return false;\n    }\n    break;\n  }\n  case host_api::HttpStorageAction::DoNotStore: {\n    auto res = cache_entry.transaction_abandon();\n    if (auto *err = res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return false;\n    }\n    break;\n  }\n  case host_api::HttpStorageAction::RecordUncacheable: {\n    auto res = cache_entry.transaction_record_not_cacheable(cache_write_options->max_age_ns.value(),\n                                                            cache_write_options->vary_rule);\n    if (auto *err = res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return false;\n    }\n    break;\n  }\n  default:\n    MOZ_ASSERT_UNREACHABLE();\n  }\n  return true;\n}\n\nstd::optional<JSObject *> get_found_response(JSContext *cx, host_api::HttpCacheEntry &cache_entry,\n                                             JS::HandleObject request,\n                                             JS::HandleValue maybe_candidate_response,\n                                             bool transform_for_client) {\n  auto found_res = cache_entry.get_found_response(transform_for_client);\n  if (auto *err = found_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return nullptr;\n  }\n  if (!found_res.unwrap().has_value()) {\n    return std::nullopt;\n  }\n  auto found = found_res.unwrap().value();\n  RootedObject response(cx, Response::create(cx, request, found));\n  if (!response) {\n    return nullptr;\n  }\n  // copy cache options from candidate response to response\n  host_api::HttpCacheWriteOptions *override_cache_options;\n  if (maybe_candidate_response.isObject()) {\n    override_cache_options =\n        Response::take_override_cache_options(&maybe_candidate_response.toObject());\n  } else {\n    // Perhaps we can consider making these hostcalls lazy, requires a Response state enum to know\n    // we are in a state we can do this and then keeping the cache handle around, where it is not\n    // yet clear if holding handles for longer periods on responses is okay.\n    override_cache_options = new host_api::HttpCacheWriteOptions();\n    auto age_res = cache_entry.get_age_ns();\n    if (auto *err = age_res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return nullptr;\n    }\n    override_cache_options->initial_age_ns = age_res.unwrap();\n    auto max_age_ns = cache_entry.get_max_age_ns();\n    if (auto *err = max_age_ns.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return nullptr;\n    }\n    override_cache_options->max_age_ns = max_age_ns.unwrap();\n    auto swr_res = cache_entry.get_stale_while_revalidate_ns();\n    if (auto *err = swr_res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return nullptr;\n    }\n    override_cache_options->stale_while_revalidate_ns = swr_res.unwrap();\n    auto length_res = cache_entry.get_length();\n    if (auto *err = length_res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return nullptr;\n    }\n    override_cache_options->length = length_res.unwrap();\n    auto sensitive_res = cache_entry.get_sensitive_data();\n    if (auto *err = sensitive_res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return nullptr;\n    }\n    override_cache_options->sensitive_data = sensitive_res.unwrap();\n    auto vary_res = cache_entry.get_vary_rule();\n    if (auto *err = vary_res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return nullptr;\n    }\n    override_cache_options->vary_rule = std::move(vary_res.unwrap());\n    auto surrogate_keys_res = cache_entry.get_surrogate_keys();\n    if (auto *err = surrogate_keys_res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return nullptr;\n    }\n    override_cache_options->surrogate_keys = std::move(surrogate_keys_res.unwrap());\n  }\n  JS::SetReservedSlot(response, static_cast<uint32_t>(Response::Slots::OverrideCacheWriteOptions),\n                      JS::PrivateValue(reinterpret_cast<uint32_t>(override_cache_options)));\n\n  return response;\n}\n\nbool stream_back_transform_fulfill(JSContext *cx, JS::HandleObject found_response,\n                                   JS::HandleValue extra, JS::CallArgs args) {\n  args.rval().setObject(*found_response);\n  return true;\n}\n\nbool stream_back_then_handler(JSContext *cx, JS::HandleObject request, JS::HandleValue extra,\n                              JS::CallArgs args) {\n  JS::RootedValue response(cx, args.get(0));\n  RootedObject response_obj(cx, &response.toObject());\n  auto cache_entry = RequestOrResponse::take_cache_entry(response_obj, false).value();\n  auto storage_action = Response::storage_action(response_obj).value();\n  // Override cache write options is set to the final cache write options at the end of the\n  // response process.\n  auto cache_write_options = Response::override_cache_options(response_obj);\n  MOZ_ASSERT(cache_write_options);\n  switch (storage_action) {\n  case host_api::HttpStorageAction::Insert: {\n    auto insert_res = cache_entry.transaction_insert_and_stream_back(\n        Response::response_handle(response_obj), cache_write_options);\n    if (auto *err = insert_res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return false;\n    }\n\n    auto [body, cache_entry] = insert_res.unwrap();\n\n    if (!Response::has_body_transform(response_obj)) {\n      auto append_res = body.append(RequestOrResponse::body_handle(response_obj));\n\n      if (auto *err = append_res.to_err()) {\n        HANDLE_ERROR(cx, *err);\n        JSObject *promise = PromiseRejectedWithPendingError(cx);\n        if (!promise) {\n          return false;\n        }\n        args.rval().setObject(*promise);\n        return true;\n      }\n\n      auto close_res = body.close();\n      if (auto *err = close_res.to_err()) {\n        HANDLE_ERROR(cx, *err);\n        JSObject *promise = PromiseRejectedWithPendingError(cx);\n        if (!promise) {\n          return false;\n        }\n        args.rval().setObject(*promise);\n        return true;\n      }\n\n      auto found_response = get_found_response(cx, cache_entry, request, response, false);\n      MOZ_ASSERT(found_response.has_value());\n      if (!found_response.value()) {\n        JSObject *promise = PromiseRejectedWithPendingError(cx);\n        if (!promise) {\n          return false;\n        }\n        args.rval().setObject(*promise);\n        return true;\n      }\n\n      // update response to be the new response, effectively disposing the candidate response\n      response_obj.set(found_response.value());\n\n      // Return cached response regardless of revalidation status\n      RootedObject response_promise(cx, JS::NewPromiseObject(cx, nullptr));\n      JS::RootedValue response_val(cx, JS::ObjectValue(*response_obj));\n      args.rval().setObject(*response_promise);\n      if (!JS::ResolvePromise(cx, response_promise, response_val)) {\n        return false;\n      }\n      break;\n    }\n\n    // Body transfom\n    // in order to stream from the response object we must unlock it\n    if (!Response::has_bodyless_status(response_obj)) {\n      JS::SetReservedSlot(response_obj, static_cast<size_t>(Response::Slots::HasBody),\n                          JS::TrueValue());\n    }\n\n    JS::RootedObject ret_promise(cx);\n    if (!apply_body_transform(cx, response, body, &ret_promise)) {\n      return false;\n    }\n\n    auto found_response = get_found_response(cx, cache_entry, request, response, false);\n    MOZ_ASSERT(found_response.has_value());\n    if (!found_response.value()) {\n      JSObject *promise = PromiseRejectedWithPendingError(cx);\n      if (!promise) {\n        return false;\n      }\n      args.rval().setObject(*promise);\n      return true;\n    }\n\n    JS::RootedObject found_response_obj(cx, found_response.value());\n    JS::RootedObject then_handler_obj(\n        cx, create_internal_method<stream_back_transform_fulfill>(cx, found_response_obj));\n    if (!then_handler_obj) {\n      return false;\n    }\n\n    JS::RootedObject final_promise(\n        cx, JS::CallOriginalPromiseThen(cx, ret_promise, then_handler_obj, nullptr));\n    if (!final_promise) {\n      return false;\n    }\n    args.rval().setObject(*final_promise);\n    break;\n  }\n  case host_api::HttpStorageAction::Update: {\n    auto update_res = cache_entry.transaction_update_and_return_fresh(\n        Response::response_handle(response_obj), cache_write_options);\n    if (auto *err = update_res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return false;\n    }\n    auto cache_entry = update_res.unwrap();\n\n    auto found_response = get_found_response(cx, cache_entry, request, response, true);\n    MOZ_ASSERT(found_response.has_value());\n    if (!found_response.value()) {\n      JSObject *promise = PromiseRejectedWithPendingError(cx);\n      if (!promise) {\n        return false;\n      }\n      args.rval().setObject(*promise);\n      return true;\n    }\n\n    // response becomes a new response\n    response_obj.set(found_response.value());\n\n    // Return cached response regardless of revalidation status\n    RootedObject response_promise(cx, JS::NewPromiseObject(cx, nullptr));\n    JS::RootedValue response_val(cx, JS::ObjectValue(*response_obj));\n    args.rval().setObject(*response_promise);\n    if (!JS::ResolvePromise(cx, response_promise, response_val)) {\n      return false;\n    }\n    break;\n  }\n  case host_api::HttpStorageAction::DoNotStore: {\n    // promote the CandidateResponse -> body is now readable\n    if (!Response::has_bodyless_status(response_obj)) {\n      JS::SetReservedSlot(response_obj, static_cast<size_t>(Response::Slots::HasBody),\n                          JS::TrueValue());\n    }\n    auto res = cache_entry.transaction_abandon();\n    if (auto *err = res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return false;\n    }\n    args.rval().setObject(*response_obj);\n    break;\n  }\n  case host_api::HttpStorageAction::RecordUncacheable: {\n    // promote the CandidateResponse -> body is now readable\n    if (!Response::has_bodyless_status(response_obj)) {\n      JS::SetReservedSlot(response_obj, static_cast<size_t>(Response::Slots::HasBody),\n                          JS::TrueValue());\n    }\n    auto res = cache_entry.transaction_record_not_cacheable(cache_write_options->max_age_ns.value(),\n                                                            cache_write_options->vary_rule);\n    if (auto *err = res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return false;\n    }\n    args.rval().setObject(*response_obj);\n    break;\n  }\n  default:\n    MOZ_ASSERT_UNREACHABLE();\n  }\n  // note the storage action on the final response, since the response went through the cache,\n  // distinct from responses that did not go through this cache lifecycle.\n  // TODO: work out why / if this is needed?\n  // JS::SetReservedSlot(response_obj, static_cast<uint32_t>(Response::Slots::StorageAction),\n  //                     JS::Int32Value(static_cast<uint32_t>(storage_action)));\n  // in all cases, we must add the fastly cache headers\n  if (!Response::add_fastly_cache_headers(cx, response_obj, request, cache_entry,\n                                          \"cached response\")) {\n    return false;\n  }\n  return true;\n}\n\nbool stream_back_catch_handler(JSContext *cx, JS::HandleObject request, JS::HandleValue promise_val,\n                               JS::CallArgs args) {\n  // we follow the Rust implementation calling \"close\" instead of \"transaction_abandon\" here\n  // this could be reconsidered in future if alternative semantics are required\n  if (!RequestOrResponse::close_if_cache_entry(cx, request)) {\n    return false;\n  }\n  // \"rethrow\" the streaming error\n  JS_SetPendingException(cx, args.get(0), JS::ExceptionStackBehavior::DoNotCapture);\n  return false;\n}\n\n} // namespace\n\nnamespace fastly::fetch {\n\napi::Engine *ENGINE;\n\n/**\n * The `fetch` global function\n * https://fetch.spec.whatwg.org/#fetch-method\n */\nbool fetch(JSContext *cx, unsigned argc, Value *vp) {\n  CallArgs args = CallArgsFromVp(argc, vp);\n\n  REQUEST_HANDLER_ONLY(\"fetch\")\n\n  if (!args.requireAtLeast(cx, \"fetch\", 1)) {\n    return ReturnPromiseRejectedWithPendingError(cx, args);\n  }\n\n  RootedObject requestInstance(\n      cx, JS_NewObjectWithGivenProto(cx, &Request::class_, Request::proto_obj));\n  if (!requestInstance) {\n    return false;\n  }\n\n  RootedObject request(cx, Request::create(cx, requestInstance, args[0], args.get(1)));\n  if (!request) {\n    return ReturnPromiseRejectedWithPendingError(cx, args);\n  }\n\n  // Determine if we should use guest-side caching\n  CachingMode caching_mode;\n  if (!get_caching_mode(cx, request, &caching_mode)) {\n    return false;\n  }\n  if (caching_mode == CachingMode::Host) {\n    DEBUG_LOG(\"HTTP Cache: Using traditional fetch without cache API\")\n    return fetch_send_body<CachingMode::Host>(cx, request, args.rval());\n  } else if (caching_mode == CachingMode::ImageOptimizer) {\n    return fetch_send_body<CachingMode::ImageOptimizer>(cx, request, args.rval());\n  }\n\n  // Check if request is actually cacheable\n  bool is_cacheable = false;\n  {\n    auto request_handle = Request::request_handle(request);\n    auto res = request_handle.is_cacheable();\n    if (auto *err = res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      JSObject *promise = PromiseRejectedWithPendingError(cx);\n      if (!promise) {\n        return false;\n      }\n      args.rval().setObject(*promise);\n      return true;\n    }\n    is_cacheable = res.unwrap();\n  }\n\n  // If not cacheable, fallback to non-caching path\n  if (!is_cacheable) {\n    DEBUG_LOG(\"HTTP Cache: Request not cacheable, using non-caching fetch\")\n    return fetch_send_body<CachingMode::Guest>(cx, request, args.rval());\n  }\n\n  // Lookup in cache\n  auto request_handle = Request::request_handle(request);\n\n  // Convert override cache key to span if present\n  std::vector<uint8_t> override_key_hash;\n  JS::RootedValue override_cache_key(\n      cx, JS::GetReservedSlot(request, static_cast<uint32_t>(Request::Slots::OverrideCacheKey)));\n  if (override_cache_key.isString()) {\n    auto override_key_str = core::encode(cx, override_cache_key);\n    override_key_hash.resize(32); // SHA256 produces 32 bytes\n    picosha2::hash256(override_key_str.ptr.get(),\n                      override_key_str.ptr.get() + override_key_str.size(),\n                      override_key_hash.begin(), override_key_hash.end());\n  }\n\n  auto transaction_res =\n      host_api::HttpCacheEntry::transaction_lookup(request_handle, override_key_hash);\n  if (auto *err = transaction_res.to_err()) {\n    DEBUG_LOG(\"HTTP Cache: Transaction lookup error\")\n    if (host_api::error_is_limit_exceeded(*err)) {\n      JS_ReportErrorASCII(cx, \"HTTP caching limit exceeded\");\n    } else {\n      HANDLE_ERROR(cx, *err);\n    }\n    JSObject *promise = PromiseRejectedWithPendingError(cx);\n    if (!promise) {\n      return false;\n    }\n    args.rval().setObject(*promise);\n    return true;\n  }\n  host_api::HttpCacheEntry cache_entry = transaction_res.unwrap();\n\n  // This forces synchronous lookups, but we should be able to abstract a new CacheLookupTask, which\n  // could be fully async based on its handle as an async select task handle, and then we could\n  // support multiple cache lookups in parallel together.\n  auto state_res = cache_entry.get_state();\n  if (auto *err = state_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    JSObject *promise = PromiseRejectedWithPendingError(cx);\n    if (!promise) {\n      return false;\n    }\n    args.rval().setObject(*promise);\n    return true;\n  }\n  auto cache_state = state_res.unwrap();\n  std::string state_str = std::to_string(cache_state.state);\n\n  // Check for usable cached response\n  JS::RootedValue no_candidate(cx);\n  auto maybe_response = get_found_response(cx, cache_entry, request, no_candidate, true);\n  if (maybe_response.has_value() && !maybe_response.value()) {\n    JSObject *promise = PromiseRejectedWithPendingError(cx);\n    if (!promise) {\n      return false;\n    }\n    args.rval().setObject(*promise);\n    return true;\n  }\n\n  if (maybe_response.has_value()) {\n    JS::RootedObject cached_response(cx, maybe_response.value());\n\n    if (cache_state.must_insert_or_update()) {\n      // Need to start background revalidation\n      // Queue async task to handle background cache revalidation, ensuring it blocks process\n      // completion\n      RootedValue background_revalidation_promise(cx);\n      if (!fetch_send_body_with_cache_hooks(cx, request, cache_entry,\n                                            &background_revalidation_promise)) {\n        RequestOrResponse::close_if_cache_entry(cx, request);\n        return false;\n      }\n      JS::RootedObject background_revalidation_promise_obj(\n          cx, &background_revalidation_promise.toObject());\n      JS::RootedObject ret_promise(\n          cx,\n          internal_method_then<background_revalidation_then_handler, background_cleanup_handler>(\n              cx, background_revalidation_promise_obj, request));\n      if (!ret_promise) {\n        RequestOrResponse::close_if_cache_entry(cx, request);\n        return false;\n      }\n      args.rval().setObject(*ret_promise);\n      JS::SetReservedSlot(request, static_cast<uint32_t>(Request::Slots::ResponsePromise),\n                          JS::ObjectValue(*ret_promise));\n      // keep the event loop alive until background revalidation completes or errors\n      ENGINE->incr_event_loop_interest();\n    } else {\n      if (!RequestOrResponse::close_if_cache_entry(cx, request)) {\n        return false;\n      }\n    }\n\n    // mark the response cache entry as cached for the cached getter\n    RequestOrResponse::take_cache_entry(cached_response, true);\n\n    // Return cached response regardless of revalidation status\n    if (!Response::add_fastly_cache_headers(cx, cached_response, request, cache_entry,\n                                            \"cached response\")) {\n      return false;\n    }\n\n    RootedObject response_promise(cx, JS::NewPromiseObject(cx, nullptr));\n    JS::RootedValue response_val(cx, JS::ObjectValue(*cached_response));\n    args.rval().setObject(*response_promise);\n    return JS::ResolvePromise(cx, response_promise, response_val);\n  }\n\n  // No valid cached response, need to make backend request\n  if (!cache_state.must_insert_or_update()) {\n    // transaction entry is done\n    if (!RequestOrResponse::close_if_cache_entry(cx, request)) {\n      return false;\n    }\n    // request collapsing has been disabled: pass the original request to the origin without\n    // updating the cache and without caching\n    return fetch_send_body<CachingMode::Guest>(cx, request, args.rval());\n  } else {\n    JS::RootedValue stream_back_promise(cx, JS::ObjectValue(*JS::NewPromiseObject(cx, nullptr)));\n    if (!fetch_send_body_with_cache_hooks(cx, request, cache_entry, &stream_back_promise)) {\n      RequestOrResponse::close_if_cache_entry(cx, request);\n      return false;\n    }\n    JS::RootedObject stream_back_promise_obj(cx, &stream_back_promise.toObject());\n    JS::RootedObject ret_promise(\n        cx, internal_method_then<stream_back_then_handler, stream_back_catch_handler>(\n                cx, stream_back_promise_obj, request));\n    if (!ret_promise) {\n      RequestOrResponse::close_if_cache_entry(cx, request);\n      return false;\n    }\n    JS::SetReservedSlot(request, static_cast<uint32_t>(Request::Slots::ResponsePromise),\n                        JS::ObjectValue(*ret_promise));\n    args.rval().setObject(*ret_promise);\n  }\n\n  return true;\n}\n\nconst JSFunctionSpec methods[] = {JS_FN(\"fetch\", fetch, 2, JSPROP_ENUMERATE), JS_FS_END};\n\nbool install(api::Engine *engine) {\n  ENGINE = engine;\n  if (!JS_DefineFunctions(engine->cx(), engine->global(), methods)) {\n    return false;\n  }\n  if (!Request::init_class(ENGINE->cx(), ENGINE->global())) {\n    return false;\n  }\n  if (!Response::init_class(ENGINE->cx(), ENGINE->global())) {\n    return false;\n  }\n  if (!builtins::web::fetch::Headers::init_class(ENGINE->cx(), ENGINE->global())) {\n    return false;\n  }\n  return true;\n}\n\n} // namespace fastly::fetch\n"
  },
  {
    "path": "runtime/fastly/builtins/fetch/fetch.h",
    "content": "#include \"../../../StarlingMonkey/builtins/web/fetch/headers.h\"\n#include \"request-response.h\"\n\nnamespace fastly::fetch {\nextern api::Engine *ENGINE;\nextern bool http_caching_unsupported;\n} // namespace fastly::fetch\n"
  },
  {
    "path": "runtime/fastly/builtins/fetch/request-response.cpp",
    "content": "#include \"request-response.h\"\n#include \"../../../StarlingMonkey/builtins/web/base64.h\"\n#include \"../../../StarlingMonkey/builtins/web/blob.h\"\n#include \"../../../StarlingMonkey/builtins/web/form-data/form-data-encoder.h\"\n#include \"../../../StarlingMonkey/builtins/web/form-data/form-data-parser.h\"\n#include \"../../../StarlingMonkey/builtins/web/form-data/form-data.h\"\n\n#include \"../../../StarlingMonkey/builtins/web/dom-exception.h\"\n#include \"../../../StarlingMonkey/builtins/web/fetch/fetch-errors.h\"\n#include \"../../../StarlingMonkey/builtins/web/fetch/fetch-utils.h\"\n#include \"../../../StarlingMonkey/builtins/web/streams/native-stream-source.h\"\n#include \"../../../StarlingMonkey/builtins/web/streams/transform-stream.h\"\n#include \"../../../StarlingMonkey/builtins/web/url.h\"\n#include \"../../../StarlingMonkey/builtins/web/worker-location.h\"\n#include \"../../../StarlingMonkey/runtime/encode.h\"\n#include \"../../common/ip_octets_to_js_string.h\"\n#include \"../../common/normalize_http_method.h\"\n#include \"../backend.h\"\n#include \"../cache-core.h\"\n#include \"../cache-override.h\"\n#include \"../cache-simple.h\"\n#include \"../fastly.h\"\n#include \"../fetch-event.h\"\n#include \"../image-optimizer.h\"\n#include \"../kv-store.h\"\n#include \"extension-api.h\"\n#include \"fetch.h\"\n#include \"mozilla/ResultVariant.h\"\n\n#include \"js/Array.h\"\n#include \"js/ArrayBuffer.h\"\n#include \"js/Conversions.h\"\n#include \"js/JSON.h\"\n#include \"js/Stream.h\"\n#include \"picosha2.h\"\n#include <algorithm>\n#include <vector>\n\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Winvalid-offsetof\"\n#include \"js/experimental/TypedData.h\"\n#include <allocator.h>\n#pragma clang diagnostic pop\n\nusing builtins::web::blob::Blob;\nusing builtins::web::form_data::FormData;\nusing builtins::web::form_data::MultipartFormData;\n\nusing namespace std::literals;\n\nusing builtins::web::base64::valueToJSByteString;\nusing builtins::web::dom_exception::DOMException;\nusing builtins::web::form_data::FormData;\nusing builtins::web::form_data::FormDataParser;\nusing builtins::web::form_data::MultipartFormData;\n\n// We use the StarlingMonkey Headers implementation, despite it supporting features that we do\n// not - specifically the ability to construct headers unassociated with requests and responses.\n//\n// StarlingMonkey only relies on this property for one state transition - the one from ContentOnly\n// to CachedInContent. And this state transition is only called from the `handle_clone()` function.\n//\n// We therefore never use handle_clone() and support the same functionality by implementing a new\n// Request::commit_headers and Response::commit_headers for committing ContentOnly headers into\n// a given Request or Response headers handle.\n//\n// Further, to verify we never call the ContentOnly to CachedInContent state transition, we\n// implement its host API call of host_api::HttpHeaders::FromEntries as a release unreachable\n// assert.\nusing builtins::web::fetch::Headers;\n\nusing builtins::web::streams::NativeStreamSource;\nusing builtins::web::streams::TransformStream;\nusing builtins::web::url::URL;\nusing builtins::web::url::URLSearchParams;\nusing builtins::web::worker_location::WorkerLocation;\nusing fastly::FastlyGetErrorMessage;\nusing fastly::backend::Backend;\nusing fastly::cache_core::CacheEntry;\nusing fastly::cache_override::CacheOverride;\nusing fastly::cache_simple::SimpleCacheEntry;\nusing fastly::fetch_event::FetchEvent;\nusing fastly::kv_store::KVStoreEntry;\n\nnamespace builtins::web::streams {\n\nbool NativeStreamSource::stream_is_body(JSContext *cx, JS::HandleObject stream) {\n  JSObject *stream_source = get_stream_source(cx, stream);\n  return NativeStreamSource::is_instance(stream_source) &&\n         fastly::fetch::RequestOrResponse::is_instance(owner(stream_source));\n}\n\n} // namespace builtins::web::streams\n\nnamespace fastly::fetch {\n\nnamespace {\nbool error_stream_controller_with_pending_exception(JSContext *cx, JS::HandleObject stream) {\n  JS::RootedValue exn(cx);\n  if (!JS_GetPendingException(cx, &exn))\n    return false;\n  JS_ClearPendingException(cx);\n\n  RootedValue args(cx);\n  args.set(exn);\n  return JS::ReadableStreamError(cx, stream, args);\n}\n\nconstexpr size_t HANDLE_READ_CHUNK_SIZE = 8192;\n\nvoid set_up_shortcutting(JSContext *cx, JS::HandleObject stream, JS::HandleObject to) {\n  // This function is part of a web of code that allows requests and responses\n  // to \"shortcut\" pipelines down to simple host-side operations, without having\n  // to actually pipe data through to javascript. This covers one of the various\n  // scenarios. Another place to look is `maybe_shortcut_transform_stream_read`.\n  // Part of the reason for having this complexity on our end is so we don't\n  // have to patch StarlingMonkey to get all this working, since it's a Fastly\n  // optimization.\n  JS::RootedObject stream_source(cx, NativeStreamSource::get_stream_source(cx, stream));\n  JS::RootedObject source_owner(cx, NativeStreamSource::owner(stream_source));\n\n  auto body = RequestOrResponse::body_handle(source_owner);\n  JS::SetReservedSlot(to, static_cast<uint32_t>(RequestOrResponse::Slots::Body),\n                      JS::Int32Value(body.handle));\n  JS::SetReservedSlot(to, static_cast<uint32_t>(RequestOrResponse::Slots::SourceRequest),\n                      JS::ObjectValue(*source_owner));\n  // Ensure that we take the right steps for shortcutting operations on\n  // TransformStreams later on.\n  if (TransformStream::is_ts_readable(cx, stream)) {\n    // But only if the TransformStream isn't used as a mixin by other\n    // builtins.\n    if (!TransformStream::used_as_mixin(TransformStream::ts_from_readable(cx, stream))) {\n      TransformStream::set_readable_used_as_body(cx, stream, to);\n    }\n  }\n}\n\nbool maybe_shortcut_transform_stream_read(JSContext *cx, JS::HandleObject streamSource,\n                                          JS::HandleObject body_owner, bool *shortcutted) {\n  // If the stream has been piped to a TransformStream whose readable end was\n  // then passed to a Request or Response as the body, we can just append the\n  // entire source body to the destination using a single native hostcall, and\n  // then close the source stream, instead of reading and writing it in\n  // individual chunks. Note that even in situations where multiple streams are\n  // piped to the same destination this is guaranteed to happen in the right\n  // order: ReadableStream#pipeTo locks the destination WritableStream until the\n  // source ReadableStream is closed/canceled, so only one stream can ever be\n  // piped in at the same time. There may be a chain of TransformStreams in\n  // between the source and destination, so we walk the piping chain to find the\n  // final destination.\n  JS::RootedObject pipe_dest(cx, NativeStreamSource::piped_to_transform_stream(streamSource));\n  if (pipe_dest) {\n    *shortcutted = true;\n    // Walk the chain of TransformStreams to find the final destination\n    JS::RootedObject current_dest(cx, pipe_dest);\n    JS::RootedObject next_dest(cx);\n\n    while (current_dest) {\n      // Try to find the next TransformStream in the chain\n      JS::RootedObject readable(cx, TransformStream::readable(current_dest));\n      JS::RootedObject next_source(cx, NativeStreamSource::get_stream_source(cx, readable));\n      if (next_source) {\n        next_dest.set(NativeStreamSource::piped_to_transform_stream(next_source));\n      } else {\n        next_dest.set(nullptr);\n      }\n\n      // If there's no next destination, we've found the last one in the chain\n      if (!next_dest) {\n        // If this is used as a body, we can append directly and close\n        if (TransformStream::readable_used_as_body(current_dest)) {\n          JS::RootedObject dest_owner(cx, TransformStream::owner(current_dest));\n          if (!RequestOrResponse::append_body(cx, dest_owner, body_owner)) {\n            return false;\n          }\n\n          JS::RootedObject stream(cx, NativeStreamSource::stream(streamSource));\n          bool success = JS::ReadableStreamClose(cx, stream);\n          MOZ_RELEASE_ASSERT(success);\n\n          return true;\n        }\n        // If the last one isn't used as a body it must be doing something else with\n        // the data, so we fall back to reading and writing chunks as normal\n        *shortcutted = false;\n        break;\n      }\n\n      current_dest.set(next_dest);\n    }\n  }\n\n  // Fallback: check stored source reference when pipe chain is broken by async operations\n  if (!*shortcutted && RequestOrResponse::is_instance(body_owner)) {\n    JS::Value source_request_val = JS::GetReservedSlot(\n        body_owner, static_cast<uint32_t>(RequestOrResponse::Slots::SourceRequest));\n\n    if (source_request_val.isObject()) {\n      JS::RootedObject source_request(cx, &source_request_val.toObject());\n\n      while (source_request) {\n        JS::RootedObject source_stream(cx, RequestOrResponse::body_stream(source_request));\n\n        if (source_stream && NativeStreamSource::stream_is_body(cx, source_stream)) {\n          if (!RequestOrResponse::append_body(cx, body_owner, source_request)) {\n            return false;\n          }\n\n          bool success = JS::ReadableStreamClose(cx, source_stream);\n          MOZ_RELEASE_ASSERT(success);\n\n          *shortcutted = true;\n          return true;\n        }\n\n        // Follow chained Request sources\n        JS::Value next_source_val = JS::GetReservedSlot(\n            source_request, static_cast<uint32_t>(RequestOrResponse::Slots::SourceRequest));\n\n        if (next_source_val.isObject()) {\n          source_request = &next_source_val.toObject();\n        } else {\n          break;\n        }\n      }\n    }\n  }\n\n  return true;\n}\n\nbool process_body_read(JSContext *cx, host_api::HttpBody::Handle handle, JS::HandleObject context,\n                       JS::HandleValue body_owner) {\n  MOZ_ASSERT(context);\n  JS::RootedObject streamSource(cx, context);\n  MOZ_ASSERT(NativeStreamSource::is_instance(streamSource));\n  host_api::HttpBody body(handle);\n  JS::RootedObject owner(cx, NativeStreamSource::owner(streamSource));\n  JS::RootedObject stream(cx, NativeStreamSource::stream(streamSource));\n\n  bool shortcutted = false;\n  JS::RootedObject body_owner_obj(cx, &body_owner.toObject());\n  if (!maybe_shortcut_transform_stream_read(cx, streamSource, body_owner_obj, &shortcutted)) {\n    return false;\n  }\n  if (shortcutted) {\n    return true;\n  }\n\n  auto read_res = body.read(HANDLE_READ_CHUNK_SIZE);\n  if (auto *err = read_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return error_stream_controller_with_pending_exception(cx, stream);\n  }\n\n  auto &chunk = read_res.unwrap();\n  if (chunk.len == 0) {\n    JS::RootedValue r(cx);\n    return JS::ReadableStreamClose(cx, stream);\n  }\n\n  // We don't release control of chunk's data until after we've checked that the array buffer\n  // allocation has been successful, as that ensures that the return path frees chunk automatically\n  // when necessary.\n  JS::RootedObject buffer(\n      cx, JS::NewArrayBufferWithContents(cx, chunk.len, chunk.ptr.get(),\n                                         JS::NewArrayBufferOutOfMemory::CallerMustFreeMemory));\n  if (!buffer) {\n    return error_stream_controller_with_pending_exception(cx, stream);\n  }\n\n  // At this point `buffer` has taken full ownership of the chunk's data.\n  std::ignore = chunk.ptr.release();\n\n  JS::RootedObject byte_array(cx, JS_NewUint8ArrayWithBuffer(cx, buffer, 0, chunk.len));\n  if (!byte_array) {\n    return false;\n  }\n\n  RootedValue enqueue_val(cx);\n  enqueue_val.setObject(*byte_array);\n  if (!JS::ReadableStreamEnqueue(cx, stream, enqueue_val)) {\n    return error_stream_controller_with_pending_exception(cx, stream);\n  }\n\n  return true;\n}\n\nenum StreamState { Complete, Wait, Error };\n\nstruct ReadResult {\n  JS::UniqueChars buffer;\n  size_t length;\n  StreamState state;\n};\n\n// Returns a UniqueChars and the length of that string. The UniqueChars value is not\n// null-terminated.\ntemplate <bool async> ReadResult read_from_handle_all(JSContext *cx, host_api::HttpBody body) {\n  std::vector<host_api::HostString> chunks;\n  size_t bytes_read = 0;\n  bool end_of_stream = true;\n  while (true) {\n    if (async) {\n      auto ready_res = body.is_ready();\n      if (auto *err = ready_res.to_err()) {\n        HANDLE_ERROR(cx, *err);\n        return {nullptr, 0, StreamState::Error};\n      }\n      if (!ready_res.unwrap()) {\n        end_of_stream = false;\n        break;\n      }\n    }\n    auto res = body.read(HANDLE_READ_CHUNK_SIZE);\n    if (auto *err = res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return {nullptr, 0, StreamState::Error};\n    }\n\n    auto &chunk = res.unwrap();\n    if (chunk.len == 0) {\n      break;\n    }\n\n    bytes_read += chunk.len;\n    chunks.emplace_back(std::move(chunk));\n  }\n\n  JS::UniqueChars buf;\n  if (chunks.size() == 0) {\n    return {nullptr, 0, end_of_stream ? StreamState::Complete : StreamState::Wait};\n  } else if (chunks.size() == 1) {\n    // If there was only one chunk read, reuse that allocation.\n    auto &chunk = chunks.back();\n    buf = std::move(chunk.ptr);\n  } else {\n    // If there wasn't exactly one chunk read, we'll need to allocate a buffer to store the results.\n    buf.reset(static_cast<char *>(JS_string_malloc(cx, bytes_read)));\n    if (!buf) {\n      JS_ReportOutOfMemory(cx);\n      return {nullptr, 0, StreamState::Error};\n    }\n\n    char *end = buf.get();\n    for (auto &chunk : chunks) {\n      end = std::copy(chunk.ptr.get(), chunk.ptr.get() + chunk.len, end);\n    }\n  }\n\n  return {std::move(buf), bytes_read, end_of_stream ? StreamState::Complete : StreamState::Wait};\n}\n\n} // namespace\n\nbool Response::has_body_transform(JSObject *self) {\n  return !JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::CacheBodyTransform)).isUndefined();\n}\n\nbool Response::add_fastly_cache_headers(JSContext *cx, JS::HandleObject self,\n                                        JS::HandleObject request,\n                                        std::optional<host_api::HttpCacheEntry> cache_entry,\n                                        const char *fun_name) {\n  MOZ_ASSERT(Response::is_instance(self));\n  // Get response headers object\n  RootedObject headers(cx, Response::headers(cx, self));\n  if (!headers) {\n    return false;\n  }\n  JS::RootedObject headers_val(cx, headers);\n\n  // Get cache handle and hits\n  RootedValue res(cx);\n  bool found = false;\n  bool stale = false;\n  if (cache_entry.has_value()) {\n    auto state_res = cache_entry->get_state();\n    if (auto *err = state_res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return false;\n    }\n    if (state_res.unwrap().is_found()) {\n      found = true;\n      stale = state_res.unwrap().is_stale();\n      auto hits_res = cache_entry->get_hits();\n      if (auto *err = hits_res.to_err()) {\n        HANDLE_ERROR(cx, *err);\n        return false;\n      }\n      uint64_t hits = hits_res.unwrap();\n\n      JS::RootedString hit_str(cx, JS_NewStringCopyZ(cx, \"HIT\"));\n      JS::RootedValue hit_str_val(cx, JS::StringValue(hit_str));\n      JS::RootedValueArray<2> args(cx);\n      args[0].setString(JS_NewStringCopyZ(cx, \"x-cache\"));\n      args[1].set(hit_str_val);\n      if (!JS::Call(cx, headers_val, \"set\", args, &res)) {\n        return false;\n      }\n\n      std::string hits_str = std::to_string(hits);\n      args[0].setString(JS_NewStringCopyZ(cx, \"x-cache-hits\"));\n      args[1].setString(JS_NewStringCopyN(cx, hits_str.c_str(), hits_str.length()));\n      if (!JS::Call(cx, headers_val, \"set\", args, &res)) {\n        return false;\n      }\n    }\n  }\n  // Mark cached: found on the response, via the CacheEntry = boolean Response-phase convention slot\n  // reuse (the cache handle was released from the response, promoting it from a CandidateResponse\n  // to a response by the time we get here, which is why it's passed as an optional argument)\n  JS::SetReservedSlot(self, static_cast<uint32_t>(Slots::CacheEntry),\n                      found && stale ? JS::NullValue() : JS::BooleanValue(found));\n  if (!found) {\n    JS::RootedValueArray<2> args(cx);\n\n    args[0].setString(JS_NewStringCopyZ(cx, \"x-cache\"));\n    args[1].setString(JS_NewStringCopyZ(cx, \"MISS\"));\n    if (!JS::Call(cx, headers_val, \"set\", args, &res)) {\n      return false;\n    }\n\n    args[0].setString(JS_NewStringCopyZ(cx, \"x-cache-hits\"));\n    args[1].setString(JS_NewStringCopyZ(cx, \"0\"));\n    if (!JS::Call(cx, headers_val, \"set\", args, &res)) {\n      return false;\n    }\n  }\n\n  // Rest of the function handling surrogate headers remains the same\n  JSObject *request_headers = Request::headers(cx, request);\n  if (!request_headers) {\n    return false;\n  }\n  JS::RootedObject request_headers_val(cx, request_headers);\n\n  JS::RootedValueArray<1> args(cx);\n\n  args[0].setString(JS_NewStringCopyZ(cx, \"Fastly-FF\"));\n  if (!JS::Call(cx, request_headers_val, \"get\", args, &res)) {\n    return false;\n  }\n  bool ff_exists = !res.isUndefined();\n\n  args[0].setString(JS_NewStringCopyZ(cx, \"Fastly-Debug\"));\n  if (!JS::Call(cx, request_headers_val, \"get\", args, &res)) {\n    return false;\n  }\n  bool debug_exists = !res.isUndefined();\n\n  if (!ff_exists && !debug_exists) {\n    JS::RootedValue delete_func(cx);\n    if (!JS_GetProperty(cx, headers_val, \"delete\", &delete_func)) {\n      return false;\n    }\n    {\n      JS::RootedString key_str(cx, JS_NewStringCopyZ(cx, \"Surrogate-Key\"));\n      JS::RootedValue key_val(cx, JS::StringValue(key_str));\n      JS::RootedValue rval(cx);\n      if (!JS::Call(cx, headers_val, delete_func, JS::HandleValueArray(key_val), &rval)) {\n        return false;\n      }\n    }\n    {\n      JS::RootedString key_str(cx, JS_NewStringCopyZ(cx, \"Surrogate-Control\"));\n      JS::RootedValue key_val(cx, JS::StringValue(key_str));\n      JS::RootedValue rval(cx);\n      if (!JS::Call(cx, headers_val, delete_func, JS::HandleValueArray(key_val), &rval)) {\n        return false;\n      }\n    }\n  }\n\n  return true;\n}\n\nbool after_send_then(JSContext *cx, JS::HandleObject response, JS::HandleValue promise,\n                     JS::CallArgs args) {\n  JS::RootedObject promise_obj(cx, &promise.toObject());\n\n  JS::RootedValue after_send_ret(cx, args.get(0));\n  if (!after_send_ret.isNullOrUndefined()) {\n    if (!after_send_ret.isObject()) {\n      api::throw_error(cx, api::Errors::TypeError, \"Request cache hook\", \"afterSend()\",\n                       \"return either undefined or an object\");\n      return RejectPromiseWithPendingError(cx, promise_obj);\n    }\n\n    JS::RootedObject after_send_obj(cx, &after_send_ret.toObject());\n\n    JS::RootedValue cache_val(cx);\n    if (!JS_GetProperty(cx, after_send_obj, \"cache\", &cache_val)) {\n      return RejectPromiseWithPendingError(cx, promise_obj);\n    }\n\n    // set_cacheable / set_uncacheable\n    if (cache_val.isBoolean()) {\n      if (cache_val.toBoolean()) {\n        if (static_cast<host_api::HttpStorageAction>(\n                JS::GetReservedSlot(response, static_cast<uint32_t>(Response::Slots::StorageAction))\n                    .toInt32()) != host_api::HttpStorageAction::Update) {\n          JS::SetReservedSlot(\n              response, static_cast<uint32_t>(Response::Slots::StorageAction),\n              JS::Int32Value(static_cast<uint32_t>(host_api::HttpStorageAction::Insert)));\n        }\n      } else {\n        JS::SetReservedSlot(\n            response, static_cast<uint32_t>(Response::Slots::StorageAction),\n            JS::Int32Value(static_cast<uint32_t>(host_api::HttpStorageAction::DoNotStore)));\n      }\n    } else if (cache_val.isString()) {\n      bool is_uncacheable = false;\n      if (!JS_StringEqualsLiteral(cx, cache_val.toString(), \"uncacheable\", &is_uncacheable)) {\n        return false;\n      }\n      if (!is_uncacheable) {\n        api::throw_error(cx, api::Errors::TypeError, \"Request cache hook\", \"afterSend()\",\n                         \"return a \\'cache\\' property value 'uncacheable' when set to a string\");\n        return RejectPromiseWithPendingError(cx, promise_obj);\n      }\n      JS::SetReservedSlot(\n          response, static_cast<uint32_t>(Response::Slots::StorageAction),\n          JS::Int32Value(static_cast<uint32_t>(host_api::HttpStorageAction::RecordUncacheable)));\n    } else if (!cache_val.isUndefined()) {\n      api::throw_error(cx, api::Errors::TypeError, \"Request cache hook\", \"afterSend()\",\n                       \"return a 'cache' property as either a string or boolean\");\n      return RejectPromiseWithPendingError(cx, promise_obj);\n    }\n\n    // set_body_transform\n    JS::RootedValue body_transform_val(cx);\n    if (!JS_GetProperty(cx, after_send_obj, \"bodyTransformFn\", &body_transform_val)) {\n      return RejectPromiseWithPendingError(cx, promise_obj);\n    }\n    if (!body_transform_val.isUndefined()) {\n      bool valid_function = false;\n      if (body_transform_val.isObject()) {\n        JS::RootedObject body_transform_obj(cx, &body_transform_val.toObject());\n        if (JS_ObjectIsFunction(body_transform_obj)) {\n          valid_function = true;\n          JS::SetReservedSlot(response, static_cast<uint32_t>(Response::Slots::CacheBodyTransform),\n                              body_transform_val);\n        }\n      }\n      if (!valid_function) {\n        api::throw_error(cx, api::Errors::TypeError, \"Request cache hook\", \"afterSend()\",\n                         \"return a 'bodyTransformFn' property that is a function\");\n        return RejectPromiseWithPendingError(cx, promise_obj);\n      }\n    }\n  }\n\n  // we set the override cache write options to the final computation, which will then immediately\n  // be used for the transaction insertion, after which it will be cleared.\n  auto cache_write_options = Response::override_cache_options(response);\n  auto suggested_cache_write_options = Response::suggested_cache_options(cx, response);\n  if (!suggested_cache_write_options) {\n    return RejectPromiseWithPendingError(cx, promise_obj);\n  }\n  if (!suggested_cache_write_options->initial_age_ns.has_value()) {\n    return RejectPromiseWithPendingError(cx, promise_obj);\n  }\n  cache_write_options->initial_age_ns = suggested_cache_write_options->initial_age_ns.value();\n  if (!cache_write_options->max_age_ns.has_value()) {\n    cache_write_options->max_age_ns = suggested_cache_write_options->max_age_ns;\n  }\n  if (!cache_write_options->stale_while_revalidate_ns.has_value()) {\n    cache_write_options->stale_while_revalidate_ns =\n        suggested_cache_write_options->stale_while_revalidate_ns;\n  }\n  if (!cache_write_options->surrogate_keys.has_value()) {\n    cache_write_options->surrogate_keys = std::move(suggested_cache_write_options->surrogate_keys);\n  }\n  if (!cache_write_options->vary_rule.has_value()) {\n    cache_write_options->vary_rule = std::move(suggested_cache_write_options->vary_rule);\n  }\n  if (!cache_write_options->sensitive_data.has_value()) {\n    cache_write_options->sensitive_data = suggested_cache_write_options->sensitive_data;\n  }\n  // we can set the length if there is no body transform\n  if (!Response::has_body_transform(response)) {\n    auto length_res = RequestOrResponse::body_handle(response).known_length();\n    if (auto *err = length_res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return RejectPromiseWithPendingError(cx, promise_obj);\n    }\n    cache_write_options->length = length_res.unwrap();\n  }\n\n  delete suggested_cache_write_options;\n  JS::SetReservedSlot(response, static_cast<uint32_t>(Response::Slots::SuggestedCacheWriteOptions),\n                      JS::UndefinedValue());\n\n  JS::RootedValue response_val(cx, JS::ObjectValue(*response));\n  JS::ResolvePromise(cx, promise_obj, response_val);\n  return true;\n}\n\nbool after_send_catch(JSContext *cx, JS::HandleObject response, JS::HandleValue promise,\n                      JS::CallArgs args) {\n  JS::RootedObject promise_obj(cx, &promise.toObject());\n  if (!RequestOrResponse::close_if_cache_entry(cx, response)) {\n    return false;\n  }\n  JS::RejectPromise(cx, promise_obj, args.get(0));\n  return true;\n}\n\nbool RequestOrResponse::process_pending_request(JSContext *cx,\n                                                host_api::HttpPendingReq::Handle handle,\n                                                JS::HandleObject request, JS::HandleValue promise) {\n  MOZ_ASSERT(Request::is_instance(request));\n  host_api::HttpPendingReq pending(handle);\n  JS::RootedObject promise_obj(cx, &promise.toObject());\n  auto res_res = pending.wait();\n  if (auto *err = res_res.to_err()) {\n    std::string message = std::move(err->message()).value_or(\"when attempting to fetch resource.\");\n    DOMException::raise(cx, message, \"NetworkError\");\n    return RejectPromiseWithPendingError(cx, promise_obj);\n  }\n\n  auto res = res_res.unwrap();\n\n  std::optional<host_api::HttpCacheEntry> maybe_cache_entry =\n      RequestOrResponse::cache_entry(request);\n\n  if (!maybe_cache_entry) {\n    JS::RootedObject response(cx, Response::create(cx, request, res));\n\n    // For a request made without caching (via the Request cache handle false convention), we must\n    // add fastly headers to the Response\n    auto maybe_not_cached = JS::GetReservedSlot(request, static_cast<uint32_t>(Slots::CacheEntry));\n    if (maybe_not_cached.isBoolean() && maybe_not_cached.toBoolean() == false) {\n      if (!Response::add_fastly_cache_headers(cx, response, request, std::nullopt,\n                                              \"cached response\")) {\n        return false;\n      }\n    }\n\n    JS::RootedValue response_val(cx, JS::ObjectValue(*response));\n    return JS::ResolvePromise(cx, promise_obj, response_val);\n  }\n\n  // after_send lifecycle implementation for a response generated from a request with a cache entry\n  auto cache_entry = maybe_cache_entry.value();\n  auto suggested_res = cache_entry.prepare_response_for_storage(res.resp);\n  if (auto *err = suggested_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return RejectPromiseWithPendingError(cx, promise_obj);\n  }\n\n  auto suggested = suggested_res.unwrap();\n\n  auto &[suggested_storage_action, suggested_resp] = suggested;\n  // The suggested storage response overrides the original response handle, while retaining the\n  // body handle (i.e. it just gives new headers).\n  res.resp = suggested_resp;\n\n  // create the candidate response\n  JS::RootedObject response(cx, Response::create(cx, request, res));\n\n  // Fastly-specific heuristic: by default, we do not cache responses that set cookies\n  RootedValue result(cx);\n  JS::RootedObject headers(cx, Response::headers(cx, response));\n  MOZ_ASSERT(headers);\n  JS::RootedValueArray<1> args(cx);\n  JS::RootedString set_cookie_str(cx, JS_NewStringCopyZ(cx, \"set-cookie\"));\n  args[0].setString(set_cookie_str);\n  if (!JS::Call(cx, headers, \"has\", args, &result)) {\n    return false;\n  }\n  if (result.isBoolean() && result.toBoolean() == true &&\n      suggested_storage_action != host_api::HttpStorageAction::DoNotStore) {\n    suggested_storage_action = host_api::HttpStorageAction::RecordUncacheable;\n  }\n\n  host_api::HttpCacheWriteOptions *override_cache_options = new host_api::HttpCacheWriteOptions();\n\n  JS::SetReservedSlot(response, static_cast<uint32_t>(Response::Slots::StorageAction),\n                      JS::Int32Value(static_cast<uint32_t>(suggested_storage_action)));\n  JS::SetReservedSlot(response, static_cast<uint32_t>(RequestOrResponse::Slots::CacheEntry),\n                      JS::Int32Value(cache_entry.handle));\n  // CandidateResponse does not have a body!\n  JS::SetReservedSlot(response, static_cast<uint32_t>(RequestOrResponse::Slots::HasBody),\n                      JS::FalseValue());\n\n  RootedObject cache_override(\n      cx, JS::GetReservedSlot(request, static_cast<uint32_t>(Request::Slots::CacheOverride))\n              .toObjectOrNull());\n  RootedObject after_send(cx);\n  if (cache_override) {\n    after_send.set(CacheOverride::afterSend(cache_override));\n\n    // convert the CacheOverride provided to the request into HttpCacheWriteOptions overrides\n    // that can still be overridden by the candidate reseponse phase\n    host_api::HttpCacheWriteOptions *suggested = nullptr;\n    RootedValue override_ttl(cx, CacheOverride::ttl(cache_override));\n\n    // overriding TTL is computed in terms of the original age, so we need the suggested calculation\n    if (!override_ttl.isUndefined()) {\n      if (!suggested) {\n        suggested = Response::suggested_cache_options(cx, response);\n        if (!suggested) {\n          return false;\n        }\n      }\n      uint64_t ttl_ns = static_cast<uint64_t>(override_ttl.toInt32() * 1e9);\n      uint64_t initial_age_ns = suggested->initial_age_ns.value();\n      override_cache_options->max_age_ns = ttl_ns + initial_age_ns;\n    }\n\n    RootedValue override_swr(cx, CacheOverride::swr(cache_override));\n    if (!override_swr.isUndefined()) {\n      override_cache_options->stale_while_revalidate_ns =\n          static_cast<uint64_t>(override_swr.toInt32() * 1e9);\n    }\n\n    // overriding surrogate keys composes suggested surrogate keys with the original cache override\n    // space-split keys, so again, use the suggested computation to do this.\n    RootedValue override_surrogate_keys(cx, CacheOverride::surrogate_key(cache_override));\n    if (!override_surrogate_keys.isUndefined()) {\n      if (!suggested) {\n        suggested = Response::suggested_cache_options(cx, response);\n        if (!suggested) {\n          return false;\n        }\n      }\n      auto str_val = core::encode(cx, override_surrogate_keys);\n      if (!str_val) {\n        return false;\n      }\n\n      // Get the string data as string_view\n      std::string_view str(str_val.ptr.get(), str_val.len);\n\n      // Initialize the optional vector\n      override_cache_options->surrogate_keys.emplace();\n\n      size_t pos = 0;\n      while (pos < str.length()) {\n        // Skip any leading spaces\n        while (pos < str.length() && str[pos] == ' ') {\n          pos++;\n        }\n\n        // Find next space\n        size_t space = str.find(' ', pos);\n\n        // Handle either substring to next space or to end\n        if (space == std::string_view::npos) {\n          if (pos < str.length()) {\n            auto substr = str.substr(pos);\n            override_cache_options->surrogate_keys->push_back(host_api::HostString(substr));\n          }\n          break;\n        } else {\n          if (space > pos) {\n            auto substr = str.substr(pos, space - pos);\n            override_cache_options->surrogate_keys->push_back(host_api::HostString(substr));\n          }\n          pos = space + 1;\n        }\n      }\n    }\n\n    RootedValue override_pci(cx, CacheOverride::pci(cache_override));\n    if (!override_pci.isUndefined()) {\n      override_cache_options->sensitive_data = override_pci.toBoolean();\n    }\n  }\n\n  JS::SetReservedSlot(response, static_cast<uint32_t>(Response::Slots::OverrideCacheWriteOptions),\n                      JS::PrivateValue(override_cache_options));\n\n  JS::RootedObject after_send_promise(cx);\n  if (after_send) {\n    JS::RootedValue ret_val(cx);\n    JS::RootedValueArray<1> args(cx);\n    args[0].set(JS::ObjectValue(*response));\n\n    // now call after_send with the candidate_request, allowing any async work\n    if (!JS::Call(cx, JS::NullHandleValue, after_send, args, &ret_val)) {\n      return RejectPromiseWithPendingError(cx, promise_obj);\n    }\n    after_send_promise = JS::RootedObject(cx, JS::CallOriginalPromiseResolve(cx, ret_val));\n    if (!after_send_promise) {\n      return false;\n    }\n  } else {\n    after_send_promise = JS::NewPromiseObject(cx, nullptr);\n    JS::ResolvePromise(cx, after_send_promise, JS::UndefinedHandleValue);\n  }\n  // when we resume, we pick up the transaction insert\n  JS::RootedObject then_handler_obj(cx,\n                                    create_internal_method<after_send_then>(cx, response, promise));\n  if (!then_handler_obj) {\n    return false;\n  }\n  JS::RootedObject catch_handler_obj(\n      cx, create_internal_method<after_send_catch>(cx, response, promise));\n  if (!catch_handler_obj) {\n    return false;\n  }\n  return JS::AddPromiseReactions(cx, after_send_promise, then_handler_obj, catch_handler_obj);\n}\n\nbool RequestOrResponse::is_instance(JSObject *obj) {\n  return Request::is_instance(obj) || Response::is_instance(obj) || KVStoreEntry::is_instance(obj);\n}\n\nuint32_t RequestOrResponse::handle(JSObject *obj) {\n  MOZ_ASSERT(is_instance(obj));\n  return static_cast<uint32_t>(\n      JS::GetReservedSlot(obj, static_cast<uint32_t>(Slots::RequestOrResponse)).toInt32());\n}\n\nbool RequestOrResponse::has_body(JSObject *obj) {\n  return JS::GetReservedSlot(obj, static_cast<uint32_t>(Slots::HasBody)).toBoolean();\n}\n\nhost_api::HttpBody RequestOrResponse::body_handle(JSObject *obj) {\n  return host_api::HttpBody(JS::GetReservedSlot(obj, static_cast<uint32_t>(Slots::Body)).toInt32());\n}\n\nJSObject *RequestOrResponse::body_stream(JSObject *obj) {\n  return JS::GetReservedSlot(obj, static_cast<uint32_t>(Slots::BodyStream)).toObjectOrNull();\n}\n\nJSObject *RequestOrResponse::body_source(JSContext *cx, JS::HandleObject obj) {\n  MOZ_ASSERT(has_body(obj));\n  JS::RootedObject stream(cx, body_stream(obj));\n  return NativeStreamSource::get_stream_source(cx, stream);\n}\n\nbool RequestOrResponse::body_used(JSObject *obj) {\n  return JS::GetReservedSlot(obj, static_cast<uint32_t>(Slots::BodyUsed)).toBoolean();\n}\n\nbool RequestOrResponse::mark_body_used(JSContext *cx, JS::HandleObject obj) {\n  MOZ_ASSERT(!body_used(obj));\n  JS::SetReservedSlot(obj, static_cast<uint32_t>(Slots::BodyUsed), JS::BooleanValue(true));\n\n  JS::RootedObject stream(cx, body_stream(obj));\n  if (stream && NativeStreamSource::stream_is_body(cx, stream)) {\n    if (!NativeStreamSource::lock_stream(cx, stream)) {\n      // The only reason why marking the body as used could fail here is that\n      // it's a disturbed ReadableStream. To improve error reporting, we clear\n      // the current exception and throw a better one.\n      JS_ClearPendingException(cx);\n      JS_ReportErrorNumberLatin1(cx, FastlyGetErrorMessage, nullptr,\n                                 JSMSG_READABLE_STREAM_LOCKED_OR_DISTRUBED);\n      return false;\n    }\n  }\n\n  return true;\n}\n\n/**\n * Moves an underlying body handle from one Request/Response object to another.\n *\n * Also marks the source object's body as consumed.\n */\nbool RequestOrResponse::move_body_handle(JSContext *cx, JS::HandleObject from,\n                                         JS::HandleObject to) {\n  MOZ_ASSERT(is_instance(from));\n  MOZ_ASSERT(is_instance(to));\n  MOZ_ASSERT(!body_used(from));\n\n  // Replace the receiving object's body handle with the body stream source's\n  // underlying handle.\n  // TODO: Let the host know we'll not use the old handle anymore, once Fastly Compute has\n  // a hostcall for that.\n  auto body = body_handle(from);\n  JS::SetReservedSlot(to, static_cast<uint32_t>(Slots::Body), JS::Int32Value(body.handle));\n\n  // Mark the source's body as used, and the stream as locked to prevent any\n  // future attempts to use the underlying handle we just removed.\n  return mark_body_used(cx, from);\n}\n\nJS::Value RequestOrResponse::url(JSObject *obj) {\n  MOZ_ASSERT(is_instance(obj));\n  JS::Value val = JS::GetReservedSlot(obj, static_cast<uint32_t>(RequestOrResponse::Slots::URL));\n  MOZ_ASSERT(val.isString());\n  return val;\n}\n\nvoid RequestOrResponse::set_url(JSObject *obj, JS::Value url) {\n  MOZ_ASSERT(is_instance(obj));\n  MOZ_ASSERT(url.isString());\n  JS::SetReservedSlot(obj, static_cast<uint32_t>(RequestOrResponse::Slots::URL), url);\n}\n\n/**\n * Implementation of the `body is unusable` concept at\n * https://fetch.spec.whatwg.org/#body-unusable\n */\nbool RequestOrResponse::body_unusable(JSContext *cx, JS::HandleObject body) {\n  MOZ_ASSERT(JS::IsReadableStream(body));\n  bool disturbed;\n  bool locked;\n  MOZ_RELEASE_ASSERT(JS::ReadableStreamIsDisturbed(cx, body, &disturbed) &&\n                     JS::ReadableStreamIsLocked(cx, body, &locked));\n  return disturbed || locked;\n}\n\n/**\n * Implementation of the `extract a body` algorithm at\n * https://fetch.spec.whatwg.org/#concept-bodyinit-extract\n *\n * Note: our implementation is somewhat different from what the spec describes\n * in that we immediately write all non-streaming body types to the host instead\n * of creating a stream for them. We don't have threads, so there's nothing \"in\n * parallel\" to be had anyway.\n *\n * Note: also includes the steps applying the `Content-Type` header from the\n * Request and Response constructors in step 36 and 8 of those, respectively.\n */\nbool RequestOrResponse::extract_body(JSContext *cx, JS::HandleObject self,\n                                     JS::HandleValue body_val) {\n  MOZ_ASSERT(is_instance(self));\n  MOZ_ASSERT(!has_body(self));\n  MOZ_ASSERT(!body_val.isNullOrUndefined());\n\n  const char *content_type = nullptr;\n\n  // We currently support five types of body inputs:\n  // - Blob\n  // - byte sequence\n  // - buffer source\n  // - USV strings\n  // - URLSearchParams\n  // - ReadableStream\n  // After the other other options are checked explicitly, all other inputs are\n  // encoded to a UTF8 string to be treated as a USV string.\n  // TODO: Support the other possible inputs to Body.\n\n  JS::RootedObject body_obj(cx, body_val.isObject() ? &body_val.toObject() : nullptr);\n\n  host_api::HostString host_type_str;\n\n  if (Blob::is_instance(body_obj)) {\n    RootedValue stream(cx);\n    if (!Blob::stream(cx, body_obj, &stream)) {\n      return false;\n    }\n\n    MOZ_ASSERT(stream.isObject());\n    JS_SetReservedSlot(self, static_cast<uint32_t>(RequestOrResponse::Slots::BodyStream), stream);\n\n    // TODO: Set content-length header from known body extracted size\n    // size_t content_length = Blob::blob_size(body_obj);\n\n    JS::RootedString type_str(cx, Blob::type(body_obj));\n    if (JS::GetStringLength(type_str) > 0) {\n      host_type_str = core::encode(cx, type_str);\n      MOZ_ASSERT(host_type_str);\n      content_type = host_type_str.begin();\n    }\n  } else if (FormData::is_instance(body_obj)) {\n    RootedObject encoder(cx, MultipartFormData::create(cx, body_obj));\n    if (!encoder) {\n      return false;\n    }\n\n    RootedObject stream(cx, MultipartFormData::encode_stream(cx, encoder));\n    if (!stream) {\n      return false;\n    }\n\n    auto boundary = MultipartFormData::boundary(encoder);\n    std::string content_type_str = \"multipart/form-data; boundary=\" + boundary;\n    host_type_str = host_api::HostString(content_type_str.c_str());\n\n    auto length = MultipartFormData::query_length(cx, encoder);\n    if (length.isErr()) {\n      return false;\n    }\n\n    // content_length = mozilla::Some(length.unwrap());\n    content_type = host_type_str.begin();\n\n    RootedValue stream_val(cx, JS::ObjectValue(*stream));\n    JS_SetReservedSlot(self, static_cast<uint32_t>(RequestOrResponse::Slots::BodyStream),\n                       stream_val);\n  } else if (body_obj && JS::IsReadableStream(body_obj)) {\n    if (RequestOrResponse::body_unusable(cx, body_obj)) {\n      JS_ReportErrorNumberLatin1(cx, FastlyGetErrorMessage, nullptr,\n                                 JSMSG_READABLE_STREAM_LOCKED_OR_DISTRUBED);\n      return false;\n    }\n\n    // Move native body handle to new Request and store source for async-safe shortcutting\n    if (NativeStreamSource::stream_is_body(cx, body_obj)) {\n      set_up_shortcutting(cx, body_obj, self);\n    }\n\n    JS_SetReservedSlot(self, static_cast<uint32_t>(RequestOrResponse::Slots::BodyStream), body_val);\n  } else {\n    mozilla::Maybe<JS::AutoCheckCannotGC> maybeNoGC;\n    JS::UniqueChars text;\n    char *buf;\n    size_t length;\n\n    host_api::Result<host_api::Void> write_res;\n\n    host_api::HttpBody body{RequestOrResponse::body_handle(self)};\n    if (body_obj && JS_IsArrayBufferViewObject(body_obj)) {\n      // Short typed arrays have inline data which can move on GC, so assert\n      // that no GC happens. (Which it doesn't, because we're not allocating\n      // before `buf` goes out of scope.)\n      JS::AutoCheckCannotGC noGC(cx);\n      bool is_shared;\n      length = JS_GetArrayBufferViewByteLength(body_obj);\n      buf = (char *)JS_GetArrayBufferViewData(body_obj, &is_shared, noGC);\n      write_res = body.write_all_back(reinterpret_cast<uint8_t *>(buf), length);\n    } else if (body_obj && JS::IsArrayBufferObject(body_obj)) {\n      bool is_shared;\n      JS::GetArrayBufferLengthAndData(body_obj, &length, &is_shared, (uint8_t **)&buf);\n      write_res = body.write_all_back(reinterpret_cast<uint8_t *>(buf), length);\n    } else if (body_obj && URLSearchParams::is_instance(body_obj)) {\n      auto slice = URLSearchParams::serialize(cx, body_obj);\n      buf = (char *)slice.data;\n      length = slice.len;\n      content_type = \"application/x-www-form-urlencoded;charset=UTF-8\";\n      write_res = body.write_all_back(reinterpret_cast<uint8_t *>(buf), length);\n    } else {\n      {\n        auto str = core::encode(cx, body_val);\n        text = std::move(str.ptr);\n        length = str.len;\n      }\n\n      if (!text) {\n        return false;\n      }\n      buf = text.get();\n      content_type = \"text/plain;charset=UTF-8\";\n      write_res = body.write_all_back(reinterpret_cast<uint8_t *>(buf), length);\n    }\n\n    if (auto *err = write_res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return false;\n    }\n  }\n\n  // Step 36.3 of Request constructor / 8.4 of Response constructor.\n  if (content_type) {\n    JS::RootedObject headers(\n        cx, &JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::Headers)).toObject());\n    if (!Headers::set_valid_if_undefined(cx, headers, \"content-type\", content_type)) {\n      return false;\n    }\n  }\n\n  JS::SetReservedSlot(self, static_cast<uint32_t>(Slots::HasBody), JS::BooleanValue(true));\n  return true;\n}\n\nJSObject *RequestOrResponse::maybe_headers(JSObject *obj) {\n  MOZ_ASSERT(is_instance(obj));\n  return JS::GetReservedSlot(obj, static_cast<uint32_t>(Slots::Headers)).toObjectOrNull();\n}\n\nbool RequestOrResponse::append_body(JSContext *cx, JS::HandleObject self, JS::HandleObject source) {\n  MOZ_ASSERT(!body_used(source));\n  host_api::HttpBody source_body{body_handle(source)};\n  host_api::HttpBody dest_body{body_handle(self)};\n  auto res = dest_body.append(source_body);\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  return true;\n}\n\nJSObject *Request::headers(JSContext *cx, JS::HandleObject obj) {\n  JS::RootedObject headers(cx, RequestOrResponse::maybe_headers(obj));\n  if (!headers) {\n    MOZ_ASSERT(is_instance(obj));\n    if (is_downstream(obj)) {\n      headers.set(\n          Headers::create(cx, request_handle(obj).headers(), Headers::HeadersGuard::Request));\n    } else {\n      headers.set(Headers::create(cx, Headers::HeadersGuard::Request));\n    }\n    if (!headers) {\n      return nullptr;\n    }\n\n    JS_SetReservedSlot(obj, static_cast<uint32_t>(Slots::Headers), JS::ObjectValue(*headers));\n  }\n\n  return headers;\n}\n\nJSObject *Response::headers(JSContext *cx, JS::HandleObject obj) {\n  JS::RootedObject headers(cx, RequestOrResponse::maybe_headers(obj));\n  if (!headers) {\n    MOZ_ASSERT(is_instance(obj));\n    if (is_upstream(obj)) {\n      headers.set(\n          Headers::create(cx, response_handle(obj).headers(), Headers::HeadersGuard::Response));\n    } else {\n      headers.set(Headers::create(cx, Headers::HeadersGuard::Response));\n    }\n    if (!headers) {\n      return nullptr;\n    }\n\n    JS_SetReservedSlot(obj, static_cast<uint32_t>(Slots::Headers), JS::ObjectValue(*headers));\n  }\n\n  return headers;\n}\n\nbool Request::isCacheable_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  // before we can check isCacheable, we must flush the headers to the host handle\n  // this operation is cache tracked through the HeadersGen slot\n  if (!RequestOrResponse::commit_headers(cx, self)) {\n    return false;\n  }\n  auto handle = request_handle(self);\n  auto res = handle.is_cacheable();\n  if (auto *err = res.to_err()) {\n    if (host_api::error_is_unsupported(*err)) {\n      args.rval().setUndefined();\n      return true;\n    }\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  args.rval().setBoolean(res.unwrap());\n  return true;\n}\n\n// Headers are committed when making the request or response.\n// We ensure the headers are in the ContentOnly or CachedInContent state for\n// future reads and mutations, and then copy them into a new handle created for the\n// request or response being sent.\nbool RequestOrResponse::commit_headers(JSContext *cx, HandleObject self) {\n  JS::RootedObject headers(cx, RequestOrResponse::maybe_headers(self));\n  if (!headers) {\n    return true;\n  }\n  if (Headers::mode(headers) == Headers::Mode::Uninitialized ||\n      Headers::mode(headers) == Headers::Mode::CachedInContent ||\n      Headers::mode(headers) == Headers::Mode::HostOnly) {\n    return true;\n  }\n  bool headers_changed;\n  if (!compare_bump_headers_gen(cx, self, &headers_changed)) {\n    return false;\n  }\n  if (!headers_changed) {\n    return true;\n  }\n  MOZ_ASSERT(Headers::mode(headers) == Headers::Mode::ContentOnly);\n  Headers::HeadersList *list = Headers::get_list(cx, headers);\n  MOZ_ASSERT(list);\n\n  // Host headers handle to write into\n  host_api::HttpHeaders *headers_handle;\n  if (Request::is_instance(self)) {\n    headers_handle = Request::request_handle(self).headers_writable();\n  } else {\n    MOZ_ASSERT(Response::is_instance(self));\n    headers_handle = Response::response_handle(self).headers_writable();\n  }\n\n  auto res = host_api::write_headers(headers_handle, *list);\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  return true;\n}\n\nbool RequestOrResponse::compare_bump_headers_gen(JSContext *cx, HandleObject self,\n                                                 bool *changed_out) {\n  RootedValue last_headers_gen(\n      cx, JS::GetReservedSlot(self, static_cast<uint32_t>(Response::Slots::HeadersGen)));\n  JS::RootedObject headers(cx, RequestOrResponse::maybe_headers(self));\n  if (!headers) {\n    JS::SetReservedSlot(self, static_cast<uint32_t>(Slots::HeadersGen), JS::NullValue());\n    *changed_out = last_headers_gen.isUndefined();\n    return true;\n  }\n  uint32_t headers_gen = Headers::get_generation(headers);\n  // generation overflow implies always-invalidate\n  if (headers_gen == INT32_MAX || last_headers_gen.isUndefined() || last_headers_gen.isNull() ||\n      last_headers_gen.toInt32() != headers_gen) {\n    JS::SetReservedSlot(self, static_cast<uint32_t>(Response::Slots::HeadersGen),\n                        JS::Int32Value(headers_gen));\n    *changed_out = true;\n    return true;\n  } else {\n    *changed_out = false;\n    return true;\n  }\n}\n\ntemplate <RequestOrResponse::BodyReadResult result_type>\nbool RequestOrResponse::parse_body(JSContext *cx, JS::HandleObject self, JS::UniqueChars buf,\n                                   size_t len) {\n  JS::RootedObject result_promise(\n      cx, &JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::BodyAllPromise)).toObject());\n  JS::SetReservedSlot(self, static_cast<uint32_t>(Slots::BodyAllPromise), JS::UndefinedValue());\n  JS::RootedValue result(cx);\n\n  if constexpr (result_type == RequestOrResponse::BodyReadResult::ArrayBuffer) {\n    JS::RootedObject array_buffer(\n        cx, JS::NewArrayBufferWithContents(cx, len, buf.get(),\n                                           JS::NewArrayBufferOutOfMemory::CallerMustFreeMemory));\n    if (!array_buffer) {\n      return RejectPromiseWithPendingError(cx, result_promise);\n    }\n    static_cast<void>(buf.release());\n    result.setObject(*array_buffer);\n  } else if constexpr (result_type == RequestOrResponse::BodyReadResult::Blob) {\n    JS::RootedString contentType(cx, JS_GetEmptyString(cx));\n    JS::RootedObject blob(cx, Blob::create(cx, std::move(buf), len, contentType));\n    if (!blob) {\n      return RejectPromiseWithPendingError(cx, result_promise);\n    }\n\n    result.setObject(*blob);\n  } else if constexpr (result_type == RequestOrResponse::BodyReadResult::FormData) {\n    auto throw_invalid_header = [&]() {\n      api::throw_error(cx, FetchErrors::InvalidFormDataHeader);\n      return RejectPromiseWithPendingError(cx, result_promise);\n    };\n\n    RootedObject headers(cx, RequestOrResponse::maybe_headers(self));\n    if (!headers) {\n      return throw_invalid_header();\n    }\n\n    auto content_type_str = host_api::HostString(\"Content-Type\");\n    auto idx = Headers::lookup(cx, headers, content_type_str);\n    if (!idx) {\n      return throw_invalid_header();\n    }\n\n    auto values = Headers::get_index(cx, headers, idx.value());\n    auto maybe_mime = builtins::web::fetch::extract_mime_type(std::get<1>(*values));\n    if (maybe_mime.isErr()) {\n      return throw_invalid_header();\n    }\n\n    auto parser = FormDataParser::create(maybe_mime.unwrap().to_string());\n    if (!parser) {\n      return throw_invalid_header();\n    }\n\n    std::string_view body(buf.get(), len);\n    RootedObject form_data(cx, parser->parse(cx, body));\n    if (!form_data) {\n      api::throw_error(cx, FetchErrors::InvalidFormData);\n      return RejectPromiseWithPendingError(cx, result_promise);\n    }\n\n    result.setObject(*form_data);\n  } else {\n    JS::RootedString text(cx, JS_NewStringCopyUTF8N(cx, JS::UTF8Chars(buf.get(), len)));\n    if (!text) {\n      return RejectPromiseWithPendingError(cx, result_promise);\n    }\n\n    if constexpr (result_type == RequestOrResponse::BodyReadResult::Text) {\n      result.setString(text);\n    } else {\n      MOZ_ASSERT(result_type == RequestOrResponse::BodyReadResult::JSON);\n      if (!JS_ParseJSON(cx, text, &result)) {\n        return RejectPromiseWithPendingError(cx, result_promise);\n      }\n    }\n  }\n\n  return JS::ResolvePromise(cx, result_promise, result);\n}\n\nbool RequestOrResponse::content_stream_read_then_handler(JSContext *cx, JS::HandleObject self,\n                                                         JS::HandleValue extra, JS::CallArgs args) {\n  JS::RootedObject then_handler(cx, &args.callee());\n  // The reader is stored in the catch handler, which we need here as well.\n  // So we get that first, then the reader.\n  MOZ_ASSERT(extra.isObject());\n  JS::RootedObject catch_handler(cx, &extra.toObject());\n#ifdef DEBUG\n  bool foundContents;\n  if (!JS_HasElement(cx, catch_handler, 1, &foundContents)) {\n    return false;\n  }\n  MOZ_ASSERT(foundContents);\n#endif\n  JS::RootedValue contents_val(cx);\n  if (!JS_GetElement(cx, catch_handler, 1, &contents_val)) {\n    return false;\n  }\n  MOZ_ASSERT(contents_val.isObject());\n  JS::RootedObject contents(cx, &contents_val.toObject());\n  if (!contents) {\n    return false;\n  }\n#ifdef DEBUG\n  bool contentsIsArray;\n  if (!JS::IsArrayObject(cx, contents, &contentsIsArray)) {\n    return false;\n  }\n  MOZ_ASSERT(contentsIsArray);\n#endif\n\n  auto reader_val = js::GetFunctionNativeReserved(catch_handler, 1);\n  MOZ_ASSERT(reader_val.isObject());\n  JS::RootedObject reader(cx, &reader_val.toObject());\n\n  // We're guaranteed to work with a native ReadableStreamDefaultReader here as we used\n  // `JS::ReadableStreamDefaultReaderRead(cx, reader)`, which in turn is guaranteed to return {done:\n  // bool, value: any} objects to read promise then callbacks.\n  MOZ_ASSERT(args[0].isObject());\n  JS::RootedObject chunk_obj(cx, &args[0].toObject());\n  JS::RootedValue done_val(cx);\n  JS::RootedValue value(cx);\n#ifdef DEBUG\n  bool hasValue;\n  if (!JS_HasProperty(cx, chunk_obj, \"value\", &hasValue)) {\n    return false;\n  }\n  MOZ_ASSERT(hasValue);\n#endif\n  if (!JS_GetProperty(cx, chunk_obj, \"value\", &value)) {\n    return false;\n  }\n#ifdef DEBUG\n  bool hasDone;\n  if (!JS_HasProperty(cx, chunk_obj, \"done\", &hasDone)) {\n    return false;\n  }\n  MOZ_ASSERT(hasDone);\n#endif\n  if (!JS_GetProperty(cx, chunk_obj, \"done\", &done_val)) {\n    return false;\n  }\n  MOZ_ASSERT(done_val.isBoolean());\n  if (done_val.toBoolean()) {\n    // We finished reading the stream\n    // Now we need to iterate/reduce `contents` JS Array into UniqueChars\n    uint32_t contentsLength;\n    if (!JS::GetArrayLength(cx, contents, &contentsLength)) {\n      return false;\n    }\n    // TODO(performance): investigate whether we can infer the size directly from `contents`\n    size_t buf_size = HANDLE_READ_CHUNK_SIZE;\n    // TODO(performance): make use of malloc slack.\n    // https://github.com/fastly/js-compute-runtime/issues/217\n    size_t offset = 0;\n    // In this loop we are finding the length of each entry in `contents` and resizing the `buf`\n    // until it is large enough to fit all the entries in `contents`\n    for (uint32_t index = 0; index < contentsLength; index++) {\n      JS::RootedValue val(cx);\n      if (!JS_GetElement(cx, contents, index, &val)) {\n        return false;\n      }\n      {\n        JS::AutoCheckCannotGC nogc;\n        MOZ_ASSERT(val.isObject());\n        JSObject *array = &val.toObject();\n        MOZ_ASSERT(JS_IsUint8Array(array));\n        size_t length = JS_GetTypedArrayByteLength(array);\n        if (length) {\n          offset += length;\n          // if buf is not big enough to fit the next uint8array's bytes then resize\n          if (offset > buf_size) {\n            buf_size =\n                buf_size + (HANDLE_READ_CHUNK_SIZE * ((length / HANDLE_READ_CHUNK_SIZE) + 1));\n          }\n        }\n      }\n    }\n\n    JS::UniqueChars buf{static_cast<char *>(JS_malloc(cx, buf_size + 1))};\n    if (!buf) {\n      JS_ReportOutOfMemory(cx);\n      return false;\n    }\n    // reset the offset for the next loop\n    offset = 0;\n    // In this loop we are inserting each entry in `contents` into `buf`\n    for (uint32_t index = 0; index < contentsLength; index++) {\n      JS::RootedValue val(cx);\n      if (!JS_GetElement(cx, contents, index, &val)) {\n        return false;\n      }\n      {\n        JS::AutoCheckCannotGC nogc;\n        MOZ_ASSERT(val.isObject());\n        JSObject *array = &val.toObject();\n        MOZ_ASSERT(JS_IsUint8Array(array));\n        bool is_shared;\n        size_t length = JS_GetTypedArrayByteLength(array);\n        if (length) {\n          static_assert(CHAR_BIT == 8, \"Strange char\");\n          auto bytes = reinterpret_cast<char *>(JS_GetUint8ArrayData(array, &is_shared, nogc));\n          memcpy(buf.get() + offset, bytes, length);\n          offset += length;\n        }\n      }\n    }\n    buf[offset] = '\\0';\n#ifdef DEBUG\n    bool foundBodyParser;\n    if (!JS_HasElement(cx, catch_handler, 2, &foundBodyParser)) {\n      return false;\n    }\n    MOZ_ASSERT(foundBodyParser);\n#endif\n    // Now we can call parse_body on the result\n    JS::RootedValue body_parser(cx);\n    if (!JS_GetElement(cx, catch_handler, 2, &body_parser)) {\n      return false;\n    }\n    auto parse_body = (ParseBodyCB *)body_parser.toPrivate();\n    return parse_body(cx, self, std::move(buf), offset);\n  }\n\n  JS::RootedValue val(cx);\n  if (!JS_GetProperty(cx, chunk_obj, \"value\", &val)) {\n    return false;\n  }\n\n  // The read operation can return anything since this stream comes from the guest\n  // If it is not a UInt8Array -- reject with a TypeError\n  if (!val.isObject() || !JS_IsUint8Array(&val.toObject())) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                              JSMSG_RESPONSE_VALUE_NOT_UINT8ARRAY);\n    JS::RootedObject result_promise(cx);\n    result_promise =\n        &JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::BodyAllPromise)).toObject();\n    JS::SetReservedSlot(self, static_cast<uint32_t>(Slots::BodyAllPromise), JS::UndefinedValue());\n\n    return RejectPromiseWithPendingError(cx, result_promise);\n  }\n\n  {\n    uint32_t contentsLength;\n    if (!JS::GetArrayLength(cx, contents, &contentsLength)) {\n      return false;\n    }\n    if (!JS_SetElement(cx, contents, contentsLength, val)) {\n      return false;\n    }\n  }\n\n  // Read the next chunk.\n  JS::RootedObject promise(cx, JS::ReadableStreamDefaultReaderRead(cx, reader));\n  if (!promise)\n    return false;\n  return JS::AddPromiseReactions(cx, promise, then_handler, catch_handler);\n}\n\nbool RequestOrResponse::content_stream_read_catch_handler(JSContext *cx, JS::HandleObject self,\n                                                          JS::HandleValue extra,\n                                                          JS::CallArgs args) {\n  // The stream errored when being consumed\n  // we need to propagate the stream error\n  MOZ_ASSERT(extra.isObject());\n  JS::RootedObject reader(cx, &extra.toObject());\n  JS::RootedValue stream_val(cx);\n  if (!JS_GetElement(cx, reader, 1, &stream_val)) {\n    return false;\n  }\n  MOZ_ASSERT(stream_val.isObject());\n  JS::RootedObject stream(cx, &stream_val.toObject());\n  if (!stream) {\n    return false;\n  }\n  MOZ_ASSERT(JS::IsReadableStream(stream));\n#ifdef DEBUG\n  bool isError;\n  if (!JS::ReadableStreamIsErrored(cx, stream, &isError)) {\n    return false;\n  }\n  MOZ_ASSERT(isError);\n#endif\n  JS::RootedValue error(cx, JS::ReadableStreamGetStoredError(cx, stream));\n  JS_ClearPendingException(cx);\n  JS_SetPendingException(cx, error, JS::ExceptionStackBehavior::DoNotCapture);\n  JS::RootedObject result_promise(cx);\n  result_promise =\n      &JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::BodyAllPromise)).toObject();\n  JS::SetReservedSlot(self, static_cast<uint32_t>(Slots::BodyAllPromise), JS::UndefinedValue());\n\n  return RejectPromiseWithPendingError(cx, result_promise);\n}\n\nbool RequestOrResponse::consume_content_stream_for_bodyAll(JSContext *cx, JS::HandleObject self,\n                                                           JS::HandleValue stream_val,\n                                                           JS::CallArgs args) {\n  // The body_parser is stored in the stream object, which we need here as well.\n  JS::RootedObject stream(cx, &stream_val.toObject());\n  JS::RootedValue body_parser(cx);\n  if (!JS_GetElement(cx, stream, 1, &body_parser)) {\n    return false;\n  }\n  MOZ_ASSERT(JS::IsReadableStream(stream));\n  if (RequestOrResponse::body_unusable(cx, stream)) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                              JSMSG_RESPONSE_BODY_DISTURBED_OR_LOCKED);\n    JS::RootedObject result_promise(cx);\n    result_promise =\n        &JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::BodyAllPromise)).toObject();\n    JS::SetReservedSlot(self, static_cast<uint32_t>(Slots::BodyAllPromise), JS::UndefinedValue());\n    return RejectPromiseWithPendingError(cx, result_promise);\n  }\n  JS::Rooted<JSObject *> unwrappedReader(\n      cx, JS::ReadableStreamGetReader(cx, stream, JS::ReadableStreamReaderMode::Default));\n  if (!unwrappedReader) {\n    return false;\n  }\n\n  // contents is the JS Array we store the stream chunks within, to later convert to\n  // arrayBuffer/json/text\n  JS::Rooted<JSObject *> contents(cx, JS::NewArrayObject(cx, 0));\n  if (!contents) {\n    return false;\n  }\n\n  JS::RootedValue extra(cx, JS::ObjectValue(*unwrappedReader));\n  // TODO: confirm whether this is observable to the JS application\n  if (!JS_SetElement(cx, unwrappedReader, 1, stream)) {\n    return false;\n  }\n\n  // Create handlers for both `then` and `catch`.\n  // These are functions with two reserved slots, in which we store all\n  // information required to perform the reactions. We store the actually\n  // required information on the catch handler, and a reference to that on the\n  // then handler. This allows us to reuse these functions for the next read\n  // operation in the then handler. The catch handler won't ever have a need to\n  // perform another operation in this way.\n  JS::RootedObject catch_handler(\n      cx, create_internal_method<content_stream_read_catch_handler>(cx, self, extra));\n  if (!catch_handler) {\n    return false;\n  }\n\n  extra.setObject(*catch_handler);\n  if (!JS_SetElement(cx, catch_handler, 1, contents)) {\n    return false;\n  }\n  if (!JS_SetElement(cx, catch_handler, 2, body_parser)) {\n    return false;\n  }\n  JS::RootedObject then_handler(\n      cx, create_internal_method<content_stream_read_then_handler>(cx, self, extra));\n  if (!then_handler) {\n    return false;\n  }\n\n  // Read the next chunk.\n  JS::RootedObject promise(cx, JS::ReadableStreamDefaultReaderRead(cx, unwrappedReader));\n  if (!promise) {\n    return false;\n  }\n  return JS::AddPromiseReactions(cx, promise, then_handler, catch_handler);\n}\n\n// bool async_process_body_handle_for_bodyAll(JSContext *cx, uint32_t handle, JS::HandleObject self,\n//                                            JS::HandleValue body_parser) {\n//   auto body = RequestOrResponse::body_handle(self);\n//   auto *parse_body = reinterpret_cast<RequestOrResponse::ParseBodyCB *>(body_parser.toPrivate());\n//   auto [buf, bytes_read, state] = read_from_handle_all<true>(cx, body);\n//   if (state == StreamState::Error) {\n\n//     JS::RootedObject result_promise(cx);\n//     result_promise =\n//         &JS::GetReservedSlot(self,\n//         static_cast<uint32_t>(RequestOrResponse::Slots::BodyAllPromise))\n//              .toObject();\n//     JS::SetReservedSlot(self, static_cast<uint32_t>(RequestOrResponse::Slots::BodyAllPromise),\n//                         JS::UndefinedValue());\n//     return RejectPromiseWithPendingError(cx, result_promise);\n//   }\n\n//   if (state == StreamState::Complete) {\n//     return parse_body(cx, self, std::move(buf), bytes_read);\n//   }\n\n//   // still have to wait for the stream to complete, queue an async task\n//   ENGINE->queue_async_task(new FastlyAsyncTask(body.async_handle(), self,\n//   JS::UndefinedHandleValue,\n//                                                async_process_body_handle_for_bodyAll));\n//   return true;\n// }\n\ntemplate <bool async>\nbool RequestOrResponse::consume_body_handle_for_bodyAll(JSContext *cx, JS::HandleObject self,\n                                                        JS::HandleValue body_parser,\n                                                        JS::CallArgs args) {\n  auto body = body_handle(self);\n  auto *parse_body = reinterpret_cast<ParseBodyCB *>(body_parser.toPrivate());\n  auto [buf, bytes_read, state] = read_from_handle_all<async>(cx, body);\n  MOZ_ASSERT(async || state != StreamState::Wait);\n  if (state == StreamState::Error) {\n    JS::RootedObject result_promise(cx);\n    result_promise =\n        &JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::BodyAllPromise)).toObject();\n    JS::SetReservedSlot(self, static_cast<uint32_t>(Slots::BodyAllPromise), JS::UndefinedValue());\n    return RejectPromiseWithPendingError(cx, result_promise);\n  }\n\n  if (state == StreamState::Complete) {\n    return parse_body(cx, self, std::move(buf), bytes_read);\n  }\n\n  // TODO: the async path isn't working because we don't yet store a chunk buffer along with\n  // the body parser / on the Response slot. This would be a nice addition in future.\n\n  // still have to wait for the stream to complete, queue an async task\n  // ENGINE->queue_async_task(new FastlyAsyncTask(body.async_handle(), self,\n  // JS::UndefinedHandleValue,\n  //                                              async_process_body_handle_for_bodyAll));\n  return true;\n}\n\ntemplate <RequestOrResponse::BodyReadResult result_type, bool async>\nbool RequestOrResponse::bodyAll(JSContext *cx, JS::CallArgs args, JS::HandleObject self) {\n  // TODO: mark body as consumed when operating on stream, too.\n  if (body_used(self)) {\n\n    JS_ReportErrorASCII(cx, \"Body has already been consumed\");\n    return ReturnPromiseRejectedWithPendingError(cx, args);\n  }\n\n  JS::RootedObject bodyAll_promise(cx, JS::NewPromiseObject(cx, nullptr));\n  if (!bodyAll_promise) {\n\n    return ReturnPromiseRejectedWithPendingError(cx, args);\n  }\n  JS::SetReservedSlot(self, static_cast<uint32_t>(Slots::BodyAllPromise),\n                      JS::ObjectValue(*bodyAll_promise));\n\n  // If the Request/Response doesn't have a body, empty default results need to\n  // be returned.\n  if (!has_body(self)) {\n\n    JS::UniqueChars chars;\n    if (!parse_body<result_type>(cx, self, std::move(chars), 0)) {\n      return ReturnPromiseRejectedWithPendingError(cx, args);\n    }\n\n    args.rval().setObject(*bodyAll_promise);\n    return true;\n  }\n\n  if (!mark_body_used(cx, self)) {\n\n    return ReturnPromiseRejectedWithPendingError(cx, args);\n  }\n\n  JS::RootedValue body_parser(cx, JS::PrivateValue((void *)parse_body<result_type>));\n\n  // If the body is a ReadableStream that's not backed by a body handle, we need to\n  // manually read all chunks from the stream.\n  // TODO(performance): ensure that we're properly shortcutting reads from TransformStream\n  // readables.\n  // https://github.com/fastly/js-compute-runtime/issues/218\n  JS::RootedObject stream(cx, body_stream(self));\n  // Note: Shortcutting is now handled by maybe_shortcut_transform_stream_read()\n  // which is called from body_source_pull_algorithm() when the stream is first read.\n\n  if (stream && !NativeStreamSource::stream_is_body(cx, stream)) {\n\n    if (!JS_SetElement(cx, stream, 1, body_parser)) {\n      return false;\n    }\n\n    JS::RootedValue extra(cx, JS::ObjectValue(*stream));\n    if (!enqueue_internal_method<consume_content_stream_for_bodyAll>(cx, self, extra)) {\n\n      return ReturnPromiseRejectedWithPendingError(cx, args);\n    }\n  } else {\n\n    if (!enqueue_internal_method<consume_body_handle_for_bodyAll<async>>(cx, self, body_parser)) {\n\n      return ReturnPromiseRejectedWithPendingError(cx, args);\n    }\n  }\n\n  args.rval().setObject(*bodyAll_promise);\n  return true;\n}\n\nbool RequestOrResponse::body_source_pull_algorithm(JSContext *cx, JS::CallArgs args,\n                                                   JS::HandleObject source,\n                                                   JS::HandleObject body_owner,\n                                                   JS::HandleObject controller) {\n  if (JS::GetReservedSlot(source, static_cast<uint32_t>(Slots::Body)).isInt32()) {\n    auto handle = std::to_string(RequestOrResponse::body_handle(source).handle);\n  }\n\n  // The actual read from the body needs to be delayed, because it'd otherwise\n  // be a blocking operation in case the backend didn't yet send any data.\n  // That would lead to situations where we block on I/O before processing\n  // all pending Promises, which in turn can result in operations happening in\n  // observably different behavior, up to and including causing deadlocks\n  // because a body read response is blocked on content making another request.\n  //\n  // (This deadlock happens in automated tests, but admittedly might not happen\n  // in real usage.)\n\n  JS::RootedObject self(cx, &args.thisv().toObject());\n  JS::RootedObject owner(cx, NativeStreamSource::owner(self));\n\n  JS::RootedValue body_owner_value(cx, JS::ObjectValue(*body_owner));\n  ENGINE->queue_async_task(new FastlyAsyncTask(RequestOrResponse::body_handle(owner).async_handle(),\n                                               source, body_owner_value, process_body_read));\n\n  args.rval().setUndefined();\n  return true;\n}\n\nbool RequestOrResponse::body_source_cancel_algorithm(JSContext *cx, JS::CallArgs args,\n                                                     JS::HandleObject stream,\n                                                     JS::HandleObject owner,\n                                                     JS::HandleValue reason) {\n  args.rval().setUndefined();\n  return true;\n}\n\nbool RequestOrResponse::body_reader_then_handler(JSContext *cx, JS::HandleObject body_owner,\n                                                 JS::HandleValue extra, JS::CallArgs args) {\n  JS::RootedObject then_handler(cx, &args.callee());\n  // The reader is stored in the catch handler, which we need here as well.\n  // So we get that first, then the reader.\n  JS::RootedObject catch_handler(cx, &extra.toObject());\n  JS::RootedObject reader(cx, &js::GetFunctionNativeReserved(catch_handler, 1).toObject());\n  auto body = RequestOrResponse::body_handle(body_owner);\n\n  // We're guaranteed to work with a native ReadableStreamDefaultReader here,\n  // which in turn is guaranteed to vend {done: bool, value: any} objects to\n  // read promise then callbacks.\n  JS::RootedObject chunk_obj(cx, &args[0].toObject());\n  JS::RootedValue done_val(cx);\n  if (!JS_GetProperty(cx, chunk_obj, \"done\", &done_val))\n    return false;\n\n  if (done_val.toBoolean()) {\n    // The only response with a body we ever send is the one passed to\n    // `FetchEvent#respondWith` to send to the client. As such, we can be\n    // certain that if we have a response here, we can advance the FetchState to\n    // `responseDone`.\n    if (Response::is_instance(body_owner)) {\n      ENGINE->decr_event_loop_interest();\n      JS::RootedValue fetch_event_val(\n          cx, JS::GetReservedSlot(body_owner, static_cast<uint32_t>(Response::Slots::FetchEvent)));\n      if (!fetch_event_val.isObject()) {\n        JS_ReportErrorASCII(cx, \"Response does not have an associated FetchEvent\");\n        return false;\n      }\n      JS::RootedObject fetch_event(cx, &fetch_event_val.toObject());\n      FetchEvent::set_state(fetch_event, FetchEvent::State::responseDone);\n    }\n\n    auto res = body.close();\n    if (auto *err = res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return false;\n    }\n\n    if (Request::is_instance(body_owner)) {\n      JS::RootedValue promise(cx, JS::ObjectValue(*Request::response_promise(body_owner)));\n      ENGINE->queue_async_task(\n          new FastlyAsyncTask(Request::pending_handle(body_owner).async_handle(), body_owner,\n                              promise, process_pending_request));\n    }\n\n    return true;\n  }\n\n  JS::RootedValue val(cx);\n  if (!JS_GetProperty(cx, chunk_obj, \"value\", &val))\n    return false;\n\n  // The read operation returned something that's not a Uint8Array\n  if (!val.isObject() || !JS_IsUint8Array(&val.toObject())) {\n    // reject the request promise\n    if (Request::is_instance(body_owner)) {\n      JS::RootedObject response_promise(cx, Request::response_promise(body_owner));\n      JS::RootedValue exn(cx);\n\n      // TODO: this should be a TypeError, but I'm not sure how to make that work\n      JS_ReportErrorUTF8(cx, \"TypeError\");\n      if (!JS_GetPendingException(cx, &exn)) {\n        return false;\n      }\n      JS_ClearPendingException(cx);\n\n      return JS::RejectPromise(cx, response_promise, exn);\n    }\n\n    // TODO: should we also create a rejected promise if a response reads something that's not a\n    // Uint8Array?\n    fprintf(stderr, \"Error: read operation on body ReadableStream didn't respond with a \"\n                    \"Uint8Array. Received value: \");\n    ENGINE->dump_value(val, stderr);\n    return false;\n  }\n\n  host_api::Result<host_api::Void> res;\n  {\n    JS::AutoCheckCannotGC nogc;\n    JSObject *array = &val.toObject();\n    bool is_shared;\n    uint8_t *bytes = JS_GetUint8ArrayData(array, &is_shared, nogc);\n    size_t length = JS_GetTypedArrayByteLength(array);\n    res = body.write_all_back(bytes, length);\n  }\n\n  // Needs to be outside the nogc block in case we need to create an exception.\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  // Read the next chunk.\n  JS::RootedObject promise(cx, JS::ReadableStreamDefaultReaderRead(cx, reader));\n  if (!promise) {\n    return false;\n  }\n\n  return JS::AddPromiseReactions(cx, promise, then_handler, catch_handler);\n}\n\nbool RequestOrResponse::body_reader_catch_handler(JSContext *cx, JS::HandleObject body_owner,\n                                                  JS::HandleValue extra, JS::CallArgs args) {\n  // TODO: check if this should create a rejected promise instead, so an\n  // in-content handler for unhandled rejections could deal with it. The body\n  // stream errored during the streaming send. Not much we can do, but at least\n  // close the stream, and warn.\n  fprintf(stderr, \"Warning: body ReadableStream closed during body streaming. Exception: \");\n  ENGINE->dump_value(args.get(0), stderr);\n\n  // The only response with a body we ever send is the one passed to\n  // `FetchEvent#respondWith` to send to the client. As such, we can be certain\n  // that if we have a response here, we can advance the FetchState to\n  // `responseDone`. (Note that even though we encountered an error,\n  // `responseDone` is the right state: `responsedWithError` is for when sending\n  // a response at all failed.)\n  if (Response::is_instance(body_owner)) {\n    ENGINE->decr_event_loop_interest();\n    JS::RootedValue fetch_event_val(\n        cx, JS::GetReservedSlot(body_owner, static_cast<uint32_t>(Response::Slots::FetchEvent)));\n    if (!fetch_event_val.isObject()) {\n      JS_ReportErrorASCII(cx, \"Response does not have an associated FetchEvent\");\n      return false;\n    }\n    JS::RootedObject fetch_event(cx, &fetch_event_val.toObject());\n    FetchEvent::set_state(fetch_event, FetchEvent::State::responseDone);\n  }\n  return true;\n}\n\nbool RequestOrResponse::maybe_stream_body(JSContext *cx, JS::HandleObject body_owner,\n                                          bool *requires_streaming) {\n  JS::RootedObject stream(cx, RequestOrResponse::body_stream(body_owner));\n  if (!stream) {\n    return true;\n  }\n\n  if (RequestOrResponse::body_unusable(cx, stream)) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                              JSMSG_RESPONSE_BODY_DISTURBED_OR_LOCKED);\n    return false;\n  }\n\n  // If the body stream is backed by a Fastly Compute body handle, we can directly pipe\n  // that handle into the body we're about to send.\n  if (NativeStreamSource::stream_is_body(cx, stream)) {\n    // First, move the source's body handle to the target and lock the stream.\n    JS::RootedObject stream_source(cx, NativeStreamSource::get_stream_source(cx, stream));\n    JS::RootedObject source_owner(cx, NativeStreamSource::owner(stream_source));\n    if (!RequestOrResponse::move_body_handle(cx, source_owner, body_owner)) {\n      return false;\n    }\n\n    // Then, send the request/response without streaming. We know that content\n    // won't append to this body handle, because we don't expose any means to do\n    // so, so it's ok for it to be closed immediately.\n    return true;\n  }\n\n  // Try shortcutting TransformStream by piping native body handle directly\n  bool shortcutted = false;\n  JS::RootedObject stream_source(cx, NativeStreamSource::get_stream_source(cx, stream));\n  if (stream_source && NativeStreamSource::is_instance(stream_source)) {\n    if (!maybe_shortcut_transform_stream_read(cx, stream_source, body_owner, &shortcutted)) {\n      return false;\n    }\n    if (shortcutted) {\n      return true;\n    }\n  }\n\n  JS::RootedObject reader(\n      cx, JS::ReadableStreamGetReader(cx, stream, JS::ReadableStreamReaderMode::Default));\n  if (!reader)\n    return false;\n\n  bool is_closed;\n  if (!JS::ReadableStreamReaderIsClosed(cx, reader, &is_closed))\n    return false;\n\n  // It's ok for the stream to be closed, as its contents might\n  // already have fully been written to the body handle.\n  // In that case, we can do a blocking send instead.\n  if (is_closed) {\n    return true;\n  }\n\n  // Create handlers for both `then` and `catch`.\n  // These are functions with two reserved slots, in which we store all\n  // information required to perform the reactions. We store the actually\n  // required information on the catch handler, and a reference to that on the\n  // then handler. This allows us to reuse these functions for the next read\n  // operation in the then handler. The catch handler won't ever have a need to\n  // perform another operation in this way.\n  JS::RootedObject catch_handler(cx);\n  JS::RootedValue extra(cx, JS::ObjectValue(*reader));\n  catch_handler = create_internal_method<body_reader_catch_handler>(cx, body_owner, extra);\n  if (!catch_handler)\n    return false;\n\n  JS::RootedObject then_handler(cx);\n  extra.setObject(*catch_handler);\n  then_handler = create_internal_method<body_reader_then_handler>(cx, body_owner, extra);\n  if (!then_handler)\n    return false;\n\n  JS::RootedObject promise(cx, JS::ReadableStreamDefaultReaderRead(cx, reader));\n  if (!promise)\n    return false;\n  if (!JS::AddPromiseReactions(cx, promise, then_handler, catch_handler))\n    return false;\n\n  *requires_streaming = true;\n  return true;\n}\n\nJSObject *RequestOrResponse::create_body_stream(JSContext *cx, JS::HandleObject owner) {\n  MOZ_ASSERT(!body_stream(owner));\n  JS::RootedObject source(cx, NativeStreamSource::create(cx, owner, JS::UndefinedHandleValue,\n                                                         body_source_pull_algorithm,\n                                                         body_source_cancel_algorithm));\n  if (!source)\n    return nullptr;\n\n  JS::RootedObject body_stream(cx, NativeStreamSource::stream(source));\n  if (!body_stream) {\n    return nullptr;\n  }\n\n  // TODO: immediately lock the stream if the owner's body is already used.\n\n  JS_SetReservedSlot(owner, static_cast<uint32_t>(Slots::BodyStream),\n                     JS::ObjectValue(*body_stream));\n  return body_stream;\n}\n\nbool RequestOrResponse::backend_get(JSContext *cx, JS::CallArgs args, JS::HandleObject self) {\n  JS::RootedValue backend(cx, JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::Backend)));\n  if (!backend.isString()) {\n    args.rval().setUndefined();\n    return true;\n  }\n\n  host_api::HostString name = core::encode(cx, backend);\n  Backend::get_from_valid_name(cx, std::move(name), args.rval());\n  return true;\n}\n\nbool RequestOrResponse::body_get(JSContext *cx, JS::CallArgs args, JS::HandleObject self,\n                                 bool create_if_undefined) {\n  if (!has_body(self)) {\n    args.rval().setNull();\n    return true;\n  }\n\n  JS::RootedObject body_stream(cx, RequestOrResponse::body_stream(self));\n  if (!body_stream && create_if_undefined) {\n    body_stream = create_body_stream(cx, self);\n    if (!body_stream)\n      return false;\n  }\n\n  args.rval().setObjectOrNull(body_stream);\n  return true;\n}\n\nhost_api::HttpReq Request::request_handle(JSObject *obj) {\n  MOZ_ASSERT(is_instance(obj));\n  return host_api::HttpReq(\n      JS::GetReservedSlot(obj, static_cast<uint32_t>(Request::Slots::Request)).toInt32());\n}\n\nhost_api::HttpPendingReq Request::pending_handle(JSObject *obj) {\n  MOZ_ASSERT(is_instance(obj));\n  host_api::HttpPendingReq res;\n\n  JS::Value handle_val =\n      JS::GetReservedSlot(obj, static_cast<uint32_t>(Request::Slots::PendingRequest));\n  if (handle_val.isInt32()) {\n    res = host_api::HttpPendingReq(handle_val.toInt32());\n  }\n\n  return res;\n}\n\nstd::optional<host_api::HttpCacheEntry> RequestOrResponse::cache_entry(JSObject *obj) {\n  MOZ_ASSERT(is_instance(obj));\n\n  JS::Value handle_val =\n      JS::GetReservedSlot(obj, static_cast<uint32_t>(RequestOrResponse::Slots::CacheEntry));\n\n  if (handle_val.isInt32()) {\n    return host_api::HttpCacheEntry(handle_val.toInt32());\n  }\n\n  return std::nullopt;\n}\n\nstd::optional<host_api::HttpCacheEntry>\nRequestOrResponse::take_cache_entry(JSObject *obj, std::optional<bool> mark_cached) {\n  MOZ_ASSERT(is_instance(obj));\n\n  JS::Value handle_val =\n      JS::GetReservedSlot(obj, static_cast<uint32_t>(RequestOrResponse::Slots::CacheEntry));\n\n  JS::SetReservedSlot(obj, static_cast<uint32_t>(RequestOrResponse::Slots::CacheEntry),\n                      mark_cached.has_value() ? JS::BooleanValue(mark_cached.value())\n                                              : JS::UndefinedValue());\n\n  if (handle_val.isInt32()) {\n    return host_api::HttpCacheEntry(handle_val.toInt32());\n  }\n\n  return std::nullopt;\n}\n\nbool RequestOrResponse::close_if_cache_entry(JSContext *cx, HandleObject self) {\n  MOZ_ASSERT(is_instance(self));\n  auto maybe_cache_entry = RequestOrResponse::take_cache_entry(self, std::nullopt);\n  if (!maybe_cache_entry.has_value()) {\n    return true;\n  }\n  auto res = maybe_cache_entry.value().close();\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  return true;\n}\n\nbool Request::is_downstream(JSObject *obj) {\n  return JS::GetReservedSlot(obj, static_cast<uint32_t>(Slots::IsDownstream)).toBoolean();\n}\n\nJSString *RequestOrResponse::backend(JSObject *obj) {\n  MOZ_ASSERT(is_instance(obj));\n  auto val = JS::GetReservedSlot(obj, static_cast<uint32_t>(Slots::Backend));\n  return val.isString() ? val.toString() : nullptr;\n}\n\nJSObject *Request::response_promise(JSObject *obj) {\n  MOZ_ASSERT(is_instance(obj));\n  return &JS::GetReservedSlot(obj, static_cast<uint32_t>(Request::Slots::ResponsePromise))\n              .toObject();\n}\n\nJSString *Request::method(JSContext *cx, JS::HandleObject obj) {\n  MOZ_ASSERT(is_instance(obj));\n  return JS::GetReservedSlot(obj, static_cast<uint32_t>(Slots::Method)).toString();\n}\n\nbool Request::set_cache_key(JSContext *cx, JS::HandleObject self, JS::HandleValue cache_key_val) {\n  MOZ_ASSERT(is_instance(self));\n  JS::RootedString cache_key_str(cx, JS::ToString(cx, cache_key_val));\n  if (!cache_key_str) {\n    return false;\n  }\n  JS::RootedValue cache_key_str_val(cx, JS::StringValue(cache_key_str));\n  // Convert the key argument into a String following https://tc39.es/ecma262/#sec-tostring\n  auto keyString = core::encode(cx, cache_key_str_val);\n  if (!keyString) {\n    return false;\n  }\n  std::string hex_str;\n  picosha2::hash256_hex_string(keyString, hex_str);\n  std::transform(hex_str.begin(), hex_str.end(), hex_str.begin(),\n                 [](unsigned char c) { return std::toupper(c); });\n\n  JS::RootedObject headers(cx, Request::headers(cx, self));\n  if (!headers) {\n    return false;\n  }\n  JS::SetReservedSlot(self, static_cast<uint32_t>(Slots::OverrideCacheKey), cache_key_str_val);\n  JS::RootedString hex_str_js(cx, JS_NewStringCopyN(cx, hex_str.c_str(), hex_str.length()));\n  JS::RootedValue value_val(cx, JS::StringValue(hex_str_js));\n  if (!Headers::append_valid_header(cx, headers, \"fastly-xqd-cache-key\", value_val,\n                                    \"Request.prototype.setCacheKey\")) {\n    return false;\n  }\n\n  return true;\n}\n\nbool Request::set_image_optimizer_options(JSContext *cx, JS::HandleObject self,\n                                          JS::HandleValue opts_val) {\n  MOZ_ASSERT(is_instance(self));\n\n  auto opts = image_optimizer::ImageOptimizerOptions::create(cx, opts_val);\n  if (!opts) {\n    return false;\n  }\n  JS::SetReservedSlot(self, static_cast<uint32_t>(Request::Slots::ImageOptimizerOptions),\n                      JS::PrivateValue(opts.release()));\n  return true;\n}\n\nbool Request::set_cache_override(JSContext *cx, JS::HandleObject self,\n                                 JS::HandleValue cache_override) {\n  MOZ_ASSERT(is_instance(self));\n\n  JS::RootedObject override(cx);\n  if (CacheOverride::is_instance(cache_override)) {\n    JS::RootedObject input(cx, &cache_override.toObject());\n    override = CacheOverride::clone(cx, input);\n    if (!override) {\n      return false;\n    }\n  } else if (cache_override.isObject() || cache_override.isString()) {\n    // support constructing the cache override dynamically\n    override = CacheOverride::create(cx, cache_override);\n    if (!override) {\n      return false;\n    }\n  } else {\n    JS_ReportErrorUTF8(cx, \"Value passed in as cacheOverride must be an \"\n                           \"instance of CacheOverride or an object with the same interface\");\n    return false;\n  }\n\n  JS::SetReservedSlot(self, static_cast<uint32_t>(Slots::CacheOverride),\n                      JS::ObjectValue(*override));\n  return true;\n}\n\nbool Request::apply_auto_decompress_gzip(JSContext *cx, JS::HandleObject self) {\n  MOZ_ASSERT(cx);\n  MOZ_ASSERT(is_instance(self));\n\n  JS::RootedValue decompressGzipSlot(\n      cx, JS::GetReservedSlot(self, static_cast<uint32_t>(Request::Slots::AutoDecompressGzip)));\n\n  auto decompress = JS::ToBoolean(decompressGzipSlot);\n  if (!decompress) {\n    return true;\n  }\n\n  auto res = Request::request_handle(self).auto_decompress_gzip();\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  return true;\n}\n\n/**\n * Apply the CacheOverride to a host-side request handle (for non HTTP cache API).\n */\nbool Request::apply_cache_override(JSContext *cx, JS::HandleObject self) {\n  MOZ_ASSERT(is_instance(self));\n  JS::RootedObject override(\n      cx, JS::GetReservedSlot(self, static_cast<uint32_t>(Request::Slots::CacheOverride))\n              .toObjectOrNull());\n  if (!override) {\n    return true;\n  }\n\n  std::optional<uint32_t> ttl;\n  JS::RootedValue val(cx, CacheOverride::ttl(override));\n  if (!val.isUndefined()) {\n    ttl = val.toInt32();\n  }\n\n  std::optional<uint32_t> stale_while_revalidate;\n  val = CacheOverride::swr(override);\n  if (!val.isUndefined()) {\n    stale_while_revalidate = val.toInt32();\n  }\n\n  host_api::HostString sk_chars;\n  std::optional<std::string_view> surrogate_key;\n  val = CacheOverride::surrogate_key(override);\n  if (!val.isUndefined()) {\n    sk_chars = core::encode(cx, val);\n    if (!sk_chars) {\n      return false;\n    }\n\n    surrogate_key.emplace(sk_chars);\n  }\n\n  auto tag = CacheOverride::abi_tag(override);\n  auto res =\n      Request::request_handle(self).cache_override(tag, ttl, stale_while_revalidate, surrogate_key);\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  return true;\n}\n\nbool Request::method_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  JSString *method = Request::method(cx, self);\n  if (!method)\n    return false;\n\n  args.rval().setString(method);\n  return true;\n}\n\nbool Request::url_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  args.rval().set(RequestOrResponse::url(self));\n  return true;\n}\n\nbool Request::version_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  auto res = request_handle(self).get_version();\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  args.rval().setInt32(res.unwrap());\n  return true;\n}\n\nbool Request::headers_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  JSObject *headers = Request::headers(cx, self);\n  if (!headers)\n    return false;\n\n  args.rval().setObject(*headers);\n  return true;\n}\n\ntemplate <RequestOrResponse::BodyReadResult result_type>\nbool Request::bodyAll(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n  return RequestOrResponse::bodyAll<result_type, false>(cx, args, self);\n}\n\nbool Request::backend_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n  return RequestOrResponse::backend_get(cx, args, self);\n}\n\nbool Request::body_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n  return RequestOrResponse::body_get(cx, args, self, is_downstream(self));\n}\n\nbool Request::bodyUsed_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n  args.rval().setBoolean(RequestOrResponse::body_used(self));\n  return true;\n}\n\nbool Request::setCacheOverride(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(1)\n\n  if (!set_cache_override(cx, self, args[0]))\n    return false;\n\n  args.rval().setUndefined();\n  return true;\n}\n\nbool Request::setCacheKey(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(1)\n\n  if (!set_cache_key(cx, self, args[0])) {\n    return false;\n  }\n\n  args.rval().setUndefined();\n  return true;\n}\n\nbool Request::setManualFramingHeaders(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(1)\n\n  bool manualFramingHeaders = JS::ToBoolean(args.get(0));\n  JS::SetReservedSlot(self, static_cast<uint32_t>(Slots::ManualFramingHeaders),\n                      JS::BooleanValue(manualFramingHeaders));\n  auto handle = request_handle(self);\n  host_api::Result<host_api::Void> res;\n  if (manualFramingHeaders) {\n    res = handle.set_framing_headers_mode(host_api::FramingHeadersMode::ManuallyFromHeaders);\n  } else {\n    res = handle.set_framing_headers_mode(host_api::FramingHeadersMode::Automatic);\n  }\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  args.rval().setUndefined();\n  return true;\n}\n\nJSString *GET_atom;\n\nbool Request::clone(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0);\n\n  auto request_handle_res = host_api::HttpReq::make();\n  if (auto *err = request_handle_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  auto request_handle = request_handle_res.unwrap();\n\n  JS::RootedObject requestInstance(cx, Request::create_instance(cx));\n  JS::SetReservedSlot(requestInstance, static_cast<uint32_t>(Slots::Request),\n                      JS::Int32Value(request_handle.handle));\n  JS::SetReservedSlot(requestInstance, static_cast<uint32_t>(Slots::BodyUsed), JS::FalseValue());\n  JS::SetReservedSlot(requestInstance, static_cast<uint32_t>(Slots::URL),\n                      JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::URL)));\n  JS::SetReservedSlot(requestInstance, static_cast<uint32_t>(Slots::IsDownstream),\n                      JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::IsDownstream)));\n  JS::RootedValue manualFramingHeaders(\n      cx, JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::ManualFramingHeaders)));\n  JS::SetReservedSlot(requestInstance, static_cast<uint32_t>(Slots::ManualFramingHeaders),\n                      manualFramingHeaders);\n  if (JS::ToBoolean(manualFramingHeaders)) {\n    auto res =\n        request_handle.set_framing_headers_mode(host_api::FramingHeadersMode::ManuallyFromHeaders);\n    if (auto *err = res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return false;\n    }\n  }\n  JS::RootedValue backend(cx, JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::Backend)));\n  if (!backend.isNullOrUndefined()) {\n    JS::SetReservedSlot(requestInstance, static_cast<uint32_t>(Slots::Backend), backend);\n  }\n\n  auto hasBody = RequestOrResponse::has_body(self);\n\n  JS::SetReservedSlot(requestInstance, static_cast<uint32_t>(Slots::HasBody),\n                      JS::BooleanValue(hasBody));\n\n  if (hasBody) {\n    if (RequestOrResponse::body_used(self)) {\n      JS_ReportErrorLatin1(cx, \"Request.prototype.clone: the request's body isn't usable.\");\n      return false;\n    }\n\n    // Here we get the current requests body stream and call ReadableStream.prototype.tee to return\n    // two versions of the stream. Once we get the two streams, we create a new request handle and\n    // attach one of the streams to the new handle and the other stream is attached to the request\n    // handle that `clone()` was called upon.\n    JS::RootedObject body_stream(cx, RequestOrResponse::body_stream(self));\n    if (!body_stream) {\n      body_stream = RequestOrResponse::create_body_stream(cx, self);\n      if (!body_stream) {\n        return false;\n      }\n    }\n    JS::RootedValue tee_val(cx);\n    if (!JS_GetProperty(cx, body_stream, \"tee\", &tee_val)) {\n      return false;\n    }\n    JS::Rooted<JSFunction *> tee(cx, JS_GetObjectFunction(&tee_val.toObject()));\n    if (!tee) {\n      return false;\n    }\n    JS::RootedVector<JS::Value> argv(cx);\n    JS::RootedValue rval(cx);\n    if (!JS::Call(cx, body_stream, tee, argv, &rval)) {\n      return false;\n    }\n    JS::RootedObject rval_array(cx, &rval.toObject());\n    JS::RootedValue body1_val(cx);\n    if (!JS_GetProperty(cx, rval_array, \"0\", &body1_val)) {\n      return false;\n    }\n    JS::RootedValue body2_val(cx);\n    if (!JS_GetProperty(cx, rval_array, \"1\", &body2_val)) {\n      return false;\n    }\n\n    auto res = host_api::HttpBody::make();\n    if (auto *err = res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return false;\n    }\n\n    auto body_handle = res.unwrap();\n    if (!JS::IsReadableStream(&body1_val.toObject())) {\n      return false;\n    }\n    body_stream.set(&body1_val.toObject());\n    if (RequestOrResponse::body_unusable(cx, body_stream)) {\n      JS_ReportErrorNumberLatin1(cx, FastlyGetErrorMessage, nullptr,\n                                 JSMSG_READABLE_STREAM_LOCKED_OR_DISTRUBED);\n      return false;\n    }\n\n    JS::SetReservedSlot(requestInstance, static_cast<uint32_t>(Slots::Body),\n                        JS::Int32Value(body_handle.handle));\n    JS::SetReservedSlot(requestInstance, static_cast<uint32_t>(Slots::BodyStream), body1_val);\n\n    JS::SetReservedSlot(self, static_cast<uint32_t>(Slots::BodyStream), body2_val);\n    JS::SetReservedSlot(self, static_cast<uint32_t>(Slots::BodyUsed), JS::FalseValue());\n    JS::SetReservedSlot(self, static_cast<uint32_t>(Slots::HasBody), JS::BooleanValue(true));\n  }\n\n  JS::RootedObject headers(cx, Request::headers(cx, self));\n  if (!headers) {\n    return false;\n  }\n\n  JS::SetReservedSlot(requestInstance, static_cast<uint32_t>(Slots::Headers),\n                      JS::ObjectValue(*headers));\n\n  JS::RootedString method(cx, Request::method(cx, self));\n  if (!method) {\n    return false;\n  }\n\n  JS::SetReservedSlot(requestInstance, static_cast<uint32_t>(Slots::Method),\n                      JS::StringValue(method));\n  JS::RootedValue cache_override(\n      cx, JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::CacheOverride)));\n  if (!cache_override.isNullOrUndefined()) {\n    if (!set_cache_override(cx, requestInstance, cache_override)) {\n      return false;\n    }\n  } else {\n    JS::SetReservedSlot(requestInstance, static_cast<uint32_t>(Slots::CacheOverride),\n                        cache_override);\n  }\n\n  JS::RootedValue override_cache_key(\n      cx, JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::OverrideCacheKey)));\n  JS::SetReservedSlot(requestInstance, static_cast<uint32_t>(Slots::OverrideCacheKey),\n                      override_cache_key);\n\n  JS::RootedValue image_optimizer_options(\n      cx, JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::ImageOptimizerOptions)));\n  if (!image_optimizer_options.isNullOrUndefined()) {\n    if (!set_image_optimizer_options(cx, requestInstance, image_optimizer_options)) {\n      return false;\n    }\n  } else {\n    JS::SetReservedSlot(requestInstance, static_cast<uint32_t>(Slots::ImageOptimizerOptions),\n                        image_optimizer_options);\n  }\n\n  args.rval().setObject(*requestInstance);\n  return true;\n}\n\nconst JSFunctionSpec Request::static_methods[] = {\n    JS_FS_END,\n};\n\nconst JSPropertySpec Request::static_properties[] = {\n    JS_PS_END,\n};\n\nconst JSFunctionSpec Request::methods[] = {\n    JS_FN(\"arrayBuffer\", Request::bodyAll<RequestOrResponse::BodyReadResult::ArrayBuffer>, 0,\n          JSPROP_ENUMERATE),\n    JS_FN(\"blob\", Request::bodyAll<RequestOrResponse::BodyReadResult::Blob>, 0, JSPROP_ENUMERATE),\n    JS_FN(\"formData\", Request::bodyAll<RequestOrResponse::BodyReadResult::FormData>, 0,\n          JSPROP_ENUMERATE),\n    JS_FN(\"json\", Request::bodyAll<RequestOrResponse::BodyReadResult::JSON>, 0, JSPROP_ENUMERATE),\n    JS_FN(\"text\", Request::bodyAll<RequestOrResponse::BodyReadResult::Text>, 0, JSPROP_ENUMERATE),\n    JS_FN(\"setCacheOverride\", Request::setCacheOverride, 3, JSPROP_ENUMERATE),\n    JS_FN(\"setCacheKey\", Request::setCacheKey, 0, JSPROP_ENUMERATE),\n    JS_FN(\"setManualFramingHeaders\", Request::setManualFramingHeaders, 1, JSPROP_ENUMERATE),\n    JS_FN(\"clone\", Request::clone, 0, JSPROP_ENUMERATE),\n    JS_FS_END,\n};\n\nconst JSPropertySpec Request::properties[] = {\n    JS_PSG(\"method\", method_get, JSPROP_ENUMERATE),\n    JS_PSG(\"url\", url_get, JSPROP_ENUMERATE),\n    JS_PSG(\"version\", version_get, JSPROP_ENUMERATE),\n    JS_PSG(\"headers\", headers_get, JSPROP_ENUMERATE),\n    JS_PSG(\"backend\", backend_get, JSPROP_ENUMERATE),\n    JS_PSG(\"body\", body_get, JSPROP_ENUMERATE),\n    JS_PSG(\"bodyUsed\", bodyUsed_get, JSPROP_ENUMERATE),\n    JS_PSG(\"isCacheable\", isCacheable_get, JSPROP_ENUMERATE),\n    JS_STRING_SYM_PS(toStringTag, \"Request\", JSPROP_READONLY),\n    JS_PS_END,\n};\n\nbool Request::init_class(JSContext *cx, JS::HandleObject global) {\n  if (!init_class_impl(cx, global)) {\n    return false;\n  }\n\n  // Initialize a pinned (i.e., never-moved, living forever) atom for the\n  // default HTTP method.\n  GET_atom = JS_AtomizeAndPinString(cx, \"GET\");\n  return !!GET_atom;\n}\n\nJSObject *Request::create(JSContext *cx, JS::HandleObject requestInstance,\n                          host_api::HttpReq request_handle, host_api::HttpBody body_handle,\n                          bool is_downstream) {\n  JS::SetReservedSlot(requestInstance, static_cast<uint32_t>(Slots::Request),\n                      JS::Int32Value(request_handle.handle));\n  JS::SetReservedSlot(requestInstance, static_cast<uint32_t>(Slots::Headers), JS::NullValue());\n  JS::SetReservedSlot(requestInstance, static_cast<uint32_t>(Slots::Body),\n                      JS::Int32Value(body_handle.handle));\n  JS::SetReservedSlot(requestInstance, static_cast<uint32_t>(Slots::BodyStream), JS::NullValue());\n  JS::SetReservedSlot(requestInstance, static_cast<uint32_t>(Slots::HasBody), JS::FalseValue());\n  JS::SetReservedSlot(requestInstance, static_cast<uint32_t>(Slots::BodyUsed), JS::FalseValue());\n  JS::SetReservedSlot(requestInstance, static_cast<uint32_t>(Slots::Method),\n                      JS::StringValue(GET_atom));\n  JS::SetReservedSlot(requestInstance, static_cast<uint32_t>(Slots::OverrideCacheKey),\n                      JS::NullValue());\n  JS::SetReservedSlot(requestInstance, static_cast<uint32_t>(Slots::CacheOverride),\n                      JS::NullValue());\n  JS::SetReservedSlot(requestInstance, static_cast<uint32_t>(Slots::ImageOptimizerOptions),\n                      JS::NullValue());\n  JS::SetReservedSlot(requestInstance, static_cast<uint32_t>(Slots::IsDownstream),\n                      JS::BooleanValue(is_downstream));\n  return requestInstance;\n}\n\n/**\n * Create a new Request object, roughly according to\n * https://fetch.spec.whatwg.org/#dom-request\n *\n * \"Roughly\" because not all aspects of Request handling make sense in Fastly Compute.\n * The places where we deviate from the spec are called out inline.\n */\nJSObject *Request::create(JSContext *cx, JS::HandleObject requestInstance, JS::HandleValue input,\n                          JS::HandleValue init_val) {\n  auto request_handle_res = host_api::HttpReq::make();\n  if (auto *err = request_handle_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return nullptr;\n  }\n\n  auto body = host_api::HttpBody::make();\n  if (auto *err = body.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return nullptr;\n  }\n\n  auto request_handle = request_handle_res.unwrap();\n  JS::RootedObject request(cx, create(cx, requestInstance, request_handle, body.unwrap(), false));\n  if (!request) {\n    return nullptr;\n  }\n\n  JS::RootedString url_str(cx);\n  JS::RootedString method_str(cx);\n  bool method_needs_normalization = false;\n\n  JS::RootedObject input_request(cx);\n  JS::RootedValue input_headers(cx);\n  bool input_has_body = false;\n\n  // 1.  Let `request` be null.\n  // 4.  Let `signal` be null.\n  // (implicit)\n\n  // 2.  Let `fallbackMode` be null.\n  // (N/A)\n\n  // 3.  Let `baseURL` be this’s relevant settings object’s API base URL.\n  // (implicit)\n\n  // 6.  Otherwise:\n  // (reordered because it's easier to check is_instance and otherwise\n  // stringify.)\n  if (is_instance(input)) {\n    input_request = &input.toObject();\n    input_has_body = RequestOrResponse::has_body(input_request);\n\n    // 1.  Assert: `input` is a `Request` object.\n    // 2.  Set `request` to `input`’s request.\n    // (implicit)\n\n    // 3.  Set `signal` to `input`’s signal.\n    // (signals not yet supported)\n\n    // 12.  Set `request` to a new request with the following properties:\n    // (moved into step 6 because we can leave everything at the default values\n    // if step 5 runs.) URL: `request`’s URL. Will actually be applied below.\n    url_str = RequestOrResponse::url(input_request).toString();\n\n    // method: `request`’s method.\n    method_str = Request::method(cx, input_request);\n    if (!method_str) {\n      return nullptr;\n    }\n\n    // referrer: `request`’s referrer.\n    // TODO: evaluate whether we want to implement support for setting the\n    // `referer` [sic] header based on this or not.\n\n    // cache mode: `request`’s cache mode.\n    // TODO: implement support for cache mode-based headers setting.\n\n    // header list: A copy of `request`’s header list.\n    // Note: copying the headers is postponed, see step 32 below.\n    JS::RootedObject headers_obj(cx, Request::headers(cx, input_request));\n    if (!headers_obj) {\n      return nullptr;\n    }\n    input_headers = JS::ObjectValue(*headers_obj);\n\n    // The following properties aren't applicable:\n    // unsafe-request flag: Set.\n    // client: This’s relevant settings object.\n    // window: `window`.\n    // priority: `request`’s priority\n    // origin: `request`’s origin.\n    // referrer policy: `request`’s referrer policy.\n    // mode: `request`’s mode.\n    // credentials mode: `request`’s credentials mode.\n    // redirect mode: `request`’s redirect mode.\n    // integrity metadata: `request`’s integrity metadata.\n    // keepalive: `request`’s keepalive.\n    // reload-navigation flag: `request`’s reload-navigation flag.\n    // history-navigation flag: `request`’s history-navigation flag.\n    // URL list: A clone of `request`’s URL list.\n  }\n\n  // 5.  If `input` is a string, then:\n  else {\n    // 1.  Let `parsedURL` be the result of parsing `input` with `baseURL`.\n    JS::RootedObject url_instance(cx, JS_NewObjectWithGivenProto(cx, &URL::class_, URL::proto_obj));\n    if (!url_instance)\n      return nullptr;\n\n    JS::RootedObject parsedURL(cx, URL::create(cx, url_instance, input, fastly::Fastly::baseURL));\n\n    // 2.  If `parsedURL` is failure, then throw a `TypeError`.\n    if (!parsedURL) {\n      return nullptr;\n    }\n\n    // 3.  If `parsedURL` includes credentials, then throw a `TypeError`.\n    // (N/A)\n\n    // 4.  Set `request` to a new request whose URL is `parsedURL`.\n    // Instead, we store `url_str` to apply below.\n    JS::RootedValue url_val(cx, JS::ObjectValue(*parsedURL));\n    url_str = JS::ToString(cx, url_val);\n    if (!url_str) {\n      return nullptr;\n    }\n\n    // 5.  Set `fallbackMode` to \"`cors`\".\n    // (N/A)\n  }\n\n  // Actually set the URL derived in steps 5 or 6 above.\n  RequestOrResponse::set_url(request, StringValue(url_str));\n  auto url = core::encode(cx, url_str);\n  if (!url) {\n    return nullptr;\n  } else {\n    auto res = request_handle.set_uri(url);\n    if (auto *err = res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return nullptr;\n    }\n  }\n\n  // 7.  Let `origin` be this’s relevant settings object’s origin.\n  // 8.  Let `window` be \"`client`\".\n  // 9.  If `request`’s window is an environment settings object and its origin\n  // is same origin with `origin`, then set `window` to `request`’s window.\n  // 10.  If `init`[\"window\"] exists and is non-null, then throw a `TypeError.\n  // 11.  If `init`[\"window\"] exists, then set `window` to \"`no-window`\".\n  // (N/A)\n\n  // Extract all relevant properties from the init object.\n  // TODO: evaluate how much we care about precisely matching evaluation order.\n  // If \"a lot\", we need to make sure that all side effects that value\n  // conversions might trigger occur in the right order—presumably by running\n  // them all right here as WebIDL bindings would.\n  JS::RootedValue method_val(cx);\n  JS::RootedValue headers_val(cx);\n  JS::RootedValue body_val(cx);\n  JS::RootedValue backend_val(cx);\n  JS::RootedValue cache_override(cx);\n  JS::RootedValue cache_key(cx);\n  JS::RootedValue fastly_val(cx);\n  JS::RootedValue image_optimizer_options(cx);\n  bool hasManualFramingHeaders = false;\n  bool setManualFramingHeaders = false;\n  if (init_val.isObject()) {\n    JS::RootedValue manualFramingHeaders(cx);\n    JS::RootedObject init(cx, init_val.toObjectOrNull());\n    if (!JS_GetProperty(cx, init, \"method\", &method_val) ||\n        !JS_GetProperty(cx, init, \"headers\", &headers_val) ||\n        !JS_GetProperty(cx, init, \"body\", &body_val) ||\n        !JS_GetProperty(cx, init, \"backend\", &backend_val) ||\n        !JS_GetProperty(cx, init, \"cacheOverride\", &cache_override) ||\n        !JS_GetProperty(cx, init, \"cacheKey\", &cache_key) ||\n        !JS_GetProperty(cx, init, \"fastly\", &fastly_val) ||\n        !JS_HasOwnProperty(cx, init, \"manualFramingHeaders\", &hasManualFramingHeaders) ||\n        !JS_GetProperty(cx, init, \"manualFramingHeaders\", &manualFramingHeaders) ||\n        !JS_GetProperty(cx, init, \"imageOptimizerOptions\", &image_optimizer_options)) {\n      return nullptr;\n    }\n    setManualFramingHeaders = manualFramingHeaders.isBoolean() && manualFramingHeaders.toBoolean();\n  } else if (!init_val.isNullOrUndefined()) {\n    JS_ReportErrorLatin1(cx, \"Request constructor: |init| parameter can't be converted to \"\n                             \"a dictionary\");\n    return nullptr;\n  }\n\n  // 13.  If `init` is not empty, then:\n  // 1.  If `request`’s mode is \"`navigate`\", then set it to \"`same-origin`\".\n  // 2.  Unset `request`’s reload-navigation flag.\n  // 3.  Unset `request`’s history-navigation flag.\n  // 4.  Set `request`’s origin to \"`client`\".\n  // 5.  Set `request`’s referrer to \"`client`\".\n  // 6.  Set `request`’s referrer policy to the empty string.\n  // 7.  Set `request`’s URL to `request`’s current URL.\n  // 8.  Set `request`’s URL list to « `request`’s URL ».\n  // (N/A)\n\n  // 14.  If `init[\"referrer\"]` exists, then:\n  // TODO: implement support for referrer application.\n  // 1.  Let `referrer` be `init[\"referrer\"]`.\n  // 2.  If `referrer` is the empty string, then set `request`’s referrer to\n  // \"`no-referrer`\".\n  // 3.  Otherwise:\n  //   1.  Let `parsedReferrer` be the result of parsing `referrer` with\n  //   `baseURL`.\n  //   2.  If `parsedReferrer` is failure, then throw a `TypeError`.\n\n  //   3.  If one of the following is true\n  //     *   `parsedReferrer`’s scheme is \"`about`\" and path is the string\n  //     \"`client`\"\n  //     *   `parsedReferrer`’s origin is not same origin with `origin`\n  //     then set `request`’s referrer to \"`client`\".\n  //   (N/A)\n\n  //   4.  Otherwise, set `request`’s referrer to `parsedReferrer`.\n\n  // 15.  If `init[\"referrerPolicy\"]` exists, then set `request`’s referrer\n  // policy to it.\n  // 16.  Let `mode` be `init[\"mode\"]` if it exists, and `fallbackMode`\n  // otherwise.\n  // 17.  If `mode` is \"`navigate`\", then throw a `TypeError`.\n  // 18.  If `mode` is non-null, set `request`’s mode to `mode`.\n  // 19.  If `init[\"credentials\"]` exists, then set `request`’s credentials mode\n  // to it. (N/A)\n\n  // 20.  If `init[\"cache\"]` exists, then set `request`’s cache mode to it.\n  // TODO: implement support for cache mode application.\n\n  // 21.  If `request`’s cache mode is \"`only-if-cached`\" and `request`’s mode\n  // is _not_\n  //      \"`same-origin`\", then throw a TypeError.\n  // 22.  If `init[\"redirect\"]` exists, then set `request`’s redirect mode to\n  // it.\n  // 23.  If `init[\"integrity\"]` exists, then set `request`’s integrity metadata\n  // to it.\n  // 24.  If `init[\"keepalive\"]` exists, then set `request`’s keepalive to it.\n  // (N/A)\n\n  // 25.  If `init[\"method\"]` exists, then:\n  if (!method_val.isUndefined()) {\n    // 1.  Let `method` be `init[\"method\"]`.\n    method_str = JS::ToString(cx, method_val);\n    if (!method_str) {\n      return nullptr;\n    }\n\n    // 2.  If `method` is not a method or `method` is a forbidden method, then\n    // throw a\n    //     `TypeError`.\n    // TODO: evaluate whether we should barr use of methods forbidden by the\n    // WHATWG spec.\n\n    // 3.  Normalize `method`.\n    // Delayed to below to reduce some code duplication.\n    method_needs_normalization = true;\n\n    // 4.  Set `request`’s method to `method`.\n    // Done below, unified with the non-init case.\n  }\n\n  // Apply the method derived in step 6 or 25.\n  // This only needs to happen if the method was set explicitly and isn't the\n  // default `GET`.\n  bool is_get = true;\n  if (method_str && !JS_StringEqualsLiteral(cx, method_str, \"GET\", &is_get)) {\n    return nullptr;\n  }\n\n  bool is_get_or_head = is_get;\n\n  if (!is_get) {\n    auto method = core::encode(cx, method_str);\n    if (!method) {\n      return nullptr;\n    }\n\n    if (method_needs_normalization) {\n      if (common::normalize_http_method(method.begin(), method.len)) {\n        // Replace the JS string with the normalized name.\n        method_str = JS_NewStringCopyN(cx, method.begin(), method.len);\n        if (!method_str) {\n          return nullptr;\n        }\n      }\n    }\n\n    is_get_or_head = strcmp(method.begin(), \"GET\") == 0 || strcmp(method.begin(), \"HEAD\") == 0;\n\n    JS::SetReservedSlot(request, static_cast<uint32_t>(Slots::Method), JS::StringValue(method_str));\n    auto res = request_handle.set_method(method);\n    if (auto *err = res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return nullptr;\n    }\n  }\n\n  // 26.  If `init[\"signal\"]` exists, then set `signal` to it.\n  // (signals NYI)\n\n  // 27.  Set this’s request to `request`.\n  // (implicit)\n\n  // 28.  Set this’s signal to a new `AbortSignal` object with this’s relevant\n  // Realm.\n  // 29.  If `signal` is not null, then make this’s signal follow `signal`.\n  // (signals NYI)\n\n  // 30.  Set this’s headers to a new `Headers` object with this’s relevant\n  // Realm, whose header list is `request`’s header list and guard is\n  // \"`request`\". (implicit)\n\n  // 31.  If this’s requests mode is \"`no-cors`\", then:\n  // 1.  If this’s requests method is not a CORS-safelisted method, then throw a\n  // `TypeError`.\n  // 2.  Set this’s headers’s guard to \"`request-no-cors`\".\n  // (N/A)\n\n  // 32.  If `init` is not empty, then:\n  // 1.  Let `headers` be a copy of this’s headers and its associated header\n  // list.\n  // 2.  If `init[\"headers\"]` exists, then set `headers` to `init[\"headers\"]`.\n  // 3.  Empty this’s headers’s header list.\n  // 4.  If `headers` is a `Headers` object, then for each `header` in its\n  // header list, append (`header`’s name, `header`’s value) to this’s headers.\n  // 5.  Otherwise, fill this’s headers with `headers`.\n  // Note: the substeps of 32 are somewhat convoluted because they don't just\n  // serve to ensure that the contents of `init[\"headers\"]` are added to the\n  // request's headers, but also that all headers, including those from the\n  // `input` object are sanitized in accordance with the request's `mode`. Since\n  // we don't implement this sanitization, we do a much simpler thing: if\n  // `init[\"headers\"]` exists, create the request's `headers` from that,\n  // otherwise create it from the `init` object's `headers`, or create a new,\n  // empty one.\n  JS::RootedObject headers(cx);\n  if (!headers_val.isUndefined()) {\n    headers = Headers::create(cx, headers_val, Headers::HeadersGuard::Request);\n  } else {\n    headers = Headers::create(cx, input_headers, Headers::HeadersGuard::Request);\n  }\n\n  if (!headers) {\n    return nullptr;\n  }\n\n  JS::SetReservedSlot(request, static_cast<uint32_t>(Slots::Headers), JS::ObjectValue(*headers));\n\n  // 33.  Let `inputBody` be `input`’s requests body if `input` is a `Request`\n  // object;\n  //      otherwise null.\n  // (skipped)\n\n  // 34.  If either `init[\"body\"]` exists and is non-null or `inputBody` is\n  // non-null, and `request`’s method is ``GET`` or ``HEAD``, then throw a\n  // TypeError.\n  if ((input_has_body || !body_val.isNullOrUndefined()) && is_get_or_head) {\n    api::throw_error(cx, FetchErrors::InvalidInitArg, \"Request constructor\");\n    return nullptr;\n  }\n\n  // 35.  Let `initBody` be null.\n  // (skipped)\n\n  // Note: steps 36-41 boil down to \"if there's an init body, use that.\n  // Otherwise, if there's an input body, use that, but proxied through a\n  // TransformStream to make sure it's not consumed by something else in the\n  // meantime.\" Given that, we're restructuring things quite a bit below.\n\n  // 36.  If `init[\"body\"]` exists and is non-null, then:\n  if (!body_val.isNullOrUndefined()) {\n    // 1.  Let `Content-Type` be null.\n    // 2.  Set `initBody` and `Content-Type` to the result of extracting\n    // `init[\"body\"]`, with\n    //     `keepalive` set to `request`’s keepalive.\n    // 3.  If `Content-Type` is non-null and this’s headers’s header list does\n    // not contain\n    //     ``Content-Type``, then append (``Content-Type``, `Content-Type`) to\n    //     this’s headers.\n    // Note: these steps are all inlined into RequestOrResponse::extract_body.\n    if (!RequestOrResponse::extract_body(cx, request, body_val)) {\n      return nullptr;\n    }\n  } else if (input_has_body) {\n    // 37.  Let `inputOrInitBody` be `initBody` if it is non-null; otherwise\n    // `inputBody`. (implicit)\n    // 38.  If `inputOrInitBody` is non-null and `inputOrInitBody`’s source is\n    // null, then:\n    // 1.  If this’s requests mode is neither \"`same-origin`\" nor \"`cors`\", then\n    // throw a `TypeError.\n    // 2.  Set this’s requests use-CORS-preflight flag.\n    // (N/A)\n    // 39.  Let `finalBody` be `inputOrInitBody`.\n    // 40.  If `initBody` is null and `inputBody` is non-null, then:\n    // (implicit)\n    // 1.  If `input` is unusable, then throw a TypeError.\n    // 2.  Set `finalBody` to the result of creating a proxy for `inputBody`.\n\n    // All the above steps boil down to \"if the input request has an unusable\n    // body, throw. Otherwise, use the body.\" Our implementation is a bit more\n    // involved, because we might not have a body reified as a ReadableStream at\n    // all, in which case we can directly append the input body to the new\n    // request's body with a single hostcall.\n\n    JS::RootedObject inputBody(cx, RequestOrResponse::body_stream(input_request));\n\n    // Throw an error if the input request's body isn't usable.\n    if (RequestOrResponse::body_used(input_request) ||\n        (inputBody && RequestOrResponse::body_unusable(cx, inputBody))) {\n      JS_ReportErrorLatin1(cx, \"Request constructor: the input request's body isn't usable.\");\n      return nullptr;\n    }\n\n    if (!inputBody) {\n      // If `inputBody` is null, that means that it was never created, and hence\n      // content can't have access to it. Instead of reifying it here to pass it\n      // into a TransformStream, we just append the body on the host side and\n      // mark it as used on the input Request.\n      RequestOrResponse::append_body(cx, request, input_request);\n      RequestOrResponse::mark_body_used(cx, input_request);\n    } else {\n      // Track source Request with native body before creating proxy\n      bool has_native_body = NativeStreamSource::stream_is_body(cx, inputBody);\n\n      if (has_native_body) {\n        // Technically speaking, the spec says we must create a proxy,\n        // but this has caused us so many problems that we're going to cheat and just\n        // re-use the existing stream.\n        set_up_shortcutting(cx, inputBody, request);\n      } else {\n        inputBody = TransformStream::create_rs_proxy(cx, inputBody);\n        if (!inputBody) {\n          return nullptr;\n        }\n\n        TransformStream::set_readable_used_as_body(cx, inputBody, request);\n      }\n      JS::SetReservedSlot(request, static_cast<uint32_t>(Slots::BodyStream),\n                          JS::ObjectValue(*inputBody));\n    }\n\n    JS::SetReservedSlot(request, static_cast<uint32_t>(Slots::HasBody), JS::BooleanValue(true));\n  }\n\n  // 41.  Set this’s requests body to `finalBody`.\n  // (implicit)\n\n  // Apply the Fastly Compute-proprietary `backend` property.\n  if (!backend_val.isUndefined()) {\n    JS::RootedString backend(cx, JS::ToString(cx, backend_val));\n    if (!backend) {\n      return nullptr;\n    }\n    JS::SetReservedSlot(request, static_cast<uint32_t>(Slots::Backend), JS::StringValue(backend));\n  } else if (input_request) {\n    JS::SetReservedSlot(request, static_cast<uint32_t>(Slots::Backend),\n                        JS::GetReservedSlot(input_request, static_cast<uint32_t>(Slots::Backend)));\n  }\n\n  // Apply the Fastly Compute-proprietary `cacheOverride` property.\n  if (!cache_override.isUndefined()) {\n    if (!set_cache_override(cx, request, cache_override)) {\n      return nullptr;\n    }\n  } else if (input_request) {\n    JS::SetReservedSlot(\n        request, static_cast<uint32_t>(Slots::CacheOverride),\n        JS::GetReservedSlot(input_request, static_cast<uint32_t>(Slots::CacheOverride)));\n  }\n\n  // Apply the Fastly Compute-proprietary `cacheKey` property.\n  if (!cache_key.isUndefined()) {\n    if (!set_cache_key(cx, request, cache_key)) {\n      return nullptr;\n    }\n  } else if (input_request) {\n    // The fastly-xqd-cache-key header will be copied as part of the header copying logic,\n    // but we need to copy the slot as well to preserve the invariant that the slot and header are\n    // in sync.\n    JS::SetReservedSlot(\n        request, static_cast<uint32_t>(Slots::OverrideCacheKey),\n        JS::GetReservedSlot(input_request, static_cast<uint32_t>(Slots::OverrideCacheKey)));\n  }\n\n  // Apply the Fastly Compute-proprietary `imageOptimizerOptions` property.\n  if (!image_optimizer_options.isUndefined()) {\n    if (!set_image_optimizer_options(cx, request, image_optimizer_options)) {\n      return nullptr;\n    }\n  }\n\n  if (fastly_val.isObject()) {\n    JS::RootedValue decompress_response_val(cx);\n    JS::RootedObject fastly(cx, fastly_val.toObjectOrNull());\n    if (!JS_GetProperty(cx, fastly, \"decompressGzip\", &decompress_response_val)) {\n      return nullptr;\n    }\n    auto value = JS::ToBoolean(decompress_response_val);\n    JS::SetReservedSlot(request, static_cast<uint32_t>(Slots::AutoDecompressGzip),\n                        JS::BooleanValue(value));\n  } else if (input_request) {\n    JS::SetReservedSlot(\n        request, static_cast<uint32_t>(Slots::AutoDecompressGzip),\n        JS::GetReservedSlot(input_request, static_cast<uint32_t>(Slots::AutoDecompressGzip)));\n  } else {\n    JS::SetReservedSlot(request, static_cast<uint32_t>(Slots::AutoDecompressGzip),\n                        JS::BooleanValue(false));\n  }\n\n  if (!hasManualFramingHeaders) {\n    if (input_request) {\n      auto val =\n          JS::GetReservedSlot(input_request, static_cast<uint32_t>(Slots::ManualFramingHeaders));\n      setManualFramingHeaders = val.isBoolean() && val.toBoolean();\n    }\n  }\n  JS::SetReservedSlot(request, static_cast<uint32_t>(Slots::ManualFramingHeaders),\n                      JS::BooleanValue(setManualFramingHeaders));\n\n  if (setManualFramingHeaders) {\n    auto res =\n        request_handle.set_framing_headers_mode(host_api::FramingHeadersMode::ManuallyFromHeaders);\n    if (auto *err = res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return nullptr;\n    }\n  }\n\n  return request;\n}\n\nJSObject *Request::create_instance(JSContext *cx) {\n  JS::RootedObject requestInstance(\n      cx, JS_NewObjectWithGivenProto(cx, &Request::class_, Request::proto_obj));\n  return requestInstance;\n}\n\nbool Request::constructor(JSContext *cx, unsigned argc, JS::Value *vp) {\n  REQUEST_HANDLER_ONLY(\"The Request builtin\");\n  CTOR_HEADER(\"Request\", 1);\n  JS::RootedObject requestInstance(cx, JS_NewObjectForConstructor(cx, &class_, args));\n  JS::RootedObject request(cx, create(cx, requestInstance, args[0], args.get(1)));\n  if (!request)\n    return false;\n\n  args.rval().setObject(*request);\n  return true;\n}\n\n// Needed for uniform access to Request and Response slots.\nstatic_assert((int)Response::Slots::Body == (int)Request::Slots::Body);\nstatic_assert((int)Response::Slots::BodyStream == (int)Request::Slots::BodyStream);\nstatic_assert((int)Response::Slots::HasBody == (int)Request::Slots::HasBody);\nstatic_assert((int)Response::Slots::BodyUsed == (int)Request::Slots::BodyUsed);\nstatic_assert((int)Response::Slots::Headers == (int)Request::Slots::Headers);\nstatic_assert((int)Response::Slots::Response == (int)Request::Slots::Request);\n\nhost_api::HttpResp Response::response_handle(JSObject *obj) {\n  MOZ_ASSERT(is_instance(obj));\n  return host_api::HttpResp(\n      JS::GetReservedSlot(obj, static_cast<uint32_t>(Slots::Response)).toInt32());\n}\n\nbool Response::is_upstream(JSObject *obj) {\n  MOZ_ASSERT(is_instance(obj));\n  return JS::GetReservedSlot(obj, static_cast<uint32_t>(Slots::IsUpstream)).toBoolean();\n}\n\nstd::optional<host_api::HttpReq> Response::grip_upgrade_request(JSObject *obj) {\n  MOZ_ASSERT(is_instance(obj));\n  auto grip_upgrade_request =\n      JS::GetReservedSlot(obj, static_cast<uint32_t>(Slots::GripUpgradeRequest));\n  if (grip_upgrade_request.isUndefined()) {\n    return std::nullopt;\n  }\n  return host_api::HttpReq(grip_upgrade_request.toInt32());\n}\n\nstd::optional<host_api::HttpReq> Response::websocket_upgrade_request(JSObject *obj) {\n  MOZ_ASSERT(is_instance(obj));\n  auto websocket_upgrade_request =\n      JS::GetReservedSlot(obj, static_cast<uint32_t>(Slots::WebsocketUpgradeRequest));\n\n  if (websocket_upgrade_request.isUndefined()) {\n    return std::nullopt;\n  }\n\n  return host_api::HttpReq(websocket_upgrade_request.toInt32());\n}\n\nhost_api::HostString Response::backend_str(JSContext *cx, JSObject *obj) {\n  MOZ_ASSERT(is_instance(obj));\n\n  RootedValue backend(cx, JS::GetReservedSlot(obj, static_cast<uint32_t>(Slots::Backend)));\n  MOZ_ASSERT(backend.isString());\n  return core::encode(cx, backend);\n}\n\nuint16_t Response::status(JSObject *obj) {\n  MOZ_ASSERT(is_instance(obj));\n  return (uint16_t)JS::GetReservedSlot(obj, static_cast<uint32_t>(Slots::Status)).toInt32();\n}\n\nJSString *Response::status_message(JSObject *obj) {\n  MOZ_ASSERT(is_instance(obj));\n  return JS::GetReservedSlot(obj, static_cast<uint32_t>(Slots::StatusMessage)).toString();\n}\n\n// TODO(jake): Remove this when the reason phrase host-call is implemented\nvoid Response::set_status_message_from_code(JSContext *cx, JSObject *obj, uint16_t code) {\n  auto phrase = \"\";\n\n  switch (code) {\n  case 100: // 100 Continue - https://tools.ietf.org/html/rfc7231#section-6.2.1\n    phrase = \"Continue\";\n    break;\n  case 101: // 101 Switching Protocols - https://tools.ietf.org/html/rfc7231#section-6.2.2\n    phrase = \"Switching Protocols\";\n    break;\n  case 102: // 102 Processing - https://tools.ietf.org/html/rfc2518\n    phrase = \"Processing\";\n    break;\n  case 200: // 200 OK - https://tools.ietf.org/html/rfc7231#section-6.3.1\n    phrase = \"OK\";\n    break;\n  case 201: // 201 Created - https://tools.ietf.org/html/rfc7231#section-6.3.2\n    phrase = \"Created\";\n    break;\n  case 202: // 202 Accepted - https://tools.ietf.org/html/rfc7231#section-6.3.3\n    phrase = \"Accepted\";\n    break;\n  case 203: // 203 Non-Authoritative Information - https://tools.ietf.org/html/rfc7231#section-6.3.4\n    phrase = \"Non Authoritative Information\";\n    break;\n  case 204: // 204 No Content - https://tools.ietf.org/html/rfc7231#section-6.3.5\n    phrase = \"No Content\";\n    break;\n  case 205: // 205 Reset Content - https://tools.ietf.org/html/rfc7231#section-6.3.6\n    phrase = \"Reset Content\";\n    break;\n  case 206: // 206 Partial Content - https://tools.ietf.org/html/rfc7233#section-4.1\n    phrase = \"Partial Content\";\n    break;\n  case 207: // 207 Multi-Status - https://tools.ietf.org/html/rfc4918\n    phrase = \"Multi-Status\";\n    break;\n  case 208: // 208 Already Reported - https://tools.ietf.org/html/rfc5842\n    phrase = \"Already Reported\";\n    break;\n  case 226: // 226 IM Used - https://tools.ietf.org/html/rfc3229\n    phrase = \"IM Used\";\n    break;\n  case 300: // 300 Multiple Choices - https://tools.ietf.org/html/rfc7231#section-6.4.1\n    phrase = \"Multiple Choices\";\n    break;\n  case 301: // 301 Moved Permanently - https://tools.ietf.org/html/rfc7231#section-6.4.2\n    phrase = \"Moved Permanently\";\n    break;\n  case 302: // 302 Found - https://tools.ietf.org/html/rfc7231#section-6.4.3\n    phrase = \"Found\";\n    break;\n  case 303: // 303 See Other - https://tools.ietf.org/html/rfc7231#section-6.4.4\n    phrase = \"See Other\";\n    break;\n  case 304: // 304 Not Modified - https://tools.ietf.org/html/rfc7232#section-4.1\n    phrase = \"Not Modified\";\n    break;\n  case 305: // 305 Use Proxy - https://tools.ietf.org/html/rfc7231#section-6.4.5\n    phrase = \"Use Proxy\";\n    break;\n  case 307: // 307 Temporary Redirect - https://tools.ietf.org/html/rfc7231#section-6.4.7\n    phrase = \"Temporary Redirect\";\n    break;\n  case 308: // 308 Permanent Redirect - https://tools.ietf.org/html/rfc7238\n    phrase = \"Permanent Redirect\";\n    break;\n  case 400: // 400 Bad Request - https://tools.ietf.org/html/rfc7231#section-6.5.1\n    phrase = \"Bad Request\";\n    break;\n  case 401: // 401 Unauthorized - https://tools.ietf.org/html/rfc7235#section-3.1\n    phrase = \"Unauthorized\";\n    break;\n  case 402: // 402 Payment Required - https://tools.ietf.org/html/rfc7231#section-6.5.2\n    phrase = \"Payment Required\";\n    break;\n  case 403: // 403 Forbidden - https://tools.ietf.org/html/rfc7231#section-6.5.3\n    phrase = \"Forbidden\";\n    break;\n  case 404: // 404 Not Found - https://tools.ietf.org/html/rfc7231#section-6.5.4\n    phrase = \"Not Found\";\n    break;\n  case 405: // 405 Method Not Allowed - https://tools.ietf.org/html/rfc7231#section-6.5.5\n    phrase = \"Method Not Allowed\";\n    break;\n  case 406: // 406 Not Acceptable - https://tools.ietf.org/html/rfc7231#section-6.5.6\n    phrase = \"Not Acceptable\";\n    break;\n  case 407: // 407 Proxy Authentication Required - https://tools.ietf.org/html/rfc7235#section-3.2\n    phrase = \"Proxy Authentication Required\";\n    break;\n  case 408: // 408 Request Timeout - https://tools.ietf.org/html/rfc7231#section-6.5.7\n    phrase = \"Request Timeout\";\n    break;\n  case 409: // 409 Conflict - https://tools.ietf.org/html/rfc7231#section-6.5.8\n    phrase = \"Conflict\";\n    break;\n  case 410: // 410 Gone - https://tools.ietf.org/html/rfc7231#section-6.5.9\n    phrase = \"Gone\";\n    break;\n  case 411: // 411 Length Required - https://tools.ietf.org/html/rfc7231#section-6.5.10\n    phrase = \"Length Required\";\n    break;\n  case 412: // 412 Precondition Failed - https://tools.ietf.org/html/rfc7232#section-4.2\n    phrase = \"Precondition Failed\";\n    break;\n  case 413: // 413 Payload Too Large - https://tools.ietf.org/html/rfc7231#section-6.5.11\n    phrase = \"Payload Too Large\";\n    break;\n  case 414: // 414 URI Too Long - https://tools.ietf.org/html/rfc7231#section-6.5.12\n    phrase = \"URI Too Long\";\n    break;\n  case 415: // 415 Unsupported Media Type - https://tools.ietf.org/html/rfc7231#section-6.5.13\n    phrase = \"Unsupported Media Type\";\n    break;\n  case 416: // 416 Range Not Satisfiable - https://tools.ietf.org/html/rfc7233#section-4.4\n    phrase = \"Range Not Satisfiable\";\n    break;\n  case 417: // 417 Expectation Failed - https://tools.ietf.org/html/rfc7231#section-6.5.14\n    phrase = \"Expectation Failed\";\n    break;\n  case 418: // 418 I'm a teapot - https://tools.ietf.org/html/rfc2324\n    phrase = \"I'm a teapot\";\n    break;\n  case 421: // 421 Misdirected Request - http://tools.ietf.org/html/rfc7540#section-9.1.2\n    phrase = \"Misdirected Request\";\n    break;\n  case 422: // 422 Unprocessable Entity - https://tools.ietf.org/html/rfc4918\n    phrase = \"Unprocessable Entity\";\n    break;\n  case 423: // 423 Locked - https://tools.ietf.org/html/rfc4918\n    phrase = \"Locked\";\n    break;\n  case 424: // 424 Failed Dependency - https://tools.ietf.org/html/rfc4918\n    phrase = \"Failed Dependency\";\n    break;\n  case 426: // 426 Upgrade Required - https://tools.ietf.org/html/rfc7231#section-6.5.15\n    phrase = \"Upgrade Required\";\n    break;\n  case 428: // 428 Precondition Required - https://tools.ietf.org/html/rfc6585\n    phrase = \"Precondition Required\";\n    break;\n  case 429: // 429 Too Many Requests - https://tools.ietf.org/html/rfc6585\n    phrase = \"Too Many Requests\";\n    break;\n  case 431: // 431 Request Header Fields Too Large - https://tools.ietf.org/html/rfc6585\n    phrase = \"Request Header Fields Too Large\";\n    break;\n  case 451: // 451 Unavailable For Legal Reasons - http://tools.ietf.org/html/rfc7725\n    phrase = \"Unavailable For Legal Reasons\";\n    break;\n  case 500: // 500 Internal Server Error - https://tools.ietf.org/html/rfc7231#section-6.6.1\n    phrase = \"Internal Server Error\";\n    break;\n  case 501: // 501 Not Implemented - https://tools.ietf.org/html/rfc7231#section-6.6.2\n    phrase = \"Not Implemented\";\n    break;\n  case 502: // 502 Bad Gateway - https://tools.ietf.org/html/rfc7231#section-6.6.3\n    phrase = \"Bad Gateway\";\n    break;\n  case 503: // 503 Service Unavailable - https://tools.ietf.org/html/rfc7231#section-6.6.4\n    phrase = \"Service Unavailable\";\n    break;\n  case 504: // 504 Gateway Timeout - https://tools.ietf.org/html/rfc7231#section-6.6.5\n    phrase = \"Gateway Timeout\";\n    break;\n  case 505: // 505 HTTP Version Not Supported - https://tools.ietf.org/html/rfc7231#section-6.6.6\n    phrase = \"HTTP Version Not Supported\";\n    break;\n  case 506: // 506 Variant Also Negotiates - https://tools.ietf.org/html/rfc2295\n    phrase = \"Variant Also Negotiates\";\n    break;\n  case 507: // 507 Insufficient Storage - https://tools.ietf.org/html/rfc4918\n    phrase = \"Insufficient Storage\";\n    break;\n  case 508: // 508 Loop Detected - https://tools.ietf.org/html/rfc5842\n    phrase = \"Loop Detected\";\n    break;\n  case 510: // 510 Not Extended - https://tools.ietf.org/html/rfc2774\n    phrase = \"Not Extended\";\n    break;\n  case 511: // 511 Network Authentication Required - https://tools.ietf.org/html/rfc6585\n    phrase = \"Network Authentication Required\";\n    break;\n  default:\n    phrase = \"\";\n    break;\n  }\n  JS::RootedString phrase_js(cx, JS_NewStringCopyZ(cx, phrase));\n  JS::SetReservedSlot(obj, static_cast<uint32_t>(Slots::StatusMessage), JS::StringValue(phrase_js));\n}\n\nbool Response::ok_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  uint16_t status = Response::status(self);\n  args.rval().setBoolean(status >= 200 && status < 300);\n  return true;\n}\n\nbool Response::status_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  args.rval().setInt32(status(self));\n  return true;\n}\n\nbool Response::status_set(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  auto maybe_cache_entry = RequestOrResponse::cache_entry(self);\n  if (!maybe_cache_entry.has_value()) {\n    args.rval().set(args[0]);\n    return true;\n  }\n\n  // If it _is_ a CandidateResponse, then support the status set, with validation\n  bool valid_status = true;\n  uint16_t status = 0;\n  if (!args[0].isNumber() || !JS::ToUint16(cx, args[0], &status)) {\n    valid_status = false;\n  }\n  // Allow 103: Early Hints\n  bool status_in_range = status == 103 || (status >= 200 && status < 600);\n  if (!valid_status || !status_in_range) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                              JSMSG_RESPONSE_CONSTRUCTOR_INVALID_STATUS, status);\n    return false;\n  }\n\n  auto res = response_handle(self).set_status(status);\n\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  return true;\n}\n\nbool Response::statusText_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  args.rval().setString(status_message(self));\n  return true;\n}\n\nbool Response::url_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  args.rval().set(RequestOrResponse::url(self));\n  return true;\n}\n\n// TODO: store version client-side, support version_set for HTTP cache Candidate Response flow.\nbool Response::version_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  auto res = response_handle(self).get_version();\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  args.rval().setInt32(res.unwrap());\n  return true;\n}\n\nnamespace {\nJSString *type_default_atom;\nJSString *type_error_atom;\n} // namespace\n\nbool Response::type_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  args.rval().setString(status(self) == 0 ? type_error_atom : type_default_atom);\n  return true;\n}\n\nbool Response::redirected_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  args.rval().setBoolean(\n      JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::Redirected)).toBoolean());\n  return true;\n}\n\nbool Response::headers_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  JSObject *headers = Response::headers(cx, self);\n  if (!headers)\n    return false;\n\n  args.rval().setObject(*headers);\n  return true;\n}\n\ntemplate <RequestOrResponse::BodyReadResult result_type>\nbool Response::bodyAll(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n  return RequestOrResponse::bodyAll<result_type, false>(cx, args, self);\n}\n\nbool Response::body_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  return RequestOrResponse::body_get(cx, args, self, true);\n}\n\nbool Response::backend_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n  return RequestOrResponse::backend_get(cx, args, self);\n}\n\nbool Response::bodyUsed_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n  args.rval().setBoolean(RequestOrResponse::body_used(self));\n  return true;\n}\n\nbool Response::ip_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  // non-upstream responses always have undefined IP\n  if (!Response::is_upstream(self)) {\n    args.rval().setUndefined();\n    return true;\n  }\n\n  auto handle = response_handle(self);\n  auto res = handle.get_ip();\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  auto ret = std::move(res.unwrap());\n  if (!ret.has_value()) {\n    args.rval().setUndefined();\n    return true;\n  }\n\n  JS::RootedString address(cx, common::ip_octets_to_js_string(cx, std::move(*ret)));\n  if (!address) {\n    return false;\n  }\n  args.rval().setString(address);\n\n  return true;\n}\n\nbool Response::port_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  // non-upstream responses always have undefined port\n  if (!Response::is_upstream(self)) {\n    args.rval().setUndefined();\n    return true;\n  }\n\n  auto handle = response_handle(self);\n  auto res = handle.get_port();\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  if (!res.unwrap().has_value()) {\n    args.rval().setUndefined();\n  } else {\n    args.rval().setInt32(res.unwrap().value());\n  }\n  return true;\n}\n\n// https://fetch.spec.whatwg.org/#dom-response-redirect\n// [NewObject] static Response redirect(USVString url, optional unsigned short status = 302);\nbool Response::redirect(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = JS::CallArgsFromVp(argc, vp);\n  if (!args.requireAtLeast(cx, \"redirect\", 1)) {\n    return false;\n  }\n  auto url = args.get(0);\n  // 1. Let parsedURL be the result of parsing url with current settings object’s API base URL.\n  JS::RootedObject urlInstance(cx, JS_NewObjectWithGivenProto(cx, &URL::class_, URL::proto_obj));\n  if (!urlInstance) {\n    return false;\n  }\n  JS::RootedObject parsedURL(cx, URL::create(cx, urlInstance, url, WorkerLocation::url));\n  // 2. If parsedURL is failure, then throw a TypeError.\n  if (!parsedURL) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                              JSMSG_RESPONSE_REDIRECT_INVALID_URI);\n    return false;\n  }\n  JS::RootedValue url_val(cx, JS::ObjectValue(*parsedURL));\n  auto url_str = core::encode(cx, url_val);\n  if (!url_str) {\n    return false;\n  }\n  // 3. If status is not a redirect status, then throw a RangeError.\n  // A redirect status is a status that is 301, 302, 303, 307, or 308.\n  auto statusVal = args.get(1);\n  uint16_t status;\n  if (statusVal.isUndefined()) {\n    status = 302;\n  } else {\n    if (!JS::ToUint16(cx, statusVal, &status)) {\n      return false;\n    }\n  }\n  if (status != 301 && status != 302 && status != 303 && status != 307 && status != 308) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                              JSMSG_RESPONSE_REDIRECT_INVALID_STATUS);\n    return false;\n  }\n  // 4. Let responseObject be the result of creating a Response object, given a new response,\n  // \"immutable\", and this’s relevant Realm.\n  auto response_handle_res = host_api::HttpResp::make();\n  if (auto *err = response_handle_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  auto response_handle = response_handle_res.unwrap();\n  if (!response_handle.is_valid()) {\n    return false;\n  }\n\n  auto make_res = host_api::HttpBody::make();\n  if (auto *err = make_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  auto body = make_res.unwrap();\n  JS::RootedObject response_instance(\n      cx, JS_NewObjectWithGivenProto(cx, &Response::class_, Response::proto_obj));\n  if (!response_instance) {\n    return false;\n  }\n  JS::RootedObject response(\n      cx, create(cx, response_instance, response_handle, body, false, nullptr, nullptr, nullptr));\n  if (!response) {\n    return false;\n  }\n\n  // 5. Set responseObject’s response’s status to status.\n  auto set_res = response_handle.set_status(status);\n  if (auto *err = set_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  // To ensure that we really have the same status value as the host,\n  // we always read it back here.\n  auto get_res = response_handle.get_status();\n  if (auto *err = get_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  status = get_res.unwrap();\n\n  JS::SetReservedSlot(response, static_cast<uint32_t>(Slots::Status), JS::Int32Value(status));\n  JS::RootedString statusText(cx, JS_GetEmptyString(cx));\n  JS::SetReservedSlot(response, static_cast<uint32_t>(Slots::StatusMessage),\n                      JS::StringValue(statusText));\n  // 6. Let value be parsedURL, serialized and isomorphic encoded.\n  // 7. Append (`Location`, value) to responseObject’s response’s header list.\n  JS::RootedObject headers(cx, Headers::create(cx, Headers::HeadersGuard::Response));\n  if (!headers) {\n    return false;\n  }\n  if (!Headers::set_valid_if_undefined(cx, headers, \"location\", url_str.begin())) {\n    return false;\n  }\n  JS::SetReservedSlot(response, static_cast<uint32_t>(Slots::Headers), JS::ObjectValue(*headers));\n  JS::SetReservedSlot(response, static_cast<uint32_t>(Slots::Redirected), JS::FalseValue());\n  // 8. Return responseObject.\n\n  args.rval().setObjectOrNull(response);\n  return true;\n}\n\nnamespace {\nbool callbackCalled;\nbool write_json_to_buf(const char16_t *str, uint32_t strlen, void *out) {\n  callbackCalled = true;\n  auto outstr = static_cast<std::u16string *>(out);\n  outstr->append(str, strlen);\n\n  return true;\n}\n} // namespace\n\nbool Response::json(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = JS::CallArgsFromVp(argc, vp);\n  if (!args.requireAtLeast(cx, \"json\", 1)) {\n    return false;\n  }\n  JS::RootedValue data(cx, args.get(0));\n  JS::RootedValue init_val(cx, args.get(1));\n  JS::RootedObject replacer(cx);\n  JS::RootedValue space(cx);\n\n  std::u16string out;\n  // 1. Let bytes the result of running serialize a JavaScript value to JSON bytes on data.\n  callbackCalled = false;\n  if (!JS::ToJSON(cx, data, replacer, space, &write_json_to_buf, &out)) {\n    return false;\n  }\n  if (!callbackCalled) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                              JSMSG_RESPONSE_JSON_INVALID_VALUE);\n    return false;\n  }\n  // 2. Let body be the result of extracting bytes.\n\n  // 3. Let responseObject be the result of creating a Response object, given a new response,\n  // \"response\", and this’s relevant Realm.\n  JS::RootedValue status_val(cx);\n  uint16_t status = 200;\n\n  JS::RootedValue statusText_val(cx);\n  JS::RootedString statusText(cx, JS_GetEmptyString(cx));\n  JS::RootedValue headers_val(cx);\n\n  if (init_val.isObject()) {\n    JS::RootedObject init(cx, init_val.toObjectOrNull());\n    if (!JS_GetProperty(cx, init, \"status\", &status_val) ||\n        !JS_GetProperty(cx, init, \"statusText\", &statusText_val) ||\n        !JS_GetProperty(cx, init, \"headers\", &headers_val)) {\n      return false;\n    }\n\n    if (!status_val.isUndefined() && !JS::ToUint16(cx, status_val, &status)) {\n      return false;\n    }\n\n    if (status == 103 || status == 204 || status == 205 || status == 304) {\n      JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                                JSMSG_RESPONSE_NULL_BODY_STATUS_WITH_BODY);\n      return false;\n    }\n\n    if (!statusText_val.isUndefined() && !(statusText = JS::ToString(cx, statusText_val))) {\n      return false;\n    }\n\n  } else if (!init_val.isNullOrUndefined()) {\n    JS_ReportErrorLatin1(cx, \"Response constructor: |init| parameter can't be converted to \"\n                             \"a dictionary\");\n    return false;\n  }\n\n  auto response_handle_res = host_api::HttpResp::make();\n  if (auto *err = response_handle_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  auto response_handle = response_handle_res.unwrap();\n  if (!response_handle.is_valid()) {\n    return false;\n  }\n\n  auto make_res = host_api::HttpBody::make();\n  if (auto *err = make_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  auto body = make_res.unwrap();\n  JS::RootedString string(cx, JS_NewUCStringCopyN(cx, out.c_str(), out.length()));\n  auto stringChars = core::encode(cx, string);\n\n  auto write_res =\n      body.write_all_back(reinterpret_cast<uint8_t *>(stringChars.begin()), stringChars.len);\n  if (auto *err = write_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  JS::RootedObject response_instance(\n      cx, JS_NewObjectWithGivenProto(cx, &Response::class_, Response::proto_obj));\n  if (!response_instance) {\n    return false;\n  }\n  JS::RootedObject response(\n      cx, create(cx, response_instance, response_handle, body, false, nullptr, nullptr, nullptr));\n  if (!response) {\n    return false;\n  }\n\n  // Set `this`’s `response`’s `status` to `init`[\"status\"].\n  auto set_res = response_handle.set_status(status);\n  if (auto *err = set_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  // To ensure that we really have the same status value as the host,\n  // we always read it back here.\n  auto get_res = response_handle.get_status();\n  if (auto *err = get_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  status = get_res.unwrap();\n\n  JS::SetReservedSlot(response, static_cast<uint32_t>(Slots::Status), JS::Int32Value(status));\n\n  // Set `this`’s `response`’s `status message` to `init`[\"statusText\"].\n  JS::SetReservedSlot(response, static_cast<uint32_t>(Slots::StatusMessage),\n                      JS::StringValue(statusText));\n\n  // If `init`[\"headers\"] `exists`, then `fill` `this`’s `headers` with\n  // `init`[\"headers\"].\n  JS::RootedObject headers(cx, Headers::create(cx, headers_val, Headers::HeadersGuard::Response));\n  if (!headers) {\n    return false;\n  }\n  // 4. Perform initialize a response given responseObject, init, and (body, \"application/json\").\n  if (!Headers::set_valid_if_undefined(cx, headers, \"content-type\", \"application/json\")) {\n    return false;\n  }\n  JS::SetReservedSlot(response, static_cast<uint32_t>(Slots::Headers), JS::ObjectValue(*headers));\n  JS::SetReservedSlot(response, static_cast<uint32_t>(Slots::Redirected), JS::FalseValue());\n  JS::SetReservedSlot(response, static_cast<uint32_t>(Slots::HasBody), JS::TrueValue());\n  RequestOrResponse::set_url(response, JS_GetEmptyStringValue(cx));\n\n  // 5. Return responseObject.\n  args.rval().setObjectOrNull(response);\n  return true;\n}\n\nbool Response::setManualFramingHeaders(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(1)\n\n  bool manualFramingHeaders = JS::ToBoolean(args.get(0));\n  JS::SetReservedSlot(self, static_cast<uint32_t>(Slots::ManualFramingHeaders),\n                      JS::BooleanValue(manualFramingHeaders));\n  auto handle = response_handle(self);\n  host_api::Result<host_api::Void> res;\n  if (manualFramingHeaders) {\n    res = handle.set_framing_headers_mode(host_api::FramingHeadersMode::ManuallyFromHeaders);\n  } else {\n    res = handle.set_framing_headers_mode(host_api::FramingHeadersMode::Automatic);\n  }\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  args.rval().setUndefined();\n  return true;\n}\n\nconst JSFunctionSpec Response::static_methods[] = {\n    JS_FN(\"redirect\", redirect, 1, JSPROP_ENUMERATE),\n    JS_FN(\"json\", json, 1, JSPROP_ENUMERATE),\n    JS_FS_END,\n};\n\nconst JSPropertySpec Response::static_properties[] = {\n    JS_PS_END,\n};\n\nconst JSFunctionSpec Response::methods[] = {\n    JS_FN(\"arrayBuffer\", bodyAll<RequestOrResponse::BodyReadResult::ArrayBuffer>, 0,\n          JSPROP_ENUMERATE),\n    JS_FN(\"blob\", bodyAll<RequestOrResponse::BodyReadResult::Blob>, 0, JSPROP_ENUMERATE),\n    JS_FN(\"formData\", bodyAll<RequestOrResponse::BodyReadResult::FormData>, 0, JSPROP_ENUMERATE),\n    JS_FN(\"json\", bodyAll<RequestOrResponse::BodyReadResult::JSON>, 0, JSPROP_ENUMERATE),\n    JS_FN(\"text\", bodyAll<RequestOrResponse::BodyReadResult::Text>, 0, JSPROP_ENUMERATE),\n    JS_FN(\"setManualFramingHeaders\", Response::setManualFramingHeaders, 1, JSPROP_ENUMERATE),\n    JS_FS_END,\n};\n\nconst JSPropertySpec Response::properties[] = {\n    JS_PSG(\"redirected\", redirected_get, JSPROP_ENUMERATE),\n    JS_PSG(\"type\", type_get, JSPROP_ENUMERATE),\n    JS_PSG(\"url\", url_get, JSPROP_ENUMERATE),\n    JS_PSGS(\"status\", status_get, status_set, JSPROP_ENUMERATE),\n    JS_PSG(\"ok\", ok_get, JSPROP_ENUMERATE),\n    JS_PSG(\"statusText\", statusText_get, JSPROP_ENUMERATE),\n    JS_PSG(\"version\", version_get, JSPROP_ENUMERATE),\n    JS_PSG(\"headers\", headers_get, JSPROP_ENUMERATE),\n    JS_PSG(\"body\", body_get, JSPROP_ENUMERATE),\n    JS_PSG(\"bodyUsed\", bodyUsed_get, JSPROP_ENUMERATE),\n    JS_PSG(\"ip\", ip_get, JSPROP_ENUMERATE),\n    JS_PSG(\"port\", port_get, JSPROP_ENUMERATE),\n    JS_PSG(\"backend\", backend_get, JSPROP_ENUMERATE),\n    JS_PSG(\"cached\", cached_get, JSPROP_ENUMERATE),\n    JS_PSG(\"stale\", stale_get, JSPROP_ENUMERATE),\n    JS_PSGS(\"ttl\", ttl_get, ttl_set, JSPROP_ENUMERATE),\n    JS_PSG(\"age\", age_get, JSPROP_ENUMERATE),\n    JS_PSGS(\"swr\", swr_get, swr_set, JSPROP_ENUMERATE),\n    JS_PSGS(\"vary\", vary_get, vary_set, JSPROP_ENUMERATE),\n    JS_PSGS(\"surrogateKeys\", surrogateKeys_get, surrogateKeys_set, JSPROP_ENUMERATE),\n    JS_PSGS(\"pci\", pci_get, pci_set, JSPROP_ENUMERATE),\n    JS_STRING_SYM_PS(toStringTag, \"Response\", JSPROP_READONLY),\n    JS_PS_END,\n};\n\nstd::optional<host_api::HttpStorageAction> Response::storage_action(JSObject *obj) {\n  MOZ_ASSERT(is_instance(obj));\n  auto val = JS::GetReservedSlot(obj, static_cast<uint32_t>(Slots::StorageAction));\n  if (val.isUndefined()) {\n    return std::nullopt;\n  }\n  MOZ_ASSERT(val.isInt32());\n  return static_cast<host_api::HttpStorageAction>(val.toInt32());\n}\n\nbool Response::cached_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  JS::Value cache_entry =\n      JS::GetReservedSlot(self, static_cast<uint32_t>(RequestOrResponse::Slots::CacheEntry));\n\n  // Candidate Response -> not cached, since it just came from an origin update\n  if (cache_entry.isInt32()) {\n    args.rval().setBoolean(false);\n    return true;\n  }\n\n  // Actual Response -> cache_entry boolean/null slot-saving convention used to indicate if\n  // cached/stale\n  if (cache_entry.isBoolean()) {\n    args.rval().setBoolean(cache_entry.toBoolean());\n    return true;\n  }\n  if (cache_entry.isNull()) {\n    args.rval().setBoolean(true);\n    return true;\n  }\n\n  // Otherwise no info / cache stuff disabled -> undefined\n  args.rval().setUndefined();\n  return true;\n}\n\nbool Response::stale_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  JS::Value cache_entry =\n      JS::GetReservedSlot(self, static_cast<uint32_t>(RequestOrResponse::Slots::CacheEntry));\n\n  // Actual Response -> cache_entry null slot-saving convention used to indicate if stale\n  if (cache_entry.isNull()) {\n    args.rval().setBoolean(true);\n    return true;\n  }\n\n  // Candidate Response -> not cached, since it just came from an origin update\n  if (cache_entry.isInt32() || cache_entry.isBoolean()) {\n    args.rval().setBoolean(false);\n    return true;\n  }\n\n  // Otherwise no info / cache stuff disabled -> undefined\n  args.rval().setUndefined();\n  return true;\n}\n\nbool Response::ttl_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  auto entry = RequestOrResponse::cache_entry(self);\n\n  // all caching paths should set the override options as the final options\n  // so if they aren't set we are in the undefiend cases of no caching API use / no hostcall support\n  auto override_opts = override_cache_options(self);\n  if (!override_opts) {\n    args.rval().setUndefined();\n    return true;\n  }\n\n  uint64_t max_age_ns, initial_age_ns;\n  // a promoted candidate response must define all cache options\n  if (!entry.has_value() ||\n      (override_opts->max_age_ns.has_value() && override_opts->initial_age_ns.has_value())) {\n    max_age_ns = override_opts->max_age_ns.value();\n    initial_age_ns = override_opts->initial_age_ns.value();\n  } else {\n    auto suggested_opts = suggested_cache_options(cx, self);\n    if (!suggested_opts) {\n      return false;\n    }\n    max_age_ns = suggested_opts->max_age_ns.value();\n    if (!override_opts->initial_age_ns.has_value()) {\n      override_opts->initial_age_ns = suggested_opts->initial_age_ns;\n    }\n    initial_age_ns = override_opts->initial_age_ns.value();\n  }\n\n  MOZ_ASSERT(max_age_ns > initial_age_ns);\n  uint64_t ttl_ns = max_age_ns - initial_age_ns;\n\n  args.rval().setNumber(static_cast<double>(ttl_ns) / 1e9);\n  return true;\n}\n\nbool Response::age_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  auto entry = RequestOrResponse::cache_entry(self);\n\n  // all caching paths should set the override options as the final options\n  // so if they aren't set we are in the undefiend cases of no caching API use / no hostcall support\n  auto override_opts = override_cache_options(self);\n  if (!override_opts) {\n    args.rval().setUndefined();\n    return true;\n  }\n\n  uint64_t initial_age_ns;\n  // a promoted candidate response must define all cache options\n  if (!entry.has_value() || override_opts->initial_age_ns.has_value()) {\n    initial_age_ns = override_opts->initial_age_ns.value();\n  } else {\n    auto suggested_opts = suggested_cache_options(cx, self);\n    if (!suggested_opts) {\n      return false;\n    }\n    initial_age_ns = suggested_opts->initial_age_ns.value();\n    if (!override_opts->initial_age_ns.has_value()) {\n      override_opts->initial_age_ns = suggested_opts->initial_age_ns;\n    }\n    initial_age_ns = override_opts->initial_age_ns.value();\n  }\n  args.rval().setNumber(static_cast<double>(initial_age_ns) / 1e9);\n  return true;\n}\n\nbool Response::swr_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  auto entry = RequestOrResponse::cache_entry(self);\n\n  // all caching paths should set the override options as the final options\n  // so if they aren't set we are in the undefiend cases of no caching API use / no hostcall support\n  auto override_opts = override_cache_options(self);\n  if (!override_opts) {\n    args.rval().setUndefined();\n    return true;\n  }\n\n  uint64_t swr_ns;\n  // a promoted candidate response must define all cache options\n  if (!entry.has_value() || override_opts->stale_while_revalidate_ns.has_value()) {\n    swr_ns = override_opts->stale_while_revalidate_ns.value();\n  } else {\n    auto suggested_opts = suggested_cache_options(cx, self);\n    if (!suggested_opts) {\n      return false;\n    }\n    swr_ns = suggested_opts->stale_while_revalidate_ns.value();\n  }\n\n  args.rval().setNumber(static_cast<double>(swr_ns) / 1e9);\n  return true;\n}\n\nbool Response::vary_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  auto entry = RequestOrResponse::cache_entry(self);\n\n  // all caching paths should set the override options as the final options\n  // so if they aren't set we are in the undefiend cases of no caching API use / no hostcall support\n  auto override_opts = override_cache_options(self);\n  if (!override_opts) {\n    args.rval().setUndefined();\n    return true;\n  }\n\n  std::optional<std::string> vary_rule;\n  // a promoted candidate response must define all cache options\n  if (!entry.has_value() || override_opts->vary_rule.has_value()) {\n    vary_rule = override_opts->vary_rule;\n  } else {\n    auto suggested_opts = suggested_cache_options(cx, self);\n    if (!suggested_opts) {\n      return false;\n    }\n    vary_rule = suggested_opts->vary_rule;\n  }\n\n  JS::RootedObject arr(cx, JS::NewArrayObject(cx, 0));\n  if (!arr) {\n    return false;\n  }\n\n  if (!vary_rule.has_value()) {\n    // Empty Array if no vary rule\n    args.rval().setObject(*arr);\n    return true;\n  }\n\n  // Split vary rule on commas and trim whitespace\n  std::string_view rule_str(vary_rule.value());\n  std::vector<std::string_view> headers;\n  size_t pos = 0;\n  while (pos < rule_str.length()) {\n    // Skip leading whitespace\n    while (pos < rule_str.length() && std::isspace(rule_str[pos])) {\n      pos++;\n    }\n\n    // Find next space\n    size_t comma = rule_str.find(' ', pos);\n\n    std::string_view header;\n    if (comma == std::string_view::npos) {\n      header = rule_str.substr(pos);\n      pos = rule_str.length();\n    } else {\n      header = rule_str.substr(pos, comma - pos);\n      pos = comma + 1;\n    }\n\n    // Trim trailing whitespace\n    while (!header.empty() && std::isspace(header.back())) {\n      header.remove_suffix(1);\n    }\n\n    // Only add non-empty headers\n    if (!header.empty()) {\n      headers.push_back(header);\n    }\n  }\n\n  // Add headers to array\n  for (size_t i = 0; i < headers.size(); i++) {\n    const auto &header = headers[i];\n    JS::RootedString str(cx, JS_NewStringCopyN(cx, header.data(), header.length()));\n    if (!str) {\n      return false;\n    }\n    JS::RootedValue val(cx, JS::StringValue(str));\n    if (!JS_SetElement(cx, arr, i, val)) {\n      return false;\n    }\n  }\n\n  args.rval().setObject(*arr);\n  return true;\n}\n\nbool Response::surrogateKeys_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  auto entry = RequestOrResponse::cache_entry(self);\n\n  // all caching paths should set the override options as the final options\n  // so if they aren't set we are in the undefiend cases of no caching API use / no hostcall support\n  auto override_opts = override_cache_options(self);\n  if (!override_opts) {\n    args.rval().setUndefined();\n    return true;\n  }\n\n  const std::vector<host_api::HostString> *surrogate_keys;\n  // a promoted candidate response must define all cache options\n  if (!entry.has_value() || override_opts->surrogate_keys.has_value()) {\n    surrogate_keys = &override_opts->surrogate_keys.value();\n  } else {\n    auto suggested_opts = suggested_cache_options(cx, self);\n    if (!suggested_opts) {\n      return false;\n    }\n    surrogate_keys = &suggested_opts->surrogate_keys.value();\n  }\n\n  // Create array with known size\n  JS::RootedObject arr(cx, JS::NewArrayObject(cx, surrogate_keys->size()));\n  if (!arr) {\n    return false;\n  }\n\n  // Add keys to array\n  for (size_t i = 0; i < surrogate_keys->size(); i++) {\n    const auto &key = surrogate_keys->at(i);\n    JS::RootedString str(cx, JS_NewStringCopyN(cx, key.ptr.get(), key.len));\n    if (!str) {\n      return false;\n    }\n    JS::RootedValue val(cx, JS::StringValue(str));\n    if (!JS_SetElement(cx, arr, i, val)) {\n      return false;\n    }\n  }\n\n  args.rval().setObject(*arr);\n  return true;\n}\n\nbool Response::pci_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  auto entry = RequestOrResponse::cache_entry(self);\n\n  // all caching paths should set the override options as the final options\n  // so if they aren't set we are in the undefiend cases of no caching API use / no hostcall support\n  auto override_opts = override_cache_options(self);\n  if (!override_opts) {\n    args.rval().setUndefined();\n    return true;\n  }\n\n  bool sensitive_data;\n  // a promoted candidate response must define all cache options\n  if (!entry.has_value() || override_opts->sensitive_data.has_value()) {\n    sensitive_data = override_opts->sensitive_data.value();\n  } else {\n    auto suggested_opts = suggested_cache_options(cx, self);\n    if (!suggested_opts) {\n      return false;\n    }\n    sensitive_data = suggested_opts->sensitive_data.value();\n  }\n\n  args.rval().setBoolean(sensitive_data);\n  return true;\n}\n\n// Setters for mutable properties\n\nbool Response::ttl_set(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(1)\n\n  auto override_opts = override_cache_options(self);\n  host_api::HttpCacheWriteOptions *suggested_opts = nullptr;\n  if (RequestOrResponse::cache_entry(self).has_value()) {\n    suggested_opts = suggested_cache_options(cx, self);\n    if (!suggested_opts) {\n      return false;\n    }\n  }\n  if (!suggested_opts) {\n    api::throw_error(cx, api::Errors::TypeError, \"Response set\", \"ttl\",\n                     \"be set only on unsent cache transaction responses\");\n    return false;\n  }\n\n  double seconds;\n  if (!JS::ToNumber(cx, args[0], &seconds)) {\n    return false;\n  }\n\n  if (std::isnan(seconds) || seconds <= 0) {\n    api::throw_error(cx, api::Errors::TypeError, \"Response set\", \"ttl\",\n                     \"be a number greater than zero\");\n    return false;\n  }\n\n  uint64_t ttl_ns = static_cast<uint64_t>(std::round(seconds * 1e9));\n  uint64_t initial_age_ns = suggested_opts->initial_age_ns.value();\n  override_opts->max_age_ns = ttl_ns + initial_age_ns;\n\n  args.rval().setUndefined();\n  return true;\n}\n\nbool Response::swr_set(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(1)\n\n  auto override_opts = override_cache_options(self);\n  if (!RequestOrResponse::cache_entry(self).has_value()) {\n    api::throw_error(cx, api::Errors::TypeError, \"Response set\", \"swr\",\n                     \"be set only on unsent cache transaction responses\");\n    return false;\n  }\n  MOZ_ASSERT(override_opts);\n\n  double seconds;\n  if (!JS::ToNumber(cx, args[0], &seconds)) {\n    return false;\n  }\n\n  if (std::isnan(seconds) || seconds <= 0) {\n    api::throw_error(cx, api::Errors::TypeError, \"Response set\", \"swr\",\n                     \"be a number greater than zero\");\n    return false;\n  }\n\n  override_opts->stale_while_revalidate_ns = static_cast<uint64_t>(seconds * 1e9);\n\n  args.rval().setUndefined();\n  return true;\n}\n\nbool Response::vary_set(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(1)\n\n  auto override_opts = override_cache_options(self);\n  if (!RequestOrResponse::cache_entry(self).has_value()) {\n    api::throw_error(cx, api::Errors::TypeError, \"Response set\", \"vary\",\n                     \"be set only on unsent cache transaction responses\");\n    return false;\n  }\n  MOZ_ASSERT(override_opts);\n\n  JS::RootedObject arr_obj(cx);\n  bool is_array = false;\n  if (args[0].isObject()) {\n    arr_obj.set(&args[0].toObject());\n    if (!JS::IsArrayObject(cx, arr_obj, &is_array)) {\n      return false;\n    }\n  }\n  if (!is_array) {\n    api::throw_error(cx, api::Errors::TypeError, \"Response set\", \"vary\", \"be an Array\");\n    return false;\n  }\n\n  uint32_t length;\n  if (!JS::GetArrayLength(cx, arr_obj, &length)) {\n    return false;\n  }\n\n  size_t total_len = 0;\n  std::vector<host_api::HostString> encoded_strings;\n  encoded_strings.reserve(length);\n\n  for (uint32_t i = 0; i < length; i++) {\n    JS::RootedValue val(cx);\n    if (!JS_GetElement(cx, arr_obj, i, &val)) {\n      return false;\n    }\n\n    if (!val.isString()) {\n      api::throw_error(cx, api::Errors::TypeError, \"Response set\", \"vary\", \"contain only strings\");\n      return false;\n    }\n\n    auto str_val = core::encode(cx, val);\n    if (!str_val) {\n      return false;\n    }\n\n    encoded_strings.push_back(std::move(str_val));\n    total_len += str_val.len;\n  }\n\n  // Add space for spaces between strings\n  if (length > 1) {\n    total_len += length - 1;\n  }\n\n  // Allocate buffer and copy strings with spaces\n  JS::UniqueChars buffer(static_cast<char *>(malloc(total_len)));\n  if (!buffer) {\n    return false;\n  }\n\n  size_t pos = 0;\n  for (size_t i = 0; i < encoded_strings.size(); i++) {\n    const auto &str = encoded_strings[i];\n    if (i > 0) {\n      buffer[pos++] = ' ';\n    }\n    memcpy(buffer.get() + pos, str.ptr.get(), str.len);\n    pos += str.len;\n  }\n\n  override_opts->vary_rule = host_api::HostString(std::move(buffer), total_len);\n\n  args.rval().setUndefined();\n  return true;\n}\n\nbool Response::surrogateKeys_set(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(1)\n\n  auto override_opts = override_cache_options(self);\n  if (!RequestOrResponse::cache_entry(self).has_value()) {\n    api::throw_error(cx, api::Errors::TypeError, \"Response set\", \"surrogateKeys\",\n                     \"be set only on unsent cache transaction responses\");\n    return false;\n  }\n  MOZ_ASSERT(override_opts);\n\n  if (!args[0].isObject()) {\n    api::throw_error(cx, api::Errors::TypeError, \"Response set\", \"surrogateKeys\", \"be an Array\");\n    return false;\n  }\n\n  bool is_arr;\n  JS::RootedObject arr_obj(cx, &args[0].toObject());\n  if (!JS::IsArrayObject(cx, arr_obj, &is_arr)) {\n    return false;\n  }\n  if (!is_arr) {\n    api::throw_error(cx, api::Errors::TypeError, \"Response set\", \"surrogateKeys\", \"be an Array\");\n    return false;\n  }\n\n  uint32_t length;\n  if (!JS::GetArrayLength(cx, arr_obj, &length)) {\n    return false;\n  }\n\n  std::vector<host_api::HostString> keys;\n  keys.reserve(length);\n\n  for (uint32_t i = 0; i < length; i++) {\n    JS::RootedValue val(cx);\n    if (!JS_GetElement(cx, arr_obj, i, &val)) {\n      return false;\n    }\n    if (!val.isString()) {\n      api::throw_error(cx, api::Errors::TypeError, \"Response set\", \"surrogateKeys\",\n                       \"contain only strings\");\n      return false;\n    }\n    auto key = core::encode(cx, val);\n    if (!key) {\n      return false;\n    }\n    keys.push_back(std::move(key)); // Move the entire HostString\n  }\n\n  override_opts->surrogate_keys = std::move(keys);\n\n  args.rval().setUndefined();\n  return true;\n}\n\nbool Response::pci_set(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(1)\n\n  auto override_opts = override_cache_options(self);\n  if (!RequestOrResponse::cache_entry(self).has_value()) {\n    api::throw_error(cx, api::Errors::TypeError, \"Response set\", \"pci\",\n                     \"be set only on unsent cache transaction responses\");\n    return false;\n  }\n  MOZ_ASSERT(override_opts);\n\n  if (!args[0].isBoolean()) {\n    api::throw_error(cx, api::Errors::TypeError, \"Response set\", \"pci\", \"be a boolean\");\n    return false;\n  }\n\n  override_opts->sensitive_data = args[0].toBoolean();\n\n  args.rval().setUndefined();\n  return true;\n}\n\n/**\n * The `Response` constructor https://fetch.spec.whatwg.org/#dom-response\n */\nbool Response::constructor(JSContext *cx, unsigned argc, JS::Value *vp) {\n  REQUEST_HANDLER_ONLY(\"The Response builtin\");\n\n  CTOR_HEADER(\"Response\", 0);\n\n  JS::RootedValue body_val(cx, args.get(0));\n  JS::RootedValue init_val(cx, args.get(1));\n\n  JS::RootedValue status_val(cx);\n  uint16_t status = 200;\n\n  JS::RootedValue statusText_val(cx);\n  JS::RootedString statusText(cx, JS_GetEmptyString(cx));\n  JS::RootedValue headers_val(cx);\n  bool hasmanualFramingHeaders;\n  JS::RootedValue manualFramingHeaders(cx);\n  host_api::FramingHeadersMode mode{host_api::FramingHeadersMode::Automatic};\n\n  if (init_val.isObject()) {\n    JS::RootedObject init(cx, init_val.toObjectOrNull());\n    if (!JS_GetProperty(cx, init, \"status\", &status_val) ||\n        !JS_GetProperty(cx, init, \"statusText\", &statusText_val) ||\n        !JS_GetProperty(cx, init, \"headers\", &headers_val)) {\n      return false;\n    }\n\n    if (!status_val.isUndefined() && !JS::ToUint16(cx, status_val, &status)) {\n      return false;\n    }\n    if (!statusText_val.isUndefined()) {\n      auto status_text_result = valueToJSByteString(cx, statusText_val);\n      if (status_text_result.isErr()) {\n        JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                                  JSMSG_RESPONSE_CONSTRUCTOR_INVALID_STATUS_TEXT);\n        return false;\n      }\n      auto status_text = status_text_result.unwrap();\n      auto it = std::find_if(status_text.begin(), status_text.end(), [](unsigned char c) {\n        if (c < 9) {\n          return true;\n        }\n        if (c > 9 && c < 32) {\n          return true;\n        }\n        if (c == 127) {\n          return true;\n        }\n        if (c > 255) {\n          return true;\n        }\n        return false;\n      });\n\n      if (it != status_text.end()) {\n        JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                                  JSMSG_RESPONSE_CONSTRUCTOR_INVALID_STATUS_TEXT);\n        return false;\n      }\n      statusText = JS_NewStringCopyZ(cx, status_text.c_str());\n    }\n\n    if (!JS_HasOwnProperty(cx, init, \"manualFramingHeaders\", &hasmanualFramingHeaders) ||\n        !JS_GetProperty(cx, init, \"manualFramingHeaders\", &manualFramingHeaders)) {\n      return false;\n    }\n\n  } else if (!init_val.isNullOrUndefined()) {\n    JS_ReportErrorLatin1(cx, \"Response constructor: |init| parameter can't be converted to \"\n                             \"a dictionary\");\n    return false;\n  }\n\n  // 1.  If `init`[\"status\"] is not in the range 200 to 599, inclusive, then\n  // `throw` a ``RangeError``. (We allow 103 Early Hints as an extension)\n  if (status != 103 && !(status >= 200 && status < 600)) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                              JSMSG_RESPONSE_CONSTRUCTOR_INVALID_STATUS, status);\n    return false;\n  }\n\n  // 2.  If `init`[\"statusText\"] does not match the `reason-phrase` token\n  // production, then `throw` a ``TypeError``.\n\n  // 3.  Set `this`’s `response` to a new `response`.\n  // TODO(performance): consider not creating a host-side representation for responses\n  // eagerly. Some applications create Response objects purely for internal use,\n  // e.g. to represent cache entries. While that's perhaps not ideal to begin\n  // with, it exists, so we should handle it in a good way, and not be\n  // superfluously slow.\n  // https://github.com/fastly/js-compute-runtime/issues/219\n  // TODO(performance): enable creating Response objects during the init phase, and only\n  // creating the host-side representation when processing requests.\n  // https://github.com/fastly/js-compute-runtime/issues/220\n  auto response_handle_res = host_api::HttpResp::make();\n  if (auto *err = response_handle_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  auto make_res = host_api::HttpBody::make();\n  if (auto *err = make_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  auto response_handle = response_handle_res.unwrap();\n\n  auto body = make_res.unwrap();\n  JS::RootedObject responseInstance(cx, JS_NewObjectForConstructor(cx, &class_, args));\n  JS::RootedObject response(\n      cx, create(cx, responseInstance, response_handle, body, false, nullptr, nullptr, nullptr));\n  if (!response) {\n    return false;\n  }\n\n  if (!hasmanualFramingHeaders) {\n    if (is_instance(init_val)) {\n      manualFramingHeaders.set(JS::GetReservedSlot(\n          init_val.toObjectOrNull(), static_cast<uint32_t>(Slots::ManualFramingHeaders)));\n    } else {\n      manualFramingHeaders.setBoolean(false);\n    }\n  }\n  JS::SetReservedSlot(response, static_cast<uint32_t>(Slots::ManualFramingHeaders),\n                      JS::BooleanValue(JS::ToBoolean(manualFramingHeaders)));\n\n  // `manualFramingHeaders: true` indicates that we want to set the framing mode manually.\n  if (JS::ToBoolean(manualFramingHeaders)) {\n    mode = host_api::FramingHeadersMode::ManuallyFromHeaders;\n  }\n  if (mode != host_api::FramingHeadersMode::Automatic) {\n    auto res = response_handle.set_framing_headers_mode(mode);\n    if (auto *err = res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return false;\n    }\n  }\n\n  RequestOrResponse::set_url(response, JS_GetEmptyStringValue(cx));\n\n  // 4.  Set `this`’s `headers` to a `new` ``Headers`` object with `this`’s\n  // `relevant Realm`,\n  //     whose `header list` is `this`’s `response`’s `header list` and `guard`\n  //     is \"`response`\".\n  // (implicit)\n\n  // 5.  Set `this`’s `response`’s `status` to `init`[\"status\"].\n  auto set_res = response_handle.set_status(status);\n  if (auto *err = set_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  // To ensure that we really have the same status value as the host,\n  // we always read it back here.\n  auto get_res = response_handle.get_status();\n  if (auto *err = get_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  status = get_res.unwrap();\n\n  JS::SetReservedSlot(response, static_cast<uint32_t>(Slots::Status), JS::Int32Value(status));\n\n  // 6.  Set `this`’s `response`’s `status message` to `init`[\"statusText\"].\n  JS::SetReservedSlot(response, static_cast<uint32_t>(Slots::StatusMessage),\n                      JS::StringValue(statusText));\n\n  // 7.  If `init`[\"headers\"] `exists`, then `fill` `this`’s `headers` with\n  // `init`[\"headers\"].\n  JS::RootedObject headers(cx, Headers::create(cx, headers_val, Headers::HeadersGuard::Response));\n  if (!headers) {\n    return false;\n  }\n  JS::SetReservedSlot(response, static_cast<uint32_t>(Slots::Headers), JS::ObjectValue(*headers));\n  // 8.  If `body` is non-null, then:\n  if ((!body_val.isNullOrUndefined())) {\n    //     1.  If `init`[\"status\"] is a `null body status`, then `throw` a\n    //     ``TypeError``.\n    if (status == 103 || status == 204 || status == 205 || status == 304) {\n      JS_ReportErrorNumberLatin1(cx, FastlyGetErrorMessage, nullptr,\n                                 JSMSG_RESPONSE_CONSTRUCTOR_BODY_WITH_NULL_BODY_STATUS);\n      return false;\n    }\n\n    //     2.  Let `Content-Type` be null.\n    //     3.  Set `this`’s `response`’s `body` and `Content-Type` to the result\n    //     of `extracting`\n    //         `body`.\n    //     4.  If `Content-Type` is non-null and `this`’s `response`’s `header\n    //     list` `does not\n    //         contain` ``Content-Type``, then `append` (``Content-Type``,\n    //         `Content-Type`) to `this`’s `response`’s `header list`.\n    // Note: these steps are all inlined into RequestOrResponse::extract_body.\n    if (!RequestOrResponse::extract_body(cx, response, body_val)) {\n      return false;\n    }\n  }\n\n  args.rval().setObject(*response);\n  return true;\n}\n\nbool Response::init_class(JSContext *cx, JS::HandleObject global) {\n  if (!init_class_impl(cx, global)) {\n    return false;\n  }\n\n  // Initialize a pinned (i.e., never-moved, living forever) atom for the\n  // response type values.\n  return (type_default_atom = JS_AtomizeAndPinString(cx, \"default\")) &&\n         (type_error_atom = JS_AtomizeAndPinString(cx, \"error\"));\n}\n\nhost_api::HttpCacheWriteOptions *Response::override_cache_options(JSObject *response) {\n  MOZ_ASSERT(is_instance(response));\n  auto cache_options = reinterpret_cast<host_api::HttpCacheWriteOptions *>(\n      JS::GetReservedSlot(response,\n                          static_cast<uint32_t>(Response::Slots::OverrideCacheWriteOptions))\n          .toPrivate());\n  return cache_options;\n}\n\nhost_api::HttpCacheWriteOptions *Response::take_override_cache_options(JSObject *response) {\n  MOZ_ASSERT(is_instance(response));\n  auto cache_options = reinterpret_cast<host_api::HttpCacheWriteOptions *>(\n      JS::GetReservedSlot(response,\n                          static_cast<uint32_t>(Response::Slots::OverrideCacheWriteOptions))\n          .toPrivate());\n  JS::SetReservedSlot(response, static_cast<uint32_t>(Response::Slots::OverrideCacheWriteOptions),\n                      JS::PrivateValue(nullptr));\n  MOZ_ASSERT(cache_options);\n  return cache_options;\n}\n\n/**\n * Get suggested HTTP cache write options for this CandidateResponse, lazily computed and cached on\n * Slots::SuggestedCacheWriteOptions.\n *\n * Suggested cache options will have ALL values set for HttpCacheWriteOptions (no optionals).\n *\n * This function should not be used when the response is closed, as it will panic, instead\n */\nhost_api::HttpCacheWriteOptions *Response::suggested_cache_options(JSContext *cx,\n                                                                   HandleObject response) {\n  MOZ_ASSERT(is_instance(response));\n  auto existing = JS::GetReservedSlot(\n      response, static_cast<uint32_t>(Response::Slots::SuggestedCacheWriteOptions));\n\n  bool changed;\n  if (!RequestOrResponse::compare_bump_headers_gen(cx, response, &changed)) {\n    return nullptr;\n  }\n  if (!changed && !existing.isUndefined()) {\n    return reinterpret_cast<host_api::HttpCacheWriteOptions *>(existing.toPrivate());\n  }\n\n  host_api::HttpCacheEntry cache_entry = RequestOrResponse::cache_entry(response).value();\n  auto suggested_cache_options_res =\n      cache_entry.get_suggested_cache_options(response_handle(response));\n\n  if (auto *err = suggested_cache_options_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return nullptr;\n  }\n\n  // TODO: read from the special surrogate keys header here as part of the suggestion.\n  auto suggested_cache_options = suggested_cache_options_res.unwrap();\n  JS::SetReservedSlot(response, static_cast<uint32_t>(Response::Slots::SuggestedCacheWriteOptions),\n                      JS::PrivateValue(suggested_cache_options));\n  return suggested_cache_options;\n}\n\nJSObject *Response::create(JSContext *cx, HandleObject request, host_api::Response res) {\n  auto [response_handle, body] = res;\n  JS::RootedObject response_instance(\n      cx, JS_NewObjectWithGivenProto(cx, &Response::class_, Response::proto_obj));\n  if (!response_instance) {\n    return nullptr;\n  }\n\n  bool is_upstream = true;\n  RootedString backend(cx, RequestOrResponse::backend(request));\n  JS::RootedObject response(cx, Response::create(cx, response_instance, response_handle, body,\n                                                 is_upstream, nullptr, nullptr, backend));\n  if (!response) {\n    return nullptr;\n  }\n\n  RequestOrResponse::set_url(response, RequestOrResponse::url(request));\n  return response;\n}\n\nvoid Response::finalize(JS::GCContext *gcx, JSObject *self) {\n  auto suggested_cache_write_options_val =\n      JS::GetReservedSlot(self, static_cast<size_t>(Response::Slots::SuggestedCacheWriteOptions));\n  if (!suggested_cache_write_options_val.isUndefined()) {\n    host_api::HttpCacheWriteOptions *cache_write_options =\n        static_cast<host_api::HttpCacheWriteOptions *>(\n            suggested_cache_write_options_val.toPrivate());\n    delete cache_write_options;\n  }\n  auto override_cache_write_options_val =\n      JS::GetReservedSlot(self, static_cast<size_t>(Response::Slots::OverrideCacheWriteOptions));\n  if (!override_cache_write_options_val.isUndefined()) {\n    auto override_cache_write_options = reinterpret_cast<host_api::HttpCacheWriteOptions *>(\n        override_cache_write_options_val.toPrivate());\n    if (override_cache_write_options) {\n      delete override_cache_write_options;\n    }\n  }\n}\n\nbool Response::has_bodyless_status(JSObject *obj) {\n  auto status(Response::status(obj));\n  return status == 103 || status == 204 || status == 205 || status == 304;\n}\n\nJSObject *Response::create(JSContext *cx, JS::HandleObject response,\n                           host_api::HttpResp response_handle, host_api::HttpBody body_handle,\n                           bool is_upstream, JSObject *grip_upgrade_request,\n                           JSObject *websocket_upgrade_request, JS::HandleString backend) {\n  JS::SetReservedSlot(response, static_cast<uint32_t>(Slots::Response),\n                      JS::Int32Value(response_handle.handle));\n  JS::SetReservedSlot(response, static_cast<uint32_t>(Slots::Headers), JS::NullValue());\n  JS::SetReservedSlot(response, static_cast<uint32_t>(Slots::Body),\n                      JS::Int32Value(body_handle.handle));\n  JS::SetReservedSlot(response, static_cast<uint32_t>(Slots::BodyStream), JS::NullValue());\n  JS::SetReservedSlot(response, static_cast<uint32_t>(Slots::HasBody), JS::FalseValue());\n  JS::SetReservedSlot(response, static_cast<uint32_t>(Slots::BodyUsed), JS::FalseValue());\n  JS::SetReservedSlot(response, static_cast<uint32_t>(Slots::Redirected), JS::FalseValue());\n  JS::SetReservedSlot(response, static_cast<uint32_t>(Slots::IsUpstream),\n                      JS::BooleanValue(is_upstream));\n  if (grip_upgrade_request) {\n    JS::SetReservedSlot(response, static_cast<uint32_t>(Slots::GripUpgradeRequest),\n                        JS::Int32Value(Request::request_handle(grip_upgrade_request).handle));\n  }\n  if (websocket_upgrade_request) {\n    JS::SetReservedSlot(response, static_cast<uint32_t>(Slots::WebsocketUpgradeRequest),\n                        JS::Int32Value(Request::request_handle(websocket_upgrade_request).handle));\n  }\n  JS::SetReservedSlot(response, static_cast<uint32_t>(Slots::StorageAction), JS::UndefinedValue());\n  JS::SetReservedSlot(response, static_cast<uint32_t>(RequestOrResponse::Slots::CacheEntry),\n                      JS::UndefinedValue());\n  JS::SetReservedSlot(response, static_cast<uint32_t>(Slots::SuggestedCacheWriteOptions),\n                      JS::UndefinedValue());\n  JS::SetReservedSlot(response, static_cast<uint32_t>(Slots::HeadersGen), JS::UndefinedValue());\n  JS::SetReservedSlot(response, static_cast<uint32_t>(Slots::OverrideCacheWriteOptions),\n                      JS::PrivateValue(nullptr));\n  JS::SetReservedSlot(response, static_cast<uint32_t>(Slots::CacheBodyTransform),\n                      JS::UndefinedValue());\n  if (backend) {\n    JS::SetReservedSlot(response, static_cast<uint32_t>(Slots::Backend), JS::StringValue(backend));\n  }\n\n  if (is_upstream) {\n    auto res = response_handle.get_status();\n    if (auto *err = res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return nullptr;\n    }\n\n    auto status = res.unwrap();\n    JS::SetReservedSlot(response, static_cast<uint32_t>(Slots::Status), JS::Int32Value(status));\n    set_status_message_from_code(cx, response, status);\n\n    if (!Response::has_bodyless_status(response)) {\n      JS::SetReservedSlot(response, static_cast<uint32_t>(Slots::HasBody), JS::TrueValue());\n    }\n  }\n  return response;\n}\n\n} // namespace fastly::fetch\n"
  },
  {
    "path": "runtime/fastly/builtins/fetch/request-response.h",
    "content": "#ifndef FASTLY_REQUEST_RESPONSE\n#define FASTLY_REQUEST_RESPONSE\n\n#include \"../../../StarlingMonkey/builtins/web/fetch/headers.h\"\n#include \"../../host-api/host_api_fastly.h\"\n\nnamespace fastly::fetch {\n\nclass RequestOrResponse final {\npublic:\n  enum class Slots {\n    RequestOrResponse,\n    Body,\n    BodyStream,\n    BodyAllPromise,\n    HasBody,\n    BodyUsed,\n    Headers,\n    HeadersGen,\n    URL,\n    ManualFramingHeaders,\n    Backend,\n    CacheEntry,\n    SourceRequest, // Tracks the original Request when body is proxied via TransformStream\n    FetchEvent,\n    Count,\n  };\n\n  static bool is_instance(JSObject *obj);\n  static uint32_t handle(JSObject *obj);\n  static bool has_body(JSObject *obj);\n  static host_api::HttpBody body_handle(JSObject *obj);\n  static JSObject *body_stream(JSObject *obj);\n  static JSObject *body_source(JSContext *cx, JS::HandleObject obj);\n  static bool body_used(JSObject *obj);\n  static bool mark_body_used(JSContext *cx, JS::HandleObject obj);\n  static bool move_body_handle(JSContext *cx, JS::HandleObject from, JS::HandleObject to);\n  static JS::Value url(JSObject *obj);\n  static void set_url(JSObject *obj, JS::Value url);\n  static void set_manual_framing_headers(JSContext *cx, JSObject *obj, JS::HandleValue url);\n  static bool body_unusable(JSContext *cx, JS::HandleObject body);\n  static bool extract_body(JSContext *cx, JS::HandleObject self, JS::HandleValue body_val);\n  static bool process_pending_request(JSContext *cx, host_api::HttpPendingReq::Handle handle,\n                                      JS::HandleObject context, JS::HandleValue promise);\n\n  /**\n   * Returns the RequestOrResponse's Headers if it has been reified, nullptr if\n   * not.\n   */\n  static JSObject *maybe_headers(JSObject *obj);\n\n  /**\n   * For Requests and Responses in Mode::ContentOnly, creates a new HostOnly headers\n   * object and commits the headers map values.\n   */\n  static bool commit_headers(JSContext *cx, JS::HandleObject self);\n\n  /**\n   * Compare the HeadersGen slot with the current headers generation, returning true if the headers\n   * have changed and false otherwise, storing the new generation into the slot.\n   * If the headers are undefined, the generation is tracked as null, still supporting comparison.\n   */\n  static bool compare_bump_headers_gen(JSContext *cx, JS::HandleObject self, bool *changed_out);\n\n  static bool append_body(JSContext *cx, JS::HandleObject self, JS::HandleObject source);\n\n  using ParseBodyCB = bool(JSContext *cx, JS::HandleObject self, JS::UniqueChars buf, size_t len);\n\n  enum class BodyReadResult {\n    ArrayBuffer,\n    Blob,\n    FormData,\n    JSON,\n    Text,\n  };\n\n  template <BodyReadResult result_type>\n  static bool parse_body(JSContext *cx, JS::HandleObject self, JS::UniqueChars buf, size_t len);\n\n  static bool content_stream_read_then_handler(JSContext *cx, JS::HandleObject self,\n                                               JS::HandleValue extra, JS::CallArgs args);\n  static bool content_stream_read_catch_handler(JSContext *cx, JS::HandleObject self,\n                                                JS::HandleValue extra, JS::CallArgs args);\n  static bool consume_content_stream_for_bodyAll(JSContext *cx, JS::HandleObject self,\n                                                 JS::HandleValue stream_val, JS::CallArgs args);\n  template <bool async>\n  static bool consume_body_handle_for_bodyAll(JSContext *cx, JS::HandleObject self,\n                                              JS::HandleValue body_parser, JS::CallArgs args);\n  template <RequestOrResponse::BodyReadResult result_type, bool async>\n  static bool bodyAll(JSContext *cx, JS::CallArgs args, JS::HandleObject self);\n  static bool body_source_cancel_algorithm(JSContext *cx, JS::CallArgs args,\n                                           JS::HandleObject stream, JS::HandleObject owner,\n                                           JS::HandleValue reason);\n  static bool body_source_pull_algorithm(JSContext *cx, JS::CallArgs args, JS::HandleObject source,\n                                         JS::HandleObject body_owner, JS::HandleObject controller);\n  static bool body_reader_then_handler(JSContext *cx, JS::HandleObject body_owner,\n                                       JS::HandleValue extra, JS::CallArgs args);\n\n  static bool body_reader_catch_handler(JSContext *cx, JS::HandleObject body_owner,\n                                        JS::HandleValue extra, JS::CallArgs args);\n\n  /**\n   * Ensures that the given |body_owner|'s body is properly streamed, if it\n   * requires streaming.\n   *\n   * If streaming is required, starts the process of reading from the\n   * ReadableStream representing the body and sets the |requires_streaming| bool\n   * to `true`.\n   */\n  static bool maybe_stream_body(JSContext *cx, JS::HandleObject body_owner,\n                                bool *requires_streaming);\n\n  static JSObject *create_body_stream(JSContext *cx, JS::HandleObject owner);\n\n  static bool body_get(JSContext *cx, JS::CallArgs args, JS::HandleObject self,\n                       bool create_if_undefined);\n  static bool backend_get(JSContext *cx, JS::CallArgs args, JS::HandleObject self);\n  static JSString *backend(JSObject *obj);\n\n  /**\n   * Helper method to get (and possibly unset) the cache entry for a request or response (if any)\n   *\n   * A Response with a cache entry is a valid CandidateResponse.\n   */\n  static std::optional<host_api::HttpCacheEntry> cache_entry(JSObject *obj);\n  /**\n   * Helper method to get and unset the transaction cache entry for a request or response (if any)\n   *\n   * Unsetting the cache entry on a Response object freezes the CandidateResponse from further\n   * modification.\n   *\n   * A boolean overload for the cache entry disabled case is used to mark if we were cached or not.\n   */\n  static std::optional<host_api::HttpCacheEntry> take_cache_entry(JSObject *obj,\n                                                                  std::optional<bool> mark_cached);\n  /**\n   * Close the cache entry and clear it from the Response, effectively locking this\n   * candidate response object.\n   */\n  static bool close_if_cache_entry(JSContext *cx, JS::HandleObject self);\n};\n\nclass Request final : public builtins::BuiltinImpl<Request> {\n  static bool method_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool headers_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool url_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool version_get(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  template <RequestOrResponse::BodyReadResult result_type>\n  static bool bodyAll(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  static bool backend_get(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  static bool body_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool bodyUsed_get(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  static bool setCacheOverride(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool setCacheKey(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool setManualFramingHeaders(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool clone(JSContext *cx, unsigned argc, JS::Value *vp);\n\npublic:\n  static constexpr const char *class_name = \"Request\";\n\n  enum class Slots {\n    Request = static_cast<int>(RequestOrResponse::Slots::RequestOrResponse),\n    Body = static_cast<int>(RequestOrResponse::Slots::Body),\n    BodyStream = static_cast<int>(RequestOrResponse::Slots::BodyStream),\n    HasBody = static_cast<int>(RequestOrResponse::Slots::HasBody),\n    BodyUsed = static_cast<int>(RequestOrResponse::Slots::BodyUsed),\n    Headers = static_cast<int>(RequestOrResponse::Slots::Headers),\n    HeadersGen = static_cast<int>(RequestOrResponse::Slots::HeadersGen),\n    URL = static_cast<int>(RequestOrResponse::Slots::URL),\n    ManualFramingHeaders = static_cast<int>(RequestOrResponse::Slots::ManualFramingHeaders),\n    Backend = static_cast<int>(RequestOrResponse::Slots::Backend),\n    CacheEntry = static_cast<int>(RequestOrResponse::Slots::CacheEntry),\n    SourceRequest = static_cast<int>(RequestOrResponse::Slots::SourceRequest),\n    FetchEvent = static_cast<int>(RequestOrResponse::Slots::FetchEvent),\n    Method = static_cast<int>(RequestOrResponse::Slots::Count),\n    OverrideCacheKey,\n    CacheOverride,\n    PendingRequest,\n    ResponsePromise,\n    IsDownstream,\n    AutoDecompressGzip,\n    ImageOptimizerOptions,\n    Count,\n  };\n\n  /**\n   * Returns the RequestOrResponse's Headers, reifying it if necessary.\n   */\n  static JSObject *headers(JSContext *cx, JS::HandleObject obj);\n\n  static JSObject *response_promise(JSObject *obj);\n  static JSString *method(JSContext *cx, JS::HandleObject obj);\n  // static JSString *override_cache_key(JSContext *cx)\n  static bool set_cache_key(JSContext *cx, JS::HandleObject self, JS::HandleValue cache_key_val);\n  static bool set_cache_override(JSContext *cx, JS::HandleObject self,\n                                 JS::HandleValue cache_override_val);\n  static bool apply_cache_override(JSContext *cx, JS::HandleObject self);\n  static bool apply_auto_decompress_gzip(JSContext *cx, JS::HandleObject self);\n  static bool set_image_optimizer_options(JSContext *cx, JS::HandleObject self,\n                                          JS::HandleValue image_optimizer_options);\n\n  static bool isCacheable_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static host_api::HttpReq request_handle(JSObject *obj);\n  static host_api::HttpPendingReq pending_handle(JSObject *obj);\n  static bool is_downstream(JSObject *obj);\n  static const JSFunctionSpec static_methods[];\n  static const JSPropertySpec static_properties[];\n  static const JSFunctionSpec methods[];\n  static const JSPropertySpec properties[];\n\n  static const unsigned ctor_length = 1;\n\n  static bool init_class(JSContext *cx, JS::HandleObject global);\n  static bool constructor(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  static JSObject *create(JSContext *cx, JS::HandleObject requestInstance,\n                          host_api::HttpReq request_handle, host_api::HttpBody body_handle,\n                          bool is_downstream);\n  static JSObject *create(JSContext *cx, JS::HandleObject requestInstance, JS::HandleValue input,\n                          JS::HandleValue init_val);\n\n  static JSObject *create_instance(JSContext *cx);\n};\n\nclass Response final : public builtins::FinalizableBuiltinImpl<Response> {\n  static bool waitUntil(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool ok_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool status_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool status_set(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool statusText_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool url_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool version_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool type_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool headers_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool redirected_get(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  template <RequestOrResponse::BodyReadResult result_type>\n  static bool bodyAll(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool backend_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool body_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool bodyUsed_get(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  static bool ip_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool port_get(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  static bool redirect(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool json(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool setManualFramingHeaders(JSContext *cx, unsigned argc, JS::Value *vp);\n\npublic:\n  static constexpr const char *class_name = \"Response\";\n\n  enum class Slots {\n    Response = static_cast<int>(RequestOrResponse::Slots::RequestOrResponse),\n    Body = static_cast<int>(RequestOrResponse::Slots::Body),\n    BodyStream = static_cast<int>(RequestOrResponse::Slots::BodyStream),\n    HasBody = static_cast<int>(RequestOrResponse::Slots::HasBody),\n    BodyUsed = static_cast<int>(RequestOrResponse::Slots::BodyUsed),\n    Headers = static_cast<int>(RequestOrResponse::Slots::Headers),\n    HeadersGen = static_cast<int>(RequestOrResponse::Slots::HeadersGen),\n    URL = static_cast<int>(RequestOrResponse::Slots::URL),\n    ManualFramingHeaders = static_cast<int>(RequestOrResponse::Slots::ManualFramingHeaders),\n    Backend = static_cast<int>(RequestOrResponse::Slots::Backend),\n    CacheEntry = static_cast<int>(RequestOrResponse::Slots::CacheEntry),\n    SourceRequest = static_cast<int>(RequestOrResponse::Slots::SourceRequest),\n    FetchEvent = static_cast<int>(RequestOrResponse::Slots::FetchEvent),\n    IsUpstream = static_cast<int>(RequestOrResponse::Slots::Count),\n    Status,\n    StatusMessage,\n    Redirected,\n    GripUpgradeRequest,\n    WebsocketUpgradeRequest,\n    StorageAction,\n    SuggestedCacheWriteOptions,\n    OverrideCacheWriteOptions,\n    CacheBodyTransform,\n    Count,\n  };\n  static const JSFunctionSpec static_methods[];\n  static const JSPropertySpec static_properties[];\n  static const JSFunctionSpec methods[];\n  static const JSPropertySpec properties[];\n\n  static const unsigned ctor_length = 1;\n\n  static bool init_class(JSContext *cx, JS::HandleObject global);\n  static bool constructor(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  /**\n   * Create a response for a request, used for the fetch response flow.\n   */\n  static JSObject *create(JSContext *cx, HandleObject request, host_api::Response res);\n\n  /**\n   * Base-level response creation handler, for both upstream and downstream requests.\n   */\n  static JSObject *create(JSContext *cx, JS::HandleObject response,\n                          host_api::HttpResp response_handle, host_api::HttpBody body_handle,\n                          bool is_upstream, JSObject *grip_upgrade_request,\n                          JSObject *websocket_upgrade_request, JS::HandleString backend);\n\n  static host_api::HttpResp response_handle(JSObject *obj);\n\n  /**\n   * Returns the RequestOrResponse's Headers, reifying it if necessary.\n   */\n  static JSObject *headers(JSContext *cx, JS::HandleObject obj);\n\n  /**\n   * Get the storage action for the response.\n   */\n  static std::optional<host_api::HttpStorageAction> storage_action(JSObject *obj);\n\n  static bool is_upstream(JSObject *obj);\n  static std::optional<host_api::HttpReq> grip_upgrade_request(JSObject *obj);\n  static std::optional<host_api::HttpReq> websocket_upgrade_request(JSObject *obj);\n  static host_api::HostString backend_str(JSContext *cx, JSObject *obj);\n  static uint16_t status(JSObject *obj);\n  static JSString *status_message(JSObject *obj);\n  static void set_status_message_from_code(JSContext *cx, JSObject *obj, uint16_t code);\n\n  static bool add_fastly_cache_headers(JSContext *cx, JS::HandleObject self,\n                                       JS::HandleObject request,\n                                       std::optional<host_api::HttpCacheEntry> cache_entry,\n                                       const char *fun_name);\n\n  static bool has_body_transform(JSObject *self);\n  static bool has_bodyless_status(JSObject *obj);\n\n  /**\n   * Override cache options set by the user & suggested options, or final cache options if\n   * finalized.\n   */\n  static host_api::HttpCacheWriteOptions *override_cache_options(JSObject *response);\n\n  /**\n   * Takes the override cache options field.\n   */\n  static host_api::HttpCacheWriteOptions *take_override_cache_options(JSObject *response);\n\n  /**\n   * Suggested cache options as provided by the host for the request/response pair, and\n   * computed lazily (fallible).\n   */\n  static host_api::HttpCacheWriteOptions *suggested_cache_options(JSContext *cx,\n                                                                  HandleObject response);\n\n  static bool isCacheable_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool cached_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool stale_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool ttl_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool ttl_set(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool age_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool swr_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool swr_set(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool vary_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool vary_set(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool surrogateKeys_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool surrogateKeys_set(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool pci_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool pci_set(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  static void finalize(JS::GCContext *gcx, JSObject *self);\n};\n\n} // namespace fastly::fetch\n\n#endif\n"
  },
  {
    "path": "runtime/fastly/builtins/fetch-event.cpp",
    "content": "#include \"fetch-event.h\"\n#include \"../../StarlingMonkey/builtins/web/performance.h\"\n#include \"../../StarlingMonkey/builtins/web/url.h\"\n#include \"../../StarlingMonkey/builtins/web/worker-location.h\"\n#include \"../common/ip_octets_to_js_string.h\"\n#include \"../common/normalize_http_method.h\"\n#include \"../host-api/fastly.h\"\n#include \"../host-api/host_api_fastly.h\"\n#include \"./fetch/request-response.h\"\n#include \"encode.h\"\n#include \"fastly.h\"\n#include \"host_api.h\"\n#include \"js/JSON.h\"\n#include \"openssl/evp.h\"\n\n#include <iostream>\n#include <memory>\n\nusing std::chrono::microseconds;\nusing std::chrono::system_clock;\nusing namespace std::literals::string_view_literals;\nusing builtins::web::fetch::Headers;\nusing builtins::web::url::URL;\nusing builtins::web::worker_location::WorkerLocation;\nusing fastly::fastly::Fastly;\nusing fastly::fetch::RequestOrResponse;\nusing fastly::fetch::Response;\n\nnamespace fastly::fetch_event {\n\nnamespace {\n\nJSString *client_request_id(JSObject *obj) {\n  JS::Value val =\n      JS::GetReservedSlot(obj, static_cast<uint32_t>(ClientInfo::Slots::ClientRequestId));\n  return val.isString() ? val.toString() : nullptr;\n}\n\nJSString *client_address(JSObject *obj) {\n  JS::Value val = JS::GetReservedSlot(obj, static_cast<uint32_t>(ClientInfo::Slots::Address));\n  return val.isString() ? val.toString() : nullptr;\n}\n\nJSString *geo_info(JSObject *obj) {\n  JS::Value val = JS::GetReservedSlot(obj, static_cast<uint32_t>(ClientInfo::Slots::GeoInfo));\n  return val.isString() ? val.toString() : nullptr;\n}\n\nJSString *cipher(JSObject *obj) {\n  JS::Value val = JS::GetReservedSlot(obj, static_cast<uint32_t>(ClientInfo::Slots::Cipher));\n  return val.isString() ? val.toString() : nullptr;\n}\nJSString *ja3(JSObject *obj) {\n  JS::Value val = JS::GetReservedSlot(obj, static_cast<uint32_t>(ClientInfo::Slots::JA3));\n  return val.isString() ? val.toString() : nullptr;\n}\nJSString *ja4(JSObject *obj) {\n  JS::Value val = JS::GetReservedSlot(obj, static_cast<uint32_t>(ClientInfo::Slots::JA4));\n  return val.isString() ? val.toString() : nullptr;\n}\nJSString *h2Fingerprint(JSObject *obj) {\n  JS::Value val = JS::GetReservedSlot(obj, static_cast<uint32_t>(ClientInfo::Slots::H2Fingerprint));\n  return val.isString() ? val.toString() : nullptr;\n}\nJSString *ohFingerprint(JSObject *obj) {\n  JS::Value val = JS::GetReservedSlot(obj, static_cast<uint32_t>(ClientInfo::Slots::OHFingerprint));\n  return val.isString() ? val.toString() : nullptr;\n}\nJSObject *clientHello(JSObject *obj) {\n  JS::Value val = JS::GetReservedSlot(obj, static_cast<uint32_t>(ClientInfo::Slots::ClientHello));\n  return val.isObject() ? val.toObjectOrNull() : nullptr;\n}\nJSObject *clientCert(JSObject *obj) {\n  JS::Value val = JS::GetReservedSlot(obj, static_cast<uint32_t>(ClientInfo::Slots::ClientCert));\n  return val.isObject() ? val.toObjectOrNull() : nullptr;\n}\nJSString *protocol(JSObject *obj) {\n  JS::Value val = JS::GetReservedSlot(obj, static_cast<uint32_t>(ClientInfo::Slots::Protocol));\n  return val.isString() ? val.toString() : nullptr;\n}\n\n} // namespace\n\nJSString *ClientInfo::retrieve_client_address(JSContext *cx, JS::HandleObject self) {\n  auto res = request_handle(cx, self).downstream_client_ip_addr();\n  if (res.is_err()) {\n    return nullptr;\n  }\n\n  JS::RootedString address(cx, common::ip_octets_to_js_string(cx, std::move(res.unwrap())));\n  if (!address) {\n    return nullptr;\n  }\n\n  JS::SetReservedSlot(self, static_cast<uint32_t>(ClientInfo::Slots::Address),\n                      JS::StringValue(address));\n  return address;\n}\n\nhost_api::HttpReq ClientInfo::request_handle(JSContext *cx, JS::HandleObject self) {\n  JS::RootedValue req(cx, JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::Request)));\n  return Request::request_handle(&req.toObject());\n}\n\nbool ClientInfo::request_id_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0);\n\n  JS::RootedString result(cx, client_request_id(self));\n  if (!result) {\n    auto res = request_handle(cx, self).http_req_downstream_client_request_id();\n    if (res.to_err() || !res.unwrap().has_value()) {\n      args.rval().setNull();\n      return true;\n    }\n\n    auto h2fp_str = std::move(res.unwrap().value());\n    result.set(JS_NewStringCopyN(cx, h2fp_str.ptr.get(), h2fp_str.len));\n    JS::SetReservedSlot(self, static_cast<uint32_t>(ClientInfo::Slots::ClientRequestId),\n                        JS::StringValue(result));\n  }\n  args.rval().setString(result);\n  return true;\n}\n\nbool ClientInfo::address_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0);\n\n  JS::RootedString address_str(cx, client_address(self));\n  if (!address_str) {\n    address_str = retrieve_client_address(cx, self);\n    if (!address_str) {\n      args.rval().setNull();\n      return true;\n    }\n  }\n\n  args.rval().setString(address_str);\n  return true;\n}\n\nbool ClientInfo::geo_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  JS::RootedString geo_info_str(cx, geo_info(self));\n  if (!geo_info_str) {\n    JS::RootedString address_str(cx, client_address(self));\n    if (!address_str) {\n      address_str = retrieve_client_address(cx, self);\n      if (!address_str) {\n        args.rval().setNull();\n        return true;\n      }\n    }\n\n    // TODO: skip intermediate encoding, and rely on the fact that we already had the bytes before\n    auto address = core::encode(cx, address_str);\n    if (!address) {\n      return false;\n    }\n\n    // TODO: Remove all of this and rely on the host for validation as the hostcall only takes one\n    // user-supplied parameter\n    int format = AF_INET;\n    size_t octets_len = 4;\n    if (std::find(address.begin(), address.end(), ':') != address.end()) {\n      format = AF_INET6;\n      octets_len = 16;\n    }\n\n    uint8_t octets[sizeof(struct in6_addr)];\n    if (inet_pton(format, address.begin(), octets) != 1) {\n      // While get_geo_info can be invoked through FetchEvent#client.geo, too,\n      // that path can't result in an invalid address here, so we can be more\n      // specific in the error message.\n      // TODO: Make a TypeError\n      JS_ReportErrorLatin1(cx, \"Invalid address passed to fastly.getGeolocationForIpAddress\");\n      return false;\n    }\n\n    auto res = host_api::GeoIp::lookup(std::span<uint8_t>{octets, octets_len});\n    if (res.is_err() || !res.unwrap().has_value()) {\n      args.rval().setNull();\n      return true;\n    }\n\n    auto ret = std::move(res.unwrap().value());\n    geo_info_str =\n        JS::RootedString(cx, JS_NewStringCopyUTF8N(cx, JS::UTF8Chars(ret.ptr.release(), ret.len)));\n    if (!geo_info_str)\n      return false;\n    JS::SetReservedSlot(self, static_cast<uint32_t>(ClientInfo::Slots::GeoInfo),\n                        JS::StringValue(geo_info_str));\n  }\n\n  return JS_ParseJSON(cx, geo_info_str, args.rval());\n}\n\nbool ClientInfo::tls_cipher_openssl_name_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0);\n\n  JS::RootedString result(cx, cipher(self));\n  if (!result) {\n    auto res = request_handle(cx, self).http_req_downstream_tls_cipher_openssl_name();\n    if (auto *err = res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return false;\n    }\n\n    if (!res.unwrap().has_value()) {\n      args.rval().setNull();\n      return true;\n    }\n\n    auto cipher = std::move(res.unwrap().value());\n    result.set(JS_NewStringCopyN(cx, cipher.ptr.get(), cipher.len));\n    JS::SetReservedSlot(self, static_cast<uint32_t>(ClientInfo::Slots::Cipher),\n                        JS::StringValue(result));\n  }\n\n  args.rval().setString(result);\n  return true;\n}\n\nbool ClientInfo::tls_ja3_md5_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0);\n\n  JS::RootedString result(cx, ja3(self));\n  if (!result) {\n    auto res = request_handle(cx, self).http_req_downstream_tls_ja3_md5();\n    if (auto *err = res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return false;\n    }\n\n    if (!res.unwrap().has_value()) {\n      args.rval().setNull();\n      return true;\n    }\n\n    auto ja3 = std::move(res.unwrap().value());\n    JS::UniqueChars hex{OPENSSL_buf2hexstr(ja3.ptr.get(), ja3.len)};\n    std::string ja3hex{hex.get(), std::remove(hex.get(), hex.get() + strlen(hex.get()), ':')};\n\n    result.set(JS_NewStringCopyN(cx, ja3hex.c_str(), ja3hex.length()));\n    JS::SetReservedSlot(self, static_cast<uint32_t>(ClientInfo::Slots::JA3),\n                        JS::StringValue(result));\n  }\n  args.rval().setString(result);\n  return true;\n}\n\nbool ClientInfo::tls_ja4_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0);\n\n  JS::RootedString result(cx, ja4(self));\n  if (!result) {\n    auto res = request_handle(cx, self).http_req_downstream_tls_ja4();\n    if (auto *err = res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return false;\n    }\n\n    if (!res.unwrap().has_value()) {\n      args.rval().setNull();\n      return true;\n    }\n\n    auto ja4_str = std::move(res.unwrap().value());\n    result.set(JS_NewStringCopyN(cx, ja4_str.ptr.get(), ja4_str.len));\n    JS::SetReservedSlot(self, static_cast<uint32_t>(ClientInfo::Slots::JA4),\n                        JS::StringValue(result));\n  }\n  args.rval().setString(result);\n  return true;\n}\n\nbool ClientInfo::h2_fingerprint_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0);\n\n  JS::RootedString result(cx, h2Fingerprint(self));\n  if (!result) {\n    auto res = request_handle(cx, self).http_req_downstream_client_h2_fingerprint();\n    if (auto *err = res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return false;\n    }\n\n    if (!res.unwrap().has_value()) {\n      args.rval().setNull();\n      return true;\n    }\n\n    auto h2fp_str = std::move(res.unwrap().value());\n    result.set(JS_NewStringCopyN(cx, h2fp_str.ptr.get(), h2fp_str.len));\n    JS::SetReservedSlot(self, static_cast<uint32_t>(ClientInfo::Slots::H2Fingerprint),\n                        JS::StringValue(result));\n  }\n  args.rval().setString(result);\n  return true;\n}\n\nbool ClientInfo::oh_fingerprint_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0);\n\n  JS::RootedString result(cx, ohFingerprint(self));\n  if (!result) {\n    auto res = request_handle(cx, self).http_req_downstream_client_oh_fingerprint();\n    if (auto *err = res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return false;\n    }\n\n    if (!res.unwrap().has_value()) {\n      args.rval().setNull();\n      return true;\n    }\n\n    auto ohfp_str = std::move(res.unwrap().value());\n    result.set(JS_NewStringCopyN(cx, ohfp_str.ptr.get(), ohfp_str.len));\n    JS::SetReservedSlot(self, static_cast<uint32_t>(ClientInfo::Slots::OHFingerprint),\n                        JS::StringValue(result));\n  }\n  args.rval().setString(result);\n  return true;\n}\n\nbool ClientInfo::tls_client_hello_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0);\n\n  JS::RootedObject buffer(cx, clientHello(self));\n  if (!buffer) {\n    auto res = request_handle(cx, self).http_req_downstream_tls_client_hello();\n    if (auto *err = res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return false;\n    }\n\n    if (!res.unwrap().has_value()) {\n      args.rval().setNull();\n      return true;\n    }\n\n    auto hello = std::move(res.unwrap().value());\n    buffer.set(JS::NewArrayBufferWithContents(cx, hello.len, hello.ptr.get(),\n                                              JS::NewArrayBufferOutOfMemory::CallerMustFreeMemory));\n    if (!buffer) {\n      // We can be here if the array buffer was too large -- if that was the case then a\n      // JSMSG_BAD_ARRAY_LENGTH will have been created.\n      return false;\n    }\n\n    // `hello` is now owned by `buffer`\n    static_cast<void>(hello.ptr.release());\n    JS::SetReservedSlot(self, static_cast<uint32_t>(ClientInfo::Slots::ClientHello),\n                        JS::ObjectValue(*buffer));\n  }\n\n  args.rval().setObject(*buffer);\n  return true;\n}\n\nbool ClientInfo::tls_client_certificate_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0);\n\n  JS::RootedObject buffer(cx, clientCert(self));\n  if (!buffer) {\n    auto res = request_handle(cx, self).http_req_downstream_tls_raw_client_certificate();\n    if (auto *err = res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return false;\n    }\n\n    if (!res.unwrap().has_value()) {\n      args.rval().setNull();\n      return true;\n    }\n\n    auto cert = std::move(res.unwrap().value());\n\n    buffer.set(JS::NewArrayBufferWithContents(cx, cert.len, cert.ptr.get(),\n                                              JS::NewArrayBufferOutOfMemory::CallerMustFreeMemory));\n    if (!buffer) {\n      // We can be here if the array buffer was too large -- if that was the case then a\n      // JSMSG_BAD_ARRAY_LENGTH will have been created.\n      return false;\n    }\n\n    // `cert` is now owned by `buffer`\n    static_cast<void>(cert.ptr.release());\n    JS::SetReservedSlot(self, static_cast<uint32_t>(ClientInfo::Slots::ClientCert),\n                        JS::ObjectValue(*buffer));\n  }\n\n  args.rval().setObject(*buffer);\n  return true;\n}\n\nbool ClientInfo::tls_protocol_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0);\n\n  JS::RootedString result(cx, protocol(self));\n  if (!result) {\n    auto res = request_handle(cx, self).http_req_downstream_tls_protocol();\n    if (auto *err = res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return false;\n    }\n\n    if (!res.unwrap().has_value()) {\n      args.rval().setNull();\n      return true;\n    }\n\n    auto protocol = std::move(res.unwrap().value());\n    result.set(JS_NewStringCopyN(cx, protocol.ptr.get(), protocol.len));\n    JS::SetReservedSlot(self, static_cast<uint32_t>(ClientInfo::Slots::Protocol),\n                        JS::StringValue(result));\n  }\n\n  args.rval().setString(result);\n  return true;\n}\n\nconst JSFunctionSpec ClientInfo::static_methods[] = {\n    JS_FS_END,\n};\n\nconst JSPropertySpec ClientInfo::static_properties[] = {\n    JS_PS_END,\n};\n\nconst JSFunctionSpec ClientInfo::methods[] = {\n    JS_FS_END,\n};\n\nconst JSPropertySpec ClientInfo::properties[] = {\n    JS_PSG(\"requestId\", request_id_get, JSPROP_ENUMERATE),\n    JS_PSG(\"address\", address_get, JSPROP_ENUMERATE),\n    JS_PSG(\"geo\", geo_get, JSPROP_ENUMERATE),\n    JS_PSG(\"tlsCipherOpensslName\", tls_cipher_openssl_name_get, JSPROP_ENUMERATE),\n    JS_PSG(\"tlsProtocol\", tls_protocol_get, JSPROP_ENUMERATE),\n    JS_PSG(\"tlsJA3MD5\", tls_ja3_md5_get, JSPROP_ENUMERATE),\n    JS_PSG(\"tlsJA4\", tls_ja4_get, JSPROP_ENUMERATE),\n    JS_PSG(\"h2Fingerprint\", h2_fingerprint_get, JSPROP_ENUMERATE),\n    JS_PSG(\"ohFingerprint\", oh_fingerprint_get, JSPROP_ENUMERATE),\n    JS_PSG(\"tlsClientCertificate\", tls_client_certificate_get, JSPROP_ENUMERATE),\n    JS_PSG(\"tlsClientHello\", tls_client_hello_get, JSPROP_ENUMERATE),\n    JS_PS_END,\n};\n\nJSObject *ClientInfo::create(JSContext *cx, JS::HandleValue req) {\n  JS::RootedObject obj(cx, JS_NewObjectWithGivenProto(cx, &class_, proto_obj));\n  if (!obj) {\n    return nullptr;\n  }\n  JS::SetReservedSlot(obj, static_cast<uint32_t>(Slots::Request), req);\n  return obj;\n}\n\nnamespace {\n\nJSString *server_address(JSObject *obj) {\n  JS::Value val = JS::GetReservedSlot(obj, static_cast<uint32_t>(ServerInfo::Slots::Address));\n  return val.isString() ? val.toString() : nullptr;\n}\n\n} // namespace\n\nJSString *ServerInfo::retrieve_server_address(JSContext *cx, JS::HandleObject self) {\n  auto res = request_handle(cx, self).downstream_server_ip_addr();\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return nullptr;\n  }\n\n  JS::RootedString address(cx, common::ip_octets_to_js_string(cx, std::move(res.unwrap())));\n  if (!address) {\n    return nullptr;\n  }\n\n  JS::SetReservedSlot(self, static_cast<uint32_t>(ServerInfo::Slots::Address),\n                      JS::StringValue(address));\n  return address;\n}\n\nhost_api::HttpReq ServerInfo::request_handle(JSContext *cx, JS::HandleObject self) {\n  JS::RootedValue req(cx, JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::Request)));\n  return Request::request_handle(&req.toObject());\n}\n\nbool ServerInfo::address_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0);\n\n  JS::RootedString address_str(cx, server_address(self));\n  if (!address_str) {\n    address_str = retrieve_server_address(cx, self);\n    if (!address_str)\n      return false;\n  }\n\n  args.rval().setString(address_str);\n  return true;\n}\n\nconst JSFunctionSpec ServerInfo::static_methods[] = {\n    JS_FS_END,\n};\n\nconst JSPropertySpec ServerInfo::static_properties[] = {\n    JS_PS_END,\n};\n\nconst JSFunctionSpec ServerInfo::methods[] = {\n    JS_FS_END,\n};\n\nconst JSPropertySpec ServerInfo::properties[] = {\n    JS_PSG(\"address\", address_get, JSPROP_ENUMERATE),\n    JS_PS_END,\n};\n\nJSObject *ServerInfo::create(JSContext *cx, JS::HandleValue req) {\n  JS::RootedObject obj(cx, JS_NewObjectWithGivenProto(cx, &class_, proto_obj));\n  if (!obj) {\n    return nullptr;\n  }\n  JS::SetReservedSlot(obj, static_cast<uint32_t>(Slots::Request), req);\n  return obj;\n}\n\nnamespace {\n\napi::Engine *ENGINE;\n\nJS::PersistentRootedObjectVector *FETCH_HANDLERS;\n\nvoid inc_pending_promise_count(JSObject *self) {\n  MOZ_ASSERT(FetchEvent::is_instance(self));\n  auto count =\n      JS::GetReservedSlot(self, static_cast<uint32_t>(FetchEvent::Slots::PendingPromiseCount))\n          .toInt32();\n  if (count == 0) {\n    ENGINE->incr_event_loop_interest();\n  }\n  count++;\n  MOZ_ASSERT(count > 0);\n  JS::SetReservedSlot(self, static_cast<uint32_t>(FetchEvent::Slots::PendingPromiseCount),\n                      JS::Int32Value(count));\n}\n\nvoid dec_pending_promise_count(JSObject *self) {\n  MOZ_ASSERT(FetchEvent::is_instance(self));\n  auto count =\n      JS::GetReservedSlot(self, static_cast<uint32_t>(FetchEvent::Slots::PendingPromiseCount))\n          .toInt32();\n  MOZ_ASSERT(count > 0);\n  count--;\n  if (count == 0) {\n    ENGINE->decr_event_loop_interest();\n  }\n  JS::SetReservedSlot(self, static_cast<uint32_t>(FetchEvent::Slots::PendingPromiseCount),\n                      JS::Int32Value(count));\n}\n\nbool add_pending_promise(JSContext *cx, JS::HandleObject self, JS::HandleObject promise) {\n  MOZ_ASSERT(FetchEvent::is_instance(self));\n  MOZ_ASSERT(JS::IsPromiseObject(promise));\n\n  JS::RootedObject handler(cx);\n  handler = &JS::GetReservedSlot(\n                 self, static_cast<uint32_t>(FetchEvent::Slots::DecPendingPromiseCountFunc))\n                 .toObject();\n  if (!JS::AddPromiseReactions(cx, promise, handler, handler))\n    return false;\n\n  inc_pending_promise_count(self);\n  return true;\n}\n\n} // namespace\n\nbool FetchEvent::client_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  JS::RootedValue clientInfo(cx,\n                             JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::ClientInfo)));\n\n  if (clientInfo.isUndefined()) {\n    JS::RootedValue req(cx, JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::Request)));\n    JS::RootedObject obj(cx, ClientInfo::create(cx, req));\n    if (!obj)\n      return false;\n    clientInfo.setObject(*obj);\n    JS::SetReservedSlot(self, static_cast<uint32_t>(Slots::ClientInfo), clientInfo);\n  }\n\n  args.rval().set(clientInfo);\n  return true;\n}\n\nbool FetchEvent::server_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  JS::RootedValue serverInfo(cx,\n                             JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::ServerInfo)));\n\n  if (serverInfo.isUndefined()) {\n    JS::RootedValue req(cx, JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::Request)));\n    JS::RootedObject obj(cx, ServerInfo::create(cx, req));\n    if (!obj) {\n      return false;\n    }\n    serverInfo.setObject(*obj);\n    JS::SetReservedSlot(self, static_cast<uint32_t>(Slots::ServerInfo), serverInfo);\n  }\n\n  args.rval().set(serverInfo);\n  return true;\n}\n\nvoid dispatch_fetch_event(HandleObject event) {\n  MOZ_ASSERT(FetchEvent::is_instance(event));\n  RootedValue result(ENGINE->cx());\n  RootedValue event_val(ENGINE->cx(), JS::ObjectValue(*event));\n  HandleValueArray argsv = HandleValueArray(event_val);\n  RootedValue handler(ENGINE->cx());\n  RootedValue rval(ENGINE->cx());\n\n  FetchEvent::start_dispatching(event);\n\n  for (size_t i = 0; i < FETCH_HANDLERS->length(); i++) {\n    handler.setObject(*(*FETCH_HANDLERS)[i]);\n    if (!JS_CallFunctionValue(ENGINE->cx(), ENGINE->global(), handler, argsv, &rval)) {\n      ENGINE->dump_pending_exception(\"dispatching FetchEvent\\n\");\n      break;\n    }\n    if (FetchEvent::state(event) != FetchEvent::State::unhandled) {\n      break;\n    }\n  }\n\n  FetchEvent::stop_dispatching(event);\n}\n\nvoid dispatch_fetch_event(HandleObject event, double *total_compute) {\n  auto pre_handler = system_clock::now();\n  dispatch_fetch_event(event);\n  double diff = duration_cast<microseconds>(system_clock::now() - pre_handler).count();\n  *total_compute += diff;\n  if (ENGINE->debug_logging_enabled()) {\n    printf(\"Request handler took %fms\\n\", diff / 1000);\n  }\n}\n\nJSObject *FetchEvent::prepare_downstream_request(JSContext *cx) {\n  JS::RootedObject requestInstance(\n      cx, JS_NewObjectWithGivenProto(cx, &Request::class_, Request::proto_obj));\n  if (!requestInstance)\n    return nullptr;\n  return Request::create(cx, requestInstance, host_api::HttpReq{}, host_api::HttpBody{}, true);\n}\n\nbool FetchEvent::init_request(JSContext *cx, JS::HandleObject self, host_api::HttpReq req,\n                              host_api::HttpBody body) {\n\n  builtins::web::performance::Performance::timeOrigin.emplace(\n      std::chrono::high_resolution_clock::now());\n\n  JS::RootedObject request(\n      cx, &JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::Request)).toObject());\n\n  MOZ_ASSERT(!Request::request_handle(request).is_valid());\n\n  JS::SetReservedSlot(request, static_cast<uint32_t>(Request::Slots::Request),\n                      JS::Int32Value(req.handle));\n  JS::SetReservedSlot(request, static_cast<uint32_t>(Request::Slots::Body),\n                      JS::Int32Value(body.handle));\n\n  // Set the method.\n  auto res = req.get_method();\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  auto method_str = std::move(res.unwrap());\n  bool is_get = method_str == \"GET\"sv;\n  bool is_head = method_str == \"HEAD\"sv;\n\n  if (!is_get) {\n    std::ignore = common::normalize_http_method(method_str.begin(), method_str.size());\n    JS::RootedString method(cx, JS_NewStringCopyN(cx, method_str.begin(), method_str.len));\n    if (!method) {\n      return false;\n    }\n\n    JS::SetReservedSlot(request, static_cast<uint32_t>(Request::Slots::Method),\n                        JS::StringValue(method));\n  }\n\n  // Set whether we have a body depending on the method.\n  // TODO: verify if that's right. I.e. whether we should treat all requests\n  // that are not GET or HEAD as having a body, which might just be 0-length.\n  // It's not entirely clear what else we even could do here though.\n  if (!is_get && !is_head) {\n    JS::SetReservedSlot(request, static_cast<uint32_t>(Request::Slots::HasBody), JS::TrueValue());\n  }\n\n  auto uri_res = req.get_uri();\n  if (auto *err = uri_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  auto uri_str = std::move(uri_res.unwrap());\n  JS::RootedString url(cx, JS_NewStringCopyN(cx, uri_str.ptr.get(), uri_str.len));\n  if (!url) {\n    return false;\n  }\n  JS::SetReservedSlot(request, static_cast<uint32_t>(Request::Slots::URL), JS::StringValue(url));\n\n  // Set the URL for `globalThis.location` to the client request's URL.\n  JS::RootedObject url_instance(cx, JS_NewObjectWithGivenProto(cx, &URL::class_, URL::proto_obj));\n  if (!url_instance) {\n    return false;\n  }\n\n  jsurl::SpecString spec(reinterpret_cast<uint8_t *>(uri_str.ptr.get()), uri_str.len, uri_str.len);\n  WorkerLocation::url = URL::create(cx, url_instance, spec);\n  if (!WorkerLocation::url) {\n    return false;\n  }\n\n  // Set `fastly.baseURL` to the origin of the client request's URL.\n  // Note that this only happens if baseURL hasn't already been set to another\n  // value explicitly.\n  if (!Fastly::baseURL.get()) {\n    JS::RootedObject url_instance(cx, JS_NewObjectWithGivenProto(cx, &URL::class_, URL::proto_obj));\n    if (!url_instance)\n      return false;\n\n    Fastly::baseURL = URL::create(cx, url_instance, URL::origin(cx, WorkerLocation::url));\n    if (!Fastly::baseURL)\n      return false;\n  }\n\n  return true;\n}\n\nbool FetchEvent::request_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  args.rval().set(JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::Request)));\n  return true;\n}\n\nnamespace {\n\nbool start_response(JSContext *cx, JS::HandleObject response_obj, bool streaming) {\n  auto response = Response::response_handle(response_obj);\n  auto body = RequestOrResponse::body_handle(response_obj);\n\n  // write all the headers\n  if (!RequestOrResponse::commit_headers(cx, response_obj))\n    return false;\n\n  auto res = response.send_downstream(body, streaming);\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  return true;\n}\n\n// Steps in this function refer to the spec at\n// https://w3c.github.io/ServiceWorker/#fetch-event-respondwith\nbool response_promise_then_handler(JSContext *cx, JS::HandleObject event, JS::HandleValue extra,\n                                   JS::CallArgs args) {\n  // Step 10.1\n  // Note: the `then` handler is only invoked after all Promise resolution has\n  // happened. (Even if there were multiple Promises to unwrap first.) That\n  // means that at this point we're guaranteed to have the final value instead\n  // of a Promise wrapping it, so either the value is a Response, or we have to\n  // bail.\n  if (!Response::is_instance(args.get(0))) {\n    JS_ReportErrorUTF8(cx, \"FetchEvent#respondWith must be called with a Response \"\n                           \"object or a Promise resolving to a Response object as \"\n                           \"the first argument\");\n    JS::RootedObject rejection(cx, PromiseRejectedWithPendingError(cx));\n    if (!rejection)\n      return false;\n    args.rval().setObject(*rejection);\n    return FetchEvent::respondWithError(cx, event);\n  }\n\n  // Step 10.2 (very roughly: the way we handle responses and their bodies is\n  // very different.)\n  JS::RootedObject response_obj(cx, &args[0].toObject());\n\n  // Store the FetchEvent on the Response so it can be accessed later\n  JS::SetReservedSlot(response_obj, static_cast<uint32_t>(Response::Slots::FetchEvent),\n                      JS::ObjectValue(*event));\n\n  if (Response::is_upstream(response_obj)) {\n    JS::RootedObject headers(cx, Response::headers(cx, response_obj));\n    // Calling get_list() transitions to Mode::ContentOnly or Mode::CachedInContent.\n    if (!Headers::get_list(cx, headers))\n      return false;\n  }\n\n  if (auto grip_upgrade_request = Response::grip_upgrade_request(response_obj)) {\n    auto backend = Response::backend_str(cx, response_obj);\n\n    auto res = grip_upgrade_request->redirect_to_grip_proxy(backend);\n    if (auto *err = res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return false;\n    }\n    FetchEvent::mark_done(event, true, Response::status(response_obj));\n    return true;\n  }\n\n  if (auto websocket_upgrade_request = Response::websocket_upgrade_request(response_obj)) {\n    auto backend = Response::backend_str(cx, response_obj);\n\n    auto res = websocket_upgrade_request->redirect_to_websocket_proxy(backend);\n    if (auto *err = res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return false;\n    }\n    FetchEvent::mark_done(event, true, Response::status(response_obj));\n    return true;\n  }\n\n  bool streaming = false;\n  if (!RequestOrResponse::maybe_stream_body(cx, response_obj, &streaming)) {\n    return false;\n  }\n\n  if (streaming) {\n    ENGINE->incr_event_loop_interest();\n  }\n  FetchEvent::mark_done(event, streaming, Response::status(response_obj));\n  return start_response(cx, response_obj, streaming);\n}\n\n// Steps in this function refer to the spec at\n// https://w3c.github.io/ServiceWorker/#fetch-event-respondwith\nbool response_promise_catch_handler(JSContext *cx, JS::HandleObject event,\n                                    JS::HandleValue promise_val, JS::CallArgs args) {\n  JS::RootedObject promise(cx, &promise_val.toObject());\n\n  fprintf(stderr, \"Error while running request handler: \");\n  ENGINE->dump_promise_rejection(args.get(0), promise, stderr);\n\n  // TODO: verify that this is the right behavior.\n  // Steps 9.1-2\n  return FetchEvent::respondWithError(cx, event);\n}\n\n} // namespace\n\n// Steps in this function refer to the spec at\n// https://w3c.github.io/ServiceWorker/#fetch-event-respondwith\nbool FetchEvent::respondWith(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(1)\n\n  // Coercion of argument `r` to a Promise<Response>\n  JS::RootedObject response_promise(cx, JS::CallOriginalPromiseResolve(cx, args.get(0)));\n  if (!response_promise)\n    return false;\n\n  // Step 2\n  if (!is_dispatching(self)) {\n    JS_ReportErrorUTF8(cx, \"FetchEvent#respondWith must be called synchronously from \"\n                           \"within a FetchEvent handler\");\n    return false;\n  }\n\n  // Step 3\n  if (state(self) != State::unhandled && state(self) != State::waitToRespond) {\n    JS_ReportErrorUTF8(cx, \"FetchEvent#respondWith can't be called twice on the same event\");\n    return false;\n  }\n\n  // Step 4\n  add_pending_promise(cx, self, response_promise);\n\n  // Steps 5-7 (very roughly)\n  set_state(self, State::waitToRespond);\n\n  // Step 9 (continued in `response_promise_catch_handler` above)\n  JS::RootedObject catch_handler(cx);\n  JS::RootedValue extra(cx, JS::ObjectValue(*response_promise));\n  catch_handler = create_internal_method<response_promise_catch_handler>(cx, self, extra);\n  if (!catch_handler)\n    return false;\n\n  // Step 10 (continued in `response_promise_then_handler` above)\n  JS::RootedObject then_handler(cx);\n  then_handler = create_internal_method<response_promise_then_handler>(cx, self);\n  if (!then_handler)\n    return false;\n\n  if (!JS::AddPromiseReactions(cx, response_promise, then_handler, catch_handler))\n    return false;\n\n  args.rval().setUndefined();\n  return true;\n}\n\nbool FetchEvent::sendEarlyHints(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(1)\n  MOZ_RELEASE_ASSERT(state(self) == State::unhandled || state(self) == State::waitToRespond);\n\n  if (state(self) != State::unhandled && state(self) != State::waitToRespond) {\n    JS_ReportErrorUTF8(\n        cx, \"FetchEvent#sendEarlyHints can't be called after the main response has been sent\");\n    return false;\n  }\n\n  JS::RootedObject headers(cx, Headers::create(cx, args.get(0), Headers::HeadersGuard::None));\n  // Calling get_list() transitions to Mode::ContentOnly or Mode::CachedInContent.\n  if (!Headers::get_list(cx, headers)) {\n    return false;\n  }\n\n  auto response_handle = host_api::HttpResp::make();\n  if (auto *err = response_handle.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n  // 103: Early Hint\n  auto set_res = response_handle.unwrap().set_status(103);\n  if (auto *err = set_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  auto body_handle = host_api::HttpBody::make();\n  if (auto *err = body_handle.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  JS::RootedObject response_instance(\n      cx, JS_NewObjectWithGivenProto(cx, &Response::class_, Response::proto_obj));\n  if (!response_instance) {\n    return false;\n  }\n  RootedObject response_obj(cx, Response::create(cx, response_instance, response_handle.unwrap(),\n                                                 body_handle.unwrap(), false, nullptr, nullptr,\n                                                 nullptr));\n  RootedValue headers_val(cx, JS::ObjectValue(*headers));\n  JS::SetReservedSlot(response_obj, static_cast<uint32_t>(Response::Slots::Headers), headers_val);\n  JS::SetReservedSlot(response_obj, static_cast<uint32_t>(Response::Slots::Status),\n                      JS::Int32Value(103));\n  RequestOrResponse::set_url(response_obj, JS_GetEmptyStringValue(cx));\n\n  args.rval().setUndefined();\n  return start_response(cx, response_obj, false);\n}\n\nbool FetchEvent::respondWithError(JSContext *cx, JS::HandleObject self) {\n  MOZ_RELEASE_ASSERT(state(self) == State::unhandled || state(self) == State::waitToRespond);\n  set_state(self, State::responsedWithError);\n\n  auto response_res = host_api::HttpResp::make();\n  if (auto *err = response_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  auto make_res = host_api::HttpBody::make();\n  if (auto *err = make_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  auto response = response_res.unwrap();\n  auto status_res = response.set_status(500);\n  if (auto *err = status_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  auto send_res = response.send_downstream(make_res.unwrap(), false);\n  if (auto *err = send_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  return true;\n}\n\nnamespace {\n\n// Step 5 of https://w3c.github.io/ServiceWorker/#wait-until-method\nbool dec_pending_promise_count(JSContext *cx, JS::HandleObject event, JS::HandleValue extra,\n                               JS::CallArgs args) {\n  // Step 5.1\n  dec_pending_promise_count(event);\n\n  // Note: step 5.2 not relevant to our implementation.\n  return true;\n}\n\n} // namespace\n\n// Steps in this function refer to the spec at\n// https://w3c.github.io/ServiceWorker/#wait-until-method\nbool FetchEvent::waitUntil(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(1)\n\n  JS::RootedObject promise(cx, JS::CallOriginalPromiseResolve(cx, args.get(0)));\n  if (!promise)\n    return false;\n\n  // Step 2\n  if (!is_active(self)) {\n    JS_ReportErrorUTF8(cx, \"FetchEvent#waitUntil called on inactive event\");\n    return false;\n  }\n\n  // Steps 3-4\n  add_pending_promise(cx, self, promise);\n\n  // Note: step 5 implemented in dec_pending_promise_count\n\n  args.rval().setUndefined();\n  return true;\n}\n\nconst JSFunctionSpec FetchEvent::static_methods[] = {\n    JS_FS_END,\n};\n\nconst JSPropertySpec FetchEvent::static_properties[] = {\n    JS_PS_END,\n};\n\nconst JSFunctionSpec FetchEvent::methods[] = {\n    JS_FN(\"respondWith\", respondWith, 1, JSPROP_ENUMERATE),\n    JS_FN(\"waitUntil\", waitUntil, 1, JSPROP_ENUMERATE),\n    JS_FN(\"sendEarlyHints\", sendEarlyHints, 1, JSPROP_ENUMERATE),\n    JS_FS_END,\n};\n\nconst JSPropertySpec FetchEvent::properties[] = {\n    JS_PSG(\"client\", client_get, JSPROP_ENUMERATE),\n    JS_PSG(\"request\", request_get, JSPROP_ENUMERATE),\n    JS_PSG(\"server\", server_get, JSPROP_ENUMERATE),\n    JS_PS_END,\n};\n\nJSObject *FetchEvent::create(JSContext *cx) {\n  JS::RootedObject self(cx, JS_NewObjectWithGivenProto(cx, &class_, proto_obj));\n  if (!self)\n    return nullptr;\n\n  if (!reset(cx, self)) {\n    return nullptr;\n  }\n\n  return self;\n}\n\nbool FetchEvent::reset(JSContext *cx, JS::HandleObject self) {\n  JS::RootedObject request(cx, prepare_downstream_request(cx));\n  if (!request)\n    return false;\n\n  JS::RootedObject dec_count_handler(cx,\n                                     create_internal_method<dec_pending_promise_count>(cx, self));\n  if (!dec_count_handler)\n    return false;\n\n  JS::SetReservedSlot(self, static_cast<uint32_t>(Slots::Request), JS::ObjectValue(*request));\n  JS::SetReservedSlot(self, static_cast<uint32_t>(Slots::Dispatch), JS::FalseValue());\n  JS::SetReservedSlot(self, static_cast<uint32_t>(Slots::State),\n                      JS::Int32Value((int)State::unhandled));\n  JS::SetReservedSlot(self, static_cast<uint32_t>(Slots::PendingPromiseCount), JS::Int32Value(0));\n  JS::SetReservedSlot(self, static_cast<uint32_t>(Slots::DecPendingPromiseCountFunc),\n                      JS::ObjectValue(*dec_count_handler));\n  JS::SetReservedSlot(self, static_cast<uint32_t>(Slots::ClientInfo), JS::UndefinedValue());\n  JS::SetReservedSlot(self, static_cast<uint32_t>(Slots::ServerInfo), JS::UndefinedValue());\n  return true;\n}\n\nbool FetchEvent::is_active(JSObject *self) {\n  MOZ_ASSERT(is_instance(self));\n  // Note: we also treat the FetchEvent as active if it's in `responseStreaming`\n  // state because that requires us to extend the service's lifetime as well. In\n  // the spec this is achieved using individual promise counts for the body read\n  // operations.\n  return JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::Dispatch)).toBoolean() ||\n         state(self) == State::responseStreaming ||\n         JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::PendingPromiseCount)).toInt32() > 0;\n}\n\nbool FetchEvent::is_dispatching(JSObject *self) {\n  MOZ_ASSERT(is_instance(self));\n  return JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::Dispatch)).toBoolean();\n}\n\nvoid FetchEvent::start_dispatching(JSObject *self) {\n  MOZ_ASSERT(!is_dispatching(self));\n  JS::SetReservedSlot(self, static_cast<uint32_t>(Slots::Dispatch), JS::TrueValue());\n}\n\nvoid FetchEvent::stop_dispatching(JSObject *self) {\n  MOZ_ASSERT(is_dispatching(self));\n  JS::SetReservedSlot(self, static_cast<uint32_t>(Slots::Dispatch), JS::FalseValue());\n}\n\nFetchEvent::State FetchEvent::state(JSObject *self) {\n  MOZ_ASSERT(is_instance(self));\n  return static_cast<State>(\n      JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::State)).toInt32());\n}\n\nvoid FetchEvent::mark_done(JSObject *self, bool streaming, uint16_t status_code) {\n  MOZ_ASSERT(is_instance(self));\n  auto new_state = [&] {\n    // 103: Early Hint\n    if (status_code == 103) {\n      return State::unhandled;\n    }\n    if (streaming) {\n      return State::responseStreaming;\n    }\n    return State::responseDone;\n  }();\n  JS::SetReservedSlot(self, static_cast<uint32_t>(Slots::State),\n                      JS::Int32Value(static_cast<int32_t>(new_state)));\n}\n\nvoid FetchEvent::set_state(JSObject *self, State new_state) {\n  MOZ_ASSERT(is_instance(self));\n  JS::SetReservedSlot(self, static_cast<uint32_t>(Slots::State),\n                      JS::Int32Value(static_cast<int32_t>(new_state)));\n}\n\nbool FetchEvent::response_started(JSObject *self) {\n  auto current_state = state(self);\n  return current_state != State::unhandled && current_state != State::waitToRespond;\n}\n\nstatic bool addEventListener(JSContext *cx, unsigned argc, Value *vp) {\n  JS::CallArgs args = CallArgsFromVp(argc, vp);\n  if (!args.requireAtLeast(cx, \"addEventListener\", 2)) {\n    return false;\n  }\n\n  auto event_chars = core::encode(cx, args[0]);\n  if (!event_chars) {\n    return false;\n  }\n\n  if (strncmp(event_chars.begin(), \"fetch\", event_chars.len)) {\n    fprintf(stderr,\n            \"Error: addEventListener only supports the event 'fetch' right now, \"\n            \"but got event '%s'\\n\",\n            event_chars.begin());\n    exit(1);\n  }\n\n  RootedValue val(cx, args[1]);\n  if (!val.isObject() || !JS_ObjectIsFunction(&val.toObject())) {\n    fprintf(stderr, \"Error: addEventListener: Argument 2 is not a function.\\n\");\n    exit(1);\n  }\n\n  return FETCH_HANDLERS->append(&val.toObject());\n}\n\nbool install(api::Engine *engine) {\n  ENGINE = engine;\n  FETCH_HANDLERS = new JS::PersistentRootedObjectVector(engine->cx());\n\n  if (!JS_DefineFunction(engine->cx(), engine->global(), \"addEventListener\", addEventListener, 2,\n                         0)) {\n    MOZ_RELEASE_ASSERT(false);\n  }\n\n  if (!FetchEvent::init_class(engine->cx(), engine->global()))\n    return false;\n\n  if (!FetchEvent::create(engine->cx())) {\n    MOZ_RELEASE_ASSERT(false);\n  }\n\n  if (!ClientInfo::init_class(engine->cx(), engine->global())) {\n    return false;\n  }\n\n  if (!ServerInfo::init_class(engine->cx(), engine->global())) {\n    return false;\n  }\n\n  return true;\n}\n\n} // namespace fastly::fetch_event\n"
  },
  {
    "path": "runtime/fastly/builtins/fetch-event.h",
    "content": "#ifndef FASTLY_FETCH_EVENT_H\n#define FASTLY_FETCH_EVENT_H\n\n#include \"../host-api/host_api_fastly.h\"\n#include \"builtin.h\"\n#include \"extension-api.h\"\n#include \"host_api.h\"\n#include <chrono>\n\nnamespace fastly::fetch_event {\n\nclass ClientInfo final : public builtins::BuiltinNoConstructor<ClientInfo> {\n  static bool request_id_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool address_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool geo_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool tls_cipher_openssl_name_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool tls_protocol_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool tls_client_hello_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool tls_ja3_md5_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool tls_ja4_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool h2_fingerprint_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool oh_fingerprint_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool tls_client_certificate_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static host_api::HttpReq request_handle(JSContext *cx, JS::HandleObject self);\n  static JSString *retrieve_client_address(JSContext *cx, JS::HandleObject self);\n\npublic:\n  static constexpr const char *class_name = \"ClientInfo\";\n\n  enum class Slots {\n    Request,\n    Address,\n    GeoInfo,\n    Cipher,\n    Protocol,\n    ClientHello,\n    JA3,\n    JA4,\n    H2Fingerprint,\n    OHFingerprint,\n    ClientCert,\n    ClientRequestId,\n    Count,\n  };\n  static const JSFunctionSpec static_methods[];\n  static const JSPropertySpec static_properties[];\n  static const JSFunctionSpec methods[];\n  static const JSPropertySpec properties[];\n\n  static JSObject *create(JSContext *cx, JS::HandleValue req);\n};\n\nclass ServerInfo final : public builtins::BuiltinNoConstructor<ServerInfo> {\n  static bool address_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static host_api::HttpReq request_handle(JSContext *cx, JS::HandleObject self);\n  static JSString *retrieve_server_address(JSContext *cx, JS::HandleObject self);\n\npublic:\n  static constexpr const char *class_name = \"ServerInfo\";\n\n  enum class Slots {\n    Request,\n    Address,\n    Count,\n  };\n  static const JSFunctionSpec static_methods[];\n  static const JSPropertySpec static_properties[];\n  static const JSFunctionSpec methods[];\n  static const JSPropertySpec properties[];\n\n  static JSObject *create(JSContext *cx, JS::HandleValue req);\n};\n\nvoid dispatch_fetch_event(HandleObject event);\nvoid dispatch_fetch_event(HandleObject event, double *total_compute);\n\nclass FetchEvent final : public builtins::BuiltinNoConstructor<FetchEvent> {\n  static bool respondWith(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool client_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool request_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool server_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool waitUntil(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool sendEarlyHints(JSContext *cx, unsigned argc, JS::Value *vp);\n\npublic:\n  static constexpr const char *class_name = \"FetchEvent\";\n\n  enum class State {\n    unhandled,\n    waitToRespond,\n    responseStreaming,\n    responseDone,\n    responsedWithError,\n  };\n\n  enum class Slots {\n    Dispatch,\n    Request,\n    State,\n    PendingPromiseCount,\n    DecPendingPromiseCountFunc,\n    ClientInfo,\n    ServerInfo,\n    Count\n  };\n\n  static const JSFunctionSpec static_methods[];\n  static const JSPropertySpec static_properties[];\n  static const JSFunctionSpec methods[];\n  static const JSPropertySpec properties[];\n\n  static JSObject *create(JSContext *cx);\n  static bool reset(JSContext *cx, JS::HandleObject self);\n\n  /**\n   * Create a Request object for the incoming request.\n   *\n   * Since this happens during initialization time, the object will not be fully\n   * initialized. It's filled in at runtime using `init_request`.\n   */\n  static JSObject *prepare_downstream_request(JSContext *cx);\n\n  /**\n   * Fully initialize the Request object based on the incoming request.\n   */\n  static bool init_request(JSContext *cx, JS::HandleObject self, host_api::HttpReq req,\n                           host_api::HttpBody body);\n\n  static bool respondWithError(JSContext *cx, JS::HandleObject self);\n  static bool is_active(JSObject *self);\n  static bool is_dispatching(JSObject *self);\n  static void start_dispatching(JSObject *self);\n  static void stop_dispatching(JSObject *self);\n\n  static State state(JSObject *self);\n  static void mark_done(JSObject *self, bool streaming, uint16_t status_code);\n  static void set_state(JSObject *self, State state);\n  static bool response_started(JSObject *self);\n\n  static JS::HandleObject instance();\n};\n\nbool install(api::Engine *engine);\n\n} // namespace fastly::fetch_event\n\n#endif\n"
  },
  {
    "path": "runtime/fastly/builtins/html-rewriter.cpp",
    "content": "#include \"html-rewriter.h\"\n#include \"../../../StarlingMonkey/builtins/web/streams/transform-stream-default-controller.h\"\n#include \"../../../StarlingMonkey/builtins/web/streams/transform-stream.h\"\n#include \"../../../StarlingMonkey/runtime/encode.h\"\n#include \"../host-api/host_api_fastly.h\"\n#include <lol_html.h>\n\nusing builtins::web::streams::TransformStream;\nusing builtins::web::streams::TransformStreamDefaultController;\n\nnamespace fastly::html_rewriter {\nconst JSFunctionSpec Element::static_methods[] = {JS_FS_END};\nconst JSPropertySpec Element::static_properties[] = {JS_PS_END};\nconst JSFunctionSpec Element::methods[] = {\n    JS_FN(\"before\", before, 1, JSPROP_ENUMERATE),\n    JS_FN(\"prepend\", prepend, 1, JSPROP_ENUMERATE),\n    JS_FN(\"append\", append, 1, JSPROP_ENUMERATE),\n    JS_FN(\"after\", after, 1, JSPROP_ENUMERATE),\n    JS_FN(\"getAttribute\", getAttribute, 1, JSPROP_ENUMERATE),\n    JS_FN(\"setAttribute\", setAttribute, 2, JSPROP_ENUMERATE),\n    JS_FN(\"removeAttribute\", removeAttribute, 1, JSPROP_ENUMERATE),\n    JS_FN(\"replaceChildren\", replaceChildren, 1, JSPROP_ENUMERATE),\n    JS_FN(\"replaceWith\", replaceWith, 1, JSPROP_ENUMERATE),\n    JS_FS_END};\nconst JSPropertySpec Element::properties[] = {\n    JS_PSG(\"selector\", Element::selector_get, JSPROP_ENUMERATE),\n    JS_PSG(\"tag\", Element::tag_get, JSPROP_ENUMERATE), JS_PS_END};\n\nlol_html_element_t *raw_element(JSObject *self) {\n  MOZ_ASSERT(Element::is_instance(self));\n  return static_cast<lol_html_element_t *>(\n      JS::GetReservedSlot(self, static_cast<uint32_t>(Element::Slots::Raw)).toPrivate());\n}\n\nbool Element::selector_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n  auto selector = JS::GetReservedSlot(self, static_cast<size_t>(Slots::Selector)).toString();\n  args.rval().setString(selector);\n  return true;\n}\n\nbool Element::tag_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n  auto element = raw_element(self);\n  MOZ_ASSERT(element);\n  auto str = lol_html_element_tag_name_get(element);\n  args.rval().setString(JS_NewStringCopyN(cx, str.data, str.len));\n  return true;\n}\n\n// We should escape only if the user supplies { escapeHTML: true } in the options object\nstatic bool should_escape_html(JSContext *cx, JS::HandleValue options_arg) {\n  if (!options_arg.isObject()) {\n    return false;\n  }\n\n  JS::RootedObject options_obj(cx, &options_arg.toObject());\n  JS::RootedValue escape_html_val(cx);\n  if (!JS_GetProperty(cx, options_obj, \"escapeHTML\", &escape_html_val)) {\n    return false;\n  }\n  return escape_html_val.isBoolean() && escape_html_val.toBoolean();\n}\n\nbool Element::before(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(1)\n\n  JS::HandleValue content_arg = args.get(0);\n  auto content = core::encode(cx, content_arg);\n  if (!content) {\n    return false;\n  }\n\n  auto element = raw_element(self);\n  MOZ_ASSERT(element);\n  return lol_html_element_before(element, content.begin(), content.size(),\n                                 !should_escape_html(cx, args.get(1))) == 0;\n}\n\nbool Element::prepend(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(1)\n\n  JS::HandleValue content_arg = args.get(0);\n  auto content = core::encode(cx, content_arg);\n  if (!content) {\n    return false;\n  }\n\n  auto element = raw_element(self);\n  MOZ_ASSERT(element);\n  return lol_html_element_prepend(element, content.begin(), content.size(),\n                                  !should_escape_html(cx, args.get(1))) == 0;\n}\n\nbool Element::append(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(1)\n\n  JS::HandleValue content_arg = args.get(0);\n  auto content = core::encode(cx, content_arg);\n  if (!content) {\n    return false;\n  }\n\n  auto element = raw_element(self);\n  MOZ_ASSERT(element);\n  return lol_html_element_append(element, content.begin(), content.size(),\n                                 !should_escape_html(cx, args.get(1))) == 0;\n}\n\nbool Element::after(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(1)\n\n  JS::HandleValue content_arg = args.get(0);\n  auto content = core::encode(cx, content_arg);\n  if (!content) {\n    return false;\n  }\n  auto element = raw_element(self);\n  MOZ_ASSERT(element);\n  return lol_html_element_after(element, content.begin(), content.size(),\n                                !should_escape_html(cx, args.get(1))) == 0;\n}\n\nbool Element::getAttribute(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(1)\n\n  JS::HandleValue name_arg = args.get(0);\n  auto name = core::encode(cx, name_arg);\n  if (!name) {\n    return false;\n  }\n\n  auto element = raw_element(self);\n  MOZ_ASSERT(element);\n  auto attr = lol_html_element_get_attribute(element, name.begin(), name.size());\n  if (!attr.data) {\n    args.rval().setNull();\n  } else {\n    args.rval().setString(JS_NewStringCopyN(cx, attr.data, attr.len));\n  }\n\n  return true;\n}\n\nbool Element::setAttribute(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(2)\n\n  JS::HandleValue name_arg = args.get(0);\n  auto name = core::encode(cx, name_arg);\n  if (!name) {\n    return false;\n  }\n\n  JS::HandleValue value_arg = args.get(1);\n  auto value = core::encode(cx, value_arg);\n  if (!value) {\n    return false;\n  }\n\n  auto element = raw_element(self);\n  MOZ_ASSERT(element);\n  return lol_html_element_set_attribute(element, name.begin(), name.size(), value.begin(),\n                                        value.size()) == 0;\n}\n\nbool Element::removeAttribute(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(1)\n\n  JS::HandleValue name_arg = args.get(0);\n  auto name = core::encode(cx, name_arg);\n  if (!name) {\n    return false;\n  }\n\n  auto element = raw_element(self);\n  MOZ_ASSERT(element);\n  lol_html_element_remove_attribute(element, name.begin(), name.size());\n\n  return true;\n}\n\nbool Element::replaceChildren(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(1)\n\n  JS::HandleValue content_arg = args.get(0);\n  auto content = core::encode(cx, content_arg);\n  if (!content) {\n    return false;\n  }\n\n  auto element = raw_element(self);\n  MOZ_ASSERT(element);\n  return lol_html_element_set_inner_content(element, content.begin(), content.size(),\n                                            !should_escape_html(cx, args.get(1))) == 0;\n}\n\nbool Element::replaceWith(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(1)\n\n  JS::HandleValue content_arg = args.get(0);\n  auto content = core::encode(cx, content_arg);\n  if (!content) {\n    return false;\n  }\n\n  auto element = raw_element(self);\n  MOZ_ASSERT(element);\n  return lol_html_element_replace(element, content.begin(), content.size(),\n                                  !should_escape_html(cx, args.get(1))) == 0;\n}\n\nstatic JSObject *create_element(JSContext *cx, lol_html_element_t *element,\n                                JS::HandleString selector) {\n  JS::RootedObject obj(cx, JS_NewObjectWithGivenProto(cx, &Element::class_, Element::proto_obj));\n  if (!obj) {\n    return nullptr;\n  }\n  JS::SetReservedSlot(obj, static_cast<uint32_t>(Element::Slots::Raw), JS::PrivateValue(element));\n  JS::SetReservedSlot(obj, static_cast<uint32_t>(Element::Slots::Selector),\n                      JS::StringValue(selector));\n  return obj;\n}\n\nconst JSFunctionSpec HTMLRewritingStream::static_methods[] = {JS_FS_END};\nconst JSPropertySpec HTMLRewritingStream::static_properties[] = {JS_PS_END};\nconst JSFunctionSpec HTMLRewritingStream::methods[] = {\n    JS_FN(\"onElement\", onElement, 2, JSPROP_ENUMERATE), JS_FS_END};\nconst JSPropertySpec HTMLRewritingStream::properties[] = {\n    JS_PSG(\"readable\", HTMLRewritingStream::readable_get, JSPROP_ENUMERATE),\n    JS_PSG(\"writable\", HTMLRewritingStream::writable_get, JSPROP_ENUMERATE), JS_PS_END};\n\nstatic lol_html_rewriter_builder_t *builder(JSObject *self) {\n  MOZ_ASSERT(HTMLRewritingStream::is_instance(self));\n  return static_cast<lol_html_rewriter_builder_t *>(\n      JS::GetReservedSlot(self, static_cast<uint32_t>(HTMLRewritingStream::Slots::RawBuilder))\n          .toPrivate());\n}\n\nstatic void set_builder(JSObject *self, lol_html_rewriter_builder_t *builder) {\n  MOZ_ASSERT(HTMLRewritingStream::is_instance(self));\n  JS::SetReservedSlot(self, static_cast<uint32_t>(HTMLRewritingStream::Slots::RawBuilder),\n                      JS::PrivateValue(builder));\n}\n\nstatic JSObject *transform(JSObject *self) {\n  MOZ_ASSERT(HTMLRewritingStream::is_instance(self));\n  return &JS::GetReservedSlot(self, HTMLRewritingStream::Slots::Transform).toObject();\n}\n\nstatic lol_html_rewriter_t *raw_rewriter(JSObject *self) {\n  MOZ_ASSERT(HTMLRewritingStream::is_instance(self));\n  return static_cast<lol_html_rewriter_t *>(\n      JS::GetReservedSlot(self, static_cast<uint32_t>(HTMLRewritingStream::Slots::RawRewriter))\n          .toPrivate());\n}\nstatic void set_raw_rewriter(JSObject *self, lol_html_rewriter_t *rewriter) {\n  MOZ_ASSERT(HTMLRewritingStream::is_instance(self));\n  JS::SetReservedSlot(self, HTMLRewritingStream::Slots::RawRewriter, JS::PrivateValue(rewriter));\n}\n\n// Data needed to call an element handler from lol_html\n// This also manages the lifetime of the lol-html selector\n// There should be exactly one of these per element handler registered on the rewriter\n// They should all be deleted when the HTMLRewritingStream is finalized\nclass ElementHandlerData {\npublic:\n  ElementHandlerData(JSContext *cx, JSObject *handler, JSString *js_selector,\n                     lol_html_selector_t *raw_selector)\n      : cx_(cx), handler_(handler), js_selector_(js_selector), raw_selector_(raw_selector) {}\n\n  ~ElementHandlerData() { lol_html_selector_free(raw_selector_); }\n\n  JSContext *cx() const { return cx_; }\n  JSObject *handler() const { return handler_; }\n  JSString *selector() const { return js_selector_; }\n\n  void trace(JSTracer *trc) {\n    TraceEdge(trc, &handler_, \"ElementHandlerData handler\");\n    TraceEdge(trc, &js_selector_, \"ElementHandlerData selector\");\n  }\n\nprivate:\n  JSContext *cx_;\n  JS::Heap<JSObject *> handler_;\n  JS::Heap<JSString *> js_selector_;\n  lol_html_selector_t *raw_selector_;\n};\n\n// Called by lol_html when an element matching a registered selector is found\nstatic lol_html_rewriter_directive_t handle_element(lol_html_element_t *element, void *user_data) {\n  auto *data = static_cast<ElementHandlerData *>(user_data);\n  JS::RootedString selector(data->cx(), data->selector());\n  JS::RootedObject jsElement(data->cx(), create_element(data->cx(), element, selector));\n  if (!jsElement) {\n    return LOL_HTML_STOP;\n  }\n  JS::RootedValue jsElementVal(data->cx(), JS::ObjectValue(*jsElement));\n  JS::RootedValue handlerVal(data->cx(), JS::ObjectValue(*data->handler()));\n  JS::HandleValueArray arg(jsElementVal);\n  JS::RootedValue rval(data->cx());\n  if (!JS_CallFunctionValue(data->cx(), nullptr, handlerVal, arg, &rval)) {\n    return LOL_HTML_STOP;\n  }\n  return LOL_HTML_CONTINUE;\n}\n\nbool HTMLRewritingStream::onElement(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(2)\n\n  if (!builder(self)) {\n    JS_ReportErrorASCII(cx, \"HTMLRewriter: cannot add handlers after the rewriter has been used\");\n    return false;\n  }\n\n  JS::HandleValue selector_arg = args.get(0);\n  auto selector_str = core::encode(cx, selector_arg);\n  if (!selector_str) {\n    return false;\n  }\n\n  JS::HandleValue handler = args.get(1);\n  if (!handler.isObject() || !JS_ObjectIsFunction(&handler.toObject())) {\n    JS_ReportErrorASCII(cx, \"HTMLRewriter: element handler must be a function\");\n    return false;\n  }\n\n  auto raw_selector = lol_html_selector_parse(selector_str.begin(), selector_str.size());\n  if (!raw_selector) {\n    auto error = lol_html_take_last_error();\n    if (error.data) {\n      // Error may not be null-terminated\n      std::string msg(error.data, error.len);\n      JS_ReportErrorASCII(cx, \"HTMLRewriter: invalid selector - %s\", msg.c_str());\n    } else {\n      JS_ReportErrorASCII(cx, \"HTMLRewriter: invalid selector\");\n    }\n    return false;\n  }\n  // Create a unique_ptr so we don't leak if we error out below\n  auto handler_data = std::make_unique<ElementHandlerData>(cx, &handler.toObject(),\n                                                           selector_arg.toString(), raw_selector);\n\n  if (lol_html_rewriter_builder_add_element_content_handlers(\n          builder(self), raw_selector, handle_element, handler_data.get(), nullptr, nullptr,\n          nullptr, nullptr) != 0) {\n    return false;\n  }\n\n  // This slot holds all element handlers so we can free them when the stream is finalized.\n  // This will also free the lol-html selectors.\n  auto element_handlers = static_cast<std::vector<ElementHandlerData *> *>(\n      JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::ElementHandlers)).toPrivate());\n  element_handlers->push_back(handler_data.release());\n\n  args.rval().setObject(*self);\n  return true;\n}\n\nstruct OutputContextData {\n  JSContext *cx;\n  JS::Heap<JSObject *> self;\n  bool enqueue_failed;\n\n  OutputContextData(JSContext *cx, JSObject *self) : cx(cx), self(self), enqueue_failed(false) {}\n\n  void trace(JSTracer *trc) { TraceEdge(trc, &self, \"OutputContextData self\"); }\n};\n\nvoid HTMLRewritingStream::finalize(JS::GCContext *gcx, JSObject *self) {\n  MOZ_ASSERT(is_instance(self));\n  auto build = builder(self);\n  if (build) {\n    lol_html_rewriter_builder_free(static_cast<lol_html_rewriter_builder_t *>(build));\n  }\n\n  auto element_handlers = static_cast<std::vector<ElementHandlerData *> *>(\n      JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::ElementHandlers)).toPrivate());\n  if (element_handlers) {\n    for (auto handler : *element_handlers) {\n      delete handler;\n    }\n    delete element_handlers;\n  }\n\n  auto output_context = static_cast<OutputContextData *>(\n      JS::GetReservedSlot(self, HTMLRewritingStream::Slots::OutputContext).toPrivate());\n  if (output_context) {\n    delete output_context;\n  }\n\n  auto rewriter = raw_rewriter(self);\n  if (rewriter) {\n    lol_html_rewriter_free(static_cast<lol_html_rewriter_t *>(rewriter));\n  }\n}\n\nvoid HTMLRewritingStream::trace(JSTracer *trc, JSObject *self) {\n  MOZ_ASSERT(is_instance(self));\n\n  auto element_handlers_val =\n      JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::ElementHandlers));\n  if (!element_handlers_val.isUndefined()) {\n    auto element_handlers =\n        static_cast<std::vector<ElementHandlerData *> *>(element_handlers_val.toPrivate());\n    if (element_handlers) {\n      for (auto *handler : *element_handlers) {\n        handler->trace(trc);\n      }\n    }\n  }\n\n  auto output_context_val = JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::OutputContext));\n  if (!output_context_val.isUndefined()) {\n    auto output_context = static_cast<OutputContextData *>(output_context_val.toPrivate());\n    if (output_context) {\n      output_context->trace(trc);\n    }\n  }\n}\n\nstatic void output_callback(const char *chunk, size_t chunk_len, void *user_data) {\n  auto *ctx = static_cast<OutputContextData *>(user_data);\n  JSContext *cx = ctx->cx;\n  JS::RootedObject self(cx, ctx->self);\n\n  JS::RootedObject out_obj(cx, JS_NewUint8Array(cx, chunk_len));\n  if (!out_obj) {\n    return;\n  }\n\n  {\n    bool is_shared;\n    JS::AutoCheckCannotGC nogc(cx);\n    uint8_t *out_buffer = JS_GetUint8ArrayData(out_obj, &is_shared, nogc);\n    memcpy(out_buffer, chunk, chunk_len);\n  }\n\n  JS::RootedObject controller(cx, TransformStream::controller(transform(self)));\n  JS::RootedValue out_chunk(cx, JS::ObjectValue(*out_obj));\n\n  if (!TransformStreamDefaultController::Enqueue(cx, controller, out_chunk)) {\n    ctx->enqueue_failed = true;\n    return;\n  }\n}\n\n// lol-html doesn't support registering handlers after any input has been processed,\n// so we finalize the builder and create the rewriter on the first chunk submitted to transform\nbool HTMLRewritingStream::finish_building(JSContext *cx, JS::HandleObject stream) {\n  MOZ_ASSERT(is_instance(stream));\n\n  // The output callback needs the JSContext and the stream object so it can enqueue into output\n  // stream. We use a unique_ptr to ensure we don't leak if something fails.\n  auto output_context = std::make_unique<OutputContextData>(cx, stream);\n  // Same defaults as Rust\n  lol_html_memory_settings_t memory_settings = {1024, std::numeric_limits<size_t>::max()};\n  auto encoding_string_length = 5; // \"utf-8\"\n  auto rewriter =\n      lol_html_rewriter_build(builder(stream), \"utf-8\", encoding_string_length, memory_settings,\n                              output_callback, output_context.get(), true);\n  if (!rewriter) {\n    return false;\n  }\n\n  JS_SetReservedSlot(stream, HTMLRewritingStream::Slots::OutputContext,\n                     JS::PrivateValue(output_context.release()));\n  set_raw_rewriter(stream, rewriter);\n\n  // The builder is no longer needed after building the rewriter and can be safely freed\n  lol_html_rewriter_builder_free(builder(stream));\n  set_builder(stream, nullptr); // Ensure we don't try to free it again in finalize\n\n  return true;\n}\n\nbool HTMLRewritingStream::transformAlgorithm(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER_WITH_NAME(1, \"HTML rewriter transform algorithm\")\n\n  if (!raw_rewriter(self)) {\n    HTMLRewritingStream::finish_building(cx, self);\n  }\n\n  auto rewriter = raw_rewriter(self);\n  MOZ_ASSERT(rewriter);\n\n  auto chunk = args.get(0);\n  auto data = value_to_buffer(cx, chunk, \"HTMLRewritingStream transform: chunks\");\n  if (!data.has_value()) {\n    return false;\n  }\n\n  if (data->size() == 0) {\n    return true;\n  }\n\n  lol_html_take_last_error(); // Clear any previous error\n  // lol-html will call output_callback with the processed data\n  lol_html_rewriter_write(rewriter, reinterpret_cast<const char *>(data->data()), data->size());\n  auto err = lol_html_take_last_error();\n  if (err.data) {\n    // Error may not be null-terminated\n    JS_ReportErrorASCII(cx, \"Error processing HTML: %s\", std::string(err.data, err.len).c_str());\n    return false;\n  }\n\n  auto output_context = static_cast<OutputContextData *>(\n      JS::GetReservedSlot(self, HTMLRewritingStream::Slots::OutputContext).toPrivate());\n  if (output_context->enqueue_failed) {\n    JS_ReportErrorASCII(cx, \"Error processing HTML: output stream enqueue failed\");\n    return false;\n  }\n\n  args.rval().setUndefined();\n  return true;\n}\n\nbool HTMLRewritingStream::flushAlgorithm(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER_WITH_NAME(0, \"HTML rewriter flush algorithm\")\n\n  // Just in case the stream is flushed immediately\n  if (!raw_rewriter(self)) {\n    HTMLRewritingStream::finish_building(cx, self);\n  }\n\n  auto rewriter = raw_rewriter(self);\n  MOZ_ASSERT(rewriter);\n\n  lol_html_take_last_error(); // Clear any previous error\n  // lol-html will call output_callback with any remaining data\n  lol_html_rewriter_end(rewriter);\n  auto err = lol_html_take_last_error();\n  if (err.data) {\n    // Error may not be null-terminated\n    JS_ReportErrorASCII(cx, \"Error processing HTML: %s\", std::string(err.data, err.len).c_str());\n    return false;\n  }\n\n  args.rval().setUndefined();\n  return true;\n}\n\nbool HTMLRewritingStream::readable_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER_WITH_NAME(0, \"get readable\")\n  args.rval().setObject(*TransformStream::readable(transform(self)));\n  return true;\n}\n\nbool HTMLRewritingStream::writable_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER_WITH_NAME(0, \"get writable\")\n  args.rval().setObject(*TransformStream::writable(transform(self)));\n  return true;\n}\n\nJS::PersistentRooted<JSObject *> transformAlgo;\nJS::PersistentRooted<JSObject *> flushAlgo;\n\nbool HTMLRewritingStream::constructor(JSContext *cx, unsigned argc, JS::Value *vp) {\n  CTOR_HEADER(\"HTMLRewritingStream\", 0)\n\n  JS::RootedObject instance(cx, JS_NewObjectForConstructor(cx, &class_, args));\n  if (!instance) {\n    return false;\n  }\n  auto builder = lol_html_rewriter_builder_new();\n  if (!builder) {\n    return false;\n  }\n  set_builder(instance, builder);\n  // We have no rewriter initially; it will be created on the first chunk processed\n  set_raw_rewriter(instance, nullptr);\n  JS::SetReservedSlot(instance, static_cast<uint32_t>(Slots::OutputContext),\n                      JS::PrivateValue(nullptr));\n  JS::RootedValue stream_val(cx, JS::ObjectValue(*instance));\n  JS::RootedObject transform(cx, TransformStream::create(cx, 1, nullptr, 0, nullptr, stream_val,\n                                                         nullptr, transformAlgo, flushAlgo));\n  if (!transform) {\n    return false;\n  }\n\n  TransformStream::set_used_as_mixin(transform);\n  JS::SetReservedSlot(instance, HTMLRewritingStream::Slots::Transform, JS::ObjectValue(*transform));\n\n  JS::SetReservedSlot(instance, static_cast<uint32_t>(Slots::ElementHandlers),\n                      JS::PrivateValue(new std::vector<ElementHandlerData *>()));\n\n  args.rval().setObject(*instance);\n  return true;\n}\n\nbool HTMLRewritingStream::init_class(JSContext *cx, JS::HandleObject global) {\n  if (!init_class_impl(cx, global)) {\n    return false;\n  }\n\n  JSFunction *transformFun =\n      JS_NewFunction(cx, transformAlgorithm, 1, 0, \"HTML Rewriter Transform\");\n  if (!transformFun)\n    return false;\n  transformAlgo.init(cx, JS_GetFunctionObject(transformFun));\n\n  JSFunction *flushFun = JS_NewFunction(cx, flushAlgorithm, 1, 0, \"HTML Rewriter Flush\");\n  if (!flushFun)\n    return false;\n  flushAlgo.init(cx, JS_GetFunctionObject(flushFun));\n\n  return true;\n}\n\nbool install(api::Engine *engine) {\n  if (!HTMLRewritingStream::init_class(engine->cx(), engine->global())) {\n    return false;\n  }\n\n  if (!Element::init_class(engine->cx(), engine->global())) {\n    return false;\n  }\n\n  RootedObject html_rewriter_obj(\n      engine->cx(),\n      JS_GetConstructor(engine->cx(), builtins::BuiltinImpl<HTMLRewritingStream>::proto_obj));\n  RootedValue html_rewriter_val(engine->cx(), ObjectValue(*html_rewriter_obj));\n  RootedObject html_rewriter_ns(engine->cx(), JS_NewObject(engine->cx(), nullptr));\n  if (!JS_SetProperty(engine->cx(), html_rewriter_ns, \"HTMLRewritingStream\", html_rewriter_val)) {\n    return false;\n  }\n  RootedValue html_rewriter_ns_val(engine->cx(), JS::ObjectValue(*html_rewriter_ns));\n  if (!engine->define_builtin_module(\"fastly:html-rewriter\", html_rewriter_ns_val)) {\n    return false;\n  }\n\n  return true;\n}\n} // namespace fastly::html_rewriter"
  },
  {
    "path": "runtime/fastly/builtins/html-rewriter.h",
    "content": "// An HTML rewriter implementation based on TransformStreams.\n\n#ifndef FASTLY_HTML_REWRITER_H\n#define FASTLY_HTML_REWRITER_H\n\n#include \"../host-api/host_api_fastly.h\"\n#include \"builtin.h\"\n#include \"extension-api.h\"\n\nnamespace fastly::html_rewriter {\nclass Element : public builtins::BuiltinNoConstructor<Element> {\nprivate:\n  static bool selector_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool tag_get(JSContext *cx, unsigned argc, JS::Value *vp);\n\npublic:\n  static constexpr const char *class_name = \"Element\";\n  static const int ctor_length = 0;\n  enum Slots { Raw, Selector, Count };\n  static const JSFunctionSpec static_methods[];\n  static const JSPropertySpec static_properties[];\n  static const JSFunctionSpec methods[];\n  static const JSPropertySpec properties[];\n\n  static bool before(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool prepend(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool append(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool after(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool getAttribute(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool setAttribute(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool removeAttribute(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool replaceChildren(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool replaceWith(JSContext *cx, unsigned argc, JS::Value *vp);\n};\n\nclass HTMLRewritingStream : public builtins::TraceableBuiltinImpl<HTMLRewritingStream> {\nprivate:\n  static bool transformAlgorithm(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool flushAlgorithm(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool readable_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool writable_get(JSContext *cx, unsigned argc, JS::Value *vp);\n\npublic:\n  static constexpr const char *class_name = \"HTMLRewritingStream\";\n  static const int ctor_length = 0;\n  enum Slots { RawBuilder, RawRewriter, Buffer, OutputContext, ElementHandlers, Transform, Count };\n  static const JSFunctionSpec static_methods[];\n  static const JSPropertySpec static_properties[];\n  static const JSFunctionSpec methods[];\n  static const JSPropertySpec properties[];\n\n  static bool init_class(JSContext *cx, JS::HandleObject global);\n  static bool constructor(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  static bool onElement(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  static bool finish_building(JSContext *cx, JS::HandleObject stream);\n  static void finalize(JS::GCContext *gcx, JSObject *self);\n  static void trace(JSTracer *trc, JSObject *self);\n};\n} // namespace fastly::html_rewriter\n\n#endif"
  },
  {
    "path": "runtime/fastly/builtins/image-optimizer-options.inc",
    "content": "// Defines X-Macros (https://en.wikipedia.org/wiki/X_macro) for enumerator image optimizer options\n\n#if !defined(FASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION) &&                                              \\\n    !defined(FASTLY_BEGIN_IMAGE_OPTIMIZER_OPTION_TYPE) &&                                          \\\n    !defined(FASTLY_END_IMAGE_OPTIMIZER_OPTION_TYPE)\n#error \"Must define at least one of the FASTLY_DEFINE_IMAGE_OPTIMIZER_*** macros\"\n#endif\n\n#ifndef FASTLY_BEGIN_IMAGE_OPTIMIZER_OPTION_TYPE\n#define FASTLY_BEGIN_IMAGE_OPTIMIZER_OPTION_TYPE(type, lowercase, str)\n#endif\n#ifndef FASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION\n#define FASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(name, str)\n#endif\n#ifndef FASTLY_END_IMAGE_OPTIMIZER_OPTION_TYPE\n#define FASTLY_END_IMAGE_OPTIMIZER_OPTION_TYPE(type)\n#endif\n\nFASTLY_BEGIN_IMAGE_OPTIMIZER_OPTION_TYPE(Region, region, \"region\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(UsEast, \"us_east\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(UsCentral, \"us_central\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(UsWest, \"us_west\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(EuCentral, \"eu_central\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(EuWest, \"eu_west\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(Asia, \"asia\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(Australia, \"australia\")\nFASTLY_END_IMAGE_OPTIMIZER_OPTION_TYPE(Region)\n\nFASTLY_BEGIN_IMAGE_OPTIMIZER_OPTION_TYPE(Auto, auto, \"auto\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(AVIF, \"avif\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(WEBP, \"webp\")\nFASTLY_END_IMAGE_OPTIMIZER_OPTION_TYPE(Auto)\n\nFASTLY_BEGIN_IMAGE_OPTIMIZER_OPTION_TYPE(Format, format, \"format\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(Auto, \"auto\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(AVIF, \"avif\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(BJPG, \"bjpg\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(GIF, \"gif\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(JPG, \"jpg\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(JXL, \"jxl\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(MP4, \"mp4\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(PJPG, \"pjpg\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(PJXL, \"pjxl\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(PNG, \"png\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(PNG8, \"png8\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(SVG, \"svg\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(WEBP, \"webp\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(WEBPLL, \"webpll\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(WEBPLY, \"webply\")\nFASTLY_END_IMAGE_OPTIMIZER_OPTION_TYPE(Format)\n\nFASTLY_BEGIN_IMAGE_OPTIMIZER_OPTION_TYPE(BWAlgorithm, bw, \"bw\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(Threshold, \"threshold\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(Atkinson, \"atkinson\")\nFASTLY_END_IMAGE_OPTIMIZER_OPTION_TYPE(BWAlgorithm)\n\nFASTLY_BEGIN_IMAGE_OPTIMIZER_OPTION_TYPE(Disable, disable, \"disable\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(Upscale, \"upscale\")\nFASTLY_END_IMAGE_OPTIMIZER_OPTION_TYPE(Disable)\n\nFASTLY_BEGIN_IMAGE_OPTIMIZER_OPTION_TYPE(Enable, enable, \"enable\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(Upscale, \"upscale\")\nFASTLY_END_IMAGE_OPTIMIZER_OPTION_TYPE(Enable)\n\nFASTLY_BEGIN_IMAGE_OPTIMIZER_OPTION_TYPE(Fit, fit, \"fit\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(Bounds, \"bounds\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(Cover, \"cover\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(Crop, \"crop\")\nFASTLY_END_IMAGE_OPTIMIZER_OPTION_TYPE(Fit)\n\nFASTLY_BEGIN_IMAGE_OPTIMIZER_OPTION_TYPE(Metadata, metadata, \"metadata\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(Copyright, \"copyright\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(C2PA, \"c2pa\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(CopyrightAndC2PA, \"copyright,c2pa\")\nFASTLY_END_IMAGE_OPTIMIZER_OPTION_TYPE(Metadata)\n\nFASTLY_BEGIN_IMAGE_OPTIMIZER_OPTION_TYPE(Optimize, optimize, \"optimize\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(Low, \"low\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(Medium, \"medium\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(High, \"high\")\nFASTLY_END_IMAGE_OPTIMIZER_OPTION_TYPE(Optimize)\n\nFASTLY_BEGIN_IMAGE_OPTIMIZER_OPTION_TYPE(Orient, orient, \"orient\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(Default, \"1\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(FlipHorizontal, \"2\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(FlipHorizontalAndVertical, \"3\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(FlipVertical, \"4\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(FlipHorizontalOrientLeft, \"5\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(OrientRight, \"6\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(FlipHorizontalOrientRight, \"7\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(OrientLeft, \"8\")\nFASTLY_END_IMAGE_OPTIMIZER_OPTION_TYPE(Orient)\n\nFASTLY_BEGIN_IMAGE_OPTIMIZER_OPTION_TYPE(Profile, profile, \"profile\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(Baseline, \"baseline\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(Main, \"main\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(High, \"high\")\nFASTLY_END_IMAGE_OPTIMIZER_OPTION_TYPE(Profile)\n\nFASTLY_BEGIN_IMAGE_OPTIMIZER_OPTION_TYPE(ResizeFilter, resize_filter, \"resize-filter\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(Nearest, \"nearest\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(Bilinear, \"bilinear\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(Linear, \"linear\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(Bicubic, \"bicubic\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(Cubic, \"cubic\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(Lanczos2, \"lanczos2\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(Lanczos3, \"lanczos3\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(Lanczos, \"lanczos\")\nFASTLY_END_IMAGE_OPTIMIZER_OPTION_TYPE(ResizeFilter)\n\n// CropMode is not a \"true\" option, but we reuse some of this machinery to easily define the\n// constants\nFASTLY_BEGIN_IMAGE_OPTIMIZER_OPTION_TYPE(CropMode, crop_mode, \"N/A\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(Smart, \"smart\")\nFASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(Safe, \"safe\")\nFASTLY_END_IMAGE_OPTIMIZER_OPTION_TYPE(Optimize)\n\n#undef FASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION\n#undef FASTLY_BEGIN_IMAGE_OPTIMIZER_OPTION_TYPE\n#undef FASTLY_END_IMAGE_OPTIMIZER_OPTION_TYPE"
  },
  {
    "path": "runtime/fastly/builtins/image-optimizer.cpp",
    "content": "#include \"image-optimizer.h\"\n#include \"fastly.h\"\n\nnamespace {\nstd::optional<double> from_percentage(std::string_view sv) {\n  if (!sv.ends_with('%')) {\n    return std::nullopt;\n  }\n  char *end;\n  auto percentage = std::strtod(sv.data(), &end);\n  if (end != sv.data() + sv.size() - 1 || percentage == HUGE_VAL) {\n    return std::nullopt;\n  }\n  return percentage;\n}\n\nstd::optional<double> to_number_between_inclusive(JS::HandleValue val, double from, double to) {\n  if (!val.isNumber()) {\n    return std::nullopt;\n  }\n  auto num = val.toNumber();\n  if (num < from || num > to) {\n    return std::nullopt;\n  }\n  return num;\n}\n\nbool exactly_one_defined(JS::HandleValue a, JS::HandleValue b) {\n  return (!a.isUndefined() || !b.isUndefined()) && (a.isUndefined() != b.isUndefined());\n}\n} // namespace\n\nnamespace fastly::image_optimizer {\nconst JSFunctionSpec EnumOption::static_methods[] = {\n    JS_FS_END,\n};\nconst JSFunctionSpec EnumOption::methods[] = {\n    JS_FS_END,\n};\n\nconst JSPropertySpec EnumOption::properties[] = {\n    JS_PS_END,\n};\n\n#define FASTLY_BEGIN_IMAGE_OPTIMIZER_OPTION_TYPE(type, lowercase, str)                             \\\n  const JSPropertySpec type::static_properties[] = {\n#define FASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(name, str) JS_STRING_PS(#name, str, JSPROP_READONLY),\n#define FASTLY_END_IMAGE_OPTIMIZER_OPTION_TYPE(type)                                               \\\n  JS_PS_END,                                                                                       \\\n  }                                                                                                \\\n  ;\n#include \"image-optimizer-options.inc\"\n\nbool install(api::Engine *engine) {\n  RootedObject image_optimizer_ns(engine->cx(), JS_NewObject(engine->cx(), nullptr));\n\n#define FASTLY_BEGIN_IMAGE_OPTIMIZER_OPTION_TYPE(type, lowercase, str)                             \\\n  if (!type::init_class_impl(engine->cx(), image_optimizer_ns)) {                                  \\\n    return false;                                                                                  \\\n  }                                                                                                \\\n  RootedObject lowercase##_obj(                                                                    \\\n      engine->cx(),                                                                                \\\n      JS_GetConstructor(                                                                           \\\n          engine->cx(),                                                                            \\\n          builtins::BuiltinNoConstructor<::fastly::image_optimizer::type>::proto_obj));            \\\n  RootedValue lowercase##_val(engine->cx(), ObjectValue(*lowercase##_obj));                        \\\n  if (!JS_SetProperty(engine->cx(), image_optimizer_ns, #type, lowercase##_val)) {                 \\\n    return false;                                                                                  \\\n  }\n#define FASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(name, str)\n#define FASTLY_END_IMAGE_OPTIMIZER_OPTION_TYPE(type)\n#include \"image-optimizer-options.inc\"\n\n  auto options_to_query_string_fn = JS_NewFunction(\n      engine->cx(), &ImageOptimizerOptions::optionsToQueryString, 1, 0, \"optionsToQueryString\");\n  RootedObject options_to_query_string_obj(engine->cx(),\n                                           JS_GetFunctionObject(options_to_query_string_fn));\n  RootedValue options_to_query_string_val(engine->cx(),\n                                          JS::ObjectValue(*options_to_query_string_obj));\n  if (!JS_SetProperty(engine->cx(), image_optimizer_ns, \"optionsToQueryString\",\n                      options_to_query_string_val)) {\n    return false;\n  }\n\n  RootedValue image_optimizer_ns_val(engine->cx(), JS::ObjectValue(*image_optimizer_ns));\n  if (!engine->define_builtin_module(\"fastly:image-optimizer\", image_optimizer_ns_val)) {\n    return false;\n  }\n\n  RootedObject fastly(engine->cx());\n  if (!fastly::get_fastly_object(engine, &fastly)) {\n    return false;\n  }\n  if (!JS_SetProperty(engine->cx(), fastly, \"imageOptimizer\", image_optimizer_ns_val)) {\n    return false;\n  }\n  return true;\n} // namespace fastly::image_optimizer\n\nstd::unique_ptr<ImageOptimizerOptions> ImageOptimizerOptions::create(JSContext *cx,\n                                                                     JS::HandleValue opts_val) {\n  // Extract properties.\n#define FASTLY_BEGIN_IMAGE_OPTIMIZER_OPTION_TYPE(type, lowercase, str)                             \\\n  JS::RootedValue lowercase##_val(cx);\n#include \"image-optimizer-options.inc\"\n  JS::RootedValue preserve_query_string_on_origin_request_val(cx);\n  JS::RootedValue bg_color_val(cx);\n  JS::RootedValue blur_val(cx);\n  JS::RootedValue brightness_val(cx);\n  JS::RootedValue canvas_val(cx);\n  JS::RootedValue contrast_val(cx);\n  JS::RootedValue crop_val(cx);\n  JS::RootedValue dpr_val(cx);\n  JS::RootedValue frame_val(cx);\n  JS::RootedValue height_val(cx);\n  JS::RootedValue level_val(cx);\n  JS::RootedValue pad_val(cx);\n  JS::RootedValue precrop_val(cx);\n  JS::RootedValue quality_val(cx);\n  JS::RootedValue saturation_val(cx);\n  JS::RootedValue sharpen_val(cx);\n  JS::RootedValue trim_val(cx);\n  JS::RootedValue trim_color_val(cx);\n  JS::RootedValue viewbox_val(cx);\n  JS::RootedValue width_val(cx);\n  JS::RootedObject opts(cx, opts_val.toObjectOrNull());\n  if (!JS_GetProperty(cx, opts, \"region\", &region_val) ||\n      !JS_GetProperty(cx, opts, \"preserve_query_string_on_origin_request\",\n                      &preserve_query_string_on_origin_request_val) ||\n      !JS_GetProperty(cx, opts, \"auto\", &auto_val) ||\n      !JS_GetProperty(cx, opts, \"bgColor\", &bg_color_val) ||\n      !JS_GetProperty(cx, opts, \"blur\", &blur_val) ||\n      !JS_GetProperty(cx, opts, \"brightness\", &brightness_val) ||\n      !JS_GetProperty(cx, opts, \"bw\", &bw_val) ||\n      !JS_GetProperty(cx, opts, \"canvas\", &canvas_val) ||\n      !JS_GetProperty(cx, opts, \"contrast\", &contrast_val) ||\n      !JS_GetProperty(cx, opts, \"crop\", &crop_val) ||\n      !JS_GetProperty(cx, opts, \"disable\", &disable_val) ||\n      !JS_GetProperty(cx, opts, \"dpr\", &dpr_val) ||\n      !JS_GetProperty(cx, opts, \"enable\", &enable_val) ||\n      !JS_GetProperty(cx, opts, \"fit\", &fit_val) ||\n      !JS_GetProperty(cx, opts, \"format\", &format_val) ||\n      !JS_GetProperty(cx, opts, \"frame\", &frame_val) ||\n      !JS_GetProperty(cx, opts, \"height\", &height_val) ||\n      !JS_GetProperty(cx, opts, \"level\", &level_val) ||\n      !JS_GetProperty(cx, opts, \"metadata\", &metadata_val) ||\n      !JS_GetProperty(cx, opts, \"optimize\", &optimize_val) ||\n      !JS_GetProperty(cx, opts, \"orient\", &orient_val) ||\n      !JS_GetProperty(cx, opts, \"pad\", &pad_val) ||\n      !JS_GetProperty(cx, opts, \"precrop\", &precrop_val) ||\n      !JS_GetProperty(cx, opts, \"profile\", &profile_val) ||\n      !JS_GetProperty(cx, opts, \"quality\", &quality_val) ||\n      !JS_GetProperty(cx, opts, \"resizeFilter\", &resize_filter_val) ||\n      !JS_GetProperty(cx, opts, \"saturation\", &saturation_val) ||\n      !JS_GetProperty(cx, opts, \"sharpen\", &sharpen_val) ||\n      !JS_GetProperty(cx, opts, \"trim\", &trim_val) ||\n      !JS_GetProperty(cx, opts, \"trimColor\", &trim_color_val) ||\n      !JS_GetProperty(cx, opts, \"viewbox\", &viewbox_val) ||\n      !JS_GetProperty(cx, opts, \"width\", &width_val)) {\n    return nullptr;\n  }\n\n  if (region_val.isUndefined()) {\n    api::throw_error(cx, api::Errors::TypeError, \"Request\", \"imageOptimizerOptions\",\n                     \"contain region\");\n    return nullptr;\n  }\n\n#define TRY_CONVERT(name)                                                                          \\\n  decltype(to_##name(cx, name##_val)) name##_opt;                                                  \\\n  if (!name##_val.isUndefined()) {                                                                 \\\n    name##_opt = to_##name(cx, name##_val);                                                        \\\n    if (!name##_opt) {                                                                             \\\n      return nullptr;                                                                              \\\n    }                                                                                              \\\n  }\n\n#define FASTLY_BEGIN_IMAGE_OPTIMIZER_OPTION_TYPE(type, lowercase, str) TRY_CONVERT(lowercase);\n#include \"image-optimizer-options.inc\"\n\n  TRY_CONVERT(bg_color);\n  TRY_CONVERT(blur);\n  TRY_CONVERT(brightness);\n  TRY_CONVERT(canvas);\n  TRY_CONVERT(contrast);\n  TRY_CONVERT(crop);\n  TRY_CONVERT(dpr);\n  TRY_CONVERT(frame);\n  TRY_CONVERT(height);\n  TRY_CONVERT(level);\n  TRY_CONVERT(pad);\n  TRY_CONVERT(precrop);\n  TRY_CONVERT(quality);\n  TRY_CONVERT(saturation);\n  TRY_CONVERT(sharpen);\n  TRY_CONVERT(trim);\n  TRY_CONVERT(trim_color);\n  TRY_CONVERT(viewbox);\n  TRY_CONVERT(width);\n\n  return std::unique_ptr<ImageOptimizerOptions>{new ImageOptimizerOptions(\n      *region_opt, auto_opt, std::move(bg_color_opt), blur_opt, brightness_opt, bw_opt, canvas_opt,\n      contrast_opt, crop_opt, disable_opt, dpr_opt, enable_opt, fit_opt, format_opt, frame_opt,\n      height_opt, std::move(level_opt), metadata_opt, optimize_opt, orient_opt, pad_opt,\n      precrop_opt, profile_opt, quality_opt, resize_filter_opt, saturation_opt, sharpen_opt,\n      trim_opt, std::move(trim_color_opt), viewbox_opt, width_opt)};\n}\n\nbool ImageOptimizerOptions::optionsToQueryString(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = CallArgsFromVp(argc, vp);\n  if (!args.requireAtLeast(cx, \"optionsToQueryString\", 1)) {\n    return false;\n  }\n  auto options = create(cx, args.get(0));\n  if (!options) {\n    return false;\n  }\n  auto query = options->to_string();\n  args.rval().setString(JS_NewStringCopyZ(cx, query.data()));\n  return true;\n}\n\nstd::string ImageOptimizerOptions::to_string() const {\n  using image_optimizer::to_string;\n  std::string ret = to_string(region_);\n  auto append = [&ret](auto &&v) {\n    if (v)\n      ret += \"&\" + to_string(*v);\n  };\n  append(auto_);\n  append(bg_color_);\n  append(blur_);\n  append(brightness_);\n  append(bw_);\n  append(canvas_);\n  append(crop_);\n  append(contrast_);\n  append(disable_);\n  append(dpr_);\n  append(enable_);\n  append(fit_);\n  append(format_);\n  append(frame_);\n  append(height_);\n  append(level_);\n  append(metadata_);\n  append(optimize_);\n  append(orient_);\n  append(pad_);\n  append(precrop_);\n  append(profile_);\n  append(quality_);\n  append(resizeFilter_);\n  append(saturation_);\n  append(sharpen_);\n  append(trim_);\n  append(trim_color_);\n  append(viewbox_);\n  append(width_);\n  return ret;\n}\n\nfastly_image_optimizer_transform_config ImageOptimizerOptions::to_config() {\n  fastly_image_optimizer_transform_config config;\n  auto str = this->to_string();\n  host_api::HostString host_str(str);\n  config.sdk_claims_opts = host_str.ptr.release();\n  config.sdk_claims_opts_len = host_str.len;\n  return config;\n}\n\nstd::optional<ImageOptimizerOptions::Size> ImageOptimizerOptions::to_size(JSContext *cx,\n                                                                          JS::HandleValue val) {\n  auto throw_error = [&](const char *object, const char *message) {\n    api::throw_error(cx, api::Errors::TypeError, \"imageOptimizerOptions\", object, message);\n    return std::nullopt;\n  };\n\n  if (val.isUndefined() || !val.isObject()) {\n    return throw_error(\"size\", \"be an object\");\n  }\n\n  JS::RootedValue absolute_val(cx);\n  JS::RootedValue ratio_val(cx);\n  JS::RootedObject size_obj(cx, &val.toObject());\n  if (!JS_GetProperty(cx, size_obj, \"absolute\", &absolute_val) ||\n      !JS_GetProperty(cx, size_obj, \"ratio\", &ratio_val)) {\n    return std::nullopt;\n  }\n  if (!exactly_one_defined(absolute_val, ratio_val)) {\n    return throw_error(\"size\", \"have exactly one of the keys absolute or ratio\");\n  }\n\n  JS::RootedValue width_val(cx);\n  JS::RootedValue height_val(cx);\n  if (!absolute_val.isUndefined()) {\n    if (!absolute_val.isObject()) {\n      return throw_error(\"size.absolute\", \"be an object\");\n    }\n    JS::RootedObject absolute_obj(cx, &absolute_val.toObject());\n    if (!JS_GetProperty(cx, absolute_obj, \"width\", &width_val) ||\n        !JS_GetProperty(cx, absolute_obj, \"height\", &height_val)) {\n      return std::nullopt;\n    }\n    auto width = to_pixels_or_percentage(cx, width_val);\n    auto height = to_pixels_or_percentage(cx, height_val);\n    if (!width || !height) {\n      return throw_error(\n          \"size.absolute\",\n          \"have width and height values who are absolute pixel integers or percentage strings\");\n    }\n    return Size{Size::Absolute{*width, *height}};\n  } else {\n    if (!ratio_val.isObject()) {\n      return throw_error(\"size.ratio\", \"be an object\");\n    }\n    JS::RootedObject ratio_obj(cx, &ratio_val.toObject());\n    if (!JS_GetProperty(cx, ratio_obj, \"width\", &width_val) ||\n        !JS_GetProperty(cx, ratio_obj, \"height\", &height_val)) {\n      return std::nullopt;\n    }\n    if (!width_val.isNumber() || !height_val.isNumber()) {\n      return throw_error(\"size.ratio\", \"have width and height number values\");\n    }\n    return Size{Size::Ratio{width_val.toNumber(), height_val.toNumber()}};\n  }\n}\n\nstd::optional<ImageOptimizerOptions::Position>\nImageOptimizerOptions::to_position(JSContext *cx, JS::HandleValue val) {\n  auto throw_error = [&](const char *object, const char *message) {\n    api::throw_error(cx, api::Errors::TypeError, \"imageOptimizerOptions\", object, message);\n    return std::nullopt;\n  };\n  JS::RootedValue x_val(cx);\n  JS::RootedValue y_val(cx);\n  JS::RootedValue offset_x_val(cx);\n  JS::RootedValue offset_y_val(cx);\n\n  JS::RootedObject position_obj(cx, &val.toObject());\n  if (!JS_GetProperty(cx, position_obj, \"x\", &x_val) ||\n      !JS_GetProperty(cx, position_obj, \"y\", &y_val) ||\n      !JS_GetProperty(cx, position_obj, \"offsetX\", &offset_x_val) ||\n      !JS_GetProperty(cx, position_obj, \"offsetY\", &offset_y_val)) {\n    return std::nullopt;\n  }\n  if (!exactly_one_defined(x_val, offset_x_val) || !exactly_one_defined(y_val, offset_y_val)) {\n    return throw_error(\"position\", \"have exactly one of x/offsetX and exactly one of y/offsetY\");\n  }\n\n  auto absolute_or_offset =\n      [&](JS::HandleValue absolute,\n          JS::HandleValue offset) -> std::optional<std::variant<PixelsOrPercentage, double>> {\n    if (!absolute.isUndefined()) {\n      return to_pixels_or_percentage(cx, absolute);\n    }\n    if (offset.isNumber()) {\n      return offset.toNumber();\n    }\n    return std::nullopt;\n  };\n  auto x = absolute_or_offset(x_val, offset_x_val);\n  auto y = absolute_or_offset(y_val, offset_y_val);\n  if (!x || !y) {\n    return throw_error(\"position\", \"have valid x and y components\");\n  }\n\n  return ImageOptimizerOptions::Position{*x, *y};\n}\n\nstd::optional<ImageOptimizerOptions::Canvas> ImageOptimizerOptions::to_canvas(JSContext *cx,\n                                                                              JS::HandleValue val) {\n  auto throw_error = [&](const char *object, const char *message) {\n    api::throw_error(cx, api::Errors::TypeError, \"imageOptimizerOptions\", object, message);\n    return std::nullopt;\n  };\n  if (!val.isObject()) {\n    return throw_error(\"canvas\", \"be an object\");\n  }\n  JS::RootedValue size_val(cx);\n  JS::RootedValue position_val(cx);\n  JS::RootedObject canvas_obj(cx, &val.toObject());\n  if (!JS_GetProperty(cx, canvas_obj, \"size\", &size_val) ||\n      !JS_GetProperty(cx, canvas_obj, \"position\", &position_val)) {\n    return std::nullopt;\n  }\n  auto size = to_size(cx, size_val);\n  if (!size) {\n    return std::nullopt;\n  }\n\n  if (position_val.isUndefined()) {\n    return ImageOptimizerOptions::Canvas{*size, std::nullopt};\n  }\n  auto position = to_position(cx, position_val);\n  if (!position) {\n    return std::nullopt;\n  }\n  return ImageOptimizerOptions::Canvas{*size, *position};\n}\n\nstd::optional<ImageOptimizerOptions::CropSpec>\nImageOptimizerOptions::to_crop_spec(JSContext *cx, JS::HandleValue val) {\n  auto throw_error = [&](const char *object, const char *message) {\n    api::throw_error(cx, api::Errors::TypeError, \"imageOptimizerOptions\", object, message);\n    return std::nullopt;\n  };\n  if (!val.isObject()) {\n    return throw_error(\"crop\", \"be an object\");\n  }\n  JS::RootedValue size_val(cx);\n  JS::RootedValue position_val(cx);\n  JS::RootedValue mode_val(cx);\n  JS::RootedObject crop_obj(cx, &val.toObject());\n  if (!JS_GetProperty(cx, crop_obj, \"size\", &size_val) ||\n      !JS_GetProperty(cx, crop_obj, \"position\", &position_val) ||\n      !JS_GetProperty(cx, crop_obj, \"mode\", &mode_val)) {\n    return std::nullopt;\n  }\n  auto size = to_size(cx, size_val);\n  if (!size) {\n    return std::nullopt;\n  }\n\n  std::optional<Position> position = std::nullopt;\n  if (!position_val.isUndefined()) {\n    position = to_position(cx, position_val);\n    if (!position) {\n      return std::nullopt;\n    }\n  }\n\n  std::optional<CropMode> mode = std::nullopt;\n  if (!mode_val.isUndefined()) {\n    mode = to_crop_mode(cx, mode_val);\n    if (!mode) {\n      return std::nullopt;\n    }\n  }\n  return ImageOptimizerOptions::CropSpec{*size, position, mode};\n}\n\nstd::optional<ImageOptimizerOptions::Brightness>\nImageOptimizerOptions::to_brightness(JSContext *cx, JS::HandleValue val) {\n  auto num = to_number_between_inclusive(val, -100, 100);\n  if (!num) {\n    api::throw_error(cx, api::Errors::TypeError, \"imageOptimizerOptions\", \"brightness\",\n                     \"must be a number between -100 and 100\");\n    return std::nullopt;\n  }\n  return Brightness{*num};\n}\nstd::optional<ImageOptimizerOptions::Contrast>\nImageOptimizerOptions::to_contrast(JSContext *cx, JS::HandleValue val) {\n  auto num = to_number_between_inclusive(val, -100, 100);\n  if (!num) {\n    api::throw_error(cx, api::Errors::TypeError, \"imageOptimizerOptions\", \"contrast\",\n                     \"must be a number between -100 and 100\");\n    return std::nullopt;\n  }\n  return Contrast{*num};\n}\nstd::optional<ImageOptimizerOptions::Quality>\nImageOptimizerOptions::to_quality(JSContext *cx, JS::HandleValue val) {\n  if (!val.isInt32() || val.toInt32() < 0 || val.toInt32() > 100) {\n    api::throw_error(cx, api::Errors::TypeError, \"imageOptimizerOptions\", \"quality\",\n                     \"must be n integer between 0 and 100\");\n    return std::nullopt;\n  }\n  return Quality(val.toInt32());\n}\nstd::optional<ImageOptimizerOptions::Saturation>\nImageOptimizerOptions::to_saturation(JSContext *cx, JS::HandleValue val) {\n  auto num = to_number_between_inclusive(val, -100, 100);\n  if (!num) {\n    api::throw_error(cx, api::Errors::TypeError, \"imageOptimizerOptions\", \"saturation\",\n                     \"must be a number between -100 and 100\");\n    return std::nullopt;\n  }\n  return Saturation{*num};\n}\nstd::optional<ImageOptimizerOptions::Dpr> ImageOptimizerOptions::to_dpr(JSContext *cx,\n                                                                        JS::HandleValue val) {\n  auto num = to_number_between_inclusive(val, 1, 10);\n  if (!num) {\n    api::throw_error(cx, api::Errors::TypeError, \"imageOptimizerOptions\", \"dpr\",\n                     \"must be a number between 1 and 10\");\n    return std::nullopt;\n  }\n  return Dpr{*num};\n}\nstd::optional<ImageOptimizerOptions::Level> ImageOptimizerOptions::to_level(JSContext *cx,\n                                                                            JS::HandleValue val) {\n  auto throw_error = [&]() {\n    api::throw_error(\n        cx, api::Errors::TypeError, \"imageOptimizerOptions\", \"level\",\n        \"must be a string containing 1.0, 1.1, 1.2, 1.3, 2.0, 2.1, 2.2, 3.0, 3.1, 3.2, \"\n        \"4.0, 4.1, 4.2, 5.0, 5.1, 5.2, 6.0, 6.1, or 6.2\");\n  };\n  if (!val.isString()) {\n    throw_error();\n    return std::nullopt;\n  }\n  JS::RootedString js_str(cx, val.toString());\n  auto str = core::encode(cx, js_str);\n  std::string_view sv = str;\n  if (sv != \"1.0\" && sv != \"1.1\" && sv != \"1.2\" && sv != \"1.3\" && sv != \"2.0\" && sv != \"2.1\" &&\n      sv != \"2.2\" && sv != \"3.0\" && sv != \"3.1\" && sv != \"3.2\" && sv != \"4.0\" && sv != \"4.1\" &&\n      sv != \"4.2\" && sv != \"5.0\" && sv != \"5.1\" && sv != \"5.2\" && sv != \"6.0\" && sv != \"6.1\" &&\n      sv != \"6.2\") {\n    throw_error();\n    return std::nullopt;\n  }\n  return Level{std::move(str)};\n}\nstd::optional<ImageOptimizerOptions::Frame> ImageOptimizerOptions::to_frame(JSContext *cx,\n                                                                            JS::HandleValue val) {\n  if (!val.isInt32() || val.toInt32() != 1) {\n    api::throw_error(cx, api::Errors::TypeError, \"imageOptimizerOptions\", \"frame\", \"must be 1\");\n    return std::nullopt;\n  }\n  return Frame{1};\n}\nstd::optional<ImageOptimizerOptions::Viewbox>\nImageOptimizerOptions::to_viewbox(JSContext *cx, JS::HandleValue val) {\n  if (!val.isInt32() || val.toInt32() != 1) {\n    api::throw_error(cx, api::Errors::TypeError, \"imageOptimizerOptions\", \"viewbox\", \"must be 1\");\n    return std::nullopt;\n  }\n  return Viewbox{1};\n}\nstd::optional<ImageOptimizerOptions::Blur> ImageOptimizerOptions::to_blur(JSContext *cx,\n                                                                          JS::HandleValue val) {\n  auto throw_error = [&]() {\n    api::throw_error(cx, api::Errors::TypeError, \"imageOptimizerOptions\", \"blur\",\n                     \"must be a number between 0.5 and 1000 or a string percentage value\");\n  };\n  if (val.isNumber()) {\n    auto num = to_number_between_inclusive(val, 0.5, 1000);\n    if (!num) {\n      throw_error();\n      return std::nullopt;\n    }\n    return Blur{.value = *num, .is_percentage = false};\n  }\n  if (!val.isString()) {\n    throw_error();\n    return std::nullopt;\n  }\n  JS::RootedString js_str(cx, val.toString());\n  auto str = core::encode(cx, js_str);\n  auto percentage = from_percentage(str);\n  if (!percentage) {\n    throw_error();\n    return std::nullopt;\n  }\n  return Blur{.value = *percentage, .is_percentage = true};\n}\nstd::optional<ImageOptimizerOptions::Sharpen>\nImageOptimizerOptions::to_sharpen(JSContext *cx, JS::HandleValue val) {\n  auto throw_error = [&]() {\n    api::throw_error(cx, api::Errors::TypeError, \"imageOptimizerOptions\", \"sharpen\",\n                     \"must be an object with keys `amount` (0.0-10.0), `radius` (0.5-1000.0), and \"\n                     \"`threshold` (0-255)\");\n  };\n  if (!val.isObject()) {\n    throw_error();\n    return std::nullopt;\n  }\n  JS::RootedValue amount_val(cx);\n  JS::RootedValue radius_val(cx);\n  JS::RootedValue threshold_val(cx);\n  JS::RootedObject opts(cx, &val.toObject());\n  if (!JS_GetProperty(cx, opts, \"amount\", &amount_val) ||\n      !JS_GetProperty(cx, opts, \"radius\", &radius_val) ||\n      !JS_GetProperty(cx, opts, \"threshold\", &threshold_val)) {\n    return std::nullopt;\n  }\n  auto amount = to_number_between_inclusive(amount_val, 0, 10);\n  auto radius = to_number_between_inclusive(radius_val, 0.5, 1000);\n  if (!amount || !radius || !threshold_val.isInt32() || threshold_val.toInt32() < 0 ||\n      threshold_val.toInt32() > 255) {\n    throw_error();\n    return std::nullopt;\n  }\n  return Sharpen{*amount, *radius, threshold_val.toInt32()};\n}\nstd::optional<ImageOptimizerOptions::PixelsOrPercentage>\nImageOptimizerOptions::to_pixels_or_percentage(JSContext *cx, JS::HandleValue val) {\n  if (val.isInt32()) {\n    return PixelsOrPercentage{.pixels = val.toInt32(), .is_percentage = false};\n  }\n  if (!val.isString()) {\n    return std::nullopt;\n  }\n  JS::RootedString js_str(cx, val.toString());\n  auto str = core::encode(cx, js_str);\n  auto percentage = from_percentage(str);\n  if (!percentage) {\n    return std::nullopt;\n  }\n  return PixelsOrPercentage{.percentage = *percentage, .is_percentage = true};\n}\n\nstd::optional<ImageOptimizerOptions::Color> ImageOptimizerOptions::to_color(JSContext *cx,\n                                                                            JS::HandleValue val) {\n  // Hex strings of size 3 or 6 are allowed\n  if (val.isString()) {\n    JS::RootedString str_val(cx, val.toString());\n    auto str = core::encode(cx, str_val);\n    if ((str.len == 3 || str.len == 6) &&\n        (std::all_of(str.begin(), str.end(), [](char c) { return std::isxdigit(c); }))) {\n      return Color{std::move(str)};\n    }\n  }\n  // Otherwise, it should be an rgb(a) object\n  if (!val.isObject()) {\n    return std::nullopt;\n  }\n\n  JS::RootedValue r(cx);\n  JS::RootedValue g(cx);\n  JS::RootedValue b(cx);\n  JS::RootedValue a(cx);\n  JS::RootedObject obj(cx, &val.toObject());\n  if (!JS_GetProperty(cx, obj, \"r\", &r) || !JS_GetProperty(cx, obj, \"g\", &g) ||\n      !JS_GetProperty(cx, obj, \"b\", &b) || !JS_GetProperty(cx, obj, \"a\", &a)) {\n    return std::nullopt;\n  }\n\n  auto is_valid_color_component = [](const auto &c) {\n    return c.isInt32() && c.toInt32() >= 0 && c.toInt32() < 256;\n  };\n  auto alpha_valid =\n      a.isUndefined() || (a.isNumber() && a.toNumber() >= 0.0 && a.toNumber() <= 1.0);\n  if (!is_valid_color_component(r) || !is_valid_color_component(g) ||\n      !is_valid_color_component(b) || !alpha_valid) {\n    return std::nullopt;\n  }\n\n  std::string rep;\n  rep += std::to_string(r.toInt32()) + ',' + std::to_string(g.toInt32()) + ',' +\n         std::to_string(b.toInt32());\n  if (!a.isUndefined()) {\n    rep += ',' + std::to_string(a.toNumber());\n  }\n  return Color{host_api::HostString(rep)};\n}\n\nstd::optional<ImageOptimizerOptions::Sides> ImageOptimizerOptions::to_sides(JSContext *cx,\n                                                                            JS::HandleValue val) {\n  if (!val.isObject()) {\n    return std::nullopt;\n  }\n\n  JS::RootedValue top_val(cx);\n  JS::RootedValue bottom_val(cx);\n  JS::RootedValue left_val(cx);\n  JS::RootedValue right_val(cx);\n  JS::RootedObject sides_obj(cx, &val.toObject());\n  if (!JS_GetProperty(cx, sides_obj, \"top\", &top_val) ||\n      !JS_GetProperty(cx, sides_obj, \"bottom\", &bottom_val) ||\n      !JS_GetProperty(cx, sides_obj, \"left\", &left_val) ||\n      !JS_GetProperty(cx, sides_obj, \"right\", &right_val)) {\n    return std::nullopt;\n  }\n\n  if (top_val.isUndefined() || bottom_val.isUndefined() || left_val.isUndefined() ||\n      right_val.isUndefined()) {\n    return std::nullopt;\n  }\n\n  auto top = to_pixels_or_percentage(cx, top_val);\n  auto bottom = to_pixels_or_percentage(cx, bottom_val);\n  auto left = to_pixels_or_percentage(cx, left_val);\n  auto right = to_pixels_or_percentage(cx, right_val);\n\n  if (!top || !bottom || !left || !right) {\n    return std::nullopt;\n  }\n\n  return Sides{\n      .top = *top,\n      .right = *right,\n      .bottom = *bottom,\n      .left = *left,\n  };\n}\n\nstd::optional<ImageOptimizerOptions::TrimColor>\nImageOptimizerOptions::to_trim_color(JSContext *cx, JS::HandleValue val) {\n  auto throw_error = [&]() {\n    api::throw_error(cx, api::Errors::TypeError, \"imageOptimizerOptions\", \"trimColor\",\n                     \"must be either a color, or an object with color and threshold elements, \"\n                     \"where threshold is a number between 0 and 1\");\n    return std::nullopt;\n  };\n\n  if (val.isString()) {\n    auto color = to_color(cx, val);\n    if (!color) {\n      return throw_error();\n    }\n    return TrimColor{*std::move(color), std::nullopt};\n  }\n\n  if (!val.isObject()) {\n    return throw_error();\n  }\n\n  JS::RootedValue color_val(cx);\n  JS::RootedValue threshold_val(cx);\n  JS::RootedObject trim_color_obj(cx, &val.toObject());\n  if (!JS_GetProperty(cx, trim_color_obj, \"color\", &color_val) ||\n      !JS_GetProperty(cx, trim_color_obj, \"threshold\", &threshold_val)) {\n    return std::nullopt;\n  }\n\n  // Could be an rgb(a) object\n  if (color_val.isUndefined()) {\n    auto color = to_color(cx, val);\n    if (!color) {\n      return throw_error();\n    }\n    return TrimColor{*std::move(color), std::nullopt};\n  }\n\n  auto color = to_color(cx, color_val);\n  if (!color) {\n    return throw_error();\n  }\n\n  std::optional<double> threshold = std::nullopt;\n  if (threshold_val.isNumber()) {\n    threshold = to_number_between_inclusive(threshold_val, 0, 1);\n    if (!threshold) {\n      return throw_error();\n    }\n  }\n  return TrimColor{*std::move(color), threshold};\n}\n\n#define FASTLY_BEGIN_IMAGE_OPTIMIZER_OPTION_TYPE(type, lowercase, str)                             \\\n  std::optional<ImageOptimizerOptions::type> ImageOptimizerOptions::to_##lowercase(                \\\n      JSContext *cx, JS::HandleValue val) {                                                        \\\n    if (!val.isString()) {                                                                         \\\n      api::throw_error(cx, api::Errors::TypeError, \"imageOptimizerOptions\", #type,                 \\\n                       \"must be a string\");                                                        \\\n      return std::nullopt;                                                                         \\\n    }                                                                                              \\\n    JS::RootedString str_val(cx, val.toString());                                                  \\\n    using enum type;\n#define FASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(name, str)                                            \\\n  if (core::encode(cx, str_val) == std::string_view(str)) {                                        \\\n    return name;                                                                                   \\\n  }\n#define FASTLY_END_IMAGE_OPTIMIZER_OPTION_TYPE(type)                                               \\\n  api::throw_error(cx, api::Errors::TypeError, \"imageOptimizerOptions\", #type,                     \\\n                   \"be one of the allowed string values\");                                         \\\n  return std::nullopt;                                                                             \\\n  }\n#include \"image-optimizer-options.inc\"\n} // namespace fastly::image_optimizer"
  },
  {
    "path": "runtime/fastly/builtins/image-optimizer.h",
    "content": "#ifndef FASTLY_IMAGE_OPTIMIZER_H\n#define FASTLY_IMAGE_OPTIMIZER_H\n\n#include \"../host-api/host_api_fastly.h\"\n#include \"builtin.h\"\n#include \"encode.h\"\n#include \"extension-api.h\"\n#include <memory>\n#include <variant>\n\n#define HANDLE_IMAGE_OPTIMIZER_ERROR(cx, err)                                                      \\\n  ::host_api::handle_image_optimizer_error(cx, err, __LINE__, __func__)\n\nnamespace fastly::image_optimizer {\nclass EnumOption {\npublic:\n  enum Slots { Count };\n  static const JSFunctionSpec static_methods[];\n  static const JSFunctionSpec methods[];\n  static const JSPropertySpec properties[];\n};\n#define FASTLY_BEGIN_IMAGE_OPTIMIZER_OPTION_TYPE(type, lowercase, str)                             \\\n  class type : public EnumOption, public builtins::BuiltinNoConstructor<type> {                    \\\n  public:                                                                                          \\\n    static const JSPropertySpec static_properties[];                                               \\\n    static constexpr const char *class_name = #type;                                               \\\n  };\n#include \"image-optimizer-options.inc\"\n\nclass ImageOptimizerOptions {\npublic:\n  fastly_image_optimizer_transform_config to_config();\n  static std::unique_ptr<ImageOptimizerOptions> create(JSContext *cx, JS::HandleValue opts_val);\n  static bool optionsToQueryString(JSContext *cx, unsigned argc, JS::Value *vp);\n  std::string to_string() const;\n\n#define FASTLY_BEGIN_IMAGE_OPTIMIZER_OPTION_TYPE(type, lowercase, str) enum class type {\n#define FASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(name, str) name,\n#define FASTLY_END_IMAGE_OPTIMIZER_OPTION_TYPE(type)                                               \\\n  }                                                                                                \\\n  ;\n#include \"image-optimizer-options.inc\"\n\n#define FASTLY_BEGIN_IMAGE_OPTIMIZER_OPTION_TYPE(type, lowercase, str)                             \\\n  static std::optional<type> to_##lowercase(JSContext *cx, JS::HandleValue val);\n#include \"image-optimizer-options.inc\"\n\n  struct Blur {\n    double value;\n    bool is_percentage;\n  };\n  static std::optional<Blur> to_blur(JSContext *cx, JS::HandleValue val);\n\n  struct Brightness {\n    double value;\n  };\n  static std::optional<Brightness> to_brightness(JSContext *cx, JS::HandleValue val);\n\n  struct PixelsOrPercentage {\n    union {\n      int pixels;\n      double percentage;\n    };\n    bool is_percentage;\n  };\n  static std::optional<PixelsOrPercentage> to_pixels_or_percentage(JSContext *cx,\n                                                                   JS::HandleValue val);\n\n  struct Size {\n    struct Absolute {\n      PixelsOrPercentage width;\n      PixelsOrPercentage height;\n    };\n    struct Ratio {\n      double width_ratio;\n      double height_ratio;\n    };\n    std::variant<Absolute, Ratio> value;\n  };\n  static std::optional<Size> to_size(JSContext *cx, JS::HandleValue val);\n\n  struct Position {\n    // Absolute or offset\n    std::variant<PixelsOrPercentage, double> x;\n    std::variant<PixelsOrPercentage, double> y;\n  };\n  static std::optional<Position> to_position(JSContext *cx, JS::HandleValue val);\n  struct Canvas {\n    Size size;\n    std::optional<Position> position;\n  };\n  static std::optional<Canvas> to_canvas(JSContext *cx, JS::HandleValue val);\n\n  struct Color {\n    host_api::HostString val;\n  };\n  static std::optional<Color> to_color(JSContext *cx, JS::HandleValue val);\n\n  struct Contrast {\n    double value;\n  };\n  static std::optional<Contrast> to_contrast(JSContext *cx, JS::HandleValue val);\n\n  // Deduplicates between Crop and Precrop\n  struct CropSpec {\n    Size size;\n    std::optional<Position> position;\n    std::optional<CropMode> mode;\n  };\n  static std::optional<CropSpec> to_crop_spec(JSContext *cx, JS::HandleValue val);\n\n  struct Crop {\n    CropSpec value;\n  };\n  static std::optional<Crop> to_crop(JSContext *cx, JS::HandleValue val) {\n    auto value = to_crop_spec(cx, val);\n    if (!value)\n      return std::nullopt;\n    return Crop{*value};\n  }\n\n  struct Dpr {\n    double value;\n  };\n  static std::optional<Dpr> to_dpr(JSContext *cx, JS::HandleValue val);\n\n  struct Frame {\n    int32_t value;\n  };\n  static std::optional<Frame> to_frame(JSContext *cx, JS::HandleValue val);\n\n  struct Height {\n    PixelsOrPercentage value;\n  };\n  static std::optional<Height> to_height(JSContext *cx, JS::HandleValue val) {\n    auto ret = to_pixels_or_percentage(cx, val);\n    if (!ret) {\n      api::throw_error(cx, api::Errors::TypeError, \"imageOptimizerOptions\", \"height\",\n                       \"must be an integer pixel value or a string percentage value\");\n      return std::nullopt;\n    }\n    return Height{*ret};\n  }\n\n  struct Level {\n    host_api::HostString value;\n  };\n  static std::optional<Level> to_level(JSContext *cx, JS::HandleValue val);\n\n  struct Sides {\n    PixelsOrPercentage top, right, bottom, left;\n  };\n  static std::optional<Sides> to_sides(JSContext *cx, JS::HandleValue val);\n\n  struct Pad {\n    Sides value;\n  };\n  static std::optional<Pad> to_pad(JSContext *cx, JS::HandleValue val) {\n    auto sides = to_sides(cx, val);\n    if (!sides) {\n      api::throw_error(\n          cx, api::Errors::TypeError, \"imageOptimizerOptions\", \"trim\",\n          \"must be an object with top, right, bottom, and left elements, each being an \"\n          \"integer or a string percentage value\");\n      return std::nullopt;\n    }\n    return Pad{*sides};\n  }\n\n  struct Precrop {\n    CropSpec value;\n  };\n  static std::optional<Precrop> to_precrop(JSContext *cx, JS::HandleValue val) {\n    auto value = to_crop_spec(cx, val);\n    if (!value)\n      return std::nullopt;\n    return Precrop{*value};\n  }\n\n  struct Quality {\n    uint32_t value;\n  };\n  static std::optional<Quality> to_quality(JSContext *cx, JS::HandleValue val);\n\n  struct Saturation {\n    double value;\n  };\n  static std::optional<Saturation> to_saturation(JSContext *cx, JS::HandleValue val);\n\n  struct Sharpen {\n    double amount;\n    double radius;\n    int32_t threshold;\n  };\n  static std::optional<Sharpen> to_sharpen(JSContext *cx, JS::HandleValue val);\n\n  struct Trim {\n    Sides value;\n  };\n  static std::optional<Trim> to_trim(JSContext *cx, JS::HandleValue val) {\n    auto sides = to_sides(cx, val);\n    if (!sides) {\n      api::throw_error(\n          cx, api::Errors::TypeError, \"imageOptimizerOptions\", \"trim\",\n          \"must be an object with top, right, bottom, and left elements, each being an \"\n          \"integer or a string percentage value\");\n      return std::nullopt;\n    }\n    return Trim{*sides};\n  }\n\n  struct TrimColor {\n    Color color;\n    std::optional<double> threshold;\n  };\n  static std::optional<TrimColor> to_trim_color(JSContext *cx, JS::HandleValue val);\n\n  struct Viewbox {\n    int32_t value;\n  };\n  static std::optional<Viewbox> to_viewbox(JSContext *cx, JS::HandleValue val);\n\n  struct Width {\n    PixelsOrPercentage value;\n  };\n  static std::optional<Width> to_width(JSContext *cx, JS::HandleValue val) {\n    auto ret = to_pixels_or_percentage(cx, val);\n    if (!ret) {\n      api::throw_error(cx, api::Errors::TypeError, \"imageOptimizerOptions\", \"width\",\n                       \"must be an integer pixel value or a string percentage value\");\n      return std::nullopt;\n    }\n    return Width{*ret};\n  }\n\n  struct BGColor {\n    Color color;\n  };\n  static std::optional<BGColor> to_bg_color(JSContext *cx, JS::HandleValue val) {\n    auto color = to_color(cx, val);\n    if (!color) {\n      api::throw_error(cx, api::Errors::TypeError, \"imageOptimizerOptions\", \"bgColor\",\n                       \"must be a 3/6 character hex string or RGB(A) object\");\n      return std::nullopt;\n    }\n    return BGColor{std::move(*color)};\n  }\n\nprivate:\n  ImageOptimizerOptions(\n      Region region, std::optional<Auto> auto_val, std::optional<BGColor> bg_color,\n      std::optional<Blur> blur, std::optional<Brightness> brightness, std::optional<BWAlgorithm> bw,\n      std::optional<Canvas> canvas, std::optional<Contrast> contrast, std::optional<Crop> crop,\n      std::optional<Disable> disable, std::optional<Dpr> dpr, std::optional<Enable> enable,\n      std::optional<Fit> fit, std::optional<Format> format, std::optional<Frame> frame,\n      std::optional<Height> height, std::optional<Level> level, std::optional<Metadata> metadata,\n      std::optional<Optimize> optimize, std::optional<Orient> orient, std::optional<Pad> pad,\n      std::optional<Precrop> precrop, std::optional<Profile> profile,\n      std::optional<Quality> quality, std::optional<ResizeFilter> resize_filter,\n      std::optional<Saturation> saturation, std::optional<Sharpen> sharpen,\n      std::optional<Trim> trim, std::optional<TrimColor> trim_color, std::optional<Viewbox> viewbox,\n      std::optional<Width> width)\n      : region_(region), auto_(auto_val), bg_color_(std::move(bg_color)), blur_(blur),\n        brightness_(brightness), bw_(bw), canvas_(canvas), contrast_(contrast), crop_(crop),\n        disable_(disable), dpr_(dpr), enable_(enable), fit_(fit), format_(format), frame_(frame),\n        height_(height), level_(std::move(level)), metadata_(metadata), optimize_(optimize),\n        orient_(orient), pad_(pad), precrop_(precrop), profile_(profile), quality_(quality),\n        resizeFilter_(resize_filter), saturation_(saturation), sharpen_(sharpen), trim_(trim),\n        trim_color_(std::move(trim_color)), viewbox_(viewbox), width_(width) {}\n  Region region_;\n  std::optional<Auto> auto_;\n  std::optional<BGColor> bg_color_;\n  std::optional<Blur> blur_;\n  std::optional<Brightness> brightness_;\n  std::optional<BWAlgorithm> bw_;\n  std::optional<Canvas> canvas_;\n  std::optional<Contrast> contrast_;\n  std::optional<Crop> crop_;\n  std::optional<Disable> disable_;\n  std::optional<Dpr> dpr_;\n  std::optional<Enable> enable_;\n  std::optional<Fit> fit_;\n  std::optional<Format> format_;\n  std::optional<Frame> frame_;\n  std::optional<Height> height_;\n  std::optional<Level> level_;\n  std::optional<Metadata> metadata_;\n  std::optional<Optimize> optimize_;\n  std::optional<Orient> orient_;\n  std::optional<Pad> pad_;\n  std::optional<Precrop> precrop_;\n  std::optional<Profile> profile_;\n  std::optional<Quality> quality_;\n  std::optional<ResizeFilter> resizeFilter_;\n  std::optional<Saturation> saturation_;\n  std::optional<Sharpen> sharpen_;\n  std::optional<Trim> trim_;\n  std::optional<TrimColor> trim_color_;\n  std::optional<Viewbox> viewbox_;\n  std::optional<Width> width_;\n};\n\ninline std::string to_string(const ImageOptimizerOptions &opts) { return opts.to_string(); }\n\n#define FASTLY_BEGIN_IMAGE_OPTIMIZER_OPTION_TYPE(type, lowercase, str)                             \\\n  inline std::string to_string(ImageOptimizerOptions::type val) {                                  \\\n    using enum ImageOptimizerOptions::type;                                                        \\\n    std::string prefix = str;                                                                      \\\n    switch (val) {\n#define FASTLY_DEFINE_IMAGE_OPTIMIZER_OPTION(name, str)                                            \\\n  case name:                                                                                       \\\n    return prefix + '=' + str;\n#define FASTLY_END_IMAGE_OPTIMIZER_OPTION_TYPE(type)                                               \\\n  }                                                                                                \\\n  }\n#include \"image-optimizer-options.inc\"\n\ninline std::string to_string(const ImageOptimizerOptions::Color &c) {\n  return std::string{std::string_view(c.val)};\n}\ninline std::string to_string(const ImageOptimizerOptions::BGColor &bg) {\n  return \"bg-color=\" + to_string(bg.color);\n}\ninline std::string to_string(const ImageOptimizerOptions::Blur &blur) {\n  auto ret = \"blur=\" + std::to_string(blur.value);\n  if (blur.is_percentage) {\n    ret += 'p';\n  }\n  return ret;\n}\ninline std::string to_string(const ImageOptimizerOptions::Brightness &brightness) {\n  return \"brightness=\" + std::to_string(brightness.value);\n}\ninline std::string to_string(const ImageOptimizerOptions::PixelsOrPercentage &value) {\n  if (value.is_percentage) {\n    return std::to_string(value.percentage) + 'p';\n  }\n  return std::to_string(value.pixels);\n}\ninline std::string to_string(const ImageOptimizerOptions::Size &size) {\n  if (auto abs = std::get_if<ImageOptimizerOptions::Size::Absolute>(&size.value)) {\n    return to_string(abs->width) + ',' + to_string(abs->height);\n  }\n  auto ratio = std::get<ImageOptimizerOptions::Size::Ratio>(size.value);\n  return std::to_string(ratio.width_ratio) + ':' + std::to_string(ratio.height_ratio);\n}\ninline std::string to_string(const ImageOptimizerOptions::Position &position) {\n  std::string ret;\n  if (auto value = std::get_if<ImageOptimizerOptions::PixelsOrPercentage>(&position.x)) {\n    ret += 'x' + to_string(*value);\n  } else {\n    auto dbl = std::get<double>(position.x);\n    ret += \"offset-x\" + std::to_string(dbl);\n  }\n  ret += ',';\n  if (auto value = std::get_if<ImageOptimizerOptions::PixelsOrPercentage>(&position.y)) {\n    ret += 'y' + to_string(*value);\n  } else {\n    auto dbl = std::get<double>(position.y);\n    ret += \"offset-y\" + std::to_string(dbl);\n  }\n  return ret;\n}\ninline std::string to_string(const ImageOptimizerOptions::Canvas &canvas) {\n  std::string ret = \"canvas=\" + to_string(canvas.size);\n  if (canvas.position) {\n    ret += ',' + to_string(*canvas.position);\n  }\n  return ret;\n}\ninline std::string to_string(const ImageOptimizerOptions::Contrast &contrast) {\n  return \"contrast=\" + std::to_string(contrast.value);\n}\ninline std::string to_string(const ImageOptimizerOptions::CropSpec &crop) {\n  std::string ret = to_string(crop.size);\n  if (crop.position) {\n    ret += ',' + to_string(*crop.position);\n  }\n  if (crop.mode) {\n    ret += ',';\n    switch (*crop.mode) {\n    case ImageOptimizerOptions::CropMode::Safe:\n      ret += \"safe\";\n      break;\n    case ImageOptimizerOptions::CropMode::Smart:\n      ret += \"smart\";\n      break;\n    }\n  }\n  return ret;\n}\ninline std::string to_string(const ImageOptimizerOptions::Crop &crop) {\n  return \"crop=\" + to_string(crop.value);\n}\ninline std::string to_string(const ImageOptimizerOptions::Dpr &dpr) {\n  return \"dpr=\" + std::to_string(dpr.value);\n}\ninline std::string to_string(const ImageOptimizerOptions::Frame &frame) {\n  return \"frame=\" + std::to_string(frame.value);\n}\ninline std::string to_string(const ImageOptimizerOptions::Height &height) {\n  return \"height=\" + to_string(height.value);\n}\ninline std::string to_string(const ImageOptimizerOptions::Level &level) {\n  return \"level=\" + std::string(std::string_view(level.value));\n}\ninline std::string to_string(const ImageOptimizerOptions::Sides &sides) {\n  return to_string(sides.top) + ',' + to_string(sides.right) + ',' + to_string(sides.bottom) + ',' +\n         to_string(sides.left);\n}\ninline std::string to_string(const ImageOptimizerOptions::Pad &pad) {\n  return \"pad=\" + to_string(pad.value);\n}\ninline std::string to_string(const ImageOptimizerOptions::Precrop &precrop) {\n  return \"precrop=\" + to_string(precrop.value);\n}\ninline std::string to_string(const ImageOptimizerOptions::Quality &quality) {\n  return \"quality=\" + std::to_string(quality.value);\n}\ninline std::string to_string(const ImageOptimizerOptions::Saturation &saturation) {\n  return \"saturation=\" + std::to_string(saturation.value);\n}\ninline std::string to_string(const ImageOptimizerOptions::Trim &trim) {\n  return \"trim=\" + to_string(trim.value);\n}\ninline std::string to_string(const ImageOptimizerOptions::TrimColor &trim_color) {\n  std::string ret = \"trim-color=\" + to_string(trim_color.color);\n  if (trim_color.threshold) {\n    ret += \",t\" + std::to_string(*trim_color.threshold);\n  }\n  return ret;\n}\ninline std::string to_string(const ImageOptimizerOptions::Sharpen &sharpen) {\n  return \"sharpen=a\" + std::to_string(sharpen.amount) + \",r\" + std::to_string(sharpen.radius) +\n         \",t\" + std::to_string(sharpen.threshold);\n}\ninline std::string to_string(const ImageOptimizerOptions::Viewbox &viewbox) {\n  return \"viewbox=\" + std::to_string(viewbox.value);\n}\ninline std::string to_string(const ImageOptimizerOptions::Width &width) {\n  return \"width=\" + to_string(width.value);\n}\n} // namespace fastly::image_optimizer\n#endif"
  },
  {
    "path": "runtime/fastly/builtins/kv-store.cpp",
    "content": "#include <algorithm>\n#include <cstring>\n#include <iostream>\n#include <optional>\n#include <string>\n\n// TODO: remove these once the warnings are fixed\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Winvalid-offsetof\"\n#pragma clang diagnostic ignored \"-Wdeprecated-enum-enum-conversion\"\n#include \"js/experimental/TypedData.h\"\n#pragma clang diagnostic pop\n\n#include \"js/ArrayBuffer.h\"\n#include \"js/Stream.h\"\n\n#include \"../../../StarlingMonkey/builtins/web/base64.h\"\n#include \"../../../StarlingMonkey/builtins/web/streams/native-stream-source.h\"\n#include \"../../../StarlingMonkey/builtins/web/url.h\"\n#include \"../common/validations.h\"\n#include \"../host-api/host_api_fastly.h\"\n#include \"./fastly.h\"\n#include \"builtin.h\"\n#include \"decode.h\"\n#include \"encode.h\"\n#include \"js/JSON.h\"\n#include \"kv-store.h\"\n\nusing builtins::web::streams::NativeStreamSource;\nusing fastly::FastlyGetErrorMessage;\nusing fastly::common::parse_and_validate_timeout;\nusing fastly::common::validate_bytes;\nusing fastly::fastly::convertBodyInit;\nusing fastly::fetch::RequestOrResponse;\n\nnamespace fastly::kv_store {\n\nnamespace {\n\napi::Engine *ENGINE;\n\nstd::string_view bad_chars{\"#;?^|\\n\\r\"};\n\nstd::optional<char> find_invalid_character_for_kv_store_key(const char *str) {\n  std::optional<char> res;\n\n  std::string_view view{str, strlen(str)};\n\n  auto it = std::find_if(view.begin(), view.end(),\n                         [](auto c) { return bad_chars.find(c) != std::string_view::npos; });\n\n  if (it != view.end()) {\n    res = *it;\n  }\n\n  return res;\n}\n\n} // namespace\n\ntemplate <RequestOrResponse::BodyReadResult result_type>\nbool KVStoreEntry::bodyAll(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n  return RequestOrResponse::bodyAll<result_type, false>(cx, args, self);\n}\n\nbool KVStoreEntry::body_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n  if (!JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::HasBody)).isBoolean()) {\n    JS::SetReservedSlot(self, static_cast<uint32_t>(Slots::HasBody), JS::BooleanValue(false));\n  }\n  return RequestOrResponse::body_get(cx, args, self, true);\n}\n\nbool KVStoreEntry::bodyUsed_get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n  if (!JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::BodyUsed)).isBoolean()) {\n    JS::SetReservedSlot(self, static_cast<uint32_t>(Slots::BodyUsed), JS::BooleanValue(false));\n  }\n  args.rval().setBoolean(RequestOrResponse::body_used(self));\n  return true;\n}\n\nbool KVStoreEntry::metadata(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n  args.rval().set(JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::Metadata)));\n  return true;\n}\n\nbool KVStoreEntry::metadata_text(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n  JS::RootedValue metadata(cx, JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::Metadata)));\n  if (metadata.isNull()) {\n    args.rval().setNull();\n    return true;\n  }\n  uint8_t *data;\n  size_t len;\n  bool is_shared;\n  if (!JS_GetObjectAsArrayBufferView(&metadata.toObject(), &len, &is_shared, &data)) {\n    MOZ_ASSERT(false);\n  }\n  MOZ_ASSERT(!is_shared);\n  JS::RootedString metadata_str(\n      cx, core::decode(cx, std::string_view(reinterpret_cast<char *>(data), len)));\n  if (!metadata_str) {\n    return false;\n  }\n  args.rval().setString(metadata_str);\n  return true;\n}\n\nconst JSFunctionSpec KVStoreEntry::static_methods[] = {\n    JS_FS_END,\n};\n\nconst JSPropertySpec KVStoreEntry::static_properties[] = {\n    JS_PS_END,\n};\n\nconst JSFunctionSpec KVStoreEntry::methods[] = {\n    JS_FN(\"arrayBuffer\", bodyAll<RequestOrResponse::BodyReadResult::ArrayBuffer>, 0,\n          JSPROP_ENUMERATE),\n    JS_FN(\"json\", bodyAll<RequestOrResponse::BodyReadResult::JSON>, 0, JSPROP_ENUMERATE),\n    JS_FN(\"text\", bodyAll<RequestOrResponse::BodyReadResult::Text>, 0, JSPROP_ENUMERATE),\n    JS_FN(\"metadata\", metadata, 0, JSPROP_ENUMERATE),\n    JS_FN(\"metadataText\", metadata_text, 0, JSPROP_ENUMERATE),\n    JS_FS_END,\n};\n\nconst JSPropertySpec KVStoreEntry::properties[] = {\n    JS_PSG(\"body\", body_get, JSPROP_ENUMERATE),\n    JS_PSG(\"bodyUsed\", bodyUsed_get, JSPROP_ENUMERATE),\n    JS_PS_END,\n};\n\nbool KVStoreEntry::constructor(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS_ReportErrorUTF8(cx, \"KVStoreEntry can't be instantiated directly\");\n  return false;\n}\n\nJSObject *KVStoreEntry::create(JSContext *cx, host_api::HttpBody body_handle,\n                               host_api::HostBytes metadata) {\n  JS::RootedObject kvStoreEntry(cx, JS_NewObjectWithGivenProto(cx, &class_, proto_obj));\n  if (!kvStoreEntry)\n    return nullptr;\n\n  JS::SetReservedSlot(kvStoreEntry, static_cast<uint32_t>(Slots::Body),\n                      JS::Int32Value(body_handle.handle));\n  JS::SetReservedSlot(kvStoreEntry, static_cast<uint32_t>(Slots::BodyStream), JS::NullValue());\n  JS::SetReservedSlot(kvStoreEntry, static_cast<uint32_t>(Slots::HasBody), JS::BooleanValue(true));\n  JS::SetReservedSlot(kvStoreEntry, static_cast<uint32_t>(Slots::BodyUsed), JS::FalseValue());\n  if (metadata) {\n    JS::RootedObject buffer(\n        cx, JS::NewArrayBufferWithContents(cx, metadata.len, metadata.ptr.get(),\n                                           JS::NewArrayBufferOutOfMemory::CallerMustFreeMemory));\n    if (!buffer) {\n      JS_ReportOutOfMemory(cx);\n      return nullptr;\n    }\n\n    // `array_buffer` now owns `metadata`\n    static_cast<void>(metadata.ptr.release());\n\n    JS::RootedObject uint8_array(cx, JS_NewUint8ArrayWithBuffer(cx, buffer, 0, metadata.len));\n\n    JS::SetReservedSlot(kvStoreEntry, static_cast<uint32_t>(Slots::Metadata),\n                        JS::ObjectValue(*uint8_array));\n  } else {\n    JS::SetReservedSlot(kvStoreEntry, static_cast<uint32_t>(Slots::Metadata), JS::NullValue());\n  }\n  return kvStoreEntry;\n}\n\nnamespace {\n\nhost_api::KVStore kv_store(JSObject *obj) {\n  JS::Value val = JS::GetReservedSlot(obj, static_cast<uint32_t>(KVStore::Slots::KVStore));\n  return host_api::KVStore(val.toInt32());\n}\n\nbool parse_and_validate_key(JSContext *cx, const char *key, size_t len) {\n  // If the converted string has a length of 0 then we throw an Error\n  // because KVStore Keys have to be at-least 1 character.\n  if (len == 0) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_KV_STORE_KEY_EMPTY);\n    return false;\n  }\n\n  // If the converted string has a length of more than 1024 then we throw an Error\n  // because KVStore Keys have to be less than 1025 characters.\n  if (len > 1024) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_KV_STORE_KEY_TOO_LONG);\n    return false;\n  }\n\n  auto key_chars = key;\n  auto res = find_invalid_character_for_kv_store_key(key_chars);\n  if (res.has_value()) {\n    std::string character;\n    switch (res.value()) {\n    case '\\n':\n      character = \"newline\";\n      break;\n    case '\\r':\n      character = \"carriage return\";\n      break;\n    case '^':\n      character = '^';\n      break;\n    case '|':\n      character = '|';\n      break;\n    case ';':\n      character = ';';\n      break;\n    case '?':\n      character = '?';\n      break;\n    case '#':\n      character = '#';\n      break;\n    }\n    JS_ReportErrorNumberUTF8(cx, FastlyGetErrorMessage, nullptr,\n                             JSMSG_KV_STORE_KEY_INVALID_CHARACTER, character.c_str());\n    return false;\n  }\n  auto acme_challenge = \".well-known/acme-challenge/\";\n  if (strncmp(key_chars, acme_challenge, strlen(acme_challenge)) == 0) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_KV_STORE_KEY_ACME);\n    return false;\n  }\n\n  if (strcmp(key_chars, \".\") == 0 || strcmp(key_chars, \"..\") == 0) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_KV_STORE_KEY_RELATIVE);\n    return false;\n  }\n\n  return true;\n}\n\nbool process_pending_kv_store_list(JSContext *cx, host_api::KVStorePendingList::Handle handle,\n                                   JS::HandleObject context, JS::HandleValue promise) {\n  host_api::KVStorePendingList pending_list(handle);\n  JS::RootedObject promise_obj(cx, &promise.toObject());\n\n  auto res = pending_list.wait();\n  if (auto *err = res.to_err()) {\n    HANDLE_KV_ERROR(cx, *err, JSMSG_KV_STORE_LIST_ERROR);\n    return RejectPromiseWithPendingError(cx, promise_obj);\n  }\n\n  auto buf_res = res.unwrap().read_all();\n  if (auto *err = buf_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return RejectPromiseWithPendingError(cx, promise_obj);\n  }\n\n  JS::RootedString str(\n      cx,\n      JS_NewStringCopyUTF8N(cx, JS::UTF8Chars(reinterpret_cast<char *>(buf_res.unwrap().ptr.get()),\n                                              buf_res.unwrap().len)));\n  if (!str) {\n    return RejectPromiseWithPendingError(cx, promise_obj);\n  }\n  JS::RootedValue str_val(cx, JS::StringValue(str));\n  JS::RootedValue json(cx);\n  if (!JS_ParseJSON(cx, str, &json)) {\n    return RejectPromiseWithPendingError(cx, promise_obj);\n  }\n  if (!json.isObject()) {\n    JS_ReportErrorLatin1(cx, \"Bad data.\");\n    return RejectPromiseWithPendingError(cx, promise_obj);\n  }\n  JS::RootedValue list(cx);\n  JS::RootedObject json_obj(cx, &json.toObject());\n  if (!JS_GetProperty(cx, json_obj, \"data\", &list)) {\n    return RejectPromiseWithPendingError(cx, promise_obj);\n  }\n  JS::RootedValue meta(cx);\n  if (!JS_GetProperty(cx, json_obj, \"meta\", &meta)) {\n    return RejectPromiseWithPendingError(cx, promise_obj);\n  }\n  JS::RootedObject meta_obj(cx, &meta.toObject());\n  JS::RootedValue next_cursor(cx);\n  if (!JS_GetProperty(cx, meta_obj, \"next_cursor\", &next_cursor)) {\n    return RejectPromiseWithPendingError(cx, promise_obj);\n  }\n  JS::RootedObject list_out(cx, JS_NewPlainObject(cx));\n  JS_SetProperty(cx, list_out, \"list\", list);\n  JS_SetProperty(cx, list_out, \"cursor\", next_cursor);\n  JS::RootedValue list_out_val(cx, JS::ObjectValue(*list_out));\n  return JS::ResolvePromise(cx, promise_obj, list_out_val);\n}\n\nbool process_pending_kv_store_delete(JSContext *cx, host_api::KVStorePendingDelete::Handle handle,\n                                     JS::HandleObject context, JS::HandleValue promise) {\n  host_api::KVStorePendingDelete pending_delete(handle);\n  JS::RootedObject promise_obj(cx, &promise.toObject());\n\n  auto res = pending_delete.wait();\n  if (auto *err = res.to_err()) {\n    HANDLE_KV_ERROR(cx, *err, JSMSG_KV_STORE_DELETE_ERROR);\n    return RejectPromiseWithPendingError(cx, promise_obj);\n  }\n\n  JS::ResolvePromise(cx, promise_obj, JS::UndefinedHandleValue);\n  return true;\n}\n\nbool process_pending_kv_store_lookup(JSContext *cx, host_api::KVStorePendingLookup::Handle handle,\n                                     JS::HandleObject context, JS::HandleValue promise) {\n  host_api::KVStorePendingLookup pending_lookup(handle);\n  JS::RootedObject promise_obj(cx, &promise.toObject());\n\n  auto res = pending_lookup.wait();\n\n  if (auto *err = res.to_err()) {\n    HANDLE_KV_ERROR(cx, *err, JSMSG_KV_STORE_LOOKUP_ERROR);\n    return RejectPromiseWithPendingError(cx, promise_obj);\n  }\n\n  // When no entry is found, we are going to resolve the Promise with `null`.\n  if (!res.unwrap().has_value()) {\n    JS::RootedValue result(cx);\n    result.setNull();\n    JS::ResolvePromise(cx, promise_obj, result);\n  } else {\n    host_api::HttpBody body = std::get<0>(res.unwrap().value());\n    host_api::HostBytes metadata = std::move(std::get<1>(res.unwrap().value()));\n    // uint32_t gen = std::get<2>(res.unwrap());\n    JS::RootedObject entry(cx, KVStoreEntry::create(cx, body, std::move(metadata)));\n    if (!entry) {\n      return RejectPromiseWithPendingError(cx, promise_obj);\n    }\n    JS::RootedValue result(cx);\n    result.setObject(*entry);\n    JS::ResolvePromise(cx, promise_obj, result);\n  }\n\n  return true;\n}\n\n} // namespace\n\nbool KVStore::delete_(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER_WITH_NAME(1, \"delete\");\n\n  JS::RootedObject result_promise(cx, JS::NewPromiseObject(cx, nullptr));\n  if (!result_promise) {\n    return ReturnPromiseRejectedWithPendingError(cx, args);\n  }\n\n  JS::RootedValue key(cx, args.get(0));\n\n  // Convert the key argument into a String following https://tc39.es/ecma262/#sec-tostring\n  auto key_chars = core::encode(cx, key);\n  if (!key_chars) {\n    return ReturnPromiseRejectedWithPendingError(cx, args);\n  }\n\n  if (!parse_and_validate_key(cx, key_chars.begin(), key_chars.len)) {\n    return ReturnPromiseRejectedWithPendingError(cx, args);\n  }\n\n  auto res = kv_store(self).delete_(key_chars);\n\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return ReturnPromiseRejectedWithPendingError(cx, args);\n  }\n  auto handle = res.unwrap();\n\n  JS::RootedValue result_promise_val(cx, JS::ObjectValue(*result_promise));\n  ENGINE->queue_async_task(\n      new FastlyAsyncTask(handle, self, result_promise_val, process_pending_kv_store_delete));\n\n  args.rval().setObject(*result_promise);\n  return true;\n}\n\nbool KVStore::get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(1)\n\n  JS::RootedObject result_promise(cx, JS::NewPromiseObject(cx, nullptr));\n  if (!result_promise) {\n    return ReturnPromiseRejectedWithPendingError(cx, args);\n  }\n\n  JS::RootedValue key(cx, args.get(0));\n\n  // Convert the key argument into a String following https://tc39.es/ecma262/#sec-tostring\n  auto key_chars = core::encode(cx, key);\n  if (!key_chars) {\n    return ReturnPromiseRejectedWithPendingError(cx, args);\n  }\n\n  if (!parse_and_validate_key(cx, key_chars.begin(), key_chars.len)) {\n    return ReturnPromiseRejectedWithPendingError(cx, args);\n  }\n\n  auto res = kv_store(self).lookup(key_chars);\n\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return ReturnPromiseRejectedWithPendingError(cx, args);\n  }\n  auto handle = res.unwrap();\n\n  JS::RootedValue result_promise_val(cx, JS::ObjectValue(*result_promise));\n  auto task =\n      new FastlyAsyncTask(handle, self, result_promise_val, process_pending_kv_store_lookup);\n  ENGINE->queue_async_task(task);\n\n  args.rval().setObject(*result_promise);\n  return true;\n}\n\nbool KVStore::put(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(2)\n\n  JS::RootedObject result_promise(cx, JS::NewPromiseObject(cx, nullptr));\n  if (!result_promise) {\n    return false;\n  }\n\n  JS::RootedValue key(cx, args.get(0));\n\n  // Convert the key argument into a String following https://tc39.es/ecma262/#sec-tostring\n  auto key_chars = core::encode(cx, key);\n  if (!key_chars) {\n    return false;\n  }\n\n  if (!parse_and_validate_key(cx, key_chars.begin(), key_chars.len)) {\n    return false;\n  }\n\n  JS::HandleValue body_val = args.get(1);\n\n  JS::RootedValue metadata_val(cx);\n  // used only if we have to do a custom text encoding\n  host_api::HostString metadata_str;\n  std::optional<uint32_t> ttl = std::nullopt;\n  std::optional<uint64_t> if_gen = std::nullopt;\n  std::optional<std::tuple<const uint8_t *, size_t>> metadata = std::nullopt;\n  std::optional<host_api::KVStore::InsertMode> mode = std::nullopt;\n  if (args.get(2).isObject()) {\n    JS::RootedObject opts_val(cx, &args.get(2).toObject());\n\n    JS::RootedValue ttl_val(cx);\n    if (!JS_GetProperty(cx, opts_val, \"ttl\", &ttl_val)) {\n      return false;\n    }\n\n    if (!ttl_val.isUndefined()) {\n      auto parsed = parse_and_validate_timeout(cx, ttl_val, \"KVStore.put\", \"ttl\", 0x100000000);\n      if (!parsed) {\n        return false;\n      }\n      ttl = parsed;\n    }\n\n    JS::RootedValue gen_val(cx);\n    if (!JS_GetProperty(cx, opts_val, \"gen\", &gen_val)) {\n      return false;\n    }\n\n    if (!gen_val.isNullOrUndefined()) {\n      if (gen_val.isNumber()) {\n        if (gen_val.toNumber()) {\n          if_gen.emplace(gen_val.toNumber());\n        }\n      }\n      if (!if_gen.has_value()) {\n        api::throw_error(cx, api::Errors::TypeError, \"KVStore.insert\", \"gen\", \"be an integer\");\n        return ReturnPromiseRejectedWithPendingError(cx, args);\n      }\n    }\n\n    if (!JS_GetProperty(cx, opts_val, \"metadata\", &metadata_val)) {\n      return false;\n    }\n    // metadata is actually read just before the hostcall\n\n    JS::RootedValue mode_val(cx);\n    if (!JS_GetProperty(cx, opts_val, \"mode\", &mode_val)) {\n      return false;\n    }\n    if (!mode_val.isUndefined()) {\n      auto mode_name = JS::RootedString(cx, JS::ToString(cx, mode_val));\n      if (!mode_name) {\n        return false;\n      }\n      bool match = false;\n      if (!JS_StringEqualsLiteral(cx, mode_name, \"add\", &match)) {\n        return false;\n      }\n      if (match) {\n        mode = host_api::KVStore::InsertMode::add;\n      } else {\n        if (!JS_StringEqualsLiteral(cx, mode_name, \"append\", &match)) {\n          return false;\n        }\n        if (match) {\n          mode = host_api::KVStore::InsertMode::append;\n        } else {\n          if (!JS_StringEqualsLiteral(cx, mode_name, \"overwrite\", &match)) {\n            return false;\n          }\n          if (match) {\n            mode = host_api::KVStore::InsertMode::overwrite;\n          } else {\n            if (!JS_StringEqualsLiteral(cx, mode_name, \"prepend\", &match)) {\n              return false;\n            }\n            if (match) {\n              mode = host_api::KVStore::InsertMode::prepend;\n            }\n          }\n        }\n      }\n    }\n  }\n\n  // We currently support five types of body inputs:\n  // - byte sequence\n  // - buffer source\n  // - USV strings\n  // - URLSearchParams\n  // - ReadableStream\n  // After the other other options are checked explicitly, all other inputs are\n  // encoded to a UTF8 string to be treated as a USV string.\n  // TODO: Support the other possible inputs to Body.\n\n  JS::RootedObject body_obj(cx, body_val.isObject() ? &body_val.toObject() : nullptr);\n\n  if (body_obj && JS::IsReadableStream(body_obj)) {\n    if (RequestOrResponse::body_unusable(cx, body_obj)) {\n      JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                                JSMSG_READABLE_STREAM_LOCKED_OR_DISTRUBED);\n      return ReturnPromiseRejectedWithPendingError(cx, args);\n    }\n\n    // If the body stream is backed by a Fastly Compute body handle, we can directly pipe\n    // that handle into the kv store.\n    if (NativeStreamSource::stream_is_body(cx, body_obj)) {\n      JS::RootedObject stream_source(cx, NativeStreamSource::get_stream_source(cx, body_obj));\n      JS::RootedObject source_owner(cx, NativeStreamSource::owner(stream_source));\n      auto body = RequestOrResponse::body_handle(source_owner);\n\n      std::optional<JS::AutoAssertNoGC> no_gc;\n      // metadata object is read last because no JS can run after getting byte reference\n      if (!metadata_val.isUndefined()) {\n        if (metadata_val.isString()) {\n          metadata_str = core::encode(cx, metadata_val);\n          metadata = std::make_tuple(reinterpret_cast<const uint8_t *>(metadata_str.ptr.get()),\n                                     metadata_str.len);\n        } else {\n          auto metadata_buf = validate_bytes(cx, metadata_val, \"KVStore.put metadata\");\n          if (!metadata_buf) {\n            return ReturnPromiseRejectedWithPendingError(cx, args);\n          }\n          auto &[data, len, noGC] = *metadata_buf;\n          metadata = std::make_tuple(data, len);\n          if (noGC) {\n            no_gc.emplace();\n          }\n        }\n      }\n\n      auto res = kv_store(self).insert(key_chars, body, mode, std::nullopt, metadata, ttl);\n      if (no_gc)\n        no_gc->reset(); // allow GC after hostcall\n      if (auto *err = res.to_err()) {\n        HANDLE_ERROR(cx, *err);\n        return ReturnPromiseRejectedWithPendingError(cx, args);\n      }\n\n      // The insert was successful so we return a Promise which resolves to undefined\n      JS::RootedValue rval(cx);\n      rval.setUndefined();\n      JS::ResolvePromise(cx, result_promise, rval);\n      args.rval().setObject(*result_promise);\n\n      return true;\n    } else {\n      JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                                JSMSG_KV_STORE_PUT_CONTENT_STREAM);\n      return ReturnPromiseRejectedWithPendingError(cx, args);\n    }\n  } else {\n    auto result = convertBodyInit(cx, body_val);\n    if (result.isErr()) {\n      return false;\n    }\n    size_t length;\n    JS::UniqueChars data;\n    std::tie(data, length) = result.unwrap();\n\n    // 30MB in bytes is the max size allowed for KVStore.\n    if (length > 30 * 1024 * 1024) {\n      JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_KV_STORE_PUT_OVER_30_MB);\n      return ReturnPromiseRejectedWithPendingError(cx, args);\n    }\n\n    auto make_res = host_api::HttpBody::make();\n    if (auto *err = make_res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return ReturnPromiseRejectedWithPendingError(cx, args);\n    }\n\n    auto body = make_res.unwrap();\n    if (!body.valid()) {\n      return ReturnPromiseRejectedWithPendingError(cx, args);\n    }\n\n    auto write_res = body.write_all_back(reinterpret_cast<uint8_t *>(data.get()), length);\n\n    if (auto *err = write_res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return ReturnPromiseRejectedWithPendingError(cx, args);\n    }\n\n    std::optional<JS::AutoAssertNoGC> no_gc;\n    // metadata object is read last because no JS can run after getting byte reference\n    if (!metadata_val.isUndefined()) {\n      if (metadata_val.isString()) {\n        metadata_str = core::encode(cx, metadata_val);\n        metadata = std::make_tuple(reinterpret_cast<const uint8_t *>(metadata_str.ptr.get()),\n                                   metadata_str.len);\n      } else {\n        auto metadata_buf = validate_bytes(cx, metadata_val, \"KVStore.put metadata\");\n        if (!metadata_buf) {\n          return ReturnPromiseRejectedWithPendingError(cx, args);\n        }\n        auto &[data, len, noGC] = *metadata_buf;\n        metadata = std::make_tuple(data, len);\n        if (noGC) {\n          no_gc.emplace();\n        }\n      }\n    }\n\n    auto insert_res = kv_store(self).insert(key_chars, body, mode, if_gen, metadata, ttl);\n    if (no_gc)\n      no_gc->reset(); // allow GC after hostcall\n    if (auto *err = insert_res.to_err()) {\n      // Ensure that we throw an exception for all unexpected host errors.\n      HANDLE_ERROR(cx, *err);\n      return RejectPromiseWithPendingError(cx, result_promise);\n    }\n\n    host_api::KVStorePendingInsert pending_insert(insert_res.unwrap());\n\n    auto res = pending_insert.wait();\n    if (auto *err = res.to_err()) {\n      HANDLE_KV_ERROR(cx, *err, JSMSG_KV_STORE_INSERT_ERROR);\n      return RejectPromiseWithPendingError(cx, result_promise);\n    }\n\n    // The insert was successful so we return a Promise which resolves to undefined\n    JS::RootedValue rval(cx);\n    rval.setUndefined();\n    JS::ResolvePromise(cx, result_promise, rval);\n    args.rval().setObject(*result_promise);\n\n    return true;\n  }\n\n  return false;\n}\n\nbool KVStore::list(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  if (!args.get(0).isObject()) {\n    api::throw_error(cx, api::Errors::TypeError, \"KVStore.list\", \"options\", \"be an object\");\n    return false;\n  }\n\n  JS::RootedObject options(cx, &args.get(0).toObject());\n\n  std::optional<std::string_view> cursor = std::nullopt;\n  host_api::HostString cursor_str;\n\n  JS::RootedValue cursor_val(cx);\n  if (!JS_GetProperty(cx, options, \"cursor\", &cursor_val)) {\n    return false;\n  }\n  if (!cursor_val.isNullOrUndefined()) {\n    if (!cursor_val.isString()) {\n      api::throw_error(cx, api::Errors::TypeError, \"KVStore.list\", \"cursor\", \"be a string\");\n      return false;\n    }\n    cursor_str = core::encode(cx, cursor_val);\n    if (!cursor_str) {\n      return false;\n    }\n    cursor = cursor_str;\n  }\n\n  JS::RootedValue limit_val(cx);\n  if (!JS_GetProperty(cx, options, \"limit\", &limit_val)) {\n    return false;\n  }\n\n  std::optional<uint32_t> limit = std::nullopt;\n  if (!limit_val.isNullOrUndefined()) {\n    if (limit_val.isNumber()) {\n      if (limit_val.isDouble()) {\n        double limit_double = limit_val.toDouble();\n        if (std::floor(limit_double) == limit_double) {\n          limit.emplace(limit_double);\n        }\n      } else if (limit_val.isInt32()) {\n        limit.emplace(limit_val.toInt32());\n      }\n    }\n    if (!limit.has_value()) {\n      api::throw_error(cx, api::Errors::TypeError, \"KVStore.list\", \"limit\", \"be an integer\");\n      return false;\n    }\n  }\n\n  std::optional<std::string_view> prefix = std::nullopt;\n  host_api::HostString prefix_str;\n\n  JS::RootedValue prefix_val(cx);\n  if (!JS_GetProperty(cx, options, \"prefix\", &prefix_val)) {\n    return false;\n  }\n  if (!prefix_val.isNullOrUndefined()) {\n    if (!prefix_val.isString()) {\n      api::throw_error(cx, api::Errors::TypeError, \"KVStore.list\", \"prefix\", \"be a string\");\n      return false;\n    }\n    prefix_str = core::encode(cx, prefix_val);\n    if (!prefix_str) {\n      return false;\n    }\n    prefix = prefix_str;\n  }\n\n  bool no_sync = false;\n  JS::RootedValue no_sync_val(cx);\n  if (!JS_GetProperty(cx, options, \"noSync\", &no_sync_val)) {\n    return false;\n  }\n  if (!no_sync_val.isNullOrUndefined()) {\n    if (!no_sync_val.isBoolean()) {\n      api::throw_error(cx, api::Errors::TypeError, \"KVStore.list\", \"noSync\", \"be a boolean\");\n      return false;\n    }\n    no_sync = no_sync_val.toBoolean();\n  }\n\n  auto res = kv_store(self).list(cursor, limit, prefix, no_sync);\n  if (auto *err = res.to_err()) {\n    // Ensure that we throw an exception for all unexpected host errors.\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  auto handle = res.unwrap();\n\n  JS::RootedObject result_promise(cx, JS::NewPromiseObject(cx, nullptr));\n  if (!result_promise) {\n    return false;\n  }\n  JS::RootedValue result_promise_val(cx, JS::ObjectValue(*result_promise));\n\n  auto task = new FastlyAsyncTask(handle, self, result_promise_val, process_pending_kv_store_list);\n  ENGINE->queue_async_task(task);\n\n  args.rval().setObject(*result_promise);\n  return true;\n}\n\nconst JSFunctionSpec KVStore::static_methods[] = {\n    JS_FS_END,\n};\n\nconst JSPropertySpec KVStore::static_properties[] = {\n    JS_PS_END,\n};\n\nconst JSFunctionSpec KVStore::methods[] = {\n    JS_FN(\"delete\", delete_, 1, JSPROP_ENUMERATE),\n    JS_FN(\"get\", get, 1, JSPROP_ENUMERATE),\n    JS_FN(\"put\", put, 1, JSPROP_ENUMERATE),\n    JS_FN(\"list\", list, 1, JSPROP_ENUMERATE),\n    JS_FS_END,\n};\n\nconst JSPropertySpec KVStore::properties[] = {\n    JS_PS_END,\n};\n\nbool KVStore::constructor(JSContext *cx, unsigned argc, JS::Value *vp) {\n  REQUEST_HANDLER_ONLY(\"The KVStore builtin\");\n  CTOR_HEADER(\"KVStore\", 1);\n\n  JS::HandleValue name_arg = args.get(0);\n\n  // Convert into a String following https://tc39.es/ecma262/#sec-tostring\n  auto name = core::encode(cx, name_arg);\n  if (!name) {\n    return false;\n  }\n\n  // If the converted string has a length of 0 then we throw an Error\n  // because KVStore names have to be at-least 1 character.\n  if (name.len == 0) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_KV_STORE_NAME_EMPTY);\n    return false;\n  }\n\n  // If the converted string has a length of more than 255 then we throw an Error\n  // because KVStore names have to be less than 255 characters.\n  if (name.len > 255) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_KV_STORE_NAME_TOO_LONG);\n    return false;\n  }\n\n  if (std::any_of(name.begin(), name.end(), [](auto character) {\n        return std::iscntrl(static_cast<unsigned char>(character)) != 0;\n      })) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                              JSMSG_KV_STORE_NAME_NO_CONTROL_CHARACTERS);\n    return false;\n  }\n\n  auto res = host_api::KVStore::open(name);\n  if (auto *err = res.to_err()) {\n    if (host_api::error_is_invalid_argument(*err)) {\n      JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_KV_STORE_DOES_NOT_EXIST,\n                                name.begin());\n      return false;\n    } else {\n      HANDLE_ERROR(cx, *err);\n      return false;\n    }\n  }\n\n  JS::RootedObject kv_store(cx, JS_NewObjectForConstructor(cx, &class_, args));\n  if (!kv_store) {\n    return false;\n  }\n  JS::SetReservedSlot(kv_store, static_cast<uint32_t>(Slots::KVStore),\n                      JS::Int32Value(res.unwrap().handle));\n  args.rval().setObject(*kv_store);\n  return true;\n}\n\nbool install(api::Engine *engine) {\n  ENGINE = engine;\n  if (!KVStore::init_class_impl(engine->cx(), engine->global())) {\n    return false;\n  }\n  if (!KVStoreEntry::init_class_impl(engine->cx(), engine->global())) {\n    return false;\n  }\n  RootedValue kv_store_val(engine->cx());\n  if (!JS_GetProperty(engine->cx(), engine->global(), \"KVStore\", &kv_store_val)) {\n    return false;\n  }\n  RootedObject kv_store_ns(engine->cx(), JS_NewObject(engine->cx(), nullptr));\n  if (!JS_SetProperty(engine->cx(), kv_store_ns, \"KVStore\", kv_store_val)) {\n    return false;\n  }\n  RootedValue kv_store_ns_val(engine->cx(), JS::ObjectValue(*kv_store_ns));\n  if (!engine->define_builtin_module(\"fastly:kv-store\", kv_store_ns_val)) {\n    return false;\n  }\n\n  return true;\n}\n\n} // namespace fastly::kv_store\n"
  },
  {
    "path": "runtime/fastly/builtins/kv-store.h",
    "content": "#ifndef FASTLY_KV_STORE_H\n#define FASTLY_KV_STORE_H\n\n#include \"../host-api/host_api_fastly.h\"\n#include \"./fetch/request-response.h\"\n#include \"builtin.h\"\n\n#define HANDLE_KV_ERROR(cx, err, err_type)                                                         \\\n  ::host_api::handle_kv_error(cx, err, err_type, __LINE__, __func__)\n\nnamespace fastly::kv_store {\n\nclass KVStoreEntry final : public builtins::BuiltinImpl<KVStoreEntry> {\n  template <fetch::RequestOrResponse::BodyReadResult result_type>\n  static bool bodyAll(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool body_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool bodyUsed_get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool metadata(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool metadata_text(JSContext *cx, unsigned argc, JS::Value *vp);\n\npublic:\n  static constexpr const char *class_name = \"KVStoreEntry\";\n\n  enum class Slots {\n    Request = static_cast<int>(fetch::RequestOrResponse::Slots::RequestOrResponse),\n    Body = static_cast<int>(fetch::RequestOrResponse::Slots::Body),\n    BodyStream = static_cast<int>(fetch::RequestOrResponse::Slots::BodyStream),\n    HasBody = static_cast<int>(fetch::RequestOrResponse::Slots::HasBody),\n    BodyUsed = static_cast<int>(fetch::RequestOrResponse::Slots::BodyUsed),\n    Headers = static_cast<int>(fetch::RequestOrResponse::Slots::Headers),\n    URL = static_cast<int>(fetch::RequestOrResponse::Slots::URL),\n    ManualFramingHeaders = static_cast<int>(fetch::RequestOrResponse::Slots::ManualFramingHeaders),\n    Backend = static_cast<int>(fetch::RequestOrResponse::Slots::Backend),\n    Method = static_cast<int>(fetch::RequestOrResponse::Slots::Count),\n    Metadata,\n    Count,\n  };\n  static const JSFunctionSpec static_methods[];\n  static const JSPropertySpec static_properties[];\n  static const JSFunctionSpec methods[];\n  static const JSPropertySpec properties[];\n\n  static const unsigned ctor_length = 0;\n\n  static bool init_class(JSContext *cx, JS::HandleObject global);\n  static bool constructor(JSContext *cx, unsigned argc, JS::Value *vp);\n  static JSObject *create(JSContext *cx, host_api::HttpBody body_handle,\n                          host_api::HostBytes metadata);\n};\n\nclass KVStore final : public builtins::BuiltinImpl<KVStore> {\n  static bool delete_(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool put(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool list(JSContext *cx, unsigned argc, JS::Value *vp);\n\npublic:\n  static constexpr const char *class_name = \"KVStore\";\n  enum class Slots {\n    KVStore,\n    Count,\n  };\n  static const JSFunctionSpec static_methods[];\n  static const JSPropertySpec static_properties[];\n  static const JSFunctionSpec methods[];\n  static const JSPropertySpec properties[];\n\n  static const unsigned ctor_length = 1;\n\n  static bool constructor(JSContext *cx, unsigned argc, JS::Value *vp);\n};\n\n} // namespace fastly::kv_store\n\n#endif\n"
  },
  {
    "path": "runtime/fastly/builtins/logger.cpp",
    "content": "#include \"logger.h\"\n#include \"../../../StarlingMonkey/runtime/encode.h\"\n#include \"../host-api/host_api_fastly.h\"\n\nnamespace builtins::web::console {\n\nclass Console : public BuiltinNoConstructor<Console> {\nprivate:\npublic:\n  static constexpr const char *class_name = \"Console\";\n  enum LogType {\n    Log,\n    Info,\n    Debug,\n    Warn,\n    Error,\n  };\n  enum Slots { Count };\n  static const JSFunctionSpec methods[];\n  static const JSPropertySpec properties[];\n};\n\nbool write_stderr = false;\nbool write_prefix = false;\n\nvoid builtin_impl_console_log(Console::LogType log_ty, const char *msg) {\n  FILE *output = stdout;\n  if (write_stderr) {\n    if (log_ty == Console::LogType::Warn || log_ty == Console::LogType::Error) {\n      output = stderr;\n    }\n  }\n  if (write_prefix) {\n    const char *prefix = \"\";\n    switch (log_ty) {\n    case Console::LogType::Log:\n      prefix = \"Log\";\n      break;\n    case Console::LogType::Debug:\n      prefix = \"Debug\";\n      break;\n    case Console::LogType::Info:\n      prefix = \"Info\";\n      break;\n    case Console::LogType::Warn:\n      prefix = \"Warn\";\n      break;\n    case Console::LogType::Error:\n      prefix = \"Error\";\n      break;\n    }\n    fprintf(output, \"%s: %s\\n\", prefix, msg);\n    fflush(output);\n  } else {\n    fprintf(output, \"%s\\n\", msg);\n    fflush(output);\n  }\n}\n\n} // namespace builtins::web::console\n\nnamespace fastly::logger {\n\nbool Logger::log(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(1)\n\n  JS::RootedValue endpoint_id(cx, JS::GetReservedSlot(self, Slots::Endpoint));\n\n  // If the endpoint has not yet been loaded up, do it now, throwing any endpoint error for the\n  // first log.\n  if (endpoint_id.isNull()) {\n    JS::RootedString endpoint_name(cx, JS::GetReservedSlot(self, Slots::EndpointName).toString());\n    auto endpoint_name_str = core::encode(cx, endpoint_name);\n    if (!endpoint_name_str) {\n      return false;\n    }\n\n    auto res = host_api::LogEndpoint::get(\n        std::string_view{endpoint_name_str.ptr.get(), endpoint_name_str.len});\n    if (auto *err = res.to_err()) {\n      HANDLE_ERROR(cx, *err);\n      return false;\n    }\n\n    endpoint_id.set(JS::Int32Value(res.unwrap().handle));\n    JS::SetReservedSlot(self, Slots::Endpoint, endpoint_id);\n\n    MOZ_ASSERT(endpoint_id.isInt32());\n  }\n\n  host_api::LogEndpoint endpoint(endpoint_id.toInt32());\n\n  auto msg = core::encode(cx, args.get(0));\n  if (!msg) {\n    return false;\n  }\n\n  auto res = endpoint.write(msg);\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  args.rval().setUndefined();\n  return true;\n}\n\nconst JSFunctionSpec Logger::static_methods[] = {\n    JS_FS_END,\n};\n\nconst JSPropertySpec Logger::static_properties[] = {\n    JS_PS_END,\n};\n\nconst JSFunctionSpec Logger::methods[] = {JS_FN(\"log\", log, 1, JSPROP_ENUMERATE), JS_FS_END};\n\nconst JSPropertySpec Logger::properties[] = {JS_PS_END};\n\nJSObject *Logger::create(JSContext *cx, JS::HandleValue endpoint_name) {\n  JS::RootedObject logger(cx, JS_NewObjectWithGivenProto(cx, &class_, proto_obj));\n  if (!logger) {\n    return nullptr;\n  }\n  JS::SetReservedSlot(logger, Slots::Endpoint, JS::NullValue());\n  JS::SetReservedSlot(logger, Slots::EndpointName, endpoint_name);\n  return logger;\n}\n\nbool Logger::constructor(JSContext *cx, unsigned argc, JS::Value *vp) {\n  CTOR_HEADER(\"Logger\", 1);\n  auto logger = Logger::create(cx, args[0]);\n  args.rval().setObject(*logger);\n  return true;\n}\n\nbool configure_console(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = JS::CallArgsFromVp(argc, vp);\n\n  // Check if we have at least one argument and it's an object\n  if (args.length() < 1 || !args[0].isObject()) {\n    JS_ReportErrorUTF8(cx, \"configureConsole requires an options object as its argument\");\n    return false;\n  }\n\n  // Get the options object\n  JS::RootedObject options(cx, &args[0].toObject());\n  JS::RootedValue val(cx);\n\n  // Handle prefixing option\n  if (JS_GetProperty(cx, options, \"prefixing\", &val)) {\n    if (!val.isUndefined()) {\n      if (!val.isBoolean()) {\n        JS_ReportErrorUTF8(cx, \"prefixing option must be a boolean\");\n        return false;\n      }\n      builtins::web::console::write_prefix = val.toBoolean();\n    }\n  } else {\n    return false;\n  }\n\n  // Handle stderr option\n  if (JS_GetProperty(cx, options, \"stderr\", &val)) {\n    if (!val.isUndefined()) {\n      if (!val.isBoolean()) {\n        JS_ReportErrorUTF8(cx, \"stderr option must be a boolean\");\n        return false;\n      }\n      builtins::web::console::write_stderr = val.toBoolean();\n    }\n  } else {\n    return false;\n  }\n\n  // Set the return value to undefined\n  args.rval().setUndefined();\n  return true;\n}\n\nbool install(api::Engine *engine) {\n  if (!Logger::init_class_impl(engine->cx(), engine->global())) {\n    return false;\n  }\n\n  RootedObject logger_ns_obj(engine->cx(), JS_NewObject(engine->cx(), nullptr));\n  RootedValue logger_ns_val(engine->cx(), JS::ObjectValue(*logger_ns_obj));\n  RootedObject logger_obj(engine->cx(), JS_GetConstructor(engine->cx(), Logger::proto_obj));\n  RootedValue logger_val(engine->cx(), ObjectValue(*logger_obj));\n  if (!JS_SetProperty(engine->cx(), logger_ns_obj, \"Logger\", logger_val)) {\n    return false;\n  }\n  auto configure_console_fn =\n      JS_NewFunction(engine->cx(), &configure_console, 1, 0, \"configureConsole\");\n  RootedObject configure_console_obj(engine->cx(), JS_GetFunctionObject(configure_console_fn));\n  RootedValue configure_console_val(engine->cx(), ObjectValue(*configure_console_obj));\n  if (!JS_SetProperty(engine->cx(), logger_ns_obj, \"configureConsole\", configure_console_val)) {\n    return false;\n  }\n  if (!JS_SetProperty(engine->cx(), logger_obj, \"configureConsole\", configure_console_val)) {\n    return false;\n  }\n  if (!engine->define_builtin_module(\"fastly:logger\", logger_ns_val)) {\n    return false;\n  }\n\n  return true;\n}\n\n} // namespace fastly::logger\n"
  },
  {
    "path": "runtime/fastly/builtins/logger.h",
    "content": "#ifndef FASTLY_LOGGER_H\n#define FASTLY_LOGGER_H\n\n#include \"builtin.h\"\n#include \"extension-api.h\"\n\nnamespace fastly::logger {\n\nclass Logger : public builtins::BuiltinImpl<Logger> {\nprivate:\n  static bool log(JSContext *cx, unsigned argc, JS::Value *vp);\n\npublic:\n  static constexpr const char *class_name = \"Logger\";\n  static const int ctor_length = 1;\n\n  enum Slots { Endpoint, EndpointName, Count };\n  static const JSFunctionSpec static_methods[];\n  static const JSPropertySpec static_properties[];\n  static const JSFunctionSpec methods[];\n  static const JSPropertySpec properties[];\n\n  static JSObject *create(JSContext *cx, JS::HandleValue endpoint_name);\n  static bool constructor(JSContext *cx, unsigned argc, JS::Value *vp);\n};\n\n} // namespace fastly::logger\n\n#endif\n"
  },
  {
    "path": "runtime/fastly/builtins/secret-store.cpp",
    "content": "#include \"secret-store.h\"\n#include \"../../../StarlingMonkey/runtime/encode.h\"\n#include \"../common/validations.h\"\n#include \"../host-api/host_api_fastly.h\"\n#include \"fastly.h\"\n\nusing fastly::FastlyGetErrorMessage;\nusing fastly::common::validate_bytes;\n\nnamespace fastly::secret_store {\n\nhost_api::Secret SecretStoreEntry::secret_handle(JSObject *obj) {\n  JS::Value val = JS::GetReservedSlot(obj, SecretStoreEntry::Slots::Handle);\n  return host_api::Secret(val.toInt32());\n}\n\nbool SecretStoreEntry::plaintext(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  // Ensure that we throw an exception for all unexpected host errors.\n  auto res = SecretStoreEntry::secret_handle(self).plaintext();\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  auto ret = std::move(res.unwrap());\n  if (!ret.has_value()) {\n    return false;\n  }\n\n  JS::RootedString text(\n      cx,\n      JS_NewStringCopyUTF8N(cx, JS::UTF8Chars(reinterpret_cast<char *>(ret->ptr.get()), ret->len)));\n  if (!text) {\n    return false;\n  }\n\n  args.rval().setString(text);\n  return true;\n}\n\nbool SecretStoreEntry::raw_bytes(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n\n  // Ensure that we throw an exception for all unexpected host errors.\n  auto res = SecretStoreEntry::secret_handle(self).plaintext();\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  auto ret = std::move(res.unwrap());\n  if (!ret.has_value()) {\n    return false;\n  }\n\n  JS::RootedObject array_buffer(\n      cx, JS::NewArrayBufferWithContents(cx, ret->len, ret->ptr.get(),\n                                         JS::NewArrayBufferOutOfMemory::CallerMustFreeMemory));\n  if (!array_buffer) {\n    JS_ReportOutOfMemory(cx);\n    return false;\n  }\n\n  // `array_buffer` now owns `metadata`\n  static_cast<void>(ret->ptr.release());\n\n  JS::RootedObject uint8_array(cx, JS_NewUint8ArrayWithBuffer(cx, array_buffer, 0, ret->len));\n\n  args.rval().setObject(*uint8_array);\n\n  return true;\n}\n\nconst JSFunctionSpec SecretStoreEntry::static_methods[] = {\n    JS_FS_END,\n};\n\nconst JSPropertySpec SecretStoreEntry::static_properties[] = {\n    JS_PS_END,\n};\n\nconst JSFunctionSpec SecretStoreEntry::methods[] = {\n    JS_FN(\"plaintext\", plaintext, 0, JSPROP_ENUMERATE),\n    JS_FN(\"rawBytes\", raw_bytes, 0, JSPROP_ENUMERATE), JS_FS_END};\n\nconst JSPropertySpec SecretStoreEntry::properties[] = {JS_PS_END};\n\nbool SecretStoreEntry::constructor(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS_ReportErrorUTF8(cx, \"SecretStoreEntry can't be instantiated directly\");\n  return false;\n}\n\nJSObject *SecretStoreEntry::create(JSContext *cx, host_api::Secret secret) {\n  JS::RootedObject entry(\n      cx, JS_NewObjectWithGivenProto(cx, &SecretStoreEntry::class_, SecretStoreEntry::proto_obj));\n  if (!entry) {\n    return nullptr;\n  }\n\n  JS::SetReservedSlot(entry, Slots::Handle, JS::Int32Value(secret.handle));\n\n  return entry;\n}\n\nhost_api::SecretStore SecretStore::secret_store_handle(JSObject *obj) {\n  JS::Value val = JS::GetReservedSlot(obj, SecretStore::Slots::Handle);\n  return host_api::SecretStore(val.toInt32());\n}\n\nbool SecretStore::get(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(1)\n\n  JS::RootedObject result_promise(cx, JS::NewPromiseObject(cx, nullptr));\n  if (!result_promise) {\n    return ReturnPromiseRejectedWithPendingError(cx, args);\n  }\n\n  auto key = core::encode(cx, args[0]);\n  if (!key) {\n    return false;\n  }\n  // If the converted string has a length of 0 then we throw an Error\n  // because keys have to be at-least 1 character.\n  if (key.len == 0) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_SECRET_STORE_KEY_EMPTY);\n    return ReturnPromiseRejectedWithPendingError(cx, args);\n  }\n\n  // key has to be less than 256\n  if (key.len > 255) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_SECRET_STORE_KEY_TOO_LONG);\n    return ReturnPromiseRejectedWithPendingError(cx, args);\n  }\n\n  // key must contain only letters, numbers, dashes (-), underscores (_), and periods (.).\n  auto is_valid_key = std::all_of(key.begin(), key.end(), [&](auto character) {\n    return std::isalnum(character) || character == '_' || character == '-' || character == '.';\n  });\n\n  if (!is_valid_key) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                              JSMSG_SECRET_STORE_KEY_CONTAINS_INVALID_CHARACTER);\n    return ReturnPromiseRejectedWithPendingError(cx, args);\n  }\n\n  // Ensure that we throw an exception for all unexpected host errors.\n  auto get_res = SecretStore::secret_store_handle(self).get(key);\n  if (auto *err = get_res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return ReturnPromiseRejectedWithPendingError(cx, args);\n  }\n\n  // When no entry is found, we are going to resolve the Promise with `null`.\n  auto secret = get_res.unwrap();\n  if (!secret.has_value()) {\n    JS::RootedValue result(cx);\n    result.setNull();\n    JS::ResolvePromise(cx, result_promise, result);\n  } else {\n    JS::RootedObject entry(cx, SecretStoreEntry::create(cx, *secret));\n    if (!entry) {\n      return ReturnPromiseRejectedWithPendingError(cx, args);\n    }\n    JS::RootedValue result(cx);\n    result.setObject(*entry);\n    JS::ResolvePromise(cx, result_promise, result);\n  }\n\n  args.rval().setObject(*result_promise);\n\n  return true;\n}\n\nbool SecretStore::from_bytes(JSContext *cx, unsigned argc, JS::Value *vp) {\n  JS::CallArgs args = JS::CallArgsFromVp(argc, vp);\n  if (!args.requireAtLeast(cx, \"SecretStore.fromBytes\", 1)) {\n    return false;\n  }\n\n  JS::RootedObject entry(\n      cx, JS_NewObjectWithGivenProto(cx, &SecretStoreEntry::class_, SecretStoreEntry::proto_obj));\n  if (!entry) {\n    return false;\n  }\n\n  auto bytes = args.get(0);\n\n  auto maybe_byte_data = validate_bytes(cx, bytes, \"SecretStore.fromBytes\");\n  if (!maybe_byte_data) {\n    return false;\n  }\n  auto &[data, len, noGC] = *maybe_byte_data;\n  auto res = host_api::SecretStore::from_bytes(data, len);\n  noGC.reset();\n  if (auto *err = res.to_err()) {\n    HANDLE_ERROR(cx, *err);\n    return false;\n  }\n\n  JS::SetReservedSlot(entry, Slots::Handle, JS::Int32Value(res.unwrap().handle));\n  args.rval().setObject(*entry);\n  return true;\n}\n\nconst JSFunctionSpec SecretStore::static_methods[] = {\n    JS_FN(\"fromBytes\", from_bytes, 1, JSPROP_ENUMERATE),\n    JS_FS_END,\n};\n\nconst JSPropertySpec SecretStore::static_properties[] = {\n    JS_PS_END,\n};\n\nconst JSFunctionSpec SecretStore::methods[] = {JS_FN(\"get\", get, 1, JSPROP_ENUMERATE), JS_FS_END};\n\nconst JSPropertySpec SecretStore::properties[] = {JS_PS_END};\n\nbool SecretStore::constructor(JSContext *cx, unsigned argc, JS::Value *vp) {\n  REQUEST_HANDLER_ONLY(\"The SecretStore builtin\");\n  CTOR_HEADER(\"SecretStore\", 1);\n\n  auto name = core::encode(cx, args[0]);\n  if (!name) {\n    return false;\n  }\n\n  // If the converted string has a length of 0 then we throw an Error\n  // because names have to be at-least 1 character.\n  if (name.len == 0) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_SECRET_STORE_NAME_EMPTY);\n    return false;\n  }\n\n  // If the converted string has a length of more than 255 then we throw an Error\n  // because names have to be less than 255 characters.\n  if (name.len > 255) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_SECRET_STORE_NAME_TOO_LONG);\n    return false;\n  }\n\n  // Name must contain only letters, numbers, dashes (-), underscores (_), and periods (.).\n  auto is_valid_name = std::all_of(name.begin(), name.end(), [&](auto character) {\n    return std::isalnum(character) || character == '_' || character == '-' || character == '.';\n  });\n\n  if (!is_valid_name) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                              JSMSG_SECRET_STORE_NAME_CONTAINS_INVALID_CHARACTER);\n    return false;\n  }\n\n  JS::RootedObject secret_store(cx, JS_NewObjectForConstructor(cx, &class_, args));\n  if (!secret_store) {\n    return false;\n  }\n\n  auto res = host_api::SecretStore::open(name);\n  if (auto *err = res.to_err()) {\n    if (host_api::error_is_optional_none(*err)) {\n      JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr,\n                                JSMSG_SECRET_STORE_DOES_NOT_EXIST, name.begin());\n      return false;\n    } else {\n      HANDLE_ERROR(cx, *err);\n      return false;\n    }\n  }\n\n  JS::SetReservedSlot(secret_store, SecretStore::Slots::Handle,\n                      JS::Int32Value(res.unwrap().handle));\n  args.rval().setObject(*secret_store);\n  return true;\n}\n\nbool install(api::Engine *engine) {\n  if (!SecretStoreEntry::init_class_impl(engine->cx(), engine->global())) {\n    return false;\n  }\n  if (!SecretStore::init_class_impl(engine->cx(), engine->global())) {\n    return false;\n  }\n\n  RootedObject secret_store_ns_obj(engine->cx(), JS_NewObject(engine->cx(), nullptr));\n  RootedValue secret_store_ns_val(engine->cx(), JS::ObjectValue(*secret_store_ns_obj));\n  RootedObject secret_store_obj(engine->cx(),\n                                JS_GetConstructor(engine->cx(), SecretStore::proto_obj));\n  RootedValue secret_store_val(engine->cx(), ObjectValue(*secret_store_obj));\n  if (!JS_SetProperty(engine->cx(), secret_store_ns_obj, \"SecretStore\", secret_store_val)) {\n    return false;\n  }\n  RootedObject secret_store_entry_obj(engine->cx(),\n                                      JS_GetConstructor(engine->cx(), SecretStoreEntry::proto_obj));\n  RootedValue secret_store_entry_val(engine->cx(), ObjectValue(*secret_store_entry_obj));\n  if (!JS_SetProperty(engine->cx(), secret_store_ns_obj, \"SecretStoreEntry\",\n                      secret_store_entry_val)) {\n    return false;\n  }\n  if (!engine->define_builtin_module(\"fastly:secret-store\", secret_store_ns_val)) {\n    return false;\n  }\n\n  return true;\n}\n\n} // namespace fastly::secret_store\n"
  },
  {
    "path": "runtime/fastly/builtins/secret-store.h",
    "content": "#ifndef FASTLY_SECRET_STORE_H\n#define FASTLY_SECRET_STORE_H\n\n#include \"../host-api/host_api_fastly.h\"\n#include \"builtin.h\"\n#include \"extension-api.h\"\n\nnamespace fastly::secret_store {\n\nclass SecretStoreEntry : public builtins::BuiltinImpl<SecretStoreEntry> {\nprivate:\npublic:\n  static constexpr const char *class_name = \"SecretStoreEntry\";\n  static const int ctor_length = 0;\n  enum Slots { Handle, Count };\n  static const JSFunctionSpec static_methods[];\n  static const JSPropertySpec static_properties[];\n  static const JSFunctionSpec methods[];\n  static const JSPropertySpec properties[];\n\n  static bool plaintext(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool raw_bytes(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  static host_api::Secret secret_handle(JSObject *obj);\n  static bool constructor(JSContext *cx, unsigned argc, JS::Value *vp);\n  static JSObject *create(JSContext *cx, host_api::Secret handle);\n};\n\nclass SecretStore : public builtins::BuiltinImpl<SecretStore> {\nprivate:\npublic:\n  static constexpr const char *class_name = \"SecretStore\";\n  static const int ctor_length = 1;\n  enum Slots { Handle, Count };\n  static const JSFunctionSpec static_methods[];\n  static const JSPropertySpec static_properties[];\n  static const JSFunctionSpec methods[];\n  static const JSPropertySpec properties[];\n\n  static bool get(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool from_bytes(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  static host_api::SecretStore secret_store_handle(JSObject *obj);\n  static bool constructor(JSContext *cx, unsigned argc, JS::Value *vp);\n};\n\n} // namespace fastly::secret_store\n\n#endif\n"
  },
  {
    "path": "runtime/fastly/builtins/shielding.cpp",
    "content": "#include \"shielding.h\"\n#include \"../../../StarlingMonkey/runtime/encode.h\"\n#include \"../common/validations.h\"\n#include \"../host-api/host_api_fastly.h\"\n#include \"backend.h\"\n#include \"fastly.h\"\n\nnamespace fastly::shielding {\nconst uint64_t MAX_BACKEND_TIMEOUT = 0x100000000;\n\nconst JSFunctionSpec Shield::static_methods[] = {\n    JS_FS_END,\n};\n\nconst JSPropertySpec Shield::static_properties[] = {\n    JS_PS_END,\n};\n\nconst JSFunctionSpec Shield::methods[] = {\n    JS_FN(\"runningOn\", runningOn, 0, JSPROP_ENUMERATE),\n    JS_FN(\"unencryptedBackend\", unencryptedBackend, 0, JSPROP_ENUMERATE),\n    JS_FN(\"encryptedBackend\", encryptedBackend, 0, JSPROP_ENUMERATE), JS_FS_END};\n\nconst JSPropertySpec Shield::properties[] = {JS_PS_END};\n\nbool Shield::runningOn(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0);\n  bool is_me = JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::IsMe)).toBoolean();\n  args.rval().setBoolean(is_me);\n  return true;\n}\nbool Shield::unencryptedBackend(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n  JS::RootedString target(\n      cx, JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::PlainTarget)).toString());\n  return backend_for_shield(cx, target, args.rval(), args.get(0));\n}\nbool Shield::encryptedBackend(JSContext *cx, unsigned argc, JS::Value *vp) {\n  METHOD_HEADER(0)\n  JS::RootedString target(\n      cx, JS::GetReservedSlot(self, static_cast<uint32_t>(Slots::SSLTarget)).toString());\n  return backend_for_shield(cx, target, args.rval(), args.get(0));\n}\nbool Shield::backend_for_shield(JSContext *cx, JS::HandleString target, JS::MutableHandleValue rval,\n                                JS::HandleValue config) {\n  auto name = core::encode(cx, target);\n  fastly_shielding_shield_backend_config host_config{nullptr, 0, 0};\n\n  if (config.isObject()) {\n    JS::RootedObject configObj(cx, &config.toObject());\n    // Timeouts for backends must be less than 2^32 milliseconds, or\n    // about a month and a half.\n    JS::RootedValue first_byte_timeout_val(cx);\n    bool found;\n    if (!JS_HasProperty(cx, configObj, \"firstByteTimeout\", &found)) {\n      return false;\n    }\n    if (found) {\n      if (!JS_GetProperty(cx, configObj, \"firstByteTimeout\", &first_byte_timeout_val)) {\n        return false;\n      }\n      auto parsed =\n          common::parse_and_validate_timeout(cx, first_byte_timeout_val, \"Backend for shield\",\n                                             \"firstByteTimeout\", MAX_BACKEND_TIMEOUT);\n      if (!parsed) {\n        return false;\n      }\n      host_config.first_byte_timeout_ms = parsed.value();\n    }\n  }\n\n  auto options_mask = 0;\n  std::uint32_t backend_name_size_out = 0;\n  constexpr std::size_t max_backend_name_size = 1024;\n  std::string backend_name_out(max_backend_name_size, 0);\n  auto status = fastly_shielding_backend_for_shield(name.ptr.get(), name.len, options_mask,\n                                                    &host_config, backend_name_out.data(),\n                                                    max_backend_name_size, &backend_name_size_out);\n  if (status != 0) {\n    HANDLE_ERROR(cx, status);\n    return false;\n  }\n  backend_name_out.resize(backend_name_size_out);\n  host_api::HostString backend_name(backend_name_out);\n  return backend::Backend::get_from_valid_name(cx, std::move(backend_name), rval);\n}\n\nbool Shield::constructor(JSContext *cx, unsigned argc, JS::Value *vp) {\n  REQUEST_HANDLER_ONLY(\"The Shield builtin\");\n  CTOR_HEADER(\"Shield\", 1);\n\n  JS::HandleValue name_arg = args.get(0);\n  auto name = core::encode(cx, name_arg);\n\n  // Keep calling fastly_shielding_shield_info with a increasingly large buffer until it returns OK\n  std::uint32_t buf_size = 1024;\n  std::vector<char> out_buf(buf_size);\n  while (true) {\n    std::uint32_t used_amount = 0;\n    auto status = fastly_shielding_shield_info(name.ptr.get(), name.len, out_buf.data(), buf_size,\n                                               &used_amount);\n    if (status == 0) {\n      out_buf.resize(used_amount);\n      break;\n    } else if (status == FASTLY_HOST_ERROR_BUFFER_LEN) {\n      buf_size *= 2;\n      out_buf = std::vector<char>(buf_size);\n    } else {\n      HANDLE_ERROR(cx, status);\n      return false;\n    }\n  }\n\n  if (out_buf.size() < 3) {\n    JS_ReportErrorASCII(cx, \"Shield: invalid response from host\");\n    return false;\n  }\n\n  JS::RootedObject self(cx, JS_NewObjectWithGivenProto(cx, &class_, proto_obj));\n  if (!self) {\n    return false;\n  }\n\n  bool is_me = out_buf[0] != 0;\n  JS_SetReservedSlot(self, static_cast<uint32_t>(Slots::IsMe), JS::BooleanValue(is_me));\n\n  JS::RootedString plain_target(cx, JS_NewStringCopyZ(cx, out_buf.data() + 1));\n  if (!plain_target) {\n    return false;\n  }\n  JS_SetReservedSlot(self, static_cast<uint32_t>(Slots::PlainTarget),\n                     JS::StringValue(plain_target));\n\n  auto plain_bytes_end = std::find(begin(out_buf) + 1, end(out_buf), 0);\n  if (plain_bytes_end == end(out_buf) || plain_bytes_end + 1 == end(out_buf)) {\n    JS_ReportErrorASCII(cx, \"Shield: invalid response from host\");\n    return false;\n  }\n  JS::RootedString ssl_target(cx, JS_NewStringCopyZ(cx, &*plain_bytes_end + 1));\n  if (!ssl_target) {\n    return false;\n  }\n  JS_SetReservedSlot(self, static_cast<uint32_t>(Slots::SSLTarget), JS::StringValue(ssl_target));\n\n  args.rval().setObject(*self);\n  return true;\n}\n\nbool install(api::Engine *engine) {\n  RootedObject shielding_ns(engine->cx(), JS_NewObject(engine->cx(), nullptr));\n  if (!Shield::init_class_impl(engine->cx(), shielding_ns)) {\n    return false;\n  }\n  RootedObject shield_obj(engine->cx(), JS_GetConstructor(engine->cx(), Shield::proto_obj));\n  RootedValue shield_val(engine->cx(), ObjectValue(*shield_obj));\n  if (!JS_SetProperty(engine->cx(), shielding_ns, \"Shield\", shield_val)) {\n    return false;\n  }\n\n  RootedValue shielding_ns_val(engine->cx(), JS::ObjectValue(*shielding_ns));\n  if (!engine->define_builtin_module(\"fastly:shielding\", shielding_ns_val)) {\n    return false;\n  }\n\n  RootedObject fastly(engine->cx());\n  if (!fastly::get_fastly_object(engine, &fastly)) {\n    return false;\n  }\n  if (!JS_SetProperty(engine->cx(), fastly, \"shielding\", shielding_ns_val)) {\n    return false;\n  }\n\n  return true;\n}\n\n} // namespace fastly::shielding\n"
  },
  {
    "path": "runtime/fastly/builtins/shielding.h",
    "content": "#ifndef FASTLY_SHIELDING_H\n#define FASTLY_SHIELDING_H\n\n#include \"../host-api/host_api_fastly.h\"\n#include \"builtin.h\"\n#include \"extension-api.h\"\n\nnamespace fastly::shielding {\n\nclass Shield : public builtins::BuiltinImpl<Shield> {\nprivate:\n  static bool backend_for_shield(JSContext *cx, JS::HandleString target,\n                                 JS::MutableHandleValue rval, JS::HandleValue config);\n\npublic:\n  static constexpr const char *class_name = \"Shield\";\n  static const int ctor_length = 0;\n  enum Slots { IsMe, PlainTarget, SSLTarget, Count };\n  static const JSFunctionSpec static_methods[];\n  static const JSPropertySpec static_properties[];\n  static const JSFunctionSpec methods[];\n  static const JSPropertySpec properties[];\n\n  static bool runningOn(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool unencryptedBackend(JSContext *cx, unsigned argc, JS::Value *vp);\n  static bool encryptedBackend(JSContext *cx, unsigned argc, JS::Value *vp);\n\n  static bool constructor(JSContext *cx, unsigned argc, JS::Value *vp);\n};\n\n} // namespace fastly::shielding\n\n#endif\n"
  },
  {
    "path": "runtime/fastly/common/ip_octets_to_js_string.cpp",
    "content": "#include <arpa/inet.h>\n\n#include \"builtin.h\"\n#include \"extension-api.h\"\n#include \"host_api.h\"\n\nnamespace fastly::common {\n\nJSString *ip_octets_to_js_string(JSContext *cx, host_api::HostBytes octets) {\n  char address_chars[INET6_ADDRSTRLEN];\n  int addr_family = 0;\n  socklen_t size = 0;\n\n  switch (octets.len) {\n  case 0: {\n    // No address to be had, leave `address` as a nullptr.\n    break;\n  }\n  case 4: {\n    addr_family = AF_INET;\n    size = INET_ADDRSTRLEN;\n    break;\n  }\n  case 16: {\n    addr_family = AF_INET6;\n    size = INET6_ADDRSTRLEN;\n    break;\n  }\n  }\n\n  JS::RootedString address(cx);\n  if (octets.len > 0) {\n    // TODO: do we need to do error handling here, or can we depend on the\n    // host giving us a valid address?\n    inet_ntop(addr_family, octets.begin(), address_chars, size);\n    address = JS_NewStringCopyZ(cx, address_chars);\n    if (!address) {\n      return nullptr;\n    }\n  }\n\n  return address;\n}\n\n} // namespace fastly::common\n"
  },
  {
    "path": "runtime/fastly/common/ip_octets_to_js_string.h",
    "content": "#ifndef FASTLY_IP_OCTETS_TO_JS_STRING_H\n#define FASTLY_IP_OCTETS_TO_JS_STRING_H\n\n#include <arpa/inet.h>\n\n#include \"builtin.h\"\n#include \"extension-api.h\"\n#include \"host_api.h\"\n\nnamespace fastly::common {\n\nJSString *ip_octets_to_js_string(JSContext *cx, host_api::HostBytes octets);\n\n} // namespace fastly::common\n\n#endif"
  },
  {
    "path": "runtime/fastly/common/normalize_http_method.cpp",
    "content": "#include <algorithm>\n#include <cctype>\n#include <string_view>\n\nnamespace fastly::common {\n\n// https://fetch.spec.whatwg.org/#concept-method-normalize\n// To normalize a method, if it is a byte-case-insensitive match for `DELETE`, `GET`, `HEAD`,\n// `OPTIONS`, `POST`, or `PUT`, byte-uppercase it.\nbool normalize_http_method(char *method, size_t length) {\n  // Ordered by most likely to occur.\n  constexpr std::string_view methods[] = {\"GET\", \"HEAD\", \"OPTIONS\", \"POST\", \"PUT\", \"DELETE\"};\n  std::string_view m(method, length);\n\n  auto iequal = [](unsigned char a, unsigned char b) { return std::toupper(a) == std::toupper(b); };\n\n  auto it = std::ranges::find_if(methods, [&](std::string_view candidate) {\n    return std::ranges::equal(m, candidate, iequal);\n  });\n\n  if (it == std::ranges::end(methods) || *it == m) {\n    return false; // not a recognized method, or already normalized\n  }\n\n  std::ranges::copy(*it, method); // copy the already-uppercase canonical form\n  return true;\n}\n} // namespace fastly::common"
  },
  {
    "path": "runtime/fastly/common/normalize_http_method.h",
    "content": "#ifndef FASTLY_NORMALIZE_HTTP_METHOD_H\n#define FASTLY_NORMALIZE_HTTP_METHOD_H\n\nnamespace fastly::common {\n// https://fetch.spec.whatwg.org/#concept-method-normalize\n// To normalize a method, if it is a byte-case-insensitive match for `DELETE`, `GET`, `HEAD`,\n// `OPTIONS`, `POST`, or `PUT`, byte-uppercase it.\n// Returns `true` if the method name was normalized, `false` otherwise.\nbool normalize_http_method(char *method, size_t length);\n} // namespace fastly::common\n\n#endif\n"
  },
  {
    "path": "runtime/fastly/common/sequence.hpp",
    "content": "#ifndef FASTLY_SEQUENCE_HPP\n#define FASTLY_SEQUENCE_HPP\n\n// TODO: remove these once the warnings are fixed\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Winvalid-offsetof\"\n#include \"jsapi.h\"\n#include \"jsfriendapi.h\"\n#include \"js/ForOfIterator.h\"\n#pragma clang diagnostic pop\n\nnamespace fastly::common {\n\ninline bool report_sequence_or_record_arg_error(JSContext *cx, const char *name,\n                                                const char *alt_text) {\n  JS_ReportErrorUTF8(cx,\n                     \"Failed to construct %s object. If defined, the first \"\n                     \"argument must be either a [ ['name', 'value'], ... ] sequence, \"\n                     \"or a { 'name' : 'value', ... } record%s.\",\n                     name, alt_text);\n  return false;\n}\n\n/**\n * Extract <key,value> pairs from the given value if it is either a\n * sequence<sequence<Value> or a record<Value, Value>.\n */\ntemplate <auto apply>\nbool maybe_consume_sequence_or_record(JSContext *cx, JS::HandleValue initv, JS::HandleObject target,\n                                      bool *consumed, const char *ctor_name,\n                                      const char *alt_text = \"\") {\n  if (initv.isUndefined()) {\n    *consumed = true;\n    return true;\n  }\n\n  JS::RootedValue key(cx);\n  JS::RootedValue value(cx);\n\n  // First, try consuming args[0] as a sequence<sequence<Value>>.\n  JS::ForOfIterator it(cx);\n  if (!it.init(initv, JS::ForOfIterator::AllowNonIterable))\n    return false;\n\n  // Note: this currently doesn't treat strings as iterable even though they\n  // are. We don't have any constructors that want to iterate over strings, and\n  // this makes things a lot easier.\n  if (initv.isObject() && it.valueIsIterable()) {\n    JS::RootedValue entry(cx);\n\n    while (true) {\n      bool done;\n      if (!it.next(&entry, &done))\n        return false;\n\n      if (done)\n        break;\n\n      if (!entry.isObject())\n        return report_sequence_or_record_arg_error(cx, ctor_name, alt_text);\n\n      JS::ForOfIterator entr_iter(cx);\n      if (!entr_iter.init(entry, JS::ForOfIterator::AllowNonIterable))\n        return false;\n\n      if (!entr_iter.valueIsIterable())\n        return report_sequence_or_record_arg_error(cx, ctor_name, alt_text);\n\n      {\n        bool done;\n\n        // Extract key.\n        if (!entr_iter.next(&key, &done))\n          return false;\n        if (done)\n          return report_sequence_or_record_arg_error(cx, ctor_name, alt_text);\n\n        // Extract value.\n        if (!entr_iter.next(&value, &done))\n          return false;\n        if (done)\n          return report_sequence_or_record_arg_error(cx, ctor_name, alt_text);\n\n        // Ensure that there aren't any further entries.\n        if (!entr_iter.next(&entry, &done))\n          return false;\n        if (!done)\n          return report_sequence_or_record_arg_error(cx, ctor_name, alt_text);\n\n        if (!apply(cx, target, key, value, ctor_name))\n          return false;\n      }\n    }\n    *consumed = true;\n  } else if (initv.isObject()) {\n    // init isn't an iterator, so if it's an object, it must be a record to be\n    // valid input.\n    JS::RootedObject init(cx, &initv.toObject());\n    JS::RootedIdVector ids(cx);\n    if (!js::GetPropertyKeys(cx, init, JSITER_OWNONLY | JSITER_SYMBOLS, &ids))\n      return false;\n\n    JS::RootedId curId(cx);\n    for (size_t i = 0; i < ids.length(); ++i) {\n      curId = ids[i];\n      key = js::IdToValue(curId);\n\n      if (!JS_GetPropertyById(cx, init, curId, &value))\n        return false;\n\n      if (!apply(cx, target, key, value, ctor_name))\n        return false;\n    }\n    *consumed = true;\n  } else {\n    *consumed = false;\n  }\n\n  return true;\n}\n\n}\n\n#endif\n"
  },
  {
    "path": "runtime/fastly/common/validations.cpp",
    "content": "#include \"validations.h\"\n\n#include \"../builtins/fastly.h\"\n#include \"../host-api/host_api_fastly.h\"\n#include \"encode.h\"\nusing fastly::FastlyGetErrorMessage;\n\nnamespace fastly::common {\nstd::optional<uint32_t> parse_and_validate_timeout(JSContext *cx, JS::HandleValue value,\n                                                   const char *subsystem, std::string property_name,\n                                                   uint64_t max_timeout) {\n  double native_value;\n  if (!JS::ToNumber(cx, value, &native_value)) {\n    return std::nullopt;\n  }\n  if (std::isnan(native_value)) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_TIMEOUT_NAN, subsystem,\n                              property_name.c_str());\n    return std::nullopt;\n  }\n  if (native_value < 0) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_TIMEOUT_NEGATIVE, subsystem,\n                              property_name.c_str());\n    return std::nullopt;\n  }\n  if (native_value >= max_timeout) {\n    std::string max_timeout_str = std::to_string(max_timeout);\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_TIMEOUT_TOO_BIG, subsystem,\n                              property_name.c_str(), max_timeout_str.c_str());\n    return std::nullopt;\n  }\n  return std::round(native_value);\n}\n\nstd::optional<std::tuple<const uint8_t *, size_t, std::optional<JS::AutoCheckCannotGC>>>\nvalidate_bytes(JSContext *cx, JS::HandleValue bytes, const char *subsystem) {\n  if (!bytes.isObject()) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_INVALID_BUFFER, subsystem);\n    return std::nullopt;\n  }\n\n  JS::RootedObject bytes_obj(cx, &bytes.toObject());\n\n  if (!JS::IsArrayBufferObject(bytes_obj) && !JS_IsArrayBufferViewObject(bytes_obj)) {\n    JS_ReportErrorNumberASCII(cx, FastlyGetErrorMessage, nullptr, JSMSG_INVALID_BUFFER, subsystem);\n    return std::nullopt;\n  }\n\n  const uint8_t *buf;\n  size_t length;\n  bool is_shared;\n  std::optional<JS::AutoCheckCannotGC> noGC;\n  if (JS_IsArrayBufferViewObject(bytes_obj)) {\n    noGC.emplace();\n    length = JS_GetArrayBufferViewByteLength(bytes_obj);\n    buf = (const uint8_t *)JS_GetArrayBufferViewData(bytes_obj, &is_shared, *noGC);\n    MOZ_ASSERT(!is_shared);\n  } else {\n    JS::GetArrayBufferLengthAndData(bytes_obj, &length, &is_shared, (uint8_t **)&buf);\n  }\n\n  return std::make_tuple(buf, length, std::move(noGC));\n}\n\n} // namespace fastly::common\n"
  },
  {
    "path": "runtime/fastly/common/validations.h",
    "content": "#ifndef FASTLY_VALIDATIONS_H\n#define FASTLY_VALIDATIONS_H\n\n#include \"builtin.h\"\n#include \"js/GCAPI.h\"\n#include <optional>\n#include <tuple>\n\nnamespace fastly::common {\n\nstd::optional<uint32_t> parse_and_validate_timeout(JSContext *cx, JS::HandleValue value,\n                                                   const char *subsystem, std::string property_name,\n                                                   uint64_t max_timeout);\n\nstd::optional<std::tuple<const uint8_t *, size_t, std::optional<JS::AutoCheckCannotGC>>>\nvalidate_bytes(JSContext *cx, JS::HandleValue bytes, const char *subsystem);\n\n} // namespace fastly::common\n\n#endif\n"
  },
  {
    "path": "runtime/fastly/crates/rust-lol-html/Cargo.toml",
    "content": "[package]\nname = \"lol_html_c_api\"\nversion = \"1.3.0\"\ndescription = \"Low output latency streaming HTML parser/rewriter\"\nauthors = [\n    \"Ivan Nikulin <inikulin@cloudflare.com>\",\n    \"Joshua Nelson <jnelson@cloudflare.com>\",\n]\nedition = \"2021\"\nlinks = \"lolhtml\"\npublish = false\n\n[features]\ndefault = [\"capi\"]\n# Required to exist for cargo-c to work\ncapi = []\n\n[dependencies]\nencoding_rs = \"0.8.35\"\nlol_html = \"=2.7.0\"\nlibc = \"0\"\nthiserror = \"2\"\n\n[profile.release]\npanic = \"abort\"\nlto = true\n\n[lib]\ncrate-type = [\"staticlib\", \"cdylib\", \"rlib\"]\n\n[package.metadata.capi.header]\nname = \"lol_html\"\nsubdirectory = \"\"\ngeneration = false\n\n[package.metadata.capi.install.include]\nasset = [{ from = \"include/lol_html.h\" }]\n\n[package.metadata.capi.pkg_config]\nname = \"lol-html\"\nfilename = \"lol-html\"\n"
  },
  {
    "path": "runtime/fastly/crates/rust-lol-html/LICENSE",
    "content": "Copyright (C) 2019, Cloudflare, Inc.\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this\nlist of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice,\nthis list of conditions and the following disclaimer in the documentation and/or\nother materials provided with the distribution.\n\n3. Neither the name of the copyright holder nor the names of its contributors\nmay be used to endorse or promote products derived from this software without\nspecific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
  },
  {
    "path": "runtime/fastly/crates/rust-lol-html/build.rs",
    "content": "// Required for the links attribute\nfn main() {}\n"
  },
  {
    "path": "runtime/fastly/crates/rust-lol-html/include/lol_html.h",
    "content": "#ifndef LOL_HTML_H\n#define LOL_HTML_H\n\n#if defined(__cplusplus)\nextern \"C\" {\n#endif\n\n#include <stdbool.h>\n#include <stddef.h>\n\n// NOTE: all functions that accept pointers will panic abort the thread\n// if NULL pointer is passed (with an exception for the cases where\n// explicitly stated that function can accept NULL pointers).\n\n// NOTE: all UTF8-strings passed to the API functions allow interior '\\0's\n// and their length determined by the corresponding length parameter only.\n\n// Opaque structures used by the rewriter.\n// WARNING: these structures should never be deallocated by the C code.\n// There are appropriate methods exposed that take care of these structures\n// deallocation.\ntypedef struct lol_html_HtmlRewriterBuilder lol_html_rewriter_builder_t;\ntypedef struct lol_html_HtmlRewriter lol_html_rewriter_t;\ntypedef struct lol_html_Doctype lol_html_doctype_t;\ntypedef struct lol_html_DocumentEnd lol_html_doc_end_t;\ntypedef struct lol_html_EndTag lol_html_end_tag_t;\ntypedef struct lol_html_Comment lol_html_comment_t;\ntypedef struct lol_html_TextChunk lol_html_text_chunk_t;\ntypedef struct lol_html_Element lol_html_element_t;\ntypedef struct lol_html_AttributesIterator lol_html_attributes_iterator_t;\ntypedef struct lol_html_Attribute lol_html_attribute_t;\ntypedef struct lol_html_Selector lol_html_selector_t;\ntypedef struct lol_html_CStreamingHandlerSink lol_html_streaming_sink_t;\n\n// Library-allocated UTF8 string fat pointer.\n//\n// The string is not NULL-terminated.\n//\n// Should NEVER be deallocated in the C code. Use special `lol_html_str_free`\n// function instead.\ntypedef struct {\n  // String data pointer.\n  const char *data;\n\n  // The length of the string in bytes.\n  size_t len;\n} lol_html_str_t;\n\n// A fat pointer to text chunk content.\n//\n// The difference between this struct and `lol_html_str_t` is\n// that text chunk content shouldn't be deallocated manually via\n// `lol_html_str_free` method call. Instead the pointer becomes\n// invalid ones related `lol_html_text_chunk_t` struct goes out\n// of scope.\ntypedef struct {\n  // String data pointer.\n  const char *data;\n\n  // The length of the string in bytes.\n  size_t len;\n} lol_html_text_chunk_content_t;\n\n// Utilities\n//---------------------------------------------------------------------\n\n// Frees the memory held by the library-allocated string.\n//\n// This is valid to call even if `str.data == NULL` (it does nothing, like `free(NULL)`).\nvoid lol_html_str_free(lol_html_str_t str);\n\n// Returns the last error message and resets last error to NULL.\n//\n// The `data` field will be NULL if there was no error.\nlol_html_str_t lol_html_take_last_error();\n\n// Creates new HTML rewriter builder.\nlol_html_rewriter_builder_t *lol_html_rewriter_builder_new();\n\n// Content handlers\n//---------------------------------------------------------------------\n// Rewriter directive that should be returned from each content handler.\n// If LOL_HTML_STOP directive is returned then rewriting stops immediately\n// and `write()` or `end()` methods of the rewriter return an error code.\ntypedef enum { LOL_HTML_CONTINUE, LOL_HTML_STOP } lol_html_rewriter_directive_t;\n\ntypedef lol_html_rewriter_directive_t (*lol_html_doctype_handler_t)(lol_html_doctype_t *doctype,\n                                                                    void *user_data);\n\ntypedef lol_html_rewriter_directive_t (*lol_html_comment_handler_t)(lol_html_comment_t *comment,\n                                                                    void *user_data);\n\ntypedef lol_html_rewriter_directive_t (*lol_html_text_handler_handler_t)(\n    lol_html_text_chunk_t *chunk, void *user_data);\n\ntypedef lol_html_rewriter_directive_t (*lol_html_element_handler_t)(lol_html_element_t *element,\n                                                                    void *user_data);\n\ntypedef lol_html_rewriter_directive_t (*lol_html_doc_end_handler_t)(lol_html_doc_end_t *doc_end,\n                                                                    void *user_data);\n\ntypedef lol_html_rewriter_directive_t (*lol_html_end_tag_handler_t)(lol_html_end_tag_t *end_tag,\n                                                                    void *user_data);\n\n// `size_t` byte offsets from the start of the input document\ntypedef struct lol_html_SourceLocationBytes {\n  size_t start;\n  size_t end;\n} lol_html_source_location_bytes_t;\n\n// For use with streaming content handlers.\n//\n// Safety: the user data and the callbacks must be safe to use from a different thread (e.g. can't\n// rely on thread-local storage). It doesn't have to be `Sync`, it will be used only by one thread\n// at a time.\n//\n// Handler functions copy this struct. It can (and should) be created on the stack.\ntypedef struct lol_html_CStreamingHandler {\n  // Anything you like\n  void *user_data;\n  // Called when the handler is supposed to produce its output. Return `0` for success.\n  // The `sink` argument is guaranteed non-`NULL`. It is valid only for the duration of this call,\n  // and can only be used on the same thread. The sink is for [`lol_html_streaming_sink_write_str`]\n  // and [`lol_html_streaming_sink_write_utf8_chunk`]. `user_data` comes from this struct.\n  // `write_all_callback` must not be `NULL`.\n  int (*write_all_callback)(lol_html_streaming_sink_t *sink, void *user_data);\n  // Called exactly once, after the last use of this handler.\n  // `user_data` comes from this struct.\n  // May be `NULL`.\n  void (*drop_callback)(void *user_data);\n  // *Always* initialize to `NULL`.\n  void *reserved;\n} lol_html_streaming_handler_t;\n\n// Selector\n//---------------------------------------------------------------------\n\n// Parses given CSS selector string.\n//\n// Returns NULL if parsing error occurs. The actual error message\n// can be obtained using `lol_html_take_last_error` function.\n//\n// WARNING: Selector SHOULD NOT be deallocated if there are any active rewriter\n// builders that accepted it as an argument to\n// `lol_html_rewriter_builder_add_element_content_handlers()` method. Deallocate all dependant\n// rewriter builders first and then use `lol_html_selector_free` function to free the selector.\nlol_html_selector_t *lol_html_selector_parse(const char *selector, size_t selector_len);\n\n// Frees the memory held by the parsed selector object.\nvoid lol_html_selector_free(lol_html_selector_t *selector);\n\n// Rewriter builder\n//---------------------------------------------------------------------\n\n// Adds document-level content handlers to the builder.\n//\n// If a particular handler is not required then NULL can be passed\n// instead. Don't use stub handlers in this case as this affects\n// performance - rewriter skips parsing of the content that doesn't\n// need to be processed.\n//\n// Each handler can optionally have associated user data which will be\n// passed to the handler on each invocation along with the rewritable\n// unit argument.\n//\n// If any of handlers return LOL_HTML_STOP directive then rewriting\n// stops immediately and `write()` or `end()` of the rewriter methods\n// return an error code.\n//\n// WARNING: Pointers passed to handlers are valid only during the\n// handler execution. So they should never be leaked outside of handlers.\nvoid lol_html_rewriter_builder_add_document_content_handlers(\n    lol_html_rewriter_builder_t *builder, lol_html_doctype_handler_t doctype_handler,\n    void *doctype_handler_user_data, lol_html_comment_handler_t comment_handler,\n    void *comment_handler_user_data, lol_html_text_handler_handler_t text_handler,\n    void *text_handler_user_data, lol_html_doc_end_handler_t doc_end_handler,\n    void *doc_end_user_data);\n\n// Adds element content handlers to the builder for the\n// given CSS selector.\n//\n// Selector should be a valid UTF8-string.\n//\n// If a particular handler is not required then NULL can be passed\n// instead. Don't use stub handlers in this case as this affects\n// performance - rewriter skips parsing of the content that doesn't\n// need to be processed.\n//\n// Each handler can optionally have associated user data which will be\n// passed to the handler on each invocation along with the rewritable\n// unit argument.\n//\n// If any of handlers return LOL_HTML_STOP directive then rewriting\n// stops immediately and `write()` or `end()` of the rewriter methods\n// return an error code.\n//\n// Returns 0 in case of success and -1 otherwise. The actual error message\n// can be obtained using `lol_html_take_last_error` function.\n//\n// WARNING: Pointers passed to handlers are valid only during the\n// handler execution. So they should never be leaked outside of handlers.\nint lol_html_rewriter_builder_add_element_content_handlers(\n    lol_html_rewriter_builder_t *builder, const lol_html_selector_t *selector,\n    lol_html_element_handler_t element_handler, void *element_handler_user_data,\n    lol_html_comment_handler_t comment_handler, void *comment_handler_user_data,\n    lol_html_text_handler_handler_t text_handler, void *text_handler_user_data);\n\n// Frees the memory held by the builder.\n//\n// Note that builder can be freed before any rewriters constructed from\n// it if it's not intended to be used anymore.\nvoid lol_html_rewriter_builder_free(lol_html_rewriter_builder_t *builder);\n\n// Rewriter\n//---------------------------------------------------------------------\n\n// Memory management settings for the rewriter.\ntypedef struct {\n  // Preallocated size of the parsing buffer.\n  //\n  // Can be set to 0. In this case rewriter won't consume any memory initially,\n  // though there might be a performance penalty due to later reallocations.\n  size_t preallocated_parsing_buffer_size;\n  // Maximum amount of memory to be used by a rewriter.\n  //\n  // `lol_html_rewriter_write` and `lol_html_rewriter_end` will return an error\n  // if this limit is exceeded.\n  size_t max_allowed_memory_usage;\n} lol_html_memory_settings_t;\n\n// Builds HTML-rewriter out of the provided builder. Can be called\n// multiple times to construct different rewriters from the same\n// builder.\n//\n// `output_sink` receives a zero-length chunk on the end of the output.\n//\n// `output_sink` can optionally have associated user data that will\n// be passed to handler on each invocation along with other arguments.\n//\n// `strict` mode will bail out from tokenization process in cases when\n// there is no way to determine correct parsing context. Recommended\n// setting for safety reasons.\n//\n// In case of an error the function returns a NULL pointer.\nlol_html_rewriter_t *\nlol_html_rewriter_build(lol_html_rewriter_builder_t *builder, const char *encoding,\n                        size_t encoding_len, lol_html_memory_settings_t memory_settings,\n                        void (*output_sink)(const char *chunk, size_t chunk_len, void *user_data),\n                        void *output_sink_user_data, bool strict);\n\nlol_html_rewriter_t *unstable_lol_html_rewriter_build_with_esi_tags(\n    lol_html_rewriter_builder_t *builder, const char *encoding, size_t encoding_len,\n    lol_html_memory_settings_t memory_settings,\n    void (*output_sink)(const char *chunk, size_t chunk_len, void *user_data),\n    void *output_sink_user_data, bool strict);\n\n// Write HTML chunk to rewriter.\n//\n// Returns 0 in case of success and -1 otherwise. The actual error message\n// can be obtained using `lol_html_take_last_error` function.\n//\n// WARNING: if this function errors the rewriter gets into the unrecoverable state,\n// so any further attempts to use the rewriter will cause a thread panic.\nint lol_html_rewriter_write(lol_html_rewriter_t *rewriter, const char *chunk, size_t chunk_len);\n\n// Completes rewriting and flushes the remaining output.\n//\n// Returns 0 in case of success and -1 otherwise. The actual error message\n// can be obtained using `lol_html_take_last_error` function.\n//\n// WARNING: after calling this function, further attempts to use the rewriter\n// (other than `lol_html_rewriter_free`) will cause a thread panic.\nint lol_html_rewriter_end(lol_html_rewriter_t *rewriter);\n\n// Frees the memory held by the rewriter.\nvoid lol_html_rewriter_free(lol_html_rewriter_t *rewriter);\n\n// Doctype\n//---------------------------------------------------------------------\n\n// Returns doctype's name.\n//\n// The `data` field will be NULL if the doctype doesn't have a name.\nlol_html_str_t lol_html_doctype_name_get(const lol_html_doctype_t *doctype);\n\n// Returns doctype's PUBLIC identifier.\n//\n// The `data` field will be NULL if the doctype doesn't have a PUBLIC identifier.\nlol_html_str_t lol_html_doctype_public_id_get(const lol_html_doctype_t *doctype);\n\n// Returns doctype's SYSTEM identifier.\n//\n// The `data` field will be NULL if the doctype doesn't have a SYSTEM identifier.\nlol_html_str_t lol_html_doctype_system_id_get(const lol_html_doctype_t *doctype);\n\n// Attaches custom user data to the doctype.\n//\n// The same doctype can be passed to multiple handlers if it has been\n// captured by multiple selectors. It might be handy to store some processing\n// state on the doctype, so it can be shared between handlers.\nvoid lol_html_doctype_user_data_set(const lol_html_doctype_t *doctype, void *user_data);\n\n// Returns user data attached to the doctype.\nvoid *lol_html_doctype_user_data_get(const lol_html_doctype_t *doctype);\n\n// Removes the doctype.\nvoid lol_html_doctype_remove(lol_html_doctype_t *doctype);\n\n// Returns `true` if the doctype has been removed.\nbool lol_html_doctype_is_removed(const lol_html_doctype_t *doctype);\n\n// Returns [`SourceLocationBytes`].\n//\n// `doctype` must be valid and non-`NULL`.\nlol_html_source_location_bytes_t\nlol_html_doctype_source_location_bytes(lol_html_doctype_t *doctype);\n\n// Comment\n//---------------------------------------------------------------------\n\n// Returns comment text.\nlol_html_str_t lol_html_comment_text_get(const lol_html_comment_t *comment);\n\n// Sets comment text.\n//\n// Text should be a valid UTF8-string.\n//\n// Returns 0 in case of success and -1 otherwise. The actual error message\n// can be obtained using `lol_html_take_last_error` function.\nint lol_html_comment_text_set(lol_html_comment_t *comment, const char *text, size_t text_len);\n\n// Inserts the content string before the comment either as raw text or as HTML.\n//\n// Content should be a valid UTF8-string.\n//\n// Returns 0 in case of success and -1 otherwise. The actual error message\n// can be obtained using `lol_html_take_last_error` function.\nint lol_html_comment_before(lol_html_comment_t *comment, const char *content, size_t content_len,\n                            bool is_html);\n\n// Inserts the content string after the comment either as raw text or as HTML.\n//\n// Content should be a valid UTF8-string.\n//\n// Returns 0 in case of success and -1 otherwise. The actual error message\n// can be obtained using `lol_html_take_last_error` function.\nint lol_html_comment_after(lol_html_comment_t *comment, const char *content, size_t content_len,\n                           bool is_html);\n\n// Replace the comment with the content of the string which is interpreted\n// either as raw text or as HTML.\n//\n// Content should be a valid UTF8-string.\n//\n// Returns 0 in case of success and -1 otherwise. The actual error message\n// can be obtained using `lol_html_take_last_error` function.\nint lol_html_comment_replace(lol_html_comment_t *comment, const char *content, size_t content_len,\n                             bool is_html);\n\n// Removes the comment.\n// `comment` must be valid and non-`NULL`.\n//\n// Calls [`Comment::remove`].\nvoid lol_html_comment_remove(lol_html_comment_t *comment);\n\n// Returns `true` if the comment has been removed.\nbool lol_html_comment_is_removed(const lol_html_comment_t *comment);\n\n// Attaches custom user data to the comment.\n//\n// The same comment can be passed to multiple handlers if it has been\n// captured by multiple selectors. It might be handy to store some\n// processing state on the comment, so it can be shared between handlers.\nvoid lol_html_comment_user_data_set(const lol_html_comment_t *comment, void *user_data);\n\n// Returns user data attached to the comment.\nvoid *lol_html_comment_user_data_get(const lol_html_comment_t *comment);\n\n// Returns [`SourceLocationBytes`].\n//\n// `comment` must be valid and non-`NULL`.\nlol_html_source_location_bytes_t\nlol_html_comment_source_location_bytes(lol_html_comment_t *comment);\n\n// Element\n//---------------------------------------------------------------------\n\n// Returns the tag name of the element.\nlol_html_str_t lol_html_element_tag_name_get(const lol_html_element_t *element);\n\n// Returns the tag name of the element, preserving its case.\nlol_html_str_t lol_html_element_tag_name_get_preserve_case(const lol_html_element_t *element);\n\n// Sets the tag name of the element.\n//\n// Name should be a valid UTF8-string.\n//\n// Returns 0 in case of success and -1 otherwise. The actual error message\n// can be obtained using `lol_html_take_last_error` function.\nint lol_html_element_tag_name_set(lol_html_element_t *element, const char *name, size_t name_len);\n\n// Whether the tag syntactically ends with `/>`. In HTML content this is purely a decorative,\n// unnecessary, and has no effect of any kind.\n//\n// The `/>` syntax only affects parsing of elements in foreign content (SVG and MathML).\n// It will never close any HTML tags that aren't already defined as void in HTML.\n//\n// This function only reports the parsed syntax, and will not report which elements are actually\n// void in HTML. Use `lol_html_element_can_have_content` to check if the element is non-void.\n//\n// If the `/` is part of an unquoted attribute, it's not parsed as the self-closing syntax.\nbool lol_html_element_is_self_closing(lol_html_element_t *element);\n\n// Whether the element can have inner content.  Returns `true` unless the element is an [HTML void\n// element](https://html.spec.whatwg.org/multipage/syntax.html#void-elements) or has a\n// self-closing tag (eg, `<foo />`).\nbool lol_html_element_can_have_content(lol_html_element_t *element);\n\n// Returns the namespace URI of the element.\n//\n// NOTE: This method returns static zero-terminated C string, so it don't\n// need to be freed.\nconst char *lol_html_element_namespace_uri_get(const lol_html_element_t *element);\n\n// Returns the iterator over the element attributes.\n//\n// WARNING: The iterator is valid only during the handler execution and\n// should never be leaked outside of it.\n//\n// Use `lol_html_attributes_iterator_free` function to deallocate\n// returned iterator.\nlol_html_attributes_iterator_t *lol_html_attributes_iterator_get(const lol_html_element_t *element);\n\n// Frees the memory held by the attribute iterator.\nvoid lol_html_attributes_iterator_free(lol_html_attributes_iterator_t *iterator);\n\n// Advances the iterator and returns next attribute.\n//\n// Returns NULL if iterator has been exhausted.\n//\n// WARNING: Returned attribute is valid only during the handler\n// execution and should never be leaked outside of it.\nconst lol_html_attribute_t *\nlol_html_attributes_iterator_next(lol_html_attributes_iterator_t *iterator);\n\n// Returns the attribute name.\nlol_html_str_t lol_html_attribute_name_get(const lol_html_attribute_t *attribute);\n\n// Returns the attribute name, preserving its case.\nlol_html_str_t lol_html_attribute_name_get_preserve_case(const lol_html_attribute_t *attribute);\n\n// Returns the attribute value.\nlol_html_str_t lol_html_attribute_value_get(const lol_html_attribute_t *attribute);\n\n// Returns [`SourceLocationBytes`].\n//\n// `element` must be valid and non-`NULL`.\nlol_html_source_location_bytes_t\nlol_html_element_source_location_bytes(lol_html_element_t *element);\n\n// Returns the attribute value. The `data` field will be NULL if an attribute with the given name\n// doesn't exist on the element.\n//\n// Name should be a valid UTF8-string.\n//\n// If the provided name is invalid UTF8-string the function returns NULL as well.\n// Therefore one should always check `lol_html_take_last_error` result after the call.\nlol_html_str_t lol_html_element_get_attribute(const lol_html_element_t *element, const char *name,\n                                              size_t name_len);\n\n// Returns 1 if element has attribute with the given name, and 0 otherwise.\n// Returns -1 in case of an error.\n//\n// Name should be a valid UTF8-string.\nint lol_html_element_has_attribute(const lol_html_element_t *element, const char *name,\n                                   size_t name_len);\n\n// Updates the attribute value if attribute with the given name already exists on\n// the element, or creates adds new attribute with given name and value otherwise.\n//\n// Name and value should be valid UTF8-strings.\n//\n// Returns 0 in case of success and -1 otherwise. The actual error message\n// can be obtained using `lol_html_take_last_error` function.\nint lol_html_element_set_attribute(lol_html_element_t *element, const char *name, size_t name_len,\n                                   const char *value, size_t value_len);\n\n// Removes the attribute with the given name from the element.\n//\n// Name should be a valid UTF8-string.\n//\n// Returns 0 in case of success and -1 otherwise. The actual error message\n// can be obtained using `lol_html_take_last_error` function.\nint lol_html_element_remove_attribute(lol_html_element_t *element, const char *name,\n                                      size_t name_len);\n\n// Inserts the content string before the element either as raw text or as HTML.\n//\n// Content should be a valid UTF8-string.\n//\n// Returns 0 in case of success and -1 otherwise. The actual error message\n// can be obtained using `lol_html_take_last_error` function.\n//\n// Calls [`Element::before`].\nint lol_html_element_before(lol_html_element_t *element, const char *content, size_t content_len,\n                            bool is_html);\n\n// Inserts the content string right after the element's start tag\n// either as raw text or as HTML.\n//\n// Content should be a valid UTF8-string.\n//\n// Returns 0 in case of success and -1 otherwise. The actual error message\n// can be obtained using `lol_html_take_last_error` function.\nint lol_html_element_prepend(lol_html_element_t *element, const char *content, size_t content_len,\n                             bool is_html);\n\n// Inserts the content string right before the element's end tag\n// either as raw text or as HTML.\n//\n// Content should be a valid UTF8-string.\n//\n// Returns 0 in case of success and -1 otherwise. The actual error message\n// can be obtained using `lol_html_take_last_error` function.\n//\n// Calls [`Element::append`].\nint lol_html_element_append(lol_html_element_t *element, const char *content, size_t content_len,\n                            bool is_html);\n\n// Inserts the content string right after the element's end tag as raw text or as HTML.\n//\n// Content should be a valid UTF8-string.\n//\n// Returns 0 in case of success and -1 otherwise. The actual error message\n// can be obtained using `lol_html_take_last_error` function.\nint lol_html_element_after(lol_html_element_t *element, const char *content, size_t content_len,\n                           bool is_html);\n\n// Sets either text or HTML inner content of the element.\n//\n// Content should be a valid UTF8-string.\n//\n// Returns 0 in case of success and -1 otherwise. The actual error message\n// can be obtained using `lol_html_take_last_error` function.\nint lol_html_element_set_inner_content(lol_html_element_t *element, const char *content,\n                                       size_t content_len, bool is_html);\n\n// Replaces the element with the provided text or HTML content.\n//\n// Content should be a valid UTF8-string.\n//\n// Returns 0 in case of success and -1 otherwise. The actual error message\n// can be obtained using `lol_html_take_last_error` function.\nint lol_html_element_replace(lol_html_element_t *element, const char *content, size_t content_len,\n                             bool is_html);\n\n// Removes the element.\nvoid lol_html_element_remove(const lol_html_element_t *element);\n\n// Removes the element, but leaves its inner content intact.\nvoid lol_html_element_remove_and_keep_content(const lol_html_element_t *element);\n\n// Returns `true` if the element has been removed.\nbool lol_html_element_is_removed(const lol_html_element_t *element);\n\n// Attaches custom user data to the element.\n//\n// The same element can be passed to multiple handlers if it has been\n// captured by multiple selectors. It might be handy to store some processing\n// state on the element, so it can be shared between handlers.\nvoid lol_html_element_user_data_set(const lol_html_element_t *element, void *user_data);\n\n// Returns user data attached to the element.\nvoid *lol_html_element_user_data_get(const lol_html_element_t *element);\n\n// Adds content handlers to the builder for the end tag of the given element.\n//\n// Subsequent calls to the method on the same element adds new handler.\n// They will run in the order in which they were registered.\n//\n// The handler can optionally have associated user data which will be\n// passed to the handler on each invocation along with the rewritable\n// unit argument.\n//\n// If the handler returns LOL_HTML_STOP directive then rewriting\n// stops immediately and `write()` or `end()` of the rewriter methods\n// return an error code.\n//\n// Not all elements (for example, `<br>`) support end tags. If this function is\n// called on such an element, this function returns an error code as described\n// below.\n//\n// Returns 0 in case of success and -1 otherwise. The actual error message\n// can be obtained using `lol_html_take_last_error` function.\n//\n// WARNING: Pointers passed to handlers are valid only during the\n// handler execution. So they should never be leaked outside of handlers.\nint lol_html_element_add_end_tag_handler(lol_html_element_t *element,\n                                         lol_html_end_tag_handler_t end_tag_handler,\n                                         void *user_data);\n\n// Clears the handlers that would run on the end tag of the given element.\nvoid lol_html_element_clear_end_tag_handlers(lol_html_element_t *element);\n\n// Inserts the content string before the element's end tag either as raw text or as HTML.\n//\n// Content should be a valid UTF8-string.\n//\n// Returns 0 in case of success and -1 otherwise. The actual error message\n// can be obtained using `lol_html_take_last_error` function.\n//\n// Calls [`EndTag::before`].\nint lol_html_end_tag_before(lol_html_end_tag_t *end_tag, const char *content, size_t content_len,\n                            bool is_html);\n\n// Inserts the content string right after the element's end tag as raw text or as HTML.\n//\n// Content should be a valid UTF8-string.\n//\n// Returns 0 in case of success and -1 otherwise. The actual error message\n// can be obtained using `lol_html_take_last_error` function.\nint lol_html_end_tag_after(lol_html_end_tag_t *end_tag, const char *content, size_t content_len,\n                           bool is_html);\n\n// Removes the end tag.\n// `end_tag` must be valid and non-`NULL`.\n//\n// Calls [`EndTag::remove`].\nvoid lol_html_end_tag_remove(lol_html_end_tag_t *end_tag);\n\n// Returns the end tag name.\nlol_html_str_t lol_html_end_tag_name_get(const lol_html_end_tag_t *end_tag);\n\n// Returns the end tag name, preserving its case.\nlol_html_str_t lol_html_end_tag_name_get_preserve_case(const lol_html_end_tag_t *end_tag);\n\n// Sets the tag name of the end tag.\n//\n// Name should be a valid UTF8-string.\n//\n// Returns 0 in case of success and -1 otherwise. The actual error message\n// can be obtained using `lol_html_take_last_error` function.\nint lol_html_end_tag_name_set(lol_html_end_tag_t *end_tag, const char *name, size_t name_len);\n\n// Inserts the content at the end of the document, either as raw text or as HTML.\n//\n// The content should be a valid UTF-8 string.\n//\n// Returns 0 if successful, and -1 otherwise. The actual error message\n// can be obtained using the `lol_html_take_last_error` function.\nint lol_html_doc_end_append(lol_html_doc_end_t *doc_end, const char *content, size_t content_len,\n                            bool is_html);\n\n// [`Element::streaming_prepend`]\n//\n// The [`CStreamingHandler`] contains callbacks that will be called\n// when the content needs to be written.\n//\n// `streaming_writer` is copied immediately, and doesn't have a stable address.\n// `streaming_writer` may be used from another thread (`Send`), but it's only going\n// to be used by one thread at a time (`!Sync`).\n//\n// `element` must be valid and non-`NULL`.\n// If `streaming_writer` is `NULL`, an error will be reported.\n//\n// Returns 0 on success.\nint lol_html_element_streaming_prepend(lol_html_element_t *element,\n                                       lol_html_streaming_handler_t *streaming_writer);\n\n// [`Element::streaming_append`]\n//\n// The [`CStreamingHandler`] contains callbacks that will be called\n// when the content needs to be written.\n//\n// `streaming_writer` is copied immediately, and doesn't have a stable address.\n// `streaming_writer` may be used from another thread (`Send`), but it's only going\n// to be used by one thread at a time (`!Sync`).\n//\n// `element` must be valid and non-`NULL`.\n// If `streaming_writer` is `NULL`, an error will be reported.\n//\n// Returns 0 on success.\nint lol_html_element_streaming_append(lol_html_element_t *element,\n                                      lol_html_streaming_handler_t *streaming_writer);\n\n// [`Element::streaming_before`]\n//\n// The [`CStreamingHandler`] contains callbacks that will be called\n// when the content needs to be written.\n//\n// `streaming_writer` is copied immediately, and doesn't have a stable address.\n// `streaming_writer` may be used from another thread (`Send`), but it's only going\n// to be used by one thread at a time (`!Sync`).\n//\n// `element` must be valid and non-`NULL`.\n// If `streaming_writer` is `NULL`, an error will be reported.\n//\n// Returns 0 on success.\nint lol_html_element_streaming_before(lol_html_element_t *element,\n                                      lol_html_streaming_handler_t *streaming_writer);\n\n// [`Element::streaming_after`]\n//\n// The [`CStreamingHandler`] contains callbacks that will be called\n// when the content needs to be written.\n//\n// `streaming_writer` is copied immediately, and doesn't have a stable address.\n// `streaming_writer` may be used from another thread (`Send`), but it's only going\n// to be used by one thread at a time (`!Sync`).\n//\n// `element` must be valid and non-`NULL`.\n// If `streaming_writer` is `NULL`, an error will be reported.\n//\n// Returns 0 on success.\nint lol_html_element_streaming_after(lol_html_element_t *element,\n                                     lol_html_streaming_handler_t *streaming_writer);\n\n// [`Element::streaming_set_inner_content`]\n//\n// The [`CStreamingHandler`] contains callbacks that will be called\n// when the content needs to be written.\n//\n// `streaming_writer` is copied immediately, and doesn't have a stable address.\n// `streaming_writer` may be used from another thread (`Send`), but it's only going\n// to be used by one thread at a time (`!Sync`).\n//\n// `element` must be valid and non-`NULL`.\n// If `streaming_writer` is `NULL`, an error will be reported.\n//\n// Returns 0 on success.\nint lol_html_element_streaming_set_inner_content(lol_html_element_t *element,\n                                                 lol_html_streaming_handler_t *streaming_writer);\n\n// [`Element::streaming_replace`]\n//\n// The [`CStreamingHandler`] contains callbacks that will be called\n// when the content needs to be written.\n//\n// `streaming_writer` is copied immediately, and doesn't have a stable address.\n// `streaming_writer` may be used from another thread (`Send`), but it's only going\n// to be used by one thread at a time (`!Sync`).\n//\n// `element` must be valid and non-`NULL`.\n// If `streaming_writer` is `NULL`, an error will be reported.\n//\n// Returns 0 on success.\nint lol_html_element_streaming_replace(lol_html_element_t *element,\n                                       lol_html_streaming_handler_t *streaming_writer);\n\n// Returns [`SourceLocationBytes`].\n//\n// `end_tag` must be valid and non-`NULL`.\nlol_html_source_location_bytes_t\nlol_html_end_tag_source_location_bytes(lol_html_end_tag_t *end_tag);\n\n// [`EndTag::streaming_before`]\n//\n// The [`CStreamingHandler`] contains callbacks that will be called\n// when the content needs to be written.\n//\n// `streaming_writer` is copied immediately, and doesn't have a stable address.\n// `streaming_writer` may be used from another thread (`Send`), but it's only going\n// to be used by one thread at a time (`!Sync`).\n//\n// `end_tag` must be valid and non-`NULL`.\n// If `streaming_writer` is `NULL`, an error will be reported.\n//\n// Returns 0 on success.\n//\n// Calls [`EndTag::streaming_before`].\nint lol_html_end_tag_streaming_before(lol_html_end_tag_t *end_tag,\n                                      lol_html_streaming_handler_t *streaming_writer);\n\n// The [`CStreamingHandler`] contains callbacks that will be called\n// when the content needs to be written.\n//\n// `streaming_writer` is copied immediately, and doesn't have a stable address.\n// `streaming_writer` may be used from another thread (`Send`), but it's only going\n// to be used by one thread at a time (`!Sync`).\n//\n// `end_tag` must be valid and non-`NULL`.\n// If `streaming_writer` is `NULL`, an error will be reported.\n//\n// Returns 0 on success.\n//\n// Calls [`EndTag::streaming_after`].\nint lol_html_end_tag_streaming_after(lol_html_end_tag_t *end_tag,\n                                     lol_html_streaming_handler_t *streaming_writer);\n\n// The [`CStreamingHandler`] contains callbacks that will be called\n// when the content needs to be written.\n//\n// `streaming_writer` is copied immediately, and doesn't have a stable address.\n// `streaming_writer` may be used from another thread (`Send`), but it's only going\n// to be used by one thread at a time (`!Sync`).\n//\n// `end_tag` must be valid and non-`NULL`.\n// If `streaming_writer` is `NULL`, an error will be reported.\n//\n// Returns 0 on success.\n//\n// Calls [`EndTag::streaming_replace`].\nint lol_html_end_tag_streaming_replace(lol_html_end_tag_t *end_tag,\n                                       lol_html_streaming_handler_t *streaming_writer);\n\n// Write another piece of UTF-8 data to the output. Returns `0` on success, and `-1` if it wasn't\n// valid UTF-8. All pointers must be non-NULL.\nint lol_html_streaming_sink_write_str(lol_html_streaming_sink_t *sink, const char *string_utf8,\n                                      size_t string_utf8_len, bool is_html);\n\n// [`StreamingHandlerSink::write_utf8_chunk`]\n//\n// Writes as much of the given UTF-8 fragment as possible, converting the encoding and HTML-escaping\n// if `is_html` is `false`.\n//\n// The `bytes_utf8` doesn't need to be a complete UTF-8 string, as long as consecutive calls to this\n// function create a valid UTF-8 string. Any incomplete UTF-8 sequence at the end of the content is\n// buffered and flushed as soon as it's completed.\n//\n// Other functions like [`lol_html_streaming_sink_write_str`] should not be called after a\n// `lol_html_streaming_sink_write_utf8_chunk` call with an incomplete UTF-8 sequence.\n//\n// Returns `0` on success, and `-1` if it wasn't valid UTF-8.\n// All pointers must be non-`NULL`.\nint lol_html_streaming_sink_write_utf8_chunk(lol_html_streaming_sink_t *sink,\n                                             const char *bytes_utf8, size_t bytes_utf8_len,\n                                             bool is_html);\n\n// Text chunk\n//---------------------------------------------------------------------\n\n// Returns a fat pointer to the UTF8 representation of content of the chunk.\n//\n// If the chunk is last in the current text node then content can be an empty string.\n//\n// WARNING: The pointer is valid only during the handler execution and\n// should never be leaked outside of handlers.\nlol_html_text_chunk_content_t lol_html_text_chunk_content_get(const lol_html_text_chunk_t *chunk);\n\n// Inserts the content string before the text chunk either as raw text or as HTML.\n//\n// Content should be a valid UTF8-string.\n//\n// Returns 0 in case of success and -1 otherwise. The actual error message\n// can be obtained using `lol_html_take_last_error` function.\nint lol_html_text_chunk_before(lol_html_text_chunk_t *chunk, const char *content,\n                               size_t content_len, bool is_html);\n\n// Inserts the content string after the text chunk either as raw text or as HTML.\n//\n// Content should be a valid UTF8-string.\n//\n// Returns 0 in case of success and -1 otherwise. The actual error message\n// can be obtained using `lol_html_take_last_error` function.\nint lol_html_text_chunk_after(lol_html_text_chunk_t *chunk, const char *content, size_t content_len,\n                              bool is_html);\n\n// Replace the text chunk with the content of the string which is interpreted\n// either as raw text or as HTML.\n//\n// Content should be a valid UTF8-string.\n//\n// Returns 0 in case of success and -1 otherwise. The actual error message\n// can be obtained using `lol_html_take_last_error` function.\nint lol_html_text_chunk_replace(lol_html_text_chunk_t *chunk, const char *content,\n                                size_t content_len, bool is_html);\n\n// Removes the text chunk.\nvoid lol_html_text_chunk_remove(lol_html_text_chunk_t *chunk);\n\n// Returns `true` if the text chunk has been removed.\nbool lol_html_text_chunk_is_removed(const lol_html_text_chunk_t *chunk);\n\n// Returns `true` if the chunk is last in the current text node.\n// `text_chunk` must be valid and non-`NULL`.\n// Returns `_Bool`.\n//\n// Calls [`TextChunk::last_in_text_node`].\nbool lol_html_text_chunk_is_last_in_text_node(lol_html_text_chunk_t *text_chunk);\n\n// The [`CStreamingHandler`] contains callbacks that will be called\n// when the content needs to be written.\n//\n// `streaming_writer` is copied immediately, and doesn't have a stable address.\n// `streaming_writer` may be used from another thread (`Send`), but it's only going\n// to be used by one thread at a time (`!Sync`).\n//\n// `text_chunk` must be valid and non-`NULL`.\n// If `streaming_writer` is `NULL`, an error will be reported.\n//\n// Returns 0 on success.\n//\n// Calls [`TextChunk::streaming_before`].\nint lol_html_text_chunk_streaming_before(lol_html_text_chunk_t *text_chunk,\n                                         lol_html_streaming_handler_t *streaming_writer);\n\n// The [`CStreamingHandler`] contains callbacks that will be called\n// when the content needs to be written.\n//\n// `streaming_writer` is copied immediately, and doesn't have a stable address.\n// `streaming_writer` may be used from another thread (`Send`), but it's only going\n// to be used by one thread at a time (`!Sync`).\n//\n// `text_chunk` must be valid and non-`NULL`.\n// If `streaming_writer` is `NULL`, an error will be reported.\n//\n// Returns 0 on success.\n//\n// Calls [`TextChunk::streaming_after`].\nint lol_html_text_chunk_streaming_after(lol_html_text_chunk_t *text_chunk,\n                                        lol_html_streaming_handler_t *streaming_writer);\n\n// The [`CStreamingHandler`] contains callbacks that will be called\n// when the content needs to be written.\n//\n// `streaming_writer` is copied immediately, and doesn't have a stable address.\n// `streaming_writer` may be used from another thread (`Send`), but it's only going\n// to be used by one thread at a time (`!Sync`).\n//\n// `text_chunk` must be valid and non-`NULL`.\n// If `streaming_writer` is `NULL`, an error will be reported.\n//\n// Returns 0 on success.\n//\n// Calls [`TextChunk::streaming_replace`].\nint lol_html_text_chunk_streaming_replace(lol_html_text_chunk_t *text_chunk,\n                                          lol_html_streaming_handler_t *streaming_writer);\n\n// Returns [`SourceLocationBytes`].\n//\n// `text_chunk` must be valid and non-`NULL`.\nlol_html_source_location_bytes_t\nlol_html_text_chunk_source_location_bytes(lol_html_text_chunk_t *text_chunk);\n\n// Attaches custom user data to the text chunk.\n//\n// The same text chunk can be passed to multiple handlers if it has been\n// captured by multiple selectors. It might be handy to store some processing\n// state on the chunk, so it can be shared between handlers.\nvoid lol_html_text_chunk_user_data_set(lol_html_text_chunk_t *chunk, void *user_data);\n\n// Returns user data attached to the text chunk.\nvoid *lol_html_text_chunk_user_data_get(const lol_html_text_chunk_t *chunk);\n\n#if defined(__cplusplus)\n} // extern C\n#endif\n\n#endif // LOL_HTML_H\n"
  },
  {
    "path": "runtime/fastly/crates/rust-lol-html/src/comment.rs",
    "content": "use super::*;\n\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_comment_text_get(comment: *const Comment) -> Str {\n    Str::new(to_ref!(comment).text())\n}\n\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_comment_text_set(\n    comment: *mut Comment,\n    text: *const c_char,\n    text_len: size_t,\n) -> c_int {\n    let comment = to_ref_mut!(comment);\n    let text = unwrap_or_ret_err_code! { to_str!(text, text_len) };\n\n    unwrap_or_ret_err_code! { comment.set_text(text) };\n\n    0\n}\n\nimpl_content_mutation_handlers! { comment: Comment [\n    /// Inserts the content string before the comment either as raw text or as HTML.\n    ///\n    /// Content should be a valid UTF8-string.\n    ///\n    /// Returns 0 in case of success and -1 otherwise. The actual error message\n    /// can be obtained using `lol_html_take_last_error` function.\n    lol_html_comment_before => before,\n    /// Inserts the content string after the comment either as raw text or as HTML.\n    ///\n    /// Content should be a valid UTF8-string.\n    ///\n    /// Returns 0 in case of success and -1 otherwise. The actual error message\n    /// can be obtained using `lol_html_take_last_error` function.\n    lol_html_comment_after => after,\n    /// Replace the comment with the content of the string which is interpreted\n    /// either as raw text or as HTML.\n    ///\n    /// Content should be a valid UTF8-string.\n    ///\n    /// Returns 0 in case of success and -1 otherwise. The actual error message\n    /// can be obtained using `lol_html_take_last_error` function.\n    lol_html_comment_replace => replace,\n    /// Removes the comment.\n    @VOID lol_html_comment_remove => remove,\n    /// Returns `true` if the comment has been removed.\n    @BOOL lol_html_comment_is_removed => removed,\n    @STREAM lol_html_comment_streaming_before => streaming_before,\n    @STREAM lol_html_comment_streaming_after => streaming_after,\n    @STREAM lol_html_comment_streaming_replace => streaming_replace,\n    lol_html_comment_source_location_bytes => source_location_bytes,\n] }\n\n/// Attaches custom user data to the comment.\n///\n/// The same comment can be passed to multiple handlers if it has been\n/// captured by multiple selectors. It might be handy to store some\n/// processing state on the comment, so it can be shared between handlers.\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_comment_user_data_set(\n    comment: *mut Comment,\n    user_data: *mut c_void,\n) {\n    to_ref_mut!(comment).set_user_data(user_data);\n}\n\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_comment_user_data_get(comment: *const Comment) -> *mut c_void {\n    get_user_data!(comment)\n}\n"
  },
  {
    "path": "runtime/fastly/crates/rust-lol-html/src/doctype.rs",
    "content": "use super::*;\n\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_doctype_name_get(doctype: *const Doctype) -> Str {\n    Str::from_opt(to_ref!(doctype).name())\n}\n\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_doctype_public_id_get(doctype: *const Doctype) -> Str {\n    Str::from_opt(to_ref!(doctype).public_id())\n}\n\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_doctype_system_id_get(doctype: *const Doctype) -> Str {\n    Str::from_opt(to_ref!(doctype).system_id())\n}\n\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_doctype_user_data_set(\n    doctype: *mut Doctype,\n    user_data: *mut c_void,\n) {\n    to_ref_mut!(doctype).set_user_data(user_data);\n}\n\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_doctype_user_data_get(doctype: *const Doctype) -> *mut c_void {\n    get_user_data!(doctype)\n}\n\nimpl_content_mutation_handlers! { doctype: Doctype [\n    /// Removes the doctype.\n    @VOID lol_html_doctype_remove => remove,\n    /// Returns `true` if the doctype has been removed.\n    @BOOL lol_html_doctype_is_removed => removed,\n    lol_html_doctype_source_location_bytes => source_location_bytes,\n] }\n"
  },
  {
    "path": "runtime/fastly/crates/rust-lol-html/src/document_end.rs",
    "content": "use super::*;\n\nimpl_content_mutation_handlers! { doc_end: DocumentEnd [\n    /// Inserts the content at the end of the document, either as raw text or as HTML.\n    ///\n    /// The content should be a valid UTF-8 string.\n    ///\n    /// Returns 0 if successful, and -1 otherwise. The actual error message\n    /// can be obtained using the `lol_html_take_last_error` function.\n    lol_html_doc_end_append => append,\n] }\n"
  },
  {
    "path": "runtime/fastly/crates/rust-lol-html/src/element.rs",
    "content": "use super::*;\nuse std::slice::Iter;\n\n/// Returns the tag name of the element.\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_element_tag_name_get(element: *const Element) -> Str {\n    let element = to_ref!(element);\n\n    Str::new(element.tag_name())\n}\n\n/// Returns the tag name of the element, preserving its case.\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_element_tag_name_get_preserve_case(\n    element: *const Element,\n) -> Str {\n    let element = to_ref!(element);\n\n    Str::new(element.tag_name_preserve_case())\n}\n\n/// Sets the tag name of the element.\n///\n/// Name should be a valid UTF8-string.\n///\n/// Returns 0 in case of success and -1 otherwise. The actual error message\n/// can be obtained using `lol_html_take_last_error` function.\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_element_tag_name_set(\n    element: *mut Element,\n    name: *const c_char,\n    name_len: size_t,\n) -> c_int {\n    let element = to_ref_mut!(element);\n    let name = unwrap_or_ret_err_code! { to_str!(name, name_len) };\n\n    unwrap_or_ret_err_code! { element.set_tag_name(name) };\n\n    0\n}\n\n/// Returns the namespace URI of the element.\n///\n/// NOTE: This method returns static zero-terminated C string, so it don't\n/// need to be freed.\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_element_namespace_uri_get(\n    element: *mut Element,\n) -> *const c_char {\n    let element = to_ref!(element);\n\n    match element.namespace_uri() {\n        \"http://www.w3.org/1999/xhtml\" => static_c_str!(\"http://www.w3.org/1999/xhtml\"),\n        \"http://www.w3.org/2000/svg\" => static_c_str!(\"http://www.w3.org/2000/svg\"),\n        \"http://www.w3.org/1998/Math/MathML\" => static_c_str!(\"http://www.w3.org/1998/Math/MathML\"),\n        _ => unreachable!(\"Unknown namespace URI\"),\n    }\n}\n\n/// Returns the iterator over the element attributes.\n///\n/// WARNING: The iterator is valid only during the handler execution and\n/// should never be leaked outside of it.\n///\n/// Use `lol_html_attributes_iterator_free` function to deallocate\n/// returned iterator.\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_attributes_iterator_get<'r, 't>(\n    element: *const Element<'r, 't>,\n) -> *mut Iter<'r, Attribute<'t>> {\n    let attributes = to_ref!(element).attributes();\n\n    to_ptr_mut(attributes.iter())\n}\n\n// Advances the iterator and returns next attribute.\n//\n// Returns NULL if iterator has been exhausted.\n//\n// WARNING: Returned attribute is valid only during the handler\n// execution and should never be leaked outside of it.\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_attributes_iterator_next<'t>(\n    iterator: *mut Iter<'_, Attribute<'t>>,\n) -> *const Attribute<'t> {\n    let iterator = to_ref_mut!(iterator);\n\n    match iterator.next() {\n        Some(attr) => attr,\n        None => ptr::null(),\n    }\n}\n\n// Frees the memory held by the attribute iterator.\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_attributes_iterator_free(iterator: *mut Iter<Attribute>) {\n    drop(to_box!(iterator));\n}\n\n/// Returns the attribute name.\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_attribute_name_get(attribute: *const Attribute) -> Str {\n    let attribute = to_ref!(attribute);\n\n    Str::new(attribute.name())\n}\n\n/// Returns the attribute name, preserving its case.\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_attribute_name_get_preserve_case(\n    attribute: *const Attribute,\n) -> Str {\n    let attribute = to_ref!(attribute);\n\n    Str::new(attribute.name_preserve_case())\n}\n\n/// Returns the attribute value.\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_attribute_value_get(attribute: *const Attribute) -> Str {\n    let attribute = to_ref!(attribute);\n\n    Str::new(attribute.value())\n}\n\n/// Returns the attribute value. The `data` field will be NULL if an attribute with the given name\n/// doesn't exist on the element.\n///\n/// Name should be a valid UTF8-string.\n///\n/// If the provided name is invalid UTF8-string the function returns NULL as well.\n/// Therefore one should always check `lol_html_take_last_error` result after the call.\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_element_get_attribute(\n    element: *const Element,\n    name: *const c_char,\n    name_len: size_t,\n) -> Str {\n    let element = to_ref!(element);\n    let name = unwrap_or_ret!(to_str!(name, name_len), Str::from_opt(None));\n\n    Str::from_opt(element.get_attribute(name))\n}\n\n/// Returns 1 if element has attribute with the given name, and 0 otherwise.\n/// Returns -1 in case of an error.\n///\n/// Name should be a valid UTF8-string.\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_element_has_attribute(\n    element: *const Element,\n    name: *const c_char,\n    name_len: size_t,\n) -> c_int {\n    let element = to_ref!(element);\n    let name = unwrap_or_ret_err_code! { to_str!(name, name_len) };\n\n    if element.has_attribute(name) {\n        1\n    } else {\n        0\n    }\n}\n\n/// Updates the attribute value if attribute with the given name already exists on\n/// the element, or creates adds new attribute with given name and value otherwise.\n///\n/// Name and value should be valid UTF8-strings.\n///\n/// Returns 0 in case of success and -1 otherwise. The actual error message\n/// can be obtained using `lol_html_take_last_error` function.\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_element_set_attribute(\n    element: *mut Element,\n    name: *const c_char,\n    name_len: size_t,\n    value: *const c_char,\n    value_len: size_t,\n) -> c_int {\n    let element = to_ref_mut!(element);\n    let name = unwrap_or_ret_err_code! { to_str!(name, name_len) };\n    let value = unwrap_or_ret_err_code! { to_str!(value, value_len) };\n\n    unwrap_or_ret_err_code! { element.set_attribute(name, value) };\n\n    0\n}\n\n/// Removes the attribute with the given name from the element.\n///\n/// Name should be a valid UTF8-string.\n///\n/// Returns 0 in case of success and -1 otherwise. The actual error message\n/// can be obtained using `lol_html_take_last_error` function.\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_element_remove_attribute(\n    element: *mut Element,\n    name: *const c_char,\n    name_len: size_t,\n) -> c_int {\n    let element = to_ref_mut!(element);\n    let name = unwrap_or_ret_err_code! { to_str!(name, name_len) };\n\n    element.remove_attribute(name);\n\n    0\n}\n\nimpl_content_mutation_handlers! { element: Element [\n    /// Inserts the content string right after the element's start tag\n    /// either as raw text or as HTML.\n    ///\n    /// Content should be a valid UTF8-string.\n    ///\n    /// Returns 0 in case of success and -1 otherwise. The actual error message\n    /// can be obtained using `lol_html_take_last_error` function.\n    lol_html_element_prepend => prepend,\n    /// Inserts the content string right before the element's end tag\n    /// either as raw text or as HTML.\n    ///\n    /// Content should be a valid UTF8-string.\n    ///\n    /// Returns 0 in case of success and -1 otherwise. The actual error message\n    /// can be obtained using `lol_html_take_last_error` function.\n    lol_html_element_append => append,\n    /// Inserts the content string before the element either as raw text or as HTML.\n    ///\n    /// Content should be a valid UTF8-string.\n    ///\n    /// Returns 0 in case of success and -1 otherwise. The actual error message\n    /// can be obtained using `lol_html_take_last_error` function.\n    lol_html_element_before => before,\n    /// Inserts the content string right after the element's end tag as raw text or as HTML.\n    ///\n    /// Content should be a valid UTF8-string.\n    ///\n    /// Returns 0 in case of success and -1 otherwise. The actual error message\n    /// can be obtained using `lol_html_take_last_error` function.\n    lol_html_element_after => after,\n    /// Sets either text or HTML inner content of the element.\n    ///\n    /// Content should be a valid UTF8-string.\n    ///\n    /// Returns 0 in case of success and -1 otherwise. The actual error message\n    /// can be obtained using `lol_html_take_last_error` function.\n    lol_html_element_set_inner_content => set_inner_content,\n    /// Replaces the element with the provided text or HTML content.\n    ///\n    /// Content should be a valid UTF8-string.\n    ///\n    /// Returns 0 in case of success and -1 otherwise. The actual error message\n    /// can be obtained using `lol_html_take_last_error` function.\n    lol_html_element_replace => replace,\n    /// Removes the element.\n    @VOID lol_html_element_remove => remove,\n    /// Removes the element, but leaves its inner content intact.\n    @VOID lol_html_element_remove_and_keep_content => remove_and_keep_content,\n    /// Returns `true` if the element has been removed.\n    @BOOL lol_html_element_is_removed => removed,\n    /// Whether the tag syntactically ends with `/>`. In HTML content this is purely a decorative, unnecessary, and has no effect of any kind.\n    ///\n    /// The `/>` syntax only affects parsing of elements in foreign content (SVG and MathML).\n    /// It will never close any HTML tags that aren't already defined as void in HTML.\n    ///\n    /// This function only reports the parsed syntax, and will not report which elements are actually void in HTML.\n    /// Use `lol_html_element_can_have_content` to check if the element is non-void.\n    ///\n    /// If the `/` is part of an unquoted attribute, it's not parsed as the self-closing syntax.\n    @BOOL lol_html_element_is_self_closing => is_self_closing,\n    /// Whether the element can have inner content.  Returns `true` unless the element is an [HTML void\n    /// element](https://html.spec.whatwg.org/multipage/syntax.html#void-elements) or has a\n    /// self-closing tag (eg, `<foo />`).\n    @BOOL lol_html_element_can_have_content => can_have_content,\n    @STREAM lol_html_element_streaming_prepend => streaming_prepend,\n    @STREAM lol_html_element_streaming_append => streaming_append,\n    @STREAM lol_html_element_streaming_before => streaming_before,\n    @STREAM lol_html_element_streaming_after => streaming_after,\n    @STREAM lol_html_element_streaming_set_inner_content => streaming_set_inner_content,\n    @STREAM lol_html_element_streaming_replace => streaming_replace,\n    lol_html_element_source_location_bytes => source_location_bytes,\n] }\n\n/// Attaches custom user data to the element.\n///\n/// The same element can be passed to multiple handlers if it has been\n/// captured by multiple selectors. It might be handy to store some processing\n/// state on the element, so it can be shared between handlers.\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_element_user_data_set(\n    element: *mut Element,\n    user_data: *mut c_void,\n) {\n    to_ref_mut!(element).set_user_data(user_data);\n}\n\n/// Returns user data attached to the element.\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_element_user_data_get(element: *mut Element) -> *mut c_void {\n    get_user_data!(element)\n}\n\ntype EndTagHandler = unsafe extern \"C\" fn(*mut EndTag, *mut c_void) -> RewriterDirective;\n\n/// Adds content handlers to the builder for the end tag of the given element.\n///\n/// Subsequent calls to the method on the same element adds new handler.\n/// They will run in the order in which they were registered.\n///\n/// The handler can optionally have associated user data which will be\n/// passed to the handler on each invocation along with the rewritable\n/// unit argument.\n///\n/// If the handler returns LOL_HTML_STOP directive then rewriting\n/// stops immediately and `write()` or `end()` of the rewriter methods\n/// return an error code.\n///\n/// Not all elements (for example, `<br>`) support end tags. If this function is\n/// called on such an element, this function returns an error code as described\n/// below.\n///\n/// Returns 0 in case of success and -1 otherwise. The actual error message\n/// can be obtained using `lol_html_take_last_error` function.\n///\n/// WARNING: Pointers passed to handlers are valid only during the\n/// handler execution. So they should never be leaked outside of handlers.\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_element_add_end_tag_handler(\n    element: *mut Element,\n    handler: EndTagHandler,\n    user_data: *mut c_void,\n) -> c_int {\n    let element = to_ref_mut!(element);\n\n    let handlers = unwrap_or_ret_err_code! {\n        element.end_tag_handlers().ok_or(\"No end tag.\")\n    };\n\n    handlers.push(Box::new(move |end_tag| {\n        match unsafe { handler(end_tag, user_data) } {\n            RewriterDirective::Continue => Ok(()),\n            RewriterDirective::Stop => Err(\"The rewriter has been stopped.\".into()),\n        }\n    }));\n\n    0\n}\n\n/// Clears the handlers that would run on the end tag of the given element.\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_element_clear_end_tag_handlers(element: *mut Element) {\n    let element = to_ref_mut!(element);\n    if let Some(handlers) = element.end_tag_handlers() {\n        handlers.clear();\n    }\n}\n\nimpl_content_mutation_handlers! { end_tag: EndTag [\n    /// Inserts the content string before the element's end tag either as raw text or as HTML.\n    ///\n    /// Content should be a valid UTF8-string.\n    ///\n    /// Returns 0 in case of success and -1 otherwise. The actual error message\n    /// can be obtained using `lol_html_take_last_error` function.\n    lol_html_end_tag_before => before,\n    /// Inserts the content string right after the element's end tag as raw text or as HTML.\n    ///\n    /// Content should be a valid UTF8-string.\n    ///\n    /// Returns 0 in case of success and -1 otherwise. The actual error message\n    /// can be obtained using `lol_html_take_last_error` function.\n    lol_html_end_tag_after => after,\n    lol_html_end_tag_replace => replace,\n    /// Removes the end tag.\n    @VOID lol_html_end_tag_remove => remove,\n    @STREAM lol_html_end_tag_streaming_before => streaming_before,\n    @STREAM lol_html_end_tag_streaming_after => streaming_after,\n    @STREAM lol_html_end_tag_streaming_replace => streaming_replace,\n    lol_html_end_tag_source_location_bytes => source_location_bytes,\n] }\n\n/// Returns the end tag name.\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_end_tag_name_get(end_tag: *mut EndTag) -> Str {\n    let tag = to_ref_mut!(end_tag);\n    Str::new(tag.name())\n}\n\n/// Returns the end tag name, preserving its case.\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_end_tag_name_get_preserve_case(end_tag: *mut EndTag) -> Str {\n    let tag = to_ref_mut!(end_tag);\n    Str::new(tag.name_preserve_case())\n}\n\n/// Sets the tag name of the end tag.\n///\n/// Name should be a valid UTF8-string.\n///\n/// Returns 0 in case of success and -1 otherwise. The actual error message\n/// can be obtained using `lol_html_take_last_error` function.\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_end_tag_name_set(\n    end_tag: *mut EndTag,\n    name: *const c_char,\n    len: size_t,\n) -> c_int {\n    let tag = to_ref_mut!(end_tag);\n    let name = unwrap_or_ret_err_code! { to_str!(name, len) };\n    tag.set_name_str(name.to_string());\n    0\n}\n"
  },
  {
    "path": "runtime/fastly/crates/rust-lol-html/src/errors.rs",
    "content": "use super::*;\nuse std::error::Error;\n\nthread_local! {\n    pub static LAST_ERROR: RefCell<Option<Box<dyn Error>>> = RefCell::new(None);\n}\n\n#[no_mangle]\npub extern \"C\" fn lol_html_take_last_error() -> Str {\n    let err = LAST_ERROR.with(|e| e.borrow_mut().take());\n\n    Str::from_opt(err.map(|e| e.to_string()))\n}\n\n#[derive(Error, Debug, Eq, PartialEq, Copy, Clone)]\npub enum CStreamingHandlerError {\n    #[error(\"Not all fields of the struct were initialized\")]\n    Uninitialized,\n\n    #[error(\"write_all_callback reported error: {0}\")]\n    HandlerError(c_int),\n}\n"
  },
  {
    "path": "runtime/fastly/crates/rust-lol-html/src/lib.rs",
    "content": "#![allow(clippy::missing_safety_doc)]\n\npub use crate::streaming::CStreamingHandler;\nuse libc::{c_char, c_int, c_void, size_t};\nuse lol_html::html_content::*;\nuse lol_html::*;\nuse std::cell::RefCell;\nuse std::{ptr, slice, str};\nuse thiserror::Error;\n\n#[inline]\nfn to_ptr_mut<T>(val: T) -> *mut T {\n    Box::into_raw(Box::new(val))\n}\n\n// NOTE: abort the thread if we receive NULL where unexpected\nmacro_rules! assert_not_null {\n    ($var:ident) => {\n        assert!(!$var.is_null(), \"{} is NULL\", stringify!($var));\n    };\n}\n\n// NOTE: all these utilities are macros so we can propagate the variable\n// name to the null pointer assertion.\nmacro_rules! to_ref {\n    ($ptr:ident) => {{\n        unsafe { $ptr.as_ref().expect(concat!(stringify!($var), \" is NULL\")) }\n    }};\n}\n\nmacro_rules! to_ref_mut {\n    ($ptr:ident) => {{\n        unsafe { $ptr.as_mut().expect(concat!(stringify!($var), \" is NULL\")) }\n    }};\n}\n\nmacro_rules! to_box {\n    ($ptr:ident) => {{\n        assert_not_null!($ptr);\n        unsafe { Box::from_raw($ptr) }\n    }};\n}\n\nmacro_rules! to_bytes {\n    ($data:ident, $len:ident) => {{\n        assert_not_null!($data);\n        unsafe { slice::from_raw_parts($data as *const u8, $len) }\n    }};\n}\n\nmacro_rules! to_str {\n    ($data:ident, $len:ident) => {\n        str::from_utf8(to_bytes!($data, $len)).into()\n    };\n}\n\nmacro_rules! static_c_str {\n    ($s:expr) => {\n        concat!($s, \"\\0\").as_ptr() as *const c_char\n    };\n}\n\nmacro_rules! unwrap_or_ret {\n    ($expr:expr, $ret_val:expr) => {\n        match $expr {\n            Ok(v) => v,\n            Err(err) => {\n                crate::errors::LAST_ERROR.with(|e| *e.borrow_mut() = Some(err.into()));\n                return $ret_val;\n            }\n        }\n    };\n}\n\nmacro_rules! unwrap_or_ret_err_code {\n    ($expr:expr) => {\n        unwrap_or_ret!($expr, -1)\n    };\n}\n\nmacro_rules! unwrap_or_ret_null {\n    ($expr:expr) => {\n        unwrap_or_ret!($expr, ptr::null_mut())\n    };\n}\n\nmacro_rules! impl_content_mutation_handlers {\n    ($name:ident: $typ:ty [ $($(#[$meta:meta])* $(@$kind:ident)? $fn_name:ident => $method:ident),+$(,)? ]) => {\n        $(\n            // stable Rust can't concatenate idents, so fn_name must be written out manually,\n            // but it is possible to compare concatenated strings.\n            #[cfg(debug_assertions)]\n            const _: () = {\n                let expected_fn_name_prefix = concat!(\"lol_html_\", stringify!($name), \"_\").as_bytes();\n                let fn_name = stringify!($fn_name).as_bytes();\n                // removed vs is_removed prevents exact comparison\n                assert!(fn_name.len() >= expected_fn_name_prefix.len() + (stringify!($method).len()), stringify!($fn_name));\n                let mut i = 0;\n                while i < expected_fn_name_prefix.len() {\n                    assert!(expected_fn_name_prefix[i] == fn_name[i], stringify!($fn_name));\n                    i += 1;\n                }\n            };\n            impl_content_mutation_handlers! { IMPL $($kind)? $name: $typ, $(#[$meta])* $fn_name => $method }\n        )+\n    };\n    (IMPL $name:ident: $typ:ty, $fn_name:ident => source_location_bytes) => {\n        /// Returns [`SourceLocationBytes`].\n        ///\n        #[doc = concat!(\" `\", stringify!($name), \"` must be valid and non-`NULL`.\")]\n        #[no_mangle]\n        pub unsafe extern \"C\" fn $fn_name($name: *mut $typ) -> SourceLocationBytes {\n            let loc = to_ref_mut!($name).source_location().bytes();\n            SourceLocationBytes {\n                start: loc.start,\n                end: loc.end,\n            }\n        }\n    };\n    (IMPL $name:ident: $typ:ty, $(#[$meta:meta])* $fn_name:ident => $method:ident) => {\n        $(#[$meta])*\n        /// The `content` must be a valid UTF-8 string. It's copied immediately.\n        /// If `is_html` is `true`, then the `content` will be written without HTML-escaping.\n        ///\n        #[doc = concat!(\" `\", stringify!($name), \"` must be valid and non-`NULL`.\")]\n        /// If `content` is `NULL`, an error will be reported.\n        ///\n        /// Returns 0 on success.\n        ///\n        #[doc = concat!(\" Calls [`\", stringify!($typ), \"::\", stringify!($method), \"`].\")]\n        #[no_mangle]\n        pub unsafe extern \"C\" fn $fn_name(\n            $name: *mut $typ,\n            content: *const c_char,\n            content_len: size_t,\n            is_html: bool,\n        ) -> c_int {\n            content_insertion_fn_body! { $name.$method(content, content_len, is_html) }\n        }\n    };\n    (IMPL STREAM $name:ident: $typ:ty, $(#[$meta:meta])* $fn_name:ident => $method:ident) => {\n        $(#[$meta])*\n        /// The [`CStreamingHandler`] contains callbacks that will be called\n        /// when the content needs to be written.\n        ///\n        /// `streaming_writer` is copied immediately, and doesn't have a stable address.\n        /// `streaming_writer` may be used from another thread (`Send`), but it's only going\n        /// to be used by one thread at a time (`!Sync`).\n        ///\n        #[doc = concat!(\" `\", stringify!($name), \"` must be valid and non-`NULL`.\")]\n        /// If `streaming_writer` is `NULL`, an error will be reported.\n        ///\n        /// Returns 0 on success.\n        ///\n        #[doc = concat!(\" Calls [`\", stringify!($typ), \"::\", stringify!($method), \"`].\")]\n        #[no_mangle]\n        pub unsafe extern \"C\" fn $fn_name(\n            $name: *mut $typ,\n            streaming_writer: *mut CStreamingHandler,\n        ) -> c_int {\n            content_insertion_fn_body! { $name.$method(streaming_writer) }\n        }\n    };\n    (IMPL VOID $name:ident: $typ:ty, $(#[$meta:meta])* $fn_name:ident => $method:ident) => {\n        $(#[$meta])*\n        #[doc = concat!(\" `\", stringify!($name), \"` must be valid and non-`NULL`.\")]\n        ///\n        #[doc = concat!(\" Calls [`\", stringify!($typ), \"::\", stringify!($method), \"`].\")]\n        #[no_mangle]\n        pub unsafe extern \"C\" fn $fn_name(\n            $name: *mut $typ,\n        ) {\n            to_ref_mut!($name).$method();\n        }\n    };\n    (IMPL BOOL $name:ident: $typ:ty, $(#[$meta:meta])* $fn_name:ident => $method:ident) => {\n        $(#[$meta])*\n        #[doc = concat!(\" `\", stringify!($name), \"` must be valid and non-`NULL`.\")]\n        /// Returns `_Bool`.\n        ///\n        #[doc = concat!(\" Calls [`\", stringify!($typ), \"::\", stringify!($method), \"`].\")]\n        #[no_mangle]\n        pub unsafe extern \"C\" fn $fn_name(\n            $name: *mut $typ,\n        ) -> bool {\n            to_ref_mut!($name).$method()\n        }\n    };\n}\n\nmacro_rules! content_insertion_fn_body {\n    ($target:ident.$method:ident($content:ident, $content_len:ident, $is_html:ident)) => {{\n        let target = to_ref_mut!($target);\n        let content = unwrap_or_ret_err_code! { to_str!($content, $content_len) };\n\n        target.$method(\n            content,\n            if $is_html {\n                ContentType::Html\n            } else {\n                ContentType::Text\n            },\n        );\n\n        0\n    }};\n    ($target:ident.$method:ident($handler:expr)) => {{\n        let handler_ptr: *mut CStreamingHandler = $handler;\n        if unsafe { handler_ptr.as_ref() }.is_none()\n            || !handler_ptr.as_ref().unwrap().reserved.is_null()\n        {\n            // we can't even safely call drop callback on this\n            return -1;\n        }\n        // Taking ownership of the CStreamingHandler\n        let handler: Box<CStreamingHandler> = Box::new(unsafe { handler_ptr.read() });\n        if handler.write_all_callback.is_none() {\n            return -1;\n        }\n        if let Some(target) = unsafe { $target.as_mut() } {\n            target.$method(handler);\n            0\n        } else {\n            -1\n        }\n    }};\n}\n\nmacro_rules! get_user_data {\n    ($unit:ident) => {\n        to_ref!($unit)\n            .user_data()\n            .downcast_ref::<*mut c_void>()\n            .map(|d| *d)\n            .unwrap_or(ptr::null_mut())\n    };\n}\n\npub mod comment;\npub mod doctype;\npub mod document_end;\npub mod element;\npub mod errors;\npub mod rewriter;\npub mod rewriter_builder;\npub mod selector;\npub mod streaming;\npub mod string;\npub mod text_chunk;\n\npub use self::string::Str;\n\n/// `size_t` byte offsets from the start of the input document\n#[repr(C)]\npub struct SourceLocationBytes {\n    pub start: usize,\n    pub end: usize,\n}\n\n// NOTE: prevent dead code from complaining about enum\n// never being constructed in the Rust code.\npub use self::rewriter_builder::RewriterDirective;\n\n/// An error that occurs if incorrect [`encoding`] label was provided in [`Settings`].\n///\n/// [`encoding`]: ../struct.Settings.html#structfield.encoding\n/// [`Settings`]: ../struct.Settings.html\n#[derive(Error, Debug, PartialEq, Copy, Clone)]\npub enum EncodingError {\n    /// The provided value doesn't match any of the [labels specified in the standard].\n    ///\n    /// [labels specified in the standard]: https://encoding.spec.whatwg.org/#names-and-labels\n    #[error(\"Unknown character encoding has been provided.\")]\n    UnknownEncoding,\n\n    /// The provided label is for one of the non-ASCII-compatible encodings (`UTF-16LE`, `UTF-16BE`,\n    /// `ISO-2022-JP` and `replacement`). These encodings are not supported.\n    #[error(\"Expected ASCII-compatible encoding.\")]\n    NonAsciiCompatibleEncoding,\n}\n"
  },
  {
    "path": "runtime/fastly/crates/rust-lol-html/src/rewriter.rs",
    "content": "use super::rewriter_builder::HtmlRewriterBuilder;\nuse super::*;\nuse libc::c_void;\n\n// NOTE: we use `ExternOutputSink` proxy type, because we need an\n// existential type parameter for the `HtmlRewriter` and FnMut can't\n// be used as such since it's a trait.\npub struct ExternOutputSink {\n    handler: unsafe extern \"C\" fn(*const c_char, size_t, *mut c_void),\n    user_data: *mut c_void,\n}\n\n/// This is a wrapper around `lol_html::HtmlRewriter` which allows\n/// use after the rewriter itself is dropped.\npub struct HtmlRewriter(Option<lol_html::HtmlRewriter<'static, ExternOutputSink>>);\n\nimpl ExternOutputSink {\n    #[inline]\n    fn new(\n        handler: unsafe extern \"C\" fn(*const c_char, size_t, *mut c_void),\n        user_data: *mut c_void,\n    ) -> Self {\n        Self { handler, user_data }\n    }\n}\n\nimpl OutputSink for ExternOutputSink {\n    #[inline]\n    fn handle_chunk(&mut self, chunk: &[u8]) {\n        let chunk_len = chunk.len();\n        let chunk = chunk.as_ptr().cast::<c_char>();\n\n        unsafe { (self.handler)(chunk, chunk_len, self.user_data) };\n    }\n}\n\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_rewriter_build(\n    builder: *mut HtmlRewriterBuilder,\n    encoding: *const c_char,\n    encoding_len: size_t,\n    memory_settings: MemorySettings,\n    output_sink: unsafe extern \"C\" fn(*const c_char, size_t, *mut c_void),\n    output_sink_user_data: *mut c_void,\n    strict: bool,\n) -> *mut HtmlRewriter {\n    let builder = to_ref!(builder);\n    let handlers = builder.get_safe_handlers();\n\n    let maybe_encoding =\n        encoding_rs::Encoding::for_label_no_replacement(to_bytes!(encoding, encoding_len));\n    let encoding = unwrap_or_ret_null! { maybe_encoding.ok_or(EncodingError::UnknownEncoding) };\n    let settings = Settings {\n        element_content_handlers: handlers.element,\n        document_content_handlers: handlers.document,\n        encoding: unwrap_or_ret_null! { encoding.try_into().or(Err(EncodingError::NonAsciiCompatibleEncoding)) },\n        memory_settings,\n        strict,\n        enable_esi_tags: false,\n        adjust_charset_on_meta_tag: false,\n    };\n\n    let output_sink = ExternOutputSink::new(output_sink, output_sink_user_data);\n    let rewriter = lol_html::HtmlRewriter::new(settings, output_sink);\n\n    to_ptr_mut(HtmlRewriter(Some(rewriter)))\n}\n\n#[no_mangle]\npub unsafe extern \"C\" fn unstable_lol_html_rewriter_build_with_esi_tags(\n    builder: *mut HtmlRewriterBuilder,\n    encoding: *const c_char,\n    encoding_len: size_t,\n    memory_settings: MemorySettings,\n    output_sink: unsafe extern \"C\" fn(*const c_char, size_t, *mut c_void),\n    output_sink_user_data: *mut c_void,\n    strict: bool,\n) -> *mut HtmlRewriter {\n    let builder = to_ref!(builder);\n    let handlers = builder.get_safe_handlers();\n\n    let maybe_encoding =\n        encoding_rs::Encoding::for_label_no_replacement(to_bytes!(encoding, encoding_len));\n    let encoding = unwrap_or_ret_null! { maybe_encoding.ok_or(EncodingError::UnknownEncoding) };\n    let settings = Settings {\n        element_content_handlers: handlers.element,\n        document_content_handlers: handlers.document,\n        encoding: unwrap_or_ret_null! { encoding.try_into().or(Err(EncodingError::NonAsciiCompatibleEncoding)) },\n        memory_settings,\n        strict,\n        enable_esi_tags: true,\n        adjust_charset_on_meta_tag: false,\n    };\n\n    let output_sink = ExternOutputSink::new(output_sink, output_sink_user_data);\n    let rewriter = lol_html::HtmlRewriter::new(settings, output_sink);\n\n    to_ptr_mut(HtmlRewriter(Some(rewriter)))\n}\n\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_rewriter_write(\n    rewriter: *mut HtmlRewriter,\n    chunk: *const c_char,\n    chunk_len: size_t,\n) -> c_int {\n    let chunk = to_bytes!(chunk, chunk_len);\n    let rewriter = to_ref_mut!(rewriter)\n        .0\n        .as_mut()\n        .expect(\"cannot call `lol_html_rewriter_write` after calling `end()`\");\n\n    unwrap_or_ret_err_code! { rewriter.write(chunk) };\n\n    0\n}\n\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_rewriter_end(rewriter: *mut HtmlRewriter) -> c_int {\n    let rewriter = to_ref_mut!(rewriter)\n        .0\n        .take() // Using `take()` allows calling `free()` afterwards (it will be a no-op).\n        .expect(\"cannot call `lol_html_rewriter_end` after calling `end()`\");\n\n    unwrap_or_ret_err_code! { rewriter.end() };\n\n    0\n}\n\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_rewriter_free(rewriter: *mut HtmlRewriter) {\n    // SAFETY: `to_box` includes a check that `rewriter` is non-null.\n    // The caller is required to ensure that `rewriter` is aligned and that `free` has not been called before.\n    // NOTE: if `end()` was called before, it is valid (but not recommended) to call `free()` more than once.\n    drop(to_box!(rewriter));\n}\n"
  },
  {
    "path": "runtime/fastly/crates/rust-lol-html/src/rewriter_builder.rs",
    "content": "use super::*;\nuse libc::c_void;\nuse std::borrow::Cow;\n\n#[repr(C)]\npub enum RewriterDirective {\n    Continue,\n    Stop,\n}\n\ntype ElementHandler = unsafe extern \"C\" fn(*mut Element, *mut c_void) -> RewriterDirective;\ntype DoctypeHandler = unsafe extern \"C\" fn(*mut Doctype, *mut c_void) -> RewriterDirective;\ntype CommentsHandler = unsafe extern \"C\" fn(*mut Comment, *mut c_void) -> RewriterDirective;\ntype TextHandler = unsafe extern \"C\" fn(*mut TextChunk, *mut c_void) -> RewriterDirective;\ntype DocumentEndHandler = unsafe extern \"C\" fn(*mut DocumentEnd, *mut c_void) -> RewriterDirective;\n\nstruct ExternHandler<F> {\n    func: Option<F>,\n    user_data: *mut c_void,\n}\n\nimpl<F> ExternHandler<F> {\n    const fn new(func: Option<F>, user_data: *mut c_void) -> Self {\n        Self { func, user_data }\n    }\n}\n\nmacro_rules! add_handler {\n    ($handlers:ident, $el_ty:ident, $self:ident.$ty:ident) => {{\n        if let Some(handler) = $self.$ty.func {\n            // NOTE: the closure actually holds a reference to the content\n            // handler object, but since we pass the object to the C side this\n            // ownership information gets erased.\n            // It's not a problem since handler is an extern static function that\n            // will remain intact even if Rust-side builder object gets freed.\n            // However, it's not a case for the user data pointer, it might become\n            // invalid if content handlers object that holds it gets freed before\n            // a handler invocation. Therefore, we close on a local variable instead\n            // of structure field.\n            let user_data = $self.$ty.user_data;\n\n            $handlers =\n                $handlers.$ty(\n                    move |arg: &mut $el_ty| match unsafe { handler(arg, user_data) } {\n                        RewriterDirective::Continue => Ok(()),\n                        RewriterDirective::Stop => Err(\"The rewriter has been stopped.\".into()),\n                    },\n                );\n        }\n    }};\n}\n\npub struct ExternDocumentContentHandlers {\n    doctype: ExternHandler<DoctypeHandler>,\n    comments: ExternHandler<CommentsHandler>,\n    text: ExternHandler<TextHandler>,\n    end: ExternHandler<DocumentEndHandler>,\n}\n\nimpl ExternDocumentContentHandlers {\n    #[must_use]\n    pub fn as_safe_document_content_handlers(&self) -> DocumentContentHandlers<'_> {\n        let mut handlers = DocumentContentHandlers::default();\n\n        add_handler!(handlers, Doctype, self.doctype);\n        add_handler!(handlers, Comment, self.comments);\n        add_handler!(handlers, TextChunk, self.text);\n        add_handler!(handlers, DocumentEnd, self.end);\n\n        handlers\n    }\n}\n\npub struct ExternElementContentHandlers {\n    element: ExternHandler<ElementHandler>,\n    comments: ExternHandler<CommentsHandler>,\n    text: ExternHandler<TextHandler>,\n}\n\nimpl ExternElementContentHandlers {\n    #[must_use]\n    pub fn as_safe_element_content_handlers(&self) -> ElementContentHandlers<'_> {\n        let mut handlers = ElementContentHandlers::default();\n\n        add_handler!(handlers, Element, self.element);\n        add_handler!(handlers, Comment, self.comments);\n        add_handler!(handlers, TextChunk, self.text);\n\n        handlers\n    }\n}\n\npub struct SafeContentHandlers<'b> {\n    pub document: Vec<DocumentContentHandlers<'b>>,\n    pub element: Vec<(Cow<'b, Selector>, ElementContentHandlers<'b>)>,\n}\n\n#[derive(Default)]\npub struct HtmlRewriterBuilder {\n    document_content_handlers: Vec<ExternDocumentContentHandlers>,\n    element_content_handlers: Vec<(&'static Selector, ExternElementContentHandlers)>,\n}\n\nimpl HtmlRewriterBuilder {\n    #[must_use]\n    pub fn get_safe_handlers(&self) -> SafeContentHandlers<'_> {\n        SafeContentHandlers {\n            document: self\n                .document_content_handlers\n                .iter()\n                .map(|h| h.as_safe_document_content_handlers())\n                .collect(),\n            element: self\n                .element_content_handlers\n                .iter()\n                .map(|(s, h)| (Cow::Borrowed(*s), h.as_safe_element_content_handlers()))\n                .collect(),\n        }\n    }\n}\n\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_rewriter_builder_new() -> *mut HtmlRewriterBuilder {\n    to_ptr_mut(HtmlRewriterBuilder::default())\n}\n\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_rewriter_builder_add_document_content_handlers(\n    builder: *mut HtmlRewriterBuilder,\n    doctype_handler: Option<DoctypeHandler>,\n    doctype_handler_user_data: *mut c_void,\n    comments_handler: Option<CommentsHandler>,\n    comments_handler_user_data: *mut c_void,\n    text_handler: Option<TextHandler>,\n    text_handler_user_data: *mut c_void,\n    document_end_handler: Option<DocumentEndHandler>,\n    document_end_handler_user_data: *mut c_void,\n) {\n    let builder = to_ref_mut!(builder);\n\n    let handlers = ExternDocumentContentHandlers {\n        doctype: ExternHandler::new(doctype_handler, doctype_handler_user_data),\n        comments: ExternHandler::new(comments_handler, comments_handler_user_data),\n        text: ExternHandler::new(text_handler, text_handler_user_data),\n        end: ExternHandler::new(document_end_handler, document_end_handler_user_data),\n    };\n\n    builder.document_content_handlers.push(handlers);\n}\n\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_rewriter_builder_add_element_content_handlers(\n    builder: *mut HtmlRewriterBuilder,\n    selector: *const Selector,\n    element_handler: Option<ElementHandler>,\n    element_handler_user_data: *mut c_void,\n    comments_handler: Option<CommentsHandler>,\n    comments_handler_user_data: *mut c_void,\n    text_handler: Option<TextHandler>,\n    text_handler_user_data: *mut c_void,\n) -> c_int {\n    let selector = to_ref!(selector);\n    let builder = to_ref_mut!(builder);\n\n    let handlers = ExternElementContentHandlers {\n        element: ExternHandler::new(element_handler, element_handler_user_data),\n        comments: ExternHandler::new(comments_handler, comments_handler_user_data),\n        text: ExternHandler::new(text_handler, text_handler_user_data),\n    };\n\n    builder.element_content_handlers.push((selector, handlers));\n\n    0\n}\n\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_rewriter_builder_free(builder: *mut HtmlRewriterBuilder) {\n    drop(to_box!(builder));\n}\n"
  },
  {
    "path": "runtime/fastly/crates/rust-lol-html/src/selector.rs",
    "content": "use super::*;\n\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_selector_parse(\n    selector: *const c_char,\n    selector_len: size_t,\n) -> *mut Selector {\n    let selector = unwrap_or_ret_null! { to_str!(selector, selector_len) };\n    let selector = unwrap_or_ret_null! { selector.parse::<Selector>() };\n\n    to_ptr_mut(selector)\n}\n\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_selector_free(selector: *mut Selector) {\n    drop(to_box!(selector));\n}\n"
  },
  {
    "path": "runtime/fastly/crates/rust-lol-html/src/streaming.rs",
    "content": "use super::*;\nuse crate::errors::CStreamingHandlerError;\nuse lol_html::html_content::StreamingHandler;\nuse lol_html::html_content::StreamingHandlerSink;\n\n/// Opaque type from C's perspective\npub type CStreamingHandlerSink<'tmp> = StreamingHandlerSink<'tmp>;\n\n/// Write another piece of UTF-8 data to the output. Returns `0` on success, and `-1` if it wasn't valid UTF-8.\n/// All pointers must be non-NULL.\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_streaming_sink_write_str(\n    sink: *mut CStreamingHandlerSink<'_>,\n    string_utf8: *const c_char,\n    string_utf8_len: size_t,\n    is_html: bool,\n) -> c_int {\n    let sink = to_ref_mut!(sink);\n    let content = unwrap_or_ret_err_code! { to_str!(string_utf8, string_utf8_len) };\n    let is_html = if is_html {\n        ContentType::Html\n    } else {\n        ContentType::Text\n    };\n\n    sink.write_str(content, is_html);\n    0\n}\n\n/// [`StreamingHandlerSink::write_utf8_chunk`]\n///\n/// Writes as much of the given UTF-8 fragment as possible, converting the encoding and HTML-escaping if `is_html` is `false`.\n///\n/// The `bytes_utf8` doesn't need to be a complete UTF-8 string, as long as consecutive calls to this function create a valid UTF-8 string.\n/// Any incomplete UTF-8 sequence at the end of the content is buffered and flushed as soon as it's completed.\n///\n/// Other functions like [`lol_html_streaming_sink_write_str`] should not be called after a\n/// `lol_html_streaming_sink_write_utf8_chunk` call with an incomplete UTF-8 sequence.\n///\n/// Returns `0` on success, and `-1` if it wasn't valid UTF-8.\n/// All pointers must be non-`NULL`.\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_streaming_sink_write_utf8_chunk(\n    sink: *mut CStreamingHandlerSink<'_>,\n    bytes_utf8: *const c_char,\n    bytes_utf8_len: size_t,\n    is_html: bool,\n) -> c_int {\n    let sink = to_ref_mut!(sink);\n    let content = to_bytes!(bytes_utf8, bytes_utf8_len);\n    let is_html = if is_html {\n        ContentType::Html\n    } else {\n        ContentType::Text\n    };\n\n    unwrap_or_ret_err_code! { sink.write_utf8_chunk(content, is_html) };\n    0\n}\n\n/// Safety: the user data and the callbacks must be safe to use from a different thread (e.g. can't rely on thread-local storage).\n///\n/// It doesn't have to be `Sync`, it will be used only by one thread at a time.\n///\n/// Handler functions copy this struct. It can (and should) be created on the stack.\n#[repr(C)]\npub struct CStreamingHandler {\n    /// Anything you like\n    pub user_data: *mut c_void,\n    /// Called when the handler is supposed to produce its output. Return `0` for success.\n    /// The `sink` argument is guaranteed non-`NULL`. It is valid only for the duration of this call, and can only be used on the same thread.\n    /// The sink is for [`lol_html_streaming_sink_write_str`] and [`lol_html_streaming_sink_write_utf8_chunk`].\n    /// `user_data` comes from this struct.\n    /// `write_all_callback` must not be `NULL`.\n    pub write_all_callback: Option<\n        unsafe extern \"C\" fn(sink: &mut CStreamingHandlerSink<'_>, user_data: *mut c_void) -> c_int,\n    >,\n    /// Called exactly once, after the last use of this handler.\n    /// `user_data` comes from this struct.\n    /// May be `NULL`.\n    pub drop_callback: Option<unsafe extern \"C\" fn(user_data: *mut c_void)>,\n    /// *Always* initialize to `NULL`.\n    pub reserved: *mut c_void,\n}\n\n// It's up to C to obey this\nunsafe impl Send for CStreamingHandler {}\n\nimpl StreamingHandler for CStreamingHandler {\n    fn write_all(\n        self: Box<Self>,\n        sink: &mut StreamingHandlerSink<'_>,\n    ) -> Result<(), Box<(dyn std::error::Error + Send + Sync)>> {\n        if !self.reserved.is_null() {\n            return Err(CStreamingHandlerError::Uninitialized.into());\n        }\n        let cb = self\n            .write_all_callback\n            .ok_or(CStreamingHandlerError::Uninitialized)?;\n        let res = unsafe { (cb)(sink, self.user_data) };\n        if res == 0 {\n            Ok(())\n        } else {\n            Err(CStreamingHandlerError::HandlerError(res).into())\n        }\n    }\n}\n\nimpl Drop for CStreamingHandler {\n    fn drop(&mut self) {\n        if let Some(cb) = self.drop_callback {\n            unsafe {\n                cb(self.user_data);\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "runtime/fastly/crates/rust-lol-html/src/string.rs",
    "content": "use super::*;\n\n// NOTE: we don't use CStr and CString as the transfer type because UTF8\n// string comming from both sides can contain interior NULLs.\n#[repr(C)]\npub struct Str {\n    data: *const c_char,\n    len: size_t,\n}\n\nimpl Str {\n    #[must_use]\n    pub fn new(string: String) -> Self {\n        Self {\n            len: string.len(),\n            data: Box::into_raw(string.into_boxed_str()) as *const c_char,\n        }\n    }\n\n    /// Convert an `Option<String>` to a C-style string.\n    ///\n    /// If `string` is `None`, `data` will be set to `NULL`.\n    #[inline]\n    #[must_use]\n    pub fn from_opt(string: Option<String>) -> Self {\n        match string {\n            Some(string) => Self::new(string),\n            None => Self {\n                data: ptr::null(),\n                len: 0,\n            },\n        }\n    }\n}\n\nimpl Drop for Str {\n    fn drop(&mut self) {\n        if self.data.is_null() {\n            return;\n        }\n        let bytes = unsafe { slice::from_raw_parts_mut(self.data.cast_mut(), self.len) };\n\n        drop(unsafe { Box::from_raw(bytes) });\n    }\n}\n\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_str_free(string: Str) {\n    drop(string);\n}\n"
  },
  {
    "path": "runtime/fastly/crates/rust-lol-html/src/text_chunk.rs",
    "content": "use super::*;\n\n#[repr(C)]\npub struct TextChunkContent {\n    data: *const c_char,\n    len: size_t,\n}\n\nimpl TextChunkContent {\n    fn new(chunk: &TextChunk) -> Self {\n        let content = chunk.as_str();\n\n        Self {\n            data: content.as_ptr().cast::<c_char>(),\n            len: content.len(),\n        }\n    }\n}\n\n/// Returns a fat pointer to the UTF8 representation of content of the chunk.\n///\n/// If the chunk is last in the current text node then content can be an empty string.\n///\n/// WARNING: The pointer is valid only during the handler execution and\n/// should never be leaked outside of handlers.\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_text_chunk_content_get(\n    chunk: *mut TextChunk,\n) -> TextChunkContent {\n    TextChunkContent::new(to_ref!(chunk))\n}\n\nimpl_content_mutation_handlers! { text_chunk: TextChunk [\n    /// Inserts the content string before the text chunk either as raw text or as HTML.\n    ///\n    /// Content should be a valid UTF8-string.\n    ///\n    /// Returns 0 in case of success and -1 otherwise. The actual error message\n    /// can be obtained using `lol_html_take_last_error` function.\n    lol_html_text_chunk_before => before,\n    /// Inserts the content string after the text chunk either as raw text or as HTML.\n    ///\n    /// Content should be a valid UTF8-string.\n    ///\n    /// Returns 0 in case of success and -1 otherwise. The actual error message\n    /// can be obtained using `lol_html_take_last_error` function.\n    lol_html_text_chunk_after => after,\n    /// Replace the text chunk with the content of the string which is interpreted\n    /// either as raw text or as HTML.\n    ///\n    /// Content should be a valid UTF8-string.\n    ///\n    /// Returns 0 in case of success and -1 otherwise. The actual error message\n    /// can be obtained using `lol_html_take_last_error` function.\n    lol_html_text_chunk_replace => replace,\n    /// Removes the text chunk.\n    @VOID lol_html_text_chunk_remove => remove,\n    /// Returns `true` if the text chunk has been removed.\n    @BOOL lol_html_text_chunk_is_removed => removed,\n    /// Returns `true` if the chunk is last in the current text node.\n    @BOOL lol_html_text_chunk_is_last_in_text_node => last_in_text_node,\n    @STREAM lol_html_text_chunk_streaming_before => streaming_before,\n    @STREAM lol_html_text_chunk_streaming_after => streaming_after,\n    @STREAM lol_html_text_chunk_streaming_replace => streaming_replace,\n    lol_html_text_chunk_source_location_bytes => source_location_bytes,\n] }\n\n/// Attaches custom user data to the text chunk.\n///\n/// The same text chunk can be passed to multiple handlers if it has been\n/// captured by multiple selectors. It might be handy to store some processing\n/// state on the chunk, so it can be shared between handlers.\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_text_chunk_user_data_set(\n    chunk: *mut TextChunk,\n    user_data: *mut c_void,\n) {\n    to_ref_mut!(chunk).set_user_data(user_data);\n}\n\n/// Returns user data attached to the text chunk.\n#[no_mangle]\npub unsafe extern \"C\" fn lol_html_text_chunk_user_data_get(chunk: *const TextChunk) -> *mut c_void {\n    get_user_data!(chunk)\n}\n"
  },
  {
    "path": "runtime/fastly/handler.cpp",
    "content": "#include \"../StarlingMonkey/builtins/web/performance.h\"\n#include \"./builtins/fastly.h\"\n#include \"./builtins/fetch-event.h\"\n#include \"./host-api/fastly.h\"\n#include \"./host-api/host_api_fastly.h\"\n#include \"extension-api.h\"\n#include \"host_api.h\"\n#include <chrono>\n#include <wasi/libc-environ.h>\n\nusing fastly::fetch_event::FetchEvent;\nusing std::chrono::duration_cast;\nusing std::chrono::microseconds;\nusing std::chrono::system_clock;\n\nnamespace fastly::runtime {\n\napi::Engine *ENGINE;\n\n// Install corresponds to Wizer time, so we configure the engine here\nbool install(api::Engine *engine) {\n#if defined(JS_GC_ZEAL) && defined(FASTLY_GC_FREQUENCY)\n  JS::SetGCZeal(engine->cx(), 2, FASTLY_GC_FREQUENCY);\n#endif\n  ENGINE = engine;\n  return true;\n}\n\nbool handle_incoming(host_api::Request req) {\n  builtins::web::performance::Performance::timeOrigin.emplace(\n      std::chrono::high_resolution_clock::now());\n\n  double total_compute = 0;\n  std::chrono::system_clock::time_point start;\n  if (ENGINE->debug_logging_enabled()) {\n    start = system_clock::now();\n  }\n\n  __wasilibc_ensure_environ();\n\n  if (ENGINE->debug_logging_enabled()) {\n    printf(\"Running JS handleRequest function for Fastly Compute service version %s\\n\",\n           getenv(\"FASTLY_SERVICE_VERSION\"));\n    fflush(stdout);\n  }\n\n  RootedObject fetch_event(ENGINE->cx(), FetchEvent::create(ENGINE->cx()));\n  if (!FetchEvent::init_request(ENGINE->cx(), fetch_event, req.req, req.body)) {\n    ENGINE->dump_pending_exception(\"initialization of FetchEvent\");\n    return false;\n  }\n\n  if (ENGINE->debug_logging_enabled()) {\n    fetch_event::dispatch_fetch_event(fetch_event, &total_compute);\n  } else {\n    fetch_event::dispatch_fetch_event(fetch_event);\n  }\n\n  // Loop until no more resolved promises or backend requests are pending.\n  if (ENGINE->debug_logging_enabled()) {\n    printf(\"Start processing async jobs ...\\n\");\n    fflush(stdout);\n  }\n\n  bool success = ENGINE->run_event_loop();\n\n  if (JS_IsExceptionPending(ENGINE->cx())) {\n    ENGINE->dump_pending_exception(\"evaluating code\");\n    return false;\n  } else if (!success) {\n    if (ENGINE->has_pending_async_tasks()) {\n      fprintf(stderr, \"Warning: JS event loop terminated with async tasks pending. \"\n                      \"Use FetchEvent#waitUntil to extend the service's lifetime \"\n                      \"if needed.\\n\");\n      return false;\n    } else {\n      fprintf(stderr, \"Warning: JS event loop terminated without completing the request.\\n\");\n      return false;\n    }\n  }\n\n  if (ENGINE->has_pending_async_tasks()) {\n    if (ENGINE->debug_logging_enabled()) {\n      fprintf(stderr, \"Warning: JS event loop terminated with async tasks pending. \"\n                      \"Use FetchEvent#waitUntil to extend the service's lifetime \"\n                      \"if needed.\\n\");\n    }\n    return false;\n  }\n\n  // Respond with status `500` if no response was ever sent.\n  if (!FetchEvent::response_started(fetch_event)) {\n    FetchEvent::respondWithError(ENGINE->cx(), fetch_event);\n    return false;\n  }\n\n  if (ENGINE->debug_logging_enabled()) {\n    auto end = system_clock::now();\n    double diff = duration_cast<microseconds>(end - start).count();\n    printf(\"Done. Total request processing time: %fms. Total compute time: %fms\\n\", diff / 1000,\n           total_compute / 1000);\n  }\n  return true;\n}\n\n} // namespace fastly::runtime\n\nint main(int argc, const char *argv[]) {\n  using fastly::fastly::Fastly;\n  using fastly::runtime::ENGINE;\n  Fastly::reusableSandboxOptions.freeze();\n\n  host_api::HttpReqPromise::DownstreamNextOptions options;\n  if (Fastly::reusableSandboxOptions.between_request_timeout()) {\n    options.timeout_ms = static_cast<uint32_t>(\n        Fastly::reusableSandboxOptions.between_request_timeout().value().count());\n  }\n\n  auto req = host_api::Request::downstream_get();\n  if (req.is_err()) {\n    HANDLE_ERROR(ENGINE->cx(), *req.to_err());\n    return -1;\n  }\n\n  const auto max_requests = Fastly::reusableSandboxOptions.max_requests().value_or(1);\n  std::size_t requests_handled = 0;\n  const auto start_time = std::chrono::high_resolution_clock::now();\n  while (true) {\n    bool success = fastly::runtime::handle_incoming(req.unwrap());\n\n    if (!success) {\n      if (ENGINE->debug_logging_enabled()) {\n        printf(\"Request handling not successful, exiting process.\\n\");\n        fflush(stdout);\n      }\n      return -1;\n    }\n\n    requests_handled++;\n\n    // Check if we should exit based on configured max requests\n    // Note that a max request value of 0 means unlimited,\n    // so we only check the max requests condition if max_requests is greater than 0.\n    if (max_requests > 0 && requests_handled >= max_requests) {\n      if (fastly::runtime::ENGINE->debug_logging_enabled()) {\n        printf(\"Max requests handled (%zu), exiting process.\\n\", requests_handled);\n      }\n      break;\n    }\n\n    // Check if we should exit based on configured sandbox timeout\n    if (Fastly::reusableSandboxOptions.sandbox_timeout()) {\n      auto now = std::chrono::high_resolution_clock::now();\n      auto elapsed = now - start_time;\n      if (elapsed >= Fastly::reusableSandboxOptions.sandbox_timeout().value()) {\n        if (fastly::runtime::ENGINE->debug_logging_enabled()) {\n          printf(\"Sandbox timeout reached (%llu ms), exiting process.\\n\",\n                 std::chrono::duration_cast<std::chrono::milliseconds>(elapsed).count());\n        }\n        break;\n      }\n    }\n\n    // Check if we should exit based on configured max memory usage\n    if (Fastly::reusableSandboxOptions.max_memory_mib()) {\n      uint32_t heap_mib;\n      if (fastly::compute_get_heap_mib(&heap_mib) != 0) {\n        // If we fail to get heap memory usage, log a warning but continue anyway since this isn't a\n        // critical failure.\n        if (fastly::runtime::ENGINE->debug_logging_enabled()) {\n          printf(\"Failed to get heap memory usage, continuing anyway.\\n\");\n        }\n      } else if (heap_mib >= Fastly::reusableSandboxOptions.max_memory_mib().value()) {\n        if (fastly::runtime::ENGINE->debug_logging_enabled()) {\n          printf(\"Max memory exceeded (heap usage: %u MiB, max: %u MiB), exiting process.\\n\",\n                 heap_mib, Fastly::reusableSandboxOptions.max_memory_mib().value());\n        }\n        break;\n      }\n    }\n\n    auto next = host_api::HttpReqPromise::downstream_next(options);\n    if (next.is_err()) {\n      HANDLE_ERROR(ENGINE->cx(), *next.to_err());\n      return -1;\n    }\n\n    req = next.unwrap().wait();\n    if (req.is_err()) {\n      HANDLE_ERROR(ENGINE->cx(), *req.to_err());\n      return -1;\n    }\n\n    if (JS_IsExceptionPending(ENGINE->cx())) {\n      ENGINE->dump_pending_exception(\"running event loop\");\n      return -1;\n    }\n    ENGINE->reset();\n  }\n\n  if (fastly::runtime::ENGINE->debug_logging_enabled()) {\n    printf(\"Exiting process after handling %zu requests.\\n\", requests_handled);\n    fflush(stdout);\n  }\n\n  return 0;\n}\n"
  },
  {
    "path": "runtime/fastly/host-api/error_numbers.msg",
    "content": "/*\n * Our own version of spidermonkey/js/friend/ErrorNumbers.msg\n * where we can add our own custom error messages for use within the runtime\n */\n\n/*\n * This is our JavaScript error message file.\n *\n * The format for each JS error message is:\n *\n * MSG_DEF(<SYMBOLIC_NAME>, <ARGUMENT_COUNT>, <EXCEPTION_NAME>,\n *         <FORMAT_STRING>)\n *\n * where ;\n * <SYMBOLIC_NAME> is a legal C identifer that will be used in the\n * JS engine source.\n *\n * <ARGUMENT_COUNT> is an integer literal specifying the total number of\n * replaceable arguments in the following format string.\n *\n * <EXCEPTION_NAME> is an enum JSExnType value, defined in js/ErrorReport.h.\n *\n * <FORMAT_STRING> is a string literal, optionally containing sequences\n * {X} where X  is an integer representing the argument number that will\n * be replaced with a string value when the error is reported.\n *\n * e.g.\n *\n * MSG_DEF(JSMSG_NOT_A_SUBSPECIES, 2, JSEXN_TYPEERROR,\n *         \"{0} is not a member of the {1} family\")\n *\n * can be used:\n *\n * JS_ReportErrorNumberASCII(JSMSG_NOT_A_SUBSPECIES, \"Rhino\", \"Monkey\");\n *\n * to report:\n *\n * \"TypeError: Rhino is not a member of the Monkey family\"\n */\n\n// clang-format off\nMSG_DEF(JSMSG_NOT_AN_ERROR,                                    0, JSEXN_ERR, \"<Error #0 is reserved>\")\nMSG_DEF(JSMSG_ACL_NAME_NOT_STRING,                             0, JSEXN_TYPEERR, \"Acl open: name must be a string\")\nMSG_DEF(JSMSG_ACL_NAME_TOO_LONG,                               0, JSEXN_TYPEERR, \"Acl open: name can not be more than 254 characters\")\nMSG_DEF(JSMSG_ACL_NAME_EMPTY,                                  0, JSEXN_TYPEERR, \"Acl open: name can not be an empty string\")\nMSG_DEF(JSMSG_ACL_NOT_FOUND,                                   1, JSEXN_TYPEERR, \"Acl open: \\\"{0}\\\" acl not found\")\nMSG_DEF(JSMSG_CONFIG_STORE_DOES_NOT_EXIST,                     1, JSEXN_TYPEERR, \"ConfigStore constructor: No ConfigStore named '{0}' exists\")\nMSG_DEF(JSMSG_CONFIG_STORE_KEY_EMPTY,                          0, JSEXN_TYPEERR, \"ConfigStore key can not be an empty string\")\nMSG_DEF(JSMSG_CONFIG_STORE_KEY_TOO_LONG,                       0, JSEXN_TYPEERR, \"ConfigStore key can not be more than 255 characters\")\nMSG_DEF(JSMSG_CONFIG_STORE_NAME_CONTAINS_INVALID_CHARACTER,    0, JSEXN_TYPEERR, \"ConfigStore constructor: name can contain only ascii alphanumeric characters, underscores, and ascii whitespace\")\nMSG_DEF(JSMSG_CONFIG_STORE_NAME_EMPTY,                         0, JSEXN_TYPEERR, \"ConfigStore constructor: name can not be an empty string\")\nMSG_DEF(JSMSG_CONFIG_STORE_NAME_START_WITH_ASCII_ALPHA,        0, JSEXN_TYPEERR, \"ConfigStore constructor: name must start with an ascii alpabetical character\")\nMSG_DEF(JSMSG_CONFIG_STORE_NAME_TOO_LONG,                      0, JSEXN_TYPEERR, \"ConfigStore constructor: name can not be more than 255 characters\")\nMSG_DEF(JSMSG_DICTIONARY_DOES_NOT_EXIST,                       1, JSEXN_TYPEERR, \"Dictionary constructor: No Dictionary named '{0}' exists\")\nMSG_DEF(JSMSG_DICTIONARY_KEY_EMPTY,                            0, JSEXN_TYPEERR, \"Dictionary key can not be an empty string\")\nMSG_DEF(JSMSG_DICTIONARY_KEY_TOO_LONG,                         0, JSEXN_TYPEERR, \"Dictionary key can not be more than 255 characters\")\nMSG_DEF(JSMSG_DICTIONARY_NAME_CONTAINS_INVALID_CHARACTER,      0, JSEXN_TYPEERR, \"Dictionary constructor: name can contain only ascii alphanumeric characters, underscores, and ascii whitespace\")\nMSG_DEF(JSMSG_DICTIONARY_NAME_EMPTY,                           0, JSEXN_TYPEERR, \"Dictionary constructor: name can not be an empty string\")\nMSG_DEF(JSMSG_DICTIONARY_NAME_START_WITH_ASCII_ALPHA,          0, JSEXN_TYPEERR, \"Dictionary constructor: name must start with an ascii alpabetical character\")\nMSG_DEF(JSMSG_DICTIONARY_NAME_TOO_LONG,                        0, JSEXN_TYPEERR, \"Dictionary constructor: name can not be more than 255 characters\")\nMSG_DEF(JSMSG_KV_STORE_NAME_EMPTY,                             0, JSEXN_TYPEERR, \"KVStore constructor: name can not be an empty string\")\nMSG_DEF(JSMSG_KV_STORE_NAME_TOO_LONG,                          0, JSEXN_TYPEERR, \"KVStore constructor: name can not be more than 255 characters\")\nMSG_DEF(JSMSG_KV_STORE_NAME_NO_CONTROL_CHARACTERS,             0, JSEXN_TYPEERR, \"KVStore constructor: name can not contain control characters (\\\\u0000-\\\\u001F)\")\nMSG_DEF(JSMSG_KV_STORE_DOES_NOT_EXIST,                         1, JSEXN_TYPEERR, \"KVStore constructor: No KVStore named '{0}' exists\")\nMSG_DEF(JSMSG_KV_STORE_KEY_EMPTY,                              0, JSEXN_TYPEERR, \"KVStore key can not be an empty string\")\nMSG_DEF(JSMSG_KV_STORE_KEY_TOO_LONG,                           0, JSEXN_TYPEERR, \"KVStore key can not be more than 1024 characters\")\nMSG_DEF(JSMSG_KV_STORE_KEY_INVALID_CHARACTER,                  1, JSEXN_TYPEERR, \"KVStore key can not contain {0} character\")\nMSG_DEF(JSMSG_KV_STORE_KEY_ACME,                               0, JSEXN_TYPEERR, \"KVStore key can not start with .well-known/acme-challenge/\")\nMSG_DEF(JSMSG_KV_STORE_KEY_RELATIVE,                           0, JSEXN_TYPEERR, \"KVStore key can not be '.' or '..'\")\nMSG_DEF(JSMSG_KV_STORE_PUT_CONTENT_STREAM,                     0, JSEXN_TYPEERR, \"Content-provided streams are not yet supported for streaming into KVStore\")\nMSG_DEF(JSMSG_KV_STORE_PUT_OVER_30_MB,                         0, JSEXN_TYPEERR, \"KVStore value can not be more than 30 Megabytes in size\")\nMSG_DEF(JSMSG_KV_STORE_LIST_ERROR,                             1, JSEXN_TYPEERR, \"KVStore list: {0}\")\nMSG_DEF(JSMSG_KV_STORE_DELETE_ERROR,                           1, JSEXN_TYPEERR, \"KVStore delete: {0}\")\nMSG_DEF(JSMSG_KV_STORE_LOOKUP_ERROR,                           1, JSEXN_TYPEERR, \"KVStore lookup: {0}\")\nMSG_DEF(JSMSG_KV_STORE_INSERT_ERROR,                           1, JSEXN_TYPEERR, \"KVStore insert: {0}\")\nMSG_DEF(JSMSG_SECRET_STORE_DOES_NOT_EXIST,                     1, JSEXN_TYPEERR, \"SecretStore constructor: No SecretStore named '{0}' exists\")\nMSG_DEF(JSMSG_SECRET_STORE_KEY_EMPTY,                          0, JSEXN_TYPEERR, \"SecretStore key can not be an empty string\")\nMSG_DEF(JSMSG_SECRET_STORE_KEY_TOO_LONG,                       0, JSEXN_TYPEERR, \"SecretStore key can not be more than 255 characters\")\nMSG_DEF(JSMSG_SECRET_STORE_KEY_CONTAINS_INVALID_CHARACTER,     0, JSEXN_TYPEERR, \"SecretStore key can contain only ascii alphanumeric characters, underscores, dashes, and ascii whitespace\")\nMSG_DEF(JSMSG_SECRET_STORE_NAME_CONTAINS_INVALID_CHARACTER,    0, JSEXN_TYPEERR, \"SecretStore constructor: name can contain only ascii alphanumeric characters, underscores, dashes, and ascii whitespace\")\nMSG_DEF(JSMSG_SECRET_STORE_NAME_EMPTY,                         0, JSEXN_TYPEERR, \"SecretStore constructor: name can not be an empty string\")\nMSG_DEF(JSMSG_SECRET_STORE_NAME_START_WITH_ASCII_ALPHA,        0, JSEXN_TYPEERR, \"SecretStore constructor: name must start with an ascii alpabetical character\")\nMSG_DEF(JSMSG_SECRET_STORE_NAME_TOO_LONG,                      0, JSEXN_TYPEERR, \"SecretStore constructor: name can not be more than 255 characters\")\nMSG_DEF(JSMSG_READABLE_STREAM_LOCKED_OR_DISTRUBED,             0, JSEXN_TYPEERR, \"Can't use a ReadableStream that's locked or has ever been read from or canceled\")\nMSG_DEF(JSMSG_DYNAMIC_BACKENDS_UNSUPPORTED_EXPLICIT,           2, JSEXN_ERR, \"fetch(): No backend provided fetching '{1}'. Since dynamic backends are not enabled for this Fastly service, `fetch()` requires an explicit backend parameter. See https://js-compute-reference-docs.edgecompute.app/docs/globals/fetch for more info. Alternatively, contact Fastly support to enable dynamic backends.\")\nMSG_DEF(JSMSG_DYNAMIC_BACKENDS_UNSUPPORTED_IMPLICIT,           1, JSEXN_ERR, \"Backend constructor: Unable to create a dynamic backend for '{0}' - dynamic backends are unsupported on this service. Either explicitly configure backend services or contact Fastly support to enable dynamic backends.\")\nMSG_DEF(JSMSG_BACKEND_FROMNAME_BACKEND_DOES_NOT_EXIST,         1, JSEXN_ERR, \"Backend.fromName: backend named '{0}' does not exist\")\nMSG_DEF(JSMSG_BACKEND_IS_HEALTHY_BACKEND_DOES_NOT_EXIST,       1, JSEXN_ERR, \"Backend.health: backend named '{0}' does not exist\")\nMSG_DEF(JSMSG_BACKEND_PARAMETER_NOT_OBJECT,                    0, JSEXN_TYPEERR, \"Backend constructor: configuration parameter must be an Object\")\nMSG_DEF(JSMSG_BACKEND_NAME_NOT_SET,                            0, JSEXN_TYPEERR, \"Backend constructor: name can not be null or undefined\")\nMSG_DEF(JSMSG_BACKEND_NAME_TOO_LONG,                           0, JSEXN_TYPEERR, \"Backend constructor: name can not be more than 254 characters\")\nMSG_DEF(JSMSG_BACKEND_NAME_EMPTY,                              0, JSEXN_TYPEERR, \"Backend constructor: name can not be an empty string\")\nMSG_DEF(JSMSG_BACKEND_TARGET_NOT_SET,                          0, JSEXN_TYPEERR, \"Backend constructor: target can not be null or undefined\")\nMSG_DEF(JSMSG_BACKEND_TARGET_EMPTY,                            0, JSEXN_TYPEERR, \"Backend constructor: target can not be an empty string\")\nMSG_DEF(JSMSG_BACKEND_TARGET_INVALID,                          0, JSEXN_TYPEERR, \"Backend constructor: target does not contain a valid IPv4, IPv6, or hostname address\")\nMSG_DEF(JSMSG_BACKEND_CIPHERS_EMPTY,                           0, JSEXN_TYPEERR, \"Backend constructor: ciphers can not be an empty string\")\nMSG_DEF(JSMSG_BACKEND_CIPHERS_NOT_AVALIABLE,                   0, JSEXN_TYPEERR, \"Backend constructor: none of the provided ciphers are supported by Fastly. The list of supported ciphers is available on https://developer.fastly.com/learning/concepts/routing-traffic-to-fastly/#use-a-tls-configuration\")\nMSG_DEF(JSMSG_BACKEND_HOST_OVERRIDE_EMPTY,                     0, JSEXN_TYPEERR, \"Backend constructor: hostOverride can not be an empty string\")\nMSG_DEF(JSMSG_BACKEND_CERTIFICATE_HOSTNAME_EMPTY,              0, JSEXN_TYPEERR, \"Backend constructor: certificateHostname can not be an empty string\")\nMSG_DEF(JSMSG_BACKEND_SNI_HOSTNAME_EMPTY,                      0, JSEXN_TYPEERR, \"Backend constructor: sniHostname can not be an empty string\")\nMSG_DEF(JSMSG_BACKEND_CA_CERTIFICATE_EMPTY,                    0, JSEXN_TYPEERR, \"Backend constructor: caCertificate can not be an empty string\")\nMSG_DEF(JSMSG_BACKEND_TLS_MIN_INVALID,                         0, JSEXN_RANGEERR, \"Backend constructor: tlsMinVersion must be either 1, 1.1, 1.2, or 1.3\")\nMSG_DEF(JSMSG_BACKEND_TLS_MAX_INVALID,                         0, JSEXN_RANGEERR, \"Backend constructor: tlsMaxVersion must be either 1, 1.1, 1.2, or 1.3\")\nMSG_DEF(JSMSG_BACKEND_TLS_MIN_GREATER_THAN_TLS_MAX,            0, JSEXN_RANGEERR, \"Backend constructor: tlsMinVersion must be less than or equal to tlsMaxVersion\")\nMSG_DEF(JSMSG_BACKEND_PORT_INVALID,                            0, JSEXN_RANGEERR, \"Backend constructor: port must be more than 0 and less than 2^16 (65,536)\")\nMSG_DEF(JSMSG_BACKEND_CLIENT_CERTIFICATE_NOT_OBJECT,           0, JSEXN_TYPEERR, \"Backend constructor: clientCertificate must be an object containing 'certificate' and 'key' properties\")\nMSG_DEF(JSMSG_BACKEND_CLIENT_CERTIFICATE_NO_CERTIFICATE,       0, JSEXN_TYPEERR, \"Backend constructor: clientCertificate 'certificate' must be a certificate string\")\nMSG_DEF(JSMSG_BACKEND_CLIENT_CERTIFICATE_CERTIFICATE_EMPTY,    0, JSEXN_TYPEERR, \"Backend constructor: clientCertificate 'certificate' can not be an empty string\")\nMSG_DEF(JSMSG_BACKEND_CLIENT_CERTIFICATE_KEY_INVALID,          0, JSEXN_TYPEERR, \"Backend constructor: clientCertificate 'key' must be a SecretStoreEntry instance\")\nMSG_DEF(JSMSG_BACKEND_TCP_KEEPALIVE_NOT_OBJECT_OR_BOOL,        0, JSEXN_TYPEERR, \"Backend constructor: tcpKeepalive must be a bool or object containing optional 'timeSecs', 'intervalSecs' and 'probes' properties\")\nMSG_DEF(JSMSG_BACKEND_TCP_KEEPALIVE_INVALID_PROBES,            0, JSEXN_TYPEERR, \"Backend constructor: tcpKeepalive 'probes' must be an integer number greater than zero\")\nMSG_DEF(JSMSG_CACHE_OVERRIDE_MODE_INVALID,                     1, JSEXN_TYPEERR, \"CacheOverride constructor: 'mode' has to be \\\"none\\\", \\\"pass\\\", or \\\"override\\\", but got \\\"{0}\\\"\")\nMSG_DEF(JSMSG_RESPONSE_VALUE_NOT_UINT8ARRAY,                   0, JSEXN_TYPEERR, \"Can't convert value to Uint8Array while consuming Body\")\nMSG_DEF(JSMSG_RESPONSE_BODY_DISTURBED_OR_LOCKED,               0, JSEXN_TYPEERR, \"Response body object should not be disturbed or locked\")\nMSG_DEF(JSMSG_RESPONSE_CONSTRUCTOR_INVALID_STATUS,             1, JSEXN_RANGEERR, \"Response constructor: Invalid response status code. The status provided ({0}) is outside the range [200, 599].\")\nMSG_DEF(JSMSG_RESPONSE_CONSTRUCTOR_INVALID_STATUS_TEXT,        0, JSEXN_TYPEERR, \"Response constructor: Invalid response status text. The statusText provided contains invalid characters.\")\nMSG_DEF(JSMSG_RESPONSE_CONSTRUCTOR_BODY_WITH_NULL_BODY_STATUS, 0, JSEXN_TYPEERR, \"Response constructor: Response body is given with a null body status.\")\nMSG_DEF(JSMSG_REQUEST_BACKEND_DOES_NOT_EXIST,                  1, JSEXN_TYPEERR, \"Requested backend named '{0}' does not exist\")\nMSG_DEF(JSMSG_RESPONSE_REDIRECT_INVALID_URI,                   0, JSEXN_TYPEERR, \"Response.redirect: url parameter is not a valid URL.\")\nMSG_DEF(JSMSG_RESPONSE_REDIRECT_INVALID_STATUS,                0, JSEXN_RANGEERR, \"Response.redirect: Invalid redirect status code.\")\nMSG_DEF(JSMSG_RESPONSE_NULL_BODY_STATUS_WITH_BODY,             0, JSEXN_TYPEERR, \"Response with null body status cannot have body\")\nMSG_DEF(JSMSG_RESPONSE_JSON_INVALID_VALUE,                     0, JSEXN_TYPEERR, \"Redirect.json: The data is not JSON serializable\")\nMSG_DEF(JSMSG_TIMEOUT_NEGATIVE,                                2, JSEXN_RANGEERR, \"{0}: {1} can not be a negative number\")\nMSG_DEF(JSMSG_TIMEOUT_TOO_BIG,                                 3, JSEXN_RANGEERR, \"{0}: {1} is above the maximum of {2}\")\nMSG_DEF(JSMSG_TIMEOUT_NAN,                                     2, JSEXN_RANGEERR, \"{0}: {1} is not a valid number\")\nMSG_DEF(JSMSG_INVALID_BUFFER,                                  1, JSEXN_TYPEERR, \"{0}: bytes must be an ArrayBuffer or ArrayBufferView object\")\nMSG_DEF(JSMSG_SIMPLE_CACHE_SET_CONTENT_STREAM,                 0, JSEXN_TYPEERR, \"Content-provided streams are not yet supported for streaming into SimpleCache\")\nMSG_DEF(JSMSG_BODY_APPEND_CONTENT_STREAM,                      0, JSEXN_TYPEERR, \"Content-provided streams are not yet supported for appending onto a FastlyBody\")\nMSG_DEF(JSMSG_BODY_PREPEND_CONTENT_STREAM,                     0, JSEXN_TYPEERR, \"Content-provided streams are not yet supported for prepending onto a FastlyBody\")\n//clang-format on"
  },
  {
    "path": "runtime/fastly/host-api/fastly.h",
    "content": "#ifndef fastly_H\n#define fastly_H\n#ifdef __cplusplus\nextern \"C\" {\nnamespace fastly {\n#endif\n\n#include <stdbool.h>\n#include <stddef.h>\n#include <stdint.h>\n\ntypedef struct fastly_world_string {\n  uint8_t *ptr;\n  size_t len;\n} fastly_world_string;\n\ntypedef struct fastly_world_list_string {\n  fastly_world_string *ptr;\n  size_t len;\n} fastly_world_list_string;\n\ntypedef struct fastly_world_list_u8 {\n  uint8_t *ptr;\n  size_t len;\n} fastly_world_list_u8;\n\ntypedef struct fastly_world_list_list_u8 {\n  fastly_world_list_u8 *ptr;\n  size_t len;\n} fastly_world_list_list_u8;\n\ntypedef struct {\n  bool is_some;\n  fastly_world_list_list_u8 val;\n} fastly_world_option_list_list_u8;\n\ntypedef struct fastly_host_http_response {\n  uint32_t f0;\n  uint32_t f1;\n} fastly_host_http_response;\n\ntypedef struct fastly_host_http_inspect_options {\n  const char *corp;\n  uint32_t corp_len;\n  const char *workspace;\n  uint32_t workspace_len;\n  const char *override_client_ip_ptr;\n  uint32_t override_client_ip_len;\n} fastly_host_http_inspect_options;\n\ntypedef fastly_host_http_response fastly_world_tuple2_handle_handle;\n\n#define WASM_IMPORT(module, name) __attribute__((import_module(module), import_name(name)))\n\n// max header size to match vcl\n#define HEADER_MAX_LEN 69000\n#define METHOD_MAX_LEN 1024\n#define URI_MAX_LEN 8192\n#define CONFIG_STORE_INITIAL_BUF_LEN 512\n#define DICTIONARY_ENTRY_MAX_LEN 8000\n\n// Ensure that all the things we want to use the hostcall buffer for actually\n// fit into the buffer.\n#define HOSTCALL_BUFFER_LEN HEADER_MAX_LEN\nstatic_assert(DICTIONARY_ENTRY_MAX_LEN < HOSTCALL_BUFFER_LEN);\nstatic_assert(METHOD_MAX_LEN < HOSTCALL_BUFFER_LEN);\nstatic_assert(URI_MAX_LEN < HOSTCALL_BUFFER_LEN);\n\n#define LIST_ALLOC_SIZE 50\n\ntypedef uint8_t fastly_host_error;\n\n// Unknown error value.\n// It should be an internal error if this is returned.\n#define FASTLY_HOST_ERROR_UNKNOWN_ERROR 0\n// Generic error value.\n// This means that some unexpected error occurred during a hostcall.\n#define FASTLY_HOST_ERROR_GENERIC_ERROR 1\n// Invalid argument.\n#define FASTLY_HOST_ERROR_INVALID_ARGUMENT 2\n// Invalid handle.\n// Thrown when a handle is not valid. E.G. No dictionary exists with the given name.\n#define FASTLY_HOST_ERROR_BAD_HANDLE 3\n// Buffer length error.\n// Thrown when a buffer is too long.\n#define FASTLY_HOST_ERROR_BUFFER_LEN 4\n// Unsupported operation error.\n// This error is thrown when some operation cannot be performed, because it is not supported.\n#define FASTLY_HOST_ERROR_UNSUPPORTED 5\n// Alignment error.\n// This is thrown when a pointer does not point to a properly aligned slice of memory.\n#define FASTLY_HOST_ERROR_BAD_ALIGN 6\n// Invalid HTTP error.\n// This can be thrown when a method, URI, header, or status is not valid. This can also\n// be thrown if a message head is too large.\n#define FASTLY_HOST_ERROR_HTTP_INVALID 7\n// HTTP user error.\n// This is thrown in cases where user code caused an HTTP error. For example, attempt to send\n// a 1xx response code, or a request with a non-absolute URI. This can also be caused by\n// an unexpected header: both `content-length` and `transfer-encoding`, for example.\n#define FASTLY_HOST_ERROR_HTTP_USER 8\n// HTTP incomplete message error.\n// This can be thrown when a stream ended unexpectedly.\n#define FASTLY_HOST_ERROR_HTTP_INCOMPLETE 9\n// A `None` error.\n// This status code is used to indicate when an optional value did not exist, as opposed to\n// an empty value.\n// Note, this value should no longer be used, as we have explicit optional types now.\n#define FASTLY_HOST_ERROR_OPTIONAL_NONE 10\n// Message head too large.\n#define FASTLY_HOST_ERROR_HTTP_HEAD_TOO_LARGE 11\n// Invalid HTTP status.\n#define FASTLY_HOST_ERROR_HTTP_INVALID_STATUS 12\n// Limit exceeded\n//\n// This is returned when an attempt to allocate a resource has exceeded the maximum number of\n// resources permitted. For example, creating too many response handles.\n#define FASTLY_HOST_ERROR_LIMIT_EXCEEDED 13\n\ntypedef uint8_t fastly_host_http_send_error_detail_tag;\n\n// The send-error-detail struct has not been populated.\n#define FASTLY_HOST_HTTP_SEND_ERROR_DETAIL_TAG_UNINITIALIZED 0\n// There was no send error.\n#define FASTLY_HOST_HTTP_SEND_ERROR_DETAIL_TAG_OK 1\n// The system encountered a timeout when trying to find an IP address for the backend\n// hostname.\n#define FASTLY_HOST_HTTP_SEND_ERROR_DETAIL_TAG_DNS_TIMEOUT 2\n// The system encountered a DNS error when trying to find an IP address for the backend\n// hostname. The fields dns-error-rcode and dns-error-info-code may be set in the\n// send-error-detail.\n#define FASTLY_HOST_HTTP_SEND_ERROR_DETAIL_TAG_DNS_ERROR 3\n// The system cannot determine which backend to use, or the specified backend was invalid.\n#define FASTLY_HOST_HTTP_SEND_ERROR_DETAIL_TAG_DESTINATION_NOT_FOUND 4\n// The system considers the backend to be unavailable e.g., recent attempts to communicate\n// with it may have failed, or a health check may indicate that it is down.\n#define FASTLY_HOST_HTTP_SEND_ERROR_DETAIL_TAG_DESTINATION_UNAVAILABLE 5\n// The system cannot find a route to the next-hop IP address.\n#define FASTLY_HOST_HTTP_SEND_ERROR_DETAIL_TAG_DESTINATION_IP_UNROUTABLE 6\n// The system's connection to the backend was refused.\n#define FASTLY_HOST_HTTP_SEND_ERROR_DETAIL_TAG_CONNECTION_REFUSED 7\n// The system's connection to the backend was closed before a complete response was\n// received.\n#define FASTLY_HOST_HTTP_SEND_ERROR_DETAIL_TAG_CONNECTION_TERMINATED 8\n// The system's attempt to open a connection to the backend timed out.\n#define FASTLY_HOST_HTTP_SEND_ERROR_DETAIL_TAG_CONNECTION_TIMEOUT 9\n// The system is configured to limit the number of connections it has to the backend, and\n// that limit has been exceeded.\n#define FASTLY_HOST_HTTP_SEND_ERROR_DETAIL_TAG_CONNECTION_LIMIT_REACHED 10\n// The system encountered an error when verifying the certificate presented by the backend.\n#define FASTLY_HOST_HTTP_SEND_ERROR_DETAIL_TAG_TLS_CERTIFICATE_ERROR 11\n// The system encountered an error with the backend TLS configuration.\n#define FASTLY_HOST_HTTP_SEND_ERROR_DETAIL_TAG_TLS_CONFIGURATION_ERROR 12\n// The system received an incomplete response to the request from the backend.\n#define FASTLY_HOST_HTTP_SEND_ERROR_DETAIL_TAG_HTTP_INCOMPLETE_RESPONSE 13\n// The system received a response to the request whose header section was considered too\n// large.\n#define FASTLY_HOST_HTTP_SEND_ERROR_DETAIL_TAG_HTTP_RESPONSE_HEADER_SECTION_TOO_LARGE 14\n// The system received a response to the request whose body was considered too large.\n#define FASTLY_HOST_HTTP_SEND_ERROR_DETAIL_TAG_HTTP_RESPONSE_BODY_TOO_LARGE 15\n// The system reached a configured time limit waiting for the complete response.\n#define FASTLY_HOST_HTTP_SEND_ERROR_DETAIL_TAG_HTTP_RESPONSE_TIMEOUT 16\n// The system received a response to the request whose status code or reason phrase was\n// invalid.\n#define FASTLY_HOST_HTTP_SEND_ERROR_DETAIL_TAG_HTTP_RESPONSE_STATUS_INVALID 17\n// The process of negotiating an upgrade of the HTTP version between the system and the\n// backend failed.\n#define FASTLY_HOST_HTTP_SEND_ERROR_DETAIL_TAG_HTTP_UPGRADE_FAILED 18\n// The system encountered an HTTP protocol error when communicating with the backend. This\n// error will only be used when a more specific one is not defined.\n#define FASTLY_HOST_HTTP_SEND_ERROR_DETAIL_TAG_HTTP_PROTOCOL_ERROR 19\n// An invalid cache key was provided for the request.\n#define FASTLY_HOST_HTTP_SEND_ERROR_DETAIL_TAG_HTTP_REQUEST_CACHE_KEY_INVALID 20\n// An invalid URI was provided for the request.\n#define FASTLY_HOST_HTTP_SEND_ERROR_DETAIL_TAG_HTTP_REQUEST_URI_INVALID 21\n// The system encountered an unexpected internal error.\n#define FASTLY_HOST_HTTP_SEND_ERROR_DETAIL_TAG_INTERNAL_ERROR 22\n// The system received a TLS alert from the backend. The field tls-alert-id may be set in\n// the send-error-detail.\n#define FASTLY_HOST_HTTP_SEND_ERROR_DETAIL_TAG_TLS_ALERT_RECEIVED 23\n// The system encountered a TLS error when communicating with the backend, either during\n// the handshake or afterwards.\n#define FASTLY_HOST_HTTP_SEND_ERROR_DETAIL_TAG_TLS_PROTOCOL_ERROR 24\n\n// Mask representing which fields are understood by the guest, and which have been set by the host.\n//\n// When the guest calls hostcalls with a mask, it should set every bit in the mask that corresponds\n// to a defined flag. This signals the host to write only to fields with a set bit, allowing\n// forward compatibility for existing guest programs even after new fields are added to the struct.\ntypedef uint8_t fastly_host_http_send_error_detail_mask;\n\n#define FASTLY_HOST_HTTP_SEND_ERROR_DETAIL_MASK_RESERVED (1 << 0)\n#define FASTLY_HOST_HTTP_SEND_ERROR_DETAIL_MASK_DNS_ERROR_RCODE (1 << 1)\n#define FASTLY_HOST_HTTP_SEND_ERROR_DETAIL_MASK_DNS_ERROR_INFO_CODE (1 << 2)\n#define FASTLY_HOST_HTTP_SEND_ERROR_DETAIL_MASK_TLS_ALERT_ID (1 << 3)\n\ntypedef struct fastly_host_http_send_error_detail {\n  fastly_host_http_send_error_detail_tag tag;\n  fastly_host_http_send_error_detail_mask mask;\n  uint16_t dns_error_rcode;\n  uint16_t dns_error_info_code;\n  uint8_t tls_alert_id;\n} fastly_host_http_send_error_detail;\n\ntypedef uint32_t fastly_kv_error;\n\n// The values need to match https://docs.rs/fastly-sys/0.10.5/src/fastly_sys/lib.rs.html#111\n#define BACKEND_CONFIG_RESERVED (1u << 0)\n#define BACKEND_CONFIG_HOST_OVERRIDE (1u << 1)\n#define BACKEND_CONFIG_CONNECT_TIMEOUT (1u << 2)\n#define BACKEND_CONFIG_FIRST_BYTE_TIMEOUT (1u << 3)\n#define BACKEND_CONFIG_BETWEEN_BYTES_TIMEOUT (1u << 4)\n#define BACKEND_CONFIG_USE_SSL (1u << 5)\n#define BACKEND_CONFIG_SSL_MIN_VERSION (1u << 6)\n#define BACKEND_CONFIG_SSL_MAX_VERSION (1u << 7)\n#define BACKEND_CONFIG_CERT_HOSTNAME (1u << 8)\n#define BACKEND_CONFIG_CA_CERT (1u << 9)\n#define BACKEND_CONFIG_CIPHERS (1u << 10)\n#define BACKEND_CONFIG_SNI_HOSTNAME (1u << 11)\n#define BACKEND_CONFIG_DONT_POOL (1u << 12)\n#define BACKEND_CONFIG_CLIENT_CERT (1u << 13)\n#define BACKEND_CONFIG_GRPC (1u << 14)\n#define BACKEND_CONFIG_KEEPALIVE (1u << 15)\n\ntypedef enum BACKEND_HEALTH {\n  UNKNOWN = 0,\n  HEALTHY = 1,\n  UNHEALTHY = 2,\n} BACKEND_HEALTH;\n\ntypedef enum TLS {\n  VERSION_1 = 0,\n  VERSION_1_1 = 1,\n  VERSION_1_2 = 2,\n  VERSION_1_3 = 3,\n} TLS;\n\ntypedef struct DynamicBackendConfig {\n  const char *host_override;\n  uint32_t host_override_len;\n  uint32_t connect_timeout_ms;\n  uint32_t first_byte_timeout_ms;\n  uint32_t between_bytes_timeout_ms;\n  uint32_t ssl_min_version;\n  uint32_t ssl_max_version;\n  const char *cert_hostname;\n  uint32_t cert_hostname_len;\n  const char *ca_cert;\n  uint32_t ca_cert_len;\n  const char *ciphers;\n  uint32_t ciphers_len;\n  const char *sni_hostname;\n  uint32_t sni_hostname_len;\n  const char *client_certificate;\n  uint32_t client_certificate_len;\n  uint32_t client_key;\n  uint32_t http_keepalive_time_ms;\n  uint32_t tcp_keepalive_enable;\n  uint32_t tcp_keepalive_interval_secs;\n  uint32_t tcp_keepalive_probes;\n  uint32_t tcp_keepalive_time_secs;\n} DynamicBackendConfig;\n\n#define INVALID_HANDLE (UINT32_MAX - 1)\n\ntypedef enum BodyWriteEnd {\n  BodyWriteEndBack = 0,\n  BodyWriteEndFront = 1,\n} BodyWriteEnd;\n\n#define CACHE_OVERRIDE_NONE (0u)\n#define CACHE_OVERRIDE_PASS (1u << 0)\n#define CACHE_OVERRIDE_TTL (1u << 1)\n#define CACHE_OVERRIDE_STALE_WHILE_REVALIDATE (1u << 2)\n#define CACHE_OVERRIDE_PCI (1u << 3)\n\ntypedef uint32_t req_inspect_config_options_mask;\n\n#define FASTLY_HOST_HTTP_REQ_INSPECT_CONFIG_OPTIONS_MASK_RESERVED (1 << 0);\n#define FASTLY_HOST_HTTP_REQ_INSPECT_CONFIG_OPTIONS_MASK_CORP (1 << 1);\n#define FASTLY_HOST_HTTP_REQ_INSPECT_CONFIG_OPTIONS_MASK_WORKSPACE (1 << 2);\n#define FASTLY_HOST_HTTP_REQ_INSPECT_CONFIG_OPTIONS_MASK_OVERRIDE_CLIENT_IP (1 << 3);\n\nWASM_IMPORT(\"fastly_abi\", \"init\")\nint init(uint64_t abi_version);\n\n// Module fastly_http_body\nWASM_IMPORT(\"fastly_http_body\", \"append\")\nint body_append(uint32_t dst_handle, uint32_t src_handle);\n\nWASM_IMPORT(\"fastly_http_body\", \"new\")\nint body_new(uint32_t *handle_out);\n\nWASM_IMPORT(\"fastly_http_body\", \"read\")\nint body_read(uint32_t body_handle, uint8_t *buf, size_t buf_len, size_t *nread);\n\nWASM_IMPORT(\"fastly_http_body\", \"write\")\nint body_write(uint32_t body_handle, const uint8_t *buf, size_t buf_len, BodyWriteEnd end,\n               size_t *nwritten);\n\nWASM_IMPORT(\"fastly_http_body\", \"close\")\nint body_close(uint32_t body_handle);\n\nWASM_IMPORT(\"fastly_http_body\", \"abandon\")\nint body_abandon(uint32_t body_handle);\n\nWASM_IMPORT(\"fastly_http_body\", \"trailer_append\")\nint body_trailer_append(uint32_t body_handle, const uint8_t *name, size_t name_len,\n                        const uint8_t *value, size_t value_len);\n\nWASM_IMPORT(\"fastly_http_body\", \"trailer_names_get\")\nint body_trailer_names_get(uint32_t body_handle, char *buf, size_t buf_len, uint32_t cursor,\n                           uint32_t *ending_cursor, size_t *nwritten);\n\nWASM_IMPORT(\"fastly_http_body\", \"trailer_value_get\")\nint body_trailer_value_get(uint32_t body_handle, const uint8_t *name, size_t name_len, char *value,\n                           size_t value_max_len, size_t *nwritten);\n\nWASM_IMPORT(\"fastly_http_body\", \"trailer_values_get\")\nint body_trailer_values_get(uint32_t body_handle, const uint8_t *name, size_t name_len, char *buf,\n                            size_t buf_len, uint32_t cursor, uint32_t *ending_cursor,\n                            size_t *nwritten);\n\nWASM_IMPORT(\"fastly_http_body\", \"known_length\")\nint body_known_length(uint32_t body_handle, uint64_t *length);\n\n// Module fastly_http_cache\n// HTTP Cache handle type\ntypedef uint32_t fastly_http_cache_handle;\n\n// HTTP Cache specific types\ntypedef uint32_t fastly_is_cacheable;\ntypedef uint32_t fastly_is_sensitive;\n\n// HTTP storage action enum\ntypedef uint8_t fastly_http_storage_action;\n#define FASTLY_HTTP_STORAGE_ACTION_INSERT 0\n#define FASTLY_HTTP_STORAGE_ACTION_UPDATE 1\n#define FASTLY_HTTP_STORAGE_ACTION_DO_NOT_STORE 2\n#define FASTLY_HTTP_STORAGE_ACTION_RECORD_UNCACHEABLE 3\n\n// HTTP Cache lookup options\ntypedef struct __attribute__((aligned(4))) fastly_http_cache_lookup_options {\n  const char *override_key;\n  size_t override_key_len;\n} fastly_http_cache_lookup_options;\n\n// HTTP Cache lookup options mask\n#define FASTLY_HTTP_CACHE_LOOKUP_OPTIONS_MASK_RESERVED (1 << 0)\n#define FASTLY_HTTP_CACHE_LOOKUP_OPTIONS_MASK_OVERRIDE_KEY (1 << 1)\n\n// HTTP Cache write options\ntypedef struct __attribute__((aligned(8))) fastly_http_cache_write_options {\n  uint64_t max_age_ns;\n  const char *vary_rule;\n  size_t vary_rule_len;\n  uint64_t initial_age_ns;\n  uint64_t stale_while_revalidate_ns;\n  const char *surrogate_keys;\n  size_t surrogate_keys_len;\n  uint64_t length;\n} fastly_http_cache_write_options;\n\n// HTTP Cache write options mask\n#define FASTLY_HTTP_CACHE_WRITE_OPTIONS_MASK_RESERVED (1 << 0)\n#define FASTLY_HTTP_CACHE_WRITE_OPTIONS_MASK_VARY_RULE (1 << 1)\n#define FASTLY_HTTP_CACHE_WRITE_OPTIONS_MASK_INITIAL_AGE_NS (1 << 2)\n#define FASTLY_HTTP_CACHE_WRITE_OPTIONS_MASK_STALE_WHILE_REVALIDATE_NS (1 << 3)\n#define FASTLY_HTTP_CACHE_WRITE_OPTIONS_MASK_SURROGATE_KEYS (1 << 4)\n#define FASTLY_HTTP_CACHE_WRITE_OPTIONS_MASK_LENGTH (1 << 5)\n#define FASTLY_HTTP_CACHE_WRITE_OPTIONS_MASK_SENSITIVE_DATA (1 << 6)\n\n// HTTP Cache host calls\nWASM_IMPORT(\"fastly_http_cache\", \"is_request_cacheable\")\nint http_cache_is_request_cacheable(uint32_t req_handle, uint32_t *is_cacheable_out);\n\nWASM_IMPORT(\"fastly_http_cache\", \"get_suggested_cache_key\")\nint http_cache_get_suggested_cache_key(uint32_t req_handle, char *key_out, size_t key_out_len,\n                                       size_t *nwritten_out);\n\nWASM_IMPORT(\"fastly_http_cache\", \"transaction_lookup\")\nint http_cache_transaction_lookup(uint32_t req_handle, uint32_t options_mask,\n                                  fastly_http_cache_lookup_options *options, uint32_t *handle_out);\n\nWASM_IMPORT(\"fastly_http_cache\", \"transaction_insert\")\nint http_cache_transaction_insert(uint32_t handle, uint32_t resp_handle, uint32_t options_mask,\n                                  fastly_http_cache_write_options *options,\n                                  uint32_t *body_handle_out);\n\nWASM_IMPORT(\"fastly_http_cache\", \"transaction_insert_and_stream_back\")\nint http_cache_transaction_insert_and_stream_back(uint32_t handle, uint32_t resp_handle,\n                                                  uint32_t options_mask,\n                                                  fastly_http_cache_write_options *options,\n                                                  uint32_t *body_handle_out,\n                                                  uint32_t *cache_handle_out);\n\nWASM_IMPORT(\"fastly_http_cache\", \"transaction_update\")\nint http_cache_transaction_update(uint32_t handle, uint32_t resp_handle, uint32_t options_mask,\n                                  fastly_http_cache_write_options *options);\n\nWASM_IMPORT(\"fastly_http_cache\", \"transaction_update_and_return_fresh\")\nint http_cache_transaction_update_and_return_fresh(uint32_t handle, uint32_t resp_handle,\n                                                   uint32_t options_mask,\n                                                   fastly_http_cache_write_options *options,\n                                                   uint32_t *fresh_handle_out);\n\nWASM_IMPORT(\"fastly_http_cache\", \"transaction_record_not_cacheable\")\nint http_cache_transaction_record_not_cacheable(uint32_t handle, uint32_t options_mask,\n                                                fastly_http_cache_write_options *options);\n\nWASM_IMPORT(\"fastly_http_cache\", \"transaction_abandon\")\nint http_cache_transaction_abandon(uint32_t handle);\n\nWASM_IMPORT(\"fastly_http_cache\", \"close\")\nint http_cache_close(uint32_t handle);\n\nWASM_IMPORT(\"fastly_http_cache\", \"get_suggested_backend_request\")\nint http_cache_get_suggested_backend_request(uint32_t handle, uint32_t *req_handle_out);\n\nWASM_IMPORT(\"fastly_http_cache\", \"get_suggested_cache_options\")\nint http_cache_get_suggested_cache_options(uint32_t handle, uint32_t response_handle,\n                                           uint32_t options_mask,\n                                           fastly_http_cache_write_options *options,\n                                           uint32_t *options_mask_out,\n                                           fastly_http_cache_write_options *options_out);\n\nWASM_IMPORT(\"fastly_http_cache\", \"prepare_response_for_storage\")\nint http_cache_prepare_response_for_storage(uint32_t handle, uint32_t response_handle,\n                                            uint8_t *storage_action_out,\n                                            uint32_t *updated_resp_handle_out);\n\nWASM_IMPORT(\"fastly_http_cache\", \"get_found_response\")\nint http_cache_get_found_response(uint32_t handle, uint32_t transform_for_client,\n                                  uint32_t *resp_handle_out, uint32_t *body_handle_out);\n\nWASM_IMPORT(\"fastly_http_cache\", \"get_state\")\nint http_cache_get_state(uint32_t handle, uint8_t *state_out);\n\nWASM_IMPORT(\"fastly_http_cache\", \"get_length\")\nint http_cache_get_length(uint32_t handle, uint64_t *length_out);\n\nWASM_IMPORT(\"fastly_http_cache\", \"get_max_age_ns\")\nint http_cache_get_max_age_ns(uint32_t handle, uint64_t *max_age_ns_out);\n\nWASM_IMPORT(\"fastly_http_cache\", \"get_stale_while_revalidate_ns\")\nint http_cache_get_stale_while_revalidate_ns(uint32_t handle, uint64_t *swr_ns_out);\n\nWASM_IMPORT(\"fastly_http_cache\", \"get_age_ns\")\nint http_cache_get_age_ns(uint32_t handle, uint64_t *age_ns_out);\n\nWASM_IMPORT(\"fastly_http_cache\", \"get_hits\")\nint http_cache_get_hits(uint32_t handle, uint64_t *hits_out);\n\nWASM_IMPORT(\"fastly_http_cache\", \"get_sensitive_data\")\nint http_cache_get_sensitive_data(uint32_t handle, uint32_t *is_sensitive_out);\n\nWASM_IMPORT(\"fastly_http_cache\", \"get_surrogate_keys\")\nint http_cache_get_surrogate_keys(uint32_t handle, char *surrogate_keys_out,\n                                  size_t surrogate_keys_out_len, size_t *nwritten_out);\n\nWASM_IMPORT(\"fastly_http_cache\", \"get_vary_rule\")\nint http_cache_get_vary_rule(uint32_t handle, char *vary_rule_out, size_t vary_rule_out_len,\n                             size_t *nwritten_out);\n\n// Module fastly_log\nWASM_IMPORT(\"fastly_log\", \"endpoint_get\")\nint log_endpoint_get(const char *name, size_t name_len, uint32_t *endpoint_handle);\n\nWASM_IMPORT(\"fastly_log\", \"write\")\nint log_write(uint32_t endpoint_handle, const char *msg, size_t msg_len, size_t *nwritten);\n\n// Module fastly_http_downstream\n\ntypedef struct fastly_http_downstream_next_request_options {\n  uint32_t timeout_ms;\n} fastly_http_downstream_next_request_options;\n\n#define FASTLY_HTTP_DOWNSTREAM_NEXT_REQUEST_OPTIONS_MASK_RESERVED (1 << 0)\n#define FASTLY_HTTP_DOWNSTREAM_NEXT_REQUEST_OPTIONS_MASK_TIMEOUT (1 << 1)\n\nWASM_IMPORT(\"fastly_http_downstream\", \"next_request\")\nint downstream_next_request(uint32_t options_mask,\n                            fastly_http_downstream_next_request_options *options,\n                            uint32_t *req_promise_handle_out);\n\nWASM_IMPORT(\"fastly_http_downstream\", \"next_request_wait\")\nint downstream_next_request_wait(uint32_t req_promise_handle, uint32_t *req_handle_out,\n                                 uint32_t *body_handle_out);\n\nWASM_IMPORT(\"fastly_http_downstream\", \"next_request_abandon\")\nint downstream_next_request_abandon(uint32_t req_promise_handle);\n\n// Module fastly_http_req\nWASM_IMPORT(\"fastly_http_req\", \"register_dynamic_backend\")\nint req_register_dynamic_backend(const char *name_prefix, size_t name_prefix_len,\n                                 const char *target, size_t target_len,\n                                 uint32_t backend_config_mask,\n                                 DynamicBackendConfig *backend_configuration);\n\nWASM_IMPORT(\"fastly_http_req\", \"body_downstream_get\")\nint req_body_downstream_get(uint32_t *req_handle_out, uint32_t *body_handle_out);\n\nWASM_IMPORT(\"fastly_http_req\", \"redirect_to_grip_proxy_v2\")\nint req_redirect_to_grip_proxy_v2(uint32_t req_handle, const char *backend_name,\n                                  size_t backend_name_len);\n\nWASM_IMPORT(\"fastly_http_req\", \"redirect_to_websocket_proxy_v2\")\nint req_redirect_to_websocket_proxy_v2(uint32_t req_handle, const char *backend_name,\n                                       size_t backend_name_len);\n\n/**\n * Set the cache override behavior for this request.\n *\n * The default behavior, equivalent to `CACHE_OVERRIDE_NONE`, respects the cache control headers\n * from the origin's response.\n *\n * Calling this function with `CACHE_OVERRIDE_PASS` will ignore the subsequent arguments and Pass\n * unconditionally.\n *\n * To override, TTL, stale-while-revalidate, or stale-with-error, set the appropriate bits in the\n * tag using the corresponding constants, and pass the override values in the appropriate arguments.\n *\n * fastly_req_cache_override_v2_set also includes an optional Surrogate-Key which will be set or\n * added to any received from the origin.\n */\n\nWASM_IMPORT(\"fastly_http_req\", \"cache_override_set\")\nint req_cache_override_set(uint32_t req_handle, int tag, uint32_t ttl,\n                           uint32_t stale_while_revalidate);\n\nWASM_IMPORT(\"fastly_http_req\", \"cache_override_v2_set\")\nint req_cache_override_v2_set(uint32_t req_handle, int tag, uint32_t ttl,\n                              uint32_t stale_while_revalidate, const char *surrogate_key,\n                              size_t surrogate_key_len);\n\n#define FASTLY_HOST_CONTENT_ENCODINGS_GZIP (1 << 0)\n\nWASM_IMPORT(\"fastly_http_req\", \"auto_decompress_response_set\")\nint req_auto_decompress_response_set(uint32_t req_handle, int tag);\n\nWASM_IMPORT(\"fastly_http_downstream\", \"downstream_client_request_id\")\nint http_downstream_client_request_id(uint32_t req_handle, uint8_t *ret, size_t ret_len,\n                                      size_t *nwritten);\n\n/**\n * `octets` must be a 16-byte array.\n * If, after a successful call, `nwritten` == 4, the value in `octets` is an IPv4 address.\n * Otherwise, if `nwritten` will is `16`, the value in `octets` is an IPv6 address.\n * Otherwise, `nwritten` will be `0`, and no address is available.\n */\nWASM_IMPORT(\"fastly_http_downstream\", \"downstream_client_ip_addr\")\nint http_downstream_client_ip_addr_get(uint32_t req_handle, uint8_t *octets, size_t *nwritten);\n\nWASM_IMPORT(\"fastly_http_downstream\", \"downstream_server_ip_addr\")\nint http_downstream_server_ip_addr_get(uint32_t req_handle, uint8_t *octets, size_t *nwritten);\n\nWASM_IMPORT(\"fastly_http_downstream\", \"downstream_tls_cipher_openssl_name\")\nint http_downstream_tls_cipher_openssl_name(uint32_t req_handle, char *ret, size_t ret_len,\n                                            size_t *nwritten);\n\nWASM_IMPORT(\"fastly_http_downstream\", \"downstream_tls_protocol\")\nint http_downstream_tls_protocol(uint32_t req_handle, char *ret, size_t ret_len, size_t *nwritten);\n\nWASM_IMPORT(\"fastly_http_downstream\", \"downstream_tls_client_hello\")\nint http_downstream_tls_client_hello(uint32_t req_handle, uint8_t *ret, size_t ret_len,\n                                     size_t *nwritten);\n\nWASM_IMPORT(\"fastly_http_downstream\", \"downstream_tls_raw_client_certificate\")\nint http_downstream_tls_raw_client_certificate(uint32_t req_handle, uint8_t *ret, size_t ret_len,\n                                               size_t *nwritten);\n\nWASM_IMPORT(\"fastly_http_downstream\", \"downstream_tls_ja3_md5\")\nint http_downstream_tls_ja3_md5(uint32_t req_handle, uint8_t *ret, size_t *nwritten);\n\nWASM_IMPORT(\"fastly_http_downstream\", \"downstream_tls_ja4\")\nint http_downstream_tls_ja4(uint32_t req_handle, uint8_t *ret, size_t ret_len, size_t *nwritten);\n\nWASM_IMPORT(\"fastly_http_downstream\", \"downstream_client_h2_fingerprint\")\nint http_downstream_client_h2_fingerprint(uint32_t req_handle, uint8_t *ret, size_t ret_len,\n                                          size_t *nwritten);\n\nWASM_IMPORT(\"fastly_http_downstream\", \"downstream_client_oh_fingerprint\")\nint http_downstream_client_oh_fingerprint(uint32_t req_handle, uint8_t *ret, size_t ret_len,\n                                          size_t *nwritten);\n\nWASM_IMPORT(\"fastly_http_req\", \"new\")\nint req_new(uint32_t *req_handle_out);\n\nWASM_IMPORT(\"fastly_http_req\", \"header_names_get\")\nint req_header_names_get(uint32_t req_handle, uint8_t *buf, size_t buf_len, uint32_t cursor,\n                         int64_t *ending_cursor, size_t *nwritten);\n\nWASM_IMPORT(\"fastly_http_req\", \"original_header_names_get\")\nint req_original_header_names_get(uint8_t *buf, size_t buf_len, uint32_t cursor,\n                                  int64_t *ending_cursor, size_t *nwritten);\n\nWASM_IMPORT(\"fastly_http_req\", \"original_header_count\")\nint req_original_header_count(uint32_t *count);\n\nWASM_IMPORT(\"fastly_http_req\", \"header_value_get\")\nint req_header_value_get(uint32_t req_handle, const char *name, size_t name_len, uint8_t *value,\n                         size_t value_max_len, size_t *nwritten);\n\nWASM_IMPORT(\"fastly_http_req\", \"header_values_get\")\nint req_header_values_get(uint32_t req_handle, const char *name, size_t name_len, uint8_t *buf,\n                          size_t buf_len, uint32_t cursor, int64_t *ending_cursor,\n                          size_t *nwritten);\n\nWASM_IMPORT(\"fastly_http_req\", \"header_insert\")\nint req_header_insert(uint32_t req_handle, const char *name, size_t name_len, const uint8_t *value,\n                      size_t value_len);\n\nWASM_IMPORT(\"fastly_http_req\", \"header_append\")\nint req_header_append(uint32_t req_handle, const char *name, size_t name_len, const uint8_t *value,\n                      size_t value_len);\n\nWASM_IMPORT(\"fastly_http_req\", \"header_remove\")\nint req_header_remove(uint32_t req_handle, const char *name, size_t name_len);\n\nWASM_IMPORT(\"fastly_http_req\", \"method_get\")\nint req_method_get(uint32_t req_handle, char *method, size_t method_max_len, size_t *nwritten);\n\nWASM_IMPORT(\"fastly_http_req\", \"method_set\")\nint req_method_set(uint32_t req_handle, const char *method, size_t method_len);\n\nWASM_IMPORT(\"fastly_http_req\", \"uri_get\")\nint req_uri_get(uint32_t req_handle, char *uri, size_t uri_max_len, size_t *nwritten);\n\nWASM_IMPORT(\"fastly_http_req\", \"uri_set\")\nint req_uri_set(uint32_t req_handle, const char *uri, size_t uri_len);\n\nWASM_IMPORT(\"fastly_http_req\", \"version_get\")\nint req_version_get(uint32_t req_handle, uint32_t *version);\n\nWASM_IMPORT(\"fastly_http_req\", \"version_set\")\nint req_version_set(uint32_t req_handle, uint32_t version);\n\nWASM_IMPORT(\"fastly_http_req\", \"framing_headers_mode_set\")\nint req_framing_headers_mode_set(uint32_t req_handle, uint32_t mode);\n\nWASM_IMPORT(\"fastly_http_req\", \"send\")\nint req_send(uint32_t req_handle, uint32_t body_handle, const uint8_t *backend, size_t backend_len,\n             uint32_t *resp_handle_out, uint32_t *resp_body_handle_out);\n\nWASM_IMPORT(\"fastly_http_req\", \"send_async\")\nint req_send_async(uint32_t req_handle, uint32_t body_handle, const char *backend,\n                   size_t backend_len, uint32_t *pending_req_out);\n\nWASM_IMPORT(\"fastly_http_req\", \"send_async_streaming\")\nint req_send_async_streaming(uint32_t req_handle, uint32_t body_handle, const char *backend,\n                             size_t backend_len, uint32_t *pending_req_out);\n\nWASM_IMPORT(\"fastly_http_req\", \"send_async_v2\")\nint req_send_async_v2(uint32_t req_handle, uint32_t body_handle, const char *backend,\n                      size_t backend_len, uint32_t streaming, uint32_t *pending_req_out);\n\nWASM_IMPORT(\"fastly_http_req\", \"pending_req_poll\")\nint req_pending_req_poll(uint32_t req_handle, uint32_t *is_done_out, uint32_t *resp_handle_out,\n                         uint32_t *resp_body_handle_out);\n\nWASM_IMPORT(\"fastly_http_req\", \"pending_req_select\")\nint req_pending_req_select(uint32_t req_handles[], size_t req_handles_len, uint32_t *done_idx_out,\n                           uint32_t *resp_handle_out, uint32_t *resp_body_handle_out);\n\nWASM_IMPORT(\"fastly_http_req\", \"pending_req_wait\")\nint req_pending_req_wait(uint32_t req_handle, uint32_t *resp_handle_out,\n                         uint32_t *resp_body_handle_out);\n\nWASM_IMPORT(\"fastly_http_req\", \"pending_req_wait_v2\")\nint req_pending_req_wait_v2(uint32_t req_handle,\n                            fastly_host_http_send_error_detail *send_error_detail,\n                            uint32_t *resp_handle_out, uint32_t *resp_body_handle_out);\n\nWASM_IMPORT(\"fastly_http_req\", \"inspect\")\nint req_inspect(uint32_t req_handle, uint32_t body_handle,\n                req_inspect_config_options_mask config_options_mask,\n                fastly_host_http_inspect_options *config, uint8_t *inspect_res_buf,\n                uint32_t inspect_res_buf_len, size_t *nwritten_out);\n\n// Module fastly_http_resp\nWASM_IMPORT(\"fastly_http_resp\", \"new\")\nint resp_new(uint32_t *resp_handle_out);\n\nWASM_IMPORT(\"fastly_http_resp\", \"header_names_get\")\nint resp_header_names_get(uint32_t resp_handle, uint8_t *buf, size_t buf_len, uint32_t cursor,\n                          int64_t *ending_cursor, size_t *nwritten);\n\nWASM_IMPORT(\"fastly_http_resp\", \"header_values_get\")\nint resp_header_values_get(uint32_t resp_handle, const char *name, size_t name_len, uint8_t *buf,\n                           size_t buf_len, uint32_t cursor, int64_t *ending_cursor,\n                           size_t *nwritten);\n\nWASM_IMPORT(\"fastly_http_req\", \"header_values_set\")\nint req_header_values_set(uint32_t req_handle, const char *name, size_t name_len,\n                          const uint8_t *values, size_t values_len);\n\nWASM_IMPORT(\"fastly_http_resp\", \"header_insert\")\nint resp_header_insert(uint32_t resp_handle, const char *name, size_t name_len,\n                       const uint8_t *value, size_t value_len);\n\nWASM_IMPORT(\"fastly_http_resp\", \"header_append\")\nint resp_header_append(uint32_t resp_handle, const char *name, size_t name_len,\n                       const uint8_t *value, size_t value_len);\n\nWASM_IMPORT(\"fastly_http_resp\", \"header_remove\")\nint resp_header_remove(uint32_t resp_handle, const char *name, size_t name_len);\n\nWASM_IMPORT(\"fastly_http_resp\", \"version_get\")\nint resp_version_get(uint32_t resp_handle, uint32_t *version_out);\n\nWASM_IMPORT(\"fastly_http_resp\", \"send_downstream\")\nint resp_send_downstream(uint32_t resp_handle, uint32_t body_handle, uint32_t streaming);\n\nWASM_IMPORT(\"fastly_http_resp\", \"status_get\")\nint resp_status_get(uint32_t resp_handle, uint16_t *status_out);\n\nWASM_IMPORT(\"fastly_http_resp\", \"status_set\")\nint resp_status_set(uint32_t resp_handle, uint16_t status);\n\nWASM_IMPORT(\"fastly_http_resp\", \"framing_headers_mode_set\")\nint resp_framing_headers_mode_set(uint32_t resp_handle, uint32_t mode);\n\nWASM_IMPORT(\"fastly_http_resp\", \"get_addr_dest_ip\")\nint resp_ip_get(uint32_t resp_handle, uint8_t *ip_out, size_t *nwritten);\n\nWASM_IMPORT(\"fastly_http_resp\", \"get_addr_dest_port\")\nint resp_port_get(uint32_t resp_handle, uint16_t *port_out);\n\n// Module fastly_dictionary\nWASM_IMPORT(\"fastly_dictionary\", \"open\")\nint dictionary_open(const char *name, size_t name_len, uint32_t *dict_handle_out);\n\nWASM_IMPORT(\"fastly_dictionary\", \"get\")\nint dictionary_get(uint32_t dict_handle, const char *key, size_t key_len, char *value,\n                   size_t value_max_len, size_t *nwritten);\n\n// Module fastly_config_store\nWASM_IMPORT(\"fastly_config_store\", \"open\")\nint config_store_open(const char *name, size_t name_len, uint32_t *dict_handle_out);\n\nWASM_IMPORT(\"fastly_config_store\", \"get\")\nint config_store_get(uint32_t dict_handle, const char *key, size_t key_len, char *value,\n                     size_t value_max_len, size_t *nwritten);\n\n// Module fastly_secret_store\nWASM_IMPORT(\"fastly_secret_store\", \"open\")\nint secret_store_open(const char *name, size_t name_len, uint32_t *dict_handle_out);\n\nWASM_IMPORT(\"fastly_secret_store\", \"get\")\nint secret_store_get(uint32_t dict_handle, const char *key, size_t key_len,\n                     uint32_t *opt_secret_handle_out);\n\nWASM_IMPORT(\"fastly_secret_store\", \"plaintext\")\nint secret_store_plaintext(uint32_t secret_handle, char *buf, size_t buf_len, size_t *nwritten);\n\nWASM_IMPORT(\"fastly_secret_store\", \"from_bytes\")\nint secret_store_from_bytes(char *buf, size_t buf_len, uint32_t *opt_secret_handle_out);\n\n// Module fastly_object_store\nWASM_IMPORT(\"fastly_object_store\", \"open\")\nint object_store_open(const char *name, size_t name_len, uint32_t *object_store_handle_out);\nWASM_IMPORT(\"fastly_object_store\", \"lookup\")\nint object_store_get(uint32_t object_store_handle, const char *key, size_t key_len,\n                     uint32_t *opt_body_handle_out);\n\nWASM_IMPORT(\"fastly_object_store\", \"lookup_async\")\nint object_store_get_async(uint32_t object_store_handle, const char *key, size_t key_len,\n                           uint32_t *pending_object_store_lookup_handle_out);\n\nWASM_IMPORT(\"fastly_object_store\", \"pending_lookup_wait\")\nint object_store_pending_lookup_wait(uint32_t handle, uint32_t *handle_out);\n\nWASM_IMPORT(\"fastly_object_store\", \"delete_async\")\nint object_store_delete_async(uint32_t object_store_handle, const char *key, size_t key_len,\n                              uint32_t *pending_object_store_lookup_handle_out);\n\nWASM_IMPORT(\"fastly_object_store\", \"pending_delete_wait\")\nint object_store_pending_delete_wait(uint32_t handle);\n\nWASM_IMPORT(\"fastly_object_store\", \"insert\")\nint object_store_insert(uint32_t object_store_handle, const char *key, size_t key_len,\n                        uint32_t body_handle);\n\n// Module fastly_kv_store\n#define KV_LOOKUP_CONFIG_RESERVED (1u << 0)\n\ntypedef struct __attribute__((aligned(4))) KVLookupOptions {\n  uint32_t reserved;\n} KVLookupOptions;\n\n#define KV_INSERT_CONFIG_RESERVED (1u << 0)\n#define KV_INSERT_CONFIG_BACKGROUND_FETCH (1u << 1)\n#define KV_INSERT_CONFIG_RESERVED_2 (1u << 2)\n#define KV_INSERT_CONFIG_METADATA (1u << 3)\n#define KV_INSERT_CONFIG_TIME_TO_LIVE_SEC (1u << 4)\n#define KV_INSERT_CONFIG_IF_GENERATION_MATCH (1u << 5)\n\n#define KV_INSERT_MODE_OVERWRITE 0u\n#define KV_INSERT_MODE_ADD 1u\n#define KV_INSERT_MODE_APPEND 2u\n#define KV_INSERT_MODE_PREPEND 3u\n\ntypedef struct __attribute__((aligned(4))) KVInsertOptions {\n  uint32_t mode;\n  uint32_t reserved;\n  const uint8_t *metadata;\n  uint32_t metadata_len;\n  uint32_t time_to_live_sec;\n  uint64_t if_generation_match;\n} KVInsertOptions;\n\n#define KV_DELETE_CONFIG_RESERVED (1u << 0)\n\ntypedef struct __attribute__((aligned(4))) KVDeleteOptions {\n  uint32_t reserved;\n} KVDeleteOptions;\n\n#define KV_LIST_CONFIG_RESERVED (1u << 0)\n#define KV_LIST_CONFIG_CURSOR (1u << 1)\n#define KV_LIST_CONFIG_LIMIT (1u << 2)\n#define KV_LIST_CONFIG_PREFIX (1u << 3)\n\n#define KV_LIST_MODE_STRONG 0u\n#define KV_LIST_MODE_EVENTUAL 1u\n\ntypedef struct __attribute__((aligned(4))) KVListOptions {\n  uint32_t mode;\n  const uint8_t *cursor;\n  uint32_t cursor_len;\n  uint32_t limit;\n  const uint8_t *prefix;\n  uint32_t prefix_len;\n} KVListOptions;\n\n#define KV_ERROR_UNINITIALIZED 0u\n#define KV_ERROR_OK 1u\n#define KV_ERROR_BAD_REQUEST 2u\n#define KV_ERROR_NOT_FOUND 3u\n#define KV_ERROR_PRECONDITION_FAILED 4u\n#define KV_ERROR_PAYLOAD_TOO_LARGE 5u\n#define KV_ERROR_INTERNAL_ERROR 6u\n#define KV_ERROR_TOO_MANY_REQUESTS 7u\n\nWASM_IMPORT(\"fastly_kv_store\", \"open\")\nint kv_store_open(const char *name, size_t name_len, uint32_t *kv_store_handle_out);\n\nWASM_IMPORT(\"fastly_kv_store\", \"lookup\")\nint kv_store_lookup(uint32_t kv_store_handle, const char *key, size_t key_len,\n                    uint32_t lookup_options_mask, KVLookupOptions *lookup_options,\n                    uint32_t *kv_store_lookup_handle_out);\n\nWASM_IMPORT(\"fastly_kv_store\", \"lookup_wait\")\nint kv_store_lookup_wait(uint32_t kv_store_handle_lookup_handle, uint32_t *body_handle_out,\n                         uint8_t *metadata_buf_out, size_t metadata_buf_len, size_t *nwritten_out,\n                         uint32_t *generation_out, uint32_t *kv_error_out);\n\nWASM_IMPORT(\"fastly_kv_store\", \"lookup_wait_v2\")\nint kv_store_lookup_wait_v2(uint32_t kv_store_handle_lookup_handle, uint32_t *body_handle_out,\n                            uint8_t *metadata_buf_out, size_t metadata_buf_len,\n                            size_t *nwritten_out, uint64_t *generation_out, uint32_t *kv_error_out);\n\nWASM_IMPORT(\"fastly_kv_store\", \"insert\")\nint kv_store_insert(uint32_t kv_store_handle, const char *key, size_t key_len, uint32_t body_handle,\n                    uint32_t insert_options_mask, KVInsertOptions *insert_options,\n                    uint32_t *kv_store_insert_handle_out);\n\nWASM_IMPORT(\"fastly_kv_store\", \"insert_wait\")\nint kv_store_insert_wait(uint32_t kv_store_insert_handle, uint32_t *kv_error_out);\n\nWASM_IMPORT(\"fastly_kv_store\", \"delete\")\nint kv_store_delete(uint32_t handle, const char *key, size_t key_len, uint32_t delete_options_mask,\n                    KVDeleteOptions *delete_options, uint32_t *kv_store_delete_handle_out);\n\nWASM_IMPORT(\"fastly_kv_store\", \"delete_wait\")\nint kv_store_delete_wait(uint32_t kv_store_delete_handle, uint32_t *kv_error_out);\n\nWASM_IMPORT(\"fastly_kv_store\", \"list\")\nint kv_store_list(uint32_t kv_store_handle, uint32_t list_options_mask, KVListOptions *list_options,\n                  uint32_t *kv_store_list_handle_out);\n\nWASM_IMPORT(\"fastly_kv_store\", \"list_wait\")\nint kv_store_list_wait(uint32_t kv_store_list_handle, uint32_t *body_handle_out,\n                       uint32_t *kv_error_out);\n\nWASM_IMPORT(\"fastly_geo\", \"lookup\")\nint geo_lookup(const uint8_t *addr_octets, size_t addr_len, char *buf, size_t buf_len,\n               size_t *nwritten);\n\nWASM_IMPORT(\"wasi_snapshot_preview1\", \"random_get\")\nint32_t random_get(int32_t arg0, int32_t arg1);\n\n// Blocks until one of the given objects is ready for I/O, or the optional timeout expires.\n//\n// Valid object handles includes bodies and pending requests. See the `async_item_handle`\n// definition for more details, including what I/O actions are associated with each handle\n// type.\n//\n// The timeout is specified in milliseconds, or 0 if no timeout is desired.\n//\n// Returns the _index_ (not handle!) of the first object that is ready, or u32::MAX if the\n// timeout expires before any objects are ready for I/O.\nWASM_IMPORT(\"fastly_async_io\", \"select\")\nint async_select(uint32_t handles[], size_t handles_len, uint32_t timeout_ms,\n                 uint32_t *ready_idx_out);\n\n// Returns 1 if the given async item is \"ready\" for its associated I/O action, 0 otherwise.\n//\n// If an object is ready, the I/O action is guaranteed to complete without blocking.\n//\n// Valid object handles includes bodies and pending requests. See the `async_item_handle`\n// definition for more details, including what I/O actions are associated with each handle\n// type.\nWASM_IMPORT(\"fastly_async_io\", \"is_ready\")\nint async_is_ready(uint32_t handle, uint32_t *is_ready_out);\n\ntypedef struct __attribute__((aligned(4))) PurgeOptions {\n  uint8_t *ret_buf_ptr;\n  size_t ret_buf_len;\n  size_t *ret_buf_nwritten_out;\n} PurgeOptions;\n\n#define FASTLY_HOST_PURGE_OPTIONS_MASK_SOFT_PURGE (1 << 0)\n#define FASTLY_HOST_PURGE_OPTIONS_MASK_RET_BUF (1 << 1)\n\nWASM_IMPORT(\"fastly_purge\", \"purge_surrogate_key\")\nint purge_surrogate_key(char *surrogate_key, size_t surrogate_key_len, uint32_t options_mask,\n                        PurgeOptions *purge_options);\n\n#define FASTLY_CACHE_LOOKUP_OPTIONS_MASK_RESERVED (1 << 0)\n#define FASTLY_CACHE_LOOKUP_OPTIONS_MASK_REQUEST_HEADERS (1 << 1)\n\n// Extensible options for cache lookup operations currently used for both `lookup` and\n// `transaction_lookup`.\ntypedef struct __attribute__((aligned(4))) fastly_host_cache_lookup_options {\n  // * A full request handle, but used only for its headers\n  uint32_t request_headers;\n} fastly_host_cache_lookup_options;\n\n// Configuration for several hostcalls that write to the cache:\n// - `insert`\n// - `transaction-insert`\n// - `transaction-insert-and-stream-back`\n// - `transaction-update`\n//\n// Some options are only allowed for certain of these hostcalls see `cache-write-options-mask`.\ntypedef struct fastly_host_cache_write_options {\n  // this is a required field there's no flag for it\n  uint64_t max_age_ns;\n  // a full request handle, but used only for its headers\n  uint32_t request_headers;\n  // a list of header names separated by spaces\n  fastly_world_string vary_rule;\n  // The initial age of the object in nanoseconds (default: 0).\n  //\n  // This age is used to determine the freshness lifetime of the object as well as to\n  // prioritize which variant to return if a subsequent lookup matches more than one vary rule\n  uint64_t initial_age_ns;\n  uint64_t stale_while_revalidate_ns;\n  // a list of surrogate keys separated by spaces\n  fastly_world_string surrogate_keys;\n  uint64_t length;\n  fastly_world_list_u8 user_metadata;\n  bool sensitive_data;\n} fastly_host_cache_write_options;\n\n// a cached object was found\n#define FASTLY_HOST_CACHE_LOOKUP_STATE_FOUND (1 << 0)\n// the cached object is valid to use (implies found)\n#define FASTLY_HOST_CACHE_LOOKUP_STATE_USABLE (1 << 1)\n// the cached object is stale (but may or may not be valid to use)\n#define FASTLY_HOST_CACHE_LOOKUP_STATE_STALE (1 << 2)\n// this client is requested to insert or revalidate an object\n#define FASTLY_HOST_CACHE_LOOKUP_STATE_MUST_INSERT_OR_UPDATE (1 << 3)\n\nWASM_IMPORT(\"fastly_cache\", \"lookup\")\nint cache_lookup(char *cache_key, size_t cache_key_len, uint32_t options_mask,\n                 fastly_host_cache_lookup_options *options, uint32_t *ret);\n\ntypedef struct __attribute__((aligned(8))) {\n  uint64_t max_age_ns;\n  uint32_t request_headers;\n  const uint8_t *vary_rule_ptr;\n  size_t vary_rule_len;\n  uint64_t initial_age_ns;\n  uint64_t stale_while_revalidate_ns;\n  const uint8_t *surrogate_keys_ptr;\n  size_t surrogate_keys_len;\n  uint64_t length;\n  const uint8_t *user_metadata_ptr;\n  size_t user_metadata_len;\n} CacheWriteOptions;\n\nWASM_IMPORT(\"fastly_cache\", \"insert\")\nint cache_insert(char *cache_key, size_t cache_key_len, uint32_t options_mask,\n                 CacheWriteOptions *options, uint32_t *ret);\n\nWASM_IMPORT(\"fastly_cache\", \"transaction_lookup\")\nint cache_transaction_lookup(char *cache_key, size_t cache_key_len, uint32_t options_mask,\n                             fastly_host_cache_lookup_options *options, uint32_t *ret);\n\nWASM_IMPORT(\"fastly_cache\", \"transaction_insert\")\nint cache_transaction_insert(uint32_t handle, uint32_t options_mask, CacheWriteOptions *options,\n                             uint32_t *ret);\n\nWASM_IMPORT(\"fastly_cache\", \"transaction_insert_and_stream_back\")\nint cache_transaction_insert_and_stream_back(uint32_t handle, uint32_t options_mask,\n                                             CacheWriteOptions *options, uint32_t *ret_body,\n                                             uint32_t *ret_cache);\n\nWASM_IMPORT(\"fastly_cache\", \"transaction_update\")\nint cache_transaction_update(uint32_t handle, uint32_t options_mask, CacheWriteOptions *options);\n\nWASM_IMPORT(\"fastly_cache\", \"transaction_cancel\")\nint cache_transaction_cancel(uint32_t handle);\n\nWASM_IMPORT(\"fastly_cache\", \"close\")\nint cache_close(uint32_t handle);\n\nWASM_IMPORT(\"fastly_cache\", \"get_state\")\nint cache_get_state(uint32_t handle, uint8_t *ret);\n\nWASM_IMPORT(\"fastly_cache\", \"get_user_metadata\")\nint cache_get_user_metadata(uint32_t handle, char *buf, size_t buf_len, size_t *nread);\n\n#define FASTLY_HOST_CACHE_GET_BODY_OPTIONS_MASK_RESERVED (1 << 0)\n#define FASTLY_HOST_CACHE_GET_BODY_OPTIONS_MASK_START (1 << 1)\n#define FASTLY_HOST_CACHE_GET_BODY_OPTIONS_MASK_END (1 << 2)\n\ntypedef struct fastly_host_cache_get_body_options {\n  uint64_t start;\n  uint64_t end;\n} fastly_host_cache_get_body_options;\n\nWASM_IMPORT(\"fastly_cache\", \"get_body\")\nint cache_get_body(uint32_t handle, uint32_t options_mask,\n                   fastly_host_cache_get_body_options *options, uint32_t *ret);\n\n// Returns 1 if a backend with this name exists.\nWASM_IMPORT(\"fastly_backend\", \"exists\")\nint backend_exists(const char *name, size_t name_len, uint32_t *exists_out);\n\n#define FASTLY_HOST_BACKEND_BACKEND_HEALTH_UNKNOWN 0\n#define FASTLY_HOST_BACKEND_BACKEND_HEALTH_HEALTHY 1\n#define FASTLY_HOST_BACKEND_BACKEND_HEALTH_UNHEALTHY 2\n\n// Returns 1 if a backend is healthy.\nWASM_IMPORT(\"fastly_backend\", \"is_healthy\")\nint backend_is_healthy(const char *name, size_t name_len, uint32_t *is_healthy_out);\n\nWASM_IMPORT(\"fastly_backend\", \"is_dynamic\")\nint backend_is_dynamic(const char *name, size_t name_len, uint32_t *is_dynamic_out);\n\nWASM_IMPORT(\"fastly_backend\", \"get_host\")\nint backend_get_host(const char *name, size_t name_len, uint8_t *value, size_t value_max_len,\n                     size_t *nwritten);\n\nWASM_IMPORT(\"fastly_backend\", \"get_override_host\")\nint backend_get_override_host(const char *name, size_t name_len, uint8_t *value,\n                              size_t value_max_len, size_t *nwritten);\n\nWASM_IMPORT(\"fastly_backend\", \"get_port\")\nint backend_get_port(const char *name, size_t name_len, uint16_t *port_out);\n\nWASM_IMPORT(\"fastly_backend\", \"get_connect_timeout_ms\")\nint backend_get_connect_timeout_ms(const char *name, size_t name_len, uint32_t *timeout_ms);\n\nWASM_IMPORT(\"fastly_backend\", \"get_first_byte_timeout_ms\")\nint backend_get_first_byte_timeout_ms(const char *name, size_t name_len, uint32_t *timeout_ms);\n\nWASM_IMPORT(\"fastly_backend\", \"get_between_bytes_timeout_ms\")\nint backend_get_between_bytes_timeout_ms(const char *name, size_t name_len, uint32_t *timeout_ms);\n\nWASM_IMPORT(\"fastly_backend\", \"get_http_keepalive_time\")\nint backend_get_http_keepalive_time(const char *name, size_t name_len, uint32_t *timeout_ms);\n\nWASM_IMPORT(\"fastly_backend\", \"get_tcp_keepalive_enable\")\nint backend_get_tcp_keepalive_enable(const char *name, size_t name_len, uint32_t *is_keepalive);\n\nWASM_IMPORT(\"fastly_backend\", \"get_tcp_keepalive_interval\")\nint backend_get_tcp_keepalive_interval(const char *name, size_t name_len, uint32_t *timeout_ms);\n\nWASM_IMPORT(\"fastly_backend\", \"get_tcp_keepalive_probes\")\nint backend_get_tcp_keepalive_probes(const char *name, size_t name_len, uint32_t *probe_count);\n\nWASM_IMPORT(\"fastly_backend\", \"get_tcp_keepalive_time\")\nint backend_get_tcp_keepalive_time(const char *name, size_t name_len, uint32_t *timeout_secs);\n\nWASM_IMPORT(\"fastly_backend\", \"is_ssl\")\nint backend_is_ssl(const char *name, size_t name_len, uint32_t *is_ssl);\n\nWASM_IMPORT(\"fastly_backend\", \"get_ssl_min_version\")\nint backend_get_ssl_min_version(const char *name, size_t name_len, uint32_t *ssl_min_version);\n\nWASM_IMPORT(\"fastly_backend\", \"get_ssl_max_version\")\nint backend_get_ssl_max_version(const char *name, size_t name_len, uint32_t *ssl_max_version);\n\nWASM_IMPORT(\"fastly_cache\", \"get_length\")\nint cache_get_length(uint32_t handle, uint64_t *ret);\n\nWASM_IMPORT(\"fastly_cache\", \"get_max_age_ns\")\nint cache_get_max_age_ns(uint32_t handle, uint64_t *ret);\n\nWASM_IMPORT(\"fastly_cache\", \"get_stale_while_revalidate_ns\")\nint cache_get_stale_while_revalidate_ns(uint32_t handle, uint64_t *ret);\n\nWASM_IMPORT(\"fastly_cache\", \"get_age_ns\")\nint cache_get_age_ns(uint32_t handle, uint64_t *ret);\n\nWASM_IMPORT(\"fastly_cache\", \"get_hits\")\nint cache_get_hits(uint32_t handle, uint64_t *ret);\n\nWASM_IMPORT(\"fastly_erl\", \"check_rate\")\nint check_rate(const char *rc, size_t rc_len, const char *entry, size_t entry_len, uint32_t delta,\n               uint32_t window, uint32_t limit, const char *pb, size_t pb_len, uint32_t ttl,\n               bool *blocked_out);\n\nWASM_IMPORT(\"fastly_erl\", \"ratecounter_increment\")\nint ratecounter_increment(const char *rc, size_t rc_len, const char *entry, size_t entry_len,\n                          uint32_t delta);\n\nWASM_IMPORT(\"fastly_erl\", \"ratecounter_lookup_rate\")\nint ratecounter_lookup_rate(const char *rc, size_t rc_len, const char *entry, size_t entry_len,\n                            uint32_t window, uint32_t *rate_out);\n\nWASM_IMPORT(\"fastly_erl\", \"ratecounter_lookup_count\")\nint ratecounter_lookup_count(const char *rc, size_t rc_len, const char *entry, size_t entry_len,\n                             uint32_t duration, uint32_t *count_out);\n\nWASM_IMPORT(\"fastly_erl\", \"penaltybox_add\")\nint penaltybox_add(const char *pb, size_t pb_len, const char *entry, size_t entry_len,\n                   uint32_t ttl);\n\nWASM_IMPORT(\"fastly_erl\", \"penaltybox_has\")\nint penaltybox_has(const char *pb, size_t pb_len, const char *entry, size_t entry_len,\n                   bool *has_out);\n\nWASM_IMPORT(\"fastly_device_detection\", \"lookup\")\nint device_detection_lookup(const char *user_agent, size_t user_agent_len, const char *buf,\n                            size_t buf_len, size_t *nwritten);\n\nWASM_IMPORT(\"fastly_compute_runtime\", \"get_vcpu_ms\")\nint compute_get_vcpu_ms(uint64_t *vcpu_ms);\n\nWASM_IMPORT(\"fastly_compute_runtime\", \"get_heap_mib\")\nint compute_get_heap_mib(uint32_t *heap_mib);\n\n// ACL handle type\ntypedef uint32_t fastly_acl_handle;\n\n// ACL error enum\ntypedef uint32_t fastly_acl_error;\n\n#define FASTLY_ACL_ERROR_UNINITIALIZED 0\n#define FASTLY_ACL_ERROR_OK 1\n#define FASTLY_ACL_ERROR_NO_CONTENT 2\n#define FASTLY_ACL_ERROR_TOO_MANY_REQUESTS 3\n\n// ACL host calls\nWASM_IMPORT(\"fastly_acl\", \"open\")\nint acl_open(const char *name, size_t name_len, uint32_t *acl_handle_out);\n\nWASM_IMPORT(\"fastly_acl\", \"lookup\")\nint acl_lookup(uint32_t acl_handle, const uint8_t *ip_octets, size_t ip_len,\n               uint32_t *body_handle_out, fastly_acl_error *acl_error_out);\n\ntypedef struct __attribute__((aligned(8))) fastly_image_optimizer_transform_config {\n  const char *sdk_claims_opts;\n  size_t sdk_claims_opts_len;\n} fastly_image_optimizer_transform_config;\n\n#define FASTLY_IMAGE_OPTIMIZER_RESERVED (1u << 0)\n#define FASTLY_IMAGE_OPTIMIZER_SDK_CLAIMS_OPTS (1u << 1)\n\n#define FASTLY_IMAGE_OPTIMIZER_ERROR_TAG_UNINITIALIZED 0\n#define FASTLY_IMAGE_OPTIMIZER_ERROR_TAG_OK 1\n#define FASTLY_IMAGE_OPTIMIZER_ERROR_TAG_ERROR 2\n#define FASTLY_IMAGE_OPTIMIZER_ERROR_TAG_WARNING 3\n\ntypedef struct __attribute__((aligned(8))) fastly_image_optimizer_error_detail {\n  uint32_t tag;\n  const char *message;\n  size_t message_len;\n} fastly_image_optimizer_error_detail;\n\nWASM_IMPORT(\"fastly_image_optimizer\", \"transform_image_optimizer_request\")\nint image_optimizer_transform_image_optimizer_request(\n    uint32_t req_handle, uint32_t body_handle, const char *backend, size_t backend_len,\n    int io_transform_config_mask, fastly_image_optimizer_transform_config *io_transform_config,\n    fastly_image_optimizer_error_detail *io_error_detail, uint32_t *resp_handle_out,\n    uint32_t *resp_body_handle_out);\n\n#define FASTLY_SHIELDING_SHIELD_BACKEND_OPTIONS_RESERVED (1 << 0)\n#define FASTLY_SHIELDING_SHIELD_BACKEND_OPTIONS_CACHE_KEY (1 << 1)\n#define FASTLY_SHIELDING_SHIELD_BACKEND_OPTIONS_FIRST_BYTE_TIMEOUT (1 << 2)\n\nstruct fastly_shielding_shield_backend_config {\n  const char *cache_key;\n  uint32_t cache_key_len;\n  uint32_t first_byte_timeout_ms;\n};\n\nWASM_IMPORT(\"fastly_shielding\", \"shield_info\")\nint fastly_shielding_shield_info(const char *name, size_t name_len, char *info_block,\n                                 size_t info_block_len, uint32_t *nwritten_out);\n\nWASM_IMPORT(\"fastly_shielding\", \"backend_for_shield\")\nint fastly_shielding_backend_for_shield(\n    const char *name, size_t name_len, uint32_t options_mask,\n    const fastly_shielding_shield_backend_config *backend_config, char *backend_name,\n    size_t backend_name_len, uint32_t *nwritten_out);\n\n#ifdef __cplusplus\n} // namespace fastly\n} // extern C\n#endif\n#endif\n"
  },
  {
    "path": "runtime/fastly/host-api/host_api.cmake",
    "content": "add_library(host_api STATIC\n        ${HOST_API}/host_api.cpp\n        ${HOST_API}/host_call.cpp\n)\n\ntarget_link_libraries(host_api PRIVATE spidermonkey)\ntarget_include_directories(host_api PRIVATE include)\ntarget_include_directories(host_api PRIVATE ${HOST_API})\ntarget_include_directories(host_api PUBLIC ${HOST_API}/include)\n\n"
  },
  {
    "path": "runtime/fastly/host-api/host_api.cpp",
    "content": "#include <algorithm>\n#include <type_traits>\n\n#include \"../../StarlingMonkey/runtime/allocator.h\"\n#include \"../../StarlingMonkey/runtime/encode.h\"\n#include \"./fastly.h\"\n#include \"./host_api_fastly.h\"\n\n#include <algorithm>\n#include <arpa/inet.h>\n\n#include <time.h>\n\nusing api::FastlyResult;\nusing fastly::FastlyAPIError;\n\n#if defined(DEBUG)\nstatic void log_hostcall(const char *func_name, ...) {\n  std::stringstream ss;\n  ss << \"HOSTCALL: \" << func_name << \"(\";\n\n  va_list args;\n  va_start(args, func_name);\n\n  const auto *arg = va_arg(args, const std::string_view *);\n  if (arg) {\n    ss << std::string_view(arg->data(), arg->size());\n    while ((arg = va_arg(args, const std::string_view *))) {\n      ss << \", \" << std::string_view(arg->data(), arg->size());\n    }\n  }\n  ss << \")\";\n\n  va_end(args);\n  fastly_push_debug_message(ss.str());\n}\n#define TRACE_CALL() log_hostcall(__func__);\n#define TRACE_CALL_ARGS(...) log_hostcall(__func__, __VA_ARGS__, nullptr);\n#define TRACE_CALL_RET(...) log_hostcall(__func__, std::string_view(\"-> \"), __VA_ARGS__, nullptr);\n#define TSV(s) std::string_view(s)\n#else\n#define TRACE_CALL()\n#define TRACE_CALL_ARGS(...)\n#define TRACE_CALL_RET(...)\n#endif\n\n#define NEVER_HANDLE 0xFFFFFFFD\n\n#define MILLISECS_IN_NANOSECS 1000000\n#define SECS_IN_NANOSECS 1000000000\n\nstatic bool convert_result(int res, fastly::fastly_host_error *err) {\n  if (res == 0)\n    return true;\n  switch (res) {\n  case 1:\n    *err = FASTLY_HOST_ERROR_GENERIC_ERROR;\n    break;\n  case 2:\n    *err = FASTLY_HOST_ERROR_INVALID_ARGUMENT;\n    break;\n  case 3:\n    *err = FASTLY_HOST_ERROR_BAD_HANDLE;\n    break;\n  case 4:\n    *err = FASTLY_HOST_ERROR_BUFFER_LEN;\n    break;\n  case 5:\n    *err = FASTLY_HOST_ERROR_UNSUPPORTED;\n    break;\n  case 6:\n    *err = FASTLY_HOST_ERROR_BAD_ALIGN;\n    break;\n  case 7:\n    *err = FASTLY_HOST_ERROR_HTTP_INVALID;\n    break;\n  case 8:\n    *err = FASTLY_HOST_ERROR_HTTP_USER;\n    break;\n  case 9:\n    *err = FASTLY_HOST_ERROR_HTTP_INCOMPLETE;\n    break;\n  case 10:\n    *err = FASTLY_HOST_ERROR_OPTIONAL_NONE;\n    break;\n  case 11:\n    *err = FASTLY_HOST_ERROR_HTTP_HEAD_TOO_LARGE;\n    break;\n  case 12:\n    *err = FASTLY_HOST_ERROR_HTTP_INVALID_STATUS;\n    break;\n  case 13:\n    *err = FASTLY_HOST_ERROR_LIMIT_EXCEEDED;\n    break;\n  case 100:\n    *err = FASTLY_HOST_ERROR_UNKNOWN_ERROR;\n    break;\n  default:\n    *err = FASTLY_HOST_ERROR_UNKNOWN_ERROR;\n  }\n  return false;\n}\n\nvoid sleep_until(uint64_t time_ns, uint64_t now) {\n  while (time_ns > now) {\n    uint64_t duration = time_ns - now;\n    timespec req{.tv_sec = static_cast<time_t>(duration / SECS_IN_NANOSECS),\n                 .tv_nsec = static_cast<long>(duration % SECS_IN_NANOSECS)};\n    timespec rem;\n    nanosleep(&req, &rem);\n    now = host_api::MonotonicClock::now();\n  }\n}\n\nsize_t api::AsyncTask::select(std::vector<api::AsyncTask *> &tasks) {\n  if (tasks.size() == 0) {\n    TRACE_CALL()\n  } else {\n    std::string arg0 = std::to_string(tasks.at(0)->handle_);\n    if (tasks.size() == 1) {\n      TRACE_CALL_ARGS(TSV(arg0))\n    } else {\n      std::string arg1 = std::to_string(tasks.at(1)->handle_);\n      if (tasks.size() == 2) {\n        TRACE_CALL_ARGS(TSV(arg0), TSV(arg1))\n      } else {\n        std::string arg2 = std::to_string(tasks.at(2)->handle_);\n        TRACE_CALL_ARGS(TSV(arg0), TSV(arg1), TSV(arg2))\n      }\n    }\n  }\n  size_t tasks_len = tasks.size();\n  std::vector<api::FastlyAsyncTask::Handle> handles;\n  handles.reserve(tasks_len);\n  uint64_t now = 0;\n  uint64_t soonest_deadline = 0;\n  size_t soonest_deadline_idx = -1;\n  for (size_t idx = 0; idx < tasks_len; ++idx) {\n    auto *task = tasks.at(idx);\n    uint64_t deadline;\n    if (task->id() == IMMEDIATE_TASK_HANDLE) {\n      if (now == 0) {\n        now = host_api::MonotonicClock::now();\n        MOZ_ASSERT(now > 0);\n      }\n      deadline = now;\n    } else {\n      deadline = task->deadline();\n    }\n    if (deadline > 0) {\n      MOZ_ASSERT(task->id() == NEVER_HANDLE || task->id() == IMMEDIATE_TASK_HANDLE);\n      if (now == 0) {\n        now = host_api::MonotonicClock::now();\n        MOZ_ASSERT(now > 0);\n      }\n      // expired timers treated as immediates\n      if (deadline < now) {\n        deadline = now;\n      }\n      // this check will always only select the first immediate\n      if (soonest_deadline == 0 || deadline < soonest_deadline) {\n        soonest_deadline = deadline;\n        soonest_deadline_idx = idx;\n      }\n    } else {\n      uint32_t handle = task->id();\n      // Timer and immediate task handles are skipped and never passed to the host.\n      MOZ_ASSERT(handle != NEVER_HANDLE && handle != IMMEDIATE_TASK_HANDLE);\n      handles.push_back(handle);\n    }\n  }\n\n  // When there are no async tasks, sleep until the deadline\n  if (handles.size() == 0) {\n    MOZ_ASSERT(soonest_deadline >= now);\n    sleep_until(soonest_deadline, now);\n    return soonest_deadline_idx;\n  }\n\n  uint32_t ret = UINT32_MAX;\n  fastly::fastly_host_error err = 0;\n\n  // only immediate timers in the task list -> do a ready check against all handles instead of a\n  // select\n  if (now != 0 && soonest_deadline == now) {\n    for (ret = 0; ret < handles.size(); ++ret) {\n      auto handle = handles.at(ret);\n      uint32_t is_ready_out;\n      if (!convert_result(fastly::async_is_ready(handle, &is_ready_out), &err)) {\n        if (host_api::error_is_bad_handle(err)) {\n          fprintf(stderr, \"Critical Error: An invalid handle was provided to async_is_ready.\\n\");\n        } else {\n          fprintf(stderr, \"Critical Error: An unknown error occurred in async_is_ready.\\n\");\n        }\n        abort();\n      };\n      if (is_ready_out) {\n        size_t task_idx = 0;\n        for (size_t idx = 0; idx < tasks_len; ++idx) {\n          uint32_t handle = tasks.at(idx)->id();\n          if (handle != NEVER_HANDLE && handle != IMMEDIATE_TASK_HANDLE) {\n            if (ret == task_idx) {\n              return idx;\n            }\n            task_idx++;\n          }\n        }\n        abort();\n      }\n    }\n    // no tasks ready -> trigger our soonest immediate or timer\n    return soonest_deadline_idx;\n  }\n\n  while (true) {\n    MOZ_ASSERT(soonest_deadline == 0 || soonest_deadline >= now);\n    // timeout value of 0 means no timeout for async_select\n    uint32_t timeout = soonest_deadline > 0 ? (soonest_deadline - now) / MILLISECS_IN_NANOSECS : 0;\n    if (!convert_result(fastly::async_select(handles.data(), handles.size(), timeout, &ret),\n                        &err)) {\n      if (host_api::error_is_bad_handle(err)) {\n        fprintf(stderr, \"Critical Error: An invalid handle was provided to async_select.\\n\");\n      } else {\n        fprintf(stderr, \"Critical Error: An unknown error occurred in async_select.\\n\");\n      }\n      abort();\n    }\n\n    // The result is only valid if the timeout didn't expire.\n    if (ret != UINT32_MAX) {\n      // The host index will be the index in the list of tasks with the timer tasks filtered out.\n      // We thus need to offset the host index by any timer tasks appearing before the nth\n      // non-timer task.\n      size_t task_idx = 0;\n      for (size_t idx = 0; idx < tasks_len; ++idx) {\n        uint32_t id = tasks.at(idx)->id();\n        if (id != NEVER_HANDLE && id != IMMEDIATE_TASK_HANDLE) {\n          if (ret == task_idx) {\n            return idx;\n          }\n          task_idx++;\n        }\n      }\n      abort();\n    } else if (soonest_deadline > 0) {\n      MOZ_ASSERT(soonest_deadline > now);\n      MOZ_ASSERT(soonest_deadline_idx != -1);\n      // Verify that the task definitely is ready from a time perspective, and if not loop the host\n      // call again.\n      now = host_api::MonotonicClock::now();\n      if (soonest_deadline > now) {\n        err = 0;\n        continue;\n      }\n      return soonest_deadline_idx;\n    } else {\n      abort();\n    }\n  }\n}\n\nnamespace host_api {\n\nnamespace {\n\nfastly::fastly_world_list_u8 span_to_list_u8(std::span<uint8_t> span) {\n  return {\n      .ptr = const_cast<uint8_t *>(span.data()),\n      .len = span.size(),\n  };\n}\n\nfastly::fastly_world_string string_view_to_world_string(std::string_view str) {\n  return {\n      .ptr = const_cast<uint8_t *>(reinterpret_cast<const uint8_t *>(str.data())),\n      .len = str.size(),\n  };\n}\n\nHostString make_host_string(fastly::fastly_world_string str) {\n  return HostString{JS::UniqueChars{reinterpret_cast<char *>(str.ptr)}, str.len};\n}\n\nHostString make_host_string(fastly::fastly_world_list_u8 str) {\n  return HostString{JS::UniqueChars{reinterpret_cast<char *>(str.ptr)}, str.len};\n}\n\nHostBytes make_host_bytes(uint8_t *ptr, size_t len) {\n  return HostBytes{std::unique_ptr<uint8_t[]>{ptr}, len};\n}\n\nResponse make_response(fastly::fastly_host_http_response &resp) {\n  return Response{HttpResp{resp.f0}, HttpBody{resp.f1}};\n}\n\ntemplate <auto header_names_get>\nResult<std::vector<HostString>> generic_get_header_names(auto handle) {\n  Result<std::vector<HostString>> res;\n\n  fastly::fastly_world_list_string ret;\n  fastly::fastly_host_error err;\n  fastly::fastly_world_string *strs = static_cast<fastly::fastly_world_string *>(\n      cabi_malloc(LIST_ALLOC_SIZE * sizeof(fastly::fastly_world_string), 1));\n  size_t str_max = LIST_ALLOC_SIZE;\n  size_t str_cnt = 0;\n  size_t nwritten;\n  uint8_t *buf = static_cast<uint8_t *>(cabi_malloc(HOSTCALL_BUFFER_LEN, 1));\n  uint32_t cursor = 0;\n  int64_t next_cursor = 0;\n  while (true) {\n    if (!convert_result(\n            header_names_get(handle, buf, HEADER_MAX_LEN, cursor, &next_cursor, &nwritten), &err)) {\n      cabi_free(buf);\n      cabi_free(strs);\n      res.emplace_err(err);\n      return res;\n    }\n    if (nwritten == 0) {\n      break;\n    }\n    uint32_t offset = 0;\n    for (size_t i = 0; i < nwritten; i++) {\n      if (buf[i] != '\\0')\n        continue;\n      if (str_cnt == str_max) {\n        strs = static_cast<fastly::fastly_world_string *>(\n            cabi_realloc(strs, str_max * sizeof(fastly::fastly_world_string), 1,\n                         (str_max + LIST_ALLOC_SIZE) * sizeof(fastly::fastly_world_string)));\n        str_max += LIST_ALLOC_SIZE;\n      }\n      size_t len = i - offset;\n      strs[str_cnt].ptr = static_cast<uint8_t *>(cabi_malloc(len, 1));\n      strs[str_cnt].len = len;\n      memcpy(strs[str_cnt].ptr, buf + offset, len);\n      offset = i + 1;\n      str_cnt++;\n    }\n    if (next_cursor < 0)\n      break;\n    cursor = (uint32_t)next_cursor;\n  }\n  cabi_free(buf);\n  if (str_cnt != 0) {\n    strs = static_cast<fastly::fastly_world_string *>(\n        cabi_realloc(strs, str_max * sizeof(fastly::fastly_world_string), 1,\n                     str_cnt * sizeof(fastly::fastly_world_string)));\n  }\n  ret.ptr = strs;\n  ret.len = str_cnt;\n  std::vector<HostString> names;\n\n  for (int i = 0; i < ret.len; i++) {\n    names.emplace_back(make_host_string(ret.ptr[i]));\n  }\n\n  // Free the vector of string pointers, but leave the individual strings alone.\n  cabi_free(ret.ptr);\n\n  res.emplace(std::move(names));\n\n  return res;\n}\n\nstruct Chunk {\n  JS::UniqueChars buffer;\n  size_t length;\n\n  static Chunk make(std::string_view data) {\n    Chunk res{JS::UniqueChars{static_cast<char *>(cabi_malloc(data.size(), 1))}, data.size()};\n    std::copy(data.begin(), data.end(), res.buffer.get());\n    return res;\n  }\n};\n\ntemplate <auto header_values_get>\nResult<std::optional<std::vector<HostString>>> generic_get_header_values(auto handle,\n                                                                         std::string_view name) {\n  Result<std::optional<std::vector<HostString>>> res;\n\n  fastly::fastly_world_string hdr = string_view_to_world_string(name);\n  fastly::fastly_world_option_list_list_u8 ret;\n  fastly::fastly_host_error err;\n  std::vector<Chunk> header_values;\n  JS::UniqueLatin1Chars buffer(static_cast<unsigned char *>(cabi_malloc(HEADER_MAX_LEN, 1)));\n  uint32_t cursor = 0;\n  while (true) {\n    int64_t ending_cursor = 0;\n    size_t length = 0;\n    if (!convert_result(header_values_get(handle, reinterpret_cast<char *>(hdr.ptr), hdr.len,\n                                          buffer.get(), HEADER_MAX_LEN, cursor, &ending_cursor,\n                                          &length),\n                        &err)) {\n      res.emplace_err(err);\n      return res;\n    }\n\n    if (length == 0) {\n      break;\n    }\n\n    std::string_view result{reinterpret_cast<char *>(buffer.get()), length};\n    while (!result.empty()) {\n      auto end = result.find('\\0');\n      header_values.emplace_back(Chunk::make(result.substr(0, end)));\n      if (end == result.npos) {\n        break;\n      }\n\n      result = result.substr(end + 1);\n    }\n\n    if (ending_cursor < 0) {\n      break;\n    }\n  }\n\n  if (header_values.empty()) {\n    ret.is_some = false;\n  } else {\n    ret.is_some = true;\n    ret.val.len = header_values.size();\n    ret.val.ptr = static_cast<fastly::fastly_world_list_u8 *>(\n        cabi_malloc(header_values.size() * sizeof(fastly::fastly_world_list_u8),\n                    alignof(fastly::fastly_world_list_u8)));\n    auto *next = ret.val.ptr;\n    for (auto &chunk : header_values) {\n      next->len = chunk.length;\n      next->ptr = reinterpret_cast<uint8_t *>(chunk.buffer.release());\n      ++next;\n    }\n  }\n\n  if (ret.is_some) {\n    std::vector<HostString> names;\n\n    for (int i = 0; i < ret.val.len; i++) {\n      names.emplace_back(make_host_string(ret.val.ptr[i]));\n    }\n\n    // Free the vector of string pointers, but leave the individual strings alone.\n    cabi_free(ret.val.ptr);\n\n    res.emplace(std::move(names));\n  } else {\n    res.emplace(std::nullopt);\n  }\n\n  return res;\n}\n\ntemplate <auto header_op>\nResult<Void> generic_header_op(auto handle, std::string_view name, std::span<uint8_t> value) {\n  Result<Void> res;\n\n  fastly::fastly_world_string hdr = string_view_to_world_string(name);\n  fastly::fastly_world_list_u8 val = span_to_list_u8(value);\n  fastly::fastly_host_error err;\n  if (!convert_result(\n          header_op(handle, reinterpret_cast<char *>(hdr.ptr), hdr.len, val.ptr, val.len), &err)) {\n    res.emplace_err(err);\n  }\n\n  return res;\n}\n\ntemplate <auto remove_header>\nResult<Void> generic_header_remove(auto handle, std::string_view name) {\n  Result<Void> res;\n\n  fastly::fastly_world_string hdr = string_view_to_world_string(name);\n  fastly::fastly_host_error err;\n  if (!convert_result(remove_header(handle, reinterpret_cast<char *>(hdr.ptr), hdr.len), &err)) {\n    if (host_api::error_is_invalid_argument(err)) {\n      return Result<Void>::ok();\n    }\n    res.emplace_err(err);\n  }\n\n  return res;\n}\n\n} // namespace\n\n// --- <StarlingMonkey HOST API> ---\nResult<HostBytes> Random::get_bytes(size_t num_bytes) {\n  TRACE_CALL()\n  Result<HostBytes> res;\n\n  auto ret = HostBytes::with_capacity(num_bytes);\n  auto err =\n      fastly::random_get(reinterpret_cast<uint32_t>(static_cast<void *>(ret.begin())), num_bytes);\n  if (err != 0) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(std::move(ret));\n  }\n\n  return res;\n}\n\nResult<uint32_t> Random::get_u32() {\n  TRACE_CALL()\n  Result<uint32_t> res;\n\n  uint32_t storage;\n  auto err = fastly::random_get(reinterpret_cast<uint32_t>(static_cast<void *>(&storage)),\n                                sizeof(storage));\n  if (err != 0) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(storage);\n  }\n\n  return res;\n}\n\nuint64_t MonotonicClock::now() {\n  TRACE_CALL()\n  return JS_Now() * 1000;\n}\n\nuint64_t MonotonicClock::resolution() {\n  TRACE_CALL()\n  return 1000;\n}\n\nint32_t MonotonicClock::subscribe(const uint64_t when, const bool absolute) {\n  TRACE_CALL()\n  return NEVER_HANDLE;\n}\n\nvoid MonotonicClock::unsubscribe(const int32_t handle_id){TRACE_CALL()}\n\n// HttpHeaders and HttpHeadersReadOnly extend Resource.\n// Resource provdes handle_state_ which is a HandleState\n// which gets to be fully host-defined.\nResource::~Resource() {\n  if (handle_state_ != nullptr) {\n    handle_state_ = nullptr;\n  }\n};\n\n// Fastly handle state is currently just a wrapper around\n// an arbitrary fastly handle, along with a bit indicating\n// if it is a request or response.\nclass HandleState {\nprotected:\n  api::FastlyAsyncTask::Handle handle_;\n  bool is_req_;\n\npublic:\n  explicit HandleState(api::FastlyAsyncTask::Handle handle, bool is_request) {\n    handle_ = handle;\n    is_req_ = is_request;\n  }\n  api::FastlyAsyncTask::Handle handle() { return handle_; }\n  bool is_req() { return is_req_; }\n  bool valid() const { return true; }\n};\n\nHttpHeaders *HttpHeadersReadOnly::clone() { return new HttpHeaders(*this); }\n\nconst std::vector<const char *> forbidden_request_headers = {};\nconst std::vector<const char *> forbidden_response_headers = {};\n\nconst std::vector<const char *> &HttpHeaders::get_forbidden_request_headers() {\n  return forbidden_request_headers;\n}\nconst std::vector<const char *> &HttpHeaders::get_forbidden_response_headers() {\n  return forbidden_response_headers;\n}\n\nResult<vector<tuple<HostString, HostString>>> HttpHeadersReadOnly::entries() const {\n  TRACE_CALL()\n  Result<vector<tuple<HostString, HostString>>> res;\n\n  Result<std::vector<HostString>> names_res;\n  if (this->handle_state_.get()->is_req()) {\n    names_res =\n        generic_get_header_names<fastly::req_header_names_get>(this->handle_state_.get()->handle());\n  } else {\n    names_res = generic_get_header_names<fastly::resp_header_names_get>(\n        this->handle_state_.get()->handle());\n  }\n  if (const auto err = names_res.to_err()) {\n    return Result<vector<tuple<HostString, HostString>>>::err(*err);\n  }\n\n  vector<tuple<HostString, HostString>> entries_vec;\n  for (auto &name : names_res.unwrap()) {\n    auto values_res = HttpHeadersReadOnly::get(name);\n    if (auto err = values_res.to_err()) {\n      return Result<vector<tuple<HostString, HostString>>>::err(*err);\n    }\n    auto &values = values_res.unwrap();\n    if (!values.has_value()) {\n      // original js-compute-runtime also skipped here, but should this be an error or empty entry?\n      continue;\n    }\n    auto last_val = &(*values.value().end());\n    for (auto &value : values.value()) {\n      if (&value == last_val) {\n        entries_vec.emplace_back(std::move(name), std::move(value));\n      } else {\n        std::string_view host_name_view(name);\n        entries_vec.emplace_back(host_api::HostString(host_name_view), std::move(value));\n      }\n    }\n  }\n\n  res.emplace(std::move(entries_vec));\n  return res;\n}\n\nResult<optional<vector<HostString>>> HttpHeadersReadOnly::get(string_view name) const {\n  TRACE_CALL()\n  Result<optional<vector<HostString>>> res;\n  if (this->handle_state_.get()->is_req()) {\n    return generic_get_header_values<fastly::req_header_values_get>(\n        this->handle_state_.get()->handle(), name);\n  } else {\n    return generic_get_header_values<fastly::resp_header_values_get>(\n        this->handle_state_.get()->handle(), name);\n  }\n}\n\nResult<bool> HttpHeadersReadOnly::has(string_view name) const {\n  TRACE_CALL()\n  auto get_res = get(name);\n  if (const auto err = get_res.to_err()) {\n    return Result<bool>::err(*err);\n  }\n  return Result<bool>::ok(get_res.unwrap().has_value());\n}\n\nHttpHeaders::HttpHeaders(std::unique_ptr<HandleState> state)\n    : HttpHeadersReadOnly(std::move(state)) {}\n\nHttpHeaders::HttpHeaders() { handle_state_ = nullptr; }\n\n// TODO(guybedford): ensure this actually clones, or ban it entirely?\nHttpHeaders::HttpHeaders(const HttpHeadersReadOnly &headers) : HttpHeadersReadOnly(nullptr) {\n  auto handle_state =\n      new HandleState(headers.handle_state_.get()->handle(), headers.handle_state_.get()->is_req());\n  this->handle_state_ = std::unique_ptr<HandleState>(handle_state);\n}\n\n// This is only used by the HttpHeaders subclass, and immediately assigns the state after.\nHttpHeadersReadOnly::HttpHeadersReadOnly() { handle_state_ = nullptr; }\nHttpHeadersReadOnly::HttpHeadersReadOnly(std::unique_ptr<HandleState> state) {\n  handle_state_ = std::move(state);\n}\n\n// This call corresponds to a state transition in switch_mode from Mode::ContentOnly to\n// Mode::CachedInContent in StarlingMonkey, which occurs when cloning a headers object, which we do\n// not call.\n//\n// That is, we have:\n// - Desynchronize from host: Mode::CachedInContent -> Mode::ContentOnly (create local mutations)\n// - Resynchronize to host  : Mode::ContentOnly -> Mode::CachedInContent (commit local mutations)\n//\n// With these state transitions permitted arbitrarily.\n//\n// Fastly's headers implementation ties headers to request and response handles, as opposed to\n// being able to exist as free handles for headers. We therefore avoid the headers cloning operation\n// Mode::ContentOnly -> Mode::CachedInContent transition and as a result this FromEntries function\n// is never called.\n//\n// Instead we use a separate RequestOrResponse::commit_headers() implementation for fetch requests\n// and fetch-event responses, leaving the former Mode::ContentOnly as the cached value to achieve\n// the exact same result.\nResult<HttpHeaders *> HttpHeaders::FromEntries(vector<tuple<HostString, HostString>> &entries) {\n  TRACE_CALL()\n  MOZ_RELEASE_ASSERT(false);\n}\n\n// Instead, we use write_headers to write into an existing headers object.\nResult<Void>\nwrite_headers(HttpHeaders *headers,\n              std::vector<std::tuple<host_api::HostString, host_api::HostString>> &list) {\n  TRACE_CALL()\n  std::vector<std::string_view> seen;\n  seen.reserve(list.size());\n  host_api::Result<host_api::Void> res;\n  for (const auto &[name, value] : list) {\n    if (std::find(seen.begin(), seen.end(), name) == seen.end()) {\n      // first time seeing a header -> use set in case of existing values on the handle\n      res = headers->set(name, value);\n      seen.push_back(name);\n    } else {\n      // seen before -> use append\n      res = headers->append(name, value);\n    }\n    if (res.is_err()) {\n      return res;\n    }\n  }\n  return Result<Void>::ok();\n}\n\nResult<Void> HttpHeaders::remove(string_view name) {\n  TRACE_CALL_ARGS(&name)\n  if (this->handle_state_.get()->is_req()) {\n    return generic_header_remove<fastly::req_header_remove>(this->handle_state_.get()->handle(),\n                                                            name);\n  } else {\n    return generic_header_remove<fastly::resp_header_remove>(this->handle_state_.get()->handle(),\n                                                             name);\n  }\n}\n\nResult<Void> HttpHeaders::set(string_view name, string_view value) {\n  TRACE_CALL_ARGS(&name, &value)\n  std::span<uint8_t> value_span = {reinterpret_cast<uint8_t *>(const_cast<char *>(value.data())),\n                                   value.size()};\n  if (this->handle_state_.get()->is_req()) {\n    return generic_header_op<fastly::req_header_insert>(this->handle_state_.get()->handle(), name,\n                                                        value_span);\n  } else {\n    return generic_header_op<fastly::resp_header_insert>(this->handle_state_.get()->handle(), name,\n                                                         value_span);\n  }\n}\nResult<Void> HttpHeaders::append(string_view name, string_view value) {\n  TRACE_CALL_ARGS(&name, &value)\n  std::span<uint8_t> value_span = {reinterpret_cast<uint8_t *>(const_cast<char *>(value.data())),\n                                   value.size()};\n  if (this->handle_state_.get()->is_req()) {\n    return generic_header_op<fastly::req_header_append>(this->handle_state_.get()->handle(), name,\n                                                        value_span);\n  } else {\n    return generic_header_op<fastly::resp_header_append>(this->handle_state_.get()->handle(), name,\n                                                         value_span);\n  }\n}\n\n// --- </StarlingMonkey Host API> ---\n\n// The host interface makes the assumption regularly that uint32_t is sufficient space to store a\n// pointer.\nstatic_assert(sizeof(uint32_t) == sizeof(void *));\n\nnamespace {\n\nFastlySendError\nmake_fastly_send_error(fastly::fastly_host_http_send_error_detail &send_error_detail) {\n  FastlySendError res;\n\n  switch (send_error_detail.tag) {\n  case 0: {\n    res.tag = FastlySendError::detail::uninitialized;\n    break;\n  }\n  case 1: {\n    res.tag = FastlySendError::detail::ok;\n    break;\n  }\n  case 2: {\n    res.tag = FastlySendError::detail::dns_timeout;\n    break;\n  }\n  case 3: {\n    res.tag = FastlySendError::detail::dns_error;\n    break;\n  }\n  case 4: {\n    res.tag = FastlySendError::detail::destination_not_found;\n    break;\n  }\n  case 5: {\n    res.tag = FastlySendError::detail::destination_unavailable;\n    break;\n  }\n  case 6: {\n    res.tag = FastlySendError::detail::destination_ip_unroutable;\n    break;\n  }\n  case 7: {\n    res.tag = FastlySendError::detail::connection_refused;\n    break;\n  }\n  case 8: {\n    res.tag = FastlySendError::detail::connection_terminated;\n    break;\n  }\n  case 9: {\n    res.tag = FastlySendError::detail::connection_timeout;\n    break;\n  }\n  case 10: {\n    res.tag = FastlySendError::detail::connection_limit_reached;\n    break;\n  }\n  case 11: {\n    res.tag = FastlySendError::detail::tls_certificate_error;\n    break;\n  }\n  case 12: {\n    res.tag = FastlySendError::detail::tls_configuration_error;\n    break;\n  }\n  case 13: {\n    res.tag = FastlySendError::detail::http_incomplete_response;\n    break;\n  }\n  case 14: {\n    res.tag = FastlySendError::detail::http_response_header_section_too_large;\n    break;\n  }\n  case 15: {\n    res.tag = FastlySendError::detail::http_response_body_too_large;\n    break;\n  }\n  case 16: {\n    res.tag = FastlySendError::detail::http_response_timeout;\n    break;\n  }\n  case 17: {\n    res.tag = FastlySendError::detail::http_response_status_invalid;\n    break;\n  }\n  case 18: {\n    res.tag = FastlySendError::detail::http_upgrade_failed;\n    break;\n  }\n  case 19: {\n    res.tag = FastlySendError::detail::http_protocol_error;\n    break;\n  }\n  case 20: {\n    res.tag = FastlySendError::detail::http_request_cache_key_invalid;\n    break;\n  }\n  case 21: {\n    res.tag = FastlySendError::detail::http_request_uri_invalid;\n    break;\n  }\n  case 22: {\n    res.tag = FastlySendError::detail::internal_error;\n    break;\n  }\n  case 23: {\n    res.tag = FastlySendError::detail::tls_alert_received;\n    break;\n  }\n  case 24: {\n    res.tag = FastlySendError::detail::tls_protocol_error;\n    break;\n  }\n  default: {\n    // If we are here, this is either because the host does not provided send error details\n    // Or a new error detail tag exists and we don't yet have it implemented\n    res.tag = FastlySendError::detail::uninitialized;\n  }\n  }\n\n  res.dns_error_rcode = send_error_detail.dns_error_rcode;\n  res.dns_error_info_code = send_error_detail.dns_error_info_code;\n  res.tls_alert_id = send_error_detail.tls_alert_id;\n\n  return res;\n}\n\nFastlyKVError make_fastly_kv_error(fastly::fastly_kv_error kv_error,\n                                   fastly::fastly_host_error host_err) {\n\n  FastlyKVError err;\n  // first-priority host_err mapping\n  switch (host_err) {\n  case FASTLY_HOST_ERROR_BAD_HANDLE: {\n    err.detail = FastlyKVError::detail::invalid_store_handle;\n    return err;\n  }\n  case FASTLY_HOST_ERROR_INVALID_ARGUMENT: {\n    err.detail = FastlyKVError::detail::bad_request;\n    return err;\n  }\n  case FASTLY_HOST_ERROR_LIMIT_EXCEEDED: {\n    err.detail = FastlyKVError::detail::too_many_requests;\n    return err;\n  }\n  }\n\n  switch (kv_error) {\n  case KV_ERROR_BAD_REQUEST: {\n    err.detail = FastlyKVError::detail::bad_request;\n    return err;\n  }\n  case KV_ERROR_NOT_FOUND: {\n    err.detail = FastlyKVError::detail::not_found;\n    return err;\n  }\n  case KV_ERROR_PAYLOAD_TOO_LARGE: {\n    err.detail = FastlyKVError::detail::payload_too_large;\n    return err;\n  }\n  case KV_ERROR_PRECONDITION_FAILED: {\n    err.detail = FastlyKVError::detail::precondition_failed;\n    return err;\n  }\n  case KV_ERROR_TOO_MANY_REQUESTS: {\n    err.detail = FastlyKVError::detail::too_many_requests;\n    return err;\n  }\n  case KV_ERROR_INTERNAL_ERROR: {\n    err.detail = FastlyKVError::detail::internal_error;\n    return err;\n  }\n  case KV_ERROR_OK:\n  case KV_ERROR_UNINITIALIZED:\n  default: {\n    // If the hostcall never initialized `kv_error`, or if it claimed\n    // that it was `OK` but we still failed, then make a host error\n    // based on the `host_err` value.\n    err.detail = FastlyKVError::detail::host_error;\n    err.host_err = host_err;\n    return err;\n  }\n  }\n}\n\nFastlyImageOptimizerError\nmake_fastly_image_optimizer_error(fastly::fastly_image_optimizer_error_detail im_err) {\n  FastlyImageOptimizerError::detail det;\n  switch (im_err.tag) {\n  case FASTLY_IMAGE_OPTIMIZER_ERROR_TAG_UNINITIALIZED:\n    det = FastlyImageOptimizerError::uninitialized;\n    break;\n  case FASTLY_IMAGE_OPTIMIZER_ERROR_TAG_OK:\n    det = FastlyImageOptimizerError::ok;\n    break;\n  case FASTLY_IMAGE_OPTIMIZER_ERROR_TAG_ERROR:\n    det = FastlyImageOptimizerError::error;\n    break;\n  case FASTLY_IMAGE_OPTIMIZER_ERROR_TAG_WARNING:\n    det = FastlyImageOptimizerError::warning;\n    break;\n  }\n\n  return {det, std::string(im_err.message, im_err.message_len)};\n}\n\nFastlyImageOptimizerError make_fastly_image_optimizer_error(fastly::fastly_host_error err) {\n  return {err};\n}\n\n} // namespace\n\nResult<HttpBody> HttpBody::make() {\n  TRACE_CALL_ARGS(TSV(\"body\"))\n  Result<HttpBody> res;\n\n  HttpBody::Handle handle;\n  fastly::fastly_host_error err;\n  if (!convert_result(fastly::body_new(&handle), &err)) {\n    res.emplace_err(err);\n  } else {\n    TRACE_CALL_RET(TSV(std::to_string(handle)))\n    res.emplace(handle);\n  }\n\n  return res;\n}\n\nResult<HostString> HttpBody::read(uint32_t chunk_size) const {\n  TRACE_CALL_ARGS(TSV(std::to_string(handle)))\n  Result<HostString> res;\n\n  fastly::fastly_world_list_u8 ret;\n  ret.ptr = static_cast<uint8_t *>(cabi_malloc(chunk_size, 1));\n  fastly::fastly_host_error err;\n  if (!convert_result(\n          fastly::body_read(this->handle, ret.ptr, static_cast<size_t>(chunk_size), &ret.len),\n          &err)) {\n    cabi_free(ret.ptr);\n    res.emplace_err(err);\n  } else {\n    TRACE_CALL_RET(TSV(std::to_string(ret.len)))\n    res.emplace(JS::UniqueChars(reinterpret_cast<char *>(ret.ptr)), ret.len);\n  }\n\n  return res;\n}\n\nResult<size_t> HttpBody::read_into(uint8_t *ptr, size_t chunk_size) const {\n  TRACE_CALL()\n  Result<size_t> res;\n\n  size_t len;\n  fastly::fastly_host_error err;\n  if (!convert_result(fastly::body_read(this->handle, ptr, chunk_size, &len), &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(len);\n  }\n\n  return res;\n}\n\nconstexpr size_t HANDLE_READ_CHUNK_SIZE = 8192;\n\nResult<HostBytes> HttpBody::read_all() const {\n  Result<HostBytes> res;\n  size_t buf_cap = HANDLE_READ_CHUNK_SIZE;\n  size_t buf_len = 0;\n  uint8_t *buf = static_cast<uint8_t *>(malloc(buf_cap));\n  if (!buf) {\n    res.emplace_err(FASTLY_HOST_ERROR_GENERIC_ERROR);\n    return res;\n  }\n  do {\n    if (buf_len + HANDLE_READ_CHUNK_SIZE > buf_cap) {\n      buf_cap *= 2;\n      uint8_t *new_buf = static_cast<uint8_t *>(realloc(buf, buf_cap));\n      if (!new_buf) {\n        free(buf);\n        res.emplace_err(FASTLY_HOST_ERROR_GENERIC_ERROR);\n        return res;\n      }\n      buf = new_buf;\n    }\n    host_api::Result<size_t> chunk = this->read_into((buf + buf_len), HANDLE_READ_CHUNK_SIZE);\n    if (auto *err = chunk.to_err()) {\n      free(buf);\n      res.emplace_err(*err);\n      return res;\n    }\n    size_t len = chunk.unwrap();\n    if (len == 0) {\n      if (buf_len == 0) {\n        free(buf);\n        buf = nullptr;\n      } else {\n        buf = static_cast<uint8_t *>(realloc(buf, buf_len));\n      }\n      break;\n    }\n    buf_len += len;\n  } while (true);\n  res.emplace(make_host_bytes(buf, buf_len));\n  return res;\n}\n\nResult<uint32_t> HttpBody::write_front(const uint8_t *ptr, size_t len) const {\n  TRACE_CALL()\n  Result<uint32_t> res;\n\n  // The write call doesn't mutate the buffer; the cast is just for the generated fastly api.\n  fastly::fastly_world_list_u8 chunk{const_cast<uint8_t *>(ptr), len};\n\n  fastly::fastly_host_error err;\n  uint32_t written;\n\n  if (!convert_result(fastly::body_write(this->handle, chunk.ptr, chunk.len,\n                                         fastly::BodyWriteEnd::BodyWriteEndFront,\n                                         reinterpret_cast<size_t *>(&written)),\n                      &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(written);\n  }\n\n  return res;\n}\n\nResult<uint32_t> HttpBody::write_back(const uint8_t *ptr, size_t len) const {\n  TRACE_CALL()\n  Result<uint32_t> res;\n\n  // The write call doesn't mutate the buffer; the cast is just for the generated fastly api.\n  fastly::fastly_world_list_u8 chunk{const_cast<uint8_t *>(ptr), len};\n\n  fastly::fastly_host_error err;\n  uint32_t written;\n  if (!convert_result(fastly::body_write(this->handle, chunk.ptr, chunk.len,\n                                         fastly::BodyWriteEnd::BodyWriteEndBack,\n                                         reinterpret_cast<size_t *>(&written)),\n                      &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(written);\n  }\n\n  return res;\n}\n\nResult<Void> HttpBody::write_all_front(const uint8_t *ptr, size_t len) const {\n  TRACE_CALL()\n  while (len > 0) {\n    auto write_res = this->write_front(ptr, len);\n    if (auto *err = write_res.to_err()) {\n      return Result<Void>::err(*err);\n    }\n\n    auto written = write_res.unwrap();\n    ptr += written;\n    MOZ_ASSERT(written <= len);\n    len -= static_cast<size_t>(written);\n  }\n\n  return Result<Void>::ok();\n}\n\nResult<Void> HttpBody::write_all_back(const uint8_t *ptr, size_t len) const {\n  TRACE_CALL()\n  while (len > 0) {\n    auto write_res = this->write_back(ptr, len);\n    if (auto *err = write_res.to_err()) {\n      return Result<Void>::err(*err);\n    }\n\n    auto written = write_res.unwrap();\n    ptr += written;\n    len -= std::min(len, static_cast<size_t>(written));\n  }\n\n  return Result<Void>::ok();\n}\n\nResult<Void> HttpBody::append(HttpBody other) const {\n  TRACE_CALL()\n  Result<Void> res;\n\n  fastly::fastly_host_error err;\n  if (!convert_result(fastly::body_append(this->handle, other.handle), &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace();\n  }\n\n  return res;\n}\n\nResult<Void> HttpBody::close() {\n  TRACE_CALL()\n  Result<Void> res;\n\n  fastly::fastly_host_error err;\n  if (!convert_result(fastly::body_close(this->handle), &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace();\n  }\n\n  return res;\n}\n\nResult<Void> HttpBody::abandon() {\n  TRACE_CALL()\n  Result<Void> res;\n\n  fastly::fastly_host_error err;\n  if (!convert_result(fastly::body_abandon(this->handle), &err)) {\n    res.emplace_err(err);\n  } else {\n    handle = INVALID_HANDLE;\n    res.emplace();\n  }\n\n  return res;\n}\n\nResult<std::optional<uint64_t>> HttpBody::known_length() const {\n  TRACE_CALL()\n  Result<std::optional<uint64_t>> res;\n\n  fastly::fastly_host_error err;\n  uint64_t length;\n  if (!convert_result(fastly::body_known_length(this->handle, &length), &err)) {\n    if (error_is_optional_none(err)) {\n      res.emplace(std::nullopt);\n    } else {\n      res.emplace_err(err);\n    }\n  } else {\n    res.emplace(length);\n  }\n\n  return res;\n}\n\nFastlyAsyncTask::Handle HttpBody::async_handle() const {\n  return FastlyAsyncTask::Handle{this->handle};\n}\n\nResult<bool> HttpBody::is_ready() const {\n  Result<bool> res;\n  uint32_t is_ready;\n  fastly::fastly_host_error err;\n  if (!convert_result(fastly::async_is_ready(this->handle, &is_ready), &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(is_ready);\n  }\n  return res;\n}\n\nFastlyResult<Response, FastlySendError> HttpPendingReq::wait() {\n  TRACE_CALL_ARGS(TSV(std::to_string(this->handle)))\n  FastlyResult<Response, FastlySendError> res;\n\n  fastly::fastly_host_http_send_error_detail s;\n  std::memset(&s, 0, sizeof(s));\n  s.mask |= FASTLY_HOST_HTTP_SEND_ERROR_DETAIL_MASK_DNS_ERROR_RCODE;\n  s.mask |= FASTLY_HOST_HTTP_SEND_ERROR_DETAIL_MASK_DNS_ERROR_INFO_CODE;\n  s.mask |= FASTLY_HOST_HTTP_SEND_ERROR_DETAIL_MASK_TLS_ALERT_ID;\n\n  fastly::fastly_host_error err;\n  fastly::fastly_host_http_response ret;\n\n  if (!convert_result(fastly::req_pending_req_wait_v2(this->handle, &s, &ret.f0, &ret.f1), &err)) {\n    res.emplace_err(make_fastly_send_error(s));\n  } else {\n    res.emplace(make_response(ret));\n    TRACE_CALL_RET(TSV(std::to_string(ret.f0)), TSV(std::to_string(ret.f1)))\n  }\n\n  return res;\n}\n\nFastlyAsyncTask::Handle HttpPendingReq::async_handle() const {\n  return FastlyAsyncTask::Handle{this->handle};\n}\n\nvoid CacheOverrideTag::set_pass() { this->value |= CACHE_OVERRIDE_PASS; }\n\nvoid CacheOverrideTag::set_ttl() { this->value |= CACHE_OVERRIDE_TTL; }\n\nvoid CacheOverrideTag::set_stale_while_revalidate() {\n  this->value |= CACHE_OVERRIDE_STALE_WHILE_REVALIDATE;\n}\n\nvoid CacheOverrideTag::set_pci() { this->value |= CACHE_OVERRIDE_PCI; }\n\nTlsVersion::TlsVersion(uint8_t raw) : value{raw} {\n  switch (raw) {\n  case fastly::TLS::VERSION_1:\n  case fastly::TLS::VERSION_1_1:\n  case fastly::TLS::VERSION_1_2:\n  case fastly::TLS::VERSION_1_3:\n    break;\n\n  default:\n    MOZ_ASSERT(false, \"Making a TlsValue from an invalid raw value\");\n  }\n}\n\nuint8_t TlsVersion::get_version() const { return this->value; }\n\ndouble TlsVersion::get_version_number() const {\n  switch (this->value) {\n  case fastly::TLS::VERSION_1:\n    return 1.0;\n  case fastly::TLS::VERSION_1_1:\n    return 1.1;\n  case fastly::TLS::VERSION_1_2:\n    return 1.2;\n  case fastly::TLS::VERSION_1_3:\n    return 1.3;\n  }\n  return 0;\n}\n\nTlsVersion TlsVersion::version_1() { return TlsVersion{fastly::TLS::VERSION_1}; }\n\nTlsVersion TlsVersion::version_1_1() { return TlsVersion{fastly::TLS::VERSION_1_1}; }\n\nTlsVersion TlsVersion::version_1_2() { return TlsVersion{fastly::TLS::VERSION_1_2}; }\n\nTlsVersion TlsVersion::version_1_3() { return TlsVersion{fastly::TLS::VERSION_1_3}; }\n\nResult<HttpReq> HttpReq::make() {\n  TRACE_CALL_ARGS(TSV(\"http_req\"))\n  Result<HttpReq> res;\n\n  HttpReq::Handle handle;\n  fastly::fastly_host_error err;\n  if (!convert_result(fastly::req_new(&handle), &err)) {\n    res.emplace_err(err);\n  } else {\n    TRACE_CALL_RET(TSV(std::to_string(handle)))\n    res.emplace(handle);\n  }\n\n  return res;\n}\n\nResult<Void> HttpReq::redirect_to_grip_proxy(std::string_view backend) {\n  TRACE_CALL()\n  Result<Void> res;\n\n  fastly::fastly_host_error err;\n  fastly::fastly_world_string backend_str = string_view_to_world_string(backend);\n  if (!convert_result(fastly::req_redirect_to_grip_proxy_v2(\n                          this->handle, reinterpret_cast<char *>(backend_str.ptr), backend_str.len),\n                      &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace();\n  }\n\n  return res;\n}\n\nResult<Void> HttpReq::redirect_to_websocket_proxy(std::string_view backend) {\n  TRACE_CALL()\n  Result<Void> res;\n\n  fastly::fastly_host_error err;\n  fastly::fastly_world_string backend_str = string_view_to_world_string(backend);\n  if (!convert_result(fastly::req_redirect_to_websocket_proxy_v2(\n                          this->handle, reinterpret_cast<char *>(backend_str.ptr), backend_str.len),\n                      &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace();\n  }\n\n  return res;\n}\n\nResult<Void> HttpReq::auto_decompress_gzip() {\n  TRACE_CALL()\n  Result<Void> res;\n\n  fastly::fastly_host_error err;\n  int encodings_to_decompress = 0 | FASTLY_HOST_CONTENT_ENCODINGS_GZIP;\n  if (!convert_result(\n          fastly::req_auto_decompress_response_set(this->handle, encodings_to_decompress), &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace();\n  }\n\n  return res;\n}\n\nResult<Void> HttpReq::register_dynamic_backend(std::string_view name, std::string_view target,\n                                               const BackendConfig &config) {\n  TRACE_CALL()\n  Result<Void> res;\n  fastly::DynamicBackendConfig backend_configuration;\n  memset(&backend_configuration, 0, sizeof(backend_configuration));\n  uint32_t backend_config_mask = 0;\n\n  auto target_str = string_view_to_world_string(target);\n\n  if (auto &val = config.host_override) {\n    backend_config_mask |= BACKEND_CONFIG_HOST_OVERRIDE;\n    auto host_override = string_view_to_world_string(*val);\n    backend_configuration.host_override = reinterpret_cast<char *>(host_override.ptr);\n    backend_configuration.host_override_len = host_override.len;\n  }\n\n  if (config.connect_timeout.has_value()) {\n    backend_config_mask |= BACKEND_CONFIG_CONNECT_TIMEOUT;\n    backend_configuration.connect_timeout_ms = *config.connect_timeout;\n  }\n\n  if (config.first_byte_timeout.has_value()) {\n    backend_config_mask |= BACKEND_CONFIG_FIRST_BYTE_TIMEOUT;\n    backend_configuration.first_byte_timeout_ms = *config.first_byte_timeout;\n  }\n\n  if (config.between_bytes_timeout.has_value()) {\n    backend_config_mask |= BACKEND_CONFIG_BETWEEN_BYTES_TIMEOUT;\n    backend_configuration.between_bytes_timeout_ms = *config.between_bytes_timeout;\n  }\n\n  if (config.use_ssl.value_or(false)) {\n    backend_config_mask |= BACKEND_CONFIG_USE_SSL;\n  }\n\n  if (config.dont_pool.value_or(false)) {\n    backend_config_mask |= BACKEND_CONFIG_DONT_POOL;\n  }\n\n  if (config.ssl_min_version.has_value()) {\n    backend_config_mask |= BACKEND_CONFIG_SSL_MIN_VERSION;\n    backend_configuration.ssl_min_version = config.ssl_min_version->get_version();\n  }\n\n  if (config.ssl_max_version.has_value()) {\n    backend_config_mask |= BACKEND_CONFIG_SSL_MAX_VERSION;\n    backend_configuration.ssl_max_version = config.ssl_max_version->get_version();\n  }\n\n  if (auto &val = config.cert_hostname) {\n    backend_config_mask |= BACKEND_CONFIG_CERT_HOSTNAME;\n    auto cert_hostname = string_view_to_world_string(*val);\n    backend_configuration.cert_hostname = reinterpret_cast<char *>(cert_hostname.ptr);\n    backend_configuration.cert_hostname_len = cert_hostname.len;\n  }\n\n  if (auto &val = config.ca_cert) {\n    backend_config_mask |= BACKEND_CONFIG_CA_CERT;\n    auto ca_cert = string_view_to_world_string(*val);\n    backend_configuration.ca_cert = reinterpret_cast<char *>(ca_cert.ptr);\n    backend_configuration.ca_cert_len = ca_cert.len;\n  }\n\n  if (auto &val = config.ciphers) {\n    backend_config_mask |= BACKEND_CONFIG_CIPHERS;\n    auto ciphers = string_view_to_world_string(*val);\n    backend_configuration.ciphers = reinterpret_cast<char *>(ciphers.ptr);\n    backend_configuration.ciphers_len = ciphers.len;\n  }\n\n  if (auto &val = config.sni_hostname) {\n    backend_config_mask |= BACKEND_CONFIG_SNI_HOSTNAME;\n    auto sni_hostname = string_view_to_world_string(*val);\n    backend_configuration.sni_hostname = reinterpret_cast<char *>(sni_hostname.ptr);\n    backend_configuration.sni_hostname_len = sni_hostname.len;\n  } else if (config.use_ssl.value_or(false)) {\n    backend_configuration.sni_hostname = reinterpret_cast<char *>(target_str.ptr);\n    backend_configuration.sni_hostname_len = target_str.len;\n  }\n\n  if (auto &val = config.client_cert) {\n    backend_config_mask |= BACKEND_CONFIG_CLIENT_CERT;\n    auto client_cert = string_view_to_world_string(val->cert);\n    backend_configuration.client_certificate = reinterpret_cast<char *>(client_cert.ptr);\n    backend_configuration.client_certificate_len = client_cert.len;\n    backend_configuration.client_key = config.client_cert->key;\n  }\n\n  if (config.grpc.value_or(false)) {\n    backend_config_mask |= BACKEND_CONFIG_GRPC;\n  }\n\n  if (config.http_keepalive_time_ms.has_value()) {\n    backend_config_mask |= BACKEND_CONFIG_KEEPALIVE;\n    backend_configuration.tcp_keepalive_enable = 1;\n    backend_configuration.http_keepalive_time_ms = config.http_keepalive_time_ms.value();\n  }\n\n  if (config.tcp_keepalive.has_value()) {\n    backend_config_mask |= BACKEND_CONFIG_KEEPALIVE;\n    backend_configuration.tcp_keepalive_enable = 1;\n    auto tcp_keepalive = config.tcp_keepalive.value();\n    if (tcp_keepalive.interval_secs.has_value()) {\n      backend_configuration.tcp_keepalive_interval_secs = tcp_keepalive.interval_secs.value();\n    }\n    if (tcp_keepalive.probes.has_value()) {\n      backend_configuration.tcp_keepalive_probes = tcp_keepalive.probes.value();\n    }\n    if (tcp_keepalive.time_secs.has_value()) {\n      backend_configuration.tcp_keepalive_time_secs = tcp_keepalive.time_secs.value();\n    }\n  }\n\n  auto name_str = string_view_to_world_string(name);\n  fastly::fastly_host_error err;\n  if (!convert_result(fastly::req_register_dynamic_backend(\n                          reinterpret_cast<char *>(name_str.ptr), name_str.len,\n                          reinterpret_cast<char *>(target_str.ptr), target_str.len,\n                          backend_config_mask, &backend_configuration),\n                      &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace();\n  }\n\n  return res;\n}\n\nResult<HttpPendingReq> HttpReq::send_async(HttpBody body, std::string_view backend) {\n  TRACE_CALL()\n  Result<HttpPendingReq> res;\n\n  fastly::fastly_host_error err;\n  HttpPendingReq::Handle ret;\n  fastly::fastly_world_string backend_str = string_view_to_world_string(backend);\n  if (!convert_result(fastly::req_send_async(this->handle, body.handle,\n                                             reinterpret_cast<char *>(backend_str.ptr),\n                                             backend_str.len, &ret),\n                      &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(ret);\n  }\n\n  return res;\n}\n\nResult<HttpPendingReq> HttpReq::send_async_streaming(HttpBody body, std::string_view backend) {\n  TRACE_CALL()\n  Result<HttpPendingReq> res;\n\n  fastly::fastly_host_error err;\n  HttpPendingReq::Handle ret;\n  fastly::fastly_world_string backend_str = string_view_to_world_string(backend);\n  if (!convert_result(fastly::req_send_async_streaming(this->handle, body.handle,\n                                                       reinterpret_cast<char *>(backend_str.ptr),\n                                                       backend_str.len, &ret),\n                      &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(ret);\n  }\n\n  return res;\n}\n\nResult<HttpPendingReq> HttpReq::send_async_without_caching(HttpBody body, std::string_view backend,\n                                                           bool streaming) {\n  TRACE_CALL_ARGS(TSV(std::to_string(body.handle)),\n                  streaming ? TSV(\"streaming\") : TSV(\"not streaming\"))\n  Result<HttpPendingReq> res;\n\n  fastly::fastly_host_error err;\n  HttpPendingReq::Handle ret;\n  fastly::fastly_world_string backend_str = string_view_to_world_string(backend);\n  if (!convert_result(fastly::req_send_async_v2(this->handle, body.handle,\n                                                reinterpret_cast<char *>(backend_str.ptr),\n                                                backend_str.len, streaming ? 1 : 0, &ret),\n                      &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(ret);\n  }\n\n  return res;\n}\n\nFastlyResult<Response, FastlyImageOptimizerError>\nHttpReq::send_image_optimizer(HttpBody body, std::string_view backend,\n                              std::string_view config_str) {\n  TRACE_CALL()\n  FastlyResult<Response, FastlyImageOptimizerError> res;\n\n  fastly::fastly_host_error err;\n  HttpReq::Handle orig_req_body_handle = INVALID_HANDLE;\n  fastly::fastly_world_string backend_str = string_view_to_world_string(backend);\n  auto opts = FASTLY_IMAGE_OPTIMIZER_SDK_CLAIMS_OPTS;\n  fastly::fastly_image_optimizer_transform_config config{config_str.data(), config_str.size()};\n  fastly::fastly_image_optimizer_error_detail io_err_out{};\n  uint32_t resp_handle_out = INVALID_HANDLE, body_handle_out = INVALID_HANDLE;\n  auto host_call_success = convert_result(\n      fastly::image_optimizer_transform_image_optimizer_request(\n          this->handle, orig_req_body_handle, reinterpret_cast<char *>(backend_str.ptr),\n          backend_str.len, opts, &config, &io_err_out, &resp_handle_out, &body_handle_out),\n      &err);\n  if (!host_call_success) {\n    res.emplace_err(make_fastly_image_optimizer_error(err));\n  } else if (false && io_err_out.tag != FASTLY_IMAGE_OPTIMIZER_ERROR_TAG_OK) {\n    res.emplace_err(make_fastly_image_optimizer_error(io_err_out));\n  } else {\n    res.emplace(HttpResp(resp_handle_out), HttpBody(body_handle_out));\n  }\n\n  return res;\n}\n\nResult<Void> HttpReq::set_method(std::string_view method) {\n  TRACE_CALL()\n  Result<Void> res;\n\n  fastly::fastly_host_error err;\n  fastly::fastly_world_string str = string_view_to_world_string(method);\n  if (!convert_result(\n          fastly::req_method_set(this->handle, reinterpret_cast<char *>(str.ptr), str.len), &err)) {\n    res.emplace_err(err);\n  }\n\n  return res;\n}\n\nResult<HostString> HttpReq::get_method() const {\n  TRACE_CALL_ARGS(TSV(std::to_string(handle)))\n  Result<HostString> res;\n\n  fastly::fastly_host_error err;\n  fastly::fastly_world_string method;\n  method.ptr = static_cast<uint8_t *>(cabi_malloc(METHOD_MAX_LEN, 1));\n  if (!convert_result(fastly::req_method_get(this->handle, reinterpret_cast<char *>(method.ptr),\n                                             METHOD_MAX_LEN, &method.len),\n                      &err)) {\n    cabi_free(method.ptr);\n    res.emplace_err(err);\n  } else {\n    method.ptr = static_cast<uint8_t *>(cabi_realloc(method.ptr, METHOD_MAX_LEN, 1, method.len));\n    res.emplace(make_host_string(method));\n  }\n\n  return res;\n}\n\nResult<Void> HttpReq::set_uri(std::string_view str) {\n  TRACE_CALL_ARGS(TSV(std::to_string(this->handle)), TSV(str))\n  Result<Void> res;\n\n  fastly::fastly_host_error err;\n  fastly::fastly_world_string uri = string_view_to_world_string(str);\n  if (!convert_result(fastly::req_uri_set(this->handle, reinterpret_cast<char *>(uri.ptr), uri.len),\n                      &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace();\n  }\n\n  return res;\n}\n\nResult<HostString> HttpReq::get_uri() const {\n  TRACE_CALL_ARGS(TSV(std::to_string(handle)))\n  Result<HostString> res;\n\n  fastly::fastly_host_error err;\n  fastly::fastly_world_string uri;\n  uri.ptr = static_cast<uint8_t *>(cabi_malloc(URI_MAX_LEN, 1));\n  if (!convert_result(fastly::req_uri_get(this->handle, reinterpret_cast<char *>(uri.ptr),\n                                          URI_MAX_LEN, &uri.len),\n                      &err)) {\n    cabi_free(uri.ptr);\n    res.emplace_err(err);\n  } else {\n    uri.ptr = static_cast<uint8_t *>(cabi_realloc(uri.ptr, URI_MAX_LEN, 1, uri.len));\n    res.emplace(make_host_string(uri));\n  }\n\n  return res;\n}\n\nResult<Void> HttpReq::cache_override(CacheOverrideTag tag, std::optional<uint32_t> opt_ttl,\n                                     std::optional<uint32_t> opt_swr,\n                                     std::optional<std::string_view> opt_sk) {\n  TRACE_CALL()\n  Result<Void> res;\n\n  fastly::fastly_world_string sk;\n  if (opt_sk.has_value()) {\n    sk = string_view_to_world_string(opt_sk.value());\n  } else {\n    sk.ptr = nullptr;\n    sk.len = 0;\n  }\n\n  fastly::fastly_host_error err;\n  if (!convert_result(fastly::req_cache_override_v2_set(this->handle, tag.value,\n                                                        opt_ttl.value_or(0), opt_swr.value_or(0),\n                                                        reinterpret_cast<char *>(sk.ptr), sk.len),\n                      &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace();\n  }\n\n  return res;\n}\n\nResult<Void> HttpReq::set_framing_headers_mode(FramingHeadersMode mode) {\n  TRACE_CALL()\n  Result<Void> res;\n\n  fastly::fastly_host_error err;\n  if (!convert_result(\n          fastly::req_framing_headers_mode_set(this->handle, static_cast<uint32_t>(mode)), &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace();\n  }\n\n  return res;\n}\n\n// http-req-downstream-client-request-id: func() -> result<option<string>, error>\nResult<std::optional<HostString>> HttpReq::http_req_downstream_client_request_id() {\n  TRACE_CALL()\n  Result<std::optional<HostString>> res;\n\n  fastly::fastly_host_error err;\n  fastly::fastly_world_string ret;\n  auto default_size = 128;\n  ret.ptr = static_cast<uint8_t *>(cabi_malloc(default_size, 4));\n  auto status =\n      fastly::http_downstream_client_request_id(this->handle, ret.ptr, default_size, &ret.len);\n  if (status == FASTLY_HOST_ERROR_BUFFER_LEN) {\n    ret.ptr = static_cast<uint8_t *>(cabi_realloc(ret.ptr, default_size, 4, ret.len));\n    status = fastly::http_downstream_client_request_id(this->handle, ret.ptr, ret.len, &ret.len);\n  }\n  if (!convert_result(status, &err)) {\n    cabi_free(ret.ptr);\n    if (error_is_optional_none(err)) {\n      res.emplace(std::nullopt);\n    } else {\n      res.emplace_err(err);\n    }\n  } else {\n    res.emplace(make_host_string(ret));\n  }\n\n  return res;\n}\n\nResult<HostBytes> HttpReq::downstream_client_ip_addr() {\n  TRACE_CALL()\n  Result<HostBytes> res;\n\n  fastly::fastly_world_list_u8 octets;\n  octets.ptr = static_cast<uint8_t *>(cabi_malloc(16, 1));\n  fastly::fastly_host_error err;\n  if (!convert_result(\n          fastly::http_downstream_client_ip_addr_get(this->handle, octets.ptr, &octets.len),\n          &err)) {\n    cabi_free(octets.ptr);\n    res.emplace_err(err);\n  } else {\n    res.emplace(make_host_bytes(octets.ptr, octets.len));\n  }\n\n  return res;\n}\n\nResult<HostBytes> HttpReq::downstream_server_ip_addr() {\n  TRACE_CALL()\n  Result<HostBytes> res;\n\n  fastly::fastly_world_list_u8 octets;\n  octets.ptr = static_cast<uint8_t *>(cabi_malloc(16, 1));\n  fastly::fastly_host_error err;\n  if (!convert_result(\n          fastly::http_downstream_server_ip_addr_get(this->handle, octets.ptr, &octets.len),\n          &err)) {\n    cabi_free(octets.ptr);\n    res.emplace_err(err);\n  } else {\n    res.emplace(make_host_bytes(octets.ptr, octets.len));\n  }\n\n  return res;\n}\n\n// http-req-downstream-tls-cipher-openssl-name: func() -> result<string, error>\nResult<std::optional<HostString>> HttpReq::http_req_downstream_tls_cipher_openssl_name() {\n  TRACE_CALL()\n  Result<std::optional<HostString>> res;\n\n  fastly::fastly_host_error err;\n  fastly::fastly_world_string ret;\n  auto default_size = 128;\n  ret.ptr = static_cast<uint8_t *>(cabi_malloc(default_size, 4));\n  auto status = fastly::http_downstream_tls_cipher_openssl_name(\n      this->handle, reinterpret_cast<char *>(ret.ptr), default_size, &ret.len);\n  if (status == FASTLY_HOST_ERROR_BUFFER_LEN) {\n    // NB(@zkat): ERROR_BUFFER_LEN sets the expected length of the buffer to\n    //            &ret.len, so we use that to inform our resize.\n    ret.ptr = static_cast<uint8_t *>(cabi_realloc(ret.ptr, default_size, 4, ret.len));\n    status = fastly::http_downstream_tls_cipher_openssl_name(\n        this->handle, reinterpret_cast<char *>(ret.ptr), ret.len, &ret.len);\n  }\n\n  if (!convert_result(status, &err)) {\n    cabi_free(ret.ptr);\n    if (error_is_optional_none(err)) {\n      res.emplace(std::nullopt);\n    } else {\n      res.emplace_err(err);\n    }\n  } else {\n    res.emplace(make_host_string(ret));\n  }\n\n  return res;\n}\n\n// http-req-downstream-tls-protocol: func() -> result<string, error>\nResult<std::optional<HostString>> HttpReq::http_req_downstream_tls_protocol() {\n  TRACE_CALL()\n  Result<std::optional<HostString>> res;\n\n  fastly::fastly_host_error err;\n  fastly::fastly_world_string ret;\n  auto default_size = 32;\n  ret.ptr = static_cast<uint8_t *>(cabi_malloc(default_size, 4));\n  auto status = fastly::http_downstream_tls_protocol(\n      this->handle, reinterpret_cast<char *>(ret.ptr), default_size, &ret.len);\n  if (status == FASTLY_HOST_ERROR_BUFFER_LEN) {\n    // NB(@zkat): ERROR_BUFFER_LEN sets the expected length of the buffer to\n    //            &ret.len, so we use that to inform our resize.\n    ret.ptr = static_cast<uint8_t *>(cabi_realloc(ret.ptr, default_size, 4, ret.len));\n    status = fastly::http_downstream_tls_protocol(this->handle, reinterpret_cast<char *>(ret.ptr),\n                                                  ret.len, &ret.len);\n  }\n  if (!convert_result(status, &err)) {\n    cabi_free(ret.ptr);\n    if (error_is_optional_none(err)) {\n      res.emplace(std::nullopt);\n    } else {\n      res.emplace_err(err);\n    }\n  } else {\n    res.emplace(make_host_string(ret));\n  }\n\n  return res;\n}\n\n// http-req-downstream-tls-client-hello: func() -> result<list<u8>, error>\nResult<std::optional<HostBytes>> HttpReq::http_req_downstream_tls_client_hello() {\n  TRACE_CALL()\n  Result<std::optional<HostBytes>> res;\n\n  fastly::fastly_world_list_u8 ret;\n  fastly::fastly_host_error err;\n  auto default_size = 512;\n  ret.ptr = static_cast<uint8_t *>(cabi_malloc(default_size, 4));\n  auto status =\n      fastly::http_downstream_tls_client_hello(this->handle, ret.ptr, default_size, &ret.len);\n  if (status == FASTLY_HOST_ERROR_BUFFER_LEN) {\n    // NB(@zkat): ERROR_BUFFER_LEN sets the expected length of the buffer to\n    //            &ret.len, so we use that to inform our resize.\n    ret.ptr = static_cast<uint8_t *>(cabi_realloc(ret.ptr, default_size, 4, ret.len));\n    status = fastly::http_downstream_tls_client_hello(this->handle, ret.ptr, ret.len, &ret.len);\n  }\n\n  if (!convert_result(status, &err)) {\n    cabi_free(ret.ptr);\n    if (error_is_optional_none(err)) {\n      res.emplace(std::nullopt);\n    } else {\n      res.emplace_err(err);\n    }\n  } else {\n    res.emplace(make_host_bytes(ret.ptr, ret.len));\n  }\n\n  return res;\n}\n\n// http-req-downstream-tls-raw-client-certificate: func() -> result<list<u8>, error>\nResult<std::optional<HostBytes>> HttpReq::http_req_downstream_tls_raw_client_certificate() {\n  TRACE_CALL()\n  Result<std::optional<HostBytes>> res;\n\n  fastly::fastly_world_list_u8 ret;\n  fastly::fastly_host_error err;\n  auto default_size = 4096;\n  ret.ptr = static_cast<uint8_t *>(cabi_malloc(default_size, 4));\n  auto status = fastly::http_downstream_tls_raw_client_certificate(this->handle, ret.ptr,\n                                                                   default_size, &ret.len);\n  if (status == FASTLY_HOST_ERROR_BUFFER_LEN) {\n    // NB(@zkat): ERROR_BUFFER_LEN sets the expected length of the buffer to\n    //            &ret.len, so we use that to inform our resize.\n    ret.ptr = static_cast<uint8_t *>(cabi_realloc(ret.ptr, default_size, 4, ret.len));\n    status = fastly::http_downstream_tls_raw_client_certificate(this->handle, ret.ptr, ret.len,\n                                                                &ret.len);\n  }\n  if (!convert_result(status, &err)) {\n    cabi_free(ret.ptr);\n    if (error_is_optional_none(err)) {\n      res.emplace(std::nullopt);\n    } else {\n      res.emplace_err(err);\n    }\n  } else {\n    res.emplace(make_host_bytes(ret.ptr, ret.len));\n  }\n\n  return res;\n}\n\n// http-req-downstream-tls-ja3-md5: func() -> result<list<u8>, error>\nResult<std::optional<HostBytes>> HttpReq::http_req_downstream_tls_ja3_md5() {\n  TRACE_CALL()\n  Result<std::optional<HostBytes>> res;\n\n  fastly::fastly_world_list_u8 ret;\n  fastly::fastly_host_error err;\n  auto default_size = 16;\n  ret.ptr = static_cast<uint8_t *>(cabi_malloc(default_size, 4));\n  auto status = fastly::http_downstream_tls_ja3_md5(this->handle, ret.ptr, &ret.len);\n  if (status == FASTLY_HOST_ERROR_BUFFER_LEN) {\n    // NB(@zkat): ERROR_BUFFER_LEN sets the expected length of the buffer to\n    //            &ret.len, so we use that to inform our resize.\n    ret.ptr = static_cast<uint8_t *>(cabi_realloc(ret.ptr, default_size, 4, ret.len));\n    status = fastly::http_downstream_tls_ja3_md5(this->handle, ret.ptr, &ret.len);\n  }\n  if (!convert_result(status, &err)) {\n    cabi_free(ret.ptr);\n    if (error_is_optional_none(err)) {\n      res.emplace(std::nullopt);\n    } else {\n      res.emplace_err(err);\n    }\n  } else {\n    res.emplace(make_host_bytes(ret.ptr, ret.len));\n  }\n\n  return res;\n}\n\n// http-req-downstream-tls-ja4: func() -> result<option<string>, error>\nResult<std::optional<HostString>> HttpReq::http_req_downstream_tls_ja4() {\n  TRACE_CALL()\n  Result<std::optional<HostString>> res;\n\n  fastly::fastly_host_error err;\n  fastly::fastly_world_string ret;\n  auto default_size = 128;\n  ret.ptr = static_cast<uint8_t *>(cabi_malloc(default_size, 4));\n  auto status = fastly::http_downstream_tls_ja4(this->handle, ret.ptr, default_size, &ret.len);\n  if (status == FASTLY_HOST_ERROR_BUFFER_LEN) {\n    ret.ptr = static_cast<uint8_t *>(cabi_realloc(ret.ptr, default_size, 4, ret.len));\n    status = fastly::http_downstream_tls_ja4(this->handle, ret.ptr, ret.len, &ret.len);\n  }\n  if (!convert_result(status, &err)) {\n    cabi_free(ret.ptr);\n    if (error_is_optional_none(err)) {\n      res.emplace(std::nullopt);\n    } else {\n      res.emplace_err(err);\n    }\n  } else {\n    res.emplace(make_host_string(ret));\n  }\n\n  return res;\n}\n\n// http-req-downstream-client-h2-fingerprint: func() -> result<option<string>, error>\nResult<std::optional<HostString>> HttpReq::http_req_downstream_client_h2_fingerprint() {\n  TRACE_CALL()\n  Result<std::optional<HostString>> res;\n\n  fastly::fastly_host_error err;\n  fastly::fastly_world_string ret;\n  auto default_size = 128;\n  ret.ptr = static_cast<uint8_t *>(cabi_malloc(default_size, 4));\n  auto status =\n      fastly::http_downstream_client_h2_fingerprint(this->handle, ret.ptr, default_size, &ret.len);\n  if (status == FASTLY_HOST_ERROR_BUFFER_LEN) {\n    ret.ptr = static_cast<uint8_t *>(cabi_realloc(ret.ptr, default_size, 4, ret.len));\n    status =\n        fastly::http_downstream_client_h2_fingerprint(this->handle, ret.ptr, ret.len, &ret.len);\n  }\n  if (!convert_result(status, &err)) {\n    cabi_free(ret.ptr);\n    if (error_is_optional_none(err)) {\n      res.emplace(std::nullopt);\n    } else {\n      res.emplace_err(err);\n    }\n  } else {\n    res.emplace(make_host_string(ret));\n  }\n\n  return res;\n}\n\n// http-req-downstream-client-oh-fingerprint: func() -> result<option<string>, error>\nResult<std::optional<HostString>> HttpReq::http_req_downstream_client_oh_fingerprint() {\n  TRACE_CALL()\n  Result<std::optional<HostString>> res;\n\n  fastly::fastly_host_error err;\n  fastly::fastly_world_string ret;\n  auto default_size = 128;\n  ret.ptr = static_cast<uint8_t *>(cabi_malloc(default_size, 4));\n  auto status =\n      fastly::http_downstream_client_oh_fingerprint(this->handle, ret.ptr, default_size, &ret.len);\n  if (status == FASTLY_HOST_ERROR_BUFFER_LEN) {\n    ret.ptr = static_cast<uint8_t *>(cabi_realloc(ret.ptr, default_size, 4, ret.len));\n    status =\n        fastly::http_downstream_client_oh_fingerprint(this->handle, ret.ptr, ret.len, &ret.len);\n  }\n  if (!convert_result(status, &err)) {\n    cabi_free(ret.ptr);\n    if (error_is_optional_none(err)) {\n      res.emplace(std::nullopt);\n    } else {\n      res.emplace_err(err);\n    }\n  } else {\n    res.emplace(make_host_string(ret));\n  }\n\n  return res;\n}\n\nbool HttpReq::is_valid() const { return this->handle != HttpReq::invalid; }\n\nResult<HttpVersion> HttpReq::get_version() const {\n  TRACE_CALL()\n  Result<uint8_t> res;\n\n  fastly::fastly_host_error err;\n  uint32_t fastly_http_version;\n  if (!convert_result(fastly::req_version_get(this->handle, &fastly_http_version), &err)) {\n    res.emplace_err(err);\n  } else {\n    MOZ_ASSERT(fastly_http_version <= static_cast<int>(std::numeric_limits<uint8_t>::max()));\n    res.emplace(fastly_http_version);\n  }\n\n  return res;\n}\n\nHttpHeadersReadOnly *HttpReq::headers() {\n  return new HttpHeadersReadOnly(std::unique_ptr<HandleState>(new HandleState(this->handle, true)));\n}\n\nHttpHeaders *HttpReq::headers_writable() { return headers()->clone(); }\n\nResult<HttpReqPromise>\nHttpReqPromise::downstream_next(HttpReqPromise::DownstreamNextOptions options) {\n  TRACE_CALL()\n  Result<HttpReqPromise> res;\n\n  fastly::fastly_http_downstream_next_request_options opts{};\n  uint32_t opts_mask = 0;\n  if (options.timeout_ms) {\n    opts_mask |= FASTLY_HTTP_DOWNSTREAM_NEXT_REQUEST_OPTIONS_MASK_TIMEOUT;\n    opts.timeout_ms = options.timeout_ms.value();\n  }\n\n  fastly::fastly_host_error err;\n  HttpReqPromise::Handle handle;\n  if (!convert_result(fastly::downstream_next_request(opts_mask, &opts, &handle), &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(handle);\n  }\n\n  return res;\n}\n\nResult<Request> HttpReqPromise::wait() {\n  TRACE_CALL_ARGS(TSV(std::to_string(this->handle)))\n  Result<Request> res;\n\n  fastly::fastly_host_error err;\n  HttpReq::Handle req_handle = HttpReq::invalid;\n  HttpBody::Handle body_handle = HttpBody::invalid;\n  if (!convert_result(fastly::downstream_next_request_wait(this->handle, &req_handle, &body_handle),\n                      &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(HttpReq(req_handle), HttpBody(body_handle));\n  }\n\n  return res;\n}\n\nResult<Void> HttpReqPromise::abandon() {\n  TRACE_CALL_ARGS(TSV(std::to_string(this->handle)))\n  Result<Void> res;\n\n  fastly::fastly_host_error err;\n  if (!convert_result(fastly::downstream_next_request_abandon(this->handle), &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace();\n  }\n\n  return res;\n}\n\nResult<HttpResp> HttpResp::make() {\n  TRACE_CALL_ARGS(TSV(\"http_resp\"))\n  Result<HttpResp> res;\n\n  HttpResp::Handle handle;\n  fastly::fastly_host_error err;\n  if (!convert_result(fastly::resp_new(&handle), &err)) {\n    res.emplace_err(err);\n  } else {\n    TRACE_CALL_RET(TSV(std::to_string(handle)))\n    res.emplace(handle);\n  }\n\n  return res;\n}\n\nResult<uint16_t> HttpResp::get_status() const {\n  TRACE_CALL_ARGS(TSV(std::to_string(this->handle)))\n  Result<uint16_t> res;\n\n  uint16_t ret;\n  fastly::fastly_host_error err;\n  if (!convert_result(fastly::resp_status_get(this->handle, &ret), &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(ret);\n  }\n\n  return res;\n}\n\nResult<Void> HttpResp::set_status(uint16_t status) {\n  TRACE_CALL_ARGS(TSV(std::to_string(status)))\n  Result<Void> res;\n\n  fastly::fastly_host_error err;\n  if (!convert_result(fastly::resp_status_set(this->handle, status), &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace();\n  }\n\n  return res;\n}\n\nResult<Void> HttpResp::send_downstream(HttpBody body, bool streaming) {\n  TRACE_CALL_ARGS(TSV(std::to_string(body.handle)),\n                  streaming ? TSV(\"streaming\") : TSV(\"not streaming\"))\n  Result<Void> res;\n\n  fastly::fastly_host_error err;\n  if (!convert_result(fastly::resp_send_downstream(this->handle, body.handle, streaming), &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace();\n  }\n\n  return res;\n}\n\nResult<Void> HttpResp::set_framing_headers_mode(FramingHeadersMode mode) {\n  TRACE_CALL()\n  Result<Void> res;\n\n  fastly::fastly_host_error err;\n  if (!convert_result(\n          fastly::resp_framing_headers_mode_set(this->handle, static_cast<uint32_t>(mode)), &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace();\n  }\n\n  return res;\n}\n\nbool HttpResp::is_valid() const { return this->handle != HttpResp::invalid; }\n\nResult<HttpVersion> HttpResp::get_version() const {\n  TRACE_CALL()\n  Result<HttpVersion> res;\n\n  fastly::fastly_host_error err;\n  uint32_t fastly_http_version;\n  if (!convert_result(fastly::resp_version_get(this->handle, &fastly_http_version), &err)) {\n    res.emplace_err(err);\n  } else {\n    MOZ_ASSERT(fastly_http_version <= static_cast<int>(std::numeric_limits<uint8_t>::max()));\n    res.emplace(fastly_http_version);\n  }\n\n  return res;\n}\n\nHttpHeadersReadOnly *HttpResp::headers() {\n  return new HttpHeadersReadOnly(\n      std::unique_ptr<HandleState>(new HandleState(this->handle, false)));\n}\n\nHttpHeaders *HttpResp::headers_writable() { return headers()->clone(); }\n\nResult<std::optional<HostBytes>> HttpResp::get_ip() const {\n  TRACE_CALL()\n  Result<std::optional<HostBytes>> res;\n\n  fastly::fastly_host_error err;\n  fastly::fastly_world_list_u8 ret;\n\n  ret.ptr = static_cast<uint8_t *>(cabi_malloc(16, 1));\n  if (!convert_result(fastly::resp_ip_get(this->handle, ret.ptr, &ret.len), &err)) {\n    cabi_free(ret.ptr);\n    if (error_is_optional_none(err)) {\n      res.emplace(std::nullopt);\n    } else {\n      res.emplace_err(err);\n    }\n  } else {\n    res.emplace(make_host_bytes(ret.ptr, ret.len));\n  }\n  return res;\n}\n\nResult<std::optional<uint16_t>> HttpResp::get_port() const {\n  TRACE_CALL()\n  Result<std::optional<uint16_t>> res;\n\n  fastly::fastly_host_error err;\n  uint16_t ret;\n  if (!convert_result(fastly::resp_port_get(this->handle, &ret), &err)) {\n    if (error_is_optional_none(err)) {\n      res.emplace(std::nullopt);\n    } else {\n      res.emplace_err(err);\n    }\n  } else {\n    res.emplace(ret);\n  }\n\n  return res;\n}\n\nResult<std::optional<HostString>> GeoIp::lookup(std::span<uint8_t> bytes) {\n  TRACE_CALL()\n  Result<std::optional<HostString>> res;\n\n  fastly::fastly_world_list_u8 octets_list{const_cast<uint8_t *>(bytes.data()), bytes.size()};\n  fastly::fastly_world_string ret;\n  fastly::fastly_host_error err;\n  ret.ptr = static_cast<uint8_t *>(cabi_malloc(HOSTCALL_BUFFER_LEN, 1));\n  if (!convert_result(fastly::geo_lookup(octets_list.ptr, octets_list.len,\n                                         reinterpret_cast<char *>(ret.ptr), HOSTCALL_BUFFER_LEN,\n                                         &ret.len),\n                      &err)) {\n    cabi_free(ret.ptr);\n    if (error_is_optional_none(err)) {\n      res.emplace(std::nullopt);\n    } else {\n      res.emplace_err(err);\n    }\n  } else if (ret.len == 0) {\n    // Viceroy returns a zero len instead of none for unknown cases for some reason\n    cabi_free(ret.ptr);\n    res.emplace(std::nullopt);\n  } else {\n    ret.ptr = static_cast<uint8_t *>(cabi_realloc(ret.ptr, HOSTCALL_BUFFER_LEN, 1, ret.len));\n    res.emplace(make_host_string(ret));\n  }\n\n  return res;\n}\n\nnamespace {\n\nstruct FastlyCacheWriteOptionsOwned {\n  std::unique_ptr<fastly::fastly_http_cache_write_options> options;\n  uint32_t mask;\n  // surrogate keys backing store when ' ' joined\n  std::unique_ptr<char[]> surrogate_keys_owned;\n};\n\nFastlyCacheWriteOptionsOwned to_fastly_cache_write_options(const HttpCacheWriteOptions *opts) {\n  FastlyCacheWriteOptionsOwned result{};\n  result.options = std::make_unique<fastly::fastly_http_cache_write_options>();\n\n  // Required field, no mask\n  result.options->max_age_ns = opts->max_age_ns.value();\n\n  if (opts->vary_rule && *opts->vary_rule) {\n    // Convert HostString to char* and length\n    result.options->vary_rule = opts->vary_rule->ptr.get();\n    result.options->vary_rule_len = opts->vary_rule->len;\n    result.mask |= FASTLY_HTTP_CACHE_WRITE_OPTIONS_MASK_VARY_RULE;\n  }\n\n  if (opts->initial_age_ns) {\n    result.options->initial_age_ns = *opts->initial_age_ns;\n    result.mask |= FASTLY_HTTP_CACHE_WRITE_OPTIONS_MASK_INITIAL_AGE_NS;\n  }\n\n  if (opts->stale_while_revalidate_ns) {\n    result.options->stale_while_revalidate_ns = *opts->stale_while_revalidate_ns;\n    result.mask |= FASTLY_HTTP_CACHE_WRITE_OPTIONS_MASK_STALE_WHILE_REVALIDATE_NS;\n  }\n\n  if (opts->surrogate_keys.has_value()) {\n    const auto &keys = opts->surrogate_keys.value();\n    if (keys.size() == 1) {\n      result.options->surrogate_keys = keys[0].ptr.get();\n      result.options->surrogate_keys_len = keys[0].len;\n    } else if (keys.size() > 1) {\n      // Calculate total length needed including spaces\n      size_t total_len = 0;\n      for (const auto &key : keys) {\n        total_len += key.len + 1; // +1 for space or null\n      }\n\n      // Allocate array using make_unique\n      auto surrogate_keys = std::make_unique<char[]>(total_len);\n      size_t pos = 0;\n\n      // Copy first key\n      memcpy(surrogate_keys.get() + pos, keys[0].ptr.get(), keys[0].len);\n      pos += keys[0].len;\n\n      // Copy remaining keys with leading space\n      for (size_t i = 1; i < keys.size(); i++) {\n        surrogate_keys[pos++] = ' ';\n        memcpy(surrogate_keys.get() + pos, keys[i].ptr.get(), keys[i].len);\n        pos += keys[i].len;\n      }\n\n      result.surrogate_keys_owned = std::move(surrogate_keys);\n      result.options->surrogate_keys = result.surrogate_keys_owned.get();\n      result.options->surrogate_keys_len = total_len - 1;\n    }\n    result.mask |= FASTLY_HTTP_CACHE_WRITE_OPTIONS_MASK_SURROGATE_KEYS;\n  }\n\n  if (opts->length) {\n    result.options->length = *opts->length;\n    result.mask |= FASTLY_HTTP_CACHE_WRITE_OPTIONS_MASK_LENGTH;\n  }\n\n  if (opts->sensitive_data) {\n    result.mask |= FASTLY_HTTP_CACHE_WRITE_OPTIONS_MASK_SENSITIVE_DATA;\n  }\n\n  return result;\n}\n\nHttpCacheWriteOptions *\nfrom_fastly_cache_write_options(const fastly::fastly_http_cache_write_options &fastly_opts,\n                                uint32_t mask) {\n  HttpCacheWriteOptions *opts = new HttpCacheWriteOptions();\n\n  // Required field\n  opts->max_age_ns = fastly_opts.max_age_ns;\n\n  if (mask & FASTLY_HTTP_CACHE_WRITE_OPTIONS_MASK_VARY_RULE && fastly_opts.vary_rule &&\n      fastly_opts.vary_rule_len > 0) {\n    // Create a new HostString from the data\n    opts->vary_rule.emplace(JS::UniqueChars(static_cast<char *>(malloc(fastly_opts.vary_rule_len))),\n                            fastly_opts.vary_rule_len);\n    memcpy(opts->vary_rule->ptr.get(), fastly_opts.vary_rule, fastly_opts.vary_rule_len);\n  }\n\n  if (mask & FASTLY_HTTP_CACHE_WRITE_OPTIONS_MASK_INITIAL_AGE_NS) {\n    opts->initial_age_ns = fastly_opts.initial_age_ns;\n  }\n\n  if (mask & FASTLY_HTTP_CACHE_WRITE_OPTIONS_MASK_STALE_WHILE_REVALIDATE_NS) {\n    opts->stale_while_revalidate_ns = fastly_opts.stale_while_revalidate_ns;\n  }\n\n  if (mask & FASTLY_HTTP_CACHE_WRITE_OPTIONS_MASK_SURROGATE_KEYS && fastly_opts.surrogate_keys &&\n      fastly_opts.surrogate_keys_len > 0) {\n    opts->surrogate_keys.emplace();\n    // Split space-separated surrogate keys\n    std::string_view keys_str(fastly_opts.surrogate_keys, fastly_opts.surrogate_keys_len);\n    size_t pos = 0;\n    while (pos < keys_str.size()) {\n      size_t space = keys_str.find(' ', pos);\n      if (space == std::string_view::npos) {\n        size_t key_len = keys_str.size() - pos;\n        JS::UniqueChars key_ptr(static_cast<char *>(malloc(key_len)));\n        memcpy(key_ptr.get(), keys_str.data() + pos, key_len);\n        opts->surrogate_keys->push_back(HostString(std::move(key_ptr), key_len));\n        break;\n      }\n      size_t key_len = space - pos;\n      JS::UniqueChars key_ptr(static_cast<char *>(malloc(key_len)));\n      memcpy(key_ptr.get(), keys_str.data() + pos, key_len);\n      opts->surrogate_keys->push_back(HostString(std::move(key_ptr), key_len));\n      pos = space + 1;\n    }\n  }\n\n  if (mask & FASTLY_HTTP_CACHE_WRITE_OPTIONS_MASK_LENGTH) {\n    opts->length = fastly_opts.length;\n  }\n\n  if (mask & FASTLY_HTTP_CACHE_WRITE_OPTIONS_MASK_SENSITIVE_DATA) {\n    opts->sensitive_data = true;\n  }\n\n  return opts;\n}\n\n} // namespace\n\n// HttpReq cache-related method implementations\nResult<bool> HttpReq::is_cacheable() const {\n  TRACE_CALL_ARGS(TSV(std::to_string(this->handle)))\n  uint32_t is_cacheable_out;\n  auto res = fastly::http_cache_is_request_cacheable(this->handle, &is_cacheable_out);\n  if (res != 0) {\n    return Result<bool>::err(host_api::APIError(res));\n  }\n  return Result<bool>::ok(is_cacheable_out != 0);\n}\n\nResult<HostString> HttpReq::get_suggested_cache_key() const {\n  TRACE_CALL()\n  size_t nwritten;\n  uint8_t *buffer = static_cast<uint8_t *>(cabi_malloc(32, 4)); // HTTP cache keys must be 32 bytes\n  if (!buffer) {\n    return Result<HostString>::err(host_api::APIError(FASTLY_HOST_ERROR_GENERIC_ERROR));\n  }\n\n  auto res = fastly::http_cache_get_suggested_cache_key(\n      this->handle, reinterpret_cast<char *>(buffer), 32, &nwritten);\n\n  if (res != 0) {\n    cabi_free(buffer);\n    return Result<HostString>::err(host_api::APIError(res));\n  }\n\n  fastly::fastly_world_string str = {.ptr = buffer, .len = nwritten};\n  return Result<HostString>::ok(make_host_string(str));\n}\n\nResult<Request> Request::downstream_get() {\n  TRACE_CALL()\n  Result<Request> res;\n\n  fastly::fastly_host_error err;\n  HttpReq::Handle req_handle = HttpReq::invalid;\n  HttpBody::Handle body_handle = HttpBody::invalid;\n  if (!convert_result(fastly::req_body_downstream_get(&req_handle, &body_handle), &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(HttpReq(req_handle), HttpBody(body_handle));\n  }\n\n  return res;\n}\n\nResult<HostString> Request::inspect(const InspectOptions *config) {\n  TRACE_CALL()\n  Result<HostString> res;\n  uint32_t inspect_opts_mask{0};\n  fastly::fastly_host_http_inspect_options opts;\n\n  if (config->corp != nullptr) {\n    inspect_opts_mask |= FASTLY_HOST_HTTP_REQ_INSPECT_CONFIG_OPTIONS_MASK_CORP;\n    opts.corp = config->corp;\n    opts.corp_len = config->corp_len;\n  }\n\n  if (config->workspace != nullptr) {\n    inspect_opts_mask |= FASTLY_HOST_HTTP_REQ_INSPECT_CONFIG_OPTIONS_MASK_WORKSPACE;\n    opts.workspace = config->workspace;\n    opts.workspace_len = config->workspace_len;\n  }\n\n  if (config->override_client_ip_ptr != nullptr) {\n    inspect_opts_mask |= FASTLY_HOST_HTTP_REQ_INSPECT_CONFIG_OPTIONS_MASK_OVERRIDE_CLIENT_IP;\n    opts.override_client_ip_ptr = config->override_client_ip_ptr;\n    opts.override_client_ip_len = config->override_client_ip_len;\n  }\n\n  fastly::fastly_host_error err;\n  fastly::fastly_world_string ret;\n  ret.ptr = static_cast<uint8_t *>(cabi_malloc(HOSTCALL_BUFFER_LEN, 4));\n  if (!convert_result(fastly::req_inspect(this->req.handle, this->body.handle, inspect_opts_mask,\n                                          &opts, ret.ptr, HOSTCALL_BUFFER_LEN, &ret.len),\n                      &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(make_host_string(ret));\n  }\n  return res;\n}\n\nResult<HttpCacheEntry> HttpCacheEntry::transaction_lookup(const HttpReq &req,\n                                                          std::span<uint8_t> override_key) {\n  TRACE_CALL_ARGS(TSV(std::to_string(req.handle)))\n  uint32_t handle_out;\n  fastly::fastly_http_cache_lookup_options opts{};\n  uint32_t opts_mask = 0;\n\n  if (!override_key.empty()) {\n    MOZ_ASSERT(override_key.size() == 32);\n    opts.override_key = reinterpret_cast<const char *>(override_key.data());\n    opts.override_key_len = override_key.size();\n    opts_mask |= FASTLY_HTTP_CACHE_LOOKUP_OPTIONS_MASK_OVERRIDE_KEY;\n  }\n\n  auto res = fastly::http_cache_transaction_lookup(\n      req.handle, opts_mask, override_key.empty() ? nullptr : &opts, &handle_out);\n  if (res != 0) {\n    return Result<HttpCacheEntry>::err(host_api::APIError(res));\n  }\n\n  return Result<HttpCacheEntry>::ok(HttpCacheEntry(handle_out));\n}\n\nResult<HttpBody> HttpCacheEntry::transaction_insert(const HttpResp &resp,\n                                                    const HttpCacheWriteOptions *opts) {\n  TRACE_CALL()\n  uint32_t body_handle_out;\n  auto owned_opts = to_fastly_cache_write_options(opts);\n  auto res = fastly::http_cache_transaction_insert(this->handle, resp.handle, owned_opts.mask,\n                                                   owned_opts.options.get(), &body_handle_out);\n\n  if (res != 0) {\n    return Result<HttpBody>::err(host_api::APIError(res));\n  }\n\n  return Result<HttpBody>::ok(HttpBody(body_handle_out));\n}\n\nResult<std::tuple<HttpBody, HttpCacheEntry>>\nHttpCacheEntry::transaction_insert_and_stream_back(const HttpResp &resp,\n                                                   const HttpCacheWriteOptions *opts) {\n  TRACE_CALL_ARGS(TSV(std::to_string(this->handle)), TSV(std::to_string(resp.handle)))\n  uint32_t body_handle_out;\n  uint32_t cache_handle_out;\n  auto owned_opts = to_fastly_cache_write_options(opts);\n  auto res = fastly::http_cache_transaction_insert_and_stream_back(\n      this->handle, resp.handle, owned_opts.mask, owned_opts.options.get(), &body_handle_out,\n      &cache_handle_out);\n  if (res != 0) {\n    return Result<std::tuple<HttpBody, HttpCacheEntry>>::err(host_api::APIError(res));\n  }\n\n  TRACE_CALL_RET(TSV(std::to_string(body_handle_out)), TSV(std::to_string(cache_handle_out)))\n  return Result<std::tuple<HttpBody, HttpCacheEntry>>::ok(\n      std::make_tuple(HttpBody(body_handle_out), HttpCacheEntry(cache_handle_out)));\n}\n\nResult<Void> HttpCacheEntry::transaction_update(const HttpResp &resp,\n                                                const HttpCacheWriteOptions *opts) {\n  TRACE_CALL()\n  auto owned_opts = to_fastly_cache_write_options(opts);\n  auto res = fastly::http_cache_transaction_update(this->handle, resp.handle, owned_opts.mask,\n                                                   owned_opts.options.get());\n\n  if (res != 0) {\n    return Result<Void>::err(host_api::APIError(res));\n  }\n\n  return Result<Void>::ok(Void{});\n}\n\nResult<HttpCacheEntry>\nHttpCacheEntry::transaction_update_and_return_fresh(const HttpResp &resp,\n                                                    const HttpCacheWriteOptions *opts) {\n  TRACE_CALL()\n  uint32_t fresh_handle_out;\n  auto owned_opts = to_fastly_cache_write_options(opts);\n  auto res = fastly::http_cache_transaction_update_and_return_fresh(\n      this->handle, resp.handle, owned_opts.mask, owned_opts.options.get(), &fresh_handle_out);\n\n  if (res != 0) {\n    return Result<HttpCacheEntry>::err(host_api::APIError(res));\n  }\n\n  return Result<HttpCacheEntry>::ok(HttpCacheEntry(fresh_handle_out));\n}\n\nResult<Void>\nHttpCacheEntry::transaction_record_not_cacheable(uint64_t max_age_ns,\n                                                 std::optional<std::string_view> vary_rule) {\n  TRACE_CALL()\n  HttpCacheWriteOptions write_options{.max_age_ns = max_age_ns};\n  if (auto &vary_rule_val = vary_rule) {\n    write_options.vary_rule = *vary_rule;\n  }\n  auto owned_opts = to_fastly_cache_write_options(&write_options);\n  auto res = fastly::http_cache_transaction_record_not_cacheable(this->handle, owned_opts.mask,\n                                                                 owned_opts.options.get());\n\n  if (res != 0) {\n    return Result<Void>::err(host_api::APIError(res));\n  }\n\n  return Result<Void>::ok(Void{});\n}\n\nResult<Void> HttpCacheEntry::transaction_abandon() {\n  TRACE_CALL()\n  auto res = fastly::http_cache_transaction_abandon(this->handle);\n\n  if (res != 0) {\n    return Result<Void>::err(host_api::APIError(res));\n  }\n\n  return Result<Void>::ok(Void{});\n}\n\nResult<Void> HttpCacheEntry::close() {\n  TRACE_CALL()\n  auto res = fastly::http_cache_close(this->handle);\n\n  if (res != 0) {\n    return Result<Void>::err(host_api::APIError(res));\n  }\n\n  handle = invalid;\n  return Result<Void>::ok(Void{});\n}\n\nResult<HttpReq> HttpCacheEntry::get_suggested_backend_request() const {\n  TRACE_CALL_ARGS(TSV(std::to_string(this->handle)))\n  uint32_t req_handle_out;\n  auto res = fastly::http_cache_get_suggested_backend_request(this->handle, &req_handle_out);\n\n  if (res != 0) {\n    return Result<HttpReq>::err(host_api::APIError(res));\n  }\n\n  return Result<HttpReq>::ok(HttpReq(req_handle_out));\n}\n\nResult<HttpCacheWriteOptions *>\nHttpCacheEntry::get_suggested_cache_options(const HttpResp &resp) const {\n  TRACE_CALL_ARGS(TSV(std::to_string(this->handle)), TSV(std::to_string(resp.handle)))\n  const uint32_t options_mask = FASTLY_HTTP_CACHE_WRITE_OPTIONS_MASK_VARY_RULE |\n                                FASTLY_HTTP_CACHE_WRITE_OPTIONS_MASK_INITIAL_AGE_NS |\n                                FASTLY_HTTP_CACHE_WRITE_OPTIONS_MASK_STALE_WHILE_REVALIDATE_NS |\n                                FASTLY_HTTP_CACHE_WRITE_OPTIONS_MASK_SURROGATE_KEYS |\n                                FASTLY_HTTP_CACHE_WRITE_OPTIONS_MASK_LENGTH |\n                                FASTLY_HTTP_CACHE_WRITE_OPTIONS_MASK_SENSITIVE_DATA;\n\n  // Allocate initial buffers\n  uint8_t *vary_buffer = static_cast<uint8_t *>(cabi_malloc(HOSTCALL_BUFFER_LEN, 4));\n  uint8_t *surrogate_buffer = static_cast<uint8_t *>(cabi_malloc(HOSTCALL_BUFFER_LEN, 4));\n  if (!vary_buffer || !surrogate_buffer) {\n    cabi_free(vary_buffer);\n    cabi_free(surrogate_buffer);\n    return Result<HttpCacheWriteOptions *>::err(\n        host_api::APIError(FASTLY_HOST_ERROR_GENERIC_ERROR));\n  }\n\n  fastly::fastly_http_cache_write_options options_in{};\n  options_in.vary_rule = reinterpret_cast<char *>(vary_buffer);\n  options_in.vary_rule_len = HOSTCALL_BUFFER_LEN;\n  options_in.surrogate_keys = reinterpret_cast<char *>(surrogate_buffer);\n  options_in.surrogate_keys_len = HOSTCALL_BUFFER_LEN;\n\n  fastly::fastly_http_cache_write_options options_out{};\n  uint32_t options_mask_out;\n\n  auto res = fastly::http_cache_get_suggested_cache_options(\n      this->handle, resp.handle, options_mask, &options_in, &options_mask_out, &options_out);\n  if (res != 0) {\n    cabi_free(vary_buffer);\n    cabi_free(surrogate_buffer);\n    return Result<HttpCacheWriteOptions *>::err(host_api::APIError(res));\n  }\n\n  auto result = from_fastly_cache_write_options(options_out, options_mask_out);\n\n  cabi_free(vary_buffer);\n  cabi_free(surrogate_buffer);\n\n  return Result<HttpCacheWriteOptions *>::ok(result);\n}\n\nResult<std::tuple<HttpStorageAction, HttpResp>>\nHttpCacheEntry::prepare_response_for_storage(HttpResp resp) const {\n  TRACE_CALL_ARGS(TSV(std::to_string(this->handle)), TSV(std::to_string(resp.handle)))\n  alignas(4) HttpStorageAction storage_action_out;\n  uint32_t updated_resp_handle_out;\n\n  auto res = fastly::http_cache_prepare_response_for_storage(\n      this->handle, resp.handle, reinterpret_cast<uint8_t *>(&storage_action_out),\n      &updated_resp_handle_out);\n\n  if (res != 0) {\n    return Result<std::tuple<HttpStorageAction, HttpResp>>::err(host_api::APIError(res));\n  }\n\n  return Result<std::tuple<HttpStorageAction, HttpResp>>::ok(\n      std::make_tuple(storage_action_out, HttpResp(updated_resp_handle_out)));\n}\n\nResult<std::optional<Response>>\nHttpCacheEntry::get_found_response(bool transform_for_client) const {\n  TRACE_CALL_ARGS(TSV(std::to_string(this->handle)))\n  uint32_t resp_handle_out;\n  uint32_t body_handle_out;\n\n  auto res = fastly::http_cache_get_found_response(this->handle, transform_for_client ? 1 : 0,\n                                                   &resp_handle_out, &body_handle_out);\n\n  if (res != 0) {\n    if (host_api::error_is_optional_none(host_api::APIError(res))) {\n      return Result<std::optional<Response>>::ok(std::nullopt);\n    }\n    return Result<std::optional<Response>>::err(host_api::APIError(res));\n  }\n\n  TRACE_CALL_RET(TSV(std::to_string(resp_handle_out)), TSV(std::to_string(body_handle_out)))\n  return Result<std::optional<Response>>::ok(\n      Response(HttpResp(resp_handle_out), HttpBody(body_handle_out)));\n}\n\nResult<CacheState> HttpCacheEntry::get_state() const {\n  TRACE_CALL_ARGS(TSV(std::to_string(this->handle)))\n  Result<CacheState> res;\n\n  fastly::fastly_host_error err;\n  alignas(4) uint8_t state;\n  if (!convert_result(fastly::http_cache_get_state(this->handle, &state), &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(CacheState{state});\n  }\n\n  return res;\n}\n\nResult<std::optional<uint64_t>> HttpCacheEntry::get_length() const {\n  TRACE_CALL()\n  uint64_t length_out;\n  auto res = fastly::http_cache_get_length(this->handle, &length_out);\n\n  if (res != 0) {\n    if (host_api::error_is_optional_none(host_api::APIError(res))) {\n      return Result<std::optional<uint64_t>>::ok(std::nullopt);\n    }\n    return Result<std::optional<uint64_t>>::err(host_api::APIError(res));\n  }\n\n  return Result<std::optional<uint64_t>>::ok(length_out);\n}\n\nResult<uint64_t> HttpCacheEntry::get_max_age_ns() const {\n  TRACE_CALL()\n  uint64_t max_age_out;\n  auto res = fastly::http_cache_get_max_age_ns(this->handle, &max_age_out);\n\n  if (res != 0) {\n    return Result<uint64_t>::err(host_api::APIError(res));\n  }\n\n  return Result<uint64_t>::ok(max_age_out);\n}\n\nResult<uint64_t> HttpCacheEntry::get_stale_while_revalidate_ns() const {\n  TRACE_CALL()\n  uint64_t swr_out;\n  auto res = fastly::http_cache_get_stale_while_revalidate_ns(this->handle, &swr_out);\n\n  if (res != 0) {\n    return Result<uint64_t>::err(host_api::APIError(res));\n  }\n\n  return Result<uint64_t>::ok(swr_out);\n}\n\nResult<uint64_t> HttpCacheEntry::get_age_ns() const {\n  TRACE_CALL()\n  uint64_t age_out;\n  auto res = fastly::http_cache_get_age_ns(this->handle, &age_out);\n\n  if (res != 0) {\n    return Result<uint64_t>::err(host_api::APIError(res));\n  }\n\n  return Result<uint64_t>::ok(age_out);\n}\n\nResult<uint64_t> HttpCacheEntry::get_hits() const {\n  TRACE_CALL()\n  uint64_t hits_out;\n  auto res = fastly::http_cache_get_hits(this->handle, &hits_out);\n\n  if (res != 0) {\n    return Result<uint64_t>::err(host_api::APIError(res));\n  }\n\n  return Result<uint64_t>::ok(hits_out);\n}\n\nResult<bool> HttpCacheEntry::get_sensitive_data() const {\n  TRACE_CALL()\n  uint32_t is_sensitive_out;\n  auto res = fastly::http_cache_get_sensitive_data(this->handle, &is_sensitive_out);\n\n  if (res != 0) {\n    return Result<bool>::err(host_api::APIError(res));\n  }\n\n  return Result<bool>::ok(is_sensitive_out != 0);\n}\n\nResult<std::vector<HostString>> HttpCacheEntry::get_surrogate_keys() const {\n  TRACE_CALL()\n  // Allocate initial buffer\n  size_t nwritten;\n  uint8_t *buffer = static_cast<uint8_t *>(cabi_malloc(HOSTCALL_BUFFER_LEN, 4));\n  if (!buffer) {\n    return Result<std::vector<HostString>>::err(\n        host_api::APIError(FASTLY_HOST_ERROR_GENERIC_ERROR));\n  }\n\n  auto res = fastly::http_cache_get_surrogate_keys(this->handle, reinterpret_cast<char *>(buffer),\n                                                   HOSTCALL_BUFFER_LEN, &nwritten);\n\n  if (res != 0) {\n    if (host_api::error_is_optional_none(host_api::APIError(res))) {\n      cabi_free(buffer);\n      return Result<std::vector<HostString>>::ok(std::vector<HostString>{});\n    }\n    if (host_api::error_is_buffer_len(host_api::APIError(res))) {\n      // Resize buffer and try again\n      uint8_t *new_buffer =\n          static_cast<uint8_t *>(cabi_realloc(buffer, HOSTCALL_BUFFER_LEN, 1, nwritten));\n      if (!new_buffer) {\n        cabi_free(buffer);\n        return Result<std::vector<HostString>>::err(\n            host_api::APIError(FASTLY_HOST_ERROR_GENERIC_ERROR));\n      }\n      buffer = new_buffer;\n\n      res = fastly::http_cache_get_surrogate_keys(this->handle, reinterpret_cast<char *>(buffer),\n                                                  nwritten, &nwritten);\n      if (res != 0) {\n        cabi_free(buffer);\n        return Result<std::vector<HostString>>::err(host_api::APIError(res));\n      }\n    } else {\n      cabi_free(buffer);\n      return Result<std::vector<HostString>>::err(host_api::APIError(res));\n    }\n  }\n\n  // Split the buffer into individual keys\n  std::vector<HostString> keys;\n  const char *start = reinterpret_cast<char *>(buffer);\n  const char *end = start + nwritten;\n  const char *key_start = start;\n\n  for (const char *p = start; p < end; ++p) {\n    if (*p == ' ') {\n      if (p > key_start) { // Skip empty strings from consecutive spaces\n        fastly::fastly_world_string key = {\n            .ptr = static_cast<uint8_t *>(cabi_malloc(p - key_start, 4)),\n            .len = static_cast<size_t>(p - key_start)};\n        if (!key.ptr) {\n          cabi_free(buffer);\n          return Result<std::vector<HostString>>::err(\n              host_api::APIError(FASTLY_HOST_ERROR_GENERIC_ERROR));\n        }\n        std::memcpy(key.ptr, key_start, key.len);\n        keys.push_back(make_host_string(key));\n      }\n      key_start = p + 1;\n    }\n  }\n\n  // Handle the last key if there is one\n  if (key_start < end) {\n    fastly::fastly_world_string key = {.ptr =\n                                           static_cast<uint8_t *>(cabi_malloc(end - key_start, 4)),\n                                       .len = static_cast<size_t>(end - key_start)};\n    if (!key.ptr) {\n      cabi_free(buffer);\n      return Result<std::vector<HostString>>::err(\n          host_api::APIError(FASTLY_HOST_ERROR_GENERIC_ERROR));\n    }\n    std::memcpy(key.ptr, key_start, key.len);\n    keys.push_back(make_host_string(key));\n  }\n\n  cabi_free(buffer);\n  return Result<std::vector<HostString>>::ok(std::move(keys));\n}\n\nResult<std::optional<HostString>> HttpCacheEntry::get_vary_rule() const {\n  TRACE_CALL()\n  // Allocate initial buffer\n  size_t nwritten;\n  uint8_t *buffer = static_cast<uint8_t *>(cabi_malloc(HEADER_MAX_LEN, 4));\n  if (!buffer) {\n    return Result<std::optional<HostString>>::err(\n        host_api::APIError(FASTLY_HOST_ERROR_GENERIC_ERROR));\n  }\n\n  auto res = fastly::http_cache_get_vary_rule(this->handle, reinterpret_cast<char *>(buffer),\n                                              HEADER_MAX_LEN, &nwritten);\n\n  if (res != 0) {\n    if (host_api::error_is_optional_none(host_api::APIError(res))) {\n      cabi_free(buffer);\n      return Result<std::optional<HostString>>::ok(std::nullopt);\n    }\n    if (host_api::error_is_buffer_len(host_api::APIError(res))) {\n      // Resize buffer and try again\n      uint8_t *new_buffer =\n          static_cast<uint8_t *>(cabi_realloc(buffer, HEADER_MAX_LEN, 1, nwritten));\n      if (!new_buffer) {\n        cabi_free(buffer);\n        return Result<std::optional<HostString>>::err(\n            host_api::APIError(FASTLY_HOST_ERROR_GENERIC_ERROR));\n      }\n      buffer = new_buffer;\n\n      res = fastly::http_cache_get_vary_rule(this->handle, reinterpret_cast<char *>(buffer),\n                                             nwritten, &nwritten);\n      if (res != 0) {\n        cabi_free(buffer);\n        return Result<std::optional<HostString>>::err(host_api::APIError(res));\n      }\n    } else {\n      cabi_free(buffer);\n      return Result<std::optional<HostString>>::err(host_api::APIError(res));\n    }\n  }\n\n  fastly::fastly_world_string str = {.ptr = buffer, .len = nwritten};\n\n  return Result<std::optional<HostString>>::ok(make_host_string(str));\n}\n\nResult<LogEndpoint> LogEndpoint::get(std::string_view name) {\n  TRACE_CALL()\n  Result<LogEndpoint> res;\n\n  auto name_str = string_view_to_world_string(name);\n  LogEndpoint::Handle handle;\n  fastly::fastly_host_error err;\n  if (!convert_result(\n          fastly::log_endpoint_get(reinterpret_cast<char *>(name_str.ptr), name_str.len, &handle),\n          &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(LogEndpoint{handle});\n  }\n\n  return res;\n}\n\nResult<Void> LogEndpoint::write(std::string_view msg) {\n  TRACE_CALL()\n  Result<Void> res;\n\n  auto msg_str = string_view_to_world_string(msg);\n  fastly::fastly_host_error err;\n  size_t nwritten = 0;\n  if (!convert_result(fastly::log_write(this->handle, reinterpret_cast<char *>(msg_str.ptr),\n                                        msg_str.len, &nwritten),\n                      &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace();\n  }\n\n  return res;\n}\n\nResult<Dict> Dict::open(std::string_view name) {\n  TRACE_CALL()\n  Result<Dict> res;\n\n  auto name_str = string_view_to_world_string(name);\n  Dict::Handle ret;\n  fastly::fastly_host_error err;\n  if (!convert_result(\n          fastly::dictionary_open(reinterpret_cast<char *>(name_str.ptr), name_str.len, &ret),\n          &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(ret);\n  }\n\n  return res;\n}\n\nResult<std::optional<HostString>> Dict::get(std::string_view name) {\n  TRACE_CALL()\n  Result<std::optional<HostString>> res;\n\n  auto name_str = string_view_to_world_string(name);\n  fastly::fastly_world_string ret;\n  fastly::fastly_host_error err;\n\n  ret.ptr = static_cast<uint8_t *>(cabi_malloc(DICTIONARY_ENTRY_MAX_LEN, 1));\n  if (!convert_result(fastly::dictionary_get(this->handle, reinterpret_cast<char *>(name_str.ptr),\n                                             name_str.len, reinterpret_cast<char *>(ret.ptr),\n                                             DICTIONARY_ENTRY_MAX_LEN, &ret.len),\n                      &err)) {\n    if (error_is_optional_none(err)) {\n      res.emplace(std::nullopt);\n    } else {\n      cabi_free(ret.ptr);\n      res.emplace_err(err);\n    }\n  } else {\n    ret.ptr = static_cast<uint8_t *>(cabi_realloc(ret.ptr, DICTIONARY_ENTRY_MAX_LEN, 1, ret.len));\n    res.emplace(make_host_string(ret));\n  }\n\n  return res;\n}\n\nResult<ConfigStore> ConfigStore::open(std::string_view name) {\n  TRACE_CALL()\n  Result<ConfigStore> res;\n\n  auto name_str = string_view_to_world_string(name);\n  ConfigStore::Handle ret;\n  fastly::fastly_host_error err;\n  if (!convert_result(\n          fastly::config_store_open(reinterpret_cast<char *>(name_str.ptr), name_str.len, &ret),\n          &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(ret);\n  }\n\n  return res;\n}\n\nResult<std::optional<HostString>> ConfigStore::get(std::string_view name) {\n  return this->get(name, CONFIG_STORE_INITIAL_BUF_LEN);\n}\n\nResult<std::optional<HostString>> ConfigStore::get(std::string_view name,\n                                                   uint32_t initial_buf_len) {\n  TRACE_CALL()\n  Result<std::optional<HostString>> res;\n\n  uint32_t buf_len{initial_buf_len};\n  auto name_str = string_view_to_world_string(name);\n  fastly::fastly_world_string ret;\n  fastly::fastly_host_error err;\n\n  ret.ptr = static_cast<uint8_t *>(cabi_malloc(buf_len, 1));\n\n  bool succeeded{convert_result(\n      fastly::config_store_get(this->handle, reinterpret_cast<char *>(name_str.ptr), name_str.len,\n                               reinterpret_cast<char *>(ret.ptr), buf_len, &ret.len),\n      &err)};\n\n  if (!succeeded && err == FASTLY_HOST_ERROR_BUFFER_LEN) {\n    // NB(@zkat): ERROR_BUFFER_LEN sets the expected length of the buffer to\n    //            &ret.len, so we use that to inform our resize.\n    buf_len = ret.len;\n    ret.len = 0;\n    ret.ptr = static_cast<uint8_t *>(cabi_realloc(ret.ptr, initial_buf_len, 1, buf_len));\n    succeeded = convert_result(\n        fastly::config_store_get(this->handle, reinterpret_cast<char *>(name_str.ptr), name_str.len,\n                                 reinterpret_cast<char *>(ret.ptr), buf_len, &ret.len),\n        &err);\n  }\n\n  if (!succeeded) {\n    cabi_free(ret.ptr);\n    if (error_is_optional_none(err)) {\n      res.emplace(std::nullopt);\n    } else {\n      res.emplace_err(err);\n    }\n  } else {\n    ret.ptr = static_cast<uint8_t *>(cabi_realloc(ret.ptr, buf_len, 1, ret.len));\n    res.emplace(make_host_string(ret));\n  }\n\n  return res;\n}\n\nResult<ObjectStore> ObjectStore::open(std::string_view name) {\n  TRACE_CALL()\n  Result<ObjectStore> res;\n\n  auto name_str = string_view_to_world_string(name);\n  ObjectStore::Handle ret;\n  fastly::fastly_host_error err;\n  if (!convert_result(\n          fastly::object_store_open(reinterpret_cast<char *>(name_str.ptr), name_str.len, &ret),\n          &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(ret);\n  }\n\n  return res;\n}\n\nResult<std::optional<HttpBody>> ObjectStore::lookup(std::string_view name) {\n  TRACE_CALL()\n  Result<std::optional<HttpBody>> res;\n\n  auto name_str = string_view_to_world_string(name);\n  ObjectStore::Handle ret;\n  fastly::fastly_host_error err;\n  bool ok =\n      convert_result(fastly::object_store_get(this->handle, reinterpret_cast<char *>(name_str.ptr),\n                                              name_str.len, &ret),\n                     &err);\n  if ((!ok && error_is_optional_none(err)) || ret == INVALID_HANDLE) {\n    res.emplace(std::nullopt);\n  } else {\n    res.emplace(ret);\n  }\n\n  return res;\n}\n\nResult<ObjectStorePendingLookup::Handle> ObjectStore::lookup_async(std::string_view name) {\n  TRACE_CALL()\n  Result<ObjectStorePendingLookup::Handle> res;\n\n  auto name_str = string_view_to_world_string(name);\n  ObjectStorePendingLookup::Handle ret;\n  fastly::fastly_host_error err;\n  if (!convert_result(fastly::object_store_get_async(\n                          this->handle, reinterpret_cast<char *>(name_str.ptr), name_str.len, &ret),\n                      &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(ret);\n  }\n\n  return res;\n}\n\nResult<ObjectStorePendingDelete::Handle> ObjectStore::delete_async(std::string_view name) {\n  TRACE_CALL()\n  Result<ObjectStorePendingDelete::Handle> res;\n\n  auto name_str = string_view_to_world_string(name);\n  ObjectStorePendingDelete::Handle ret;\n  fastly::fastly_host_error err;\n  if (!convert_result(fastly::object_store_delete_async(\n                          this->handle, reinterpret_cast<char *>(name_str.ptr), name_str.len, &ret),\n                      &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(ret);\n  }\n\n  return res;\n}\n\nResult<Void> ObjectStore::insert(std::string_view name, HttpBody body) {\n  TRACE_CALL()\n  Result<Void> res;\n\n  auto name_str = string_view_to_world_string(name);\n  fastly::fastly_host_error err;\n  if (!convert_result(fastly::object_store_insert(this->handle,\n                                                  reinterpret_cast<char *>(name_str.ptr),\n                                                  name_str.len, body.handle),\n                      &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace();\n  }\n\n  return res;\n}\n\nFastlyResult<std::optional<HttpBody>, FastlyAPIError> ObjectStorePendingLookup::wait() {\n  TRACE_CALL()\n  FastlyResult<std::optional<HttpBody>, FastlyAPIError> res;\n\n  fastly::fastly_host_error err;\n  HttpBody::Handle ret = INVALID_HANDLE;\n  bool ok = convert_result(fastly::object_store_pending_lookup_wait(this->handle, &ret), &err);\n  if ((!ok && error_is_optional_none(err)) || ret == INVALID_HANDLE) {\n    res.emplace(std::nullopt);\n  } else {\n    res.emplace(ret);\n  }\n\n  return res;\n}\n\nFastlyAsyncTask::Handle ObjectStorePendingLookup::async_handle() const {\n  return FastlyAsyncTask::Handle{this->handle};\n}\n\nResult<Void> ObjectStorePendingDelete::wait() {\n  TRACE_CALL()\n  Result<Void> res;\n\n  fastly::fastly_host_error err;\n  if (!convert_result(fastly::object_store_pending_delete_wait(this->handle), &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(Void{});\n  }\n\n  return res;\n}\n\nFastlyAsyncTask::Handle ObjectStorePendingDelete::async_handle() const {\n  return FastlyAsyncTask::Handle{this->handle};\n}\n\nResult<std::optional<HostBytes>> Secret::plaintext() const {\n  return this->plaintext(CONFIG_STORE_INITIAL_BUF_LEN);\n}\n\nResult<std::optional<HostBytes>> Secret::plaintext(uint32_t initial_buf_len) const {\n  TRACE_CALL()\n  Result<std::optional<HostBytes>> res;\n\n  uint32_t buf_len{initial_buf_len};\n  fastly::fastly_world_list_u8 ret;\n  fastly::fastly_host_error err;\n  ret.ptr = static_cast<uint8_t *>(JS_malloc(CONTEXT, buf_len));\n  bool succeeded{\n      convert_result(fastly::secret_store_plaintext(this->handle, reinterpret_cast<char *>(ret.ptr),\n                                                    buf_len, &ret.len),\n                     &err)};\n\n  if (!succeeded && err == FASTLY_HOST_ERROR_BUFFER_LEN) {\n    // NB(@zkat): ERROR_BUFFER_LEN sets the expected length of the buffer to\n    //            &ret.len, so we use that to inform our resize.\n    buf_len = ret.len;\n    ret.len = 0;\n    ret.ptr = static_cast<uint8_t *>(JS_realloc(CONTEXT, ret.ptr, initial_buf_len, buf_len));\n    succeeded =\n        convert_result(fastly::secret_store_plaintext(\n                           this->handle, reinterpret_cast<char *>(ret.ptr), buf_len, &ret.len),\n                       &err);\n  }\n\n  if (!succeeded) {\n    if (error_is_optional_none(err)) {\n      res.emplace(std::nullopt);\n    } else {\n      JS_free(CONTEXT, ret.ptr);\n      res.emplace_err(err);\n    }\n  } else {\n    ret.ptr = static_cast<uint8_t *>(JS_realloc(CONTEXT, ret.ptr, buf_len, ret.len));\n    res.emplace(make_host_bytes(ret.ptr, ret.len));\n  }\n\n  return res;\n}\n\nResult<SecretStore> SecretStore::open(std::string_view name) {\n  TRACE_CALL()\n  Result<SecretStore> res;\n\n  auto name_str = string_view_to_world_string(name);\n  SecretStore::Handle ret;\n  fastly::fastly_host_error err;\n  if (!convert_result(\n          fastly::secret_store_open(reinterpret_cast<char *>(name_str.ptr), name_str.len, &ret),\n          &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(ret);\n  }\n\n  return res;\n}\n\nResult<std::optional<Secret>> SecretStore::get(std::string_view name) {\n  TRACE_CALL()\n  Result<std::optional<Secret>> res;\n\n  auto name_str = string_view_to_world_string(name);\n  Secret::Handle ret = INVALID_HANDLE;\n  fastly::fastly_host_error err;\n  bool ok =\n      convert_result(fastly::secret_store_get(this->handle, reinterpret_cast<char *>(name_str.ptr),\n                                              name_str.len, &ret),\n                     &err);\n  if ((!ok && error_is_optional_none(err)) || ret == INVALID_HANDLE) {\n    res.emplace(std::nullopt);\n  } else {\n    res.emplace(ret);\n  }\n\n  return res;\n}\n\nResult<Secret> SecretStore::from_bytes(const uint8_t *bytes, size_t len) {\n  TRACE_CALL()\n  Result<Secret> res;\n\n  fastly::fastly_world_list_u8 bytes_list{const_cast<uint8_t *>(bytes), len};\n  Secret::Handle ret = INVALID_HANDLE;\n  fastly::fastly_host_error err;\n  bool ok = convert_result(fastly::secret_store_from_bytes(reinterpret_cast<char *>(bytes_list.ptr),\n                                                           bytes_list.len, &ret),\n                           &err);\n  if (!ok || ret == INVALID_HANDLE) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(ret);\n  }\n\n  return res;\n}\n\nbool CacheState::is_found() const { return this->state & FASTLY_HOST_CACHE_LOOKUP_STATE_FOUND; }\n\nbool CacheState::is_usable() const { return this->state & FASTLY_HOST_CACHE_LOOKUP_STATE_USABLE; }\n\nbool CacheState::is_stale() const { return this->state & FASTLY_HOST_CACHE_LOOKUP_STATE_STALE; }\n\nbool CacheState::must_insert_or_update() const {\n  return this->state & FASTLY_HOST_CACHE_LOOKUP_STATE_MUST_INSERT_OR_UPDATE;\n}\n\nResult<CacheHandle> CacheHandle::lookup(std::string_view key, const CacheLookupOptions &opts) {\n  TRACE_CALL()\n  Result<CacheHandle> res;\n\n  auto key_str = string_view_to_world_string(key);\n\n  fastly::fastly_host_error err;\n  CacheHandle::Handle handle;\n  fastly::fastly_host_cache_lookup_options os;\n  memset(&os, 0, sizeof(os));\n\n  alignas(4) uint8_t options_mask = 0;\n  if (opts.request_headers.is_valid()) {\n    os.request_headers = opts.request_headers.handle;\n    options_mask |= FASTLY_CACHE_LOOKUP_OPTIONS_MASK_REQUEST_HEADERS;\n  }\n\n  if (!convert_result(fastly::cache_lookup(reinterpret_cast<char *>(key_str.ptr), key_str.len,\n                                           options_mask, &os, &handle),\n                      &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(handle);\n  }\n\n  return res;\n}\n\nResult<CacheHandle> CacheHandle::transaction_lookup(std::string_view key,\n                                                    const CacheLookupOptions &opts) {\n  TRACE_CALL()\n  Result<CacheHandle> res;\n\n  auto key_str = string_view_to_world_string(key);\n\n  fastly::fastly_host_error err;\n  CacheHandle::Handle handle;\n  fastly::fastly_host_cache_lookup_options os;\n  memset(&os, 0, sizeof(os));\n\n  uint32_t options_mask = 0;\n  if (opts.request_headers.is_valid()) {\n    os.request_headers = opts.request_headers.handle;\n    options_mask |= FASTLY_CACHE_LOOKUP_OPTIONS_MASK_REQUEST_HEADERS;\n  }\n\n  if (!convert_result(fastly::cache_transaction_lookup(reinterpret_cast<char *>(key_str.ptr),\n                                                       key_str.len, options_mask, &os, &handle),\n                      &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(handle);\n  }\n\n  return res;\n}\n\nnamespace {\n\nvoid init_write_options(fastly::fastly_host_cache_write_options &options,\n                        const CacheWriteOptions &opts) {\n  memset(&options, 0, sizeof(options));\n\n  options.max_age_ns = opts.max_age_ns;\n  options.request_headers = opts.request_headers.handle;\n\n  if (opts.vary_rule.empty()) {\n    options.vary_rule.ptr = 0;\n    options.vary_rule.len = 0;\n  } else {\n    options.vary_rule = string_view_to_world_string(opts.vary_rule);\n  }\n\n  options.initial_age_ns = opts.initial_age_ns;\n  options.stale_while_revalidate_ns = opts.stale_while_revalidate_ns;\n\n  if (opts.surrogate_keys.empty()) {\n    options.surrogate_keys.ptr = 0;\n    options.surrogate_keys.len = 0;\n  } else {\n    options.surrogate_keys = string_view_to_world_string(opts.surrogate_keys);\n  }\n\n  options.length = opts.length;\n\n  if (!opts.metadata.len || !opts.metadata.ptr) {\n    options.user_metadata.ptr = 0;\n    options.user_metadata.len = 0;\n  } else {\n    options.user_metadata = span_to_list_u8(opts.metadata);\n  }\n\n  options.sensitive_data = opts.sensitive;\n}\n\n} // namespace\n\n#define FASTLY_CACHE_WRITE_OPTIONS_MASK_RESERVED (1 << 0)\n#define FASTLY_CACHE_WRITE_OPTIONS_MASK_REQUEST_HEADERS (1 << 1)\n#define FASTLY_CACHE_WRITE_OPTIONS_MASK_VARY_RULE (1 << 2)\n#define FASTLY_CACHE_WRITE_OPTIONS_MASK_INITIAL_AGE_NS (1 << 3)\n#define FASTLY_CACHE_WRITE_OPTIONS_MASK_STALE_WHILE_REVALIDATE_NS (1 << 4)\n#define FASTLY_CACHE_WRITE_OPTIONS_MASK_SURROGATE_KEYS (1 << 5)\n#define FASTLY_CACHE_WRITE_OPTIONS_MASK_LENGTH (1 << 6)\n#define FASTLY_CACHE_WRITE_OPTIONS_MASK_USER_METADATA (1 << 7)\n#define FASTLY_CACHE_WRITE_OPTIONS_MASK_SENSITIVE_DATA (1 << 8)\n\nResult<HttpBody> CacheHandle::insert(std::string_view key, const CacheWriteOptions &os) {\n  TRACE_CALL()\n  Result<HttpBody> res;\n\n  fastly::fastly_host_cache_write_options options;\n  init_write_options(options, os);\n\n  fastly::fastly_host_error err;\n  HttpBody::Handle ret;\n  auto host_key = string_view_to_world_string(key);\n\n  uint16_t options_mask = 0;\n  fastly::CacheWriteOptions opts;\n  std::memset(&opts, 0, sizeof(opts));\n  opts.max_age_ns = options.max_age_ns;\n\n  if (options.request_headers != INVALID_HANDLE && options.request_headers != 0) {\n    options_mask |= FASTLY_CACHE_WRITE_OPTIONS_MASK_REQUEST_HEADERS;\n    opts.request_headers = options.request_headers;\n  }\n  if (options.vary_rule.ptr != nullptr) {\n    options_mask |= FASTLY_CACHE_WRITE_OPTIONS_MASK_VARY_RULE;\n    opts.vary_rule_len = options.vary_rule.len;\n    opts.vary_rule_ptr = reinterpret_cast<uint8_t *>(options.vary_rule.ptr);\n  }\n  if (options.initial_age_ns != 0) {\n    options_mask |= FASTLY_CACHE_WRITE_OPTIONS_MASK_INITIAL_AGE_NS;\n    opts.initial_age_ns = options.initial_age_ns;\n  }\n  if (options.stale_while_revalidate_ns != 0) {\n    options_mask |= FASTLY_CACHE_WRITE_OPTIONS_MASK_STALE_WHILE_REVALIDATE_NS;\n    opts.stale_while_revalidate_ns = options.stale_while_revalidate_ns;\n  }\n  if (options.surrogate_keys.ptr != nullptr) {\n    options_mask |= FASTLY_CACHE_WRITE_OPTIONS_MASK_SURROGATE_KEYS;\n    opts.surrogate_keys_len = options.surrogate_keys.len;\n    opts.surrogate_keys_ptr = reinterpret_cast<uint8_t *>(options.surrogate_keys.ptr);\n  }\n  if (options.length != 0) {\n    options_mask |= FASTLY_CACHE_WRITE_OPTIONS_MASK_LENGTH;\n    opts.length = options.length;\n  }\n  if (options.user_metadata.ptr != nullptr) {\n    options_mask |= FASTLY_CACHE_WRITE_OPTIONS_MASK_USER_METADATA;\n    opts.user_metadata_len = options.user_metadata.len;\n    opts.user_metadata_ptr = options.user_metadata.ptr;\n  }\n  if (options.sensitive_data) {\n    options_mask |= FASTLY_CACHE_WRITE_OPTIONS_MASK_SENSITIVE_DATA;\n  }\n\n  if (!convert_result(fastly::cache_insert(reinterpret_cast<char *>(host_key.ptr), host_key.len,\n                                           options_mask, &opts, &ret),\n                      &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(HttpBody{ret});\n  }\n\n  return res;\n}\n\nResult<HttpBody> CacheHandle::transaction_insert(const CacheWriteOptions &os) {\n  TRACE_CALL()\n  Result<HttpBody> res;\n\n  fastly::fastly_host_cache_write_options options;\n  init_write_options(options, os);\n\n  fastly::fastly_host_error err;\n  HttpBody::Handle ret;\n\n  uint16_t options_mask = 0;\n  fastly::CacheWriteOptions opts;\n  std::memset(&opts, 0, sizeof(opts));\n  opts.max_age_ns = options.max_age_ns;\n\n  if (options.request_headers != INVALID_HANDLE && options.request_headers != 0) {\n    options_mask |= FASTLY_CACHE_WRITE_OPTIONS_MASK_REQUEST_HEADERS;\n    opts.request_headers = options.request_headers;\n  }\n  if (options.vary_rule.len > 0) {\n    options_mask |= FASTLY_CACHE_WRITE_OPTIONS_MASK_VARY_RULE;\n    opts.vary_rule_len = options.vary_rule.len;\n    opts.vary_rule_ptr = reinterpret_cast<uint8_t *>(options.vary_rule.ptr);\n  }\n  if (options.initial_age_ns != 0) {\n    options_mask |= FASTLY_CACHE_WRITE_OPTIONS_MASK_INITIAL_AGE_NS;\n    opts.initial_age_ns = options.initial_age_ns;\n  }\n  if (options.stale_while_revalidate_ns != 0) {\n    options_mask |= FASTLY_CACHE_WRITE_OPTIONS_MASK_STALE_WHILE_REVALIDATE_NS;\n    opts.stale_while_revalidate_ns = options.stale_while_revalidate_ns;\n  }\n  if (options.surrogate_keys.ptr != nullptr) {\n    options_mask |= FASTLY_CACHE_WRITE_OPTIONS_MASK_SURROGATE_KEYS;\n    opts.surrogate_keys_len = options.surrogate_keys.len;\n    opts.surrogate_keys_ptr = reinterpret_cast<uint8_t *>(options.surrogate_keys.ptr);\n  }\n  if (options.length != 0) {\n    options_mask |= FASTLY_CACHE_WRITE_OPTIONS_MASK_LENGTH;\n    opts.length = options.length;\n  }\n  if (options.user_metadata.ptr != nullptr) {\n    options_mask |= FASTLY_CACHE_WRITE_OPTIONS_MASK_USER_METADATA;\n    opts.user_metadata_len = options.user_metadata.len;\n    opts.user_metadata_ptr = options.user_metadata.ptr;\n  }\n  if (options.sensitive_data) {\n    options_mask |= FASTLY_CACHE_WRITE_OPTIONS_MASK_SENSITIVE_DATA;\n  }\n\n  if (!convert_result(fastly::cache_transaction_insert(this->handle, options_mask, &opts, &ret),\n                      &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(HttpBody{ret});\n  }\n\n  return res;\n}\n\nResult<Void> CacheHandle::transaction_update(const CacheWriteOptions &os) {\n  TRACE_CALL()\n  Result<Void> res;\n\n  fastly::fastly_host_cache_write_options options;\n  init_write_options(options, os);\n\n  fastly::fastly_host_error err;\n\n  uint16_t options_mask = 0;\n  fastly::CacheWriteOptions opts;\n  std::memset(&opts, 0, sizeof(opts));\n  opts.max_age_ns = options.max_age_ns;\n\n  if (options.request_headers != INVALID_HANDLE && options.request_headers != 0) {\n    options_mask |= FASTLY_CACHE_WRITE_OPTIONS_MASK_REQUEST_HEADERS;\n    opts.request_headers = options.request_headers;\n  }\n  if (options.vary_rule.ptr != nullptr) {\n    options_mask |= FASTLY_CACHE_WRITE_OPTIONS_MASK_VARY_RULE;\n    opts.vary_rule_len = options.vary_rule.len;\n    opts.vary_rule_ptr = reinterpret_cast<uint8_t *>(options.vary_rule.ptr);\n  }\n  if (options.initial_age_ns != 0) {\n    options_mask |= FASTLY_CACHE_WRITE_OPTIONS_MASK_INITIAL_AGE_NS;\n    opts.initial_age_ns = options.initial_age_ns;\n  }\n  if (options.stale_while_revalidate_ns != 0) {\n    options_mask |= FASTLY_CACHE_WRITE_OPTIONS_MASK_STALE_WHILE_REVALIDATE_NS;\n    opts.stale_while_revalidate_ns = options.stale_while_revalidate_ns;\n  }\n  if (options.surrogate_keys.ptr != nullptr) {\n    options_mask |= FASTLY_CACHE_WRITE_OPTIONS_MASK_SURROGATE_KEYS;\n    opts.surrogate_keys_len = options.surrogate_keys.len;\n    opts.surrogate_keys_ptr = reinterpret_cast<uint8_t *>(options.surrogate_keys.ptr);\n  }\n  if (options.length != 0) {\n    options_mask |= FASTLY_CACHE_WRITE_OPTIONS_MASK_LENGTH;\n    opts.length = options.length;\n  }\n  if (options.user_metadata.ptr != nullptr) {\n    options_mask |= FASTLY_CACHE_WRITE_OPTIONS_MASK_USER_METADATA;\n    opts.user_metadata_len = options.user_metadata.len;\n    opts.user_metadata_ptr = options.user_metadata.ptr;\n  }\n  if (options.sensitive_data) {\n    options_mask |= FASTLY_CACHE_WRITE_OPTIONS_MASK_SENSITIVE_DATA;\n  }\n\n  if (!convert_result(fastly::cache_transaction_update(this->handle, options_mask, &opts), &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(Void{});\n  }\n\n  return res;\n}\n\nResult<std::tuple<HttpBody, CacheHandle>>\nCacheHandle::transaction_insert_and_stream_back(const CacheWriteOptions &os) {\n  TRACE_CALL_ARGS(TSV(std::to_string(this->handle)))\n  Result<std::tuple<HttpBody, CacheHandle>> res;\n\n  fastly::fastly_host_cache_write_options options;\n  init_write_options(options, os);\n\n  fastly::fastly_host_error err;\n  fastly::fastly_world_tuple2_handle_handle ret;\n\n  uint16_t options_mask = 0;\n  fastly::CacheWriteOptions opts;\n  std::memset(&opts, 0, sizeof(opts));\n  opts.max_age_ns = options.max_age_ns;\n\n  MOZ_ASSERT(options.request_headers == INVALID_HANDLE || options.request_headers == 0);\n\n  if (options.vary_rule.ptr != nullptr) {\n    options_mask |= FASTLY_CACHE_WRITE_OPTIONS_MASK_VARY_RULE;\n    opts.vary_rule_len = options.vary_rule.len;\n    opts.vary_rule_ptr = options.vary_rule.ptr;\n  }\n  if (options.initial_age_ns != 0) {\n    options_mask |= FASTLY_CACHE_WRITE_OPTIONS_MASK_INITIAL_AGE_NS;\n    opts.initial_age_ns = options.initial_age_ns;\n  }\n  if (options.stale_while_revalidate_ns != 0) {\n    options_mask |= FASTLY_CACHE_WRITE_OPTIONS_MASK_STALE_WHILE_REVALIDATE_NS;\n    opts.stale_while_revalidate_ns = options.stale_while_revalidate_ns;\n  }\n  if (options.surrogate_keys.ptr != nullptr) {\n    options_mask |= FASTLY_CACHE_WRITE_OPTIONS_MASK_SURROGATE_KEYS;\n    opts.surrogate_keys_len = options.surrogate_keys.len;\n    opts.surrogate_keys_ptr = options.surrogate_keys.ptr;\n  }\n  if (options.length != 0) {\n    options_mask |= FASTLY_CACHE_WRITE_OPTIONS_MASK_LENGTH;\n    opts.length = options.length;\n  }\n  if (options.user_metadata.ptr != nullptr) {\n    options_mask |= FASTLY_CACHE_WRITE_OPTIONS_MASK_USER_METADATA;\n    opts.user_metadata_len = options.user_metadata.len;\n    opts.user_metadata_ptr = options.user_metadata.ptr;\n  }\n  if (options.sensitive_data) {\n    options_mask |= FASTLY_CACHE_WRITE_OPTIONS_MASK_SENSITIVE_DATA;\n  }\n\n  if (!convert_result(fastly::cache_transaction_insert_and_stream_back(this->handle, options_mask,\n                                                                       &opts, &ret.f0, &ret.f1),\n                      &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(HttpBody{ret.f0}, CacheHandle{ret.f1});\n  }\n\n  return res;\n}\n\nResult<Void> CacheHandle::transaction_cancel() {\n  TRACE_CALL()\n  Result<Void> res;\n\n  fastly::fastly_host_error err;\n  if (!convert_result(fastly::cache_transaction_cancel(this->handle), &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace();\n  }\n\n  return res;\n}\n\nResult<HttpBody> CacheHandle::get_body(const CacheGetBodyOptions &opts) {\n  TRACE_CALL()\n  Result<HttpBody> res;\n\n  fastly::fastly_host_cache_get_body_options options{};\n  uint32_t options_mask = 0;\n  if (opts.start.has_value()) {\n    options_mask |= FASTLY_HOST_CACHE_GET_BODY_OPTIONS_MASK_START;\n    options.start = opts.start.value();\n  }\n  if (opts.end.has_value()) {\n    options_mask |= FASTLY_HOST_CACHE_GET_BODY_OPTIONS_MASK_END;\n    options.end = opts.end.value();\n  }\n\n  HttpBody::Handle body = INVALID_HANDLE;\n  fastly::fastly_host_error err;\n\n  bool ok =\n      convert_result(fastly::cache_get_body(this->handle, options_mask, &options, &body), &err);\n  if (!ok && !error_is_optional_none(err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(HttpBody{body});\n  }\n\n  return res;\n}\n\nResult<CacheState> CacheHandle::get_state() {\n  TRACE_CALL()\n  Result<CacheState> res;\n\n  fastly::fastly_host_error err;\n  alignas(4) uint8_t state;\n  if (!convert_result(fastly::cache_get_state(this->handle, &state), &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(CacheState{state});\n  }\n\n  return res;\n}\n\nResult<Void> CacheHandle::close() {\n  TRACE_CALL()\n\n  fastly::fastly_host_error err;\n  if (!convert_result(fastly::cache_close(this->handle), &err)) {\n    return Result<Void>::err(err);\n  }\n\n  return Result<Void>::ok();\n  ;\n}\n\nResult<HostBytes> CacheHandle::get_user_metadata() {\n  TRACE_CALL()\n  Result<HostBytes> res;\n\n  fastly::fastly_world_list_u8 ret;\n  fastly::fastly_host_error err;\n\n  size_t default_size = 16 * 1024;\n  ret.ptr = static_cast<uint8_t *>(cabi_malloc(default_size, 4));\n  auto status = fastly::cache_get_user_metadata(handle, reinterpret_cast<char *>(ret.ptr),\n                                                default_size, &ret.len);\n  if (status == FASTLY_HOST_ERROR_BUFFER_LEN) {\n    // NB(@zkat): ERROR_BUFFER_LEN sets the expected length of the buffer to\n    //            &ret.len, so we use that to inform our resize.\n    ret.ptr = static_cast<uint8_t *>(cabi_realloc(ret.ptr, default_size, 4, ret.len));\n    status = fastly::cache_get_user_metadata(handle, reinterpret_cast<char *>(ret.ptr), ret.len,\n                                             &ret.len);\n  }\n\n  if (!convert_result(status, &err)) {\n    cabi_free(ret.ptr);\n    res.emplace_err(err);\n  } else {\n    res.emplace(make_host_bytes(ret.ptr, ret.len));\n  }\n\n  return res;\n}\n\nResult<uint64_t> CacheHandle::get_length() {\n  TRACE_CALL()\n  Result<uint64_t> res;\n\n  uint64_t ret;\n  fastly::fastly_host_error err;\n  if (!convert_result(fastly::cache_get_length(this->handle, &ret), &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(ret);\n  }\n\n  return res;\n}\n\nResult<uint64_t> CacheHandle::get_max_age_ns() {\n  TRACE_CALL()\n  Result<uint64_t> res;\n\n  uint64_t ret;\n  fastly::fastly_host_error err;\n  if (!convert_result(fastly::cache_get_max_age_ns(this->handle, &ret), &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(ret);\n  }\n\n  return res;\n}\n\nResult<uint64_t> CacheHandle::get_stale_while_revalidate_ns() {\n  TRACE_CALL()\n  Result<uint64_t> res;\n\n  uint64_t ret;\n  fastly::fastly_host_error err;\n  if (!convert_result(fastly::cache_get_stale_while_revalidate_ns(this->handle, &ret), &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(ret);\n  }\n\n  return res;\n}\n\nResult<uint64_t> CacheHandle::get_age_ns() {\n  TRACE_CALL()\n  Result<uint64_t> res;\n\n  uint64_t ret;\n  fastly::fastly_host_error err;\n  if (!convert_result(fastly::cache_get_age_ns(this->handle, &ret), &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(ret);\n  }\n\n  return res;\n}\n\nResult<uint64_t> CacheHandle::get_hits() {\n  TRACE_CALL()\n  Result<uint64_t> res;\n\n  uint64_t ret;\n  fastly::fastly_host_error err;\n  if (!convert_result(fastly::cache_get_hits(this->handle, &ret), &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(ret);\n  }\n\n  return res;\n}\n\nconst std::optional<std::string> FastlyKVError::message() const {\n  switch (this->detail) {\n  /// The kv-error-detail struct has not been populated.\n  case uninitialized:\n    return \"Uninitialized.\";\n  /// Host error / no error\n  case ok:\n  case host_error:\n    return std::nullopt;\n  /// Bad request.\n  case bad_request:\n    return \"Bad request.\";\n  /// KV store entry not found.\n  case not_found:\n    return \"Not found.\";\n  /// Invalid state for operation.\n  case precondition_failed:\n    return \"Precondition failed.\";\n  /// Buffer size issues.\n  case payload_too_large:\n    return \"Payload too large.\";\n  /// Oh no.\n  case internal_error:\n    return \"Internal error.\";\n  /// Rate limiting\n  case too_many_requests:\n    return \"Too many requests.\";\n  /// Store handle not recognized\n  case invalid_store_handle:\n    return \"Invalid Store handle.\";\n  };\n}\n\nconst std::optional<std::string> FastlySendError::message() const {\n  switch (this->tag) {\n  /// The send-error-detail struct has not been populated.\n  /// We will our generic error message in this situation.\n  case uninitialized: {\n    return \"NetworkError when attempting to fetch resource.\";\n  }\n  /// There was no send error.\n  case ok: {\n    return std::nullopt;\n  }\n  /// The system encountered a timeout when trying to find an IP address for the backend\n  /// hostname.\n  case dns_timeout: {\n    return \"DNS timeout\";\n  }\n  /// The system encountered a DNS error when trying to find an IP address for the backend\n  /// hostname. The fields dns_error_rcode and dns_error_info_code may be set in the\n  /// send_error_detail.\n  case dns_error: {\n    // allocate maximum len of error message\n    char buf[34 + 10 + 1];\n    int written = snprintf(buf, sizeof(buf), \"DNS error (rcode=%d, info_code=%d)\",\n                           this->dns_error_rcode, this->dns_error_info_code);\n    MOZ_ASSERT(written > 34);\n    return std::string(buf, written);\n  }\n  /// The system cannot determine which backend to use, or the specified backend was invalid.\n  case destination_not_found: {\n    return \"Destination not found\";\n  }\n  /// The system considers the backend to be unavailable; e.g., recent attempts to communicate\n  /// with it may have failed, or a health check may indicate that it is down.\n  case destination_unavailable: {\n    return \"Destination unavailable\";\n  }\n  /// The system cannot find a route to the next_hop IP address.\n  case destination_ip_unroutable: {\n    return \"Destination IP unroutable\";\n  }\n  /// The system's connection to the backend was refused.\n  case connection_refused: {\n    return \"Connection refused\";\n  }\n  /// The system's connection to the backend was closed before a complete response was\n  /// received.\n  case connection_terminated: {\n    return \"Connection terminated\";\n  }\n  /// The system's attempt to open a connection to the backend timed out.\n  case connection_timeout: {\n    return \"Connection timeout\";\n  }\n  /// The system is configured to limit the number of connections it has to the backend, and\n  /// that limit has been exceeded.\n  case connection_limit_reached: {\n    return \"Connection limit reached\";\n  }\n  /// The system encountered an error when verifying the certificate presented by the backend.\n  case tls_certificate_error: {\n    return \"TLS certificate error\";\n  }\n  /// The system encountered an error with the backend TLS configuration.\n  case tls_configuration_error: {\n    return \"TLS configuration error\";\n  }\n  /// The system received an incomplete response to the request from the backend.\n  case http_incomplete_response: {\n    return \"Incomplete HTTP response\";\n  }\n  /// The system received a response to the request whose header section was considered too\n  /// large.\n  case http_response_header_section_too_large: {\n    return \"HTTP response header section too large\";\n  }\n  /// The system received a response to the request whose body was considered too large.\n  case http_response_body_too_large: {\n    return \"HTTP response body too large\";\n  }\n  /// The system reached a configured time limit waiting for the complete response.\n  case http_response_timeout: {\n    return \"HTTP response timeout\";\n  }\n  /// The system received a response to the request whose status code or reason phrase was\n  /// invalid.\n  case http_response_status_invalid: {\n    return \"HTTP response status invalid\";\n  }\n  /// The process of negotiating an upgrade of the HTTP version between the system and the\n  /// backend failed.\n  case http_upgrade_failed: {\n    return \"HTTP upgrade failed\";\n  }\n  /// The system encountered an HTTP protocol error when communicating with the backend. This\n  /// error will only be used when a more specific one is not defined.\n  case http_protocol_error: {\n    return \"HTTP protocol error\";\n  }\n  /// An invalid cache key was provided for the request.\n  case http_request_cache_key_invalid: {\n    return \"HTTP request cache key invalid\";\n  }\n  /// An invalid URI was provided for the request.\n  case http_request_uri_invalid: {\n    return \"HTTP request URI invalid\";\n  }\n  /// The system encountered an unexpected internal error.\n  case internal_error: {\n    return \"Internal error\";\n  }\n  /// The system received a TLS alert from the backend. The field tls_alert_id may be set in\n  /// the send_error_detail.\n  case tls_alert_received: {\n    // allocate maximum len of error message\n    char buf[34 + 1];\n    int written =\n        snprintf(buf, sizeof(buf), \"TLS alert received (alert_id=%d)\", this->tls_alert_id);\n    MOZ_ASSERT(written > 35);\n    return std::string(buf, written);\n  }\n  /// The system encountered a TLS error when communicating with the backend, either during\n  /// the handshake or afterwards.\n  case tls_protocol_error: {\n    return \"TLS protocol error\";\n  }\n  }\n  return \"NetworkError when attempting to fetch resource.\";\n}\n\nconst std::optional<std::string> FastlyImageOptimizerError::message() const {\n  if (is_host_error)\n    return std::nullopt;\n  switch (err) {\n  case ok:\n    return std::nullopt;\n  case uninitialized:\n    return \"Uninitialized: \" + msg;\n  case warning:\n    return \"Warning: \" + msg;\n  case error:\n    return \"Error: \" + msg;\n  }\n  return std::nullopt;\n}\n\nbool BackendHealth::is_unknown() const {\n  return this->state & FASTLY_HOST_BACKEND_BACKEND_HEALTH_UNKNOWN;\n}\n\nbool BackendHealth::is_healthy() const {\n  return this->state & FASTLY_HOST_BACKEND_BACKEND_HEALTH_HEALTHY;\n}\n\nbool BackendHealth::is_unhealthy() const {\n  return this->state & FASTLY_HOST_BACKEND_BACKEND_HEALTH_UNHEALTHY;\n}\n\nResult<bool> Backend::exists(std::string_view name) {\n  TRACE_CALL()\n  Result<bool> res;\n\n  auto name_str = string_view_to_world_string(name);\n  alignas(4) bool ret;\n  fastly::fastly_host_error err;\n  if (!convert_result(fastly::backend_exists(reinterpret_cast<char *>(name_str.ptr), name_str.len,\n                                             (uint32_t *)&ret),\n                      &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(ret);\n  }\n\n  return res;\n}\n\nResult<BackendHealth> Backend::health() const {\n  TRACE_CALL()\n  Result<BackendHealth> res;\n\n  auto name_str = string_view_to_world_string(this->name_);\n  fastly::fastly_host_error err;\n\n  uint32_t fastly_backend_health;\n  if (!convert_result(fastly::backend_is_healthy(reinterpret_cast<char *>(name_str.ptr),\n                                                 name_str.len, &fastly_backend_health),\n                      &err)) {\n    res.emplace_err(err);\n  } else {\n    switch (fastly_backend_health) {\n    case FASTLY_HOST_BACKEND_BACKEND_HEALTH_UNKNOWN:\n    case FASTLY_HOST_BACKEND_BACKEND_HEALTH_HEALTHY:\n    case FASTLY_HOST_BACKEND_BACKEND_HEALTH_UNHEALTHY: {\n      res.emplace(BackendHealth(fastly_backend_health));\n      break;\n    }\n    default: {\n      MOZ_CRASH(\"Making a BackendHealth from an invalid value\");\n    }\n    }\n  }\n\n  return res;\n}\n\nResult<bool> Backend::is_dynamic() const {\n  TRACE_CALL()\n  Result<bool> res;\n\n  auto name_str = string_view_to_world_string(this->name_);\n  fastly::fastly_host_error err;\n\n  uint32_t is_dynamic;\n  if (!convert_result(fastly::backend_is_dynamic(reinterpret_cast<char *>(name_str.ptr),\n                                                 name_str.len, &is_dynamic),\n                      &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(is_dynamic);\n  }\n  return res;\n}\n\nResult<HostString> Backend::get_host() const {\n  TRACE_CALL()\n  Result<HostString> res;\n\n  auto name_str = string_view_to_world_string(this->name_);\n  fastly::fastly_host_error err;\n\n  fastly::fastly_world_string ret;\n  ret.ptr = static_cast<uint8_t *>(cabi_malloc(HOSTCALL_BUFFER_LEN, 4));\n  if (!convert_result(fastly::backend_get_host(reinterpret_cast<char *>(name_str.ptr), name_str.len,\n                                               ret.ptr, HOSTCALL_BUFFER_LEN, &ret.len),\n                      &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(make_host_string(ret));\n  }\n  return res;\n}\n\nResult<HostString> Backend::get_override_host() const {\n  TRACE_CALL()\n  Result<HostString> res;\n\n  auto name_str = string_view_to_world_string(this->name_);\n  fastly::fastly_host_error err;\n\n  fastly::fastly_world_string ret;\n  ret.ptr = static_cast<uint8_t *>(cabi_malloc(HOSTCALL_BUFFER_LEN, 4));\n  if (!convert_result(fastly::backend_get_override_host(reinterpret_cast<char *>(name_str.ptr),\n                                                        name_str.len, ret.ptr, HOSTCALL_BUFFER_LEN,\n                                                        &ret.len),\n                      &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(make_host_string(ret));\n  }\n  return res;\n}\n\nResult<uint16_t> Backend::get_port() const {\n  TRACE_CALL()\n  Result<uint16_t> res;\n\n  auto name_str = string_view_to_world_string(this->name_);\n  fastly::fastly_host_error err;\n\n  uint16_t port;\n  if (!convert_result(\n          fastly::backend_get_port(reinterpret_cast<char *>(name_str.ptr), name_str.len, &port),\n          &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(port);\n  }\n  return res;\n}\n\nResult<std::optional<uint32_t>> Backend::get_connect_timeout_ms() const {\n  TRACE_CALL()\n  Result<std::optional<uint32_t>> res;\n\n  auto name_str = string_view_to_world_string(this->name_);\n  fastly::fastly_host_error err;\n\n  uint32_t connect_timeout_ms;\n  if (!convert_result(fastly::backend_get_connect_timeout_ms(reinterpret_cast<char *>(name_str.ptr),\n                                                             name_str.len, &connect_timeout_ms),\n                      &err)) {\n    if (host_api::error_is_unsupported(err)) {\n      res.emplace(std::nullopt);\n    } else {\n      res.emplace_err(err);\n    }\n  } else {\n    res.emplace(connect_timeout_ms);\n  }\n  return res;\n}\n\nResult<std::optional<uint32_t>> Backend::get_first_byte_timeout_ms() const {\n  TRACE_CALL()\n  Result<std::optional<uint32_t>> res;\n\n  auto name_str = string_view_to_world_string(this->name_);\n  fastly::fastly_host_error err;\n\n  uint32_t first_byte_timeout_ms;\n  if (!convert_result(\n          fastly::backend_get_first_byte_timeout_ms(reinterpret_cast<char *>(name_str.ptr),\n                                                    name_str.len, &first_byte_timeout_ms),\n          &err)) {\n    if (host_api::error_is_unsupported(err)) {\n      res.emplace(std::nullopt);\n    } else {\n      res.emplace_err(err);\n    }\n  } else {\n    res.emplace(first_byte_timeout_ms);\n  }\n  return res;\n}\n\nResult<std::optional<uint32_t>> Backend::get_between_bytes_timeout_ms() const {\n  TRACE_CALL()\n  Result<std::optional<uint32_t>> res;\n\n  auto name_str = string_view_to_world_string(this->name_);\n  fastly::fastly_host_error err;\n\n  uint32_t between_bytes_timeout_ms;\n  if (!convert_result(\n          fastly::backend_get_between_bytes_timeout_ms(reinterpret_cast<char *>(name_str.ptr),\n                                                       name_str.len, &between_bytes_timeout_ms),\n          &err)) {\n    if (host_api::error_is_unsupported(err)) {\n      res.emplace(std::nullopt);\n    } else {\n      res.emplace_err(err);\n    }\n  } else {\n    res.emplace(between_bytes_timeout_ms);\n  }\n  return res;\n}\n\nResult<uint32_t> Backend::get_http_keepalive_time() const {\n  TRACE_CALL()\n  Result<uint32_t> res;\n\n  auto name_str = string_view_to_world_string(this->name_);\n  fastly::fastly_host_error err;\n\n  uint32_t http_keepalive_time;\n  if (!convert_result(\n          fastly::backend_get_http_keepalive_time(reinterpret_cast<char *>(name_str.ptr),\n                                                  name_str.len, &http_keepalive_time),\n          &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(http_keepalive_time);\n  }\n  return res;\n}\n\nResult<bool> Backend::get_tcp_keepalive_enable() const {\n  TRACE_CALL()\n  Result<bool> res;\n\n  auto name_str = string_view_to_world_string(this->name_);\n  fastly::fastly_host_error err;\n\n  uint32_t tcp_keepalive_enable;\n  if (!convert_result(\n          fastly::backend_get_tcp_keepalive_enable(reinterpret_cast<char *>(name_str.ptr),\n                                                   name_str.len, &tcp_keepalive_enable),\n          &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(tcp_keepalive_enable);\n  }\n  return res;\n}\n\nResult<uint32_t> Backend::get_tcp_keepalive_interval() const {\n  TRACE_CALL()\n  Result<uint32_t> res;\n\n  auto name_str = string_view_to_world_string(this->name_);\n  fastly::fastly_host_error err;\n\n  uint32_t tcp_keepalive_interval;\n  if (!convert_result(\n          fastly::backend_get_tcp_keepalive_interval(reinterpret_cast<char *>(name_str.ptr),\n                                                     name_str.len, &tcp_keepalive_interval),\n          &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(tcp_keepalive_interval);\n  }\n  return res;\n}\n\nResult<uint32_t> Backend::get_tcp_keepalive_probes() const {\n  TRACE_CALL()\n  Result<uint32_t> res;\n\n  auto name_str = string_view_to_world_string(this->name_);\n  fastly::fastly_host_error err;\n\n  uint32_t tcp_keepalive_probes;\n  if (!convert_result(\n          fastly::backend_get_tcp_keepalive_probes(reinterpret_cast<char *>(name_str.ptr),\n                                                   name_str.len, &tcp_keepalive_probes),\n          &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(tcp_keepalive_probes);\n  }\n  return res;\n}\n\nResult<uint32_t> Backend::get_tcp_keepalive_time() const {\n  TRACE_CALL()\n  Result<uint32_t> res;\n\n  auto name_str = string_view_to_world_string(this->name_);\n  fastly::fastly_host_error err;\n\n  uint32_t tcp_keepalive_time;\n  if (!convert_result(fastly::backend_get_tcp_keepalive_time(reinterpret_cast<char *>(name_str.ptr),\n                                                             name_str.len, &tcp_keepalive_time),\n                      &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(tcp_keepalive_time);\n  }\n  return res;\n}\n\nResult<bool> Backend::is_ssl() const {\n  TRACE_CALL()\n  Result<bool> res;\n\n  auto name_str = string_view_to_world_string(this->name_);\n  fastly::fastly_host_error err;\n\n  uint32_t fastly_backend_is_ssl;\n  if (!convert_result(fastly::backend_is_ssl(reinterpret_cast<char *>(name_str.ptr), name_str.len,\n                                             &fastly_backend_is_ssl),\n                      &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(fastly_backend_is_ssl);\n  }\n  return res;\n}\n\nResult<std::optional<TlsVersion>> Backend::ssl_min_version() const {\n  TRACE_CALL()\n  Result<std::optional<TlsVersion>> res;\n\n  auto name_str = string_view_to_world_string(this->name_);\n  fastly::fastly_host_error err;\n\n  uint32_t fastly_backend_ssl_min_version;\n  if (!convert_result(fastly::backend_get_ssl_min_version(reinterpret_cast<char *>(name_str.ptr),\n                                                          name_str.len,\n                                                          &fastly_backend_ssl_min_version),\n                      &err)) {\n    if (host_api::error_is_unsupported(err) || host_api::error_is_optional_none(err)) {\n      res.emplace(std::nullopt);\n    } else {\n      res.emplace_err(err);\n    }\n  } else {\n    res.emplace(fastly_backend_ssl_min_version);\n  }\n  return res;\n}\n\nResult<std::optional<TlsVersion>> Backend::ssl_max_version() const {\n  TRACE_CALL()\n  Result<std::optional<TlsVersion>> res;\n\n  auto name_str = string_view_to_world_string(this->name_);\n  fastly::fastly_host_error err;\n\n  uint32_t fastly_backend_ssl_max_version;\n  if (!convert_result(fastly::backend_get_ssl_max_version(reinterpret_cast<char *>(name_str.ptr),\n                                                          name_str.len,\n                                                          &fastly_backend_ssl_max_version),\n                      &err)) {\n    if (host_api::error_is_unsupported(err) || host_api::error_is_optional_none(err)) {\n      res.emplace(std::nullopt);\n    } else {\n      res.emplace_err(err);\n    }\n  } else {\n    res.emplace(fastly_backend_ssl_max_version);\n  }\n  return res;\n}\n\nResult<Void> RateCounter::increment(std::string_view name, std::string_view entry, uint32_t delta) {\n  TRACE_CALL()\n  auto name_str = string_view_to_world_string(name);\n  auto entry_str = string_view_to_world_string(entry);\n  fastly::fastly_host_error err;\n  if (!convert_result(fastly::ratecounter_increment(\n                          reinterpret_cast<char *>(name_str.ptr), name_str.len,\n                          reinterpret_cast<char *>(entry_str.ptr), entry_str.len, delta),\n                      &err)) {\n    return Result<Void>::err(err);\n  }\n\n  return Result<Void>::ok();\n}\n\nResult<uint32_t> RateCounter::lookup_rate(std::string_view name, std::string_view entry,\n                                          uint32_t window) {\n  TRACE_CALL()\n  Result<uint32_t> res;\n\n  auto name_str = string_view_to_world_string(name);\n  auto entry_str = string_view_to_world_string(entry);\n  uint32_t ret;\n  fastly::fastly_host_error err;\n  if (!convert_result(fastly::ratecounter_lookup_rate(\n                          reinterpret_cast<char *>(name_str.ptr), name_str.len,\n                          reinterpret_cast<char *>(entry_str.ptr), entry_str.len, window, &ret),\n                      &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(ret);\n  }\n\n  return res;\n}\n\nResult<uint32_t> RateCounter::lookup_count(std::string_view name, std::string_view entry,\n                                           uint32_t duration) {\n  TRACE_CALL()\n  Result<uint32_t> res;\n\n  auto name_str = string_view_to_world_string(name);\n  auto entry_str = string_view_to_world_string(entry);\n  uint32_t ret;\n  fastly::fastly_host_error err;\n  if (!convert_result(fastly::ratecounter_lookup_count(\n                          reinterpret_cast<char *>(name_str.ptr), name_str.len,\n                          reinterpret_cast<char *>(entry_str.ptr), entry_str.len, duration, &ret),\n                      &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(ret);\n  }\n\n  return res;\n}\n\nResult<Void> PenaltyBox::add(std::string_view name, std::string_view entry, uint32_t time_to_live) {\n  TRACE_CALL()\n  auto name_str = string_view_to_world_string(name);\n  auto entry_str = string_view_to_world_string(entry);\n  fastly::fastly_host_error err;\n  if (!convert_result(fastly::penaltybox_add(reinterpret_cast<char *>(name_str.ptr), name_str.len,\n                                             reinterpret_cast<char *>(entry_str.ptr), entry_str.len,\n                                             time_to_live),\n                      &err)) {\n    return Result<Void>::err(err);\n  }\n\n  return Result<Void>::ok();\n}\n\nResult<bool> PenaltyBox::has(std::string_view name, std::string_view entry) {\n  TRACE_CALL()\n  Result<bool> res;\n\n  auto name_str = string_view_to_world_string(name);\n  auto entry_str = string_view_to_world_string(entry);\n  alignas(4) bool ret;\n  fastly::fastly_host_error err;\n  if (!convert_result(fastly::penaltybox_has(reinterpret_cast<char *>(name_str.ptr), name_str.len,\n                                             reinterpret_cast<char *>(entry_str.ptr), entry_str.len,\n                                             &ret),\n                      &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(ret);\n  }\n  return res;\n}\n\nResult<bool> EdgeRateLimiter::check_rate(std::string_view rate_counter_name, std::string_view entry,\n                                         uint32_t delta, uint32_t window, uint32_t limit,\n                                         std::string_view penalty_box_name, uint32_t time_to_live) {\n  TRACE_CALL()\n  Result<bool> res;\n\n  auto rate_counter_name_str = string_view_to_world_string(rate_counter_name);\n  auto entry_str = string_view_to_world_string(entry);\n  auto penalty_box_name_str = string_view_to_world_string(penalty_box_name);\n  alignas(4) bool ret;\n  fastly::fastly_host_error err;\n  if (!convert_result(fastly::check_rate(reinterpret_cast<char *>(rate_counter_name_str.ptr),\n                                         rate_counter_name_str.len,\n                                         reinterpret_cast<char *>(entry_str.ptr), entry_str.len,\n                                         delta, window, limit,\n                                         reinterpret_cast<char *>(penalty_box_name_str.ptr),\n                                         penalty_box_name_str.len, time_to_live, &ret),\n                      &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(ret);\n  }\n  return res;\n}\n\nResult<HostString> DeviceDetection::lookup(std::string_view user_agent) {\n  TRACE_CALL()\n  Result<HostString> res;\n\n  auto user_agent_str = string_view_to_world_string(user_agent);\n  fastly::fastly_host_error err;\n  fastly::fastly_world_string ret;\n\n  auto default_size = 1024;\n  ret.ptr = static_cast<uint8_t *>(cabi_malloc(default_size, 4));\n  auto status = fastly::device_detection_lookup(\n      reinterpret_cast<char *>(user_agent_str.ptr), user_agent_str.len,\n      reinterpret_cast<char *>(ret.ptr), default_size, &ret.len);\n  if (status == FASTLY_HOST_ERROR_BUFFER_LEN) {\n    // NB(@zkat): ERROR_BUFFER_LEN sets the expected length of the buffer to\n    //            &ret.len, so we use that to inform our resize.\n    ret.ptr = static_cast<uint8_t *>(cabi_realloc(ret.ptr, default_size, 4, ret.len));\n    status = fastly::device_detection_lookup(reinterpret_cast<char *>(user_agent_str.ptr),\n                                             user_agent_str.len, reinterpret_cast<char *>(ret.ptr),\n                                             ret.len, &ret.len);\n  }\n\n  if (!convert_result(status, &err)) {\n    cabi_free(ret.ptr);\n    res.emplace_err(err);\n  } else {\n    res.emplace(make_host_string(ret));\n  }\n  return res;\n}\n\nResult<KVStore> KVStore::open(std::string_view name) {\n  TRACE_CALL()\n  Result<KVStore> res;\n\n  auto name_str = string_view_to_world_string(name);\n  KVStore::Handle ret;\n  fastly::fastly_host_error err;\n  if (!convert_result(\n          fastly::kv_store_open(reinterpret_cast<char *>(name_str.ptr), name_str.len, &ret),\n          &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(ret);\n  }\n\n  return res;\n}\n\nResult<KVStorePendingList::Handle> KVStore::list(std::optional<string_view> cursor,\n                                                 std::optional<uint32_t> limit,\n                                                 std::optional<string_view> prefix, bool eventual) {\n  TRACE_CALL()\n  Result<KVStorePendingList::Handle> res;\n\n  fastly::KVListOptions list_options{eventual ? KV_LIST_MODE_EVENTUAL : KV_LIST_MODE_STRONG};\n\n  uint32_t options_mask = 0;\n  if (cursor.has_value()) {\n    options_mask |= KV_LIST_CONFIG_CURSOR;\n    list_options.cursor = reinterpret_cast<const uint8_t *>(cursor.value().data());\n    list_options.cursor_len = cursor.value().length();\n  }\n  if (limit.has_value()) {\n    options_mask |= KV_LIST_CONFIG_LIMIT;\n    list_options.limit = limit.value();\n  }\n  if (prefix.has_value()) {\n    options_mask |= KV_LIST_CONFIG_PREFIX;\n    list_options.prefix = reinterpret_cast<const uint8_t *>(prefix.value().data());\n    list_options.prefix_len = prefix.value().length();\n  }\n\n  KVStore::Handle ret;\n  fastly::fastly_host_error err;\n  if (!convert_result(fastly::kv_store_list(this->handle, options_mask, &list_options, &ret),\n                      &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(ret);\n  }\n  return res;\n}\n\nFastlyResult<HttpBody, FastlyKVError> KVStorePendingList::wait() {\n  TRACE_CALL()\n  FastlyResult<HttpBody, FastlyKVError> res;\n\n  fastly::fastly_host_error err;\n  HttpBody body{};\n  fastly::fastly_kv_error kv_err = KV_ERROR_UNINITIALIZED;\n\n  if (!convert_result(fastly::kv_store_list_wait(this->handle, &body.handle, &kv_err), &err) ||\n      kv_err != KV_ERROR_OK || body.handle == INVALID_HANDLE) {\n    res.emplace_err(make_fastly_kv_error(kv_err, err));\n  } else {\n    res.emplace(body);\n  }\n\n  return res;\n}\n\nFastlyAsyncTask::Handle KVStorePendingList::async_handle() const {\n  return FastlyAsyncTask::Handle{this->handle};\n}\n\nResult<KVStorePendingLookup::Handle> KVStore::lookup(std::string_view key) {\n  TRACE_CALL()\n  Result<KVStorePendingLookup::Handle> res;\n  fastly::KVLookupOptions lookup_options{};\n  KVStore::Handle ret;\n  fastly::fastly_host_error err;\n  if (!convert_result(\n          fastly::kv_store_lookup(this->handle, key.data(), key.length(), 0, &lookup_options, &ret),\n          &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(ret);\n  }\n  return res;\n}\n\nFastlyResult<std::optional<std::tuple<HttpBody, HostBytes, uint32_t>>, FastlyKVError>\nKVStorePendingLookup::wait() {\n  TRACE_CALL()\n  FastlyResult<std::optional<std::tuple<HttpBody, HostBytes, uint32_t>>, FastlyKVError> res;\n\n  fastly::fastly_host_error err;\n  HttpBody body{};\n\n  uint64_t gen_out;\n  fastly::fastly_kv_error kv_err = 0;\n  uint8_t *metadata_buf = reinterpret_cast<uint8_t *>(cabi_malloc(HOSTCALL_BUFFER_LEN, 1));\n  size_t metadata_nwritten;\n\n  if (!convert_result(fastly::kv_store_lookup_wait_v2(this->handle, &body.handle, metadata_buf,\n                                                      HOSTCALL_BUFFER_LEN, &metadata_nwritten,\n                                                      &gen_out, &kv_err),\n                      &err) ||\n      ((kv_err != KV_ERROR_OK || body.handle == INVALID_HANDLE) && kv_err != KV_ERROR_NOT_FOUND)) {\n    cabi_free(metadata_buf);\n    res.emplace_err(make_fastly_kv_error(kv_err, err));\n  } else if (kv_err == KV_ERROR_NOT_FOUND) {\n    cabi_free(metadata_buf);\n    res.emplace(std::nullopt);\n  } else {\n    if (metadata_nwritten > 0) {\n      cabi_realloc(metadata_buf, HOSTCALL_BUFFER_LEN, 1, metadata_nwritten);\n      res.emplace(std::make_tuple(body, make_host_bytes(metadata_buf, metadata_nwritten), gen_out));\n    } else {\n      cabi_free(metadata_buf);\n      res.emplace(std::make_tuple(body, HostBytes{}, gen_out));\n    }\n  }\n\n  return res;\n}\n\nFastlyAsyncTask::Handle KVStorePendingLookup::async_handle() const {\n  return FastlyAsyncTask::Handle{this->handle};\n}\n\nResult<KVStorePendingDelete::Handle> KVStore::delete_(std::string_view key) {\n  TRACE_CALL()\n  Result<KVStorePendingDelete::Handle> res;\n  fastly::KVDeleteOptions delete_options{};\n  KVStore::Handle ret;\n  fastly::fastly_host_error err;\n  if (!convert_result(\n          fastly::kv_store_delete(this->handle, key.data(), key.length(), 0, &delete_options, &ret),\n          &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(ret);\n  }\n  return res;\n}\n\nFastlyResult<Void, FastlyKVError> KVStorePendingDelete::wait() {\n  TRACE_CALL()\n  FastlyResult<Void, FastlyKVError> res;\n  fastly::fastly_host_error err;\n  fastly::fastly_kv_error kv_err = KV_ERROR_UNINITIALIZED;\n  if (!convert_result(fastly::kv_store_delete_wait(this->handle, &kv_err), &err) ||\n      kv_err != KV_ERROR_OK) {\n    res.emplace_err(make_fastly_kv_error(kv_err, err));\n  }\n  return res;\n}\n\nFastlyAsyncTask::Handle KVStorePendingDelete::async_handle() const {\n  return FastlyAsyncTask::Handle{this->handle};\n}\n\nResult<KVStorePendingInsert::Handle>\nKVStore::insert(std::string_view key, HttpBody body, std::optional<InsertMode> mode,\n                std::optional<uint64_t> if_generation_match,\n                std::optional<std::tuple<const uint8_t *, size_t>> metadata,\n                std::optional<uint32_t> ttl) {\n  TRACE_CALL()\n  Result<KVStorePendingInsert::Handle> res;\n  fastly::KVInsertOptions insert_options{};\n\n  uint32_t options_mask = 0;\n  if (mode.has_value()) {\n    switch (mode.value()) {\n    case InsertMode::add: {\n      insert_options.mode = KV_INSERT_MODE_ADD;\n      break;\n    }\n    case InsertMode::append: {\n      insert_options.mode = KV_INSERT_MODE_APPEND;\n      break;\n    }\n    case InsertMode::overwrite: {\n      insert_options.mode = KV_INSERT_MODE_OVERWRITE;\n      break;\n    }\n    case InsertMode::prepend: {\n      insert_options.mode = KV_INSERT_MODE_PREPEND;\n      break;\n    }\n    }\n  }\n  if (metadata.has_value()) {\n    options_mask |= KV_INSERT_CONFIG_METADATA;\n    insert_options.metadata_len = std::get<1>(metadata.value());\n    insert_options.metadata = std::get<0>(metadata.value());\n  }\n  if (if_generation_match.has_value()) {\n    options_mask |= KV_INSERT_CONFIG_IF_GENERATION_MATCH;\n    insert_options.if_generation_match = if_generation_match.value();\n  }\n  if (ttl.has_value()) {\n    options_mask |= KV_INSERT_CONFIG_TIME_TO_LIVE_SEC;\n    insert_options.time_to_live_sec = ttl.value();\n  }\n\n  KVStore::Handle ret;\n  fastly::fastly_host_error err;\n  if (!convert_result(fastly::kv_store_insert(this->handle, key.data(), key.length(), body.handle,\n                                              options_mask, &insert_options, &ret),\n                      &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(ret);\n  }\n  return res;\n}\n\nFastlyResult<Void, FastlyKVError> KVStorePendingInsert::wait() {\n  TRACE_CALL()\n  FastlyResult<Void, FastlyKVError> res;\n  fastly::fastly_host_error err;\n  fastly::fastly_kv_error kv_err = KV_ERROR_UNINITIALIZED;\n  if (!convert_result(fastly::kv_store_insert_wait(this->handle, &kv_err), &err) ||\n      kv_err != KV_ERROR_OK) {\n    res.emplace_err(make_fastly_kv_error(kv_err, err));\n  }\n  return res;\n}\n\nFastlyAsyncTask::Handle KVStorePendingInsert::async_handle() const {\n  return FastlyAsyncTask::Handle{this->handle};\n}\n\nResult<std::optional<Acl>> Acl::open(std::string_view name) {\n  TRACE_CALL_ARGS(&name)\n  uint32_t handle_out;\n  fastly::fastly_host_error err;\n  if (!convert_result(fastly::acl_open(name.data(), name.size(), &handle_out), &err)) {\n    if (error_is_optional_none(err)) {\n      TRACE_CALL_RET(TSV(\"<none>\"))\n      return Result<std::optional<Acl>>::ok(std::nullopt);\n    } else {\n      return Result<std::optional<Acl>>::err(host_api::APIError(err));\n    }\n  }\n  TRACE_CALL_RET(TSV(std::to_string(handle_out)))\n  return Result<std::optional<Acl>>::ok(Acl(handle_out));\n}\n\nResult<std::tuple<std::optional<HttpBody>, Acl::LookupError>>\nAcl::lookup(std::span<uint8_t> ip_octets) const {\n  TRACE_CALL()\n  uint32_t body_handle_out = HttpBody::invalid;\n  fastly::fastly_acl_error acl_error_out = FASTLY_ACL_ERROR_UNINITIALIZED;\n  fastly::fastly_host_error err;\n\n  if (!convert_result(fastly::acl_lookup(this->handle, ip_octets.data(), ip_octets.size(),\n                                         &body_handle_out, &acl_error_out),\n                      &err)) {\n    if (acl_error_out != FASTLY_ACL_ERROR_OK && acl_error_out != FASTLY_ACL_ERROR_UNINITIALIZED) {\n      return Result<std::tuple<std::optional<HttpBody>, LookupError>>::ok(\n          std::make_tuple(std::nullopt, static_cast<Acl::LookupError>(acl_error_out)));\n    } else {\n      return Result<std::tuple<std::optional<HttpBody>, LookupError>>::err(err);\n    }\n  }\n\n  if (acl_error_out != FASTLY_ACL_ERROR_OK) {\n    return Result<std::tuple<std::optional<HttpBody>, LookupError>>::ok(\n        std::make_tuple(std::nullopt, static_cast<Acl::LookupError>(acl_error_out)));\n  }\n\n  if (body_handle_out == HttpBody::invalid) {\n    return Result<std::tuple<std::optional<HttpBody>, LookupError>>::ok(std::make_tuple(\n        std::nullopt, static_cast<Acl::LookupError>(FASTLY_ACL_ERROR_UNINITIALIZED)));\n  }\n\n  return Result<std::tuple<std::optional<HttpBody>, Acl::LookupError>>::ok(std::make_tuple(\n      HttpBody{body_handle_out}, static_cast<Acl::LookupError>(FASTLY_ACL_ERROR_OK)));\n}\n\nResult<uint64_t> Compute::get_vcpu_ms() {\n  TRACE_CALL()\n  Result<uint64_t> res;\n  uint64_t ret;\n  fastly::fastly_host_error err;\n  if (!convert_result(fastly::compute_get_vcpu_ms(&ret), &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(ret);\n  }\n  return res;\n}\n\nResult<std::optional<HostString>> Compute::purge_surrogate_key(std::string_view key, bool soft) {\n  TRACE_CALL()\n  Result<std::optional<HostString>> res;\n\n  auto host_key = string_view_to_world_string(key);\n  fastly::fastly_host_error err;\n  uint32_t options_mask = soft ? FASTLY_HOST_PURGE_OPTIONS_MASK_SOFT_PURGE : 0;\n\n  fastly::PurgeOptions options{nullptr, 0, nullptr};\n\n  MOZ_ASSERT(!(options_mask & FASTLY_HOST_PURGE_OPTIONS_MASK_RET_BUF));\n\n  if (!convert_result(fastly::purge_surrogate_key(reinterpret_cast<char *>(host_key.ptr),\n                                                  host_key.len, options_mask, &options),\n                      &err)) {\n    res.emplace_err(err);\n  } else {\n    res.emplace(std::nullopt);\n  }\n\n  return res;\n}\n\n} // namespace host_api\n"
  },
  {
    "path": "runtime/fastly/host-api/host_api_fastly.h",
    "content": "#ifndef FASTLY_HOST_API_H\n#define FASTLY_HOST_API_H\n\n#include <cstdint>\n#include <memory>\n#include <optional>\n#include <span>\n#include <string>\n#include <string_view>\n#include <variant>\n#include <vector>\n\n#include \"./fastly.h\"\n#include \"extension-api.h\"\n#include \"host_api.h\"\n#include \"js/TypeDecls.h\"\n\n#pragma clang diagnostic push\n#pragma clang diagnostic ignored \"-Winvalid-offsetof\"\n#include \"js/Utility.h\"\n#include \"jsapi.h\"\n#pragma clang diagnostic pop\n\nstruct JSErrorFormatString;\n\nvoid fastly_push_debug_message(std::string msg);\n\n// Debug mode debugging logging that logs both into an error response post-data\n// via fastly.debugMessages, as well as to stderr for flexible debugging.\n#if defined(DEBUG)\n#define DEBUG_LOG(msg) fastly_push_debug_message(std::string(msg));\n#else\n#define DEBUG_LOG(msg)\n#endif\n\nnamespace fastly {\n\nconst JSErrorFormatString *FastlyGetErrorMessage(void *userRef, unsigned errorNumber);\n\nenum FastlyAPIError {\n#define MSG_DEF(name, count, exception, format) name,\n#include \"./error_numbers.msg\"\n#undef MSG_DEF\n  JSErrNum_Limit\n};\n\nconst JSErrorFormatString fastly_ErrorFormatString[JSErrNum_Limit] = {\n#define MSG_DEF(name, count, exception, format) {#name, format, count, exception},\n#include \"./error_numbers.msg\"\n#undef MSG_DEF\n};\n\n} // namespace fastly\n\nnamespace api {\n\ntemplate <typename T, typename E> class FastlyResult final {\n  struct Error {\n    E value;\n\n    explicit Error(E value) : value{value} {}\n  };\n\n  std::variant<T, Error> result;\n\npublic:\n  FastlyResult() = default;\n\n  /// Explicitly construct an error.\n  static FastlyResult err(E err) {\n    FastlyResult res;\n    res.emplace_err(err);\n    return res;\n  }\n\n  /// Explicitly construct a successful result.\n  template <typename... Args> static FastlyResult ok(Args &&...args) {\n    FastlyResult res;\n    res.emplace(std::forward<Args>(args)...);\n    return res;\n  }\n\n  /// Construct an error in-place.\n  E &emplace_err(E err) & { return this->result.template emplace<Error>(err).value; }\n\n  /// Construct a value of T in-place.\n  template <typename... Args> T &emplace(Args &&...args) {\n    return this->result.template emplace<T>(std::forward<Args>(args)...);\n  }\n\n  /// True when the result contains an error.\n  bool is_err() const { return std::holds_alternative<Error>(this->result); }\n\n  /// Return a pointer to the error value of this result, if the call failed.\n  const E *to_err() const { return reinterpret_cast<const E *>(std::get_if<Error>(&this->result)); }\n\n  /// Assume the call was successful, and return a reference to the result.\n  T &unwrap() { return std::get<T>(this->result); }\n};\n\ntypedef bool ProcessAsyncTask(JSContext *cx, uint32_t handle, JS::HandleObject context,\n                              JS::HandleValue extra);\n\nclass FastlyAsyncTask final : public AsyncTask {\npublic:\n  using Handle = uint32_t;\n\n  static constexpr Handle invalid = UINT32_MAX - 1;\n\n  FastlyAsyncTask(Handle handle, JS::HandleObject context, JS::HandleValue extra,\n                  ProcessAsyncTask *process) {\n    if (static_cast<int32_t>(handle) == INVALID_POLLABLE_HANDLE)\n      abort();\n    handle_ = static_cast<int32_t>(handle);\n    context_ = Heap<JSObject *>(context);\n    extra_ = Heap<JS::Value>(extra);\n    process_steps_ = process;\n  }\n\n  [[nodiscard]] bool run(Engine *engine) override {\n    if (process_steps_) {\n      RootedObject context(engine->cx(), context_);\n      RootedValue extra(engine->cx(), extra_);\n      if (!process_steps_(engine->cx(), handle_, context, extra)) {\n        return false;\n      }\n    }\n    return true;\n  }\n\n  [[nodiscard]] bool cancel(Engine *engine) override {\n    MOZ_ASSERT_UNREACHABLE(\"Fastly semantics don't allow for cancellation\");\n    return false;\n  }\n\n  Handle handle() { return handle_; }\n\n  void trace(JSTracer *trc) override {\n    TraceEdge(trc, &context_, \"Async task context\");\n    TraceEdge(trc, &extra_, \"Async task extra\");\n  }\n\n  Heap<JSObject *> context_;\n  Heap<JS::Value> extra_;\n  ProcessAsyncTask *process_steps_ = nullptr;\n};\n\n} // namespace api\n\nnamespace fastly::fetch {\n\nclass Request;\n\n} // namespace fastly::fetch\n\nusing api::FastlyAsyncTask;\nusing fastly::fetch::Request;\n\nnamespace host_api {\n\nResult<Void>\nwrite_headers(HttpHeaders *headers,\n              std::vector<std::tuple<host_api::HostString, host_api::HostString>> &list);\n\nclass FastlySendError final {\npublic:\n  enum detail {\n    /// The send-error-detail struct has not been populated.\n    uninitialized,\n    /// There was no send error.\n    ok,\n    /// The system encountered a timeout when trying to find an IP address for the backend\n    /// hostname.\n    dns_timeout,\n    /// The system encountered a DNS error when trying to find an IP address for the backend\n    /// hostname. The fields dns_error_rcode and dns_error_info_code may be set in the\n    /// send_error_detail.\n    dns_error,\n    /// The system cannot determine which backend to use, or the specified backend was invalid.\n    destination_not_found,\n    /// The system considers the backend to be unavailable; e.g., recent attempts to communicate\n    /// with it may have failed, or a health check may indicate that it is down.\n    destination_unavailable,\n    /// The system cannot find a route to the next_hop IP address.\n    destination_ip_unroutable,\n    /// The system's connection to the backend was refused.\n    connection_refused,\n    /// The system's connection to the backend was closed before a complete response was\n    /// received.\n    connection_terminated,\n    /// The system's attempt to open a connection to the backend timed out.\n    connection_timeout,\n    /// The system is configured to limit the number of connections it has to the backend, and\n    /// that limit has been exceeded.\n    connection_limit_reached,\n    /// The system encountered an error when verifying the certificate presented by the backend.\n    tls_certificate_error,\n    /// The system encountered an error with the backend TLS configuration.\n    tls_configuration_error,\n    /// The system received an incomplete response to the request from the backend.\n    http_incomplete_response,\n    /// The system received a response to the request whose header section was considered too\n    /// large.\n    http_response_header_section_too_large,\n    /// The system received a response to the request whose body was considered too large.\n    http_response_body_too_large,\n    /// The system reached a configured time limit waiting for the complete response.\n    http_response_timeout,\n    /// The system received a response to the request whose status code or reason phrase was\n    /// invalid.\n    http_response_status_invalid,\n    /// The process of negotiating an upgrade of the HTTP version between the system and the\n    /// backend failed.\n    http_upgrade_failed,\n    /// The system encountered an HTTP protocol error when communicating with the backend. This\n    /// error will only be used when a more specific one is not defined.\n    http_protocol_error,\n    /// An invalid cache key was provided for the request.\n    http_request_cache_key_invalid,\n    /// An invalid URI was provided for the request.\n    http_request_uri_invalid,\n    /// The system encountered an unexpected internal error.\n    internal_error,\n    /// The system received a TLS alert from the backend. The field tls_alert_id may be set in\n    /// the send_error_detail.\n    tls_alert_received,\n    /// The system encountered a TLS error when communicating with the backend, either during\n    /// the handshake or afterwards.\n    tls_protocol_error\n  };\n\n  detail tag;\n  uint16_t dns_error_rcode;\n  uint16_t dns_error_info_code;\n  uint8_t tls_alert_id;\n\n  const std::optional<std::string> message() const;\n};\n\nclass FastlyKVError final {\npublic:\n  enum detail {\n    /// The kv-error-detail struct has not been populated.\n    uninitialized,\n    /// There was no kv error.\n    ok,\n    /// Bad request.\n    bad_request,\n    /// KV store entry not found.\n    not_found,\n    /// Invalid state for operation.\n    precondition_failed,\n    /// Buffer size issues.\n    payload_too_large,\n    /// Oh no.\n    internal_error,\n    /// Rate limiting\n    too_many_requests,\n    /// Store handle not recognized\n    invalid_store_handle,\n    /// Host error\n    host_error,\n  };\n\n  APIError host_err;\n  detail detail;\n\n  const std::optional<std::string> message() const;\n};\n\n/// A convenience wrapper for the host calls involving http bodies.\nclass HttpBody final {\npublic:\n  using Handle = uint32_t;\n\n  static constexpr Handle invalid = UINT32_MAX - 1;\n\n  Handle handle = invalid;\n\n  HttpBody() = default;\n  explicit HttpBody(Handle handle) : handle{handle} {}\n  explicit HttpBody(FastlyAsyncTask async) : handle{async.handle()} {}\n\n  /// Returns true when this body handle is valid.\n  bool valid() const { return this->handle != invalid; }\n\n  explicit operator bool() const { return valid(); }\n\n  /// Make a new body handle.\n  static Result<HttpBody> make();\n\n  /// Read a chunk from this handle.\n  Result<HostString> read(uint32_t chunk_size) const;\n\n  /// Read a chunk from this handle in to the specified buffer.\n  Result<size_t> read_into(uint8_t *ptr, size_t chunk_size) const;\n\n  /// Read all chunks.\n  Result<HostBytes> read_all() const;\n\n  /// Write a chunk to the front of this handle.\n  Result<uint32_t> write_front(const uint8_t *bytes, size_t len) const;\n\n  /// Write a chunk to the back of this handle.\n  Result<uint32_t> write_back(const uint8_t *bytes, size_t len) const;\n\n  /// Writes the given number of bytes from the given buffer to the front of the given handle.\n  ///\n  /// The host doesn't necessarily write all bytes in any particular call to\n  /// `write`, so to ensure all bytes are written, we call it in a loop.\n  Result<Void> write_all_front(const uint8_t *bytes, size_t len) const;\n\n  /// Writes the given number of bytes from the given buffer to the back of the given handle.\n  ///\n  /// The host doesn't necessarily write all bytes in any particular call to\n  /// `write`, so to ensure all bytes are written, we call it in a loop.\n  Result<Void> write_all_back(const uint8_t *bytes, size_t len) const;\n\n  /// Append another HttpBody to this one.\n  Result<Void> append(HttpBody other) const;\n\n  /// Close this handle, and reset internal state to invalid.\n  Result<Void> close();\n\n  /// Abandon this handle (close unsuccessfully) and reset internal state\n  Result<Void> abandon();\n\n  /// Get the length of the body if known\n  Result<std::optional<uint64_t>> known_length() const;\n\n  FastlyAsyncTask::Handle async_handle() const;\n\n  Result<bool> is_ready() const;\n};\n\nstruct Response;\n\nclass HttpPendingReq final {\npublic:\n  using Handle = uint32_t;\n\n  static constexpr Handle invalid = UINT32_MAX - 1;\n\n  Handle handle = invalid;\n\n  HttpPendingReq() = default;\n  explicit HttpPendingReq(Handle handle) : handle{handle} {}\n  explicit HttpPendingReq(FastlyAsyncTask async) : handle{async.handle()} {}\n\n  /// Poll for the response to this request.\n  Result<std::optional<Response>> poll();\n\n  /// Block until the response is ready.\n  api::FastlyResult<Response, FastlySendError> wait();\n\n  /// Fetch the FastlyAsyncTask for this pending request.\n  FastlyAsyncTask::Handle async_handle() const;\n};\n\nusing HttpVersion = uint8_t;\n\nclass HttpBase {\npublic:\n  virtual ~HttpBase() = default;\n\n  virtual bool is_valid() const = 0;\n\n  /// Get the http version used for this request.\n  virtual Result<HttpVersion> get_version() const = 0;\n\n  virtual HttpHeadersReadOnly *headers() = 0;\n  virtual HttpHeaders *headers_writable() = 0;\n};\n\nstruct TlsVersion {\n  uint8_t value = 0;\n\n  explicit TlsVersion(uint8_t raw);\n  explicit TlsVersion(){};\n\n  uint8_t get_version() const;\n  double get_version_number() const;\n  static TlsVersion version_1();\n  static TlsVersion version_1_1();\n  static TlsVersion version_1_2();\n  static TlsVersion version_1_3();\n};\n\ntypedef uint32_t CertKey;\n\nstruct ClientCert {\n  HostString cert;\n  CertKey key;\n};\n\nstruct TcpKeepalive {\n  std::optional<uint32_t> interval_secs;\n  std::optional<uint32_t> probes;\n  std::optional<uint32_t> time_secs;\n};\n\nstruct BackendConfig {\n  std::optional<HostString> host_override;\n  std::optional<uint32_t> connect_timeout;\n  std::optional<uint32_t> first_byte_timeout;\n  std::optional<uint32_t> between_bytes_timeout;\n  std::optional<bool> use_ssl;\n  std::optional<bool> dont_pool;\n  std::optional<TlsVersion> ssl_min_version;\n  std::optional<TlsVersion> ssl_max_version;\n  std::optional<HostString> cert_hostname;\n  std::optional<HostString> ca_cert;\n  std::optional<HostString> ciphers;\n  std::optional<HostString> sni_hostname;\n  std::optional<ClientCert> client_cert;\n  std::optional<bool> grpc;\n  std::optional<uint32_t> http_keepalive_time_ms;\n  std::optional<TcpKeepalive> tcp_keepalive;\n\n  BackendConfig clone() {\n    std::optional<HostString> out_host_override{};\n    std::optional<uint32_t> out_connect_timeout{};\n    std::optional<uint32_t> out_first_byte_timeout{};\n    std::optional<uint32_t> out_between_bytes_timeout{};\n    std::optional<bool> out_use_ssl{};\n    std::optional<bool> out_dont_pool{};\n    std::optional<TlsVersion> out_ssl_min_version{};\n    std::optional<TlsVersion> out_ssl_max_version{};\n    std::optional<HostString> out_cert_hostname{};\n    std::optional<HostString> out_ca_cert{};\n    std::optional<HostString> out_ciphers{};\n    std::optional<HostString> out_sni_hostname{};\n    std::optional<ClientCert> out_client_cert{};\n    std::optional<bool> out_grpc{};\n    std::optional<uint32_t> out_http_keepalive_time_ms{};\n    std::optional<TcpKeepalive> out_tcp_keepalive{};\n    if (host_override.has_value()) {\n      out_host_override = host_api::HostString(std::string_view(host_override.value()));\n    }\n    if (connect_timeout.has_value()) {\n      out_connect_timeout = connect_timeout.value();\n    }\n    if (first_byte_timeout.has_value()) {\n      out_first_byte_timeout = first_byte_timeout.value();\n    }\n    if (between_bytes_timeout.has_value()) {\n      out_between_bytes_timeout = between_bytes_timeout.value();\n    }\n    if (use_ssl.has_value()) {\n      out_use_ssl = use_ssl.value();\n    }\n    if (dont_pool.has_value()) {\n      out_dont_pool = dont_pool.value();\n    }\n    if (ssl_min_version.has_value()) {\n      out_ssl_min_version = TlsVersion(ssl_min_version.value().value);\n    }\n    if (ssl_max_version.has_value()) {\n      out_ssl_max_version = TlsVersion(ssl_max_version.value().value);\n    }\n    if (cert_hostname.has_value()) {\n      out_cert_hostname = host_api::HostString(std::string_view(cert_hostname.value()));\n    }\n    if (ca_cert.has_value()) {\n      out_ca_cert = host_api::HostString(std::string_view(ca_cert.value()));\n    }\n    if (ciphers.has_value()) {\n      out_ciphers = host_api::HostString(std::string_view(ciphers.value()));\n    }\n    if (sni_hostname.has_value()) {\n      out_sni_hostname = host_api::HostString(std::string_view(sni_hostname.value()));\n    }\n    if (client_cert.has_value()) {\n      host_api::HostString client_cert_cloned =\n          host_api::HostString(std::string_view(client_cert.value().cert));\n      out_client_cert = ClientCert{std::move(client_cert_cloned), client_cert.value().key};\n    }\n    if (grpc.has_value()) {\n      out_grpc = grpc.value();\n    }\n    if (http_keepalive_time_ms.has_value()) {\n      out_http_keepalive_time_ms = http_keepalive_time_ms.value();\n    }\n    if (tcp_keepalive.has_value()) {\n      out_tcp_keepalive = tcp_keepalive.value();\n    }\n    return BackendConfig{std::move(out_host_override),\n                         std::move(out_connect_timeout),\n                         std::move(out_first_byte_timeout),\n                         std::move(out_between_bytes_timeout),\n                         std::move(out_use_ssl),\n                         std::move(out_dont_pool),\n                         std::move(out_ssl_min_version),\n                         std::move(out_ssl_max_version),\n                         std::move(out_cert_hostname),\n                         std::move(out_ca_cert),\n                         std::move(out_ciphers),\n                         std::move(out_sni_hostname),\n                         std::move(out_client_cert),\n                         std::move(out_grpc),\n                         std::move(out_http_keepalive_time_ms),\n                         std::move(out_tcp_keepalive)};\n  }\n};\n\nstruct CacheOverrideTag final {\n  uint8_t value = 0;\n\n  void set_pass();\n  void set_ttl();\n  void set_stale_while_revalidate();\n  void set_pci();\n};\n\nenum class FramingHeadersMode : uint8_t {\n  Automatic,\n  ManuallyFromHeaders,\n};\n\nclass FastlyImageOptimizerError final {\npublic:\n  enum detail { uninitialized, ok, error, warning };\n\n  FastlyImageOptimizerError(detail err, std::string msg)\n      : err(err), is_host_error(false), msg(std::move(msg)) {}\n  FastlyImageOptimizerError(APIError host_err) : host_err(host_err), is_host_error(true) {}\n\n  union {\n    APIError host_err;\n    detail err;\n  };\n  bool is_host_error;\n\n  const std::optional<std::string> message() const;\n\nprivate:\n  std::string msg;\n};\n\nclass InspectOptions final {\npublic:\n  const char *corp = nullptr;\n  uint32_t corp_len = 0;\n  const char *workspace = nullptr;\n  uint32_t workspace_len = 0;\n  const char *override_client_ip_ptr = nullptr;\n  uint32_t override_client_ip_len = 0;\n  uint32_t req_handle;\n  uint32_t body_handle;\n\n  InspectOptions() = default;\n  explicit InspectOptions(uint32_t req, uint32_t body) : req_handle{req}, body_handle{body} {}\n};\n\nclass HttpReq final : public HttpBase {\npublic:\n  using Handle = uint32_t;\n\n  static constexpr Handle invalid = UINT32_MAX - 1;\n\n  Handle handle = invalid;\n\n  HttpReq() = default;\n  explicit HttpReq(Handle handle) : handle{handle} {}\n\n  static Result<HttpReq> make();\n\n  Result<Void> redirect_to_grip_proxy(std::string_view backend);\n\n  Result<Void> redirect_to_websocket_proxy(std::string_view backend);\n\n  static Result<Void> register_dynamic_backend(std::string_view name, std::string_view target,\n                                               const BackendConfig &config);\n\n  Result<std::optional<HostString>> http_req_downstream_client_request_id();\n\n  /// Get the downstream ip address.\n  Result<HostBytes> downstream_client_ip_addr();\n\n  Result<HostBytes> downstream_server_ip_addr();\n\n  Result<std::optional<HostString>> http_req_downstream_tls_cipher_openssl_name();\n\n  Result<std::optional<HostString>> http_req_downstream_tls_protocol();\n\n  Result<std::optional<HostBytes>> http_req_downstream_tls_client_hello();\n\n  Result<std::optional<HostBytes>> http_req_downstream_tls_raw_client_certificate();\n\n  Result<std::optional<HostBytes>> http_req_downstream_tls_ja3_md5();\n\n  Result<std::optional<HostString>> http_req_downstream_tls_ja4();\n\n  Result<std::optional<HostString>> http_req_downstream_client_h2_fingerprint();\n\n  Result<std::optional<HostString>> http_req_downstream_client_oh_fingerprint();\n\n  Result<Void> auto_decompress_gzip();\n\n  /// Send this request synchronously, and wait for the response.\n  Result<Response> send(HttpBody body, std::string_view backend);\n\n  /// Send this request asynchronously.\n  Result<HttpPendingReq> send_async(HttpBody body, std::string_view backend);\n\n  /// Send this request asynchronously, and allow sending additional data through the body.\n  Result<HttpPendingReq> send_async_streaming(HttpBody body, std::string_view backend);\n\n  /// Send this request asynchronously without any caching.\n  Result<HttpPendingReq> send_async_without_caching(HttpBody body, std::string_view backend,\n                                                    bool streaming = false);\n\n  /// Send this request synchronously to the Image Optimizer and wait for the response.\n  api::FastlyResult<Response, FastlyImageOptimizerError>\n  send_image_optimizer(HttpBody body, std::string_view backend, std::string_view config_str);\n\n  /// Get the http version used for this request.\n\n  /// Set the request method.\n  Result<Void> set_method(std::string_view method);\n\n  /// Get the request method.\n  Result<HostString> get_method() const;\n\n  /// Set the request uri.\n  Result<Void> set_uri(std::string_view str);\n\n  /// Get the request uri.\n  Result<HostString> get_uri() const;\n\n  /// Configure cache-override settings.\n  Result<Void> cache_override(CacheOverrideTag tag, std::optional<uint32_t> ttl,\n                              std::optional<uint32_t> stale_while_revalidate,\n                              std::optional<std::string_view> surrogate_key);\n\n  /// Set the framing headers mode for this request.\n  Result<Void> set_framing_headers_mode(FramingHeadersMode mode);\n\n  bool is_valid() const override;\n\n  Result<HttpVersion> get_version() const override;\n\n  HttpHeadersReadOnly *headers() override;\n  HttpHeaders *headers_writable() override;\n\n  /// Check if request is cacheable\n  Result<bool> is_cacheable() const;\n\n  /// Get suggested cache key\n  Result<HostString> get_suggested_cache_key() const;\n};\n\nclass HttpResp final : public HttpBase {\npublic:\n  using Handle = uint32_t;\n\n  static constexpr Handle invalid = UINT32_MAX - 1;\n\n  Handle handle = invalid;\n\n  HttpResp() = default;\n  explicit HttpResp(Handle handle) : handle{handle} {}\n\n  static Result<HttpResp> make();\n\n  /// Get the http status for the response.\n  Result<uint16_t> get_status() const;\n\n  /// Set the http status for the response.\n  Result<Void> set_status(uint16_t status);\n\n  /// Immediately begin sending this response to the downstream client.\n  Result<Void> send_downstream(HttpBody body, bool streaming);\n\n  /// Set the framing headers mode for this response.\n  Result<Void> set_framing_headers_mode(FramingHeadersMode mode);\n\n  bool is_valid() const override;\n\n  Result<HttpVersion> get_version() const override;\n\n  /// Get the IP address associated with the response\n  Result<std::optional<HostBytes>> get_ip() const;\n  /// Get the port associated with the response\n  Result<std::optional<uint16_t>> get_port() const;\n\n  HttpHeadersReadOnly *headers() override;\n  HttpHeaders *headers_writable() override;\n};\n\n/// The pair of a response and its body.\nstruct Response {\n  HttpResp resp;\n  HttpBody body;\n\n  Response() = default;\n  Response(HttpResp resp, HttpBody body) : resp{resp}, body{body} {}\n};\n\n/// The pair of a request and its body.\nstruct Request {\n  HttpReq req;\n  HttpBody body;\n\n  Request() = default;\n  Request(HttpReq req, HttpBody body) : req{req}, body{body} {}\n\n  /// Fetch the downstream request/body pair\n  static Result<Request> downstream_get();\n  Result<HostString> inspect(const InspectOptions *config);\n};\n\nclass HttpReqPromise final {\npublic:\n  using Handle = uint32_t;\n\n  static constexpr Handle invalid = UINT32_MAX - 1;\n\n  Handle handle = invalid;\n\n  HttpReqPromise() = default;\n  explicit HttpReqPromise(Handle handle) : handle{handle} {}\n\n  struct DownstreamNextOptions final {\n    std::optional<uint32_t> timeout_ms;\n  };\n  static Result<HttpReqPromise> downstream_next(DownstreamNextOptions options);\n  Result<Request> wait();\n  Result<Void> abandon();\n};\n\nclass GeoIp final {\n  ~GeoIp() = delete;\n\npublic:\n  /// Lookup information about the ip address provided.\n  static Result<std::optional<HostString>> lookup(std::span<uint8_t> bytes);\n};\n\nstruct HttpCacheLookupOptions {\n  const char *override_key_ptr;\n  size_t override_key_len;\n};\n\nstruct HttpCacheWriteOptions final {\n  // Required max age of the response before considered stale\n  // (This is only optional when used for overrides)\n  std::optional<uint64_t> max_age_ns;\n\n  // Optional vary rule - header names separated by spaces\n  std::optional<HostString> vary_rule;\n\n  // Optional initial age of the response in nanoseconds\n  std::optional<uint64_t> initial_age_ns;\n\n  // Optional stale-while-revalidate duration in nanoseconds\n  std::optional<uint64_t> stale_while_revalidate_ns;\n\n  // Optional surrogate keys separated by spaces\n  std::optional<std::vector<HostString>> surrogate_keys;\n\n  // Optional length of the response body\n  std::optional<uint64_t> length;\n\n  // Optional flag indicating if this contains sensitive data\n  std::optional<bool> sensitive_data;\n};\n\nstruct CacheState final {\n  uint8_t state = 0;\n\n  CacheState() = default;\n  CacheState(uint8_t state) : state{state} {}\n\n  bool is_found() const;\n  bool is_usable() const;\n  bool is_stale() const;\n  bool must_insert_or_update() const;\n};\n\nenum class HttpStorageAction : uint8_t {\n  Insert = 0,\n  Update = 1,\n  DoNotStore = 2,\n  RecordUncacheable = 3\n};\n\nclass HttpCacheEntry final {\npublic:\n  using Handle = uint32_t;\n  static constexpr Handle invalid = UINT32_MAX - 1;\n\n  Handle handle = invalid;\n\n  HttpCacheEntry() = default;\n  explicit HttpCacheEntry(Handle handle) : handle{handle} {}\n\n  bool is_valid() const { return handle != invalid; }\n\n  /// Lookup a cached object, participating in request collapsing\n  static Result<HttpCacheEntry> transaction_lookup(const HttpReq &req,\n                                                   std::span<uint8_t> override_key = {});\n\n  /// Insert a response into cache\n  Result<HttpBody> transaction_insert(const HttpResp &resp, const HttpCacheWriteOptions *opts);\n\n  /// Insert a response and get back a stream\n  Result<std::tuple<HttpBody, HttpCacheEntry>>\n  transaction_insert_and_stream_back(const HttpResp &resp, const HttpCacheWriteOptions *opts);\n\n  /// Update a response's headers and metadata without changing body\n  Result<Void> transaction_update(const HttpResp &resp, const HttpCacheWriteOptions *opts);\n\n  /// Update response and get back a fresh handle\n  Result<HttpCacheEntry> transaction_update_and_return_fresh(const HttpResp &resp,\n                                                             const HttpCacheWriteOptions *opts);\n\n  /// Record that this entry should not be cached\n  Result<Void>\n  transaction_record_not_cacheable(uint64_t max_age_ns,\n                                   std::optional<std::string_view> vary_rule = std::nullopt);\n\n  /// Abandon the transaction\n  Result<Void> transaction_abandon();\n\n  /// Close the cache entry\n  Result<Void> close();\n\n  /// Get suggested backend request\n  Result<HttpReq> get_suggested_backend_request() const;\n\n  /// Get suggested cache options\n  Result<HttpCacheWriteOptions *> get_suggested_cache_options(const HttpResp &resp) const;\n\n  /// Prepare response for storage\n  Result<std::tuple<HttpStorageAction, HttpResp>> prepare_response_for_storage(HttpResp resp) const;\n\n  /// Get found response\n  Result<std::optional<Response>> get_found_response(bool transform_for_client = true) const;\n\n  /// Get cache entry state\n  Result<CacheState> get_state() const;\n\n  /// Get content length\n  Result<std::optional<uint64_t>> get_length() const;\n\n  /// Get max age in nanoseconds\n  Result<uint64_t> get_max_age_ns() const;\n\n  /// Get stale while revalidate time in nanoseconds\n  Result<uint64_t> get_stale_while_revalidate_ns() const;\n\n  /// Get age in nanoseconds\n  Result<uint64_t> get_age_ns() const;\n\n  /// Get hit count\n  Result<uint64_t> get_hits() const;\n\n  /// Check if contains sensitive data\n  Result<bool> get_sensitive_data() const;\n\n  /// Get surrogate keys\n  Result<std::vector<HostString>> get_surrogate_keys() const;\n\n  /// Get vary rule\n  Result<std::optional<HostString>> get_vary_rule() const;\n};\n\nclass LogEndpoint final {\npublic:\n  using Handle = uint32_t;\n\n  static constexpr Handle invalid = UINT32_MAX - 1;\n\n  Handle handle = invalid;\n\n  LogEndpoint() = default;\n  explicit LogEndpoint(Handle handle) : handle{handle} {}\n\n  static Result<LogEndpoint> get(std::string_view name);\n\n  Result<Void> write(std::string_view msg);\n};\n\nclass Dict final {\npublic:\n  using Handle = uint32_t;\n\n  static constexpr Handle invalid = UINT32_MAX - 1;\n\n  Handle handle = invalid;\n\n  Dict() = default;\n  explicit Dict(Handle handle) : handle{handle} {}\n\n  static Result<Dict> open(std::string_view name);\n\n  Result<std::optional<HostString>> get(std::string_view name);\n};\n\nclass ConfigStore final {\npublic:\n  using Handle = uint32_t;\n\n  static constexpr Handle invalid = UINT32_MAX - 1;\n\n  Handle handle = invalid;\n\n  ConfigStore() = default;\n  explicit ConfigStore(Handle handle) : handle{handle} {}\n\n  static Result<ConfigStore> open(std::string_view name);\n\n  Result<std::optional<HostString>> get(std::string_view name);\n  Result<std::optional<HostString>> get(std::string_view name, uint32_t initial_buf_len);\n};\n\nclass ObjectStorePendingLookup final {\npublic:\n  using Handle = uint32_t;\n\n  static constexpr Handle invalid = UINT32_MAX - 1;\n\n  Handle handle = invalid;\n\n  ObjectStorePendingLookup() = default;\n  explicit ObjectStorePendingLookup(Handle handle) : handle{handle} {}\n  explicit ObjectStorePendingLookup(FastlyAsyncTask async) : handle{async.handle()} {}\n\n  /// Block until the response is ready.\n  api::FastlyResult<std::optional<HttpBody>, fastly::FastlyAPIError> wait();\n\n  /// Fetch the handle for this pending request.\n  FastlyAsyncTask::Handle async_handle() const;\n};\n\nclass ObjectStorePendingDelete final {\npublic:\n  using Handle = uint32_t;\n\n  static constexpr Handle invalid = UINT32_MAX - 1;\n\n  Handle handle = invalid;\n\n  ObjectStorePendingDelete() = default;\n  explicit ObjectStorePendingDelete(Handle handle) : handle{handle} {}\n  explicit ObjectStorePendingDelete(FastlyAsyncTask async) : handle{async.handle()} {}\n\n  /// Block until the response is ready.\n  Result<Void> wait();\n\n  /// Fetch the handle for this pending request.\n  FastlyAsyncTask::Handle async_handle() const;\n};\n\nclass ObjectStore final {\npublic:\n  using Handle = uint32_t;\n\n  static constexpr Handle invalid = UINT32_MAX - 1;\n\n  Handle handle = invalid;\n\n  ObjectStore() = default;\n  explicit ObjectStore(Handle handle) : handle{handle} {}\n\n  static Result<ObjectStore> open(std::string_view name);\n\n  Result<std::optional<HttpBody>> lookup(std::string_view name);\n  Result<ObjectStorePendingLookup::Handle> lookup_async(std::string_view name);\n  Result<ObjectStorePendingDelete::Handle> delete_async(std::string_view name);\n\n  Result<Void> insert(std::string_view name, HttpBody body);\n};\n\nclass Secret final {\npublic:\n  using Handle = uint32_t;\n\n  static constexpr Handle invalid = UINT32_MAX - 1;\n\n  Handle handle = invalid;\n\n  Secret() = default;\n  explicit Secret(Handle handle) : handle{handle} {}\n\n  Result<std::optional<HostBytes>> plaintext() const;\n  Result<std::optional<HostBytes>> plaintext(uint32_t initial_buf_len) const;\n};\n\nclass SecretStore final {\npublic:\n  using Handle = uint32_t;\n\n  static constexpr Handle invalid = UINT32_MAX - 1;\n\n  Handle handle = invalid;\n\n  SecretStore() = default;\n  explicit SecretStore(Handle handle) : handle{handle} {}\n\n  static Result<SecretStore> open(std::string_view name);\n\n  Result<std::optional<Secret>> get(std::string_view name);\n  static Result<Secret> from_bytes(const uint8_t *bytes, size_t len);\n};\n\nstruct CacheLookupOptions final {\n  /// A full request handle, used only for its headers.\n  HttpReq request_headers;\n};\n\nstruct CacheGetBodyOptions final {\n  std::optional<uint64_t> start;\n  std::optional<uint64_t> end;\n};\n\nstruct CacheWriteOptions final {\n  uint64_t max_age_ns = 0;\n  HttpReq request_headers;\n  std::string vary_rule;\n\n  uint64_t initial_age_ns = 0;\n  uint64_t stale_while_revalidate_ns = 0;\n\n  std::string surrogate_keys;\n\n  uint64_t length = 0;\n\n  HostBytes metadata;\n\n  bool sensitive = false;\n};\n\nclass CacheHandle final {\npublic:\n  using Handle = uint32_t;\n\n  static constexpr Handle invalid = UINT32_MAX - 1;\n\n  Handle handle = invalid;\n\n  CacheHandle() = default;\n  explicit CacheHandle(Handle handle) : handle{handle} {}\n\n  /// Lookup a cached object.\n  static Result<CacheHandle> lookup(std::string_view key, const CacheLookupOptions &opts);\n\n  static Result<CacheHandle> transaction_lookup(std::string_view key,\n                                                const CacheLookupOptions &opts);\n\n  /// Insert a cache object.\n  static Result<HttpBody> insert(std::string_view key, const CacheWriteOptions &opts);\n\n  Result<HttpBody> transaction_insert(const CacheWriteOptions &opts);\n\n  Result<Void> transaction_update(const CacheWriteOptions &opts);\n\n  /// Insert this cached object and stream it back.\n  Result<std::tuple<HttpBody, CacheHandle>>\n  transaction_insert_and_stream_back(const CacheWriteOptions &opts);\n\n  bool is_valid() const { return this->handle != invalid; }\n\n  /// Cancel a transaction.\n  Result<Void> transaction_cancel();\n\n  /// Fetch the body handle for the cached data.\n  Result<HttpBody> get_body(const CacheGetBodyOptions &opts);\n\n  /// Fetch the state for this cache handle.\n  Result<CacheState> get_state();\n\n  Result<Void> close();\n\n  Result<HostBytes> get_user_metadata();\n\n  Result<uint64_t> get_length();\n\n  Result<uint64_t> get_max_age_ns();\n\n  Result<uint64_t> get_stale_while_revalidate_ns();\n\n  Result<uint64_t> get_age_ns();\n\n  Result<uint64_t> get_hits();\n};\n\nstruct BackendHealth final {\npublic:\n  uint8_t state = 0;\n\n  BackendHealth() = default;\n  BackendHealth(uint8_t state) : state{state} {}\n\n  bool is_unknown() const;\n  bool is_healthy() const;\n  bool is_unhealthy() const;\n};\n\nclass Backend final {\n  HostString name_;\n\npublic:\n  Backend() = default;\n  explicit Backend(const std::string_view &name) : name_{name} {}\n  explicit Backend(HostString name) : name_{std::move(name)} {}\n\n  const HostString &name() const { return name_; };\n  Result<BackendHealth> health() const;\n  Result<bool> is_dynamic() const;\n  Result<HostString> get_host() const;\n  Result<HostString> get_override_host() const;\n  Result<uint16_t> get_port() const;\n  Result<std::optional<uint32_t>> get_connect_timeout_ms() const;\n  Result<std::optional<uint32_t>> get_first_byte_timeout_ms() const;\n  Result<std::optional<uint32_t>> get_between_bytes_timeout_ms() const;\n  Result<uint32_t> get_http_keepalive_time() const;\n  Result<bool> get_tcp_keepalive_enable() const;\n  Result<uint32_t> get_tcp_keepalive_interval() const;\n  Result<uint32_t> get_tcp_keepalive_probes() const;\n  Result<uint32_t> get_tcp_keepalive_time() const;\n  Result<bool> is_ssl() const;\n  Result<std::optional<TlsVersion>> ssl_min_version() const;\n  Result<std::optional<TlsVersion>> ssl_max_version() const;\n\npublic:\n  static Result<bool> exists(std::string_view name);\n};\n\nclass PenaltyBox final {\npublic:\n  static Result<Void> add(std::string_view name, std::string_view entry, uint32_t time_to_live);\n  static Result<bool> has(std::string_view name, std::string_view entry);\n};\n\nclass RateCounter final {\npublic:\n  static Result<Void> increment(std::string_view name, std::string_view entry, uint32_t delta);\n  static Result<uint32_t> lookup_rate(std::string_view name, std::string_view entry,\n                                      uint32_t window);\n  static Result<uint32_t> lookup_count(std::string_view name, std::string_view entry,\n                                       uint32_t duration);\n};\n\nclass EdgeRateLimiter final {\npublic:\n  static Result<bool> check_rate(std::string_view rate_counter_name, std::string_view entry,\n                                 uint32_t delta, uint32_t window, uint32_t limit,\n                                 std::string_view penalty_box_name, uint32_t time_to_live);\n};\n\nclass DeviceDetection final {\npublic:\n  static Result<HostString> lookup(std::string_view user_agent);\n};\n\nclass KVStorePendingLookup final {\npublic:\n  using Handle = uint32_t;\n\n  static constexpr Handle invalid = UINT32_MAX - 1;\n\n  Handle handle = invalid;\n\n  KVStorePendingLookup() = default;\n  explicit KVStorePendingLookup(Handle handle) : handle{handle} {}\n  explicit KVStorePendingLookup(FastlyAsyncTask async) : handle{async.handle()} {}\n\n  /// Block until the response is ready.\n  api::FastlyResult<std::optional<std::tuple<HttpBody, HostBytes, uint32_t>>, FastlyKVError> wait();\n\n  /// Fetch the handle for this pending request.\n  FastlyAsyncTask::Handle async_handle() const;\n};\n\nclass KVStorePendingInsert final {\npublic:\n  using Handle = uint32_t;\n\n  static constexpr Handle invalid = UINT32_MAX - 1;\n\n  Handle handle = invalid;\n\n  KVStorePendingInsert() = default;\n  explicit KVStorePendingInsert(Handle handle) : handle{handle} {}\n  explicit KVStorePendingInsert(FastlyAsyncTask async) : handle{async.handle()} {}\n\n  /// Block until the response is ready.\n  api::FastlyResult<Void, FastlyKVError> wait();\n\n  /// Fetch the handle for this pending request.\n  FastlyAsyncTask::Handle async_handle() const;\n};\n\nclass KVStorePendingDelete final {\npublic:\n  using Handle = uint32_t;\n\n  static constexpr Handle invalid = UINT32_MAX - 1;\n\n  Handle handle = invalid;\n\n  KVStorePendingDelete() = default;\n  explicit KVStorePendingDelete(Handle handle) : handle{handle} {}\n  explicit KVStorePendingDelete(FastlyAsyncTask async) : handle{async.handle()} {}\n\n  /// Block until the response is ready.\n  api::FastlyResult<Void, FastlyKVError> wait();\n\n  /// Fetch the handle for this pending request.\n  FastlyAsyncTask::Handle async_handle() const;\n};\n\nclass KVStorePendingList final {\npublic:\n  using Handle = uint32_t;\n\n  static constexpr Handle invalid = UINT32_MAX - 1;\n\n  Handle handle = invalid;\n\n  KVStorePendingList() = default;\n  explicit KVStorePendingList(Handle handle) : handle{handle} {}\n  explicit KVStorePendingList(FastlyAsyncTask async) : handle{async.handle()} {}\n\n  /// Block until the response is ready.\n  api::FastlyResult<HttpBody, FastlyKVError> wait();\n\n  /// Fetch the handle for this pending request.\n  FastlyAsyncTask::Handle async_handle() const;\n};\n\nclass KVStore final {\npublic:\n  using Handle = uint32_t;\n\n  static constexpr Handle invalid = UINT32_MAX - 1;\n\n  Handle handle = invalid;\n\n  KVStore() = default;\n  explicit KVStore(Handle handle) : handle{handle} {}\n\n  static Result<KVStore> open(std::string_view name);\n\n  enum InsertMode : uint32_t {\n    overwrite,\n    add,\n    append,\n    prepend,\n  };\n\n  Result<KVStorePendingLookup::Handle> lookup(std::string_view key);\n  Result<KVStorePendingInsert::Handle>\n  insert(std::string_view key, HttpBody body, std::optional<InsertMode> mode,\n         std::optional<uint64_t> if_generation_match,\n         std::optional<std::tuple<const uint8_t *, size_t>> metadata, std::optional<uint32_t> ttl);\n  Result<KVStorePendingDelete::Handle> delete_(std::string_view key);\n  // cursor is base64 encoding of the last key\n  Result<KVStorePendingList::Handle> list(std::optional<string_view> cursor,\n                                          std::optional<uint32_t> limit,\n                                          std::optional<string_view> prefix, bool eventual);\n};\n\nclass Acl final {\npublic:\n  using Handle = uint32_t;\n\n  static constexpr Handle invalid = UINT32_MAX - 1;\n\n  // Acl error type\n  enum class LookupError : uint32_t {\n    Uninitialized = FASTLY_ACL_ERROR_UNINITIALIZED,\n    Ok = FASTLY_ACL_ERROR_OK,\n    NoContent = FASTLY_ACL_ERROR_NO_CONTENT,\n    TooManyRequests = FASTLY_ACL_ERROR_TOO_MANY_REQUESTS\n  };\n\n  Handle handle = invalid;\n\n  Acl() = default;\n  explicit Acl(Handle handle) : handle{handle} {}\n\n  bool is_valid() const { return handle != invalid; }\n\n  static Result<std::optional<Acl>> open(std::string_view name);\n\n  /// Lookup an IP address in the ACL\n  Result<std::tuple<std::optional<HttpBody>, LookupError>>\n  lookup(std::span<uint8_t> ip_octets) const;\n};\n\nclass Compute final {\npublic:\n  static Result<uint64_t> get_vcpu_ms();\n  /// Purge the given surrogate key.\n  static Result<std::optional<HostString>> purge_surrogate_key(std::string_view key, bool soft);\n};\n\nvoid handle_api_error(JSContext *cx, uint8_t err, int line, const char *func);\nvoid handle_kv_error(JSContext *cx, host_api::FastlyKVError err, const unsigned int err_type,\n                     int line, const char *func);\nvoid handle_image_optimizer_error(JSContext *cx, const host_api::FastlyImageOptimizerError &err,\n                                  int line, const char *func);\n\nbool error_is_generic(APIError e);\nbool error_is_invalid_argument(APIError e);\nbool error_is_optional_none(APIError e);\nbool error_is_bad_handle(APIError e);\nbool error_is_unsupported(APIError e);\nbool error_is_buffer_len(APIError e);\nbool error_is_limit_exceeded(APIError e);\n\nvoid handle_fastly_error(JSContext *cx, APIError err, int line, const char *func);\n\n} // namespace host_api\n\n#endif\n"
  },
  {
    "path": "runtime/fastly/host-api/host_call.cpp",
    "content": "\n#include <type_traits>\n\n#include \"./fastly.h\"\n#include \"./host_api_fastly.h\"\n\nusing api::AsyncTask;\n\nnamespace fastly {\nconst JSErrorFormatString *FastlyGetErrorMessage(void *userRef, unsigned errorNumber) {\n  if (errorNumber > 0 && errorNumber < JSErrNum_Limit) {\n    return &fastly_ErrorFormatString[errorNumber];\n  }\n  return nullptr;\n}\n\n} // namespace fastly\n\nnamespace host_api {\n\nstatic_assert(std::is_same_v<APIError, fastly::fastly_host_error>);\n\nbool error_is_generic(APIError e) { return e == FASTLY_HOST_ERROR_GENERIC_ERROR; }\n\nbool error_is_invalid_argument(APIError e) { return e == FASTLY_HOST_ERROR_INVALID_ARGUMENT; }\n\nbool error_is_optional_none(APIError e) { return e == FASTLY_HOST_ERROR_OPTIONAL_NONE; }\n\nbool error_is_bad_handle(APIError e) { return e == FASTLY_HOST_ERROR_BAD_HANDLE; }\n\nbool error_is_unsupported(APIError e) { return e == FASTLY_HOST_ERROR_UNSUPPORTED; }\n\nbool error_is_buffer_len(APIError e) { return e == FASTLY_HOST_ERROR_BUFFER_LEN; }\n\nbool error_is_limit_exceeded(APIError e) { return e == FASTLY_HOST_ERROR_LIMIT_EXCEEDED; }\n\nvoid handle_kv_error(JSContext *cx, FastlyKVError err, const unsigned int err_type, int line,\n                     const char *func) {\n  // kv error was a host call error -> report as host error\n  if (err.detail == FastlyKVError::detail::host_error) {\n    return handle_api_error(cx, err.host_error, line, func);\n  }\n\n  // kv error is a normal kv error -> report as KV error\n  std::string message = std::move(err.message()).value_or(\"when attempting to fetch resource.\");\n  JS_ReportErrorNumberASCII(cx, fastly::FastlyGetErrorMessage, nullptr, err_type, message.c_str());\n}\n\nvoid handle_image_optimizer_error(JSContext *cx, const FastlyImageOptimizerError &err, int line,\n                                  const char *func) {\n  if (err.is_host_error) {\n    return handle_api_error(cx, err.host_err, line, func);\n  }\n\n  std::string message = err.message().value();\n  JS_ReportErrorUTF8(cx, \"[Image Optimizer] %s\", message.c_str());\n}\n\n/* Returns false if an exception is set on `cx` and the caller should\n   immediately return to propagate the exception. */\nvoid handle_api_error(JSContext *cx, APIError err, int line, const char *func) {\n  switch (err) {\n  case FASTLY_HOST_ERROR_GENERIC_ERROR:\n    JS_ReportErrorUTF8(cx,\n                       \"%s: Generic error value. This means that some unexpected error \"\n                       \"occurred during a hostcall.\\n\",\n                       func);\n\n    break;\n  case FASTLY_HOST_ERROR_INVALID_ARGUMENT:\n    JS_ReportErrorUTF8(cx, \"%s: Invalid argument.\\n\", func);\n    break;\n  case FASTLY_HOST_ERROR_BAD_HANDLE:\n    JS_ReportErrorUTF8(cx,\n                       \"%s: Invalid handle. Thrown when a request, response, dictionary, or \"\n                       \"body handle is not valid.\\n\",\n                       func);\n    break;\n  case FASTLY_HOST_ERROR_BUFFER_LEN:\n    JS_ReportErrorUTF8(cx, \"%s: Buffer length error. Buffer is too long.\\n\", func);\n    break;\n  case FASTLY_HOST_ERROR_UNSUPPORTED:\n    JS_ReportErrorUTF8(cx,\n                       \"%s: Unsupported operation error. This error is thrown \"\n                       \"when some operation cannot be performed, because it is \"\n                       \"not supported.\\n\",\n                       func);\n    break;\n  case FASTLY_HOST_ERROR_BAD_ALIGN:\n    JS_ReportErrorUTF8(cx,\n                       \"%s: Alignment error. This is thrown when a pointer does not point to \"\n                       \"a properly aligned slice of memory.\\n\",\n                       func);\n    break;\n  case FASTLY_HOST_ERROR_HTTP_INVALID:\n    JS_ReportErrorUTF8(cx,\n                       \"%s: HTTP parse error. This can be thrown when a method, URI, header, \"\n                       \"or status is not valid. This can also be thrown if a message head is \"\n                       \"too large.\\n\",\n                       func);\n    break;\n  case FASTLY_HOST_ERROR_HTTP_USER:\n    JS_ReportErrorUTF8(cx,\n                       \"%s: HTTP user error. This is thrown in cases where user code caused \"\n                       \"an HTTP error. For example, attempt to send a 1xx response code, or a \"\n                       \"request with a non-absolute URI. This can also be caused by an \"\n                       \"unexpected header: both `content-length` and `transfer-encoding`, for \"\n                       \"example.\\n\",\n                       func);\n    break;\n  case FASTLY_HOST_ERROR_HTTP_INCOMPLETE:\n    JS_ReportErrorUTF8(cx,\n                       \"%s: HTTP incomplete message error. A stream ended \"\n                       \"unexpectedly.\\n\",\n                       func);\n    break;\n  case FASTLY_HOST_ERROR_OPTIONAL_NONE:\n    JS_ReportErrorUTF8(cx,\n                       \"%s: A `None` error. This status code is used to \"\n                       \"indicate when an optional value did not exist, as \"\n                       \"opposed to an empty value.\\n\",\n                       func);\n    break;\n  case FASTLY_HOST_ERROR_HTTP_HEAD_TOO_LARGE:\n    JS_ReportErrorUTF8(cx,\n                       \"%s: HTTP head too large error. This error will be thrown when the \"\n                       \"message head is too large.\\n\",\n                       func);\n    break;\n  case FASTLY_HOST_ERROR_HTTP_INVALID_STATUS:\n    JS_ReportErrorUTF8(cx,\n                       \"%s: HTTP invalid status error. This error will be \"\n                       \"thrown when the HTTP message contains an invalid \"\n                       \"status code.\\n\",\n                       func);\n    break;\n  case FASTLY_HOST_ERROR_LIMIT_EXCEEDED:\n    JS_ReportErrorUTF8(cx,\n                       \"%s: Limit exceeded error. This error will be thrown when an attempt \"\n                       \"to allocate a resource has exceeded the maximum number of resources \"\n                       \"permitted. For example, creating too many response handles.\\n\",\n                       func);\n    break;\n  default:\n    fprintf(stdout, __FILE__ \":%d (%s)\\n\", line, func);\n    JS_ReportErrorUTF8(cx, \"Fastly error code %d\", err);\n  }\n}\n\n} // namespace host_api\n"
  },
  {
    "path": "runtime/fastly/patches/starlingmonkey-builtin-trace-finalize.patch",
    "content": "diff --git a/builtins/web/event/event-target.cpp b/builtins/web/event/event-target.cpp\nindex 610708a..be7e45e 100644\n--- a/builtins/web/event/event-target.cpp\n+++ b/builtins/web/event/event-target.cpp\n@@ -537,6 +537,13 @@ void EventTarget::finalize(JS::GCContext *gcx, JSObject *self) {\n \n void EventTarget::trace(JSTracer *trc, JSObject *self) {\n   MOZ_ASSERT(is_instance(self));\n+\n+  const JS::Value val = JS::GetReservedSlot(self, static_cast<size_t>(Slots::Listeners));\n+  if (val.isNullOrUndefined()) {\n+    // Nothing to trace\n+    return;\n+  }\n+\n   auto list = listeners(self);\n   list->trace(trc);\n }\ndiff --git a/builtins/web/form-data/form-data.cpp b/builtins/web/form-data/form-data.cpp\nindex d6f4892..4c59df2 100644\n--- a/builtins/web/form-data/form-data.cpp\n+++ b/builtins/web/form-data/form-data.cpp\n@@ -447,6 +447,13 @@ void FormData::finalize(JS::GCContext *gcx, JSObject *self) {\n \n void FormData::trace(JSTracer *trc, JSObject *self) {\n   MOZ_ASSERT(is_instance(self));\n+\n+  const JS::Value val = JS::GetReservedSlot(self, static_cast<size_t>(Slots::Entries));\n+  if (val.isNullOrUndefined()) {\n+    // Nothing to trace\n+    return;\n+  }\n+\n   auto entries = entry_list(self);\n   entries->trace(trc);\n }\ndiff --git a/builtins/web/url.cpp b/builtins/web/url.cpp\nindex 6f716b6..402c8c0 100644\n--- a/builtins/web/url.cpp\n+++ b/builtins/web/url.cpp\n@@ -726,8 +726,12 @@ JSObject *URL::create(JSContext *cx, JS::HandleObject self, JS::HandleValue url_\n }\n \n void URL::finalize(JS::GCContext *gcx, JSObject *self) {\n+  auto url_val = JS::GetReservedSlot(self, Slots::Url);\n+  if (url_val.isUndefined())\n+    return;\n+  \n   jsurl::JSUrl *url =\n-      static_cast<jsurl::JSUrl *>(JS::GetReservedSlot(self, Slots::Url).toPrivate());\n+      static_cast<jsurl::JSUrl *>(url_val.toPrivate());\n   jsurl::free_jsurl(url);\n }\n \ndiff --git a/include/builtin.h b/include/builtin.h\nindex ac04a2e..bf7719c 100644\n--- a/include/builtin.h\n+++ b/include/builtin.h\n@@ -177,17 +177,20 @@ inline bool ThrowIfNotConstructing(JSContext *cx, const CallArgs &args, const ch\n namespace builtins {\n \n template <typename Impl> class BuiltinImpl {\n-  static constexpr JSClassOps class_ops{};\n-  static constexpr uint32_t class_flags = 0;\n-\n   // A runtime registry for subclass JSClass pointers.\n   static inline std::vector<const JSClass *> registry;\n \n public:\n+  // Default class ops and flags. TraceableBuiltinImpl and FinalizableBuiltinImpl shadow these\n+  // with versions that wire up finalize/trace. BuiltinImpl::class_ uses Impl:: lookup so that\n+  // the most-derived definition in the inheritance chain is picked up.\n+  static constexpr JSClassOps class_ops{};\n+  static constexpr uint32_t class_flags = 0;\n+\n   static constexpr JSClass class_{\n       Impl::class_name,\n-      JSCLASS_HAS_RESERVED_SLOTS(static_cast<uint32_t>(Impl::Slots::Count)) | class_flags,\n-      &class_ops,\n+      JSCLASS_HAS_RESERVED_SLOTS(static_cast<uint32_t>(Impl::Slots::Count)) | Impl::class_flags,\n+      &Impl::class_ops,\n   };\n \n   static JS::Result<std::tuple<CallArgs, RootedObject *>>\n@@ -246,6 +249,7 @@ public:\n };\n \n template <typename Impl> class FinalizableBuiltinImpl : public BuiltinImpl<Impl> {\n+public:\n   static constexpr JSClassOps class_ops{\n       nullptr,        // addProperty\n       nullptr,        // delProperty\n@@ -262,6 +266,7 @@ template <typename Impl> class FinalizableBuiltinImpl : public BuiltinImpl<Impl>\n };\n \n template <typename Impl> class TraceableBuiltinImpl : public BuiltinImpl<Impl> {\n+public:\n   static constexpr JSClassOps class_ops{\n       nullptr,        // addProperty\n       nullptr,        // delProperty\n       "
  },
  {
    "path": "runtime/fastly/patches/starlingmonkey-reset.patch",
    "content": "diff --git a/include/extension-api.h b/include/extension-api.h\nindex 44935f7..79f13e5 100644\n--- a/include/extension-api.h\n+++ b/include/extension-api.h\n@@ -163,6 +163,7 @@ public:\n   void report_unhandled_promise_rejections();\n   void clear_unhandled_promise_rejections();\n \n+  void reset();\n   void abort(const char *reason);\n \n   bool debug_logging_enabled();\ndiff --git a/runtime/engine.cpp b/runtime/engine.cpp\nindex e748f93..1b3280d 100644\n--- a/runtime/engine.cpp\n+++ b/runtime/engine.cpp\n@@ -689,3 +689,9 @@ void Engine::report_unhandled_promise_rejections() {\n void Engine::clear_unhandled_promise_rejections() {\n   JS::SetClear(CONTEXT, unhandledRejectedPromises);\n }\n+void Engine::reset() {\n+  clear_unhandled_promise_rejections();\n+  core::EventLoop::reset(this);    \n+  JS::PrepareForFullGC(cx());\n+  JS::NonIncrementalGC(cx(), JS::GCOptions::Normal, JS::GCReason::API);\n+}\ndiff --git a/runtime/event_loop.cpp b/runtime/event_loop.cpp\nindex eb4909b..2412813 100644\n--- a/runtime/event_loop.cpp\n+++ b/runtime/event_loop.cpp\n@@ -98,4 +98,13 @@ bool EventLoop::run_event_loop(api::Engine *engine, double total_compute) {\n \n void EventLoop::init(JSContext *cx) { queue.init(cx); }\n \n+void EventLoop::reset(api::Engine *engine) {\n+  auto &q = queue.get();\n+  for (auto *task : q.tasks) {\n+    task->cancel(engine);\n+  }\n+  q.tasks.clear();\n+  q.interest_cnt = 0;\n+}\n+\n } // namespace core\ndiff --git a/runtime/event_loop.h b/runtime/event_loop.h\nindex 40b3696..5bf1ea3 100644\n--- a/runtime/event_loop.h\n+++ b/runtime/event_loop.h\n@@ -47,6 +47,12 @@ public:\n    * Remove a queued async task.\n    */\n   static bool cancel_async_task(api::Engine *engine, api::AsyncTask *task);\n+\n+  /**\n+   * Reset the event loop state, cancelling all pending tasks and clearing interest count.\n+   * Used between requests in reusable sandboxes.\n+   */\n+  static void reset(api::Engine *engine);\n };\n \n } // namespace core\n"
  },
  {
    "path": "runtime/rust-toolchain.toml",
    "content": "[toolchain]\nchannel = \"1.81.0\"\ntargets = [\"wasm32-wasip1\"]\nprofile = \"minimal\"\n"
  },
  {
    "path": "src/addSdkMetadataField.ts",
    "content": "import { metadataAdd } from '@bytecodealliance/jco';\nimport { readFile, writeFile } from 'node:fs/promises';\nimport { dirname, join } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nconst __dirname = dirname(fileURLToPath(import.meta.url));\n\nexport async function addSdkMetadataField(wasmPath: string, usingAOT: boolean) {\n  const packageJson = await readFile(join(__dirname, '../package.json'), {\n    encoding: 'utf-8',\n  });\n\n  const { name, version } = JSON.parse(packageJson) as {\n    name: string;\n    version: string;\n  };\n\n  let sdkName: string;\n  if (usingAOT) {\n    sdkName = name + ' (StarlingMonkey with Weval)';\n  } else {\n    sdkName = name + ' (StarlingMonkey)';\n  }\n\n  const metadata = [['sdk', [[sdkName, version]]]];\n  const wasm = await readFile(wasmPath);\n  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n  const newWasm: Uint8Array = await metadataAdd(wasm, metadata);\n  await writeFile(wasmPath, newWasm);\n}\n"
  },
  {
    "path": "src/cli/js-compute-runtime-cli.ts",
    "content": "#!/usr/bin/env node\n\nimport { parseInputs } from '../parseInputs.js';\nimport { printHelp, printVersion } from '../printHelp.js';\nimport { addSdkMetadataField } from '../addSdkMetadataField.js';\nimport { readConfigFileAndCliArguments } from '../config.js';\n\nconst argv = await readConfigFileAndCliArguments(process.argv.slice(2));\n\nconst parsedInputs = await parseInputs(argv);\n\nif (parsedInputs === 'version') {\n  await printVersion();\n} else if (parsedInputs === 'help') {\n  await printHelp();\n} else {\n  const {\n    enableAOT,\n    aotCache,\n    enableHttpCache,\n    enableExperimentalHighResolutionTimeMethods,\n    moduleMode,\n    bundle,\n    enableStackTraces,\n    excludeSources,\n    debugIntermediateFilesDir,\n    wasmEngine,\n    wevalBin,\n    input,\n    output,\n    env,\n  } = parsedInputs;\n\n  // This is a dynamic import because this import will throw an error\n  // if it does not have a pre-compiled version of Wizer available in the platform\n  // running the CLI. In that situation, we would still like the\n  // js-compute-runtime cli's --version and --help flags to work as\n  // it could be that the user is using an older version of js-compute-runtime\n  // and a newer version does not support the platform they are using.\n  const { compileApplicationToWasm } = await import(\n    '../compileApplicationToWasm.js'\n  );\n  await compileApplicationToWasm({\n    input,\n    output,\n    wasmEngine,\n    enableHttpCache,\n    enableExperimentalHighResolutionTimeMethods,\n    enableAOT,\n    aotCache,\n    enableStackTraces,\n    excludeSources,\n    debugIntermediateFilesDir,\n    wevalBin,\n    moduleMode,\n    doBundle: bundle,\n    env,\n  });\n  await addSdkMetadataField(output, enableAOT);\n}\n"
  },
  {
    "path": "src/compileApplicationToWasm.ts",
    "content": "import { dirname, sep, normalize } from 'node:path';\nimport { tmpdir, freemem } from 'node:os';\nimport {\n  spawnSync,\n  type SpawnSyncOptionsWithStringEncoding,\n} from 'node:child_process';\nimport { mkdir, readFile, mkdtemp } from 'node:fs/promises';\nimport { rmSync } from 'node:fs';\nimport weval from '@bytecodealliance/weval';\nimport wizer from '@bytecodealliance/wizer';\n\nimport { isDirectory, isFile } from './files.js';\nimport { CompilerContext } from './compilerPipeline.js';\nimport { bundleStep } from './compiler-steps/bundle.js';\nimport { precompileRegexesStep } from './compiler-steps/precompileRegexes.js';\nimport { addStackMappingHelpersStep } from './compiler-steps/addStackMappingHelpers.js';\nimport { addFastlyHelpersStep } from './compiler-steps/addFastlyHelpers.js';\nimport { composeSourcemapsStep } from './compiler-steps/composeSourcemaps.js';\n\nconst maybeWindowsPath =\n  process.platform === 'win32'\n    ? (path: string) => {\n        return '//?/' + path.replace(/\\\\/g, '/');\n      }\n    : (path: string) => path;\n\nasync function getTmpDir() {\n  return await mkdtemp(normalize(tmpdir() + sep));\n}\n\nexport type CompileApplicationToWasmParams = {\n  input: string;\n  output: string;\n  wasmEngine: string;\n  enableHttpCache: boolean;\n  enableExperimentalHighResolutionTimeMethods: boolean;\n  enableAOT: boolean;\n  aotCache: string;\n  enableStackTraces: boolean;\n  excludeSources: boolean;\n  debugIntermediateFilesDir: string | undefined;\n  wevalBin: string | undefined;\n  moduleMode: boolean;\n  doBundle: boolean;\n  env: Record<string, string>;\n};\n\nexport async function compileApplicationToWasm(\n  params: CompileApplicationToWasmParams,\n) {\n  const {\n    output,\n    wasmEngine,\n    enableHttpCache = false,\n    enableExperimentalHighResolutionTimeMethods = false,\n    enableAOT = false,\n    aotCache = '',\n    enableStackTraces,\n    excludeSources,\n    debugIntermediateFilesDir,\n    wevalBin,\n    moduleMode = false,\n    doBundle = false,\n    env,\n  } = params;\n\n  let input = params.input;\n\n  try {\n    if (!(await isFile(input))) {\n      console.error(\n        `Error: The \\`input\\` path does not point to a file: ${input}`,\n      );\n      process.exit(1);\n    }\n  } catch {\n    console.error(\n      `Error: The \\`input\\` path points to a non-existent file: ${input}`,\n    );\n    process.exit(1);\n  }\n\n  try {\n    await readFile(input, { encoding: 'utf-8' });\n  } catch (maybeError: unknown) {\n    const error =\n      maybeError instanceof Error ? maybeError : new Error(String(maybeError));\n    console.error(\n      `Error: Failed to open the \\`input\\` (${input})`,\n      error.message,\n    );\n    process.exit(1);\n  }\n\n  try {\n    if (!(await isFile(wasmEngine))) {\n      console.error(\n        `Error: The \\`wasmEngine\\` path does not point to a file: ${wasmEngine}`,\n      );\n      process.exit(1);\n    }\n  } catch {\n    console.error(\n      `Error: The \\`wasmEngine\\` path points to a non-existent file: ${wasmEngine}`,\n    );\n    process.exit(1);\n  }\n\n  // If output exists already, make sure it's not a directory\n  // (we'll try to overwrite it if it's a file)\n  try {\n    if (await isDirectory(output)) {\n      console.error(\n        `Error: The \\`output\\` path points to a directory: ${output}`,\n      );\n      process.exit(1);\n    }\n  } catch {\n    // Output doesn't exist\n  }\n\n  try {\n    await mkdir(dirname(output), {\n      recursive: true,\n    });\n  } catch (maybeError: unknown) {\n    const error =\n      maybeError instanceof Error ? maybeError : new Error(String(maybeError));\n    console.error(\n      `Error: Failed to create the \\`output\\` (${dirname(output)}) directory: ${output}`,\n      error.message,\n    );\n    process.exit(1);\n  }\n\n  if (debugIntermediateFilesDir != null) {\n    try {\n      console.log(\n        `Preparing \\`debug-intermediate-files\\` directory: ${debugIntermediateFilesDir}`,\n      );\n      await mkdir(debugIntermediateFilesDir, {\n        recursive: true,\n      });\n    } catch (maybeError: unknown) {\n      const error =\n        maybeError instanceof Error\n          ? maybeError\n          : new Error(String(maybeError));\n      console.error(\n        `Error: Failed to create the \\`debug-intermediate-files\\` (${debugIntermediateFilesDir}) directory`,\n        error.message,\n      );\n      process.exit(1);\n    }\n  }\n\n  const tmpDir = await getTmpDir();\n\n  try {\n    if (doBundle) {\n      const ctx = new CompilerContext(\n        input,\n        tmpDir,\n        debugIntermediateFilesDir,\n        moduleMode,\n        enableStackTraces,\n        excludeSources,\n      );\n\n      // bundle input -> apply esbuild (bundle package imports, apply Fastly Plugin)\n      ctx.addCompilerPipelineStep(bundleStep);\n\n      // precompile regexes\n      ctx.addCompilerPipelineStep(precompileRegexesStep);\n\n      // add stack mapping helpers\n      if (enableStackTraces) {\n        ctx.addCompilerPipelineStep(addStackMappingHelpersStep);\n      }\n\n      // add Fastly helpers\n      ctx.addCompilerPipelineStep(addFastlyHelpersStep);\n\n      // compile sourcemaps up to this point and inject into bundle\n      if (enableStackTraces) {\n        ctx.addCompilerPipelineStep(composeSourcemapsStep);\n      }\n\n      await ctx.applyCompilerPipeline();\n      await ctx.maybeWriteDebugIntermediateFile('fastly_bundle.js');\n\n      // the output of the pipeline is the Wizer/Weval input\n      input = ctx.outFilepath;\n    }\n\n    const spawnOpts = {\n      stdio: [null, process.stdout, process.stderr],\n      input: maybeWindowsPath(input),\n      shell: true,\n      encoding: 'utf-8',\n      env: {\n        ...env,\n        ENABLE_EXPERIMENTAL_HIGH_RESOLUTION_TIME_METHODS:\n          enableExperimentalHighResolutionTimeMethods ? '1' : '0',\n        ENABLE_EXPERIMENTAL_HTTP_CACHE: enableHttpCache ? '1' : '0',\n        RUST_MIN_STACK: String(\n          Math.max(8 * 1024 * 1024, Math.floor(freemem() * 0.1)),\n        ),\n      },\n    } satisfies SpawnSyncOptionsWithStringEncoding;\n\n    try {\n      if (!doBundle) {\n        if (enableAOT) {\n          const wevalPath = wevalBin ?? (await weval());\n\n          const wevalProcess = spawnSync(\n            `\"${wevalPath}\"`,\n            [\n              'weval',\n              '-v',\n              ...(aotCache ? [`--cache-ro ${aotCache}`] : []),\n              `--dir=\"${maybeWindowsPath(process.cwd())}\"`,\n              '-w',\n              `-i \"${wasmEngine}\"`,\n              `-o \"${output}\"`,\n            ],\n            spawnOpts,\n          );\n          if (wevalProcess.status !== 0) {\n            throw new Error(`Weval initialization failure`);\n          }\n          process.exitCode = wevalProcess.status;\n        } else {\n          const wizerProcess = spawnSync(\n            `\"${wizer}\"`,\n            [\n              '--allow-wasi',\n              `--wasm-bulk-memory=true`,\n              `--dir=\"${maybeWindowsPath(process.cwd())}\"`,\n              '--inherit-env=true',\n              '-r _start=wizer.resume',\n              `-o=\"${output}\"`,\n              `\"${wasmEngine}\"`,\n            ],\n            spawnOpts,\n          );\n          if (wizerProcess.status !== 0) {\n            throw new Error(`Wizer initialization failure`);\n          }\n          process.exitCode = wizerProcess.status;\n        }\n      } else {\n        spawnOpts.input = `${maybeWindowsPath(input)}${moduleMode ? '' : ' --legacy-script'}`;\n        if (enableAOT) {\n          const wevalPath = wevalBin ?? (await weval());\n\n          const wevalProcess = spawnSync(\n            `\"${wevalPath}\"`,\n            [\n              'weval',\n              '-v',\n              ...(aotCache ? [`--cache-ro ${aotCache}`] : []),\n              '--dir .',\n              `--dir ${maybeWindowsPath(dirname(input))}`,\n              '-w',\n              `-i \"${wasmEngine}\"`,\n              `-o \"${output}\"`,\n            ],\n            spawnOpts,\n          );\n          if (wevalProcess.status !== 0) {\n            throw new Error(`Weval initialization failure`);\n          }\n          process.exitCode = wevalProcess.status;\n        } else {\n          const wizerProcess = spawnSync(\n            `\"${wizer}\"`,\n            [\n              '--inherit-env=true',\n              '--allow-wasi',\n              '--dir=.',\n              `--dir=${maybeWindowsPath(dirname(input))}`,\n              '-r _start=wizer.resume',\n              `--wasm-bulk-memory=true`,\n              `-o=\"${output}\"`,\n              `\"${wasmEngine}\"`,\n            ],\n            spawnOpts,\n          );\n          if (wizerProcess.status !== 0) {\n            throw new Error(`Wizer initialization failure`);\n          }\n          process.exitCode = wizerProcess.status;\n        }\n      }\n    } catch (maybeError: unknown) {\n      const error =\n        maybeError instanceof Error\n          ? maybeError\n          : new Error(String(maybeError));\n      throw new Error(\n        `Error: Failed to compile JavaScript to Wasm:\\n${error.message}`,\n      );\n    }\n  } finally {\n    rmSync(tmpDir, { recursive: true });\n  }\n}\n"
  },
  {
    "path": "src/compiler-steps/addFastlyHelpers.ts",
    "content": "import { CompilerPipelineStep } from '../compilerPipeline.js';\n\n// Compiler Step - Add Fastly Helpers\n// This step usually runs last before composing sourcemaps.\n\nexport const addFastlyHelpersStep: CompilerPipelineStep = {\n  outFilename: '__fastly_helpers.js',\n  async fn(ctx, index) {\n    await ctx.magicStringWriter(this.outFilename, async (magicString) => {\n      // MISC HEADER\n      const SOURCE_FILE_NAME = 'fastly:app.js';\n      const STACK_MAPPING_HEADER = `\\\n//# sourceURL=${SOURCE_FILE_NAME}\nglobalThis.__FASTLY_GEN_FILE = \"${SOURCE_FILE_NAME}\";\nglobalThis.__orig_console_error = console.error.bind(console);\nglobalThis.__fastlyMapAndLogError = (e) => {\n  for (const line of globalThis.__fastlyMapError(e)) {\n    globalThis.__orig_console_error(line);\n  }\n};\nglobalThis.__fastlyMapError = (e) => {\n  return [\n    '(Raw error) - build with --enable-stack-traces for mapped stack information.',\n    e,\n  ];   \n};\n`;\n      magicString.prepend(STACK_MAPPING_HEADER);\n    });\n\n    await ctx.maybeWriteDebugIntermediateFiles(\n      `__${index + 1}_fastly_helpers.js`,\n    );\n  },\n};\n"
  },
  {
    "path": "src/compiler-steps/addStackMappingHelpers.ts",
    "content": "import { CompilerPipelineStep } from '../compilerPipeline.js';\n\n// Compiler Step - Add Stack Mapping Helpers\n// This step runs only when stack tracing is enabled, and\n// any time after bundling\n\nexport const addStackMappingHelpersStep: CompilerPipelineStep = {\n  outFilename: '__stack_mapping_helpers.js',\n  async fn(ctx, index) {\n    await ctx.magicStringWriter(this.outFilename, async (magicString) => {\n      // INSERT init guard\n      let initGuardPre, initGuardPost;\n      if (ctx.moduleMode) {\n        initGuardPre = `\\\nawait(async function __fastly_init_guard__() {\n`;\n        initGuardPost = `\\\n})().catch(e => {\nconsole.error('Unhandled error while running top level module code');\ntry { globalThis.__fastlyMapAndLogError(e); } catch { /* swallow */ }\nconsole.error('Raw error below:');\nthrow e;\n});\n`;\n      } else {\n        initGuardPre = `\\\n(function __fastly_init_guard__() { try {\n`;\n        initGuardPost = `\\\n} catch (e) {\nconsole.error('Unhandled error while running top level script');\ntry { globalThis.__fastlyMapAndLogError(e); } catch { /* swallow */ }\nconsole.error('Raw error below:');\nthrow e;\n}\n})();\n`;\n      }\n\n      magicString.prepend(initGuardPre);\n      magicString.append(initGuardPost);\n\n      // SOURCE MAPPING HEADER\n      const STACK_MAPPING_HEADER = `\\\nglobalThis.__FASTLY_SOURCE_MAP = JSON.parse(__FINAL_SOURCE_MAP__);\n`;\n      magicString.prepend(STACK_MAPPING_HEADER);\n    });\n\n    await ctx.maybeWriteDebugIntermediateFiles(\n      `__${index + 1}_stack_mapping_helpers.js`,\n    );\n  },\n};\n"
  },
  {
    "path": "src/compiler-steps/bundle.ts",
    "content": "import { dirname, basename, resolve } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { build } from 'esbuild';\n\nimport { moveFile } from '../files.js';\nimport { CompilerPipelineStep } from '../compilerPipeline.js';\nimport { fastlyPlugin } from '../esbuild-plugins/fastlyPlugin.js';\nimport { swallowTopLevelExportsPlugin } from '../esbuild-plugins/swallowTopLevelExportsPlugin.js';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = dirname(__filename);\n\n// Compiler Step - bundle\n// This step usually runs first.\n\n// Runs esbuild:\n// - bundles imported modules\n// - applies the Fastly plugin, which resolves fastly:* imports\n// - applies the Top level exports plugin, allowing top level file to contain any exports.\n// - sets the named condition 'fastly'\n\n// If stack traces are enabled:\n// - injects 'trace-mapping.inject.js', which contains error mapping code\n// - enables source maps and writes it as an external file\n\nexport const bundleStep: CompilerPipelineStep = {\n  outFilename: '__input_bundled.js',\n  async fn(ctx, index) {\n    // esbuild respects input source map, works if it's linked via sourceMappingURL\n    // either inline or as separate file\n    try {\n      const bundleFilename = basename(ctx.outFilepath);\n\n      // Put build() output in cwd to build bundle and sourcemap with correct paths\n      const outfile = resolve(bundleFilename);\n\n      const plugins = [fastlyPlugin];\n      if (ctx.moduleMode) {\n        plugins.push(swallowTopLevelExportsPlugin({ entry: ctx.inFilepath }));\n      }\n\n      const inject = [];\n      if (ctx.enableStackTraces) {\n        inject.push(resolve(__dirname, '../../rsrc/trace-mapping.inject.js'));\n      }\n\n      await build({\n        conditions: ['fastly'],\n        entryPoints: [ctx.inFilepath],\n        bundle: true,\n        write: true,\n        outfile,\n        sourcemap: ctx.enableStackTraces ? 'external' : undefined,\n        sourcesContent: ctx.enableStackTraces ? true : undefined,\n        format: ctx.moduleMode ? 'esm' : 'iife',\n        tsconfig: undefined,\n        plugins,\n        inject,\n      });\n\n      // Move build() output to outFilepath\n      await moveFile(outfile, ctx.outFilepath);\n      if (ctx.enableStackTraces) {\n        await moveFile(outfile + '.map', ctx.outFilepath + '.map');\n        ctx.sourceMaps.push({\n          f: this.outFilename,\n          s: ctx.outFilepath + '.map',\n        });\n      }\n    } catch (maybeError: unknown) {\n      const error =\n        maybeError instanceof Error\n          ? maybeError\n          : new Error(String(maybeError));\n      console.error(`Error:`, error.message);\n      process.exit(1);\n    }\n\n    await ctx.maybeWriteDebugIntermediateFiles(`__${index + 1}_bundled.js`);\n  },\n};\n"
  },
  {
    "path": "src/compiler-steps/composeSourcemaps.ts",
    "content": "import { readFile, writeFile } from 'node:fs/promises';\nimport { resolve } from 'node:path';\nimport remapping, {\n  SourceMap,\n  type SourceMapInput,\n  type SourceMapLoader,\n} from '@jridgewell/remapping';\nimport { TraceMap } from '@jridgewell/trace-mapping';\nimport picomatch from 'picomatch';\n\nimport { CompilerPipelineStep, SourceMapInfo } from '../compilerPipeline.js';\n\nexport type ExcludePattern = string | ((file: string) => boolean);\n\n// Compiler Step - Compose Sourcemaps\n// This step usually runs at the end.\n\n// This step composes all the source maps up to this point into a single\n// source map, and injects it into the bundle.\n\n// Be careful: Do not run any steps after this step. Such steps will not be\n// reflected in downstream source maps.\n\nexport const composeSourcemapsStep: CompilerPipelineStep = {\n  outFilename: '__fastly_bundle_with_sourcemaps.js',\n  async fn(ctx) {\n    // Compose source maps\n    const replaceSourceMapToken = '__FINAL_SOURCE_MAP__';\n    let excludePatterns: ExcludePattern[] = [\n      'forbid-entry:/**',\n      'node_modules/**',\n    ];\n    if (ctx.excludeSources) {\n      excludePatterns = [() => true];\n    }\n    const composed = await composeSourcemaps(ctx.sourceMaps, excludePatterns);\n\n    const postBundleContent = await readFile(ctx.inFilepath, {\n      encoding: 'utf-8',\n    });\n    const outputWithSourcemapsContent = postBundleContent.replace(\n      replaceSourceMapToken,\n      () => JSON.stringify(composed),\n    );\n    await writeFile(ctx.outFilepath, outputWithSourcemapsContent);\n\n    if (ctx.debugIntermediateFilesDir != null) {\n      await writeFile(\n        resolve(ctx.debugIntermediateFilesDir, 'fastly_sourcemaps.json'),\n        composed,\n      );\n    }\n  },\n};\n\nasync function readSourcemap(e: SourceMapInfo) {\n  const sourceMapJson = await readFile(e.s, { encoding: 'utf-8' });\n  return JSON.parse(sourceMapJson) as SourceMapInput;\n}\n\nexport async function composeSourcemaps(\n  sourceMaps: SourceMapInfo[],\n  excludePatterns: ExcludePattern[] = [],\n) {\n  const topSourceMap = sourceMaps.pop();\n  if (topSourceMap == null) {\n    throw new Error(\n      'Unexpected: composeSourcemaps received empty sourceMaps array.',\n    );\n  }\n\n  const top = new TraceMap(await readSourcemap(topSourceMap));\n\n  const priors: Record<string, SourceMapInput> = {};\n  for (const sourceMap of sourceMaps) {\n    priors[sourceMap.f] = await readSourcemap(sourceMap);\n  }\n\n  // Loader: given a source name from mapXZ, return a TraceMap for that source (if any).\n  const loader: SourceMapLoader = (source) => {\n    const m = priors[source];\n    if (!m) return null; // no earlier map for this source\n    return new TraceMap(m);\n  };\n\n  const raw = JSON.parse(remapping(top, loader, false).toString()) as SourceMap;\n\n  return JSON.stringify(stripSourcesContent(raw, excludePatterns));\n}\n\nfunction stripSourcesContent(map: SourceMap, excludes: ExcludePattern[]) {\n  if (map.sourcesContent == null) {\n    return map;\n  }\n\n  const matchers = excludes.map((p) =>\n    typeof p === 'string' ? picomatch(p) : p,\n  );\n\n  for (let i = 0; i < map.sources.length; i++) {\n    const src = map.sources[i];\n\n    // [Windows] normalize slashes\n    const normalized = src?.replace(/\\\\/g, '/');\n\n    if (normalized == null || matchers.some((fn) => fn(normalized))) {\n      map.sourcesContent[i] = null;\n    }\n  }\n\n  return map;\n}\n"
  },
  {
    "path": "src/compiler-steps/precompileRegexes.ts",
    "content": "import { parse } from 'acorn';\nimport { simple as simpleWalk } from 'acorn-walk';\nimport regexpuc from 'regexpu-core';\n\nimport { CompilerPipelineStep } from '../compilerPipeline.js';\n\n// Compiler Step - Precompile regexes\n// This step runs any time after bundling\n\nexport const precompileRegexesStep: CompilerPipelineStep = {\n  outFilename: '__fastly_precompiled_regexes.js',\n  async fn(ctx, index) {\n    await ctx.magicStringWriter(\n      this.outFilename,\n      async (magicString, source) => {\n        // PRECOMPILE REGEXES\n        // Emit a block of JavaScript that will pre-compile the regular expressions given.\n        // As SpiderMonkey will intern regular expressions, duplicating them at the top\n        // level and testing them with both an ascii and utf8 string should ensure that\n        // they won't be re-compiled when run in the fetch handler.\n        const PREAMBLE = `(function(){\n  // Precompiled regular expressions\n  const precompile = (r) => { r.exec('a'); r.exec('\\\\u1000'); };`;\n        const POSTAMBLE = '})();';\n\n        const ast = parse(source, {\n          ecmaVersion: 'latest',\n          sourceType: ctx.moduleMode ? 'module' : 'script',\n        });\n\n        const precompileCalls: string[] = [];\n        simpleWalk(ast, {\n          Literal(node) {\n            if (!node.regex) return;\n            let transpiledPattern;\n            try {\n              transpiledPattern = regexpuc(\n                node.regex.pattern,\n                node.regex.flags,\n                {\n                  unicodePropertyEscapes: 'transform',\n                },\n              );\n            } catch {\n              // swallow regex parse errors here to instead throw them at the engine level\n              // this then also avoids regex parser bugs being thrown unnecessarily\n              transpiledPattern = node.regex.pattern;\n            }\n            const transpiledRegex = `/${transpiledPattern}/${node.regex.flags}`;\n            precompileCalls.push(`precompile(${transpiledRegex});`);\n            magicString.overwrite(node.start, node.end, transpiledRegex);\n          },\n        });\n\n        if (precompileCalls.length) {\n          magicString.prepend(\n            `${PREAMBLE}${precompileCalls.join('')}${POSTAMBLE}\\n`,\n          );\n        }\n      },\n    );\n\n    await ctx.maybeWriteDebugIntermediateFiles(\n      `__${index + 1}_precompiled_regexes.js`,\n    );\n  },\n};\n"
  },
  {
    "path": "src/compilerPipeline.ts",
    "content": "import { copyFile, readFile, writeFile } from 'node:fs/promises';\nimport { basename, resolve } from 'node:path';\nimport MagicString from 'magic-string';\nimport { pipeline } from './pipeline.js';\n\nexport type SourceMapInfo = {\n  f: string; // Filename\n  s: string; // Sourcemap filename\n};\n\nexport class CompilerContext {\n  inFilepath: string;\n  outFilepath: string;\n  tmpDir: string;\n  debugIntermediateFilesDir: string | undefined;\n  sourceMaps: SourceMapInfo[];\n  moduleMode: boolean;\n  enableStackTraces: boolean;\n  excludeSources: boolean;\n  compilerPipelineSteps: CompilerPipelineStep[];\n\n  constructor(\n    input: string,\n    tmpDir: string,\n    debugIntermediateFilesDir: string | undefined,\n    moduleMode: boolean,\n    enableStackTraces: boolean,\n    excludeSources: boolean,\n  ) {\n    this.inFilepath = input;\n    this.outFilepath = ''; // This is filled in by the eventual steps of the compiler\n    this.tmpDir = tmpDir;\n    this.debugIntermediateFilesDir = debugIntermediateFilesDir;\n    this.sourceMaps = [];\n    this.moduleMode = moduleMode;\n    this.enableStackTraces = enableStackTraces;\n    this.excludeSources = excludeSources;\n    this.compilerPipelineSteps = [];\n  }\n\n  addCompilerPipelineStep(step: CompilerPipelineStep) {\n    this.compilerPipelineSteps.push(step);\n  }\n\n  async applyCompilerPipeline() {\n    await pipeline<CompilerContext>(\n      this.compilerPipelineSteps.map(\n        (step) => async (args: CompilerContext, index) => {\n          await step.fn.call(step, args, index);\n          return args;\n        },\n      ),\n      this,\n      {\n        beforeStep: (args: CompilerContext, index: number) => {\n          const step = this.compilerPipelineSteps[index];\n          args.outFilepath = resolve(this.tmpDir, step.outFilename);\n        },\n        afterStep: (args: CompilerContext) => {\n          args.inFilepath = args.outFilepath;\n        },\n      },\n    );\n  }\n\n  async magicStringWriter(\n    filename: string,\n    fn: (magicString: MagicString, source: string) => void | Promise<void>,\n  ) {\n    const source = await readFile(this.inFilepath, { encoding: 'utf8' });\n    const magicString = new MagicString(source);\n\n    await fn(magicString, source);\n\n    await writeFile(this.outFilepath, magicString.toString());\n\n    if (this.enableStackTraces != null) {\n      const map = magicString.generateMap({\n        source: basename(this.inFilepath),\n        hires: true,\n        includeContent: true,\n      });\n\n      await writeFile(this.outFilepath + '.map', map.toString());\n      this.sourceMaps.push({ f: filename, s: this.outFilepath + '.map' });\n    }\n  }\n\n  async maybeWriteDebugIntermediateFile(outFilename: string) {\n    if (this.debugIntermediateFilesDir != null) {\n      await copyFile(\n        this.outFilepath,\n        resolve(this.debugIntermediateFilesDir, outFilename),\n      );\n    }\n  }\n\n  async maybeWriteDebugIntermediateSourceMapFile(outFilename: string) {\n    if (this.enableStackTraces && this.debugIntermediateFilesDir != null) {\n      await copyFile(\n        this.outFilepath + '.map',\n        resolve(this.debugIntermediateFilesDir, outFilename),\n      );\n    }\n  }\n\n  async maybeWriteDebugIntermediateFiles(outFilename: string) {\n    await this.maybeWriteDebugIntermediateFile(outFilename);\n    await this.maybeWriteDebugIntermediateSourceMapFile(outFilename + '.map');\n  }\n}\n\nexport type CompilerPipelineStep = {\n  outFilename: string;\n  fn: (\n    this: CompilerPipelineStep,\n    args: CompilerContext,\n    index: number,\n  ) => void | PromiseLike<void>;\n};\n"
  },
  {
    "path": "src/config.ts",
    "content": "import { cosmiconfig } from 'cosmiconfig';\n\nconst additiveOptionsMap = {\n  env: '--env',\n};\n\nconst strictOptionsMap = {\n  enableAOT: '--enable-aot',\n  aotCache: '--aot-cache',\n  enableHttpCache: '--enable-http-cache',\n  enableExperimentalHighResolutionTimeMethods:\n    '--enable-experimental-high-resolution-time-methods',\n  enableExperimentalTopLevelAwait: '--enable-experimental-top-level-await',\n  enableStackTraces: '--enable-stack-traces',\n  excludeSources: '--exclude-sources',\n  debugIntermediateFiles: '--debug-intermediate-files',\n  debugBuild: '--debug-build',\n  engineWasm: '--engine-wasm',\n  wevalBin: '--weval-bin',\n};\n\nexport async function readConfigFileAndCliArguments(cliArgs: string[]) {\n  const explorer = cosmiconfig('fastlycompute');\n  const result = await explorer.search();\n  if (!result?.config) {\n    return cliArgs;\n  }\n\n  const config = result.config as Record<\n    string,\n    string | boolean | object | (string | boolean | object)[]\n  >;\n  const synthesizedArgs: string[] = [];\n\n  // --- Loop 1: Additive Options (Array-Normalized) ---\n  for (const [configKey, flag] of Object.entries(additiveOptionsMap)) {\n    const val = config[configKey];\n    if (val === undefined || val === null) continue;\n\n    // Wrap in an array if it isn't one already\n    const items = (Array.isArray(val) ? val : [val]) as (\n      | string\n      | boolean\n      | object\n    )[];\n\n    for (const item of items) {\n      if (typeof item === 'object' && item !== null) {\n        // Handle: { \"FOO\": \"bar\" } -> --env FOO=bar\n        for (const [k, v] of Object.entries(item)) {\n          synthesizedArgs.push(flag, `${k}=${v}`);\n        }\n      } else {\n        // Handle: \"A,B\" -> --env A,B\n        synthesizedArgs.push(flag, String(item));\n      }\n    }\n  }\n\n  // --- Loop 2: Strict Options (Override Check) ---\n  for (const [configKey, flag] of Object.entries(strictOptionsMap)) {\n    const val = config[configKey];\n    if (val === undefined || val === null) continue;\n\n    const isOverridden = cliArgs.some(\n      (arg) => arg === flag || arg.startsWith(`${flag}=`),\n    );\n\n    if (!isOverridden) {\n      if (typeof val === 'boolean' && val) {\n        synthesizedArgs.push(flag);\n      } else if (typeof val === 'string' || typeof val === 'number') {\n        synthesizedArgs.push(flag, String(val));\n      }\n    }\n  }\n\n  return [...synthesizedArgs, ...cliArgs];\n}\n"
  },
  {
    "path": "src/env.ts",
    "content": "// env.js\nfunction parseEnvPair(pair: string) {\n  const trimmedPair = pair.trim();\n\n  // If no '=', treat as a variable to inherit\n  if (!trimmedPair.includes('=')) {\n    const value = process.env[trimmedPair];\n    if (value === undefined) {\n      return undefined;\n    }\n    console.warn(\n      `Writing ${trimmedPair} environment variable into the runtime from the current process environment`,\n    );\n    return [trimmedPair, value];\n  }\n\n  const matches = /^([^=]+)=(.*)$/.exec(trimmedPair);\n  if (!matches) {\n    throw new Error(\n      `Invalid environment variable format: ${trimmedPair}\\nMust be in format KEY=VALUE or an existing environment variable name`,\n    );\n  }\n\n  const key = matches[1].trim();\n  const value = matches[2];\n\n  if (!key) {\n    throw new Error(\n      `Invalid environment variable format: ${trimmedPair}\\nMust be in format KEY=VALUE or an existing environment variable name`,\n    );\n  }\n\n  return [key, value];\n}\n\nfunction parseEnvString(envString: string) {\n  const result: Record<string, string> = {};\n\n  // Split on unescaped commas and filter out empty strings\n  const pairs = envString\n    .split(/(?<!\\\\),/) // Split on commas that aren't preceded by backslash\n    .map((s) => s.replace(/\\\\,/g, ',')) // Replace escaped commas with regular commas\n    .filter(Boolean);\n\n  // Parse each pair into the result object\n  for (const pair of pairs) {\n    const res = parseEnvPair(pair);\n    if (res === undefined) {\n      continue;\n    }\n    const [key, value] = res;\n    result[key] = value;\n  }\n\n  return result;\n}\n\nexport class EnvParser {\n  env: Record<string, string>;\n\n  constructor() {\n    this.env = {};\n  }\n\n  /**\n   * Parse environment variables string, which can be either KEY=VALUE pairs\n   * or names of environment variables to inherit\n   * @param {string} value - The environment variable string to parse\n   */\n  parse(value: string) {\n    if (!value) {\n      throw new Error(\n        'Invalid environment variable format: \\nMust be in format KEY=VALUE or an existing environment variable name',\n      );\n    }\n    const newEnv = parseEnvString(value);\n    this.env = { ...this.env, ...newEnv };\n  }\n\n  /**\n   * Get the parsed environment variables\n   * @returns {Object} The environment variables object\n   */\n  getEnv() {\n    return this.env;\n  }\n}\n"
  },
  {
    "path": "src/esbuild-plugins/fastlyPlugin.ts",
    "content": "import { type Plugin } from 'esbuild';\n\nexport const fastlyPlugin: Plugin = {\n  name: 'fastly',\n  setup(build) {\n    build.onResolve({ filter: /^fastly:.*/ }, (args) => {\n      return {\n        path: args.path.replace('fastly:', ''),\n        namespace: 'fastly',\n      };\n    });\n    build.onLoad({ filter: /^.*/, namespace: 'fastly' }, async (args) => {\n      switch (args.path) {\n        case 'acl': {\n          return {\n            contents: `export const Acl = globalThis.Acl;`,\n          };\n        }\n        case 'backend': {\n          return {\n            contents: `\nexport const Backend = globalThis.Backend;\nexport const setDefaultDynamicBackendConfig = Object.getOwnPropertyDescriptor(globalThis.fastly, 'allowDynamicBackends').set;\nconst allowDynamicBackends = Object.getOwnPropertyDescriptor(globalThis.fastly, 'allowDynamicBackends').set;\nexport const setDefaultBackend = Object.getOwnPropertyDescriptor(globalThis.fastly, 'defaultBackend').set;\nexport function enforceExplicitBackends (defaultBackend) {\n  allowDynamicBackends(false);\n  if (defaultBackend) setDefaultBackend(defaultBackend);\n}\n`,\n          };\n        }\n        case 'body': {\n          return {\n            contents: `export const FastlyBody = globalThis.FastlyBody;`,\n          };\n        }\n        case 'cache-override': {\n          return {\n            contents: `export const CacheOverride = globalThis.CacheOverride;`,\n          };\n        }\n        case 'config-store': {\n          return {\n            contents: `export const ConfigStore = globalThis.ConfigStore;`,\n          };\n        }\n        case 'dictionary': {\n          return {\n            contents: `export const Dictionary = globalThis.Dictionary;`,\n          };\n        }\n        case 'device': {\n          return { contents: `export const Device = globalThis.Device;` };\n        }\n        case 'edge-rate-limiter': {\n          return {\n            contents: `\nexport const RateCounter = globalThis.RateCounter;\nexport const PenaltyBox = globalThis.PenaltyBox;\nexport const EdgeRateLimiter = globalThis.EdgeRateLimiter;\n`,\n          };\n        }\n        case 'env': {\n          return { contents: `export const env = globalThis.fastly.env.get;` };\n        }\n        case 'experimental': {\n          return {\n            contents: `\nexport const includeBytes = globalThis.fastly.includeBytes;\nexport const enableDebugLogging = globalThis.fastly.enableDebugLogging;\nexport const setBaseURL = Object.getOwnPropertyDescriptor(globalThis.fastly, 'baseURL').set;\nexport const setDefaultBackend = Object.getOwnPropertyDescriptor(globalThis.fastly, 'defaultBackend').set;\nexport const allowDynamicBackends = Object.getOwnPropertyDescriptor(globalThis.fastly, 'allowDynamicBackends').set;\nexport const sdkVersion = globalThis.fastly.sdkVersion;\nexport const mapAndLogError = (e) => globalThis.__fastlyMapAndLogError(e);\nexport const mapError = (e) => globalThis.__fastlyMapError(e);\nexport const setReusableSandboxOptions = globalThis.fastly.setReusableSandboxOptions;\n`,\n          };\n        }\n        case 'fanout': {\n          return {\n            contents: `export const createFanoutHandoff = globalThis.fastly.createFanoutHandoff;`,\n          };\n        }\n        case 'websocket': {\n          return {\n            contents: `export const createWebsocketHandoff = globalThis.fastly.createWebsocketHandoff;`,\n          };\n        }\n        case 'geolocation': {\n          return {\n            contents: `export const getGeolocationForIpAddress = globalThis.fastly.getGeolocationForIpAddress;`,\n          };\n        }\n        case 'logger': {\n          return {\n            contents: `export const Logger = globalThis.Logger;\nexport const configureConsole = Logger.configureConsole;\ndelete globalThis.Logger.configureConsole;\n`,\n          };\n        }\n        case 'kv-store': {\n          return { contents: `export const KVStore = globalThis.KVStore;` };\n        }\n        case 'secret-store': {\n          return {\n            contents: `export const SecretStore = globalThis.SecretStore;export const SecretStoreEntry = globalThis.SecretStoreEntry;`,\n          };\n        }\n        case 'cache': {\n          return {\n            contents: `\nexport const CacheEntry = globalThis.CacheEntry;\nexport const CacheState = globalThis.CacheState;\nexport const CoreCache = globalThis.CoreCache;\nexport const SimpleCache = globalThis.SimpleCache;\nexport const SimpleCacheEntry = globalThis.SimpleCacheEntry;\nexport const TransactionCacheEntry = globalThis.TransactionCacheEntry;\n`,\n          };\n        }\n        case 'compute': {\n          return {\n            contents: `export const { purgeSurrogateKey, vCpuTime } = globalThis.fastly;`,\n          };\n        }\n        case 'html-rewriter': {\n          return {\n            contents: `export const HTMLRewritingStream = globalThis.HTMLRewritingStream;`,\n          };\n        }\n        case 'image-optimizer': {\n          return {\n            contents: `export const { \n              Region, Auto, Format, BWAlgorithm, Disable, Enable, Fit, Metadata, \n              Optimize, Orient, Profile, ResizeFilter, CropMode, optionsToQueryString\n            } = globalThis.fastly.imageOptimizer;`,\n          };\n        }\n        case 'shielding': {\n          return {\n            contents: `export const {\n              Shield\n            } = globalThis.fastly.shielding;`,\n          };\n        }\n        case 'security': {\n          return {\n            contents: `export const inspect = globalThis.fastly.inspect;`,\n          };\n        }\n      }\n    });\n  },\n};\n"
  },
  {
    "path": "src/esbuild-plugins/swallowTopLevelExportsPlugin.ts",
    "content": "import { dirname, isAbsolute, resolve } from 'node:path';\nimport { type Plugin } from 'esbuild';\n\nexport type SwallowTopLevelExportsPluginParams = {\n  entry?: string;\n};\n\nexport function swallowTopLevelExportsPlugin(\n  opts?: SwallowTopLevelExportsPluginParams,\n): Plugin {\n  const { entry } = opts ?? {};\n\n  const name = 'swallow-top-level-exports';\n  const namespace = 'swallow-top-level';\n  if (!entry) throw new Error(`[${name}] You must provide opts.entry`);\n\n  // Normalize once so our onResolve comparison is exact.\n  const normalizedEntry = resolve(entry);\n\n  return {\n    name,\n    setup(build) {\n      build.onResolve({ filter: /.*/ }, (args) => {\n        const maybeEntry = isAbsolute(args.path)\n          ? args.path\n          : resolve(args.resolveDir || process.cwd(), args.path);\n        if (args.kind === 'entry-point' && maybeEntry === normalizedEntry) {\n          return { path: normalizedEntry, namespace };\n        }\n        return null;\n      });\n      build.onLoad({ filter: /.*/, namespace }, (args) => {\n        // Generate a JS wrapper that imports the real entry\n        // This swallows the top level exports for the entry file\n        // and runs any side effects, such as addEventListener().\n        return {\n          contents: `import ${JSON.stringify(args.path)};`,\n          loader: 'js',\n          resolveDir: dirname(args.path),\n        };\n      });\n    },\n  };\n}\n"
  },
  {
    "path": "src/files.ts",
    "content": "import { stat, rename, copyFile, unlink } from 'node:fs/promises';\nimport { resolve } from 'node:path';\n\nexport async function isFile(path: string) {\n  const stats = await stat(path);\n  return stats.isFile();\n}\n\nexport async function isDirectory(path: string) {\n  const stats = await stat(path);\n  return stats.isDirectory();\n}\n\nexport async function moveFile(src: string, dest: string): Promise<void> {\n  try {\n    await rename(src, dest);\n  } catch (err: unknown) {\n    if (!isErrnoException(err) || err.code !== 'EXDEV') {\n      throw err;\n    }\n\n    // Cross-device move: copy + delete\n    await copyFile(src, dest);\n    await unlink(src);\n  }\n}\n\nfunction isErrnoException(err: unknown): err is NodeJS.ErrnoException {\n  return (\n    typeof err === 'object' &&\n    err !== null &&\n    'code' in err &&\n    typeof err.code === 'string'\n  );\n}\n"
  },
  {
    "path": "src/index.ts",
    "content": "export {};\n"
  },
  {
    "path": "src/parseInputs.ts",
    "content": "import { fileURLToPath } from 'node:url';\nimport { dirname, join, isAbsolute } from 'node:path';\nimport { tooManyEngines, unknownArgument } from './printHelp.js';\nimport { EnvParser } from './env.js';\n\nexport type ParsedInputs =\n  | 'help'\n  | 'version'\n  | {\n      enableAOT: boolean;\n      aotCache: string;\n      enableHttpCache: boolean;\n      enableExperimentalHighResolutionTimeMethods: boolean;\n      moduleMode: boolean;\n      bundle: boolean;\n      enableStackTraces: boolean;\n      excludeSources: boolean;\n      debugIntermediateFilesDir: string | undefined;\n      wasmEngine: string;\n      wevalBin: string | undefined;\n      input: string;\n      output: string;\n      env: Record<string, string>;\n    };\n\nexport async function parseInputs(cliInputs: string[]): Promise<ParsedInputs> {\n  const __dirname = dirname(fileURLToPath(import.meta.url));\n\n  let enableHttpCache = false;\n  let enableExperimentalHighResolutionTimeMethods = false;\n  let enableAOT = false;\n  let customEngineSet = false;\n  let moduleMode = false;\n  let bundle = true;\n  let wasmEngine = join(__dirname, '../fastly.wasm');\n  let aotCache = join(__dirname, '../fastly-ics.wevalcache');\n  let customInputSet = false;\n  let input = join(process.cwd(), 'bin/index.js');\n  let customOutputSet = false;\n  let output = join(process.cwd(), 'bin/main.wasm');\n  let enableStackTraces = false;\n  let excludeSources = false;\n  let debugIntermediateFilesDir = undefined;\n  let wevalBin = undefined;\n  let cliInput;\n\n  const envParser = new EnvParser();\n\n  loop: while ((cliInput = cliInputs.shift())) {\n    switch (cliInput) {\n      case '--': {\n        break loop;\n      }\n      case '--env': {\n        let value = cliInputs.shift();\n        if (!value) {\n          console.error('Error: --env requires a KEY=VALUE pair');\n          process.exit(1);\n        }\n        // If value ends with comma, it's a continuation\n        while (\n          value.endsWith(',') &&\n          cliInputs.length > 0 &&\n          !cliInputs[0].startsWith('-')\n        ) {\n          value = value + cliInputs.shift();\n        }\n        envParser.parse(value);\n        break;\n      }\n      case '--enable-experimental-high-resolution-time-methods': {\n        enableExperimentalHighResolutionTimeMethods = true;\n        break;\n      }\n      case '--module-mode': {\n        moduleMode = true;\n        bundle = false;\n        break;\n      }\n      case '--enable-http-cache': {\n        enableHttpCache = true;\n        break;\n      }\n      case '--enable-experimental-top-level-await': {\n        moduleMode = true;\n        bundle = true;\n        break;\n      }\n      case '--enable-aot': {\n        enableAOT = true;\n        break;\n      }\n      case '--enable-experimental-aot': {\n        console.error(\n          'Warning: --enable-experimental-aot flag is now --enable-aot. The old flag continues\\n' +\n            'to work for now, but please update your build invocation!',\n        );\n        enableAOT = true;\n        break;\n      }\n      case '-V':\n      case '--version': {\n        return 'version';\n      }\n      case '-h':\n      case '--help': {\n        return 'help';\n      }\n      case '--starlingmonkey': {\n        break;\n      }\n      case '--debug-build': {\n        wasmEngine = join(__dirname, '../fastly.debug.wasm');\n        console.log('Building with the debug engine');\n        break;\n      }\n      case '--disable-starlingmonkey': {\n        console.error(\n          'The legacy js-compute-runtime.wasm engine requires an older version of the JS SDK',\n        );\n        process.exit(1);\n      }\n      case '--engine-wasm': {\n        if (customEngineSet) {\n          tooManyEngines();\n        }\n        const value = cliInputs.shift();\n        if (value == null) {\n          console.error('Error: --engine-wasm requires a value');\n          process.exit(1);\n        }\n        customEngineSet = true;\n        if (isAbsolute(value)) {\n          wasmEngine = value;\n        } else {\n          wasmEngine = join(process.cwd(), value);\n        }\n        break;\n      }\n      case '--weval-bin': {\n        const value = cliInputs.shift();\n        if (value == null) {\n          console.error('Error: --weval-bin requires a value');\n          process.exit(1);\n        }\n        if (isAbsolute(value)) {\n          wevalBin = value;\n        } else {\n          wevalBin = join(process.cwd(), value);\n        }\n        break;\n      }\n      case '--aot-cache': {\n        const value = cliInputs.shift();\n        if (value == null) {\n          console.error('Error: --aot-cache requires a value');\n          process.exit(1);\n        }\n        if (isAbsolute(value)) {\n          aotCache = value;\n        } else {\n          aotCache = join(process.cwd(), value);\n        }\n        break;\n      }\n      case '--enable-stack-traces': {\n        enableStackTraces = true;\n        break;\n      }\n      case '--exclude-sources': {\n        excludeSources = true;\n        break;\n      }\n      case '--debug-intermediate-files': {\n        const value = cliInputs.shift();\n        if (value == null) {\n          console.error('Error: --debug-intermediate-files requires a value');\n          process.exit(1);\n        }\n        if (isAbsolute(value)) {\n          debugIntermediateFilesDir = value;\n        } else {\n          debugIntermediateFilesDir = join(process.cwd(), value);\n        }\n        break;\n      }\n      default: {\n        if (cliInput.startsWith('--engine-wasm=')) {\n          if (customEngineSet) {\n            tooManyEngines();\n          }\n          const value = cliInput.replace(/--engine-wasm=+/, '');\n          customEngineSet = true;\n          if (isAbsolute(value)) {\n            wasmEngine = value;\n          } else {\n            wasmEngine = join(process.cwd(), value);\n          }\n          break;\n        } else if (cliInput.startsWith('--env=')) {\n          const value = cliInput.replace(/--env=/, '');\n          envParser.parse(value);\n          break;\n        } else if (cliInput.startsWith('--weval-bin=')) {\n          const value = cliInput.replace(/--weval-bin=/, '');\n          if (isAbsolute(value)) {\n            wevalBin = value;\n          } else {\n            wevalBin = join(process.cwd(), value);\n          }\n          break;\n        } else if (cliInput.startsWith('--aot-cache=')) {\n          const value = cliInput.replace(/--aot-cache=/, '');\n          if (isAbsolute(value)) {\n            aotCache = value;\n          } else {\n            aotCache = join(process.cwd(), value);\n          }\n          break;\n        } else if (cliInput.startsWith('--debug-intermediate-files=')) {\n          const value = cliInput.replace(/--debug-intermediate-files=/, '');\n          if (isAbsolute(value)) {\n            debugIntermediateFilesDir = value;\n          } else {\n            debugIntermediateFilesDir = join(process.cwd(), value);\n          }\n          break;\n        } else if (cliInput.startsWith('-')) {\n          unknownArgument(cliInput);\n        } else {\n          if (!customInputSet) {\n            customInputSet = true;\n            if (isAbsolute(cliInput)) {\n              input = cliInput;\n            } else {\n              input = join(process.cwd(), cliInput);\n            }\n          } else if (!customOutputSet) {\n            customOutputSet = true;\n            if (isAbsolute(cliInput)) {\n              output = cliInput;\n            } else {\n              output = join(process.cwd(), cliInput);\n            }\n          } else {\n            unknownArgument(cliInput);\n          }\n        }\n      }\n    }\n  }\n\n  if (!customEngineSet && enableAOT) {\n    wasmEngine = join(__dirname, '../fastly-weval.wasm');\n  }\n\n  if (wevalBin && !enableAOT) {\n    console.error(\n      'Warning: --weval-bin has no effect without --enable-aot, as weval is only used for AOT compilation',\n    );\n  }\n\n  return {\n    enableExperimentalHighResolutionTimeMethods,\n    enableHttpCache,\n    moduleMode,\n    bundle,\n    enableAOT,\n    aotCache,\n    enableStackTraces,\n    excludeSources,\n    debugIntermediateFilesDir,\n    input,\n    output,\n    wasmEngine,\n    wevalBin,\n    env: envParser.getEnv(),\n  };\n}\n"
  },
  {
    "path": "src/pipeline.ts",
    "content": "// From https://github.com/harmony7/js-async-pipeline\n\nimport { resolve } from 'node:path';\n\nexport type PipelineOpts<TValue> = {\n  beforeStep?: (\n    args: TValue,\n    index: number,\n    arr: PipelineStep<TValue>[],\n  ) => void | PromiseLike<void>;\n  afterStep?: (\n    args: TValue,\n    index: number,\n    arr: PipelineStep<TValue>[],\n  ) => void | PromiseLike<void>;\n};\n\nexport type PipelineStep<TValue> = (\n  acc: TValue,\n  index: number,\n  arr: PipelineStep<TValue>[],\n) => TValue | PromiseLike<TValue>;\n\nexport async function pipeline<TValue>(\n  steps: PipelineStep<TValue>[],\n  initialValue: TValue,\n  opts?: PipelineOpts<TValue>,\n): Promise<TValue> {\n  let val = initialValue;\n  for (const [index, step] of steps.entries()) {\n    await opts?.beforeStep?.call(opts, val, index, steps);\n    val = await step(val, index, steps);\n    await opts?.afterStep?.call(opts, val, index, steps);\n  }\n  return val;\n}\n"
  },
  {
    "path": "src/printHelp.ts",
    "content": "import { readFile } from 'node:fs/promises';\nimport { basename, dirname, join } from 'node:path';\nimport { argv } from 'node:process';\nimport { fileURLToPath } from 'node:url';\nconst __dirname = dirname(fileURLToPath(import.meta.url));\n\nexport async function printHelp() {\n  await printVersion();\n  console.log(`\nUSAGE:\n    ${basename(argv[1])} [FLAGS] [OPTIONS] [ARGS]\n\nFLAGS:\n    -h, --help                                              Prints help information\n    -V, --version                                           Prints version information\n\nOPTIONS:\n    --env <KEY=VALUE>                                       Set environment variables, possibly inheriting\n                                                           from the current environment. Multiple\n                                                           variables can be comma-separated \n                                                           (e.g., --env ENV_VAR,OVERRIDE=val)\n    --module-mode                            [experimental] Run all sources as native modules,\n                                                           with full error stack support.\n    --engine-wasm <engine-wasm>                             The JS engine Wasm file path\n                                                            with full error stack support\n    --enable-http-cache                                     Enable the HTTP cache hook API\n    --enable-aot                                            Enable AOT compilation for performance\n    --enable-experimental-high-resolution-time-methods      Enable experimental fastly.now() method\n    --enable-experimental-top-level-await                   Enable experimental top level await\n    --enable-stack-traces                                   Enable stack traces\n    --exclude-sources                                       Don't include sources in stack traces                \n    --debug-intermediate-files <dir>                        Output intermediate files in directory   \n    --weval-bin <weval-bin>                                 Path to the weval binary to use for AOT compilation             \n\nARGS:\n    <input>     The input JS script's file path [default: bin/index.js]\n    <output>    The file path to write the output Wasm module to [default: bin/main.wasm]\n`);\n}\n\nexport async function printVersion() {\n  const packageJson = await readFile(join(__dirname, '../package.json'), {\n    encoding: 'utf-8',\n  });\n  const version = (JSON.parse(packageJson) as { version: string }).version;\n  console.log(`${basename(argv[1])} ${version}`);\n}\n\nexport function tooManyEngines() {\n  console.error(`error: The argument '--engine-wasm <engine-wasm>' was provided more than once, but cannot be used multiple times\n  \nUSAGE:\n    js-compute-runtime --engine-wasm <engine-wasm>\n      \nFor more information try --help`);\n  process.exit(1);\n}\n\nexport function unknownArgument(cliInput: string) {\n  console.error(`error: Found argument '${cliInput}' which wasn't expected, or isn't valid in this context\n\nUSAGE:\n    js-compute-runtime [FLAGS] [OPTIONS] [ARGS]\n\nFor more information try --help`);\n  process.exit(1);\n}\n"
  },
  {
    "path": "src/types/modules.d.ts",
    "content": "declare module '@bytecodealliance/wizer' {\n  const wizer: string;\n  export default wizer;\n}\n\ndeclare module '@bytecodealliance/weval' {\n  function getWeval(): Promise<string>;\n  export default getWeval;\n}\n"
  },
  {
    "path": "target/rust-analyzer/flycheck0/stderr",
    "content": "warning: only one of `license` or `license-file` is necessary\n`license` should be used if the package license can be expressed with a standard SPDX expression.\n`license-file` should be used if the package uses a non-standard license.\nSee https://doc.rust-lang.org/cargo/reference/manifest.html#the-license-and-license-file-fields for more information.\n    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.24s\n"
  },
  {
    "path": "target/rust-analyzer/flycheck0/stdout",
    "content": "{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#libc@0.2.135\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.135/Cargo.toml\",\"target\":{\"kind\":[\"custom-build\"],\"crate_types\":[\"bin\"],\"name\":\"build-script-build\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.135/build.rs\",\"edition\":\"2015\",\"doc\":false,\"doctest\":false,\"test\":false},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"default\",\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/libc-339e46fc48e380a6/build-script-build\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"build-script-executed\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#libc@0.2.135\",\"linked_libs\":[],\"linked_paths\":[],\"cfgs\":[\"freebsd11\",\"libc_priv_mod_use\",\"libc_union\",\"libc_const_size_of\",\"libc_align\",\"libc_int128\",\"libc_core_cvoid\",\"libc_packedN\",\"libc_cfg_target_vendor\",\"libc_non_exhaustive\",\"libc_ptr_addr_of\",\"libc_underscore_const_names\",\"libc_const_extern_fn\"],\"env\":[],\"out_dir\":\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/libc-c9520a982e130a31/out\"}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#autocfg@1.1.0\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/autocfg-1.1.0/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"autocfg\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/autocfg-1.1.0/src/lib.rs\",\"edition\":\"2015\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libautocfg-d60d3d7f96968932.rlib\",\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libautocfg-d60d3d7f96968932.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#proc-macro2@1.0.93\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.93/Cargo.toml\",\"target\":{\"kind\":[\"custom-build\"],\"crate_types\":[\"bin\"],\"name\":\"build-script-build\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.93/build.rs\",\"edition\":\"2021\",\"doc\":false,\"doctest\":false,\"test\":false},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"default\",\"proc-macro\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/proc-macro2-5f3a33774ff8bf70/build-script-build\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#unicode-ident@1.0.5\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/unicode-ident-1.0.5/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"unicode_ident\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/unicode-ident-1.0.5/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libunicode_ident-4ab9377362aafc46.rlib\",\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libunicode_ident-4ab9377362aafc46.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#cfg-if@1.0.0\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cfg-if-1.0.0/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"cfg_if\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cfg-if-1.0.0/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libcfg_if-f063294a1a369ae9.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#syn@1.0.102\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/syn-1.0.102/Cargo.toml\",\"target\":{\"kind\":[\"custom-build\"],\"crate_types\":[\"bin\"],\"name\":\"build-script-build\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/syn-1.0.102/build.rs\",\"edition\":\"2018\",\"doc\":false,\"doctest\":false,\"test\":false},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"clone-impls\",\"default\",\"derive\",\"full\",\"parsing\",\"printing\",\"proc-macro\",\"quote\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/syn-27641e2e3de11e10/build-script-build\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#version_check@0.9.4\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/version_check-0.9.4/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"version_check\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/version_check-0.9.4/src/lib.rs\",\"edition\":\"2015\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libversion_check-9f8b8f950a57558c.rlib\",\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libversion_check-9f8b8f950a57558c.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#memchr@2.5.0\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/memchr-2.5.0/Cargo.toml\",\"target\":{\"kind\":[\"custom-build\"],\"crate_types\":[\"bin\"],\"name\":\"build-script-build\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/memchr-2.5.0/build.rs\",\"edition\":\"2018\",\"doc\":false,\"doctest\":false,\"test\":false},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"default\",\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/memchr-c714af3b4baacdc4/build-script-build\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#pin-project-lite@0.2.9\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pin-project-lite-0.2.9/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"pin_project_lite\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pin-project-lite-0.2.9/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libpin_project_lite-674186df2f8de93e.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#futures-core@0.3.24\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-core-0.3.24/Cargo.toml\",\"target\":{\"kind\":[\"custom-build\"],\"crate_types\":[\"bin\"],\"name\":\"build-script-build\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-core-0.3.24/build.rs\",\"edition\":\"2018\",\"doc\":false,\"doctest\":false,\"test\":false},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"alloc\",\"default\",\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/futures-core-a83619a12a98e279/build-script-build\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#bytes@1.2.1\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bytes-1.2.1/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"bytes\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bytes-1.2.1/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"default\",\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libbytes-406ce56f79513e76.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#log@0.4.17\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/log-0.4.17/Cargo.toml\",\"target\":{\"kind\":[\"custom-build\"],\"crate_types\":[\"bin\"],\"name\":\"build-script-build\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/log-0.4.17/build.rs\",\"edition\":\"2015\",\"doc\":false,\"doctest\":false,\"test\":false},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/log-873e797bfc091865/build-script-build\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#parking_lot_core@0.9.3\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/parking_lot_core-0.9.3/Cargo.toml\",\"target\":{\"kind\":[\"custom-build\"],\"crate_types\":[\"bin\"],\"name\":\"build-script-build\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/parking_lot_core-0.9.3/build.rs\",\"edition\":\"2018\",\"doc\":false,\"doctest\":false,\"test\":false},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/parking_lot_core-a5ddf60e654d6982/build-script-build\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#futures-task@0.3.24\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-task-0.3.24/Cargo.toml\",\"target\":{\"kind\":[\"custom-build\"],\"crate_types\":[\"bin\"],\"name\":\"build-script-build\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-task-0.3.24/build.rs\",\"edition\":\"2018\",\"doc\":false,\"doctest\":false,\"test\":false},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"alloc\",\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/futures-task-b7fece059ff477c3/build-script-build\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#libc@0.2.135\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.135/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"libc\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.135/src/lib.rs\",\"edition\":\"2015\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"default\",\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/liblibc-cf7ae6aaa70202b9.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"build-script-executed\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#proc-macro2@1.0.93\",\"linked_libs\":[],\"linked_paths\":[],\"cfgs\":[\"wrap_proc_macro\"],\"env\":[],\"out_dir\":\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/proc-macro2-d651853fa23396e3/out\"}\n{\"reason\":\"build-script-executed\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#syn@1.0.102\",\"linked_libs\":[],\"linked_paths\":[],\"cfgs\":[\"syn_disable_nightly_tests\"],\"env\":[],\"out_dir\":\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/syn-26acf9469c711d72/out\"}\n{\"reason\":\"build-script-executed\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#memchr@2.5.0\",\"linked_libs\":[],\"linked_paths\":[],\"cfgs\":[],\"env\":[],\"out_dir\":\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/memchr-200f7bf1a6fbf597/out\"}\n{\"reason\":\"build-script-executed\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#futures-core@0.3.24\",\"linked_libs\":[],\"linked_paths\":[],\"cfgs\":[],\"env\":[],\"out_dir\":\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/futures-core-6a545f8d2aaaa0d9/out\"}\n{\"reason\":\"build-script-executed\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#log@0.4.17\",\"linked_libs\":[],\"linked_paths\":[],\"cfgs\":[\"atomic_cas\",\"has_atomics\"],\"env\":[],\"out_dir\":\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/log-ae026b7ad9087e1c/out\"}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#lock_api@0.4.9\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lock_api-0.4.9/Cargo.toml\",\"target\":{\"kind\":[\"custom-build\"],\"crate_types\":[\"bin\"],\"name\":\"build-script-build\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lock_api-0.4.9/build.rs\",\"edition\":\"2018\",\"doc\":false,\"doctest\":false,\"test\":false},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/lock_api-4e8df7dd5fab4dca/build-script-build\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#slab@0.4.7\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/slab-0.4.7/Cargo.toml\",\"target\":{\"kind\":[\"custom-build\"],\"crate_types\":[\"bin\"],\"name\":\"build-script-build\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/slab-0.4.7/build.rs\",\"edition\":\"2018\",\"doc\":false,\"doctest\":false,\"test\":false},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"default\",\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/slab-ebae6161c5fb9572/build-script-build\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"build-script-executed\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#parking_lot_core@0.9.3\",\"linked_libs\":[],\"linked_paths\":[],\"cfgs\":[],\"env\":[],\"out_dir\":\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/parking_lot_core-d12d972cd7ec1f37/out\"}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#scopeguard@1.1.0\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/scopeguard-1.1.0/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"scopeguard\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/scopeguard-1.1.0/src/lib.rs\",\"edition\":\"2015\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libscopeguard-7bbec343904ba2e4.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#futures-channel@0.3.24\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-channel-0.3.24/Cargo.toml\",\"target\":{\"kind\":[\"custom-build\"],\"crate_types\":[\"bin\"],\"name\":\"build-script-build\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-channel-0.3.24/build.rs\",\"edition\":\"2018\",\"doc\":false,\"doctest\":false,\"test\":false},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"alloc\",\"default\",\"futures-sink\",\"sink\",\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/futures-channel-113cf5c051ccc904/build-script-build\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#smallvec@1.10.0\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/smallvec-1.10.0/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"smallvec\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/smallvec-1.10.0/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libsmallvec-a3f258c82875f629.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#core-foundation-sys@0.8.3\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/core-foundation-sys-0.8.3/Cargo.toml\",\"target\":{\"kind\":[\"custom-build\"],\"crate_types\":[\"bin\"],\"name\":\"build-script-build\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/core-foundation-sys-0.8.3/build.rs\",\"edition\":\"2015\",\"doc\":false,\"doctest\":false,\"test\":false},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/core-foundation-sys-c09b5b3d0c20022e/build-script-build\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#futures-sink@0.3.24\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-sink-0.3.24/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"futures_sink\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-sink-0.3.24/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"alloc\",\"default\",\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libfutures_sink-db6db87b953f1e2c.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#proc-macro2@1.0.93\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.93/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"proc_macro2\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.93/src/lib.rs\",\"edition\":\"2021\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"default\",\"proc-macro\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libproc_macro2-dcc78d1642ab9fcd.rlib\",\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libproc_macro2-dcc78d1642ab9fcd.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#memchr@2.5.0\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/memchr-2.5.0/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"memchr\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/memchr-2.5.0/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"default\",\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libmemchr-1f131721245bcc5b.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"build-script-executed\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#lock_api@0.4.9\",\"linked_libs\":[],\"linked_paths\":[],\"cfgs\":[\"has_const_fn_trait_bound\"],\"env\":[],\"out_dir\":\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/lock_api-f7d6ec7efbf7565c/out\"}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#log@0.4.17\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/log-0.4.17/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"log\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/log-0.4.17/src/lib.rs\",\"edition\":\"2015\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/liblog-c3a943f500f56506.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#futures-core@0.3.24\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-core-0.3.24/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"futures_core\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-core-0.3.24/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"alloc\",\"default\",\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libfutures_core-f9ecb257b9627941.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"build-script-executed\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#core-foundation-sys@0.8.3\",\"linked_libs\":[\"framework=CoreFoundation\"],\"linked_paths\":[],\"cfgs\":[],\"env\":[],\"out_dir\":\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/core-foundation-sys-4094ed832391849c/out\"}\n{\"reason\":\"build-script-executed\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#slab@0.4.7\",\"linked_libs\":[],\"linked_paths\":[],\"cfgs\":[],\"env\":[],\"out_dir\":\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/slab-5667d6f336e59b08/out\"}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#parking_lot_core@0.9.3\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/parking_lot_core-0.9.3/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"parking_lot_core\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/parking_lot_core-0.9.3/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libparking_lot_core-2a0db7a2644563ee.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"build-script-executed\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#futures-channel@0.3.24\",\"linked_libs\":[],\"linked_paths\":[],\"cfgs\":[],\"env\":[],\"out_dir\":\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/futures-channel-f73393bcb0cb2401/out\"}\n{\"reason\":\"build-script-executed\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#futures-task@0.3.24\",\"linked_libs\":[],\"linked_paths\":[],\"cfgs\":[],\"env\":[],\"out_dir\":\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/futures-task-674bce2f9912ca57/out\"}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#tokio@1.24.2\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.24.2/Cargo.toml\",\"target\":{\"kind\":[\"custom-build\"],\"crate_types\":[\"bin\"],\"name\":\"build-script-build\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.24.2/build.rs\",\"edition\":\"2018\",\"doc\":false,\"doctest\":false,\"test\":false},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"bytes\",\"default\",\"fs\",\"full\",\"io-std\",\"io-util\",\"libc\",\"macros\",\"memchr\",\"mio\",\"net\",\"num_cpus\",\"parking_lot\",\"process\",\"rt\",\"rt-multi-thread\",\"signal\",\"signal-hook-registry\",\"socket2\",\"sync\",\"time\",\"tokio-macros\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/tokio-ebdaf98c3ce3473c/build-script-build\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#itoa@1.0.4\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/itoa-1.0.4/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"itoa\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/itoa-1.0.4/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libitoa-3983822e1402c741.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#futures-util@0.3.24\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.24/Cargo.toml\",\"target\":{\"kind\":[\"custom-build\"],\"crate_types\":[\"bin\"],\"name\":\"build-script-build\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.24/build.rs\",\"edition\":\"2018\",\"doc\":false,\"doctest\":false,\"test\":false},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"alloc\",\"async-await\",\"async-await-macro\",\"channel\",\"futures-channel\",\"futures-io\",\"futures-macro\",\"futures-sink\",\"io\",\"memchr\",\"sink\",\"slab\",\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/futures-util-d37eefec798067ec/build-script-build\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#once_cell@1.15.0\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/once_cell-1.15.0/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"once_cell\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/once_cell-1.15.0/src/lib.rs\",\"edition\":\"2021\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"alloc\",\"default\",\"race\",\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libonce_cell-e3869f9a77b4802f.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#quote@1.0.38\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/quote-1.0.38/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"quote\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/quote-1.0.38/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"default\",\"proc-macro\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libquote-9ae777020386aa13.rlib\",\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libquote-9ae777020386aa13.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#lock_api@0.4.9\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lock_api-0.4.9/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"lock_api\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lock_api-0.4.9/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/liblock_api-9d5d6ab442b53f6f.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"build-script-executed\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#tokio@1.24.2\",\"linked_libs\":[],\"linked_paths\":[],\"cfgs\":[],\"env\":[],\"out_dir\":\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/tokio-ba2c291c5b5cd8a2/out\"}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#futures-task@0.3.24\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-task-0.3.24/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"futures_task\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-task-0.3.24/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"alloc\",\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libfutures_task-7a2c67f37ab9eba4.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#mio@0.8.4\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.4/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"mio\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-0.8.4/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"default\",\"net\",\"os-ext\",\"os-poll\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libmio-14d6aa114fd4c545.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#core-foundation-sys@0.8.3\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/core-foundation-sys-0.8.3/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"core_foundation_sys\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/core-foundation-sys-0.8.3/src/lib.rs\",\"edition\":\"2015\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libcore_foundation_sys-3fd606f180036d1a.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#futures-channel@0.3.24\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-channel-0.3.24/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"futures_channel\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-channel-0.3.24/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"alloc\",\"default\",\"futures-sink\",\"sink\",\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libfutures_channel-4461d3193d0b31d5.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#slab@0.4.7\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/slab-0.4.7/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"slab\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/slab-0.4.7/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"default\",\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libslab-958e14509fcb14b9.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"build-script-executed\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#futures-util@0.3.24\",\"linked_libs\":[],\"linked_paths\":[],\"cfgs\":[],\"env\":[],\"out_dir\":\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/futures-util-111e2701d25739a7/out\"}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#socket2@0.4.7\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/socket2-0.4.7/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"socket2\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/socket2-0.4.7/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"all\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libsocket2-c0e59ae489d5af14.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#num_cpus@1.13.1\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/num_cpus-1.13.1/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"num_cpus\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/num_cpus-1.13.1/src/lib.rs\",\"edition\":\"2015\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libnum_cpus-48fd7f3e7c55b580.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#signal-hook-registry@1.4.0\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/signal-hook-registry-1.4.0/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"signal_hook_registry\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/signal-hook-registry-1.4.0/src/lib.rs\",\"edition\":\"2015\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libsignal_hook_registry-678fe1d817e524c2.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#unicase@2.6.0\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/unicase-2.6.0/Cargo.toml\",\"target\":{\"kind\":[\"custom-build\"],\"crate_types\":[\"bin\"],\"name\":\"build-script-build\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/unicase-2.6.0/build.rs\",\"edition\":\"2015\",\"doc\":false,\"doctest\":false,\"test\":false},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/unicase-92c9dd1c8da6f1ae/build-script-build\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#indexmap@1.9.1\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/indexmap-1.9.1/Cargo.toml\",\"target\":{\"kind\":[\"custom-build\"],\"crate_types\":[\"bin\"],\"name\":\"build-script-build\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/indexmap-1.9.1/build.rs\",\"edition\":\"2021\",\"doc\":false,\"doctest\":false,\"test\":false},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/indexmap-3f25abd69fc43f89/build-script-build\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#syn@1.0.102\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/syn-1.0.102/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"syn\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/syn-1.0.102/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"clone-impls\",\"default\",\"derive\",\"full\",\"parsing\",\"printing\",\"proc-macro\",\"quote\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libsyn-cb4c11802518e3d5.rlib\",\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libsyn-cb4c11802518e3d5.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#parking_lot@0.12.1\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/parking_lot-0.12.1/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"parking_lot\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/parking_lot-0.12.1/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"default\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libparking_lot-64a9578aedeb1525.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#pin-utils@0.1.0\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pin-utils-0.1.0/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"pin_utils\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pin-utils-0.1.0/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libpin_utils-92de88d007e616b8.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#futures-io@0.3.24\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-io-0.3.24/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"futures_io\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-io-0.3.24/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libfutures_io-896774505226f473.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"build-script-executed\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#unicase@2.6.0\",\"linked_libs\":[],\"linked_paths\":[],\"cfgs\":[\"__unicase__iter_cmp\",\"__unicase__default_hasher\",\"__unicase__const_fns\",\"__unicase__core_and_alloc\"],\"env\":[],\"out_dir\":\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/unicase-b89ea1d0cfbddab9/out\"}\n{\"reason\":\"build-script-executed\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#indexmap@1.9.1\",\"linked_libs\":[],\"linked_paths\":[],\"cfgs\":[\"has_std\"],\"env\":[],\"out_dir\":\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/indexmap-cbf938b8e51d938a/out\"}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#tracing-core@0.1.30\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tracing-core-0.1.30/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"tracing_core\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tracing-core-0.1.30/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"once_cell\",\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libtracing_core-2ee4989823912581.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#shlex@1.3.0\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/shlex-1.3.0/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"shlex\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/shlex-1.3.0/src/lib.rs\",\"edition\":\"2015\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"default\",\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libshlex-8683314999dfd5a8.rlib\",\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libshlex-8683314999dfd5a8.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#lazy_static@1.4.0\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lazy_static-1.4.0/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"lazy_static\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lazy_static-1.4.0/src/lib.rs\",\"edition\":\"2015\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/liblazy_static-b27d32fa506d233a.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#bitflags@1.3.2\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-1.3.2/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"bitflags\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-1.3.2/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"default\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libbitflags-55faf151d3a8e80b.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#fnv@1.0.7\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fnv-1.0.7/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"fnv\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fnv-1.0.7/lib.rs\",\"edition\":\"2015\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"default\",\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libfnv-1f26e4524fd9ffc0.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#hashbrown@0.12.3\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hashbrown-0.12.3/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"hashbrown\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hashbrown-0.12.3/src/lib.rs\",\"edition\":\"2021\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"raw\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libhashbrown-d42b0a1fd196487a.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#typenum@1.15.0\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/typenum-1.15.0/Cargo.toml\",\"target\":{\"kind\":[\"custom-build\"],\"crate_types\":[\"bin\"],\"name\":\"build-script-main\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/typenum-1.15.0/build/main.rs\",\"edition\":\"2018\",\"doc\":false,\"doctest\":false,\"test\":false},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/typenum-2a4aabb423d62ea0/build-script-main\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#core-foundation@0.9.3\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/core-foundation-0.9.3/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"core_foundation\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/core-foundation-0.9.3/src/lib.rs\",\"edition\":\"2015\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libcore_foundation-289207a437d06525.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#tokio-macros@1.8.0\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-macros-1.8.0/Cargo.toml\",\"target\":{\"kind\":[\"proc-macro\"],\"crate_types\":[\"proc-macro\"],\"name\":\"tokio_macros\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-macros-1.8.0/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libtokio_macros-bbbf231dee3783f9.dylib\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#futures-macro@0.3.24\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-macro-0.3.24/Cargo.toml\",\"target\":{\"kind\":[\"proc-macro\"],\"crate_types\":[\"proc-macro\"],\"name\":\"futures_macro\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-macro-0.3.24/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libfutures_macro-edb5279068644088.dylib\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#http@0.2.8\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/http-0.2.8/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"http\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/http-0.2.8/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libhttp-966c1f0f3a0fbb0b.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#indexmap@1.9.1\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/indexmap-1.9.1/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"indexmap\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/indexmap-1.9.1/src/lib.rs\",\"edition\":\"2021\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libindexmap-c212ed9a585c93ea.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#tracing@0.1.37\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tracing-0.1.37/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"tracing\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tracing-0.1.37/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libtracing-273912a3c3dff670.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"build-script-executed\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#typenum@1.15.0\",\"linked_libs\":[],\"linked_paths\":[],\"cfgs\":[],\"env\":[[\"TYPENUM_BUILD_CONSTS\",\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/typenum-f2380115c5a3539c/out/consts.rs\"],[\"TYPENUM_BUILD_OP\",\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/typenum-f2380115c5a3539c/out/op.rs\"]],\"out_dir\":\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/typenum-f2380115c5a3539c/out\"}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#cc@1.2.11\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cc-1.2.11/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"cc\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cc-1.2.11/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libcc-a6a82632781e467a.rlib\",\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libcc-a6a82632781e467a.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#security-framework-sys@2.6.1\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/security-framework-sys-2.6.1/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"security_framework_sys\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/security-framework-sys-2.6.1/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"OSX_10_9\",\"default\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libsecurity_framework_sys-7251db3f95734f55.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#generic-array@0.14.6\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/generic-array-0.14.6/Cargo.toml\",\"target\":{\"kind\":[\"custom-build\"],\"crate_types\":[\"bin\"],\"name\":\"build-script-build\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/generic-array-0.14.6/build.rs\",\"edition\":\"2015\",\"doc\":false,\"doctest\":false,\"test\":false},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"more_lengths\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/generic-array-0c2d363290ab86a8/build-script-build\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#serde@1.0.145\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde-1.0.145/Cargo.toml\",\"target\":{\"kind\":[\"custom-build\"],\"crate_types\":[\"bin\"],\"name\":\"build-script-build\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde-1.0.145/build.rs\",\"edition\":\"2015\",\"doc\":false,\"doctest\":false,\"test\":false},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"default\",\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/serde-a34d5f2515b5f918/build-script-build\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#remove_dir_all@0.5.3\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/remove_dir_all-0.5.3/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"remove_dir_all\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/remove_dir_all-0.5.3/src/lib.rs\",\"edition\":\"2015\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libremove_dir_all-939a0eb23a5ddde6.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#native-tls@0.2.10\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/native-tls-0.2.10/Cargo.toml\",\"target\":{\"kind\":[\"custom-build\"],\"crate_types\":[\"bin\"],\"name\":\"build-script-build\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/native-tls-0.2.10/build.rs\",\"edition\":\"2015\",\"doc\":false,\"doctest\":false,\"test\":false},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/native-tls-afd9e8e75691e667/build-script-build\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#tinyvec_macros@0.1.0\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tinyvec_macros-0.1.0/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"tinyvec_macros\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tinyvec_macros-0.1.0/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libtinyvec_macros-aa0ad83d54e35740.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#fastrand@1.8.0\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastrand-1.8.0/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"fastrand\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastrand-1.8.0/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libfastrand-1aa1de4f7c920d15.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#futures-util@0.3.24\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.24/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"futures_util\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.24/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"alloc\",\"async-await\",\"async-await-macro\",\"channel\",\"futures-channel\",\"futures-io\",\"futures-macro\",\"futures-sink\",\"io\",\"memchr\",\"sink\",\"slab\",\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libfutures_util-b338ac678229cb6f.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#tokio@1.24.2\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.24.2/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"tokio\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.24.2/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"bytes\",\"default\",\"fs\",\"full\",\"io-std\",\"io-util\",\"libc\",\"macros\",\"memchr\",\"mio\",\"net\",\"num_cpus\",\"parking_lot\",\"process\",\"rt\",\"rt-multi-thread\",\"signal\",\"signal-hook-registry\",\"socket2\",\"sync\",\"time\",\"tokio-macros\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libtokio-1416b74877eb740c.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#httparse@1.8.0\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/httparse-1.8.0/Cargo.toml\",\"target\":{\"kind\":[\"custom-build\"],\"crate_types\":[\"bin\"],\"name\":\"build-script-build\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/httparse-1.8.0/build.rs\",\"edition\":\"2018\",\"doc\":false,\"doctest\":false,\"test\":false},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"default\",\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/httparse-dbf6f6b4230b80cc/build-script-build\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#tinyvec@1.6.0\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tinyvec-1.6.0/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"tinyvec\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tinyvec-1.6.0/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"alloc\",\"default\",\"tinyvec_macros\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libtinyvec-d5552827c4f69bf9.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"build-script-executed\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#native-tls@0.2.10\",\"linked_libs\":[],\"linked_paths\":[],\"cfgs\":[],\"env\":[],\"out_dir\":\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/native-tls-51e41408421f3e99/out\"}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#tempfile@3.3.0\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tempfile-3.3.0/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"tempfile\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tempfile-3.3.0/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libtempfile-03c3bdc8d2e00595.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"build-script-executed\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#generic-array@0.14.6\",\"linked_libs\":[],\"linked_paths\":[],\"cfgs\":[\"relaxed_coherence\"],\"env\":[],\"out_dir\":\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/generic-array-351fb3b13c51d4bb/out\"}\n{\"reason\":\"build-script-executed\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#serde@1.0.145\",\"linked_libs\":[],\"linked_paths\":[],\"cfgs\":[],\"env\":[],\"out_dir\":\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/serde-0dd8d28f4238267a/out\"}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#typenum@1.15.0\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/typenum-1.15.0/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"typenum\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/typenum-1.15.0/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libtypenum-1f5ac9f7ceccc491.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#security-framework@2.7.0\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/security-framework-2.7.0/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"security_framework\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/security-framework-2.7.0/src/lib.rs\",\"edition\":\"2021\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"OSX_10_9\",\"default\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libsecurity_framework-6b8cceb3ba310c99.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#openssl-src@300.4.1+3.4.0\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-src-300.4.1+3.4.0/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"openssl_src\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-src-300.4.1+3.4.0/src/lib.rs\",\"edition\":\"2021\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"default\",\"legacy\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libopenssl_src-4c44d86109dbc880.rlib\",\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libopenssl_src-4c44d86109dbc880.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#unicase@2.6.0\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/unicase-2.6.0/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"unicase\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/unicase-2.6.0/src/lib.rs\",\"edition\":\"2015\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libunicase-5029c78322567a92.rlib\",\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libunicase-5029c78322567a92.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#percent-encoding@2.2.0\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/percent-encoding-2.2.0/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"percent_encoding\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/percent-encoding-2.2.0/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"alloc\",\"default\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libpercent_encoding-86341883ed6efd0e.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#pkg-config@0.3.25\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pkg-config-0.3.25/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"pkg_config\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pkg-config-0.3.25/src/lib.rs\",\"edition\":\"2015\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libpkg_config-638f71ef8a8340cd.rlib\",\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libpkg_config-638f71ef8a8340cd.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#tokio-util@0.7.4\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-util-0.7.4/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"tokio_util\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-util-0.7.4/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"codec\",\"default\",\"io\",\"tracing\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libtokio_util-bf0b2d861fa180c1.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"build-script-executed\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#httparse@1.8.0\",\"linked_libs\":[],\"linked_paths\":[],\"cfgs\":[\"httparse_simd\"],\"env\":[],\"out_dir\":\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/httparse-76658a3a49066b02/out\"}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#vcpkg@0.2.15\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/vcpkg-0.2.15/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"vcpkg\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/vcpkg-0.2.15/src/lib.rs\",\"edition\":\"2015\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libvcpkg-6db20e6761ed8cc8.rlib\",\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libvcpkg-6db20e6761ed8cc8.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#try-lock@0.2.3\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/try-lock-0.2.3/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"try_lock\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/try-lock-0.2.3/src/lib.rs\",\"edition\":\"2015\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libtry_lock-611183c770850547.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#native-tls@0.2.10\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/native-tls-0.2.10/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"native_tls\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/native-tls-0.2.10/src/lib.rs\",\"edition\":\"2015\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libnative_tls-80df3962f140b589.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#generic-array@0.14.6\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/generic-array-0.14.6/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"generic_array\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/generic-array-0.14.6/src/lib.rs\",\"edition\":\"2015\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"more_lengths\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libgeneric_array-155e14b3cb36db88.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#form_urlencoded@1.1.0\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/form_urlencoded-1.1.0/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"form_urlencoded\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/form_urlencoded-1.1.0/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":false},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libform_urlencoded-a407d382e15044d6.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#unicode-normalization@0.1.22\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/unicode-normalization-0.1.22/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"unicode_normalization\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/unicode-normalization-0.1.22/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"default\",\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libunicode_normalization-cd3c33b54894b16a.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#serde@1.0.145\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde-1.0.145/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"serde\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde-1.0.145/src/lib.rs\",\"edition\":\"2015\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"default\",\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libserde-610c97213cf6cf0d.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#mime_guess@2.0.4\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mime_guess-2.0.4/Cargo.toml\",\"target\":{\"kind\":[\"custom-build\"],\"crate_types\":[\"bin\"],\"name\":\"build-script-build\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mime_guess-2.0.4/build.rs\",\"edition\":\"2015\",\"doc\":false,\"doctest\":false,\"test\":false},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/mime_guess-281019fcf3dfeddd/build-script-build\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#http-body@0.4.5\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/http-body-0.4.5/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"http_body\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/http-body-0.4.5/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libhttp_body-66f6331ec8a05ac5.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#ryu@1.0.11\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ryu-1.0.11/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"ryu\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ryu-1.0.11/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libryu-872095f6f721c953.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#tower-service@0.3.2\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tower-service-0.3.2/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"tower_service\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tower-service-0.3.2/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libtower_service-e2709496d8907d01.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#encoding_rs@0.8.31\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/encoding_rs-0.8.31/Cargo.toml\",\"target\":{\"kind\":[\"custom-build\"],\"crate_types\":[\"bin\"],\"name\":\"build-script-build\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/encoding_rs-0.8.31/build.rs\",\"edition\":\"2018\",\"doc\":false,\"doctest\":false,\"test\":false},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"alloc\",\"default\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/encoding_rs-3b4397d31ef47316/build-script-build\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#httparse@1.8.0\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/httparse-1.8.0/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"httparse\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/httparse-1.8.0/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"default\",\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libhttparse-c1f512f7a4e7e083.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#openssl-sys@0.9.105\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-sys-0.9.105/Cargo.toml\",\"target\":{\"kind\":[\"custom-build\"],\"crate_types\":[\"bin\"],\"name\":\"build-script-main\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-sys-0.9.105/build/main.rs\",\"edition\":\"2021\",\"doc\":false,\"doctest\":false,\"test\":false},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"openssl-src\",\"vendored\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/openssl-sys-a977df21ab5fbf89/build-script-main\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#h2@0.3.14\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/h2-0.3.14/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"h2\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/h2-0.3.14/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libh2-9271a9839adeb833.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#want@0.3.0\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/want-0.3.0/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"want\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/want-0.3.0/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libwant-0f14e802048a5c5c.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#httpdate@1.0.2\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/httpdate-1.0.2/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"httpdate\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/httpdate-1.0.2/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libhttpdate-313e7880436abe21.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#rand_core@0.6.4\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rand_core-0.6.4/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"rand_core\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rand_core-0.6.4/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/librand_core-51ef06cb37a6a770.rlib\",\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/librand_core-51ef06cb37a6a770.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#serde_json@1.0.86\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde_json-1.0.86/Cargo.toml\",\"target\":{\"kind\":[\"custom-build\"],\"crate_types\":[\"bin\"],\"name\":\"build-script-build\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde_json-1.0.86/build.rs\",\"edition\":\"2018\",\"doc\":false,\"doctest\":false,\"test\":false},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"default\",\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/serde_json-b84b7d007d33b14f/build-script-build\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#unicode-bidi@0.3.8\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/unicode-bidi-0.3.8/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"unicode_bidi\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/unicode-bidi-0.3.8/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"default\",\"hardcoded-data\",\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libunicode_bidi-71fe5acf4a2bc77a.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#siphasher@0.3.10\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/siphasher-0.3.10/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"siphasher\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/siphasher-0.3.10/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"default\",\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libsiphasher-b147283699de14e0.rlib\",\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libsiphasher-b147283699de14e0.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"build-script-executed\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#encoding_rs@0.8.31\",\"linked_libs\":[],\"linked_paths\":[],\"cfgs\":[],\"env\":[],\"out_dir\":\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/encoding_rs-13904bf6c37c11b2/out\"}\n{\"reason\":\"build-script-executed\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#mime_guess@2.0.4\",\"linked_libs\":[],\"linked_paths\":[],\"cfgs\":[],\"env\":[],\"out_dir\":\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/mime_guess-2e2b91ba7dc22a59/out\"}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#tokio-native-tls@0.3.0\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-native-tls-0.3.0/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"tokio_native_tls\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-native-tls-0.3.0/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libtokio_native_tls-e3d1a2731361732b.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#unicase@2.6.0\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/unicase-2.6.0/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"unicase\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/unicase-2.6.0/src/lib.rs\",\"edition\":\"2015\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libunicase-907dabdbe393c89e.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#serde_derive@1.0.145\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde_derive-1.0.145/Cargo.toml\",\"target\":{\"kind\":[\"custom-build\"],\"crate_types\":[\"bin\"],\"name\":\"build-script-build\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde_derive-1.0.145/build.rs\",\"edition\":\"2015\",\"doc\":false,\"doctest\":false,\"test\":false},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"default\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/serde_derive-2abc8641717bd685/build-script-build\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"build-script-executed\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#serde_json@1.0.86\",\"linked_libs\":[],\"linked_paths\":[],\"cfgs\":[\"limb_width_64\"],\"env\":[],\"out_dir\":\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/serde_json-ef01d75326ef1254/out\"}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#hyper@0.14.20\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.20/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"hyper\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.20/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"client\",\"h2\",\"http1\",\"http2\",\"runtime\",\"socket2\",\"tcp\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libhyper-918fd40e9487d8f9.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"build-script-executed\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#openssl-sys@0.9.105\",\"linked_libs\":[\"static=ssl\",\"static=crypto\"],\"linked_paths\":[\"native=/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/openssl-sys-cc2c55a10b0b4458/out/openssl-build/install/lib\"],\"cfgs\":[\"osslconf=\\\"OPENSSL_NO_IDEA\\\"\",\"osslconf=\\\"OPENSSL_NO_CAMELLIA\\\"\",\"osslconf=\\\"OPENSSL_NO_COMP\\\"\",\"osslconf=\\\"OPENSSL_NO_SSL3_METHOD\\\"\",\"osslconf=\\\"OPENSSL_NO_SEED\\\"\",\"openssl\",\"ossl340\",\"ossl330\",\"ossl320\",\"ossl300\",\"ossl101\",\"ossl102\",\"ossl102f\",\"ossl102h\",\"ossl110\",\"ossl110f\",\"ossl110g\",\"ossl110h\",\"ossl111\",\"ossl111b\",\"ossl111c\",\"ossl111d\"],\"env\":[],\"out_dir\":\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/openssl-sys-cc2c55a10b0b4458/out\"}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#idna@0.3.0\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/idna-0.3.0/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"idna\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/idna-0.3.0/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":false,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libidna-1d770ba5db220286.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#rand@0.8.5\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rand-0.8.5/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"rand\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rand-0.8.5/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"small_rng\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/librand-fa408134de5126ab.rlib\",\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/librand-fa408134de5126ab.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#phf_shared@0.11.1\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/phf_shared-0.11.1/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"phf_shared\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/phf_shared-0.11.1/src/lib.rs\",\"edition\":\"2021\",\"doc\":true,\"doctest\":true,\"test\":false},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libphf_shared-2aff3889e55bab21.rlib\",\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libphf_shared-2aff3889e55bab21.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#mime@0.3.16\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mime-0.3.16/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"mime\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mime-0.3.16/src/lib.rs\",\"edition\":\"2015\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libmime-2b2723846353a670.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"build-script-executed\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#serde_derive@1.0.145\",\"linked_libs\":[],\"linked_paths\":[],\"cfgs\":[],\"env\":[],\"out_dir\":\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/serde_derive-dd8a9259f74d9228/out\"}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#encoding_rs@0.8.31\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/encoding_rs-0.8.31/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"encoding_rs\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/encoding_rs-0.8.31/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"alloc\",\"default\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libencoding_rs-ad8b7e0b5695638e.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#crypto-common@0.1.6\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/crypto-common-0.1.6/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"crypto_common\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/crypto-common-0.1.6/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libcrypto_common-a4d297843708739b.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#serde_urlencoded@0.7.1\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde_urlencoded-0.7.1/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"serde_urlencoded\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde_urlencoded-0.7.1/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":false},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libserde_urlencoded-e5701fd47b9ae8ac.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#block-buffer@0.10.3\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/block-buffer-0.10.3/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"block_buffer\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/block-buffer-0.10.3/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libblock_buffer-71de2ae197cf49e4.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#syn@2.0.98\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/syn-2.0.98/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"syn\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/syn-2.0.98/src/lib.rs\",\"edition\":\"2021\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"clone-impls\",\"default\",\"derive\",\"full\",\"parsing\",\"printing\",\"proc-macro\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libsyn-f9edb74efaba38fe.rlib\",\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libsyn-f9edb74efaba38fe.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#terminal_size@0.1.17\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/terminal_size-0.1.17/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"terminal_size\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/terminal_size-0.1.17/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libterminal_size-10f8b9fe54923faa.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#mime_guess@2.0.4\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mime_guess-2.0.4/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"mime_guess\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mime_guess-2.0.4/src/lib.rs\",\"edition\":\"2015\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libmime_guess-63b76e2d77f61d83.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#serde_json@1.0.86\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde_json-1.0.86/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"serde_json\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde_json-1.0.86/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"default\",\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libserde_json-ff6068f9e792fe6b.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#hyper-tls@0.5.0\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-tls-0.5.0/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"hyper_tls\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-tls-0.5.0/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libhyper_tls-a19978cce575a2ef.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#phf_generator@0.11.1\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/phf_generator-0.11.1/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"phf_generator\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/phf_generator-0.11.1/src/lib.rs\",\"edition\":\"2021\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libphf_generator-2a3a7762e0cd4c2f.rlib\",\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libphf_generator-2a3a7762e0cd4c2f.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#url@2.3.1\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/url-2.3.1/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"url\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/url-2.3.1/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"default\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/liburl-7a1121a4792a1868.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#ipnet@2.5.0\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ipnet-2.5.0/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"ipnet\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ipnet-2.5.0/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"default\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libipnet-39508cab361fb234.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#base64@0.13.0\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/base64-0.13.0/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"base64\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/base64-0.13.0/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"default\",\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libbase64-7980120a5c7c7401.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#siphasher@0.3.10\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/siphasher-0.3.10/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"siphasher\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/siphasher-0.3.10/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"default\",\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libsiphasher-f2754feac5a35451.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#unicode-width@0.1.10\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/unicode-width-0.1.10/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"unicode_width\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/unicode-width-0.1.10/src/lib.rs\",\"edition\":\"2015\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"default\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libunicode_width-bef3834b7ac642f2.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#openssl@0.10.70\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-0.10.70/Cargo.toml\",\"target\":{\"kind\":[\"custom-build\"],\"crate_types\":[\"bin\"],\"name\":\"build-script-build\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-0.10.70/build.rs\",\"edition\":\"2021\",\"doc\":false,\"doctest\":false,\"test\":false},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"default\",\"vendored\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/openssl-f9825fcbdd1f06d6/build-script-build\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#os_str_bytes@6.3.0\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/os_str_bytes-6.3.0/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"os_str_bytes\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/os_str_bytes-6.3.0/src/lib.rs\",\"edition\":\"2021\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"raw_os_str\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libos_str_bytes-8fdf7d82b18287d2.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#either@1.8.0\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/either-1.8.0/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"either\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/either-1.8.0/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"use_std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libeither-b78bdb8f59edb343.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#foreign-types-shared@0.1.1\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/foreign-types-shared-0.1.1/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"foreign_types_shared\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/foreign-types-shared-0.1.1/src/lib.rs\",\"edition\":\"2015\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libforeign_types_shared-9f47b612b0973c3c.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#openssl-macros@0.1.1\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-macros-0.1.1/Cargo.toml\",\"target\":{\"kind\":[\"proc-macro\"],\"crate_types\":[\"proc-macro\"],\"name\":\"openssl_macros\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-macros-0.1.1/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libopenssl_macros-b31285524d6232d6.dylib\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#phf_shared@0.11.1\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/phf_shared-0.11.1/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"phf_shared\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/phf_shared-0.11.1/src/lib.rs\",\"edition\":\"2021\",\"doc\":true,\"doctest\":true,\"test\":false},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libphf_shared-3a47f023b25a8654.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#itertools@0.10.5\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/itertools-0.10.5/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"itertools\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/itertools-0.10.5/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":false},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"default\",\"use_alloc\",\"use_std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libitertools-5073b9beec29f866.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#foreign-types@0.3.2\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/foreign-types-0.3.2/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"foreign_types\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/foreign-types-0.3.2/src/lib.rs\",\"edition\":\"2015\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libforeign_types-a86f15e182bb3ff5.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"build-script-executed\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#openssl@0.10.70\",\"linked_libs\":[],\"linked_paths\":[],\"cfgs\":[\"osslconf=\\\"OPENSSL_NO_IDEA\\\"\",\"osslconf=\\\"OPENSSL_NO_CAMELLIA\\\"\",\"osslconf=\\\"OPENSSL_NO_COMP\\\"\",\"osslconf=\\\"OPENSSL_NO_SSL3_METHOD\\\"\",\"osslconf=\\\"OPENSSL_NO_SEED\\\"\",\"ossl101\",\"ossl102\",\"ossl110\",\"ossl110g\",\"ossl110h\",\"ossl111\",\"ossl111d\",\"ossl300\",\"ossl310\",\"ossl320\",\"ossl330\"],\"env\":[],\"out_dir\":\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/build/openssl-29d4c3a4f09c7a10/out\"}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#phf_macros@0.11.1\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/phf_macros-0.11.1/Cargo.toml\",\"target\":{\"kind\":[\"proc-macro\"],\"crate_types\":[\"proc-macro\"],\"name\":\"phf_macros\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/phf_macros-0.11.1/src/lib.rs\",\"edition\":\"2021\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libphf_macros-2b4e68400a38677b.dylib\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#console@0.15.2\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/console-0.15.2/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"console\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/console-0.15.2/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"ansi-parsing\",\"unicode-width\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libconsole-c3f81e193ef5611f.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#reqwest@0.11.12\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/reqwest-0.11.12/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"reqwest\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/reqwest-0.11.12/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"__tls\",\"default\",\"default-tls\",\"hyper-tls\",\"json\",\"mime_guess\",\"multipart\",\"native-tls-crate\",\"serde_json\",\"stream\",\"tokio-native-tls\",\"tokio-util\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libreqwest-657ad9d52c3ac038.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#clap_lex@0.3.0\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_lex-0.3.0/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"clap_lex\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_lex-0.3.0/src/lib.rs\",\"edition\":\"2021\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libclap_lex-72e5c34bd116d544.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#serde_derive@1.0.145\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde_derive-1.0.145/Cargo.toml\",\"target\":{\"kind\":[\"proc-macro\"],\"crate_types\":[\"proc-macro\"],\"name\":\"serde_derive\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde_derive-1.0.145/src/lib.rs\",\"edition\":\"2015\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":0,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"default\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libserde_derive-121e4b171e8327ac.dylib\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#openssl-sys@0.9.105\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-sys-0.9.105/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"openssl_sys\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-sys-0.9.105/src/lib.rs\",\"edition\":\"2021\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"openssl-src\",\"vendored\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libopenssl_sys-bb273ff9f8c4cfb6.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#digest@0.10.5\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/digest-0.10.5/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"digest\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/digest-0.10.5/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"alloc\",\"block-buffer\",\"core-api\",\"default\",\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libdigest-c78d1f0325ba8c6e.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#futures-executor@0.3.24\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-executor-0.3.24/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"futures_executor\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-executor-0.3.24/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libfutures_executor-e9f0f3ec875d5c63.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#combine@4.6.6\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/combine-4.6.6/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"combine\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/combine-4.6.6/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"alloc\",\"bytes\",\"default\",\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libcombine-64da968f2ccf3fa0.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#atty@0.2.14\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/atty-0.2.14/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"atty\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/atty-0.2.14/src/lib.rs\",\"edition\":\"2015\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libatty-75856e7aa7d163cd.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#cpufeatures@0.2.5\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cpufeatures-0.2.5/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"cpufeatures\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cpufeatures-0.2.5/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libcpufeatures-427b026017125327.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#same-file@1.0.6\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/same-file-1.0.6/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"same_file\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/same-file-1.0.6/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libsame_file-6f1ef61c7135d1cb.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#number_prefix@0.4.0\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/number_prefix-0.4.0/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"number_prefix\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/number_prefix-0.4.0/src/lib.rs\",\"edition\":\"2015\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"default\",\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libnumber_prefix-531fe2cfc1d66054.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#termcolor@1.1.3\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/termcolor-1.1.3/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"termcolor\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/termcolor-1.1.3/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libtermcolor-1c185e20c5f8c915.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#strsim@0.10.0\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"strsim\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/strsim-0.10.0/src/lib.rs\",\"edition\":\"2015\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libstrsim-8915360a20606875.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#bitflags@2.8.0\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.8.0/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"bitflags\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-2.8.0/src/lib.rs\",\"edition\":\"2021\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libbitflags-4314bdafae61c42e.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#toml_edit@0.14.4\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/toml_edit-0.14.4/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"toml_edit\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/toml_edit-0.14.4/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"default\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libtoml_edit-db2a2a06ace1a3cd.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#fastly-api@1.0.0-beta.0\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-api-1.0.0-beta.0/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"fastly_api\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/fastly-api-1.0.0-beta.0/src/lib.rs\",\"edition\":\"2021\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libfastly_api-7d2ad889a12000da.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#phf@0.11.1\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/phf-0.11.1/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"phf\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/phf-0.11.1/src/lib.rs\",\"edition\":\"2021\",\"doc\":true,\"doctest\":true,\"test\":false},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"default\",\"macros\",\"phf_macros\",\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libphf-a8ed2766bc4a7aa1.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#futures@0.3.24\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-0.3.24/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"futures\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-0.3.24/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"alloc\",\"async-await\",\"default\",\"executor\",\"futures-executor\",\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libfutures-20c4e536a3dc90f0.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#simple-error@0.2.3\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/simple-error-0.2.3/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"simple_error\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/simple-error-0.2.3/src/lib.rs\",\"edition\":\"2015\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libsimple_error-536fd3cff8fc74fa.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#sha2@0.10.6\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sha2-0.10.6/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"sha2\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sha2-0.10.6/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"default\",\"std\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libsha2-86d591b7436c54dc.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#indicatif@0.17.1\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/indicatif-0.17.1/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"indicatif\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/indicatif-0.17.1/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"default\",\"unicode-width\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libindicatif-21c89e1334be5a7c.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#walkdir@2.3.2\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/walkdir-2.3.2/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"walkdir\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/walkdir-2.3.2/src/lib.rs\",\"edition\":\"2018\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libwalkdir-160c19bbaef56868.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#openssl@0.10.70\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-0.10.70/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"openssl\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-0.10.70/src/lib.rs\",\"edition\":\"2021\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"default\",\"vendored\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libopenssl-b8e686407f9c8aa5.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"registry+https://github.com/rust-lang/crates.io-index#clap@4.0.13\",\"manifest_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap-4.0.13/Cargo.toml\",\"target\":{\"kind\":[\"lib\"],\"crate_types\":[\"lib\"],\"name\":\"clap\",\"src_path\":\"/Users/zkat/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap-4.0.13/src/lib.rs\",\"edition\":\"2021\",\"doc\":true,\"doctest\":true,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[\"color\",\"default\",\"error-context\",\"help\",\"std\",\"suggestions\",\"usage\"],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libclap-17817d23df85a006.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"path+file:///Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli#1.1.0\",\"manifest_path\":\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/Cargo.toml\",\"target\":{\"kind\":[\"bin\"],\"crate_types\":[\"bin\"],\"name\":\"compute-file-server-cli\",\"src_path\":\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/src/main.rs\",\"edition\":\"2021\",\"doc\":true,\"doctest\":false,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":false},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libcompute_file_server_cli-7fe6e195b2448dcc.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"compiler-artifact\",\"package_id\":\"path+file:///Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli#1.1.0\",\"manifest_path\":\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/Cargo.toml\",\"target\":{\"kind\":[\"bin\"],\"crate_types\":[\"bin\"],\"name\":\"compute-file-server-cli\",\"src_path\":\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/src/main.rs\",\"edition\":\"2021\",\"doc\":true,\"doctest\":false,\"test\":true},\"profile\":{\"opt_level\":\"0\",\"debuginfo\":2,\"debug_assertions\":true,\"overflow_checks\":true,\"test\":true},\"features\":[],\"filenames\":[\"/Users/zkat/src/fastly/js-compute-runtime/compute-file-server-cli/target/debug/deps/libcompute_file_server_cli-3657abf82c3a412c.rmeta\"],\"executable\":null,\"fresh\":true}\n{\"reason\":\"build-finished\",\"success\":true}\n"
  },
  {
    "path": "test-d/backend.test-d.ts",
    "content": "/// <reference path=\"../types/backend.d.ts\" />\nimport { Backend } from 'fastly:backend';\nimport { expectError, expectType } from 'tsd';\n\n// Backend\n{\n  expectError(Backend());\n  expectError(new Backend());\n  expectError(new Backend({ name: 'eu' }));\n  expectType<Backend>(new Backend({ target: 'www.example.com' }));\n  expectType<Backend>(new Backend({ name: 'eu', target: 'www.example.com' }));\n  expectType<Backend>(\n    new Backend({\n      name: 'eu',\n      target: 'www.example.com',\n      hostOverride: 'example.com',\n    }),\n  );\n  expectType<Backend>(\n    new Backend({\n      name: 'eu',\n      target: 'www.example.com',\n      connectTimeout: 5000,\n    }),\n  );\n  expectType<Backend>(\n    new Backend({\n      name: 'eu',\n      target: 'www.example.com',\n      firstByteTimeout: 5000,\n    }),\n  );\n  expectType<Backend>(\n    new Backend({\n      name: 'eu',\n      target: 'www.example.com',\n      betweenBytesTimeout: 5000,\n    }),\n  );\n  expectType<Backend>(\n    new Backend({ name: 'eu', target: 'www.example.com', useSSL: true }),\n  );\n  expectType<Backend>(\n    new Backend({ name: 'eu', target: 'www.example.com', dontPool: true }),\n  );\n  expectType<Backend>(\n    new Backend({ name: 'eu', target: 'www.example.com', tlsMinVersion: 1.2 }),\n  );\n  expectType<Backend>(\n    new Backend({ name: 'eu', target: 'www.example.com', tlsMaxVersion: 1.2 }),\n  );\n  expectType<Backend>(\n    new Backend({\n      name: 'eu',\n      target: 'www.example.com',\n      certificateHostname: 'example.com',\n    }),\n  );\n  expectType<Backend>(\n    new Backend({ name: 'eu', target: 'www.example.com', caCertificate: '' }),\n  );\n  expectType<Backend>(\n    new Backend({ name: 'eu', target: 'www.example.com', ciphers: 'DEFAULT' }),\n  );\n  expectType<Backend>(\n    new Backend({\n      name: 'eu',\n      target: 'www.example.com',\n      sniHostname: 'example.com',\n    }),\n  );\n  const backend = new Backend({ name: 'eu', target: 'www.example.com' });\n  expectType<string>(backend.toString());\n}\n"
  },
  {
    "path": "test-d/cache-override.test-d.ts",
    "content": "/// <reference path=\"../types/cache-override.d.ts\" />\nimport { CacheOverride } from 'fastly:cache-override';\nimport { expectType } from 'tsd';\n\n// CacheOverride\n{\n  expectType<CacheOverride>(new CacheOverride('none'));\n  expectType<CacheOverride>(new CacheOverride('pass'));\n  expectType<CacheOverride>(new CacheOverride('override'));\n  expectType<CacheOverride>(new CacheOverride('none', { ttl: undefined }));\n  expectType<CacheOverride>(new CacheOverride('none', { ttl: 1 }));\n  expectType<CacheOverride>(new CacheOverride('none', { swr: undefined }));\n  expectType<CacheOverride>(new CacheOverride('none', { swr: 1 }));\n  expectType<CacheOverride>(\n    new CacheOverride('none', { surrogateKey: undefined }),\n  );\n  expectType<CacheOverride>(\n    new CacheOverride('none', { surrogateKey: 'undefined' }),\n  );\n  expectType<CacheOverride>(new CacheOverride('none', { pci: undefined }));\n  expectType<CacheOverride>(new CacheOverride('none', { pci: true }));\n  expectType<CacheOverride>(new CacheOverride('pass', {}));\n  expectType<CacheOverride>(new CacheOverride('override', {}));\n  const cacheOverride = new CacheOverride('none');\n  expectType<'none' | 'pass' | 'override'>(cacheOverride.mode);\n  expectType<boolean | undefined>(cacheOverride.pci);\n  expectType<number | undefined>(cacheOverride.ttl);\n  expectType<number | undefined>(cacheOverride.swr);\n  expectType<string | undefined>(cacheOverride.surrogateKey);\n}\n"
  },
  {
    "path": "test-d/compute.test-d.ts",
    "content": "/// <reference path=\"../types/compute.d.ts\" />\nimport { vCpuTime, purgeSurrogateKey } from 'fastly:compute';\nimport { expectType } from 'tsd';\n\n// Compute\n{\n  expectType<number>(vCpuTime());\n  expectType<void>(purgeSurrogateKey('boo'));\n}\n"
  },
  {
    "path": "test-d/config-store.test-d.ts",
    "content": "/// <reference path=\"../types/config-store.d.ts\" />\nimport { ConfigStore } from 'fastly:config-store';\nimport { expectError, expectType } from 'tsd';\n\n// ConfigStore\n{\n  expectError(new ConfigStore());\n  expectError(ConfigStore('example'));\n  expectError(ConfigStore());\n  expectType<ConfigStore>(new ConfigStore('example'));\n  expectType<(key: string) => string | null>(new ConfigStore('example').get);\n}\n"
  },
  {
    "path": "test-d/dictionary.test-d.ts",
    "content": "/// <reference path=\"../types/dictionary.d.ts\" />\nimport { Dictionary } from 'fastly:dictionary';\nimport { expectError, expectType } from 'tsd';\n\n// Dictionary\n{\n  expectError(new Dictionary());\n  expectError(Dictionary('example'));\n  expectError(Dictionary());\n  expectType<Dictionary>(new Dictionary('example'));\n  expectType<(key: string) => string | null>(new Dictionary('example').get);\n}\n"
  },
  {
    "path": "test-d/env.test-d.ts",
    "content": "/// <reference path=\"../types/env.d.ts\" />\nimport { env } from 'fastly:env';\nimport { expectType } from 'tsd';\n\nexpectType<(key: string) => string>(env);\n"
  },
  {
    "path": "test-d/experimental.test-d.ts",
    "content": "/// <reference path=\"../types/experimental.d.ts\" />\nimport {\n  setBaseURL,\n  setDefaultBackend,\n  enableDebugLogging,\n  includeBytes,\n  allowDynamicBackends,\n} from 'fastly:experimental';\nimport { expectType } from 'tsd';\n\nexpectType<(path: string) => Uint8Array<ArrayBuffer>>(includeBytes);\nexpectType<(enabled: boolean) => void>(enableDebugLogging);\nexpectType<(base: URL | null | undefined) => void>(setBaseURL);\nexpectType<(backend: string) => void>(setDefaultBackend);\nexpectType<{\n  (enabled: boolean): void;\n  (defaultConfig: {\n    connectTimeout?: number | undefined;\n    firstByteTimeout?: number | undefined;\n    betweenBytesTimeout?: number | undefined;\n  }): void;\n}>(allowDynamicBackends);\n"
  },
  {
    "path": "test-d/fanout.test-d.ts",
    "content": "/// <reference path=\"../types/fanout.d.ts\" />\nimport { createFanoutHandoff } from 'fastly:fanout';\nimport { expectType } from 'tsd';\n\nexpectType<(request: Request, backend: string) => Response>(\n  createFanoutHandoff,\n);\n"
  },
  {
    "path": "test-d/geolocation.test-d.ts",
    "content": "/// <reference path=\"../types/geolocation.d.ts\" />\nimport { Geolocation, getGeolocationForIpAddress } from 'fastly:geolocation';\nimport { expectType } from 'tsd';\n\nexpectType<(address: string) => Geolocation | null>(getGeolocationForIpAddress);\n\nconst geo = {} as Geolocation;\nexpectType<string | null>(geo.as_name);\nexpectType<number | null>(geo.as_number);\nexpectType<number | null>(geo.area_code);\nexpectType<string | null>(geo.city);\nexpectType<string | null>(geo.conn_speed);\nexpectType<string | null>(geo.conn_type);\nexpectType<string | null>(geo.continent);\nexpectType<string | null>(geo.country_code);\nexpectType<string | null>(geo.country_code3);\nexpectType<string | null>(geo.gmt_offset);\nexpectType<number | null>(geo.latitude);\nexpectType<number | null>(geo.longitude);\nexpectType<number | null>(geo.metro_code);\nexpectType<string | null>(geo.postal_code);\nexpectType<string | null>(geo.proxy_description);\nexpectType<string | null>(geo.proxy_type);\nexpectType<string | null>(geo.region);\nexpectType<number | null>(geo.utc_offset);\n"
  },
  {
    "path": "test-d/globals.test-d.ts",
    "content": "/// <reference path=\"../types/globals.d.ts\" />\n\nimport { expectError, expectType } from 'tsd';\n// atob\n{\n  expectError(atob());\n  expectError(atob(1));\n  expectError(atob({}));\n  expectError(atob([]));\n  expectError(atob(true));\n  expectError(atob(Symbol()));\n  expectError(atob(function () {}));\n  expectType<string>(atob(''));\n}\n\n// btoa\n{\n  expectError(btoa());\n  expectError(btoa(1));\n  expectError(btoa({}));\n  expectError(btoa([]));\n  expectError(btoa(true));\n  expectError(btoa(Symbol()));\n  expectError(btoa(function () {}));\n  expectType<string>(btoa(''));\n}\n\n// setTimeout\n{\n  expectError(setTimeout());\n  expectError(setTimeout(null));\n  expectError(setTimeout(1));\n  expectError(setTimeout({}));\n  expectError(setTimeout([]));\n  expectError(setTimeout(true));\n  expectError(setTimeout(Symbol()));\n  expectType<number>(setTimeout(() => {}));\n  expectType<number>(setTimeout(() => {}, 1000));\n  expectError(setTimeout(() => {}, 1000, 1));\n  expectType<number>(setTimeout((x) => {}, 1000, 1));\n  expectError(setTimeout((x) => {}, 1000, 1, 2));\n  expectType<number>(setTimeout((x, y) => {}, 1000, 1, 2));\n}\n\n// clearTimeout\n{\n  expectError(clearTimeout(null));\n  expectError(clearTimeout({}));\n  expectError(clearTimeout([]));\n  expectError(clearTimeout(true));\n  expectError(clearTimeout(Symbol()));\n  expectType<void>(clearTimeout());\n  expectType<void>(clearTimeout(1));\n}\n\n// setInterval\n{\n  expectError(setInterval());\n  expectError(setInterval(null));\n  expectError(setInterval(1));\n  expectError(setInterval({}));\n  expectError(setInterval([]));\n  expectError(setInterval(true));\n  expectError(setInterval(Symbol()));\n  expectType<number>(setInterval(() => {}));\n  expectType<number>(setInterval(() => {}, 1000));\n  expectError(setInterval(() => {}, 1000, 1));\n  expectType<number>(setInterval((x) => {}, 1000, 1));\n  expectError(setInterval((x) => {}, 1000, 1, 2));\n  expectType<number>(setInterval((x, y) => {}, 1000, 1, 2));\n}\n\n// clearInterval\n{\n  expectError(clearInterval(null));\n  expectError(clearInterval({}));\n  expectError(clearInterval([]));\n  expectError(clearInterval(true));\n  expectError(clearInterval(Symbol()));\n  expectType<void>(clearInterval());\n  expectType<void>(clearInterval(1));\n}\n\n// Backend\n{\n  expectError(Backend());\n  expectError(new Backend());\n  expectError(new Backend({ name: 'eu' }));\n  expectType<Backend>(new Backend({ target: 'www.example.com' }));\n  expectType<Backend>(new Backend({ name: 'eu', target: 'www.example.com' }));\n  expectType<Backend>(\n    new Backend({\n      name: 'eu',\n      target: 'www.example.com',\n      hostOverride: 'example.com',\n    }),\n  );\n  expectType<Backend>(\n    new Backend({\n      name: 'eu',\n      target: 'www.example.com',\n      connectTimeout: 5000,\n    }),\n  );\n  expectType<Backend>(\n    new Backend({\n      name: 'eu',\n      target: 'www.example.com',\n      firstByteTimeout: 5000,\n    }),\n  );\n  expectType<Backend>(\n    new Backend({\n      name: 'eu',\n      target: 'www.example.com',\n      betweenBytesTimeout: 5000,\n    }),\n  );\n  expectType<Backend>(\n    new Backend({ name: 'eu', target: 'www.example.com', useSSL: true }),\n  );\n  expectType<Backend>(\n    new Backend({ name: 'eu', target: 'www.example.com', tlsMinVersion: 1.2 }),\n  );\n  expectType<Backend>(\n    new Backend({ name: 'eu', target: 'www.example.com', tlsMaxVersion: 1.2 }),\n  );\n  expectType<Backend>(\n    new Backend({\n      name: 'eu',\n      target: 'www.example.com',\n      certificateHostname: 'example.com',\n    }),\n  );\n  expectType<Backend>(\n    new Backend({ name: 'eu', target: 'www.example.com', caCertificate: '' }),\n  );\n  expectType<Backend>(\n    new Backend({ name: 'eu', target: 'www.example.com', ciphers: 'DEFAULT' }),\n  );\n  expectType<Backend>(\n    new Backend({\n      name: 'eu',\n      target: 'www.example.com',\n      sniHostname: 'example.com',\n    }),\n  );\n  const backend = new Backend({ name: 'eu', target: 'www.example.com' });\n  expectType<string>(backend.toString());\n}\n\n// KVStore\n{\n  expectError(KVStore());\n  expectError(KVStore('secrets'));\n  expectType<KVStore>(new KVStore('secrets'));\n  expectError(new KVStore('secrets', {}));\n  const store = new KVStore('secrets');\n  expectError(store.get());\n  expectError(store.get(1));\n  expectType<Promise<KVStoreEntry | null>>(store.get('cat'));\n  expectError(store.put());\n  expectError(store.put('cat'));\n  expectError(store.put('cat', 1));\n  expectType<Promise<undefined>>(store.put('cat', 'Aki'));\n}\n\n// KVStoreEntry\n{\n  const entry = {} as KVStoreEntry;\n  expectType<ReadableStream<any>>(entry.body);\n  expectType<boolean>(entry.bodyUsed);\n  expectType<Promise<ArrayBuffer>>(entry.arrayBuffer());\n  expectType<Promise<object>>(entry.json());\n  expectType<Promise<string>>(entry.text());\n}\n\n// onfetch\n{\n  expectType<FetchEventListener>(onfetch);\n}\n\n// addEventListener\n{\n  // Both parameters are required:\n  //  - The first parameter _has_ to be 'fetch'\n  //  - The second parameter _has_ to be a function\n  expectError(addEventListener('magic'));\n  expectError(addEventListener('fetch'));\n  expectError<void>(addEventListener('magic', () => {}));\n  expectType<void>(addEventListener('fetch', () => {}));\n  expectType<void>(\n    addEventListener('fetch', (event) => {\n      expectType<FetchEvent>(event);\n    }),\n  );\n}\n\n// FetchEventListener\n{\n  let listener = (() => {}) as FetchEventListener;\n  expectType<(event: FetchEvent) => any>(listener);\n}\n\n// FetchEvent\n{\n  const event = {} as FetchEvent;\n  expectType<ClientInfo>(event.client);\n  expectType<ServerInfo>(event.server);\n  expectType<Request>(event.request);\n  expectType<(response: Response | PromiseLike<Response>) => void>(\n    event.respondWith,\n  );\n  expectType<(promise: Promise<any>) => void>(event.waitUntil);\n}\n\n// CacheOverrideMode\n{\n  const cacheOverride = {} as CacheOverrideMode;\n  expectType<'none' | 'pass' | 'override'>(cacheOverride);\n}\n\n// CacheOverride\n{\n  expectType<CacheOverride>(new CacheOverride('none'));\n  expectType<CacheOverride>(new CacheOverride('pass'));\n  expectType<CacheOverride>(new CacheOverride('override'));\n  expectType<CacheOverride>(new CacheOverride('none', { ttl: undefined }));\n  expectType<CacheOverride>(new CacheOverride('none', { ttl: 1 }));\n  expectType<CacheOverride>(new CacheOverride('none', { swr: undefined }));\n  expectType<CacheOverride>(new CacheOverride('none', { swr: 1 }));\n  expectType<CacheOverride>(\n    new CacheOverride('none', { surrogateKey: undefined }),\n  );\n  expectType<CacheOverride>(\n    new CacheOverride('none', { surrogateKey: 'undefined' }),\n  );\n  expectType<CacheOverride>(new CacheOverride('none', { pci: undefined }));\n  expectType<CacheOverride>(new CacheOverride('none', { pci: true }));\n  expectType<CacheOverride>(new CacheOverride('pass', {}));\n  expectType<CacheOverride>(new CacheOverride('override', {}));\n  const cacheOverride = new CacheOverride('none');\n  expectType<CacheOverrideMode>(cacheOverride.mode);\n  expectType<boolean | undefined>(cacheOverride.pci);\n  expectType<number | undefined>(cacheOverride.ttl);\n  expectType<number | undefined>(cacheOverride.swr);\n  expectType<string | undefined>(cacheOverride.surrogateKey);\n}\n\n// CacheOverrideInit\n{\n  const cacheOverrideInit = {} as CacheOverrideInit;\n  expectType<boolean | undefined>(cacheOverrideInit.pci);\n  expectType<number | undefined>(cacheOverrideInit.ttl);\n  expectType<number | undefined>(cacheOverrideInit.swr);\n  expectType<string | undefined>(cacheOverrideInit.surrogateKey);\n}\n\n// ClientInfo\n{\n  const client = {} as ClientInfo;\n  expectType<string>(client.requestId);\n  expectType<string>(client.address);\n  expectType<Geolocation | null>(client.geo);\n  expectType<string | null>(client.tlsJA3MD5);\n  expectType<string | null>(client.tlsCipherOpensslName);\n  expectType<string | null>(client.tlsProtocol);\n  expectType<ArrayBuffer | null>(client.tlsClientCertificate);\n  expectType<ArrayBuffer | null>(client.tlsClientHello);\n  // They are readonly properties\n  expectError((client.requestId = ''));\n  expectError((client.address = ''));\n  expectError((client.geo = {} as Geolocation));\n  expectError((client.tlsJA3MD5 = ''));\n  expectError((client.tlsCipherOpensslName = ''));\n  expectError((client.tlsProtocol = ''));\n  expectError((client.tlsClientCertificate = ''));\n  expectError((client.tlsClientHello = ''));\n}\n\n// ServerInfo\n{\n  const server = {} as ServerInfo;\n  expectType<string>(server.address);\n  // They are readonly properties\n  expectError((server.address = ''));\n}\n\n// ConfigStore\n{\n  expectError(new ConfigStore());\n  expectError(ConfigStore('example'));\n  expectError(ConfigStore());\n  expectType<ConfigStore>(new ConfigStore('example'));\n  expectType<(key: string) => string>(new ConfigStore('example').get);\n}\n\n// Dictionary\n{\n  expectError(new Dictionary());\n  expectError(Dictionary('example'));\n  expectError(Dictionary());\n  expectType<Dictionary>(new Dictionary('example'));\n  expectType<(key: string) => string>(new Dictionary('example').get);\n}\n\n// Geolocation\n{\n  const geo = {} as Geolocation;\n  expectType<string | null>(geo.as_name);\n  expectType<number | null>(geo.as_number);\n  expectType<number | null>(geo.area_code);\n  expectType<string | null>(geo.city);\n  expectType<string | null>(geo.conn_speed);\n  expectType<string | null>(geo.conn_type);\n  expectType<string | null>(geo.continent);\n  expectType<string | null>(geo.country_code);\n  expectType<string | null>(geo.country_code3);\n  expectType<string | null>(geo.gmt_offset);\n  expectType<number | null>(geo.latitude);\n  expectType<number | null>(geo.longitude);\n  expectType<number | null>(geo.metro_code);\n  expectType<string | null>(geo.postal_code);\n  expectType<string | null>(geo.proxy_description);\n  expectType<string | null>(geo.proxy_type);\n  expectType<string | null>(geo.region);\n  expectType<number | null>(geo.utc_offset);\n}\n\n// URL\n{\n  expectError(new URL());\n  expectError(URL('example'));\n  expectError(URL('example', 'base'));\n  expectError(URL('example', new URL('example')));\n  expectError(URL());\n  expectType<URL>(new URL('example'));\n  expectType<URL>(new URL('example', 'base'));\n  expectType<URL>(new URL('example', new URL('example')));\n\n  expectType<string>(new URL('').href);\n  new URL('').href = 'example';\n  expectError((new URL('').href = 7));\n\n  expectType<string>(new URL('').origin);\n  expectError((new URL('').origin = 'example'));\n\n  expectType<string>(new URL('').protocol);\n  new URL('').protocol = '7';\n  expectError((new URL('').protocol = 7));\n\n  expectType<string>(new URL('').username);\n  new URL('').username = '7';\n  expectError((new URL('').username = 7));\n\n  expectType<string>(new URL('').password);\n  new URL('').password = '7';\n  expectError((new URL('').password = 7));\n\n  expectType<string>(new URL('').host);\n  new URL('').host = '7';\n  expectError((new URL('').host = 7));\n\n  expectType<string>(new URL('').hostname);\n  new URL('').hostname = '7';\n  expectError((new URL('').hostname = 7));\n\n  expectType<string>(new URL('').port);\n  new URL('').port = '7';\n  expectError((new URL('').port = 7));\n\n  expectType<string>(new URL('').pathname);\n  new URL('').pathname = '7';\n  expectError((new URL('').pathname = 7));\n\n  expectType<string>(new URL('').search);\n  new URL('').search = '7';\n  expectError((new URL('').search = 7));\n\n  expectType<URLSearchParams>(new URL('').searchParams);\n\n  expectType<string>(new URL('').hash);\n  new URL('').hash = '7';\n  expectError((new URL('').hash = 7));\n}\n\n// URLSearchParams\n{\n  expectError(URLSearchParams());\n  expectError(new URLSearchParams(false));\n  expectType<URLSearchParams>(new URLSearchParams([]));\n  expectType<URLSearchParams>(\n    new URLSearchParams({\n      [Symbol.iterator]: function* () {\n        yield ['', ''];\n        return;\n      },\n    }),\n  );\n  expectType<URLSearchParams>(new URLSearchParams({}));\n  expectType<URLSearchParams>(new URLSearchParams({ a: 'a' }));\n  expectType<URLSearchParams>(new URLSearchParams(''));\n  const searchParams = new URLSearchParams();\n\n  expectType<(name: string, value: string) => void>(searchParams.append);\n  expectType<(name: string) => void>(searchParams.delete);\n  expectType<(name: string) => string | null>(searchParams.get);\n  expectType<(name: string) => string[]>(searchParams.getAll);\n  expectType<(name: string) => boolean>(searchParams.has);\n  expectType<(name: string, value: string) => void>(searchParams.set);\n  expectType<() => void>(searchParams.sort);\n\n  expectType<() => IterableIterator<string>>(searchParams.keys);\n  expectType<() => IterableIterator<string>>(searchParams.values);\n  expectType<() => IterableIterator<[name: string, value: string]>>(\n    searchParams.entries,\n  );\n  expectType<\n    <THIS_ARG = void>(\n      callback: (\n        this: THIS_ARG,\n        value: string,\n        name: string,\n        searchParams: URLSearchParams,\n      ) => void,\n      thisArg?: THIS_ARG,\n    ) => void\n  >(searchParams.forEach);\n\n  expectType<'URLSearchParams'>(searchParams[Symbol.toStringTag]);\n  expectError((searchParams[Symbol.toStringTag] = 'f'));\n  expectType<IterableIterator<[name: string, value: string]>>(\n    searchParams[Symbol.iterator](),\n  );\n}\n\n// console\n{\n  expectType<Console>(console);\n  expectType<(...objects: any[]) => void>(console.log);\n  expectType<(...objects: any[]) => void>(console.debug);\n  expectType<(...objects: any[]) => void>(console.info);\n  expectType<(...objects: any[]) => void>(console.warn);\n  expectType<(...objects: any[]) => void>(console.error);\n}\n\n// TextDecoder\n{\n  expectError(TextDecoder());\n  expectError(new TextDecoder(''));\n  const decoder = new TextDecoder();\n  expectType<TextDecoder>(decoder);\n  expectType<(input?: ArrayBuffer | ArrayBufferView) => string>(decoder.decode);\n  expectType<'utf-8'>(decoder.encoding);\n  expectError((decoder.encoding = 'd'));\n}\n\n// TextEncoder\n{\n  expectError(TextEncoder());\n  expectError(new TextEncoder(''));\n  const encoder = new TextEncoder();\n  expectType<TextEncoder>(encoder);\n  expectType<(input?: string) => Uint8Array<ArrayBuffer>>(encoder.encode);\n  expectType<'utf-8'>(encoder.encoding);\n  expectError((encoder.encoding = 'd'));\n}\n\n// Logger\n{\n  const logger = {} as Logger;\n  expectType<(message: any) => void>(logger.log);\n}\n\n// Fastly\n{\n  expectType<Fastly>(fastly);\n  expectType<URL | null>(fastly.baseURL);\n  fastly.baseURL = new URL('.');\n  fastly.baseURL = null;\n  fastly.baseURL = undefined;\n  expectType<string>(fastly.defaultBackend);\n  fastly.defaultBackend = '.';\n  expectType<(key: string) => string>(fastly.env.get);\n  expectType<(endpoint: string) => Logger>(fastly.getLogger);\n  expectType<(enabled: boolean) => void>(fastly.enableDebugLogging);\n  expectType<(address: string) => Geolocation>(\n    fastly.getGeolocationForIpAddress,\n  );\n  expectType<(path: string) => Uint8Array<ArrayBuffer>>(fastly.includeBytes);\n}\n\n// CompressionStream\n{\n  expectError(CompressionStream());\n  expectError(new CompressionStream(''));\n  let stream = new CompressionStream('deflate');\n  stream = new CompressionStream('deflate-raw');\n  stream = new CompressionStream('gzip');\n  expectType<ReadableStream<Uint8Array<ArrayBuffer>>>(stream.readable);\n  expectError((stream.readable = 'd'));\n  expectType<WritableStream<Uint8Array<ArrayBuffer>>>(stream.writable);\n  expectError((stream.writable = 'd'));\n}\n\n// DecompressionStream\n{\n  expectError(DecompressionStream());\n  expectError(new DecompressionStream(''));\n  let stream = new DecompressionStream('deflate');\n  stream = new DecompressionStream('deflate-raw');\n  stream = new DecompressionStream('gzip');\n  expectType<ReadableStream<Uint8Array<ArrayBuffer>>>(stream.readable);\n  expectError((stream.readable = 'd'));\n  expectType<WritableStream<Uint8Array<ArrayBuffer>>>(stream.writable);\n  expectError((stream.writable = 'd'));\n}\n"
  },
  {
    "path": "test-d/image-optimizer.test-d.ts",
    "content": "/// <reference path=\"../types/image-optimizer.d.ts\" />\nimport {\n  ImageOptimizerOptions,\n  optionsToQueryString,\n} from 'fastly:image-optimizer';\nimport { expectType } from 'tsd';\n\nexpectType<(options: ImageOptimizerOptions) => string>(optionsToQueryString);\n"
  },
  {
    "path": "test-d/kv-store.test-d.ts",
    "content": "/// <reference path=\"../types/kv-store.d.ts\" />\nimport { KVStore, KVStoreEntry } from 'fastly:kv-store';\nimport { expectError, expectType } from 'tsd';\n\n// KVStore\n{\n  expectError(KVStore());\n  expectError(KVStore('secrets'));\n  expectType<KVStore>(new KVStore('secrets'));\n  expectError(new KVStore('secrets', {}));\n  const store = new KVStore('secrets');\n  expectError(store.get());\n  expectError(store.get(1));\n  expectType<Promise<KVStoreEntry | null>>(store.get('cat'));\n  expectError(store.put());\n  expectError(store.put('cat'));\n  expectError(store.put('cat', 1));\n  expectType<Promise<undefined>>(store.put('cat', 'Aki'));\n}\n\n// KVStoreEntry\n{\n  const entry = {} as KVStoreEntry;\n  expectType<ReadableStream<any>>(entry.body);\n  expectType<boolean>(entry.bodyUsed);\n  expectType<Promise<ArrayBuffer>>(entry.arrayBuffer());\n  expectType<Promise<object>>(entry.json());\n  expectType<Promise<string>>(entry.text());\n}\n"
  },
  {
    "path": "test-d/logger.test-d.ts",
    "content": "/// <reference path=\"../types/logger.d.ts\" />\nimport { Logger } from 'fastly:logger';\nimport { expectError, expectType } from 'tsd';\n\nexpectError(new Logger());\nexpectError(Logger('example'));\nexpectError(Logger());\nexpectType<Logger>(new Logger('example'));\nexpectType<(message: any) => void>(new Logger('example').log);\n"
  },
  {
    "path": "test-d/shielding.test-d.ts",
    "content": "/// <reference path=\"../types/shielding.d.ts\" />\nimport { Shield } from 'fastly:shielding';\nimport { expectType, expectError } from 'tsd';\n\n// Shielding\n{\n  expectError(Shield());\n  expectType<Shield>(new Shield('dub-dublin-ie'));\n}\n"
  },
  {
    "path": "test-d/websocket.test-d.ts",
    "content": "/// <reference path=\"../types/websocket.d.ts\" />\nimport { createWebsocketHandoff } from 'fastly:websocket';\nimport { expectType } from 'tsd';\n\nexpectType<(request: Request, backend: string) => Response>(\n  createWebsocketHandoff,\n);\n"
  },
  {
    "path": "tests/wpt-harness/build-wpt-runtime.sh",
    "content": "#!/usr/bin/env bash\n\nset -euo pipefail\nscript_dir=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" &> /dev/null && pwd )\"\n\ninputs=(\n  \"${script_dir}/pre-harness.js\"\n  \"${script_dir}/wpt/resources/testharness.js\"\n  \"${script_dir}/post-harness.js\"\n)\n\ncat \"${inputs[@]}\" > \"${script_dir}/wpt-test-runner.js\"\nnode \"${script_dir}/../../dist/cli/js-compute-runtime-cli.js\" \"${script_dir}/wpt-test-runner.js\" \"$@\" wpt-runtime.wasm\n"
  },
  {
    "path": "tests/wpt-harness/expectations/FileAPI/blob/Blob-array-buffer.any.js.json",
    "content": "{\n  \"Blob.arrayBuffer()\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob.arrayBuffer() empty Blob data\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob.arrayBuffer() non-ascii input\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob.arrayBuffer() non-unicode input\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob.arrayBuffer() concurrent reads\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/FileAPI/blob/Blob-bytes.any.js.json",
    "content": "{\n  \"Blob.bytes()\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob.bytes() empty Blob data\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob.bytes() non-ascii input\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob.bytes() non-unicode input\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob.bytes() concurrent reads\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/FileAPI/blob/Blob-constructor-dom.window.js.json",
    "content": "{\n  \"Passing platform objects for blobParts should throw a TypeError.\": {\n    \"status\": \"FAIL\"\n  },\n  \"A platform object that supports indexed properties should be treated as a sequence for the blobParts argument (overwritten 'length'.)\": {\n    \"status\": \"FAIL\"\n  },\n  \"Passing an platform object that supports indexed properties as the blobParts array should work (select).\": {\n    \"status\": \"FAIL\"\n  },\n  \"Passing an platform object that supports indexed properties as the blobParts array should work (attributes).\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/FileAPI/blob/Blob-constructor.any.js.json",
    "content": "{\n  \"Blob interface object\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob constructor with no arguments\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob constructor with no arguments, without 'new'\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob constructor without brackets\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob constructor with undefined as first argument\": {\n    \"status\": \"PASS\"\n  },\n  \"Passing non-objects, Dates and RegExps for blobParts should throw a TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"A plain object with @@iterator should be treated as a sequence for the blobParts argument.\": {\n    \"status\": \"PASS\"\n  },\n  \"A plain object with custom @@iterator should be treated as a sequence for the blobParts argument.\": {\n    \"status\": \"PASS\"\n  },\n  \"A plain object with @@iterator and a length property should be treated as a sequence for the blobParts argument.\": {\n    \"status\": \"PASS\"\n  },\n  \"A String object should be treated as a sequence for the blobParts argument.\": {\n    \"status\": \"PASS\"\n  },\n  \"A Uint8Array object should be treated as a sequence for the blobParts argument.\": {\n    \"status\": \"PASS\"\n  },\n  \"The length getter should be invoked and any exceptions should be propagated.\": {\n    \"status\": \"PASS\"\n  },\n  \"ToUint32 should be applied to the length and any exceptions should be propagated.\": {\n    \"status\": \"PASS\"\n  },\n  \"Getters and value conversions should happen in order until an exception is thrown.\": {\n    \"status\": \"PASS\"\n  },\n  \"ToString should be called on elements of the blobParts array and any exceptions should be propagated.\": {\n    \"status\": \"PASS\"\n  },\n  \"Changes to the blobParts array should be reflected in the returned Blob (pop).\": {\n    \"status\": \"PASS\"\n  },\n  \"Changes to the blobParts array should be reflected in the returned Blob (unshift).\": {\n    \"status\": \"PASS\"\n  },\n  \"ToString should be called on elements of the blobParts array.\": {\n    \"status\": \"PASS\"\n  },\n  \"ArrayBuffer elements of the blobParts array should be supported.\": {\n    \"status\": \"PASS\"\n  },\n  \"Passing typed arrays as elements of the blobParts array should work.\": {\n    \"status\": \"PASS\"\n  },\n  \"Passing a Float16Array as element of the blobParts array should work.\": {\n    \"status\": \"PASS\"\n  },\n  \"Passing a Float64Array as element of the blobParts array should work.\": {\n    \"status\": \"PASS\"\n  },\n  \"Passing BigInt typed arrays as elements of the blobParts array should work.\": {\n    \"status\": \"PASS\"\n  },\n  \"Passing a FrozenArray as the blobParts array should work (FrozenArray<MessagePort>).\": {\n    \"status\": \"FAIL\"\n  },\n  \"Array with two blobs\": {\n    \"status\": \"PASS\"\n  },\n  \"Array with two buffers\": {\n    \"status\": \"PASS\"\n  },\n  \"Array with two bufferviews\": {\n    \"status\": \"PASS\"\n  },\n  \"Array with mixed types\": {\n    \"status\": \"PASS\"\n  },\n  \"options properties should be accessed in lexicographic order.\": {\n    \"status\": \"PASS\"\n  },\n  \"Arguments should be evaluated from left to right.\": {\n    \"status\": \"PASS\"\n  },\n  \"Passing null (index 0) for options should use the defaults.\": {\n    \"status\": \"PASS\"\n  },\n  \"Passing null (index 0) for options should use the defaults (with newlines).\": {\n    \"status\": \"PASS\"\n  },\n  \"Passing undefined (index 1) for options should use the defaults.\": {\n    \"status\": \"PASS\"\n  },\n  \"Passing undefined (index 1) for options should use the defaults (with newlines).\": {\n    \"status\": \"PASS\"\n  },\n  \"Passing object \\\"[object Object]\\\" (index 2) for options should use the defaults.\": {\n    \"status\": \"PASS\"\n  },\n  \"Passing object \\\"[object Object]\\\" (index 2) for options should use the defaults (with newlines).\": {\n    \"status\": \"PASS\"\n  },\n  \"Passing object \\\"[object Object]\\\" (index 3) for options should use the defaults.\": {\n    \"status\": \"PASS\"\n  },\n  \"Passing object \\\"[object Object]\\\" (index 3) for options should use the defaults (with newlines).\": {\n    \"status\": \"PASS\"\n  },\n  \"Passing object \\\"/regex/\\\" (index 4) for options should use the defaults.\": {\n    \"status\": \"PASS\"\n  },\n  \"Passing object \\\"/regex/\\\" (index 4) for options should use the defaults (with newlines).\": {\n    \"status\": \"PASS\"\n  },\n  \"Passing function \\\"function() {}\\\" (index 5) for options should use the defaults.\": {\n    \"status\": \"PASS\"\n  },\n  \"Passing function \\\"function() {}\\\" (index 5) for options should use the defaults (with newlines).\": {\n    \"status\": \"PASS\"\n  },\n  \"Passing 123 for options should throw\": {\n    \"status\": \"PASS\"\n  },\n  \"Passing 123.4 for options should throw\": {\n    \"status\": \"PASS\"\n  },\n  \"Passing true for options should throw\": {\n    \"status\": \"PASS\"\n  },\n  \"Passing \\\"abc\\\" for options should throw\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob with type \\\"\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob with type \\\"a\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob with type \\\"A\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob with type \\\"text/html\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob with type \\\"TEXT/HTML\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob with type \\\"text/plain;charset=utf-8\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob with type \\\"å\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob with type \\\"𐑾\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob with type \\\" image/gif \\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob with type \\\"\\\\timage/gif\\\\t\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob with type \\\"image/gif;\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob with type \\\"İmage/gif\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob with type \\\"ımage/gif\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob with type \\\"image/gif\\\\0\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob with type \\\"unknown/unknown\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob with type \\\"text/plain\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob with type \\\"image/png\\\"\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/FileAPI/blob/Blob-slice-overflow.any.js.json",
    "content": "{\n  \"slice start is negative, relativeStart will be max((size + start), 0)\": {\n    \"status\": \"PASS\"\n  },\n  \"slice start is greater than blob size, relativeStart will be min(start, size)\": {\n    \"status\": \"PASS\"\n  },\n  \"slice end is negative, relativeEnd will be max((size + end), 0)\": {\n    \"status\": \"PASS\"\n  },\n  \"slice end is greater than blob size, relativeEnd will be min(end, size)\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/FileAPI/blob/Blob-slice.any.js.json",
    "content": "{\n  \"no-argument Blob slice\": {\n    \"status\": \"PASS\"\n  },\n  \"Slices\": {\n    \"status\": \"PASS\"\n  },\n  \"blob1.\": {\n    \"status\": \"PASS\"\n  },\n  \"blob2.\": {\n    \"status\": \"PASS\"\n  },\n  \"null type Blob slice\": {\n    \"status\": \"PASS\"\n  },\n  \"undefined type Blob slice\": {\n    \"status\": \"PASS\"\n  },\n  \"no type Blob slice\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (0,0).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (0,0).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (0,1).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (0,1).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (0,2).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (0,2).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (0,3).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (0,3).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (0,4).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (0,4).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (0,5).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (0,5).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (0,6).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (0,6).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (0,7).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (0,7).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (0,8).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (0,8).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (1,0).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (1,0).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (1,1).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (1,1).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (1,2).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (1,2).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (1,3).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (1,3).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (1,4).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (1,4).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (1,5).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (1,5).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (1,6).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (1,6).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (1,7).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (1,7).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (2,0).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (2,0).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (2,1).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (2,1).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (2,2).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (2,2).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (2,3).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (2,3).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (3,0).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (3,0).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (3,1).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (3,1).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (3,2).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (3,2).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (3,3).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (3,3).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (3,4).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (3,4).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (3,5).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (3,5).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (4,0).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (4,0).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (4,1).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (4,1).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (4,2).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (4,2).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (4,3).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (4,3).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (4,4).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (4,4).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (5,0).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (5,0).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (5,1).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (5,1).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (5,2).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (5,2).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (5,3).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (5,3).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (6,0).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (6,0).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (6,1).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (6,1).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (6,2).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (6,2).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (7,0).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (7,0).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (7,1).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (7,1).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (7,2).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (7,2).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (7,3).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (7,3).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (8,0).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (8,0).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (8,1).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (8,1).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (8,2).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (8,2).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test (8,3).\": {\n    \"status\": \"PASS\"\n  },\n  \"Slicing test: slice (8,3).\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid contentType (\\\"ÿ\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid contentType (\\\"te\\\\txt/plain\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid contentType (\\\"te\\\\0xt/plain\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid contentType (\\\"te\\\\x1fxt/plain\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid contentType (\\\"text/plain\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"Valid contentType (\\\"te(xt/plain\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"Valid contentType (\\\"te)xt/plain\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"Valid contentType (\\\"te<xt/plain\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"Valid contentType (\\\"te>xt/plain\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"Valid contentType (\\\"te@xt/plain\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"Valid contentType (\\\"te,xt/plain\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"Valid contentType (\\\"te;xt/plain\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"Valid contentType (\\\"te:xt/plain\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"Valid contentType (\\\"te\\\\\\\\xt/plain\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"Valid contentType (\\\"te\\\\\\\"xt/plain\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"Valid contentType (\\\"te/xt/plain\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"Valid contentType (\\\"te[xt/plain\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"Valid contentType (\\\"te]xt/plain\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"Valid contentType (\\\"te?xt/plain\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"Valid contentType (\\\"te=xt/plain\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"Valid contentType (\\\"te{xt/plain\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"Valid contentType (\\\"te}xt/plain\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"Valid contentType (\\\"te xt/plain\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"Valid contentType (\\\"TEXT/PLAIN\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"Valid contentType (\\\"text/plain;charset = UTF-8\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"Valid contentType (\\\"text/plain;charset=UTF-8\\\")\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/FileAPI/blob/Blob-stream.any.js.json",
    "content": "{\n  \"Blob.stream()\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob.stream() empty Blob\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob.stream() non-unicode input\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob.stream() garbage collection of blob shouldn't break stream consumption\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob.stream() garbage collection of stream shouldn't break stream consumption\": {\n    \"status\": \"PASS\"\n  },\n  \"Reading Blob.stream() with BYOB reader\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/FileAPI/blob/Blob-text.any.js.json",
    "content": "{\n  \"Blob.text()\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob.text() empty blob data\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob.text() multi-element array in constructor\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob.text() non-unicode\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob.text() different charset param in type option\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob.text() different charset param with non-ascii input\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob.text() invalid utf-8 input\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob.text() concurrent reads\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/FileAPI/file/File-constructor.any.js.json",
    "content": "{\n  \"File interface object exists\": {\n    \"status\": \"PASS\"\n  },\n  \"Required arguments\": {\n    \"status\": \"PASS\"\n  },\n  \"empty fileBits\": {\n    \"status\": \"PASS\"\n  },\n  \"DOMString fileBits\": {\n    \"status\": \"PASS\"\n  },\n  \"Unicode DOMString fileBits\": {\n    \"status\": \"PASS\"\n  },\n  \"String object fileBits\": {\n    \"status\": \"PASS\"\n  },\n  \"Empty Blob fileBits\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob fileBits\": {\n    \"status\": \"PASS\"\n  },\n  \"Empty File fileBits\": {\n    \"status\": \"PASS\"\n  },\n  \"File fileBits\": {\n    \"status\": \"PASS\"\n  },\n  \"ArrayBuffer fileBits\": {\n    \"status\": \"PASS\"\n  },\n  \"Typed array fileBits\": {\n    \"status\": \"PASS\"\n  },\n  \"Various fileBits\": {\n    \"status\": \"PASS\"\n  },\n  \"Number in fileBits\": {\n    \"status\": \"PASS\"\n  },\n  \"Array in fileBits\": {\n    \"status\": \"PASS\"\n  },\n  \"Object in fileBits\": {\n    \"status\": \"PASS\"\n  },\n  \"Object with toString in fileBits\": {\n    \"status\": \"PASS\"\n  },\n  \"Custom @@iterator\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid bits argument: \\\"hello\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid bits argument: 0\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid bits argument: null\": {\n    \"status\": \"PASS\"\n  },\n  \"Bits argument: object that throws\": {\n    \"status\": \"PASS\"\n  },\n  \"Using fileName\": {\n    \"status\": \"PASS\"\n  },\n  \"No replacement when using special character in fileName\": {\n    \"status\": \"PASS\"\n  },\n  \"Using null fileName\": {\n    \"status\": \"PASS\"\n  },\n  \"Using number fileName\": {\n    \"status\": \"PASS\"\n  },\n  \"Using empty string fileName\": {\n    \"status\": \"PASS\"\n  },\n  \"Using type in File constructor: text/plain\": {\n    \"status\": \"PASS\"\n  },\n  \"Using type in File constructor: text/plain;charset=UTF-8\": {\n    \"status\": \"PASS\"\n  },\n  \"Using type in File constructor: TEXT/PLAIN\": {\n    \"status\": \"PASS\"\n  },\n  \"Using type in File constructor: 𝓽𝓮𝔁𝓽/𝔭𝔩𝔞𝔦𝔫\": {\n    \"status\": \"PASS\"\n  },\n  \"Using type in File constructor: ascii/nonprintable\\u001f\": {\n    \"status\": \"PASS\"\n  },\n  \"Using type in File constructor: ascii/nonprintable\": {\n    \"status\": \"PASS\"\n  },\n  \"Using type in File constructor: nonasciiî\": {\n    \"status\": \"PASS\"\n  },\n  \"Using type in File constructor: nonasciiሴ\": {\n    \"status\": \"PASS\"\n  },\n  \"Using type in File constructor: nonparsable\": {\n    \"status\": \"PASS\"\n  },\n  \"Using lastModified\": {\n    \"status\": \"PASS\"\n  },\n  \"Misusing name\": {\n    \"status\": \"PASS\"\n  },\n  \"Unknown properties are ignored\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid property bag: 123\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid property bag: 123.4\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid property bag: true\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid property bag: \\\"abc\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"Unusual but valid property bag: null\": {\n    \"status\": \"PASS\"\n  },\n  \"Unusual but valid property bag: undefined\": {\n    \"status\": \"PASS\"\n  },\n  \"Unusual but valid property bag: 1,2,3\": {\n    \"status\": \"PASS\"\n  },\n  \"Unusual but valid property bag: /regex/\": {\n    \"status\": \"PASS\"\n  },\n  \"Unusual but valid property bag: function() {}\": {\n    \"status\": \"PASS\"\n  },\n  \"Property bag propagates exceptions\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/WebCryptoAPI/digest/digest.https.any.js.json",
    "content": "{\n  \"SHA-1 with empty source data\": {\n    \"status\": \"PASS\"\n  },\n  \"sha-1 with empty source data\": {\n    \"status\": \"PASS\"\n  },\n  \"Sha-1 with empty source data\": {\n    \"status\": \"PASS\"\n  },\n  \"SHA-1 with empty source data and altered buffer after call\": {\n    \"status\": \"PASS\"\n  },\n  \"SHA-256 with empty source data\": {\n    \"status\": \"PASS\"\n  },\n  \"sha-256 with empty source data\": {\n    \"status\": \"PASS\"\n  },\n  \"Sha-256 with empty source data\": {\n    \"status\": \"PASS\"\n  },\n  \"SHA-256 with empty source data and altered buffer after call\": {\n    \"status\": \"PASS\"\n  },\n  \"SHA-384 with empty source data\": {\n    \"status\": \"PASS\"\n  },\n  \"sha-384 with empty source data\": {\n    \"status\": \"PASS\"\n  },\n  \"Sha-384 with empty source data\": {\n    \"status\": \"PASS\"\n  },\n  \"SHA-384 with empty source data and altered buffer after call\": {\n    \"status\": \"PASS\"\n  },\n  \"SHA-512 with empty source data\": {\n    \"status\": \"PASS\"\n  },\n  \"sha-512 with empty source data\": {\n    \"status\": \"PASS\"\n  },\n  \"Sha-512 with empty source data\": {\n    \"status\": \"PASS\"\n  },\n  \"SHA-512 with empty source data and altered buffer after call\": {\n    \"status\": \"PASS\"\n  },\n  \"SHA-1 with short source data\": {\n    \"status\": \"PASS\"\n  },\n  \"sha-1 with short source data\": {\n    \"status\": \"PASS\"\n  },\n  \"Sha-1 with short source data\": {\n    \"status\": \"PASS\"\n  },\n  \"SHA-1 with short source data and altered buffer after call\": {\n    \"status\": \"PASS\"\n  },\n  \"SHA-256 with short source data\": {\n    \"status\": \"PASS\"\n  },\n  \"sha-256 with short source data\": {\n    \"status\": \"PASS\"\n  },\n  \"Sha-256 with short source data\": {\n    \"status\": \"PASS\"\n  },\n  \"SHA-256 with short source data and altered buffer after call\": {\n    \"status\": \"PASS\"\n  },\n  \"SHA-384 with short source data\": {\n    \"status\": \"PASS\"\n  },\n  \"sha-384 with short source data\": {\n    \"status\": \"PASS\"\n  },\n  \"Sha-384 with short source data\": {\n    \"status\": \"PASS\"\n  },\n  \"SHA-384 with short source data and altered buffer after call\": {\n    \"status\": \"PASS\"\n  },\n  \"SHA-512 with short source data\": {\n    \"status\": \"PASS\"\n  },\n  \"sha-512 with short source data\": {\n    \"status\": \"PASS\"\n  },\n  \"Sha-512 with short source data\": {\n    \"status\": \"PASS\"\n  },\n  \"SHA-512 with short source data and altered buffer after call\": {\n    \"status\": \"PASS\"\n  },\n  \"SHA-1 with medium source data\": {\n    \"status\": \"PASS\"\n  },\n  \"sha-1 with medium source data\": {\n    \"status\": \"PASS\"\n  },\n  \"Sha-1 with medium source data\": {\n    \"status\": \"PASS\"\n  },\n  \"SHA-1 with medium source data and altered buffer after call\": {\n    \"status\": \"PASS\"\n  },\n  \"SHA-256 with medium source data\": {\n    \"status\": \"PASS\"\n  },\n  \"sha-256 with medium source data\": {\n    \"status\": \"PASS\"\n  },\n  \"Sha-256 with medium source data\": {\n    \"status\": \"PASS\"\n  },\n  \"SHA-256 with medium source data and altered buffer after call\": {\n    \"status\": \"PASS\"\n  },\n  \"SHA-384 with medium source data\": {\n    \"status\": \"PASS\"\n  },\n  \"sha-384 with medium source data\": {\n    \"status\": \"PASS\"\n  },\n  \"Sha-384 with medium source data\": {\n    \"status\": \"PASS\"\n  },\n  \"SHA-384 with medium source data and altered buffer after call\": {\n    \"status\": \"PASS\"\n  },\n  \"SHA-512 with medium source data\": {\n    \"status\": \"PASS\"\n  },\n  \"sha-512 with medium source data\": {\n    \"status\": \"PASS\"\n  },\n  \"Sha-512 with medium source data\": {\n    \"status\": \"PASS\"\n  },\n  \"SHA-512 with medium source data and altered buffer after call\": {\n    \"status\": \"PASS\"\n  },\n  \"SHA-1 with long source data\": {\n    \"status\": \"PASS\"\n  },\n  \"sha-1 with long source data\": {\n    \"status\": \"PASS\"\n  },\n  \"Sha-1 with long source data\": {\n    \"status\": \"PASS\"\n  },\n  \"SHA-1 with long source data and altered buffer after call\": {\n    \"status\": \"PASS\"\n  },\n  \"SHA-256 with long source data\": {\n    \"status\": \"PASS\"\n  },\n  \"sha-256 with long source data\": {\n    \"status\": \"PASS\"\n  },\n  \"Sha-256 with long source data\": {\n    \"status\": \"PASS\"\n  },\n  \"SHA-256 with long source data and altered buffer after call\": {\n    \"status\": \"PASS\"\n  },\n  \"SHA-384 with long source data\": {\n    \"status\": \"PASS\"\n  },\n  \"sha-384 with long source data\": {\n    \"status\": \"PASS\"\n  },\n  \"Sha-384 with long source data\": {\n    \"status\": \"PASS\"\n  },\n  \"SHA-384 with long source data and altered buffer after call\": {\n    \"status\": \"PASS\"\n  },\n  \"SHA-512 with long source data\": {\n    \"status\": \"PASS\"\n  },\n  \"sha-512 with long source data\": {\n    \"status\": \"PASS\"\n  },\n  \"Sha-512 with long source data\": {\n    \"status\": \"PASS\"\n  },\n  \"SHA-512 with long source data and altered buffer after call\": {\n    \"status\": \"PASS\"\n  },\n  \"AES-GCM with empty\": {\n    \"status\": \"PASS\"\n  },\n  \"RSA-OAEP with empty\": {\n    \"status\": \"PASS\"\n  },\n  \"PBKDF2 with empty\": {\n    \"status\": \"PASS\"\n  },\n  \"AES-KW with empty\": {\n    \"status\": \"PASS\"\n  },\n  \"AES-GCM with short\": {\n    \"status\": \"PASS\"\n  },\n  \"RSA-OAEP with short\": {\n    \"status\": \"PASS\"\n  },\n  \"PBKDF2 with short\": {\n    \"status\": \"PASS\"\n  },\n  \"AES-KW with short\": {\n    \"status\": \"PASS\"\n  },\n  \"AES-GCM with medium\": {\n    \"status\": \"PASS\"\n  },\n  \"RSA-OAEP with medium\": {\n    \"status\": \"PASS\"\n  },\n  \"PBKDF2 with medium\": {\n    \"status\": \"PASS\"\n  },\n  \"AES-KW with medium\": {\n    \"status\": \"PASS\"\n  },\n  \"AES-GCM with long\": {\n    \"status\": \"PASS\"\n  },\n  \"RSA-OAEP with long\": {\n    \"status\": \"PASS\"\n  },\n  \"PBKDF2 with long\": {\n    \"status\": \"PASS\"\n  },\n  \"AES-KW with long\": {\n    \"status\": \"PASS\"\n  },\n  \"empty algorithm object with empty\": {\n    \"status\": \"FAIL\"\n  },\n  \"empty algorithm object with short\": {\n    \"status\": \"FAIL\"\n  },\n  \"empty algorithm object with medium\": {\n    \"status\": \"FAIL\"\n  },\n  \"empty algorithm object with long\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/WebCryptoAPI/getRandomValues.any.js.json",
    "content": "{\n  \"Float16 arrays\": {\n    \"status\": \"PASS\"\n  },\n  \"Float arrays\": {\n    \"status\": \"PASS\"\n  },\n  \"DataView\": {\n    \"status\": \"PASS\"\n  },\n  \"Integer array: Int8Array\": {\n    \"status\": \"PASS\"\n  },\n  \"Large length: Int8Array\": {\n    \"status\": \"PASS\"\n  },\n  \"Null arrays: Int8Array\": {\n    \"status\": \"PASS\"\n  },\n  \"Subclass of Int8Array\": {\n    \"status\": \"PASS\"\n  },\n  \"Integer array: Int16Array\": {\n    \"status\": \"PASS\"\n  },\n  \"Large length: Int16Array\": {\n    \"status\": \"PASS\"\n  },\n  \"Null arrays: Int16Array\": {\n    \"status\": \"PASS\"\n  },\n  \"Subclass of Int16Array\": {\n    \"status\": \"PASS\"\n  },\n  \"Integer array: Int32Array\": {\n    \"status\": \"PASS\"\n  },\n  \"Large length: Int32Array\": {\n    \"status\": \"PASS\"\n  },\n  \"Null arrays: Int32Array\": {\n    \"status\": \"PASS\"\n  },\n  \"Subclass of Int32Array\": {\n    \"status\": \"PASS\"\n  },\n  \"Integer array: BigInt64Array\": {\n    \"status\": \"PASS\"\n  },\n  \"Large length: BigInt64Array\": {\n    \"status\": \"PASS\"\n  },\n  \"Null arrays: BigInt64Array\": {\n    \"status\": \"PASS\"\n  },\n  \"Subclass of BigInt64Array\": {\n    \"status\": \"PASS\"\n  },\n  \"Integer array: Uint8Array\": {\n    \"status\": \"PASS\"\n  },\n  \"Large length: Uint8Array\": {\n    \"status\": \"PASS\"\n  },\n  \"Null arrays: Uint8Array\": {\n    \"status\": \"PASS\"\n  },\n  \"Subclass of Uint8Array\": {\n    \"status\": \"PASS\"\n  },\n  \"Integer array: Uint8ClampedArray\": {\n    \"status\": \"PASS\"\n  },\n  \"Large length: Uint8ClampedArray\": {\n    \"status\": \"PASS\"\n  },\n  \"Null arrays: Uint8ClampedArray\": {\n    \"status\": \"PASS\"\n  },\n  \"Subclass of Uint8ClampedArray\": {\n    \"status\": \"PASS\"\n  },\n  \"Integer array: Uint16Array\": {\n    \"status\": \"PASS\"\n  },\n  \"Large length: Uint16Array\": {\n    \"status\": \"PASS\"\n  },\n  \"Null arrays: Uint16Array\": {\n    \"status\": \"PASS\"\n  },\n  \"Subclass of Uint16Array\": {\n    \"status\": \"PASS\"\n  },\n  \"Integer array: Uint32Array\": {\n    \"status\": \"PASS\"\n  },\n  \"Large length: Uint32Array\": {\n    \"status\": \"PASS\"\n  },\n  \"Null arrays: Uint32Array\": {\n    \"status\": \"PASS\"\n  },\n  \"Subclass of Uint32Array\": {\n    \"status\": \"PASS\"\n  },\n  \"Integer array: BigUint64Array\": {\n    \"status\": \"PASS\"\n  },\n  \"Large length: BigUint64Array\": {\n    \"status\": \"PASS\"\n  },\n  \"Null arrays: BigUint64Array\": {\n    \"status\": \"PASS\"\n  },\n  \"Subclass of BigUint64Array\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/WebCryptoAPI/idlharness.https.any.js.json",
    "content": "{\n  \"idl_test setup\": {\n    \"status\": \"PASS\"\n  },\n  \"idl_test validation\": {\n    \"status\": \"PASS\"\n  },\n  \"Partial interface mixin WindowOrWorkerGlobalScope: original interface mixin defined\": {\n    \"status\": \"PASS\"\n  },\n  \"Partial interface mixin WindowOrWorkerGlobalScope: member names are unique\": {\n    \"status\": \"PASS\"\n  },\n  \"Partial interface Window: member names are unique\": {\n    \"status\": \"PASS\"\n  },\n  \"Window includes GlobalEventHandlers: member names are unique\": {\n    \"status\": \"PASS\"\n  },\n  \"Window includes WindowEventHandlers: member names are unique\": {\n    \"status\": \"PASS\"\n  },\n  \"Window includes WindowOrWorkerGlobalScope: member names are unique\": {\n    \"status\": \"PASS\"\n  },\n  \"WorkerGlobalScope includes WindowOrWorkerGlobalScope: member names are unique\": {\n    \"status\": \"PASS\"\n  },\n  \"Window includes AnimationFrameProvider: member names are unique\": {\n    \"status\": \"PASS\"\n  },\n  \"Window includes WindowSessionStorage: member names are unique\": {\n    \"status\": \"PASS\"\n  },\n  \"Window includes WindowLocalStorage: member names are unique\": {\n    \"status\": \"PASS\"\n  },\n  \"Crypto interface: existence and properties of interface object\": {\n    \"status\": \"PASS\"\n  },\n  \"Crypto interface object length\": {\n    \"status\": \"PASS\"\n  },\n  \"Crypto interface object name\": {\n    \"status\": \"PASS\"\n  },\n  \"Crypto interface: existence and properties of interface prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"Crypto interface: existence and properties of interface prototype object's \\\"constructor\\\" property\": {\n    \"status\": \"PASS\"\n  },\n  \"Crypto interface: existence and properties of interface prototype object's @@unscopables property\": {\n    \"status\": \"PASS\"\n  },\n  \"Crypto interface: attribute subtle\": {\n    \"status\": \"PASS\"\n  },\n  \"Crypto interface: operation getRandomValues(ArrayBufferView)\": {\n    \"status\": \"PASS\"\n  },\n  \"Crypto interface: operation randomUUID()\": {\n    \"status\": \"PASS\"\n  },\n  \"Crypto must be primary interface of crypto\": {\n    \"status\": \"PASS\"\n  },\n  \"Stringification of crypto\": {\n    \"status\": \"PASS\"\n  },\n  \"Crypto interface: crypto must inherit property \\\"subtle\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"Crypto interface: crypto must inherit property \\\"getRandomValues(ArrayBufferView)\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"Crypto interface: calling getRandomValues(ArrayBufferView) on crypto with too few arguments must throw TypeError\": {\n    \"status\": \"PASS\"\n  },\n  \"Crypto interface: crypto must inherit property \\\"randomUUID()\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"CryptoKey interface: existence and properties of interface object\": {\n    \"status\": \"PASS\"\n  },\n  \"CryptoKey interface object length\": {\n    \"status\": \"PASS\"\n  },\n  \"CryptoKey interface object name\": {\n    \"status\": \"PASS\"\n  },\n  \"CryptoKey interface: existence and properties of interface prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"CryptoKey interface: existence and properties of interface prototype object's \\\"constructor\\\" property\": {\n    \"status\": \"PASS\"\n  },\n  \"CryptoKey interface: existence and properties of interface prototype object's @@unscopables property\": {\n    \"status\": \"PASS\"\n  },\n  \"CryptoKey interface: attribute type\": {\n    \"status\": \"PASS\"\n  },\n  \"CryptoKey interface: attribute extractable\": {\n    \"status\": \"PASS\"\n  },\n  \"CryptoKey interface: attribute algorithm\": {\n    \"status\": \"PASS\"\n  },\n  \"CryptoKey interface: attribute usages\": {\n    \"status\": \"PASS\"\n  },\n  \"SubtleCrypto interface: existence and properties of interface object\": {\n    \"status\": \"PASS\"\n  },\n  \"SubtleCrypto interface object length\": {\n    \"status\": \"PASS\"\n  },\n  \"SubtleCrypto interface object name\": {\n    \"status\": \"PASS\"\n  },\n  \"SubtleCrypto interface: existence and properties of interface prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"SubtleCrypto interface: existence and properties of interface prototype object's \\\"constructor\\\" property\": {\n    \"status\": \"PASS\"\n  },\n  \"SubtleCrypto interface: existence and properties of interface prototype object's @@unscopables property\": {\n    \"status\": \"PASS\"\n  },\n  \"SubtleCrypto interface: operation encrypt(AlgorithmIdentifier, CryptoKey, BufferSource)\": {\n    \"status\": \"FAIL\"\n  },\n  \"SubtleCrypto interface: operation decrypt(AlgorithmIdentifier, CryptoKey, BufferSource)\": {\n    \"status\": \"FAIL\"\n  },\n  \"SubtleCrypto interface: operation sign(AlgorithmIdentifier, CryptoKey, BufferSource)\": {\n    \"status\": \"PASS\"\n  },\n  \"SubtleCrypto interface: operation verify(AlgorithmIdentifier, CryptoKey, BufferSource, BufferSource)\": {\n    \"status\": \"PASS\"\n  },\n  \"SubtleCrypto interface: operation digest(AlgorithmIdentifier, BufferSource)\": {\n    \"status\": \"PASS\"\n  },\n  \"SubtleCrypto interface: operation generateKey(AlgorithmIdentifier, boolean, sequence<KeyUsage>)\": {\n    \"status\": \"FAIL\"\n  },\n  \"SubtleCrypto interface: operation deriveKey(AlgorithmIdentifier, CryptoKey, AlgorithmIdentifier, boolean, sequence<KeyUsage>)\": {\n    \"status\": \"FAIL\"\n  },\n  \"SubtleCrypto interface: operation deriveBits(AlgorithmIdentifier, CryptoKey, optional unsigned long?)\": {\n    \"status\": \"FAIL\"\n  },\n  \"SubtleCrypto interface: operation importKey(KeyFormat, (BufferSource or JsonWebKey), AlgorithmIdentifier, boolean, sequence<KeyUsage>)\": {\n    \"status\": \"PASS\"\n  },\n  \"SubtleCrypto interface: operation exportKey(KeyFormat, CryptoKey)\": {\n    \"status\": \"FAIL\"\n  },\n  \"SubtleCrypto interface: operation wrapKey(KeyFormat, CryptoKey, CryptoKey, AlgorithmIdentifier)\": {\n    \"status\": \"FAIL\"\n  },\n  \"SubtleCrypto interface: operation unwrapKey(KeyFormat, BufferSource, CryptoKey, AlgorithmIdentifier, AlgorithmIdentifier, boolean, sequence<KeyUsage>)\": {\n    \"status\": \"FAIL\"\n  },\n  \"SubtleCrypto must be primary interface of crypto.subtle\": {\n    \"status\": \"PASS\"\n  },\n  \"Stringification of crypto.subtle\": {\n    \"status\": \"PASS\"\n  },\n  \"SubtleCrypto interface: crypto.subtle must inherit property \\\"encrypt(AlgorithmIdentifier, CryptoKey, BufferSource)\\\" with the proper type\": {\n    \"status\": \"FAIL\"\n  },\n  \"SubtleCrypto interface: calling encrypt(AlgorithmIdentifier, CryptoKey, BufferSource) on crypto.subtle with too few arguments must throw TypeError\": {\n    \"status\": \"FAIL\"\n  },\n  \"SubtleCrypto interface: crypto.subtle must inherit property \\\"decrypt(AlgorithmIdentifier, CryptoKey, BufferSource)\\\" with the proper type\": {\n    \"status\": \"FAIL\"\n  },\n  \"SubtleCrypto interface: calling decrypt(AlgorithmIdentifier, CryptoKey, BufferSource) on crypto.subtle with too few arguments must throw TypeError\": {\n    \"status\": \"FAIL\"\n  },\n  \"SubtleCrypto interface: crypto.subtle must inherit property \\\"sign(AlgorithmIdentifier, CryptoKey, BufferSource)\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"SubtleCrypto interface: calling sign(AlgorithmIdentifier, CryptoKey, BufferSource) on crypto.subtle with too few arguments must throw TypeError\": {\n    \"status\": \"PASS\"\n  },\n  \"SubtleCrypto interface: crypto.subtle must inherit property \\\"verify(AlgorithmIdentifier, CryptoKey, BufferSource, BufferSource)\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"SubtleCrypto interface: calling verify(AlgorithmIdentifier, CryptoKey, BufferSource, BufferSource) on crypto.subtle with too few arguments must throw TypeError\": {\n    \"status\": \"PASS\"\n  },\n  \"SubtleCrypto interface: crypto.subtle must inherit property \\\"digest(AlgorithmIdentifier, BufferSource)\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"SubtleCrypto interface: calling digest(AlgorithmIdentifier, BufferSource) on crypto.subtle with too few arguments must throw TypeError\": {\n    \"status\": \"PASS\"\n  },\n  \"SubtleCrypto interface: crypto.subtle must inherit property \\\"generateKey(AlgorithmIdentifier, boolean, sequence<KeyUsage>)\\\" with the proper type\": {\n    \"status\": \"FAIL\"\n  },\n  \"SubtleCrypto interface: calling generateKey(AlgorithmIdentifier, boolean, sequence<KeyUsage>) on crypto.subtle with too few arguments must throw TypeError\": {\n    \"status\": \"FAIL\"\n  },\n  \"SubtleCrypto interface: crypto.subtle must inherit property \\\"deriveKey(AlgorithmIdentifier, CryptoKey, AlgorithmIdentifier, boolean, sequence<KeyUsage>)\\\" with the proper type\": {\n    \"status\": \"FAIL\"\n  },\n  \"SubtleCrypto interface: calling deriveKey(AlgorithmIdentifier, CryptoKey, AlgorithmIdentifier, boolean, sequence<KeyUsage>) on crypto.subtle with too few arguments must throw TypeError\": {\n    \"status\": \"FAIL\"\n  },\n  \"SubtleCrypto interface: crypto.subtle must inherit property \\\"deriveBits(AlgorithmIdentifier, CryptoKey, optional unsigned long?)\\\" with the proper type\": {\n    \"status\": \"FAIL\"\n  },\n  \"SubtleCrypto interface: calling deriveBits(AlgorithmIdentifier, CryptoKey, optional unsigned long?) on crypto.subtle with too few arguments must throw TypeError\": {\n    \"status\": \"FAIL\"\n  },\n  \"SubtleCrypto interface: crypto.subtle must inherit property \\\"importKey(KeyFormat, (BufferSource or JsonWebKey), AlgorithmIdentifier, boolean, sequence<KeyUsage>)\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"SubtleCrypto interface: calling importKey(KeyFormat, (BufferSource or JsonWebKey), AlgorithmIdentifier, boolean, sequence<KeyUsage>) on crypto.subtle with too few arguments must throw TypeError\": {\n    \"status\": \"PASS\"\n  },\n  \"SubtleCrypto interface: crypto.subtle must inherit property \\\"exportKey(KeyFormat, CryptoKey)\\\" with the proper type\": {\n    \"status\": \"FAIL\"\n  },\n  \"SubtleCrypto interface: calling exportKey(KeyFormat, CryptoKey) on crypto.subtle with too few arguments must throw TypeError\": {\n    \"status\": \"FAIL\"\n  },\n  \"SubtleCrypto interface: crypto.subtle must inherit property \\\"wrapKey(KeyFormat, CryptoKey, CryptoKey, AlgorithmIdentifier)\\\" with the proper type\": {\n    \"status\": \"FAIL\"\n  },\n  \"SubtleCrypto interface: calling wrapKey(KeyFormat, CryptoKey, CryptoKey, AlgorithmIdentifier) on crypto.subtle with too few arguments must throw TypeError\": {\n    \"status\": \"FAIL\"\n  },\n  \"SubtleCrypto interface: crypto.subtle must inherit property \\\"unwrapKey(KeyFormat, BufferSource, CryptoKey, AlgorithmIdentifier, AlgorithmIdentifier, boolean, sequence<KeyUsage>)\\\" with the proper type\": {\n    \"status\": \"FAIL\"\n  },\n  \"SubtleCrypto interface: calling unwrapKey(KeyFormat, BufferSource, CryptoKey, AlgorithmIdentifier, AlgorithmIdentifier, boolean, sequence<KeyUsage>) on crypto.subtle with too few arguments must throw TypeError\": {\n    \"status\": \"FAIL\"\n  },\n  \"Window interface: attribute crypto\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/WebCryptoAPI/import_export/ec_importKey.https.any.js.json",
    "content": "{\n  \"Good parameters: P-256 bits (spki, buffer(91), {name: ECDSA, namedCurve: P-256}, true, [verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (spki, buffer(59, compressed), {name: ECDSA, namedCurve: P-256}, true, [verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (jwk, object(kty, crv, x, y), {name: ECDSA, namedCurve: P-256}, true, [verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (raw, buffer(65), {name: ECDSA, namedCurve: P-256}, true, [verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (raw, buffer(33, compressed), {name: ECDSA, namedCurve: P-256}, true, [verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (spki, buffer(91), {name: ECDSA, namedCurve: P-256}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (spki, buffer(59, compressed), {name: ECDSA, namedCurve: P-256}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (jwk, object(kty, crv, x, y), {name: ECDSA, namedCurve: P-256}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (raw, buffer(65), {name: ECDSA, namedCurve: P-256}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (raw, buffer(33, compressed), {name: ECDSA, namedCurve: P-256}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (spki, buffer(91), {name: ECDSA, namedCurve: P-256}, true, [verify, verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (spki, buffer(59, compressed), {name: ECDSA, namedCurve: P-256}, true, [verify, verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (jwk, object(kty, crv, x, y), {name: ECDSA, namedCurve: P-256}, true, [verify, verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (raw, buffer(65), {name: ECDSA, namedCurve: P-256}, true, [verify, verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (raw, buffer(33, compressed), {name: ECDSA, namedCurve: P-256}, true, [verify, verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (pkcs8, buffer(138), {name: ECDSA, namedCurve: P-256}, true, [sign])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (pkcs8, buffer(138), {name: ECDSA, namedCurve: P-256}, true, [sign, sign])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Empty Usages: P-256 bits (pkcs8, buffer(138), {name: ECDSA, namedCurve: P-256}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (jwk, object(kty, crv, x, y, d), {name: ECDSA, namedCurve: P-256}, true, [sign])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (jwk, object(kty, crv, x, y, d), {name: ECDSA, namedCurve: P-256}, true, [sign, sign])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Empty Usages: P-256 bits (jwk, object(kty, crv, x, y, d), {name: ECDSA, namedCurve: P-256}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (spki, buffer(91), {name: ECDSA, namedCurve: P-256}, false, [verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (spki, buffer(59, compressed), {name: ECDSA, namedCurve: P-256}, false, [verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (jwk, object(kty, crv, x, y), {name: ECDSA, namedCurve: P-256}, false, [verify])\": {\n    \"status\": \"PASS\"\n  },\n  \"Good parameters: P-256 bits (raw, buffer(65), {name: ECDSA, namedCurve: P-256}, false, [verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (raw, buffer(33, compressed), {name: ECDSA, namedCurve: P-256}, false, [verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (spki, buffer(91), {name: ECDSA, namedCurve: P-256}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (spki, buffer(59, compressed), {name: ECDSA, namedCurve: P-256}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (jwk, object(kty, crv, x, y), {name: ECDSA, namedCurve: P-256}, false, [])\": {\n    \"status\": \"PASS\"\n  },\n  \"Good parameters: P-256 bits (raw, buffer(65), {name: ECDSA, namedCurve: P-256}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (raw, buffer(33, compressed), {name: ECDSA, namedCurve: P-256}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (spki, buffer(91), {name: ECDSA, namedCurve: P-256}, false, [verify, verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (spki, buffer(59, compressed), {name: ECDSA, namedCurve: P-256}, false, [verify, verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (jwk, object(kty, crv, x, y), {name: ECDSA, namedCurve: P-256}, false, [verify, verify])\": {\n    \"status\": \"PASS\"\n  },\n  \"Good parameters: P-256 bits (raw, buffer(65), {name: ECDSA, namedCurve: P-256}, false, [verify, verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (raw, buffer(33, compressed), {name: ECDSA, namedCurve: P-256}, false, [verify, verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (pkcs8, buffer(138), {name: ECDSA, namedCurve: P-256}, false, [sign])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (pkcs8, buffer(138), {name: ECDSA, namedCurve: P-256}, false, [sign, sign])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Empty Usages: P-256 bits (pkcs8, buffer(138), {name: ECDSA, namedCurve: P-256}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (jwk, object(kty, crv, x, y, d), {name: ECDSA, namedCurve: P-256}, false, [sign])\": {\n    \"status\": \"PASS\"\n  },\n  \"Good parameters: P-256 bits (jwk, object(kty, crv, x, y, d), {name: ECDSA, namedCurve: P-256}, false, [sign, sign])\": {\n    \"status\": \"PASS\"\n  },\n  \"Empty Usages: P-256 bits (jwk, object(kty, crv, x, y, d), {name: ECDSA, namedCurve: P-256}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (spki, buffer(120), {name: ECDSA, namedCurve: P-384}, true, [verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (spki, buffer(72, compressed), {name: ECDSA, namedCurve: P-384}, true, [verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (jwk, object(kty, crv, x, y), {name: ECDSA, namedCurve: P-384}, true, [verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (raw, buffer(97), {name: ECDSA, namedCurve: P-384}, true, [verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (raw, buffer(49, compressed), {name: ECDSA, namedCurve: P-384}, true, [verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (spki, buffer(120), {name: ECDSA, namedCurve: P-384}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (spki, buffer(72, compressed), {name: ECDSA, namedCurve: P-384}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (jwk, object(kty, crv, x, y), {name: ECDSA, namedCurve: P-384}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (raw, buffer(97), {name: ECDSA, namedCurve: P-384}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (raw, buffer(49, compressed), {name: ECDSA, namedCurve: P-384}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (spki, buffer(120), {name: ECDSA, namedCurve: P-384}, true, [verify, verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (spki, buffer(72, compressed), {name: ECDSA, namedCurve: P-384}, true, [verify, verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (jwk, object(kty, crv, x, y), {name: ECDSA, namedCurve: P-384}, true, [verify, verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (raw, buffer(97), {name: ECDSA, namedCurve: P-384}, true, [verify, verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (raw, buffer(49, compressed), {name: ECDSA, namedCurve: P-384}, true, [verify, verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (pkcs8, buffer(185), {name: ECDSA, namedCurve: P-384}, true, [sign])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (pkcs8, buffer(185), {name: ECDSA, namedCurve: P-384}, true, [sign, sign])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Empty Usages: P-384 bits (pkcs8, buffer(185), {name: ECDSA, namedCurve: P-384}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (jwk, object(kty, crv, x, y, d), {name: ECDSA, namedCurve: P-384}, true, [sign])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (jwk, object(kty, crv, x, y, d), {name: ECDSA, namedCurve: P-384}, true, [sign, sign])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Empty Usages: P-384 bits (jwk, object(kty, crv, x, y, d), {name: ECDSA, namedCurve: P-384}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (spki, buffer(120), {name: ECDSA, namedCurve: P-384}, false, [verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (spki, buffer(72, compressed), {name: ECDSA, namedCurve: P-384}, false, [verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (jwk, object(kty, crv, x, y), {name: ECDSA, namedCurve: P-384}, false, [verify])\": {\n    \"status\": \"PASS\"\n  },\n  \"Good parameters: P-384 bits (raw, buffer(97), {name: ECDSA, namedCurve: P-384}, false, [verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (raw, buffer(49, compressed), {name: ECDSA, namedCurve: P-384}, false, [verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (spki, buffer(120), {name: ECDSA, namedCurve: P-384}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (spki, buffer(72, compressed), {name: ECDSA, namedCurve: P-384}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (jwk, object(kty, crv, x, y), {name: ECDSA, namedCurve: P-384}, false, [])\": {\n    \"status\": \"PASS\"\n  },\n  \"Good parameters: P-384 bits (raw, buffer(97), {name: ECDSA, namedCurve: P-384}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (raw, buffer(49, compressed), {name: ECDSA, namedCurve: P-384}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (spki, buffer(120), {name: ECDSA, namedCurve: P-384}, false, [verify, verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (spki, buffer(72, compressed), {name: ECDSA, namedCurve: P-384}, false, [verify, verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (jwk, object(kty, crv, x, y), {name: ECDSA, namedCurve: P-384}, false, [verify, verify])\": {\n    \"status\": \"PASS\"\n  },\n  \"Good parameters: P-384 bits (raw, buffer(97), {name: ECDSA, namedCurve: P-384}, false, [verify, verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (raw, buffer(49, compressed), {name: ECDSA, namedCurve: P-384}, false, [verify, verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (pkcs8, buffer(185), {name: ECDSA, namedCurve: P-384}, false, [sign])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (pkcs8, buffer(185), {name: ECDSA, namedCurve: P-384}, false, [sign, sign])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Empty Usages: P-384 bits (pkcs8, buffer(185), {name: ECDSA, namedCurve: P-384}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (jwk, object(kty, crv, x, y, d), {name: ECDSA, namedCurve: P-384}, false, [sign])\": {\n    \"status\": \"PASS\"\n  },\n  \"Good parameters: P-384 bits (jwk, object(kty, crv, x, y, d), {name: ECDSA, namedCurve: P-384}, false, [sign, sign])\": {\n    \"status\": \"PASS\"\n  },\n  \"Empty Usages: P-384 bits (jwk, object(kty, crv, x, y, d), {name: ECDSA, namedCurve: P-384}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (spki, buffer(158), {name: ECDSA, namedCurve: P-521}, true, [verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (spki, buffer(90, compressed), {name: ECDSA, namedCurve: P-521}, true, [verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (jwk, object(kty, crv, x, y), {name: ECDSA, namedCurve: P-521}, true, [verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (raw, buffer(133), {name: ECDSA, namedCurve: P-521}, true, [verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (raw, buffer(67, compressed), {name: ECDSA, namedCurve: P-521}, true, [verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (spki, buffer(158), {name: ECDSA, namedCurve: P-521}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (spki, buffer(90, compressed), {name: ECDSA, namedCurve: P-521}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (jwk, object(kty, crv, x, y), {name: ECDSA, namedCurve: P-521}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (raw, buffer(133), {name: ECDSA, namedCurve: P-521}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (raw, buffer(67, compressed), {name: ECDSA, namedCurve: P-521}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (spki, buffer(158), {name: ECDSA, namedCurve: P-521}, true, [verify, verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (spki, buffer(90, compressed), {name: ECDSA, namedCurve: P-521}, true, [verify, verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (jwk, object(kty, crv, x, y), {name: ECDSA, namedCurve: P-521}, true, [verify, verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (raw, buffer(133), {name: ECDSA, namedCurve: P-521}, true, [verify, verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (raw, buffer(67, compressed), {name: ECDSA, namedCurve: P-521}, true, [verify, verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (pkcs8, buffer(241), {name: ECDSA, namedCurve: P-521}, true, [sign])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (pkcs8, buffer(241), {name: ECDSA, namedCurve: P-521}, true, [sign, sign])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Empty Usages: P-521 bits (pkcs8, buffer(241), {name: ECDSA, namedCurve: P-521}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (jwk, object(kty, crv, x, y, d), {name: ECDSA, namedCurve: P-521}, true, [sign])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (jwk, object(kty, crv, x, y, d), {name: ECDSA, namedCurve: P-521}, true, [sign, sign])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Empty Usages: P-521 bits (jwk, object(kty, crv, x, y, d), {name: ECDSA, namedCurve: P-521}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (spki, buffer(158), {name: ECDSA, namedCurve: P-521}, false, [verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (spki, buffer(90, compressed), {name: ECDSA, namedCurve: P-521}, false, [verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (jwk, object(kty, crv, x, y), {name: ECDSA, namedCurve: P-521}, false, [verify])\": {\n    \"status\": \"PASS\"\n  },\n  \"Good parameters: P-521 bits (raw, buffer(133), {name: ECDSA, namedCurve: P-521}, false, [verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (raw, buffer(67, compressed), {name: ECDSA, namedCurve: P-521}, false, [verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (spki, buffer(158), {name: ECDSA, namedCurve: P-521}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (spki, buffer(90, compressed), {name: ECDSA, namedCurve: P-521}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (jwk, object(kty, crv, x, y), {name: ECDSA, namedCurve: P-521}, false, [])\": {\n    \"status\": \"PASS\"\n  },\n  \"Good parameters: P-521 bits (raw, buffer(133), {name: ECDSA, namedCurve: P-521}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (raw, buffer(67, compressed), {name: ECDSA, namedCurve: P-521}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (spki, buffer(158), {name: ECDSA, namedCurve: P-521}, false, [verify, verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (spki, buffer(90, compressed), {name: ECDSA, namedCurve: P-521}, false, [verify, verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (jwk, object(kty, crv, x, y), {name: ECDSA, namedCurve: P-521}, false, [verify, verify])\": {\n    \"status\": \"PASS\"\n  },\n  \"Good parameters: P-521 bits (raw, buffer(133), {name: ECDSA, namedCurve: P-521}, false, [verify, verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (raw, buffer(67, compressed), {name: ECDSA, namedCurve: P-521}, false, [verify, verify])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (pkcs8, buffer(241), {name: ECDSA, namedCurve: P-521}, false, [sign])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (pkcs8, buffer(241), {name: ECDSA, namedCurve: P-521}, false, [sign, sign])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Empty Usages: P-521 bits (pkcs8, buffer(241), {name: ECDSA, namedCurve: P-521}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (jwk, object(kty, crv, x, y, d), {name: ECDSA, namedCurve: P-521}, false, [sign])\": {\n    \"status\": \"PASS\"\n  },\n  \"Good parameters: P-521 bits (jwk, object(kty, crv, x, y, d), {name: ECDSA, namedCurve: P-521}, false, [sign, sign])\": {\n    \"status\": \"PASS\"\n  },\n  \"Empty Usages: P-521 bits (jwk, object(kty, crv, x, y, d), {name: ECDSA, namedCurve: P-521}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (spki, buffer(91), {name: ECDH, namedCurve: P-256}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (spki, buffer(59, compressed), {name: ECDH, namedCurve: P-256}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (jwk, object(kty, crv, x, y), {name: ECDH, namedCurve: P-256}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"ECDH any JWK alg: P-256 bits (jwk, object(kty, crv, x, y, alg), {name: ECDH, namedCurve: P-256}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (raw, buffer(65), {name: ECDH, namedCurve: P-256}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (raw, buffer(33, compressed), {name: ECDH, namedCurve: P-256}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (pkcs8, buffer(138), {name: ECDH, namedCurve: P-256}, true, [deriveKey])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (pkcs8, buffer(138), {name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (pkcs8, buffer(138), {name: ECDH, namedCurve: P-256}, true, [deriveBits])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (pkcs8, buffer(138), {name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Empty Usages: P-256 bits (pkcs8, buffer(138), {name: ECDH, namedCurve: P-256}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (jwk, object(kty, crv, x, y, d), {name: ECDH, namedCurve: P-256}, true, [deriveKey])\": {\n    \"status\": \"FAIL\"\n  },\n  \"ECDH any JWK alg: P-256 bits (jwk, object(kty, crv, x, y, d, alg), {name: ECDH, namedCurve: P-256}, true, [deriveKey])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (jwk, object(kty, crv, x, y, d), {name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey])\": {\n    \"status\": \"FAIL\"\n  },\n  \"ECDH any JWK alg: P-256 bits (jwk, object(kty, crv, x, y, d, alg), {name: ECDH, namedCurve: P-256}, true, [deriveBits, deriveKey])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (jwk, object(kty, crv, x, y, d), {name: ECDH, namedCurve: P-256}, true, [deriveBits])\": {\n    \"status\": \"FAIL\"\n  },\n  \"ECDH any JWK alg: P-256 bits (jwk, object(kty, crv, x, y, d, alg), {name: ECDH, namedCurve: P-256}, true, [deriveBits])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (jwk, object(kty, crv, x, y, d), {name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits])\": {\n    \"status\": \"FAIL\"\n  },\n  \"ECDH any JWK alg: P-256 bits (jwk, object(kty, crv, x, y, d, alg), {name: ECDH, namedCurve: P-256}, true, [deriveKey, deriveBits, deriveKey, deriveBits])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Empty Usages: P-256 bits (jwk, object(kty, crv, x, y, d), {name: ECDH, namedCurve: P-256}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (spki, buffer(91), {name: ECDH, namedCurve: P-256}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (spki, buffer(59, compressed), {name: ECDH, namedCurve: P-256}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (jwk, object(kty, crv, x, y), {name: ECDH, namedCurve: P-256}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"ECDH any JWK alg: P-256 bits (jwk, object(kty, crv, x, y, alg), {name: ECDH, namedCurve: P-256}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (raw, buffer(65), {name: ECDH, namedCurve: P-256}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (raw, buffer(33, compressed), {name: ECDH, namedCurve: P-256}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (pkcs8, buffer(138), {name: ECDH, namedCurve: P-256}, false, [deriveKey])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (pkcs8, buffer(138), {name: ECDH, namedCurve: P-256}, false, [deriveBits, deriveKey])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (pkcs8, buffer(138), {name: ECDH, namedCurve: P-256}, false, [deriveBits])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (pkcs8, buffer(138), {name: ECDH, namedCurve: P-256}, false, [deriveKey, deriveBits, deriveKey, deriveBits])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Empty Usages: P-256 bits (pkcs8, buffer(138), {name: ECDH, namedCurve: P-256}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (jwk, object(kty, crv, x, y, d), {name: ECDH, namedCurve: P-256}, false, [deriveKey])\": {\n    \"status\": \"FAIL\"\n  },\n  \"ECDH any JWK alg: P-256 bits (jwk, object(kty, crv, x, y, d, alg), {name: ECDH, namedCurve: P-256}, false, [deriveKey])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (jwk, object(kty, crv, x, y, d), {name: ECDH, namedCurve: P-256}, false, [deriveBits, deriveKey])\": {\n    \"status\": \"FAIL\"\n  },\n  \"ECDH any JWK alg: P-256 bits (jwk, object(kty, crv, x, y, d, alg), {name: ECDH, namedCurve: P-256}, false, [deriveBits, deriveKey])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (jwk, object(kty, crv, x, y, d), {name: ECDH, namedCurve: P-256}, false, [deriveBits])\": {\n    \"status\": \"FAIL\"\n  },\n  \"ECDH any JWK alg: P-256 bits (jwk, object(kty, crv, x, y, d, alg), {name: ECDH, namedCurve: P-256}, false, [deriveBits])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-256 bits (jwk, object(kty, crv, x, y, d), {name: ECDH, namedCurve: P-256}, false, [deriveKey, deriveBits, deriveKey, deriveBits])\": {\n    \"status\": \"FAIL\"\n  },\n  \"ECDH any JWK alg: P-256 bits (jwk, object(kty, crv, x, y, d, alg), {name: ECDH, namedCurve: P-256}, false, [deriveKey, deriveBits, deriveKey, deriveBits])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Empty Usages: P-256 bits (jwk, object(kty, crv, x, y, d), {name: ECDH, namedCurve: P-256}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (spki, buffer(120), {name: ECDH, namedCurve: P-384}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (spki, buffer(72, compressed), {name: ECDH, namedCurve: P-384}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (jwk, object(kty, crv, x, y), {name: ECDH, namedCurve: P-384}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"ECDH any JWK alg: P-384 bits (jwk, object(kty, crv, x, y, alg), {name: ECDH, namedCurve: P-384}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (raw, buffer(97), {name: ECDH, namedCurve: P-384}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (raw, buffer(49, compressed), {name: ECDH, namedCurve: P-384}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (pkcs8, buffer(185), {name: ECDH, namedCurve: P-384}, true, [deriveKey])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (pkcs8, buffer(185), {name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (pkcs8, buffer(185), {name: ECDH, namedCurve: P-384}, true, [deriveBits])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (pkcs8, buffer(185), {name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Empty Usages: P-384 bits (pkcs8, buffer(185), {name: ECDH, namedCurve: P-384}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (jwk, object(kty, crv, x, y, d), {name: ECDH, namedCurve: P-384}, true, [deriveKey])\": {\n    \"status\": \"FAIL\"\n  },\n  \"ECDH any JWK alg: P-384 bits (jwk, object(kty, crv, x, y, d, alg), {name: ECDH, namedCurve: P-384}, true, [deriveKey])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (jwk, object(kty, crv, x, y, d), {name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey])\": {\n    \"status\": \"FAIL\"\n  },\n  \"ECDH any JWK alg: P-384 bits (jwk, object(kty, crv, x, y, d, alg), {name: ECDH, namedCurve: P-384}, true, [deriveBits, deriveKey])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (jwk, object(kty, crv, x, y, d), {name: ECDH, namedCurve: P-384}, true, [deriveBits])\": {\n    \"status\": \"FAIL\"\n  },\n  \"ECDH any JWK alg: P-384 bits (jwk, object(kty, crv, x, y, d, alg), {name: ECDH, namedCurve: P-384}, true, [deriveBits])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (jwk, object(kty, crv, x, y, d), {name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits])\": {\n    \"status\": \"FAIL\"\n  },\n  \"ECDH any JWK alg: P-384 bits (jwk, object(kty, crv, x, y, d, alg), {name: ECDH, namedCurve: P-384}, true, [deriveKey, deriveBits, deriveKey, deriveBits])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Empty Usages: P-384 bits (jwk, object(kty, crv, x, y, d), {name: ECDH, namedCurve: P-384}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (spki, buffer(120), {name: ECDH, namedCurve: P-384}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (spki, buffer(72, compressed), {name: ECDH, namedCurve: P-384}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (jwk, object(kty, crv, x, y), {name: ECDH, namedCurve: P-384}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"ECDH any JWK alg: P-384 bits (jwk, object(kty, crv, x, y, alg), {name: ECDH, namedCurve: P-384}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (raw, buffer(97), {name: ECDH, namedCurve: P-384}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (raw, buffer(49, compressed), {name: ECDH, namedCurve: P-384}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (pkcs8, buffer(185), {name: ECDH, namedCurve: P-384}, false, [deriveKey])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (pkcs8, buffer(185), {name: ECDH, namedCurve: P-384}, false, [deriveBits, deriveKey])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (pkcs8, buffer(185), {name: ECDH, namedCurve: P-384}, false, [deriveBits])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (pkcs8, buffer(185), {name: ECDH, namedCurve: P-384}, false, [deriveKey, deriveBits, deriveKey, deriveBits])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Empty Usages: P-384 bits (pkcs8, buffer(185), {name: ECDH, namedCurve: P-384}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (jwk, object(kty, crv, x, y, d), {name: ECDH, namedCurve: P-384}, false, [deriveKey])\": {\n    \"status\": \"FAIL\"\n  },\n  \"ECDH any JWK alg: P-384 bits (jwk, object(kty, crv, x, y, d, alg), {name: ECDH, namedCurve: P-384}, false, [deriveKey])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (jwk, object(kty, crv, x, y, d), {name: ECDH, namedCurve: P-384}, false, [deriveBits, deriveKey])\": {\n    \"status\": \"FAIL\"\n  },\n  \"ECDH any JWK alg: P-384 bits (jwk, object(kty, crv, x, y, d, alg), {name: ECDH, namedCurve: P-384}, false, [deriveBits, deriveKey])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (jwk, object(kty, crv, x, y, d), {name: ECDH, namedCurve: P-384}, false, [deriveBits])\": {\n    \"status\": \"FAIL\"\n  },\n  \"ECDH any JWK alg: P-384 bits (jwk, object(kty, crv, x, y, d, alg), {name: ECDH, namedCurve: P-384}, false, [deriveBits])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-384 bits (jwk, object(kty, crv, x, y, d), {name: ECDH, namedCurve: P-384}, false, [deriveKey, deriveBits, deriveKey, deriveBits])\": {\n    \"status\": \"FAIL\"\n  },\n  \"ECDH any JWK alg: P-384 bits (jwk, object(kty, crv, x, y, d, alg), {name: ECDH, namedCurve: P-384}, false, [deriveKey, deriveBits, deriveKey, deriveBits])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Empty Usages: P-384 bits (jwk, object(kty, crv, x, y, d), {name: ECDH, namedCurve: P-384}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (spki, buffer(158), {name: ECDH, namedCurve: P-521}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (spki, buffer(90, compressed), {name: ECDH, namedCurve: P-521}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (jwk, object(kty, crv, x, y), {name: ECDH, namedCurve: P-521}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"ECDH any JWK alg: P-521 bits (jwk, object(kty, crv, x, y, alg), {name: ECDH, namedCurve: P-521}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (raw, buffer(133), {name: ECDH, namedCurve: P-521}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (raw, buffer(67, compressed), {name: ECDH, namedCurve: P-521}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (pkcs8, buffer(241), {name: ECDH, namedCurve: P-521}, true, [deriveKey])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (pkcs8, buffer(241), {name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (pkcs8, buffer(241), {name: ECDH, namedCurve: P-521}, true, [deriveBits])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (pkcs8, buffer(241), {name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Empty Usages: P-521 bits (pkcs8, buffer(241), {name: ECDH, namedCurve: P-521}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (jwk, object(kty, crv, x, y, d), {name: ECDH, namedCurve: P-521}, true, [deriveKey])\": {\n    \"status\": \"FAIL\"\n  },\n  \"ECDH any JWK alg: P-521 bits (jwk, object(kty, crv, x, y, d, alg), {name: ECDH, namedCurve: P-521}, true, [deriveKey])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (jwk, object(kty, crv, x, y, d), {name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey])\": {\n    \"status\": \"FAIL\"\n  },\n  \"ECDH any JWK alg: P-521 bits (jwk, object(kty, crv, x, y, d, alg), {name: ECDH, namedCurve: P-521}, true, [deriveBits, deriveKey])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (jwk, object(kty, crv, x, y, d), {name: ECDH, namedCurve: P-521}, true, [deriveBits])\": {\n    \"status\": \"FAIL\"\n  },\n  \"ECDH any JWK alg: P-521 bits (jwk, object(kty, crv, x, y, d, alg), {name: ECDH, namedCurve: P-521}, true, [deriveBits])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (jwk, object(kty, crv, x, y, d), {name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits])\": {\n    \"status\": \"FAIL\"\n  },\n  \"ECDH any JWK alg: P-521 bits (jwk, object(kty, crv, x, y, d, alg), {name: ECDH, namedCurve: P-521}, true, [deriveKey, deriveBits, deriveKey, deriveBits])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Empty Usages: P-521 bits (jwk, object(kty, crv, x, y, d), {name: ECDH, namedCurve: P-521}, true, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (spki, buffer(158), {name: ECDH, namedCurve: P-521}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (spki, buffer(90, compressed), {name: ECDH, namedCurve: P-521}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (jwk, object(kty, crv, x, y), {name: ECDH, namedCurve: P-521}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"ECDH any JWK alg: P-521 bits (jwk, object(kty, crv, x, y, alg), {name: ECDH, namedCurve: P-521}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (raw, buffer(133), {name: ECDH, namedCurve: P-521}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (raw, buffer(67, compressed), {name: ECDH, namedCurve: P-521}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (pkcs8, buffer(241), {name: ECDH, namedCurve: P-521}, false, [deriveKey])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (pkcs8, buffer(241), {name: ECDH, namedCurve: P-521}, false, [deriveBits, deriveKey])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (pkcs8, buffer(241), {name: ECDH, namedCurve: P-521}, false, [deriveBits])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (pkcs8, buffer(241), {name: ECDH, namedCurve: P-521}, false, [deriveKey, deriveBits, deriveKey, deriveBits])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Empty Usages: P-521 bits (pkcs8, buffer(241), {name: ECDH, namedCurve: P-521}, false, [])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (jwk, object(kty, crv, x, y, d), {name: ECDH, namedCurve: P-521}, false, [deriveKey])\": {\n    \"status\": \"FAIL\"\n  },\n  \"ECDH any JWK alg: P-521 bits (jwk, object(kty, crv, x, y, d, alg), {name: ECDH, namedCurve: P-521}, false, [deriveKey])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (jwk, object(kty, crv, x, y, d), {name: ECDH, namedCurve: P-521}, false, [deriveBits, deriveKey])\": {\n    \"status\": \"FAIL\"\n  },\n  \"ECDH any JWK alg: P-521 bits (jwk, object(kty, crv, x, y, d, alg), {name: ECDH, namedCurve: P-521}, false, [deriveBits, deriveKey])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (jwk, object(kty, crv, x, y, d), {name: ECDH, namedCurve: P-521}, false, [deriveBits])\": {\n    \"status\": \"FAIL\"\n  },\n  \"ECDH any JWK alg: P-521 bits (jwk, object(kty, crv, x, y, d, alg), {name: ECDH, namedCurve: P-521}, false, [deriveBits])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Good parameters: P-521 bits (jwk, object(kty, crv, x, y, d), {name: ECDH, namedCurve: P-521}, false, [deriveKey, deriveBits, deriveKey, deriveBits])\": {\n    \"status\": \"FAIL\"\n  },\n  \"ECDH any JWK alg: P-521 bits (jwk, object(kty, crv, x, y, d, alg), {name: ECDH, namedCurve: P-521}, false, [deriveKey, deriveBits, deriveKey, deriveBits])\": {\n    \"status\": \"FAIL\"\n  },\n  \"Empty Usages: P-521 bits (jwk, object(kty, crv, x, y, d), {name: ECDH, namedCurve: P-521}, false, [])\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/WebCryptoAPI/randomUUID.https.any.js.json",
    "content": "{\n  \"namespace format\": {\n    \"status\": \"PASS\"\n  },\n  \"version set\": {\n    \"status\": \"PASS\"\n  },\n  \"variant set\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/WebCryptoAPI/sign_verify/ecdsa.https.any.js.json",
    "content": "{\n  \"setup\": {\n    \"status\": \"PASS\"\n  },\n  \"generate wrong key step: ECDSA P-256 with SHA-1 signing with wrong algorithm name\": {\n    \"status\": \"FAIL\"\n  },\n  \"generate wrong key step: ECDSA P-256 with SHA-256 signing with wrong algorithm name\": {\n    \"status\": \"FAIL\"\n  },\n  \"generate wrong key step: ECDSA P-256 with SHA-384 signing with wrong algorithm name\": {\n    \"status\": \"FAIL\"\n  },\n  \"generate wrong key step: ECDSA P-256 with SHA-512 signing with wrong algorithm name\": {\n    \"status\": \"FAIL\"\n  },\n  \"generate wrong key step: ECDSA P-384 with SHA-1 signing with wrong algorithm name\": {\n    \"status\": \"FAIL\"\n  },\n  \"generate wrong key step: ECDSA P-384 with SHA-256 signing with wrong algorithm name\": {\n    \"status\": \"FAIL\"\n  },\n  \"generate wrong key step: ECDSA P-384 with SHA-384 signing with wrong algorithm name\": {\n    \"status\": \"FAIL\"\n  },\n  \"generate wrong key step: ECDSA P-384 with SHA-512 signing with wrong algorithm name\": {\n    \"status\": \"FAIL\"\n  },\n  \"generate wrong key step: ECDSA P-521 with SHA-1 signing with wrong algorithm name\": {\n    \"status\": \"FAIL\"\n  },\n  \"generate wrong key step: ECDSA P-521 with SHA-256 signing with wrong algorithm name\": {\n    \"status\": \"FAIL\"\n  },\n  \"generate wrong key step: ECDSA P-521 with SHA-384 signing with wrong algorithm name\": {\n    \"status\": \"FAIL\"\n  },\n  \"generate wrong key step: ECDSA P-521 with SHA-512 signing with wrong algorithm name\": {\n    \"status\": \"FAIL\"\n  },\n  \"generate wrong key step: ECDSA P-256 with SHA-1 verifying with wrong algorithm name\": {\n    \"status\": \"FAIL\"\n  },\n  \"generate wrong key step: ECDSA P-256 with SHA-256 verifying with wrong algorithm name\": {\n    \"status\": \"FAIL\"\n  },\n  \"generate wrong key step: ECDSA P-256 with SHA-384 verifying with wrong algorithm name\": {\n    \"status\": \"FAIL\"\n  },\n  \"generate wrong key step: ECDSA P-256 with SHA-512 verifying with wrong algorithm name\": {\n    \"status\": \"FAIL\"\n  },\n  \"generate wrong key step: ECDSA P-384 with SHA-1 verifying with wrong algorithm name\": {\n    \"status\": \"FAIL\"\n  },\n  \"generate wrong key step: ECDSA P-384 with SHA-256 verifying with wrong algorithm name\": {\n    \"status\": \"FAIL\"\n  },\n  \"generate wrong key step: ECDSA P-384 with SHA-384 verifying with wrong algorithm name\": {\n    \"status\": \"FAIL\"\n  },\n  \"generate wrong key step: ECDSA P-384 with SHA-512 verifying with wrong algorithm name\": {\n    \"status\": \"FAIL\"\n  },\n  \"generate wrong key step: ECDSA P-521 with SHA-1 verifying with wrong algorithm name\": {\n    \"status\": \"FAIL\"\n  },\n  \"generate wrong key step: ECDSA P-521 with SHA-256 verifying with wrong algorithm name\": {\n    \"status\": \"FAIL\"\n  },\n  \"generate wrong key step: ECDSA P-521 with SHA-384 verifying with wrong algorithm name\": {\n    \"status\": \"FAIL\"\n  },\n  \"generate wrong key step: ECDSA P-521 with SHA-512 verifying with wrong algorithm name\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-1 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-256 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-384 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-512 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-1 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-256 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-384 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-512 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-1 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-256 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-384 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-512 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-1 verification with altered signature after call\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-256 verification with altered signature after call\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-384 verification with altered signature after call\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-512 verification with altered signature after call\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-1 verification with altered signature after call\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-256 verification with altered signature after call\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-384 verification with altered signature after call\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-512 verification with altered signature after call\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-1 verification with altered signature after call\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-256 verification with altered signature after call\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-384 verification with altered signature after call\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-512 verification with altered signature after call\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-1 with altered plaintext after call\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-256 with altered plaintext after call\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-384 with altered plaintext after call\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-512 with altered plaintext after call\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-1 with altered plaintext after call\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-256 with altered plaintext after call\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-384 with altered plaintext after call\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-512 with altered plaintext after call\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-1 with altered plaintext after call\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-256 with altered plaintext after call\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-384 with altered plaintext after call\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-512 with altered plaintext after call\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-1 using privateKey to verify\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-256 using privateKey to verify\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-384 using privateKey to verify\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-512 using privateKey to verify\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-1 using privateKey to verify\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-256 using privateKey to verify\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-384 using privateKey to verify\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-512 using privateKey to verify\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-1 using privateKey to verify\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-256 using privateKey to verify\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-384 using privateKey to verify\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-512 using privateKey to verify\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-1 using publicKey to sign\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-256 using publicKey to sign\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-384 using publicKey to sign\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-512 using publicKey to sign\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-1 using publicKey to sign\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-256 using publicKey to sign\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-384 using publicKey to sign\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-512 using publicKey to sign\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-1 using publicKey to sign\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-256 using publicKey to sign\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-384 using publicKey to sign\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-512 using publicKey to sign\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-1 no verify usage\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-256 no verify usage\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-384 no verify usage\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-512 no verify usage\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-1 no verify usage\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-256 no verify usage\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-384 no verify usage\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-512 no verify usage\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-1 no verify usage\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-256 no verify usage\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-384 no verify usage\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-512 no verify usage\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-1 round trip\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-256 round trip\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-384 round trip\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-512 round trip\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-1 round trip\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-256 round trip\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-384 round trip\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-512 round trip\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-1 round trip\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-256 round trip\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-384 round trip\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-512 round trip\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-1 verification failure due to altered signature\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-256 verification failure due to altered signature\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-384 verification failure due to altered signature\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-512 verification failure due to altered signature\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-1 verification failure due to altered signature\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-256 verification failure due to altered signature\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-384 verification failure due to altered signature\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-512 verification failure due to altered signature\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-1 verification failure due to altered signature\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-256 verification failure due to altered signature\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-384 verification failure due to altered signature\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-512 verification failure due to altered signature\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-1 verification failure due to wrong hash\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-256 verification failure due to wrong hash\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-384 verification failure due to wrong hash\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-512 verification failure due to wrong hash\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-1 verification failure due to wrong hash\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-256 verification failure due to wrong hash\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-384 verification failure due to wrong hash\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-512 verification failure due to wrong hash\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-1 verification failure due to wrong hash\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-256 verification failure due to wrong hash\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-384 verification failure due to wrong hash\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-512 verification failure due to wrong hash\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-1 verification failure due to bad hash name\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-256 verification failure due to bad hash name\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-384 verification failure due to bad hash name\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-512 verification failure due to bad hash name\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-1 verification failure due to bad hash name\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-256 verification failure due to bad hash name\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-384 verification failure due to bad hash name\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-512 verification failure due to bad hash name\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-1 verification failure due to bad hash name\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-256 verification failure due to bad hash name\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-384 verification failure due to bad hash name\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-512 verification failure due to bad hash name\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-1 verification failure due to shortened signature\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-256 verification failure due to shortened signature\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-384 verification failure due to shortened signature\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-512 verification failure due to shortened signature\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-1 verification failure due to shortened signature\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-256 verification failure due to shortened signature\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-384 verification failure due to shortened signature\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-512 verification failure due to shortened signature\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-1 verification failure due to shortened signature\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-256 verification failure due to shortened signature\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-384 verification failure due to shortened signature\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-512 verification failure due to shortened signature\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-1 verification failure due to altered plaintext\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-256 verification failure due to altered plaintext\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-384 verification failure due to altered plaintext\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-512 verification failure due to altered plaintext\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-1 verification failure due to altered plaintext\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-256 verification failure due to altered plaintext\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-384 verification failure due to altered plaintext\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-512 verification failure due to altered plaintext\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-1 verification failure due to altered plaintext\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-256 verification failure due to altered plaintext\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-384 verification failure due to altered plaintext\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-512 verification failure due to altered plaintext\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-1 - The signature was truncated by 1 byte verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-1 - The signature was made using SHA-1, however verification is being done using SHA-256 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-1 - The signature was made using SHA-1, however verification is being done using SHA-384 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-1 - The signature was made using SHA-1, however verification is being done using SHA-512 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-1 - Signature has excess padding verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-1 - The signature is empty verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-1 - The signature is all zeroes verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-256 - The signature was truncated by 1 byte verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-256 - The signature was made using SHA-256, however verification is being done using SHA-1 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-256 - The signature was made using SHA-256, however verification is being done using SHA-384 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-256 - The signature was made using SHA-256, however verification is being done using SHA-512 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-256 - Signature has excess padding verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-256 - The signature is empty verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-256 - The signature is all zeroes verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-384 - The signature was truncated by 1 byte verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-384 - The signature was made using SHA-384, however verification is being done using SHA-1 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-384 - The signature was made using SHA-384, however verification is being done using SHA-256 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-384 - The signature was made using SHA-384, however verification is being done using SHA-512 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-384 - Signature has excess padding verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-384 - The signature is empty verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-384 - The signature is all zeroes verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-512 - The signature was truncated by 1 byte verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-512 - The signature was made using SHA-512, however verification is being done using SHA-1 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-512 - The signature was made using SHA-512, however verification is being done using SHA-256 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-512 - The signature was made using SHA-512, however verification is being done using SHA-384 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-512 - Signature has excess padding verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-512 - The signature is empty verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-256 with SHA-512 - The signature is all zeroes verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-1 - The signature was truncated by 1 byte verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-1 - The signature was made using SHA-1, however verification is being done using SHA-256 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-1 - The signature was made using SHA-1, however verification is being done using SHA-384 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-1 - The signature was made using SHA-1, however verification is being done using SHA-512 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-1 - Signature has excess padding verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-1 - The signature is empty verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-1 - The signature is all zeroes verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-256 - The signature was truncated by 1 byte verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-256 - The signature was made using SHA-256, however verification is being done using SHA-1 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-256 - The signature was made using SHA-256, however verification is being done using SHA-384 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-256 - The signature was made using SHA-256, however verification is being done using SHA-512 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-256 - Signature has excess padding verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-256 - The signature is empty verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-256 - The signature is all zeroes verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-384 - The signature was truncated by 1 byte verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-384 - The signature was made using SHA-384, however verification is being done using SHA-1 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-384 - The signature was made using SHA-384, however verification is being done using SHA-256 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-384 - The signature was made using SHA-384, however verification is being done using SHA-512 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-384 - Signature has excess padding verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-384 - The signature is empty verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-384 - The signature is all zeroes verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-512 - The signature was truncated by 1 byte verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-512 - The signature was made using SHA-512, however verification is being done using SHA-1 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-512 - The signature was made using SHA-512, however verification is being done using SHA-256 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-512 - The signature was made using SHA-512, however verification is being done using SHA-384 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-512 - Signature has excess padding verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-512 - The signature is empty verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-384 with SHA-512 - The signature is all zeroes verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-1 - The signature was truncated by 1 byte verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-1 - The signature was made using SHA-1, however verification is being done using SHA-256 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-1 - The signature was made using SHA-1, however verification is being done using SHA-384 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-1 - The signature was made using SHA-1, however verification is being done using SHA-512 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-1 - Signature has excess padding verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-1 - The signature is empty verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-1 - The signature is all zeroes verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-256 - The signature was truncated by 1 byte verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-256 - The signature was made using SHA-256, however verification is being done using SHA-1 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-256 - The signature was made using SHA-256, however verification is being done using SHA-384 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-256 - The signature was made using SHA-256, however verification is being done using SHA-512 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-256 - Signature has excess padding verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-256 - The signature is empty verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-256 - The signature is all zeroes verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-384 - The signature was truncated by 1 byte verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-384 - The signature was made using SHA-384, however verification is being done using SHA-1 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-384 - The signature was made using SHA-384, however verification is being done using SHA-256 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-384 - The signature was made using SHA-384, however verification is being done using SHA-512 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-384 - Signature has excess padding verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-384 - The signature is empty verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-384 - The signature is all zeroes verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-512 - The signature was truncated by 1 byte verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-512 - The signature was made using SHA-512, however verification is being done using SHA-1 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-512 - The signature was made using SHA-512, however verification is being done using SHA-256 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-512 - The signature was made using SHA-512, however verification is being done using SHA-384 verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-512 - Signature has excess padding verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-512 - The signature is empty verification\": {\n    \"status\": \"FAIL\"\n  },\n  \"importVectorKeys step: ECDSA P-521 with SHA-512 - The signature is all zeroes verification\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/WebCryptoAPI/sign_verify/hmac.https.any.js.json",
    "content": "{\n  \"setup\": {\n    \"status\": \"PASS\"\n  },\n  \"generate wrong key step: HMAC with SHA-1 signing with wrong algorithm name\": {\n    \"status\": \"FAIL\"\n  },\n  \"generate wrong key step: HMAC with SHA-256 signing with wrong algorithm name\": {\n    \"status\": \"FAIL\"\n  },\n  \"generate wrong key step: HMAC with SHA-384 signing with wrong algorithm name\": {\n    \"status\": \"FAIL\"\n  },\n  \"generate wrong key step: HMAC with SHA-512 signing with wrong algorithm name\": {\n    \"status\": \"FAIL\"\n  },\n  \"generate wrong key step: HMAC with SHA-1 verifying with wrong algorithm name\": {\n    \"status\": \"FAIL\"\n  },\n  \"generate wrong key step: HMAC with SHA-256 verifying with wrong algorithm name\": {\n    \"status\": \"FAIL\"\n  },\n  \"generate wrong key step: HMAC with SHA-384 verifying with wrong algorithm name\": {\n    \"status\": \"FAIL\"\n  },\n  \"generate wrong key step: HMAC with SHA-512 verifying with wrong algorithm name\": {\n    \"status\": \"FAIL\"\n  },\n  \"HMAC with SHA-1 verification\": {\n    \"status\": \"PASS\"\n  },\n  \"HMAC with SHA-256 verification\": {\n    \"status\": \"PASS\"\n  },\n  \"HMAC with SHA-384 verification\": {\n    \"status\": \"PASS\"\n  },\n  \"HMAC with SHA-512 verification\": {\n    \"status\": \"PASS\"\n  },\n  \"HMAC with SHA-1 verification with altered signature after call\": {\n    \"status\": \"PASS\"\n  },\n  \"HMAC with SHA-256 verification with altered signature after call\": {\n    \"status\": \"PASS\"\n  },\n  \"HMAC with SHA-384 verification with altered signature after call\": {\n    \"status\": \"PASS\"\n  },\n  \"HMAC with SHA-512 verification with altered signature after call\": {\n    \"status\": \"PASS\"\n  },\n  \"HMAC with SHA-1 with altered plaintext after call\": {\n    \"status\": \"PASS\"\n  },\n  \"HMAC with SHA-256 with altered plaintext after call\": {\n    \"status\": \"PASS\"\n  },\n  \"HMAC with SHA-384 with altered plaintext after call\": {\n    \"status\": \"PASS\"\n  },\n  \"HMAC with SHA-512 with altered plaintext after call\": {\n    \"status\": \"PASS\"\n  },\n  \"HMAC with SHA-1 no verify usage\": {\n    \"status\": \"PASS\"\n  },\n  \"HMAC with SHA-256 no verify usage\": {\n    \"status\": \"PASS\"\n  },\n  \"HMAC with SHA-384 no verify usage\": {\n    \"status\": \"PASS\"\n  },\n  \"HMAC with SHA-512 no verify usage\": {\n    \"status\": \"PASS\"\n  },\n  \"HMAC with SHA-1 round trip\": {\n    \"status\": \"PASS\"\n  },\n  \"HMAC with SHA-256 round trip\": {\n    \"status\": \"PASS\"\n  },\n  \"HMAC with SHA-384 round trip\": {\n    \"status\": \"PASS\"\n  },\n  \"HMAC with SHA-512 round trip\": {\n    \"status\": \"PASS\"\n  },\n  \"HMAC with SHA-1 verification failure due to wrong plaintext\": {\n    \"status\": \"PASS\"\n  },\n  \"HMAC with SHA-256 verification failure due to wrong plaintext\": {\n    \"status\": \"PASS\"\n  },\n  \"HMAC with SHA-384 verification failure due to wrong plaintext\": {\n    \"status\": \"PASS\"\n  },\n  \"HMAC with SHA-512 verification failure due to wrong plaintext\": {\n    \"status\": \"PASS\"\n  },\n  \"HMAC with SHA-1 verification failure due to wrong signature\": {\n    \"status\": \"PASS\"\n  },\n  \"HMAC with SHA-256 verification failure due to wrong signature\": {\n    \"status\": \"PASS\"\n  },\n  \"HMAC with SHA-384 verification failure due to wrong signature\": {\n    \"status\": \"PASS\"\n  },\n  \"HMAC with SHA-512 verification failure due to wrong signature\": {\n    \"status\": \"PASS\"\n  },\n  \"HMAC with SHA-1 verification failure due to short signature\": {\n    \"status\": \"PASS\"\n  },\n  \"HMAC with SHA-256 verification failure due to short signature\": {\n    \"status\": \"PASS\"\n  },\n  \"HMAC with SHA-384 verification failure due to short signature\": {\n    \"status\": \"PASS\"\n  },\n  \"HMAC with SHA-512 verification failure due to short signature\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/compression/compression-bad-chunks.tentative.any.js.json",
    "content": "{\n  \"chunk of type undefined should error the stream for gzip\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type undefined should error the stream for deflate\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type undefined should error the stream for deflate-raw\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type null should error the stream for gzip\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type null should error the stream for deflate\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type null should error the stream for deflate-raw\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type numeric should error the stream for gzip\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type numeric should error the stream for deflate\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type numeric should error the stream for deflate-raw\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type object, not BufferSource should error the stream for gzip\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type object, not BufferSource should error the stream for deflate\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type object, not BufferSource should error the stream for deflate-raw\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type array should error the stream for gzip\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type array should error the stream for deflate\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type array should error the stream for deflate-raw\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type SharedArrayBuffer should error the stream for gzip\": {\n    \"status\": \"FAIL\"\n  },\n  \"chunk of type SharedArrayBuffer should error the stream for deflate\": {\n    \"status\": \"FAIL\"\n  },\n  \"chunk of type SharedArrayBuffer should error the stream for deflate-raw\": {\n    \"status\": \"FAIL\"\n  },\n  \"chunk of type shared Uint8Array should error the stream for gzip\": {\n    \"status\": \"FAIL\"\n  },\n  \"chunk of type shared Uint8Array should error the stream for deflate\": {\n    \"status\": \"FAIL\"\n  },\n  \"chunk of type shared Uint8Array should error the stream for deflate-raw\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/compression/compression-constructor-error.tentative.any.js.json",
    "content": "{\n  \"\\\"a\\\" should cause the constructor to throw\": {\n    \"status\": \"PASS\"\n  },\n  \"no input should cause the constructor to throw\": {\n    \"status\": \"PASS\"\n  },\n  \"non-string input should cause the constructor to throw\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/compression/compression-including-empty-chunk.tentative.any.js.json",
    "content": "{\n  \"the result of compressing [,Hello,Hello] with deflate should be 'HelloHello'\": {\n    \"status\": \"PASS\"\n  },\n  \"the result of compressing [,Hello,Hello] with gzip should be 'HelloHello'\": {\n    \"status\": \"PASS\"\n  },\n  \"the result of compressing [,Hello,Hello] with deflate-raw should be 'HelloHello'\": {\n    \"status\": \"PASS\"\n  },\n  \"the result of compressing [Hello,,Hello] with deflate should be 'HelloHello'\": {\n    \"status\": \"PASS\"\n  },\n  \"the result of compressing [Hello,,Hello] with gzip should be 'HelloHello'\": {\n    \"status\": \"PASS\"\n  },\n  \"the result of compressing [Hello,,Hello] with deflate-raw should be 'HelloHello'\": {\n    \"status\": \"PASS\"\n  },\n  \"the result of compressing [Hello,Hello,] with deflate should be 'HelloHello'\": {\n    \"status\": \"PASS\"\n  },\n  \"the result of compressing [Hello,Hello,] with gzip should be 'HelloHello'\": {\n    \"status\": \"PASS\"\n  },\n  \"the result of compressing [Hello,Hello,] with deflate-raw should be 'HelloHello'\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/compression/compression-large-flush-output.any.js.json",
    "content": "{\n  \"deflate compression with large flush output\": {\n    \"status\": \"FAIL\"\n  },\n  \"gzip compression with large flush output\": {\n    \"status\": \"FAIL\"\n  },\n  \"deflate-raw compression with large flush output\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/compression/compression-multiple-chunks.tentative.any.js.json",
    "content": "{\n  \"compressing 2 chunks with deflate should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 2 chunks with gzip should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 2 chunks with deflate-raw should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 3 chunks with deflate should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 3 chunks with gzip should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 3 chunks with deflate-raw should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 4 chunks with deflate should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 4 chunks with gzip should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 4 chunks with deflate-raw should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 5 chunks with deflate should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 5 chunks with gzip should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 5 chunks with deflate-raw should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 6 chunks with deflate should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 6 chunks with gzip should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 6 chunks with deflate-raw should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 7 chunks with deflate should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 7 chunks with gzip should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 7 chunks with deflate-raw should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 8 chunks with deflate should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 8 chunks with gzip should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 8 chunks with deflate-raw should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 9 chunks with deflate should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 9 chunks with gzip should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 9 chunks with deflate-raw should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 10 chunks with deflate should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 10 chunks with gzip should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 10 chunks with deflate-raw should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 11 chunks with deflate should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 11 chunks with gzip should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 11 chunks with deflate-raw should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 12 chunks with deflate should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 12 chunks with gzip should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 12 chunks with deflate-raw should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 13 chunks with deflate should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 13 chunks with gzip should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 13 chunks with deflate-raw should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 14 chunks with deflate should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 14 chunks with gzip should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 14 chunks with deflate-raw should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 15 chunks with deflate should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 15 chunks with gzip should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 15 chunks with deflate-raw should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 16 chunks with deflate should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 16 chunks with gzip should work\": {\n    \"status\": \"PASS\"\n  },\n  \"compressing 16 chunks with deflate-raw should work\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/compression/compression-output-length.tentative.any.js.json",
    "content": "{\n  \"the length of deflated data should be shorter than that of the original data\": {\n    \"status\": \"PASS\"\n  },\n  \"the length of gzipped data should be shorter than that of the original data\": {\n    \"status\": \"PASS\"\n  },\n  \"the length of deflated (with -raw) data should be shorter than that of the original data\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/compression/compression-stream.tentative.any.js.json",
    "content": "{\n  \"CompressionStream constructor should throw on invalid format\": {\n    \"status\": \"PASS\"\n  },\n  \"deflated empty data should be reinflated back to its origin\": {\n    \"status\": \"PASS\"\n  },\n  \"deflated small amount data should be reinflated back to its origin\": {\n    \"status\": \"PASS\"\n  },\n  \"deflated large amount data should be reinflated back to its origin\": {\n    \"status\": \"PASS\"\n  },\n  \"gzipped empty data should be reinflated back to its origin\": {\n    \"status\": \"PASS\"\n  },\n  \"gzipped small amount data should be reinflated back to its origin\": {\n    \"status\": \"PASS\"\n  },\n  \"gzipped large amount data should be reinflated back to its origin\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/compression/compression-with-detach.tentative.window.js.json",
    "content": "{\n  \"data should be correctly compressed even if input is detached partway\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/compression/decompression-bad-chunks.tentative.any.js.json",
    "content": "{\n  \"chunk of type undefined should error the stream for gzip\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type undefined should error the stream for deflate\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type undefined should error the stream for deflate-raw\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type null should error the stream for gzip\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type null should error the stream for deflate\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type null should error the stream for deflate-raw\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type numeric should error the stream for gzip\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type numeric should error the stream for deflate\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type numeric should error the stream for deflate-raw\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type object, not BufferSource should error the stream for gzip\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type object, not BufferSource should error the stream for deflate\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type object, not BufferSource should error the stream for deflate-raw\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type array should error the stream for gzip\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type array should error the stream for deflate\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type array should error the stream for deflate-raw\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type SharedArrayBuffer should error the stream for gzip\": {\n    \"status\": \"FAIL\"\n  },\n  \"chunk of type SharedArrayBuffer should error the stream for deflate\": {\n    \"status\": \"FAIL\"\n  },\n  \"chunk of type SharedArrayBuffer should error the stream for deflate-raw\": {\n    \"status\": \"FAIL\"\n  },\n  \"chunk of type shared Uint8Array should error the stream for gzip\": {\n    \"status\": \"FAIL\"\n  },\n  \"chunk of type shared Uint8Array should error the stream for deflate\": {\n    \"status\": \"FAIL\"\n  },\n  \"chunk of type shared Uint8Array should error the stream for deflate-raw\": {\n    \"status\": \"FAIL\"\n  },\n  \"chunk of type invalid deflate bytes should error the stream for gzip\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type invalid deflate bytes should error the stream for deflate\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type invalid deflate bytes should error the stream for deflate-raw\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type invalid gzip bytes should error the stream for gzip\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type invalid gzip bytes should error the stream for deflate\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type invalid gzip bytes should error the stream for deflate-raw\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/compression/decompression-buffersource.tentative.any.js.json",
    "content": "{\n  \"chunk of type ArrayBuffer should work for deflate\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type Int8Array should work for deflate\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type Uint8Array should work for deflate\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type Uint8ClampedArray should work for deflate\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type Int16Array should work for deflate\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type Uint16Array should work for deflate\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type Int32Array should work for deflate\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type Uint32Array should work for deflate\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type Float16Array should work for deflate\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type Float32Array should work for deflate\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type Float64Array should work for deflate\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type DataView should work for deflate\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type ArrayBuffer should work for gzip\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type Int8Array should work for gzip\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type Uint8Array should work for gzip\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type Uint8ClambedArray should work for gzip\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type Int16Array should work for gzip\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type Uint16Array should work for gzip\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type Int32Array should work for gzip\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type Uint32Array should work for gzip\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type Float16Array should work for gzip\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type Float32Array should work for gzip\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type Float64Array should work for gzip\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type DataView should work for gzip\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type ArrayBuffer should work for deflate-raw\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type Int8Array should work for deflate-raw\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type Uint8Array should work for deflate-raw\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type Uint8ClampedArray should work for deflate-raw\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type Int16Array should work for deflate-raw\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type Uint16Array should work for deflate-raw\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type Int32Array should work for deflate-raw\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type Uint32Array should work for deflate-raw\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type Float16Array should work for deflate-raw\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type Float32Array should work for deflate-raw\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type Float64Array should work for deflate-raw\": {\n    \"status\": \"PASS\"\n  },\n  \"chunk of type DataView should work for deflate-raw\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/compression/decompression-constructor-error.tentative.any.js.json",
    "content": "{\n  \"\\\"a\\\" should cause the constructor to throw\": {\n    \"status\": \"PASS\"\n  },\n  \"no input should cause the constructor to throw\": {\n    \"status\": \"PASS\"\n  },\n  \"non-string input should cause the constructor to throw\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/compression/decompression-correct-input.tentative.any.js.json",
    "content": "{\n  \"decompressing deflated input should work\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing gzip input should work\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing deflated (with -raw) input should work\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/compression/decompression-corrupt-input.tentative.any.js.json",
    "content": "{\n  \"the unchanged input for 'deflate' should decompress successfully\": {\n    \"status\": \"PASS\"\n  },\n  \"truncating the input for 'deflate' should give an error\": {\n    \"status\": \"FAIL\"\n  },\n  \"trailing junk for 'deflate' should give an error\": {\n    \"status\": \"PASS\"\n  },\n  \"format 'deflate' field CMF should be error for 0\": {\n    \"status\": \"PASS\"\n  },\n  \"format 'deflate' field FLG should be success for 218\": {\n    \"status\": \"PASS\"\n  },\n  \"format 'deflate' field FLG should be success for 1\": {\n    \"status\": \"PASS\"\n  },\n  \"format 'deflate' field FLG should be success for 94\": {\n    \"status\": \"PASS\"\n  },\n  \"format 'deflate' field FLG should be error for 157\": {\n    \"status\": \"PASS\"\n  },\n  \"format 'deflate' field DATA should be success for 4\": {\n    \"status\": \"PASS\"\n  },\n  \"format 'deflate' field DATA should be error for 5\": {\n    \"status\": \"PASS\"\n  },\n  \"format 'deflate' field ADLER should be error for 255\": {\n    \"status\": \"FAIL\"\n  },\n  \"the unchanged input for 'gzip' should decompress successfully\": {\n    \"status\": \"PASS\"\n  },\n  \"truncating the input for 'gzip' should give an error\": {\n    \"status\": \"FAIL\"\n  },\n  \"trailing junk for 'gzip' should give an error\": {\n    \"status\": \"PASS\"\n  },\n  \"format 'gzip' field ID should be error for 255\": {\n    \"status\": \"PASS\"\n  },\n  \"format 'gzip' field CM should be error for 0\": {\n    \"status\": \"PASS\"\n  },\n  \"format 'gzip' field FLG should be success for 1\": {\n    \"status\": \"PASS\"\n  },\n  \"format 'gzip' field FLG should be error for 2\": {\n    \"status\": \"PASS\"\n  },\n  \"format 'gzip' field MTIME should be success for 255\": {\n    \"status\": \"PASS\"\n  },\n  \"format 'gzip' field XFL should be success for 255\": {\n    \"status\": \"PASS\"\n  },\n  \"format 'gzip' field OS should be success for 128\": {\n    \"status\": \"PASS\"\n  },\n  \"format 'gzip' field DATA should be error for 3\": {\n    \"status\": \"PASS\"\n  },\n  \"format 'gzip' field DATA should be success for 4\": {\n    \"status\": \"PASS\"\n  },\n  \"format 'gzip' field CRC should be error for 0\": {\n    \"status\": \"PASS\"\n  },\n  \"format 'gzip' field ISIZE should be error for 1\": {\n    \"status\": \"FAIL\"\n  },\n  \"the deflate input compressed with dictionary should give an error\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/compression/decompression-empty-input.tentative.any.js.json",
    "content": "{\n  \"decompressing gzip empty input should work\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing deflate empty input should work\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing deflate-raw empty input should work\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/compression/decompression-split-chunk.tentative.any.js.json",
    "content": "{\n  \"decompressing splitted chunk into pieces of size 1 should work in deflate\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 1 should work in gzip\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 1 should work in deflate-raw\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 2 should work in deflate\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 2 should work in gzip\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 2 should work in deflate-raw\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 3 should work in deflate\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 3 should work in gzip\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 3 should work in deflate-raw\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 4 should work in deflate\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 4 should work in gzip\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 4 should work in deflate-raw\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 5 should work in deflate\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 5 should work in gzip\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 5 should work in deflate-raw\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 6 should work in deflate\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 6 should work in gzip\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 6 should work in deflate-raw\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 7 should work in deflate\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 7 should work in gzip\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 7 should work in deflate-raw\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 8 should work in deflate\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 8 should work in gzip\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 8 should work in deflate-raw\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 9 should work in deflate\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 9 should work in gzip\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 9 should work in deflate-raw\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 10 should work in deflate\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 10 should work in gzip\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 10 should work in deflate-raw\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 11 should work in deflate\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 11 should work in gzip\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 11 should work in deflate-raw\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 12 should work in deflate\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 12 should work in gzip\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 12 should work in deflate-raw\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 13 should work in deflate\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 13 should work in gzip\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 13 should work in deflate-raw\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 14 should work in deflate\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 14 should work in gzip\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 14 should work in deflate-raw\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 15 should work in deflate\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 15 should work in gzip\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing splitted chunk into pieces of size 15 should work in deflate-raw\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/compression/decompression-uint8array-output.tentative.any.js.json",
    "content": "{\n  \"decompressing deflated output should give Uint8Array chunks\": {\n    \"status\": \"PASS\"\n  },\n  \"decompressing gzip output should give Uint8Array chunks\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/compression/decompression-with-detach.tentative.window.js.json",
    "content": "{\n  \"data should be correctly decompressed even if input is detached partway\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/compression/idlharness.https.any.js.json",
    "content": "{\n  \"idl_test setup\": {\n    \"status\": \"PASS\"\n  },\n  \"idl_test validation\": {\n    \"status\": \"PASS\"\n  },\n  \"CompressionStream includes GenericTransformStream: member names are unique\": {\n    \"status\": \"PASS\"\n  },\n  \"DecompressionStream includes GenericTransformStream: member names are unique\": {\n    \"status\": \"PASS\"\n  },\n  \"CompressionStream interface: existence and properties of interface object\": {\n    \"status\": \"PASS\"\n  },\n  \"CompressionStream interface object length\": {\n    \"status\": \"PASS\"\n  },\n  \"CompressionStream interface object name\": {\n    \"status\": \"PASS\"\n  },\n  \"CompressionStream interface: existence and properties of interface prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"CompressionStream interface: existence and properties of interface prototype object's \\\"constructor\\\" property\": {\n    \"status\": \"PASS\"\n  },\n  \"CompressionStream interface: existence and properties of interface prototype object's @@unscopables property\": {\n    \"status\": \"PASS\"\n  },\n  \"CompressionStream must be primary interface of new CompressionStream(\\\"deflate\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"Stringification of new CompressionStream(\\\"deflate\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"DecompressionStream interface: existence and properties of interface object\": {\n    \"status\": \"PASS\"\n  },\n  \"DecompressionStream interface object length\": {\n    \"status\": \"PASS\"\n  },\n  \"DecompressionStream interface object name\": {\n    \"status\": \"PASS\"\n  },\n  \"DecompressionStream interface: existence and properties of interface prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"DecompressionStream interface: existence and properties of interface prototype object's \\\"constructor\\\" property\": {\n    \"status\": \"PASS\"\n  },\n  \"DecompressionStream interface: existence and properties of interface prototype object's @@unscopables property\": {\n    \"status\": \"PASS\"\n  },\n  \"DecompressionStream must be primary interface of new DecompressionStream(\\\"deflate\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"Stringification of new DecompressionStream(\\\"deflate\\\")\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/console/console-is-a-namespace.any.js.json",
    "content": "{\n  \"console exists on the global object\": {\n    \"status\": \"PASS\"\n  },\n  \"console has the right property descriptors\": {\n    \"status\": \"PASS\"\n  },\n  \"Console (uppercase, as if it were an interface) must not exist\": {\n    \"status\": \"PASS\"\n  },\n  \"The prototype chain must be correct\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/console/console-label-conversion.any.js.json",
    "content": "{\n  \"console.count()'s label gets converted to string via label.toString() when label is an object\": {\n    \"status\": \"PASS\"\n  },\n  \"console.count() throws exceptions generated by erroneous label.toString() conversion\": {\n    \"status\": \"PASS\"\n  },\n  \"console.countReset()'s label gets converted to string via label.toString() when label is an object\": {\n    \"status\": \"PASS\"\n  },\n  \"console.countReset() throws exceptions generated by erroneous label.toString() conversion\": {\n    \"status\": \"PASS\"\n  },\n  \"console.time()'s label gets converted to string via label.toString() when label is an object\": {\n    \"status\": \"PASS\"\n  },\n  \"console.time() throws exceptions generated by erroneous label.toString() conversion\": {\n    \"status\": \"PASS\"\n  },\n  \"console.timeLog()'s label gets converted to string via label.toString() when label is an object\": {\n    \"status\": \"PASS\"\n  },\n  \"console.timeLog() throws exceptions generated by erroneous label.toString() conversion\": {\n    \"status\": \"PASS\"\n  },\n  \"console.timeEnd()'s label gets converted to string via label.toString() when label is an object\": {\n    \"status\": \"PASS\"\n  },\n  \"console.timeEnd() throws exceptions generated by erroneous label.toString() conversion\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/console/console-log-symbol.any.js.json",
    "content": "{\n  \"Logging a symbol doesn't throw\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/console/console-namespace-object-class-string.any.js.json",
    "content": "{\n  \"@@toStringTag exists on the namespace object with the appropriate descriptor\": {\n    \"status\": \"PASS\"\n  },\n  \"Object.prototype.toString applied to the namespace object\": {\n    \"status\": \"PASS\"\n  },\n  \"Object.prototype.toString applied after modifying the namespace object's @@toStringTag\": {\n    \"status\": \"PASS\"\n  },\n  \"Object.prototype.toString applied after deleting @@toStringTag\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/console/console-tests-historical.any.js.json",
    "content": "{\n  \"'timeline' function should not exist on the console object\": {\n    \"status\": \"PASS\"\n  },\n  \"'timelineEnd' function should not exist on the console object\": {\n    \"status\": \"PASS\"\n  },\n  \"'markTimeline' function should not exist on the console object\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/console/idlharness.any.js.json",
    "content": "{\n  \"idl_test setup\": {\n    \"status\": \"PASS\"\n  },\n  \"idl_test validation\": {\n    \"status\": \"PASS\"\n  },\n  \"console namespace: extended attributes\": {\n    \"status\": \"PASS\"\n  },\n  \"console namespace: property descriptor\": {\n    \"status\": \"PASS\"\n  },\n  \"console namespace: [[Extensible]] is true\": {\n    \"status\": \"PASS\"\n  },\n  \"console namespace: [[Prototype]] is Object.prototype\": {\n    \"status\": \"PASS\"\n  },\n  \"console namespace: typeof is \\\"object\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"console namespace: has no length property\": {\n    \"status\": \"PASS\"\n  },\n  \"console namespace: has no name property\": {\n    \"status\": \"PASS\"\n  },\n  \"console namespace: operation assert(optional boolean, any...)\": {\n    \"status\": \"PASS\"\n  },\n  \"console namespace: operation clear()\": {\n    \"status\": \"PASS\"\n  },\n  \"console namespace: operation debug(any...)\": {\n    \"status\": \"PASS\"\n  },\n  \"console namespace: operation error(any...)\": {\n    \"status\": \"PASS\"\n  },\n  \"console namespace: operation info(any...)\": {\n    \"status\": \"PASS\"\n  },\n  \"console namespace: operation log(any...)\": {\n    \"status\": \"PASS\"\n  },\n  \"console namespace: operation table(optional any, optional sequence<DOMString>)\": {\n    \"status\": \"PASS\"\n  },\n  \"console namespace: operation trace(any...)\": {\n    \"status\": \"PASS\"\n  },\n  \"console namespace: operation warn(any...)\": {\n    \"status\": \"PASS\"\n  },\n  \"console namespace: operation dir(optional any, optional object?)\": {\n    \"status\": \"PASS\"\n  },\n  \"console namespace: operation dirxml(any...)\": {\n    \"status\": \"PASS\"\n  },\n  \"console namespace: operation count(optional DOMString)\": {\n    \"status\": \"PASS\"\n  },\n  \"console namespace: operation countReset(optional DOMString)\": {\n    \"status\": \"PASS\"\n  },\n  \"console namespace: operation group(any...)\": {\n    \"status\": \"PASS\"\n  },\n  \"console namespace: operation groupCollapsed(any...)\": {\n    \"status\": \"PASS\"\n  },\n  \"console namespace: operation groupEnd()\": {\n    \"status\": \"PASS\"\n  },\n  \"console namespace: operation time(optional DOMString)\": {\n    \"status\": \"PASS\"\n  },\n  \"console namespace: operation timeLog(optional DOMString, any...)\": {\n    \"status\": \"PASS\"\n  },\n  \"console namespace: operation timeEnd(optional DOMString)\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/dom/events/AddEventListenerOptions-once.any.js.json",
    "content": "{\n  \"Once listener should be invoked only once\": {\n    \"status\": \"PASS\"\n  },\n  \"Once listener should be invoked only once even if the event is nested\": {\n    \"status\": \"PASS\"\n  },\n  \"Once listener should be added / removed like normal listeners\": {\n    \"status\": \"PASS\"\n  },\n  \"Multiple once listeners should be invoked even if the stopImmediatePropagation is set\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/dom/events/AddEventListenerOptions-passive.any.js.json",
    "content": "{\n  \"Supports passive option on addEventListener only\": {\n    \"status\": \"PASS\"\n  },\n  \"preventDefault should be ignored if-and-only-if the passive option is true\": {\n    \"status\": \"PASS\"\n  },\n  \"returnValue should be ignored if-and-only-if the passive option is true\": {\n    \"status\": \"PASS\"\n  },\n  \"passive behavior of one listener should be unaffected by the presence of other listeners\": {\n    \"status\": \"PASS\"\n  },\n  \"Equivalence of option values\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/dom/events/Event-constructors.any.js.json",
    "content": "{\n  \"Event-constructors\": {\n    \"status\": \"PASS\"\n  },\n  \"Event-constructors 1\": {\n    \"status\": \"PASS\"\n  },\n  \"Event-constructors 2\": {\n    \"status\": \"PASS\"\n  },\n  \"Event-constructors 3\": {\n    \"status\": \"PASS\"\n  },\n  \"Event-constructors 4\": {\n    \"status\": \"PASS\"\n  },\n  \"Event-constructors 5\": {\n    \"status\": \"PASS\"\n  },\n  \"Event-constructors 6\": {\n    \"status\": \"PASS\"\n  },\n  \"Event-constructors 7\": {\n    \"status\": \"PASS\"\n  },\n  \"Event-constructors 8\": {\n    \"status\": \"PASS\"\n  },\n  \"Event-constructors 9\": {\n    \"status\": \"PASS\"\n  },\n  \"Event-constructors 10\": {\n    \"status\": \"PASS\"\n  },\n  \"Event-constructors 11\": {\n    \"status\": \"PASS\"\n  },\n  \"Event-constructors 12\": {\n    \"status\": \"PASS\"\n  },\n  \"Event-constructors 13\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/dom/events/EventTarget-add-remove-listener.any.js.json",
    "content": "{\n  \"Removing an event listener without explicit capture arg should succeed\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/dom/events/EventTarget-addEventListener.any.js.json",
    "content": "{\n  \"Adding a null event listener should succeed\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/dom/events/EventTarget-constructible.any.js.json",
    "content": "{\n  \"A constructed EventTarget can be used as expected\": {\n    \"status\": \"PASS\"\n  },\n  \"A constructed EventTarget implements dispatch correctly\": {\n    \"status\": \"PASS\"\n  },\n  \"EventTarget can be subclassed\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/dom/events/EventTarget-removeEventListener.any.js.json",
    "content": "{\n  \"removing a null event listener should succeed\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/encoding/api-basics.any.js.json",
    "content": "{\n  \"Default encodings\": {\n    \"status\": \"PASS\"\n  },\n  \"Default inputs\": {\n    \"status\": \"PASS\"\n  },\n  \"Encode/decode round trip: utf-8\": {\n    \"status\": \"PASS\"\n  },\n  \"Decode sample: utf-16le\": {\n    \"status\": \"PASS\"\n  },\n  \"Decode sample: utf-16be\": {\n    \"status\": \"PASS\"\n  },\n  \"Decode sample: utf-16\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/encoding/api-invalid-label.any.js.json",
    "content": "{\n  \"Invalid label \\\"invalid-invalidLabel\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0unicode-1-1-utf-8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"unicode-1-1-utf-8\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0unicode-1-1-utf-8\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vunicode-1-1-utf-8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"unicode-1-1-utf-8\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vunicode-1-1-utf-8\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" unicode-1-1-utf-8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"unicode-1-1-utf-8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" unicode-1-1-utf-8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" unicode-1-1-utf-8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"unicode-1-1-utf-8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" unicode-1-1-utf-8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" unicode-1-1-utf-8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"unicode-1-1-utf-8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" unicode-1-1-utf-8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0unicode11utf8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"unicode11utf8\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0unicode11utf8\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vunicode11utf8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"unicode11utf8\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vunicode11utf8\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" unicode11utf8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"unicode11utf8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" unicode11utf8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" unicode11utf8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"unicode11utf8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" unicode11utf8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" unicode11utf8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"unicode11utf8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" unicode11utf8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0unicode20utf8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"unicode20utf8\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0unicode20utf8\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vunicode20utf8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"unicode20utf8\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vunicode20utf8\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" unicode20utf8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"unicode20utf8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" unicode20utf8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" unicode20utf8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"unicode20utf8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" unicode20utf8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" unicode20utf8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"unicode20utf8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" unicode20utf8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0utf-8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"utf-8\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0utf-8\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vutf-8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"utf-8\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vutf-8\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" utf-8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"utf-8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" utf-8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" utf-8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"utf-8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" utf-8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" utf-8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"utf-8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" utf-8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0utf8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"utf8\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0utf8\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vutf8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"utf8\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vutf8\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" utf8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"utf8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" utf8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" utf8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"utf8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" utf8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" utf8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"utf8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" utf8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0x-unicode20utf8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-unicode20utf8\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0x-unicode20utf8\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vx-unicode20utf8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-unicode20utf8\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vx-unicode20utf8\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-unicode20utf8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-unicode20utf8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-unicode20utf8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-unicode20utf8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-unicode20utf8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-unicode20utf8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-unicode20utf8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-unicode20utf8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-unicode20utf8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0866\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"866\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0866\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\v866\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"866\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\v866\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" 866\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"866 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" 866 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" 866\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"866 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" 866 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" 866\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"866 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" 866 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0cp866\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp866\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0cp866\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcp866\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp866\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcp866\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp866\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp866 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp866 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp866\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp866 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp866 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp866\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp866 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp866 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csibm866\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csibm866\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csibm866\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsibm866\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csibm866\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsibm866\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csibm866\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csibm866 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csibm866 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csibm866\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csibm866 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csibm866 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csibm866\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csibm866 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csibm866 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0ibm866\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ibm866\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0ibm866\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vibm866\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ibm866\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vibm866\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ibm866\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ibm866 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ibm866 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ibm866\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ibm866 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ibm866 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ibm866\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ibm866 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ibm866 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csisolatin2\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatin2\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csisolatin2\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsisolatin2\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatin2\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsisolatin2\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin2\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatin2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin2\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatin2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin2\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatin2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-8859-2\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-2\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-8859-2\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-8859-2\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-2\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-8859-2\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-2\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-2\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-2\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-ir-101\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-101\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-ir-101\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-ir-101\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-101\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-ir-101\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-101\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-101 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-101 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-101\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-101 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-101 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-101\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-101 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-101 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso8859-2\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-2\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso8859-2\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso8859-2\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-2\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso8859-2\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-2\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-2\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-2\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso88592\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88592\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso88592\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso88592\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88592\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso88592\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88592\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88592 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88592 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88592\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88592 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88592 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88592\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88592 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88592 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso_8859-2\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-2\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso_8859-2\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso_8859-2\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-2\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso_8859-2\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-2\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-2\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-2\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso_8859-2:1987\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-2:1987\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso_8859-2:1987\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso_8859-2:1987\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-2:1987\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso_8859-2:1987\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-2:1987\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-2:1987 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-2:1987 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-2:1987\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-2:1987 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-2:1987 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-2:1987\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-2:1987 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-2:1987 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0l2\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"l2\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0l2\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vl2\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"l2\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vl2\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l2\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"l2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l2\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"l2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l2\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"l2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0latin2\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"latin2\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0latin2\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vlatin2\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"latin2\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vlatin2\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" latin2\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"latin2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" latin2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" latin2\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"latin2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" latin2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" latin2\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"latin2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" latin2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csisolatin3\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatin3\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csisolatin3\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsisolatin3\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatin3\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsisolatin3\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin3\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatin3 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin3 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin3\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatin3 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin3 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin3\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatin3 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin3 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-8859-3\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-3\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-8859-3\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-8859-3\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-3\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-8859-3\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-3\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-3 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-3 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-3\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-3 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-3 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-3\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-3 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-3 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-ir-109\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-109\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-ir-109\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-ir-109\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-109\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-ir-109\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-109\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-109 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-109 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-109\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-109 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-109 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-109\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-109 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-109 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso8859-3\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-3\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso8859-3\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso8859-3\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-3\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso8859-3\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-3\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-3 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-3 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-3\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-3 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-3 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-3\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-3 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-3 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso88593\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88593\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso88593\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso88593\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88593\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso88593\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88593\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88593 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88593 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88593\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88593 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88593 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88593\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88593 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88593 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso_8859-3\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-3\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso_8859-3\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso_8859-3\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-3\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso_8859-3\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-3\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-3 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-3 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-3\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-3 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-3 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-3\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-3 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-3 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso_8859-3:1988\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-3:1988\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso_8859-3:1988\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso_8859-3:1988\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-3:1988\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso_8859-3:1988\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-3:1988\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-3:1988 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-3:1988 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-3:1988\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-3:1988 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-3:1988 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-3:1988\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-3:1988 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-3:1988 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0l3\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"l3\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0l3\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vl3\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"l3\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vl3\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l3\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"l3 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l3 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l3\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"l3 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l3 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l3\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"l3 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l3 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0latin3\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"latin3\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0latin3\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vlatin3\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"latin3\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vlatin3\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" latin3\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"latin3 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" latin3 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" latin3\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"latin3 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" latin3 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" latin3\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"latin3 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" latin3 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csisolatin4\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatin4\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csisolatin4\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsisolatin4\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatin4\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsisolatin4\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin4\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatin4 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin4 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin4\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatin4 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin4 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin4\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatin4 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin4 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-8859-4\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-4\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-8859-4\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-8859-4\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-4\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-8859-4\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-4\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-4 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-4 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-4\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-4 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-4 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-4\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-4 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-4 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-ir-110\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-110\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-ir-110\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-ir-110\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-110\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-ir-110\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-110\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-110 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-110 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-110\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-110 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-110 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-110\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-110 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-110 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso8859-4\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-4\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso8859-4\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso8859-4\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-4\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso8859-4\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-4\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-4 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-4 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-4\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-4 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-4 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-4\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-4 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-4 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso88594\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88594\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso88594\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso88594\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88594\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso88594\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88594\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88594 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88594 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88594\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88594 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88594 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88594\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88594 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88594 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso_8859-4\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-4\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso_8859-4\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso_8859-4\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-4\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso_8859-4\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-4\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-4 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-4 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-4\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-4 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-4 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-4\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-4 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-4 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso_8859-4:1988\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-4:1988\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso_8859-4:1988\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso_8859-4:1988\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-4:1988\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso_8859-4:1988\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-4:1988\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-4:1988 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-4:1988 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-4:1988\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-4:1988 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-4:1988 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-4:1988\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-4:1988 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-4:1988 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0l4\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"l4\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0l4\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vl4\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"l4\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vl4\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l4\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"l4 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l4 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l4\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"l4 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l4 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l4\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"l4 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l4 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0latin4\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"latin4\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0latin4\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vlatin4\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"latin4\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vlatin4\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" latin4\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"latin4 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" latin4 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" latin4\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"latin4 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" latin4 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" latin4\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"latin4 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" latin4 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csisolatincyrillic\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatincyrillic\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csisolatincyrillic\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsisolatincyrillic\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatincyrillic\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsisolatincyrillic\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatincyrillic\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatincyrillic \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatincyrillic \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatincyrillic\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatincyrillic \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatincyrillic \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatincyrillic\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatincyrillic \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatincyrillic \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0cyrillic\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cyrillic\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0cyrillic\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcyrillic\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cyrillic\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcyrillic\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cyrillic\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cyrillic \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cyrillic \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cyrillic\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cyrillic \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cyrillic \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cyrillic\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cyrillic \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cyrillic \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-8859-5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-5\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-8859-5\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-8859-5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-5\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-8859-5\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-ir-144\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-144\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-ir-144\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-ir-144\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-144\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-ir-144\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-144\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-144 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-144 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-144\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-144 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-144 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-144\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-144 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-144 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso8859-5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-5\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso8859-5\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso8859-5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-5\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso8859-5\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso88595\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88595\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso88595\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso88595\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88595\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso88595\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88595\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88595 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88595 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88595\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88595 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88595 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88595\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88595 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88595 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso_8859-5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-5\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso_8859-5\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso_8859-5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-5\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso_8859-5\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso_8859-5:1988\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-5:1988\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso_8859-5:1988\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso_8859-5:1988\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-5:1988\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso_8859-5:1988\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-5:1988\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-5:1988 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-5:1988 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-5:1988\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-5:1988 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-5:1988 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-5:1988\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-5:1988 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-5:1988 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0arabic\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"arabic\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0arabic\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\varabic\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"arabic\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\varabic\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" arabic\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"arabic \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" arabic \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" arabic\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"arabic \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" arabic \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" arabic\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"arabic \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" arabic \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0asmo-708\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"asmo-708\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0asmo-708\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vasmo-708\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"asmo-708\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vasmo-708\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" asmo-708\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"asmo-708 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" asmo-708 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" asmo-708\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"asmo-708 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" asmo-708 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" asmo-708\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"asmo-708 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" asmo-708 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csiso88596e\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csiso88596e\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csiso88596e\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsiso88596e\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csiso88596e\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsiso88596e\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso88596e\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csiso88596e \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso88596e \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso88596e\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csiso88596e \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso88596e \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso88596e\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csiso88596e \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso88596e \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csiso88596i\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csiso88596i\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csiso88596i\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsiso88596i\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csiso88596i\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsiso88596i\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso88596i\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csiso88596i \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso88596i \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso88596i\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csiso88596i \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso88596i \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso88596i\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csiso88596i \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso88596i \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csisolatinarabic\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatinarabic\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csisolatinarabic\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsisolatinarabic\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatinarabic\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsisolatinarabic\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatinarabic\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatinarabic \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatinarabic \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatinarabic\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatinarabic \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatinarabic \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatinarabic\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatinarabic \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatinarabic \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0ecma-114\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ecma-114\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0ecma-114\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vecma-114\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ecma-114\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vecma-114\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ecma-114\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ecma-114 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ecma-114 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ecma-114\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ecma-114 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ecma-114 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ecma-114\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ecma-114 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ecma-114 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-8859-6\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-6\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-8859-6\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-8859-6\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-6\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-8859-6\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-6\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-6 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-6 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-6\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-6 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-6 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-6\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-6 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-6 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-8859-6-e\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-6-e\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-8859-6-e\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-8859-6-e\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-6-e\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-8859-6-e\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-6-e\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-6-e \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-6-e \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-6-e\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-6-e \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-6-e \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-6-e\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-6-e \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-6-e \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-8859-6-i\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-6-i\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-8859-6-i\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-8859-6-i\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-6-i\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-8859-6-i\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-6-i\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-6-i \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-6-i \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-6-i\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-6-i \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-6-i \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-6-i\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-6-i \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-6-i \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-ir-127\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-127\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-ir-127\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-ir-127\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-127\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-ir-127\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-127\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-127 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-127 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-127\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-127 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-127 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-127\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-127 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-127 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso8859-6\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-6\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso8859-6\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso8859-6\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-6\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso8859-6\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-6\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-6 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-6 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-6\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-6 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-6 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-6\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-6 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-6 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso88596\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88596\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso88596\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso88596\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88596\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso88596\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88596\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88596 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88596 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88596\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88596 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88596 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88596\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88596 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88596 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso_8859-6\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-6\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso_8859-6\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso_8859-6\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-6\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso_8859-6\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-6\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-6 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-6 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-6\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-6 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-6 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-6\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-6 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-6 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso_8859-6:1987\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-6:1987\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso_8859-6:1987\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso_8859-6:1987\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-6:1987\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso_8859-6:1987\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-6:1987\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-6:1987 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-6:1987 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-6:1987\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-6:1987 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-6:1987 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-6:1987\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-6:1987 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-6:1987 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csisolatingreek\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatingreek\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csisolatingreek\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsisolatingreek\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatingreek\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsisolatingreek\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatingreek\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatingreek \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatingreek \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatingreek\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatingreek \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatingreek \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatingreek\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatingreek \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatingreek \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0ecma-118\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ecma-118\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0ecma-118\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vecma-118\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ecma-118\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vecma-118\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ecma-118\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ecma-118 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ecma-118 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ecma-118\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ecma-118 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ecma-118 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ecma-118\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ecma-118 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ecma-118 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0elot_928\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"elot_928\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0elot_928\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\velot_928\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"elot_928\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\velot_928\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" elot_928\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"elot_928 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" elot_928 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" elot_928\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"elot_928 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" elot_928 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" elot_928\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"elot_928 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" elot_928 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0greek\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"greek\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0greek\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vgreek\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"greek\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vgreek\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" greek\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"greek \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" greek \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" greek\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"greek \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" greek \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" greek\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"greek \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" greek \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0greek8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"greek8\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0greek8\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vgreek8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"greek8\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vgreek8\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" greek8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"greek8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" greek8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" greek8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"greek8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" greek8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" greek8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"greek8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" greek8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-8859-7\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-7\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-8859-7\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-8859-7\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-7\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-8859-7\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-7\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-7 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-7 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-7\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-7 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-7 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-7\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-7 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-7 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-ir-126\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-126\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-ir-126\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-ir-126\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-126\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-ir-126\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-126\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-126 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-126 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-126\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-126 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-126 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-126\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-126 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-126 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso8859-7\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-7\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso8859-7\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso8859-7\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-7\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso8859-7\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-7\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-7 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-7 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-7\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-7 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-7 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-7\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-7 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-7 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso88597\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88597\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso88597\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso88597\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88597\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso88597\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88597\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88597 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88597 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88597\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88597 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88597 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88597\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88597 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88597 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso_8859-7\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-7\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso_8859-7\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso_8859-7\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-7\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso_8859-7\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-7\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-7 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-7 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-7\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-7 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-7 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-7\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-7 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-7 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso_8859-7:1987\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-7:1987\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso_8859-7:1987\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso_8859-7:1987\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-7:1987\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso_8859-7:1987\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-7:1987\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-7:1987 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-7:1987 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-7:1987\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-7:1987 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-7:1987 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-7:1987\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-7:1987 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-7:1987 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0sun_eu_greek\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"sun_eu_greek\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0sun_eu_greek\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vsun_eu_greek\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"sun_eu_greek\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vsun_eu_greek\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" sun_eu_greek\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"sun_eu_greek \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" sun_eu_greek \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" sun_eu_greek\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"sun_eu_greek \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" sun_eu_greek \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" sun_eu_greek\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"sun_eu_greek \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" sun_eu_greek \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csiso88598e\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csiso88598e\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csiso88598e\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsiso88598e\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csiso88598e\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsiso88598e\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso88598e\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csiso88598e \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso88598e \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso88598e\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csiso88598e \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso88598e \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso88598e\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csiso88598e \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso88598e \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csisolatinhebrew\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatinhebrew\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csisolatinhebrew\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsisolatinhebrew\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatinhebrew\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsisolatinhebrew\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatinhebrew\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatinhebrew \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatinhebrew \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatinhebrew\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatinhebrew \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatinhebrew \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatinhebrew\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatinhebrew \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatinhebrew \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0hebrew\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"hebrew\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0hebrew\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vhebrew\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"hebrew\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vhebrew\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" hebrew\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"hebrew \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" hebrew \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" hebrew\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"hebrew \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" hebrew \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" hebrew\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"hebrew \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" hebrew \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-8859-8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-8\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-8859-8\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-8859-8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-8\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-8859-8\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-8859-8-e\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-8-e\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-8859-8-e\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-8859-8-e\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-8-e\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-8859-8-e\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-8-e\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-8-e \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-8-e \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-8-e\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-8-e \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-8-e \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-8-e\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-8-e \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-8-e \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-ir-138\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-138\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-ir-138\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-ir-138\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-138\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-ir-138\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-138\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-138 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-138 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-138\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-138 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-138 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-138\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-138 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-138 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso8859-8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-8\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso8859-8\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso8859-8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-8\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso8859-8\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso88598\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88598\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso88598\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso88598\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88598\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso88598\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88598\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88598 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88598 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88598\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88598 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88598 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88598\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88598 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88598 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso_8859-8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-8\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso_8859-8\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso_8859-8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-8\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso_8859-8\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso_8859-8:1988\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-8:1988\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso_8859-8:1988\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso_8859-8:1988\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-8:1988\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso_8859-8:1988\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-8:1988\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-8:1988 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-8:1988 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-8:1988\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-8:1988 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-8:1988 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-8:1988\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-8:1988 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-8:1988 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0visual\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"visual\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0visual\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vvisual\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"visual\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vvisual\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" visual\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"visual \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" visual \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" visual\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"visual \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" visual \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" visual\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"visual \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" visual \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csiso88598i\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csiso88598i\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csiso88598i\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsiso88598i\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csiso88598i\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsiso88598i\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso88598i\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csiso88598i \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso88598i \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso88598i\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csiso88598i \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso88598i \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso88598i\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csiso88598i \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso88598i \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-8859-8-i\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-8-i\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-8859-8-i\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-8859-8-i\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-8-i\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-8859-8-i\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-8-i\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-8-i \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-8-i \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-8-i\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-8-i \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-8-i \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-8-i\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-8-i \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-8-i \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0logical\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"logical\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0logical\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vlogical\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"logical\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vlogical\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" logical\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"logical \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" logical \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" logical\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"logical \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" logical \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" logical\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"logical \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" logical \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csisolatin6\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatin6\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csisolatin6\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsisolatin6\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatin6\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsisolatin6\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin6\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatin6 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin6 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin6\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatin6 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin6 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin6\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatin6 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin6 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-8859-10\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-10\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-8859-10\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-8859-10\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-10\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-8859-10\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-10\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-10 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-10 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-10\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-10 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-10 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-10\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-10 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-10 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-ir-157\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-157\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-ir-157\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-ir-157\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-157\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-ir-157\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-157\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-157 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-157 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-157\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-157 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-157 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-157\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-157 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-157 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso8859-10\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-10\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso8859-10\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso8859-10\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-10\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso8859-10\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-10\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-10 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-10 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-10\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-10 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-10 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-10\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-10 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-10 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso885910\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso885910\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso885910\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso885910\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso885910\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso885910\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso885910\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso885910 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso885910 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso885910\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso885910 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso885910 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso885910\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso885910 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso885910 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0l6\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"l6\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0l6\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vl6\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"l6\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vl6\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l6\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"l6 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l6 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l6\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"l6 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l6 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l6\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"l6 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l6 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0latin6\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"latin6\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0latin6\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vlatin6\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"latin6\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vlatin6\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" latin6\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"latin6 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" latin6 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" latin6\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"latin6 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" latin6 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" latin6\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"latin6 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" latin6 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-8859-13\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-13\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-8859-13\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-8859-13\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-13\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-8859-13\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-13\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-13 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-13 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-13\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-13 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-13 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-13\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-13 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-13 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso8859-13\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-13\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso8859-13\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso8859-13\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-13\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso8859-13\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-13\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-13 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-13 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-13\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-13 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-13 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-13\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-13 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-13 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso885913\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso885913\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso885913\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso885913\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso885913\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso885913\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso885913\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso885913 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso885913 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso885913\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso885913 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso885913 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso885913\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso885913 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso885913 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-8859-14\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-14\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-8859-14\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-8859-14\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-14\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-8859-14\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-14\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-14 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-14 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-14\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-14 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-14 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-14\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-14 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-14 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso8859-14\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-14\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso8859-14\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso8859-14\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-14\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso8859-14\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-14\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-14 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-14 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-14\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-14 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-14 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-14\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-14 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-14 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso885914\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso885914\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso885914\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso885914\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso885914\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso885914\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso885914\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso885914 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso885914 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso885914\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso885914 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso885914 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso885914\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso885914 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso885914 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csisolatin9\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatin9\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csisolatin9\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsisolatin9\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatin9\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsisolatin9\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin9\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatin9 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin9 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin9\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatin9 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin9 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin9\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatin9 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin9 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-8859-15\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-15\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-8859-15\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-8859-15\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-15\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-8859-15\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-15\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-15 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-15 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-15\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-15 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-15 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-15\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-15 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-15 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso8859-15\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-15\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso8859-15\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso8859-15\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-15\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso8859-15\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-15\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-15 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-15 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-15\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-15 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-15 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-15\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-15 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-15 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso885915\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso885915\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso885915\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso885915\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso885915\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso885915\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso885915\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso885915 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso885915 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso885915\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso885915 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso885915 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso885915\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso885915 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso885915 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso_8859-15\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-15\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso_8859-15\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso_8859-15\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-15\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso_8859-15\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-15\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-15 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-15 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-15\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-15 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-15 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-15\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-15 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-15 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0l9\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"l9\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0l9\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vl9\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"l9\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vl9\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l9\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"l9 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l9 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l9\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"l9 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l9 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l9\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"l9 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l9 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-8859-16\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-16\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-8859-16\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-8859-16\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-16\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-8859-16\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-16\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-16 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-16 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-16\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-16 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-16 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-16\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-16 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-16 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0cskoi8r\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cskoi8r\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0cskoi8r\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcskoi8r\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cskoi8r\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcskoi8r\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cskoi8r\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cskoi8r \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cskoi8r \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cskoi8r\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cskoi8r \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cskoi8r \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cskoi8r\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cskoi8r \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cskoi8r \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0koi\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"koi\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0koi\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vkoi\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"koi\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vkoi\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" koi\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"koi \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" koi \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" koi\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"koi \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" koi \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" koi\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"koi \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" koi \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0koi8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"koi8\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0koi8\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vkoi8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"koi8\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vkoi8\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" koi8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"koi8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" koi8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" koi8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"koi8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" koi8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" koi8\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"koi8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" koi8 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0koi8-r\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"koi8-r\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0koi8-r\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vkoi8-r\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"koi8-r\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vkoi8-r\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" koi8-r\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"koi8-r \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" koi8-r \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" koi8-r\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"koi8-r \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" koi8-r \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" koi8-r\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"koi8-r \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" koi8-r \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0koi8_r\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"koi8_r\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0koi8_r\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vkoi8_r\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"koi8_r\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vkoi8_r\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" koi8_r\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"koi8_r \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" koi8_r \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" koi8_r\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"koi8_r \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" koi8_r \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" koi8_r\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"koi8_r \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" koi8_r \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0koi8-ru\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"koi8-ru\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0koi8-ru\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vkoi8-ru\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"koi8-ru\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vkoi8-ru\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" koi8-ru\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"koi8-ru \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" koi8-ru \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" koi8-ru\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"koi8-ru \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" koi8-ru \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" koi8-ru\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"koi8-ru \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" koi8-ru \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0koi8-u\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"koi8-u\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0koi8-u\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vkoi8-u\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"koi8-u\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vkoi8-u\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" koi8-u\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"koi8-u \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" koi8-u \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" koi8-u\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"koi8-u \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" koi8-u \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" koi8-u\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"koi8-u \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" koi8-u \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csmacintosh\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csmacintosh\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csmacintosh\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsmacintosh\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csmacintosh\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsmacintosh\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csmacintosh\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csmacintosh \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csmacintosh \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csmacintosh\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csmacintosh \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csmacintosh \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csmacintosh\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csmacintosh \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csmacintosh \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0mac\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"mac\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0mac\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vmac\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"mac\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vmac\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" mac\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"mac \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" mac \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" mac\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"mac \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" mac \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" mac\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"mac \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" mac \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0macintosh\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"macintosh\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0macintosh\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vmacintosh\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"macintosh\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vmacintosh\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" macintosh\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"macintosh \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" macintosh \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" macintosh\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"macintosh \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" macintosh \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" macintosh\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"macintosh \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" macintosh \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0x-mac-roman\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-mac-roman\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0x-mac-roman\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vx-mac-roman\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-mac-roman\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vx-mac-roman\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-mac-roman\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-mac-roman \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-mac-roman \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-mac-roman\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-mac-roman \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-mac-roman \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-mac-roman\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-mac-roman \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-mac-roman \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0dos-874\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"dos-874\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0dos-874\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vdos-874\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"dos-874\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vdos-874\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" dos-874\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"dos-874 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" dos-874 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" dos-874\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"dos-874 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" dos-874 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" dos-874\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"dos-874 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" dos-874 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-8859-11\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-11\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-8859-11\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-8859-11\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-11\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-8859-11\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-11\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-11 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-11 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-11\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-11 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-11 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-11\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-11 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-11 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso8859-11\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-11\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso8859-11\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso8859-11\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-11\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso8859-11\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-11\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-11 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-11 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-11\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-11 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-11 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-11\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-11 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-11 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso885911\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso885911\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso885911\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso885911\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso885911\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso885911\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso885911\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso885911 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso885911 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso885911\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso885911 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso885911 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso885911\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso885911 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso885911 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0tis-620\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"tis-620\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0tis-620\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vtis-620\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"tis-620\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vtis-620\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" tis-620\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"tis-620 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" tis-620 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" tis-620\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"tis-620 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" tis-620 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" tis-620\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"tis-620 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" tis-620 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0windows-874\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-874\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0windows-874\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vwindows-874\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-874\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vwindows-874\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-874\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-874 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-874 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-874\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-874 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-874 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-874\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-874 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-874 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0cp1250\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1250\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0cp1250\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcp1250\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1250\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcp1250\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1250\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1250 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1250 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1250\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1250 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1250 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1250\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1250 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1250 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0windows-1250\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1250\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0windows-1250\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vwindows-1250\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1250\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vwindows-1250\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1250\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1250 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1250 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1250\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1250 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1250 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1250\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1250 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1250 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0x-cp1250\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1250\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0x-cp1250\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vx-cp1250\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1250\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vx-cp1250\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1250\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1250 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1250 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1250\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1250 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1250 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1250\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1250 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1250 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0cp1251\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1251\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0cp1251\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcp1251\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1251\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcp1251\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1251\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1251 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1251 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1251\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1251 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1251 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1251\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1251 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1251 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0windows-1251\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1251\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0windows-1251\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vwindows-1251\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1251\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vwindows-1251\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1251\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1251 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1251 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1251\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1251 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1251 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1251\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1251 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1251 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0x-cp1251\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1251\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0x-cp1251\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vx-cp1251\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1251\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vx-cp1251\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1251\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1251 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1251 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1251\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1251 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1251 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1251\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1251 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1251 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0ansi_x3.4-1968\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ansi_x3.4-1968\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0ansi_x3.4-1968\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vansi_x3.4-1968\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ansi_x3.4-1968\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vansi_x3.4-1968\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ansi_x3.4-1968\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ansi_x3.4-1968 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ansi_x3.4-1968 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ansi_x3.4-1968\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ansi_x3.4-1968 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ansi_x3.4-1968 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ansi_x3.4-1968\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ansi_x3.4-1968 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ansi_x3.4-1968 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0ascii\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ascii\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0ascii\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vascii\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ascii\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vascii\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ascii\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ascii \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ascii \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ascii\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ascii \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ascii \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ascii\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ascii \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ascii \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0cp1252\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1252\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0cp1252\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcp1252\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1252\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcp1252\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1252\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1252 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1252 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1252\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1252 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1252 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1252\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1252 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1252 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0cp819\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp819\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0cp819\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcp819\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp819\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcp819\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp819\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp819 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp819 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp819\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp819 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp819 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp819\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp819 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp819 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csisolatin1\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatin1\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csisolatin1\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsisolatin1\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatin1\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsisolatin1\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin1\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatin1 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin1 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin1\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatin1 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin1 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin1\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatin1 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin1 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0ibm819\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ibm819\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0ibm819\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vibm819\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ibm819\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vibm819\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ibm819\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ibm819 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ibm819 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ibm819\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ibm819 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ibm819 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ibm819\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ibm819 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ibm819 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-8859-1\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-1\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-8859-1\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-8859-1\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-1\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-8859-1\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-1\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-1 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-1 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-1\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-1 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-1 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-1\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-1 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-1 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-ir-100\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-100\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-ir-100\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-ir-100\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-100\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-ir-100\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-100\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-100 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-100 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-100\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-100 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-100 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-100\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-100 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-100 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso8859-1\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-1\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso8859-1\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso8859-1\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-1\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso8859-1\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-1\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-1 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-1 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-1\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-1 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-1 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-1\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-1 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-1 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso88591\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88591\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso88591\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso88591\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88591\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso88591\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88591\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88591 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88591 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88591\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88591 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88591 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88591\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88591 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88591 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso_8859-1\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-1\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso_8859-1\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso_8859-1\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-1\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso_8859-1\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-1\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-1 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-1 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-1\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-1 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-1 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-1\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-1 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-1 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso_8859-1:1987\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-1:1987\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso_8859-1:1987\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso_8859-1:1987\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-1:1987\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso_8859-1:1987\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-1:1987\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-1:1987 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-1:1987 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-1:1987\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-1:1987 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-1:1987 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-1:1987\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-1:1987 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-1:1987 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0l1\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"l1\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0l1\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vl1\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"l1\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vl1\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l1\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"l1 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l1 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l1\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"l1 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l1 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l1\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"l1 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l1 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0latin1\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"latin1\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0latin1\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vlatin1\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"latin1\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vlatin1\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" latin1\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"latin1 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" latin1 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" latin1\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"latin1 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" latin1 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" latin1\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"latin1 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" latin1 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0us-ascii\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"us-ascii\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0us-ascii\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vus-ascii\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"us-ascii\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vus-ascii\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" us-ascii\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"us-ascii \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" us-ascii \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" us-ascii\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"us-ascii \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" us-ascii \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" us-ascii\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"us-ascii \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" us-ascii \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0windows-1252\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1252\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0windows-1252\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vwindows-1252\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1252\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vwindows-1252\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1252\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1252 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1252 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1252\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1252 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1252 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1252\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1252 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1252 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0x-cp1252\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1252\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0x-cp1252\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vx-cp1252\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1252\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vx-cp1252\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1252\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1252 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1252 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1252\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1252 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1252 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1252\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1252 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1252 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0cp1253\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1253\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0cp1253\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcp1253\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1253\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcp1253\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1253\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1253 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1253 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1253\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1253 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1253 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1253\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1253 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1253 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0windows-1253\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1253\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0windows-1253\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vwindows-1253\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1253\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vwindows-1253\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1253\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1253 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1253 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1253\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1253 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1253 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1253\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1253 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1253 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0x-cp1253\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1253\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0x-cp1253\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vx-cp1253\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1253\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vx-cp1253\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1253\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1253 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1253 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1253\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1253 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1253 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1253\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1253 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1253 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0cp1254\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1254\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0cp1254\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcp1254\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1254\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcp1254\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1254\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1254 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1254 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1254\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1254 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1254 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1254\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1254 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1254 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csisolatin5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatin5\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csisolatin5\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsisolatin5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatin5\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsisolatin5\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatin5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatin5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csisolatin5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csisolatin5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-8859-9\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-9\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-8859-9\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-8859-9\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-9\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-8859-9\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-9\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-9 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-9 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-9\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-9 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-9 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-9\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-8859-9 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-8859-9 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-ir-148\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-148\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-ir-148\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-ir-148\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-148\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-ir-148\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-148\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-148 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-148 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-148\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-148 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-148 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-148\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-148 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-148 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso8859-9\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-9\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso8859-9\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso8859-9\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-9\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso8859-9\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-9\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-9 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-9 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-9\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-9 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-9 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-9\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso8859-9 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso8859-9 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso88599\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88599\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso88599\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso88599\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88599\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso88599\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88599\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88599 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88599 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88599\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88599 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88599 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88599\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso88599 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso88599 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso_8859-9\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-9\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso_8859-9\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso_8859-9\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-9\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso_8859-9\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-9\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-9 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-9 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-9\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-9 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-9 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-9\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-9 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-9 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso_8859-9:1989\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-9:1989\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso_8859-9:1989\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso_8859-9:1989\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-9:1989\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso_8859-9:1989\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-9:1989\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-9:1989 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-9:1989 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-9:1989\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-9:1989 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-9:1989 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-9:1989\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso_8859-9:1989 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso_8859-9:1989 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0l5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"l5\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0l5\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vl5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"l5\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vl5\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"l5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"l5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"l5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" l5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0latin5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"latin5\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0latin5\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vlatin5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"latin5\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vlatin5\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" latin5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"latin5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" latin5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" latin5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"latin5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" latin5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" latin5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"latin5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" latin5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0windows-1254\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1254\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0windows-1254\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vwindows-1254\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1254\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vwindows-1254\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1254\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1254 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1254 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1254\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1254 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1254 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1254\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1254 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1254 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0x-cp1254\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1254\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0x-cp1254\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vx-cp1254\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1254\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vx-cp1254\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1254\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1254 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1254 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1254\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1254 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1254 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1254\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1254 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1254 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0cp1255\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1255\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0cp1255\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcp1255\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1255\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcp1255\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1255\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1255 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1255 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1255\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1255 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1255 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1255\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1255 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1255 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0windows-1255\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1255\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0windows-1255\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vwindows-1255\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1255\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vwindows-1255\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1255\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1255 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1255 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1255\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1255 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1255 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1255\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1255 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1255 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0x-cp1255\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1255\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0x-cp1255\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vx-cp1255\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1255\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vx-cp1255\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1255\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1255 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1255 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1255\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1255 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1255 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1255\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1255 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1255 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0cp1256\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1256\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0cp1256\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcp1256\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1256\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcp1256\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1256\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1256 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1256 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1256\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1256 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1256 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1256\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1256 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1256 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0windows-1256\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1256\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0windows-1256\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vwindows-1256\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1256\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vwindows-1256\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1256\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1256 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1256 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1256\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1256 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1256 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1256\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1256 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1256 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0x-cp1256\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1256\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0x-cp1256\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vx-cp1256\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1256\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vx-cp1256\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1256\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1256 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1256 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1256\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1256 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1256 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1256\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1256 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1256 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0cp1257\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1257\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0cp1257\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcp1257\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1257\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcp1257\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1257\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1257 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1257 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1257\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1257 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1257 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1257\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1257 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1257 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0windows-1257\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1257\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0windows-1257\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vwindows-1257\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1257\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vwindows-1257\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1257\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1257 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1257 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1257\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1257 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1257 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1257\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1257 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1257 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0x-cp1257\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1257\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0x-cp1257\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vx-cp1257\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1257\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vx-cp1257\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1257\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1257 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1257 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1257\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1257 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1257 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1257\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1257 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1257 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0cp1258\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1258\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0cp1258\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcp1258\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1258\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcp1258\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1258\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1258 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1258 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1258\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1258 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1258 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1258\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cp1258 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cp1258 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0windows-1258\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1258\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0windows-1258\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vwindows-1258\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1258\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vwindows-1258\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1258\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1258 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1258 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1258\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1258 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1258 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1258\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-1258 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-1258 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0x-cp1258\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1258\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0x-cp1258\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vx-cp1258\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1258\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vx-cp1258\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1258\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1258 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1258 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1258\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1258 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1258 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1258\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-cp1258 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-cp1258 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0x-mac-cyrillic\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-mac-cyrillic\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0x-mac-cyrillic\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vx-mac-cyrillic\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-mac-cyrillic\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vx-mac-cyrillic\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-mac-cyrillic\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-mac-cyrillic \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-mac-cyrillic \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-mac-cyrillic\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-mac-cyrillic \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-mac-cyrillic \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-mac-cyrillic\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-mac-cyrillic \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-mac-cyrillic \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0x-mac-ukrainian\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-mac-ukrainian\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0x-mac-ukrainian\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vx-mac-ukrainian\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-mac-ukrainian\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vx-mac-ukrainian\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-mac-ukrainian\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-mac-ukrainian \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-mac-ukrainian \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-mac-ukrainian\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-mac-ukrainian \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-mac-ukrainian \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-mac-ukrainian\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-mac-ukrainian \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-mac-ukrainian \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0chinese\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"chinese\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0chinese\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vchinese\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"chinese\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vchinese\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" chinese\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"chinese \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" chinese \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" chinese\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"chinese \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" chinese \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" chinese\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"chinese \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" chinese \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csgb2312\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csgb2312\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csgb2312\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsgb2312\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csgb2312\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsgb2312\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csgb2312\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csgb2312 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csgb2312 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csgb2312\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csgb2312 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csgb2312 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csgb2312\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csgb2312 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csgb2312 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csiso58gb231280\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csiso58gb231280\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csiso58gb231280\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsiso58gb231280\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csiso58gb231280\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsiso58gb231280\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso58gb231280\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csiso58gb231280 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso58gb231280 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso58gb231280\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csiso58gb231280 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso58gb231280 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso58gb231280\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csiso58gb231280 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso58gb231280 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0gb2312\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"gb2312\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0gb2312\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vgb2312\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"gb2312\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vgb2312\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" gb2312\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"gb2312 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" gb2312 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" gb2312\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"gb2312 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" gb2312 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" gb2312\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"gb2312 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" gb2312 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0gb_2312\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"gb_2312\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0gb_2312\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vgb_2312\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"gb_2312\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vgb_2312\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" gb_2312\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"gb_2312 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" gb_2312 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" gb_2312\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"gb_2312 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" gb_2312 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" gb_2312\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"gb_2312 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" gb_2312 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0gb_2312-80\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"gb_2312-80\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0gb_2312-80\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vgb_2312-80\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"gb_2312-80\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vgb_2312-80\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" gb_2312-80\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"gb_2312-80 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" gb_2312-80 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" gb_2312-80\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"gb_2312-80 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" gb_2312-80 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" gb_2312-80\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"gb_2312-80 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" gb_2312-80 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0gbk\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"gbk\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0gbk\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vgbk\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"gbk\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vgbk\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" gbk\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"gbk \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" gbk \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" gbk\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"gbk \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" gbk \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" gbk\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"gbk \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" gbk \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-ir-58\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-58\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-ir-58\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-ir-58\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-58\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-ir-58\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-58\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-58 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-58 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-58\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-58 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-58 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-58\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-58 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-58 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0x-gbk\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-gbk\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0x-gbk\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vx-gbk\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-gbk\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vx-gbk\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-gbk\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-gbk \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-gbk \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-gbk\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-gbk \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-gbk \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-gbk\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-gbk \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-gbk \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0gb18030\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"gb18030\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0gb18030\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vgb18030\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"gb18030\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vgb18030\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" gb18030\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"gb18030 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" gb18030 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" gb18030\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"gb18030 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" gb18030 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" gb18030\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"gb18030 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" gb18030 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0big5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"big5\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0big5\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vbig5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"big5\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vbig5\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" big5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"big5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" big5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" big5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"big5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" big5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" big5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"big5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" big5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0big5-hkscs\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"big5-hkscs\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0big5-hkscs\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vbig5-hkscs\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"big5-hkscs\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vbig5-hkscs\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" big5-hkscs\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"big5-hkscs \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" big5-hkscs \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" big5-hkscs\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"big5-hkscs \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" big5-hkscs \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" big5-hkscs\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"big5-hkscs \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" big5-hkscs \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0cn-big5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cn-big5\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0cn-big5\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcn-big5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cn-big5\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcn-big5\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cn-big5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cn-big5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cn-big5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cn-big5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cn-big5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cn-big5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cn-big5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cn-big5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cn-big5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csbig5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csbig5\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csbig5\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsbig5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csbig5\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsbig5\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csbig5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csbig5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csbig5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csbig5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csbig5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csbig5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csbig5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csbig5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csbig5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0x-x-big5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-x-big5\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0x-x-big5\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vx-x-big5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-x-big5\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vx-x-big5\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-x-big5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-x-big5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-x-big5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-x-big5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-x-big5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-x-big5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-x-big5\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-x-big5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-x-big5 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0cseucpkdfmtjapanese\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cseucpkdfmtjapanese\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0cseucpkdfmtjapanese\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcseucpkdfmtjapanese\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cseucpkdfmtjapanese\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcseucpkdfmtjapanese\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cseucpkdfmtjapanese\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cseucpkdfmtjapanese \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cseucpkdfmtjapanese \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cseucpkdfmtjapanese\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cseucpkdfmtjapanese \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cseucpkdfmtjapanese \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cseucpkdfmtjapanese\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cseucpkdfmtjapanese \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cseucpkdfmtjapanese \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0euc-jp\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"euc-jp\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0euc-jp\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\veuc-jp\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"euc-jp\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\veuc-jp\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" euc-jp\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"euc-jp \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" euc-jp \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" euc-jp\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"euc-jp \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" euc-jp \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" euc-jp\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"euc-jp \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" euc-jp \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0x-euc-jp\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-euc-jp\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0x-euc-jp\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vx-euc-jp\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-euc-jp\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vx-euc-jp\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-euc-jp\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-euc-jp \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-euc-jp \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-euc-jp\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-euc-jp \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-euc-jp \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-euc-jp\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-euc-jp \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-euc-jp \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csiso2022jp\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csiso2022jp\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csiso2022jp\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsiso2022jp\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csiso2022jp\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsiso2022jp\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso2022jp\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csiso2022jp \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso2022jp \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso2022jp\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csiso2022jp \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso2022jp \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso2022jp\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csiso2022jp \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso2022jp \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-2022-jp\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-2022-jp\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-2022-jp\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-2022-jp\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-2022-jp\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-2022-jp\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-2022-jp\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-2022-jp \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-2022-jp \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-2022-jp\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-2022-jp \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-2022-jp \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-2022-jp\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-2022-jp \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-2022-jp \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csshiftjis\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csshiftjis\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csshiftjis\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsshiftjis\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csshiftjis\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsshiftjis\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csshiftjis\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csshiftjis \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csshiftjis \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csshiftjis\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csshiftjis \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csshiftjis \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csshiftjis\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csshiftjis \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csshiftjis \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0ms932\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ms932\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0ms932\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vms932\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ms932\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vms932\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ms932\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ms932 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ms932 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ms932\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ms932 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ms932 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ms932\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ms932 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ms932 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0ms_kanji\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ms_kanji\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0ms_kanji\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vms_kanji\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ms_kanji\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vms_kanji\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ms_kanji\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ms_kanji \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ms_kanji \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ms_kanji\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ms_kanji \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ms_kanji \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ms_kanji\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ms_kanji \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ms_kanji \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0shift-jis\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"shift-jis\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0shift-jis\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vshift-jis\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"shift-jis\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vshift-jis\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" shift-jis\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"shift-jis \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" shift-jis \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" shift-jis\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"shift-jis \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" shift-jis \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" shift-jis\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"shift-jis \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" shift-jis \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0shift_jis\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"shift_jis\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0shift_jis\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vshift_jis\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"shift_jis\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vshift_jis\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" shift_jis\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"shift_jis \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" shift_jis \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" shift_jis\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"shift_jis \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" shift_jis \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" shift_jis\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"shift_jis \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" shift_jis \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0sjis\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"sjis\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0sjis\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vsjis\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"sjis\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vsjis\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" sjis\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"sjis \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" sjis \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" sjis\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"sjis \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" sjis \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" sjis\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"sjis \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" sjis \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0windows-31j\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-31j\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0windows-31j\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vwindows-31j\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-31j\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vwindows-31j\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-31j\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-31j \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-31j \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-31j\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-31j \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-31j \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-31j\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-31j \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-31j \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0x-sjis\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-sjis\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0x-sjis\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vx-sjis\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-sjis\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vx-sjis\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-sjis\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-sjis \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-sjis \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-sjis\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-sjis \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-sjis \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-sjis\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-sjis \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-sjis \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0cseuckr\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cseuckr\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0cseuckr\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcseuckr\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cseuckr\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcseuckr\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cseuckr\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cseuckr \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cseuckr \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cseuckr\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cseuckr \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cseuckr \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cseuckr\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"cseuckr \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" cseuckr \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csksc56011987\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csksc56011987\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csksc56011987\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsksc56011987\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csksc56011987\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsksc56011987\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csksc56011987\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csksc56011987 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csksc56011987 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csksc56011987\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csksc56011987 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csksc56011987 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csksc56011987\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csksc56011987 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csksc56011987 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0euc-kr\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"euc-kr\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0euc-kr\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\veuc-kr\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"euc-kr\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\veuc-kr\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" euc-kr\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"euc-kr \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" euc-kr \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" euc-kr\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"euc-kr \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" euc-kr \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" euc-kr\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"euc-kr \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" euc-kr \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-ir-149\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-149\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-ir-149\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-ir-149\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-149\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-ir-149\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-149\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-149 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-149 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-149\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-149 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-149 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-149\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-ir-149 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-ir-149 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0korean\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"korean\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0korean\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vkorean\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"korean\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vkorean\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" korean\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"korean \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" korean \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" korean\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"korean \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" korean \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" korean\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"korean \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" korean \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0ks_c_5601-1987\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ks_c_5601-1987\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0ks_c_5601-1987\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vks_c_5601-1987\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ks_c_5601-1987\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vks_c_5601-1987\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ks_c_5601-1987\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ks_c_5601-1987 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ks_c_5601-1987 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ks_c_5601-1987\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ks_c_5601-1987 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ks_c_5601-1987 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ks_c_5601-1987\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ks_c_5601-1987 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ks_c_5601-1987 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0ks_c_5601-1989\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ks_c_5601-1989\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0ks_c_5601-1989\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vks_c_5601-1989\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ks_c_5601-1989\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vks_c_5601-1989\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ks_c_5601-1989\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ks_c_5601-1989 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ks_c_5601-1989 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ks_c_5601-1989\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ks_c_5601-1989 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ks_c_5601-1989 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ks_c_5601-1989\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ks_c_5601-1989 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ks_c_5601-1989 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0ksc5601\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ksc5601\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0ksc5601\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vksc5601\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ksc5601\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vksc5601\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ksc5601\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ksc5601 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ksc5601 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ksc5601\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ksc5601 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ksc5601 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ksc5601\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ksc5601 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ksc5601 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0ksc_5601\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ksc_5601\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0ksc_5601\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vksc_5601\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ksc_5601\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vksc_5601\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ksc_5601\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ksc_5601 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ksc_5601 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ksc_5601\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ksc_5601 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ksc_5601 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ksc_5601\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ksc_5601 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ksc_5601 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0windows-949\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-949\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0windows-949\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vwindows-949\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-949\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vwindows-949\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-949\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-949 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-949 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-949\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-949 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-949 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-949\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"windows-949 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" windows-949 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csiso2022kr\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csiso2022kr\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csiso2022kr\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsiso2022kr\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csiso2022kr\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsiso2022kr\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso2022kr\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csiso2022kr \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso2022kr \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso2022kr\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csiso2022kr \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso2022kr \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso2022kr\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csiso2022kr \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csiso2022kr \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0hz-gb-2312\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"hz-gb-2312\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0hz-gb-2312\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vhz-gb-2312\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"hz-gb-2312\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vhz-gb-2312\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" hz-gb-2312\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"hz-gb-2312 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" hz-gb-2312 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" hz-gb-2312\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"hz-gb-2312 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" hz-gb-2312 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" hz-gb-2312\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"hz-gb-2312 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" hz-gb-2312 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-2022-cn\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-2022-cn\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-2022-cn\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-2022-cn\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-2022-cn\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-2022-cn\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-2022-cn\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-2022-cn \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-2022-cn \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-2022-cn\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-2022-cn \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-2022-cn \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-2022-cn\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-2022-cn \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-2022-cn \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-2022-cn-ext\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-2022-cn-ext\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-2022-cn-ext\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-2022-cn-ext\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-2022-cn-ext\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-2022-cn-ext\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-2022-cn-ext\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-2022-cn-ext \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-2022-cn-ext \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-2022-cn-ext\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-2022-cn-ext \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-2022-cn-ext \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-2022-cn-ext\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-2022-cn-ext \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-2022-cn-ext \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-2022-kr\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-2022-kr\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-2022-kr\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-2022-kr\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-2022-kr\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-2022-kr\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-2022-kr\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-2022-kr \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-2022-kr \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-2022-kr\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-2022-kr \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-2022-kr \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-2022-kr\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-2022-kr \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-2022-kr \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0replacement\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"replacement\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0replacement\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vreplacement\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"replacement\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vreplacement\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" replacement\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"replacement \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" replacement \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" replacement\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"replacement \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" replacement \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" replacement\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"replacement \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" replacement \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0unicodefffe\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"unicodefffe\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0unicodefffe\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vunicodefffe\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"unicodefffe\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vunicodefffe\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" unicodefffe\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"unicodefffe \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" unicodefffe \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" unicodefffe\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"unicodefffe \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" unicodefffe \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" unicodefffe\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"unicodefffe \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" unicodefffe \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0utf-16be\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"utf-16be\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0utf-16be\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vutf-16be\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"utf-16be\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vutf-16be\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" utf-16be\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"utf-16be \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" utf-16be \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" utf-16be\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"utf-16be \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" utf-16be \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" utf-16be\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"utf-16be \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" utf-16be \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csunicode\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csunicode\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0csunicode\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsunicode\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csunicode\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vcsunicode\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csunicode\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csunicode \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csunicode \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csunicode\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csunicode \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csunicode \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csunicode\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"csunicode \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" csunicode \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-10646-ucs-2\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-10646-ucs-2\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0iso-10646-ucs-2\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-10646-ucs-2\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-10646-ucs-2\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\viso-10646-ucs-2\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-10646-ucs-2\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-10646-ucs-2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-10646-ucs-2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-10646-ucs-2\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-10646-ucs-2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-10646-ucs-2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-10646-ucs-2\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"iso-10646-ucs-2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" iso-10646-ucs-2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0ucs-2\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ucs-2\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0ucs-2\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vucs-2\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ucs-2\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vucs-2\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ucs-2\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ucs-2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ucs-2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ucs-2\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ucs-2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ucs-2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ucs-2\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"ucs-2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" ucs-2 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0unicode\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"unicode\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0unicode\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vunicode\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"unicode\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vunicode\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" unicode\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"unicode \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" unicode \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" unicode\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"unicode \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" unicode \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" unicode\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"unicode \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" unicode \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0unicodefeff\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"unicodefeff\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0unicodefeff\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vunicodefeff\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"unicodefeff\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vunicodefeff\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" unicodefeff\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"unicodefeff \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" unicodefeff \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" unicodefeff\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"unicodefeff \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" unicodefeff \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" unicodefeff\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"unicodefeff \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" unicodefeff \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0utf-16\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"utf-16\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0utf-16\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vutf-16\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"utf-16\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vutf-16\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" utf-16\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"utf-16 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" utf-16 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" utf-16\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"utf-16 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" utf-16 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" utf-16\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"utf-16 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" utf-16 \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0utf-16le\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"utf-16le\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0utf-16le\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vutf-16le\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"utf-16le\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vutf-16le\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" utf-16le\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"utf-16le \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" utf-16le \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" utf-16le\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"utf-16le \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" utf-16le \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" utf-16le\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"utf-16le \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" utf-16le \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0x-user-defined\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-user-defined\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\0x-user-defined\\\\0\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vx-user-defined\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-user-defined\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"\\\\vx-user-defined\\\\v\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-user-defined\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-user-defined \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-user-defined \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-user-defined\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-user-defined \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-user-defined \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-user-defined\\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\"x-user-defined \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid label \\\" x-user-defined \\\" should be rejected by TextDecoder.\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/encoding/api-replacement-encodings.any.js.json",
    "content": "{\n  \"Label for \\\"replacement\\\" should be rejected by API: csiso2022kr\": {\n    \"status\": \"PASS\"\n  },\n  \"Label for \\\"replacement\\\" should be rejected by API: hz-gb-2312\": {\n    \"status\": \"PASS\"\n  },\n  \"Label for \\\"replacement\\\" should be rejected by API: iso-2022-cn\": {\n    \"status\": \"PASS\"\n  },\n  \"Label for \\\"replacement\\\" should be rejected by API: iso-2022-cn-ext\": {\n    \"status\": \"PASS\"\n  },\n  \"Label for \\\"replacement\\\" should be rejected by API: iso-2022-kr\": {\n    \"status\": \"PASS\"\n  },\n  \"Label for \\\"replacement\\\" should be rejected by API: replacement\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/encoding/api-surrogates-utf8.any.js.json",
    "content": "{\n  \"Invalid surrogates encoded into UTF-8: Sanity check\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid surrogates encoded into UTF-8: Surrogate half (low)\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid surrogates encoded into UTF-8: Surrogate half (high)\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid surrogates encoded into UTF-8: Surrogate half (low), in a string\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid surrogates encoded into UTF-8: Surrogate half (high), in a string\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid surrogates encoded into UTF-8: Wrong order\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/encoding/encodeInto.any.js.json",
    "content": "{\n  \"encodeInto() into ArrayBuffer with Hi and destination length 0, offset 0, filler 0\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with Hi and destination length 0, offset 0, filler 0\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with Hi and destination length 0, offset 4, filler 0\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with Hi and destination length 0, offset 4, filler 0\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with Hi and destination length 0, offset 0, filler 128\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with Hi and destination length 0, offset 0, filler 128\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with Hi and destination length 0, offset 4, filler 128\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with Hi and destination length 0, offset 4, filler 128\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with Hi and destination length 0, offset 0, filler random\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with Hi and destination length 0, offset 0, filler random\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with Hi and destination length 0, offset 4, filler random\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with Hi and destination length 0, offset 4, filler random\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with A and destination length 10, offset 0, filler 0\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with A and destination length 10, offset 0, filler 0\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with A and destination length 10, offset 4, filler 0\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with A and destination length 10, offset 4, filler 0\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with A and destination length 10, offset 0, filler 128\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with A and destination length 10, offset 0, filler 128\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with A and destination length 10, offset 4, filler 128\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with A and destination length 10, offset 4, filler 128\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with A and destination length 10, offset 0, filler random\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with A and destination length 10, offset 0, filler random\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with A and destination length 10, offset 4, filler random\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with A and destination length 10, offset 4, filler random\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with 𝌆 and destination length 4, offset 0, filler 0\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with 𝌆 and destination length 4, offset 0, filler 0\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with 𝌆 and destination length 4, offset 4, filler 0\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with 𝌆 and destination length 4, offset 4, filler 0\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with 𝌆 and destination length 4, offset 0, filler 128\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with 𝌆 and destination length 4, offset 0, filler 128\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with 𝌆 and destination length 4, offset 4, filler 128\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with 𝌆 and destination length 4, offset 4, filler 128\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with 𝌆 and destination length 4, offset 0, filler random\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with 𝌆 and destination length 4, offset 0, filler random\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with 𝌆 and destination length 4, offset 4, filler random\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with 𝌆 and destination length 4, offset 4, filler random\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with 𝌆A and destination length 3, offset 0, filler 0\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with 𝌆A and destination length 3, offset 0, filler 0\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with 𝌆A and destination length 3, offset 4, filler 0\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with 𝌆A and destination length 3, offset 4, filler 0\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with 𝌆A and destination length 3, offset 0, filler 128\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with 𝌆A and destination length 3, offset 0, filler 128\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with 𝌆A and destination length 3, offset 4, filler 128\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with 𝌆A and destination length 3, offset 4, filler 128\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with 𝌆A and destination length 3, offset 0, filler random\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with 𝌆A and destination length 3, offset 0, filler random\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with 𝌆A and destination length 3, offset 4, filler random\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with 𝌆A and destination length 3, offset 4, filler random\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with U+d834AU+df06A¥Hi and destination length 10, offset 0, filler 0\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with U+d834AU+df06A¥Hi and destination length 10, offset 0, filler 0\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with U+d834AU+df06A¥Hi and destination length 10, offset 4, filler 0\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with U+d834AU+df06A¥Hi and destination length 10, offset 4, filler 0\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with U+d834AU+df06A¥Hi and destination length 10, offset 0, filler 128\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with U+d834AU+df06A¥Hi and destination length 10, offset 0, filler 128\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with U+d834AU+df06A¥Hi and destination length 10, offset 4, filler 128\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with U+d834AU+df06A¥Hi and destination length 10, offset 4, filler 128\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with U+d834AU+df06A¥Hi and destination length 10, offset 0, filler random\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with U+d834AU+df06A¥Hi and destination length 10, offset 0, filler random\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with U+d834AU+df06A¥Hi and destination length 10, offset 4, filler random\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with U+d834AU+df06A¥Hi and destination length 10, offset 4, filler random\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with AU+df06 and destination length 4, offset 0, filler 0\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with AU+df06 and destination length 4, offset 0, filler 0\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with AU+df06 and destination length 4, offset 4, filler 0\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with AU+df06 and destination length 4, offset 4, filler 0\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with AU+df06 and destination length 4, offset 0, filler 128\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with AU+df06 and destination length 4, offset 0, filler 128\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with AU+df06 and destination length 4, offset 4, filler 128\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with AU+df06 and destination length 4, offset 4, filler 128\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with AU+df06 and destination length 4, offset 0, filler random\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with AU+df06 and destination length 4, offset 0, filler random\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with AU+df06 and destination length 4, offset 4, filler random\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with AU+df06 and destination length 4, offset 4, filler random\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with ¥¥ and destination length 4, offset 0, filler 0\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with ¥¥ and destination length 4, offset 0, filler 0\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with ¥¥ and destination length 4, offset 4, filler 0\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with ¥¥ and destination length 4, offset 4, filler 0\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with ¥¥ and destination length 4, offset 0, filler 128\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with ¥¥ and destination length 4, offset 0, filler 128\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with ¥¥ and destination length 4, offset 4, filler 128\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with ¥¥ and destination length 4, offset 4, filler 128\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with ¥¥ and destination length 4, offset 0, filler random\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with ¥¥ and destination length 4, offset 0, filler random\": {\n    \"status\": \"FAIL\"\n  },\n  \"encodeInto() into ArrayBuffer with ¥¥ and destination length 4, offset 4, filler random\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() into SharedArrayBuffer with ¥¥ and destination length 4, offset 4, filler random\": {\n    \"status\": \"FAIL\"\n  },\n  \"Invalid encodeInto() destination: DataView, backed by: ArrayBuffer\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid encodeInto() destination: DataView, backed by: SharedArrayBuffer\": {\n    \"status\": \"FAIL\"\n  },\n  \"Invalid encodeInto() destination: Int8Array, backed by: ArrayBuffer\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid encodeInto() destination: Int8Array, backed by: SharedArrayBuffer\": {\n    \"status\": \"FAIL\"\n  },\n  \"Invalid encodeInto() destination: Int16Array, backed by: ArrayBuffer\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid encodeInto() destination: Int16Array, backed by: SharedArrayBuffer\": {\n    \"status\": \"FAIL\"\n  },\n  \"Invalid encodeInto() destination: Int32Array, backed by: ArrayBuffer\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid encodeInto() destination: Int32Array, backed by: SharedArrayBuffer\": {\n    \"status\": \"FAIL\"\n  },\n  \"Invalid encodeInto() destination: Uint16Array, backed by: ArrayBuffer\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid encodeInto() destination: Uint16Array, backed by: SharedArrayBuffer\": {\n    \"status\": \"FAIL\"\n  },\n  \"Invalid encodeInto() destination: Uint32Array, backed by: ArrayBuffer\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid encodeInto() destination: Uint32Array, backed by: SharedArrayBuffer\": {\n    \"status\": \"FAIL\"\n  },\n  \"Invalid encodeInto() destination: Uint8ClampedArray, backed by: ArrayBuffer\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid encodeInto() destination: Uint8ClampedArray, backed by: SharedArrayBuffer\": {\n    \"status\": \"FAIL\"\n  },\n  \"Invalid encodeInto() destination: BigInt64Array, backed by: ArrayBuffer\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid encodeInto() destination: BigInt64Array, backed by: SharedArrayBuffer\": {\n    \"status\": \"FAIL\"\n  },\n  \"Invalid encodeInto() destination: BigUint64Array, backed by: ArrayBuffer\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid encodeInto() destination: BigUint64Array, backed by: SharedArrayBuffer\": {\n    \"status\": \"FAIL\"\n  },\n  \"Invalid encodeInto() destination: Float16Array, backed by: ArrayBuffer\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid encodeInto() destination: Float16Array, backed by: SharedArrayBuffer\": {\n    \"status\": \"FAIL\"\n  },\n  \"Invalid encodeInto() destination: Float32Array, backed by: ArrayBuffer\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid encodeInto() destination: Float32Array, backed by: SharedArrayBuffer\": {\n    \"status\": \"FAIL\"\n  },\n  \"Invalid encodeInto() destination: Float64Array, backed by: ArrayBuffer\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid encodeInto() destination: Float64Array, backed by: SharedArrayBuffer\": {\n    \"status\": \"FAIL\"\n  },\n  \"Invalid encodeInto() destination: ArrayBuffer\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid encodeInto() destination: SharedArrayBuffer\": {\n    \"status\": \"PASS\"\n  },\n  \"encodeInto() and a detached output buffer\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/encoding/idlharness.any.js.json",
    "content": "{\n  \"idl_test setup\": {\n    \"status\": \"PASS\"\n  },\n  \"idl_test validation\": {\n    \"status\": \"PASS\"\n  },\n  \"TextDecoder includes TextDecoderCommon: member names are unique\": {\n    \"status\": \"PASS\"\n  },\n  \"TextEncoder includes TextEncoderCommon: member names are unique\": {\n    \"status\": \"PASS\"\n  },\n  \"TextDecoderStream includes TextDecoderCommon: member names are unique\": {\n    \"status\": \"PASS\"\n  },\n  \"TextDecoderStream includes GenericTransformStream: member names are unique\": {\n    \"status\": \"PASS\"\n  },\n  \"TextEncoderStream includes TextEncoderCommon: member names are unique\": {\n    \"status\": \"PASS\"\n  },\n  \"TextEncoderStream includes GenericTransformStream: member names are unique\": {\n    \"status\": \"PASS\"\n  },\n  \"TextDecoder interface: existence and properties of interface object\": {\n    \"status\": \"PASS\"\n  },\n  \"TextDecoder interface object length\": {\n    \"status\": \"PASS\"\n  },\n  \"TextDecoder interface object name\": {\n    \"status\": \"PASS\"\n  },\n  \"TextDecoder interface: existence and properties of interface prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"TextDecoder interface: existence and properties of interface prototype object's \\\"constructor\\\" property\": {\n    \"status\": \"PASS\"\n  },\n  \"TextDecoder interface: existence and properties of interface prototype object's @@unscopables property\": {\n    \"status\": \"PASS\"\n  },\n  \"TextDecoder interface: operation decode(optional AllowSharedBufferSource, optional TextDecodeOptions)\": {\n    \"status\": \"PASS\"\n  },\n  \"TextDecoder interface: attribute encoding\": {\n    \"status\": \"PASS\"\n  },\n  \"TextDecoder interface: attribute fatal\": {\n    \"status\": \"PASS\"\n  },\n  \"TextDecoder interface: attribute ignoreBOM\": {\n    \"status\": \"PASS\"\n  },\n  \"TextDecoder must be primary interface of new TextDecoder()\": {\n    \"status\": \"PASS\"\n  },\n  \"Stringification of new TextDecoder()\": {\n    \"status\": \"PASS\"\n  },\n  \"TextDecoder interface: new TextDecoder() must inherit property \\\"decode(optional AllowSharedBufferSource, optional TextDecodeOptions)\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"TextDecoder interface: calling decode(optional AllowSharedBufferSource, optional TextDecodeOptions) on new TextDecoder() with too few arguments must throw TypeError\": {\n    \"status\": \"PASS\"\n  },\n  \"TextDecoder interface: new TextDecoder() must inherit property \\\"encoding\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"TextDecoder interface: new TextDecoder() must inherit property \\\"fatal\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"TextDecoder interface: new TextDecoder() must inherit property \\\"ignoreBOM\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"TextEncoder interface: existence and properties of interface object\": {\n    \"status\": \"PASS\"\n  },\n  \"TextEncoder interface object length\": {\n    \"status\": \"PASS\"\n  },\n  \"TextEncoder interface object name\": {\n    \"status\": \"PASS\"\n  },\n  \"TextEncoder interface: existence and properties of interface prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"TextEncoder interface: existence and properties of interface prototype object's \\\"constructor\\\" property\": {\n    \"status\": \"PASS\"\n  },\n  \"TextEncoder interface: existence and properties of interface prototype object's @@unscopables property\": {\n    \"status\": \"PASS\"\n  },\n  \"TextEncoder interface: operation encode(optional USVString)\": {\n    \"status\": \"PASS\"\n  },\n  \"TextEncoder interface: operation encodeInto(USVString, Uint8Array)\": {\n    \"status\": \"PASS\"\n  },\n  \"TextEncoder interface: attribute encoding\": {\n    \"status\": \"PASS\"\n  },\n  \"TextEncoder must be primary interface of new TextEncoder()\": {\n    \"status\": \"PASS\"\n  },\n  \"Stringification of new TextEncoder()\": {\n    \"status\": \"PASS\"\n  },\n  \"TextEncoder interface: new TextEncoder() must inherit property \\\"encode(optional USVString)\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"TextEncoder interface: calling encode(optional USVString) on new TextEncoder() with too few arguments must throw TypeError\": {\n    \"status\": \"PASS\"\n  },\n  \"TextEncoder interface: new TextEncoder() must inherit property \\\"encodeInto(USVString, Uint8Array)\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"TextEncoder interface: calling encodeInto(USVString, Uint8Array) on new TextEncoder() with too few arguments must throw TypeError\": {\n    \"status\": \"PASS\"\n  },\n  \"TextEncoder interface: new TextEncoder() must inherit property \\\"encoding\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"TextDecoderStream interface: existence and properties of interface object\": {\n    \"status\": \"FAIL\"\n  },\n  \"TextDecoderStream interface object length\": {\n    \"status\": \"FAIL\"\n  },\n  \"TextDecoderStream interface object name\": {\n    \"status\": \"FAIL\"\n  },\n  \"TextDecoderStream interface: existence and properties of interface prototype object\": {\n    \"status\": \"FAIL\"\n  },\n  \"TextDecoderStream interface: existence and properties of interface prototype object's \\\"constructor\\\" property\": {\n    \"status\": \"FAIL\"\n  },\n  \"TextDecoderStream interface: existence and properties of interface prototype object's @@unscopables property\": {\n    \"status\": \"FAIL\"\n  },\n  \"TextDecoderStream interface: attribute encoding\": {\n    \"status\": \"FAIL\"\n  },\n  \"TextDecoderStream interface: attribute fatal\": {\n    \"status\": \"FAIL\"\n  },\n  \"TextDecoderStream interface: attribute ignoreBOM\": {\n    \"status\": \"FAIL\"\n  },\n  \"TextEncoderStream interface: existence and properties of interface object\": {\n    \"status\": \"FAIL\"\n  },\n  \"TextEncoderStream interface object length\": {\n    \"status\": \"FAIL\"\n  },\n  \"TextEncoderStream interface object name\": {\n    \"status\": \"FAIL\"\n  },\n  \"TextEncoderStream interface: existence and properties of interface prototype object\": {\n    \"status\": \"FAIL\"\n  },\n  \"TextEncoderStream interface: existence and properties of interface prototype object's \\\"constructor\\\" property\": {\n    \"status\": \"FAIL\"\n  },\n  \"TextEncoderStream interface: existence and properties of interface prototype object's @@unscopables property\": {\n    \"status\": \"FAIL\"\n  },\n  \"TextEncoderStream interface: attribute encoding\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/encoding/iso-2022-jp-decoder.any.js.json",
    "content": "{\n  \"iso-2022-jp decoder: Error ESC\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-2022-jp decoder: Error ESC, character\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-2022-jp decoder: ASCII ESC, character\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-2022-jp decoder: Double ASCII ESC, character\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-2022-jp decoder: character, ASCII ESC, character\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-2022-jp decoder: characters\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-2022-jp decoder: SO / SI\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-2022-jp decoder: Roman ESC, characters\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-2022-jp decoder: Roman ESC, SO / SI\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-2022-jp decoder: Roman ESC, error ESC, Katakana ESC\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-2022-jp decoder: Katakana ESC, character\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-2022-jp decoder: Katakana ESC, multibyte ESC, character\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-2022-jp decoder: Katakana ESC, error ESC, character\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-2022-jp decoder: Katakana ESC, error ESC #2, character\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-2022-jp decoder: Katakana ESC, character, Katakana ESC, character\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-2022-jp decoder: Katakana ESC, SO / SI\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-2022-jp decoder: Multibyte ESC, character\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-2022-jp decoder: Multibyte ESC #2, character\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-2022-jp decoder: Multibyte ESC, error ESC, character\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-2022-jp decoder: Double multibyte ESC\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-2022-jp decoder: Double multibyte ESC, character\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-2022-jp decoder: Double multibyte ESC #2, character\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-2022-jp decoder: Multibyte ESC, error ESC #2, character\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-2022-jp decoder: Multibyte ESC, single byte, multibyte ESC, character\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-2022-jp decoder: Multibyte ESC, lead error byte\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-2022-jp decoder: Multibyte ESC, trail error byte\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-2022-jp decoder: character, error ESC\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-2022-jp decoder: character, error ESC #2\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-2022-jp decoder: character, error ESC #3\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-2022-jp decoder: character, ASCII ESC\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-2022-jp decoder: character, Roman ESC\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-2022-jp decoder: character, Katakana ESC\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-2022-jp decoder: character, Multibyte ESC\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-2022-jp decoder: character, Multibyte ESC #2\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/encoding/replacement-encodings.any.js.json",
    "content": "{\n  \"csiso2022kr - non-empty input decodes to one replacement character.\": {\n    \"status\": \"FAIL\"\n  },\n  \"csiso2022kr - empty input decodes to empty output.\": {\n    \"status\": \"FAIL\"\n  },\n  \"hz-gb-2312 - non-empty input decodes to one replacement character.\": {\n    \"status\": \"FAIL\"\n  },\n  \"hz-gb-2312 - empty input decodes to empty output.\": {\n    \"status\": \"FAIL\"\n  },\n  \"iso-2022-cn - non-empty input decodes to one replacement character.\": {\n    \"status\": \"FAIL\"\n  },\n  \"iso-2022-cn - empty input decodes to empty output.\": {\n    \"status\": \"FAIL\"\n  },\n  \"iso-2022-cn-ext - non-empty input decodes to one replacement character.\": {\n    \"status\": \"FAIL\"\n  },\n  \"iso-2022-cn-ext - empty input decodes to empty output.\": {\n    \"status\": \"FAIL\"\n  },\n  \"iso-2022-kr - non-empty input decodes to one replacement character.\": {\n    \"status\": \"FAIL\"\n  },\n  \"iso-2022-kr - empty input decodes to empty output.\": {\n    \"status\": \"FAIL\"\n  },\n  \"replacement - non-empty input decodes to one replacement character.\": {\n    \"status\": \"FAIL\"\n  },\n  \"replacement - empty input decodes to empty output.\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/encoding/textdecoder-arguments.any.js.json",
    "content": "{\n  \"TextDecoder decode() with explicit undefined\": {\n    \"status\": \"PASS\"\n  },\n  \"TextDecoder decode() with undefined and undefined\": {\n    \"status\": \"PASS\"\n  },\n  \"TextDecoder decode() with undefined and options\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/encoding/textdecoder-byte-order-marks.any.js.json",
    "content": "{\n  \"Byte-order marks: utf-8\": {\n    \"status\": \"PASS\"\n  },\n  \"Byte-order marks: utf-16le\": {\n    \"status\": \"PASS\"\n  },\n  \"Byte-order marks: utf-16be\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/encoding/textdecoder-copy.any.js.json",
    "content": "{\n  \"Modify buffer after passing it in (ArrayBuffer)\": {\n    \"status\": \"PASS\"\n  },\n  \"Modify buffer after passing it in (SharedArrayBuffer)\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/encoding/textdecoder-eof.any.js.json",
    "content": "{\n  \"TextDecoder end-of-queue handling\": {\n    \"status\": \"PASS\"\n  },\n  \"TextDecoder end-of-queue handling using stream: true\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/encoding/textdecoder-fatal-single-byte.any.js.json",
    "content": "{\n  \"Not throw: IBM866 has a pointer 0\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 1\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 2\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 3\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 4\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 5\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 6\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 7\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 8\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 9\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 10\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 11\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 12\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 13\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 14\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 15\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 16\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 17\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 18\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 19\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 20\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 21\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 22\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 23\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 24\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 25\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 26\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 27\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 28\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 29\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 30\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 31\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 32\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 33\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 34\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 35\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 36\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 37\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 38\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 39\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 40\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 41\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 42\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 43\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 44\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 45\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 46\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 47\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 48\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 49\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 50\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 51\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 52\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 53\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 54\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 55\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 56\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 57\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 58\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 59\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 60\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 61\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 62\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 63\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 64\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 65\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 66\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 67\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 68\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 69\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 70\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 71\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 72\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 73\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 74\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 75\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 76\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 77\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 78\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 79\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 80\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 81\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 82\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 83\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 84\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 85\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 86\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 87\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 88\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 89\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 90\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 91\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 92\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 93\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 94\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 95\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 96\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 97\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 98\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 99\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 100\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 101\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 102\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 103\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 104\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 105\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 106\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 107\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 108\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 109\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 110\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 111\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 112\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 113\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 114\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 115\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 116\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 117\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 118\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 119\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 120\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 121\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 122\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 123\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 124\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 125\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 126\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 127\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 128\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 129\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 130\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 131\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 132\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 133\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 134\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 135\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 136\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 137\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 138\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 139\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 140\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 141\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 142\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 143\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 144\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 145\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 146\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 147\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 148\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 149\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 150\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 151\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 152\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 153\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 154\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 155\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 156\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 157\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 158\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 159\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 160\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 161\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 162\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 163\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 164\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 165\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 166\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 167\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 168\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 169\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 170\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 171\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 172\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 173\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 174\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 175\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 176\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 177\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 178\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 179\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 180\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 181\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 182\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 183\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 184\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 185\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 186\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 187\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 188\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 189\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 190\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 191\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 192\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 193\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 194\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 195\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 196\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 197\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 198\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 199\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 200\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 201\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 202\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 203\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 204\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 205\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 206\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 207\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 208\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 209\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 210\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 211\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 212\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 213\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 214\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 215\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 216\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 217\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 218\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 219\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 220\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 221\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 222\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 223\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 224\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 225\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 226\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 227\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 228\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 229\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 230\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 231\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 232\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 233\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 234\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 235\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 236\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 237\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 238\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 239\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 240\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 241\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 242\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 243\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 244\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 245\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 246\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 247\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 248\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 249\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 250\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 251\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 252\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 253\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 254\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: IBM866 has a pointer 255\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 0\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 1\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 2\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 3\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 4\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 5\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 6\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 7\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 8\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 9\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 10\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 11\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 12\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 13\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 14\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 15\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 16\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 17\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 18\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 19\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 20\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 21\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 22\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 23\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 24\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 25\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 26\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 27\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 28\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 29\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 30\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 31\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 32\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 33\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 34\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 35\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 36\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 37\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 38\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 39\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 40\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 41\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 42\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 43\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 44\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 45\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 46\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 47\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 48\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 49\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 50\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 51\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 52\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 53\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 54\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 55\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 56\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 57\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 58\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 59\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 60\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 61\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 62\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 63\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 64\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 65\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 66\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 67\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 68\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 69\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 70\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 71\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 72\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 73\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 74\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 75\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 76\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 77\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 78\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 79\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 80\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 81\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 82\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 83\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 84\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 85\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 86\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 87\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 88\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 89\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 90\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 91\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 92\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 93\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 94\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 95\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 96\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 97\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 98\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 99\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 100\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 101\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 102\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 103\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 104\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 105\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 106\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 107\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 108\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 109\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 110\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 111\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 112\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 113\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 114\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 115\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 116\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 117\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 118\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 119\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 120\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 121\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 122\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 123\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 124\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 125\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 126\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 127\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 128\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 129\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 130\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 131\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 132\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 133\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 134\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 135\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 136\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 137\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 138\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 139\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 140\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 141\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 142\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 143\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 144\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 145\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 146\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 147\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 148\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 149\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 150\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 151\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 152\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 153\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 154\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 155\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 156\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 157\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 158\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 159\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 160\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 161\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 162\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 163\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 164\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 165\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 166\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 167\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 168\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 169\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 170\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 171\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 172\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 173\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 174\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 175\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 176\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 177\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 178\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 179\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 180\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 181\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 182\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 183\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 184\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 185\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 186\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 187\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 188\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 189\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 190\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 191\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 192\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 193\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 194\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 195\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 196\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 197\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 198\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 199\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 200\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 201\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 202\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 203\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 204\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 205\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 206\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 207\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 208\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 209\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 210\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 211\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 212\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 213\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 214\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 215\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 216\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 217\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 218\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 219\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 220\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 221\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 222\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 223\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 224\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 225\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 226\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 227\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 228\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 229\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 230\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 231\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 232\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 233\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 234\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 235\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 236\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 237\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 238\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 239\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 240\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 241\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 242\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 243\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 244\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 245\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 246\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 247\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 248\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 249\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 250\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 251\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 252\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 253\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 254\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-2 has a pointer 255\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 0\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 1\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 2\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 3\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 4\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 5\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 6\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 7\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 8\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 9\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 10\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 11\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 12\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 13\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 14\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 15\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 16\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 17\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 18\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 19\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 20\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 21\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 22\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 23\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 24\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 25\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 26\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 27\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 28\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 29\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 30\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 31\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 32\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 33\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 34\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 35\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 36\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 37\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 38\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 39\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 40\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 41\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 42\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 43\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 44\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 45\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 46\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 47\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 48\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 49\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 50\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 51\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 52\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 53\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 54\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 55\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 56\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 57\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 58\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 59\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 60\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 61\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 62\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 63\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 64\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 65\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 66\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 67\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 68\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 69\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 70\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 71\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 72\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 73\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 74\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 75\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 76\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 77\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 78\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 79\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 80\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 81\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 82\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 83\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 84\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 85\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 86\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 87\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 88\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 89\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 90\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 91\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 92\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 93\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 94\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 95\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 96\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 97\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 98\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 99\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 100\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 101\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 102\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 103\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 104\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 105\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 106\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 107\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 108\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 109\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 110\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 111\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 112\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 113\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 114\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 115\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 116\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 117\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 118\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 119\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 120\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 121\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 122\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 123\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 124\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 125\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 126\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 127\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 128\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 129\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 130\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 131\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 132\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 133\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 134\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 135\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 136\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 137\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 138\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 139\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 140\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 141\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 142\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 143\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 144\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 145\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 146\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 147\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 148\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 149\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 150\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 151\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 152\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 153\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 154\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 155\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 156\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 157\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 158\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 159\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 160\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 161\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 162\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 163\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 164\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-3 doesn't have a pointer 165\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 166\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 167\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 168\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 169\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 170\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 171\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 172\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 173\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-3 doesn't have a pointer 174\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 175\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 176\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 177\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 178\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 179\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 180\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 181\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 182\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 183\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 184\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 185\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 186\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 187\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 188\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 189\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-3 doesn't have a pointer 190\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 191\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 192\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 193\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 194\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-3 doesn't have a pointer 195\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 196\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 197\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 198\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 199\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 200\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 201\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 202\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 203\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 204\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 205\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 206\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 207\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-3 doesn't have a pointer 208\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 209\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 210\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 211\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 212\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 213\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 214\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 215\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 216\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 217\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 218\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 219\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 220\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 221\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 222\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 223\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 224\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 225\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 226\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-3 doesn't have a pointer 227\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 228\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 229\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 230\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 231\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 232\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 233\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 234\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 235\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 236\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 237\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 238\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 239\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-3 doesn't have a pointer 240\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 241\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 242\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 243\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 244\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 245\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 246\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 247\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 248\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 249\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 250\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 251\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 252\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 253\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 254\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-3 has a pointer 255\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 0\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 1\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 2\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 3\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 4\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 5\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 6\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 7\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 8\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 9\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 10\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 11\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 12\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 13\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 14\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 15\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 16\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 17\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 18\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 19\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 20\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 21\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 22\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 23\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 24\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 25\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 26\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 27\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 28\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 29\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 30\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 31\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 32\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 33\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 34\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 35\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 36\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 37\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 38\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 39\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 40\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 41\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 42\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 43\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 44\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 45\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 46\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 47\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 48\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 49\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 50\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 51\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 52\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 53\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 54\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 55\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 56\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 57\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 58\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 59\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 60\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 61\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 62\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 63\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 64\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 65\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 66\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 67\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 68\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 69\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 70\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 71\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 72\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 73\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 74\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 75\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 76\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 77\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 78\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 79\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 80\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 81\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 82\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 83\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 84\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 85\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 86\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 87\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 88\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 89\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 90\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 91\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 92\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 93\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 94\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 95\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 96\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 97\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 98\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 99\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 100\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 101\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 102\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 103\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 104\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 105\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 106\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 107\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 108\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 109\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 110\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 111\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 112\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 113\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 114\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 115\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 116\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 117\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 118\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 119\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 120\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 121\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 122\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 123\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 124\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 125\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 126\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 127\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 128\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 129\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 130\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 131\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 132\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 133\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 134\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 135\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 136\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 137\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 138\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 139\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 140\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 141\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 142\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 143\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 144\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 145\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 146\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 147\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 148\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 149\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 150\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 151\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 152\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 153\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 154\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 155\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 156\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 157\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 158\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 159\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 160\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 161\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 162\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 163\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 164\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 165\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 166\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 167\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 168\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 169\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 170\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 171\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 172\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 173\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 174\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 175\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 176\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 177\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 178\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 179\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 180\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 181\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 182\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 183\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 184\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 185\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 186\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 187\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 188\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 189\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 190\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 191\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 192\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 193\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 194\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 195\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 196\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 197\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 198\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 199\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 200\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 201\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 202\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 203\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 204\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 205\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 206\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 207\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 208\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 209\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 210\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 211\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 212\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 213\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 214\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 215\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 216\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 217\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 218\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 219\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 220\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 221\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 222\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 223\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 224\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 225\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 226\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 227\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 228\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 229\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 230\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 231\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 232\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 233\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 234\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 235\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 236\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 237\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 238\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 239\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 240\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 241\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 242\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 243\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 244\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 245\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 246\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 247\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 248\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 249\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 250\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 251\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 252\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 253\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 254\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-4 has a pointer 255\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 0\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 1\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 2\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 3\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 4\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 5\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 6\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 7\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 8\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 9\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 10\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 11\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 12\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 13\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 14\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 15\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 16\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 17\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 18\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 19\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 20\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 21\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 22\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 23\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 24\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 25\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 26\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 27\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 28\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 29\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 30\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 31\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 32\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 33\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 34\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 35\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 36\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 37\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 38\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 39\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 40\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 41\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 42\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 43\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 44\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 45\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 46\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 47\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 48\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 49\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 50\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 51\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 52\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 53\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 54\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 55\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 56\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 57\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 58\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 59\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 60\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 61\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 62\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 63\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 64\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 65\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 66\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 67\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 68\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 69\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 70\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 71\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 72\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 73\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 74\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 75\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 76\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 77\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 78\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 79\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 80\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 81\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 82\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 83\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 84\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 85\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 86\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 87\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 88\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 89\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 90\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 91\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 92\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 93\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 94\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 95\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 96\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 97\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 98\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 99\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 100\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 101\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 102\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 103\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 104\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 105\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 106\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 107\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 108\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 109\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 110\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 111\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 112\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 113\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 114\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 115\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 116\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 117\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 118\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 119\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 120\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 121\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 122\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 123\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 124\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 125\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 126\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 127\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 128\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 129\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 130\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 131\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 132\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 133\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 134\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 135\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 136\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 137\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 138\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 139\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 140\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 141\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 142\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 143\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 144\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 145\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 146\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 147\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 148\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 149\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 150\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 151\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 152\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 153\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 154\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 155\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 156\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 157\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 158\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 159\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 160\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 161\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 162\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 163\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 164\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 165\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 166\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 167\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 168\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 169\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 170\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 171\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 172\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 173\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 174\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 175\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 176\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 177\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 178\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 179\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 180\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 181\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 182\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 183\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 184\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 185\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 186\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 187\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 188\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 189\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 190\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 191\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 192\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 193\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 194\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 195\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 196\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 197\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 198\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 199\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 200\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 201\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 202\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 203\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 204\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 205\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 206\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 207\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 208\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 209\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 210\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 211\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 212\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 213\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 214\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 215\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 216\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 217\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 218\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 219\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 220\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 221\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 222\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 223\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 224\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 225\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 226\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 227\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 228\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 229\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 230\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 231\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 232\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 233\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 234\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 235\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 236\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 237\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 238\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 239\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 240\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 241\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 242\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 243\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 244\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 245\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 246\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 247\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 248\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 249\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 250\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 251\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 252\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 253\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 254\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-5 has a pointer 255\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 0\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 1\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 2\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 3\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 4\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 5\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 6\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 7\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 8\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 9\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 10\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 11\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 12\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 13\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 14\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 15\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 16\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 17\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 18\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 19\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 20\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 21\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 22\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 23\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 24\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 25\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 26\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 27\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 28\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 29\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 30\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 31\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 32\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 33\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 34\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 35\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 36\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 37\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 38\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 39\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 40\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 41\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 42\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 43\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 44\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 45\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 46\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 47\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 48\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 49\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 50\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 51\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 52\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 53\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 54\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 55\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 56\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 57\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 58\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 59\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 60\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 61\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 62\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 63\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 64\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 65\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 66\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 67\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 68\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 69\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 70\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 71\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 72\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 73\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 74\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 75\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 76\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 77\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 78\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 79\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 80\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 81\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 82\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 83\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 84\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 85\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 86\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 87\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 88\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 89\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 90\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 91\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 92\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 93\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 94\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 95\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 96\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 97\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 98\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 99\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 100\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 101\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 102\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 103\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 104\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 105\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 106\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 107\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 108\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 109\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 110\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 111\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 112\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 113\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 114\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 115\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 116\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 117\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 118\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 119\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 120\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 121\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 122\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 123\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 124\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 125\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 126\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 127\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 128\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 129\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 130\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 131\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 132\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 133\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 134\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 135\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 136\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 137\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 138\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 139\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 140\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 141\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 142\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 143\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 144\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 145\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 146\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 147\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 148\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 149\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 150\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 151\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 152\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 153\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 154\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 155\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 156\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 157\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 158\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 159\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 160\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 161\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 162\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 163\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 164\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 165\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 166\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 167\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 168\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 169\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 170\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 171\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 172\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 173\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 174\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 175\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 176\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 177\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 178\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 179\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 180\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 181\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 182\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 183\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 184\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 185\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 186\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 187\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 188\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 189\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 190\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 191\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 192\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 193\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 194\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 195\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 196\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 197\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 198\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 199\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 200\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 201\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 202\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 203\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 204\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 205\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 206\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 207\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 208\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 209\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 210\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 211\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 212\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 213\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 214\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 215\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 216\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 217\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 218\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 219\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 220\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 221\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 222\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 223\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 224\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 225\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 226\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 227\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 228\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 229\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 230\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 231\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 232\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 233\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 234\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 235\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 236\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 237\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 238\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 239\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 240\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 241\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-6 has a pointer 242\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 243\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 244\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 245\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 246\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 247\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 248\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 249\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 250\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 251\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 252\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 253\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 254\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-6 doesn't have a pointer 255\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 0\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 1\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 2\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 3\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 4\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 5\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 6\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 7\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 8\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 9\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 10\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 11\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 12\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 13\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 14\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 15\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 16\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 17\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 18\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 19\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 20\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 21\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 22\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 23\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 24\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 25\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 26\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 27\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 28\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 29\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 30\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 31\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 32\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 33\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 34\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 35\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 36\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 37\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 38\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 39\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 40\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 41\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 42\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 43\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 44\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 45\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 46\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 47\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 48\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 49\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 50\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 51\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 52\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 53\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 54\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 55\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 56\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 57\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 58\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 59\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 60\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 61\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 62\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 63\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 64\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 65\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 66\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 67\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 68\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 69\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 70\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 71\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 72\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 73\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 74\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 75\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 76\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 77\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 78\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 79\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 80\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 81\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 82\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 83\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 84\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 85\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 86\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 87\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 88\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 89\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 90\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 91\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 92\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 93\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 94\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 95\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 96\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 97\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 98\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 99\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 100\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 101\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 102\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 103\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 104\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 105\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 106\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 107\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 108\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 109\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 110\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 111\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 112\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 113\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 114\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 115\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 116\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 117\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 118\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 119\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 120\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 121\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 122\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 123\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 124\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 125\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 126\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 127\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 128\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 129\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 130\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 131\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 132\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 133\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 134\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 135\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 136\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 137\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 138\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 139\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 140\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 141\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 142\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 143\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 144\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 145\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 146\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 147\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 148\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 149\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 150\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 151\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 152\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 153\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 154\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 155\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 156\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 157\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 158\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 159\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 160\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 161\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 162\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 163\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 164\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 165\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 166\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 167\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 168\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 169\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 170\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 171\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 172\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 173\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-7 doesn't have a pointer 174\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 175\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 176\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 177\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 178\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 179\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 180\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 181\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 182\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 183\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 184\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 185\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 186\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 187\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 188\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 189\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 190\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 191\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 192\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 193\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 194\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 195\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 196\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 197\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 198\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 199\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 200\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 201\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 202\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 203\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 204\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 205\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 206\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 207\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 208\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 209\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-7 doesn't have a pointer 210\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 211\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 212\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 213\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 214\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 215\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 216\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 217\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 218\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 219\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 220\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 221\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 222\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 223\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 224\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 225\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 226\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 227\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 228\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 229\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 230\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 231\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 232\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 233\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 234\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 235\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 236\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 237\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 238\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 239\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 240\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 241\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 242\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 243\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 244\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 245\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 246\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 247\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 248\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 249\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 250\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 251\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 252\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 253\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-7 has a pointer 254\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-7 doesn't have a pointer 255\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 0\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 1\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 2\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 3\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 4\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 5\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 6\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 7\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 8\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 9\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 10\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 11\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 12\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 13\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 14\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 15\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 16\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 17\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 18\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 19\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 20\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 21\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 22\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 23\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 24\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 25\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 26\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 27\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 28\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 29\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 30\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 31\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 32\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 33\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 34\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 35\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 36\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 37\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 38\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 39\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 40\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 41\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 42\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 43\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 44\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 45\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 46\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 47\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 48\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 49\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 50\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 51\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 52\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 53\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 54\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 55\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 56\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 57\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 58\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 59\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 60\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 61\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 62\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 63\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 64\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 65\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 66\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 67\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 68\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 69\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 70\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 71\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 72\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 73\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 74\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 75\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 76\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 77\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 78\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 79\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 80\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 81\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 82\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 83\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 84\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 85\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 86\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 87\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 88\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 89\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 90\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 91\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 92\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 93\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 94\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 95\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 96\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 97\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 98\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 99\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 100\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 101\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 102\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 103\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 104\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 105\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 106\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 107\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 108\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 109\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 110\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 111\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 112\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 113\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 114\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 115\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 116\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 117\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 118\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 119\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 120\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 121\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 122\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 123\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 124\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 125\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 126\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 127\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 128\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 129\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 130\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 131\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 132\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 133\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 134\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 135\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 136\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 137\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 138\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 139\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 140\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 141\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 142\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 143\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 144\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 145\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 146\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 147\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 148\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 149\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 150\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 151\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 152\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 153\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 154\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 155\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 156\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 157\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 158\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 159\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 160\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8 doesn't have a pointer 161\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 162\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 163\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 164\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 165\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 166\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 167\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 168\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 169\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 170\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 171\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 172\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 173\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 174\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 175\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 176\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 177\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 178\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 179\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 180\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 181\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 182\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 183\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 184\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 185\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 186\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 187\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 188\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 189\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 190\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8 doesn't have a pointer 191\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8 doesn't have a pointer 192\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8 doesn't have a pointer 193\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8 doesn't have a pointer 194\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8 doesn't have a pointer 195\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8 doesn't have a pointer 196\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8 doesn't have a pointer 197\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8 doesn't have a pointer 198\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8 doesn't have a pointer 199\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8 doesn't have a pointer 200\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8 doesn't have a pointer 201\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8 doesn't have a pointer 202\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8 doesn't have a pointer 203\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8 doesn't have a pointer 204\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8 doesn't have a pointer 205\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8 doesn't have a pointer 206\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8 doesn't have a pointer 207\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8 doesn't have a pointer 208\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8 doesn't have a pointer 209\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8 doesn't have a pointer 210\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8 doesn't have a pointer 211\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8 doesn't have a pointer 212\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8 doesn't have a pointer 213\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8 doesn't have a pointer 214\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8 doesn't have a pointer 215\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8 doesn't have a pointer 216\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8 doesn't have a pointer 217\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8 doesn't have a pointer 218\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8 doesn't have a pointer 219\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8 doesn't have a pointer 220\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8 doesn't have a pointer 221\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8 doesn't have a pointer 222\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 223\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 224\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 225\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 226\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 227\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 228\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 229\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 230\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 231\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 232\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 233\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 234\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 235\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 236\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 237\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 238\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 239\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 240\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 241\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 242\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 243\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 244\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 245\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 246\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 247\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 248\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 249\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 250\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8 doesn't have a pointer 251\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8 doesn't have a pointer 252\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 253\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8 has a pointer 254\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8 doesn't have a pointer 255\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 0\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 1\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 2\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 3\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 4\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 5\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 6\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 7\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 8\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 9\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 10\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 11\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 12\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 13\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 14\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 15\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 16\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 17\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 18\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 19\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 20\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 21\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 22\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 23\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 24\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 25\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 26\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 27\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 28\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 29\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 30\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 31\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 32\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 33\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 34\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 35\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 36\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 37\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 38\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 39\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 40\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 41\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 42\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 43\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 44\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 45\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 46\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 47\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 48\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 49\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 50\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 51\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 52\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 53\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 54\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 55\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 56\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 57\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 58\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 59\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 60\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 61\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 62\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 63\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 64\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 65\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 66\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 67\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 68\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 69\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 70\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 71\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 72\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 73\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 74\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 75\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 76\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 77\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 78\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 79\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 80\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 81\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 82\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 83\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 84\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 85\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 86\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 87\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 88\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 89\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 90\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 91\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 92\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 93\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 94\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 95\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 96\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 97\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 98\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 99\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 100\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 101\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 102\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 103\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 104\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 105\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 106\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 107\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 108\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 109\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 110\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 111\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 112\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 113\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 114\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 115\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 116\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 117\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 118\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 119\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 120\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 121\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 122\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 123\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 124\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 125\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 126\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 127\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 128\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 129\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 130\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 131\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 132\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 133\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 134\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 135\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 136\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 137\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 138\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 139\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 140\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 141\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 142\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 143\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 144\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 145\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 146\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 147\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 148\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 149\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 150\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 151\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 152\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 153\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 154\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 155\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 156\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 157\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 158\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 159\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 160\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8-I doesn't have a pointer 161\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 162\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 163\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 164\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 165\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 166\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 167\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 168\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 169\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 170\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 171\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 172\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 173\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 174\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 175\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 176\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 177\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 178\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 179\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 180\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 181\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 182\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 183\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 184\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 185\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 186\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 187\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 188\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 189\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 190\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8-I doesn't have a pointer 191\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8-I doesn't have a pointer 192\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8-I doesn't have a pointer 193\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8-I doesn't have a pointer 194\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8-I doesn't have a pointer 195\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8-I doesn't have a pointer 196\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8-I doesn't have a pointer 197\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8-I doesn't have a pointer 198\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8-I doesn't have a pointer 199\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8-I doesn't have a pointer 200\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8-I doesn't have a pointer 201\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8-I doesn't have a pointer 202\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8-I doesn't have a pointer 203\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8-I doesn't have a pointer 204\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8-I doesn't have a pointer 205\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8-I doesn't have a pointer 206\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8-I doesn't have a pointer 207\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8-I doesn't have a pointer 208\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8-I doesn't have a pointer 209\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8-I doesn't have a pointer 210\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8-I doesn't have a pointer 211\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8-I doesn't have a pointer 212\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8-I doesn't have a pointer 213\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8-I doesn't have a pointer 214\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8-I doesn't have a pointer 215\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8-I doesn't have a pointer 216\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8-I doesn't have a pointer 217\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8-I doesn't have a pointer 218\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8-I doesn't have a pointer 219\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8-I doesn't have a pointer 220\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8-I doesn't have a pointer 221\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8-I doesn't have a pointer 222\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 223\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 224\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 225\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 226\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 227\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 228\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 229\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 230\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 231\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 232\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 233\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 234\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 235\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 236\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 237\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 238\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 239\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 240\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 241\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 242\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 243\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 244\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 245\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 246\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 247\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 248\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 249\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 250\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8-I doesn't have a pointer 251\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8-I doesn't have a pointer 252\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 253\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-8-I has a pointer 254\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: ISO-8859-8-I doesn't have a pointer 255\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 0\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 1\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 2\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 3\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 4\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 5\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 6\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 7\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 8\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 9\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 10\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 11\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 12\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 13\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 14\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 15\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 16\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 17\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 18\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 19\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 20\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 21\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 22\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 23\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 24\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 25\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 26\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 27\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 28\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 29\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 30\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 31\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 32\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 33\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 34\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 35\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 36\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 37\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 38\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 39\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 40\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 41\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 42\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 43\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 44\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 45\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 46\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 47\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 48\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 49\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 50\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 51\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 52\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 53\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 54\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 55\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 56\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 57\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 58\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 59\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 60\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 61\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 62\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 63\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 64\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 65\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 66\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 67\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 68\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 69\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 70\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 71\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 72\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 73\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 74\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 75\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 76\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 77\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 78\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 79\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 80\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 81\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 82\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 83\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 84\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 85\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 86\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 87\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 88\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 89\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 90\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 91\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 92\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 93\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 94\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 95\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 96\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 97\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 98\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 99\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 100\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 101\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 102\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 103\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 104\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 105\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 106\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 107\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 108\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 109\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 110\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 111\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 112\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 113\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 114\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 115\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 116\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 117\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 118\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 119\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 120\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 121\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 122\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 123\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 124\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 125\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 126\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 127\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 128\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 129\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 130\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 131\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 132\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 133\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 134\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 135\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 136\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 137\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 138\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 139\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 140\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 141\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 142\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 143\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 144\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 145\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 146\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 147\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 148\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 149\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 150\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 151\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 152\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 153\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 154\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 155\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 156\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 157\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 158\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 159\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 160\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 161\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 162\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 163\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 164\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 165\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 166\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 167\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 168\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 169\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 170\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 171\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 172\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 173\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 174\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 175\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 176\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 177\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 178\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 179\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 180\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 181\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 182\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 183\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 184\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 185\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 186\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 187\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 188\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 189\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 190\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 191\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 192\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 193\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 194\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 195\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 196\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 197\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 198\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 199\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 200\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 201\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 202\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 203\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 204\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 205\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 206\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 207\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 208\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 209\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 210\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 211\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 212\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 213\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 214\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 215\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 216\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 217\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 218\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 219\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 220\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 221\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 222\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 223\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 224\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 225\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 226\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 227\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 228\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 229\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 230\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 231\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 232\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 233\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 234\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 235\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 236\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 237\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 238\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 239\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 240\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 241\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 242\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 243\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 244\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 245\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 246\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 247\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 248\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 249\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 250\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 251\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 252\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 253\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 254\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-10 has a pointer 255\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 0\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 1\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 2\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 3\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 4\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 5\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 6\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 7\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 8\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 9\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 10\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 11\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 12\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 13\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 14\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 15\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 16\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 17\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 18\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 19\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 20\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 21\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 22\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 23\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 24\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 25\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 26\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 27\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 28\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 29\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 30\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 31\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 32\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 33\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 34\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 35\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 36\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 37\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 38\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 39\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 40\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 41\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 42\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 43\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 44\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 45\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 46\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 47\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 48\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 49\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 50\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 51\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 52\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 53\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 54\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 55\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 56\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 57\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 58\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 59\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 60\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 61\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 62\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 63\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 64\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 65\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 66\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 67\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 68\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 69\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 70\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 71\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 72\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 73\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 74\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 75\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 76\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 77\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 78\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 79\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 80\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 81\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 82\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 83\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 84\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 85\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 86\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 87\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 88\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 89\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 90\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 91\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 92\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 93\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 94\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 95\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 96\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 97\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 98\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 99\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 100\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 101\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 102\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 103\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 104\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 105\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 106\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 107\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 108\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 109\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 110\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 111\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 112\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 113\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 114\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 115\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 116\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 117\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 118\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 119\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 120\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 121\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 122\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 123\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 124\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 125\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 126\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 127\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 128\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 129\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 130\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 131\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 132\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 133\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 134\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 135\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 136\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 137\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 138\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 139\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 140\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 141\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 142\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 143\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 144\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 145\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 146\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 147\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 148\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 149\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 150\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 151\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 152\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 153\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 154\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 155\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 156\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 157\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 158\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 159\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 160\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 161\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 162\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 163\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 164\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 165\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 166\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 167\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 168\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 169\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 170\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 171\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 172\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 173\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 174\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 175\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 176\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 177\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 178\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 179\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 180\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 181\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 182\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 183\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 184\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 185\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 186\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 187\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 188\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 189\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 190\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 191\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 192\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 193\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 194\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 195\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 196\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 197\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 198\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 199\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 200\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 201\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 202\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 203\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 204\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 205\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 206\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 207\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 208\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 209\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 210\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 211\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 212\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 213\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 214\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 215\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 216\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 217\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 218\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 219\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 220\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 221\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 222\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 223\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 224\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 225\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 226\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 227\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 228\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 229\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 230\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 231\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 232\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 233\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 234\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 235\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 236\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 237\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 238\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 239\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 240\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 241\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 242\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 243\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 244\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 245\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 246\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 247\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 248\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 249\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 250\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 251\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 252\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 253\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 254\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-13 has a pointer 255\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 0\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 1\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 2\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 3\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 4\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 5\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 6\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 7\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 8\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 9\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 10\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 11\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 12\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 13\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 14\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 15\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 16\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 17\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 18\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 19\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 20\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 21\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 22\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 23\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 24\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 25\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 26\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 27\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 28\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 29\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 30\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 31\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 32\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 33\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 34\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 35\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 36\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 37\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 38\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 39\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 40\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 41\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 42\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 43\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 44\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 45\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 46\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 47\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 48\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 49\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 50\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 51\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 52\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 53\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 54\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 55\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 56\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 57\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 58\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 59\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 60\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 61\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 62\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 63\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 64\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 65\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 66\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 67\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 68\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 69\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 70\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 71\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 72\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 73\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 74\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 75\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 76\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 77\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 78\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 79\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 80\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 81\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 82\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 83\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 84\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 85\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 86\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 87\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 88\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 89\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 90\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 91\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 92\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 93\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 94\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 95\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 96\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 97\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 98\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 99\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 100\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 101\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 102\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 103\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 104\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 105\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 106\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 107\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 108\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 109\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 110\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 111\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 112\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 113\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 114\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 115\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 116\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 117\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 118\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 119\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 120\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 121\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 122\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 123\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 124\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 125\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 126\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 127\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 128\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 129\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 130\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 131\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 132\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 133\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 134\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 135\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 136\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 137\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 138\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 139\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 140\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 141\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 142\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 143\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 144\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 145\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 146\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 147\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 148\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 149\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 150\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 151\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 152\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 153\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 154\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 155\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 156\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 157\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 158\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 159\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 160\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 161\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 162\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 163\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 164\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 165\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 166\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 167\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 168\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 169\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 170\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 171\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 172\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 173\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 174\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 175\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 176\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 177\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 178\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 179\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 180\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 181\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 182\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 183\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 184\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 185\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 186\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 187\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 188\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 189\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 190\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 191\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 192\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 193\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 194\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 195\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 196\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 197\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 198\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 199\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 200\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 201\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 202\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 203\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 204\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 205\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 206\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 207\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 208\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 209\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 210\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 211\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 212\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 213\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 214\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 215\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 216\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 217\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 218\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 219\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 220\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 221\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 222\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 223\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 224\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 225\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 226\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 227\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 228\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 229\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 230\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 231\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 232\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 233\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 234\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 235\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 236\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 237\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 238\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 239\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 240\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 241\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 242\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 243\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 244\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 245\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 246\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 247\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 248\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 249\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 250\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 251\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 252\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 253\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 254\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-14 has a pointer 255\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 0\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 1\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 2\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 3\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 4\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 5\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 6\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 7\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 8\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 9\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 10\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 11\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 12\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 13\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 14\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 15\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 16\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 17\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 18\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 19\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 20\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 21\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 22\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 23\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 24\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 25\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 26\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 27\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 28\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 29\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 30\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 31\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 32\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 33\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 34\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 35\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 36\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 37\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 38\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 39\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 40\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 41\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 42\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 43\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 44\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 45\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 46\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 47\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 48\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 49\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 50\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 51\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 52\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 53\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 54\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 55\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 56\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 57\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 58\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 59\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 60\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 61\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 62\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 63\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 64\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 65\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 66\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 67\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 68\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 69\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 70\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 71\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 72\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 73\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 74\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 75\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 76\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 77\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 78\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 79\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 80\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 81\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 82\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 83\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 84\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 85\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 86\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 87\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 88\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 89\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 90\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 91\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 92\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 93\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 94\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 95\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 96\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 97\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 98\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 99\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 100\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 101\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 102\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 103\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 104\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 105\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 106\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 107\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 108\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 109\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 110\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 111\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 112\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 113\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 114\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 115\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 116\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 117\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 118\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 119\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 120\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 121\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 122\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 123\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 124\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 125\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 126\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 127\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 128\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 129\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 130\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 131\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 132\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 133\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 134\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 135\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 136\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 137\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 138\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 139\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 140\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 141\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 142\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 143\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 144\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 145\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 146\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 147\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 148\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 149\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 150\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 151\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 152\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 153\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 154\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 155\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 156\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 157\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 158\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 159\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 160\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 161\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 162\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 163\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 164\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 165\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 166\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 167\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 168\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 169\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 170\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 171\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 172\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 173\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 174\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 175\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 176\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 177\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 178\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 179\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 180\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 181\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 182\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 183\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 184\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 185\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 186\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 187\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 188\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 189\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 190\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 191\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 192\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 193\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 194\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 195\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 196\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 197\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 198\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 199\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 200\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 201\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 202\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 203\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 204\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 205\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 206\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 207\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 208\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 209\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 210\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 211\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 212\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 213\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 214\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 215\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 216\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 217\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 218\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 219\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 220\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 221\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 222\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 223\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 224\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 225\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 226\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 227\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 228\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 229\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 230\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 231\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 232\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 233\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 234\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 235\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 236\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 237\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 238\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 239\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 240\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 241\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 242\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 243\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 244\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 245\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 246\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 247\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 248\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 249\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 250\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 251\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 252\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 253\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 254\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-15 has a pointer 255\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 0\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 1\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 2\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 3\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 4\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 5\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 6\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 7\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 8\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 9\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 10\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 11\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 12\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 13\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 14\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 15\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 16\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 17\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 18\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 19\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 20\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 21\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 22\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 23\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 24\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 25\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 26\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 27\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 28\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 29\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 30\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 31\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 32\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 33\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 34\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 35\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 36\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 37\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 38\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 39\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 40\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 41\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 42\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 43\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 44\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 45\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 46\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 47\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 48\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 49\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 50\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 51\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 52\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 53\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 54\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 55\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 56\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 57\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 58\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 59\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 60\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 61\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 62\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 63\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 64\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 65\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 66\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 67\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 68\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 69\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 70\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 71\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 72\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 73\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 74\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 75\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 76\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 77\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 78\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 79\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 80\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 81\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 82\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 83\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 84\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 85\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 86\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 87\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 88\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 89\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 90\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 91\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 92\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 93\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 94\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 95\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 96\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 97\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 98\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 99\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 100\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 101\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 102\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 103\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 104\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 105\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 106\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 107\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 108\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 109\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 110\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 111\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 112\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 113\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 114\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 115\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 116\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 117\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 118\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 119\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 120\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 121\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 122\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 123\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 124\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 125\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 126\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 127\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 128\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 129\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 130\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 131\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 132\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 133\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 134\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 135\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 136\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 137\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 138\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 139\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 140\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 141\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 142\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 143\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 144\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 145\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 146\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 147\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 148\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 149\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 150\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 151\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 152\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 153\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 154\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 155\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 156\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 157\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 158\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 159\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 160\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 161\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 162\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 163\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 164\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 165\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 166\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 167\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 168\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 169\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 170\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 171\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 172\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 173\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 174\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 175\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 176\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 177\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 178\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 179\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 180\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 181\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 182\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 183\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 184\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 185\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 186\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 187\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 188\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 189\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 190\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 191\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 192\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 193\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 194\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 195\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 196\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 197\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 198\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 199\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 200\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 201\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 202\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 203\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 204\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 205\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 206\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 207\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 208\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 209\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 210\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 211\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 212\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 213\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 214\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 215\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 216\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 217\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 218\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 219\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 220\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 221\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 222\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 223\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 224\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 225\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 226\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 227\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 228\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 229\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 230\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 231\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 232\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 233\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 234\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 235\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 236\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 237\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 238\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 239\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 240\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 241\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 242\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 243\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 244\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 245\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 246\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 247\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 248\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 249\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 250\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 251\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 252\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 253\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 254\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: ISO-8859-16 has a pointer 255\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 0\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 1\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 2\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 3\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 4\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 5\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 6\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 7\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 8\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 9\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 10\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 11\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 12\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 13\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 14\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 15\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 16\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 17\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 18\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 19\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 20\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 21\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 22\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 23\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 24\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 25\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 26\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 27\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 28\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 29\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 30\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 31\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 32\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 33\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 34\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 35\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 36\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 37\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 38\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 39\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 40\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 41\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 42\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 43\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 44\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 45\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 46\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 47\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 48\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 49\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 50\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 51\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 52\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 53\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 54\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 55\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 56\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 57\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 58\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 59\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 60\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 61\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 62\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 63\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 64\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 65\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 66\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 67\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 68\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 69\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 70\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 71\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 72\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 73\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 74\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 75\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 76\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 77\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 78\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 79\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 80\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 81\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 82\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 83\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 84\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 85\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 86\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 87\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 88\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 89\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 90\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 91\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 92\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 93\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 94\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 95\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 96\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 97\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 98\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 99\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 100\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 101\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 102\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 103\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 104\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 105\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 106\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 107\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 108\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 109\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 110\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 111\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 112\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 113\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 114\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 115\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 116\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 117\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 118\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 119\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 120\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 121\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 122\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 123\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 124\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 125\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 126\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 127\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 128\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 129\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 130\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 131\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 132\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 133\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 134\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 135\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 136\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 137\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 138\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 139\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 140\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 141\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 142\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 143\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 144\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 145\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 146\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 147\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 148\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 149\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 150\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 151\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 152\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 153\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 154\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 155\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 156\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 157\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 158\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 159\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 160\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 161\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 162\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 163\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 164\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 165\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 166\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 167\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 168\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 169\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 170\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 171\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 172\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 173\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 174\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 175\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 176\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 177\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 178\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 179\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 180\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 181\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 182\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 183\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 184\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 185\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 186\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 187\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 188\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 189\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 190\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 191\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 192\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 193\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 194\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 195\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 196\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 197\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 198\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 199\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 200\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 201\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 202\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 203\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 204\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 205\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 206\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 207\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 208\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 209\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 210\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 211\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 212\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 213\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 214\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 215\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 216\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 217\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 218\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 219\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 220\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 221\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 222\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 223\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 224\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 225\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 226\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 227\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 228\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 229\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 230\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 231\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 232\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 233\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 234\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 235\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 236\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 237\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 238\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 239\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 240\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 241\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 242\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 243\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 244\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 245\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 246\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 247\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 248\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 249\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 250\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 251\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 252\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 253\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 254\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-R has a pointer 255\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 0\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 1\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 2\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 3\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 4\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 5\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 6\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 7\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 8\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 9\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 10\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 11\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 12\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 13\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 14\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 15\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 16\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 17\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 18\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 19\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 20\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 21\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 22\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 23\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 24\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 25\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 26\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 27\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 28\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 29\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 30\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 31\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 32\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 33\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 34\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 35\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 36\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 37\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 38\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 39\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 40\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 41\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 42\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 43\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 44\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 45\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 46\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 47\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 48\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 49\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 50\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 51\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 52\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 53\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 54\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 55\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 56\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 57\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 58\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 59\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 60\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 61\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 62\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 63\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 64\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 65\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 66\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 67\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 68\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 69\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 70\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 71\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 72\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 73\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 74\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 75\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 76\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 77\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 78\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 79\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 80\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 81\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 82\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 83\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 84\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 85\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 86\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 87\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 88\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 89\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 90\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 91\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 92\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 93\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 94\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 95\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 96\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 97\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 98\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 99\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 100\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 101\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 102\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 103\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 104\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 105\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 106\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 107\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 108\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 109\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 110\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 111\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 112\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 113\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 114\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 115\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 116\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 117\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 118\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 119\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 120\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 121\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 122\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 123\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 124\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 125\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 126\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 127\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 128\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 129\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 130\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 131\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 132\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 133\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 134\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 135\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 136\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 137\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 138\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 139\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 140\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 141\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 142\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 143\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 144\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 145\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 146\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 147\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 148\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 149\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 150\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 151\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 152\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 153\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 154\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 155\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 156\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 157\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 158\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 159\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 160\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 161\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 162\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 163\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 164\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 165\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 166\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 167\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 168\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 169\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 170\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 171\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 172\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 173\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 174\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 175\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 176\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 177\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 178\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 179\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 180\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 181\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 182\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 183\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 184\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 185\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 186\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 187\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 188\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 189\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 190\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 191\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 192\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 193\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 194\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 195\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 196\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 197\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 198\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 199\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 200\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 201\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 202\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 203\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 204\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 205\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 206\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 207\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 208\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 209\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 210\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 211\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 212\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 213\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 214\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 215\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 216\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 217\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 218\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 219\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 220\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 221\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 222\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 223\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 224\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 225\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 226\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 227\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 228\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 229\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 230\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 231\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 232\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 233\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 234\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 235\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 236\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 237\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 238\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 239\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 240\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 241\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 242\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 243\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 244\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 245\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 246\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 247\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 248\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 249\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 250\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 251\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 252\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 253\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 254\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: KOI8-U has a pointer 255\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 0\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 1\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 2\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 3\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 4\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 5\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 6\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 7\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 8\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 9\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 10\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 11\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 12\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 13\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 14\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 15\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 16\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 17\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 18\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 19\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 20\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 21\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 22\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 23\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 24\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 25\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 26\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 27\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 28\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 29\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 30\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 31\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 32\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 33\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 34\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 35\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 36\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 37\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 38\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 39\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 40\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 41\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 42\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 43\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 44\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 45\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 46\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 47\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 48\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 49\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 50\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 51\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 52\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 53\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 54\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 55\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 56\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 57\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 58\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 59\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 60\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 61\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 62\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 63\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 64\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 65\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 66\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 67\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 68\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 69\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 70\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 71\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 72\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 73\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 74\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 75\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 76\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 77\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 78\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 79\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 80\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 81\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 82\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 83\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 84\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 85\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 86\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 87\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 88\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 89\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 90\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 91\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 92\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 93\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 94\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 95\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 96\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 97\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 98\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 99\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 100\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 101\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 102\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 103\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 104\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 105\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 106\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 107\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 108\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 109\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 110\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 111\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 112\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 113\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 114\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 115\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 116\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 117\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 118\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 119\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 120\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 121\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 122\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 123\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 124\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 125\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 126\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 127\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 128\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 129\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 130\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 131\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 132\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 133\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 134\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 135\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 136\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 137\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 138\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 139\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 140\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 141\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 142\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 143\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 144\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 145\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 146\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 147\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 148\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 149\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 150\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 151\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 152\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 153\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 154\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 155\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 156\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 157\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 158\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 159\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 160\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 161\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 162\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 163\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 164\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 165\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 166\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 167\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 168\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 169\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 170\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 171\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 172\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 173\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 174\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 175\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 176\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 177\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 178\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 179\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 180\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 181\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 182\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 183\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 184\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 185\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 186\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 187\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 188\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 189\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 190\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 191\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 192\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 193\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 194\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 195\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 196\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 197\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 198\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 199\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 200\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 201\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 202\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 203\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 204\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 205\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 206\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 207\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 208\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 209\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 210\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 211\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 212\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 213\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 214\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 215\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 216\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 217\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 218\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 219\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 220\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 221\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 222\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 223\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 224\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 225\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 226\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 227\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 228\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 229\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 230\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 231\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 232\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 233\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 234\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 235\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 236\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 237\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 238\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 239\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 240\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 241\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 242\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 243\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 244\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 245\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 246\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 247\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 248\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 249\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 250\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 251\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 252\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 253\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 254\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: macintosh has a pointer 255\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 0\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 1\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 2\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 3\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 4\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 5\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 6\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 7\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 8\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 9\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 10\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 11\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 12\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 13\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 14\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 15\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 16\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 17\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 18\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 19\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 20\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 21\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 22\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 23\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 24\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 25\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 26\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 27\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 28\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 29\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 30\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 31\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 32\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 33\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 34\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 35\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 36\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 37\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 38\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 39\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 40\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 41\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 42\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 43\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 44\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 45\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 46\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 47\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 48\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 49\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 50\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 51\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 52\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 53\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 54\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 55\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 56\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 57\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 58\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 59\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 60\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 61\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 62\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 63\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 64\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 65\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 66\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 67\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 68\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 69\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 70\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 71\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 72\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 73\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 74\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 75\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 76\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 77\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 78\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 79\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 80\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 81\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 82\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 83\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 84\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 85\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 86\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 87\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 88\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 89\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 90\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 91\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 92\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 93\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 94\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 95\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 96\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 97\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 98\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 99\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 100\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 101\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 102\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 103\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 104\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 105\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 106\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 107\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 108\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 109\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 110\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 111\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 112\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 113\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 114\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 115\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 116\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 117\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 118\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 119\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 120\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 121\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 122\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 123\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 124\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 125\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 126\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 127\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 128\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 129\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 130\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 131\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 132\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 133\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 134\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 135\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 136\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 137\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 138\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 139\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 140\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 141\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 142\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 143\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 144\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 145\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 146\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 147\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 148\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 149\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 150\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 151\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 152\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 153\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 154\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 155\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 156\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 157\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 158\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 159\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 160\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 161\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 162\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 163\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 164\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 165\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 166\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 167\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 168\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 169\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 170\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 171\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 172\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 173\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 174\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 175\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 176\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 177\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 178\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 179\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 180\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 181\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 182\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 183\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 184\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 185\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 186\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 187\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 188\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 189\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 190\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 191\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 192\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 193\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 194\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 195\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 196\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 197\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 198\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 199\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 200\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 201\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 202\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 203\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 204\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 205\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 206\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 207\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 208\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 209\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 210\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 211\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 212\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 213\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 214\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 215\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 216\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 217\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 218\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: windows-874 doesn't have a pointer 219\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: windows-874 doesn't have a pointer 220\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: windows-874 doesn't have a pointer 221\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: windows-874 doesn't have a pointer 222\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 223\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 224\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 225\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 226\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 227\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 228\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 229\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 230\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 231\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 232\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 233\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 234\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 235\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 236\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 237\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 238\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 239\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 240\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 241\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 242\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 243\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 244\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 245\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 246\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 247\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 248\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 249\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 250\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-874 has a pointer 251\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: windows-874 doesn't have a pointer 252\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: windows-874 doesn't have a pointer 253\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: windows-874 doesn't have a pointer 254\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: windows-874 doesn't have a pointer 255\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 0\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 1\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 2\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 3\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 4\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 5\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 6\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 7\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 8\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 9\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 10\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 11\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 12\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 13\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 14\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 15\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 16\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 17\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 18\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 19\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 20\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 21\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 22\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 23\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 24\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 25\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 26\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 27\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 28\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 29\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 30\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 31\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 32\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 33\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 34\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 35\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 36\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 37\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 38\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 39\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 40\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 41\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 42\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 43\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 44\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 45\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 46\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 47\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 48\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 49\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 50\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 51\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 52\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 53\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 54\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 55\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 56\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 57\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 58\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 59\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 60\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 61\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 62\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 63\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 64\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 65\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 66\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 67\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 68\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 69\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 70\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 71\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 72\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 73\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 74\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 75\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 76\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 77\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 78\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 79\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 80\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 81\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 82\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 83\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 84\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 85\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 86\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 87\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 88\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 89\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 90\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 91\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 92\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 93\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 94\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 95\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 96\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 97\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 98\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 99\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 100\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 101\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 102\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 103\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 104\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 105\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 106\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 107\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 108\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 109\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 110\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 111\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 112\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 113\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 114\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 115\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 116\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 117\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 118\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 119\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 120\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 121\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 122\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 123\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 124\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 125\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 126\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 127\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 128\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 129\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 130\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 131\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 132\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 133\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 134\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 135\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 136\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 137\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 138\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 139\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 140\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 141\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 142\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 143\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 144\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 145\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 146\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 147\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 148\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 149\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 150\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 151\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 152\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 153\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 154\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 155\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 156\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 157\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 158\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 159\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 160\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 161\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 162\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 163\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 164\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 165\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 166\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 167\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 168\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 169\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 170\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 171\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 172\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 173\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 174\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 175\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 176\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 177\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 178\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 179\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 180\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 181\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 182\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 183\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 184\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 185\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 186\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 187\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 188\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 189\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 190\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 191\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 192\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 193\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 194\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 195\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 196\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 197\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 198\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 199\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 200\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 201\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 202\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 203\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 204\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 205\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 206\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 207\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 208\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 209\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 210\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 211\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 212\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 213\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 214\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 215\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 216\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 217\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 218\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 219\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 220\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 221\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 222\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 223\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 224\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 225\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 226\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 227\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 228\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 229\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 230\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 231\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 232\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 233\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 234\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 235\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 236\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 237\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 238\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 239\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 240\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 241\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 242\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 243\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 244\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 245\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 246\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 247\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 248\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 249\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 250\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 251\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 252\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 253\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 254\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1250 has a pointer 255\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 0\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 1\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 2\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 3\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 4\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 5\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 6\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 7\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 8\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 9\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 10\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 11\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 12\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 13\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 14\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 15\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 16\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 17\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 18\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 19\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 20\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 21\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 22\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 23\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 24\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 25\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 26\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 27\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 28\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 29\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 30\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 31\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 32\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 33\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 34\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 35\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 36\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 37\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 38\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 39\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 40\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 41\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 42\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 43\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 44\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 45\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 46\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 47\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 48\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 49\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 50\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 51\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 52\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 53\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 54\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 55\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 56\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 57\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 58\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 59\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 60\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 61\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 62\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 63\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 64\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 65\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 66\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 67\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 68\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 69\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 70\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 71\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 72\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 73\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 74\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 75\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 76\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 77\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 78\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 79\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 80\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 81\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 82\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 83\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 84\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 85\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 86\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 87\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 88\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 89\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 90\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 91\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 92\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 93\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 94\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 95\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 96\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 97\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 98\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 99\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 100\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 101\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 102\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 103\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 104\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 105\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 106\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 107\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 108\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 109\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 110\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 111\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 112\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 113\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 114\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 115\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 116\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 117\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 118\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 119\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 120\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 121\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 122\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 123\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 124\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 125\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 126\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 127\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 128\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 129\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 130\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 131\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 132\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 133\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 134\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 135\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 136\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 137\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 138\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 139\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 140\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 141\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 142\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 143\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 144\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 145\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 146\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 147\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 148\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 149\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 150\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 151\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 152\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 153\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 154\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 155\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 156\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 157\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 158\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 159\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 160\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 161\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 162\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 163\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 164\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 165\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 166\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 167\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 168\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 169\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 170\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 171\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 172\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 173\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 174\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 175\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 176\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 177\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 178\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 179\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 180\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 181\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 182\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 183\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 184\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 185\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 186\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 187\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 188\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 189\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 190\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 191\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 192\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 193\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 194\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 195\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 196\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 197\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 198\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 199\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 200\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 201\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 202\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 203\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 204\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 205\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 206\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 207\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 208\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 209\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 210\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 211\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 212\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 213\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 214\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 215\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 216\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 217\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 218\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 219\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 220\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 221\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 222\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 223\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 224\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 225\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 226\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 227\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 228\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 229\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 230\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 231\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 232\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 233\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 234\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 235\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 236\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 237\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 238\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 239\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 240\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 241\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 242\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 243\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 244\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 245\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 246\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 247\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 248\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 249\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 250\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 251\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 252\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 253\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 254\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1251 has a pointer 255\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 0\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 1\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 2\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 3\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 4\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 5\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 6\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 7\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 8\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 9\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 10\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 11\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 12\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 13\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 14\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 15\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 16\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 17\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 18\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 19\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 20\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 21\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 22\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 23\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 24\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 25\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 26\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 27\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 28\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 29\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 30\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 31\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 32\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 33\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 34\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 35\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 36\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 37\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 38\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 39\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 40\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 41\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 42\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 43\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 44\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 45\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 46\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 47\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 48\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 49\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 50\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 51\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 52\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 53\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 54\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 55\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 56\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 57\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 58\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 59\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 60\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 61\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 62\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 63\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 64\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 65\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 66\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 67\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 68\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 69\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 70\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 71\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 72\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 73\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 74\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 75\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 76\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 77\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 78\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 79\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 80\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 81\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 82\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 83\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 84\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 85\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 86\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 87\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 88\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 89\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 90\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 91\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 92\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 93\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 94\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 95\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 96\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 97\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 98\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 99\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 100\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 101\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 102\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 103\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 104\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 105\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 106\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 107\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 108\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 109\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 110\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 111\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 112\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 113\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 114\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 115\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 116\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 117\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 118\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 119\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 120\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 121\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 122\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 123\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 124\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 125\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 126\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 127\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 128\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 129\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 130\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 131\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 132\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 133\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 134\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 135\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 136\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 137\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 138\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 139\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 140\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 141\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 142\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 143\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 144\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 145\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 146\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 147\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 148\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 149\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 150\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 151\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 152\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 153\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 154\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 155\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 156\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 157\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 158\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 159\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 160\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 161\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 162\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 163\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 164\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 165\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 166\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 167\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 168\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 169\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 170\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 171\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 172\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 173\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 174\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 175\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 176\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 177\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 178\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 179\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 180\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 181\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 182\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 183\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 184\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 185\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 186\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 187\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 188\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 189\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 190\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 191\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 192\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 193\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 194\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 195\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 196\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 197\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 198\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 199\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 200\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 201\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 202\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 203\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 204\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 205\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 206\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 207\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 208\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 209\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 210\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 211\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 212\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 213\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 214\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 215\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 216\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 217\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 218\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 219\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 220\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 221\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 222\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 223\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 224\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 225\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 226\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 227\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 228\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 229\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 230\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 231\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 232\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 233\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 234\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 235\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 236\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 237\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 238\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 239\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 240\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 241\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 242\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 243\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 244\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 245\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 246\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 247\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 248\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 249\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 250\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 251\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 252\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 253\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 254\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1252 has a pointer 255\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 0\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 1\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 2\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 3\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 4\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 5\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 6\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 7\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 8\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 9\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 10\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 11\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 12\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 13\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 14\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 15\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 16\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 17\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 18\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 19\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 20\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 21\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 22\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 23\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 24\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 25\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 26\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 27\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 28\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 29\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 30\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 31\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 32\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 33\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 34\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 35\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 36\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 37\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 38\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 39\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 40\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 41\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 42\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 43\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 44\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 45\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 46\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 47\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 48\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 49\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 50\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 51\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 52\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 53\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 54\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 55\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 56\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 57\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 58\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 59\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 60\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 61\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 62\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 63\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 64\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 65\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 66\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 67\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 68\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 69\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 70\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 71\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 72\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 73\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 74\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 75\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 76\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 77\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 78\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 79\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 80\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 81\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 82\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 83\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 84\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 85\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 86\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 87\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 88\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 89\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 90\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 91\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 92\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 93\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 94\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 95\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 96\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 97\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 98\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 99\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 100\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 101\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 102\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 103\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 104\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 105\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 106\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 107\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 108\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 109\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 110\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 111\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 112\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 113\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 114\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 115\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 116\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 117\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 118\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 119\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 120\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 121\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 122\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 123\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 124\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 125\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 126\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 127\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 128\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 129\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 130\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 131\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 132\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 133\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 134\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 135\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 136\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 137\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 138\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 139\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 140\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 141\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 142\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 143\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 144\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 145\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 146\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 147\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 148\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 149\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 150\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 151\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 152\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 153\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 154\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 155\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 156\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 157\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 158\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 159\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 160\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 161\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 162\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 163\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 164\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 165\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 166\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 167\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 168\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 169\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: windows-1253 doesn't have a pointer 170\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 171\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 172\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 173\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 174\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 175\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 176\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 177\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 178\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 179\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 180\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 181\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 182\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 183\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 184\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 185\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 186\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 187\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 188\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 189\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 190\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 191\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 192\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 193\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 194\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 195\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 196\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 197\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 198\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 199\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 200\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 201\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 202\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 203\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 204\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 205\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 206\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 207\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 208\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 209\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: windows-1253 doesn't have a pointer 210\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 211\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 212\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 213\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 214\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 215\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 216\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 217\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 218\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 219\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 220\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 221\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 222\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 223\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 224\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 225\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 226\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 227\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 228\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 229\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 230\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 231\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 232\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 233\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 234\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 235\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 236\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 237\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 238\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 239\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 240\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 241\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 242\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 243\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 244\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 245\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 246\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 247\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 248\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 249\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 250\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 251\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 252\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 253\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1253 has a pointer 254\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: windows-1253 doesn't have a pointer 255\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 0\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 1\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 2\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 3\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 4\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 5\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 6\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 7\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 8\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 9\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 10\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 11\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 12\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 13\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 14\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 15\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 16\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 17\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 18\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 19\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 20\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 21\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 22\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 23\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 24\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 25\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 26\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 27\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 28\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 29\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 30\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 31\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 32\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 33\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 34\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 35\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 36\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 37\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 38\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 39\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 40\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 41\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 42\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 43\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 44\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 45\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 46\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 47\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 48\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 49\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 50\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 51\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 52\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 53\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 54\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 55\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 56\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 57\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 58\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 59\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 60\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 61\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 62\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 63\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 64\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 65\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 66\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 67\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 68\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 69\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 70\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 71\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 72\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 73\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 74\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 75\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 76\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 77\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 78\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 79\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 80\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 81\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 82\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 83\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 84\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 85\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 86\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 87\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 88\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 89\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 90\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 91\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 92\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 93\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 94\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 95\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 96\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 97\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 98\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 99\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 100\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 101\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 102\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 103\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 104\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 105\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 106\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 107\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 108\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 109\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 110\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 111\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 112\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 113\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 114\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 115\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 116\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 117\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 118\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 119\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 120\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 121\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 122\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 123\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 124\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 125\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 126\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 127\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 128\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 129\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 130\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 131\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 132\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 133\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 134\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 135\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 136\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 137\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 138\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 139\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 140\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 141\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 142\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 143\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 144\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 145\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 146\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 147\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 148\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 149\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 150\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 151\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 152\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 153\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 154\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 155\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 156\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 157\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 158\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 159\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 160\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 161\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 162\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 163\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 164\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 165\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 166\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 167\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 168\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 169\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 170\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 171\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 172\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 173\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 174\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 175\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 176\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 177\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 178\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 179\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 180\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 181\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 182\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 183\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 184\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 185\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 186\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 187\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 188\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 189\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 190\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 191\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 192\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 193\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 194\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 195\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 196\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 197\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 198\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 199\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 200\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 201\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 202\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 203\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 204\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 205\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 206\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 207\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 208\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 209\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 210\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 211\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 212\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 213\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 214\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 215\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 216\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 217\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 218\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 219\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 220\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 221\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 222\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 223\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 224\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 225\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 226\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 227\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 228\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 229\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 230\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 231\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 232\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 233\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 234\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 235\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 236\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 237\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 238\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 239\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 240\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 241\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 242\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 243\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 244\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 245\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 246\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 247\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 248\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 249\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 250\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 251\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 252\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 253\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 254\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1254 has a pointer 255\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 0\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 1\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 2\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 3\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 4\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 5\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 6\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 7\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 8\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 9\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 10\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 11\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 12\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 13\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 14\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 15\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 16\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 17\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 18\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 19\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 20\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 21\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 22\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 23\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 24\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 25\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 26\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 27\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 28\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 29\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 30\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 31\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 32\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 33\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 34\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 35\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 36\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 37\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 38\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 39\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 40\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 41\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 42\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 43\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 44\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 45\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 46\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 47\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 48\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 49\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 50\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 51\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 52\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 53\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 54\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 55\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 56\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 57\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 58\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 59\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 60\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 61\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 62\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 63\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 64\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 65\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 66\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 67\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 68\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 69\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 70\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 71\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 72\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 73\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 74\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 75\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 76\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 77\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 78\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 79\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 80\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 81\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 82\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 83\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 84\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 85\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 86\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 87\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 88\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 89\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 90\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 91\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 92\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 93\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 94\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 95\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 96\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 97\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 98\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 99\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 100\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 101\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 102\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 103\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 104\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 105\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 106\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 107\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 108\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 109\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 110\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 111\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 112\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 113\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 114\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 115\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 116\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 117\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 118\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 119\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 120\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 121\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 122\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 123\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 124\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 125\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 126\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 127\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 128\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 129\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 130\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 131\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 132\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 133\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 134\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 135\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 136\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 137\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 138\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 139\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 140\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 141\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 142\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 143\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 144\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 145\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 146\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 147\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 148\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 149\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 150\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 151\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 152\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 153\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 154\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 155\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 156\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 157\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 158\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 159\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 160\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 161\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 162\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 163\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 164\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 165\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 166\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 167\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 168\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 169\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 170\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 171\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 172\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 173\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 174\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 175\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 176\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 177\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 178\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 179\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 180\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 181\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 182\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 183\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 184\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 185\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 186\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 187\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 188\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 189\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 190\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 191\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 192\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 193\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 194\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 195\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 196\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 197\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 198\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 199\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 200\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 201\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 202\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 203\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 204\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 205\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 206\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 207\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 208\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 209\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 210\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 211\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 212\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 213\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 214\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 215\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 216\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: windows-1255 doesn't have a pointer 217\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: windows-1255 doesn't have a pointer 218\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: windows-1255 doesn't have a pointer 219\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: windows-1255 doesn't have a pointer 220\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: windows-1255 doesn't have a pointer 221\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: windows-1255 doesn't have a pointer 222\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: windows-1255 doesn't have a pointer 223\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 224\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 225\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 226\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 227\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 228\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 229\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 230\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 231\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 232\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 233\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 234\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 235\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 236\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 237\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 238\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 239\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 240\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 241\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 242\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 243\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 244\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 245\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 246\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 247\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 248\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 249\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 250\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: windows-1255 doesn't have a pointer 251\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: windows-1255 doesn't have a pointer 252\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 253\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1255 has a pointer 254\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: windows-1255 doesn't have a pointer 255\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 0\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 1\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 2\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 3\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 4\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 5\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 6\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 7\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 8\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 9\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 10\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 11\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 12\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 13\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 14\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 15\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 16\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 17\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 18\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 19\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 20\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 21\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 22\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 23\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 24\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 25\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 26\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 27\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 28\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 29\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 30\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 31\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 32\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 33\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 34\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 35\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 36\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 37\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 38\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 39\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 40\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 41\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 42\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 43\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 44\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 45\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 46\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 47\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 48\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 49\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 50\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 51\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 52\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 53\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 54\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 55\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 56\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 57\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 58\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 59\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 60\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 61\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 62\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 63\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 64\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 65\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 66\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 67\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 68\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 69\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 70\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 71\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 72\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 73\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 74\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 75\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 76\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 77\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 78\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 79\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 80\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 81\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 82\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 83\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 84\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 85\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 86\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 87\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 88\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 89\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 90\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 91\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 92\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 93\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 94\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 95\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 96\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 97\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 98\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 99\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 100\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 101\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 102\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 103\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 104\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 105\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 106\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 107\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 108\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 109\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 110\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 111\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 112\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 113\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 114\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 115\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 116\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 117\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 118\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 119\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 120\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 121\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 122\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 123\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 124\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 125\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 126\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 127\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 128\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 129\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 130\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 131\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 132\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 133\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 134\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 135\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 136\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 137\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 138\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 139\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 140\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 141\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 142\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 143\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 144\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 145\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 146\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 147\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 148\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 149\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 150\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 151\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 152\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 153\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 154\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 155\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 156\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 157\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 158\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 159\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 160\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 161\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 162\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 163\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 164\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 165\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 166\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 167\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 168\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 169\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 170\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 171\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 172\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 173\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 174\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 175\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 176\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 177\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 178\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 179\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 180\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 181\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 182\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 183\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 184\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 185\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 186\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 187\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 188\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 189\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 190\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 191\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 192\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 193\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 194\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 195\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 196\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 197\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 198\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 199\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 200\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 201\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 202\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 203\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 204\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 205\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 206\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 207\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 208\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 209\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 210\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 211\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 212\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 213\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 214\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 215\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 216\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 217\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 218\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 219\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 220\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 221\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 222\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 223\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 224\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 225\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 226\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 227\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 228\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 229\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 230\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 231\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 232\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 233\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 234\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 235\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 236\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 237\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 238\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 239\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 240\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 241\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 242\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 243\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 244\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 245\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 246\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 247\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 248\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 249\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 250\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 251\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 252\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 253\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 254\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1256 has a pointer 255\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 0\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 1\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 2\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 3\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 4\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 5\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 6\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 7\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 8\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 9\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 10\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 11\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 12\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 13\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 14\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 15\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 16\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 17\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 18\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 19\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 20\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 21\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 22\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 23\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 24\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 25\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 26\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 27\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 28\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 29\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 30\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 31\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 32\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 33\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 34\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 35\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 36\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 37\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 38\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 39\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 40\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 41\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 42\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 43\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 44\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 45\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 46\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 47\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 48\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 49\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 50\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 51\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 52\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 53\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 54\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 55\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 56\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 57\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 58\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 59\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 60\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 61\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 62\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 63\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 64\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 65\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 66\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 67\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 68\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 69\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 70\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 71\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 72\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 73\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 74\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 75\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 76\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 77\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 78\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 79\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 80\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 81\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 82\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 83\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 84\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 85\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 86\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 87\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 88\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 89\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 90\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 91\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 92\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 93\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 94\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 95\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 96\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 97\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 98\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 99\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 100\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 101\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 102\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 103\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 104\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 105\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 106\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 107\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 108\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 109\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 110\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 111\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 112\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 113\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 114\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 115\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 116\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 117\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 118\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 119\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 120\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 121\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 122\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 123\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 124\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 125\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 126\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 127\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 128\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 129\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 130\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 131\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 132\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 133\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 134\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 135\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 136\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 137\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 138\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 139\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 140\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 141\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 142\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 143\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 144\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 145\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 146\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 147\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 148\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 149\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 150\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 151\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 152\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 153\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 154\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 155\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 156\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 157\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 158\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 159\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 160\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: windows-1257 doesn't have a pointer 161\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 162\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 163\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 164\": {\n    \"status\": \"PASS\"\n  },\n  \"Throw due to fatal flag: windows-1257 doesn't have a pointer 165\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 166\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 167\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 168\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 169\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 170\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 171\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 172\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 173\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 174\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 175\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 176\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 177\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 178\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 179\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 180\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 181\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 182\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 183\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 184\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 185\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 186\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 187\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 188\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 189\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 190\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 191\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 192\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 193\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 194\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 195\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 196\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 197\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 198\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 199\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 200\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 201\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 202\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 203\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 204\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 205\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 206\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 207\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 208\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 209\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 210\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 211\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 212\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 213\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 214\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 215\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 216\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 217\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 218\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 219\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 220\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 221\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 222\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 223\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 224\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 225\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 226\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 227\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 228\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 229\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 230\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 231\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 232\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 233\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 234\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 235\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 236\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 237\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 238\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 239\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 240\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 241\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 242\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 243\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 244\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 245\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 246\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 247\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 248\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 249\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 250\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 251\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 252\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 253\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 254\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1257 has a pointer 255\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 0\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 1\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 2\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 3\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 4\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 5\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 6\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 7\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 8\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 9\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 10\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 11\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 12\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 13\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 14\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 15\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 16\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 17\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 18\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 19\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 20\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 21\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 22\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 23\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 24\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 25\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 26\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 27\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 28\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 29\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 30\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 31\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 32\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 33\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 34\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 35\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 36\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 37\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 38\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 39\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 40\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 41\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 42\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 43\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 44\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 45\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 46\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 47\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 48\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 49\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 50\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 51\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 52\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 53\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 54\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 55\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 56\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 57\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 58\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 59\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 60\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 61\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 62\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 63\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 64\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 65\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 66\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 67\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 68\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 69\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 70\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 71\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 72\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 73\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 74\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 75\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 76\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 77\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 78\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 79\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 80\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 81\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 82\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 83\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 84\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 85\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 86\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 87\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 88\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 89\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 90\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 91\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 92\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 93\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 94\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 95\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 96\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 97\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 98\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 99\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 100\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 101\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 102\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 103\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 104\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 105\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 106\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 107\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 108\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 109\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 110\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 111\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 112\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 113\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 114\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 115\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 116\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 117\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 118\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 119\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 120\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 121\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 122\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 123\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 124\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 125\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 126\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 127\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 128\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 129\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 130\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 131\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 132\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 133\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 134\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 135\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 136\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 137\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 138\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 139\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 140\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 141\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 142\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 143\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 144\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 145\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 146\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 147\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 148\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 149\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 150\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 151\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 152\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 153\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 154\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 155\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 156\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 157\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 158\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 159\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 160\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 161\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 162\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 163\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 164\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 165\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 166\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 167\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 168\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 169\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 170\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 171\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 172\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 173\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 174\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 175\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 176\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 177\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 178\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 179\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 180\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 181\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 182\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 183\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 184\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 185\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 186\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 187\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 188\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 189\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 190\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 191\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 192\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 193\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 194\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 195\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 196\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 197\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 198\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 199\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 200\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 201\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 202\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 203\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 204\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 205\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 206\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 207\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 208\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 209\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 210\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 211\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 212\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 213\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 214\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 215\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 216\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 217\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 218\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 219\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 220\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 221\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 222\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 223\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 224\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 225\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 226\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 227\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 228\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 229\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 230\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 231\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 232\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 233\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 234\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 235\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 236\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 237\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 238\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 239\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 240\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 241\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 242\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 243\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 244\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 245\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 246\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 247\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 248\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 249\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 250\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 251\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 252\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 253\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 254\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: windows-1258 has a pointer 255\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 0\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 1\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 2\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 3\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 4\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 5\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 6\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 7\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 8\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 9\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 10\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 11\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 12\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 13\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 14\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 15\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 16\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 17\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 18\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 19\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 20\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 21\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 22\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 23\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 24\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 25\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 26\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 27\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 28\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 29\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 30\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 31\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 32\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 33\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 34\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 35\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 36\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 37\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 38\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 39\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 40\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 41\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 42\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 43\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 44\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 45\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 46\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 47\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 48\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 49\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 50\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 51\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 52\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 53\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 54\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 55\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 56\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 57\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 58\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 59\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 60\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 61\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 62\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 63\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 64\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 65\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 66\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 67\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 68\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 69\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 70\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 71\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 72\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 73\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 74\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 75\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 76\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 77\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 78\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 79\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 80\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 81\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 82\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 83\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 84\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 85\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 86\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 87\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 88\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 89\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 90\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 91\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 92\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 93\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 94\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 95\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 96\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 97\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 98\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 99\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 100\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 101\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 102\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 103\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 104\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 105\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 106\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 107\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 108\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 109\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 110\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 111\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 112\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 113\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 114\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 115\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 116\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 117\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 118\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 119\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 120\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 121\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 122\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 123\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 124\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 125\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 126\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 127\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 128\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 129\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 130\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 131\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 132\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 133\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 134\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 135\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 136\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 137\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 138\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 139\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 140\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 141\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 142\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 143\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 144\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 145\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 146\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 147\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 148\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 149\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 150\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 151\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 152\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 153\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 154\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 155\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 156\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 157\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 158\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 159\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 160\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 161\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 162\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 163\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 164\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 165\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 166\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 167\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 168\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 169\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 170\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 171\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 172\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 173\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 174\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 175\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 176\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 177\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 178\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 179\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 180\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 181\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 182\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 183\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 184\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 185\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 186\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 187\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 188\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 189\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 190\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 191\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 192\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 193\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 194\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 195\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 196\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 197\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 198\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 199\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 200\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 201\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 202\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 203\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 204\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 205\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 206\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 207\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 208\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 209\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 210\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 211\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 212\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 213\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 214\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 215\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 216\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 217\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 218\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 219\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 220\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 221\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 222\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 223\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 224\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 225\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 226\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 227\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 228\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 229\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 230\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 231\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 232\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 233\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 234\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 235\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 236\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 237\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 238\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 239\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 240\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 241\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 242\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 243\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 244\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 245\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 246\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 247\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 248\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 249\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 250\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 251\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 252\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 253\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 254\": {\n    \"status\": \"PASS\"\n  },\n  \"Not throw: x-mac-cyrillic has a pointer 255\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/encoding/textdecoder-fatal-streaming.any.js.json",
    "content": "{\n  \"Fatal flag, non-streaming cases\": {\n    \"status\": \"PASS\"\n  },\n  \"Fatal flag, streaming cases\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/encoding/textdecoder-fatal.any.js.json",
    "content": "{\n  \"Fatal flag: utf-8 - invalid code\": {\n    \"status\": \"PASS\"\n  },\n  \"Fatal flag: utf-8 - ends early\": {\n    \"status\": \"PASS\"\n  },\n  \"Fatal flag: utf-8 - ends early 2\": {\n    \"status\": \"PASS\"\n  },\n  \"Fatal flag: utf-8 - invalid trail\": {\n    \"status\": \"PASS\"\n  },\n  \"Fatal flag: utf-8 - invalid trail 2\": {\n    \"status\": \"PASS\"\n  },\n  \"Fatal flag: utf-8 - invalid trail 3\": {\n    \"status\": \"PASS\"\n  },\n  \"Fatal flag: utf-8 - invalid trail 4\": {\n    \"status\": \"PASS\"\n  },\n  \"Fatal flag: utf-8 - invalid trail 5\": {\n    \"status\": \"PASS\"\n  },\n  \"Fatal flag: utf-8 - invalid trail 6\": {\n    \"status\": \"PASS\"\n  },\n  \"Fatal flag: utf-8 - > 0x10FFFF\": {\n    \"status\": \"PASS\"\n  },\n  \"Fatal flag: utf-8 - obsolete lead byte\": {\n    \"status\": \"PASS\"\n  },\n  \"Fatal flag: utf-8 - overlong U+0000 - 2 bytes\": {\n    \"status\": \"PASS\"\n  },\n  \"Fatal flag: utf-8 - overlong U+0000 - 3 bytes\": {\n    \"status\": \"PASS\"\n  },\n  \"Fatal flag: utf-8 - overlong U+0000 - 4 bytes\": {\n    \"status\": \"PASS\"\n  },\n  \"Fatal flag: utf-8 - overlong U+0000 - 5 bytes\": {\n    \"status\": \"PASS\"\n  },\n  \"Fatal flag: utf-8 - overlong U+0000 - 6 bytes\": {\n    \"status\": \"PASS\"\n  },\n  \"Fatal flag: utf-8 - overlong U+007F - 2 bytes\": {\n    \"status\": \"PASS\"\n  },\n  \"Fatal flag: utf-8 - overlong U+007F - 3 bytes\": {\n    \"status\": \"PASS\"\n  },\n  \"Fatal flag: utf-8 - overlong U+007F - 4 bytes\": {\n    \"status\": \"PASS\"\n  },\n  \"Fatal flag: utf-8 - overlong U+007F - 5 bytes\": {\n    \"status\": \"PASS\"\n  },\n  \"Fatal flag: utf-8 - overlong U+007F - 6 bytes\": {\n    \"status\": \"PASS\"\n  },\n  \"Fatal flag: utf-8 - overlong U+07FF - 3 bytes\": {\n    \"status\": \"PASS\"\n  },\n  \"Fatal flag: utf-8 - overlong U+07FF - 4 bytes\": {\n    \"status\": \"PASS\"\n  },\n  \"Fatal flag: utf-8 - overlong U+07FF - 5 bytes\": {\n    \"status\": \"PASS\"\n  },\n  \"Fatal flag: utf-8 - overlong U+07FF - 6 bytes\": {\n    \"status\": \"PASS\"\n  },\n  \"Fatal flag: utf-8 - overlong U+FFFF - 4 bytes\": {\n    \"status\": \"PASS\"\n  },\n  \"Fatal flag: utf-8 - overlong U+FFFF - 5 bytes\": {\n    \"status\": \"PASS\"\n  },\n  \"Fatal flag: utf-8 - overlong U+FFFF - 6 bytes\": {\n    \"status\": \"PASS\"\n  },\n  \"Fatal flag: utf-8 - overlong U+10FFFF - 5 bytes\": {\n    \"status\": \"PASS\"\n  },\n  \"Fatal flag: utf-8 - overlong U+10FFFF - 6 bytes\": {\n    \"status\": \"PASS\"\n  },\n  \"Fatal flag: utf-8 - lead surrogate\": {\n    \"status\": \"PASS\"\n  },\n  \"Fatal flag: utf-8 - trail surrogate\": {\n    \"status\": \"PASS\"\n  },\n  \"Fatal flag: utf-8 - surrogate pair\": {\n    \"status\": \"PASS\"\n  },\n  \"Fatal flag: utf-16le - truncated code unit\": {\n    \"status\": \"PASS\"\n  },\n  \"The fatal attribute of TextDecoder\": {\n    \"status\": \"PASS\"\n  },\n  \"Error seen with fatal does not prevent future decodes\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/encoding/textdecoder-ignorebom.any.js.json",
    "content": "{\n  \"BOM is ignored if ignoreBOM option is specified: utf-8\": {\n    \"status\": \"PASS\"\n  },\n  \"BOM is ignored if ignoreBOM option is specified: utf-16le\": {\n    \"status\": \"PASS\"\n  },\n  \"BOM is ignored if ignoreBOM option is specified: utf-16be\": {\n    \"status\": \"PASS\"\n  },\n  \"The ignoreBOM attribute of TextDecoder\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/encoding/textdecoder-labels.any.js.json",
    "content": "{\n  \"unicode-1-1-utf-8 => UTF-8\": {\n    \"status\": \"PASS\"\n  },\n  \"unicode11utf8 => UTF-8\": {\n    \"status\": \"PASS\"\n  },\n  \"unicode20utf8 => UTF-8\": {\n    \"status\": \"PASS\"\n  },\n  \"utf-8 => UTF-8\": {\n    \"status\": \"PASS\"\n  },\n  \"utf8 => UTF-8\": {\n    \"status\": \"PASS\"\n  },\n  \"x-unicode20utf8 => UTF-8\": {\n    \"status\": \"PASS\"\n  },\n  \"866 => IBM866\": {\n    \"status\": \"PASS\"\n  },\n  \"cp866 => IBM866\": {\n    \"status\": \"PASS\"\n  },\n  \"csibm866 => IBM866\": {\n    \"status\": \"PASS\"\n  },\n  \"ibm866 => IBM866\": {\n    \"status\": \"PASS\"\n  },\n  \"csisolatin2 => ISO-8859-2\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-8859-2 => ISO-8859-2\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-ir-101 => ISO-8859-2\": {\n    \"status\": \"PASS\"\n  },\n  \"iso8859-2 => ISO-8859-2\": {\n    \"status\": \"PASS\"\n  },\n  \"iso88592 => ISO-8859-2\": {\n    \"status\": \"PASS\"\n  },\n  \"iso_8859-2 => ISO-8859-2\": {\n    \"status\": \"PASS\"\n  },\n  \"iso_8859-2:1987 => ISO-8859-2\": {\n    \"status\": \"PASS\"\n  },\n  \"l2 => ISO-8859-2\": {\n    \"status\": \"PASS\"\n  },\n  \"latin2 => ISO-8859-2\": {\n    \"status\": \"PASS\"\n  },\n  \"csisolatin3 => ISO-8859-3\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-8859-3 => ISO-8859-3\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-ir-109 => ISO-8859-3\": {\n    \"status\": \"PASS\"\n  },\n  \"iso8859-3 => ISO-8859-3\": {\n    \"status\": \"PASS\"\n  },\n  \"iso88593 => ISO-8859-3\": {\n    \"status\": \"PASS\"\n  },\n  \"iso_8859-3 => ISO-8859-3\": {\n    \"status\": \"PASS\"\n  },\n  \"iso_8859-3:1988 => ISO-8859-3\": {\n    \"status\": \"PASS\"\n  },\n  \"l3 => ISO-8859-3\": {\n    \"status\": \"PASS\"\n  },\n  \"latin3 => ISO-8859-3\": {\n    \"status\": \"PASS\"\n  },\n  \"csisolatin4 => ISO-8859-4\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-8859-4 => ISO-8859-4\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-ir-110 => ISO-8859-4\": {\n    \"status\": \"PASS\"\n  },\n  \"iso8859-4 => ISO-8859-4\": {\n    \"status\": \"PASS\"\n  },\n  \"iso88594 => ISO-8859-4\": {\n    \"status\": \"PASS\"\n  },\n  \"iso_8859-4 => ISO-8859-4\": {\n    \"status\": \"PASS\"\n  },\n  \"iso_8859-4:1988 => ISO-8859-4\": {\n    \"status\": \"PASS\"\n  },\n  \"l4 => ISO-8859-4\": {\n    \"status\": \"PASS\"\n  },\n  \"latin4 => ISO-8859-4\": {\n    \"status\": \"PASS\"\n  },\n  \"csisolatincyrillic => ISO-8859-5\": {\n    \"status\": \"PASS\"\n  },\n  \"cyrillic => ISO-8859-5\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-8859-5 => ISO-8859-5\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-ir-144 => ISO-8859-5\": {\n    \"status\": \"PASS\"\n  },\n  \"iso8859-5 => ISO-8859-5\": {\n    \"status\": \"PASS\"\n  },\n  \"iso88595 => ISO-8859-5\": {\n    \"status\": \"PASS\"\n  },\n  \"iso_8859-5 => ISO-8859-5\": {\n    \"status\": \"PASS\"\n  },\n  \"iso_8859-5:1988 => ISO-8859-5\": {\n    \"status\": \"PASS\"\n  },\n  \"arabic => ISO-8859-6\": {\n    \"status\": \"PASS\"\n  },\n  \"asmo-708 => ISO-8859-6\": {\n    \"status\": \"PASS\"\n  },\n  \"csiso88596e => ISO-8859-6\": {\n    \"status\": \"PASS\"\n  },\n  \"csiso88596i => ISO-8859-6\": {\n    \"status\": \"PASS\"\n  },\n  \"csisolatinarabic => ISO-8859-6\": {\n    \"status\": \"PASS\"\n  },\n  \"ecma-114 => ISO-8859-6\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-8859-6 => ISO-8859-6\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-8859-6-e => ISO-8859-6\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-8859-6-i => ISO-8859-6\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-ir-127 => ISO-8859-6\": {\n    \"status\": \"PASS\"\n  },\n  \"iso8859-6 => ISO-8859-6\": {\n    \"status\": \"PASS\"\n  },\n  \"iso88596 => ISO-8859-6\": {\n    \"status\": \"PASS\"\n  },\n  \"iso_8859-6 => ISO-8859-6\": {\n    \"status\": \"PASS\"\n  },\n  \"iso_8859-6:1987 => ISO-8859-6\": {\n    \"status\": \"PASS\"\n  },\n  \"csisolatingreek => ISO-8859-7\": {\n    \"status\": \"PASS\"\n  },\n  \"ecma-118 => ISO-8859-7\": {\n    \"status\": \"PASS\"\n  },\n  \"elot_928 => ISO-8859-7\": {\n    \"status\": \"PASS\"\n  },\n  \"greek => ISO-8859-7\": {\n    \"status\": \"PASS\"\n  },\n  \"greek8 => ISO-8859-7\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-8859-7 => ISO-8859-7\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-ir-126 => ISO-8859-7\": {\n    \"status\": \"PASS\"\n  },\n  \"iso8859-7 => ISO-8859-7\": {\n    \"status\": \"PASS\"\n  },\n  \"iso88597 => ISO-8859-7\": {\n    \"status\": \"PASS\"\n  },\n  \"iso_8859-7 => ISO-8859-7\": {\n    \"status\": \"PASS\"\n  },\n  \"iso_8859-7:1987 => ISO-8859-7\": {\n    \"status\": \"PASS\"\n  },\n  \"sun_eu_greek => ISO-8859-7\": {\n    \"status\": \"PASS\"\n  },\n  \"csiso88598e => ISO-8859-8\": {\n    \"status\": \"PASS\"\n  },\n  \"csisolatinhebrew => ISO-8859-8\": {\n    \"status\": \"PASS\"\n  },\n  \"hebrew => ISO-8859-8\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-8859-8 => ISO-8859-8\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-8859-8-e => ISO-8859-8\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-ir-138 => ISO-8859-8\": {\n    \"status\": \"PASS\"\n  },\n  \"iso8859-8 => ISO-8859-8\": {\n    \"status\": \"PASS\"\n  },\n  \"iso88598 => ISO-8859-8\": {\n    \"status\": \"PASS\"\n  },\n  \"iso_8859-8 => ISO-8859-8\": {\n    \"status\": \"PASS\"\n  },\n  \"iso_8859-8:1988 => ISO-8859-8\": {\n    \"status\": \"PASS\"\n  },\n  \"visual => ISO-8859-8\": {\n    \"status\": \"PASS\"\n  },\n  \"csiso88598i => ISO-8859-8-I\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-8859-8-i => ISO-8859-8-I\": {\n    \"status\": \"PASS\"\n  },\n  \"logical => ISO-8859-8-I\": {\n    \"status\": \"PASS\"\n  },\n  \"csisolatin6 => ISO-8859-10\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-8859-10 => ISO-8859-10\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-ir-157 => ISO-8859-10\": {\n    \"status\": \"PASS\"\n  },\n  \"iso8859-10 => ISO-8859-10\": {\n    \"status\": \"PASS\"\n  },\n  \"iso885910 => ISO-8859-10\": {\n    \"status\": \"PASS\"\n  },\n  \"l6 => ISO-8859-10\": {\n    \"status\": \"PASS\"\n  },\n  \"latin6 => ISO-8859-10\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-8859-13 => ISO-8859-13\": {\n    \"status\": \"PASS\"\n  },\n  \"iso8859-13 => ISO-8859-13\": {\n    \"status\": \"PASS\"\n  },\n  \"iso885913 => ISO-8859-13\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-8859-14 => ISO-8859-14\": {\n    \"status\": \"PASS\"\n  },\n  \"iso8859-14 => ISO-8859-14\": {\n    \"status\": \"PASS\"\n  },\n  \"iso885914 => ISO-8859-14\": {\n    \"status\": \"PASS\"\n  },\n  \"csisolatin9 => ISO-8859-15\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-8859-15 => ISO-8859-15\": {\n    \"status\": \"PASS\"\n  },\n  \"iso8859-15 => ISO-8859-15\": {\n    \"status\": \"PASS\"\n  },\n  \"iso885915 => ISO-8859-15\": {\n    \"status\": \"PASS\"\n  },\n  \"iso_8859-15 => ISO-8859-15\": {\n    \"status\": \"PASS\"\n  },\n  \"l9 => ISO-8859-15\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-8859-16 => ISO-8859-16\": {\n    \"status\": \"PASS\"\n  },\n  \"cskoi8r => KOI8-R\": {\n    \"status\": \"PASS\"\n  },\n  \"koi => KOI8-R\": {\n    \"status\": \"PASS\"\n  },\n  \"koi8 => KOI8-R\": {\n    \"status\": \"PASS\"\n  },\n  \"koi8-r => KOI8-R\": {\n    \"status\": \"PASS\"\n  },\n  \"koi8_r => KOI8-R\": {\n    \"status\": \"PASS\"\n  },\n  \"koi8-ru => KOI8-U\": {\n    \"status\": \"PASS\"\n  },\n  \"koi8-u => KOI8-U\": {\n    \"status\": \"PASS\"\n  },\n  \"csmacintosh => macintosh\": {\n    \"status\": \"PASS\"\n  },\n  \"mac => macintosh\": {\n    \"status\": \"PASS\"\n  },\n  \"macintosh => macintosh\": {\n    \"status\": \"PASS\"\n  },\n  \"x-mac-roman => macintosh\": {\n    \"status\": \"PASS\"\n  },\n  \"dos-874 => windows-874\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-8859-11 => windows-874\": {\n    \"status\": \"PASS\"\n  },\n  \"iso8859-11 => windows-874\": {\n    \"status\": \"PASS\"\n  },\n  \"iso885911 => windows-874\": {\n    \"status\": \"PASS\"\n  },\n  \"tis-620 => windows-874\": {\n    \"status\": \"PASS\"\n  },\n  \"windows-874 => windows-874\": {\n    \"status\": \"PASS\"\n  },\n  \"cp1250 => windows-1250\": {\n    \"status\": \"PASS\"\n  },\n  \"windows-1250 => windows-1250\": {\n    \"status\": \"PASS\"\n  },\n  \"x-cp1250 => windows-1250\": {\n    \"status\": \"PASS\"\n  },\n  \"cp1251 => windows-1251\": {\n    \"status\": \"PASS\"\n  },\n  \"windows-1251 => windows-1251\": {\n    \"status\": \"PASS\"\n  },\n  \"x-cp1251 => windows-1251\": {\n    \"status\": \"PASS\"\n  },\n  \"ansi_x3.4-1968 => windows-1252\": {\n    \"status\": \"PASS\"\n  },\n  \"ascii => windows-1252\": {\n    \"status\": \"PASS\"\n  },\n  \"cp1252 => windows-1252\": {\n    \"status\": \"PASS\"\n  },\n  \"cp819 => windows-1252\": {\n    \"status\": \"PASS\"\n  },\n  \"csisolatin1 => windows-1252\": {\n    \"status\": \"PASS\"\n  },\n  \"ibm819 => windows-1252\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-8859-1 => windows-1252\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-ir-100 => windows-1252\": {\n    \"status\": \"PASS\"\n  },\n  \"iso8859-1 => windows-1252\": {\n    \"status\": \"PASS\"\n  },\n  \"iso88591 => windows-1252\": {\n    \"status\": \"PASS\"\n  },\n  \"iso_8859-1 => windows-1252\": {\n    \"status\": \"PASS\"\n  },\n  \"iso_8859-1:1987 => windows-1252\": {\n    \"status\": \"PASS\"\n  },\n  \"l1 => windows-1252\": {\n    \"status\": \"PASS\"\n  },\n  \"latin1 => windows-1252\": {\n    \"status\": \"PASS\"\n  },\n  \"us-ascii => windows-1252\": {\n    \"status\": \"PASS\"\n  },\n  \"windows-1252 => windows-1252\": {\n    \"status\": \"PASS\"\n  },\n  \"x-cp1252 => windows-1252\": {\n    \"status\": \"PASS\"\n  },\n  \"cp1253 => windows-1253\": {\n    \"status\": \"PASS\"\n  },\n  \"windows-1253 => windows-1253\": {\n    \"status\": \"PASS\"\n  },\n  \"x-cp1253 => windows-1253\": {\n    \"status\": \"PASS\"\n  },\n  \"cp1254 => windows-1254\": {\n    \"status\": \"PASS\"\n  },\n  \"csisolatin5 => windows-1254\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-8859-9 => windows-1254\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-ir-148 => windows-1254\": {\n    \"status\": \"PASS\"\n  },\n  \"iso8859-9 => windows-1254\": {\n    \"status\": \"PASS\"\n  },\n  \"iso88599 => windows-1254\": {\n    \"status\": \"PASS\"\n  },\n  \"iso_8859-9 => windows-1254\": {\n    \"status\": \"PASS\"\n  },\n  \"iso_8859-9:1989 => windows-1254\": {\n    \"status\": \"PASS\"\n  },\n  \"l5 => windows-1254\": {\n    \"status\": \"PASS\"\n  },\n  \"latin5 => windows-1254\": {\n    \"status\": \"PASS\"\n  },\n  \"windows-1254 => windows-1254\": {\n    \"status\": \"PASS\"\n  },\n  \"x-cp1254 => windows-1254\": {\n    \"status\": \"PASS\"\n  },\n  \"cp1255 => windows-1255\": {\n    \"status\": \"PASS\"\n  },\n  \"windows-1255 => windows-1255\": {\n    \"status\": \"PASS\"\n  },\n  \"x-cp1255 => windows-1255\": {\n    \"status\": \"PASS\"\n  },\n  \"cp1256 => windows-1256\": {\n    \"status\": \"PASS\"\n  },\n  \"windows-1256 => windows-1256\": {\n    \"status\": \"PASS\"\n  },\n  \"x-cp1256 => windows-1256\": {\n    \"status\": \"PASS\"\n  },\n  \"cp1257 => windows-1257\": {\n    \"status\": \"PASS\"\n  },\n  \"windows-1257 => windows-1257\": {\n    \"status\": \"PASS\"\n  },\n  \"x-cp1257 => windows-1257\": {\n    \"status\": \"PASS\"\n  },\n  \"cp1258 => windows-1258\": {\n    \"status\": \"PASS\"\n  },\n  \"windows-1258 => windows-1258\": {\n    \"status\": \"PASS\"\n  },\n  \"x-cp1258 => windows-1258\": {\n    \"status\": \"PASS\"\n  },\n  \"x-mac-cyrillic => x-mac-cyrillic\": {\n    \"status\": \"PASS\"\n  },\n  \"x-mac-ukrainian => x-mac-cyrillic\": {\n    \"status\": \"PASS\"\n  },\n  \"chinese => GBK\": {\n    \"status\": \"PASS\"\n  },\n  \"csgb2312 => GBK\": {\n    \"status\": \"PASS\"\n  },\n  \"csiso58gb231280 => GBK\": {\n    \"status\": \"PASS\"\n  },\n  \"gb2312 => GBK\": {\n    \"status\": \"PASS\"\n  },\n  \"gb_2312 => GBK\": {\n    \"status\": \"PASS\"\n  },\n  \"gb_2312-80 => GBK\": {\n    \"status\": \"PASS\"\n  },\n  \"gbk => GBK\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-ir-58 => GBK\": {\n    \"status\": \"PASS\"\n  },\n  \"x-gbk => GBK\": {\n    \"status\": \"PASS\"\n  },\n  \"gb18030 => gb18030\": {\n    \"status\": \"PASS\"\n  },\n  \"big5 => Big5\": {\n    \"status\": \"PASS\"\n  },\n  \"big5-hkscs => Big5\": {\n    \"status\": \"PASS\"\n  },\n  \"cn-big5 => Big5\": {\n    \"status\": \"PASS\"\n  },\n  \"csbig5 => Big5\": {\n    \"status\": \"PASS\"\n  },\n  \"x-x-big5 => Big5\": {\n    \"status\": \"PASS\"\n  },\n  \"cseucpkdfmtjapanese => EUC-JP\": {\n    \"status\": \"PASS\"\n  },\n  \"euc-jp => EUC-JP\": {\n    \"status\": \"PASS\"\n  },\n  \"x-euc-jp => EUC-JP\": {\n    \"status\": \"PASS\"\n  },\n  \"csiso2022jp => ISO-2022-JP\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-2022-jp => ISO-2022-JP\": {\n    \"status\": \"PASS\"\n  },\n  \"csshiftjis => Shift_JIS\": {\n    \"status\": \"PASS\"\n  },\n  \"ms932 => Shift_JIS\": {\n    \"status\": \"PASS\"\n  },\n  \"ms_kanji => Shift_JIS\": {\n    \"status\": \"PASS\"\n  },\n  \"shift-jis => Shift_JIS\": {\n    \"status\": \"PASS\"\n  },\n  \"shift_jis => Shift_JIS\": {\n    \"status\": \"PASS\"\n  },\n  \"sjis => Shift_JIS\": {\n    \"status\": \"PASS\"\n  },\n  \"windows-31j => Shift_JIS\": {\n    \"status\": \"PASS\"\n  },\n  \"x-sjis => Shift_JIS\": {\n    \"status\": \"PASS\"\n  },\n  \"cseuckr => EUC-KR\": {\n    \"status\": \"PASS\"\n  },\n  \"csksc56011987 => EUC-KR\": {\n    \"status\": \"PASS\"\n  },\n  \"euc-kr => EUC-KR\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-ir-149 => EUC-KR\": {\n    \"status\": \"PASS\"\n  },\n  \"korean => EUC-KR\": {\n    \"status\": \"PASS\"\n  },\n  \"ks_c_5601-1987 => EUC-KR\": {\n    \"status\": \"PASS\"\n  },\n  \"ks_c_5601-1989 => EUC-KR\": {\n    \"status\": \"PASS\"\n  },\n  \"ksc5601 => EUC-KR\": {\n    \"status\": \"PASS\"\n  },\n  \"ksc_5601 => EUC-KR\": {\n    \"status\": \"PASS\"\n  },\n  \"windows-949 => EUC-KR\": {\n    \"status\": \"PASS\"\n  },\n  \"unicodefffe => UTF-16BE\": {\n    \"status\": \"PASS\"\n  },\n  \"utf-16be => UTF-16BE\": {\n    \"status\": \"PASS\"\n  },\n  \"csunicode => UTF-16LE\": {\n    \"status\": \"PASS\"\n  },\n  \"iso-10646-ucs-2 => UTF-16LE\": {\n    \"status\": \"PASS\"\n  },\n  \"ucs-2 => UTF-16LE\": {\n    \"status\": \"PASS\"\n  },\n  \"unicode => UTF-16LE\": {\n    \"status\": \"PASS\"\n  },\n  \"unicodefeff => UTF-16LE\": {\n    \"status\": \"PASS\"\n  },\n  \"utf-16 => UTF-16LE\": {\n    \"status\": \"PASS\"\n  },\n  \"utf-16le => UTF-16LE\": {\n    \"status\": \"PASS\"\n  },\n  \"x-user-defined => x-user-defined\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/encoding/textdecoder-streaming.any.js.json",
    "content": "{\n  \"Streaming decode: utf-8, 1 byte window (ArrayBuffer)\": {\n    \"status\": \"PASS\"\n  },\n  \"Streaming decode: utf-8, 2 byte window (ArrayBuffer)\": {\n    \"status\": \"PASS\"\n  },\n  \"Streaming decode: utf-8, 3 byte window (ArrayBuffer)\": {\n    \"status\": \"PASS\"\n  },\n  \"Streaming decode: utf-8, 4 byte window (ArrayBuffer)\": {\n    \"status\": \"PASS\"\n  },\n  \"Streaming decode: utf-8, 5 byte window (ArrayBuffer)\": {\n    \"status\": \"PASS\"\n  },\n  \"Streaming decode: utf-16le, 1 byte window (ArrayBuffer)\": {\n    \"status\": \"PASS\"\n  },\n  \"Streaming decode: utf-16le, 2 byte window (ArrayBuffer)\": {\n    \"status\": \"PASS\"\n  },\n  \"Streaming decode: utf-16le, 3 byte window (ArrayBuffer)\": {\n    \"status\": \"PASS\"\n  },\n  \"Streaming decode: utf-16le, 4 byte window (ArrayBuffer)\": {\n    \"status\": \"PASS\"\n  },\n  \"Streaming decode: utf-16le, 5 byte window (ArrayBuffer)\": {\n    \"status\": \"PASS\"\n  },\n  \"Streaming decode: utf-16be, 1 byte window (ArrayBuffer)\": {\n    \"status\": \"PASS\"\n  },\n  \"Streaming decode: utf-16be, 2 byte window (ArrayBuffer)\": {\n    \"status\": \"PASS\"\n  },\n  \"Streaming decode: utf-16be, 3 byte window (ArrayBuffer)\": {\n    \"status\": \"PASS\"\n  },\n  \"Streaming decode: utf-16be, 4 byte window (ArrayBuffer)\": {\n    \"status\": \"PASS\"\n  },\n  \"Streaming decode: utf-16be, 5 byte window (ArrayBuffer)\": {\n    \"status\": \"PASS\"\n  },\n  \"Streaming decode: UTF-8 chunk tests (ArrayBuffer)\": {\n    \"status\": \"PASS\"\n  },\n  \"Streaming decode: utf-8, 1 byte window (SharedArrayBuffer)\": {\n    \"status\": \"FAIL\"\n  },\n  \"Streaming decode: utf-8, 2 byte window (SharedArrayBuffer)\": {\n    \"status\": \"FAIL\"\n  },\n  \"Streaming decode: utf-8, 3 byte window (SharedArrayBuffer)\": {\n    \"status\": \"FAIL\"\n  },\n  \"Streaming decode: utf-8, 4 byte window (SharedArrayBuffer)\": {\n    \"status\": \"FAIL\"\n  },\n  \"Streaming decode: utf-8, 5 byte window (SharedArrayBuffer)\": {\n    \"status\": \"FAIL\"\n  },\n  \"Streaming decode: utf-16le, 1 byte window (SharedArrayBuffer)\": {\n    \"status\": \"FAIL\"\n  },\n  \"Streaming decode: utf-16le, 2 byte window (SharedArrayBuffer)\": {\n    \"status\": \"FAIL\"\n  },\n  \"Streaming decode: utf-16le, 3 byte window (SharedArrayBuffer)\": {\n    \"status\": \"FAIL\"\n  },\n  \"Streaming decode: utf-16le, 4 byte window (SharedArrayBuffer)\": {\n    \"status\": \"FAIL\"\n  },\n  \"Streaming decode: utf-16le, 5 byte window (SharedArrayBuffer)\": {\n    \"status\": \"FAIL\"\n  },\n  \"Streaming decode: utf-16be, 1 byte window (SharedArrayBuffer)\": {\n    \"status\": \"FAIL\"\n  },\n  \"Streaming decode: utf-16be, 2 byte window (SharedArrayBuffer)\": {\n    \"status\": \"FAIL\"\n  },\n  \"Streaming decode: utf-16be, 3 byte window (SharedArrayBuffer)\": {\n    \"status\": \"FAIL\"\n  },\n  \"Streaming decode: utf-16be, 4 byte window (SharedArrayBuffer)\": {\n    \"status\": \"FAIL\"\n  },\n  \"Streaming decode: utf-16be, 5 byte window (SharedArrayBuffer)\": {\n    \"status\": \"FAIL\"\n  },\n  \"Streaming decode: UTF-8 chunk tests (SharedArrayBuffer)\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/encoding/textdecoder-utf16-surrogates.any.js.json",
    "content": "{\n  \"utf-16le - lone surrogate lead\": {\n    \"status\": \"PASS\"\n  },\n  \"utf-16le - lone surrogate lead (fatal flag set)\": {\n    \"status\": \"PASS\"\n  },\n  \"utf-16le - lone surrogate trail\": {\n    \"status\": \"PASS\"\n  },\n  \"utf-16le - lone surrogate trail (fatal flag set)\": {\n    \"status\": \"PASS\"\n  },\n  \"utf-16le - unmatched surrogate lead\": {\n    \"status\": \"PASS\"\n  },\n  \"utf-16le - unmatched surrogate lead (fatal flag set)\": {\n    \"status\": \"PASS\"\n  },\n  \"utf-16le - unmatched surrogate trail\": {\n    \"status\": \"PASS\"\n  },\n  \"utf-16le - unmatched surrogate trail (fatal flag set)\": {\n    \"status\": \"PASS\"\n  },\n  \"utf-16le - swapped surrogate pair\": {\n    \"status\": \"PASS\"\n  },\n  \"utf-16le - swapped surrogate pair (fatal flag set)\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/encoding/textencoder-constructor-non-utf.any.js.json",
    "content": "{\n  \"Encoding argument supported for decode: UTF-8\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument not considered for encode: UTF-8\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument supported for decode: IBM866\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument not considered for encode: IBM866\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument supported for decode: ISO-8859-2\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument not considered for encode: ISO-8859-2\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument supported for decode: ISO-8859-3\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument not considered for encode: ISO-8859-3\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument supported for decode: ISO-8859-4\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument not considered for encode: ISO-8859-4\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument supported for decode: ISO-8859-5\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument not considered for encode: ISO-8859-5\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument supported for decode: ISO-8859-6\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument not considered for encode: ISO-8859-6\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument supported for decode: ISO-8859-7\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument not considered for encode: ISO-8859-7\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument supported for decode: ISO-8859-8\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument not considered for encode: ISO-8859-8\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument supported for decode: ISO-8859-8-I\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument not considered for encode: ISO-8859-8-I\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument supported for decode: ISO-8859-10\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument not considered for encode: ISO-8859-10\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument supported for decode: ISO-8859-13\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument not considered for encode: ISO-8859-13\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument supported for decode: ISO-8859-14\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument not considered for encode: ISO-8859-14\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument supported for decode: ISO-8859-15\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument not considered for encode: ISO-8859-15\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument supported for decode: ISO-8859-16\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument not considered for encode: ISO-8859-16\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument supported for decode: KOI8-R\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument not considered for encode: KOI8-R\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument supported for decode: KOI8-U\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument not considered for encode: KOI8-U\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument supported for decode: macintosh\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument not considered for encode: macintosh\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument supported for decode: windows-874\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument not considered for encode: windows-874\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument supported for decode: windows-1250\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument not considered for encode: windows-1250\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument supported for decode: windows-1251\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument not considered for encode: windows-1251\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument supported for decode: windows-1252\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument not considered for encode: windows-1252\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument supported for decode: windows-1253\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument not considered for encode: windows-1253\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument supported for decode: windows-1254\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument not considered for encode: windows-1254\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument supported for decode: windows-1255\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument not considered for encode: windows-1255\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument supported for decode: windows-1256\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument not considered for encode: windows-1256\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument supported for decode: windows-1257\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument not considered for encode: windows-1257\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument supported for decode: windows-1258\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument not considered for encode: windows-1258\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument supported for decode: x-mac-cyrillic\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument not considered for encode: x-mac-cyrillic\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument supported for decode: GBK\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument not considered for encode: GBK\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument supported for decode: gb18030\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument not considered for encode: gb18030\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument supported for decode: Big5\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument not considered for encode: Big5\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument supported for decode: EUC-JP\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument not considered for encode: EUC-JP\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument supported for decode: ISO-2022-JP\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument not considered for encode: ISO-2022-JP\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument supported for decode: Shift_JIS\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument not considered for encode: Shift_JIS\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument supported for decode: EUC-KR\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument not considered for encode: EUC-KR\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument not considered for encode: replacement\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument supported for decode: UTF-16BE\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument not considered for encode: UTF-16BE\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument supported for decode: UTF-16LE\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument not considered for encode: UTF-16LE\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument supported for decode: x-user-defined\": {\n    \"status\": \"PASS\"\n  },\n  \"Encoding argument not considered for encode: x-user-defined\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/encoding/textencoder-utf16-surrogates.any.js.json",
    "content": "{\n  \"USVString handling: lone surrogate lead\": {\n    \"status\": \"PASS\"\n  },\n  \"USVString handling: lone surrogate trail\": {\n    \"status\": \"PASS\"\n  },\n  \"USVString handling: unmatched surrogate lead\": {\n    \"status\": \"PASS\"\n  },\n  \"USVString handling: unmatched surrogate trail\": {\n    \"status\": \"PASS\"\n  },\n  \"USVString handling: swapped surrogate pair\": {\n    \"status\": \"PASS\"\n  },\n  \"USVString handling: properly encoded MUSICAL SYMBOL G CLEF (U+1D11E)\": {\n    \"status\": \"PASS\"\n  },\n  \"USVString default\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/encoding/unsupported-encodings.any.js.json",
    "content": "{\n  \"UTF-7 should not be supported\": {\n    \"status\": \"FAIL\"\n  },\n  \"utf-7 should not be supported\": {\n    \"status\": \"FAIL\"\n  },\n  \"UTF-32 with BOM should decode as UTF-16LE\": {\n    \"status\": \"FAIL\"\n  },\n  \"UTF-32 with no BOM should decode as UTF-8\": {\n    \"status\": \"FAIL\"\n  },\n  \"utf-32 with BOM should decode as UTF-16LE\": {\n    \"status\": \"FAIL\"\n  },\n  \"utf-32 with no BOM should decode as UTF-8\": {\n    \"status\": \"FAIL\"\n  },\n  \"UTF-32LE with BOM should decode as UTF-16LE\": {\n    \"status\": \"FAIL\"\n  },\n  \"UTF-32LE with no BOM should decode as UTF-8\": {\n    \"status\": \"FAIL\"\n  },\n  \"utf-32le with BOM should decode as UTF-16LE\": {\n    \"status\": \"FAIL\"\n  },\n  \"utf-32le with no BOM should decode as UTF-8\": {\n    \"status\": \"FAIL\"\n  },\n  \"UTF-32be with no BOM should decode as UTF-8\": {\n    \"status\": \"FAIL\"\n  },\n  \"UTF-32be with BOM should decode as UTF-8\": {\n    \"status\": \"FAIL\"\n  },\n  \"utf-32be with no BOM should decode as UTF-8\": {\n    \"status\": \"FAIL\"\n  },\n  \"utf-32be with BOM should decode as UTF-8\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/abort/general.any.js.json",
    "content": "{\n  \"Aborting rejects with AbortError\": {\n    \"status\": \"FAIL\"\n  },\n  \"Aborting rejects with abort reason\": {\n    \"status\": \"FAIL\"\n  },\n  \"Aborting rejects with AbortError - no-cors\": {\n    \"status\": \"FAIL\"\n  },\n  \"TypeError from request constructor takes priority - RequestInit's window is not null\": {\n    \"status\": \"PASS\"\n  },\n  \"TypeError from request constructor takes priority - Input URL is not valid\": {\n    \"status\": \"FAIL\"\n  },\n  \"TypeError from request constructor takes priority - Input URL has credentials\": {\n    \"status\": \"PASS\"\n  },\n  \"TypeError from request constructor takes priority - RequestInit's mode is navigate\": {\n    \"status\": \"PASS\"\n  },\n  \"TypeError from request constructor takes priority - RequestInit's referrer is invalid\": {\n    \"status\": \"PASS\"\n  },\n  \"TypeError from request constructor takes priority - RequestInit's method is invalid\": {\n    \"status\": \"FAIL\"\n  },\n  \"TypeError from request constructor takes priority - RequestInit's method is forbidden\": {\n    \"status\": \"PASS\"\n  },\n  \"TypeError from request constructor takes priority - RequestInit's mode is no-cors and method is not simple\": {\n    \"status\": \"PASS\"\n  },\n  \"TypeError from request constructor takes priority - RequestInit's cache mode is only-if-cached and mode is not same-origin\": {\n    \"status\": \"PASS\"\n  },\n  \"TypeError from request constructor takes priority - Request with cache mode: only-if-cached and fetch mode cors\": {\n    \"status\": \"PASS\"\n  },\n  \"TypeError from request constructor takes priority - Request with cache mode: only-if-cached and fetch mode no-cors\": {\n    \"status\": \"PASS\"\n  },\n  \"TypeError from request constructor takes priority - Bad referrerPolicy init parameter value\": {\n    \"status\": \"PASS\"\n  },\n  \"TypeError from request constructor takes priority - Bad mode init parameter value\": {\n    \"status\": \"PASS\"\n  },\n  \"TypeError from request constructor takes priority - Bad credentials init parameter value\": {\n    \"status\": \"PASS\"\n  },\n  \"TypeError from request constructor takes priority - Bad cache init parameter value\": {\n    \"status\": \"PASS\"\n  },\n  \"TypeError from request constructor takes priority - Bad redirect init parameter value\": {\n    \"status\": \"PASS\"\n  },\n  \"Request objects have a signal property\": {\n    \"status\": \"FAIL\"\n  },\n  \"Signal on request object\": {\n    \"status\": \"FAIL\"\n  },\n  \"Signal on request object should also have abort reason\": {\n    \"status\": \"FAIL\"\n  },\n  \"Signal on request object created from request object\": {\n    \"status\": \"FAIL\"\n  },\n  \"Signal on request object created from request object, with signal on second request\": {\n    \"status\": \"FAIL\"\n  },\n  \"Signal on request object created from request object, with signal on second request overriding another\": {\n    \"status\": \"FAIL\"\n  },\n  \"Signal retained after unrelated properties are overridden by fetch\": {\n    \"status\": \"FAIL\"\n  },\n  \"Signal removed by setting to null\": {\n    \"status\": \"FAIL\"\n  },\n  \"Already aborted signal rejects immediately\": {\n    \"status\": \"FAIL\"\n  },\n  \"Request is still 'used' if signal is aborted before fetching\": {\n    \"status\": \"FAIL\"\n  },\n  \"response.arrayBuffer() rejects if already aborted\": {\n    \"status\": \"FAIL\"\n  },\n  \"response.blob() rejects if already aborted\": {\n    \"status\": \"FAIL\"\n  },\n  \"response.bytes() rejects if already aborted\": {\n    \"status\": \"FAIL\"\n  },\n  \"response.formData() rejects if already aborted\": {\n    \"status\": \"FAIL\"\n  },\n  \"response.json() rejects if already aborted\": {\n    \"status\": \"FAIL\"\n  },\n  \"response.text() rejects if already aborted\": {\n    \"status\": \"FAIL\"\n  },\n  \"Call text() twice on aborted response\": {\n    \"status\": \"FAIL\"\n  },\n  \"Already aborted signal does not make request\": {\n    \"status\": \"FAIL\"\n  },\n  \"Already aborted signal can be used for many fetches\": {\n    \"status\": \"FAIL\"\n  },\n  \"Signal can be used to abort other fetches, even if another fetch succeeded before aborting\": {\n    \"status\": \"FAIL\"\n  },\n  \"Underlying connection is closed when aborting after receiving response\": {\n    \"status\": \"FAIL\"\n  },\n  \"Underlying connection is closed when aborting after receiving response - no-cors\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch aborted & connection closed when aborted after calling response.arrayBuffer()\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch aborted & connection closed when aborted after calling response.blob()\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch aborted & connection closed when aborted after calling response.bytes()\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch aborted & connection closed when aborted after calling response.formData()\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch aborted & connection closed when aborted after calling response.json()\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch aborted & connection closed when aborted after calling response.text()\": {\n    \"status\": \"FAIL\"\n  },\n  \"Stream errors once aborted. Underlying connection closed.\": {\n    \"status\": \"FAIL\"\n  },\n  \"Stream errors once aborted, after reading. Underlying connection closed.\": {\n    \"status\": \"FAIL\"\n  },\n  \"Stream will not error if body is empty. It's closed with an empty queue before it errors.\": {\n    \"status\": \"FAIL\"\n  },\n  \"Readable stream synchronously cancels with AbortError if aborted before reading\": {\n    \"status\": \"FAIL\"\n  },\n  \"Signal state is cloned\": {\n    \"status\": \"FAIL\"\n  },\n  \"Clone aborts with original controller\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/abort/request.any.js.json",
    "content": "{\n  \"Calling arrayBuffer() on an aborted request\": {\n    \"status\": \"FAIL\"\n  },\n  \"Aborting a request after calling arrayBuffer()\": {\n    \"status\": \"FAIL\"\n  },\n  \"Calling arrayBuffer() on an aborted consumed empty request\": {\n    \"status\": \"FAIL\"\n  },\n  \"Calling arrayBuffer() on an aborted consumed nonempty request\": {\n    \"status\": \"FAIL\"\n  },\n  \"Calling blob() on an aborted request\": {\n    \"status\": \"FAIL\"\n  },\n  \"Aborting a request after calling blob()\": {\n    \"status\": \"FAIL\"\n  },\n  \"Calling blob() on an aborted consumed empty request\": {\n    \"status\": \"FAIL\"\n  },\n  \"Calling blob() on an aborted consumed nonempty request\": {\n    \"status\": \"FAIL\"\n  },\n  \"Calling formData() on an aborted request\": {\n    \"status\": \"FAIL\"\n  },\n  \"Aborting a request after calling formData()\": {\n    \"status\": \"FAIL\"\n  },\n  \"Calling formData() on an aborted consumed nonempty request\": {\n    \"status\": \"FAIL\"\n  },\n  \"Calling json() on an aborted request\": {\n    \"status\": \"FAIL\"\n  },\n  \"Aborting a request after calling json()\": {\n    \"status\": \"FAIL\"\n  },\n  \"Calling json() on an aborted consumed nonempty request\": {\n    \"status\": \"FAIL\"\n  },\n  \"Calling text() on an aborted request\": {\n    \"status\": \"FAIL\"\n  },\n  \"Aborting a request after calling text()\": {\n    \"status\": \"FAIL\"\n  },\n  \"Calling text() on an aborted consumed empty request\": {\n    \"status\": \"FAIL\"\n  },\n  \"Calling text() on an aborted consumed nonempty request\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/basic/accept-header.any.js.json",
    "content": "{\n  \"Request through fetch should have 'accept' header with value '*/*'\": {\n    \"status\": \"FAIL\"\n  },\n  \"Request through fetch should have 'accept' header with value 'custom/*'\": {\n    \"status\": \"FAIL\"\n  },\n  \"Request through fetch should have a 'accept-language' header\": {\n    \"status\": \"FAIL\"\n  },\n  \"Request through fetch should have 'accept-language' header with value 'bzh'\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/basic/conditional-get.any.js.json",
    "content": "{\n  \"Testing conditional GET with ETags\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/basic/header-value-combining.any.js.json",
    "content": "{\n  \"response.headers.get('content-length') expects 0\": {\n    \"status\": \"FAIL\"\n  },\n  \"response.headers.get('content-length') expects 0, 0\": {\n    \"status\": \"FAIL\"\n  },\n  \"response.headers.get('double-trouble') expects , \": {\n    \"status\": \"FAIL\"\n  },\n  \"response.headers.get('foo-test') expects 1, 2, 3\": {\n    \"status\": \"FAIL\"\n  },\n  \"response.headers.get('heya') expects , \\u000b\\f, 1, , , 2\": {\n    \"status\": \"FAIL\"\n  },\n  \"response.headers.get('www-authenticate') expects 1, 2, 3, 4\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/basic/header-value-null-byte.any.js.json",
    "content": "{\n  \"Ensure fetch() rejects null bytes in headers\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/basic/historical.any.js.json",
    "content": "{\n  \"Headers object no longer has a getAll() method\": {\n    \"status\": \"PASS\"\n  },\n  \"'type' getter should not exist on Request objects\": {\n    \"status\": \"PASS\"\n  },\n  \"Response object no longer has a trailer getter\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/basic/http-response-code.any.js.json",
    "content": "{\n  \"Fetch on 425 response should not be retried for non TLS early data.\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/basic/integrity.sub.any.js.json",
    "content": "{\n  \"Empty string integrity\": {\n    \"status\": \"PASS\"\n  },\n  \"SHA-256 integrity\": {\n    \"status\": \"PASS\"\n  },\n  \"SHA-384 integrity\": {\n    \"status\": \"PASS\"\n  },\n  \"SHA-512 integrity\": {\n    \"status\": \"PASS\"\n  },\n  \"SHA-512 integrity with missing padding\": {\n    \"status\": \"PASS\"\n  },\n  \"SHA-512 integrity base64url encoded\": {\n    \"status\": \"PASS\"\n  },\n  \"SHA-512 integrity base64url encoded with missing padding\": {\n    \"status\": \"PASS\"\n  },\n  \"Invalid integrity\": {\n    \"status\": \"FAIL\"\n  },\n  \"Multiple integrities: valid stronger than invalid\": {\n    \"status\": \"PASS\"\n  },\n  \"Multiple integrities: invalid stronger than valid\": {\n    \"status\": \"FAIL\"\n  },\n  \"Multiple integrities: invalid as strong as valid\": {\n    \"status\": \"PASS\"\n  },\n  \"Multiple integrities: both are valid\": {\n    \"status\": \"PASS\"\n  },\n  \"Multiple integrities: both are invalid\": {\n    \"status\": \"FAIL\"\n  },\n  \"CORS empty integrity\": {\n    \"status\": \"PASS\"\n  },\n  \"CORS SHA-512 integrity\": {\n    \"status\": \"PASS\"\n  },\n  \"CORS invalid integrity\": {\n    \"status\": \"FAIL\"\n  },\n  \"Empty string integrity for opaque response\": {\n    \"status\": \"FAIL\"\n  },\n  \"SHA-* integrity for opaque response\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/basic/keepalive.any.js.json",
    "content": "{\n  \"[keepalive] simple GET request on 'load' [no payload]; setting up\": {\n    \"status\": \"FAIL\"\n  },\n  \"[keepalive] simple GET request on 'unload' [no payload]; setting up\": {\n    \"status\": \"FAIL\"\n  },\n  \"[keepalive] simple GET request on 'pagehide' [no payload]; setting up\": {\n    \"status\": \"FAIL\"\n  },\n  \"[keepalive] simple POST request on 'load' [no payload]; setting up\": {\n    \"status\": \"FAIL\"\n  },\n  \"[keepalive] simple POST request on 'unload' [no payload]; setting up\": {\n    \"status\": \"FAIL\"\n  },\n  \"[keepalive] simple POST request on 'pagehide' [no payload]; setting up\": {\n    \"status\": \"FAIL\"\n  },\n  \"simple keepalive test for web workers;\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/basic/mode-same-origin.any.js.json",
    "content": "{\n  \"Fetch ../resources/top.txt with same-origin mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch http://web-platform.test:8000/fetch/api/resources/top.txt with same-origin mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch https://web-platform.test:8443/fetch/api/resources/top.txt with same-origin mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch http://www1.web-platform.test:8000/fetch/api/resources/top.txt with same-origin mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch /fetch/api/basic/../resources/redirect.py?location=../resources/top.txt with same-origin mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch /fetch/api/basic/../resources/redirect.py?location=http://web-platform.test:8000/fetch/api/resources/top.txt with same-origin mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch /fetch/api/basic/../resources/redirect.py?location=https://web-platform.test:8443/fetch/api/resources/top.txt with same-origin mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch /fetch/api/basic/../resources/redirect.py?location=http://www1.web-platform.test:8000/fetch/api/resources/top.txt with same-origin mode\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/basic/referrer.any.js.json",
    "content": "{\n  \"origin-when-cross-origin policy on a same-origin URL\": {\n    \"status\": \"FAIL\"\n  },\n  \"origin-when-cross-origin policy on a cross-origin URL\": {\n    \"status\": \"FAIL\"\n  },\n  \"origin-when-cross-origin policy on a cross-origin URL after same-origin redirection\": {\n    \"status\": \"FAIL\"\n  },\n  \"origin-when-cross-origin policy on a same-origin URL after cross-origin redirection\": {\n    \"status\": \"FAIL\"\n  },\n  \"Referrer with credentials should be stripped\": {\n    \"status\": \"FAIL\"\n  },\n  \"Referrer with fragment ID should be stripped\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/basic/request-forbidden-headers.any.js.json",
    "content": "{\n  \"Accept-Charset is a forbidden request header\": {\n    \"status\": \"FAIL\"\n  },\n  \"Accept-Encoding is a forbidden request header\": {\n    \"status\": \"FAIL\"\n  },\n  \"Access-Control-Request-Headers is a forbidden request header\": {\n    \"status\": \"FAIL\"\n  },\n  \"Access-Control-Request-Method is a forbidden request header\": {\n    \"status\": \"FAIL\"\n  },\n  \"Connection is a forbidden request header\": {\n    \"status\": \"FAIL\"\n  },\n  \"Content-Length is a forbidden request header\": {\n    \"status\": \"FAIL\"\n  },\n  \"Cookie is a forbidden request header\": {\n    \"status\": \"FAIL\"\n  },\n  \"Cookie2 is a forbidden request header\": {\n    \"status\": \"FAIL\"\n  },\n  \"Date is a forbidden request header\": {\n    \"status\": \"FAIL\"\n  },\n  \"DNT is a forbidden request header\": {\n    \"status\": \"FAIL\"\n  },\n  \"Expect is a forbidden request header\": {\n    \"status\": \"FAIL\"\n  },\n  \"Host is a forbidden request header\": {\n    \"status\": \"FAIL\"\n  },\n  \"Keep-Alive is a forbidden request header\": {\n    \"status\": \"FAIL\"\n  },\n  \"Origin is a forbidden request header\": {\n    \"status\": \"FAIL\"\n  },\n  \"Referer is a forbidden request header\": {\n    \"status\": \"FAIL\"\n  },\n  \"TE is a forbidden request header\": {\n    \"status\": \"FAIL\"\n  },\n  \"Trailer is a forbidden request header\": {\n    \"status\": \"FAIL\"\n  },\n  \"Transfer-Encoding is a forbidden request header\": {\n    \"status\": \"FAIL\"\n  },\n  \"Upgrade is a forbidden request header\": {\n    \"status\": \"FAIL\"\n  },\n  \"Via is a forbidden request header\": {\n    \"status\": \"FAIL\"\n  },\n  \"Proxy- is a forbidden request header\": {\n    \"status\": \"FAIL\"\n  },\n  \"Proxy-Test is a forbidden request header\": {\n    \"status\": \"FAIL\"\n  },\n  \"Sec- is a forbidden request header\": {\n    \"status\": \"FAIL\"\n  },\n  \"Sec-Test is a forbidden request header\": {\n    \"status\": \"FAIL\"\n  },\n  \"header x-http-method-override is forbidden to use value TRACE\": {\n    \"status\": \"FAIL\"\n  },\n  \"header x-http-method is forbidden to use value TRACE\": {\n    \"status\": \"FAIL\"\n  },\n  \"header x-method-override is forbidden to use value TRACE\": {\n    \"status\": \"FAIL\"\n  },\n  \"header X-HTTP-METHOD-OVERRIDE is forbidden to use value TRACE\": {\n    \"status\": \"FAIL\"\n  },\n  \"header X-HTTP-METHOD is forbidden to use value TRACE\": {\n    \"status\": \"FAIL\"\n  },\n  \"header X-METHOD-OVERRIDE is forbidden to use value TRACE\": {\n    \"status\": \"FAIL\"\n  },\n  \"header x-http-method-override is forbidden to use value TRACK\": {\n    \"status\": \"FAIL\"\n  },\n  \"header x-http-method is forbidden to use value TRACK\": {\n    \"status\": \"FAIL\"\n  },\n  \"header x-method-override is forbidden to use value TRACK\": {\n    \"status\": \"FAIL\"\n  },\n  \"header X-HTTP-METHOD-OVERRIDE is forbidden to use value TRACK\": {\n    \"status\": \"FAIL\"\n  },\n  \"header X-HTTP-METHOD is forbidden to use value TRACK\": {\n    \"status\": \"FAIL\"\n  },\n  \"header X-METHOD-OVERRIDE is forbidden to use value TRACK\": {\n    \"status\": \"FAIL\"\n  },\n  \"header x-http-method-override is forbidden to use value CONNECT\": {\n    \"status\": \"FAIL\"\n  },\n  \"header x-http-method is forbidden to use value CONNECT\": {\n    \"status\": \"FAIL\"\n  },\n  \"header x-method-override is forbidden to use value CONNECT\": {\n    \"status\": \"FAIL\"\n  },\n  \"header X-HTTP-METHOD-OVERRIDE is forbidden to use value CONNECT\": {\n    \"status\": \"FAIL\"\n  },\n  \"header X-HTTP-METHOD is forbidden to use value CONNECT\": {\n    \"status\": \"FAIL\"\n  },\n  \"header X-METHOD-OVERRIDE is forbidden to use value CONNECT\": {\n    \"status\": \"FAIL\"\n  },\n  \"header x-http-method-override is forbidden to use value trace\": {\n    \"status\": \"FAIL\"\n  },\n  \"header x-http-method is forbidden to use value trace\": {\n    \"status\": \"FAIL\"\n  },\n  \"header x-method-override is forbidden to use value trace\": {\n    \"status\": \"FAIL\"\n  },\n  \"header X-HTTP-METHOD-OVERRIDE is forbidden to use value trace\": {\n    \"status\": \"FAIL\"\n  },\n  \"header X-HTTP-METHOD is forbidden to use value trace\": {\n    \"status\": \"FAIL\"\n  },\n  \"header X-METHOD-OVERRIDE is forbidden to use value trace\": {\n    \"status\": \"FAIL\"\n  },\n  \"header x-http-method-override is forbidden to use value track\": {\n    \"status\": \"FAIL\"\n  },\n  \"header x-http-method is forbidden to use value track\": {\n    \"status\": \"FAIL\"\n  },\n  \"header x-method-override is forbidden to use value track\": {\n    \"status\": \"FAIL\"\n  },\n  \"header X-HTTP-METHOD-OVERRIDE is forbidden to use value track\": {\n    \"status\": \"FAIL\"\n  },\n  \"header X-HTTP-METHOD is forbidden to use value track\": {\n    \"status\": \"FAIL\"\n  },\n  \"header X-METHOD-OVERRIDE is forbidden to use value track\": {\n    \"status\": \"FAIL\"\n  },\n  \"header x-http-method-override is forbidden to use value connect\": {\n    \"status\": \"FAIL\"\n  },\n  \"header x-http-method is forbidden to use value connect\": {\n    \"status\": \"FAIL\"\n  },\n  \"header x-method-override is forbidden to use value connect\": {\n    \"status\": \"FAIL\"\n  },\n  \"header X-HTTP-METHOD-OVERRIDE is forbidden to use value connect\": {\n    \"status\": \"FAIL\"\n  },\n  \"header X-HTTP-METHOD is forbidden to use value connect\": {\n    \"status\": \"FAIL\"\n  },\n  \"header X-METHOD-OVERRIDE is forbidden to use value connect\": {\n    \"status\": \"FAIL\"\n  },\n  \"header x-http-method-override is forbidden to use value trace,\": {\n    \"status\": \"FAIL\"\n  },\n  \"header x-http-method is forbidden to use value trace,\": {\n    \"status\": \"FAIL\"\n  },\n  \"header x-method-override is forbidden to use value trace,\": {\n    \"status\": \"FAIL\"\n  },\n  \"header X-HTTP-METHOD-OVERRIDE is forbidden to use value trace,\": {\n    \"status\": \"FAIL\"\n  },\n  \"header X-HTTP-METHOD is forbidden to use value trace,\": {\n    \"status\": \"FAIL\"\n  },\n  \"header X-METHOD-OVERRIDE is forbidden to use value trace,\": {\n    \"status\": \"FAIL\"\n  },\n  \"header x-http-method-override is forbidden to use value GET,track \": {\n    \"status\": \"FAIL\"\n  },\n  \"header x-http-method is forbidden to use value GET,track \": {\n    \"status\": \"FAIL\"\n  },\n  \"header x-method-override is forbidden to use value GET,track \": {\n    \"status\": \"FAIL\"\n  },\n  \"header X-HTTP-METHOD-OVERRIDE is forbidden to use value GET,track \": {\n    \"status\": \"FAIL\"\n  },\n  \"header X-HTTP-METHOD is forbidden to use value GET,track \": {\n    \"status\": \"FAIL\"\n  },\n  \"header X-METHOD-OVERRIDE is forbidden to use value GET,track \": {\n    \"status\": \"FAIL\"\n  },\n  \"header x-http-method-override is forbidden to use value  connect\": {\n    \"status\": \"FAIL\"\n  },\n  \"header x-http-method is forbidden to use value  connect\": {\n    \"status\": \"FAIL\"\n  },\n  \"header x-method-override is forbidden to use value  connect\": {\n    \"status\": \"FAIL\"\n  },\n  \"header X-HTTP-METHOD-OVERRIDE is forbidden to use value  connect\": {\n    \"status\": \"FAIL\"\n  },\n  \"header X-HTTP-METHOD is forbidden to use value  connect\": {\n    \"status\": \"FAIL\"\n  },\n  \"header X-METHOD-OVERRIDE is forbidden to use value  connect\": {\n    \"status\": \"FAIL\"\n  },\n  \"header x-http-method-override is allowed to use value GETTRACE\": {\n    \"status\": \"FAIL\"\n  },\n  \"header x-http-method is allowed to use value GETTRACE\": {\n    \"status\": \"FAIL\"\n  },\n  \"header x-method-override is allowed to use value GETTRACE\": {\n    \"status\": \"FAIL\"\n  },\n  \"header X-HTTP-METHOD-OVERRIDE is allowed to use value GETTRACE\": {\n    \"status\": \"FAIL\"\n  },\n  \"header X-HTTP-METHOD is allowed to use value GETTRACE\": {\n    \"status\": \"FAIL\"\n  },\n  \"header X-METHOD-OVERRIDE is allowed to use value GETTRACE\": {\n    \"status\": \"FAIL\"\n  },\n  \"header x-http-method-override is allowed to use value GET\": {\n    \"status\": \"FAIL\"\n  },\n  \"header x-http-method is allowed to use value GET\": {\n    \"status\": \"FAIL\"\n  },\n  \"header x-method-override is allowed to use value GET\": {\n    \"status\": \"FAIL\"\n  },\n  \"header X-HTTP-METHOD-OVERRIDE is allowed to use value GET\": {\n    \"status\": \"FAIL\"\n  },\n  \"header X-HTTP-METHOD is allowed to use value GET\": {\n    \"status\": \"FAIL\"\n  },\n  \"header X-METHOD-OVERRIDE is allowed to use value GET\": {\n    \"status\": \"FAIL\"\n  },\n  \"header x-http-method-override is allowed to use value \\\",TRACE\\\",\": {\n    \"status\": \"FAIL\"\n  },\n  \"header x-http-method is allowed to use value \\\",TRACE\\\",\": {\n    \"status\": \"FAIL\"\n  },\n  \"header x-method-override is allowed to use value \\\",TRACE\\\",\": {\n    \"status\": \"FAIL\"\n  },\n  \"header X-HTTP-METHOD-OVERRIDE is allowed to use value \\\",TRACE\\\",\": {\n    \"status\": \"FAIL\"\n  },\n  \"header X-HTTP-METHOD is allowed to use value \\\",TRACE\\\",\": {\n    \"status\": \"FAIL\"\n  },\n  \"header X-METHOD-OVERRIDE is allowed to use value \\\",TRACE\\\",\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/basic/request-head.any.js.json",
    "content": "{\n  \"Fetch with HEAD with body\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/basic/request-headers-case.any.js.json",
    "content": "{\n  \"Multiple headers with the same name, different case (THIS-is-A-test first)\": {\n    \"status\": \"FAIL\"\n  },\n  \"Multiple headers with the same name, different case (THIS-IS-A-TEST first)\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/basic/request-headers-nonascii.any.js.json",
    "content": "{\n  \"Non-ascii bytes in request headers\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/basic/request-headers.any.js.json",
    "content": "{\n  \"Fetch with GET\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch with HEAD\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch with PUT without body\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch with PUT with body\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch with POST without body\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch with POST with text body\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch with POST with FormData body\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch with POST with URLSearchParams body\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch with POST with Blob body\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch with POST with ArrayBuffer body\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch with POST with Uint8Array body\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch with POST with Int8Array body\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch with POST with Float16Array body\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch with POST with Float32Array body\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch with POST with Float64Array body\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch with POST with DataView body\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch with POST with Blob body with mime type\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch with Chicken\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch with Chicken with body\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch with GET and mode \\\"cors\\\" does not need an Origin header\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch with POST and mode \\\"same-origin\\\" needs an Origin header\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch with POST and mode \\\"no-cors\\\" needs an Origin header\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch with PUT and mode \\\"same-origin\\\" needs an Origin header\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch with TacO and mode \\\"same-origin\\\" needs an Origin header\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch with TacO and mode \\\"cors\\\" needs an Origin header\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/basic/request-referrer.any.js.json",
    "content": "{\n  \"about:client referrer\": {\n    \"status\": \"FAIL\"\n  },\n  \"url referrer\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/basic/request-upload.any.js.json",
    "content": "{\n  \"Fetch with PUT with body\": {\n    \"status\": \"PASS\"\n  },\n  \"Fetch with POST with text body\": {\n    \"status\": \"PASS\"\n  },\n  \"Fetch with POST with URLSearchParams body\": {\n    \"status\": \"PASS\"\n  },\n  \"Fetch with POST with Blob body\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch with POST with ArrayBuffer body\": {\n    \"status\": \"PASS\"\n  },\n  \"Fetch with POST with Uint8Array body\": {\n    \"status\": \"PASS\"\n  },\n  \"Fetch with POST with Int8Array body\": {\n    \"status\": \"PASS\"\n  },\n  \"Fetch with POST with Float16Array body\": {\n    \"status\": \"PASS\"\n  },\n  \"Fetch with POST with Float32Array body\": {\n    \"status\": \"PASS\"\n  },\n  \"Fetch with POST with Float64Array body\": {\n    \"status\": \"PASS\"\n  },\n  \"Fetch with POST with DataView body\": {\n    \"status\": \"PASS\"\n  },\n  \"Fetch with POST with Blob body with mime type\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch with POST with ReadableStream containing String\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch with POST with ReadableStream containing null\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch with POST with ReadableStream containing number\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch with POST with ReadableStream containing ArrayBuffer\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch with POST with ReadableStream containing Blob\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch with POST with text body on 421 response should be retried once on new connection.\": {\n    \"status\": \"FAIL\"\n  },\n  \"Streaming upload shouldn't work on Http/1.1.\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/basic/response-null-body.any.js.json",
    "content": "{\n  \"Response.body is null for responses with status=204 (method=GET)\": {\n    \"status\": \"PASS\"\n  },\n  \"Response.body is null for responses with status=204 (method=POST)\": {\n    \"status\": \"PASS\"\n  },\n  \"Response.body is null for responses with status=204 (method=OPTIONS)\": {\n    \"status\": \"PASS\"\n  },\n  \"Response.body is null for responses with status=205 (method=GET)\": {\n    \"status\": \"PASS\"\n  },\n  \"Response.body is null for responses with status=205 (method=POST)\": {\n    \"status\": \"PASS\"\n  },\n  \"Response.body is null for responses with status=205 (method=OPTIONS)\": {\n    \"status\": \"PASS\"\n  },\n  \"Response.body is null for responses with status=304 (method=GET)\": {\n    \"status\": \"PASS\"\n  },\n  \"Response.body is null for responses with status=304 (method=POST)\": {\n    \"status\": \"PASS\"\n  },\n  \"Response.body is null for responses with status=304 (method=OPTIONS)\": {\n    \"status\": \"PASS\"\n  },\n  \"Response.body is null for responses with method=HEAD\": {\n    \"status\": \"FAIL\"\n  },\n  \"Null body status with subresource integrity should abort\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/basic/response-url.sub.any.js.json",
    "content": "{\n  \"Testing response url getter with http://web-platform.test:8000/ada\": {\n    \"status\": \"PASS\"\n  },\n  \"Testing response url getter with http://web-platform.test:8000/#\": {\n    \"status\": \"FAIL\"\n  },\n  \"Testing response url getter with http://web-platform.test:8000/#ada\": {\n    \"status\": \"FAIL\"\n  },\n  \"Testing response url getter with http://web-platform.test:8000#ada\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/basic/scheme-about.any.js.json",
    "content": "{\n  \"Fetching about:blank with method GET is KO\": {\n    \"status\": \"PASS\"\n  },\n  \"Fetching about:blank with method PUT is KO\": {\n    \"status\": \"PASS\"\n  },\n  \"Fetching about:blank with method POST is KO\": {\n    \"status\": \"PASS\"\n  },\n  \"Fetching about:invalid.com with method GET is KO\": {\n    \"status\": \"PASS\"\n  },\n  \"Fetching about:config with method GET is KO\": {\n    \"status\": \"PASS\"\n  },\n  \"Fetching about:unicorn with method GET is KO\": {\n    \"status\": \"PASS\"\n  },\n  \"Fetching about:blank with range header does not affect behavior\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/basic/scheme-blob.sub.any.js.json",
    "content": "{\n  \"Fetching [GET] URL.createObjectURL(blob) is OK\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetching [GET] blob:http://www.web-platform.test:8000/ is KO\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetching [POST] URL.createObjectURL(blob) is KO\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetching [OPTIONS] URL.createObjectURL(blob) is KO\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetching [HEAD] URL.createObjectURL(blob) is KO\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetching [PUT] URL.createObjectURL(blob) is KO\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetching [DELETE] URL.createObjectURL(blob) is KO\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetching [INVALID] URL.createObjectURL(blob) is KO\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetching [GET] blob:not-backed-by-a-blob/ is KO\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetching URL.createObjectURL(empty_blob) is OK\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetching URL.createObjectURL(empty_type_blob) is OK\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetching URL.createObjectURL(empty_data_blob) is OK\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetching URL.createObjectURL(invalid_type_blob) is OK\": {\n    \"status\": \"FAIL\"\n  },\n  \"Blob content is not sniffed for a content type [image/png]\": {\n    \"status\": \"FAIL\"\n  },\n  \"Blob content is not sniffed for a content type [text/xml]\": {\n    \"status\": \"FAIL\"\n  },\n  \"Set content type to the empty string for slice with invalid content type\": {\n    \"status\": \"FAIL\"\n  },\n  \"Set content type to the empty string for slice with no content type \": {\n    \"status\": \"FAIL\"\n  },\n  \"Blob.slice should not sniff the content for a content type\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/basic/scheme-data.any.js.json",
    "content": "{\n  \"Fetching data:,response%27s%20body is OK\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetching data:,response%27s%20body is OK (same-origin)\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetching data:,response%27s%20body is OK (cors)\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetching data:text/plain;base64,cmVzcG9uc2UncyBib[...] is OK\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetching data:image/png;base64,cmVzcG9uc2UncyBib2[...] is OK\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetching [POST] data:,response%27s%20body is OK\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetching [HEAD] data:,response%27s%20body is OK\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetching [GET] data:notAdataUrl.com is KO\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/basic/scheme-others.sub.any.js.json",
    "content": "{\n  \"Fetching aaa://web-platform.test:8000/ is KO\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetching cap://web-platform.test:8000/ is KO\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetching cid://web-platform.test:8000/ is KO\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetching dav://web-platform.test:8000/ is KO\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetching dict://web-platform.test:8000/ is KO\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetching dns://web-platform.test:8000/ is KO\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetching geo://web-platform.test:8000/ is KO\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetching im://web-platform.test:8000/ is KO\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetching imap://web-platform.test:8000/ is KO\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetching ipp://web-platform.test:8000/ is KO\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetching ldap://web-platform.test:8000/ is KO\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetching mailto://web-platform.test:8000/ is KO\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetching nfs://web-platform.test:8000/ is KO\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetching pop://web-platform.test:8000/ is KO\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetching rtsp://web-platform.test:8000/ is KO\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetching snmp://web-platform.test:8000/ is KO\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/basic/status.h2.any.js.json",
    "content": "{\n  \"statusText over H2 for status 200 should be the empty string\": {\n    \"status\": \"FAIL\"\n  },\n  \"statusText over H2 for status 210 should be the empty string\": {\n    \"status\": \"PASS\"\n  },\n  \"statusText over H2 for status 400 should be the empty string\": {\n    \"status\": \"FAIL\"\n  },\n  \"statusText over H2 for status 404 should be the empty string\": {\n    \"status\": \"FAIL\"\n  },\n  \"statusText over H2 for status 410 should be the empty string\": {\n    \"status\": \"FAIL\"\n  },\n  \"statusText over H2 for status 500 should be the empty string\": {\n    \"status\": \"FAIL\"\n  },\n  \"statusText over H2 for status 502 should be the empty string\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/basic/stream-response.any.js.json",
    "content": "{\n  \"Stream response's body when content-type is present\": {\n    \"status\": \"PASS\"\n  },\n  \"Stream response's body when content-type is not present\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/basic/stream-safe-creation.any.js.json",
    "content": "{\n  \"throwing Object.prototype.start accessor should not affect stream creation by 'fetch'\": {\n    \"status\": \"PASS\"\n  },\n  \"Object.prototype.start accessor returning invalid value should not affect stream creation by 'fetch'\": {\n    \"status\": \"PASS\"\n  },\n  \"throwing Object.prototype.type accessor should not affect stream creation by 'fetch'\": {\n    \"status\": \"PASS\"\n  },\n  \"Object.prototype.type accessor returning invalid value should not affect stream creation by 'fetch'\": {\n    \"status\": \"PASS\"\n  },\n  \"throwing Object.prototype.size accessor should not affect stream creation by 'fetch'\": {\n    \"status\": \"PASS\"\n  },\n  \"Object.prototype.size accessor returning invalid value should not affect stream creation by 'fetch'\": {\n    \"status\": \"PASS\"\n  },\n  \"throwing Object.prototype.highWaterMark accessor should not affect stream creation by 'fetch'\": {\n    \"status\": \"PASS\"\n  },\n  \"Object.prototype.highWaterMark accessor returning invalid value should not affect stream creation by 'fetch'\": {\n    \"status\": \"PASS\"\n  },\n  \"Object.prototype.start function which errors the stream should not affect stream creation by 'fetch'\": {\n    \"status\": \"PASS\"\n  },\n  \"throwing Object.prototype.start accessor should not affect stream creation by 'request'\": {\n    \"status\": \"PASS\"\n  },\n  \"Object.prototype.start accessor returning invalid value should not affect stream creation by 'request'\": {\n    \"status\": \"PASS\"\n  },\n  \"throwing Object.prototype.type accessor should not affect stream creation by 'request'\": {\n    \"status\": \"PASS\"\n  },\n  \"Object.prototype.type accessor returning invalid value should not affect stream creation by 'request'\": {\n    \"status\": \"PASS\"\n  },\n  \"throwing Object.prototype.size accessor should not affect stream creation by 'request'\": {\n    \"status\": \"PASS\"\n  },\n  \"Object.prototype.size accessor returning invalid value should not affect stream creation by 'request'\": {\n    \"status\": \"PASS\"\n  },\n  \"throwing Object.prototype.highWaterMark accessor should not affect stream creation by 'request'\": {\n    \"status\": \"PASS\"\n  },\n  \"Object.prototype.highWaterMark accessor returning invalid value should not affect stream creation by 'request'\": {\n    \"status\": \"PASS\"\n  },\n  \"Object.prototype.start function which errors the stream should not affect stream creation by 'request'\": {\n    \"status\": \"PASS\"\n  },\n  \"throwing Object.prototype.start accessor should not affect stream creation by 'response'\": {\n    \"status\": \"PASS\"\n  },\n  \"Object.prototype.start accessor returning invalid value should not affect stream creation by 'response'\": {\n    \"status\": \"PASS\"\n  },\n  \"throwing Object.prototype.type accessor should not affect stream creation by 'response'\": {\n    \"status\": \"PASS\"\n  },\n  \"Object.prototype.type accessor returning invalid value should not affect stream creation by 'response'\": {\n    \"status\": \"PASS\"\n  },\n  \"throwing Object.prototype.size accessor should not affect stream creation by 'response'\": {\n    \"status\": \"PASS\"\n  },\n  \"Object.prototype.size accessor returning invalid value should not affect stream creation by 'response'\": {\n    \"status\": \"PASS\"\n  },\n  \"throwing Object.prototype.highWaterMark accessor should not affect stream creation by 'response'\": {\n    \"status\": \"PASS\"\n  },\n  \"Object.prototype.highWaterMark accessor returning invalid value should not affect stream creation by 'response'\": {\n    \"status\": \"PASS\"\n  },\n  \"Object.prototype.start function which errors the stream should not affect stream creation by 'response'\": {\n    \"status\": \"PASS\"\n  },\n  \"throwing Object.prototype.start accessor should not affect stream creation by 'consumeEmptyResponse'\": {\n    \"status\": \"PASS\"\n  },\n  \"Object.prototype.start accessor returning invalid value should not affect stream creation by 'consumeEmptyResponse'\": {\n    \"status\": \"PASS\"\n  },\n  \"throwing Object.prototype.type accessor should not affect stream creation by 'consumeEmptyResponse'\": {\n    \"status\": \"PASS\"\n  },\n  \"Object.prototype.type accessor returning invalid value should not affect stream creation by 'consumeEmptyResponse'\": {\n    \"status\": \"PASS\"\n  },\n  \"throwing Object.prototype.size accessor should not affect stream creation by 'consumeEmptyResponse'\": {\n    \"status\": \"PASS\"\n  },\n  \"Object.prototype.size accessor returning invalid value should not affect stream creation by 'consumeEmptyResponse'\": {\n    \"status\": \"PASS\"\n  },\n  \"throwing Object.prototype.highWaterMark accessor should not affect stream creation by 'consumeEmptyResponse'\": {\n    \"status\": \"PASS\"\n  },\n  \"Object.prototype.highWaterMark accessor returning invalid value should not affect stream creation by 'consumeEmptyResponse'\": {\n    \"status\": \"PASS\"\n  },\n  \"Object.prototype.start function which errors the stream should not affect stream creation by 'consumeEmptyResponse'\": {\n    \"status\": \"PASS\"\n  },\n  \"throwing Object.prototype.start accessor should not affect stream creation by 'consumeNonEmptyResponse'\": {\n    \"status\": \"PASS\"\n  },\n  \"Object.prototype.start accessor returning invalid value should not affect stream creation by 'consumeNonEmptyResponse'\": {\n    \"status\": \"PASS\"\n  },\n  \"throwing Object.prototype.type accessor should not affect stream creation by 'consumeNonEmptyResponse'\": {\n    \"status\": \"PASS\"\n  },\n  \"Object.prototype.type accessor returning invalid value should not affect stream creation by 'consumeNonEmptyResponse'\": {\n    \"status\": \"PASS\"\n  },\n  \"throwing Object.prototype.size accessor should not affect stream creation by 'consumeNonEmptyResponse'\": {\n    \"status\": \"PASS\"\n  },\n  \"Object.prototype.size accessor returning invalid value should not affect stream creation by 'consumeNonEmptyResponse'\": {\n    \"status\": \"PASS\"\n  },\n  \"throwing Object.prototype.highWaterMark accessor should not affect stream creation by 'consumeNonEmptyResponse'\": {\n    \"status\": \"PASS\"\n  },\n  \"Object.prototype.highWaterMark accessor returning invalid value should not affect stream creation by 'consumeNonEmptyResponse'\": {\n    \"status\": \"PASS\"\n  },\n  \"Object.prototype.start function which errors the stream should not affect stream creation by 'consumeNonEmptyResponse'\": {\n    \"status\": \"PASS\"\n  },\n  \"throwing Object.prototype.start accessor should not affect stream creation by 'consumeEmptyRequest'\": {\n    \"status\": \"PASS\"\n  },\n  \"Object.prototype.start accessor returning invalid value should not affect stream creation by 'consumeEmptyRequest'\": {\n    \"status\": \"PASS\"\n  },\n  \"throwing Object.prototype.type accessor should not affect stream creation by 'consumeEmptyRequest'\": {\n    \"status\": \"PASS\"\n  },\n  \"Object.prototype.type accessor returning invalid value should not affect stream creation by 'consumeEmptyRequest'\": {\n    \"status\": \"PASS\"\n  },\n  \"throwing Object.prototype.size accessor should not affect stream creation by 'consumeEmptyRequest'\": {\n    \"status\": \"PASS\"\n  },\n  \"Object.prototype.size accessor returning invalid value should not affect stream creation by 'consumeEmptyRequest'\": {\n    \"status\": \"PASS\"\n  },\n  \"throwing Object.prototype.highWaterMark accessor should not affect stream creation by 'consumeEmptyRequest'\": {\n    \"status\": \"PASS\"\n  },\n  \"Object.prototype.highWaterMark accessor returning invalid value should not affect stream creation by 'consumeEmptyRequest'\": {\n    \"status\": \"PASS\"\n  },\n  \"Object.prototype.start function which errors the stream should not affect stream creation by 'consumeEmptyRequest'\": {\n    \"status\": \"PASS\"\n  },\n  \"throwing Object.prototype.start accessor should not affect stream creation by 'consumeNonEmptyRequest'\": {\n    \"status\": \"PASS\"\n  },\n  \"Object.prototype.start accessor returning invalid value should not affect stream creation by 'consumeNonEmptyRequest'\": {\n    \"status\": \"PASS\"\n  },\n  \"throwing Object.prototype.type accessor should not affect stream creation by 'consumeNonEmptyRequest'\": {\n    \"status\": \"PASS\"\n  },\n  \"Object.prototype.type accessor returning invalid value should not affect stream creation by 'consumeNonEmptyRequest'\": {\n    \"status\": \"PASS\"\n  },\n  \"throwing Object.prototype.size accessor should not affect stream creation by 'consumeNonEmptyRequest'\": {\n    \"status\": \"PASS\"\n  },\n  \"Object.prototype.size accessor returning invalid value should not affect stream creation by 'consumeNonEmptyRequest'\": {\n    \"status\": \"PASS\"\n  },\n  \"throwing Object.prototype.highWaterMark accessor should not affect stream creation by 'consumeNonEmptyRequest'\": {\n    \"status\": \"PASS\"\n  },\n  \"Object.prototype.highWaterMark accessor returning invalid value should not affect stream creation by 'consumeNonEmptyRequest'\": {\n    \"status\": \"PASS\"\n  },\n  \"Object.prototype.start function which errors the stream should not affect stream creation by 'consumeNonEmptyRequest'\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/basic/text-utf8.any.js.json",
    "content": "{\n  \"UTF-8 with BOM with Request.text()\": {\n    \"status\": \"FAIL\"\n  },\n  \"UTF-8 with BOM with Response.text()\": {\n    \"status\": \"FAIL\"\n  },\n  \"UTF-8 with BOM with fetched data (UTF-8 charset)\": {\n    \"status\": \"FAIL\"\n  },\n  \"UTF-8 with BOM with fetched data (UTF-16 charset)\": {\n    \"status\": \"FAIL\"\n  },\n  \"UTF-8 with BOM (Response object)\": {\n    \"status\": \"PASS\"\n  },\n  \"UTF-8 with BOM (Request object)\": {\n    \"status\": \"PASS\"\n  },\n  \"UTF-8 without BOM with Request.text()\": {\n    \"status\": \"PASS\"\n  },\n  \"UTF-8 without BOM with Response.text()\": {\n    \"status\": \"PASS\"\n  },\n  \"UTF-8 without BOM with fetched data (UTF-8 charset)\": {\n    \"status\": \"PASS\"\n  },\n  \"UTF-8 without BOM with fetched data (UTF-16 charset)\": {\n    \"status\": \"PASS\"\n  },\n  \"UTF-8 without BOM (Response object)\": {\n    \"status\": \"PASS\"\n  },\n  \"UTF-8 without BOM (Request object)\": {\n    \"status\": \"PASS\"\n  },\n  \"UTF-16BE with BOM decoded as UTF-8 with Request.text()\": {\n    \"status\": \"FAIL\"\n  },\n  \"UTF-16BE with BOM decoded as UTF-8 with Response.text()\": {\n    \"status\": \"FAIL\"\n  },\n  \"UTF-16BE with BOM decoded as UTF-8 with fetched data (UTF-8 charset)\": {\n    \"status\": \"FAIL\"\n  },\n  \"UTF-16BE with BOM decoded as UTF-8 with fetched data (UTF-16 charset)\": {\n    \"status\": \"FAIL\"\n  },\n  \"UTF-16BE with BOM decoded as UTF-8 (Response object)\": {\n    \"status\": \"PASS\"\n  },\n  \"UTF-16BE with BOM decoded as UTF-8 (Request object)\": {\n    \"status\": \"PASS\"\n  },\n  \"UTF-16LE with BOM decoded as UTF-8 with Request.text()\": {\n    \"status\": \"FAIL\"\n  },\n  \"UTF-16LE with BOM decoded as UTF-8 with Response.text()\": {\n    \"status\": \"FAIL\"\n  },\n  \"UTF-16LE with BOM decoded as UTF-8 with fetched data (UTF-8 charset)\": {\n    \"status\": \"FAIL\"\n  },\n  \"UTF-16LE with BOM decoded as UTF-8 with fetched data (UTF-16 charset)\": {\n    \"status\": \"FAIL\"\n  },\n  \"UTF-16LE with BOM decoded as UTF-8 (Response object)\": {\n    \"status\": \"PASS\"\n  },\n  \"UTF-16LE with BOM decoded as UTF-8 (Request object)\": {\n    \"status\": \"PASS\"\n  },\n  \"UTF-16 without BOM decoded as UTF-8 with Request.text()\": {\n    \"status\": \"FAIL\"\n  },\n  \"UTF-16 without BOM decoded as UTF-8 with Response.text()\": {\n    \"status\": \"FAIL\"\n  },\n  \"UTF-16 without BOM decoded as UTF-8 with fetched data (UTF-8 charset)\": {\n    \"status\": \"FAIL\"\n  },\n  \"UTF-16 without BOM decoded as UTF-8 with fetched data (UTF-16 charset)\": {\n    \"status\": \"FAIL\"\n  },\n  \"UTF-16 without BOM decoded as UTF-8 (Response object)\": {\n    \"status\": \"PASS\"\n  },\n  \"UTF-16 without BOM decoded as UTF-8 (Request object)\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/body/cloned-any.js.json",
    "content": "{\n  \"FormData is cloned\": {\n    \"status\": \"FAIL\"\n  },\n  \"URLSearchParams is cloned\": {\n    \"status\": \"PASS\"\n  },\n  \"TypedArray is cloned\": {\n    \"status\": \"PASS\"\n  },\n  \"ArrayBuffer is cloned\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob is cloned\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/body/formdata.any.js.json",
    "content": "{\n  \"Consume empty response.formData() as FormData\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume empty request.formData() as FormData\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume multipart/form-data headers case-insensitively\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/headers/header-setcookie.any.js.json",
    "content": "{\n  \"Headers.prototype.get combines set-cookie headers in order\": {\n    \"status\": \"PASS\"\n  },\n  \"Headers iterator does not combine set-cookie headers\": {\n    \"status\": \"PASS\"\n  },\n  \"Headers iterator does not special case set-cookie2 headers\": {\n    \"status\": \"PASS\"\n  },\n  \"Headers iterator does not combine set-cookie & set-cookie2 headers\": {\n    \"status\": \"PASS\"\n  },\n  \"Headers iterator preserves set-cookie ordering\": {\n    \"status\": \"PASS\"\n  },\n  \"Headers iterator preserves per header ordering, but sorts keys alphabetically\": {\n    \"status\": \"PASS\"\n  },\n  \"Headers iterator preserves per header ordering, but sorts keys alphabetically (and ignores value ordering)\": {\n    \"status\": \"PASS\"\n  },\n  \"Headers iterator is correctly updated with set-cookie changes\": {\n    \"status\": \"PASS\"\n  },\n  \"Headers iterator is correctly updated with set-cookie changes #2\": {\n    \"status\": \"PASS\"\n  },\n  \"Headers.prototype.has works for set-cookie\": {\n    \"status\": \"PASS\"\n  },\n  \"Headers.prototype.append works for set-cookie\": {\n    \"status\": \"PASS\"\n  },\n  \"Headers.prototype.set works for set-cookie\": {\n    \"status\": \"PASS\"\n  },\n  \"Headers.prototype.delete works for set-cookie\": {\n    \"status\": \"PASS\"\n  },\n  \"Headers.prototype.getSetCookie with no headers present\": {\n    \"status\": \"PASS\"\n  },\n  \"Headers.prototype.getSetCookie with one header\": {\n    \"status\": \"PASS\"\n  },\n  \"Headers.prototype.getSetCookie with one header created from an object\": {\n    \"status\": \"PASS\"\n  },\n  \"Headers.prototype.getSetCookie with multiple headers\": {\n    \"status\": \"PASS\"\n  },\n  \"Headers.prototype.getSetCookie with an empty header\": {\n    \"status\": \"PASS\"\n  },\n  \"Headers.prototype.getSetCookie with two equal headers\": {\n    \"status\": \"PASS\"\n  },\n  \"Headers.prototype.getSetCookie ignores set-cookie2 headers\": {\n    \"status\": \"PASS\"\n  },\n  \"Headers.prototype.getSetCookie preserves header ordering\": {\n    \"status\": \"PASS\"\n  },\n  \"Adding Set-Cookie headers normalizes their value\": {\n    \"status\": \"PASS\"\n  },\n  \"Adding invalid Set-Cookie headers throws\": {\n    \"status\": \"PASS\"\n  },\n  \"Set-Cookie is a forbidden response header\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/headers/header-values-normalize.any.js.json",
    "content": "{\n  \"fetch() with value %00\": {\n    \"status\": \"PASS\"\n  },\n  \"fetch() with value %01\": {\n    \"status\": \"FAIL\"\n  },\n  \"fetch() with value %02\": {\n    \"status\": \"FAIL\"\n  },\n  \"fetch() with value %03\": {\n    \"status\": \"FAIL\"\n  },\n  \"fetch() with value %04\": {\n    \"status\": \"FAIL\"\n  },\n  \"fetch() with value %05\": {\n    \"status\": \"FAIL\"\n  },\n  \"fetch() with value %06\": {\n    \"status\": \"FAIL\"\n  },\n  \"fetch() with value %07\": {\n    \"status\": \"FAIL\"\n  },\n  \"fetch() with value %08\": {\n    \"status\": \"FAIL\"\n  },\n  \"fetch() with value %09\": {\n    \"status\": \"PASS\"\n  },\n  \"fetch() with value %0A\": {\n    \"status\": \"PASS\"\n  },\n  \"fetch() with value %0D\": {\n    \"status\": \"PASS\"\n  },\n  \"fetch() with value %0E\": {\n    \"status\": \"FAIL\"\n  },\n  \"fetch() with value %0F\": {\n    \"status\": \"FAIL\"\n  },\n  \"fetch() with value %10\": {\n    \"status\": \"FAIL\"\n  },\n  \"fetch() with value %11\": {\n    \"status\": \"FAIL\"\n  },\n  \"fetch() with value %12\": {\n    \"status\": \"FAIL\"\n  },\n  \"fetch() with value %13\": {\n    \"status\": \"FAIL\"\n  },\n  \"fetch() with value %14\": {\n    \"status\": \"FAIL\"\n  },\n  \"fetch() with value %15\": {\n    \"status\": \"FAIL\"\n  },\n  \"fetch() with value %16\": {\n    \"status\": \"FAIL\"\n  },\n  \"fetch() with value %17\": {\n    \"status\": \"FAIL\"\n  },\n  \"fetch() with value %18\": {\n    \"status\": \"FAIL\"\n  },\n  \"fetch() with value %19\": {\n    \"status\": \"FAIL\"\n  },\n  \"fetch() with value %1A\": {\n    \"status\": \"FAIL\"\n  },\n  \"fetch() with value %1B\": {\n    \"status\": \"FAIL\"\n  },\n  \"fetch() with value %1C\": {\n    \"status\": \"FAIL\"\n  },\n  \"fetch() with value %1D\": {\n    \"status\": \"FAIL\"\n  },\n  \"fetch() with value %1E\": {\n    \"status\": \"FAIL\"\n  },\n  \"fetch() with value %1F\": {\n    \"status\": \"FAIL\"\n  },\n  \"fetch() with value %20\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/headers/header-values.any.js.json",
    "content": "{\n  \"fetch() with value x%00x needs to throw\": {\n    \"status\": \"PASS\"\n  },\n  \"fetch() with value x%0Ax needs to throw\": {\n    \"status\": \"PASS\"\n  },\n  \"fetch() with value x%0Dx needs to throw\": {\n    \"status\": \"PASS\"\n  },\n  \"fetch() with all valid values\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/headers/headers-basic.any.js.json",
    "content": "{\n  \"Create headers from no parameter\": {\n    \"status\": \"PASS\"\n  },\n  \"Create headers from undefined parameter\": {\n    \"status\": \"PASS\"\n  },\n  \"Create headers from empty object\": {\n    \"status\": \"PASS\"\n  },\n  \"Create headers with null should throw\": {\n    \"status\": \"PASS\"\n  },\n  \"Create headers with 1 should throw\": {\n    \"status\": \"PASS\"\n  },\n  \"Create headers with sequence\": {\n    \"status\": \"PASS\"\n  },\n  \"Create headers with record\": {\n    \"status\": \"PASS\"\n  },\n  \"Create headers with existing headers\": {\n    \"status\": \"PASS\"\n  },\n  \"Create headers with existing headers with custom iterator\": {\n    \"status\": \"PASS\"\n  },\n  \"Check append method\": {\n    \"status\": \"PASS\"\n  },\n  \"Check set method\": {\n    \"status\": \"PASS\"\n  },\n  \"Check has method\": {\n    \"status\": \"PASS\"\n  },\n  \"Check delete method\": {\n    \"status\": \"PASS\"\n  },\n  \"Check get method\": {\n    \"status\": \"PASS\"\n  },\n  \"Check keys method\": {\n    \"status\": \"PASS\"\n  },\n  \"Check values method\": {\n    \"status\": \"PASS\"\n  },\n  \"Check entries method\": {\n    \"status\": \"PASS\"\n  },\n  \"Check Symbol.iterator method\": {\n    \"status\": \"PASS\"\n  },\n  \"Check forEach method\": {\n    \"status\": \"PASS\"\n  },\n  \"Iteration skips elements removed while iterating\": {\n    \"status\": \"PASS\"\n  },\n  \"Removing elements already iterated over causes an element to be skipped during iteration\": {\n    \"status\": \"PASS\"\n  },\n  \"Appending a value pair during iteration causes it to be reached during iteration\": {\n    \"status\": \"PASS\"\n  },\n  \"Prepending a value pair before the current element position causes it to be skipped during iteration and adds the current element a second time\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/headers/headers-casing.any.js.json",
    "content": "{\n  \"Create headers, names use characters with different case\": {\n    \"status\": \"PASS\"\n  },\n  \"Check append method, names use characters with different case\": {\n    \"status\": \"PASS\"\n  },\n  \"Check set method, names use characters with different case\": {\n    \"status\": \"PASS\"\n  },\n  \"Check delete method, names use characters with different case\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/headers/headers-combine.any.js.json",
    "content": "{\n  \"Create headers using same name for different values\": {\n    \"status\": \"PASS\"\n  },\n  \"Check delete and has methods when using same name for different values\": {\n    \"status\": \"PASS\"\n  },\n  \"Check set methods when called with already used name\": {\n    \"status\": \"PASS\"\n  },\n  \"Check append methods when called with already used name\": {\n    \"status\": \"PASS\"\n  },\n  \"Iterate combined values\": {\n    \"status\": \"PASS\"\n  },\n  \"Iterate combined values in sorted order\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/headers/headers-errors.any.js.json",
    "content": "{\n  \"Create headers giving an array having one string as init argument\": {\n    \"status\": \"PASS\"\n  },\n  \"Create headers giving an array having three strings as init argument\": {\n    \"status\": \"PASS\"\n  },\n  \"Create headers giving bad header name as init argument\": {\n    \"status\": \"PASS\"\n  },\n  \"Create headers giving bad header value as init argument\": {\n    \"status\": \"PASS\"\n  },\n  \"Check headers get with an invalid name invalidĀ\": {\n    \"status\": \"PASS\"\n  },\n  \"Check headers get with an invalid name [object Object]\": {\n    \"status\": \"PASS\"\n  },\n  \"Check headers delete with an invalid name invalidĀ\": {\n    \"status\": \"PASS\"\n  },\n  \"Check headers delete with an invalid name [object Object]\": {\n    \"status\": \"PASS\"\n  },\n  \"Check headers has with an invalid name invalidĀ\": {\n    \"status\": \"PASS\"\n  },\n  \"Check headers has with an invalid name [object Object]\": {\n    \"status\": \"PASS\"\n  },\n  \"Check headers set with an invalid name invalidĀ\": {\n    \"status\": \"PASS\"\n  },\n  \"Check headers set with an invalid name [object Object]\": {\n    \"status\": \"PASS\"\n  },\n  \"Check headers set with an invalid value invalidĀ\": {\n    \"status\": \"PASS\"\n  },\n  \"Check headers append with an invalid name invalidĀ\": {\n    \"status\": \"PASS\"\n  },\n  \"Check headers append with an invalid name [object Object]\": {\n    \"status\": \"PASS\"\n  },\n  \"Check headers append with an invalid value invalidĀ\": {\n    \"status\": \"PASS\"\n  },\n  \"Headers forEach throws if argument is not callable\": {\n    \"status\": \"PASS\"\n  },\n  \"Headers forEach loop should stop if callback is throwing exception\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/headers/headers-no-cors.any.js.json",
    "content": "{\n  \"Loading data…\": {\n    \"status\": \"PASS\"\n  },\n  \"\\\"no-cors\\\" Headers object cannot have accept set to sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss, , sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"no-cors\\\" Headers object cannot have accept-language set to sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss, , sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"no-cors\\\" Headers object cannot have content-language set to sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss, , sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"no-cors\\\" Headers object cannot have accept set to , sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"no-cors\\\" Headers object cannot have accept-language set to , sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"no-cors\\\" Headers object cannot have content-language set to , sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"no-cors\\\" Headers object cannot have content-type set to text/plain;ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss, text/plain\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"no-cors\\\" Headers object cannot have accept/\\\" as header\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"no-cors\\\" Headers object cannot have accept/012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678 as header\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"no-cors\\\" Headers object cannot have accept-language/\\u0001 as header\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"no-cors\\\" Headers object cannot have accept-language/@ as header\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"no-cors\\\" Headers object cannot have authorization/basics as header\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"no-cors\\\" Headers object cannot have content-language/\\u0001 as header\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"no-cors\\\" Headers object cannot have content-language/@ as header\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"no-cors\\\" Headers object cannot have content-type/text/html as header\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"no-cors\\\" Headers object cannot have content-type/text/plain; long=0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901 as header\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"no-cors\\\" Headers object cannot have range/bytes 0- as header\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"no-cors\\\" Headers object cannot have test/hi as header\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"no-cors\\\" Headers object cannot have dpr/2 as header\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"no-cors\\\" Headers object cannot have rtt/1.0 as header\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"no-cors\\\" Headers object cannot have downlink/-1.0 as header\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"no-cors\\\" Headers object cannot have ect/6g as header\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"no-cors\\\" Headers object cannot have save-data/on as header\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"no-cors\\\" Headers object cannot have viewport-width/100 as header\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"no-cors\\\" Headers object cannot have width/100 as header\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"no-cors\\\" Headers object cannot have unknown/doesitmatter as header\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/headers/headers-normalize.any.js.json",
    "content": "{\n  \"Create headers with not normalized values\": {\n    \"status\": \"PASS\"\n  },\n  \"Check append method with not normalized values\": {\n    \"status\": \"PASS\"\n  },\n  \"Check set method with not normalized values\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/headers/headers-record.any.js.json",
    "content": "{\n  \"Passing nothing to Headers constructor\": {\n    \"status\": \"PASS\"\n  },\n  \"Passing undefined to Headers constructor\": {\n    \"status\": \"PASS\"\n  },\n  \"Passing null to Headers constructor\": {\n    \"status\": \"PASS\"\n  },\n  \"Basic operation with one property\": {\n    \"status\": \"PASS\"\n  },\n  \"Basic operation with one property and a proto\": {\n    \"status\": \"PASS\"\n  },\n  \"Correct operation ordering with two properties\": {\n    \"status\": \"PASS\"\n  },\n  \"Correct operation ordering with two properties one of which has an invalid name\": {\n    \"status\": \"PASS\"\n  },\n  \"Correct operation ordering with two properties one of which has an invalid value\": {\n    \"status\": \"PASS\"\n  },\n  \"Correct operation ordering with non-enumerable properties\": {\n    \"status\": \"PASS\"\n  },\n  \"Correct operation ordering with undefined descriptors\": {\n    \"status\": \"PASS\"\n  },\n  \"Correct operation ordering with repeated keys\": {\n    \"status\": \"PASS\"\n  },\n  \"Basic operation with Symbol keys\": {\n    \"status\": \"PASS\"\n  },\n  \"Operation with non-enumerable Symbol keys\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/headers/headers-structure.any.js.json",
    "content": "{\n  \"Headers has append method\": {\n    \"status\": \"PASS\"\n  },\n  \"Headers has delete method\": {\n    \"status\": \"PASS\"\n  },\n  \"Headers has get method\": {\n    \"status\": \"PASS\"\n  },\n  \"Headers has has method\": {\n    \"status\": \"PASS\"\n  },\n  \"Headers has set method\": {\n    \"status\": \"PASS\"\n  },\n  \"Headers has entries method\": {\n    \"status\": \"PASS\"\n  },\n  \"Headers has keys method\": {\n    \"status\": \"PASS\"\n  },\n  \"Headers has values method\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/redirect/redirect-back-to-original-origin.any.js.json",
    "content": "{\n  \"original => remote => original with mode: \\\"no-cors\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"original => remote => original with mode: \\\"cors\\\"\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/redirect/redirect-count.any.js.json",
    "content": "{\n  \"Redirect 301 20 times\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 301 21 times\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 302 20 times\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 302 21 times\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 303 20 times\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 303 21 times\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 307 20 times\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 307 21 times\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 308 20 times\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 308 21 times\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/redirect/redirect-empty-location.any.js.json",
    "content": "{\n  \"redirect response with empty Location, follow mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"redirect response with empty Location, manual mode\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/redirect/redirect-keepalive.any.js.json",
    "content": "{\n  \"[keepalive][new window][unload] same-origin redirect; setting up\": {\n    \"status\": \"FAIL\"\n  },\n  \"[keepalive][new window][unload] same-origin redirect + preflight; setting up\": {\n    \"status\": \"FAIL\"\n  },\n  \"[keepalive][new window][unload] cross-origin redirect; setting up\": {\n    \"status\": \"FAIL\"\n  },\n  \"[keepalive][new window][unload] cross-origin redirect + preflight; setting up\": {\n    \"status\": \"FAIL\"\n  },\n  \"[keepalive][new window][unload] redirect to file URL; setting up\": {\n    \"status\": \"FAIL\"\n  },\n  \"[keepalive][new window][unload] redirect to data URL; setting up\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/redirect/redirect-keepalive.https.any.js.json",
    "content": "{\n  \"[keepalive][iframe][load] mixed content redirect; setting up\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/redirect/redirect-location-escape.tentative.any.js.json",
    "content": "{\n  \"Redirect to escaped UTF-8\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect to unescaped UTF-8\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect to escaped and unescaped UTF-8\": {\n    \"status\": \"FAIL\"\n  },\n  \"Escaping produces double-percent\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect to invalid UTF-8\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/redirect/redirect-location.any.js.json",
    "content": "{\n  \"Redirect 301 in \\\"follow\\\" mode without location\": {\n    \"status\": \"PASS\"\n  },\n  \"Redirect 301 in \\\"manual\\\" mode without location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 301 in \\\"follow\\\" mode with valid location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 301 in \\\"manual\\\" mode with valid location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 301 in \\\"error\\\" mode with valid location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 301 in \\\"follow\\\" mode with invalid location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 301 in \\\"manual\\\" mode with invalid location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 301 in \\\"error\\\" mode with invalid location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 301 in \\\"follow\\\" mode with data location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 301 in \\\"manual\\\" mode with data location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 301 in \\\"error\\\" mode with data location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 302 in \\\"follow\\\" mode without location\": {\n    \"status\": \"PASS\"\n  },\n  \"Redirect 302 in \\\"manual\\\" mode without location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 302 in \\\"follow\\\" mode with valid location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 302 in \\\"manual\\\" mode with valid location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 302 in \\\"error\\\" mode with valid location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 302 in \\\"follow\\\" mode with invalid location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 302 in \\\"manual\\\" mode with invalid location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 302 in \\\"error\\\" mode with invalid location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 302 in \\\"follow\\\" mode with data location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 302 in \\\"manual\\\" mode with data location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 302 in \\\"error\\\" mode with data location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 303 in \\\"follow\\\" mode without location\": {\n    \"status\": \"PASS\"\n  },\n  \"Redirect 303 in \\\"manual\\\" mode without location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 303 in \\\"follow\\\" mode with valid location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 303 in \\\"manual\\\" mode with valid location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 303 in \\\"error\\\" mode with valid location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 303 in \\\"follow\\\" mode with invalid location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 303 in \\\"manual\\\" mode with invalid location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 303 in \\\"error\\\" mode with invalid location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 303 in \\\"follow\\\" mode with data location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 303 in \\\"manual\\\" mode with data location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 303 in \\\"error\\\" mode with data location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 307 in \\\"follow\\\" mode without location\": {\n    \"status\": \"PASS\"\n  },\n  \"Redirect 307 in \\\"manual\\\" mode without location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 307 in \\\"follow\\\" mode with valid location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 307 in \\\"manual\\\" mode with valid location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 307 in \\\"error\\\" mode with valid location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 307 in \\\"follow\\\" mode with invalid location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 307 in \\\"manual\\\" mode with invalid location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 307 in \\\"error\\\" mode with invalid location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 307 in \\\"follow\\\" mode with data location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 307 in \\\"manual\\\" mode with data location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 307 in \\\"error\\\" mode with data location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 308 in \\\"follow\\\" mode without location\": {\n    \"status\": \"PASS\"\n  },\n  \"Redirect 308 in \\\"manual\\\" mode without location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 308 in \\\"follow\\\" mode with valid location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 308 in \\\"manual\\\" mode with valid location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 308 in \\\"error\\\" mode with valid location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 308 in \\\"follow\\\" mode with invalid location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 308 in \\\"manual\\\" mode with invalid location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 308 in \\\"error\\\" mode with invalid location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 308 in \\\"follow\\\" mode with data location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 308 in \\\"manual\\\" mode with data location\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 308 in \\\"error\\\" mode with data location\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/redirect/redirect-method.any.js.json",
    "content": "{\n  \"Response.redirected should be false on not-redirected responses\": {\n    \"status\": \"PASS\"\n  },\n  \"Redirect 301 with GET\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 301 with POST\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 301 with HEAD\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 302 with GET\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 302 with POST\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 302 with HEAD\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 303 with GET\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 303 with POST\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 303 with HEAD\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 303 with TESTING\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 307 with GET\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 307 with POST (string body)\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 307 with POST (blob body)\": {\n    \"status\": \"FAIL\"\n  },\n  \"Redirect 307 with HEAD\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/redirect/redirect-mode.any.js.json",
    "content": "{\n  \"same-origin redirect 301 in error redirect and cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"same-origin redirect 301 in error redirect and no-cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"same-origin redirect 301 in manual redirect and cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"same-origin redirect 301 in manual redirect and no-cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"same-origin redirect 301 in follow redirect and cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"same-origin redirect 301 in follow redirect and no-cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"same-origin redirect 302 in error redirect and cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"same-origin redirect 302 in error redirect and no-cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"same-origin redirect 302 in manual redirect and cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"same-origin redirect 302 in manual redirect and no-cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"same-origin redirect 302 in follow redirect and cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"same-origin redirect 302 in follow redirect and no-cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"same-origin redirect 303 in error redirect and cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"same-origin redirect 303 in error redirect and no-cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"same-origin redirect 303 in manual redirect and cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"same-origin redirect 303 in manual redirect and no-cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"same-origin redirect 303 in follow redirect and cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"same-origin redirect 303 in follow redirect and no-cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"same-origin redirect 307 in error redirect and cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"same-origin redirect 307 in error redirect and no-cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"same-origin redirect 307 in manual redirect and cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"same-origin redirect 307 in manual redirect and no-cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"same-origin redirect 307 in follow redirect and cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"same-origin redirect 307 in follow redirect and no-cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"same-origin redirect 308 in error redirect and cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"same-origin redirect 308 in error redirect and no-cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"same-origin redirect 308 in manual redirect and cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"same-origin redirect 308 in manual redirect and no-cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"same-origin redirect 308 in follow redirect and cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"same-origin redirect 308 in follow redirect and no-cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"cross-origin redirect 301 in error redirect and cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"cross-origin redirect 301 in error redirect and no-cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"cross-origin redirect 301 in manual redirect and cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"cross-origin redirect 301 in manual redirect and no-cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"cross-origin redirect 301 in follow redirect and cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"cross-origin redirect 301 in follow redirect and no-cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"cross-origin redirect 302 in error redirect and cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"cross-origin redirect 302 in error redirect and no-cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"cross-origin redirect 302 in manual redirect and cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"cross-origin redirect 302 in manual redirect and no-cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"cross-origin redirect 302 in follow redirect and cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"cross-origin redirect 302 in follow redirect and no-cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"cross-origin redirect 303 in error redirect and cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"cross-origin redirect 303 in error redirect and no-cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"cross-origin redirect 303 in manual redirect and cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"cross-origin redirect 303 in manual redirect and no-cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"cross-origin redirect 303 in follow redirect and cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"cross-origin redirect 303 in follow redirect and no-cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"cross-origin redirect 307 in error redirect and cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"cross-origin redirect 307 in error redirect and no-cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"cross-origin redirect 307 in manual redirect and cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"cross-origin redirect 307 in manual redirect and no-cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"cross-origin redirect 307 in follow redirect and cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"cross-origin redirect 307 in follow redirect and no-cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"cross-origin redirect 308 in error redirect and cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"cross-origin redirect 308 in error redirect and no-cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"cross-origin redirect 308 in manual redirect and cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"cross-origin redirect 308 in manual redirect and no-cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"cross-origin redirect 308 in follow redirect and cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"cross-origin redirect 308 in follow redirect and no-cors mode\": {\n    \"status\": \"FAIL\"\n  },\n  \"manual redirect with a CORS error should be rejected\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/redirect/redirect-origin.any.js.json",
    "content": "{\n  \"[GET] Redirect 301 Same origin to same origin\": {\n    \"status\": \"FAIL\"\n  },\n  \"[GET] Redirect 301 Same origin to other origin\": {\n    \"status\": \"FAIL\"\n  },\n  \"[GET] Redirect 301 Other origin to other origin\": {\n    \"status\": \"FAIL\"\n  },\n  \"[GET] Redirect 301 Other origin to same origin\": {\n    \"status\": \"FAIL\"\n  },\n  \"[POST] Redirect 301 Same origin to same origin\": {\n    \"status\": \"FAIL\"\n  },\n  \"[POST] Redirect 301 Same origin to other origin\": {\n    \"status\": \"FAIL\"\n  },\n  \"[POST] Redirect 301 Other origin to other origin\": {\n    \"status\": \"FAIL\"\n  },\n  \"[POST] Redirect 301 Other origin to same origin\": {\n    \"status\": \"FAIL\"\n  },\n  \"[GET] Redirect 302 Same origin to same origin\": {\n    \"status\": \"FAIL\"\n  },\n  \"[GET] Redirect 302 Same origin to other origin\": {\n    \"status\": \"FAIL\"\n  },\n  \"[GET] Redirect 302 Other origin to other origin\": {\n    \"status\": \"FAIL\"\n  },\n  \"[GET] Redirect 302 Other origin to same origin\": {\n    \"status\": \"FAIL\"\n  },\n  \"[POST] Redirect 302 Same origin to same origin\": {\n    \"status\": \"FAIL\"\n  },\n  \"[POST] Redirect 302 Same origin to other origin\": {\n    \"status\": \"FAIL\"\n  },\n  \"[POST] Redirect 302 Other origin to other origin\": {\n    \"status\": \"FAIL\"\n  },\n  \"[POST] Redirect 302 Other origin to same origin\": {\n    \"status\": \"FAIL\"\n  },\n  \"[GET] Redirect 303 Same origin to same origin\": {\n    \"status\": \"FAIL\"\n  },\n  \"[GET] Redirect 303 Same origin to other origin\": {\n    \"status\": \"FAIL\"\n  },\n  \"[GET] Redirect 303 Other origin to other origin\": {\n    \"status\": \"FAIL\"\n  },\n  \"[GET] Redirect 303 Other origin to same origin\": {\n    \"status\": \"FAIL\"\n  },\n  \"[POST] Redirect 303 Same origin to same origin\": {\n    \"status\": \"FAIL\"\n  },\n  \"[POST] Redirect 303 Same origin to other origin\": {\n    \"status\": \"FAIL\"\n  },\n  \"[POST] Redirect 303 Other origin to other origin\": {\n    \"status\": \"FAIL\"\n  },\n  \"[POST] Redirect 303 Other origin to same origin\": {\n    \"status\": \"FAIL\"\n  },\n  \"[GET] Redirect 307 Same origin to same origin\": {\n    \"status\": \"FAIL\"\n  },\n  \"[GET] Redirect 307 Same origin to other origin\": {\n    \"status\": \"FAIL\"\n  },\n  \"[GET] Redirect 307 Other origin to other origin\": {\n    \"status\": \"FAIL\"\n  },\n  \"[GET] Redirect 307 Other origin to same origin\": {\n    \"status\": \"FAIL\"\n  },\n  \"[POST] Redirect 307 Same origin to same origin\": {\n    \"status\": \"FAIL\"\n  },\n  \"[POST] Redirect 307 Same origin to other origin\": {\n    \"status\": \"FAIL\"\n  },\n  \"[POST] Redirect 307 Other origin to other origin\": {\n    \"status\": \"FAIL\"\n  },\n  \"[POST] Redirect 307 Other origin to same origin\": {\n    \"status\": \"FAIL\"\n  },\n  \"[GET] Redirect 308 Same origin to same origin\": {\n    \"status\": \"FAIL\"\n  },\n  \"[GET] Redirect 308 Same origin to other origin\": {\n    \"status\": \"FAIL\"\n  },\n  \"[GET] Redirect 308 Other origin to other origin\": {\n    \"status\": \"FAIL\"\n  },\n  \"[GET] Redirect 308 Other origin to same origin\": {\n    \"status\": \"FAIL\"\n  },\n  \"[POST] Redirect 308 Same origin to same origin\": {\n    \"status\": \"FAIL\"\n  },\n  \"[POST] Redirect 308 Same origin to other origin\": {\n    \"status\": \"FAIL\"\n  },\n  \"[POST] Redirect 308 Other origin to other origin\": {\n    \"status\": \"FAIL\"\n  },\n  \"[POST] Redirect 308 Other origin to same origin\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/redirect/redirect-referrer-override.any.js.json",
    "content": "{\n  \"Same origin redirection, no-referrer init, no-referrer redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, no-referrer init, no-referrer redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, no-referrer init, no-referrer-when-downgrade redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, no-referrer init, no-referrer-when-downgrade redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, no-referrer init, origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, no-referrer init, origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, no-referrer init, origin-when-cross-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, no-referrer init, origin-when-cross-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, no-referrer init, same-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, no-referrer init, same-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, no-referrer init, strict-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, no-referrer init, strict-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, no-referrer init, strict-origin-when-cross-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, no-referrer init, strict-origin-when-cross-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, no-referrer init, unsafe-url redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, no-referrer init, unsafe-url redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, no-referrer-when-downgrade init, no-referrer redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, no-referrer-when-downgrade init, no-referrer redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, no-referrer-when-downgrade init, no-referrer-when-downgrade redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, no-referrer-when-downgrade init, no-referrer-when-downgrade redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, no-referrer-when-downgrade init, origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, no-referrer-when-downgrade init, origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, no-referrer-when-downgrade init, origin-when-cross-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, no-referrer-when-downgrade init, origin-when-cross-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, no-referrer-when-downgrade init, same-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, no-referrer-when-downgrade init, same-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, no-referrer-when-downgrade init, strict-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, no-referrer-when-downgrade init, strict-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, no-referrer-when-downgrade init, strict-origin-when-cross-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, no-referrer-when-downgrade init, strict-origin-when-cross-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, no-referrer-when-downgrade init, unsafe-url redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, no-referrer-when-downgrade init, unsafe-url redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, origin init, no-referrer redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, origin init, no-referrer redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, origin init, no-referrer-when-downgrade redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, origin init, no-referrer-when-downgrade redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, origin init, origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, origin init, origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, origin init, origin-when-cross-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, origin init, origin-when-cross-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, origin init, same-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, origin init, same-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, origin init, strict-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, origin init, strict-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, origin init, strict-origin-when-cross-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, origin init, strict-origin-when-cross-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, origin init, unsafe-url redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, origin init, unsafe-url redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, origin-when-cross-origin init, no-referrer redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, origin-when-cross-origin init, no-referrer redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, origin-when-cross-origin init, no-referrer-when-downgrade redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, origin-when-cross-origin init, no-referrer-when-downgrade redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, origin-when-cross-origin init, origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, origin-when-cross-origin init, origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, origin-when-cross-origin init, origin-when-cross-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, origin-when-cross-origin init, origin-when-cross-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, origin-when-cross-origin init, same-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, origin-when-cross-origin init, same-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, origin-when-cross-origin init, strict-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, origin-when-cross-origin init, strict-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, origin-when-cross-origin init, strict-origin-when-cross-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, origin-when-cross-origin init, strict-origin-when-cross-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, origin-when-cross-origin init, unsafe-url redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, origin-when-cross-origin init, unsafe-url redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, same-origin init, no-referrer redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, same-origin init, no-referrer redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, same-origin init, no-referrer-when-downgrade redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, same-origin init, no-referrer-when-downgrade redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, same-origin init, origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, same-origin init, origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, same-origin init, origin-when-cross-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, same-origin init, origin-when-cross-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, same-origin init, same-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, same-origin init, same-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, same-origin init, strict-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, same-origin init, strict-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, same-origin init, strict-origin-when-cross-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, same-origin init, strict-origin-when-cross-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, same-origin init, unsafe-url redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, same-origin init, unsafe-url redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, strict-origin init, no-referrer redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, strict-origin init, no-referrer redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, strict-origin init, no-referrer-when-downgrade redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, strict-origin init, no-referrer-when-downgrade redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, strict-origin init, origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, strict-origin init, origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, strict-origin init, origin-when-cross-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, strict-origin init, origin-when-cross-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, strict-origin init, same-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, strict-origin init, same-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, strict-origin init, strict-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, strict-origin init, strict-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, strict-origin init, strict-origin-when-cross-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, strict-origin init, strict-origin-when-cross-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, strict-origin init, unsafe-url redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, strict-origin init, unsafe-url redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, strict-origin-when-cross-origin init, no-referrer redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, strict-origin-when-cross-origin init, no-referrer redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, strict-origin-when-cross-origin init, no-referrer-when-downgrade redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, strict-origin-when-cross-origin init, no-referrer-when-downgrade redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, strict-origin-when-cross-origin init, origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, strict-origin-when-cross-origin init, origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, strict-origin-when-cross-origin init, origin-when-cross-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, strict-origin-when-cross-origin init, origin-when-cross-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, strict-origin-when-cross-origin init, same-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, strict-origin-when-cross-origin init, same-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, strict-origin-when-cross-origin init, strict-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, strict-origin-when-cross-origin init, strict-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, strict-origin-when-cross-origin init, strict-origin-when-cross-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, strict-origin-when-cross-origin init, strict-origin-when-cross-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, strict-origin-when-cross-origin init, unsafe-url redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, strict-origin-when-cross-origin init, unsafe-url redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, unsafe-url init, no-referrer redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, unsafe-url init, no-referrer redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, unsafe-url init, no-referrer-when-downgrade redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, unsafe-url init, no-referrer-when-downgrade redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, unsafe-url init, origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, unsafe-url init, origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, unsafe-url init, origin-when-cross-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, unsafe-url init, origin-when-cross-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, unsafe-url init, same-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, unsafe-url init, same-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, unsafe-url init, strict-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, unsafe-url init, strict-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, unsafe-url init, strict-origin-when-cross-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, unsafe-url init, strict-origin-when-cross-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, unsafe-url init, unsafe-url redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, unsafe-url init, unsafe-url redirect header \": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/redirect/redirect-referrer.any.js.json",
    "content": "{\n  \"Same origin redirection, empty init, unsafe-url redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, empty init, no-referrer-when-downgrade redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, empty init, same-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, empty init, origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, empty init, origin-when-cross-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, empty init, no-referrer redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, empty init, strict-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, empty init, strict-origin-when-cross-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, empty redirect header, unsafe-url init \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, empty redirect header, no-referrer-when-downgrade init \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, empty redirect header, same-origin init \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, empty redirect header, origin init \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, empty redirect header, origin-when-cross-origin init \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, empty redirect header, no-referrer init \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, empty redirect header, strict-origin init \": {\n    \"status\": \"FAIL\"\n  },\n  \"Same origin redirection, empty redirect header, strict-origin-when-cross-origin init \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, empty init, unsafe-url redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, empty init, no-referrer-when-downgrade redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, empty init, same-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, empty init, origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, empty init, origin-when-cross-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, empty init, no-referrer redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, empty init, strict-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, empty init, strict-origin-when-cross-origin redirect header \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, empty redirect header, unsafe-url init \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, empty redirect header, no-referrer-when-downgrade init \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, empty redirect header, same-origin init \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, empty redirect header, origin init \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, empty redirect header, origin-when-cross-origin init \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, empty redirect header, no-referrer init \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, empty redirect header, strict-origin init \": {\n    \"status\": \"FAIL\"\n  },\n  \"Cross origin redirection, empty redirect header, strict-origin-when-cross-origin init \": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/redirect/redirect-schemes.any.js.json",
    "content": "{\n  \"redirect-schemes\": {\n    \"status\": \"FAIL\"\n  },\n  \"redirect-schemes 1\": {\n    \"status\": \"FAIL\"\n  },\n  \"redirect-schemes 2\": {\n    \"status\": \"FAIL\"\n  },\n  \"redirect-schemes 3\": {\n    \"status\": \"FAIL\"\n  },\n  \"redirect-schemes 4\": {\n    \"status\": \"FAIL\"\n  },\n  \"redirect-schemes 5\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/redirect/redirect-to-dataurl.any.js.json",
    "content": "{\n  \"Testing data URL loading after same-origin redirection (cors mode)\": {\n    \"status\": \"FAIL\"\n  },\n  \"Testing data URL loading after same-origin redirection (no-cors mode)\": {\n    \"status\": \"FAIL\"\n  },\n  \"Testing data URL loading after same-origin redirection (same-origin mode)\": {\n    \"status\": \"FAIL\"\n  },\n  \"Testing data URL loading after cross-origin redirection (cors mode)\": {\n    \"status\": \"FAIL\"\n  },\n  \"Testing data URL loading after cross-origin redirection (no-cors mode)\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/redirect/redirect-upload.h2.any.js.json",
    "content": "{\n  \"Fetch upload streaming should be accepted on 303\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch upload streaming should fail on 301\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch upload streaming should fail on 302\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch upload streaming should fail on 307\": {\n    \"status\": \"FAIL\"\n  },\n  \"Fetch upload streaming should fail on 308\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/request/forbidden-method.any.js.json",
    "content": "{\n  \"Request() with a forbidden method CONNECT must throw.\": {\n    \"status\": \"FAIL\"\n  },\n  \"Request() with a forbidden method TRACE must throw.\": {\n    \"status\": \"FAIL\"\n  },\n  \"Request() with a forbidden method TRACK must throw.\": {\n    \"status\": \"FAIL\"\n  },\n  \"Request() with a forbidden method connect must throw.\": {\n    \"status\": \"FAIL\"\n  },\n  \"Request() with a forbidden method trace must throw.\": {\n    \"status\": \"FAIL\"\n  },\n  \"Request() with a forbidden method track must throw.\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/request/request-bad-port.any.js.json",
    "content": "{\n  \"Request on bad port 1 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 7 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 9 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 11 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 13 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 15 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 17 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 19 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 20 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 21 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 22 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 23 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 25 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 37 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 42 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 43 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 53 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 69 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 77 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 79 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 87 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 95 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 101 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 102 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 103 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 104 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 109 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 110 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 111 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 113 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 115 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 117 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 119 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 123 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 135 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 137 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 139 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 143 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 161 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 179 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 389 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 427 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 465 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 512 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 513 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 514 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 515 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 526 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 530 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 531 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 532 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 540 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 548 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 554 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 556 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 563 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 587 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 601 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 636 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 989 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 990 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 993 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 995 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 1719 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 1720 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 1723 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 2049 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 3659 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 4045 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 4190 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 5060 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 5061 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 6000 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 6566 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 6665 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 6666 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 6667 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 6668 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 6669 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 6679 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 6697 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  },\n  \"Request on bad port 10080 should throw TypeError.\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/request/request-cache-default-conditional.any.js.json",
    "content": "{\n  \"RequestCache \\\"default\\\" mode with an If-Modified-Since header (following a request without additional headers) is treated similarly to \\\"no-store\\\" with Etag and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode with an If-Modified-Since header (following a request without additional headers) is treated similarly to \\\"no-store\\\" with Last-Modified and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode with an If-Modified-Since header (following a request without additional headers) is treated similarly to \\\"no-store\\\" with Etag and fresh response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode with an If-Modified-Since header (following a request without additional headers) is treated similarly to \\\"no-store\\\" with Last-Modified and fresh response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode with an If-Modified-Since header is treated similarly to \\\"no-store\\\" with Etag and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode with an If-Modified-Since header is treated similarly to \\\"no-store\\\" with Last-Modified and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode with an If-Modified-Since header is treated similarly to \\\"no-store\\\" with Etag and fresh response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode with an If-Modified-Since header is treated similarly to \\\"no-store\\\" with Last-Modified and fresh response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode with an If-None-Match header (following a request without additional headers) is treated similarly to \\\"no-store\\\" with Etag and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode with an If-None-Match header (following a request without additional headers) is treated similarly to \\\"no-store\\\" with Last-Modified and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode with an If-None-Match header (following a request without additional headers) is treated similarly to \\\"no-store\\\" with Etag and fresh response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode with an If-None-Match header (following a request without additional headers) is treated similarly to \\\"no-store\\\" with Last-Modified and fresh response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode with an If-None-Match header is treated similarly to \\\"no-store\\\" with Etag and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode with an If-None-Match header is treated similarly to \\\"no-store\\\" with Last-Modified and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode with an If-None-Match header is treated similarly to \\\"no-store\\\" with Etag and fresh response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode with an If-None-Match header is treated similarly to \\\"no-store\\\" with Last-Modified and fresh response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode with an If-Unmodified-Since header (following a request without additional headers) is treated similarly to \\\"no-store\\\" with Etag and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode with an If-Unmodified-Since header (following a request without additional headers) is treated similarly to \\\"no-store\\\" with Last-Modified and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode with an If-Unmodified-Since header (following a request without additional headers) is treated similarly to \\\"no-store\\\" with Etag and fresh response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode with an If-Unmodified-Since header (following a request without additional headers) is treated similarly to \\\"no-store\\\" with Last-Modified and fresh response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode with an If-Unmodified-Since header is treated similarly to \\\"no-store\\\" with Etag and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode with an If-Unmodified-Since header is treated similarly to \\\"no-store\\\" with Last-Modified and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode with an If-Unmodified-Since header is treated similarly to \\\"no-store\\\" with Etag and fresh response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode with an If-Unmodified-Since header is treated similarly to \\\"no-store\\\" with Last-Modified and fresh response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode with an If-Match header (following a request without additional headers) is treated similarly to \\\"no-store\\\" with Etag and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode with an If-Match header (following a request without additional headers) is treated similarly to \\\"no-store\\\" with Last-Modified and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode with an If-Match header (following a request without additional headers) is treated similarly to \\\"no-store\\\" with Etag and fresh response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode with an If-Match header (following a request without additional headers) is treated similarly to \\\"no-store\\\" with Last-Modified and fresh response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode with an If-Match header is treated similarly to \\\"no-store\\\" with Etag and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode with an If-Match header is treated similarly to \\\"no-store\\\" with Last-Modified and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode with an If-Match header is treated similarly to \\\"no-store\\\" with Etag and fresh response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode with an If-Match header is treated similarly to \\\"no-store\\\" with Last-Modified and fresh response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode with an If-Range header (following a request without additional headers) is treated similarly to \\\"no-store\\\" with Etag and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode with an If-Range header (following a request without additional headers) is treated similarly to \\\"no-store\\\" with Last-Modified and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode with an If-Range header (following a request without additional headers) is treated similarly to \\\"no-store\\\" with Etag and fresh response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode with an If-Range header (following a request without additional headers) is treated similarly to \\\"no-store\\\" with Last-Modified and fresh response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode with an If-Range header is treated similarly to \\\"no-store\\\" with Etag and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode with an If-Range header is treated similarly to \\\"no-store\\\" with Last-Modified and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode with an If-Range header is treated similarly to \\\"no-store\\\" with Etag and fresh response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode with an If-Range header is treated similarly to \\\"no-store\\\" with Last-Modified and fresh response\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/request/request-cache-default.any.js.json",
    "content": "{\n  \"RequestCache \\\"default\\\" mode checks the cache for previously cached content and goes to the network for stale responses with Etag and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode checks the cache for previously cached content and goes to the network for stale responses with Last-Modified and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"default\\\" mode checks the cache for previously cached content and avoids going to the network if a fresh response exists with Etag and fresh response\": {\n    \"status\": \"FAIL\"\n  },\n  \"RequestCache \\\"default\\\" mode checks the cache for previously cached content and avoids going to the network if a fresh response exists with Last-Modified and fresh response\": {\n    \"status\": \"FAIL\"\n  },\n  \"Responses with the \\\"Cache-Control: no-store\\\" header are not stored in the cache with Etag and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"Responses with the \\\"Cache-Control: no-store\\\" header are not stored in the cache with Last-Modified and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"Responses with the \\\"Cache-Control: no-store\\\" header are not stored in the cache with Etag and fresh response\": {\n    \"status\": \"PASS\"\n  },\n  \"Responses with the \\\"Cache-Control: no-store\\\" header are not stored in the cache with Last-Modified and fresh response\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/request/request-cache-force-cache.any.js.json",
    "content": "{\n  \"RequestCache \\\"force-cache\\\" mode checks the cache for previously cached content and avoid revalidation for stale responses with Etag and stale response\": {\n    \"status\": \"FAIL\"\n  },\n  \"RequestCache \\\"force-cache\\\" mode checks the cache for previously cached content and avoid revalidation for stale responses with Last-Modified and stale response\": {\n    \"status\": \"FAIL\"\n  },\n  \"RequestCache \\\"force-cache\\\" mode checks the cache for previously cached content and avoid revalidation for fresh responses with Etag and fresh response\": {\n    \"status\": \"FAIL\"\n  },\n  \"RequestCache \\\"force-cache\\\" mode checks the cache for previously cached content and avoid revalidation for fresh responses with Last-Modified and fresh response\": {\n    \"status\": \"FAIL\"\n  },\n  \"RequestCache \\\"force-cache\\\" mode checks the cache for previously cached content and goes to the network if a cached response is not found with Etag and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"force-cache\\\" mode checks the cache for previously cached content and goes to the network if a cached response is not found with Last-Modified and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"force-cache\\\" mode checks the cache for previously cached content and goes to the network if a cached response is not found with Etag and fresh response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"force-cache\\\" mode checks the cache for previously cached content and goes to the network if a cached response is not found with Last-Modified and fresh response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"force-cache\\\" mode checks the cache for previously cached content and goes to the network if a cached response would vary with Etag and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"force-cache\\\" mode checks the cache for previously cached content and goes to the network if a cached response would vary with Last-Modified and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"force-cache\\\" mode checks the cache for previously cached content and goes to the network if a cached response would vary with Etag and fresh response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"force-cache\\\" mode checks the cache for previously cached content and goes to the network if a cached response would vary with Last-Modified and fresh response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"force-cache\\\" stores the response in the cache if it goes to the network with Etag and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"force-cache\\\" stores the response in the cache if it goes to the network with Last-Modified and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"force-cache\\\" stores the response in the cache if it goes to the network with Etag and fresh response\": {\n    \"status\": \"FAIL\"\n  },\n  \"RequestCache \\\"force-cache\\\" stores the response in the cache if it goes to the network with Last-Modified and fresh response\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/request/request-cache-no-cache.any.js.json",
    "content": "{\n  \"RequestCache \\\"no-cache\\\" mode revalidates stale responses found in the cache with Etag and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"no-cache\\\" mode revalidates stale responses found in the cache with Last-Modified and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"no-cache\\\" mode revalidates fresh responses found in the cache with Etag and fresh response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"no-cache\\\" mode revalidates fresh responses found in the cache with Last-Modified and fresh response\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/request/request-cache-no-store.any.js.json",
    "content": "{\n  \"RequestCache \\\"no-store\\\" mode does not check the cache for previously cached content and goes to the network regardless with Etag and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"no-store\\\" mode does not check the cache for previously cached content and goes to the network regardless with Last-Modified and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"no-store\\\" mode does not check the cache for previously cached content and goes to the network regardless with Etag and fresh response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"no-store\\\" mode does not check the cache for previously cached content and goes to the network regardless with Last-Modified and fresh response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"no-store\\\" mode does not store the response in the cache with Etag and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"no-store\\\" mode does not store the response in the cache with Last-Modified and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"no-store\\\" mode does not store the response in the cache with Etag and fresh response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"no-store\\\" mode does not store the response in the cache with Last-Modified and fresh response\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/request/request-cache-only-if-cached.any.js.json",
    "content": "{\n  \"RequestCache \\\"only-if-cached\\\" mode checks the cache for previously cached content and avoids revalidation for stale responses with Etag and stale response\": {\n    \"status\": \"FAIL\"\n  },\n  \"RequestCache \\\"only-if-cached\\\" mode checks the cache for previously cached content and avoids revalidation for stale responses with Last-Modified and stale response\": {\n    \"status\": \"FAIL\"\n  },\n  \"RequestCache \\\"only-if-cached\\\" mode checks the cache for previously cached content and avoids revalidation for fresh responses with Etag and fresh response\": {\n    \"status\": \"FAIL\"\n  },\n  \"RequestCache \\\"only-if-cached\\\" mode checks the cache for previously cached content and avoids revalidation for fresh responses with Last-Modified and fresh response\": {\n    \"status\": \"FAIL\"\n  },\n  \"RequestCache \\\"only-if-cached\\\" mode checks the cache for previously cached content and does not go to the network if a cached response is not found with Etag and fresh response\": {\n    \"status\": \"FAIL\"\n  },\n  \"RequestCache \\\"only-if-cached\\\" mode checks the cache for previously cached content and does not go to the network if a cached response is not found with Last-Modified and fresh response\": {\n    \"status\": \"FAIL\"\n  },\n  \"RequestCache \\\"only-if-cached\\\" (with \\\"same-origin\\\") uses cached same-origin redirects to same-origin content with Etag and fresh response\": {\n    \"status\": \"FAIL\"\n  },\n  \"RequestCache \\\"only-if-cached\\\" (with \\\"same-origin\\\") uses cached same-origin redirects to same-origin content with Last-Modified and fresh response\": {\n    \"status\": \"FAIL\"\n  },\n  \"RequestCache \\\"only-if-cached\\\" (with \\\"same-origin\\\") uses cached same-origin redirects to same-origin content with Etag and stale response\": {\n    \"status\": \"FAIL\"\n  },\n  \"RequestCache \\\"only-if-cached\\\" (with \\\"same-origin\\\") uses cached same-origin redirects to same-origin content with Last-Modified and stale response\": {\n    \"status\": \"FAIL\"\n  },\n  \"RequestCache \\\"only-if-cached\\\" (with \\\"same-origin\\\") does not follow redirects across origins and rejects with Etag and fresh response\": {\n    \"status\": \"FAIL\"\n  },\n  \"RequestCache \\\"only-if-cached\\\" (with \\\"same-origin\\\") does not follow redirects across origins and rejects with Last-Modified and fresh response\": {\n    \"status\": \"FAIL\"\n  },\n  \"RequestCache \\\"only-if-cached\\\" (with \\\"same-origin\\\") does not follow redirects across origins and rejects with Etag and stale response\": {\n    \"status\": \"FAIL\"\n  },\n  \"RequestCache \\\"only-if-cached\\\" (with \\\"same-origin\\\") does not follow redirects across origins and rejects with Last-Modified and stale response\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/request/request-cache-reload.any.js.json",
    "content": "{\n  \"RequestCache \\\"reload\\\" mode does not check the cache for previously cached content and goes to the network regardless with Etag and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"reload\\\" mode does not check the cache for previously cached content and goes to the network regardless with Last-Modified and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"reload\\\" mode does not check the cache for previously cached content and goes to the network regardless with Etag and fresh response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"reload\\\" mode does not check the cache for previously cached content and goes to the network regardless with Last-Modified and fresh response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"reload\\\" mode does store the response in the cache with Etag and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"reload\\\" mode does store the response in the cache with Last-Modified and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"reload\\\" mode does store the response in the cache with Etag and fresh response\": {\n    \"status\": \"FAIL\"\n  },\n  \"RequestCache \\\"reload\\\" mode does store the response in the cache with Last-Modified and fresh response\": {\n    \"status\": \"FAIL\"\n  },\n  \"RequestCache \\\"reload\\\" mode does store the response in the cache even if a previous response is already stored with Etag and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"reload\\\" mode does store the response in the cache even if a previous response is already stored with Last-Modified and stale response\": {\n    \"status\": \"PASS\"\n  },\n  \"RequestCache \\\"reload\\\" mode does store the response in the cache even if a previous response is already stored with Etag and fresh response\": {\n    \"status\": \"FAIL\"\n  },\n  \"RequestCache \\\"reload\\\" mode does store the response in the cache even if a previous response is already stored with Last-Modified and fresh response\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/request/request-constructor-init-body-override.any.js.json",
    "content": "{\n  \"Check that the body of a new request can be overridden when created from an existing Request object\": {\n    \"status\": \"PASS\"\n  },\n  \"Check that the body of a new request can be duplicated from an existing Request object\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/request/request-consume-empty.any.js.json",
    "content": "{\n  \"Consume request's body as text\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume request's body as blob\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume request's body as arrayBuffer\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume request's body as json (error case)\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume request's body as formData with correct multipart type (error case)\": {\n    \"status\": \"FAIL\"\n  },\n  \"Consume request's body as formData with correct urlencoded type\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume request's body as formData without correct type (error case)\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume empty blob request body as arrayBuffer\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume empty text request body as arrayBuffer\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume empty blob request body as text\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume empty text request body as text\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume empty URLSearchParams request body as text\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume empty FormData request body as text\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume empty ArrayBuffer request body as text\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/request/request-consume.any.js.json",
    "content": "{\n  \"Consume String request's body as text\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume String request's body as blob\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume String request's body as arrayBuffer\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume String request's body as bytes\": {\n    \"status\": \"FAIL\"\n  },\n  \"Consume String request's body as JSON\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume ArrayBuffer request's body as text\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume ArrayBuffer request's body as blob\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume ArrayBuffer request's body as arrayBuffer\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume ArrayBuffer request's body as bytes\": {\n    \"status\": \"FAIL\"\n  },\n  \"Consume ArrayBuffer request's body as JSON\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume Uint8Array request's body as text\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume Uint8Array request's body as blob\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume Uint8Array request's body as arrayBuffer\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume Uint8Array request's body as bytes\": {\n    \"status\": \"FAIL\"\n  },\n  \"Consume Uint8Array request's body as JSON\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume Int8Array request's body as text\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume Int8Array request's body as blob\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume Int8Array request's body as arrayBuffer\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume Int8Array request's body as bytes\": {\n    \"status\": \"FAIL\"\n  },\n  \"Consume Int8Array request's body as JSON\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume Float32Array request's body as text\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume Float32Array request's body as blob\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume Float32Array request's body as arrayBuffer\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume Float32Array request's body as bytes\": {\n    \"status\": \"FAIL\"\n  },\n  \"Consume Float32Array request's body as JSON\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume DataView request's body as text\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume DataView request's body as blob\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume DataView request's body as arrayBuffer\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume DataView request's body as bytes\": {\n    \"status\": \"FAIL\"\n  },\n  \"Consume DataView request's body as JSON\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume FormData request's body as FormData\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume blob response's body as blob\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume blob response's body as text\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume blob response's body as json\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume blob response's body as arrayBuffer\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume blob response's body as bytes\": {\n    \"status\": \"FAIL\"\n  },\n  \"Consume blob response's body as blob (empty blob as input)\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume JSON from text: '\\\"null\\\"'\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume JSON from text: '\\\"1\\\"'\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume JSON from text: '\\\"true\\\"'\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume JSON from text: '\\\"\\\\\\\"string\\\\\\\"\\\"'\": {\n    \"status\": \"PASS\"\n  },\n  \"Trying to consume bad JSON text as JSON: 'undefined'\": {\n    \"status\": \"PASS\"\n  },\n  \"Trying to consume bad JSON text as JSON: '{'\": {\n    \"status\": \"PASS\"\n  },\n  \"Trying to consume bad JSON text as JSON: 'a'\": {\n    \"status\": \"PASS\"\n  },\n  \"Trying to consume bad JSON text as JSON: '['\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/request/request-disturbed.any.js.json",
    "content": "{\n  \"Request's body: initial state\": {\n    \"status\": \"FAIL\"\n  },\n  \"Request without body cannot be disturbed\": {\n    \"status\": \"PASS\"\n  },\n  \"Check cloning a disturbed request\": {\n    \"status\": \"FAIL\"\n  },\n  \"Check creating a new request from a disturbed request\": {\n    \"status\": \"FAIL\"\n  },\n  \"Check creating a new request with a new body from a disturbed request\": {\n    \"status\": \"FAIL\"\n  },\n  \"Input request used for creating new request became disturbed\": {\n    \"status\": \"FAIL\"\n  },\n  \"Input request used for creating new request became disturbed even if body is not used\": {\n    \"status\": \"FAIL\"\n  },\n  \"Check consuming a disturbed request\": {\n    \"status\": \"FAIL\"\n  },\n  \"Request construction failure should not set \\\"bodyUsed\\\"\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/request/request-error.any.js.json",
    "content": "{\n  \"RequestInit's window is not null\": {\n    \"status\": \"FAIL\"\n  },\n  \"Input URL is not valid\": {\n    \"status\": \"PASS\"\n  },\n  \"Input URL has credentials\": {\n    \"status\": \"FAIL\"\n  },\n  \"RequestInit's mode is navigate\": {\n    \"status\": \"FAIL\"\n  },\n  \"RequestInit's referrer is invalid\": {\n    \"status\": \"FAIL\"\n  },\n  \"RequestInit's method is invalid\": {\n    \"status\": \"FAIL\"\n  },\n  \"RequestInit's method is forbidden\": {\n    \"status\": \"FAIL\"\n  },\n  \"RequestInit's mode is no-cors and method is not simple\": {\n    \"status\": \"FAIL\"\n  },\n  \"RequestInit's cache mode is only-if-cached and mode is not same-origin\": {\n    \"status\": \"FAIL\"\n  },\n  \"Request with cache mode: only-if-cached and fetch mode cors\": {\n    \"status\": \"FAIL\"\n  },\n  \"Request with cache mode: only-if-cached and fetch mode no-cors\": {\n    \"status\": \"FAIL\"\n  },\n  \"Bad referrerPolicy init parameter value\": {\n    \"status\": \"FAIL\"\n  },\n  \"Bad mode init parameter value\": {\n    \"status\": \"FAIL\"\n  },\n  \"Bad credentials init parameter value\": {\n    \"status\": \"FAIL\"\n  },\n  \"Bad cache init parameter value\": {\n    \"status\": \"FAIL\"\n  },\n  \"Bad redirect init parameter value\": {\n    \"status\": \"FAIL\"\n  },\n  \"request-error\": {\n    \"status\": \"PASS\"\n  },\n  \"Request should get its content-type from the init request\": {\n    \"status\": \"PASS\"\n  },\n  \"Request should not get its content-type from the init request if init headers are provided\": {\n    \"status\": \"PASS\"\n  },\n  \"Request should get its content-type from the body if none is provided\": {\n    \"status\": \"PASS\"\n  },\n  \"Request should get its content-type from init headers if one is provided\": {\n    \"status\": \"PASS\"\n  },\n  \"Request with cache mode: only-if-cached and fetch mode: same-origin\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/request/request-headers.any.js.json",
    "content": "{\n  \"Adding valid request header \\\"Content-Type: OK\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"Adding valid request header \\\"Potato: OK\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"Adding valid request header \\\"proxy: OK\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"Adding valid request header \\\"proxya: OK\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"Adding valid request header \\\"sec: OK\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"Adding valid request header \\\"secb: OK\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"Adding valid request header \\\"Set-Cookie2: OK\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"Adding valid request header \\\"User-Agent: OK\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"Adding invalid request header \\\"Accept-Charset: KO\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"Adding invalid request header \\\"accept-charset: KO\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"Adding invalid request header \\\"ACCEPT-ENCODING: KO\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"Adding invalid request header \\\"Accept-Encoding: KO\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"Adding invalid request header \\\"Access-Control-Request-Headers: KO\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"Adding invalid request header \\\"Access-Control-Request-Method: KO\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"Adding invalid request header \\\"Connection: KO\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"Adding invalid request header \\\"Content-Length: KO\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"Adding invalid request header \\\"Cookie: KO\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"Adding invalid request header \\\"Cookie2: KO\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"Adding invalid request header \\\"Date: KO\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"Adding invalid request header \\\"DNT: KO\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"Adding invalid request header \\\"Expect: KO\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"Adding invalid request header \\\"Host: KO\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"Adding invalid request header \\\"Keep-Alive: KO\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"Adding invalid request header \\\"Origin: KO\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"Adding invalid request header \\\"Referer: KO\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"Adding invalid request header \\\"Set-Cookie: KO\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"Adding invalid request header \\\"TE: KO\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"Adding invalid request header \\\"Trailer: KO\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"Adding invalid request header \\\"Transfer-Encoding: KO\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"Adding invalid request header \\\"Upgrade: KO\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"Adding invalid request header \\\"Via: KO\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"Adding invalid request header \\\"Proxy-: KO\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"Adding invalid request header \\\"proxy-a: KO\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"Adding invalid request header \\\"Sec-: KO\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"Adding invalid request header \\\"sec-b: KO\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"Adding valid no-cors request header \\\"Accept: OK\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"Adding valid no-cors request header \\\"Accept-Language: OK\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"Adding valid no-cors request header \\\"content-language: OK\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"Adding valid no-cors request header \\\"content-type: application/x-www-form-urlencoded\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"Adding valid no-cors request header \\\"content-type: application/x-www-form-urlencoded;charset=UTF-8\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"Adding valid no-cors request header \\\"content-type: multipart/form-data\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"Adding valid no-cors request header \\\"content-type: multipart/form-data;charset=UTF-8\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"Adding valid no-cors request header \\\"content-TYPE: text/plain\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"Adding valid no-cors request header \\\"CONTENT-type: text/plain;charset=UTF-8\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"Adding invalid no-cors request header \\\"Content-Type: KO\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"Adding invalid no-cors request header \\\"Potato: KO\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"Adding invalid no-cors request header \\\"proxy: KO\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"Adding invalid no-cors request header \\\"proxya: KO\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"Adding invalid no-cors request header \\\"sec: KO\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"Adding invalid no-cors request header \\\"secb: KO\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"Adding invalid no-cors request header \\\"Empty-Value: \\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"Check that request constructor is filtering headers provided as init parameter\": {\n    \"status\": \"FAIL\"\n  },\n  \"Check that no-cors request constructor is filtering headers provided as init parameter\": {\n    \"status\": \"FAIL\"\n  },\n  \"Check that no-cors request constructor is filtering headers provided as part of request parameter\": {\n    \"status\": \"FAIL\"\n  },\n  \"Request should get its content-type from the init request\": {\n    \"status\": \"PASS\"\n  },\n  \"Request should not get its content-type from the init request if init headers are provided\": {\n    \"status\": \"PASS\"\n  },\n  \"Request should get its content-type from the body if none is provided\": {\n    \"status\": \"PASS\"\n  },\n  \"Request should get its content-type from init headers if one is provided\": {\n    \"status\": \"PASS\"\n  },\n  \"Testing request header creations with various objects\": {\n    \"status\": \"PASS\"\n  },\n  \"Testing empty Request Content-Type header\": {\n    \"status\": \"PASS\"\n  },\n  \"Test that Request.headers has the [SameObject] extended attribute\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/request/request-init-002.any.js.json",
    "content": "{\n  \"Initialize Request with headers values\": {\n    \"status\": \"PASS\"\n  },\n  \"Initialize Request's body with \\\"undefined\\\", undefined\": {\n    \"status\": \"PASS\"\n  },\n  \"Initialize Request's body with \\\"null\\\", null\": {\n    \"status\": \"PASS\"\n  },\n  \"Initialize Request's body with \\\"[object Blob]\\\", application/octet-binary\": {\n    \"status\": \"PASS\"\n  },\n  \"Initialize Request's body with \\\"[object Object]\\\", multipart/form-data\": {\n    \"status\": \"PASS\"\n  },\n  \"Initialize Request's body with \\\"This is a USVString\\\", text/plain;charset=UTF-8\": {\n    \"status\": \"PASS\"\n  },\n  \"Initialize Request's body with \\\"hi!\\\", text/plain;charset=UTF-8\": {\n    \"status\": \"PASS\"\n  },\n  \"Initialize Request's body with \\\"name=value\\\", application/x-www-form-urlencoded;charset=UTF-8\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/request/request-init-contenttype.any.js.json",
    "content": "{\n  \"Default Content-Type for Request with empty body\": {\n    \"status\": \"PASS\"\n  },\n  \"Default Content-Type for Request with Blob body (no type set)\": {\n    \"status\": \"PASS\"\n  },\n  \"Default Content-Type for Request with Blob body (empty type)\": {\n    \"status\": \"PASS\"\n  },\n  \"Default Content-Type for Request with Blob body (set type)\": {\n    \"status\": \"PASS\"\n  },\n  \"Default Content-Type for Request with buffer source body\": {\n    \"status\": \"PASS\"\n  },\n  \"Default Content-Type for Request with FormData body\": {\n    \"status\": \"PASS\"\n  },\n  \"Default Content-Type for Request with URLSearchParams body\": {\n    \"status\": \"PASS\"\n  },\n  \"Default Content-Type for Request with string body\": {\n    \"status\": \"PASS\"\n  },\n  \"Default Content-Type for Request with ReadableStream body\": {\n    \"status\": \"PASS\"\n  },\n  \"Can override Content-Type for Request with empty body\": {\n    \"status\": \"PASS\"\n  },\n  \"Can override Content-Type for Request with Blob body (no type set)\": {\n    \"status\": \"PASS\"\n  },\n  \"Can override Content-Type for Request with Blob body (empty type)\": {\n    \"status\": \"PASS\"\n  },\n  \"Can override Content-Type for Request with Blob body (set type)\": {\n    \"status\": \"PASS\"\n  },\n  \"Can override Content-Type for Request with buffer source body\": {\n    \"status\": \"PASS\"\n  },\n  \"Can override Content-Type for Request with FormData body\": {\n    \"status\": \"PASS\"\n  },\n  \"Can override Content-Type for Request with URLSearchParams body\": {\n    \"status\": \"PASS\"\n  },\n  \"Can override Content-Type for Request with string body\": {\n    \"status\": \"PASS\"\n  },\n  \"Can override Content-Type for Request with ReadableStream body\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/request/request-init-priority.any.js.json",
    "content": "{\n  \"new Request() with a 'high' priority does not throw an error\": {\n    \"status\": \"PASS\"\n  },\n  \"new Request() with a 'low' priority does not throw an error\": {\n    \"status\": \"PASS\"\n  },\n  \"new Request() with a 'auto' priority does not throw an error\": {\n    \"status\": \"PASS\"\n  },\n  \"new Request() throws a TypeError if any of RequestInit's members' values are invalid\": {\n    \"status\": \"FAIL\"\n  },\n  \"fetch() with a 'high' priority completes successfully\": {\n    \"status\": \"PASS\"\n  },\n  \"fetch() with a 'low' priority completes successfully\": {\n    \"status\": \"PASS\"\n  },\n  \"fetch() with a 'auto' priority completes successfully\": {\n    \"status\": \"PASS\"\n  },\n  \"fetch() with an invalid priority returns a rejected promise with a TypeError\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/request/request-init-stream.any.js.json",
    "content": "{\n  \"Constructing a Request with a stream holds the original object.\": {\n    \"status\": \"PASS\"\n  },\n  \"Constructing a Request with a stream on which getReader() is called\": {\n    \"status\": \"PASS\"\n  },\n  \"Constructing a Request with a stream on which read() is called\": {\n    \"status\": \"PASS\"\n  },\n  \"Constructing a Request with a stream on which read() and releaseLock() are called\": {\n    \"status\": \"PASS\"\n  },\n  \"Constructing a Request with a Request on which body.getReader() is called\": {\n    \"status\": \"FAIL\"\n  },\n  \"Constructing a Request with a Request on which body.getReader().read() is called\": {\n    \"status\": \"FAIL\"\n  },\n  \"Constructing a Request with a Request on which read() and releaseLock() are called\": {\n    \"status\": \"FAIL\"\n  },\n  \"It is OK to omit .duplex when the body is null.\": {\n    \"status\": \"PASS\"\n  },\n  \"It is OK to omit .duplex when the body is a string.\": {\n    \"status\": \"PASS\"\n  },\n  \"It is OK to omit .duplex when the body is a Uint8Array.\": {\n    \"status\": \"PASS\"\n  },\n  \"It is OK to omit .duplex when the body is a Blob.\": {\n    \"status\": \"PASS\"\n  },\n  \"It is error to omit .duplex when the body is a ReadableStream.\": {\n    \"status\": \"FAIL\"\n  },\n  \"It is OK to set .duplex = 'half' when the body is null.\": {\n    \"status\": \"PASS\"\n  },\n  \"It is OK to set .duplex = 'half' when the body is a string.\": {\n    \"status\": \"PASS\"\n  },\n  \"It is OK to set .duplex = 'half' when the body is a Uint8Array.\": {\n    \"status\": \"PASS\"\n  },\n  \"It is OK to set .duplex = 'half' when the body is a Blob.\": {\n    \"status\": \"PASS\"\n  },\n  \"It is OK to set .duplex = 'half' when the body is a ReadableStream.\": {\n    \"status\": \"PASS\"\n  },\n  \"It is error to set .duplex = 'full' when the body is null.\": {\n    \"status\": \"FAIL\"\n  },\n  \"It is error to set .duplex = 'full' when the body is a string.\": {\n    \"status\": \"FAIL\"\n  },\n  \"It is error to set .duplex = 'full' when the body is a Uint8Array.\": {\n    \"status\": \"FAIL\"\n  },\n  \"It is error to set .duplex = 'full' when the body is a Blob.\": {\n    \"status\": \"FAIL\"\n  },\n  \"It is error to set .duplex = 'full' when the body is a ReadableStream.\": {\n    \"status\": \"FAIL\"\n  },\n  \"It is OK to omit duplex when init.body is not given and input.body is given.\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/request/request-keepalive.any.js.json",
    "content": "{\n  \"keepalive flag\": {\n    \"status\": \"FAIL\"\n  },\n  \"keepalive flag with stream body\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/request/request-structure.any.js.json",
    "content": "{\n  \"Request has clone method\": {\n    \"status\": \"PASS\"\n  },\n  \"Request has arrayBuffer method\": {\n    \"status\": \"PASS\"\n  },\n  \"Request has blob method\": {\n    \"status\": \"PASS\"\n  },\n  \"Request has formData method\": {\n    \"status\": \"PASS\"\n  },\n  \"Request has json method\": {\n    \"status\": \"PASS\"\n  },\n  \"Request has text method\": {\n    \"status\": \"PASS\"\n  },\n  \"Check method attribute\": {\n    \"status\": \"PASS\"\n  },\n  \"Check url attribute\": {\n    \"status\": \"PASS\"\n  },\n  \"Check headers attribute\": {\n    \"status\": \"PASS\"\n  },\n  \"Check destination attribute\": {\n    \"status\": \"FAIL\"\n  },\n  \"Check referrer attribute\": {\n    \"status\": \"FAIL\"\n  },\n  \"Check referrerPolicy attribute\": {\n    \"status\": \"FAIL\"\n  },\n  \"Check mode attribute\": {\n    \"status\": \"FAIL\"\n  },\n  \"Check credentials attribute\": {\n    \"status\": \"FAIL\"\n  },\n  \"Check cache attribute\": {\n    \"status\": \"FAIL\"\n  },\n  \"Check redirect attribute\": {\n    \"status\": \"FAIL\"\n  },\n  \"Check integrity attribute\": {\n    \"status\": \"FAIL\"\n  },\n  \"Check isReloadNavigation attribute\": {\n    \"status\": \"FAIL\"\n  },\n  \"Check isHistoryNavigation attribute\": {\n    \"status\": \"FAIL\"\n  },\n  \"Check duplex attribute\": {\n    \"status\": \"FAIL\"\n  },\n  \"Check bodyUsed attribute\": {\n    \"status\": \"PASS\"\n  },\n  \"Request does not expose priority attribute\": {\n    \"status\": \"PASS\"\n  },\n  \"Request does not expose internalpriority attribute\": {\n    \"status\": \"PASS\"\n  },\n  \"Request does not expose blocking attribute\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/response/json.any.js.json",
    "content": "{\n  \"Ensure the correct JSON parser is used\": {\n    \"status\": \"FAIL\"\n  },\n  \"Ensure UTF-16 results in an error\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/response/response-blob-realm.any.js.json",
    "content": "{\n  \"realm of the Uint8Array from Response bytes()\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/response/response-cancel-stream.any.js.json",
    "content": "{\n  \"Cancelling a starting blob Response stream\": {\n    \"status\": \"PASS\"\n  },\n  \"Cancelling a loading blob Response stream\": {\n    \"status\": \"PASS\"\n  },\n  \"Cancelling a closed blob Response stream\": {\n    \"status\": \"PASS\"\n  },\n  \"Cancelling a starting Response stream\": {\n    \"status\": \"PASS\"\n  },\n  \"Cancelling a loading Response stream\": {\n    \"status\": \"PASS\"\n  },\n  \"Cancelling a closed Response stream\": {\n    \"status\": \"PASS\"\n  },\n  \"Accessing .body after canceling it\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/response/response-consume-empty.any.js.json",
    "content": "{\n  \"Consume response's body as text\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume response's body as blob\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume response's body as arrayBuffer\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume response's body as json (error case)\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume response's body as formData with correct multipart type (error case)\": {\n    \"status\": \"FAIL\"\n  },\n  \"Consume response's body as formData with correct urlencoded type\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume response's body as formData without correct type (error case)\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume empty blob response body as arrayBuffer\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume empty text response body as arrayBuffer\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume empty blob response body as text\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume empty text response body as text\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume empty URLSearchParams response body as text\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume empty FormData response body as text\": {\n    \"status\": \"PASS\"\n  },\n  \"Consume empty ArrayBuffer response body as text\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/response/response-consume-stream.any.js.json",
    "content": "{\n  \"Read empty text response's body as readableStream\": {\n    \"status\": \"PASS\"\n  },\n  \"Read empty blob response's body as readableStream\": {\n    \"status\": \"PASS\"\n  },\n  \"Read blob response's body as readableStream with mode=undefined\": {\n    \"status\": \"PASS\"\n  },\n  \"Read text response's body as readableStream with mode=undefined\": {\n    \"status\": \"PASS\"\n  },\n  \"Read URLSearchParams response's body as readableStream with mode=undefined\": {\n    \"status\": \"PASS\"\n  },\n  \"Read array buffer response's body as readableStream with mode=undefined\": {\n    \"status\": \"PASS\"\n  },\n  \"Read form data response's body as readableStream with mode=undefined\": {\n    \"status\": \"PASS\"\n  },\n  \"Read blob response's body as readableStream with mode=byob\": {\n    \"status\": \"FAIL\"\n  },\n  \"Read text response's body as readableStream with mode=byob\": {\n    \"status\": \"FAIL\"\n  },\n  \"Read URLSearchParams response's body as readableStream with mode=byob\": {\n    \"status\": \"FAIL\"\n  },\n  \"Read array buffer response's body as readableStream with mode=byob\": {\n    \"status\": \"FAIL\"\n  },\n  \"Read form data response's body as readableStream with mode=byob\": {\n    \"status\": \"FAIL\"\n  },\n  \"Getting an error Response stream\": {\n    \"status\": \"FAIL\"\n  },\n  \"Getting a redirect Response stream\": {\n    \"status\": \"PASS\"\n  },\n  \"Reading with offset from Response stream\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/response/response-error-from-stream.any.js.json",
    "content": "{\n  \"ReadableStreamDefaultReader Promise receives ReadableStream start() Error\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamDefaultReader Promise receives ReadableStream pull() Error\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream start() Error propagates to Response.arrayBuffer() Promise\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream start() Error propagates to Response.blob() Promise\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream start() Error propagates to Response.bytes() Promise\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream start() Error propagates to Response.formData() Promise\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream start() Error propagates to Response.json() Promise\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream start() Error propagates to Response.text() Promise\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream pull() Error propagates to Response.arrayBuffer() Promise\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream pull() Error propagates to Response.blob() Promise\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream pull() Error propagates to Response.bytes() Promise\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream pull() Error propagates to Response.formData() Promise\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream pull() Error propagates to Response.json() Promise\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream pull() Error propagates to Response.text() Promise\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/response/response-error.any.js.json",
    "content": "{\n  \"Throws RangeError when responseInit's status is 0\": {\n    \"status\": \"PASS\"\n  },\n  \"Throws RangeError when responseInit's status is 100\": {\n    \"status\": \"PASS\"\n  },\n  \"Throws RangeError when responseInit's status is 199\": {\n    \"status\": \"PASS\"\n  },\n  \"Throws RangeError when responseInit's status is 600\": {\n    \"status\": \"PASS\"\n  },\n  \"Throws RangeError when responseInit's status is 1000\": {\n    \"status\": \"PASS\"\n  },\n  \"Throws TypeError when responseInit's statusText is \\n\": {\n    \"status\": \"PASS\"\n  },\n  \"Throws TypeError when responseInit's statusText is Ā\": {\n    \"status\": \"PASS\"\n  },\n  \"Throws TypeError when building a response with body and a body status of 204\": {\n    \"status\": \"PASS\"\n  },\n  \"Throws TypeError when building a response with body and a body status of 205\": {\n    \"status\": \"PASS\"\n  },\n  \"Throws TypeError when building a response with body and a body status of 304\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/response/response-from-stream.any.js.json",
    "content": "{\n  \"Constructing a Response with a stream on which getReader() is called\": {\n    \"status\": \"PASS\"\n  },\n  \"Constructing a Response with a stream on which read() is called\": {\n    \"status\": \"PASS\"\n  },\n  \"Constructing a Response with a stream on which read() and releaseLock() are called\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/response/response-headers-guard.any.js.json",
    "content": "{\n  \"Ensure response headers are immutable\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/response/response-init-001.any.js.json",
    "content": "{\n  \"Check default value for type attribute\": {\n    \"status\": \"PASS\"\n  },\n  \"Check default value for url attribute\": {\n    \"status\": \"PASS\"\n  },\n  \"Check default value for ok attribute\": {\n    \"status\": \"PASS\"\n  },\n  \"Check default value for status attribute\": {\n    \"status\": \"PASS\"\n  },\n  \"Check default value for statusText attribute\": {\n    \"status\": \"PASS\"\n  },\n  \"Check default value for body attribute\": {\n    \"status\": \"PASS\"\n  },\n  \"Check status init values and associated getter\": {\n    \"status\": \"PASS\"\n  },\n  \"Check statusText init values and associated getter\": {\n    \"status\": \"PASS\"\n  },\n  \"Test that Response.headers has the [SameObject] extended attribute\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/response/response-init-002.any.js.json",
    "content": "{\n  \"Initialize Response with headers values\": {\n    \"status\": \"PASS\"\n  },\n  \"Initialize Response's body with application/octet-binary\": {\n    \"status\": \"PASS\"\n  },\n  \"Initialize Response's body with multipart/form-data\": {\n    \"status\": \"PASS\"\n  },\n  \"Initialize Response's body with application/x-www-form-urlencoded;charset=UTF-8\": {\n    \"status\": \"PASS\"\n  },\n  \"Initialize Response's body with text/plain;charset=UTF-8\": {\n    \"status\": \"PASS\"\n  },\n  \"Read Response's body as readableStream\": {\n    \"status\": \"PASS\"\n  },\n  \"Testing empty Response Content-Type header\": {\n    \"status\": \"PASS\"\n  },\n  \"Testing null Response body\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/response/response-init-contenttype.any.js.json",
    "content": "{\n  \"Default Content-Type for Response with empty body\": {\n    \"status\": \"PASS\"\n  },\n  \"Default Content-Type for Response with Blob body (no type set)\": {\n    \"status\": \"PASS\"\n  },\n  \"Default Content-Type for Response with Blob body (empty type)\": {\n    \"status\": \"PASS\"\n  },\n  \"Default Content-Type for Response with Blob body (set type)\": {\n    \"status\": \"PASS\"\n  },\n  \"Default Content-Type for Response with buffer source body\": {\n    \"status\": \"PASS\"\n  },\n  \"Default Content-Type for Response with FormData body\": {\n    \"status\": \"PASS\"\n  },\n  \"Default Content-Type for Response with URLSearchParams body\": {\n    \"status\": \"PASS\"\n  },\n  \"Default Content-Type for Response with string body\": {\n    \"status\": \"PASS\"\n  },\n  \"Default Content-Type for Response with ReadableStream body\": {\n    \"status\": \"PASS\"\n  },\n  \"Can override Content-Type for Response with empty body\": {\n    \"status\": \"PASS\"\n  },\n  \"Can override Content-Type for Response with Blob body (no type set)\": {\n    \"status\": \"PASS\"\n  },\n  \"Can override Content-Type for Response with Blob body (empty type)\": {\n    \"status\": \"PASS\"\n  },\n  \"Can override Content-Type for Response with Blob body (set type)\": {\n    \"status\": \"PASS\"\n  },\n  \"Can override Content-Type for Response with buffer source body\": {\n    \"status\": \"PASS\"\n  },\n  \"Can override Content-Type for Response with FormData body\": {\n    \"status\": \"PASS\"\n  },\n  \"Can override Content-Type for Response with URLSearchParams body\": {\n    \"status\": \"PASS\"\n  },\n  \"Can override Content-Type for Response with string body\": {\n    \"status\": \"PASS\"\n  },\n  \"Can override Content-Type for Response with ReadableStream body\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/response/response-static-error.any.js.json",
    "content": "{\n  \"Check response returned by static method error()\": {\n    \"status\": \"FAIL\"\n  },\n  \"the 'guard' of the Headers instance should be immutable\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/response/response-static-json.any.js.json",
    "content": "{\n  \"Check response returned by static json() with init undefined\": {\n    \"status\": \"PASS\"\n  },\n  \"Check response returned by static json() with init {\\\"status\\\":400}\": {\n    \"status\": \"PASS\"\n  },\n  \"Check response returned by static json() with init {\\\"statusText\\\":\\\"foo\\\"}\": {\n    \"status\": \"PASS\"\n  },\n  \"Check response returned by static json() with init {\\\"headers\\\":{}}\": {\n    \"status\": \"PASS\"\n  },\n  \"Check response returned by static json() with init {\\\"headers\\\":{\\\"content-type\\\":\\\"foo/bar\\\"}}\": {\n    \"status\": \"PASS\"\n  },\n  \"Check response returned by static json() with init {\\\"headers\\\":{\\\"x-foo\\\":\\\"bar\\\"}}\": {\n    \"status\": \"PASS\"\n  },\n  \"Throws TypeError when calling static json() with a status of 204\": {\n    \"status\": \"PASS\"\n  },\n  \"Throws TypeError when calling static json() with a status of 205\": {\n    \"status\": \"PASS\"\n  },\n  \"Throws TypeError when calling static json() with a status of 304\": {\n    \"status\": \"PASS\"\n  },\n  \"Check static json() encodes JSON objects correctly\": {\n    \"status\": \"PASS\"\n  },\n  \"Check static json() throws when data is not encodable\": {\n    \"status\": \"PASS\"\n  },\n  \"Check static json() throws when data is circular\": {\n    \"status\": \"PASS\"\n  },\n  \"Check static json() propagates JSON serializer errors\": {\n    \"status\": \"PASS\"\n  },\n  \"Check response returned by static json() with input 𝌆\": {\n    \"status\": \"PASS\"\n  },\n  \"Check response returned by static json() with input U+df06U+d834\": {\n    \"status\": \"PASS\"\n  },\n  \"Check response returned by static json() with input U+dead\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/response/response-static-redirect.any.js.json",
    "content": "{\n  \"Check default redirect response\": {\n    \"status\": \"PASS\"\n  },\n  \"Check response returned by static method redirect(), status = 301\": {\n    \"status\": \"PASS\"\n  },\n  \"Check response returned by static method redirect(), status = 302\": {\n    \"status\": \"PASS\"\n  },\n  \"Check response returned by static method redirect(), status = 303\": {\n    \"status\": \"PASS\"\n  },\n  \"Check response returned by static method redirect(), status = 307\": {\n    \"status\": \"PASS\"\n  },\n  \"Check response returned by static method redirect(), status = 308\": {\n    \"status\": \"PASS\"\n  },\n  \"Check error returned when giving invalid url to redirect()\": {\n    \"status\": \"PASS\"\n  },\n  \"Check error returned when giving invalid status to redirect(), status = 200\": {\n    \"status\": \"PASS\"\n  },\n  \"Check error returned when giving invalid status to redirect(), status = 309\": {\n    \"status\": \"PASS\"\n  },\n  \"Check error returned when giving invalid status to redirect(), status = 400\": {\n    \"status\": \"PASS\"\n  },\n  \"Check error returned when giving invalid status to redirect(), status = 500\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/response/response-stream-bad-chunk.any.js.json",
    "content": "{\n  \"ReadableStream with non-Uint8Array chunk passed to Response.arrayBuffer() causes TypeError\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with non-Uint8Array chunk passed to Response.blob() causes TypeError\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with non-Uint8Array chunk passed to Response.bytes() causes TypeError\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream with non-Uint8Array chunk passed to Response.formData() causes TypeError\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with non-Uint8Array chunk passed to Response.json() causes TypeError\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with non-Uint8Array chunk passed to Response.text() causes TypeError\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/response/response-stream-disturbed-1.any.js.json",
    "content": "{\n  \"Getting blob after getting the Response body - not disturbed, not locked (body source: fetch)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting text after getting the Response body - not disturbed, not locked (body source: fetch)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting json after getting the Response body - not disturbed, not locked (body source: fetch)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting arrayBuffer after getting the Response body - not disturbed, not locked (body source: fetch)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting blob after getting the Response body - not disturbed, not locked (body source: stream)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting text after getting the Response body - not disturbed, not locked (body source: stream)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting json after getting the Response body - not disturbed, not locked (body source: stream)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting arrayBuffer after getting the Response body - not disturbed, not locked (body source: stream)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting blob after getting the Response body - not disturbed, not locked (body source: string)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting text after getting the Response body - not disturbed, not locked (body source: string)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting json after getting the Response body - not disturbed, not locked (body source: string)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting arrayBuffer after getting the Response body - not disturbed, not locked (body source: string)\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/response/response-stream-disturbed-2.any.js.json",
    "content": "{\n  \"Getting blob after getting a locked Response body (body source: fetch)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting text after getting a locked Response body (body source: fetch)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting json after getting a locked Response body (body source: fetch)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting arrayBuffer after getting a locked Response body (body source: fetch)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting blob after getting a locked Response body (body source: stream)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting text after getting a locked Response body (body source: stream)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting json after getting a locked Response body (body source: stream)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting arrayBuffer after getting a locked Response body (body source: stream)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting blob after getting a locked Response body (body source: string)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting text after getting a locked Response body (body source: string)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting json after getting a locked Response body (body source: string)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting arrayBuffer after getting a locked Response body (body source: string)\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/response/response-stream-disturbed-3.any.js.json",
    "content": "{\n  \"Getting blob after reading the Response body (body source: fetch)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting text after reading the Response body (body source: fetch)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting json after reading the Response body (body source: fetch)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting arrayBuffer after reading the Response body (body source: fetch)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting blob after reading the Response body (body source: stream)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting text after reading the Response body (body source: stream)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting json after reading the Response body (body source: stream)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting arrayBuffer after reading the Response body (body source: stream)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting blob after reading the Response body (body source: string)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting text after reading the Response body (body source: string)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting json after reading the Response body (body source: string)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting arrayBuffer after reading the Response body (body source: string)\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/response/response-stream-disturbed-4.any.js.json",
    "content": "{\n  \"Getting blob after cancelling the Response body (body source: fetch)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting text after cancelling the Response body (body source: fetch)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting json after cancelling the Response body (body source: fetch)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting arrayBuffer after cancelling the Response body (body source: fetch)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting blob after cancelling the Response body (body source: stream)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting text after cancelling the Response body (body source: stream)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting json after cancelling the Response body (body source: stream)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting arrayBuffer after cancelling the Response body (body source: stream)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting blob after cancelling the Response body (body source: string)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting text after cancelling the Response body (body source: string)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting json after cancelling the Response body (body source: string)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting arrayBuffer after cancelling the Response body (body source: string)\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/response/response-stream-disturbed-5.any.js.json",
    "content": "{\n  \"Getting a body reader after consuming as blob (body source: fetch)\": {\n    \"status\": \"FAIL\"\n  },\n  \"Getting a body reader after consuming as text (body source: fetch)\": {\n    \"status\": \"FAIL\"\n  },\n  \"Getting a body reader after consuming as json (body source: fetch)\": {\n    \"status\": \"FAIL\"\n  },\n  \"Getting a body reader after consuming as arrayBuffer (body source: fetch)\": {\n    \"status\": \"FAIL\"\n  },\n  \"Getting a body reader after consuming as blob (body source: stream)\": {\n    \"status\": \"FAIL\"\n  },\n  \"Getting a body reader after consuming as text (body source: stream)\": {\n    \"status\": \"FAIL\"\n  },\n  \"Getting a body reader after consuming as json (body source: stream)\": {\n    \"status\": \"FAIL\"\n  },\n  \"Getting a body reader after consuming as arrayBuffer (body source: stream)\": {\n    \"status\": \"FAIL\"\n  },\n  \"Getting a body reader after consuming as blob (body source: string)\": {\n    \"status\": \"FAIL\"\n  },\n  \"Getting a body reader after consuming as text (body source: string)\": {\n    \"status\": \"FAIL\"\n  },\n  \"Getting a body reader after consuming as json (body source: string)\": {\n    \"status\": \"FAIL\"\n  },\n  \"Getting a body reader after consuming as arrayBuffer (body source: string)\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/response/response-stream-disturbed-6.any.js.json",
    "content": "{\n  \"A non-closed stream on which read() has been called\": {\n    \"status\": \"FAIL\"\n  },\n  \"A non-closed stream on which cancel() has been called\": {\n    \"status\": \"FAIL\"\n  },\n  \"A closed stream on which read() has been called\": {\n    \"status\": \"FAIL\"\n  },\n  \"An errored stream on which read() has been called\": {\n    \"status\": \"FAIL\"\n  },\n  \"An errored stream on which cancel() has been called\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/response/response-stream-disturbed-by-pipe.any.js.json",
    "content": "{\n  \"using pipeTo on Response body should disturb it synchronously\": {\n    \"status\": \"FAIL\"\n  },\n  \"using pipeThrough on Response body should disturb it synchronously\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/api/response/response-stream-with-broken-then.any.js.json",
    "content": "{\n  \"Attempt to inject {done: false, value: bye} via Object.prototype.then.\": {\n    \"status\": \"PASS\"\n  },\n  \"Attempt to inject value: undefined via Object.prototype.then.\": {\n    \"status\": \"PASS\"\n  },\n  \"Attempt to inject undefined via Object.prototype.then.\": {\n    \"status\": \"PASS\"\n  },\n  \"Attempt to inject 8.2 via Object.prototype.then.\": {\n    \"status\": \"PASS\"\n  },\n  \"intercepting arraybuffer to text conversion via Object.prototype.then should not be possible\": {\n    \"status\": \"PASS\"\n  },\n  \"intercepting arraybuffer to body readable stream conversion via Object.prototype.then should not be possible\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/content-type/multipart-malformed.any.js.json",
    "content": "{\n  \"Invalid form data should not crash the browser\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/content-type/multipart.window.js.json",
    "content": "{\n  \"multipart\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/data-urls/base64.any.js.json",
    "content": "{\n  \"Setup.\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"data: URL base64 handling: \\\"abcd\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"data: URL base64 handling: \\\" abcd\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"data: URL base64 handling: \\\"abcd \\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"data: URL base64 handling: \\\" abcd===\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"data: URL base64 handling: \\\"abcd=== \\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"abcd ===\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"data: URL base64 handling: \\\"a\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"ab\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"data: URL base64 handling: \\\"abc\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"data: URL base64 handling: \\\"abcde\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"𐀀\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"data: URL base64 handling: \\\"=\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"===\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"====\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"=====\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"a=\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"a==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"a===\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"a====\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"a=====\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"ab=\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"ab==\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"data: URL base64 handling: \\\"ab===\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"ab====\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"ab=====\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"abc=\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"data: URL base64 handling: \\\"abc==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"abc===\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"abc====\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"abc=====\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"abcd=\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"abcd==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"abcd===\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"abcd====\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"abcd=====\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"abcde=\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"abcde==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"abcde===\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"abcde====\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"abcde=====\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"=a\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"=a=\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"a=b\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"a=b=\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"ab=c\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"ab=c=\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"abc=d\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"abc=d=\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"ab\\\\vcd\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"data: URL base64 handling: \\\"ab　cd\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"data: URL base64 handling: \\\"ab、cd\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"data: URL base64 handling: \\\"ab\\\\tcd\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"data: URL base64 handling: \\\"ab\\\\ncd\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"data: URL base64 handling: \\\"ab\\\\fcd\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"data: URL base64 handling: \\\"ab\\\\rcd\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"data: URL base64 handling: \\\"ab cd\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"data: URL base64 handling: \\\"ab cd\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"data: URL base64 handling: \\\"ab\\\\t\\\\n\\\\f\\\\r cd\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"data: URL base64 handling: \\\" \\\\t\\\\n\\\\f\\\\r ab\\\\t\\\\n\\\\f\\\\r cd\\\\t\\\\n\\\\f\\\\r \\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"data: URL base64 handling: \\\"ab\\\\t\\\\n\\\\f\\\\r =\\\\t\\\\n\\\\f\\\\r =\\\\t\\\\n\\\\f\\\\r \\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"data: URL base64 handling: \\\"A\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"/A\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"data: URL base64 handling: \\\"//A\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"data: URL base64 handling: \\\"///A\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"data: URL base64 handling: \\\"////A\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"data: URL base64 handling: \\\"/\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"data: URL base64 handling: \\\"A/\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"data: URL base64 handling: \\\"AA/\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"data: URL base64 handling: \\\"AAAA/\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"data: URL base64 handling: \\\"AAA/\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"data: URL base64 handling: \\\"\\\\0nonsense\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"data: URL base64 handling: \\\"abcd\\\\0nonsense\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"data: URL base64 handling: \\\"YQ\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"data: URL base64 handling: \\\"YR\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"data: URL base64 handling: \\\"~~\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"..\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"--\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"data: URL base64 handling: \\\"__\\\"\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/fetch/data-urls/processing.any.js.json",
    "content": "{\n  \"Setup.\": {\n    \"status\": \"PASS\"\n  },\n  \"\\\"data://test/,X\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data://test:test/,X\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"\\\"data:,X\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"\\\"data:text/html\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:text/html    ;charset=x   \\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:,\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:,X#X\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:,%FF\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:text/plain,X\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:text/plain ,X\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:text/plain%20,X\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:text/plain\\\\f,X\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:text/plain%0C,X\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:text/plain;,X\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:;x=x;charset=x,X\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:;x=x,X\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:text/plain;charset=windows-1252,%C2%B1\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:text/plain;Charset=UTF-8,%C2%B1\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:text/plain;charset=windows-1252,áñçə💩\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:text/plain;charset=UTF-8,áñçə💩\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:image/gif,%C2%B1\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:IMAGE/gif,%C2%B1\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:IMAGE/gif;hi=x,%C2%B1\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:IMAGE/gif;CHARSET=x,%C2%B1\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data: ,%FF\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:%20,%FF\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:\\\\f,%FF\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:%1F,%FF\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:\\\\0,%FF\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:%00,%FF\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:text/html  ,X\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:text / html,X\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:†,X\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:†/†,X\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:X,X\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:image/png,X X\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:application/javascript,X X\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:application/xml,X X\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:text/javascript,X X\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:text/plain,X X\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:unknown/unknown,X X\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:text/plain;a=\\\\\\\",\\\\\\\",X\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:text/plain;a=%2C,X\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:;base64;base64,WA\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:x/x;base64;base64,WA\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:x/x;base64;charset=x,WA\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:x/x;base64;charset=x;base64,WA\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:x/x;base64;base64x,WA\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:;base64,W%20A\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:;base64,W%0CA\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:x;base64x,WA\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:x;base64;x,WA\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:x;base64=x,WA\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:; base64,WA\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:;  base64,WA\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:  ;charset=x   ;  base64,WA\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:;base64;,WA\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:;base64 ,WA\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:;base64   ,WA\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:;base 64,WA\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:;BASe64,WA\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:;%62ase64,WA\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:%3Bbase64,WA\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:;charset=x,X\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:; charset=x,X\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:;charset =x,X\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:;charset= x,X\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:;charset=,X\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:;charset,X\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:;charset=\\\\\\\"x\\\\\\\",X\\\"\": {\n    \"status\": \"FAIL\"\n  },\n  \"\\\"data:;CHARSET=\\\\\\\"X\\\\\\\",X\\\"\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/hr-time/basic.any.js.json",
    "content": "{\n  \"self.performance.now() is a function that returns a number\": {\n    \"status\": \"PASS\"\n  },\n  \"self.performance.now() returns a positive number\": {\n    \"status\": \"PASS\"\n  },\n  \"self.performance.now() difference is not negative\": {\n    \"status\": \"PASS\"\n  },\n  \"High resolution time has approximately the right relative magnitude\": {\n    \"status\": \"PASS\"\n  },\n  \"Performance interface extends EventTarget.\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/hr-time/idlharness.any.js.json",
    "content": "{\n  \"idl_test setup\": {\n    \"status\": \"PASS\"\n  },\n  \"idl_test validation\": {\n    \"status\": \"PASS\"\n  },\n  \"Partial interface mixin WindowOrWorkerGlobalScope: original interface mixin defined\": {\n    \"status\": \"PASS\"\n  },\n  \"Partial interface mixin WindowOrWorkerGlobalScope: member names are unique\": {\n    \"status\": \"PASS\"\n  },\n  \"Partial interface Window: member names are unique\": {\n    \"status\": \"PASS\"\n  },\n  \"Window includes GlobalEventHandlers: member names are unique\": {\n    \"status\": \"PASS\"\n  },\n  \"Window includes WindowEventHandlers: member names are unique\": {\n    \"status\": \"PASS\"\n  },\n  \"Window includes WindowOrWorkerGlobalScope: member names are unique\": {\n    \"status\": \"PASS\"\n  },\n  \"WorkerGlobalScope includes WindowOrWorkerGlobalScope: member names are unique\": {\n    \"status\": \"PASS\"\n  },\n  \"Window includes AnimationFrameProvider: member names are unique\": {\n    \"status\": \"PASS\"\n  },\n  \"Window includes WindowSessionStorage: member names are unique\": {\n    \"status\": \"PASS\"\n  },\n  \"Window includes WindowLocalStorage: member names are unique\": {\n    \"status\": \"PASS\"\n  },\n  \"Performance interface: existence and properties of interface object\": {\n    \"status\": \"FAIL\"\n  },\n  \"Performance interface object length\": {\n    \"status\": \"PASS\"\n  },\n  \"Performance interface object name\": {\n    \"status\": \"PASS\"\n  },\n  \"Performance interface: existence and properties of interface prototype object\": {\n    \"status\": \"FAIL\"\n  },\n  \"Performance interface: existence and properties of interface prototype object's \\\"constructor\\\" property\": {\n    \"status\": \"PASS\"\n  },\n  \"Performance interface: existence and properties of interface prototype object's @@unscopables property\": {\n    \"status\": \"PASS\"\n  },\n  \"Performance interface: operation now()\": {\n    \"status\": \"PASS\"\n  },\n  \"Performance interface: attribute timeOrigin\": {\n    \"status\": \"FAIL\"\n  },\n  \"Performance interface: operation toJSON()\": {\n    \"status\": \"FAIL\"\n  },\n  \"Performance must be primary interface of performance\": {\n    \"status\": \"PASS\"\n  },\n  \"Stringification of performance\": {\n    \"status\": \"FAIL\"\n  },\n  \"Performance interface: performance must inherit property \\\"now()\\\" with the proper type\": {\n    \"status\": \"FAIL\"\n  },\n  \"Performance interface: performance must inherit property \\\"timeOrigin\\\" with the proper type\": {\n    \"status\": \"FAIL\"\n  },\n  \"Performance interface: performance must inherit property \\\"toJSON()\\\" with the proper type\": {\n    \"status\": \"FAIL\"\n  },\n  \"Performance interface: default toJSON operation on performance\": {\n    \"status\": \"FAIL\"\n  },\n  \"Window interface: attribute performance\": {\n    \"status\": \"FAIL\"\n  },\n  \"WorkerGlobalScope interface: self must not have property \\\"performance\\\"\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/hr-time/monotonic-clock.any.js.json",
    "content": "{\n  \"self.performance.now() returns a positive number\": {\n    \"status\": \"PASS\"\n  },\n  \"self.performance.now() difference is not negative\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/html/webappapis/atob/base64.any.js.json",
    "content": "{\n  \"btoa(\\\"עברית\\\") must raise INVALID_CHARACTER_ERR\": {\n    \"status\": \"FAIL\"\n  },\n  \"btoa(\\\"\\\") == \\\"\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"ab\\\") == \\\"YWI=\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"abc\\\") == \\\"YWJj\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"abcd\\\") == \\\"YWJjZA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"abcde\\\") == \\\"YWJjZGU=\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"ÿÿÀ\\\") == \\\"///A\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\\0a\\\") == \\\"AGE=\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"a\\\\0b\\\") == \\\"YQBi\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(undefined) == \\\"dW5kZWZpbmVk\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(null) == \\\"bnVsbA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(7) == \\\"Nw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(12) == \\\"MTI=\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(1.5) == \\\"MS41\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(true) == \\\"dHJ1ZQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(false) == \\\"ZmFsc2U=\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(NaN) == \\\"TmFO\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(Infinity) == \\\"SW5maW5pdHk=\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(-Infinity) == \\\"LUluZmluaXR5\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(0) == \\\"MA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(-0) == \\\"MA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(object \\\"foo\\\") == \\\"Zm9v\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\\0\\\") == \\\"AA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\\x01\\\") == \\\"AQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\\x02\\\") == \\\"Ag==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\\x03\\\") == \\\"Aw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\\x04\\\") == \\\"BA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\\x05\\\") == \\\"BQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\\x06\\\") == \\\"Bg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\\x07\\\") == \\\"Bw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\\b\\\") == \\\"CA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\\t\\\") == \\\"CQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\\n\\\") == \\\"Cg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\\v\\\") == \\\"Cw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\\f\\\") == \\\"DA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\\r\\\") == \\\"DQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\\x0e\\\") == \\\"Dg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\\x0f\\\") == \\\"Dw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\\x10\\\") == \\\"EA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\\x11\\\") == \\\"EQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\\x12\\\") == \\\"Eg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\\x13\\\") == \\\"Ew==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\\x14\\\") == \\\"FA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\\x15\\\") == \\\"FQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\\x16\\\") == \\\"Fg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\\x17\\\") == \\\"Fw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\\x18\\\") == \\\"GA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\\x19\\\") == \\\"GQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\\x1a\\\") == \\\"Gg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\\x1b\\\") == \\\"Gw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\\x1c\\\") == \\\"HA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\\x1d\\\") == \\\"HQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\\x1e\\\") == \\\"Hg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\\x1f\\\") == \\\"Hw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\" \\\") == \\\"IA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"!\\\") == \\\"IQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\\\\\"\\\") == \\\"Ig==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"#\\\") == \\\"Iw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"$\\\") == \\\"JA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"%\\\") == \\\"JQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"&\\\") == \\\"Jg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"'\\\") == \\\"Jw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"(\\\") == \\\"KA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\")\\\") == \\\"KQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"*\\\") == \\\"Kg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"+\\\") == \\\"Kw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\",\\\") == \\\"LA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"-\\\") == \\\"LQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\".\\\") == \\\"Lg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"/\\\") == \\\"Lw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"0\\\") == \\\"MA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"1\\\") == \\\"MQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"2\\\") == \\\"Mg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"3\\\") == \\\"Mw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"4\\\") == \\\"NA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"5\\\") == \\\"NQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"6\\\") == \\\"Ng==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"7\\\") == \\\"Nw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"8\\\") == \\\"OA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"9\\\") == \\\"OQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\":\\\") == \\\"Og==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\";\\\") == \\\"Ow==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"<\\\") == \\\"PA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"=\\\") == \\\"PQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\">\\\") == \\\"Pg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"?\\\") == \\\"Pw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"@\\\") == \\\"QA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"A\\\") == \\\"QQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"B\\\") == \\\"Qg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"C\\\") == \\\"Qw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"D\\\") == \\\"RA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"E\\\") == \\\"RQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"F\\\") == \\\"Rg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"G\\\") == \\\"Rw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"H\\\") == \\\"SA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"I\\\") == \\\"SQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"J\\\") == \\\"Sg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"K\\\") == \\\"Sw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"L\\\") == \\\"TA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"M\\\") == \\\"TQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"N\\\") == \\\"Tg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"O\\\") == \\\"Tw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"P\\\") == \\\"UA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"Q\\\") == \\\"UQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"R\\\") == \\\"Ug==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"S\\\") == \\\"Uw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"T\\\") == \\\"VA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"U\\\") == \\\"VQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"V\\\") == \\\"Vg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"W\\\") == \\\"Vw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"X\\\") == \\\"WA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"Y\\\") == \\\"WQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"Z\\\") == \\\"Wg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"[\\\") == \\\"Ww==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\\\\\\\\\") == \\\"XA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"]\\\") == \\\"XQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"^\\\") == \\\"Xg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"_\\\") == \\\"Xw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"`\\\") == \\\"YA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"a\\\") == \\\"YQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"b\\\") == \\\"Yg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"c\\\") == \\\"Yw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"d\\\") == \\\"ZA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"e\\\") == \\\"ZQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"f\\\") == \\\"Zg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"g\\\") == \\\"Zw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"h\\\") == \\\"aA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"i\\\") == \\\"aQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"j\\\") == \\\"ag==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"k\\\") == \\\"aw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"l\\\") == \\\"bA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"m\\\") == \\\"bQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"n\\\") == \\\"bg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"o\\\") == \\\"bw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"p\\\") == \\\"cA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"q\\\") == \\\"cQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"r\\\") == \\\"cg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"s\\\") == \\\"cw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"t\\\") == \\\"dA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"u\\\") == \\\"dQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"v\\\") == \\\"dg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"w\\\") == \\\"dw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"x\\\") == \\\"eA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"y\\\") == \\\"eQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"z\\\") == \\\"eg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"{\\\") == \\\"ew==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"|\\\") == \\\"fA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"}\\\") == \\\"fQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"~\\\") == \\\"fg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\") == \\\"fw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\") == \\\"gA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\") == \\\"gQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\") == \\\"gg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\") == \\\"gw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\") == \\\"hA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\") == \\\"hQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\") == \\\"hg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\") == \\\"hw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\") == \\\"iA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\") == \\\"iQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\") == \\\"ig==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\") == \\\"iw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\") == \\\"jA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\") == \\\"jQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\") == \\\"jg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\") == \\\"jw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\") == \\\"kA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\") == \\\"kQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\") == \\\"kg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\") == \\\"kw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\") == \\\"lA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\") == \\\"lQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\") == \\\"lg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\") == \\\"lw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\") == \\\"mA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\") == \\\"mQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\") == \\\"mg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\") == \\\"mw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\") == \\\"nA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\") == \\\"nQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\") == \\\"ng==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"\\\") == \\\"nw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\" \\\") == \\\"oA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"¡\\\") == \\\"oQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"¢\\\") == \\\"og==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"£\\\") == \\\"ow==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"¤\\\") == \\\"pA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"¥\\\") == \\\"pQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"¦\\\") == \\\"pg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"§\\\") == \\\"pw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"¨\\\") == \\\"qA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"©\\\") == \\\"qQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"ª\\\") == \\\"qg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"«\\\") == \\\"qw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"¬\\\") == \\\"rA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"­\\\") == \\\"rQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"®\\\") == \\\"rg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"¯\\\") == \\\"rw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"°\\\") == \\\"sA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"±\\\") == \\\"sQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"²\\\") == \\\"sg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"³\\\") == \\\"sw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"´\\\") == \\\"tA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"µ\\\") == \\\"tQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"¶\\\") == \\\"tg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"·\\\") == \\\"tw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"¸\\\") == \\\"uA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"¹\\\") == \\\"uQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"º\\\") == \\\"ug==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"»\\\") == \\\"uw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"¼\\\") == \\\"vA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"½\\\") == \\\"vQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"¾\\\") == \\\"vg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"¿\\\") == \\\"vw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"À\\\") == \\\"wA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"Á\\\") == \\\"wQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"Â\\\") == \\\"wg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"Ã\\\") == \\\"ww==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"Ä\\\") == \\\"xA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"Å\\\") == \\\"xQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"Æ\\\") == \\\"xg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"Ç\\\") == \\\"xw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"È\\\") == \\\"yA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"É\\\") == \\\"yQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"Ê\\\") == \\\"yg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"Ë\\\") == \\\"yw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"Ì\\\") == \\\"zA==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"Í\\\") == \\\"zQ==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"Î\\\") == \\\"zg==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"Ï\\\") == \\\"zw==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"Ð\\\") == \\\"0A==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"Ñ\\\") == \\\"0Q==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"Ò\\\") == \\\"0g==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"Ó\\\") == \\\"0w==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"Ô\\\") == \\\"1A==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"Õ\\\") == \\\"1Q==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"Ö\\\") == \\\"1g==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"×\\\") == \\\"1w==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"Ø\\\") == \\\"2A==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"Ù\\\") == \\\"2Q==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"Ú\\\") == \\\"2g==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"Û\\\") == \\\"2w==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"Ü\\\") == \\\"3A==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"Ý\\\") == \\\"3Q==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"Þ\\\") == \\\"3g==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"ß\\\") == \\\"3w==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"à\\\") == \\\"4A==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"á\\\") == \\\"4Q==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"â\\\") == \\\"4g==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"ã\\\") == \\\"4w==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"ä\\\") == \\\"5A==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"å\\\") == \\\"5Q==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"æ\\\") == \\\"5g==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"ç\\\") == \\\"5w==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"è\\\") == \\\"6A==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"é\\\") == \\\"6Q==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"ê\\\") == \\\"6g==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"ë\\\") == \\\"6w==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"ì\\\") == \\\"7A==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"í\\\") == \\\"7Q==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"î\\\") == \\\"7g==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"ï\\\") == \\\"7w==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"ð\\\") == \\\"8A==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"ñ\\\") == \\\"8Q==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"ò\\\") == \\\"8g==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"ó\\\") == \\\"8w==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"ô\\\") == \\\"9A==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"õ\\\") == \\\"9Q==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"ö\\\") == \\\"9g==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"÷\\\") == \\\"9w==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"ø\\\") == \\\"+A==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"ù\\\") == \\\"+Q==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"ú\\\") == \\\"+g==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"û\\\") == \\\"+w==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"ü\\\") == \\\"/A==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"ý\\\") == \\\"/Q==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"þ\\\") == \\\"/g==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"ÿ\\\") == \\\"/w==\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"btoa(\\\"Ā\\\") must raise INVALID_CHARACTER_ERR\": {\n    \"status\": \"FAIL\"\n  },\n  \"btoa(\\\"ā\\\") must raise INVALID_CHARACTER_ERR\": {\n    \"status\": \"FAIL\"\n  },\n  \"btoa(\\\"✐\\\") must raise INVALID_CHARACTER_ERR\": {\n    \"status\": \"FAIL\"\n  },\n  \"btoa(\\\"\\\\ufffe\\\") must raise INVALID_CHARACTER_ERR\": {\n    \"status\": \"FAIL\"\n  },\n  \"btoa(\\\"\\\\uffff\\\") must raise INVALID_CHARACTER_ERR\": {\n    \"status\": \"FAIL\"\n  },\n  \"btoa(\\\"𐀀\\\") must raise INVALID_CHARACTER_ERR\": {\n    \"status\": \"FAIL\"\n  },\n  \"btoa(first 256 code points concatenated)\": {\n    \"status\": \"PASS\"\n  },\n  \"atob() setup.\": {\n    \"status\": \"PASS\"\n  },\n  \"atob(\\\"\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"atob(\\\"abcd\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"atob(\\\" abcd\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"atob(\\\"abcd \\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"atob(\\\" abcd===\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"abcd=== \\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"abcd ===\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"a\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"ab\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"atob(\\\"abc\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"atob(\\\"abcde\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"𐀀\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"=\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"==\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"===\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"====\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"=====\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"a=\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"a==\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"a===\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"a====\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"a=====\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"ab=\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"ab==\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"atob(\\\"ab===\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"ab====\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"ab=====\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"abc=\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"atob(\\\"abc==\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"abc===\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"abc====\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"abc=====\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"abcd=\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"abcd==\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"abcd===\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"abcd====\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"abcd=====\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"abcde=\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"abcde==\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"abcde===\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"abcde====\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"abcde=====\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"=a\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"=a=\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"a=b\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"a=b=\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"ab=c\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"ab=c=\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"abc=d\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"abc=d=\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"ab\\\\vcd\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"ab　cd\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"ab、cd\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"ab\\\\tcd\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"atob(\\\"ab\\\\ncd\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"atob(\\\"ab\\\\fcd\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"atob(\\\"ab\\\\rcd\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"atob(\\\"ab cd\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"atob(\\\"ab cd\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"ab\\\\t\\\\n\\\\f\\\\r cd\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"atob(\\\" \\\\t\\\\n\\\\f\\\\r ab\\\\t\\\\n\\\\f\\\\r cd\\\\t\\\\n\\\\f\\\\r \\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"atob(\\\"ab\\\\t\\\\n\\\\f\\\\r =\\\\t\\\\n\\\\f\\\\r =\\\\t\\\\n\\\\f\\\\r \\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"atob(\\\"A\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"/A\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"atob(\\\"//A\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"atob(\\\"///A\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"atob(\\\"////A\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"/\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"A/\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"atob(\\\"AA/\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"atob(\\\"AAAA/\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"AAA/\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"atob(\\\"\\\\0nonsense\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"abcd\\\\0nonsense\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"YQ\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"atob(\\\"YR\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"atob(\\\"~~\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"..\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"--\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(\\\"__\\\")\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(undefined)\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(null)\": {\n    \"status\": \"PASS\"\n  },\n  \"atob(7)\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(12)\": {\n    \"status\": \"PASS\"\n  },\n  \"atob(1.5)\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(true)\": {\n    \"status\": \"PASS\"\n  },\n  \"atob(false)\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(NaN)\": {\n    \"status\": \"PASS\"\n  },\n  \"atob(Infinity)\": {\n    \"status\": \"PASS\"\n  },\n  \"atob(-Infinity)\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(0)\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(-0)\": {\n    \"status\": \"FAIL\"\n  },\n  \"atob(object \\\"foo\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"atob(object \\\"abcd\\\")\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/html/webappapis/structured-clone/structured-clone.any.js.json",
    "content": "{\n  \"primitive undefined\": {\n    \"status\": \"PASS\"\n  },\n  \"primitive null\": {\n    \"status\": \"PASS\"\n  },\n  \"primitive true\": {\n    \"status\": \"PASS\"\n  },\n  \"primitive false\": {\n    \"status\": \"PASS\"\n  },\n  \"primitive string, empty string\": {\n    \"status\": \"PASS\"\n  },\n  \"primitive string, lone high surrogate\": {\n    \"status\": \"PASS\"\n  },\n  \"primitive string, lone low surrogate\": {\n    \"status\": \"PASS\"\n  },\n  \"primitive string, NUL\": {\n    \"status\": \"PASS\"\n  },\n  \"primitive string, astral character\": {\n    \"status\": \"PASS\"\n  },\n  \"primitive number, 0.2\": {\n    \"status\": \"PASS\"\n  },\n  \"primitive number, 0\": {\n    \"status\": \"PASS\"\n  },\n  \"primitive number, -0\": {\n    \"status\": \"PASS\"\n  },\n  \"primitive number, NaN\": {\n    \"status\": \"PASS\"\n  },\n  \"primitive number, Infinity\": {\n    \"status\": \"PASS\"\n  },\n  \"primitive number, -Infinity\": {\n    \"status\": \"PASS\"\n  },\n  \"primitive number, 9007199254740992\": {\n    \"status\": \"PASS\"\n  },\n  \"primitive number, -9007199254740992\": {\n    \"status\": \"PASS\"\n  },\n  \"primitive number, 9007199254740994\": {\n    \"status\": \"PASS\"\n  },\n  \"primitive number, -9007199254740994\": {\n    \"status\": \"PASS\"\n  },\n  \"primitive BigInt, 0n\": {\n    \"status\": \"PASS\"\n  },\n  \"primitive BigInt, -0n\": {\n    \"status\": \"PASS\"\n  },\n  \"primitive BigInt, -9007199254740994000n\": {\n    \"status\": \"PASS\"\n  },\n  \"primitive BigInt, -9007199254740994000900719925474099400090071992547409940009007199254740994000n\": {\n    \"status\": \"PASS\"\n  },\n  \"Array primitives\": {\n    \"status\": \"PASS\"\n  },\n  \"Object primitives\": {\n    \"status\": \"PASS\"\n  },\n  \"Boolean true\": {\n    \"status\": \"PASS\"\n  },\n  \"Boolean false\": {\n    \"status\": \"PASS\"\n  },\n  \"Array Boolean objects\": {\n    \"status\": \"PASS\"\n  },\n  \"Object Boolean objects\": {\n    \"status\": \"PASS\"\n  },\n  \"String empty string\": {\n    \"status\": \"PASS\"\n  },\n  \"String lone high surrogate\": {\n    \"status\": \"PASS\"\n  },\n  \"String lone low surrogate\": {\n    \"status\": \"PASS\"\n  },\n  \"String NUL\": {\n    \"status\": \"PASS\"\n  },\n  \"String astral character\": {\n    \"status\": \"PASS\"\n  },\n  \"Array String objects\": {\n    \"status\": \"PASS\"\n  },\n  \"Object String objects\": {\n    \"status\": \"PASS\"\n  },\n  \"Number 0.2\": {\n    \"status\": \"PASS\"\n  },\n  \"Number 0\": {\n    \"status\": \"PASS\"\n  },\n  \"Number -0\": {\n    \"status\": \"PASS\"\n  },\n  \"Number NaN\": {\n    \"status\": \"PASS\"\n  },\n  \"Number Infinity\": {\n    \"status\": \"PASS\"\n  },\n  \"Number -Infinity\": {\n    \"status\": \"PASS\"\n  },\n  \"Number 9007199254740992\": {\n    \"status\": \"PASS\"\n  },\n  \"Number -9007199254740992\": {\n    \"status\": \"PASS\"\n  },\n  \"Number 9007199254740994\": {\n    \"status\": \"PASS\"\n  },\n  \"Number -9007199254740994\": {\n    \"status\": \"PASS\"\n  },\n  \"BigInt -9007199254740994n\": {\n    \"status\": \"PASS\"\n  },\n  \"Array Number objects\": {\n    \"status\": \"PASS\"\n  },\n  \"Object Number objects\": {\n    \"status\": \"PASS\"\n  },\n  \"Date 0\": {\n    \"status\": \"PASS\"\n  },\n  \"Date -0\": {\n    \"status\": \"PASS\"\n  },\n  \"Date -8.64e15\": {\n    \"status\": \"PASS\"\n  },\n  \"Date 8.64e15\": {\n    \"status\": \"PASS\"\n  },\n  \"Array Date objects\": {\n    \"status\": \"PASS\"\n  },\n  \"Object Date objects\": {\n    \"status\": \"PASS\"\n  },\n  \"RegExp flags and lastIndex\": {\n    \"status\": \"PASS\"\n  },\n  \"RegExp sticky flag\": {\n    \"status\": \"PASS\"\n  },\n  \"RegExp unicode flag\": {\n    \"status\": \"PASS\"\n  },\n  \"RegExp empty\": {\n    \"status\": \"PASS\"\n  },\n  \"RegExp slash\": {\n    \"status\": \"PASS\"\n  },\n  \"RegExp new line\": {\n    \"status\": \"PASS\"\n  },\n  \"Array RegExp object, RegExp flags and lastIndex\": {\n    \"status\": \"PASS\"\n  },\n  \"Array RegExp object, RegExp sticky flag\": {\n    \"status\": \"PASS\"\n  },\n  \"Array RegExp object, RegExp unicode flag\": {\n    \"status\": \"PASS\"\n  },\n  \"Array RegExp object, RegExp empty\": {\n    \"status\": \"PASS\"\n  },\n  \"Array RegExp object, RegExp slash\": {\n    \"status\": \"PASS\"\n  },\n  \"Array RegExp object, RegExp new line\": {\n    \"status\": \"PASS\"\n  },\n  \"Object RegExp object, RegExp flags and lastIndex\": {\n    \"status\": \"PASS\"\n  },\n  \"Object RegExp object, RegExp sticky flag\": {\n    \"status\": \"PASS\"\n  },\n  \"Object RegExp object, RegExp unicode flag\": {\n    \"status\": \"PASS\"\n  },\n  \"Object RegExp object, RegExp empty\": {\n    \"status\": \"PASS\"\n  },\n  \"Object RegExp object, RegExp slash\": {\n    \"status\": \"PASS\"\n  },\n  \"Object RegExp object, RegExp new line\": {\n    \"status\": \"PASS\"\n  },\n  \"Empty Error object\": {\n    \"status\": \"PASS\"\n  },\n  \"Error object\": {\n    \"status\": \"PASS\"\n  },\n  \"EvalError object\": {\n    \"status\": \"PASS\"\n  },\n  \"RangeError object\": {\n    \"status\": \"PASS\"\n  },\n  \"ReferenceError object\": {\n    \"status\": \"PASS\"\n  },\n  \"SyntaxError object\": {\n    \"status\": \"PASS\"\n  },\n  \"TypeError object\": {\n    \"status\": \"PASS\"\n  },\n  \"URIError object\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob basic\": {\n    \"status\": \"FAIL\"\n  },\n  \"Blob unpaired high surrogate (invalid utf-8)\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob unpaired low surrogate (invalid utf-8)\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob paired surrogates (invalid utf-8)\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob empty\": {\n    \"status\": \"PASS\"\n  },\n  \"Blob NUL\": {\n    \"status\": \"PASS\"\n  },\n  \"Array Blob object, Blob basic\": {\n    \"status\": \"FAIL\"\n  },\n  \"Array Blob object, Blob unpaired high surrogate (invalid utf-8)\": {\n    \"status\": \"PASS\"\n  },\n  \"Array Blob object, Blob unpaired low surrogate (invalid utf-8)\": {\n    \"status\": \"PASS\"\n  },\n  \"Array Blob object, Blob paired surrogates (invalid utf-8)\": {\n    \"status\": \"PASS\"\n  },\n  \"Array Blob object, Blob empty\": {\n    \"status\": \"PASS\"\n  },\n  \"Array Blob object, Blob NUL\": {\n    \"status\": \"PASS\"\n  },\n  \"Array Blob object, two Blobs\": {\n    \"status\": \"FAIL\"\n  },\n  \"Object Blob object, Blob basic\": {\n    \"status\": \"FAIL\"\n  },\n  \"Object Blob object, Blob unpaired high surrogate (invalid utf-8)\": {\n    \"status\": \"PASS\"\n  },\n  \"Object Blob object, Blob unpaired low surrogate (invalid utf-8)\": {\n    \"status\": \"PASS\"\n  },\n  \"Object Blob object, Blob paired surrogates (invalid utf-8)\": {\n    \"status\": \"PASS\"\n  },\n  \"Object Blob object, Blob empty\": {\n    \"status\": \"PASS\"\n  },\n  \"Object Blob object, Blob NUL\": {\n    \"status\": \"PASS\"\n  },\n  \"File basic\": {\n    \"status\": \"FAIL\"\n  },\n  \"Array sparse\": {\n    \"status\": \"PASS\"\n  },\n  \"Array with non-index property\": {\n    \"status\": \"PASS\"\n  },\n  \"Object with index property and length\": {\n    \"status\": \"PASS\"\n  },\n  \"Array with circular reference\": {\n    \"status\": \"PASS\"\n  },\n  \"Object with circular reference\": {\n    \"status\": \"PASS\"\n  },\n  \"Array with identical property values\": {\n    \"status\": \"PASS\"\n  },\n  \"Object with identical property values\": {\n    \"status\": \"PASS\"\n  },\n  \"Object with property on prototype\": {\n    \"status\": \"PASS\"\n  },\n  \"Object with non-enumerable property\": {\n    \"status\": \"PASS\"\n  },\n  \"Object with non-writable property\": {\n    \"status\": \"PASS\"\n  },\n  \"Object with non-configurable property\": {\n    \"status\": \"PASS\"\n  },\n  \"Object with a getter that throws\": {\n    \"status\": \"PASS\"\n  },\n  \"ObjectPrototype must lose its exotic-ness when cloned\": {\n    \"status\": \"PASS\"\n  },\n  \"Serializing a non-serializable platform object fails\": {\n    \"status\": \"PASS\"\n  },\n  \"An object whose interface is deleted from the global must still deserialize\": {\n    \"status\": \"PASS\"\n  },\n  \"A subclass instance will deserialize as its closest serializable superclass\": {\n    \"status\": \"FAIL\"\n  },\n  \"Resizable ArrayBuffer\": {\n    \"status\": \"PASS\"\n  },\n  \"Growable SharedArrayBuffer\": {\n    \"status\": \"FAIL\"\n  },\n  \"Length-tracking TypedArray\": {\n    \"status\": \"PASS\"\n  },\n  \"Length-tracking DataView\": {\n    \"status\": \"PASS\"\n  },\n  \"Serializing OOB TypedArray throws\": {\n    \"status\": \"FAIL\"\n  },\n  \"Serializing OOB DataView throws\": {\n    \"status\": \"FAIL\"\n  },\n  \"ArrayBuffer\": {\n    \"status\": \"PASS\"\n  },\n  \"MessagePort\": {\n    \"status\": \"FAIL\"\n  },\n  \"A detached ArrayBuffer cannot be transferred\": {\n    \"status\": \"FAIL\"\n  },\n  \"A detached platform object cannot be transferred\": {\n    \"status\": \"FAIL\"\n  },\n  \"Transferring a non-transferable platform object fails\": {\n    \"status\": \"FAIL\"\n  },\n  \"An object whose interface is deleted from the global object must still be received\": {\n    \"status\": \"FAIL\"\n  },\n  \"A subclass instance will be received as its closest transferable superclass\": {\n    \"status\": \"FAIL\"\n  },\n  \"Resizable ArrayBuffer is transferable\": {\n    \"status\": \"PASS\"\n  },\n  \"Length-tracking TypedArray is transferable\": {\n    \"status\": \"PASS\"\n  },\n  \"Length-tracking DataView is transferable\": {\n    \"status\": \"PASS\"\n  },\n  \"Transferring OOB TypedArray throws\": {\n    \"status\": \"FAIL\"\n  },\n  \"Transferring OOB DataView throws\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/html/webappapis/timers/clearinterval-from-callback.any.js.json",
    "content": "{\n  \"Clearing an interval from the callback should still clear it.\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/html/webappapis/timers/cleartimeout-clearinterval.any.js.json",
    "content": "{\n  \"Clear timeout with clearInterval\": {\n    \"status\": \"PASS\"\n  },\n  \"Clear interval with clearTimeout\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/html/webappapis/timers/missing-timeout-setinterval.any.js.json",
    "content": "{\n  \"Calling setInterval with no interval should be the same as if called with 0 interval\": {\n    \"status\": \"PASS\"\n  },\n  \"Calling setInterval with undefined interval should be the same as if called with 0 interval\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/html/webappapis/timers/negative-setinterval.any.js.json",
    "content": "{\n  \"negative-setinterval\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/html/webappapis/timers/negative-settimeout.any.js.json",
    "content": "{\n  \"negative-settimeout\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/html/webappapis/timers/type-long-setinterval.any.js.json",
    "content": "{\n  \"type-long-setinterval\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/html/webappapis/timers/type-long-settimeout.any.js.json",
    "content": "{\n  \"type-long-settimeout\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/idlharness.any.js.json",
    "content": "{\n  \"idl_test setup\": {\n    \"status\": \"PASS\"\n  },\n  \"idl_test validation\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamDefaultReader includes ReadableStreamGenericReader: member names are unique\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBReader includes ReadableStreamGenericReader: member names are unique\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream interface: existence and properties of interface object\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream interface object length\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream interface object name\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream interface: existence and properties of interface prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream interface: existence and properties of interface prototype object's \\\"constructor\\\" property\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream interface: existence and properties of interface prototype object's @@unscopables property\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream interface: operation from(any)\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream interface: attribute locked\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream interface: operation cancel(optional any)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream interface: operation getReader(optional ReadableStreamGetReaderOptions)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream interface: operation pipeThrough(ReadableWritablePair, optional StreamPipeOptions)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream interface: operation pipeTo(WritableStream, optional StreamPipeOptions)\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream interface: operation tee()\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream interface: async iterable<any>\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream must be primary interface of new ReadableStream()\": {\n    \"status\": \"PASS\"\n  },\n  \"Stringification of new ReadableStream()\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream interface: new ReadableStream() must inherit property \\\"from(any)\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream interface: calling from(any) on new ReadableStream() with too few arguments must throw TypeError\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream interface: new ReadableStream() must inherit property \\\"locked\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream interface: new ReadableStream() must inherit property \\\"cancel(optional any)\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream interface: calling cancel(optional any) on new ReadableStream() with too few arguments must throw TypeError\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream interface: new ReadableStream() must inherit property \\\"getReader(optional ReadableStreamGetReaderOptions)\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream interface: calling getReader(optional ReadableStreamGetReaderOptions) on new ReadableStream() with too few arguments must throw TypeError\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream interface: new ReadableStream() must inherit property \\\"pipeThrough(ReadableWritablePair, optional StreamPipeOptions)\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream interface: calling pipeThrough(ReadableWritablePair, optional StreamPipeOptions) on new ReadableStream() with too few arguments must throw TypeError\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream interface: new ReadableStream() must inherit property \\\"pipeTo(WritableStream, optional StreamPipeOptions)\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream interface: calling pipeTo(WritableStream, optional StreamPipeOptions) on new ReadableStream() with too few arguments must throw TypeError\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream interface: new ReadableStream() must inherit property \\\"tee()\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamDefaultReader interface: existence and properties of interface object\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamDefaultReader interface object length\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamDefaultReader interface object name\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamDefaultReader interface: existence and properties of interface prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamDefaultReader interface: existence and properties of interface prototype object's \\\"constructor\\\" property\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamDefaultReader interface: existence and properties of interface prototype object's @@unscopables property\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamDefaultReader interface: operation read()\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStreamDefaultReader interface: operation releaseLock()\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStreamDefaultReader interface: attribute closed\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStreamDefaultReader interface: operation cancel(optional any)\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStreamDefaultReader must be primary interface of (new ReadableStream()).getReader()\": {\n    \"status\": \"PASS\"\n  },\n  \"Stringification of (new ReadableStream()).getReader()\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStreamDefaultReader interface: (new ReadableStream()).getReader() must inherit property \\\"read()\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamDefaultReader interface: (new ReadableStream()).getReader() must inherit property \\\"releaseLock()\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamDefaultReader interface: (new ReadableStream()).getReader() must inherit property \\\"closed\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamDefaultReader interface: (new ReadableStream()).getReader() must inherit property \\\"cancel(optional any)\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamDefaultReader interface: calling cancel(optional any) on (new ReadableStream()).getReader() with too few arguments must throw TypeError\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBReader interface: existence and properties of interface object\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBReader interface object length\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBReader interface object name\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBReader interface: existence and properties of interface prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBReader interface: existence and properties of interface prototype object's \\\"constructor\\\" property\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBReader interface: existence and properties of interface prototype object's @@unscopables property\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBReader interface: operation read(ArrayBufferView, optional ReadableStreamBYOBReaderReadOptions)\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStreamBYOBReader interface: operation releaseLock()\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStreamBYOBReader interface: attribute closed\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStreamBYOBReader interface: operation cancel(optional any)\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStreamBYOBReader must be primary interface of (new ReadableStream({ type: 'bytes' })).getReader({ mode: 'byob' })\": {\n    \"status\": \"PASS\"\n  },\n  \"Stringification of (new ReadableStream({ type: 'bytes' })).getReader({ mode: 'byob' })\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStreamBYOBReader interface: (new ReadableStream({ type: 'bytes' })).getReader({ mode: 'byob' }) must inherit property \\\"read(ArrayBufferView, optional ReadableStreamBYOBReaderReadOptions)\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBReader interface: calling read(ArrayBufferView, optional ReadableStreamBYOBReaderReadOptions) on (new ReadableStream({ type: 'bytes' })).getReader({ mode: 'byob' }) with too few arguments must throw TypeError\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBReader interface: (new ReadableStream({ type: 'bytes' })).getReader({ mode: 'byob' }) must inherit property \\\"releaseLock()\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBReader interface: (new ReadableStream({ type: 'bytes' })).getReader({ mode: 'byob' }) must inherit property \\\"closed\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBReader interface: (new ReadableStream({ type: 'bytes' })).getReader({ mode: 'byob' }) must inherit property \\\"cancel(optional any)\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBReader interface: calling cancel(optional any) on (new ReadableStream({ type: 'bytes' })).getReader({ mode: 'byob' }) with too few arguments must throw TypeError\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamDefaultController interface: existence and properties of interface object\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamDefaultController interface object length\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamDefaultController interface object name\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamDefaultController interface: existence and properties of interface prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamDefaultController interface: existence and properties of interface prototype object's \\\"constructor\\\" property\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamDefaultController interface: existence and properties of interface prototype object's @@unscopables property\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamDefaultController interface: attribute desiredSize\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStreamDefaultController interface: operation close()\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStreamDefaultController interface: operation enqueue(optional any)\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStreamDefaultController interface: operation error(optional any)\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStreamDefaultController must be primary interface of self.readableStreamDefaultController\": {\n    \"status\": \"PASS\"\n  },\n  \"Stringification of self.readableStreamDefaultController\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStreamDefaultController interface: self.readableStreamDefaultController must inherit property \\\"desiredSize\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamDefaultController interface: self.readableStreamDefaultController must inherit property \\\"close()\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamDefaultController interface: self.readableStreamDefaultController must inherit property \\\"enqueue(optional any)\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamDefaultController interface: calling enqueue(optional any) on self.readableStreamDefaultController with too few arguments must throw TypeError\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamDefaultController interface: self.readableStreamDefaultController must inherit property \\\"error(optional any)\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamDefaultController interface: calling error(optional any) on self.readableStreamDefaultController with too few arguments must throw TypeError\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableByteStreamController interface: existence and properties of interface object\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableByteStreamController interface object length\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableByteStreamController interface object name\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableByteStreamController interface: existence and properties of interface prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableByteStreamController interface: existence and properties of interface prototype object's \\\"constructor\\\" property\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableByteStreamController interface: existence and properties of interface prototype object's @@unscopables property\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableByteStreamController interface: attribute byobRequest\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableByteStreamController interface: attribute desiredSize\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableByteStreamController interface: operation close()\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableByteStreamController interface: operation enqueue(ArrayBufferView)\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableByteStreamController interface: operation error(optional any)\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableByteStreamController must be primary interface of self.readableByteStreamController\": {\n    \"status\": \"PASS\"\n  },\n  \"Stringification of self.readableByteStreamController\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableByteStreamController interface: self.readableByteStreamController must inherit property \\\"byobRequest\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableByteStreamController interface: self.readableByteStreamController must inherit property \\\"desiredSize\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableByteStreamController interface: self.readableByteStreamController must inherit property \\\"close()\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableByteStreamController interface: self.readableByteStreamController must inherit property \\\"enqueue(ArrayBufferView)\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableByteStreamController interface: calling enqueue(ArrayBufferView) on self.readableByteStreamController with too few arguments must throw TypeError\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableByteStreamController interface: self.readableByteStreamController must inherit property \\\"error(optional any)\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableByteStreamController interface: calling error(optional any) on self.readableByteStreamController with too few arguments must throw TypeError\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBRequest interface: existence and properties of interface object\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBRequest interface object length\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBRequest interface object name\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBRequest interface: existence and properties of interface prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBRequest interface: existence and properties of interface prototype object's \\\"constructor\\\" property\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBRequest interface: existence and properties of interface prototype object's @@unscopables property\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBRequest interface: attribute view\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStreamBYOBRequest interface: operation respond(unsigned long long)\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStreamBYOBRequest interface: operation respondWithNewView(ArrayBufferView)\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStreamBYOBRequest must be primary interface of self.readableStreamByobRequest\": {\n    \"status\": \"PASS\"\n  },\n  \"Stringification of self.readableStreamByobRequest\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStreamBYOBRequest interface: self.readableStreamByobRequest must inherit property \\\"view\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBRequest interface: self.readableStreamByobRequest must inherit property \\\"respond(unsigned long long)\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBRequest interface: calling respond(unsigned long long) on self.readableStreamByobRequest with too few arguments must throw TypeError\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStreamBYOBRequest interface: self.readableStreamByobRequest must inherit property \\\"respondWithNewView(ArrayBufferView)\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBRequest interface: calling respondWithNewView(ArrayBufferView) on self.readableStreamByobRequest with too few arguments must throw TypeError\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStream interface: existence and properties of interface object\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStream interface object length\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStream interface object name\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStream interface: existence and properties of interface prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStream interface: existence and properties of interface prototype object's \\\"constructor\\\" property\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStream interface: existence and properties of interface prototype object's @@unscopables property\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStream interface: attribute locked\": {\n    \"status\": \"FAIL\"\n  },\n  \"WritableStream interface: operation abort(optional any)\": {\n    \"status\": \"FAIL\"\n  },\n  \"WritableStream interface: operation close()\": {\n    \"status\": \"FAIL\"\n  },\n  \"WritableStream interface: operation getWriter()\": {\n    \"status\": \"FAIL\"\n  },\n  \"WritableStream must be primary interface of new WritableStream()\": {\n    \"status\": \"PASS\"\n  },\n  \"Stringification of new WritableStream()\": {\n    \"status\": \"FAIL\"\n  },\n  \"WritableStream interface: new WritableStream() must inherit property \\\"locked\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStream interface: new WritableStream() must inherit property \\\"abort(optional any)\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStream interface: calling abort(optional any) on new WritableStream() with too few arguments must throw TypeError\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStream interface: new WritableStream() must inherit property \\\"close()\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStream interface: new WritableStream() must inherit property \\\"getWriter()\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStreamDefaultWriter interface: existence and properties of interface object\": {\n    \"status\": \"FAIL\"\n  },\n  \"WritableStreamDefaultWriter interface object length\": {\n    \"status\": \"FAIL\"\n  },\n  \"WritableStreamDefaultWriter interface object name\": {\n    \"status\": \"FAIL\"\n  },\n  \"WritableStreamDefaultWriter interface: existence and properties of interface prototype object\": {\n    \"status\": \"FAIL\"\n  },\n  \"WritableStreamDefaultWriter interface: existence and properties of interface prototype object's \\\"constructor\\\" property\": {\n    \"status\": \"FAIL\"\n  },\n  \"WritableStreamDefaultWriter interface: existence and properties of interface prototype object's @@unscopables property\": {\n    \"status\": \"FAIL\"\n  },\n  \"WritableStreamDefaultWriter interface: attribute closed\": {\n    \"status\": \"FAIL\"\n  },\n  \"WritableStreamDefaultWriter interface: attribute desiredSize\": {\n    \"status\": \"FAIL\"\n  },\n  \"WritableStreamDefaultWriter interface: attribute ready\": {\n    \"status\": \"FAIL\"\n  },\n  \"WritableStreamDefaultWriter interface: operation abort(optional any)\": {\n    \"status\": \"FAIL\"\n  },\n  \"WritableStreamDefaultWriter interface: operation close()\": {\n    \"status\": \"FAIL\"\n  },\n  \"WritableStreamDefaultWriter interface: operation releaseLock()\": {\n    \"status\": \"FAIL\"\n  },\n  \"WritableStreamDefaultWriter interface: operation write(optional any)\": {\n    \"status\": \"FAIL\"\n  },\n  \"WritableStreamDefaultWriter must be primary interface of (new WritableStream()).getWriter()\": {\n    \"status\": \"FAIL\"\n  },\n  \"Stringification of (new WritableStream()).getWriter()\": {\n    \"status\": \"FAIL\"\n  },\n  \"WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property \\\"closed\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property \\\"desiredSize\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property \\\"ready\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property \\\"abort(optional any)\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStreamDefaultWriter interface: calling abort(optional any) on (new WritableStream()).getWriter() with too few arguments must throw TypeError\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property \\\"close()\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property \\\"releaseLock()\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStreamDefaultWriter interface: (new WritableStream()).getWriter() must inherit property \\\"write(optional any)\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStreamDefaultWriter interface: calling write(optional any) on (new WritableStream()).getWriter() with too few arguments must throw TypeError\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStreamDefaultController interface: existence and properties of interface object\": {\n    \"status\": \"FAIL\"\n  },\n  \"WritableStreamDefaultController interface object length\": {\n    \"status\": \"FAIL\"\n  },\n  \"WritableStreamDefaultController interface object name\": {\n    \"status\": \"FAIL\"\n  },\n  \"WritableStreamDefaultController interface: existence and properties of interface prototype object\": {\n    \"status\": \"FAIL\"\n  },\n  \"WritableStreamDefaultController interface: existence and properties of interface prototype object's \\\"constructor\\\" property\": {\n    \"status\": \"FAIL\"\n  },\n  \"WritableStreamDefaultController interface: existence and properties of interface prototype object's @@unscopables property\": {\n    \"status\": \"FAIL\"\n  },\n  \"WritableStreamDefaultController interface: attribute signal\": {\n    \"status\": \"FAIL\"\n  },\n  \"WritableStreamDefaultController interface: operation error(optional any)\": {\n    \"status\": \"FAIL\"\n  },\n  \"WritableStreamDefaultController must be primary interface of self.writableStreamDefaultController\": {\n    \"status\": \"FAIL\"\n  },\n  \"Stringification of self.writableStreamDefaultController\": {\n    \"status\": \"FAIL\"\n  },\n  \"WritableStreamDefaultController interface: self.writableStreamDefaultController must inherit property \\\"signal\\\" with the proper type\": {\n    \"status\": \"FAIL\"\n  },\n  \"WritableStreamDefaultController interface: self.writableStreamDefaultController must inherit property \\\"error(optional any)\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStreamDefaultController interface: calling error(optional any) on self.writableStreamDefaultController with too few arguments must throw TypeError\": {\n    \"status\": \"PASS\"\n  },\n  \"TransformStream interface: existence and properties of interface object\": {\n    \"status\": \"PASS\"\n  },\n  \"TransformStream interface object length\": {\n    \"status\": \"PASS\"\n  },\n  \"TransformStream interface object name\": {\n    \"status\": \"PASS\"\n  },\n  \"TransformStream interface: existence and properties of interface prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"TransformStream interface: existence and properties of interface prototype object's \\\"constructor\\\" property\": {\n    \"status\": \"PASS\"\n  },\n  \"TransformStream interface: existence and properties of interface prototype object's @@unscopables property\": {\n    \"status\": \"PASS\"\n  },\n  \"TransformStream interface: attribute readable\": {\n    \"status\": \"FAIL\"\n  },\n  \"TransformStream interface: attribute writable\": {\n    \"status\": \"FAIL\"\n  },\n  \"TransformStream must be primary interface of new TransformStream()\": {\n    \"status\": \"PASS\"\n  },\n  \"Stringification of new TransformStream()\": {\n    \"status\": \"FAIL\"\n  },\n  \"TransformStream interface: new TransformStream() must inherit property \\\"readable\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"TransformStream interface: new TransformStream() must inherit property \\\"writable\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"TransformStreamDefaultController interface: existence and properties of interface object\": {\n    \"status\": \"FAIL\"\n  },\n  \"TransformStreamDefaultController interface object length\": {\n    \"status\": \"FAIL\"\n  },\n  \"TransformStreamDefaultController interface object name\": {\n    \"status\": \"FAIL\"\n  },\n  \"TransformStreamDefaultController interface: existence and properties of interface prototype object\": {\n    \"status\": \"FAIL\"\n  },\n  \"TransformStreamDefaultController interface: existence and properties of interface prototype object's \\\"constructor\\\" property\": {\n    \"status\": \"FAIL\"\n  },\n  \"TransformStreamDefaultController interface: existence and properties of interface prototype object's @@unscopables property\": {\n    \"status\": \"FAIL\"\n  },\n  \"TransformStreamDefaultController interface: attribute desiredSize\": {\n    \"status\": \"FAIL\"\n  },\n  \"TransformStreamDefaultController interface: operation enqueue(optional any)\": {\n    \"status\": \"FAIL\"\n  },\n  \"TransformStreamDefaultController interface: operation error(optional any)\": {\n    \"status\": \"FAIL\"\n  },\n  \"TransformStreamDefaultController interface: operation terminate()\": {\n    \"status\": \"FAIL\"\n  },\n  \"TransformStreamDefaultController must be primary interface of self.transformStreamDefaultController\": {\n    \"status\": \"FAIL\"\n  },\n  \"Stringification of self.transformStreamDefaultController\": {\n    \"status\": \"FAIL\"\n  },\n  \"TransformStreamDefaultController interface: self.transformStreamDefaultController must inherit property \\\"desiredSize\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"TransformStreamDefaultController interface: self.transformStreamDefaultController must inherit property \\\"enqueue(optional any)\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"TransformStreamDefaultController interface: calling enqueue(optional any) on self.transformStreamDefaultController with too few arguments must throw TypeError\": {\n    \"status\": \"PASS\"\n  },\n  \"TransformStreamDefaultController interface: self.transformStreamDefaultController must inherit property \\\"error(optional any)\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"TransformStreamDefaultController interface: calling error(optional any) on self.transformStreamDefaultController with too few arguments must throw TypeError\": {\n    \"status\": \"PASS\"\n  },\n  \"TransformStreamDefaultController interface: self.transformStreamDefaultController must inherit property \\\"terminate()\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"ByteLengthQueuingStrategy interface: existence and properties of interface object\": {\n    \"status\": \"PASS\"\n  },\n  \"ByteLengthQueuingStrategy interface object length\": {\n    \"status\": \"PASS\"\n  },\n  \"ByteLengthQueuingStrategy interface object name\": {\n    \"status\": \"PASS\"\n  },\n  \"ByteLengthQueuingStrategy interface: existence and properties of interface prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"ByteLengthQueuingStrategy interface: existence and properties of interface prototype object's \\\"constructor\\\" property\": {\n    \"status\": \"PASS\"\n  },\n  \"ByteLengthQueuingStrategy interface: existence and properties of interface prototype object's @@unscopables property\": {\n    \"status\": \"PASS\"\n  },\n  \"ByteLengthQueuingStrategy interface: attribute highWaterMark\": {\n    \"status\": \"PASS\"\n  },\n  \"ByteLengthQueuingStrategy interface: attribute size\": {\n    \"status\": \"FAIL\"\n  },\n  \"ByteLengthQueuingStrategy must be primary interface of new ByteLengthQueuingStrategy({ highWaterMark: 5 })\": {\n    \"status\": \"PASS\"\n  },\n  \"Stringification of new ByteLengthQueuingStrategy({ highWaterMark: 5 })\": {\n    \"status\": \"PASS\"\n  },\n  \"ByteLengthQueuingStrategy interface: new ByteLengthQueuingStrategy({ highWaterMark: 5 }) must inherit property \\\"highWaterMark\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"ByteLengthQueuingStrategy interface: new ByteLengthQueuingStrategy({ highWaterMark: 5 }) must inherit property \\\"size\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"CountQueuingStrategy interface: existence and properties of interface object\": {\n    \"status\": \"PASS\"\n  },\n  \"CountQueuingStrategy interface object length\": {\n    \"status\": \"PASS\"\n  },\n  \"CountQueuingStrategy interface object name\": {\n    \"status\": \"PASS\"\n  },\n  \"CountQueuingStrategy interface: existence and properties of interface prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"CountQueuingStrategy interface: existence and properties of interface prototype object's \\\"constructor\\\" property\": {\n    \"status\": \"PASS\"\n  },\n  \"CountQueuingStrategy interface: existence and properties of interface prototype object's @@unscopables property\": {\n    \"status\": \"PASS\"\n  },\n  \"CountQueuingStrategy interface: attribute highWaterMark\": {\n    \"status\": \"PASS\"\n  },\n  \"CountQueuingStrategy interface: attribute size\": {\n    \"status\": \"FAIL\"\n  },\n  \"CountQueuingStrategy must be primary interface of new CountQueuingStrategy({ highWaterMark: 5 })\": {\n    \"status\": \"PASS\"\n  },\n  \"Stringification of new CountQueuingStrategy({ highWaterMark: 5 })\": {\n    \"status\": \"PASS\"\n  },\n  \"CountQueuingStrategy interface: new CountQueuingStrategy({ highWaterMark: 5 }) must inherit property \\\"highWaterMark\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  },\n  \"CountQueuingStrategy interface: new CountQueuingStrategy({ highWaterMark: 5 }) must inherit property \\\"size\\\" with the proper type\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/piping/close-propagation-backward.any.js.json",
    "content": "{\n  \"Closing must be propagated backward: starts closed; preventCancel omitted; fulfilled cancel promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated backward: starts closed; preventCancel omitted; rejected cancel promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated backward: starts closed; preventCancel = undefined (falsy); fulfilled cancel promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated backward: starts closed; preventCancel = null (falsy); fulfilled cancel promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated backward: starts closed; preventCancel = false (falsy); fulfilled cancel promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated backward: starts closed; preventCancel = 0 (falsy); fulfilled cancel promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated backward: starts closed; preventCancel = -0 (falsy); fulfilled cancel promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated backward: starts closed; preventCancel = NaN (falsy); fulfilled cancel promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated backward: starts closed; preventCancel =  (falsy); fulfilled cancel promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated backward: starts closed; preventCancel = true (truthy)\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated backward: starts closed; preventCancel = a (truthy)\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated backward: starts closed; preventCancel = 1 (truthy)\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated backward: starts closed; preventCancel = Symbol() (truthy)\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated backward: starts closed; preventCancel = [object Object] (truthy)\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated backward: starts closed; preventCancel = true, preventAbort = true\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated backward: starts closed; preventCancel = true, preventAbort = true, preventClose = true\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/piping/close-propagation-forward.any.js.json",
    "content": "{\n  \"Closing must be propagated forward: starts closed; preventClose omitted; fulfilled close promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated forward: starts closed; preventClose omitted; rejected close promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated forward: starts closed; preventClose = undefined (falsy); fulfilled close promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated forward: starts closed; preventClose = null (falsy); fulfilled close promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated forward: starts closed; preventClose = false (falsy); fulfilled close promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated forward: starts closed; preventClose = 0 (falsy); fulfilled close promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated forward: starts closed; preventClose = -0 (falsy); fulfilled close promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated forward: starts closed; preventClose = NaN (falsy); fulfilled close promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated forward: starts closed; preventClose =  (falsy); fulfilled close promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated forward: starts closed; preventClose = true (truthy)\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated forward: starts closed; preventClose = a (truthy)\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated forward: starts closed; preventClose = 1 (truthy)\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated forward: starts closed; preventClose = Symbol() (truthy)\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated forward: starts closed; preventClose = [object Object] (truthy)\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated forward: starts closed; preventClose = true, preventAbort = true\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated forward: starts closed; preventClose = true, preventAbort = true, preventCancel = true\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated forward: becomes closed asynchronously; preventClose omitted; fulfilled close promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated forward: becomes closed asynchronously; preventClose omitted; rejected close promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated forward: becomes closed asynchronously; preventClose = true\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated forward: becomes closed asynchronously; dest never desires chunks; preventClose omitted; fulfilled close promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated forward: becomes closed asynchronously; dest never desires chunks; preventClose omitted; rejected close promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated forward: becomes closed asynchronously; dest never desires chunks; preventClose = true\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated forward: becomes closed after one chunk; preventClose omitted; fulfilled close promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated forward: becomes closed after one chunk; preventClose omitted; rejected close promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated forward: becomes closed after one chunk; preventClose = true\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated forward: shutdown must not occur until the final write completes\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated forward: shutdown must not occur until the final write completes; preventClose = true\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated forward: shutdown must not occur until the final write completes; becomes closed after first write\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated forward: shutdown must not occur until the final write completes; becomes closed after first write; preventClose = true\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing must be propagated forward: erroring the writable while flushing pending writes should error pipeTo\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/piping/error-propagation-backward.any.js.json",
    "content": "{\n  \"Errors must be propagated backward: starts errored; preventCancel omitted; fulfilled cancel promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated backward: becomes errored before piping due to write; preventCancel omitted; fulfilled cancel promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated backward: becomes errored before piping due to write; preventCancel omitted; rejected cancel promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated backward: becomes errored before piping due to write; preventCancel = undefined (falsy); fulfilled cancel promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated backward: becomes errored before piping due to write; preventCancel = null (falsy); fulfilled cancel promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated backward: becomes errored before piping due to write; preventCancel = false (falsy); fulfilled cancel promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated backward: becomes errored before piping due to write; preventCancel = 0 (falsy); fulfilled cancel promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated backward: becomes errored before piping due to write; preventCancel = -0 (falsy); fulfilled cancel promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated backward: becomes errored before piping due to write; preventCancel = NaN (falsy); fulfilled cancel promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated backward: becomes errored before piping due to write; preventCancel =  (falsy); fulfilled cancel promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated backward: becomes errored before piping due to write; preventCancel = true (truthy)\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated backward: becomes errored before piping due to write; preventCancel = a (truthy)\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated backward: becomes errored before piping due to write; preventCancel = 1 (truthy)\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated backward: becomes errored before piping due to write; preventCancel = Symbol() (truthy)\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated backward: becomes errored before piping due to write; preventCancel = [object Object] (truthy)\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated backward: becomes errored before piping due to write, preventCancel = true; preventAbort = true\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated backward: becomes errored before piping due to write; preventCancel = true, preventAbort = true, preventClose = true\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated backward: becomes errored during piping due to write; preventCancel omitted; fulfilled cancel promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated backward: becomes errored during piping due to write; preventCancel omitted; rejected cancel promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated backward: becomes errored during piping due to write; preventCancel = true\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated backward: becomes errored during piping due to write, but async; preventCancel = false; fulfilled cancel promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated backward: becomes errored during piping due to write, but async; preventCancel = false; rejected cancel promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated backward: becomes errored during piping due to write, but async; preventCancel = true\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated backward: becomes errored after piping; preventCancel omitted; fulfilled cancel promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated backward: becomes errored after piping; preventCancel omitted; rejected cancel promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated backward: becomes errored after piping; preventCancel = true\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated backward: becomes errored after piping due to last write; source is closed; preventCancel omitted (but cancel is never called)\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated backward: becomes errored after piping due to last write; source is closed; preventCancel = true\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated backward: becomes errored after piping; dest never desires chunks; preventCancel = false; fulfilled cancel promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated backward: becomes errored after piping; dest never desires chunks; preventCancel = false; rejected cancel promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated backward: becomes errored after piping; dest never desires chunks; preventCancel = true\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated backward: becomes errored before piping via abort; preventCancel omitted; fulfilled cancel promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated backward: becomes errored before piping via abort; preventCancel omitted; rejected cancel promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated backward: becomes errored before piping via abort; preventCancel = true\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated backward: erroring via the controller errors once pending write completes\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/piping/error-propagation-forward.any.js.json",
    "content": "{\n  \"Errors must be propagated forward: starts errored; preventAbort = false; fulfilled abort promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated forward: starts errored; preventAbort = false; rejected abort promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated forward: starts errored; preventAbort = undefined (falsy); fulfilled abort promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated forward: starts errored; preventAbort = null (falsy); fulfilled abort promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated forward: starts errored; preventAbort = false (falsy); fulfilled abort promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated forward: starts errored; preventAbort = 0 (falsy); fulfilled abort promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated forward: starts errored; preventAbort = -0 (falsy); fulfilled abort promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated forward: starts errored; preventAbort = NaN (falsy); fulfilled abort promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated forward: starts errored; preventAbort =  (falsy); fulfilled abort promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated forward: starts errored; preventAbort = true (truthy)\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated forward: starts errored; preventAbort = a (truthy)\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated forward: starts errored; preventAbort = 1 (truthy)\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated forward: starts errored; preventAbort = Symbol() (truthy)\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated forward: starts errored; preventAbort = [object Object] (truthy)\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated forward: starts errored; preventAbort = true, preventCancel = true\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated forward: starts errored; preventAbort = true, preventCancel = true, preventClose = true\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated forward: becomes errored while empty; preventAbort = false; fulfilled abort promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated forward: becomes errored while empty; preventAbort = false; rejected abort promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated forward: becomes errored while empty; preventAbort = true\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated forward: becomes errored while empty; dest never desires chunks; preventAbort = false; fulfilled abort promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated forward: becomes errored while empty; dest never desires chunks; preventAbort = false; rejected abort promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated forward: becomes errored while empty; dest never desires chunks; preventAbort = true\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated forward: becomes errored after one chunk; preventAbort = false; fulfilled abort promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated forward: becomes errored after one chunk; preventAbort = false; rejected abort promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated forward: becomes errored after one chunk; preventAbort = true\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = false; fulfilled abort promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = false; rejected abort promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated forward: becomes errored after one chunk; dest never desires chunks; preventAbort = true\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated forward: shutdown must not occur until the final write completes\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated forward: shutdown must not occur until the final write completes; preventAbort = true\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated forward: shutdown must not occur until the final write completes; becomes errored after first write\": {\n    \"status\": \"PASS\"\n  },\n  \"Errors must be propagated forward: shutdown must not occur until the final write completes; becomes errored after first write; preventAbort = true\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/piping/flow-control.any.js.json",
    "content": "{\n  \"Piping from a non-empty ReadableStream into a WritableStream that does not desire chunks\": {\n    \"status\": \"PASS\"\n  },\n  \"Piping from a non-empty ReadableStream into a WritableStream that does not desire chunks, but then does\": {\n    \"status\": \"PASS\"\n  },\n  \"Piping from an empty ReadableStream into a WritableStream that does not desire chunks, but then the readable stream becomes non-empty and the writable stream starts desiring chunks\": {\n    \"status\": \"PASS\"\n  },\n  \"Piping from a ReadableStream to a WritableStream that desires more chunks before finishing with previous ones\": {\n    \"status\": \"PASS\"\n  },\n  \"Piping to a WritableStream that does not consume the writes fast enough exerts backpressure on the ReadableStream\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/piping/general-addition.any.js.json",
    "content": "{\n  \"enqueue() must not synchronously call write algorithm\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/piping/general.any.js.json",
    "content": "{\n  \"Piping must lock both the ReadableStream and WritableStream\": {\n    \"status\": \"PASS\"\n  },\n  \"Piping finishing must unlock both the ReadableStream and WritableStream\": {\n    \"status\": \"PASS\"\n  },\n  \"pipeTo must check the brand of its ReadableStream this value\": {\n    \"status\": \"FAIL\"\n  },\n  \"pipeTo must check the brand of its WritableStream argument\": {\n    \"status\": \"PASS\"\n  },\n  \"pipeTo must fail if the ReadableStream is locked, and not lock the WritableStream\": {\n    \"status\": \"PASS\"\n  },\n  \"pipeTo must fail if the WritableStream is locked, and not lock the ReadableStream\": {\n    \"status\": \"PASS\"\n  },\n  \"Piping from a ReadableStream from which lots of chunks are synchronously readable\": {\n    \"status\": \"PASS\"\n  },\n  \"Piping from a ReadableStream for which a chunk becomes asynchronously readable after the pipeTo\": {\n    \"status\": \"PASS\"\n  },\n  \"an undefined rejection from pull should cause pipeTo() to reject when preventAbort is true\": {\n    \"status\": \"PASS\"\n  },\n  \"an undefined rejection from pull should cause pipeTo() to reject when preventAbort is false\": {\n    \"status\": \"PASS\"\n  },\n  \"an undefined rejection from write should cause pipeTo() to reject when preventCancel is true\": {\n    \"status\": \"PASS\"\n  },\n  \"an undefined rejection from write should cause pipeTo() to reject when preventCancel is false\": {\n    \"status\": \"PASS\"\n  },\n  \"pipeTo() should reject if an option getter grabs a writer\": {\n    \"status\": \"PASS\"\n  },\n  \"pipeTo() promise should resolve if null is passed\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/piping/multiple-propagation.any.js.json",
    "content": "{\n  \"Piping from an errored readable stream to an erroring writable stream\": {\n    \"status\": \"PASS\"\n  },\n  \"Piping from an errored readable stream to an errored writable stream\": {\n    \"status\": \"PASS\"\n  },\n  \"Piping from an errored readable stream to an erroring writable stream; preventAbort = true\": {\n    \"status\": \"PASS\"\n  },\n  \"Piping from an errored readable stream to an errored writable stream; preventAbort = true\": {\n    \"status\": \"PASS\"\n  },\n  \"Piping from an errored readable stream to a closing writable stream\": {\n    \"status\": \"PASS\"\n  },\n  \"Piping from an errored readable stream to a closed writable stream\": {\n    \"status\": \"PASS\"\n  },\n  \"Piping from a closed readable stream to an erroring writable stream\": {\n    \"status\": \"PASS\"\n  },\n  \"Piping from a closed readable stream to an errored writable stream\": {\n    \"status\": \"PASS\"\n  },\n  \"Piping from a closed readable stream to a closed writable stream\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/piping/then-interception.any.js.json",
    "content": "{\n  \"piping should not be observable\": {\n    \"status\": \"PASS\"\n  },\n  \"tee should not be observable\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/piping/throwing-options.any.js.json",
    "content": "{\n  \"pipeTo should stop after getting preventAbort throws\": {\n    \"status\": \"FAIL\"\n  },\n  \"pipeThrough should stop after getting preventAbort throws\": {\n    \"status\": \"FAIL\"\n  },\n  \"pipeTo should stop after getting preventCancel throws\": {\n    \"status\": \"FAIL\"\n  },\n  \"pipeThrough should stop after getting preventCancel throws\": {\n    \"status\": \"FAIL\"\n  },\n  \"pipeTo should stop after getting preventClose throws\": {\n    \"status\": \"FAIL\"\n  },\n  \"pipeThrough should stop after getting preventClose throws\": {\n    \"status\": \"FAIL\"\n  },\n  \"pipeTo should stop after getting signal throws\": {\n    \"status\": \"FAIL\"\n  },\n  \"pipeThrough should stop after getting signal throws\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/piping/transform-streams.any.js.json",
    "content": "{\n  \"Piping through an identity transform stream should close the destination when the source closes\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/queuing-strategies.any.js.json",
    "content": "{\n  \"CountQueuingStrategy: Can construct a with a valid high water mark\": {\n    \"status\": \"PASS\"\n  },\n  \"CountQueuingStrategy: Constructor behaves as expected with strange arguments\": {\n    \"status\": \"PASS\"\n  },\n  \"CountQueuingStrategy: highWaterMark constructor values are converted per the unrestricted double rules\": {\n    \"status\": \"PASS\"\n  },\n  \"CountQueuingStrategy: size is the same function across all instances\": {\n    \"status\": \"PASS\"\n  },\n  \"CountQueuingStrategy: size should have the right name\": {\n    \"status\": \"PASS\"\n  },\n  \"CountQueuingStrategy: subclassing should work correctly\": {\n    \"status\": \"PASS\"\n  },\n  \"CountQueuingStrategy: size should not have a prototype property\": {\n    \"status\": \"PASS\"\n  },\n  \"ByteLengthQueuingStrategy: Can construct a with a valid high water mark\": {\n    \"status\": \"PASS\"\n  },\n  \"ByteLengthQueuingStrategy: Constructor behaves as expected with strange arguments\": {\n    \"status\": \"PASS\"\n  },\n  \"ByteLengthQueuingStrategy: highWaterMark constructor values are converted per the unrestricted double rules\": {\n    \"status\": \"PASS\"\n  },\n  \"ByteLengthQueuingStrategy: size is the same function across all instances\": {\n    \"status\": \"PASS\"\n  },\n  \"ByteLengthQueuingStrategy: size should have the right name\": {\n    \"status\": \"PASS\"\n  },\n  \"ByteLengthQueuingStrategy: subclassing should work correctly\": {\n    \"status\": \"PASS\"\n  },\n  \"ByteLengthQueuingStrategy: size should not have a prototype property\": {\n    \"status\": \"PASS\"\n  },\n  \"CountQueuingStrategy: size should not be a constructor\": {\n    \"status\": \"PASS\"\n  },\n  \"ByteLengthQueuingStrategy: size should not be a constructor\": {\n    \"status\": \"PASS\"\n  },\n  \"CountQueuingStrategy: size should have the right length\": {\n    \"status\": \"PASS\"\n  },\n  \"ByteLengthQueuingStrategy: size should have the right length\": {\n    \"status\": \"PASS\"\n  },\n  \"CountQueuingStrategy: size behaves as expected with strange arguments\": {\n    \"status\": \"PASS\"\n  },\n  \"ByteLengthQueuingStrategy: size behaves as expected with strange arguments\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/readable-byte-streams/bad-buffers-and-views.any.js.json",
    "content": "{\n  \"ReadableStream with byte source: read()ing from a closed stream still transfers the buffer\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: read()ing from a stream with queued chunks still transfers the buffer\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: enqueuing an already-detached buffer throws\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: enqueuing a zero-length buffer throws\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: enqueuing a zero-length view on a non-zero-length buffer throws\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: reading into an already-detached buffer rejects\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: reading into a zero-length buffer rejects\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: reading into a zero-length view on a non-zero-length buffer rejects\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: respond() throws if the BYOB request's buffer has been detached (in the readable state)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: respond() throws if the BYOB request's buffer has been detached (in the closed state)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: respondWithNewView() throws if the supplied view's buffer has been detached (in the readable state)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: respondWithNewView() throws if the supplied view's buffer is zero-length (in the readable state)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: respondWithNewView() throws if the supplied view is zero-length on a non-zero-length buffer (in the readable state)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: respondWithNewView() throws if the supplied view has a different offset (in the readable state)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: respondWithNewView() throws if the supplied view has a different offset (in the closed state)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: respondWithNewView() throws if the supplied view's buffer has a different length (in the readable state)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: respondWithNewView() throws if the supplied view's buffer has a different length (autoAllocateChunkSize)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: respondWithNewView() throws if the supplied view has a larger length (in the readable state)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: respondWithNewView() throws if the supplied view's buffer has been detached (in the closed state)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: respondWithNewView() throws if the supplied view's buffer is zero-length (in the closed state)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: respondWithNewView() throws if the supplied view is non-zero-length (in the closed state)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: respondWithNewView() throws if the supplied view's buffer has a different length (in the closed state)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: enqueue() throws if the BYOB request's buffer has been detached (in the readable state)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: enqueue() throws if the BYOB request's buffer has been detached (in the closed state)\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/readable-byte-streams/construct-byob-request.any.js.json",
    "content": "{\n  \"ReadableStreamBYOBRequest constructor should throw when passed a undefined ReadableByteStreamController and a undefined view\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBRequest constructor should throw when passed a undefined ReadableByteStreamController and a null view\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBRequest constructor should throw when passed a undefined ReadableByteStreamController and a fake view\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBRequest constructor should throw when passed a undefined ReadableByteStreamController and a real view\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBRequest constructor should throw when passed a null ReadableByteStreamController and a undefined view\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBRequest constructor should throw when passed a null ReadableByteStreamController and a null view\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBRequest constructor should throw when passed a null ReadableByteStreamController and a fake view\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBRequest constructor should throw when passed a null ReadableByteStreamController and a real view\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBRequest constructor should throw when passed a fake ReadableByteStreamController and a undefined view\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBRequest constructor should throw when passed a fake ReadableByteStreamController and a null view\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBRequest constructor should throw when passed a fake ReadableByteStreamController and a fake view\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBRequest constructor should throw when passed a fake ReadableByteStreamController and a real view\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBRequest constructor should throw when passed a real ReadableByteStreamController and a undefined view\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBRequest constructor should throw when passed a real ReadableByteStreamController and a null view\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBRequest constructor should throw when passed a real ReadableByteStreamController and a fake view\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBRequest constructor should throw when passed a real ReadableByteStreamController and a real view\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/readable-byte-streams/enqueue-with-detached-buffer.any.js.json",
    "content": "{\n  \"enqueue after detaching byobRequest.view.buffer should throw\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/readable-byte-streams/general.any.js.json",
    "content": "{\n  \"getReader({mode: \\\"byob\\\"}) throws on non-bytes streams\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source can be constructed with no errors\": {\n    \"status\": \"PASS\"\n  },\n  \"getReader({mode}) must perform ToString()\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: Construct and expect start and pull being called\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: No automatic pull call if start doesn't finish\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: start() throws an exception\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: Construct with highWaterMark of 0\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: desiredSize when closed\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: desiredSize when errored\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: getReader(), then releaseLock()\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: getReader() with mode set to byob, then releaseLock()\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: Test that closing a stream does not release a reader automatically\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: Test that closing a stream does not release a BYOB reader automatically\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: Test that erroring a stream does not release a reader automatically\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: Test that erroring a stream does not release a BYOB reader automatically\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: cannot use an already-released BYOB reader to unlock a stream again\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: releaseLock() on ReadableStreamDefaultReader must reject pending read()\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: releaseLock() on ReadableStreamBYOBReader must reject pending read()\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: Automatic pull() after start()\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: Automatic pull() after start() and read()\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: autoAllocateChunkSize\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: Mix of auto allocate and BYOB\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: Automatic pull() after start() and read(view)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: enqueue(), getReader(), then read()\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: Push source that doesn't understand pull signal\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: pull() function is not callable\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: enqueue() with Uint16Array, getReader(), then read()\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: enqueue(), read(view) partially, then read()\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: getReader(), enqueue(), close(), then read()\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: enqueue(), close(), getReader(), then read()\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: Respond to pull() by enqueue()\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: Respond to pull() by enqueue() asynchronously\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: Respond to multiple pull() by separate enqueue()\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: read(view), then respond()\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: read(view), then respondWithNewView() with a transferred ArrayBuffer\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: read(view), then respond() with too big value\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: respond(3) to read(view) with 2 element Uint16Array enqueues the 1 byte remainder\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: respond(3) to read(view) with 2 element Uint16Array fulfills second read(view) with the 1 byte remainder\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: enqueue(), getReader(), then read(view)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: enqueue(), getReader(), then cancel() (mode = not BYOB)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: enqueue(), getReader(), then cancel() (mode = BYOB)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: getReader(), read(view), then cancel()\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: cancel() with partially filled pending pull() request\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: enqueue(), getReader(), then read(view) where view.buffer is not fully covered by view\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: Multiple enqueue(), getReader(), then read(view)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: enqueue(), getReader(), then read(view) with a bigger view\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: enqueue(), getReader(), then read(view) with smaller views\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: enqueue() 1 byte, getReader(), then read(view) with Uint16Array\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: enqueue() 3 byte, getReader(), then read(view) with 2-element Uint16Array\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: read(view) with Uint16Array on close()-d stream with 1 byte enqueue()-d must fail\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: A stream must be errored if close()-d before fulfilling read(view) with Uint16Array\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: Throw if close()-ed more than once\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: Throw on enqueue() after close()\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: read(view), then respond() and close() in pull()\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: read(view) with Uint32Array, then fill it by multiple respond() calls\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: read(view) with Uint32Array, then fill it by multiple enqueue() calls\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: read() twice, then enqueue() twice\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: Multiple read(view), close() and respond()\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: Multiple read(view), big enqueue()\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: Multiple read(view) and multiple enqueue()\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: read(view) with passing undefined as view must fail\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: read(view) with passing an empty object as view must fail\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: Even read(view) with passing ArrayBufferView like object as view must fail\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: read() on an errored stream\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: read(), then error()\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: read(view) on an errored stream\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: read(view), then error()\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: Throwing in pull function must error the stream\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: Throwing in pull in response to read() must be ignored if the stream is errored in it\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: Throwing in pull in response to read(view) function must error the stream\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: Throwing in pull in response to read(view) must be ignored if the stream is errored in it\": {\n    \"status\": \"PASS\"\n  },\n  \"calling respond() twice on the same byobRequest should throw\": {\n    \"status\": \"PASS\"\n  },\n  \"calling respondWithNewView() twice on the same byobRequest should throw\": {\n    \"status\": \"PASS\"\n  },\n  \"calling respond(0) twice on the same byobRequest should throw even when closed\": {\n    \"status\": \"PASS\"\n  },\n  \"calling respond() should throw when canceled\": {\n    \"status\": \"PASS\"\n  },\n  \"pull() resolving should not resolve read()\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: default reader + autoAllocateChunkSize + byobRequest interaction\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: autoAllocateChunkSize cannot be 0\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBReader can be constructed directly\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBReader constructor requires a ReadableStream argument\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBReader constructor requires an unlocked ReadableStream\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamBYOBReader constructor requires a ReadableStream with type \\\"bytes\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream constructor should not accept a strategy with a size defined if type is \\\"bytes\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: respondWithNewView() with a smaller view\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: respondWithNewView() with a zero-length view (in the closed state)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: respondWithNewView() with a transferred non-zero-length view (in the readable state)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: respondWithNewView() with a transferred zero-length view (in the closed state)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: enqueue() discards auto-allocated BYOB request\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: releaseLock() with pending read(view), read(view) on second reader, respond()\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: releaseLock() with pending read(view), read(view) on second reader with 1 element Uint16Array, respond(1)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: releaseLock() with pending read(view), read(view) on second reader with 2 element Uint8Array, respond(3)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: releaseLock() with pending read(view), read(view) on second reader, respondWithNewView()\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: releaseLock() with pending read(view), read(view) on second reader, enqueue()\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: releaseLock() with pending read(view), read(view) on second reader, close(), respond(0)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: autoAllocateChunkSize, releaseLock() with pending read(), read() on second reader, respond()\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: autoAllocateChunkSize, releaseLock() with pending read(), read() on second reader, enqueue()\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: autoAllocateChunkSize, releaseLock() with pending read(), read(view) on second reader, respond()\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: autoAllocateChunkSize, releaseLock() with pending read(), read(view) on second reader, enqueue()\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: read(view) with 1 element Uint16Array, respond(1), releaseLock(), read(view) on second reader with 1 element Uint16Array, respond(1)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: read(view) with 1 element Uint16Array, respond(1), releaseLock(), read() on second reader, enqueue()\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: autoAllocateChunkSize, read(), respondWithNewView()\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/readable-byte-streams/non-transferable-buffers.any.js.json",
    "content": "{\n  \"ReadableStream with byte source: read() with a non-transferable buffer\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream with byte source: fill() with a non-transferable buffer\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream with byte source: enqueue() with a non-transferable buffer\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream with byte source: respondWithNewView() with a non-transferable buffer\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/readable-byte-streams/read-min.any.js.json",
    "content": "{\n  \"ReadableStream with byte source: read({ min }) rejects if min is 0\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream with byte source: read({ min }) rejects if min is negative\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream with byte source: read({ min }) rejects if min is larger than view's length (Uint8Array)\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream with byte source: read({ min }) rejects if min is larger than view's length (Uint16Array)\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream with byte source: read({ min }) rejects if min is larger than view's length (DataView)\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream with byte source: read({ min }), then read()\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream with byte source: read({ min }) with a DataView\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream with byte source: enqueue(), then read({ min })\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream with byte source: read({ min: 3 }) on a 3-byte Uint8Array, then multiple enqueue() up to 3 bytes\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream with byte source: read({ min: 3 }) on a 5-byte Uint8Array, then multiple enqueue() up to 3 bytes\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream with byte source: read({ min: 3 }) on a 5-byte Uint8Array, then multiple enqueue() up to 4 bytes\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream with byte source: enqueue(), read({ min }) partially, then read()\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: read({ min }), then respondWithNewView() with a transferred ArrayBuffer\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: read({ min }) on a closed stream\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: read({ min }) when closed before view is filled\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream with byte source: read({ min }) when closed immediately after view is filled\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream with byte source: read({ min }) on an errored stream\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: read({ min }), then error()\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: getReader(), read({ min }), then cancel()\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: cancel() with partially filled pending read({ min }) request\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream with byte source: enqueue(), then read({ min }) with smaller views\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream with byte source: 3 byte enqueue(), then close(), then read({ min }) with 2-element Uint16Array must fail\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream with byte source: read({ min }) with 2-element Uint16Array, then 3 byte enqueue(), then close() must fail\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream with byte source: tee() with read({ min }) from branch1 and read() from branch2\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/readable-byte-streams/respond-after-enqueue.any.js.json",
    "content": "{\n  \"byobRequest.respond() after enqueue() should not crash\": {\n    \"status\": \"PASS\"\n  },\n  \"byobRequest.respond() with cached byobRequest after enqueue() should not crash\": {\n    \"status\": \"PASS\"\n  },\n  \"byobRequest.respond() after enqueue() with double read should not crash\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/readable-byte-streams/tee.any.js.json",
    "content": "{\n  \"ReadableStream teeing with byte source: rs.tee() returns an array of two ReadableStreams\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream teeing with byte source: should be able to read one branch to the end without affecting the other\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream teeing with byte source: chunks should be cloned for each branch\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream teeing with byte source: chunks for BYOB requests from branch 1 should be cloned to branch 2\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream teeing with byte source: errors in the source should propagate to both branches\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream teeing with byte source: canceling branch1 should not impact branch2\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream teeing with byte source: canceling branch2 should not impact branch1\": {\n    \"status\": \"FAIL\"\n  },\n  \"Running templatedRSTeeCancel with ReadableStream teeing with byte source\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream teeing with byte source: canceling both branches should aggregate the cancel reasons into an array\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream teeing with byte source: canceling both branches in reverse order should aggregate the cancel reasons into an array\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream teeing with byte source: failing to cancel the original stream should cause cancel() to reject on branches\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream teeing with byte source: erroring a teed stream should properly handle canceled branches\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream teeing with byte source: closing the original should close the branches\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream teeing with byte source: erroring the original should immediately error the branches\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream teeing with byte source: erroring the original should error pending reads from default reader\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream teeing with byte source: erroring the original should error pending reads from BYOB reader\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream teeing with byte source: canceling branch1 should finish when branch2 reads until end of stream\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream teeing with byte source: canceling branch1 should finish when original stream errors\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream teeing with byte source: should not pull any chunks if no branches are reading\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream teeing with byte source: should only pull enough to fill the emptiest queue\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream teeing with byte source: should not pull when original is already errored\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream teeing with byte source: stops pulling when original stream errors while branch 1 is reading\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream teeing with byte source: stops pulling when original stream errors while branch 2 is reading\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream teeing with byte source: stops pulling when original stream errors while both branches are reading\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream teeing with byte source: canceling both branches in sequence with delay\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream teeing with byte source: failing to cancel when canceling both branches in sequence with delay\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream teeing with byte source: read from branch1 and branch2, cancel branch1, cancel branch2\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream teeing with byte source: read from branch1 and branch2, cancel branch2, cancel branch1\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream teeing with byte source: read from branch1 and branch2, cancel branch2, enqueue to branch1\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream teeing with byte source: read from branch1 and branch2, cancel branch1, respond to branch2\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream teeing with byte source: pull with BYOB reader, then pull with default reader\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream teeing with byte source: pull with default reader, then pull with BYOB reader\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream teeing with byte source: read from branch2, then read from branch1\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream teeing with byte source: read from branch1 with default reader, then close while branch2 has pending BYOB read\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream teeing with byte source: read from branch2 with default reader, then close while branch1 has pending BYOB read\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream teeing with byte source: close when both branches have pending BYOB reads\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream teeing with byte source: enqueue() and close() while both branches are pulling\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream teeing with byte source: respond() and close() while both branches are pulling\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream teeing with byte source: reading an array with a byte offset should clone correctly\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/readable-streams/async-iterator.any.js.json",
    "content": "{\n  \"Async iterator instances should have the correct list of properties\": {\n    \"status\": \"FAIL\"\n  },\n  \"Async-iterating a push source\": {\n    \"status\": \"FAIL\"\n  },\n  \"Async-iterating a pull source\": {\n    \"status\": \"FAIL\"\n  },\n  \"Async-iterating a push source with undefined values\": {\n    \"status\": \"FAIL\"\n  },\n  \"Async-iterating a pull source with undefined values\": {\n    \"status\": \"FAIL\"\n  },\n  \"Async-iterating a pull source manually\": {\n    \"status\": \"FAIL\"\n  },\n  \"Async-iterating an errored stream throws\": {\n    \"status\": \"FAIL\"\n  },\n  \"Async-iterating a closed stream never executes the loop body, but works fine\": {\n    \"status\": \"FAIL\"\n  },\n  \"Async-iterating an empty but not closed/errored stream never executes the loop body and stalls the async function\": {\n    \"status\": \"FAIL\"\n  },\n  \"Async-iterating a partially consumed stream\": {\n    \"status\": \"FAIL\"\n  },\n  \"Cancellation behavior when throwing inside loop body; preventCancel = false\": {\n    \"status\": \"FAIL\"\n  },\n  \"Cancellation behavior when throwing inside loop body; preventCancel = true\": {\n    \"status\": \"FAIL\"\n  },\n  \"Cancellation behavior when breaking inside loop body; preventCancel = false\": {\n    \"status\": \"FAIL\"\n  },\n  \"Cancellation behavior when breaking inside loop body; preventCancel = true\": {\n    \"status\": \"FAIL\"\n  },\n  \"Cancellation behavior when returning inside loop body; preventCancel = false\": {\n    \"status\": \"FAIL\"\n  },\n  \"Cancellation behavior when returning inside loop body; preventCancel = true\": {\n    \"status\": \"FAIL\"\n  },\n  \"Cancellation behavior when manually calling return(); preventCancel = false\": {\n    \"status\": \"FAIL\"\n  },\n  \"Cancellation behavior when manually calling return(); preventCancel = true\": {\n    \"status\": \"FAIL\"\n  },\n  \"next() rejects if the stream errors\": {\n    \"status\": \"FAIL\"\n  },\n  \"return() does not rejects if the stream has not errored yet\": {\n    \"status\": \"FAIL\"\n  },\n  \"return() rejects if the stream has errored\": {\n    \"status\": \"FAIL\"\n  },\n  \"next() that succeeds; next() that reports an error; next()\": {\n    \"status\": \"FAIL\"\n  },\n  \"next() that succeeds; next() that reports an error(); next() [no awaiting]\": {\n    \"status\": \"FAIL\"\n  },\n  \"next() that succeeds; next() that reports an error(); return()\": {\n    \"status\": \"FAIL\"\n  },\n  \"next() that succeeds; next() that reports an error(); return() [no awaiting]\": {\n    \"status\": \"FAIL\"\n  },\n  \"next() that succeeds; return()\": {\n    \"status\": \"FAIL\"\n  },\n  \"next() that succeeds; return() [no awaiting]\": {\n    \"status\": \"FAIL\"\n  },\n  \"return(); next()\": {\n    \"status\": \"FAIL\"\n  },\n  \"return(); next() [no awaiting]\": {\n    \"status\": \"FAIL\"\n  },\n  \"return(); next() with delayed cancel()\": {\n    \"status\": \"FAIL\"\n  },\n  \"return(); next() with delayed cancel() [no awaiting]\": {\n    \"status\": \"FAIL\"\n  },\n  \"return(); return()\": {\n    \"status\": \"FAIL\"\n  },\n  \"return(); return() [no awaiting]\": {\n    \"status\": \"FAIL\"\n  },\n  \"values() throws if there's already a lock\": {\n    \"status\": \"FAIL\"\n  },\n  \"Acquiring a reader after exhaustively async-iterating a stream\": {\n    \"status\": \"FAIL\"\n  },\n  \"Acquiring a reader after return()ing from a stream that errors\": {\n    \"status\": \"FAIL\"\n  },\n  \"Acquiring a reader after partially async-iterating a stream\": {\n    \"status\": \"FAIL\"\n  },\n  \"Acquiring a reader and reading the remaining chunks after partially async-iterating a stream with preventCancel = true\": {\n    \"status\": \"FAIL\"\n  },\n  \"return() should unlock the stream synchronously when preventCancel = false\": {\n    \"status\": \"FAIL\"\n  },\n  \"return() should unlock the stream synchronously when preventCancel = true\": {\n    \"status\": \"FAIL\"\n  },\n  \"close() while next() is pending\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/readable-streams/bad-strategies.any.js.json",
    "content": "{\n  \"Readable stream: throwing strategy.size getter\": {\n    \"status\": \"PASS\"\n  },\n  \"Readable stream: strategy.size errors the stream and then throws\": {\n    \"status\": \"PASS\"\n  },\n  \"Readable stream: strategy.size errors the stream and then returns Infinity\": {\n    \"status\": \"PASS\"\n  },\n  \"Readable stream: throwing strategy.size method\": {\n    \"status\": \"PASS\"\n  },\n  \"Readable stream: throwing strategy.highWaterMark getter\": {\n    \"status\": \"PASS\"\n  },\n  \"Readable stream: invalid strategy.highWaterMark\": {\n    \"status\": \"PASS\"\n  },\n  \"Readable stream: invalid strategy.size return value\": {\n    \"status\": \"PASS\"\n  },\n  \"Readable stream: invalid strategy.size return value when pulling\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/readable-streams/bad-underlying-sources.any.js.json",
    "content": "{\n  \"Underlying source start: throwing getter\": {\n    \"status\": \"PASS\"\n  },\n  \"Underlying source start: throwing method\": {\n    \"status\": \"PASS\"\n  },\n  \"Underlying source: throwing pull getter (initial pull)\": {\n    \"status\": \"PASS\"\n  },\n  \"Underlying source: throwing pull method (initial pull)\": {\n    \"status\": \"PASS\"\n  },\n  \"Underlying source pull: throwing getter (second pull does not result in a second get)\": {\n    \"status\": \"PASS\"\n  },\n  \"Underlying source pull: throwing method (second pull)\": {\n    \"status\": \"PASS\"\n  },\n  \"Underlying source cancel: throwing getter\": {\n    \"status\": \"PASS\"\n  },\n  \"Underlying source cancel: throwing method\": {\n    \"status\": \"PASS\"\n  },\n  \"Underlying source: calling enqueue on an empty canceled stream should throw\": {\n    \"status\": \"PASS\"\n  },\n  \"Underlying source: calling enqueue on a non-empty canceled stream should throw\": {\n    \"status\": \"PASS\"\n  },\n  \"Underlying source: calling enqueue on a closed stream should throw\": {\n    \"status\": \"PASS\"\n  },\n  \"Underlying source: calling enqueue on an errored stream should throw\": {\n    \"status\": \"PASS\"\n  },\n  \"Underlying source: calling close twice on an empty stream should throw the second time\": {\n    \"status\": \"PASS\"\n  },\n  \"Underlying source: calling close twice on a non-empty stream should throw the second time\": {\n    \"status\": \"PASS\"\n  },\n  \"Underlying source: calling close on an empty canceled stream should throw\": {\n    \"status\": \"PASS\"\n  },\n  \"Underlying source: calling close on a non-empty canceled stream should throw\": {\n    \"status\": \"PASS\"\n  },\n  \"Underlying source: calling close after error should throw\": {\n    \"status\": \"PASS\"\n  },\n  \"Underlying source: calling error twice should not throw\": {\n    \"status\": \"PASS\"\n  },\n  \"Underlying source: calling error after close should not throw\": {\n    \"status\": \"PASS\"\n  },\n  \"Underlying source: calling error and returning a rejected promise from start should cause the stream to error with the first error\": {\n    \"status\": \"PASS\"\n  },\n  \"Underlying source: calling error and returning a rejected promise from pull should cause the stream to error with the first error\": {\n    \"status\": \"PASS\"\n  },\n  \"read should not error if it dequeues and pull() throws\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/readable-streams/cancel.any.js.json",
    "content": "{\n  \"ReadableStream cancellation: integration test on an infinite stream derived from a random push source\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream cancellation: cancel(reason) should pass through the given reason to the underlying source\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream cancellation: cancel() on a locked stream should fail and not call the underlying source cancel\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream cancellation: should fulfill promise when cancel callback went fine\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream cancellation: returning a value from the underlying source's cancel should not affect the fulfillment value of the promise returned by the stream's cancel\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream cancellation: should reject promise when cancel callback raises an exception\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream cancellation: if the underlying source's cancel method returns a promise, the promise returned by the stream's cancel should fulfill when that one does (1)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream cancellation: if the underlying source's cancel method returns a promise, the promise returned by the stream's cancel should fulfill when that one does (2)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream cancellation: if the underlying source's cancel method returns a promise, the promise returned by the stream's cancel should reject when that one does\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream cancellation: cancelling before start finishes should prevent pull() from being called\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream cancellation: underlyingSource.cancel() should called, even with pending pull\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/readable-streams/constructor.any.js.json",
    "content": "{\n  \"underlyingSource argument should be converted after queuingStrategy argument\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/readable-streams/count-queuing-strategy-integration.any.js.json",
    "content": "{\n  \"Can construct a readable stream with a valid CountQueuingStrategy\": {\n    \"status\": \"PASS\"\n  },\n  \"Correctly governs a ReadableStreamController's desiredSize property (HWM = 0)\": {\n    \"status\": \"PASS\"\n  },\n  \"Correctly governs a ReadableStreamController's desiredSize property (HWM = 1)\": {\n    \"status\": \"PASS\"\n  },\n  \"Correctly governs a ReadableStreamController's desiredSize property (HWM = 4)\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/readable-streams/default-reader.any.js.json",
    "content": "{\n  \"ReadableStreamDefaultReader constructor should get a ReadableStream object as argument\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamDefaultReader closed should always return the same promise object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constructing a ReadableStreamDefaultReader directly should fail if the stream is already locked (via direct construction)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting a ReadableStreamDefaultReader via getReader should fail if the stream is already locked (via direct construction)\": {\n    \"status\": \"PASS\"\n  },\n  \"Constructing a ReadableStreamDefaultReader directly should fail if the stream is already locked (via getReader)\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting a ReadableStreamDefaultReader via getReader should fail if the stream is already locked (via getReader)\": {\n    \"status\": \"PASS\"\n  },\n  \"Constructing a ReadableStreamDefaultReader directly should be OK if the stream is closed\": {\n    \"status\": \"PASS\"\n  },\n  \"Constructing a ReadableStreamDefaultReader directly should be OK if the stream is errored\": {\n    \"status\": \"PASS\"\n  },\n  \"Reading from a reader for an empty stream will wait until a chunk is available\": {\n    \"status\": \"PASS\"\n  },\n  \"cancel() on a reader does not release the reader\": {\n    \"status\": \"PASS\"\n  },\n  \"closed should be fulfilled after stream is closed (.closed access before acquiring)\": {\n    \"status\": \"PASS\"\n  },\n  \"closed should be rejected after reader releases its lock (multiple stream locks)\": {\n    \"status\": \"PASS\"\n  },\n  \"closed is replaced when stream closes and reader releases its lock\": {\n    \"status\": \"PASS\"\n  },\n  \"closed is replaced when stream errors and reader releases its lock\": {\n    \"status\": \"PASS\"\n  },\n  \"Multiple readers can access the stream in sequence\": {\n    \"status\": \"PASS\"\n  },\n  \"Cannot use an already-released reader to unlock a stream again\": {\n    \"status\": \"PASS\"\n  },\n  \"cancel() on a released reader is a no-op and does not pass through\": {\n    \"status\": \"PASS\"\n  },\n  \"Getting a second reader after erroring the stream and releasing the reader should succeed\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamDefaultReader closed promise should be rejected with undefined if that is the error\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamDefaultReader: if start rejects with no parameter, it should error the stream with an undefined error\": {\n    \"status\": \"PASS\"\n  },\n  \"Erroring a ReadableStream after checking closed should reject ReadableStreamDefaultReader closed promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Erroring a ReadableStream before checking closed should reject ReadableStreamDefaultReader closed promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Reading twice on a stream that gets closed\": {\n    \"status\": \"PASS\"\n  },\n  \"Reading twice on a closed stream\": {\n    \"status\": \"PASS\"\n  },\n  \"Reading twice on an errored stream\": {\n    \"status\": \"PASS\"\n  },\n  \"Reading twice on a stream that gets errored\": {\n    \"status\": \"PASS\"\n  },\n  \"getReader() should call ToString() on mode\": {\n    \"status\": \"PASS\"\n  },\n  \"controller.close() should clear the list of pending read requests\": {\n    \"status\": \"PASS\"\n  },\n  \"Second reader can read chunks after first reader was released with pending read requests\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/readable-streams/floating-point-total-queue-size.any.js.json",
    "content": "{\n  \"Floating point arithmetic must manifest near NUMBER.MAX_SAFE_INTEGER (total ends up positive)\": {\n    \"status\": \"PASS\"\n  },\n  \"Floating point arithmetic must manifest near 0 (total ends up positive, but clamped)\": {\n    \"status\": \"PASS\"\n  },\n  \"Floating point arithmetic must manifest near 0 (total ends up positive, and not clamped)\": {\n    \"status\": \"PASS\"\n  },\n  \"Floating point arithmetic must manifest near 0 (total ends up zero)\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/readable-streams/from.any.js.json",
    "content": "{\n  \"ReadableStream.from accepts an array of values\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream.from accepts an array of promises\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream.from accepts an array iterator\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream.from accepts a string\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream.from accepts a Set\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream.from accepts a Set iterator\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream.from accepts a sync generator\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream.from accepts an async generator\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream.from accepts a sync iterable of values\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream.from accepts a sync iterable of promises\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream.from accepts an async iterable\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream.from accepts a ReadableStream\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream.from accepts a ReadableStream async iterator\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream.from throws on invalid iterables; specifically null\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream.from throws on invalid iterables; specifically undefined\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream.from throws on invalid iterables; specifically 0\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream.from throws on invalid iterables; specifically NaN\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream.from throws on invalid iterables; specifically true\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream.from throws on invalid iterables; specifically {}\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream.from throws on invalid iterables; specifically Object.create(null)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream.from throws on invalid iterables; specifically a function\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream.from throws on invalid iterables; specifically a symbol\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream.from throws on invalid iterables; specifically an object with a non-callable @@iterator method\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream.from throws on invalid iterables; specifically an object with a non-callable @@asyncIterator method\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream.from throws on invalid iterables; specifically an object with an @@iterator method returning a non-object\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream.from throws on invalid iterables; specifically an object with an @@asyncIterator method returning a non-object\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream.from re-throws errors from calling the @@iterator method\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream.from re-throws errors from calling the @@asyncIterator method\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream.from ignores @@iterator if @@asyncIterator exists\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream.from ignores a null @@asyncIterator\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream.from accepts an empty iterable\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream.from: stream errors when next() rejects\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream.from: stream errors when next() throws synchronously\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream.from: stream errors when next() returns a non-object\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream.from: stream errors when next() fulfills with a non-object\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream.from: stream stalls when next() never settles\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream.from: calls next() after first read()\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream.from: cancelling the returned stream calls and awaits return()\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream.from: return() is not called when iterator completes normally\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream.from: cancel() resolves when return() method is missing\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream.from: cancel() rejects when return() is not a method\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream.from: cancel() rejects when return() rejects\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream.from: cancel() rejects when return() throws synchronously\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream.from: cancel() rejects when return() fulfills with a non-object\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream.from: reader.read() inside next()\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream.from: reader.cancel() inside next()\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream.from: reader.cancel() inside return()\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream.from(array), push() to array while reading\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/readable-streams/garbage-collection.any.js.json",
    "content": "{\n  \"ReadableStreamController methods should continue working properly when scripts lose their reference to the readable stream\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream closed promise should fulfill even if the stream and reader JS references are lost\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream closed promise should reject even if stream and reader JS references are lost\": {\n    \"status\": \"PASS\"\n  },\n  \"Garbage-collecting a ReadableStreamDefaultReader should not unlock its stream\": {\n    \"status\": \"PASS\"\n  },\n  \"A ReadableStream and its reader should not be garbage collected while there is a read promise pending\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/readable-streams/general.any.js.json",
    "content": "{\n  \"ReadableStream can be constructed with no errors\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream can't be constructed with garbage\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream can't be constructed with an invalid type\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream constructor should throw for non-function start arguments\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream constructor will not tolerate initial garbage as cancel argument\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream constructor will not tolerate initial garbage as pull argument\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream start should be called with the proper thisArg\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream start controller parameter should be extensible\": {\n    \"status\": \"PASS\"\n  },\n  \"default ReadableStream getReader() should only accept mode:undefined\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream should be able to call start method within prototype chain of its source\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream start should be able to return a promise\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream start should be able to return a promise and reject it\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream should be able to enqueue different objects.\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream: if pull rejects, it should error the stream\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream: should only call pull once upon starting the stream\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream: should call pull when trying to read from a started, empty stream\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream: should only call pull once on a non-empty stream read from before start fulfills\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream: should only call pull once on a non-empty stream read from after start fulfills\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream: should call pull in reaction to read()ing the last chunk, if not draining\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream: should not call pull() in reaction to read()ing the last chunk, if draining\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream: should not call pull until the previous pull call's promise fulfills\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream: should pull after start, and after every read\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream: should not call pull after start if the stream is now closed\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream: should call pull after enqueueing from inside pull (with no read requests), if strategy allows\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream pull should be able to close a stream.\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream pull should be able to error a stream.\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream pull should be able to error a stream and throw.\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream: enqueue should throw when the stream is readable but draining\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream: enqueue should throw when the stream is closed\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream: should call underlying source methods as methods\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream: desiredSize when closed\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream: desiredSize when errored\": {\n    \"status\": \"PASS\"\n  },\n  \"Subclassing ReadableStream should work\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream strategies: the default strategy should give desiredSize of 1 to start, decreasing by 1 per enqueue\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream strategies: the default strategy should continue giving desiredSize of 1 if the chunks are read immediately\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream integration test: adapting a random push source\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream integration test: adapting a sync pull source\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream integration test: adapting an async pull source\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/readable-streams/owning-type-message-port.any.js.json",
    "content": "{\n  \"Transferred MessageChannel works as expected\": {\n    \"status\": \"FAIL\"\n  },\n  \"Second branch of owning ReadableStream tee should end up into errors with transfer only values\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/readable-streams/owning-type-video-frame.any.js.json",
    "content": "{\n  \"ReadableStream of type owning should close serialized chunks\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream of type owning should transfer JS chunks with transferred values\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream of type owning should error when trying to enqueue not serializable values\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream of type owning should clone serializable objects when teeing\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream of type owning should clone JS Objects with serializables when teeing\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/readable-streams/owning-type.any.js.json",
    "content": "{\n  \"ReadableStream can be constructed with owning type\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream of type owning should call start with a ReadableStreamDefaultController\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream should be able to call enqueue with an empty transfer list\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream should check transfer parameter\": {\n    \"status\": \"FAIL\"\n  },\n  \"ReadableStream of type owning should transfer enqueued chunks\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/readable-streams/patched-global.any.js.json",
    "content": "{\n  \"ReadableStream tee() should not touch Object.prototype properties\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream tee() should not call the global ReadableStream\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream async iterator should use the original values of getReader() and ReadableStreamDefaultReader methods\": {\n    \"status\": \"FAIL\"\n  },\n  \"tee() should not call Promise.prototype.then()\": {\n    \"status\": \"PASS\"\n  },\n  \"pipeTo() should not call Promise.prototype.then()\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/readable-streams/reentrant-strategies.any.js.json",
    "content": "{\n  \"enqueue() inside size() should work\": {\n    \"status\": \"PASS\"\n  },\n  \"close() inside size() should not crash\": {\n    \"status\": \"PASS\"\n  },\n  \"close request inside size() should work\": {\n    \"status\": \"PASS\"\n  },\n  \"error() inside size() should work\": {\n    \"status\": \"PASS\"\n  },\n  \"desiredSize inside size() should work\": {\n    \"status\": \"PASS\"\n  },\n  \"cancel() inside size() should work\": {\n    \"status\": \"PASS\"\n  },\n  \"pipeTo() inside size() should behave as expected\": {\n    \"status\": \"PASS\"\n  },\n  \"read() inside of size() should behave as expected\": {\n    \"status\": \"PASS\"\n  },\n  \"getReader() inside size() should work\": {\n    \"status\": \"PASS\"\n  },\n  \"tee() inside size() should work\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/readable-streams/tee.any.js.json",
    "content": "{\n  \"ReadableStream teeing: rs.tee() returns an array of two ReadableStreams\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream teeing: should be able to read one branch to the end without affecting the other\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream teeing: values should be equal across each branch\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream teeing: errors in the source should propagate to both branches\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream teeing: canceling branch1 should not impact branch2\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream teeing: canceling branch2 should not impact branch1\": {\n    \"status\": \"PASS\"\n  },\n  \"Running templatedRSTeeCancel with ReadableStream teeing\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream teeing: canceling both branches should aggregate the cancel reasons into an array\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream teeing: canceling both branches in reverse order should aggregate the cancel reasons into an array\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream teeing: failing to cancel the original stream should cause cancel() to reject on branches\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream teeing: erroring a teed stream should properly handle canceled branches\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream teeing: erroring a teed stream should error both branches\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream teeing: closing the original should immediately close the branches\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream teeing: erroring the original should immediately error the branches\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream teeing: canceling branch1 should finish when branch2 reads until end of stream\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream teeing: canceling branch1 should finish when original stream errors\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream teeing: canceling both branches in sequence with delay\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream teeing: failing to cancel when canceling both branches in sequence with delay\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamTee should not use a modified ReadableStream constructor from the global object\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamTee should not pull more chunks than can fit in the branch queue\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamTee should only pull enough to fill the emptiest queue\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamTee should not pull when original is already errored\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamTee stops pulling when original stream errors while branch 1 is reading\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamTee stops pulling when original stream errors while branch 2 is reading\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStreamTee stops pulling when original stream errors while both branches are reading\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream teeing: enqueue() and close() while both branches are pulling\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/readable-streams/templated.any.js.json",
    "content": "{\n  \"Running templatedRSEmpty with ReadableStream (empty)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (empty): instances have the correct methods and properties\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (empty): calling getReader with invalid arguments should throw appropriate errors\": {\n    \"status\": \"PASS\"\n  },\n  \"Running templatedRSEmptyReader with ReadableStream (empty) reader\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (empty) reader: instances have the correct methods and properties\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (empty) reader: locked should be true\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (empty) reader: read() should never settle\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (empty) reader: two read()s should both never settle\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (empty) reader: read() should return distinct promises each time\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (empty) reader: getReader() again on the stream should fail\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (empty) reader: releasing the lock should reject all pending read requests\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (empty) reader: releasing the lock should cause further read() calls to reject with a TypeError\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (empty) reader: releasing the lock should cause closed calls to reject with a TypeError\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (empty) reader: releasing the lock should cause locked to become false\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (empty) reader: canceling via the reader should cause the reader to act closed\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (empty) reader: canceling via the stream should fail\": {\n    \"status\": \"PASS\"\n  },\n  \"Running templatedRSClosed with ReadableStream (closed via call in start)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (closed via call in start): cancel() should return a distinct fulfilled promise each time\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (closed via call in start): locked should be false\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (closed via call in start): getReader() should be OK\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (closed via call in start): should be able to acquire multiple readers if they are released in succession\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (closed via call in start): should not be able to acquire a second reader if we don't release the first one\": {\n    \"status\": \"PASS\"\n  },\n  \"Running templatedRSClosedReader with ReadableStream reader (closed before getting reader)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream reader (closed before getting reader): read() should fulfill with { value: undefined, done: true }\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream reader (closed before getting reader): read() multiple times should fulfill with { value: undefined, done: true }\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream reader (closed before getting reader): read() should work when used within another read() fulfill callback\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream reader (closed before getting reader): closed should fulfill with undefined\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream reader (closed before getting reader): releasing the lock should cause closed to reject and change identity\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream reader (closed before getting reader): cancel() should return a distinct fulfilled promise each time\": {\n    \"status\": \"PASS\"\n  },\n  \"Running templatedRSClosedReader with ReadableStream reader (closed after getting reader)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream reader (closed after getting reader): read() should fulfill with { value: undefined, done: true }\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream reader (closed after getting reader): read() multiple times should fulfill with { value: undefined, done: true }\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream reader (closed after getting reader): read() should work when used within another read() fulfill callback\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream reader (closed after getting reader): closed should fulfill with undefined\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream reader (closed after getting reader): releasing the lock should cause closed to reject and change identity\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream reader (closed after getting reader): cancel() should return a distinct fulfilled promise each time\": {\n    \"status\": \"PASS\"\n  },\n  \"Running templatedRSClosed with ReadableStream (closed via cancel)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (closed via cancel): cancel() should return a distinct fulfilled promise each time\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (closed via cancel): locked should be false\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (closed via cancel): getReader() should be OK\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (closed via cancel): should be able to acquire multiple readers if they are released in succession\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (closed via cancel): should not be able to acquire a second reader if we don't release the first one\": {\n    \"status\": \"PASS\"\n  },\n  \"Running templatedRSClosedReader with ReadableStream reader (closed via cancel after getting reader)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream reader (closed via cancel after getting reader): read() should fulfill with { value: undefined, done: true }\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream reader (closed via cancel after getting reader): read() multiple times should fulfill with { value: undefined, done: true }\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream reader (closed via cancel after getting reader): read() should work when used within another read() fulfill callback\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream reader (closed via cancel after getting reader): closed should fulfill with undefined\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream reader (closed via cancel after getting reader): releasing the lock should cause closed to reject and change identity\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream reader (closed via cancel after getting reader): cancel() should return a distinct fulfilled promise each time\": {\n    \"status\": \"PASS\"\n  },\n  \"Running templatedRSErrored with ReadableStream (errored via call in start)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (errored via call in start): getReader() should return a reader that acts errored\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (errored via call in start): read() twice should give the error each time\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (errored via call in start): locked should be false\": {\n    \"status\": \"PASS\"\n  },\n  \"Running templatedRSErroredSyncOnly with ReadableStream (errored via call in start)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (errored via call in start): should be able to obtain a second reader, with the correct closed promise\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (errored via call in start): should not be able to obtain additional readers if we don't release the first lock\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (errored via call in start): cancel() should return a distinct rejected promise each time\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (errored via call in start): reader cancel() should return a distinct rejected promise each time\": {\n    \"status\": \"PASS\"\n  },\n  \"Running templatedRSErrored with ReadableStream (errored via returning a rejected promise in start)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (errored via returning a rejected promise in start): getReader() should return a reader that acts errored\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (errored via returning a rejected promise in start): read() twice should give the error each time\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (errored via returning a rejected promise in start): locked should be false\": {\n    \"status\": \"PASS\"\n  },\n  \"Running templatedRSErroredReader with ReadableStream (errored via returning a rejected promise in start) reader\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (errored via returning a rejected promise in start) reader: closed should reject with the error\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (errored via returning a rejected promise in start) reader: releasing the lock should cause closed to reject and change identity\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (errored via returning a rejected promise in start) reader: read() should reject with the error\": {\n    \"status\": \"PASS\"\n  },\n  \"Running templatedRSErroredReader with ReadableStream reader (errored before getting reader)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream reader (errored before getting reader): closed should reject with the error\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream reader (errored before getting reader): releasing the lock should cause closed to reject and change identity\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream reader (errored before getting reader): read() should reject with the error\": {\n    \"status\": \"PASS\"\n  },\n  \"Running templatedRSErroredReader with ReadableStream reader (errored after getting reader)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream reader (errored after getting reader): closed should reject with the error\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream reader (errored after getting reader): releasing the lock should cause closed to reject and change identity\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream reader (errored after getting reader): read() should reject with the error\": {\n    \"status\": \"PASS\"\n  },\n  \"Running templatedRSTwoChunksOpenReader with ReadableStream (two chunks enqueued, still open) reader\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (two chunks enqueued, still open) reader: calling read() twice without waiting will eventually give both chunks (sequential)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (two chunks enqueued, still open) reader: calling read() twice without waiting will eventually give both chunks (nested)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (two chunks enqueued, still open) reader: read() should return distinct promises each time\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (two chunks enqueued, still open) reader: cancel() after a read() should still give that single read result\": {\n    \"status\": \"PASS\"\n  },\n  \"Running templatedRSTwoChunksClosedReader with ReadableStream (two chunks enqueued, then closed) reader\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (two chunks enqueued, then closed) reader: third read(), without waiting, should give { value: undefined, done: true } (sequential)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (two chunks enqueued, then closed) reader: third read(), without waiting, should give { value: undefined, done: true } (nested)\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (two chunks enqueued, then closed) reader: draining the stream via read() should cause the reader closed promise to fulfill, but locked stays true\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (two chunks enqueued, then closed) reader: releasing the lock after the stream is closed should cause locked to become false\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (two chunks enqueued, then closed) reader: releasing the lock should cause further read() calls to reject with a TypeError\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream (two chunks enqueued, then closed) reader: reader's closed property always returns the same promise\": {\n    \"status\": \"PASS\"\n  },\n  \"Running templatedRSThrowAfterCloseOrError with ReadableStream\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream: enqueue() throws after close()\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream: enqueue() throws after enqueue() and close()\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream: enqueue() throws after error()\": {\n    \"status\": \"PASS\"\n  },\n  \"ReadableStream: close() throws after error()\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/transform-streams/backpressure.any.js.json",
    "content": "{\n  \"backpressure allows no transforms with a default identity transform and no reader\": {\n    \"status\": \"PASS\"\n  },\n  \"backpressure only allows one transform() with a identity transform with a readable HWM of 1 and no reader\": {\n    \"status\": \"PASS\"\n  },\n  \"transform() should keep being called as long as there is no backpressure\": {\n    \"status\": \"PASS\"\n  },\n  \"writes should resolve as soon as transform completes\": {\n    \"status\": \"PASS\"\n  },\n  \"calling pull() before the first write() with backpressure should work\": {\n    \"status\": \"PASS\"\n  },\n  \"transform() should be able to read the chunk it just enqueued\": {\n    \"status\": \"PASS\"\n  },\n  \"blocking transform() should cause backpressure\": {\n    \"status\": \"PASS\"\n  },\n  \"writer.closed should resolve after readable is canceled during start\": {\n    \"status\": \"PASS\"\n  },\n  \"writer.closed should resolve after readable is canceled with backpressure\": {\n    \"status\": \"PASS\"\n  },\n  \"writer.closed should resolve after readable is canceled with no backpressure\": {\n    \"status\": \"PASS\"\n  },\n  \"cancelling the readable should cause a pending write to resolve\": {\n    \"status\": \"PASS\"\n  },\n  \"cancelling the readable side of a TransformStream should abort an empty pipe\": {\n    \"status\": \"PASS\"\n  },\n  \"cancelling the readable side of a TransformStream should abort an empty pipe after startup\": {\n    \"status\": \"PASS\"\n  },\n  \"cancelling the readable side of a TransformStream should abort a full pipe\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/transform-streams/cancel.any.js.json",
    "content": "{\n  \"cancelling the readable side should call transformer.cancel()\": {\n    \"status\": \"FAIL\"\n  },\n  \"cancelling the readable side should reject if transformer.cancel() throws\": {\n    \"status\": \"FAIL\"\n  },\n  \"aborting the writable side should call transformer.abort()\": {\n    \"status\": \"FAIL\"\n  },\n  \"aborting the writable side should reject if transformer.cancel() throws\": {\n    \"status\": \"FAIL\"\n  },\n  \"closing the writable side should reject if a parallel transformer.cancel() throws\": {\n    \"status\": \"FAIL\"\n  },\n  \"readable.cancel() and a parallel writable.close() should reject if a transformer.cancel() calls controller.error()\": {\n    \"status\": \"FAIL\"\n  },\n  \"writable.abort() and readable.cancel() should reject if a transformer.cancel() calls controller.error()\": {\n    \"status\": \"FAIL\"\n  },\n  \"readable.cancel() should not call cancel() when flush() is already called from writable.close()\": {\n    \"status\": \"PASS\"\n  },\n  \"readable.cancel() should not call cancel() again when already called from writable.abort()\": {\n    \"status\": \"FAIL\"\n  },\n  \"writable.close() should not call flush() when cancel() is already called from readable.cancel()\": {\n    \"status\": \"FAIL\"\n  },\n  \"writable.abort() should not call cancel() again when already called from readable.cancel()\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/transform-streams/errors.any.js.json",
    "content": "{\n  \"TransformStream errors thrown in transform put the writable and readable in an errored state\": {\n    \"status\": \"PASS\"\n  },\n  \"TransformStream errors thrown in flush put the writable and readable in an errored state\": {\n    \"status\": \"PASS\"\n  },\n  \"errored TransformStream should not enqueue new chunks\": {\n    \"status\": \"PASS\"\n  },\n  \"TransformStream transformer.start() rejected promise should error the stream\": {\n    \"status\": \"PASS\"\n  },\n  \"when controller.error is followed by a rejection, the error reason should come from controller.error\": {\n    \"status\": \"PASS\"\n  },\n  \"TransformStream constructor should throw when start does\": {\n    \"status\": \"PASS\"\n  },\n  \"when strategy.size throws inside start(), the constructor should throw the same error\": {\n    \"status\": \"PASS\"\n  },\n  \"when strategy.size calls controller.error() then throws, the constructor should throw the first error\": {\n    \"status\": \"PASS\"\n  },\n  \"cancelling the readable side should error the writable\": {\n    \"status\": \"PASS\"\n  },\n  \"it should be possible to error the readable between close requested and complete\": {\n    \"status\": \"PASS\"\n  },\n  \"an exception from transform() should error the stream if terminate has been requested but not completed\": {\n    \"status\": \"PASS\"\n  },\n  \"abort should set the close reason for the writable when it happens before cancel during start, and cancel should reject\": {\n    \"status\": \"PASS\"\n  },\n  \"abort should set the close reason for the writable when it happens before cancel during underlying sink write, but cancel should still succeed\": {\n    \"status\": \"PASS\"\n  },\n  \"controller.error() should do nothing the second time it is called\": {\n    \"status\": \"PASS\"\n  },\n  \"controller.error() should close writable immediately after readable.cancel()\": {\n    \"status\": \"FAIL\"\n  },\n  \"controller.error() should do nothing after readable.cancel() resolves\": {\n    \"status\": \"PASS\"\n  },\n  \"controller.error() should do nothing after writable.abort() has completed\": {\n    \"status\": \"PASS\"\n  },\n  \"controller.error() should do nothing after a transformer method has thrown an exception\": {\n    \"status\": \"PASS\"\n  },\n  \"erroring during write with backpressure should result in the write failing\": {\n    \"status\": \"PASS\"\n  },\n  \"a write() that was waiting for backpressure should reject if the writable is aborted\": {\n    \"status\": \"PASS\"\n  },\n  \"the readable should be errored with the reason passed to the writable abort() method\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/transform-streams/flush.any.js.json",
    "content": "{\n  \"TransformStream flush is called immediately when the writable is closed, if no writes are queued\": {\n    \"status\": \"PASS\"\n  },\n  \"TransformStream flush is called after all queued writes finish, once the writable is closed\": {\n    \"status\": \"PASS\"\n  },\n  \"TransformStream flush gets a chance to enqueue more into the readable\": {\n    \"status\": \"PASS\"\n  },\n  \"TransformStream flush gets a chance to enqueue more into the readable, and can then async close\": {\n    \"status\": \"PASS\"\n  },\n  \"error() during flush should cause writer.close() to reject\": {\n    \"status\": \"PASS\"\n  },\n  \"closing the writable side should call transformer.flush() and a parallel readable.cancel() should not reject\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/transform-streams/general.any.js.json",
    "content": "{\n  \"TransformStream can be constructed with a transform function\": {\n    \"status\": \"PASS\"\n  },\n  \"TransformStream can be constructed with no transform function\": {\n    \"status\": \"PASS\"\n  },\n  \"TransformStream writable starts in the writable state\": {\n    \"status\": \"PASS\"\n  },\n  \"Identity TransformStream: can read from readable what is put into writable\": {\n    \"status\": \"PASS\"\n  },\n  \"Uppercaser sync TransformStream: can read from readable transformed version of what is put into writable\": {\n    \"status\": \"PASS\"\n  },\n  \"Uppercaser-doubler sync TransformStream: can read both chunks put into the readable\": {\n    \"status\": \"PASS\"\n  },\n  \"Uppercaser async TransformStream: can read from readable transformed version of what is put into writable\": {\n    \"status\": \"PASS\"\n  },\n  \"Uppercaser-doubler async TransformStream: can read both chunks put into the readable\": {\n    \"status\": \"PASS\"\n  },\n  \"TransformStream: by default, closing the writable closes the readable (when there are no queued writes)\": {\n    \"status\": \"PASS\"\n  },\n  \"TransformStream: by default, closing the writable waits for transforms to finish before closing both\": {\n    \"status\": \"PASS\"\n  },\n  \"TransformStream: by default, closing the writable closes the readable after sync enqueues and async done\": {\n    \"status\": \"PASS\"\n  },\n  \"TransformStream: by default, closing the writable closes the readable after async enqueues and async done\": {\n    \"status\": \"PASS\"\n  },\n  \"Transform stream should call transformer methods as methods\": {\n    \"status\": \"PASS\"\n  },\n  \"methods should not not have .apply() or .call() called\": {\n    \"status\": \"PASS\"\n  },\n  \"TransformStream start, transform, and flush should be strictly ordered\": {\n    \"status\": \"PASS\"\n  },\n  \"it should be possible to call transform() synchronously\": {\n    \"status\": \"PASS\"\n  },\n  \"closing the writable should close the readable when there are no queued chunks, even with backpressure\": {\n    \"status\": \"PASS\"\n  },\n  \"enqueue() should throw after controller.terminate()\": {\n    \"status\": \"PASS\"\n  },\n  \"enqueue() should throw after readable.cancel()\": {\n    \"status\": \"PASS\"\n  },\n  \"controller.terminate() should do nothing the second time it is called\": {\n    \"status\": \"PASS\"\n  },\n  \"terminate() should abort writable immediately after readable.cancel()\": {\n    \"status\": \"FAIL\"\n  },\n  \"terminate() should do nothing after readable.cancel() resolves\": {\n    \"status\": \"PASS\"\n  },\n  \"start() should not be called twice\": {\n    \"status\": \"PASS\"\n  },\n  \"specifying a defined readableType should throw\": {\n    \"status\": \"FAIL\"\n  },\n  \"specifying a defined writableType should throw\": {\n    \"status\": \"FAIL\"\n  },\n  \"Subclassing TransformStream should work\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/transform-streams/lipfuzz.any.js.json",
    "content": "{\n  \"testing \\\"\\\" (length 1)\": {\n    \"status\": \"PASS\"\n  },\n  \"testing \\\"\\\" (length 0)\": {\n    \"status\": \"PASS\"\n  },\n  \"testing \\\"{{in1}}\\\" (length 1)\": {\n    \"status\": \"PASS\"\n  },\n  \"testing \\\"z{{in1}}\\\" (length 1)\": {\n    \"status\": \"PASS\"\n  },\n  \"testing \\\"{{in1}}q\\\" (length 1)\": {\n    \"status\": \"PASS\"\n  },\n  \"testing \\\"{{in1}}{{in1}\\\" (length 1)\": {\n    \"status\": \"PASS\"\n  },\n  \"testing \\\"{{in1}}{{in1},}\\\" (length 2)\": {\n    \"status\": \"PASS\"\n  },\n  \"testing \\\"{{in1,}}\\\" (length 2)\": {\n    \"status\": \"PASS\"\n  },\n  \"testing \\\"{{,in1}}\\\" (length 2)\": {\n    \"status\": \"PASS\"\n  },\n  \"testing \\\"{,{in1}}\\\" (length 2)\": {\n    \"status\": \"PASS\"\n  },\n  \"testing \\\"{{,in1}\\\" (length 2)\": {\n    \"status\": \"PASS\"\n  },\n  \"testing \\\"{\\\" (length 1)\": {\n    \"status\": \"PASS\"\n  },\n  \"testing \\\"{,\\\" (length 2)\": {\n    \"status\": \"PASS\"\n  },\n  \"testing \\\"{,{,i,n,1,},}\\\" (length 7)\": {\n    \"status\": \"PASS\"\n  },\n  \"testing \\\"{{in1}}{{in2}}{{in1}}\\\" (length 1)\": {\n    \"status\": \"PASS\"\n  },\n  \"testing \\\"{{wrong}}\\\" (length 1)\": {\n    \"status\": \"PASS\"\n  },\n  \"testing \\\"{{wron,g}}\\\" (length 2)\": {\n    \"status\": \"PASS\"\n  },\n  \"testing \\\"{{quine}}\\\" (length 1)\": {\n    \"status\": \"PASS\"\n  },\n  \"testing \\\"{{bogusPartial}}\\\" (length 1)\": {\n    \"status\": \"PASS\"\n  },\n  \"testing \\\"{{bogusPartial}}}\\\" (length 1)\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/transform-streams/patched-global.any.js.json",
    "content": "{\n  \"TransformStream constructor should not call setters for highWaterMark or size\": {\n    \"status\": \"PASS\"\n  },\n  \"TransformStream should use the original value of ReadableStream and WritableStream\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/transform-streams/properties.any.js.json",
    "content": "{\n  \"transformer method start should be called with the right number of arguments\": {\n    \"status\": \"PASS\"\n  },\n  \"transformer method start should be called even when it's located on the prototype chain\": {\n    \"status\": \"PASS\"\n  },\n  \"transformer method transform should be called with the right number of arguments\": {\n    \"status\": \"PASS\"\n  },\n  \"transformer method transform should be called even when it's located on the prototype chain\": {\n    \"status\": \"PASS\"\n  },\n  \"transformer method flush should be called with the right number of arguments\": {\n    \"status\": \"PASS\"\n  },\n  \"transformer method flush should be called even when it's located on the prototype chain\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/transform-streams/reentrant-strategies.any.js.json",
    "content": "{\n  \"enqueue() inside size() should work\": {\n    \"status\": \"PASS\"\n  },\n  \"terminate() inside size() should work\": {\n    \"status\": \"PASS\"\n  },\n  \"error() inside size() should work\": {\n    \"status\": \"PASS\"\n  },\n  \"desiredSize inside size() should work\": {\n    \"status\": \"PASS\"\n  },\n  \"readable cancel() inside size() should work\": {\n    \"status\": \"PASS\"\n  },\n  \"pipeTo() inside size() should work\": {\n    \"status\": \"PASS\"\n  },\n  \"read() inside of size() should work\": {\n    \"status\": \"PASS\"\n  },\n  \"writer.write() inside size() should work\": {\n    \"status\": \"PASS\"\n  },\n  \"synchronous writer.write() inside size() should work\": {\n    \"status\": \"PASS\"\n  },\n  \"writer.close() inside size() should work\": {\n    \"status\": \"PASS\"\n  },\n  \"writer.abort() inside size() should work\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/transform-streams/strategies.any.js.json",
    "content": "{\n  \"writableStrategy highWaterMark should work\": {\n    \"status\": \"PASS\"\n  },\n  \"readableStrategy highWaterMark should work\": {\n    \"status\": \"PASS\"\n  },\n  \"writable should have the correct size() function\": {\n    \"status\": \"PASS\"\n  },\n  \"default writable strategy should be equivalent to { highWaterMark: 1 }\": {\n    \"status\": \"PASS\"\n  },\n  \"default readable strategy should be equivalent to { highWaterMark: 0 }\": {\n    \"status\": \"PASS\"\n  },\n  \"a RangeError should be thrown for an invalid highWaterMark\": {\n    \"status\": \"FAIL\"\n  },\n  \"writableStrategy highWaterMark should be converted to a number\": {\n    \"status\": \"PASS\"\n  },\n  \"readableStrategy highWaterMark should be converted to a number\": {\n    \"status\": \"PASS\"\n  },\n  \"a bad readableStrategy size function should cause writer.write() to reject on an identity transform\": {\n    \"status\": \"PASS\"\n  },\n  \"a bad readableStrategy size function should error the stream on enqueue even when transformer.transform() catches the exception\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/transform-streams/terminate.any.js.json",
    "content": "{\n  \"controller.terminate() should error pipeTo()\": {\n    \"status\": \"PASS\"\n  },\n  \"controller.terminate() should prevent remaining chunks from being processed\": {\n    \"status\": \"PASS\"\n  },\n  \"controller.enqueue() should throw after controller.terminate()\": {\n    \"status\": \"PASS\"\n  },\n  \"controller.error() after controller.terminate() with queued chunk should error the readable\": {\n    \"status\": \"PASS\"\n  },\n  \"controller.error() after controller.terminate() without queued chunk should do nothing\": {\n    \"status\": \"PASS\"\n  },\n  \"controller.terminate() inside flush() should not prevent writer.close() from succeeding\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/writable-streams/aborting.any.js.json",
    "content": "{\n  \"Aborting a WritableStream before it starts should cause the writer's unsettled ready promise to reject\": {\n    \"status\": \"PASS\"\n  },\n  \"Aborting a WritableStream should cause the writer's fulfilled ready promise to reset to a rejected one\": {\n    \"status\": \"PASS\"\n  },\n  \"abort() on a released writer rejects\": {\n    \"status\": \"PASS\"\n  },\n  \"Aborting a WritableStream immediately prevents future writes\": {\n    \"status\": \"PASS\"\n  },\n  \"Aborting a WritableStream prevents further writes after any that are in progress\": {\n    \"status\": \"PASS\"\n  },\n  \"Fulfillment value of writer.abort() call must be undefined even if the underlying sink returns a non-undefined value\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStream if sink's abort throws, the promise returned by writer.abort() rejects\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStream if sink's abort throws, the promise returned by multiple writer.abort()s is the same and rejects\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStream if sink's abort throws, the promise returned by ws.abort() rejects\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStream if sink's abort throws, for an abort performed during a write, the promise returned by ws.abort() rejects\": {\n    \"status\": \"PASS\"\n  },\n  \"Aborting a WritableStream passes through the given reason\": {\n    \"status\": \"PASS\"\n  },\n  \"Aborting a WritableStream puts it in an errored state with the error passed to abort()\": {\n    \"status\": \"PASS\"\n  },\n  \"Aborting a WritableStream causes any outstanding write() promises to be rejected with the reason supplied\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing but then immediately aborting a WritableStream causes the stream to error\": {\n    \"status\": \"PASS\"\n  },\n  \"Closing a WritableStream and aborting it while it closes causes the stream to ignore the abort attempt\": {\n    \"status\": \"PASS\"\n  },\n  \"Aborting a WritableStream after it is closed is a no-op\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStream should NOT call underlying sink's close if no abort is supplied (historical)\": {\n    \"status\": \"PASS\"\n  },\n  \"returning a thenable from abort() should work\": {\n    \"status\": \"PASS\"\n  },\n  \".closed should not resolve before fulfilled write()\": {\n    \"status\": \"PASS\"\n  },\n  \".closed should not resolve before rejected write(); write() error should not overwrite abort() error\": {\n    \"status\": \"PASS\"\n  },\n  \"writes should be satisfied in order when aborting\": {\n    \"status\": \"PASS\"\n  },\n  \"writes should be satisfied in order after rejected write when aborting\": {\n    \"status\": \"PASS\"\n  },\n  \"close() should reject with abort reason why abort() is first error\": {\n    \"status\": \"PASS\"\n  },\n  \"underlying abort() should not be called until underlying write() completes\": {\n    \"status\": \"PASS\"\n  },\n  \"underlying abort() should not be called if underlying close() has started\": {\n    \"status\": \"PASS\"\n  },\n  \"if underlying close() has started and then rejects, the abort() and close() promises should reject with the underlying close rejection reason\": {\n    \"status\": \"PASS\"\n  },\n  \"an abort() that happens during a write() should trigger the underlying abort() even with a close() queued\": {\n    \"status\": \"PASS\"\n  },\n  \"if a writer is created for a stream with a pending abort, its ready should be rejected with the abort error\": {\n    \"status\": \"PASS\"\n  },\n  \"writer close() promise should resolve before abort() promise\": {\n    \"status\": \"PASS\"\n  },\n  \"writer.ready should reject on controller error without waiting for underlying write\": {\n    \"status\": \"PASS\"\n  },\n  \"writer.abort() while there is an in-flight write, and then finish the write with rejection\": {\n    \"status\": \"PASS\"\n  },\n  \"writer.abort(), controller.error() while there is an in-flight write, and then finish the write\": {\n    \"status\": \"PASS\"\n  },\n  \"writer.abort(), controller.error() while there is an in-flight close, and then finish the close\": {\n    \"status\": \"PASS\"\n  },\n  \"controller.error(), writer.abort() while there is an in-flight write, and then finish the write\": {\n    \"status\": \"PASS\"\n  },\n  \"controller.error(), writer.abort() while there is an in-flight close, and then finish the close\": {\n    \"status\": \"PASS\"\n  },\n  \"releaseLock() while aborting should reject the original closed promise\": {\n    \"status\": \"PASS\"\n  },\n  \"releaseLock() during delayed async abort() should reject the writer.closed promise\": {\n    \"status\": \"PASS\"\n  },\n  \"sink abort() should not be called until sink start() is done\": {\n    \"status\": \"PASS\"\n  },\n  \"if start attempts to error the controller after abort() has been called, then it should lose\": {\n    \"status\": \"PASS\"\n  },\n  \"stream abort() promise should still resolve if sink start() rejects\": {\n    \"status\": \"PASS\"\n  },\n  \"writer abort() during sink start() should replace the writer.ready promise synchronously\": {\n    \"status\": \"PASS\"\n  },\n  \"promises returned from other writer methods should be rejected when writer abort() happens during sink start()\": {\n    \"status\": \"PASS\"\n  },\n  \"abort() should succeed despite rejection from write\": {\n    \"status\": \"PASS\"\n  },\n  \"abort() should be rejected with the rejection returned from close()\": {\n    \"status\": \"PASS\"\n  },\n  \"a rejecting sink.write() should not prevent sink.abort() from being called\": {\n    \"status\": \"PASS\"\n  },\n  \"when start errors after stream abort(), underlying sink abort() should be called anyway\": {\n    \"status\": \"PASS\"\n  },\n  \"when calling abort() twice on the same stream, both should give the same promise that fulfills with undefined\": {\n    \"status\": \"PASS\"\n  },\n  \"when calling abort() twice on the same stream, but sequentially so so there's no pending abort the second time, both should fulfill with undefined\": {\n    \"status\": \"PASS\"\n  },\n  \"calling abort() on an errored stream should fulfill with undefined\": {\n    \"status\": \"PASS\"\n  },\n  \"sink abort() should not be called if stream was erroring due to controller.error() before abort() was called\": {\n    \"status\": \"PASS\"\n  },\n  \"sink abort() should not be called if stream was erroring due to bad strategy before abort() was called\": {\n    \"status\": \"PASS\"\n  },\n  \"abort with no arguments should set the stored error to undefined\": {\n    \"status\": \"PASS\"\n  },\n  \"abort with an undefined argument should set the stored error to undefined\": {\n    \"status\": \"PASS\"\n  },\n  \"abort with a string argument should set the stored error to that argument\": {\n    \"status\": \"PASS\"\n  },\n  \"abort on a locked stream should reject\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStreamDefaultController.signal\": {\n    \"status\": \"FAIL\"\n  },\n  \"the abort signal is signalled synchronously - write\": {\n    \"status\": \"FAIL\"\n  },\n  \"the abort signal is signalled synchronously - close\": {\n    \"status\": \"FAIL\"\n  },\n  \"the abort signal is not signalled on error\": {\n    \"status\": \"FAIL\"\n  },\n  \"the abort signal is not signalled on write failure\": {\n    \"status\": \"FAIL\"\n  },\n  \"the abort signal is not signalled on close failure\": {\n    \"status\": \"FAIL\"\n  },\n  \"recursive abort() call from abort() aborting signal (not started)\": {\n    \"status\": \"FAIL\"\n  },\n  \"recursive abort() call from abort() aborting signal\": {\n    \"status\": \"FAIL\"\n  },\n  \"recursive close() call from abort() aborting signal (not started)\": {\n    \"status\": \"FAIL\"\n  },\n  \"recursive close() call from abort() aborting signal\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/writable-streams/bad-strategies.any.js.json",
    "content": "{\n  \"Writable stream: throwing strategy.size getter\": {\n    \"status\": \"PASS\"\n  },\n  \"reject any non-function value for strategy.size\": {\n    \"status\": \"PASS\"\n  },\n  \"Writable stream: throwing strategy.highWaterMark getter\": {\n    \"status\": \"PASS\"\n  },\n  \"Writable stream: invalid strategy.highWaterMark\": {\n    \"status\": \"PASS\"\n  },\n  \"Writable stream: throwing strategy.size method\": {\n    \"status\": \"PASS\"\n  },\n  \"Writable stream: invalid strategy.size return value\": {\n    \"status\": \"PASS\"\n  },\n  \"Writable stream: invalid size beats invalid highWaterMark\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/writable-streams/bad-underlying-sinks.any.js.json",
    "content": "{\n  \"start: errors in start cause WritableStream constructor to throw\": {\n    \"status\": \"PASS\"\n  },\n  \"close: throwing method should cause writer close() and ready to reject\": {\n    \"status\": \"PASS\"\n  },\n  \"close: returning a rejected promise should cause writer close() and ready to reject\": {\n    \"status\": \"PASS\"\n  },\n  \"close: throwing getter should cause constructor to throw\": {\n    \"status\": \"PASS\"\n  },\n  \"write: throwing getter should cause write() and closed to reject\": {\n    \"status\": \"PASS\"\n  },\n  \"write: throwing method should cause write() and closed to reject\": {\n    \"status\": \"PASS\"\n  },\n  \"write: returning a promise that becomes rejected after the writer write() should cause writer write() and ready to reject\": {\n    \"status\": \"PASS\"\n  },\n  \"write: returning a rejected promise (second write) should cause writer write() and ready to reject\": {\n    \"status\": \"PASS\"\n  },\n  \"start: non-function start method\": {\n    \"status\": \"PASS\"\n  },\n  \"write: non-function write method\": {\n    \"status\": \"PASS\"\n  },\n  \"close: non-function close method\": {\n    \"status\": \"PASS\"\n  },\n  \"abort: non-function abort method with .apply\": {\n    \"status\": \"PASS\"\n  },\n  \"abort: throwing getter should cause abort() and closed to reject\": {\n    \"status\": \"PASS\"\n  },\n  \"abort: throwing method should cause abort() and closed to reject\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/writable-streams/byte-length-queuing-strategy.any.js.json",
    "content": "{\n  \"Closing a writable stream with in-flight writes below the high water mark delays the close call properly\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/writable-streams/close.any.js.json",
    "content": "{\n  \"fulfillment value of writer.close() call must be undefined even if the underlying sink returns a non-undefined value\": {\n    \"status\": \"PASS\"\n  },\n  \"when sink calls error asynchronously while sink close is in-flight, the stream should not become errored\": {\n    \"status\": \"PASS\"\n  },\n  \"when sink calls error synchronously while closing, the stream should not become errored\": {\n    \"status\": \"PASS\"\n  },\n  \"when the sink throws during close, and the close is requested while a write is still in-flight, the stream should become errored during the close\": {\n    \"status\": \"PASS\"\n  },\n  \"releaseLock on a stream with a pending write in which the stream has been errored\": {\n    \"status\": \"PASS\"\n  },\n  \"releaseLock on a stream with a pending close in which controller.error() was called\": {\n    \"status\": \"PASS\"\n  },\n  \"when close is called on a WritableStream in writable state, ready should return a fulfilled promise\": {\n    \"status\": \"PASS\"\n  },\n  \"when close is called on a WritableStream in waiting state, ready promise should be fulfilled\": {\n    \"status\": \"PASS\"\n  },\n  \"when close is called on a WritableStream in waiting state, ready should be fulfilled immediately even if close takes a long time\": {\n    \"status\": \"PASS\"\n  },\n  \"returning a thenable from close() should work\": {\n    \"status\": \"PASS\"\n  },\n  \"releaseLock() should not change the result of sync close()\": {\n    \"status\": \"PASS\"\n  },\n  \"releaseLock() should not change the result of async close()\": {\n    \"status\": \"PASS\"\n  },\n  \"close() should set state to CLOSED even if writer has detached\": {\n    \"status\": \"PASS\"\n  },\n  \"the promise returned by async abort during close should resolve\": {\n    \"status\": \"PASS\"\n  },\n  \"promises must fulfill/reject in the expected order on closure\": {\n    \"status\": \"PASS\"\n  },\n  \"promises must fulfill/reject in the expected order on aborted closure\": {\n    \"status\": \"PASS\"\n  },\n  \"promises must fulfill/reject in the expected order on aborted and errored closure\": {\n    \"status\": \"PASS\"\n  },\n  \"close() should not reject until no sink methods are in flight\": {\n    \"status\": \"PASS\"\n  },\n  \"ready promise should be initialised as fulfilled for a writer on a closed stream\": {\n    \"status\": \"PASS\"\n  },\n  \"close() on a writable stream should work\": {\n    \"status\": \"PASS\"\n  },\n  \"close() on a locked stream should reject\": {\n    \"status\": \"PASS\"\n  },\n  \"close() on an erroring stream should reject\": {\n    \"status\": \"PASS\"\n  },\n  \"close() on an errored stream should reject\": {\n    \"status\": \"PASS\"\n  },\n  \"close() on an closed stream should reject\": {\n    \"status\": \"PASS\"\n  },\n  \"close() on a stream with a pending close should reject\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/writable-streams/constructor.any.js.json",
    "content": "{\n  \"controller argument should be passed to start method\": {\n    \"status\": \"PASS\"\n  },\n  \"controller argument should be passed to write method\": {\n    \"status\": \"PASS\"\n  },\n  \"controller argument should not be passed to close method\": {\n    \"status\": \"PASS\"\n  },\n  \"highWaterMark should be reflected to desiredSize\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStream should be writable and ready should fulfill immediately if the strategy does not apply backpressure\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStream should be constructible with no arguments\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStream can't be constructed with a defined type\": {\n    \"status\": \"PASS\"\n  },\n  \"underlyingSink argument should be converted after queuingStrategy argument\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStream instances should have standard methods and properties\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStreamDefaultController constructor should throw\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStreamDefaultController constructor should throw when passed an initialised WritableStream\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStreamDefaultWriter should throw unless passed a WritableStream\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStreamDefaultWriter constructor should throw when stream argument is locked\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/writable-streams/count-queuing-strategy.any.js.json",
    "content": "{\n  \"Can construct a writable stream with a valid CountQueuingStrategy\": {\n    \"status\": \"PASS\"\n  },\n  \"Correctly governs the value of a WritableStream's state property (HWM = 0)\": {\n    \"status\": \"PASS\"\n  },\n  \"Correctly governs the value of a WritableStream's state property (HWM = 4)\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/writable-streams/error.any.js.json",
    "content": "{\n  \"controller.error() should error the stream\": {\n    \"status\": \"PASS\"\n  },\n  \"controller.error() on erroring stream should not throw\": {\n    \"status\": \"PASS\"\n  },\n  \"surplus calls to controller.error() should be a no-op\": {\n    \"status\": \"PASS\"\n  },\n  \"controller.error() on errored stream should not throw\": {\n    \"status\": \"PASS\"\n  },\n  \"controller.error() on closed stream should not throw\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/writable-streams/floating-point-total-queue-size.any.js.json",
    "content": "{\n  \"Floating point arithmetic must manifest near NUMBER.MAX_SAFE_INTEGER (total ends up positive)\": {\n    \"status\": \"PASS\"\n  },\n  \"Floating point arithmetic must manifest near 0 (total ends up positive, but clamped)\": {\n    \"status\": \"PASS\"\n  },\n  \"Floating point arithmetic must manifest near 0 (total ends up positive, and not clamped)\": {\n    \"status\": \"PASS\"\n  },\n  \"Floating point arithmetic must manifest near 0 (total ends up zero)\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/writable-streams/general.any.js.json",
    "content": "{\n  \"desiredSize on a released writer\": {\n    \"status\": \"PASS\"\n  },\n  \"desiredSize initial value\": {\n    \"status\": \"PASS\"\n  },\n  \"desiredSize on a writer for a closed stream\": {\n    \"status\": \"PASS\"\n  },\n  \"desiredSize on a writer for an errored stream\": {\n    \"status\": \"PASS\"\n  },\n  \"ws.getWriter() on a closing WritableStream\": {\n    \"status\": \"PASS\"\n  },\n  \"ws.getWriter() on a closed WritableStream\": {\n    \"status\": \"PASS\"\n  },\n  \"ws.getWriter() on an aborted WritableStream\": {\n    \"status\": \"PASS\"\n  },\n  \"ws.getWriter() on an errored WritableStream\": {\n    \"status\": \"PASS\"\n  },\n  \"closed and ready on a released writer\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStream should call underlying sink methods as methods\": {\n    \"status\": \"PASS\"\n  },\n  \"methods should not not have .apply() or .call() called\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStream's strategy.size should not be called as a method\": {\n    \"status\": \"PASS\"\n  },\n  \"redundant releaseLock() is no-op\": {\n    \"status\": \"PASS\"\n  },\n  \"ready promise should fire before closed on releaseLock\": {\n    \"status\": \"PASS\"\n  },\n  \"Subclassing WritableStream should work\": {\n    \"status\": \"PASS\"\n  },\n  \"the locked getter should return true if the stream has a writer\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/writable-streams/properties.any.js.json",
    "content": "{\n  \"sink method start should be called with the right number of arguments\": {\n    \"status\": \"PASS\"\n  },\n  \"sink method start should be called even when it's located on the prototype chain\": {\n    \"status\": \"PASS\"\n  },\n  \"sink method write should be called with the right number of arguments\": {\n    \"status\": \"PASS\"\n  },\n  \"sink method write should be called even when it's located on the prototype chain\": {\n    \"status\": \"PASS\"\n  },\n  \"sink method close should be called with the right number of arguments\": {\n    \"status\": \"PASS\"\n  },\n  \"sink method close should be called even when it's located on the prototype chain\": {\n    \"status\": \"PASS\"\n  },\n  \"sink method abort should be called with the right number of arguments\": {\n    \"status\": \"PASS\"\n  },\n  \"sink method abort should be called even when it's located on the prototype chain\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/writable-streams/reentrant-strategy.any.js.json",
    "content": "{\n  \"writes should be written in the standard order\": {\n    \"status\": \"PASS\"\n  },\n  \"writer.write() promises should resolve in the standard order\": {\n    \"status\": \"PASS\"\n  },\n  \"controller.error() should work when called from within strategy.size()\": {\n    \"status\": \"PASS\"\n  },\n  \"close() should work when called from within strategy.size()\": {\n    \"status\": \"PASS\"\n  },\n  \"abort() should work when called from within strategy.size()\": {\n    \"status\": \"PASS\"\n  },\n  \"releaseLock() should abort the write() when called within strategy.size()\": {\n    \"status\": \"PASS\"\n  },\n  \"original reader should error when new reader is created within strategy.size()\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/writable-streams/start.any.js.json",
    "content": "{\n  \"underlying sink's write should not be called until start finishes\": {\n    \"status\": \"PASS\"\n  },\n  \"underlying sink's close should not be called until start finishes\": {\n    \"status\": \"PASS\"\n  },\n  \"underlying sink's write or close should not be called if start throws\": {\n    \"status\": \"PASS\"\n  },\n  \"underlying sink's write or close should not be invoked if the promise returned by start is rejected\": {\n    \"status\": \"PASS\"\n  },\n  \"returning a thenable from start() should work\": {\n    \"status\": \"PASS\"\n  },\n  \"controller.error() during start should cause writes to fail\": {\n    \"status\": \"PASS\"\n  },\n  \"controller.error() during async start should cause existing writes to fail\": {\n    \"status\": \"PASS\"\n  },\n  \"when start() rejects, writer promises should reject in standard order\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/streams/writable-streams/write.any.js.json",
    "content": "{\n  \"WritableStream should complete asynchronous writes before close resolves\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStream should complete synchronous writes before close resolves\": {\n    \"status\": \"PASS\"\n  },\n  \"fulfillment value of ws.write() call should be undefined even if the underlying sink returns a non-undefined value\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStream should transition to waiting until write is acknowledged\": {\n    \"status\": \"PASS\"\n  },\n  \"when write returns a rejected promise, queued writes and close should be cleared\": {\n    \"status\": \"PASS\"\n  },\n  \"when sink's write throws an error, the stream should become errored and the promise should reject\": {\n    \"status\": \"PASS\"\n  },\n  \"writer.write(), ready and closed reject with the error passed to controller.error() made before sink.write rejection\": {\n    \"status\": \"PASS\"\n  },\n  \"a large queue of writes should be processed completely\": {\n    \"status\": \"PASS\"\n  },\n  \"WritableStreamDefaultWriter should work when manually constructed\": {\n    \"status\": \"PASS\"\n  },\n  \"returning a thenable from write() should work\": {\n    \"status\": \"PASS\"\n  },\n  \"failing DefaultWriter constructor should not release an existing writer\": {\n    \"status\": \"PASS\"\n  },\n  \"write() on a stream with HWM 0 should not cause the ready Promise to resolve\": {\n    \"status\": \"PASS\"\n  },\n  \"writing to a released writer should reject the returned promise\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/url/historical.any.js.json",
    "content": "{\n  \"searchParams on location object\": {\n    \"status\": \"FAIL\"\n  },\n  \"Setting URL's href attribute and base URLs\": {\n    \"status\": \"FAIL\"\n  },\n  \"URL.domainToASCII should be undefined\": {\n    \"status\": \"PASS\"\n  },\n  \"URL.domainToUnicode should be undefined\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: no structured serialize/deserialize support\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams: no structured serialize/deserialize support\": {\n    \"status\": \"FAIL\"\n  },\n  \"Constructor only takes strings\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/url/url-constructor.any.js.json",
    "content": "{\n  \"Loading data…\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example\\t.\\norg> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://user:pass@foo:21/bar;par?b#c> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://test:@test> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://:@test> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <non-special://test:@test/x> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <non-special://:@test/x> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http:foo.com> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <\\t   :foo.com   \\n> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: < foo.com  > against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <a:\\t foo.com> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://f:21/ b ? d # e > against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <lolscheme:x x#x x> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://f:/c> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://f:0/c> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://f:00000000000000/c> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://f:00000000000000000000080/c> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://f:b/c> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://f: /c> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://f:\\n/c> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://f:fifty-two/c> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://f:999999/c> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <non-special://f:999999/c> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://f: 21 / b ? d # e > against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <  \\t> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <:foo.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <:foo.com\\\\> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <:> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <:a> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <:/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <:\\\\> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <:#> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <#> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <#/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <#\\\\> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <#;?> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <?> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: </> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <:23> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: </:23> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <\\\\x> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <\\\\\\\\x\\\\hello> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <::> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <::23> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <foo://> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a:b@c:29/d> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http::@c:29> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://&a:foo(b]c@d:2/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://::@c@d:2> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://foo.com:b@d/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://foo.com/\\\\@> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http:\\\\\\\\foo.com\\\\> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http:\\\\\\\\a\\\\b:c\\\\d@foo.com\\\\> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a:b@c\\\\> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <ws://a@b\\\\c> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <foo:/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <foo:/bar.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <foo://///////> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <foo://///////bar.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <foo:////://///> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <c:/foo> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <//foo/bar> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://foo/path;a??e#f#g> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://foo/abcd?efgh?ijkl> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://foo/abcd#foo?bar> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <[61:24:74]:98> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http:[61:27]/:foo> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://[1::2]:3:4> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://2001::1> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://2001::1]> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://2001::1]:80> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://[2001::1]> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://[::127.0.0.1]> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://[::127.0.0.1.]> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://[0:0:0:0:0:0:13.1.68.3]> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://[2001::1]:80> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http:/example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <ftp:/example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https:/example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <madeupscheme:/example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file:/example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file://example:1/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file://example:test/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file://example%/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file://[example]/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <ftps:/example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <gopher:/example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <ws:/example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <wss:/example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <data:/example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <javascript:/example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <mailto:/example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http:example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <ftp:example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https:example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <madeupscheme:example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <ftps:example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <gopher:example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <ws:example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <wss:example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <data:example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <javascript:example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <mailto:example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: </a/b/c> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: </a/ /c> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: </a%2fc> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: </a/%2f/c> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <#β> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <data:text/html,test#test> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <tel:1234567890> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <ssh://example.com/foo/bar.git> against <http://example.org/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file:c:\\\\foo\\\\bar.html> against <file:///tmp/mock/path>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <  File:c|////foo\\\\bar.html> against <file:///tmp/mock/path>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <C|/foo/bar> against <file:///tmp/mock/path>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: </C|\\\\foo\\\\bar> against <file:///tmp/mock/path>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <//C|/foo/bar> against <file:///tmp/mock/path>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <//server/file> against <file:///tmp/mock/path>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <\\\\\\\\server\\\\file> against <file:///tmp/mock/path>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: </\\\\server/file> against <file:///tmp/mock/path>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file:///foo/bar.txt> against <file:///tmp/mock/path>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file:///home/me> against <file:///tmp/mock/path>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <//> against <file:///tmp/mock/path>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <///> against <file:///tmp/mock/path>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <///test> against <file:///tmp/mock/path>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file://test> against <file:///tmp/mock/path>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file://localhost> against <file:///tmp/mock/path>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file://localhost/> against <file:///tmp/mock/path>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file://localhost/test> against <file:///tmp/mock/path>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <test> against <file:///tmp/mock/path>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file:test> against <file:///tmp/mock/path>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file:///w|m> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file:///w||m> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file:///w|/m> without base\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <file:C|/m/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file:C||/m/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.com/././foo> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.com/./.foo> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.com/foo/.> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.com/foo/./> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.com/foo/bar/..> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.com/foo/bar/../> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.com/foo/..bar> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.com/foo/bar/../ton> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.com/foo/bar/../ton/../../a> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.com/foo/../../..> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.com/foo/../../../ton> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.com/foo/%2e> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.com/foo/%2e%2> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.com////../..> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.com/foo/bar//../..> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.com/foo/bar//..> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.com/foo> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.com/%20foo> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.com/foo%> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.com/foo%2> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.com/foo%2zbar> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.com/foo%2Â©zbar> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.com/foo%41%7a> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.com/foo\\t%91> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.com/foo%00%51> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.com/(%28:%3A%29)> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.com/%3A%3a%3C%3c> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.com/foo\\tbar> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.com\\\\\\\\foo\\\\\\\\bar> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.com/@asdf%40> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.com/你好你好> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.com/‥/foo> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.com/﻿/foo> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.com/‮/foo/‭/bar> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://www.google.com/foo?bar=baz#> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://www.google.com/foo?bar=baz# »> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <data:test# »> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://www.google.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://192.0x00A80001> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://www/foo%2Ehtml> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://www/foo/%2E/html> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://user:pass@/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://%25DOMAIN:foobar@foodomain.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http:\\\\\\\\www.google.com\\\\foo> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://foo:80/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://foo:81/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <httpa://foo:80/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://foo:-80/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://foo:443/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://foo:80/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <ftp://foo:21/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <ftp://foo:80/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <gopher://foo:70/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <gopher://foo:443/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <ws://foo:80/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <ws://foo:81/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <ws://foo:443/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <ws://foo:815/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <wss://foo:80/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <wss://foo:81/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <wss://foo:443/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <wss://foo:815/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http:/example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <ftp:/example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https:/example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <madeupscheme:/example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file:/example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <ftps:/example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <gopher:/example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <ws:/example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <wss:/example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <data:/example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <javascript:/example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <mailto:/example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http:example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <ftp:example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https:example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <madeupscheme:example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <ftps:example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <gopher:example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <ws:example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <wss:example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <data:example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <javascript:example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <mailto:example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://example.com/aaa/bbb/%2e%2e?query> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http:@www.example.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http:/@www.example.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://@www.example.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http:a:b@www.example.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http:/a:b@www.example.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a:b@www.example.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://@pple.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http::b@www.example.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http:/:b@www.example.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://:b@www.example.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http:/:@/www.example.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://user@/www.example.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http:@/www.example.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http:/@/www.example.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://@/www.example.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https:@/www.example.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http:a:b@/www.example.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http:/a:b@/www.example.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a:b@/www.example.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http::@/www.example.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http:a:@www.example.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http:/a:@www.example.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a:@www.example.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://www.@pple.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http:@:www.example.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http:/@:www.example.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://@:www.example.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://:@www.example.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: </> against <http://www.example.com/test>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: </test.txt> against <http://www.example.com/test>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <.> against <http://www.example.com/test>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <..> against <http://www.example.com/test>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <test.txt> against <http://www.example.com/test>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <./test.txt> against <http://www.example.com/test>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <../test.txt> against <http://www.example.com/test>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <../aaa/test.txt> against <http://www.example.com/test>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <../../test.txt> against <http://www.example.com/test>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <中/test.txt> against <http://www.example.com/test>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://www.example2.com> against <http://www.example.com/test>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <//www.example2.com> against <http://www.example.com/test>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file:...> against <http://www.example.com/test>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file:..> against <http://www.example.com/test>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file:a> against <http://www.example.com/test>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file:.> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file:.> against <http://www.example.com/test>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ExAmPlE.CoM> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example example.com> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://Goo%20 goo%7C|.com> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://[]> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://[:]> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://GOO 　goo.com> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://GOO​⁠﻿goo.com> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <\\u0000\\u001b\\u0004\\u0012 http://example.com/\\u001f \\r > without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://www.foo。bar.com> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://﷐zyx.com> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://%ef%b7%90zyx.com> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://�> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://%EF%BF%BD> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://x/�?�#�> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a.b.c.xn--pokxncvks> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://10.0.0.xn--pokxncvks> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a.b.c.XN--pokxncvks> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a.b.c.Xn--pokxncvks> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://10.0.0.XN--pokxncvks> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://10.0.0.xN--pokxncvks> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://Ｇｏ.com> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://％４１.com> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://%ef%bc%85%ef%bc%94%ef%bc%91.com> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://％００.com> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://%ef%bc%85%ef%bc%90%ef%bc%90.com> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://你好你好> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://faß.ExAmPlE/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <sc://faß.ExAmPlE/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://%zz%66%a.com> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://%25> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://hello%00> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://%30%78%63%30%2e%30%32%35%30.01> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://%30%78%63%30%2e%30%32%35%30.01%2e> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://192.168.0.257> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://%3g%78%63%30%2e%30%32%35%30%2E.01> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://192.168.0.1 hello> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://x x:12> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://０Ｘｃ０．０２５０．０１> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://./> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://../> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <h://.> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://[www.google.com]/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://[google.com]> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://[::1.2.3.4x]> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://[::1.2.3.]> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://[::1.2.]> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://[::.1.2]> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://[::1.]> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://[::.1]> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://[::%31]> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://%5B::1]> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://foo:💩@example.com/bar> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <#> against <test:test>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <#x> against <mailto:x@x.com>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <#x> against <data:,>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <#x> against <about:blank>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <#x:y> against <about:blank>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <#> against <test:test?test>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://@test@test@example:800/> against <http://doesnotmatter/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://@@@example> against <http://doesnotmatter/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://`{}:`{}@h/`{}?`{}> against <http://doesnotmatter/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://host/?'> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <notspecial://host/?'> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: </some/path> against <http://user@example.org/smth>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <> against <http://user:pass@example.org:21/smth>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: </some/path> against <http://user:pass@example.org:21/smth>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <i> against <sc:sd>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <i> against <sc:sd/sd>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <i> against <sc:/pa/pa>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <i> against <sc://ho/pa>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <i> against <sc:///pa/pa>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <../i> against <sc:sd>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <../i> against <sc:sd/sd>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <../i> against <sc:/pa/pa>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <../i> against <sc://ho/pa>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <../i> against <sc:///pa/pa>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: </i> against <sc:sd>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: </i> against <sc:sd/sd>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: </i> against <sc:/pa/pa>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: </i> against <sc://ho/pa>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: </i> against <sc:///pa/pa>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <?i> against <sc:sd>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <?i> against <sc:sd/sd>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <?i> against <sc:/pa/pa>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <?i> against <sc://ho/pa>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <?i> against <sc:///pa/pa>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <#i> against <sc:sd>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <#i> against <sc:sd/sd>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <#i> against <sc:/pa/pa>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <#i> against <sc://ho/pa>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <#i> against <sc:///pa/pa>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <about:/../> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <data:/../> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <javascript:/../> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <mailto:/../> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <sc://ñ.test/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <sc://%/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <sc://@/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <sc://te@s:t@/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <sc://:/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <sc://:12/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <x> against <sc://ñ>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <sc:\\\\../> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <sc::a@example.net> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <wow:%NBD> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <wow:%1G> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <wow:￿> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <sc://a\\u0000b/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <sc://a b/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <sc://a<b> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <sc://a>b> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <sc://a[b/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <sc://a\\\\b/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <sc://a]b/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <sc://a^b> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <sc://a|b/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <foo://ho\\tst/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <foo://ho\\nst/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <foo://ho\\rst/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a\\u0000b/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a\\u0001b/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a\\u0002b/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a\\u0003b/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a\\u0004b/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a\\u0005b/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a\\u0006b/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a\\u0007b/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a\\bb/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a\\u000bb/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a\\fb/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a\\u000eb/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a\\u000fb/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a\\u0010b/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a\\u0011b/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a\\u0012b/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a\\u0013b/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a\\u0014b/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a\\u0015b/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a\\u0016b/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a\\u0017b/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a\\u0018b/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a\\u0019b/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a\\u001ab/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a\\u001bb/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a\\u001cb/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a\\u001db/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a\\u001eb/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a\\u001fb/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a b/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a%b/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a<b> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a>b> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a[b/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a]b/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a^b> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://a|b/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ab/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho\\tst/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho\\nst/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho\\rst/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%00st/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%01st/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%02st/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%03st/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%04st/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%05st/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%06st/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%07st/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%08st/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%09st/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%0Ast/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%0Bst/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%0Cst/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%0Dst/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%0Est/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%0Fst/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%10st/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%11st/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%12st/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%13st/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%14st/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%15st/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%16st/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%17st/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%18st/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%19st/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%1Ast/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%1Bst/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%1Cst/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%1Dst/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%1Est/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%1Fst/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%20st/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%23st/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%25st/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%2Fst/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%3Ast/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%3Cst/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%3Est/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%3Fst/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%40st/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%5Bst/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%5Cst/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%5Dst/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%7Cst/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://ho%7Fst/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://!\\\"$&'()*+,-.;=_`{}~/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <sc://\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\u000b\\f\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f!\\\"$%&'()*+,-.;=_`{}~/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <ftp://example.com%80/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <ftp://example.com%A0/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://example.com%80/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://example.com%A0/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <ftp://%e2%98%83> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://%e2%98%83> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://127.0.0.1:10100/relative_import.html> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://facebook.com/?foo=%7B%22abc%22> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://localhost:3000/jqueryui@1.2.3> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <h\\tt\\nt\\rp://h\\to\\ns\\rt:9\\t0\\n0\\r0/p\\ta\\nt\\rh?q\\tu\\ne\\rry#f\\tr\\na\\rg> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <?a=b&c=d> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <??a=b&c=d> against <http://example.org/foo/bar>\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <http:> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http:> against <https://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <sc:> against <https://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://foo.bar/baz?qux#foo\\bbar> without base\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <http://foo.bar/baz?qux#foo\\\"bar> without base\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <http://foo.bar/baz?qux#foo<bar> without base\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <http://foo.bar/baz?qux#foo>bar> without base\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <http://foo.bar/baz?qux#foo`bar> without base\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <http://1.2.3.4/> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://1.2.3.4./> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://192.168.257> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://192.168.257.> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://192.168.257.com> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://256> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://256.com> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://999999999> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://999999999.> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://999999999.com> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://10000000000> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://10000000000.com> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://4294967295> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://4294967296> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://0xffffffff> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://0xffffffff1> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://256.256.256.256> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://0x.0x.0> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://0x100000000/test> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://256.0.0.1/test> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file:///C%3A/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file:///C%7C/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file://%43%3A> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file://%43%7C> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file://%43|> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file://C%7C> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file://%43%7C/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://%43%7C/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <asdf://%43|/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <asdf://%43%7C/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <pix/submit.gif> against <file:///C:/Users/Domenic/Dropbox/GitHub/tmpvar/jsdom/test/level2/html/files/anchor.html>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <..> against <file:///C:/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <..> against <file:///>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: </> against <file:///C:/a/b>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: </> against <file://h/C:/a/b>\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: </> against <file://h/a/b>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <//d:> against <file:///C:/a/b>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <//d:/..> against <file:///C:/a/b>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <..> against <file:///ab:/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <..> against <file:///1:/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <> against <file:///test?test#test>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file:> against <file:///test?test#test>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <?x> against <file:///test?test#test>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file:?x> against <file:///test?test#test>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <#x> against <file:///test?test#test>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file:#x> against <file:///test?test#test>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file:\\\\\\\\//> without base\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <file:\\\\\\\\\\\\\\\\> without base\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <file:\\\\\\\\\\\\\\\\?fox> without base\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <file:\\\\\\\\\\\\\\\\#guppy> without base\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <file://spider///> without base\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <file:\\\\\\\\localhost//> without base\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <file:///localhost//cat> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file://\\\\/localhost//cat> without base\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <file://localhost//a//../..//> without base\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: </////mouse> against <file:///elephant>\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <\\\\//pig> against <file://lion/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <\\\\/localhost//pig> against <file://lion/>\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <//localhost//pig> against <file://lion/>\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: </..//localhost//pig> against <file://lion/>\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <file://> against <file://ape/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: </rooibos> against <file://tea/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: </?chai> against <file://tea/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <C|> against <file://host/dir/file>\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <C|> against <file://host/D:/dir1/dir2/file>\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <C|#> against <file://host/dir/file>\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <C|?> against <file://host/dir/file>\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <C|/> against <file://host/dir/file>\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <C|\\n/> against <file://host/dir/file>\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <C|\\\\> against <file://host/dir/file>\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <C> against <file://host/dir/file>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <C|a> against <file://host/dir/file>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: </c:/foo/bar> against <file:///c:/baz/qux>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: </c|/foo/bar> against <file:///c:/baz/qux>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file:\\\\c:\\\\foo\\\\bar> against <file:///c:/baz/qux>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: </c:/foo/bar> against <file://host/path>\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <file://example.net/C:/> without base\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <file://1.2.3.4/C:/> without base\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <file://[1::8]/C:/> without base\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <C|/> against <file://host/>\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: </C:/> against <file://host/>\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <file:C:/> against <file://host/>\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <file:/C:/> against <file://host/>\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <//C:/> against <file://host/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file://C:/> against <file://host/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <///C:/> against <file://host/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file:///C:/> against <file://host/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file:/C|/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file://C|/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file:> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file:?q=v> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file:#frag> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file:///Y:> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file:///Y:/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file:///./Y> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file:///./Y:> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <\\\\\\\\\\\\.\\\\Y:> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file:///y:> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file:///y:/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file:///./y> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file:///./y:> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <\\\\\\\\\\\\.\\\\y:> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file://localhost//a//../..//foo> without base\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <file://localhost////foo> without base\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <file:////foo> without base\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <file:///one/two> against <file:///>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file:////one/two> against <file:///>\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <//one/two> against <file:///>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <///one/two> against <file:///>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <////one/two> against <file:///>\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <file:///.//> against <file:////>\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <file:.//p> without base\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <file:/.//p> without base\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <http://[1:0::]> against <http://example.net/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://[0:1:2:3:4:5:6:7:8]> against <http://example.net/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://[0::0::0]> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://[0:.0]> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://[0:0:]> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://[0:1:2:3:4:5:6:7.0.0.0.1]> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://[0:1.00.0.0.0]> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://[0:1.290.0.0.0]> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://[0:1.23.23]> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://?> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://#> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://f:4294967377/c> against <http://example.org/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://f:18446744073709551697/c> against <http://example.org/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://f:340282366920938463463374607431768211537/c> against <http://example.org/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <sc://ñ> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <sc://ñ?x> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <sc://ñ#x> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <#x> against <sc://ñ>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <?x> against <sc://ñ>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <sc://?> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <sc://#> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <///> against <sc://x/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <////> against <sc://x/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <////x/> against <sc://x/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <tftp://foobar.com/someconfig;mode=netascii> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <telnet://user:pass@foobar.com:23/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <ut2004://10.10.10.10:7777/Index.ut2> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <redis://foo:bar@somehost:6379/0?baz=bam&qux=baz> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <rsync://foo@host:911/sup> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <git://github.com/foo/bar.git> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <irc://myserver.com:6999/channel?passwd> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <dns://fw.example.org:9999/foo.bar.org?type=TXT> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <ldap://localhost:389/ou=People,o=JNDITutorial> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <git+https://github.com/foo/bar> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <urn:ietf:rfc:2648> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <tag:joe@example.org,2001:foo/bar> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <non-spec:/.//> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <non-spec:/..//> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <non-spec:/a/..//> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <non-spec:/.//path> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <non-spec:/..//path> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <non-spec:/a/..//path> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: </.//path> against <non-spec:/p>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: </..//path> against <non-spec:/p>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <..//path> against <non-spec:/p>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <a/..//path> against <non-spec:/p>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <> against <non-spec:/..//p>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <path> against <non-spec:/..//p>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <../path> against <non-spec:/.//p>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <non-special://%E2%80%A0/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <non-special://H%4fSt/path> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <non-special://[1:2:0:0:5:0:0:0]/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <non-special://[1:2:0:0:0:0:0:3]/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <non-special://[1:2::3]:80/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <non-special://[:80/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <blob:https://example.com:443/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <blob:http://example.org:88/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <blob:d3958f5c-0777-0845-9dcf-2cb28783acaf> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <blob:> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <blob:blob:> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <blob:blob:https://example.org/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <blob:about:blank> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <blob:file://host/path> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <blob:ftp://host/path> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <blob:ws://example.org/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <blob:wss://example.org/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <blob:http%3a//example.org/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://0x7f.0.0.0x7g> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://0X7F.0.0.0X7G> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://[::127.0.0.0.1]> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://[0:1:0:1:0:1:0:1]> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://[1:0:1:0:1:0:1:0]> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.org/test?\\\"> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.org/test?#> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.org/test?<> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.org/test?>> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.org/test?⌣> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.org/test?%23%23> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.org/test?%GH> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.org/test?a#%EF> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.org/test?a#%GH> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <a> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <a/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <a//> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <test-a-colon.html> against <a:>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <test-a-colon-b.html> against <a:b>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <test-a-colon-slash.html> against <a:/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <test-a-colon-slash-slash.html> against <a://>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <test-a-colon-slash-b.html> against <a:/b>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <test-a-colon-slash-slash-b.html> against <a://b>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.org/test?a#b\\u0000c> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <non-spec://example.org/test?a#b\\u0000c> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <non-spec:/test?a#b\\u0000c> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <10.0.0.7:8080/foo.html> against <file:///some/dir/bar.html>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <a!@$*=/foo.html> against <file:///some/dir/bar.html>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <a1234567890-+.:foo/bar> against <http://example.com/dir/file>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file://a­b/p> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file://a%C2%ADb/p> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file://loC𝐀𝐋𝐇𝐨𝐬𝐭/usr/bin> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file://­/p> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file://%C2%AD/p> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <file://xn--/p> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <#link> against <https://example.org/##link>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <non-special:cannot-be-a-base-url-\\u0000\\u0001\\u001f\\u001e~> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://www.example.com/path{path.html?query'=query#fragment<fragment> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://user:pass[@foo/bar> against <http://example.org>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <foo:// !\\\"$%&'()*+,-.;<=>@[\\\\]^_`{|}~@host/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <wss:// !\\\"$%&'()*+,-.;<=>@[]^_`{|}~@host/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <foo://joe: !\\\"$%&'()*+,-.:;<=>@[\\\\]^_`{|}~@host/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <wss://joe: !\\\"$%&'()*+,-.:;<=>@[]^_`{|}~@host/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <foo://!\\\"$%&'()*+,-.;=_`{}~/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <wss://!\\\"$&'()*+,-.;=_`{}~/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <foo://host/ !\\\"$%&'()*+,-./:;<=>@[\\\\]^_`{|}~> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <wss://host/ !\\\"$%&'()*+,-./:;<=>@[\\\\]^_`{|}~> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <foo://host/dir/? !\\\"$%&'()*+,-./:;<=>?@[\\\\]^_`{|}~> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <wss://host/dir/? !\\\"$%&'()*+,-./:;<=>?@[\\\\]^_`{|}~> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <foo://host/dir/# !\\\"#$%&'()*+,-./:;<=>?@[\\\\]^_`{|}~> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <wss://host/dir/# !\\\"#$%&'()*+,-./:;<=>?@[\\\\]^_`{|}~> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <abc:rootless> against <abc://host/path>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <abc:rootless> against <abc:/path>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <abc:rootless> against <abc:path>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <abc:/rooted> against <abc://host/path>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <#> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <?> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://1.2.3.4.5> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://1.2.3.4.5.> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://0..0x300/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://0..0x300./> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://256.256.256.256.256> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://256.256.256.256.256.> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://1.2.3.08> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://1.2.3.08.> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://1.2.3.09> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://09.2.3.4> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://09.2.3.4.> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://01.2.3.4.5> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://01.2.3.4.5.> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://0x100.2.3.4> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://0x100.2.3.4.> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://0x1.2.3.4.5> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://0x1.2.3.4.5.> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://foo.1.2.3.4> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://foo.1.2.3.4.> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://foo.2.3.4> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://foo.2.3.4.> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://foo.09> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://foo.09.> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://foo.0x4> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://foo.0x4.> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://foo.09..> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://0999999999999999999/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://foo.0x> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://foo.0XFfFfFfFfFfFfFfFfFfAcE123> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://💩.123/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://\\u0000y> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://x/\\u0000y> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://x/?\\u0000y> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://x/?#\\u0000y> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://￿y> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://x/￿y> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://x/?￿y> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://x/?#￿y> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <non-special:\\u0000y> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <non-special:x/\\u0000y> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <non-special:x/?\\u0000y> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <non-special:x/?#\\u0000y> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <non-special:￿y> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <non-special:x/￿y> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <non-special:x/?￿y> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <non-special:x/?#￿y> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://example.com/\\\"quoted\\\"> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://a%C2%ADb/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://­/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://%C2%AD/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <https://xn--/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <data://example.com:8080/pathname?search#hash> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <data:///test> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <data://test/a/../b> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <data://:443> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <data://test:test> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <data://[:1]> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <javascript://example.com:8080/pathname?search#hash> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <javascript:///test> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <javascript://test/a/../b> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <javascript://:443> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <javascript://test:test> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <javascript://[:1]> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <mailto://example.com:8080/pathname?search#hash> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <mailto:///test> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <mailto://test/a/../b> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <mailto://:443> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <mailto://test:test> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <mailto://[:1]> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <intent://example.com:8080/pathname?search#hash> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <intent:///test> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <intent://test/a/../b> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <intent://:443> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <intent://test:test> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <intent://[:1]> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <urn://example.com:8080/pathname?search#hash> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <urn:///test> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <urn://test/a/../b> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <urn://:443> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <urn://test:test> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <urn://[:1]> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <turn://example.com:8080/pathname?search#hash> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <turn:///test> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <turn://test/a/../b> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <turn://:443> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <turn://test:test> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <turn://[:1]> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <stun://example.com:8080/pathname?search#hash> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <stun:///test> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <stun://test/a/../b> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <stun://:443> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <stun://test:test> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <stun://[:1]> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <w://x:0> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <west://x:0> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <android://x:0/a> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <drivefs://x:0/a> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <chromeos-steam://x:0/a> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <steam://x:0/a> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <materialized-view://x:0/a> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <android-app://x:0> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <chrome-distiller://x:0> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <chrome-extension://x:0> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <chrome-native://x:0> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <chrome-resource://x:0> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <chrome-search://x:0> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <fuchsia-dir://x:0> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <isolated-app://x:0> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <///test> against <http://example.org/>\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <///\\\\//\\\\//test> against <http://example.org/>\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <///example.org/path> against <http://example.org/>\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <///example.org/../path> against <http://example.org/>\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <///example.org/../../> against <http://example.org/>\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <///example.org/../path/../../> against <http://example.org/>\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <///example.org/../path/../../path> against <http://example.org/>\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: </\\\\/\\\\//example.org/../path> against <http://example.org/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <///abcdef/../> against <file:///>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: </\\\\//\\\\/a/../> against <file:///>\": {\n    \"status\": \"FAIL\"\n  },\n  \"Parsing: <//a/../> against <file:///>\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <non-special:\\\\\\\\opaque> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <non-special:\\\\\\\\opaque/path> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <non-special:\\\\\\\\opaque\\\\path> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <non-special:\\\\/opaque> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <non-special:/\\\\path> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <non-special://host\\\\a> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <non-special://host/a\\\\b> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Parsing: <http://example.com/U+d800𐟾U+dfff﷐﷏﷯ﷰ￾￿?U+d800𐟾U+dfff﷐﷏﷯ﷰ￾￿> without base\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/url/url-origin.any.js.json",
    "content": "{\n  \"Loading data…\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://example\\t.\\norg> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://user:pass@foo:21/bar;par?b#c> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <https://test:@test> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <https://:@test> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <non-special://test:@test/x> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <non-special://:@test/x> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http:foo.com> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <\\t   :foo.com   \\n> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: < foo.com  > against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <a:\\t foo.com> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://f:21/ b ? d # e > against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://f:/c> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://f:0/c> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://f:00000000000000/c> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://f:00000000000000000000080/c> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://f:\\n/c> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <  \\t> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <:foo.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <:foo.com\\\\> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <:> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <:a> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <:/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <:\\\\> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <:#> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <#> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <#/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <#\\\\> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <#;?> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <?> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: </> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <:23> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: </:23> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <\\\\x> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <\\\\\\\\x\\\\hello> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <::> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <::23> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <foo://> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://a:b@c:29/d> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http::@c:29> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://&a:foo(b]c@d:2/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://::@c@d:2> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://foo.com:b@d/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://foo.com/\\\\@> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http:\\\\\\\\foo.com\\\\> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http:\\\\\\\\a\\\\b:c\\\\d@foo.com\\\\> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://a:b@c\\\\> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <ws://a@b\\\\c> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <foo:/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <foo:/bar.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <foo://///////> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <foo://///////bar.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <foo:////://///> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <c:/foo> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <//foo/bar> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://foo/path;a??e#f#g> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://foo/abcd?efgh?ijkl> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://foo/abcd#foo?bar> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <[61:24:74]:98> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http:[61:27]/:foo> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://[2001::1]> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://[::127.0.0.1]> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://[0:0:0:0:0:0:13.1.68.3]> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://[2001::1]:80> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http:/example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <ftp:/example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <https:/example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <madeupscheme:/example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <ftps:/example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <gopher:/example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <ws:/example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <wss:/example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <data:/example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <javascript:/example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <mailto:/example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http:example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <ftp:example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <https:example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <madeupscheme:example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <ftps:example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <gopher:example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <ws:example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <wss:example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <data:example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <javascript:example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <mailto:example.com/> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: </a/b/c> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: </a/ /c> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: </a%2fc> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: </a/%2f/c> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <#β> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <data:text/html,test#test> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <tel:1234567890> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <ssh://example.com/foo/bar.git> against <http://example.org/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://example.com/././foo> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://example.com/./.foo> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://example.com/foo/.> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://example.com/foo/./> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://example.com/foo/bar/..> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://example.com/foo/bar/../> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://example.com/foo/..bar> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://example.com/foo/bar/../ton> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://example.com/foo/bar/../ton/../../a> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://example.com/foo/../../..> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://example.com/foo/../../../ton> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://example.com/foo/%2e> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://example.com/foo/%2e%2> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://example.com////../..> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://example.com/foo/bar//../..> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://example.com/foo/bar//..> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://example.com/foo> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://example.com/%20foo> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://example.com/foo%> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://example.com/foo%2> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://example.com/foo%2zbar> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://example.com/foo%2Â©zbar> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://example.com/foo%41%7a> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://example.com/foo\\t%91> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://example.com/foo%00%51> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://example.com/(%28:%3A%29)> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://example.com/%3A%3a%3C%3c> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://example.com/foo\\tbar> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://example.com\\\\\\\\foo\\\\\\\\bar> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://example.com/@asdf%40> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://example.com/你好你好> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://example.com/‥/foo> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://example.com/﻿/foo> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://example.com/‮/foo/‭/bar> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://www.google.com/foo?bar=baz#> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://www.google.com/foo?bar=baz# »> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <data:test# »> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://www.google.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://192.0x00A80001> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://www/foo%2Ehtml> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://www/foo/%2E/html> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://%25DOMAIN:foobar@foodomain.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http:\\\\\\\\www.google.com\\\\foo> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://foo:80/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://foo:81/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <httpa://foo:80/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <https://foo:443/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <https://foo:80/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <ftp://foo:21/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <ftp://foo:80/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <gopher://foo:70/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <gopher://foo:443/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <ws://foo:80/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <ws://foo:81/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <ws://foo:443/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <ws://foo:815/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <wss://foo:80/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <wss://foo:81/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <wss://foo:443/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <wss://foo:815/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http:/example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <ftp:/example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <https:/example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <madeupscheme:/example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <ftps:/example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <gopher:/example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <ws:/example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <wss:/example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <data:/example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <javascript:/example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <mailto:/example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http:example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <ftp:example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <https:example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <madeupscheme:example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <ftps:example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <gopher:example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <ws:example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <wss:example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <data:example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <javascript:example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <mailto:example.com/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <https://example.com/aaa/bbb/%2e%2e?query> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http:@www.example.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http:/@www.example.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://@www.example.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http:a:b@www.example.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http:/a:b@www.example.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://a:b@www.example.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://@pple.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http::b@www.example.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http:/:b@www.example.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://:b@www.example.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http:a:@www.example.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http:/a:@www.example.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://a:@www.example.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://www.@pple.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://:@www.example.com> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: </> against <http://www.example.com/test>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: </test.txt> against <http://www.example.com/test>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <.> against <http://www.example.com/test>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <..> against <http://www.example.com/test>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <test.txt> against <http://www.example.com/test>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <./test.txt> against <http://www.example.com/test>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <../test.txt> against <http://www.example.com/test>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <../aaa/test.txt> against <http://www.example.com/test>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <../../test.txt> against <http://www.example.com/test>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <中/test.txt> against <http://www.example.com/test>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://www.example2.com> against <http://www.example.com/test>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <//www.example2.com> against <http://www.example.com/test>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://ExAmPlE.CoM> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://GOO​⁠﻿goo.com> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <\\u0000\\u001b\\u0004\\u0012 http://example.com/\\u001f \\r > without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://www.foo。bar.com> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <https://x/�?�#�> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://Ｇｏ.com> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://你好你好> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <https://faß.ExAmPlE/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <sc://faß.ExAmPlE/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://%30%78%63%30%2e%30%32%35%30.01> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://%30%78%63%30%2e%30%32%35%30.01%2e> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://０Ｘｃ０．０２５０．０１> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://./> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://../> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <h://.> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://foo:💩@example.com/bar> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <#> against <test:test>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <#x> against <mailto:x@x.com>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <#x> against <data:,>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <#x> against <about:blank>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <#x:y> against <about:blank>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <#> against <test:test?test>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <https://@test@test@example:800/> against <http://doesnotmatter/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <https://@@@example> against <http://doesnotmatter/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://`{}:`{}@h/`{}?`{}> against <http://doesnotmatter/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://host/?'> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <notspecial://host/?'> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: </some/path> against <http://user@example.org/smth>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <> against <http://user:pass@example.org:21/smth>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: </some/path> against <http://user:pass@example.org:21/smth>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <i> against <sc:/pa/pa>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <i> against <sc://ho/pa>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <i> against <sc:///pa/pa>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <../i> against <sc:/pa/pa>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <../i> against <sc://ho/pa>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <../i> against <sc:///pa/pa>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: </i> against <sc:/pa/pa>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: </i> against <sc://ho/pa>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: </i> against <sc:///pa/pa>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <?i> against <sc:/pa/pa>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <?i> against <sc://ho/pa>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <?i> against <sc:///pa/pa>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <#i> against <sc:sd>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <#i> against <sc:sd/sd>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <#i> against <sc:/pa/pa>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <#i> against <sc://ho/pa>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <#i> against <sc:///pa/pa>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <about:/../> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <data:/../> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <javascript:/../> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <mailto:/../> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <sc://ñ.test/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <x> against <sc://ñ>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <sc:\\\\../> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <sc::a@example.net> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <wow:%NBD> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <wow:%1G> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <wow:￿> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://!\\\"$&'()*+,-.;=_`{}~/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <sc://\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\b\\u000b\\f\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f!\\\"$%&'()*+,-.;=_`{}~/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <ftp://%e2%98%83> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <https://%e2%98%83> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://127.0.0.1:10100/relative_import.html> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://facebook.com/?foo=%7B%22abc%22> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <https://localhost:3000/jqueryui@1.2.3> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <h\\tt\\nt\\rp://h\\to\\ns\\rt:9\\t0\\n0\\r0/p\\ta\\nt\\rh?q\\tu\\ne\\rry#f\\tr\\na\\rg> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <?a=b&c=d> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <??a=b&c=d> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http:> against <http://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <sc:> against <https://example.org/foo/bar>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://foo.bar/baz?qux#foo\\bbar> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://foo.bar/baz?qux#foo\\\"bar> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://foo.bar/baz?qux#foo<bar> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://foo.bar/baz?qux#foo>bar> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://foo.bar/baz?qux#foo`bar> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://1.2.3.4/> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://1.2.3.4./> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://192.168.257> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://192.168.257.> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://192.168.257.com> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://256> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://256.com> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://999999999> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://999999999.> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://999999999.com> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://10000000000.com> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://4294967295> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://0xffffffff> against <http://other.com/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <https://0x.0x.0> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <asdf://%43%7C/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://[1:0::]> against <http://example.net/>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <sc://ñ> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <sc://ñ?x> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <sc://ñ#x> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <#x> against <sc://ñ>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <?x> against <sc://ñ>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <tftp://foobar.com/someconfig;mode=netascii> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <telnet://user:pass@foobar.com:23/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <ut2004://10.10.10.10:7777/Index.ut2> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <redis://foo:bar@somehost:6379/0?baz=bam&qux=baz> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <rsync://foo@host:911/sup> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <git://github.com/foo/bar.git> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <irc://myserver.com:6999/channel?passwd> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <dns://fw.example.org:9999/foo.bar.org?type=TXT> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <ldap://localhost:389/ou=People,o=JNDITutorial> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <git+https://github.com/foo/bar> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <urn:ietf:rfc:2648> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <tag:joe@example.org,2001:foo/bar> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <blob:https://example.com:443/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <blob:http://example.org:88/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <blob:d3958f5c-0777-0845-9dcf-2cb28783acaf> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <blob:> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <blob:blob:> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <blob:blob:https://example.org/> without base\": {\n    \"status\": \"FAIL\"\n  },\n  \"Origin parsing: <blob:about:blank> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <blob:ftp://host/path> without base\": {\n    \"status\": \"FAIL\"\n  },\n  \"Origin parsing: <blob:ws://example.org/> without base\": {\n    \"status\": \"FAIL\"\n  },\n  \"Origin parsing: <blob:wss://example.org/> without base\": {\n    \"status\": \"FAIL\"\n  },\n  \"Origin parsing: <blob:http%3a//example.org/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <non-special:cannot-be-a-base-url-\\u0000\\u0001\\u001f\\u001e~> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <https://www.example.com/path{path.html?query'=query#fragment<fragment> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <https://user:pass[@foo/bar> against <http://example.org>\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <foo:// !\\\"$%&'()*+,-.;<=>@[\\\\]^_`{|}~@host/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <wss:// !\\\"$%&'()*+,-.;<=>@[]^_`{|}~@host/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <foo://joe: !\\\"$%&'()*+,-.:;<=>@[\\\\]^_`{|}~@host/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <wss://joe: !\\\"$%&'()*+,-.:;<=>@[]^_`{|}~@host/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <foo://!\\\"$%&'()*+,-.;=_`{}~/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <wss://!\\\"$&'()*+,-.;=_`{}~/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <foo://host/ !\\\"$%&'()*+,-./:;<=>@[\\\\]^_`{|}~> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <wss://host/ !\\\"$%&'()*+,-./:;<=>@[\\\\]^_`{|}~> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <foo://host/dir/? !\\\"$%&'()*+,-./:;<=>?@[\\\\]^_`{|}~> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <wss://host/dir/? !\\\"$%&'()*+,-./:;<=>?@[\\\\]^_`{|}~> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <foo://host/dir/# !\\\"#$%&'()*+,-./:;<=>?@[\\\\]^_`{|}~> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <wss://host/dir/# !\\\"#$%&'()*+,-./:;<=>?@[\\\\]^_`{|}~> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <https://example.com/\\\"quoted\\\"> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <https://a%C2%ADb/> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <data://example.com:8080/pathname?search#hash> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <data:///test> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <data://test/a/../b> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <javascript://example.com:8080/pathname?search#hash> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <javascript:///test> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <javascript://test/a/../b> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <mailto://example.com:8080/pathname?search#hash> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <mailto:///test> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <mailto://test/a/../b> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <intent://example.com:8080/pathname?search#hash> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <intent:///test> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <intent://test/a/../b> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <urn://example.com:8080/pathname?search#hash> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <urn:///test> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <urn://test/a/../b> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <turn://example.com:8080/pathname?search#hash> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <turn:///test> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <turn://test/a/../b> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <stun://example.com:8080/pathname?search#hash> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <stun:///test> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <stun://test/a/../b> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <w://x:0> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <west://x:0> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <android://x:0/a> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <drivefs://x:0/a> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <chromeos-steam://x:0/a> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <steam://x:0/a> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <materialized-view://x:0/a> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <android-app://x:0> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <chrome-distiller://x:0> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <chrome-extension://x:0> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <chrome-native://x:0> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <chrome-resource://x:0> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <chrome-search://x:0> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <fuchsia-dir://x:0> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <isolated-app://x:0> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <non-special:\\\\\\\\opaque> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <non-special:\\\\\\\\opaque/path> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <non-special:\\\\\\\\opaque\\\\path> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <non-special:\\\\/opaque> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <non-special:/\\\\path> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <non-special://host/a\\\\b> without base\": {\n    \"status\": \"PASS\"\n  },\n  \"Origin parsing: <http://example.com/U+d800𐟾U+dfff﷐﷏﷯ﷰ￾￿?U+d800𐟾U+dfff﷐﷏﷯ﷰ￾￿> without base\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/url/url-searchparams.any.js.json",
    "content": "{\n  \"URL.searchParams getter\": {\n    \"status\": \"PASS\"\n  },\n  \"URL.searchParams updating, clearing\": {\n    \"status\": \"PASS\"\n  },\n  \"URL.searchParams setter, invalid values\": {\n    \"status\": \"PASS\"\n  },\n  \"URL.searchParams and URL.search setters, update propagation\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/url/url-setters-stripping.any.js.json",
    "content": "{\n  \"Setting protocol with leading U+0000 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting protocol with U+0000 before inserted colon (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting username with leading U+0000 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting username with middle U+0000 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting username with trailing U+0000 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting password with leading U+0000 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting password with middle U+0000 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting password with trailing U+0000 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting host with leading U+0000 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hostname with leading U+0000 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting host with middle U+0000 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hostname with middle U+0000 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting host with trailing U+0000 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hostname with trailing U+0000 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting port with leading U+0000 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting port with middle U+0000 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting port with trailing U+0000 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting pathname with leading U+0000 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting pathname with middle U+0000 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting pathname with trailing U+0000 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting search with leading U+0000 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting search with middle U+0000 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting search with trailing U+0000 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hash with leading U+0000 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hash with middle U+0000 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hash with trailing U+0000 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting protocol with leading U+0009 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting protocol with U+0009 before inserted colon (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting username with leading U+0009 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting username with middle U+0009 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting username with trailing U+0009 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting password with leading U+0009 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting password with middle U+0009 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting password with trailing U+0009 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting host with leading U+0009 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hostname with leading U+0009 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting host with middle U+0009 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hostname with middle U+0009 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting host with trailing U+0009 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hostname with trailing U+0009 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting port with leading U+0009 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting port with middle U+0009 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting port with trailing U+0009 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting pathname with leading U+0009 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting pathname with middle U+0009 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting pathname with trailing U+0009 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting search with leading U+0009 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting search with middle U+0009 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting search with trailing U+0009 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hash with leading U+0009 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hash with middle U+0009 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hash with trailing U+0009 (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting protocol with leading U+000A (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting protocol with U+000A before inserted colon (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting username with leading U+000A (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting username with middle U+000A (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting username with trailing U+000A (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting password with leading U+000A (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting password with middle U+000A (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting password with trailing U+000A (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting host with leading U+000A (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hostname with leading U+000A (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting host with middle U+000A (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hostname with middle U+000A (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting host with trailing U+000A (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hostname with trailing U+000A (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting port with leading U+000A (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting port with middle U+000A (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting port with trailing U+000A (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting pathname with leading U+000A (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting pathname with middle U+000A (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting pathname with trailing U+000A (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting search with leading U+000A (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting search with middle U+000A (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting search with trailing U+000A (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hash with leading U+000A (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hash with middle U+000A (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hash with trailing U+000A (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting protocol with leading U+000D (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting protocol with U+000D before inserted colon (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting username with leading U+000D (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting username with middle U+000D (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting username with trailing U+000D (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting password with leading U+000D (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting password with middle U+000D (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting password with trailing U+000D (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting host with leading U+000D (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hostname with leading U+000D (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting host with middle U+000D (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hostname with middle U+000D (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting host with trailing U+000D (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hostname with trailing U+000D (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting port with leading U+000D (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting port with middle U+000D (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting port with trailing U+000D (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting pathname with leading U+000D (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting pathname with middle U+000D (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting pathname with trailing U+000D (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting search with leading U+000D (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting search with middle U+000D (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting search with trailing U+000D (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hash with leading U+000D (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hash with middle U+000D (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hash with trailing U+000D (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting protocol with leading U+001F (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting protocol with U+001F before inserted colon (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting username with leading U+001F (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting username with middle U+001F (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting username with trailing U+001F (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting password with leading U+001F (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting password with middle U+001F (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting password with trailing U+001F (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting host with leading U+001F (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hostname with leading U+001F (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting host with middle U+001F (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hostname with middle U+001F (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting host with trailing U+001F (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hostname with trailing U+001F (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting port with leading U+001F (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting port with middle U+001F (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting port with trailing U+001F (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting pathname with leading U+001F (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting pathname with middle U+001F (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting pathname with trailing U+001F (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting search with leading U+001F (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting search with middle U+001F (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting search with trailing U+001F (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hash with leading U+001F (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hash with middle U+001F (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hash with trailing U+001F (https:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting protocol with leading U+0000 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting protocol with U+0000 before inserted colon (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting username with leading U+0000 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting username with middle U+0000 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting username with trailing U+0000 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting password with leading U+0000 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting password with middle U+0000 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting password with trailing U+0000 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting host with leading U+0000 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hostname with leading U+0000 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting host with middle U+0000 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hostname with middle U+0000 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting host with trailing U+0000 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hostname with trailing U+0000 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting port with leading U+0000 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting port with middle U+0000 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting port with trailing U+0000 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting pathname with leading U+0000 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting pathname with middle U+0000 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting pathname with trailing U+0000 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting search with leading U+0000 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting search with middle U+0000 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting search with trailing U+0000 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hash with leading U+0000 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hash with middle U+0000 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hash with trailing U+0000 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting protocol with leading U+0009 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting protocol with U+0009 before inserted colon (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting username with leading U+0009 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting username with middle U+0009 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting username with trailing U+0009 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting password with leading U+0009 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting password with middle U+0009 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting password with trailing U+0009 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting host with leading U+0009 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hostname with leading U+0009 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting host with middle U+0009 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hostname with middle U+0009 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting host with trailing U+0009 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hostname with trailing U+0009 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting port with leading U+0009 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting port with middle U+0009 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting port with trailing U+0009 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting pathname with leading U+0009 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting pathname with middle U+0009 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting pathname with trailing U+0009 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting search with leading U+0009 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting search with middle U+0009 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting search with trailing U+0009 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hash with leading U+0009 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hash with middle U+0009 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hash with trailing U+0009 (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting protocol with leading U+000A (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting protocol with U+000A before inserted colon (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting username with leading U+000A (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting username with middle U+000A (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting username with trailing U+000A (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting password with leading U+000A (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting password with middle U+000A (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting password with trailing U+000A (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting host with leading U+000A (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hostname with leading U+000A (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting host with middle U+000A (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hostname with middle U+000A (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting host with trailing U+000A (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hostname with trailing U+000A (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting port with leading U+000A (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting port with middle U+000A (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting port with trailing U+000A (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting pathname with leading U+000A (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting pathname with middle U+000A (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting pathname with trailing U+000A (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting search with leading U+000A (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting search with middle U+000A (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting search with trailing U+000A (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hash with leading U+000A (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hash with middle U+000A (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hash with trailing U+000A (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting protocol with leading U+000D (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting protocol with U+000D before inserted colon (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting username with leading U+000D (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting username with middle U+000D (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting username with trailing U+000D (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting password with leading U+000D (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting password with middle U+000D (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting password with trailing U+000D (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting host with leading U+000D (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hostname with leading U+000D (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting host with middle U+000D (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hostname with middle U+000D (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting host with trailing U+000D (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hostname with trailing U+000D (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting port with leading U+000D (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting port with middle U+000D (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting port with trailing U+000D (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting pathname with leading U+000D (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting pathname with middle U+000D (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting pathname with trailing U+000D (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting search with leading U+000D (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting search with middle U+000D (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting search with trailing U+000D (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hash with leading U+000D (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hash with middle U+000D (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hash with trailing U+000D (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting protocol with leading U+001F (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting protocol with U+001F before inserted colon (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting username with leading U+001F (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting username with middle U+001F (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting username with trailing U+001F (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting password with leading U+001F (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting password with middle U+001F (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting password with trailing U+001F (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting host with leading U+001F (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hostname with leading U+001F (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting host with middle U+001F (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hostname with middle U+001F (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting host with trailing U+001F (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hostname with trailing U+001F (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting port with leading U+001F (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting port with middle U+001F (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting port with trailing U+001F (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting pathname with leading U+001F (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting pathname with middle U+001F (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting pathname with trailing U+001F (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting search with leading U+001F (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting search with middle U+001F (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting search with trailing U+001F (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hash with leading U+001F (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hash with middle U+001F (wpt++:)\": {\n    \"status\": \"PASS\"\n  },\n  \"Setting hash with trailing U+001F (wpt++:)\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/url/url-setters.any.js.json",
    "content": "{\n  \"Loading data…\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <a://example.net>.protocol = '' The empty string is not a valid scheme. Setter leaves the URL unchanged.\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <a://example.net>.protocol = 'b'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <javascript:alert(1)>.protocol = 'defuse'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <a://example.net>.protocol = 'B' Upper-case ASCII is lower-cased\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <a://example.net>.protocol = 'é' Non-ASCII is rejected\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <a://example.net>.protocol = '0b' No leading digit\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <a://example.net>.protocol = '+b' No leading punctuation\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <a://example.net>.protocol = 'bC0+-.'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <a://example.net>.protocol = 'b,c' Only some punctuation is acceptable\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <a://example.net>.protocol = 'bé' Non-ASCII is rejected\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://test@example.net>.protocol = 'file' Can’t switch from URL containing username/password/port to file\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <https://example.net:1234>.protocol = 'file'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <wss://x:x@example.net:1234>.protocol = 'file'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <file://localhost/>.protocol = 'http' Can’t switch from file URL with no host\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <file:///test>.protocol = 'https'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <file:>.protocol = 'wss'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net>.protocol = 'b' Can’t switch from special scheme to non-special\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <file://hi/path>.protocol = 's'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <https://example.net>.protocol = 's'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <ftp://example.net>.protocol = 'test'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <mailto:me@example.net>.protocol = 'http' Cannot-be-a-base URL doesn’t have a host, but URL in a special scheme must.\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <ssh://me@example.net>.protocol = 'http' Can’t switch from non-special scheme to special\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <ssh://me@example.net>.protocol = 'https'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <ssh://me@example.net>.protocol = 'file'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <ssh://example.net>.protocol = 'file'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <nonsense:///test>.protocol = 'https'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net>.protocol = 'https:foo : bar' Stuff after the first ':' is ignored\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <data:text/html,<p>Test>.protocol = 'view-source+data:foo : bar' Stuff after the first ':' is ignored\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://foo.com:443/>.protocol = 'https' Port is set to null if it is the default for new scheme.\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://test/>.protocol = 'h\\r\\ntt\\tps' Tab and newline are stripped\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://test/>.protocol = 'https\\r'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://test/>.protocol = 'https\\u0000' Non-tab/newline C0 controls result in no-op\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://test/>.protocol = 'https\\f'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://test/>.protocol = 'https\\u000e'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://test/>.protocol = 'https '\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <file:///home/you/index.html>.username = 'me' No host means no username\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <unix:/run/foo.socket>.username = 'me' No host means no username\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <mailto:you@example.net>.username = 'me' Cannot-be-a-base means no username\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <javascript:alert(1)>.username = 'wario'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net>.username = 'me'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://:secret@example.net>.username = 'me'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://me@example.net>.username = ''\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://me:secret@example.net>.username = ''\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net>.username = '\\u0000\\u0001\\t\\n\\r\\u001f !\\\"#$%&'()*+,-./09:;<=>?@AZ[\\\\]^_`az{|}~Éé' UTF-8 percent encoding with the userinfo encode set.\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net>.username = '%c3%89té' Bytes already percent-encoded are left as-is.\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <sc:///>.username = 'x'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <javascript://x/>.username = 'wario'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <file://test/>.username = 'test'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <file:///home/me/index.html>.password = 'secret' No host means no password\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <unix:/run/foo.socket>.password = 'secret' No host means no password\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <mailto:me@example.net>.password = 'secret' Cannot-be-a-base means no password\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net>.password = 'secret'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://me@example.net>.password = 'secret'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://:secret@example.net>.password = ''\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://me:secret@example.net>.password = ''\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net>.password = '\\u0000\\u0001\\t\\n\\r\\u001f !\\\"#$%&'()*+,-./09:;<=>?@AZ[\\\\]^_`az{|}~Éé' UTF-8 percent encoding with the userinfo encode set.\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net>.password = '%c3%89té' Bytes already percent-encoded are left as-is.\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <sc:///>.password = 'x'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <javascript://x/>.password = 'bowser'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <file://test/>.password = 'test'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <sc://x/>.host = '\\u0000' Non-special scheme\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <sc://x/>.host = '\\t'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <sc://x/>.host = '\\n'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <sc://x/>.host = '\\r'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <sc://x/>.host = ' '\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <sc://x/>.host = '#'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <sc://x/>.host = '/'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <sc://x/>.host = '?'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <sc://x/>.host = '@'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <sc://x/>.host = 'ß'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <https://x/>.host = 'ß' IDNA Nontransitional_Processing\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <mailto:me@example.net>.host = 'example.com' Cannot-be-a-base means no host\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <data:text/plain,Stuff>.host = 'example.net' Cannot-be-a-base means no host\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net>.host = 'example.com:8080'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net:8080>.host = 'example.com' Port number is unchanged if not specified in the new value\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net:8080>.host = 'example.com:' Port number is unchanged if not specified\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net>.host = '' The empty host is not valid for special schemes\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <view-source+http://example.net/foo>.host = '' The empty host is OK for non-special schemes\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <a:/foo>.host = 'example.net' Path-only URLs can gain a host\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net>.host = '0x7F000001:8080' IPv4 address syntax is normalized\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net>.host = '[::0:01]:2' IPv6 address syntax is normalized\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net>.host = '[2001:db8::2]:4002' IPv6 literal address with port, crbug.com/1012416\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net>.host = 'example.com:80' Default port number is removed\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <https://example.net>.host = 'example.com:443' Default port number is removed\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <https://example.net>.host = 'example.com:80' Default port number is only removed for the relevant scheme\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net:8080>.host = 'example.com:80' Port number is removed if new port is scheme default and existing URL has a non-default port\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net/path>.host = 'example.com/stuff' Stuff after a / delimiter is ignored\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net/path>.host = 'example.com:8080/stuff' Stuff after a / delimiter is ignored\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net/path>.host = 'example.com?stuff' Stuff after a ? delimiter is ignored\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net/path>.host = 'example.com?stuff:8080' Stuff after a ? delimiter is ignored, trailing 'port'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net/path>.host = 'example.com:8080?stuff' Stuff after a ? delimiter is ignored\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net/path>.host = 'example.com#stuff' Stuff after a # delimiter is ignored\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net/path>.host = 'example.com:8080#stuff' Stuff after a # delimiter is ignored\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net/path>.host = 'example.com\\\\stuff' Stuff after a \\\\ delimiter is ignored for special schemes\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net/path>.host = 'example.com:8080\\\\stuff' Stuff after a \\\\ delimiter is ignored for special schemes\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <view-source+http://example.net/path>.host = 'example.com\\\\stuff' \\\\ is not a delimiter for non-special schemes, but still forbidden in hosts\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <view-source+http://example.net/path>.host = 'example.com:8080stuff2' Anything other than ASCII digit stops the port parser in a setter but is not an error\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net/path>.host = 'example.com:8080stuff2' Anything other than ASCII digit stops the port parser in a setter but is not an error\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net/path>.host = 'example.com:8080+2' Anything other than ASCII digit stops the port parser in a setter but is not an error\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net:8080>.host = 'example.com:invalid' Anything other than ASCII digit stops the port parser in a setter but is not an error\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net:8080/test>.host = '[::1]:invalid' Anything other than ASCII digit stops the port parser in a setter but is not an error\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net:8080/test>.host = '[::1]' IPv6 without port\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net/path>.host = 'example.com:65535' Port numbers are 16 bit integers\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net/path>.host = 'example.com:65536' Port numbers are 16 bit integers, overflowing is an error. Hostname is still set, though.\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net/>.host = '[google.com]' Broken IPv6\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net/>.host = '[::1.2.3.4x]'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net/>.host = '[::1.2.3.]'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net/>.host = '[::1.2.]'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net/>.host = '[::1.]'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <file://y/>.host = 'x:123'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <file://y/>.host = 'loc%41lhost'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <file://hi/x>.host = ''\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <sc://test@test/>.host = ''\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <sc://test:12/>.host = ''\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.com/>.host = '///bad.com' Leading / is not stripped\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <sc://example.com/>.host = '///bad.com' Leading / is not stripped\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <https://example.com/>.host = 'a%C2%ADb'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <https://example.com/>.host = '­'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <https://example.com/>.host = '%C2%AD'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <https://example.com/>.host = 'xn--'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <sc://x/>.hostname = '\\u0000' Non-special scheme\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <sc://x/>.hostname = '\\t'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <sc://x/>.hostname = '\\n'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <sc://x/>.hostname = '\\r'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <sc://x/>.hostname = ' '\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <sc://x/>.hostname = '#'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <sc://x/>.hostname = '/'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <sc://x/>.hostname = '?'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <sc://x/>.hostname = '@'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <mailto:me@example.net>.hostname = 'example.com' Cannot-be-a-base means no host\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <data:text/plain,Stuff>.hostname = 'example.net' Cannot-be-a-base means no host\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net:8080>.hostname = 'example.com'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net>.hostname = '' The empty host is not valid for special schemes\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <view-source+http://example.net/foo>.hostname = '' The empty host is OK for non-special schemes\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <a:/foo>.hostname = 'example.net' Path-only URLs can gain a host\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net:8080>.hostname = '0x7F000001' IPv4 address syntax is normalized\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net>.hostname = '[::0:01]' IPv6 address syntax is normalized\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net/path>.hostname = 'example.com:8080' : delimiter invalidates entire value\": {\n    \"status\": \"FAIL\"\n  },\n  \"URL: Setting <http://example.net:8080/path>.hostname = 'example.com:' : delimiter invalidates entire value\": {\n    \"status\": \"FAIL\"\n  },\n  \"URL: Setting <http://example.net/path>.hostname = 'example.com/stuff' Stuff after a / delimiter is ignored\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net/path>.hostname = 'example.com?stuff' Stuff after a ? delimiter is ignored\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net/path>.hostname = 'example.com#stuff' Stuff after a # delimiter is ignored\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net/path>.hostname = 'example.com\\\\stuff' Stuff after a \\\\ delimiter is ignored for special schemes\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <view-source+http://example.net/path>.hostname = 'example.com\\\\stuff' \\\\ is not a delimiter for non-special schemes, but still forbidden in hosts\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net/>.hostname = '[google.com]' Broken IPv6\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net/>.hostname = '[::1.2.3.4x]'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net/>.hostname = '[::1.2.3.]'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net/>.hostname = '[::1.2.]'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net/>.hostname = '[::1.]'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <file://y/>.hostname = 'x:123'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <file://y/>.hostname = 'loc%41lhost'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <file://hi/x>.hostname = ''\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <sc://test@test/>.hostname = ''\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <sc://test:12/>.hostname = ''\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <non-spec:/.//p>.hostname = 'h' Drop /. from path\": {\n    \"status\": \"FAIL\"\n  },\n  \"URL: Setting <non-spec:/.//p>.hostname = ''\": {\n    \"status\": \"FAIL\"\n  },\n  \"URL: Setting <http://example.com/>.hostname = '///bad.com' Leading / is not stripped\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <sc://example.com/>.hostname = '///bad.com' Leading / is not stripped\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <https://example.com/>.hostname = 'a%C2%ADb'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <https://example.com/>.hostname = '­'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <https://example.com/>.hostname = '%C2%AD'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <https://example.com/>.hostname = 'xn--'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net>.port = '8080'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net:8080>.port = '' Port number is removed if empty is the new value\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net:8080>.port = '80' Default port number is removed\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <https://example.net:4433>.port = '443' Default port number is removed\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <https://example.net>.port = '80' Default port number is only removed for the relevant scheme\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net/path>.port = '8080/stuff' Stuff after a / delimiter is ignored\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net/path>.port = '8080?stuff' Stuff after a ? delimiter is ignored\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net/path>.port = '8080#stuff' Stuff after a # delimiter is ignored\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net/path>.port = '8080\\\\stuff' Stuff after a \\\\ delimiter is ignored for special schemes\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <view-source+http://example.net/path>.port = '8080stuff2' Anything other than ASCII digit stops the port parser in a setter but is not an error\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net/path>.port = '8080stuff2' Anything other than ASCII digit stops the port parser in a setter but is not an error\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net/path>.port = '8080+2' Anything other than ASCII digit stops the port parser in a setter but is not an error\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net/path>.port = '65535' Port numbers are 16 bit integers\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net:8080/path>.port = '65536' Port numbers are 16 bit integers, overflowing is an error\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net:8080/path>.port = 'randomstring' Setting port to a string that doesn't parse as a number\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <non-special://example.net:8080/path>.port = '65536' Port numbers are 16 bit integers, overflowing is an error\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <file://test/>.port = '12'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <file://localhost/>.port = '12'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <non-base:value>.port = '12'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <sc:///>.port = '12'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <sc://x/>.port = '12'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <javascript://x/>.port = '12'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <https://domain.com:443>.port = '\\t8080' Leading u0009 on special scheme\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <wpt++://domain.com:443>.port = '\\t8080' Leading u0009 on non-special scheme\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <https://www.google.com:4343>.port = '4wpt' Should use all ascii prefixed characters as port\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <mailto:me@example.net>.pathname = '/foo' Opaque paths cannot be set\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <data:original>.pathname = 'new value'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <sc:original>.pathname = 'new value'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <file:///some/path>.pathname = '' Special URLs cannot have their paths erased\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <foo://somehost/some/path>.pathname = '' Non-special URLs can have their paths erased\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <foo:///some/path>.pathname = '' Non-special URLs with an empty host can have their paths erased\": {\n    \"status\": \"FAIL\"\n  },\n  \"URL: Setting <foo:/some/path>.pathname = '' Path-only URLs cannot have their paths erased\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <foo:/some/path>.pathname = 'test' Path-only URLs always have an initial slash\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <unix:/run/foo.socket?timeout=10>.pathname = '/var/log/../run/bar.socket'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <https://example.net#nav>.pathname = 'home'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <https://example.net#nav>.pathname = '../home'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net/home?lang=fr#nav>.pathname = '\\\\a\\\\%2E\\\\b\\\\%2e.\\\\c' \\\\ is a segment delimiter for 'special' URLs\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <view-source+http://example.net/home?lang=fr#nav>.pathname = '\\\\a\\\\%2E\\\\b\\\\%2e.\\\\c' \\\\ is *not* a segment delimiter for non-'special' URLs\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <a:/>.pathname = '\\u0000\\u0001\\t\\n\\r\\u001f !\\\"#$%&'()*+,-./09:;<=>?@AZ[\\\\]^_`az{|}~Éé' UTF-8 percent encoding with the default encode set. Tabs and newlines are removed.\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net>.pathname = '%2e%2E%c3%89té' Bytes already percent-encoded are left as-is, including %2E outside dotted segments.\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net>.pathname = '?' ? needs to be encoded\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net>.pathname = '#' # needs to be encoded\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <sc://example.net>.pathname = '?' ? needs to be encoded, non-special scheme\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <sc://example.net>.pathname = '#' # needs to be encoded, non-special scheme\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net>.pathname = '/?é' ? doesn't mess up encoding\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net>.pathname = '/#é' # doesn't mess up encoding\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <file://monkey/>.pathname = '\\\\\\\\' File URLs and (back)slashes\": {\n    \"status\": \"FAIL\"\n  },\n  \"URL: Setting <file:///unicorn>.pathname = '//\\\\/' File URLs and (back)slashes\": {\n    \"status\": \"FAIL\"\n  },\n  \"URL: Setting <file:///unicorn>.pathname = '//monkey/..//' File URLs and (back)slashes\": {\n    \"status\": \"FAIL\"\n  },\n  \"URL: Setting <non-spec:/>.pathname = '/.//p' Serialize /. in path\": {\n    \"status\": \"FAIL\"\n  },\n  \"URL: Setting <non-spec:/>.pathname = '/..//p'\": {\n    \"status\": \"FAIL\"\n  },\n  \"URL: Setting <non-spec:/>.pathname = '//p'\": {\n    \"status\": \"FAIL\"\n  },\n  \"URL: Setting <non-spec:/.//>.pathname = 'p' Drop /. from path\": {\n    \"status\": \"FAIL\"\n  },\n  \"URL: Setting <data:/nospace>.pathname = 'space ' Non-special URLs with non-opaque paths percent-encode U+0020\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <sc:/nospace>.pathname = 'space '\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net>.pathname = ' ' Trailing space should be encoded\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net>.pathname = '\\u0000' Trailing C0 control should be encoded\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <https://example.net#nav>.search = 'lang=fr'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <https://example.net?lang=en-US#nav>.search = 'lang=fr'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <https://example.net?lang=en-US#nav>.search = '?lang=fr'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <https://example.net?lang=en-US#nav>.search = '??lang=fr'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <https://example.net?lang=en-US#nav>.search = '?'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <https://example.net?lang=en-US#nav>.search = ''\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <https://example.net?lang=en-US>.search = ''\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <https://example.net>.search = ''\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <a:/>.search = '\\u0000\\u0001\\t\\n\\r\\u001f !\\\"#$%&'()*+,-./09:;<=>?@AZ[\\\\]^_`az{|}~Éé' UTF-8 percent encoding with the query encode set. Tabs and newlines are removed.\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net>.search = '%c3%89té' Bytes already percent-encoded are left as-is\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <data:space ?query>.search = '' Drop trailing spaces from trailing opaque paths\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <sc:space ?query>.search = ''\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <data:space  ?query#fragment>.search = '' Do not drop trailing spaces from non-trailing opaque paths\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <sc:space  ?query#fragment>.search = ''\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net>.search = ' ' Trailing space should be encoded\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net>.search = '\\u0000' Trailing C0 control should be encoded\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <https://example.net>.hash = 'main'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <https://example.net#nav>.hash = 'main'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <https://example.net?lang=en-US>.hash = '##nav'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <https://example.net?lang=en-US#nav>.hash = '#main'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <https://example.net?lang=en-US#nav>.hash = '#'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <https://example.net?lang=en-US#nav>.hash = ''\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net>.hash = '#foo bar'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net>.hash = '#foo\\\"bar'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net>.hash = '#foo<bar'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net>.hash = '#foo>bar'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net>.hash = '#foo`bar'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <a:/>.hash = '\\u0000\\u0001\\t\\n\\r\\u001f !\\\"#$%&'()*+,-./09:;<=>?@AZ[\\\\]^_`az{|}~Éé' Simple percent-encoding; tabs and newlines are removed\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net>.hash = 'a\\u0000b' Percent-encode NULLs in fragment\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <non-spec:/>.hash = 'a\\u0000b' Percent-encode NULLs in fragment\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net>.hash = '%c3%89té' Bytes already percent-encoded are left as-is\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <javascript:alert(1)>.hash = 'castle'\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <data:space                                                                                                                                  #fragment>.hash = '' Drop trailing spaces from trailing opaque paths\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <sc:space    #fragment>.hash = ''\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <data:space  ?query#fragment>.hash = '' Do not drop trailing spaces from non-trailing opaque paths\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <sc:space  ?query#fragment>.hash = ''\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net>.hash = ' ' Trailing space should be encoded\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <http://example.net>.hash = '\\u0000' Trailing C0 control should be encoded\": {\n    \"status\": \"PASS\"\n  },\n  \"URL: Setting <file:///var/log/system.log>.href = 'http://0300.168.0xF0'\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/url/url-statics-canparse.any.js.json",
    "content": "{\n  \"URL.canParse(undefined, undefined)\": {\n    \"status\": \"FAIL\"\n  },\n  \"URL.canParse(aaa:b, undefined)\": {\n    \"status\": \"FAIL\"\n  },\n  \"URL.canParse(undefined, aaa:b)\": {\n    \"status\": \"FAIL\"\n  },\n  \"URL.canParse(aaa:/b, undefined)\": {\n    \"status\": \"FAIL\"\n  },\n  \"URL.canParse(undefined, aaa:/b)\": {\n    \"status\": \"FAIL\"\n  },\n  \"URL.canParse(https://test:test, undefined)\": {\n    \"status\": \"FAIL\"\n  },\n  \"URL.canParse(a, https://b/)\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/url/url-statics-parse.any.js.json",
    "content": "{\n  \"URL.parse(undefined, undefined)\": {\n    \"status\": \"FAIL\"\n  },\n  \"URL.parse(aaa:b, undefined)\": {\n    \"status\": \"FAIL\"\n  },\n  \"URL.parse(undefined, aaa:b)\": {\n    \"status\": \"FAIL\"\n  },\n  \"URL.parse(aaa:/b, undefined)\": {\n    \"status\": \"FAIL\"\n  },\n  \"URL.parse(undefined, aaa:/b)\": {\n    \"status\": \"FAIL\"\n  },\n  \"URL.parse(https://test:test, undefined)\": {\n    \"status\": \"FAIL\"\n  },\n  \"URL.parse(a, https://b/)\": {\n    \"status\": \"FAIL\"\n  },\n  \"URL.parse() should return a unique object\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/url/url-tojson.any.js.json",
    "content": "{\n  \"url-tojson\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/url/urlencoded-parser.any.js.json",
    "content": "{\n  \"URLSearchParams constructed with: test\": {\n    \"status\": \"PASS\"\n  },\n  \"request.formData() with input: test\": {\n    \"status\": \"PASS\"\n  },\n  \"response.formData() with input: test\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams constructed with: ﻿test=﻿\": {\n    \"status\": \"PASS\"\n  },\n  \"request.formData() with input: ﻿test=﻿\": {\n    \"status\": \"FAIL\"\n  },\n  \"response.formData() with input: ﻿test=﻿\": {\n    \"status\": \"FAIL\"\n  },\n  \"URLSearchParams constructed with: %EF%BB%BFtest=%EF%BB%BF\": {\n    \"status\": \"PASS\"\n  },\n  \"request.formData() with input: %EF%BB%BFtest=%EF%BB%BF\": {\n    \"status\": \"FAIL\"\n  },\n  \"response.formData() with input: %EF%BB%BFtest=%EF%BB%BF\": {\n    \"status\": \"FAIL\"\n  },\n  \"URLSearchParams constructed with: %EF%BF%BF=%EF%BF%BF\": {\n    \"status\": \"PASS\"\n  },\n  \"request.formData() with input: %EF%BF%BF=%EF%BF%BF\": {\n    \"status\": \"FAIL\"\n  },\n  \"response.formData() with input: %EF%BF%BF=%EF%BF%BF\": {\n    \"status\": \"FAIL\"\n  },\n  \"URLSearchParams constructed with: %FE%FF\": {\n    \"status\": \"PASS\"\n  },\n  \"request.formData() with input: %FE%FF\": {\n    \"status\": \"PASS\"\n  },\n  \"response.formData() with input: %FE%FF\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams constructed with: %FF%FE\": {\n    \"status\": \"PASS\"\n  },\n  \"request.formData() with input: %FF%FE\": {\n    \"status\": \"PASS\"\n  },\n  \"response.formData() with input: %FF%FE\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams constructed with: †&†=x\": {\n    \"status\": \"PASS\"\n  },\n  \"request.formData() with input: †&†=x\": {\n    \"status\": \"PASS\"\n  },\n  \"response.formData() with input: †&†=x\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams constructed with: %C2\": {\n    \"status\": \"PASS\"\n  },\n  \"request.formData() with input: %C2\": {\n    \"status\": \"PASS\"\n  },\n  \"response.formData() with input: %C2\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams constructed with: %C2x\": {\n    \"status\": \"PASS\"\n  },\n  \"request.formData() with input: %C2x\": {\n    \"status\": \"PASS\"\n  },\n  \"response.formData() with input: %C2x\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams constructed with: _charset_=windows-1252&test=%C2x\": {\n    \"status\": \"PASS\"\n  },\n  \"request.formData() with input: _charset_=windows-1252&test=%C2x\": {\n    \"status\": \"PASS\"\n  },\n  \"response.formData() with input: _charset_=windows-1252&test=%C2x\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams constructed with: \": {\n    \"status\": \"PASS\"\n  },\n  \"request.formData() with input: \": {\n    \"status\": \"PASS\"\n  },\n  \"response.formData() with input: \": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams constructed with: a\": {\n    \"status\": \"PASS\"\n  },\n  \"request.formData() with input: a\": {\n    \"status\": \"PASS\"\n  },\n  \"response.formData() with input: a\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams constructed with: a=b\": {\n    \"status\": \"PASS\"\n  },\n  \"request.formData() with input: a=b\": {\n    \"status\": \"PASS\"\n  },\n  \"response.formData() with input: a=b\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams constructed with: a=\": {\n    \"status\": \"PASS\"\n  },\n  \"request.formData() with input: a=\": {\n    \"status\": \"PASS\"\n  },\n  \"response.formData() with input: a=\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams constructed with: =b\": {\n    \"status\": \"PASS\"\n  },\n  \"request.formData() with input: =b\": {\n    \"status\": \"PASS\"\n  },\n  \"response.formData() with input: =b\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams constructed with: &\": {\n    \"status\": \"PASS\"\n  },\n  \"request.formData() with input: &\": {\n    \"status\": \"PASS\"\n  },\n  \"response.formData() with input: &\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams constructed with: &a\": {\n    \"status\": \"PASS\"\n  },\n  \"request.formData() with input: &a\": {\n    \"status\": \"PASS\"\n  },\n  \"response.formData() with input: &a\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams constructed with: a&\": {\n    \"status\": \"PASS\"\n  },\n  \"request.formData() with input: a&\": {\n    \"status\": \"PASS\"\n  },\n  \"response.formData() with input: a&\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams constructed with: a&a\": {\n    \"status\": \"PASS\"\n  },\n  \"request.formData() with input: a&a\": {\n    \"status\": \"PASS\"\n  },\n  \"response.formData() with input: a&a\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams constructed with: a&b&c\": {\n    \"status\": \"PASS\"\n  },\n  \"request.formData() with input: a&b&c\": {\n    \"status\": \"PASS\"\n  },\n  \"response.formData() with input: a&b&c\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams constructed with: a=b&c=d\": {\n    \"status\": \"PASS\"\n  },\n  \"request.formData() with input: a=b&c=d\": {\n    \"status\": \"PASS\"\n  },\n  \"response.formData() with input: a=b&c=d\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams constructed with: a=b&c=d&\": {\n    \"status\": \"PASS\"\n  },\n  \"request.formData() with input: a=b&c=d&\": {\n    \"status\": \"PASS\"\n  },\n  \"response.formData() with input: a=b&c=d&\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams constructed with: &&&a=b&&&&c=d&\": {\n    \"status\": \"PASS\"\n  },\n  \"request.formData() with input: &&&a=b&&&&c=d&\": {\n    \"status\": \"PASS\"\n  },\n  \"response.formData() with input: &&&a=b&&&&c=d&\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams constructed with: a=a&a=b&a=c\": {\n    \"status\": \"PASS\"\n  },\n  \"request.formData() with input: a=a&a=b&a=c\": {\n    \"status\": \"PASS\"\n  },\n  \"response.formData() with input: a=a&a=b&a=c\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams constructed with: a==a\": {\n    \"status\": \"PASS\"\n  },\n  \"request.formData() with input: a==a\": {\n    \"status\": \"PASS\"\n  },\n  \"response.formData() with input: a==a\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams constructed with: a=a+b+c+d\": {\n    \"status\": \"PASS\"\n  },\n  \"request.formData() with input: a=a+b+c+d\": {\n    \"status\": \"PASS\"\n  },\n  \"response.formData() with input: a=a+b+c+d\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams constructed with: %=a\": {\n    \"status\": \"PASS\"\n  },\n  \"request.formData() with input: %=a\": {\n    \"status\": \"PASS\"\n  },\n  \"response.formData() with input: %=a\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams constructed with: %a=a\": {\n    \"status\": \"PASS\"\n  },\n  \"request.formData() with input: %a=a\": {\n    \"status\": \"PASS\"\n  },\n  \"response.formData() with input: %a=a\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams constructed with: %a_=a\": {\n    \"status\": \"PASS\"\n  },\n  \"request.formData() with input: %a_=a\": {\n    \"status\": \"PASS\"\n  },\n  \"response.formData() with input: %a_=a\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams constructed with: %61=a\": {\n    \"status\": \"PASS\"\n  },\n  \"request.formData() with input: %61=a\": {\n    \"status\": \"PASS\"\n  },\n  \"response.formData() with input: %61=a\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams constructed with: %61+%4d%4D=\": {\n    \"status\": \"PASS\"\n  },\n  \"request.formData() with input: %61+%4d%4D=\": {\n    \"status\": \"PASS\"\n  },\n  \"response.formData() with input: %61+%4d%4D=\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams constructed with: id=0&value=%\": {\n    \"status\": \"PASS\"\n  },\n  \"request.formData() with input: id=0&value=%\": {\n    \"status\": \"PASS\"\n  },\n  \"response.formData() with input: id=0&value=%\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams constructed with: b=%2sf%2a\": {\n    \"status\": \"PASS\"\n  },\n  \"request.formData() with input: b=%2sf%2a\": {\n    \"status\": \"PASS\"\n  },\n  \"response.formData() with input: b=%2sf%2a\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams constructed with: b=%2%2af%2a\": {\n    \"status\": \"PASS\"\n  },\n  \"request.formData() with input: b=%2%2af%2a\": {\n    \"status\": \"PASS\"\n  },\n  \"response.formData() with input: b=%2%2af%2a\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams constructed with: b=%%2a\": {\n    \"status\": \"PASS\"\n  },\n  \"request.formData() with input: b=%%2a\": {\n    \"status\": \"PASS\"\n  },\n  \"response.formData() with input: b=%%2a\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/url/urlsearchparams-append.any.js.json",
    "content": "{\n  \"Append same name\": {\n    \"status\": \"PASS\"\n  },\n  \"Append empty strings\": {\n    \"status\": \"PASS\"\n  },\n  \"Append null\": {\n    \"status\": \"PASS\"\n  },\n  \"Append multiple\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/url/urlsearchparams-constructor.any.js.json",
    "content": "{\n  \"Basic URLSearchParams construction\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams constructor, no arguments\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams constructor, remove leading \\\"?\\\"\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams constructor, DOMException as argument\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams constructor, empty string as argument\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams constructor, {} as argument\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams constructor, string.\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams constructor, object.\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams constructor, FormData.\": {\n    \"status\": \"PASS\"\n  },\n  \"Parse +\": {\n    \"status\": \"PASS\"\n  },\n  \"Parse encoded +\": {\n    \"status\": \"PASS\"\n  },\n  \"Parse space\": {\n    \"status\": \"PASS\"\n  },\n  \"Parse %20\": {\n    \"status\": \"PASS\"\n  },\n  \"Parse \\\\0\": {\n    \"status\": \"PASS\"\n  },\n  \"Parse %00\": {\n    \"status\": \"PASS\"\n  },\n  \"Parse ⎄\": {\n    \"status\": \"PASS\"\n  },\n  \"Parse %e2%8e%84\": {\n    \"status\": \"PASS\"\n  },\n  \"Parse 💩\": {\n    \"status\": \"PASS\"\n  },\n  \"Parse %f0%9f%92%a9\": {\n    \"status\": \"PASS\"\n  },\n  \"Constructor with sequence of sequences of strings\": {\n    \"status\": \"PASS\"\n  },\n  \"Construct with object with +\": {\n    \"status\": \"PASS\"\n  },\n  \"Construct with object with two keys\": {\n    \"status\": \"PASS\"\n  },\n  \"Construct with array with two keys\": {\n    \"status\": \"PASS\"\n  },\n  \"Construct with 2 unpaired surrogates (no trailing)\": {\n    \"status\": \"FAIL\"\n  },\n  \"Construct with 3 unpaired surrogates (no leading)\": {\n    \"status\": \"FAIL\"\n  },\n  \"Construct with object with NULL, non-ASCII, and surrogate keys\": {\n    \"status\": \"PASS\"\n  },\n  \"Custom [Symbol.iterator]\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/url/urlsearchparams-delete.any.js.json",
    "content": "{\n  \"Delete basics\": {\n    \"status\": \"PASS\"\n  },\n  \"Deleting appended multiple\": {\n    \"status\": \"PASS\"\n  },\n  \"Deleting all params removes ? from URL\": {\n    \"status\": \"PASS\"\n  },\n  \"Removing non-existent param removes ? from URL\": {\n    \"status\": \"PASS\"\n  },\n  \"Changing the query of a URL with an opaque path can impact the path\": {\n    \"status\": \"PASS\"\n  },\n  \"Changing the query of a URL with an opaque path can impact the path if the URL has no fragment\": {\n    \"status\": \"PASS\"\n  },\n  \"Two-argument delete()\": {\n    \"status\": \"FAIL\"\n  },\n  \"Two-argument delete() respects undefined as second arg\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/url/urlsearchparams-foreach.any.js.json",
    "content": "{\n  \"ForEach Check\": {\n    \"status\": \"PASS\"\n  },\n  \"For-of Check\": {\n    \"status\": \"PASS\"\n  },\n  \"empty\": {\n    \"status\": \"PASS\"\n  },\n  \"delete next param during iteration\": {\n    \"status\": \"PASS\"\n  },\n  \"delete current param during iteration\": {\n    \"status\": \"PASS\"\n  },\n  \"delete every param seen during iteration\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/url/urlsearchparams-get.any.js.json",
    "content": "{\n  \"Get basics\": {\n    \"status\": \"FAIL\"\n  },\n  \"More get() basics\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/url/urlsearchparams-getall.any.js.json",
    "content": "{\n  \"getAll() basics\": {\n    \"status\": \"PASS\"\n  },\n  \"getAll() multiples\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/url/urlsearchparams-has.any.js.json",
    "content": "{\n  \"Has basics\": {\n    \"status\": \"PASS\"\n  },\n  \"has() following delete()\": {\n    \"status\": \"PASS\"\n  },\n  \"Two-argument has()\": {\n    \"status\": \"FAIL\"\n  },\n  \"Two-argument has() respects undefined as second arg\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/url/urlsearchparams-set.any.js.json",
    "content": "{\n  \"Set basics\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams.set\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/url/urlsearchparams-size.any.js.json",
    "content": "{\n  \"URLSearchParams's size and deletion\": {\n    \"status\": \"FAIL\"\n  },\n  \"URLSearchParams's size and addition\": {\n    \"status\": \"FAIL\"\n  },\n  \"URLSearchParams's size when obtained from a URL\": {\n    \"status\": \"FAIL\"\n  },\n  \"URLSearchParams's size when obtained from a URL and using .search\": {\n    \"status\": \"FAIL\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/url/urlsearchparams-sort.any.js.json",
    "content": "{\n  \"Parse and sort: z=b&a=b&z=a&a=a\": {\n    \"status\": \"PASS\"\n  },\n  \"URL parse and sort: z=b&a=b&z=a&a=a\": {\n    \"status\": \"PASS\"\n  },\n  \"Parse and sort: �=x&￼&�=a\": {\n    \"status\": \"PASS\"\n  },\n  \"URL parse and sort: �=x&￼&�=a\": {\n    \"status\": \"PASS\"\n  },\n  \"Parse and sort: ﬃ&🌈\": {\n    \"status\": \"PASS\"\n  },\n  \"URL parse and sort: ﬃ&🌈\": {\n    \"status\": \"PASS\"\n  },\n  \"Parse and sort: é&e�&é\": {\n    \"status\": \"PASS\"\n  },\n  \"URL parse and sort: é&e�&é\": {\n    \"status\": \"PASS\"\n  },\n  \"Parse and sort: z=z&a=a&z=y&a=b&z=x&a=c&z=w&a=d&z=v&a=e&z=u&a=f&z=t&a=g\": {\n    \"status\": \"PASS\"\n  },\n  \"URL parse and sort: z=z&a=a&z=y&a=b&z=x&a=c&z=w&a=d&z=v&a=e&z=u&a=f&z=t&a=g\": {\n    \"status\": \"PASS\"\n  },\n  \"Parse and sort: bbb&bb&aaa&aa=x&aa=y\": {\n    \"status\": \"PASS\"\n  },\n  \"URL parse and sort: bbb&bb&aaa&aa=x&aa=y\": {\n    \"status\": \"PASS\"\n  },\n  \"Parse and sort: z=z&=f&=t&=x\": {\n    \"status\": \"PASS\"\n  },\n  \"URL parse and sort: z=z&=f&=t&=x\": {\n    \"status\": \"PASS\"\n  },\n  \"Parse and sort: a🌈&a💩\": {\n    \"status\": \"PASS\"\n  },\n  \"URL parse and sort: a🌈&a💩\": {\n    \"status\": \"PASS\"\n  },\n  \"Sorting non-existent params removes ? from URL\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/url/urlsearchparams-stringifier.any.js.json",
    "content": "{\n  \"Serialize space\": {\n    \"status\": \"PASS\"\n  },\n  \"Serialize empty value\": {\n    \"status\": \"PASS\"\n  },\n  \"Serialize empty name\": {\n    \"status\": \"PASS\"\n  },\n  \"Serialize empty name and value\": {\n    \"status\": \"PASS\"\n  },\n  \"Serialize +\": {\n    \"status\": \"PASS\"\n  },\n  \"Serialize =\": {\n    \"status\": \"PASS\"\n  },\n  \"Serialize &\": {\n    \"status\": \"PASS\"\n  },\n  \"Serialize *-._\": {\n    \"status\": \"PASS\"\n  },\n  \"Serialize %\": {\n    \"status\": \"PASS\"\n  },\n  \"Serialize \\\\0\": {\n    \"status\": \"PASS\"\n  },\n  \"Serialize 💩\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams.toString\": {\n    \"status\": \"PASS\"\n  },\n  \"URLSearchParams connected to URL\": {\n    \"status\": \"FAIL\"\n  },\n  \"URLSearchParams must not do newline normalization\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/webidl/ecmascript-binding/es-exceptions/DOMException-constants.any.js.json",
    "content": "{\n  \"DOMException-constants\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant INDEX_SIZE_ERR on DOMException constructor object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant INDEX_SIZE_ERR on DOMException prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant DOMSTRING_SIZE_ERR on DOMException constructor object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant DOMSTRING_SIZE_ERR on DOMException prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant HIERARCHY_REQUEST_ERR on DOMException constructor object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant HIERARCHY_REQUEST_ERR on DOMException prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant WRONG_DOCUMENT_ERR on DOMException constructor object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant WRONG_DOCUMENT_ERR on DOMException prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant INVALID_CHARACTER_ERR on DOMException constructor object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant INVALID_CHARACTER_ERR on DOMException prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant NO_DATA_ALLOWED_ERR on DOMException constructor object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant NO_DATA_ALLOWED_ERR on DOMException prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant NO_MODIFICATION_ALLOWED_ERR on DOMException constructor object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant NO_MODIFICATION_ALLOWED_ERR on DOMException prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant NOT_FOUND_ERR on DOMException constructor object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant NOT_FOUND_ERR on DOMException prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant NOT_SUPPORTED_ERR on DOMException constructor object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant NOT_SUPPORTED_ERR on DOMException prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant INUSE_ATTRIBUTE_ERR on DOMException constructor object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant INUSE_ATTRIBUTE_ERR on DOMException prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant INVALID_STATE_ERR on DOMException constructor object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant INVALID_STATE_ERR on DOMException prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant SYNTAX_ERR on DOMException constructor object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant SYNTAX_ERR on DOMException prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant INVALID_MODIFICATION_ERR on DOMException constructor object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant INVALID_MODIFICATION_ERR on DOMException prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant NAMESPACE_ERR on DOMException constructor object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant NAMESPACE_ERR on DOMException prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant INVALID_ACCESS_ERR on DOMException constructor object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant INVALID_ACCESS_ERR on DOMException prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant VALIDATION_ERR on DOMException constructor object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant VALIDATION_ERR on DOMException prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant TYPE_MISMATCH_ERR on DOMException constructor object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant TYPE_MISMATCH_ERR on DOMException prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant SECURITY_ERR on DOMException constructor object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant SECURITY_ERR on DOMException prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant NETWORK_ERR on DOMException constructor object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant NETWORK_ERR on DOMException prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant ABORT_ERR on DOMException constructor object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant ABORT_ERR on DOMException prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant URL_MISMATCH_ERR on DOMException constructor object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant URL_MISMATCH_ERR on DOMException prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant QUOTA_EXCEEDED_ERR on DOMException constructor object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant QUOTA_EXCEEDED_ERR on DOMException prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant TIMEOUT_ERR on DOMException constructor object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant TIMEOUT_ERR on DOMException prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant INVALID_NODE_TYPE_ERR on DOMException constructor object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant INVALID_NODE_TYPE_ERR on DOMException prototype object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant DATA_CLONE_ERR on DOMException constructor object\": {\n    \"status\": \"PASS\"\n  },\n  \"Constant DATA_CLONE_ERR on DOMException prototype object\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/webidl/ecmascript-binding/es-exceptions/DOMException-constructor-and-prototype.any.js.json",
    "content": "{\n  \"existence and property descriptor of DOMException\": {\n    \"status\": \"PASS\"\n  },\n  \"existence and property descriptor of DOMException.prototype\": {\n    \"status\": \"PASS\"\n  },\n  \"existence and property descriptor of DOMException.prototype.constructor\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/webidl/ecmascript-binding/es-exceptions/DOMException-constructor-behavior.any.js.json",
    "content": "{\n  \"new DOMException()\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMException(): inherited-ness\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMException(null)\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMException(undefined)\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMException(undefined): inherited-ness\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMException(\\\"foo\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMException(\\\"foo\\\"): inherited-ness\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMException(\\\"bar\\\", undefined)\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMException(\\\"bar\\\", \\\"NotSupportedError\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMException(\\\"bar\\\", \\\"NotSupportedError\\\"): inherited-ness\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMException(\\\"bar\\\", \\\"foo\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMexception(\\\"msg\\\", \\\"IndexSizeError\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMexception(\\\"msg\\\", \\\"HierarchyRequestError\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMexception(\\\"msg\\\", \\\"WrongDocumentError\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMexception(\\\"msg\\\", \\\"InvalidCharacterError\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMexception(\\\"msg\\\", \\\"NoModificationAllowedError\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMexception(\\\"msg\\\", \\\"NotFoundError\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMexception(\\\"msg\\\", \\\"NotSupportedError\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMexception(\\\"msg\\\", \\\"InUseAttributeError\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMexception(\\\"msg\\\", \\\"InvalidStateError\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMexception(\\\"msg\\\", \\\"SyntaxError\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMexception(\\\"msg\\\", \\\"InvalidModificationError\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMexception(\\\"msg\\\", \\\"NamespaceError\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMexception(\\\"msg\\\", \\\"InvalidAccessError\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMexception(\\\"msg\\\", \\\"TypeMismatchError\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMexception(\\\"msg\\\", \\\"SecurityError\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMexception(\\\"msg\\\", \\\"NetworkError\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMexception(\\\"msg\\\", \\\"AbortError\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMexception(\\\"msg\\\", \\\"URLMismatchError\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMexception(\\\"msg\\\", \\\"QuotaExceededError\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMexception(\\\"msg\\\", \\\"TimeoutError\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMexception(\\\"msg\\\", \\\"InvalidNodeTypeError\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMexception(\\\"msg\\\", \\\"DataCloneError\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMexception(\\\"msg\\\", \\\"DOMStringSizeError\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMexception(\\\"msg\\\", \\\"NoDataAllowedError\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMexception(\\\"msg\\\", \\\"ValidationError\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMexception(\\\"msg\\\", \\\"EncodingError\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMexception(\\\"msg\\\", \\\"NotReadableError\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMexception(\\\"msg\\\", \\\"UnknownError\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMexception(\\\"msg\\\", \\\"ConstraintError\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMexception(\\\"msg\\\", \\\"DataError\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMexception(\\\"msg\\\", \\\"TransactionInactiveError\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMexception(\\\"msg\\\", \\\"ReadOnlyError\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMexception(\\\"msg\\\", \\\"VersionError\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMexception(\\\"msg\\\", \\\"OperationError\\\")\": {\n    \"status\": \"PASS\"\n  },\n  \"new DOMexception(\\\"msg\\\", \\\"NotAllowedError\\\")\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/webidl/ecmascript-binding/es-exceptions/DOMException-custom-bindings.any.js.json",
    "content": "{\n  \"Cannot construct without new\": {\n    \"status\": \"PASS\"\n  },\n  \"inherits from Error: prototype-side\": {\n    \"status\": \"PASS\"\n  },\n  \"does not inherit from Error: class-side\": {\n    \"status\": \"PASS\"\n  },\n  \"message property descriptor\": {\n    \"status\": \"PASS\"\n  },\n  \"message getter performs brand checks (i.e. is not [LegacyLenientThis])\": {\n    \"status\": \"PASS\"\n  },\n  \"name property descriptor\": {\n    \"status\": \"PASS\"\n  },\n  \"name getter performs brand checks (i.e. is not [LegacyLenientThis])\": {\n    \"status\": \"PASS\"\n  },\n  \"code property descriptor\": {\n    \"status\": \"PASS\"\n  },\n  \"code getter performs brand checks (i.e. is not [LegacyLenientThis])\": {\n    \"status\": \"PASS\"\n  },\n  \"code property is not affected by shadowing the name property\": {\n    \"status\": \"PASS\"\n  },\n  \"Object.prototype.toString behavior is like other interfaces\": {\n    \"status\": \"PASS\"\n  },\n  \"Inherits its toString() from Error.prototype\": {\n    \"status\": \"PASS\"\n  },\n  \"toString() behavior from Error.prototype applies as expected\": {\n    \"status\": \"PASS\"\n  },\n  \"DOMException.prototype.toString() applied to DOMException.prototype throws because of name/message brand checks\": {\n    \"status\": \"PASS\"\n  },\n  \"If the implementation has a stack property on normal errors, it also does on DOMExceptions\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/xhr/formdata/append.any.js.json",
    "content": "{\n  \"testFormDataAppend1\": {\n    \"status\": \"PASS\"\n  },\n  \"testFormDataAppend2\": {\n    \"status\": \"PASS\"\n  },\n  \"testFormDataAppendUndefined1\": {\n    \"status\": \"PASS\"\n  },\n  \"testFormDataAppendUndefined2\": {\n    \"status\": \"PASS\"\n  },\n  \"testFormDataAppendNull1\": {\n    \"status\": \"PASS\"\n  },\n  \"testFormDataAppendNull2\": {\n    \"status\": \"PASS\"\n  },\n  \"testFormDataAppendEmptyBlob\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/xhr/formdata/constructor.any.js.json",
    "content": "{\n  \"Constructors should throw a type error\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/xhr/formdata/delete.any.js.json",
    "content": "{\n  \"testFormDataDelete\": {\n    \"status\": \"PASS\"\n  },\n  \"testFormDataDeleteNonExistentKey\": {\n    \"status\": \"PASS\"\n  },\n  \"testFormDataDeleteOtherKey\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/xhr/formdata/foreach.any.js.json",
    "content": "{\n  \"Iterator should return duplicate keys and non-deleted values\": {\n    \"status\": \"PASS\"\n  },\n  \"Entries iterator should return duplicate keys and non-deleted values\": {\n    \"status\": \"PASS\"\n  },\n  \"Keys iterator should return duplicates\": {\n    \"status\": \"PASS\"\n  },\n  \"Values iterator should return non-deleted values\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/xhr/formdata/get.any.js.json",
    "content": "{\n  \"testFormDataGet\": {\n    \"status\": \"PASS\"\n  },\n  \"testFormDataGetNull1\": {\n    \"status\": \"PASS\"\n  },\n  \"testFormDataGetNull2\": {\n    \"status\": \"PASS\"\n  },\n  \"testFormDataGetAll\": {\n    \"status\": \"PASS\"\n  },\n  \"testFormDataGetAllEmpty1\": {\n    \"status\": \"PASS\"\n  },\n  \"testFormDataGetAllEmpty2\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/xhr/formdata/has.any.js.json",
    "content": "{\n  \"testFormDataHas\": {\n    \"status\": \"PASS\"\n  },\n  \"testFormDataHasEmpty1\": {\n    \"status\": \"PASS\"\n  },\n  \"testFormDataHasEmpty2\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/xhr/formdata/iteration.any.js.json",
    "content": "{\n  \"Iteration skips elements removed while iterating\": {\n    \"status\": \"PASS\"\n  },\n  \"Removing elements already iterated over causes an element to be skipped during iteration\": {\n    \"status\": \"PASS\"\n  },\n  \"Appending a value pair during iteration causes it to be reached during iteration\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/xhr/formdata/set-blob.any.js.json",
    "content": "{\n  \"blob without type\": {\n    \"status\": \"PASS\"\n  },\n  \"blob with type\": {\n    \"status\": \"PASS\"\n  },\n  \"blob with custom name\": {\n    \"status\": \"PASS\"\n  },\n  \"file without lastModified or custom name\": {\n    \"status\": \"PASS\"\n  },\n  \"file with lastModified and custom name\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/expectations/xhr/formdata/set.any.js.json",
    "content": "{\n  \"testFormDataSet1\": {\n    \"status\": \"PASS\"\n  },\n  \"testFormDataSet2\": {\n    \"status\": \"PASS\"\n  },\n  \"testFormDataSetUndefined1\": {\n    \"status\": \"PASS\"\n  },\n  \"testFormDataSetUndefined2\": {\n    \"status\": \"PASS\"\n  },\n  \"testFormDataSetNull1\": {\n    \"status\": \"PASS\"\n  },\n  \"testFormDataSetNull2\": {\n    \"status\": \"PASS\"\n  },\n  \"testFormDataSetEmptyBlob\": {\n    \"status\": \"PASS\"\n  }\n}"
  },
  {
    "path": "tests/wpt-harness/post-harness.js",
    "content": "/* eslint-env serviceworker */\n/* global add_completion_callback setup done */\n\nlet completionPromise = new Promise((resolve) => {\n    add_completion_callback(function(tests, harness_status, asserts) {\n      resolve({tests, harness_status, asserts});\n    });\n});\n\nsetup({ explicit_done: true });\n\nasync function handleRequest(event) {\n  let url = new URL(event.request.url);\n  let input = `http://web-platform.test:8000${url.pathname}${url.search}`;\n  let baseURL = new URL(input);\n  setBaseURL(baseURL);\n  globalThis.location = baseURL;\n  try {\n    let response = await fetch(input);\n    let testSource = await response.text();\n    testSource += \"\\n//# sourceURL=\" + url.pathname;\n\n    let scripts = [];\n\n    // eslint-disable-next-line no-unused-vars\n    for (let [_, path] of testSource.matchAll(/META: *script=(.+)/g)) {\n      let metaSource = await loadMetaScript(path, input);\n      scripts.push(metaSource);\n    }\n\n    scripts.push(testSource);\n    evalAllScripts(scripts);\n    done();\n\n    let {tests} = await completionPromise;\n\n    return new Response(JSON.stringify(tests, null, 2), { headers: { \"content-encoding\" : \"application/json\" } });\n  } catch (e) {\n    console.log(`error: ${e}, stack:\\n${e.stack}`);\n    return new Response(`{\n      \"error\": {\n        \"message\": ${JSON.stringify(e.message)},\n        \"stack\": ${JSON.stringify(e.stack)}\n      }\n    }`, { status: 500 });\n  }\n}\n\nfunction evalAllScripts(wpt_test_scripts) {\n  for (let wpt_test_script of wpt_test_scripts) {\n    (0, eval)(wpt_test_script);\n  }\n}\n\nasync function loadMetaScript(path) {\n  let response = await fetch(path);\n  let metaSource = await response.text();\n  // Somewhat annoyingly, the WPT harness includes META scripts as <script src=[path]> tags,\n  // which don't create their own scope for `const` and `let bindings, as `eval` does.\n  // That means that running them in `eval` doesn't make any `const` and `let` bound values\n  // available to code outside of the current `eval`, which breaks various WPT files.\n  //\n  // Short of introducing a host call for evaluating code in the same way a `<script>` tag does\n  // the only way to get around that is to replace all these bindings with `var`. Which is\n  // an ugly hack, but works reasonably well.\n  let lines = metaSource.split(\"\\n\");\n  lines = lines.map(line => {\n    if (line.indexOf(\"const \") == 0) {\n      return `var ${line.slice(6)}`;\n    }\n    if (line.indexOf(\"let \") == 0) {\n      return `var ${line.slice(4)}`;\n    }\n    return line;\n  });\n  metaSource = lines.join(\"\\n\");\n  metaSource += \"\\n//# sourceURL=\" + path;\n  return metaSource;\n}\n\naddEventListener(\"fetch\", event => event.respondWith(handleRequest(event)));\n"
  },
  {
    "path": "tests/wpt-harness/pre-harness.js",
    "content": "import { enableDebugLogging, setBaseURL } from \"fastly:experimental\";\n// enableDebugLogging(true);\n\nglobalThis.GLOBAL = {\n  isWindow: function() { return false; },\n  isWorker: function() { return true; },\n  isShadowRealm: function() { return false; },\n};\n\nglobalThis.window=self;\nglobalThis.Window={\n  prototype: {}\n};\n\nlet originalAEL = addEventListener;\nlet o_clearTimeout = clearTimeout;\nclearTimeout = function(id) {\n  if (id === null) {\n    return;\n  }\n  return o_clearTimeout(id);\n}\naddEventListener = function addEventListener_wpt(type, handler) {\n  if (type == \"fetch\") {\n    originalAEL(type, handler);\n  } else {\n    console.log(`Ignoring handler for event ${type}`);\n  }\n}\n\nglobalThis.crypto.subtle.generateKey = function () {return Promise.reject(new Error('globalThis.crypto.subtle.generateKey unimplemented'))}\nglobalThis.SharedArrayBuffer = class SharedArrayBuffer{};\nglobalThis.MessageChannel = class MessageChannel{};\n;\n"
  },
  {
    "path": "tests/wpt-harness/results-page.template.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>\n<title>Results</title>\n<style>\nbody {\n  font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;\n}\n\n#meta {\n  margin-bottom: 20px;\n}\n\n#results table {\n  max-width: 100%;\n}\n\n.expected {\n  display: none;\n}\n.pass .grade {\n  background: #7fc883;\n}\n.fail .grade {\n  background: #e67171;\n}\n\n.show-expected .expected {\n  display: revert;\n}\n\n.show-expected-fail .expected.fail {\n  display: revert;\n}\n\n.show-expected-pass .expected.pass {\n  display: revert;\n}\n\n.show-none .result {\n  display: none;\n}\n\nth {\n  text-align: left;\n}\n\ntd {\n  padding: 5px;\n}\n\ntd.name, td.message {\n  max-width: 40%;\n}\n\n#summary {\n  display: none;\n}\n</style>\n\n</head>\n<body>\n  <section id=\"meta\">\n  <h1>Running tests matching pattern \"{pattern}\"</h1>\n  <div id=\"pending\">\n    Running {count} tests ...\n  </div>\n  <div id=\"summary\"></div>\n  <hr>\n  <div>\n    <p>Type of results to show:</p>\n    <input type=\"radio\" name=\"result-visibility\" id=\"show-none\">\n    <label for=\"show-none\">None</label>\n    <input type=\"radio\" name=\"result-visibility\" id=\"show-unexpected\" checked>\n    <label for=\"show-unexpected\">Unexpected</label>\n    <input type=\"radio\" name=\"result-visibility\" id=\"show-expected\">\n    <label for=\"show-expected\">All</label>\n    <input type=\"radio\" name=\"result-visibility\" id=\"show-expected-fail\">\n    <label for=\"show-expected-fail\">Unexpected + expected failures</label>\n    <input type=\"radio\" name=\"result-visibility\" id=\"show-expected-pass\">\n    <label for=\"show-expected-pass\">Unexpected + expected passes</label>\n  </div>\n</section>\n\n<hr>\n\n<section id=\"results\" class=\"unexpected\">\n  <h2>Results</h2>\n  <script>\n    let currentValue = \"unexpected\";\n\n    function applyVisibility(visibility) {\n        document.querySelector(\"#results\").classList.toggle(currentValue);\n        currentValue = visibility;\n        document.querySelector(\"#results\").classList.toggle(currentValue);\n    }\n  document.querySelectorAll('input[name=\"result-visibility\"]').forEach(input => {\n      if (input.checked) {\n        applyVisibility(input.id);\n      }\n      input.addEventListener(\"change\", event => applyVisibility(event.target.id))\n  });\n  </script>\n<table>\n<thead>\n    <tr>\n        <th>Test</th>\n        <th>Result</th>\n        <th>Message</th>\n    </tr>\n</thead>\n<tbody>\n{results}\n</tbody>\n</table>\n</section>\n</body>\n<script>\n  document.getElementById(\"pending\").style.display = \"none\";\n  let summary = document.getElementById(\"summary\");\n  summary.textContent = \"Done. Pass rate: {pass} / {total} (took {duration}ms)\";\n  summary.style.display = \"block\";\n</script>\n</html>\n"
  },
  {
    "path": "tests/wpt-harness/results-section-error.template.html",
    "content": "<tr>\n  <td>\n    ${prefix}<a href=\"/${title}\">${title}</a><br>\n    <details><summary>Details</summary>\n      <p>Message: <pre>${message}</pre></p>\n      <p>Stack:<br><pre>${stack}</pre><p>\n    </details>\n  </td>\n</td></tr>\n"
  },
  {
    "path": "tests/wpt-harness/results-section.template.html",
    "content": "<tr>\n  <td>${prefix}<a href=\"/${title}\">${title}</a></td>\n  <td>${pass} / ${total}</td><td>duration: ${duration}ms</td>\n  ${info}\n</td></tr>\n  ${rows}\n"
  },
  {
    "path": "tests/wpt-harness/run-wpt.mjs",
    "content": "import { argv } from 'process';\nimport { execFile } from \"child_process\";\nimport { on, once } from \"events\";\nimport { existsSync, mkdirSync, rmSync, readFileSync, writeFileSync } from \"fs\";\nimport http from \"http\";\nimport path from \"path\";\n\nlet LogLevel = {\n  Quiet: 0,\n  Verbose: 1,\n  VeryVerbose: 2,\n};\n\nfunction relativePath(path) {\n  return new URL(path, import.meta.url).pathname;\n}\n\nconst SLOW_PREFIX = \"SLOW \";\n\nconst config = {\n  viceroy: {\n    external: false,\n    configFile: relativePath(\"./viceroy.toml\"),\n    host: \"http://127.0.0.1:7676\",\n    runtime: \"wpt-runtime.wasm\",\n  },\n  wptServer: {\n    external: false,\n    path: relativePath(\"./wpt/wpt\"),\n  },\n  server: {\n    port: 7879,\n  },\n  tests: {\n    list: relativePath(\"tests.json\"),\n    expectations: relativePath(\"expectations\"),\n    updateExpectations: false,\n    pattern: \"\",\n  },\n  results: {\n    pageTemplate: relativePath(\"results-page.template.html\"),\n    sectionTemplate: relativePath(\"results-section.template.html\"),\n    sectionErrorTemplate: relativePath(\"results-section-error.template.html\"),\n  },\n  interactive: false,\n  skipSlowTests: false,\n  logLevel: LogLevel.Quiet,\n};\n\nconst ArgParsers = {\n  \"--runtime\": {\n    help: `Path to .wasm file containing the WPT tests runtime to use (default: ${config.viceroy.runtime})`,\n    cmd: val => { config.viceroy.runtime = val }\n  },\n  \"--port\": {\n    help: `Port to run the server on in interactive mode (default: ${config.server.port})`,\n    cmd: val => {\n      config.server.port = parseInt(val, 10);\n      if (isNaN(config.server.port)) {\n        return `Invalid value for --port: ${val}`;\n      }\n    }\n  },\n  \"--external-viceroy\": {\n    help: \"Don't start a Viceroy instance internally (default: false)\",\n    cmd: () => { config.viceroy.external = true; }\n  },\n  \"--external-wpt-server\": {\n    help: \"Don't start an instance of the WPT server internally (default: false)\",\n    cmd: () => { config.wptServer.external = true; }\n  },\n  \"--expectations\": {\n    help: `Path to the directory containing test expectations files (default: ${config.tests.expectations}}`,\n    cmd: val => { config.tests.expectations = val; }\n  },\n  \"--update-expectations\": {\n    help: \"Update test expectations file with results from the current run (default: false)\",\n    cmd: () => { config.tests.updateExpectations = true; }\n  },\n  \"--interactive\": {\n    help: \"Start a server instead of directly running tests\",\n    cmd: () => { config.interactive = true; }\n  },\n  \"--skip-slow-tests\": {\n    help: \"Skip tests that take a long time, in particular in debug builds of the runtime\",\n    cmd: () => { config.skipSlowTests = true; }\n  },\n  \"-v\": {\n    help: \"Verbose output\",\n    cmd: () => { config.logLevel = LogLevel.Verbose; }\n  },\n  \"-vv\": {\n    help: \"Very verbose output\",\n    cmd: () => { config.logLevel = LogLevel.VeryVerbose; }\n  },\n  \"--help\": {\n    help: \"Print this help message\",\n    cmd: () => {\n      console.log(`Usage:\n    node run-wpt.mjs [...options] [pattern]\n\nIf a pattern is provided, only tests whose path contains the pattern will be run\n\nOptions:`);\n\n      for (let [name, parser] of Object.entries(ArgParsers)) {\n        console.log(`    ${(name + (parser.cmd.length > 0 ? \"=value\" : \"\")).padEnd(25)}${parser.help}`);\n      }\n      process.exit(0);\n     }\n\n  },\n}\n\nfunction applyConfig(argv) {\n  for (let entry of argv.slice(2)) {\n    if (entry[0] != \"-\") {\n      config.tests.pattern = entry;\n      continue;\n    }\n    let [arg, val] = entry.split(\"=\");\n    let result = undefined;\n    let parser = ArgParsers[arg];\n    if (parser) {\n      result = parser.cmd(val);\n    } else {\n      result = `Unknown argument: ${arg}`;\n    }\n\n    if (result) {\n      console.error(result);\n      process.exit(1);\n    }\n  }\n\n  if (!existsSync(config.viceroy.runtime)) {\n    console.error(`Runtime not found: ${config.viceroy.runtime}`);\n    return false;\n  }\n\n  if (config.interactive) {\n    if (config.tests.updateExpectations) {\n      console.error(\"Can't update test expectations in interactive mode\");\n      return false;\n    }\n  }\n\n  return true;\n}\n\nasync function run() {\n  if (!applyConfig(argv)) {\n    return process.exit(1);\n  }\n\n  let [wptServer, viceroy] = await Promise.all([ensureWptServer(config.wptServer, config.logLevel),\n                                                ensureViceroy(config.viceroy, config.logLevel)]);\n\n  if (config.interactive) {\n    const server = http.createServer((req, res) => handleRequest(req, res, viceroy));\n    server.listen(config.server.port);\n    console.log(`Listening on http://localhost:${config.server.port}`);\n  } else {\n    let {testPaths, totalCount } = getTests(config.tests.pattern);\n    let pathLength = testPaths.reduce((length, path) => Math.max(path.length, length), 0);\n\n    console.log(`Running ${testPaths.length} of ${totalCount} tests ...\\n`);\n\n    let expectationsUpdated = 0;\n    let unexpectedFailure = false;\n\n    let stats = await runTests(testPaths, viceroy,\n      (testPath, results, stats) => {\n        console.log(`${testPath.padEnd(pathLength)} ${formatStats(stats)}`);\n        if (config.tests.updateExpectations && stats.unexpectedFail + stats.unexpectedPass + stats.missing > 0) {\n          let expectPath = path.join(config.tests.expectations, testPath + \".json\");\n          console.log(`writing changed expectations to ${expectPath}`);\n          let expectations = {};\n          for (let result of results) {\n            expectations[result.name] = {\n              status: result.status === 0 ? 'PASS' : 'FAIL',\n            };\n          }\n\n          mkdirSync(path.dirname(expectPath), { recursive: true });\n          writeFileSync(expectPath, JSON.stringify(expectations, null, 2));\n          expectationsUpdated++;\n        }\n      },\n      (testPath, error, stats) => {\n        let expectPath = path.join(config.tests.expectations, testPath + \".json\");\n        let exists = existsSync(expectPath);\n        if (exists) {\n          console.log(`UNEXPECTED ERROR: ${testPath} (${stats.duration}ms)\n  MESSAGE: ${error.message}\n  STACK:\n  ${error.stack.split('\\n').join('\\n  ')}`);\n          if (config.tests.updateExpectations) {\n            console.log(`Removing expectations file ${expectPath}`);\n            rmSync(expectPath);\n            expectationsUpdated++;\n          } else {\n            unexpectedFailure = true;\n          }\n        } else {\n          console.log(`EXPECTED ERROR: ${testPath} (${stats.duration}ms)`);\n        }\n      }\n    );\n\n    console.log(`\\n${\"Done. Stats:\".padEnd(pathLength)} ${formatStats(stats)}`);\n\n    wptServer.process && wptServer.process.kill(\"SIGINT\");\n    viceroy.process && viceroy.process.kill(\"SIGINT\");\n\n    if (config.tests.updateExpectations) {\n      console.log(`Expectations updated: ${expectationsUpdated}`);\n    } else if (stats.unexpectedFail + stats.unexpectedPass + stats.missing != 0 || unexpectedFailure) {\n      process.exitCode = 1;\n    }\n  }\n}\n\nfunction formatStats(stats) {\n  return `${padStart(stats.pass, 4)} / ${padStart(stats.count, 4)} (${padStart(\"+\" + stats.unexpectedPass, 5)}, ${padStart(\"-\" + (stats.unexpectedFail), 5)}, ${padStart(\"?\" + (stats.missing), 5)}) passing in ${padStart(stats.duration, 4)}ms`;\n}\nfunction padStart(value, length) {\n  return (value + \"\").padStart(length);\n}\n\nasync function ensureWptServer(config, logLevel) {\n  if (config.external) {\n    let wptServer = { ...config };\n    if (logLevel > LogLevel.Quiet) {\n      console.info(`Using external WPT server`);\n    }\n    return wptServer;\n  } else {\n    return await startWptServer(config.path, logLevel);\n  }\n}\n\nasync function startWptServer(path, logLevel) {\n  if (logLevel > LogLevel.Quiet) {\n    console.info(`Starting WPT server ...`);\n  }\n  let server = execFile(path, [\"--no-h2\", \"serve\"]);\n  server.on(\"error\", event => {\n    console.error(`error starting WPT server: ${event}`);\n    process.exit(1);\n  });\n\n  if (logLevel >= LogLevel.VeryVerbose) {\n    server.stderr.on(\"data\", data => {\n      console.log(`WPT server stderr: ${stripTrailingNewline(data)}`);\n    });\n    server.stdout.on(\"data\", data => {\n      console.log(`WPT server stdout: ${stripTrailingNewline(data)}`);\n    });\n  }\n\n\n  // Wait until the server has fully initialized.\n  // `wpt.py serve` doesn't explicitly signal when it's done initializing, so we have to\n  // read the tea leaves a bit, by waiting for a message that is among the very last to be\n  // printed during initialization, well after the main http server has started.\n  for await(let [chunk] of on(server.stdout, \"data\")) {\n    if (/wss on port \\d+\\] INFO - Listen on/.test(chunk)) {\n      if (logLevel > LogLevel.Quiet) {\n        console.info(`Started internal WPT server`);\n      }\n      return { process: server, ...config };\n    }\n  }\n}\n\nasync function ensureViceroy(config, logLevel) {\n  if (config.external) {\n    let viceroy = { ...config };\n    if (logLevel > LogLevel.Quiet) {\n      console.info(`Using external Viceroy host ${config.host}`);\n    }\n    return viceroy;\n  } else {\n    let viceroy = await startViceroy(config.runtime, config.configFile, logLevel);\n    if (logLevel > LogLevel.Quiet) {\n      console.info(`Started internal Viceroy host ${viceroy.host}`);\n    }\n    return viceroy;\n  }\n}\n\nasync function timeout(millis, message) {\n  if (message === undefined) {\n    message = `timeout reached after ${millis} milliseconds`;\n  }\n\n  return new Promise((_resolve, reject) => setTimeout(() => reject(message), millis));\n}\n\nasync function viceroyReady(viceroy, config) {\n  // Wait until Viceroy has fully initialized and extract host from output.\n  for await(const [chunk] of on(viceroy.stdout, \"data\")) {\n    let result = chunk.match(/INFO Listening on (.+)/);\n    if (result) {\n      return { process: viceroy, host: result[1], ...config };\n    }\n  }\n}\n\nasync function startViceroy(runtime, config, logLevel) {\n  if (logLevel > LogLevel.Quiet) {\n    console.info(`Starting Viceroy server ...`);\n  }\n  let viceroy = execFile(\"viceroy\", [runtime, \"-C\", config, \"-v\"]);\n  viceroy.on(\"error\", event => {\n    console.error(`error starting Viceroy: ${event}`);\n    process.exit(1);\n  });\n\n  if (logLevel >= LogLevel.VeryVerbose) {\n    viceroy.stderr.on(\"data\", data => {\n      console.log(`viceroy stderr: ${stripTrailingNewline(data)}`);\n    });\n    viceroy.stdout.on(\"data\", data => {\n      console.log(`viceroy stdout: ${stripTrailingNewline(data)}`);\n    });\n  }\n\n  // give viceroy 20 seconds to become available\n  const VICEROY_READY_TIMEOUT = 20000;\n  return await Promise.race([\n    viceroyReady(viceroy, config),\n    timeout(VICEROY_READY_TIMEOUT, \"Viceroy failed to start\"),\n  ]);\n}\n\nfunction stripTrailingNewline(str) {\n  if (str[str.length - 1] == '\\n') {\n    return str.substr(0, str.length - 1);\n  }\n  return str;\n}\n\nfunction getExpectedResults(testPath) {\n  testPath = path.join(config.tests.expectations, testPath + \".json\");\n  try {\n    return JSON.parse(readFileSync(testPath));\n  } catch (e) {\n    if (config.tests.updateExpectations) {\n      if (config.logLevel >= LogLevel.Verbose) {\n        console.log(`Expectations file ${testPath} will be created with results from current run`);\n      }\n    }\n    return {};\n  }\n}\n\nfunction getTests(pattern) {\n  config.logLevel >= LogLevel.Verbose &&\n    console.log(`Loading tests list from ${config.tests.list}`);\n\n  let testPaths = JSON.parse(readFileSync(config.tests.list, { encoding: \"utf-8\" }));\n  let totalCount = testPaths.length;\n  if (config.skipSlowTests) {\n    testPaths = testPaths.filter(path => !path.startsWith(SLOW_PREFIX));\n  }\n  testPaths = testPaths.map(path => path.startsWith(SLOW_PREFIX) ?\n                                    path.substr(SLOW_PREFIX.length) :\n                                    path)\n    .filter(path => path.indexOf(pattern) != -1);\n\n  config.logLevel >= LogLevel.Verbose &&\n    console.log(`Loaded ${totalCount} tests, of which ${testPaths.length} match pattern ${pattern}${config.skipSlowTests ? \" and aren't skipped for being slow\" : \"\"}`);\n  return { testPaths, totalCount };\n}\n\nasync function runTests(testPaths, viceroy, resultCallback, errorCallback) {\n  let totalStats = {\n    duration: 0,\n    count: 0,\n    pass: 0,\n    missing: 0,\n    unexpectedPass: 0,\n    unexpectedFail: 0,\n  };\n\n  for (let path of testPaths) {\n    if (config.logLevel >= LogLevel.Verbose) {\n      console.log(`Running test ${path}`);\n    }\n\n    let expectations = getExpectedResults(path);\n    let t1 = Date.now();\n    let {response, body} = await request(`${viceroy.host}/${path}`);\n    let stats = {\n      count: 0,\n      pass: 0,\n      missing: 0,\n      unexpectedPass: 0,\n      unexpectedFail: 0,\n      duration: Date.now() - t1,\n    };\n    totalStats.duration += stats.duration;\n    let results;\n    try {\n      results = JSON.parse(body);\n      if (response.statusCode == 500) {\n        throw {message: results.error.message, stack: results.error.stack};\n      }\n\n      for (let result of results) {\n        stats.count++;\n\n        let expectation = expectations[result.name];\n        if (expectation) {\n          expectation.did_run = true;\n          result.expected = true;\n        }\n\n        if (result.status !== 0 && config.logLevel >= LogLevel.VeryVerbose) {\n          console.error(result.message);\n        }\n\n        if (result.status == 0) {\n          stats.pass++;\n          if (!expectation || expectation.status === 'FAIL') {\n            result.expected = false;\n            console.log(`${expectation ? \"UNEXPECTED\" : \"NEW\"} PASS\n            NAME:    ${result.name}`);\n            stats.unexpectedPass++;\n          }\n        } else if (!expectation || expectation.status === 'PASS') {\n          result.expected = false;\n          console.log(`${expectation ? \"UNEXPECTED\" : \"NEW\"} FAIL\n  NAME:    ${result.name}\n  MESSAGE: ${result.message}`);\n          stats.unexpectedFail++;\n        }\n      }\n\n      for (let [name, expectation] of Object.entries(expectations)) {\n        if (!expectation.did_run) {\n          stats.missing++;\n          console.log(`MISSING TEST\n  NAME:    ${name}\n  EXPECTED RESULT: ${expectation.status}`);\n        }\n      }\n\n      totalStats.count += stats.count;\n      totalStats.pass += stats.pass;\n      totalStats.missing += stats.missing;\n      totalStats.unexpectedPass += stats.unexpectedPass;\n      totalStats.unexpectedFail += stats.unexpectedFail;\n\n      await resultCallback(path, results, stats);\n    } catch (e) {\n      if (!results) {\n        e = new Error(`\\nMISSING TEST RESULTS: ${path}\\nParsing test results as JSON failed. Output was:\\n  ${body}`);\n        totalStats.missing += Math.max(Object.keys(expectations).length, 1);\n      }\n      if (config.logLevel >= LogLevel.Verbose) {\n        console.log(`Error running file ${path}: ${e.message}, stack:\\n${e.stack}`);\n      }\n      await errorCallback(path, e, stats);\n    }\n  }\n\n  return totalStats;\n}\n\nasync function handleRequest(req, res, viceroy) {\n  let pattern = req.url.substr(1);\n  if (pattern == \"favicon.ico\") {\n    return;\n  }\n\n  let {testPaths, totalCount } = getTests(pattern);\n\n  res.writeHead(200, { 'Content-Type': 'text/html' });\n  let page = readFileSync(config.results.pageTemplate, { encoding: \"utf-8\" });\n  let [pageStart, pageEnd] = page.split(\"{results}\");\n  pageStart = pageStart.split(\"{pattern}\").join(`${pattern}`);\n  pageStart = pageStart.split(\"{count}\").join(`${testPaths.length} of ${totalCount}`);\n  res.write(pageStart);\n\n  let section = readFileSync(config.results.sectionTemplate, { encoding: \"utf-8\" });\n  let template = new Function(\"prefix\", \"title\", \"info\", \"pass\", \"total\", \"duration\", \"rows\", `return \\`${section}\\``);\n  let section_error = readFileSync(config.results.sectionErrorTemplate, { encoding: \"utf-8\" });\n  let error_template = new Function(\"prefix\", \"title\", \"message\", \"stack\", `return \\`${section_error}\\``);\n\n  let { duration, pass, count } = await runTests(testPaths, viceroy,\n    (testPath, results, stats) => {\n      let table = renderResultsTable(testPath, results, stats, template);\n      res.write(table);\n    },\n    (testPath, error, stats) => {\n      let expectPath = path.join(config.tests.expectations, testPath + \".json\");\n      let exists = existsSync(expectPath);\n      let table = error_template(`${exists ? \"UN\" : \"\"}EXPECTED ERROR: `, testPath, error.message,\n                                 renderStack(error.stack));\n      res.write(table);\n    }\n  );\n\n  res.end(pageEnd.split(\"{pass}\").join(pass).split(\"{total}\").join(count).split(\"{duration}\").join(duration));\n}\n\nasync function request(url) {\n  return new Promise(async (resolve, reject) => {\n    let request = http.get(url);\n    let [response] = await once(request, \"response\");\n    response.setEncoding('utf8');\n\n    let body = \"\";\n    response.on(\"data\", chunk => { body += chunk; });\n\n    await once(response, \"end\");\n    resolve({ response, body });\n  });\n}\n\nfunction renderResultsTable(title, results, stats, template) {\n  let rows = results.map(test => {\n      let name = test.name.split(\"<\").join(\"&lt;\").split(\">\").join(\"&gt;\");\n      return `<tr class=\"result ${test.status == 0 ? \"pass\" : \"fail\"}${test.expected ? \" expected\" : \"\"}\">\n      <td class=\"name\">${name}</td>\n      <td class=\"grade\">${test.status == 0 ? \"PASS\" : \"FAIL\"}</td>\n      <td message>${\n        test.status ?\n          `<p>${test.message}</p>\n          <details>\n          <summary>Stack</summary>\n          ${renderStack(test.stack)}\n          </details>`\n        : \"\"\n      }</td>\n      `\n    }\n  ).join(\"\\n\");\n\n  return template(\"\", title, \"\", stats.pass, stats.count, stats.duration, rows);\n}\n\nfunction renderStack(stack) {\n  stack = stack.split(\"<\").join(\"&lt;\");\n  stack = stack.split(\">\").join(\"&gt;\");\n\n  // Strip the parts of the stack that's just about handling asserts.\n  let lines = stack.split(\"\\n\");\n  for (let i = 0; i < lines.length; i++) {\n    if (lines[i].indexOf(\"assert_wrapper\") > -1) {\n      lines = lines.slice(i + 1);\n      break;\n    }\n  }\n\n  stack = lines.join(\"<br>\");\n  return stack;\n}\n\nawait run();\n"
  },
  {
    "path": "tests/wpt-harness/run-wpt.sh",
    "content": "#!/usr/bin/env bash\n\n# Use this script to run the wpt test harness locally. You'll need to have the\n# following executables in your path:\n#\n# * wizer\n# * npm\n# * node\n#\n# From any directory, run this script and it will do the following:\n#\n# 1. build js-compute-runtime.wasm and move it into the current directory\n# 2. build the wpt runner\n# 3. run the test suite and forward any arguments to it\n#\n# If you'd like to run a debug build, set the `DEBUG` environment variable when\n# running this script:\n#\n# > mkdir my_test\n# > cd my_test\n# > DEBUG=true ../tests/wpt-harness/run-wpt.sh\n#\n# For this to work, you'll need to have run the following command in advance:\n#\n# > cd runtime/spidermonkey\n# > ./build-engine.sh debug\n#\n# If you get an error about missing \"jsapi.h\" while building the runtime,\n# something's gone wrong with the engine download.\n\nset -euo pipefail\n\nworking_dir=\"$(pwd)\"\nroot=\"$(dirname \"${BASH_SOURCE[0]}\")/../..\"\n\noutput=\"$(mktemp)\"\ntrap 'rm $output' EXIT\n\necho \"Building the runtime...\"\ncd \"$root\"\nif ! npm run build:release > \"$output\" 2>&1; then\n  cat \"$output\"\n  exit 1\nfi\ncp js-compute-runtime.wasm \"$working_dir\"\n\ncd \"$working_dir\"\n\necho \"Building the wpt runtime...\"\nbash \"$root/tests/wpt-harness/build-wpt-runtime.sh\"\n\necho \"Running the wpt tests...\"\nnode \"$root/tests/wpt-harness/run-wpt.mjs\" \"$@\"\n"
  },
  {
    "path": "tests/wpt-harness/tests.json",
    "content": "\n[\n  \"compression/compression-bad-chunks.tentative.any.js\",\n  \"compression/compression-constructor-error.tentative.any.js\",\n  \"compression/compression-including-empty-chunk.tentative.any.js\",\n  \"compression/compression-large-flush-output.any.js\",\n  \"compression/compression-multiple-chunks.tentative.any.js\",\n  \"compression/compression-output-length.tentative.any.js\",\n  \"SLOW compression/compression-stream.tentative.any.js\",\n  \"compression/compression-with-detach.tentative.window.js\",\n  \"compression/decompression-bad-chunks.tentative.any.js\",\n  \"compression/decompression-buffersource.tentative.any.js\",\n  \"compression/decompression-constructor-error.tentative.any.js\",\n  \"compression/decompression-correct-input.tentative.any.js\",\n  \"compression/decompression-corrupt-input.tentative.any.js\",\n  \"compression/decompression-empty-input.tentative.any.js\",\n  \"compression/decompression-split-chunk.tentative.any.js\",\n  \"compression/decompression-uint8array-output.tentative.any.js\",\n  \"compression/decompression-with-detach.tentative.window.js\",\n  \"compression/idlharness.https.any.js\",\n  \"console/console-is-a-namespace.any.js\",\n  \"console/console-label-conversion.any.js\",\n  \"SKIP console/console-log-large-array.any.js\",\n  \"console/console-log-symbol.any.js\",\n  \"console/console-namespace-object-class-string.any.js\",\n  \"console/console-tests-historical.any.js\",\n  \"console/idlharness.any.js\",\n  \"dom/events/AddEventListenerOptions-once.any.js\",\n  \"dom/events/AddEventListenerOptions-passive.any.js\",\n  \"dom/events/Event-constructors.any.js\",\n  \"dom/events/EventTarget-add-remove-listener.any.js\",\n  \"dom/events/EventTarget-addEventListener.any.js\",\n  \"dom/events/EventTarget-constructible.any.js\",\n  \"dom/events/EventTarget-removeEventListener.any.js\",\n  \"encoding/api-basics.any.js\",\n  \"encoding/api-basics.any.js\",\n  \"encoding/api-invalid-label.any.js\",\n  \"encoding/api-replacement-encodings.any.js\",\n  \"encoding/api-surrogates-utf8.any.js\",\n  \"encoding/api-surrogates-utf8.any.js\",\n  \"encoding/encodeInto.any.js\",\n  \"SLOW encoding/idlharness.any.js\",\n  \"encoding/iso-2022-jp-decoder.any.js\",\n  \"encoding/replacement-encodings.any.js\",\n  \"encoding/textdecoder-arguments.any.js\",\n  \"encoding/textdecoder-byte-order-marks.any.js\",\n  \"encoding/textdecoder-copy.any.js\",\n  \"encoding/textdecoder-eof.any.js\",\n  \"encoding/textdecoder-fatal-single-byte.any.js\",\n  \"encoding/textdecoder-fatal-streaming.any.js\",\n  \"encoding/textdecoder-fatal.any.js\",\n  \"encoding/textdecoder-ignorebom.any.js\",\n  \"encoding/textdecoder-labels.any.js\",\n  \"encoding/textdecoder-streaming.any.js\",\n  \"encoding/textdecoder-utf16-surrogates.any.js\",\n  \"encoding/textencoder-constructor-non-utf.any.js\",\n  \"encoding/textencoder-utf16-surrogates.any.js\",\n  \"encoding/unsupported-encodings.any.js\",\n  \"SKIP fetch/api/abort/cache.https.any.js\",\n  \"fetch/api/abort/general.any.js\",\n  \"fetch/api/abort/request.any.js\",\n  \"fetch/api/basic/accept-header.any.js\",\n  \"fetch/api/basic/conditional-get.any.js\",\n  \"SKIP fetch/api/basic/error-after-response.any.js\",\n  \"fetch/api/basic/header-value-combining.any.js\",\n  \"fetch/api/basic/header-value-null-byte.any.js\",\n  \"fetch/api/basic/historical.any.js\",\n  \"fetch/api/basic/http-response-code.any.js\",\n  \"fetch/api/basic/integrity.sub.any.js\",\n  \"fetch/api/basic/keepalive.any.js\",\n  \"SKIP fetch/api/basic/mode-no-cors.sub.any.js\",\n  \"fetch/api/basic/mode-same-origin.any.js\",\n  \"fetch/api/basic/referrer.any.js\",\n  \"fetch/api/basic/referrer.any.js\",\n  \"fetch/api/basic/request-head.any.js\",\n  \"fetch/api/basic/request-headers-case.any.js\",\n  \"fetch/api/basic/request-headers-nonascii.any.js\",\n  \"fetch/api/basic/request-headers.any.js\",\n  \"SKIP fetch/api/basic/request-private-network-headers.tentative.any.js\",\n  \"fetch/api/basic/request-referrer.any.js\",\n  \"fetch/api/basic/request-upload.any.js\",\n  \"SKIP fetch/api/basic/request-upload.h2.any.js\",\n  \"fetch/api/basic/response-null-body.any.js\",\n  \"fetch/api/basic/response-url.sub.any.js\",\n  \"fetch/api/basic/scheme-about.any.js\",\n  \"fetch/api/basic/scheme-blob.sub.any.js\",\n  \"fetch/api/basic/scheme-data.any.js\",\n  \"fetch/api/basic/scheme-others.sub.any.js\",\n  \"fetch/api/basic/status.h2.any.js\",\n  \"fetch/api/basic/stream-response.any.js\",\n  \"fetch/api/basic/stream-safe-creation.any.js\",\n  \"fetch/api/basic/text-utf8.any.js\",\n  \"fetch/api/body/cloned-any.js\",\n  \"fetch/api/body/formdata.any.js\",\n  \"fetch/api/body/mime-type.any.js\",\n  \"fetch/api/headers/header-setcookie.any.js\",\n  \"fetch/api/headers/header-values-normalize.any.js\",\n  \"fetch/api/headers/header-values.any.js\",\n  \"fetch/api/headers/headers-basic.any.js\",\n  \"fetch/api/headers/headers-casing.any.js\",\n  \"fetch/api/headers/headers-combine.any.js\",\n  \"fetch/api/headers/headers-errors.any.js\",\n  \"fetch/api/headers/headers-no-cors.any.js\",\n  \"fetch/api/headers/headers-normalize.any.js\",\n  \"fetch/api/headers/headers-record.any.js\",\n  \"fetch/api/headers/headers-structure.any.js\",\n  \"SKIP fetch/api/idlharness.any.js\",\n  \"fetch/api/redirect/redirect-back-to-original-origin.any.js\",\n  \"fetch/api/redirect/redirect-count.any.js\",\n  \"fetch/api/redirect/redirect-empty-location.any.js\",\n  \"fetch/api/redirect/redirect-keepalive.any.js\",\n  \"fetch/api/redirect/redirect-keepalive.https.any.js\",\n  \"fetch/api/redirect/redirect-location-escape.tentative.any.js\",\n  \"fetch/api/redirect/redirect-location.any.js\",\n  \"fetch/api/redirect/redirect-method.any.js\",\n  \"fetch/api/redirect/redirect-mode.any.js\",\n  \"fetch/api/redirect/redirect-origin.any.js\",\n  \"fetch/api/redirect/redirect-referrer-override.any.js\",\n  \"fetch/api/redirect/redirect-referrer.any.js\",\n  \"fetch/api/basic/request-forbidden-headers.any.js\",\n  \"fetch/api/redirect/redirect-schemes.any.js\",\n  \"fetch/api/redirect/redirect-to-dataurl.any.js\",\n  \"fetch/api/redirect/redirect-upload.h2.any.js\",\n  \"fetch/api/request/forbidden-method.any.js\",\n  \"SKIP [tests restrictions we're not imposing] fetch/api/request/request-bad-port.any.js\",\n  \"fetch/api/request/request-cache-default-conditional.any.js\",\n  \"fetch/api/request/request-cache-default.any.js\",\n  \"fetch/api/request/request-cache-force-cache.any.js\",\n  \"fetch/api/request/request-cache-no-cache.any.js\",\n  \"fetch/api/request/request-cache-no-store.any.js\",\n  \"fetch/api/request/request-cache-only-if-cached.any.js\",\n  \"fetch/api/request/request-cache-reload.any.js\",\n  \"fetch/api/request/request-cache.js\",\n  \"fetch/api/request/request-constructor-init-body-override.any.js\",\n  \"fetch/api/request/request-consume-empty.any.js\",\n  \"fetch/api/request/request-consume.any.js\",\n  \"fetch/api/request/request-disturbed.any.js\",\n  \"fetch/api/request/request-error.any.js\",\n  \"fetch/api/request/request-headers.any.js\",\n  \"fetch/api/request/request-init-002.any.js\",\n  \"fetch/api/request/request-init-contenttype.any.js\",\n  \"fetch/api/request/request-init-priority.any.js\",\n  \"fetch/api/request/request-init-stream.any.js\",\n  \"fetch/api/request/request-keepalive.any.js\",\n  \"fetch/api/request/request-structure.any.js\",\n  \"fetch/api/response/json.any.js\",\n  \"fetch/api/response/response-blob-realm.any.js\",\n  \"fetch/api/response/response-cancel-stream.any.js\",\n  \"fetch/api/response/response-clone.any.js\",\n  \"fetch/api/response/response-consume-empty.any.js\",\n  \"fetch/api/response/response-consume-stream.any.js\",\n  \"fetch/api/response/response-error-from-stream.any.js\",\n  \"fetch/api/response/response-error.any.js\",\n  \"fetch/api/response/response-from-stream.any.js\",\n  \"fetch/api/response/response-headers-guard.any.js\",\n  \"fetch/api/response/response-init-001.any.js\",\n  \"fetch/api/response/response-init-002.any.js\",\n  \"fetch/api/response/response-init-contenttype.any.js\",\n  \"fetch/api/response/response-static-error.any.js\",\n  \"fetch/api/response/response-static-json.any.js\",\n  \"fetch/api/response/response-static-redirect.any.js\",\n  \"fetch/api/response/response-stream-bad-chunk.any.js\",\n  \"fetch/api/response/response-stream-disturbed-1.any.js\",\n  \"fetch/api/response/response-stream-disturbed-2.any.js\",\n  \"fetch/api/response/response-stream-disturbed-3.any.js\",\n  \"fetch/api/response/response-stream-disturbed-4.any.js\",\n  \"fetch/api/response/response-stream-disturbed-5.any.js\",\n  \"fetch/api/response/response-stream-disturbed-6.any.js\",\n  \"fetch/api/response/response-stream-disturbed-by-pipe.any.js\",\n  \"fetch/api/response/response-stream-with-broken-then.any.js\",\n  \"fetch/data-urls/base64.any.js\",\n  \"fetch/data-urls/processing.any.js\",\n  \"fetch/content-type/multipart.window.js\",\n  \"fetch/content-type/multipart-malformed.any.js\",\n  \"FileAPI/blob/Blob-array-buffer.any.js\",\n  \"FileAPI/blob/Blob-bytes.any.js\",\n  \"FileAPI/blob/Blob-constructor.any.js\",\n  \"FileAPI/blob/Blob-constructor-dom.window.js\",\n  \"FileAPI/blob/Blob-in-worker.worker.js\",\n  \"FileAPI/blob/Blob-slice.any.js\",\n  \"FileAPI/blob/Blob-slice-overflow.any.js\",\n  \"FileAPI/blob/Blob-stream.any.js\",\n  \"FileAPI/blob/Blob-text.any.js\",\n  \"FileAPI/file/File-constructor.any.js\",\n  \"FileAPI/file/send-file-formdata.any.js\",\n  \"FileAPI/file/send-file-formdata-controls.any.js\",\n  \"FileAPI/file/send-file-formdata-punctuation.any.js\",\n  \"FileAPI/file/send-file-formdata-utf-8.any.js\",\n  \"hr-time/basic.any.js\",\n  \"hr-time/idlharness.any.js\",\n  \"hr-time/monotonic-clock.any.js\",\n  \"html/webappapis/atob/base64.any.js\",\n  \"streams/idlharness.any.js\",\n  \"streams/piping/abort.any.js\",\n  \"streams/piping/close-propagation-backward.any.js\",\n  \"streams/piping/close-propagation-forward.any.js\",\n  \"streams/piping/error-propagation-backward.any.js\",\n  \"streams/piping/error-propagation-forward.any.js\",\n  \"streams/piping/flow-control.any.js\",\n  \"streams/piping/general-addition.any.js\",\n  \"streams/piping/general.any.js\",\n  \"streams/piping/multiple-propagation.any.js\",\n  \"streams/piping/pipe-through.any.js\",\n  \"streams/piping/then-interception.any.js\",\n  \"streams/piping/throwing-options.any.js\",\n  \"streams/piping/transform-streams.any.js\",\n  \"streams/queuing-strategies-size-function-per-global.window.js\",\n  \"streams/queuing-strategies.any.js\",\n  \"streams/readable-byte-streams/bad-buffers-and-views.any.js\",\n  \"streams/readable-byte-streams/construct-byob-request.any.js\",\n  \"streams/readable-byte-streams/enqueue-with-detached-buffer.any.js\",\n  \"streams/readable-byte-streams/general.any.js\",\n  \"streams/readable-byte-streams/non-transferable-buffers.any.js\",\n  \"streams/readable-byte-streams/read-min.any.js\",\n  \"streams/readable-byte-streams/respond-after-enqueue.any.js\",\n  \"streams/readable-byte-streams/tee.any.js\",\n  \"streams/readable-streams/async-iterator.any.js\",\n  \"streams/readable-streams/bad-strategies.any.js\",\n  \"streams/readable-streams/bad-underlying-sources.any.js\",\n  \"streams/readable-streams/cancel.any.js\",\n  \"streams/readable-streams/constructor.any.js\",\n  \"streams/readable-streams/count-queuing-strategy-integration.any.js\",\n  \"streams/readable-streams/default-reader.any.js\",\n  \"streams/readable-streams/floating-point-total-queue-size.any.js\",\n  \"streams/readable-streams/from.any.js\",\n  \"streams/readable-streams/garbage-collection.any.js\",\n  \"streams/readable-streams/general.any.js\",\n  \"streams/readable-streams/owning-type-message-port.any.js\",\n  \"streams/readable-streams/owning-type-video-frame.any.js\",\n  \"streams/readable-streams/owning-type.any.js\",\n  \"streams/readable-streams/patched-global.any.js\",\n  \"streams/readable-streams/reentrant-strategies.any.js\",\n  \"streams/readable-streams/tee.any.js\",\n  \"streams/readable-streams/templated.any.js\",\n  \"streams/transform-streams/backpressure.any.js\",\n  \"streams/transform-streams/cancel.any.js\",\n  \"streams/transform-streams/errors.any.js\",\n  \"streams/transform-streams/flush.any.js\",\n  \"streams/transform-streams/general.any.js\",\n  \"streams/transform-streams/lipfuzz.any.js\",\n  \"streams/transform-streams/patched-global.any.js\",\n  \"streams/transform-streams/properties.any.js\",\n  \"streams/transform-streams/reentrant-strategies.any.js\",\n  \"streams/transform-streams/strategies.any.js\",\n  \"streams/transform-streams/terminate.any.js\",\n  \"streams/writable-streams/aborting.any.js\",\n  \"streams/writable-streams/bad-strategies.any.js\",\n  \"streams/writable-streams/bad-underlying-sinks.any.js\",\n  \"streams/writable-streams/byte-length-queuing-strategy.any.js\",\n  \"streams/writable-streams/close.any.js\",\n  \"streams/writable-streams/constructor.any.js\",\n  \"streams/writable-streams/count-queuing-strategy.any.js\",\n  \"streams/writable-streams/error.any.js\",\n  \"streams/writable-streams/floating-point-total-queue-size.any.js\",\n  \"streams/writable-streams/general.any.js\",\n  \"streams/writable-streams/properties.any.js\",\n  \"streams/writable-streams/reentrant-strategy.any.js\",\n  \"streams/writable-streams/start.any.js\",\n  \"streams/writable-streams/write.any.js\",\n  \"url/historical.any.js\",\n  \"SKIP url/idlharness.any.js\",\n  \"SLOW url/url-constructor.any.js\",\n  \"url/url-origin.any.js\",\n  \"url/url-searchparams.any.js\",\n  \"url/url-setters-stripping.any.js\",\n  \"url/url-setters.any.js\",\n  \"url/url-statics-canparse.any.js\",\n  \"url/url-statics-parse.any.js\",\n  \"url/url-tojson.any.js\",\n  \"url/urlencoded-parser.any.js\",\n  \"url/urlsearchparams-append.any.js\",\n  \"url/urlsearchparams-constructor.any.js\",\n  \"url/urlsearchparams-delete.any.js\",\n  \"url/urlsearchparams-foreach.any.js\",\n  \"url/urlsearchparams-get.any.js\",\n  \"url/urlsearchparams-getall.any.js\",\n  \"url/urlsearchparams-has.any.js\",\n  \"url/urlsearchparams-set.any.js\",\n  \"url/urlsearchparams-size.any.js\",\n  \"url/urlsearchparams-sort.any.js\",\n  \"url/urlsearchparams-stringifier.any.js\",\n  \"WebCryptoAPI/digest/digest.https.any.js\",\n  \"WebCryptoAPI/getRandomValues.any.js\",\n  \"WebCryptoAPI/idlharness.https.any.js\",\n  \"WebCryptoAPI/import_export/ec_importKey.https.any.js\",\n  \"WebCryptoAPI/randomUUID.https.any.js\",\n  \"WebCryptoAPI/sign_verify/ecdsa.https.any.js\",\n  \"WebCryptoAPI/sign_verify/hmac.https.any.js\",\n  \"html/webappapis/structured-clone/structured-clone.any.js\",\n  \"html/webappapis/timers/clearinterval-from-callback.any.js\",\n  \"html/webappapis/timers/cleartimeout-clearinterval.any.js\",\n  \"html/webappapis/timers/evil-spec-example.any.js\",\n  \"html/webappapis/timers/missing-timeout-setinterval.any.js\",\n  \"html/webappapis/timers/negative-setinterval.any.js\",\n  \"html/webappapis/timers/negative-settimeout.any.js\",\n  \"html/webappapis/timers/type-long-setinterval.any.js\",\n  \"html/webappapis/timers/type-long-settimeout.any.js\",\n  \"webidl/ecmascript-binding/es-exceptions/DOMException-constants.any.js\",\n  \"webidl/ecmascript-binding/es-exceptions/DOMException-constructor-and-prototype.any.js\",\n  \"webidl/ecmascript-binding/es-exceptions/DOMException-constructor-behavior.any.js\",\n  \"webidl/ecmascript-binding/es-exceptions/DOMException-custom-bindings.any.js\",\n  \"xhr/formdata/constructor.any.js\",\n  \"xhr/formdata/append.any.js\",\n  \"xhr/formdata/constructor.any.js\",\n  \"xhr/formdata/delete.any.js\",\n  \"xhr/formdata/foreach.any.js\",\n  \"xhr/formdata/get.any.js\",\n  \"xhr/formdata/has.any.js\",\n  \"xhr/formdata/iteration.any.js\",\n  \"xhr/formdata/set.any.js\",\n  \"xhr/formdata/set-blob.any.js\"\n]\n"
  },
  {
    "path": "tests/wpt-harness/viceroy.toml",
    "content": "[local_server]\n  [local_server.backends]\n    [local_server.backends.wpt]\n      url = \"http://web-platform.test:8000\"\n"
  },
  {
    "path": "tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"es2022\",\n    \"module\": \"nodenext\",\n    \"lib\": [\"es2022\"],\n    \"outDir\": \"./dist\",\n    \"rootDir\": \"./src\",\n    \"strict\": true,\n    \"moduleResolution\": \"nodenext\",\n    \"skipLibCheck\": true,\n    \"forceConsistentCasingInFileNames\": true,\n    \"allowJs\": true,\n    \"declaration\": true\n  },\n  \"include\": [\n    \"src/**/*.ts\",\n  ],\n  \"exclude\": [\n    \"node_modules\"\n  ]\n}\n"
  },
  {
    "path": "typedoc.json",
    "content": "{\n    \"$schema\": \"https://typedoc.org/schema.json\",\n    \"plugin\": [\"typedoc-plugin-versions\", \"typedoc-plugin-mdn-links\"],\n    \"theme\": \"default\",\n    \"tsconfig\": \"tsconfig.json\",\n    \"exclude\": [\"types/index.d.ts\"],\n    \"entryPointStrategy\": \"expand\",\n    \"entryPoints\": [\n        \"types\"\n    ],\n    \"excludeExternals\":true,\n    \"excludeInternal\": true,\n    \"excludePrivate\": true,\n    \"categorizeByGroup\": false,\n    \"includeVersion\": true,\n    \"githubPages\": false,\n    \"cleanOutputDir\": false,\n    \"out\": \"reference-docs\"\n}"
  },
  {
    "path": "types/acl.d.ts",
    "content": "/// <reference path=\"../types/globals.d.ts\" />\n\ndeclare module 'fastly:acl' {\n  /**\n   * @version 3.32.0\n   */\n  class Acl {\n    /**\n     * Opens the given ACL store by name\n     */\n    static open(aclName: string): Acl;\n\n    /**\n     * Lookup a given IP address in the ACL list.\n     *\n     * @example\n     * import { Acl } from 'fastly:acl';\n     * addEventListener('fetch', async (evt) => {\n     *   const myAcl = Acl.open('myacl');\n     *   const result = await myAcl.lookup(evt.client.address);\n     *   evt.respondWith(new Response(result?.action === 'BLOCK' ? 'blocked' : 'allowed'));\n     * });\n     *\n     * @param ipAddress Ipv6 or IPv4 IP address string\n     * @returns An object containing the ACL action and IP prefix if the given IP address matches an ACL entry, or null if there is no match.\n     */\n    lookup(ipAddress: string): Promise<{\n      action: 'ALLOW' | 'BLOCK';\n      prefix: string;\n    } | null>;\n  }\n}\n"
  },
  {
    "path": "types/backend.d.ts",
    "content": "/// <reference path=\"../types/secret-store.d.ts\" />\n/// <reference path=\"../types/globals.d.ts\" />\n\ndeclare module 'fastly:backend' {\n  /**\n   * Set the default backend configuration options for dynamic backends.\n   *\n   * Applies to backends created via {@link Backend | new Backend(...)} as well as for dynamic backends\n   * implicitly created when using {@link fetch | fetch()}.\n   *\n   * @param defaultDynamicBackendConfiguration default backend configuration options\n   *\n   * @example\n   * Setting default timeouts and TLS options for all newly created dynamic backends:\n   * ```js\n   * import { Backend, setDefaultDynamicBackendConfig } from \"fastly:backend\";\n   * setDefaultDynamicBackendConfig({\n   *   connectTimeout: 1000,          // milliseconds\n   *   firstByteTimeout: 15_000,      // milliseconds\n   *   betweenBytesTimeout: 10_000,   // milliseconds\n   *   useSSL: true,\n   *   tlsMinVersion: 1.3,\n   *   tlsMaxVersion: 1.3,\n   * });\n   * // Timeouts and TLS configuration are inherited from the defaults above.\n   * const backend = new Backend({\n   *   target: 'my-site.com',\n   *   hostOverride: \"www.my-site.com\",\n   * });\n   * ```\n   * @fiddle meta\n   * {\n   *   \"title\": \"setDefaultDynamicBackendConfig Example\",\n   *   \"request\": \"/status=200\"\n   * }\n   * @version 3.24.0\n   */\n  export function setDefaultDynamicBackendConfig(\n    defaultDynamicBackendConfiguration: DefaultBackendConfiguration,\n  ): void;\n\n  /**\n   * Call this function to enforce the security property of explicitly-defined backends, even\n   * when dynamic backends are enabled at the Fastly service level.\n   *\n   * By default, if dynamic backends are supported for the Fastly service, they will be automatically\n   * used when creating a new `fetch()` request. This default behaviour for dynamic backends can be a\n   * potential security concern since third-party JavaScript code may send arbitrary requests,\n   * including sensitive/secret data, off to destinations that the JavaScript project was not\n   * intending.\n   *\n   * When calling this function, an optional default backend name can be provided.\n   *\n   * @note\n   * This is a separate option to the service-level dynamic backend support for Fastly services.\n   * By default, dynamic backends are disabled for Fastly Services, so that even if not using this\n   * function, the service-level security configuration will apply.\n   *\n   * @param defaultBackend the name of the default backend to use, when using {@link fetch | fetch()}.\n   *\n   * @version 3.24.0\n   * @experimental\n   */\n  export function enforceExplicitBackends(defaultBackend?: string): void;\n\n  /**\n   * @version 3.24.0\n   */\n  interface DefaultBackendConfiguration {\n    /**\n     * Maximum duration in milliseconds to wait for a connection to this backend to be established.\n     * If exceeded, the connection is aborted and a 503 response will be presented instead.\n     * @defaultValue 1_000\n     * @throws {RangeError} Throws a RangeError if the value is negative or greater than or equal to 2^32\n     */\n    connectTimeout?: number;\n    /**\n     * Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent.\n     * If exceeded, the connection is aborted and a 503 response will be presented instead.\n     * @defaultValue 15_000\n     * @throws {RangeError} Throws a RangeError if the value is negative or greater than or equal to 2^32\n     */\n    firstByteTimeout?: number;\n    /**\n     * Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend.\n     * If exceeded, the response received so far will be considered complete and the fetch will end.\n     * @defaultValue 10_000\n     * @throws {RangeError} Throws a RangeError if the value is negative or greater than or equal to 2^32\n     */\n    betweenBytesTimeout?: number;\n    /**\n     * Whether or not to require TLS for connections to this backend.\n     *\n     * When using TLS, Fastly checks the validity of the backend's certificate, and fails the connection if the certificate is invalid.\n     * This check is not optional: an invalid certificate will cause the backend connection to fail (but read on).\n     *\n     * By default, the validity check does not require that the certificate hostname matches the hostname of your request.\n     * You can use {@link BackendConfiguration.certificateHostname} to request a check of the certificate hostname.\n     *\n     * By default, certificate validity uses a set of public certificate authorities.\n     * You can specify an alternative CA using {@link caCertificate}.\n     */\n    useSSL?: boolean;\n    /**\n     * Determine whether or not connections to the same backend should be pooled across different sessions.\n     * Fastly considers two backends “the same” if they’re registered with the same name and the exact same settings.\n     * In those cases, when pooling is enabled, if Session 1 opens a connection to this backend it will be left open, and can be re-used by Session 2.\n     * This can help improve backend latency, by removing the need for the initial network / TLS handshake(s).\n     * By default, pooling is enabled for dynamic backends.\n     * @version 3.1.0\n     */\n    dontPool?: boolean;\n    /**\n     * Minimum allowed TLS version on SSL connections to this backend.\n     * If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n     *\n     * @throws {RangeError} Throws a RangeError if the value is not 1, 1.1, 1.2, or 1.3\n     */\n    tlsMinVersion?: 1 | 1.1 | 1.2 | 1.3;\n    /**\n     * Maximum allowed TLS version on SSL connections to this backend.\n     * If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n     *\n     * @throws {RangeError} Throws a RangeError if the value is not 1, 1.1, 1.2, or 1.3\n     */\n    tlsMaxVersion?: 1 | 1.1 | 1.2 | 1.3;\n    /**\n     * Define the hostname that the server certificate should declare.\n     *\n     * If not set (default), the server certificate may present any hostname.\n     *\n     * @throws {TypeError} Throws a TypeError if the value is an empty string.\n     */\n    certificateHostname?: string;\n    /**\n     * The CA certificate to use when checking the validity of the backend.\n     *\n     * If not provided (default), the backend's certificate is validated using a set of public root CAs.\n     *\n     * @throws {TypeError} Throws a TypeError if the value is an empty string.\n     */\n    caCertificate?: string;\n    /**\n     * List of OpenSSL ciphers to support for connections to this origin.\n     * If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n     *\n     * [List of ciphers supported by Fastly](https://developer.fastly.com/learning/concepts/routing-traffic-to-fastly/#use-a-tls-configuration).\n     *\n     * @throws {TypeError} Throws a TypeError if the value is an empty string.\n     */\n    ciphers?: string;\n    /**\n     * Set the client certificate to be provided to the server during the initial TLS handshake.\n     *\n     * @throws {TypeError} Throws a TypeError if the value is not an object of the correct type.\n     *\n     * @version 3.15.0\n     */\n    clientCertificate?: {\n      /** The PEM certificate string. */\n      certificate: string;\n      /**\n       * The {@link import('fastly:secret-store').SecretStoreEntry} to use for the key,\n       * created via `SecretStore.prototype.get` or via `SecretStore.fromBytes`.\n       */\n      key: import('fastly:secret-store').SecretStoreEntry;\n    };\n\n    /**\n     * Enables and sets the HTTP keepalive time in milliseconds for the backend.\n     *\n     * @version 3.24.0\n     */\n    httpKeepalive?: number;\n\n    /**\n     * Enables and sets the TCP keep alive options for the backend.\n     * Setting to boolean true enables keepalive with the default options.\n     *\n     * @version 3.24.0\n     */\n    tcpKeepalive?:\n      | boolean\n      | {\n          /**\n           * Configure how long to wait after the last sent data over the TCP connection before\n           * starting to send TCP keepalive probes.\n           */\n          timeSecs?: number;\n\n          /**\n           * Configure how long to wait between each TCP keepalive probe sent to the backend to determine if it is still active.\n           */\n          intervalSecs?: number;\n\n          /**\n           * Number of probes to send to the backend before it is considered dead.\n           */\n          probes?: number;\n        };\n  }\n\n  interface BackendConfiguration extends DefaultBackendConfiguration {\n    /**\n     * The name of the backend.\n     * The name has to be between 1 and 254 characters inclusive.\n     * The name can be whatever you would like, as long as it does not match the name of any of the static service backends nor match any other dynamic backends built during a single execution of the application.\n     *\n     * If no name is provided, an autogenerated internal name will be used.\n     *\n     * @throws {TypeError} Throws a TypeError if the backend already exists or the name value is not valid, e.g., an empty string or a string with more than 254 characters.\n     *\n     * @deprecated to avoid name collisions it is recommended to use auto-generated names by omitting this property.\n     */\n    name?: string;\n    /**\n     * A hostname, IPv4, or IPv6 address for the backend as well as an optional port.\n     * If set, the target has to be at least 1 character.\n     *\n     * @example hostname\n     * \"example.com\"\n     * @example hostname and port\n     * \"example.com:443\"\n     * @example ip address\n     * \"1.2.3.4\"\n     * @example ip address and port\n     * \"1.2.3.4:8080\"\n     *\n     * @throws {TypeError} Throws a TypeError if the value is not valid, i.e. is null, undefined, an empty string, not a valid IP address or host, or is the string `::`\n     */\n    target: string;\n    /**\n     * If set, will force the HTTP Host header on connections to this backend to be the supplied value.\n     *\n     * @example\n     * \"example.com:443\"\n     *\n     * @throws {TypeError} Throws a TypeError if the value is an empty string.\n     */\n    hostOverride?: string;\n\n    /**\n     * The SNI hostname to use on connections to this backend.\n     *\n     * @throws {TypeError} Throws a TypeError if the value is an empty string.\n     */\n    sniHostname?: string;\n    /**\n     * @experimental\n     *\n     * When enabled, sets that this backend is to be used for gRPC traffic.\n     *\n     * Warning: When using this experimental feature, no guarantees are provided for behaviours for\n     * backends that do not provide gRPC traffic.\n     * @version 3.23.0\n     */\n    grpc?: boolean;\n  }\n\n  /**\n   * Class for dynamically creating new [Fastly Backends](https://developer.fastly.com/reference/api/services/backend/).\n   *\n   * **Note**: Dynamic backends are by default disabled at the Fastly service level.\n   * Contact [Fastly Support](https://support.fastly.com/hc/en-us/requests/new?ticket_form_id=360000269711)\n   * to request dynamic backends on Fastly Services.\n   *\n   * To disable the usage of dynamic backends, see {@link enforceExplicitBackends}.\n   *\n   * @example\n   * In this example an explicit Dynamic Backend is created and supplied to the fetch request, the response is then returned to the client.\n   * ```js\n   * /// <reference types=\"@fastly/js-compute\" />\n   * import { Backend } from \"fastly:backend\";\n   * async function app() {\n   *   // For any request, return the fastly homepage -- without defining a backend!\n   *   const backend = new Backend({\n   *     name: 'fastly',\n   *     target: 'fastly.com',\n   *     hostOverride: \"www.fastly.com\",\n   *     connectTimeout: 1000,\n   *     firstByteTimeout: 15000,\n   *     betweenBytesTimeout: 10000,\n   *     useSSL: true,\n   *     tlsMinVersion: 1.3,\n   *     tlsMaxVersion: 1.3,\n   *   });\n   *   return fetch('https://www.fastly.com/', {\n   *     backend // Here we are configuring this request to use the backend from above.\n   *   });\n   * }\n   * addEventListener(\"fetch\", event => event.respondWith(app(event)));\n   * ```\n   * @fiddle meta\n   * {\n   *   \"title\": \"Explicit Dynamic Backend Example\",\n   *   \"request\": \"/status=200\"\n   * }\n   */\n  class Backend {\n    /**\n     * Creates a new Backend instance.\n     *\n     * **Note:** `Backend()` can only be constructed with `new`. Attempting to call it\n     * without `new` throws a TypeError.\n     *\n     * All optional generic options can have their defaults set via\n     * {@link setDefaultDynamicBackendConfig}. This includes all configuration\n     * options except for `name`, `target`, `hostOverride`, `sniHostname` and `grpc`.\n     *\n     * @example\n     * Construct a new backend with all properties set to their default values:\n     * ```js\n     * const myBackend = new Backend({ name: 'fastly', target: 'www.fastly.com'});\n     * ```\n     */\n    constructor(configuration: BackendConfiguration);\n\n    /**\n     * The name of the backend.\n     *\n     * @example\n     * ```js\n     * import { Backend } from \"fastly:backend\";\n     * const backend = new Backend({\n     *   name: \"my-backend\",\n     *   target: \"my-site.com\",\n     * });\n     * console.log(backend.name); // \"my-backend\"\n     * ```\n     * @fiddle meta\n     * {\n     *   \"title\": \"Backend.prototype.name Example\",\n     *   \"request\": \"/status=200\"\n     * }\n     * @version 3.24.0\n     */\n    readonly name: string;\n\n    /**\n     * Whether this backend was dynamically created by the running service.\n     * @version 3.24.0 \n     */\n    readonly isDynamic: boolean;\n    /**\n     * The host target for the backend\n     * @version 3.24.0\n     */\n    readonly target: string;\n    /**\n     * The host header override defined for the backend.\n     *\n     * See https://docs.fastly.com/en/guides/specifying-an-override-host for more information.\n     * @version 3.24.0\n     */\n    readonly hostOverride: string;\n    /**\n     * The backend port\n     * @version 3.24.0\n     */\n    readonly port: number;\n    /**\n     * The connect timeout for the backend in milliseconds, if available.\n     * When not set or in environments that do not support this property (such as Viceroy), `null` may be returned.\n     * @version 3.24.0\n     */\n    readonly connectTimeout: number | null;\n    /**\n     * The first byte timeout for the backend in milliseconds, if available.\n     * When not set or in environments that do not support this property (such as Viceroy), `null` may be returned.\n     * @version 3.24.0\n     */\n    readonly firstByteTimeout: number | null;\n    /**\n     * The between bytes timeout for the backend in milliseconds, if available.\n     * When not set or in environments that do not support this property (such as Viceroy), `null` may be returned.\n     * @version 3.24.0\n     */\n    readonly betweenBytesTimeout: number | null;\n    /**\n     * The HTTP keepalive time for the backend in milliseconds, or 0 if no keepalive is set.\n     * @version 3.24.0\n     */\n    readonly httpKeepaliveTime: number;\n    /**\n     * The TCP keepalive configuration, if TCP keepalive is enabled.\n     * @version 3.24.0\n     */\n    readonly tcpKeepalive: null | {\n      /**\n       * The keepalive time in seconds.\n       */\n      timeSecs: number | null;\n      /**\n       * The interval in seconds between probes.\n       */\n      intervalSecs: number | null;\n      /**\n       * The number of probes to send before terminating the keepalive.\n       */\n      probes: number | null;\n    };\n    /**\n     * Whether the backend is configured to use SSL.\n     * @version 3.24.0\n     */\n    readonly isSSL: boolean;\n    /**\n     * The minimum TLS version number this backend will use.\n     * When not used, or for environments that do not support this feature (such as Viceroy), `null` may be returned.\n     * @version 3.24.0\n     */\n    readonly tlsMinVersion: 1 | 1.1 | 1.2 | 1.3 | null;\n    /**\n     * The maximum TLS version number this backend will use.\n     * When not used, or for environments that do not support this feature (such as Viceroy), `null` may be returned.\n     * @version 3.24.0\n     */\n    readonly tlsMaxversion: 1 | 1.1 | 1.2 | 1.3 | null;\n\n    /**\n     * Returns a string representing the health of this backend.\n     * Possible values are:\n     *\n     * - \"healthy\" - The backend's health check has succeeded, indicating the backend is working as expected and should receive requests.\n     * - \"unhealthy\" - The backend's health check has failed, indicating the backend is not working as expected and should not receive requests.\n     * - \"unknown\" - The backend does not have a health check configured.\n     *\n     * @version 3.24.0\n     */\n    health(): 'healthy' | 'unhealthy' | 'unknown';\n\n    /**\n     * Returns the name associated with the Backend instance.\n     * @deprecated Use `backend.name` instead.\n     * @version 3.7.0\n     */\n    toName(): string;\n\n    /**\n     * Returns the name associated with the Backend instance.\n     *\n     * The Backend object overrides the `toString()` method of Object; it does not inherit\n     * `Object.prototype.toString()`. For Backend values, the `toString` method returns the\n     * name given to the Backend object during construction.\n     *\n     * @example\n     * ```js\n     * import { Backend } from \"fastly:backend\";\n     * const backend = new Backend({\n     *   name: \"my-backend\",\n     *   target: \"my-site.com\",\n     * });\n     * console.log(backend.toString()); // \"my-backend\"\n     * ```\n     * @fiddle meta\n     * {\n     *   \"title\": \"Backend.prototype.toString Example\",\n     *   \"request\": \"/status=200\"\n     * }\n     * @deprecated Use `backend.name` instead.\n     */\n    toString(): string;\n\n    /**\n     * Returns a boolean indicating if a Backend with the given name exists or not.\n     * @version 3.7.0\n     */\n    static exists(name: string): boolean;\n\n    /**\n     * Returns the Backend instance with the given name, if one exists. If one does not exist, an error is thrown.\n     * @version 3.7.0\n     */ \n    static fromName(name: string): Backend;\n\n    /**\n     * Returns a string representing the health of the given Backend instance.\n     * Possible values are:\n     *\n     * \"healthy\" - The backend's health check has succeeded, indicating the backend is working as expected and should receive requests.\n     * \"unhealthy\" - The backend's health check has failed, indicating the backend is not working as expected and should not receive requests.\n     * \"unknown\" - The backend does not have a health check configured.\n     *\n     * @deprecated Use `backend.health()` ({@link Backend.prototype.health}) instead.\n     * @version 3.7.0 \n     */\n    static health(backend: Backend): 'healthy' | 'unhealthy' | 'unknown';\n  }\n}\n"
  },
  {
    "path": "types/body.d.ts",
    "content": "/// <reference path=\"../types/globals.d.ts\" />\n\ndeclare module 'fastly:body' {\n  /**\n   * A low-level API for constructing and manipulating HTTP message bodies outside of the standard Fetch API.\n   *\n   * **Note**: Can only be used when processing requests, not during build-time initialization.\n   *\n   * @example\n   * ```js\n   * import { FastlyBody } from 'fastly:body';\n   *\n   * addEventListener('fetch', (event) => {\n   *   const body = new FastlyBody();\n   *   body.append('Hello, ');\n   *   body.append('world!');\n   *   const chunk = body.read(1024);\n   *   event.respondWith(new Response(chunk, { status: 200 }));\n   * });\n   * ```\n   *\n   * @version 3.9.0\n   */\n  export class FastlyBody {\n    /**\n     * Creates a new, empty `FastlyBody` instance.\n     */\n    constructor();\n\n    /**\n     * Appends the contents of another `FastlyBody` to this body.\n     * The `dest` body is consumed by this operation and should not be reused.\n     *\n     * @param dest The `FastlyBody` to append to this body.\n     * @throws `Error` if `dest` is not a `FastlyBody` instance.\n     */\n    concat(dest: FastlyBody): void;\n\n    /**\n     * Reads up to `chunkSize` bytes from the body, advancing the read position.\n     * Returns an empty `ArrayBuffer` when no more data is available.\n     *\n     * @param chunkSize The maximum number of bytes to read. Must be a positive number.\n     * @throws `Error` if `chunkSize` is not a positive number, is `NaN`, or is `Infinity`.\n     */\n    read(chunkSize: number): ArrayBuffer;\n\n    /**\n     * Appends data to the end of this body.\n     *\n     * @param data The data to append.\n     * @throws `TypeError` if `data` is a guest-backed `ReadableStream` (not yet supported),\n     *   or if the `ReadableStream` is unusable (locked or already read from).\n     */\n    append(data: BodyInit): void;\n\n    /**\n     * Prepends data to the beginning of this body.\n     *\n     * @param data The data to prepend.\n     * @throws `TypeError` if `data` is a guest-backed `ReadableStream` (not yet supported),\n     *   or if the `ReadableStream` is unusable (locked or already read from).\n     */\n    prepend(data: BodyInit): void;\n\n    /**\n     * Closes the body, signaling that no more data will be written.\n     */\n    close(): void;\n\n    /**\n     * Abandons the body, discarding its contents without finalizing.\n     * Unlike {@link close}, this signals that the body is being discarded rather than completed.\n     *\n     * @version 3.30.0\n     */\n    abandon(): void;\n  }\n}\n"
  },
  {
    "path": "types/cache-override.d.ts",
    "content": "declare module 'fastly:cache-override' {\n  /**\n   * Cache customization options for responses, provided through the afterSend hook.\n   *\n   * For customizing the response status, headers, and other cache options, these\n   * can be modified directly on the response.\n   *\n   * @version 3.30.0\n   */\n  interface CacheOptions {\n    /**\n     * Whether to cache this response.\n     *\n     * By default, leaving this field empty, responses will be cached based on their cache header\n     * information.\n     *\n     * Setting this to true or false will override this default cache behaviour, setting in the cache\n     * or not setting in the cache, even if the default behaviour would have been otherwise.\n     *\n     * Setting to 'uncacheable' the response will not only not be cached, but the cache will\n     * record that the originating request led to an uncacheable response, so that future cache lookups\n     * will result in immediately going to the backend, rather than attempting to coordinate concurrent\n     * requests to reduce backend traffic.\n     *\n     * See the [Fastly request collapsing guide](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/request-collapsing/)\n     * for more details on the mechanism that `uncacheable` disables.\n     */\n    cache?: boolean | 'uncacheable';\n    /**\n     * Provide a function to be used for transforming the response body prior to caching.\n     *\n     * Body transformations are performed by specifying a transform, rather than by directly working with the body\n     * during the onAfterSend callback function, because not every response contains a fresh body:\n     * 304 Not Modified responses, which are used to revalidate a stale cached response, are valuable precisely because\n     * they do not retransmit the body.\n     *\n     * For any other response status, the backend response will contain a relevant body, and the `bodyTransformFn` will\n     * be applied to it. The original backend body is passed in to the transform function, and the function is expected\n     * to return the new body.\n     */\n    bodyTransformFn?: (\n      body: Uint8Array<ArrayBuffer>,\n    ) => Uint8Array<ArrayBuffer> | PromiseLike<Uint8Array<ArrayBuffer>>;\n  }\n  /**\n   * The cache override mode for a request\n   *\n   * If set to:\n   * - \"none\": Do not override the behavior specified in the origin response’s cache control headers.\n   * - \"pass\": Do not cache the response to this request, regardless of the origin response’s headers.\n   * - \"override\": Override particular cache control settings using a {@linkcode CacheOverride} object.\n   */\n  type CacheOverrideMode = 'none' | 'pass' | 'override';\n\n  interface ICacheOverride {\n    /**\n     * Override the caching behavior of this request to use the given Time to Live (TTL), in seconds.\n     */\n    ttl?: number;\n    /**\n     * Override the caching behavior of this request to use the given `stale-while-revalidate` time,\n     * in seconds.\n     */\n    swr?: number;\n    /**\n     * Override the caching behavior of this request to include the given surrogate key, provided as\n     * a header value.\n     *\n     * See the [Fastly surrogate keys guide](https://docs.fastly.com/en/guides/purging-api-cache-with-surrogate-keys)\n     * for details.\n     */\n    surrogateKey?: string;\n    /**\n     * Override the caching behavior of this request to enable or disable PCI/HIPAA-compliant\n     * non-volatile caching.\n     *\n     * By default, this is false, which means the request may not be PCI/HIPAA-compliant. Set it to\n     * true to enable compliant caching.\n     *\n     * See the [Fastly PCI-Compliant Caching and Delivery documentation](https://docs.fastly.com/products/pci-compliant-caching-and-delivery)\n     * for details.\n     */\n    pci?: boolean;\n    /**\n     * Set a [callback function](https://developer.mozilla.org/en-US/docs/Glossary/Callback_function) to be invoked if a\n     * request is going all the way to a backend, allowing the request to be modified beforehand.\n     *\n     * See [Modifying a request as it is forwarded to a backend](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/#modifying-a-request-as-it-is-forwarded-to-a-backend)\n     * in the Fastly cache interfaces documentation for details.\n     *\n     * @param request\n     * @returns {void | PromiseLike<void>}\n     *\n     * @version 3.30.0\n     */\n    beforeSend?: (request: Request) => void | PromiseLike<void>;\n    /**\n     * Set a [callback function](https://developer.mozilla.org/en-US/docs/Glossary/Callback_function) to be invoked after\n     * a response has been sent, but before it is stored into the cache.\n     *\n     * See [Controlling cache behavior based on backend response](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/#controlling-cache-behavior-based-on-backend-response)\n     * in the Fastly cache interfaces documentation for details.\n     *\n     * @param response\n     * @returns {void | CacheOptions | PromiseLike<void | CacheOptions>}\n     *\n     * @version 3.30.0\n     */\n    afterSend?: (\n      response: Response,\n    ) => void | CacheOptions | PromiseLike<void | CacheOptions>;\n  }\n\n  /**\n   * Configures the caching behavior of a {@linkcode \"globals\".Response | Response}.\n   *\n   * Normally, the HTTP Headers on a {@linkcode \"globals\".Response | Response} would control how the {@linkcode \"globals\".Response | Response} is cached,\n   * but `CacheOverride` can be set on a {@linkcode \"globals\".Request | Request}, to define custom caching behavior.\n   *\n   * @example\n   * In this example we override the cache for all the requests prefixed /static/ to have a long TTL (Time To Live),\n   * and the home page to have a short TTL and a long SWR (Stale While Revalidate).\n   *\n   * ```js\n   * import { CacheOverride } from \"fastly:cache-override\";\n   *\n   * async function app(event) {\n   *   const path = (new URL(event.request.url)).pathname;\n   *   let cacheOverride;\n   *   if (path == '/') {\n   *     cacheOverride = new CacheOverride('override', {ttl: 10, swr: 86_400});\n   *   } else if (path.startsWith('/static/')) {\n   *     cacheOverride = new CacheOverride('override', {ttl: 86_400});\n   *   } else {\n   *     cacheOverride = new CacheOverride('none')\n   *   }\n   *   return fetch(event.request.url, {\n   *     cacheOverride,\n   *     backend: 'my-backend'\n   *   });\n   * }\n   * addEventListener(\"fetch\", event => event.respondWith(app(event)));\n   * ```\n   * @fiddle meta\n   * {\n   *   \"title\": \"CacheOverride Example\",\n   *   \"request\": \"/status=200\"\n   * }\n   */\n  class CacheOverride {\n    /**\n     * @param mode Sets the cache override mode for a request\n     *\n     * If set to:\n     * - \"none\": Do not override the behavior specified in the origin response’s cache control headers.\n     * - \"pass\": Do not cache the response to this request, regardless of the origin response’s headers.\n     * - \"override\": Override particular cache control settings using a {@linkcode CacheOverride} object.\n     *\n     * @param init Sets the cache override init options\n     */\n    constructor(mode: CacheOverrideMode, init?: ICacheOverride);\n    /**\n     * When an init object is provided as the first argument, the mode defaults to `\"override\"`.\n     *\n     * @param overrideInit Sets the cache override init options\n     * @version 3.30.0\n     */\n    constructor(overrideInit?: ICacheOverride);\n\n    /**\n     * Sets the cache override mode for a request\n     *\n     * If set to:\n     * - \"none\": Do not override the behavior specified in the origin response’s cache control headers.\n     * - \"pass\": Do not cache the response to this request, regardless of the origin response’s headers.\n     * - \"override\": Override particular cache control settings using a {@linkcode CacheOverride} object.\n     */\n    public mode: CacheOverrideMode;\n    /**\n     * Override the caching behavior of this request to use the given Time to Live (TTL), in seconds.\n     */\n    public ttl?: number;\n    /**\n     * Override the caching behavior of this request to use the given `stale-while-revalidate` time,\n     * in seconds\n     */\n    public swr?: number;\n    /**\n     * Override the caching behavior of this request to include the given surrogate key, provided as\n     * a header value.\n     *\n     * See the [Fastly surrogate keys guide](https://docs.fastly.com/en/guides/purging-api-cache-with-surrogate-keys)\n     * for details.\n     */\n    public surrogateKey?: string;\n    /**\n     * Override the caching behavior of this request to enable or disable PCI/HIPAA-compliant\n     * non-volatile caching.\n     *\n     * By default, this is false, which means the request may not be PCI/HIPAA-compliant. Set it to\n     * true to enable compliant caching.\n     *\n     * See the [Fastly PCI-Compliant Caching and Delivery documentation](https://docs.fastly.com/products/pci-compliant-caching-and-delivery)\n     * for details.\n     */\n    public pci?: boolean;\n\n    /**\n     * Callback to be invoked if a request is going all the way to a backend, allowing the request to be modified beforehand.\n     *\n     * See [Modifying a request as it is forwarded to a backend](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/#modifying-a-request-as-it-is-forwarded-to-a-backend)\n     * in the Fastly cache interfaces documentation for details.\n     *\n     * @version 3.30.0\n     */\n    public beforeSend?: (request: Request) => void | PromiseLike<void>;\n\n    /**\n     * Callback to be invoked after a response has been sent, but before it is stored into the cache.\n     *\n     * See [Controlling cache behavior based on backend response](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/#controlling-cache-behavior-based-on-backend-response)\n     * in the Fastly cache interfaces documentation for details.\n     *\n     * @version 3.30.0\n     */\n    public afterSend?: (\n      response: Response,\n    ) => void | CacheOptions | PromiseLike<void | CacheOptions>;\n  }\n}\n"
  },
  {
    "path": "types/cache.d.ts",
    "content": "declare module 'fastly:cache' {\n  interface PurgeOptions {\n    /**\n     * Where to purge the content from.\n     *\n     * \"pop\" - This will remove the content from the POP that contains the currently executing instance.\n     * \"global\" - This will remove the content from all of Fastly.\n     */\n    scope: 'pop' | 'global';\n  }\n\n  /**\n   * The `SimpleCache` class provides a simplified interface to inserting and retrieving entries\n   * from Fastly's Cache. All methods on the class are static methods.\n   *\n   * For more advanced use cases requiring transactional lookups, request collapsing, or\n   * revalidation, use {@link CoreCache} instead.\n   *\n   * @example\n   * ```js\n   * import { SimpleCache } from 'fastly:cache';\n   *\n   * addEventListener('fetch', event => event.respondWith(app(event)));\n   *\n   * async function app(event) {\n   *   const path = new URL(event.request.url).pathname;\n   *   let page = await SimpleCache.getOrSet(path, async () => {\n   *     return {\n   *       value: await render(path),\n   *       // Store the page in the cache for 1 minute\n   *       ttl: 60 // seconds\n   *     }\n   *   });\n   *   return new Response(await page.text(), {\n   *     headers: { 'content-type': 'text/plain;charset=UTF-8' }\n   *   });\n   * }\n   *\n   * async function render(path) {\n   *   // expensive/slow function which constructs and returns the contents for a given path\n   *   await new Promise(resolve => setTimeout(resolve, 10_000));\n   *   return path;\n   * }\n   * ```\n   */\n  export class SimpleCache {\n    /**\n     * Gets the entry associated with the key `key` from the cache.\n     *\n     * @param key The key to retrieve from within the cache (up to 8,135 characters).\n     * @returns The cached entry, or `null` if the key does not exist in the cache.\n     * @throws `TypeError` if the provided `key` is an empty string, cannot be coerced to a string, or is longer than 8,135 characters.\n     */\n    static get(key: string): SimpleCacheEntry | null;\n    /**\n     * Inserts a new entry or overwrites an existing entry in the cache.\n     *\n     * @deprecated Use {@link SimpleCache.getOrSet} instead.\n     * @param key The key to store the entry under (up to 8,135 characters).\n     * @param value The value to store in the cache.\n     * @param ttl The time-to-live for this entry, in seconds.\n     * @throws `TypeError` if the provided `key` is an empty string, cannot be coerced to a string, or is longer than 8,135 characters.\n     */\n    static set(key: string, value: BodyInit, ttl: number): undefined;\n    /**\n     * Inserts a new entry or overwrites an existing entry in the cache using a `ReadableStream`.\n     *\n     * @deprecated Use {@link SimpleCache.getOrSet} instead.\n     * @param key The key to store the entry under (up to 8,135 characters).\n     * @param value A `ReadableStream` to store in the cache.\n     * @param ttl The time-to-live for this entry, in seconds.\n     * @param length The length of the `ReadableStream` value, in bytes.\n     * @throws `TypeError` if the provided `key` is an empty string, cannot be coerced to a string, or is longer than 8,135 characters.\n     */\n    static set(\n      key: string,\n      value: ReadableStream,\n      ttl: number,\n      length: number,\n    ): undefined;\n    /**\n     * Attempts to get an entry from the cache for the supplied `key`. If no entry is found\n     * (or has expired), the supplied `set` function is executed and its result is inserted\n     * into the cache under the supplied `key`.\n     *\n     * @param key The key to lookup and/or store the entry under (up to 8,135 characters).\n     * @param set A function to execute if the cache does not have a usable entry. Should return a Promise resolving with `value` and `ttl` (in seconds).\n     * @throws `TypeError` if the provided `key` is an empty string, cannot be coerced to a string, or is longer than 8,135 characters.\n     * @throws `TypeError` if the provided `ttl` cannot be coerced to a number, is negative, `NaN`, or `Infinity`.\n     */\n    static getOrSet(\n      key: string,\n      set: () => Promise<{ value: BodyInit; ttl: number }>,\n    ): Promise<SimpleCacheEntry>;\n    /**\n     * Attempts to get an entry from the cache for the supplied `key`. If no entry is found\n     * (or has expired), the supplied `set` function is executed and its result is inserted\n     * into the cache under the supplied `key`.\n     *\n     * When the value is a `ReadableStream`, the `length` property must be provided.\n     *\n     * @param key The key to lookup and/or store the entry under (up to 8,135 characters).\n     * @param set A function to execute if the cache does not have a usable entry. Should return a Promise resolving with `value`, `ttl` (in seconds), and `length` (in bytes).\n     * @throws `TypeError` if the provided `key` is an empty string, cannot be coerced to a string, or is longer than 8,135 characters.\n     * @throws `TypeError` if the provided `ttl` cannot be coerced to a number, is negative, `NaN`, or `Infinity`.\n     */\n    static getOrSet(\n      key: string,\n      set: () => Promise<{\n        value: ReadableStream;\n        ttl: number;\n        length: number;\n      }>,\n    ): Promise<SimpleCacheEntry>;\n    /**\n     * Purges the entry associated with the key `key` from the cache.\n     *\n     * @param key The key to purge from within the cache (up to 8,135 characters).\n     * @param options Options controlling the scope of the purge.\n     * @throws `TypeError` if the provided `key` is an empty string, cannot be coerced to a string, or is longer than 8,135 characters.\n     */\n    static purge(key: string, options: PurgeOptions): undefined;\n  }\n\n  /**\n   * Represents an entry retrieved from the {@link SimpleCache}.\n   */\n  export interface SimpleCacheEntry {\n    /** Provides access to the entry's contents as a `ReadableStream`. */\n    get body(): ReadableStream;\n    /** Indicates whether the body has been read yet. */\n    get bodyUsed(): boolean;\n    /** Reads the entry's stream to completion and returns the result as a string, decoded using UTF-8. */\n    text(): Promise<string>;\n    /** Reads the entry's stream to completion and parses the result as JSON. */\n    json(): Promise<object>;\n    /** Reads the entry's stream to completion and returns the result as an `ArrayBuffer`. */\n    arrayBuffer(): Promise<ArrayBuffer>;\n  }\n\n  /**\n   * Options for cache lookups.\n   *\n   * @version 3.9.0\n   */\n  export interface LookupOptions {\n    /**\n     * Note: These headers are narrowly useful for implementing cache lookups incorporating the semantics of the HTTP Vary header.\n     * The headers act as additional factors in object selection, and the choice of which headers to factor in is determined during insertion, via the `vary` property within `TransactionInsertOptions`.\n     * A lookup will succeed when there is at least one cached item that matches lookup's `key`, and all of the lookup's headers included in the cache items' `vary` list match the corresponding headers in that cached item.\n     * A typical example is a cached HTTP response, where the request had an \"Accept-Encoding\" header. In that case, the origin server may or may not decide on a given encoding, and whether that same response is suitable for a request with a different (or missing) Accept-Encoding header is determined by whether Accept-Encoding is listed in Vary header in the origin's response.\n     */\n    headers?: HeadersInit;\n  }\n\n  /**\n   * Options for non-transactional cache insertions via {@link CoreCache.insert}.\n   *\n   * @version 3.9.0\n   */\n  export interface InsertOptions extends TransactionInsertOptions {\n    /**\n     * Note: These headers are narrowly useful for implementing cache lookups incorporating the semantics of the HTTP Vary header.\n     * The headers act as additional factors in object selection, and the choice of which headers to factor in is determined during insertion, via the `vary` property within `TransactionInsertOptions`.\n     * A lookup will succeed when there is at least one cached item that matches lookup's `key`, and all of the lookup's headers included in the cache items' `vary` list match the corresponding headers in that cached item.\n     * A typical example is a cached HTTP response, where the request had an \"Accept-Encoding\" header. In that case, the origin server may or may not decide on a given encoding, and whether that same response is suitable for a request with a different (or missing) Accept-Encoding header is determined by whether Accept-Encoding is listed in Vary header in the origin's response.\n     */\n    headers?: HeadersInit;\n  }\n\n  /**\n   * Options for transactional cache insertions.\n   *\n   * @version 3.9.0\n   */\n  export interface TransactionInsertOptions {\n    /**\n     * Sets the \"time to live\" for the cache item in milliseconds: The time for which the item will be considered fresh.\n     */\n    maxAge: number;\n    /**\n     * Sets the list of headers that must match when looking up this cached item.\n     */\n    vary?: Array<string>;\n    /**\n     * Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n     *\n     * The initial age is 0 by default.\n     */\n    initialAge?: number;\n    /**\n     * Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n     * Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n     * The methods `CacheState.prototype.usable` and `CacheState.prototype.stale` can be used to determine the current state of an item.\n     *\n     * The stale-while-revalidate period is 0 by default.\n     */\n    staleWhileRevalidate?: number;\n    /**\n     * Sets the surrogate keys that can be used for purging this cached item.\n     * Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item's TTL to elapse, or overwriting the item with insert().\n     * Surrogate keys must contain only printable ASCII characters (those between 0x21 and 0x7E, inclusive). Any invalid keys will be ignored.\n     *\n     * See the [Fastly surrogate keys guide](https://docs.fastly.com/en/guides/working-with-surrogate-keys) for details.\n     */\n    surrogateKeys?: Array<string>;\n    /**\n     * Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n     * It is preferable to provide a length, if possible.\n     * Clients that begin streaming the item's contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n     */\n    length?: number;\n    /**\n     * Sets the user-defined metadata to associate with the cached item.\n     */\n    userMetadata?: ArrayBufferView | ArrayBuffer | URLSearchParams | string;\n    /**\n     * Enable or disable PCI/HIPAA-compliant non-volatile caching.\n     * By default, this is false.\n     *\n     * See the [Fastly PCI-Compliant Caching and Delivery documentation](https://docs.fastly.com/products/pci-compliant-caching-and-delivery) for details.\n     */\n    sensitive?: boolean;\n  }\n\n  /**\n   * The CoreCache class exposes the Compute Core Cache API, the same set of primitive operations used to build Fastly services.\n   * The Core Cache API puts the highest level of power in the hands of the user, but requires manual serialization of cache contents and explicit handling of request collapsing and revalidation control flow.\n   *\n   * @version 3.9.0\n   */\n  export class CoreCache {\n    /**\n     * Perform a non-transactional lookup into the cache, returning a CacheEntry if a usable cached item was found.\n     * A cached item is usable if its age is less than the sum of its TTL and its stale-while-revalidate period. Items beyond that age are unusably stale.\n     *\n     * Note: A non-transactional lookup will not attempt to coordinate with any concurrent cache lookups.\n     * If two instances of the service perform a lookup at the same time for the same cache key, and the item is not yet cached, they will both return `null`.\n     * Without further coordination, they may both end up performing the work needed to insert() the item (which usually involves origin requests and/or computation) and racing with each other to insert.\n     * To resolve such races between concurrent lookups, use `CoreCache.transactionLookup()` instead.\n     *\n     * @param key A cache key which is a string with a length of up to 8,135 that identify a cached item. The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n     * @param options A set of options to used whilst performing this lookup into the cache.\n     * @throws `TypeError` if the provided `key` is an empty string, cannot be coerced to a string, or is longer than 8,135 characters.\n     */\n    static lookup(key: string, options?: LookupOptions): CacheEntry | null;\n\n    /**\n     * Perform a non-transactional insertion into the cache, returning a `FastlyBody` instance for providing the cached object itself.\n     * For the insertion to complete successfully, the object must be written into the returned `FastlyBody` instance, and then `FastlyBody.prototype.close` must be called.\n     * If `FastlyBody.prototype.close` does not get called, the insertion is considered incomplete, and any concurrent lookups that may be reading from the object as it is streamed into the cache may encounter a streaming error.\n     *\n     * Note: Like `CoreCache.lookup()`, `CoreCache.insert()` may race with concurrent lookups or insertions, and will unconditionally overwrite existing cached items rather than allowing for revalidation of an existing object.\n     * The transactional equivalent of this function is `TransactionCacheEntry.insert()`, which may only be called following a `CoreCache.transactionLookup()` call and the returned `CacheEntry` when has a state where `CacheState.mustInsertOrUpdate()` returns true.\n     *\n     * @param key A cache key which is a string with a length of up to 8,135 that identify a cached item. The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n     * @param options A set of options to used whilst performing this insertion into the cache.\n     * @throws `TypeError` if the provided `key` is an empty string, cannot be coerced to a string, or is longer than 8,135 characters.\n     */\n    static insert(\n      key: string,\n      options: InsertOptions,\n    ): import('fastly:body').FastlyBody;\n\n    /**\n     * Perform a transactional lookup into the cache, returning a `TransactionCacheEntry` instance.\n     *\n     * Transactions coordinate between concurrent actions on the same cache key, incorporating concepts of [request collapsing](https://developer.fastly.com/learning/concepts/request-collapsing/) and [revalidation](https://developer.fastly.com/learning/concepts/stale/), though at a lower level that does not automatically interpret HTTP semantics.\n     *\n     * Request Collapsing:\n     * If there are multiple concurrent calls to `CoreCache.transactionLookup()` for the same item and that item is not present,\n     * just one of the callers will be instructed to insert the item into the cache as part of the transaction.\n     * The other callers will block until the metadata for the item has been inserted, and can then begin streaming its contents out of the cache at the same time that the inserting caller streams them into the cache.\n     *\n     * Revalidation:\n     * Similarly, if an item is usable but stale, and multiple callers attempt a `CoreCache.transactionLookup()` concurrently, they will all be given access to the stale item, but only one will be designated to perform an asynchronous update (or insertion) to freshen the item in the cache.\n     *\n     * @param key A cache key which is a string with a length of up to 8,135 that identify a cached item. The cache key may not uniquely identify an item; headers can be used to augment the key when multiple items are associated with the same key.\n     * @param options A set of options to used whilst performing this lookup into the cache.\n     * @throws `TypeError` if the provided `key` is an empty string, cannot be coerced to a string, or is longer than 8,135 characters.\n     */\n    static transactionLookup(\n      key: string,\n      options?: LookupOptions,\n    ): TransactionCacheEntry;\n  }\n\n  /**\n   * The status of this lookup (and potential transaction).\n   *\n   * @version 3.9.0\n   */\n  export class CacheState {\n    /**\n     * Returns `true` if a cached item was located.\n     *\n     * Even if a cached item is found, the cached item might be stale and require updating. Use `mustInsertOrUpdate()` to determine whether this transaction client is expected to update the cached item.\n     */\n    found(): boolean;\n    /**\n     * Returns `true` if the cached item is usable.\n     *\n     * A cached item is usable if its age is less than the sum of the `maxAge` and `staleWhileRevalidate` periods.\n     */\n    usable(): boolean;\n    /**\n     * Returns `true` if the cached item is stale.\n     *\n     * A cached item is stale if its age is greater than its `maxAge` period.\n     */\n    stale(): boolean;\n    /**\n     * Returns `true` if a fresh cache item was not found, and this transaction client is expected to insert a new item or update a stale item.\n     */\n    mustInsertOrUpdate(): boolean;\n  }\n\n  /**\n   * Options for requesting a byte range within a cached item.\n   *\n   * @version 3.9.0\n   */\n  export interface CacheBodyOptions {\n    /**\n     * The offset from which to start the range.\n     */\n    start: number;\n    /**\n     * How long the range should be.\n     */\n    end: number;\n  }\n\n  /**\n   * Represents a cached item retrieved via {@link CoreCache.lookup} or as part of a\n   * {@link TransactionCacheEntry.insertAndStreamBack} operation.\n   *\n   * @version 3.9.0\n   */\n  export class CacheEntry {\n    /**\n     * Closes the connection to the cache for this `CacheEntry`.\n     */\n    close(): void;\n\n    /**\n     * Returns a `CacheState` instance which reflects the current state of this `CacheEntry` instance.\n     */\n    state(): CacheState;\n\n    /**\n     * The user-controlled metadata associated with the cached item.\n     */\n    userMetadata(): ArrayBuffer;\n\n    /**\n     * Retrieves the cached item as a `ReadableStream`.\n     *\n     * Only one stream can be active at a time for a given `CacheEntry`. An error will be thrown if a stream is already active for this CacheEntry.\n     *\n     * @param options Optional property used to request a range of bytes within the cached item.\n     */\n    body(options?: CacheBodyOptions): ReadableStream;\n\n    /**\n     * The size in bytes of the cached item, if known.\n     *\n     * @returns The length in bytes, or `null` if the length is currently unknown. The length may be unknown if the item is currently being streamed into the cache without a fixed length.\n     */\n    length(): number | null;\n\n    /**\n     * The time in milliseconds for which the cached item is considered fresh.\n     */\n    maxAge(): number;\n\n    /**\n     * The time in milliseconds for which a cached item can safely be used despite being considered stale.\n     */\n    staleWhileRevalidate(): number;\n\n    /**\n     * The current age in milliseconds of the cached item.\n     */\n    age(): number;\n\n    /**\n     * Determines the number of cache hits to this cached item.\n     *\n     * Note: this hit count only reflects the view of the server that supplied the cached item. Due to clustering, this count may vary between potentially many servers within the data center where the item is cached. See the [clustering documentation](https://developer.fastly.com/learning/vcl/clustering/) for details, though note that the exact caching architecture of Compute is different from VCL services.\n     */\n    hits(): number;\n  }\n\n  /**\n   * Options for updating a cached item's metadata via {@link TransactionCacheEntry.update}.\n   *\n   * @version 3.9.0\n   */\n  export interface TransactionUpdateOptions {\n    /**\n     * Sets the \"time to live\" for the cache item in milliseconds: The time for which the item will be considered fresh.\n     */\n    maxAge: number;\n    /**\n     * Sets the list of headers that must match when looking up this cached item.\n     */\n    vary?: Array<string>;\n    /**\n     * Sets the initial age of the cached item, in milliseconds, to be used in freshness calculations.\n     *\n     * The initial age is 0 by default.\n     */\n    initialAge?: number;\n    /**\n     * Sets the stale-while-revalidate period, in milliseconds for the cached item, which is the time for which the item can be safely used despite being considered stale.\n     * Having a stale-while-revalidate period provides a signal that the cache should be updated (or its contents otherwise revalidated for freshness) asynchronously, while the stale cached item continues to be used, rather than blocking on updating the cached item.\n     * The methods `CacheState.prototype.usable` and `CacheState.prototype.stale` can be used to determine the current state of an item.\n     *\n     * The stale-while-revalidate period is 0 by default.\n     */\n    staleWhileRevalidate?: number;\n    /**\n     * Sets the surrogate keys that can be used for purging this cached item.\n     * Surrogate key purges are the only means to purge specific items from the cache. At least one surrogate key must be set in order to remove an item without performing a purge-all, waiting for the item's TTL to elapse, or overwriting the item with insert().\n     * Surrogate keys must contain only printable ASCII characters (those between `0x21` and `0x7E`, inclusive). Any invalid keys will be ignored.\n     *\n     * See the [Fastly surrogate keys guide](https://docs.fastly.com/en/guides/working-with-surrogate-keys) for details.\n     */\n    surrogateKeys?: Array<string>;\n    /**\n     * Sets the size of the cached item, in bytes, when known prior to actually providing the bytes.\n     * It is preferable to provide a length, if possible.\n     * Clients that begin streaming the item's contents before it is completely provided will see the promised length which allows them to, for example, use content-length instead of transfer-encoding: chunked if the item is used as the body of a Request or Response.\n     */\n    length?: number;\n    /**\n     * Sets the user-defined metadata to associate with the cached item.\n     */\n    userMetadata?: ArrayBufferView | ArrayBuffer | URLSearchParams | string;\n  }\n\n  /**\n   * Represents a cached item retrieved via a transactional lookup ({@link CoreCache.transactionLookup}).\n   * Extends {@link CacheEntry} with methods for inserting, updating, and cancelling cache transactions.\n   *\n   * @version 3.9.0\n   */\n  export class TransactionCacheEntry extends CacheEntry {\n    /**\n     * Perform a transactional cache insertion, returning a `FastlyBody` instance for providing the cached object itself.\n     *\n     * This method should only be called when `TransactionCacheEntry.state().mustInsertOrUpdate()` is true; otherwise, an error will be thrown when attempting to perform the insertion.\n     */\n    insert(options: TransactionInsertOptions): import('fastly:body').FastlyBody;\n\n    /**\n     * Perform a transactional cache insertion, returning a `FastlyBody` instance for providing the cached object itself, and a `CacheEntry` instance which can be used to stream out the newly-inserted cache item.\n     *\n     * For the insertion to complete successfully, the object must be written into the returned `FastlyBody` instance, and then `FastlyBody.prototype.close` must be called.\n     * If `FastlyBody.prototype.close` does not get called, the insertion is considered incomplete, and any concurrent lookups that may be reading from the object as it is streamed into the cache may encounter a streaming error.\n     */\n    insertAndStreamBack(\n      options: TransactionInsertOptions,\n    ): [import('fastly:body').FastlyBody, CacheEntry];\n    /**\n     * Perform an update of the cache item's metadata.\n     */\n    update(options: TransactionUpdateOptions): void;\n    /**\n     * Cancel an obligation to provide an object to the cache.\n     */\n    cancel(): void;\n  }\n}\n"
  },
  {
    "path": "types/compute.d.ts",
    "content": "declare module 'fastly:compute' {\n  /**\n   * Get the current elapsed vCPU time in milliseconds for the current request handler.\n   *\n   * @version 3.22.0\n   */\n  export function vCpuTime(): number;\n\n  /**\n   * Purge the given surrogate key from Fastly's HTTP and Core caches.\n   *\n   * There are two purge modes: hard purge (the default) clears all matching items from\n   * the cache immediately, while soft purge retains stale entries in the cache, reducing\n   * origin load while enabling stale revalidations.\n   *\n   * See the [Fastly Purge documentation](https://www.fastly.com/documentation/guides/concepts/edge-state/cache/purging/#surrogate-key-purge)\n   * for more information on caching and purge operations.\n   *\n   * @param surrogateKey The surrogate key string to purge.\n   * @param soft Enable to perform a soft purge, retaining stale cache entries to\n   *   reduce load on the origin server. Defaults to a hard purge.\n   * @version 3.22.0\n   */\n  export function purgeSurrogateKey(\n    surrogateKey: string,\n    soft?: boolean,\n  ): void;\n}\n"
  },
  {
    "path": "types/config-store.d.ts",
    "content": "declare module 'fastly:config-store' {\n  /**\n   * Class for accessing a [Fastly Config Store](https://www.fastly.com/documentation/reference/api/services/resources/config-store/).\n   *\n   * **Note**: Can only be used when processing requests, not during build-time initialization.\n   *\n   * @example\n   * ```js\n   * import { ConfigStore } from \"fastly:config-store\";\n   *\n   * async function app(event) {\n   *   const config = new ConfigStore(\"animals\");\n   *   return new Response(config.get(\"cat\"));\n   * }\n   * addEventListener(\"fetch\", (event) => event.respondWith(app(event)));\n   * ```\n   */\n  class ConfigStore {\n    /**\n     * Creates a new ConfigStore object, providing access to the named\n     * [Config Store resource](https://www.fastly.com/documentation/reference/api/services/resources/config-store/).\n     *\n     * @param name The resource link name for the Config Store.\n     * @throws `TypeError` if no Config Store exists with the provided name.\n     * @throws `TypeError` if the provided name is empty, longer than 255 characters,\n     *   does not start with an ASCII alphabetical character, or contains characters\n     *   other than ASCII alphanumerics, underscores, and spaces.\n     */\n    constructor(name: string);\n    /**\n     * Get a value for a key in the Config Store. If the provided key does not\n     * exist in the Config Store then this returns `null`.\n     *\n     * @param key The key to retrieve.\n     * @throws `TypeError` if the provided key is empty or longer than 255 characters.\n     */\n    get(key: string): string | null;\n  }\n}\n"
  },
  {
    "path": "types/device.d.ts",
    "content": "declare module 'fastly:device' {\n  /**\n   * Provides device detection based on User-Agent strings.\n   *\n   * **Note**: Can only be used when processing requests, not during build-time initialization.\n   *\n   * @version 3.10.0\n   */\n  class Device {\n    /**\n     * Look up the data associated with a particular User-Agent string.\n     * If there is data associated with the User-Agent, a `Device` instance is returned.\n     * Otherwise, `null` is returned.\n     *\n     * @param useragent The User-Agent string to look up.\n     * @throws `TypeError` if the provided User-Agent string is empty.\n     */\n    static lookup(useragent: string): Device | null;\n\n    /**\n     * The name of the device, or `null` if no name is known.\n     */\n    get name(): string | null;\n    /**\n     * The brand of the device, which may be different from the manufacturer.\n     * `null` if no brand is known.\n     */\n    get brand(): string | null;\n    /**\n     * The model of the device, or `null` if no model is known.\n     */\n    get model(): string | null;\n    /**\n     * A string representation of the device's primary platform hardware,\n     * or `null` if not known.\n     *\n     * The most commonly used device types are also identified via boolean\n     * properties. Because a device may have multiple device types and this\n     * property only has the primary type, we recommend using the boolean\n     * properties for logic and this string representation for logging.\n     */\n    get hardwareType(): string | null;\n    /**\n     * Whether the device is a desktop web browser, or `null` if not known.\n     */\n    get isDesktop(): boolean | null;\n    /**\n     * Whether the device is a video game console, or `null` if not known.\n     */\n    get isGameConsole(): boolean | null;\n    /**\n     * Whether the device is a media player (like Blu-ray players, iPod\n     * devices, and smart speakers such as Amazon Echo), or `null` if not known.\n     */\n    get isMediaPlayer(): boolean | null;\n    /**\n     * Whether the device is a mobile phone, or `null` if not known.\n     */\n    get isMobile(): boolean | null;\n    /**\n     * Whether the device is a smart TV, or `null` if not known.\n     */\n    get isSmartTV(): boolean | null;\n    /**\n     * Whether the device is a tablet (like an iPad), or `null` if not known.\n     */\n    get isTablet(): boolean | null;\n    /**\n     * Whether the device's screen is touch sensitive, or `null` if not known.\n     */\n    get isTouchscreen(): boolean | null;\n    /**\n     * Whether the device is a bot, or `null` if not known.\n     *\n     * @version 3.39.0\n     */\n    get isBot(): boolean | null;\n\n    /**\n     * Returns a JSON representation of the Device object.\n     *\n     * To get a JSON string, you can use `JSON.stringify(device)` directly;\n     * it will call `toJSON()` automatically.\n     */\n    toJSON(): Object;\n  }\n}\n"
  },
  {
    "path": "types/dictionary.d.ts",
    "content": "declare module 'fastly:dictionary' {\n  /**\n   * Class for accessing [Fastly Edge Dictionaries](https://docs.fastly.com/en/guides/about-edge-dictionaries).\n   *\n   * **Note**: Can only be used when processing requests, not during build-time initialization.\n   *\n   * @deprecated Use {@link config-store!ConfigStore | ConfigStore} from `'fastly:config-store'` instead.\n   */\n  class Dictionary {\n    /**\n     * Creates a new Dictionary object, providing access to the named\n     * [Edge Dictionary](https://docs.fastly.com/en/guides/about-edge-dictionaries).\n     *\n     * @param name The name of the Edge Dictionary.\n     * @throws `TypeError` if no Dictionary exists with the provided name.\n     * @throws `TypeError` if the provided name is empty, longer than 255 characters,\n     *   does not start with an ASCII alphabetical character, or contains characters\n     *   other than ASCII alphanumerics, underscores, and spaces.\n     * @deprecated Use {@link config-store!ConfigStore | ConfigStore} from `'fastly:config-store'` instead.\n     */\n    constructor(name: string);\n    /**\n     * Get a value for a key in the Dictionary. If the provided key does not\n     * exist in the Dictionary then this returns `null`.\n     *\n     * @param key The key to retrieve.\n     * @throws `TypeError` if the provided key is empty or longer than 255 characters.\n     * @deprecated Use {@link config-store!ConfigStore | ConfigStore} from `'fastly:config-store'` instead.\n     */\n    get(key: string): string | null;\n  }\n}\n"
  },
  {
    "path": "types/edge-rate-limiter.d.ts",
    "content": "declare module 'fastly:edge-rate-limiter' {\n  /**\n   * Provides [Edge Rate Limiting](https://docs.fastly.com/products/edge-rate-limiting) by\n   * combining a {@link RateCounter} and a {@link PenaltyBox}.\n   *\n   * **Note**: Can only be used when processing requests, not during build-time initialization.\n   *\n   * @version 3.9.0\n   */\n  export class EdgeRateLimiter {\n    /**\n     * Open an EdgeRateLimiter with the given rate counter and penalty box.\n     *\n     * @param rateCounter The RateCounter instance to associate with this EdgeRateLimiter.\n     * @param penaltyBox The PenaltyBox instance to associate with this EdgeRateLimiter.\n     * @throws `TypeError` If `rateCounter` is not an instance of RateCounter.\n     * or if `penaltyBox` is not an instance of PenaltyBox.\n     */\n    constructor(rateCounter: RateCounter, penaltyBox: PenaltyBox);\n    /**\n     * Increment an entry in the rate counter and check if the entry has exceeded\n     * some average number of requests per second (RPS) over the given window.\n     * If the entry is over the RPS limit for the window, add it to the penalty\n     * box for the given `timeToLive`.\n     *\n     * @param entry The name of the entry to increment and check.\n     * @param delta The amount to increment the entry by.\n     * @param window The time period in seconds to check across.\n     * @param limit The requests-per-second limit.\n     * @param timeToLive How long in minutes (1–60) the entry should be added\n     *   into the penalty box. Value is truncated to the nearest minute.\n     * @returns `true` if the entry has exceeded the average RPS for the window,\n     *   otherwise `false`.\n     * @throws `TypeError` If `delta` is not a non-negative finite number,\n     * if `window` is not 1, 10, or 60, if `limit` is not a non-negative finite number,\n     * or if `timeToLive` is not a number between 1 and 60.\n     */\n    checkRate(\n      entry: string,\n      delta: number,\n      window: 1 | 10 | 60,\n      limit: number,\n      timeToLive: number,\n    ): boolean;\n  }\n\n  /**\n   * A penalty box that can be used with {@link EdgeRateLimiter} or standalone\n   * for adding and checking if an entry is in the dataset.\n   *\n   * **Note**: Can only be used when processing requests, not during build-time initialization.\n   *\n   * @version 3.9.0\n   */\n  export class PenaltyBox {\n    /**\n     * Open a penalty box identified by the given name.\n     *\n     * @param name The name of the penalty box to open.\n     */\n    constructor(name: string);\n    /**\n     * Add an entry to the penalty box for the duration of the given `timeToLive`.\n     *\n     * @param entry The entry to add.\n     * @param timeToLive How long in minutes (1–60) the entry should be added\n     *   into the penalty box. Value is truncated to the nearest minute.\n     * @throws `TypeError` if `timeToLive` is not a number between 1 and 60.\n     */\n    add(entry: string, timeToLive: number): void;\n    /**\n     * Check if an entry is in the penalty box.\n     *\n     * @param entry The entry to look up.\n     * @returns `true` if the entry is in the penalty box, otherwise `false`.\n     */\n    has(entry: string): boolean;\n  }\n\n  /**\n   * A rate counter that can be used with {@link EdgeRateLimiter} or standalone\n   * for counting and rate calculations.\n   *\n   * **Note**: Can only be used when processing requests, not during build-time initialization.\n   *\n   * @version 3.9.0\n   */\n  export class RateCounter {\n    /**\n     * Open a RateCounter instance with the given name.\n     *\n     * @param name The name of the rate counter.\n     */\n    constructor(name: string);\n    /**\n     * Increment the given entry by `delta`.\n     *\n     * @param entry The entry to increment.\n     * @param delta The amount to increment the entry by.\n     * @throws `TypeError` if `delta` is not a non-negative finite number.\n     */\n    increment(entry: string, delta: number): void;\n    /**\n     * Look up the current rate for an entry over a given window.\n     *\n     * @param entry The entry to look up.\n     * @param window The time window in seconds to look up alongside the entry.\n     * @returns The rate for the given entry and window.\n     * @throws `TypeError` if `window` is not 1, 10, or 60.\n     */\n    lookupRate(entry: string, window: 1 | 10 | 60): number;\n    /**\n     * Look up the current count for an entry over a given duration.\n     *\n     * @param entry The entry to look up.\n     * @param duration The duration in seconds to look up alongside the entry.\n     * @returns The count for the given entry and duration.\n     * @throws `TypeError` if `duration` is not 10, 20, 30, 40, 50, or 60.\n     */\n    lookupCount(entry: string, duration: 10 | 20 | 30 | 40 | 50 | 60): number;\n  }\n}\n"
  },
  {
    "path": "types/env.d.ts",
    "content": "declare module 'fastly:env' {\n  /**\n   * Function to get the value for the provided environment variable name.\n   *\n   * For a list of available environment variables, see the [Fastly Developer Hub for Compute Environment Variables](https://developer.fastly.com/reference/compute/ecp-env/)\n   *\n   * **Note**: The environment variables can only be retrieved when processing requests, not during build-time initialization.\n   *\n   * @param name The name of the environment variable\n   *\n   * @example\n   * <script async defer src=\"https://fiddle.fastly.dev/embed.js\"></script>\n   * In this example we log to stdout the environment variables `FASTLY_HOSTNAME` and `FASTLY_TRACE_ID`.\n   *\n   * <script type=\"application/json+fiddle\">\n   * {\n   *   \"type\": \"javascript\",\n   *   \"title\": \"Environment Variable Example\",\n   *   \"origins\": [\n   *     \"https://http-me.fastly.dev\"\n   *   ],\n   *   \"src\": {\n   *     \"deps\": \"{\\n  \\\"@fastly/js-compute\\\": \\\"^0.7.0\\\"\\n}\",\n   *     \"main\": \"/// <reference types=\\\"@fastly/js-compute\\\" />\\nimport { env } from \\\"fastly:env\\\";\\n\\nfunction app(event) {\\n  console.log(\\\"FASTLY_HOSTNAME:\\\", env(\\\"FASTLY_HOSTNAME\\\"));\\n  console.log(\\\"FASTLY_TRACE_ID:\\\", env(\\\"FASTLY_TRACE_ID\\\"));\\n\\n  return new Response(\\\"\\\", {\\n    status: 200\\n  });\\n}\\n\\naddEventListener(\\\"fetch\\\", event => event.respondWith(app(event)));\\n\"\n   *   },\n   *   \"requests\": [\n   *     {\n   *       \"enableCluster\": true,\n   *       \"enableShield\": false,\n   *       \"enableWAF\": false,\n   *       \"method\": \"GET\",\n   *       \"path\": \"/status=200\",\n   *       \"useFreshCache\": false,\n   *       \"followRedirects\": false,\n   *       \"tests\": \"\",\n   *       \"delay\": 0\n   *     }\n   *   ],\n   *   \"srcVersion\": 26\n   * }\n   * </script>\n   * <noscript>\n   * ```js\n   * /// <reference types=\"@fastly/js-compute\" />\n   * import { env } from \"fastly:env\";\n   *\n   * function app(event) {\n   *   console.log(\"FASTLY_HOSTNAME:\", env(\"FASTLY_HOSTNAME\"));\n   *   console.log(\"FASTLY_TRACE_ID:\", env(\"FASTLY_TRACE_ID\"));\n   *\n   *   return new Response(\"\", {\n   *     status: 200\n   *   });\n   * }\n   *\n   * addEventListener(\"fetch\", event => event.respondWith(app(event)));\n   * ```\n   * </noscript>\n   */\n  function env(name: string): string;\n}\n"
  },
  {
    "path": "types/experimental.d.ts",
    "content": "/**\n * @experimental\n */\ndeclare module 'fastly:experimental' {\n  import type { enforceExplicitBackends } from 'fastly:backend';\n\n  /**\n   * JavaScript SDK version string for the JS runtime engine build.\n   *\n   * @experimental\n   * @hidden\n   */\n  export const sdkVersion: string;\n  /**\n   * @experimental\n   * @hidden\n   */\n  export function setBaseURL(base: URL | null | undefined): void;\n  /**\n   * Set the default backend to use when dynamic backends are disabled.\n   *\n   * For backwards compatibility, unless `allowDynamicBackends` has been explicitly\n   * called before invoking this function, it will disable dynamic backends when\n   * it is called, as if calling `allowDynamicBackends(false)`.\n   *\n   * @param backend The name of the default backend.\n   * @experimental\n   * @deprecated Use {@link enforceExplicitBackends} instead.\n   */\n  export function setDefaultBackend(backend: string): void;\n  /**\n   * Causes the Fastly Compute JS runtime environment to log debug information to stdout.\n   *\n   * **Note**: This is mostly for internal debugging purposes and will generate highly unstable\n   * output.\n   * @experimental\n   * @hidden\n   */\n  export function enableDebugLogging(enabled: boolean): void;\n\n  /**\n   * Embed a file as a Uint8Array.\n   *\n   * **Note**: Can only be used during build-time initialization, not when processing requests.\n   *\n   * @param path The path to include, relative to the project's top-level directory.\n   * @experimental\n   */\n  export function includeBytes(path: string): Uint8Array<ArrayBuffer>;\n\n  /**\n   * Control whether or not Dynamic Backends are allowed within this Fastly\n   * Compute service.\n   *\n   * By default, Dynamic Backends are disabled within a JavaScript application\n   * as it can be a potential avenue for third-party JavaScript code to send\n   * requests, potentially including sensitive/secret data, off to destinations\n   * that the JavaScript project was not intending, which could be a security\n   * issue.\n   *\n   * **Note**: This feature is disabled by default for Fastly Services. Please\n   * contact [Fastly Support](https://support.fastly.com/hc/en-us/requests/new?ticket_form_id=360000269711)\n   * to request the feature be enabled on the Fastly Services which require\n   * Dynamic Backends.\n   *\n   * @param enabled Whether or not to allow Dynamic Backends.\n   * @experimental\n   * @deprecated Use {@link enforceExplicitBackends} instead.\n   */\n  export function allowDynamicBackends(enabled: boolean): void;\n  /**\n   * Enable Dynamic Backends with default timeout configuration.\n   *\n   * @param defaultConfig Default timeout configuration for dynamic backends.\n   * @throws `RangeError` if any timeout value is negative or greater than or\n   *   equal to 2^32.\n   * @experimental\n   * @deprecated Use {@link enforceExplicitBackends} instead.\n   */\n  export function allowDynamicBackends(defaultConfig: {\n    /** Maximum duration in milliseconds to wait for a connection to be established. */\n    connectTimeout?: number;\n    /** Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent. */\n    firstByteTimeout?: number;\n    /** Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. */\n    betweenBytesTimeout?: number;\n  }): void;\n\n  /**\n   * Get information about an error as a ready-to-print array.\n   * This includes the error name, message, and a call stack.\n   *\n   * If `--enable-stack-traces` is specified during the build, the call stack\n   * will be mapped using source maps. If `--enable-stack-traces` is specified\n   * and `--exclude-sources` is not, this will also include a code dump of\n   * neighboring lines of user code.\n   *\n   * @param error The error to retrieve information about. If a string is\n   *   provided, it is first converted to an `Error`.\n   * @version 3.37.0\n   */\n  export function mapError(error: Error | string): (Error | string)[];\n\n  /**\n   * Calls {@link mapError} and outputs the results to stderr.\n   *\n   * @param error The error to map and log. If a string is provided, it is\n   *   first converted to an `Error`.\n   * @version 3.37.0\n   */\n  export function mapAndLogError(error: Error | string): void;\n\n  /**\n   * @version 3.40.0\n   */\n  export interface ReusableSandboxOptions {\n    /**\n     * The maximum number of requests to handle with a single sandbox instance\n     * before it is recycled. Default is 1. A value of 0 means no maximum.\n     */\n    maxRequests?: number;\n    /**\n     * The maximum time in milliseconds to wait for the next request before\n     * recycling the sandbox. Default is up to the platform.\n     */\n    betweenRequestTimeoutMs?: number;\n    /**\n     * The maximum memory in MiB that the sandbox is allowed to use. If\n     * exceeded, the sandbox will be recycled before the next request.\n     * Default is no limit.\n     */\n    maxMemoryMiB?: number;\n    /**\n     * The maximum time in milliseconds that a sandbox is allowed to run\n     * before it is recycled after handling the current request. Default is\n     * no timeout.\n     */\n    sandboxTimeoutMs?: number;\n  }\n  /**\n   * Configure reuse of the same underlying sandbox for multiple requests,\n   * which can improve performance by avoiding the overhead of initializing a\n   * new sandbox for each request.\n   *\n   * **Note**: Can only be used during build-time initialization, not when\n   * processing requests.\n   *\n   * @param options Configuration options for sandbox reuse.\n   * @experimental\n   * @version 3.40.0\n   */\n  export function setReusableSandboxOptions(\n    options: ReusableSandboxOptions,\n  ): void;\n}\n"
  },
  {
    "path": "types/fanout.d.ts",
    "content": "/// <reference path=\"globals.d.ts\" />\n\ndeclare module 'fastly:fanout' {\n  /**\n   * Creates a {@link Response} that instructs Fastly to pass the original\n   * request through [Fanout](https://www.fastly.com/documentation/guides/concepts/real-time-messaging/fanout/)\n   * to the declared backend.\n   *\n   * **Note**: Can only be used when processing requests, not during build-time\n   * initialization.\n   *\n   * @example\n   * ```js\n   * import { createFanoutHandoff } from \"fastly:fanout\";\n   *\n   * async function handleRequest(event) {\n   *   const url = new URL(event.request.url);\n   *   if (url.pathname === \"/stream\") {\n   *     return createFanoutHandoff(event.request, \"my-backend\");\n   *   }\n   *   return new Response(\"Not found\", { status: 404 });\n   * }\n   *\n   * addEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n   * ```\n   *\n   * @param request The request to pass through Fanout.\n   * @param backend The name of the backend that Fanout should send the request\n   * to. The name must be between 1 and 254 characters inclusive.\n   * @returns A {@link Response} that can be passed to `event.respondWith`.\n   * @throws `Error` if `request` is not a {@link Request} instance, or\n   * if `backend` is an empty string or longer than 254 characters.\n   */\n  function createFanoutHandoff(request: Request, backend: string): Response;\n}\n"
  },
  {
    "path": "types/geolocation.d.ts",
    "content": "declare module 'fastly:geolocation' {\n  /**\n   * Retrieve geolocation information about the given IP address.\n   *\n   * **Note**: Can only be used when processing requests, not during build-time\n   * initialization.\n   *\n   * @example\n   * ```js\n   * import { getGeolocationForIpAddress } from \"fastly:geolocation\";\n   *\n   * async function app(event) {\n   *   const ip =\n   *     new URL(event.request.url).searchParams.get(\"ip\") ||\n   *     event.client.address;\n   *   const geo = getGeolocationForIpAddress(ip);\n   *   return new Response(JSON.stringify(geo), {\n   *     headers: { \"Content-Type\": \"application/json\" },\n   *   });\n   * }\n   *\n   * addEventListener(\"fetch\", (event) => event.respondWith(app(event)));\n   * ```\n   * @fiddle meta\n   * {\n   *   \"title\": \"Geolocation Example\",\n   *   \"request\": \"/status=200\"\n   * }\n   *\n   * @param address The IPv4 or IPv6 address to query.\n   * @returns A {@link Geolocation} object, or `null` if no geolocation data is\n   * available for the address.\n   * @throws {Error} If `address` is not a valid IPv4 or IPv6 address.\n   */\n  function getGeolocationForIpAddress(address: string): Geolocation | null;\n  /**\n   * [Fastly Geolocation](https://developer.fastly.com/reference/vcl/variables/geolocation/)\n   * information about an IP address.\n   *\n   * Can be retrieved for the incoming request's client IP address using the\n   * {@link ClientInfo.geo} accessor, and for arbitrary addresses using\n   * {@link geolocation!getGeolocationForIpAddress | getGeolocationForIpAddress}.\n   */\n  interface Geolocation {\n    /**\n     * The name of the organization associated with `as_number`.\n     *\n     * For example, fastly is the value given for IP addresses under AS-54113.\n     */\n    as_name: string | null;\n\n    /**\n     * [Autonomous system](https://en.wikipedia.org/wiki/Autonomous_system_(Internet)) (AS) number.\n     */\n    as_number: number | null;\n\n    /**\n     * The telephone area code associated with an IP address.\n     *\n     * These are only available for IP addresses in the United States, its territories, and Canada.\n     */\n    area_code: number | null;\n\n    /**\n     * City or town name.\n     */\n    city: string | null;\n\n    /**\n     * Connection speed.\n     */\n    conn_speed: string | null;\n\n    /**\n     * Connection type.\n     */\n    conn_type: string | null;\n\n    /**\n     * Continent.\n     */\n    continent: string | null;\n\n    /**\n     * A two-character [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) country code for the country associated with an IP address.\n     *\n     * The US country code is returned for IP addresses associated with overseas United States military bases.\n     *\n     * These values include subdivisions that are assigned their own country codes in ISO 3166-1. For example, subdivisions NO-21 and NO-22 are presented with the country code SJ for Svalbard and the Jan Mayen Islands.\n     */\n    country_code: string | null;\n\n    /**\n     * A three-character [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) country code for the country associated with the IP address.\n     *\n     * The USA country code is returned for IP addresses associated with overseas United States military bases.\n     */\n    country_code3: string | null;\n\n    /**\n     * Country name.\n     *\n     * This field is the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) English short name for a country.\n     */\n    country_name: string | null;\n\n    /**\n     * Time zone offset from Greenwich Mean Time (GMT) for `city`.\n     */\n    gmt_offset: string | null;\n\n    /**\n     * Latitude, in units of degrees from the equator.\n     *\n     * Values range from -90.0 to +90.0 inclusive, and are based on the [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System) coordinate reference system.\n     */\n    latitude: number | null;\n\n    /**\n     * Longitude, in units of degrees from the [IERS Reference Meridian](https://en.wikipedia.org/wiki/IERS_Reference_Meridian).\n     *\n     * Values range from -180.0 to +180.0 inclusive, and are based on the [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System) coordinate reference system.\n     */\n    longitude: number | null;\n\n    /**\n     * Metro code, representing designated market areas (DMAs) in the United States.\n     */\n    metro_code: number | null;\n\n    /**\n     * The postal code associated with the IP address.\n     *\n     * These are available for some IP addresses in Australia, Canada, France, Germany, Italy, Spain, Switzerland, the United Kingdom, and the United States.\n     *\n     * For Canadian postal codes, this is the first 3 characters. For the United Kingdom, this is the first 2-4 characters (outward code). For countries with alphanumeric postal codes, this field is a lowercase transliteration.\n     */\n    postal_code: string | null;\n\n    /**\n     * Client proxy description.\n     */\n    proxy_description: string | null;\n\n    /**\n     * Client proxy type.\n     */\n    proxy_type: string | null;\n\n    /**\n     * [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) country subdivision code.\n     *\n     * For countries with multiple levels of subdivision (for example, nations within the United Kingdom), this variable gives the more specific subdivision.\n     *\n     * This field can be `null` for countries that do not have ISO country subdivision codes. For example, `null` is given for IP addresses assigned to the Åland Islands (country code AX).\n     */\n    region: string | null;\n\n    /**\n     * Time zone offset from coordinated universal time (UTC) for `city`.\n     */\n    utc_offset: number | null;\n  }\n}\n"
  },
  {
    "path": "types/globals.d.ts",
    "content": "/**\n * @group Web APIs\n */\ndeclare var self: typeof globalThis;\n\n/**\n * @group DOM Events\n */\ninterface EventMap {\n  fetch: FetchEvent;\n}\n\n/**\n * @group DOM Events\n */\ninterface EventListenerMap {\n  fetch: FetchEventListener;\n}\n\n/**\n * @group DOM Events\n */\ninterface FetchEventListener {\n  (this: typeof globalThis, event: FetchEvent): any;\n}\n/**\n * @group DOM Events\n */\ndeclare var onfetch: FetchEventListener;\n\n/**\n * This is a fetch specific implementation of [addEventListener](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener), and is very similar to [handling FetchEvent from a Service Worker](https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/request).\n *\n * For Fastly Compute, this will be the entrypoint in handling your downstream request from your client.\n * @group DOM Events\n */\ndeclare function addEventListener<K extends keyof EventMap>(\n  type: K,\n  listener: EventListenerMap[K],\n): void;\n\n/**\n * @deprecated This has moved to {@link \"fastly:backend\".BackendConfiguration} - This global variable will be removed in the next major version.\n * @hidden\n */\ndeclare interface BackendConfiguration {\n  /**\n   * The name of the backend.\n   * @deprecated to avoid name collisions it is recommended to use auto-generated names by omitting this property.\n   */\n  name?: string;\n  /**\n   * A hostname, IPv4, or IPv6 address for the backend as well as an optional port.\n   * E.G. \"hostname\", \"ip address\", \"hostname:port\", or \"ip address:port\"\n   */\n  target: string;\n  /**\n   * If set, will force the HTTP Host header on connections to this backend to be the supplied value.\n   */\n  hostOverride?: string;\n  /**\n   * Maximum duration in milliseconds to wait for a connection to this backend to be established.\n   * If exceeded, the connection is aborted and a 503 response will be presented instead.\n   * Defaults to 1,000 milliseconds.\n   */\n  connectTimeout?: number;\n  /**\n   * Maximum duration in milliseconds to wait for the server response to begin after a TCP connection is established and the request has been sent.\n   * If exceeded, the connection is aborted and a 503 response will be presented instead.\n   * Defaults to 15,000 milliseconds.\n   */\n  firstByteTimeout?: number;\n  /**\n   * Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend.\n   * If exceeded, the response received so far will be considered complete and the fetch will end.\n   * Defaults to 10,000 milliseconds.\n   */\n  betweenBytesTimeout?: number;\n  /**\n   * Whether or not to require TLS for connections to this backend.\n   */\n  useSSL?: boolean;\n  /**\n   * Minimum allowed TLS version on SSL connections to this backend.\n   * If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n   */\n  tlsMinVersion?: number;\n  /**\n   * Maximum allowed TLS version on SSL connections to this backend.\n   * If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n   */\n  tlsMaxVersion?: number;\n  /**\n   * Define the hostname that the server certificate should declare.\n   */\n  certificateHostname?: string;\n  /**\n   * The CA certificate to use when checking the validity of the backend.\n   */\n  caCertificate?: string;\n  /**\n   * List of OpenSSL ciphers to support for connections to this origin.\n   * If the backend server is not able to negotiate a connection meeting this constraint, a 503 response will be presented instead.\n   */\n  ciphers?: string;\n  /**\n   * The SNI hostname to use on connections to this backend.\n   */\n  sniHostname?: string;\n  /**\n   * @experimental\n   *\n   * When enabled, sets that this backend is to be used for gRPC traffic.\n   *\n   * Warning: When using this experimental feature, no guarantees are provided for behaviours for\n   * backends that do not provide gRPC traffic.\n   */\n  grpc?: boolean;\n  /**\n   * Set the client certificate to be provided to the server during the initial TLS handshake.\n   *\n   * @throws {TypeError} Throws a TypeError if the value is not an object of the correct type.\n   */\n  clientCertificate?: {\n    certificate: string;\n    key: import('fastly:secret-store').SecretStoreEntry;\n  };\n\n  /**\n   * Enables and sets the HTTP keepalive time in milliseconds for the backend.\n   */\n  httpKeepalive?: number;\n\n  /**\n   * Enables and sets the TCP keep alive options for the backend.\n   * Setting to boolean true enables keepalive with the default options.\n   */\n  tcpKeepalive?:\n    | boolean\n    | {\n        /**\n         * Configure how long to wait after the last sent data over the TCP connection before\n         * starting to send TCP keepalive probes.\n         */\n        timeSecs?: number;\n\n        /**\n         * Configure how long to wait between each TCP keepalive probe sent to the backend to determine if it is still active.\n         */\n        intervalSecs?: number;\n\n        /**\n         * Number of probes to send to the backend before it is considered dead.\n         */\n        probes?: number;\n      };\n}\n\n/**\n* Class for creating new [Fastly Backends](https://developer.fastly.com/reference/api/services/backend/).\n*\n* **Note**: Can only be used when processing requests, not during build-time initialization.\n* @deprecated This has moved to {@link \"fastly:backend\".Backend} - This global variable will be removed in the next major version.\n@hidden\n*/\ndeclare class Backend {\n  /**\n   * Creates a new Backend instance\n   *\n   * @example\n   * Construct a new backend with all properties set to their default values:\n   * ```js\n   * const myBackend = new Backend({ name: 'fastly', target: 'www.fastly.com'});\n   * ```\n   */\n  constructor(configuration: BackendConfiguration);\n\n  /**\n   * The name of the backend\n   */\n  readonly name: string;\n\n  /**\n   * Whether this backend was dynamically created by the running service.\n   */\n  readonly isDynamic: boolean;\n  /**\n   * The host target for the backend\n   */\n  readonly target: string;\n  /**\n   * The host header override defined for the backend.\n   *\n   * See https://docs.fastly.com/en/guides/specifying-an-override-host for more information.\n   */\n  readonly hostOverride: string;\n  /**\n   * The backend port\n   */\n  readonly port: number;\n  /**\n   * The connect timeout for the backend in milliseconds, if available.\n   */\n  readonly connectTimeout: number | null;\n  /**\n   * The first byte timeout for the backend in milliseconds, if available.\n   */\n  readonly firstByteTimeout: number | null;\n  /**\n   * The between bytes timeout for the backend in milliseconds, if available.\n   */\n  readonly betweenBytesTimeout: number | null;\n  /**\n   * The HTTP keepalive time for the backend in milliseconds.\n   */\n  readonly httpKeepaliveTime: number;\n  /**\n   * The TCP keepalive configuration, if TCP keepalive is enabled.\n   */\n  readonly tcpKeepalive: null | {\n    /**\n     * The keepalive time in seconds.\n     */\n    timeSecs: number;\n    /**\n     * The interval in seconds between probes.\n     */\n    intervalSecs: number;\n    /**\n     * The number of probes to send before terminating the keepalive.\n     */\n    probes: number;\n  };\n  /**\n   * Whether the backend is configured to use SSL.\n   */\n  readonly isSSL: boolean;\n  /**\n   * The minimum SSL version number this backend will use, if available.\n   */\n  readonly tlsMinVersion: 1 | 1.1 | 1.2 | 1.3 | null;\n  /**\n   * The maximum SSL version number this backend will use, if available.\n   */\n  readonly tlsMaxversion: 1 | 1.1 | 1.2 | 1.3 | null;\n\n  /**\n   * Get the health of this backend.\n   */\n  health(): 'healthy' | 'unhealthy' | 'unknown';\n\n  /**\n   * Returns the name associated with the Backend instance.\n   * @deprecated Use `backend.name` instead.\n   */\n  toName(): string;\n\n  /**\n   * Returns the name associated with the Backend instance.\n   *\n   * @deprecated Use `backend.name` instead.\n   */\n  toString(): string;\n\n  /**\n   * Returns a boolean indicating if a Backend with the given name exists or not.\n   */\n  static exists(name: string): boolean;\n\n  /**\n   * Returns the Backend instance with the given name, if one exists. If one does not exist, an error is thrown.\n   */\n  static fromName(name: string): Backend;\n\n  /**\n   * Returns a string representing the health of the given Backend instance.\n   * Possible values are:\n   *\n   * \"healthy\" - The backend's health check has succeeded, indicating the backend is working as expected and should receive requests.\n   * \"unhealthy\" - The backend's health check has failed, indicating the backend is not working as expected and should not receive requests.\n   * \"unknown\" - The backend does not have a health check configured.\n   *\n   * @deprecated Use `backend.health()` ({@link Backend.prototype.health}) instead.\n   */\n  static health(backend: Backend): 'healthy' | 'unhealthy' | 'unknown';\n}\n\n/**\n * A Fastly Compute specific implementation of [FetchEvent](https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/FetchEvent).\n * @group DOM Events\n */\n/**\n * The event type for `fetch` events dispatched to a Fastly Compute service.\n *\n * Contains information about the incoming request, the downstream client, and\n * the server. Use {@link FetchEvent.respondWith | respondWith} to send a\n * response back to the client.\n *\n * @group DOM Events\n */\ndeclare interface FetchEvent {\n  /**\n   * Information about the downstream client that made the request.\n   */\n  readonly client: ClientInfo;\n\n  /**\n   * Information about the server which received the request.\n   */\n  readonly server: ServerInfo;\n  /**\n   * The downstream request that came from the client\n   */\n  readonly request: Request;\n\n  /**\n   * Send a response back to the client.\n   *\n   * **Note**: The service will be kept alive until the response has been fully sent.\n   *\n   * If the response contains a streaming body created by the service itself, then the service\n   * will be kept alive until the body {@link ReadableStream} has been closed or errored.\n   *\n   * However, if the body is a stream originating in a request to a backend, i.e. if a backend\n   * response's {@link Response.body} is passed as input to the {@link Response} constructor, the\n   * service will not be kept alive until sending the body has finished.\n   *\n   * **Note**: If `response` is a `Promise`, the service will be kept alive until the\n   * response has been resolved or rejected, and the {@link Response} it resolved to has been\n   * fully sent.\n   *\n   * **Note**: Use {@link FetchEvent.waitUntil} to extend the service's lifetime further if\n   * necessary.\n   *\n   * @param response - Response to send back down to the client\n   */\n  respondWith(response: Response | PromiseLike<Response>): void;\n\n  /**\n   * Send a [103 Early Hints](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/103)\n   * response back to the client.\n   *\n   * Must be called before {@link FetchEvent.respondWith | respondWith}.\n   *\n   * @example\n   * ```js\n   * event.sendEarlyHints({ link: \"</style.css>; rel=preload; as=style\" });\n   *\n   * event.sendEarlyHints([\n   *   [\"link\", \"</style.css>; rel=preload; as=style\"],\n   *   [\"link\", \"</script.js>; rel=preload; as=script\"],\n   * ]);\n   * ```\n   *\n   * @param headers Headers to send back down to the client.\n   * @version 3.36.0\n   */\n  sendEarlyHints(headers: HeadersInit): void;\n\n  /**\n   * Extend the service's lifetime to ensure asynchronous operations succeed.\n   *\n   * By default, a service will shut down as soon as the response passed to\n   * {@link FetchEvent.respondWith | respondWith} has been sent. `waitUntil` can be used to\n   * ensure that the service will stay alive until additional asynchronous operations have\n   * completed, such as sending telemetry data to a separate backend after the response has\n   * been sent.\n   *\n   * Must be initially called synchronously within the event callback, but after that it\n   * can be called multiple times.\n   *\n   * @param promise The `Promise` to wait for.\n   */\n  waitUntil(promise: Promise<any>): void;\n}\n\n/**\n * Set the cache override mode on a request\n *\n * None\n *   Do not override the behavior specified in the origin response’s cache control headers.\n * Pass\n *   Do not cache the response to this request, regardless of the origin response’s headers.\n * Override\n *   Override particular cache control settings using a {@linkcode CacheOverride} object.\n *\n * The origin response’s cache control headers will be used for ttl and stale_while_revalidate if None.\n *\n * @deprecated This has moved to {@link \"fastly:cache-override\".CacheOverrideMode} - This global type will be removed in the next major version.\n * @hidden\n */\ndeclare type CacheOverrideMode = 'none' | 'pass' | 'override';\n\n/**\n * Base class for Cache Override, which is used to configure caching behavior.\n * @deprecated This has moved to {@link \"fastly:cache-override\".CacheOverrideInit} - This global interface will be removed in the next major version.\n * @hidden\n */\ndeclare interface CacheOverrideInit {\n  /**\n   * Override the caching behavior of this request to use the given Time to Live (TTL), in seconds.\n   */\n  ttl?: number;\n  /**\n   * Override the caching behavior of this request to use the given `stale-while-revalidate` time,\n   * in seconds\n   */\n  swr?: number;\n  /**\n   * Override the caching behavior of this request to include the given surrogate key, provided as\n   * a header value.\n   *\n   * See the [Fastly surrogate keys guide](https://docs.fastly.com/en/guides/purging-api-cache-with-surrogate-keys)\n   * for details.\n   */\n  surrogateKey?: string;\n  /**\n   * Override the caching behavior of this request to enable or disable PCI/HIPAA-compliant\n   * non-volatile caching.\n   *\n   * By default, this is false, which means the request may not be PCI/HIPAA-compliant. Set it to\n   * true to enable compliant caching.\n   *\n   * See the [Fastly PCI-Compliant Caching and Delivery documentation](https://docs.fastly.com/products/pci-compliant-caching-and-delivery)\n   * for details.\n   */\n  pci?: boolean;\n}\n\n/**\n * Configures the caching behavior of a {@linkcode Response}.\n *\n * Normally, the HTTP Headers on a Response would control how the Response is cached,\n * but CacheOverride can be set on a {@linkcode Request}, to define custom caching behavior.\n *\n * @deprecated This has moved to {@link \"fastly:cache-override\".CacheOverride} - This global interface will be removed in the next major version.\n * @hidden\n */\ndeclare interface CacheOverride extends CacheOverrideInit {\n  mode: CacheOverrideMode;\n}\n\n/**\n * @deprecated This has moved to {@link \"fastly:cache-override\".CacheOverride} - This global variable will be removed in the next major version.\n * @hidden\n */\ndeclare var CacheOverride: {\n  prototype: CacheOverride;\n  new (mode: CacheOverrideMode, init?: CacheOverrideInit): CacheOverride;\n};\n\n/**\n * Information about the downstream client making the request to the Fastly Compute service.\n */\ndeclare interface ClientInfo {\n  /**\n   * A UUID generated by Fastly Compute for each request.\n   * @version 3.40.1\n   */\n  readonly requestId: string;\n  /**\n   * A string representation of the IPv4 or IPv6 address of the downstream client.\n   */\n  readonly address: string;\n  /**\n   * Geolocation data for the client IP address, or `null` if unavailable.\n   */\n  readonly geo: import('fastly:geolocation').Geolocation | null;\n  /**\n   * The JA3 hash of the TLS ClientHello message, or `null` if unavailable.\n   * @version 3.2.1\n   */\n  readonly tlsJA3MD5: string | null;\n  /**\n   * The JA4 fingerprint of the TLS ClientHello message, or `null` if unavailable.\n   * @version 3.37.0\n   */\n  readonly tlsJA4: string | null;\n  /**\n   * The HTTP/2 fingerprint for HTTP/2 connections, or `null` for HTTP/1.1\n   * connections or when unavailable.\n   * @version 3.37.0\n   */\n  readonly h2Fingerprint: string | null;\n  /**\n   * The Original Header fingerprint based on the order and presence of request\n   * headers, or `null` if unavailable.\n   * @version 3.37.0\n   */\n  readonly ohFingerprint: string | null;\n  /**\n   * The cipher suite used to secure the client TLS connection, or `null` if\n   * unavailable.\n   * @version 3.2.1\n   */\n  readonly tlsCipherOpensslName: string | null;\n  /**\n   * The TLS protocol version used to secure the client TLS connection, or\n   * `null` if unavailable.\n   * @version 3.2.1\n   */\n  readonly tlsProtocol: string | null;\n  /**\n   * The raw client certificate from the mutual TLS handshake in PEM format,\n   * or `null` if unavailable. Returns an empty `ArrayBuffer` if the connection\n   * is not mTLS.\n   * @version 3.2.1\n   */\n  readonly tlsClientCertificate: ArrayBuffer | null;\n  /**\n   * The raw bytes sent by the client in the TLS ClientHello message, or\n   * `null` if unavailable.\n   * @version 3.2.1\n   */\n  readonly tlsClientHello: ArrayBuffer | null;\n}\n\n/**\n * Information about the server receiving the request for the Fastly Compute service.\n */\ndeclare interface ServerInfo {\n  /**\n   * A string representation of the IPv4 or IPv6 address of the server which received the request.\n   */\n  readonly address: string;\n}\n\n/**\n * Class for accessing [Fastly Edge Dictionaries](https://docs.fastly.com/en/guides/about-edge-dictionaries).\n *\n * **Note**: Can only be used when processing requests, not during build-time initialization.\n *\n * @deprecated This has moved to {@link \"fastly:config-store\".ConfigStore} - This global class will be removed in the next major version.\n * @hidden\n */\ndeclare class ConfigStore {\n  /**\n   * Creates a new ConfigStore object\n   */\n  constructor(name: string);\n  /**\n   * Get a value for a key in the config-store.\n   */\n  get(key: string): string;\n}\n\n/**\n * Class for accessing [Fastly Edge Dictionaries](https://docs.fastly.com/en/guides/about-edge-dictionaries).\n *\n * **Note**: Can only be used when processing requests, not during build-time initialization.\n * @deprecated This has moved to {@link \"fastly:dictionary\".Dictionary} - This global class will be removed in the next major version.\n * @hidden\n */\ndeclare class Dictionary {\n  /**\n   * Creates a new Dictionary object, and opens an edge dictionary to query\n   */\n  constructor(name: string);\n  /**\n   * Get a value for a key in the dictionary\n   */\n  get(key: string): string;\n}\n\n/**\n * [Fastly Geolocation](https://developer.fastly.com/reference/vcl/variables/geolocation/)\n * information about an IP address\n *\n * Can be retrieved for the incoming request's client IP address using the\n * {@linkcode ClientInfo#geo} accessor, and for arbitrary addresses using\n * {@linkcode Fastly.getGeolocationForIpAddress}.\n * @deprecated This has moved to {@link \"fastly:geolocation\".Geolocation} - This global interface will be removed in the next major version.\n * @hidden\n */\ndeclare interface Geolocation {\n  /**\n   * The name of the organization associated with as_number.\n   *\n   * For example, fastly is the value given for IP addresses under AS-54113.\n   */\n  as_name: string | null;\n\n  /**\n   * [Autonomous system](https://en.wikipedia.org/wiki/Autonomous_system_(Internet)) (AS) number.\n   */\n  as_number: number | null;\n\n  /**\n   * The telephone area code associated with an IP address.\n   *\n   * These are only available for IP addresses in the United States, its territories, and Canada.\n   */\n  area_code: number | null;\n\n  /**\n   * City or town name.\n   */\n  city: string | null;\n\n  /**\n   * Connection speed.\n   */\n  conn_speed: string | null;\n\n  /**\n   * Connection type.\n   */\n  conn_type: string | null;\n\n  /**\n   * Continent.\n   */\n  continent: string | null;\n\n  /**\n   * A two-character [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) country code for the country associated with an IP address.\n   *\n   * The US country code is returned for IP addresses associated with overseas United States military bases.\n   *\n   * These values include subdivisions that are assigned their own country codes in ISO 3166-1. For example, subdivisions NO-21 and NO-22 are presented with the country code SJ for Svalbard and the Jan Mayen Islands.\n   */\n  country_code: string | null;\n\n  /**\n   * A three-character [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) country code for the country associated with the IP address.\n   *\n   * The USA country code is returned for IP addresses associated with overseas United States military bases.\n   */\n  country_code3: string | null;\n\n  /**\n   * Country name.\n   *\n   * This field is the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) English short name for a country.\n   */\n  country_name: string | null;\n\n  /**\n   * Time zone offset from Greenwich Mean Time (GMT) for `city`.\n   */\n  gmt_offset: string | null;\n\n  /**\n   * Latitude, in units of degrees from the equator.\n   *\n   * Values range from -90.0 to +90.0 inclusive, and are based on the [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System) coordinate reference system.\n   */\n  latitude: number | null;\n\n  /**\n   * Longitude, in units of degrees from the [IERS Reference Meridian](https://en.wikipedia.org/wiki/IERS_Reference_Meridian).\n   *\n   * Values range from -180.0 to +180.0 inclusive, and are based on the [WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System) coordinate reference system.\n   */\n  longitude: number | null;\n\n  /**\n   * Metro code, representing designated market areas (DMAs) in the United States.\n   */\n  metro_code: number | null;\n\n  /**\n   * The postal code associated with the IP address.\n   *\n   * These are available for some IP addresses in Australia, Canada, France, Germany, Italy, Spain, Switzerland, the United Kingdom, and the United States.\n   *\n   * For Canadian postal codes, this is the first 3 characters. For the United Kingdom, this is the first 2-4 characters (outward code). For countries with alphanumeric postal codes, this field is a lowercase transliteration.\n   */\n  postal_code: string | null;\n\n  /**\n   * Client proxy description.\n   */\n  proxy_description: string | null;\n\n  /**\n   * Client proxy type.\n   */\n  proxy_type: string | null;\n\n  /**\n   * [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) country subdivision code.\n   *\n   * For countries with multiple levels of subdivision (for example, nations within the United Kingdom), this variable gives the more specific subdivision.\n   *\n   * This field can be None for countries that do not have ISO country subdivision codes. For example, None is given for IP addresses assigned to the Åland Islands (country code AX, illustrated below).\n   */\n  region: string | null;\n\n  /**\n   * Time zone offset from coordinated universal time (UTC) for `city`.\n   */\n  utc_offset: number | null;\n}\n\n/**\n * Class for accessing a [Fastly KV Store](https://developer.fastly.com/reference/api/kv-store/).\n *\n * A KV Store is a persistent, globally consistent key-value store.\n *\n * **Note**: Can only be used when processing requests, not during build-time initialization.\n * @deprecated This has moved to {@link \"fastly:kv-store\".KVStore} - This global class will be removed in the next major version.\n * @hidden\n */\ndeclare class KVStore {\n  /**\n   * Creates a new JavaScript KVStore object which interacts with the Fastly KV Store named `name`.\n   *\n   * @param name Name of the Fastly KV Store to interact with. A name cannot be empty, contain Control characters, or be longer than 255 characters.\n   */\n  constructor(name: string);\n  /**\n   * Gets the value associated with the key `key` in the KV Store.\n   * When the key is present, a resolved Promise containing an KVStoreEntry will be returned which contains the associated value.\n   * When the key is absent, a resolved Promise containing null is returned.\n   * @param key The key to retrieve from within the KV Store. A key cannot:\n   * - Be any of the strings \"\", \".\", or \"..\"\n   * - Start with the string \".well-known/acme-challenge/\"\"\n   * - Contain any of the characters \"#;?^|\\n\\r\"\n   * - Be longer than 1024 characters\n   */\n  get(key: string): Promise<KVStoreEntry | null>;\n\n  /**\n   * Write the value of `value` into the KV Store under the key `key`.\n   *\n   * Note: KV Store is eventually consistent, this means that the updated contents associated with the key `key` may not be available to read from all\n   * edge locations immediately and some edge locations may continue returning the previous contents associated with the key.\n   *\n   * @param key The key to associate with the value. A key cannot:\n   * - Be any of the strings \"\", \".\", or \"..\"\n   * - Start with the string \".well-known/acme-challenge/\"\"\n   * - Contain any of the characters \"#;?^|\\n\\r\"\n   * - Be longer than 1024 characters\n   * @param value The value to store within the KV Store.\n   */\n  put(key: string, value: BodyInit): Promise<undefined>;\n}\n\n/**\n * Class for interacting with a [Fastly KV Store](https://developer.fastly.com/reference/api/kv-store/) entry.\n *\n * @deprecated This has moved to {@link \"fastly:kv-store\".KVStoreEntry} - This global interface will be removed in the next major version.\n * @hidden\n */\ndeclare interface KVStoreEntry {\n  /**\n   * A ReadableStream with the contents of the entry.\n   */\n  get body(): ReadableStream;\n  /**\n   * A boolean value that indicates whether the body has been read from already.\n   */\n  get bodyUsed(): boolean;\n  /**\n   * Reads the body and returns it as a promise that resolves with a string.\n   * The response is always decoded using UTF-8.\n   */\n  text(): Promise<string>;\n  /**\n   * Reads the body and returns it as a promise that resolves with the result of parsing the body text as JSON.\n   */\n  json(): Promise<object>;\n  /**\n   * Reads the body and returns it as a promise that resolves with an ArrayBuffer.\n   */\n  arrayBuffer(): Promise<ArrayBuffer>;\n  // And eventually formData and blob once we support them on Request and Response, too.\n}\n\n/**\n * The URL class as [specified by WHATWG](https://url.spec.whatwg.org/#url-class)\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/URL | URL on MDN}\n * @group Web APIs\n */\ndeclare class URL {\n  constructor(url: string, base?: string | URL);\n\n  get href(): string;\n  set href(V: string);\n\n  get origin(): string;\n\n  get protocol(): string;\n  set protocol(V: string);\n\n  get username(): string;\n  set username(V: string);\n\n  get password(): string;\n  set password(V: string);\n\n  get host(): string;\n  set host(V: string);\n\n  get hostname(): string;\n  set hostname(V: string);\n\n  get port(): string;\n  set port(V: string);\n\n  get pathname(): string;\n  set pathname(V: string);\n\n  get search(): string;\n  set search(V: string);\n\n  get searchParams(): URLSearchParams;\n\n  get hash(): string;\n  set hash(V: string);\n\n  toJSON(): string;\n\n  readonly [Symbol.toStringTag]: 'URL';\n}\n\n/**\n * The URLSearchParams class as [specified by WHATWG](https://url.spec.whatwg.org/#interface-urlsearchparams)\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams | URLSearchParams on MDN}\n * @group Web APIs\n */\ndeclare class URLSearchParams {\n  constructor(\n    init?:\n      | ReadonlyArray<readonly [name: string, value: string]>\n      | Iterable<readonly [name: string, value: string]>\n      | { readonly [name: string]: string }\n      | string,\n  );\n\n  append(name: string, value: string): void;\n  delete(name: string): void;\n  get(name: string): string | null;\n  getAll(name: string): string[];\n  has(name: string): boolean;\n  set(name: string, value: string): void;\n  sort(): void;\n\n  keys(): IterableIterator<string>;\n  values(): IterableIterator<string>;\n  entries(): IterableIterator<[name: string, value: string]>;\n  forEach<THIS_ARG = void>(\n    callback: (\n      this: THIS_ARG,\n      value: string,\n      name: string,\n      searchParams: this,\n    ) => void,\n    thisArg?: THIS_ARG,\n  ): void;\n\n  readonly [Symbol.toStringTag]: 'URLSearchParams';\n  [Symbol.iterator](): IterableIterator<[name: string, value: string]>;\n}\n\n/**\n * Interface for logging to stdout for\n * [live log monitoring](https://developer.fastly.com/learning/compute/testing/#live-log-monitoring-in-your-console).\n *\n * **Note**: This implementation accepts any number of arguments. String representations of each object are appended\n * together in the order listed and output. Unlike the `Console` built-in in browsers and Node.js, this implementation\n * does not perform string substitution.\n *\n * **Note**: Messages are prefixed with the respective log level, starting with an upper-case letter, e.g. `\"Log: \"`.\n * @group Console API\n */\ninterface Console {\n  assert(condition?: boolean, ...data: any[]): void;\n  clear(): void;\n  count(label?: string): void;\n  countReset(label?: string): void;\n  debug(...data: any[]): void;\n  dir(item?: any, options?: any): void;\n  dirxml(...data: any[]): void;\n  error(...data: any[]): void;\n  group(...data: any[]): void;\n  groupCollapsed(...data: any[]): void;\n  groupEnd(): void;\n  info(...data: any[]): void;\n  log(...data: any[]): void;\n  table(tabularData?: any, properties?: string[]): void;\n  time(label?: string): void;\n  timeEnd(label?: string): void;\n  timeLog(label?: string, ...data: any[]): void;\n  trace(...data: any[]): void;\n  warn(...data: any[]): void;\n}\n\n/**\n * The global {@linkcode Console} instance\n * @group Console API\n */\ndeclare var console: Console;\n\n/**\n * An implementation of the [WHATWG Encoding Standard](https://encoding.spec.whatwg.org/) `TextEncoder` API. All\n * instances of `TextEncoder` only support UTF-8 encoding.\n *\n * TextEncoder takes a stream of code points as input and emits a stream of UTF-8 bytes.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder | TextEncoder on MDN}\n * @example\n * ```js\n * const encoder = new TextEncoder();\n * const uint8array = encoder.encode('a string to encode');\n * ```\n * @group Encoding API\n */\ndeclare class TextEncoder {\n  /**\n   * Returns a newly constructed TextEncoder that will generate a byte stream with UTF-8 encoding.\n   */\n  constructor();\n  /**\n   * The TextEncoder.encoding read-only property returns a string containing the name of the encoding algorithm used by the specific encoder.\n   * It is always set to the value \"utf-8\".\n   */\n  readonly encoding: 'utf-8';\n  /**\n   * UTF-8 encodes the `input` string and returns a `Uint8Array` containing the encoded bytes.\n   * @param [input='an empty string'] The text to encode.\n   */\n  encode(input?: string): Uint8Array<ArrayBuffer>;\n  // /**\n  //  * UTF-8 encodes the `src` string to the `dest` Uint8Array and returns an object\n  //  * containing the read Unicode code units and written UTF-8 bytes.\n  //  *\n  //  * ```js\n  //  * const encoder = new TextEncoder();\n  //  * const src = 'this is some data';\n  //  * const dest = new Uint8Array(10);\n  //  * const { read, written } = encoder.encodeInto(src, dest);\n  //  * ```\n  //  * @param src The text to encode.\n  //  * @param dest The array to hold the encode result.\n  //  */\n  // encodeInto(src: string, dest: Uint8Array): TextEncoderEncodeIntoResult;\n}\n\n// https://encoding.spec.whatwg.org/#dictdef-textencoderencodeintoresult\n// declare interface TextEncoderEncodeIntoResult {\n//   read: number;\n//   written: number;\n// }\n\n/**\n * TextDecoder takes a stream UTF-8 bytes as input and emits a stream of code points\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder | TextDecoder on MDN}\n *\n * **Note**: On Fastly Compute, TextDecoder only supports UTF-8 bytes as input, and always operates\n * in non-fatal mode.\n * @group Encoding API\n */\ndeclare class TextDecoder {\n  // TODO: We should throw a RangeError if supplied a `label` that we do not support\n  constructor(label?: 'unicode-1-1-utf-8' | 'utf-8' | 'utf8');\n  decode(input?: ArrayBuffer | ArrayBufferView): string;\n  get encoding(): 'utf-8';\n}\n\n/**\n * Simple interface for logging to\n * [third party logging providers](https://developer.fastly.com/learning/integrations/logging)\n *\n * Instances of Logger for specific endpoints can be created using {@linkcode Fastly.getLogger}.\n * @deprecated This has moved to {@link \"fastly:logger\".Logger} - This global class will be removed in the next major version.\n * @hidden\n */\ndeclare interface Logger {\n  /**\n   * Send the given message, converted to a string, to this Logger instance's endpoint\n   */\n  log(message: any): void;\n}\n\n/**\n * Fastly-specific APIs available to Fastly Compute JS services\n * @deprecated\n * @hidden\n */\ndeclare interface Fastly {\n  /**\n   * @deprecated This has moved to {@link \"fastly:experimental\".setBaseURL} - This will be removed in the next major version.\n   * @hidden\n   * @experimental\n   */\n  set baseURL(base: URL | null | undefined);\n  /**\n   * @deprecated This will be removed in the next major version.\n   * @hidden\n   * @experimental\n   */\n  get baseURL(): URL | null;\n  /**\n   * @deprecated This has moved to {@link \"fastly:experimental\".setDefaultBackend} - This will be removed in the next major version.\n   * @hidden\n   * @experimental\n   */\n  set defaultBackend(backend: string);\n  /**\n   * @deprecated This will be removed in the next major version.\n   * @hidden\n   * @experimental\n   */\n  get defaultBackend(): string;\n  /**\n   * Property to access the environment variables for the Fastly Compute service.\n   * @hidden\n   * @experimental\n   */\n  env: {\n    /**\n     * Function to get the environment variable value, for the provided environment variable name.\n     *\n     * For additional references, see the [Fastly Developer Hub for Compute Environment Variables](https://developer.fastly.com/reference/compute/ecp-env/)\n     *\n     * @param name The name of the environment variable\n     * @returns the value of the environemnt variable\n     * @deprecated This has moved to {@link \"fastly:env\".env} - This function will be removed in the next major version.\n     * @hidden\n     */\n    get(name: string): string;\n  };\n\n  /**\n   * JavaScript SDK version string for the JS runtime build.\n   * @hidden\n   */\n  sdkVersion: string;\n\n  /**\n   * Creates a new {@linkcode Logger} instance for the given\n   * [named log endpoint](https://developer.fastly.com/learning/integrations/logging).\n   *\n   * **Note**: Can only be used when processing requests, not during build-time initialization.\n   * @deprecated This function will be removed in the next major version. Use of this function can be replaced with the fastly logger class {@link \"fastly:logger\".Logger}\n   * @hidden\n   */\n  getLogger(endpoint: string): Logger;\n\n  /**\n   * Causes the Fastly Compute JS runtime environment to log debug information to stdout.\n   *\n   * **Note**: This is mostly for internal debugging purposes and will generate highly unstable\n   * output.\n   *\n   * @deprecated This has moved to {@link \"fastly:experimental\".enableDebugLogging} - This function will be removed in the next major version.\n   * @hidden\n   * @experimental\n   */\n  enableDebugLogging(enabled: boolean): void;\n\n  /**\n   * Retrieve geolocation information about the given IP address.\n   *\n   * @param address - the IPv4 or IPv6 address to query\n   *\n   * **Note**: Can only be used when processing requests, not during build-time initialization.\n   * @deprecated This has moved to {@link \"fastly:geolocation\".getGeolocationForIpAddress} - This function will be removed in the next major version.\n   * @hidden\n   */\n  getGeolocationForIpAddress(\n    address: string,\n  ): import('fastly:geolocation').Geolocation;\n\n  /**\n   * Embed a file as a Uint8Array.\n   *\n   * @param path - The path to include, relative to the project's top-level directory\n   *\n   * **Note**: Can only be used during build-time initialization, not when processing requests.\n   *\n   * @deprecated This has moved to {@link \"fastly:experimental\".includeBytes} - This function will be removed in the next major version.\n   * @hidden\n   * @experimental\n   */\n  includeBytes(path: string): Uint8Array<ArrayBuffer>;\n}\n\n/**\n * The global instance of the {@linkcode Fastly} builtin\n * @deprecated\n * @hidden\n */\ndeclare var fastly: Fastly;\n\n/**\n * An API for compressing a stream of data.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/CompressionStream | CompressionStream on MDN}\n *\n * @example\n * In this example a request is made to httpbin.org/html and the response body is compressed using gzip compression.\n *\n * View this example on [Fiddle](https://fiddle.fastly.dev/fiddle/c1326776).\n *\n * ```js\n * async function app(event) {\n *  const req = event.request;\n *  const backendResponse = await fetch(\"https://httpbin.org/html\", { backend: \"my-backend\" });\n *  if (!backendResponse.body) {\n *    return backendResponse;\n *  }\n *  let resp = new Response(backendResponse.body.pipeThrough(new CompressionStream(\"gzip\")), backendResponse);\n *  resp.headers.set(\"Content-Encoding\", \"gzip\");\n *  return resp;\n * }\n * addEventListener(\"fetch\", event => event.respondWith(app(event)));\n * ```\n *\n * @group Compression Streams APIs\n */\ndeclare class CompressionStream {\n  /**\n   * Creates a new `CompressionStream` object which compresses a stream of data.\n   *\n   * @param format The compression format to use.\n   *\n   * @throws Throws a `TypeError` if the format passed to the constructor is not supported.\n   * @example\n   * ```js\n   * const gzip = new CompressionStream(\"gzip\");\n   * ```\n   */\n  constructor(format: 'deflate' | 'deflate-raw' | 'gzip');\n\n  /**\n   * @example\n   * ```js\n   * let stream = new CompressionStream(\"gzip\");\n   * console.log(stream.readable instanceof ReadableStream); // true\n   * ```\n   */\n  readonly readable: ReadableStream<Uint8Array<ArrayBuffer>>;\n  /**\n   * @example\n   * ```js\n   * let stream = new CompressionStream(\"gzip\");\n   * console.log(stream.writable instanceof WritableStream); // true\n   * ```\n   */\n  readonly writable: WritableStream<Uint8Array<ArrayBuffer>>;\n}\n\n/**\n * An API for decompressing a stream of data.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/DecompressionStream | DecompressionStream on MDN}\n *\n * @example\n * In this example a request is made to httpbin.org/gzip and the response body is decompressed using gzip decompression.\n *\n * View this example on [Fiddle](https://fiddle.fastly.dev/fiddle/637add51).\n *\n * ```js\n * async function app(event) {\n *  const backendResponse = await fetch(\"https://httpbin.org/gzip\", { backend: \"origin_0\" });\n *  let resp = new Response(backendResponse.body.pipeThrough(new DecompressionStream(\"gzip\")), backendResponse);\n *  resp.headers.delete('content-encoding');\n *  return resp;\n * }\n * addEventListener(\"fetch\", event => event.respondWith(app(event)));\n * ```\n *\n * @group Compression Streams APIs\n */\ndeclare class DecompressionStream {\n  /**\n   * Creates a new `DecompressionStream` object which decompresses a stream of\n   * data.\n   *\n   * @param format The compression format to use.\n   *\n   * @throws Throws a `TypeError` if the format passed to the constructor is not supported.\n   * @example\n   * ```js\n   * const gzip = new DecompressionStream(\"gzip\");\n   * ```\n   */\n  constructor(format: 'deflate' | 'deflate-raw' | 'gzip');\n\n  /**\n   * @example\n   * ```js\n   * let stream = new DecompressionStream(\"gzip\");\n   * console.log(stream.readable instanceof ReadableStream); // true\n   * ```\n   */\n  readonly readable: ReadableStream<Uint8Array<ArrayBuffer>>;\n  /**\n   * @example\n   * ```js\n   * let stream = new DecompressionStream(\"gzip\");\n   * console.log(stream.writable instanceof WritableStream); // true\n   * ```\n   */\n  readonly writable: WritableStream<Uint8Array<ArrayBuffer>>;\n}\n\n// Note: the contents below here are, partially modified, copies of content from TypeScript's\n// `lib.dom.d.ts` file.\n// We used to keep them in a separate file, referenced using a `/// reference path=\"...\"`\n// directive, but that causes the defined types to be absent from TypeDoc output.\n\n/*! *****************************************************************************\nCopyright (c) Microsoft Corporation. All rights reserved.\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\nthis file except in compliance with the License. You may obtain a copy of the\nLicense at http://www.apache.org/licenses/LICENSE-2.0\n\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\nMERCHANTABLITY OR NON-INFRINGEMENT.\n\nSee the Apache Version 2.0 License for specific language governing permissions\nand limitations under the License.\n***************************************************************************** */\n\n/*!\n * This file is largely a subset of TypeScript's lib.dom.d.ts file, with some\n * Fastly Compute-specific additions and modifications. Those modifications are\n * Copyright (c) Fastly Corporation, under the same license as the rest of the file.\n */\n\ntype BlobPart = BufferSource | Blob | string;\ntype EndingType = 'native' | 'transparent';\ntype FormDataEntryValue = File | string;\n\ninterface BlobPropertyBag {\n  endings?: EndingType;\n  type?: string;\n}\n\ninterface FilePropertyBag extends BlobPropertyBag {\n  lastModified?: number;\n}\n\n/**\n * A file-like object of immutable, raw data. Blobs represent data that isn't necessarily in a JavaScript-native format. The File interface is based on Blob, inheriting blob functionality and expanding it to support files on the user's system.\n *\n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob)\n */\ninterface Blob {\n  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size) */\n  readonly size: number;\n  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type) */\n  readonly type: string;\n  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */\n  arrayBuffer(): Promise<ArrayBuffer>;\n  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */\n  slice(start?: number, end?: number, contentType?: string): Blob;\n  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/stream) */\n  stream(): ReadableStream<Uint8Array<ArrayBuffer>>;\n  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */\n  text(): Promise<string>;\n}\n\ndeclare var Blob: {\n  prototype: Blob;\n  new (blobParts?: BlobPart[], options?: BlobPropertyBag): Blob;\n};\n\n/**\n * Provides information about files and allows JavaScript in a web page to access their content.\n *\n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/File)\n */\ninterface File extends Blob {\n  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified) */\n  readonly lastModified: number;\n  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name) */\n  readonly name: string;\n  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/webkitRelativePath) */\n  readonly webkitRelativePath: string;\n}\n\ndeclare var File: {\n  prototype: File;\n  new (fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File;\n};\n\n/**\n * Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the XMLHttpRequest.send() method. It uses the same format a form would use if the encoding type were set to \"multipart/form-data\".\n *\n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData)\n */\ninterface FormData {\n  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append) */\n  append(name: string, value: string | Blob): void;\n  append(name: string, value: string): void;\n  append(name: string, blobValue: Blob, filename?: string): void;\n  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/delete) */\n  delete(name: string): void;\n  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/get) */\n  get(name: string): FormDataEntryValue | null;\n  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/getAll) */\n  getAll(name: string): FormDataEntryValue[];\n  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/has) */\n  has(name: string): boolean;\n  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set) */\n  set(name: string, value: string | Blob): void;\n  set(name: string, value: string): void;\n  set(name: string, blobValue: Blob, filename?: string): void;\n  forEach(\n    callbackfn: (\n      value: FormDataEntryValue,\n      key: string,\n      parent: FormData,\n    ) => void,\n    thisArg?: any,\n  ): void;\n}\n\ndeclare var FormData: {\n  prototype: FormData;\n  new (\n    form?: any /*form?: HTMLFormElement, submitter?: HTMLElement | null*/,\n  ): FormData;\n};\n\n/**\n * Used within the\n * [Request](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request) and\n * [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response/Response) constructors.\n * ({@linkcode Request}, and {@linkcode Response})\n * @group Fetch API\n */\ndeclare type BodyInit = ReadableStream | XMLHttpRequestBodyInit;\ndeclare type XMLHttpRequestBodyInit =\n  | Blob\n  | BufferSource\n  | FormData\n  | URLSearchParams\n  | string;\n\n/**\n * Body for Fetch HTTP Requests and Responses\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch#Body | Body on MDN}\n * @group Fetch API\n */\ndeclare interface Body {\n  readonly body: ReadableStream<Uint8Array<ArrayBuffer>> | null;\n  readonly bodyUsed: boolean;\n  arrayBuffer(): Promise<ArrayBuffer>;\n  blob(): Promise<Blob>;\n  formData(): Promise<FormData>;\n  json(): Promise<any>;\n  text(): Promise<string>;\n}\n\n/**\n * Constructor parameter for\n * [Request](https://developer.mozilla.org/en-US/docs/Web/API/Request)\n *\n * Usually this a URL to the resource you are requesting.\n * @group Fetch API\n */\ndeclare type RequestInfo = Request | string;\n\n/**\n * Constructor parameter for\n * [Request](https://developer.mozilla.org/en-US/docs/Web/API/Request)\n *\n * This contains information to send along with the request (Headers, body, etc...), as well as\n * Fastly specific information.\n * @group Fetch API\n */\ndeclare interface RequestInit {\n  /** A BodyInit object or null to set request's body. */\n  body?: BodyInit | null;\n  // /** A string indicating how the request will interact with the browser's cache to set request's cache. */\n  // cache?: RequestCache;\n  // /** A string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL. Sets request's credentials. */\n  // credentials?: RequestCredentials;\n  /** A Headers object, an object literal, or an array of two-item arrays to set request's headers. */\n  headers?: HeadersInit;\n  // /** A cryptographic hash of the resource to be fetched by request. Sets request's integrity. */\n  // integrity?: string;\n  // /** A boolean to set request's keepalive. */\n  // keepalive?: boolean;\n  /** A string to set request's method. */\n  method?: string;\n  // /** A string to indicate whether the request will use CORS, or will be restricted to same-origin URLs. Sets request's mode. */\n  // mode?: RequestMode;\n  // /** A string indicating whether request follows redirects, results in an error upon encountering a redirect, or returns the redirect (in an opaque fashion). Sets request's redirect. */\n  // redirect?: RequestRedirect;\n  // /** A string whose value is a same-origin URL, \"about:client\", or the empty string, to set request's referrer. */\n  // referrer?: string;\n  // /** A referrer policy to set request's referrerPolicy. */\n  // referrerPolicy?: ReferrerPolicy;\n  // /** An AbortSignal to set request's signal. */\n  // signal?: AbortSignal | null;\n  // /** Can only be null. Used to disassociate request from any Window. */\n  // window?: null;\n\n  /** The Fastly configured backend name or instance the request should be sent to. */\n  backend?: string | import('fastly:backend').Backend;\n  /** Fastly-specific cache override configuration for this request. */\n  cacheOverride?:\n    | import('fastly:cache-override').CacheOverride\n    | import('fastly:cache-override').ICacheOverride\n    | Exclude<import('fastly:cache-override').CacheOverrideMode, 'override'>;\n  /** Fastly-specific cache key override for this request. */\n  cacheKey?: string;\n  /** Fastly-specific options. */\n  fastly?: {\n    /** Whether to automatically gzip decompress the response. */\n    decompressGzip?: boolean;\n  };\n  /**\n   * Controls how framing headers (`Content-Length`, `Transfer-Encoding`) are\n   * determined. When `true`, any provided framing headers will be honored\n   * instead of being automatically set based on the body.\n   */\n  manualFramingHeaders?: boolean;\n  /**\n   * Fastly Image Optimizer transformation options to apply to the response.\n   * @version 3.36.0\n   */\n  imageOptimizerOptions?: import('fastly:image-optimizer').ImageOptimizerOptions;\n}\n\n/**\n * The Request class as [specified by WHATWG](https://fetch.spec.whatwg.org/#ref-for-dom-request%E2%91%A0)\n *\n * **Note**: Can only be used when processing requests, not during build-time initialization.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Request | Request on MDN}\n * @group Fetch API\n */\ninterface Request extends Body {\n  // /** Returns the cache mode associated with request, which is a string indicating how the request will interact with the browser's cache when fetching. */\n  // readonly cache: RequestCache;\n  // /** Returns the credentials mode associated with request, which is a string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL. */\n  // readonly credentials: RequestCredentials;\n  // /** Returns the kind of resource requested by request, e.g., \"document\" or \"script\". */\n  // readonly destination: RequestDestination;\n  /** Returns a Headers object consisting of the headers associated with request. */\n  readonly headers: Headers;\n  // /** Returns request's subresource integrity metadata, which is a cryptographic hash of the resource being fetched. Its value consists of multiple hashes separated by whitespace. [SRI] */\n  // readonly integrity: string;\n  // /** Returns a boolean indicating whether or not request can outlive the global in which it was created. */\n  // readonly keepalive: boolean;\n  /** Returns request's HTTP method, which is \"GET\" by default. */\n  readonly method: string;\n  // /** Returns the mode associated with request, which is a string indicating whether the request will use CORS, or will be restricted to same-origin URLs. */\n  // readonly mode: RequestMode;\n  // /** Returns the redirect mode associated with request, which is a string indicating how redirects for the request will be handled during fetching. A request will follow redirects by default. */\n  // readonly redirect: RequestRedirect;\n  // /** Returns the referrer of request. Its value can be a same-origin URL if explicitly set in init, the empty string to indicate no referrer, and \"about:client\" when defaulting to the global's default. This is used during fetching to determine the value of the `Referer` header of the request being made. */\n  // readonly referrer: string;\n  // /** Returns the referrer policy associated with request. This is used during fetching to compute the value of the request's referrer. */\n  // readonly referrerPolicy: ReferrerPolicy;\n  // /** Returns the signal associated with request, which is an AbortSignal object indicating whether or not request has been aborted, and its abort event handler. */\n  // readonly signal: AbortSignal;\n  /** Returns the URL of request as a string. */\n  readonly url: string;\n\n  /** Creates a copy of the current Request object. */\n  clone(): Request;\n\n  /**\n   * The backend this request was sent to, or `undefined` for the downstream\n   * request itself.\n   */\n  readonly backend: import('fastly:backend').Backend | undefined;\n  /**\n   * Set the cache override for this request.\n   *\n   * @param override The cache override configuration to apply.\n   */\n  setCacheOverride(\n    override: import('fastly:cache-override').CacheOverride,\n  ): void;\n  /**\n   * Set a custom cache key for this request.\n   *\n   * @param key The cache key to use.\n   */\n  setCacheKey(key: string): void;\n  /**\n   * Controls how framing headers (`Content-Length`, `Transfer-Encoding`) are\n   * determined. In \"manual\" mode, any provided framing headers will be\n   * honored. In \"automatic\" mode (the default), they are set based on the\n   * body.\n   *\n   * @param manual Whether to use manual mode for framing headers.\n   */\n  setManualFramingHeaders(manual: boolean): void;\n\n  /**\n   * Fastly-specific property - determines whether a request is cacheable per conservative RFC 9111 semantics.\n   * In particular, this function checks whether the request method is `GET` or `HEAD`, and\n   * considers requests with other methods uncacheable. Applications where it is safe to cache\n   * responses to other methods should consider using their own cacheability check instead of\n   * this function.\n   *\n   * This function always returns undefined on hosts not supporting the HTTP Cache API (i.e. Viceroy)\n   * @version 3.30.0\n   */\n  readonly isCacheable: boolean | undefined;\n}\n\n/**\n * @group Fetch API\n */\ndeclare var Request: {\n  prototype: Request;\n  new (input: RequestInfo | URL, init?: RequestInit): Request;\n};\n\n/**\n * Constructor parameter for the [Fetch API Response](https://developer.mozilla.org/en-US/docs/Web/API/Response)\n * This contains information to send along with the response.\n * @group Fetch API\n */\ndeclare interface ResponseInit {\n  headers?: HeadersInit;\n  status?: number;\n  statusText?: string;\n  /**\n   * Controls how framing headers (`Content-Length`, `Transfer-Encoding`) are\n   * determined. When `true`, any provided framing headers will be honored\n   * instead of being automatically set based on the body.\n   */\n  manualFramingHeaders?: boolean;\n}\n\n/**\n * The Response class as [specified by WHATWG](https://fetch.spec.whatwg.org/#ref-for-dom-response%E2%91%A0)\n *\n * **Note**: Can only be used when processing requests, not during build-time initialization.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Response | Response on MDN}\n * @group Fetch API\n */\ninterface Response extends Body {\n  /**\n   * The response headers.\n   *\n   * May be modified even for upstream responses prior to storage in the cache.\n   */\n  readonly headers: Headers;\n  readonly ok: boolean;\n  // readonly redirected: boolean;\n  /**\n   * The response status. May be modified prior to storage in the cache.\n   */\n  status: number;\n  readonly statusText: string;\n  // readonly type: ResponseType;\n  readonly url: string;\n  /**\n   * Fastly-specific property - obtain the IP address used for the request\n   *\n   * Undefined for user-created responses and when the response is returned from the cache.\n   * Set cacheOverride: new CacheOverride(\"pass\") to ensure a value.\n   */\n  readonly ip: string | undefined;\n  /**\n   * Fastly-specific property - Obtain the port used for the request\n   *\n   * Undefined for user-created responses and when the response is returned from the cache.\n   * Set cacheOverride: new CacheOverride(\"pass\") to ensure a value.\n   */\n  readonly port: number | undefined;\n  // clone(): Response;\n  /**\n   * Controls how framing headers (`Content-Length`, `Transfer-Encoding`) are\n   * determined. In \"manual\" mode, any provided framing headers will be\n   * honored. In \"automatic\" mode (the default), they are set based on the\n   * body.\n   *\n   * @param manual Whether to use manual mode for framing headers.\n   */\n  setManualFramingHeaders(manual: boolean): void;\n  /**\n   * The backend this response was received from, or `undefined` for\n   * user-created responses.\n   */\n  readonly backend: import('fastly:backend').Backend | undefined;\n  /**\n   * Fastly-specific property - Returns whether the `Response` resulted from a cache hit.\n   * For request collapsing, typically one response will show as a miss, and the others\n   * (that awaited that response) will show as hits.\n   *\n   * Undefined if the environment does not support the new HTTP Cache hostcalls.\n   * @version 3.30.0\n   */\n  readonly cached: boolean | undefined;\n  /**\n   * Fastly-specific property - Returns whether the cached `Response` is considered stale.\n   *\n   * Undefined if the environment does not support the new HTTP Cache hostcalls.\n   * @version 3.30.0\n   */\n  readonly stale: boolean | undefined;\n  /**\n   * Fastly-specific property - Get the Time to Live (TTL) in the cache for this response in seconds, if it is cached.\n   *\n   * The TTL determines the duration of \"freshness\" for the cached response\n   * after it is inserted into the cache.\n   *\n   * Undefined if the response is not cached or the environment does not support the HTTP Cache hostcalls. May be modified prior to injection into the cache.\n   * @version 3.30.0\n   */\n  ttl: number | undefined;\n  /**\n   * Fastly-specific property - The current age of the response in seconds, if it is cached.\n   *\n   * Undefined if the response is not cached or the environment does not support the HTTP Cache hostcalls. May be modified prior to injection into the cache.\n   * @version 3.30.0\n   */\n  readonly age: number | undefined;\n  /**\n   * Fastly-specific property - The time in seconds for which the response can safely be used despite being considered stale, if it is cached.\n   *\n   * Undefined if the response is not cached or the environment does not support the HTTP Cache hostcalls. May be modified prior to injection into the cache.\n   * @version 3.30.0\n   */\n  swr: number | undefined;\n  /**\n   * Fastly-specific property - The set of request headers for which the response may vary.\n   *\n   * Undefined if the response is not cached or the environment does not support the HTTP Cache hostcalls. May be modified prior to injection into the cache.\n   * @version 3.30.0\n   */\n  vary: Array<string> | undefined;\n  /**\n   * Fastly-specific property - The surrogate keys for the cached response.\n   *\n   * Undefined if the response is not cached or the environment does not support the HTTP Cache hostcalls. May be modified prior to injection into the cache.\n   * @version 3.30.0\n   */\n  surrogateKeys: Array<string> | undefined;\n  /**\n   * Fastly-specific property - Get or set whether this response should only be stored via PCI/HIPAA-compliant non-volatile caching.\n   *\n   * See the [Fastly PCI-Compliant Caching and Delivery documentation](https://docs.fastly.com/products/pci-compliant-caching-and-delivery)\n   * for details.\n   *\n   * Undefined if the response is not cached or the environment does not support the HTTP Cache hostcalls. May be modified prior to injection into the cache.\n   * @version 3.30.0\n   */\n  pci: boolean | undefined;\n}\n\n/**\n * @group Fetch API\n */\ndeclare var Response: {\n  prototype: Response;\n  new (body?: BodyInit | null, init?: ResponseInit): Response;\n  // error(): Response;\n  redirect(url: string | URL, status?: number): Response;\n  json(data: any, init?: ResponseInit): Response;\n};\n\n/**\n * @group Streams API\n */\ntype ReadableStreamReader<T> = ReadableStreamDefaultReader<T>;\n// type ReadableStreamReader<T> = ReadableStreamDefaultReader<T> | ReadableStreamBYOBReader;\n/**\n * @group Streams API\n */\ntype ReadableStreamController<T> = ReadableStreamDefaultController<T>;\n// type ReadableStreamController<T> = ReadableStreamDefaultController<T> | ReadableByteStreamController;\n\n/**\n * @group Streams API\n */\ninterface UnderlyingSinkAbortCallback {\n  (reason?: any): void | PromiseLike<void>;\n}\n\n/**\n * @group Streams API\n */\ninterface UnderlyingSinkCloseCallback {\n  (): void | PromiseLike<void>;\n}\n\n/**\n * @group Streams API\n */\ninterface UnderlyingSinkStartCallback {\n  (controller: WritableStreamDefaultController): any;\n}\n\n/**\n * @group Streams API\n */\ninterface UnderlyingSinkWriteCallback<W> {\n  (\n    chunk: W,\n    controller: WritableStreamDefaultController,\n  ): void | PromiseLike<void>;\n}\n\n/**\n * @group Streams API\n */\ninterface UnderlyingSourceCancelCallback {\n  (reason?: any): void | PromiseLike<void>;\n}\n\n/**\n * @group Streams API\n */\ninterface UnderlyingSourcePullCallback<R> {\n  (controller: ReadableStreamController<R>): void | PromiseLike<void>;\n}\n\n/**\n * @group Streams API\n */\ninterface UnderlyingSourceStartCallback<R> {\n  (controller: ReadableStreamController<R>): any;\n}\n\n/**\n * @group Streams API\n */\ninterface UnderlyingSink<W = any> {\n  abort?: UnderlyingSinkAbortCallback;\n  close?: UnderlyingSinkCloseCallback;\n  start?: UnderlyingSinkStartCallback;\n  type?: undefined;\n  write?: UnderlyingSinkWriteCallback<W>;\n}\n\n/**\n * @group Streams API\n */\ninterface UnderlyingSource<R = any> {\n  autoAllocateChunkSize?: number;\n  cancel?: UnderlyingSourceCancelCallback;\n  pull?: UnderlyingSourcePullCallback<R>;\n  start?: UnderlyingSourceStartCallback<R>;\n  type?: ReadableStreamType;\n}\n\n/**\n * @group Streams API\n */\ntype ReadableStreamType = 'bytes';\n\n/**\n * @group Streams API\n */\ninterface StreamPipeOptions {\n  preventAbort?: boolean;\n  preventCancel?: boolean;\n  /**\n   * Pipes this readable stream to a given writable stream destination. The way in which the piping process behaves under various error conditions can be customized with a number of passed options. It returns a promise that fulfills when the piping process completes successfully, or rejects if any errors were encountered.\n   *\n   * Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader.\n   *\n   * Errors and closures of the source and destination streams propagate as follows:\n   *\n   * An error in this source readable stream will abort destination, unless preventAbort is truthy. The returned promise will be rejected with the source's error, or with any error that occurs during aborting the destination.\n   *\n   * An error in destination will cancel this source readable stream, unless preventCancel is truthy. The returned promise will be rejected with the destination's error, or with any error that occurs during canceling the source.\n   *\n   * When this source readable stream closes, destination will be closed, unless preventClose is truthy. The returned promise will be fulfilled once this process completes, unless an error is encountered while closing the destination, in which case it will be rejected with that error.\n   *\n   * If destination starts out closed or closing, this source readable stream will be canceled, unless preventCancel is true. The returned promise will be rejected with an error indicating piping to a closed stream failed, or with any error that occurs during canceling the source.\n   *\n   * The signal option can be set to an AbortSignal to allow aborting an ongoing pipe operation via the corresponding AbortController. In this case, this source readable stream will be canceled, and destination aborted, unless the respective options preventCancel or preventAbort are set.\n   */\n  preventClose?: boolean;\n  // signal?: AbortSignal;\n}\n\n/**\n * @group Streams API\n */\ninterface QueuingStrategySize<T = any> {\n  (chunk: T): number;\n}\n\n/**\n * @group Streams API\n */\ninterface QueuingStrategy<T = any> {\n  highWaterMark?: number;\n  size?: QueuingStrategySize<T>;\n}\n\n/**\n * @group Streams API\n */\ninterface QueuingStrategyInit {\n  /**\n   * Creates a new ByteLengthQueuingStrategy with the provided high water mark.\n   *\n   * Note that the provided high water mark will not be validated ahead of time. Instead, if it is negative, NaN, or not a number, the resulting ByteLengthQueuingStrategy will cause the corresponding stream constructor to throw.\n   */\n  highWaterMark: number;\n}\n\n/**\n * @group Streams API\n */\ninterface ReadableStreamDefaultReadDoneResult {\n  done: true;\n  value?: undefined;\n}\n\n/**\n * @group Streams API\n */\ninterface ReadableStreamDefaultReadValueResult<T> {\n  done: false;\n  value: T;\n}\n\n/**\n * @group Streams API\n */\ntype ReadableStreamDefaultReadResult<T> =\n  | ReadableStreamDefaultReadValueResult<T>\n  | ReadableStreamDefaultReadDoneResult;\n\n/**\n * @group Streams API\n */\ninterface ReadableWritablePair<R = any, W = any> {\n  readable: ReadableStream<R>;\n  /**\n   * Provides a convenient, chainable way of piping this readable stream through a transform stream (or any other \\{ writable, readable \\} pair). It simply pipes the stream into the writable side of the supplied pair, and returns the readable side for further use.\n   *\n   * Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader.\n   */\n  writable: WritableStream<W>;\n}\n\n/**\n * This Streams API interface represents a readable stream of byte data. The Fetch API offers a concrete instance of a ReadableStream through the body property of a Response object.\n * @group Streams API\n */\ninterface ReadableStream<R = any> {\n  readonly locked: boolean;\n  cancel(reason?: any): Promise<void>;\n  getReader(): ReadableStreamDefaultReader<R>;\n  pipeThrough<T>(\n    transform: ReadableWritablePair<T, R>,\n    options?: StreamPipeOptions,\n  ): ReadableStream<T>;\n  pipeTo(dest: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;\n  tee(): [ReadableStream<R>, ReadableStream<R>];\n}\n\n/**\n * The ReadableStream class as [specified by WHATWG](https://streams.spec.whatwg.org/#rs-class)\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream | ReadableStream on MDN}\n * @group Streams API\n */\ndeclare var ReadableStream: {\n  prototype: ReadableStream;\n  new <R = any>(\n    underlyingSource?: UnderlyingSource<R>,\n    strategy?: QueuingStrategy<R>,\n  ): ReadableStream<R>;\n};\n\n/**\n * @group Streams API\n */\ninterface ReadableStreamDefaultController<R = any> {\n  readonly desiredSize: number | null;\n  close(): void;\n  enqueue(chunk: R): void;\n  error(e?: any): void;\n}\n\n/**\n * @group Streams API\n */\ndeclare var ReadableStreamDefaultController: {\n  prototype: ReadableStreamDefaultController;\n  new (): ReadableStreamDefaultController;\n};\n\n/**\n * @group Streams API\n */\ninterface ReadableStreamDefaultReader<R = any>\n  extends ReadableStreamGenericReader {\n  read(): Promise<ReadableStreamDefaultReadResult<R>>;\n  releaseLock(): void;\n}\n\n/**\n * @group Streams API\n */\ndeclare var ReadableStreamDefaultReader: {\n  prototype: ReadableStreamDefaultReader;\n  new <R = any>(stream: ReadableStream<R>): ReadableStreamDefaultReader<R>;\n};\n\n/**\n * @group Streams API\n */\ninterface ReadableStreamGenericReader {\n  readonly closed: Promise<undefined>;\n  cancel(reason?: any): Promise<void>;\n}\n\n/**\n * This Streams API interface provides a standard abstraction for writing streaming data to a destination, known as a sink. This object comes with built-in backpressure and queuing.\n * @group Streams API\n */\ninterface WritableStream<W = any> {\n  readonly locked: boolean;\n  abort(reason?: any): Promise<void>;\n  getWriter(): WritableStreamDefaultWriter<W>;\n}\n\n/**\n * The WritableStream class as [specified by WHATWG](https://streams.spec.whatwg.org/#ws-class)\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/WritableStream | WritableStream on MDN}\n * @group Streams API\n */\ndeclare var WritableStream: {\n  prototype: WritableStream;\n  new <W = any>(\n    underlyingSink?: UnderlyingSink<W>,\n    strategy?: QueuingStrategy<W>,\n  ): WritableStream<W>;\n};\n\n/**\n * This Streams API interface represents a controller allowing control of a WritableStream's state. When constructing a WritableStream, the underlying sink is given a corresponding WritableStreamDefaultController instance to manipulate.\n * @group Streams API\n */\ninterface WritableStreamDefaultController {\n  error(e?: any): void;\n}\n\n/**\n * @group Streams API\n */\ndeclare var WritableStreamDefaultController: {\n  prototype: WritableStreamDefaultController;\n  new (): WritableStreamDefaultController;\n};\n\n/**\n * This Streams API interface is the object returned by WritableStream.getWriter() and once created locks the < writer to the WritableStream ensuring that no other streams can write to the underlying sink.\n * @group Streams API\n */\ninterface WritableStreamDefaultWriter<W = any> {\n  readonly closed: Promise<undefined>;\n  readonly desiredSize: number | null;\n  readonly ready: Promise<undefined>;\n  abort(reason?: any): Promise<void>;\n  close(): Promise<void>;\n  releaseLock(): void;\n  write(chunk: W): Promise<void>;\n}\n\n/**\n * @group Streams API\n */\ndeclare var WritableStreamDefaultWriter: {\n  prototype: WritableStreamDefaultWriter;\n  new <W = any>(stream: WritableStream<W>): WritableStreamDefaultWriter<W>;\n};\n\n/**\n * @group Streams API\n */\ninterface TransformStream<I = any, O = any> {\n  readonly readable: ReadableStream<O>;\n  readonly writable: WritableStream<I>;\n}\n\n/**\n * The TransformStream class as [specified by WHATWG](https://streams.spec.whatwg.org/#ts-class)\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/TransformStream | TransformStream on MDN}\n * @group Streams API\n */\n\ndeclare var TransformStream: {\n  prototype: TransformStream;\n  new <I = any, O = any>(\n    transformer?: Transformer<I, O>,\n    writableStrategy?: QueuingStrategy<I>,\n    readableStrategy?: QueuingStrategy<O>,\n  ): TransformStream<I, O>;\n};\n\n/**\n * @group Streams API\n */\ninterface TransformStreamDefaultController<O = any> {\n  readonly desiredSize: number | null;\n  enqueue(chunk?: O): void;\n  error(reason?: any): void;\n  terminate(): void;\n}\n\n/**\n * @group Streams API\n */\ndeclare var TransformStreamDefaultController: {\n  prototype: TransformStreamDefaultController;\n  new (): TransformStreamDefaultController;\n};\n\n/**\n * @group Streams API\n */\ninterface Transformer<I = any, O = any> {\n  flush?: TransformerFlushCallback<O>;\n  readableType?: undefined;\n  start?: TransformerStartCallback<O>;\n  transform?: TransformerTransformCallback<I, O>;\n  writableType?: undefined;\n}\n\n/**\n * @group Streams API\n */\ninterface TransformerFlushCallback<O> {\n  (controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;\n}\n\n/**\n * @group Streams API\n */\ninterface TransformerStartCallback<O> {\n  (controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;\n}\n\n/**\n * @group Streams API\n */\ninterface TransformerTransformCallback<I, O> {\n  (\n    chunk: I,\n    controller: TransformStreamDefaultController<O>,\n  ): void | PromiseLike<void>;\n}\n\n/**\n * @group Fetch API\n */\ntype HeadersInit = Headers | string[][] | Record<string, string>;\n\n/**\n * The Headers class as [specified by WHATWG](https://fetch.spec.whatwg.org/#headers-class)\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Headers | Headers on MDN}\n * @group Fetch API\n */\ninterface Headers {\n  append(name: string, value: string): void;\n  delete(name: string): void;\n  get(name: string): string | null;\n  getSetCookie(): string[];\n  has(name: string): boolean;\n  set(name: string, value: string): void;\n  forEach(\n    callbackfn: (value: string, key: string, parent: Headers) => void,\n    thisArg?: any,\n  ): void;\n  // Iterable methods\n  entries(): IterableIterator<[string, string]>;\n  keys(): IterableIterator<string>;\n  values(): IterableIterator<string>;\n  [Symbol.iterator](): Iterator<[string, string]>;\n}\n\n/**\n * @group Fetch API\n */\ndeclare var Headers: {\n  prototype: Headers;\n  new (init?: HeadersInit): Headers;\n};\n\n/**\n * The atob() function decodes a string of data which has been encoded using Base64 encoding.\n *\n * @param data A binary string (i.e., a string in which each character in the string is treated as a byte of binary data) containing base64-encoded data.\n * @returns An ASCII string containing decoded data from `data`.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/atob | atob on MDN}\n * @group Encoding API\n */\ndeclare function atob(data: string): string;\n\n/**\n *  The btoa() method creates a Base64-encoded ASCII string from a binary string (i.e., a string in which each character in the string is treated as a byte of binary data).\n * @param data The binary string to encode.\n * @returns  An ASCII string containing the Base64 representation of `data`.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/btoa | btoa on MDN}\n * @group Encoding API\n */\ndeclare function btoa(data: string): string;\n\n/**\n * The setTimeout() method sets a timer which calls a function once the timer expires.\n *\n * @param callback A function to be called after the timer expires.\n * @param delay The time, in milliseconds, that the timer should wait before calling the specified function. Defaults to 0 if not specified.\n * @param args Additional arguments which are passed through to the callback function.\n * @returns A numeric, non-zero value which identifies the timer created; this value can be passed to clearTimeout() to cancel the timeout.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/setTimeout | setTimeout on MDN}\n * @group Timers\n */\ndeclare function setTimeout<TArgs extends any[]>(\n  callback: (...args: TArgs) => void,\n  delay?: number,\n  ...args: TArgs\n): number;\n\n/**\n * The clearTimeout() method cancels a timeout previously established by calling setTimeout(). If the parameter provided does not identify a previously established action, this method does nothing.\n * @param timeoutID The identifier of the timeout you want to cancel. This ID was returned by the corresponding call to setTimeout().\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/clearTimeout | clearTimeout on MDN}\n * @group Timers\n */\ndeclare function clearTimeout(timeoutID?: number): void;\n\n/**\n * The setInterval() method repeatedly calls a function, with a fixed time delay between each call.\n * This method returns an interval ID which uniquely identifies the interval, so you can remove it later by calling clearInterval().\n *\n * @param callback A function to be called every delay milliseconds. The first call happens after delay milliseconds.\n * @param delay The time, in milliseconds, that the timer should delay in between calls of the specified function. Defaults to 0 if not specified.\n * @param args Additional arguments which are passed through to the callback function.\n * @returns A numeric, non-zero value which identifies the timer created; this value can be passed to clearInterval() to cancel the interval.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/setInterval | setInterval on MDN}\n * @group Timers\n */\ndeclare function setInterval<TArgs extends any[]>(\n  callback: (...args: TArgs) => void,\n  delay?: number,\n  ...args: TArgs\n): number;\n\n/**\n * The clearInterval() method cancels a timed, repeating action which was previously established by a call to setInterval(). If the parameter provided does not identify a previously established action, this method does nothing.\n * @param intervalID The identifier of the repeated action you want to cancel. This ID was returned by the corresponding call to setInterval().\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/clearInterval | clearInterval on MDN}\n * @group Timers\n */\ndeclare function clearInterval(intervalID?: number): void;\n\n/**\n * Fetch resources from backends.\n *\n * **Note**: Fastly Compute requires all outgoing requests to go to a predefined\n * {@link https://developer.fastly.com/reference/glossary#term-backend | backend}, passed in\n * via the {@link RequestInit.backend | backend} property on the `init` object.\n *\n * **Note**: Can only be used when processing requests, not during build-time initialization.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch | fetch on MDN}\n *\n * @param resource - The resource to fetch, either a URL string or a {@link Request} object\n * @param init - An object containing settings to apply to the request\n * @group Fetch API\n */\ndeclare function fetch(\n  input: RequestInfo | URL,\n  init?: RequestInit,\n): Promise<Response>;\n\n/**\n * @group Scheduling\n */\ninterface VoidFunction {\n  (): void;\n}\n\n/**\n * @group Scheduling\n */\ndeclare function queueMicrotask(callback: VoidFunction): void;\n\n/**\n * @group DOM APIs\n */\ndeclare function structuredClone(\n  value: any,\n  options?: StructuredSerializeOptions,\n): any;\n\n/**\n * @group DOM APIs\n */\ninterface StructuredSerializeOptions {\n  transfer?: Transferable[];\n}\n\n/**\n * @group DOM APIs\n */\ntype Transferable = ArrayBuffer;\n// type Transferable = ArrayBuffer | MessagePort | ImageBitmap;\n\n/**\n * The absolute location of the script executed by the Worker.\n *\n * Available via the global {@link location} property.\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/WorkerLocation | WorkerLocation on MDN}\n * @group Web APIs\n */\ninterface WorkerLocation {\n  /** The fragment identifier (`#` followed by the fragment) of the worker's URL. */\n  readonly hash: string;\n  /** The host (hostname and port) of the worker's URL. */\n  readonly host: string;\n  /** The hostname of the worker's URL. */\n  readonly hostname: string;\n  /** The serialized URL of the worker's location. */\n  readonly href: string;\n  /** Returns the serialized URL. Synonym for {@link WorkerLocation.href}. */\n  toString(): string;\n  /** The origin of the worker's URL. */\n  readonly origin: string;\n  /** The pathname of the worker's URL. */\n  readonly pathname: string;\n  /** The port of the worker's URL. */\n  readonly port: string;\n  /** The protocol scheme of the worker's URL. */\n  readonly protocol: string;\n  /** The query string (`?` followed by parameters) of the worker's URL. */\n  readonly search: string;\n}\n\n/**\n * The WorkerLocation class as [specified by WHATWG](https://html.spec.whatwg.org/multipage/workers.html#worker-locations)\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/WorkerLocation | WorkerLocation on MDN}\n * @group Web APIs\n */\ndeclare var WorkerLocation: {\n  prototype: WorkerLocation;\n  new (): WorkerLocation;\n};\n\n/**\n * @group Web APIs\n */\ndeclare var location: WorkerLocation;\n\ninterface Algorithm {\n  name: string;\n}\n\ntype AlgorithmIdentifier = Algorithm | string;\n\ntype BufferSource = ArrayBufferView | ArrayBuffer;\n\ndeclare class SubtleCrypto {\n  constructor();\n  // decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;\n  // deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise<ArrayBuffer>;\n  // deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;\n  digest(\n    algorithm: AlgorithmIdentifier,\n    data: BufferSource,\n  ): Promise<ArrayBuffer>;\n  // encrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;\n  // exportKey(format: \"jwk\", key: CryptoKey): Promise<JsonWebKey>;\n  // exportKey(format: Exclude<KeyFormat, \"jwk\">, key: CryptoKey): Promise<ArrayBuffer>;\n  // generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKeyPair>;\n  // generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;\n  // generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair | CryptoKey>;\n  // importKey(format: \"jwk\", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;\n  importKey(\n    format: 'jwk',\n    keyData: JsonWebKey,\n    algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams,\n    extractable: boolean,\n    keyUsages: ReadonlyArray<KeyUsage>,\n  ): Promise<CryptoKey>;\n  importKey(\n    format: Exclude<KeyFormat, 'jwk'>,\n    keyData: BufferSource,\n    algorithm:\n      | AlgorithmIdentifier\n      | RsaHashedImportParams\n      // | EcKeyImportParams\n      | HmacImportParams,\n    // | AesKeyAlgorithm\n    extractable: boolean,\n    keyUsages: KeyUsage[],\n  ): Promise<CryptoKey>;\n  // sign(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;\n  sign(\n    algorithm: AlgorithmIdentifier,\n    key: CryptoKey,\n    data: BufferSource,\n  ): Promise<ArrayBuffer>;\n  // unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;\n  // verify(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams, key: CryptoKey, signature: BufferSource, data: BufferSource): Promise<boolean>;\n  verify(\n    algorithm: AlgorithmIdentifier,\n    key: CryptoKey,\n    signature: BufferSource,\n    data: BufferSource,\n  ): Promise<boolean>;\n  // wrapKey(format: KeyFormat, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams): Promise<ArrayBuffer>;\n}\n\ninterface HmacImportParams extends Algorithm {\n  hash: HashAlgorithmIdentifier;\n  length?: number;\n}\n\ninterface RsaHashedImportParams extends Algorithm {\n  hash: HashAlgorithmIdentifier;\n}\ntype HashAlgorithmIdentifier = AlgorithmIdentifier;\n\ninterface EcKeyImportParams {\n  name: 'ECDSA';\n  namedCurve: 'P-256' | 'P-384' | 'P-521';\n}\n\ninterface JsonWebKey {\n  alg?: string;\n  crv?: string;\n  d?: string;\n  dp?: string;\n  dq?: string;\n  e?: string;\n  ext?: boolean;\n  k?: string;\n  key_ops?: string[];\n  kty?: string;\n  n?: string;\n  oth?: RsaOtherPrimesInfo[];\n  p?: string;\n  q?: string;\n  qi?: string;\n  use?: string;\n  x?: string;\n  y?: string;\n}\n\ninterface RsaOtherPrimesInfo {\n  d?: string;\n  r?: string;\n  t?: string;\n}\n\n/**\n * The Crypto interface as [specified by WHATWG](https://w3c.github.io/webcrypto/#crypto-interface)\n * Basic cryptography features available in the current context. It allows access to a cryptographically strong random number generator and to cryptographic primitives.\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Crypto | Crypto on MDN}\n * @group Web Crypto APIs\n */\ninterface Crypto {\n  readonly subtle: SubtleCrypto;\n  getRandomValues<T extends ArrayBufferView | null>(array: T): T;\n  randomUUID(): string;\n}\n\n/**\n * @group Web Crypto APIs\n */\ndeclare var Crypto: {\n  prototype: Crypto;\n  new (): Crypto;\n};\n\n/**\n * @group Web Crypto APIs\n */\ndeclare var crypto: Crypto;\n\n/**\n * The CryptoKey dictionary of the Web Crypto API represents a cryptographic key.\n * Available only in secure contexts.\n *\n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey)\n */\ninterface CryptoKey {\n  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/algorithm) */\n  readonly algorithm: KeyAlgorithm;\n  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/extractable) */\n  readonly extractable: boolean;\n  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/type) */\n  readonly type: KeyType;\n  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/usages) */\n  readonly usages: KeyUsage[];\n}\n\ndeclare var CryptoKey: {\n  prototype: CryptoKey;\n  new (): CryptoKey;\n};\n\ninterface KeyAlgorithm {\n  name: string;\n}\n\ntype KeyFormat =\n  | 'jwk'\n  // | \"pkcs8\"\n  | 'raw';\n// | \"spki\";\ntype KeyType = 'private' | 'public' | 'secret';\ntype KeyUsage =\n  | 'decrypt'\n  | 'deriveBits'\n  | 'deriveKey'\n  | 'encrypt'\n  | 'sign'\n  | 'unwrapKey'\n  | 'verify'\n  | 'wrapKey';\n\ninterface EventInit {\n  bubbles?: boolean;\n  cancelable?: boolean;\n  composed?: boolean;\n}\n\ninterface EventListenerOptions {\n  capture?: boolean;\n}\n\ninterface AddEventListenerOptions extends EventListenerOptions {\n  once?: boolean;\n  passive?: boolean;\n  // signal?: AbortSignal;\n}\n/**\n * An event which takes place in the DOM.\n *\n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event)\n */\ninterface Event {\n  /**\n   * Returns true or false depending on how event was initialized. True if event goes through its target's ancestors in reverse tree order, and false otherwise.\n   *\n   * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/bubbles)\n   */\n  readonly bubbles: boolean;\n  /**\n   * @deprecated\n   *\n   * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)\n   */\n  cancelBubble: boolean;\n  /**\n   * Returns true or false depending on how event was initialized. Its return value does not always carry meaning, but true can indicate that part of the operation during which event was dispatched, can be canceled by invoking the preventDefault() method.\n   *\n   * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelable)\n   */\n  readonly cancelable: boolean;\n  /**\n   * Returns true or false depending on how event was initialized. True if event invokes listeners past a ShadowRoot node that is the root of its target, and false otherwise.\n   *\n   * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composed)\n   */\n  readonly composed: boolean;\n  /**\n   * Returns the object whose event listener's callback is currently being invoked.\n   *\n   * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/currentTarget)\n   */\n  readonly currentTarget: EventTarget | null;\n  /**\n   * Returns true if preventDefault() was invoked successfully to indicate cancelation, and false otherwise.\n   *\n   * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/defaultPrevented)\n   */\n  readonly defaultPrevented: boolean;\n  /**\n   * Returns the event's phase, which is one of NONE, CAPTURING_PHASE, AT_TARGET, and BUBBLING_PHASE.\n   *\n   * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/eventPhase)\n   */\n  readonly eventPhase: number;\n  /**\n   * Returns true if event was dispatched by the user agent, and false otherwise.\n   *\n   * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/isTrusted)\n   */\n  readonly isTrusted: boolean;\n  /**\n   * @deprecated\n   *\n   * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/returnValue)\n   */\n  returnValue: boolean;\n  /**\n   * @deprecated\n   *\n   * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/srcElement)\n   */\n  readonly srcElement: EventTarget | null;\n  /**\n   * Returns the object to which event is dispatched (its target).\n   *\n   * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/target)\n   */\n  readonly target: EventTarget | null;\n  /**\n   * Returns the event's timestamp as the number of milliseconds measured relative to the time origin.\n   *\n   * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/timeStamp)\n   */\n  readonly timeStamp: DOMHighResTimeStamp;\n  /**\n   * Returns the type of event, e.g. \"click\", \"hashchange\", or \"submit\".\n   *\n   * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/type)\n   */\n  readonly type: string;\n  /**\n   * Returns the invocation target objects of event's path (objects on which listeners will be invoked), except for any nodes in shadow trees of which the shadow root's mode is \"closed\" that are not reachable from event's currentTarget.\n   *\n   * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composedPath)\n   */\n  composedPath(): EventTarget[];\n  /**\n   * @deprecated\n   *\n   * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/initEvent)\n   */\n  initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void;\n  /**\n   * If invoked when the cancelable attribute value is true, and while executing a listener for the event with passive set to false, signals to the operation that caused event to be dispatched that it needs to be canceled.\n   *\n   * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/preventDefault)\n   */\n  preventDefault(): void;\n  /**\n   * Invoking this method prevents event from reaching any registered event listeners after the current one finishes running and, when dispatched in a tree, also prevents event from reaching any other objects.\n   *\n   * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation)\n   */\n  stopImmediatePropagation(): void;\n  /**\n   * When dispatched in a tree, invoking this method prevents event from reaching any objects other than the current object.\n   *\n   * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation)\n   */\n  stopPropagation(): void;\n  readonly NONE: 0;\n  readonly CAPTURING_PHASE: 1;\n  readonly AT_TARGET: 2;\n  readonly BUBBLING_PHASE: 3;\n}\n\ndeclare var Event: {\n  prototype: Event;\n  new (type: string, eventInitDict?: EventInit): Event;\n  readonly NONE: 0;\n  readonly CAPTURING_PHASE: 1;\n  readonly AT_TARGET: 2;\n  readonly BUBBLING_PHASE: 3;\n};\n\ninterface EventListener {\n  (evt: Event): void;\n}\ninterface EventListenerObject {\n  handleEvent(object: Event): void;\n}\ntype EventListenerOrEventListenerObject = EventListener | EventListenerObject;\n\n/**\n * EventTarget is a DOM interface implemented by objects that can receive events and may have listeners for them.\n *\n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget)\n * @group DOM Events\n */\ninterface EventTarget {\n  /**\n   * Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.\n   *\n   * The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.\n   *\n   * When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.\n   *\n   * When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.\n   *\n   * When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.\n   *\n   * If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.\n   *\n   * The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.\n   *\n   * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)\n   */\n  addEventListener(\n    type: string,\n    callback: EventListenerOrEventListenerObject | null,\n    options?: AddEventListenerOptions | boolean,\n  ): void;\n  /**\n   * Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.\n   *\n   * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)\n   */\n  dispatchEvent(event: Event): boolean;\n  /**\n   * Removes the event listener in target's event listener list with the same type, callback, and options.\n   *\n   * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)\n   */\n  removeEventListener(\n    type: string,\n    callback: EventListenerOrEventListenerObject | null,\n    options?: EventListenerOptions | boolean,\n  ): void;\n}\n\ndeclare var EventTarget: {\n  prototype: EventTarget;\n  new (): EventTarget;\n};\n\n/**\n * Provides access to performance-related information for the current page. It's part of the High Resolution Time API, but is enhanced by the Performance Timeline API, the Navigation Timing API, the User Timing API, and the Resource Timing API.\n *\n * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance)\n * @group Performance APIs\n */\ninterface Performance extends EventTarget {\n  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/timeOrigin) */\n  readonly timeOrigin: DOMHighResTimeStamp;\n  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/now) */\n  now(): DOMHighResTimeStamp;\n}\n\n/**\n * @group Performance APIs\n */\ndeclare var Performance: {\n  prototype: Performance;\n  new (): Performance;\n};\n\n/**\n * @group Performance APIs\n */\ndeclare var performance: Performance;\n\ntype DOMHighResTimeStamp = number;\n"
  },
  {
    "path": "types/html-rewriter.d.ts",
    "content": "declare module 'fastly:html-rewriter' {\n  /**\n   * Lets you rewrite HTML by registering callbacks on CSS selectors. When an element matching the\n   * selector is encountered, the rewriter calls your callback, which can manipulate the element's\n   * attributes and add or remove content from the immediate context.\n   *\n   * `HTMLRewritingStream` implements `TransformStream`, so you can pipe an HTML response body\n   * through it using `pipeThrough`.\n   *\n   * @example\n   * ```js\n   * import { HTMLRewritingStream } from 'fastly:html-rewriter';\n   *\n   * async function handleRequest(event) {\n   *   let transformer = new HTMLRewritingStream()\n   *     .onElement(\"h1\", e => e.prepend(\"Header: \"))\n   *     .onElement(\"div\", e => e.setAttribute(\"special-attribute\", \"top-secret\"));\n   *   let body = (await fetch(\"https://example.com/\")).body.pipeThrough(transformer);\n   *\n   *   return new Response(body, {\n   *     status: 200,\n   *     headers: new Headers({\n   *       \"content-type\": \"text/html; charset=utf-8\",\n   *     })\n   *   });\n   * }\n   *\n   * addEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n   * ```\n   *\n   * @version 3.35.0\n   */\n  export class HTMLRewritingStream implements TransformStream {\n    constructor();\n    /**\n     * Registers a callback for elements matching the given CSS selector. The callback is called\n     * once for each matching element. Elements added by handlers will not be processed by other\n     * handlers.\n     *\n     * Supported CSS selectors:\n     *\n     * | Pattern | Description |\n     * |---|---|\n     * | `*` | Any element |\n     * | `E` | All elements of type `E` |\n     * | `E F` | `F` elements inside `E` elements |\n     * | `E > F` | `F` elements directly inside `E` elements |\n     * | `E:nth-child(n)` | The n-th child of type `E` |\n     * | `E:first-child` | First child of type `E` |\n     * | `E:nth-of-type(n)` | The n-th sibling of type `E` |\n     * | `E:first-of-type` | First sibling of type `E` |\n     * | `E:not(s)` | Type `E` elements not matching selector `s` |\n     * | `E.myclass` | Type `E` elements with class `\"myclass\"` |\n     * | `E#myid` | Type `E` elements with ID `\"myid\"` |\n     * | `E[attr]` | Type `E` elements with attribute `attr` |\n     * | `E[attr=\"val\"]` | Type `E` elements where `attr` is `\"val\"` |\n     * | `E[attr=\"val\" i]` | Case-insensitive match |\n     * | `E[attr=\"val\" s]` | Case-sensitive match |\n     * | `E[attr~=\"val\"]` | `attr` contains `\"val\"` in a space-separated list |\n     * | <code>E[attr\\|=\"val\"]</code> | `attr` is hyphen-separated and starts with `\"val\"` |\n     * | `E[attr^=\"val\"]` | `attr` starts with `\"val\"` |\n     * | `E[attr$=\"val\"]` | `attr` ends with `\"val\"` |\n     * | `E[attr*=\"val\"]` | `attr` contains `\"val\"` |\n     *\n     * @param selector CSS selector string\n     * @param handler Function called with each matching Element\n     * @returns The HTMLRewritingStream instance for chaining\n     * @throws `Error` If the provided selector is not a valid CSS selector or \n     * if the handler is not a function.\n     */\n    onElement(selector: string, handler: (element: Element) => void): this;\n\n    /**\n     * The writable stream to which HTML content should be written.\n     */\n    writable: WritableStream;\n    /**\n     * The readable stream from which transformed HTML content can be read.\n     */\n    readable: ReadableStream;\n  }\n\n  /**\n   * Options for content insertion and replacement methods on {@link Element}.\n   *\n   * @version 3.35.0\n   */\n  export interface ElementRewriterOptions {\n    /**\n     * If `true`, any HTML markup in the content will be escaped so it is safe to insert as text.\n     */\n    escapeHTML?: boolean;\n  }\n\n  /**\n   * Represents an HTML element encountered during rewriting. Passed to the callback registered\n   * via {@link HTMLRewritingStream.onElement}.\n   *\n   * @version 3.35.0\n   */\n  export class Element {\n    /**\n     * The CSS selector that matched this element.\n     */\n    readonly selector: string;\n    /**\n     * The tag name of this element.\n     */\n    readonly tag: string;\n\n    /**\n     * Sets an attribute on the element. If the attribute already exists, its value is updated.\n     * @param name Attribute name\n     * @param value Attribute value\n     */\n    setAttribute(name: string, value: string): void;\n    /**\n     * Gets the value of an attribute.\n     * @param name Attribute name\n     * @returns The attribute value, or `null` if the attribute is not present.\n     */\n    getAttribute(name: string): string | null;\n    /**\n     * Removes an attribute from the element.\n     * @param name Attribute name\n     */\n    removeAttribute(name: string): void;\n    /**\n     * Replaces the element and its children with new content.\n     * @param content Replacement HTML or text\n     * @param options Optional rewriting options\n     */\n    replaceWith(content: string, options?: ElementRewriterOptions): void;\n    /**\n     * Replaces the element's children with new content, keeping the element's tags.\n     * @param content Replacement HTML or text\n     * @param options Optional rewriting options\n     */\n    replaceChildren(content: string, options?: ElementRewriterOptions): void;\n    /**\n     * Inserts content before the element's opening tag.\n     * @param content HTML or text to insert\n     * @param options Optional rewriting options\n     */\n    before(content: string, options?: ElementRewriterOptions): void;\n    /**\n     * Inserts content after the element's closing tag.\n     * @param content HTML or text to insert\n     * @param options Optional rewriting options\n     */\n    after(content: string, options?: ElementRewriterOptions): void;\n    /**\n     * Inserts content at the beginning of the element's children.\n     * @param content HTML or text to prepend\n     * @param options Optional rewriting options\n     */\n    prepend(content: string, options?: ElementRewriterOptions): void;\n    /**\n     * Inserts content at the end of the element's children.\n     * @param content HTML or text to append\n     * @param options Optional rewriting options\n     */\n    append(content: string, options?: ElementRewriterOptions): void;\n  }\n}\n"
  },
  {
    "path": "types/image-optimizer.d.ts",
    "content": "declare module 'fastly:image-optimizer' {\n  /**\n   * A color, either a 3 or 6 character hexadecimal string, or an object with RGB(A) components.\n   *\n   * When specified as an object:\n   * - `r`, `g`, `b` are integers (0-255)\n   * - `a` is an optional alpha value (0.0-1.0)\n   */\n  type Color =\n    | string\n    | {\n        r: number;\n        g: number;\n        b: number;\n        a?: number;\n      };\n  /**\n   * A percentage, expressed as a string containing a number suffixed with a percent sign\n   * (e.g. `'50%'`).\n   */\n  type Percentage = string;\n  /**\n   * The size of a region, specified as either absolute dimensions or a ratio.\n   * Exactly one of `absolute` or `ratio` must be provided.\n   */\n  interface Size {\n    /**\n     * Absolute dimensions, with width and height as integer pixel values or percentage strings.\n     */\n    absolute?: {\n      width: number | Percentage;\n      height: number | Percentage;\n    };\n    /**\n     * Aspect ratio, with width and height as numbers.\n     */\n    ratio?: {\n      width: number;\n      height: number;\n    };\n  }\n  /**\n   * The position of a region. Provide exactly one of `x`/`offsetX` and exactly one of\n   * `y`/`offsetY`.\n   */\n  interface Position {\n    /** Absolute x position as integer pixels or percentage string. */\n    x?: number | Percentage;\n    /** X offset as a percentage number. */\n    offsetX?: number;\n    /** Absolute y position as integer pixels or percentage string. */\n    y?: number | Percentage;\n    /** Y offset as a percentage number. */\n    offsetY?: number;\n  }\n\n  /**\n   * Pixel or percentage values for each side of an image.\n   */\n  interface Sides {\n    top: number | Percentage;\n    bottom: number | Percentage;\n    left: number | Percentage;\n    right: number | Percentage;\n  }\n\n  /**\n   * Where image optimizations should occur.\n   *\n   * @version 3.36.0\n   */\n  var Region: {\n    UsEast: 'us_east';\n    UsCentral: 'us_central';\n    UsWest: 'us_west';\n    EuCentral: 'eu_central';\n    EuWest: 'eu_west';\n    Asia: 'asia';\n    Australia: 'australia';\n  };\n  /**\n   * Enable optimization features automatically based on browser support.\n   *\n   * @version 3.36.0\n   */\n  var Auto: {\n    /** If the browser's Accept header indicates compatibility, deliver an AVIF image. */\n    AVIF: 'avif';\n    /** If the browser's Accept header indicates compatibility, deliver a WebP image. */\n    WEBP: 'webp';\n  };\n  /**\n   * Algorithm for converting an image to black and white.\n   *\n   * @version 3.36.0\n   */\n  var BWAlgorithm: {\n    /** Uses a luminance threshold to convert the image to black and white. */\n    Threshold: 'threshold';\n    /** Uses Atkinson dithering to convert the image to black and white. */\n    Atkinson: 'atkinson';\n  };\n  /**\n   * Mode for content-aware cropping.\n   *\n   * @version 3.36.0\n   */\n  var CropMode: {\n    /** Content-aware cropping that intelligently focuses on the most important visual content, including face detection. */\n    Smart: 'smart';\n    /** Allow cropping out-of-bounds regions. */\n    Safe: 'safe';\n  };\n  /**\n   * Disable features that are enabled by default.\n   *\n   * @version 3.36.0\n   */\n  var Disable: {\n    /** Prevent images being resized larger than the source image. */\n    Upscale: 'upscale';\n  };\n  /**\n   * Enable features that are disabled by default.\n   *\n   * @version 3.36.0\n   */\n  var Enable: {\n    /** Allow images to be resized larger than the source image. */\n    Upscale: 'upscale';\n  };\n  /**\n   * How the image will fit within the size bounds provided.\n   *\n   * @version 3.36.0\n   */\n  var Fit: {\n    /** Resize to fit entirely within the specified region, making one dimension smaller if needed. */\n    Bounds: 'bounds';\n    /** Resize to entirely cover the specified region, making one dimension larger if needed. */\n    Cover: 'cover';\n    /** Resize and crop centrally to exactly fit the specified region. */\n    Crop: 'crop';\n  };\n  /**\n   * Output image format.\n   *\n   * @version 3.36.0\n   */\n  var Format: {\n    /** Automatically use the best format based on browser support and image/transform characteristics. */\n    Auto: 'auto';\n    /** AVIF. */\n    AVIF: 'avif';\n    /** Baseline JPEG. */\n    BJPG: 'bjpg';\n    /** Graphics Interchange Format. */\n    GIF: 'gif';\n    /** JPEG. */\n    JPG: 'jpg';\n    /** JPEG XL. */\n    JXL: 'jxl';\n    /** MP4 (H.264). */\n    MP4: 'mp4';\n    /** Progressive JPEG. */\n    PJPG: 'pjpg';\n    /** Progressive JPEG XL. */\n    PJXL: 'pjxl';\n    /** Portable Network Graphics. */\n    PNG: 'png';\n    /** PNG palette image with 256 colors and 8-bit transparency. */\n    PNG8: 'png8';\n    /** Scalable Vector Graphics. */\n    SVG: 'svg';\n    /** WebP. */\n    WEBP: 'webp';\n    /** WebP (Lossless). */\n    WEBPLL: 'webpll';\n    /** WebP (Lossy). */\n    WEBPLY: 'webply';\n  };\n  /**\n   * Which metadata fields to preserve during transformation.\n   *\n   * @version 3.36.0\n   */\n  var Metadata: {\n    /** Preserve copyright notice, creator, credit line, licensor, and web statement of rights fields. */\n    Copyright: 'copyright';\n    /** Preserve the C2PA manifest and add any transformations performed by Fastly Image Optimizer. */\n    C2PA: 'c2pa';\n    /** Preserve both copyright and C2PA metadata. */\n    CopyrightAndC2PA: 'copyright,c2pa';\n  };\n  /**\n   * Automatic quality compression level.\n   *\n   * @version 3.36.0\n   */\n  var Optimize: {\n    /** Output image quality will be similar to the input image quality. */\n    Low: 'low';\n    /** More optimization is allowed; attempts to preserve visual quality. */\n    Medium: 'medium';\n    /** Minor visual artifacts may be visible; produces the smallest file. */\n    High: 'high';\n  };\n  /**\n   * Cardinal orientation of the image (EXIF orientation values).\n   *\n   * @version 3.36.0\n   */\n  var Orient: {\n    Default: '1';\n    FlipHorizontal: '2';\n    FlipHorizontalAndVertical: '3';\n    FlipVertical: '4';\n    FlipHorizontalOrientLeft: '5';\n    OrientRight: '6';\n    FlipHorizontalOrientRight: '7';\n    OrientLeft: '8';\n  };\n  /**\n   * H.264 profile class when converting to video.\n   *\n   * @version 3.36.0\n   */\n  var Profile: {\n    /** Recommended for video conferencing and mobile applications. (Default) */\n    Baseline: 'baseline';\n    /** Recommended for standard-definition broadcasts. */\n    Main: 'main';\n    /** Recommended for high-definition broadcasts. */\n    High: 'high';\n  };\n  /**\n   * Resize filter algorithm.\n   *\n   * @version 3.36.0\n   */\n  var ResizeFilter: {\n    /** Uses the value of nearby translated pixel values. */\n    Nearest: 'nearest';\n    /** Uses an average of a 2x2 environment of pixels. */\n    Bilinear: 'bilinear';\n    /** Same as Bilinear. */\n    Linear: 'linear';\n    /** Uses an average of a 4x4 environment of pixels, weighing the innermost pixels higher. */\n    Bicubic: 'bicubic';\n    /** Same as Bicubic. */\n    Cubic: 'cubic';\n    /** Uses the Lanczos filter with sinc resampling for edge and linear feature detection. */\n    Lanczos2: 'lanczos2';\n    /** Uses a better approximation of the sinc resampling function. (Default) */\n    Lanczos3: 'lanczos3';\n    /** Same as Lanczos3. */\n    Lanczos: 'lanczos';\n  };\n\n  /**\n   * Options for the Fastly Image Optimizer, specified via the `imageOptimizerOptions` property\n   * in the `Request` constructor. See the\n   * [Image Optimizer reference docs](https://www.fastly.com/documentation/reference/io/) for\n   * detailed documentation on all options.\n   *\n   * @example\n   * ```js\n   * import { Format, Orient, CropMode, Region } from 'fastly:image-optimizer';\n   *\n   * async function handleRequest(event) {\n   *   return await fetch('https://www.w3.org/Graphics/PNG/text2.png', {\n   *     imageOptimizerOptions: {\n   *       region: Region.UsEast,\n   *       format: Format.PNG,\n   *       bgColor: { r: 100, g: 255, b: 9, a: 0.5 },\n   *       brightness: -20,\n   *       orient: Orient.FlipVertical,\n   *       crop: { size: { ratio: { width: 4, height: 3 } }, mode: CropMode.Safe },\n   *     },\n   *     backend: 'my-backend'\n   *   });\n   * }\n   *\n   * addEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n   * ```\n   *\n   * @version 3.36.0\n   */\n  interface ImageOptimizerOptions {\n    /**\n     * Specify the region where image optimizations should occur. This is the only required option.\n     */\n    region:\n      | 'us_east'\n      | 'us_central'\n      | 'us_west'\n      | 'eu_central'\n      | 'eu_west'\n      | 'asia'\n      | 'australia';\n    /**\n     * Enable optimization features automatically based on browser support.\n     */\n    auto?: 'avif' | 'webp';\n    /**\n     * Set the background color of an image.\n     */\n    bgColor?: Color;\n    /**\n     * Set the blurriness of the output image. Number values are in the range 0.5-1000;\n     * percentage strings are also accepted.\n     */\n    blur?: number | Percentage;\n    /**\n     * Set the brightness of the output image (-100 to 100).\n     */\n    brightness?: number;\n    /**\n     * Convert an image to black and white using a given algorithm.\n     */\n    bw?: 'threshold' | 'atkinson';\n    /**\n     * Increase the size of the canvas around an image.\n     */\n    canvas?: {\n      size: Size;\n      position?: Position;\n    };\n    /**\n     * Set the contrast of the output image (-100 to 100).\n     */\n    contrast?: number;\n    /**\n     * Remove pixels from an image.\n     */\n    crop?: {\n      size: Size;\n      position?: Position;\n      mode?: 'smart' | 'safe';\n    };\n    /**\n     * Disable features that are enabled by default.\n     */\n    disable?: 'upscale';\n    /**\n     * Set the ratio between physical pixels and logical pixels (1-10).\n     */\n    dpr?: number;\n    /**\n     * Enable features that are disabled by default.\n     */\n    enable?: 'upscale';\n    /**\n     * Set how the image will fit within the size bounds provided.\n     */\n    fit?: 'bounds' | 'cover' | 'crop';\n    /**\n     * Specify the output format to convert the image to.\n     */\n    format?:\n      | 'auto'\n      | 'avif'\n      | 'bjpg'\n      | 'gif'\n      | 'jpg'\n      | 'jxl'\n      | 'mp4'\n      | 'pjpg'\n      | 'pjxl'\n      | 'png'\n      | 'png8'\n      | 'svg'\n      | 'webp'\n      | 'webpll'\n      | 'webply';\n    /**\n     * Extract the first frame from an animated image sequence.\n     */\n    frame?: 1;\n    /**\n     * Resize the height of the image, as integer pixels or a percentage string.\n     */\n    height?: number | Percentage;\n    /**\n     * Specify the level constraints when converting to video. Must be one of:\n     * `\"1.0\"`, `\"1.1\"`, `\"1.2\"`, `\"1.3\"`, `\"2.0\"`, `\"2.1\"`, `\"2.2\"`, `\"3.0\"`, `\"3.1\"`,\n     * `\"3.2\"`, `\"4.0\"`, `\"4.1\"`, `\"4.2\"`, `\"5.0\"`, `\"5.1\"`, `\"5.2\"`, `\"6.0\"`, `\"6.1\"`,\n     * or `\"6.2\"`.\n     */\n    level?: string;\n    /**\n     * Control which metadata fields are preserved during transformation.\n     */\n    metadata?: 'copyright' | 'c2pa' | 'copyright,c2pa';\n    /**\n     * Automatically apply optimal quality compression.\n     */\n    optimize?: 'low' | 'medium' | 'high';\n    /**\n     * Change the cardinal orientation of the image.\n     */\n    orient?: '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8';\n    /**\n     * Add pixels to the edge of an image.\n     */\n    pad?: Sides;\n    /**\n     * Remove pixels from an image before any other transformations occur.\n     */\n    precrop?: {\n      size: Size;\n      position?: Position;\n      mode?: 'smart' | 'safe';\n    };\n    /**\n     * Specify the H.264 profile class when converting to video.\n     */\n    profile?: 'baseline' | 'main' | 'high';\n    /**\n     * Optimize the image to the given compression level for lossy file formatted images (0-100).\n     */\n    quality?: number;\n    /**\n     * Specify the resize filter used when resizing images.\n     */\n    resizeFilter?:\n      | 'nearest'\n      | 'bilinear'\n      | 'linear'\n      | 'bicubic'\n      | 'cubic'\n      | 'lanczos2'\n      | 'lanczos3'\n      | 'lanczos';\n    /**\n     * Set the saturation of the output image (-100 to 100).\n     */\n    saturation?: number;\n    /**\n     * Set the sharpness of the output image.\n     */\n    sharpen?: {\n      /** Sharpening amount (0-10). */\n      amount: number;\n      /** Sharpening radius (0.5-1000). */\n      radius: number;\n      /** Sharpening threshold (0-255). */\n      threshold: number;\n    };\n    /**\n     * Remove pixels from the edge of an image.\n     */\n    trim?: Sides;\n    /**\n     * Trim pixels from the image edges that match the specified color. Either a {@link Color}\n     * value, or an object with `color` and optional `threshold` (0-1) properties.\n     */\n    trimColor?:\n      | Color\n      | {\n          color: Color;\n          /** Tolerance for color matching (0-1). */\n          threshold?: number;\n        };\n    /**\n     * Remove explicit width and height properties in SVG output.\n     */\n    viewbox?: 1;\n    /**\n     * Resize the width of the image, as integer pixels or a percentage string.\n     */\n    width?: number | Percentage;\n  }\n  /**\n   * Convert image optimizer options into the query string that is sent to the image optimizer,\n   * for logging and debugging purposes.\n   *\n   * @version 3.36.0\n   */\n  function optionsToQueryString(options: ImageOptimizerOptions): string;\n}\n"
  },
  {
    "path": "types/index.d.ts",
    "content": "/// <reference path=\"acl.d.ts\" />\n/// <reference path=\"backend.d.ts\" />\n/// <reference path=\"body.d.ts\" />\n/// <reference path=\"cache-override.d.ts\" />\n/// <reference path=\"cache.d.ts\" />\n/// <reference path=\"compute.d.ts\" />\n/// <reference path=\"config-store.d.ts\" />\n/// <reference path=\"device.d.ts\" />\n/// <reference path=\"dictionary.d.ts\" />\n/// <reference path=\"edge-rate-limiter.d.ts\" />\n/// <reference path=\"env.d.ts\" />\n/// <reference path=\"experimental.d.ts\" />\n/// <reference path=\"fanout.d.ts\" />\n/// <reference path=\"websocket.d.ts\" />\n/// <reference path=\"geolocation.d.ts\" />\n/// <reference path=\"globals.d.ts\" />\n/// <reference path=\"kv-store.d.ts\" />\n/// <reference path=\"logger.d.ts\" />\n/// <reference path=\"secret-store.d.ts\" />\n/// <reference path=\"html-rewriter.d.ts\" />\n/// <reference path=\"image-optimizer.d.ts\" />\n/// <reference path=\"shielding.d.ts\" />\n/// <reference path=\"security.d.ts\" />\n"
  },
  {
    "path": "types/index.js",
    "content": "export {};\n"
  },
  {
    "path": "types/kv-store.d.ts",
    "content": "/// <reference path=\"globals.d.ts\" />\n\ndeclare module 'fastly:kv-store' {\n  /**\n   * Class for accessing a [Fastly KV store](https://developer.fastly.com/reference/api/kv-store/).\n   *\n   * A KV store is a persistent, globally consistent key-value store. See\n   * [Data stores for Fastly services](https://developer.fastly.com/learning/concepts/edge-state/data-stores#kv-stores)\n   * for initialization and usage details.\n   *\n   * **Note**: Can only be used when processing requests, not during build-time initialization.\n   *\n   * @example\n   * In this example we connect to a KV store named `'files'`, save an entry to the store\n   * under the key `'hello'` and then read back the value and return it to the client.\n   *\n   * ```js\n   * /// <reference types=\"@fastly/js-compute\" />\n   *\n   * import { KVStore } from \"fastly:kv-store\";\n   *\n   * async function app(event) {\n   *   const files = new KVStore('files')\n   *\n   *   await files.put('hello', 'world')\n   *\n   *   const entry = await files.get('hello')\n   *\n   *   return new Response(await entry.text())\n   * }\n   *\n   * addEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n   *\n   * ```\n   */\n  export class KVStore {\n    /**\n     * Creates a new JavaScript KVStore object which interacts with the Fastly KV store named `name`.\n     *\n     * @param name Name of the Fastly KV store to interact with. A name cannot be empty, contain\n     *   control characters, or be longer than 255 characters.\n     * @throws `TypeError` if no KV store exists with the provided name, or the name is empty,\n     *   longer than 255 characters, does not start with an ASCII alphabetical character,\n     *   or contains control characters (`\\u0000-\\u001F`).\n     */\n    constructor(name: string);\n    /**\n     * Delete the value associated with the key `key` in the KV store.\n     *\n     * @param key The key to delete from within the KV store. A key cannot:\n     * - Be any of the strings \"\", \".\", or \"..\"\n     * - Start with the string \".well-known/acme-challenge/\"\n     * - Contain any of the characters \"#;?^|\\n\\r\"\n     * - Be longer than 1024 characters\n     * @throws `TypeError` if the key violates any of the above constraints.\n     * @version 3.13.0\n     */\n    delete(key: string): Promise<undefined>;\n\n    /**\n     * Gets the value associated with the key `key` in the KV store.\n     *\n     * When the key is present, a resolved `Promise` containing a `KVStoreEntry` will be returned\n     * which contains the associated value. When the key is absent, a resolved `Promise`\n     * containing `null` is returned.\n     *\n     * @param key The key to retrieve from within the KV store. A key cannot:\n     * - Be any of the strings \"\", \".\", or \"..\"\n     * - Start with the string \".well-known/acme-challenge/\"\n     * - Contain any of the characters \"#;?^|\\n\\r\"\n     * - Be longer than 1024 characters\n     * @throws Throws `TypeError` if the key violates any of the above constraints.\n     */\n    get(key: string): Promise<KVStoreEntry | null>;\n\n    /**\n     * Write the value of `value` into the KV store under the key `key`.\n     *\n     * Note: KV store is eventually consistent, this means that the updated contents associated\n     * with the key `key` may not be available to read from all edge locations immediately and\n     * some edge locations may continue returning the previous contents associated with the key.\n     *\n     * @param key The key to associate with the value in the KV store. A key cannot:\n     * - Be any of the strings \"\", \".\", or \"..\"\n     * - Start with the string \".well-known/acme-challenge/\"\n     * - Contain any of the characters \"#;?^|\\n\\r\"\n     * - Be longer than 1024 characters\n     * @param value The value to store within the KV store. Maximum size is 30 MB.\n     * @throws `TypeError` if the key violates any of the above constraints or \n     * if `gen` is provided and is not a positive integer.\n     */\n    put(\n      key: string,\n      value: BodyInit,\n      options?: {\n        /**\n         * Binary metadata to associate with the entry, up to 1000 bytes.\n         *\n         * If passing a string, UTF-8 encoding is used.\n         *\n         * @version 3.26.0\n         */\n        metadata?: ArrayBufferView | ArrayBuffer | string;\n        /**\n         * TTL (time-to-live) for the entry, in seconds.\n         *\n         * @version 3.26.0\n         */\n        ttl?: number;\n        /**\n         * Insert mode, defaults to `'overwrite'`.\n         * - `'overwrite'`: Replace any existing value for the key.\n         * - `'add'`: Only insert if the key does not already exist.\n         * - `'append'`: Append to any existing value for the key.\n         * - `'prepend'`: Prepend to any existing value for the key.\n         *\n         * @version 3.26.0\n         */\n        mode?: 'overwrite' | 'add' | 'append' | 'prepend';\n        /**\n         * Generation counter for conditional writes. The write only succeeds if the\n         * current generation of the entry matches this value. Must be a positive integer.\n         *\n         * @version 3.31.0\n         */\n        gen?: number;\n      },\n    ): Promise<undefined>;\n\n    /**\n     * List keys in the KV store, optionally filtered by prefix.\n     *\n     * @param options Options for filtering and paginating the key list.\n     * @returns A `Promise` resolving with the list of keys and a cursor for pagination.\n     * @version 3.26.0\n     */\n    list(options?: {\n      /**\n       * Do not wait to sync the key list, and instead immediately return the current\n       * cached key list. May be faster but possibly out of date.\n       */\n      noSync?: boolean;\n      /**\n       * String prefix for keys to list.\n       */\n      prefix?: string;\n      /**\n       * Limit the number of keys provided per listing.\n       */\n      limit?: number;\n      /**\n       * The base64 cursor string representing the last listing operation.\n       */\n      cursor?: string;\n    }): Promise<{\n      list: string[];\n      /**\n       * Pass this base64 cursor into a subsequent list call to obtain the next listing.\n       *\n       * The cursor is `undefined` when the end of the list is reached.\n       */\n      cursor: string | undefined;\n    }>;\n  }\n\n  /**\n   * Class for interacting with a [Fastly KV store](https://developer.fastly.com/reference/api/kv-store/) entry.\n   */\n  interface KVStoreEntry {\n    /**\n     * A ReadableStream with the contents of the entry.\n     */\n    get body(): ReadableStream;\n\n    /**\n     * A boolean value that indicates whether the body has been read from already.\n     */\n    get bodyUsed(): boolean;\n\n    /**\n     * Reads the body and returns it as a promise that resolves with a string.\n     * The response is always decoded using UTF-8.\n     */\n    text(): Promise<string>;\n\n    /**\n     * Reads the body and returns it as a promise that resolves with the result of parsing the body text as JSON.\n     */\n    json(): Promise<object>;\n\n    /**\n     * Reads the body and returns it as a promise that resolves with an ArrayBuffer.\n     */\n    arrayBuffer(): Promise<ArrayBuffer>;\n\n    /**\n     * Binary metadata associated with this entry, up to 1000 bytes.\n     *\n     * Returns `null` if no metadata is set.\n     *\n     * @version 3.26.0\n     */\n    metadata(): ArrayBuffer | null;\n\n    /**\n     * Metadata associated with this entry, decoded as a UTF-8 string.\n     *\n     * Returns `null` if no metadata is set.\n     *\n     * @throws If the metadata is not valid UTF-8.\n     * @version 3.26.0\n     */\n    metadataText(): string | null;\n  }\n}\n"
  },
  {
    "path": "types/logger.d.ts",
    "content": "declare module 'fastly:logger' {\n  /**\n   * Class for connecting to [Fastly named log endpoints](https://developer.fastly.com/learning/integrations/logging/).\n   *\n   * **Note**: Can only be used when processing requests, not during build-time initialization.\n   *\n   * @example\n   * In this example we create a logger named `\"splunk\"` and log the incoming request method\n   * and destination.\n   *\n   * ```js\n   * /// <reference types=\"@fastly/js-compute\" />\n   * import { Logger } from \"fastly:logger\";\n   *\n   * async function app(event) {\n   *   let logger = new Logger(\"splunk\");\n   *   logger.log(JSON.stringify({\n   *     method: event.request.method,\n   *     url: event.request.url\n   *   }));\n   *\n   *   return new Response('OK');\n   * }\n   *\n   * addEventListener(\"fetch\", event => event.respondWith(app(event)));\n   * ```\n   */\n  export class Logger {\n    /**\n     * Creates a new Logger instance for the given\n     * [named log endpoint](https://developer.fastly.com/learning/integrations/logging).\n     *\n     * @param name The name of the Fastly log endpoint to associate with this Logger instance.\n     */\n    constructor(name: string);\n    /**\n     * Send the given message, converted to a string, to this Logger instance's endpoint.\n     */\n    log(message: any): void;\n  }\n\n  interface ConsoleLoggingOptions {\n    /**\n     * Whether to output string prefixes \"Log: \" | \"Debug: \" | \"Info: \" | \"Warn: \" | \"Error: \"\n     * before messages.\n     *\n     * Defaults to false.\n     */\n    prefixing?: boolean;\n    /**\n     * Whether to use stderr for `console.warn` and `console.error` messages.\n     *\n     * Defaults to false.\n     */\n    stderr?: boolean;\n  }\n\n  /**\n   * Configure the behaviour of `console.log` and related console logging functions.\n   * @version 3.28.0\n   */\n  export function configureConsole(loggingOptions: ConsoleLoggingOptions): void;\n}\n"
  },
  {
    "path": "types/secret-store.d.ts",
    "content": "declare module 'fastly:secret-store' {\n  /**\n   * Class for accessing a [Fastly secret store](https://developer.fastly.com/reference/api/services/resources/secret-store/).\n   *\n   * A secret store is a persistent, globally distributed store for secrets accessible to\n   * Fastly Compute services during request processing.\n   *\n   * **Note**: Can only be used when processing requests, not during build-time initialization.\n   *\n   * @example\n   * In this example we connect to a secret store named `'secrets'` and retrieve a secret\n   * named `'cat-api-key'` to use in a request header.\n   *\n   * ```js\n   * /// <reference types=\"@fastly/js-compute\" />\n   *\n   * import { SecretStore } from \"fastly:secret-store\";\n   *\n   * async function app(event) {\n   *   const secrets = new SecretStore('secrets')\n   *\n   *   const catApiKey = await secrets.get('cat-api-key')\n   *\n   *   return fetch('/api/cat', {\n   *     headers: {\n   *       'cat-api-key': catApiKey.plaintext()\n   *     }\n   *   })\n   * }\n   *\n   * addEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n   * ```\n   */\n  class SecretStore {\n    /**\n     * Creates a new `SecretStore` object which interacts with the Fastly secret store named `name`.\n     *\n     * @param name Name of the Fastly secret store to interact with. A name cannot be empty,\n     *   longer than 255 characters, or contain characters other than letters, numbers, dashes\n     *   (`-`), underscores (`_`), and periods (`.`).\n     * @throws Throws `TypeError` if no secret store exists with the provided name, the name is empty,\n     *   longer than 255 characters, or contains invalid characters.\n     */\n    constructor(name: string);\n    /**\n     * Get the value associated with the key `key` in the secret store. If the key does not\n     * exist, the returned `Promise` resolves with `null`.\n     *\n     * @param key The key to retrieve. A key cannot be empty, longer than 255 characters, or\n     *   contain characters other than letters, numbers, dashes (`-`), underscores (`_`), and\n     *   periods (`.`).\n     * @throws Throws `TypeError` if the key is empty, longer than 255 characters, or contains\n     *   invalid characters.\n     */\n    get(key: string): Promise<SecretStoreEntry | null>;\n\n    /**\n     * Construct a local in-memory `SecretStoreEntry` from the provided bytes, useful for\n     * passing bytes to APIs that only accept a `SecretStoreEntry`.\n     *\n     * **Note**: This is not the recommended way to obtain secrets — use {@link get} instead.\n     *\n     * @param bytes The raw bytes to wrap as a `SecretStoreEntry`.\n     * @version 3.15.0\n     */\n    static fromBytes(bytes: ArrayBufferView | ArrayBuffer): SecretStoreEntry;\n  }\n\n  class SecretStoreEntry {\n    /**\n     * Get the plaintext value of the secret as a UTF-8 string.\n     *\n     * **Note**: Using this method will bring the secret into user memory — avoid using it\n     * when possible, instead passing the `SecretStoreEntry` directly.\n     */\n    plaintext(): string;\n    /**\n     * Get the raw byte value of the secret as a Uint8Array.\n     *\n     * **Note**: Using this method will bring the secret into user memory — avoid using it\n     * when possible, instead passing the `SecretStoreEntry` directly.\n     *\n     * @version 3.15.0\n     */\n    rawBytes(): Uint8Array<ArrayBuffer>;\n  }\n}\n"
  },
  {
    "path": "types/security.d.ts",
    "content": "declare module 'fastly:security' {\n  /**\n   * Inspect a request using the [Fastly Next-Gen WAF](https://docs.fastly.com/en/ngwaf/).\n   *\n   * **Note**: Can only be used when processing requests, not during build-time initialization.\n   *\n   * @param request The request to inspect.\n   * @param config Configuration for the inspection.\n   * @throws {TypeError} If `request` is not a Request instance.\n   * @throws {TypeError} If `overrideClientIp` is not a valid IPv4 or IPv6 address.\n   *\n   * @example\n   * ```js\n   * /// <reference types=\"@fastly/js-compute\" />\n   *\n   * import { inspect } from \"fastly:security\";\n   *\n   * async function app(event) {\n   *   const res = inspect(event.request, {\n   *     corp: \"my-corp\",\n   *     workspace: \"my-workspace\"\n   *   });\n   *   switch (res.verdict) {\n   *     case \"allow\":\n   *       return await fetch(event.request);\n   *     case \"block\":\n   *       return new Response(\"Request Blocked\", { status: 400 });\n   *     case \"unauthorized\":\n   *       return new Response(\"Unauthorized\", { status: 401 });\n   *     default:\n   *       return new Response(\"Unexpected verdict\", { status: 500 });\n   *   }\n   * }\n   *\n   * addEventListener(\"fetch\", (event) => event.respondWith(app(event)));\n   * ```\n   *\n   * @version 3.38.0\n   */\n  export function inspect(\n    request: Request,\n    config: InspectConfig,\n  ): InspectResponse;\n\n  /**\n   * Configuration for {@link inspect}.\n   *\n   * @version 3.38.3\n   */\n  export interface InspectConfig {\n    /**\n     * Set a corp name for the configuration.\n     *\n     * This is currently required, but will be made optional in the future.\n     */\n    corp: string;\n    /**\n     * Set a workspace name for the configuration.\n     *\n     * This is currently required, but will be made optional in the future.\n     */\n    workspace: string;\n    /**\n     * Specify an explicit client IP address to inspect. Must be a valid IPv4 or IPv6 address.\n     *\n     * By default, `inspect` will use the IP address that made the request to the\n     * running Compute service, but you may want to use a different IP when\n     * service chaining or if requests are proxied from outside of Fastly's\n     * network.\n     */\n    overrideClientIp?: string;\n  }\n\n  /**\n   * Results of inspecting a request with the Fastly Next-Gen WAF.\n   */\n  export interface InspectResponse {\n    /** WAF response status code. */\n    waf_response: number;\n    /** A redirect URL returned from the WAF, if applicable. */\n    redirect_url?: string;\n    /** Tags returned by the WAF. */\n    tags: string[];\n    /**\n     * The WAF's verdict on how to handle this request.\n     *\n     * Known verdicts are defined in {@link InspectVerdict}, but other values\n     * may be returned.\n     */\n    verdict: InspectVerdict | string;\n    /** How long the WAF spent determining its verdict, in milliseconds. */\n    decision_ms: number;\n  }\n\n  /**\n   * Known verdict values returned by {@link inspect}.\n   *\n   * @version 3.38.0\n   */\n  export enum InspectVerdict {\n    /** The request is allowed. */\n    Allow = 'allow',\n    /** The request should be blocked. */\n    Block = 'block',\n    /** This service is not authorized to inspect requests. */\n    Unauthorized = 'unauthorized',\n  }\n}\n"
  },
  {
    "path": "types/shielding.d.ts",
    "content": "/// <reference path=\"../types/backend.d.ts\" />\n\ndeclare module 'fastly:shielding' {\n  /**\n   * Configuration options for shield backends returned by\n   * {@link Shield.encryptedBackend} and {@link Shield.unencryptedBackend}.\n   */\n  interface ShieldBackendConfiguration {\n    /**\n     * First byte timeout for the returned backend, in milliseconds.\n     */\n    firstByteTimeout?: number;\n  }\n\n  /**\n   * Represents a [Fastly shield](https://www.fastly.com/documentation/guides/concepts/shielding/#shield-locations)\n   * location, used to route requests through a designated shield POP.\n   *\n   * **Note**: Can only be used when processing requests, not during build-time initialization.\n   *\n   * @example\n   * ```js\n   * /// <reference types=\"@fastly/js-compute\" />\n   *\n   * import { Shield } from \"fastly:shielding\";\n   *\n   * async function app(event) {\n   *     const shield = new Shield('wsi-australia-au');\n   *     // If running on the shield POP, fetch from the origin directly\n   *     if (shield.runningOn()) {\n   *         return await fetch('https://my-site.com/anything', { backend: 'my-backend' });\n   *     }\n   *     // Otherwise, route the request through the shield using an encrypted connection\n   *     return await fetch(event.request, { backend: shield.encryptedBackend() });\n   * }\n   *\n   * addEventListener(\"fetch\", (event) => event.respondWith(app(event)))\n   * ```\n   *\n   * @version 3.37.0\n   */\n  export class Shield {\n    /**\n     * Load information about the given shield.\n     *\n     * Shield names are shield codes as listed in the\n     * [shield locations](https://www.fastly.com/documentation/guides/concepts/shielding/#shield-locations)\n     * documentation (e.g. `\"pdx-or-us\"` for Portland, OR, USA or `\"paris-fr\"` for Paris, France).\n     *\n     * @param name The shield code identifying the shield POP\n     * @throws Throws an `Error` if no shield exists with the provided name\n     */\n    constructor(name: string);\n\n    /**\n     * Returns whether the code is currently running on (or effectively on) the given shield POP.\n     *\n     * This may also return `true` when Fastly is routing traffic from the target shield POP to the\n     * current POP for load balancing or performance reasons, since the result would be approximately\n     * identical to running on the target shield itself.\n     */\n    runningOn(): boolean;\n\n    /**\n     * Return a {@link backend!Backend | Backend} representing an unencrypted\n     * connection to this shield POP. Prefer {@link encryptedBackend} unless the data is already\n     * encrypted, as data sent over this backend travels unencrypted over the open internet.\n     *\n     * @param configuration Optional backend configuration\n     */\n    unencryptedBackend(\n      configuration?: ShieldBackendConfiguration,\n    ): import('fastly:backend').Backend;\n\n    /**\n     * Return a {@link backend!Backend | Backend} representing an encrypted\n     * connection to this shield POP. This is almost always the backend you want to use.\n     *\n     * @param configuration Optional backend configuration\n     */\n    encryptedBackend(\n      configuration?: ShieldBackendConfiguration,\n    ): import('fastly:backend').Backend;\n  }\n}\n"
  },
  {
    "path": "types/websocket.d.ts",
    "content": "/// <reference path=\"globals.d.ts\" />\n\ndeclare module 'fastly:websocket' {\n  /**\n   * Create a {@link Response} that instructs Fastly to pass the original request through as a\n   * WebSocket connection to the specified backend.\n   *\n   * **Note**: Can only be used when processing requests, not during build-time initialization.\n   *\n   * @example\n   * ```js\n   * import { createWebsocketHandoff } from \"fastly:websocket\";\n   *\n   * async function handleRequest(event) {\n   *     const url = new URL(event.request.url);\n   *     if (url.pathname === '/stream') {\n   *         return createWebsocketHandoff(event.request, 'websocket-backend');\n   *     }\n   *     return new Response('Not found', { status: 404 });\n   * }\n   *\n   * addEventListener(\"fetch\", (event) => event.respondWith(handleRequest(event)));\n   * ```\n   *\n   * @param request The request to pass through as a WebSocket connection\n   * @param backend The name of the backend to send the request to (1–254 characters)\n   * @throws Throws an `Error` if `request` is not a {@link Request} instance, or if `backend` is empty or longer than 254 characters\n   * @version 3.34.0\n   */\n  function createWebsocketHandoff(request: Request, backend: string): Response;\n}\n"
  }
]